summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhangab <zhanganbing@chinamobile.com>2018-04-18 09:11:56 +0800
committerzhangab <zhanganbing@chinamobile.com>2018-04-18 09:12:03 +0800
commitd698af153772ca4351ad3b23fbb987fc749890af (patch)
tree8fa49f10523134f9596814ef7a30528e298ac660
parentffffd8a35ae5fcea703a7427844037c07c232b92 (diff)
Fix Security/Vulnerability problems
Change-Id: Ie0f2c9e0794941d9b9a7f00a6c3d349269d98ed1 Issue-ID: USECASEUI-104 Signed-off-by: zhangab <zhanganbing@chinamobile.com>
-rw-r--r--pom.xml2
-rw-r--r--usecaseui-common/pom.xml6
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/conf/fusion.properties43
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml197
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/.gitignore0
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp137
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp201
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp20
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp101
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp41
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp747
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html115
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp45
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp35
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp48
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp97
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp97
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp44
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/include.jsp30
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp36
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html324
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html274
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html87
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/sequence/details.jsp1
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp494
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml393
-rw-r--r--usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml48
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.js3930
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js56
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.js398
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js14
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.js321
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js9
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-csp.css21
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.js443
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js10
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.js980
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.js685
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js12
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-mocks.js2471
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.js684
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js14
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.js991
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js15
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js16
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-scenario.js40439
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.js628
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js13
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.js29018
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js295
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js.map8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/errors.json1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-dj.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-er.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-et.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-na.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-za.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak-gh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am-et.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-001.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ae.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-bh.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dj.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eh.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-er.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-il.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-iq.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-jo.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-km.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-kw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-lb.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ly.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ma.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-mr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-om.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ps.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-qa.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sa.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sd.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-so.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ss.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-td.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-tn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ye.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast-es.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl-az.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn-az.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be-by.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem-zm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg-bg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn-ml.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-ml.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-bd.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-cn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br-fr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl-ba.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn-ba.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn-er.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-ad.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es-valencia.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-fr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-it.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr-us.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-iq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-ir.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-iq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-ir.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn-iq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs-cz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy-gb.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-dk.js141
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-gl.js141
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da.js141
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-at.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-be.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-ch.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-de.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-li.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-lu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje-ne.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb-de.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo-sn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz-bt.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-gh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-tg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-cy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-gr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-001.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-150.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ag.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ai.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-as.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-au.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-be.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bs.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ca.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ck.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cx.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-er.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fj.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gy.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-hk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ie.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-im.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-io.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-iso.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-je.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-jm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ki.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-kn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ky.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ls.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mp.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ms.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mt.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-my.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-na.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nf.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ng.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ph.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-rw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ss.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sx.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-to.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tt.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tv.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-um.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-us.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ws.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo-001.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-419.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ar.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-bo.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-co.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-do.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ea.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ec.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-es.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gq.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gt.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-hn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ic.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-mx.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ni.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pa.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pe.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ph.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-py.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-sv.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-us.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-uy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ve.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et-ee.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu-es.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-af.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-ir.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-gn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-mr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-sn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi-fi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil-ph.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo-fo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-be.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bi.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bj.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ca.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cd.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ch.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ci.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cm.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dj.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-fr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ga.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gp.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gq.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ht.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-km.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-lu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ma.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mc.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ml.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mq.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-nc.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ne.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pm.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-re.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-rw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sc.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-td.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-vu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-wf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-yt.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur-it.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy-nl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga-ie.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd-gb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl-es.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-ch.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-fr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-li.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv-im.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-gh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ne.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ng.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw-us.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he-il.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-ba.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-hr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb-de.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu-hu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy-am.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia-fr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id-id.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig-ng.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii-cn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is-is.js141
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is.js141
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-ch.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-it.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-sm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_iw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja-jp.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka-ge.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab-dz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea-cv.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq-ml.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl-kz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl-gl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km-kh.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kp.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh-de.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw-gb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl-kg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb-lu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt-us.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-ao.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cd.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cf.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo-la.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt-lt.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu-cd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv-lv.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe-mu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg-mg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh-mz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk-mk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl-mn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-bn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-my.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-sg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt-mt.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my-mm.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq-na.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-no.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-sj.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd-zw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-np.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-aw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-be.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-bq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-cw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-nl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sx.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn-no.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no-no.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus-sd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-et.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ge.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ru.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab-pk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl-pl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps-af.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-ao.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-br.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-cv.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-gw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mo.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-pt.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-st.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-tl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-bo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-ec.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-pe.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm-ch.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn-bi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-md.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-ro.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-by.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-md.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ru.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ua.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw-rw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah-ru.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-fi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-no.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-se.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh-mz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses-ml.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg-cf.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn-ma.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng-ma.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si-lk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk-sk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl-si.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn-fi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn-zw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-dj.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-et.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-so.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-al.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-mk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-xk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-ba.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-me.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-rs.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-xk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-ba.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-me.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-rs.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-xk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-sz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy-er.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-ls.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-za.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-ax.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-fi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-se.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-cd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc-cd.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-lk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-my.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-sg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te-in.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ke.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl-tj.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th-th.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-er.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-et.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig-er.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tl.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-bw.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to-to.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-cy.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-tr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq-ne.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn-ma.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab-cn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk-ua.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-in.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-pk.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab-af.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl-uz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn-uz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn-lr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii-lr.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve-za.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi-vn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo-001.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun-tz.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae-ch.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal-et.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh-za.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh.js115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog-ug.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav-cm.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi-001.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-bj.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-ng.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh-ma.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh.js128
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-cn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-cn.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-hk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-mo.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-sg.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-hk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-mo.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-tw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hk.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-tw.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu-za.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu.js110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.json1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.txt1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/index.js2
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css115
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.js7776
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js10
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.js7412
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.min.js10
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.css145
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.css1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.js8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.js2239
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.less167
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/index.js2
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.css2005
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.eotbin10320 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.js28935
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.css4
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.js15
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.svg56
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.ttfbin10156 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.woffbin5728 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js10
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.2.4.min.js10
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-sortable/v0.13.4/sortable.min.js8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/README.md30
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/b2b-angular.css11923
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/horse_shoe.jpgbin16573 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/icon-flyout.pngbin947 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/treebg.pngbin82 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/widget-thumbnail.pngbin1929 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/horse_shoe.jpgbin16573 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/icon-flyout.pngbin947 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/treebg.pngbin82 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/widget-thumbnail.pngbin1929 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/styles/images/icon-flyout.pngbin947 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css587
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css.map1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css6
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css.map1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css6757
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css.map1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css6
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css.map1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eotbin20127 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg288
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttfbin45404 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woffbin23424 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2bin18028 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.js2377
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.min.js7
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/npm.js13
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/bootstrap/bs.css678
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/css/nv.d3.css656
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/cie.js155
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/colorbrewer.js302
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/core.js122
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.js1180
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.js5
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.cloud.js433
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.js908
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.js7037
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.min.js4
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v3.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/fisheye.js86
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/hive.js80
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/horizon.js192
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/interactiveLayer.js251
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/intro.js2
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis-min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.js470
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bullet.js250
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bulletChart.js349
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/boilerplate.js104
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bullet.js385
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bulletChart.js343
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/cumulativeLineChart.js782
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBar.js349
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBarChart.js333
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/distribution.js148
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBar.js331
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBarChart.js419
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/indentedTree.js337
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/legend.js270
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/line.js284
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineChart.js465
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarChart.js433
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarWithFocusChart.js658
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheye.js200
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheyeChart.js297
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFocusChart.js574
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBar.js461
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarChart.js524
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontal.js424
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontalChart.js434
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeries.js384
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeriesChart.js405
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiChart.js452
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/ohlcBar.js380
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/parallelCoordinates.js239
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pie.js400
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pieChart.js292
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatter.js674
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterChart.js628
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterPlusLineChart.js620
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparkline.js194
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparklinePlus.js295
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedArea.js368
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedAreaChart.js629
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.js13097
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/outro.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/sankey.js292
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/tooltip.js490
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/d3/js/utils.js152
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/ds2-bootstrap/b2b-bootstrap-common.css34
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/ds2/js/appDS2.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/ebz/copyrighted-material-removed.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/gis/js/local.js178
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/detect-element-resize.js147
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/jquery.resize.js164
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/jquery/.bower.json25
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.js9814
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.js4
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.map1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.css478
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.js9
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/lodash/4.5.1/lodash.js14932
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/css/images/blank.gifbin49 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/css/scribble.css40
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/css/slider.css142
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/css/spacegallery.css18
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/area_chart.html49
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/bar_chart.html95
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/d3_gauges_demo.html39
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer2.csv16
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer3.csv2
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/worddata.csv22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/donut_d3.html43
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/area_chart.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/donut.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/gauges.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/line_chart.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/pie_chart.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/worddata.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/line_chart.html49
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/pie_chart.html38
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/html/wordcloud.html37
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/Calendar-16x16.pngbin552 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-next.pngbin1561 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-prev.pngbin1557 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_drive_test_map.pngbin202465 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_county.pngbin21222 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_regression.pngbin11536 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_ios_throughput.pngbin26131 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map.pngbin192031 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map_legend.pngbin3021 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_nova_sdn_map.pngbin179361 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/copyicon.pngbin235 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/deleteicon.gifbin579 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/example-frame.pngbin33699 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/loading.gifbin6820 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/1_mon.pngbin22762 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/2_tue.pngbin22772 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/3_wed.pngbin24012 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/4_thu.pngbin23902 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/5_fri.pngbin22349 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/6_sat.pngbin23674 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/7_sun.pngbin22845 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_IN.pngbin10575 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_OUT.pngbin10460 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat.pngbin10420 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Def.pngbin8941 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Priority.pngbin10590 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/js/FusionCharts.js361
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/js/charts.js132
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/js/scribble.js19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/js/slides.min.jquery.js20
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/js/spacegallery.js235
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/bootstrap.min.css351
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/custom.css97
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/jquery.jOrgChart.css51
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/prettify.css1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example.html85
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example_vsp.html88
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/bkgd.pngbin133 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/raspberry.jpgbin5755 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/jquery.jOrgChart.js267
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/prettify.js28
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/showdown/0.3.4/showdown.js1454
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/external/utils/js/browserCheck.js5
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/fonts/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbook-framecontroller.js15
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbookController.js97
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/notebookFrameController.js26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/dependency/angular.js29400
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-frame.html65
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html7
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm33
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html70
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-closed-cloop.js28
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js877
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-menu-edit.js184
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-route.js43
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-whitelist.js3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-controller.js5
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-route.js7
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate-list-controller.js71
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/collaborate.js7
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/workflowController.js490
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborateList-route.js19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaboration-controller.js266
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js358
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js459
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-import-controller.js20
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js41
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js331
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js186
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js1263
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/drools-controller.js53
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/nbook-framecontroller.js15
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebook-controller.js37
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js24
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js5
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowController.js513
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowRouting.js8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/fn-menu-add-popup-controller.js339
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-route.js19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-search-controller-DS2.js93
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/sampleProfileController.js22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/usage-list-controller.js39
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-controller.js408
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-route.js7
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js64
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js116
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2LeftMenu.js73
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/footer.js27
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/error_modal.html19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modal.html20
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modalpopup.html20
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminMenuService.js129
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminService.js453
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-modal/modalService.js38
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-profile/selfProfileService.js114
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/raptorReportFactory.js595
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/stepFormFactory.js198
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-sample-page/droolsService.js53
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/headerServiceDS2.js17
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/leftMenuServiceDS2.js97
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/manifestService.js24
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js57
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalServiceDS2.js31
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/profileServiceDS2.js93
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/sampleService.js19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/userInfoServiceDS2.js32
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-landing.html68
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-listing.html65
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-new.html110
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-preview.html24
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-remove.html26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-schedule.html130
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/b2b-leftnav-ext.html50
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-content.html146
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-page.html146
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin-menu-edit.html102
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin.html69
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin_closed_loop.html17
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html76
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaboration.html182
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/jcs_admin.html73
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/admin-menu-del-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-region-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/clearItem-region-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/collaborate-list-toggle-profile-active-status.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fn-menu-edit.html129
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fnmenu-add.html136
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-child-add-confirm.html25
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-confirm-activation.html23
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-delete-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-add-confirm.html25
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-role-del-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html32
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-del-confirm.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-edit.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-child-roles-modal.html33
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html36
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role-function.html67
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role.html61
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role_list.html45
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/usage.html43
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/profile-confirm-toggle.html23
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add-confirm.html25
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add.html37
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-del-confirm.html23
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile.html69
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html77
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js113
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/step-form-directive.js14
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html23
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html130
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-drilldown-edit.html112
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html149
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-report-name-validation.html20
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html62
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html897
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html14
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html96
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html54
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json218
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step2.json34
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step3.json19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step4.json25
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step5.json19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step6.json28
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html243
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools-list.html32
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools.html55
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/frame_insert.html27
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-frame.html74
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-page.html80
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-viz.html7
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html68
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Left_menu.html3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/loginSnippet.html63
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-content.html191
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-sample.html112
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html150
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js2244
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js168
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-closed-cloop.js28
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-whitelist.js3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js60
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js101
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js44
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/modelpopupController.js21
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/directives/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/directives/footer.js11
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/directives/header.js479
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/directives/leftMenu.js184
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/jquery.resize.js139
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/layout/debug.js329
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js9555
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-ui-latest.js14879
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js6086
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/modalService.js185
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/moment.min.js6
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/network/net_map.js947
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js141
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js70
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js35
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js79
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js32
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/socket/peerBroadcast.js103
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/utils/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html9
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/header.html162
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/left_menu.html27
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_closed_loop.html20
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html42
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html52
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html263
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html136
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html129
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html75
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html27
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/customWidgetSettings.js133
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/dataModel.js58
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.js167
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.less24
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/directives.js230
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/explicitSave.js33
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.css146
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.js3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.less16
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index_original.css113
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/layouts.js72
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/report_whitelist.js3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/resize.js45
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/configurableWidgetModalOptions.html6
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/customSettingsTemplate.html19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/fluid.html8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/layouts.html1
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/r-cloud.html8
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/raptor-report.html29
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/resizable.html6
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html5
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/widgetSpecificSettings.html19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.css6658
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.less3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/angular-markdown-directive/markdown.js36
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsCtrl.js34
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsRaptorReportCtrl.js215
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-raptor-report-template.html26
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-rcloud-notebook-template.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/altDashboard.html49
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.html74
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.js427
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.less88
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.spec.js878
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-raptor-report-template.html58
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html22
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModal.html13
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModalCtrl.js32
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.html19
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.js151
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.spec.js392
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.js246
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.spec.js164
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.js64
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.spec.js104
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/DashboardState.js180
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.js253
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.spec.js692
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDataModel.js45
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDefCollection.js56
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.js112
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.spec.js156
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html220
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js6788
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html78
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css173
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css116
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/ecomp.css177
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/fusion-sunny.css362
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/global.css178
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/jquery-ui.css1225
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css224
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/workflows/bs-workflow.css134
-rw-r--r--usecaseui-common/src/main/webapp/app/fusion/styles/workflows/workflows.css31
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js43
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js45
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/droolsController.js11
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/directives/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/services/droolsService.js57
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/utils/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html28
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html72
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html42
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/external/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/fonts/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-icon.pngbin465 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-text.pngbin295 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-icon.pngbin565 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-text.pngbin632 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-icon.pngbin1065 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-text.pngbin901 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-text.pngbin650 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-text.pngbin780 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-text.pngbin645 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/com-icon.pngbin437 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-icon.pngbin201 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-text.pngbin572 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/default-icon.pngbin329 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-icon.pngbin700 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-text.pngbin820 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-icon.pngbin700 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-text.pngbin851 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-icon.pngbin774 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-text.pngbin739 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-icon.pngbin437 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-text.pngbin439 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-icon.pngbin855 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-text.pngbin604 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/emsc-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-icon.pngbin1127 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-text.pngbin627 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-icon.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-text.pngbin551 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-text.pngbin701 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-icon.pngbin95 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-text.pngbin95 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-text.pngbin755 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-icon.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-text.pngbin376 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-icon.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-text.pngbin726 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-icon.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-text.pngbin757 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-icon.pngbin855 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-text.pngbin657 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-icon.pngbin95 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-text.pngbin95 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-icon.pngbin855 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-text.pngbin649 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-icon.pngbin696 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-text.pngbin595 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/logo_onap_transbg.pngbin52523 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-icon.pngbin953 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-text.pngbin638 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/lrg-rdf-text.pngbin769 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-text.pngbin771 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-text.pngbin1140 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-text.pngbin823 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-icon.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-text.pngbin550 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-icon.pngbin232 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-text.pngbin252 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-icon.pngbin437 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-text.pngbin504 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/msc-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-icon.pngbin465 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-text.pngbin318 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/multi-icon.pngbin329 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-icon.pngbin464 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-text.pngbin295 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-icon.pngbin393 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-text.pngbin258 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-icon.pngbin393 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-text.pngbin258 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-icon.pngbin391 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-text.pngbin258 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-icon.pngbin391 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-text.pngbin258 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-icon.pngbin1127 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-text.pngbin499 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-icon.pngbin700 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-text.pngbin596 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-icon.pngbin785 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-text.pngbin539 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-icon.pngbin785 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-text.pngbin594 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-icon.pngbin855 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-text.pngbin744 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-text.pngbin807 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-icon.pngbin953 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-text.pngbin735 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/psap-icon.pngbin322 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-icon.pngbin95 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-text.pngbin95 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-text.pngbin540 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-icon.pngbin591 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-text.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-icon.pngbin855 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-text.pngbin632 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-icon.pngbin437 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-text.pngbin861 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-icon.pngbin855 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-text.pngbin704 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-icon.pngbin491 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-text.pngbin696 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-icon.pngbin230 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-text.pngbin469 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-icon.pngbin388 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-text.pngbin884 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-icon.pngbin774 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-text.pngbin753 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-icon.pngbin286 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-text.pngbin418 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-icon.pngbin646 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-text.pngbin1011 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/switch-icon.pngbin877 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-icon.pngbin437 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-text.pngbin858 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-icon.pngbin774 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-text.pngbin1242 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/ue-icon.pngbin577 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/uephone-icon.pngbin1190 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-icon.pngbin1065 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-text.pngbin826 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/images/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js61
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js4
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js11
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html3
-rw-r--r--usecaseui-common/src/main/webapp/app/fusionapp/styles/dummy.txt0
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/sandbox-gridster.css173
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/ui-gridster.css116
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/css/fusion-sunny.css362
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/css/nv.d3.css656
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/cie.js155
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/colorbrewer.js302
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/core.js122
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.js1180
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.js5
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.cloud.js433
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.js908
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.js7037
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.min.js4
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v3.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/fisheye.js86
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/hive.js80
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/horizon.js192
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/interactiveLayer.js251
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/intro.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis-min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.js470
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bullet.js250
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bulletChart.js349
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/boilerplate.js104
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bullet.js385
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bulletChart.js343
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/cumulativeLineChart.js782
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBar.js349
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBarChart.js333
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/distribution.js148
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBar.js331
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBarChart.js419
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/indentedTree.js337
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/legend.js270
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/line.js284
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineChart.js465
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarChart.js433
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarWithFocusChart.js658
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheye.js200
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheyeChart.js297
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFocusChart.js574
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBar.js461
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarChart.js524
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontal.js424
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontalChart.js434
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeries.js384
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeriesChart.js405
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiChart.js452
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/ohlcBar.js380
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/parallelCoordinates.js239
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pie.js400
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pieChart.js292
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatter.js674
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterChart.js628
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterPlusLineChart.js620
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparkline.js194
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparklinePlus.js295
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedArea.js368
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedAreaChart.js629
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.js13097
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/outro.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/sankey.js292
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/tooltip.js490
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/d3/js/utils.js152
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/gis/js/local.js178
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/angular-gridster.js2244
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js168
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/jquery.resize.js139
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/layout/debug.js329
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-latest.js9555
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-ui-latest.js14879
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery.layout-latest.js6086
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/js/moment.min.js6
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Entries9
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Repository1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Root0
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Tag1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/Style.css77
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/bd_quantum_raptor.css305
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/calendar.css97
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/dashboard.css36
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/drupal.css83
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/form-field-tooltip.css12
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/mobile_raptor.css73
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/novamap.css25
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/picker.css40
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/ral.css1437
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/raptor.css62
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/css/tree/drag-drop-folder-tree.css64
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/css/nv.d3.css656
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/cie.js155
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/colorbrewer.js302
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/core.js122
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.js1180
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.js3015
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.layout.js908
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.js7033
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.min.js4
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.js8444
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/fisheye.js86
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/hive.js80
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/horizon.js192
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/interactiveLayer.js251
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/intro.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis-min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.js470
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/boilerplate.js104
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bullet.js385
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bulletChart.js343
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/cumulativeLineChart.js782
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBar.js349
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBarChart.js333
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/distribution.js148
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBar.js331
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBarChart.js419
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/indentedTree.js337
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/legend.js270
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/line.js284
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineChart.js465
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarChart.js433
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarWithFocusChart.js658
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheye.js200
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheyeChart.js297
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFocusChart.js574
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBar.js461
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarChart.js524
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontal.js424
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontalChart.js434
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeries.js384
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeriesChart.js405
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiChart.js452
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/ohlcBar.js380
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/parallelCoordinates.js239
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js400
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js.bak400
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pieChart.js292
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatter.js674
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterChart.js628
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterPlusLineChart.js620
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparkline.js194
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparklinePlus.js295
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedArea.js368
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedAreaChart.js629
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/nv.d3.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/outro.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/sankey.js292
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/tooltip.js490
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/utils.js152
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dashed-canvas.js176
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/data.js63
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-canvas.js816
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined.js2
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined_bak_color.js2
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-dev.js45
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-externs.js93
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-gviz.js82
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-interaction-model.js676
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-layout.js349
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options-reference.js867
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options.js384
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-base.js4
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-install.js19
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-tickers.js487
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-utils.js1305
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph.js3857
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/excanvas.js924
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.js333
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction_sun.js303
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/moment.min.js6
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-driver.js206
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-perf.js94
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/README113
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/annotations.js182
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/axes.js315
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/chart-labels.js202
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/grid.js124
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/legend.js332
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/range-selector.js852
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/rgbcolor/rgbcolor.js257
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/stacktrace.js411
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/Doxyfile243
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime-min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime.js731
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/date_time_picker.css557
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/dynamicform.js112
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/moment.js3688
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/multiselect.js62
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/quick_links.js33
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.html313
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.js671
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.html72
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.js322
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.html35
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.js136
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/cingular_button.js217
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/drupal.js1018
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/editabledropdown.js363
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/gmap.js634
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.js4376
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.min.js154
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/label_quantum.js5
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/nova_button.js1184
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/other_scripts.js331
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/persist_table_header.js47
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/prototype-1.6.0.3.js4320
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/raptor.js314
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/js/script.js482
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.css1971
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.eotbin8728 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.js26735
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.svg34
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.ttfbin8564 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.woffbin4792 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/vfs_fonts.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/css/images/blank.gifbin49 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/css/scribble.css40
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/css/slider.css142
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/css/spacegallery.css18
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/css/welcome.css173
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/area_chart.html49
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/bar_chart.html95
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/d3_gauges_demo.html39
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer2.csv16
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer3.csv2
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/data/worddata.csv1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/donut_d3.html43
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/js/area_chart.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/js/donut.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/js/gauges.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/js/line_chart.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/js/pie_chart.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/js/worddata.min.js1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/line_chart.html49
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/pie_chart.html38
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/html/wordcloud.html36
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_drive_test_map.pngbin202465 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_county.pngbin21222 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_regression.pngbin11536 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_ios_throughput.pngbin26131 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map.pngbin192031 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map_legend.pngbin3021 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_nova_sdn_map.pngbin179361 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/1_mon.pngbin22762 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/2_tue.pngbin22772 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/3_wed.pngbin24012 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/4_thu.pngbin23902 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/5_fri.pngbin22349 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/6_sat.pngbin23674 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/7_sun.pngbin22845 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_IN.pngbin10575 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_OUT.pngbin10460 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat.pngbin10420 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Def.pngbin8941 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Priority.pngbin10590 -> 0 bytes
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/js/FusionCharts.js361
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/js/charts.js132
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/js/scribble.js19
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/bootstrap.min.css351
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/custom.css97
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css51
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/prettify.css1
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example.html85
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html88
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js267
-rw-r--r--usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/prettify.js28
-rw-r--r--usecaseui-common/src/main/webapp/static/js/jquery-1.10.2.js9789
-rw-r--r--usecaseui-common/src/main/webapp/static/js/jquery-ui.js16617
-rw-r--r--usecaseui-common/src/main/webapp/static/js/jquery.mask.min.js12
-rw-r--r--usecaseui-common/src/main/webapp/static/js/modalService.js169
-rw-r--r--usecaseui-common/src/main/webapp/static/js/search.js830
1675 files changed, 4 insertions, 630185 deletions
diff --git a/pom.xml b/pom.xml
index 89158d12..f621314c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,7 +38,7 @@
</modules>
<properties>
- <tomcat.version>8.5.6</tomcat.version>
+ <tomcat.version>8.5.23</tomcat.version>
</properties>
<dependencyManagement>
diff --git a/usecaseui-common/pom.xml b/usecaseui-common/pom.xml
index 1aed02bf..93515b8f 100644
--- a/usecaseui-common/pom.xml
+++ b/usecaseui-common/pom.xml
@@ -33,7 +33,7 @@
<properties>
<encoding>UTF-8</encoding>
<packagename>usecase-ui</packagename>
- <version.logback>1.1.2</version.logback>
+ <version.logback>1.2.3</version.logback>
<version.slf4j>1.7.6</version.slf4j>
</properties>
@@ -83,7 +83,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
- <version>4.3.5</version>
+ <version>4.5.5</version>
</dependency>
<dependency>
<groupId>org.onap.msb.java-sdk</groupId>
@@ -122,7 +122,7 @@
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
- <version>1.2</version>
+ <version>1.1.2</version>
</dependency>
</dependencies>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/conf/fusion.properties b/usecaseui-common/src/main/webapp/WEB-INF/fusion/conf/fusion.properties
deleted file mode 100644
index 99b68cbf..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/conf/fusion.properties
+++ /dev/null
@@ -1,43 +0,0 @@
-# validator settings
-#default_error_message = Default error message
-
-#login message
-login.error.hrid.empty = Login failed, please contact system administrator.
-login.error.hrid.not-found = User not found, please contact system administrator.
-login.error.user.inactive = Account is disabled, please contact system administrator.
-
-authentication_mechanism = BOTH
-
-user_attribute_name = user
-
-
-# Web Junction settings
-#web_junction_user_id_header_name = iv-user
-
-# User Session settings
-#user_attribute_name = user
-roles_attribute_name = roles
-role_functions_attribute_name = role_functions
-#client_device_attribute_name = client_device
-#client_device_emulation = false
-
-# menu settings
-menu_query_name = menuData
-#menu_properties_file_location = /WEB-INF/fusion/menu/
-application_menu_set_name = APP
-application_menu_attribute_name = applicationMenuData
-#application_menu_properties_name = menu.properties
-business_direct_menu_set_name = BD
-#business_direct_menu_properties_name = bd.menu.properties
-business_direct_menu_attribute_name = businessDirectMenuData
-
-# RAPTOR config settings
-#raptor_config_file_path = /WEB-INF/conf/
-
-# Role settings
-sys_admin_role_id = 1
-#sys_admin_role_function_delete_from_ui = true
-
-# Profile Search settings
-#profile_search_report_id=181
-#callable_profile_search_report_id=386
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml b/usecaseui-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
deleted file mode 100644
index 14a59ea5..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/defs/definitions.xml
+++ /dev/null
@@ -1,197 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE tiles-definitions PUBLIC
- "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
- "http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
-
-<!-- This tiles definitions file is fusion/defs/definitions.xml. It maps
- tokens used by SDK-core controllers to JSP file paths. To minimize upgrade
- effort, this file should not be changed by on-boarding applications. -->
-
-<tiles-definitions>
-
- <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp">
- <put-attribute name="title" value=""></put-attribute>
- <put-attribute name="header"
- value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute>
- <put-attribute name="body" value=""></put-attribute>
- <put-attribute name="footer"
- value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute>
- </definition>
-
- <definition name="ds2_template" template="/WEB-INF/fusion/jsp/ds2/template.jsp">
- <put-attribute name="title" value="report"></put-attribute>
- <put-attribute name="header" value="/WEB-INF/fusion/jsp/ds2/header.jsp"></put-attribute>
- <put-attribute name="body" value=""></put-attribute>
- </definition>
-
-
- <definition name="ebz_template_noheader_nofooter"
- template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp">
- <put-attribute name="body" value=""></put-attribute>
- </definition>
-
- <definition name="ebz_template_report_embedded"
- template="/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp">
- <put-attribute name="body" value=""></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="es_search_demo">
- <put-attribute name="body"
- value="/WEB-INF/fusion/jsp/es_search_demo.jsp"></put-attribute>
- <put-attribute name="viewName" value="elastic_search"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="es_suggest_demo">
- <put-attribute name="body"
- value="/WEB-INF/fusion/jsp/es_suggest_demo.jsp"></put-attribute>
- <put-attribute name="viewName" value="elastic_search"></put-attribute>
- </definition>
-
- <definition extends="ebz_template" name="error">
- <put-attribute name="body" value="/WEB-INF/jsp/error.jsp"></put-attribute>
- <put-attribute name="viewName" value="error"></put-attribute>
- </definition>
-
- <!-- <definition name="notebook"
- template="app/fusion/notebook-integration/scripts/view-models/notebook.htm" /> -->
-
-
- <!-- <definition name="nbooktest"
- template="app/fusion/notebook-integration/scripts/view-models/notebook-frame.html"/>
- -->
- <definition name="nbooktest"
- template="app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-frame.html"/>
-
- <definition extends="ebz_template" name="broadcast_list">
- <put-attribute name="body"
- value="/WEB-INF/fusion/jsp/broadcast_list.jsp"></put-attribute>
- <put-attribute name="viewName" value="broadcast_list"></put-attribute>
- </definition>
- <definition extends="ebz_template" name="broadcast">
- <put-attribute name="body" value="/WEB-INF/fusion/jsp/broadcast.jsp"></put-attribute>
- <put-attribute name="viewName" value="broadcast"></put-attribute>
- </definition>
-
-
- <definition extends="ebz_template" name="chart_wizard">
- <put-attribute name="body"
- value="/WEB-INF/fusion/jsp/chart_wizard.jsp"></put-attribute>
- <put-attribute name="viewName" value="chart_wizard"></put-attribute>
- </definition>
-
- <definition name="collaboration"
- template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp" />
- <!-- <definition name="user_profile_list" template="/app/fusion/scripts/view-models/admin-page/profile.html"
- /> -->
- <definition name="user_profile_list"
- template="/app/fusion/scripts/DS2-view-models/ds2-profile/profile.html" />
-
- <!-- <definition name="admin" template="/app/fusion/scripts/view-models/admin-page/admin.html"
- /> -->
- <definition name="openCollaboration"
- template="/app/fusion/scripts/DS2-view-models/ds2-admin/collaboration.html" />
- <definition name="workflows"
- template="/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-landing.html" />
- <definition name="report_dashboard"
- template="/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html" />
-
- <definition name="ds2_sample"
- template="/app/fusionapp/scripts/DS2-view-models/sampleDS2.html" />
-
- <definition name="admin"
- template="/app/fusion/scripts/DS2-view-models/ds2-admin/admin.html" />
- <definition name="samplePage"
- template="/app/fusion/scripts/DS2-view-models/ds2-samplePages/samplePage.html" />
- <definition name="welcome"
- template="/app/fusion/scripts/DS2-view-models/welcome.html" />
-
- <definition name="bootstrap_sample"
- template="/app/fusion/scripts/DS2-view-models/bootstrap-sample-page.html" />
-
- <definition extends="ds2_template" name="report_wizard">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_wizard.jsp"></put-attribute>
- <put-attribute name="viewName" value="report_wizard"></put-attribute>
- </definition>
- <definition extends="ebz_template" name="wizard_schedule_only">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/wizard_schedule_only.jsp"></put-attribute>
- <put-attribute name="viewName" value="wizard_schedule_only"></put-attribute>
- </definition>
-
- <definition extends="ds2_template" name="report_import">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_import.jsp"></put-attribute>
- <put-attribute name="viewName" value="report_import"></put-attribute>
- </definition>
-
- <definition name="report"
- template="/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html" />
-
- <definition extends="ebz_template" name="reportDS1">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_ebz.jsp"></put-attribute>
- </definition>
-
- <definition extends="ebz_template_report_embedded" name="report_embedded">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_ebz.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template" name="report_sample">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/report_sample.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="test_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/test_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="date_start_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/date_start_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="date_end_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/date_end_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="test_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/test_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="default_field_run_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/default_field_run_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_testrun_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_testrun_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_semaphore">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_semaphore.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_import_semaphore">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_import_semaphore.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_table_cols">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_table_cols.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_drill_down_report">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_drill_down_report.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template_noheader_nofooter" name="popup_sql">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/popup_sql.jsp"></put-attribute>
- </definition>
- <definition extends="ebz_template" name="error_page">
- <put-attribute name="body"
- value="/WEB-INF/fusion/raptor/error_page.jsp"></put-attribute>
- </definition>
- <definition name="data_out" template="/WEB-INF/fusion/jsp/data_out.jsp" />
-
- <!-- <definition name="test_field_run_sql" template="/WEB-INF/fusion/raptor/test_field_run_sql.jsp"/>
- <definition name="popup_testrun_sql" template="/WEB-INF/fusion/raptor/popup_testrun_sql.jsp"/> -->
-
-</tiles-definitions>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/.gitignore b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/.gitignore
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/.gitignore
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp
deleted file mode 100644
index 0b700867..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast.jsp
+++ /dev/null
@@ -1,137 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ page import="org.openecomp.portalsdk.core.web.support.UserUtils" %>
-<%@ page import="org.openecomp.portalsdk.core.web.support.ControllerProperties" %>
-<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
-
-<%-- <%@ include file="/WEB-INF/fusion/jsp/include.jsp" %> --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-<link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
-
- <c:set var="clustered" value="<%=(\"true\".equals(SystemProperties.getProperty(SystemProperties.CLUSTERED)))%>"/>
-
- <script src="static/fusion/js/moment.min.js"></script>
-
- <div class="pageTitle">
- <h3>
- <c:choose>
- <c:when test="${!empty param.message_id}">
- <h1 class="heading1" style="margin-top:20px;">Broadcast Message Edit</h1>
- </c:when>
- <c:otherwise>
- <h1 class="heading1" style="margin-top:20px;">Broadcast Message Create</h1>
- </c:otherwise>
- </c:choose>
- </h3>
- </div>
-
-<div ng-controller="broadcastController" >
- Please edit the broadcast message details below:&nbsp;<br><br>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Message Text:</label><BR>
- <textarea name="comment" ng-model="broadcastMessage.messageText" rows="5" cols="200" style="height:100px"></textarea>
- </div>
- <br>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Start Date:</label><BR>
- <input style="display:none" name="startDateHidden" ng-model="broadcastMessage.startDate">
- <input type="text" class="fn-ebz-text" id="startDatepicker" />
- </div>
-
- <div class="fn-ebz-container" style="margin-left:3em" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>End Date:</label><BR>
- <input style="display:none" name="endDateHidden" ng-model="broadcastMessage.endDate">
- <input type="text" class="fn-ebz-text" id="endDatepicker" />
- </div>
-
- <div class="fn-ebz-container" style="margin-left:3em" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Sort Order:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="broadcastMessage.sortOrder"
- maxlength="30" />
- </div>
-
- <c:if test="${clustered}">
- <div class="fn-ebz-container" style="margin-left:1em" >
- <label class="fn-ebz-text-label">Server:</label><BR>
- <div class="form-field" att-select="broadcastSites" ng-model="broadcastMessage.siteCd"></div>
- </div>
- </c:if>
- <br>
- <div align="left" >
- <button type="submit" ng-click="save();" att-button
- btn-type="primary" size="small">Save</button>
- </div>
-</div>
-<script>
-app.controller('broadcastController', function ($scope, modalService, $modal){
- $scope.broadcastMessage=${broadcastMessage};
- $scope.broadcastSites=${broadcastSites};
- console.log($scope.broadcastMessage);
-
- $scope.save = function() {
- var uuu = "broadcast/save";
- var postData={broadcastMessage: $scope.broadcastMessage};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- //console.log(data);
- window.location.href = "broadcast_list";
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
- $(function() {
- $( "#startDatepicker" ).datepicker();
- $( "#endDatepicker" ).datepicker();
-
- var startDateLong = $scope.broadcastMessage.startDate;
- var tempStartDate = new Date(startDateLong);
- tempStartDate = moment(tempStartDate).format('MM/DD/YY');//03 Jun 2013 04:15PM EDT
- console.log(tempStartDate.toString());
- $( "#startDatepicker" ).val(tempStartDate.toString());
-
- var endDateLong = $scope.broadcastMessage.endDate;
- var tempendDate = new Date(endDateLong);
- tempendDate = moment(tempendDate).format('MM/DD/YY');//03 Jun 2013 04:15PM EDT
- console.log(tempendDate.toString());
- $( "#endDatepicker" ).val(tempendDate.toString());
-
- $( "#startDatepicker" ).change(function() {
- var tempStartDate = moment($( "#startDatepicker" ).val()).format('YYYY-MM-DD hh:mm:ss.S');
- $scope.broadcastMessage.startDate = new Date(tempStartDate.toString());
- });
- $( "#endDatepicker" ).change(function() {
- var tempEndDate = moment($( "#endDatepicker" ).val()).format('YYYY-MM-DD hh:mm:ss.S');
- $scope.broadcastMessage.endDate = new Date(tempEndDate.toString());
- });
- });
-});
-
-
-</script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp
deleted file mode 100644
index 401f413b..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/broadcast_list.jsp
+++ /dev/null
@@ -1,201 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ page import="java.util.*" %>
-<%@ page import="com.fasterxml.jackson.databind.ObjectMapper" %>
-<%@ page import="org.json.JSONObject" %>
-<%@ page import="java.io.StringWriter" %>
-<%@ page import="org.openecomp.portalsdk.core.web.support.ControllerProperties" %>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
- <script src="static/fusion/raptor/dy3/js/moment.min.js"></script>
- <script>
- function editMessage(messageLocationId, messageLocation, messageId) {
- window.location='broadcast.htm?message_location_id='+messageLocationId + '&message_location=' + messageLocation + ((messageId != null) ? '&message_id=' + messageId : '');
- }
- </script>
-
- <div class="pageTitle">
- <h3>
- Broadcast Messages
- </h3>
- </div>
-
- <%-- Display a table for the broadcast messages of each message location --%>
-<div ng-controller="broadcastListController" >
-
- <div ng-repeat="location in messageLocations" >
- {{location.label}} Messages
- <div title="{{location.label}} Messages" >
-
- <table att-table table-data="location.messages" current-page="1">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%">No.</th>
- <th att-table-header sortable="false" width="30%">Message Text</th>
- <th att-table-header sortable="false" width="10%">Start Date</th>
- <th att-table-header sortable="false" width="10%">End Date</th>
- <th att-table-header sortable="false" width="10%">Sort Order</th>
- <th att-table-header sortable="false" width="10%">Server</th>
- <th att-table-header sortable="false" width="10%">Active?</th>
- <th att-table-header sortable="false" width="10%">Delete?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="message in location.messages" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- {{message.id}}
- <td width="10%"><a href="javascript:editMessage({{location.value}},'{{location.label}}',{{message.id}});">{{$index+1}}</a></td>
- <td width="30%">{{message.messageText}}</td>
- <td width="10%">
- {{message.displayStartDate}}
- </td>
- <td width="10%">{{message.displayEndDate}}</td>
- <td width="10%">{{message.sortOrder}}</td>
- <td width="10%">{{message.siteCd}}</td>
- <td width="10%">
- <div ng-click="toggleActive(message);">
- <input type="checkbox" ng-model="message.active" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="10%">
- <div ng-click="remove(message);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
-
- </tbody>
- </table>
- </div>
- <input att-button btn-type="primary" size="small" class="button" type="button" value="Add" ng-click="editMessage(location);"/>
- <br/><br/><br/>
- </div>
-</div>
-
-<script>
-app.controller('broadcastListController', function ($scope){
- //$scope.model.messagesList=${model.messagesList};
- var messagesMap = {};
- <%
- ObjectMapper mapper = new ObjectMapper();
- HashMap hmMessages = new HashMap();
-
- HashMap objModel = (HashMap)request.getAttribute("model");
-
- Object objMessages = objModel.get("messagesList");
- //System.out.println("messagesList: "+objMessages);
- if((objMessages!=null) && (objMessages instanceof HashMap))
- {
- hmMessages= (HashMap)objMessages;
- Iterator it = hmMessages.entrySet().iterator();
- while (it.hasNext()) {
- Map.Entry pair = (Map.Entry)it.next();
- //System.out.println(pair.getKey() + " = " + pair.getValue());
- String pairValue = mapper.writeValueAsString(pair.getValue());
- //System.out.println(pairValue);
- %>
- messagesMap['<%=pair.getKey()%>'] = '<%=pairValue%>'
- <%
- }
- }
-
- Object messageLocationsObject = objModel.get("messageLocations");
- //System.out.println("messageLocations: "+messageLocationsObject);
- String messageLocationsString = mapper.writeValueAsString(messageLocationsObject);
- //System.out.println(messageLocationsString);
- %>
- $scope.messagesList=messagesMap;
- $scope.messageLocations=<%=messageLocationsString%>;
- console.log($scope.messageLocations);
-
- $.each($scope.messageLocations, function(i, a){
- //var result = [];
- angular.forEach($scope.messagesList, function(value, key) {
- if (key+'' === a.value+'') {
- var objsJSON = JSON.parse(value);
-
- $.each(objsJSON, function(i, a){
- var startDateLong = a.startDate;
- var tempStartDate = new Date(startDateLong);
- tempStartDate = moment(tempStartDate).format('DD MMM YYYY');//03 Jun 2013 04:15PM EDT - 'DD MMM YYYY hh:mmA zz'
- a.displayStartDate=tempStartDate.toString();
-
- var endDateLong = a.endDate;
- var tempEndDate = new Date(endDateLong);
- tempEndDate = moment(tempEndDate).format('DD MMM YYYY');//03 Jun 2013 04:15PM EDT
- a.displayEndDate=tempEndDate.toString();
- });
- a.messages = objsJSON;
- }
- });
- console.log(a.messages);
- });
- ;
-
- $scope.editMessage = function(location) {
- editMessage(location.value, location.label);
- };
-
- $scope.toggleActive = function(broadcastMessage) {
-
- //alert('deleted'+role.name);
- var uuu = "broadcast_list/toggleActive";
- var postData={broadcastMessage:broadcastMessage};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- //window.location.reload();
- },
- error : function(data){
- console.log(data);
- alert("Error while toggling: "+ data.responseText);
- }
- });
-
-
- };
-
- $scope.remove = function(broadcastMessage) {
-
- //alert('deleted'+role.name);
- var uuu = "broadcast_list/remove";
- var postData={broadcastMessage:broadcastMessage};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- window.location.reload();
- },
- error : function(data){
- console.log(data);
- alert("Error while deleting: "+ data.responseText);
- }
- });
-
-
- };
-});
-</script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp
deleted file mode 100644
index f3fb7a74..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/data_out.jsp
+++ /dev/null
@@ -1,20 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-${model.output_string}
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp
deleted file mode 100644
index ac210a3f..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ds2/template.jsp
+++ /dev/null
@@ -1,101 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
-
-<!DOCTYPE html>
-<html>
- <head>
-<%-- <%@ include file="/WEB-INF/fusion/jsp/ds2/meta.jsp" %> --%>
- <!-- B2b Library -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
- <!-- digital-design-library must be loaded late -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/digital-design-library.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
-
- <!-- Common scripts -->
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
- <!-- Report Dashboard Specific items -->
- <script src="app/fusion/ase/scripts/menus/bootstrap.min.js"></script>
- <script src="app/fusion/ase/scripts/menus/jquery-ui.min.js"></script>
- <script src="app/fusion/external/lodash/4.5.1/lodash.js"></script>
- <script src="app/fusion/external/showdown/0.3.4/showdown.js"></script>
-
- <!--<script src="app/fusion/external/angular-1.5/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.5/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.5/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.5/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.5/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.5/angular-cookies.min.js"></script>-->
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/external/ds2/js/digital-ng-library/digital-design-library.js"></script>
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <!-- EPSDK App scripts and common services -->
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <script src= "app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
-
- </head>
- <body class="appBody" ng-app="abs">
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
-<%-- <div>
- <tiles:insertAttribute name="header" />
- </div> --%>
-
- <div class="applicationWindow">
- <br>
- <div class="content" id="mContent">
- <div class="body-content-jsp">
- <tiles:insertAttribute name="body" />
- </div>
- </div>
- <br>
- <div ds2-Footer class="footer-container"></div>
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp
deleted file mode 100644
index bd5206eb..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp
+++ /dev/null
@@ -1,41 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-
-
-
-<script src="app/fusion/external/ebz/js/footer.js"></script>
-<link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/footer.css" >
-<div class="footerContainer" id="footerContainer">
- <div class="footerWrapper" id="footerWrapper">
- <div class="attFooterInfo" style="text-align: center;">
- <div class="footerLastSection">
- <div class="footerText">
- <p class="copyright-text">
- </p>
- </div>
- <div class="displayInline">
- <a href="#" class="footer-logo">
- </a>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp
deleted file mode 100644
index 1d3ba8e7..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/ebz_header.jsp
+++ /dev/null
@@ -1,747 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
-<%@ page isELIgnored="false"%>
-<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%>
-<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties"%>
-<%@ page import="org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants"%>
-<%@ page import="org.openecomp.portalsdk.core.domain.MenuData"%>
-<link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css">
-<link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css">
-<link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
-
-
-<script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/app.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
-<script src="static/js/jquery-1.10.2.js"></script>
-<script src="app/fusion/scripts/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<script src="app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
-<script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
-<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.10.0/lodash.min.js"></script>
-<script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>
-<script src="app/fusion/scripts/services/userInfoService.js"></script>
-<script src="app/fusion/scripts/services/leftMenuService.js"></script>
-
-
-<jsp:include page="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" ></jsp:include>
-
-<c:set var="UserName" value="<%= session.getAttribute(\"fullName\")%>" />
-<c:set var="UserFirstName" value="<%= session.getAttribute(\"first_name\")%>" />
-
-<%
- String contactUsLink = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK);
- String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
- String portalUrl = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/process_csp";
- String getAccessLink = redirectUrl.substring(0, redirectUrl.lastIndexOf('/')) + "/get_access";
-%>
-<c:set var="returnPortalUrl" value="<%=portalUrl%>" />
-<c:set var="contactUsLink" value="<%=contactUsLink%>" />
-<c:set var="getAccessLink" value="<%=getAccessLink%>" />
-<style>
-.att-drawer{
- z-index:997 !important;
-}
-
-.secondaryMenuContainer{
- z-index:1000;
-}
-.megamenu-tabs .megamenu__item {
- padding: 0 0;
-}
-.megamenu-tabs .megamenu__item span {
- font-size: 18px;
-}
-
-.submenu-tabs {
- line-height:50px;
-}
-.submenu-tabs .sub__menu{
- top:54px;
-}
-
-.top-megamenu .megamenu-tabs ul{
- width:98%;
- list-style: none;
-}
-
-</style>
-<%@include file="/WEB-INF/fusion/jsp/ebz/loginSnippet.html" %>
-
-<div style="position: relative; z-index: 999;">
- <div ng-controller="headerController">
-
- <div class="headerContainer" id="headerContainer" ng-cloak ng-show="{{showHeader}}">
- <div id="megaMenuContainer" class="megaMenuContainer" style="margin-top: 0; overflow: visible;">
- <div>
- <!--for mega Menu-->
- <!-- Mega Menu parent-tab directive with three models menu-items, active-sub-menu, active-menu -->
- <div id="topMenu" class="top-megamenu" ng-mouseleave="activeClickSubMenu.x.active=false; activeClickMenu.x.active=false">
- <div style="float:left;width:100%;"parent-tab menu-items="megaMenuDataObject" active-sub-menu='activeClickSubMenu.x' active-menu='activeClickMenu.x'>
- <div parentmenu-tabs mega-menu="true" menu-items="megaMenuDataObject" style="height:55px;">
- <div style="float:left">
- <li class="megamenu__item" style="line-height:55px;" onclick="returnToPortal()">
- <img src="app/fusion/external/ebz/images/logo.png" class="logo" ></span>
-> <strong style="font-weight: 400 !important; font-family: Omnes-ECOMP-W02, Arial !important; font-size: 18px;" id='returnPortal' >ECOMP Portal</strong>
- </li>
- <div menu-tabs mega-menu="true" tab-name="item.text" menu-item="item" active-menu="activeClickMenu.x"
- ng-repeat="item in megaMenuDataObject" style="font-size: 18px;" ng-mousedown="loadFavorites()" >
- <div parentmenu-tabs sub-menu="true" ng-show="activeClickMenu.x.active && item.active" menu-items="activeClickMenu.x.children">
- <!-- Second level menu -->
- <div>
- <div menu-tabs sub-menu="true" tab-name="subItem.text"
- tab-url="subItem.url" menu-item="subItem"
- ng-repeat="subItem in activeClickMenu.x.children | orderBy : 'column'" active-menu="activeClickSubMenu.x"
- sub-item-active="{{subItem.active}}" style="float:left;" aria-label="{{subItem.text}}"
- ng-mouseenter="submenuLevelAction(subItem.text,subItem.column)"
- ng-mouseleave="submenuLevelAction(subItem.text,subItem.column)"
- ng-click="submenuLevelAction(subItem.text,subItem.column)" >
- <i ng-if="subItem.text=='Favorites'" id="favorite-star"
- class="icon-star favorites-icon-active">
- </i>
- </div>
-
- <div class="sub__menu" ng-mouseleave="activeClickSubMenu.x.active=false" >
- <ul ng-show="activeClickSubMenu.x.active" role="menubar" class="columns">
- <!-- Third level menu -->
- <div menu-tabs menu-item="subItem"
- class="columns-div"
- ng-repeat="subItem in activeClickSubMenu.x.children | orderBy : 'column'"
- ng-show="activeClickSubMenu.x.active">
-
- <i id="favorite-selector-third-level"
- ng-show="isUrlFavorite(subItem.menuId)==false"
- class="icon-star favorites-icon-inactive"
- ng-if="subItem.url.length > 1">
- </i>
- <i id="favorite-selector-third-level"
- ng-show="isUrlFavorite(subItem.menuId)"
- class="icon-star favorites-icon-active"
- ng-if="subItem.url.length > 1">
- </i>
- <span class="title" aria-label="{{subItem.text}}"
- ng-click="goToUrl(subItem)">{{subItem.text}}</span>
- <!-- Fourth level menus -->
- <div att-links-list="">
- <i id="favorite-selector-fourth-level"
- class="icon-star favorites-icon-inactive"
- ng-show="isUrlFavorite(tabValue.menuId)==false"
- ng-if="tabValue.url.length > 1">
-
- </i>
- <i id="favorite-selector-fourth-level"
- class="icon-star favorites-icon-active"
- ng-show="isUrlFavorite(tabValue.menuId)"
- ng-if="tabValue.url.length > 1">
-
- </i>
- <span role="menuitem" att-links-list-item=""
- ng-repeat="tabValue in subItem.children"
- ng-click="goToUrl(tabValue)"
- att-accessibility-click="13,32"
- ng-class="{'disabled': tabValue.disabled}">{{tabValue.text}}</span>
- </div>
- <hr ng-show="!$last"/>
-
- </div>
- </ul>
- <!-- Favorites level menu -->
- <div class="favorites-window" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()">
- <div id="favorites-menu-items" ng-show="showFavorites">
- <div ng-repeat="subItem in favoritesMenuItems" att-links-list="" style='display: inline'>
- <i id="favorite-selector-favorites-list" class="icon-star favorites-icon-active">
- </i>
- <a id="favorites-list" aria-label="{{subItem.text}}"
- ng-click="goToUrl(subItem)"
- style="margin-left: 3px; margin-right: 20px; text-decoration: none; color: #666666;">
- {{subItem.text}}
- </a>
- </div>
- <div>
- <br>
- <p style='font-weight: 400; font-family: Omnes-ECOMP-W02, Arial !important;
- font-size: 18px; text-align: center; background-color: lightgray;
- width: 400px; margin-left: 25%; margin-right: 25%;'>
- Manage favorites on ECOMP Portal.
- </p>
- </div>
- </div>
- <!-- Favorites when empty -->
- <div id="favorites-empty" ng-show='favoritesWindow' ng-show="emptyFavorites">
- <div id="favorites-empty" ng-show="emptyFavorites" class="favorites-window-empty">
- <div>
- <img src="app/fusion/external/ebz/images/no_favorites_star.png">
- <p class='favoritesLargeText'>No Favorites</p>
- <p class='favoritesNormalText'>Manage favorites on ECOMP Portal.</p>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- </div>
- </div >
- <li class="megamenu__item" style="line-height:55px;" ng-if="loadMenufail">
- <strong style="font-weight: 400 !important; font-family: Omnes-ECOMP-W02, Arial !important; font-size: 18px;" >Unable to load menus</strong>
- </li>
-<!-- <li class="megamenu__item" style="width: 20%;">&nbsp;</li>
- --> </div>
- <!-- Login Snippet-->
- <div style="float:right">
- <li id="bcLoginSnippet" class="megamenu__item" style="width: 140px;" >
- <div popover="loginSnippet.html" aria-label="Login Snippet" referby="loginSnippet" att-accessibility-click="13,32" popover-style="\" popover-placement="below" style="width: 200px;">
- <div class="icon-user-small login-snippet-icon"></div>
- <div class="login-snippet-text" style="display: inline-block; font-size:12px; margin-left:5px;overflow: hidden; max-height: 31px; max-width:120px; padding-top: 0px; margin-top: 0px; white-space: nowrap;" ng-bind="userProfile.firstName"></div>
- </div>
- </li>
- <li class="megamenu__item" style="width:120px;">&nbsp;</li>
- </div>
-
- </div>
- </div>
- <div style="clear: both"></div>
- </div>
- </div>
- </div>
- </div>
- <div class="license-notification" id="license-notification">
- <a href="javascript:void(0)" style="background-color:#bbb;" class="button button--small" tooltip="Please contact ECOMP Portal team to get the license" tooltip-placement="below" tooltip-style="light" tooltip-popup-delay="500" >
- <span style="">{{app_name_full}}</span>
- </a>
- </div>
- <div style="position: relative; color: black; top: 70px;">
- <div ng-cloak>
- <span ng-style="adjustHLeftMenu('burgerIcon')" style="z-index:998; position:fixed; left:0%; font-size:35px; margin-left:10px;text-decoration:none;">
- <a ng-click="toggleDrawer();isOpen = !isOpen" href="javascript:void(0);" class="arrow-icon-left" >
- <span class="icon-hamburger"></span></a>
- <span ng-init="isOpen = true" ng-show="isOpen" style="font-size:16px; position:relative; top:-8px; left:-15px;">&nbsp&nbsp&nbsp {{app_name}}</span>
- </span>
- <div att-drawer drawer-slide="left" drawer-custom-top="{{drawer_custom_top}}px" drawer-size="200px" drawer-open="drawerOpen" drawer-custom-height="100%" >
- <div ng-style="adjustHLeftMenu('leftMenu')">
- <div class="attDrawer" style="margin-top:{{drawer_margin_top}}px;">
- <div style="margin-left:10px; margin-right:10px;">
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group ng-repeat="parent in menuItems" heading="{{parent.parentLabel}}" child="{{parent.parentAction}}" parent-link="{{parent.parentAction}}" image-source="{{parent.parentImageSrc}}" child-length="{{parent.childItemList.length}}" is-open="parent.open">
- <div ng-repeat="subMenu in parent.childItemList" style="font-size:12px; margin-left:10px;">
- <a href="{{subMenu.action}}" style="font-size:12px; color:#666666;" >{{subMenu.label}}</a>
- </div>
- </accordion-group>
- </accordion>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
-<script>
- function returnToPortal(){
- window.location.href = "<c:out value='${returnPortalUrl}'/>";
- }
- detectScrollEvent = function() {
- var footerOff = $('#footerContainer').offset().top;
- var headOff = $('#headerContainer').offset().top;
- var winHeight = $(window).height();
- if ((footerOff - headOff) <= winHeight) {
- $('.att-drawer').css({
- "height" : footerOff - headOff - 55
- });
- } else {
- $('.att-drawer').css({
- "height" : "94vh"
- });
- }
- }
- $(window).scroll(function() {
- if ($('.att-drawer').is(':visible')) {
- detectScrollEvent();
- }
- });
- app.controller("headerController", function($scope, $timeout, $log, $http, UserInfoService, $window, $cookies,LeftMenuService) {
- // $log.debug('HeaderController started');
- $scope.jsonMenuData = [];
- $scope.loadMenufail=false;
- $scope.app_name = "";
- $scope.app_name_full = "";
- $scope.megaMenuDataObject =[];
- $scope.activeClickSubMenu = {
- x: ''
- };
- $scope.activeClickMenu = {
- x: ''
- };
- $scope.favoritesMenuItems = [];
- $scope.favoriteItemsCount = 0;
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- $scope.favoritesWindow = false;
- $scope.userProfile={
- firstName:'',
- lastName:'',
- fullName:'',
- email:''
- }
- /*Put user info into fields*/
- $scope.inputUserInfo = function(userInfo){
- if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
- if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
- $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
- if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
- $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
- if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
- $scope.userProfile.email = userInfo.USER_EMAIL;
- }
- }
- /*getting user info from session*/
- $scope.getUserNameFromSession = function(){
- UserInfoService.getFunctionalMenuStaticDetailSession()
- .then(function (res) {
- $scope.userProfile.firstName = res.firstName;
- $scope.redirectUrl = res.portalUrl;
- });
- }
- $scope.getTopMenuStaticInfo=function() {
- var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.info('failed getting static User information');
- $scope.getUserNameFromSession();
- }else{
- $log.info('Received static User information');
- var resData = res;
- $scope.inputUserInfo(resData);
- $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
- }
- },
- function(err) {
- $log.info('failed getting static User information');
- }
- );
- }
-
- var unflatten = function( array, parent, tree ){
- tree = typeof tree !== 'undefined' ? tree : [];
- parent = typeof parent !== 'undefined' ? parent : { menuId: null };
- var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
-
- if( !_.isEmpty( children ) ){
- if( parent.menuId === null ){
- tree = children;
- }else{
- parent['children'] = children
- }
- _.each( children, function( child ){ unflatten( array, child ) } );
- }
-
- return tree;
- }
-
- var menuStructureConvert = function(menuItems) {
- var megaMenuDataObjectTemp = [
- {
- text: "ECOMP",
- children:menuItems
- },
- {
- text: "Help",
- children: [{
- text:"Contact Us",
- url:"<c:out value='${contactUsLink}'/>"
- },
- {
- text:"Get Access",
- url:"<c:out value='${getAccessLink}'/>"
- }]
- }
- ];
- return megaMenuDataObjectTemp;
- };
-
-
- /*Left Menu*/
- LeftMenuService.getAppName().then(function(response){
- var j = response;
- try{
- if(j && j !== "null" && j!== "undefined"){
- // console.log("app name is " + $scope.app_name);
- $scope.app_name_full = j.data;
- var processed_app_name = j.data;
- if(processed_app_name.indexOf("[")<=-1) {
- if (document.getElementById('license-notification')!=null)
- document.getElementById('license-notification').style.display = "none";
- }
- var n = processed_app_name.length;
- if (n > 15) {
- n = 15;
- }
- $scope.app_name = processed_app_name.substr(0, n);
- }else{
- throw "Get app_name response is not an object/is empty";
- }
- }catch (e) {
- console.log("error happened while trying to get app name "+e);
- return;
- }
- },function(error){
- console.log('getAppName failed', error);
- });
-
- $scope.getTopMenuStaticInfo();
- $scope.getMenu=function() {
-
- $http({
- method: "GET",
- url: 'get_functional_menu',
-// TIMEOUT USED FOR LOCAL TESTING ONLY
-// timeout: 100
- }).success(function (response) {
- if(response == '101: Timeout') {
- $log.error('Timeout attempting to get_functional_menu');
- // TIMEOUT USED FOR LOCAL TESTING ONLY
-// $scope.createErrorMenu();
- $scope.megaMenuDataObject = menuStructureConvert('');
- }else {
- $log.debug('get_functional_menu success: ' + response);
- if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
-// createErrorMenu() USED FOR LOCAL TESTING ONLY
-// $scope.createErrorMenu();
- $scope.megaMenuDataObject = menuStructureConvert('');
- // $scope.loadMenufail=true;
- }else{
- $scope.jsonMenuData = unflatten( response );
- $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
- }
- }
- }).error(function (response){
-// createErrorMenu() USED FOR LOCAL TESTING ONLY
-// $scope.createErrorMenu();
-
- //$scope.loadMenufail=true;
- $scope.megaMenuDataObject = menuStructureConvert('');
- $log.debug('REST API failed get_functional_menu...'+ response);
- });
- }
- $scope.adjustHLeftMenu = function (type){
- $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
-
- if($scope.showHeader == true) {
- $scope.drawer_margin_top = 60;
- $scope.drawer_custom_top = 54;
- $scope.toggle_drawer_top = 55;
- }
- else {
-
- $scope.drawer_margin_top = 50;
- $scope.drawer_custom_top = 0;
- $scope.toggle_drawer_top = 10;
- }
- if(type=='burgerIcon'){
- return { "top": $scope.toggle_drawer_top+"px"};
- }else if(type=='leftMenu'){
- return { "margin-top": $scope.drawer_margin_top+"px"};
- }else
- return;
- }
- $scope.adjustHeader=function() {
- $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
-
- if($scope.showHeader == true) {
- $scope.drawer_margin_top = 50;
- $scope.drawer_custom_top = 54;
- $scope.toggle_drawer_top = 55;
- }
- else {
-
- $scope.drawer_margin_top = 40;
- $scope.drawer_custom_top = 0;
- $scope.toggle_drawer_top = 10;
- }
-
-
- }
-
-
- //$scope.getMenu();
- $scope.adjustHeader();
-
-
- /* **************************************************************************/
- /* Logic for the favorite menus is here */
-
- $scope.loadFavorites = function () {
- $log.debug('loadFavorites has happened.');
- if ($scope.favoritesMenuItems == '') {
- $scope.generateFavoriteItems();
- $log.debug('loadFavorites is calling generateFavoriteItems()');
- } else {
- $log.debug('loadFavorites is NOT calling generateFavoriteItems()');
- }
- }
-
- $scope.goToUrl = function (item) {
- $log.info("goToUrl called")
- $log.info(item);
-
- var url = item.url;
- var restrictedApp = item.restrictedApp;
- $log.debug('Restricted app status is: ' + restrictedApp);
- if (!url) {
- $log.info('No url found for this application, doing nothing..');
- return;
- }
- if (restrictedApp) {
- $window.open(url, '_blank');
- } else {
- $window.open(url, '_self');
- }
-
- }
-
- $scope.submenuLevelAction = function(index, column) {
- if ($scope.favoritesMenuItems == '') {
- $scope.generateFavoriteItems();
- $log.debug('submenuLevelAction is calling generateFavoriteItems()');
- }
- $log.debug('item hovered/clicked: ' + index + '; column = ' + column);
- if (column == 2) { // 2 is Design
- $scope.favoritesWindow = false;
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- }
- if (index=='Favorites' && $scope.favoriteItemsCount != 0) {
- $log.debug('Showing Favorites window');
- $scope.favoritesWindow = true;
- $scope.showFavorites = true;
- $scope.emptyFavorites = false;
- }
- if (index=='Favorites' && $scope.favoriteItemsCount == 0) {
- $log.debug('Hiding Favorites window in favor of No Favorites Window');
- $scope.favoritesWindow = true;
- $scope.showFavorites = false;
- $scope.emptyFavorites = true;
- }
- if (column > 2) {
- $scope.favoritesWindow = false;
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- }
- };
-
- $scope.hideFavoritesWindow = function() {
- $log.debug('$scope.hideFavoritesWindow has been called');
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- }
-
- $scope.isUrlFavorite = function (menuId) {
-// $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);
- var jsonMenu = JSON.stringify($scope.favoritesMenuItems);
- var isMenuFavorite = jsonMenu.indexOf('menuId\":' + menuId);
- if (isMenuFavorite==-1) {
- return false;
- } else {
- return true;
- }
-
- }
-
- $scope.generateFavoriteItems = function() {
- $http({
- method: "GET",
- url: 'get_favorites',
- // TIMEOUT USED FOR LOCAL TESTING ONLY
-// timeout: 100
- }).success(function (response) {
- if (response == '101: Timeout') {
- $log.error('Timeout attempting to get_favorites_menu');
- } else {
- if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
- $log.error('REST API failed get_favorites' + response);
- }else{
- $log.debug('get_favorites = ' + JSON.stringify(response));
- $scope.favoritesMenuItems = response;
- $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
- $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
- }
- }
- }).error(function (response){
- $log.error('REST API failed get_favorites' + response);
- //createFavoriteErrorMenu() USED FOR LOCAL TESTING ONLY
-// $scope.createFavoriteErrorMenu();
- });
- }
-
- $scope.createFavoriteErrorMenu=function() {
- $scope.favoritesMenuItems = [
-// {
-// "menuId": "93",
-// "text": "XXX",
-// "url": "XXX"
-// }
- ];
- $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
- $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
- }
-
- /* end of Favorite Menu code */
- /* **************************************************************************/
-
-
- /* **************************************************************************/
- // THIS IS USED FOR LOCAL TESTING ONLY
- /* **************************************************************************/
-
- $scope.createErrorMenu=function() {
- $scope.jsonMenuData = [
- {
- "menuId": 1,
- "column": 2,
- "text": "Design",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 2,
- "column": 3,
- "text": "Infrastructure Ordering",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 3,
- "column": 4,
- "text": "Service Creation",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 4,
- "column": 5,
- "text": "Service Mgmt",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 99,
- "column": 1,
- "text": "Favorites",
- "parentMenuId": null,
- "url": ""
- }
- ];
- $scope.jsonMenuData = unflatten( $scope.jsonMenuData );
- $scope.megaMenuDataObject = menuStructureConvert($scope.jsonMenuData);
-// $log.debug(JSON.stringify($scope.jsonMenuData));
- }
- var childItemList="";
- var parentList = "";
- try{
- childItemList = ${menu.childItemList};
- parentList = ${menu.parentList};
- }catch(err){
- console.log("ebz_header: failed to get child/parent lists", err);
- }
-
- var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
-
- $scope.menuItems = [];
- for (var i = 0; i < parentList.length; i++) {
- $scope.openCurrentMenu = false;
- if(pageUrl==parentList[i].action)
- $scope.openCurrentMenu = true;
- $scope.childItemList = childItemList[i];
- for(chIndex in $scope.childItemList){
- if($scope.childItemList.length>0)
- if($scope.childItemList[chIndex].action!=null){
- if($scope.childItemList[chIndex].action==pageUrl)
- $scope.openCurrentMenu = true;
- }
- }
- $scope.item = {
- parentLabel : parentList[i].label,
- parentAction : parentList[i].action,
- parentImageSrc : parentList[i].imageSrc,
- open:$scope.openCurrentMenu,
- childItemList : $scope.childItemList
- }
- $scope.menuItems.push($scope.item);
- }
- $scope.arrowShow = true;
- $scope.drawerOpen = false;
- $scope.subMenuContent = false;
- $scope.toggleSubMenu = function() {
- $scope.subMenuContent = !$scope.subMenuContent;
- };
-
- var drawerOpen = 'open';
- if (drawerOpen == 'open') {
- $scope.drawerOpen = true;
- $scope.arrowShow = true;
- } else {
- $scope.arrowShow = false;
- }
- $scope.arrowShow = true;
- $scope.drawerOpen = false;
- $scope.toggleDrawer = function() {
- $scope.drawerOpen = !($scope.drawerOpen);
- if ($scope.drawerOpen) {
- $scope.arrowShow = true;
- if (document.getElementById('mContent')!=null)
- document.getElementById('mContent').style.marginLeft = "0px";
- } else {
- $scope.arrowShow = false;
- if (document.getElementById('mContent')!=null)
- document.getElementById('mContent').style.marginLeft = "-150px";
- }
- };
- //var drawerOpen = getCookie('drawerOpen');
- if (drawerOpen == 'open') {
- $scope.drawerOpen = true;
- $scope.arrowShow = true;
- } else {
- $scope.arrowShow = false;
- }
- $timeout(function() {
- detectScrollEvent();
- }, 800);
-
- });
-
- app.filter("ellipsis", function(){
- return function(text, length){
- if (text) {
- var ellipsis = text.length > length ? "..." : "";
- return text.slice(0, length) + ellipsis;
- };
- return text;
- }
- });
-</script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html
deleted file mode 100644
index ae5e13ec..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz/loginSnippet.html
+++ /dev/null
@@ -1,115 +0,0 @@
-<!--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-<script type="text/ng-template" id="loginSnippet.html">
- <div style="line-height: normal; right: 167px; min-height: 200px; height: auto; width: auto; " ng-controller="loginSnippetCtrl" >
- <div id="reg-header-snippet">
- <div class="reg-profilePicture" style="min-height: 215px; width: auto; " id="reg-profile-links">
- <div id="reg-profileImage">
- <div style="clear: both; height: 80px; position: relative; width: 80px;">
-
- <span style=" background-position: -1px -1px; height: 81px;left: 0;position: absolute;top: 0;width: 81px;">&nbsp;</span>
- </div>
- </div>
- <div id="reg-logout-div">
- <a class="reg-logout-btn" href="logout.htm">Log Out</a>
- </div>
- </div>
- <div tabindex="0" class="reg-profileDetails" id="reg-profiledetails-id">
- <ul class="reg-Details-table" style="list-style: none;">
- <li><div class="reg-userName-table"><div id="reg-userName-table-row"><div id="reg-userName-table-cell"><h3 id="reg-userName" ng-bind="userProfile.fullName"></h3><span class="visuallyhidden">.</span></div></div></div></li>
- <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn">EMAIL<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn" ng-bind="userProfile.email"><span class="visuallyhidden">.</span></span></div></li>
- <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn">orgUserId<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn" ng-bind="userProfile.orgUserId"><span class="visuallyhidden"></span></span></div></li>
- </ul>
- </div>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="chat_box.html">
-
- <div style="width: auto;">
-
- <div style="font-size: 24px; font-family: Omnes-ECOMP-W02, Arial;line-height: 26px;color: #444444;text-align: center;">
- <span>Live Chat</span>
- </div>
-
- </div>
- </script>
-
-<script>
-var loginSnippetCtrl = function ($scope,$http, $log,UserInfoService){
- /*Define fields*/
- $scope.userProfile={
- firstName:'',
- lastName:'',
- fullName:'',
- email:''
- }
- /*Put user info into fields*/
- $scope.inputUserInfo = function(userInfo){
- if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
- if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
- $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
- if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
- $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
- if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
- $scope.userProfile.email = userInfo.USER_EMAIL;
-
- }
- }
- /*getting user info from session*/
- $scope.getUserNameFromSession = function(){
- UserInfoService.getFunctionalMenuStaticDetailSession()
- .then(function (response) {
- var j = response;
- // console.log(response);
- $scope.userProfile.fullName = response.userName;
- $scope.userProfile.email = response.email;
- });
- }
- /*getting user info from shared context*/
- $scope.getUserName=function() {
- var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.info('loginSnippet::getUserName: failed to get user info from shared context');
- $scope.getUserNameFromSession();
- }else{
- // $log.info('Received User information from shared context',res);
- var resData = res;
- $scope.inputUserInfo(resData);
- $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
- }
- },
- function(err) {
- console.log('error');
- }
- );
- };
- /*call the get user info function*/
- try{
- $scope.getUserName();
- }catch(err){
- $log.info('Error while getting User information',err);
- }
-}
- </script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp
deleted file mode 100644
index 93f96369..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template.jsp
+++ /dev/null
@@ -1,45 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
-
-<!DOCTYPE html>
-<html ng-app="abs">
- <head>
- <%@ include file="/WEB-INF/fusion/jsp/meta.jsp" %>
- <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
- </head>
- <body class="templatebody" style="opacity: 1; background-color: rgb(242, 242, 242); padding: 0px;">
- <div class="applicationWindow">
- <div>
- <tiles:insertAttribute name="header" />
- </div>
- <br>
- <div class="content" id="mContent">
- <div class="body-content-jsp">
- <tiles:insertAttribute name="body" />
- </div>
- </div>
- <br>
- <div>
- <tiles:insertAttribute name="footer" />
- </div>
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp
deleted file mode 100644
index a579fdc0..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp
+++ /dev/null
@@ -1,35 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
-<!DOCTYPE html>
-<html>
- <%@ include file="/WEB-INF/fusion/jsp/meta.jsp" %>
- <body class="templatebody" style="opacity: 1; background-color: rgb(242, 242, 242); padding: 0px;">
- <div class="applicationWindow">
-
- <div class="content" style="margin-left:100px; margin-right:100px;">
- <div>
- <tiles:insertAttribute name="body" />
- </div>
- </div>
-
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp
deleted file mode 100644
index 4cdfe51d..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/ebz_template_report_embedded.jsp
+++ /dev/null
@@ -1,48 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
-<!DOCTYPE html>
-<html ng-app="abs">
- <%@ include file="/WEB-INF/fusion/jsp/meta.jsp" %>
- <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script>
-<script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/app.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
-<script src="static/js/jquery-1.10.2.js"></script>
-<script src="static/js/modalService.js"></script>
-<script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
-<script src="static/js/jquery-ui.js" type="text/javascript"></script>
-<script src="app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
-<script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
-<script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
-<script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
-<script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>
-
-
- <body class="templatebody" style="opacity: 1; background-color: rgb(242, 242, 242); padding: 0px;">
- <div class="applicationWindow">
- <div class="content">
- <tiles:insertAttribute name="body" />
- </div>
- </div>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp
deleted file mode 100644
index 61458524..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_search_demo.jsp
+++ /dev/null
@@ -1,97 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<!-- <link rel="stylesheet" type="text/css" href="app/fusion/elasticsearch/styles/styles.css" > -->
-<script>
-app.controller('elasticSearchController',['$scope','$http',function ($scope,$http) {
- $scope.submenuId = "";
- $scope.isNew="";
- $scope.viewPerPage = 20;
- $scope.currentPage = 2;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- $scope.tableData=[];
- $scope.searchText='';
- $scope.flagCount=0;
- function escapeRegExp(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|\&]/g, " ");
- }
- $scope.test = function(){
- $scope.searchText=$scope.searchText;
- var sendData ={
- "data" : escapeRegExp($scope.searchText),
- "size" : "100",
- "fuzzy" : "true",
- "resultname" : "custsuggest"
- };
-
- if($scope.flagCount<3 || $scope.searchText.length==0){
- $scope.flagCount++;
- $http.get('es_search/' + encodeURIComponent(JSON.stringify(sendData))).
- then(function(response){
- var data = JSON.parse(response.data.result);
- $scope.tableData = data.hits.hits;
- })
- .catch(function(data,status){
- console.log("Error: " + status + " : " + data);
- })
- .finally(function() {
- $scope.flagCount--;
- });
- }
- }
- $scope.searchText='';
-}]);
-</script>
-
-<div style="margin-left:20px;" ng-app="eSearchApp">
- <div style="margin-top:20px; margin-bottom:20px;"><span class="heading1">Elastic Search - </span><span class="heading2">Corporate Location Data System</span></div>
- <div class="demoElas" ng-controller="elasticSearchController">
- <div class="form-field" align="center">
- <input type="text" placeholder="What are you looking for?" class="search__large-iconform" ng-model="searchText" ng-change="test()">
- <i class="icon-search">&nbsp;</i>
- </div>
-
- <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header>Customer Name</th>
- <th att-table-header>Phone</th>
- <th att-table-header>Street</th>
- <th att-table-header>City</th>
- <th att-table-header>State</th>
- <th att-table-header>ZIP</th>
- <th att-table-header>CLLI</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="options in tableData">
- <tr>
- <td att-table-body >{{options._source.name}}</td>
- <td att-table-body >{{options._source.suggest.payload.tn}}</td>
- <td att-table-body >{{options._source.suggest.payload.addr}}</td>
- <td att-table-body >{{options._source.suggest.payload.city}}</td>
- <td att-table-body >{{options._source.suggest.payload.st}}</td>
- <td att-table-body >{{options._source.suggest.payload.zip}}</td>
- <td att-table-body >{{options._source.suggest.payload.clli}}</td>
- </tr>
- </tbody>
- </table>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp
deleted file mode 100644
index abae598b..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/es_suggest_demo.jsp
+++ /dev/null
@@ -1,97 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<!-- <link rel="stylesheet" type="text/css" href="app/fusion/elasticsearch/styles/styles.css" > -->
-<script>
-app.controller('elasticSearchController',['$scope','$http',function ($scope,$http) {
- $scope.submenuId = "";
- $scope.isNew="";
- $scope.viewPerPage = 20;
- $scope.currentPage = 2;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- $scope.tableData=[];
- $scope.searchText='';
- $scope.flagCount=0;
- function escapeRegExp(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|\&]/g, " ");
- }
- $scope.test = function(){
- $scope.searchText=$scope.searchText;
- var sendData ={
- "data" : escapeRegExp($scope.searchText),
- "size" : "20",
- "fuzzy" : "true",
- "resultname" : "custsuggest"
- };
-
- if($scope.flagCount<3 || $scope.searchText.length==0){
- $scope.flagCount++;
- $http.get('es_suggest/' + encodeURIComponent(JSON.stringify(sendData))).
- then(function(response){
- var data = JSON.parse(response.data.result);
- $scope.tableData = data.custsuggest[0].options;
- })
- .catch(function(data,status){
- console.log("Error: " + status + " : " + data);
- })
- .finally(function() {
- $scope.flagCount--;
- });
- }
- }
- $scope.searchText='';
-}]);
-</script>
-
-<div style="margin-left:20px;" ng-app="eSearchApp">
- <div style="margin-top:20px; margin-bottom:20px;"><span class="heading1">Elastic Search - </span><span class="heading2">Corporate Location Data System</span></div>
- <div class="demoElas" ng-controller="elasticSearchController">
- <div class="form-field" align="center">
- <input type="text" placeholder="What are you looking for?" class="search__large-iconform" ng-model="searchText" ng-change="test()">
- <i class="icon-search">&nbsp;</i>
- </div>
-
- <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header>Customer Name</th>
- <th att-table-header>Phone</th>
- <th att-table-header>Street</th>
- <th att-table-header>City</th>
- <th att-table-header>State</th>
- <th att-table-header>ZIP</th>
- <th att-table-header>CLLI</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="options in tableData">
- <tr>
- <td att-table-body >{{options.text}}</td>
- <td att-table-body >{{options.payload.tn}}</td>
- <td att-table-body >{{options.payload.addr}}</td>
- <td att-table-body >{{options.payload.city}}</td>
- <td att-table-body >{{options.payload.st}}</td>
- <td att-table-body >{{options.payload.zip}}</td>
- <td att-table-body >{{options.payload.clli}}</td>
- </tr>
- </tbody>
- </table>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp
deleted file mode 100644
index ed50b5dd..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/frame_insert.jsp
+++ /dev/null
@@ -1,44 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<iframe id="frame_insert" src="${frame_int}"></iframe>
-
-<script type="text/javascript">
-
- var frameId = "#frame_insert";
-
- $(frameId).load(function(){
- iframeLoaded()
-
- });
-
-
- function iframeLoaded() {
- var iFrameRef = $(frameId);
- if(iFrameRef) {
-
- var height = iFrameRef.contents().find("input[name='inner_height']");
- var width = iFrameRef.contents().find("input[name='inner_width']");
-
- iFrameRef.css('height', (height.val() != undefined ? height.val():"500px"));
- iFrameRef.css('width', (width.val() != undefined ? width.val():"500px"));
- iFrameRef.css('border','none');
- }
- }
-</script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/include.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/include.jsp
deleted file mode 100644
index cd6a5e09..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/include.jsp
+++ /dev/null
@@ -1,30 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %>
-<%@ page import="org.openecomp.portalsdk.core.web.support.AppUtils" %>
-
-<%@ page import="java.util.LinkedHashMap" %>
-
-
-<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
-<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
-<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
-
-<c:set var="request" value="<%=request%>"/>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp
deleted file mode 100644
index 0a361803..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/meta.jsp
+++ /dev/null
@@ -1,36 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/fn-ebz.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/demo.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/base.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/dtpk.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/frms.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/sldr.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/tbs.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css">
-
-</head> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html
deleted file mode 100644
index 0766cecd..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal.html
+++ /dev/null
@@ -1,324 +0,0 @@
-<!--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-
-<script type="text/ng-template" id="modal_informative.html">
- <div class="modal__informative font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Success!</h2>
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}</div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_message.html">
- <div class="modal__informative font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Attention!</h2>
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}</div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="delete_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are you sure you want to delete the profile?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="email_report_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Mailing your report...</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- The report will be sent to your email soon!
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Ok</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_authCode.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are you sure you want to delete the Authorization Code(s)?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_Schedule.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Schedule(s) ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="alternate_number.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Number ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="manage_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Line Port ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_virtualOnNet.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete this Virtual On-Net User?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_user_meet_me_conference.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete this Conference?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="confirmation_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">{{message.title}}</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}<br/></div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="confirmation_for_delete.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name"> <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This {{message.title}}?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">Deletions are not reversible. {{message.text}}<br/></div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_warning.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Unable to process your request!</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">Unable to process your request. <br/>{{message.text}}<br/>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_warning_message.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Warning</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}<br/>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
-
-
- <script type="text/ng-template" id="modal_prompt.html">
- <div class="modal__warning font-showcase">
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Unable to process your request. </h2>
- <i class="icon-circle-action-close close-modal modal__header--close" ng-click="$dismiss()"></i>
-
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Unable to process your request. <br/> {{message.text}}
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Device?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_multiple_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete The Device(s)?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
-<script>
-
-//.controller('modalpopupController', function ($scope, $modalInstance){
-var modalpopupController = function ($scope, $modalInstance, message){
-
- $scope.message = message;
-
-
- $scope.hello = function () {
- $modalInstance.close($scope.digitPattern);
- };
- $modalInstance.ok = function() {
- //add the ok functionality
- alert("Logout");
- };
- $modalInstance.cancel = function() {
- //add the cancel functionality
- alert("Keep Log in");
- };
- $modalInstance.cancelbutton = function() {
- //add the cancel functionality
- alert("Modal Waring popup close event");
- };
-}
-
-
-</script>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html
deleted file mode 100644
index c163002d..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_role.html
+++ /dev/null
@@ -1,274 +0,0 @@
-<!--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-
-<script type="text/ng-template" id="role_functions_popup.html">
- <div class="modal__informative font-showcase" style="width:700px;height:500px;overflow:scroll">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">Select Role Functions</h2>
- </div>
- <button align="right" class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <table table-data="availableRoleFunctions" att-table>
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role Function</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRoleFunction in availableRoleFunctions" style="max-height: 980px;" >
- <tr>
-
- <td width="10%">
- <div ng-click="toggleRoleFunction(availableRoleFunction.selected,availableRoleFunction);">
- <input type="checkbox" ng-model="availableRoleFunction.selected" att-toggle-main>
- </div>
- </td>
- <td width="90%">{{ availableRoleFunction.name }}</td>
-
- </tr>
- </tbody>
- </table>
- </div>
- </div>
-</script>
-
-
-<script type="text/ng-template" id="child_roles_popup.html">
- <div class="modal__informative font-showcase" style="width:700px;height:500px;overflow:scroll">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">Select Child Roles</h2>
- </div>
- <button align="right" class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <table table-data="availableRoles" att-table>
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRole in availableRoles" style="max-height: 980px;" >
- <tr>
- <td att-table-body width="10%">
- <div ng-click="toggleChildRole(availableRole.selected,availableRole);">
- <input type="checkbox" ng-model="availableRole.selected" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="90%">{{ availableRole.name }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
-</script>
-
-<script>
-
-var rolepopupController = function ($scope, $modalInstance, role,modalService){
- $scope.role = role;
-
- if($scope.role.childRoles==null){
- $scope.role.childRoles=[];
- }
-
- $scope.ociavailableRoles=${availableRoles};
- console.log($scope.ociavailableRoles);
- $scope.availableRoles=[];
- if($scope.ociavailableRoles)
- $.each($scope.ociavailableRoles, function(i, a){
- var availableRole = a;
- availableRole.selected = false;
- if($scope.role.childRoles){
- $.each($scope.role.childRoles, function(j, b){
- if(a.id === b.id) {
- availableRole.selected = true;
- }
- });
- };
- $scope.availableRoles.push(availableRole);
- });
- ;
-
- $scope.ociavailableRoleFunctions=${availableRoleFunctions};
-
- $scope.availableRoleFunctions = [];
- if($scope.ociavailableRoleFunctions)
- $.each($scope.ociavailableRoleFunctions, function(i, a){
- var availableRoleFunction = a;
- availableRoleFunction.selected = false;
- $.each($scope.role.roleFunctions, function(j, b){
- if(a.code === b.code) {
- availableRoleFunction.selected = true;
- }
- });
- $scope.availableRoleFunctions.push(availableRoleFunction);
- });
- ;
-
- $scope.toggleRoleFunction = function(selected,availableRoleFunction) {
- //alert('toggleRole: '+selected);
-
- if(!selected) {
- //remove role function
- if(role.id==null){
- var index = $scope.role.roleFunctions.indexOf(availableRoleFunction);
- if(index>=0)
- $scope.role.roleFunctions.splice(index, 1);
- return;
- }
- var uuu = "role/removeRoleFunction.htm?role_id=${param.role_id}";
- modalService.popupConfirmWinWithCancel("Confirm","You are about to remove the role function "+availableRoleFunction.name+" from the role for "+$scope.role.name+". Do you want to continue?",
- function(){
- var postData={roleFunction:availableRoleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.role=data.role;});
- },
- error : function(data){
- modalService.showFailure("Fail","Error while saving.");
- }
- });
-
- },
- function(){
- availableRoleFunction.selected=!availableRoleFunction.selected;
- })
-
- } else {
- //add role function
- if(role.id==null){
- $scope.role.roleFunctions.push(availableRoleFunction);
- return;
- }
- var uuu = "role/addRoleFunction.htm?role_id=${param.role_id}";
- modalService.popupConfirmWinWithCancel("Confirm","You are about to add the role function "+availableRoleFunction.name+" to the role for "+$scope.role.name+". Do you want to continue?",
- function(){
- var postData={roleFunction:availableRoleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.role=data.role;});
- },
- error : function(data){
- modalService.showFailure("Fail","Error while saving.");
- }
- });
-
- },
- function(){
- availableRoleFunction.selected=!availableRoleFunction.selected;
- })
-
- }
-
-
- };
-
- $scope.toggleChildRole = function(selected,availableRole) {
- //alert('toggleRole: '+selected);
-
- if(!selected) {
- //remove role
- if(role.id==null){
- var index = $scope.role.childRoles.indexOf(availableRole);
- if(index>=0)
- $scope.role.childRoles.splice(index, 1);
- return;
- }
- var uuu = "role/removeChildRole.htm?role_id=${param.role_id}";
- modalService.popupConfirmWinWithCancel("Confirm","You are about to remove the child role "+availableRole.name+" from the role for "+$scope.role.name+". Do you want to continue?",
- function(){
- var postData={childRole:availableRole};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- console.log('role',data.role);
- $scope.$apply(function(){$scope.role=data.role;});
- },
- error : function(data){
- modalService.showFailure("Fail","Error while saving.");
- }
- });
-
- },
- function(){
- availableRole.selected=true;
- })
-
- } else {
- //add role
- if(role.id==null){
- $scope.role.childRoles.push(availableRole);
- return;
- }
- var uuu = "role/addChildRole.htm?role_id=${param.role_id}";
- modalService.popupConfirmWinWithCancel("Confirm","You are about to add the child role "+availableRole.name+" to the role for "+$scope.role.name+". Do you want to continue?",
- function(){
- var postData={childRole:availableRole};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){$scope.role=data.role;});
- },
- error : function(data){
- modalService.showFailure("Fail","Error while saving.");
- }
- });
-
- },
- function(){
- availableRole.selected=false;
- })
-
-
- }
-
-
- };
-
-
- $scope.close = function() {
- console.log('role', $scope.role);
- $modalInstance.close({role:$scope.role});
- };
-
-}
-
-
-</script>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html
deleted file mode 100644
index ee0b5121..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/popup_modal_rolefunction.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<!--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-<script type="text/ng-template" id="edit_role_function_popup.html">
- <div class="modal__informative font-showcase" style="width:400px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">{{label}}</h2>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.name"
- maxlength="30" />
- </div>
- <br/>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Code:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.code" ng-disabled="disableCd"
- maxlength="30" />
- </div>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="saveRoleFunction(editRoleFunction);">Save</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- </div>
- </div>
-</script>
-
-<script>
-
-var rolefunctionpopupController = function ($scope, $modalInstance, message){
- if(message.availableRoleFunction==null)
- $scope.label='Add Role Function'
- else{
- $scope.label='Edit Role Function'
- $scope.disableCd=true;
- }
- $scope.editRoleFunction = message.availableRoleFunction;
-
- $scope.saveRoleFunction = function(availableRoleFunction) {
- var uuu = "role_function_list/saveRoleFunction.htm";
- var postData={availableRoleFunction: availableRoleFunction};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- //$scope.availableRoleFunctions=[];$scope.$apply();
- $scope.availableRoleFunctions=data.availableRoleFunctions;});
- //alert("Update Successful.") ;
- console.log($scope.availableRoleFunctions);
-
- //$scope.editRoleFunction = null;
- $modalInstance.close({availableRoleFunctions:$scope.availableRoleFunctions});
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
- };
-
- $scope.close = function() {
- $modalInstance.close();
- };
-}
-
-</script>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/sequence/details.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/sequence/details.jsp
deleted file mode 100644
index eacdfbe0..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/sequence/details.jsp
+++ /dev/null
@@ -1 +0,0 @@
-<iframe style="border:none" src="app/fusion/sequence/view-models/details.html" height="700" width="1300"></iframe> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp b/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp
deleted file mode 100644
index 9bf0ed74..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/jsp/webrtc/collaboration.jsp
+++ /dev/null
@@ -1,494 +0,0 @@
-<%--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- --%>
-
-
-<!DOCTYPE html>
-
-<html xmlns="http://www.w3.org/1999/xhtml" ng-app="abs">
-<head>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <link type="text/css" rel="stylesheet" href="app/fusion/styles/layout/layout-default-latest.css" />
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/fn-ebz.css" >
- <style type="text/css">
- /*
- * NOTE: All CSS is purely cosmetic - it does not affect functionality
- * http://layout.jquery-dev.com/demos.cfm
- */
-
- /* customize borders to avoid double-borders around inner-layouts */
- .ui-layout-pane {
- border: 0; /* override layout-default-latest.css */
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
- }
- .ui-layout-pane-north ,
- .ui-layout-pane-south {
- border: 1px solid #BBB;
- overflow: auto;
- }
- .ui-layout-pane-west ,
- .ui-layout-pane-east {
- }
- .ui-layout-pane-center {
- border-left: 0;
- border-right: 0;
- }
- .inner-center {
- border: 1px solid #BBB;
- }
-
- /* add shading to outer sidebar-panes */
- .outer-west ,
- .outer-east {
- background-color: #EEE;
- }
- .middle-west ,
- .middle-east {
- background-color: #F8F8F8;
- }
-
- /* remove padding & scrolling from panes that are 'containers' for nested layouts */
- .outer-center ,
- .middle-center {
- border: 0; /* cosmetic */
- padding: 0;
- overflow: auto;
- }
-
- /*
- * customize borders on panes/resizers to make pretty
- */
- .ui-layout-pane-west { border-right: 0; }
- .ui-layout-resizer-west { border-left: 1px solid #BBB; }
- .ui-layout-pane-east { border-left: 0; }
- .ui-layout-resizer-east { border-right: 1px solid #BBB; }
- .ui-layout-pane-north { border-bottom: 0; }
- .ui-layout-resizer-north { border-top: 1px solid #BBB; }
- .ui-layout-pane-south { border-top: 0; }
- .ui-layout-resizer-south { border-bottom: 1px solid #BBB; }
- /*
- * add borders to resizers when pane is 'closed'
- *
- *.ui-layout-resizer-closed { border: 1px solid #BBB; }
- */
- /*
- * show both borders when the resizer is 'dragging'
- */
- .ui-layout-resizer-west-dragging ,
- .ui-layout-resizer-east-dragging {
- border-left: 1px solid #BBB;
- border-right: 1px solid #BBB;
- }
- .ui-layout-resizer-north-dragging ,
- .ui-layout-resizer-south-dragging {
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
- }
-
-
- /*
- layout toggler background image
- */
- .ui-layout-toggler-west, .ui-layout-toggler-east {
- border-width: 1px 0;
- background-image: url("static/fusion/images/layout/panel-e-w-toggle.png");
- background-size: 10px 10px;
- background-repeat: no-repeat;
- background-position: center;
- }
-
- .ui-layout-toggler-north, .ui-layout-toggler-south {
- border-width: 0 1px;
- background-image: url("static/fusion/images/layout/panel-n-s-toggle.png");
- background-size: 10px 10px;
- background-repeat: no-repeat;
- background-position: center;
- }
-
- body{background-color:#fff;font-size:14px;font-size:.875rem;margin:0;padding:0px 0 20px;position:relative}
-
- </style>
-
-
- <!-- LAYOUT v 1.3.0 -->
- <script type="text/javascript" src="app/fusion/scripts/layout/jquery-latest.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/layout/jquery-ui-latest.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/layout/jquery.layout-latest.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/webrtc/RTCMultiConnection.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/socket/peerBroadcast.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/layout/debug.js"></script>
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/fn-ebz.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
-
- <script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/app.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
-
- <%@ include file="/WEB-INF/fusion/jsp/popup_modal.html" %>
- <script src="app/fusion/scripts/modalService.js"></script>
- <script src="app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
- <script src="app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js"></script>
- <script src="app/fusion/scripts/att_angular_gridster/angular-gridster.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
- <script type="text/javascript" src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script>
- <style>
- body{background-color:#fff;font-size:14px;font-size:.875rem;margin:0;padding:0px 0 20px;position:relative}
- </style>
-
- <script type="text/javascript">
-
-
- var popupModalService;
-
- app.controller("collaborationController", function ($scope,$http,modalService, $modal) {
- popupModalService = modalService;
-
- });
-
-
- $(document).ready(function () {
-
- // OUTER-LAYOUT
- panelLayout = $('body').layout({
- center__paneSelector: ".outer-center"
- , west__paneSelector: ".outer-west"
- , east__paneSelector: ".outer-east"
- //, west__size: 800
- //, east__size: 125
- , spacing_open: 8 // ALL panes
- , spacing_closed: 12 // ALL panes
-
- , center__childOptions: {
- center__paneSelector: ".inner-center"
- , west__paneSelector: ".inner-west"
- , east__paneSelector: ".inner-east"
- , west__size: 75
- , east__size: 75
- , spacing_open: 8 // ALL panes
- , spacing_closed: 8 // ALL panes
- , west__spacing_closed: 12
- , east__spacing_closed: 12
- }
-
-
-
-
- });
-
-
- function initializeConnections() {
-
- var channelId = null;
- channelId = location.href.replace(/\/|:|#|%|\.|\[|\]/g, '');
- var videoChannelId = channelId.concat("video");
- var screenChannelId = channelId.concat("screen");
-
- videoConnection = new RTCMultiConnection(videoChannelId);
- screenConnection = new RTCMultiConnection(screenChannelId);
-
- configConnection(videoConnection,true,true,false,true,false);
- configConnection(screenConnection,false,false,true,false,true);
-
- };
-
- function configConnection(_connection, _audio, _video, _screen, _data, _oneway) {
- _connection.session = {
- audio: _audio, // by default, it is true
- video: _video, // by default, it is true
- screen: _screen,
- data: _data,
- oneway: _oneway,
- broadcast: false
- };
-
- _connection.direction = "one-to-one";
-
- if( _data == true ) {
- _connection.onmessage = function(e) {
- appendDIV(e.data);
-
- console.debug(e.userid, 'posted', e.data);
- console.log('latency:', e.latency, 'ms');
- };
- }
-
-
- };
-
- function assignStreamToDom() {
-
-
- screenConnection.screenbody = document.querySelector('.screenContainer1');
- screenConnection.videobody = document.querySelector('.videoContainer2');
-
- videoConnection.screenbody = document.querySelector('.screenContainer2');
- videoConnection.videobody = document.querySelector('.videoContainer1');
- };
-
- function maximizeLayout() {
-
- // open the panes and maximize the window.
- top.window.resizeTo(screen.availWidth,screen.availHeight);
- panelLayout.open('west');
- // panelLayout.open('south'); is not working due to state initialization problem; debug to find out. so replacing the call with work around below - hack.
- $(".ui-layout-toggler-south-closed").first().click();
-
- };
-
- function minimizeLayout() {
-
- // close the panes and minimize the window.
- top.window.resizeTo(screen.availWidth - 2*screen.availWidth/3, screen.availHeight - screen.availHeight/2);
- panelLayout.close('west');
- // panelLayout.close('south'); is not working due to state initialization problem; debug to find out. so replacing the call with work around below - hack.
- $(".ui-layout-toggler-south-opened").first().click();
- };
-
- function emptyContainers() {
- $('.screenContainer1').empty();
- $('.videoContainer2').empty();
-
- $('.screenContainer2').empty();
- $('.videoContainer1').empty();
- };
-
- function appendDIV(div, parent) {
- if (typeof div === 'string') {
- var content = div;
- div = document.createElement('div');
- div.innerHTML = content;
- };
-
- var chatOutput = document.getElementById('chat-output'),
- fileProgress = document.getElementById('file-progress');
-
- if (!parent) chatOutput.insertBefore(div, chatOutput.firstChild);
- else fileProgress.insertBefore(div, fileProgress.firstChild);
-
- div.tabIndex = 0;
- $('#chat-input').focus();
- };
-
- function confirmClose() {
- var message = "Are you sure you want to close the session?";
-
- if(popupModalService != undefined) {
- popupModalService.popupConfirmWin("Confirm", message, function(){ location.reload();});
- }
-
- else if (confirm(message) == true) {
- location.reload();
- //window.opener.location.reload(); // go to the parent window
- //close();
- } else {
- // do nothing
- }
-
- };
-
- function notifyOthers() {
-
- // var websocket = localStorage.getItem('notifySocket');
- //if( websocket != null) {
- // handling websocket peer broadcast session
- var currentUser = "${sessionScope.user.sbcid}";
- var initialPageVisit = "${sessionScope.initialPageVisit}";
- var remoteUser = '';
-
- var userList = location.search.split('chat_id=')[1].split('-');
- for(var i=0;i<userList.length;i++) {
- if(userList[i] !== currentUser) {
- remoteUser = userList[i];
- break;
- }
- }
-
- socketSetup(initialPageVisit, currentUser, remoteUser,"socketSend");
-
-
-
-
-
-
- };
-
- function makeChatVisible() {
-
- $('#chat-input').css("visibility", 'visible');
- };
-
-
-
- /* on click button enabled*/
- document.getElementById('share-screen').onclick = function() {
-
- emptyContainers();
- videoConnection.close();
- screenConnection.close();
-
- maximizeLayout();
- emptyContainers();
- makeChatVisible();
-
- videoConnection.open();
- screenConnection.open();
-
-
- notifyOthers();
-
-
-
- };
-
- document.getElementById('stop-share-screen').onclick = function() {
-
- emptyContainers();
-
- videoConnection.close();
- screenConnection.close();
-
- confirmClose();
-
- };
-
- document.getElementById('view-screen').onclick = function() {
-
- maximizeLayout();
- emptyContainers();
- makeChatVisible();
-
- // timeout is required for the sharing to properly work
- setTimeout(function() {
- screenConnection.connect();
- },2000);
- setTimeout(function() {
- videoConnection.connect();
- },1000);
-
-
- };
-
- document.getElementById('chat-input').onkeypress = function(e) {
- if (e.keyCode !== 13 || !this.value) return;
- var message = "<b>${model.name}</b>: " + this.value;
- appendDIV(message);
-
- // sending text message
- videoConnection.send(message);
-
- this.value = '';
- };
-
- /*
- document.getElementById('file').onchange = function() {
- videoConnection.send(this.files[0]);
- };
- */
-
-
- //document.querySelector('.screenContainerPane').appenChild(document.querySelector('.screenContainer'));
- //document.querySelector('.videoContainerPane').appendChild(document.querySelector('.videoContainer'));
-
- //panelLayout.bindButton($('#share-screen'), 'open', 'outer-west');
- //panelLayout.bindButton($('#stop-share-screen'), 'close', 'outer-west');
- var videoConnection = null, screenConnection = null;
- initializeConnections();
- assignStreamToDom();
-
- // start the share
- //document.getElementById('share-screen').click();
- //
- });
-
-
-</script>
-
-
-</head>
-
-<body>
-<!--
- <button id="share-screen" hidden="true" style="display: none;" class="setup">Share Your Screen</button>
- <button id="stop-share-screen" hidden="true" style="display: none;" class="setup">Stop Share Your Screen</button>
- <button id="view-screen" hidden="true" style="display: none;" class="setup">View My Screen</button>
-
- -->
-
-<div class="outer-center" style="position: absolute; left: 12px; right: 0px; top: 0px;bottom: 0px;">
- <div class="inner-center">
-
- <!-- <jsp:include page="/WEB-INF/fusion/zul/chatOne.zul" /> -->
-
-
-
- <table style="width: 100%;">
- <tbody><tr>
- <td>
- <button id="share-screen" class="button button--primary button--small setup">Start Session</button>
- <button id="stop-share-screen" class="button button--primary button--small setup">Stop Session</button>
- <button id="view-screen" class="button button--primary button--small setup">View</button>
-
- </td>
-
- </tr>
- </tbody>
-
- <tbody><tr>
- <td>
- <input type="text" id="chat-input" style="font-size: 1.2em;visibility:collapse;" placeholder="type here.."/>
- <div id="chat-output"></div>
- </td>
- <!--
- <td style="background: white;">
- <input type="file" id="file">
- <div id="file-progress"></div>
- </td>
- -->
- </tr>
- </tbody>
- </table>
-
-
- </div>
- <div id="inner-south" class="ui-layout-south">
- <div class="videoContainer1"></div>
- <div class="videoContainer2"></div>
-
- </div>
-</div>
-
-<div class="outer-west">
- <div class="screenContainer1"></div>
- <div class="screenContainer2"></div>
- <div ng-controller="collaborationController">
- </div>
-</div>
-
-
-
-
-
-</body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml b/usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml
deleted file mode 100644
index 098a5857..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Fusion.hbm.xml
+++ /dev/null
@@ -1,393 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping package="org.openecomp.portalsdk.core.domain">
-
- <!-- User class mapping details -->
- <class name="User" table="FN_USER">
- <id name="id" column="user_id" >
- <generator class="native">
- <param name="sequence">seq_fn_user</param>
- </generator>
- </id>
-
- <property name="orgId" column="org_id"/>
- <property name="managerId" column="manager_id"/>
- <property name="firstName" column="first_name"/>
- <property name="middleInitial" column="middle_name"/>
- <property name="lastName" column="last_name"/>
- <property name="phone" column="phone"/>
- <property name="fax" column="fax"/>
- <property name="cellular" column="cellular"/>
- <property name="email" column="email"/>
- <property name="addressId" column="address_id"/>
- <property name="alertMethodCd" column="alert_method_cd"/>
-
- <property name="address1" column="address_line_1"/>
- <property name="address2" column="address_line_2"/>
- <property name="city" column="city"/>
- <property name="state" column="state_cd"/>
- <property name="zipCode" column="zip_code"/>
- <property name="country" column="country_cd"/>
-
- <property name="hrid" column="hrid"/>
- <property name="orgUserId" column="org_user_id"/>
- <property name="orgCode" column="org_code"/>
- <property name="loginId" column="login_id"/>
- <property name="loginPwd" column="login_pwd"/>
- <property name="lastLoginDate" column="last_login_date" type="timestamp"/>
-
- <property name="locationClli" column="location_clli" />
- <property name="orgManagerUserId" column="org_manager_userid" />
- <property name="company" column="company" />
- <property name="department" column="department" />
- <property name="departmentName" column="department_name" />
- <property name="businessUnit" column="business_unit" />
- <property name="businessUnitName" column="business_unit_name" />
- <property name="jobTitle" column="job_title" />
- <property name="siloStatus" column="silo_status" />
- <property name="financialLocCode" column="fin_loc_code" />
-
- <property name="active" column="active_yn" type="yes_no"/>
- <property name="internal" column="is_internal_yn" type="yes_no"/>
-
- <property name="created" type="timestamp" column="created_date" />
- <property name="modified" type="timestamp" column="modified_date" />
-
- <property name="createdId" column="created_id" />
- <property name="modifiedId" column="modified_id" />
- <property name="timeZoneId" column="timezone" />
-
- <set name="userApps" table="FN_USER_ROLE" lazy="false" sort="natural" inverse="true" cascade="all-delete-orphan">
- <key column="user_id"/>
- <one-to-many class="org.openecomp.portalsdk.core.domain.UserApp" />
- </set>
-
- <set name="pseudoRoles" table="FN_USER_PSEUDO_ROLE" lazy="false" sort="natural">
- <key column="user_id"/>
- <many-to-many column="pseudo_role_id" class="org.openecomp.portalsdk.core.domain.Role" />
- </set>
- </class>
-
- <!-- Profile class mapping details;
- dupe of User class, but fewer fields -->
- <class name="Profile" table="FN_USER">
- <id name="id" column="user_id" >
- <generator class="increment"/>
- </id>
- <property name="first_name" column="first_name"/>
- <property name="last_name" column="last_name"/>
- <property name="email" column="email"/>
- <property name="orgManagerUserId" column="org_manager_userid" />
- <property name="active_yn" column="active_yn"/>
- <property name="orgUserId" column="org_user_id"/>
- </class>
-
- <class name="UserApp" table="fn_user_role">
- <composite-id>
- <key-property name="userId" type="long">
- <column name="user_id" precision="11" scale="0" />
- </key-property>
- <key-many-to-one name="app" class="org.openecomp.portalsdk.core.domain.App" column="app_id" />
- <key-many-to-one name="role" class="org.openecomp.portalsdk.core.domain.Role" column="role_id" />
- </composite-id>
- <property name="priority" type="java.lang.Short">
- <column name="priority" precision="4" scale="0" />
- </property>
- </class>
-
- <!-- App class mapping details -->
- <class name="App" table="fn_app">
- <id name="id" column="app_id"/>
- <property name="name" column="app_name"/>
- <property name="appPassword" column="app_password"/>
- <property name="username" column="app_username"/>
- <property name="imageUrl" column="app_image_url"/>
- <property name="description" column="app_description"/>
- <property name="notes" column="app_notes"/>
- <property name="url" column="app_url"/>
- <property name="alternateUrl" column="app_alternate_url"/>
- <property name="restEndpoint" column="app_rest_endpoint"/>
- <property name="mlAppName" column="ml_app_name"/>
- <property name="mlAppAdminId" column="ml_app_admin_id"/>
- <property name="motsId" column="mots_id"/>
- <property name="open" column="open"/>
- <property name="enabled" column="enabled"/>
- <property name="thumbnail" column="thumbnail" type="blob"/>
- <property name="uebKey" column="ueb_key"/>
- <property name="uebSecret" column="ueb_secret"/>
- <property name="uebTopicName" column="ueb_topic_name"/>
- </class>
-
-
- <!-- Audit Log class mapping details -->
- <class name="AuditLog" table="fn_audit_log">
- <id name="id" column="log_id">
- <!-- <generator class="sequence">
- <param name="sequence">seq_fn_audit_log</param>
- </generator> -->
- <generator class="native">
- <param name="sequence">seq_fn_audit_log</param>
- </generator>
- </id>
- <property name="activityCode" column="activity_cd"/>
- <property name="affectedRecordId" column="affected_record_id" />
- <property name="comments" column="comments" />
- <property name="createdId" column="user_id" />
- </class>
-
- <!-- User Role class mapping details -->
- <class name="Role" table="FN_ROLE">
- <id name="id" column="role_id">
- <generator class="native">
- <param name="sequence">seq_fn_role</param>
- </generator>
- </id>
-
- <property name="name" column="role_name"/>
- <property name="priority" column="priority" />
- <property name="active" column="active_yn" type="yes_no"/>
-
- <set name="roleFunctions" table="FN_ROLE_FUNCTION" lazy="false" sort="natural">
- <key column="role_id"/>
- <many-to-many column="function_cd" class="org.openecomp.portalsdk.core.domain.RoleFunction"/>
- </set>
-
- <set name="childRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural">
- <key column="parent_role_id"/>
- <many-to-many column="child_role_id" class="org.openecomp.portalsdk.core.domain.Role"/>
- </set>
-
- <set name="parentRoles" table="FN_ROLE_COMPOSITE" lazy="false" sort="natural">
- <key column="child_role_id"/>
- <many-to-many column="parent_role_id" class="org.openecomp.portalsdk.core.domain.Role"/>
- </set>
-
- </class>
-
-
-
- <!-- User Role Function class mapping details -->
- <class name="RoleFunction" table="FN_FUNCTION">
- <id name="code" column="function_cd" />
- <property name="name" column="function_name" />
- </class>
-
- <!-- Menu class mapping details -->
- <class name="Menu" table="FN_MENU">
- <id name="id" column="menu_id">
- <generator class="native">
- <param name="sequence">seq_fn_menu</param>
- </generator>
- </id>
-
- <!-- <property name="menuLevel" column="level-1"/> -->
- <property name="label" column="label"/>
- <property name="parentId" column="parent_id"/>
- <property name="action" column="action"/>
- <property name="functionCd" column="function_cd"/>
- <property name="sortOrder" column="sort_order"/>
- <property name="servlet" column="servlet"/>
- <property name="queryString" column="query_string"/>
- <property name="externalUrl" column="external_url"/>
- <property name="target" column="target"/>
- <property name="menuSetCode" column="menu_set_cd"/>
- <property name="active" column="active_yn" type="yes_no"/>
- <property name="separator" column="separator_yn" type="yes_no"/>
- <property name="imageSrc" column="image_src" />
- </class>
-
- <class name="MenuData" table="FN_MENU">
- <!-- <id name="id" column="menu_id"/> -->
- <id name="id" column="menu_id">
- <generator class="native">
- <param name="sequence">seq_fn_menu</param>
- </generator>
- </id>
- <property name="label" column="label"/>
- <property name="action" column="action"/>
- <property name="functionCd" column="function_cd"/>
- <property name="sortOrder" column="sort_order"/>
- <property name="servlet" column="servlet"/>
- <property name="queryString" column="query_string"/>
- <property name="externalUrl" column="external_url"/>
- <property name="target" column="target"/>
- <property name="active" column="active_yn" type="yes_no"/>
- <property name="separator" column="separator_yn" type="yes_no"/>
- <property name="imageSrc" column="image_src" />
- <property name="menuSetCode" column="menu_set_cd" />
-
- <many-to-one name="parentMenu" column="parent_id" class="MenuData"/>
-
- <set name="childMenus" lazy="false" sort="natural" inverse="true" where="active_yn = 'Y'">
- <key column="parent_id"/>
- <one-to-many class="MenuData"/>
- </set>
- </class>
-
- <!-- Broadcast Message class mapping details -->
- <class name="BroadcastMessage" table="fn_broadcast_message">
- <id name="id" column="message_id">
- <generator class="native">
- <param name="sequence">seq_fn_broadcast_message</param>
- </generator>
- </id>
- <property name="messageText" column="message_text"/>
- <property name="locationId" column="message_location_id"/>
-
- <property name="startDate" column="broadcast_start_date" type="timestamp"/>
- <property name="endDate" column="broadcast_end_date" type="timestamp"/>
-
- <property name="sortOrder" column="sort_order"/>
- <property name="active" column="active_yn" type="yes_no"/>
-
- <property name="siteCd" column="broadcast_site_cd" />
- </class>
-
- <class name="org.openecomp.portalsdk.analytics.model.base.ReportUserRole" table="cr_report_access">
- <composite-id>
- <key-property name="repId" column="rep_id" />
- <key-property name="orderNo" column="order_no" />
- </composite-id>
-
- <property name="roleId" column="role_id"/>
- <property name="userId" column="user_id"/>
- <property name="readOnlyYn" column="read_only_yn"/>
- </class>
-
- <!-- State Lookup class mapping details -->
- <class name="LuState" table="FN_LU_STATE">
- <id name="abbr" column="state_cd" />
- <property name="state" />
- </class>
-
- <!-- Country Lookup class mapping details -->
- <class name="LuCountry" table="FN_LU_COUNTRY">
- <id name="abbr" column="country_cd" />
- <property name="country" />
- <property name="fullName" column="full_name" />
- <property name="webphoneCountryLabel" column="fullwebphone_country_label_name" />
- </class>
-
- <class name="LuTimeZone" table="FN_LU_TIMEZONE">
- <id name="timezoneId" column="timezone_id" />
- <property name="name" column="timezone_name" />
- <property name="value" column="timezone_value" />
- </class>
-
-
- <!-- Lookup (id/value bean) class mapping details -->
- <class name="Lookup">
- <composite-id name="nameValueId" class="org.openecomp.portalsdk.core.domain.support.NameValueId">
- <key-property name="val"/>
- <key-property name="lab" />
- </composite-id>
- </class>
-
- <class name="UrlsAccessible" table="V_URL_ACCESS">
- <composite-id name="urlsAccessibleKey" class="org.openecomp.portalsdk.core.domain.UrlsAccessibleKey">
- <key-property name="url" column="url"/>
- <key-property name="functionCd" column="function_cd"/>
- </composite-id>
- </class>
-
-
- <query name="ParentIdForLabelList">
- select distinct md.parentMenu.id from MenuData as md where md.label = :paramLabel and md.label is not null
- </query>
-
- <query name="IdForLabelList">
- select distinct md.id from MenuData as md where md.label = :paramLabel
- </query>
-
- <query name="parentList">
- select distinct md.id, md.label, md.parentMenu.id from MenuData as md where md.label is not null
- </query>
-
- <query name="functionCDlistOld">
- select distinct functionCd from MenuData
- </query>
-
- <query name="functionCDlist">
- select distinct code from RoleFunction
- </query>
-
- <query name="menuData">
- from MenuData where menuSetCode = :menu_set_cd and parentMenu is null
- </query>
- <query name="restrictedUrls">
- FROM UrlsAccessible A where upper(A.urlsAccessibleKey.url) = upper(:current_url)
- </query>
-
- <query name="getUserNameById">
- select firstName, lastName from User where id = :user_id
- </query>
-
- <query name="getUserEmail">
- select email from User where id = :user_id
- </query>
-
- <query name="getAllUsers">
- select id, firstName, lastName from User where active = true order by lastName, firstName
- </query>
-
- <query name="getRoleNameById">
- select name from Role where id = :role_id
- </query>
-
- <query name="getAllRoles">
- select id, name from Role order by name
- </query>
-
- <query name="getReportSecurityUsers">
- select repId, orderNo, roleId, userId, readOnlyYn from ReportUserRole where repId = :report_id and userId is not null
- </query>
-
- <query name="getReportSecurityRoles">
- select repId, orderNo, roleId, userId, readOnlyYn from ReportUserRole where repId = :report_id and roleId is not null
- </query>
-
-<!-- <query name="insertReportSecurityUsers">
- insert into ReportUserRole (repId, roleId, userId, readOnlyYn) values (:report_id, :role_id, :user_id, :read_only_yn)
- </query> -->
-
-
- <query name="deleteReportSecurityUsers">
- delete from ReportUserRole where repId = :report_id and userId =:user_id
- </query>
-
- <query name="deleteReportSecurityRoles">
- delete from ReportUserRole where repId = :report_id and roleId =:role_id
- </query>
-
- <query name="getUserByProfileId">
- select orgUserId from User where id = :user_id
- </query>
-
- <query name="getUserIdByorgUserId">
- select id from User where orgUserId = :orgUserId
- </query>
-
-</hibernate-mapping>
diff --git a/usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml b/usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml
deleted file mode 100644
index 3d8852cb..00000000
--- a/usecaseui-common/src/main/webapp/WEB-INF/fusion/orm/Workflow.hbm.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!--
- ================================================================================
- eCOMP Portal SDK
- ================================================================================
- Copyright (C) 2017 AT&T Intellectual Property
- ================================================================================
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ================================================================================
- -->
-
-<!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-
-<hibernate-mapping package="org.openecomp.portalsdk.workflow.domain">
-
-
- <!-- WorkflowSchedule mapping details -->
- <class name="WorkflowSchedule" table="fn_schedule_workflows">
- <id name="id" column="id_schedule_workflows">
- <generator class="native">
- </generator>
- </id>
-
- <property name="serverUrl" column="workflow_server_url"/>
- <property name="workflowKey" column="workflow_key"/>
- <property name="arguments" column="workflow_arguments"/>
- <property name="cronDetails" column="startDateTimeCron"/>
- <property name="startDateTime" column="start_date_time"/>
- <property name="endDateTime" column="endDateTime"/>
- <property name="recurrence" column="recurrence"/>
-
- </class>
-
-
-
-</hibernate-mapping>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.js
deleted file mode 100644
index 30610044..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.js
+++ /dev/null
@@ -1,3930 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/* jshint ignore:start */
-var noop = angular.noop;
-var extend = angular.extend;
-var jqLite = angular.element;
-var forEach = angular.forEach;
-var isArray = angular.isArray;
-var isString = angular.isString;
-var isObject = angular.isObject;
-var isUndefined = angular.isUndefined;
-var isDefined = angular.isDefined;
-var isFunction = angular.isFunction;
-var isElement = angular.isElement;
-
-var ELEMENT_NODE = 1;
-var COMMENT_NODE = 8;
-
-var ADD_CLASS_SUFFIX = '-add';
-var REMOVE_CLASS_SUFFIX = '-remove';
-var EVENT_CLASS_PREFIX = 'ng-';
-var ACTIVE_CLASS_SUFFIX = '-active';
-
-var NG_ANIMATE_CLASSNAME = 'ng-animate';
-var NG_ANIMATE_CHILDREN_DATA = '$$ngAnimateChildren';
-
-// Detect proper transitionend/animationend event names.
-var CSS_PREFIX = '', TRANSITION_PROP, TRANSITIONEND_EVENT, ANIMATION_PROP, ANIMATIONEND_EVENT;
-
-// If unprefixed events are not supported but webkit-prefixed are, use the latter.
-// Otherwise, just use W3C names, browsers not supporting them at all will just ignore them.
-// Note: Chrome implements `window.onwebkitanimationend` and doesn't implement `window.onanimationend`
-// but at the same time dispatches the `animationend` event and not `webkitAnimationEnd`.
-// Register both events in case `window.onanimationend` is not supported because of that,
-// do the same for `transitionend` as Safari is likely to exhibit similar behavior.
-// Also, the only modern browser that uses vendor prefixes for transitions/keyframes is webkit
-// therefore there is no reason to test anymore for other vendor prefixes:
-// http://caniuse.com/#search=transition
-if (isUndefined(window.ontransitionend) && isDefined(window.onwebkittransitionend)) {
- CSS_PREFIX = '-webkit-';
- TRANSITION_PROP = 'WebkitTransition';
- TRANSITIONEND_EVENT = 'webkitTransitionEnd transitionend';
-} else {
- TRANSITION_PROP = 'transition';
- TRANSITIONEND_EVENT = 'transitionend';
-}
-
-if (isUndefined(window.onanimationend) && isDefined(window.onwebkitanimationend)) {
- CSS_PREFIX = '-webkit-';
- ANIMATION_PROP = 'WebkitAnimation';
- ANIMATIONEND_EVENT = 'webkitAnimationEnd animationend';
-} else {
- ANIMATION_PROP = 'animation';
- ANIMATIONEND_EVENT = 'animationend';
-}
-
-var DURATION_KEY = 'Duration';
-var PROPERTY_KEY = 'Property';
-var DELAY_KEY = 'Delay';
-var TIMING_KEY = 'TimingFunction';
-var ANIMATION_ITERATION_COUNT_KEY = 'IterationCount';
-var ANIMATION_PLAYSTATE_KEY = 'PlayState';
-var SAFE_FAST_FORWARD_DURATION_VALUE = 9999;
-
-var ANIMATION_DELAY_PROP = ANIMATION_PROP + DELAY_KEY;
-var ANIMATION_DURATION_PROP = ANIMATION_PROP + DURATION_KEY;
-var TRANSITION_DELAY_PROP = TRANSITION_PROP + DELAY_KEY;
-var TRANSITION_DURATION_PROP = TRANSITION_PROP + DURATION_KEY;
-
-var isPromiseLike = function(p) {
- return p && p.then ? true : false;
-};
-
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
- }
- return arg;
-}
-
-function mergeClasses(a,b) {
- if (!a && !b) return '';
- if (!a) return b;
- if (!b) return a;
- if (isArray(a)) a = a.join(' ');
- if (isArray(b)) b = b.join(' ');
- return a + ' ' + b;
-}
-
-function packageStyles(options) {
- var styles = {};
- if (options && (options.to || options.from)) {
- styles.to = options.to;
- styles.from = options.from;
- }
- return styles;
-}
-
-function pendClasses(classes, fix, isPrefix) {
- var className = '';
- classes = isArray(classes)
- ? classes
- : classes && isString(classes) && classes.length
- ? classes.split(/\s+/)
- : [];
- forEach(classes, function(klass, i) {
- if (klass && klass.length > 0) {
- className += (i > 0) ? ' ' : '';
- className += isPrefix ? fix + klass
- : klass + fix;
- }
- });
- return className;
-}
-
-function removeFromArray(arr, val) {
- var index = arr.indexOf(val);
- if (val >= 0) {
- arr.splice(index, 1);
- }
-}
-
-function stripCommentsFromElement(element) {
- if (element instanceof jqLite) {
- switch (element.length) {
- case 0:
- return [];
- break;
-
- case 1:
- // there is no point of stripping anything if the element
- // is the only element within the jqLite wrapper.
- // (it's important that we retain the element instance.)
- if (element[0].nodeType === ELEMENT_NODE) {
- return element;
- }
- break;
-
- default:
- return jqLite(extractElementNode(element));
- break;
- }
- }
-
- if (element.nodeType === ELEMENT_NODE) {
- return jqLite(element);
- }
-}
-
-function extractElementNode(element) {
- if (!element[0]) return element;
- for (var i = 0; i < element.length; i++) {
- var elm = element[i];
- if (elm.nodeType == ELEMENT_NODE) {
- return elm;
- }
- }
-}
-
-function $$addClass($$jqLite, element, className) {
- forEach(element, function(elm) {
- $$jqLite.addClass(elm, className);
- });
-}
-
-function $$removeClass($$jqLite, element, className) {
- forEach(element, function(elm) {
- $$jqLite.removeClass(elm, className);
- });
-}
-
-function applyAnimationClassesFactory($$jqLite) {
- return function(element, options) {
- if (options.addClass) {
- $$addClass($$jqLite, element, options.addClass);
- options.addClass = null;
- }
- if (options.removeClass) {
- $$removeClass($$jqLite, element, options.removeClass);
- options.removeClass = null;
- }
- }
-}
-
-function prepareAnimationOptions(options) {
- options = options || {};
- if (!options.$$prepared) {
- var domOperation = options.domOperation || noop;
- options.domOperation = function() {
- options.$$domOperationFired = true;
- domOperation();
- domOperation = noop;
- };
- options.$$prepared = true;
- }
- return options;
-}
-
-function applyAnimationStyles(element, options) {
- applyAnimationFromStyles(element, options);
- applyAnimationToStyles(element, options);
-}
-
-function applyAnimationFromStyles(element, options) {
- if (options.from) {
- element.css(options.from);
- options.from = null;
- }
-}
-
-function applyAnimationToStyles(element, options) {
- if (options.to) {
- element.css(options.to);
- options.to = null;
- }
-}
-
-function mergeAnimationOptions(element, target, newOptions) {
- var toAdd = (target.addClass || '') + ' ' + (newOptions.addClass || '');
- var toRemove = (target.removeClass || '') + ' ' + (newOptions.removeClass || '');
- var classes = resolveElementClasses(element.attr('class'), toAdd, toRemove);
-
- if (newOptions.preparationClasses) {
- target.preparationClasses = concatWithSpace(newOptions.preparationClasses, target.preparationClasses);
- delete newOptions.preparationClasses;
- }
-
- // noop is basically when there is no callback; otherwise something has been set
- var realDomOperation = target.domOperation !== noop ? target.domOperation : null;
-
- extend(target, newOptions);
-
- // TODO(matsko or sreeramu): proper fix is to maintain all animation callback in array and call at last,but now only leave has the callback so no issue with this.
- if (realDomOperation) {
- target.domOperation = realDomOperation;
- }
-
- if (classes.addClass) {
- target.addClass = classes.addClass;
- } else {
- target.addClass = null;
- }
-
- if (classes.removeClass) {
- target.removeClass = classes.removeClass;
- } else {
- target.removeClass = null;
- }
-
- return target;
-}
-
-function resolveElementClasses(existing, toAdd, toRemove) {
- var ADD_CLASS = 1;
- var REMOVE_CLASS = -1;
-
- var flags = {};
- existing = splitClassesToLookup(existing);
-
- toAdd = splitClassesToLookup(toAdd);
- forEach(toAdd, function(value, key) {
- flags[key] = ADD_CLASS;
- });
-
- toRemove = splitClassesToLookup(toRemove);
- forEach(toRemove, function(value, key) {
- flags[key] = flags[key] === ADD_CLASS ? null : REMOVE_CLASS;
- });
-
- var classes = {
- addClass: '',
- removeClass: ''
- };
-
- forEach(flags, function(val, klass) {
- var prop, allow;
- if (val === ADD_CLASS) {
- prop = 'addClass';
- allow = !existing[klass];
- } else if (val === REMOVE_CLASS) {
- prop = 'removeClass';
- allow = existing[klass];
- }
- if (allow) {
- if (classes[prop].length) {
- classes[prop] += ' ';
- }
- classes[prop] += klass;
- }
- });
-
- function splitClassesToLookup(classes) {
- if (isString(classes)) {
- classes = classes.split(' ');
- }
-
- var obj = {};
- forEach(classes, function(klass) {
- // sometimes the split leaves empty string values
- // incase extra spaces were applied to the options
- if (klass.length) {
- obj[klass] = true;
- }
- });
- return obj;
- }
-
- return classes;
-}
-
-function getDomNode(element) {
- return (element instanceof angular.element) ? element[0] : element;
-}
-
-function applyGeneratedPreparationClasses(element, event, options) {
- var classes = '';
- if (event) {
- classes = pendClasses(event, EVENT_CLASS_PREFIX, true);
- }
- if (options.addClass) {
- classes = concatWithSpace(classes, pendClasses(options.addClass, ADD_CLASS_SUFFIX));
- }
- if (options.removeClass) {
- classes = concatWithSpace(classes, pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX));
- }
- if (classes.length) {
- options.preparationClasses = classes;
- element.addClass(classes);
- }
-}
-
-function clearGeneratedClasses(element, options) {
- if (options.preparationClasses) {
- element.removeClass(options.preparationClasses);
- options.preparationClasses = null;
- }
- if (options.activeClasses) {
- element.removeClass(options.activeClasses);
- options.activeClasses = null;
- }
-}
-
-function blockTransitions(node, duration) {
- // we use a negative delay value since it performs blocking
- // yet it doesn't kill any existing transitions running on the
- // same element which makes this safe for class-based animations
- var value = duration ? '-' + duration + 's' : '';
- applyInlineStyle(node, [TRANSITION_DELAY_PROP, value]);
- return [TRANSITION_DELAY_PROP, value];
-}
-
-function blockKeyframeAnimations(node, applyBlock) {
- var value = applyBlock ? 'paused' : '';
- var key = ANIMATION_PROP + ANIMATION_PLAYSTATE_KEY;
- applyInlineStyle(node, [key, value]);
- return [key, value];
-}
-
-function applyInlineStyle(node, styleTuple) {
- var prop = styleTuple[0];
- var value = styleTuple[1];
- node.style[prop] = value;
-}
-
-function concatWithSpace(a,b) {
- if (!a) return b;
- if (!b) return a;
- return a + ' ' + b;
-}
-
-var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {
- var queue, cancelFn;
-
- function scheduler(tasks) {
- // we make a copy since RAFScheduler mutates the state
- // of the passed in array variable and this would be difficult
- // to track down on the outside code
- queue = queue.concat(tasks);
- nextTick();
- }
-
- queue = scheduler.queue = [];
-
- /* waitUntilQuiet does two things:
- * 1. It will run the FINAL `fn` value only when an uncancelled RAF has passed through
- * 2. It will delay the next wave of tasks from running until the quiet `fn` has run.
- *
- * The motivation here is that animation code can request more time from the scheduler
- * before the next wave runs. This allows for certain DOM properties such as classes to
- * be resolved in time for the next animation to run.
- */
- scheduler.waitUntilQuiet = function(fn) {
- if (cancelFn) cancelFn();
-
- cancelFn = $$rAF(function() {
- cancelFn = null;
- fn();
- nextTick();
- });
- };
-
- return scheduler;
-
- function nextTick() {
- if (!queue.length) return;
-
- var items = queue.shift();
- for (var i = 0; i < items.length; i++) {
- items[i]();
- }
-
- if (!cancelFn) {
- $$rAF(function() {
- if (!cancelFn) nextTick();
- });
- }
- }
-}];
-
-var $$AnimateChildrenDirective = [function() {
- return function(scope, element, attrs) {
- var val = attrs.ngAnimateChildren;
- if (angular.isString(val) && val.length === 0) { //empty attribute
- element.data(NG_ANIMATE_CHILDREN_DATA, true);
- } else {
- attrs.$observe('ngAnimateChildren', function(value) {
- value = value === 'on' || value === 'true';
- element.data(NG_ANIMATE_CHILDREN_DATA, value);
- });
- }
- };
-}];
-
-var ANIMATE_TIMER_KEY = '$$animateCss';
-
-/**
- * @ngdoc service
- * @name $animateCss
- * @kind object
- *
- * @description
- * The `$animateCss` service is a useful utility to trigger customized CSS-based transitions/keyframes
- * from a JavaScript-based animation or directly from a directive. The purpose of `$animateCss` is NOT
- * to side-step how `$animate` and ngAnimate work, but the goal is to allow pre-existing animations or
- * directives to create more complex animations that can be purely driven using CSS code.
- *
- * Note that only browsers that support CSS transitions and/or keyframe animations are capable of
- * rendering animations triggered via `$animateCss` (bad news for IE9 and lower).
- *
- * ## Usage
- * Once again, `$animateCss` is designed to be used inside of a registered JavaScript animation that
- * is powered by ngAnimate. It is possible to use `$animateCss` directly inside of a directive, however,
- * any automatic control over cancelling animations and/or preventing animations from being run on
- * child elements will not be handled by Angular. For this to work as expected, please use `$animate` to
- * trigger the animation and then setup a JavaScript animation that injects `$animateCss` to trigger
- * the CSS animation.
- *
- * The example below shows how we can create a folding animation on an element using `ng-if`:
- *
- * ```html
- * <!-- notice the `fold-animation` CSS class -->
- * <div ng-if="onOff" class="fold-animation">
- * This element will go BOOM
- * </div>
- * <button ng-click="onOff=true">Fold In</button>
- * ```
- *
- * Now we create the **JavaScript animation** that will trigger the CSS transition:
- *
- * ```js
- * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {
- * return {
- * enter: function(element, doneFn) {
- * var height = element[0].offsetHeight;
- * return $animateCss(element, {
- * from: { height:'0px' },
- * to: { height:height + 'px' },
- * duration: 1 // one second
- * });
- * }
- * }
- * }]);
- * ```
- *
- * ## More Advanced Uses
- *
- * `$animateCss` is the underlying code that ngAnimate uses to power **CSS-based animations** behind the scenes. Therefore CSS hooks
- * like `.ng-EVENT`, `.ng-EVENT-active`, `.ng-EVENT-stagger` are all features that can be triggered using `$animateCss` via JavaScript code.
- *
- * This also means that just about any combination of adding classes, removing classes, setting styles, dynamically setting a keyframe animation,
- * applying a hardcoded duration or delay value, changing the animation easing or applying a stagger animation are all options that work with
- * `$animateCss`. The service itself is smart enough to figure out the combination of options and examine the element styling properties in order
- * to provide a working animation that will run in CSS.
- *
- * The example below showcases a more advanced version of the `.fold-animation` from the example above:
- *
- * ```js
- * ngModule.animation('.fold-animation', ['$animateCss', function($animateCss) {
- * return {
- * enter: function(element, doneFn) {
- * var height = element[0].offsetHeight;
- * return $animateCss(element, {
- * addClass: 'red large-text pulse-twice',
- * easing: 'ease-out',
- * from: { height:'0px' },
- * to: { height:height + 'px' },
- * duration: 1 // one second
- * });
- * }
- * }
- * }]);
- * ```
- *
- * Since we're adding/removing CSS classes then the CSS transition will also pick those up:
- *
- * ```css
- * /&#42; since a hardcoded duration value of 1 was provided in the JavaScript animation code,
- * the CSS classes below will be transitioned despite them being defined as regular CSS classes &#42;/
- * .red { background:red; }
- * .large-text { font-size:20px; }
- *
- * /&#42; we can also use a keyframe animation and $animateCss will make it work alongside the transition &#42;/
- * .pulse-twice {
- * animation: 0.5s pulse linear 2;
- * -webkit-animation: 0.5s pulse linear 2;
- * }
- *
- * @keyframes pulse {
- * from { transform: scale(0.5); }
- * to { transform: scale(1.5); }
- * }
- *
- * @-webkit-keyframes pulse {
- * from { -webkit-transform: scale(0.5); }
- * to { -webkit-transform: scale(1.5); }
- * }
- * ```
- *
- * Given this complex combination of CSS classes, styles and options, `$animateCss` will figure everything out and make the animation happen.
- *
- * ## How the Options are handled
- *
- * `$animateCss` is very versatile and intelligent when it comes to figuring out what configurations to apply to the element to ensure the animation
- * works with the options provided. Say for example we were adding a class that contained a keyframe value and we wanted to also animate some inline
- * styles using the `from` and `to` properties.
- *
- * ```js
- * var animator = $animateCss(element, {
- * from: { background:'red' },
- * to: { background:'blue' }
- * });
- * animator.start();
- * ```
- *
- * ```css
- * .rotating-animation {
- * animation:0.5s rotate linear;
- * -webkit-animation:0.5s rotate linear;
- * }
- *
- * @keyframes rotate {
- * from { transform: rotate(0deg); }
- * to { transform: rotate(360deg); }
- * }
- *
- * @-webkit-keyframes rotate {
- * from { -webkit-transform: rotate(0deg); }
- * to { -webkit-transform: rotate(360deg); }
- * }
- * ```
- *
- * The missing pieces here are that we do not have a transition set (within the CSS code nor within the `$animateCss` options) and the duration of the animation is
- * going to be detected from what the keyframe styles on the CSS class are. In this event, `$animateCss` will automatically create an inline transition
- * style matching the duration detected from the keyframe style (which is present in the CSS class that is being added) and then prepare both the transition
- * and keyframe animations to run in parallel on the element. Then when the animation is underway the provided `from` and `to` CSS styles will be applied
- * and spread across the transition and keyframe animation.
- *
- * ## What is returned
- *
- * `$animateCss` works in two stages: a preparation phase and an animation phase. Therefore when `$animateCss` is first called it will NOT actually
- * start the animation. All that is going on here is that the element is being prepared for the animation (which means that the generated CSS classes are
- * added and removed on the element). Once `$animateCss` is called it will return an object with the following properties:
- *
- * ```js
- * var animator = $animateCss(element, { ... });
- * ```
- *
- * Now what do the contents of our `animator` variable look like:
- *
- * ```js
- * {
- * // starts the animation
- * start: Function,
- *
- * // ends (aborts) the animation
- * end: Function
- * }
- * ```
- *
- * To actually start the animation we need to run `animation.start()` which will then return a promise that we can hook into to detect when the animation ends.
- * If we choose not to run the animation then we MUST run `animation.end()` to perform a cleanup on the element (since some CSS classes and stlyes may have been
- * applied to the element during the preparation phase). Note that all other properties such as duration, delay, transitions and keyframes are just properties
- * and that changing them will not reconfigure the parameters of the animation.
- *
- * ### runner.done() vs runner.then()
- * It is documented that `animation.start()` will return a promise object and this is true, however, there is also an additional method available on the
- * runner called `.done(callbackFn)`. The done method works the same as `.finally(callbackFn)`, however, it does **not trigger a digest to occur**.
- * Therefore, for performance reasons, it's always best to use `runner.done(callback)` instead of `runner.then()`, `runner.catch()` or `runner.finally()`
- * unless you really need a digest to kick off afterwards.
- *
- * Keep in mind that, to make this easier, ngAnimate has tweaked the JS animations API to recognize when a runner instance is returned from $animateCss
- * (so there is no need to call `runner.done(doneFn)` inside of your JavaScript animation code).
- * Check the {@link ngAnimate.$animateCss#usage animation code above} to see how this works.
- *
- * @param {DOMElement} element the element that will be animated
- * @param {object} options the animation-related options that will be applied during the animation
- *
- * * `event` - The DOM event (e.g. enter, leave, move). When used, a generated CSS class of `ng-EVENT` and `ng-EVENT-active` will be applied
- * to the element during the animation. Multiple events can be provided when spaces are used as a separator. (Note that this will not perform any DOM operation.)
- * * `structural` - Indicates that the `ng-` prefix will be added to the event class. Setting to `false` or omitting will turn `ng-EVENT` and
- * `ng-EVENT-active` in `EVENT` and `EVENT-active`. Unused if `event` is omitted.
- * * `easing` - The CSS easing value that will be applied to the transition or keyframe animation (or both).
- * * `transitionStyle` - The raw CSS transition style that will be used (e.g. `1s linear all`).
- * * `keyframeStyle` - The raw CSS keyframe animation style that will be used (e.g. `1s my_animation linear`).
- * * `from` - The starting CSS styles (a key/value object) that will be applied at the start of the animation.
- * * `to` - The ending CSS styles (a key/value object) that will be applied across the animation via a CSS transition.
- * * `addClass` - A space separated list of CSS classes that will be added to the element and spread across the animation.
- * * `removeClass` - A space separated list of CSS classes that will be removed from the element and spread across the animation.
- * * `duration` - A number value representing the total duration of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `0`
- * is provided then the animation will be skipped entirely.
- * * `delay` - A number value representing the total delay of the transition and/or keyframe (note that a value of 1 is 1000ms). If a value of `true` is
- * used then whatever delay value is detected from the CSS classes will be mirrored on the elements styles (e.g. by setting delay true then the style value
- * of the element will be `transition-delay: DETECTED_VALUE`). Using `true` is useful when you want the CSS classes and inline styles to all share the same
- * CSS delay value.
- * * `stagger` - A numeric time value representing the delay between successively animated elements
- * ({@link ngAnimate#css-staggering-animations Click here to learn how CSS-based staggering works in ngAnimate.})
- * * `staggerIndex` - The numeric index representing the stagger item (e.g. a value of 5 is equal to the sixth item in the stagger; therefore when a
- * * `stagger` option value of `0.1` is used then there will be a stagger delay of `600ms`)
- * * `applyClassesEarly` - Whether or not the classes being added or removed will be used when detecting the animation. This is set by `$animate` when enter/leave/move animations are fired to ensure that the CSS classes are resolved in time. (Note that this will prevent any transitions from occuring on the classes being added and removed.)
- * * `cleanupStyles` - Whether or not the provided `from` and `to` styles will be removed once
- * the animation is closed. This is useful for when the styles are used purely for the sake of
- * the animation and do not have a lasting visual effect on the element (e.g. a colapse and open animation).
- * By default this value is set to `false`.
- *
- * @return {object} an object with start and end methods and details about the animation.
- *
- * * `start` - The method to start the animation. This will return a `Promise` when called.
- * * `end` - This method will cancel the animation and remove all applied CSS classes and styles.
- */
-var ONE_SECOND = 1000;
-var BASE_TEN = 10;
-
-var ELAPSED_TIME_MAX_DECIMAL_PLACES = 3;
-var CLOSING_TIME_BUFFER = 1.5;
-
-var DETECT_CSS_PROPERTIES = {
- transitionDuration: TRANSITION_DURATION_PROP,
- transitionDelay: TRANSITION_DELAY_PROP,
- transitionProperty: TRANSITION_PROP + PROPERTY_KEY,
- animationDuration: ANIMATION_DURATION_PROP,
- animationDelay: ANIMATION_DELAY_PROP,
- animationIterationCount: ANIMATION_PROP + ANIMATION_ITERATION_COUNT_KEY
-};
-
-var DETECT_STAGGER_CSS_PROPERTIES = {
- transitionDuration: TRANSITION_DURATION_PROP,
- transitionDelay: TRANSITION_DELAY_PROP,
- animationDuration: ANIMATION_DURATION_PROP,
- animationDelay: ANIMATION_DELAY_PROP
-};
-
-function getCssKeyframeDurationStyle(duration) {
- return [ANIMATION_DURATION_PROP, duration + 's'];
-}
-
-function getCssDelayStyle(delay, isKeyframeAnimation) {
- var prop = isKeyframeAnimation ? ANIMATION_DELAY_PROP : TRANSITION_DELAY_PROP;
- return [prop, delay + 's'];
-}
-
-function computeCssStyles($window, element, properties) {
- var styles = Object.create(null);
- var detectedStyles = $window.getComputedStyle(element) || {};
- forEach(properties, function(formalStyleName, actualStyleName) {
- var val = detectedStyles[formalStyleName];
- if (val) {
- var c = val.charAt(0);
-
- // only numerical-based values have a negative sign or digit as the first value
- if (c === '-' || c === '+' || c >= 0) {
- val = parseMaxTime(val);
- }
-
- // by setting this to null in the event that the delay is not set or is set directly as 0
- // then we can still allow for zegative values to be used later on and not mistake this
- // value for being greater than any other negative value.
- if (val === 0) {
- val = null;
- }
- styles[actualStyleName] = val;
- }
- });
-
- return styles;
-}
-
-function parseMaxTime(str) {
- var maxValue = 0;
- var values = str.split(/\s*,\s*/);
- forEach(values, function(value) {
- // it's always safe to consider only second values and omit `ms` values since
- // getComputedStyle will always handle the conversion for us
- if (value.charAt(value.length - 1) == 's') {
- value = value.substring(0, value.length - 1);
- }
- value = parseFloat(value) || 0;
- maxValue = maxValue ? Math.max(value, maxValue) : value;
- });
- return maxValue;
-}
-
-function truthyTimingValue(val) {
- return val === 0 || val != null;
-}
-
-function getCssTransitionDurationStyle(duration, applyOnlyDuration) {
- var style = TRANSITION_PROP;
- var value = duration + 's';
- if (applyOnlyDuration) {
- style += DURATION_KEY;
- } else {
- value += ' linear all';
- }
- return [style, value];
-}
-
-function createLocalCacheLookup() {
- var cache = Object.create(null);
- return {
- flush: function() {
- cache = Object.create(null);
- },
-
- count: function(key) {
- var entry = cache[key];
- return entry ? entry.total : 0;
- },
-
- get: function(key) {
- var entry = cache[key];
- return entry && entry.value;
- },
-
- put: function(key, value) {
- if (!cache[key]) {
- cache[key] = { total: 1, value: value };
- } else {
- cache[key].total++;
- }
- }
- };
-}
-
-// we do not reassign an already present style value since
-// if we detect the style property value again we may be
-// detecting styles that were added via the `from` styles.
-// We make use of `isDefined` here since an empty string
-// or null value (which is what getPropertyValue will return
-// for a non-existing style) will still be marked as a valid
-// value for the style (a falsy value implies that the style
-// is to be removed at the end of the animation). If we had a simple
-// "OR" statement then it would not be enough to catch that.
-function registerRestorableStyles(backup, node, properties) {
- forEach(properties, function(prop) {
- backup[prop] = isDefined(backup[prop])
- ? backup[prop]
- : node.style.getPropertyValue(prop);
- });
-}
-
-var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
- var gcsLookup = createLocalCacheLookup();
- var gcsStaggerLookup = createLocalCacheLookup();
-
- this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout',
- '$$forceReflow', '$sniffer', '$$rAFScheduler', '$animate',
- function($window, $$jqLite, $$AnimateRunner, $timeout,
- $$forceReflow, $sniffer, $$rAFScheduler, $animate) {
-
- var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
-
- var parentCounter = 0;
- function gcsHashFn(node, extraClasses) {
- var KEY = "$$ngAnimateParentKey";
- var parentNode = node.parentNode;
- var parentID = parentNode[KEY] || (parentNode[KEY] = ++parentCounter);
- return parentID + '-' + node.getAttribute('class') + '-' + extraClasses;
- }
-
- function computeCachedCssStyles(node, className, cacheKey, properties) {
- var timings = gcsLookup.get(cacheKey);
-
- if (!timings) {
- timings = computeCssStyles($window, node, properties);
- if (timings.animationIterationCount === 'infinite') {
- timings.animationIterationCount = 1;
- }
- }
-
- // we keep putting this in multiple times even though the value and the cacheKey are the same
- // because we're keeping an interal tally of how many duplicate animations are detected.
- gcsLookup.put(cacheKey, timings);
- return timings;
- }
-
- function computeCachedCssStaggerStyles(node, className, cacheKey, properties) {
- var stagger;
-
- // if we have one or more existing matches of matching elements
- // containing the same parent + CSS styles (which is how cacheKey works)
- // then staggering is possible
- if (gcsLookup.count(cacheKey) > 0) {
- stagger = gcsStaggerLookup.get(cacheKey);
-
- if (!stagger) {
- var staggerClassName = pendClasses(className, '-stagger');
-
- $$jqLite.addClass(node, staggerClassName);
-
- stagger = computeCssStyles($window, node, properties);
-
- // force the conversion of a null value to zero incase not set
- stagger.animationDuration = Math.max(stagger.animationDuration, 0);
- stagger.transitionDuration = Math.max(stagger.transitionDuration, 0);
-
- $$jqLite.removeClass(node, staggerClassName);
-
- gcsStaggerLookup.put(cacheKey, stagger);
- }
- }
-
- return stagger || {};
- }
-
- var cancelLastRAFRequest;
- var rafWaitQueue = [];
- function waitUntilQuiet(callback) {
- rafWaitQueue.push(callback);
- $$rAFScheduler.waitUntilQuiet(function() {
- gcsLookup.flush();
- gcsStaggerLookup.flush();
-
- // DO NOT REMOVE THIS LINE OR REFACTOR OUT THE `pageWidth` variable.
- // PLEASE EXAMINE THE `$$forceReflow` service to understand why.
- var pageWidth = $$forceReflow();
-
- // we use a for loop to ensure that if the queue is changed
- // during this looping then it will consider new requests
- for (var i = 0; i < rafWaitQueue.length; i++) {
- rafWaitQueue[i](pageWidth);
- }
- rafWaitQueue.length = 0;
- });
- }
-
- function computeTimings(node, className, cacheKey) {
- var timings = computeCachedCssStyles(node, className, cacheKey, DETECT_CSS_PROPERTIES);
- var aD = timings.animationDelay;
- var tD = timings.transitionDelay;
- timings.maxDelay = aD && tD
- ? Math.max(aD, tD)
- : (aD || tD);
- timings.maxDuration = Math.max(
- timings.animationDuration * timings.animationIterationCount,
- timings.transitionDuration);
-
- return timings;
- }
-
- return function init(element, options) {
- var restoreStyles = {};
- var node = getDomNode(element);
- if (!node
- || !node.parentNode
- || !$animate.enabled()) {
- return closeAndReturnNoopAnimator();
- }
-
- options = prepareAnimationOptions(options);
-
- var temporaryStyles = [];
- var classes = element.attr('class');
- var styles = packageStyles(options);
- var animationClosed;
- var animationPaused;
- var animationCompleted;
- var runner;
- var runnerHost;
- var maxDelay;
- var maxDelayTime;
- var maxDuration;
- var maxDurationTime;
-
- if (options.duration === 0 || (!$sniffer.animations && !$sniffer.transitions)) {
- return closeAndReturnNoopAnimator();
- }
-
- var method = options.event && isArray(options.event)
- ? options.event.join(' ')
- : options.event;
-
- var isStructural = method && options.structural;
- var structuralClassName = '';
- var addRemoveClassName = '';
-
- if (isStructural) {
- structuralClassName = pendClasses(method, EVENT_CLASS_PREFIX, true);
- } else if (method) {
- structuralClassName = method;
- }
-
- if (options.addClass) {
- addRemoveClassName += pendClasses(options.addClass, ADD_CLASS_SUFFIX);
- }
-
- if (options.removeClass) {
- if (addRemoveClassName.length) {
- addRemoveClassName += ' ';
- }
- addRemoveClassName += pendClasses(options.removeClass, REMOVE_CLASS_SUFFIX);
- }
-
- // there may be a situation where a structural animation is combined together
- // with CSS classes that need to resolve before the animation is computed.
- // However this means that there is no explicit CSS code to block the animation
- // from happening (by setting 0s none in the class name). If this is the case
- // we need to apply the classes before the first rAF so we know to continue if
- // there actually is a detected transition or keyframe animation
- if (options.applyClassesEarly && addRemoveClassName.length) {
- applyAnimationClasses(element, options);
- }
-
- var preparationClasses = [structuralClassName, addRemoveClassName].join(' ').trim();
- var fullClassName = classes + ' ' + preparationClasses;
- var activeClasses = pendClasses(preparationClasses, ACTIVE_CLASS_SUFFIX);
- var hasToStyles = styles.to && Object.keys(styles.to).length > 0;
- var containsKeyframeAnimation = (options.keyframeStyle || '').length > 0;
-
- // there is no way we can trigger an animation if no styles and
- // no classes are being applied which would then trigger a transition,
- // unless there a is raw keyframe value that is applied to the element.
- if (!containsKeyframeAnimation
- && !hasToStyles
- && !preparationClasses) {
- return closeAndReturnNoopAnimator();
- }
-
- var cacheKey, stagger;
- if (options.stagger > 0) {
- var staggerVal = parseFloat(options.stagger);
- stagger = {
- transitionDelay: staggerVal,
- animationDelay: staggerVal,
- transitionDuration: 0,
- animationDuration: 0
- };
- } else {
- cacheKey = gcsHashFn(node, fullClassName);
- stagger = computeCachedCssStaggerStyles(node, preparationClasses, cacheKey, DETECT_STAGGER_CSS_PROPERTIES);
- }
-
- if (!options.$$skipPreparationClasses) {
- $$jqLite.addClass(element, preparationClasses);
- }
-
- var applyOnlyDuration;
-
- if (options.transitionStyle) {
- var transitionStyle = [TRANSITION_PROP, options.transitionStyle];
- applyInlineStyle(node, transitionStyle);
- temporaryStyles.push(transitionStyle);
- }
-
- if (options.duration >= 0) {
- applyOnlyDuration = node.style[TRANSITION_PROP].length > 0;
- var durationStyle = getCssTransitionDurationStyle(options.duration, applyOnlyDuration);
-
- // we set the duration so that it will be picked up by getComputedStyle later
- applyInlineStyle(node, durationStyle);
- temporaryStyles.push(durationStyle);
- }
-
- if (options.keyframeStyle) {
- var keyframeStyle = [ANIMATION_PROP, options.keyframeStyle];
- applyInlineStyle(node, keyframeStyle);
- temporaryStyles.push(keyframeStyle);
- }
-
- var itemIndex = stagger
- ? options.staggerIndex >= 0
- ? options.staggerIndex
- : gcsLookup.count(cacheKey)
- : 0;
-
- var isFirst = itemIndex === 0;
-
- // this is a pre-emptive way of forcing the setup classes to be added and applied INSTANTLY
- // without causing any combination of transitions to kick in. By adding a negative delay value
- // it forces the setup class' transition to end immediately. We later then remove the negative
- // transition delay to allow for the transition to naturally do it's thing. The beauty here is
- // that if there is no transition defined then nothing will happen and this will also allow
- // other transitions to be stacked on top of each other without any chopping them out.
- if (isFirst && !options.skipBlocking) {
- blockTransitions(node, SAFE_FAST_FORWARD_DURATION_VALUE);
- }
-
- var timings = computeTimings(node, fullClassName, cacheKey);
- var relativeDelay = timings.maxDelay;
- maxDelay = Math.max(relativeDelay, 0);
- maxDuration = timings.maxDuration;
-
- var flags = {};
- flags.hasTransitions = timings.transitionDuration > 0;
- flags.hasAnimations = timings.animationDuration > 0;
- flags.hasTransitionAll = flags.hasTransitions && timings.transitionProperty == 'all';
- flags.applyTransitionDuration = hasToStyles && (
- (flags.hasTransitions && !flags.hasTransitionAll)
- || (flags.hasAnimations && !flags.hasTransitions));
- flags.applyAnimationDuration = options.duration && flags.hasAnimations;
- flags.applyTransitionDelay = truthyTimingValue(options.delay) && (flags.applyTransitionDuration || flags.hasTransitions);
- flags.applyAnimationDelay = truthyTimingValue(options.delay) && flags.hasAnimations;
- flags.recalculateTimingStyles = addRemoveClassName.length > 0;
-
- if (flags.applyTransitionDuration || flags.applyAnimationDuration) {
- maxDuration = options.duration ? parseFloat(options.duration) : maxDuration;
-
- if (flags.applyTransitionDuration) {
- flags.hasTransitions = true;
- timings.transitionDuration = maxDuration;
- applyOnlyDuration = node.style[TRANSITION_PROP + PROPERTY_KEY].length > 0;
- temporaryStyles.push(getCssTransitionDurationStyle(maxDuration, applyOnlyDuration));
- }
-
- if (flags.applyAnimationDuration) {
- flags.hasAnimations = true;
- timings.animationDuration = maxDuration;
- temporaryStyles.push(getCssKeyframeDurationStyle(maxDuration));
- }
- }
-
- if (maxDuration === 0 && !flags.recalculateTimingStyles) {
- return closeAndReturnNoopAnimator();
- }
-
- if (options.delay != null) {
- var delayStyle = parseFloat(options.delay);
-
- if (flags.applyTransitionDelay) {
- temporaryStyles.push(getCssDelayStyle(delayStyle));
- }
-
- if (flags.applyAnimationDelay) {
- temporaryStyles.push(getCssDelayStyle(delayStyle, true));
- }
- }
-
- // we need to recalculate the delay value since we used a pre-emptive negative
- // delay value and the delay value is required for the final event checking. This
- // property will ensure that this will happen after the RAF phase has passed.
- if (options.duration == null && timings.transitionDuration > 0) {
- flags.recalculateTimingStyles = flags.recalculateTimingStyles || isFirst;
- }
-
- maxDelayTime = maxDelay * ONE_SECOND;
- maxDurationTime = maxDuration * ONE_SECOND;
- if (!options.skipBlocking) {
- flags.blockTransition = timings.transitionDuration > 0;
- flags.blockKeyframeAnimation = timings.animationDuration > 0 &&
- stagger.animationDelay > 0 &&
- stagger.animationDuration === 0;
- }
-
- if (options.from) {
- if (options.cleanupStyles) {
- registerRestorableStyles(restoreStyles, node, Object.keys(options.from));
- }
- applyAnimationFromStyles(element, options);
- }
-
- if (flags.blockTransition || flags.blockKeyframeAnimation) {
- applyBlocking(maxDuration);
- } else if (!options.skipBlocking) {
- blockTransitions(node, false);
- }
-
- // TODO(matsko): for 1.5 change this code to have an animator object for better debugging
- return {
- $$willAnimate: true,
- end: endFn,
- start: function() {
- if (animationClosed) return;
-
- runnerHost = {
- end: endFn,
- cancel: cancelFn,
- resume: null, //this will be set during the start() phase
- pause: null
- };
-
- runner = new $$AnimateRunner(runnerHost);
-
- waitUntilQuiet(start);
-
- // we don't have access to pause/resume the animation
- // since it hasn't run yet. AnimateRunner will therefore
- // set noop functions for resume and pause and they will
- // later be overridden once the animation is triggered
- return runner;
- }
- };
-
- function endFn() {
- close();
- }
-
- function cancelFn() {
- close(true);
- }
-
- function close(rejected) { // jshint ignore:line
- // if the promise has been called already then we shouldn't close
- // the animation again
- if (animationClosed || (animationCompleted && animationPaused)) return;
- animationClosed = true;
- animationPaused = false;
-
- if (!options.$$skipPreparationClasses) {
- $$jqLite.removeClass(element, preparationClasses);
- }
- $$jqLite.removeClass(element, activeClasses);
-
- blockKeyframeAnimations(node, false);
- blockTransitions(node, false);
-
- forEach(temporaryStyles, function(entry) {
- // There is only one way to remove inline style properties entirely from elements.
- // By using `removeProperty` this works, but we need to convert camel-cased CSS
- // styles down to hyphenated values.
- node.style[entry[0]] = '';
- });
-
- applyAnimationClasses(element, options);
- applyAnimationStyles(element, options);
-
- if (Object.keys(restoreStyles).length) {
- forEach(restoreStyles, function(value, prop) {
- value ? node.style.setProperty(prop, value)
- : node.style.removeProperty(prop);
- });
- }
-
- // the reason why we have this option is to allow a synchronous closing callback
- // that is fired as SOON as the animation ends (when the CSS is removed) or if
- // the animation never takes off at all. A good example is a leave animation since
- // the element must be removed just after the animation is over or else the element
- // will appear on screen for one animation frame causing an overbearing flicker.
- if (options.onDone) {
- options.onDone();
- }
-
- // if the preparation function fails then the promise is not setup
- if (runner) {
- runner.complete(!rejected);
- }
- }
-
- function applyBlocking(duration) {
- if (flags.blockTransition) {
- blockTransitions(node, duration);
- }
-
- if (flags.blockKeyframeAnimation) {
- blockKeyframeAnimations(node, !!duration);
- }
- }
-
- function closeAndReturnNoopAnimator() {
- runner = new $$AnimateRunner({
- end: endFn,
- cancel: cancelFn
- });
-
- // should flush the cache animation
- waitUntilQuiet(noop);
- close();
-
- return {
- $$willAnimate: false,
- start: function() {
- return runner;
- },
- end: endFn
- };
- }
-
- function start() {
- if (animationClosed) return;
- if (!node.parentNode) {
- close();
- return;
- }
-
- var startTime, events = [];
-
- // even though we only pause keyframe animations here the pause flag
- // will still happen when transitions are used. Only the transition will
- // not be paused since that is not possible. If the animation ends when
- // paused then it will not complete until unpaused or cancelled.
- var playPause = function(playAnimation) {
- if (!animationCompleted) {
- animationPaused = !playAnimation;
- if (timings.animationDuration) {
- var value = blockKeyframeAnimations(node, animationPaused);
- animationPaused
- ? temporaryStyles.push(value)
- : removeFromArray(temporaryStyles, value);
- }
- } else if (animationPaused && playAnimation) {
- animationPaused = false;
- close();
- }
- };
-
- // checking the stagger duration prevents an accidently cascade of the CSS delay style
- // being inherited from the parent. If the transition duration is zero then we can safely
- // rely that the delay value is an intential stagger delay style.
- var maxStagger = itemIndex > 0
- && ((timings.transitionDuration && stagger.transitionDuration === 0) ||
- (timings.animationDuration && stagger.animationDuration === 0))
- && Math.max(stagger.animationDelay, stagger.transitionDelay);
- if (maxStagger) {
- $timeout(triggerAnimationStart,
- Math.floor(maxStagger * itemIndex * ONE_SECOND),
- false);
- } else {
- triggerAnimationStart();
- }
-
- // this will decorate the existing promise runner with pause/resume methods
- runnerHost.resume = function() {
- playPause(true);
- };
-
- runnerHost.pause = function() {
- playPause(false);
- };
-
- function triggerAnimationStart() {
- // just incase a stagger animation kicks in when the animation
- // itself was cancelled entirely
- if (animationClosed) return;
-
- applyBlocking(false);
-
- forEach(temporaryStyles, function(entry) {
- var key = entry[0];
- var value = entry[1];
- node.style[key] = value;
- });
-
- applyAnimationClasses(element, options);
- $$jqLite.addClass(element, activeClasses);
-
- if (flags.recalculateTimingStyles) {
- fullClassName = node.className + ' ' + preparationClasses;
- cacheKey = gcsHashFn(node, fullClassName);
-
- timings = computeTimings(node, fullClassName, cacheKey);
- relativeDelay = timings.maxDelay;
- maxDelay = Math.max(relativeDelay, 0);
- maxDuration = timings.maxDuration;
-
- if (maxDuration === 0) {
- close();
- return;
- }
-
- flags.hasTransitions = timings.transitionDuration > 0;
- flags.hasAnimations = timings.animationDuration > 0;
- }
-
- if (flags.applyAnimationDelay) {
- relativeDelay = typeof options.delay !== "boolean" && truthyTimingValue(options.delay)
- ? parseFloat(options.delay)
- : relativeDelay;
-
- maxDelay = Math.max(relativeDelay, 0);
- timings.animationDelay = relativeDelay;
- delayStyle = getCssDelayStyle(relativeDelay, true);
- temporaryStyles.push(delayStyle);
- node.style[delayStyle[0]] = delayStyle[1];
- }
-
- maxDelayTime = maxDelay * ONE_SECOND;
- maxDurationTime = maxDuration * ONE_SECOND;
-
- if (options.easing) {
- var easeProp, easeVal = options.easing;
- if (flags.hasTransitions) {
- easeProp = TRANSITION_PROP + TIMING_KEY;
- temporaryStyles.push([easeProp, easeVal]);
- node.style[easeProp] = easeVal;
- }
- if (flags.hasAnimations) {
- easeProp = ANIMATION_PROP + TIMING_KEY;
- temporaryStyles.push([easeProp, easeVal]);
- node.style[easeProp] = easeVal;
- }
- }
-
- if (timings.transitionDuration) {
- events.push(TRANSITIONEND_EVENT);
- }
-
- if (timings.animationDuration) {
- events.push(ANIMATIONEND_EVENT);
- }
-
- startTime = Date.now();
- var timerTime = maxDelayTime + CLOSING_TIME_BUFFER * maxDurationTime;
- var endTime = startTime + timerTime;
-
- var animationsData = element.data(ANIMATE_TIMER_KEY) || [];
- var setupFallbackTimer = true;
- if (animationsData.length) {
- var currentTimerData = animationsData[0];
- setupFallbackTimer = endTime > currentTimerData.expectedEndTime;
- if (setupFallbackTimer) {
- $timeout.cancel(currentTimerData.timer);
- } else {
- animationsData.push(close);
- }
- }
-
- if (setupFallbackTimer) {
- var timer = $timeout(onAnimationExpired, timerTime, false);
- animationsData[0] = {
- timer: timer,
- expectedEndTime: endTime
- };
- animationsData.push(close);
- element.data(ANIMATE_TIMER_KEY, animationsData);
- }
-
- element.on(events.join(' '), onAnimationProgress);
- if (options.to) {
- if (options.cleanupStyles) {
- registerRestorableStyles(restoreStyles, node, Object.keys(options.to));
- }
- applyAnimationToStyles(element, options);
- }
- }
-
- function onAnimationExpired() {
- var animationsData = element.data(ANIMATE_TIMER_KEY);
-
- // this will be false in the event that the element was
- // removed from the DOM (via a leave animation or something
- // similar)
- if (animationsData) {
- for (var i = 1; i < animationsData.length; i++) {
- animationsData[i]();
- }
- element.removeData(ANIMATE_TIMER_KEY);
- }
- }
-
- function onAnimationProgress(event) {
- event.stopPropagation();
- var ev = event.originalEvent || event;
- var timeStamp = ev.$manualTimeStamp || ev.timeStamp || Date.now();
-
- /* Firefox (or possibly just Gecko) likes to not round values up
- * when a ms measurement is used for the animation */
- var elapsedTime = parseFloat(ev.elapsedTime.toFixed(ELAPSED_TIME_MAX_DECIMAL_PLACES));
-
- /* $manualTimeStamp is a mocked timeStamp value which is set
- * within browserTrigger(). This is only here so that tests can
- * mock animations properly. Real events fallback to event.timeStamp,
- * or, if they don't, then a timeStamp is automatically created for them.
- * We're checking to see if the timeStamp surpasses the expected delay,
- * but we're using elapsedTime instead of the timeStamp on the 2nd
- * pre-condition since animations sometimes close off early */
- if (Math.max(timeStamp - startTime, 0) >= maxDelayTime && elapsedTime >= maxDuration) {
- // we set this flag to ensure that if the transition is paused then, when resumed,
- // the animation will automatically close itself since transitions cannot be paused.
- animationCompleted = true;
- close();
- }
- }
- }
- };
- }];
-}];
-
-var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {
- $$animationProvider.drivers.push('$$animateCssDriver');
-
- var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
- var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
-
- var NG_OUT_ANCHOR_CLASS_NAME = 'ng-anchor-out';
- var NG_IN_ANCHOR_CLASS_NAME = 'ng-anchor-in';
-
- function isDocumentFragment(node) {
- return node.parentNode && node.parentNode.nodeType === 11;
- }
-
- this.$get = ['$animateCss', '$rootScope', '$$AnimateRunner', '$rootElement', '$sniffer', '$$jqLite', '$document',
- function($animateCss, $rootScope, $$AnimateRunner, $rootElement, $sniffer, $$jqLite, $document) {
-
- // only browsers that support these properties can render animations
- if (!$sniffer.animations && !$sniffer.transitions) return noop;
-
- var bodyNode = $document[0].body;
- var rootNode = getDomNode($rootElement);
-
- var rootBodyElement = jqLite(
- // this is to avoid using something that exists outside of the body
- // we also special case the doc fragement case because our unit test code
- // appends the $rootElement to the body after the app has been bootstrapped
- isDocumentFragment(rootNode) || bodyNode.contains(rootNode) ? rootNode : bodyNode
- );
-
- var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
-
- return function initDriverFn(animationDetails) {
- return animationDetails.from && animationDetails.to
- ? prepareFromToAnchorAnimation(animationDetails.from,
- animationDetails.to,
- animationDetails.classes,
- animationDetails.anchors)
- : prepareRegularAnimation(animationDetails);
- };
-
- function filterCssClasses(classes) {
- //remove all the `ng-` stuff
- return classes.replace(/\bng-\S+\b/g, '');
- }
-
- function getUniqueValues(a, b) {
- if (isString(a)) a = a.split(' ');
- if (isString(b)) b = b.split(' ');
- return a.filter(function(val) {
- return b.indexOf(val) === -1;
- }).join(' ');
- }
-
- function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {
- var clone = jqLite(getDomNode(outAnchor).cloneNode(true));
- var startingClasses = filterCssClasses(getClassVal(clone));
-
- outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
- inAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
-
- clone.addClass(NG_ANIMATE_ANCHOR_CLASS_NAME);
-
- rootBodyElement.append(clone);
-
- var animatorIn, animatorOut = prepareOutAnimation();
-
- // the user may not end up using the `out` animation and
- // only making use of the `in` animation or vice-versa.
- // In either case we should allow this and not assume the
- // animation is over unless both animations are not used.
- if (!animatorOut) {
- animatorIn = prepareInAnimation();
- if (!animatorIn) {
- return end();
- }
- }
-
- var startingAnimator = animatorOut || animatorIn;
-
- return {
- start: function() {
- var runner;
-
- var currentAnimation = startingAnimator.start();
- currentAnimation.done(function() {
- currentAnimation = null;
- if (!animatorIn) {
- animatorIn = prepareInAnimation();
- if (animatorIn) {
- currentAnimation = animatorIn.start();
- currentAnimation.done(function() {
- currentAnimation = null;
- end();
- runner.complete();
- });
- return currentAnimation;
- }
- }
- // in the event that there is no `in` animation
- end();
- runner.complete();
- });
-
- runner = new $$AnimateRunner({
- end: endFn,
- cancel: endFn
- });
-
- return runner;
-
- function endFn() {
- if (currentAnimation) {
- currentAnimation.end();
- }
- }
- }
- };
-
- function calculateAnchorStyles(anchor) {
- var styles = {};
-
- var coords = getDomNode(anchor).getBoundingClientRect();
-
- // we iterate directly since safari messes up and doesn't return
- // all the keys for the coods object when iterated
- forEach(['width','height','top','left'], function(key) {
- var value = coords[key];
- switch (key) {
- case 'top':
- value += bodyNode.scrollTop;
- break;
- case 'left':
- value += bodyNode.scrollLeft;
- break;
- }
- styles[key] = Math.floor(value) + 'px';
- });
- return styles;
- }
-
- function prepareOutAnimation() {
- var animator = $animateCss(clone, {
- addClass: NG_OUT_ANCHOR_CLASS_NAME,
- delay: true,
- from: calculateAnchorStyles(outAnchor)
- });
-
- // read the comment within `prepareRegularAnimation` to understand
- // why this check is necessary
- return animator.$$willAnimate ? animator : null;
- }
-
- function getClassVal(element) {
- return element.attr('class') || '';
- }
-
- function prepareInAnimation() {
- var endingClasses = filterCssClasses(getClassVal(inAnchor));
- var toAdd = getUniqueValues(endingClasses, startingClasses);
- var toRemove = getUniqueValues(startingClasses, endingClasses);
-
- var animator = $animateCss(clone, {
- to: calculateAnchorStyles(inAnchor),
- addClass: NG_IN_ANCHOR_CLASS_NAME + ' ' + toAdd,
- removeClass: NG_OUT_ANCHOR_CLASS_NAME + ' ' + toRemove,
- delay: true
- });
-
- // read the comment within `prepareRegularAnimation` to understand
- // why this check is necessary
- return animator.$$willAnimate ? animator : null;
- }
-
- function end() {
- clone.remove();
- outAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);
- inAnchor.removeClass(NG_ANIMATE_SHIM_CLASS_NAME);
- }
- }
-
- function prepareFromToAnchorAnimation(from, to, classes, anchors) {
- var fromAnimation = prepareRegularAnimation(from, noop);
- var toAnimation = prepareRegularAnimation(to, noop);
-
- var anchorAnimations = [];
- forEach(anchors, function(anchor) {
- var outElement = anchor['out'];
- var inElement = anchor['in'];
- var animator = prepareAnchoredAnimation(classes, outElement, inElement);
- if (animator) {
- anchorAnimations.push(animator);
- }
- });
-
- // no point in doing anything when there are no elements to animate
- if (!fromAnimation && !toAnimation && anchorAnimations.length === 0) return;
-
- return {
- start: function() {
- var animationRunners = [];
-
- if (fromAnimation) {
- animationRunners.push(fromAnimation.start());
- }
-
- if (toAnimation) {
- animationRunners.push(toAnimation.start());
- }
-
- forEach(anchorAnimations, function(animation) {
- animationRunners.push(animation.start());
- });
-
- var runner = new $$AnimateRunner({
- end: endFn,
- cancel: endFn // CSS-driven animations cannot be cancelled, only ended
- });
-
- $$AnimateRunner.all(animationRunners, function(status) {
- runner.complete(status);
- });
-
- return runner;
-
- function endFn() {
- forEach(animationRunners, function(runner) {
- runner.end();
- });
- }
- }
- };
- }
-
- function prepareRegularAnimation(animationDetails) {
- var element = animationDetails.element;
- var options = animationDetails.options || {};
-
- if (animationDetails.structural) {
- options.event = animationDetails.event;
- options.structural = true;
- options.applyClassesEarly = true;
-
- // we special case the leave animation since we want to ensure that
- // the element is removed as soon as the animation is over. Otherwise
- // a flicker might appear or the element may not be removed at all
- if (animationDetails.event === 'leave') {
- options.onDone = options.domOperation;
- }
- }
-
- // We assign the preparationClasses as the actual animation event since
- // the internals of $animateCss will just suffix the event token values
- // with `-active` to trigger the animation.
- if (options.preparationClasses) {
- options.event = concatWithSpace(options.event, options.preparationClasses);
- }
-
- var animator = $animateCss(element, options);
-
- // the driver lookup code inside of $$animation attempts to spawn a
- // driver one by one until a driver returns a.$$willAnimate animator object.
- // $animateCss will always return an object, however, it will pass in
- // a flag as a hint as to whether an animation was detected or not
- return animator.$$willAnimate ? animator : null;
- }
- }];
-}];
-
-// TODO(matsko): use caching here to speed things up for detection
-// TODO(matsko): add documentation
-// by the time...
-
-var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {
- this.$get = ['$injector', '$$AnimateRunner', '$$jqLite',
- function($injector, $$AnimateRunner, $$jqLite) {
-
- var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
- // $animateJs(element, 'enter');
- return function(element, event, classes, options) {
- // the `classes` argument is optional and if it is not used
- // then the classes will be resolved from the element's className
- // property as well as options.addClass/options.removeClass.
- if (arguments.length === 3 && isObject(classes)) {
- options = classes;
- classes = null;
- }
-
- options = prepareAnimationOptions(options);
- if (!classes) {
- classes = element.attr('class') || '';
- if (options.addClass) {
- classes += ' ' + options.addClass;
- }
- if (options.removeClass) {
- classes += ' ' + options.removeClass;
- }
- }
-
- var classesToAdd = options.addClass;
- var classesToRemove = options.removeClass;
-
- // the lookupAnimations function returns a series of animation objects that are
- // matched up with one or more of the CSS classes. These animation objects are
- // defined via the module.animation factory function. If nothing is detected then
- // we don't return anything which then makes $animation query the next driver.
- var animations = lookupAnimations(classes);
- var before, after;
- if (animations.length) {
- var afterFn, beforeFn;
- if (event == 'leave') {
- beforeFn = 'leave';
- afterFn = 'afterLeave'; // TODO(matsko): get rid of this
- } else {
- beforeFn = 'before' + event.charAt(0).toUpperCase() + event.substr(1);
- afterFn = event;
- }
-
- if (event !== 'enter' && event !== 'move') {
- before = packageAnimations(element, event, options, animations, beforeFn);
- }
- after = packageAnimations(element, event, options, animations, afterFn);
- }
-
- // no matching animations
- if (!before && !after) return;
-
- function applyOptions() {
- options.domOperation();
- applyAnimationClasses(element, options);
- }
-
- return {
- start: function() {
- var closeActiveAnimations;
- var chain = [];
-
- if (before) {
- chain.push(function(fn) {
- closeActiveAnimations = before(fn);
- });
- }
-
- if (chain.length) {
- chain.push(function(fn) {
- applyOptions();
- fn(true);
- });
- } else {
- applyOptions();
- }
-
- if (after) {
- chain.push(function(fn) {
- closeActiveAnimations = after(fn);
- });
- }
-
- var animationClosed = false;
- var runner = new $$AnimateRunner({
- end: function() {
- endAnimations();
- },
- cancel: function() {
- endAnimations(true);
- }
- });
-
- $$AnimateRunner.chain(chain, onComplete);
- return runner;
-
- function onComplete(success) {
- animationClosed = true;
- applyOptions();
- applyAnimationStyles(element, options);
- runner.complete(success);
- }
-
- function endAnimations(cancelled) {
- if (!animationClosed) {
- (closeActiveAnimations || noop)(cancelled);
- onComplete(cancelled);
- }
- }
- }
- };
-
- function executeAnimationFn(fn, element, event, options, onDone) {
- var args;
- switch (event) {
- case 'animate':
- args = [element, options.from, options.to, onDone];
- break;
-
- case 'setClass':
- args = [element, classesToAdd, classesToRemove, onDone];
- break;
-
- case 'addClass':
- args = [element, classesToAdd, onDone];
- break;
-
- case 'removeClass':
- args = [element, classesToRemove, onDone];
- break;
-
- default:
- args = [element, onDone];
- break;
- }
-
- args.push(options);
-
- var value = fn.apply(fn, args);
- if (value) {
- if (isFunction(value.start)) {
- value = value.start();
- }
-
- if (value instanceof $$AnimateRunner) {
- value.done(onDone);
- } else if (isFunction(value)) {
- // optional onEnd / onCancel callback
- return value;
- }
- }
-
- return noop;
- }
-
- function groupEventedAnimations(element, event, options, animations, fnName) {
- var operations = [];
- forEach(animations, function(ani) {
- var animation = ani[fnName];
- if (!animation) return;
-
- // note that all of these animations will run in parallel
- operations.push(function() {
- var runner;
- var endProgressCb;
-
- var resolved = false;
- var onAnimationComplete = function(rejected) {
- if (!resolved) {
- resolved = true;
- (endProgressCb || noop)(rejected);
- runner.complete(!rejected);
- }
- };
-
- runner = new $$AnimateRunner({
- end: function() {
- onAnimationComplete();
- },
- cancel: function() {
- onAnimationComplete(true);
- }
- });
-
- endProgressCb = executeAnimationFn(animation, element, event, options, function(result) {
- var cancelled = result === false;
- onAnimationComplete(cancelled);
- });
-
- return runner;
- });
- });
-
- return operations;
- }
-
- function packageAnimations(element, event, options, animations, fnName) {
- var operations = groupEventedAnimations(element, event, options, animations, fnName);
- if (operations.length === 0) {
- var a,b;
- if (fnName === 'beforeSetClass') {
- a = groupEventedAnimations(element, 'removeClass', options, animations, 'beforeRemoveClass');
- b = groupEventedAnimations(element, 'addClass', options, animations, 'beforeAddClass');
- } else if (fnName === 'setClass') {
- a = groupEventedAnimations(element, 'removeClass', options, animations, 'removeClass');
- b = groupEventedAnimations(element, 'addClass', options, animations, 'addClass');
- }
-
- if (a) {
- operations = operations.concat(a);
- }
- if (b) {
- operations = operations.concat(b);
- }
- }
-
- if (operations.length === 0) return;
-
- // TODO(matsko): add documentation
- return function startAnimation(callback) {
- var runners = [];
- if (operations.length) {
- forEach(operations, function(animateFn) {
- runners.push(animateFn());
- });
- }
-
- runners.length ? $$AnimateRunner.all(runners, callback) : callback();
-
- return function endFn(reject) {
- forEach(runners, function(runner) {
- reject ? runner.cancel() : runner.end();
- });
- };
- };
- }
- };
-
- function lookupAnimations(classes) {
- classes = isArray(classes) ? classes : classes.split(' ');
- var matches = [], flagMap = {};
- for (var i=0; i < classes.length; i++) {
- var klass = classes[i],
- animationFactory = $animateProvider.$$registeredAnimations[klass];
- if (animationFactory && !flagMap[klass]) {
- matches.push($injector.get(animationFactory));
- flagMap[klass] = true;
- }
- }
- return matches;
- }
- }];
-}];
-
-var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) {
- $$animationProvider.drivers.push('$$animateJsDriver');
- this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
- return function initDriverFn(animationDetails) {
- if (animationDetails.from && animationDetails.to) {
- var fromAnimation = prepareAnimation(animationDetails.from);
- var toAnimation = prepareAnimation(animationDetails.to);
- if (!fromAnimation && !toAnimation) return;
-
- return {
- start: function() {
- var animationRunners = [];
-
- if (fromAnimation) {
- animationRunners.push(fromAnimation.start());
- }
-
- if (toAnimation) {
- animationRunners.push(toAnimation.start());
- }
-
- $$AnimateRunner.all(animationRunners, done);
-
- var runner = new $$AnimateRunner({
- end: endFnFactory(),
- cancel: endFnFactory()
- });
-
- return runner;
-
- function endFnFactory() {
- return function() {
- forEach(animationRunners, function(runner) {
- // at this point we cannot cancel animations for groups just yet. 1.5+
- runner.end();
- });
- };
- }
-
- function done(status) {
- runner.complete(status);
- }
- }
- };
- } else {
- return prepareAnimation(animationDetails);
- }
- };
-
- function prepareAnimation(animationDetails) {
- // TODO(matsko): make sure to check for grouped animations and delegate down to normal animations
- var element = animationDetails.element;
- var event = animationDetails.event;
- var options = animationDetails.options;
- var classes = animationDetails.classes;
- return $$animateJs(element, event, classes, options);
- }
- }];
-}];
-
-var NG_ANIMATE_ATTR_NAME = 'data-ng-animate';
-var NG_ANIMATE_PIN_DATA = '$ngAnimatePin';
-var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
- var PRE_DIGEST_STATE = 1;
- var RUNNING_STATE = 2;
-
- var rules = this.rules = {
- skip: [],
- cancel: [],
- join: []
- };
-
- function isAllowed(ruleType, element, currentAnimation, previousAnimation) {
- return rules[ruleType].some(function(fn) {
- return fn(element, currentAnimation, previousAnimation);
- });
- }
-
- function hasAnimationClasses(options, and) {
- options = options || {};
- var a = (options.addClass || '').length > 0;
- var b = (options.removeClass || '').length > 0;
- return and ? a && b : a || b;
- }
-
- rules.join.push(function(element, newAnimation, currentAnimation) {
- // if the new animation is class-based then we can just tack that on
- return !newAnimation.structural && hasAnimationClasses(newAnimation.options);
- });
-
- rules.skip.push(function(element, newAnimation, currentAnimation) {
- // there is no need to animate anything if no classes are being added and
- // there is no structural animation that will be triggered
- return !newAnimation.structural && !hasAnimationClasses(newAnimation.options);
- });
-
- rules.skip.push(function(element, newAnimation, currentAnimation) {
- // why should we trigger a new structural animation if the element will
- // be removed from the DOM anyway?
- return currentAnimation.event == 'leave' && newAnimation.structural;
- });
-
- rules.skip.push(function(element, newAnimation, currentAnimation) {
- // if there is an ongoing current animation then don't even bother running the class-based animation
- return currentAnimation.structural && currentAnimation.state === RUNNING_STATE && !newAnimation.structural;
- });
-
- rules.cancel.push(function(element, newAnimation, currentAnimation) {
- // there can never be two structural animations running at the same time
- return currentAnimation.structural && newAnimation.structural;
- });
-
- rules.cancel.push(function(element, newAnimation, currentAnimation) {
- // if the previous animation is already running, but the new animation will
- // be triggered, but the new animation is structural
- return currentAnimation.state === RUNNING_STATE && newAnimation.structural;
- });
-
- rules.cancel.push(function(element, newAnimation, currentAnimation) {
- var nO = newAnimation.options;
- var cO = currentAnimation.options;
-
- // if the exact same CSS class is added/removed then it's safe to cancel it
- return (nO.addClass && nO.addClass === cO.removeClass) || (nO.removeClass && nO.removeClass === cO.addClass);
- });
-
- this.$get = ['$$rAF', '$rootScope', '$rootElement', '$document', '$$HashMap',
- '$$animation', '$$AnimateRunner', '$templateRequest', '$$jqLite', '$$forceReflow',
- function($$rAF, $rootScope, $rootElement, $document, $$HashMap,
- $$animation, $$AnimateRunner, $templateRequest, $$jqLite, $$forceReflow) {
-
- var activeAnimationsLookup = new $$HashMap();
- var disabledElementsLookup = new $$HashMap();
- var animationsEnabled = null;
-
- function postDigestTaskFactory() {
- var postDigestCalled = false;
- return function(fn) {
- // we only issue a call to postDigest before
- // it has first passed. This prevents any callbacks
- // from not firing once the animation has completed
- // since it will be out of the digest cycle.
- if (postDigestCalled) {
- fn();
- } else {
- $rootScope.$$postDigest(function() {
- postDigestCalled = true;
- fn();
- });
- }
- };
- }
-
- // Wait until all directive and route-related templates are downloaded and
- // compiled. The $templateRequest.totalPendingRequests variable keeps track of
- // all of the remote templates being currently downloaded. If there are no
- // templates currently downloading then the watcher will still fire anyway.
- var deregisterWatch = $rootScope.$watch(
- function() { return $templateRequest.totalPendingRequests === 0; },
- function(isEmpty) {
- if (!isEmpty) return;
- deregisterWatch();
-
- // Now that all templates have been downloaded, $animate will wait until
- // the post digest queue is empty before enabling animations. By having two
- // calls to $postDigest calls we can ensure that the flag is enabled at the
- // very end of the post digest queue. Since all of the animations in $animate
- // use $postDigest, it's important that the code below executes at the end.
- // This basically means that the page is fully downloaded and compiled before
- // any animations are triggered.
- $rootScope.$$postDigest(function() {
- $rootScope.$$postDigest(function() {
- // we check for null directly in the event that the application already called
- // .enabled() with whatever arguments that it provided it with
- if (animationsEnabled === null) {
- animationsEnabled = true;
- }
- });
- });
- }
- );
-
- var callbackRegistry = {};
-
- // remember that the classNameFilter is set during the provider/config
- // stage therefore we can optimize here and setup a helper function
- var classNameFilter = $animateProvider.classNameFilter();
- var isAnimatableClassName = !classNameFilter
- ? function() { return true; }
- : function(className) {
- return classNameFilter.test(className);
- };
-
- var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
-
- function normalizeAnimationOptions(element, options) {
- return mergeAnimationOptions(element, options, {});
- }
-
- function findCallbacks(parent, element, event) {
- var targetNode = getDomNode(element);
- var targetParentNode = getDomNode(parent);
-
- var matches = [];
- var entries = callbackRegistry[event];
- if (entries) {
- forEach(entries, function(entry) {
- if (entry.node.contains(targetNode)) {
- matches.push(entry.callback);
- } else if (event === 'leave' && entry.node.contains(targetParentNode)) {
- matches.push(entry.callback);
- }
- });
- }
-
- return matches;
- }
-
- return {
- on: function(event, container, callback) {
- var node = extractElementNode(container);
- callbackRegistry[event] = callbackRegistry[event] || [];
- callbackRegistry[event].push({
- node: node,
- callback: callback
- });
- },
-
- off: function(event, container, callback) {
- var entries = callbackRegistry[event];
- if (!entries) return;
-
- callbackRegistry[event] = arguments.length === 1
- ? null
- : filterFromRegistry(entries, container, callback);
-
- function filterFromRegistry(list, matchContainer, matchCallback) {
- var containerNode = extractElementNode(matchContainer);
- return list.filter(function(entry) {
- var isMatch = entry.node === containerNode &&
- (!matchCallback || entry.callback === matchCallback);
- return !isMatch;
- });
- }
- },
-
- pin: function(element, parentElement) {
- assertArg(isElement(element), 'element', 'not an element');
- assertArg(isElement(parentElement), 'parentElement', 'not an element');
- element.data(NG_ANIMATE_PIN_DATA, parentElement);
- },
-
- push: function(element, event, options, domOperation) {
- options = options || {};
- options.domOperation = domOperation;
- return queueAnimation(element, event, options);
- },
-
- // this method has four signatures:
- // () - global getter
- // (bool) - global setter
- // (element) - element getter
- // (element, bool) - element setter<F37>
- enabled: function(element, bool) {
- var argCount = arguments.length;
-
- if (argCount === 0) {
- // () - Global getter
- bool = !!animationsEnabled;
- } else {
- var hasElement = isElement(element);
-
- if (!hasElement) {
- // (bool) - Global setter
- bool = animationsEnabled = !!element;
- } else {
- var node = getDomNode(element);
- var recordExists = disabledElementsLookup.get(node);
-
- if (argCount === 1) {
- // (element) - Element getter
- bool = !recordExists;
- } else {
- // (element, bool) - Element setter
- bool = !!bool;
- if (!bool) {
- disabledElementsLookup.put(node, true);
- } else if (recordExists) {
- disabledElementsLookup.remove(node);
- }
- }
- }
- }
-
- return bool;
- }
- };
-
- function queueAnimation(element, event, options) {
- var node, parent;
- element = stripCommentsFromElement(element);
- if (element) {
- node = getDomNode(element);
- parent = element.parent();
- }
-
- options = prepareAnimationOptions(options);
-
- // we create a fake runner with a working promise.
- // These methods will become available after the digest has passed
- var runner = new $$AnimateRunner();
-
- // this is used to trigger callbacks in postDigest mode
- var runInNextPostDigestOrNow = postDigestTaskFactory();
-
- if (isArray(options.addClass)) {
- options.addClass = options.addClass.join(' ');
- }
-
- if (options.addClass && !isString(options.addClass)) {
- options.addClass = null;
- }
-
- if (isArray(options.removeClass)) {
- options.removeClass = options.removeClass.join(' ');
- }
-
- if (options.removeClass && !isString(options.removeClass)) {
- options.removeClass = null;
- }
-
- if (options.from && !isObject(options.from)) {
- options.from = null;
- }
-
- if (options.to && !isObject(options.to)) {
- options.to = null;
- }
-
- // there are situations where a directive issues an animation for
- // a jqLite wrapper that contains only comment nodes... If this
- // happens then there is no way we can perform an animation
- if (!node) {
- close();
- return runner;
- }
-
- var className = [node.className, options.addClass, options.removeClass].join(' ');
- if (!isAnimatableClassName(className)) {
- close();
- return runner;
- }
-
- var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
-
- // this is a hard disable of all animations for the application or on
- // the element itself, therefore there is no need to continue further
- // past this point if not enabled
- var skipAnimations = !animationsEnabled || disabledElementsLookup.get(node);
- var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};
- var hasExistingAnimation = !!existingAnimation.state;
-
- // there is no point in traversing the same collection of parent ancestors if a followup
- // animation will be run on the same element that already did all that checking work
- if (!skipAnimations && (!hasExistingAnimation || existingAnimation.state != PRE_DIGEST_STATE)) {
- skipAnimations = !areAnimationsAllowed(element, parent, event);
- }
-
- if (skipAnimations) {
- close();
- return runner;
- }
-
- if (isStructural) {
- closeChildAnimations(element);
- }
-
- var newAnimation = {
- structural: isStructural,
- element: element,
- event: event,
- close: close,
- options: options,
- runner: runner
- };
-
- if (hasExistingAnimation) {
- var skipAnimationFlag = isAllowed('skip', element, newAnimation, existingAnimation);
- if (skipAnimationFlag) {
- if (existingAnimation.state === RUNNING_STATE) {
- close();
- return runner;
- } else {
- mergeAnimationOptions(element, existingAnimation.options, options);
- return existingAnimation.runner;
- }
- }
-
- var cancelAnimationFlag = isAllowed('cancel', element, newAnimation, existingAnimation);
- if (cancelAnimationFlag) {
- if (existingAnimation.state === RUNNING_STATE) {
- // this will end the animation right away and it is safe
- // to do so since the animation is already running and the
- // runner callback code will run in async
- existingAnimation.runner.end();
- } else if (existingAnimation.structural) {
- // this means that the animation is queued into a digest, but
- // hasn't started yet. Therefore it is safe to run the close
- // method which will call the runner methods in async.
- existingAnimation.close();
- } else {
- // this will merge the new animation options into existing animation options
- mergeAnimationOptions(element, existingAnimation.options, newAnimation.options);
- return existingAnimation.runner;
- }
- } else {
- // a joined animation means that this animation will take over the existing one
- // so an example would involve a leave animation taking over an enter. Then when
- // the postDigest kicks in the enter will be ignored.
- var joinAnimationFlag = isAllowed('join', element, newAnimation, existingAnimation);
- if (joinAnimationFlag) {
- if (existingAnimation.state === RUNNING_STATE) {
- normalizeAnimationOptions(element, options);
- } else {
- applyGeneratedPreparationClasses(element, isStructural ? event : null, options);
-
- event = newAnimation.event = existingAnimation.event;
- options = mergeAnimationOptions(element, existingAnimation.options, newAnimation.options);
-
- //we return the same runner since only the option values of this animation will
- //be fed into the `existingAnimation`.
- return existingAnimation.runner;
- }
- }
- }
- } else {
- // normalization in this case means that it removes redundant CSS classes that
- // already exist (addClass) or do not exist (removeClass) on the element
- normalizeAnimationOptions(element, options);
- }
-
- // when the options are merged and cleaned up we may end up not having to do
- // an animation at all, therefore we should check this before issuing a post
- // digest callback. Structural animations will always run no matter what.
- var isValidAnimation = newAnimation.structural;
- if (!isValidAnimation) {
- // animate (from/to) can be quickly checked first, otherwise we check if any classes are present
- isValidAnimation = (newAnimation.event === 'animate' && Object.keys(newAnimation.options.to || {}).length > 0)
- || hasAnimationClasses(newAnimation.options);
- }
-
- if (!isValidAnimation) {
- close();
- clearElementAnimationState(element);
- return runner;
- }
-
- // the counter keeps track of cancelled animations
- var counter = (existingAnimation.counter || 0) + 1;
- newAnimation.counter = counter;
-
- markElementAnimationState(element, PRE_DIGEST_STATE, newAnimation);
-
- $rootScope.$$postDigest(function() {
- var animationDetails = activeAnimationsLookup.get(node);
- var animationCancelled = !animationDetails;
- animationDetails = animationDetails || {};
-
- // if addClass/removeClass is called before something like enter then the
- // registered parent element may not be present. The code below will ensure
- // that a final value for parent element is obtained
- var parentElement = element.parent() || [];
-
- // animate/structural/class-based animations all have requirements. Otherwise there
- // is no point in performing an animation. The parent node must also be set.
- var isValidAnimation = parentElement.length > 0
- && (animationDetails.event === 'animate'
- || animationDetails.structural
- || hasAnimationClasses(animationDetails.options));
-
- // this means that the previous animation was cancelled
- // even if the follow-up animation is the same event
- if (animationCancelled || animationDetails.counter !== counter || !isValidAnimation) {
- // if another animation did not take over then we need
- // to make sure that the domOperation and options are
- // handled accordingly
- if (animationCancelled) {
- applyAnimationClasses(element, options);
- applyAnimationStyles(element, options);
- }
-
- // if the event changed from something like enter to leave then we do
- // it, otherwise if it's the same then the end result will be the same too
- if (animationCancelled || (isStructural && animationDetails.event !== event)) {
- options.domOperation();
- runner.end();
- }
-
- // in the event that the element animation was not cancelled or a follow-up animation
- // isn't allowed to animate from here then we need to clear the state of the element
- // so that any future animations won't read the expired animation data.
- if (!isValidAnimation) {
- clearElementAnimationState(element);
- }
-
- return;
- }
-
- // this combined multiple class to addClass / removeClass into a setClass event
- // so long as a structural event did not take over the animation
- event = !animationDetails.structural && hasAnimationClasses(animationDetails.options, true)
- ? 'setClass'
- : animationDetails.event;
-
- markElementAnimationState(element, RUNNING_STATE);
- var realRunner = $$animation(element, event, animationDetails.options);
-
- realRunner.done(function(status) {
- close(!status);
- var animationDetails = activeAnimationsLookup.get(node);
- if (animationDetails && animationDetails.counter === counter) {
- clearElementAnimationState(getDomNode(element));
- }
- notifyProgress(runner, event, 'close', {});
- });
-
- // this will update the runner's flow-control events based on
- // the `realRunner` object.
- runner.setHost(realRunner);
- notifyProgress(runner, event, 'start', {});
- });
-
- return runner;
-
- function notifyProgress(runner, event, phase, data) {
- runInNextPostDigestOrNow(function() {
- var callbacks = findCallbacks(parent, element, event);
- if (callbacks.length) {
- // do not optimize this call here to RAF because
- // we don't know how heavy the callback code here will
- // be and if this code is buffered then this can
- // lead to a performance regression.
- $$rAF(function() {
- forEach(callbacks, function(callback) {
- callback(element, phase, data);
- });
- });
- }
- });
- runner.progress(event, phase, data);
- }
-
- function close(reject) { // jshint ignore:line
- clearGeneratedClasses(element, options);
- applyAnimationClasses(element, options);
- applyAnimationStyles(element, options);
- options.domOperation();
- runner.complete(!reject);
- }
- }
-
- function closeChildAnimations(element) {
- var node = getDomNode(element);
- var children = node.querySelectorAll('[' + NG_ANIMATE_ATTR_NAME + ']');
- forEach(children, function(child) {
- var state = parseInt(child.getAttribute(NG_ANIMATE_ATTR_NAME));
- var animationDetails = activeAnimationsLookup.get(child);
- switch (state) {
- case RUNNING_STATE:
- animationDetails.runner.end();
- /* falls through */
- case PRE_DIGEST_STATE:
- if (animationDetails) {
- activeAnimationsLookup.remove(child);
- }
- break;
- }
- });
- }
-
- function clearElementAnimationState(element) {
- var node = getDomNode(element);
- node.removeAttribute(NG_ANIMATE_ATTR_NAME);
- activeAnimationsLookup.remove(node);
- }
-
- function isMatchingElement(nodeOrElmA, nodeOrElmB) {
- return getDomNode(nodeOrElmA) === getDomNode(nodeOrElmB);
- }
-
- function areAnimationsAllowed(element, parentElement, event) {
- var bodyElement = jqLite($document[0].body);
- var bodyElementDetected = isMatchingElement(element, bodyElement) || element[0].nodeName === 'HTML';
- var rootElementDetected = isMatchingElement(element, $rootElement);
- var parentAnimationDetected = false;
- var animateChildren;
-
- var parentHost = element.data(NG_ANIMATE_PIN_DATA);
- if (parentHost) {
- parentElement = parentHost;
- }
-
- while (parentElement && parentElement.length) {
- if (!rootElementDetected) {
- // angular doesn't want to attempt to animate elements outside of the application
- // therefore we need to ensure that the rootElement is an ancestor of the current element
- rootElementDetected = isMatchingElement(parentElement, $rootElement);
- }
-
- var parentNode = parentElement[0];
- if (parentNode.nodeType !== ELEMENT_NODE) {
- // no point in inspecting the #document element
- break;
- }
-
- var details = activeAnimationsLookup.get(parentNode) || {};
- // either an enter, leave or move animation will commence
- // therefore we can't allow any animations to take place
- // but if a parent animation is class-based then that's ok
- if (!parentAnimationDetected) {
- parentAnimationDetected = details.structural || disabledElementsLookup.get(parentNode);
- }
-
- if (isUndefined(animateChildren) || animateChildren === true) {
- var value = parentElement.data(NG_ANIMATE_CHILDREN_DATA);
- if (isDefined(value)) {
- animateChildren = value;
- }
- }
-
- // there is no need to continue traversing at this point
- if (parentAnimationDetected && animateChildren === false) break;
-
- if (!rootElementDetected) {
- // angular doesn't want to attempt to animate elements outside of the application
- // therefore we need to ensure that the rootElement is an ancestor of the current element
- rootElementDetected = isMatchingElement(parentElement, $rootElement);
- if (!rootElementDetected) {
- parentHost = parentElement.data(NG_ANIMATE_PIN_DATA);
- if (parentHost) {
- parentElement = parentHost;
- }
- }
- }
-
- if (!bodyElementDetected) {
- // we also need to ensure that the element is or will be apart of the body element
- // otherwise it is pointless to even issue an animation to be rendered
- bodyElementDetected = isMatchingElement(parentElement, bodyElement);
- }
-
- parentElement = parentElement.parent();
- }
-
- var allowAnimation = !parentAnimationDetected || animateChildren;
- return allowAnimation && rootElementDetected && bodyElementDetected;
- }
-
- function markElementAnimationState(element, state, details) {
- details = details || {};
- details.state = state;
-
- var node = getDomNode(element);
- node.setAttribute(NG_ANIMATE_ATTR_NAME, state);
-
- var oldValue = activeAnimationsLookup.get(node);
- var newValue = oldValue
- ? extend(oldValue, details)
- : details;
- activeAnimationsLookup.put(node, newValue);
- }
- }];
-}];
-
-var $$AnimateAsyncRunFactory = ['$$rAF', function($$rAF) {
- var waitQueue = [];
-
- function waitForTick(fn) {
- waitQueue.push(fn);
- if (waitQueue.length > 1) return;
- $$rAF(function() {
- for (var i = 0; i < waitQueue.length; i++) {
- waitQueue[i]();
- }
- waitQueue = [];
- });
- }
-
- return function() {
- var passed = false;
- waitForTick(function() {
- passed = true;
- });
- return function(callback) {
- passed ? callback() : waitForTick(callback);
- };
- };
-}];
-
-var $$AnimateRunnerFactory = ['$q', '$sniffer', '$$animateAsyncRun',
- function($q, $sniffer, $$animateAsyncRun) {
-
- var INITIAL_STATE = 0;
- var DONE_PENDING_STATE = 1;
- var DONE_COMPLETE_STATE = 2;
-
- AnimateRunner.chain = function(chain, callback) {
- var index = 0;
-
- next();
- function next() {
- if (index === chain.length) {
- callback(true);
- return;
- }
-
- chain[index](function(response) {
- if (response === false) {
- callback(false);
- return;
- }
- index++;
- next();
- });
- }
- };
-
- AnimateRunner.all = function(runners, callback) {
- var count = 0;
- var status = true;
- forEach(runners, function(runner) {
- runner.done(onProgress);
- });
-
- function onProgress(response) {
- status = status && response;
- if (++count === runners.length) {
- callback(status);
- }
- }
- };
-
- function AnimateRunner(host) {
- this.setHost(host);
-
- this._doneCallbacks = [];
- this._runInAnimationFrame = $$animateAsyncRun();
- this._state = 0;
- }
-
- AnimateRunner.prototype = {
- setHost: function(host) {
- this.host = host || {};
- },
-
- done: function(fn) {
- if (this._state === DONE_COMPLETE_STATE) {
- fn();
- } else {
- this._doneCallbacks.push(fn);
- }
- },
-
- progress: noop,
-
- getPromise: function() {
- if (!this.promise) {
- var self = this;
- this.promise = $q(function(resolve, reject) {
- self.done(function(status) {
- status === false ? reject() : resolve();
- });
- });
- }
- return this.promise;
- },
-
- then: function(resolveHandler, rejectHandler) {
- return this.getPromise().then(resolveHandler, rejectHandler);
- },
-
- 'catch': function(handler) {
- return this.getPromise()['catch'](handler);
- },
-
- 'finally': function(handler) {
- return this.getPromise()['finally'](handler);
- },
-
- pause: function() {
- if (this.host.pause) {
- this.host.pause();
- }
- },
-
- resume: function() {
- if (this.host.resume) {
- this.host.resume();
- }
- },
-
- end: function() {
- if (this.host.end) {
- this.host.end();
- }
- this._resolve(true);
- },
-
- cancel: function() {
- if (this.host.cancel) {
- this.host.cancel();
- }
- this._resolve(false);
- },
-
- complete: function(response) {
- var self = this;
- if (self._state === INITIAL_STATE) {
- self._state = DONE_PENDING_STATE;
- self._runInAnimationFrame(function() {
- self._resolve(response);
- });
- }
- },
-
- _resolve: function(response) {
- if (this._state !== DONE_COMPLETE_STATE) {
- forEach(this._doneCallbacks, function(fn) {
- fn(response);
- });
- this._doneCallbacks.length = 0;
- this._state = DONE_COMPLETE_STATE;
- }
- }
- };
-
- return AnimateRunner;
-}];
-
-var $$AnimationProvider = ['$animateProvider', function($animateProvider) {
- var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
-
- var drivers = this.drivers = [];
-
- var RUNNER_STORAGE_KEY = '$$animationRunner';
-
- function setRunner(element, runner) {
- element.data(RUNNER_STORAGE_KEY, runner);
- }
-
- function removeRunner(element) {
- element.removeData(RUNNER_STORAGE_KEY);
- }
-
- function getRunner(element) {
- return element.data(RUNNER_STORAGE_KEY);
- }
-
- this.$get = ['$$jqLite', '$rootScope', '$injector', '$$AnimateRunner', '$$HashMap', '$$rAFScheduler',
- function($$jqLite, $rootScope, $injector, $$AnimateRunner, $$HashMap, $$rAFScheduler) {
-
- var animationQueue = [];
- var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
-
- function sortAnimations(animations) {
- var tree = { children: [] };
- var i, lookup = new $$HashMap();
-
- // this is done first beforehand so that the hashmap
- // is filled with a list of the elements that will be animated
- for (i = 0; i < animations.length; i++) {
- var animation = animations[i];
- lookup.put(animation.domNode, animations[i] = {
- domNode: animation.domNode,
- fn: animation.fn,
- children: []
- });
- }
-
- for (i = 0; i < animations.length; i++) {
- processNode(animations[i]);
- }
-
- return flatten(tree);
-
- function processNode(entry) {
- if (entry.processed) return entry;
- entry.processed = true;
-
- var elementNode = entry.domNode;
- var parentNode = elementNode.parentNode;
- lookup.put(elementNode, entry);
-
- var parentEntry;
- while (parentNode) {
- parentEntry = lookup.get(parentNode);
- if (parentEntry) {
- if (!parentEntry.processed) {
- parentEntry = processNode(parentEntry);
- }
- break;
- }
- parentNode = parentNode.parentNode;
- }
-
- (parentEntry || tree).children.push(entry);
- return entry;
- }
-
- function flatten(tree) {
- var result = [];
- var queue = [];
- var i;
-
- for (i = 0; i < tree.children.length; i++) {
- queue.push(tree.children[i]);
- }
-
- var remainingLevelEntries = queue.length;
- var nextLevelEntries = 0;
- var row = [];
-
- for (i = 0; i < queue.length; i++) {
- var entry = queue[i];
- if (remainingLevelEntries <= 0) {
- remainingLevelEntries = nextLevelEntries;
- nextLevelEntries = 0;
- result.push(row);
- row = [];
- }
- row.push(entry.fn);
- entry.children.forEach(function(childEntry) {
- nextLevelEntries++;
- queue.push(childEntry);
- });
- remainingLevelEntries--;
- }
-
- if (row.length) {
- result.push(row);
- }
-
- return result;
- }
- }
-
- // TODO(matsko): document the signature in a better way
- return function(element, event, options) {
- options = prepareAnimationOptions(options);
- var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
-
- // there is no animation at the current moment, however
- // these runner methods will get later updated with the
- // methods leading into the driver's end/cancel methods
- // for now they just stop the animation from starting
- var runner = new $$AnimateRunner({
- end: function() { close(); },
- cancel: function() { close(true); }
- });
-
- if (!drivers.length) {
- close();
- return runner;
- }
-
- setRunner(element, runner);
-
- var classes = mergeClasses(element.attr('class'), mergeClasses(options.addClass, options.removeClass));
- var tempClasses = options.tempClasses;
- if (tempClasses) {
- classes += ' ' + tempClasses;
- options.tempClasses = null;
- }
-
- animationQueue.push({
- // this data is used by the postDigest code and passed into
- // the driver step function
- element: element,
- classes: classes,
- event: event,
- structural: isStructural,
- options: options,
- beforeStart: beforeStart,
- close: close
- });
-
- element.on('$destroy', handleDestroyedElement);
-
- // we only want there to be one function called within the post digest
- // block. This way we can group animations for all the animations that
- // were apart of the same postDigest flush call.
- if (animationQueue.length > 1) return runner;
-
- $rootScope.$$postDigest(function() {
- var animations = [];
- forEach(animationQueue, function(entry) {
- // the element was destroyed early on which removed the runner
- // form its storage. This means we can't animate this element
- // at all and it already has been closed due to destruction.
- if (getRunner(entry.element)) {
- animations.push(entry);
- } else {
- entry.close();
- }
- });
-
- // now any future animations will be in another postDigest
- animationQueue.length = 0;
-
- var groupedAnimations = groupAnimations(animations);
- var toBeSortedAnimations = [];
-
- forEach(groupedAnimations, function(animationEntry) {
- toBeSortedAnimations.push({
- domNode: getDomNode(animationEntry.from ? animationEntry.from.element : animationEntry.element),
- fn: function triggerAnimationStart() {
- // it's important that we apply the `ng-animate` CSS class and the
- // temporary classes before we do any driver invoking since these
- // CSS classes may be required for proper CSS detection.
- animationEntry.beforeStart();
-
- var startAnimationFn, closeFn = animationEntry.close;
-
- // in the event that the element was removed before the digest runs or
- // during the RAF sequencing then we should not trigger the animation.
- var targetElement = animationEntry.anchors
- ? (animationEntry.from.element || animationEntry.to.element)
- : animationEntry.element;
-
- if (getRunner(targetElement)) {
- var operation = invokeFirstDriver(animationEntry);
- if (operation) {
- startAnimationFn = operation.start;
- }
- }
-
- if (!startAnimationFn) {
- closeFn();
- } else {
- var animationRunner = startAnimationFn();
- animationRunner.done(function(status) {
- closeFn(!status);
- });
- updateAnimationRunners(animationEntry, animationRunner);
- }
- }
- });
- });
-
- // we need to sort each of the animations in order of parent to child
- // relationships. This ensures that the child classes are applied at the
- // right time.
- $$rAFScheduler(sortAnimations(toBeSortedAnimations));
- });
-
- return runner;
-
- // TODO(matsko): change to reference nodes
- function getAnchorNodes(node) {
- var SELECTOR = '[' + NG_ANIMATE_REF_ATTR + ']';
- var items = node.hasAttribute(NG_ANIMATE_REF_ATTR)
- ? [node]
- : node.querySelectorAll(SELECTOR);
- var anchors = [];
- forEach(items, function(node) {
- var attr = node.getAttribute(NG_ANIMATE_REF_ATTR);
- if (attr && attr.length) {
- anchors.push(node);
- }
- });
- return anchors;
- }
-
- function groupAnimations(animations) {
- var preparedAnimations = [];
- var refLookup = {};
- forEach(animations, function(animation, index) {
- var element = animation.element;
- var node = getDomNode(element);
- var event = animation.event;
- var enterOrMove = ['enter', 'move'].indexOf(event) >= 0;
- var anchorNodes = animation.structural ? getAnchorNodes(node) : [];
-
- if (anchorNodes.length) {
- var direction = enterOrMove ? 'to' : 'from';
-
- forEach(anchorNodes, function(anchor) {
- var key = anchor.getAttribute(NG_ANIMATE_REF_ATTR);
- refLookup[key] = refLookup[key] || {};
- refLookup[key][direction] = {
- animationID: index,
- element: jqLite(anchor)
- };
- });
- } else {
- preparedAnimations.push(animation);
- }
- });
-
- var usedIndicesLookup = {};
- var anchorGroups = {};
- forEach(refLookup, function(operations, key) {
- var from = operations.from;
- var to = operations.to;
-
- if (!from || !to) {
- // only one of these is set therefore we can't have an
- // anchor animation since all three pieces are required
- var index = from ? from.animationID : to.animationID;
- var indexKey = index.toString();
- if (!usedIndicesLookup[indexKey]) {
- usedIndicesLookup[indexKey] = true;
- preparedAnimations.push(animations[index]);
- }
- return;
- }
-
- var fromAnimation = animations[from.animationID];
- var toAnimation = animations[to.animationID];
- var lookupKey = from.animationID.toString();
- if (!anchorGroups[lookupKey]) {
- var group = anchorGroups[lookupKey] = {
- structural: true,
- beforeStart: function() {
- fromAnimation.beforeStart();
- toAnimation.beforeStart();
- },
- close: function() {
- fromAnimation.close();
- toAnimation.close();
- },
- classes: cssClassesIntersection(fromAnimation.classes, toAnimation.classes),
- from: fromAnimation,
- to: toAnimation,
- anchors: [] // TODO(matsko): change to reference nodes
- };
-
- // the anchor animations require that the from and to elements both have at least
- // one shared CSS class which effictively marries the two elements together to use
- // the same animation driver and to properly sequence the anchor animation.
- if (group.classes.length) {
- preparedAnimations.push(group);
- } else {
- preparedAnimations.push(fromAnimation);
- preparedAnimations.push(toAnimation);
- }
- }
-
- anchorGroups[lookupKey].anchors.push({
- 'out': from.element, 'in': to.element
- });
- });
-
- return preparedAnimations;
- }
-
- function cssClassesIntersection(a,b) {
- a = a.split(' ');
- b = b.split(' ');
- var matches = [];
-
- for (var i = 0; i < a.length; i++) {
- var aa = a[i];
- if (aa.substring(0,3) === 'ng-') continue;
-
- for (var j = 0; j < b.length; j++) {
- if (aa === b[j]) {
- matches.push(aa);
- break;
- }
- }
- }
-
- return matches.join(' ');
- }
-
- function invokeFirstDriver(animationDetails) {
- // we loop in reverse order since the more general drivers (like CSS and JS)
- // may attempt more elements, but custom drivers are more particular
- for (var i = drivers.length - 1; i >= 0; i--) {
- var driverName = drivers[i];
- if (!$injector.has(driverName)) continue; // TODO(matsko): remove this check
-
- var factory = $injector.get(driverName);
- var driver = factory(animationDetails);
- if (driver) {
- return driver;
- }
- }
- }
-
- function beforeStart() {
- element.addClass(NG_ANIMATE_CLASSNAME);
- if (tempClasses) {
- $$jqLite.addClass(element, tempClasses);
- }
- }
-
- function updateAnimationRunners(animation, newRunner) {
- if (animation.from && animation.to) {
- update(animation.from.element);
- update(animation.to.element);
- } else {
- update(animation.element);
- }
-
- function update(element) {
- getRunner(element).setHost(newRunner);
- }
- }
-
- function handleDestroyedElement() {
- var runner = getRunner(element);
- if (runner && (event !== 'leave' || !options.$$domOperationFired)) {
- runner.end();
- }
- }
-
- function close(rejected) { // jshint ignore:line
- element.off('$destroy', handleDestroyedElement);
- removeRunner(element);
-
- applyAnimationClasses(element, options);
- applyAnimationStyles(element, options);
- options.domOperation();
-
- if (tempClasses) {
- $$jqLite.removeClass(element, tempClasses);
- }
-
- element.removeClass(NG_ANIMATE_CLASSNAME);
- runner.complete(!rejected);
- }
- };
- }];
-}];
-
-/* global angularAnimateModule: true,
-
- $$AnimateAsyncRunFactory,
- $$rAFSchedulerFactory,
- $$AnimateChildrenDirective,
- $$AnimateRunnerFactory,
- $$AnimateQueueProvider,
- $$AnimationProvider,
- $AnimateCssProvider,
- $$AnimateCssDriverProvider,
- $$AnimateJsProvider,
- $$AnimateJsDriverProvider,
-*/
-
-/**
- * @ngdoc module
- * @name ngAnimate
- * @description
- *
- * The `ngAnimate` module provides support for CSS-based animations (keyframes and transitions) as well as JavaScript-based animations via
- * callback hooks. Animations are not enabled by default, however, by including `ngAnimate` the animation hooks are enabled for an Angular app.
- *
- * <div doc-module-components="ngAnimate"></div>
- *
- * # Usage
- * Simply put, there are two ways to make use of animations when ngAnimate is used: by using **CSS** and **JavaScript**. The former works purely based
- * using CSS (by using matching CSS selectors/styles) and the latter triggers animations that are registered via `module.animation()`. For
- * both CSS and JS animations the sole requirement is to have a matching `CSS class` that exists both in the registered animation and within
- * the HTML element that the animation will be triggered on.
- *
- * ## Directive Support
- * The following directives are "animation aware":
- *
- * | Directive | Supported Animations |
- * |----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
- * | {@link ng.directive:ngRepeat#animations ngRepeat} | enter, leave and move |
- * | {@link ngRoute.directive:ngView#animations ngView} | enter and leave |
- * | {@link ng.directive:ngInclude#animations ngInclude} | enter and leave |
- * | {@link ng.directive:ngSwitch#animations ngSwitch} | enter and leave |
- * | {@link ng.directive:ngIf#animations ngIf} | enter and leave |
- * | {@link ng.directive:ngClass#animations ngClass} | add and remove (the CSS class(es) present) |
- * | {@link ng.directive:ngShow#animations ngShow} & {@link ng.directive:ngHide#animations ngHide} | add and remove (the ng-hide class value) |
- * | {@link ng.directive:form#animation-hooks form} & {@link ng.directive:ngModel#animation-hooks ngModel} | add and remove (dirty, pristine, valid, invalid & all other validations) |
- * | {@link module:ngMessages#animations ngMessages} | add and remove (ng-active & ng-inactive) |
- * | {@link module:ngMessages#animations ngMessage} | enter and leave |
- *
- * (More information can be found by visiting each the documentation associated with each directive.)
- *
- * ## CSS-based Animations
- *
- * CSS-based animations with ngAnimate are unique since they require no JavaScript code at all. By using a CSS class that we reference between our HTML
- * and CSS code we can create an animation that will be picked up by Angular when an the underlying directive performs an operation.
- *
- * The example below shows how an `enter` animation can be made possible on an element using `ng-if`:
- *
- * ```html
- * <div ng-if="bool" class="fade">
- * Fade me in out
- * </div>
- * <button ng-click="bool=true">Fade In!</button>
- * <button ng-click="bool=false">Fade Out!</button>
- * ```
- *
- * Notice the CSS class **fade**? We can now create the CSS transition code that references this class:
- *
- * ```css
- * /&#42; The starting CSS styles for the enter animation &#42;/
- * .fade.ng-enter {
- * transition:0.5s linear all;
- * opacity:0;
- * }
- *
- * /&#42; The finishing CSS styles for the enter animation &#42;/
- * .fade.ng-enter.ng-enter-active {
- * opacity:1;
- * }
- * ```
- *
- * The key thing to remember here is that, depending on the animation event (which each of the directives above trigger depending on what's going on) two
- * generated CSS classes will be applied to the element; in the example above we have `.ng-enter` and `.ng-enter-active`. For CSS transitions, the transition
- * code **must** be defined within the starting CSS class (in this case `.ng-enter`). The destination class is what the transition will animate towards.
- *
- * If for example we wanted to create animations for `leave` and `move` (ngRepeat triggers move) then we can do so using the same CSS naming conventions:
- *
- * ```css
- * /&#42; now the element will fade out before it is removed from the DOM &#42;/
- * .fade.ng-leave {
- * transition:0.5s linear all;
- * opacity:1;
- * }
- * .fade.ng-leave.ng-leave-active {
- * opacity:0;
- * }
- * ```
- *
- * We can also make use of **CSS Keyframes** by referencing the keyframe animation within the starting CSS class:
- *
- * ```css
- * /&#42; there is no need to define anything inside of the destination
- * CSS class since the keyframe will take charge of the animation &#42;/
- * .fade.ng-leave {
- * animation: my_fade_animation 0.5s linear;
- * -webkit-animation: my_fade_animation 0.5s linear;
- * }
- *
- * @keyframes my_fade_animation {
- * from { opacity:1; }
- * to { opacity:0; }
- * }
- *
- * @-webkit-keyframes my_fade_animation {
- * from { opacity:1; }
- * to { opacity:0; }
- * }
- * ```
- *
- * Feel free also mix transitions and keyframes together as well as any other CSS classes on the same element.
- *
- * ### CSS Class-based Animations
- *
- * Class-based animations (animations that are triggered via `ngClass`, `ngShow`, `ngHide` and some other directives) have a slightly different
- * naming convention. Class-based animations are basic enough that a standard transition or keyframe can be referenced on the class being added
- * and removed.
- *
- * For example if we wanted to do a CSS animation for `ngHide` then we place an animation on the `.ng-hide` CSS class:
- *
- * ```html
- * <div ng-show="bool" class="fade">
- * Show and hide me
- * </div>
- * <button ng-click="bool=true">Toggle</button>
- *
- * <style>
- * .fade.ng-hide {
- * transition:0.5s linear all;
- * opacity:0;
- * }
- * </style>
- * ```
- *
- * All that is going on here with ngShow/ngHide behind the scenes is the `.ng-hide` class is added/removed (when the hidden state is valid). Since
- * ngShow and ngHide are animation aware then we can match up a transition and ngAnimate handles the rest.
- *
- * In addition the addition and removal of the CSS class, ngAnimate also provides two helper methods that we can use to further decorate the animation
- * with CSS styles.
- *
- * ```html
- * <div ng-class="{on:onOff}" class="highlight">
- * Highlight this box
- * </div>
- * <button ng-click="onOff=!onOff">Toggle</button>
- *
- * <style>
- * .highlight {
- * transition:0.5s linear all;
- * }
- * .highlight.on-add {
- * background:white;
- * }
- * .highlight.on {
- * background:yellow;
- * }
- * .highlight.on-remove {
- * background:black;
- * }
- * </style>
- * ```
- *
- * We can also make use of CSS keyframes by placing them within the CSS classes.
- *
- *
- * ### CSS Staggering Animations
- * A Staggering animation is a collection of animations that are issued with a slight delay in between each successive operation resulting in a
- * curtain-like effect. The ngAnimate module (versions >=1.2) supports staggering animations and the stagger effect can be
- * performed by creating a **ng-EVENT-stagger** CSS class and attaching that class to the base CSS class used for
- * the animation. The style property expected within the stagger class can either be a **transition-delay** or an
- * **animation-delay** property (or both if your animation contains both transitions and keyframe animations).
- *
- * ```css
- * .my-animation.ng-enter {
- * /&#42; standard transition code &#42;/
- * transition: 1s linear all;
- * opacity:0;
- * }
- * .my-animation.ng-enter-stagger {
- * /&#42; this will have a 100ms delay between each successive leave animation &#42;/
- * transition-delay: 0.1s;
- *
- * /&#42; As of 1.4.4, this must always be set: it signals ngAnimate
- * to not accidentally inherit a delay property from another CSS class &#42;/
- * transition-duration: 0s;
- * }
- * .my-animation.ng-enter.ng-enter-active {
- * /&#42; standard transition styles &#42;/
- * opacity:1;
- * }
- * ```
- *
- * Staggering animations work by default in ngRepeat (so long as the CSS class is defined). Outside of ngRepeat, to use staggering animations
- * on your own, they can be triggered by firing multiple calls to the same event on $animate. However, the restrictions surrounding this
- * are that each of the elements must have the same CSS className value as well as the same parent element. A stagger operation
- * will also be reset if one or more animation frames have passed since the multiple calls to `$animate` were fired.
- *
- * The following code will issue the **ng-leave-stagger** event on the element provided:
- *
- * ```js
- * var kids = parent.children();
- *
- * $animate.leave(kids[0]); //stagger index=0
- * $animate.leave(kids[1]); //stagger index=1
- * $animate.leave(kids[2]); //stagger index=2
- * $animate.leave(kids[3]); //stagger index=3
- * $animate.leave(kids[4]); //stagger index=4
- *
- * window.requestAnimationFrame(function() {
- * //stagger has reset itself
- * $animate.leave(kids[5]); //stagger index=0
- * $animate.leave(kids[6]); //stagger index=1
- *
- * $scope.$digest();
- * });
- * ```
- *
- * Stagger animations are currently only supported within CSS-defined animations.
- *
- * ### The `ng-animate` CSS class
- *
- * When ngAnimate is animating an element it will apply the `ng-animate` CSS class to the element for the duration of the animation.
- * This is a temporary CSS class and it will be removed once the animation is over (for both JavaScript and CSS-based animations).
- *
- * Therefore, animations can be applied to an element using this temporary class directly via CSS.
- *
- * ```css
- * .zipper.ng-animate {
- * transition:0.5s linear all;
- * }
- * .zipper.ng-enter {
- * opacity:0;
- * }
- * .zipper.ng-enter.ng-enter-active {
- * opacity:1;
- * }
- * .zipper.ng-leave {
- * opacity:1;
- * }
- * .zipper.ng-leave.ng-leave-active {
- * opacity:0;
- * }
- * ```
- *
- * (Note that the `ng-animate` CSS class is reserved and it cannot be applied on an element directly since ngAnimate will always remove
- * the CSS class once an animation has completed.)
- *
- *
- * ## JavaScript-based Animations
- *
- * ngAnimate also allows for animations to be consumed by JavaScript code. The approach is similar to CSS-based animations (where there is a shared
- * CSS class that is referenced in our HTML code) but in addition we need to register the JavaScript animation on the module. By making use of the
- * `module.animation()` module function we can register the ainmation.
- *
- * Let's see an example of a enter/leave animation using `ngRepeat`:
- *
- * ```html
- * <div ng-repeat="item in items" class="slide">
- * {{ item }}
- * </div>
- * ```
- *
- * See the **slide** CSS class? Let's use that class to define an animation that we'll structure in our module code by using `module.animation`:
- *
- * ```js
- * myModule.animation('.slide', [function() {
- * return {
- * // make note that other events (like addClass/removeClass)
- * // have different function input parameters
- * enter: function(element, doneFn) {
- * jQuery(element).fadeIn(1000, doneFn);
- *
- * // remember to call doneFn so that angular
- * // knows that the animation has concluded
- * },
- *
- * move: function(element, doneFn) {
- * jQuery(element).fadeIn(1000, doneFn);
- * },
- *
- * leave: function(element, doneFn) {
- * jQuery(element).fadeOut(1000, doneFn);
- * }
- * }
- * }]);
- * ```
- *
- * The nice thing about JS-based animations is that we can inject other services and make use of advanced animation libraries such as
- * greensock.js and velocity.js.
- *
- * If our animation code class-based (meaning that something like `ngClass`, `ngHide` and `ngShow` triggers it) then we can still define
- * our animations inside of the same registered animation, however, the function input arguments are a bit different:
- *
- * ```html
- * <div ng-class="color" class="colorful">
- * this box is moody
- * </div>
- * <button ng-click="color='red'">Change to red</button>
- * <button ng-click="color='blue'">Change to blue</button>
- * <button ng-click="color='green'">Change to green</button>
- * ```
- *
- * ```js
- * myModule.animation('.colorful', [function() {
- * return {
- * addClass: function(element, className, doneFn) {
- * // do some cool animation and call the doneFn
- * },
- * removeClass: function(element, className, doneFn) {
- * // do some cool animation and call the doneFn
- * },
- * setClass: function(element, addedClass, removedClass, doneFn) {
- * // do some cool animation and call the doneFn
- * }
- * }
- * }]);
- * ```
- *
- * ## CSS + JS Animations Together
- *
- * AngularJS 1.4 and higher has taken steps to make the amalgamation of CSS and JS animations more flexible. However, unlike earlier versions of Angular,
- * defining CSS and JS animations to work off of the same CSS class will not work anymore. Therefore the example below will only result in **JS animations taking
- * charge of the animation**:
- *
- * ```html
- * <div ng-if="bool" class="slide">
- * Slide in and out
- * </div>
- * ```
- *
- * ```js
- * myModule.animation('.slide', [function() {
- * return {
- * enter: function(element, doneFn) {
- * jQuery(element).slideIn(1000, doneFn);
- * }
- * }
- * }]);
- * ```
- *
- * ```css
- * .slide.ng-enter {
- * transition:0.5s linear all;
- * transform:translateY(-100px);
- * }
- * .slide.ng-enter.ng-enter-active {
- * transform:translateY(0);
- * }
- * ```
- *
- * Does this mean that CSS and JS animations cannot be used together? Do JS-based animations always have higher priority? We can make up for the
- * lack of CSS animations by using the `$animateCss` service to trigger our own tweaked-out, CSS-based animations directly from
- * our own JS-based animation code:
- *
- * ```js
- * myModule.animation('.slide', ['$animateCss', function($animateCss) {
- * return {
- * enter: function(element) {
-* // this will trigger `.slide.ng-enter` and `.slide.ng-enter-active`.
- * return $animateCss(element, {
- * event: 'enter',
- * structural: true
- * });
- * }
- * }
- * }]);
- * ```
- *
- * The nice thing here is that we can save bandwidth by sticking to our CSS-based animation code and we don't need to rely on a 3rd-party animation framework.
- *
- * The `$animateCss` service is very powerful since we can feed in all kinds of extra properties that will be evaluated and fed into a CSS transition or
- * keyframe animation. For example if we wanted to animate the height of an element while adding and removing classes then we can do so by providing that
- * data into `$animateCss` directly:
- *
- * ```js
- * myModule.animation('.slide', ['$animateCss', function($animateCss) {
- * return {
- * enter: function(element) {
- * return $animateCss(element, {
- * event: 'enter',
- * structural: true,
- * addClass: 'maroon-setting',
- * from: { height:0 },
- * to: { height: 200 }
- * });
- * }
- * }
- * }]);
- * ```
- *
- * Now we can fill in the rest via our transition CSS code:
- *
- * ```css
- * /&#42; the transition tells ngAnimate to make the animation happen &#42;/
- * .slide.ng-enter { transition:0.5s linear all; }
- *
- * /&#42; this extra CSS class will be absorbed into the transition
- * since the $animateCss code is adding the class &#42;/
- * .maroon-setting { background:red; }
- * ```
- *
- * And `$animateCss` will figure out the rest. Just make sure to have the `done()` callback fire the `doneFn` function to signal when the animation is over.
- *
- * To learn more about what's possible be sure to visit the {@link ngAnimate.$animateCss $animateCss service}.
- *
- * ## Animation Anchoring (via `ng-animate-ref`)
- *
- * ngAnimate in AngularJS 1.4 comes packed with the ability to cross-animate elements between
- * structural areas of an application (like views) by pairing up elements using an attribute
- * called `ng-animate-ref`.
- *
- * Let's say for example we have two views that are managed by `ng-view` and we want to show
- * that there is a relationship between two components situated in within these views. By using the
- * `ng-animate-ref` attribute we can identify that the two components are paired together and we
- * can then attach an animation, which is triggered when the view changes.
- *
- * Say for example we have the following template code:
- *
- * ```html
- * <!-- index.html -->
- * <div ng-view class="view-animation">
- * </div>
- *
- * <!-- home.html -->
- * <a href="#/banner-page">
- * <img src="./banner.jpg" class="banner" ng-animate-ref="banner">
- * </a>
- *
- * <!-- banner-page.html -->
- * <img src="./banner.jpg" class="banner" ng-animate-ref="banner">
- * ```
- *
- * Now, when the view changes (once the link is clicked), ngAnimate will examine the
- * HTML contents to see if there is a match reference between any components in the view
- * that is leaving and the view that is entering. It will scan both the view which is being
- * removed (leave) and inserted (enter) to see if there are any paired DOM elements that
- * contain a matching ref value.
- *
- * The two images match since they share the same ref value. ngAnimate will now create a
- * transport element (which is a clone of the first image element) and it will then attempt
- * to animate to the position of the second image element in the next view. For the animation to
- * work a special CSS class called `ng-anchor` will be added to the transported element.
- *
- * We can now attach a transition onto the `.banner.ng-anchor` CSS class and then
- * ngAnimate will handle the entire transition for us as well as the addition and removal of
- * any changes of CSS classes between the elements:
- *
- * ```css
- * .banner.ng-anchor {
- * /&#42; this animation will last for 1 second since there are
- * two phases to the animation (an `in` and an `out` phase) &#42;/
- * transition:0.5s linear all;
- * }
- * ```
- *
- * We also **must** include animations for the views that are being entered and removed
- * (otherwise anchoring wouldn't be possible since the new view would be inserted right away).
- *
- * ```css
- * .view-animation.ng-enter, .view-animation.ng-leave {
- * transition:0.5s linear all;
- * position:fixed;
- * left:0;
- * top:0;
- * width:100%;
- * }
- * .view-animation.ng-enter {
- * transform:translateX(100%);
- * }
- * .view-animation.ng-leave,
- * .view-animation.ng-enter.ng-enter-active {
- * transform:translateX(0%);
- * }
- * .view-animation.ng-leave.ng-leave-active {
- * transform:translateX(-100%);
- * }
- * ```
- *
- * Now we can jump back to the anchor animation. When the animation happens, there are two stages that occur:
- * an `out` and an `in` stage. The `out` stage happens first and that is when the element is animated away
- * from its origin. Once that animation is over then the `in` stage occurs which animates the
- * element to its destination. The reason why there are two animations is to give enough time
- * for the enter animation on the new element to be ready.
- *
- * The example above sets up a transition for both the in and out phases, but we can also target the out or
- * in phases directly via `ng-anchor-out` and `ng-anchor-in`.
- *
- * ```css
- * .banner.ng-anchor-out {
- * transition: 0.5s linear all;
- *
- * /&#42; the scale will be applied during the out animation,
- * but will be animated away when the in animation runs &#42;/
- * transform: scale(1.2);
- * }
- *
- * .banner.ng-anchor-in {
- * transition: 1s linear all;
- * }
- * ```
- *
- *
- *
- *
- * ### Anchoring Demo
- *
- <example module="anchoringExample"
- name="anchoringExample"
- id="anchoringExample"
- deps="angular-animate.js;angular-route.js"
- animations="true">
- <file name="index.html">
- <a href="#/">Home</a>
- <hr />
- <div class="view-container">
- <div ng-view class="view"></div>
- </div>
- </file>
- <file name="script.js">
- angular.module('anchoringExample', ['ngAnimate', 'ngRoute'])
- .config(['$routeProvider', function($routeProvider) {
- $routeProvider.when('/', {
- templateUrl: 'home.html',
- controller: 'HomeController as home'
- });
- $routeProvider.when('/profile/:id', {
- templateUrl: 'profile.html',
- controller: 'ProfileController as profile'
- });
- }])
- .run(['$rootScope', function($rootScope) {
- $rootScope.records = [
- { id:1, title: "Miss Beulah Roob" },
- { id:2, title: "Trent Morissette" },
- { id:3, title: "Miss Ava Pouros" },
- { id:4, title: "Rod Pouros" },
- { id:5, title: "Abdul Rice" },
- { id:6, title: "Laurie Rutherford Sr." },
- { id:7, title: "Nakia McLaughlin" },
- { id:8, title: "Jordon Blanda DVM" },
- { id:9, title: "Rhoda Hand" },
- { id:10, title: "Alexandrea Sauer" }
- ];
- }])
- .controller('HomeController', [function() {
- //empty
- }])
- .controller('ProfileController', ['$rootScope', '$routeParams', function($rootScope, $routeParams) {
- var index = parseInt($routeParams.id, 10);
- var record = $rootScope.records[index - 1];
-
- this.title = record.title;
- this.id = record.id;
- }]);
- </file>
- <file name="home.html">
- <h2>Welcome to the home page</h1>
- <p>Please click on an element</p>
- <a class="record"
- ng-href="#/profile/{{ record.id }}"
- ng-animate-ref="{{ record.id }}"
- ng-repeat="record in records">
- {{ record.title }}
- </a>
- </file>
- <file name="profile.html">
- <div class="profile record" ng-animate-ref="{{ profile.id }}">
- {{ profile.title }}
- </div>
- </file>
- <file name="animations.css">
- .record {
- display:block;
- font-size:20px;
- }
- .profile {
- background:black;
- color:white;
- font-size:100px;
- }
- .view-container {
- position:relative;
- }
- .view-container > .view.ng-animate {
- position:absolute;
- top:0;
- left:0;
- width:100%;
- min-height:500px;
- }
- .view.ng-enter, .view.ng-leave,
- .record.ng-anchor {
- transition:0.5s linear all;
- }
- .view.ng-enter {
- transform:translateX(100%);
- }
- .view.ng-enter.ng-enter-active, .view.ng-leave {
- transform:translateX(0%);
- }
- .view.ng-leave.ng-leave-active {
- transform:translateX(-100%);
- }
- .record.ng-anchor-out {
- background:red;
- }
- </file>
- </example>
- *
- * ### How is the element transported?
- *
- * When an anchor animation occurs, ngAnimate will clone the starting element and position it exactly where the starting
- * element is located on screen via absolute positioning. The cloned element will be placed inside of the root element
- * of the application (where ng-app was defined) and all of the CSS classes of the starting element will be applied. The
- * element will then animate into the `out` and `in` animations and will eventually reach the coordinates and match
- * the dimensions of the destination element. During the entire animation a CSS class of `.ng-animate-shim` will be applied
- * to both the starting and destination elements in order to hide them from being visible (the CSS styling for the class
- * is: `visibility:hidden`). Once the anchor reaches its destination then it will be removed and the destination element
- * will become visible since the shim class will be removed.
- *
- * ### How is the morphing handled?
- *
- * CSS Anchoring relies on transitions and keyframes and the internal code is intelligent enough to figure out
- * what CSS classes differ between the starting element and the destination element. These different CSS classes
- * will be added/removed on the anchor element and a transition will be applied (the transition that is provided
- * in the anchor class). Long story short, ngAnimate will figure out what classes to add and remove which will
- * make the transition of the element as smooth and automatic as possible. Be sure to use simple CSS classes that
- * do not rely on DOM nesting structure so that the anchor element appears the same as the starting element (since
- * the cloned element is placed inside of root element which is likely close to the body element).
- *
- * Note that if the root element is on the `<html>` element then the cloned node will be placed inside of body.
- *
- *
- * ## Using $animate in your directive code
- *
- * So far we've explored how to feed in animations into an Angular application, but how do we trigger animations within our own directives in our application?
- * By injecting the `$animate` service into our directive code, we can trigger structural and class-based hooks which can then be consumed by animations. Let's
- * imagine we have a greeting box that shows and hides itself when the data changes
- *
- * ```html
- * <greeting-box active="onOrOff">Hi there</greeting-box>
- * ```
- *
- * ```js
- * ngModule.directive('greetingBox', ['$animate', function($animate) {
- * return function(scope, element, attrs) {
- * attrs.$observe('active', function(value) {
- * value ? $animate.addClass(element, 'on') : $animate.removeClass(element, 'on');
- * });
- * });
- * }]);
- * ```
- *
- * Now the `on` CSS class is added and removed on the greeting box component. Now if we add a CSS class on top of the greeting box element
- * in our HTML code then we can trigger a CSS or JS animation to happen.
- *
- * ```css
- * /&#42; normally we would create a CSS class to reference on the element &#42;/
- * greeting-box.on { transition:0.5s linear all; background:green; color:white; }
- * ```
- *
- * The `$animate` service contains a variety of other methods like `enter`, `leave`, `animate` and `setClass`. To learn more about what's
- * possible be sure to visit the {@link ng.$animate $animate service API page}.
- *
- *
- * ### Preventing Collisions With Third Party Libraries
- *
- * Some third-party frameworks place animation duration defaults across many element or className
- * selectors in order to make their code small and reuseable. This can lead to issues with ngAnimate, which
- * is expecting actual animations on these elements and has to wait for their completion.
- *
- * You can prevent this unwanted behavior by using a prefix on all your animation classes:
- *
- * ```css
- * /&#42; prefixed with animate- &#42;/
- * .animate-fade-add.animate-fade-add-active {
- * transition:1s linear all;
- * opacity:0;
- * }
- * ```
- *
- * You then configure `$animate` to enforce this prefix:
- *
- * ```js
- * $animateProvider.classNameFilter(/animate-/);
- * ```
- *
- * This also may provide your application with a speed boost since only specific elements containing CSS class prefix
- * will be evaluated for animation when any DOM changes occur in the application.
- *
- * ## Callbacks and Promises
- *
- * When `$animate` is called it returns a promise that can be used to capture when the animation has ended. Therefore if we were to trigger
- * an animation (within our directive code) then we can continue performing directive and scope related activities after the animation has
- * ended by chaining onto the returned promise that animation method returns.
- *
- * ```js
- * // somewhere within the depths of the directive
- * $animate.enter(element, parent).then(function() {
- * //the animation has completed
- * });
- * ```
- *
- * (Note that earlier versions of Angular prior to v1.4 required the promise code to be wrapped using `$scope.$apply(...)`. This is not the case
- * anymore.)
- *
- * In addition to the animation promise, we can also make use of animation-related callbacks within our directives and controller code by registering
- * an event listener using the `$animate` service. Let's say for example that an animation was triggered on our view
- * routing controller to hook into that:
- *
- * ```js
- * ngModule.controller('HomePageController', ['$animate', function($animate) {
- * $animate.on('enter', ngViewElement, function(element) {
- * // the animation for this route has completed
- * }]);
- * }])
- * ```
- *
- * (Note that you will need to trigger a digest within the callback to get angular to notice any scope-related changes.)
- */
-
-/**
- * @ngdoc service
- * @name $animate
- * @kind object
- *
- * @description
- * The ngAnimate `$animate` service documentation is the same for the core `$animate` service.
- *
- * Click here {@link ng.$animate to learn more about animations with `$animate`}.
- */
-angular.module('ngAnimate', [])
- .directive('ngAnimateChildren', $$AnimateChildrenDirective)
- .factory('$$rAFScheduler', $$rAFSchedulerFactory)
-
- .factory('$$AnimateRunner', $$AnimateRunnerFactory)
- .factory('$$animateAsyncRun', $$AnimateAsyncRunFactory)
-
- .provider('$$animateQueue', $$AnimateQueueProvider)
- .provider('$$animation', $$AnimationProvider)
-
- .provider('$animateCss', $AnimateCssProvider)
- .provider('$$animateCssDriver', $$AnimateCssDriverProvider)
-
- .provider('$$animateJs', $$AnimateJsProvider)
- .provider('$$animateJsDriver', $$AnimateJsDriverProvider);
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js
deleted file mode 100644
index 9461603d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(H,u,Sa){'use strict';function wa(a,b,c){if(!a)throw ngMinErr("areq",b||"?",c||"required");return a}function xa(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;X(a)&&(a=a.join(" "));X(b)&&(b=b.join(" "));return a+" "+b}function Ia(a){var b={};a&&(a.to||a.from)&&(b.to=a.to,b.from=a.from);return b}function T(a,b,c){var d="";a=X(a)?a:a&&I(a)&&a.length?a.split(/\s+/):[];q(a,function(a,s){a&&0<a.length&&(d+=0<s?" ":"",d+=c?b+a:a+b)});return d}function Ja(a){if(a instanceof L)switch(a.length){case 0:return[];
-case 1:if(1===a[0].nodeType)return a;break;default:return L(ma(a))}if(1===a.nodeType)return L(a)}function ma(a){if(!a[0])return a;for(var b=0;b<a.length;b++){var c=a[b];if(1==c.nodeType)return c}}function Ka(a,b,c){q(b,function(b){a.addClass(b,c)})}function La(a,b,c){q(b,function(b){a.removeClass(b,c)})}function N(a){return function(b,c){c.addClass&&(Ka(a,b,c.addClass),c.addClass=null);c.removeClass&&(La(a,b,c.removeClass),c.removeClass=null)}}function ia(a){a=a||{};if(!a.$$prepared){var b=a.domOperation||
-M;a.domOperation=function(){a.$$domOperationFired=!0;b();b=M};a.$$prepared=!0}return a}function da(a,b){ya(a,b);za(a,b)}function ya(a,b){b.from&&(a.css(b.from),b.from=null)}function za(a,b){b.to&&(a.css(b.to),b.to=null)}function Q(a,b,c){var d=(b.addClass||"")+" "+(c.addClass||""),e=(b.removeClass||"")+" "+(c.removeClass||"");a=Ma(a.attr("class"),d,e);c.preparationClasses&&(b.preparationClasses=Y(c.preparationClasses,b.preparationClasses),delete c.preparationClasses);d=b.domOperation!==M?b.domOperation:
-null;Aa(b,c);d&&(b.domOperation=d);b.addClass=a.addClass?a.addClass:null;b.removeClass=a.removeClass?a.removeClass:null;return b}function Ma(a,b,c){function d(a){I(a)&&(a=a.split(" "));var b={};q(a,function(a){a.length&&(b[a]=!0)});return b}var e={};a=d(a);b=d(b);q(b,function(a,b){e[b]=1});c=d(c);q(c,function(a,b){e[b]=1===e[b]?null:-1});var s={addClass:"",removeClass:""};q(e,function(b,c){var e,d;1===b?(e="addClass",d=!a[c]):-1===b&&(e="removeClass",d=a[c]);d&&(s[e].length&&(s[e]+=" "),s[e]+=c)});
-return s}function B(a){return a instanceof u.element?a[0]:a}function Na(a,b,c){var d="";b&&(d=T(b,"ng-",!0));c.addClass&&(d=Y(d,T(c.addClass,"-add")));c.removeClass&&(d=Y(d,T(c.removeClass,"-remove")));d.length&&(c.preparationClasses=d,a.addClass(d))}function ja(a,b){var c=b?"-"+b+"s":"";ea(a,[fa,c]);return[fa,c]}function na(a,b){var c=b?"paused":"",d=U+"PlayState";ea(a,[d,c]);return[d,c]}function ea(a,b){a.style[b[0]]=b[1]}function Y(a,b){return a?b?a+" "+b:a:b}function Ba(a,b,c){var d=Object.create(null),
-e=a.getComputedStyle(b)||{};q(c,function(a,b){var c=e[a];if(c){var v=c.charAt(0);if("-"===v||"+"===v||0<=v)c=Oa(c);0===c&&(c=null);d[b]=c}});return d}function Oa(a){var b=0;a=a.split(/\s*,\s*/);q(a,function(a){"s"==a.charAt(a.length-1)&&(a=a.substring(0,a.length-1));a=parseFloat(a)||0;b=b?Math.max(a,b):a});return b}function oa(a){return 0===a||null!=a}function Ca(a,b){var c=O,d=a+"s";b?c+="Duration":d+=" linear all";return[c,d]}function Da(){var a=Object.create(null);return{flush:function(){a=Object.create(null)},
-count:function(b){return(b=a[b])?b.total:0},get:function(b){return(b=a[b])&&b.value},put:function(b,c){a[b]?a[b].total++:a[b]={total:1,value:c}}}}function Ea(a,b,c){q(c,function(c){a[c]=V(a[c])?a[c]:b.style.getPropertyValue(c)})}var M=u.noop,Aa=u.extend,L=u.element,q=u.forEach,X=u.isArray,I=u.isString,pa=u.isObject,qa=u.isUndefined,V=u.isDefined,Fa=u.isFunction,ra=u.isElement,O,sa,U,ta;qa(H.ontransitionend)&&V(H.onwebkittransitionend)?(O="WebkitTransition",sa="webkitTransitionEnd transitionend"):
-(O="transition",sa="transitionend");qa(H.onanimationend)&&V(H.onwebkitanimationend)?(U="WebkitAnimation",ta="webkitAnimationEnd animationend"):(U="animation",ta="animationend");var ka=U+"Delay",ua=U+"Duration",fa=O+"Delay";H=O+"Duration";var Pa={transitionDuration:H,transitionDelay:fa,transitionProperty:O+"Property",animationDuration:ua,animationDelay:ka,animationIterationCount:U+"IterationCount"},Qa={transitionDuration:H,transitionDelay:fa,animationDuration:ua,animationDelay:ka};u.module("ngAnimate",
-[]).directive("ngAnimateChildren",[function(){return function(a,b,c){a=c.ngAnimateChildren;u.isString(a)&&0===a.length?b.data("$$ngAnimateChildren",!0):c.$observe("ngAnimateChildren",function(a){b.data("$$ngAnimateChildren","on"===a||"true"===a)})}}]).factory("$$rAFScheduler",["$$rAF",function(a){function b(a){d=d.concat(a);c()}function c(){if(d.length){for(var b=d.shift(),h=0;h<b.length;h++)b[h]();e||a(function(){e||c()})}}var d,e;d=b.queue=[];b.waitUntilQuiet=function(b){e&&e();e=a(function(){e=
-null;b();c()})};return b}]).factory("$$AnimateRunner",["$q","$sniffer","$$animateAsyncRun",function(a,b,c){function d(a){this.setHost(a);this._doneCallbacks=[];this._runInAnimationFrame=c();this._state=0}d.chain=function(a,b){function c(){if(d===a.length)b(!0);else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};d.all=function(a,b){function c(h){v=v&&h;++d===a.length&&b(v)}var d=0,v=!0;q(a,function(a){a.done(c)})};d.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?
-a():this._doneCallbacks.push(a)},progress:M,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();
-this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._runInAnimationFrame(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=0,this._state=2)}};return d}]).factory("$$animateAsyncRun",["$$rAF",function(a){function b(b){c.push(b);1<c.length||a(function(){for(var a=0;a<c.length;a++)c[a]();c=[]})}var c=[];return function(){var a=
-!1;b(function(){a=!0});return function(c){a?c():b(c)}}}]).provider("$$animateQueue",["$animateProvider",function(a){function b(a,b,c,q){return d[a].some(function(a){return a(b,c,q)})}function c(a,b){a=a||{};var c=0<(a.addClass||"").length,d=0<(a.removeClass||"").length;return b?c&&d:c||d}var d=this.rules={skip:[],cancel:[],join:[]};d.join.push(function(a,b,d){return!b.structural&&c(b.options)});d.skip.push(function(a,b,d){return!b.structural&&!c(b.options)});d.skip.push(function(a,b,c){return"leave"==
-c.event&&b.structural});d.skip.push(function(a,b,c){return c.structural&&2===c.state&&!b.structural});d.cancel.push(function(a,b,c){return c.structural&&b.structural});d.cancel.push(function(a,b,c){return 2===c.state&&b.structural});d.cancel.push(function(a,b,c){a=b.options;c=c.options;return a.addClass&&a.addClass===c.removeClass||a.removeClass&&a.removeClass===c.addClass});this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite",
-"$$forceReflow",function(d,s,h,g,v,r,$,u,R,C){function D(){var a=!1;return function(b){a?b():s.$$postDigest(function(){a=!0;b()})}}function K(a,b,c){var f=B(b),d=B(a),n=[];(a=t[c])&&q(a,function(a){a.node.contains(f)?n.push(a.callback):"leave"===c&&a.node.contains(d)&&n.push(a.callback)});return n}function l(a,f,k){function n(b,c,f,t){R(function(){var b=K(v,a,c);b.length&&d(function(){q(b,function(b){b(a,f,t)})})});b.progress(c,f,t)}function t(b){var c=a,f=k;f.preparationClasses&&(c.removeClass(f.preparationClasses),
-f.preparationClasses=null);f.activeClasses&&(c.removeClass(f.activeClasses),f.activeClasses=null);Ha(a,k);da(a,k);k.domOperation();h.complete(!b)}var A,v;if(a=Ja(a))A=B(a),v=a.parent();k=ia(k);var h=new $,R=D();X(k.addClass)&&(k.addClass=k.addClass.join(" "));k.addClass&&!I(k.addClass)&&(k.addClass=null);X(k.removeClass)&&(k.removeClass=k.removeClass.join(" "));k.removeClass&&!I(k.removeClass)&&(k.removeClass=null);k.from&&!pa(k.from)&&(k.from=null);k.to&&!pa(k.to)&&(k.to=null);if(!A)return t(),h;
-var z=[A.className,k.addClass,k.removeClass].join(" ");if(!Ra(z))return t(),h;var l=0<=["enter","move","leave"].indexOf(f),g=!G||F.get(A),z=!g&&m.get(A)||{},C=!!z.state;g||C&&1==z.state||(g=!la(a,v,f));if(g)return t(),h;l&&y(a);g={structural:l,element:a,event:f,close:t,options:k,runner:h};if(C){if(b("skip",a,g,z)){if(2===z.state)return t(),h;Q(a,z.options,k);return z.runner}if(b("cancel",a,g,z))if(2===z.state)z.runner.end();else if(z.structural)z.close();else return Q(a,z.options,g.options),z.runner;
-else if(b("join",a,g,z))if(2===z.state)Q(a,k,{});else return Na(a,l?f:null,k),f=g.event=z.event,k=Q(a,z.options,g.options),z.runner}else Q(a,k,{});(C=g.structural)||(C="animate"===g.event&&0<Object.keys(g.options.to||{}).length||c(g.options));if(!C)return t(),w(a),h;var u=(z.counter||0)+1;g.counter=u;x(a,1,g);s.$$postDigest(function(){var b=m.get(A),d=!b,b=b||{},K=0<(a.parent()||[]).length&&("animate"===b.event||b.structural||c(b.options));if(d||b.counter!==u||!K){d&&(Ha(a,k),da(a,k));if(d||l&&b.event!==
-f)k.domOperation(),h.end();K||w(a)}else f=!b.structural&&c(b.options,!0)?"setClass":b.event,x(a,2),b=r(a,f,b.options),b.done(function(b){t(!b);(b=m.get(A))&&b.counter===u&&w(B(a));n(h,f,"close",{})}),h.setHost(b),n(h,f,"start",{})});return h}function y(a){a=B(a).querySelectorAll("[data-ng-animate]");q(a,function(a){var b=parseInt(a.getAttribute("data-ng-animate")),c=m.get(a);switch(b){case 2:c.runner.end();case 1:c&&m.remove(a)}})}function w(a){a=B(a);a.removeAttribute("data-ng-animate");m.remove(a)}
-function f(a,b){return B(a)===B(b)}function la(a,b,c){c=L(g[0].body);var d=f(a,c)||"HTML"===a[0].nodeName,t=f(a,h),n=!1,w;for((a=a.data("$ngAnimatePin"))&&(b=a);b&&b.length;){t||(t=f(b,h));a=b[0];if(1!==a.nodeType)break;var x=m.get(a)||{};n||(n=x.structural||F.get(a));if(qa(w)||!0===w)a=b.data("$$ngAnimateChildren"),V(a)&&(w=a);if(n&&!1===w)break;t||(t=f(b,h),t||(a=b.data("$ngAnimatePin"))&&(b=a));d||(d=f(b,c));b=b.parent()}return(!n||w)&&t&&d}function x(a,b,c){c=c||{};c.state=b;a=B(a);a.setAttribute("data-ng-animate",
-b);c=(b=m.get(a))?Aa(b,c):c;m.put(a,c)}var m=new v,F=new v,G=null,A=s.$watch(function(){return 0===u.totalPendingRequests},function(a){a&&(A(),s.$$postDigest(function(){s.$$postDigest(function(){null===G&&(G=!0)})}))}),t={},n=a.classNameFilter(),Ra=n?function(a){return n.test(a)}:function(){return!0},Ha=N(R);return{on:function(a,b,c){b=ma(b);t[a]=t[a]||[];t[a].push({node:b,callback:c})},off:function(a,b,c){function f(a,b,c){var d=ma(b);return a.filter(function(a){return!(a.node===d&&(!c||a.callback===
-c))})}var d=t[a];d&&(t[a]=1===arguments.length?null:f(d,b,c))},pin:function(a,b){wa(ra(a),"element","not an element");wa(ra(b),"parentElement","not an element");a.data("$ngAnimatePin",b)},push:function(a,b,c,f){c=c||{};c.domOperation=f;return l(a,b,c)},enabled:function(a,b){var c=arguments.length;if(0===c)b=!!G;else if(ra(a)){var f=B(a),d=F.get(f);1===c?b=!d:(b=!!b)?d&&F.remove(f):F.put(f,!0)}else b=G=!!a;return b}}}]}]).provider("$$animation",["$animateProvider",function(a){function b(a){return a.data("$$animationRunner")}
-var c=this.drivers=[];this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(a,e,s,h,g,v){function r(a){function b(a){if(a.processed)return a;a.processed=!0;var f=a.domNode,d=f.parentNode;e.put(f,a);for(var x;d;){if(x=e.get(d)){x.processed||(x=b(x));break}d=d.parentNode}(x||c).children.push(a);return a}var c={children:[]},d,e=new g;for(d=0;d<a.length;d++){var h=a[d];e.put(h.domNode,a[d]={domNode:h.domNode,fn:h.fn,children:[]})}for(d=0;d<a.length;d++)b(a[d]);
-return function(a){var b=[],c=[],d;for(d=0;d<a.children.length;d++)c.push(a.children[d]);a=c.length;var m=0,e=[];for(d=0;d<c.length;d++){var h=c[d];0>=a&&(a=m,m=0,b.push(e),e=[]);e.push(h.fn);h.children.forEach(function(a){m++;c.push(a)});a--}e.length&&b.push(e);return b}(c)}var $=[],u=N(a);return function(g,C,D){function K(a){a=a.hasAttribute("ng-animate-ref")?[a]:a.querySelectorAll("[ng-animate-ref]");var b=[];q(a,function(a){var c=a.getAttribute("ng-animate-ref");c&&c.length&&b.push(a)});return b}
-function l(a){var b=[],c={};q(a,function(a,f){var d=B(a.element),t=0<=["enter","move"].indexOf(a.event),d=a.structural?K(d):[];if(d.length){var m=t?"to":"from";q(d,function(a){var b=a.getAttribute("ng-animate-ref");c[b]=c[b]||{};c[b][m]={animationID:f,element:L(a)}})}else b.push(a)});var f={},d={};q(c,function(c,m){var w=c.from,e=c.to;if(w&&e){var h=a[w.animationID],g=a[e.animationID],x=w.animationID.toString();if(!d[x]){var A=d[x]={structural:!0,beforeStart:function(){h.beforeStart();g.beforeStart()},
-close:function(){h.close();g.close()},classes:y(h.classes,g.classes),from:h,to:g,anchors:[]};A.classes.length?b.push(A):(b.push(h),b.push(g))}d[x].anchors.push({out:w.element,"in":e.element})}else w=w?w.animationID:e.animationID,e=w.toString(),f[e]||(f[e]=!0,b.push(a[w]))});return b}function y(a,b){a=a.split(" ");b=b.split(" ");for(var c=[],f=0;f<a.length;f++){var d=a[f];if("ng-"!==d.substring(0,3))for(var m=0;m<b.length;m++)if(d===b[m]){c.push(d);break}}return c.join(" ")}function w(a){for(var b=
-c.length-1;0<=b;b--){var f=c[b];if(s.has(f)&&(f=s.get(f)(a)))return f}}function f(a,c){a.from&&a.to?(b(a.from.element).setHost(c),b(a.to.element).setHost(c)):b(a.element).setHost(c)}function la(){var a=b(g);!a||"leave"===C&&D.$$domOperationFired||a.end()}function x(b){g.off("$destroy",la);g.removeData("$$animationRunner");u(g,D);da(g,D);D.domOperation();A&&a.removeClass(g,A);g.removeClass("ng-animate");F.complete(!b)}D=ia(D);var m=0<=["enter","move","leave"].indexOf(C),F=new h({end:function(){x()},
-cancel:function(){x(!0)}});if(!c.length)return x(),F;g.data("$$animationRunner",F);var G=xa(g.attr("class"),xa(D.addClass,D.removeClass)),A=D.tempClasses;A&&(G+=" "+A,D.tempClasses=null);$.push({element:g,classes:G,event:C,structural:m,options:D,beforeStart:function(){g.addClass("ng-animate");A&&a.addClass(g,A)},close:x});g.on("$destroy",la);if(1<$.length)return F;e.$$postDigest(function(){var a=[];q($,function(c){b(c.element)?a.push(c):c.close()});$.length=0;var c=l(a),d=[];q(c,function(a){d.push({domNode:B(a.from?
-a.from.element:a.element),fn:function(){a.beforeStart();var c,d=a.close;if(b(a.anchors?a.from.element||a.to.element:a.element)){var m=w(a);m&&(c=m.start)}c?(c=c(),c.done(function(a){d(!a)}),f(a,c)):d()}})});v(r(d))});return F}}]}]).provider("$animateCss",["$animateProvider",function(a){var b=Da(),c=Da();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$animate",function(a,e,s,h,g,v,r,u){function Ga(a,b){var c=a.parentNode;return(c.$$ngAnimateParentKey||
-(c.$$ngAnimateParentKey=++l))+"-"+a.getAttribute("class")+"-"+b}function R(w,f,h,g){var m;0<b.count(h)&&(m=c.get(h),m||(f=T(f,"-stagger"),e.addClass(w,f),m=Ba(a,w,g),m.animationDuration=Math.max(m.animationDuration,0),m.transitionDuration=Math.max(m.transitionDuration,0),e.removeClass(w,f),c.put(h,m)));return m||{}}function C(a){y.push(a);r.waitUntilQuiet(function(){b.flush();c.flush();for(var a=g(),d=0;d<y.length;d++)y[d](a);y.length=0})}function D(c,f,e){f=b.get(e);f||(f=Ba(a,c,Pa),"infinite"===
-f.animationIterationCount&&(f.animationIterationCount=1));b.put(e,f);c=f;e=c.animationDelay;f=c.transitionDelay;c.maxDelay=e&&f?Math.max(e,f):e||f;c.maxDuration=Math.max(c.animationDuration*c.animationIterationCount,c.transitionDuration);return c}var K=N(e),l=0,y=[];return function(a,c){function d(){m()}function g(){m(!0)}function m(b){if(!(ga||va&&k)){ga=!0;k=!1;c.$$skipPreparationClasses||e.removeClass(a,Z);e.removeClass(a,Y);na(n,!1);ja(n,!1);q(y,function(a){n.style[a[0]]=""});K(a,c);da(a,c);Object.keys(t).length&&
-q(t,function(a,b){a?n.style.setProperty(b,a):n.style.removeProperty(b)});if(c.onDone)c.onDone();H&&H.complete(!b)}}function F(a){p.blockTransition&&ja(n,a);p.blockKeyframeAnimation&&na(n,!!a)}function G(){H=new s({end:d,cancel:g});C(M);m();return{$$willAnimate:!1,start:function(){return H},end:d}}function A(){function b(){if(!ga){F(!1);q(y,function(a){n.style[a[0]]=a[1]});K(a,c);e.addClass(a,Y);if(p.recalculateTimingStyles){ha=n.className+" "+Z;aa=Ga(n,ha);E=D(n,ha,aa);W=E.maxDelay;I=Math.max(W,0);
-J=E.maxDuration;if(0===J){m();return}p.hasTransitions=0<E.transitionDuration;p.hasAnimations=0<E.animationDuration}p.applyAnimationDelay&&(W="boolean"!==typeof c.delay&&oa(c.delay)?parseFloat(c.delay):W,I=Math.max(W,0),E.animationDelay=W,ca=[ka,W+"s"],y.push(ca),n.style[ca[0]]=ca[1]);N=1E3*I;z=1E3*J;if(c.easing){var k,l=c.easing;p.hasTransitions&&(k=O+"TimingFunction",y.push([k,l]),n.style[k]=l);p.hasAnimations&&(k=U+"TimingFunction",y.push([k,l]),n.style[k]=l)}E.transitionDuration&&x.push(sa);E.animationDuration&&
-x.push(ta);A=Date.now();var v=N+1.5*z;k=A+v;var l=a.data("$$animateCss")||[],r=!0;if(l.length){var G=l[0];(r=k>G.expectedEndTime)?h.cancel(G.timer):l.push(m)}r&&(v=h(d,v,!1),l[0]={timer:v,expectedEndTime:k},l.push(m),a.data("$$animateCss",l));a.on(x.join(" "),g);c.to&&(c.cleanupStyles&&Ea(t,n,Object.keys(c.to)),za(a,c))}}function d(){var b=a.data("$$animateCss");if(b){for(var c=1;c<b.length;c++)b[c]();a.removeData("$$animateCss")}}function g(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||
-b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-A,0)>=N&&b>=J&&(va=!0,m())}if(!ga)if(n.parentNode){var A,x=[],l=function(a){if(va)k&&a&&(k=!1,m());else if(k=!a,E.animationDuration)if(a=na(n,k),k)y.push(a);else{var b=y,c=b.indexOf(a);0<=a&&b.splice(c,1)}},v=0<V&&(E.transitionDuration&&0===S.transitionDuration||E.animationDuration&&0===S.animationDuration)&&Math.max(S.animationDelay,S.transitionDelay);v?h(b,Math.floor(v*V*1E3),!1):b();L.resume=function(){l(!0)};L.pause=function(){l(!1)}}else m()}
-var t={},n=B(a);if(!n||!n.parentNode||!u.enabled())return G();c=ia(c);var y=[],r=a.attr("class"),l=Ia(c),ga,k,va,H,L,I,N,J,z;if(0===c.duration||!v.animations&&!v.transitions)return G();var ba=c.event&&X(c.event)?c.event.join(" "):c.event,Q="",P="";ba&&c.structural?Q=T(ba,"ng-",!0):ba&&(Q=ba);c.addClass&&(P+=T(c.addClass,"-add"));c.removeClass&&(P.length&&(P+=" "),P+=T(c.removeClass,"-remove"));c.applyClassesEarly&&P.length&&K(a,c);var Z=[Q,P].join(" ").trim(),ha=r+" "+Z,Y=T(Z,"-active"),r=l.to&&0<
-Object.keys(l.to).length;if(!(0<(c.keyframeStyle||"").length||r||Z))return G();var aa,S;0<c.stagger?(l=parseFloat(c.stagger),S={transitionDelay:l,animationDelay:l,transitionDuration:0,animationDuration:0}):(aa=Ga(n,ha),S=R(n,Z,aa,Qa));c.$$skipPreparationClasses||e.addClass(a,Z);c.transitionStyle&&(l=[O,c.transitionStyle],ea(n,l),y.push(l));0<=c.duration&&(l=0<n.style[O].length,l=Ca(c.duration,l),ea(n,l),y.push(l));c.keyframeStyle&&(l=[U,c.keyframeStyle],ea(n,l),y.push(l));var V=S?0<=c.staggerIndex?
-c.staggerIndex:b.count(aa):0;(ba=0===V)&&!c.skipBlocking&&ja(n,9999);var E=D(n,ha,aa),W=E.maxDelay;I=Math.max(W,0);J=E.maxDuration;var p={};p.hasTransitions=0<E.transitionDuration;p.hasAnimations=0<E.animationDuration;p.hasTransitionAll=p.hasTransitions&&"all"==E.transitionProperty;p.applyTransitionDuration=r&&(p.hasTransitions&&!p.hasTransitionAll||p.hasAnimations&&!p.hasTransitions);p.applyAnimationDuration=c.duration&&p.hasAnimations;p.applyTransitionDelay=oa(c.delay)&&(p.applyTransitionDuration||
-p.hasTransitions);p.applyAnimationDelay=oa(c.delay)&&p.hasAnimations;p.recalculateTimingStyles=0<P.length;if(p.applyTransitionDuration||p.applyAnimationDuration)J=c.duration?parseFloat(c.duration):J,p.applyTransitionDuration&&(p.hasTransitions=!0,E.transitionDuration=J,l=0<n.style[O+"Property"].length,y.push(Ca(J,l))),p.applyAnimationDuration&&(p.hasAnimations=!0,E.animationDuration=J,y.push([ua,J+"s"]));if(0===J&&!p.recalculateTimingStyles)return G();if(null!=c.delay){var ca=parseFloat(c.delay);
-p.applyTransitionDelay&&y.push([fa,ca+"s"]);p.applyAnimationDelay&&y.push([ka,ca+"s"])}null==c.duration&&0<E.transitionDuration&&(p.recalculateTimingStyles=p.recalculateTimingStyles||ba);N=1E3*I;z=1E3*J;c.skipBlocking||(p.blockTransition=0<E.transitionDuration,p.blockKeyframeAnimation=0<E.animationDuration&&0<S.animationDelay&&0===S.animationDuration);c.from&&(c.cleanupStyles&&Ea(t,n,Object.keys(c.from)),ya(a,c));p.blockTransition||p.blockKeyframeAnimation?F(J):c.skipBlocking||ja(n,!1);return{$$willAnimate:!0,
-end:d,start:function(){if(!ga)return L={end:d,cancel:g,resume:null,pause:null},H=new s(L),C(A),H}}}}]}]).provider("$$animateCssDriver",["$$animationProvider",function(a){a.drivers.push("$$animateCssDriver");this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(a,c,d,e,s,h,g){function v(a){return a.replace(/\bng-\S+\b/g,"")}function r(a,b){I(a)&&(a=a.split(" "));I(b)&&(b=b.split(" "));return a.filter(function(a){return-1===b.indexOf(a)}).join(" ")}
-function u(c,e,g){function h(a){var b={},c=B(a).getBoundingClientRect();q(["width","height","top","left"],function(a){var d=c[a];switch(a){case "top":d+=C.scrollTop;break;case "left":d+=C.scrollLeft}b[a]=Math.floor(d)+"px"});return b}function f(){var c=v(g.attr("class")||""),d=r(c,m),c=r(m,c),d=a(x,{to:h(g),addClass:"ng-anchor-in "+d,removeClass:"ng-anchor-out "+c,delay:!0});return d.$$willAnimate?d:null}function s(){x.remove();e.removeClass("ng-animate-shim");g.removeClass("ng-animate-shim")}var x=
-L(B(e).cloneNode(!0)),m=v(x.attr("class")||"");e.addClass("ng-animate-shim");g.addClass("ng-animate-shim");x.addClass("ng-anchor");D.append(x);var F;c=function(){var c=a(x,{addClass:"ng-anchor-out",delay:!0,from:h(e)});return c.$$willAnimate?c:null}();if(!c&&(F=f(),!F))return s();var G=c||F;return{start:function(){function a(){c&&c.end()}var b,c=G.start();c.done(function(){c=null;if(!F&&(F=f()))return c=F.start(),c.done(function(){c=null;s();b.complete()}),c;s();b.complete()});return b=new d({end:a,
-cancel:a})}}}function H(a,b,c,e){var f=R(a,M),g=R(b,M),h=[];q(e,function(a){(a=u(c,a.out,a["in"]))&&h.push(a)});if(f||g||0!==h.length)return{start:function(){function a(){q(b,function(a){a.end()})}var b=[];f&&b.push(f.start());g&&b.push(g.start());q(h,function(a){b.push(a.start())});var c=new d({end:a,cancel:a});d.all(b,function(a){c.complete(a)});return c}}}function R(c){var d=c.element,e=c.options||{};c.structural&&(e.event=c.event,e.structural=!0,e.applyClassesEarly=!0,"leave"===c.event&&(e.onDone=
-e.domOperation));e.preparationClasses&&(e.event=Y(e.event,e.preparationClasses));c=a(d,e);return c.$$willAnimate?c:null}if(!s.animations&&!s.transitions)return M;var C=g[0].body;c=B(e);var D=L(c.parentNode&&11===c.parentNode.nodeType||C.contains(c)?c:C);N(h);return function(a){return a.from&&a.to?H(a.from,a.to,a.classes,a.anchors):R(a)}}]}]).provider("$$animateJs",["$animateProvider",function(a){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(b,c,d){function e(c){c=X(c)?c:c.split(" ");
-for(var d=[],e={},r=0;r<c.length;r++){var q=c[r],s=a.$$registeredAnimations[q];s&&!e[q]&&(d.push(b.get(s)),e[q]=!0)}return d}var s=N(d);return function(a,b,d,r){function u(){r.domOperation();s(a,r)}function H(a,b,d,e,f){switch(d){case "animate":b=[b,e.from,e.to,f];break;case "setClass":b=[b,D,K,f];break;case "addClass":b=[b,D,f];break;case "removeClass":b=[b,K,f];break;default:b=[b,f]}b.push(e);if(a=a.apply(a,b))if(Fa(a.start)&&(a=a.start()),a instanceof c)a.done(f);else if(Fa(a))return a;return M}
-function B(a,b,d,e,f){var g=[];q(e,function(e){var h=e[f];h&&g.push(function(){var e,f,g=!1,k=function(a){g||(g=!0,(f||M)(a),e.complete(!a))};e=new c({end:function(){k()},cancel:function(){k(!0)}});f=H(h,a,b,d,function(a){k(!1===a)});return e})});return g}function C(a,b,d,e,f){var g=B(a,b,d,e,f);if(0===g.length){var h,l;"beforeSetClass"===f?(h=B(a,"removeClass",d,e,"beforeRemoveClass"),l=B(a,"addClass",d,e,"beforeAddClass")):"setClass"===f&&(h=B(a,"removeClass",d,e,"removeClass"),l=B(a,"addClass",
-d,e,"addClass"));h&&(g=g.concat(h));l&&(g=g.concat(l))}if(0!==g.length)return function(a){var b=[];g.length&&q(g,function(a){b.push(a())});b.length?c.all(b,a):a();return function(a){q(b,function(b){a?b.cancel():b.end()})}}}3===arguments.length&&pa(d)&&(r=d,d=null);r=ia(r);d||(d=a.attr("class")||"",r.addClass&&(d+=" "+r.addClass),r.removeClass&&(d+=" "+r.removeClass));var D=r.addClass,K=r.removeClass,l=e(d),y,w;if(l.length){var f,I;"leave"==b?(I="leave",f="afterLeave"):(I="before"+b.charAt(0).toUpperCase()+
-b.substr(1),f=b);"enter"!==b&&"move"!==b&&(y=C(a,b,r,l,I));w=C(a,b,r,l,f)}if(y||w)return{start:function(){function b(c){f=!0;u();da(a,r);g.complete(c)}var d,e=[];y&&e.push(function(a){d=y(a)});e.length?e.push(function(a){u();a(!0)}):u();w&&e.push(function(a){d=w(a)});var f=!1,g=new c({end:function(){f||((d||M)(void 0),b(void 0))},cancel:function(){f||((d||M)(!0),b(!0))}});c.chain(e,b);return g}}}}]}]).provider("$$animateJsDriver",["$$animationProvider",function(a){a.drivers.push("$$animateJsDriver");
-this.$get=["$$animateJs","$$AnimateRunner",function(a,c){function d(c){return a(c.element,c.event,c.classes,c.options)}return function(a){if(a.from&&a.to){var b=d(a.from),h=d(a.to);if(b||h)return{start:function(){function a(){return function(){q(d,function(a){a.end()})}}var d=[];b&&d.push(b.start());h&&d.push(h.start());c.all(d,function(a){e.complete(a)});var e=new c({end:a(),cancel:a()});return e}}}else return d(a)}}]}])})(window,window.angular);
-//# sourceMappingURL=angular-animate.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js.map
deleted file mode 100644
index 11d5fe57..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-animate.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-animate.min.js",
-"lineCount":55,
-"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,EAAlB,CAA6B,CAyEtCC,QAASA,GAAS,CAACC,CAAD,CAAMC,CAAN,CAAYC,CAAZ,CAAoB,CACpC,GAAKF,CAAAA,CAAL,CACE,KAAMG,SAAA,CAAS,MAAT,CAA2CF,CAA3C,EAAmD,GAAnD,CAA0DC,CAA1D,EAAoE,UAApE,CAAN,CAEF,MAAOF,EAJ6B,CAOtCI,QAASA,GAAY,CAACC,CAAD,CAAGC,CAAH,CAAM,CACzB,GAAKD,CAAAA,CAAL,EAAWC,CAAAA,CAAX,CAAc,MAAO,EACrB,IAAKD,CAAAA,CAAL,CAAQ,MAAOC,EACf,IAAKA,CAAAA,CAAL,CAAQ,MAAOD,EACXE,EAAA,CAAQF,CAAR,CAAJ,GAAgBA,CAAhB,CAAoBA,CAAAG,KAAA,CAAO,GAAP,CAApB,CACID,EAAA,CAAQD,CAAR,CAAJ,GAAgBA,CAAhB,CAAoBA,CAAAE,KAAA,CAAO,GAAP,CAApB,CACA,OAAOH,EAAP,CAAW,GAAX,CAAiBC,CANQ,CAS3BG,QAASA,GAAa,CAACC,CAAD,CAAU,CAC9B,IAAIC,EAAS,EACTD,EAAJ,GAAgBA,CAAAE,GAAhB,EAA8BF,CAAAG,KAA9B,IACEF,CAAAC,GACA,CADYF,CAAAE,GACZ,CAAAD,CAAAE,KAAA,CAAcH,CAAAG,KAFhB,CAIA,OAAOF,EANuB,CAShCG,QAASA,EAAW,CAACC,CAAD,CAAUC,CAAV,CAAeC,CAAf,CAAyB,CAC3C,IAAIC,EAAY,EAChBH,EAAA,CAAUR,CAAA,CAAQQ,CAAR,CAAA,CACJA,CADI,CAEJA,CAAA,EAAWI,CAAA,CAASJ,CAAT,CAAX,EAAgCA,CAAAK,OAAhC,CACIL,CAAAM,MAAA,CAAc,KAAd,CADJ,CAEI,EACVC,EAAA,CAAQP,CAAR,CAAiB,QAAQ,CAACQ,CAAD,CAAQC,CAAR,CAAW,CAC9BD,CAAJ,EAA4B,CAA5B,CAAaA,CAAAH,OAAb,GACEF,CACA,EADkB,CAAL,CAACM,CAAD,CAAU,GAAV,CAAgB,EAC7B,CAAAN,CAAA,EAAaD,CAAA,CAAWD,CAAX,CAAiBO,CAAjB,CACWA,CADX,CACmBP,CAHlC,CADkC,CAApC,CAOA,OAAOE,EAdoC,CAwB7CO,QAASA,GAAwB,CAACC,CAAD,CAAU,CACzC,GAAIA,CAAJ,WAAuBC,EAAvB,CACE,OAAQD,CAAAN,OAAR,EACE,KAAK,CAAL,CACE,MAAO,EAGT;KAAK,CAAL,CAIE,GAtHWQ,CAsHX,GAAIF,CAAA,CAAQ,CAAR,CAAAG,SAAJ,CACE,MAAOH,EAET,MAEF,SACE,MAAOC,EAAA,CAAOG,EAAA,CAAmBJ,CAAnB,CAAP,CAfX,CAoBF,GAjIiBE,CAiIjB,GAAIF,CAAAG,SAAJ,CACE,MAAOF,EAAA,CAAOD,CAAP,CAvBgC,CA2B3CI,QAASA,GAAkB,CAACJ,CAAD,CAAU,CACnC,GAAK,CAAAA,CAAA,CAAQ,CAAR,CAAL,CAAiB,MAAOA,EACxB,KAAS,IAAAF,EAAI,CAAb,CAAgBA,CAAhB,CAAoBE,CAAAN,OAApB,CAAoCI,CAAA,EAApC,CAAyC,CACvC,IAAIO,EAAML,CAAA,CAAQF,CAAR,CACV,IA1IeI,CA0If,EAAIG,CAAAF,SAAJ,CACE,MAAOE,EAH8B,CAFN,CAUrCC,QAASA,GAAU,CAACC,CAAD,CAAWP,CAAX,CAAoBR,CAApB,CAA+B,CAChDI,CAAA,CAAQI,CAAR,CAAiB,QAAQ,CAACK,CAAD,CAAM,CAC7BE,CAAAC,SAAA,CAAkBH,CAAlB,CAAuBb,CAAvB,CAD6B,CAA/B,CADgD,CAMlDiB,QAASA,GAAa,CAACF,CAAD,CAAWP,CAAX,CAAoBR,CAApB,CAA+B,CACnDI,CAAA,CAAQI,CAAR,CAAiB,QAAQ,CAACK,CAAD,CAAM,CAC7BE,CAAAG,YAAA,CAAqBL,CAArB,CAA0Bb,CAA1B,CAD6B,CAA/B,CADmD,CAMrDmB,QAASA,EAA4B,CAACJ,CAAD,CAAW,CAC9C,MAAO,SAAQ,CAACP,CAAD,CAAUhB,CAAV,CAAmB,CAC5BA,CAAAwB,SAAJ,GACEF,EAAA,CAAWC,CAAX,CAAqBP,CAArB,CAA8BhB,CAAAwB,SAA9B,CACA,CAAAxB,CAAAwB,SAAA,CAAmB,IAFrB,CAIIxB,EAAA0B,YAAJ,GACED,EAAA,CAAcF,CAAd,CAAwBP,CAAxB,CAAiChB,CAAA0B,YAAjC,CACA,CAAA1B,CAAA0B,YAAA,CAAsB,IAFxB,CALgC,CADY,CAahDE,QAASA,GAAuB,CAAC5B,CAAD,CAAU,CACxCA,CAAA,CAAUA,CAAV,EAAqB,EACrB,IAAK6B,CAAA7B,CAAA6B,WAAL,CAAyB,CACvB,IAAIC,EAAe9B,CAAA8B,aAAfA;AAAuCC,CAC3C/B,EAAA8B,aAAA,CAAuBE,QAAQ,EAAG,CAChChC,CAAAiC,oBAAA,CAA8B,CAAA,CAC9BH,EAAA,EACAA,EAAA,CAAeC,CAHiB,CAKlC/B,EAAA6B,WAAA,CAAqB,CAAA,CAPE,CASzB,MAAO7B,EAXiC,CAc1CkC,QAASA,GAAoB,CAAClB,CAAD,CAAUhB,CAAV,CAAmB,CAC9CmC,EAAA,CAAyBnB,CAAzB,CAAkChB,CAAlC,CACAoC,GAAA,CAAuBpB,CAAvB,CAAgChB,CAAhC,CAF8C,CAKhDmC,QAASA,GAAwB,CAACnB,CAAD,CAAUhB,CAAV,CAAmB,CAC9CA,CAAAG,KAAJ,GACEa,CAAAqB,IAAA,CAAYrC,CAAAG,KAAZ,CACA,CAAAH,CAAAG,KAAA,CAAe,IAFjB,CADkD,CAOpDiC,QAASA,GAAsB,CAACpB,CAAD,CAAUhB,CAAV,CAAmB,CAC5CA,CAAAE,GAAJ,GACEc,CAAAqB,IAAA,CAAYrC,CAAAE,GAAZ,CACA,CAAAF,CAAAE,GAAA,CAAa,IAFf,CADgD,CAOlDoC,QAASA,EAAqB,CAACtB,CAAD,CAAUuB,CAAV,CAAkBC,CAAlB,CAA8B,CAC1D,IAAIC,GAASF,CAAAf,SAATiB,EAA4B,EAA5BA,EAAkC,GAAlCA,EAAyCD,CAAAhB,SAAzCiB,EAAgE,EAAhEA,CAAJ,CACIC,GAAYH,CAAAb,YAAZgB,EAAkC,EAAlCA,EAAwC,GAAxCA,EAA+CF,CAAAd,YAA/CgB,EAAyE,EAAzEA,CACArC,EAAAA,CAAUsC,EAAA,CAAsB3B,CAAA4B,KAAA,CAAa,OAAb,CAAtB,CAA6CH,CAA7C,CAAoDC,CAApD,CAEVF,EAAAK,mBAAJ,GACEN,CAAAM,mBACA,CAD4BC,CAAA,CAAgBN,CAAAK,mBAAhB,CAA+CN,CAAAM,mBAA/C,CAC5B,CAAA,OAAOL,CAAAK,mBAFT,CAMIE,EAAAA,CAAmBR,CAAAT,aAAA,GAAwBC,CAAxB,CAA+BQ,CAAAT,aAA/B;AAAqD,IAE5EkB,GAAA,CAAOT,CAAP,CAAeC,CAAf,CAGIO,EAAJ,GACER,CAAAT,aADF,CACwBiB,CADxB,CAKER,EAAAf,SAAA,CADEnB,CAAAmB,SAAJ,CACoBnB,CAAAmB,SADpB,CAGoB,IAIlBe,EAAAb,YAAA,CADErB,CAAAqB,YAAJ,CACuBrB,CAAAqB,YADvB,CAGuB,IAGvB,OAAOa,EAhCmD,CAmC5DI,QAASA,GAAqB,CAACM,CAAD,CAAWR,CAAX,CAAkBC,CAAlB,CAA4B,CAuCxDQ,QAASA,EAAoB,CAAC7C,CAAD,CAAU,CACjCI,CAAA,CAASJ,CAAT,CAAJ,GACEA,CADF,CACYA,CAAAM,MAAA,CAAc,GAAd,CADZ,CAIA,KAAIwC,EAAM,EACVvC,EAAA,CAAQP,CAAR,CAAiB,QAAQ,CAACQ,CAAD,CAAQ,CAG3BA,CAAAH,OAAJ,GACEyC,CAAA,CAAItC,CAAJ,CADF,CACe,CAAA,CADf,CAH+B,CAAjC,CAOA,OAAOsC,EAb8B,CAnCvC,IAAIC,EAAQ,EACZH,EAAA,CAAWC,CAAA,CAAqBD,CAArB,CAEXR,EAAA,CAAQS,CAAA,CAAqBT,CAArB,CACR7B,EAAA,CAAQ6B,CAAR,CAAe,QAAQ,CAACY,CAAD,CAAQC,CAAR,CAAa,CAClCF,CAAA,CAAME,CAAN,CAAA,CARcC,CAOoB,CAApC,CAIAb,EAAA,CAAWQ,CAAA,CAAqBR,CAArB,CACX9B,EAAA,CAAQ8B,CAAR,CAAkB,QAAQ,CAACW,CAAD,CAAQC,CAAR,CAAa,CACrCF,CAAA,CAAME,CAAN,CAAA,CAbcC,CAaD,GAAAH,CAAA,CAAME,CAAN,CAAA,CAA2B,IAA3B,CAZKE,EAWmB,CAAvC,CAIA,KAAInD,EAAU,CACZmB,SAAU,EADE,CAEZE,YAAa,EAFD,CAKdd,EAAA,CAAQwC,CAAR,CAAe,QAAQ,CAACK,CAAD,CAAM5C,CAAN,CAAa,CAAA,IAC9B6C,CAD8B,CACxBC,CAtBIJ,EAuBd,GAAIE,CAAJ,EACEC,CACA,CADO,UACP,CAAAC,CAAA,CAAQ,CAACV,CAAA,CAASpC,CAAT,CAFX,EAtBkB2C,EAsBlB,GAGWC,CAHX,GAIEC,CACA,CADO,aACP,CAAAC,CAAA,CAAQV,CAAA,CAASpC,CAAT,CALV,CAOI8C,EAAJ,GACMtD,CAAA,CAAQqD,CAAR,CAAAhD,OAGJ,GAFEL,CAAA,CAAQqD,CAAR,CAEF,EAFmB,GAEnB,EAAArD,CAAA,CAAQqD,CAAR,CAAA,EAAiB7C,CAJnB,CATkC,CAApC,CAiCA;MAAOR,EAvDiD,CA0D1DuD,QAASA,EAAU,CAAC5C,CAAD,CAAU,CAC3B,MAAQA,EAAD,WAAoB7B,EAAA6B,QAApB,CAAuCA,CAAA,CAAQ,CAAR,CAAvC,CAAoDA,CADhC,CAI7B6C,QAASA,GAAgC,CAAC7C,CAAD,CAAU8C,CAAV,CAAiB9D,CAAjB,CAA0B,CACjE,IAAIK,EAAU,EACVyD,EAAJ,GACEzD,CADF,CACYD,CAAA,CAAY0D,CAAZ,CAzSWC,KAySX,CAAuC,CAAA,CAAvC,CADZ,CAGI/D,EAAAwB,SAAJ,GACEnB,CADF,CACYyC,CAAA,CAAgBzC,CAAhB,CAAyBD,CAAA,CAAYJ,CAAAwB,SAAZ,CA9ShBwC,MA8SgB,CAAzB,CADZ,CAGIhE,EAAA0B,YAAJ,GACErB,CADF,CACYyC,CAAA,CAAgBzC,CAAhB,CAAyBD,CAAA,CAAYJ,CAAA0B,YAAZ,CAhTbuC,SAgTa,CAAzB,CADZ,CAGI5D,EAAAK,OAAJ,GACEV,CAAA6C,mBACA,CAD6BxC,CAC7B,CAAAW,CAAAQ,SAAA,CAAiBnB,CAAjB,CAFF,CAXiE,CA4BnE6D,QAASA,GAAgB,CAACC,CAAD,CAAOC,CAAP,CAAiB,CAIxC,IAAIf,EAAQe,CAAA,CAAW,GAAX,CAAiBA,CAAjB,CAA4B,GAA5B,CAAkC,EAC9CC,GAAA,CAAiBF,CAAjB,CAAuB,CAACG,EAAD,CAAwBjB,CAAxB,CAAvB,CACA,OAAO,CAACiB,EAAD,CAAwBjB,CAAxB,CANiC,CAS1CkB,QAASA,GAAuB,CAACJ,CAAD,CAAOK,CAAP,CAAmB,CACjD,IAAInB,EAAQmB,CAAA,CAAa,QAAb,CAAwB,EAApC,CACIlB,EAAMmB,CAANnB,CApSwBoB,WAqS5BL,GAAA,CAAiBF,CAAjB,CAAuB,CAACb,CAAD,CAAMD,CAAN,CAAvB,CACA,OAAO,CAACC,CAAD,CAAMD,CAAN,CAJ0C,CAOnDgB,QAASA,GAAgB,CAACF,CAAD,CAAOQ,CAAP,CAAmB,CAG1CR,CAAAS,MAAA,CAFWD,CAAAjB,CAAW,CAAXA,CAEX,CAAA,CADYiB,CAAAtB,CAAW,CAAXA,CAF8B,CAM5CP,QAASA,EAAe,CAACnD,CAAD,CAAGC,CAAH,CAAM,CAC5B,MAAKD,EAAL,CACKC,CAAL,CACOD,CADP,CACW,GADX,CACiBC,CADjB,CAAeD,CADf,CAAeC,CADa,CA4T9BiF,QAASA,GAAgB,CAACC,CAAD,CAAU9D,CAAV,CAAmB+D,CAAnB,CAA+B,CACtD,IAAI9E,EAAS+E,MAAAC,OAAA,CAAc,IAAd,CAAb;AACIC,EAAiBJ,CAAAK,iBAAA,CAAyBnE,CAAzB,CAAjBkE,EAAsD,EAC1DtE,EAAA,CAAQmE,CAAR,CAAoB,QAAQ,CAACK,CAAD,CAAkBC,CAAlB,CAAmC,CAC7D,IAAI5B,EAAMyB,CAAA,CAAeE,CAAf,CACV,IAAI3B,CAAJ,CAAS,CACP,IAAI6B,EAAI7B,CAAA8B,OAAA,CAAW,CAAX,CAGR,IAAU,GAAV,GAAID,CAAJ,EAAuB,GAAvB,GAAiBA,CAAjB,EAAmC,CAAnC,EAA8BA,CAA9B,CACE7B,CAAA,CAAM+B,EAAA,CAAa/B,CAAb,CAMI,EAAZ,GAAIA,CAAJ,GACEA,CADF,CACQ,IADR,CAGAxD,EAAA,CAAOoF,CAAP,CAAA,CAA0B5B,CAdnB,CAFoD,CAA/D,CAoBA,OAAOxD,EAvB+C,CA0BxDuF,QAASA,GAAY,CAACC,CAAD,CAAM,CACzB,IAAIC,EAAW,CACXC,EAAAA,CAASF,CAAA9E,MAAA,CAAU,SAAV,CACbC,EAAA,CAAQ+E,CAAR,CAAgB,QAAQ,CAACtC,CAAD,CAAQ,CAGQ,GAAtC,EAAIA,CAAAkC,OAAA,CAAalC,CAAA3C,OAAb,CAA4B,CAA5B,CAAJ,GACE2C,CADF,CACUA,CAAAuC,UAAA,CAAgB,CAAhB,CAAmBvC,CAAA3C,OAAnB,CAAkC,CAAlC,CADV,CAGA2C,EAAA,CAAQwC,UAAA,CAAWxC,CAAX,CAAR,EAA6B,CAC7BqC,EAAA,CAAWA,CAAA,CAAWI,IAAAC,IAAA,CAAS1C,CAAT,CAAgBqC,CAAhB,CAAX,CAAuCrC,CAPpB,CAAhC,CASA,OAAOqC,EAZkB,CAe3BM,QAASA,GAAiB,CAACvC,CAAD,CAAM,CAC9B,MAAe,EAAf,GAAOA,CAAP,EAA2B,IAA3B,EAAoBA,CADU,CAIhCwC,QAASA,GAA6B,CAAC7B,CAAD,CAAW8B,CAAX,CAA8B,CAClE,IAAItB,EAAQuB,CAAZ,CACI9C,EAAQe,CAARf,CAAmB,GACnB6C,EAAJ,CACEtB,CADF,EAhqBiBwB,UAgqBjB,CAGE/C,CAHF,EAGW,aAEX,OAAO,CAACuB,CAAD,CAAQvB,CAAR,CAR2D,CAWpEgD,QAASA,GAAsB,EAAG,CAChC,IAAIC,EAAQtB,MAAAC,OAAA,CAAc,IAAd,CACZ,OAAO,CACLsB,MAAOA,QAAQ,EAAG,CAChBD,CAAA,CAAQtB,MAAAC,OAAA,CAAc,IAAd,CADQ,CADb;AAKLuB,MAAOA,QAAQ,CAAClD,CAAD,CAAM,CAEnB,MAAO,CADHmD,CACG,CADKH,CAAA,CAAMhD,CAAN,CACL,EAAQmD,CAAAC,MAAR,CAAsB,CAFV,CALhB,CAULC,IAAKA,QAAQ,CAACrD,CAAD,CAAM,CAEjB,OADImD,CACJ,CADYH,CAAA,CAAMhD,CAAN,CACZ,GAAgBmD,CAAApD,MAFC,CAVd,CAeLuD,IAAKA,QAAQ,CAACtD,CAAD,CAAMD,CAAN,CAAa,CACnBiD,CAAA,CAAMhD,CAAN,CAAL,CAGEgD,CAAA,CAAMhD,CAAN,CAAAoD,MAAA,EAHF,CACEJ,CAAA,CAAMhD,CAAN,CADF,CACe,CAAEoD,MAAO,CAAT,CAAYrD,MAAOA,CAAnB,CAFS,CAfrB,CAFyB,CAoClCwD,QAASA,GAAwB,CAACC,CAAD,CAAS3C,CAAT,CAAeY,CAAf,CAA2B,CAC1DnE,CAAA,CAAQmE,CAAR,CAAoB,QAAQ,CAACrB,CAAD,CAAO,CACjCoD,CAAA,CAAOpD,CAAP,CAAA,CAAeqD,CAAA,CAAUD,CAAA,CAAOpD,CAAP,CAAV,CAAA,CACToD,CAAA,CAAOpD,CAAP,CADS,CAETS,CAAAS,MAAAoC,iBAAA,CAA4BtD,CAA5B,CAH2B,CAAnC,CAD0D,CAjwB5D,IAAI3B,EAAc5C,CAAA4C,KAAlB,CACIiB,GAAc7D,CAAA6D,OADlB,CAEI/B,EAAc9B,CAAA6B,QAFlB,CAGIJ,EAAczB,CAAAyB,QAHlB,CAIIf,EAAcV,CAAAU,QAJlB,CAKIY,EAActB,CAAAsB,SALlB,CAMIwG,GAAc9H,CAAA8H,SANlB,CAOIC,GAAc/H,CAAA+H,YAPlB,CAQIH,EAAc5H,CAAA4H,UARlB,CASII,GAAchI,CAAAgI,WATlB,CAUIC,GAAcjI,CAAAiI,UAVlB,CAwBqBjB,CAxBrB,CAwBsCkB,EAxBtC,CAwB2D5C,CAxB3D,CAwB2E6C,EAWvEJ,GAAA,CAAYhI,CAAAqI,gBAAZ,CAAJ,EAA2CR,CAAA,CAAU7H,CAAAsI,sBAAV,CAA3C,EAEErB,CACA,CADkB,kBAClB,CAAAkB,EAAA,CAAsB,mCAHxB;CAKElB,CACA,CADkB,YAClB,CAAAkB,EAAA,CAAsB,eANxB,CASIH,GAAA,CAAYhI,CAAAuI,eAAZ,CAAJ,EAA0CV,CAAA,CAAU7H,CAAAwI,qBAAV,CAA1C,EAEEjD,CACA,CADiB,iBACjB,CAAA6C,EAAA,CAAqB,iCAHvB,GAKE7C,CACA,CADiB,WACjB,CAAA6C,EAAA,CAAqB,cANvB,CAiBA,KAAIK,GAAuBlD,CAAvBkD,CANYC,OAMhB,CACIC,GAA0BpD,CAA1BoD,CATezB,UAQnB,CAEI9B,GAAwB6B,CAAxB7B,CARYsD,OASZE,EAAAA,CAA2B3B,CAA3B2B,CAXe1B,UAulBnB,KAAI2B,GAAwB,CAC1BC,mBAAyBF,CADC,CAE1BG,gBAAyB3D,EAFC,CAG1B4D,mBAAyB/B,CAAzB+B,CAzlBiBC,UAslBS,CAI1BC,kBAAyBP,EAJC,CAK1BQ,eAAyBV,EALC,CAM1BW,wBAAyB7D,CAAzB6D,CAzlBkCC,gBAmlBR,CAA5B,CASIC,GAAgC,CAClCR,mBAAyBF,CADS,CAElCG,gBAAyB3D,EAFS,CAGlC8D,kBAAyBP,EAHS,CAIlCQ,eAAyBV,EAJS,CA2qGpCxI,EAAAsJ,OAAA,CAAe,WAAf;AAA4B,EAA5B,CAAAC,UAAA,CACa,mBADb,CAh6GiCC,CAAC,QAAQ,EAAG,CAC3C,MAAO,SAAQ,CAACC,CAAD,CAAQ5H,CAAR,CAAiB6H,CAAjB,CAAwB,CACjCpF,CAAAA,CAAMoF,CAAAC,kBACN3J,EAAAsB,SAAA,CAAiBgD,CAAjB,CAAJ,EAA4C,CAA5C,GAA6BA,CAAA/C,OAA7B,CACEM,CAAA+H,KAAA,CA/YyBC,qBA+YzB,CAAuC,CAAA,CAAvC,CADF,CAGEH,CAAAI,SAAA,CAAe,mBAAf,CAAoC,QAAQ,CAAC5F,CAAD,CAAQ,CAElDrC,CAAA+H,KAAA,CAnZuBC,qBAmZvB,CADkB,IAClB,GADQ3F,CACR,EADoC,MACpC,GAD0BA,CAC1B,CAFkD,CAApD,CALmC,CADI,CAAZsF,CAg6GjC,CAAAO,QAAA,CAEW,gBAFX,CAj9G4BC,CAAC,OAADA,CAAU,QAAQ,CAACC,CAAD,CAAQ,CAGpDC,QAASA,EAAS,CAACC,CAAD,CAAQ,CAIxBC,CAAA,CAAQA,CAAAC,OAAA,CAAaF,CAAb,CACRG,EAAA,EALwB,CA8B1BA,QAASA,EAAQ,EAAG,CAClB,GAAKF,CAAA7I,OAAL,CAAA,CAGA,IADA,IAAIgJ,EAAQH,CAAAI,MAAA,EAAZ,CACS7I,EAAI,CAAb,CAAgBA,CAAhB,CAAoB4I,CAAAhJ,OAApB,CAAkCI,CAAA,EAAlC,CACE4I,CAAA,CAAM5I,CAAN,CAAA,EAGG8I,EAAL,EACER,CAAA,CAAM,QAAQ,EAAG,CACVQ,CAAL,EAAeH,CAAA,EADA,CAAjB,CARF,CADkB,CAjCgC,IAChDF,CADgD,CACzCK,CAUXL,EAAA,CAAQF,CAAAE,MAAR,CAA0B,EAU1BF,EAAAQ,eAAA,CAA2BC,QAAQ,CAACC,CAAD,CAAK,CAClCH,CAAJ,EAAcA,CAAA,EAEdA,EAAA,CAAWR,CAAA,CAAM,QAAQ,EAAG,CAC1BQ,CAAA;AAAW,IACXG,EAAA,EACAN,EAAA,EAH0B,CAAjB,CAH2B,CAUxC,OAAOJ,EA/B6C,CAA1BF,CAi9G5B,CAAAD,QAAA,CAIW,iBAJX,CA3vC6Bc,CAAC,IAADA,CAAO,UAAPA,CAAmB,mBAAnBA,CACP,QAAQ,CAACC,CAAD,CAAOC,CAAP,CAAmBC,CAAnB,CAAsC,CA0ClEC,QAASA,EAAa,CAACC,CAAD,CAAO,CAC3B,IAAAC,QAAA,CAAaD,CAAb,CAEA,KAAAE,eAAA,CAAsB,EACtB,KAAAC,qBAAA,CAA4BL,CAAA,EAC5B,KAAAM,OAAA,CAAc,CALa,CApC7BL,CAAAM,MAAA,CAAsBC,QAAQ,CAACD,CAAD,CAAQE,CAAR,CAAkB,CAI9CC,QAASA,EAAI,EAAG,CACd,GAAIC,CAAJ,GAAcJ,CAAAhK,OAAd,CACEkK,CAAA,CAAS,CAAA,CAAT,CADF,KAKAF,EAAA,CAAMI,CAAN,CAAA,CAAa,QAAQ,CAACC,CAAD,CAAW,CACb,CAAA,CAAjB,GAAIA,CAAJ,CACEH,CAAA,CAAS,CAAA,CAAT,CADF,EAIAE,CAAA,EACA,CAAAD,CAAA,EALA,CAD8B,CAAhC,CANc,CAHhB,IAAIC,EAAQ,CAEZD,EAAA,EAH8C,CAqBhDT,EAAAY,IAAA,CAAoBC,QAAQ,CAACC,CAAD,CAAUN,CAAV,CAAoB,CAO9CO,QAASA,EAAU,CAACJ,CAAD,CAAW,CAC5BK,CAAA,CAASA,CAAT,EAAmBL,CACf,GAAEvE,CAAN,GAAgB0E,CAAAxK,OAAhB,EACEkK,CAAA,CAASQ,CAAT,CAH0B,CAN9B,IAAI5E,EAAQ,CAAZ,CACI4E,EAAS,CAAA,CACbxK,EAAA,CAAQsK,CAAR,CAAiB,QAAQ,CAACG,CAAD,CAAS,CAChCA,CAAAC,KAAA,CAAYH,CAAZ,CADgC,CAAlC,CAH8C,CAuBhDf,EAAAmB,UAAA,CAA0B,CACxBjB,QAASA,QAAQ,CAACD,CAAD,CAAO,CACtB,IAAAA,KAAA,CAAYA,CAAZ,EAAoB,EADE,CADA,CAKxBiB,KAAMA,QAAQ,CAACvB,CAAD,CAAK,CAnDKyB,CAoDtB,GAAI,IAAAf,OAAJ;AACEV,CAAA,EADF,CAGE,IAAAQ,eAAAkB,KAAA,CAAyB1B,CAAzB,CAJe,CALK,CAaxB2B,SAAU3J,CAbc,CAexB4J,WAAYA,QAAQ,EAAG,CACrB,GAAKC,CAAA,IAAAA,QAAL,CAAmB,CACjB,IAAIC,EAAO,IACX,KAAAD,QAAA,CAAe3B,CAAA,CAAG,QAAQ,CAAC6B,CAAD,CAAUC,CAAV,CAAkB,CAC1CF,CAAAP,KAAA,CAAU,QAAQ,CAACF,CAAD,CAAS,CACd,CAAA,CAAX,GAAAA,CAAA,CAAmBW,CAAA,EAAnB,CAA8BD,CAAA,EADL,CAA3B,CAD0C,CAA7B,CAFE,CAQnB,MAAO,KAAAF,QATc,CAfC,CA2BxBI,KAAMA,QAAQ,CAACC,CAAD,CAAiBC,CAAjB,CAAgC,CAC5C,MAAO,KAAAP,WAAA,EAAAK,KAAA,CAAuBC,CAAvB,CAAuCC,CAAvC,CADqC,CA3BtB,CA+BxB,QAASC,QAAQ,CAACC,CAAD,CAAU,CACzB,MAAO,KAAAT,WAAA,EAAA,CAAkB,OAAlB,CAAA,CAA2BS,CAA3B,CADkB,CA/BH,CAmCxB,UAAWC,QAAQ,CAACD,CAAD,CAAU,CAC3B,MAAO,KAAAT,WAAA,EAAA,CAAkB,SAAlB,CAAA,CAA6BS,CAA7B,CADoB,CAnCL,CAuCxBE,MAAOA,QAAQ,EAAG,CACZ,IAAAjC,KAAAiC,MAAJ,EACE,IAAAjC,KAAAiC,MAAA,EAFc,CAvCM,CA6CxBC,OAAQA,QAAQ,EAAG,CACb,IAAAlC,KAAAkC,OAAJ,EACE,IAAAlC,KAAAkC,OAAA,EAFe,CA7CK,CAmDxBC,IAAKA,QAAQ,EAAG,CACV,IAAAnC,KAAAmC,IAAJ,EACE,IAAAnC,KAAAmC,IAAA,EAEF;IAAAC,SAAA,CAAc,CAAA,CAAd,CAJc,CAnDQ,CA0DxBC,OAAQA,QAAQ,EAAG,CACb,IAAArC,KAAAqC,OAAJ,EACE,IAAArC,KAAAqC,OAAA,EAEF,KAAAD,SAAA,CAAc,CAAA,CAAd,CAJiB,CA1DK,CAiExBE,SAAUA,QAAQ,CAAC5B,CAAD,CAAW,CAC3B,IAAIc,EAAO,IAlHKe,EAmHhB,GAAIf,CAAApB,OAAJ,GACEoB,CAAApB,OACA,CApHmBoC,CAoHnB,CAAAhB,CAAArB,qBAAA,CAA0B,QAAQ,EAAG,CACnCqB,CAAAY,SAAA,CAAc1B,CAAd,CADmC,CAArC,CAFF,CAF2B,CAjEL,CA2ExB0B,SAAUA,QAAQ,CAAC1B,CAAD,CAAW,CAzHLS,CA0HtB,GAAI,IAAAf,OAAJ,GACE7J,CAAA,CAAQ,IAAA2J,eAAR,CAA6B,QAAQ,CAACR,CAAD,CAAK,CACxCA,CAAA,CAAGgB,CAAH,CADwC,CAA1C,CAIA,CADA,IAAAR,eAAA7J,OACA,CAD6B,CAC7B,CAAA,IAAA+J,OAAA,CA/HoBe,CA0HtB,CAD2B,CA3EL,CAsF1B,OAAOpB,EAxI2D,CADvCJ,CA2vC7B,CAAAd,QAAA,CAKW,mBALX,CApxC+B4D,CAAC,OAADA,CAAU,QAAQ,CAAC1D,CAAD,CAAQ,CAGvD2D,QAASA,EAAW,CAAChD,CAAD,CAAK,CACvBiD,CAAAvB,KAAA,CAAe1B,CAAf,CACuB,EAAvB,CAAIiD,CAAAtM,OAAJ,EACA0I,CAAA,CAAM,QAAQ,EAAG,CACf,IAAS,IAAAtI,EAAI,CAAb,CAAgBA,CAAhB,CAAoBkM,CAAAtM,OAApB,CAAsCI,CAAA,EAAtC,CACEkM,CAAA,CAAUlM,CAAV,CAAA,EAEFkM,EAAA,CAAY,EAJG,CAAjB,CAHuB,CAFzB,IAAIA,EAAY,EAahB,OAAO,SAAQ,EAAG,CAChB,IAAIC;AAAS,CAAA,CACbF,EAAA,CAAY,QAAQ,EAAG,CACrBE,CAAA,CAAS,CAAA,CADY,CAAvB,CAGA,OAAO,SAAQ,CAACrC,CAAD,CAAW,CACxBqC,CAAA,CAASrC,CAAA,EAAT,CAAsBmC,CAAA,CAAYnC,CAAZ,CADE,CALV,CAdqC,CAA1BkC,CAoxC/B,CAAAI,SAAA,CAOY,gBAPZ,CAx3D6BC,CAAC,kBAADA,CAAqB,QAAQ,CAACC,CAAD,CAAmB,CAU3EC,QAASA,EAAS,CAACC,CAAD,CAAWtM,CAAX,CAAoBuM,CAApB,CAAsCC,CAAtC,CAAyD,CACzE,MAAOC,EAAA,CAAMH,CAAN,CAAAI,KAAA,CAAqB,QAAQ,CAAC3D,CAAD,CAAK,CACvC,MAAOA,EAAA,CAAG/I,CAAH,CAAYuM,CAAZ,CAA8BC,CAA9B,CADgC,CAAlC,CADkE,CAM3EG,QAASA,EAAmB,CAAC3N,CAAD,CAAU4N,CAAV,CAAe,CACzC5N,CAAA,CAAUA,CAAV,EAAqB,EACrB,KAAIL,EAAsC,CAAtCA,CAAIe,CAACV,CAAAwB,SAADd,EAAqB,EAArBA,QAAR,CACId,EAAyC,CAAzCA,CAAIc,CAACV,CAAA0B,YAADhB,EAAwB,EAAxBA,QACR,OAAOkN,EAAA,CAAMjO,CAAN,EAAWC,CAAX,CAAeD,CAAf,EAAoBC,CAJc,CAZ3C,IAAI6N,EAAQ,IAAAA,MAARA,CAAqB,CACvBI,KAAM,EADiB,CAEvBnB,OAAQ,EAFe,CAGvB5M,KAAM,EAHiB,CAmBzB2N,EAAA3N,KAAA2L,KAAA,CAAgB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAEhE,MAAO,CAACO,CAAAC,WAAR,EAAmCJ,CAAA,CAAoBG,CAAA9N,QAApB,CAF6B,CAAlE,CAKAyN,EAAAI,KAAApC,KAAA,CAAgB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAGhE,MAAO,CAACO,CAAAC,WAAR,EAAmC,CAACJ,CAAA,CAAoBG,CAAA9N,QAApB,CAH4B,CAAlE,CAMAyN,EAAAI,KAAApC,KAAA,CAAgB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAGhE,MAAiC,OAAjC;AAAOA,CAAAzJ,MAAP,EAA4CgK,CAAAC,WAHoB,CAAlE,CAMAN,EAAAI,KAAApC,KAAA,CAAgB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAEhE,MAAOA,EAAAQ,WAAP,EAxCkBC,CAwClB,GAAsCT,CAAAU,MAAtC,EAAkF,CAACH,CAAAC,WAFnB,CAAlE,CAKAN,EAAAf,OAAAjB,KAAA,CAAkB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAElE,MAAOA,EAAAQ,WAAP,EAAsCD,CAAAC,WAF4B,CAApE,CAKAN,EAAAf,OAAAjB,KAAA,CAAkB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAGlE,MAnDkBS,EAmDlB,GAAOT,CAAAU,MAAP,EAAmDH,CAAAC,WAHe,CAApE,CAMAN,EAAAf,OAAAjB,KAAA,CAAkB,QAAQ,CAACzK,CAAD,CAAU8M,CAAV,CAAwBP,CAAxB,CAA0C,CAC9DW,CAAAA,CAAKJ,CAAA9N,QACLmO,EAAAA,CAAKZ,CAAAvN,QAGT,OAAQkO,EAAA1M,SAAR,EAAuB0M,CAAA1M,SAAvB,GAAuC2M,CAAAzM,YAAvC,EAA2DwM,CAAAxM,YAA3D,EAA6EwM,CAAAxM,YAA7E,GAAgGyM,CAAA3M,SAL9B,CAApE,CAQA,KAAA4M,KAAA,CAAY,CAAC,OAAD,CAAU,YAAV,CAAwB,cAAxB,CAAwC,WAAxC,CAAqD,WAArD,CACC,aADD,CACgB,iBADhB,CACmC,kBADnC,CACuD,UADvD;AACmE,eADnE,CAEP,QAAQ,CAAChF,CAAD,CAAUiF,CAAV,CAAwBC,CAAxB,CAAwCC,CAAxC,CAAqDC,CAArD,CACCC,CADD,CACgBC,CADhB,CACmCC,CADnC,CACuDpN,CADvD,CACmEqN,CADnE,CACkF,CAM7FC,QAASA,EAAqB,EAAG,CAC/B,IAAIC,EAAmB,CAAA,CACvB,OAAO,SAAQ,CAAC/E,CAAD,CAAK,CAKd+E,CAAJ,CACE/E,CAAA,EADF,CAGEsE,CAAAU,aAAA,CAAwB,QAAQ,EAAG,CACjCD,CAAA,CAAmB,CAAA,CACnB/E,EAAA,EAFiC,CAAnC,CARgB,CAFW,CAgEjCiF,QAASA,EAAa,CAACC,CAAD,CAASjO,CAAT,CAAkB8C,CAAlB,CAAyB,CAC7C,IAAIoL,EAAatL,CAAA,CAAW5C,CAAX,CAAjB,CACImO,EAAmBvL,CAAA,CAAWqL,CAAX,CADvB,CAGIG,EAAU,EAEd,EADIC,CACJ,CADcC,CAAA,CAAiBxL,CAAjB,CACd,GACElD,CAAA,CAAQyO,CAAR,CAAiB,QAAQ,CAAC5I,CAAD,CAAQ,CAC3BA,CAAAtC,KAAAoL,SAAA,CAAoBL,CAApB,CAAJ,CACEE,CAAA3D,KAAA,CAAahF,CAAAmE,SAAb,CADF,CAEqB,OAFrB,GAEW9G,CAFX,EAEgC2C,CAAAtC,KAAAoL,SAAA,CAAoBJ,CAApB,CAFhC,EAGEC,CAAA3D,KAAA,CAAahF,CAAAmE,SAAb,CAJ6B,CAAjC,CASF,OAAOwE,EAhBsC,CAmG/CI,QAASA,EAAc,CAACxO,CAAD,CAAU8C,CAAV,CAAiB9D,CAAjB,CAA0B,CA4O/CyP,QAASA,EAAc,CAACpE,CAAD,CAASvH,CAAT,CAAgB4L,CAAhB,CAAuB3G,CAAvB,CAA6B,CAClD4G,CAAA,CAAyB,QAAQ,EAAG,CAClC,IAAIC,EAAYZ,CAAA,CAAcC,CAAd,CAAsBjO,CAAtB,CAA+B8C,CAA/B,CACZ8L,EAAAlP,OAAJ,EAKE0I,CAAA,CAAM,QAAQ,EAAG,CACfxI,CAAA,CAAQgP,CAAR,CAAmB,QAAQ,CAAChF,CAAD,CAAW,CACpCA,CAAA,CAAS5J,CAAT,CAAkB0O,CAAlB,CAAyB3G,CAAzB,CADoC,CAAtC,CADe,CAAjB,CAPgC,CAApC,CAcAsC,EAAAK,SAAA,CAAgB5H,CAAhB,CAAuB4L,CAAvB,CAA8B3G,CAA9B,CAfkD,CAkBpD8G,QAASA,EAAK,CAAC9D,CAAD,CAAS,CACC/K,IAAAA,EAAAA,CAAAA,CAAShB,EAAAA,CA1mEjCA,EAAA6C,mBAAJ,GACE7B,CAAAU,YAAA,CAAoB1B,CAAA6C,mBAApB,CACA;AAAA7C,CAAA6C,mBAAA,CAA6B,IAF/B,CAII7C,EAAA8P,cAAJ,GACE9O,CAAAU,YAAA,CAAoB1B,CAAA8P,cAApB,CACA,CAAA9P,CAAA8P,cAAA,CAAwB,IAF1B,CAumEMC,GAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CACAkC,GAAA,CAAqBlB,CAArB,CAA8BhB,CAA9B,CACAA,EAAA8B,aAAA,EACAuJ,EAAAsB,SAAA,CAAgB,CAACZ,CAAjB,CALqB,CA9PwB,IAC3C5H,CAD2C,CACrC8K,CAEV,IADAjO,CACA,CADUD,EAAA,CAAyBC,CAAzB,CACV,CACEmD,CACA,CADOP,CAAA,CAAW5C,CAAX,CACP,CAAAiO,CAAA,CAASjO,CAAAiO,OAAA,EAGXjP,EAAA,CAAU4B,EAAA,CAAwB5B,CAAxB,CAIV,KAAIqL,EAAS,IAAIqD,CAAjB,CAGIiB,EAA2Bd,CAAA,EAE3BhP,EAAA,CAAQG,CAAAwB,SAAR,CAAJ,GACExB,CAAAwB,SADF,CACqBxB,CAAAwB,SAAA1B,KAAA,CAAsB,GAAtB,CADrB,CAIIE,EAAAwB,SAAJ,EAAyB,CAAAf,CAAA,CAAST,CAAAwB,SAAT,CAAzB,GACExB,CAAAwB,SADF,CACqB,IADrB,CAII3B,EAAA,CAAQG,CAAA0B,YAAR,CAAJ,GACE1B,CAAA0B,YADF,CACwB1B,CAAA0B,YAAA5B,KAAA,CAAyB,GAAzB,CADxB,CAIIE,EAAA0B,YAAJ,EAA4B,CAAAjB,CAAA,CAAST,CAAA0B,YAAT,CAA5B,GACE1B,CAAA0B,YADF,CACwB,IADxB,CAII1B,EAAAG,KAAJ,EAAqB,CAAA8G,EAAA,CAASjH,CAAAG,KAAT,CAArB,GACEH,CAAAG,KADF,CACiB,IADjB,CAIIH,EAAAE,GAAJ,EAAmB,CAAA+G,EAAA,CAASjH,CAAAE,GAAT,CAAnB,GACEF,CAAAE,GADF,CACe,IADf,CAOA,IAAKiE,CAAAA,CAAL,CAEE,MADA0L,EAAA,EACOxE,CAAAA,CAGT;IAAI7K,EAAY,CAAC2D,CAAA3D,UAAD,CAAiBR,CAAAwB,SAAjB,CAAmCxB,CAAA0B,YAAnC,CAAA5B,KAAA,CAA6D,GAA7D,CAChB,IAAK,CAAAkQ,EAAA,CAAsBxP,CAAtB,CAAL,CAEE,MADAqP,EAAA,EACOxE,CAAAA,CAGT,KAAI4E,EAA4D,CAA5DA,EAAe,CAAC,OAAD,CAAU,MAAV,CAAkB,OAAlB,CAAAC,QAAA,CAAmCpM,CAAnC,CAAnB,CAKIqM,EAAiB,CAACC,CAAlBD,EAAuCE,CAAA1J,IAAA,CAA2BxC,CAA3B,CAL3C,CAMImM,EAAqB,CAACH,CAAtBG,EAAwCC,CAAA5J,IAAA,CAA2BxC,CAA3B,CAAxCmM,EAA6E,EANjF,CAOIE,EAAuB,CAAEvC,CAAAqC,CAAArC,MAIxBkC,EAAL,EAAyBK,CAAzB,EA7SmBC,CA6SnB,EAAiDH,CAAArC,MAAjD,GACEkC,CADF,CACmB,CAACO,EAAA,CAAqB1P,CAArB,CAA8BiO,CAA9B,CAAsCnL,CAAtC,CADpB,CAIA,IAAIqM,CAAJ,CAEE,MADAN,EAAA,EACOxE,CAAAA,CAGL4E,EAAJ,EACEU,CAAA,CAAqB3P,CAArB,CAGE8M,EAAAA,CAAe,CACjBC,WAAYkC,CADK,CAEjBjP,QAASA,CAFQ,CAGjB8C,MAAOA,CAHU,CAIjB+L,MAAOA,CAJU,CAKjB7P,QAASA,CALQ,CAMjBqL,OAAQA,CANS,CASnB,IAAImF,CAAJ,CAA0B,CAExB,GADwBnD,CAAAuD,CAAU,MAAVA,CAAkB5P,CAAlB4P,CAA2B9C,CAA3B8C,CAAyCN,CAAzCM,CACxB,CAAuB,CACrB,GArUY5C,CAqUZ,GAAIsC,CAAArC,MAAJ,CAEE,MADA4B,EAAA,EACOxE,CAAAA,CAEP/I,EAAA,CAAsBtB,CAAtB,CAA+BsP,CAAAtQ,QAA/B,CAA0DA,CAA1D,CACA,OAAOsQ,EAAAjF,OANY,CAWvB,GAD0BgC,CAAAwD,CAAU,QAAVA,CAAoB7P,CAApB6P,CAA6B/C,CAA7B+C,CAA2CP,CAA3CO,CAC1B,CACE,GAhVY7C,CAgVZ,GAAIsC,CAAArC,MAAJ,CAIEqC,CAAAjF,OAAAmB,IAAA,EAJF,KAKO,IAAI8D,CAAAvC,WAAJ,CAILuC,CAAAT,MAAA,EAJK,KAQL,OADAvN,EAAA,CAAsBtB,CAAtB,CAA+BsP,CAAAtQ,QAA/B,CAA0D8N,CAAA9N,QAA1D,CACOqL,CAAAiF,CAAAjF,OAdX;IAqBE,IADwBgC,CAAAyD,CAAU,MAAVA,CAAkB9P,CAAlB8P,CAA2BhD,CAA3BgD,CAAyCR,CAAzCQ,CACxB,CACE,GArWU9C,CAqWV,GAAIsC,CAAArC,MAAJ,CAjOC3L,CAAA,CAkO2BtB,CAlO3B,CAkOoChB,CAlOpC,CAAwC,EAAxC,CAiOD,KAUE,OAPA6D,GAAA,CAAiC7C,CAAjC,CAA0CiP,CAAA,CAAenM,CAAf,CAAuB,IAAjE,CAAuE9D,CAAvE,CAOOqL,CALPvH,CAKOuH,CALCyC,CAAAhK,MAKDuH,CALsBiF,CAAAxM,MAKtBuH,CAJPrL,CAIOqL,CAJG/I,CAAA,CAAsBtB,CAAtB,CAA+BsP,CAAAtQ,QAA/B,CAA0D8N,CAAA9N,QAA1D,CAIHqL,CAAAiF,CAAAjF,OA7CW,CAA1B,IA9LO/I,EAAA,CAkPqBtB,CAlPrB,CAkP8BhB,CAlP9B,CAAwC,EAAxC,CAyPP,EADI+Q,CACJ,CADuBjD,CAAAC,WACvB,IAEEgD,CAFF,CAE6C,SAF7C,GAEsBjD,CAAAhK,MAFtB,EAE8G,CAF9G,CAE0DkB,MAAAgM,KAAA,CAAYlD,CAAA9N,QAAAE,GAAZ,EAAuC,EAAvC,CAAAQ,OAF1D,EAGyBiN,CAAA,CAAoBG,CAAA9N,QAApB,CAHzB,CAMA,IAAK+Q,CAAAA,CAAL,CAGE,MAFAlB,EAAA,EAEOxE,CADP4F,CAAA,CAA2BjQ,CAA3B,CACOqK,CAAAA,CAIT,KAAI6F,GAAWZ,CAAAY,QAAXA,EAAwC,CAAxCA,EAA6C,CACjDpD,EAAAoD,QAAA,CAAuBA,CAEvBC,EAAA,CAA0BnQ,CAA1B,CA9YmByP,CA8YnB,CAAqD3C,CAArD,CAEAO,EAAAU,aAAA,CAAwB,QAAQ,EAAG,CACjC,IAAIqC,EAAmBb,CAAA5J,IAAA,CAA2BxC,CAA3B,CAAvB,CACIkN,EAAqB,CAACD,CAD1B,CAEAA,EAAmBA,CAAnBA,EAAuC,EAFvC,CAWIL,EAA0C,CAA1CA,CAAmBrQ,CAJHM,CAAAiO,OAAA,EAIGvO,EAJiB,EAIjBA,QAAnBqQ,GACmD,SADnDA,GACwBK,CAAAtN,MADxBiN,EAE2BK,CAAArD,WAF3BgD,EAG2BpD,CAAA,CAAoByD,CAAApR,QAApB,CAH3B+Q,CAOJ,IAAIM,CAAJ,EAA0BD,CAAAF,QAA1B,GAAuDA,CAAvD,EAAmEH,CAAAA,CAAnE,CAAqF,CAI/EM,CAAJ,GACEtB,EAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CACA,CAAAkC,EAAA,CAAqBlB,CAArB,CAA8BhB,CAA9B,CAFF,CAOA,IAAIqR,CAAJ,EAA2BpB,CAA3B,EAA2CmB,CAAAtN,MAA3C;AAAsEA,CAAtE,CACE9D,CAAA8B,aAAA,EACA,CAAAuJ,CAAAmB,IAAA,EAMGuE,EAAL,EACEE,CAAA,CAA2BjQ,CAA3B,CApBiF,CAArF,IA4BA8C,EAmBA,CAnBSiK,CAAAqD,CAAArD,WAAD,EAAgCJ,CAAA,CAAoByD,CAAApR,QAApB,CAA8C,CAAA,CAA9C,CAAhC,CACF,UADE,CAEFoR,CAAAtN,MAiBN,CAfAqN,CAAA,CAA0BnQ,CAA1B,CAlccgN,CAkcd,CAeA,CAdIsD,CAcJ,CAdiB7C,CAAA,CAAYzN,CAAZ,CAAqB8C,CAArB,CAA4BsN,CAAApR,QAA5B,CAcjB,CAZAsR,CAAAhG,KAAA,CAAgB,QAAQ,CAACF,CAAD,CAAS,CAC/ByE,CAAA,CAAM,CAACzE,CAAP,CAEA,EADIgG,CACJ,CADuBb,CAAA5J,IAAA,CAA2BxC,CAA3B,CACvB,GAAwBiN,CAAAF,QAAxB,GAAqDA,CAArD,EACED,CAAA,CAA2BrN,CAAA,CAAW5C,CAAX,CAA3B,CAEFyO,EAAA,CAAepE,CAAf,CAAuBvH,CAAvB,CAA8B,OAA9B,CAAuC,EAAvC,CAN+B,CAAjC,CAYA,CADAuH,CAAAf,QAAA,CAAegH,CAAf,CACA,CAAA7B,CAAA,CAAepE,CAAf,CAAuBvH,CAAvB,CAA8B,OAA9B,CAAuC,EAAvC,CAlEiC,CAAnC,CAqEA,OAAOuH,EA1OwC,CAuQjDsF,QAASA,EAAoB,CAAC3P,CAAD,CAAU,CAEjCuQ,CAAAA,CADO3N,CAAAO,CAAWnD,CAAXmD,CACIqN,iBAAA,CAAsB,mBAAtB,CACf5Q,EAAA,CAAQ2Q,CAAR,CAAkB,QAAQ,CAACE,CAAD,CAAQ,CAChC,IAAIxD,EAAQyD,QAAA,CAASD,CAAAE,aAAA,CAzfFC,iBAyfE,CAAT,CAAZ,CACIR,EAAmBb,CAAA5J,IAAA,CAA2B8K,CAA3B,CACvB,QAAQxD,CAAR,EACE,KAxfYD,CAwfZ,CACEoD,CAAA/F,OAAAmB,IAAA,EAEF,MA5feiE,CA4ff,CACMW,CAAJ,EACEb,CAAAsB,OAAA,CAA8BJ,CAA9B,CANN,CAHgC,CAAlC,CAHqC,CAmBvCR,QAASA,EAA0B,CAACjQ,CAAD,CAAU,CACvCmD,CAAAA,CAAOP,CAAA,CAAW5C,CAAX,CACXmD,EAAA2N,gBAAA,CA1gBqBF,iBA0gBrB,CACArB,EAAAsB,OAAA,CAA8B1N,CAA9B,CAH2C,CAncgD;AAyc7F4N,QAASA,EAAiB,CAACC,CAAD,CAAaC,CAAb,CAAyB,CACjD,MAAOrO,EAAA,CAAWoO,CAAX,CAAP,GAAkCpO,CAAA,CAAWqO,CAAX,CADe,CAInDvB,QAASA,GAAoB,CAAC1P,CAAD,CAAUkR,CAAV,CAAyBpO,CAAzB,CAAgC,CACvDqO,CAAAA,CAAclR,CAAA,CAAOsN,CAAA,CAAU,CAAV,CAAA6D,KAAP,CAClB,KAAIC,EAAsBN,CAAA,CAAkB/Q,CAAlB,CAA2BmR,CAA3B,CAAtBE,EAAyF,MAAzFA,GAAiErR,CAAA,CAAQ,CAAR,CAAAsR,SAArE,CACIC,EAAsBR,CAAA,CAAkB/Q,CAAlB,CAA2BsN,CAA3B,CAD1B,CAEIkE,EAA0B,CAAA,CAF9B,CAGIC,CAOJ,MALIC,CAKJ,CALiB1R,CAAA+H,KAAA,CAxhBG4J,eAwhBH,CAKjB,IAHET,CAGF,CAHkBQ,CAGlB,EAAOR,CAAP,EAAwBA,CAAAxR,OAAxB,CAAA,CAA8C,CACvC6R,CAAL,GAGEA,CAHF,CAGwBR,CAAA,CAAkBG,CAAlB,CAAiC5D,CAAjC,CAHxB,CAMIsE,EAAAA,CAAaV,CAAA,CAAc,CAAd,CACjB,IAh+EWhR,CAg+EX,GAAI0R,CAAAzR,SAAJ,CAEE,KAGF,KAAI0R,EAAUtC,CAAA5J,IAAA,CAA2BiM,CAA3B,CAAVC,EAAoD,EAInDL,EAAL,GACEA,CADF,CAC4BK,CAAA9E,WAD5B,EACkDsC,CAAA1J,IAAA,CAA2BiM,CAA3B,CADlD,CAIA,IAAI1L,EAAA,CAAYuL,CAAZ,CAAJ,EAAwD,CAAA,CAAxD,GAAoCA,CAApC,CACMpP,CACJ,CADY6O,CAAAnJ,KAAA,CAr+ESC,qBAq+ET,CACZ,CAAIjC,CAAA,CAAU1D,CAAV,CAAJ,GACEoP,CADF,CACoBpP,CADpB,CAMF,IAAImP,CAAJ,EAAmD,CAAA,CAAnD,GAA+BC,CAA/B,CAA0D,KAErDF,EAAL,GAGEA,CACA,CADsBR,CAAA,CAAkBG,CAAlB,CAAiC5D,CAAjC,CACtB,CAAKiE,CAAL,GACEG,CADF,CACeR,CAAAnJ,KAAA,CAjkBC4J,eAikBD,CADf,IAGIT,CAHJ,CAGoBQ,CAHpB,CAJF,CAYKL,EAAL,GAGEA,CAHF,CAGwBN,CAAA,CAAkBG,CAAlB,CAAiCC,CAAjC,CAHxB,CAMAD,EAAA,CAAgBA,CAAAjD,OAAA,EAjD4B,CAqD9C,OADqB,CAACuD,CACtB,EADiDC,CACjD,GAAyBF,CAAzB,EAAgDF,CAjEW,CAoE7DlB,QAASA,EAAyB,CAACnQ,CAAD,CAAUiN,CAAV,CAAiB4E,CAAjB,CAA0B,CAC1DA,CAAA,CAAUA,CAAV,EAAqB,EACrBA,EAAA5E,MAAA,CAAgBA,CAEZ9J,EAAAA,CAAOP,CAAA,CAAW5C,CAAX,CACXmD,EAAA2O,aAAA,CA3lBqBlB,iBA2lBrB;AAAwC3D,CAAxC,CAGI8E,EAAAA,CAAW,CADXC,CACW,CADAzC,CAAA5J,IAAA,CAA2BxC,CAA3B,CACA,EACTnB,EAAA,CAAOgQ,CAAP,CAAiBH,CAAjB,CADS,CAETA,CACNtC,EAAA3J,IAAA,CAA2BzC,CAA3B,CAAiC4O,CAAjC,CAX0D,CA/gB5D,IAAIxC,EAAyB,IAAI/B,CAAjC,CACI6B,EAAyB,IAAI7B,CADjC,CAEI4B,EAAoB,IAFxB,CA0BI6C,EAAkB5E,CAAA6E,OAAA,CACpB,QAAQ,EAAG,CAAE,MAAiD,EAAjD,GAAOvE,CAAAwE,qBAAT,CADS,CAEpB,QAAQ,CAACC,CAAD,CAAU,CACXA,CAAL,GACAH,CAAA,EASA,CAAA5E,CAAAU,aAAA,CAAwB,QAAQ,EAAG,CACjCV,CAAAU,aAAA,CAAwB,QAAQ,EAAG,CAGP,IAA1B,GAAIqB,CAAJ,GACEA,CADF,CACsB,CAAA,CADtB,CAHiC,CAAnC,CADiC,CAAnC,CAVA,CADgB,CAFE,CA1BtB,CAmDId,EAAmB,EAnDvB,CAuDI+D,EAAkBjG,CAAAiG,gBAAA,EAvDtB,CAwDIrD,GAAyBqD,CAAD,CAEhB,QAAQ,CAAC7S,CAAD,CAAY,CACpB,MAAO6S,EAAAC,KAAA,CAAqB9S,CAArB,CADa,CAFJ,CAChB,QAAQ,EAAG,CAAE,MAAO,CAAA,CAAT,CAzDvB,CA8DIuP,GAAwBpO,CAAA,CAA6BJ,CAA7B,CAyB5B,OAAO,CACLgS,GAAIA,QAAQ,CAACzP,CAAD,CAAQ0P,CAAR,CAAmB5I,CAAnB,CAA6B,CACnCzG,CAAAA,CAAO/C,EAAA,CAAmBoS,CAAnB,CACXlE,EAAA,CAAiBxL,CAAjB,CAAA,CAA0BwL,CAAA,CAAiBxL,CAAjB,CAA1B,EAAqD,EACrDwL,EAAA,CAAiBxL,CAAjB,CAAA2H,KAAA,CAA6B,CAC3BtH,KAAMA,CADqB,CAE3ByG,SAAUA,CAFiB,CAA7B,CAHuC,CADpC,CAUL6I,IAAKA,QAAQ,CAAC3P,CAAD,CAAQ0P,CAAR,CAAmB5I,CAAnB,CAA6B,CAQxC8I,QAASA,EAAkB,CAACC,CAAD,CAAOC,CAAP,CAAuBC,CAAvB,CAAsC,CAC/D,IAAIC,EAAgB1S,EAAA,CAAmBwS,CAAnB,CACpB,OAAOD,EAAAI,OAAA,CAAY,QAAQ,CAACtN,CAAD,CAAQ,CAGjC,MAAO,EAFOA,CAAAtC,KAEP,GAFsB2P,CAEtB,GADWD,CAAAA,CACX,EAD4BpN,CAAAmE,SAC5B;AAD+CiJ,CAC/C,EAH0B,CAA5B,CAFwD,CAPjE,IAAIxE,EAAUC,CAAA,CAAiBxL,CAAjB,CACTuL,EAAL,GAEAC,CAAA,CAAiBxL,CAAjB,CAFA,CAE+C,CAArB,GAAAkQ,SAAAtT,OAAA,CACpB,IADoB,CAEpBgT,CAAA,CAAmBrE,CAAnB,CAA4BmE,CAA5B,CAAuC5I,CAAvC,CAJN,CAFwC,CAVrC,CA4BLqJ,IAAKA,QAAQ,CAACjT,CAAD,CAAUkR,CAAV,CAAyB,CACpC7S,EAAA,CAAU+H,EAAA,CAAUpG,CAAV,CAAV,CAA8B,SAA9B,CAAyC,gBAAzC,CACA3B,GAAA,CAAU+H,EAAA,CAAU8K,CAAV,CAAV,CAAoC,eAApC,CAAqD,gBAArD,CACAlR,EAAA+H,KAAA,CA5LkB4J,eA4LlB,CAAkCT,CAAlC,CAHoC,CA5BjC,CAkCLzG,KAAMA,QAAQ,CAACzK,CAAD,CAAU8C,CAAV,CAAiB9D,CAAjB,CAA0B8B,CAA1B,CAAwC,CACpD9B,CAAA,CAAUA,CAAV,EAAqB,EACrBA,EAAA8B,aAAA,CAAuBA,CACvB,OAAO0N,EAAA,CAAexO,CAAf,CAAwB8C,CAAxB,CAA+B9D,CAA/B,CAH6C,CAlCjD,CA6CLkU,QAASA,QAAQ,CAAClT,CAAD,CAAUmT,CAAV,CAAgB,CAC/B,IAAIC,EAAWJ,SAAAtT,OAEf,IAAiB,CAAjB,GAAI0T,CAAJ,CAEED,CAAA,CAAO,CAAE/D,CAAAA,CAFX,KAME,IAFiBhJ,EAAAiN,CAAUrT,CAAVqT,CAEjB,CAGO,CACL,IAAIlQ,EAAOP,CAAA,CAAW5C,CAAX,CAAX,CACIsT,EAAejE,CAAA1J,IAAA,CAA2BxC,CAA3B,CAEF,EAAjB,GAAIiQ,CAAJ,CAEED,CAFF,CAES,CAACG,CAFV,CAME,CADAH,CACA,CADO,CAAEA,CAAAA,CACT,EAEWG,CAFX,EAGEjE,CAAAwB,OAAA,CAA8B1N,CAA9B,CAHF,CACEkM,CAAAzJ,IAAA,CAA2BzC,CAA3B,CAAiC,CAAA,CAAjC,CAXC,CAHP,IAEEgQ,EAAA,CAAO/D,CAAP,CAA2B,CAAEpP,CAAAA,CAoBjC,OAAOmT,EA/BwB,CA7C5B,CAzFsF,CAHnF,CAhE+D,CAAhDhH,CAw3D7B,CAAAD,SAAA,CAQY,aARZ,CA/mC0BqH,CAAC,kBAADA,CAAqB,QAAQ,CAACnH,CAAD,CAAmB,CAexEoH,QAASA,EAAS,CAACxT,CAAD,CAAU,CAC1B,MAAOA,EAAA+H,KAAA,CAXgB0L,mBAWhB,CADmB,CAf4C;AAGxE,IAAIC,EAAU,IAAAA,QAAVA,CAAyB,EAgB7B,KAAAtG,KAAA,CAAY,CAAC,UAAD,CAAa,YAAb,CAA2B,WAA3B,CAAwC,iBAAxC,CAA2D,WAA3D,CAAwE,gBAAxE,CACP,QAAQ,CAAC7M,CAAD,CAAa8M,CAAb,CAA2BsG,CAA3B,CAAwCjG,CAAxC,CAA2DF,CAA3D,CAAwEoG,CAAxE,CAAwF,CAKnGC,QAASA,EAAc,CAACC,CAAD,CAAa,CAqBlCC,QAASA,EAAW,CAACtO,CAAD,CAAQ,CAC1B,GAAIA,CAAAuO,UAAJ,CAAqB,MAAOvO,EAC5BA,EAAAuO,UAAA,CAAkB,CAAA,CAElB,KAAIC,EAAcxO,CAAAyO,QAAlB,CACItC,EAAaqC,CAAArC,WACjBuC,EAAAvO,IAAA,CAAWqO,CAAX,CAAwBxO,CAAxB,CAGA,KADA,IAAI2O,CACJ,CAAOxC,CAAP,CAAA,CAAmB,CAEjB,GADAwC,CACA,CADcD,CAAAxO,IAAA,CAAWiM,CAAX,CACd,CAAiB,CACVwC,CAAAJ,UAAL,GACEI,CADF,CACgBL,CAAA,CAAYK,CAAZ,CADhB,CAGA,MAJe,CAMjBxC,CAAA,CAAaA,CAAAA,WARI,CAWnBrB,CAAC6D,CAAD7D,EAAgB8D,CAAhB9D,UAAA9F,KAAA,CAAoChF,CAApC,CACA,OAAOA,EArBmB,CApB5B,IAAI4O,EAAO,CAAE9D,SAAU,EAAZ,CAAX,CACIzQ,CADJ,CACOqU,EAAS,IAAI3G,CAIpB,KAAK1N,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBgU,CAAApU,OAAhB,CAAmCI,CAAA,EAAnC,CAAwC,CACtC,IAAIwU,EAAYR,CAAA,CAAWhU,CAAX,CAChBqU,EAAAvO,IAAA,CAAW0O,CAAAJ,QAAX,CAA8BJ,CAAA,CAAWhU,CAAX,CAA9B,CAA8C,CAC5CoU,QAASI,CAAAJ,QADmC,CAE5CnL,GAAIuL,CAAAvL,GAFwC,CAG5CwH,SAAU,EAHkC,CAA9C,CAFsC,CASxC,IAAKzQ,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBgU,CAAApU,OAAhB,CAAmCI,CAAA,EAAnC,CACEiU,CAAA,CAAYD,CAAA,CAAWhU,CAAX,CAAZ,CAGF;MA0BAyU,SAAgB,CAACF,CAAD,CAAO,CACrB,IAAIG,EAAS,EAAb,CACIjM,EAAQ,EADZ,CAEIzI,CAEJ,KAAKA,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgBuU,CAAA9D,SAAA7Q,OAAhB,CAAsCI,CAAA,EAAtC,CACEyI,CAAAkC,KAAA,CAAW4J,CAAA9D,SAAA,CAAczQ,CAAd,CAAX,CAGE2U,EAAAA,CAAwBlM,CAAA7I,OAC5B,KAAIgV,EAAmB,CAAvB,CACIC,EAAM,EAEV,KAAK7U,CAAL,CAAS,CAAT,CAAYA,CAAZ,CAAgByI,CAAA7I,OAAhB,CAA8BI,CAAA,EAA9B,CAAmC,CACjC,IAAI2F,EAAQ8C,CAAA,CAAMzI,CAAN,CACiB,EAA7B,EAAI2U,CAAJ,GACEA,CAGA,CAHwBC,CAGxB,CAFAA,CAEA,CAFmB,CAEnB,CADAF,CAAA/J,KAAA,CAAYkK,CAAZ,CACA,CAAAA,CAAA,CAAM,EAJR,CAMAA,EAAAlK,KAAA,CAAShF,CAAAsD,GAAT,CACAtD,EAAA8K,SAAA3Q,QAAA,CAAuB,QAAQ,CAACgV,CAAD,CAAa,CAC1CF,CAAA,EACAnM,EAAAkC,KAAA,CAAWmK,CAAX,CAF0C,CAA5C,CAIAH,EAAA,EAbiC,CAgB/BE,CAAAjV,OAAJ,EACE8U,CAAA/J,KAAA,CAAYkK,CAAZ,CAGF,OAAOH,EAjCc,CA1BhB,CAAQH,CAAR,CAnB2B,CAHpC,IAAIQ,EAAiB,EAArB,CACI9F,EAAwBpO,CAAA,CAA6BJ,CAA7B,CAqF5B,OAAO,SAAQ,CAACP,CAAD,CAAU8C,CAAV,CAAiB9D,CAAjB,CAA0B,CA+GvC8V,QAASA,EAAc,CAAC3R,CAAD,CAAO,CAExBuF,CAAAA,CAAQvF,CAAA4R,aAAA,CA5NQC,gBA4NR,CAAA,CACJ,CAAC7R,CAAD,CADI,CAEJA,CAAAqN,iBAAA,CAHOyE,kBAGP,CACR,KAAIC,EAAU,EACdtV,EAAA,CAAQ8I,CAAR,CAAe,QAAQ,CAACvF,CAAD,CAAO,CAC5B,IAAIvB,EAAOuB,CAAAwN,aAAA,CAjOOqE,gBAiOP,CACPpT,EAAJ,EAAYA,CAAAlC,OAAZ,EACEwV,CAAAzK,KAAA,CAAatH,CAAb,CAH0B,CAA9B,CAMA,OAAO+R,EAZqB,CA/GS;AA8HvCC,QAASA,EAAe,CAACrB,CAAD,CAAa,CACnC,IAAIsB,EAAqB,EAAzB,CACIC,EAAY,EAChBzV,EAAA,CAAQkU,CAAR,CAAoB,QAAQ,CAACQ,CAAD,CAAYxK,CAAZ,CAAmB,CAE7C,IAAI3G,EAAOP,CAAA,CADG0R,CAAAtU,QACH,CAAX,CAEIsV,EAAkD,CAAlDA,EAAc,CAAC,OAAD,CAAU,MAAV,CAAApG,QAAA,CADNoF,CAAAxR,MACM,CAFlB,CAGIyS,EAAcjB,CAAAvH,WAAA,CAAuB+H,CAAA,CAAe3R,CAAf,CAAvB,CAA8C,EAEhE,IAAIoS,CAAA7V,OAAJ,CAAwB,CACtB,IAAI8V,EAAYF,CAAA,CAAc,IAAd,CAAqB,MAErC1V,EAAA,CAAQ2V,CAAR,CAAqB,QAAQ,CAACE,CAAD,CAAS,CACpC,IAAInT,EAAMmT,CAAA9E,aAAA,CAvPIqE,gBAuPJ,CACVK,EAAA,CAAU/S,CAAV,CAAA,CAAiB+S,CAAA,CAAU/S,CAAV,CAAjB,EAAmC,EACnC+S,EAAA,CAAU/S,CAAV,CAAA,CAAekT,CAAf,CAAA,CAA4B,CAC1BE,YAAa5L,CADa,CAE1B9J,QAASC,CAAA,CAAOwV,CAAP,CAFiB,CAHQ,CAAtC,CAHsB,CAAxB,IAYEL,EAAA3K,KAAA,CAAwB6J,CAAxB,CAnB2C,CAA/C,CAuBA,KAAIqB,EAAoB,EAAxB,CACIC,EAAe,EACnBhW,EAAA,CAAQyV,CAAR,CAAmB,QAAQ,CAACQ,CAAD,CAAavT,CAAb,CAAkB,CAC3C,IAAInD,EAAO0W,CAAA1W,KAAX,CACID,EAAK2W,CAAA3W,GAET,IAAKC,CAAL,EAAcD,CAAd,CAAA,CAYA,IAAI4W,EAAgBhC,CAAA,CAAW3U,CAAAuW,YAAX,CAApB,CACIK,EAAcjC,CAAA,CAAW5U,CAAAwW,YAAX,CADlB,CAEIM,EAAY7W,CAAAuW,YAAAO,SAAA,EAChB,IAAK,CAAAL,CAAA,CAAaI,CAAb,CAAL,CAA8B,CAC5B,IAAIE,EAAQN,CAAA,CAAaI,CAAb,CAARE,CAAkC,CACpCnJ,WAAY,CAAA,CADwB,CAEpCoJ,YAAaA,QAAQ,EAAG,CACtBL,CAAAK,YAAA,EACAJ,EAAAI,YAAA,EAFsB,CAFY;AAMpCtH,MAAOA,QAAQ,EAAG,CAChBiH,CAAAjH,MAAA,EACAkH,EAAAlH,MAAA,EAFgB,CANkB,CAUpCxP,QAAS+W,CAAA,CAAuBN,CAAAzW,QAAvB,CAA8C0W,CAAA1W,QAA9C,CAV2B,CAWpCF,KAAM2W,CAX8B,CAYpC5W,GAAI6W,CAZgC,CAapCb,QAAS,EAb2B,CAmBlCgB,EAAA7W,QAAAK,OAAJ,CACE0V,CAAA3K,KAAA,CAAwByL,CAAxB,CADF,EAGEd,CAAA3K,KAAA,CAAwBqL,CAAxB,CACA,CAAAV,CAAA3K,KAAA,CAAwBsL,CAAxB,CAJF,CApB4B,CA4B9BH,CAAA,CAAaI,CAAb,CAAAd,QAAAzK,KAAA,CAAqC,CACnC,IAAOtL,CAAAa,QAD4B,CACd,KAAMd,CAAAc,QADQ,CAArC,CA3CA,CAAA,IAGM8J,EAEJ,CAFY3K,CAAA,CAAOA,CAAAuW,YAAP,CAA0BxW,CAAAwW,YAEtC,CADIW,CACJ,CADevM,CAAAmM,SAAA,EACf,CAAKN,CAAA,CAAkBU,CAAlB,CAAL,GACEV,CAAA,CAAkBU,CAAlB,CACA,CAD8B,CAAA,CAC9B,CAAAjB,CAAA3K,KAAA,CAAwBqJ,CAAA,CAAWhK,CAAX,CAAxB,CAFF,CATyC,CAA7C,CAoDA,OAAOsL,EAhF4B,CAmFrCgB,QAASA,EAAsB,CAACzX,CAAD,CAAGC,CAAH,CAAM,CACnCD,CAAA,CAAIA,CAAAgB,MAAA,CAAQ,GAAR,CACJf,EAAA,CAAIA,CAAAe,MAAA,CAAQ,GAAR,CAGJ,KAFA,IAAIyO,EAAU,EAAd,CAEStO,EAAI,CAAb,CAAgBA,CAAhB,CAAoBnB,CAAAe,OAApB,CAA8BI,CAAA,EAA9B,CAAmC,CACjC,IAAIwW,EAAK3X,CAAA,CAAEmB,CAAF,CACT,IAA0B,KAA1B,GAAIwW,CAAA1R,UAAA,CAAa,CAAb,CAAe,CAAf,CAAJ,CAEA,IAAS,IAAA2R,EAAI,CAAb,CAAgBA,CAAhB,CAAoB3X,CAAAc,OAApB,CAA8B6W,CAAA,EAA9B,CACE,GAAID,CAAJ,GAAW1X,CAAA,CAAE2X,CAAF,CAAX,CAAiB,CACfnI,CAAA3D,KAAA,CAAa6L,CAAb,CACA,MAFe,CALc,CAYnC,MAAOlI,EAAAtP,KAAA,CAAa,GAAb,CAjB4B,CAoBrC0X,QAASA,EAAiB,CAACpG,CAAD,CAAmB,CAG3C,IAAS,IAAAtQ;AAAI4T,CAAAhU,OAAJI,CAAqB,CAA9B,CAAsC,CAAtC,EAAiCA,CAAjC,CAAyCA,CAAA,EAAzC,CAA8C,CAC5C,IAAI2W,EAAa/C,CAAA,CAAQ5T,CAAR,CACjB,IAAK6T,CAAA+C,IAAA,CAAcD,CAAd,CAAL,GAGIE,CAHJ,CAEchD,CAAAhO,IAAAuC,CAAcuO,CAAdvO,CACD,CAAQkI,CAAR,CAHb,EAKE,MAAOuG,EAPmC,CAHH,CAsB7CC,QAASA,EAAsB,CAACtC,CAAD,CAAYuC,CAAZ,CAAuB,CAChDvC,CAAAnV,KAAJ,EAAsBmV,CAAApV,GAAtB,EAQEsU,CAAA,CAPOc,CAAAnV,KAAAa,QAOP,CAAAsJ,QAAA,CAA2BuN,CAA3B,CAAA,CAAArD,CAAA,CANOc,CAAApV,GAAAc,QAMP,CAAAsJ,QAAA,CAA2BuN,CAA3B,CARF,EAQErD,CAAA,CAJOc,CAAAtU,QAIP,CAAAsJ,QAAA,CAA2BuN,CAA3B,CATkD,CAatDC,QAASA,GAAsB,EAAG,CAChC,IAAIzM,EAASmJ,CAAA,CAAUxT,CAAV,CACTqK,EAAAA,CAAJ,EAAyB,OAAzB,GAAevH,CAAf,EAAqC9D,CAAAiC,oBAArC,EACEoJ,CAAAmB,IAAA,EAH8B,CAOlCqD,QAASA,EAAK,CAACkI,CAAD,CAAW,CACvB/W,CAAAyS,IAAA,CAAY,UAAZ,CAAwBqE,EAAxB,CACa9W,EAjXjBgX,WAAA,CAPuBvD,mBAOvB,CAmXI1E,EAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CACAkC,GAAA,CAAqBlB,CAArB,CAA8BhB,CAA9B,CACAA,EAAA8B,aAAA,EAEImW,EAAJ,EACE1W,CAAAG,YAAA,CAAqBV,CAArB,CAA8BiX,CAA9B,CAGFjX,EAAAU,YAAA,CApkGmBwW,YAokGnB,CACA7M,EAAAsB,SAAA,CAAgB,CAACoL,CAAjB,CAbuB,CA9QzB/X,CAAA,CAAU4B,EAAA,CAAwB5B,CAAxB,CACV,KAAIiQ,EAA4D,CAA5DA,EAAe,CAAC,OAAD,CAAU,MAAV,CAAkB,OAAlB,CAAAC,QAAA,CAAmCpM,CAAnC,CAAnB,CAMIuH,EAAS,IAAIqD,CAAJ,CAAoB,CAC/BlC,IAAKA,QAAQ,EAAG,CAAEqD,CAAA,EAAF,CADe;AAE/BnD,OAAQA,QAAQ,EAAG,CAAEmD,CAAA,CAAM,CAAA,CAAN,CAAF,CAFY,CAApB,CAKb,IAAKnP,CAAAgU,CAAAhU,OAAL,CAEE,MADAmP,EAAA,EACOxE,CAAAA,CAGCrK,EAtHZ+H,KAAA,CAHuB0L,mBAGvB,CAsHqBpJ,CAtHrB,CAwHE,KAAIhL,EAAUX,EAAA,CAAasB,CAAA4B,KAAA,CAAa,OAAb,CAAb,CAAoClD,EAAA,CAAaM,CAAAwB,SAAb,CAA+BxB,CAAA0B,YAA/B,CAApC,CAAd,CACIuW,EAAcjY,CAAAiY,YACdA,EAAJ,GACE5X,CACA,EADW,GACX,CADiB4X,CACjB,CAAAjY,CAAAiY,YAAA,CAAsB,IAFxB,CAKApC,EAAApK,KAAA,CAAoB,CAGlBzK,QAASA,CAHS,CAIlBX,QAASA,CAJS,CAKlByD,MAAOA,CALW,CAMlBiK,WAAYkC,CANM,CAOlBjQ,QAASA,CAPS,CAQlBmX,YAiNFA,QAAoB,EAAG,CACrBnW,CAAAQ,SAAA,CA9hGmB0W,YA8hGnB,CACID,EAAJ,EACE1W,CAAAC,SAAA,CAAkBR,CAAlB,CAA2BiX,CAA3B,CAHmB,CAzNH,CASlBpI,MAAOA,CATW,CAApB,CAYA7O,EAAAuS,GAAA,CAAW,UAAX,CAAuBuE,EAAvB,CAKA,IAA4B,CAA5B,CAAIjC,CAAAnV,OAAJ,CAA+B,MAAO2K,EAEtCgD,EAAAU,aAAA,CAAwB,QAAQ,EAAG,CACjC,IAAI+F,EAAa,EACjBlU,EAAA,CAAQiV,CAAR,CAAwB,QAAQ,CAACpP,CAAD,CAAQ,CAIlC+N,CAAA,CAAU/N,CAAAzF,QAAV,CAAJ,CACE8T,CAAArJ,KAAA,CAAgBhF,CAAhB,CADF,CAGEA,CAAAoJ,MAAA,EAPoC,CAAxC,CAYAgG,EAAAnV,OAAA,CAAwB,CAExB,KAAIyX,EAAoBhC,CAAA,CAAgBrB,CAAhB,CAAxB,CACIsD,EAAuB,EAE3BxX,EAAA,CAAQuX,CAAR,CAA2B,QAAQ,CAACE,CAAD,CAAiB,CAClDD,CAAA3M,KAAA,CAA0B,CACxByJ,QAAStR,CAAA,CAAWyU,CAAAlY,KAAA;AAAsBkY,CAAAlY,KAAAa,QAAtB,CAAoDqX,CAAArX,QAA/D,CADe,CAExB+I,GAAIuO,QAA8B,EAAG,CAInCD,CAAAlB,YAAA,EAJmC,KAM/BoB,CAN+B,CAMbC,EAAUH,CAAAxI,MAQhC,IAAI2E,CAAA,CAJgB6D,CAAAnC,QAAAuC,CACbJ,CAAAlY,KAAAa,QADayX,EACkBJ,CAAAnY,GAAAc,QADlByX,CAEdJ,CAAArX,QAEF,CAAJ,CAA8B,CAC5B,IAAI0X,EAAYlB,CAAA,CAAkBa,CAAlB,CACZK,EAAJ,GACEH,CADF,CACqBG,CAAAC,MADrB,CAF4B,CAOzBJ,CAAL,EAGMK,CAIJ,CAJsBL,CAAA,EAItB,CAHAK,CAAAtN,KAAA,CAAqB,QAAQ,CAACF,CAAD,CAAS,CACpCoN,CAAA,CAAQ,CAACpN,CAAT,CADoC,CAAtC,CAGA,CAAAwM,CAAA,CAAuBS,CAAvB,CAAuCO,CAAvC,CAPF,EACEJ,CAAA,EAtBiC,CAFb,CAA1B,CADkD,CAApD,CAwCA5D,EAAA,CAAeC,CAAA,CAAeuD,CAAf,CAAf,CA3DiC,CAAnC,CA8DA,OAAO/M,EA5GgC,CAxF0D,CADzF,CAnB4D,CAAhDkJ,CA+mC1B,CAAArH,SAAA,CAUY,aAVZ,CAvjG0B2L,CAAC,kBAADA,CAAqB,QAAQ,CAACzL,CAAD,CAAmB,CACxE,IAAI0L,EAAYzS,EAAA,EAAhB,CACI0S,EAAmB1S,EAAA,EAEvB,KAAA+H,KAAA,CAAY,CAAC,SAAD,CAAY,UAAZ,CAAwB,iBAAxB,CAA2C,UAA3C,CACC,eADD,CACkB,UADlB,CAC8B,gBAD9B,CACgD,UADhD,CAEP,QAAQ,CAACtJ,CAAD,CAAYvD,CAAZ,CAAwBmN,CAAxB,CAA2CsK,CAA3C,CACCpK,CADD,CACkB1E,CADlB,CAC8B0K,CAD9B,CAC8CqE,CAD9C,CACwD,CAKnEC,QAASA,GAAS,CAAC/U,CAAD,CAAOgV,CAAP,CAAqB,CAErC,IAAIvG,EAAazO,CAAAyO,WAEjB,QADeA,CAAA,qBACf;CADmCA,CAAA,qBACnC,CADqD,EAAEwG,CACvD,GAAkB,GAAlB,CAAwBjV,CAAAwN,aAAA,CAAkB,OAAlB,CAAxB,CAAqD,GAArD,CAA2DwH,CAJtB,CAuBvCE,QAASA,EAA6B,CAAClV,CAAD,CAAO3D,CAAP,CAAkB8Y,CAAlB,CAA4BvU,CAA5B,CAAwC,CAC5E,IAAIwU,CAK4B,EAAhC,CAAIT,CAAAtS,MAAA,CAAgB8S,CAAhB,CAAJ,GACEC,CAEA,CAFUR,CAAApS,IAAA,CAAqB2S,CAArB,CAEV,CAAKC,CAAL,GACMC,CAYJ,CAZuBpZ,CAAA,CAAYI,CAAZ,CAAuB,UAAvB,CAYvB,CAVAe,CAAAC,SAAA,CAAkB2C,CAAlB,CAAwBqV,CAAxB,CAUA,CARAD,CAQA,CARU1U,EAAA,CAAiBC,CAAjB,CAA0BX,CAA1B,CAAgCY,CAAhC,CAQV,CALAwU,CAAAnR,kBAKA,CAL4BtC,IAAAC,IAAA,CAASwT,CAAAnR,kBAAT,CAAoC,CAApC,CAK5B,CAJAmR,CAAAvR,mBAIA,CAJ6BlC,IAAAC,IAAA,CAASwT,CAAAvR,mBAAT,CAAqC,CAArC,CAI7B,CAFAzG,CAAAG,YAAA,CAAqByC,CAArB,CAA2BqV,CAA3B,CAEA,CAAAT,CAAAnS,IAAA,CAAqB0S,CAArB,CAA+BC,CAA/B,CAbF,CAHF,CAoBA,OAAOA,EAAP,EAAkB,EA1B0D,CA+B9E1P,QAASA,EAAc,CAACe,CAAD,CAAW,CAChC6O,CAAAhO,KAAA,CAAkBb,CAAlB,CACAgK,EAAA/K,eAAA,CAA8B,QAAQ,EAAG,CACvCiP,CAAAvS,MAAA,EACAwS,EAAAxS,MAAA,EAQA,KAJA,IAAImT,EAAY9K,CAAA,EAAhB,CAIS9N,EAAI,CAAb,CAAgBA,CAAhB,CAAoB2Y,CAAA/Y,OAApB,CAAyCI,CAAA,EAAzC,CACE2Y,CAAA,CAAa3Y,CAAb,CAAA,CAAgB4Y,CAAhB,CAEFD,EAAA/Y,OAAA,CAAsB,CAbiB,CAAzC,CAFgC,CAmBlCiZ,QAASA,EAAc,CAACxV,CAAD,CAAO3D,CAAP,CAAkB8Y,CAAlB,CAA4B,CAjE7CM,CAAAA,CAAUd,CAAAnS,IAAA,CAkEwC2S,CAlExC,CAETM,EAAL,GACEA,CACA,CADU/U,EAAA,CAAiBC,CAAjB,CA+DyBX,CA/DzB,CA+DoD4D,EA/DpD,CACV,CAAwC,UAAxC;AAAI6R,CAAAtR,wBAAJ,GACEsR,CAAAtR,wBADF,CACoC,CADpC,CAFF,CASAwQ,EAAAlS,IAAA,CAuDsD0S,CAvDtD,CAAwBM,CAAxB,CACA,EAAA,CAAOA,CAuDHC,EAAAA,CAAKD,CAAAvR,eACLyR,EAAAA,CAAKF,CAAA3R,gBACT2R,EAAAG,SAAA,CAAmBF,CAAA,EAAMC,CAAN,CACbhU,IAAAC,IAAA,CAAS8T,CAAT,CAAaC,CAAb,CADa,CAEZD,CAFY,EAENC,CACbF,EAAAI,YAAA,CAAsBlU,IAAAC,IAAA,CAClB6T,CAAAxR,kBADkB,CACUwR,CAAAtR,wBADV,CAElBsR,CAAA5R,mBAFkB,CAItB,OAAO4R,EAX0C,CA5EnD,IAAI7J,EAAwBpO,CAAA,CAA6BJ,CAA7B,CAA5B,CAEI6X,EAAgB,CAFpB,CAwDIK,EAAe,EAkCnB,OAAOQ,SAAa,CAACjZ,CAAD,CAAUhB,CAAV,CAAmB,CAkPrCka,QAASA,EAAK,EAAG,CACfrK,CAAA,EADe,CAIjBjG,QAASA,EAAQ,EAAG,CAClBiG,CAAA,CAAM,CAAA,CAAN,CADkB,CAIpBA,QAASA,EAAK,CAACkI,CAAD,CAAW,CAGvB,GAAI,EAAAoC,EAAA,EAAoBC,EAApB,EAA0CC,CAA1C,CAAJ,CAAA,CACAF,EAAA,CAAkB,CAAA,CAClBE,EAAA,CAAkB,CAAA,CAEbra,EAAAsa,yBAAL,EACE/Y,CAAAG,YAAA,CAAqBV,CAArB,CAA8B6B,CAA9B,CAEFtB,EAAAG,YAAA,CAAqBV,CAArB,CAA8B8O,CAA9B,CAEAvL,GAAA,CAAwBJ,CAAxB,CAA8B,CAAA,CAA9B,CACAD,GAAA,CAAiBC,CAAjB,CAAuB,CAAA,CAAvB,CAEAvD,EAAA,CAAQ2Z,CAAR,CAAyB,QAAQ,CAAC9T,CAAD,CAAQ,CAIvCtC,CAAAS,MAAA,CAAW6B,CAAA,CAAM,CAAN,CAAX,CAAA,CAAuB,EAJgB,CAAzC,CAOAsJ,EAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CACAkC,GAAA,CAAqBlB,CAArB,CAA8BhB,CAA9B,CAEIgF,OAAAgM,KAAA,CAAYwJ,CAAZ,CAAA9Z,OAAJ;AACEE,CAAA,CAAQ4Z,CAAR,CAAuB,QAAQ,CAACnX,CAAD,CAAQK,CAAR,CAAc,CAC3CL,CAAA,CAAQc,CAAAS,MAAA6V,YAAA,CAAuB/W,CAAvB,CAA6BL,CAA7B,CAAR,CACQc,CAAAS,MAAA8V,eAAA,CAA0BhX,CAA1B,CAFmC,CAA7C,CAWF,IAAI1D,CAAA2a,OAAJ,CACE3a,CAAA2a,OAAA,EAIEtP,EAAJ,EACEA,CAAAsB,SAAA,CAAgB,CAACoL,CAAjB,CAxCF,CAHuB,CA+CzB6C,QAASA,EAAa,CAACxW,CAAD,CAAW,CAC3BhB,CAAAyX,gBAAJ,EACE3W,EAAA,CAAiBC,CAAjB,CAAuBC,CAAvB,CAGEhB,EAAA0X,uBAAJ,EACEvW,EAAA,CAAwBJ,CAAxB,CAA8B,CAAEC,CAAAA,CAAhC,CAN6B,CAUjC2W,QAASA,EAA0B,EAAG,CACpC1P,CAAA,CAAS,IAAIqD,CAAJ,CAAoB,CAC3BlC,IAAK0N,CADsB,CAE3BxN,OAAQ9C,CAFmB,CAApB,CAMTC,EAAA,CAAe9H,CAAf,CACA8N,EAAA,EAEA,OAAO,CACLmL,cAAe,CAAA,CADV,CAELrC,MAAOA,QAAQ,EAAG,CAChB,MAAOtN,EADS,CAFb,CAKLmB,IAAK0N,CALA,CAV6B,CAmBtCvB,QAASA,EAAK,EAAG,CAoDfL,QAASA,EAAqB,EAAG,CAG/B,GAAI6B,CAAAA,EAAJ,CAAA,CAEAS,CAAA,CAAc,CAAA,CAAd,CAEAha,EAAA,CAAQ2Z,CAAR,CAAyB,QAAQ,CAAC9T,CAAD,CAAQ,CAGvCtC,CAAAS,MAAA,CAFU6B,CAAAnD,CAAM,CAANA,CAEV,CAAA,CADYmD,CAAApD,CAAM,CAANA,CAF2B,CAAzC,CAMA0M,EAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CACAuB,EAAAC,SAAA,CAAkBR,CAAlB,CAA2B8O,CAA3B,CAEA,IAAI1M,CAAA6X,wBAAJ,CAAmC,CACjCC,EAAA,CAAgB/W,CAAA3D,UAAhB,CAAiC,GAAjC,CAAuCqC,CACvCyW,GAAA,CAAWJ,EAAA,CAAU/U,CAAV,CAAgB+W,EAAhB,CAEXtB,EAAA,CAAUD,CAAA,CAAexV,CAAf,CAAqB+W,EAArB,CAAoC5B,EAApC,CACV6B,EAAA,CAAgBvB,CAAAG,SAChBA,EAAA,CAAWjU,IAAAC,IAAA,CAASoV,CAAT,CAAwB,CAAxB,CACXnB;CAAA,CAAcJ,CAAAI,YAEd,IAAoB,CAApB,GAAIA,CAAJ,CAAuB,CACrBnK,CAAA,EACA,OAFqB,CAKvBzM,CAAAgY,eAAA,CAAoD,CAApD,CAAuBxB,CAAA5R,mBACvB5E,EAAAiY,cAAA,CAAkD,CAAlD,CAAsBzB,CAAAxR,kBAfW,CAkB/BhF,CAAAkY,oBAAJ,GACEH,CAQA,CARyC,SAAzB,GAAA,MAAOnb,EAAAub,MAAP,EAAsCvV,EAAA,CAAkBhG,CAAAub,MAAlB,CAAtC,CACR1V,UAAA,CAAW7F,CAAAub,MAAX,CADQ,CAERJ,CAMR,CAJApB,CAIA,CAJWjU,IAAAC,IAAA,CAASoV,CAAT,CAAwB,CAAxB,CAIX,CAHAvB,CAAAvR,eAGA,CAHyB8S,CAGzB,CAFAK,EAEA,CA/mBH,CAD0B7T,EAC1B,CA6mBiCwT,CA7mBjC,CAAe,GAAf,CA+mBG,CADAZ,CAAA9O,KAAA,CAAqB+P,EAArB,CACA,CAAArX,CAAAS,MAAA,CAAW4W,EAAA,CAAW,CAAX,CAAX,CAAA,CAA4BA,EAAA,CAAW,CAAX,CAT9B,CAYAC,EAAA,CA9oBOC,GA8oBP,CAAe3B,CACf4B,EAAA,CA/oBOD,GA+oBP,CAAkB1B,CAElB,IAAIha,CAAA4b,OAAJ,CAAoB,CAAA,IACdC,CADc,CACJC,EAAU9b,CAAA4b,OACpBxY,EAAAgY,eAAJ,GACES,CAEA,CAFW1V,CAEX,CApuCG4V,gBAouCH,CADAxB,CAAA9O,KAAA,CAAqB,CAACoQ,CAAD,CAAWC,CAAX,CAArB,CACA,CAAA3X,CAAAS,MAAA,CAAWiX,CAAX,CAAA,CAAuBC,CAHzB,CAKI1Y,EAAAiY,cAAJ,GACEQ,CAEA,CAFWpX,CAEX,CAzuCGsX,gBAyuCH,CADAxB,CAAA9O,KAAA,CAAqB,CAACoQ,CAAD,CAAWC,CAAX,CAArB,CACA,CAAA3X,CAAAS,MAAA,CAAWiX,CAAX,CAAA,CAAuBC,CAHzB,CAPkB,CAchBlC,CAAA5R,mBAAJ,EACEgU,CAAAvQ,KAAA,CAAYpE,EAAZ,CAGEuS,EAAAxR,kBAAJ;AACE4T,CAAAvQ,KAAA,CAAYnE,EAAZ,CAGF2U,EAAA,CAAYC,IAAAC,IAAA,EACZ,KAAIC,EAAYX,CAAZW,CApqBYC,GAoqBZD,CAAiDT,CACjDW,EAAAA,CAAUL,CAAVK,CAAsBF,CAEtBG,KAAAA,EAAiBvb,CAAA+H,KAAA,CAn4BPyT,cAm4BO,CAAjBD,EAAoD,EAApDA,CACAE,EAAqB,CAAA,CACzB,IAAIF,CAAA7b,OAAJ,CAA2B,CACzB,IAAIgc,EAAmBH,CAAA,CAAe,CAAf,CAEvB,EADAE,CACA,CADqBH,CACrB,CAD+BI,CAAAC,gBAC/B,EACE3D,CAAAtM,OAAA,CAAgBgQ,CAAAE,MAAhB,CADF,CAGEL,CAAA9Q,KAAA,CAAoBoE,CAApB,CANuB,CAUvB4M,CAAJ,GACMG,CAMJ,CANY5D,CAAA,CAAS6D,CAAT,CAA6BT,CAA7B,CAAwC,CAAA,CAAxC,CAMZ,CALAG,CAAA,CAAe,CAAf,CAKA,CALoB,CAClBK,MAAOA,CADW,CAElBD,gBAAiBL,CAFC,CAKpB,CADAC,CAAA9Q,KAAA,CAAoBoE,CAApB,CACA,CAAA7O,CAAA+H,KAAA,CAt5BYyT,cAs5BZ,CAAgCD,CAAhC,CAPF,CAUAvb,EAAAuS,GAAA,CAAWyI,CAAAlc,KAAA,CAAY,GAAZ,CAAX,CAA6Bgd,CAA7B,CACI9c,EAAAE,GAAJ,GACMF,CAAA+c,cAGJ,EAFElW,EAAA,CAAyB2T,CAAzB,CAAwCrW,CAAxC,CAA8Ca,MAAAgM,KAAA,CAAYhR,CAAAE,GAAZ,CAA9C,CAEF,CAAAkC,EAAA,CAAuBpB,CAAvB,CAAgChB,CAAhC,CAJF,CA/FA,CAH+B,CA0GjC6c,QAASA,EAAkB,EAAG,CAC5B,IAAIN,EAAiBvb,CAAA+H,KAAA,CAn6BPyT,cAm6BO,CAKrB,IAAID,CAAJ,CAAoB,CAClB,IAAS,IAAAzb,EAAI,CAAb,CAAgBA,CAAhB,CAAoByb,CAAA7b,OAApB,CAA2CI,CAAA,EAA3C,CACEyb,CAAA,CAAezb,CAAf,CAAA,EAEFE,EAAAgX,WAAA,CA56BYwE,cA46BZ,CAJkB,CANQ,CAc9BM,QAASA,EAAmB,CAAChZ,CAAD,CAAQ,CAClCA,CAAAkZ,gBAAA,EACA,KAAIC,EAAKnZ,CAAAoZ,cAALD,EAA4BnZ,CAC5BqZ,EAAAA,CAAYF,CAAAG,iBAAZD;AAAmCF,CAAAE,UAAnCA,EAAmDjB,IAAAC,IAAA,EAInDkB,EAAAA,CAAcxX,UAAA,CAAWoX,CAAAI,YAAAC,QAAA,CA5tBDC,CA4tBC,CAAX,CASdzX,KAAAC,IAAA,CAASoX,CAAT,CAAqBlB,CAArB,CAAgC,CAAhC,CAAJ,EAA0CR,CAA1C,EAA0D4B,CAA1D,EAAyErD,CAAzE,GAGEI,EACA,CADqB,CAAA,CACrB,CAAAvK,CAAA,EAJF,CAhBkC,CA3KpC,GAAIsK,CAAAA,EAAJ,CACA,GAAKhW,CAAAyO,WAAL,CAAA,CAFe,IAOXqJ,CAPW,CAOAD,EAAS,EAPT,CAaXwB,EAAYA,QAAQ,CAACC,CAAD,CAAgB,CACtC,GAAKrD,EAAL,CAQWC,CAAJ,EAAuBoD,CAAvB,GACLpD,CACA,CADkB,CAAA,CAClB,CAAAxK,CAAA,EAFK,CARP,KAEE,IADAwK,CACIjS,CADc,CAACqV,CACfrV,CAAAwR,CAAAxR,kBAAJ,CAEE,GADI/E,CACJgX,CADY9V,EAAA,CAAwBJ,CAAxB,CAA8BkW,CAA9B,CACZA,CAAAA,CAAA,CACME,CAAA9O,KAAA,CAAqBpI,CAArB,CADN,KAAA,CAEsBkX,IAAAA,EAAAA,CAAAA,CArlC9BzP,EAAQ4S,CAAAxN,QAAA,CAqlCuC7M,CArlCvC,CACD,EAAX,EAolCmDA,CAplCnD,EACEqa,CAAAC,OAAA,CAAW7S,CAAX,CAAkB,CAAlB,CAilCU,CALkC,CAbzB,CA+BX8S,EAAyB,CAAzBA,CAAaC,CAAbD,GACkBhE,CAAA5R,mBADlB4V,EAC+E,CAD/EA,GACgDrE,CAAAvR,mBADhD4V,EAEiBhE,CAAAxR,kBAFjBwV,EAE4E,CAF5EA,GAE8CrE,CAAAnR,kBAF9CwV,GAGgB9X,IAAAC,IAAA,CAASwT,CAAAlR,eAAT,CAAiCkR,CAAAtR,gBAAjC,CAChB2V,EAAJ,CACE5E,CAAA,CAASV,CAAT,CACSxS,IAAAgY,MAAA,CAAWF,CAAX,CAAwBC,CAAxB,CAjlBFnC,GAilBE,CADT,CAES,CAAA,CAFT,CADF,CAKEpD,CAAA,EAIFyF,EAAAxR,OAAA,CAAoByR,QAAQ,EAAG,CAC7BR,CAAA,CAAU,CAAA,CAAV,CAD6B,CAI/BO,EAAAzR,MAAA,CAAmB2R,QAAQ,EAAG,CAC5BT,CAAA,CAAU,CAAA,CAAV,CAD4B,CA9C9B,CAAA,IACE3N,EAAA,EAHa,CAtUoB;AACrC,IAAI2K,EAAgB,EAApB,CACIrW,EAAOP,CAAA,CAAW5C,CAAX,CACX,IAAKmD,CAAAA,CAAL,EACQyO,CAAAzO,CAAAyO,WADR,EAEQ,CAAAqG,CAAA/E,QAAA,EAFR,CAGE,MAAO6G,EAAA,EAGT/a,EAAA,CAAU4B,EAAA,CAAwB5B,CAAxB,CAEV,KAAIua,EAAkB,EAAtB,CACIla,EAAUW,CAAA4B,KAAA,CAAa,OAAb,CADd,CAEI3C,EAASF,EAAA,CAAcC,CAAd,CAFb,CAGIma,EAHJ,CAIIE,CAJJ,CAKID,EALJ,CAMI/O,CANJ,CAOI0S,CAPJ,CAQIhE,CARJ,CASI0B,CATJ,CAUIzB,CAVJ,CAWI2B,CAEJ,IAAyB,CAAzB,GAAI3b,CAAAoE,SAAJ,EAAgC0Q,CAAA5K,CAAA4K,WAAhC,EAAwDoJ,CAAAhU,CAAAgU,YAAxD,CACE,MAAOnD,EAAA,EAGT,KAAIoD,GAASne,CAAA8D,MAAA,EAAiBjE,CAAA,CAAQG,CAAA8D,MAAR,CAAjB,CACL9D,CAAA8D,MAAAhE,KAAA,CAAmB,GAAnB,CADK,CAELE,CAAA8D,MAFR,CAKIsa,EAAsB,EAL1B,CAMIC,EAAqB,EAFNF,GAInB,EAJ6Bne,CAAA+N,WAI7B,CACEqQ,CADF,CACwBhe,CAAA,CAAY+d,EAAZ,CAh4BLpa,KAg4BK,CAAwC,CAAA,CAAxC,CADxB,CAEWoa,EAFX,GAGEC,CAHF,CAGwBD,EAHxB,CAMIne,EAAAwB,SAAJ,GACE6c,CADF,EACwBje,CAAA,CAAYJ,CAAAwB,SAAZ,CAx4BPwC,MAw4BO,CADxB,CAIIhE,EAAA0B,YAAJ,GACM2c,CAAA3d,OAGJ,GAFE2d,CAEF,EAFwB,GAExB,EAAAA,CAAA,EAAsBje,CAAA,CAAYJ,CAAA0B,YAAZ,CA94BJuC,SA84BI,CAJxB,CAaIjE,EAAAse,kBAAJ,EAAiCD,CAAA3d,OAAjC,EACEqP,CAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CAGF,KAAI6C,EAAqB,CAACub,CAAD,CAAsBC,CAAtB,CAAAve,KAAA,CAA+C,GAA/C,CAAAye,KAAA,EAAzB,CACIrD,GAAgB7a,CAAhB6a,CAA0B,GAA1BA,CAAgCrY,CADpC,CAEIiN,EAAgB1P,CAAA,CAAYyC,CAAZ,CA35BA2b,SA25BA,CAFpB,CAGIC,EAAcxe,CAAAC,GAAdue,EAA2D,CAA3DA;AAA2BzZ,MAAAgM,KAAA,CAAY/Q,CAAAC,GAAZ,CAAAQ,OAM/B,IAAI,EALmE,CAKnE,CAL4BA,CAACV,CAAA0e,cAADhe,EAA0B,EAA1BA,QAK5B,EACK+d,CADL,EAEK5b,CAFL,CAAJ,CAGE,MAAOkY,EAAA,EA3E4B,KA8EjCzB,EA9EiC,CA8EvBC,CACQ,EAAtB,CAAIvZ,CAAAuZ,QAAJ,EACMoF,CACJ,CADiB9Y,UAAA,CAAW7F,CAAAuZ,QAAX,CACjB,CAAAA,CAAA,CAAU,CACRtR,gBAAiB0W,CADT,CAERtW,eAAgBsW,CAFR,CAGR3W,mBAAoB,CAHZ,CAIRI,kBAAmB,CAJX,CAFZ,GASEkR,EACA,CADWJ,EAAA,CAAU/U,CAAV,CAAgB+W,EAAhB,CACX,CAAA3B,CAAA,CAAUF,CAAA,CAA8BlV,CAA9B,CAAoCtB,CAApC,CAAwDyW,EAAxD,CAAkE9Q,EAAlE,CAVZ,CAaKxI,EAAAsa,yBAAL,EACE/Y,CAAAC,SAAA,CAAkBR,CAAlB,CAA2B6B,CAA3B,CAKE7C,EAAA4e,gBAAJ,GACMA,CAEJ,CAFsB,CAACzY,CAAD,CAAkBnG,CAAA4e,gBAAlB,CAEtB,CADAva,EAAA,CAAiBF,CAAjB,CAAuBya,CAAvB,CACA,CAAArE,CAAA9O,KAAA,CAAqBmT,CAArB,CAHF,CAMwB,EAAxB,EAAI5e,CAAAoE,SAAJ,GACE8B,CAKA,CALyD,CAKzD,CALoB/B,CAAAS,MAAA,CAAWuB,CAAX,CAAAzF,OAKpB,CAJIme,CAIJ,CAJoB5Y,EAAA,CAA8BjG,CAAAoE,SAA9B,CAAgD8B,CAAhD,CAIpB,CADA7B,EAAA,CAAiBF,CAAjB,CAAuB0a,CAAvB,CACA,CAAAtE,CAAA9O,KAAA,CAAqBoT,CAArB,CANF,CASI7e,EAAA0e,cAAJ,GACMA,CAEJ,CAFoB,CAACja,CAAD,CAAiBzE,CAAA0e,cAAjB,CAEpB,CADAra,EAAA,CAAiBF,CAAjB,CAAuBua,CAAvB,CACA,CAAAnE,CAAA9O,KAAA,CAAqBiT,CAArB,CAHF,CAMA,KAAIb,EAAYtE,CAAA,CACc,CAAxB,EAAAvZ,CAAA8e,aAAA;AACI9e,CAAA8e,aADJ,CAEIhG,CAAAtS,MAAA,CAAgB8S,EAAhB,CAHM,CAIV,CAUN,EARIyF,EAQJ,CAR4B,CAQ5B,GARclB,CAQd,GAAgBmB,CAAAhf,CAAAgf,aAAhB,EACE9a,EAAA,CAAiBC,CAAjB,CAv7B+B8a,IAu7B/B,CAGF,KAAIrF,EAAUD,CAAA,CAAexV,CAAf,CAAqB+W,EAArB,CAAoC5B,EAApC,CAAd,CACI6B,EAAgBvB,CAAAG,SACpBA,EAAA,CAAWjU,IAAAC,IAAA,CAASoV,CAAT,CAAwB,CAAxB,CACXnB,EAAA,CAAcJ,CAAAI,YAEd,KAAI5W,EAAQ,EACZA,EAAAgY,eAAA,CAA6D,CAA7D,CAAgCxB,CAAA5R,mBAChC5E,EAAAiY,cAAA,CAA4D,CAA5D,CAAgCzB,CAAAxR,kBAChChF,EAAA8b,iBAAA,CAAgC9b,CAAAgY,eAAhC,EAAsF,KAAtF,EAAwDxB,CAAA1R,mBACxD9E,EAAA+b,wBAAA,CAAgCV,CAAhC,GACmCrb,CAAAgY,eADnC,EAC2D,CAAChY,CAAA8b,iBAD5D,EAEuC9b,CAAAiY,cAFvC,EAE8D,CAACjY,CAAAgY,eAF/D,CAGAhY,EAAAgc,uBAAA,CAAgCpf,CAAAoE,SAAhC,EAAoDhB,CAAAiY,cACpDjY,EAAAic,qBAAA,CAAgCrZ,EAAA,CAAkBhG,CAAAub,MAAlB,CAAhC,GAAqEnY,CAAA+b,wBAArE;AAAsG/b,CAAAgY,eAAtG,CACAhY,EAAAkY,oBAAA,CAAgCtV,EAAA,CAAkBhG,CAAAub,MAAlB,CAAhC,EAAoEnY,CAAAiY,cACpEjY,EAAA6X,wBAAA,CAA4D,CAA5D,CAAgCoD,CAAA3d,OAEhC,IAAI0C,CAAA+b,wBAAJ,EAAqC/b,CAAAgc,uBAArC,CACEpF,CASA,CATcha,CAAAoE,SAAA,CAAmByB,UAAA,CAAW7F,CAAAoE,SAAX,CAAnB,CAAkD4V,CAShE,CAPI5W,CAAA+b,wBAOJ,GANE/b,CAAAgY,eAGA,CAHuB,CAAA,CAGvB,CAFAxB,CAAA5R,mBAEA,CAF6BgS,CAE7B,CADA9T,CACA,CADwE,CACxE,CADoB/B,CAAAS,MAAA,CAAWuB,CAAX,CAt9BXgC,UAs9BW,CAAAzH,OACpB,CAAA6Z,CAAA9O,KAAA,CAAqBxF,EAAA,CAA8B+T,CAA9B,CAA2C9T,CAA3C,CAArB,CAGF,EAAI9C,CAAAgc,uBAAJ,GACEhc,CAAAiY,cAEA,CAFsB,CAAA,CAEtB,CADAzB,CAAAxR,kBACA,CAD4B4R,CAC5B,CAAAO,CAAA9O,KAAA,CAtXD,CAAC5D,EAAD,CAsXkDmS,CAtXlD,CAAqC,GAArC,CAsXC,CAHF,CAOF,IAAoB,CAApB,GAAIA,CAAJ,EAA0BiB,CAAA7X,CAAA6X,wBAA1B,CACE,MAAOF,EAAA,EAGT,IAAqB,IAArB,EAAI/a,CAAAub,MAAJ,CAA2B,CACzB,IAAIC,GAAa3V,UAAA,CAAW7F,CAAAub,MAAX,CAEbnY;CAAAic,qBAAJ,EACE9E,CAAA9O,KAAA,CA7XD,CADiDnH,EACjD,CA6XuCkX,EA7XvC,CAAe,GAAf,CA6XC,CAGEpY,EAAAkY,oBAAJ,EACEf,CAAA9O,KAAA,CAjYD,CAD0B9D,EAC1B,CAiYuC6T,EAjYvC,CAAe,GAAf,CAiYC,CARuB,CAeH,IAAxB,EAAIxb,CAAAoE,SAAJ,EAA6D,CAA7D,CAAgCwV,CAAA5R,mBAAhC,GACE5E,CAAA6X,wBADF,CACkC7X,CAAA6X,wBADlC,EACmE8D,EADnE,CAIAtD,EAAA,CAxaWC,GAwaX,CAAe3B,CACf4B,EAAA,CAzaWD,GAyaX,CAAkB1B,CACbha,EAAAgf,aAAL,GACE5b,CAAAyX,gBACA,CADqD,CACrD,CADwBjB,CAAA5R,mBACxB,CAAA5E,CAAA0X,uBAAA,CAA2D,CAA3D,CAA+BlB,CAAAxR,kBAA/B,EACwD,CADxD,CAC+BmR,CAAAlR,eAD/B,EAE6D,CAF7D,GAE+BkR,CAAAnR,kBAJjC,CAOIpI,EAAAG,KAAJ,GACMH,CAAA+c,cAGJ,EAFElW,EAAA,CAAyB2T,CAAzB,CAAwCrW,CAAxC,CAA8Ca,MAAAgM,KAAA,CAAYhR,CAAAG,KAAZ,CAA9C,CAEF,CAAAgC,EAAA,CAAyBnB,CAAzB,CAAkChB,CAAlC,CAJF,CAOIoD,EAAAyX,gBAAJ,EAA6BzX,CAAA0X,uBAA7B,CACEF,CAAA,CAAcZ,CAAd,CADF,CAEYha,CAAAgf,aAFZ,EAGE9a,EAAA,CAAiBC,CAAjB,CAAuB,CAAA,CAAvB,CAIF,OAAO,CACL6W,cAAe,CAAA,CADV;AAELxO,IAAK0N,CAFA,CAGLvB,MAAOA,QAAQ,EAAG,CAChB,GAAIwB,CAAAA,EAAJ,CAiBA,MAfA4D,EAeO1S,CAfM,CACXmB,IAAK0N,CADM,CAEXxN,OAAQ9C,CAFG,CAGX2C,OAAQ,IAHG,CAIXD,MAAO,IAJI,CAeNjB,CARPA,CAQOA,CARE,IAAIqD,CAAJ,CAAoBqP,CAApB,CAQF1S,CANPxB,CAAA,CAAe8O,CAAf,CAMOtN,CAAAA,CAlBS,CAHb,CAzN8B,CA5F4B,CAHzD,CAJ4D,CAAhDwN,CAujG1B,CAAA3L,SAAA,CAWY,oBAXZ,CAt8EiCoS,CAAC,qBAADA,CAAwB,QAAQ,CAACC,CAAD,CAAsB,CACrFA,CAAA7K,QAAAjJ,KAAA,CAAiC,oBAAjC,CAYA,KAAA2C,KAAA,CAAY,CAAC,aAAD,CAAgB,YAAhB,CAA8B,iBAA9B,CAAiD,cAAjD,CAAiE,UAAjE,CAA6E,UAA7E,CAAyF,WAAzF,CACP,QAAQ,CAACoR,CAAD,CAAgBnR,CAAhB,CAA8BK,CAA9B,CAAiDJ,CAAjD,CAAiEpE,CAAjE,CAA6E3I,CAA7E,CAAyFgN,CAAzF,CAAoG,CA0B/GkR,QAASA,EAAgB,CAACpf,CAAD,CAAU,CAEjC,MAAOA,EAAAqf,QAAA,CAAgB,aAAhB,CAA+B,EAA/B,CAF0B,CAKnCC,QAASA,EAAe,CAAChgB,CAAD,CAAIC,CAAJ,CAAO,CACzBa,CAAA,CAASd,CAAT,CAAJ,GAAiBA,CAAjB,CAAqBA,CAAAgB,MAAA,CAAQ,GAAR,CAArB,CACIF,EAAA,CAASb,CAAT,CAAJ,GAAiBA,CAAjB,CAAqBA,CAAAe,MAAA,CAAQ,GAAR,CAArB,CACA,OAAOhB,EAAAoU,OAAA,CAAS,QAAQ,CAACtQ,CAAD,CAAM,CAC5B,MAA2B,EAA3B,GAAO7D,CAAAsQ,QAAA,CAAUzM,CAAV,CADqB,CAAvB,CAAA3D,KAAA,CAEC,GAFD,CAHsB,CA/BgF;AAuC/G8f,QAASA,EAAwB,CAACvf,CAAD,CAAUwf,CAAV,CAAqBC,CAArB,CAA+B,CAiE9DC,QAASA,EAAqB,CAACtJ,CAAD,CAAS,CACrC,IAAIxW,EAAS,EAAb,CAEI+f,EAASpc,CAAA,CAAW6S,CAAX,CAAAwJ,sBAAA,EAIbrf,EAAA,CAAQ,CAAC,OAAD,CAAS,QAAT,CAAkB,KAAlB,CAAwB,MAAxB,CAAR,CAAyC,QAAQ,CAAC0C,CAAD,CAAM,CACrD,IAAID,EAAQ2c,CAAA,CAAO1c,CAAP,CACZ,QAAQA,CAAR,EACE,KAAK,KAAL,CACED,CAAA,EAAS6c,CAAAC,UACT,MACF,MAAK,MAAL,CACE9c,CAAA,EAAS6c,CAAAE,WALb,CAQAngB,CAAA,CAAOqD,CAAP,CAAA,CAAcwC,IAAAgY,MAAA,CAAWza,CAAX,CAAd,CAAkC,IAVmB,CAAvD,CAYA,OAAOpD,EAnB8B,CAsCvCogB,QAASA,EAAkB,EAAG,CAC5B,IAAIC,EAAgBb,CAAA,CAA6BK,CAJ1Cld,KAAA,CAAa,OAAb,CAIa,EAJY,EAIZ,CAApB,CACIH,EAAQkd,CAAA,CAAgBW,CAAhB,CAA+BC,CAA/B,CADZ,CAEI7d,EAAWid,CAAA,CAAgBY,CAAhB,CAAiCD,CAAjC,CAFf,CAIIE,EAAWhB,CAAA,CAAYiB,CAAZ,CAAmB,CAChCvgB,GAAI6f,CAAA,CAAsBD,CAAtB,CAD4B,CAEhCte,SAAU,eAAVA,CAA0CiB,CAFV,CAGhCf,YAAa,gBAAbA,CAA8CgB,CAHd,CAIhC6Y,MAAO,CAAA,CAJyB,CAAnB,CASf,OAAOiF,EAAAxF,cAAA,CAAyBwF,CAAzB,CAAoC,IAdf,CAiB9BhU,QAASA,EAAG,EAAG,CACbiU,CAAA5O,OAAA,EACAgO,EAAAne,YAAA,CA5K2Bgf,iBA4K3B,CACAZ,EAAApe,YAAA,CA7K2Bgf,iBA6K3B,CAHa,CAvHf,IAAID;AAAQxf,CAAA,CAAO2C,CAAA,CAAWic,CAAX,CAAAc,UAAA,CAAgC,CAAA,CAAhC,CAAP,CAAZ,CACIJ,EAAkBd,CAAA,CAA6BgB,CAkG1C7d,KAAA,CAAa,OAAb,CAlGa,EAkGY,EAlGZ,CAEtBid,EAAAre,SAAA,CAtD6Bkf,iBAsD7B,CACAZ,EAAAte,SAAA,CAvD6Bkf,iBAuD7B,CAEAD,EAAAjf,SAAA,CAxD+Bof,WAwD/B,CAEAC,EAAAC,OAAA,CAAuBL,CAAvB,CAT8D,KAW1DM,CAAYC,EAAAA,CA4EhBC,QAA4B,EAAG,CAC7B,IAAIT,EAAWhB,CAAA,CAAYiB,CAAZ,CAAmB,CAChCjf,SAxIuB0f,eAuIS,CAEhC3F,MAAO,CAAA,CAFyB,CAGhCpb,KAAM4f,CAAA,CAAsBF,CAAtB,CAH0B,CAAnB,CAQf,OAAOW,EAAAxF,cAAA,CAAyBwF,CAAzB,CAAoC,IATd,CA5ED,EAM9B,IAAKQ,CAAAA,CAAL,GACED,CACKA,CADQV,CAAA,EACRU,CAAAA,CAAAA,CAFP,EAGI,MAAOvU,EAAA,EAIX,KAAI2U,EAAmBH,CAAnBG,EAAkCJ,CAEtC,OAAO,CACLpI,MAAOA,QAAQ,EAAG,CA8BhBuB,QAASA,EAAK,EAAG,CACX3M,CAAJ,EACEA,CAAAf,IAAA,EAFa,CA7BjB,IAAInB,CAAJ,CAEIkC,EAAmB4T,CAAAxI,MAAA,EACvBpL,EAAAjC,KAAA,CAAsB,QAAQ,EAAG,CAC/BiC,CAAA,CAAmB,IACnB,IAAKwT,CAAAA,CAAL,GACEA,CADF,CACeV,CAAA,EADf,EASI,MANA9S,EAMOA,CANYwT,CAAApI,MAAA,EAMZpL,CALPA,CAAAjC,KAAA,CAAsB,QAAQ,EAAG,CAC/BiC,CAAA,CAAmB,IACnBf,EAAA,EACAnB,EAAAsB,SAAA,EAH+B,CAAjC,CAKOY,CAAAA,CAIXf,EAAA,EACAnB,EAAAsB,SAAA,EAhB+B,CAAjC,CAwBA,OALAtB,EAKA,CALS,IAAIqD,CAAJ,CAAoB,CAC3BlC,IAAK0N,CADsB;AAE3BxN,OAAQwN,CAFmB,CAApB,CAvBO,CADb,CA1BuD,CA+HhEkH,QAASA,EAA4B,CAACjhB,CAAD,CAAOD,CAAP,CAAWG,CAAX,CAAoB6V,CAApB,CAA6B,CAChE,IAAIY,EAAgBuK,CAAA,CAAwBlhB,CAAxB,CAA8B4B,CAA9B,CAApB,CACIgV,EAAcsK,CAAA,CAAwBnhB,CAAxB,CAA4B6B,CAA5B,CADlB,CAGIuf,EAAmB,EACvB1gB,EAAA,CAAQsV,CAAR,CAAiB,QAAQ,CAACO,CAAD,CAAS,CAIhC,CADI+J,CACJ,CADeZ,CAAA,CAAyBvf,CAAzB,CAFEoW,CAAA8K,IAEF,CADC9K,CAAA+K,CAAO,IAAPA,CACD,CACf,GACEF,CAAA7V,KAAA,CAAsB+U,CAAtB,CAL8B,CAAlC,CAUA,IAAK1J,CAAL,EAAuBC,CAAvB,EAAkE,CAAlE,GAAsCuK,CAAA5gB,OAAtC,CAEA,MAAO,CACLiY,MAAOA,QAAQ,EAAG,CA0BhBuB,QAASA,EAAK,EAAG,CACftZ,CAAA,CAAQ6gB,CAAR,CAA0B,QAAQ,CAACpW,CAAD,CAAS,CACzCA,CAAAmB,IAAA,EADyC,CAA3C,CADe,CAzBjB,IAAIiV,EAAmB,EAEnB3K,EAAJ,EACE2K,CAAAhW,KAAA,CAAsBqL,CAAA6B,MAAA,EAAtB,CAGE5B,EAAJ,EACE0K,CAAAhW,KAAA,CAAsBsL,CAAA4B,MAAA,EAAtB,CAGF/X,EAAA,CAAQ0gB,CAAR,CAA0B,QAAQ,CAAChM,CAAD,CAAY,CAC5CmM,CAAAhW,KAAA,CAAsB6J,CAAAqD,MAAA,EAAtB,CAD4C,CAA9C,CAIA,KAAItN,EAAS,IAAIqD,CAAJ,CAAoB,CAC/BlC,IAAK0N,CAD0B,CAE/BxN,OAAQwN,CAFuB,CAApB,CAKbxL,EAAA1D,IAAA,CAAoByW,CAApB,CAAsC,QAAQ,CAACrW,CAAD,CAAS,CACrDC,CAAAsB,SAAA,CAAgBvB,CAAhB,CADqD,CAAvD,CAIA,OAAOC,EAxBS,CADb,CAjByD,CAqDlEgW,QAASA,EAAuB,CAACjQ,CAAD,CAAmB,CACjD,IAAIpQ,EAAUoQ,CAAApQ,QAAd,CACIhB,EAAUoR,CAAApR,QAAVA,EAAsC,EAEtCoR,EAAArD,WAAJ,GACE/N,CAAA8D,MAOA,CAPgBsN,CAAAtN,MAOhB,CANA9D,CAAA+N,WAMA,CANqB,CAAA,CAMrB,CALA/N,CAAAse,kBAKA,CAL4B,CAAA,CAK5B,CAA+B,OAA/B,GAAIlN,CAAAtN,MAAJ,GACE9D,CAAA2a,OADF;AACmB3a,CAAA8B,aADnB,CARF,CAgBI9B,EAAA6C,mBAAJ,GACE7C,CAAA8D,MADF,CACkBhB,CAAA,CAAgB9C,CAAA8D,MAAhB,CAA+B9D,CAAA6C,mBAA/B,CADlB,CAII2d,EAAAA,CAAWhB,CAAA,CAAYxe,CAAZ,CAAqBhB,CAArB,CAMf,OAAOwgB,EAAAxF,cAAA,CAAyBwF,CAAzB,CAAoC,IA9BM,CAxNnD,GAAK1L,CAAA5K,CAAA4K,WAAL,EAA6BoJ,CAAAhU,CAAAgU,YAA7B,CAAmD,MAAOnc,EAE1D,KAAIme,EAAW3R,CAAA,CAAU,CAAV,CAAA6D,KACXsP,EAAAA,CAAW9d,CAAA,CAAW0K,CAAX,CAEf,KAAIuS,EAAkB5f,CAAA,CAIDygB,CAhBd9O,WAgBL,EAhBqD,EAgBrD,GAAmB8O,CAhBK9O,WAAAzR,SAgBxB,EAAgC+e,CAAA3Q,SAAA,CAAkBmS,CAAlB,CAAhC,CAA8DA,CAA9D,CAAyExB,CAJrD,CAOMve,EAAA,CAA6BJ,CAA7B,CAE5B,OAAOogB,SAAqB,CAACvQ,CAAD,CAAmB,CAC7C,MAAOA,EAAAjR,KAAA,EAAyBiR,CAAAlR,GAAzB,CACDkhB,CAAA,CAA6BhQ,CAAAjR,KAA7B,CAC6BiR,CAAAlR,GAD7B,CAE6BkR,CAAA/Q,QAF7B,CAG6B+Q,CAAA8E,QAH7B,CADC,CAKDmL,CAAA,CAAwBjQ,CAAxB,CANuC,CAjBgE,CADrG,CAbyE,CAAtDkO,CAs8EjC,CAAApS,SAAA,CAaY,aAbZ,CAtrE0B0U,CAAC,kBAADA,CAAqB,QAAQ,CAACxU,CAAD,CAAmB,CACxE,IAAAgB,KAAA,CAAY,CAAC,WAAD,CAAc,iBAAd,CAAiC,UAAjC,CACP,QAAQ,CAACuG,CAAD,CAAcjG,CAAd,CAAiCnN,CAAjC,CAA2C,CA8OtDsgB,QAASA,EAAgB,CAACxhB,CAAD,CAAU,CACjCA,CAAA,CAAUR,CAAA,CAAQQ,CAAR,CAAA,CAAmBA,CAAnB,CAA6BA,CAAAM,MAAA,CAAc,GAAd,CAEvC;IAHiC,IAE7ByO,EAAU,EAFmB,CAEf0S,EAAU,EAFK,CAGxBhhB,EAAE,CAAX,CAAcA,CAAd,CAAkBT,CAAAK,OAAlB,CAAkCI,CAAA,EAAlC,CAAuC,CAAA,IACjCD,EAAQR,CAAA,CAAQS,CAAR,CADyB,CAEjCihB,EAAmB3U,CAAA4U,uBAAA,CAAwCnhB,CAAxC,CACnBkhB,EAAJ,EAAyB,CAAAD,CAAA,CAAQjhB,CAAR,CAAzB,GACEuO,CAAA3D,KAAA,CAAakJ,CAAAhO,IAAA,CAAcob,CAAd,CAAb,CACA,CAAAD,CAAA,CAAQjhB,CAAR,CAAA,CAAiB,CAAA,CAFnB,CAHqC,CAQvC,MAAOuO,EAX0B,CA5OnC,IAAIW,EAAwBpO,CAAA,CAA6BJ,CAA7B,CAE5B,OAAO,SAAQ,CAACP,CAAD,CAAU8C,CAAV,CAAiBzD,CAAjB,CAA0BL,CAA1B,CAAmC,CAgDhDiiB,QAASA,EAAY,EAAG,CACtBjiB,CAAA8B,aAAA,EACAiO,EAAA,CAAsB/O,CAAtB,CAA+BhB,CAA/B,CAFsB,CA4DxBkiB,QAASA,EAAkB,CAACnY,CAAD,CAAK/I,CAAL,CAAc8C,CAAd,CAAqB9D,CAArB,CAA8B2a,CAA9B,CAAsC,CAE/D,OAAQ7W,CAAR,EACE,KAAK,SAAL,CACEqe,CAAA,CAAO,CAACnhB,CAAD,CAAUhB,CAAAG,KAAV,CAAwBH,CAAAE,GAAxB,CAAoCya,CAApC,CACP,MAEF,MAAK,UAAL,CACEwH,CAAA,CAAO,CAACnhB,CAAD,CAAUohB,CAAV,CAAwBC,CAAxB,CAAyC1H,CAAzC,CACP,MAEF,MAAK,UAAL,CACEwH,CAAA,CAAO,CAACnhB,CAAD,CAAUohB,CAAV,CAAwBzH,CAAxB,CACP,MAEF,MAAK,aAAL,CACEwH,CAAA,CAAO,CAACnhB,CAAD,CAAUqhB,CAAV,CAA2B1H,CAA3B,CACP,MAEF,SACEwH,CAAA,CAAO,CAACnhB,CAAD,CAAU2Z,CAAV,CAlBX,CAsBAwH,CAAA1W,KAAA,CAAUzL,CAAV,CAGA,IADIqD,CACJ,CADY0G,CAAAuY,MAAA,CAASvY,CAAT,CAAaoY,CAAb,CACZ,CAKE,GAJIhb,EAAA,CAAW9D,CAAAsV,MAAX,CAIA,GAHFtV,CAGE,CAHMA,CAAAsV,MAAA,EAGN,EAAAtV,CAAA,WAAiBqL,EAArB,CACErL,CAAAiI,KAAA,CAAWqP,CAAX,CADF,KAEO,IAAIxT,EAAA,CAAW9D,CAAX,CAAJ,CAEL,MAAOA,EAIX,OAAOtB,EAxCwD,CA5GjB;AAuJhDwgB,QAASA,EAAsB,CAACvhB,CAAD,CAAU8C,CAAV,CAAiB9D,CAAjB,CAA0B8U,CAA1B,CAAsC0N,CAAtC,CAA8C,CAC3E,IAAI3L,EAAa,EACjBjW,EAAA,CAAQkU,CAAR,CAAoB,QAAQ,CAAC2N,CAAD,CAAM,CAChC,IAAInN,EAAYmN,CAAA,CAAID,CAAJ,CACXlN,EAAL,EAGAuB,CAAApL,KAAA,CAAgB,QAAQ,EAAG,CACzB,IAAIJ,CAAJ,CACIqX,CADJ,CAGIC,EAAW,CAAA,CAHf,CAIIC,EAAsBA,QAAQ,CAAC7K,CAAD,CAAW,CACtC4K,CAAL,GACEA,CAEA,CAFW,CAAA,CAEX,CADA,CAACD,CAAD,EAAkB3gB,CAAlB,EAAwBgW,CAAxB,CACA,CAAA1M,CAAAsB,SAAA,CAAgB,CAACoL,CAAjB,CAHF,CAD2C,CAQ7C1M,EAAA,CAAS,IAAIqD,CAAJ,CAAoB,CAC3BlC,IAAKA,QAAQ,EAAG,CACdoW,CAAA,EADc,CADW,CAI3BlW,OAAQA,QAAQ,EAAG,CACjBkW,CAAA,CAAoB,CAAA,CAApB,CADiB,CAJQ,CAApB,CASTF,EAAA,CAAgBR,CAAA,CAAmB5M,CAAnB,CAA8BtU,CAA9B,CAAuC8C,CAAvC,CAA8C9D,CAA9C,CAAuD,QAAQ,CAACwV,CAAD,CAAS,CAEtFoN,CAAA,CAD2B,CAAA,CAC3B,GADgBpN,CAChB,CAFsF,CAAxE,CAKhB,OAAOnK,EA3BkB,CAA3B,CALgC,CAAlC,CAoCA,OAAOwL,EAtCoE,CAyC7EgM,QAASA,EAAiB,CAAC7hB,CAAD,CAAU8C,CAAV,CAAiB9D,CAAjB,CAA0B8U,CAA1B,CAAsC0N,CAAtC,CAA8C,CACtE,IAAI3L,EAAa0L,CAAA,CAAuBvhB,CAAvB,CAAgC8C,CAAhC,CAAuC9D,CAAvC,CAAgD8U,CAAhD,CAA4D0N,CAA5D,CACjB,IAA0B,CAA1B,GAAI3L,CAAAnW,OAAJ,CAA6B,CAAA,IACvBf,CADuB,CACrBC,CACS,iBAAf,GAAI4iB,CAAJ,EACE7iB,CACA,CADI4iB,CAAA,CAAuBvhB,CAAvB,CAAgC,aAAhC,CAA+ChB,CAA/C,CAAwD8U,CAAxD,CAAoE,mBAApE,CACJ,CAAAlV,CAAA,CAAI2iB,CAAA,CAAuBvhB,CAAvB,CAAgC,UAAhC,CAA4ChB,CAA5C,CAAqD8U,CAArD,CAAiE,gBAAjE,CAFN,EAGsB,UAHtB,GAGW0N,CAHX,GAIE7iB,CACA,CADI4iB,CAAA,CAAuBvhB,CAAvB,CAAgC,aAAhC,CAA+ChB,CAA/C,CAAwD8U,CAAxD,CAAoE,aAApE,CACJ,CAAAlV,CAAA,CAAI2iB,CAAA,CAAuBvhB,CAAvB,CAAgC,UAAhC;AAA4ChB,CAA5C,CAAqD8U,CAArD,CAAiE,UAAjE,CALN,CAQInV,EAAJ,GACEkX,CADF,CACeA,CAAArN,OAAA,CAAkB7J,CAAlB,CADf,CAGIC,EAAJ,GACEiX,CADF,CACeA,CAAArN,OAAA,CAAkB5J,CAAlB,CADf,CAb2B,CAkB7B,GAA0B,CAA1B,GAAIiX,CAAAnW,OAAJ,CAGA,MAAOoiB,SAAuB,CAAClY,CAAD,CAAW,CACvC,IAAIM,EAAU,EACV2L,EAAAnW,OAAJ,EACEE,CAAA,CAAQiW,CAAR,CAAoB,QAAQ,CAACkM,CAAD,CAAY,CACtC7X,CAAAO,KAAA,CAAasX,CAAA,EAAb,CADsC,CAAxC,CAKF7X,EAAAxK,OAAA,CAAiBgO,CAAA1D,IAAA,CAAoBE,CAApB,CAA6BN,CAA7B,CAAjB,CAA0DA,CAAA,EAE1D,OAAOsP,SAAc,CAACnO,CAAD,CAAS,CAC5BnL,CAAA,CAAQsK,CAAR,CAAiB,QAAQ,CAACG,CAAD,CAAS,CAChCU,CAAA,CAASV,CAAAqB,OAAA,EAAT,CAA2BrB,CAAAmB,IAAA,EADK,CAAlC,CAD4B,CAVS,CAvB6B,CA5L/C,CAAzB,GAAIwH,SAAAtT,OAAJ,EAA8BuG,EAAA,CAAS5G,CAAT,CAA9B,GACEL,CACA,CADUK,CACV,CAAAA,CAAA,CAAU,IAFZ,CAKAL,EAAA,CAAU4B,EAAA,CAAwB5B,CAAxB,CACLK,EAAL,GACEA,CAIA,CAJUW,CAAA4B,KAAA,CAAa,OAAb,CAIV,EAJmC,EAInC,CAHI5C,CAAAwB,SAGJ,GAFEnB,CAEF,EAFa,GAEb,CAFmBL,CAAAwB,SAEnB,EAAIxB,CAAA0B,YAAJ,GACErB,CADF,EACa,GADb,CACmBL,CAAA0B,YADnB,CALF,CAUA,KAAI0gB,EAAepiB,CAAAwB,SAAnB,CACI6gB,EAAkBriB,CAAA0B,YADtB,CAOIoT,EAAa+M,CAAA,CAAiBxhB,CAAjB,CAPjB,CAQI2iB,CARJ,CAQYC,CACZ,IAAInO,CAAApU,OAAJ,CAAuB,CAAA,IACjBwiB,CADiB,CACRC,CACA,QAAb,EAAIrf,CAAJ,EACEqf,CACA,CADW,OACX,CAAAD,CAAA,CAAU,YAFZ,GAIEC,CACA,CADW,QACX,CADsBrf,CAAAyB,OAAA,CAAa,CAAb,CAAA6d,YAAA,EACtB;AADsDtf,CAAAuf,OAAA,CAAa,CAAb,CACtD,CAAAH,CAAA,CAAUpf,CALZ,CAQc,QAAd,GAAIA,CAAJ,EAAmC,MAAnC,GAAyBA,CAAzB,GACEkf,CADF,CACWH,CAAA,CAAkB7hB,CAAlB,CAA2B8C,CAA3B,CAAkC9D,CAAlC,CAA2C8U,CAA3C,CAAuDqO,CAAvD,CADX,CAGAF,EAAA,CAASJ,CAAA,CAAkB7hB,CAAlB,CAA2B8C,CAA3B,CAAkC9D,CAAlC,CAA2C8U,CAA3C,CAAuDoO,CAAvD,CAbY,CAiBvB,GAAKF,CAAL,EAAgBC,CAAhB,CAOA,MAAO,CACLtK,MAAOA,QAAQ,EAAG,CAsChB2K,QAASA,EAAU,CAACC,CAAD,CAAU,CAC3BpJ,CAAA,CAAkB,CAAA,CAClB8H,EAAA,EACA/f,GAAA,CAAqBlB,CAArB,CAA8BhB,CAA9B,CACAqL,EAAAsB,SAAA,CAAgB4W,CAAhB,CAJ2B,CArC7B,IAAIC,CAAJ,CACI9Y,EAAQ,EAERsY,EAAJ,EACEtY,CAAAe,KAAA,CAAW,QAAQ,CAAC1B,CAAD,CAAK,CACtByZ,CAAA,CAAwBR,CAAA,CAAOjZ,CAAP,CADF,CAAxB,CAKEW,EAAAhK,OAAJ,CACEgK,CAAAe,KAAA,CAAW,QAAQ,CAAC1B,CAAD,CAAK,CACtBkY,CAAA,EACAlY,EAAA,CAAG,CAAA,CAAH,CAFsB,CAAxB,CADF,CAMEkY,CAAA,EAGEgB,EAAJ,EACEvY,CAAAe,KAAA,CAAW,QAAQ,CAAC1B,CAAD,CAAK,CACtByZ,CAAA,CAAwBP,CAAA,CAAMlZ,CAAN,CADF,CAAxB,CAKF,KAAIoQ,EAAkB,CAAA,CAAtB,CACI9O,EAAS,IAAIqD,CAAJ,CAAoB,CAC/BlC,IAAKA,QAAQ,EAAG,CAmBX2N,CAAL,GACE,CAACqJ,CAAD,EAA0BzhB,CAA1B,EAnBA0hB,IAAA,EAmBA,CACA,CAAAH,CAAA,CApBAG,IAAA,EAoBA,CAFF,CAnBgB,CADe,CAI/B/W,OAAQA,QAAQ,EAAG,CAgBdyN,CAAL,GACE,CAACqJ,CAAD,EAA0BzhB,CAA1B,EAhBc0hB,CAAAA,CAgBd,CACA,CAAAH,CAAA,CAjBcG,CAAAA,CAiBd,CAFF,CAhBmB,CAJY,CAApB,CASb/U,EAAAhE,MAAA,CAAsBA,CAAtB,CAA6B4Y,CAA7B,CACA,OAAOjY,EApCS,CADb,CArDyC,CAJI,CAD5C,CAD4D,CAAhDuW,CAsrE1B,CAAA1U,SAAA,CAcY,mBAdZ,CAt7DgCwW,CAAC,qBAADA,CAAwB,QAAQ,CAACnE,CAAD,CAAsB,CACpFA,CAAA7K,QAAAjJ,KAAA,CAAiC,mBAAjC,CACA;IAAA2C,KAAA,CAAY,CAAC,aAAD,CAAgB,iBAAhB,CAAmC,QAAQ,CAACuV,CAAD,CAAcjV,CAAd,CAA+B,CA+CpFkV,QAASA,EAAgB,CAACxS,CAAD,CAAmB,CAM1C,MAAOuS,EAAA,CAJOvS,CAAApQ,QAIP,CAHKoQ,CAAAtN,MAGL,CADOsN,CAAA/Q,QACP,CAFO+Q,CAAApR,QAEP,CANmC,CA9C5C,MAAO2hB,SAAqB,CAACvQ,CAAD,CAAmB,CAC7C,GAAIA,CAAAjR,KAAJ,EAA6BiR,CAAAlR,GAA7B,CAAkD,CAChD,IAAI4W,EAAgB8M,CAAA,CAAiBxS,CAAAjR,KAAjB,CAApB,CACI4W,EAAc6M,CAAA,CAAiBxS,CAAAlR,GAAjB,CAClB,IAAK4W,CAAL,EAAuBC,CAAvB,CAEA,MAAO,CACL4B,MAAOA,QAAQ,EAAG,CAoBhBkL,QAASA,EAAY,EAAG,CACtB,MAAO,SAAQ,EAAG,CAChBjjB,CAAA,CAAQ6gB,CAAR,CAA0B,QAAQ,CAACpW,CAAD,CAAS,CAEzCA,CAAAmB,IAAA,EAFyC,CAA3C,CADgB,CADI,CAnBxB,IAAIiV,EAAmB,EAEnB3K,EAAJ,EACE2K,CAAAhW,KAAA,CAAsBqL,CAAA6B,MAAA,EAAtB,CAGE5B,EAAJ,EACE0K,CAAAhW,KAAA,CAAsBsL,CAAA4B,MAAA,EAAtB,CAGFjK,EAAA1D,IAAA,CAAoByW,CAApB,CAkBAnW,QAAa,CAACF,CAAD,CAAS,CACpBC,CAAAsB,SAAA,CAAgBvB,CAAhB,CADoB,CAlBtB,CAEA,KAAIC,EAAS,IAAIqD,CAAJ,CAAoB,CAC/BlC,IAAKqX,CAAA,EAD0B,CAE/BnX,OAAQmX,CAAA,EAFuB,CAApB,CAKb,OAAOxY,EAlBS,CADb,CALyC,CAAlD,IAyCE,OAAOuY,EAAA,CAAiBxS,CAAjB,CA1CoC,CADqC,CAA1E,CAFwE,CAAtDsS,CAs7DhC,CAn0HsC,CAArC,CAAD,CAo1HGxkB,MAp1HH,CAo1HWA,MAAAC,QAp1HX;",
-"sources":["angular-animate.js"],
-"names":["window","angular","undefined","assertArg","arg","name","reason","ngMinErr","mergeClasses","a","b","isArray","join","packageStyles","options","styles","to","from","pendClasses","classes","fix","isPrefix","className","isString","length","split","forEach","klass","i","stripCommentsFromElement","element","jqLite","ELEMENT_NODE","nodeType","extractElementNode","elm","$$addClass","$$jqLite","addClass","$$removeClass","removeClass","applyAnimationClassesFactory","prepareAnimationOptions","$$prepared","domOperation","noop","options.domOperation","$$domOperationFired","applyAnimationStyles","applyAnimationFromStyles","applyAnimationToStyles","css","mergeAnimationOptions","target","newOptions","toAdd","toRemove","resolveElementClasses","attr","preparationClasses","concatWithSpace","realDomOperation","extend","existing","splitClassesToLookup","obj","flags","value","key","ADD_CLASS","REMOVE_CLASS","val","prop","allow","getDomNode","applyGeneratedPreparationClasses","event","EVENT_CLASS_PREFIX","ADD_CLASS_SUFFIX","REMOVE_CLASS_SUFFIX","blockTransitions","node","duration","applyInlineStyle","TRANSITION_DELAY_PROP","blockKeyframeAnimations","applyBlock","ANIMATION_PROP","ANIMATION_PLAYSTATE_KEY","styleTuple","style","computeCssStyles","$window","properties","Object","create","detectedStyles","getComputedStyle","formalStyleName","actualStyleName","c","charAt","parseMaxTime","str","maxValue","values","substring","parseFloat","Math","max","truthyTimingValue","getCssTransitionDurationStyle","applyOnlyDuration","TRANSITION_PROP","DURATION_KEY","createLocalCacheLookup","cache","flush","count","entry","total","get","put","registerRestorableStyles","backup","isDefined","getPropertyValue","isObject","isUndefined","isFunction","isElement","TRANSITIONEND_EVENT","ANIMATIONEND_EVENT","ontransitionend","onwebkittransitionend","onanimationend","onwebkitanimationend","ANIMATION_DELAY_PROP","DELAY_KEY","ANIMATION_DURATION_PROP","TRANSITION_DURATION_PROP","DETECT_CSS_PROPERTIES","transitionDuration","transitionDelay","transitionProperty","PROPERTY_KEY","animationDuration","animationDelay","animationIterationCount","ANIMATION_ITERATION_COUNT_KEY","DETECT_STAGGER_CSS_PROPERTIES","module","directive","$$AnimateChildrenDirective","scope","attrs","ngAnimateChildren","data","NG_ANIMATE_CHILDREN_DATA","$observe","factory","$$rAFSchedulerFactory","$$rAF","scheduler","tasks","queue","concat","nextTick","items","shift","cancelFn","waitUntilQuiet","scheduler.waitUntilQuiet","fn","$$AnimateRunnerFactory","$q","$sniffer","$$animateAsyncRun","AnimateRunner","host","setHost","_doneCallbacks","_runInAnimationFrame","_state","chain","AnimateRunner.chain","callback","next","index","response","all","AnimateRunner.all","runners","onProgress","status","runner","done","prototype","DONE_COMPLETE_STATE","push","progress","getPromise","promise","self","resolve","reject","then","resolveHandler","rejectHandler","catch","handler","finally","pause","resume","end","_resolve","cancel","complete","INITIAL_STATE","DONE_PENDING_STATE","$$AnimateAsyncRunFactory","waitForTick","waitQueue","passed","provider","$$AnimateQueueProvider","$animateProvider","isAllowed","ruleType","currentAnimation","previousAnimation","rules","some","hasAnimationClasses","and","skip","newAnimation","structural","RUNNING_STATE","state","nO","cO","$get","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$forceReflow","postDigestTaskFactory","postDigestCalled","$$postDigest","findCallbacks","parent","targetNode","targetParentNode","matches","entries","callbackRegistry","contains","queueAnimation","notifyProgress","phase","runInNextPostDigestOrNow","callbacks","close","activeClasses","applyAnimationClasses","isAnimatableClassName","isStructural","indexOf","skipAnimations","animationsEnabled","disabledElementsLookup","existingAnimation","activeAnimationsLookup","hasExistingAnimation","PRE_DIGEST_STATE","areAnimationsAllowed","closeChildAnimations","skipAnimationFlag","cancelAnimationFlag","joinAnimationFlag","isValidAnimation","keys","clearElementAnimationState","counter","markElementAnimationState","animationDetails","animationCancelled","realRunner","children","querySelectorAll","child","parseInt","getAttribute","NG_ANIMATE_ATTR_NAME","remove","removeAttribute","isMatchingElement","nodeOrElmA","nodeOrElmB","parentElement","bodyElement","body","bodyElementDetected","nodeName","rootElementDetected","parentAnimationDetected","animateChildren","parentHost","NG_ANIMATE_PIN_DATA","parentNode","details","setAttribute","newValue","oldValue","deregisterWatch","$watch","totalPendingRequests","isEmpty","classNameFilter","test","on","container","off","filterFromRegistry","list","matchContainer","matchCallback","containerNode","filter","arguments","pin","enabled","bool","argCount","hasElement","recordExists","$$AnimationProvider","getRunner","RUNNER_STORAGE_KEY","drivers","$injector","$$rAFScheduler","sortAnimations","animations","processNode","processed","elementNode","domNode","lookup","parentEntry","tree","animation","flatten","result","remainingLevelEntries","nextLevelEntries","row","childEntry","animationQueue","getAnchorNodes","hasAttribute","NG_ANIMATE_REF_ATTR","SELECTOR","anchors","groupAnimations","preparedAnimations","refLookup","enterOrMove","anchorNodes","direction","anchor","animationID","usedIndicesLookup","anchorGroups","operations","fromAnimation","toAnimation","lookupKey","toString","group","beforeStart","cssClassesIntersection","indexKey","aa","j","invokeFirstDriver","driverName","has","driver","updateAnimationRunners","newRunner","handleDestroyedElement","rejected","removeData","tempClasses","NG_ANIMATE_CLASSNAME","groupedAnimations","toBeSortedAnimations","animationEntry","triggerAnimationStart","startAnimationFn","closeFn","targetElement","operation","start","animationRunner","$AnimateCssProvider","gcsLookup","gcsStaggerLookup","$timeout","$animate","gcsHashFn","extraClasses","parentCounter","computeCachedCssStaggerStyles","cacheKey","stagger","staggerClassName","rafWaitQueue","pageWidth","computeTimings","timings","aD","tD","maxDelay","maxDuration","init","endFn","animationClosed","animationCompleted","animationPaused","$$skipPreparationClasses","temporaryStyles","restoreStyles","setProperty","removeProperty","onDone","applyBlocking","blockTransition","blockKeyframeAnimation","closeAndReturnNoopAnimator","$$willAnimate","recalculateTimingStyles","fullClassName","relativeDelay","hasTransitions","hasAnimations","applyAnimationDelay","delay","delayStyle","maxDelayTime","ONE_SECOND","maxDurationTime","easing","easeProp","easeVal","TIMING_KEY","events","startTime","Date","now","timerTime","CLOSING_TIME_BUFFER","endTime","animationsData","ANIMATE_TIMER_KEY","setupFallbackTimer","currentTimerData","expectedEndTime","timer","onAnimationExpired","onAnimationProgress","cleanupStyles","stopPropagation","ev","originalEvent","timeStamp","$manualTimeStamp","elapsedTime","toFixed","ELAPSED_TIME_MAX_DECIMAL_PLACES","playPause","playAnimation","arr","splice","maxStagger","itemIndex","floor","runnerHost","runnerHost.resume","runnerHost.pause","transitions","method","structuralClassName","addRemoveClassName","applyClassesEarly","trim","ACTIVE_CLASS_SUFFIX","hasToStyles","keyframeStyle","staggerVal","transitionStyle","durationStyle","staggerIndex","isFirst","skipBlocking","SAFE_FAST_FORWARD_DURATION_VALUE","hasTransitionAll","applyTransitionDuration","applyAnimationDuration","applyTransitionDelay","$$AnimateCssDriverProvider","$$animationProvider","$animateCss","filterCssClasses","replace","getUniqueValues","prepareAnchoredAnimation","outAnchor","inAnchor","calculateAnchorStyles","coords","getBoundingClientRect","bodyNode","scrollTop","scrollLeft","prepareInAnimation","endingClasses","startingClasses","animator","clone","NG_ANIMATE_SHIM_CLASS_NAME","cloneNode","NG_ANIMATE_ANCHOR_CLASS_NAME","rootBodyElement","append","animatorIn","animatorOut","prepareOutAnimation","NG_OUT_ANCHOR_CLASS_NAME","startingAnimator","prepareFromToAnchorAnimation","prepareRegularAnimation","anchorAnimations","outElement","inElement","animationRunners","rootNode","initDriverFn","$$AnimateJsProvider","lookupAnimations","flagMap","animationFactory","$$registeredAnimations","applyOptions","executeAnimationFn","args","classesToAdd","classesToRemove","apply","groupEventedAnimations","fnName","ani","endProgressCb","resolved","onAnimationComplete","packageAnimations","startAnimation","animateFn","before","after","afterFn","beforeFn","toUpperCase","substr","onComplete","success","closeActiveAnimations","cancelled","$$AnimateJsDriverProvider","$$animateJs","prepareAnimation","endFnFactory"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.js
deleted file mode 100644
index 8a8e73b2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.js
+++ /dev/null
@@ -1,398 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngAria
- * @description
- *
- * The `ngAria` module provides support for common
- * [<abbr title="Accessible Rich Internet Applications">ARIA</abbr>](http://www.w3.org/TR/wai-aria/)
- * attributes that convey state or semantic information about the application for users
- * of assistive technologies, such as screen readers.
- *
- * <div doc-module-components="ngAria"></div>
- *
- * ## Usage
- *
- * For ngAria to do its magic, simply include the module `ngAria` as a dependency. The following
- * directives are supported:
- * `ngModel`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`, `ngDblClick`, and `ngMessages`.
- *
- * Below is a more detailed breakdown of the attributes handled by ngAria:
- *
- * | Directive | Supported Attributes |
- * |---------------------------------------------|----------------------------------------------------------------------------------------|
- * | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
- * | {@link ng.directive:ngShow ngShow} | aria-hidden |
- * | {@link ng.directive:ngHide ngHide} | aria-hidden |
- * | {@link ng.directive:ngDblclick ngDblclick} | tabindex |
- * | {@link module:ngMessages ngMessages} | aria-live |
- * | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
- * | {@link ng.directive:ngClick ngClick} | tabindex, keypress event, button role |
- *
- * Find out more information about each directive by reading the
- * {@link guide/accessibility ngAria Developer Guide}.
- *
- * ##Example
- * Using ngDisabled with ngAria:
- * ```html
- * <md-checkbox ng-disabled="disabled">
- * ```
- * Becomes:
- * ```html
- * <md-checkbox ng-disabled="disabled" aria-disabled="true">
- * ```
- *
- * ##Disabling Attributes
- * It's possible to disable individual attributes added by ngAria with the
- * {@link ngAria.$ariaProvider#config config} method. For more details, see the
- * {@link guide/accessibility Developer Guide}.
- */
- /* global -ngAriaModule */
-var ngAriaModule = angular.module('ngAria', ['ng']).
- provider('$aria', $AriaProvider);
-
-/**
-* Internal Utilities
-*/
-var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA', 'SELECT', 'DETAILS', 'SUMMARY'];
-
-var isNodeOneOf = function(elem, nodeTypeArray) {
- if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
- return true;
- }
-};
-/**
- * @ngdoc provider
- * @name $ariaProvider
- *
- * @description
- *
- * Used for configuring the ARIA attributes injected and managed by ngAria.
- *
- * ```js
- * angular.module('myApp', ['ngAria'], function config($ariaProvider) {
- * $ariaProvider.config({
- * ariaValue: true,
- * tabindex: false
- * });
- * });
- *```
- *
- * ## Dependencies
- * Requires the {@link ngAria} module to be installed.
- *
- */
-function $AriaProvider() {
- var config = {
- ariaHidden: true,
- ariaChecked: true,
- ariaDisabled: true,
- ariaRequired: true,
- ariaInvalid: true,
- ariaMultiline: true,
- ariaValue: true,
- tabindex: true,
- bindKeypress: true,
- bindRoleForClick: true
- };
-
- /**
- * @ngdoc method
- * @name $ariaProvider#config
- *
- * @param {object} config object to enable/disable specific ARIA attributes
- *
- * - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags
- * - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags
- * - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags
- * - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags
- * - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags
- * - **ariaMultiline** – `{boolean}` – Enables/disables aria-multiline tags
- * - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and aria-valuenow tags
- * - **tabindex** – `{boolean}` – Enables/disables tabindex tags
- * - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on `&lt;div&gt;` and
- * `&lt;li&gt;` elements with ng-click
- * - **bindRoleForClick** – `{boolean}` – Adds role=button to non-interactive elements like `div`
- * using ng-click, making them more accessible to users of assistive technologies
- *
- * @description
- * Enables/disables various ARIA attributes
- */
- this.config = function(newConfig) {
- config = angular.extend(config, newConfig);
- };
-
- function watchExpr(attrName, ariaAttr, nodeBlackList, negate) {
- return function(scope, elem, attr) {
- var ariaCamelName = attr.$normalize(ariaAttr);
- if (config[ariaCamelName] && !isNodeOneOf(elem, nodeBlackList) && !attr[ariaCamelName]) {
- scope.$watch(attr[attrName], function(boolVal) {
- // ensure boolean value
- boolVal = negate ? !boolVal : !!boolVal;
- elem.attr(ariaAttr, boolVal);
- });
- }
- };
- }
- /**
- * @ngdoc service
- * @name $aria
- *
- * @description
- * @priority 200
- *
- * The $aria service contains helper methods for applying common
- * [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives.
- *
- * ngAria injects common accessibility attributes that tell assistive technologies when HTML
- * elements are enabled, selected, hidden, and more. To see how this is performed with ngAria,
- * let's review a code snippet from ngAria itself:
- *
- *```js
- * ngAriaModule.directive('ngDisabled', ['$aria', function($aria) {
- * return $aria.$$watchExpr('ngDisabled', 'aria-disabled');
- * }])
- *```
- * Shown above, the ngAria module creates a directive with the same signature as the
- * traditional `ng-disabled` directive. But this ngAria version is dedicated to
- * solely managing accessibility attributes. The internal `$aria` service is used to watch the
- * boolean attribute `ngDisabled`. If it has not been explicitly set by the developer,
- * `aria-disabled` is injected as an attribute with its value synchronized to the value in
- * `ngDisabled`.
- *
- * Because ngAria hooks into the `ng-disabled` directive, developers do not have to do
- * anything to enable this feature. The `aria-disabled` attribute is automatically managed
- * simply as a silent side-effect of using `ng-disabled` with the ngAria module.
- *
- * The full list of directives that interface with ngAria:
- * * **ngModel**
- * * **ngShow**
- * * **ngHide**
- * * **ngClick**
- * * **ngDblclick**
- * * **ngMessages**
- * * **ngDisabled**
- *
- * Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each
- * directive.
- *
- *
- * ## Dependencies
- * Requires the {@link ngAria} module to be installed.
- */
- this.$get = function() {
- return {
- config: function(key) {
- return config[key];
- },
- $$watchExpr: watchExpr
- };
- };
-}
-
-
-ngAriaModule.directive('ngShow', ['$aria', function($aria) {
- return $aria.$$watchExpr('ngShow', 'aria-hidden', [], true);
-}])
-.directive('ngHide', ['$aria', function($aria) {
- return $aria.$$watchExpr('ngHide', 'aria-hidden', [], false);
-}])
-.directive('ngModel', ['$aria', function($aria) {
-
- function shouldAttachAttr(attr, normalizedAttr, elem) {
- return $aria.config(normalizedAttr) && !elem.attr(attr);
- }
-
- function shouldAttachRole(role, elem) {
- return !elem.attr('role') && (elem.attr('type') === role) && (elem[0].nodeName !== 'INPUT');
- }
-
- function getShape(attr, elem) {
- var type = attr.type,
- role = attr.role;
-
- return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' :
- ((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' :
- (type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' :
- (type || role) === 'textbox' || elem[0].nodeName === 'TEXTAREA' ? 'multiline' : '';
- }
-
- return {
- restrict: 'A',
- require: '?ngModel',
- priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value
- compile: function(elem, attr) {
- var shape = getShape(attr, elem);
-
- return {
- pre: function(scope, elem, attr, ngModel) {
- if (shape === 'checkbox' && attr.type !== 'checkbox') {
- //Use the input[checkbox] $isEmpty implementation for elements with checkbox roles
- ngModel.$isEmpty = function(value) {
- return value === false;
- };
- }
- },
- post: function(scope, elem, attr, ngModel) {
- var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem)
- && !isNodeOneOf(elem, nodeBlackList);
-
- function ngAriaWatchModelValue() {
- return ngModel.$modelValue;
- }
-
- function getRadioReaction() {
- if (needsTabIndex) {
- needsTabIndex = false;
- return function ngAriaRadioReaction(newVal) {
- var boolVal = (attr.value == ngModel.$viewValue);
- elem.attr('aria-checked', boolVal);
- elem.attr('tabindex', 0 - !boolVal);
- };
- } else {
- return function ngAriaRadioReaction(newVal) {
- elem.attr('aria-checked', (attr.value == ngModel.$viewValue));
- };
- }
- }
-
- function ngAriaCheckboxReaction() {
- elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue));
- }
-
- switch (shape) {
- case 'radio':
- case 'checkbox':
- if (shouldAttachRole(shape, elem)) {
- elem.attr('role', shape);
- }
- if (shouldAttachAttr('aria-checked', 'ariaChecked', elem)) {
- scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
- getRadioReaction() : ngAriaCheckboxReaction);
- }
- if (needsTabIndex) {
- elem.attr('tabindex', 0);
- }
- break;
- case 'range':
- if (shouldAttachRole(shape, elem)) {
- elem.attr('role', 'slider');
- }
- if ($aria.config('ariaValue')) {
- var needsAriaValuemin = !elem.attr('aria-valuemin') &&
- (attr.hasOwnProperty('min') || attr.hasOwnProperty('ngMin'));
- var needsAriaValuemax = !elem.attr('aria-valuemax') &&
- (attr.hasOwnProperty('max') || attr.hasOwnProperty('ngMax'));
- var needsAriaValuenow = !elem.attr('aria-valuenow');
-
- if (needsAriaValuemin) {
- attr.$observe('min', function ngAriaValueMinReaction(newVal) {
- elem.attr('aria-valuemin', newVal);
- });
- }
- if (needsAriaValuemax) {
- attr.$observe('max', function ngAriaValueMinReaction(newVal) {
- elem.attr('aria-valuemax', newVal);
- });
- }
- if (needsAriaValuenow) {
- scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) {
- elem.attr('aria-valuenow', newVal);
- });
- }
- }
- if (needsTabIndex) {
- elem.attr('tabindex', 0);
- }
- break;
- case 'multiline':
- if (shouldAttachAttr('aria-multiline', 'ariaMultiline', elem)) {
- elem.attr('aria-multiline', true);
- }
- break;
- }
-
- if (ngModel.$validators.required && shouldAttachAttr('aria-required', 'ariaRequired', elem)) {
- scope.$watch(function ngAriaRequiredWatch() {
- return ngModel.$error.required;
- }, function ngAriaRequiredReaction(newVal) {
- elem.attr('aria-required', !!newVal);
- });
- }
-
- if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem)) {
- scope.$watch(function ngAriaInvalidWatch() {
- return ngModel.$invalid;
- }, function ngAriaInvalidReaction(newVal) {
- elem.attr('aria-invalid', !!newVal);
- });
- }
- }
- };
- }
- };
-}])
-.directive('ngDisabled', ['$aria', function($aria) {
- return $aria.$$watchExpr('ngDisabled', 'aria-disabled', []);
-}])
-.directive('ngMessages', function() {
- return {
- restrict: 'A',
- require: '?ngMessages',
- link: function(scope, elem, attr, ngMessages) {
- if (!elem.attr('aria-live')) {
- elem.attr('aria-live', 'assertive');
- }
- }
- };
-})
-.directive('ngClick',['$aria', '$parse', function($aria, $parse) {
- return {
- restrict: 'A',
- compile: function(elem, attr) {
- var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
- return function(scope, elem, attr) {
-
- if (!isNodeOneOf(elem, nodeBlackList)) {
-
- if ($aria.config('bindRoleForClick') && !elem.attr('role')) {
- elem.attr('role', 'button');
- }
-
- if ($aria.config('tabindex') && !elem.attr('tabindex')) {
- elem.attr('tabindex', 0);
- }
-
- if ($aria.config('bindKeypress') && !attr.ngKeypress) {
- elem.on('keypress', function(event) {
- var keyCode = event.which || event.keyCode;
- if (keyCode === 32 || keyCode === 13) {
- scope.$apply(callback);
- }
-
- function callback() {
- fn(scope, { $event: event });
- }
- });
- }
- }
- };
- }
- };
-}])
-.directive('ngDblclick', ['$aria', function($aria) {
- return function(scope, elem, attr) {
- if ($aria.config('tabindex') && !elem.attr('tabindex') && !isNodeOneOf(elem, nodeBlackList)) {
- elem.attr('tabindex', 0);
- }
- };
-}]);
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js
deleted file mode 100644
index 4e6fb7c7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(u,n,v){'use strict';var r="BUTTON A INPUT TEXTAREA SELECT DETAILS SUMMARY".split(" "),p=function(a,c){if(-1!==c.indexOf(a[0].nodeName))return!0};n.module("ngAria",["ng"]).provider("$aria",function(){function a(a,f,l,m){return function(d,e,b){var g=b.$normalize(f);!c[g]||p(e,l)||b[g]||d.$watch(b[a],function(b){b=m?!b:!!b;e.attr(f,b)})}}var c={ariaHidden:!0,ariaChecked:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaMultiline:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};
-this.config=function(a){c=n.extend(c,a)};this.$get=function(){return{config:function(a){return c[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngModel",["$aria",function(a){function c(c,m,d){return a.config(m)&&!d.attr(c)}function k(a,c){return!c.attr("role")&&c.attr("type")===a&&"INPUT"!==c[0].nodeName}function f(a,c){var d=
-a.type,e=a.role;return"checkbox"===(d||e)||"menuitemcheckbox"===e?"checkbox":"radio"===(d||e)||"menuitemradio"===e?"radio":"range"===d||"progressbar"===e||"slider"===e?"range":"textbox"===(d||e)||"TEXTAREA"===c[0].nodeName?"multiline":""}return{restrict:"A",require:"?ngModel",priority:200,compile:function(l,m){var d=f(m,l);return{pre:function(a,b,c,h){"checkbox"===d&&"checkbox"!==c.type&&(h.$isEmpty=function(b){return!1===b})},post:function(e,b,g,h){function f(){return h.$modelValue}function m(){return q?
-(q=!1,function(a){a=g.value==h.$viewValue;b.attr("aria-checked",a);b.attr("tabindex",0-!a)}):function(a){b.attr("aria-checked",g.value==h.$viewValue)}}function l(){b.attr("aria-checked",!h.$isEmpty(h.$viewValue))}var q=c("tabindex","tabindex",b)&&!p(b,r);switch(d){case "radio":case "checkbox":k(d,b)&&b.attr("role",d);c("aria-checked","ariaChecked",b)&&e.$watch(f,"radio"===d?m():l);q&&b.attr("tabindex",0);break;case "range":k(d,b)&&b.attr("role","slider");if(a.config("ariaValue")){var n=!b.attr("aria-valuemin")&&
-(g.hasOwnProperty("min")||g.hasOwnProperty("ngMin")),s=!b.attr("aria-valuemax")&&(g.hasOwnProperty("max")||g.hasOwnProperty("ngMax")),t=!b.attr("aria-valuenow");n&&g.$observe("min",function(a){b.attr("aria-valuemin",a)});s&&g.$observe("max",function(a){b.attr("aria-valuemax",a)});t&&e.$watch(f,function(a){b.attr("aria-valuenow",a)})}q&&b.attr("tabindex",0);break;case "multiline":c("aria-multiline","ariaMultiline",b)&&b.attr("aria-multiline",!0)}h.$validators.required&&c("aria-required","ariaRequired",
-b)&&e.$watch(function(){return h.$error.required},function(a){b.attr("aria-required",!!a)});c("aria-invalid","ariaInvalid",b)&&e.$watch(function(){return h.$invalid},function(a){b.attr("aria-invalid",!!a)})}}}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled",[])}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,c,k,f){c.attr("aria-live")||c.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",
-function(a,c){return{restrict:"A",compile:function(k,f){var l=c(f.ngClick,null,!0);return function(c,d,e){if(!p(d,r)&&(a.config("bindRoleForClick")&&!d.attr("role")&&d.attr("role","button"),a.config("tabindex")&&!d.attr("tabindex")&&d.attr("tabindex",0),a.config("bindKeypress")&&!e.ngKeypress))d.on("keypress",function(a){function d(){l(c,{$event:a})}var e=a.which||a.keyCode;32!==e&&13!==e||c.$apply(d)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(c,k,f){!a.config("tabindex")||
-k.attr("tabindex")||p(k,r)||k.attr("tabindex",0)}}])})(window,window.angular);
-//# sourceMappingURL=angular-aria.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js.map
deleted file mode 100644
index 13000e15..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-aria.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-aria.min.js",
-"lineCount":13,
-"mappings":"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",
-"sources":["angular-aria.js"],
-"names":["window","angular","undefined","nodeBlackList","isNodeOneOf","elem","nodeTypeArray","indexOf","nodeName","module","provider","ngAriaModule","$AriaProvider","watchExpr","attrName","ariaAttr","negate","scope","attr","ariaCamelName","$normalize","config","$watch","boolVal","ariaHidden","ariaChecked","ariaDisabled","ariaRequired","ariaInvalid","ariaMultiline","ariaValue","tabindex","bindKeypress","bindRoleForClick","this.config","newConfig","extend","$get","this.$get","key","$$watchExpr","directive","$aria","shouldAttachAttr","normalizedAttr","shouldAttachRole","role","getShape","type","restrict","require","priority","compile","shape","pre","ngModel","$isEmpty","ngModel.$isEmpty","value","post","ngAriaWatchModelValue","$modelValue","getRadioReaction","needsTabIndex","ngAriaRadioReaction","newVal","$viewValue","ngAriaCheckboxReaction","needsAriaValuemin","hasOwnProperty","needsAriaValuemax","needsAriaValuenow","$observe","ngAriaValueMinReaction","ngAriaValueNowReaction","$validators","required","ngAriaRequiredWatch","$error","ngAriaRequiredReaction","ngAriaInvalidWatch","$invalid","ngAriaInvalidReaction","link","ngMessages","$parse","fn","ngClick","ngKeypress","on","event","callback","$event","keyCode","which","$apply"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.js
deleted file mode 100644
index 8a04e120..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.js
+++ /dev/null
@@ -1,321 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngCookies
- * @description
- *
- * # ngCookies
- *
- * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
- *
- *
- * <div doc-module-components="ngCookies"></div>
- *
- * See {@link ngCookies.$cookies `$cookies`} for usage.
- */
-
-
-angular.module('ngCookies', ['ng']).
- /**
- * @ngdoc provider
- * @name $cookiesProvider
- * @description
- * Use `$cookiesProvider` to change the default behavior of the {@link ngCookies.$cookies $cookies} service.
- * */
- provider('$cookies', [function $CookiesProvider() {
- /**
- * @ngdoc property
- * @name $cookiesProvider#defaults
- * @description
- *
- * Object containing default options to pass when setting cookies.
- *
- * The object may have following properties:
- *
- * - **path** - `{string}` - The cookie will be available only for this path and its
- * sub-paths. By default, this would be the URL that appears in your base tag.
- * - **domain** - `{string}` - The cookie will be available only for this domain and
- * its sub-domains. For obvious security reasons the user agent will not accept the
- * cookie if the current domain is not a sub domain or equals to the requested domain.
- * - **expires** - `{string|Date}` - String of the form "Wdy, DD Mon YYYY HH:MM:SS GMT"
- * or a Date object indicating the exact date/time this cookie will expire.
- * - **secure** - `{boolean}` - The cookie will be available only in secured connection.
- *
- * Note: by default the address that appears in your `<base>` tag will be used as path.
- * This is important so that cookies will be visible for all routes in case html5mode is enabled
- *
- **/
- var defaults = this.defaults = {};
-
- function calcOptions(options) {
- return options ? angular.extend({}, defaults, options) : defaults;
- }
-
- /**
- * @ngdoc service
- * @name $cookies
- *
- * @description
- * Provides read/write access to browser's cookies.
- *
- * <div class="alert alert-info">
- * Up until Angular 1.3, `$cookies` exposed properties that represented the
- * current browser cookie values. In version 1.4, this behavior has changed, and
- * `$cookies` now provides a standard api of getters, setters etc.
- * </div>
- *
- * Requires the {@link ngCookies `ngCookies`} module to be installed.
- *
- * @example
- *
- * ```js
- * angular.module('cookiesExample', ['ngCookies'])
- * .controller('ExampleController', ['$cookies', function($cookies) {
- * // Retrieving a cookie
- * var favoriteCookie = $cookies.get('myFavorite');
- * // Setting a cookie
- * $cookies.put('myFavorite', 'oatmeal');
- * }]);
- * ```
- */
- this.$get = ['$$cookieReader', '$$cookieWriter', function($$cookieReader, $$cookieWriter) {
- return {
- /**
- * @ngdoc method
- * @name $cookies#get
- *
- * @description
- * Returns the value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {string} Raw cookie value.
- */
- get: function(key) {
- return $$cookieReader()[key];
- },
-
- /**
- * @ngdoc method
- * @name $cookies#getObject
- *
- * @description
- * Returns the deserialized value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {Object} Deserialized cookie value.
- */
- getObject: function(key) {
- var value = this.get(key);
- return value ? angular.fromJson(value) : value;
- },
-
- /**
- * @ngdoc method
- * @name $cookies#getAll
- *
- * @description
- * Returns a key value object with all the cookies
- *
- * @returns {Object} All cookies
- */
- getAll: function() {
- return $$cookieReader();
- },
-
- /**
- * @ngdoc method
- * @name $cookies#put
- *
- * @description
- * Sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {string} value Raw value to be stored.
- * @param {Object=} options Options object.
- * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
- */
- put: function(key, value, options) {
- $$cookieWriter(key, value, calcOptions(options));
- },
-
- /**
- * @ngdoc method
- * @name $cookies#putObject
- *
- * @description
- * Serializes and sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {Object} value Value to be stored.
- * @param {Object=} options Options object.
- * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
- */
- putObject: function(key, value, options) {
- this.put(key, angular.toJson(value), options);
- },
-
- /**
- * @ngdoc method
- * @name $cookies#remove
- *
- * @description
- * Remove given cookie
- *
- * @param {string} key Id of the key-value pair to delete.
- * @param {Object=} options Options object.
- * See {@link ngCookies.$cookiesProvider#defaults $cookiesProvider.defaults}
- */
- remove: function(key, options) {
- $$cookieWriter(key, undefined, calcOptions(options));
- }
- };
- }];
- }]);
-
-angular.module('ngCookies').
-/**
- * @ngdoc service
- * @name $cookieStore
- * @deprecated
- * @requires $cookies
- *
- * @description
- * Provides a key-value (string-object) storage, that is backed by session cookies.
- * Objects put or retrieved from this storage are automatically serialized or
- * deserialized by angular's toJson/fromJson.
- *
- * Requires the {@link ngCookies `ngCookies`} module to be installed.
- *
- * <div class="alert alert-danger">
- * **Note:** The $cookieStore service is **deprecated**.
- * Please use the {@link ngCookies.$cookies `$cookies`} service instead.
- * </div>
- *
- * @example
- *
- * ```js
- * angular.module('cookieStoreExample', ['ngCookies'])
- * .controller('ExampleController', ['$cookieStore', function($cookieStore) {
- * // Put cookie
- * $cookieStore.put('myFavorite','oatmeal');
- * // Get cookie
- * var favoriteCookie = $cookieStore.get('myFavorite');
- * // Removing a cookie
- * $cookieStore.remove('myFavorite');
- * }]);
- * ```
- */
- factory('$cookieStore', ['$cookies', function($cookies) {
-
- return {
- /**
- * @ngdoc method
- * @name $cookieStore#get
- *
- * @description
- * Returns the value of given cookie key
- *
- * @param {string} key Id to use for lookup.
- * @returns {Object} Deserialized cookie value, undefined if the cookie does not exist.
- */
- get: function(key) {
- return $cookies.getObject(key);
- },
-
- /**
- * @ngdoc method
- * @name $cookieStore#put
- *
- * @description
- * Sets a value for given cookie key
- *
- * @param {string} key Id for the `value`.
- * @param {Object} value Value to be stored.
- */
- put: function(key, value) {
- $cookies.putObject(key, value);
- },
-
- /**
- * @ngdoc method
- * @name $cookieStore#remove
- *
- * @description
- * Remove given cookie
- *
- * @param {string} key Id of the key-value pair to delete.
- */
- remove: function(key) {
- $cookies.remove(key);
- }
- };
-
- }]);
-
-/**
- * @name $$cookieWriter
- * @requires $document
- *
- * @description
- * This is a private service for writing cookies
- *
- * @param {string} name Cookie name
- * @param {string=} value Cookie value (if undefined, cookie will be deleted)
- * @param {Object=} options Object with options that need to be stored for the cookie.
- */
-function $$CookieWriter($document, $log, $browser) {
- var cookiePath = $browser.baseHref();
- var rawDocument = $document[0];
-
- function buildCookieString(name, value, options) {
- var path, expires;
- options = options || {};
- expires = options.expires;
- path = angular.isDefined(options.path) ? options.path : cookiePath;
- if (angular.isUndefined(value)) {
- expires = 'Thu, 01 Jan 1970 00:00:00 GMT';
- value = '';
- }
- if (angular.isString(expires)) {
- expires = new Date(expires);
- }
-
- var str = encodeURIComponent(name) + '=' + encodeURIComponent(value);
- str += path ? ';path=' + path : '';
- str += options.domain ? ';domain=' + options.domain : '';
- str += expires ? ';expires=' + expires.toUTCString() : '';
- str += options.secure ? ';secure' : '';
-
- // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:
- // - 300 cookies
- // - 20 cookies per unique domain
- // - 4096 bytes per cookie
- var cookieLength = str.length + 1;
- if (cookieLength > 4096) {
- $log.warn("Cookie '" + name +
- "' possibly not set or overflowed because it was too large (" +
- cookieLength + " > 4096 bytes)!");
- }
-
- return str;
- }
-
- return function(name, value, options) {
- rawDocument.cookie = buildCookieString(name, value, options);
- };
-}
-
-$$CookieWriter.$inject = ['$document', '$log', '$browser'];
-
-angular.module('ngCookies').provider('$$cookieWriter', function $$CookieWriterProvider() {
- this.$get = $$CookieWriter;
-});
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js
deleted file mode 100644
index 6a1bab08..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(p,c,n){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096<f&&a.warn("Cookie '"+b+"' possibly not set or overflowed because it was too large ("+
-f+" > 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,n,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore",
-["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular);
-//# sourceMappingURL=angular-cookies.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js.map
deleted file mode 100644
index d269e1f2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-cookies.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-cookies.min.js",
-"lineCount":8,
-"mappings":"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",
-"sources":["angular-cookies.js"],
-"names":["window","angular","undefined","$$CookieWriter","$document","$log","$browser","cookiePath","baseHref","rawDocument","name","value","options","path","expires","isDefined","isUndefined","isString","Date","str","encodeURIComponent","domain","toUTCString","secure","cookieLength","length","warn","cookie","module","provider","$CookiesProvider","defaults","$get","$$cookieReader","$$cookieWriter","get","key","getObject","fromJson","getAll","put","extend","putObject","toJson","remove","factory","$cookies","$inject","$$CookieWriterProvider"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-csp.css b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-csp.css
deleted file mode 100644
index f3cd926c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-csp.css
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Include this file in your html if you are using the CSP mode. */
-
-@charset "UTF-8";
-
-[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
-.ng-cloak, .x-ng-cloak,
-.ng-hide:not(.ng-hide-animate) {
- display: none !important;
-}
-
-ng\:form {
- display: block;
-}
-
-.ng-animate-shim {
- visibility:hidden;
-}
-
-.ng-anchor {
- position:absolute;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.js
deleted file mode 100644
index 992b129b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.js
+++ /dev/null
@@ -1,443 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-
-(function() {'use strict';
- function isFunction(value) {return typeof value === 'function';};
-
-/**
- * @description
- *
- * This object provides a utility for producing rich Error messages within
- * Angular. It can be called as follows:
- *
- * var exampleMinErr = minErr('example');
- * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
- *
- * The above creates an instance of minErr in the example namespace. The
- * resulting error will have a namespaced error code of example.one. The
- * resulting error will replace {0} with the value of foo, and {1} with the
- * value of bar. The object is not restricted in the number of arguments it can
- * take.
- *
- * If fewer arguments are specified than necessary for interpolation, the extra
- * interpolation markers will be preserved in the final string.
- *
- * Since data will be parsed statically during a build step, some restrictions
- * are applied with respect to how minErr instances are created and called.
- * Instances should have names of the form namespaceMinErr for a minErr created
- * using minErr('namespace') . Error codes, namespaces and template strings
- * should all be static strings, not variables or general expressions.
- *
- * @param {string} module The namespace to use for the new minErr instance.
- * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
- * error from returned function, for cases when a particular type of error is useful.
- * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
- */
-
-function minErr(module, ErrorConstructor) {
- ErrorConstructor = ErrorConstructor || Error;
- return function() {
- var SKIP_INDEXES = 2;
-
- var templateArgs = arguments,
- code = templateArgs[0],
- message = '[' + (module ? module + ':' : '') + code + '] ',
- template = templateArgs[1],
- paramPrefix, i;
-
- message += template.replace(/\{\d+\}/g, function(match) {
- var index = +match.slice(1, -1),
- shiftedIndex = index + SKIP_INDEXES;
-
- if (shiftedIndex < templateArgs.length) {
- return toDebugString(templateArgs[shiftedIndex]);
- }
-
- return match;
- });
-
- message += '\nhttp://errors.angularjs.org/1.4.8/' +
- (module ? module + '/' : '') + code;
-
- for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
- message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
- encodeURIComponent(toDebugString(templateArgs[i]));
- }
-
- return new ErrorConstructor(message);
- };
-}
-
-/**
- * @ngdoc type
- * @name angular.Module
- * @module ng
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- var $injectorMinErr = minErr('$injector');
- var ngMinErr = minErr('ng');
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- var angular = ensure(window, 'angular', Object);
-
- // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
- angular.$$minErr = angular.$$minErr || minErr;
-
- return ensure(angular, 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @module ng
- * @description
- *
- * The `angular.module` is a global place for creating, registering and retrieving Angular
- * modules.
- * All modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- * Passing one argument retrieves an existing {@link angular.Module},
- * whereas passing more than one argument creates a new {@link angular.Module}
- *
- *
- * # Module
- *
- * A module is a collection of services, directives, controllers, filters, and configuration information.
- * `angular.module` is used to configure the {@link auto.$injector $injector}.
- *
- * ```js
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(['$locationProvider', function($locationProvider) {
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * }]);
- * ```
- *
- * Then you can create an injector and load your modules like this:
- *
- * ```js
- * var injector = angular.injector(['ng', 'myModule'])
- * ```
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {!Array.<string>=} requires If specified then new module is being created. If
- * unspecified then the module is being retrieved for further configuration.
- * @param {Function=} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- var assertNotHasOwnProperty = function(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
- }
- };
-
- assertNotHasOwnProperty(name, 'module');
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
- "the module name or forgot to load it. If registering a module ensure that you " +
- "specify the dependencies as the second argument.", name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var configBlocks = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke', 'push', configBlocks);
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _configBlocks: configBlocks,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @module ng
- *
- * @description
- * Holds the list of modules which the injector will load before the current module is
- * loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @module ng
- *
- * @description
- * Name of the module.
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @module ng
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the
- * service.
- * @description
- * See {@link auto.$provide#provider $provide.provider()}.
- */
- provider: invokeLaterAndSetModuleName('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @module ng
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link auto.$provide#factory $provide.factory()}.
- */
- factory: invokeLaterAndSetModuleName('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @module ng
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link auto.$provide#service $provide.service()}.
- */
- service: invokeLaterAndSetModuleName('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @module ng
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link auto.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @module ng
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constants are fixed, they get applied before other provide methods.
- * See {@link auto.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#decorator
- * @module ng
- * @param {string} The name of the service to decorate.
- * @param {Function} This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance.
- * @description
- * See {@link auto.$provide#decorator $provide.decorator()}.
- */
- decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),
-
- /**
- * @ngdoc method
- * @name angular.Module#animation
- * @module ng
- * @param {string} name animation name
- * @param {Function} animationFactory Factory function for creating new instance of an
- * animation.
- * @description
- *
- * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
- *
- *
- * Defines an animation hook that can be later used with
- * {@link $animate $animate} service and directives that use this service.
- *
- * ```js
- * module.animation('.animation-name', function($inject1, $inject2) {
- * return {
- * eventName : function(element, done) {
- * //code to run the animation
- * //once complete, then run done()
- * return function cancellationFunction(element) {
- * //code to cancel the animation
- * }
- * }
- * }
- * })
- * ```
- *
- * See {@link ng.$animateProvider#register $animateProvider.register()} and
- * {@link ngAnimate ngAnimate module} for more information.
- */
- animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @module ng
- * @param {string} name Filter name - this must be a valid angular expression identifier
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- */
- filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @module ng
- * @param {string|Object} name Controller name, or an object map of controllers where the
- * keys are the names and the values are the constructors.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @module ng
- * @param {string|Object} name Directive name, or an object map of directives where the
- * keys are the names and the values are the factories.
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @module ng
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- * For more about how to configure services, see
- * {@link providers#provider-recipe Provider Recipe}.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @module ng
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod, queue) {
- if (!queue) queue = invokeQueue;
- return function() {
- queue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- };
- }
-
- /**
- * @param {string} provider
- * @param {string} method
- * @returns {angular.Module}
- */
- function invokeLaterAndSetModuleName(provider, method) {
- return function(recipeName, factoryFunction) {
- if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;
- invokeQueue.push([provider, method, arguments]);
- return moduleInstance;
- };
- }
- });
- };
- });
-
-}
-
-setupModuleLoader(window);
-})(window);
-
-/**
- * Closure compiler type information
- *
- * @typedef { {
- * requires: !Array.<string>,
- * invokeQueue: !Array.<Array.<*>>,
- *
- * service: function(string, Function):angular.Module,
- * factory: function(string, Function):angular.Module,
- * value: function(string, *):angular.Module,
- *
- * filter: function(string, Function):angular.Module,
- *
- * init: function(Function):angular.Module
- * } }
- */
-angular.Module;
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js
deleted file mode 100644
index 67d08168..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(){'use strict';function d(b){return function(){var a=arguments[0],e;e="["+(b?b+":":"")+a+"] http://errors.angularjs.org/1.4.8/"+(b?b+"/":"")+a;for(a=1;a<arguments.length;a++){e=e+(1==a?"?":"&")+"p"+(a-1)+"=";var d=encodeURIComponent,c;c=arguments[a];c="function"==typeof c?c.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof c?"undefined":"string"!=typeof c?JSON.stringify(c):c;e+=d(c)}return Error(e)}}(function(b){function a(c,a,b){return c[a]||(c[a]=b())}var e=d("$injector"),n=d("ng");
-b=a(b,"angular",Object);b.$$minErr=b.$$minErr||d;return a(b,"module",function(){var c={};return function(b,d,h){if("hasOwnProperty"===b)throw n("badname","module");d&&c.hasOwnProperty(b)&&(c[b]=null);return a(c,b,function(){function c(a,b,d,e){e||(e=f);return function(){e[d||"push"]([a,b,arguments]);return g}}function a(c,e){return function(a,d){d&&"function"===typeof d&&(d.$$moduleName=b);f.push([c,e,arguments]);return g}}if(!d)throw e("nomod",b);var f=[],k=[],l=[],m=c("$injector","invoke","push",
-k),g={_invokeQueue:f,_configBlocks:k,_runBlocks:l,requires:d,name:b,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:c("$provide","value"),constant:c("$provide","constant","unshift"),decorator:a("$provide","decorator"),animation:a("$animateProvider","register"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:m,run:function(a){l.push(a);return this}};h&&m(h);
-return g})}})})(window)})(window);
-//# sourceMappingURL=angular-loader.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js.map
deleted file mode 100644
index d59cf1c6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-loader.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-loader.min.js",
-"lineCount":9,
-"mappings":"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",
-"sources":["angular-loader.js"],
-"names":["minErr","setupModuleLoader","window","ensure","obj","name","factory","$injectorMinErr","ngMinErr","angular","Object","$$minErr","modules","module","requires","configFn","context","hasOwnProperty","invokeLater","provider","method","insertMethod","queue","invokeQueue","arguments","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","push","configBlocks","runBlocks","config","_invokeQueue","_configBlocks","_runBlocks","service","value","constant","decorator","animation","filter","controller","directive","run","block"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.js
deleted file mode 100644
index 6cdcdd7a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.js
+++ /dev/null
@@ -1,980 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-// NOTE: ADVANCED_OPTIMIZATIONS mode.
-//
-// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
-// constructs incompatible with that mode.
-
-var $interpolateMinErr = window['angular']['$interpolateMinErr'];
-
-var noop = window['angular']['noop'],
- isFunction = window['angular']['isFunction'],
- toJson = window['angular']['toJson'];
-
-function stringify(value) {
- if (value == null /* null/undefined */) { return ''; }
- switch (typeof value) {
- case 'string': return value;
- case 'number': return '' + value;
- default: return toJson(value);
- }
-}
-
-// Convert an index into the string into line/column for use in error messages
-// As such, this doesn't have to be efficient.
-function indexToLineAndColumn(text, index) {
- var lines = text.split(/\n/g);
- for (var i=0; i < lines.length; i++) {
- var line=lines[i];
- if (index >= line.length) {
- index -= line.length;
- } else {
- return { line: i + 1, column: index + 1 };
- }
- }
-}
-var PARSE_CACHE_FOR_TEXT_LITERALS = Object.create(null);
-
-function parseTextLiteral(text) {
- var cachedFn = PARSE_CACHE_FOR_TEXT_LITERALS[text];
- if (cachedFn != null) {
- return cachedFn;
- }
- function parsedFn(context) { return text; }
- parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) {
- var unwatch = scope['$watch'](noop,
- function textLiteralWatcher() {
- if (isFunction(listener)) { listener.call(null, text, text, scope); }
- unwatch();
- },
- objectEquality);
- return unwatch;
- };
- PARSE_CACHE_FOR_TEXT_LITERALS[text] = parsedFn;
- parsedFn['exp'] = text; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
- parsedFn['expressions'] = []; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding.
- return parsedFn;
-}
-
-function subtractOffset(expressionFn, offset) {
- if (offset === 0) {
- return expressionFn;
- }
- function minusOffset(value) {
- return (value == void 0) ? value : value - offset;
- }
- function parsedFn(context) { return minusOffset(expressionFn(context)); }
- var unwatch;
- parsedFn['$$watchDelegate'] = function watchDelegate(scope, listener, objectEquality) {
- unwatch = scope['$watch'](expressionFn,
- function pluralExpressionWatchListener(newValue, oldValue) {
- if (isFunction(listener)) { listener.call(null, minusOffset(newValue), minusOffset(oldValue), scope); }
- },
- objectEquality);
- return unwatch;
- };
- return parsedFn;
-}
-
-// NOTE: ADVANCED_OPTIMIZATIONS mode.
-//
-// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
-// constructs incompatible with that mode.
-
-/* global $interpolateMinErr: false */
-/* global isFunction: false */
-/* global noop: false */
-
-/**
- * @constructor
- * @private
- */
-function MessageSelectorBase(expressionFn, choices) {
- var self = this;
- this.expressionFn = expressionFn;
- this.choices = choices;
- if (choices["other"] === void 0) {
- throw $interpolateMinErr('reqother', '“other†is a required option.');
- }
- this.parsedFn = function(context) { return self.getResult(context); };
- this.parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) {
- return self.watchDelegate(scope, listener, objectEquality);
- };
- this.parsedFn['exp'] = expressionFn['exp'];
- this.parsedFn['expressions'] = expressionFn['expressions'];
-}
-
-MessageSelectorBase.prototype.getMessageFn = function getMessageFn(value) {
- return this.choices[this.categorizeValue(value)];
-};
-
-MessageSelectorBase.prototype.getResult = function getResult(context) {
- return this.getMessageFn(this.expressionFn(context))(context);
-};
-
-MessageSelectorBase.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) {
- var watchers = new MessageSelectorWatchers(this, scope, listener, objectEquality);
- return function() { watchers.cancelWatch(); };
-};
-
-/**
- * @constructor
- * @private
- */
-function MessageSelectorWatchers(msgSelector, scope, listener, objectEquality) {
- var self = this;
- this.scope = scope;
- this.msgSelector = msgSelector;
- this.listener = listener;
- this.objectEquality = objectEquality;
- this.lastMessage = void 0;
- this.messageFnWatcher = noop;
- var expressionFnListener = function(newValue, oldValue) { return self.expressionFnListener(newValue, oldValue); };
- this.expressionFnWatcher = scope['$watch'](msgSelector.expressionFn, expressionFnListener, objectEquality);
-}
-
-MessageSelectorWatchers.prototype.expressionFnListener = function expressionFnListener(newValue, oldValue) {
- var self = this;
- this.messageFnWatcher();
- var messageFnListener = function(newMessage, oldMessage) { return self.messageFnListener(newMessage, oldMessage); };
- var messageFn = this.msgSelector.getMessageFn(newValue);
- this.messageFnWatcher = this.scope['$watch'](messageFn, messageFnListener, this.objectEquality);
-};
-
-MessageSelectorWatchers.prototype.messageFnListener = function messageFnListener(newMessage, oldMessage) {
- if (isFunction(this.listener)) {
- this.listener.call(null, newMessage, newMessage === oldMessage ? newMessage : this.lastMessage, this.scope);
- }
- this.lastMessage = newMessage;
-};
-
-MessageSelectorWatchers.prototype.cancelWatch = function cancelWatch() {
- this.expressionFnWatcher();
- this.messageFnWatcher();
-};
-
-/**
- * @constructor
- * @extends MessageSelectorBase
- * @private
- */
-function SelectMessage(expressionFn, choices) {
- MessageSelectorBase.call(this, expressionFn, choices);
-}
-
-function SelectMessageProto() {}
-SelectMessageProto.prototype = MessageSelectorBase.prototype;
-
-SelectMessage.prototype = new SelectMessageProto();
-SelectMessage.prototype.categorizeValue = function categorizeSelectValue(value) {
- return (this.choices[value] !== void 0) ? value : "other";
-};
-
-/**
- * @constructor
- * @extends MessageSelectorBase
- * @private
- */
-function PluralMessage(expressionFn, choices, offset, pluralCat) {
- MessageSelectorBase.call(this, expressionFn, choices);
- this.offset = offset;
- this.pluralCat = pluralCat;
-}
-
-function PluralMessageProto() {}
-PluralMessageProto.prototype = MessageSelectorBase.prototype;
-
-PluralMessage.prototype = new PluralMessageProto();
-PluralMessage.prototype.categorizeValue = function categorizePluralValue(value) {
- if (isNaN(value)) {
- return "other";
- } else if (this.choices[value] !== void 0) {
- return value;
- } else {
- var category = this.pluralCat(value - this.offset);
- return (this.choices[category] !== void 0) ? category : "other";
- }
-};
-
-// NOTE: ADVANCED_OPTIMIZATIONS mode.
-//
-// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
-// constructs incompatible with that mode.
-
-/* global $interpolateMinErr: false */
-/* global isFunction: false */
-/* global parseTextLiteral: false */
-
-/**
- * @constructor
- * @private
- */
-function InterpolationParts(trustedContext, allOrNothing) {
- this.trustedContext = trustedContext;
- this.allOrNothing = allOrNothing;
- this.textParts = [];
- this.expressionFns = [];
- this.expressionIndices = [];
- this.partialText = '';
- this.concatParts = null;
-}
-
-InterpolationParts.prototype.flushPartialText = function flushPartialText() {
- if (this.partialText) {
- if (this.concatParts == null) {
- this.textParts.push(this.partialText);
- } else {
- this.textParts.push(this.concatParts.join(''));
- this.concatParts = null;
- }
- this.partialText = '';
- }
-};
-
-InterpolationParts.prototype.addText = function addText(text) {
- if (text.length) {
- if (!this.partialText) {
- this.partialText = text;
- } else if (this.concatParts) {
- this.concatParts.push(text);
- } else {
- this.concatParts = [this.partialText, text];
- }
- }
-};
-
-InterpolationParts.prototype.addExpressionFn = function addExpressionFn(expressionFn) {
- this.flushPartialText();
- this.expressionIndices.push(this.textParts.length);
- this.expressionFns.push(expressionFn);
- this.textParts.push('');
-};
-
-InterpolationParts.prototype.getExpressionValues = function getExpressionValues(context) {
- var expressionValues = new Array(this.expressionFns.length);
- for (var i = 0; i < this.expressionFns.length; i++) {
- expressionValues[i] = this.expressionFns[i](context);
- }
- return expressionValues;
-};
-
-InterpolationParts.prototype.getResult = function getResult(expressionValues) {
- for (var i = 0; i < this.expressionIndices.length; i++) {
- var expressionValue = expressionValues[i];
- if (this.allOrNothing && expressionValue === void 0) return;
- this.textParts[this.expressionIndices[i]] = expressionValue;
- }
- return this.textParts.join('');
-};
-
-
-InterpolationParts.prototype.toParsedFn = function toParsedFn(mustHaveExpression, originalText) {
- var self = this;
- this.flushPartialText();
- if (mustHaveExpression && this.expressionFns.length === 0) {
- return void 0;
- }
- if (this.textParts.length === 0) {
- return parseTextLiteral('');
- }
- if (this.trustedContext && this.textParts.length > 1) {
- $interpolateMinErr['throwNoconcat'](originalText);
- }
- if (this.expressionFns.length === 0) {
- if (this.textParts.length != 1) { this.errorInParseLogic(); }
- return parseTextLiteral(this.textParts[0]);
- }
- var parsedFn = function(context) {
- return self.getResult(self.getExpressionValues(context));
- };
- parsedFn['$$watchDelegate'] = function $$watchDelegate(scope, listener, objectEquality) {
- return self.watchDelegate(scope, listener, objectEquality);
- };
-
- parsedFn['exp'] = originalText; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
- parsedFn['expressions'] = new Array(this.expressionFns.length); // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding.
- for (var i = 0; i < this.expressionFns.length; i++) {
- parsedFn['expressions'][i] = this.expressionFns[i]['exp'];
- }
-
- return parsedFn;
-};
-
-InterpolationParts.prototype.watchDelegate = function watchDelegate(scope, listener, objectEquality) {
- var watcher = new InterpolationPartsWatcher(this, scope, listener, objectEquality);
- return function() { watcher.cancelWatch(); };
-};
-
-function InterpolationPartsWatcher(interpolationParts, scope, listener, objectEquality) {
- this.interpolationParts = interpolationParts;
- this.scope = scope;
- this.previousResult = (void 0);
- this.listener = listener;
- var self = this;
- this.expressionFnsWatcher = scope['$watchGroup'](interpolationParts.expressionFns, function(newExpressionValues, oldExpressionValues) {
- self.watchListener(newExpressionValues, oldExpressionValues);
- });
-}
-
-InterpolationPartsWatcher.prototype.watchListener = function watchListener(newExpressionValues, oldExpressionValues) {
- var result = this.interpolationParts.getResult(newExpressionValues);
- if (isFunction(this.listener)) {
- this.listener.call(null, result, newExpressionValues === oldExpressionValues ? result : this.previousResult, this.scope);
- }
- this.previousResult = result;
-};
-
-InterpolationPartsWatcher.prototype.cancelWatch = function cancelWatch() {
- this.expressionFnsWatcher();
-};
-
-// NOTE: ADVANCED_OPTIMIZATIONS mode.
-//
-// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
-// constructs incompatible with that mode.
-
-/* global $interpolateMinErr: false */
-/* global indexToLineAndColumn: false */
-/* global InterpolationParts: false */
-/* global PluralMessage: false */
-/* global SelectMessage: false */
-/* global subtractOffset: false */
-
-// The params src and dst are exactly one of two types: NestedParserState or MessageFormatParser.
-// This function is fully optimized by V8. (inspect via IRHydra or --trace-deopt.)
-// The idea behind writing it this way is to avoid repeating oneself. This is the ONE place where
-// the parser state that is saved/restored when parsing nested mustaches is specified.
-function copyNestedParserState(src, dst) {
- dst.expressionFn = src.expressionFn;
- dst.expressionMinusOffsetFn = src.expressionMinusOffsetFn;
- dst.pluralOffset = src.pluralOffset;
- dst.choices = src.choices;
- dst.choiceKey = src.choiceKey;
- dst.interpolationParts = src.interpolationParts;
- dst.ruleChoiceKeyword = src.ruleChoiceKeyword;
- dst.msgStartIndex = src.msgStartIndex;
- dst.expressionStartIndex = src.expressionStartIndex;
-}
-
-function NestedParserState(parser) {
- copyNestedParserState(parser, this);
-}
-
-/**
- * @constructor
- * @private
- */
-function MessageFormatParser(text, startIndex, $parse, pluralCat, stringifier,
- mustHaveExpression, trustedContext, allOrNothing) {
- this.text = text;
- this.index = startIndex || 0;
- this.$parse = $parse;
- this.pluralCat = pluralCat;
- this.stringifier = stringifier;
- this.mustHaveExpression = !!mustHaveExpression;
- this.trustedContext = trustedContext;
- this.allOrNothing = !!allOrNothing;
- this.expressionFn = null;
- this.expressionMinusOffsetFn = null;
- this.pluralOffset = null;
- this.choices = null;
- this.choiceKey = null;
- this.interpolationParts = null;
- this.msgStartIndex = null;
- this.nestedStateStack = [];
- this.parsedFn = null;
- this.rule = null;
- this.ruleStack = null;
- this.ruleChoiceKeyword = null;
- this.interpNestLevel = null;
- this.expressionStartIndex = null;
- this.stringStartIndex = null;
- this.stringQuote = null;
- this.stringInterestsRe = null;
- this.angularOperatorStack = null;
- this.textPart = null;
-}
-
-// preserve v8 optimization.
-var EMPTY_STATE = new NestedParserState(new MessageFormatParser(
- /* text= */ '', /* startIndex= */ 0, /* $parse= */ null, /* pluralCat= */ null, /* stringifier= */ null,
- /* mustHaveExpression= */ false, /* trustedContext= */ null, /* allOrNothing */ false));
-
-MessageFormatParser.prototype.pushState = function pushState() {
- this.nestedStateStack.push(new NestedParserState(this));
- copyNestedParserState(EMPTY_STATE, this);
-};
-
-MessageFormatParser.prototype.popState = function popState() {
- if (this.nestedStateStack.length === 0) {
- this.errorInParseLogic();
- }
- var previousState = this.nestedStateStack.pop();
- copyNestedParserState(previousState, this);
-};
-
-// Oh my JavaScript! Who knew you couldn't match a regex at a specific
-// location in a string but will always search forward?!
-// Apparently you'll be growing this ability via the sticky flag (y) in
-// ES6. I'll just to work around you for now.
-MessageFormatParser.prototype.matchRe = function matchRe(re, search) {
- re.lastIndex = this.index;
- var match = re.exec(this.text);
- if (match != null && (search === true || (match.index == this.index))) {
- this.index = re.lastIndex;
- return match;
- }
- return null;
-};
-
-MessageFormatParser.prototype.searchRe = function searchRe(re) {
- return this.matchRe(re, true);
-};
-
-
-MessageFormatParser.prototype.consumeRe = function consumeRe(re) {
- // Without the sticky flag, we can't use the .test() method to consume a
- // match at the current index. Instead, we'll use the slower .exec() method
- // and verify match.index.
- return !!this.matchRe(re);
-};
-
-// Run through our grammar avoiding deeply nested function call chains.
-MessageFormatParser.prototype.run = function run(initialRule) {
- this.ruleStack = [initialRule];
- do {
- this.rule = this.ruleStack.pop();
- while (this.rule) {
- this.rule();
- }
- this.assertRuleOrNull(this.rule);
- } while (this.ruleStack.length > 0);
-};
-
-MessageFormatParser.prototype.errorInParseLogic = function errorInParseLogic() {
- throw $interpolateMinErr('logicbug',
- 'The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: “{0}â€',
- this.text);
-};
-
-MessageFormatParser.prototype.assertRuleOrNull = function assertRuleOrNull(rule) {
- if (rule === void 0) {
- this.errorInParseLogic();
- }
-};
-
-var NEXT_WORD_RE = /\s*(\w+)\s*/g;
-MessageFormatParser.prototype.errorExpecting = function errorExpecting() {
- // What was wrong with the syntax? Unsupported type, missing comma, or something else?
- var match = this.matchRe(NEXT_WORD_RE), position;
- if (match == null) {
- position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('reqarg',
- 'Expected one of “plural†or “select†at line {0}, column {1} of text “{2}â€',
- position.line, position.column, this.text);
- }
- var word = match[1];
- if (word == "select" || word == "plural") {
- position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('reqcomma',
- 'Expected a comma after the keyword “{0}†at line {1}, column {2} of text “{3}â€',
- word, position.line, position.column, this.text);
- } else {
- position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('unknarg',
- 'Unsupported keyword “{0}†at line {0}, column {1}. Only “plural†and “select†are currently supported. Text: “{3}â€',
- word, position.line, position.column, this.text);
- }
-};
-
-var STRING_START_RE = /['"]/g;
-MessageFormatParser.prototype.ruleString = function ruleString() {
- var match = this.matchRe(STRING_START_RE);
- if (match == null) {
- var position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('wantstring',
- 'Expected the beginning of a string at line {0}, column {1} in text “{2}â€',
- position.line, position.column, this.text);
- }
- this.startStringAtMatch(match);
-};
-
-MessageFormatParser.prototype.startStringAtMatch = function startStringAtMatch(match) {
- this.stringStartIndex = match.index;
- this.stringQuote = match[0];
- this.stringInterestsRe = this.stringQuote == "'" ? SQUOTED_STRING_INTEREST_RE : DQUOTED_STRING_INTEREST_RE;
- this.rule = this.ruleInsideString;
-};
-
-var SQUOTED_STRING_INTEREST_RE = /\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g;
-var DQUOTED_STRING_INTEREST_RE = /\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g;
-MessageFormatParser.prototype.ruleInsideString = function ruleInsideString() {
- var match = this.searchRe(this.stringInterestsRe);
- if (match == null) {
- var position = indexToLineAndColumn(this.text, this.stringStartIndex);
- throw $interpolateMinErr('untermstr',
- 'The string beginning at line {0}, column {1} is unterminated in text “{2}â€',
- position.line, position.column, this.text);
- }
- var chars = match[0];
- if (match == this.stringQuote) {
- this.rule = null;
- }
-};
-
-var PLURAL_OR_SELECT_ARG_TYPE_RE = /\s*(plural|select)\s*,\s*/g;
-MessageFormatParser.prototype.rulePluralOrSelect = function rulePluralOrSelect() {
- var match = this.searchRe(PLURAL_OR_SELECT_ARG_TYPE_RE);
- if (match == null) {
- this.errorExpecting();
- }
- var argType = match[1];
- switch (argType) {
- case "plural": this.rule = this.rulePluralStyle; break;
- case "select": this.rule = this.ruleSelectStyle; break;
- default: this.errorInParseLogic();
- }
-};
-
-MessageFormatParser.prototype.rulePluralStyle = function rulePluralStyle() {
- this.choices = Object.create(null);
- this.ruleChoiceKeyword = this.rulePluralValueOrKeyword;
- this.rule = this.rulePluralOffset;
-};
-
-MessageFormatParser.prototype.ruleSelectStyle = function ruleSelectStyle() {
- this.choices = Object.create(null);
- this.ruleChoiceKeyword = this.ruleSelectKeyword;
- this.rule = this.ruleSelectKeyword;
-};
-
-var NUMBER_RE = /[0]|(?:[1-9][0-9]*)/g;
-var PLURAL_OFFSET_RE = new RegExp("\\s*offset\\s*:\\s*(" + NUMBER_RE.source + ")", "g");
-
-MessageFormatParser.prototype.rulePluralOffset = function rulePluralOffset() {
- var match = this.matchRe(PLURAL_OFFSET_RE);
- this.pluralOffset = (match == null) ? 0 : parseInt(match[1], 10);
- this.expressionMinusOffsetFn = subtractOffset(this.expressionFn, this.pluralOffset);
- this.rule = this.rulePluralValueOrKeyword;
-};
-
-MessageFormatParser.prototype.assertChoiceKeyIsNew = function assertChoiceKeyIsNew(choiceKey, index) {
- if (this.choices[choiceKey] !== void 0) {
- var position = indexToLineAndColumn(this.text, index);
- throw $interpolateMinErr('dupvalue',
- 'The choice “{0}†is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}â€',
- choiceKey, position.line, position.column, this.text);
- }
-};
-
-var SELECT_KEYWORD = /\s*(\w+)/g;
-MessageFormatParser.prototype.ruleSelectKeyword = function ruleSelectKeyword() {
- var match = this.matchRe(SELECT_KEYWORD);
- if (match == null) {
- this.parsedFn = new SelectMessage(this.expressionFn, this.choices).parsedFn;
- this.rule = null;
- return;
- }
- this.choiceKey = match[1];
- this.assertChoiceKeyIsNew(this.choiceKey, match.index);
- this.rule = this.ruleMessageText;
-};
-
-var EXPLICIT_VALUE_OR_KEYWORD_RE = new RegExp("\\s*(?:(?:=(" + NUMBER_RE.source + "))|(\\w+))", "g");
-MessageFormatParser.prototype.rulePluralValueOrKeyword = function rulePluralValueOrKeyword() {
- var match = this.matchRe(EXPLICIT_VALUE_OR_KEYWORD_RE);
- if (match == null) {
- this.parsedFn = new PluralMessage(this.expressionFn, this.choices, this.pluralOffset, this.pluralCat).parsedFn;
- this.rule = null;
- return;
- }
- if (match[1] != null) {
- this.choiceKey = parseInt(match[1], 10);
- } else {
- this.choiceKey = match[2];
- }
- this.assertChoiceKeyIsNew(this.choiceKey, match.index);
- this.rule = this.ruleMessageText;
-};
-
-var BRACE_OPEN_RE = /\s*{/g;
-var BRACE_CLOSE_RE = /}/g;
-MessageFormatParser.prototype.ruleMessageText = function ruleMessageText() {
- if (!this.consumeRe(BRACE_OPEN_RE)) {
- var position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('reqopenbrace',
- 'The plural choice “{0}†must be followed by a message in braces at line {1}, column {2} in text “{3}â€',
- this.choiceKey, position.line, position.column, this.text);
- }
- this.msgStartIndex = this.index;
- this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing);
- this.rule = this.ruleInInterpolationOrMessageText;
-};
-
-// Note: Since "\" is used as an escape character, don't allow it to be part of the
-// startSymbol/endSymbol when I add the feature to allow them to be redefined.
-var INTERP_OR_END_MESSAGE_RE = /\\.|{{|}/g;
-var INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE = /\\.|{{|#|}/g;
-var ESCAPE_OR_MUSTACHE_BEGIN_RE = /\\.|{{/g;
-MessageFormatParser.prototype.advanceInInterpolationOrMessageText = function advanceInInterpolationOrMessageText() {
- var currentIndex = this.index, match, re;
- if (this.ruleChoiceKeyword == null) { // interpolation
- match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE);
- if (match == null) { // End of interpolation text. Nothing more to process.
- this.textPart = this.text.substring(currentIndex);
- this.index = this.text.length;
- return null;
- }
- } else {
- match = this.searchRe(this.ruleChoiceKeyword == this.rulePluralValueOrKeyword ?
- INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE : INTERP_OR_END_MESSAGE_RE);
- if (match == null) {
- var position = indexToLineAndColumn(this.text, this.msgStartIndex);
- throw $interpolateMinErr('reqendbrace',
- 'The plural/select choice “{0}†message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}â€',
- this.choiceKey, position.line, position.column, this.text);
- }
- }
- // match is non-null.
- var token = match[0];
- this.textPart = this.text.substring(currentIndex, match.index);
- return token;
-};
-
-MessageFormatParser.prototype.ruleInInterpolationOrMessageText = function ruleInInterpolationOrMessageText() {
- var currentIndex = this.index;
- var token = this.advanceInInterpolationOrMessageText();
- if (token == null) {
- // End of interpolation text. Nothing more to process.
- this.index = this.text.length;
- this.interpolationParts.addText(this.text.substring(currentIndex));
- this.rule = null;
- return;
- }
- if (token[0] == "\\") {
- // unescape next character and continue
- this.interpolationParts.addText(this.textPart + token[1]);
- return;
- }
- this.interpolationParts.addText(this.textPart);
- if (token == "{{") {
- this.pushState();
- this.ruleStack.push(this.ruleEndMustacheInInterpolationOrMessage);
- this.rule = this.ruleEnteredMustache;
- } else if (token == "}") {
- this.choices[this.choiceKey] = this.interpolationParts.toParsedFn(/*mustHaveExpression=*/false, this.text);
- this.rule = this.ruleChoiceKeyword;
- } else if (token == "#") {
- this.interpolationParts.addExpressionFn(this.expressionMinusOffsetFn);
- } else {
- this.errorInParseLogic();
- }
-};
-
-MessageFormatParser.prototype.ruleInterpolate = function ruleInterpolate() {
- this.interpolationParts = new InterpolationParts(this.trustedContext, this.allOrNothing);
- this.rule = this.ruleInInterpolation;
-};
-
-MessageFormatParser.prototype.ruleInInterpolation = function ruleInInterpolation() {
- var currentIndex = this.index;
- var match = this.searchRe(ESCAPE_OR_MUSTACHE_BEGIN_RE);
- if (match == null) {
- // End of interpolation text. Nothing more to process.
- this.index = this.text.length;
- this.interpolationParts.addText(this.text.substring(currentIndex));
- this.parsedFn = this.interpolationParts.toParsedFn(this.mustHaveExpression, this.text);
- this.rule = null;
- return;
- }
- var token = match[0];
- if (token[0] == "\\") {
- // unescape next character and continue
- this.interpolationParts.addText(this.text.substring(currentIndex, match.index) + token[1]);
- return;
- }
- this.interpolationParts.addText(this.text.substring(currentIndex, match.index));
- this.pushState();
- this.ruleStack.push(this.ruleInterpolationEndMustache);
- this.rule = this.ruleEnteredMustache;
-};
-
-MessageFormatParser.prototype.ruleInterpolationEndMustache = function ruleInterpolationEndMustache() {
- var expressionFn = this.parsedFn;
- this.popState();
- this.interpolationParts.addExpressionFn(expressionFn);
- this.rule = this.ruleInInterpolation;
-};
-
-MessageFormatParser.prototype.ruleEnteredMustache = function ruleEnteredMustache() {
- this.parsedFn = null;
- this.ruleStack.push(this.ruleEndMustache);
- this.rule = this.ruleAngularExpression;
-};
-
-MessageFormatParser.prototype.ruleEndMustacheInInterpolationOrMessage = function ruleEndMustacheInInterpolationOrMessage() {
- var expressionFn = this.parsedFn;
- this.popState();
- this.interpolationParts.addExpressionFn(expressionFn);
- this.rule = this.ruleInInterpolationOrMessageText;
-};
-
-
-
-var INTERP_END_RE = /\s*}}/g;
-MessageFormatParser.prototype.ruleEndMustache = function ruleEndMustache() {
- var match = this.matchRe(INTERP_END_RE);
- if (match == null) {
- var position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('reqendinterp',
- 'Expecting end of interpolation symbol, “{0}â€, at line {1}, column {2} in text “{3}â€',
- '}}', position.line, position.column, this.text);
- }
- if (this.parsedFn == null) {
- // If we parsed a MessageFormat extension, (e.g. select/plural today, maybe more some other
- // day), then the result *has* to be a string and those rules would have already set
- // this.parsedFn. If there was no MessageFormat extension, then there is no requirement to
- // stringify the result and parsedFn isn't set. We set it here. While we could have set it
- // unconditionally when exiting the Angular expression, I intend for us to not just replace
- // $interpolate, but also to replace $parse in a future version (so ng-bind can work), and in
- // such a case we do not want to unnecessarily stringify something if it's not going to be used
- // in a string context.
- this.parsedFn = this.$parse(this.expressionFn, this.stringifier);
- this.parsedFn['exp'] = this.expressionFn['exp']; // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
- this.parsedFn['expressions'] = this.expressionFn['expressions']; // Require this to call $compile.$$addBindingInfo() which allows Protractor to find elements by binding.
- }
- this.rule = null;
-};
-
-MessageFormatParser.prototype.ruleAngularExpression = function ruleAngularExpression() {
- this.angularOperatorStack = [];
- this.expressionStartIndex = this.index;
- this.rule = this.ruleInAngularExpression;
-};
-
-function getEndOperator(opBegin) {
- switch (opBegin) {
- case "{": return "}";
- case "[": return "]";
- case "(": return ")";
- default: return null;
- }
-}
-
-function getBeginOperator(opEnd) {
- switch (opEnd) {
- case "}": return "{";
- case "]": return "[";
- case ")": return "(";
- default: return null;
- }
-}
-
-// TODO(chirayu): The interpolation endSymbol must also be accounted for. It
-// just so happens that "}" is an operator so it's in the list below. But we
-// should support any other type of start/end interpolation symbol.
-var INTERESTING_OPERATORS_RE = /[[\]{}()'",]/g;
-MessageFormatParser.prototype.ruleInAngularExpression = function ruleInAngularExpression() {
- var startIndex = this.index;
- var match = this.searchRe(INTERESTING_OPERATORS_RE);
- var position;
- if (match == null) {
- if (this.angularOperatorStack.length === 0) {
- // This is the end of the Angular expression so this is actually a
- // success. Note that when inside an interpolation, this means we even
- // consumed the closing interpolation symbols if they were curlies. This
- // is NOT an error at this point but will become an error further up the
- // stack when the part that saw the opening curlies is unable to find the
- // closing ones.
- this.index = this.text.length;
- this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index));
- // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
- this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index);
- this.expressionFn['expressions'] = this.expressionFn['expressions'];
- this.rule = null;
- return;
- }
- var innermostOperator = this.angularOperatorStack[0];
- throw $interpolateMinErr('badexpr',
- 'Unexpected end of Angular expression. Expecting operator “{0}†at the end of the text “{1}â€',
- this.getEndOperator(innermostOperator), this.text);
- }
- var operator = match[0];
- if (operator == "'" || operator == '"') {
- this.ruleStack.push(this.ruleInAngularExpression);
- this.startStringAtMatch(match);
- return;
- }
- if (operator == ",") {
- if (this.trustedContext) {
- position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('unsafe',
- 'Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text “{3}â€',
- this.trustedContext, position.line, position.column, this.text);
- }
- // only the top level comma has relevance.
- if (this.angularOperatorStack.length === 0) {
- // todo: does this need to be trimmed?
- this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, match.index));
- // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
- this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, match.index);
- this.expressionFn['expressions'] = this.expressionFn['expressions'];
- this.rule = null;
- this.rule = this.rulePluralOrSelect;
- }
- return;
- }
- if (getEndOperator(operator) != null) {
- this.angularOperatorStack.unshift(operator);
- return;
- }
- var beginOperator = getBeginOperator(operator);
- if (beginOperator == null) {
- this.errorInParseLogic();
- }
- if (this.angularOperatorStack.length > 0) {
- if (beginOperator == this.angularOperatorStack[0]) {
- this.angularOperatorStack.shift();
- return;
- }
- position = indexToLineAndColumn(this.text, this.index);
- throw $interpolateMinErr('badexpr',
- 'Unexpected operator “{0}†at line {1}, column {2} in text. Was expecting “{3}â€. Text: “{4}â€',
- operator, position.line, position.column, getEndOperator(this.angularOperatorStack[0]), this.text);
- }
- // We are trying to pop off the operator stack but there really isn't anything to pop off.
- this.index = match.index;
- this.expressionFn = this.$parse(this.text.substring(this.expressionStartIndex, this.index));
- // Needed to pretend to be $interpolate for tests copied from interpolateSpec.js
- this.expressionFn['exp'] = this.text.substring(this.expressionStartIndex, this.index);
- this.expressionFn['expressions'] = this.expressionFn['expressions'];
- this.rule = null;
-};
-
-// NOTE: ADVANCED_OPTIMIZATIONS mode.
-//
-// This file is compiled with Closure compiler's ADVANCED_OPTIMIZATIONS flag! Be wary of using
-// constructs incompatible with that mode.
-
-/* global $interpolateMinErr: false */
-/* global MessageFormatParser: false */
-/* global stringify: false */
-
-/**
- * @ngdoc service
- * @name $$messageFormat
- *
- * @description
- * Angular internal service to recognize MessageFormat extensions in interpolation expressions.
- * For more information, see:
- * https://docs.google.com/a/google.com/document/d/1pbtW2yvtmFBikfRrJd8VAsabiFkKezmYZ_PbgdjQOVU/edit
- *
- * ## Example
- *
- * <example name="ngMessageFormat-example" module="msgFmtExample" deps="angular-message-format.min.js">
- * <file name="index.html">
- * <div ng-controller="AppController">
- * <button ng-click="decreaseRecipients()" id="decreaseRecipients">decreaseRecipients</button><br>
- * <span>{{recipients.length, plural, offset:1
- * =0 {{{sender.name}} gave no gifts (\#=#)}
- * =1 {{{sender.name}} gave one gift to {{recipients[0].name}} (\#=#)}
- * one {{{sender.name}} gave {{recipients[0].name}} and one other person a gift (\#=#)}
- * other {{{sender.name}} gave {{recipients[0].name}} and # other people a gift (\#=#)}
- * }}</span>
- * </div>
- * </file>
- *
- * <file name="script.js">
- * function Person(name, gender) {
- * this.name = name;
- * this.gender = gender;
- * }
- *
- * var alice = new Person("Alice", "female"),
- * bob = new Person("Bob", "male"),
- * charlie = new Person("Charlie", "male"),
- * harry = new Person("Harry Potter", "male");
- *
- * angular.module('msgFmtExample', ['ngMessageFormat'])
- * .controller('AppController', ['$scope', function($scope) {
- * $scope.recipients = [alice, bob, charlie];
- * $scope.sender = harry;
- * $scope.decreaseRecipients = function() {
- * --$scope.recipients.length;
- * };
- * }]);
- * </file>
- *
- * <file name="protractor.js" type="protractor">
- * describe('MessageFormat plural', function() {
- * it('should pluralize initial values', function() {
- * var messageElem = element(by.binding('recipients.length')), decreaseRecipientsBtn = element(by.id('decreaseRecipients'));
- * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and 2 other people a gift (#=2)');
- * decreaseRecipientsBtn.click();
- * expect(messageElem.getText()).toEqual('Harry Potter gave Alice and one other person a gift (#=1)');
- * decreaseRecipientsBtn.click();
- * expect(messageElem.getText()).toEqual('Harry Potter gave one gift to Alice (#=0)');
- * decreaseRecipientsBtn.click();
- * expect(messageElem.getText()).toEqual('Harry Potter gave no gifts (#=-1)');
- * });
- * });
- * </file>
- * </example>
- */
-var $$MessageFormatFactory = ['$parse', '$locale', '$sce', '$exceptionHandler', function $$messageFormat(
- $parse, $locale, $sce, $exceptionHandler) {
-
- function getStringifier(trustedContext, allOrNothing, text) {
- return function stringifier(value) {
- try {
- value = trustedContext ? $sce['getTrusted'](trustedContext, value) : $sce['valueOf'](value);
- return allOrNothing && (value === void 0) ? value : stringify(value);
- } catch (err) {
- $exceptionHandler($interpolateMinErr['interr'](text, err));
- }
- };
- }
-
- function interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {
- var stringifier = getStringifier(trustedContext, allOrNothing, text);
- var parser = new MessageFormatParser(text, 0, $parse, $locale['pluralCat'], stringifier,
- mustHaveExpression, trustedContext, allOrNothing);
- parser.run(parser.ruleInterpolate);
- return parser.parsedFn;
- }
-
- return {
- 'interpolate': interpolate
- };
-}];
-
-var $$interpolateDecorator = ['$$messageFormat', '$delegate', function $$interpolateDecorator($$messageFormat, $interpolate) {
- if ($interpolate['startSymbol']() != "{{" || $interpolate['endSymbol']() != "}}") {
- throw $interpolateMinErr('nochgmustache', 'angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.');
- }
- var interpolate = $$messageFormat['interpolate'];
- interpolate['startSymbol'] = $interpolate['startSymbol'];
- interpolate['endSymbol'] = $interpolate['endSymbol'];
- return interpolate;
-}];
-
-
-/**
- * @ngdoc module
- * @name ngMessageFormat
- * @packageName angular-message-format
- * @description
- */
-var module = window['angular']['module']('ngMessageFormat', ['ng']);
-module['factory']('$$messageFormat', $$MessageFormatFactory);
-module['config'](['$provide', function($provide) {
- $provide['decorator']('$interpolate', $$interpolateDecorator);
-}]);
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js
deleted file mode 100644
index 3d69b5ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(h){'use strict';function C(a){if(null==a)return"";switch(typeof a){case "string":return a;case "number":return""+a;default:return D(a)}}function f(a,b){for(var d=a.split(/\n/g),k=0;k<d.length;k++){var c=d[k];if(b>=c.length)b-=c.length;else return{h:k+1,f:b+1}}}function t(a){function b(){return a}var d=u[a];if(null!=d)return d;b.$$watchDelegate=function(b,d,c){var e=b.$watch(v,function(){m(d)&&d.call(null,a,a,b);e()},c);return e};u[a]=b;b.exp=a;b.expressions=[];return b}function F(a,b){function d(a){return void 0==
-a?a:a-b}function c(b){return d(a(b))}if(0===b)return a;var e;c.$$watchDelegate=function(b,c,k){return e=b.$watch(a,function(a,k){m(c)&&c.call(null,d(a),d(k),b)},k)};return c}function l(a,b){var d=this;this.b=a;this.e=b;if(void 0===b.other)throw e("reqother");this.d=function(a){return d.D(a)};this.d.$$watchDelegate=function(a,b,c){return d.P(a,b,c)};this.d.exp=a.exp;this.d.expressions=a.expressions}function n(a,b,d,c){var e=this;this.scope=b;this.oa=a;this.v=d;this.qa=c;this.U=void 0;this.K=v;this.ka=
-b.$watch(a.b,function(a){return e.ja(a)},c)}function p(a,b){l.call(this,a,b)}function w(){}function q(a,b,d,c){l.call(this,a,b);this.offset=d;this.M=c}function x(){}function g(a,b){this.u=a;this.B=b;this.i=[];this.g=[];this.J=[];this.s="";this.q=null}function r(a,b,d){this.c=a;this.scope=b;this.W=void 0;this.v=d;var c=this;this.la=b.$watchGroup(a.g,function(a,b){c.Ea(a,b)})}function s(a,b){b.b=a.b;b.C=a.C;b.w=a.w;b.e=a.e;b.k=a.k;b.c=a.c;b.n=a.n;b.F=a.F;b.l=a.l}function y(a){s(a,this)}function c(a,
-b,d,c,e,E,f,g){this.text=a;this.index=b||0;this.A=d;this.M=c;this.Da=e;this.pa=!!E;this.u=f;this.B=!!g;this.F=this.c=this.k=this.e=this.w=this.C=this.b=null;this.L=[];this.G=this.j=this.ca=this.O=this.da=this.l=this.n=this.o=this.a=this.d=null}function z(a){switch(a){case "{":return"}";case "[":return"]";case "(":return")";default:return null}}function G(a){switch(a){case "}":return"{";case "]":return"[";case ")":return"(";default:return null}}var e=h.angular.$interpolateMinErr,v=h.angular.noop,m=
-h.angular.isFunction,D=h.angular.toJson,u=Object.create(null);l.prototype.T=function(a){return this.e[this.R(a)]};l.prototype.D=function(a){return this.T(this.b(a))(a)};l.prototype.P=function(a,b,d){var c=new n(this,a,b,d);return function(){c.I()}};n.prototype.ja=function(a){var b=this;this.K();a=this.oa.T(a);this.K=this.scope.$watch(a,function(a,c){return b.na(a,c)},this.qa)};n.prototype.na=function(a,b){m(this.v)&&this.v.call(null,a,a===b?a:this.U,this.scope);this.U=a};n.prototype.I=function(){this.ka();
-this.K()};w.prototype=l.prototype;p.prototype=new w;p.prototype.R=function(a){return void 0!==this.e[a]?a:"other"};x.prototype=l.prototype;q.prototype=new x;q.prototype.R=function(a){if(isNaN(a))return"other";if(void 0!==this.e[a])return a;a=this.M(a-this.offset);return void 0!==this.e[a]?a:"other"};g.prototype.S=function(){this.s&&(null==this.q?this.i.push(this.s):(this.i.push(this.q.join("")),this.q=null),this.s="")};g.prototype.p=function(a){a.length&&(this.s?this.q?this.q.push(a):this.q=[this.s,
-a]:this.s=a)};g.prototype.H=function(a){this.S();this.J.push(this.i.length);this.g.push(a);this.i.push("")};g.prototype.ma=function(a){for(var b=Array(this.g.length),d=0;d<this.g.length;d++)b[d]=this.g[d](a);return b};g.prototype.D=function(a){for(var b=0;b<this.J.length;b++){var d=a[b];if(this.B&&void 0===d)return;this.i[this.J[b]]=d}return this.i.join("")};g.prototype.ea=function(a,b){var d=this;this.S();if(!a||0!==this.g.length){if(0===this.i.length)return t("");this.u&&1<this.i.length&&e.throwNoconcat(b);
-if(0===this.g.length)return 1!=this.i.length&&this.r(),t(this.i[0]);var c=function(a){return d.D(d.ma(a))};c.$$watchDelegate=function(a,b,c){return d.P(a,b,c)};c.exp=b;c.expressions=Array(this.g.length);for(var f=0;f<this.g.length;f++)c.expressions[f]=this.g[f].exp;return c}};g.prototype.P=function(a,b){var c=new r(this,a,b);return function(){c.I()}};r.prototype.Ea=function(a,b){var c=this.c.D(a);m(this.v)&&this.v.call(null,c,a===b?c:this.W,this.scope);this.W=c};r.prototype.I=function(){this.la()};
-var H=new y(new c("",0,null,null,null,!1,null,!1));c.prototype.pushState=function(){this.L.push(new y(this));s(H,this)};c.prototype.V=function(){0===this.L.length&&this.r();var a=this.L.pop();s(a,this)};c.prototype.m=function(a,b){a.lastIndex=this.index;var c=a.exec(this.text);return null==c||!0!==b&&c.index!=this.index?null:(this.index=a.lastIndex,c)};c.prototype.t=function(a){return this.m(a,!0)};c.prototype.ha=function(a){return!!this.m(a)};c.prototype.Ba=function(a){this.o=[a];do{for(this.a=this.o.pop();this.a;)this.a();
-this.ga(this.a)}while(0<this.o.length)};c.prototype.r=function(){throw e("logicbug",this.text);};c.prototype.ga=function(a){void 0===a&&this.r()};var I=/\s*(\w+)\s*/g;c.prototype.ia=function(){var a=this.m(I);if(null==a)throw a=f(this.text,this.index),e("reqarg",a.h,a.f,this.text);var b=a[1];if("select"==b||"plural"==b)throw a=f(this.text,this.index),e("reqcomma",b,a.h,a.f,this.text);a=f(this.text,this.index);throw e("unknarg",b,a.h,a.f,this.text);};c.prototype.Ca=function(a){this.da=a.index;this.O=
-a[0];this.ca="'"==this.O?J:K;this.a=this.ua};var J=/\\(?:\\|'|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|'/g,K=/\\(?:\\|"|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{2}|[0-7]{3}|\r\n|\n|[\s\S])|"/g;c.prototype.ua=function(){var a=this.t(this.ca);if(null==a)throw a=f(this.text,this.da),e("untermstr",a.h,a.f,this.text);a==this.O&&(this.a=null)};var L=/\s*(plural|select)\s*,\s*/g;c.prototype.ya=function(){var a=this.t(L);null==a&&this.ia();switch(a[1]){case "plural":this.a=this.za;break;case "select":this.a=
-this.Aa;break;default:this.r()}};c.prototype.za=function(){this.e=Object.create(null);this.n=this.N;this.a=this.xa};c.prototype.Aa=function(){this.e=Object.create(null);this.a=this.n=this.ba};var A=/[0]|(?:[1-9][0-9]*)/g,M=new RegExp("\\s*offset\\s*:\\s*("+A.source+")","g");c.prototype.xa=function(){var a=this.m(M);this.w=null==a?0:parseInt(a[1],10);this.C=F(this.b,this.w);this.a=this.N};c.prototype.Q=function(a,b){if(void 0!==this.e[a]){var c=f(this.text,b);throw e("dupvalue",a,c.h,c.f,this.text);
-}};var N=/\s*(\w+)/g;c.prototype.ba=function(){var a=this.m(N);null==a?(this.d=(new p(this.b,this.e)).d,this.a=null):(this.k=a[1],this.Q(this.k,a.index),this.a=this.aa)};var O=new RegExp("\\s*(?:(?:=("+A.source+"))|(\\w+))","g");c.prototype.N=function(){var a=this.m(O);null==a?(this.d=(new q(this.b,this.e,this.w,this.M)).d,this.a=null):(this.k=null!=a[1]?parseInt(a[1],10):a[2],this.Q(this.k,a.index),this.a=this.aa)};var P=/\s*{/g;c.prototype.aa=function(){if(!this.ha(P)){var a=f(this.text,this.index);
-throw e("reqopenbrace",this.k,a.h,a.f,this.text);}this.F=this.index;this.c=new g(this.u,this.B);this.a=this.$};var Q=/\\.|{{|}/g,R=/\\.|{{|#|}/g,B=/\\.|{{/g;c.prototype.fa=function(){var a=this.index,b;if(null==this.n){if(b=this.t(B),null==b)return this.G=this.text.substring(a),this.index=this.text.length,null}else if(b=this.t(this.n==this.N?R:Q),null==b)throw a=f(this.text,this.F),e("reqendbrace",this.k,a.h,a.f,this.text);var c=b[0];this.G=this.text.substring(a,b.index);return c};c.prototype.$=function(){var a=
-this.index,b=this.fa();null==b?(this.index=this.text.length,this.c.p(this.text.substring(a)),this.a=null):"\\"==b[0]?this.c.p(this.G+b[1]):(this.c.p(this.G),"{{"==b?(this.pushState(),this.o.push(this.ta),this.a=this.X):"}"==b?(this.e[this.k]=this.c.ea(!1,this.text),this.a=this.n):"#"==b?this.c.H(this.C):this.r())};c.prototype.va=function(){this.c=new g(this.u,this.B);this.a=this.Z};c.prototype.Z=function(){var a=this.index,b=this.t(B);if(null==b)this.index=this.text.length,this.c.p(this.text.substring(a)),
-this.d=this.c.ea(this.pa,this.text),this.a=null;else{var c=b[0];"\\"==c[0]?this.c.p(this.text.substring(a,b.index)+c[1]):(this.c.p(this.text.substring(a,b.index)),this.pushState(),this.o.push(this.wa),this.a=this.X)}};c.prototype.wa=function(){var a=this.d;this.V();this.c.H(a);this.a=this.Z};c.prototype.X=function(){this.d=null;this.o.push(this.sa);this.a=this.ra};c.prototype.ta=function(){var a=this.d;this.V();this.c.H(a);this.a=this.$};var S=/\s*}}/g;c.prototype.sa=function(){if(null==this.m(S)){var a=
-f(this.text,this.index);throw e("reqendinterp","}}",a.h,a.f,this.text);}null==this.d&&(this.d=this.A(this.b,this.Da),this.d.exp=this.b.exp,this.d.expressions=this.b.expressions);this.a=null};c.prototype.ra=function(){this.j=[];this.l=this.index;this.a=this.Y};var T=/[[\]{}()'",]/g;c.prototype.Y=function(){var a=this.t(T);if(null==a){if(0===this.j.length){this.index=this.text.length;this.b=this.A(this.text.substring(this.l,this.index));this.b.exp=this.text.substring(this.l,this.index);this.b.expressions=
-this.b.expressions;this.a=null;return}throw e("badexpr",this.Ga(this.j[0]),this.text);}var b=a[0];if("'"==b||'"'==b)this.o.push(this.Y),this.Ca(a);else if(","==b){if(this.u)throw a=f(this.text,this.index),e("unsafe",this.u,a.h,a.f,this.text);0===this.j.length&&(this.b=this.A(this.text.substring(this.l,a.index)),this.b.exp=this.text.substring(this.l,a.index),this.b.expressions=this.b.expressions,this.a=null,this.a=this.ya)}else if(null!=z(b))this.j.unshift(b);else{var c=G(b);null==c&&this.r();if(0<
-this.j.length){if(c==this.j[0]){this.j.shift();return}a=f(this.text,this.index);throw e("badexpr",b,a.h,a.f,z(this.j[0]),this.text);}this.index=a.index;this.b=this.A(this.text.substring(this.l,this.index));this.b.exp=this.text.substring(this.l,this.index);this.b.expressions=this.b.expressions;this.a=null}};var U=["$$messageFormat","$delegate",function(a,b){if("{{"!=b.startSymbol()||"}}"!=b.endSymbol())throw e("nochgmustache");var c=a.interpolate;c.startSymbol=b.startSymbol;c.endSymbol=b.endSymbol;
-return c}];h=h.angular.module("ngMessageFormat",["ng"]);h.factory("$$messageFormat",["$parse","$locale","$sce","$exceptionHandler",function(a,b,d,f){function g(a,b,c){return function(g){try{return g=a?d.getTrusted(a,g):d.valueOf(g),b&&void 0===g?g:C(g)}catch(h){f(e.interr(c,h))}}}return{interpolate:function(d,e,f,h){d=new c(d,0,a,b.pluralCat,g(f,h,d),e,f,h);d.Ba(d.va);return d.d}}}]);h.config(["$provide",function(a){a.decorator("$interpolate",U)}])})(window,window.Fa);
-//# sourceMappingURL=angular-message-format.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js.map
deleted file mode 100644
index a6da634b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-message-format.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-message-format.min.js",
-"lineCount":25,
-"mappings":"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",
-"sources":["angular-message-format.js"],
-"names":["window","stringify","value","toJson","indexToLineAndColumn","text","index","lines","split","i","length","line","column","parseTextLiteral","parsedFn","cachedFn","PARSE_CACHE_FOR_TEXT_LITERALS","scope","listener","objectEquality","unwatch","noop","textLiteralWatcher","isFunction","call","subtractOffset","expressionFn","offset","minusOffset","context","pluralExpressionWatchListener","newValue","oldValue","MessageSelectorBase","choices","self","$interpolateMinErr","this.parsedFn","getResult","watchDelegate","MessageSelectorWatchers","msgSelector","lastMessage","messageFnWatcher","expressionFnWatcher","expressionFnListener","SelectMessage","SelectMessageProto","PluralMessage","pluralCat","PluralMessageProto","InterpolationParts","trustedContext","allOrNothing","textParts","expressionFns","expressionIndices","partialText","concatParts","InterpolationPartsWatcher","interpolationParts","previousResult","expressionFnsWatcher","newExpressionValues","oldExpressionValues","watchListener","copyNestedParserState","src","dst","expressionMinusOffsetFn","pluralOffset","choiceKey","ruleChoiceKeyword","msgStartIndex","expressionStartIndex","NestedParserState","parser","MessageFormatParser","startIndex","$parse","stringifier","mustHaveExpression","nestedStateStack","textPart","angularOperatorStack","stringInterestsRe","stringQuote","stringStartIndex","ruleStack","rule","getEndOperator","opBegin","getBeginOperator","opEnd","Object","create","prototype","getMessageFn","MessageSelectorBase.prototype.getMessageFn","categorizeValue","MessageSelectorBase.prototype.getResult","MessageSelectorBase.prototype.watchDelegate","watchers","cancelWatch","MessageSelectorWatchers.prototype.expressionFnListener","messageFn","messageFnListener","newMessage","oldMessage","MessageSelectorWatchers.prototype.messageFnListener","MessageSelectorWatchers.prototype.cancelWatch","SelectMessage.prototype.categorizeValue","PluralMessage.prototype.categorizeValue","isNaN","category","flushPartialText","InterpolationParts.prototype.flushPartialText","push","join","addText","InterpolationParts.prototype.addText","addExpressionFn","InterpolationParts.prototype.addExpressionFn","getExpressionValues","InterpolationParts.prototype.getExpressionValues","expressionValues","Array","InterpolationParts.prototype.getResult","expressionValue","toParsedFn","InterpolationParts.prototype.toParsedFn","originalText","errorInParseLogic","InterpolationParts.prototype.watchDelegate","watcher","InterpolationPartsWatcher.prototype.watchListener","result","InterpolationPartsWatcher.prototype.cancelWatch","EMPTY_STATE","pushState","MessageFormatParser.prototype.pushState","popState","MessageFormatParser.prototype.popState","previousState","pop","matchRe","MessageFormatParser.prototype.matchRe","re","search","lastIndex","match","exec","searchRe","MessageFormatParser.prototype.searchRe","consumeRe","MessageFormatParser.prototype.consumeRe","run","MessageFormatParser.prototype.run","initialRule","assertRuleOrNull","MessageFormatParser.prototype.errorInParseLogic","MessageFormatParser.prototype.assertRuleOrNull","NEXT_WORD_RE","errorExpecting","MessageFormatParser.prototype.errorExpecting","position","word","startStringAtMatch","MessageFormatParser.prototype.startStringAtMatch","SQUOTED_STRING_INTEREST_RE","DQUOTED_STRING_INTEREST_RE","ruleInsideString","MessageFormatParser.prototype.ruleInsideString","PLURAL_OR_SELECT_ARG_TYPE_RE","rulePluralOrSelect","MessageFormatParser.prototype.rulePluralOrSelect","argType","rulePluralStyle","ruleSelectStyle","MessageFormatParser.prototype.rulePluralStyle","rulePluralValueOrKeyword","rulePluralOffset","MessageFormatParser.prototype.ruleSelectStyle","ruleSelectKeyword","NUMBER_RE","PLURAL_OFFSET_RE","RegExp","source","MessageFormatParser.prototype.rulePluralOffset","parseInt","assertChoiceKeyIsNew","MessageFormatParser.prototype.assertChoiceKeyIsNew","SELECT_KEYWORD","MessageFormatParser.prototype.ruleSelectKeyword","ruleMessageText","EXPLICIT_VALUE_OR_KEYWORD_RE","MessageFormatParser.prototype.rulePluralValueOrKeyword","BRACE_OPEN_RE","MessageFormatParser.prototype.ruleMessageText","ruleInInterpolationOrMessageText","INTERP_OR_END_MESSAGE_RE","INTERP_OR_PLURALVALUE_OR_END_MESSAGE_RE","ESCAPE_OR_MUSTACHE_BEGIN_RE","advanceInInterpolationOrMessageText","MessageFormatParser.prototype.advanceInInterpolationOrMessageText","currentIndex","substring","token","MessageFormatParser.prototype.ruleInInterpolationOrMessageText","ruleEndMustacheInInterpolationOrMessage","ruleEnteredMustache","ruleInterpolate","MessageFormatParser.prototype.ruleInterpolate","ruleInInterpolation","MessageFormatParser.prototype.ruleInInterpolation","ruleInterpolationEndMustache","MessageFormatParser.prototype.ruleInterpolationEndMustache","MessageFormatParser.prototype.ruleEnteredMustache","ruleEndMustache","ruleAngularExpression","MessageFormatParser.prototype.ruleEndMustacheInInterpolationOrMessage","INTERP_END_RE","MessageFormatParser.prototype.ruleEndMustache","MessageFormatParser.prototype.ruleAngularExpression","ruleInAngularExpression","INTERESTING_OPERATORS_RE","MessageFormatParser.prototype.ruleInAngularExpression","innermostOperator","operator","unshift","beginOperator","shift","$$interpolateDecorator","$$messageFormat","$interpolate","interpolate","module","$$MessageFormatFactory","$locale","$sce","$exceptionHandler","getStringifier","err","$provide","angular"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.js
deleted file mode 100644
index 8263976b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.js
+++ /dev/null
@@ -1,685 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/* jshint ignore:start */
-// this code is in the core, but not in angular-messages.js
-var isArray = angular.isArray;
-var forEach = angular.forEach;
-var isString = angular.isString;
-var jqLite = angular.element;
-/* jshint ignore:end */
-
-/**
- * @ngdoc module
- * @name ngMessages
- * @description
- *
- * The `ngMessages` module provides enhanced support for displaying messages within templates
- * (typically within forms or when rendering message objects that return key/value data).
- * Instead of relying on JavaScript code and/or complex ng-if statements within your form template to
- * show and hide error messages specific to the state of an input field, the `ngMessages` and
- * `ngMessage` directives are designed to handle the complexity, inheritance and priority
- * sequencing based on the order of how the messages are defined in the template.
- *
- * Currently, the ngMessages module only contains the code for the `ngMessages`, `ngMessagesInclude`
- * `ngMessage` and `ngMessageExp` directives.
- *
- * # Usage
- * The `ngMessages` directive listens on a key/value collection which is set on the ngMessages attribute.
- * Since the {@link ngModel ngModel} directive exposes an `$error` object, this error object can be
- * used with `ngMessages` to display control error messages in an easier way than with just regular angular
- * template directives.
- *
- * ```html
- * <form name="myForm">
- * <label>
- * Enter text:
- * <input type="text" ng-model="field" name="myField" required minlength="5" />
- * </label>
- * <div ng-messages="myForm.myField.$error" role="alert">
- * <div ng-message="required">You did not enter a field</div>
- * <div ng-message="minlength, maxlength">
- * Your email must be between 5 and 100 characters long
- * </div>
- * </div>
- * </form>
- * ```
- *
- * Now whatever key/value entries are present within the provided object (in this case `$error`) then
- * the ngMessages directive will render the inner first ngMessage directive (depending if the key values
- * match the attribute value present on each ngMessage directive). In other words, if your errors
- * object contains the following data:
- *
- * ```javascript
- * <!-- keep in mind that ngModel automatically sets these error flags -->
- * myField.$error = { minlength : true, required : true };
- * ```
- *
- * Then the `required` message will be displayed first. When required is false then the `minlength` message
- * will be displayed right after (since these messages are ordered this way in the template HTML code).
- * The prioritization of each message is determined by what order they're present in the DOM.
- * Therefore, instead of having custom JavaScript code determine the priority of what errors are
- * present before others, the presentation of the errors are handled within the template.
- *
- * By default, ngMessages will only display one error at a time. However, if you wish to display all
- * messages then the `ng-messages-multiple` attribute flag can be used on the element containing the
- * ngMessages directive to make this happen.
- *
- * ```html
- * <!-- attribute-style usage -->
- * <div ng-messages="myForm.myField.$error" ng-messages-multiple>...</div>
- *
- * <!-- element-style usage -->
- * <ng-messages for="myForm.myField.$error" multiple>...</ng-messages>
- * ```
- *
- * ## Reusing and Overriding Messages
- * In addition to prioritization, ngMessages also allows for including messages from a remote or an inline
- * template. This allows for generic collection of messages to be reused across multiple parts of an
- * application.
- *
- * ```html
- * <script type="text/ng-template" id="error-messages">
- * <div ng-message="required">This field is required</div>
- * <div ng-message="minlength">This field is too short</div>
- * </script>
- *
- * <div ng-messages="myForm.myField.$error" role="alert">
- * <div ng-messages-include="error-messages"></div>
- * </div>
- * ```
- *
- * However, including generic messages may not be useful enough to match all input fields, therefore,
- * `ngMessages` provides the ability to override messages defined in the remote template by redefining
- * them within the directive container.
- *
- * ```html
- * <!-- a generic template of error messages known as "my-custom-messages" -->
- * <script type="text/ng-template" id="my-custom-messages">
- * <div ng-message="required">This field is required</div>
- * <div ng-message="minlength">This field is too short</div>
- * </script>
- *
- * <form name="myForm">
- * <label>
- * Email address
- * <input type="email"
- * id="email"
- * name="myEmail"
- * ng-model="email"
- * minlength="5"
- * required />
- * </label>
- * <!-- any ng-message elements that appear BEFORE the ng-messages-include will
- * override the messages present in the ng-messages-include template -->
- * <div ng-messages="myForm.myEmail.$error" role="alert">
- * <!-- this required message has overridden the template message -->
- * <div ng-message="required">You did not enter your email address</div>
- *
- * <!-- this is a brand new message and will appear last in the prioritization -->
- * <div ng-message="email">Your email address is invalid</div>
- *
- * <!-- and here are the generic error messages -->
- * <div ng-messages-include="my-custom-messages"></div>
- * </div>
- * </form>
- * ```
- *
- * In the example HTML code above the message that is set on required will override the corresponding
- * required message defined within the remote template. Therefore, with particular input fields (such
- * email addresses, date fields, autocomplete inputs, etc...), specialized error messages can be applied
- * while more generic messages can be used to handle other, more general input errors.
- *
- * ## Dynamic Messaging
- * ngMessages also supports using expressions to dynamically change key values. Using arrays and
- * repeaters to list messages is also supported. This means that the code below will be able to
- * fully adapt itself and display the appropriate message when any of the expression data changes:
- *
- * ```html
- * <form name="myForm">
- * <label>
- * Email address
- * <input type="email"
- * name="myEmail"
- * ng-model="email"
- * minlength="5"
- * required />
- * </label>
- * <div ng-messages="myForm.myEmail.$error" role="alert">
- * <div ng-message="required">You did not enter your email address</div>
- * <div ng-repeat="errorMessage in errorMessages">
- * <!-- use ng-message-exp for a message whose key is given by an expression -->
- * <div ng-message-exp="errorMessage.type">{{ errorMessage.text }}</div>
- * </div>
- * </div>
- * </form>
- * ```
- *
- * The `errorMessage.type` expression can be a string value or it can be an array so
- * that multiple errors can be associated with a single error message:
- *
- * ```html
- * <label>
- * Email address
- * <input type="email"
- * ng-model="data.email"
- * name="myEmail"
- * ng-minlength="5"
- * ng-maxlength="100"
- * required />
- * </label>
- * <div ng-messages="myForm.myEmail.$error" role="alert">
- * <div ng-message-exp="'required'">You did not enter your email address</div>
- * <div ng-message-exp="['minlength', 'maxlength']">
- * Your email must be between 5 and 100 characters long
- * </div>
- * </div>
- * ```
- *
- * Feel free to use other structural directives such as ng-if and ng-switch to further control
- * what messages are active and when. Be careful, if you place ng-message on the same element
- * as these structural directives, Angular may not be able to determine if a message is active
- * or not. Therefore it is best to place the ng-message on a child element of the structural
- * directive.
- *
- * ```html
- * <div ng-messages="myForm.myEmail.$error" role="alert">
- * <div ng-if="showRequiredError">
- * <div ng-message="required">Please enter something</div>
- * </div>
- * </div>
- * ```
- *
- * ## Animations
- * If the `ngAnimate` module is active within the application then the `ngMessages`, `ngMessage` and
- * `ngMessageExp` directives will trigger animations whenever any messages are added and removed from
- * the DOM by the `ngMessages` directive.
- *
- * Whenever the `ngMessages` directive contains one or more visible messages then the `.ng-active` CSS
- * class will be added to the element. The `.ng-inactive` CSS class will be applied when there are no
- * messages present. Therefore, CSS transitions and keyframes as well as JavaScript animations can
- * hook into the animations whenever these classes are added/removed.
- *
- * Let's say that our HTML code for our messages container looks like so:
- *
- * ```html
- * <div ng-messages="myMessages" class="my-messages" role="alert">
- * <div ng-message="alert" class="some-message">...</div>
- * <div ng-message="fail" class="some-message">...</div>
- * </div>
- * ```
- *
- * Then the CSS animation code for the message container looks like so:
- *
- * ```css
- * .my-messages {
- * transition:1s linear all;
- * }
- * .my-messages.ng-active {
- * // messages are visible
- * }
- * .my-messages.ng-inactive {
- * // messages are hidden
- * }
- * ```
- *
- * Whenever an inner message is attached (becomes visible) or removed (becomes hidden) then the enter
- * and leave animation is triggered for each particular element bound to the `ngMessage` directive.
- *
- * Therefore, the CSS code for the inner messages looks like so:
- *
- * ```css
- * .some-message {
- * transition:1s linear all;
- * }
- *
- * .some-message.ng-enter {}
- * .some-message.ng-enter.ng-enter-active {}
- *
- * .some-message.ng-leave {}
- * .some-message.ng-leave.ng-leave-active {}
- * ```
- *
- * {@link ngAnimate Click here} to learn how to use JavaScript animations or to learn more about ngAnimate.
- */
-angular.module('ngMessages', [])
-
- /**
- * @ngdoc directive
- * @module ngMessages
- * @name ngMessages
- * @restrict AE
- *
- * @description
- * `ngMessages` is a directive that is designed to show and hide messages based on the state
- * of a key/value object that it listens on. The directive itself complements error message
- * reporting with the `ngModel` $error object (which stores a key/value state of validation errors).
- *
- * `ngMessages` manages the state of internal messages within its container element. The internal
- * messages use the `ngMessage` directive and will be inserted/removed from the page depending
- * on if they're present within the key/value object. By default, only one message will be displayed
- * at a time and this depends on the prioritization of the messages within the template. (This can
- * be changed by using the `ng-messages-multiple` or `multiple` attribute on the directive container.)
- *
- * A remote template can also be used to promote message reusability and messages can also be
- * overridden.
- *
- * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
- *
- * @usage
- * ```html
- * <!-- using attribute directives -->
- * <ANY ng-messages="expression" role="alert">
- * <ANY ng-message="stringValue">...</ANY>
- * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
- * <ANY ng-message-exp="expressionValue">...</ANY>
- * </ANY>
- *
- * <!-- or by using element directives -->
- * <ng-messages for="expression" role="alert">
- * <ng-message when="stringValue">...</ng-message>
- * <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
- * <ng-message when-exp="expressionValue">...</ng-message>
- * </ng-messages>
- * ```
- *
- * @param {string} ngMessages an angular expression evaluating to a key/value object
- * (this is typically the $error object on an ngModel instance).
- * @param {string=} ngMessagesMultiple|multiple when set, all messages will be displayed with true
- *
- * @example
- * <example name="ngMessages-directive" module="ngMessagesExample"
- * deps="angular-messages.js"
- * animations="true" fixBase="true">
- * <file name="index.html">
- * <form name="myForm">
- * <label>
- * Enter your name:
- * <input type="text"
- * name="myName"
- * ng-model="name"
- * ng-minlength="5"
- * ng-maxlength="20"
- * required />
- * </label>
- * <pre>myForm.myName.$error = {{ myForm.myName.$error | json }}</pre>
- *
- * <div ng-messages="myForm.myName.$error" style="color:maroon" role="alert">
- * <div ng-message="required">You did not enter a field</div>
- * <div ng-message="minlength">Your field is too short</div>
- * <div ng-message="maxlength">Your field is too long</div>
- * </div>
- * </form>
- * </file>
- * <file name="script.js">
- * angular.module('ngMessagesExample', ['ngMessages']);
- * </file>
- * </example>
- */
- .directive('ngMessages', ['$animate', function($animate) {
- var ACTIVE_CLASS = 'ng-active';
- var INACTIVE_CLASS = 'ng-inactive';
-
- return {
- require: 'ngMessages',
- restrict: 'AE',
- controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
- var ctrl = this;
- var latestKey = 0;
- var nextAttachId = 0;
-
- this.getAttachId = function getAttachId() { return nextAttachId++; };
-
- var messages = this.messages = {};
- var renderLater, cachedCollection;
-
- this.render = function(collection) {
- collection = collection || {};
-
- renderLater = false;
- cachedCollection = collection;
-
- // this is true if the attribute is empty or if the attribute value is truthy
- var multiple = isAttrTruthy($scope, $attrs.ngMessagesMultiple) ||
- isAttrTruthy($scope, $attrs.multiple);
-
- var unmatchedMessages = [];
- var matchedKeys = {};
- var messageItem = ctrl.head;
- var messageFound = false;
- var totalMessages = 0;
-
- // we use != instead of !== to allow for both undefined and null values
- while (messageItem != null) {
- totalMessages++;
- var messageCtrl = messageItem.message;
-
- var messageUsed = false;
- if (!messageFound) {
- forEach(collection, function(value, key) {
- if (!messageUsed && truthy(value) && messageCtrl.test(key)) {
- // this is to prevent the same error name from showing up twice
- if (matchedKeys[key]) return;
- matchedKeys[key] = true;
-
- messageUsed = true;
- messageCtrl.attach();
- }
- });
- }
-
- if (messageUsed) {
- // unless we want to display multiple messages then we should
- // set a flag here to avoid displaying the next message in the list
- messageFound = !multiple;
- } else {
- unmatchedMessages.push(messageCtrl);
- }
-
- messageItem = messageItem.next;
- }
-
- forEach(unmatchedMessages, function(messageCtrl) {
- messageCtrl.detach();
- });
-
- unmatchedMessages.length !== totalMessages
- ? $animate.setClass($element, ACTIVE_CLASS, INACTIVE_CLASS)
- : $animate.setClass($element, INACTIVE_CLASS, ACTIVE_CLASS);
- };
-
- $scope.$watchCollection($attrs.ngMessages || $attrs['for'], ctrl.render);
-
- this.reRender = function() {
- if (!renderLater) {
- renderLater = true;
- $scope.$evalAsync(function() {
- if (renderLater) {
- cachedCollection && ctrl.render(cachedCollection);
- }
- });
- }
- };
-
- this.register = function(comment, messageCtrl) {
- var nextKey = latestKey.toString();
- messages[nextKey] = {
- message: messageCtrl
- };
- insertMessageNode($element[0], comment, nextKey);
- comment.$$ngMessageNode = nextKey;
- latestKey++;
-
- ctrl.reRender();
- };
-
- this.deregister = function(comment) {
- var key = comment.$$ngMessageNode;
- delete comment.$$ngMessageNode;
- removeMessageNode($element[0], comment, key);
- delete messages[key];
- ctrl.reRender();
- };
-
- function findPreviousMessage(parent, comment) {
- var prevNode = comment;
- var parentLookup = [];
- while (prevNode && prevNode !== parent) {
- var prevKey = prevNode.$$ngMessageNode;
- if (prevKey && prevKey.length) {
- return messages[prevKey];
- }
-
- // dive deeper into the DOM and examine its children for any ngMessage
- // comments that may be in an element that appears deeper in the list
- if (prevNode.childNodes.length && parentLookup.indexOf(prevNode) == -1) {
- parentLookup.push(prevNode);
- prevNode = prevNode.childNodes[prevNode.childNodes.length - 1];
- } else {
- prevNode = prevNode.previousSibling || prevNode.parentNode;
- }
- }
- }
-
- function insertMessageNode(parent, comment, key) {
- var messageNode = messages[key];
- if (!ctrl.head) {
- ctrl.head = messageNode;
- } else {
- var match = findPreviousMessage(parent, comment);
- if (match) {
- messageNode.next = match.next;
- match.next = messageNode;
- } else {
- messageNode.next = ctrl.head;
- ctrl.head = messageNode;
- }
- }
- }
-
- function removeMessageNode(parent, comment, key) {
- var messageNode = messages[key];
-
- var match = findPreviousMessage(parent, comment);
- if (match) {
- match.next = messageNode.next;
- } else {
- ctrl.head = messageNode.next;
- }
- }
- }]
- };
-
- function isAttrTruthy(scope, attr) {
- return (isString(attr) && attr.length === 0) || //empty attribute
- truthy(scope.$eval(attr));
- }
-
- function truthy(val) {
- return isString(val) ? val.length : !!val;
- }
- }])
-
- /**
- * @ngdoc directive
- * @name ngMessagesInclude
- * @restrict AE
- * @scope
- *
- * @description
- * `ngMessagesInclude` is a directive with the purpose to import existing ngMessage template
- * code from a remote template and place the downloaded template code into the exact spot
- * that the ngMessagesInclude directive is placed within the ngMessages container. This allows
- * for a series of pre-defined messages to be reused and also allows for the developer to
- * determine what messages are overridden due to the placement of the ngMessagesInclude directive.
- *
- * @usage
- * ```html
- * <!-- using attribute directives -->
- * <ANY ng-messages="expression" role="alert">
- * <ANY ng-messages-include="remoteTplString">...</ANY>
- * </ANY>
- *
- * <!-- or by using element directives -->
- * <ng-messages for="expression" role="alert">
- * <ng-messages-include src="expressionValue1">...</ng-messages-include>
- * </ng-messages>
- * ```
- *
- * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
- *
- * @param {string} ngMessagesInclude|src a string value corresponding to the remote template.
- */
- .directive('ngMessagesInclude',
- ['$templateRequest', '$document', '$compile', function($templateRequest, $document, $compile) {
-
- return {
- restrict: 'AE',
- require: '^^ngMessages', // we only require this for validation sake
- link: function($scope, element, attrs) {
- var src = attrs.ngMessagesInclude || attrs.src;
- $templateRequest(src).then(function(html) {
- $compile(html)($scope, function(contents) {
- element.after(contents);
-
- // the anchor is placed for debugging purposes
- var anchor = jqLite($document[0].createComment(' ngMessagesInclude: ' + src + ' '));
- element.after(anchor);
-
- // we don't want to pollute the DOM anymore by keeping an empty directive element
- element.remove();
- });
- });
- }
- };
- }])
-
- /**
- * @ngdoc directive
- * @name ngMessage
- * @restrict AE
- * @scope
- *
- * @description
- * `ngMessage` is a directive with the purpose to show and hide a particular message.
- * For `ngMessage` to operate, a parent `ngMessages` directive on a parent DOM element
- * must be situated since it determines which messages are visible based on the state
- * of the provided key/value map that `ngMessages` listens on.
- *
- * More information about using `ngMessage` can be found in the
- * {@link module:ngMessages `ngMessages` module documentation}.
- *
- * @usage
- * ```html
- * <!-- using attribute directives -->
- * <ANY ng-messages="expression" role="alert">
- * <ANY ng-message="stringValue">...</ANY>
- * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
- * </ANY>
- *
- * <!-- or by using element directives -->
- * <ng-messages for="expression" role="alert">
- * <ng-message when="stringValue">...</ng-message>
- * <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
- * </ng-messages>
- * ```
- *
- * @param {expression} ngMessage|when a string value corresponding to the message key.
- */
- .directive('ngMessage', ngMessageDirectiveFactory('AE'))
-
-
- /**
- * @ngdoc directive
- * @name ngMessageExp
- * @restrict AE
- * @scope
- *
- * @description
- * `ngMessageExp` is a directive with the purpose to show and hide a particular message.
- * For `ngMessageExp` to operate, a parent `ngMessages` directive on a parent DOM element
- * must be situated since it determines which messages are visible based on the state
- * of the provided key/value map that `ngMessages` listens on.
- *
- * @usage
- * ```html
- * <!-- using attribute directives -->
- * <ANY ng-messages="expression">
- * <ANY ng-message-exp="expressionValue">...</ANY>
- * </ANY>
- *
- * <!-- or by using element directives -->
- * <ng-messages for="expression">
- * <ng-message when-exp="expressionValue">...</ng-message>
- * </ng-messages>
- * ```
- *
- * {@link module:ngMessages Click here} to learn more about `ngMessages` and `ngMessage`.
- *
- * @param {expression} ngMessageExp|whenExp an expression value corresponding to the message key.
- */
- .directive('ngMessageExp', ngMessageDirectiveFactory('A'));
-
-function ngMessageDirectiveFactory(restrict) {
- return ['$animate', function($animate) {
- return {
- restrict: 'AE',
- transclude: 'element',
- terminal: true,
- require: '^^ngMessages',
- link: function(scope, element, attrs, ngMessagesCtrl, $transclude) {
- var commentNode = element[0];
-
- var records;
- var staticExp = attrs.ngMessage || attrs.when;
- var dynamicExp = attrs.ngMessageExp || attrs.whenExp;
- var assignRecords = function(items) {
- records = items
- ? (isArray(items)
- ? items
- : items.split(/[\s,]+/))
- : null;
- ngMessagesCtrl.reRender();
- };
-
- if (dynamicExp) {
- assignRecords(scope.$eval(dynamicExp));
- scope.$watchCollection(dynamicExp, assignRecords);
- } else {
- assignRecords(staticExp);
- }
-
- var currentElement, messageCtrl;
- ngMessagesCtrl.register(commentNode, messageCtrl = {
- test: function(name) {
- return contains(records, name);
- },
- attach: function() {
- if (!currentElement) {
- $transclude(scope, function(elm) {
- $animate.enter(elm, null, element);
- currentElement = elm;
-
- // Each time we attach this node to a message we get a new id that we can match
- // when we are destroying the node later.
- var $$attachId = currentElement.$$attachId = ngMessagesCtrl.getAttachId();
-
- // in the event that the parent element is destroyed
- // by any other structural directive then it's time
- // to deregister the message from the controller
- currentElement.on('$destroy', function() {
- if (currentElement && currentElement.$$attachId === $$attachId) {
- ngMessagesCtrl.deregister(commentNode);
- messageCtrl.detach();
- }
- });
- });
- }
- },
- detach: function() {
- if (currentElement) {
- var elm = currentElement;
- currentElement = null;
- $animate.leave(elm);
- }
- }
- });
- }
- };
- }];
-
- function contains(collection, key) {
- if (collection) {
- return isArray(collection)
- ? collection.indexOf(key) >= 0
- : collection.hasOwnProperty(key);
- }
- }
-}
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js
deleted file mode 100644
index e7f8119d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(z,h,A){'use strict';function m(h){return["$animate",function(r){return{restrict:"AE",transclude:"element",terminal:!0,require:"^^ngMessages",link:function(n,f,a,g,l){var c=f[0],p,h=a.ngMessage||a.when;a=a.ngMessageExp||a.whenExp;var k=function(b){p=b?v(b)?b:b.split(/[\s,]+/):null;g.reRender()};a?(k(n.$eval(a)),n.$watchCollection(a,k)):k(h);var e,q;g.register(c,q={test:function(b){var a=p;b=a?v(a)?0<=a.indexOf(b):a.hasOwnProperty(b):void 0;return b},attach:function(){e||l(n,function(b){r.enter(b,
-null,f);e=b;var a=e.$$attachId=g.getAttachId();e.on("$destroy",function(){e&&e.$$attachId===a&&(g.deregister(c),q.detach())})})},detach:function(){if(e){var b=e;e=null;r.leave(b)}}})}}}]}var v=h.isArray,w=h.forEach,x=h.isString,y=h.element;h.module("ngMessages",[]).directive("ngMessages",["$animate",function(h){function r(f,a){return x(a)&&0===a.length||n(f.$eval(a))}function n(f){return x(f)?f.length:!!f}return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(f,
-a,g){function l(b,a){for(var d=a,f=[];d&&d!==b;){var c=d.$$ngMessageNode;if(c&&c.length)return k[c];d.childNodes.length&&-1==f.indexOf(d)?(f.push(d),d=d.childNodes[d.childNodes.length-1]):d=d.previousSibling||d.parentNode}}var c=this,p=0,m=0;this.getAttachId=function(){return m++};var k=this.messages={},e,q;this.render=function(b){b=b||{};e=!1;q=b;for(var p=r(a,g.ngMessagesMultiple)||r(a,g.multiple),d=[],k={},s=c.head,l=!1,m=0;null!=s;){m++;var t=s.message,u=!1;l||w(b,function(a,b){!u&&n(a)&&t.test(b)&&
-!k[b]&&(u=k[b]=!0,t.attach())});u?l=!p:d.push(t);s=s.next}w(d,function(b){b.detach()});d.length!==m?h.setClass(f,"ng-active","ng-inactive"):h.setClass(f,"ng-inactive","ng-active")};a.$watchCollection(g.ngMessages||g["for"],c.render);this.reRender=function(){e||(e=!0,a.$evalAsync(function(){e&&q&&c.render(q)}))};this.register=function(b,a){var d=p.toString();k[d]={message:a};var e=f[0],g=k[d];c.head?(e=l(e,b))?(g.next=e.next,e.next=g):(g.next=c.head,c.head=g):c.head=g;b.$$ngMessageNode=d;p++;c.reRender()};
-this.deregister=function(b){var a=b.$$ngMessageNode;delete b.$$ngMessageNode;var d=k[a];(b=l(f[0],b))?b.next=d.next:c.head=d.next;delete k[a];c.reRender()}}]}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(h,m,n){return{restrict:"AE",require:"^^ngMessages",link:function(f,a,g){var l=g.ngMessagesInclude||g.src;h(l).then(function(c){n(c)(f,function(c){a.after(c);c=y(m[0].createComment(" ngMessagesInclude: "+l+" "));a.after(c);a.remove()})})}}}]).directive("ngMessage",
-m("AE")).directive("ngMessageExp",m("A"))})(window,window.angular);
-//# sourceMappingURL=angular-messages.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js.map
deleted file mode 100644
index 506e76c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-messages.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-messages.min.js",
-"lineCount":11,
-"mappings":"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",
-"sources":["angular-messages.js"],
-"names":["window","angular","undefined","ngMessageDirectiveFactory","restrict","$animate","transclude","terminal","require","link","scope","element","attrs","ngMessagesCtrl","$transclude","commentNode","records","staticExp","ngMessage","when","dynamicExp","ngMessageExp","whenExp","assignRecords","items","isArray","split","reRender","$eval","$watchCollection","currentElement","messageCtrl","register","test","name","collection","indexOf","hasOwnProperty","attach","elm","enter","$$attachId","getAttachId","on","deregister","detach","leave","forEach","isString","jqLite","module","directive","isAttrTruthy","attr","length","truthy","val","controller","$element","$scope","$attrs","findPreviousMessage","parent","comment","prevNode","parentLookup","prevKey","$$ngMessageNode","messages","childNodes","push","previousSibling","parentNode","ctrl","latestKey","nextAttachId","this.getAttachId","renderLater","cachedCollection","render","this.render","multiple","ngMessagesMultiple","unmatchedMessages","matchedKeys","messageItem","head","messageFound","totalMessages","message","messageUsed","value","key","next","setClass","ACTIVE_CLASS","INACTIVE_CLASS","ngMessages","this.reRender","$evalAsync","this.register","nextKey","toString","messageNode","match","this.deregister","$templateRequest","$document","$compile","src","ngMessagesInclude","then","html","contents","after","anchor","createComment","remove"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-mocks.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-mocks.js
deleted file mode 100644
index 917d8427..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-mocks.js
+++ /dev/null
@@ -1,2471 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {
-
-'use strict';
-
-/**
- * @ngdoc object
- * @name angular.mock
- * @description
- *
- * Namespace from 'angular-mocks.js' which contains testing related code.
- */
-angular.mock = {};
-
-/**
- * ! This is a private undocumented service !
- *
- * @name $browser
- *
- * @description
- * This service is a mock implementation of {@link ng.$browser}. It provides fake
- * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
- * cookies, etc...
- *
- * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
- * that there are several helper methods available which can be used in tests.
- */
-angular.mock.$BrowserProvider = function() {
- this.$get = function() {
- return new angular.mock.$Browser();
- };
-};
-
-angular.mock.$Browser = function() {
- var self = this;
-
- this.isMock = true;
- self.$$url = "http://server/";
- self.$$lastUrl = self.$$url; // used by url polling fn
- self.pollFns = [];
-
- // TODO(vojta): remove this temporary api
- self.$$completeOutstandingRequest = angular.noop;
- self.$$incOutstandingRequestCount = angular.noop;
-
-
- // register url polling fn
-
- self.onUrlChange = function(listener) {
- self.pollFns.push(
- function() {
- if (self.$$lastUrl !== self.$$url || self.$$state !== self.$$lastState) {
- self.$$lastUrl = self.$$url;
- self.$$lastState = self.$$state;
- listener(self.$$url, self.$$state);
- }
- }
- );
-
- return listener;
- };
-
- self.$$applicationDestroyed = angular.noop;
- self.$$checkUrlChange = angular.noop;
-
- self.deferredFns = [];
- self.deferredNextId = 0;
-
- self.defer = function(fn, delay) {
- delay = delay || 0;
- self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
- self.deferredFns.sort(function(a, b) { return a.time - b.time;});
- return self.deferredNextId++;
- };
-
-
- /**
- * @name $browser#defer.now
- *
- * @description
- * Current milliseconds mock time.
- */
- self.defer.now = 0;
-
-
- self.defer.cancel = function(deferId) {
- var fnIndex;
-
- angular.forEach(self.deferredFns, function(fn, index) {
- if (fn.id === deferId) fnIndex = index;
- });
-
- if (angular.isDefined(fnIndex)) {
- self.deferredFns.splice(fnIndex, 1);
- return true;
- }
-
- return false;
- };
-
-
- /**
- * @name $browser#defer.flush
- *
- * @description
- * Flushes all pending requests and executes the defer callbacks.
- *
- * @param {number=} number of milliseconds to flush. See {@link #defer.now}
- */
- self.defer.flush = function(delay) {
- if (angular.isDefined(delay)) {
- self.defer.now += delay;
- } else {
- if (self.deferredFns.length) {
- self.defer.now = self.deferredFns[self.deferredFns.length - 1].time;
- } else {
- throw new Error('No deferred tasks to be flushed');
- }
- }
-
- while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
- self.deferredFns.shift().fn();
- }
- };
-
- self.$$baseHref = '/';
- self.baseHref = function() {
- return this.$$baseHref;
- };
-};
-angular.mock.$Browser.prototype = {
-
-/**
- * @name $browser#poll
- *
- * @description
- * run all fns in pollFns
- */
- poll: function poll() {
- angular.forEach(this.pollFns, function(pollFn) {
- pollFn();
- });
- },
-
- url: function(url, replace, state) {
- if (angular.isUndefined(state)) {
- state = null;
- }
- if (url) {
- this.$$url = url;
- // Native pushState serializes & copies the object; simulate it.
- this.$$state = angular.copy(state);
- return this;
- }
-
- return this.$$url;
- },
-
- state: function() {
- return this.$$state;
- },
-
- notifyWhenNoOutstandingRequests: function(fn) {
- fn();
- }
-};
-
-
-/**
- * @ngdoc provider
- * @name $exceptionHandlerProvider
- *
- * @description
- * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors
- * passed to the `$exceptionHandler`.
- */
-
-/**
- * @ngdoc service
- * @name $exceptionHandler
- *
- * @description
- * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
- * to it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
- * information.
- *
- *
- * ```js
- * describe('$exceptionHandlerProvider', function() {
- *
- * it('should capture log messages and exceptions', function() {
- *
- * module(function($exceptionHandlerProvider) {
- * $exceptionHandlerProvider.mode('log');
- * });
- *
- * inject(function($log, $exceptionHandler, $timeout) {
- * $timeout(function() { $log.log(1); });
- * $timeout(function() { $log.log(2); throw 'banana peel'; });
- * $timeout(function() { $log.log(3); });
- * expect($exceptionHandler.errors).toEqual([]);
- * expect($log.assertEmpty());
- * $timeout.flush();
- * expect($exceptionHandler.errors).toEqual(['banana peel']);
- * expect($log.log.logs).toEqual([[1], [2], [3]]);
- * });
- * });
- * });
- * ```
- */
-
-angular.mock.$ExceptionHandlerProvider = function() {
- var handler;
-
- /**
- * @ngdoc method
- * @name $exceptionHandlerProvider#mode
- *
- * @description
- * Sets the logging mode.
- *
- * @param {string} mode Mode of operation, defaults to `rethrow`.
- *
- * - `log`: Sometimes it is desirable to test that an error is thrown, for this case the `log`
- * mode stores an array of errors in `$exceptionHandler.errors`, to allow later
- * assertion of them. See {@link ngMock.$log#assertEmpty assertEmpty()} and
- * {@link ngMock.$log#reset reset()}
- * - `rethrow`: If any errors are passed to the handler in tests, it typically means that there
- * is a bug in the application or test, so this mock will make these tests fail.
- * For any implementations that expect exceptions to be thrown, the `rethrow` mode
- * will also maintain a log of thrown errors.
- */
- this.mode = function(mode) {
-
- switch (mode) {
- case 'log':
- case 'rethrow':
- var errors = [];
- handler = function(e) {
- if (arguments.length == 1) {
- errors.push(e);
- } else {
- errors.push([].slice.call(arguments, 0));
- }
- if (mode === "rethrow") {
- throw e;
- }
- };
- handler.errors = errors;
- break;
- default:
- throw new Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
- }
- };
-
- this.$get = function() {
- return handler;
- };
-
- this.mode('rethrow');
-};
-
-
-/**
- * @ngdoc service
- * @name $log
- *
- * @description
- * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
- * (one array per logging level). These arrays are exposed as `logs` property of each of the
- * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
- *
- */
-angular.mock.$LogProvider = function() {
- var debug = true;
-
- function concat(array1, array2, index) {
- return array1.concat(Array.prototype.slice.call(array2, index));
- }
-
- this.debugEnabled = function(flag) {
- if (angular.isDefined(flag)) {
- debug = flag;
- return this;
- } else {
- return debug;
- }
- };
-
- this.$get = function() {
- var $log = {
- log: function() { $log.log.logs.push(concat([], arguments, 0)); },
- warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
- info: function() { $log.info.logs.push(concat([], arguments, 0)); },
- error: function() { $log.error.logs.push(concat([], arguments, 0)); },
- debug: function() {
- if (debug) {
- $log.debug.logs.push(concat([], arguments, 0));
- }
- }
- };
-
- /**
- * @ngdoc method
- * @name $log#reset
- *
- * @description
- * Reset all of the logging arrays to empty.
- */
- $log.reset = function() {
- /**
- * @ngdoc property
- * @name $log#log.logs
- *
- * @description
- * Array of messages logged using {@link ng.$log#log `log()`}.
- *
- * @example
- * ```js
- * $log.log('Some Log');
- * var first = $log.log.logs.unshift();
- * ```
- */
- $log.log.logs = [];
- /**
- * @ngdoc property
- * @name $log#info.logs
- *
- * @description
- * Array of messages logged using {@link ng.$log#info `info()`}.
- *
- * @example
- * ```js
- * $log.info('Some Info');
- * var first = $log.info.logs.unshift();
- * ```
- */
- $log.info.logs = [];
- /**
- * @ngdoc property
- * @name $log#warn.logs
- *
- * @description
- * Array of messages logged using {@link ng.$log#warn `warn()`}.
- *
- * @example
- * ```js
- * $log.warn('Some Warning');
- * var first = $log.warn.logs.unshift();
- * ```
- */
- $log.warn.logs = [];
- /**
- * @ngdoc property
- * @name $log#error.logs
- *
- * @description
- * Array of messages logged using {@link ng.$log#error `error()`}.
- *
- * @example
- * ```js
- * $log.error('Some Error');
- * var first = $log.error.logs.unshift();
- * ```
- */
- $log.error.logs = [];
- /**
- * @ngdoc property
- * @name $log#debug.logs
- *
- * @description
- * Array of messages logged using {@link ng.$log#debug `debug()`}.
- *
- * @example
- * ```js
- * $log.debug('Some Error');
- * var first = $log.debug.logs.unshift();
- * ```
- */
- $log.debug.logs = [];
- };
-
- /**
- * @ngdoc method
- * @name $log#assertEmpty
- *
- * @description
- * Assert that all of the logging methods have no logged messages. If any messages are present,
- * an exception is thrown.
- */
- $log.assertEmpty = function() {
- var errors = [];
- angular.forEach(['error', 'warn', 'info', 'log', 'debug'], function(logLevel) {
- angular.forEach($log[logLevel].logs, function(log) {
- angular.forEach(log, function(logItem) {
- errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' +
- (logItem.stack || ''));
- });
- });
- });
- if (errors.length) {
- errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or " +
- "an expected log message was not checked and removed:");
- errors.push('');
- throw new Error(errors.join('\n---------\n'));
- }
- };
-
- $log.reset();
- return $log;
- };
-};
-
-
-/**
- * @ngdoc service
- * @name $interval
- *
- * @description
- * Mock implementation of the $interval service.
- *
- * Use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
- * time.
- *
- * @param {function()} fn A function that should be called repeatedly.
- * @param {number} delay Number of milliseconds between each function call.
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
- * indefinitely.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {promise} A promise which will be notified on each iteration.
- */
-angular.mock.$IntervalProvider = function() {
- this.$get = ['$browser', '$rootScope', '$q', '$$q',
- function($browser, $rootScope, $q, $$q) {
- var repeatFns = [],
- nextRepeatId = 0,
- now = 0;
-
- var $interval = function(fn, delay, count, invokeApply) {
- var hasParams = arguments.length > 4,
- args = hasParams ? Array.prototype.slice.call(arguments, 4) : [],
- iteration = 0,
- skipApply = (angular.isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise;
-
- count = (angular.isDefined(count)) ? count : 0;
- promise.then(null, null, (!hasParams) ? fn : function() {
- fn.apply(null, args);
- });
-
- promise.$$intervalId = nextRepeatId;
-
- function tick() {
- deferred.notify(iteration++);
-
- if (count > 0 && iteration >= count) {
- var fnIndex;
- deferred.resolve(iteration);
-
- angular.forEach(repeatFns, function(fn, index) {
- if (fn.id === promise.$$intervalId) fnIndex = index;
- });
-
- if (angular.isDefined(fnIndex)) {
- repeatFns.splice(fnIndex, 1);
- }
- }
-
- if (skipApply) {
- $browser.defer.flush();
- } else {
- $rootScope.$apply();
- }
- }
-
- repeatFns.push({
- nextTime:(now + delay),
- delay: delay,
- fn: tick,
- id: nextRepeatId,
- deferred: deferred
- });
- repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;});
-
- nextRepeatId++;
- return promise;
- };
- /**
- * @ngdoc method
- * @name $interval#cancel
- *
- * @description
- * Cancels a task associated with the `promise`.
- *
- * @param {promise} promise A promise from calling the `$interval` function.
- * @returns {boolean} Returns `true` if the task was successfully cancelled.
- */
- $interval.cancel = function(promise) {
- if (!promise) return false;
- var fnIndex;
-
- angular.forEach(repeatFns, function(fn, index) {
- if (fn.id === promise.$$intervalId) fnIndex = index;
- });
-
- if (angular.isDefined(fnIndex)) {
- repeatFns[fnIndex].deferred.reject('canceled');
- repeatFns.splice(fnIndex, 1);
- return true;
- }
-
- return false;
- };
-
- /**
- * @ngdoc method
- * @name $interval#flush
- * @description
- *
- * Runs interval tasks scheduled to be run in the next `millis` milliseconds.
- *
- * @param {number=} millis maximum timeout amount to flush up until.
- *
- * @return {number} The amount of time moved forward.
- */
- $interval.flush = function(millis) {
- now += millis;
- while (repeatFns.length && repeatFns[0].nextTime <= now) {
- var task = repeatFns[0];
- task.fn();
- task.nextTime += task.delay;
- repeatFns.sort(function(a, b) { return a.nextTime - b.nextTime;});
- }
- return millis;
- };
-
- return $interval;
- }];
-};
-
-
-/* jshint -W101 */
-/* The R_ISO8061_STR regex is never going to fit into the 100 char limit!
- * This directive should go inside the anonymous function but a bug in JSHint means that it would
- * not be enacted early enough to prevent the warning.
- */
-var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
-
-function jsonStringToDate(string) {
- var match;
- if (match = string.match(R_ISO8061_STR)) {
- var date = new Date(0),
- tzHour = 0,
- tzMin = 0;
- if (match[9]) {
- tzHour = toInt(match[9] + match[10]);
- tzMin = toInt(match[9] + match[11]);
- }
- date.setUTCFullYear(toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));
- date.setUTCHours(toInt(match[4] || 0) - tzHour,
- toInt(match[5] || 0) - tzMin,
- toInt(match[6] || 0),
- toInt(match[7] || 0));
- return date;
- }
- return string;
-}
-
-function toInt(str) {
- return parseInt(str, 10);
-}
-
-function padNumber(num, digits, trim) {
- var neg = '';
- if (num < 0) {
- neg = '-';
- num = -num;
- }
- num = '' + num;
- while (num.length < digits) num = '0' + num;
- if (trim) {
- num = num.substr(num.length - digits);
- }
- return neg + num;
-}
-
-
-/**
- * @ngdoc type
- * @name angular.mock.TzDate
- * @description
- *
- * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
- *
- * Mock of the Date type which has its timezone specified via constructor arg.
- *
- * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
- * offset, so that we can test code that depends on local timezone settings without dependency on
- * the time zone settings of the machine where the code is running.
- *
- * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
- * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
- *
- * @example
- * !!!! WARNING !!!!!
- * This is not a complete Date object so only methods that were implemented can be called safely.
- * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
- *
- * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
- * incomplete we might be missing some non-standard methods. This can result in errors like:
- * "Date.prototype.foo called on incompatible Object".
- *
- * ```js
- * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
- * newYearInBratislava.getTimezoneOffset() => -60;
- * newYearInBratislava.getFullYear() => 2010;
- * newYearInBratislava.getMonth() => 0;
- * newYearInBratislava.getDate() => 1;
- * newYearInBratislava.getHours() => 0;
- * newYearInBratislava.getMinutes() => 0;
- * newYearInBratislava.getSeconds() => 0;
- * ```
- *
- */
-angular.mock.TzDate = function(offset, timestamp) {
- var self = new Date(0);
- if (angular.isString(timestamp)) {
- var tsStr = timestamp;
-
- self.origDate = jsonStringToDate(timestamp);
-
- timestamp = self.origDate.getTime();
- if (isNaN(timestamp)) {
- throw {
- name: "Illegal Argument",
- message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
- };
- }
- } else {
- self.origDate = new Date(timestamp);
- }
-
- var localOffset = new Date(timestamp).getTimezoneOffset();
- self.offsetDiff = localOffset * 60 * 1000 - offset * 1000 * 60 * 60;
- self.date = new Date(timestamp + self.offsetDiff);
-
- self.getTime = function() {
- return self.date.getTime() - self.offsetDiff;
- };
-
- self.toLocaleDateString = function() {
- return self.date.toLocaleDateString();
- };
-
- self.getFullYear = function() {
- return self.date.getFullYear();
- };
-
- self.getMonth = function() {
- return self.date.getMonth();
- };
-
- self.getDate = function() {
- return self.date.getDate();
- };
-
- self.getHours = function() {
- return self.date.getHours();
- };
-
- self.getMinutes = function() {
- return self.date.getMinutes();
- };
-
- self.getSeconds = function() {
- return self.date.getSeconds();
- };
-
- self.getMilliseconds = function() {
- return self.date.getMilliseconds();
- };
-
- self.getTimezoneOffset = function() {
- return offset * 60;
- };
-
- self.getUTCFullYear = function() {
- return self.origDate.getUTCFullYear();
- };
-
- self.getUTCMonth = function() {
- return self.origDate.getUTCMonth();
- };
-
- self.getUTCDate = function() {
- return self.origDate.getUTCDate();
- };
-
- self.getUTCHours = function() {
- return self.origDate.getUTCHours();
- };
-
- self.getUTCMinutes = function() {
- return self.origDate.getUTCMinutes();
- };
-
- self.getUTCSeconds = function() {
- return self.origDate.getUTCSeconds();
- };
-
- self.getUTCMilliseconds = function() {
- return self.origDate.getUTCMilliseconds();
- };
-
- self.getDay = function() {
- return self.date.getDay();
- };
-
- // provide this method only on browsers that already have it
- if (self.toISOString) {
- self.toISOString = function() {
- return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
- padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
- padNumber(self.origDate.getUTCDate(), 2) + 'T' +
- padNumber(self.origDate.getUTCHours(), 2) + ':' +
- padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
- padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
- padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z';
- };
- }
-
- //hide all methods not implemented in this mock that the Date prototype exposes
- var unimplementedMethods = ['getUTCDay',
- 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
- 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
- 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
- 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
- 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
-
- angular.forEach(unimplementedMethods, function(methodName) {
- self[methodName] = function() {
- throw new Error("Method '" + methodName + "' is not implemented in the TzDate mock");
- };
- });
-
- return self;
-};
-
-//make "tzDateInstance instanceof Date" return true
-angular.mock.TzDate.prototype = Date.prototype;
-/* jshint +W101 */
-
-angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
-
- .config(['$provide', function($provide) {
-
- $provide.factory('$$forceReflow', function() {
- function reflowFn() {
- reflowFn.totalReflows++;
- }
- reflowFn.totalReflows = 0;
- return reflowFn;
- });
-
- $provide.factory('$$animateAsyncRun', function() {
- var queue = [];
- var queueFn = function() {
- return function(fn) {
- queue.push(fn);
- };
- };
- queueFn.flush = function() {
- if (queue.length === 0) return false;
-
- for (var i = 0; i < queue.length; i++) {
- queue[i]();
- }
- queue = [];
-
- return true;
- };
- return queueFn;
- });
-
- $provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF',
- '$$forceReflow', '$$animateAsyncRun', '$rootScope',
- function($delegate, $timeout, $browser, $$rAF,
- $$forceReflow, $$animateAsyncRun, $rootScope) {
- var animate = {
- queue: [],
- cancel: $delegate.cancel,
- on: $delegate.on,
- off: $delegate.off,
- pin: $delegate.pin,
- get reflows() {
- return $$forceReflow.totalReflows;
- },
- enabled: $delegate.enabled,
- flush: function() {
- $rootScope.$digest();
-
- var doNextRun, somethingFlushed = false;
- do {
- doNextRun = false;
-
- if ($$rAF.queue.length) {
- $$rAF.flush();
- doNextRun = somethingFlushed = true;
- }
-
- if ($$animateAsyncRun.flush()) {
- doNextRun = somethingFlushed = true;
- }
- } while (doNextRun);
-
- if (!somethingFlushed) {
- throw new Error('No pending animations ready to be closed or flushed');
- }
-
- $rootScope.$digest();
- }
- };
-
- angular.forEach(
- ['animate','enter','leave','move','addClass','removeClass','setClass'], function(method) {
- animate[method] = function() {
- animate.queue.push({
- event: method,
- element: arguments[0],
- options: arguments[arguments.length - 1],
- args: arguments
- });
- return $delegate[method].apply($delegate, arguments);
- };
- });
-
- return animate;
- }]);
-
- }]);
-
-
-/**
- * @ngdoc function
- * @name angular.mock.dump
- * @description
- *
- * *NOTE*: this is not an injectable instance, just a globally available function.
- *
- * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for
- * debugging.
- *
- * This method is also available on window, where it can be used to display objects on debug
- * console.
- *
- * @param {*} object - any object to turn into string.
- * @return {string} a serialized string of the argument
- */
-angular.mock.dump = function(object) {
- return serialize(object);
-
- function serialize(object) {
- var out;
-
- if (angular.isElement(object)) {
- object = angular.element(object);
- out = angular.element('<div></div>');
- angular.forEach(object, function(element) {
- out.append(angular.element(element).clone());
- });
- out = out.html();
- } else if (angular.isArray(object)) {
- out = [];
- angular.forEach(object, function(o) {
- out.push(serialize(o));
- });
- out = '[ ' + out.join(', ') + ' ]';
- } else if (angular.isObject(object)) {
- if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
- out = serializeScope(object);
- } else if (object instanceof Error) {
- out = object.stack || ('' + object.name + ': ' + object.message);
- } else {
- // TODO(i): this prevents methods being logged,
- // we should have a better way to serialize objects
- out = angular.toJson(object, true);
- }
- } else {
- out = String(object);
- }
-
- return out;
- }
-
- function serializeScope(scope, offset) {
- offset = offset || ' ';
- var log = [offset + 'Scope(' + scope.$id + '): {'];
- for (var key in scope) {
- if (Object.prototype.hasOwnProperty.call(scope, key) && !key.match(/^(\$|this)/)) {
- log.push(' ' + key + ': ' + angular.toJson(scope[key]));
- }
- }
- var child = scope.$$childHead;
- while (child) {
- log.push(serializeScope(child, offset + ' '));
- child = child.$$nextSibling;
- }
- log.push('}');
- return log.join('\n' + offset);
- }
-};
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @description
- * Fake HTTP backend implementation suitable for unit testing applications that use the
- * {@link ng.$http $http service}.
- *
- * *Note*: For fake HTTP backend implementation suitable for end-to-end testing or backend-less
- * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
- *
- * During unit testing, we want our unit tests to run quickly and have no external dependencies so
- * we don’t want to send [XHR](https://developer.mozilla.org/en/xmlhttprequest) or
- * [JSONP](http://en.wikipedia.org/wiki/JSONP) requests to a real server. All we really need is
- * to verify whether a certain request has been sent or not, or alternatively just let the
- * application make requests, respond with pre-trained responses and assert that the end result is
- * what we expect it to be.
- *
- * This mock implementation can be used to respond with static or dynamic responses via the
- * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
- *
- * When an Angular application needs some data from a server, it calls the $http service, which
- * sends the request to a real server using $httpBackend service. With dependency injection, it is
- * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
- * the requests and respond with some testing data without sending a request to a real server.
- *
- * There are two ways to specify what test data should be returned as http responses by the mock
- * backend when the code under test makes http requests:
- *
- * - `$httpBackend.expect` - specifies a request expectation
- * - `$httpBackend.when` - specifies a backend definition
- *
- *
- * # Request Expectations vs Backend Definitions
- *
- * Request expectations provide a way to make assertions about requests made by the application and
- * to define responses for those requests. The test will fail if the expected requests are not made
- * or they are made in the wrong order.
- *
- * Backend definitions allow you to define a fake backend for your application which doesn't assert
- * if a particular request was made or not, it just returns a trained response if a request is made.
- * The test will pass whether or not the request gets made during testing.
- *
- *
- * <table class="table">
- * <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
- * <tr>
- * <th>Syntax</th>
- * <td>.expect(...).respond(...)</td>
- * <td>.when(...).respond(...)</td>
- * </tr>
- * <tr>
- * <th>Typical usage</th>
- * <td>strict unit tests</td>
- * <td>loose (black-box) unit testing</td>
- * </tr>
- * <tr>
- * <th>Fulfills multiple requests</th>
- * <td>NO</td>
- * <td>YES</td>
- * </tr>
- * <tr>
- * <th>Order of requests matters</th>
- * <td>YES</td>
- * <td>NO</td>
- * </tr>
- * <tr>
- * <th>Request required</th>
- * <td>YES</td>
- * <td>NO</td>
- * </tr>
- * <tr>
- * <th>Response required</th>
- * <td>optional (see below)</td>
- * <td>YES</td>
- * </tr>
- * </table>
- *
- * In cases where both backend definitions and request expectations are specified during unit
- * testing, the request expectations are evaluated first.
- *
- * If a request expectation has no response specified, the algorithm will search your backend
- * definitions for an appropriate response.
- *
- * If a request didn't match any expectation or if the expectation doesn't have the response
- * defined, the backend definitions are evaluated in sequential order to see if any of them match
- * the request. The response from the first matched definition is returned.
- *
- *
- * # Flushing HTTP requests
- *
- * The $httpBackend used in production always responds to requests asynchronously. If we preserved
- * this behavior in unit testing, we'd have to create async unit tests, which are hard to write,
- * to follow and to maintain. But neither can the testing mock respond synchronously; that would
- * change the execution of the code under test. For this reason, the mock $httpBackend has a
- * `flush()` method, which allows the test to explicitly flush pending requests. This preserves
- * the async api of the backend, while allowing the test to execute synchronously.
- *
- *
- * # Unit testing with mock $httpBackend
- * The following code shows how to setup and use the mock backend when unit testing a controller.
- * First we create the controller under test:
- *
- ```js
- // The module code
- angular
- .module('MyApp', [])
- .controller('MyController', MyController);
-
- // The controller code
- function MyController($scope, $http) {
- var authToken;
-
- $http.get('/auth.py').success(function(data, status, headers) {
- authToken = headers('A-Token');
- $scope.user = data;
- });
-
- $scope.saveMessage = function(message) {
- var headers = { 'Authorization': authToken };
- $scope.status = 'Saving...';
-
- $http.post('/add-msg.py', message, { headers: headers } ).success(function(response) {
- $scope.status = '';
- }).error(function() {
- $scope.status = 'Failed...';
- });
- };
- }
- ```
- *
- * Now we setup the mock backend and create the test specs:
- *
- ```js
- // testing controller
- describe('MyController', function() {
- var $httpBackend, $rootScope, createController, authRequestHandler;
-
- // Set up the module
- beforeEach(module('MyApp'));
-
- beforeEach(inject(function($injector) {
- // Set up the mock http service responses
- $httpBackend = $injector.get('$httpBackend');
- // backend definition common for all tests
- authRequestHandler = $httpBackend.when('GET', '/auth.py')
- .respond({userId: 'userX'}, {'A-Token': 'xxx'});
-
- // Get hold of a scope (i.e. the root scope)
- $rootScope = $injector.get('$rootScope');
- // The $controller service is used to create instances of controllers
- var $controller = $injector.get('$controller');
-
- createController = function() {
- return $controller('MyController', {'$scope' : $rootScope });
- };
- }));
-
-
- afterEach(function() {
- $httpBackend.verifyNoOutstandingExpectation();
- $httpBackend.verifyNoOutstandingRequest();
- });
-
-
- it('should fetch authentication token', function() {
- $httpBackend.expectGET('/auth.py');
- var controller = createController();
- $httpBackend.flush();
- });
-
-
- it('should fail authentication', function() {
-
- // Notice how you can change the response even after it was set
- authRequestHandler.respond(401, '');
-
- $httpBackend.expectGET('/auth.py');
- var controller = createController();
- $httpBackend.flush();
- expect($rootScope.status).toBe('Failed...');
- });
-
-
- it('should send msg to server', function() {
- var controller = createController();
- $httpBackend.flush();
-
- // now you don’t care about the authentication, but
- // the controller will still send the request and
- // $httpBackend will respond without you having to
- // specify the expectation and response for this request
-
- $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
- $rootScope.saveMessage('message content');
- expect($rootScope.status).toBe('Saving...');
- $httpBackend.flush();
- expect($rootScope.status).toBe('');
- });
-
-
- it('should send auth header', function() {
- var controller = createController();
- $httpBackend.flush();
-
- $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
- // check if the header was sent, if it wasn't the expectation won't
- // match the request and the test will fail
- return headers['Authorization'] == 'xxx';
- }).respond(201, '');
-
- $rootScope.saveMessage('whatever');
- $httpBackend.flush();
- });
- });
- ```
- */
-angular.mock.$HttpBackendProvider = function() {
- this.$get = ['$rootScope', '$timeout', createHttpBackendMock];
-};
-
-/**
- * General factory function for $httpBackend mock.
- * Returns instance for unit testing (when no arguments specified):
- * - passing through is disabled
- * - auto flushing is disabled
- *
- * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
- * - passing through (delegating request to real backend) is enabled
- * - auto flushing is enabled
- *
- * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
- * @param {Object=} $browser Auto-flushing enabled if specified
- * @return {Object} Instance of $httpBackend mock
- */
-function createHttpBackendMock($rootScope, $timeout, $delegate, $browser) {
- var definitions = [],
- expectations = [],
- responses = [],
- responsesPush = angular.bind(responses, responses.push),
- copy = angular.copy;
-
- function createResponse(status, data, headers, statusText) {
- if (angular.isFunction(status)) return status;
-
- return function() {
- return angular.isNumber(status)
- ? [status, data, headers, statusText]
- : [200, status, data, headers];
- };
- }
-
- // TODO(vojta): change params to: method, url, data, headers, callback
- function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
- var xhr = new MockXhr(),
- expectation = expectations[0],
- wasExpected = false;
-
- function prettyPrint(data) {
- return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
- ? data
- : angular.toJson(data);
- }
-
- function wrapResponse(wrapped) {
- if (!$browser && timeout) {
- timeout.then ? timeout.then(handleTimeout) : $timeout(handleTimeout, timeout);
- }
-
- return handleResponse;
-
- function handleResponse() {
- var response = wrapped.response(method, url, data, headers);
- xhr.$$respHeaders = response[2];
- callback(copy(response[0]), copy(response[1]), xhr.getAllResponseHeaders(),
- copy(response[3] || ''));
- }
-
- function handleTimeout() {
- for (var i = 0, ii = responses.length; i < ii; i++) {
- if (responses[i] === handleResponse) {
- responses.splice(i, 1);
- callback(-1, undefined, '');
- break;
- }
- }
- }
- }
-
- if (expectation && expectation.match(method, url)) {
- if (!expectation.matchData(data)) {
- throw new Error('Expected ' + expectation + ' with different data\n' +
- 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data);
- }
-
- if (!expectation.matchHeaders(headers)) {
- throw new Error('Expected ' + expectation + ' with different headers\n' +
- 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' +
- prettyPrint(headers));
- }
-
- expectations.shift();
-
- if (expectation.response) {
- responses.push(wrapResponse(expectation));
- return;
- }
- wasExpected = true;
- }
-
- var i = -1, definition;
- while ((definition = definitions[++i])) {
- if (definition.match(method, url, data, headers || {})) {
- if (definition.response) {
- // if $browser specified, we do auto flush all requests
- ($browser ? $browser.defer : responsesPush)(wrapResponse(definition));
- } else if (definition.passThrough) {
- $delegate(method, url, data, callback, headers, timeout, withCredentials);
- } else throw new Error('No response defined !');
- return;
- }
- }
- throw wasExpected ?
- new Error('No response defined !') :
- new Error('Unexpected request: ' + method + ' ' + url + '\n' +
- (expectation ? 'Expected ' + expectation : 'No more request expected'));
- }
-
- /**
- * @ngdoc method
- * @name $httpBackend#when
- * @description
- * Creates a new backend definition.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
- * data string and returns true if the data is as expected.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- * object and returns true if the headers match the current definition.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- *
- * - respond –
- * `{function([status,] data[, headers, statusText])
- * | function(function(method, url, data, headers)}`
- * – The respond method takes a set of static data to be returned or a function that can
- * return an array containing response status (number), response data (string), response
- * headers (Object), and the text for the status (string). The respond method returns the
- * `requestHandler` object for possible overrides.
- */
- $httpBackend.when = function(method, url, data, headers) {
- var definition = new MockHttpExpectation(method, url, data, headers),
- chain = {
- respond: function(status, data, headers, statusText) {
- definition.passThrough = undefined;
- definition.response = createResponse(status, data, headers, statusText);
- return chain;
- }
- };
-
- if ($browser) {
- chain.passThrough = function() {
- definition.response = undefined;
- definition.passThrough = true;
- return chain;
- };
- }
-
- definitions.push(definition);
- return chain;
- };
-
- /**
- * @ngdoc method
- * @name $httpBackend#whenGET
- * @description
- * Creates a new backend definition for GET requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#whenHEAD
- * @description
- * Creates a new backend definition for HEAD requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#whenDELETE
- * @description
- * Creates a new backend definition for DELETE requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#whenPOST
- * @description
- * Creates a new backend definition for POST requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
- * data string and returns true if the data is as expected.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#whenPUT
- * @description
- * Creates a new backend definition for PUT requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string))=} data HTTP request body or function that receives
- * data string and returns true if the data is as expected.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#whenJSONP
- * @description
- * Creates a new backend definition for JSONP requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
- createShortMethods('when');
-
-
- /**
- * @ngdoc method
- * @name $httpBackend#expect
- * @description
- * Creates a new request expectation.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
- * receives data string and returns true if the data is as expected, or Object if request body
- * is in JSON format.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- * object and returns true if the headers match the current expectation.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- *
- * - respond –
- * `{function([status,] data[, headers, statusText])
- * | function(function(method, url, data, headers)}`
- * – The respond method takes a set of static data to be returned or a function that can
- * return an array containing response status (number), response data (string), response
- * headers (Object), and the text for the status (string). The respond method returns the
- * `requestHandler` object for possible overrides.
- */
- $httpBackend.expect = function(method, url, data, headers) {
- var expectation = new MockHttpExpectation(method, url, data, headers),
- chain = {
- respond: function(status, data, headers, statusText) {
- expectation.response = createResponse(status, data, headers, statusText);
- return chain;
- }
- };
-
- expectations.push(expectation);
- return chain;
- };
-
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectGET
- * @description
- * Creates a new request expectation for GET requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled. See #expect for more info.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectHEAD
- * @description
- * Creates a new request expectation for HEAD requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectDELETE
- * @description
- * Creates a new request expectation for DELETE requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectPOST
- * @description
- * Creates a new request expectation for POST requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
- * receives data string and returns true if the data is as expected, or Object if request body
- * is in JSON format.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectPUT
- * @description
- * Creates a new request expectation for PUT requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
- * receives data string and returns true if the data is as expected, or Object if request body
- * is in JSON format.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectPATCH
- * @description
- * Creates a new request expectation for PATCH requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp|function(string)|Object)=} data HTTP request body or function that
- * receives data string and returns true if the data is as expected, or Object if request body
- * is in JSON format.
- * @param {Object=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
-
- /**
- * @ngdoc method
- * @name $httpBackend#expectJSONP
- * @description
- * Creates a new request expectation for JSONP requests. For more info see `expect()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives an url
- * and returns true if the url matches the current definition.
- * @returns {requestHandler} Returns an object with `respond` method that controls how a matched
- * request is handled. You can save this object for later use and invoke `respond` again in
- * order to change how a matched request is handled.
- */
- createShortMethods('expect');
-
-
- /**
- * @ngdoc method
- * @name $httpBackend#flush
- * @description
- * Flushes all pending requests using the trained responses.
- *
- * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
- * all pending requests will be flushed. If there are no pending requests when the flush method
- * is called an exception is thrown (as this typically a sign of programming error).
- */
- $httpBackend.flush = function(count, digest) {
- if (digest !== false) $rootScope.$digest();
- if (!responses.length) throw new Error('No pending request to flush !');
-
- if (angular.isDefined(count) && count !== null) {
- while (count--) {
- if (!responses.length) throw new Error('No more pending request to flush !');
- responses.shift()();
- }
- } else {
- while (responses.length) {
- responses.shift()();
- }
- }
- $httpBackend.verifyNoOutstandingExpectation(digest);
- };
-
-
- /**
- * @ngdoc method
- * @name $httpBackend#verifyNoOutstandingExpectation
- * @description
- * Verifies that all of the requests defined via the `expect` api were made. If any of the
- * requests were not made, verifyNoOutstandingExpectation throws an exception.
- *
- * Typically, you would call this method following each test case that asserts requests using an
- * "afterEach" clause.
- *
- * ```js
- * afterEach($httpBackend.verifyNoOutstandingExpectation);
- * ```
- */
- $httpBackend.verifyNoOutstandingExpectation = function(digest) {
- if (digest !== false) $rootScope.$digest();
- if (expectations.length) {
- throw new Error('Unsatisfied requests: ' + expectations.join(', '));
- }
- };
-
-
- /**
- * @ngdoc method
- * @name $httpBackend#verifyNoOutstandingRequest
- * @description
- * Verifies that there are no outstanding requests that need to be flushed.
- *
- * Typically, you would call this method following each test case that asserts requests using an
- * "afterEach" clause.
- *
- * ```js
- * afterEach($httpBackend.verifyNoOutstandingRequest);
- * ```
- */
- $httpBackend.verifyNoOutstandingRequest = function() {
- if (responses.length) {
- throw new Error('Unflushed requests: ' + responses.length);
- }
- };
-
-
- /**
- * @ngdoc method
- * @name $httpBackend#resetExpectations
- * @description
- * Resets all request expectations, but preserves all backend definitions. Typically, you would
- * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
- * $httpBackend mock.
- */
- $httpBackend.resetExpectations = function() {
- expectations.length = 0;
- responses.length = 0;
- };
-
- return $httpBackend;
-
-
- function createShortMethods(prefix) {
- angular.forEach(['GET', 'DELETE', 'JSONP', 'HEAD'], function(method) {
- $httpBackend[prefix + method] = function(url, headers) {
- return $httpBackend[prefix](method, url, undefined, headers);
- };
- });
-
- angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
- $httpBackend[prefix + method] = function(url, data, headers) {
- return $httpBackend[prefix](method, url, data, headers);
- };
- });
- }
-}
-
-function MockHttpExpectation(method, url, data, headers) {
-
- this.data = data;
- this.headers = headers;
-
- this.match = function(m, u, d, h) {
- if (method != m) return false;
- if (!this.matchUrl(u)) return false;
- if (angular.isDefined(d) && !this.matchData(d)) return false;
- if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
- return true;
- };
-
- this.matchUrl = function(u) {
- if (!url) return true;
- if (angular.isFunction(url.test)) return url.test(u);
- if (angular.isFunction(url)) return url(u);
- return url == u;
- };
-
- this.matchHeaders = function(h) {
- if (angular.isUndefined(headers)) return true;
- if (angular.isFunction(headers)) return headers(h);
- return angular.equals(headers, h);
- };
-
- this.matchData = function(d) {
- if (angular.isUndefined(data)) return true;
- if (data && angular.isFunction(data.test)) return data.test(d);
- if (data && angular.isFunction(data)) return data(d);
- if (data && !angular.isString(data)) {
- return angular.equals(angular.fromJson(angular.toJson(data)), angular.fromJson(d));
- }
- return data == d;
- };
-
- this.toString = function() {
- return method + ' ' + url;
- };
-}
-
-function createMockXhr() {
- return new MockXhr();
-}
-
-function MockXhr() {
-
- // hack for testing $http, $httpBackend
- MockXhr.$$lastInstance = this;
-
- this.open = function(method, url, async) {
- this.$$method = method;
- this.$$url = url;
- this.$$async = async;
- this.$$reqHeaders = {};
- this.$$respHeaders = {};
- };
-
- this.send = function(data) {
- this.$$data = data;
- };
-
- this.setRequestHeader = function(key, value) {
- this.$$reqHeaders[key] = value;
- };
-
- this.getResponseHeader = function(name) {
- // the lookup must be case insensitive,
- // that's why we try two quick lookups first and full scan last
- var header = this.$$respHeaders[name];
- if (header) return header;
-
- name = angular.lowercase(name);
- header = this.$$respHeaders[name];
- if (header) return header;
-
- header = undefined;
- angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
- if (!header && angular.lowercase(headerName) == name) header = headerVal;
- });
- return header;
- };
-
- this.getAllResponseHeaders = function() {
- var lines = [];
-
- angular.forEach(this.$$respHeaders, function(value, key) {
- lines.push(key + ': ' + value);
- });
- return lines.join('\n');
- };
-
- this.abort = angular.noop;
-}
-
-
-/**
- * @ngdoc service
- * @name $timeout
- * @description
- *
- * This service is just a simple decorator for {@link ng.$timeout $timeout} service
- * that adds a "flush" and "verifyNoPendingTasks" methods.
- */
-
-angular.mock.$TimeoutDecorator = ['$delegate', '$browser', function($delegate, $browser) {
-
- /**
- * @ngdoc method
- * @name $timeout#flush
- * @description
- *
- * Flushes the queue of pending tasks.
- *
- * @param {number=} delay maximum timeout amount to flush up until
- */
- $delegate.flush = function(delay) {
- $browser.defer.flush(delay);
- };
-
- /**
- * @ngdoc method
- * @name $timeout#verifyNoPendingTasks
- * @description
- *
- * Verifies that there are no pending tasks that need to be flushed.
- */
- $delegate.verifyNoPendingTasks = function() {
- if ($browser.deferredFns.length) {
- throw new Error('Deferred tasks to flush (' + $browser.deferredFns.length + '): ' +
- formatPendingTasksAsString($browser.deferredFns));
- }
- };
-
- function formatPendingTasksAsString(tasks) {
- var result = [];
- angular.forEach(tasks, function(task) {
- result.push('{id: ' + task.id + ', ' + 'time: ' + task.time + '}');
- });
-
- return result.join(', ');
- }
-
- return $delegate;
-}];
-
-angular.mock.$RAFDecorator = ['$delegate', function($delegate) {
- var rafFn = function(fn) {
- var index = rafFn.queue.length;
- rafFn.queue.push(fn);
- return function() {
- rafFn.queue.splice(index, 1);
- };
- };
-
- rafFn.queue = [];
- rafFn.supported = $delegate.supported;
-
- rafFn.flush = function() {
- if (rafFn.queue.length === 0) {
- throw new Error('No rAF callbacks present');
- }
-
- var length = rafFn.queue.length;
- for (var i = 0; i < length; i++) {
- rafFn.queue[i]();
- }
-
- rafFn.queue = rafFn.queue.slice(i);
- };
-
- return rafFn;
-}];
-
-/**
- *
- */
-angular.mock.$RootElementProvider = function() {
- this.$get = function() {
- return angular.element('<div ng-app></div>');
- };
-};
-
-/**
- * @ngdoc service
- * @name $controller
- * @description
- * A decorator for {@link ng.$controller} with additional `bindings` parameter, useful when testing
- * controllers of directives that use {@link $compile#-bindtocontroller- `bindToController`}.
- *
- *
- * ## Example
- *
- * ```js
- *
- * // Directive definition ...
- *
- * myMod.directive('myDirective', {
- * controller: 'MyDirectiveController',
- * bindToController: {
- * name: '@'
- * }
- * });
- *
- *
- * // Controller definition ...
- *
- * myMod.controller('MyDirectiveController', ['log', function($log) {
- * $log.info(this.name);
- * })];
- *
- *
- * // In a test ...
- *
- * describe('myDirectiveController', function() {
- * it('should write the bound name to the log', inject(function($controller, $log) {
- * var ctrl = $controller('MyDirectiveController', { /* no locals &#42;/ }, { name: 'Clark Kent' });
- * expect(ctrl.name).toEqual('Clark Kent');
- * expect($log.info.logs).toEqual(['Clark Kent']);
- * });
- * });
- *
- * ```
- *
- * @param {Function|string} constructor If called with a function then it's considered to be the
- * controller constructor function. Otherwise it's considered to be a string which is used
- * to retrieve the controller constructor using the following steps:
- *
- * * check if a controller with given name is registered via `$controllerProvider`
- * * check if evaluating the string on the current scope returns a constructor
- * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
- * `window` object (not recommended)
- *
- * The string can use the `controller as property` syntax, where the controller instance is published
- * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
- * to work correctly.
- *
- * @param {Object} locals Injection locals for Controller.
- * @param {Object=} bindings Properties to add to the controller before invoking the constructor. This is used
- * to simulate the `bindToController` feature and simplify certain kinds of tests.
- * @return {Object} Instance of given controller.
- */
-angular.mock.$ControllerDecorator = ['$delegate', function($delegate) {
- return function(expression, locals, later, ident) {
- if (later && typeof later === 'object') {
- var create = $delegate(expression, locals, true, ident);
- angular.extend(create.instance, later);
- return create();
- }
- return $delegate(expression, locals, later, ident);
- };
-}];
-
-
-/**
- * @ngdoc module
- * @name ngMock
- * @packageName angular-mocks
- * @description
- *
- * # ngMock
- *
- * The `ngMock` module provides support to inject and mock Angular services into unit tests.
- * In addition, ngMock also extends various core ng services such that they can be
- * inspected and controlled in a synchronous manner within test code.
- *
- *
- * <div doc-module-components="ngMock"></div>
- *
- */
-angular.module('ngMock', ['ng']).provider({
- $browser: angular.mock.$BrowserProvider,
- $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
- $log: angular.mock.$LogProvider,
- $interval: angular.mock.$IntervalProvider,
- $httpBackend: angular.mock.$HttpBackendProvider,
- $rootElement: angular.mock.$RootElementProvider
-}).config(['$provide', function($provide) {
- $provide.decorator('$timeout', angular.mock.$TimeoutDecorator);
- $provide.decorator('$$rAF', angular.mock.$RAFDecorator);
- $provide.decorator('$rootScope', angular.mock.$RootScopeDecorator);
- $provide.decorator('$controller', angular.mock.$ControllerDecorator);
-}]);
-
-/**
- * @ngdoc module
- * @name ngMockE2E
- * @module ngMockE2E
- * @packageName angular-mocks
- * @description
- *
- * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
- * Currently there is only one mock present in this module -
- * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
- */
-angular.module('ngMockE2E', ['ng']).config(['$provide', function($provide) {
- $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
-}]);
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @module ngMockE2E
- * @description
- * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
- * applications that use the {@link ng.$http $http service}.
- *
- * *Note*: For fake http backend implementation suitable for unit testing please see
- * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
- *
- * This implementation can be used to respond with static or dynamic responses via the `when` api
- * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
- * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
- * templates from a webserver).
- *
- * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
- * is being developed with the real backend api replaced with a mock, it is often desirable for
- * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
- * templates or static files from the webserver). To configure the backend with this behavior
- * use the `passThrough` request handler of `when` instead of `respond`.
- *
- * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
- * testing. For this reason the e2e $httpBackend flushes mocked out requests
- * automatically, closely simulating the behavior of the XMLHttpRequest object.
- *
- * To setup the application to run with this http backend, you have to create a module that depends
- * on the `ngMockE2E` and your application modules and defines the fake backend:
- *
- * ```js
- * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
- * myAppDev.run(function($httpBackend) {
- * phones = [{name: 'phone1'}, {name: 'phone2'}];
- *
- * // returns the current list of phones
- * $httpBackend.whenGET('/phones').respond(phones);
- *
- * // adds a new phone to the phones array
- * $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
- * var phone = angular.fromJson(data);
- * phones.push(phone);
- * return [200, phone, {}];
- * });
- * $httpBackend.whenGET(/^\/templates\//).passThrough();
- * //...
- * });
- * ```
- *
- * Afterwards, bootstrap your app with this new module.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#when
- * @module ngMockE2E
- * @description
- * Creates a new backend definition.
- *
- * @param {string} method HTTP method.
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
- * object and returns true if the headers match the current definition.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- *
- * - respond –
- * `{function([status,] data[, headers, statusText])
- * | function(function(method, url, data, headers)}`
- * – The respond method takes a set of static data to be returned or a function that can return
- * an array containing response status (number), response data (string), response headers
- * (Object), and the text for the status (string).
- * - passThrough – `{function()}` – Any request matching a backend definition with
- * `passThrough` handler will be passed through to the real backend (an XHR request will be made
- * to the server.)
- * - Both methods return the `requestHandler` object for possible overrides.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenGET
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for GET requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenHEAD
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for HEAD requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenDELETE
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for DELETE requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenPOST
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for POST requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenPUT
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for PUT requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenPATCH
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for PATCH requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @param {(string|RegExp)=} data HTTP request body.
- * @param {(Object|function(Object))=} headers HTTP headers.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-
-/**
- * @ngdoc method
- * @name $httpBackend#whenJSONP
- * @module ngMockE2E
- * @description
- * Creates a new backend definition for JSONP requests. For more info see `when()`.
- *
- * @param {string|RegExp|function(string)} url HTTP url or function that receives a url
- * and returns true if the url matches the current definition.
- * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
- * control how a matched request is handled. You can save this object for later use and invoke
- * `respond` or `passThrough` again in order to change how a matched request is handled.
- */
-angular.mock.e2e = {};
-angular.mock.e2e.$httpBackendDecorator =
- ['$rootScope', '$timeout', '$delegate', '$browser', createHttpBackendMock];
-
-
-/**
- * @ngdoc type
- * @name $rootScope.Scope
- * @module ngMock
- * @description
- * {@link ng.$rootScope.Scope Scope} type decorated with helper methods useful for testing. These
- * methods are automatically available on any {@link ng.$rootScope.Scope Scope} instance when
- * `ngMock` module is loaded.
- *
- * In addition to all the regular `Scope` methods, the following helper methods are available:
- */
-angular.mock.$RootScopeDecorator = ['$delegate', function($delegate) {
-
- var $rootScopePrototype = Object.getPrototypeOf($delegate);
-
- $rootScopePrototype.$countChildScopes = countChildScopes;
- $rootScopePrototype.$countWatchers = countWatchers;
-
- return $delegate;
-
- // ------------------------------------------------------------------------------------------ //
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$countChildScopes
- * @module ngMock
- * @description
- * Counts all the direct and indirect child scopes of the current scope.
- *
- * The current scope is excluded from the count. The count includes all isolate child scopes.
- *
- * @returns {number} Total number of child scopes.
- */
- function countChildScopes() {
- // jshint validthis: true
- var count = 0; // exclude the current scope
- var pendingChildHeads = [this.$$childHead];
- var currentScope;
-
- while (pendingChildHeads.length) {
- currentScope = pendingChildHeads.shift();
-
- while (currentScope) {
- count += 1;
- pendingChildHeads.push(currentScope.$$childHead);
- currentScope = currentScope.$$nextSibling;
- }
- }
-
- return count;
- }
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$countWatchers
- * @module ngMock
- * @description
- * Counts all the watchers of direct and indirect child scopes of the current scope.
- *
- * The watchers of the current scope are included in the count and so are all the watchers of
- * isolate child scopes.
- *
- * @returns {number} Total number of watchers.
- */
- function countWatchers() {
- // jshint validthis: true
- var count = this.$$watchers ? this.$$watchers.length : 0; // include the current scope
- var pendingChildHeads = [this.$$childHead];
- var currentScope;
-
- while (pendingChildHeads.length) {
- currentScope = pendingChildHeads.shift();
-
- while (currentScope) {
- count += currentScope.$$watchers ? currentScope.$$watchers.length : 0;
- pendingChildHeads.push(currentScope.$$childHead);
- currentScope = currentScope.$$nextSibling;
- }
- }
-
- return count;
- }
-}];
-
-
-if (window.jasmine || window.mocha) {
-
- var currentSpec = null,
- annotatedFunctions = [],
- isSpecRunning = function() {
- return !!currentSpec;
- };
-
- angular.mock.$$annotate = angular.injector.$$annotate;
- angular.injector.$$annotate = function(fn) {
- if (typeof fn === 'function' && !fn.$inject) {
- annotatedFunctions.push(fn);
- }
- return angular.mock.$$annotate.apply(this, arguments);
- };
-
-
- (window.beforeEach || window.setup)(function() {
- annotatedFunctions = [];
- currentSpec = this;
- });
-
- (window.afterEach || window.teardown)(function() {
- var injector = currentSpec.$injector;
-
- annotatedFunctions.forEach(function(fn) {
- delete fn.$inject;
- });
-
- angular.forEach(currentSpec.$modules, function(module) {
- if (module && module.$$hashKey) {
- module.$$hashKey = undefined;
- }
- });
-
- currentSpec.$injector = null;
- currentSpec.$modules = null;
- currentSpec = null;
-
- if (injector) {
- injector.get('$rootElement').off();
- }
-
- // clean up jquery's fragment cache
- angular.forEach(angular.element.fragments, function(val, key) {
- delete angular.element.fragments[key];
- });
-
- MockXhr.$$lastInstance = null;
-
- angular.forEach(angular.callbacks, function(val, key) {
- delete angular.callbacks[key];
- });
- angular.callbacks.counter = 0;
- });
-
- /**
- * @ngdoc function
- * @name angular.mock.module
- * @description
- *
- * *NOTE*: This function is also published on window for easy access.<br>
- * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
- *
- * This function registers a module configuration code. It collects the configuration information
- * which will be used when the injector is created by {@link angular.mock.inject inject}.
- *
- * See {@link angular.mock.inject inject} for usage example
- *
- * @param {...(string|Function|Object)} fns any number of modules which are represented as string
- * aliases or as anonymous module initialization functions. The modules are used to
- * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded. If an
- * object literal is passed each key-value pair will be registered on the module via
- * {@link auto.$provide $provide}.value, the key being the string name (or token) to associate
- * with the value on the injector.
- */
- window.module = angular.mock.module = function() {
- var moduleFns = Array.prototype.slice.call(arguments, 0);
- return isSpecRunning() ? workFn() : workFn;
- /////////////////////
- function workFn() {
- if (currentSpec.$injector) {
- throw new Error('Injector already created, can not register a module!');
- } else {
- var modules = currentSpec.$modules || (currentSpec.$modules = []);
- angular.forEach(moduleFns, function(module) {
- if (angular.isObject(module) && !angular.isArray(module)) {
- modules.push(function($provide) {
- angular.forEach(module, function(value, key) {
- $provide.value(key, value);
- });
- });
- } else {
- modules.push(module);
- }
- });
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name angular.mock.inject
- * @description
- *
- * *NOTE*: This function is also published on window for easy access.<br>
- * *NOTE*: This function is declared ONLY WHEN running tests with jasmine or mocha
- *
- * The inject function wraps a function into an injectable function. The inject() creates new
- * instance of {@link auto.$injector $injector} per test, which is then used for
- * resolving references.
- *
- *
- * ## Resolving References (Underscore Wrapping)
- * Often, we would like to inject a reference once, in a `beforeEach()` block and reuse this
- * in multiple `it()` clauses. To be able to do this we must assign the reference to a variable
- * that is declared in the scope of the `describe()` block. Since we would, most likely, want
- * the variable to have the same name of the reference we have a problem, since the parameter
- * to the `inject()` function would hide the outer variable.
- *
- * To help with this, the injected parameters can, optionally, be enclosed with underscores.
- * These are ignored by the injector when the reference name is resolved.
- *
- * For example, the parameter `_myService_` would be resolved as the reference `myService`.
- * Since it is available in the function body as _myService_, we can then assign it to a variable
- * defined in an outer scope.
- *
- * ```
- * // Defined out reference variable outside
- * var myService;
- *
- * // Wrap the parameter in underscores
- * beforeEach( inject( function(_myService_){
- * myService = _myService_;
- * }));
- *
- * // Use myService in a series of tests.
- * it('makes use of myService', function() {
- * myService.doStuff();
- * });
- *
- * ```
- *
- * See also {@link angular.mock.module angular.mock.module}
- *
- * ## Example
- * Example of what a typical jasmine tests looks like with the inject method.
- * ```js
- *
- * angular.module('myApplicationModule', [])
- * .value('mode', 'app')
- * .value('version', 'v1.0.1');
- *
- *
- * describe('MyApp', function() {
- *
- * // You need to load modules that you want to test,
- * // it loads only the "ng" module by default.
- * beforeEach(module('myApplicationModule'));
- *
- *
- * // inject() is used to inject arguments of all given functions
- * it('should provide a version', inject(function(mode, version) {
- * expect(version).toEqual('v1.0.1');
- * expect(mode).toEqual('app');
- * }));
- *
- *
- * // The inject and module method can also be used inside of the it or beforeEach
- * it('should override a version and test the new version is injected', function() {
- * // module() takes functions or strings (module aliases)
- * module(function($provide) {
- * $provide.value('version', 'overridden'); // override version here
- * });
- *
- * inject(function(version) {
- * expect(version).toEqual('overridden');
- * });
- * });
- * });
- *
- * ```
- *
- * @param {...Function} fns any number of functions which will be injected using the injector.
- */
-
-
-
- var ErrorAddingDeclarationLocationStack = function(e, errorForStack) {
- this.message = e.message;
- this.name = e.name;
- if (e.line) this.line = e.line;
- if (e.sourceId) this.sourceId = e.sourceId;
- if (e.stack && errorForStack)
- this.stack = e.stack + '\n' + errorForStack.stack;
- if (e.stackArray) this.stackArray = e.stackArray;
- };
- ErrorAddingDeclarationLocationStack.prototype.toString = Error.prototype.toString;
-
- window.inject = angular.mock.inject = function() {
- var blockFns = Array.prototype.slice.call(arguments, 0);
- var errorForStack = new Error('Declaration Location');
- return isSpecRunning() ? workFn.call(currentSpec) : workFn;
- /////////////////////
- function workFn() {
- var modules = currentSpec.$modules || [];
- var strictDi = !!currentSpec.$injectorStrict;
- modules.unshift('ngMock');
- modules.unshift('ng');
- var injector = currentSpec.$injector;
- if (!injector) {
- if (strictDi) {
- // If strictDi is enabled, annotate the providerInjector blocks
- angular.forEach(modules, function(moduleFn) {
- if (typeof moduleFn === "function") {
- angular.injector.$$annotate(moduleFn);
- }
- });
- }
- injector = currentSpec.$injector = angular.injector(modules, strictDi);
- currentSpec.$injectorStrict = strictDi;
- }
- for (var i = 0, ii = blockFns.length; i < ii; i++) {
- if (currentSpec.$injectorStrict) {
- // If the injector is strict / strictDi, and the spec wants to inject using automatic
- // annotation, then annotate the function here.
- injector.annotate(blockFns[i]);
- }
- try {
- /* jshint -W040 *//* Jasmine explicitly provides a `this` object when calling functions */
- injector.invoke(blockFns[i] || angular.noop, this);
- /* jshint +W040 */
- } catch (e) {
- if (e.stack && errorForStack) {
- throw new ErrorAddingDeclarationLocationStack(e, errorForStack);
- }
- throw e;
- } finally {
- errorForStack = null;
- }
- }
- }
- };
-
-
- angular.mock.inject.strictDi = function(value) {
- value = arguments.length ? !!value : true;
- return isSpecRunning() ? workFn() : workFn;
-
- function workFn() {
- if (value !== currentSpec.$injectorStrict) {
- if (currentSpec.$injector) {
- throw new Error('Injector already created, can not modify strict annotations');
- } else {
- currentSpec.$injectorStrict = value;
- }
- }
- }
- };
-}
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.js
deleted file mode 100644
index 335859f7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.js
+++ /dev/null
@@ -1,684 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-var $resourceMinErr = angular.$$minErr('$resource');
-
-// Helper functions and regex to lookup a dotted path on an object
-// stopping at undefined/null. The path must be composed of ASCII
-// identifiers (just like $parse)
-var MEMBER_NAME_REGEX = /^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;
-
-function isValidDottedPath(path) {
- return (path != null && path !== '' && path !== 'hasOwnProperty' &&
- MEMBER_NAME_REGEX.test('.' + path));
-}
-
-function lookupDottedPath(obj, path) {
- if (!isValidDottedPath(path)) {
- throw $resourceMinErr('badmember', 'Dotted member path "@{0}" is invalid.', path);
- }
- var keys = path.split('.');
- for (var i = 0, ii = keys.length; i < ii && angular.isDefined(obj); i++) {
- var key = keys[i];
- obj = (obj !== null) ? obj[key] : undefined;
- }
- return obj;
-}
-
-/**
- * Create a shallow copy of an object and clear other fields from the destination
- */
-function shallowClearAndCopy(src, dst) {
- dst = dst || {};
-
- angular.forEach(dst, function(value, key) {
- delete dst[key];
- });
-
- for (var key in src) {
- if (src.hasOwnProperty(key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
-
- return dst;
-}
-
-/**
- * @ngdoc module
- * @name ngResource
- * @description
- *
- * # ngResource
- *
- * The `ngResource` module provides interaction support with RESTful services
- * via the $resource service.
- *
- *
- * <div doc-module-components="ngResource"></div>
- *
- * See {@link ngResource.$resource `$resource`} for usage.
- */
-
-/**
- * @ngdoc service
- * @name $resource
- * @requires $http
- *
- * @description
- * A factory which creates a resource object that lets you interact with
- * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
- *
- * The returned resource object has action methods which provide high-level behaviors without
- * the need to interact with the low level {@link ng.$http $http} service.
- *
- * Requires the {@link ngResource `ngResource`} module to be installed.
- *
- * By default, trailing slashes will be stripped from the calculated URLs,
- * which can pose problems with server backends that do not expect that
- * behavior. This can be disabled by configuring the `$resourceProvider` like
- * this:
- *
- * ```js
- app.config(['$resourceProvider', function($resourceProvider) {
- // Don't strip trailing slashes from calculated URLs
- $resourceProvider.defaults.stripTrailingSlashes = false;
- }]);
- * ```
- *
- * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
- * `/user/:username`. If you are using a URL with a port number (e.g.
- * `http://example.com:8080/api`), it will be respected.
- *
- * If you are using a url with a suffix, just add the suffix, like this:
- * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json')`
- * or even `$resource('http://example.com/resource/:resource_id.:format')`
- * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be
- * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you
- * can escape it with `/\.`.
- *
- * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
- * `actions` methods. If any of the parameter value is a function, it will be executed every time
- * when a param value needs to be obtained for a request (unless the param was overridden).
- *
- * Each key value in the parameter object is first bound to url template if present and then any
- * excess keys are appended to the url search query after the `?`.
- *
- * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
- * URL `/path/greet?salutation=Hello`.
- *
- * If the parameter value is prefixed with `@` then the value for that parameter will be extracted
- * from the corresponding property on the `data` object (provided when calling an action method). For
- * example, if the `defaultParam` object is `{someParam: '@someProp'}` then the value of `someParam`
- * will be `data.someProp`.
- *
- * @param {Object.<Object>=} actions Hash with declaration of custom actions that should extend
- * the default set of resource actions. The declaration should be created in the format of {@link
- * ng.$http#usage $http.config}:
- *
- * {action1: {method:?, params:?, isArray:?, headers:?, ...},
- * action2: {method:?, params:?, isArray:?, headers:?, ...},
- * ...}
- *
- * Where:
- *
- * - **`action`** – {string} – The name of action. This name becomes the name of the method on
- * your resource object.
- * - **`method`** – {string} – Case insensitive HTTP method (e.g. `GET`, `POST`, `PUT`,
- * `DELETE`, `JSONP`, etc).
- * - **`params`** – {Object=} – Optional set of pre-bound parameters for this action. If any of
- * the parameter value is a function, it will be executed every time when a param value needs to
- * be obtained for a request (unless the param was overridden).
- * - **`url`** – {string} – action specific `url` override. The url templating is supported just
- * like for the resource-level urls.
- * - **`isArray`** – {boolean=} – If true then the returned object for this action is an array,
- * see `returns` section.
- * - **`transformRequest`** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * request body and headers and returns its transformed (typically serialized) version.
- * By default, transformRequest will contain one function that checks if the request data is
- * an object and serializes to using `angular.toJson`. To prevent this behavior, set
- * `transformRequest` to an empty array: `transformRequest: []`
- * - **`transformResponse`** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * response body and headers and returns its transformed (typically deserialized) version.
- * By default, transformResponse will contain one function that checks if the response looks like
- * a JSON string and deserializes it using `angular.fromJson`. To prevent this behavior, set
- * `transformResponse` to an empty array: `transformResponse: []`
- * - **`cache`** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- * GET request, otherwise if a cache instance built with
- * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
- * caching.
- * - **`timeout`** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise} that
- * should abort the request when resolved.
- * - **`withCredentials`** - `{boolean}` - whether to set the `withCredentials` flag on the
- * XHR object. See
- * [requests with credentials](https://developer.mozilla.org/en/http_access_control#section_5)
- * for more information.
- * - **`responseType`** - `{string}` - see
- * [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).
- * - **`interceptor`** - `{Object=}` - The interceptor object has two optional methods -
- * `response` and `responseError`. Both `response` and `responseError` interceptors get called
- * with `http response` object. See {@link ng.$http $http interceptors}.
- *
- * @param {Object} options Hash with custom settings that should extend the
- * default `$resourceProvider` behavior. The only supported option is
- *
- * Where:
- *
- * - **`stripTrailingSlashes`** – {boolean} – If true then the trailing
- * slashes from any calculated URL will be stripped. (Defaults to true.)
- *
- * @returns {Object} A resource "class" object with methods for the default set of resource actions
- * optionally extended with custom `actions`. The default set contains these actions:
- * ```js
- * { 'get': {method:'GET'},
- * 'save': {method:'POST'},
- * 'query': {method:'GET', isArray:true},
- * 'remove': {method:'DELETE'},
- * 'delete': {method:'DELETE'} };
- * ```
- *
- * Calling these methods invoke an {@link ng.$http} with the specified http method,
- * destination and parameters. When the data is returned from the server then the object is an
- * instance of the resource class. The actions `save`, `remove` and `delete` are available on it
- * as methods with the `$` prefix. This allows you to easily perform CRUD operations (create,
- * read, update, delete) on server-side data like this:
- * ```js
- * var User = $resource('/user/:userId', {userId:'@id'});
- * var user = User.get({userId:123}, function() {
- * user.abc = true;
- * user.$save();
- * });
- * ```
- *
- * It is important to realize that invoking a $resource object method immediately returns an
- * empty reference (object or array depending on `isArray`). Once the data is returned from the
- * server the existing reference is populated with the actual data. This is a useful trick since
- * usually the resource is assigned to a model which is then rendered by the view. Having an empty
- * object results in no rendering, once the data arrives from the server then the object is
- * populated with the data and the view automatically re-renders itself showing the new data. This
- * means that in most cases one never has to write a callback function for the action methods.
- *
- * The action methods on the class object or instance object can be invoked with the following
- * parameters:
- *
- * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
- * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
- * - non-GET instance actions: `instance.$action([parameters], [success], [error])`
- *
- *
- * Success callback is called with (value, responseHeaders) arguments, where the value is
- * the populated resource instance or collection object. The error callback is called
- * with (httpResponse) argument.
- *
- * Class actions return empty instance (with additional properties below).
- * Instance actions return promise of the action.
- *
- * The Resource instances and collection have these additional properties:
- *
- * - `$promise`: the {@link ng.$q promise} of the original server interaction that created this
- * instance or collection.
- *
- * On success, the promise is resolved with the same resource instance or collection object,
- * updated with data from server. This makes it easy to use in
- * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view
- * rendering until the resource(s) are loaded.
- *
- * On failure, the promise is resolved with the {@link ng.$http http response} object, without
- * the `resource` property.
- *
- * If an interceptor object was provided, the promise will instead be resolved with the value
- * returned by the interceptor.
- *
- * - `$resolved`: `true` after first server interaction is completed (either with success or
- * rejection), `false` before that. Knowing if the Resource has been resolved is useful in
- * data-binding.
- *
- * @example
- *
- * # Credit card resource
- *
- * ```js
- // Define CreditCard class
- var CreditCard = $resource('/user/:userId/card/:cardId',
- {userId:123, cardId:'@id'}, {
- charge: {method:'POST', params:{charge:true}}
- });
-
- // We can retrieve a collection from the server
- var cards = CreditCard.query(function() {
- // GET: /user/123/card
- // server returns: [ {id:456, number:'1234', name:'Smith'} ];
-
- var card = cards[0];
- // each item is an instance of CreditCard
- expect(card instanceof CreditCard).toEqual(true);
- card.name = "J. Smith";
- // non GET methods are mapped onto the instances
- card.$save();
- // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
- // server returns: {id:456, number:'1234', name: 'J. Smith'};
-
- // our custom method is mapped as well.
- card.$charge({amount:9.99});
- // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
- });
-
- // we can create an instance as well
- var newCard = new CreditCard({number:'0123'});
- newCard.name = "Mike Smith";
- newCard.$save();
- // POST: /user/123/card {number:'0123', name:'Mike Smith'}
- // server returns: {id:789, number:'0123', name: 'Mike Smith'};
- expect(newCard.id).toEqual(789);
- * ```
- *
- * The object returned from this function execution is a resource "class" which has "static" method
- * for each action in the definition.
- *
- * Calling these methods invoke `$http` on the `url` template with the given `method`, `params` and
- * `headers`.
- * When the data is returned from the server then the object is an instance of the resource type and
- * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
- * operations (create, read, update, delete) on server-side data.
-
- ```js
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123}, function(user) {
- user.abc = true;
- user.$save();
- });
- ```
- *
- * It's worth noting that the success callback for `get`, `query` and other methods gets passed
- * in the response that came from the server as well as $http header getter function, so one
- * could rewrite the above example and get access to http headers as:
- *
- ```js
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123}, function(u, getResponseHeaders){
- u.abc = true;
- u.$save(function(u, putResponseHeaders) {
- //u => saved user object
- //putResponseHeaders => $http header getter
- });
- });
- ```
- *
- * You can also access the raw `$http` promise via the `$promise` property on the object returned
- *
- ```
- var User = $resource('/user/:userId', {userId:'@id'});
- User.get({userId:123})
- .$promise.then(function(user) {
- $scope.user = user;
- });
- ```
-
- * # Creating a custom 'PUT' request
- * In this example we create a custom method on our resource to make a PUT request
- * ```js
- * var app = angular.module('app', ['ngResource', 'ngRoute']);
- *
- * // Some APIs expect a PUT request in the format URL/object/ID
- * // Here we are creating an 'update' method
- * app.factory('Notes', ['$resource', function($resource) {
- * return $resource('/notes/:id', null,
- * {
- * 'update': { method:'PUT' }
- * });
- * }]);
- *
- * // In our controller we get the ID from the URL using ngRoute and $routeParams
- * // We pass in $routeParams and our Notes factory along with $scope
- * app.controller('NotesCtrl', ['$scope', '$routeParams', 'Notes',
- function($scope, $routeParams, Notes) {
- * // First get a note object from the factory
- * var note = Notes.get({ id:$routeParams.id });
- * $id = note.id;
- *
- * // Now call update passing in the ID first then the object you are updating
- * Notes.update({ id:$id }, note);
- *
- * // This will PUT /notes/ID with the note object in the request payload
- * }]);
- * ```
- */
-angular.module('ngResource', ['ng']).
- provider('$resource', function() {
- var PROTOCOL_AND_DOMAIN_REGEX = /^https?:\/\/[^\/]*/;
- var provider = this;
-
- this.defaults = {
- // Strip slashes by default
- stripTrailingSlashes: true,
-
- // Default actions configuration
- actions: {
- 'get': {method: 'GET'},
- 'save': {method: 'POST'},
- 'query': {method: 'GET', isArray: true},
- 'remove': {method: 'DELETE'},
- 'delete': {method: 'DELETE'}
- }
- };
-
- this.$get = ['$http', '$q', function($http, $q) {
-
- var noop = angular.noop,
- forEach = angular.forEach,
- extend = angular.extend,
- copy = angular.copy,
- isFunction = angular.isFunction;
-
- /**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set
- * (pchar) allowed in path segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
- function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
- }
-
-
- /**
- * This method is intended for encoding *key* or *value* parts of query component. We need a
- * custom method because encodeURIComponent is too aggressive and encodes stuff that doesn't
- * have to be encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
- function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
- }
-
- function Route(template, defaults) {
- this.template = template;
- this.defaults = extend({}, provider.defaults, defaults);
- this.urlParams = {};
- }
-
- Route.prototype = {
- setUrlParams: function(config, params, actionUrl) {
- var self = this,
- url = actionUrl || self.template,
- val,
- encodedVal,
- protocolAndDomain = '';
-
- var urlParams = self.urlParams = {};
- forEach(url.split(/\W/), function(param) {
- if (param === 'hasOwnProperty') {
- throw $resourceMinErr('badname', "hasOwnProperty is not a valid parameter name.");
- }
- if (!(new RegExp("^\\d+$").test(param)) && param &&
- (new RegExp("(^|[^\\\\]):" + param + "(\\W|$)").test(url))) {
- urlParams[param] = true;
- }
- });
- url = url.replace(/\\:/g, ':');
- url = url.replace(PROTOCOL_AND_DOMAIN_REGEX, function(match) {
- protocolAndDomain = match;
- return '';
- });
-
- params = params || {};
- forEach(self.urlParams, function(_, urlParam) {
- val = params.hasOwnProperty(urlParam) ? params[urlParam] : self.defaults[urlParam];
- if (angular.isDefined(val) && val !== null) {
- encodedVal = encodeUriSegment(val);
- url = url.replace(new RegExp(":" + urlParam + "(\\W|$)", "g"), function(match, p1) {
- return encodedVal + p1;
- });
- } else {
- url = url.replace(new RegExp("(\/?):" + urlParam + "(\\W|$)", "g"), function(match,
- leadingSlashes, tail) {
- if (tail.charAt(0) == '/') {
- return tail;
- } else {
- return leadingSlashes + tail;
- }
- });
- }
- });
-
- // strip trailing slashes and set the url (unless this behavior is specifically disabled)
- if (self.defaults.stripTrailingSlashes) {
- url = url.replace(/\/+$/, '') || '/';
- }
-
- // then replace collapse `/.` if found in the last URL path segment before the query
- // E.g. `http://url.com/id./format?q=x` becomes `http://url.com/id.format?q=x`
- url = url.replace(/\/\.(?=\w+($|\?))/, '.');
- // replace escaped `/\.` with `/.`
- config.url = protocolAndDomain + url.replace(/\/\\\./, '/.');
-
-
- // set params - delegate param encoding to $http
- forEach(params, function(value, key) {
- if (!self.urlParams[key]) {
- config.params = config.params || {};
- config.params[key] = value;
- }
- });
- }
- };
-
-
- function resourceFactory(url, paramDefaults, actions, options) {
- var route = new Route(url, options);
-
- actions = extend({}, provider.defaults.actions, actions);
-
- function extractParams(data, actionParams) {
- var ids = {};
- actionParams = extend({}, paramDefaults, actionParams);
- forEach(actionParams, function(value, key) {
- if (isFunction(value)) { value = value(); }
- ids[key] = value && value.charAt && value.charAt(0) == '@' ?
- lookupDottedPath(data, value.substr(1)) : value;
- });
- return ids;
- }
-
- function defaultResponseInterceptor(response) {
- return response.resource;
- }
-
- function Resource(value) {
- shallowClearAndCopy(value || {}, this);
- }
-
- Resource.prototype.toJSON = function() {
- var data = extend({}, this);
- delete data.$promise;
- delete data.$resolved;
- return data;
- };
-
- forEach(actions, function(action, name) {
- var hasBody = /^(POST|PUT|PATCH)$/i.test(action.method);
-
- Resource[name] = function(a1, a2, a3, a4) {
- var params = {}, data, success, error;
-
- /* jshint -W086 */ /* (purposefully fall through case statements) */
- switch (arguments.length) {
- case 4:
- error = a4;
- success = a3;
- //fallthrough
- case 3:
- case 2:
- if (isFunction(a2)) {
- if (isFunction(a1)) {
- success = a1;
- error = a2;
- break;
- }
-
- success = a2;
- error = a3;
- //fallthrough
- } else {
- params = a1;
- data = a2;
- success = a3;
- break;
- }
- case 1:
- if (isFunction(a1)) success = a1;
- else if (hasBody) data = a1;
- else params = a1;
- break;
- case 0: break;
- default:
- throw $resourceMinErr('badargs',
- "Expected up to 4 arguments [params, data, success, error], got {0} arguments",
- arguments.length);
- }
- /* jshint +W086 */ /* (purposefully fall through case statements) */
-
- var isInstanceCall = this instanceof Resource;
- var value = isInstanceCall ? data : (action.isArray ? [] : new Resource(data));
- var httpConfig = {};
- var responseInterceptor = action.interceptor && action.interceptor.response ||
- defaultResponseInterceptor;
- var responseErrorInterceptor = action.interceptor && action.interceptor.responseError ||
- undefined;
-
- forEach(action, function(value, key) {
- switch (key) {
- default:
- httpConfig[key] = copy(value);
- break;
- case 'params':
- case 'isArray':
- case 'interceptor':
- break;
- case 'timeout':
- httpConfig[key] = value;
- break;
- }
- });
-
- if (hasBody) httpConfig.data = data;
- route.setUrlParams(httpConfig,
- extend({}, extractParams(data, action.params || {}), params),
- action.url);
-
- var promise = $http(httpConfig).then(function(response) {
- var data = response.data,
- promise = value.$promise;
-
- if (data) {
- // Need to convert action.isArray to boolean in case it is undefined
- // jshint -W018
- if (angular.isArray(data) !== (!!action.isArray)) {
- throw $resourceMinErr('badcfg',
- 'Error in resource configuration for action `{0}`. Expected response to ' +
- 'contain an {1} but got an {2} (Request: {3} {4})', name, action.isArray ? 'array' : 'object',
- angular.isArray(data) ? 'array' : 'object', httpConfig.method, httpConfig.url);
- }
- // jshint +W018
- if (action.isArray) {
- value.length = 0;
- forEach(data, function(item) {
- if (typeof item === "object") {
- value.push(new Resource(item));
- } else {
- // Valid JSON values may be string literals, and these should not be converted
- // into objects. These items will not have access to the Resource prototype
- // methods, but unfortunately there
- value.push(item);
- }
- });
- } else {
- shallowClearAndCopy(data, value);
- value.$promise = promise;
- }
- }
-
- value.$resolved = true;
-
- response.resource = value;
-
- return response;
- }, function(response) {
- value.$resolved = true;
-
- (error || noop)(response);
-
- return $q.reject(response);
- });
-
- promise = promise.then(
- function(response) {
- var value = responseInterceptor(response);
- (success || noop)(value, response.headers);
- return value;
- },
- responseErrorInterceptor);
-
- if (!isInstanceCall) {
- // we are creating instance / collection
- // - set the initial promise
- // - return the instance / collection
- value.$promise = promise;
- value.$resolved = false;
-
- return value;
- }
-
- // instance call
- return promise;
- };
-
-
- Resource.prototype['$' + name] = function(params, success, error) {
- if (isFunction(params)) {
- error = success; success = params; params = {};
- }
- var result = Resource[name].call(this, params, this, success, error);
- return result.$promise || result;
- };
- });
-
- Resource.bind = function(additionalParamDefaults) {
- return resourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
- };
-
- return Resource;
- }
-
- return resourceFactory;
- }];
- });
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js
deleted file mode 100644
index c3fb7aab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(I,f,C){'use strict';function D(t,e){e=e||{};f.forEach(e,function(f,k){delete e[k]});for(var k in t)!t.hasOwnProperty(k)||"$"===k.charAt(0)&&"$"===k.charAt(1)||(e[k]=t[k]);return e}var y=f.$$minErr("$resource"),B=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;f.module("ngResource",["ng"]).provider("$resource",function(){var t=/^https?:\/\/[^\/]*/,e=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}};
-this.$get=["$http","$q",function(k,F){function w(f,g){this.template=f;this.defaults=r({},e.defaults,g);this.urlParams={}}function z(l,g,s,h){function c(a,q){var c={};q=r({},g,q);u(q,function(b,q){x(b)&&(b=b());var m;if(b&&b.charAt&&"@"==b.charAt(0)){m=a;var d=b.substr(1);if(null==d||""===d||"hasOwnProperty"===d||!B.test("."+d))throw y("badmember",d);for(var d=d.split("."),n=0,g=d.length;n<g&&f.isDefined(m);n++){var e=d[n];m=null!==m?m[e]:C}}else m=b;c[q]=m});return c}function G(a){return a.resource}
-function d(a){D(a||{},this)}var t=new w(l,h);s=r({},e.defaults.actions,s);d.prototype.toJSON=function(){var a=r({},this);delete a.$promise;delete a.$resolved;return a};u(s,function(a,q){var g=/^(POST|PUT|PATCH)$/i.test(a.method);d[q]=function(b,A,m,e){var n={},h,l,s;switch(arguments.length){case 4:s=e,l=m;case 3:case 2:if(x(A)){if(x(b)){l=b;s=A;break}l=A;s=m}else{n=b;h=A;l=m;break}case 1:x(b)?l=b:g?h=b:n=b;break;case 0:break;default:throw y("badargs",arguments.length);}var w=this instanceof d,p=w?
-h:a.isArray?[]:new d(h),v={},z=a.interceptor&&a.interceptor.response||G,B=a.interceptor&&a.interceptor.responseError||C;u(a,function(a,b){switch(b){default:v[b]=H(a);break;case "params":case "isArray":case "interceptor":break;case "timeout":v[b]=a}});g&&(v.data=h);t.setUrlParams(v,r({},c(h,a.params||{}),n),a.url);n=k(v).then(function(b){var c=b.data,m=p.$promise;if(c){if(f.isArray(c)!==!!a.isArray)throw y("badcfg",q,a.isArray?"array":"object",f.isArray(c)?"array":"object",v.method,v.url);a.isArray?
-(p.length=0,u(c,function(b){"object"===typeof b?p.push(new d(b)):p.push(b)})):(D(c,p),p.$promise=m)}p.$resolved=!0;b.resource=p;return b},function(b){p.$resolved=!0;(s||E)(b);return F.reject(b)});n=n.then(function(b){var a=z(b);(l||E)(a,b.headers);return a},B);return w?n:(p.$promise=n,p.$resolved=!1,p)};d.prototype["$"+q]=function(b,a,c){x(b)&&(c=a,a=b,b={});b=d[q].call(this,b,this,a,c);return b.$promise||b}});d.bind=function(a){return z(l,r({},g,a),s)};return d}var E=f.noop,u=f.forEach,r=f.extend,
-H=f.copy,x=f.isFunction;w.prototype={setUrlParams:function(l,g,e){var h=this,c=e||h.template,k,d,r="",a=h.urlParams={};u(c.split(/\W/),function(d){if("hasOwnProperty"===d)throw y("badname");!/^\d+$/.test(d)&&d&&(new RegExp("(^|[^\\\\]):"+d+"(\\W|$)")).test(c)&&(a[d]=!0)});c=c.replace(/\\:/g,":");c=c.replace(t,function(a){r=a;return""});g=g||{};u(h.urlParams,function(a,e){k=g.hasOwnProperty(e)?g[e]:h.defaults[e];f.isDefined(k)&&null!==k?(d=encodeURIComponent(k).replace(/%40/gi,"@").replace(/%3A/gi,
-":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"%20").replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(new RegExp(":"+e+"(\\W|$)","g"),function(b,a){return d+a})):c=c.replace(new RegExp("(/?):"+e+"(\\W|$)","g"),function(b,a,c){return"/"==c.charAt(0)?c:a+c})});h.defaults.stripTrailingSlashes&&(c=c.replace(/\/+$/,"")||"/");c=c.replace(/\/\.(?=\w+($|\?))/,".");l.url=r+c.replace(/\/\\\./,"/.");u(g,function(a,c){h.urlParams[c]||(l.params=l.params||{},l.params[c]=
-a)})}};return z}]})})(window,window.angular);
-//# sourceMappingURL=angular-resource.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js.map
deleted file mode 100644
index c2302084..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-resource.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-resource.min.js",
-"lineCount":13,
-"mappings":"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",
-"sources":["angular-resource.js"],
-"names":["window","angular","undefined","shallowClearAndCopy","src","dst","forEach","value","key","hasOwnProperty","charAt","$resourceMinErr","$$minErr","MEMBER_NAME_REGEX","module","provider","PROTOCOL_AND_DOMAIN_REGEX","defaults","stripTrailingSlashes","actions","method","isArray","$get","$http","$q","Route","template","extend","urlParams","resourceFactory","url","paramDefaults","options","extractParams","data","actionParams","ids","isFunction","path","test","keys","split","i","ii","length","isDefined","obj","defaultResponseInterceptor","response","resource","Resource","route","prototype","toJSON","Resource.prototype.toJSON","$promise","$resolved","action","name","hasBody","a1","a2","a3","a4","params","success","error","arguments","isInstanceCall","httpConfig","responseInterceptor","interceptor","responseErrorInterceptor","responseError","copy","setUrlParams","promise","then","item","push","noop","reject","headers","result","call","bind","Resource.bind","additionalParamDefaults","config","actionUrl","self","val","encodedVal","protocolAndDomain","param","RegExp","replace","match","_","urlParam","encodeURIComponent","p1","leadingSlashes","tail"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.js
deleted file mode 100644
index 86ab235d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.js
+++ /dev/null
@@ -1,991 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngRoute
- * @description
- *
- * # ngRoute
- *
- * The `ngRoute` module provides routing and deeplinking services and directives for angular apps.
- *
- * ## Example
- * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
- *
- *
- * <div doc-module-components="ngRoute"></div>
- */
- /* global -ngRouteModule */
-var ngRouteModule = angular.module('ngRoute', ['ng']).
- provider('$route', $RouteProvider),
- $routeMinErr = angular.$$minErr('ngRoute');
-
-/**
- * @ngdoc provider
- * @name $routeProvider
- *
- * @description
- *
- * Used for configuring routes.
- *
- * ## Example
- * See {@link ngRoute.$route#example $route} for an example of configuring and using `ngRoute`.
- *
- * ## Dependencies
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- */
-function $RouteProvider() {
- function inherit(parent, extra) {
- return angular.extend(Object.create(parent), extra);
- }
-
- var routes = {};
-
- /**
- * @ngdoc method
- * @name $routeProvider#when
- *
- * @param {string} path Route path (matched against `$location.path`). If `$location.path`
- * contains redundant trailing slash or is missing one, the route will still match and the
- * `$location.path` will be updated to add or drop the trailing slash to exactly match the
- * route definition.
- *
- * * `path` can contain named groups starting with a colon: e.g. `:name`. All characters up
- * to the next slash are matched and stored in `$routeParams` under the given `name`
- * when the route matches.
- * * `path` can contain named groups starting with a colon and ending with a star:
- * e.g.`:name*`. All characters are eagerly stored in `$routeParams` under the given `name`
- * when the route matches.
- * * `path` can contain optional named groups with a question mark: e.g.`:name?`.
- *
- * For example, routes like `/color/:color/largecode/:largecode*\/edit` will match
- * `/color/brown/largecode/code/with/slashes/edit` and extract:
- *
- * * `color: brown`
- * * `largecode: code/with/slashes`.
- *
- *
- * @param {Object} route Mapping information to be assigned to `$route.current` on route
- * match.
- *
- * Object properties:
- *
- * - `controller` – `{(string|function()=}` – Controller fn that should be associated with
- * newly created scope or the name of a {@link angular.Module#controller registered
- * controller} if passed as a string.
- * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
- * If present, the controller will be published to scope under the `controllerAs` name.
- * - `template` – `{string=|function()=}` – html template as a string or a function that
- * returns an html template as a string which should be used by {@link
- * ngRoute.directive:ngView ngView} or {@link ng.directive:ngInclude ngInclude} directives.
- * This property takes precedence over `templateUrl`.
- *
- * If `template` is a function, it will be called with the following parameters:
- *
- * - `{Array.<Object>}` - route parameters extracted from the current
- * `$location.path()` by applying the current route
- *
- * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
- * template that should be used by {@link ngRoute.directive:ngView ngView}.
- *
- * If `templateUrl` is a function, it will be called with the following parameters:
- *
- * - `{Array.<Object>}` - route parameters extracted from the current
- * `$location.path()` by applying the current route
- *
- * - `resolve` - `{Object.<string, function>=}` - An optional map of dependencies which should
- * be injected into the controller. If any of these dependencies are promises, the router
- * will wait for them all to be resolved or one to be rejected before the controller is
- * instantiated.
- * If all the promises are resolved successfully, the values of the resolved promises are
- * injected and {@link ngRoute.$route#$routeChangeSuccess $routeChangeSuccess} event is
- * fired. If any of the promises are rejected the
- * {@link ngRoute.$route#$routeChangeError $routeChangeError} event is fired. The map object
- * is:
- *
- * - `key` – `{string}`: a name of a dependency to be injected into the controller.
- * - `factory` - `{string|function}`: If `string` then it is an alias for a service.
- * Otherwise if function, then it is {@link auto.$injector#invoke injected}
- * and the return value is treated as the dependency. If the result is a promise, it is
- * resolved before its value is injected into the controller. Be aware that
- * `ngRoute.$routeParams` will still refer to the previous route within these resolve
- * functions. Use `$route.current.params` to access the new route parameters, instead.
- *
- * - `redirectTo` – {(string|function())=} – value to update
- * {@link ng.$location $location} path with and trigger route redirection.
- *
- * If `redirectTo` is a function, it will be called with the following parameters:
- *
- * - `{Object.<string>}` - route parameters extracted from the current
- * `$location.path()` by applying the current route templateUrl.
- * - `{string}` - current `$location.path()`
- * - `{Object}` - current `$location.search()`
- *
- * The custom `redirectTo` function is expected to return a string which will be used
- * to update `$location.path()` and `$location.search()`.
- *
- * - `[reloadOnSearch=true]` - {boolean=} - reload route when only `$location.search()`
- * or `$location.hash()` changes.
- *
- * If the option is set to `false` and url in the browser changes, then
- * `$routeUpdate` event is broadcasted on the root scope.
- *
- * - `[caseInsensitiveMatch=false]` - {boolean=} - match routes without being case sensitive
- *
- * If the option is set to `true`, then the particular route can be matched without being
- * case sensitive
- *
- * @returns {Object} self
- *
- * @description
- * Adds a new route definition to the `$route` service.
- */
- this.when = function(path, route) {
- //copy original route object to preserve params inherited from proto chain
- var routeCopy = angular.copy(route);
- if (angular.isUndefined(routeCopy.reloadOnSearch)) {
- routeCopy.reloadOnSearch = true;
- }
- if (angular.isUndefined(routeCopy.caseInsensitiveMatch)) {
- routeCopy.caseInsensitiveMatch = this.caseInsensitiveMatch;
- }
- routes[path] = angular.extend(
- routeCopy,
- path && pathRegExp(path, routeCopy)
- );
-
- // create redirection for trailing slashes
- if (path) {
- var redirectPath = (path[path.length - 1] == '/')
- ? path.substr(0, path.length - 1)
- : path + '/';
-
- routes[redirectPath] = angular.extend(
- {redirectTo: path},
- pathRegExp(redirectPath, routeCopy)
- );
- }
-
- return this;
- };
-
- /**
- * @ngdoc property
- * @name $routeProvider#caseInsensitiveMatch
- * @description
- *
- * A boolean property indicating if routes defined
- * using this provider should be matched using a case insensitive
- * algorithm. Defaults to `false`.
- */
- this.caseInsensitiveMatch = false;
-
- /**
- * @param path {string} path
- * @param opts {Object} options
- * @return {?Object}
- *
- * @description
- * Normalizes the given path, returning a regular expression
- * and the original path.
- *
- * Inspired by pathRexp in visionmedia/express/lib/utils.js.
- */
- function pathRegExp(path, opts) {
- var insensitive = opts.caseInsensitiveMatch,
- ret = {
- originalPath: path,
- regexp: path
- },
- keys = ret.keys = [];
-
- path = path
- .replace(/([().])/g, '\\$1')
- .replace(/(\/)?:(\w+)([\?\*])?/g, function(_, slash, key, option) {
- var optional = option === '?' ? option : null;
- var star = option === '*' ? option : null;
- keys.push({ name: key, optional: !!optional });
- slash = slash || '';
- return ''
- + (optional ? '' : slash)
- + '(?:'
- + (optional ? slash : '')
- + (star && '(.+?)' || '([^/]+)')
- + (optional || '')
- + ')'
- + (optional || '');
- })
- .replace(/([\/$\*])/g, '\\$1');
-
- ret.regexp = new RegExp('^' + path + '$', insensitive ? 'i' : '');
- return ret;
- }
-
- /**
- * @ngdoc method
- * @name $routeProvider#otherwise
- *
- * @description
- * Sets route definition that will be used on route change when no other route definition
- * is matched.
- *
- * @param {Object|string} params Mapping information to be assigned to `$route.current`.
- * If called with a string, the value maps to `redirectTo`.
- * @returns {Object} self
- */
- this.otherwise = function(params) {
- if (typeof params === 'string') {
- params = {redirectTo: params};
- }
- this.when(null, params);
- return this;
- };
-
-
- this.$get = ['$rootScope',
- '$location',
- '$routeParams',
- '$q',
- '$injector',
- '$templateRequest',
- '$sce',
- function($rootScope, $location, $routeParams, $q, $injector, $templateRequest, $sce) {
-
- /**
- * @ngdoc service
- * @name $route
- * @requires $location
- * @requires $routeParams
- *
- * @property {Object} current Reference to the current route definition.
- * The route definition contains:
- *
- * - `controller`: The controller constructor as define in route definition.
- * - `locals`: A map of locals which is used by {@link ng.$controller $controller} service for
- * controller instantiation. The `locals` contain
- * the resolved values of the `resolve` map. Additionally the `locals` also contain:
- *
- * - `$scope` - The current route scope.
- * - `$template` - The current route template HTML.
- *
- * @property {Object} routes Object with all route configuration Objects as its properties.
- *
- * @description
- * `$route` is used for deep-linking URLs to controllers and views (HTML partials).
- * It watches `$location.url()` and tries to map the path to an existing route definition.
- *
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- *
- * You can define routes through {@link ngRoute.$routeProvider $routeProvider}'s API.
- *
- * The `$route` service is typically used in conjunction with the
- * {@link ngRoute.directive:ngView `ngView`} directive and the
- * {@link ngRoute.$routeParams `$routeParams`} service.
- *
- * @example
- * This example shows how changing the URL hash causes the `$route` to match a route against the
- * URL, and the `ngView` pulls in the partial.
- *
- * <example name="$route-service" module="ngRouteExample"
- * deps="angular-route.js" fixBase="true">
- * <file name="index.html">
- * <div ng-controller="MainController">
- * Choose:
- * <a href="Book/Moby">Moby</a> |
- * <a href="Book/Moby/ch/1">Moby: Ch1</a> |
- * <a href="Book/Gatsby">Gatsby</a> |
- * <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
- * <a href="Book/Scarlet">Scarlet Letter</a><br/>
- *
- * <div ng-view></div>
- *
- * <hr />
- *
- * <pre>$location.path() = {{$location.path()}}</pre>
- * <pre>$route.current.templateUrl = {{$route.current.templateUrl}}</pre>
- * <pre>$route.current.params = {{$route.current.params}}</pre>
- * <pre>$route.current.scope.name = {{$route.current.scope.name}}</pre>
- * <pre>$routeParams = {{$routeParams}}</pre>
- * </div>
- * </file>
- *
- * <file name="book.html">
- * controller: {{name}}<br />
- * Book Id: {{params.bookId}}<br />
- * </file>
- *
- * <file name="chapter.html">
- * controller: {{name}}<br />
- * Book Id: {{params.bookId}}<br />
- * Chapter Id: {{params.chapterId}}
- * </file>
- *
- * <file name="script.js">
- * angular.module('ngRouteExample', ['ngRoute'])
- *
- * .controller('MainController', function($scope, $route, $routeParams, $location) {
- * $scope.$route = $route;
- * $scope.$location = $location;
- * $scope.$routeParams = $routeParams;
- * })
- *
- * .controller('BookController', function($scope, $routeParams) {
- * $scope.name = "BookController";
- * $scope.params = $routeParams;
- * })
- *
- * .controller('ChapterController', function($scope, $routeParams) {
- * $scope.name = "ChapterController";
- * $scope.params = $routeParams;
- * })
- *
- * .config(function($routeProvider, $locationProvider) {
- * $routeProvider
- * .when('/Book/:bookId', {
- * templateUrl: 'book.html',
- * controller: 'BookController',
- * resolve: {
- * // I will cause a 1 second delay
- * delay: function($q, $timeout) {
- * var delay = $q.defer();
- * $timeout(delay.resolve, 1000);
- * return delay.promise;
- * }
- * }
- * })
- * .when('/Book/:bookId/ch/:chapterId', {
- * templateUrl: 'chapter.html',
- * controller: 'ChapterController'
- * });
- *
- * // configure html5 to get links working on jsfiddle
- * $locationProvider.html5Mode(true);
- * });
- *
- * </file>
- *
- * <file name="protractor.js" type="protractor">
- * it('should load and compile correct template', function() {
- * element(by.linkText('Moby: Ch1')).click();
- * var content = element(by.css('[ng-view]')).getText();
- * expect(content).toMatch(/controller\: ChapterController/);
- * expect(content).toMatch(/Book Id\: Moby/);
- * expect(content).toMatch(/Chapter Id\: 1/);
- *
- * element(by.partialLinkText('Scarlet')).click();
- *
- * content = element(by.css('[ng-view]')).getText();
- * expect(content).toMatch(/controller\: BookController/);
- * expect(content).toMatch(/Book Id\: Scarlet/);
- * });
- * </file>
- * </example>
- */
-
- /**
- * @ngdoc event
- * @name $route#$routeChangeStart
- * @eventType broadcast on root scope
- * @description
- * Broadcasted before a route change. At this point the route services starts
- * resolving all of the dependencies needed for the route change to occur.
- * Typically this involves fetching the view template as well as any dependencies
- * defined in `resolve` route property. Once all of the dependencies are resolved
- * `$routeChangeSuccess` is fired.
- *
- * The route change (and the `$location` change that triggered it) can be prevented
- * by calling `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on}
- * for more details about event object.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {Route} next Future route information.
- * @param {Route} current Current route information.
- */
-
- /**
- * @ngdoc event
- * @name $route#$routeChangeSuccess
- * @eventType broadcast on root scope
- * @description
- * Broadcasted after a route change has happened successfully.
- * The `resolve` dependencies are now available in the `current.locals` property.
- *
- * {@link ngRoute.directive:ngView ngView} listens for the directive
- * to instantiate the controller and render the view.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {Route} current Current route information.
- * @param {Route|Undefined} previous Previous route information, or undefined if current is
- * first route entered.
- */
-
- /**
- * @ngdoc event
- * @name $route#$routeChangeError
- * @eventType broadcast on root scope
- * @description
- * Broadcasted if any of the resolve promises are rejected.
- *
- * @param {Object} angularEvent Synthetic event object
- * @param {Route} current Current route information.
- * @param {Route} previous Previous route information.
- * @param {Route} rejection Rejection of the promise. Usually the error of the failed promise.
- */
-
- /**
- * @ngdoc event
- * @name $route#$routeUpdate
- * @eventType broadcast on root scope
- * @description
- * The `reloadOnSearch` property has been set to false, and we are reusing the same
- * instance of the Controller.
- *
- * @param {Object} angularEvent Synthetic event object
- * @param {Route} current Current/previous route information.
- */
-
- var forceReload = false,
- preparedRoute,
- preparedRouteIsUpdateOnly,
- $route = {
- routes: routes,
-
- /**
- * @ngdoc method
- * @name $route#reload
- *
- * @description
- * Causes `$route` service to reload the current route even if
- * {@link ng.$location $location} hasn't changed.
- *
- * As a result of that, {@link ngRoute.directive:ngView ngView}
- * creates new scope and reinstantiates the controller.
- */
- reload: function() {
- forceReload = true;
- $rootScope.$evalAsync(function() {
- // Don't support cancellation of a reload for now...
- prepareRoute();
- commitRoute();
- });
- },
-
- /**
- * @ngdoc method
- * @name $route#updateParams
- *
- * @description
- * Causes `$route` service to update the current URL, replacing
- * current route parameters with those specified in `newParams`.
- * Provided property names that match the route's path segment
- * definitions will be interpolated into the location's path, while
- * remaining properties will be treated as query params.
- *
- * @param {!Object<string, string>} newParams mapping of URL parameter names to values
- */
- updateParams: function(newParams) {
- if (this.current && this.current.$$route) {
- newParams = angular.extend({}, this.current.params, newParams);
- $location.path(interpolate(this.current.$$route.originalPath, newParams));
- // interpolate modifies newParams, only query params are left
- $location.search(newParams);
- } else {
- throw $routeMinErr('norout', 'Tried updating route when with no current route');
- }
- }
- };
-
- $rootScope.$on('$locationChangeStart', prepareRoute);
- $rootScope.$on('$locationChangeSuccess', commitRoute);
-
- return $route;
-
- /////////////////////////////////////////////////////
-
- /**
- * @param on {string} current url
- * @param route {Object} route regexp to match the url against
- * @return {?Object}
- *
- * @description
- * Check if the route matches the current url.
- *
- * Inspired by match in
- * visionmedia/express/lib/router/router.js.
- */
- function switchRouteMatcher(on, route) {
- var keys = route.keys,
- params = {};
-
- if (!route.regexp) return null;
-
- var m = route.regexp.exec(on);
- if (!m) return null;
-
- for (var i = 1, len = m.length; i < len; ++i) {
- var key = keys[i - 1];
-
- var val = m[i];
-
- if (key && val) {
- params[key.name] = val;
- }
- }
- return params;
- }
-
- function prepareRoute($locationEvent) {
- var lastRoute = $route.current;
-
- preparedRoute = parseRoute();
- preparedRouteIsUpdateOnly = preparedRoute && lastRoute && preparedRoute.$$route === lastRoute.$$route
- && angular.equals(preparedRoute.pathParams, lastRoute.pathParams)
- && !preparedRoute.reloadOnSearch && !forceReload;
-
- if (!preparedRouteIsUpdateOnly && (lastRoute || preparedRoute)) {
- if ($rootScope.$broadcast('$routeChangeStart', preparedRoute, lastRoute).defaultPrevented) {
- if ($locationEvent) {
- $locationEvent.preventDefault();
- }
- }
- }
- }
-
- function commitRoute() {
- var lastRoute = $route.current;
- var nextRoute = preparedRoute;
-
- if (preparedRouteIsUpdateOnly) {
- lastRoute.params = nextRoute.params;
- angular.copy(lastRoute.params, $routeParams);
- $rootScope.$broadcast('$routeUpdate', lastRoute);
- } else if (nextRoute || lastRoute) {
- forceReload = false;
- $route.current = nextRoute;
- if (nextRoute) {
- if (nextRoute.redirectTo) {
- if (angular.isString(nextRoute.redirectTo)) {
- $location.path(interpolate(nextRoute.redirectTo, nextRoute.params)).search(nextRoute.params)
- .replace();
- } else {
- $location.url(nextRoute.redirectTo(nextRoute.pathParams, $location.path(), $location.search()))
- .replace();
- }
- }
- }
-
- $q.when(nextRoute).
- then(function() {
- if (nextRoute) {
- var locals = angular.extend({}, nextRoute.resolve),
- template, templateUrl;
-
- angular.forEach(locals, function(value, key) {
- locals[key] = angular.isString(value) ?
- $injector.get(value) : $injector.invoke(value, null, null, key);
- });
-
- if (angular.isDefined(template = nextRoute.template)) {
- if (angular.isFunction(template)) {
- template = template(nextRoute.params);
- }
- } else if (angular.isDefined(templateUrl = nextRoute.templateUrl)) {
- if (angular.isFunction(templateUrl)) {
- templateUrl = templateUrl(nextRoute.params);
- }
- if (angular.isDefined(templateUrl)) {
- nextRoute.loadedTemplateUrl = $sce.valueOf(templateUrl);
- template = $templateRequest(templateUrl);
- }
- }
- if (angular.isDefined(template)) {
- locals['$template'] = template;
- }
- return $q.all(locals);
- }
- }).
- then(function(locals) {
- // after route change
- if (nextRoute == $route.current) {
- if (nextRoute) {
- nextRoute.locals = locals;
- angular.copy(nextRoute.params, $routeParams);
- }
- $rootScope.$broadcast('$routeChangeSuccess', nextRoute, lastRoute);
- }
- }, function(error) {
- if (nextRoute == $route.current) {
- $rootScope.$broadcast('$routeChangeError', nextRoute, lastRoute, error);
- }
- });
- }
- }
-
-
- /**
- * @returns {Object} the current active route, by matching it against the URL
- */
- function parseRoute() {
- // Match a route
- var params, match;
- angular.forEach(routes, function(route, path) {
- if (!match && (params = switchRouteMatcher($location.path(), route))) {
- match = inherit(route, {
- params: angular.extend({}, $location.search(), params),
- pathParams: params});
- match.$$route = route;
- }
- });
- // No route matched; fallback to "otherwise" route
- return match || routes[null] && inherit(routes[null], {params: {}, pathParams:{}});
- }
-
- /**
- * @returns {string} interpolation of the redirect path with the parameters
- */
- function interpolate(string, params) {
- var result = [];
- angular.forEach((string || '').split(':'), function(segment, i) {
- if (i === 0) {
- result.push(segment);
- } else {
- var segmentMatch = segment.match(/(\w+)(?:[?*])?(.*)/);
- var key = segmentMatch[1];
- result.push(params[key]);
- result.push(segmentMatch[2] || '');
- delete params[key];
- }
- });
- return result.join('');
- }
- }];
-}
-
-ngRouteModule.provider('$routeParams', $RouteParamsProvider);
-
-
-/**
- * @ngdoc service
- * @name $routeParams
- * @requires $route
- *
- * @description
- * The `$routeParams` service allows you to retrieve the current set of route parameters.
- *
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- *
- * The route parameters are a combination of {@link ng.$location `$location`}'s
- * {@link ng.$location#search `search()`} and {@link ng.$location#path `path()`}.
- * The `path` parameters are extracted when the {@link ngRoute.$route `$route`} path is matched.
- *
- * In case of parameter name collision, `path` params take precedence over `search` params.
- *
- * The service guarantees that the identity of the `$routeParams` object will remain unchanged
- * (but its properties will likely change) even when a route change occurs.
- *
- * Note that the `$routeParams` are only updated *after* a route change completes successfully.
- * This means that you cannot rely on `$routeParams` being correct in route resolve functions.
- * Instead you can use `$route.current.params` to access the new route's parameters.
- *
- * @example
- * ```js
- * // Given:
- * // URL: http://server.com/index.html#/Chapter/1/Section/2?search=moby
- * // Route: /Chapter/:chapterId/Section/:sectionId
- * //
- * // Then
- * $routeParams ==> {chapterId:'1', sectionId:'2', search:'moby'}
- * ```
- */
-function $RouteParamsProvider() {
- this.$get = function() { return {}; };
-}
-
-ngRouteModule.directive('ngView', ngViewFactory);
-ngRouteModule.directive('ngView', ngViewFillContentFactory);
-
-
-/**
- * @ngdoc directive
- * @name ngView
- * @restrict ECA
- *
- * @description
- * # Overview
- * `ngView` is a directive that complements the {@link ngRoute.$route $route} service by
- * including the rendered template of the current route into the main layout (`index.html`) file.
- * Every time the current route changes, the included view changes with it according to the
- * configuration of the `$route` service.
- *
- * Requires the {@link ngRoute `ngRoute`} module to be installed.
- *
- * @animations
- * enter - animation is used to bring new content into the browser.
- * leave - animation is used to animate existing content away.
- *
- * The enter and leave animation occur concurrently.
- *
- * @scope
- * @priority 400
- * @param {string=} onload Expression to evaluate whenever the view updates.
- *
- * @param {string=} autoscroll Whether `ngView` should call {@link ng.$anchorScroll
- * $anchorScroll} to scroll the viewport after the view is updated.
- *
- * - If the attribute is not set, disable scrolling.
- * - If the attribute is set without value, enable scrolling.
- * - Otherwise enable scrolling only if the `autoscroll` attribute value evaluated
- * as an expression yields a truthy value.
- * @example
- <example name="ngView-directive" module="ngViewExample"
- deps="angular-route.js;angular-animate.js"
- animations="true" fixBase="true">
- <file name="index.html">
- <div ng-controller="MainCtrl as main">
- Choose:
- <a href="Book/Moby">Moby</a> |
- <a href="Book/Moby/ch/1">Moby: Ch1</a> |
- <a href="Book/Gatsby">Gatsby</a> |
- <a href="Book/Gatsby/ch/4?key=value">Gatsby: Ch4</a> |
- <a href="Book/Scarlet">Scarlet Letter</a><br/>
-
- <div class="view-animate-container">
- <div ng-view class="view-animate"></div>
- </div>
- <hr />
-
- <pre>$location.path() = {{main.$location.path()}}</pre>
- <pre>$route.current.templateUrl = {{main.$route.current.templateUrl}}</pre>
- <pre>$route.current.params = {{main.$route.current.params}}</pre>
- <pre>$routeParams = {{main.$routeParams}}</pre>
- </div>
- </file>
-
- <file name="book.html">
- <div>
- controller: {{book.name}}<br />
- Book Id: {{book.params.bookId}}<br />
- </div>
- </file>
-
- <file name="chapter.html">
- <div>
- controller: {{chapter.name}}<br />
- Book Id: {{chapter.params.bookId}}<br />
- Chapter Id: {{chapter.params.chapterId}}
- </div>
- </file>
-
- <file name="animations.css">
- .view-animate-container {
- position:relative;
- height:100px!important;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .view-animate {
- padding:10px;
- }
-
- .view-animate.ng-enter, .view-animate.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 1.5s;
-
- display:block;
- width:100%;
- border-left:1px solid black;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- padding:10px;
- }
-
- .view-animate.ng-enter {
- left:100%;
- }
- .view-animate.ng-enter.ng-enter-active {
- left:0;
- }
- .view-animate.ng-leave.ng-leave-active {
- left:-100%;
- }
- </file>
-
- <file name="script.js">
- angular.module('ngViewExample', ['ngRoute', 'ngAnimate'])
- .config(['$routeProvider', '$locationProvider',
- function($routeProvider, $locationProvider) {
- $routeProvider
- .when('/Book/:bookId', {
- templateUrl: 'book.html',
- controller: 'BookCtrl',
- controllerAs: 'book'
- })
- .when('/Book/:bookId/ch/:chapterId', {
- templateUrl: 'chapter.html',
- controller: 'ChapterCtrl',
- controllerAs: 'chapter'
- });
-
- $locationProvider.html5Mode(true);
- }])
- .controller('MainCtrl', ['$route', '$routeParams', '$location',
- function($route, $routeParams, $location) {
- this.$route = $route;
- this.$location = $location;
- this.$routeParams = $routeParams;
- }])
- .controller('BookCtrl', ['$routeParams', function($routeParams) {
- this.name = "BookCtrl";
- this.params = $routeParams;
- }])
- .controller('ChapterCtrl', ['$routeParams', function($routeParams) {
- this.name = "ChapterCtrl";
- this.params = $routeParams;
- }]);
-
- </file>
-
- <file name="protractor.js" type="protractor">
- it('should load and compile correct template', function() {
- element(by.linkText('Moby: Ch1')).click();
- var content = element(by.css('[ng-view]')).getText();
- expect(content).toMatch(/controller\: ChapterCtrl/);
- expect(content).toMatch(/Book Id\: Moby/);
- expect(content).toMatch(/Chapter Id\: 1/);
-
- element(by.partialLinkText('Scarlet')).click();
-
- content = element(by.css('[ng-view]')).getText();
- expect(content).toMatch(/controller\: BookCtrl/);
- expect(content).toMatch(/Book Id\: Scarlet/);
- });
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc event
- * @name ngView#$viewContentLoaded
- * @eventType emit on the current ngView scope
- * @description
- * Emitted every time the ngView content is reloaded.
- */
-ngViewFactory.$inject = ['$route', '$anchorScroll', '$animate'];
-function ngViewFactory($route, $anchorScroll, $animate) {
- return {
- restrict: 'ECA',
- terminal: true,
- priority: 400,
- transclude: 'element',
- link: function(scope, $element, attr, ctrl, $transclude) {
- var currentScope,
- currentElement,
- previousLeaveAnimation,
- autoScrollExp = attr.autoscroll,
- onloadExp = attr.onload || '';
-
- scope.$on('$routeChangeSuccess', update);
- update();
-
- function cleanupLastView() {
- if (previousLeaveAnimation) {
- $animate.cancel(previousLeaveAnimation);
- previousLeaveAnimation = null;
- }
-
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
- if (currentElement) {
- previousLeaveAnimation = $animate.leave(currentElement);
- previousLeaveAnimation.then(function() {
- previousLeaveAnimation = null;
- });
- currentElement = null;
- }
- }
-
- function update() {
- var locals = $route.current && $route.current.locals,
- template = locals && locals.$template;
-
- if (angular.isDefined(template)) {
- var newScope = scope.$new();
- var current = $route.current;
-
- // Note: This will also link all children of ng-view that were contained in the original
- // html. If that content contains controllers, ... they could pollute/change the scope.
- // However, using ng-view on an element with additional content does not make sense...
- // Note: We can't remove them in the cloneAttchFn of $transclude as that
- // function is called before linking the content, which would apply child
- // directives to non existing elements.
- var clone = $transclude(newScope, function(clone) {
- $animate.enter(clone, null, currentElement || $element).then(function onNgViewEnter() {
- if (angular.isDefined(autoScrollExp)
- && (!autoScrollExp || scope.$eval(autoScrollExp))) {
- $anchorScroll();
- }
- });
- cleanupLastView();
- });
-
- currentElement = clone;
- currentScope = current.scope = newScope;
- currentScope.$emit('$viewContentLoaded');
- currentScope.$eval(onloadExp);
- } else {
- cleanupLastView();
- }
- }
- }
- };
-}
-
-// This directive is called during the $transclude call of the first `ngView` directive.
-// It will replace and compile the content of the element with the loaded template.
-// We need this directive so that the element content is already filled when
-// the link function of another directive on the same element as ngView
-// is called.
-ngViewFillContentFactory.$inject = ['$compile', '$controller', '$route'];
-function ngViewFillContentFactory($compile, $controller, $route) {
- return {
- restrict: 'ECA',
- priority: -400,
- link: function(scope, $element) {
- var current = $route.current,
- locals = current.locals;
-
- $element.html(locals.$template);
-
- var link = $compile($element.contents());
-
- if (current.controller) {
- locals.$scope = scope;
- var controller = $controller(current.controller, locals);
- if (current.controllerAs) {
- scope[current.controllerAs] = controller;
- }
- $element.data('$ngControllerController', controller);
- $element.children().data('$ngControllerController', controller);
- }
-
- link(scope);
- }
- };
-}
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js
deleted file mode 100644
index 3c5fd343..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(p,c,C){'use strict';function v(r,h,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(a,f,b,d,y){function z(){k&&(g.cancel(k),k=null);l&&(l.$destroy(),l=null);m&&(k=g.leave(m),k.then(function(){k=null}),m=null)}function x(){var b=r.current&&r.current.locals;if(c.isDefined(b&&b.$template)){var b=a.$new(),d=r.current;m=y(b,function(b){g.enter(b,null,m||f).then(function(){!c.isDefined(t)||t&&!a.$eval(t)||h()});z()});l=d.scope=b;l.$emit("$viewContentLoaded");
-l.$eval(w)}else z()}var l,m,k,t=b.autoscroll,w=b.onload||"";a.$on("$routeChangeSuccess",x);x()}}}function A(c,h,g){return{restrict:"ECA",priority:-400,link:function(a,f){var b=g.current,d=b.locals;f.html(d.$template);var y=c(f.contents());b.controller&&(d.$scope=a,d=h(b.controller,d),b.controllerAs&&(a[b.controllerAs]=d),f.data("$ngControllerController",d),f.children().data("$ngControllerController",d));y(a)}}}p=c.module("ngRoute",["ng"]).provider("$route",function(){function r(a,f){return c.extend(Object.create(a),
-f)}function h(a,c){var b=c.caseInsensitiveMatch,d={originalPath:a,regexp:a},g=d.keys=[];a=a.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(a,c,b,d){a="?"===d?d:null;d="*"===d?d:null;g.push({name:b,optional:!!a});c=c||"";return""+(a?"":c)+"(?:"+(a?c:"")+(d&&"(.+?)"||"([^/]+)")+(a||"")+")"+(a||"")}).replace(/([\/$\*])/g,"\\$1");d.regexp=new RegExp("^"+a+"$",b?"i":"");return d}var g={};this.when=function(a,f){var b=c.copy(f);c.isUndefined(b.reloadOnSearch)&&(b.reloadOnSearch=!0);
-c.isUndefined(b.caseInsensitiveMatch)&&(b.caseInsensitiveMatch=this.caseInsensitiveMatch);g[a]=c.extend(b,a&&h(a,b));if(a){var d="/"==a[a.length-1]?a.substr(0,a.length-1):a+"/";g[d]=c.extend({redirectTo:a},h(d,b))}return this};this.caseInsensitiveMatch=!1;this.otherwise=function(a){"string"===typeof a&&(a={redirectTo:a});this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(a,f,b,d,h,p,x){function l(b){var e=s.current;
-(v=(n=k())&&e&&n.$$route===e.$$route&&c.equals(n.pathParams,e.pathParams)&&!n.reloadOnSearch&&!w)||!e&&!n||a.$broadcast("$routeChangeStart",n,e).defaultPrevented&&b&&b.preventDefault()}function m(){var u=s.current,e=n;if(v)u.params=e.params,c.copy(u.params,b),a.$broadcast("$routeUpdate",u);else if(e||u)w=!1,(s.current=e)&&e.redirectTo&&(c.isString(e.redirectTo)?f.path(t(e.redirectTo,e.params)).search(e.params).replace():f.url(e.redirectTo(e.pathParams,f.path(),f.search())).replace()),d.when(e).then(function(){if(e){var a=
-c.extend({},e.resolve),b,f;c.forEach(a,function(b,e){a[e]=c.isString(b)?h.get(b):h.invoke(b,null,null,e)});c.isDefined(b=e.template)?c.isFunction(b)&&(b=b(e.params)):c.isDefined(f=e.templateUrl)&&(c.isFunction(f)&&(f=f(e.params)),c.isDefined(f)&&(e.loadedTemplateUrl=x.valueOf(f),b=p(f)));c.isDefined(b)&&(a.$template=b);return d.all(a)}}).then(function(f){e==s.current&&(e&&(e.locals=f,c.copy(e.params,b)),a.$broadcast("$routeChangeSuccess",e,u))},function(b){e==s.current&&a.$broadcast("$routeChangeError",
-e,u,b)})}function k(){var a,b;c.forEach(g,function(d,g){var q;if(q=!b){var h=f.path();q=d.keys;var l={};if(d.regexp)if(h=d.regexp.exec(h)){for(var k=1,m=h.length;k<m;++k){var n=q[k-1],p=h[k];n&&p&&(l[n.name]=p)}q=l}else q=null;else q=null;q=a=q}q&&(b=r(d,{params:c.extend({},f.search(),a),pathParams:a}),b.$$route=d)});return b||g[null]&&r(g[null],{params:{},pathParams:{}})}function t(a,b){var d=[];c.forEach((a||"").split(":"),function(a,c){if(0===c)d.push(a);else{var f=a.match(/(\w+)(?:[?*])?(.*)/),
-g=f[1];d.push(b[g]);d.push(f[2]||"");delete b[g]}});return d.join("")}var w=!1,n,v,s={routes:g,reload:function(){w=!0;a.$evalAsync(function(){l();m()})},updateParams:function(a){if(this.current&&this.current.$$route)a=c.extend({},this.current.params,a),f.path(t(this.current.$$route.originalPath,a)),f.search(a);else throw B("norout");}};a.$on("$locationChangeStart",l);a.$on("$locationChangeSuccess",m);return s}]});var B=c.$$minErr("ngRoute");p.provider("$routeParams",function(){this.$get=function(){return{}}});
-p.directive("ngView",v);p.directive("ngView",A);v.$inject=["$route","$anchorScroll","$animate"];A.$inject=["$compile","$controller","$route"]})(window,window.angular);
-//# sourceMappingURL=angular-route.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js.map
deleted file mode 100644
index c0b2f5ca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-route.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-route.min.js",
-"lineCount":14,
-"mappings":"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",
-"sources":["angular-route.js"],
-"names":["window","angular","undefined","ngViewFactory","$route","$anchorScroll","$animate","restrict","terminal","priority","transclude","link","scope","$element","attr","ctrl","$transclude","cleanupLastView","previousLeaveAnimation","cancel","currentScope","$destroy","currentElement","leave","then","update","locals","current","isDefined","$template","newScope","$new","clone","enter","onNgViewEnter","autoScrollExp","$eval","$emit","onloadExp","autoscroll","onload","$on","ngViewFillContentFactory","$compile","$controller","html","contents","controller","$scope","controllerAs","data","children","ngRouteModule","module","provider","$RouteProvider","inherit","parent","extra","extend","Object","create","pathRegExp","path","opts","insensitive","caseInsensitiveMatch","ret","originalPath","regexp","keys","replace","_","slash","key","option","optional","star","push","name","RegExp","routes","when","this.when","route","routeCopy","copy","isUndefined","reloadOnSearch","redirectPath","length","substr","redirectTo","otherwise","this.otherwise","params","$get","$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce","prepareRoute","$locationEvent","lastRoute","preparedRouteIsUpdateOnly","preparedRoute","parseRoute","$$route","equals","pathParams","forceReload","$broadcast","defaultPrevented","preventDefault","commitRoute","nextRoute","isString","interpolate","search","url","resolve","template","templateUrl","forEach","value","get","invoke","isFunction","loadedTemplateUrl","valueOf","all","error","match","m","exec","on","i","len","val","string","result","split","segment","segmentMatch","join","reload","$evalAsync","updateParams","newParams","$routeMinErr","$$minErr","$RouteParamsProvider","this.$get","directive","$inject"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js
deleted file mode 100644
index a1e654ce..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(n,h,p){'use strict';function E(a){var f=[];r(f,h.noop).chars(a);return f.join("")}function g(a,f){var d={},c=a.split(","),b;for(b=0;b<c.length;b++)d[f?h.lowercase(c[b]):c[b]]=!0;return d}function F(a,f){function d(a,b,d,l){b=h.lowercase(b);if(s[b])for(;e.last()&&t[e.last()];)c("",e.last());u[b]&&e.last()==b&&c("",b);(l=v[b]||!!l)||e.push(b);var m={};d.replace(G,function(b,a,f,c,d){m[a]=q(f||c||d||"")});f.start&&f.start(b,m,l)}function c(b,a){var c=0,d;if(a=h.lowercase(a))for(c=e.length-
-1;0<=c&&e[c]!=a;c--);if(0<=c){for(d=e.length-1;d>=c;d--)f.end&&f.end(e[d]);e.length=c}}"string"!==typeof a&&(a=null===a||"undefined"===typeof a?"":""+a);var b,k,e=[],m=a,l;for(e.last=function(){return e[e.length-1]};a;){l="";k=!0;if(e.last()&&w[e.last()])a=a.replace(new RegExp("([\\W\\w]*)<\\s*\\/\\s*"+e.last()+"[^>]*>","i"),function(a,b){b=b.replace(H,"$1").replace(I,"$1");f.chars&&f.chars(q(b));return""}),c("",e.last());else{if(0===a.indexOf("\x3c!--"))b=a.indexOf("--",4),0<=b&&a.lastIndexOf("--\x3e",
-b)===b&&(f.comment&&f.comment(a.substring(4,b)),a=a.substring(b+3),k=!1);else if(x.test(a)){if(b=a.match(x))a=a.replace(b[0],""),k=!1}else if(J.test(a)){if(b=a.match(y))a=a.substring(b[0].length),b[0].replace(y,c),k=!1}else K.test(a)&&((b=a.match(z))?(b[4]&&(a=a.substring(b[0].length),b[0].replace(z,d)),k=!1):(l+="<",a=a.substring(1)));k&&(b=a.indexOf("<"),l+=0>b?a:a.substring(0,b),a=0>b?"":a.substring(b),f.chars&&f.chars(q(l)))}if(a==m)throw L("badparse",a);m=a}c()}function q(a){if(!a)return"";A.innerHTML=
-a.replace(/</g,"&lt;");return A.textContent}function B(a){return a.replace(/&/g,"&amp;").replace(M,function(a){var d=a.charCodeAt(0);a=a.charCodeAt(1);return"&#"+(1024*(d-55296)+(a-56320)+65536)+";"}).replace(N,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function r(a,f){var d=!1,c=h.bind(a,a.push);return{start:function(a,k,e){a=h.lowercase(a);!d&&w[a]&&(d=a);d||!0!==C[a]||(c("<"),c(a),h.forEach(k,function(d,e){var k=h.lowercase(e),g="img"===a&&"src"===k||
-"background"===k;!0!==O[k]||!0===D[k]&&!f(d,g)||(c(" "),c(e),c('="'),c(B(d)),c('"'))}),c(e?"/>":">"))},end:function(a){a=h.lowercase(a);d||!0!==C[a]||(c("</"),c(a),c(">"));a==d&&(d=!1)},chars:function(a){d||c(B(a))}}}var L=h.$$minErr("$sanitize"),z=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,y=/^<\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^</,J=/^<\//,H=/\x3c!--(.*?)--\x3e/g,x=/<!DOCTYPE([^>]*?)>/i,
-I=/<!\[CDATA\[(.*?)]]\x3e/g,M=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,N=/([^\#-~| |!])/g,v=g("area,br,col,hr,img,wbr");n=g("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr");p=g("rp,rt");var u=h.extend({},p,n),s=h.extend({},n,g("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),t=h.extend({},p,g("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var"));
-n=g("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan,use");var w=g("script,style"),C=h.extend({},v,s,t,u,n),D=g("background,cite,href,longdesc,src,usemap,xlink:href");n=g("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width");
-p=g("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",
-!0);var O=h.extend({},D,p,n),A=document.createElement("pre");h.module("ngSanitize",[]).provider("$sanitize",function(){this.$get=["$$sanitizeUri",function(a){return function(f){var d=[];F(f,r(d,function(c,b){return!/^unsafe/.test(a(c,b))}));return d.join("")}}]});h.module("ngSanitize").filter("linky",["$sanitize",function(a){var f=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,d=/^mailto:/i;return function(c,b){function k(a){a&&g.push(E(a))}function e(a,
-c){g.push("<a ");h.isDefined(b)&&g.push('target="',b,'" ');g.push('href="',a.replace(/"/g,"&quot;"),'">');k(c);g.push("</a>")}if(!c)return c;for(var m,l=c,g=[],n,p;m=l.match(f);)n=m[0],m[2]||m[4]||(n=(m[3]?"http://":"mailto:")+n),p=m.index,k(l.substr(0,p)),e(n,m[0].replace(d,"")),l=l.substring(p+m[0].length);k(l);return a(g.join(""))}}])})(window,window.angular);
-//# sourceMappingURL=angular-sanitize.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js.map
deleted file mode 100644
index 2f360f4d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-sanitize.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-sanitize.min.js",
-"lineCount":15,
-"mappings":"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",
-"sources":["angular-sanitize.js"],
-"names":["window","angular","undefined","sanitizeText","chars","buf","htmlSanitizeWriter","writer","noop","join","makeMap","str","lowercaseKeys","obj","items","split","i","length","lowercase","htmlParser","html","handler","parseStartTag","tag","tagName","rest","unary","blockElements","stack","last","inlineElements","parseEndTag","optionalEndTagElements","voidElements","push","attrs","replace","ATTR_REGEXP","match","name","doubleQuotedValue","singleQuotedValue","unquotedValue","decodeEntities","start","pos","end","index","text","stack.last","specialElements","RegExp","all","COMMENT_REGEXP","CDATA_REGEXP","indexOf","lastIndexOf","comment","substring","DOCTYPE_REGEXP","test","BEGING_END_TAGE_REGEXP","END_TAG_REGEXP","BEGIN_TAG_REGEXP","START_TAG_REGEXP","$sanitizeMinErr","value","hiddenPre","innerHTML","textContent","encodeEntities","SURROGATE_PAIR_REGEXP","hi","charCodeAt","low","NON_ALPHANUMERIC_REGEXP","uriValidator","ignore","out","bind","validElements","forEach","key","lkey","isImage","validAttrs","uriAttrs","$$minErr","optionalEndTagBlockElements","optionalEndTagInlineElements","extend","svgElements","htmlAttrs","svgAttrs","document","createElement","module","provider","$SanitizeProvider","$get","$$sanitizeUri","uri","filter","$sanitize","LINKY_URL_REGEXP","MAILTO_REGEXP","target","addText","addLink","url","isDefined","raw","substr"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-scenario.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-scenario.js
deleted file mode 100644
index 78dd37d0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-scenario.js
+++ /dev/null
@@ -1,40439 +0,0 @@
-/*!
- * jQuery JavaScript Library v2.1.1
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2014-05-01T17:11Z
- */
-
-(function( global, factory ) {'use strict';
-
- if ( typeof module === "object" && typeof module.exports === "object" ) {
- // For CommonJS and CommonJS-like environments where a proper window is present,
- // execute the factory and get jQuery
- // For environments that do not inherently posses a window with a document
- // (such as Node.js), expose a jQuery-making factory as module.exports
- // This accentuates the need for the creation of a real window
- // e.g. var jQuery = require("jquery")(window);
- // See ticket #14549 for more info
- module.exports = global.document ?
- factory( global, true ) :
- function( w ) {
- if ( !w.document ) {
- throw new Error( "jQuery requires a window with a document" );
- }
- return factory( w );
- };
- } else {
- factory( global );
- }
-
-// Pass this if window is not defined yet
-}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//
-
-var arr = [];
-
-var slice = arr.slice;
-
-var concat = arr.concat;
-
-var push = arr.push;
-
-var indexOf = arr.indexOf;
-
-var class2type = {};
-
-var toString = class2type.toString;
-
-var hasOwn = class2type.hasOwnProperty;
-
-var support = {};
-
-
-
-var
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
-
- version = "2.1.1",
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- // Need init if jQuery is called (just allow error to be thrown if not included)
- return new jQuery.fn.init( selector, context );
- },
-
- // Support: Android<4.1
- // Make sure we trim BOM and NBSP
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: version,
-
- constructor: jQuery,
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num != null ?
-
- // Return just the one element from the set
- ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
-
- // Return all the elements in a clean array
- slice.call( this );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: arr.sort,
- splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
-
- // skip the boolean and the target
- target = arguments[ i ] || {};
- i++;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( i === length ) {
- target = this;
- i--;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- // Unique for each copy of jQuery on the page
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
- // Assume jQuery is ready without the ready module
- isReady: true,
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- noop: function() {},
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray,
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- return !jQuery.isArray( obj ) && obj - parseFloat( obj ) >= 0;
- },
-
- isPlainObject: function( obj ) {
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.constructor &&
- !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
- return false;
- }
-
- // If the function hasn't returned already, we're confident that
- // |obj| is a plain object, created by {} or constructed with new Object
- return true;
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
- // Support: Android < 4.0, iOS < 6 (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf("use strict") === 1 ) {
- script = document.createElement("script");
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
- indirect( code );
- }
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Support: Android<4.1
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- return arr == null ? -1 : indexOf.call( arr, elem, i );
- },
-
- merge: function( first, second ) {
- var len = +second.length,
- j = 0,
- i = first.length;
-
- for ( ; j < len; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, invert ) {
- var callbackInverse,
- matches = [],
- i = 0,
- length = elems.length,
- callbackExpect = !invert;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- callbackInverse = !callback( elems[ i ], i );
- if ( callbackInverse !== callbackExpect ) {
- matches.push( elems[ i ] );
- }
- }
-
- return matches;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their new values
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
- }
-
- // Flatten any nested arrays
- return concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
- // jQuery.support is not used in Core but other projects attach their
- // properties to it so it needs to exist.
- support: support
-});
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( type === "function" || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v1.10.19
- * http://sizzlejs.com/
- *
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2014-04-18
- */
-(function( window ) {
-
-var i,
- support,
- Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
- outermostContext,
- sortInput,
- hasDuplicate,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- }
- return 0;
- },
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace +
- // Operator (capture 2)
- "*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
-
- pseudos = ":(" + characterEncoding + ")(?:\\((" +
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
- // 1. quoted (capture 3; capture 4 or capture 5)
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
- // 2. simple (capture 6)
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
- // 3. anything else (capture 2)
- ".*" +
- ")\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rsibling = /[+~]/,
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- high < 0 ?
- // BMP codepoint
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( documentIsHTML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document (jQuery #6963)
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
- nid = old = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key + " " ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = attrs.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Checks a node for validity as a Sizzle context
- * @param {Element|Object=} context
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
- */
-function testContext( context ) {
- return context && typeof context.getElementsByTagName !== strundefined && context;
-}
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare,
- doc = node ? node.ownerDocument || node : preferredDoc,
- parent = doc.defaultView;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsHTML = !isXML( doc );
-
- // Support: IE>8
- // If iframe document is assigned to "document" variable and if iframe has been reloaded,
- // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
- // IE6-8 do not support the defaultView property so parent will be undefined
- if ( parent && parent !== parent.top ) {
- // IE11 does not have attachEvent, so all must suffer
- if ( parent.addEventListener ) {
- parent.addEventListener( "unload", function() {
- setDocument();
- }, false );
- } else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", function() {
- setDocument();
- });
- }
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = rnative.test( doc.getElementsByClassName ) && assert(function( div ) {
- div.innerHTML = "<div class='a'></div><div class='a i'></div>";
-
- // Support: Safari<4
- // Catch class over-caching
- div.firstChild.className = "i";
- // Support: Opera<10
- // Catch gEBCN failure to find non-leading classes
- return div.getElementsByClassName("i").length === 2;
- });
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [ m ] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select msallowclip=''><option selected=''></option></select>";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( div.querySelectorAll("[msallowclip^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = doc.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( div.querySelectorAll("[name=d]").length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- // Sort on method existence if only one input has compareDocumentPosition
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- if ( compare ) {
- return compare;
- }
-
- // Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
- a.compareDocumentPosition( b ) :
-
- // Otherwise we know they are disconnected
- 1;
-
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return doc;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- // Clear input after sorting to release objects
- // See https://github.com/jquery/sizzle/pull/225
- sortInput = null;
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[6] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
- // but not by others (comment: 8; processing instruction: 7; etc.)
- // nodeType < 6 works because attributes (2) do not appear as children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeType < 6 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
-
- // Support: IE<8
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( (tokens = []) );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var oldCache, outerCache,
- newCache = [ dirruns, doneName ];
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (oldCache = outerCache[ dir ]) &&
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
-
- // Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
- } else {
- // Reuse newcache so results back-propagate to previous elements
- outerCache[ dir ] = newCache;
-
- // A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, outermost ) {
- var elem, j, matcher,
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- setMatched = [],
- contextBackup = outermostContext,
- // We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
- len = elems.length;
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- }
-
- // Add elements passing elementMatchers directly to results
- // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !match ) {
- match = tokenize( selector );
- }
- i = match.length;
- while ( i-- ) {
- cached = matcherFromTokens( match[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-
- // Save selector and tokenization
- cached.selector = selector;
- }
- return cached;
-};
-
-/**
- * A low-level selection function that works with Sizzle's compiled
- * selector functions
- * @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
- * @param {Element} context
- * @param {Array} [results]
- * @param {Array} [seed] A set of elements to match against
- */
-select = Sizzle.select = function( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
-
- results = results || [];
-
- // Try to minimize operations if there is no seed and only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
-
- // Precompiled matchers will still verify ancestry, so step up a level
- } else if ( compiled ) {
- context = context.parentNode;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
-
- // Compile and execute a filtering function if one is not provided
- // Provide `match` to avoid retokenization if we modified the selector above
- ( compiled || compile( selector, match ) )(
- seed,
- context,
- !documentIsHTML,
- results,
- rsibling.test( selector ) && testContext( context.parentNode ) || context
- );
- return results;
-};
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome<14
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "<input/>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- null;
- }
- });
-}
-
-return Sizzle;
-
-})( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-
-var rneedsContext = jQuery.expr.match.needsContext;
-
-var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/);
-
-
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- });
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- });
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) >= 0 ) !== not;
- });
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- }));
-};
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i,
- len = this.length,
- ret = [],
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector || [], false) );
- },
- not: function( selector ) {
- return this.pushStack( winnow(this, selector || [], true) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-});
-
-
-// Initialize a jQuery object
-
-
-// A central reference to the root jQuery(document)
-var rootjQuery,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- init = jQuery.fn.init = function( selector, context ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- // Intentionally let the error be thrown if parseHTML is not present
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return typeof rootjQuery.ready !== "undefined" ?
- rootjQuery.ready( selector ) :
- // Execute immediately if ready is not present
- selector( jQuery );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- };
-
-// Give the init function the jQuery prototype for later instantiation
-init.prototype = jQuery.fn;
-
-// Initialize central reference
-rootjQuery = jQuery( document );
-
-
-var rparentsprev = /^(?:parents|prev(?:Until|All))/,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.extend({
- dir: function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
- }
-});
-
-jQuery.fn.extend({
- has: function( target ) {
- var targets = jQuery( target, this ),
- l = targets.length;
-
- return this.filter(function() {
- var i = 0;
- for ( ; i < l; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- matched = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
- // Always skip document fragments
- if ( cur.nodeType < 11 && (pos ?
- pos.index(cur) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector(cur, selectors)) ) {
-
- matched.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return indexOf.call( jQuery( elem ), this[ 0 ] );
- }
-
- // Locate the position of the desired element
- return indexOf.call( this,
-
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[ 0 ] : elem
- );
- },
-
- add: function( selector, context ) {
- return this.pushStack(
- jQuery.unique(
- jQuery.merge( this.get(), jQuery( selector, context ) )
- )
- );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-function sibling( cur, dir ) {
- while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var matched = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- matched = jQuery.filter( selector, matched );
- }
-
- if ( this.length > 1 ) {
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- jQuery.unique( matched );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- matched.reverse();
- }
- }
-
- return this.pushStack( matched );
- };
-});
-var rnotwhite = (/\S+/g);
-
-
-
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- firingLength = 0;
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( list && ( !fired || stack ) ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
- if ( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-
-
-// The deferred used on DOM ready
-var readyList;
-
-jQuery.fn.ready = function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
-};
-
-jQuery.extend({
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
- jQuery( document ).off( "ready" );
- }
- }
-});
-
-/**
- * The ready event handler and self cleanup method
- */
-function completed() {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
- jQuery.ready();
-}
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- } else {
-
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
- }
- }
- return readyList.promise( obj );
-};
-
-// Kick off the DOM ready check even if the user does not
-jQuery.ready.promise();
-
-
-
-
-// Multifunctional method to get and set values of a collection
-// The value/s can optionally be executed if it's a function
-var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- len = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < len; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- len ? fn( elems[0], key ) : emptyGet;
-};
-
-
-/**
- * Determines whether an object can have data
- */
-jQuery.acceptData = function( owner ) {
- // Accepts only:
- // - Node
- // - Node.ELEMENT_NODE
- // - Node.DOCUMENT_NODE
- // - Object
- // - Any
- /* jshint -W018 */
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
-};
-
-
-function Data() {
- // Support: Android < 4,
- // Old WebKit does not have Object.preventExtensions/freeze method,
- // return new empty object instead with no [[set]] accessor
- Object.defineProperty( this.cache = {}, 0, {
- get: function() {
- return {};
- }
- });
-
- this.expando = jQuery.expando + Math.random();
-}
-
-Data.uid = 1;
-Data.accepts = jQuery.acceptData;
-
-Data.prototype = {
- key: function( owner ) {
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return the key for a frozen object.
- if ( !Data.accepts( owner ) ) {
- return 0;
- }
-
- var descriptor = {},
- // Check if the owner object already has a cache key
- unlock = owner[ this.expando ];
-
- // If not, create one
- if ( !unlock ) {
- unlock = Data.uid++;
-
- // Secure it in a non-enumerable, non-writable property
- try {
- descriptor[ this.expando ] = { value: unlock };
- Object.defineProperties( owner, descriptor );
-
- // Support: Android < 4
- // Fallback to a less secure definition
- } catch ( e ) {
- descriptor[ this.expando ] = unlock;
- jQuery.extend( owner, descriptor );
- }
- }
-
- // Ensure the cache object
- if ( !this.cache[ unlock ] ) {
- this.cache[ unlock ] = {};
- }
-
- return unlock;
- },
- set: function( owner, data, value ) {
- var prop,
- // There may be an unlock assigned to this node,
- // if there is no entry for this "owner", create one inline
- // and set the unlock as though an owner entry had always existed
- unlock = this.key( owner ),
- cache = this.cache[ unlock ];
-
- // Handle: [ owner, key, value ] args
- if ( typeof data === "string" ) {
- cache[ data ] = value;
-
- // Handle: [ owner, { properties } ] args
- } else {
- // Fresh assignments by object are shallow copied
- if ( jQuery.isEmptyObject( cache ) ) {
- jQuery.extend( this.cache[ unlock ], data );
- // Otherwise, copy the properties one-by-one to the cache object
- } else {
- for ( prop in data ) {
- cache[ prop ] = data[ prop ];
- }
- }
- }
- return cache;
- },
- get: function( owner, key ) {
- // Either a valid cache is found, or will be created.
- // New caches will be created and the unlock returned,
- // allowing direct access to the newly created
- // empty data object. A valid owner object must be provided.
- var cache = this.cache[ this.key( owner ) ];
-
- return key === undefined ?
- cache : cache[ key ];
- },
- access: function( owner, key, value ) {
- var stored;
- // In cases where either:
- //
- // 1. No key was specified
- // 2. A string key was specified, but no value provided
- //
- // Take the "read" path and allow the get method to determine
- // which value to return, respectively either:
- //
- // 1. The entire cache object
- // 2. The data stored at the key
- //
- if ( key === undefined ||
- ((key && typeof key === "string") && value === undefined) ) {
-
- stored = this.get( owner, key );
-
- return stored !== undefined ?
- stored : this.get( owner, jQuery.camelCase(key) );
- }
-
- // [*]When the key is not a string, or both a key and value
- // are specified, set or extend (existing objects) with either:
- //
- // 1. An object of properties
- // 2. A key and value
- //
- this.set( owner, key, value );
-
- // Since the "set" path can have two possible entry points
- // return the expected data based on which path was taken[*]
- return value !== undefined ? value : key;
- },
- remove: function( owner, key ) {
- var i, name, camel,
- unlock = this.key( owner ),
- cache = this.cache[ unlock ];
-
- if ( key === undefined ) {
- this.cache[ unlock ] = {};
-
- } else {
- // Support array or space separated string of keys
- if ( jQuery.isArray( key ) ) {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = key.concat( key.map( jQuery.camelCase ) );
- } else {
- camel = jQuery.camelCase( key );
- // Try the string as a key before any manipulation
- if ( key in cache ) {
- name = [ key, camel ];
- } else {
- // If a key with the spaces exists, use it.
- // Otherwise, create an array by matching non-whitespace
- name = camel;
- name = name in cache ?
- [ name ] : ( name.match( rnotwhite ) || [] );
- }
- }
-
- i = name.length;
- while ( i-- ) {
- delete cache[ name[ i ] ];
- }
- }
- },
- hasData: function( owner ) {
- return !jQuery.isEmptyObject(
- this.cache[ owner[ this.expando ] ] || {}
- );
- },
- discard: function( owner ) {
- if ( owner[ this.expando ] ) {
- delete this.cache[ owner[ this.expando ] ];
- }
- }
-};
-var data_priv = new Data();
-
-var data_user = new Data();
-
-
-
-/*
- Implementation Summary
-
- 1. Enforce API surface and semantic compatibility with 1.9.x branch
- 2. Improve the module's maintainability by reducing the storage
- paths to a single mechanism.
- 3. Use the same single mechanism to support "private" and "user" data.
- 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
- 5. Avoid exposing implementation details on user objects (eg. expando properties)
- 6. Provide a clear path for implementation upgrade to WeakMap in 2014
-*/
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function dataAttr( elem, key, data ) {
- var name;
-
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
- name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- data_user.set( elem, key, data );
- } else {
- data = undefined;
- }
- }
- return data;
-}
-
-jQuery.extend({
- hasData: function( elem ) {
- return data_user.hasData( elem ) || data_priv.hasData( elem );
- },
-
- data: function( elem, name, data ) {
- return data_user.access( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- data_user.remove( elem, name );
- },
-
- // TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to data_priv methods, these can be deprecated.
- _data: function( elem, name, data ) {
- return data_priv.access( elem, name, data );
- },
-
- _removeData: function( elem, name ) {
- data_priv.remove( elem, name );
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var i, name, data,
- elem = this[ 0 ],
- attrs = elem && elem.attributes;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = data_user.get( elem );
-
- if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) {
- i = attrs.length;
- while ( i-- ) {
-
- // Support: IE11+
- // The attrs elements can be null (#14894)
- if ( attrs[ i ] ) {
- name = attrs[ i ].name;
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice(5) );
- dataAttr( elem, name, data[ name ] );
- }
- }
- }
- data_priv.set( elem, "hasDataAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- data_user.set( this, key );
- });
- }
-
- return access( this, function( value ) {
- var data,
- camelKey = jQuery.camelCase( key );
-
- // The calling jQuery object (element matches) is not empty
- // (and therefore has an element appears at this[ 0 ]) and the
- // `value` parameter was not undefined. An empty jQuery object
- // will result in `undefined` for elem = this[ 0 ] which will
- // throw an exception if an attempt to read a data cache is made.
- if ( elem && value === undefined ) {
- // Attempt to get data from the cache
- // with the key as-is
- data = data_user.get( elem, key );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to get data from the cache
- // with the key camelized
- data = data_user.get( elem, camelKey );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to "discover" the data in
- // HTML5 custom data-* attrs
- data = dataAttr( elem, camelKey, undefined );
- if ( data !== undefined ) {
- return data;
- }
-
- // We tried really hard, but the data doesn't exist.
- return;
- }
-
- // Set the data...
- this.each(function() {
- // First, attempt to store a copy or reference of any
- // data that might've been store with a camelCased key.
- var data = data_user.get( this, camelKey );
-
- // For HTML5 data-* attribute interop, we have to
- // store property names with dashes in a camelCase form.
- // This might not apply to all properties...*
- data_user.set( this, camelKey, value );
-
- // *... In the case of properties that might _actually_
- // have dashes, we need to also store a copy of that
- // unchanged property.
- if ( key.indexOf("-") !== -1 && data !== undefined ) {
- data_user.set( this, key, value );
- }
- });
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- data_user.remove( this, key );
- });
- }
-});
-
-
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = data_priv.get( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray( data ) ) {
- queue = data_priv.access( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return data_priv.get( elem, key ) || data_priv.access( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- data_priv.remove( elem, [ type + "queue", key ] );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while ( i-- ) {
- tmp = data_priv.get( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source;
-
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
-
-var isHidden = function( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
- };
-
-var rcheckableType = (/^(?:checkbox|radio)$/i);
-
-
-
-(function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- // Support: Windows Web Apps (WWA)
- // `name` and `type` need .setAttribute for WWA
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Safari 5.1, iOS 5.1, Android 4.x, Android 2.3
- // old WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- // Support: IE9-IE11+
- div.innerHTML = "<textarea>x</textarea>";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-})();
-var strundefined = typeof undefined;
-
-
-
-support.focusinBubbles = "onfocusin" in window;
-
-
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = data_priv.get( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?
- jQuery.event.dispatch.apply( elem, arguments ) : undefined;
- };
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = data_priv.hasData( elem ) && data_priv.get( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
- data_priv.remove( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
-
- var i, cur, tmp, bubbleType, ontype, handle, special,
- eventPath = [ elem || document ],
- type = hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
- event.isTrigger = onlyHandlers ? 2 : 3;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && handle.apply && jQuery.acceptData( cur ) ) {
- event.result = handle.apply( cur, data );
- if ( event.result === false ) {
- event.preventDefault();
- }
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
- jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = slice.call( arguments ),
- handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- for ( ; cur !== this; cur = cur.parentNode || this ) {
-
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.disabled !== true || event.type !== "click" ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: Cordova 2.5 (WebKit) (#13255)
- // All events should have a target; Cordova deviceready doesn't
- if ( !event.target ) {
- event.target = document;
- }
-
- // Support: Safari 6.0+, Chrome < 28
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- this.focus();
- return false;
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Support: Firefox 20+
- // Firefox doesn't alert if the returnValue field is not set.
- if ( event.result !== undefined && event.originalEvent ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- {
- type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
-};
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = src.defaultPrevented ||
- src.defaultPrevented === undefined &&
- // Support: Android < 4.0
- src.returnValue === false ?
- returnTrue :
- returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
-
- if ( e && e.preventDefault ) {
- e.preventDefault();
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
-
- if ( e && e.stopPropagation ) {
- e.stopPropagation();
- }
- },
- stopImmediatePropagation: function() {
- var e = this.originalEvent;
-
- this.isImmediatePropagationStopped = returnTrue;
-
- if ( e && e.stopImmediatePropagation ) {
- e.stopImmediatePropagation();
- }
-
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-// Support: Chrome 15+
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// Create "bubbling" focus and blur events
-// Support: Firefox, Chrome, Safari
-if ( !support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler on the document while someone wants focusin/focusout
- var handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- var doc = this.ownerDocument || this,
- attaches = data_priv.access( doc, fix );
-
- if ( !attaches ) {
- doc.addEventListener( orig, handler, true );
- }
- data_priv.access( doc, fix, ( attaches || 0 ) + 1 );
- },
- teardown: function() {
- var doc = this.ownerDocument || this,
- attaches = data_priv.access( doc, fix ) - 1;
-
- if ( !attaches ) {
- doc.removeEventListener( orig, handler, true );
- data_priv.remove( doc, fix );
-
- } else {
- data_priv.access( doc, fix, attaches );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- }
-});
-
-
-var
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
-
- // Support: IE 9
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
-
- thead: [ 1, "<table>", "</table>" ],
- col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- _default: [ 0, "", "" ]
- };
-
-// Support: IE 9
-wrapMap.optgroup = wrapMap.option;
-
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-// Support: 1.x compatibility
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
- return jQuery.nodeName( elem, "table" ) &&
- jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
-
- elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
- elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
-
- if ( match ) {
- elem.type = match[ 1 ];
- } else {
- elem.removeAttribute("type");
- }
-
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- data_priv.set(
- elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" )
- );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
- var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
-
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // 1. Copy private data: events, handlers, etc.
- if ( data_priv.hasData( src ) ) {
- pdataOld = data_priv.access( src );
- pdataCur = data_priv.set( dest, pdataOld );
- events = pdataOld.events;
-
- if ( events ) {
- delete pdataCur.handle;
- pdataCur.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
- }
-
- // 2. Copy user data
- if ( data_user.hasData( src ) ) {
- udataOld = data_user.access( src );
- udataCur = jQuery.extend( {}, udataOld );
-
- data_user.set( dest, udataCur );
- }
-}
-
-function getAll( context, tag ) {
- var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) :
- context.querySelectorAll ? context.querySelectorAll( tag || "*" ) :
- [];
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}
-
-// Support: IE >= 9
-function fixInput( src, dest ) {
- var nodeName = dest.nodeName.toLowerCase();
-
- // Fails to persist the checked state of a cloned checkbox or radio button.
- if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
- dest.checked = src.checked;
-
- // Fails to return the selected option to the default selected state when cloning options
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var i, l, srcElements, destElements,
- clone = elem.cloneNode( true ),
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- // Support: IE >= 9
- // Fix Cloning issues
- if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
- !jQuery.isXMLDoc( elem ) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- for ( i = 0, l = srcElements.length; i < l; i++ ) {
- fixInput( srcElements[ i ], destElements[ i ] );
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0, l = srcElements.length; i < l; i++ ) {
- cloneCopyEvent( srcElements[ i ], destElements[ i ] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var elem, tmp, tag, wrap, contains, j,
- fragment = context.createDocumentFragment(),
- nodes = [],
- i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- // Support: QtWebKit
- // jQuery.merge because push.apply(_, arraylike) throws
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || fragment.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
-
- // Descend through wrappers to the right content
- j = wrap[ 0 ];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Support: QtWebKit
- // jQuery.merge because push.apply(_, arraylike) throws
- jQuery.merge( nodes, tmp.childNodes );
-
- // Remember the top-level container
- tmp = fragment.firstChild;
-
- // Fixes #12346
- // Support: Webkit, IE
- tmp.textContent = "";
- }
- }
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( fragment.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- return fragment;
- },
-
- cleanData: function( elems ) {
- var data, elem, type, key,
- special = jQuery.event.special,
- i = 0;
-
- for ( ; (elem = elems[ i ]) !== undefined; i++ ) {
- if ( jQuery.acceptData( elem ) ) {
- key = elem[ data_priv.expando ];
-
- if ( key && (data = data_priv.cache[ key ]) ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
- if ( data_priv.cache[ key ] ) {
- // Discard any remaining `private` data
- delete data_priv.cache[ key ];
- }
- }
- }
- // Discard any remaining `user` data
- delete data_user.cache[ elem[ data_user.expando ] ];
- }
- }
-});
-
-jQuery.fn.extend({
- text: function( value ) {
- return access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().each(function() {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.textContent = value;
- }
- });
- }, null, value, arguments.length );
- },
-
- append: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.insertBefore( elem, target.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- remove: function( selector, keepData /* Internal Use Only */ ) {
- var elem,
- elems = selector ? jQuery.filter( selector, this ) : this,
- i = 0;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- if ( elem.nodeType === 1 ) {
-
- // Prevent memory leaks
- jQuery.cleanData( getAll( elem, false ) );
-
- // Remove any remaining nodes
- elem.textContent = "";
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map(function() {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return access( this, function( value ) {
- var elem = this[ 0 ] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined && elem.nodeType === 1 ) {
- return elem.innerHTML;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for ( ; i < l; i++ ) {
- elem = this[ i ] || {};
-
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch( e ) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function() {
- var arg = arguments[ 0 ];
-
- // Make the changes, replacing each context element with the new content
- this.domManip( arguments, function( elem ) {
- arg = this.parentNode;
-
- jQuery.cleanData( getAll( this ) );
-
- if ( arg ) {
- arg.replaceChild( elem, this );
- }
- });
-
- // Force removal if there was no new content (e.g., from empty arguments)
- return arg && (arg.length || arg.nodeType) ? this : this.remove();
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, callback ) {
-
- // Flatten any nested arrays
- args = concat.apply( [], args );
-
- var fragment, first, scripts, hasScripts, node, doc,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[ 0 ],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction ||
- ( l > 1 && typeof value === "string" &&
- !support.checkClone && rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[ 0 ] = value.call( this, index, self.html() );
- }
- self.domManip( args, callback );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- // Support: QtWebKit
- // jQuery.merge because push.apply(_, arraylike) throws
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call( this[ i ], node, i );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Optional AJAX dependency, but won't run scripts if not present
- if ( jQuery._evalUrl ) {
- jQuery._evalUrl( node.src );
- }
- } else {
- jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
- }
- }
- }
- }
- }
- }
-
- return this;
- }
-});
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1,
- i = 0;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone( true );
- jQuery( insert[ i ] )[ original ]( elems );
-
- // Support: QtWebKit
- // .get() because push.apply(_, arraylike) throws
- push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-
-var iframe,
- elemdisplay = {};
-
-/**
- * Retrieve the actual display of a element
- * @param {String} name nodeName of the element
- * @param {Object} doc Document object
- */
-// Called only from within defaultDisplay
-function actualDisplay( name, doc ) {
- var style,
- elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
-
- // getDefaultComputedStyle might be reliably used only on attached element
- display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?
-
- // Use of this method is a temporary fix (more like optmization) until something better comes along,
- // since it was removed from specification and supported only in FF
- style.display : jQuery.css( elem[ 0 ], "display" );
-
- // We don't have any data stored on the element,
- // so use "detach" method as fast way to get rid of the element
- elem.detach();
-
- return display;
-}
-
-/**
- * Try to determine the default display value of an element
- * @param {String} nodeName
- */
-function defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
-
- // Use the already-created iframe if possible
- iframe = (iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" )).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = iframe[ 0 ].contentDocument;
-
- // Support: IE
- doc.write();
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-var rmargin = (/^margin/);
-
-var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
-
-var getStyles = function( elem ) {
- return elem.ownerDocument.defaultView.getComputedStyle( elem, null );
- };
-
-
-
-function curCSS( elem, name, computed ) {
- var width, minWidth, maxWidth, ret,
- style = elem.style;
-
- computed = computed || getStyles( elem );
-
- // Support: IE9
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- if ( computed ) {
- ret = computed.getPropertyValue( name ) || computed[ name ];
- }
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // Support: iOS < 6
- // A tribute to the "awesome hack by Dean Edwards"
- // iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret !== undefined ?
- // Support: IE
- // IE returns zIndex value as an integer.
- ret + "" :
- ret;
-}
-
-
-function addGetHookIf( conditionFn, hookFn ) {
- // Define the hook, we'll check on the first run if it's really needed.
- return {
- get: function() {
- if ( conditionFn() ) {
- // Hook not needed (or it's not possible to use it due to missing dependency),
- // remove it.
- // Since there are no other hooks for marginRight, remove the whole object.
- delete this.get;
- return;
- }
-
- // Hook needed; redefine it so that the support test is not executed again.
-
- return (this.get = hookFn).apply( this, arguments );
- }
- };
-}
-
-
-(function() {
- var pixelPositionVal, boxSizingReliableVal,
- docElem = document.documentElement,
- container = document.createElement( "div" ),
- div = document.createElement( "div" );
-
- if ( !div.style ) {
- return;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- container.style.cssText = "border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;" +
- "position:absolute";
- container.appendChild( div );
-
- // Executing both pixelPosition & boxSizingReliable tests require only one layout
- // so they're executed at the same time to save the second computation.
- function computePixelPositionAndBoxSizingReliable() {
- div.style.cssText =
- // Support: Firefox<29, Android 2.3
- // Vendor-prefix box-sizing
- "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;" +
- "box-sizing:border-box;display:block;margin-top:1%;top:1%;" +
- "border:1px;padding:1px;width:4px;position:absolute";
- div.innerHTML = "";
- docElem.appendChild( container );
-
- var divStyle = window.getComputedStyle( div, null );
- pixelPositionVal = divStyle.top !== "1%";
- boxSizingReliableVal = divStyle.width === "4px";
-
- docElem.removeChild( container );
- }
-
- // Support: node.js jsdom
- // Don't assume that getComputedStyle is a property of the global object
- if ( window.getComputedStyle ) {
- jQuery.extend( support, {
- pixelPosition: function() {
- // This test is executed only once but we still do memoizing
- // since we can use the boxSizingReliable pre-computing.
- // No need to check if the test was already performed, though.
- computePixelPositionAndBoxSizingReliable();
- return pixelPositionVal;
- },
- boxSizingReliable: function() {
- if ( boxSizingReliableVal == null ) {
- computePixelPositionAndBoxSizingReliable();
- }
- return boxSizingReliableVal;
- },
- reliableMarginRight: function() {
- // Support: Android 2.3
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // This support function is only executed once so no memoizing is needed.
- var ret,
- marginDiv = div.appendChild( document.createElement( "div" ) );
-
- // Reset CSS: box-sizing; display; margin; border; padding
- marginDiv.style.cssText = div.style.cssText =
- // Support: Firefox<29, Android 2.3
- // Vendor-prefix box-sizing
- "-webkit-box-sizing:content-box;-moz-box-sizing:content-box;" +
- "box-sizing:content-box;display:block;margin:0;border:0;padding:0";
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
- docElem.appendChild( container );
-
- ret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );
-
- docElem.removeChild( container );
-
- return ret;
- }
- });
- }
-})();
-
-
-// A method for quickly swapping in/out CSS properties to get correct calculations.
-jQuery.swap = function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
-};
-
-
-var
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rnumsplit = new RegExp( "^(" + pnum + ")(.*)$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + pnum + ")", "i" ),
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: "0",
- fontWeight: "400"
- },
-
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name[0].toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox &&
- ( support.boxSizingReliable() || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-function showHide( elements, show ) {
- var display, elem, hidden,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- values[ index ] = data_priv.get( elem, "olddisplay" );
- display = elem.style.display;
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = data_priv.access( elem, "olddisplay", defaultDisplay(elem.nodeName) );
- }
- } else {
- hidden = isHidden( elem );
-
- if ( display !== "none" || !hidden ) {
- data_priv.set( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Don't automatically add "px" to these possibly-unitless properties
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "flexGrow": true,
- "flexShrink": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": "cssFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that null and NaN values aren't set. See: #7116
- if ( value == null || value !== value ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifying setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
- style[ name ] = value;
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra === "" || extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- }
-});
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-// Support: Android 2.3
-jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
- function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
-);
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return access( this, function( elem, name, value ) {
- var styles, len,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each(function() {
- if ( isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing an empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Support: IE9
-// Panic based approach to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p * Math.PI ) / 2;
- }
-};
-
-jQuery.fx = Tween.prototype.init;
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-
-
-
-var
- fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [ function( prop, value ) {
- var tween = this.createTween( prop, value ),
- target = tween.cur(),
- parts = rfxnum.exec( value ),
- unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
- rfxnum.exec( jQuery.css( tween.elem, prop ) ),
- scale = 1,
- maxIterations = 20;
-
- if ( start && start[ 3 ] !== unit ) {
- // Trust units reported by jQuery.css
- unit = unit || start[ 3 ];
-
- // Make sure we update the tween properties later on
- parts = parts || [];
-
- // Iteratively approximate from a nonzero starting point
- start = +target || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- // Update tween properties
- if ( parts ) {
- start = tween.start = +start || +target || 0;
- tween.unit = unit;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[ 1 ] ?
- start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
- +parts[ 2 ];
- }
-
- return tween;
- } ]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- i = 0,
- attrs = { height: type };
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth ? 1 : 0;
- for ( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-function createTween( value, prop, animation ) {
- var tween,
- collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( (tween = collection[ index ].call( animation, prop, value )) ) {
-
- // we're done with this property
- return tween;
- }
- }
-}
-
-function defaultPrefilter( elem, props, opts ) {
- /* jshint validthis: true */
- var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
- anim = this,
- orig = {},
- style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
- dataShow = data_priv.get( elem, "fxshow" );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE9-10 do not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- display = jQuery.css( elem, "display" );
-
- // Test default display if display is currently "none"
- checkDisplay = display === "none" ?
- data_priv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
-
- if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
- style.display = "inline-block";
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- anim.always(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
-
- // show/hide pass
- for ( prop in props ) {
- value = props[ prop ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ prop ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
-
- // If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden
- if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
- hidden = true;
- } else {
- continue;
- }
- }
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
-
- // Any non-fx value stops us from restoring the original display value
- } else {
- display = undefined;
- }
- }
-
- if ( !jQuery.isEmptyObject( orig ) ) {
- if ( dataShow ) {
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = data_priv.access( elem, "fxshow", {} );
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
-
- data_priv.remove( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( prop in orig ) {
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
-
- // If this is a noop like .hide().hide(), restore an overwritten display value
- } else if ( (display === "none" ? defaultDisplay( elem.nodeName ) : display) === "inline" ) {
- style.display = display;
- }
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- jQuery.map( props, createTween, animation );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations, or finishing resolves immediately
- if ( empty || data_priv.get( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = data_priv.get( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = data_priv.get( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.stop ) {
- hooks.stop.call( this, true );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.timers = [];
-jQuery.fx.tick = function() {
- var timer,
- i = 0,
- timers = jQuery.timers;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- jQuery.timers.push( timer );
- if ( timer() ) {
- jQuery.fx.start();
- } else {
- jQuery.timers.pop();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-
-// Based off of the plugin by Clint Helfers, with permission.
-// http://blindsignals.com/index.php/2009/07/jquery-delay/
-jQuery.fn.delay = function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
-};
-
-
-(function() {
- var input = document.createElement( "input" ),
- select = document.createElement( "select" ),
- opt = select.appendChild( document.createElement( "option" ) );
-
- input.type = "checkbox";
-
- // Support: iOS 5.1, Android 4.x, Android 2.3
- // Check the default checkbox/radio value ("" on old WebKit; "on" elsewhere)
- support.checkOn = input.value !== "";
-
- // Must access the parent to make an option select properly
- // Support: IE9, IE10
- support.optSelected = opt.selected;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Check if an input maintains its value after becoming a radio
- // Support: IE9, IE10
- input = document.createElement( "input" );
- input.value = "t";
- input.type = "radio";
- support.radioValue = input.value === "t";
-})();
-
-
-var nodeHook, boolHook,
- attrHandle = jQuery.expr.attrHandle;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- }
-});
-
-jQuery.extend({
- attr: function( elem, name, value ) {
- var hooks, ret,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === strundefined ) {
- return jQuery.prop( elem, name, value );
- }
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] ||
- ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- ret = jQuery.find.attr( elem, name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
- // Set corresponding property to false
- elem[ propName ] = false;
- }
-
- elem.removeAttribute( name );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !support.radioValue && value === "radio" &&
- jQuery.nodeName( elem, "input" ) ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- }
-});
-
-// Hooks for boolean attributes
-boolHook = {
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- elem.setAttribute( name, name );
- }
- return name;
- }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
- var getter = attrHandle[ name ] || jQuery.find.attr;
-
- attrHandle[ name ] = function( elem, name, isXML ) {
- var ret, handle;
- if ( !isXML ) {
- // Avoid an infinite loop by temporarily removing this function from the getter
- handle = attrHandle[ name ];
- attrHandle[ name ] = ret;
- ret = getter( elem, name, isXML ) != null ?
- name.toLowerCase() :
- null;
- attrHandle[ name ] = handle;
- }
- return ret;
- };
-});
-
-
-
-
-var rfocusable = /^(?:input|select|textarea|button)$/i;
-
-jQuery.fn.extend({
- prop: function( name, value ) {
- return access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- return this.each(function() {
- delete this[ jQuery.propFix[ name ] || name ];
- });
- }
-});
-
-jQuery.extend({
- propFix: {
- "for": "htmlFor",
- "class": "className"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
- ret :
- ( elem[ name ] = value );
-
- } else {
- return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
- ret :
- elem[ name ];
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- return elem.hasAttribute( "tabindex" ) || rfocusable.test( elem.nodeName ) || elem.href ?
- elem.tabIndex :
- -1;
- }
- }
- }
-});
-
-// Support: IE9+
-// Selectedness for an option in an optgroup can be inaccurate
-if ( !support.optSelected ) {
- jQuery.propHooks.selected = {
- get: function( elem ) {
- var parent = elem.parentNode;
- if ( parent && parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- return null;
- }
- };
-}
-
-jQuery.each([
- "tabIndex",
- "readOnly",
- "maxLength",
- "cellSpacing",
- "cellPadding",
- "rowSpan",
- "colSpan",
- "useMap",
- "frameBorder",
- "contentEditable"
-], function() {
- jQuery.propFix[ this.toLowerCase() ] = this;
-});
-
-
-
-
-var rclass = /[\t\r\n\f]/g;
-
-jQuery.fn.extend({
- addClass: function( value ) {
- var classes, elem, cur, clazz, j, finalValue,
- proceed = typeof value === "string" && value,
- i = 0,
- len = this.length;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
-
- // only assign if different to avoid unneeded rendering.
- finalValue = jQuery.trim( cur );
- if ( elem.className !== finalValue ) {
- elem.className = finalValue;
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j, finalValue,
- proceed = arguments.length === 0 || typeof value === "string" && value,
- i = 0,
- len = this.length;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
-
- // only assign if different to avoid unneeded rendering.
- finalValue = value ? jQuery.trim( cur ) : "";
- if ( elem.className !== finalValue ) {
- elem.className = finalValue;
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value;
-
- if ( typeof stateVal === "boolean" && type === "string" ) {
- return stateVal ? this.addClass( value ) : this.removeClass( value );
- }
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- classNames = value.match( rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- if ( self.hasClass( className ) ) {
- self.removeClass( className );
- } else {
- self.addClass( className );
- }
- }
-
- // Toggle whole class name
- } else if ( type === strundefined || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- data_priv.set( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : data_priv.get( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- }
-});
-
-
-
-
-var rreturn = /\r/g;
-
-jQuery.fn.extend({
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, jQuery( this ).val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
-
- } else if ( typeof val === "number" ) {
- val += "";
-
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map( val, function( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- var val = jQuery.find.attr( elem, "value" );
- return val != null ?
- val :
- // Support: IE10-11+
- // option.text throws exceptions (#14686, #14858)
- jQuery.trim( jQuery.text( elem ) );
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // IE6-9 doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( support.optDisabled ? !option.disabled : option.getAttribute( "disabled" ) === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var optionSet, option,
- options = elem.options,
- values = jQuery.makeArray( value ),
- i = options.length;
-
- while ( i-- ) {
- option = options[ i ];
- if ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {
- optionSet = true;
- }
- }
-
- // force browsers to behave consistently when non-matching value is set
- if ( !optionSet ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- }
-});
-
-// Radios and checkboxes getter/setter
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- };
- if ( !support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- // Support: Webkit
- // "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- };
- }
-});
-
-
-
-
-// Return jQuery for attributes-only inclusion
-
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-});
-
-jQuery.fn.extend({
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- }
-});
-
-
-var nonce = jQuery.now();
-
-var rquery = (/\?/);
-
-
-
-// Support: Android 2.3
-// Workaround failure to string-cast null input
-jQuery.parseJSON = function( data ) {
- return JSON.parse( data + "" );
-};
-
-
-// Cross-browser xml parsing
-jQuery.parseXML = function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
-
- // Support: IE9
- try {
- tmp = new DOMParser();
- xml = tmp.parseFromString( data, "text/xml" );
- } catch ( e ) {
- xml = undefined;
- }
-
- if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
-};
-
-
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
-
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if ( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes;
-
- // Remove auto dataType and get content-type in the process
- while ( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
- var conv2, current, conv, tmp, prev,
- converters = {},
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice();
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- current = dataTypes.shift();
-
- // Convert to each sequential dataType
- while ( current ) {
-
- if ( s.responseFields[ current ] ) {
- jqXHR[ s.responseFields[ current ] ] = response;
- }
-
- // Apply the dataFilter if provided
- if ( !prev && isSuccess && s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- prev = current;
- current = dataTypes.shift();
-
- if ( current ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current === "*" ) {
-
- current = prev;
-
- // Convert response if prev dataType is non-auto and differs from current
- } else if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split( " " );
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.unshift( tmp[ 1 ] );
- }
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s[ "throws" ] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
- }
- }
-
- return { state: "success", data: response };
-}
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var transport,
- // URL without anti-cache param
- cacheURL,
- // Response headers
- responseHeadersString,
- responseHeaders,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (prefilters might expect it)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" )
- .replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Determine if successful
- isSuccess = status >= 200 && status < 300 || status === 304;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // Convert no matter what (that way responseXXX fields are always set)
- response = ajaxConvert( s, response, jqXHR, isSuccess );
-
- // If successful, handle type chaining
- if ( isSuccess ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // if no content
- if ( status === 204 || s.type === "HEAD" ) {
- statusText = "nocontent";
-
- // if not modified
- } else if ( status === 304 ) {
- statusText = "notmodified";
-
- // If we have data, let's convert it
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- }
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ) {
- jQuery.fn[ type ] = function( fn ) {
- return this.on( type, fn );
- };
-});
-
-
-jQuery._evalUrl = function( url ) {
- return jQuery.ajax({
- url: url,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
-};
-
-
-jQuery.fn.extend({
- wrapAll: function( html ) {
- var wrap;
-
- if ( jQuery.isFunction( html ) ) {
- return this.each(function( i ) {
- jQuery( this ).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[ 0 ] ) {
-
- // The elements to wrap the target around
- wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
-
- if ( this[ 0 ].parentNode ) {
- wrap.insertBefore( this[ 0 ] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstElementChild ) {
- elem = elem.firstElementChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function( i ) {
- jQuery( this ).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function( i ) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- }
-});
-
-
-jQuery.expr.filters.hidden = function( elem ) {
- // Support: Opera <= 12.12
- // Opera reports offsetWidths and offsetHeights less than zero on some elements
- return elem.offsetWidth <= 0 && elem.offsetHeight <= 0;
-};
-jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
-};
-
-
-
-
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-
-// Serialize an array of form elements or a set of
-// key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function() {
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function() {
- var type = this.type;
-
- // Use .is( ":disabled" ) so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !rcheckableType.test( type ) );
- })
- .map(function( i, elem ) {
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ) {
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-
-jQuery.ajaxSettings.xhr = function() {
- try {
- return new XMLHttpRequest();
- } catch( e ) {}
-};
-
-var xhrId = 0,
- xhrCallbacks = {},
- xhrSuccessStatus = {
- // file protocol always yields status code 0, assume 200
- 0: 200,
- // Support: IE9
- // #1450: sometimes IE returns 1223 when it should be 204
- 1223: 204
- },
- xhrSupported = jQuery.ajaxSettings.xhr();
-
-// Support: IE9
-// Open requests must be manually aborted on unload (#5280)
-if ( window.ActiveXObject ) {
- jQuery( window ).on( "unload", function() {
- for ( var key in xhrCallbacks ) {
- xhrCallbacks[ key ]();
- }
- });
-}
-
-support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-support.ajax = xhrSupported = !!xhrSupported;
-
-jQuery.ajaxTransport(function( options ) {
- var callback;
-
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( support.cors || xhrSupported && !options.crossDomain ) {
- return {
- send: function( headers, complete ) {
- var i,
- xhr = options.xhr(),
- id = ++xhrId;
-
- xhr.open( options.type, options.url, options.async, options.username, options.password );
-
- // Apply custom fields if provided
- if ( options.xhrFields ) {
- for ( i in options.xhrFields ) {
- xhr[ i ] = options.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( options.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( options.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !options.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Set headers
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
-
- // Callback
- callback = function( type ) {
- return function() {
- if ( callback ) {
- delete xhrCallbacks[ id ];
- callback = xhr.onload = xhr.onerror = null;
-
- if ( type === "abort" ) {
- xhr.abort();
- } else if ( type === "error" ) {
- complete(
- // file: protocol always yields status 0; see #8605, #14207
- xhr.status,
- xhr.statusText
- );
- } else {
- complete(
- xhrSuccessStatus[ xhr.status ] || xhr.status,
- xhr.statusText,
- // Support: IE9
- // Accessing binary-data responseText throws an exception
- // (#11426)
- typeof xhr.responseText === "string" ? {
- text: xhr.responseText
- } : undefined,
- xhr.getAllResponseHeaders()
- );
- }
- }
- };
- };
-
- // Listen to events
- xhr.onload = callback();
- xhr.onerror = callback("error");
-
- // Create the abort callback
- callback = xhrCallbacks[ id ] = callback("abort");
-
- try {
- // Do send the request (this may raise an exception)
- xhr.send( options.hasContent && options.data || null );
- } catch ( e ) {
- // #14683: Only rethrow if this hasn't been notified as an error yet
- if ( callback ) {
- throw e;
- }
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback();
- }
- }
- };
- }
-});
-
-
-
-
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and crossDomain
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function( s ) {
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
- var script, callback;
- return {
- send: function( _, complete ) {
- script = jQuery("<script>").prop({
- async: true,
- charset: s.scriptCharset,
- src: s.url
- }).on(
- "load error",
- callback = function( evt ) {
- script.remove();
- callback = null;
- if ( evt ) {
- complete( evt.type === "error" ? 404 : 200, evt.type );
- }
- }
- );
- document.head.appendChild( script[ 0 ] );
- },
- abort: function() {
- if ( callback ) {
- callback();
- }
- }
- };
- }
-});
-
-
-
-
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-
-
-
-
-// data: string of html
-// context (optional): If specified, the fragment will be created in this context, defaults to document
-// keepScripts (optional): If true, will include scripts passed in the html string
-jQuery.parseHTML = function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
-
- if ( scripts && scripts.length ) {
- jQuery( scripts ).remove();
- }
-
- return jQuery.merge( [], parsed.childNodes );
-};
-
-
-// Keep a copy of the old load method
-var _load = jQuery.fn.load;
-
-/**
- * Load a url into a page
- */
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = jQuery.trim( url.slice( off ) );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-
-
-
-jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
-};
-
-
-
-
-var docElem = window.document.documentElement;
-
-/**
- * Gets a window from an element
- */
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
-}
-
-jQuery.offset = {
- setOffset: function( elem, options, i ) {
- var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
- position = jQuery.css( elem, "position" ),
- curElem = jQuery( elem ),
- props = {};
-
- // Set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- curOffset = curElem.offset();
- curCSSTop = jQuery.css( elem, "top" );
- curCSSLeft = jQuery.css( elem, "left" );
- calculatePosition = ( position === "absolute" || position === "fixed" ) &&
- ( curCSSTop + curCSSLeft ).indexOf("auto") > -1;
-
- // Need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
-
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
-
- } else {
- curElem.css( props );
- }
- }
-};
-
-jQuery.fn.extend({
- offset: function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- elem = this[ 0 ],
- box = { top: 0, left: 0 },
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== strundefined ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + win.pageYOffset - docElem.clientTop,
- left: box.left + win.pageXOffset - docElem.clientLeft
- };
- },
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- elem = this[ 0 ],
- parentOffset = { top: 0, left: 0 };
-
- // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // We assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
-
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || docElem;
-
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position" ) === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
-
- return offsetParent || docElem;
- });
- }
-});
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
- var top = "pageYOffset" === prop;
-
- jQuery.fn[ method ] = function( val ) {
- return access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? win[ prop ] : elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : window.pageXOffset,
- top ? val : window.pageYOffset
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-// Add the top/left cssHooks using jQuery.fn.position
-// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
-// getComputedStyle returns percent when specified for top/left/bottom/right
-// rather than make the css module depend on the offset module, we just check for it here
-jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
- function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- );
-});
-
-
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
- // whichever is greatest
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-
-
-// The number of elements contained in the matched element set
-jQuery.fn.size = function() {
- return this.length;
-};
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-
-
-
-// Register as a named AMD module, since jQuery can be concatenated with other
-// files that may use define, but not via a proper concatenation script that
-// understands anonymous AMD modules. A named AMD is safest and most robust
-// way to register. Lowercase jquery is used because AMD module names are
-// derived from file names, and jQuery is normally delivered in a lowercase
-// file name. Do this after creating the global so that if an AMD module wants
-// to call noConflict to hide this version of jQuery, it will work.
-
-// Note that for maximum portability, libraries that are not jQuery should
-// declare themselves as anonymous modules, and avoid setting a global if an
-// AMD loader is present. jQuery is a special case. For more information, see
-// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
-
-if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function() {
- return jQuery;
- });
-}
-
-
-
-
-var
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$;
-
-jQuery.noConflict = function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
-};
-
-// Expose jQuery and $ identifiers, even in
-// AMD (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
-// and CommonJS for browser emulators (#13566)
-if ( typeof noGlobal === strundefined ) {
- window.jQuery = window.$ = jQuery;
-}
-
-
-
-
-return jQuery;
-
-}));
-
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, document){
- var _jQuery = window.jQuery.noConflict(true);
-
-/**
- * @description
- *
- * This object provides a utility for producing rich Error messages within
- * Angular. It can be called as follows:
- *
- * var exampleMinErr = minErr('example');
- * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
- *
- * The above creates an instance of minErr in the example namespace. The
- * resulting error will have a namespaced error code of example.one. The
- * resulting error will replace {0} with the value of foo, and {1} with the
- * value of bar. The object is not restricted in the number of arguments it can
- * take.
- *
- * If fewer arguments are specified than necessary for interpolation, the extra
- * interpolation markers will be preserved in the final string.
- *
- * Since data will be parsed statically during a build step, some restrictions
- * are applied with respect to how minErr instances are created and called.
- * Instances should have names of the form namespaceMinErr for a minErr created
- * using minErr('namespace') . Error codes, namespaces and template strings
- * should all be static strings, not variables or general expressions.
- *
- * @param {string} module The namespace to use for the new minErr instance.
- * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
- * error from returned function, for cases when a particular type of error is useful.
- * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
- */
-
-function minErr(module, ErrorConstructor) {
- ErrorConstructor = ErrorConstructor || Error;
- return function() {
- var SKIP_INDEXES = 2;
-
- var templateArgs = arguments,
- code = templateArgs[0],
- message = '[' + (module ? module + ':' : '') + code + '] ',
- template = templateArgs[1],
- paramPrefix, i;
-
- message += template.replace(/\{\d+\}/g, function(match) {
- var index = +match.slice(1, -1),
- shiftedIndex = index + SKIP_INDEXES;
-
- if (shiftedIndex < templateArgs.length) {
- return toDebugString(templateArgs[shiftedIndex]);
- }
-
- return match;
- });
-
- message += '\nhttp://errors.angularjs.org/1.4.8/' +
- (module ? module + '/' : '') + code;
-
- for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
- message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
- encodeURIComponent(toDebugString(templateArgs[i]));
- }
-
- return new ErrorConstructor(message);
- };
-}
-
-/* We need to tell jshint what variables are being exported */
-/* global angular: true,
- msie: true,
- jqLite: true,
- jQuery: true,
- slice: true,
- splice: true,
- push: true,
- toString: true,
- ngMinErr: true,
- angularModule: true,
- uid: true,
- REGEX_STRING_REGEXP: true,
- VALIDITY_STATE_PROPERTY: true,
-
- lowercase: true,
- uppercase: true,
- manualLowercase: true,
- manualUppercase: true,
- nodeName_: true,
- isArrayLike: true,
- forEach: true,
- forEachSorted: true,
- reverseParams: true,
- nextUid: true,
- setHashKey: true,
- extend: true,
- toInt: true,
- inherit: true,
- merge: true,
- noop: true,
- identity: true,
- valueFn: true,
- isUndefined: true,
- isDefined: true,
- isObject: true,
- isBlankObject: true,
- isString: true,
- isNumber: true,
- isDate: true,
- isArray: true,
- isFunction: true,
- isRegExp: true,
- isWindow: true,
- isScope: true,
- isFile: true,
- isFormData: true,
- isBlob: true,
- isBoolean: true,
- isPromiseLike: true,
- trim: true,
- escapeForRegexp: true,
- isElement: true,
- makeMap: true,
- includes: true,
- arrayRemove: true,
- copy: true,
- shallowCopy: true,
- equals: true,
- csp: true,
- jq: true,
- concat: true,
- sliceArgs: true,
- bind: true,
- toJsonReplacer: true,
- toJson: true,
- fromJson: true,
- convertTimezoneToLocal: true,
- timezoneToOffset: true,
- startingTag: true,
- tryDecodeURIComponent: true,
- parseKeyValue: true,
- toKeyValue: true,
- encodeUriSegment: true,
- encodeUriQuery: true,
- angularInit: true,
- bootstrap: true,
- getTestability: true,
- snake_case: true,
- bindJQuery: true,
- assertArg: true,
- assertArgFn: true,
- assertNotHasOwnProperty: true,
- getter: true,
- getBlockNodes: true,
- hasOwnProperty: true,
- createMap: true,
-
- NODE_TYPE_ELEMENT: true,
- NODE_TYPE_ATTRIBUTE: true,
- NODE_TYPE_TEXT: true,
- NODE_TYPE_COMMENT: true,
- NODE_TYPE_DOCUMENT: true,
- NODE_TYPE_DOCUMENT_FRAGMENT: true,
-*/
-
-////////////////////////////////////
-
-/**
- * @ngdoc module
- * @name ng
- * @module ng
- * @description
- *
- * # ng (core module)
- * The ng module is loaded by default when an AngularJS application is started. The module itself
- * contains the essential components for an AngularJS application to function. The table below
- * lists a high level breakdown of each of the services/factories, filters, directives and testing
- * components available within this core module.
- *
- * <div doc-module-components="ng"></div>
- */
-
-var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
-
-// The name of a form control's ValidityState property.
-// This is used so that it's possible for internal tests to create mock ValidityStates.
-var VALIDITY_STATE_PROPERTY = 'validity';
-
-/**
- * @ngdoc function
- * @name angular.lowercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to lowercase.
- * @param {string} string String to be converted to lowercase.
- * @returns {string} Lowercased string.
- */
-var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * @ngdoc function
- * @name angular.uppercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to uppercase.
- * @param {string} string String to be converted to uppercase.
- * @returns {string} Uppercased string.
- */
-var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
-
-
-var manualLowercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
- : s;
-};
-var manualUppercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
- : s;
-};
-
-
-// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
-// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
-// with correct but slower alternatives.
-if ('i' !== 'I'.toLowerCase()) {
- lowercase = manualLowercase;
- uppercase = manualUppercase;
-}
-
-
-var
- msie, // holds major version number for IE, or NaN if UA is not IE.
- jqLite, // delay binding since jQuery could be loaded after us.
- jQuery, // delay binding
- slice = [].slice,
- splice = [].splice,
- push = [].push,
- toString = Object.prototype.toString,
- getPrototypeOf = Object.getPrototypeOf,
- ngMinErr = minErr('ng'),
-
- /** @name angular */
- angular = window.angular || (window.angular = {}),
- angularModule,
- uid = 0;
-
-/**
- * documentMode is an IE-only property
- * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx
- */
-msie = document.documentMode;
-
-
-/**
- * @private
- * @param {*} obj
- * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
- * String ...)
- */
-function isArrayLike(obj) {
-
- // `null`, `undefined` and `window` are not array-like
- if (obj == null || isWindow(obj)) return false;
-
- // arrays, strings and jQuery/jqLite objects are array like
- // * jqLite is either the jQuery or jqLite constructor function
- // * we have to check the existance of jqLite first as this method is called
- // via the forEach method when constructing the jqLite object in the first place
- if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // "length" in obj used to prevent JIT error (gh-11508)
- var length = "length" in Object(obj) && obj.length;
-
- // NodeList objects (with `item` method) and
- // other objects with suitable length characteristics are array-like
- return isNumber(length) &&
- (length >= 0 && (length - 1) in obj || typeof obj.item == 'function');
-}
-
-/**
- * @ngdoc function
- * @name angular.forEach
- * @module ng
- * @kind function
- *
- * @description
- * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
- * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
- * is the value of an object property or an array element, `key` is the object property key or
- * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.
- *
- * It is worth noting that `.forEach` does not iterate over inherited properties because it filters
- * using the `hasOwnProperty` method.
- *
- * Unlike ES262's
- * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),
- * Providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just
- * return the value provided.
- *
- ```js
- var values = {name: 'misko', gender: 'male'};
- var log = [];
- angular.forEach(values, function(value, key) {
- this.push(key + ': ' + value);
- }, log);
- expect(log).toEqual(['name: misko', 'gender: male']);
- ```
- *
- * @param {Object|Array} obj Object to iterate over.
- * @param {Function} iterator Iterator function.
- * @param {Object=} context Object to become context (`this`) for the iterator function.
- * @returns {Object|Array} Reference to `obj`.
- */
-
-function forEach(obj, iterator, context) {
- var key, length;
- if (obj) {
- if (isFunction(obj)) {
- for (key in obj) {
- // Need to check if hasOwnProperty exists,
- // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
- if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else if (isArray(obj) || isArrayLike(obj)) {
- var isPrimitive = typeof obj !== 'object';
- for (key = 0, length = obj.length; key < length; key++) {
- if (isPrimitive || key in obj) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else if (obj.forEach && obj.forEach !== forEach) {
- obj.forEach(iterator, context, obj);
- } else if (isBlankObject(obj)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in obj) {
- iterator.call(context, obj[key], key, obj);
- }
- } else if (typeof obj.hasOwnProperty === 'function') {
- // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else {
- // Slow path for objects which do not have a method `hasOwnProperty`
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- }
- }
- return obj;
-}
-
-function forEachSorted(obj, iterator, context) {
- var keys = Object.keys(obj).sort();
- for (var i = 0; i < keys.length; i++) {
- iterator.call(context, obj[keys[i]], keys[i]);
- }
- return keys;
-}
-
-
-/**
- * when using forEach the params are value, key, but it is often useful to have key, value.
- * @param {function(string, *)} iteratorFn
- * @returns {function(*, string)}
- */
-function reverseParams(iteratorFn) {
- return function(value, key) { iteratorFn(key, value); };
-}
-
-/**
- * A consistent way of creating unique IDs in angular.
- *
- * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before
- * we hit number precision issues in JavaScript.
- *
- * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M
- *
- * @returns {number} an unique alpha-numeric string
- */
-function nextUid() {
- return ++uid;
-}
-
-
-/**
- * Set or clear the hashkey for an object.
- * @param obj object
- * @param h the hashkey (!truthy to delete the hashkey)
- */
-function setHashKey(obj, h) {
- if (h) {
- obj.$$hashKey = h;
- } else {
- delete obj.$$hashKey;
- }
-}
-
-
-function baseExtend(dst, objs, deep) {
- var h = dst.$$hashKey;
-
- for (var i = 0, ii = objs.length; i < ii; ++i) {
- var obj = objs[i];
- if (!isObject(obj) && !isFunction(obj)) continue;
- var keys = Object.keys(obj);
- for (var j = 0, jj = keys.length; j < jj; j++) {
- var key = keys[j];
- var src = obj[key];
-
- if (deep && isObject(src)) {
- if (isDate(src)) {
- dst[key] = new Date(src.valueOf());
- } else if (isRegExp(src)) {
- dst[key] = new RegExp(src);
- } else if (src.nodeName) {
- dst[key] = src.cloneNode(true);
- } else if (isElement(src)) {
- dst[key] = src.clone();
- } else {
- if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
- baseExtend(dst[key], [src], true);
- }
- } else {
- dst[key] = src;
- }
- }
- }
-
- setHashKey(dst, h);
- return dst;
-}
-
-/**
- * @ngdoc function
- * @name angular.extend
- * @module ng
- * @kind function
- *
- * @description
- * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
- * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
- * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.
- *
- * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use
- * {@link angular.merge} for this.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- * @returns {Object} Reference to `dst`.
- */
-function extend(dst) {
- return baseExtend(dst, slice.call(arguments, 1), false);
-}
-
-
-/**
-* @ngdoc function
-* @name angular.merge
-* @module ng
-* @kind function
-*
-* @description
-* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
-* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
-* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.
-*
-* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source
-* objects, performing a deep copy.
-*
-* @param {Object} dst Destination object.
-* @param {...Object} src Source object(s).
-* @returns {Object} Reference to `dst`.
-*/
-function merge(dst) {
- return baseExtend(dst, slice.call(arguments, 1), true);
-}
-
-
-
-function toInt(str) {
- return parseInt(str, 10);
-}
-
-
-function inherit(parent, extra) {
- return extend(Object.create(parent), extra);
-}
-
-/**
- * @ngdoc function
- * @name angular.noop
- * @module ng
- * @kind function
- *
- * @description
- * A function that performs no operations. This function can be useful when writing code in the
- * functional style.
- ```js
- function foo(callback) {
- var result = calculateResult();
- (callback || angular.noop)(result);
- }
- ```
- */
-function noop() {}
-noop.$inject = [];
-
-
-/**
- * @ngdoc function
- * @name angular.identity
- * @module ng
- * @kind function
- *
- * @description
- * A function that returns its first argument. This function is useful when writing code in the
- * functional style.
- *
- ```js
- function transformer(transformationFn, value) {
- return (transformationFn || angular.identity)(value);
- };
- ```
- * @param {*} value to be returned.
- * @returns {*} the value passed in.
- */
-function identity($) {return $;}
-identity.$inject = [];
-
-
-function valueFn(value) {return function() {return value;};}
-
-function hasCustomToString(obj) {
- return isFunction(obj.toString) && obj.toString !== toString;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isUndefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is undefined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is undefined.
- */
-function isUndefined(value) {return typeof value === 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is defined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is defined.
- */
-function isDefined(value) {return typeof value !== 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isObject
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
- * considered to be objects. Note that JavaScript arrays are objects.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Object` but not `null`.
- */
-function isObject(value) {
- // http://jsperf.com/isobject4
- return value !== null && typeof value === 'object';
-}
-
-
-/**
- * Determine if a value is an object with a null prototype
- *
- * @returns {boolean} True if `value` is an `Object` with a null prototype
- */
-function isBlankObject(value) {
- return value !== null && typeof value === 'object' && !getPrototypeOf(value);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isString
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `String`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `String`.
- */
-function isString(value) {return typeof value === 'string';}
-
-
-/**
- * @ngdoc function
- * @name angular.isNumber
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Number`.
- *
- * This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
- *
- * If you wish to exclude these then you can use the native
- * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
- * method.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Number`.
- */
-function isNumber(value) {return typeof value === 'number';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDate
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a value is a date.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Date`.
- */
-function isDate(value) {
- return toString.call(value) === '[object Date]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isArray
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Array`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Array`.
- */
-var isArray = Array.isArray;
-
-/**
- * @ngdoc function
- * @name angular.isFunction
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Function`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Function`.
- */
-function isFunction(value) {return typeof value === 'function';}
-
-
-/**
- * Determines if a value is a regular expression object.
- *
- * @private
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `RegExp`.
- */
-function isRegExp(value) {
- return toString.call(value) === '[object RegExp]';
-}
-
-
-/**
- * Checks if `obj` is a window object.
- *
- * @private
- * @param {*} obj Object to check
- * @returns {boolean} True if `obj` is a window obj.
- */
-function isWindow(obj) {
- return obj && obj.window === obj;
-}
-
-
-function isScope(obj) {
- return obj && obj.$evalAsync && obj.$watch;
-}
-
-
-function isFile(obj) {
- return toString.call(obj) === '[object File]';
-}
-
-
-function isFormData(obj) {
- return toString.call(obj) === '[object FormData]';
-}
-
-
-function isBlob(obj) {
- return toString.call(obj) === '[object Blob]';
-}
-
-
-function isBoolean(value) {
- return typeof value === 'boolean';
-}
-
-
-function isPromiseLike(obj) {
- return obj && isFunction(obj.then);
-}
-
-
-var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;
-function isTypedArray(value) {
- return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));
-}
-
-
-var trim = function(value) {
- return isString(value) ? value.trim() : value;
-};
-
-// Copied from:
-// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
-// Prereq: s is a string.
-var escapeForRegexp = function(s) {
- return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
- replace(/\x08/g, '\\x08');
-};
-
-
-/**
- * @ngdoc function
- * @name angular.isElement
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a DOM element (or wrapped jQuery element).
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
- */
-function isElement(node) {
- return !!(node &&
- (node.nodeName // we are a direct element
- || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API
-}
-
-/**
- * @param str 'key1,key2,...'
- * @returns {object} in the form of {key1:true, key2:true, ...}
- */
-function makeMap(str) {
- var obj = {}, items = str.split(","), i;
- for (i = 0; i < items.length; i++) {
- obj[items[i]] = true;
- }
- return obj;
-}
-
-
-function nodeName_(element) {
- return lowercase(element.nodeName || (element[0] && element[0].nodeName));
-}
-
-function includes(array, obj) {
- return Array.prototype.indexOf.call(array, obj) != -1;
-}
-
-function arrayRemove(array, value) {
- var index = array.indexOf(value);
- if (index >= 0) {
- array.splice(index, 1);
- }
- return index;
-}
-
-/**
- * @ngdoc function
- * @name angular.copy
- * @module ng
- * @kind function
- *
- * @description
- * Creates a deep copy of `source`, which should be an object or an array.
- *
- * * If no destination is supplied, a copy of the object or array is created.
- * * If a destination is provided, all of its elements (for arrays) or properties (for objects)
- * are deleted and then all elements/properties from the source are copied to it.
- * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
- * * If `source` is identical to 'destination' an exception will be thrown.
- *
- * @param {*} source The source that will be used to make a copy.
- * Can be any type, including primitives, `null`, and `undefined`.
- * @param {(Object|Array)=} destination Destination into which the source is copied. If
- * provided, must be of the same type as `source`.
- * @returns {*} The copy or updated `destination`, if `destination` was specified.
- *
- * @example
- <example module="copyExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form novalidate class="simple-form">
- Name: <input type="text" ng-model="user.name" /><br />
- E-mail: <input type="email" ng-model="user.email" /><br />
- Gender: <input type="radio" ng-model="user.gender" value="male" />male
- <input type="radio" ng-model="user.gender" value="female" />female<br />
- <button ng-click="reset()">RESET</button>
- <button ng-click="update(user)">SAVE</button>
- </form>
- <pre>form = {{user | json}}</pre>
- <pre>master = {{master | json}}</pre>
- </div>
-
- <script>
- angular.module('copyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.master= {};
-
- $scope.update = function(user) {
- // Example with 1 argument
- $scope.master= angular.copy(user);
- };
-
- $scope.reset = function() {
- // Example with 2 arguments
- angular.copy($scope.master, $scope.user);
- };
-
- $scope.reset();
- }]);
- </script>
- </file>
- </example>
- */
-function copy(source, destination) {
- var stackSource = [];
- var stackDest = [];
-
- if (destination) {
- if (isTypedArray(destination)) {
- throw ngMinErr('cpta', "Can't copy! TypedArray destination cannot be mutated.");
- }
- if (source === destination) {
- throw ngMinErr('cpi', "Can't copy! Source and destination are identical.");
- }
-
- // Empty the destination object
- if (isArray(destination)) {
- destination.length = 0;
- } else {
- forEach(destination, function(value, key) {
- if (key !== '$$hashKey') {
- delete destination[key];
- }
- });
- }
-
- stackSource.push(source);
- stackDest.push(destination);
- return copyRecurse(source, destination);
- }
-
- return copyElement(source);
-
- function copyRecurse(source, destination) {
- var h = destination.$$hashKey;
- var result, key;
- if (isArray(source)) {
- for (var i = 0, ii = source.length; i < ii; i++) {
- destination.push(copyElement(source[i]));
- }
- } else if (isBlankObject(source)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in source) {
- destination[key] = copyElement(source[key]);
- }
- } else if (source && typeof source.hasOwnProperty === 'function') {
- // Slow path, which must rely on hasOwnProperty
- for (key in source) {
- if (source.hasOwnProperty(key)) {
- destination[key] = copyElement(source[key]);
- }
- }
- } else {
- // Slowest path --- hasOwnProperty can't be called as a method
- for (key in source) {
- if (hasOwnProperty.call(source, key)) {
- destination[key] = copyElement(source[key]);
- }
- }
- }
- setHashKey(destination, h);
- return destination;
- }
-
- function copyElement(source) {
- // Simple values
- if (!isObject(source)) {
- return source;
- }
-
- // Already copied values
- var index = stackSource.indexOf(source);
- if (index !== -1) {
- return stackDest[index];
- }
-
- if (isWindow(source) || isScope(source)) {
- throw ngMinErr('cpws',
- "Can't copy! Making copies of Window or Scope instances is not supported.");
- }
-
- var needsRecurse = false;
- var destination;
-
- if (isArray(source)) {
- destination = [];
- needsRecurse = true;
- } else if (isTypedArray(source)) {
- destination = new source.constructor(source);
- } else if (isDate(source)) {
- destination = new Date(source.getTime());
- } else if (isRegExp(source)) {
- destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
- destination.lastIndex = source.lastIndex;
- } else if (isFunction(source.cloneNode)) {
- destination = source.cloneNode(true);
- } else {
- destination = Object.create(getPrototypeOf(source));
- needsRecurse = true;
- }
-
- stackSource.push(source);
- stackDest.push(destination);
-
- return needsRecurse
- ? copyRecurse(source, destination)
- : destination;
- }
-}
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.equals
- * @module ng
- * @kind function
- *
- * @description
- * Determines if two objects or two values are equivalent. Supports value types, regular
- * expressions, arrays and objects.
- *
- * Two objects or values are considered equivalent if at least one of the following is true:
- *
- * * Both objects or values pass `===` comparison.
- * * Both objects or values are of the same type and all of their properties are equal by
- * comparing them with `angular.equals`.
- * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
- * * Both values represent the same regular expression (In JavaScript,
- * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
- * representation matches).
- *
- * During a property comparison, properties of `function` type and properties with names
- * that begin with `$` are ignored.
- *
- * Scope and DOMWindow objects are being compared only by identify (`===`).
- *
- * @param {*} o1 Object or value to compare.
- * @param {*} o2 Object or value to compare.
- * @returns {boolean} True if arguments are equal.
- */
-function equals(o1, o2) {
- if (o1 === o2) return true;
- if (o1 === null || o2 === null) return false;
- if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
- var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
- if (t1 == t2) {
- if (t1 == 'object') {
- if (isArray(o1)) {
- if (!isArray(o2)) return false;
- if ((length = o1.length) == o2.length) {
- for (key = 0; key < length; key++) {
- if (!equals(o1[key], o2[key])) return false;
- }
- return true;
- }
- } else if (isDate(o1)) {
- if (!isDate(o2)) return false;
- return equals(o1.getTime(), o2.getTime());
- } else if (isRegExp(o1)) {
- return isRegExp(o2) ? o1.toString() == o2.toString() : false;
- } else {
- if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
- isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
- keySet = createMap();
- for (key in o1) {
- if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
- if (!equals(o1[key], o2[key])) return false;
- keySet[key] = true;
- }
- for (key in o2) {
- if (!(key in keySet) &&
- key.charAt(0) !== '$' &&
- isDefined(o2[key]) &&
- !isFunction(o2[key])) return false;
- }
- return true;
- }
- }
- }
- return false;
-}
-
-var csp = function() {
- if (!isDefined(csp.rules)) {
-
-
- var ngCspElement = (document.querySelector('[ng-csp]') ||
- document.querySelector('[data-ng-csp]'));
-
- if (ngCspElement) {
- var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
- ngCspElement.getAttribute('data-ng-csp');
- csp.rules = {
- noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),
- noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)
- };
- } else {
- csp.rules = {
- noUnsafeEval: noUnsafeEval(),
- noInlineStyle: false
- };
- }
- }
-
- return csp.rules;
-
- function noUnsafeEval() {
- try {
- /* jshint -W031, -W054 */
- new Function('');
- /* jshint +W031, +W054 */
- return false;
- } catch (e) {
- return true;
- }
- }
-};
-
-/**
- * @ngdoc directive
- * @module ng
- * @name ngJq
- *
- * @element ANY
- * @param {string=} ngJq the name of the library available under `window`
- * to be used for angular.element
- * @description
- * Use this directive to force the angular.element library. This should be
- * used to force either jqLite by leaving ng-jq blank or setting the name of
- * the jquery variable under window (eg. jQuery).
- *
- * Since angular looks for this directive when it is loaded (doesn't wait for the
- * DOMContentLoaded event), it must be placed on an element that comes before the script
- * which loads angular. Also, only the first instance of `ng-jq` will be used and all
- * others ignored.
- *
- * @example
- * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-jq>
- ...
- ...
- </html>
- ```
- * @example
- * This example shows how to use a jQuery based library of a different name.
- * The library name must be available at the top most 'window'.
- ```html
- <!doctype html>
- <html ng-app ng-jq="jQueryLib">
- ...
- ...
- </html>
- ```
- */
-var jq = function() {
- if (isDefined(jq.name_)) return jq.name_;
- var el;
- var i, ii = ngAttrPrefixes.length, prefix, name;
- for (i = 0; i < ii; ++i) {
- prefix = ngAttrPrefixes[i];
- if (el = document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]')) {
- name = el.getAttribute(prefix + 'jq');
- break;
- }
- }
-
- return (jq.name_ = name);
-};
-
-function concat(array1, array2, index) {
- return array1.concat(slice.call(array2, index));
-}
-
-function sliceArgs(args, startIndex) {
- return slice.call(args, startIndex || 0);
-}
-
-
-/* jshint -W101 */
-/**
- * @ngdoc function
- * @name angular.bind
- * @module ng
- * @kind function
- *
- * @description
- * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
- * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
- * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
- * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
- *
- * @param {Object} self Context which `fn` should be evaluated in.
- * @param {function()} fn Function to be bound.
- * @param {...*} args Optional arguments to be prebound to the `fn` function call.
- * @returns {function()} Function that wraps the `fn` with all the specified bindings.
- */
-/* jshint +W101 */
-function bind(self, fn) {
- var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
- if (isFunction(fn) && !(fn instanceof RegExp)) {
- return curryArgs.length
- ? function() {
- return arguments.length
- ? fn.apply(self, concat(curryArgs, arguments, 0))
- : fn.apply(self, curryArgs);
- }
- : function() {
- return arguments.length
- ? fn.apply(self, arguments)
- : fn.call(self);
- };
- } else {
- // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
- return fn;
- }
-}
-
-
-function toJsonReplacer(key, value) {
- var val = value;
-
- if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
- val = undefined;
- } else if (isWindow(value)) {
- val = '$WINDOW';
- } else if (value && document === value) {
- val = '$DOCUMENT';
- } else if (isScope(value)) {
- val = '$SCOPE';
- }
-
- return val;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.toJson
- * @module ng
- * @kind function
- *
- * @description
- * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be
- * stripped since angular uses this notation internally.
- *
- * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
- * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.
- * If set to an integer, the JSON output will contain that many spaces per indentation.
- * @returns {string|undefined} JSON-ified string representing `obj`.
- */
-function toJson(obj, pretty) {
- if (typeof obj === 'undefined') return undefined;
- if (!isNumber(pretty)) {
- pretty = pretty ? 2 : null;
- }
- return JSON.stringify(obj, toJsonReplacer, pretty);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.fromJson
- * @module ng
- * @kind function
- *
- * @description
- * Deserializes a JSON string.
- *
- * @param {string} json JSON string to deserialize.
- * @returns {Object|Array|string|number} Deserialized JSON string.
- */
-function fromJson(json) {
- return isString(json)
- ? JSON.parse(json)
- : json;
-}
-
-
-function timezoneToOffset(timezone, fallback) {
- var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
- return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
-}
-
-
-function addDateMinutes(date, minutes) {
- date = new Date(date.getTime());
- date.setMinutes(date.getMinutes() + minutes);
- return date;
-}
-
-
-function convertTimezoneToLocal(date, timezone, reverse) {
- reverse = reverse ? -1 : 1;
- var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
- return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
-}
-
-
-/**
- * @returns {string} Returns the string representation of the element.
- */
-function startingTag(element) {
- element = jqLite(element).clone();
- try {
- // turns out IE does not let you set .html() on elements which
- // are not allowed to have children. So we just ignore it.
- element.empty();
- } catch (e) {}
- var elemHtml = jqLite('<div>').append(element).html();
- try {
- return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
- elemHtml.
- match(/^(<[^>]+>)/)[1].
- replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
- } catch (e) {
- return lowercase(elemHtml);
- }
-
-}
-
-
-/////////////////////////////////////////////////
-
-/**
- * Tries to decode the URI component without throwing an exception.
- *
- * @private
- * @param str value potential URI component to check.
- * @returns {boolean} True if `value` can be decoded
- * with the decodeURIComponent function.
- */
-function tryDecodeURIComponent(value) {
- try {
- return decodeURIComponent(value);
- } catch (e) {
- // Ignore any invalid uri component
- }
-}
-
-
-/**
- * Parses an escaped url query string into key-value pairs.
- * @returns {Object.<string,boolean|Array>}
- */
-function parseKeyValue(/**string*/keyValue) {
- var obj = {};
- forEach((keyValue || "").split('&'), function(keyValue) {
- var splitPoint, key, val;
- if (keyValue) {
- key = keyValue = keyValue.replace(/\+/g,'%20');
- splitPoint = keyValue.indexOf('=');
- if (splitPoint !== -1) {
- key = keyValue.substring(0, splitPoint);
- val = keyValue.substring(splitPoint + 1);
- }
- key = tryDecodeURIComponent(key);
- if (isDefined(key)) {
- val = isDefined(val) ? tryDecodeURIComponent(val) : true;
- if (!hasOwnProperty.call(obj, key)) {
- obj[key] = val;
- } else if (isArray(obj[key])) {
- obj[key].push(val);
- } else {
- obj[key] = [obj[key],val];
- }
- }
- }
- });
- return obj;
-}
-
-function toKeyValue(obj) {
- var parts = [];
- forEach(obj, function(value, key) {
- if (isArray(value)) {
- forEach(value, function(arrayValue) {
- parts.push(encodeUriQuery(key, true) +
- (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
- });
- } else {
- parts.push(encodeUriQuery(key, true) +
- (value === true ? '' : '=' + encodeUriQuery(value, true)));
- }
- });
- return parts.length ? parts.join('&') : '';
-}
-
-
-/**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
-}
-
-
-/**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace(/%3B/gi, ';').
- replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
-}
-
-var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
-
-function getNgAttribute(element, ngAttr) {
- var attr, i, ii = ngAttrPrefixes.length;
- for (i = 0; i < ii; ++i) {
- attr = ngAttrPrefixes[i] + ngAttr;
- if (isString(attr = element.getAttribute(attr))) {
- return attr;
- }
- }
- return null;
-}
-
-/**
- * @ngdoc directive
- * @name ngApp
- * @module ng
- *
- * @element ANY
- * @param {angular.Module} ngApp an optional application
- * {@link angular.module module} name to load.
- * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be
- * created in "strict-di" mode. This means that the application will fail to invoke functions which
- * do not use explicit function annotation (and are thus unsuitable for minification), as described
- * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in
- * tracking down the root of these bugs.
- *
- * @description
- *
- * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
- * designates the **root element** of the application and is typically placed near the root element
- * of the page - e.g. on the `<body>` or `<html>` tags.
- *
- * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
- * found in the document will be used to define the root element to auto-bootstrap as an
- * application. To run multiple applications in an HTML document you must manually bootstrap them using
- * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
- *
- * You can specify an **AngularJS module** to be used as the root module for the application. This
- * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It
- * should contain the application code needed or have dependencies on other modules that will
- * contain the code. See {@link angular.module} for more information.
- *
- * In the example below if the `ngApp` directive were not placed on the `html` element then the
- * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
- * would not be resolved to `3`.
- *
- * `ngApp` is the easiest, and most common way to bootstrap an application.
- *
- <example module="ngAppDemo">
- <file name="index.html">
- <div ng-controller="ngAppDemoController">
- I can add: {{a}} + {{b}} = {{ a+b }}
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- });
- </file>
- </example>
- *
- * Using `ngStrictDi`, you would see something like this:
- *
- <example ng-app-included="true">
- <file name="index.html">
- <div ng-app="ngAppStrictDemo" ng-strict-di>
- <div ng-controller="GoodController1">
- I can add: {{a}} + {{b}} = {{ a+b }}
-
- <p>This renders because the controller does not fail to
- instantiate, by using explicit annotation style (see
- script.js for details)
- </p>
- </div>
-
- <div ng-controller="GoodController2">
- Name: <input ng-model="name"><br />
- Hello, {{name}}!
-
- <p>This renders because the controller does not fail to
- instantiate, by using explicit annotation style
- (see script.js for details)
- </p>
- </div>
-
- <div ng-controller="BadController">
- I can add: {{a}} + {{b}} = {{ a+b }}
-
- <p>The controller could not be instantiated, due to relying
- on automatic function annotations (which are disabled in
- strict mode). As such, the content of this section is not
- interpolated, and there should be an error in your web console.
- </p>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppStrictDemo', [])
- // BadController will fail to instantiate, due to relying on automatic function annotation,
- // rather than an explicit annotation
- .controller('BadController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- })
- // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,
- // due to using explicit annotations using the array style and $inject property, respectively.
- .controller('GoodController1', ['$scope', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- }])
- .controller('GoodController2', GoodController2);
- function GoodController2($scope) {
- $scope.name = "World";
- }
- GoodController2.$inject = ['$scope'];
- </file>
- <file name="style.css">
- div[ng-controller] {
- margin-bottom: 1em;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- border: 1px solid;
- padding: .5em;
- }
- div[ng-controller^=Good] {
- border-color: #d6e9c6;
- background-color: #dff0d8;
- color: #3c763d;
- }
- div[ng-controller^=Bad] {
- border-color: #ebccd1;
- background-color: #f2dede;
- color: #a94442;
- margin-bottom: 0;
- }
- </file>
- </example>
- */
-function angularInit(element, bootstrap) {
- var appElement,
- module,
- config = {};
-
- // The element `element` has priority over any other element
- forEach(ngAttrPrefixes, function(prefix) {
- var name = prefix + 'app';
-
- if (!appElement && element.hasAttribute && element.hasAttribute(name)) {
- appElement = element;
- module = element.getAttribute(name);
- }
- });
- forEach(ngAttrPrefixes, function(prefix) {
- var name = prefix + 'app';
- var candidate;
-
- if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\:') + ']'))) {
- appElement = candidate;
- module = candidate.getAttribute(name);
- }
- });
- if (appElement) {
- config.strictDi = getNgAttribute(appElement, "strict-di") !== null;
- bootstrap(appElement, module ? [module] : [], config);
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.bootstrap
- * @module ng
- * @description
- * Use this function to manually start up angular application.
- *
- * See: {@link guide/bootstrap Bootstrap}
- *
- * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.
- * They must use {@link ng.directive:ngApp ngApp}.
- *
- * Angular will detect if it has been loaded into the browser more than once and only allow the
- * first loaded script to be bootstrapped and will report a warning to the browser console for
- * each of the subsequent scripts. This prevents strange results in applications, where otherwise
- * multiple instances of Angular try to work on the DOM.
- *
- * ```html
- * <!doctype html>
- * <html>
- * <body>
- * <div ng-controller="WelcomeController">
- * {{greeting}}
- * </div>
- *
- * <script src="angular.js"></script>
- * <script>
- * var app = angular.module('demo', [])
- * .controller('WelcomeController', function($scope) {
- * $scope.greeting = 'Welcome!';
- * });
- * angular.bootstrap(document, ['demo']);
- * </script>
- * </body>
- * </html>
- * ```
- *
- * @param {DOMElement} element DOM element which is the root of angular application.
- * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
- * Each item in the array should be the name of a predefined module or a (DI annotated)
- * function that will be invoked by the injector as a `config` block.
- * See: {@link angular.module modules}
- * @param {Object=} config an object for defining configuration options for the application. The
- * following keys are supported:
- *
- * * `strictDi` - disable automatic function annotation for the application. This is meant to
- * assist in finding bugs which break minified code. Defaults to `false`.
- *
- * @returns {auto.$injector} Returns the newly created injector for this app.
- */
-function bootstrap(element, modules, config) {
- if (!isObject(config)) config = {};
- var defaultConfig = {
- strictDi: false
- };
- config = extend(defaultConfig, config);
- var doBootstrap = function() {
- element = jqLite(element);
-
- if (element.injector()) {
- var tag = (element[0] === document) ? 'document' : startingTag(element);
- //Encode angle brackets to prevent input from being sanitized to empty string #8683
- throw ngMinErr(
- 'btstrpd',
- "App Already Bootstrapped with this Element '{0}'",
- tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
- }
-
- modules = modules || [];
- modules.unshift(['$provide', function($provide) {
- $provide.value('$rootElement', element);
- }]);
-
- if (config.debugInfoEnabled) {
- // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
- modules.push(['$compileProvider', function($compileProvider) {
- $compileProvider.debugInfoEnabled(true);
- }]);
- }
-
- modules.unshift('ng');
- var injector = createInjector(modules, config.strictDi);
- injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
- function bootstrapApply(scope, element, compile, injector) {
- scope.$apply(function() {
- element.data('$injector', injector);
- compile(element)(scope);
- });
- }]
- );
- return injector;
- };
-
- var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
- var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
-
- if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {
- config.debugInfoEnabled = true;
- window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');
- }
-
- if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
- return doBootstrap();
- }
-
- window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
- angular.resumeBootstrap = function(extraModules) {
- forEach(extraModules, function(module) {
- modules.push(module);
- });
- return doBootstrap();
- };
-
- if (isFunction(angular.resumeDeferredBootstrap)) {
- angular.resumeDeferredBootstrap();
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.reloadWithDebugInfo
- * @module ng
- * @description
- * Use this function to reload the current application with debug information turned on.
- * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.
- *
- * See {@link ng.$compileProvider#debugInfoEnabled} for more.
- */
-function reloadWithDebugInfo() {
- window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;
- window.location.reload();
-}
-
-/**
- * @name angular.getTestability
- * @module ng
- * @description
- * Get the testability service for the instance of Angular on the given
- * element.
- * @param {DOMElement} element DOM element which is the root of angular application.
- */
-function getTestability(rootElement) {
- var injector = angular.element(rootElement).injector();
- if (!injector) {
- throw ngMinErr('test',
- 'no injector found for element argument to getTestability');
- }
- return injector.get('$$testability');
-}
-
-var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator) {
- separator = separator || '_';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
-}
-
-var bindJQueryFired = false;
-var skipDestroyOnNextJQueryCleanData;
-function bindJQuery() {
- var originalCleanData;
-
- if (bindJQueryFired) {
- return;
- }
-
- // bind to jQuery if present;
- var jqName = jq();
- jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)
- !jqName ? undefined : // use jqLite
- window[jqName]; // use jQuery specified by `ngJq`
-
- // Use jQuery if it exists with proper functionality, otherwise default to us.
- // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.
- // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older
- // versions. It will not work for sure with jQuery <1.7, though.
- if (jQuery && jQuery.fn.on) {
- jqLite = jQuery;
- extend(jQuery.fn, {
- scope: JQLitePrototype.scope,
- isolateScope: JQLitePrototype.isolateScope,
- controller: JQLitePrototype.controller,
- injector: JQLitePrototype.injector,
- inheritedData: JQLitePrototype.inheritedData
- });
-
- // All nodes removed from the DOM via various jQuery APIs like .remove()
- // are passed through jQuery.cleanData. Monkey-patch this method to fire
- // the $destroy event on all removed nodes.
- originalCleanData = jQuery.cleanData;
- jQuery.cleanData = function(elems) {
- var events;
- if (!skipDestroyOnNextJQueryCleanData) {
- for (var i = 0, elem; (elem = elems[i]) != null; i++) {
- events = jQuery._data(elem, "events");
- if (events && events.$destroy) {
- jQuery(elem).triggerHandler('$destroy');
- }
- }
- } else {
- skipDestroyOnNextJQueryCleanData = false;
- }
- originalCleanData(elems);
- };
- } else {
- jqLite = JQLite;
- }
-
- angular.element = jqLite;
-
- // Prevent double-proxying.
- bindJQueryFired = true;
-}
-
-/**
- * throw error if the argument is falsy.
- */
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
- }
- return arg;
-}
-
-function assertArgFn(arg, name, acceptArrayAnnotation) {
- if (acceptArrayAnnotation && isArray(arg)) {
- arg = arg[arg.length - 1];
- }
-
- assertArg(isFunction(arg), name, 'not a function, got ' +
- (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
- return arg;
-}
-
-/**
- * throw error if the name given is hasOwnProperty
- * @param {String} name the name to test
- * @param {String} context the context in which the name is used, such as module or directive
- */
-function assertNotHasOwnProperty(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
- }
-}
-
-/**
- * Return the value accessible from the object by path. Any undefined traversals are ignored
- * @param {Object} obj starting object
- * @param {String} path path to traverse
- * @param {boolean} [bindFnToScope=true]
- * @returns {Object} value as accessible by path
- */
-//TODO(misko): this function needs to be removed
-function getter(obj, path, bindFnToScope) {
- if (!path) return obj;
- var keys = path.split('.');
- var key;
- var lastInstance = obj;
- var len = keys.length;
-
- for (var i = 0; i < len; i++) {
- key = keys[i];
- if (obj) {
- obj = (lastInstance = obj)[key];
- }
- }
- if (!bindFnToScope && isFunction(obj)) {
- return bind(lastInstance, obj);
- }
- return obj;
-}
-
-/**
- * Return the DOM siblings between the first and last node in the given array.
- * @param {Array} array like object
- * @returns {Array} the inputted object or a jqLite collection containing the nodes
- */
-function getBlockNodes(nodes) {
- // TODO(perf): update `nodes` instead of creating a new object?
- var node = nodes[0];
- var endNode = nodes[nodes.length - 1];
- var blockNodes;
-
- for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {
- if (blockNodes || nodes[i] !== node) {
- if (!blockNodes) {
- blockNodes = jqLite(slice.call(nodes, 0, i));
- }
- blockNodes.push(node);
- }
- }
-
- return blockNodes || nodes;
-}
-
-
-/**
- * Creates a new object without a prototype. This object is useful for lookup without having to
- * guard against prototypically inherited properties via hasOwnProperty.
- *
- * Related micro-benchmarks:
- * - http://jsperf.com/object-create2
- * - http://jsperf.com/proto-map-lookup/2
- * - http://jsperf.com/for-in-vs-object-keys2
- *
- * @returns {Object}
- */
-function createMap() {
- return Object.create(null);
-}
-
-var NODE_TYPE_ELEMENT = 1;
-var NODE_TYPE_ATTRIBUTE = 2;
-var NODE_TYPE_TEXT = 3;
-var NODE_TYPE_COMMENT = 8;
-var NODE_TYPE_DOCUMENT = 9;
-var NODE_TYPE_DOCUMENT_FRAGMENT = 11;
-
-/**
- * @ngdoc type
- * @name angular.Module
- * @module ng
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- var $injectorMinErr = minErr('$injector');
- var ngMinErr = minErr('ng');
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- var angular = ensure(window, 'angular', Object);
-
- // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
- angular.$$minErr = angular.$$minErr || minErr;
-
- return ensure(angular, 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @module ng
- * @description
- *
- * The `angular.module` is a global place for creating, registering and retrieving Angular
- * modules.
- * All modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- * Passing one argument retrieves an existing {@link angular.Module},
- * whereas passing more than one argument creates a new {@link angular.Module}
- *
- *
- * # Module
- *
- * A module is a collection of services, directives, controllers, filters, and configuration information.
- * `angular.module` is used to configure the {@link auto.$injector $injector}.
- *
- * ```js
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(['$locationProvider', function($locationProvider) {
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * }]);
- * ```
- *
- * Then you can create an injector and load your modules like this:
- *
- * ```js
- * var injector = angular.injector(['ng', 'myModule'])
- * ```
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {!Array.<string>=} requires If specified then new module is being created. If
- * unspecified then the module is being retrieved for further configuration.
- * @param {Function=} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- var assertNotHasOwnProperty = function(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
- }
- };
-
- assertNotHasOwnProperty(name, 'module');
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
- "the module name or forgot to load it. If registering a module ensure that you " +
- "specify the dependencies as the second argument.", name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var configBlocks = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke', 'push', configBlocks);
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _configBlocks: configBlocks,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @module ng
- *
- * @description
- * Holds the list of modules which the injector will load before the current module is
- * loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @module ng
- *
- * @description
- * Name of the module.
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @module ng
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the
- * service.
- * @description
- * See {@link auto.$provide#provider $provide.provider()}.
- */
- provider: invokeLaterAndSetModuleName('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @module ng
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link auto.$provide#factory $provide.factory()}.
- */
- factory: invokeLaterAndSetModuleName('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @module ng
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link auto.$provide#service $provide.service()}.
- */
- service: invokeLaterAndSetModuleName('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @module ng
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link auto.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @module ng
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constants are fixed, they get applied before other provide methods.
- * See {@link auto.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#decorator
- * @module ng
- * @param {string} The name of the service to decorate.
- * @param {Function} This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance.
- * @description
- * See {@link auto.$provide#decorator $provide.decorator()}.
- */
- decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),
-
- /**
- * @ngdoc method
- * @name angular.Module#animation
- * @module ng
- * @param {string} name animation name
- * @param {Function} animationFactory Factory function for creating new instance of an
- * animation.
- * @description
- *
- * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
- *
- *
- * Defines an animation hook that can be later used with
- * {@link $animate $animate} service and directives that use this service.
- *
- * ```js
- * module.animation('.animation-name', function($inject1, $inject2) {
- * return {
- * eventName : function(element, done) {
- * //code to run the animation
- * //once complete, then run done()
- * return function cancellationFunction(element) {
- * //code to cancel the animation
- * }
- * }
- * }
- * })
- * ```
- *
- * See {@link ng.$animateProvider#register $animateProvider.register()} and
- * {@link ngAnimate ngAnimate module} for more information.
- */
- animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @module ng
- * @param {string} name Filter name - this must be a valid angular expression identifier
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- */
- filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @module ng
- * @param {string|Object} name Controller name, or an object map of controllers where the
- * keys are the names and the values are the constructors.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @module ng
- * @param {string|Object} name Directive name, or an object map of directives where the
- * keys are the names and the values are the factories.
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @module ng
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- * For more about how to configure services, see
- * {@link providers#provider-recipe Provider Recipe}.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @module ng
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod, queue) {
- if (!queue) queue = invokeQueue;
- return function() {
- queue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- };
- }
-
- /**
- * @param {string} provider
- * @param {string} method
- * @returns {angular.Module}
- */
- function invokeLaterAndSetModuleName(provider, method) {
- return function(recipeName, factoryFunction) {
- if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;
- invokeQueue.push([provider, method, arguments]);
- return moduleInstance;
- };
- }
- });
- };
- });
-
-}
-
-/* global: toDebugString: true */
-
-function serializeObject(obj) {
- var seen = [];
-
- return JSON.stringify(obj, function(key, val) {
- val = toJsonReplacer(key, val);
- if (isObject(val)) {
-
- if (seen.indexOf(val) >= 0) return '...';
-
- seen.push(val);
- }
- return val;
- });
-}
-
-function toDebugString(obj) {
- if (typeof obj === 'function') {
- return obj.toString().replace(/ \{[\s\S]*$/, '');
- } else if (isUndefined(obj)) {
- return 'undefined';
- } else if (typeof obj !== 'string') {
- return serializeObject(obj);
- }
- return obj;
-}
-
-/* global angularModule: true,
- version: true,
-
- $CompileProvider,
-
- htmlAnchorDirective,
- inputDirective,
- inputDirective,
- formDirective,
- scriptDirective,
- selectDirective,
- styleDirective,
- optionDirective,
- ngBindDirective,
- ngBindHtmlDirective,
- ngBindTemplateDirective,
- ngClassDirective,
- ngClassEvenDirective,
- ngClassOddDirective,
- ngCloakDirective,
- ngControllerDirective,
- ngFormDirective,
- ngHideDirective,
- ngIfDirective,
- ngIncludeDirective,
- ngIncludeFillContentDirective,
- ngInitDirective,
- ngNonBindableDirective,
- ngPluralizeDirective,
- ngRepeatDirective,
- ngShowDirective,
- ngStyleDirective,
- ngSwitchDirective,
- ngSwitchWhenDirective,
- ngSwitchDefaultDirective,
- ngOptionsDirective,
- ngTranscludeDirective,
- ngModelDirective,
- ngListDirective,
- ngChangeDirective,
- patternDirective,
- patternDirective,
- requiredDirective,
- requiredDirective,
- minlengthDirective,
- minlengthDirective,
- maxlengthDirective,
- maxlengthDirective,
- ngValueDirective,
- ngModelOptionsDirective,
- ngAttributeAliasDirectives,
- ngEventDirectives,
-
- $AnchorScrollProvider,
- $AnimateProvider,
- $CoreAnimateCssProvider,
- $$CoreAnimateQueueProvider,
- $$CoreAnimateRunnerProvider,
- $BrowserProvider,
- $CacheFactoryProvider,
- $ControllerProvider,
- $DocumentProvider,
- $ExceptionHandlerProvider,
- $FilterProvider,
- $$ForceReflowProvider,
- $InterpolateProvider,
- $IntervalProvider,
- $$HashMapProvider,
- $HttpProvider,
- $HttpParamSerializerProvider,
- $HttpParamSerializerJQLikeProvider,
- $HttpBackendProvider,
- $xhrFactoryProvider,
- $LocationProvider,
- $LogProvider,
- $ParseProvider,
- $RootScopeProvider,
- $QProvider,
- $$QProvider,
- $$SanitizeUriProvider,
- $SceProvider,
- $SceDelegateProvider,
- $SnifferProvider,
- $TemplateCacheProvider,
- $TemplateRequestProvider,
- $$TestabilityProvider,
- $TimeoutProvider,
- $$RAFProvider,
- $WindowProvider,
- $$jqLiteProvider,
- $$CookieReaderProvider
-*/
-
-
-/**
- * @ngdoc object
- * @name angular.version
- * @module ng
- * @description
- * An object that contains information about the current AngularJS version.
- *
- * This object has the following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
- full: '1.4.8', // all of these placeholder strings will be replaced by grunt's
- major: 1, // package task
- minor: 4,
- dot: 8,
- codeName: 'ice-manipulation'
-};
-
-
-function publishExternalAPI(angular) {
- extend(angular, {
- 'bootstrap': bootstrap,
- 'copy': copy,
- 'extend': extend,
- 'merge': merge,
- 'equals': equals,
- 'element': jqLite,
- 'forEach': forEach,
- 'injector': createInjector,
- 'noop': noop,
- 'bind': bind,
- 'toJson': toJson,
- 'fromJson': fromJson,
- 'identity': identity,
- 'isUndefined': isUndefined,
- 'isDefined': isDefined,
- 'isString': isString,
- 'isFunction': isFunction,
- 'isObject': isObject,
- 'isNumber': isNumber,
- 'isElement': isElement,
- 'isArray': isArray,
- 'version': version,
- 'isDate': isDate,
- 'lowercase': lowercase,
- 'uppercase': uppercase,
- 'callbacks': {counter: 0},
- 'getTestability': getTestability,
- '$$minErr': minErr,
- '$$csp': csp,
- 'reloadWithDebugInfo': reloadWithDebugInfo
- });
-
- angularModule = setupModuleLoader(window);
-
- angularModule('ng', ['ngLocale'], ['$provide',
- function ngModule($provide) {
- // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
- $provide.provider({
- $$sanitizeUri: $$SanitizeUriProvider
- });
- $provide.provider('$compile', $CompileProvider).
- directive({
- a: htmlAnchorDirective,
- input: inputDirective,
- textarea: inputDirective,
- form: formDirective,
- script: scriptDirective,
- select: selectDirective,
- style: styleDirective,
- option: optionDirective,
- ngBind: ngBindDirective,
- ngBindHtml: ngBindHtmlDirective,
- ngBindTemplate: ngBindTemplateDirective,
- ngClass: ngClassDirective,
- ngClassEven: ngClassEvenDirective,
- ngClassOdd: ngClassOddDirective,
- ngCloak: ngCloakDirective,
- ngController: ngControllerDirective,
- ngForm: ngFormDirective,
- ngHide: ngHideDirective,
- ngIf: ngIfDirective,
- ngInclude: ngIncludeDirective,
- ngInit: ngInitDirective,
- ngNonBindable: ngNonBindableDirective,
- ngPluralize: ngPluralizeDirective,
- ngRepeat: ngRepeatDirective,
- ngShow: ngShowDirective,
- ngStyle: ngStyleDirective,
- ngSwitch: ngSwitchDirective,
- ngSwitchWhen: ngSwitchWhenDirective,
- ngSwitchDefault: ngSwitchDefaultDirective,
- ngOptions: ngOptionsDirective,
- ngTransclude: ngTranscludeDirective,
- ngModel: ngModelDirective,
- ngList: ngListDirective,
- ngChange: ngChangeDirective,
- pattern: patternDirective,
- ngPattern: patternDirective,
- required: requiredDirective,
- ngRequired: requiredDirective,
- minlength: minlengthDirective,
- ngMinlength: minlengthDirective,
- maxlength: maxlengthDirective,
- ngMaxlength: maxlengthDirective,
- ngValue: ngValueDirective,
- ngModelOptions: ngModelOptionsDirective
- }).
- directive({
- ngInclude: ngIncludeFillContentDirective
- }).
- directive(ngAttributeAliasDirectives).
- directive(ngEventDirectives);
- $provide.provider({
- $anchorScroll: $AnchorScrollProvider,
- $animate: $AnimateProvider,
- $animateCss: $CoreAnimateCssProvider,
- $$animateQueue: $$CoreAnimateQueueProvider,
- $$AnimateRunner: $$CoreAnimateRunnerProvider,
- $browser: $BrowserProvider,
- $cacheFactory: $CacheFactoryProvider,
- $controller: $ControllerProvider,
- $document: $DocumentProvider,
- $exceptionHandler: $ExceptionHandlerProvider,
- $filter: $FilterProvider,
- $$forceReflow: $$ForceReflowProvider,
- $interpolate: $InterpolateProvider,
- $interval: $IntervalProvider,
- $http: $HttpProvider,
- $httpParamSerializer: $HttpParamSerializerProvider,
- $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
- $httpBackend: $HttpBackendProvider,
- $xhrFactory: $xhrFactoryProvider,
- $location: $LocationProvider,
- $log: $LogProvider,
- $parse: $ParseProvider,
- $rootScope: $RootScopeProvider,
- $q: $QProvider,
- $$q: $$QProvider,
- $sce: $SceProvider,
- $sceDelegate: $SceDelegateProvider,
- $sniffer: $SnifferProvider,
- $templateCache: $TemplateCacheProvider,
- $templateRequest: $TemplateRequestProvider,
- $$testability: $$TestabilityProvider,
- $timeout: $TimeoutProvider,
- $window: $WindowProvider,
- $$rAF: $$RAFProvider,
- $$jqLite: $$jqLiteProvider,
- $$HashMap: $$HashMapProvider,
- $$cookieReader: $$CookieReaderProvider
- });
- }
- ]);
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* global JQLitePrototype: true,
- addEventListenerFn: true,
- removeEventListenerFn: true,
- BOOLEAN_ATTR: true,
- ALIASED_ATTR: true,
-*/
-
-//////////////////////////////////
-//JQLite
-//////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.element
- * @module ng
- * @kind function
- *
- * @description
- * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
- *
- * If jQuery is available, `angular.element` is an alias for the
- * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
- * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
- *
- * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
- * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
- * commonly needed functionality with the goal of having a very small footprint.</div>
- *
- * To use `jQuery`, simply ensure it is loaded before the `angular.js` file.
- *
- * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
- * jqLite; they are never raw DOM references.</div>
- *
- * ## Angular's jqLite
- * jqLite provides only the following jQuery methods:
- *
- * - [`addClass()`](http://api.jquery.com/addClass/)
- * - [`after()`](http://api.jquery.com/after/)
- * - [`append()`](http://api.jquery.com/append/)
- * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
- * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData
- * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
- * - [`clone()`](http://api.jquery.com/clone/)
- * - [`contents()`](http://api.jquery.com/contents/)
- * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. As a setter, does not convert numbers to strings or append 'px'.
- * - [`data()`](http://api.jquery.com/data/)
- * - [`detach()`](http://api.jquery.com/detach/)
- * - [`empty()`](http://api.jquery.com/empty/)
- * - [`eq()`](http://api.jquery.com/eq/)
- * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
- * - [`hasClass()`](http://api.jquery.com/hasClass/)
- * - [`html()`](http://api.jquery.com/html/)
- * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
- * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
- * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter
- * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
- * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
- * - [`prepend()`](http://api.jquery.com/prepend/)
- * - [`prop()`](http://api.jquery.com/prop/)
- * - [`ready()`](http://api.jquery.com/ready/)
- * - [`remove()`](http://api.jquery.com/remove/)
- * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/)
- * - [`removeData()`](http://api.jquery.com/removeData/)
- * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
- * - [`text()`](http://api.jquery.com/text/)
- * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
- * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
- * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces or event object as parameter
- * - [`val()`](http://api.jquery.com/val/)
- * - [`wrap()`](http://api.jquery.com/wrap/)
- *
- * ## jQuery/jqLite Extras
- * Angular also provides the following additional methods and events to both jQuery and jqLite:
- *
- * ### Events
- * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
- * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM
- * element before it is removed.
- *
- * ### Methods
- * - `controller(name)` - retrieves the controller of the current element or its parent. By default
- * retrieves controller associated with the `ngController` directive. If `name` is provided as
- * camelCase directive name, then the controller for this directive will be retrieved (e.g.
- * `'ngModel'`).
- * - `injector()` - retrieves the injector of the current element or its parent.
- * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current
- * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to
- * be enabled.
- * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the
- * current element. This getter should be used only on elements that contain a directive which starts a new isolate
- * scope. Calling `scope()` on this element always returns the original non-isolate scope.
- * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.
- * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
- * parent element is reached.
- *
- * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
- * @returns {Object} jQuery object.
- */
-
-JQLite.expando = 'ng339';
-
-var jqCache = JQLite.cache = {},
- jqId = 1,
- addEventListenerFn = function(element, type, fn) {
- element.addEventListener(type, fn, false);
- },
- removeEventListenerFn = function(element, type, fn) {
- element.removeEventListener(type, fn, false);
- };
-
-/*
- * !!! This is an undocumented "private" function !!!
- */
-JQLite._data = function(node) {
- //jQuery always returns an object on cache miss
- return this.cache[node[this.expando]] || {};
-};
-
-function jqNextId() { return ++jqId; }
-
-
-var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-var MOZ_HACK_REGEXP = /^moz([A-Z])/;
-var MOUSE_EVENT_MAP= { mouseleave: "mouseout", mouseenter: "mouseover"};
-var jqLiteMinErr = minErr('jqLite');
-
-/**
- * Converts snake_case to camelCase.
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function camelCase(name) {
- return name.
- replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
- return offset ? letter.toUpperCase() : letter;
- }).
- replace(MOZ_HACK_REGEXP, 'Moz$1');
-}
-
-var SINGLE_TAG_REGEXP = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/;
-var HTML_REGEXP = /<|&#?\w+;/;
-var TAG_NAME_REGEXP = /<([\w:-]+)/;
-var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi;
-
-var wrapMap = {
- 'option': [1, '<select multiple="multiple">', '</select>'],
-
- 'thead': [1, '<table>', '</table>'],
- 'col': [2, '<table><colgroup>', '</colgroup></table>'],
- 'tr': [2, '<table><tbody>', '</tbody></table>'],
- 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
- '_default': [0, "", ""]
-};
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function jqLiteIsTextNode(html) {
- return !HTML_REGEXP.test(html);
-}
-
-function jqLiteAcceptsData(node) {
- // The window object can accept data but has no nodeType
- // Otherwise we are only interested in elements (1) and documents (9)
- var nodeType = node.nodeType;
- return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;
-}
-
-function jqLiteHasData(node) {
- for (var key in jqCache[node.ng339]) {
- return true;
- }
- return false;
-}
-
-function jqLiteBuildFragment(html, context) {
- var tmp, tag, wrap,
- fragment = context.createDocumentFragment(),
- nodes = [], i;
-
- if (jqLiteIsTextNode(html)) {
- // Convert non-html into a text node
- nodes.push(context.createTextNode(html));
- } else {
- // Convert html into DOM nodes
- tmp = tmp || fragment.appendChild(context.createElement("div"));
- tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
- wrap = wrapMap[tag] || wrapMap._default;
- tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
-
- // Descend through wrappers to the right content
- i = wrap[0];
- while (i--) {
- tmp = tmp.lastChild;
- }
-
- nodes = concat(nodes, tmp.childNodes);
-
- tmp = fragment.firstChild;
- tmp.textContent = "";
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
- fragment.innerHTML = ""; // Clear inner HTML
- forEach(nodes, function(node) {
- fragment.appendChild(node);
- });
-
- return fragment;
-}
-
-function jqLiteParseHTML(html, context) {
- context = context || document;
- var parsed;
-
- if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
- return [context.createElement(parsed[1])];
- }
-
- if ((parsed = jqLiteBuildFragment(html, context))) {
- return parsed.childNodes;
- }
-
- return [];
-}
-
-
-// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
-var jqLiteContains = Node.prototype.contains || function(arg) {
- // jshint bitwise: false
- return !!(this.compareDocumentPosition(arg) & 16);
- // jshint bitwise: true
-};
-
-/////////////////////////////////////////////
-function JQLite(element) {
- if (element instanceof JQLite) {
- return element;
- }
-
- var argIsString;
-
- if (isString(element)) {
- element = trim(element);
- argIsString = true;
- }
- if (!(this instanceof JQLite)) {
- if (argIsString && element.charAt(0) != '<') {
- throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
- }
- return new JQLite(element);
- }
-
- if (argIsString) {
- jqLiteAddNodes(this, jqLiteParseHTML(element));
- } else {
- jqLiteAddNodes(this, element);
- }
-}
-
-function jqLiteClone(element) {
- return element.cloneNode(true);
-}
-
-function jqLiteDealoc(element, onlyDescendants) {
- if (!onlyDescendants) jqLiteRemoveData(element);
-
- if (element.querySelectorAll) {
- var descendants = element.querySelectorAll('*');
- for (var i = 0, l = descendants.length; i < l; i++) {
- jqLiteRemoveData(descendants[i]);
- }
- }
-}
-
-function jqLiteOff(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
-
- var expandoStore = jqLiteExpandoStore(element);
- var events = expandoStore && expandoStore.events;
- var handle = expandoStore && expandoStore.handle;
-
- if (!handle) return; //no listeners registered
-
- if (!type) {
- for (type in events) {
- if (type !== '$destroy') {
- removeEventListenerFn(element, type, handle);
- }
- delete events[type];
- }
- } else {
-
- var removeHandler = function(type) {
- var listenerFns = events[type];
- if (isDefined(fn)) {
- arrayRemove(listenerFns || [], fn);
- }
- if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {
- removeEventListenerFn(element, type, handle);
- delete events[type];
- }
- };
-
- forEach(type.split(' '), function(type) {
- removeHandler(type);
- if (MOUSE_EVENT_MAP[type]) {
- removeHandler(MOUSE_EVENT_MAP[type]);
- }
- });
- }
-}
-
-function jqLiteRemoveData(element, name) {
- var expandoId = element.ng339;
- var expandoStore = expandoId && jqCache[expandoId];
-
- if (expandoStore) {
- if (name) {
- delete expandoStore.data[name];
- return;
- }
-
- if (expandoStore.handle) {
- if (expandoStore.events.$destroy) {
- expandoStore.handle({}, '$destroy');
- }
- jqLiteOff(element);
- }
- delete jqCache[expandoId];
- element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
- }
-}
-
-
-function jqLiteExpandoStore(element, createIfNecessary) {
- var expandoId = element.ng339,
- expandoStore = expandoId && jqCache[expandoId];
-
- if (createIfNecessary && !expandoStore) {
- element.ng339 = expandoId = jqNextId();
- expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};
- }
-
- return expandoStore;
-}
-
-
-function jqLiteData(element, key, value) {
- if (jqLiteAcceptsData(element)) {
-
- var isSimpleSetter = isDefined(value);
- var isSimpleGetter = !isSimpleSetter && key && !isObject(key);
- var massGetter = !key;
- var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);
- var data = expandoStore && expandoStore.data;
-
- if (isSimpleSetter) { // data('key', value)
- data[key] = value;
- } else {
- if (massGetter) { // data()
- return data;
- } else {
- if (isSimpleGetter) { // data('key')
- // don't force creation of expandoStore if it doesn't exist yet
- return data && data[key];
- } else { // mass-setter: data({key1: val1, key2: val2})
- extend(data, key);
- }
- }
- }
- }
-}
-
-function jqLiteHasClass(element, selector) {
- if (!element.getAttribute) return false;
- return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
- indexOf(" " + selector + " ") > -1);
-}
-
-function jqLiteRemoveClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- forEach(cssClasses.split(' '), function(cssClass) {
- element.setAttribute('class', trim(
- (" " + (element.getAttribute('class') || '') + " ")
- .replace(/[\n\t]/g, " ")
- .replace(" " + trim(cssClass) + " ", " "))
- );
- });
- }
-}
-
-function jqLiteAddClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
- .replace(/[\n\t]/g, " ");
-
- forEach(cssClasses.split(' '), function(cssClass) {
- cssClass = trim(cssClass);
- if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
- existingClasses += cssClass + ' ';
- }
- });
-
- element.setAttribute('class', trim(existingClasses));
- }
-}
-
-
-function jqLiteAddNodes(root, elements) {
- // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
-
- if (elements) {
-
- // if a Node (the most common case)
- if (elements.nodeType) {
- root[root.length++] = elements;
- } else {
- var length = elements.length;
-
- // if an Array or NodeList and not a Window
- if (typeof length === 'number' && elements.window !== elements) {
- if (length) {
- for (var i = 0; i < length; i++) {
- root[root.length++] = elements[i];
- }
- }
- } else {
- root[root.length++] = elements;
- }
- }
- }
-}
-
-
-function jqLiteController(element, name) {
- return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');
-}
-
-function jqLiteInheritedData(element, name, value) {
- // if element is the document object work with the html element instead
- // this makes $(document).scope() possible
- if (element.nodeType == NODE_TYPE_DOCUMENT) {
- element = element.documentElement;
- }
- var names = isArray(name) ? name : [name];
-
- while (element) {
- for (var i = 0, ii = names.length; i < ii; i++) {
- if (isDefined(value = jqLite.data(element, names[i]))) return value;
- }
-
- // If dealing with a document fragment node with a host element, and no parent, use the host
- // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
- // to lookup parent controllers.
- element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
- }
-}
-
-function jqLiteEmpty(element) {
- jqLiteDealoc(element, true);
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
-}
-
-function jqLiteRemove(element, keepData) {
- if (!keepData) jqLiteDealoc(element);
- var parent = element.parentNode;
- if (parent) parent.removeChild(element);
-}
-
-
-function jqLiteDocumentLoaded(action, win) {
- win = win || window;
- if (win.document.readyState === 'complete') {
- // Force the action to be run async for consistent behaviour
- // from the action's point of view
- // i.e. it will definitely not be in a $apply
- win.setTimeout(action);
- } else {
- // No need to unbind this handler as load is only ever called once
- jqLite(win).on('load', action);
- }
-}
-
-//////////////////////////////////////////
-// Functions which are declared directly.
-//////////////////////////////////////////
-var JQLitePrototype = JQLite.prototype = {
- ready: function(fn) {
- var fired = false;
-
- function trigger() {
- if (fired) return;
- fired = true;
- fn();
- }
-
- // check if document is already loaded
- if (document.readyState === 'complete') {
- setTimeout(trigger);
- } else {
- this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
- // we can not use jqLite since we are not done loading and jQuery could be loaded later.
- // jshint -W064
- JQLite(window).on('load', trigger); // fallback to window.onload for others
- // jshint +W064
- }
- },
- toString: function() {
- var value = [];
- forEach(this, function(e) { value.push('' + e);});
- return '[' + value.join(', ') + ']';
- },
-
- eq: function(index) {
- return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
- },
-
- length: 0,
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-//////////////////////////////////////////
-// Functions iterating getter/setters.
-// these functions return self on setter and
-// value on get.
-//////////////////////////////////////////
-var BOOLEAN_ATTR = {};
-forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
- BOOLEAN_ATTR[lowercase(value)] = value;
-});
-var BOOLEAN_ELEMENTS = {};
-forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
- BOOLEAN_ELEMENTS[value] = true;
-});
-var ALIASED_ATTR = {
- 'ngMinlength': 'minlength',
- 'ngMaxlength': 'maxlength',
- 'ngMin': 'min',
- 'ngMax': 'max',
- 'ngPattern': 'pattern'
-};
-
-function getBooleanAttrName(element, name) {
- // check dom last since we will most likely fail on name
- var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
-
- // booleanAttr is here twice to minimize DOM access
- return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;
-}
-
-function getAliasedAttrName(name) {
- return ALIASED_ATTR[name];
-}
-
-forEach({
- data: jqLiteData,
- removeData: jqLiteRemoveData,
- hasData: jqLiteHasData
-}, function(fn, name) {
- JQLite[name] = fn;
-});
-
-forEach({
- data: jqLiteData,
- inheritedData: jqLiteInheritedData,
-
- scope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
- },
-
- isolateScope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
- },
-
- controller: jqLiteController,
-
- injector: function(element) {
- return jqLiteInheritedData(element, '$injector');
- },
-
- removeAttr: function(element, name) {
- element.removeAttribute(name);
- },
-
- hasClass: jqLiteHasClass,
-
- css: function(element, name, value) {
- name = camelCase(name);
-
- if (isDefined(value)) {
- element.style[name] = value;
- } else {
- return element.style[name];
- }
- },
-
- attr: function(element, name, value) {
- var nodeType = element.nodeType;
- if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {
- return;
- }
- var lowercasedName = lowercase(name);
- if (BOOLEAN_ATTR[lowercasedName]) {
- if (isDefined(value)) {
- if (!!value) {
- element[name] = true;
- element.setAttribute(name, lowercasedName);
- } else {
- element[name] = false;
- element.removeAttribute(lowercasedName);
- }
- } else {
- return (element[name] ||
- (element.attributes.getNamedItem(name) || noop).specified)
- ? lowercasedName
- : undefined;
- }
- } else if (isDefined(value)) {
- element.setAttribute(name, value);
- } else if (element.getAttribute) {
- // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
- // some elements (e.g. Document) don't have get attribute, so return undefined
- var ret = element.getAttribute(name, 2);
- // normalize non-existing attributes to undefined (as jQuery)
- return ret === null ? undefined : ret;
- }
- },
-
- prop: function(element, name, value) {
- if (isDefined(value)) {
- element[name] = value;
- } else {
- return element[name];
- }
- },
-
- text: (function() {
- getText.$dv = '';
- return getText;
-
- function getText(element, value) {
- if (isUndefined(value)) {
- var nodeType = element.nodeType;
- return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';
- }
- element.textContent = value;
- }
- })(),
-
- val: function(element, value) {
- if (isUndefined(value)) {
- if (element.multiple && nodeName_(element) === 'select') {
- var result = [];
- forEach(element.options, function(option) {
- if (option.selected) {
- result.push(option.value || option.text);
- }
- });
- return result.length === 0 ? null : result;
- }
- return element.value;
- }
- element.value = value;
- },
-
- html: function(element, value) {
- if (isUndefined(value)) {
- return element.innerHTML;
- }
- jqLiteDealoc(element, true);
- element.innerHTML = value;
- },
-
- empty: jqLiteEmpty
-}, function(fn, name) {
- /**
- * Properties: writes return selection, reads return first value
- */
- JQLite.prototype[name] = function(arg1, arg2) {
- var i, key;
- var nodeCount = this.length;
-
- // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
- // in a way that survives minification.
- // jqLiteEmpty takes no arguments but is a setter.
- if (fn !== jqLiteEmpty &&
- (isUndefined((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {
- if (isObject(arg1)) {
-
- // we are a write, but the object properties are the key/values
- for (i = 0; i < nodeCount; i++) {
- if (fn === jqLiteData) {
- // data() takes the whole object in jQuery
- fn(this[i], arg1);
- } else {
- for (key in arg1) {
- fn(this[i], key, arg1[key]);
- }
- }
- }
- // return self for chaining
- return this;
- } else {
- // we are a read, so read the first child.
- // TODO: do we still need this?
- var value = fn.$dv;
- // Only if we have $dv do we iterate over all, otherwise it is just the first element.
- var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;
- for (var j = 0; j < jj; j++) {
- var nodeValue = fn(this[j], arg1, arg2);
- value = value ? value + nodeValue : nodeValue;
- }
- return value;
- }
- } else {
- // we are a write, so apply to all children
- for (i = 0; i < nodeCount; i++) {
- fn(this[i], arg1, arg2);
- }
- // return self for chaining
- return this;
- }
- };
-});
-
-function createEventHandler(element, events) {
- var eventHandler = function(event, type) {
- // jQuery specific api
- event.isDefaultPrevented = function() {
- return event.defaultPrevented;
- };
-
- var eventFns = events[type || event.type];
- var eventFnsLength = eventFns ? eventFns.length : 0;
-
- if (!eventFnsLength) return;
-
- if (isUndefined(event.immediatePropagationStopped)) {
- var originalStopImmediatePropagation = event.stopImmediatePropagation;
- event.stopImmediatePropagation = function() {
- event.immediatePropagationStopped = true;
-
- if (event.stopPropagation) {
- event.stopPropagation();
- }
-
- if (originalStopImmediatePropagation) {
- originalStopImmediatePropagation.call(event);
- }
- };
- }
-
- event.isImmediatePropagationStopped = function() {
- return event.immediatePropagationStopped === true;
- };
-
- // Some events have special handlers that wrap the real handler
- var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;
-
- // Copy event handlers in case event handlers array is modified during execution.
- if ((eventFnsLength > 1)) {
- eventFns = shallowCopy(eventFns);
- }
-
- for (var i = 0; i < eventFnsLength; i++) {
- if (!event.isImmediatePropagationStopped()) {
- handlerWrapper(element, event, eventFns[i]);
- }
- }
- };
-
- // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all
- // events on `element`
- eventHandler.elem = element;
- return eventHandler;
-}
-
-function defaultHandlerWrapper(element, event, handler) {
- handler.call(element, event);
-}
-
-function specialMouseHandlerWrapper(target, event, handler) {
- // Refer to jQuery's implementation of mouseenter & mouseleave
- // Read about mouseenter and mouseleave:
- // http://www.quirksmode.org/js/events_mouse.html#link8
- var related = event.relatedTarget;
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if (!related || (related !== target && !jqLiteContains.call(target, related))) {
- handler.call(target, event);
- }
-}
-
-//////////////////////////////////////////
-// Functions iterating traversal.
-// These functions chain results into a single
-// selector.
-//////////////////////////////////////////
-forEach({
- removeData: jqLiteRemoveData,
-
- on: function jqLiteOn(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
-
- // Do not add event handlers to non-elements because they will not be cleaned up.
- if (!jqLiteAcceptsData(element)) {
- return;
- }
-
- var expandoStore = jqLiteExpandoStore(element, true);
- var events = expandoStore.events;
- var handle = expandoStore.handle;
-
- if (!handle) {
- handle = expandoStore.handle = createEventHandler(element, events);
- }
-
- // http://jsperf.com/string-indexof-vs-split
- var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];
- var i = types.length;
-
- var addHandler = function(type, specialHandlerWrapper, noEventListener) {
- var eventFns = events[type];
-
- if (!eventFns) {
- eventFns = events[type] = [];
- eventFns.specialHandlerWrapper = specialHandlerWrapper;
- if (type !== '$destroy' && !noEventListener) {
- addEventListenerFn(element, type, handle);
- }
- }
-
- eventFns.push(fn);
- };
-
- while (i--) {
- type = types[i];
- if (MOUSE_EVENT_MAP[type]) {
- addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);
- addHandler(type, undefined, true);
- } else {
- addHandler(type);
- }
- }
- },
-
- off: jqLiteOff,
-
- one: function(element, type, fn) {
- element = jqLite(element);
-
- //add the listener twice so that when it is called
- //you can remove the original function and still be
- //able to call element.off(ev, fn) normally
- element.on(type, function onFn() {
- element.off(type, fn);
- element.off(type, onFn);
- });
- element.on(type, fn);
- },
-
- replaceWith: function(element, replaceNode) {
- var index, parent = element.parentNode;
- jqLiteDealoc(element);
- forEach(new JQLite(replaceNode), function(node) {
- if (index) {
- parent.insertBefore(node, index.nextSibling);
- } else {
- parent.replaceChild(node, element);
- }
- index = node;
- });
- },
-
- children: function(element) {
- var children = [];
- forEach(element.childNodes, function(element) {
- if (element.nodeType === NODE_TYPE_ELEMENT) {
- children.push(element);
- }
- });
- return children;
- },
-
- contents: function(element) {
- return element.contentDocument || element.childNodes || [];
- },
-
- append: function(element, node) {
- var nodeType = element.nodeType;
- if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;
-
- node = new JQLite(node);
-
- for (var i = 0, ii = node.length; i < ii; i++) {
- var child = node[i];
- element.appendChild(child);
- }
- },
-
- prepend: function(element, node) {
- if (element.nodeType === NODE_TYPE_ELEMENT) {
- var index = element.firstChild;
- forEach(new JQLite(node), function(child) {
- element.insertBefore(child, index);
- });
- }
- },
-
- wrap: function(element, wrapNode) {
- wrapNode = jqLite(wrapNode).eq(0).clone()[0];
- var parent = element.parentNode;
- if (parent) {
- parent.replaceChild(wrapNode, element);
- }
- wrapNode.appendChild(element);
- },
-
- remove: jqLiteRemove,
-
- detach: function(element) {
- jqLiteRemove(element, true);
- },
-
- after: function(element, newElement) {
- var index = element, parent = element.parentNode;
- newElement = new JQLite(newElement);
-
- for (var i = 0, ii = newElement.length; i < ii; i++) {
- var node = newElement[i];
- parent.insertBefore(node, index.nextSibling);
- index = node;
- }
- },
-
- addClass: jqLiteAddClass,
- removeClass: jqLiteRemoveClass,
-
- toggleClass: function(element, selector, condition) {
- if (selector) {
- forEach(selector.split(' '), function(className) {
- var classCondition = condition;
- if (isUndefined(classCondition)) {
- classCondition = !jqLiteHasClass(element, className);
- }
- (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);
- });
- }
- },
-
- parent: function(element) {
- var parent = element.parentNode;
- return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;
- },
-
- next: function(element) {
- return element.nextElementSibling;
- },
-
- find: function(element, selector) {
- if (element.getElementsByTagName) {
- return element.getElementsByTagName(selector);
- } else {
- return [];
- }
- },
-
- clone: jqLiteClone,
-
- triggerHandler: function(element, event, extraParameters) {
-
- var dummyEvent, eventFnsCopy, handlerArgs;
- var eventName = event.type || event;
- var expandoStore = jqLiteExpandoStore(element);
- var events = expandoStore && expandoStore.events;
- var eventFns = events && events[eventName];
-
- if (eventFns) {
- // Create a dummy event to pass to the handlers
- dummyEvent = {
- preventDefault: function() { this.defaultPrevented = true; },
- isDefaultPrevented: function() { return this.defaultPrevented === true; },
- stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },
- isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },
- stopPropagation: noop,
- type: eventName,
- target: element
- };
-
- // If a custom event was provided then extend our dummy event with it
- if (event.type) {
- dummyEvent = extend(dummyEvent, event);
- }
-
- // Copy event handlers in case event handlers array is modified during execution.
- eventFnsCopy = shallowCopy(eventFns);
- handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];
-
- forEach(eventFnsCopy, function(fn) {
- if (!dummyEvent.isImmediatePropagationStopped()) {
- fn.apply(element, handlerArgs);
- }
- });
- }
- }
-}, function(fn, name) {
- /**
- * chaining functions
- */
- JQLite.prototype[name] = function(arg1, arg2, arg3) {
- var value;
-
- for (var i = 0, ii = this.length; i < ii; i++) {
- if (isUndefined(value)) {
- value = fn(this[i], arg1, arg2, arg3);
- if (isDefined(value)) {
- // any function which returns a value needs to be wrapped
- value = jqLite(value);
- }
- } else {
- jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));
- }
- }
- return isDefined(value) ? value : this;
- };
-
- // bind legacy bind/unbind to on/off
- JQLite.prototype.bind = JQLite.prototype.on;
- JQLite.prototype.unbind = JQLite.prototype.off;
-});
-
-
-// Provider for private $$jqLite service
-function $$jqLiteProvider() {
- this.$get = function $$jqLite() {
- return extend(JQLite, {
- hasClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteHasClass(node, classes);
- },
- addClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteAddClass(node, classes);
- },
- removeClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteRemoveClass(node, classes);
- }
- });
- };
-}
-
-/**
- * Computes a hash of an 'obj'.
- * Hash of a:
- * string is string
- * number is number as string
- * object is either result of calling $$hashKey function on the object or uniquely generated id,
- * that is also assigned to the $$hashKey property of the object.
- *
- * @param obj
- * @returns {string} hash string such that the same input will have the same hash string.
- * The resulting string key is in 'type:hashKey' format.
- */
-function hashKey(obj, nextUidFn) {
- var key = obj && obj.$$hashKey;
-
- if (key) {
- if (typeof key === 'function') {
- key = obj.$$hashKey();
- }
- return key;
- }
-
- var objType = typeof obj;
- if (objType == 'function' || (objType == 'object' && obj !== null)) {
- key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();
- } else {
- key = objType + ':' + obj;
- }
-
- return key;
-}
-
-/**
- * HashMap which can use objects as keys
- */
-function HashMap(array, isolatedUid) {
- if (isolatedUid) {
- var uid = 0;
- this.nextUid = function() {
- return ++uid;
- };
- }
- forEach(array, this.put, this);
-}
-HashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[hashKey(key, this.nextUid)] = value;
- },
-
- /**
- * @param key
- * @returns {Object} the value for the key
- */
- get: function(key) {
- return this[hashKey(key, this.nextUid)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = hashKey(key, this.nextUid)];
- delete this[key];
- return value;
- }
-};
-
-var $$HashMapProvider = [function() {
- this.$get = [function() {
- return HashMap;
- }];
-}];
-
-/**
- * @ngdoc function
- * @module ng
- * @name angular.injector
- * @kind function
- *
- * @description
- * Creates an injector object that can be used for retrieving services as well as for
- * dependency injection (see {@link guide/di dependency injection}).
- *
- * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
- * {@link angular.module}. The `ng` module must be explicitly added.
- * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which
- * disallows argument name annotation inference.
- * @returns {injector} Injector object. See {@link auto.$injector $injector}.
- *
- * @example
- * Typical usage
- * ```js
- * // create an injector
- * var $injector = angular.injector(['ng']);
- *
- * // use the injector to kick off your application
- * // use the type inference to auto inject arguments, or use implicit injection
- * $injector.invoke(function($rootScope, $compile, $document) {
- * $compile($document)($rootScope);
- * $rootScope.$digest();
- * });
- * ```
- *
- * Sometimes you want to get access to the injector of a currently running Angular app
- * from outside Angular. Perhaps, you want to inject and compile some markup after the
- * application has been bootstrapped. You can do this using the extra `injector()` added
- * to JQuery/jqLite elements. See {@link angular.element}.
- *
- * *This is fairly rare but could be the case if a third party library is injecting the
- * markup.*
- *
- * In the following example a new block of HTML containing a `ng-controller`
- * directive is added to the end of the document body by JQuery. We then compile and link
- * it into the current AngularJS scope.
- *
- * ```js
- * var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
- * $(document.body).append($div);
- *
- * angular.element(document).injector().invoke(function($compile) {
- * var scope = angular.element($div).scope();
- * $compile($div)(scope);
- * });
- * ```
- */
-
-
-/**
- * @ngdoc module
- * @name auto
- * @description
- *
- * Implicit module which gets automatically added to each {@link auto.$injector $injector}.
- */
-
-var FN_ARGS = /^[^\(]*\(\s*([^\)]*)\)/m;
-var FN_ARG_SPLIT = /,/;
-var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
-var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
-var $injectorMinErr = minErr('$injector');
-
-function anonFn(fn) {
- // For anonymous functions, showing at the very least the function signature can help in
- // debugging.
- var fnText = fn.toString().replace(STRIP_COMMENTS, ''),
- args = fnText.match(FN_ARGS);
- if (args) {
- return 'function(' + (args[1] || '').replace(/[\s\r\n]+/, ' ') + ')';
- }
- return 'fn';
-}
-
-function annotate(fn, strictDi, name) {
- var $inject,
- fnText,
- argDecl,
- last;
-
- if (typeof fn === 'function') {
- if (!($inject = fn.$inject)) {
- $inject = [];
- if (fn.length) {
- if (strictDi) {
- if (!isString(name) || !name) {
- name = fn.name || anonFn(fn);
- }
- throw $injectorMinErr('strictdi',
- '{0} is not using explicit annotation and cannot be invoked in strict mode', name);
- }
- fnText = fn.toString().replace(STRIP_COMMENTS, '');
- argDecl = fnText.match(FN_ARGS);
- forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {
- arg.replace(FN_ARG, function(all, underscore, name) {
- $inject.push(name);
- });
- });
- }
- fn.$inject = $inject;
- }
- } else if (isArray(fn)) {
- last = fn.length - 1;
- assertArgFn(fn[last], 'fn');
- $inject = fn.slice(0, last);
- } else {
- assertArgFn(fn, 'fn', true);
- }
- return $inject;
-}
-
-///////////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $injector
- *
- * @description
- *
- * `$injector` is used to retrieve object instances as defined by
- * {@link auto.$provide provider}, instantiate types, invoke methods,
- * and load modules.
- *
- * The following always holds true:
- *
- * ```js
- * var $injector = angular.injector();
- * expect($injector.get('$injector')).toBe($injector);
- * expect($injector.invoke(function($injector) {
- * return $injector;
- * })).toBe($injector);
- * ```
- *
- * # Injection Function Annotation
- *
- * JavaScript does not have annotations, and annotations are needed for dependency injection. The
- * following are all valid ways of annotating function with injection arguments and are equivalent.
- *
- * ```js
- * // inferred (only works if code not minified/obfuscated)
- * $injector.invoke(function(serviceA){});
- *
- * // annotated
- * function explicit(serviceA) {};
- * explicit.$inject = ['serviceA'];
- * $injector.invoke(explicit);
- *
- * // inline
- * $injector.invoke(['serviceA', function(serviceA){}]);
- * ```
- *
- * ## Inference
- *
- * In JavaScript calling `toString()` on a function returns the function definition. The definition
- * can then be parsed and the function arguments can be extracted. This method of discovering
- * annotations is disallowed when the injector is in strict mode.
- * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the
- * argument names.
- *
- * ## `$inject` Annotation
- * By adding an `$inject` property onto a function the injection parameters can be specified.
- *
- * ## Inline
- * As an array of injection names, where the last item in the array is the function to call.
- */
-
-/**
- * @ngdoc method
- * @name $injector#get
- *
- * @description
- * Return an instance of the service.
- *
- * @param {string} name The name of the instance to retrieve.
- * @param {string=} caller An optional string to provide the origin of the function call for error messages.
- * @return {*} The instance.
- */
-
-/**
- * @ngdoc method
- * @name $injector#invoke
- *
- * @description
- * Invoke the method and supply the method arguments from the `$injector`.
- *
- * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are
- * injected according to the {@link guide/di $inject Annotation} rules.
- * @param {Object=} self The `this` for the invoked method.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {*} the value returned by the invoked `fn` function.
- */
-
-/**
- * @ngdoc method
- * @name $injector#has
- *
- * @description
- * Allows the user to query if the particular service exists.
- *
- * @param {string} name Name of the service to query.
- * @returns {boolean} `true` if injector has given service.
- */
-
-/**
- * @ngdoc method
- * @name $injector#instantiate
- * @description
- * Create a new instance of JS type. The method takes a constructor function, invokes the new
- * operator, and supplies all of the arguments to the constructor function as specified by the
- * constructor annotation.
- *
- * @param {Function} Type Annotated constructor function.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {Object} new instance of `Type`.
- */
-
-/**
- * @ngdoc method
- * @name $injector#annotate
- *
- * @description
- * Returns an array of service names which the function is requesting for injection. This API is
- * used by the injector to determine which services need to be injected into the function when the
- * function is invoked. There are three ways in which the function can be annotated with the needed
- * dependencies.
- *
- * # Argument names
- *
- * The simplest form is to extract the dependencies from the arguments of the function. This is done
- * by converting the function into a string using `toString()` method and extracting the argument
- * names.
- * ```js
- * // Given
- * function MyController($scope, $route) {
- * // ...
- * }
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * You can disallow this method by using strict injection mode.
- *
- * This method does not work with code minification / obfuscation. For this reason the following
- * annotation strategies are supported.
- *
- * # The `$inject` property
- *
- * If a function has an `$inject` property and its value is an array of strings, then the strings
- * represent names of services to be injected into the function.
- * ```js
- * // Given
- * var MyController = function(obfuscatedScope, obfuscatedRoute) {
- * // ...
- * }
- * // Define function dependencies
- * MyController['$inject'] = ['$scope', '$route'];
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * # The array notation
- *
- * It is often desirable to inline Injected functions and that's when setting the `$inject` property
- * is very inconvenient. In these situations using the array notation to specify the dependencies in
- * a way that survives minification is a better choice:
- *
- * ```js
- * // We wish to write this (not minification / obfuscation safe)
- * injector.invoke(function($compile, $rootScope) {
- * // ...
- * });
- *
- * // We are forced to write break inlining
- * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
- * // ...
- * };
- * tmpFn.$inject = ['$compile', '$rootScope'];
- * injector.invoke(tmpFn);
- *
- * // To better support inline function the inline annotation is supported
- * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
- * // ...
- * }]);
- *
- * // Therefore
- * expect(injector.annotate(
- * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
- * ).toEqual(['$compile', '$rootScope']);
- * ```
- *
- * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
- * be retrieved as described above.
- *
- * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.
- *
- * @returns {Array.<string>} The names of the services which the function requires.
- */
-
-
-
-
-/**
- * @ngdoc service
- * @name $provide
- *
- * @description
- *
- * The {@link auto.$provide $provide} service has a number of methods for registering components
- * with the {@link auto.$injector $injector}. Many of these functions are also exposed on
- * {@link angular.Module}.
- *
- * An Angular **service** is a singleton object created by a **service factory**. These **service
- * factories** are functions which, in turn, are created by a **service provider**.
- * The **service providers** are constructor functions. When instantiated they must contain a
- * property called `$get`, which holds the **service factory** function.
- *
- * When you request a service, the {@link auto.$injector $injector} is responsible for finding the
- * correct **service provider**, instantiating it and then calling its `$get` **service factory**
- * function to get the instance of the **service**.
- *
- * Often services have no configuration options and there is no need to add methods to the service
- * provider. The provider will be no more than a constructor function with a `$get` property. For
- * these cases the {@link auto.$provide $provide} service has additional helper methods to register
- * services without specifying a provider.
- *
- * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the
- * {@link auto.$injector $injector}
- * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by
- * providers and services.
- * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by
- * services, not providers.
- * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,
- * that will be wrapped in a **service provider** object, whose `$get` property will contain the
- * given factory function.
- * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`
- * that will be wrapped in a **service provider** object, whose `$get` property will instantiate
- * a new object using the given constructor function.
- *
- * See the individual methods for more information and examples.
- */
-
-/**
- * @ngdoc method
- * @name $provide#provider
- * @description
- *
- * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions
- * are constructor functions, whose instances are responsible for "providing" a factory for a
- * service.
- *
- * Service provider names start with the name of the service they provide followed by `Provider`.
- * For example, the {@link ng.$log $log} service has a provider called
- * {@link ng.$logProvider $logProvider}.
- *
- * Service provider objects can have additional methods which allow configuration of the provider
- * and its service. Importantly, you can configure what kind of service is created by the `$get`
- * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a
- * method {@link ng.$logProvider#debugEnabled debugEnabled}
- * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the
- * console or not.
- *
- * @param {string} name The name of the instance. NOTE: the provider will be available under `name +
- 'Provider'` key.
- * @param {(Object|function())} provider If the provider is:
- *
- * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
- * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.
- * - `Constructor`: a new instance of the provider will be created using
- * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.
- *
- * @returns {Object} registered provider instance
-
- * @example
- *
- * The following example shows how to create a simple event tracking service and register it using
- * {@link auto.$provide#provider $provide.provider()}.
- *
- * ```js
- * // Define the eventTracker provider
- * function EventTrackerProvider() {
- * var trackingUrl = '/track';
- *
- * // A provider method for configuring where the tracked events should been saved
- * this.setTrackingUrl = function(url) {
- * trackingUrl = url;
- * };
- *
- * // The service factory function
- * this.$get = ['$http', function($http) {
- * var trackedEvents = {};
- * return {
- * // Call this to track an event
- * event: function(event) {
- * var count = trackedEvents[event] || 0;
- * count += 1;
- * trackedEvents[event] = count;
- * return count;
- * },
- * // Call this to save the tracked events to the trackingUrl
- * save: function() {
- * $http.post(trackingUrl, trackedEvents);
- * }
- * };
- * }];
- * }
- *
- * describe('eventTracker', function() {
- * var postSpy;
- *
- * beforeEach(module(function($provide) {
- * // Register the eventTracker provider
- * $provide.provider('eventTracker', EventTrackerProvider);
- * }));
- *
- * beforeEach(module(function(eventTrackerProvider) {
- * // Configure eventTracker provider
- * eventTrackerProvider.setTrackingUrl('/custom-track');
- * }));
- *
- * it('tracks events', inject(function(eventTracker) {
- * expect(eventTracker.event('login')).toEqual(1);
- * expect(eventTracker.event('login')).toEqual(2);
- * }));
- *
- * it('saves to the tracking url', inject(function(eventTracker, $http) {
- * postSpy = spyOn($http, 'post');
- * eventTracker.event('login');
- * eventTracker.save();
- * expect(postSpy).toHaveBeenCalled();
- * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');
- * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');
- * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });
- * }));
- * });
- * ```
- */
-
-/**
- * @ngdoc method
- * @name $provide#factory
- * @description
- *
- * Register a **service factory**, which will be called to return the service instance.
- * This is short for registering a service where its provider consists of only a `$get` property,
- * which is the given service factory function.
- * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to
- * configure your service in a provider.
- *
- * @param {string} name The name of the instance.
- * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.
- * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service
- * ```js
- * $provide.factory('ping', ['$http', function($http) {
- * return function ping() {
- * return $http.send('/ping');
- * };
- * }]);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#service
- * @description
- *
- * Register a **service constructor**, which will be invoked with `new` to create the service
- * instance.
- * This is short for registering a service where its provider's `$get` property is the service
- * constructor function that will be used to instantiate the service instance.
- *
- * You should use {@link auto.$provide#service $provide.service(class)} if you define your service
- * as a type/class.
- *
- * @param {string} name The name of the instance.
- * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)
- * that will be instantiated.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service using
- * {@link auto.$provide#service $provide.service(class)}.
- * ```js
- * var Ping = function($http) {
- * this.$http = $http;
- * };
- *
- * Ping.$inject = ['$http'];
- *
- * Ping.prototype.send = function() {
- * return this.$http.get('/ping');
- * };
- * $provide.service('ping', Ping);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping.send();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#value
- * @description
- *
- * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a
- * number, an array, an object or a function. This is short for registering a service where its
- * provider's `$get` property is a factory function that takes no arguments and returns the **value
- * service**.
- *
- * Value services are similar to constant services, except that they cannot be injected into a
- * module configuration function (see {@link angular.Module#config}) but they can be overridden by
- * an Angular
- * {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the instance.
- * @param {*} value The value.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here are some examples of creating value services.
- * ```js
- * $provide.value('ADMIN_USER', 'admin');
- *
- * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });
- *
- * $provide.value('halfOf', function(value) {
- * return value / 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#constant
- * @description
- *
- * Register a **constant service**, such as a string, a number, an array, an object or a function,
- * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be
- * injected into a module configuration function (see {@link angular.Module#config}) and it cannot
- * be overridden by an Angular {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the constant.
- * @param {*} value The constant value.
- * @returns {Object} registered instance
- *
- * @example
- * Here a some examples of creating constants:
- * ```js
- * $provide.constant('SHARD_HEIGHT', 306);
- *
- * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);
- *
- * $provide.constant('double', function(value) {
- * return value * 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#decorator
- * @description
- *
- * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator
- * intercepts the creation of a service, allowing it to override or modify the behaviour of the
- * service. The object returned by the decorator may be the original service, or a new service
- * object which replaces or wraps and delegates to the original service.
- *
- * @param {string} name The name of the service to decorate.
- * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance. The function is called using
- * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
- * Local injection arguments:
- *
- * * `$delegate` - The original service instance, which can be monkey patched, configured,
- * decorated or delegated to.
- *
- * @example
- * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting
- * calls to {@link ng.$log#error $log.warn()}.
- * ```js
- * $provide.decorator('$log', ['$delegate', function($delegate) {
- * $delegate.warn = $delegate.error;
- * return $delegate;
- * }]);
- * ```
- */
-
-
-function createInjector(modulesToLoad, strictDi) {
- strictDi = (strictDi === true);
- var INSTANTIATING = {},
- providerSuffix = 'Provider',
- path = [],
- loadedModules = new HashMap([], true),
- providerCache = {
- $provide: {
- provider: supportObject(provider),
- factory: supportObject(factory),
- service: supportObject(service),
- value: supportObject(value),
- constant: supportObject(constant),
- decorator: decorator
- }
- },
- providerInjector = (providerCache.$injector =
- createInternalInjector(providerCache, function(serviceName, caller) {
- if (angular.isString(caller)) {
- path.push(caller);
- }
- throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- '));
- })),
- instanceCache = {},
- instanceInjector = (instanceCache.$injector =
- createInternalInjector(instanceCache, function(serviceName, caller) {
- var provider = providerInjector.get(serviceName + providerSuffix, caller);
- return instanceInjector.invoke(provider.$get, provider, undefined, serviceName);
- }));
-
-
- forEach(loadModules(modulesToLoad), function(fn) { if (fn) instanceInjector.invoke(fn); });
-
- return instanceInjector;
-
- ////////////////////////////////////
- // $provider
- ////////////////////////////////////
-
- function supportObject(delegate) {
- return function(key, value) {
- if (isObject(key)) {
- forEach(key, reverseParams(delegate));
- } else {
- return delegate(key, value);
- }
- };
- }
-
- function provider(name, provider_) {
- assertNotHasOwnProperty(name, 'service');
- if (isFunction(provider_) || isArray(provider_)) {
- provider_ = providerInjector.instantiate(provider_);
- }
- if (!provider_.$get) {
- throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
- }
- return providerCache[name + providerSuffix] = provider_;
- }
-
- function enforceReturnValue(name, factory) {
- return function enforcedReturnValue() {
- var result = instanceInjector.invoke(factory, this);
- if (isUndefined(result)) {
- throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
- }
- return result;
- };
- }
-
- function factory(name, factoryFn, enforce) {
- return provider(name, {
- $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn
- });
- }
-
- function service(name, constructor) {
- return factory(name, ['$injector', function($injector) {
- return $injector.instantiate(constructor);
- }]);
- }
-
- function value(name, val) { return factory(name, valueFn(val), false); }
-
- function constant(name, value) {
- assertNotHasOwnProperty(name, 'constant');
- providerCache[name] = value;
- instanceCache[name] = value;
- }
-
- function decorator(serviceName, decorFn) {
- var origProvider = providerInjector.get(serviceName + providerSuffix),
- orig$get = origProvider.$get;
-
- origProvider.$get = function() {
- var origInstance = instanceInjector.invoke(orig$get, origProvider);
- return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
- };
- }
-
- ////////////////////////////////////
- // Module Loading
- ////////////////////////////////////
- function loadModules(modulesToLoad) {
- assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');
- var runBlocks = [], moduleFn;
- forEach(modulesToLoad, function(module) {
- if (loadedModules.get(module)) return;
- loadedModules.put(module, true);
-
- function runInvokeQueue(queue) {
- var i, ii;
- for (i = 0, ii = queue.length; i < ii; i++) {
- var invokeArgs = queue[i],
- provider = providerInjector.get(invokeArgs[0]);
-
- provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
- }
- }
-
- try {
- if (isString(module)) {
- moduleFn = angularModule(module);
- runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
- runInvokeQueue(moduleFn._invokeQueue);
- runInvokeQueue(moduleFn._configBlocks);
- } else if (isFunction(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else if (isArray(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else {
- assertArgFn(module, 'module');
- }
- } catch (e) {
- if (isArray(module)) {
- module = module[module.length - 1];
- }
- if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {
- // Safari & FF's stack traces don't contain error.message content
- // unlike those of Chrome and IE
- // So if stack doesn't contain message, we create a new string that contains both.
- // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.
- /* jshint -W022 */
- e = e.message + '\n' + e.stack;
- }
- throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}",
- module, e.stack || e.message || e);
- }
- });
- return runBlocks;
- }
-
- ////////////////////////////////////
- // internal Injector
- ////////////////////////////////////
-
- function createInternalInjector(cache, factory) {
-
- function getService(serviceName, caller) {
- if (cache.hasOwnProperty(serviceName)) {
- if (cache[serviceName] === INSTANTIATING) {
- throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
- serviceName + ' <- ' + path.join(' <- '));
- }
- return cache[serviceName];
- } else {
- try {
- path.unshift(serviceName);
- cache[serviceName] = INSTANTIATING;
- return cache[serviceName] = factory(serviceName, caller);
- } catch (err) {
- if (cache[serviceName] === INSTANTIATING) {
- delete cache[serviceName];
- }
- throw err;
- } finally {
- path.shift();
- }
- }
- }
-
- function invoke(fn, self, locals, serviceName) {
- if (typeof locals === 'string') {
- serviceName = locals;
- locals = null;
- }
-
- var args = [],
- $inject = createInjector.$$annotate(fn, strictDi, serviceName),
- length, i,
- key;
-
- for (i = 0, length = $inject.length; i < length; i++) {
- key = $inject[i];
- if (typeof key !== 'string') {
- throw $injectorMinErr('itkn',
- 'Incorrect injection token! Expected service name as string, got {0}', key);
- }
- args.push(
- locals && locals.hasOwnProperty(key)
- ? locals[key]
- : getService(key, serviceName)
- );
- }
- if (isArray(fn)) {
- fn = fn[length];
- }
-
- // http://jsperf.com/angularjs-invoke-apply-vs-switch
- // #5388
- return fn.apply(self, args);
- }
-
- function instantiate(Type, locals, serviceName) {
- // Check if Type is annotated and use just the given function at n-1 as parameter
- // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
- // Object creation: http://jsperf.com/create-constructor/2
- var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);
- var returnedValue = invoke(Type, instance, locals, serviceName);
-
- return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
- }
-
- return {
- invoke: invoke,
- instantiate: instantiate,
- get: getService,
- annotate: createInjector.$$annotate,
- has: function(name) {
- return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);
- }
- };
- }
-}
-
-createInjector.$$annotate = annotate;
-
-/**
- * @ngdoc provider
- * @name $anchorScrollProvider
- *
- * @description
- * Use `$anchorScrollProvider` to disable automatic scrolling whenever
- * {@link ng.$location#hash $location.hash()} changes.
- */
-function $AnchorScrollProvider() {
-
- var autoScrollingEnabled = true;
-
- /**
- * @ngdoc method
- * @name $anchorScrollProvider#disableAutoScrolling
- *
- * @description
- * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to
- * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />
- * Use this method to disable automatic scrolling.
- *
- * If automatic scrolling is disabled, one must explicitly call
- * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the
- * current hash.
- */
- this.disableAutoScrolling = function() {
- autoScrollingEnabled = false;
- };
-
- /**
- * @ngdoc service
- * @name $anchorScroll
- * @kind function
- * @requires $window
- * @requires $location
- * @requires $rootScope
- *
- * @description
- * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the
- * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified
- * in the
- * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-indicated-part-of-the-document).
- *
- * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to
- * match any anchor whenever it changes. This can be disabled by calling
- * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.
- *
- * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a
- * vertical scroll-offset (either fixed or dynamic).
- *
- * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of
- * {@link ng.$location#hash $location.hash()} will be used.
- *
- * @property {(number|function|jqLite)} yOffset
- * If set, specifies a vertical scroll-offset. This is often useful when there are fixed
- * positioned elements at the top of the page, such as navbars, headers etc.
- *
- * `yOffset` can be specified in various ways:
- * - **number**: A fixed number of pixels to be used as offset.<br /><br />
- * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return
- * a number representing the offset (in pixels).<br /><br />
- * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from
- * the top of the page to the element's bottom will be used as offset.<br />
- * **Note**: The element will be taken into account only as long as its `position` is set to
- * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust
- * their height and/or positioning according to the viewport's size.
- *
- * <br />
- * <div class="alert alert-warning">
- * In order for `yOffset` to work properly, scrolling should take place on the document's root and
- * not some child element.
- * </div>
- *
- * @example
- <example module="anchorScrollExample">
- <file name="index.html">
- <div id="scrollArea" ng-controller="ScrollController">
- <a ng-click="gotoBottom()">Go to bottom</a>
- <a id="bottom"></a> You're at the bottom!
- </div>
- </file>
- <file name="script.js">
- angular.module('anchorScrollExample', [])
- .controller('ScrollController', ['$scope', '$location', '$anchorScroll',
- function ($scope, $location, $anchorScroll) {
- $scope.gotoBottom = function() {
- // set the location.hash to the id of
- // the element you wish to scroll to.
- $location.hash('bottom');
-
- // call $anchorScroll()
- $anchorScroll();
- };
- }]);
- </file>
- <file name="style.css">
- #scrollArea {
- height: 280px;
- overflow: auto;
- }
-
- #bottom {
- display: block;
- margin-top: 2000px;
- }
- </file>
- </example>
- *
- * <hr />
- * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).
- * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.
- *
- * @example
- <example module="anchorScrollOffsetExample">
- <file name="index.html">
- <div class="fixed-header" ng-controller="headerCtrl">
- <a href="" ng-click="gotoAnchor(x)" ng-repeat="x in [1,2,3,4,5]">
- Go to anchor {{x}}
- </a>
- </div>
- <div id="anchor{{x}}" class="anchor" ng-repeat="x in [1,2,3,4,5]">
- Anchor {{x}} of 5
- </div>
- </file>
- <file name="script.js">
- angular.module('anchorScrollOffsetExample', [])
- .run(['$anchorScroll', function($anchorScroll) {
- $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels
- }])
- .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',
- function ($anchorScroll, $location, $scope) {
- $scope.gotoAnchor = function(x) {
- var newHash = 'anchor' + x;
- if ($location.hash() !== newHash) {
- // set the $location.hash to `newHash` and
- // $anchorScroll will automatically scroll to it
- $location.hash('anchor' + x);
- } else {
- // call $anchorScroll() explicitly,
- // since $location.hash hasn't changed
- $anchorScroll();
- }
- };
- }
- ]);
- </file>
- <file name="style.css">
- body {
- padding-top: 50px;
- }
-
- .anchor {
- border: 2px dashed DarkOrchid;
- padding: 10px 10px 200px 10px;
- }
-
- .fixed-header {
- background-color: rgba(0, 0, 0, 0.2);
- height: 50px;
- position: fixed;
- top: 0; left: 0; right: 0;
- }
-
- .fixed-header > a {
- display: inline-block;
- margin: 5px 15px;
- }
- </file>
- </example>
- */
- this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
- var document = $window.document;
-
- // Helper function to get first anchor from a NodeList
- // (using `Array#some()` instead of `angular#forEach()` since it's more performant
- // and working in all supported browsers.)
- function getFirstAnchor(list) {
- var result = null;
- Array.prototype.some.call(list, function(element) {
- if (nodeName_(element) === 'a') {
- result = element;
- return true;
- }
- });
- return result;
- }
-
- function getYOffset() {
-
- var offset = scroll.yOffset;
-
- if (isFunction(offset)) {
- offset = offset();
- } else if (isElement(offset)) {
- var elem = offset[0];
- var style = $window.getComputedStyle(elem);
- if (style.position !== 'fixed') {
- offset = 0;
- } else {
- offset = elem.getBoundingClientRect().bottom;
- }
- } else if (!isNumber(offset)) {
- offset = 0;
- }
-
- return offset;
- }
-
- function scrollTo(elem) {
- if (elem) {
- elem.scrollIntoView();
-
- var offset = getYOffset();
-
- if (offset) {
- // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.
- // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the
- // top of the viewport.
- //
- // IF the number of pixels from the top of `elem` to the end of the page's content is less
- // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some
- // way down the page.
- //
- // This is often the case for elements near the bottom of the page.
- //
- // In such cases we do not need to scroll the whole `offset` up, just the difference between
- // the top of the element and the offset, which is enough to align the top of `elem` at the
- // desired position.
- var elemTop = elem.getBoundingClientRect().top;
- $window.scrollBy(0, elemTop - offset);
- }
- } else {
- $window.scrollTo(0, 0);
- }
- }
-
- function scroll(hash) {
- hash = isString(hash) ? hash : $location.hash();
- var elm;
-
- // empty hash, scroll to the top of the page
- if (!hash) scrollTo(null);
-
- // element with given id
- else if ((elm = document.getElementById(hash))) scrollTo(elm);
-
- // first anchor with given name :-D
- else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);
-
- // no element and hash == 'top', scroll to the top of the page
- else if (hash === 'top') scrollTo(null);
- }
-
- // does not scroll when user clicks on anchor link that is currently on
- // (no url change, no $location.hash() change), browser native does scroll
- if (autoScrollingEnabled) {
- $rootScope.$watch(function autoScrollWatch() {return $location.hash();},
- function autoScrollWatchAction(newVal, oldVal) {
- // skip the initial scroll if $location.hash is empty
- if (newVal === oldVal && newVal === '') return;
-
- jqLiteDocumentLoaded(function() {
- $rootScope.$evalAsync(scroll);
- });
- });
- }
-
- return scroll;
- }];
-}
-
-var $animateMinErr = minErr('$animate');
-var ELEMENT_NODE = 1;
-var NG_ANIMATE_CLASSNAME = 'ng-animate';
-
-function mergeClasses(a,b) {
- if (!a && !b) return '';
- if (!a) return b;
- if (!b) return a;
- if (isArray(a)) a = a.join(' ');
- if (isArray(b)) b = b.join(' ');
- return a + ' ' + b;
-}
-
-function extractElementNode(element) {
- for (var i = 0; i < element.length; i++) {
- var elm = element[i];
- if (elm.nodeType === ELEMENT_NODE) {
- return elm;
- }
- }
-}
-
-function splitClasses(classes) {
- if (isString(classes)) {
- classes = classes.split(' ');
- }
-
- // Use createMap() to prevent class assumptions involving property names in
- // Object.prototype
- var obj = createMap();
- forEach(classes, function(klass) {
- // sometimes the split leaves empty string values
- // incase extra spaces were applied to the options
- if (klass.length) {
- obj[klass] = true;
- }
- });
- return obj;
-}
-
-// if any other type of options value besides an Object value is
-// passed into the $animate.method() animation then this helper code
-// will be run which will ignore it. While this patch is not the
-// greatest solution to this, a lot of existing plugins depend on
-// $animate to either call the callback (< 1.2) or return a promise
-// that can be changed. This helper function ensures that the options
-// are wiped clean incase a callback function is provided.
-function prepareAnimateOptions(options) {
- return isObject(options)
- ? options
- : {};
-}
-
-var $$CoreAnimateRunnerProvider = function() {
- this.$get = ['$q', '$$rAF', function($q, $$rAF) {
- function AnimateRunner() {}
- AnimateRunner.all = noop;
- AnimateRunner.chain = noop;
- AnimateRunner.prototype = {
- end: noop,
- cancel: noop,
- resume: noop,
- pause: noop,
- complete: noop,
- then: function(pass, fail) {
- return $q(function(resolve) {
- $$rAF(function() {
- resolve();
- });
- }).then(pass, fail);
- }
- };
- return AnimateRunner;
- }];
-};
-
-// this is prefixed with Core since it conflicts with
-// the animateQueueProvider defined in ngAnimate/animateQueue.js
-var $$CoreAnimateQueueProvider = function() {
- var postDigestQueue = new HashMap();
- var postDigestElements = [];
-
- this.$get = ['$$AnimateRunner', '$rootScope',
- function($$AnimateRunner, $rootScope) {
- return {
- enabled: noop,
- on: noop,
- off: noop,
- pin: noop,
-
- push: function(element, event, options, domOperation) {
- domOperation && domOperation();
-
- options = options || {};
- options.from && element.css(options.from);
- options.to && element.css(options.to);
-
- if (options.addClass || options.removeClass) {
- addRemoveClassesPostDigest(element, options.addClass, options.removeClass);
- }
-
- return new $$AnimateRunner(); // jshint ignore:line
- }
- };
-
-
- function updateData(data, classes, value) {
- var changed = false;
- if (classes) {
- classes = isString(classes) ? classes.split(' ') :
- isArray(classes) ? classes : [];
- forEach(classes, function(className) {
- if (className) {
- changed = true;
- data[className] = value;
- }
- });
- }
- return changed;
- }
-
- function handleCSSClassChanges() {
- forEach(postDigestElements, function(element) {
- var data = postDigestQueue.get(element);
- if (data) {
- var existing = splitClasses(element.attr('class'));
- var toAdd = '';
- var toRemove = '';
- forEach(data, function(status, className) {
- var hasClass = !!existing[className];
- if (status !== hasClass) {
- if (status) {
- toAdd += (toAdd.length ? ' ' : '') + className;
- } else {
- toRemove += (toRemove.length ? ' ' : '') + className;
- }
- }
- });
-
- forEach(element, function(elm) {
- toAdd && jqLiteAddClass(elm, toAdd);
- toRemove && jqLiteRemoveClass(elm, toRemove);
- });
- postDigestQueue.remove(element);
- }
- });
- postDigestElements.length = 0;
- }
-
-
- function addRemoveClassesPostDigest(element, add, remove) {
- var data = postDigestQueue.get(element) || {};
-
- var classesAdded = updateData(data, add, true);
- var classesRemoved = updateData(data, remove, false);
-
- if (classesAdded || classesRemoved) {
-
- postDigestQueue.put(element, data);
- postDigestElements.push(element);
-
- if (postDigestElements.length === 1) {
- $rootScope.$$postDigest(handleCSSClassChanges);
- }
- }
- }
- }];
-};
-
-/**
- * @ngdoc provider
- * @name $animateProvider
- *
- * @description
- * Default implementation of $animate that doesn't perform any animations, instead just
- * synchronously performs DOM updates and resolves the returned runner promise.
- *
- * In order to enable animations the `ngAnimate` module has to be loaded.
- *
- * To see the functional implementation check out `src/ngAnimate/animate.js`.
- */
-var $AnimateProvider = ['$provide', function($provide) {
- var provider = this;
-
- this.$$registeredAnimations = Object.create(null);
-
- /**
- * @ngdoc method
- * @name $animateProvider#register
- *
- * @description
- * Registers a new injectable animation factory function. The factory function produces the
- * animation object which contains callback functions for each event that is expected to be
- * animated.
- *
- * * `eventFn`: `function(element, ... , doneFunction, options)`
- * The element to animate, the `doneFunction` and the options fed into the animation. Depending
- * on the type of animation additional arguments will be injected into the animation function. The
- * list below explains the function signatures for the different animation methods:
- *
- * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)
- * - addClass: function(element, addedClasses, doneFunction, options)
- * - removeClass: function(element, removedClasses, doneFunction, options)
- * - enter, leave, move: function(element, doneFunction, options)
- * - animate: function(element, fromStyles, toStyles, doneFunction, options)
- *
- * Make sure to trigger the `doneFunction` once the animation is fully complete.
- *
- * ```js
- * return {
- * //enter, leave, move signature
- * eventFn : function(element, done, options) {
- * //code to run the animation
- * //once complete, then run done()
- * return function endFunction(wasCancelled) {
- * //code to cancel the animation
- * }
- * }
- * }
- * ```
- *
- * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).
- * @param {Function} factory The factory function that will be executed to return the animation
- * object.
- */
- this.register = function(name, factory) {
- if (name && name.charAt(0) !== '.') {
- throw $animateMinErr('notcsel', "Expecting class selector starting with '.' got '{0}'.", name);
- }
-
- var key = name + '-animation';
- provider.$$registeredAnimations[name.substr(1)] = key;
- $provide.factory(key, factory);
- };
-
- /**
- * @ngdoc method
- * @name $animateProvider#classNameFilter
- *
- * @description
- * Sets and/or returns the CSS class regular expression that is checked when performing
- * an animation. Upon bootstrap the classNameFilter value is not set at all and will
- * therefore enable $animate to attempt to perform an animation on any element that is triggered.
- * When setting the `classNameFilter` value, animations will only be performed on elements
- * that successfully match the filter expression. This in turn can boost performance
- * for low-powered devices as well as applications containing a lot of structural operations.
- * @param {RegExp=} expression The className expression which will be checked against all animations
- * @return {RegExp} The current CSS className expression value. If null then there is no expression value
- */
- this.classNameFilter = function(expression) {
- if (arguments.length === 1) {
- this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;
- if (this.$$classNameFilter) {
- var reservedRegex = new RegExp("(\\s+|\\/)" + NG_ANIMATE_CLASSNAME + "(\\s+|\\/)");
- if (reservedRegex.test(this.$$classNameFilter.toString())) {
- throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', NG_ANIMATE_CLASSNAME);
-
- }
- }
- }
- return this.$$classNameFilter;
- };
-
- this.$get = ['$$animateQueue', function($$animateQueue) {
- function domInsert(element, parentElement, afterElement) {
- // if for some reason the previous element was removed
- // from the dom sometime before this code runs then let's
- // just stick to using the parent element as the anchor
- if (afterElement) {
- var afterNode = extractElementNode(afterElement);
- if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {
- afterElement = null;
- }
- }
- afterElement ? afterElement.after(element) : parentElement.prepend(element);
- }
-
- /**
- * @ngdoc service
- * @name $animate
- * @description The $animate service exposes a series of DOM utility methods that provide support
- * for animation hooks. The default behavior is the application of DOM operations, however,
- * when an animation is detected (and animations are enabled), $animate will do the heavy lifting
- * to ensure that animation runs with the triggered DOM operation.
- *
- * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't
- * included and only when it is active then the animation hooks that `$animate` triggers will be
- * functional. Once active then all structural `ng-` directives will trigger animations as they perform
- * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,
- * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.
- *
- * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.
- *
- * To learn more about enabling animation support, click here to visit the
- * {@link ngAnimate ngAnimate module page}.
- */
- return {
- // we don't call it directly since non-existant arguments may
- // be interpreted as null within the sub enabled function
-
- /**
- *
- * @ngdoc method
- * @name $animate#on
- * @kind function
- * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)
- * has fired on the given element or among any of its children. Once the listener is fired, the provided callback
- * is fired with the following params:
- *
- * ```js
- * $animate.on('enter', container,
- * function callback(element, phase) {
- * // cool we detected an enter animation within the container
- * }
- * );
- * ```
- *
- * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)
- * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself
- * as well as among its children
- * @param {Function} callback the callback function that will be fired when the listener is triggered
- *
- * The arguments present in the callback function are:
- * * `element` - The captured DOM element that the animation was fired on.
- * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).
- */
- on: $$animateQueue.on,
-
- /**
- *
- * @ngdoc method
- * @name $animate#off
- * @kind function
- * @description Deregisters an event listener based on the event which has been associated with the provided element. This method
- * can be used in three different ways depending on the arguments:
- *
- * ```js
- * // remove all the animation event listeners listening for `enter`
- * $animate.off('enter');
- *
- * // remove all the animation event listeners listening for `enter` on the given element and its children
- * $animate.off('enter', container);
- *
- * // remove the event listener function provided by `listenerFn` that is set
- * // to listen for `enter` on the given `element` as well as its children
- * $animate.off('enter', container, callback);
- * ```
- *
- * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)
- * @param {DOMElement=} container the container element the event listener was placed on
- * @param {Function=} callback the callback function that was registered as the listener
- */
- off: $$animateQueue.off,
-
- /**
- * @ngdoc method
- * @name $animate#pin
- * @kind function
- * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists
- * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the
- * element despite being outside the realm of the application or within another application. Say for example if the application
- * was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated
- * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind
- * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.
- *
- * Note that this feature is only active when the `ngAnimate` module is used.
- *
- * @param {DOMElement} element the external element that will be pinned
- * @param {DOMElement} parentElement the host parent element that will be associated with the external element
- */
- pin: $$animateQueue.pin,
-
- /**
- *
- * @ngdoc method
- * @name $animate#enabled
- * @kind function
- * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This
- * function can be called in four ways:
- *
- * ```js
- * // returns true or false
- * $animate.enabled();
- *
- * // changes the enabled state for all animations
- * $animate.enabled(false);
- * $animate.enabled(true);
- *
- * // returns true or false if animations are enabled for an element
- * $animate.enabled(element);
- *
- * // changes the enabled state for an element and its children
- * $animate.enabled(element, true);
- * $animate.enabled(element, false);
- * ```
- *
- * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state
- * @param {boolean=} enabled whether or not the animations will be enabled for the element
- *
- * @return {boolean} whether or not animations are enabled
- */
- enabled: $$animateQueue.enabled,
-
- /**
- * @ngdoc method
- * @name $animate#cancel
- * @kind function
- * @description Cancels the provided animation.
- *
- * @param {Promise} animationPromise The animation promise that is returned when an animation is started.
- */
- cancel: function(runner) {
- runner.end && runner.end();
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#enter
- * @kind function
- * @description Inserts the element into the DOM either after the `after` element (if provided) or
- * as the first child within the `parent` element and then triggers an animation.
- * A promise is returned that will be resolved during the next digest once the animation
- * has completed.
- *
- * @param {DOMElement} element the element which will be inserted into the DOM
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (so long as the after element is not present)
- * @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- enter: function(element, parent, after, options) {
- parent = parent && jqLite(parent);
- after = after && jqLite(after);
- parent = parent || after.parent();
- domInsert(element, parent, after);
- return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#move
- * @kind function
- * @description Inserts (moves) the element into its new position in the DOM either after
- * the `after` element (if provided) or as the first child within the `parent` element
- * and then triggers an animation. A promise is returned that will be resolved
- * during the next digest once the animation has completed.
- *
- * @param {DOMElement} element the element which will be moved into the new DOM position
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (so long as the after element is not present)
- * @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- move: function(element, parent, after, options) {
- parent = parent && jqLite(parent);
- after = after && jqLite(after);
- parent = parent || after.parent();
- domInsert(element, parent, after);
- return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));
- },
-
- /**
- * @ngdoc method
- * @name $animate#leave
- * @kind function
- * @description Triggers an animation and then removes the element from the DOM.
- * When the function is called a promise is returned that will be resolved during the next
- * digest once the animation has completed.
- *
- * @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- leave: function(element, options) {
- return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {
- element.remove();
- });
- },
-
- /**
- * @ngdoc method
- * @name $animate#addClass
- * @kind function
- *
- * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon
- * execution, the addClass operation will only be handled after the next digest and it will not trigger an
- * animation if element already contains the CSS class or if the class is removed at a later step.
- * Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- addClass: function(element, className, options) {
- options = prepareAnimateOptions(options);
- options.addClass = mergeClasses(options.addclass, className);
- return $$animateQueue.push(element, 'addClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#removeClass
- * @kind function
- *
- * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon
- * execution, the removeClass operation will only be handled after the next digest and it will not trigger an
- * animation if element does not contain the CSS class or if the class is added at a later step.
- * Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- removeClass: function(element, className, options) {
- options = prepareAnimateOptions(options);
- options.removeClass = mergeClasses(options.removeClass, className);
- return $$animateQueue.push(element, 'removeClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#setClass
- * @kind function
- *
- * @description Performs both the addition and removal of a CSS classes on an element and (during the process)
- * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and
- * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has
- * passed. Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- setClass: function(element, add, remove, options) {
- options = prepareAnimateOptions(options);
- options.addClass = mergeClasses(options.addClass, add);
- options.removeClass = mergeClasses(options.removeClass, remove);
- return $$animateQueue.push(element, 'setClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#animate
- * @kind function
- *
- * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.
- * If any detected CSS transition, keyframe or JavaScript matches the provided className value then the animation will take
- * on the provided styles. For example, if a transition animation is set for the given className then the provided from and
- * to styles will be applied alongside the given transition. If a JavaScript animation is detected then the provided styles
- * will be given in as function paramters into the `animate` method (or as apart of the `options` parameter).
- *
- * @param {DOMElement} element the element which the CSS styles will be applied to
- * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.
- * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.
- * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
- * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
- * (Note that if no animation is detected then this value will not be appplied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- animate: function(element, from, to, className, options) {
- options = prepareAnimateOptions(options);
- options.from = options.from ? extend(options.from, from) : from;
- options.to = options.to ? extend(options.to, to) : to;
-
- className = className || 'ng-inline-animate';
- options.tempClasses = mergeClasses(options.tempClasses, className);
- return $$animateQueue.push(element, 'animate', options);
- }
- };
- }];
-}];
-
-/**
- * @ngdoc service
- * @name $animateCss
- * @kind object
- *
- * @description
- * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,
- * then the `$animateCss` service will actually perform animations.
- *
- * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.
- */
-var $CoreAnimateCssProvider = function() {
- this.$get = ['$$rAF', '$q', function($$rAF, $q) {
-
- var RAFPromise = function() {};
- RAFPromise.prototype = {
- done: function(cancel) {
- this.defer && this.defer[cancel === true ? 'reject' : 'resolve']();
- },
- end: function() {
- this.done();
- },
- cancel: function() {
- this.done(true);
- },
- getPromise: function() {
- if (!this.defer) {
- this.defer = $q.defer();
- }
- return this.defer.promise;
- },
- then: function(f1,f2) {
- return this.getPromise().then(f1,f2);
- },
- 'catch': function(f1) {
- return this.getPromise()['catch'](f1);
- },
- 'finally': function(f1) {
- return this.getPromise()['finally'](f1);
- }
- };
-
- return function(element, options) {
- // there is no point in applying the styles since
- // there is no animation that goes on at all in
- // this version of $animateCss.
- if (options.cleanupStyles) {
- options.from = options.to = null;
- }
-
- if (options.from) {
- element.css(options.from);
- options.from = null;
- }
-
- var closed, runner = new RAFPromise();
- return {
- start: run,
- end: run
- };
-
- function run() {
- $$rAF(function() {
- close();
- if (!closed) {
- runner.done();
- }
- closed = true;
- });
- return runner;
- }
-
- function close() {
- if (options.addClass) {
- element.addClass(options.addClass);
- options.addClass = null;
- }
- if (options.removeClass) {
- element.removeClass(options.removeClass);
- options.removeClass = null;
- }
- if (options.to) {
- element.css(options.to);
- options.to = null;
- }
- }
- };
- }];
-};
-
-/* global stripHash: true */
-
-/**
- * ! This is a private undocumented service !
- *
- * @name $browser
- * @requires $log
- * @description
- * This object has two goals:
- *
- * - hide all the global state in the browser caused by the window object
- * - abstract away all the browser specific features and inconsistencies
- *
- * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
- * service, which can be used for convenient testing of the application without the interaction with
- * the real browser apis.
- */
-/**
- * @param {object} window The global window object.
- * @param {object} document jQuery wrapped document.
- * @param {object} $log window.console or an object with the same interface.
- * @param {object} $sniffer $sniffer service
- */
-function Browser(window, document, $log, $sniffer) {
- var self = this,
- rawDocument = document[0],
- location = window.location,
- history = window.history,
- setTimeout = window.setTimeout,
- clearTimeout = window.clearTimeout,
- pendingDeferIds = {};
-
- self.isMock = false;
-
- var outstandingRequestCount = 0;
- var outstandingRequestCallbacks = [];
-
- // TODO(vojta): remove this temporary api
- self.$$completeOutstandingRequest = completeOutstandingRequest;
- self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };
-
- /**
- * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`
- * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
- */
- function completeOutstandingRequest(fn) {
- try {
- fn.apply(null, sliceArgs(arguments, 1));
- } finally {
- outstandingRequestCount--;
- if (outstandingRequestCount === 0) {
- while (outstandingRequestCallbacks.length) {
- try {
- outstandingRequestCallbacks.pop()();
- } catch (e) {
- $log.error(e);
- }
- }
- }
- }
- }
-
- function getHash(url) {
- var index = url.indexOf('#');
- return index === -1 ? '' : url.substr(index);
- }
-
- /**
- * @private
- * Note: this method is used only by scenario runner
- * TODO(vojta): prefix this method with $$ ?
- * @param {function()} callback Function that will be called when no outstanding request
- */
- self.notifyWhenNoOutstandingRequests = function(callback) {
- if (outstandingRequestCount === 0) {
- callback();
- } else {
- outstandingRequestCallbacks.push(callback);
- }
- };
-
- //////////////////////////////////////////////////////////////
- // URL API
- //////////////////////////////////////////////////////////////
-
- var cachedState, lastHistoryState,
- lastBrowserUrl = location.href,
- baseElement = document.find('base'),
- pendingLocation = null;
-
- cacheState();
- lastHistoryState = cachedState;
-
- /**
- * @name $browser#url
- *
- * @description
- * GETTER:
- * Without any argument, this method just returns current value of location.href.
- *
- * SETTER:
- * With at least one argument, this method sets url to new value.
- * If html5 history api supported, pushState/replaceState is used, otherwise
- * location.href/location.replace is used.
- * Returns its own instance to allow chaining
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to change url.
- *
- * @param {string} url New url (when used as setter)
- * @param {boolean=} replace Should new url replace current history record?
- * @param {object=} state object to use with pushState/replaceState
- */
- self.url = function(url, replace, state) {
- // In modern browsers `history.state` is `null` by default; treating it separately
- // from `undefined` would cause `$browser.url('/foo')` to change `history.state`
- // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.
- if (isUndefined(state)) {
- state = null;
- }
-
- // Android Browser BFCache causes location, history reference to become stale.
- if (location !== window.location) location = window.location;
- if (history !== window.history) history = window.history;
-
- // setter
- if (url) {
- var sameState = lastHistoryState === state;
-
- // Don't change anything if previous and current URLs and states match. This also prevents
- // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.
- // See https://github.com/angular/angular.js/commit/ffb2701
- if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {
- return self;
- }
- var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);
- lastBrowserUrl = url;
- lastHistoryState = state;
- // Don't use history API if only the hash changed
- // due to a bug in IE10/IE11 which leads
- // to not firing a `hashchange` nor `popstate` event
- // in some cases (see #9143).
- if ($sniffer.history && (!sameBase || !sameState)) {
- history[replace ? 'replaceState' : 'pushState'](state, '', url);
- cacheState();
- // Do the assignment again so that those two variables are referentially identical.
- lastHistoryState = cachedState;
- } else {
- if (!sameBase || pendingLocation) {
- pendingLocation = url;
- }
- if (replace) {
- location.replace(url);
- } else if (!sameBase) {
- location.href = url;
- } else {
- location.hash = getHash(url);
- }
- if (location.href !== url) {
- pendingLocation = url;
- }
- }
- return self;
- // getter
- } else {
- // - pendingLocation is needed as browsers don't allow to read out
- // the new location.href if a reload happened or if there is a bug like in iOS 9 (see
- // https://openradar.appspot.com/22186109).
- // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
- return pendingLocation || location.href.replace(/%27/g,"'");
- }
- };
-
- /**
- * @name $browser#state
- *
- * @description
- * This method is a getter.
- *
- * Return history.state or null if history.state is undefined.
- *
- * @returns {object} state
- */
- self.state = function() {
- return cachedState;
- };
-
- var urlChangeListeners = [],
- urlChangeInit = false;
-
- function cacheStateAndFireUrlChange() {
- pendingLocation = null;
- cacheState();
- fireUrlChange();
- }
-
- function getCurrentState() {
- try {
- return history.state;
- } catch (e) {
- // MSIE can reportedly throw when there is no state (UNCONFIRMED).
- }
- }
-
- // This variable should be used *only* inside the cacheState function.
- var lastCachedState = null;
- function cacheState() {
- // This should be the only place in $browser where `history.state` is read.
- cachedState = getCurrentState();
- cachedState = isUndefined(cachedState) ? null : cachedState;
-
- // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
- if (equals(cachedState, lastCachedState)) {
- cachedState = lastCachedState;
- }
- lastCachedState = cachedState;
- }
-
- function fireUrlChange() {
- if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {
- return;
- }
-
- lastBrowserUrl = self.url();
- lastHistoryState = cachedState;
- forEach(urlChangeListeners, function(listener) {
- listener(self.url(), cachedState);
- });
- }
-
- /**
- * @name $browser#onUrlChange
- *
- * @description
- * Register callback function that will be called, when url changes.
- *
- * It's only called when the url is changed from outside of angular:
- * - user types different url into address bar
- * - user clicks on history (forward/back) button
- * - user clicks on a link
- *
- * It's not called when url is changed by $browser.url() method
- *
- * The listener gets called with new url as parameter.
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to monitor url changes in angular apps.
- *
- * @param {function(string)} listener Listener function to be called when url changes.
- * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
- */
- self.onUrlChange = function(callback) {
- // TODO(vojta): refactor to use node's syntax for events
- if (!urlChangeInit) {
- // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)
- // don't fire popstate when user change the address bar and don't fire hashchange when url
- // changed by push/replaceState
-
- // html5 history api - popstate event
- if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);
- // hashchange event
- jqLite(window).on('hashchange', cacheStateAndFireUrlChange);
-
- urlChangeInit = true;
- }
-
- urlChangeListeners.push(callback);
- return callback;
- };
-
- /**
- * @private
- * Remove popstate and hashchange handler from window.
- *
- * NOTE: this api is intended for use only by $rootScope.
- */
- self.$$applicationDestroyed = function() {
- jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);
- };
-
- /**
- * Checks whether the url has changed outside of Angular.
- * Needs to be exported to be able to check for changes that have been done in sync,
- * as hashchange/popstate events fire in async.
- */
- self.$$checkUrlChange = fireUrlChange;
-
- //////////////////////////////////////////////////////////////
- // Misc API
- //////////////////////////////////////////////////////////////
-
- /**
- * @name $browser#baseHref
- *
- * @description
- * Returns current <base href>
- * (always relative - without domain)
- *
- * @returns {string} The current base href
- */
- self.baseHref = function() {
- var href = baseElement.attr('href');
- return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : '';
- };
-
- /**
- * @name $browser#defer
- * @param {function()} fn A function, who's execution should be deferred.
- * @param {number=} [delay=0] of milliseconds to defer the function execution.
- * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
- *
- * @description
- * Executes a fn asynchronously via `setTimeout(fn, delay)`.
- *
- * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
- * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
- * via `$browser.defer.flush()`.
- *
- */
- self.defer = function(fn, delay) {
- var timeoutId;
- outstandingRequestCount++;
- timeoutId = setTimeout(function() {
- delete pendingDeferIds[timeoutId];
- completeOutstandingRequest(fn);
- }, delay || 0);
- pendingDeferIds[timeoutId] = true;
- return timeoutId;
- };
-
-
- /**
- * @name $browser#defer.cancel
- *
- * @description
- * Cancels a deferred task identified with `deferId`.
- *
- * @param {*} deferId Token returned by the `$browser.defer` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- self.defer.cancel = function(deferId) {
- if (pendingDeferIds[deferId]) {
- delete pendingDeferIds[deferId];
- clearTimeout(deferId);
- completeOutstandingRequest(noop);
- return true;
- }
- return false;
- };
-
-}
-
-function $BrowserProvider() {
- this.$get = ['$window', '$log', '$sniffer', '$document',
- function($window, $log, $sniffer, $document) {
- return new Browser($window, $document, $log, $sniffer);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $cacheFactory
- *
- * @description
- * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
- * them.
- *
- * ```js
- *
- * var cache = $cacheFactory('cacheId');
- * expect($cacheFactory.get('cacheId')).toBe(cache);
- * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
- *
- * cache.put("key", "value");
- * cache.put("another key", "another value");
- *
- * // We've specified no options on creation
- * expect(cache.info()).toEqual({id: 'cacheId', size: 2});
- *
- * ```
- *
- *
- * @param {string} cacheId Name or id of the newly created cache.
- * @param {object=} options Options object that specifies the cache behavior. Properties:
- *
- * - `{number=}` `capacity` — turns the cache into LRU cache.
- *
- * @returns {object} Newly created cache object with the following set of methods:
- *
- * - `{object}` `info()` — Returns id, size, and options of cache.
- * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns
- * it.
- * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.
- * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.
- * - `{void}` `removeAll()` — Removes all cached values.
- * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
- *
- * @example
- <example module="cacheExampleApp">
- <file name="index.html">
- <div ng-controller="CacheController">
- <input ng-model="newCacheKey" placeholder="Key">
- <input ng-model="newCacheValue" placeholder="Value">
- <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
-
- <p ng-if="keys.length">Cached Values</p>
- <div ng-repeat="key in keys">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="cache.get(key)"></b>
- </div>
-
- <p>Cache Info</p>
- <div ng-repeat="(key, value) in cache.info()">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="value"></b>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cacheExampleApp', []).
- controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
- $scope.keys = [];
- $scope.cache = $cacheFactory('cacheId');
- $scope.put = function(key, value) {
- if (angular.isUndefined($scope.cache.get(key))) {
- $scope.keys.push(key);
- }
- $scope.cache.put(key, angular.isUndefined(value) ? null : value);
- };
- }]);
- </file>
- <file name="style.css">
- p {
- margin: 10px 0 3px;
- }
- </file>
- </example>
- */
-function $CacheFactoryProvider() {
-
- this.$get = function() {
- var caches = {};
-
- function cacheFactory(cacheId, options) {
- if (cacheId in caches) {
- throw minErr('$cacheFactory')('iid', "CacheId '{0}' is already taken!", cacheId);
- }
-
- var size = 0,
- stats = extend({}, options, {id: cacheId}),
- data = createMap(),
- capacity = (options && options.capacity) || Number.MAX_VALUE,
- lruHash = createMap(),
- freshEnd = null,
- staleEnd = null;
-
- /**
- * @ngdoc type
- * @name $cacheFactory.Cache
- *
- * @description
- * A cache object used to store and retrieve data, primarily used by
- * {@link $http $http} and the {@link ng.directive:script script} directive to cache
- * templates and other data.
- *
- * ```js
- * angular.module('superCache')
- * .factory('superCache', ['$cacheFactory', function($cacheFactory) {
- * return $cacheFactory('super-cache');
- * }]);
- * ```
- *
- * Example test:
- *
- * ```js
- * it('should behave like a cache', inject(function(superCache) {
- * superCache.put('key', 'value');
- * superCache.put('another key', 'another value');
- *
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 2
- * });
- *
- * superCache.remove('another key');
- * expect(superCache.get('another key')).toBeUndefined();
- *
- * superCache.removeAll();
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 0
- * });
- * }));
- * ```
- */
- return caches[cacheId] = {
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#put
- * @kind function
- *
- * @description
- * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
- * retrieved later, and incrementing the size of the cache if the key was not already
- * present in the cache. If behaving like an LRU cache, it will also remove stale
- * entries from the set.
- *
- * It will not insert undefined values into the cache.
- *
- * @param {string} key the key under which the cached data is stored.
- * @param {*} value the value to store alongside the key. If it is undefined, the key
- * will not be stored.
- * @returns {*} the value stored.
- */
- put: function(key, value) {
- if (isUndefined(value)) return;
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
-
- refresh(lruEntry);
- }
-
- if (!(key in data)) size++;
- data[key] = value;
-
- if (size > capacity) {
- this.remove(staleEnd.key);
- }
-
- return value;
- },
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#get
- * @kind function
- *
- * @description
- * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the data to be retrieved
- * @returns {*} the value stored.
- */
- get: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- refresh(lruEntry);
- }
-
- return data[key];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#remove
- * @kind function
- *
- * @description
- * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the entry to be removed
- */
- remove: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- if (lruEntry == freshEnd) freshEnd = lruEntry.p;
- if (lruEntry == staleEnd) staleEnd = lruEntry.n;
- link(lruEntry.n,lruEntry.p);
-
- delete lruHash[key];
- }
-
- if (!(key in data)) return;
-
- delete data[key];
- size--;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#removeAll
- * @kind function
- *
- * @description
- * Clears the cache object of any entries.
- */
- removeAll: function() {
- data = createMap();
- size = 0;
- lruHash = createMap();
- freshEnd = staleEnd = null;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#destroy
- * @kind function
- *
- * @description
- * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
- * removing it from the {@link $cacheFactory $cacheFactory} set.
- */
- destroy: function() {
- data = null;
- stats = null;
- lruHash = null;
- delete caches[cacheId];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#info
- * @kind function
- *
- * @description
- * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
- *
- * @returns {object} an object with the following properties:
- * <ul>
- * <li>**id**: the id of the cache instance</li>
- * <li>**size**: the number of entries kept in the cache instance</li>
- * <li>**...**: any additional properties from the options object when creating the
- * cache.</li>
- * </ul>
- */
- info: function() {
- return extend({}, stats, {size: size});
- }
- };
-
-
- /**
- * makes the `entry` the freshEnd of the LRU linked list
- */
- function refresh(entry) {
- if (entry != freshEnd) {
- if (!staleEnd) {
- staleEnd = entry;
- } else if (staleEnd == entry) {
- staleEnd = entry.n;
- }
-
- link(entry.n, entry.p);
- link(entry, freshEnd);
- freshEnd = entry;
- freshEnd.n = null;
- }
- }
-
-
- /**
- * bidirectionally links two entries of the LRU linked list
- */
- function link(nextEntry, prevEntry) {
- if (nextEntry != prevEntry) {
- if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify
- if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#info
- *
- * @description
- * Get information about all the caches that have been created
- *
- * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
- */
- cacheFactory.info = function() {
- var info = {};
- forEach(caches, function(cache, cacheId) {
- info[cacheId] = cache.info();
- });
- return info;
- };
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#get
- *
- * @description
- * Get access to a cache object by the `cacheId` used when it was created.
- *
- * @param {string} cacheId Name or id of a cache to access.
- * @returns {object} Cache object identified by the cacheId or undefined if no such cache.
- */
- cacheFactory.get = function(cacheId) {
- return caches[cacheId];
- };
-
-
- return cacheFactory;
- };
-}
-
-/**
- * @ngdoc service
- * @name $templateCache
- *
- * @description
- * The first time a template is used, it is loaded in the template cache for quick retrieval. You
- * can load templates directly into the cache in a `script` tag, or by consuming the
- * `$templateCache` service directly.
- *
- * Adding via the `script` tag:
- *
- * ```html
- * <script type="text/ng-template" id="templateId.html">
- * <p>This is the content of the template</p>
- * </script>
- * ```
- *
- * **Note:** the `script` tag containing the template does not need to be included in the `head` of
- * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,
- * element with ng-app attribute), otherwise the template will be ignored.
- *
- * Adding via the `$templateCache` service:
- *
- * ```js
- * var myApp = angular.module('myApp', []);
- * myApp.run(function($templateCache) {
- * $templateCache.put('templateId.html', 'This is the content of the template');
- * });
- * ```
- *
- * To retrieve the template later, simply use it in your HTML:
- * ```html
- * <div ng-include=" 'templateId.html' "></div>
- * ```
- *
- * or get it via Javascript:
- * ```js
- * $templateCache.get('templateId.html')
- * ```
- *
- * See {@link ng.$cacheFactory $cacheFactory}.
- *
- */
-function $TemplateCacheProvider() {
- this.$get = ['$cacheFactory', function($cacheFactory) {
- return $cacheFactory('templates');
- }];
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
- *
- * DOM-related variables:
- *
- * - "node" - DOM Node
- * - "element" - DOM Element or Node
- * - "$node" or "$element" - jqLite-wrapped node or element
- *
- *
- * Compiler related stuff:
- *
- * - "linkFn" - linking fn of a single directive
- * - "nodeLinkFn" - function that aggregates all linking fns for a particular node
- * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node
- * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList)
- */
-
-
-/**
- * @ngdoc service
- * @name $compile
- * @kind function
- *
- * @description
- * Compiles an HTML string or DOM into a template and produces a template function, which
- * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.
- *
- * The compilation is a process of walking the DOM tree and matching DOM elements to
- * {@link ng.$compileProvider#directive directives}.
- *
- * <div class="alert alert-warning">
- * **Note:** This document is an in-depth reference of all directive options.
- * For a gentle introduction to directives with examples of common use cases,
- * see the {@link guide/directive directive guide}.
- * </div>
- *
- * ## Comprehensive Directive API
- *
- * There are many different options for a directive.
- *
- * The difference resides in the return value of the factory function.
- * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
- * or just the `postLink` function (all other properties will have the default values).
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's recommended to use the "directive definition object" form.
- * </div>
- *
- * Here's an example directive declared with a Directive Definition Object:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * priority: 0,
- * template: '<div></div>', // or // function(tElement, tAttrs) { ... },
- * // or
- * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
- * transclude: false,
- * restrict: 'A',
- * templateNamespace: 'html',
- * scope: false,
- * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
- * controllerAs: 'stringIdentifier',
- * bindToController: false,
- * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
- * compile: function compile(tElement, tAttrs, transclude) {
- * return {
- * pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * }
- * // or
- * // return function postLink( ... ) { ... }
- * },
- * // or
- * // link: {
- * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * // post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * // }
- * // or
- * // link: function postLink( ... ) { ... }
- * };
- * return directiveDefinitionObject;
- * });
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** Any unspecified options will use the default value. You can see the default values below.
- * </div>
- *
- * Therefore the above can be simplified as:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * link: function postLink(scope, iElement, iAttrs) { ... }
- * };
- * return directiveDefinitionObject;
- * // or
- * // return function postLink(scope, iElement, iAttrs) { ... }
- * });
- * ```
- *
- *
- *
- * ### Directive Definition Object
- *
- * The directive definition object provides instructions to the {@link ng.$compile
- * compiler}. The attributes are:
- *
- * #### `multiElement`
- * When this property is set to true, the HTML compiler will collect DOM nodes between
- * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them
- * together as the directive elements. It is recommended that this feature be used on directives
- * which are not strictly behavioural (such as {@link ngClick}), and which
- * do not manipulate or replace child nodes (such as {@link ngInclude}).
- *
- * #### `priority`
- * When there are multiple directives defined on a single DOM element, sometimes it
- * is necessary to specify the order in which the directives are applied. The `priority` is used
- * to sort the directives before their `compile` functions get called. Priority is defined as a
- * number. Directives with greater numerical `priority` are compiled first. Pre-link functions
- * are also run in priority order, but post-link functions are run in reverse order. The order
- * of directives with the same priority is undefined. The default priority is `0`.
- *
- * #### `terminal`
- * If set to true then the current `priority` will be the last set of directives
- * which will execute (any directives at the current priority will still execute
- * as the order of execution on same `priority` is undefined). Note that expressions
- * and other directives used in the directive's template will also be excluded from execution.
- *
- * #### `scope`
- * The scope property can be `true`, an object or a falsy value:
- *
- * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.
- *
- * * **`true`:** A new child scope that prototypically inherits from its parent will be created for
- * the directive's element. If multiple directives on the same element request a new scope,
- * only one new scope is created. The new scope rule does not apply for the root of the template
- * since the root of the template always gets a new scope.
- *
- * * **`{...}` (an object hash):** A new "isolate" scope is created for the directive's element. The
- * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent
- * scope. This is useful when creating reusable components, which should not accidentally read or modify
- * data in the parent scope.
- *
- * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the
- * directive's element. These local properties are useful for aliasing values for templates. The keys in
- * the object hash map to the name of the property on the isolate scope; the values define how the property
- * is bound to the parent scope, via matching attributes on the directive's element:
- *
- * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is
- * always a string since DOM attributes are strings. If no `attr` name is specified then the
- * attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="hello {{name}}">` and widget definition
- * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect
- * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the
- * `localName` property on the widget scope. The `name` is read from the parent scope (not
- * component scope).
- *
- * * `=` or `=attr` - set up bi-directional binding between a local scope property and the
- * parent scope property of name defined via the value of the `attr` attribute. If no `attr`
- * name is specified then the attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="parentModel">` and widget definition of
- * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the
- * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected
- * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent
- * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You
- * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional. If
- * you want to shallow watch for changes (i.e. $watchCollection instead of $watch) you can use
- * `=*` or `=*attr` (`=*?` or `=*?attr` if the property is optional).
- *
- * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.
- * If no `attr` name is specified then the attribute name is assumed to be the same as the
- * local name. Given `<widget my-attr="count = count + value">` and widget definition of
- * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
- * a function wrapper for the `count = count + value` expression. Often it's desirable to
- * pass data from the isolated scope via an expression to the parent scope, this can be
- * done by passing a map of local variable names and values into the expression wrapper fn.
- * For example, if the expression is `increment(amount)` then we can specify the amount value
- * by calling the `localFn` as `localFn({amount: 22})`.
- *
- * In general it's possible to apply more than one directive to one element, but there might be limitations
- * depending on the type of scope required by the directives. The following points will help explain these limitations.
- * For simplicity only two directives are taken into account, but it is also applicable for several directives:
- *
- * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope
- * * **child scope** + **no scope** => Both directives will share one single child scope
- * * **child scope** + **child scope** => Both directives will share one single child scope
- * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use
- * its parent's scope
- * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot
- * be applied to the same element.
- * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives
- * cannot be applied to the same element.
- *
- *
- * #### `bindToController`
- * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will
- * allow a component to have its properties bound to the controller, rather than to scope. When the controller
- * is instantiated, the initial values of the isolate scope bindings are already available.
- *
- * #### `controller`
- * Controller constructor function. The controller is instantiated before the
- * pre-linking phase and can be accessed by other directives (see
- * `require` attribute). This allows the directives to communicate with each other and augment
- * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:
- *
- * * `$scope` - Current scope associated with the element
- * * `$element` - Current element
- * * `$attrs` - Current attributes object for the element
- * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:
- * `function([scope], cloneLinkingFn, futureParentElement)`.
- * * `scope`: optional argument to override the scope.
- * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.
- * * `futureParentElement`:
- * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.
- * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.
- * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)
- * and when the `cloneLinkinFn` is passed,
- * as those elements need to created and cloned in a special way when they are defined outside their
- * usual containers (e.g. like `<svg>`).
- * * See also the `directive.templateNamespace` property.
- *
- *
- * #### `require`
- * Require another directive and inject its controller as the fourth argument to the linking function. The
- * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
- * injected argument will be an array in corresponding order. If no such directive can be
- * found, or if the directive does not have a controller, then an error is raised (unless no link function
- * is specified, in which case error checking is skipped). The name can be prefixed with:
- *
- * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
- * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
- * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
- * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.
- * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
- * `null` to the `link` fn if not found.
- * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass
- * `null` to the `link` fn if not found.
- *
- *
- * #### `controllerAs`
- * Identifier name for a reference to the controller in the directive's scope.
- * This allows the controller to be referenced from the directive template. This is especially
- * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible
- * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the
- * `controllerAs` reference might overwrite a property that already exists on the parent scope.
- *
- *
- * #### `restrict`
- * String of subset of `EACM` which restricts the directive to a specific directive
- * declaration style. If omitted, the defaults (elements and attributes) are used.
- *
- * * `E` - Element name (default): `<my-directive></my-directive>`
- * * `A` - Attribute (default): `<div my-directive="exp"></div>`
- * * `C` - Class: `<div class="my-directive: exp;"></div>`
- * * `M` - Comment: `<!-- directive: my-directive exp -->`
- *
- *
- * #### `templateNamespace`
- * String representing the document type used by the markup in the template.
- * AngularJS needs this information as those elements need to be created and cloned
- * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.
- *
- * * `html` - All root nodes in the template are HTML. Root nodes may also be
- * top-level elements such as `<svg>` or `<math>`.
- * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).
- * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).
- *
- * If no `templateNamespace` is specified, then the namespace is considered to be `html`.
- *
- * #### `template`
- * HTML markup that may:
- * * Replace the contents of the directive's element (default).
- * * Replace the directive's element itself (if `replace` is true - DEPRECATED).
- * * Wrap the contents of the directive's element (if `transclude` is true).
- *
- * Value may be:
- *
- * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.
- * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
- * function api below) and returns a string value.
- *
- *
- * #### `templateUrl`
- * This is similar to `template` but the template is loaded from the specified URL, asynchronously.
- *
- * Because template loading is asynchronous the compiler will suspend compilation of directives on that element
- * for later when the template has been resolved. In the meantime it will continue to compile and link
- * sibling and parent elements as though this element had not contained any directives.
- *
- * The compiler does not suspend the entire compilation to wait for templates to be loaded because this
- * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
- * case when only one deeply nested directive has `templateUrl`.
- *
- * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}
- *
- * You can specify `templateUrl` as a string representing the URL or as a function which takes two
- * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
- * a string value representing the url. In either case, the template URL is passed through {@link
- * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
- *
- *
- * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)
- * specify what the template should replace. Defaults to `false`.
- *
- * * `true` - the template will replace the directive's element.
- * * `false` - the template will replace the contents of the directive's element.
- *
- * The replacement process migrates all of the attributes / classes from the old element to the new
- * one. See the {@link guide/directive#template-expanding-directive
- * Directives Guide} for an example.
- *
- * There are very few scenarios where element replacement is required for the application function,
- * the main one being reusable custom components that are used within SVG contexts
- * (because SVG doesn't work with custom elements in the DOM tree).
- *
- * #### `transclude`
- * Extract the contents of the element where the directive appears and make it available to the directive.
- * The contents are compiled and provided to the directive as a **transclusion function**. See the
- * {@link $compile#transclusion Transclusion} section below.
- *
- * There are two kinds of transclusion depending upon whether you want to transclude just the contents of the
- * directive's element or the entire element:
- *
- * * `true` - transclude the content (i.e. the child nodes) of the directive's element.
- * * `'element'` - transclude the whole of the directive's element including any directives on this
- * element that defined at a lower priority than this directive. When used, the `template`
- * property is ignored.
- *
- *
- * #### `compile`
- *
- * ```js
- * function compile(tElement, tAttrs, transclude) { ... }
- * ```
- *
- * The compile function deals with transforming the template DOM. Since most directives do not do
- * template transformation, it is not used often. The compile function takes the following arguments:
- *
- * * `tElement` - template element - The element where the directive has been declared. It is
- * safe to do template transformation on the element and child elements only.
- *
- * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared
- * between all directive compile functions.
- *
- * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`
- *
- * <div class="alert alert-warning">
- * **Note:** The template instance and the link instance may be different objects if the template has
- * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that
- * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
- * should be done in a linking function rather than in a compile function.
- * </div>
-
- * <div class="alert alert-warning">
- * **Note:** The compile function cannot handle directives that recursively use themselves in their
- * own templates or compile functions. Compiling these directives results in an infinite loop and a
- * stack overflow errors.
- *
- * This can be avoided by manually using $compile in the postLink function to imperatively compile
- * a directive's template instead of relying on automatic template compilation via `template` or
- * `templateUrl` declaration or manual compilation inside the compile function.
- * </div>
- *
- * <div class="alert alert-danger">
- * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
- * e.g. does not know about the right outer scope. Please use the transclude function that is passed
- * to the link function instead.
- * </div>
-
- * A compile function can have a return value which can be either a function or an object.
- *
- * * returning a (post-link) function - is equivalent to registering the linking function via the
- * `link` property of the config object when the compile function is empty.
- *
- * * returning an object with function(s) registered via `pre` and `post` properties - allows you to
- * control when a linking function should be called during the linking phase. See info about
- * pre-linking and post-linking functions below.
- *
- *
- * #### `link`
- * This property is used only if the `compile` property is not defined.
- *
- * ```js
- * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }
- * ```
- *
- * The link function is responsible for registering DOM listeners as well as updating the DOM. It is
- * executed after the template has been cloned. This is where most of the directive logic will be
- * put.
- *
- * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the
- * directive for registering {@link ng.$rootScope.Scope#$watch watches}.
- *
- * * `iElement` - instance element - The element where the directive is to be used. It is safe to
- * manipulate the children of the element only in `postLink` function since the children have
- * already been linked.
- *
- * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared
- * between all directive linking functions.
- *
- * * `controller` - the directive's required controller instance(s) - Instances are shared
- * among all directives, which allows the directives to use the controllers as a communication
- * channel. The exact value depends on the directive's `require` property:
- * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one
- * * `string`: the controller instance
- * * `array`: array of controller instances
- *
- * If a required controller cannot be found, and it is optional, the instance is `null`,
- * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.
- *
- * Note that you can also require the directive's own controller - it will be made available like
- * any other controller.
- *
- * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude`
- * parameter of directive controllers, see there for details.
- * `function([scope], cloneLinkingFn, futureParentElement)`.
- *
- * #### Pre-linking function
- *
- * Executed before the child elements are linked. Not safe to do DOM transformation since the
- * compiler linking function will fail to locate the correct elements for linking.
- *
- * #### Post-linking function
- *
- * Executed after the child elements are linked.
- *
- * Note that child elements that contain `templateUrl` directives will not have been compiled
- * and linked since they are waiting for their template to load asynchronously and their own
- * compilation and linking has been suspended until that occurs.
- *
- * It is safe to do DOM transformation in the post-linking function on elements that are not waiting
- * for their async templates to be resolved.
- *
- *
- * ### Transclusion
- *
- * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and
- * copying them to another part of the DOM, while maintaining their connection to the original AngularJS
- * scope from where they were taken.
- *
- * Transclusion is used (often with {@link ngTransclude}) to insert the
- * original contents of a directive's element into a specified place in the template of the directive.
- * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded
- * content has access to the properties on the scope from which it was taken, even if the directive
- * has isolated scope.
- * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.
- *
- * This makes it possible for the widget to have private state for its template, while the transcluded
- * content has access to its originating scope.
- *
- * <div class="alert alert-warning">
- * **Note:** When testing an element transclude directive you must not place the directive at the root of the
- * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
- * Testing Transclusion Directives}.
- * </div>
- *
- * #### Transclusion Functions
- *
- * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion
- * function** to the directive's `link` function and `controller`. This transclusion function is a special
- * **linking function** that will return the compiled contents linked to a new transclusion scope.
- *
- * <div class="alert alert-info">
- * If you are just using {@link ngTransclude} then you don't need to worry about this function, since
- * ngTransclude will deal with it for us.
- * </div>
- *
- * If you want to manually control the insertion and removal of the transcluded content in your directive
- * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery
- * object that contains the compiled DOM, which is linked to the correct transclusion scope.
- *
- * When you call a transclusion function you can pass in a **clone attach function**. This function accepts
- * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded
- * content and the `scope` is the newly created transclusion scope, to which the clone is bound.
- *
- * <div class="alert alert-info">
- * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a translude function
- * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.
- * </div>
- *
- * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone
- * attach function**:
- *
- * ```js
- * var transcludedContent, transclusionScope;
- *
- * $transclude(function(clone, scope) {
- * element.append(clone);
- * transcludedContent = clone;
- * transclusionScope = scope;
- * });
- * ```
- *
- * Later, if you want to remove the transcluded content from your DOM then you should also destroy the
- * associated transclusion scope:
- *
- * ```js
- * transcludedContent.remove();
- * transclusionScope.$destroy();
- * ```
- *
- * <div class="alert alert-info">
- * **Best Practice**: if you intend to add and remove transcluded content manually in your directive
- * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),
- * then you are also responsible for calling `$destroy` on the transclusion scope.
- * </div>
- *
- * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}
- * automatically destroy their transluded clones as necessary so you do not need to worry about this if
- * you are simply using {@link ngTransclude} to inject the transclusion into your directive.
- *
- *
- * #### Transclusion Scopes
- *
- * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion
- * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed
- * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it
- * was taken.
- *
- * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look
- * like this:
- *
- * ```html
- * <div ng-app>
- * <div isolate>
- * <div transclusion>
- * </div>
- * </div>
- * </div>
- * ```
- *
- * The `$parent` scope hierarchy will look like this:
- *
- * ```
- * - $rootScope
- * - isolate
- * - transclusion
- * ```
- *
- * but the scopes will inherit prototypically from different scopes to their `$parent`.
- *
- * ```
- * - $rootScope
- * - transclusion
- * - isolate
- * ```
- *
- *
- * ### Attributes
- *
- * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
- * `link()` or `compile()` functions. It has a variety of uses.
- *
- * accessing *Normalized attribute names:*
- * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.
- * the attributes object allows for normalized access to
- * the attributes.
- *
- * * *Directive inter-communication:* All directives share the same instance of the attributes
- * object which allows the directives to use the attributes object as inter directive
- * communication.
- *
- * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object
- * allowing other directives to read the interpolated value.
- *
- * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes
- * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also
- * the only way to easily get the actual value because during the linking phase the interpolation
- * hasn't been evaluated yet and so the value is at this time set to `undefined`.
- *
- * ```js
- * function linkingFn(scope, elm, attrs, ctrl) {
- * // get the attribute value
- * console.log(attrs.ngModel);
- *
- * // change the attribute
- * attrs.$set('ngModel', 'new value');
- *
- * // observe changes to interpolated attribute
- * attrs.$observe('ngModel', function(value) {
- * console.log('ngModel has changed value to ' + value);
- * });
- * }
- * ```
- *
- * ## Example
- *
- * <div class="alert alert-warning">
- * **Note**: Typically directives are registered with `module.directive`. The example below is
- * to illustrate how `$compile` works.
- * </div>
- *
- <example module="compileExample">
- <file name="index.html">
- <script>
- angular.module('compileExample', [], function($compileProvider) {
- // configure new 'compile' directive by passing a directive
- // factory function. The factory function injects the '$compile'
- $compileProvider.directive('compile', function($compile) {
- // directive factory creates a link function
- return function(scope, element, attrs) {
- scope.$watch(
- function(scope) {
- // watch the 'compile' expression for changes
- return scope.$eval(attrs.compile);
- },
- function(value) {
- // when the 'compile' expression changes
- // assign it into the current DOM
- element.html(value);
-
- // compile the new DOM and link it to the current
- // scope.
- // NOTE: we only compile .childNodes so that
- // we don't get into infinite loop compiling ourselves
- $compile(element.contents())(scope);
- }
- );
- };
- });
- })
- .controller('GreeterController', ['$scope', function($scope) {
- $scope.name = 'Angular';
- $scope.html = 'Hello {{name}}';
- }]);
- </script>
- <div ng-controller="GreeterController">
- <input ng-model="name"> <br/>
- <textarea ng-model="html"></textarea> <br/>
- <div compile="html"></div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should auto compile', function() {
- var textarea = $('textarea');
- var output = $('div[compile]');
- // The initial state reads 'Hello Angular'.
- expect(output.getText()).toBe('Hello Angular');
- textarea.clear();
- textarea.sendKeys('{{name}}!');
- expect(output.getText()).toBe('Angular!');
- });
- </file>
- </example>
-
- *
- *
- * @param {string|DOMElement} element Element or HTML string to compile into a template function.
- * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.
- *
- * <div class="alert alert-danger">
- * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it
- * e.g. will not use the right outer scope. Please pass the transclude function as a
- * `parentBoundTranscludeFn` to the link function instead.
- * </div>
- *
- * @param {number} maxPriority only apply directives lower than given priority (Only effects the
- * root element(s), not their children)
- * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template
- * (a DOM element/tree) to a scope. Where:
- *
- * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
- * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
- * `template` and call the `cloneAttachFn` function allowing the caller to attach the
- * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
- * called as: <br/> `cloneAttachFn(clonedElement, scope)` where:
- *
- * * `clonedElement` - is a clone of the original `element` passed into the compiler.
- * * `scope` - is the current scope with which the linking function is working with.
- *
- * * `options` - An optional object hash with linking options. If `options` is provided, then the following
- * keys may be used to control linking behavior:
- *
- * * `parentBoundTranscludeFn` - the transclude function made available to
- * directives; if given, it will be passed through to the link functions of
- * directives found in `element` during compilation.
- * * `transcludeControllers` - an object hash with keys that map controller names
- * to controller instances; if given, it will make the controllers
- * available to directives.
- * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add
- * the cloned elements; only needed for transcludes that are allowed to contain non html
- * elements (e.g. SVG elements). See also the directive.controller property.
- *
- * Calling the linking function returns the element of the template. It is either the original
- * element passed in, or the clone of the element if the `cloneAttachFn` is provided.
- *
- * After linking the view is not updated until after a call to $digest which typically is done by
- * Angular automatically.
- *
- * If you need access to the bound view, there are two ways to do it:
- *
- * - If you are not asking the linking function to clone the template, create the DOM element(s)
- * before you send them to the compiler and keep this reference around.
- * ```js
- * var element = $compile('<p>{{total}}</p>')(scope);
- * ```
- *
- * - if on the other hand, you need the element to be cloned, the view reference from the original
- * example would not point to the clone, but rather to the original template that was cloned. In
- * this case, you can access the clone via the cloneAttachFn:
- * ```js
- * var templateElement = angular.element('<p>{{total}}</p>'),
- * scope = ....;
- *
- * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
- * //attach the clone to DOM document at the right place
- * });
- *
- * //now we have reference to the cloned DOM via `clonedElement`
- * ```
- *
- *
- * For information on how the compiler works, see the
- * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
- */
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc provider
- * @name $compileProvider
- *
- * @description
- */
-$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
-function $CompileProvider($provide, $$sanitizeUriProvider) {
- var hasDirectives = {},
- Suffix = 'Directive',
- COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\w\-]+)\s+(.*)$/,
- CLASS_DIRECTIVE_REGEXP = /(([\w\-]+)(?:\:([^;]+))?;?)/,
- ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),
- REQUIRE_PREFIX_REGEXP = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/;
-
- // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
- // The assumption is that future DOM event attribute names will begin with
- // 'on' and be composed of only English letters.
- var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;
-
- function parseIsolateBindings(scope, directiveName, isController) {
- var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/;
-
- var bindings = {};
-
- forEach(scope, function(definition, scopeName) {
- var match = definition.match(LOCAL_REGEXP);
-
- if (!match) {
- throw $compileMinErr('iscp',
- "Invalid {3} for directive '{0}'." +
- " Definition: {... {1}: '{2}' ...}",
- directiveName, scopeName, definition,
- (isController ? "controller bindings definition" :
- "isolate scope definition"));
- }
-
- bindings[scopeName] = {
- mode: match[1][0],
- collection: match[2] === '*',
- optional: match[3] === '?',
- attrName: match[4] || scopeName
- };
- });
-
- return bindings;
- }
-
- function parseDirectiveBindings(directive, directiveName) {
- var bindings = {
- isolateScope: null,
- bindToController: null
- };
- if (isObject(directive.scope)) {
- if (directive.bindToController === true) {
- bindings.bindToController = parseIsolateBindings(directive.scope,
- directiveName, true);
- bindings.isolateScope = {};
- } else {
- bindings.isolateScope = parseIsolateBindings(directive.scope,
- directiveName, false);
- }
- }
- if (isObject(directive.bindToController)) {
- bindings.bindToController =
- parseIsolateBindings(directive.bindToController, directiveName, true);
- }
- if (isObject(bindings.bindToController)) {
- var controller = directive.controller;
- var controllerAs = directive.controllerAs;
- if (!controller) {
- // There is no controller, there may or may not be a controllerAs property
- throw $compileMinErr('noctrl',
- "Cannot bind to controller without directive '{0}'s controller.",
- directiveName);
- } else if (!identifierForController(controller, controllerAs)) {
- // There is a controller, but no identifier or controllerAs property
- throw $compileMinErr('noident',
- "Cannot bind to controller without identifier for directive '{0}'.",
- directiveName);
- }
- }
- return bindings;
- }
-
- function assertValidDirectiveName(name) {
- var letter = name.charAt(0);
- if (!letter || letter !== lowercase(letter)) {
- throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name);
- }
- if (name !== name.trim()) {
- throw $compileMinErr('baddir',
- "Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",
- name);
- }
- }
-
- /**
- * @ngdoc method
- * @name $compileProvider#directive
- * @kind function
- *
- * @description
- * Register a new directive with the compiler.
- *
- * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
- * will match as <code>ng-bind</code>), or an object map of directives where the keys are the
- * names and the values are the factories.
- * @param {Function|Array} directiveFactory An injectable directive factory function. See
- * {@link guide/directive} for more info.
- * @returns {ng.$compileProvider} Self for chaining.
- */
- this.directive = function registerDirective(name, directiveFactory) {
- assertNotHasOwnProperty(name, 'directive');
- if (isString(name)) {
- assertValidDirectiveName(name);
- assertArg(directiveFactory, 'directiveFactory');
- if (!hasDirectives.hasOwnProperty(name)) {
- hasDirectives[name] = [];
- $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',
- function($injector, $exceptionHandler) {
- var directives = [];
- forEach(hasDirectives[name], function(directiveFactory, index) {
- try {
- var directive = $injector.invoke(directiveFactory);
- if (isFunction(directive)) {
- directive = { compile: valueFn(directive) };
- } else if (!directive.compile && directive.link) {
- directive.compile = valueFn(directive.link);
- }
- directive.priority = directive.priority || 0;
- directive.index = index;
- directive.name = directive.name || name;
- directive.require = directive.require || (directive.controller && directive.name);
- directive.restrict = directive.restrict || 'EA';
- var bindings = directive.$$bindings =
- parseDirectiveBindings(directive, directive.name);
- if (isObject(bindings.isolateScope)) {
- directive.$$isolateBindings = bindings.isolateScope;
- }
- directive.$$moduleName = directiveFactory.$$moduleName;
- directives.push(directive);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- return directives;
- }]);
- }
- hasDirectives[name].push(directiveFactory);
- } else {
- forEach(name, reverseParams(registerDirective));
- }
- return this;
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#aHrefSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at preventing XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.aHrefSanitizationWhitelist();
- }
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#imgSrcSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();
- }
- };
-
- /**
- * @ngdoc method
- * @name $compileProvider#debugInfoEnabled
- *
- * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the
- * current debugInfoEnabled state
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- *
- * @kind function
- *
- * @description
- * Call this method to enable/disable various debug runtime information in the compiler such as adding
- * binding information and a reference to the current scope on to DOM elements.
- * If enabled, the compiler will add the following to DOM elements that have been bound to the scope
- * * `ng-binding` CSS class
- * * `$binding` data property containing an array of the binding expressions
- *
- * You may want to disable this in production for a significant performance boost. See
- * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.
- *
- * The default value is true.
- */
- var debugInfoEnabled = true;
- this.debugInfoEnabled = function(enabled) {
- if (isDefined(enabled)) {
- debugInfoEnabled = enabled;
- return this;
- }
- return debugInfoEnabled;
- };
-
- this.$get = [
- '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',
- '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',
- function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,
- $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {
-
- var Attributes = function(element, attributesToCopy) {
- if (attributesToCopy) {
- var keys = Object.keys(attributesToCopy);
- var i, l, key;
-
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- this[key] = attributesToCopy[key];
- }
- } else {
- this.$attr = {};
- }
-
- this.$$element = element;
- };
-
- Attributes.prototype = {
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$normalize
- * @kind function
- *
- * @description
- * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or
- * `data-`) to its normalized, camelCase form.
- *
- * Also there is special case for Moz prefix starting with upper case letter.
- *
- * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}
- *
- * @param {string} name Name to normalize
- */
- $normalize: directiveNormalize,
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$addClass
- * @kind function
- *
- * @description
- * Adds the CSS class value specified by the classVal parameter to the element. If animations
- * are enabled then an animation will be triggered for the class addition.
- *
- * @param {string} classVal The className value that will be added to the element
- */
- $addClass: function(classVal) {
- if (classVal && classVal.length > 0) {
- $animate.addClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$removeClass
- * @kind function
- *
- * @description
- * Removes the CSS class value specified by the classVal parameter from the element. If
- * animations are enabled then an animation will be triggered for the class removal.
- *
- * @param {string} classVal The className value that will be removed from the element
- */
- $removeClass: function(classVal) {
- if (classVal && classVal.length > 0) {
- $animate.removeClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$updateClass
- * @kind function
- *
- * @description
- * Adds and removes the appropriate CSS class values to the element based on the difference
- * between the new and old CSS class values (specified as newClasses and oldClasses).
- *
- * @param {string} newClasses The current CSS className value
- * @param {string} oldClasses The former CSS className value
- */
- $updateClass: function(newClasses, oldClasses) {
- var toAdd = tokenDifference(newClasses, oldClasses);
- if (toAdd && toAdd.length) {
- $animate.addClass(this.$$element, toAdd);
- }
-
- var toRemove = tokenDifference(oldClasses, newClasses);
- if (toRemove && toRemove.length) {
- $animate.removeClass(this.$$element, toRemove);
- }
- },
-
- /**
- * Set a normalized attribute on the element in a way such that all directives
- * can share the attribute. This function properly handles boolean attributes.
- * @param {string} key Normalized key. (ie ngAttribute)
- * @param {string|boolean} value The value to set. If `null` attribute will be deleted.
- * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.
- * Defaults to true.
- * @param {string=} attrName Optional none normalized name. Defaults to key.
- */
- $set: function(key, value, writeAttr, attrName) {
- // TODO: decide whether or not to throw an error if "class"
- //is set through this function since it may cause $updateClass to
- //become unstable.
-
- var node = this.$$element[0],
- booleanKey = getBooleanAttrName(node, key),
- aliasedKey = getAliasedAttrName(key),
- observer = key,
- nodeName;
-
- if (booleanKey) {
- this.$$element.prop(key, value);
- attrName = booleanKey;
- } else if (aliasedKey) {
- this[aliasedKey] = value;
- observer = aliasedKey;
- }
-
- this[key] = value;
-
- // translate normalized key to actual key
- if (attrName) {
- this.$attr[key] = attrName;
- } else {
- attrName = this.$attr[key];
- if (!attrName) {
- this.$attr[key] = attrName = snake_case(key, '-');
- }
- }
-
- nodeName = nodeName_(this.$$element);
-
- if ((nodeName === 'a' && key === 'href') ||
- (nodeName === 'img' && key === 'src')) {
- // sanitize a[href] and img[src] values
- this[key] = value = $$sanitizeUri(value, key === 'src');
- } else if (nodeName === 'img' && key === 'srcset') {
- // sanitize img[srcset] values
- var result = "";
-
- // first check if there are spaces because it's not the same pattern
- var trimmedSrcset = trim(value);
- // ( 999x ,| 999w ,| ,|, )
- var srcPattern = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/;
- var pattern = /\s/.test(trimmedSrcset) ? srcPattern : /(,)/;
-
- // split srcset into tuple of uri and descriptor except for the last item
- var rawUris = trimmedSrcset.split(pattern);
-
- // for each tuples
- var nbrUrisWith2parts = Math.floor(rawUris.length / 2);
- for (var i = 0; i < nbrUrisWith2parts; i++) {
- var innerIdx = i * 2;
- // sanitize the uri
- result += $$sanitizeUri(trim(rawUris[innerIdx]), true);
- // add the descriptor
- result += (" " + trim(rawUris[innerIdx + 1]));
- }
-
- // split the last item into uri and descriptor
- var lastTuple = trim(rawUris[i * 2]).split(/\s/);
-
- // sanitize the last uri
- result += $$sanitizeUri(trim(lastTuple[0]), true);
-
- // and add the last descriptor if any
- if (lastTuple.length === 2) {
- result += (" " + trim(lastTuple[1]));
- }
- this[key] = value = result;
- }
-
- if (writeAttr !== false) {
- if (value === null || isUndefined(value)) {
- this.$$element.removeAttr(attrName);
- } else {
- this.$$element.attr(attrName, value);
- }
- }
-
- // fire observers
- var $$observers = this.$$observers;
- $$observers && forEach($$observers[observer], function(fn) {
- try {
- fn(value);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$observe
- * @kind function
- *
- * @description
- * Observes an interpolated attribute.
- *
- * The observer function will be invoked once during the next `$digest` following
- * compilation. The observer is then invoked whenever the interpolated value
- * changes.
- *
- * @param {string} key Normalized key. (ie ngAttribute) .
- * @param {function(interpolatedValue)} fn Function that will be called whenever
- the interpolated value of the attribute changes.
- * See the {@link guide/directive#text-and-attribute-bindings Directives} guide for more info.
- * @returns {function()} Returns a deregistration function for this observer.
- */
- $observe: function(key, fn) {
- var attrs = this,
- $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),
- listeners = ($$observers[key] || ($$observers[key] = []));
-
- listeners.push(fn);
- $rootScope.$evalAsync(function() {
- if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {
- // no one registered attribute interpolation function, so lets call it manually
- fn(attrs[key]);
- }
- });
-
- return function() {
- arrayRemove(listeners, fn);
- };
- }
- };
-
-
- function safeAddClass($element, className) {
- try {
- $element.addClass(className);
- } catch (e) {
- // ignore, since it means that we are trying to set class on
- // SVG element, where class name is read-only.
- }
- }
-
-
- var startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')
- ? identity
- : function denormalizeTemplate(template) {
- return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
- },
- NG_ATTR_BINDING = /^ngAttr[A-Z]/;
- var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;
-
- compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {
- var bindings = $element.data('$binding') || [];
-
- if (isArray(binding)) {
- bindings = bindings.concat(binding);
- } else {
- bindings.push(binding);
- }
-
- $element.data('$binding', bindings);
- } : noop;
-
- compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {
- safeAddClass($element, 'ng-binding');
- } : noop;
-
- compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {
- var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';
- $element.data(dataName, scope);
- } : noop;
-
- compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {
- safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');
- } : noop;
-
- return compile;
-
- //================================
-
- function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,
- previousCompileContext) {
- if (!($compileNodes instanceof jqLite)) {
- // jquery always rewraps, whereas we need to preserve the original selector so that we can
- // modify it.
- $compileNodes = jqLite($compileNodes);
- }
- // We can not compile top level text elements since text nodes can be merged and we will
- // not be able to attach scope data to them, so we will wrap them in <span>
- forEach($compileNodes, function(node, index) {
- if (node.nodeType == NODE_TYPE_TEXT && node.nodeValue.match(/\S+/) /* non-empty */ ) {
- $compileNodes[index] = jqLite(node).wrap('<span></span>').parent()[0];
- }
- });
- var compositeLinkFn =
- compileNodes($compileNodes, transcludeFn, $compileNodes,
- maxPriority, ignoreDirective, previousCompileContext);
- compile.$$addScopeClass($compileNodes);
- var namespace = null;
- return function publicLinkFn(scope, cloneConnectFn, options) {
- assertArg(scope, 'scope');
-
- if (previousCompileContext && previousCompileContext.needsNewScope) {
- // A parent directive did a replace and a directive on this element asked
- // for transclusion, which caused us to lose a layer of element on which
- // we could hold the new transclusion scope, so we will create it manually
- // here.
- scope = scope.$parent.$new();
- }
-
- options = options || {};
- var parentBoundTranscludeFn = options.parentBoundTranscludeFn,
- transcludeControllers = options.transcludeControllers,
- futureParentElement = options.futureParentElement;
-
- // When `parentBoundTranscludeFn` is passed, it is a
- // `controllersBoundTransclude` function (it was previously passed
- // as `transclude` to directive.link) so we must unwrap it to get
- // its `boundTranscludeFn`
- if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {
- parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;
- }
-
- if (!namespace) {
- namespace = detectNamespaceForChildElements(futureParentElement);
- }
- var $linkNode;
- if (namespace !== 'html') {
- // When using a directive with replace:true and templateUrl the $compileNodes
- // (or a child element inside of them)
- // might change, so we need to recreate the namespace adapted compileNodes
- // for call to the link function.
- // Note: This will already clone the nodes...
- $linkNode = jqLite(
- wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())
- );
- } else if (cloneConnectFn) {
- // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
- // and sometimes changes the structure of the DOM.
- $linkNode = JQLitePrototype.clone.call($compileNodes);
- } else {
- $linkNode = $compileNodes;
- }
-
- if (transcludeControllers) {
- for (var controllerName in transcludeControllers) {
- $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);
- }
- }
-
- compile.$$addScopeInfo($linkNode, scope);
-
- if (cloneConnectFn) cloneConnectFn($linkNode, scope);
- if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);
- return $linkNode;
- };
- }
-
- function detectNamespaceForChildElements(parentElement) {
- // TODO: Make this detect MathML as well...
- var node = parentElement && parentElement[0];
- if (!node) {
- return 'html';
- } else {
- return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg' : 'html';
- }
- }
-
- /**
- * Compile function matches each node in nodeList against the directives. Once all directives
- * for a particular node are collected their compile functions are executed. The compile
- * functions return values - the linking functions - are combined into a composite linking
- * function, which is the a linking function for the node.
- *
- * @param {NodeList} nodeList an array of nodes or NodeList to compile
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new child of the transcluded parent scope.
- * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
- * the rootElement must be set the jqLite collection of the compile root. This is
- * needed so that the jqLite collection items can be replaced with widgets.
- * @param {number=} maxPriority Max directive priority.
- * @returns {Function} A composite linking function of all of the matched directives or null.
- */
- function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
- previousCompileContext) {
- var linkFns = [],
- attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;
-
- for (var i = 0; i < nodeList.length; i++) {
- attrs = new Attributes();
-
- // we must always refer to nodeList[i] since the nodes can be replaced underneath us.
- directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,
- ignoreDirective);
-
- nodeLinkFn = (directives.length)
- ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,
- null, [], [], previousCompileContext)
- : null;
-
- if (nodeLinkFn && nodeLinkFn.scope) {
- compile.$$addScopeClass(attrs.$$element);
- }
-
- childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||
- !(childNodes = nodeList[i].childNodes) ||
- !childNodes.length)
- ? null
- : compileNodes(childNodes,
- nodeLinkFn ? (
- (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)
- && nodeLinkFn.transclude) : transcludeFn);
-
- if (nodeLinkFn || childLinkFn) {
- linkFns.push(i, nodeLinkFn, childLinkFn);
- linkFnFound = true;
- nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;
- }
-
- //use the previous context only for the first element in the virtual group
- previousCompileContext = null;
- }
-
- // return a linking function if we have found anything, null otherwise
- return linkFnFound ? compositeLinkFn : null;
-
- function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
- var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;
- var stableNodeList;
-
-
- if (nodeLinkFnFound) {
- // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our
- // offsets don't get screwed up
- var nodeListLength = nodeList.length;
- stableNodeList = new Array(nodeListLength);
-
- // create a sparse array by only copying the elements which have a linkFn
- for (i = 0; i < linkFns.length; i+=3) {
- idx = linkFns[i];
- stableNodeList[idx] = nodeList[idx];
- }
- } else {
- stableNodeList = nodeList;
- }
-
- for (i = 0, ii = linkFns.length; i < ii;) {
- node = stableNodeList[linkFns[i++]];
- nodeLinkFn = linkFns[i++];
- childLinkFn = linkFns[i++];
-
- if (nodeLinkFn) {
- if (nodeLinkFn.scope) {
- childScope = scope.$new();
- compile.$$addScopeInfo(jqLite(node), childScope);
- } else {
- childScope = scope;
- }
-
- if (nodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(
- scope, nodeLinkFn.transclude, parentBoundTranscludeFn);
-
- } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {
- childBoundTranscludeFn = parentBoundTranscludeFn;
-
- } else if (!parentBoundTranscludeFn && transcludeFn) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);
-
- } else {
- childBoundTranscludeFn = null;
- }
-
- nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);
-
- } else if (childLinkFn) {
- childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
- }
- }
- }
- }
-
- function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
-
- var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
-
- if (!transcludedScope) {
- transcludedScope = scope.$new(false, containingScope);
- transcludedScope.$$transcluded = true;
- }
-
- return transcludeFn(transcludedScope, cloneFn, {
- parentBoundTranscludeFn: previousBoundTranscludeFn,
- transcludeControllers: controllers,
- futureParentElement: futureParentElement
- });
- };
-
- return boundTranscludeFn;
- }
-
- /**
- * Looks for directives on the given node and adds them to the directive collection which is
- * sorted.
- *
- * @param node Node to search.
- * @param directives An array to which the directives are added to. This array is sorted before
- * the function returns.
- * @param attrs The shared attrs object which is used to populate the normalized attributes.
- * @param {number=} maxPriority Max directive priority.
- */
- function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- var nodeType = node.nodeType,
- attrsMap = attrs.$attr,
- match,
- className;
-
- switch (nodeType) {
- case NODE_TYPE_ELEMENT: /* Element */
- // use the node name: <directive>
- addDirective(directives,
- directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);
-
- // iterate over the attributes
- for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
- j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {
- var attrStartName = false;
- var attrEndName = false;
-
- attr = nAttrs[j];
- name = attr.name;
- value = trim(attr.value);
-
- // support ngAttr attribute binding
- ngAttrName = directiveNormalize(name);
- if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
- name = name.replace(PREFIX_REGEXP, '')
- .substr(8).replace(/_(.)/g, function(match, letter) {
- return letter.toUpperCase();
- });
- }
-
- var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);
- if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {
- attrStartName = name;
- attrEndName = name.substr(0, name.length - 5) + 'end';
- name = name.substr(0, name.length - 6);
- }
-
- nName = directiveNormalize(name.toLowerCase());
- attrsMap[nName] = name;
- if (isNgAttr || !attrs.hasOwnProperty(nName)) {
- attrs[nName] = value;
- if (getBooleanAttrName(node, nName)) {
- attrs[nName] = true; // presence means true
- }
- }
- addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);
- addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
- attrEndName);
- }
-
- // use class as directive
- className = node.className;
- if (isObject(className)) {
- // Maybe SVGAnimatedString
- className = className.animVal;
- }
- if (isString(className) && className !== '') {
- while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
- nName = directiveNormalize(match[2]);
- if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[3]);
- }
- className = className.substr(match.index + match[0].length);
- }
- }
- break;
- case NODE_TYPE_TEXT: /* Text Node */
- if (msie === 11) {
- // Workaround for #11781
- while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) {
- node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;
- node.parentNode.removeChild(node.nextSibling);
- }
- }
- addTextInterpolateDirective(directives, node.nodeValue);
- break;
- case NODE_TYPE_COMMENT: /* Comment */
- try {
- match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- break;
- }
-
- directives.sort(byPriority);
- return directives;
- }
-
- /**
- * Given a node with an directive-start it collects all of the siblings until it finds
- * directive-end.
- * @param node
- * @param attrStart
- * @param attrEnd
- * @returns {*}
- */
- function groupScan(node, attrStart, attrEnd) {
- var nodes = [];
- var depth = 0;
- if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
- do {
- if (!node) {
- throw $compileMinErr('uterdir',
- "Unterminated attribute, found '{0}' but no matching '{1}' found.",
- attrStart, attrEnd);
- }
- if (node.nodeType == NODE_TYPE_ELEMENT) {
- if (node.hasAttribute(attrStart)) depth++;
- if (node.hasAttribute(attrEnd)) depth--;
- }
- nodes.push(node);
- node = node.nextSibling;
- } while (depth > 0);
- } else {
- nodes.push(node);
- }
-
- return jqLite(nodes);
- }
-
- /**
- * Wrapper for linking function which converts normal linking function into a grouped
- * linking function.
- * @param linkFn
- * @param attrStart
- * @param attrEnd
- * @returns {Function}
- */
- function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {
- return function(scope, element, attrs, controllers, transcludeFn) {
- element = groupScan(element[0], attrStart, attrEnd);
- return linkFn(scope, element, attrs, controllers, transcludeFn);
- };
- }
-
- /**
- * Once the directives have been collected, their compile functions are executed. This method
- * is responsible for inlining directive templates as well as terminating the application
- * of the directives if the terminal directive has been reached.
- *
- * @param {Array} directives Array of collected directives to execute their compile function.
- * this needs to be pre-sorted by priority order.
- * @param {Node} compileNode The raw DOM node to apply the compile functions to
- * @param {Object} templateAttrs The shared attribute function
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new
- * child of the transcluded parent scope.
- * @param {JQLite} jqCollection If we are working on the root of the compile tree then this
- * argument has the root jqLite array so that we can replace nodes
- * on it.
- * @param {Object=} originalReplaceDirective An optional directive that will be ignored when
- * compiling the transclusion.
- * @param {Array.<Function>} preLinkFns
- * @param {Array.<Function>} postLinkFns
- * @param {Object} previousCompileContext Context used for previous compilation of the current
- * node
- * @returns {Function} linkFn
- */
- function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,
- jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,
- previousCompileContext) {
- previousCompileContext = previousCompileContext || {};
-
- var terminalPriority = -Number.MAX_VALUE,
- newScopeDirective = previousCompileContext.newScopeDirective,
- controllerDirectives = previousCompileContext.controllerDirectives,
- newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,
- templateDirective = previousCompileContext.templateDirective,
- nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,
- hasTranscludeDirective = false,
- hasTemplate = false,
- hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,
- $compileNode = templateAttrs.$$element = jqLite(compileNode),
- directive,
- directiveName,
- $template,
- replaceDirective = originalReplaceDirective,
- childTranscludeFn = transcludeFn,
- linkFn,
- directiveValue;
-
- // executes all directives on the current element
- for (var i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- var attrStart = directive.$$start;
- var attrEnd = directive.$$end;
-
- // collect multiblock sections
- if (attrStart) {
- $compileNode = groupScan(compileNode, attrStart, attrEnd);
- }
- $template = undefined;
-
- if (terminalPriority > directive.priority) {
- break; // prevent further processing of directives
- }
-
- if (directiveValue = directive.scope) {
-
- // skip the check for directives with async templates, we'll check the derived sync
- // directive when the template arrives
- if (!directive.templateUrl) {
- if (isObject(directiveValue)) {
- // This directive is trying to add an isolated scope.
- // Check that there is no scope of any kind already
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,
- directive, $compileNode);
- newIsolateScopeDirective = directive;
- } else {
- // This directive is trying to add a child scope.
- // Check that there is no isolated scope already
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,
- $compileNode);
- }
- }
-
- newScopeDirective = newScopeDirective || directive;
- }
-
- directiveName = directive.name;
-
- if (!directive.templateUrl && directive.controller) {
- directiveValue = directive.controller;
- controllerDirectives = controllerDirectives || createMap();
- assertNoDuplicate("'" + directiveName + "' controller",
- controllerDirectives[directiveName], directive, $compileNode);
- controllerDirectives[directiveName] = directive;
- }
-
- if (directiveValue = directive.transclude) {
- hasTranscludeDirective = true;
-
- // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.
- // This option should only be used by directives that know how to safely handle element transclusion,
- // where the transcluded nodes are added or replaced after linking.
- if (!directive.$$tlb) {
- assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);
- nonTlbTranscludeDirective = directive;
- }
-
- if (directiveValue == 'element') {
- hasElementTranscludeDirective = true;
- terminalPriority = directive.priority;
- $template = $compileNode;
- $compileNode = templateAttrs.$$element =
- jqLite(document.createComment(' ' + directiveName + ': ' +
- templateAttrs[directiveName] + ' '));
- compileNode = $compileNode[0];
- replaceWith(jqCollection, sliceArgs($template), compileNode);
-
- childTranscludeFn = compile($template, transcludeFn, terminalPriority,
- replaceDirective && replaceDirective.name, {
- // Don't pass in:
- // - controllerDirectives - otherwise we'll create duplicates controllers
- // - newIsolateScopeDirective or templateDirective - combining templates with
- // element transclusion doesn't make sense.
- //
- // We need only nonTlbTranscludeDirective so that we prevent putting transclusion
- // on the same element more than once.
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- } else {
- $template = jqLite(jqLiteClone(compileNode)).contents();
- $compileNode.empty(); // clear contents
- childTranscludeFn = compile($template, transcludeFn, undefined,
- undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});
- }
- }
-
- if (directive.template) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- directiveValue = (isFunction(directive.template))
- ? directive.template($compileNode, templateAttrs)
- : directive.template;
-
- directiveValue = denormalizeTemplate(directiveValue);
-
- if (directive.replace) {
- replaceDirective = directive;
- if (jqLiteIsTextNode(directiveValue)) {
- $template = [];
- } else {
- $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- directiveName, '');
- }
-
- replaceWith(jqCollection, $compileNode, compileNode);
-
- var newTemplateAttrs = {$attr: {}};
-
- // combine directives from the original node and from the template:
- // - take the array of directives for this element
- // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)
- // - collect directives from the template and sort them by priority
- // - combine directives as: processed + template + unprocessed
- var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);
- var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));
-
- if (newIsolateScopeDirective || newScopeDirective) {
- // The original directive caused the current element to be replaced but this element
- // also needs to have a new scope, so we need to tell the template directives
- // that they would need to get their scope from further up, if they require transclusion
- markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);
- }
- directives = directives.concat(templateDirectives).concat(unprocessedDirectives);
- mergeTemplateAttributes(templateAttrs, newTemplateAttrs);
-
- ii = directives.length;
- } else {
- $compileNode.html(directiveValue);
- }
- }
-
- if (directive.templateUrl) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- if (directive.replace) {
- replaceDirective = directive;
- }
-
- nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,
- templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {
- controllerDirectives: controllerDirectives,
- newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,
- newIsolateScopeDirective: newIsolateScopeDirective,
- templateDirective: templateDirective,
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- ii = directives.length;
- } else if (directive.compile) {
- try {
- linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);
- if (isFunction(linkFn)) {
- addLinkFns(null, linkFn, attrStart, attrEnd);
- } else if (linkFn) {
- addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);
- }
- } catch (e) {
- $exceptionHandler(e, startingTag($compileNode));
- }
- }
-
- if (directive.terminal) {
- nodeLinkFn.terminal = true;
- terminalPriority = Math.max(terminalPriority, directive.priority);
- }
-
- }
-
- nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;
- nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;
- nodeLinkFn.templateOnThisElement = hasTemplate;
- nodeLinkFn.transclude = childTranscludeFn;
-
- previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;
-
- // might be normal or delayed nodeLinkFn depending on if templateUrl is present
- return nodeLinkFn;
-
- ////////////////////
-
- function addLinkFns(pre, post, attrStart, attrEnd) {
- if (pre) {
- if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);
- pre.require = directive.require;
- pre.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- pre = cloneAndAnnotateFn(pre, {isolateScope: true});
- }
- preLinkFns.push(pre);
- }
- if (post) {
- if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);
- post.require = directive.require;
- post.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- post = cloneAndAnnotateFn(post, {isolateScope: true});
- }
- postLinkFns.push(post);
- }
- }
-
-
- function getControllers(directiveName, require, $element, elementControllers) {
- var value;
-
- if (isString(require)) {
- var match = require.match(REQUIRE_PREFIX_REGEXP);
- var name = require.substring(match[0].length);
- var inheritType = match[1] || match[3];
- var optional = match[2] === '?';
-
- //If only parents then start at the parent element
- if (inheritType === '^^') {
- $element = $element.parent();
- //Otherwise attempt getting the controller from elementControllers in case
- //the element is transcluded (and has no data) and to avoid .data if possible
- } else {
- value = elementControllers && elementControllers[name];
- value = value && value.instance;
- }
-
- if (!value) {
- var dataName = '$' + name + 'Controller';
- value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);
- }
-
- if (!value && !optional) {
- throw $compileMinErr('ctreq',
- "Controller '{0}', required by directive '{1}', can't be found!",
- name, directiveName);
- }
- } else if (isArray(require)) {
- value = [];
- for (var i = 0, ii = require.length; i < ii; i++) {
- value[i] = getControllers(directiveName, require[i], $element, elementControllers);
- }
- }
-
- return value || null;
- }
-
- function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) {
- var elementControllers = createMap();
- for (var controllerKey in controllerDirectives) {
- var directive = controllerDirectives[controllerKey];
- var locals = {
- $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,
- $element: $element,
- $attrs: attrs,
- $transclude: transcludeFn
- };
-
- var controller = directive.controller;
- if (controller == '@') {
- controller = attrs[directive.name];
- }
-
- var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
-
- // For directives with element transclusion the element is a comment,
- // but jQuery .data doesn't support attaching data to comment nodes as it's hard to
- // clean up (http://bugs.jquery.com/ticket/8335).
- // Instead, we save the controllers for the element in a local hash and attach to .data
- // later, once we have the actual element.
- elementControllers[directive.name] = controllerInstance;
- if (!hasElementTranscludeDirective) {
- $element.data('$' + directive.name + 'Controller', controllerInstance.instance);
- }
- }
- return elementControllers;
- }
-
- function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
- var linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
- attrs, removeScopeBindingWatches, removeControllerBindingWatches;
-
- if (compileNode === linkNode) {
- attrs = templateAttrs;
- $element = templateAttrs.$$element;
- } else {
- $element = jqLite(linkNode);
- attrs = new Attributes($element, templateAttrs);
- }
-
- controllerScope = scope;
- if (newIsolateScopeDirective) {
- isolateScope = scope.$new(true);
- } else if (newScopeDirective) {
- controllerScope = scope.$parent;
- }
-
- if (boundTranscludeFn) {
- // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
- // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
- transcludeFn = controllersBoundTransclude;
- transcludeFn.$$boundTransclude = boundTranscludeFn;
- }
-
- if (controllerDirectives) {
- elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope);
- }
-
- if (newIsolateScopeDirective) {
- // Initialize isolate scope bindings for new isolate scope directive.
- compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||
- templateDirective === newIsolateScopeDirective.$$originalDirective)));
- compile.$$addScopeClass($element, true);
- isolateScope.$$isolateBindings =
- newIsolateScopeDirective.$$isolateBindings;
- removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,
- isolateScope.$$isolateBindings,
- newIsolateScopeDirective);
- if (removeScopeBindingWatches) {
- isolateScope.$on('$destroy', removeScopeBindingWatches);
- }
- }
-
- // Initialize bindToController bindings
- for (var name in elementControllers) {
- var controllerDirective = controllerDirectives[name];
- var controller = elementControllers[name];
- var bindings = controllerDirective.$$bindings.bindToController;
-
- if (controller.identifier && bindings) {
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
- }
-
- var controllerResult = controller();
- if (controllerResult !== controller.instance) {
- // If the controller constructor has a return value, overwrite the instance
- // from setupControllers
- controller.instance = controllerResult;
- $element.data('$' + controllerDirective.name + 'Controller', controllerResult);
- removeControllerBindingWatches && removeControllerBindingWatches();
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
- }
- }
-
- // PRELINKING
- for (i = 0, ii = preLinkFns.length; i < ii; i++) {
- linkFn = preLinkFns[i];
- invokeLinkFn(linkFn,
- linkFn.isolateScope ? isolateScope : scope,
- $element,
- attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),
- transcludeFn
- );
- }
-
- // RECURSION
- // We only pass the isolate scope, if the isolate directive has a template,
- // otherwise the child elements do not belong to the isolate directive.
- var scopeToChild = scope;
- if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {
- scopeToChild = isolateScope;
- }
- childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);
-
- // POSTLINKING
- for (i = postLinkFns.length - 1; i >= 0; i--) {
- linkFn = postLinkFns[i];
- invokeLinkFn(linkFn,
- linkFn.isolateScope ? isolateScope : scope,
- $element,
- attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),
- transcludeFn
- );
- }
-
- // This is the function that is injected as `$transclude`.
- // Note: all arguments are optional!
- function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {
- var transcludeControllers;
-
- // No scope passed in:
- if (!isScope(scope)) {
- futureParentElement = cloneAttachFn;
- cloneAttachFn = scope;
- scope = undefined;
- }
-
- if (hasElementTranscludeDirective) {
- transcludeControllers = elementControllers;
- }
- if (!futureParentElement) {
- futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;
- }
- return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
- }
- }
- }
-
- // Depending upon the context in which a directive finds itself it might need to have a new isolated
- // or child scope created. For instance:
- // * if the directive has been pulled into a template because another directive with a higher priority
- // asked for element transclusion
- // * if the directive itself asks for transclusion but it is at the root of a template and the original
- // element was replaced. See https://github.com/angular/angular.js/issues/12936
- function markDirectiveScope(directives, isolateScope, newScope) {
- for (var j = 0, jj = directives.length; j < jj; j++) {
- directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});
- }
- }
-
- /**
- * looks up the directive and decorates it with exception handling and proper parameters. We
- * call this the boundDirective.
- *
- * @param {string} name name of the directive to look up.
- * @param {string} location The directive must be found in specific format.
- * String containing any of theses characters:
- *
- * * `E`: element name
- * * `A': attribute
- * * `C`: class
- * * `M`: comment
- * @returns {boolean} true if directive was added.
- */
- function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
- endAttrName) {
- if (name === ignoreDirective) return null;
- var match = null;
- if (hasDirectives.hasOwnProperty(name)) {
- for (var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i < ii; i++) {
- try {
- directive = directives[i];
- if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
- directive.restrict.indexOf(location) != -1) {
- if (startAttrName) {
- directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
- }
- tDirectives.push(directive);
- match = directive;
- }
- } catch (e) { $exceptionHandler(e); }
- }
- }
- return match;
- }
-
-
- /**
- * looks up the directive and returns true if it is a multi-element directive,
- * and therefore requires DOM nodes between -start and -end markers to be grouped
- * together.
- *
- * @param {string} name name of the directive to look up.
- * @returns true if directive was registered as multi-element.
- */
- function directiveIsMultiElement(name) {
- if (hasDirectives.hasOwnProperty(name)) {
- for (var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- if (directive.multiElement) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * When the element is replaced with HTML template then the new attributes
- * on the template need to be merged with the existing attributes in the DOM.
- * The desired effect is to have both of the attributes present.
- *
- * @param {object} dst destination attributes (original DOM)
- * @param {object} src source attributes (from the directive template)
- */
- function mergeTemplateAttributes(dst, src) {
- var srcAttr = src.$attr,
- dstAttr = dst.$attr,
- $element = dst.$$element;
-
- // reapply the old attributes to the new element
- forEach(dst, function(value, key) {
- if (key.charAt(0) != '$') {
- if (src[key] && src[key] !== value) {
- value += (key === 'style' ? ';' : ' ') + src[key];
- }
- dst.$set(key, value, true, srcAttr[key]);
- }
- });
-
- // copy the new attributes on the old attrs object
- forEach(src, function(value, key) {
- if (key == 'class') {
- safeAddClass($element, value);
- dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
- } else if (key == 'style') {
- $element.attr('style', $element.attr('style') + ';' + value);
- dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
- dst[key] = value;
- dstAttr[key] = srcAttr[key];
- }
- });
- }
-
-
- function compileTemplateUrl(directives, $compileNode, tAttrs,
- $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
- var linkQueue = [],
- afterTemplateNodeLinkFn,
- afterTemplateChildLinkFn,
- beforeTemplateCompileNode = $compileNode[0],
- origAsyncDirective = directives.shift(),
- derivedSyncDirective = inherit(origAsyncDirective, {
- templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
- }),
- templateUrl = (isFunction(origAsyncDirective.templateUrl))
- ? origAsyncDirective.templateUrl($compileNode, tAttrs)
- : origAsyncDirective.templateUrl,
- templateNamespace = origAsyncDirective.templateNamespace;
-
- $compileNode.empty();
-
- $templateRequest(templateUrl)
- .then(function(content) {
- var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;
-
- content = denormalizeTemplate(content);
-
- if (origAsyncDirective.replace) {
- if (jqLiteIsTextNode(content)) {
- $template = [];
- } else {
- $template = removeComments(wrapTemplate(templateNamespace, trim(content)));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- origAsyncDirective.name, templateUrl);
- }
-
- tempTemplateAttrs = {$attr: {}};
- replaceWith($rootElement, $compileNode, compileNode);
- var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);
-
- if (isObject(origAsyncDirective.scope)) {
- // the original directive that caused the template to be loaded async required
- // an isolate scope
- markDirectiveScope(templateDirectives, true);
- }
- directives = templateDirectives.concat(directives);
- mergeTemplateAttributes(tAttrs, tempTemplateAttrs);
- } else {
- compileNode = beforeTemplateCompileNode;
- $compileNode.html(content);
- }
-
- directives.unshift(derivedSyncDirective);
-
- afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,
- childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,
- previousCompileContext);
- forEach($rootElement, function(node, i) {
- if (node == compileNode) {
- $rootElement[i] = $compileNode[0];
- }
- });
- afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);
-
- while (linkQueue.length) {
- var scope = linkQueue.shift(),
- beforeTemplateLinkNode = linkQueue.shift(),
- linkRootElement = linkQueue.shift(),
- boundTranscludeFn = linkQueue.shift(),
- linkNode = $compileNode[0];
-
- if (scope.$$destroyed) continue;
-
- if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {
- var oldClasses = beforeTemplateLinkNode.className;
-
- if (!(previousCompileContext.hasElementTranscludeDirective &&
- origAsyncDirective.replace)) {
- // it was cloned therefore we have to clone as well.
- linkNode = jqLiteClone(compileNode);
- }
- replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);
-
- // Copy in CSS classes from original node
- safeAddClass(jqLite(linkNode), oldClasses);
- }
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- } else {
- childBoundTranscludeFn = boundTranscludeFn;
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,
- childBoundTranscludeFn);
- }
- linkQueue = null;
- });
-
- return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {
- var childBoundTranscludeFn = boundTranscludeFn;
- if (scope.$$destroyed) return;
- if (linkQueue) {
- linkQueue.push(scope,
- node,
- rootElement,
- childBoundTranscludeFn);
- } else {
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);
- }
- };
- }
-
-
- /**
- * Sorting function for bound directives.
- */
- function byPriority(a, b) {
- var diff = b.priority - a.priority;
- if (diff !== 0) return diff;
- if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;
- return a.index - b.index;
- }
-
- function assertNoDuplicate(what, previousDirective, directive, element) {
-
- function wrapModuleNameIfDefined(moduleName) {
- return moduleName ?
- (' (module: ' + moduleName + ')') :
- '';
- }
-
- if (previousDirective) {
- throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',
- previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),
- directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));
- }
- }
-
-
- function addTextInterpolateDirective(directives, text) {
- var interpolateFn = $interpolate(text, true);
- if (interpolateFn) {
- directives.push({
- priority: 0,
- compile: function textInterpolateCompileFn(templateNode) {
- var templateNodeParent = templateNode.parent(),
- hasCompileParent = !!templateNodeParent.length;
-
- // When transcluding a template that has bindings in the root
- // we don't have a parent and thus need to add the class during linking fn.
- if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
-
- return function textInterpolateLinkFn(scope, node) {
- var parent = node.parent();
- if (!hasCompileParent) compile.$$addBindingClass(parent);
- compile.$$addBindingInfo(parent, interpolateFn.expressions);
- scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
- node[0].nodeValue = value;
- });
- };
- }
- });
- }
- }
-
-
- function wrapTemplate(type, template) {
- type = lowercase(type || 'html');
- switch (type) {
- case 'svg':
- case 'math':
- var wrapper = document.createElement('div');
- wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';
- return wrapper.childNodes[0].childNodes;
- default:
- return template;
- }
- }
-
-
- function getTrustedContext(node, attrNormalizedName) {
- if (attrNormalizedName == "srcdoc") {
- return $sce.HTML;
- }
- var tag = nodeName_(node);
- // maction[xlink:href] can source SVG. It's not limited to <maction>.
- if (attrNormalizedName == "xlinkHref" ||
- (tag == "form" && attrNormalizedName == "action") ||
- (tag != "img" && (attrNormalizedName == "src" ||
- attrNormalizedName == "ngSrc"))) {
- return $sce.RESOURCE_URL;
- }
- }
-
-
- function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {
- var trustedContext = getTrustedContext(node, name);
- allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;
-
- var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);
-
- // no interpolation found -> ignore
- if (!interpolateFn) return;
-
-
- if (name === "multiple" && nodeName_(node) === "select") {
- throw $compileMinErr("selmulti",
- "Binding to the 'multiple' attribute is not supported. Element: {0}",
- startingTag(node));
- }
-
- directives.push({
- priority: 100,
- compile: function() {
- return {
- pre: function attrInterpolatePreLinkFn(scope, element, attr) {
- var $$observers = (attr.$$observers || (attr.$$observers = createMap()));
-
- if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {
- throw $compileMinErr('nodomevents',
- "Interpolations for HTML DOM event attributes are disallowed. Please use the " +
- "ng- versions (such as ng-click instead of onclick) instead.");
- }
-
- // If the attribute has changed since last $interpolate()ed
- var newValue = attr[name];
- if (newValue !== value) {
- // we need to interpolate again since the attribute value has been updated
- // (e.g. by another directive's compile function)
- // ensure unset/empty values make interpolateFn falsy
- interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);
- value = newValue;
- }
-
- // if attribute was updated so that there is no interpolation going on we don't want to
- // register any observers
- if (!interpolateFn) return;
-
- // initialize attr object so that it's ready in case we need the value for isolate
- // scope initialization, otherwise the value would not be available from isolate
- // directive's linking fn during linking phase
- attr[name] = interpolateFn(scope);
-
- ($$observers[name] || ($$observers[name] = [])).$$inter = true;
- (attr.$$observers && attr.$$observers[name].$$scope || scope).
- $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {
- //special case for class attribute addition + removal
- //so that class changes can tap into the animation
- //hooks provided by the $animate service. Be sure to
- //skip animations when the first digest occurs (when
- //both the new and the old values are the same) since
- //the CSS classes are the non-interpolated values
- if (name === 'class' && newValue != oldValue) {
- attr.$updateClass(newValue, oldValue);
- } else {
- attr.$set(name, newValue);
- }
- });
- }
- };
- }
- });
- }
-
-
- /**
- * This is a special jqLite.replaceWith, which can replace items which
- * have no parents, provided that the containing jqLite collection is provided.
- *
- * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes
- * in the root of the tree.
- * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep
- * the shell, but replace its DOM node reference.
- * @param {Node} newNode The new DOM node.
- */
- function replaceWith($rootElement, elementsToRemove, newNode) {
- var firstElementToRemove = elementsToRemove[0],
- removeCount = elementsToRemove.length,
- parent = firstElementToRemove.parentNode,
- i, ii;
-
- if ($rootElement) {
- for (i = 0, ii = $rootElement.length; i < ii; i++) {
- if ($rootElement[i] == firstElementToRemove) {
- $rootElement[i++] = newNode;
- for (var j = i, j2 = j + removeCount - 1,
- jj = $rootElement.length;
- j < jj; j++, j2++) {
- if (j2 < jj) {
- $rootElement[j] = $rootElement[j2];
- } else {
- delete $rootElement[j];
- }
- }
- $rootElement.length -= removeCount - 1;
-
- // If the replaced element is also the jQuery .context then replace it
- // .context is a deprecated jQuery api, so we should set it only when jQuery set it
- // http://api.jquery.com/context/
- if ($rootElement.context === firstElementToRemove) {
- $rootElement.context = newNode;
- }
- break;
- }
- }
- }
-
- if (parent) {
- parent.replaceChild(newNode, firstElementToRemove);
- }
-
- // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?
- var fragment = document.createDocumentFragment();
- fragment.appendChild(firstElementToRemove);
-
- if (jqLite.hasData(firstElementToRemove)) {
- // Copy over user data (that includes Angular's $scope etc.). Don't copy private
- // data here because there's no public interface in jQuery to do that and copying over
- // event listeners (which is the main use of private data) wouldn't work anyway.
- jqLite.data(newNode, jqLite.data(firstElementToRemove));
-
- // Remove data of the replaced element. We cannot just call .remove()
- // on the element it since that would deallocate scope that is needed
- // for the new node. Instead, remove the data "manually".
- if (!jQuery) {
- delete jqLite.cache[firstElementToRemove[jqLite.expando]];
- } else {
- // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after
- // the replaced element. The cleanData version monkey-patched by Angular would cause
- // the scope to be trashed and we do need the very same scope to work with the new
- // element. However, we cannot just cache the non-patched version and use it here as
- // that would break if another library patches the method after Angular does (one
- // example is jQuery UI). Instead, set a flag indicating scope destroying should be
- // skipped this one time.
- skipDestroyOnNextJQueryCleanData = true;
- jQuery.cleanData([firstElementToRemove]);
- }
- }
-
- for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {
- var element = elementsToRemove[k];
- jqLite(element).remove(); // must do this way to clean up expando
- fragment.appendChild(element);
- delete elementsToRemove[k];
- }
-
- elementsToRemove[0] = newNode;
- elementsToRemove.length = 1;
- }
-
-
- function cloneAndAnnotateFn(fn, annotation) {
- return extend(function() { return fn.apply(null, arguments); }, fn, annotation);
- }
-
-
- function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {
- try {
- linkFn(scope, $element, attrs, controllers, transcludeFn);
- } catch (e) {
- $exceptionHandler(e, startingTag($element));
- }
- }
-
-
- // Set up $watches for isolate scope and controller bindings. This process
- // only occurs for isolate scopes and new scopes with controllerAs.
- function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {
- var removeWatchCollection = [];
- forEach(bindings, function(definition, scopeName) {
- var attrName = definition.attrName,
- optional = definition.optional,
- mode = definition.mode, // @, =, or &
- lastValue,
- parentGet, parentSet, compare;
-
- switch (mode) {
-
- case '@':
- if (!optional && !hasOwnProperty.call(attrs, attrName)) {
- destination[scopeName] = attrs[attrName] = void 0;
- }
- attrs.$observe(attrName, function(value) {
- if (isString(value)) {
- destination[scopeName] = value;
- }
- });
- attrs.$$observers[attrName].$$scope = scope;
- if (isString(attrs[attrName])) {
- // If the attribute has been provided then we trigger an interpolation to ensure
- // the value is there for use in the link fn
- destination[scopeName] = $interpolate(attrs[attrName])(scope);
- }
- break;
-
- case '=':
- if (!hasOwnProperty.call(attrs, attrName)) {
- if (optional) break;
- attrs[attrName] = void 0;
- }
- if (optional && !attrs[attrName]) break;
-
- parentGet = $parse(attrs[attrName]);
- if (parentGet.literal) {
- compare = equals;
- } else {
- compare = function(a, b) { return a === b || (a !== a && b !== b); };
- }
- parentSet = parentGet.assign || function() {
- // reset the change, or we will throw this exception on every $digest
- lastValue = destination[scopeName] = parentGet(scope);
- throw $compileMinErr('nonassign',
- "Expression '{0}' used with directive '{1}' is non-assignable!",
- attrs[attrName], directive.name);
- };
- lastValue = destination[scopeName] = parentGet(scope);
- var parentValueWatch = function parentValueWatch(parentValue) {
- if (!compare(parentValue, destination[scopeName])) {
- // we are out of sync and need to copy
- if (!compare(parentValue, lastValue)) {
- // parent changed and it has precedence
- destination[scopeName] = parentValue;
- } else {
- // if the parent can be assigned then do so
- parentSet(scope, parentValue = destination[scopeName]);
- }
- }
- return lastValue = parentValue;
- };
- parentValueWatch.$stateful = true;
- var removeWatch;
- if (definition.collection) {
- removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);
- } else {
- removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);
- }
- removeWatchCollection.push(removeWatch);
- break;
-
- case '&':
- // Don't assign Object.prototype method to scope
- parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;
-
- // Don't assign noop to destination if expression is not valid
- if (parentGet === noop && optional) break;
-
- destination[scopeName] = function(locals) {
- return parentGet(scope, locals);
- };
- break;
- }
- });
-
- return removeWatchCollection.length && function removeWatches() {
- for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {
- removeWatchCollection[i]();
- }
- };
- }
- }];
-}
-
-var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i;
-/**
- * Converts all accepted directives format into proper directive name.
- * @param name Name to normalize
- */
-function directiveNormalize(name) {
- return camelCase(name.replace(PREFIX_REGEXP, ''));
-}
-
-/**
- * @ngdoc type
- * @name $compile.directive.Attributes
- *
- * @description
- * A shared object between directive compile / linking functions which contains normalized DOM
- * element attributes. The values reflect current binding state `{{ }}`. The normalization is
- * needed since all of these are treated as equivalent in Angular:
- *
- * ```
- * <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
- * ```
- */
-
-/**
- * @ngdoc property
- * @name $compile.directive.Attributes#$attr
- *
- * @description
- * A map of DOM element attribute names to the normalized name. This is
- * needed to do reverse lookup from normalized name back to actual name.
- */
-
-
-/**
- * @ngdoc method
- * @name $compile.directive.Attributes#$set
- * @kind function
- *
- * @description
- * Set DOM element attribute value.
- *
- *
- * @param {string} name Normalized element attribute name of the property to modify. The name is
- * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
- * property to the original name.
- * @param {string} value Value to set the attribute to. The value can be an interpolated string.
- */
-
-
-
-/**
- * Closure compiler type information
- */
-
-function nodesetLinkingFn(
- /* angular.Scope */ scope,
- /* NodeList */ nodeList,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-) {}
-
-function directiveLinkingFn(
- /* nodesetLinkingFn */ nodesetLinkingFn,
- /* angular.Scope */ scope,
- /* Node */ node,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-) {}
-
-function tokenDifference(str1, str2) {
- var values = '',
- tokens1 = str1.split(/\s+/),
- tokens2 = str2.split(/\s+/);
-
- outer:
- for (var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for (var j = 0; j < tokens2.length; j++) {
- if (token == tokens2[j]) continue outer;
- }
- values += (values.length > 0 ? ' ' : '') + token;
- }
- return values;
-}
-
-function removeComments(jqNodes) {
- jqNodes = jqLite(jqNodes);
- var i = jqNodes.length;
-
- if (i <= 1) {
- return jqNodes;
- }
-
- while (i--) {
- var node = jqNodes[i];
- if (node.nodeType === NODE_TYPE_COMMENT) {
- splice.call(jqNodes, i, 1);
- }
- }
- return jqNodes;
-}
-
-var $controllerMinErr = minErr('$controller');
-
-
-var CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/;
-function identifierForController(controller, ident) {
- if (ident && isString(ident)) return ident;
- if (isString(controller)) {
- var match = CNTRL_REG.exec(controller);
- if (match) return match[3];
- }
-}
-
-
-/**
- * @ngdoc provider
- * @name $controllerProvider
- * @description
- * The {@link ng.$controller $controller service} is used by Angular to create new
- * controllers.
- *
- * This provider allows controller registration via the
- * {@link ng.$controllerProvider#register register} method.
- */
-function $ControllerProvider() {
- var controllers = {},
- globals = false;
-
- /**
- * @ngdoc method
- * @name $controllerProvider#register
- * @param {string|Object} name Controller name, or an object map of controllers where the keys are
- * the names and the values are the constructors.
- * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
- * annotations in the array notation).
- */
- this.register = function(name, constructor) {
- assertNotHasOwnProperty(name, 'controller');
- if (isObject(name)) {
- extend(controllers, name);
- } else {
- controllers[name] = constructor;
- }
- };
-
- /**
- * @ngdoc method
- * @name $controllerProvider#allowGlobals
- * @description If called, allows `$controller` to find controller constructors on `window`
- */
- this.allowGlobals = function() {
- globals = true;
- };
-
-
- this.$get = ['$injector', '$window', function($injector, $window) {
-
- /**
- * @ngdoc service
- * @name $controller
- * @requires $injector
- *
- * @param {Function|string} constructor If called with a function then it's considered to be the
- * controller constructor function. Otherwise it's considered to be a string which is used
- * to retrieve the controller constructor using the following steps:
- *
- * * check if a controller with given name is registered via `$controllerProvider`
- * * check if evaluating the string on the current scope returns a constructor
- * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
- * `window` object (not recommended)
- *
- * The string can use the `controller as property` syntax, where the controller instance is published
- * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
- * to work correctly.
- *
- * @param {Object} locals Injection locals for Controller.
- * @return {Object} Instance of given controller.
- *
- * @description
- * `$controller` service is responsible for instantiating controllers.
- *
- * It's just a simple call to {@link auto.$injector $injector}, but extracted into
- * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).
- */
- return function(expression, locals, later, ident) {
- // PRIVATE API:
- // param `later` --- indicates that the controller's constructor is invoked at a later time.
- // If true, $controller will allocate the object with the correct
- // prototype chain, but will not invoke the controller until a returned
- // callback is invoked.
- // param `ident` --- An optional label which overrides the label parsed from the controller
- // expression, if any.
- var instance, match, constructor, identifier;
- later = later === true;
- if (ident && isString(ident)) {
- identifier = ident;
- }
-
- if (isString(expression)) {
- match = expression.match(CNTRL_REG);
- if (!match) {
- throw $controllerMinErr('ctrlfmt',
- "Badly formed controller string '{0}'. " +
- "Must match `__name__ as __id__` or `__name__`.", expression);
- }
- constructor = match[1],
- identifier = identifier || match[3];
- expression = controllers.hasOwnProperty(constructor)
- ? controllers[constructor]
- : getter(locals.$scope, constructor, true) ||
- (globals ? getter($window, constructor, true) : undefined);
-
- assertArgFn(expression, constructor, true);
- }
-
- if (later) {
- // Instantiate controller later:
- // This machinery is used to create an instance of the object before calling the
- // controller's constructor itself.
- //
- // This allows properties to be added to the controller before the constructor is
- // invoked. Primarily, this is used for isolate scope bindings in $compile.
- //
- // This feature is not intended for use by applications, and is thus not documented
- // publicly.
- // Object creation: http://jsperf.com/create-constructor/2
- var controllerPrototype = (isArray(expression) ?
- expression[expression.length - 1] : expression).prototype;
- instance = Object.create(controllerPrototype || null);
-
- if (identifier) {
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
-
- var instantiate;
- return instantiate = extend(function() {
- var result = $injector.invoke(expression, instance, locals, constructor);
- if (result !== instance && (isObject(result) || isFunction(result))) {
- instance = result;
- if (identifier) {
- // If result changed, re-assign controllerAs value to scope.
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
- }
- return instance;
- }, {
- instance: instance,
- identifier: identifier
- });
- }
-
- instance = $injector.instantiate(expression, locals, constructor);
-
- if (identifier) {
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
-
- return instance;
- };
-
- function addIdentifier(locals, identifier, instance, name) {
- if (!(locals && isObject(locals.$scope))) {
- throw minErr('$controller')('noscp',
- "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",
- name, identifier);
- }
-
- locals.$scope[identifier] = instance;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $document
- * @requires $window
- *
- * @description
- * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.
- *
- * @example
- <example module="documentExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p>$document title: <b ng-bind="title"></b></p>
- <p>window.document title: <b ng-bind="windowTitle"></b></p>
- </div>
- </file>
- <file name="script.js">
- angular.module('documentExample', [])
- .controller('ExampleController', ['$scope', '$document', function($scope, $document) {
- $scope.title = $document[0].title;
- $scope.windowTitle = angular.element(window.document)[0].title;
- }]);
- </file>
- </example>
- */
-function $DocumentProvider() {
- this.$get = ['$window', function(window) {
- return jqLite(window.document);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $exceptionHandler
- * @requires ng.$log
- *
- * @description
- * Any uncaught exception in angular expressions is delegated to this service.
- * The default implementation simply delegates to `$log.error` which logs it into
- * the browser console.
- *
- * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
- * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.
- *
- * ## Example:
- *
- * ```js
- * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
- * return function(exception, cause) {
- * exception.message += ' (caused by "' + cause + '")';
- * throw exception;
- * };
- * });
- * ```
- *
- * This example will override the normal action of `$exceptionHandler`, to make angular
- * exceptions fail hard when they happen, instead of just logging to the console.
- *
- * <hr />
- * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
- * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
- * (unless executed during a digest).
- *
- * If you wish, you can manually delegate exceptions, e.g.
- * `try { ... } catch(e) { $exceptionHandler(e); }`
- *
- * @param {Error} exception Exception associated with the error.
- * @param {string=} cause optional information about the context in which
- * the error was thrown.
- *
- */
-function $ExceptionHandlerProvider() {
- this.$get = ['$log', function($log) {
- return function(exception, cause) {
- $log.error.apply($log, arguments);
- };
- }];
-}
-
-var $$ForceReflowProvider = function() {
- this.$get = ['$document', function($document) {
- return function(domNode) {
- //the line below will force the browser to perform a repaint so
- //that all the animated elements within the animation frame will
- //be properly updated and drawn on screen. This is required to
- //ensure that the preparation animation is properly flushed so that
- //the active state picks up from there. DO NOT REMOVE THIS LINE.
- //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH
- //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND
- //WILL TAKE YEARS AWAY FROM YOUR LIFE.
- if (domNode) {
- if (!domNode.nodeType && domNode instanceof jqLite) {
- domNode = domNode[0];
- }
- } else {
- domNode = $document[0].body;
- }
- return domNode.offsetWidth + 1;
- };
- }];
-};
-
-var APPLICATION_JSON = 'application/json';
-var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
-var JSON_START = /^\[|^\{(?!\{)/;
-var JSON_ENDS = {
- '[': /]$/,
- '{': /}$/
-};
-var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/;
-var $httpMinErr = minErr('$http');
-var $httpMinErrLegacyFn = function(method) {
- return function() {
- throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);
- };
-};
-
-function serializeValue(v) {
- if (isObject(v)) {
- return isDate(v) ? v.toISOString() : toJson(v);
- }
- return v;
-}
-
-
-function $HttpParamSerializerProvider() {
- /**
- * @ngdoc service
- * @name $httpParamSerializer
- * @description
- *
- * Default {@link $http `$http`} params serializer that converts objects to strings
- * according to the following rules:
- *
- * * `{'foo': 'bar'}` results in `foo=bar`
- * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
- * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
- *
- * Note that serializer will sort the request parameters alphabetically.
- * */
-
- this.$get = function() {
- return function ngParamSerializer(params) {
- if (!params) return '';
- var parts = [];
- forEachSorted(params, function(value, key) {
- if (value === null || isUndefined(value)) return;
- if (isArray(value)) {
- forEach(value, function(v, k) {
- parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));
- });
- } else {
- parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));
- }
- });
-
- return parts.join('&');
- };
- };
-}
-
-function $HttpParamSerializerJQLikeProvider() {
- /**
- * @ngdoc service
- * @name $httpParamSerializerJQLike
- * @description
- *
- * Alternative {@link $http `$http`} params serializer that follows
- * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
- * The serializer will also sort the params alphabetically.
- *
- * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
- *
- * ```js
- * $http({
- * url: myUrl,
- * method: 'GET',
- * params: myParams,
- * paramSerializer: '$httpParamSerializerJQLike'
- * });
- * ```
- *
- * It is also possible to set it as the default `paramSerializer` in the
- * {@link $httpProvider#defaults `$httpProvider`}.
- *
- * Additionally, you can inject the serializer and use it explicitly, for example to serialize
- * form data for submission:
- *
- * ```js
- * .controller(function($http, $httpParamSerializerJQLike) {
- * //...
- *
- * $http({
- * url: myUrl,
- * method: 'POST',
- * data: $httpParamSerializerJQLike(myData),
- * headers: {
- * 'Content-Type': 'application/x-www-form-urlencoded'
- * }
- * });
- *
- * });
- * ```
- *
- * */
- this.$get = function() {
- return function jQueryLikeParamSerializer(params) {
- if (!params) return '';
- var parts = [];
- serialize(params, '', true);
- return parts.join('&');
-
- function serialize(toSerialize, prefix, topLevel) {
- if (toSerialize === null || isUndefined(toSerialize)) return;
- if (isArray(toSerialize)) {
- forEach(toSerialize, function(value, index) {
- serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');
- });
- } else if (isObject(toSerialize) && !isDate(toSerialize)) {
- forEachSorted(toSerialize, function(value, key) {
- serialize(value, prefix +
- (topLevel ? '' : '[') +
- key +
- (topLevel ? '' : ']'));
- });
- } else {
- parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));
- }
- }
- };
- };
-}
-
-function defaultHttpResponseTransform(data, headers) {
- if (isString(data)) {
- // Strip json vulnerability protection prefix and trim whitespace
- var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();
-
- if (tempData) {
- var contentType = headers('Content-Type');
- if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {
- data = fromJson(tempData);
- }
- }
- }
-
- return data;
-}
-
-function isJsonLike(str) {
- var jsonStart = str.match(JSON_START);
- return jsonStart && JSON_ENDS[jsonStart[0]].test(str);
-}
-
-/**
- * Parse headers into key value object
- *
- * @param {string} headers Raw headers as a string
- * @returns {Object} Parsed headers as key value object
- */
-function parseHeaders(headers) {
- var parsed = createMap(), i;
-
- function fillInParsed(key, val) {
- if (key) {
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
- }
- }
-
- if (isString(headers)) {
- forEach(headers.split('\n'), function(line) {
- i = line.indexOf(':');
- fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));
- });
- } else if (isObject(headers)) {
- forEach(headers, function(headerVal, headerKey) {
- fillInParsed(lowercase(headerKey), trim(headerVal));
- });
- }
-
- return parsed;
-}
-
-
-/**
- * Returns a function that provides access to parsed headers.
- *
- * Headers are lazy parsed when first requested.
- * @see parseHeaders
- *
- * @param {(string|Object)} headers Headers to provide access to.
- * @returns {function(string=)} Returns a getter function which if called with:
- *
- * - if called with single an argument returns a single header value or null
- * - if called with no arguments returns an object containing all headers.
- */
-function headersGetter(headers) {
- var headersObj;
-
- return function(name) {
- if (!headersObj) headersObj = parseHeaders(headers);
-
- if (name) {
- var value = headersObj[lowercase(name)];
- if (value === void 0) {
- value = null;
- }
- return value;
- }
-
- return headersObj;
- };
-}
-
-
-/**
- * Chain all given functions
- *
- * This function is used for both request and response transforming
- *
- * @param {*} data Data to transform.
- * @param {function(string=)} headers HTTP headers getter fn.
- * @param {number} status HTTP status code of the response.
- * @param {(Function|Array.<Function>)} fns Function or an array of functions.
- * @returns {*} Transformed data.
- */
-function transformData(data, headers, status, fns) {
- if (isFunction(fns)) {
- return fns(data, headers, status);
- }
-
- forEach(fns, function(fn) {
- data = fn(data, headers, status);
- });
-
- return data;
-}
-
-
-function isSuccess(status) {
- return 200 <= status && status < 300;
-}
-
-
-/**
- * @ngdoc provider
- * @name $httpProvider
- * @description
- * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
- * */
-function $HttpProvider() {
- /**
- * @ngdoc property
- * @name $httpProvider#defaults
- * @description
- *
- * Object containing default values for all {@link ng.$http $http} requests.
- *
- * - **`defaults.cache`** - {Object} - an object built with {@link ng.$cacheFactory `$cacheFactory`}
- * that will provide the cache for all requests who set their `cache` property to `true`.
- * If you set the `defaults.cache = false` then only requests that specify their own custom
- * cache object will be cached. See {@link $http#caching $http Caching} for more information.
- *
- * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.
- * Defaults value is `'XSRF-TOKEN'`.
- *
- * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the
- * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.
- *
- * - **`defaults.headers`** - {Object} - Default headers for all $http requests.
- * Refer to {@link ng.$http#setting-http-headers $http} for documentation on
- * setting default headers.
- * - **`defaults.headers.common`**
- * - **`defaults.headers.post`**
- * - **`defaults.headers.put`**
- * - **`defaults.headers.patch`**
- *
- *
- * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function
- * used to the prepare string representation of request parameters (specified as an object).
- * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.
- * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.
- *
- **/
- var defaults = this.defaults = {
- // transform incoming response data
- transformResponse: [defaultHttpResponseTransform],
-
- // transform outgoing request data
- transformRequest: [function(d) {
- return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;
- }],
-
- // default headers
- headers: {
- common: {
- 'Accept': 'application/json, text/plain, */*'
- },
- post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)
- },
-
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN',
-
- paramSerializer: '$httpParamSerializer'
- };
-
- var useApplyAsync = false;
- /**
- * @ngdoc method
- * @name $httpProvider#useApplyAsync
- * @description
- *
- * Configure $http service to combine processing of multiple http responses received at around
- * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
- * significant performance improvement for bigger applications that make many HTTP requests
- * concurrently (common during application bootstrap).
- *
- * Defaults to false. If no value is specified, returns the current configured value.
- *
- * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred
- * "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window
- * to load and share the same digest cycle.
- *
- * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
- * otherwise, returns the current configured value.
- **/
- this.useApplyAsync = function(value) {
- if (isDefined(value)) {
- useApplyAsync = !!value;
- return this;
- }
- return useApplyAsync;
- };
-
- var useLegacyPromise = true;
- /**
- * @ngdoc method
- * @name $httpProvider#useLegacyPromiseExtensions
- * @description
- *
- * Configure `$http` service to return promises without the shorthand methods `success` and `error`.
- * This should be used to make sure that applications work without these methods.
- *
- * Defaults to true. If no value is specified, returns the current configured value.
- *
- * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.
- *
- * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
- * otherwise, returns the current configured value.
- **/
- this.useLegacyPromiseExtensions = function(value) {
- if (isDefined(value)) {
- useLegacyPromise = !!value;
- return this;
- }
- return useLegacyPromise;
- };
-
- /**
- * @ngdoc property
- * @name $httpProvider#interceptors
- * @description
- *
- * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}
- * pre-processing of request or postprocessing of responses.
- *
- * These service factories are ordered by request, i.e. they are applied in the same order as the
- * array, on request, but reverse order, on response.
- *
- * {@link ng.$http#interceptors Interceptors detailed info}
- **/
- var interceptorFactories = this.interceptors = [];
-
- this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',
- function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {
-
- var defaultCache = $cacheFactory('$http');
-
- /**
- * Make sure that default param serializer is exposed as a function
- */
- defaults.paramSerializer = isString(defaults.paramSerializer) ?
- $injector.get(defaults.paramSerializer) : defaults.paramSerializer;
-
- /**
- * Interceptors stored in reverse order. Inner interceptors before outer interceptors.
- * The reversal is needed so that we can build up the interception chain around the
- * server request.
- */
- var reversedInterceptors = [];
-
- forEach(interceptorFactories, function(interceptorFactory) {
- reversedInterceptors.unshift(isString(interceptorFactory)
- ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));
- });
-
- /**
- * @ngdoc service
- * @kind function
- * @name $http
- * @requires ng.$httpBackend
- * @requires $cacheFactory
- * @requires $rootScope
- * @requires $q
- * @requires $injector
- *
- * @description
- * The `$http` service is a core Angular service that facilitates communication with the remote
- * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)
- * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).
- *
- * For unit testing applications that use `$http` service, see
- * {@link ngMock.$httpBackend $httpBackend mock}.
- *
- * For a higher level of abstraction, please check out the {@link ngResource.$resource
- * $resource} service.
- *
- * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by
- * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage
- * it is important to familiarize yourself with these APIs and the guarantees they provide.
- *
- *
- * ## General usage
- * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —
- * that is used to generate an HTTP request and returns a {@link ng.$q promise}.
- *
- * ```js
- * // Simple GET request example:
- * $http({
- * method: 'GET',
- * url: '/someUrl'
- * }).then(function successCallback(response) {
- * // this callback will be called asynchronously
- * // when the response is available
- * }, function errorCallback(response) {
- * // called asynchronously if an error occurs
- * // or server returns response with an error status.
- * });
- * ```
- *
- * The response object has these properties:
- *
- * - **data** – `{string|Object}` – The response body transformed with the transform
- * functions.
- * - **status** – `{number}` – HTTP status code of the response.
- * - **headers** – `{function([headerName])}` – Header getter function.
- * - **config** – `{Object}` – The configuration object that was used to generate the request.
- * - **statusText** – `{string}` – HTTP status text of the response.
- *
- * A response status code between 200 and 299 is considered a success status and
- * will result in the success callback being called. Note that if the response is a redirect,
- * XMLHttpRequest will transparently follow it, meaning that the error callback will not be
- * called for such responses.
- *
- *
- * ## Shortcut methods
- *
- * Shortcut methods are also available. All shortcut methods require passing in the URL, and
- * request data must be passed in for POST/PUT requests. An optional config can be passed as the
- * last argument.
- *
- * ```js
- * $http.get('/someUrl', config).then(successCallback, errorCallback);
- * $http.post('/someUrl', data, config).then(successCallback, errorCallback);
- * ```
- *
- * Complete list of shortcut methods:
- *
- * - {@link ng.$http#get $http.get}
- * - {@link ng.$http#head $http.head}
- * - {@link ng.$http#post $http.post}
- * - {@link ng.$http#put $http.put}
- * - {@link ng.$http#delete $http.delete}
- * - {@link ng.$http#jsonp $http.jsonp}
- * - {@link ng.$http#patch $http.patch}
- *
- *
- * ## Writing Unit Tests that use $http
- * When unit testing (using {@link ngMock ngMock}), it is necessary to call
- * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending
- * request using trained responses.
- *
- * ```
- * $httpBackend.expectGET(...);
- * $http.get(...);
- * $httpBackend.flush();
- * ```
- *
- * ## Deprecation Notice
- * <div class="alert alert-danger">
- * The `$http` legacy promise methods `success` and `error` have been deprecated.
- * Use the standard `then` method instead.
- * If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to
- * `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.
- * </div>
- *
- * ## Setting HTTP Headers
- *
- * The $http service will automatically add certain HTTP headers to all requests. These defaults
- * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration
- * object, which currently contains this default configuration:
- *
- * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):
- * - `Accept: application/json, text/plain, * / *`
- * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)
- * - `Content-Type: application/json`
- * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)
- * - `Content-Type: application/json`
- *
- * To add or overwrite these defaults, simply add or remove a property from these configuration
- * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
- * with the lowercased HTTP method name as the key, e.g.
- * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.
- *
- * The defaults can also be set at runtime via the `$http.defaults` object in the same
- * fashion. For example:
- *
- * ```
- * module.run(function($http) {
- * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
- * });
- * ```
- *
- * In addition, you can supply a `headers` property in the config object passed when
- * calling `$http(config)`, which overrides the defaults without changing them globally.
- *
- * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,
- * Use the `headers` property, setting the desired header to `undefined`. For example:
- *
- * ```js
- * var req = {
- * method: 'POST',
- * url: 'http://example.com',
- * headers: {
- * 'Content-Type': undefined
- * },
- * data: { test: 'test' }
- * }
- *
- * $http(req).then(function(){...}, function(){...});
- * ```
- *
- * ## Transforming Requests and Responses
- *
- * Both requests and responses can be transformed using transformation functions: `transformRequest`
- * and `transformResponse`. These properties can be a single function that returns
- * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,
- * which allows you to `push` or `unshift` a new transformation function into the transformation chain.
- *
- * ### Default Transformations
- *
- * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and
- * `defaults.transformResponse` properties. If a request does not provide its own transformations
- * then these will be applied.
- *
- * You can augment or replace the default transformations by modifying these properties by adding to or
- * replacing the array.
- *
- * Angular provides the following default transformations:
- *
- * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):
- *
- * - If the `data` property of the request configuration object contains an object, serialize it
- * into JSON format.
- *
- * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):
- *
- * - If XSRF prefix is detected, strip it (see Security Considerations section below).
- * - If JSON response is detected, deserialize it using a JSON parser.
- *
- *
- * ### Overriding the Default Transformations Per Request
- *
- * If you wish override the request/response transformations only for a single request then provide
- * `transformRequest` and/or `transformResponse` properties on the configuration object passed
- * into `$http`.
- *
- * Note that if you provide these properties on the config object the default transformations will be
- * overwritten. If you wish to augment the default transformations then you must include them in your
- * local transformation array.
- *
- * The following code demonstrates adding a new response transformation to be run after the default response
- * transformations have been run.
- *
- * ```js
- * function appendTransform(defaults, transform) {
- *
- * // We can't guarantee that the default transformation is an array
- * defaults = angular.isArray(defaults) ? defaults : [defaults];
- *
- * // Append the new transformation to the defaults
- * return defaults.concat(transform);
- * }
- *
- * $http({
- * url: '...',
- * method: 'GET',
- * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {
- * return doTransform(value);
- * })
- * });
- * ```
- *
- *
- * ## Caching
- *
- * To enable caching, set the request configuration `cache` property to `true` (to use default
- * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).
- * When the cache is enabled, `$http` stores the response from the server in the specified
- * cache. The next time the same request is made, the response is served from the cache without
- * sending a request to the server.
- *
- * Note that even if the response is served from cache, delivery of the data is asynchronous in
- * the same way that real requests are.
- *
- * If there are multiple GET requests for the same URL that should be cached using the same
- * cache, but the cache is not populated yet, only one request to the server will be made and
- * the remaining requests will be fulfilled using the response from the first request.
- *
- * You can change the default cache to a new object (built with
- * {@link ng.$cacheFactory `$cacheFactory`}) by updating the
- * {@link ng.$http#defaults `$http.defaults.cache`} property. All requests who set
- * their `cache` property to `true` will now use this cache object.
- *
- * If you set the default cache to `false` then only requests that specify their own custom
- * cache object will be cached.
- *
- * ## Interceptors
- *
- * Before you start creating interceptors, be sure to understand the
- * {@link ng.$q $q and deferred/promise APIs}.
- *
- * For purposes of global error handling, authentication, or any kind of synchronous or
- * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be
- * able to intercept requests before they are handed to the server and
- * responses before they are handed over to the application code that
- * initiated these requests. The interceptors leverage the {@link ng.$q
- * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.
- *
- * The interceptors are service factories that are registered with the `$httpProvider` by
- * adding them to the `$httpProvider.interceptors` array. The factory is called and
- * injected with dependencies (if specified) and returns the interceptor.
- *
- * There are two kinds of interceptors (and two kinds of rejection interceptors):
- *
- * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to
- * modify the `config` object or create a new one. The function needs to return the `config`
- * object directly, or a promise containing the `config` or a new `config` object.
- * * `requestError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- * * `response`: interceptors get called with http `response` object. The function is free to
- * modify the `response` object or create a new one. The function needs to return the `response`
- * object directly, or as a promise containing the `response` or a new `response` object.
- * * `responseError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- *
- *
- * ```js
- * // register the interceptor as a service
- * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
- * return {
- * // optional method
- * 'request': function(config) {
- * // do something on success
- * return config;
- * },
- *
- * // optional method
- * 'requestError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * },
- *
- *
- *
- * // optional method
- * 'response': function(response) {
- * // do something on success
- * return response;
- * },
- *
- * // optional method
- * 'responseError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * }
- * };
- * });
- *
- * $httpProvider.interceptors.push('myHttpInterceptor');
- *
- *
- * // alternatively, register the interceptor via an anonymous factory
- * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {
- * return {
- * 'request': function(config) {
- * // same as above
- * },
- *
- * 'response': function(response) {
- * // same as above
- * }
- * };
- * });
- * ```
- *
- * ## Security Considerations
- *
- * When designing web applications, consider security threats from:
- *
- * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
- *
- * Both server and the client must cooperate in order to eliminate these threats. Angular comes
- * pre-configured with strategies that address these issues, but for this to work backend server
- * cooperation is required.
- *
- * ### JSON Vulnerability Protection
- *
- * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * allows third party website to turn your JSON resource URL into
- * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To
- * counter this your server can prefix all JSON requests with following string `")]}',\n"`.
- * Angular will automatically strip the prefix before processing it as JSON.
- *
- * For example if your server needs to return:
- * ```js
- * ['one','two']
- * ```
- *
- * which is vulnerable to attack, your server can return:
- * ```js
- * )]}',
- * ['one','two']
- * ```
- *
- * Angular will strip the prefix, before processing the JSON.
- *
- *
- * ### Cross Site Request Forgery (XSRF) Protection
- *
- * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which
- * an unauthorized site can gain your user's private data. Angular provides a mechanism
- * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie
- * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only
- * JavaScript that runs on your domain could read the cookie, your server can be assured that
- * the XHR came from JavaScript running on your domain. The header will not be set for
- * cross-domain requests.
- *
- * To take advantage of this, your server needs to set a token in a JavaScript readable session
- * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the
- * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure
- * that only JavaScript running on your domain could have sent the request. The token must be
- * unique for each user and must be verifiable by the server (to prevent the JavaScript from
- * making up its own tokens). We recommend that the token is a digest of your site's
- * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)
- * for added security.
- *
- * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName
- * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,
- * or the per-request config object.
- *
- * In order to prevent collisions in environments where multiple Angular apps share the
- * same domain or subdomain, we recommend that each application uses unique cookie name.
- *
- * @param {object} config Object describing the request to be made and how it should be
- * processed. The object has following properties:
- *
- * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)
- * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.
- * - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be serialized
- * with the `paramSerializer` and appended as GET parameters.
- * - **data** – `{string|Object}` – Data to be sent as the request message data.
- * - **headers** – `{Object}` – Map of strings or functions which return strings representing
- * HTTP headers to send to the server. If the return value of a function is null, the
- * header will not be sent. Functions accept a config object as an argument.
- * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.
- * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.
- * - **transformRequest** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * request body and headers and returns its transformed (typically serialized) version.
- * See {@link ng.$http#overriding-the-default-transformations-per-request
- * Overriding the Default Transformations}
- * - **transformResponse** –
- * `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * response body, headers and status and returns its transformed (typically deserialized) version.
- * See {@link ng.$http#overriding-the-default-transformations-per-request
- * Overriding the Default TransformationjqLiks}
- * - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to
- * prepare the string representation of request parameters (specified as an object).
- * If specified as string, it is interpreted as function registered with the
- * {@link $injector $injector}, which means you can create your own serializer
- * by registering it as a {@link auto.$provide#service service}.
- * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};
- * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}
- * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- * GET request, otherwise if a cache instance built with
- * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
- * caching.
- * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}
- * that should abort the request when resolved.
- * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the
- * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)
- * for more information.
- * - **responseType** - `{string}` - see
- * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).
- *
- * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object
- * when the request succeeds or fails.
- *
- *
- * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
- * requests. This is primarily meant to be used for debugging purposes.
- *
- *
- * @example
-<example module="httpExample">
-<file name="index.html">
- <div ng-controller="FetchController">
- <select ng-model="method" aria-label="Request method">
- <option>GET</option>
- <option>JSONP</option>
- </select>
- <input type="text" ng-model="url" size="80" aria-label="URL" />
- <button id="fetchbtn" ng-click="fetch()">fetch</button><br>
- <button id="samplegetbtn" ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button>
- <button id="samplejsonpbtn"
- ng-click="updateModel('JSONP',
- 'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">
- Sample JSONP
- </button>
- <button id="invalidjsonpbtn"
- ng-click="updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')">
- Invalid JSONP
- </button>
- <pre>http status code: {{status}}</pre>
- <pre>http response data: {{data}}</pre>
- </div>
-</file>
-<file name="script.js">
- angular.module('httpExample', [])
- .controller('FetchController', ['$scope', '$http', '$templateCache',
- function($scope, $http, $templateCache) {
- $scope.method = 'GET';
- $scope.url = 'http-hello.html';
-
- $scope.fetch = function() {
- $scope.code = null;
- $scope.response = null;
-
- $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
- then(function(response) {
- $scope.status = response.status;
- $scope.data = response.data;
- }, function(response) {
- $scope.data = response.data || "Request failed";
- $scope.status = response.status;
- });
- };
-
- $scope.updateModel = function(method, url) {
- $scope.method = method;
- $scope.url = url;
- };
- }]);
-</file>
-<file name="http-hello.html">
- Hello, $http!
-</file>
-<file name="protractor.js" type="protractor">
- var status = element(by.binding('status'));
- var data = element(by.binding('data'));
- var fetchBtn = element(by.id('fetchbtn'));
- var sampleGetBtn = element(by.id('samplegetbtn'));
- var sampleJsonpBtn = element(by.id('samplejsonpbtn'));
- var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));
-
- it('should make an xhr GET request', function() {
- sampleGetBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('200');
- expect(data.getText()).toMatch(/Hello, \$http!/);
- });
-
-// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185
-// it('should make a JSONP request to angularjs.org', function() {
-// sampleJsonpBtn.click();
-// fetchBtn.click();
-// expect(status.getText()).toMatch('200');
-// expect(data.getText()).toMatch(/Super Hero!/);
-// });
-
- it('should make JSONP request to invalid URL and invoke the error handler',
- function() {
- invalidJsonpBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('0');
- expect(data.getText()).toMatch('Request failed');
- });
-</file>
-</example>
- */
- function $http(requestConfig) {
-
- if (!angular.isObject(requestConfig)) {
- throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);
- }
-
- var config = extend({
- method: 'get',
- transformRequest: defaults.transformRequest,
- transformResponse: defaults.transformResponse,
- paramSerializer: defaults.paramSerializer
- }, requestConfig);
-
- config.headers = mergeHeaders(requestConfig);
- config.method = uppercase(config.method);
- config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
-
- var serverRequest = function(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- };
-
- var chain = [serverRequest, undefined];
- var promise = $q.when(config);
-
- // apply interceptors
- forEach(reversedInterceptors, function(interceptor) {
- if (interceptor.request || interceptor.requestError) {
- chain.unshift(interceptor.request, interceptor.requestError);
- }
- if (interceptor.response || interceptor.responseError) {
- chain.push(interceptor.response, interceptor.responseError);
- }
- });
-
- while (chain.length) {
- var thenFn = chain.shift();
- var rejectFn = chain.shift();
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- if (useLegacyPromise) {
- promise.success = function(fn) {
- assertArgFn(fn, 'fn');
-
- promise.then(function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
-
- promise.error = function(fn) {
- assertArgFn(fn, 'fn');
-
- promise.then(null, function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
- } else {
- promise.success = $httpMinErrLegacyFn('success');
- promise.error = $httpMinErrLegacyFn('error');
- }
-
- return promise;
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
-
- function executeHeaderFns(headers, config) {
- var headerContent, processedHeaders = {};
-
- forEach(headers, function(headerFn, header) {
- if (isFunction(headerFn)) {
- headerContent = headerFn(config);
- if (headerContent != null) {
- processedHeaders[header] = headerContent;
- }
- } else {
- processedHeaders[header] = headerFn;
- }
- });
-
- return processedHeaders;
- }
-
- function mergeHeaders(config) {
- var defHeaders = defaults.headers,
- reqHeaders = extend({}, config.headers),
- defHeaderName, lowercaseDefHeaderName, reqHeaderName;
-
- defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);
-
- // using for-in instead of forEach to avoid unecessary iteration after header has been found
- defaultHeadersIteration:
- for (defHeaderName in defHeaders) {
- lowercaseDefHeaderName = lowercase(defHeaderName);
-
- for (reqHeaderName in reqHeaders) {
- if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {
- continue defaultHeadersIteration;
- }
- }
-
- reqHeaders[defHeaderName] = defHeaders[defHeaderName];
- }
-
- // execute if header value is a function for merged headers
- return executeHeaderFns(reqHeaders, shallowCopy(config));
- }
- }
-
- $http.pendingRequests = [];
-
- /**
- * @ngdoc method
- * @name $http#get
- *
- * @description
- * Shortcut method to perform `GET` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#delete
- *
- * @description
- * Shortcut method to perform `DELETE` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#head
- *
- * @description
- * Shortcut method to perform `HEAD` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#jsonp
- *
- * @description
- * Shortcut method to perform `JSONP` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request.
- * The name of the callback should be the string `JSON_CALLBACK`.
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethods('get', 'delete', 'head', 'jsonp');
-
- /**
- * @ngdoc method
- * @name $http#post
- *
- * @description
- * Shortcut method to perform `POST` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#put
- *
- * @description
- * Shortcut method to perform `PUT` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#patch
- *
- * @description
- * Shortcut method to perform `PATCH` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethodsWithData('post', 'put', 'patch');
-
- /**
- * @ngdoc property
- * @name $http#defaults
- *
- * @description
- * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
- * default headers, withCredentials as well as request and response transformations.
- *
- * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
- */
- $http.defaults = defaults;
-
-
- return $http;
-
-
- function createShortMethods(names) {
- forEach(arguments, function(name) {
- $http[name] = function(url, config) {
- return $http(extend({}, config || {}, {
- method: name,
- url: url
- }));
- };
- });
- }
-
-
- function createShortMethodsWithData(name) {
- forEach(arguments, function(name) {
- $http[name] = function(url, data, config) {
- return $http(extend({}, config || {}, {
- method: name,
- url: url,
- data: data
- }));
- };
- });
- }
-
-
- /**
- * Makes the request.
- *
- * !!! ACCESSES CLOSURE VARS:
- * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
- */
- function sendReq(config, reqData) {
- var deferred = $q.defer(),
- promise = deferred.promise,
- cache,
- cachedResp,
- reqHeaders = config.headers,
- url = buildUrl(config.url, config.paramSerializer(config.params));
-
- $http.pendingRequests.push(config);
- promise.then(removePendingReq, removePendingReq);
-
-
- if ((config.cache || defaults.cache) && config.cache !== false &&
- (config.method === 'GET' || config.method === 'JSONP')) {
- cache = isObject(config.cache) ? config.cache
- : isObject(defaults.cache) ? defaults.cache
- : defaultCache;
- }
-
- if (cache) {
- cachedResp = cache.get(url);
- if (isDefined(cachedResp)) {
- if (isPromiseLike(cachedResp)) {
- // cached request has already been sent, but there is no response yet
- cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);
- } else {
- // serving from cache
- if (isArray(cachedResp)) {
- resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);
- } else {
- resolvePromise(cachedResp, 200, {}, 'OK');
- }
- }
- } else {
- // put the promise for the non-transformed response into cache as a placeholder
- cache.put(url, promise);
- }
- }
-
-
- // if we won't have the response in cache, set the xsrf headers and
- // send the request to the backend
- if (isUndefined(cachedResp)) {
- var xsrfValue = urlIsSameOrigin(config.url)
- ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]
- : undefined;
- if (xsrfValue) {
- reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
- }
-
- $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,
- config.withCredentials, config.responseType);
- }
-
- return promise;
-
-
- /**
- * Callback registered to $httpBackend():
- * - caches the response if desired
- * - resolves the raw $http promise
- * - calls $apply
- */
- function done(status, response, headersString, statusText) {
- if (cache) {
- if (isSuccess(status)) {
- cache.put(url, [status, response, parseHeaders(headersString), statusText]);
- } else {
- // remove promise from the cache
- cache.remove(url);
- }
- }
-
- function resolveHttpPromise() {
- resolvePromise(response, status, headersString, statusText);
- }
-
- if (useApplyAsync) {
- $rootScope.$applyAsync(resolveHttpPromise);
- } else {
- resolveHttpPromise();
- if (!$rootScope.$$phase) $rootScope.$apply();
- }
- }
-
-
- /**
- * Resolves the raw $http promise.
- */
- function resolvePromise(response, status, headers, statusText) {
- //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
- status = status >= -1 ? status : 0;
-
- (isSuccess(status) ? deferred.resolve : deferred.reject)({
- data: response,
- status: status,
- headers: headersGetter(headers),
- config: config,
- statusText: statusText
- });
- }
-
- function resolvePromiseWithResult(result) {
- resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);
- }
-
- function removePendingReq() {
- var idx = $http.pendingRequests.indexOf(config);
- if (idx !== -1) $http.pendingRequests.splice(idx, 1);
- }
- }
-
-
- function buildUrl(url, serializedParams) {
- if (serializedParams.length > 0) {
- url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams;
- }
- return url;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $xhrFactory
- *
- * @description
- * Factory function used to create XMLHttpRequest objects.
- *
- * Replace or decorate this service to create your own custom XMLHttpRequest objects.
- *
- * ```
- * angular.module('myApp', [])
- * .factory('$xhrFactory', function() {
- * return function createXhr(method, url) {
- * return new window.XMLHttpRequest({mozSystem: true});
- * };
- * });
- * ```
- *
- * @param {string} method HTTP method of the request (GET, POST, PUT, ..)
- * @param {string} url URL of the request.
- */
-function $xhrFactoryProvider() {
- this.$get = function() {
- return function createXhr() {
- return new window.XMLHttpRequest();
- };
- };
-}
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @requires $window
- * @requires $document
- * @requires $xhrFactory
- *
- * @description
- * HTTP backend used by the {@link ng.$http service} that delegates to
- * XMLHttpRequest object or JSONP and deals with browser incompatibilities.
- *
- * You should never need to use this service directly, instead use the higher-level abstractions:
- * {@link ng.$http $http} or {@link ngResource.$resource $resource}.
- *
- * During testing this implementation is swapped with {@link ngMock.$httpBackend mock
- * $httpBackend} which can be trained with responses.
- */
-function $HttpBackendProvider() {
- this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
- }];
-}
-
-function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {
- // TODO(vojta): fix the signature
- return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {
- $browser.$$incOutstandingRequestCount();
- url = url || $browser.url();
-
- if (lowercase(method) == 'jsonp') {
- var callbackId = '_' + (callbacks.counter++).toString(36);
- callbacks[callbackId] = function(data) {
- callbacks[callbackId].data = data;
- callbacks[callbackId].called = true;
- };
-
- var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
- callbackId, function(status, text) {
- completeRequest(callback, status, callbacks[callbackId].data, "", text);
- callbacks[callbackId] = noop;
- });
- } else {
-
- var xhr = createXhr(method, url);
-
- xhr.open(method, url, true);
- forEach(headers, function(value, key) {
- if (isDefined(value)) {
- xhr.setRequestHeader(key, value);
- }
- });
-
- xhr.onload = function requestLoaded() {
- var statusText = xhr.statusText || '';
-
- // responseText is the old-school way of retrieving response (supported by IE9)
- // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
- var response = ('response' in xhr) ? xhr.response : xhr.responseText;
-
- // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
- var status = xhr.status === 1223 ? 204 : xhr.status;
-
- // fix status code when it is 0 (0 status is undocumented).
- // Occurs when accessing file resources or on Android 4.1 stock browser
- // while retrieving files from application cache.
- if (status === 0) {
- status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;
- }
-
- completeRequest(callback,
- status,
- response,
- xhr.getAllResponseHeaders(),
- statusText);
- };
-
- var requestError = function() {
- // The response is always empty
- // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error
- completeRequest(callback, -1, null, null, '');
- };
-
- xhr.onerror = requestError;
- xhr.onabort = requestError;
-
- if (withCredentials) {
- xhr.withCredentials = true;
- }
-
- if (responseType) {
- try {
- xhr.responseType = responseType;
- } catch (e) {
- // WebKit added support for the json responseType value on 09/03/2013
- // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are
- // known to throw when setting the value "json" as the response type. Other older
- // browsers implementing the responseType
- //
- // The json response type can be ignored if not supported, because JSON payloads are
- // parsed on the client-side regardless.
- if (responseType !== 'json') {
- throw e;
- }
- }
- }
-
- xhr.send(isUndefined(post) ? null : post);
- }
-
- if (timeout > 0) {
- var timeoutId = $browserDefer(timeoutRequest, timeout);
- } else if (isPromiseLike(timeout)) {
- timeout.then(timeoutRequest);
- }
-
-
- function timeoutRequest() {
- jsonpDone && jsonpDone();
- xhr && xhr.abort();
- }
-
- function completeRequest(callback, status, response, headersString, statusText) {
- // cancel timeout and subsequent timeout promise resolution
- if (isDefined(timeoutId)) {
- $browserDefer.cancel(timeoutId);
- }
- jsonpDone = xhr = null;
-
- callback(status, response, headersString, statusText);
- $browser.$$completeOutstandingRequest(noop);
- }
- };
-
- function jsonpReq(url, callbackId, done) {
- // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
- // - fetches local scripts via XHR and evals them
- // - adds and immediately removes script elements from the document
- var script = rawDocument.createElement('script'), callback = null;
- script.type = "text/javascript";
- script.src = url;
- script.async = true;
-
- callback = function(event) {
- removeEventListenerFn(script, "load", callback);
- removeEventListenerFn(script, "error", callback);
- rawDocument.body.removeChild(script);
- script = null;
- var status = -1;
- var text = "unknown";
-
- if (event) {
- if (event.type === "load" && !callbacks[callbackId].called) {
- event = { type: "error" };
- }
- text = event.type;
- status = event.type === "error" ? 404 : 200;
- }
-
- if (done) {
- done(status, text);
- }
- };
-
- addEventListenerFn(script, "load", callback);
- addEventListenerFn(script, "error", callback);
- rawDocument.body.appendChild(script);
- return callback;
- }
-}
-
-var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');
-$interpolateMinErr.throwNoconcat = function(text) {
- throw $interpolateMinErr('noconcat',
- "Error while interpolating: {0}\nStrict Contextual Escaping disallows " +
- "interpolations that concatenate multiple expressions when a trusted value is " +
- "required. See http://docs.angularjs.org/api/ng.$sce", text);
-};
-
-$interpolateMinErr.interr = function(text, err) {
- return $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, err.toString());
-};
-
-/**
- * @ngdoc provider
- * @name $interpolateProvider
- *
- * @description
- *
- * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
- *
- * @example
-<example module="customInterpolationApp">
-<file name="index.html">
-<script>
- var customInterpolationApp = angular.module('customInterpolationApp', []);
-
- customInterpolationApp.config(function($interpolateProvider) {
- $interpolateProvider.startSymbol('//');
- $interpolateProvider.endSymbol('//');
- });
-
-
- customInterpolationApp.controller('DemoController', function() {
- this.label = "This binding is brought you by // interpolation symbols.";
- });
-</script>
-<div ng-app="App" ng-controller="DemoController as demo">
- //demo.label//
-</div>
-</file>
-<file name="protractor.js" type="protractor">
- it('should interpolate binding with custom symbols', function() {
- expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');
- });
-</file>
-</example>
- */
-function $InterpolateProvider() {
- var startSymbol = '{{';
- var endSymbol = '}}';
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#startSymbol
- * @description
- * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
- *
- * @param {string=} value new value to set the starting symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.startSymbol = function(value) {
- if (value) {
- startSymbol = value;
- return this;
- } else {
- return startSymbol;
- }
- };
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * @param {string=} value new value to set the ending symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.endSymbol = function(value) {
- if (value) {
- endSymbol = value;
- return this;
- } else {
- return endSymbol;
- }
- };
-
-
- this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {
- var startSymbolLength = startSymbol.length,
- endSymbolLength = endSymbol.length,
- escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),
- escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');
-
- function escape(ch) {
- return '\\\\\\' + ch;
- }
-
- function unescapeText(text) {
- return text.replace(escapedStartRegexp, startSymbol).
- replace(escapedEndRegexp, endSymbol);
- }
-
- function stringify(value) {
- if (value == null) { // null || undefined
- return '';
- }
- switch (typeof value) {
- case 'string':
- break;
- case 'number':
- value = '' + value;
- break;
- default:
- value = toJson(value);
- }
-
- return value;
- }
-
- /**
- * @ngdoc service
- * @name $interpolate
- * @kind function
- *
- * @requires $parse
- * @requires $sce
- *
- * @description
- *
- * Compiles a string with markup into an interpolation function. This service is used by the
- * HTML {@link ng.$compile $compile} service for data binding. See
- * {@link ng.$interpolateProvider $interpolateProvider} for configuring the
- * interpolation markup.
- *
- *
- * ```js
- * var $interpolate = ...; // injected
- * var exp = $interpolate('Hello {{name | uppercase}}!');
- * expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');
- * ```
- *
- * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is
- * `true`, the interpolation function will return `undefined` unless all embedded expressions
- * evaluate to a value other than `undefined`.
- *
- * ```js
- * var $interpolate = ...; // injected
- * var context = {greeting: 'Hello', name: undefined };
- *
- * // default "forgiving" mode
- * var exp = $interpolate('{{greeting}} {{name}}!');
- * expect(exp(context)).toEqual('Hello !');
- *
- * // "allOrNothing" mode
- * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);
- * expect(exp(context)).toBeUndefined();
- * context.name = 'Angular';
- * expect(exp(context)).toEqual('Hello Angular!');
- * ```
- *
- * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
- *
- * ####Escaped Interpolation
- * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
- * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
- * It will be rendered as a regular start/end marker, and will not be interpreted as an expression
- * or binding.
- *
- * This enables web-servers to prevent script injection attacks and defacing attacks, to some
- * degree, while also enabling code examples to work without relying on the
- * {@link ng.directive:ngNonBindable ngNonBindable} directive.
- *
- * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,
- * replacing angle brackets (&lt;, &gt;) with &amp;lt; and &amp;gt; respectively, and replacing all
- * interpolation start/end markers with their escaped counterparts.**
- *
- * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered
- * output when the $interpolate service processes the text. So, for HTML elements interpolated
- * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter
- * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,
- * this is typically useful only when user-data is used in rendering a template from the server, or
- * when otherwise untrusted data is used by a directive.
- *
- * <example>
- * <file name="index.html">
- * <div ng-init="username='A user'">
- * <p ng-init="apptitle='Escaping demo'">{{apptitle}}: \{\{ username = "defaced value"; \}\}
- * </p>
- * <p><strong>{{username}}</strong> attempts to inject code which will deface the
- * application, but fails to accomplish their task, because the server has correctly
- * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)
- * characters.</p>
- * <p>Instead, the result of the attempted script injection is visible, and can be removed
- * from the database by an administrator.</p>
- * </div>
- * </file>
- * </example>
- *
- * @param {string} text The text with markup to interpolate.
- * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
- * embedded expression in order to return an interpolation function. Strings with no
- * embedded expression will return null for the interpolation function.
- * @param {string=} trustedContext when provided, the returned function passes the interpolated
- * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,
- * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that
- * provides Strict Contextual Escaping for details.
- * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined
- * unless all embedded expressions evaluate to a value other than `undefined`.
- * @returns {function(context)} an interpolation function which is used to compute the
- * interpolated string. The function has these parameters:
- *
- * - `context`: evaluation context for all expressions embedded in the interpolated text
- */
- function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {
- allOrNothing = !!allOrNothing;
- var startIndex,
- endIndex,
- index = 0,
- expressions = [],
- parseFns = [],
- textLength = text.length,
- exp,
- concat = [],
- expressionPositions = [];
-
- while (index < textLength) {
- if (((startIndex = text.indexOf(startSymbol, index)) != -1) &&
- ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) {
- if (index !== startIndex) {
- concat.push(unescapeText(text.substring(index, startIndex)));
- }
- exp = text.substring(startIndex + startSymbolLength, endIndex);
- expressions.push(exp);
- parseFns.push($parse(exp, parseStringifyInterceptor));
- index = endIndex + endSymbolLength;
- expressionPositions.push(concat.length);
- concat.push('');
- } else {
- // we did not find an interpolation, so we have to add the remainder to the separators array
- if (index !== textLength) {
- concat.push(unescapeText(text.substring(index)));
- }
- break;
- }
- }
-
- // Concatenating expressions makes it hard to reason about whether some combination of
- // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a
- // single expression be used for iframe[src], object[src], etc., we ensure that the value
- // that's used is assigned or constructed by some JS code somewhere that is more testable or
- // make it obvious that you bound the value to some user controlled value. This helps reduce
- // the load when auditing for XSS issues.
- if (trustedContext && concat.length > 1) {
- $interpolateMinErr.throwNoconcat(text);
- }
-
- if (!mustHaveExpression || expressions.length) {
- var compute = function(values) {
- for (var i = 0, ii = expressions.length; i < ii; i++) {
- if (allOrNothing && isUndefined(values[i])) return;
- concat[expressionPositions[i]] = values[i];
- }
- return concat.join('');
- };
-
- var getValue = function(value) {
- return trustedContext ?
- $sce.getTrusted(trustedContext, value) :
- $sce.valueOf(value);
- };
-
- return extend(function interpolationFn(context) {
- var i = 0;
- var ii = expressions.length;
- var values = new Array(ii);
-
- try {
- for (; i < ii; i++) {
- values[i] = parseFns[i](context);
- }
-
- return compute(values);
- } catch (err) {
- $exceptionHandler($interpolateMinErr.interr(text, err));
- }
-
- }, {
- // all of these properties are undocumented for now
- exp: text, //just for compatibility with regular watchers created via $watch
- expressions: expressions,
- $$watchDelegate: function(scope, listener) {
- var lastValue;
- return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {
- var currValue = compute(values);
- if (isFunction(listener)) {
- listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);
- }
- lastValue = currValue;
- });
- }
- });
- }
-
- function parseStringifyInterceptor(value) {
- try {
- value = getValue(value);
- return allOrNothing && !isDefined(value) ? value : stringify(value);
- } catch (err) {
- $exceptionHandler($interpolateMinErr.interr(text, err));
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $interpolate#startSymbol
- * @description
- * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
- *
- * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change
- * the symbol.
- *
- * @returns {string} start symbol.
- */
- $interpolate.startSymbol = function() {
- return startSymbol;
- };
-
-
- /**
- * @ngdoc method
- * @name $interpolate#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change
- * the symbol.
- *
- * @returns {string} end symbol.
- */
- $interpolate.endSymbol = function() {
- return endSymbol;
- };
-
- return $interpolate;
- }];
-}
-
-function $IntervalProvider() {
- this.$get = ['$rootScope', '$window', '$q', '$$q',
- function($rootScope, $window, $q, $$q) {
- var intervals = {};
-
-
- /**
- * @ngdoc service
- * @name $interval
- *
- * @description
- * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`
- * milliseconds.
- *
- * The return value of registering an interval function is a promise. This promise will be
- * notified upon each tick of the interval, and will be resolved after `count` iterations, or
- * run indefinitely if `count` is not defined. The value of the notification will be the
- * number of iterations that have run.
- * To cancel an interval, call `$interval.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
- * time.
- *
- * <div class="alert alert-warning">
- * **Note**: Intervals created by this service must be explicitly destroyed when you are finished
- * with them. In particular they are not automatically destroyed when a controller's scope or a
- * directive's element are destroyed.
- * You should take this into consideration and make sure to always cancel the interval at the
- * appropriate moment. See the example below for more details on how and when to do this.
- * </div>
- *
- * @param {function()} fn A function that should be called repeatedly.
- * @param {number} delay Number of milliseconds between each function call.
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
- * indefinitely.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {promise} A promise which will be notified on each iteration.
- *
- * @example
- * <example module="intervalExample">
- * <file name="index.html">
- * <script>
- * angular.module('intervalExample', [])
- * .controller('ExampleController', ['$scope', '$interval',
- * function($scope, $interval) {
- * $scope.format = 'M/d/yy h:mm:ss a';
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- *
- * var stop;
- * $scope.fight = function() {
- * // Don't start a new fight if we are already fighting
- * if ( angular.isDefined(stop) ) return;
- *
- * stop = $interval(function() {
- * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
- * $scope.blood_1 = $scope.blood_1 - 3;
- * $scope.blood_2 = $scope.blood_2 - 4;
- * } else {
- * $scope.stopFight();
- * }
- * }, 100);
- * };
- *
- * $scope.stopFight = function() {
- * if (angular.isDefined(stop)) {
- * $interval.cancel(stop);
- * stop = undefined;
- * }
- * };
- *
- * $scope.resetFight = function() {
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- * };
- *
- * $scope.$on('$destroy', function() {
- * // Make sure that the interval is destroyed too
- * $scope.stopFight();
- * });
- * }])
- * // Register the 'myCurrentTime' directive factory method.
- * // We inject $interval and dateFilter service since the factory method is DI.
- * .directive('myCurrentTime', ['$interval', 'dateFilter',
- * function($interval, dateFilter) {
- * // return the directive link function. (compile function not needed)
- * return function(scope, element, attrs) {
- * var format, // date format
- * stopTime; // so that we can cancel the time updates
- *
- * // used to update the UI
- * function updateTime() {
- * element.text(dateFilter(new Date(), format));
- * }
- *
- * // watch the expression, and update the UI on change.
- * scope.$watch(attrs.myCurrentTime, function(value) {
- * format = value;
- * updateTime();
- * });
- *
- * stopTime = $interval(updateTime, 1000);
- *
- * // listen on DOM destroy (removal) event, and cancel the next UI update
- * // to prevent updating time after the DOM element was removed.
- * element.on('$destroy', function() {
- * $interval.cancel(stopTime);
- * });
- * }
- * }]);
- * </script>
- *
- * <div>
- * <div ng-controller="ExampleController">
- * <label>Date format: <input ng-model="format"></label> <hr/>
- * Current time is: <span my-current-time="format"></span>
- * <hr/>
- * Blood 1 : <font color='red'>{{blood_1}}</font>
- * Blood 2 : <font color='red'>{{blood_2}}</font>
- * <button type="button" data-ng-click="fight()">Fight</button>
- * <button type="button" data-ng-click="stopFight()">StopFight</button>
- * <button type="button" data-ng-click="resetFight()">resetFight</button>
- * </div>
- * </div>
- *
- * </file>
- * </example>
- */
- function interval(fn, delay, count, invokeApply) {
- var hasParams = arguments.length > 4,
- args = hasParams ? sliceArgs(arguments, 4) : [],
- setInterval = $window.setInterval,
- clearInterval = $window.clearInterval,
- iteration = 0,
- skipApply = (isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise;
-
- count = isDefined(count) ? count : 0;
-
- promise.then(null, null, (!hasParams) ? fn : function() {
- fn.apply(null, args);
- });
-
- promise.$$intervalId = setInterval(function tick() {
- deferred.notify(iteration++);
-
- if (count > 0 && iteration >= count) {
- deferred.resolve(iteration);
- clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- }
-
- if (!skipApply) $rootScope.$apply();
-
- }, delay);
-
- intervals[promise.$$intervalId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $interval#cancel
- *
- * @description
- * Cancels a task associated with the `promise`.
- *
- * @param {Promise=} promise returned by the `$interval` function.
- * @returns {boolean} Returns `true` if the task was successfully canceled.
- */
- interval.cancel = function(promise) {
- if (promise && promise.$$intervalId in intervals) {
- intervals[promise.$$intervalId].reject('canceled');
- $window.clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- return true;
- }
- return false;
- };
-
- return interval;
- }];
-}
-
-/**
- * @ngdoc service
- * @name $locale
- *
- * @description
- * $locale service provides localization rules for various Angular components. As of right now the
- * only public api is:
- *
- * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
- */
-
-var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
- DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
-var $locationMinErr = minErr('$location');
-
-
-/**
- * Encode path using encodeUriSegment, ignoring forward slashes
- *
- * @param {string} path Path to encode
- * @returns {string}
- */
-function encodePath(path) {
- var segments = path.split('/'),
- i = segments.length;
-
- while (i--) {
- segments[i] = encodeUriSegment(segments[i]);
- }
-
- return segments.join('/');
-}
-
-function parseAbsoluteUrl(absoluteUrl, locationObj) {
- var parsedUrl = urlResolve(absoluteUrl);
-
- locationObj.$$protocol = parsedUrl.protocol;
- locationObj.$$host = parsedUrl.hostname;
- locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;
-}
-
-
-function parseAppUrl(relativeUrl, locationObj) {
- var prefixed = (relativeUrl.charAt(0) !== '/');
- if (prefixed) {
- relativeUrl = '/' + relativeUrl;
- }
- var match = urlResolve(relativeUrl);
- locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?
- match.pathname.substring(1) : match.pathname);
- locationObj.$$search = parseKeyValue(match.search);
- locationObj.$$hash = decodeURIComponent(match.hash);
-
- // make sure path starts with '/';
- if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {
- locationObj.$$path = '/' + locationObj.$$path;
- }
-}
-
-
-/**
- *
- * @param {string} begin
- * @param {string} whole
- * @returns {string} returns text from whole after begin or undefined if it does not begin with
- * expected string.
- */
-function beginsWith(begin, whole) {
- if (whole.indexOf(begin) === 0) {
- return whole.substr(begin.length);
- }
-}
-
-
-function stripHash(url) {
- var index = url.indexOf('#');
- return index == -1 ? url : url.substr(0, index);
-}
-
-function trimEmptyHash(url) {
- return url.replace(/(#.+)|#$/, '$1');
-}
-
-
-function stripFile(url) {
- return url.substr(0, stripHash(url).lastIndexOf('/') + 1);
-}
-
-/* return the server only (scheme://host:port) */
-function serverBase(url) {
- return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));
-}
-
-
-/**
- * LocationHtml5Url represents an url
- * This object is exposed as $location service when HTML5 mode is enabled and supported
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} basePrefix url path prefix
- */
-function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {
- this.$$html5 = true;
- basePrefix = basePrefix || '';
- parseAbsoluteUrl(appBase, this);
-
-
- /**
- * Parse given html5 (regular) url string into properties
- * @param {string} url HTML5 url
- * @private
- */
- this.$$parse = function(url) {
- var pathUrl = beginsWith(appBaseNoFile, url);
- if (!isString(pathUrl)) {
- throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url,
- appBaseNoFile);
- }
-
- parseAppUrl(pathUrl, this);
-
- if (!this.$$path) {
- this.$$path = '/';
- }
-
- this.$$compose();
- };
-
- /**
- * Compose url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'
- };
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (relHref && relHref[0] === '#') {
- // special case for links to hash fragments:
- // keep the old url and only replace the hash fragment
- this.hash(relHref.slice(1));
- return true;
- }
- var appUrl, prevAppUrl;
- var rewrittenUrl;
-
- if (isDefined(appUrl = beginsWith(appBase, url))) {
- prevAppUrl = appUrl;
- if (isDefined(appUrl = beginsWith(basePrefix, appUrl))) {
- rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);
- } else {
- rewrittenUrl = appBase + prevAppUrl;
- }
- } else if (isDefined(appUrl = beginsWith(appBaseNoFile, url))) {
- rewrittenUrl = appBaseNoFile + appUrl;
- } else if (appBaseNoFile == url + '/') {
- rewrittenUrl = appBaseNoFile;
- }
- if (rewrittenUrl) {
- this.$$parse(rewrittenUrl);
- }
- return !!rewrittenUrl;
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when developer doesn't opt into html5 mode.
- * It also serves as the base class for html5 mode fallback on legacy browsers.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {
-
- parseAbsoluteUrl(appBase, this);
-
-
- /**
- * Parse given hashbang url into properties
- * @param {string} url Hashbang url
- * @private
- */
- this.$$parse = function(url) {
- var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
- var withoutHashUrl;
-
- if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {
-
- // The rest of the url starts with a hash so we have
- // got either a hashbang path or a plain hash fragment
- withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl);
- if (isUndefined(withoutHashUrl)) {
- // There was no hashbang prefix so we just have a hash fragment
- withoutHashUrl = withoutBaseUrl;
- }
-
- } else {
- // There was no hashbang path nor hash fragment:
- // If we are in HTML5 mode we use what is left as the path;
- // Otherwise we ignore what is left
- if (this.$$html5) {
- withoutHashUrl = withoutBaseUrl;
- } else {
- withoutHashUrl = '';
- if (isUndefined(withoutBaseUrl)) {
- appBase = url;
- this.replace();
- }
- }
- }
-
- parseAppUrl(withoutHashUrl, this);
-
- this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);
-
- this.$$compose();
-
- /*
- * In Windows, on an anchor node on documents loaded from
- * the filesystem, the browser will return a pathname
- * prefixed with the drive name ('/C:/path') when a
- * pathname without a drive is set:
- * * a.setAttribute('href', '/foo')
- * * a.pathname === '/C:/foo' //true
- *
- * Inside of Angular, we're always using pathnames that
- * do not include drive names for routing.
- */
- function removeWindowsDriveName(path, url, base) {
- /*
- Matches paths for file protocol on windows,
- such as /C:/foo/bar, and captures only /foo/bar.
- */
- var windowsFilePathExp = /^\/[A-Z]:(\/.*)/;
-
- var firstPathSegmentMatch;
-
- //Get the relative path from the input URL.
- if (url.indexOf(base) === 0) {
- url = url.replace(base, '');
- }
-
- // The input URL intentionally contains a first path segment that ends with a colon.
- if (windowsFilePathExp.exec(url)) {
- return path;
- }
-
- firstPathSegmentMatch = windowsFilePathExp.exec(path);
- return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;
- }
- };
-
- /**
- * Compose hashbang url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');
- };
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (stripHash(appBase) == stripHash(url)) {
- this.$$parse(url);
- return true;
- }
- return false;
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when html5 history api is enabled but the browser
- * does not support it.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
- this.$$html5 = true;
- LocationHashbangUrl.apply(this, arguments);
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (relHref && relHref[0] === '#') {
- // special case for links to hash fragments:
- // keep the old url and only replace the hash fragment
- this.hash(relHref.slice(1));
- return true;
- }
-
- var rewrittenUrl;
- var appUrl;
-
- if (appBase == stripHash(url)) {
- rewrittenUrl = url;
- } else if ((appUrl = beginsWith(appBaseNoFile, url))) {
- rewrittenUrl = appBase + hashPrefix + appUrl;
- } else if (appBaseNoFile === url + '/') {
- rewrittenUrl = appBaseNoFile;
- }
- if (rewrittenUrl) {
- this.$$parse(rewrittenUrl);
- }
- return !!rewrittenUrl;
- };
-
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'
- this.$$absUrl = appBase + hashPrefix + this.$$url;
- };
-
-}
-
-
-var locationPrototype = {
-
- /**
- * Are we in html5 mode?
- * @private
- */
- $$html5: false,
-
- /**
- * Has any change been replacing?
- * @private
- */
- $$replace: false,
-
- /**
- * @ngdoc method
- * @name $location#absUrl
- *
- * @description
- * This method is getter only.
- *
- * Return full url representation with all segments encoded according to rules specified in
- * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var absUrl = $location.absUrl();
- * // => "http://example.com/#/some/path?foo=bar&baz=xoxo"
- * ```
- *
- * @return {string} full url
- */
- absUrl: locationGetter('$$absUrl'),
-
- /**
- * @ngdoc method
- * @name $location#url
- *
- * @description
- * This method is getter / setter.
- *
- * Return url (e.g. `/path?a=b#hash`) when called without any parameter.
- *
- * Change path, search and hash, when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var url = $location.url();
- * // => "/some/path?foo=bar&baz=xoxo"
- * ```
- *
- * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
- * @return {string} url
- */
- url: function(url) {
- if (isUndefined(url)) {
- return this.$$url;
- }
-
- var match = PATH_MATCH.exec(url);
- if (match[1] || url === '') this.path(decodeURIComponent(match[1]));
- if (match[2] || match[1] || url === '') this.search(match[3] || '');
- this.hash(match[5] || '');
-
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#protocol
- *
- * @description
- * This method is getter only.
- *
- * Return protocol of current url.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var protocol = $location.protocol();
- * // => "http"
- * ```
- *
- * @return {string} protocol of current url
- */
- protocol: locationGetter('$$protocol'),
-
- /**
- * @ngdoc method
- * @name $location#host
- *
- * @description
- * This method is getter only.
- *
- * Return host of current url.
- *
- * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var host = $location.host();
- * // => "example.com"
- *
- * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo
- * host = $location.host();
- * // => "example.com"
- * host = location.host;
- * // => "example.com:8080"
- * ```
- *
- * @return {string} host of current url.
- */
- host: locationGetter('$$host'),
-
- /**
- * @ngdoc method
- * @name $location#port
- *
- * @description
- * This method is getter only.
- *
- * Return port of current url.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var port = $location.port();
- * // => 80
- * ```
- *
- * @return {Number} port
- */
- port: locationGetter('$$port'),
-
- /**
- * @ngdoc method
- * @name $location#path
- *
- * @description
- * This method is getter / setter.
- *
- * Return path of current url when called without any parameter.
- *
- * Change path when called with parameter and return `$location`.
- *
- * Note: Path should always begin with forward slash (/), this method will add the forward slash
- * if it is missing.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var path = $location.path();
- * // => "/some/path"
- * ```
- *
- * @param {(string|number)=} path New path
- * @return {string} path
- */
- path: locationGetterSetter('$$path', function(path) {
- path = path !== null ? path.toString() : '';
- return path.charAt(0) == '/' ? path : '/' + path;
- }),
-
- /**
- * @ngdoc method
- * @name $location#search
- *
- * @description
- * This method is getter / setter.
- *
- * Return search part (as object) of current url when called without any parameter.
- *
- * Change search part when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var searchObject = $location.search();
- * // => {foo: 'bar', baz: 'xoxo'}
- *
- * // set foo to 'yipee'
- * $location.search('foo', 'yipee');
- * // $location.search() => {foo: 'yipee', baz: 'xoxo'}
- * ```
- *
- * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
- * hash object.
- *
- * When called with a single argument the method acts as a setter, setting the `search` component
- * of `$location` to the specified value.
- *
- * If the argument is a hash object containing an array of values, these values will be encoded
- * as duplicate search parameters in the url.
- *
- * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`
- * will override only a single search property.
- *
- * If `paramValue` is an array, it will override the property of the `search` component of
- * `$location` specified via the first argument.
- *
- * If `paramValue` is `null`, the property specified via the first argument will be deleted.
- *
- * If `paramValue` is `true`, the property specified via the first argument will be added with no
- * value nor trailing equal sign.
- *
- * @return {Object} If called with no arguments returns the parsed `search` object. If called with
- * one or more arguments returns `$location` object itself.
- */
- search: function(search, paramValue) {
- switch (arguments.length) {
- case 0:
- return this.$$search;
- case 1:
- if (isString(search) || isNumber(search)) {
- search = search.toString();
- this.$$search = parseKeyValue(search);
- } else if (isObject(search)) {
- search = copy(search, {});
- // remove object undefined or null properties
- forEach(search, function(value, key) {
- if (value == null) delete search[key];
- });
-
- this.$$search = search;
- } else {
- throw $locationMinErr('isrcharg',
- 'The first argument of the `$location#search()` call must be a string or an object.');
- }
- break;
- default:
- if (isUndefined(paramValue) || paramValue === null) {
- delete this.$$search[search];
- } else {
- this.$$search[search] = paramValue;
- }
- }
-
- this.$$compose();
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#hash
- *
- * @description
- * This method is getter / setter.
- *
- * Returns the hash fragment when called without any parameters.
- *
- * Changes the hash fragment when called with a parameter and returns `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue
- * var hash = $location.hash();
- * // => "hashValue"
- * ```
- *
- * @param {(string|number)=} hash New hash fragment
- * @return {string} hash
- */
- hash: locationGetterSetter('$$hash', function(hash) {
- return hash !== null ? hash.toString() : '';
- }),
-
- /**
- * @ngdoc method
- * @name $location#replace
- *
- * @description
- * If called, all changes to $location during the current `$digest` will replace the current history
- * record, instead of adding a new one.
- */
- replace: function() {
- this.$$replace = true;
- return this;
- }
-};
-
-forEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {
- Location.prototype = Object.create(locationPrototype);
-
- /**
- * @ngdoc method
- * @name $location#state
- *
- * @description
- * This method is getter / setter.
- *
- * Return the history state object when called without any parameter.
- *
- * Change the history state object when called with one parameter and return `$location`.
- * The state object is later passed to `pushState` or `replaceState`.
- *
- * NOTE: This method is supported only in HTML5 mode and only in browsers supporting
- * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support
- * older browsers (like IE9 or Android < 4.0), don't use this method.
- *
- * @param {object=} state State object for pushState or replaceState
- * @return {object} state
- */
- Location.prototype.state = function(state) {
- if (!arguments.length) {
- return this.$$state;
- }
-
- if (Location !== LocationHtml5Url || !this.$$html5) {
- throw $locationMinErr('nostate', 'History API state support is available only ' +
- 'in HTML5 mode and only in browsers supporting HTML5 History API');
- }
- // The user might modify `stateObject` after invoking `$location.state(stateObject)`
- // but we're changing the $$state reference to $browser.state() during the $digest
- // so the modification window is narrow.
- this.$$state = isUndefined(state) ? null : state;
-
- return this;
- };
-});
-
-
-function locationGetter(property) {
- return function() {
- return this[property];
- };
-}
-
-
-function locationGetterSetter(property, preprocess) {
- return function(value) {
- if (isUndefined(value)) {
- return this[property];
- }
-
- this[property] = preprocess(value);
- this.$$compose();
-
- return this;
- };
-}
-
-
-/**
- * @ngdoc service
- * @name $location
- *
- * @requires $rootElement
- *
- * @description
- * The $location service parses the URL in the browser address bar (based on the
- * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL
- * available to your application. Changes to the URL in the address bar are reflected into
- * $location service and changes to $location are reflected into the browser address bar.
- *
- * **The $location service:**
- *
- * - Exposes the current URL in the browser address bar, so you can
- * - Watch and observe the URL.
- * - Change the URL.
- * - Synchronizes the URL with the browser when the user
- * - Changes the address bar.
- * - Clicks the back or forward button (or clicks a History link).
- * - Clicks on a link.
- * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
- *
- * For more information see {@link guide/$location Developer Guide: Using $location}
- */
-
-/**
- * @ngdoc provider
- * @name $locationProvider
- * @description
- * Use the `$locationProvider` to configure how the application deep linking paths are stored.
- */
-function $LocationProvider() {
- var hashPrefix = '',
- html5Mode = {
- enabled: false,
- requireBase: true,
- rewriteLinks: true
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#hashPrefix
- * @description
- * @param {string=} prefix Prefix for hash part (containing path and search)
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.hashPrefix = function(prefix) {
- if (isDefined(prefix)) {
- hashPrefix = prefix;
- return this;
- } else {
- return hashPrefix;
- }
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#html5Mode
- * @description
- * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.
- * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported
- * properties:
- * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to
- * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not
- * support `pushState`.
- * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies
- * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
- * true, and a base tag is not present, an error will be thrown when `$location` is injected.
- * See the {@link guide/$location $location guide for more information}
- * - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled,
- * enables/disables url rewriting for relative links.
- *
- * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter
- */
- this.html5Mode = function(mode) {
- if (isBoolean(mode)) {
- html5Mode.enabled = mode;
- return this;
- } else if (isObject(mode)) {
-
- if (isBoolean(mode.enabled)) {
- html5Mode.enabled = mode.enabled;
- }
-
- if (isBoolean(mode.requireBase)) {
- html5Mode.requireBase = mode.requireBase;
- }
-
- if (isBoolean(mode.rewriteLinks)) {
- html5Mode.rewriteLinks = mode.rewriteLinks;
- }
-
- return this;
- } else {
- return html5Mode;
- }
- };
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeStart
- * @eventType broadcast on root scope
- * @description
- * Broadcasted before a URL will change.
- *
- * This change can be prevented by calling
- * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
- * details about event object. Upon successful change
- * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
- *
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
- * the browser supports the HTML5 History API.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- * @param {string=} newState New history state object
- * @param {string=} oldState History state object that was before it was changed.
- */
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeSuccess
- * @eventType broadcast on root scope
- * @description
- * Broadcasted after a URL was changed.
- *
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
- * the browser supports the HTML5 History API.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- * @param {string=} newState New history state object
- * @param {string=} oldState History state object that was before it was changed.
- */
-
- this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',
- function($rootScope, $browser, $sniffer, $rootElement, $window) {
- var $location,
- LocationMode,
- baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''
- initialUrl = $browser.url(),
- appBase;
-
- if (html5Mode.enabled) {
- if (!baseHref && html5Mode.requireBase) {
- throw $locationMinErr('nobase',
- "$location in HTML5 mode requires a <base> tag to be present!");
- }
- appBase = serverBase(initialUrl) + (baseHref || '/');
- LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;
- } else {
- appBase = stripHash(initialUrl);
- LocationMode = LocationHashbangUrl;
- }
- var appBaseNoFile = stripFile(appBase);
-
- $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);
- $location.$$parseLinkUrl(initialUrl, initialUrl);
-
- $location.$$state = $browser.state();
-
- var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i;
-
- function setBrowserUrlWithFallback(url, replace, state) {
- var oldUrl = $location.url();
- var oldState = $location.$$state;
- try {
- $browser.url(url, replace, state);
-
- // Make sure $location.state() returns referentially identical (not just deeply equal)
- // state object; this makes possible quick checking if the state changed in the digest
- // loop. Checking deep equality would be too expensive.
- $location.$$state = $browser.state();
- } catch (e) {
- // Restore old values if pushState fails
- $location.url(oldUrl);
- $location.$$state = oldState;
-
- throw e;
- }
- }
-
- $rootElement.on('click', function(event) {
- // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
- // currently we open nice url link and redirect then
-
- if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;
-
- var elm = jqLite(event.target);
-
- // traverse the DOM up to find first A tag
- while (nodeName_(elm[0]) !== 'a') {
- // ignore rewriting if no A tag (reached root element, or no parent - removed from document)
- if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;
- }
-
- var absHref = elm.prop('href');
- // get the actual href attribute - see
- // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
- var relHref = elm.attr('href') || elm.attr('xlink:href');
-
- if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {
- // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during
- // an animation.
- absHref = urlResolve(absHref.animVal).href;
- }
-
- // Ignore when url is started with javascript: or mailto:
- if (IGNORE_URI_REGEXP.test(absHref)) return;
-
- if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {
- if ($location.$$parseLinkUrl(absHref, relHref)) {
- // We do a preventDefault for all urls that are part of the angular application,
- // in html5mode and also without, so that we are able to abort navigation without
- // getting double entries in the location history.
- event.preventDefault();
- // update location manually
- if ($location.absUrl() != $browser.url()) {
- $rootScope.$apply();
- // hack to work around FF6 bug 684208 when scenario runner clicks on links
- $window.angular['ff-684208-preventDefault'] = true;
- }
- }
- }
- });
-
-
- // rewrite hashbang url <> html5 url
- if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {
- $browser.url($location.absUrl(), true);
- }
-
- var initializing = true;
-
- // update $location when $browser url changes
- $browser.onUrlChange(function(newUrl, newState) {
-
- if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {
- // If we are navigating outside of the app then force a reload
- $window.location.href = newUrl;
- return;
- }
-
- $rootScope.$evalAsync(function() {
- var oldUrl = $location.absUrl();
- var oldState = $location.$$state;
- var defaultPrevented;
- newUrl = trimEmptyHash(newUrl);
- $location.$$parse(newUrl);
- $location.$$state = newState;
-
- defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
- newState, oldState).defaultPrevented;
-
- // if the location was changed by a `$locationChangeStart` handler then stop
- // processing this location change
- if ($location.absUrl() !== newUrl) return;
-
- if (defaultPrevented) {
- $location.$$parse(oldUrl);
- $location.$$state = oldState;
- setBrowserUrlWithFallback(oldUrl, false, oldState);
- } else {
- initializing = false;
- afterLocationChange(oldUrl, oldState);
- }
- });
- if (!$rootScope.$$phase) $rootScope.$digest();
- });
-
- // update browser
- $rootScope.$watch(function $locationWatch() {
- var oldUrl = trimEmptyHash($browser.url());
- var newUrl = trimEmptyHash($location.absUrl());
- var oldState = $browser.state();
- var currentReplace = $location.$$replace;
- var urlOrStateChanged = oldUrl !== newUrl ||
- ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);
-
- if (initializing || urlOrStateChanged) {
- initializing = false;
-
- $rootScope.$evalAsync(function() {
- var newUrl = $location.absUrl();
- var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
- $location.$$state, oldState).defaultPrevented;
-
- // if the location was changed by a `$locationChangeStart` handler then stop
- // processing this location change
- if ($location.absUrl() !== newUrl) return;
-
- if (defaultPrevented) {
- $location.$$parse(oldUrl);
- $location.$$state = oldState;
- } else {
- if (urlOrStateChanged) {
- setBrowserUrlWithFallback(newUrl, currentReplace,
- oldState === $location.$$state ? null : $location.$$state);
- }
- afterLocationChange(oldUrl, oldState);
- }
- });
- }
-
- $location.$$replace = false;
-
- // we don't need to return anything because $evalAsync will make the digest loop dirty when
- // there is a change
- });
-
- return $location;
-
- function afterLocationChange(oldUrl, oldState) {
- $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,
- $location.$$state, oldState);
- }
-}];
-}
-
-/**
- * @ngdoc service
- * @name $log
- * @requires $window
- *
- * @description
- * Simple service for logging. Default implementation safely writes the message
- * into the browser's console (if present).
- *
- * The main purpose of this service is to simplify debugging and troubleshooting.
- *
- * The default is to log `debug` messages. You can use
- * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.
- *
- * @example
- <example module="logExample">
- <file name="script.js">
- angular.module('logExample', [])
- .controller('LogController', ['$scope', '$log', function($scope, $log) {
- $scope.$log = $log;
- $scope.message = 'Hello World!';
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="LogController">
- <p>Reload this page with open console, enter text and hit the log button...</p>
- <label>Message:
- <input type="text" ng-model="message" /></label>
- <button ng-click="$log.log(message)">log</button>
- <button ng-click="$log.warn(message)">warn</button>
- <button ng-click="$log.info(message)">info</button>
- <button ng-click="$log.error(message)">error</button>
- <button ng-click="$log.debug(message)">debug</button>
- </div>
- </file>
- </example>
- */
-
-/**
- * @ngdoc provider
- * @name $logProvider
- * @description
- * Use the `$logProvider` to configure how the application logs messages
- */
-function $LogProvider() {
- var debug = true,
- self = this;
-
- /**
- * @ngdoc method
- * @name $logProvider#debugEnabled
- * @description
- * @param {boolean=} flag enable or disable debug level messages
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.debugEnabled = function(flag) {
- if (isDefined(flag)) {
- debug = flag;
- return this;
- } else {
- return debug;
- }
- };
-
- this.$get = ['$window', function($window) {
- return {
- /**
- * @ngdoc method
- * @name $log#log
- *
- * @description
- * Write a log message
- */
- log: consoleLog('log'),
-
- /**
- * @ngdoc method
- * @name $log#info
- *
- * @description
- * Write an information message
- */
- info: consoleLog('info'),
-
- /**
- * @ngdoc method
- * @name $log#warn
- *
- * @description
- * Write a warning message
- */
- warn: consoleLog('warn'),
-
- /**
- * @ngdoc method
- * @name $log#error
- *
- * @description
- * Write an error message
- */
- error: consoleLog('error'),
-
- /**
- * @ngdoc method
- * @name $log#debug
- *
- * @description
- * Write a debug message
- */
- debug: (function() {
- var fn = consoleLog('debug');
-
- return function() {
- if (debug) {
- fn.apply(self, arguments);
- }
- };
- }())
- };
-
- function formatError(arg) {
- if (arg instanceof Error) {
- if (arg.stack) {
- arg = (arg.message && arg.stack.indexOf(arg.message) === -1)
- ? 'Error: ' + arg.message + '\n' + arg.stack
- : arg.stack;
- } else if (arg.sourceURL) {
- arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line;
- }
- }
- return arg;
- }
-
- function consoleLog(type) {
- var console = $window.console || {},
- logFn = console[type] || console.log || noop,
- hasApply = false;
-
- // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.
- // The reason behind this is that console.log has type "object" in IE8...
- try {
- hasApply = !!logFn.apply;
- } catch (e) {}
-
- if (hasApply) {
- return function() {
- var args = [];
- forEach(arguments, function(arg) {
- args.push(formatError(arg));
- });
- return logFn.apply(console, args);
- };
- }
-
- // we are IE which either doesn't have window.console => this is noop and we do nothing,
- // or we are IE where console.log doesn't have apply so we log at least first 2 args
- return function(arg1, arg2) {
- logFn(arg1, arg2 == null ? '' : arg2);
- };
- }
- }];
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-var $parseMinErr = minErr('$parse');
-
-// Sandboxing Angular Expressions
-// ------------------------------
-// Angular expressions are generally considered safe because these expressions only have direct
-// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by
-// obtaining a reference to native JS functions such as the Function constructor.
-//
-// As an example, consider the following Angular expression:
-//
-// {}.toString.constructor('alert("evil JS code")')
-//
-// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits
-// against the expression language, but not to prevent exploits that were enabled by exposing
-// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good
-// practice and therefore we are not even trying to protect against interaction with an object
-// explicitly exposed in this way.
-//
-// In general, it is not possible to access a Window object from an angular expression unless a
-// window or some DOM object that has a reference to window is published onto a Scope.
-// Similarly we prevent invocations of function known to be dangerous, as well as assignments to
-// native objects.
-//
-// See https://docs.angularjs.org/guide/security
-
-
-function ensureSafeMemberName(name, fullExpression) {
- if (name === "__defineGetter__" || name === "__defineSetter__"
- || name === "__lookupGetter__" || name === "__lookupSetter__"
- || name === "__proto__") {
- throw $parseMinErr('isecfld',
- 'Attempting to access a disallowed field in Angular expressions! '
- + 'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function getStringValue(name, fullExpression) {
- // From the JavaScript docs:
- // Property names must be strings. This means that non-string objects cannot be used
- // as keys in an object. Any non-string object, including a number, is typecasted
- // into a string via the toString method.
- //
- // So, to ensure that we are checking the same `name` that JavaScript would use,
- // we cast it to a string, if possible.
- // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,
- // this is, this will handle objects that misbehave.
- name = name + '';
- if (!isString(name)) {
- throw $parseMinErr('iseccst',
- 'Cannot convert object to primitive value! '
- + 'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function ensureSafeObject(obj, fullExpression) {
- // nifty check if obj is Function that is fast and works across iframes and other contexts
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isWindow(obj)
- obj.window === obj) {
- throw $parseMinErr('isecwindow',
- 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isElement(obj)
- obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {
- throw $parseMinErr('isecdom',
- 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// block Object so that we can't get hold of dangerous Object.* methods
- obj === Object) {
- throw $parseMinErr('isecobj',
- 'Referencing Object in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
- return obj;
-}
-
-var CALL = Function.prototype.call;
-var APPLY = Function.prototype.apply;
-var BIND = Function.prototype.bind;
-
-function ensureSafeFunction(obj, fullExpression) {
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (obj === CALL || obj === APPLY || obj === BIND) {
- throw $parseMinErr('isecff',
- 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
-}
-
-function ensureSafeAssignContext(obj, fullExpression) {
- if (obj) {
- if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||
- obj === {}.constructor || obj === [].constructor || obj === Function.constructor) {
- throw $parseMinErr('isecaf',
- 'Assigning to a constructor is disallowed! Expression: {0}', fullExpression);
- }
- }
-}
-
-var OPERATORS = createMap();
-forEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });
-var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'};
-
-
-/////////////////////////////////////////
-
-
-/**
- * @constructor
- */
-var Lexer = function(options) {
- this.options = options;
-};
-
-Lexer.prototype = {
- constructor: Lexer,
-
- lex: function(text) {
- this.text = text;
- this.index = 0;
- this.tokens = [];
-
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- if (ch === '"' || ch === "'") {
- this.readString(ch);
- } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {
- this.readNumber();
- } else if (this.isIdent(ch)) {
- this.readIdent();
- } else if (this.is(ch, '(){}[].,;:?')) {
- this.tokens.push({index: this.index, text: ch});
- this.index++;
- } else if (this.isWhitespace(ch)) {
- this.index++;
- } else {
- var ch2 = ch + this.peek();
- var ch3 = ch2 + this.peek(2);
- var op1 = OPERATORS[ch];
- var op2 = OPERATORS[ch2];
- var op3 = OPERATORS[ch3];
- if (op1 || op2 || op3) {
- var token = op3 ? ch3 : (op2 ? ch2 : ch);
- this.tokens.push({index: this.index, text: token, operator: true});
- this.index += token.length;
- } else {
- this.throwError('Unexpected next character ', this.index, this.index + 1);
- }
- }
- }
- return this.tokens;
- },
-
- is: function(ch, chars) {
- return chars.indexOf(ch) !== -1;
- },
-
- peek: function(i) {
- var num = i || 1;
- return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;
- },
-
- isNumber: function(ch) {
- return ('0' <= ch && ch <= '9') && typeof ch === "string";
- },
-
- isWhitespace: function(ch) {
- // IE treats non-breaking space as \u00A0
- return (ch === ' ' || ch === '\r' || ch === '\t' ||
- ch === '\n' || ch === '\v' || ch === '\u00A0');
- },
-
- isIdent: function(ch) {
- return ('a' <= ch && ch <= 'z' ||
- 'A' <= ch && ch <= 'Z' ||
- '_' === ch || ch === '$');
- },
-
- isExpOperator: function(ch) {
- return (ch === '-' || ch === '+' || this.isNumber(ch));
- },
-
- throwError: function(error, start, end) {
- end = end || this.index;
- var colStr = (isDefined(start)
- ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'
- : ' ' + end);
- throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',
- error, colStr, this.text);
- },
-
- readNumber: function() {
- var number = '';
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = lowercase(this.text.charAt(this.index));
- if (ch == '.' || this.isNumber(ch)) {
- number += ch;
- } else {
- var peekCh = this.peek();
- if (ch == 'e' && this.isExpOperator(peekCh)) {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- peekCh && this.isNumber(peekCh) &&
- number.charAt(number.length - 1) == 'e') {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- (!peekCh || !this.isNumber(peekCh)) &&
- number.charAt(number.length - 1) == 'e') {
- this.throwError('Invalid exponent');
- } else {
- break;
- }
- }
- this.index++;
- }
- this.tokens.push({
- index: start,
- text: number,
- constant: true,
- value: Number(number)
- });
- },
-
- readIdent: function() {
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- if (!(this.isIdent(ch) || this.isNumber(ch))) {
- break;
- }
- this.index++;
- }
- this.tokens.push({
- index: start,
- text: this.text.slice(start, this.index),
- identifier: true
- });
- },
-
- readString: function(quote) {
- var start = this.index;
- this.index++;
- var string = '';
- var rawString = quote;
- var escape = false;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- rawString += ch;
- if (escape) {
- if (ch === 'u') {
- var hex = this.text.substring(this.index + 1, this.index + 5);
- if (!hex.match(/[\da-f]{4}/i)) {
- this.throwError('Invalid unicode escape [\\u' + hex + ']');
- }
- this.index += 4;
- string += String.fromCharCode(parseInt(hex, 16));
- } else {
- var rep = ESCAPE[ch];
- string = string + (rep || ch);
- }
- escape = false;
- } else if (ch === '\\') {
- escape = true;
- } else if (ch === quote) {
- this.index++;
- this.tokens.push({
- index: start,
- text: rawString,
- constant: true,
- value: string
- });
- return;
- } else {
- string += ch;
- }
- this.index++;
- }
- this.throwError('Unterminated quote', start);
- }
-};
-
-var AST = function(lexer, options) {
- this.lexer = lexer;
- this.options = options;
-};
-
-AST.Program = 'Program';
-AST.ExpressionStatement = 'ExpressionStatement';
-AST.AssignmentExpression = 'AssignmentExpression';
-AST.ConditionalExpression = 'ConditionalExpression';
-AST.LogicalExpression = 'LogicalExpression';
-AST.BinaryExpression = 'BinaryExpression';
-AST.UnaryExpression = 'UnaryExpression';
-AST.CallExpression = 'CallExpression';
-AST.MemberExpression = 'MemberExpression';
-AST.Identifier = 'Identifier';
-AST.Literal = 'Literal';
-AST.ArrayExpression = 'ArrayExpression';
-AST.Property = 'Property';
-AST.ObjectExpression = 'ObjectExpression';
-AST.ThisExpression = 'ThisExpression';
-
-// Internal use only
-AST.NGValueParameter = 'NGValueParameter';
-
-AST.prototype = {
- ast: function(text) {
- this.text = text;
- this.tokens = this.lexer.lex(text);
-
- var value = this.program();
-
- if (this.tokens.length !== 0) {
- this.throwError('is an unexpected token', this.tokens[0]);
- }
-
- return value;
- },
-
- program: function() {
- var body = [];
- while (true) {
- if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))
- body.push(this.expressionStatement());
- if (!this.expect(';')) {
- return { type: AST.Program, body: body};
- }
- }
- },
-
- expressionStatement: function() {
- return { type: AST.ExpressionStatement, expression: this.filterChain() };
- },
-
- filterChain: function() {
- var left = this.expression();
- var token;
- while ((token = this.expect('|'))) {
- left = this.filter(left);
- }
- return left;
- },
-
- expression: function() {
- return this.assignment();
- },
-
- assignment: function() {
- var result = this.ternary();
- if (this.expect('=')) {
- result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};
- }
- return result;
- },
-
- ternary: function() {
- var test = this.logicalOR();
- var alternate;
- var consequent;
- if (this.expect('?')) {
- alternate = this.expression();
- if (this.consume(':')) {
- consequent = this.expression();
- return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};
- }
- }
- return test;
- },
-
- logicalOR: function() {
- var left = this.logicalAND();
- while (this.expect('||')) {
- left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };
- }
- return left;
- },
-
- logicalAND: function() {
- var left = this.equality();
- while (this.expect('&&')) {
- left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};
- }
- return left;
- },
-
- equality: function() {
- var left = this.relational();
- var token;
- while ((token = this.expect('==','!=','===','!=='))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };
- }
- return left;
- },
-
- relational: function() {
- var left = this.additive();
- var token;
- while ((token = this.expect('<', '>', '<=', '>='))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };
- }
- return left;
- },
-
- additive: function() {
- var left = this.multiplicative();
- var token;
- while ((token = this.expect('+','-'))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };
- }
- return left;
- },
-
- multiplicative: function() {
- var left = this.unary();
- var token;
- while ((token = this.expect('*','/','%'))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };
- }
- return left;
- },
-
- unary: function() {
- var token;
- if ((token = this.expect('+', '-', '!'))) {
- return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };
- } else {
- return this.primary();
- }
- },
-
- primary: function() {
- var primary;
- if (this.expect('(')) {
- primary = this.filterChain();
- this.consume(')');
- } else if (this.expect('[')) {
- primary = this.arrayDeclaration();
- } else if (this.expect('{')) {
- primary = this.object();
- } else if (this.constants.hasOwnProperty(this.peek().text)) {
- primary = copy(this.constants[this.consume().text]);
- } else if (this.peek().identifier) {
- primary = this.identifier();
- } else if (this.peek().constant) {
- primary = this.constant();
- } else {
- this.throwError('not a primary expression', this.peek());
- }
-
- var next;
- while ((next = this.expect('(', '[', '.'))) {
- if (next.text === '(') {
- primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };
- this.consume(')');
- } else if (next.text === '[') {
- primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };
- this.consume(']');
- } else if (next.text === '.') {
- primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };
- } else {
- this.throwError('IMPOSSIBLE');
- }
- }
- return primary;
- },
-
- filter: function(baseExpression) {
- var args = [baseExpression];
- var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};
-
- while (this.expect(':')) {
- args.push(this.expression());
- }
-
- return result;
- },
-
- parseArguments: function() {
- var args = [];
- if (this.peekToken().text !== ')') {
- do {
- args.push(this.expression());
- } while (this.expect(','));
- }
- return args;
- },
-
- identifier: function() {
- var token = this.consume();
- if (!token.identifier) {
- this.throwError('is not a valid identifier', token);
- }
- return { type: AST.Identifier, name: token.text };
- },
-
- constant: function() {
- // TODO check that it is a constant
- return { type: AST.Literal, value: this.consume().value };
- },
-
- arrayDeclaration: function() {
- var elements = [];
- if (this.peekToken().text !== ']') {
- do {
- if (this.peek(']')) {
- // Support trailing commas per ES5.1.
- break;
- }
- elements.push(this.expression());
- } while (this.expect(','));
- }
- this.consume(']');
-
- return { type: AST.ArrayExpression, elements: elements };
- },
-
- object: function() {
- var properties = [], property;
- if (this.peekToken().text !== '}') {
- do {
- if (this.peek('}')) {
- // Support trailing commas per ES5.1.
- break;
- }
- property = {type: AST.Property, kind: 'init'};
- if (this.peek().constant) {
- property.key = this.constant();
- } else if (this.peek().identifier) {
- property.key = this.identifier();
- } else {
- this.throwError("invalid key", this.peek());
- }
- this.consume(':');
- property.value = this.expression();
- properties.push(property);
- } while (this.expect(','));
- }
- this.consume('}');
-
- return {type: AST.ObjectExpression, properties: properties };
- },
-
- throwError: function(msg, token) {
- throw $parseMinErr('syntax',
- 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].',
- token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));
- },
-
- consume: function(e1) {
- if (this.tokens.length === 0) {
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- }
-
- var token = this.expect(e1);
- if (!token) {
- this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());
- }
- return token;
- },
-
- peekToken: function() {
- if (this.tokens.length === 0) {
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- }
- return this.tokens[0];
- },
-
- peek: function(e1, e2, e3, e4) {
- return this.peekAhead(0, e1, e2, e3, e4);
- },
-
- peekAhead: function(i, e1, e2, e3, e4) {
- if (this.tokens.length > i) {
- var token = this.tokens[i];
- var t = token.text;
- if (t === e1 || t === e2 || t === e3 || t === e4 ||
- (!e1 && !e2 && !e3 && !e4)) {
- return token;
- }
- }
- return false;
- },
-
- expect: function(e1, e2, e3, e4) {
- var token = this.peek(e1, e2, e3, e4);
- if (token) {
- this.tokens.shift();
- return token;
- }
- return false;
- },
-
-
- /* `undefined` is not a constant, it is an identifier,
- * but using it as an identifier is not supported
- */
- constants: {
- 'true': { type: AST.Literal, value: true },
- 'false': { type: AST.Literal, value: false },
- 'null': { type: AST.Literal, value: null },
- 'undefined': {type: AST.Literal, value: undefined },
- 'this': {type: AST.ThisExpression }
- }
-};
-
-function ifDefined(v, d) {
- return typeof v !== 'undefined' ? v : d;
-}
-
-function plusFn(l, r) {
- if (typeof l === 'undefined') return r;
- if (typeof r === 'undefined') return l;
- return l + r;
-}
-
-function isStateless($filter, filterName) {
- var fn = $filter(filterName);
- return !fn.$stateful;
-}
-
-function findConstantAndWatchExpressions(ast, $filter) {
- var allConstants;
- var argsToWatch;
- switch (ast.type) {
- case AST.Program:
- allConstants = true;
- forEach(ast.body, function(expr) {
- findConstantAndWatchExpressions(expr.expression, $filter);
- allConstants = allConstants && expr.expression.constant;
- });
- ast.constant = allConstants;
- break;
- case AST.Literal:
- ast.constant = true;
- ast.toWatch = [];
- break;
- case AST.UnaryExpression:
- findConstantAndWatchExpressions(ast.argument, $filter);
- ast.constant = ast.argument.constant;
- ast.toWatch = ast.argument.toWatch;
- break;
- case AST.BinaryExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);
- break;
- case AST.LogicalExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = ast.constant ? [] : [ast];
- break;
- case AST.ConditionalExpression:
- findConstantAndWatchExpressions(ast.test, $filter);
- findConstantAndWatchExpressions(ast.alternate, $filter);
- findConstantAndWatchExpressions(ast.consequent, $filter);
- ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;
- ast.toWatch = ast.constant ? [] : [ast];
- break;
- case AST.Identifier:
- ast.constant = false;
- ast.toWatch = [ast];
- break;
- case AST.MemberExpression:
- findConstantAndWatchExpressions(ast.object, $filter);
- if (ast.computed) {
- findConstantAndWatchExpressions(ast.property, $filter);
- }
- ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);
- ast.toWatch = [ast];
- break;
- case AST.CallExpression:
- allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false;
- argsToWatch = [];
- forEach(ast.arguments, function(expr) {
- findConstantAndWatchExpressions(expr, $filter);
- allConstants = allConstants && expr.constant;
- if (!expr.constant) {
- argsToWatch.push.apply(argsToWatch, expr.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast];
- break;
- case AST.AssignmentExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = [ast];
- break;
- case AST.ArrayExpression:
- allConstants = true;
- argsToWatch = [];
- forEach(ast.elements, function(expr) {
- findConstantAndWatchExpressions(expr, $filter);
- allConstants = allConstants && expr.constant;
- if (!expr.constant) {
- argsToWatch.push.apply(argsToWatch, expr.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = argsToWatch;
- break;
- case AST.ObjectExpression:
- allConstants = true;
- argsToWatch = [];
- forEach(ast.properties, function(property) {
- findConstantAndWatchExpressions(property.value, $filter);
- allConstants = allConstants && property.value.constant;
- if (!property.value.constant) {
- argsToWatch.push.apply(argsToWatch, property.value.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = argsToWatch;
- break;
- case AST.ThisExpression:
- ast.constant = false;
- ast.toWatch = [];
- break;
- }
-}
-
-function getInputs(body) {
- if (body.length != 1) return;
- var lastExpression = body[0].expression;
- var candidate = lastExpression.toWatch;
- if (candidate.length !== 1) return candidate;
- return candidate[0] !== lastExpression ? candidate : undefined;
-}
-
-function isAssignable(ast) {
- return ast.type === AST.Identifier || ast.type === AST.MemberExpression;
-}
-
-function assignableAST(ast) {
- if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {
- return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};
- }
-}
-
-function isLiteral(ast) {
- return ast.body.length === 0 ||
- ast.body.length === 1 && (
- ast.body[0].expression.type === AST.Literal ||
- ast.body[0].expression.type === AST.ArrayExpression ||
- ast.body[0].expression.type === AST.ObjectExpression);
-}
-
-function isConstant(ast) {
- return ast.constant;
-}
-
-function ASTCompiler(astBuilder, $filter) {
- this.astBuilder = astBuilder;
- this.$filter = $filter;
-}
-
-ASTCompiler.prototype = {
- compile: function(expression, expensiveChecks) {
- var self = this;
- var ast = this.astBuilder.ast(expression);
- this.state = {
- nextId: 0,
- filters: {},
- expensiveChecks: expensiveChecks,
- fn: {vars: [], body: [], own: {}},
- assign: {vars: [], body: [], own: {}},
- inputs: []
- };
- findConstantAndWatchExpressions(ast, self.$filter);
- var extra = '';
- var assignable;
- this.stage = 'assign';
- if ((assignable = assignableAST(ast))) {
- this.state.computing = 'assign';
- var result = this.nextId();
- this.recurse(assignable, result);
- this.return_(result);
- extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');
- }
- var toWatch = getInputs(ast.body);
- self.stage = 'inputs';
- forEach(toWatch, function(watch, key) {
- var fnKey = 'fn' + key;
- self.state[fnKey] = {vars: [], body: [], own: {}};
- self.state.computing = fnKey;
- var intoId = self.nextId();
- self.recurse(watch, intoId);
- self.return_(intoId);
- self.state.inputs.push(fnKey);
- watch.watchId = key;
- });
- this.state.computing = 'fn';
- this.stage = 'main';
- this.recurse(ast);
- var fnString =
- // The build and minification steps remove the string "use strict" from the code, but this is done using a regex.
- // This is a workaround for this until we do a better job at only removing the prefix only when we should.
- '"' + this.USE + ' ' + this.STRICT + '";\n' +
- this.filterPrefix() +
- 'var fn=' + this.generateFunction('fn', 's,l,a,i') +
- extra +
- this.watchFns() +
- 'return fn;';
-
- /* jshint -W054 */
- var fn = (new Function('$filter',
- 'ensureSafeMemberName',
- 'ensureSafeObject',
- 'ensureSafeFunction',
- 'getStringValue',
- 'ensureSafeAssignContext',
- 'ifDefined',
- 'plus',
- 'text',
- fnString))(
- this.$filter,
- ensureSafeMemberName,
- ensureSafeObject,
- ensureSafeFunction,
- getStringValue,
- ensureSafeAssignContext,
- ifDefined,
- plusFn,
- expression);
- /* jshint +W054 */
- this.state = this.stage = undefined;
- fn.literal = isLiteral(ast);
- fn.constant = isConstant(ast);
- return fn;
- },
-
- USE: 'use',
-
- STRICT: 'strict',
-
- watchFns: function() {
- var result = [];
- var fns = this.state.inputs;
- var self = this;
- forEach(fns, function(name) {
- result.push('var ' + name + '=' + self.generateFunction(name, 's'));
- });
- if (fns.length) {
- result.push('fn.inputs=[' + fns.join(',') + '];');
- }
- return result.join('');
- },
-
- generateFunction: function(name, params) {
- return 'function(' + params + '){' +
- this.varsPrefix(name) +
- this.body(name) +
- '};';
- },
-
- filterPrefix: function() {
- var parts = [];
- var self = this;
- forEach(this.state.filters, function(id, filter) {
- parts.push(id + '=$filter(' + self.escape(filter) + ')');
- });
- if (parts.length) return 'var ' + parts.join(',') + ';';
- return '';
- },
-
- varsPrefix: function(section) {
- return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';
- },
-
- body: function(section) {
- return this.state[section].body.join('');
- },
-
- recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
- var left, right, self = this, args, expression;
- recursionFn = recursionFn || noop;
- if (!skipWatchIdCheck && isDefined(ast.watchId)) {
- intoId = intoId || this.nextId();
- this.if_('i',
- this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),
- this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)
- );
- return;
- }
- switch (ast.type) {
- case AST.Program:
- forEach(ast.body, function(expression, pos) {
- self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });
- if (pos !== ast.body.length - 1) {
- self.current().body.push(right, ';');
- } else {
- self.return_(right);
- }
- });
- break;
- case AST.Literal:
- expression = this.escape(ast.value);
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.UnaryExpression:
- this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });
- expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.BinaryExpression:
- this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });
- this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });
- if (ast.operator === '+') {
- expression = this.plus(left, right);
- } else if (ast.operator === '-') {
- expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);
- } else {
- expression = '(' + left + ')' + ast.operator + '(' + right + ')';
- }
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.LogicalExpression:
- intoId = intoId || this.nextId();
- self.recurse(ast.left, intoId);
- self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));
- recursionFn(intoId);
- break;
- case AST.ConditionalExpression:
- intoId = intoId || this.nextId();
- self.recurse(ast.test, intoId);
- self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));
- recursionFn(intoId);
- break;
- case AST.Identifier:
- intoId = intoId || this.nextId();
- if (nameId) {
- nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');
- nameId.computed = false;
- nameId.name = ast.name;
- }
- ensureSafeMemberName(ast.name);
- self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),
- function() {
- self.if_(self.stage === 'inputs' || 's', function() {
- if (create && create !== 1) {
- self.if_(
- self.not(self.nonComputedMember('s', ast.name)),
- self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));
- }
- self.assign(intoId, self.nonComputedMember('s', ast.name));
- });
- }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))
- );
- if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) {
- self.addEnsureSafeObject(intoId);
- }
- recursionFn(intoId);
- break;
- case AST.MemberExpression:
- left = nameId && (nameId.context = this.nextId()) || this.nextId();
- intoId = intoId || this.nextId();
- self.recurse(ast.object, left, undefined, function() {
- self.if_(self.notNull(left), function() {
- if (ast.computed) {
- right = self.nextId();
- self.recurse(ast.property, right);
- self.getStringValue(right);
- self.addEnsureSafeMemberName(right);
- if (create && create !== 1) {
- self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));
- }
- expression = self.ensureSafeObject(self.computedMember(left, right));
- self.assign(intoId, expression);
- if (nameId) {
- nameId.computed = true;
- nameId.name = right;
- }
- } else {
- ensureSafeMemberName(ast.property.name);
- if (create && create !== 1) {
- self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));
- }
- expression = self.nonComputedMember(left, ast.property.name);
- if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) {
- expression = self.ensureSafeObject(expression);
- }
- self.assign(intoId, expression);
- if (nameId) {
- nameId.computed = false;
- nameId.name = ast.property.name;
- }
- }
- }, function() {
- self.assign(intoId, 'undefined');
- });
- recursionFn(intoId);
- }, !!create);
- break;
- case AST.CallExpression:
- intoId = intoId || this.nextId();
- if (ast.filter) {
- right = self.filter(ast.callee.name);
- args = [];
- forEach(ast.arguments, function(expr) {
- var argument = self.nextId();
- self.recurse(expr, argument);
- args.push(argument);
- });
- expression = right + '(' + args.join(',') + ')';
- self.assign(intoId, expression);
- recursionFn(intoId);
- } else {
- right = self.nextId();
- left = {};
- args = [];
- self.recurse(ast.callee, right, left, function() {
- self.if_(self.notNull(right), function() {
- self.addEnsureSafeFunction(right);
- forEach(ast.arguments, function(expr) {
- self.recurse(expr, self.nextId(), undefined, function(argument) {
- args.push(self.ensureSafeObject(argument));
- });
- });
- if (left.name) {
- if (!self.state.expensiveChecks) {
- self.addEnsureSafeObject(left.context);
- }
- expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';
- } else {
- expression = right + '(' + args.join(',') + ')';
- }
- expression = self.ensureSafeObject(expression);
- self.assign(intoId, expression);
- }, function() {
- self.assign(intoId, 'undefined');
- });
- recursionFn(intoId);
- });
- }
- break;
- case AST.AssignmentExpression:
- right = this.nextId();
- left = {};
- if (!isAssignable(ast.left)) {
- throw $parseMinErr('lval', 'Trying to assing a value to a non l-value');
- }
- this.recurse(ast.left, undefined, left, function() {
- self.if_(self.notNull(left.context), function() {
- self.recurse(ast.right, right);
- self.addEnsureSafeObject(self.member(left.context, left.name, left.computed));
- self.addEnsureSafeAssignContext(left.context);
- expression = self.member(left.context, left.name, left.computed) + ast.operator + right;
- self.assign(intoId, expression);
- recursionFn(intoId || expression);
- });
- }, 1);
- break;
- case AST.ArrayExpression:
- args = [];
- forEach(ast.elements, function(expr) {
- self.recurse(expr, self.nextId(), undefined, function(argument) {
- args.push(argument);
- });
- });
- expression = '[' + args.join(',') + ']';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.ObjectExpression:
- args = [];
- forEach(ast.properties, function(property) {
- self.recurse(property.value, self.nextId(), undefined, function(expr) {
- args.push(self.escape(
- property.key.type === AST.Identifier ? property.key.name :
- ('' + property.key.value)) +
- ':' + expr);
- });
- });
- expression = '{' + args.join(',') + '}';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.ThisExpression:
- this.assign(intoId, 's');
- recursionFn('s');
- break;
- case AST.NGValueParameter:
- this.assign(intoId, 'v');
- recursionFn('v');
- break;
- }
- },
-
- getHasOwnProperty: function(element, property) {
- var key = element + '.' + property;
- var own = this.current().own;
- if (!own.hasOwnProperty(key)) {
- own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');
- }
- return own[key];
- },
-
- assign: function(id, value) {
- if (!id) return;
- this.current().body.push(id, '=', value, ';');
- return id;
- },
-
- filter: function(filterName) {
- if (!this.state.filters.hasOwnProperty(filterName)) {
- this.state.filters[filterName] = this.nextId(true);
- }
- return this.state.filters[filterName];
- },
-
- ifDefined: function(id, defaultValue) {
- return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';
- },
-
- plus: function(left, right) {
- return 'plus(' + left + ',' + right + ')';
- },
-
- return_: function(id) {
- this.current().body.push('return ', id, ';');
- },
-
- if_: function(test, alternate, consequent) {
- if (test === true) {
- alternate();
- } else {
- var body = this.current().body;
- body.push('if(', test, '){');
- alternate();
- body.push('}');
- if (consequent) {
- body.push('else{');
- consequent();
- body.push('}');
- }
- }
- },
-
- not: function(expression) {
- return '!(' + expression + ')';
- },
-
- notNull: function(expression) {
- return expression + '!=null';
- },
-
- nonComputedMember: function(left, right) {
- return left + '.' + right;
- },
-
- computedMember: function(left, right) {
- return left + '[' + right + ']';
- },
-
- member: function(left, right, computed) {
- if (computed) return this.computedMember(left, right);
- return this.nonComputedMember(left, right);
- },
-
- addEnsureSafeObject: function(item) {
- this.current().body.push(this.ensureSafeObject(item), ';');
- },
-
- addEnsureSafeMemberName: function(item) {
- this.current().body.push(this.ensureSafeMemberName(item), ';');
- },
-
- addEnsureSafeFunction: function(item) {
- this.current().body.push(this.ensureSafeFunction(item), ';');
- },
-
- addEnsureSafeAssignContext: function(item) {
- this.current().body.push(this.ensureSafeAssignContext(item), ';');
- },
-
- ensureSafeObject: function(item) {
- return 'ensureSafeObject(' + item + ',text)';
- },
-
- ensureSafeMemberName: function(item) {
- return 'ensureSafeMemberName(' + item + ',text)';
- },
-
- ensureSafeFunction: function(item) {
- return 'ensureSafeFunction(' + item + ',text)';
- },
-
- getStringValue: function(item) {
- this.assign(item, 'getStringValue(' + item + ',text)');
- },
-
- ensureSafeAssignContext: function(item) {
- return 'ensureSafeAssignContext(' + item + ',text)';
- },
-
- lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
- var self = this;
- return function() {
- self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);
- };
- },
-
- lazyAssign: function(id, value) {
- var self = this;
- return function() {
- self.assign(id, value);
- };
- },
-
- stringEscapeRegex: /[^ a-zA-Z0-9]/g,
-
- stringEscapeFn: function(c) {
- return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);
- },
-
- escape: function(value) {
- if (isString(value)) return "'" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'";
- if (isNumber(value)) return value.toString();
- if (value === true) return 'true';
- if (value === false) return 'false';
- if (value === null) return 'null';
- if (typeof value === 'undefined') return 'undefined';
-
- throw $parseMinErr('esc', 'IMPOSSIBLE');
- },
-
- nextId: function(skip, init) {
- var id = 'v' + (this.state.nextId++);
- if (!skip) {
- this.current().vars.push(id + (init ? '=' + init : ''));
- }
- return id;
- },
-
- current: function() {
- return this.state[this.state.computing];
- }
-};
-
-
-function ASTInterpreter(astBuilder, $filter) {
- this.astBuilder = astBuilder;
- this.$filter = $filter;
-}
-
-ASTInterpreter.prototype = {
- compile: function(expression, expensiveChecks) {
- var self = this;
- var ast = this.astBuilder.ast(expression);
- this.expression = expression;
- this.expensiveChecks = expensiveChecks;
- findConstantAndWatchExpressions(ast, self.$filter);
- var assignable;
- var assign;
- if ((assignable = assignableAST(ast))) {
- assign = this.recurse(assignable);
- }
- var toWatch = getInputs(ast.body);
- var inputs;
- if (toWatch) {
- inputs = [];
- forEach(toWatch, function(watch, key) {
- var input = self.recurse(watch);
- watch.input = input;
- inputs.push(input);
- watch.watchId = key;
- });
- }
- var expressions = [];
- forEach(ast.body, function(expression) {
- expressions.push(self.recurse(expression.expression));
- });
- var fn = ast.body.length === 0 ? function() {} :
- ast.body.length === 1 ? expressions[0] :
- function(scope, locals) {
- var lastValue;
- forEach(expressions, function(exp) {
- lastValue = exp(scope, locals);
- });
- return lastValue;
- };
- if (assign) {
- fn.assign = function(scope, value, locals) {
- return assign(scope, locals, value);
- };
- }
- if (inputs) {
- fn.inputs = inputs;
- }
- fn.literal = isLiteral(ast);
- fn.constant = isConstant(ast);
- return fn;
- },
-
- recurse: function(ast, context, create) {
- var left, right, self = this, args, expression;
- if (ast.input) {
- return this.inputs(ast.input, ast.watchId);
- }
- switch (ast.type) {
- case AST.Literal:
- return this.value(ast.value, context);
- case AST.UnaryExpression:
- right = this.recurse(ast.argument);
- return this['unary' + ast.operator](right, context);
- case AST.BinaryExpression:
- left = this.recurse(ast.left);
- right = this.recurse(ast.right);
- return this['binary' + ast.operator](left, right, context);
- case AST.LogicalExpression:
- left = this.recurse(ast.left);
- right = this.recurse(ast.right);
- return this['binary' + ast.operator](left, right, context);
- case AST.ConditionalExpression:
- return this['ternary?:'](
- this.recurse(ast.test),
- this.recurse(ast.alternate),
- this.recurse(ast.consequent),
- context
- );
- case AST.Identifier:
- ensureSafeMemberName(ast.name, self.expression);
- return self.identifier(ast.name,
- self.expensiveChecks || isPossiblyDangerousMemberName(ast.name),
- context, create, self.expression);
- case AST.MemberExpression:
- left = this.recurse(ast.object, false, !!create);
- if (!ast.computed) {
- ensureSafeMemberName(ast.property.name, self.expression);
- right = ast.property.name;
- }
- if (ast.computed) right = this.recurse(ast.property);
- return ast.computed ?
- this.computedMember(left, right, context, create, self.expression) :
- this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression);
- case AST.CallExpression:
- args = [];
- forEach(ast.arguments, function(expr) {
- args.push(self.recurse(expr));
- });
- if (ast.filter) right = this.$filter(ast.callee.name);
- if (!ast.filter) right = this.recurse(ast.callee, true);
- return ast.filter ?
- function(scope, locals, assign, inputs) {
- var values = [];
- for (var i = 0; i < args.length; ++i) {
- values.push(args[i](scope, locals, assign, inputs));
- }
- var value = right.apply(undefined, values, inputs);
- return context ? {context: undefined, name: undefined, value: value} : value;
- } :
- function(scope, locals, assign, inputs) {
- var rhs = right(scope, locals, assign, inputs);
- var value;
- if (rhs.value != null) {
- ensureSafeObject(rhs.context, self.expression);
- ensureSafeFunction(rhs.value, self.expression);
- var values = [];
- for (var i = 0; i < args.length; ++i) {
- values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression));
- }
- value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression);
- }
- return context ? {value: value} : value;
- };
- case AST.AssignmentExpression:
- left = this.recurse(ast.left, true, 1);
- right = this.recurse(ast.right);
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- ensureSafeObject(lhs.value, self.expression);
- ensureSafeAssignContext(lhs.context);
- lhs.context[lhs.name] = rhs;
- return context ? {value: rhs} : rhs;
- };
- case AST.ArrayExpression:
- args = [];
- forEach(ast.elements, function(expr) {
- args.push(self.recurse(expr));
- });
- return function(scope, locals, assign, inputs) {
- var value = [];
- for (var i = 0; i < args.length; ++i) {
- value.push(args[i](scope, locals, assign, inputs));
- }
- return context ? {value: value} : value;
- };
- case AST.ObjectExpression:
- args = [];
- forEach(ast.properties, function(property) {
- args.push({key: property.key.type === AST.Identifier ?
- property.key.name :
- ('' + property.key.value),
- value: self.recurse(property.value)
- });
- });
- return function(scope, locals, assign, inputs) {
- var value = {};
- for (var i = 0; i < args.length; ++i) {
- value[args[i].key] = args[i].value(scope, locals, assign, inputs);
- }
- return context ? {value: value} : value;
- };
- case AST.ThisExpression:
- return function(scope) {
- return context ? {value: scope} : scope;
- };
- case AST.NGValueParameter:
- return function(scope, locals, assign, inputs) {
- return context ? {value: assign} : assign;
- };
- }
- },
-
- 'unary+': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = argument(scope, locals, assign, inputs);
- if (isDefined(arg)) {
- arg = +arg;
- } else {
- arg = 0;
- }
- return context ? {value: arg} : arg;
- };
- },
- 'unary-': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = argument(scope, locals, assign, inputs);
- if (isDefined(arg)) {
- arg = -arg;
- } else {
- arg = 0;
- }
- return context ? {value: arg} : arg;
- };
- },
- 'unary!': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = !argument(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary+': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- var arg = plusFn(lhs, rhs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary-': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);
- return context ? {value: arg} : arg;
- };
- },
- 'binary*': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary/': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary%': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary===': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary!==': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary==': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary!=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary<': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary>': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary<=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary>=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary&&': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary||': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'ternary?:': function(test, alternate, consequent, context) {
- return function(scope, locals, assign, inputs) {
- var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- value: function(value, context) {
- return function() { return context ? {context: undefined, name: undefined, value: value} : value; };
- },
- identifier: function(name, expensiveChecks, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var base = locals && (name in locals) ? locals : scope;
- if (create && create !== 1 && base && !(base[name])) {
- base[name] = {};
- }
- var value = base ? base[name] : undefined;
- if (expensiveChecks) {
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: base, name: name, value: value};
- } else {
- return value;
- }
- };
- },
- computedMember: function(left, right, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs;
- var value;
- if (lhs != null) {
- rhs = right(scope, locals, assign, inputs);
- rhs = getStringValue(rhs);
- ensureSafeMemberName(rhs, expression);
- if (create && create !== 1 && lhs && !(lhs[rhs])) {
- lhs[rhs] = {};
- }
- value = lhs[rhs];
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: lhs, name: rhs, value: value};
- } else {
- return value;
- }
- };
- },
- nonComputedMember: function(left, right, expensiveChecks, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- if (create && create !== 1 && lhs && !(lhs[right])) {
- lhs[right] = {};
- }
- var value = lhs != null ? lhs[right] : undefined;
- if (expensiveChecks || isPossiblyDangerousMemberName(right)) {
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: lhs, name: right, value: value};
- } else {
- return value;
- }
- };
- },
- inputs: function(input, watchId) {
- return function(scope, value, locals, inputs) {
- if (inputs) return inputs[watchId];
- return input(scope, value, locals);
- };
- }
-};
-
-/**
- * @constructor
- */
-var Parser = function(lexer, $filter, options) {
- this.lexer = lexer;
- this.$filter = $filter;
- this.options = options;
- this.ast = new AST(this.lexer);
- this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) :
- new ASTCompiler(this.ast, $filter);
-};
-
-Parser.prototype = {
- constructor: Parser,
-
- parse: function(text) {
- return this.astCompiler.compile(text, this.options.expensiveChecks);
- }
-};
-
-var getterFnCacheDefault = createMap();
-var getterFnCacheExpensive = createMap();
-
-function isPossiblyDangerousMemberName(name) {
- return name == 'constructor';
-}
-
-var objectValueOf = Object.prototype.valueOf;
-
-function getValueOf(value) {
- return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);
-}
-
-///////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $parse
- * @kind function
- *
- * @description
- *
- * Converts Angular {@link guide/expression expression} into a function.
- *
- * ```js
- * var getter = $parse('user.name');
- * var setter = getter.assign;
- * var context = {user:{name:'angular'}};
- * var locals = {user:{name:'local'}};
- *
- * expect(getter(context)).toEqual('angular');
- * setter(context, 'newValue');
- * expect(context.user.name).toEqual('newValue');
- * expect(getter(context, locals)).toEqual('local');
- * ```
- *
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- *
- * The returned function also has the following properties:
- * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript
- * literal.
- * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript
- * constant literals.
- * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be
- * set to a function to change its value on the given context.
- *
- */
-
-
-/**
- * @ngdoc provider
- * @name $parseProvider
- *
- * @description
- * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}
- * service.
- */
-function $ParseProvider() {
- var cacheDefault = createMap();
- var cacheExpensive = createMap();
-
- this.$get = ['$filter', function($filter) {
- var noUnsafeEval = csp().noUnsafeEval;
- var $parseOptions = {
- csp: noUnsafeEval,
- expensiveChecks: false
- },
- $parseOptionsExpensive = {
- csp: noUnsafeEval,
- expensiveChecks: true
- };
-
- return function $parse(exp, interceptorFn, expensiveChecks) {
- var parsedExpression, oneTime, cacheKey;
-
- switch (typeof exp) {
- case 'string':
- exp = exp.trim();
- cacheKey = exp;
-
- var cache = (expensiveChecks ? cacheExpensive : cacheDefault);
- parsedExpression = cache[cacheKey];
-
- if (!parsedExpression) {
- if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {
- oneTime = true;
- exp = exp.substring(2);
- }
- var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;
- var lexer = new Lexer(parseOptions);
- var parser = new Parser(lexer, $filter, parseOptions);
- parsedExpression = parser.parse(exp);
- if (parsedExpression.constant) {
- parsedExpression.$$watchDelegate = constantWatchDelegate;
- } else if (oneTime) {
- parsedExpression.$$watchDelegate = parsedExpression.literal ?
- oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;
- } else if (parsedExpression.inputs) {
- parsedExpression.$$watchDelegate = inputsWatchDelegate;
- }
- cache[cacheKey] = parsedExpression;
- }
- return addInterceptor(parsedExpression, interceptorFn);
-
- case 'function':
- return addInterceptor(exp, interceptorFn);
-
- default:
- return noop;
- }
- };
-
- function expressionInputDirtyCheck(newValue, oldValueOfValue) {
-
- if (newValue == null || oldValueOfValue == null) { // null/undefined
- return newValue === oldValueOfValue;
- }
-
- if (typeof newValue === 'object') {
-
- // attempt to convert the value to a primitive type
- // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can
- // be cheaply dirty-checked
- newValue = getValueOf(newValue);
-
- if (typeof newValue === 'object') {
- // objects/arrays are not supported - deep-watching them would be too expensive
- return false;
- }
-
- // fall-through to the primitive equality check
- }
-
- //Primitive or NaN
- return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);
- }
-
- function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {
- var inputExpressions = parsedExpression.inputs;
- var lastResult;
-
- if (inputExpressions.length === 1) {
- var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails
- inputExpressions = inputExpressions[0];
- return scope.$watch(function expressionInputWatch(scope) {
- var newInputValue = inputExpressions(scope);
- if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) {
- lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);
- oldInputValueOf = newInputValue && getValueOf(newInputValue);
- }
- return lastResult;
- }, listener, objectEquality, prettyPrintExpression);
- }
-
- var oldInputValueOfValues = [];
- var oldInputValues = [];
- for (var i = 0, ii = inputExpressions.length; i < ii; i++) {
- oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails
- oldInputValues[i] = null;
- }
-
- return scope.$watch(function expressionInputsWatch(scope) {
- var changed = false;
-
- for (var i = 0, ii = inputExpressions.length; i < ii; i++) {
- var newInputValue = inputExpressions[i](scope);
- if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {
- oldInputValues[i] = newInputValue;
- oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);
- }
- }
-
- if (changed) {
- lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);
- }
-
- return lastResult;
- }, listener, objectEquality, prettyPrintExpression);
- }
-
- function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch, lastValue;
- return unwatch = scope.$watch(function oneTimeWatch(scope) {
- return parsedExpression(scope);
- }, function oneTimeListener(value, old, scope) {
- lastValue = value;
- if (isFunction(listener)) {
- listener.apply(this, arguments);
- }
- if (isDefined(value)) {
- scope.$$postDigest(function() {
- if (isDefined(lastValue)) {
- unwatch();
- }
- });
- }
- }, objectEquality);
- }
-
- function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch, lastValue;
- return unwatch = scope.$watch(function oneTimeWatch(scope) {
- return parsedExpression(scope);
- }, function oneTimeListener(value, old, scope) {
- lastValue = value;
- if (isFunction(listener)) {
- listener.call(this, value, old, scope);
- }
- if (isAllDefined(value)) {
- scope.$$postDigest(function() {
- if (isAllDefined(lastValue)) unwatch();
- });
- }
- }, objectEquality);
-
- function isAllDefined(value) {
- var allDefined = true;
- forEach(value, function(val) {
- if (!isDefined(val)) allDefined = false;
- });
- return allDefined;
- }
- }
-
- function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch;
- return unwatch = scope.$watch(function constantWatch(scope) {
- return parsedExpression(scope);
- }, function constantListener(value, old, scope) {
- if (isFunction(listener)) {
- listener.apply(this, arguments);
- }
- unwatch();
- }, objectEquality);
- }
-
- function addInterceptor(parsedExpression, interceptorFn) {
- if (!interceptorFn) return parsedExpression;
- var watchDelegate = parsedExpression.$$watchDelegate;
- var useInputs = false;
-
- var regularWatch =
- watchDelegate !== oneTimeLiteralWatchDelegate &&
- watchDelegate !== oneTimeWatchDelegate;
-
- var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {
- var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);
- return interceptorFn(value, scope, locals);
- } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {
- var value = parsedExpression(scope, locals, assign, inputs);
- var result = interceptorFn(value, scope, locals);
- // we only return the interceptor's result if the
- // initial value is defined (for bind-once)
- return isDefined(value) ? result : value;
- };
-
- // Propagate $$watchDelegates other then inputsWatchDelegate
- if (parsedExpression.$$watchDelegate &&
- parsedExpression.$$watchDelegate !== inputsWatchDelegate) {
- fn.$$watchDelegate = parsedExpression.$$watchDelegate;
- } else if (!interceptorFn.$stateful) {
- // If there is an interceptor, but no watchDelegate then treat the interceptor like
- // we treat filters - it is assumed to be a pure function unless flagged with $stateful
- fn.$$watchDelegate = inputsWatchDelegate;
- useInputs = !parsedExpression.inputs;
- fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];
- }
-
- return fn;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $q
- * @requires $rootScope
- *
- * @description
- * A service that helps you run functions asynchronously, and use their return values (or exceptions)
- * when they are done processing.
- *
- * This is an implementation of promises/deferred objects inspired by
- * [Kris Kowal's Q](https://github.com/kriskowal/q).
- *
- * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred
- * implementations, and the other which resembles ES6 promises to some degree.
- *
- * # $q constructor
- *
- * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`
- * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,
- * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
- *
- * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are
- * available yet.
- *
- * It can be used like so:
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * // perform some asynchronous operation, resolve or reject the promise when appropriate.
- * return $q(function(resolve, reject) {
- * setTimeout(function() {
- * if (okToGreet(name)) {
- * resolve('Hello, ' + name + '!');
- * } else {
- * reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- * });
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * });
- * ```
- *
- * Note: progress/notify callbacks are not currently supported via the ES6-style interface.
- *
- * Note: unlike ES6 behaviour, an exception thrown in the constructor function will NOT implicitly reject the promise.
- *
- * However, the more traditional CommonJS-style usage is still available, and documented below.
- *
- * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
- * interface for interacting with an object that represents the result of an action that is
- * performed asynchronously, and may or may not be finished at any given point in time.
- *
- * From the perspective of dealing with error handling, deferred and promise APIs are to
- * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * var deferred = $q.defer();
- *
- * setTimeout(function() {
- * deferred.notify('About to greet ' + name + '.');
- *
- * if (okToGreet(name)) {
- * deferred.resolve('Hello, ' + name + '!');
- * } else {
- * deferred.reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- *
- * return deferred.promise;
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * }, function(update) {
- * alert('Got notification: ' + update);
- * });
- * ```
- *
- * At first it might not be obvious why this extra complexity is worth the trouble. The payoff
- * comes in the way of guarantees that promise and deferred APIs make, see
- * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.
- *
- * Additionally the promise api allows for composition that is very hard to do with the
- * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.
- * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the
- * section on serial or parallel joining of promises.
- *
- * # The Deferred API
- *
- * A new instance of deferred is constructed by calling `$q.defer()`.
- *
- * The purpose of the deferred object is to expose the associated Promise instance as well as APIs
- * that can be used for signaling the successful or unsuccessful completion, as well as the status
- * of the task.
- *
- * **Methods**
- *
- * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection
- * constructed via `$q.reject`, the promise will be rejected instead.
- * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to
- * resolving it with a rejection constructed via `$q.reject`.
- * - `notify(value)` - provides updates on the status of the promise's execution. This may be called
- * multiple times before the promise is either resolved or rejected.
- *
- * **Properties**
- *
- * - promise – `{Promise}` – promise object associated with this deferred.
- *
- *
- * # The Promise API
- *
- * A new promise instance is created when a deferred instance is created and can be retrieved by
- * calling `deferred.promise`.
- *
- * The purpose of the promise object is to allow for interested parties to get access to the result
- * of the deferred task when it completes.
- *
- * **Methods**
- *
- * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
- * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
- * as soon as the result is available. The callbacks are called with a single argument: the result
- * or rejection reason. Additionally, the notify callback may be called zero or more times to
- * provide a progress indication, before the promise is resolved or rejected.
- *
- * This method *returns a new promise* which is resolved or rejected via the return value of the
- * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved
- * with the value which is resolved in that promise using
- * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
- * It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method.
- *
- * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
- *
- * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise,
- * but to do so without modifying the final value. This is useful to release resources or do some
- * clean-up that needs to be done whether the promise was rejected or resolved. See the [full
- * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for
- * more information.
- *
- * # Chaining promises
- *
- * Because calling the `then` method of a promise returns a new derived promise, it is easily
- * possible to create a chain of promises:
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * return result + 1;
- * });
- *
- * // promiseB will be resolved immediately after promiseA is resolved and its value
- * // will be the result of promiseA incremented by 1
- * ```
- *
- * It is possible to create chains of any length and since a promise can be resolved with another
- * promise (which will defer its resolution further), it is possible to pause/defer resolution of
- * the promises at any point in the chain. This makes it possible to implement powerful APIs like
- * $http's response interceptors.
- *
- *
- * # Differences between Kris Kowal's Q and $q
- *
- * There are two main differences:
- *
- * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation
- * mechanism in angular, which means faster propagation of resolution or rejection into your
- * models and avoiding unnecessary browser repaints, which would result in flickering UI.
- * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains
- * all the important functionality needed for common async tasks.
- *
- * # Testing
- *
- * ```js
- * it('should simulate promise', inject(function($q, $rootScope) {
- * var deferred = $q.defer();
- * var promise = deferred.promise;
- * var resolvedValue;
- *
- * promise.then(function(value) { resolvedValue = value; });
- * expect(resolvedValue).toBeUndefined();
- *
- * // Simulate resolving of promise
- * deferred.resolve(123);
- * // Note that the 'then' function does not get called synchronously.
- * // This is because we want the promise API to always be async, whether or not
- * // it got called synchronously or asynchronously.
- * expect(resolvedValue).toBeUndefined();
- *
- * // Propagate promise resolution to 'then' functions using $apply().
- * $rootScope.$apply();
- * expect(resolvedValue).toEqual(123);
- * }));
- * ```
- *
- * @param {function(function, function)} resolver Function which is responsible for resolving or
- * rejecting the newly created promise. The first parameter is a function which resolves the
- * promise, the second parameter is a function which rejects the promise.
- *
- * @returns {Promise} The newly created promise.
- */
-function $QProvider() {
-
- this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
- return qFactory(function(callback) {
- $rootScope.$evalAsync(callback);
- }, $exceptionHandler);
- }];
-}
-
-function $$QProvider() {
- this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {
- return qFactory(function(callback) {
- $browser.defer(callback);
- }, $exceptionHandler);
- }];
-}
-
-/**
- * Constructs a promise manager.
- *
- * @param {function(function)} nextTick Function for executing functions in the next turn.
- * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
- * debugging purposes.
- * @returns {object} Promise manager.
- */
-function qFactory(nextTick, exceptionHandler) {
- var $qMinErr = minErr('$q', TypeError);
- function callOnce(self, resolveFn, rejectFn) {
- var called = false;
- function wrap(fn) {
- return function(value) {
- if (called) return;
- called = true;
- fn.call(self, value);
- };
- }
-
- return [wrap(resolveFn), wrap(rejectFn)];
- }
-
- /**
- * @ngdoc method
- * @name ng.$q#defer
- * @kind function
- *
- * @description
- * Creates a `Deferred` object which represents a task which will finish in the future.
- *
- * @returns {Deferred} Returns a new instance of deferred.
- */
- var defer = function() {
- return new Deferred();
- };
-
- function Promise() {
- this.$$state = { status: 0 };
- }
-
- extend(Promise.prototype, {
- then: function(onFulfilled, onRejected, progressBack) {
- if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {
- return this;
- }
- var result = new Deferred();
-
- this.$$state.pending = this.$$state.pending || [];
- this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);
- if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);
-
- return result.promise;
- },
-
- "catch": function(callback) {
- return this.then(null, callback);
- },
-
- "finally": function(callback, progressBack) {
- return this.then(function(value) {
- return handleCallback(value, true, callback);
- }, function(error) {
- return handleCallback(error, false, callback);
- }, progressBack);
- }
- });
-
- //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native
- function simpleBind(context, fn) {
- return function(value) {
- fn.call(context, value);
- };
- }
-
- function processQueue(state) {
- var fn, deferred, pending;
-
- pending = state.pending;
- state.processScheduled = false;
- state.pending = undefined;
- for (var i = 0, ii = pending.length; i < ii; ++i) {
- deferred = pending[i][0];
- fn = pending[i][state.status];
- try {
- if (isFunction(fn)) {
- deferred.resolve(fn(state.value));
- } else if (state.status === 1) {
- deferred.resolve(state.value);
- } else {
- deferred.reject(state.value);
- }
- } catch (e) {
- deferred.reject(e);
- exceptionHandler(e);
- }
- }
- }
-
- function scheduleProcessQueue(state) {
- if (state.processScheduled || !state.pending) return;
- state.processScheduled = true;
- nextTick(function() { processQueue(state); });
- }
-
- function Deferred() {
- this.promise = new Promise();
- //Necessary to support unbound execution :/
- this.resolve = simpleBind(this, this.resolve);
- this.reject = simpleBind(this, this.reject);
- this.notify = simpleBind(this, this.notify);
- }
-
- extend(Deferred.prototype, {
- resolve: function(val) {
- if (this.promise.$$state.status) return;
- if (val === this.promise) {
- this.$$reject($qMinErr(
- 'qcycle',
- "Expected promise to be resolved with value other than itself '{0}'",
- val));
- } else {
- this.$$resolve(val);
- }
-
- },
-
- $$resolve: function(val) {
- var then, fns;
-
- fns = callOnce(this, this.$$resolve, this.$$reject);
- try {
- if ((isObject(val) || isFunction(val))) then = val && val.then;
- if (isFunction(then)) {
- this.promise.$$state.status = -1;
- then.call(val, fns[0], fns[1], this.notify);
- } else {
- this.promise.$$state.value = val;
- this.promise.$$state.status = 1;
- scheduleProcessQueue(this.promise.$$state);
- }
- } catch (e) {
- fns[1](e);
- exceptionHandler(e);
- }
- },
-
- reject: function(reason) {
- if (this.promise.$$state.status) return;
- this.$$reject(reason);
- },
-
- $$reject: function(reason) {
- this.promise.$$state.value = reason;
- this.promise.$$state.status = 2;
- scheduleProcessQueue(this.promise.$$state);
- },
-
- notify: function(progress) {
- var callbacks = this.promise.$$state.pending;
-
- if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {
- nextTick(function() {
- var callback, result;
- for (var i = 0, ii = callbacks.length; i < ii; i++) {
- result = callbacks[i][0];
- callback = callbacks[i][3];
- try {
- result.notify(isFunction(callback) ? callback(progress) : progress);
- } catch (e) {
- exceptionHandler(e);
- }
- }
- });
- }
- }
- });
-
- /**
- * @ngdoc method
- * @name $q#reject
- * @kind function
- *
- * @description
- * Creates a promise that is resolved as rejected with the specified `reason`. This api should be
- * used to forward rejection in a chain of promises. If you are dealing with the last promise in
- * a promise chain, you don't need to worry about it.
- *
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of
- * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via
- * a promise error callback and you want to forward the error to the promise derived from the
- * current promise, you have to "rethrow" the error by returning a rejection constructed via
- * `reject`.
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * // success: do something and resolve promiseB
- * // with the old or a new result
- * return result;
- * }, function(reason) {
- * // error: handle the error if possible and
- * // resolve promiseB with newPromiseOrValue,
- * // otherwise forward the rejection to promiseB
- * if (canHandle(reason)) {
- * // handle the error and recover
- * return newPromiseOrValue;
- * }
- * return $q.reject(reason);
- * });
- * ```
- *
- * @param {*} reason Constant, message, exception or an object representing the rejection reason.
- * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.
- */
- var reject = function(reason) {
- var result = new Deferred();
- result.reject(reason);
- return result.promise;
- };
-
- var makePromise = function makePromise(value, resolved) {
- var result = new Deferred();
- if (resolved) {
- result.resolve(value);
- } else {
- result.reject(value);
- }
- return result.promise;
- };
-
- var handleCallback = function handleCallback(value, isResolved, callback) {
- var callbackOutput = null;
- try {
- if (isFunction(callback)) callbackOutput = callback();
- } catch (e) {
- return makePromise(e, false);
- }
- if (isPromiseLike(callbackOutput)) {
- return callbackOutput.then(function() {
- return makePromise(value, isResolved);
- }, function(error) {
- return makePromise(error, false);
- });
- } else {
- return makePromise(value, isResolved);
- }
- };
-
- /**
- * @ngdoc method
- * @name $q#when
- * @kind function
- *
- * @description
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
- * This is useful when you are dealing with an object that might or might not be a promise, or if
- * the promise comes from a source that can't be trusted.
- *
- * @param {*} value Value or a promise
- * @param {Function=} successCallback
- * @param {Function=} errorCallback
- * @param {Function=} progressCallback
- * @returns {Promise} Returns a promise of the passed value or promise
- */
-
-
- var when = function(value, callback, errback, progressBack) {
- var result = new Deferred();
- result.resolve(value);
- return result.promise.then(callback, errback, progressBack);
- };
-
- /**
- * @ngdoc method
- * @name $q#resolve
- * @kind function
- *
- * @description
- * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.
- *
- * @param {*} value Value or a promise
- * @param {Function=} successCallback
- * @param {Function=} errorCallback
- * @param {Function=} progressCallback
- * @returns {Promise} Returns a promise of the passed value or promise
- */
- var resolve = when;
-
- /**
- * @ngdoc method
- * @name $q#all
- * @kind function
- *
- * @description
- * Combines multiple promises into a single promise that is resolved when all of the input
- * promises are resolved.
- *
- * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.
- * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,
- * each value corresponding to the promise at the same index/key in the `promises` array/hash.
- * If any of the promises is resolved with a rejection, this resulting promise will be rejected
- * with the same rejection value.
- */
-
- function all(promises) {
- var deferred = new Deferred(),
- counter = 0,
- results = isArray(promises) ? [] : {};
-
- forEach(promises, function(promise, key) {
- counter++;
- when(promise).then(function(value) {
- if (results.hasOwnProperty(key)) return;
- results[key] = value;
- if (!(--counter)) deferred.resolve(results);
- }, function(reason) {
- if (results.hasOwnProperty(key)) return;
- deferred.reject(reason);
- });
- });
-
- if (counter === 0) {
- deferred.resolve(results);
- }
-
- return deferred.promise;
- }
-
- var $Q = function Q(resolver) {
- if (!isFunction(resolver)) {
- throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
- }
-
- if (!(this instanceof Q)) {
- // More useful when $Q is the Promise itself.
- return new Q(resolver);
- }
-
- var deferred = new Deferred();
-
- function resolveFn(value) {
- deferred.resolve(value);
- }
-
- function rejectFn(reason) {
- deferred.reject(reason);
- }
-
- resolver(resolveFn, rejectFn);
-
- return deferred.promise;
- };
-
- $Q.defer = defer;
- $Q.reject = reject;
- $Q.when = when;
- $Q.resolve = resolve;
- $Q.all = all;
-
- return $Q;
-}
-
-function $$RAFProvider() { //rAF
- this.$get = ['$window', '$timeout', function($window, $timeout) {
- var requestAnimationFrame = $window.requestAnimationFrame ||
- $window.webkitRequestAnimationFrame;
-
- var cancelAnimationFrame = $window.cancelAnimationFrame ||
- $window.webkitCancelAnimationFrame ||
- $window.webkitCancelRequestAnimationFrame;
-
- var rafSupported = !!requestAnimationFrame;
- var raf = rafSupported
- ? function(fn) {
- var id = requestAnimationFrame(fn);
- return function() {
- cancelAnimationFrame(id);
- };
- }
- : function(fn) {
- var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666
- return function() {
- $timeout.cancel(timer);
- };
- };
-
- raf.supported = rafSupported;
-
- return raf;
- }];
-}
-
-/**
- * DESIGN NOTES
- *
- * The design decisions behind the scope are heavily favored for speed and memory consumption.
- *
- * The typical use of scope is to watch the expressions, which most of the time return the same
- * value as last time so we optimize the operation.
- *
- * Closures construction is expensive in terms of speed as well as memory:
- * - No closures, instead use prototypical inheritance for API
- * - Internal state needs to be stored on scope directly, which means that private state is
- * exposed as $$____ properties
- *
- * Loop operations are optimized by using while(count--) { ... }
- * - This means that in order to keep the same order of execution as addition we have to add
- * items to the array at the beginning (unshift) instead of at the end (push)
- *
- * Child scopes are created and removed often
- * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists
- *
- * There are fewer watches than observers. This is why you don't want the observer to be implemented
- * in the same way as watch. Watch requires return of the initialization function which is expensive
- * to construct.
- */
-
-
-/**
- * @ngdoc provider
- * @name $rootScopeProvider
- * @description
- *
- * Provider for the $rootScope service.
- */
-
-/**
- * @ngdoc method
- * @name $rootScopeProvider#digestTtl
- * @description
- *
- * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and
- * assuming that the model is unstable.
- *
- * The current default is 10 iterations.
- *
- * In complex applications it's possible that the dependencies between `$watch`s will result in
- * several digest iterations. However if an application needs more than the default 10 digest
- * iterations for its model to stabilize then you should investigate what is causing the model to
- * continuously change during the digest.
- *
- * Increasing the TTL could have performance implications, so you should not change it without
- * proper justification.
- *
- * @param {number} limit The number of digest iterations.
- */
-
-
-/**
- * @ngdoc service
- * @name $rootScope
- * @description
- *
- * Every application has a single root {@link ng.$rootScope.Scope scope}.
- * All other scopes are descendant scopes of the root scope. Scopes provide separation
- * between the model and the view, via a mechanism for watching the model for changes.
- * They also provide event emission/broadcast and subscription facility. See the
- * {@link guide/scope developer guide on scopes}.
- */
-function $RootScopeProvider() {
- var TTL = 10;
- var $rootScopeMinErr = minErr('$rootScope');
- var lastDirtyWatch = null;
- var applyAsyncId = null;
-
- this.digestTtl = function(value) {
- if (arguments.length) {
- TTL = value;
- }
- return TTL;
- };
-
- function createChildScopeClass(parent) {
- function ChildScope() {
- this.$$watchers = this.$$nextSibling =
- this.$$childHead = this.$$childTail = null;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$watchersCount = 0;
- this.$id = nextUid();
- this.$$ChildScope = null;
- }
- ChildScope.prototype = parent;
- return ChildScope;
- }
-
- this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',
- function($injector, $exceptionHandler, $parse, $browser) {
-
- function destroyChildScope($event) {
- $event.currentScope.$$destroyed = true;
- }
-
- function cleanUpScope($scope) {
-
- if (msie === 9) {
- // There is a memory leak in IE9 if all child scopes are not disconnected
- // completely when a scope is destroyed. So this code will recurse up through
- // all this scopes children
- //
- // See issue https://github.com/angular/angular.js/issues/10706
- $scope.$$childHead && cleanUpScope($scope.$$childHead);
- $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);
- }
-
- // The code below works around IE9 and V8's memory leaks
- //
- // See:
- // - https://code.google.com/p/v8/issues/detail?id=2073#c26
- // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
- // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
-
- $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =
- $scope.$$childTail = $scope.$root = $scope.$$watchers = null;
- }
-
- /**
- * @ngdoc type
- * @name $rootScope.Scope
- *
- * @description
- * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
- * {@link auto.$injector $injector}. Child scopes are created using the
- * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
- * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for
- * an in-depth introduction and usage examples.
- *
- *
- * # Inheritance
- * A scope can inherit from a parent scope, as in this example:
- * ```js
- var parent = $rootScope;
- var child = parent.$new();
-
- parent.salutation = "Hello";
- expect(child.salutation).toEqual('Hello');
-
- child.salutation = "Welcome";
- expect(child.salutation).toEqual('Welcome');
- expect(parent.salutation).toEqual('Hello');
- * ```
- *
- * When interacting with `Scope` in tests, additional helper methods are available on the
- * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional
- * details.
- *
- *
- * @param {Object.<string, function()>=} providers Map of service factory which need to be
- * provided for the current scope. Defaults to {@link ng}.
- * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
- * append/override services provided by `providers`. This is handy
- * when unit-testing and having the need to override a default
- * service.
- * @returns {Object} Newly created scope.
- *
- */
- function Scope() {
- this.$id = nextUid();
- this.$$phase = this.$parent = this.$$watchers =
- this.$$nextSibling = this.$$prevSibling =
- this.$$childHead = this.$$childTail = null;
- this.$root = this;
- this.$$destroyed = false;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$watchersCount = 0;
- this.$$isolateBindings = null;
- }
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$id
- *
- * @description
- * Unique scope ID (monotonically increasing) useful for debugging.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$parent
- *
- * @description
- * Reference to the parent scope.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$root
- *
- * @description
- * Reference to the root scope.
- */
-
- Scope.prototype = {
- constructor: Scope,
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$new
- * @kind function
- *
- * @description
- * Creates a new child {@link ng.$rootScope.Scope scope}.
- *
- * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.
- * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
- *
- * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is
- * desired for the scope and its child scopes to be permanently detached from the parent and
- * thus stop participating in model change detection and listener notification by invoking.
- *
- * @param {boolean} isolate If true, then the scope does not prototypically inherit from the
- * parent scope. The scope is isolated, as it can not see parent scope properties.
- * When creating widgets, it is useful for the widget to not accidentally read parent
- * state.
- *
- * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`
- * of the newly created scope. Defaults to `this` scope if not provided.
- * This is used when creating a transclude scope to correctly place it
- * in the scope hierarchy while maintaining the correct prototypical
- * inheritance.
- *
- * @returns {Object} The newly created child scope.
- *
- */
- $new: function(isolate, parent) {
- var child;
-
- parent = parent || this;
-
- if (isolate) {
- child = new Scope();
- child.$root = this.$root;
- } else {
- // Only create a child scope class if somebody asks for one,
- // but cache it to allow the VM to optimize lookups.
- if (!this.$$ChildScope) {
- this.$$ChildScope = createChildScopeClass(this);
- }
- child = new this.$$ChildScope();
- }
- child.$parent = parent;
- child.$$prevSibling = parent.$$childTail;
- if (parent.$$childHead) {
- parent.$$childTail.$$nextSibling = child;
- parent.$$childTail = child;
- } else {
- parent.$$childHead = parent.$$childTail = child;
- }
-
- // When the new scope is not isolated or we inherit from `this`, and
- // the parent scope is destroyed, the property `$$destroyed` is inherited
- // prototypically. In all other cases, this property needs to be set
- // when the parent scope is destroyed.
- // The listener needs to be added after the parent is set
- if (isolate || parent != this) child.$on('$destroy', destroyChildScope);
-
- return child;
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watch
- * @kind function
- *
- * @description
- * Registers a `listener` callback to be executed whenever the `watchExpression` changes.
- *
- * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest
- * $digest()} and should return the value that will be watched. (`watchExpression` should not change
- * its value when executed multiple times with the same input because it may be executed multiple
- * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be
- * [idempotent](http://en.wikipedia.org/wiki/Idempotence).
- * - The `listener` is called only when the value from the current `watchExpression` and the
- * previous call to `watchExpression` are not equal (with the exception of the initial run,
- * see below). Inequality is determined according to reference inequality,
- * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
- * via the `!==` Javascript operator, unless `objectEquality == true`
- * (see next point)
- * - When `objectEquality == true`, inequality of the `watchExpression` is determined
- * according to the {@link angular.equals} function. To save the value of the object for
- * later comparison, the {@link angular.copy} function is used. This therefore means that
- * watching complex objects will have adverse memory and performance implications.
- * - The watch `listener` may change the model, which may trigger other `listener`s to fire.
- * This is achieved by rerunning the watchers until no changes are detected. The rerun
- * iteration limit is 10 to prevent an infinite loop deadlock.
- *
- *
- * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
- * you can register a `watchExpression` function with no `listener`. (Be prepared for
- * multiple calls to your `watchExpression` because it will execute multiple times in a
- * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)
- *
- * After a watcher is registered with the scope, the `listener` fn is called asynchronously
- * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
- * watcher. In rare cases, this is undesirable because the listener is called when the result
- * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
- * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
- * listener was called due to initialization.
- *
- *
- *
- * # Example
- * ```js
- // let's assume that scope was dependency injected as the $rootScope
- var scope = $rootScope;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
-
-
-
- // Using a function as a watchExpression
- var food;
- scope.foodCounter = 0;
- expect(scope.foodCounter).toEqual(0);
- scope.$watch(
- // This function returns the value being watched. It is called for each turn of the $digest loop
- function() { return food; },
- // This is the change listener, called when the value returned from the above function changes
- function(newValue, oldValue) {
- if ( newValue !== oldValue ) {
- // Only increment the counter if the value changed
- scope.foodCounter = scope.foodCounter + 1;
- }
- }
- );
- // No digest has been run so the counter will be zero
- expect(scope.foodCounter).toEqual(0);
-
- // Run the digest but since food has not changed count will still be zero
- scope.$digest();
- expect(scope.foodCounter).toEqual(0);
-
- // Update food and run digest. Now the counter will increment
- food = 'cheeseburger';
- scope.$digest();
- expect(scope.foodCounter).toEqual(1);
-
- * ```
- *
- *
- *
- * @param {(function()|string)} watchExpression Expression that is evaluated on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
- * a call to the `listener`.
- *
- * - `string`: Evaluated as {@link guide/expression expression}
- * - `function(scope)`: called with current `scope` as a parameter.
- * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value
- * of `watchExpression` changes.
- *
- * - `newVal` contains the current value of the `watchExpression`
- * - `oldVal` contains the previous value of the `watchExpression`
- * - `scope` refers to the current scope
- * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
- * comparing for reference equality.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {
- var get = $parse(watchExp);
-
- if (get.$$watchDelegate) {
- return get.$$watchDelegate(this, listener, objectEquality, get, watchExp);
- }
- var scope = this,
- array = scope.$$watchers,
- watcher = {
- fn: listener,
- last: initWatchVal,
- get: get,
- exp: prettyPrintExpression || watchExp,
- eq: !!objectEquality
- };
-
- lastDirtyWatch = null;
-
- if (!isFunction(listener)) {
- watcher.fn = noop;
- }
-
- if (!array) {
- array = scope.$$watchers = [];
- }
- // we use unshift since we use a while loop in $digest for speed.
- // the while loop reads in reverse order.
- array.unshift(watcher);
- incrementWatchersCount(this, 1);
-
- return function deregisterWatch() {
- if (arrayRemove(array, watcher) >= 0) {
- incrementWatchersCount(scope, -1);
- }
- lastDirtyWatch = null;
- };
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchGroup
- * @kind function
- *
- * @description
- * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.
- * If any one expression in the collection changes the `listener` is executed.
- *
- * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every
- * call to $digest() to see if any items changes.
- * - The `listener` is called whenever any expression in the `watchExpressions` array changes.
- *
- * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually
- * watched using {@link ng.$rootScope.Scope#$watch $watch()}
- *
- * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any
- * expression in `watchExpressions` changes
- * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching
- * those of `watchExpression`
- * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching
- * those of `watchExpression`
- * The `scope` refers to the current scope.
- * @returns {function()} Returns a de-registration function for all listeners.
- */
- $watchGroup: function(watchExpressions, listener) {
- var oldValues = new Array(watchExpressions.length);
- var newValues = new Array(watchExpressions.length);
- var deregisterFns = [];
- var self = this;
- var changeReactionScheduled = false;
- var firstRun = true;
-
- if (!watchExpressions.length) {
- // No expressions means we call the listener ASAP
- var shouldCall = true;
- self.$evalAsync(function() {
- if (shouldCall) listener(newValues, newValues, self);
- });
- return function deregisterWatchGroup() {
- shouldCall = false;
- };
- }
-
- if (watchExpressions.length === 1) {
- // Special case size of one
- return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {
- newValues[0] = value;
- oldValues[0] = oldValue;
- listener(newValues, (value === oldValue) ? newValues : oldValues, scope);
- });
- }
-
- forEach(watchExpressions, function(expr, i) {
- var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {
- newValues[i] = value;
- oldValues[i] = oldValue;
- if (!changeReactionScheduled) {
- changeReactionScheduled = true;
- self.$evalAsync(watchGroupAction);
- }
- });
- deregisterFns.push(unwatchFn);
- });
-
- function watchGroupAction() {
- changeReactionScheduled = false;
-
- if (firstRun) {
- firstRun = false;
- listener(newValues, newValues, self);
- } else {
- listener(newValues, oldValues, self);
- }
- }
-
- return function deregisterWatchGroup() {
- while (deregisterFns.length) {
- deregisterFns.shift()();
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchCollection
- * @kind function
- *
- * @description
- * Shallow watches the properties of an object and fires whenever any of the properties change
- * (for arrays, this implies watching the array items; for object maps, this implies watching
- * the properties). If a change is detected, the `listener` callback is fired.
- *
- * - The `obj` collection is observed via standard $watch operation and is examined on every
- * call to $digest() to see if any items have been added, removed, or moved.
- * - The `listener` is called whenever anything within the `obj` has changed. Examples include
- * adding, removing, and moving items belonging to an object or array.
- *
- *
- * # Example
- * ```js
- $scope.names = ['igor', 'matias', 'misko', 'james'];
- $scope.dataCount = 4;
-
- $scope.$watchCollection('names', function(newNames, oldNames) {
- $scope.dataCount = newNames.length;
- });
-
- expect($scope.dataCount).toEqual(4);
- $scope.$digest();
-
- //still at 4 ... no changes
- expect($scope.dataCount).toEqual(4);
-
- $scope.names.pop();
- $scope.$digest();
-
- //now there's been a change
- expect($scope.dataCount).toEqual(3);
- * ```
- *
- *
- * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The
- * expression value should evaluate to an object or an array which is observed on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the
- * collection will trigger a call to the `listener`.
- *
- * @param {function(newCollection, oldCollection, scope)} listener a callback function called
- * when a change is detected.
- * - The `newCollection` object is the newly modified data obtained from the `obj` expression
- * - The `oldCollection` object is a copy of the former collection data.
- * Due to performance considerations, the`oldCollection` value is computed only if the
- * `listener` function declares two or more arguments.
- * - The `scope` argument refers to the current scope.
- *
- * @returns {function()} Returns a de-registration function for this listener. When the
- * de-registration function is executed, the internal watch operation is terminated.
- */
- $watchCollection: function(obj, listener) {
- $watchCollectionInterceptor.$stateful = true;
-
- var self = this;
- // the current value, updated on each dirty-check run
- var newValue;
- // a shallow copy of the newValue from the last dirty-check run,
- // updated to match newValue during dirty-check run
- var oldValue;
- // a shallow copy of the newValue from when the last change happened
- var veryOldValue;
- // only track veryOldValue if the listener is asking for it
- var trackVeryOldValue = (listener.length > 1);
- var changeDetected = 0;
- var changeDetector = $parse(obj, $watchCollectionInterceptor);
- var internalArray = [];
- var internalObject = {};
- var initRun = true;
- var oldLength = 0;
-
- function $watchCollectionInterceptor(_value) {
- newValue = _value;
- var newLength, key, bothNaN, newItem, oldItem;
-
- // If the new value is undefined, then return undefined as the watch may be a one-time watch
- if (isUndefined(newValue)) return;
-
- if (!isObject(newValue)) { // if primitive
- if (oldValue !== newValue) {
- oldValue = newValue;
- changeDetected++;
- }
- } else if (isArrayLike(newValue)) {
- if (oldValue !== internalArray) {
- // we are transitioning from something which was not an array into array.
- oldValue = internalArray;
- oldLength = oldValue.length = 0;
- changeDetected++;
- }
-
- newLength = newValue.length;
-
- if (oldLength !== newLength) {
- // if lengths do not match we need to trigger change notification
- changeDetected++;
- oldValue.length = oldLength = newLength;
- }
- // copy the items to oldValue and look for changes.
- for (var i = 0; i < newLength; i++) {
- oldItem = oldValue[i];
- newItem = newValue[i];
-
- bothNaN = (oldItem !== oldItem) && (newItem !== newItem);
- if (!bothNaN && (oldItem !== newItem)) {
- changeDetected++;
- oldValue[i] = newItem;
- }
- }
- } else {
- if (oldValue !== internalObject) {
- // we are transitioning from something which was not an object into object.
- oldValue = internalObject = {};
- oldLength = 0;
- changeDetected++;
- }
- // copy the items to oldValue and look for changes.
- newLength = 0;
- for (key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- newLength++;
- newItem = newValue[key];
- oldItem = oldValue[key];
-
- if (key in oldValue) {
- bothNaN = (oldItem !== oldItem) && (newItem !== newItem);
- if (!bothNaN && (oldItem !== newItem)) {
- changeDetected++;
- oldValue[key] = newItem;
- }
- } else {
- oldLength++;
- oldValue[key] = newItem;
- changeDetected++;
- }
- }
- }
- if (oldLength > newLength) {
- // we used to have more keys, need to find them and destroy them.
- changeDetected++;
- for (key in oldValue) {
- if (!hasOwnProperty.call(newValue, key)) {
- oldLength--;
- delete oldValue[key];
- }
- }
- }
- }
- return changeDetected;
- }
-
- function $watchCollectionAction() {
- if (initRun) {
- initRun = false;
- listener(newValue, newValue, self);
- } else {
- listener(newValue, veryOldValue, self);
- }
-
- // make a copy for the next time a collection is changed
- if (trackVeryOldValue) {
- if (!isObject(newValue)) {
- //primitive
- veryOldValue = newValue;
- } else if (isArrayLike(newValue)) {
- veryOldValue = new Array(newValue.length);
- for (var i = 0; i < newValue.length; i++) {
- veryOldValue[i] = newValue[i];
- }
- } else { // if object
- veryOldValue = {};
- for (var key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- veryOldValue[key] = newValue[key];
- }
- }
- }
- }
- }
-
- return this.$watch(changeDetector, $watchCollectionAction);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$digest
- * @kind function
- *
- * @description
- * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and
- * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change
- * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}
- * until no more listeners are firing. This means that it is possible to get into an infinite
- * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of
- * iterations exceeds 10.
- *
- * Usually, you don't call `$digest()` directly in
- * {@link ng.directive:ngController controllers} or in
- * {@link ng.$compileProvider#directive directives}.
- * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within
- * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.
- *
- * If you want to be notified whenever `$digest()` is called,
- * you can register a `watchExpression` function with
- * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.
- *
- * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.
- *
- * # Example
- * ```js
- var scope = ...;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
- * ```
- *
- */
- $digest: function() {
- var watch, value, last,
- watchers,
- length,
- dirty, ttl = TTL,
- next, current, target = this,
- watchLog = [],
- logIdx, logMsg, asyncTask;
-
- beginPhase('$digest');
- // Check for changes to browser url that happened in sync before the call to $digest
- $browser.$$checkUrlChange();
-
- if (this === $rootScope && applyAsyncId !== null) {
- // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then
- // cancel the scheduled $apply and flush the queue of expressions to be evaluated.
- $browser.defer.cancel(applyAsyncId);
- flushApplyAsync();
- }
-
- lastDirtyWatch = null;
-
- do { // "while dirty" loop
- dirty = false;
- current = target;
-
- while (asyncQueue.length) {
- try {
- asyncTask = asyncQueue.shift();
- asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);
- } catch (e) {
- $exceptionHandler(e);
- }
- lastDirtyWatch = null;
- }
-
- traverseScopesLoop:
- do { // "traverse the scopes" loop
- if ((watchers = current.$$watchers)) {
- // process our watches
- length = watchers.length;
- while (length--) {
- try {
- watch = watchers[length];
- // Most common watches are on primitives, in which case we can short
- // circuit it with === operator, only when === fails do we use .equals
- if (watch) {
- if ((value = watch.get(current)) !== (last = watch.last) &&
- !(watch.eq
- ? equals(value, last)
- : (typeof value === 'number' && typeof last === 'number'
- && isNaN(value) && isNaN(last)))) {
- dirty = true;
- lastDirtyWatch = watch;
- watch.last = watch.eq ? copy(value, null) : value;
- watch.fn(value, ((last === initWatchVal) ? value : last), current);
- if (ttl < 5) {
- logIdx = 4 - ttl;
- if (!watchLog[logIdx]) watchLog[logIdx] = [];
- watchLog[logIdx].push({
- msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,
- newVal: value,
- oldVal: last
- });
- }
- } else if (watch === lastDirtyWatch) {
- // If the most recently dirty watcher is now clean, short circuit since the remaining watchers
- // have already been tested.
- dirty = false;
- break traverseScopesLoop;
- }
- }
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $broadcast
- if (!(next = ((current.$$watchersCount && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while (current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- } while ((current = next));
-
- // `break traverseScopesLoop;` takes us to here
-
- if ((dirty || asyncQueue.length) && !(ttl--)) {
- clearPhase();
- throw $rootScopeMinErr('infdig',
- '{0} $digest() iterations reached. Aborting!\n' +
- 'Watchers fired in the last 5 iterations: {1}',
- TTL, watchLog);
- }
-
- } while (dirty || asyncQueue.length);
-
- clearPhase();
-
- while (postDigestQueue.length) {
- try {
- postDigestQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- },
-
-
- /**
- * @ngdoc event
- * @name $rootScope.Scope#$destroy
- * @eventType broadcast on scope being destroyed
- *
- * @description
- * Broadcasted when a scope and its children are being destroyed.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$destroy
- * @kind function
- *
- * @description
- * Removes the current scope (and all of its children) from the parent scope. Removal implies
- * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
- * propagate to the current scope and its children. Removal also implies that the current
- * scope is eligible for garbage collection.
- *
- * The `$destroy()` is usually used by directives such as
- * {@link ng.directive:ngRepeat ngRepeat} for managing the
- * unrolling of the loop.
- *
- * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
- * Application code can register a `$destroy` event handler that will give it a chance to
- * perform any necessary cleanup.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
- $destroy: function() {
- // We can't destroy a scope that has been already destroyed.
- if (this.$$destroyed) return;
- var parent = this.$parent;
-
- this.$broadcast('$destroy');
- this.$$destroyed = true;
-
- if (this === $rootScope) {
- //Remove handlers attached to window when $rootScope is removed
- $browser.$$applicationDestroyed();
- }
-
- incrementWatchersCount(this, -this.$$watchersCount);
- for (var eventName in this.$$listenerCount) {
- decrementListenerCount(this, this.$$listenerCount[eventName], eventName);
- }
-
- // sever all the references to parent scopes (after this cleanup, the current scope should
- // not be retained by any of our references and should be eligible for garbage collection)
- if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
- if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
- if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
- if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
-
- // Disable listeners, watchers and apply/digest methods
- this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;
- this.$on = this.$watch = this.$watchGroup = function() { return noop; };
- this.$$listeners = {};
-
- // Disconnect the next sibling to prevent `cleanUpScope` destroying those too
- this.$$nextSibling = null;
- cleanUpScope(this);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$eval
- * @kind function
- *
- * @description
- * Executes the `expression` on the current scope and returns the result. Any exceptions in
- * the expression are propagated (uncaught). This is useful when evaluating Angular
- * expressions.
- *
- * # Example
- * ```js
- var scope = ng.$rootScope.Scope();
- scope.a = 1;
- scope.b = 2;
-
- expect(scope.$eval('a+b')).toEqual(3);
- expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
- * ```
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- * @returns {*} The result of evaluating the expression.
- */
- $eval: function(expr, locals) {
- return $parse(expr)(this, locals);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$evalAsync
- * @kind function
- *
- * @description
- * Executes the expression on the current scope at a later point in time.
- *
- * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only
- * that:
- *
- * - it will execute after the function that scheduled the evaluation (preferably before DOM
- * rendering).
- * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
- * `expression` execution.
- *
- * Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle
- * will be scheduled. However, it is encouraged to always call code that changes the model
- * from within an `$apply` call. That includes code evaluated via `$evalAsync`.
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- */
- $evalAsync: function(expr, locals) {
- // if we are outside of an $digest loop and this is the first time we are scheduling async
- // task also schedule async auto-flush
- if (!$rootScope.$$phase && !asyncQueue.length) {
- $browser.defer(function() {
- if (asyncQueue.length) {
- $rootScope.$digest();
- }
- });
- }
-
- asyncQueue.push({scope: this, expression: expr, locals: locals});
- },
-
- $$postDigest: function(fn) {
- postDigestQueue.push(fn);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$apply
- * @kind function
- *
- * @description
- * `$apply()` is used to execute an expression in angular from outside of the angular
- * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).
- * Because we are calling into the angular framework we need to perform proper scope life
- * cycle of {@link ng.$exceptionHandler exception handling},
- * {@link ng.$rootScope.Scope#$digest executing watches}.
- *
- * ## Life cycle
- *
- * # Pseudo-Code of `$apply()`
- * ```js
- function $apply(expr) {
- try {
- return $eval(expr);
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- $root.$digest();
- }
- }
- * ```
- *
- *
- * Scope's `$apply()` method transitions through the following stages:
- *
- * 1. The {@link guide/expression expression} is executed using the
- * {@link ng.$rootScope.Scope#$eval $eval()} method.
- * 2. Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the
- * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
- *
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- *
- * @returns {*} The result of evaluating the expression.
- */
- $apply: function(expr) {
- try {
- beginPhase('$apply');
- try {
- return this.$eval(expr);
- } finally {
- clearPhase();
- }
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- try {
- $rootScope.$digest();
- } catch (e) {
- $exceptionHandler(e);
- throw e;
- }
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$applyAsync
- * @kind function
- *
- * @description
- * Schedule the invocation of $apply to occur at a later time. The actual time difference
- * varies across browsers, but is typically around ~10 milliseconds.
- *
- * This can be used to queue up multiple expressions which need to be evaluated in the same
- * digest.
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- */
- $applyAsync: function(expr) {
- var scope = this;
- expr && applyAsyncQueue.push($applyAsyncExpression);
- scheduleApplyAsync();
-
- function $applyAsyncExpression() {
- scope.$eval(expr);
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$on
- * @kind function
- *
- * @description
- * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
- * discussion of event life cycle.
- *
- * The event listener function format is: `function(event, args...)`. The `event` object
- * passed into the listener has the following attributes:
- *
- * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or
- * `$broadcast`-ed.
- * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the
- * event propagates through the scope hierarchy, this property is set to null.
- * - `name` - `{string}`: name of the event.
- * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel
- * further event propagation (available only for events that were `$emit`-ed).
- * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag
- * to true.
- * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
- *
- * @param {string} name Event name to listen on.
- * @param {function(event, ...args)} listener Function to call when the event is emitted.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $on: function(name, listener) {
- var namedListeners = this.$$listeners[name];
- if (!namedListeners) {
- this.$$listeners[name] = namedListeners = [];
- }
- namedListeners.push(listener);
-
- var current = this;
- do {
- if (!current.$$listenerCount[name]) {
- current.$$listenerCount[name] = 0;
- }
- current.$$listenerCount[name]++;
- } while ((current = current.$parent));
-
- var self = this;
- return function() {
- var indexOfListener = namedListeners.indexOf(listener);
- if (indexOfListener !== -1) {
- namedListeners[indexOfListener] = null;
- decrementListenerCount(self, 1, name);
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$emit
- * @kind function
- *
- * @description
- * Dispatches an event `name` upwards through the scope hierarchy notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$emit` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event traverses upwards toward the root scope and calls all
- * registered listeners along the way. The event will stop propagating if one of the listeners
- * cancels it.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to emit.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).
- */
- $emit: function(name, args) {
- var empty = [],
- namedListeners,
- scope = this,
- stopPropagation = false,
- event = {
- name: name,
- targetScope: scope,
- stopPropagation: function() {stopPropagation = true;},
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- },
- listenerArgs = concat([event], arguments, 1),
- i, length;
-
- do {
- namedListeners = scope.$$listeners[name] || empty;
- event.currentScope = scope;
- for (i = 0, length = namedListeners.length; i < length; i++) {
-
- // if listeners were deregistered, defragment the array
- if (!namedListeners[i]) {
- namedListeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
- try {
- //allow all listeners attached to the current scope to run
- namedListeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- //if any listener on the current scope stops propagation, prevent bubbling
- if (stopPropagation) {
- event.currentScope = null;
- return event;
- }
- //traverse upwards
- scope = scope.$parent;
- } while (scope);
-
- event.currentScope = null;
-
- return event;
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$broadcast
- * @kind function
- *
- * @description
- * Dispatches an event `name` downwards to all child scopes (and their children) notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$broadcast` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event propagates to all direct and indirect scopes of the current
- * scope and calls all registered listeners along the way. The event cannot be canceled.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to broadcast.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
- */
- $broadcast: function(name, args) {
- var target = this,
- current = target,
- next = target,
- event = {
- name: name,
- targetScope: target,
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- };
-
- if (!target.$$listenerCount[name]) return event;
-
- var listenerArgs = concat([event], arguments, 1),
- listeners, i, length;
-
- //down while you can, then up and next sibling or up and next sibling until back at root
- while ((current = next)) {
- event.currentScope = current;
- listeners = current.$$listeners[name] || [];
- for (i = 0, length = listeners.length; i < length; i++) {
- // if listeners were deregistered, defragment the array
- if (!listeners[i]) {
- listeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
-
- try {
- listeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $digest
- // (though it differs due to having the extra check for $$listenerCount)
- if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while (current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- }
-
- event.currentScope = null;
- return event;
- }
- };
-
- var $rootScope = new Scope();
-
- //The internal queues. Expose them on the $rootScope for debugging/testing purposes.
- var asyncQueue = $rootScope.$$asyncQueue = [];
- var postDigestQueue = $rootScope.$$postDigestQueue = [];
- var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];
-
- return $rootScope;
-
-
- function beginPhase(phase) {
- if ($rootScope.$$phase) {
- throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);
- }
-
- $rootScope.$$phase = phase;
- }
-
- function clearPhase() {
- $rootScope.$$phase = null;
- }
-
- function incrementWatchersCount(current, count) {
- do {
- current.$$watchersCount += count;
- } while ((current = current.$parent));
- }
-
- function decrementListenerCount(current, count, name) {
- do {
- current.$$listenerCount[name] -= count;
-
- if (current.$$listenerCount[name] === 0) {
- delete current.$$listenerCount[name];
- }
- } while ((current = current.$parent));
- }
-
- /**
- * function used as an initial value for watchers.
- * because it's unique we can easily tell it apart from other values
- */
- function initWatchVal() {}
-
- function flushApplyAsync() {
- while (applyAsyncQueue.length) {
- try {
- applyAsyncQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- applyAsyncId = null;
- }
-
- function scheduleApplyAsync() {
- if (applyAsyncId === null) {
- applyAsyncId = $browser.defer(function() {
- $rootScope.$apply(flushApplyAsync);
- });
- }
- }
- }];
-}
-
-/**
- * @description
- * Private service to sanitize uris for links and images. Used by $compile and $sanitize.
- */
-function $$SanitizeUriProvider() {
- var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/,
- imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file|blob):|data:image\/)/;
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- aHrefSanitizationWhitelist = regexp;
- return this;
- }
- return aHrefSanitizationWhitelist;
- };
-
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- imgSrcSanitizationWhitelist = regexp;
- return this;
- }
- return imgSrcSanitizationWhitelist;
- };
-
- this.$get = function() {
- return function sanitizeUri(uri, isImage) {
- var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;
- var normalizedVal;
- normalizedVal = urlResolve(uri).href;
- if (normalizedVal !== '' && !normalizedVal.match(regex)) {
- return 'unsafe:' + normalizedVal;
- }
- return uri;
- };
- };
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-var $sceMinErr = minErr('$sce');
-
-var SCE_CONTEXTS = {
- HTML: 'html',
- CSS: 'css',
- URL: 'url',
- // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a
- // url. (e.g. ng-include, script src, templateUrl)
- RESOURCE_URL: 'resourceUrl',
- JS: 'js'
-};
-
-// Helper functions follow.
-
-function adjustMatcher(matcher) {
- if (matcher === 'self') {
- return matcher;
- } else if (isString(matcher)) {
- // Strings match exactly except for 2 wildcards - '*' and '**'.
- // '*' matches any character except those from the set ':/.?&'.
- // '**' matches any character (like .* in a RegExp).
- // More than 2 *'s raises an error as it's ill defined.
- if (matcher.indexOf('***') > -1) {
- throw $sceMinErr('iwcard',
- 'Illegal sequence *** in string matcher. String: {0}', matcher);
- }
- matcher = escapeForRegexp(matcher).
- replace('\\*\\*', '.*').
- replace('\\*', '[^:/.?&;]*');
- return new RegExp('^' + matcher + '$');
- } else if (isRegExp(matcher)) {
- // The only other type of matcher allowed is a Regexp.
- // Match entire URL / disallow partial matches.
- // Flags are reset (i.e. no global, ignoreCase or multiline)
- return new RegExp('^' + matcher.source + '$');
- } else {
- throw $sceMinErr('imatcher',
- 'Matchers may only be "self", string patterns or RegExp objects');
- }
-}
-
-
-function adjustMatchers(matchers) {
- var adjustedMatchers = [];
- if (isDefined(matchers)) {
- forEach(matchers, function(matcher) {
- adjustedMatchers.push(adjustMatcher(matcher));
- });
- }
- return adjustedMatchers;
-}
-
-
-/**
- * @ngdoc service
- * @name $sceDelegate
- * @kind function
- *
- * @description
- *
- * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
- * Contextual Escaping (SCE)} services to AngularJS.
- *
- * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
- * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is
- * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
- * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
- * work because `$sce` delegates to `$sceDelegate` for these operations.
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.
- *
- * The default instance of `$sceDelegate` should work out of the box with little pain. While you
- * can override it completely to change the behavior of `$sce`, the common case would
- * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
- * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as
- * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist
- * $sceDelegateProvider.resourceUrlWhitelist} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- */
-
-/**
- * @ngdoc provider
- * @name $sceDelegateProvider
- * @description
- *
- * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
- * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure
- * that the URLs used for sourcing Angular templates are safe. Refer {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and
- * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- *
- * For the general details about this service in Angular, read the main page for {@link ng.$sce
- * Strict Contextual Escaping (SCE)}.
- *
- * **Example**: Consider the following case. <a name="example"></a>
- *
- * - your app is hosted at url `http://myapp.example.com/`
- * - but some of your templates are hosted on other domains you control such as
- * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.
- * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.
- *
- * Here is what a secure configuration for this scenario might look like:
- *
- * ```
- * angular.module('myApp', []).config(function($sceDelegateProvider) {
- * $sceDelegateProvider.resourceUrlWhitelist([
- * // Allow same origin resource loads.
- * 'self',
- * // Allow loading from our assets domain. Notice the difference between * and **.
- * 'http://srv*.assets.example.com/**'
- * ]);
- *
- * // The blacklist overrides the whitelist so the open redirect here is blocked.
- * $sceDelegateProvider.resourceUrlBlacklist([
- * 'http://myapp.example.com/clickThru**'
- * ]);
- * });
- * ```
- */
-
-function $SceDelegateProvider() {
- this.SCE_CONTEXTS = SCE_CONTEXTS;
-
- // Resource URLs can also be trusted by policy.
- var resourceUrlWhitelist = ['self'],
- resourceUrlBlacklist = [];
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlWhitelist
- * @kind function
- *
- * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * Note: **an empty whitelist array will block all URLs**!
- *
- * @return {Array} the currently set whitelist array.
- *
- * The **default value** when no whitelist has been explicitly set is `['self']` allowing only
- * same origin resource requests.
- *
- * @description
- * Sets/Gets the whitelist of trusted resource URLs.
- */
- this.resourceUrlWhitelist = function(value) {
- if (arguments.length) {
- resourceUrlWhitelist = adjustMatchers(value);
- }
- return resourceUrlWhitelist;
- };
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlBlacklist
- * @kind function
- *
- * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * The typical usage for the blacklist is to **block
- * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
- * these would otherwise be trusted but actually return content from the redirected domain.
- *
- * Finally, **the blacklist overrides the whitelist** and has the final say.
- *
- * @return {Array} the currently set blacklist array.
- *
- * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there
- * is no blacklist.)
- *
- * @description
- * Sets/Gets the blacklist of trusted resource URLs.
- */
-
- this.resourceUrlBlacklist = function(value) {
- if (arguments.length) {
- resourceUrlBlacklist = adjustMatchers(value);
- }
- return resourceUrlBlacklist;
- };
-
- this.$get = ['$injector', function($injector) {
-
- var htmlSanitizer = function htmlSanitizer(html) {
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- };
-
- if ($injector.has('$sanitize')) {
- htmlSanitizer = $injector.get('$sanitize');
- }
-
-
- function matchUrl(matcher, parsedUrl) {
- if (matcher === 'self') {
- return urlIsSameOrigin(parsedUrl);
- } else {
- // definitely a regex. See adjustMatchers()
- return !!matcher.exec(parsedUrl.href);
- }
- }
-
- function isResourceUrlAllowedByPolicy(url) {
- var parsedUrl = urlResolve(url.toString());
- var i, n, allowed = false;
- // Ensure that at least one item from the whitelist allows this url.
- for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {
- if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {
- allowed = true;
- break;
- }
- }
- if (allowed) {
- // Ensure that no item from the blacklist blocked this url.
- for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {
- if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {
- allowed = false;
- break;
- }
- }
- }
- return allowed;
- }
-
- function generateHolderType(Base) {
- var holderType = function TrustedValueHolderType(trustedValue) {
- this.$$unwrapTrustedValue = function() {
- return trustedValue;
- };
- };
- if (Base) {
- holderType.prototype = new Base();
- }
- holderType.prototype.valueOf = function sceValueOf() {
- return this.$$unwrapTrustedValue();
- };
- holderType.prototype.toString = function sceToString() {
- return this.$$unwrapTrustedValue().toString();
- };
- return holderType;
- }
-
- var trustedValueHolderBase = generateHolderType(),
- byType = {};
-
- byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);
-
- /**
- * @ngdoc method
- * @name $sceDelegate#trustAs
- *
- * @description
- * Returns an object that is trusted by angular for use in specified strict
- * contextual escaping contexts (such as ng-bind-html, ng-include, any src
- * attribute interpolation, any dom event binding attribute interpolation
- * such as for onclick, etc.) that uses the provided value.
- * See {@link ng.$sce $sce} for enabling strict contextual escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
- function trustAs(type, trustedValue) {
- var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (!Constructor) {
- throw $sceMinErr('icontext',
- 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',
- type, trustedValue);
- }
- if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {
- return trustedValue;
- }
- // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting
- // mutable objects, we ensure here that the value passed in is actually a string.
- if (typeof trustedValue !== 'string') {
- throw $sceMinErr('itype',
- 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',
- type);
- }
- return new Constructor(trustedValue);
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#valueOf
- *
- * @description
- * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.
- *
- * If the passed parameter is not a value that had been returned by {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.
- *
- * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}
- * call or anything else.
- * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns
- * `value` unchanged.
- */
- function valueOf(maybeTrusted) {
- if (maybeTrusted instanceof trustedValueHolderBase) {
- return maybeTrusted.$$unwrapTrustedValue();
- } else {
- return maybeTrusted;
- }
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#getTrusted
- *
- * @description
- * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and
- * returns the originally supplied value if the queried context type is a supertype of the
- * created type. If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} call.
- * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.
- */
- function getTrusted(type, maybeTrusted) {
- if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {
- return maybeTrusted;
- }
- var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (constructor && maybeTrusted instanceof constructor) {
- return maybeTrusted.$$unwrapTrustedValue();
- }
- // If we get here, then we may only take one of two actions.
- // 1. sanitize the value for the requested type, or
- // 2. throw an exception.
- if (type === SCE_CONTEXTS.RESOURCE_URL) {
- if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
- return maybeTrusted;
- } else {
- throw $sceMinErr('insecurl',
- 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',
- maybeTrusted.toString());
- }
- } else if (type === SCE_CONTEXTS.HTML) {
- return htmlSanitizer(maybeTrusted);
- }
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- }
-
- return { trustAs: trustAs,
- getTrusted: getTrusted,
- valueOf: valueOf };
- }];
-}
-
-
-/**
- * @ngdoc provider
- * @name $sceProvider
- * @description
- *
- * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.
- * - enable/disable Strict Contextual Escaping (SCE) in a module
- * - override the default implementation with a custom delegate
- *
- * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.
- */
-
-/* jshint maxlen: false*/
-
-/**
- * @ngdoc service
- * @name $sce
- * @kind function
- *
- * @description
- *
- * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.
- *
- * # Strict Contextual Escaping
- *
- * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain
- * contexts to result in a value that is marked as safe to use for that context. One example of
- * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer
- * to these contexts as privileged or SCE contexts.
- *
- * As of version 1.2, Angular ships with SCE enabled by default.
- *
- * Note: When enabled (the default), IE<11 in quirks mode is not supported. In this mode, IE<11 allow
- * one to execute arbitrary javascript by the use of the expression() syntax. Refer
- * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.
- * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`
- * to the top of your HTML document.
- *
- * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for
- * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.
- *
- * Here's an example of a binding in a privileged context:
- *
- * ```
- * <input ng-model="userHtml" aria-label="User input">
- * <div ng-bind-html="userHtml"></div>
- * ```
- *
- * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE
- * disabled, this application allows the user to render arbitrary HTML into the DIV.
- * In a more realistic example, one may be rendering user comments, blog articles, etc. via
- * bindings. (HTML is just one example of a context where rendering user controlled input creates
- * security vulnerabilities.)
- *
- * For the case of HTML, you might use a library, either on the client side, or on the server side,
- * to sanitize unsafe HTML before binding to the value and rendering it in the document.
- *
- * How would you ensure that every place that used these types of bindings was bound to a value that
- * was sanitized by your library (or returned as safe for rendering by your server?) How can you
- * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some
- * properties/fields and forgot to update the binding to the sanitized value?
- *
- * To be secure by default, you want to ensure that any such bindings are disallowed unless you can
- * determine that something explicitly says it's safe to use a value for binding in that
- * context. You can then audit your code (a simple grep would do) to ensure that this is only done
- * for those values that you can easily tell are safe - because they were received from your server,
- * sanitized by your library, etc. You can organize your codebase to help with this - perhaps
- * allowing only the files in a specific directory to do this. Ensuring that the internal API
- * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.
- *
- * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}
- * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to
- * obtain values that will be accepted by SCE / privileged contexts.
- *
- *
- * ## How does it work?
- *
- * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted
- * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link
- * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the
- * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.
- *
- * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link
- * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly
- * simplified):
- *
- * ```
- * var ngBindHtmlDirective = ['$sce', function($sce) {
- * return function(scope, element, attr) {
- * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {
- * element.html(value || '');
- * });
- * };
- * }];
- * ```
- *
- * ## Impact on loading templates
- *
- * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as
- * `templateUrl`'s specified by {@link guide/directive directives}.
- *
- * By default, Angular only loads templates from the same domain and protocol as the application
- * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or
- * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist
- * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.
- *
- * *Please note*:
- * The browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy apply in addition to this and may further restrict whether the template is successfully
- * loaded. This means that without the right CORS policy, loading templates from a different domain
- * won't work on all browsers. Also, loading templates from `file://` URL does not work on some
- * browsers.
- *
- * ## This feels like too much overhead
- *
- * It's important to remember that SCE only applies to interpolation expressions.
- *
- * If your expressions are constant literals, they're automatically trusted and you don't need to
- * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.
- * `<div ng-bind-html="'<b>implicitly trusted</b>'"></div>`) just works.
- *
- * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them
- * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.
- *
- * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load
- * templates in `ng-include` from your application's domain without having to even know about SCE.
- * It blocks loading templates from other domains or loading templates over http from an https
- * served document. You can change these by setting your own custom {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.
- *
- * This significantly reduces the overhead. It is far easier to pay the small overhead and have an
- * application that's secure and can be audited to verify that with much more ease than bolting
- * security onto an application later.
- *
- * <a name="contexts"></a>
- * ## What trusted context types are supported?
- *
- * | Context | Notes |
- * |---------------------|----------------|
- * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |
- * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
- * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |
- * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
- * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
- *
- * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
- *
- * Each element in these arrays must be one of the following:
- *
- * - **'self'**
- * - The special **string**, `'self'`, can be used to match against all URLs of the **same
- * domain** as the application document using the **same protocol**.
- * - **String** (except the special value `'self'`)
- * - The string is matched against the full *normalized / absolute URL* of the resource
- * being tested (substring matches are not good enough.)
- * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters
- * match themselves.
- * - `*`: matches zero or more occurrences of any character other than one of the following 6
- * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use
- * in a whitelist.
- * - `**`: matches zero or more occurrences of *any* character. As such, it's not
- * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.
- * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
- * not have been the intention.) Its usage at the very end of the path is ok. (e.g.
- * http://foo.example.com/templates/**).
- * - **RegExp** (*see caveat below*)
- * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
- * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
- * accidentally introduce a bug when one updates a complex expression (imho, all regexes should
- * have good test coverage). For instance, the use of `.` in the regex is correct only in a
- * small number of cases. A `.` character in the regex used when matching the scheme or a
- * subdomain could be matched against a `:` or literal `.` that was likely not intended. It
- * is highly recommended to use the string patterns and only fall back to regular expressions
- * as a last resort.
- * - The regular expression must be an instance of RegExp (i.e. not a string.) It is
- * matched against the **entire** *normalized / absolute URL* of the resource being tested
- * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
- * present on the RegExp (such as multiline, global, ignoreCase) are ignored.
- * - If you are generating your JavaScript from some other templating engine (not
- * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),
- * remember to escape your regular expression (and be aware that you might need more than
- * one level of escaping depending on your templating engine and the way you interpolated
- * the value.) Do make use of your platform's escaping mechanism as it might be good
- * enough before coding your own. E.g. Ruby has
- * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
- * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
- * Javascript lacks a similar built in function for escaping. Take a look at Google
- * Closure library's [goog.string.regExpEscape(s)](
- * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.
- *
- * ## Show me an example using SCE.
- *
- * <example module="mySceApp" deps="angular-sanitize.js">
- * <file name="index.html">
- * <div ng-controller="AppController as myCtrl">
- * <i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
- * <b>User comments</b><br>
- * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when
- * $sanitize is available. If $sanitize isn't available, this results in an error instead of an
- * exploit.
- * <div class="well">
- * <div ng-repeat="userComment in myCtrl.userComments">
- * <b>{{userComment.name}}</b>:
- * <span ng-bind-html="userComment.htmlComment" class="htmlComment"></span>
- * <br>
- * </div>
- * </div>
- * </div>
- * </file>
- *
- * <file name="script.js">
- * angular.module('mySceApp', ['ngSanitize'])
- * .controller('AppController', ['$http', '$templateCache', '$sce',
- * function($http, $templateCache, $sce) {
- * var self = this;
- * $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) {
- * self.userComments = userComments;
- * });
- * self.explicitlyTrustedHtml = $sce.trustAsHtml(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * }]);
- * </file>
- *
- * <file name="test_data.json">
- * [
- * { "name": "Alice",
- * "htmlComment":
- * "<span onmouseover='this.textContent=\"PWN3D!\"'>Is <i>anyone</i> reading this?</span>"
- * },
- * { "name": "Bob",
- * "htmlComment": "<i>Yes!</i> Am I the only other one?"
- * }
- * ]
- * </file>
- *
- * <file name="protractor.js" type="protractor">
- * describe('SCE doc demo', function() {
- * it('should sanitize untrusted values', function() {
- * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())
- * .toBe('<span>Is <i>anyone</i> reading this?</span>');
- * });
- *
- * it('should NOT sanitize explicitly trusted values', function() {
- * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * });
- * });
- * </file>
- * </example>
- *
- *
- *
- * ## Can I disable SCE completely?
- *
- * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits
- * for little coding overhead. It will be much harder to take an SCE disabled application and
- * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE
- * for cases where you have a lot of existing code that was written before SCE was introduced and
- * you're migrating them a module at a time.
- *
- * That said, here's how you can completely disable SCE:
- *
- * ```
- * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {
- * // Completely disable SCE. For demonstration purposes only!
- * // Do not use in new projects.
- * $sceProvider.enabled(false);
- * });
- * ```
- *
- */
-/* jshint maxlen: 100 */
-
-function $SceProvider() {
- var enabled = true;
-
- /**
- * @ngdoc method
- * @name $sceProvider#enabled
- * @kind function
- *
- * @param {boolean=} value If provided, then enables/disables SCE.
- * @return {boolean} true if SCE is enabled, false otherwise.
- *
- * @description
- * Enables/disables SCE and returns the current value.
- */
- this.enabled = function(value) {
- if (arguments.length) {
- enabled = !!value;
- }
- return enabled;
- };
-
-
- /* Design notes on the default implementation for SCE.
- *
- * The API contract for the SCE delegate
- * -------------------------------------
- * The SCE delegate object must provide the following 3 methods:
- *
- * - trustAs(contextEnum, value)
- * This method is used to tell the SCE service that the provided value is OK to use in the
- * contexts specified by contextEnum. It must return an object that will be accepted by
- * getTrusted() for a compatible contextEnum and return this value.
- *
- * - valueOf(value)
- * For values that were not produced by trustAs(), return them as is. For values that were
- * produced by trustAs(), return the corresponding input value to trustAs. Basically, if
- * trustAs is wrapping the given values into some type, this operation unwraps it when given
- * such a value.
- *
- * - getTrusted(contextEnum, value)
- * This function should return the a value that is safe to use in the context specified by
- * contextEnum or throw and exception otherwise.
- *
- * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be
- * opaque or wrapped in some holder object. That happens to be an implementation detail. For
- * instance, an implementation could maintain a registry of all trusted objects by context. In
- * such a case, trustAs() would return the same object that was passed in. getTrusted() would
- * return the same object passed in if it was found in the registry under a compatible context or
- * throw an exception otherwise. An implementation might only wrap values some of the time based
- * on some criteria. getTrusted() might return a value and not throw an exception for special
- * constants or objects even if not wrapped. All such implementations fulfill this contract.
- *
- *
- * A note on the inheritance model for SCE contexts
- * ------------------------------------------------
- * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This
- * is purely an implementation details.
- *
- * The contract is simply this:
- *
- * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)
- * will also succeed.
- *
- * Inheritance happens to capture this in a natural way. In some future, we
- * may not use inheritance anymore. That is OK because no code outside of
- * sce.js and sceSpecs.js would need to be aware of this detail.
- */
-
- this.$get = ['$parse', '$sceDelegate', function(
- $parse, $sceDelegate) {
- // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow
- // the "expression(javascript expression)" syntax which is insecure.
- if (enabled && msie < 8) {
- throw $sceMinErr('iequirks',
- 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +
- 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +
- 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');
- }
-
- var sce = shallowCopy(SCE_CONTEXTS);
-
- /**
- * @ngdoc method
- * @name $sce#isEnabled
- * @kind function
- *
- * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you
- * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.
- *
- * @description
- * Returns a boolean indicating if SCE is enabled.
- */
- sce.isEnabled = function() {
- return enabled;
- };
- sce.trustAs = $sceDelegate.trustAs;
- sce.getTrusted = $sceDelegate.getTrusted;
- sce.valueOf = $sceDelegate.valueOf;
-
- if (!enabled) {
- sce.trustAs = sce.getTrusted = function(type, value) { return value; };
- sce.valueOf = identity;
- }
-
- /**
- * @ngdoc method
- * @name $sce#parseAs
- *
- * @description
- * Converts Angular {@link guide/expression expression} into a function. This is like {@link
- * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it
- * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,
- * *result*)}
- *
- * @param {string} type The kind of SCE context in which this result will be used.
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
- sce.parseAs = function sceParseAs(type, expr) {
- var parsed = $parse(expr);
- if (parsed.literal && parsed.constant) {
- return parsed;
- } else {
- return $parse(expr, function(value) {
- return sce.getTrusted(type, value);
- });
- }
- };
-
- /**
- * @ngdoc method
- * @name $sce#trustAs
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,
- * returns an object that is trusted by angular for use in specified strict contextual
- * escaping contexts (such as ng-bind-html, ng-include, any src attribute
- * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)
- * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual
- * escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsHtml
- *
- * @description
- * Shorthand method. `$sce.trustAsHtml(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml
- * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl
- * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsResourceUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the return
- * value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsJs
- *
- * @description
- * Shorthand method. `$sce.trustAsJs(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs
- * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrusted
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,
- * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the
- * originally supplied value if the queried context type is a supertype of the created type.
- * If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}
- * call.
- * @returns {*} The value the was originally provided to
- * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.
- * Otherwise, throws an exception.
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedHtml
- *
- * @description
- * Shorthand method. `$sce.getTrustedHtml(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedCss
- *
- * @description
- * Shorthand method. `$sce.getTrustedCss(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedResourceUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedResourceUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to pass to `$sceDelegate.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedJs
- *
- * @description
- * Shorthand method. `$sce.getTrustedJs(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsHtml
- *
- * @description
- * Shorthand method. `$sce.parseAsHtml(expression string)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsCss
- *
- * @description
- * Shorthand method. `$sce.parseAsCss(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsUrl(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsResourceUrl(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsJs
- *
- * @description
- * Shorthand method. `$sce.parseAsJs(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- // Shorthand delegations.
- var parse = sce.parseAs,
- getTrusted = sce.getTrusted,
- trustAs = sce.trustAs;
-
- forEach(SCE_CONTEXTS, function(enumValue, name) {
- var lName = lowercase(name);
- sce[camelCase("parse_as_" + lName)] = function(expr) {
- return parse(enumValue, expr);
- };
- sce[camelCase("get_trusted_" + lName)] = function(value) {
- return getTrusted(enumValue, value);
- };
- sce[camelCase("trust_as_" + lName)] = function(value) {
- return trustAs(enumValue, value);
- };
- });
-
- return sce;
- }];
-}
-
-/**
- * !!! This is an undocumented "private" service !!!
- *
- * @name $sniffer
- * @requires $window
- * @requires $document
- *
- * @property {boolean} history Does the browser support html5 history api ?
- * @property {boolean} transitions Does the browser support CSS transition events ?
- * @property {boolean} animations Does the browser support CSS animation events ?
- *
- * @description
- * This is very simple implementation of testing browser's features.
- */
-function $SnifferProvider() {
- this.$get = ['$window', '$document', function($window, $document) {
- var eventSupport = {},
- android =
- toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
- boxee = /Boxee/i.test(($window.navigator || {}).userAgent),
- document = $document[0] || {},
- vendorPrefix,
- vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/,
- bodyStyle = document.body && document.body.style,
- transitions = false,
- animations = false,
- match;
-
- if (bodyStyle) {
- for (var prop in bodyStyle) {
- if (match = vendorRegex.exec(prop)) {
- vendorPrefix = match[0];
- vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);
- break;
- }
- }
-
- if (!vendorPrefix) {
- vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';
- }
-
- transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));
- animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));
-
- if (android && (!transitions || !animations)) {
- transitions = isString(bodyStyle.webkitTransition);
- animations = isString(bodyStyle.webkitAnimation);
- }
- }
-
-
- return {
- // Android has history.pushState, but it does not update location correctly
- // so let's not use the history API at all.
- // http://code.google.com/p/android/issues/detail?id=17471
- // https://github.com/angular/angular.js/issues/904
-
- // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has
- // so let's not use the history API also
- // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
- // jshint -W018
- history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),
- // jshint +W018
- hasEvent: function(event) {
- // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
- // it. In particular the event is not fired when backspace or delete key are pressed or
- // when cut operation is performed.
- // IE10+ implements 'input' event but it erroneously fires under various situations,
- // e.g. when placeholder changes, or a form is focused.
- if (event === 'input' && msie <= 11) return false;
-
- if (isUndefined(eventSupport[event])) {
- var divElm = document.createElement('div');
- eventSupport[event] = 'on' + event in divElm;
- }
-
- return eventSupport[event];
- },
- csp: csp(),
- vendorPrefix: vendorPrefix,
- transitions: transitions,
- animations: animations,
- android: android
- };
- }];
-}
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc service
- * @name $templateRequest
- *
- * @description
- * The `$templateRequest` service runs security checks then downloads the provided template using
- * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
- * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
- * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
- * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
- * when `tpl` is of type string and `$templateCache` has the matching entry.
- *
- * @param {string|TrustedResourceUrl} tpl The HTTP request template URL
- * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
- *
- * @return {Promise} a promise for the HTTP response data of the given URL.
- *
- * @property {number} totalPendingRequests total amount of pending template requests being downloaded.
- */
-function $TemplateRequestProvider() {
- this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {
- function handleRequestFn(tpl, ignoreRequestError) {
- handleRequestFn.totalPendingRequests++;
-
- // We consider the template cache holds only trusted templates, so
- // there's no need to go through whitelisting again for keys that already
- // are included in there. This also makes Angular accept any script
- // directive, no matter its name. However, we still need to unwrap trusted
- // types.
- if (!isString(tpl) || !$templateCache.get(tpl)) {
- tpl = $sce.getTrustedResourceUrl(tpl);
- }
-
- var transformResponse = $http.defaults && $http.defaults.transformResponse;
-
- if (isArray(transformResponse)) {
- transformResponse = transformResponse.filter(function(transformer) {
- return transformer !== defaultHttpResponseTransform;
- });
- } else if (transformResponse === defaultHttpResponseTransform) {
- transformResponse = null;
- }
-
- var httpOptions = {
- cache: $templateCache,
- transformResponse: transformResponse
- };
-
- return $http.get(tpl, httpOptions)
- ['finally'](function() {
- handleRequestFn.totalPendingRequests--;
- })
- .then(function(response) {
- $templateCache.put(tpl, response.data);
- return response.data;
- }, handleError);
-
- function handleError(resp) {
- if (!ignoreRequestError) {
- throw $compileMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})',
- tpl, resp.status, resp.statusText);
- }
- return $q.reject(resp);
- }
- }
-
- handleRequestFn.totalPendingRequests = 0;
-
- return handleRequestFn;
- }];
-}
-
-function $$TestabilityProvider() {
- this.$get = ['$rootScope', '$browser', '$location',
- function($rootScope, $browser, $location) {
-
- /**
- * @name $testability
- *
- * @description
- * The private $$testability service provides a collection of methods for use when debugging
- * or by automated test and debugging tools.
- */
- var testability = {};
-
- /**
- * @name $$testability#findBindings
- *
- * @description
- * Returns an array of elements that are bound (via ng-bind or {{}})
- * to expressions matching the input.
- *
- * @param {Element} element The element root to search from.
- * @param {string} expression The binding expression to match.
- * @param {boolean} opt_exactMatch If true, only returns exact matches
- * for the expression. Filters and whitespace are ignored.
- */
- testability.findBindings = function(element, expression, opt_exactMatch) {
- var bindings = element.getElementsByClassName('ng-binding');
- var matches = [];
- forEach(bindings, function(binding) {
- var dataBinding = angular.element(binding).data('$binding');
- if (dataBinding) {
- forEach(dataBinding, function(bindingName) {
- if (opt_exactMatch) {
- var matcher = new RegExp('(^|\\s)' + escapeForRegexp(expression) + '(\\s|\\||$)');
- if (matcher.test(bindingName)) {
- matches.push(binding);
- }
- } else {
- if (bindingName.indexOf(expression) != -1) {
- matches.push(binding);
- }
- }
- });
- }
- });
- return matches;
- };
-
- /**
- * @name $$testability#findModels
- *
- * @description
- * Returns an array of elements that are two-way found via ng-model to
- * expressions matching the input.
- *
- * @param {Element} element The element root to search from.
- * @param {string} expression The model expression to match.
- * @param {boolean} opt_exactMatch If true, only returns exact matches
- * for the expression.
- */
- testability.findModels = function(element, expression, opt_exactMatch) {
- var prefixes = ['ng-', 'data-ng-', 'ng\\:'];
- for (var p = 0; p < prefixes.length; ++p) {
- var attributeEquals = opt_exactMatch ? '=' : '*=';
- var selector = '[' + prefixes[p] + 'model' + attributeEquals + '"' + expression + '"]';
- var elements = element.querySelectorAll(selector);
- if (elements.length) {
- return elements;
- }
- }
- };
-
- /**
- * @name $$testability#getLocation
- *
- * @description
- * Shortcut for getting the location in a browser agnostic way. Returns
- * the path, search, and hash. (e.g. /path?a=b#hash)
- */
- testability.getLocation = function() {
- return $location.url();
- };
-
- /**
- * @name $$testability#setLocation
- *
- * @description
- * Shortcut for navigating to a location without doing a full page reload.
- *
- * @param {string} url The location url (path, search and hash,
- * e.g. /path?a=b#hash) to go to.
- */
- testability.setLocation = function(url) {
- if (url !== $location.url()) {
- $location.url(url);
- $rootScope.$digest();
- }
- };
-
- /**
- * @name $$testability#whenStable
- *
- * @description
- * Calls the callback when $timeout and $http requests are completed.
- *
- * @param {function} callback
- */
- testability.whenStable = function(callback) {
- $browser.notifyWhenNoOutstandingRequests(callback);
- };
-
- return testability;
- }];
-}
-
-function $TimeoutProvider() {
- this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',
- function($rootScope, $browser, $q, $$q, $exceptionHandler) {
-
- var deferreds = {};
-
-
- /**
- * @ngdoc service
- * @name $timeout
- *
- * @description
- * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch
- * block and delegates any exceptions to
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * The return value of calling `$timeout` is a promise, which will be resolved when
- * the delay has passed and the timeout function, if provided, is executed.
- *
- * To cancel a timeout request, call `$timeout.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to
- * synchronously flush the queue of deferred functions.
- *
- * If you only want a promise that will be resolved after some specified delay
- * then you can call `$timeout` without the `fn` function.
- *
- * @param {function()=} fn A function, whose execution should be delayed.
- * @param {number=} [delay=0] Delay in milliseconds.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this
- * promise will be resolved with is the return value of the `fn` function.
- *
- */
- function timeout(fn, delay, invokeApply) {
- if (!isFunction(fn)) {
- invokeApply = delay;
- delay = fn;
- fn = noop;
- }
-
- var args = sliceArgs(arguments, 3),
- skipApply = (isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise,
- timeoutId;
-
- timeoutId = $browser.defer(function() {
- try {
- deferred.resolve(fn.apply(null, args));
- } catch (e) {
- deferred.reject(e);
- $exceptionHandler(e);
- }
- finally {
- delete deferreds[promise.$$timeoutId];
- }
-
- if (!skipApply) $rootScope.$apply();
- }, delay);
-
- promise.$$timeoutId = timeoutId;
- deferreds[timeoutId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $timeout#cancel
- *
- * @description
- * Cancels a task associated with the `promise`. As a result of this, the promise will be
- * resolved with a rejection.
- *
- * @param {Promise=} promise Promise returned by the `$timeout` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- timeout.cancel = function(promise) {
- if (promise && promise.$$timeoutId in deferreds) {
- deferreds[promise.$$timeoutId].reject('canceled');
- delete deferreds[promise.$$timeoutId];
- return $browser.defer.cancel(promise.$$timeoutId);
- }
- return false;
- };
-
- return timeout;
- }];
-}
-
-// NOTE: The usage of window and document instead of $window and $document here is
-// deliberate. This service depends on the specific behavior of anchor nodes created by the
-// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and
-// cause us to break tests. In addition, when the browser resolves a URL for XHR, it
-// doesn't know about mocked locations and resolves URLs to the real document - which is
-// exactly the behavior needed here. There is little value is mocking these out for this
-// service.
-var urlParsingNode = document.createElement("a");
-var originUrl = urlResolve(window.location.href);
-
-
-/**
- *
- * Implementation Notes for non-IE browsers
- * ----------------------------------------
- * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,
- * results both in the normalizing and parsing of the URL. Normalizing means that a relative
- * URL will be resolved into an absolute URL in the context of the application document.
- * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related
- * properties are all populated to reflect the normalized URL. This approach has wide
- * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- *
- * Implementation Notes for IE
- * ---------------------------
- * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other
- * browsers. However, the parsed components will not be set if the URL assigned did not specify
- * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We
- * work around that by performing the parsing in a 2nd step by taking a previously normalized
- * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the
- * properties such as protocol, hostname, port, etc.
- *
- * References:
- * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- * http://url.spec.whatwg.org/#urlutils
- * https://github.com/angular/angular.js/pull/2902
- * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/
- *
- * @kind function
- * @param {string} url The URL to be parsed.
- * @description Normalizes and parses a URL.
- * @returns {object} Returns the normalized URL as a dictionary.
- *
- * | member name | Description |
- * |---------------|----------------|
- * | href | A normalized version of the provided URL if it was not an absolute URL |
- * | protocol | The protocol including the trailing colon |
- * | host | The host and port (if the port is non-default) of the normalizedUrl |
- * | search | The search params, minus the question mark |
- * | hash | The hash string, minus the hash symbol
- * | hostname | The hostname
- * | port | The port, without ":"
- * | pathname | The pathname, beginning with "/"
- *
- */
-function urlResolve(url) {
- var href = url;
-
- if (msie) {
- // Normalize before parse. Refer Implementation Notes on why this is
- // done in two steps on IE.
- urlParsingNode.setAttribute("href", href);
- href = urlParsingNode.href;
- }
-
- urlParsingNode.setAttribute('href', href);
-
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: (urlParsingNode.pathname.charAt(0) === '/')
- ? urlParsingNode.pathname
- : '/' + urlParsingNode.pathname
- };
-}
-
-/**
- * Parse a request URL and determine whether this is a same-origin request as the application document.
- *
- * @param {string|object} requestUrl The url of the request as a string that will be resolved
- * or a parsed URL object.
- * @returns {boolean} Whether the request is for the same origin as the application document.
- */
-function urlIsSameOrigin(requestUrl) {
- var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
- return (parsed.protocol === originUrl.protocol &&
- parsed.host === originUrl.host);
-}
-
-/**
- * @ngdoc service
- * @name $window
- *
- * @description
- * A reference to the browser's `window` object. While `window`
- * is globally available in JavaScript, it causes testability problems, because
- * it is a global variable. In angular we always refer to it through the
- * `$window` service, so it may be overridden, removed or mocked for testing.
- *
- * Expressions, like the one defined for the `ngClick` directive in the example
- * below, are evaluated with respect to the current scope. Therefore, there is
- * no risk of inadvertently coding in a dependency on a global value in such an
- * expression.
- *
- * @example
- <example module="windowExample">
- <file name="index.html">
- <script>
- angular.module('windowExample', [])
- .controller('ExampleController', ['$scope', '$window', function($scope, $window) {
- $scope.greeting = 'Hello, World!';
- $scope.doGreeting = function(greeting) {
- $window.alert(greeting);
- };
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="text" ng-model="greeting" aria-label="greeting" />
- <button ng-click="doGreeting(greeting)">ALERT</button>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should display the greeting in the input box', function() {
- element(by.model('greeting')).sendKeys('Hello, E2E Tests');
- // If we click the button it will block the test runner
- // element(':button').click();
- });
- </file>
- </example>
- */
-function $WindowProvider() {
- this.$get = valueFn(window);
-}
-
-/**
- * @name $$cookieReader
- * @requires $document
- *
- * @description
- * This is a private service for reading cookies used by $http and ngCookies
- *
- * @return {Object} a key/value map of the current cookies
- */
-function $$CookieReader($document) {
- var rawDocument = $document[0] || {};
- var lastCookies = {};
- var lastCookieString = '';
-
- function safeDecodeURIComponent(str) {
- try {
- return decodeURIComponent(str);
- } catch (e) {
- return str;
- }
- }
-
- return function() {
- var cookieArray, cookie, i, index, name;
- var currentCookieString = rawDocument.cookie || '';
-
- if (currentCookieString !== lastCookieString) {
- lastCookieString = currentCookieString;
- cookieArray = lastCookieString.split('; ');
- lastCookies = {};
-
- for (i = 0; i < cookieArray.length; i++) {
- cookie = cookieArray[i];
- index = cookie.indexOf('=');
- if (index > 0) { //ignore nameless cookies
- name = safeDecodeURIComponent(cookie.substring(0, index));
- // the first value that is seen for a cookie is the most
- // specific one. values for the same cookie name that
- // follow are for less specific paths.
- if (isUndefined(lastCookies[name])) {
- lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));
- }
- }
- }
- }
- return lastCookies;
- };
-}
-
-$$CookieReader.$inject = ['$document'];
-
-function $$CookieReaderProvider() {
- this.$get = $$CookieReader;
-}
-
-/* global currencyFilter: true,
- dateFilter: true,
- filterFilter: true,
- jsonFilter: true,
- limitToFilter: true,
- lowercaseFilter: true,
- numberFilter: true,
- orderByFilter: true,
- uppercaseFilter: true,
- */
-
-/**
- * @ngdoc provider
- * @name $filterProvider
- * @description
- *
- * Filters are just functions which transform input to an output. However filters need to be
- * Dependency Injected. To achieve this a filter definition consists of a factory function which is
- * annotated with dependencies and is responsible for creating a filter function.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- *
- * ```js
- * // Filter registration
- * function MyModule($provide, $filterProvider) {
- * // create a service to demonstrate injection (not always needed)
- * $provide.value('greet', function(name){
- * return 'Hello ' + name + '!';
- * });
- *
- * // register a filter factory which uses the
- * // greet service to demonstrate DI.
- * $filterProvider.register('greet', function(greet){
- * // return the filter function which uses the greet service
- * // to generate salutation
- * return function(text) {
- * // filters need to be forgiving so check input validity
- * return text && greet(text) || text;
- * };
- * });
- * }
- * ```
- *
- * The filter function is registered with the `$injector` under the filter name suffix with
- * `Filter`.
- *
- * ```js
- * it('should be the same instance', inject(
- * function($filterProvider) {
- * $filterProvider.register('reverse', function(){
- * return ...;
- * });
- * },
- * function($filter, reverseFilter) {
- * expect($filter('reverse')).toBe(reverseFilter);
- * });
- * ```
- *
- *
- * For more information about how angular filters work, and how to create your own filters, see
- * {@link guide/filter Filters} in the Angular Developer Guide.
- */
-
-/**
- * @ngdoc service
- * @name $filter
- * @kind function
- * @description
- * Filters are used for formatting data displayed to the user.
- *
- * The general syntax in templates is as follows:
- *
- * {{ expression [| filter_name[:parameter_value] ... ] }}
- *
- * @param {String} name Name of the filter function to retrieve
- * @return {Function} the filter function
- * @example
- <example name="$filter" module="filterExample">
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <h3>{{ originalText }}</h3>
- <h3>{{ filteredText }}</h3>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('filterExample', [])
- .controller('MainCtrl', function($scope, $filter) {
- $scope.originalText = 'hello';
- $scope.filteredText = $filter('uppercase')($scope.originalText);
- });
- </file>
- </example>
- */
-$FilterProvider.$inject = ['$provide'];
-function $FilterProvider($provide) {
- var suffix = 'Filter';
-
- /**
- * @ngdoc method
- * @name $filterProvider#register
- * @param {string|Object} name Name of the filter function, or an object map of filters where
- * the keys are the filter names and the values are the filter factories.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.
- * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
- * of the registered filter instances.
- */
- function register(name, factory) {
- if (isObject(name)) {
- var filters = {};
- forEach(name, function(filter, key) {
- filters[key] = register(key, filter);
- });
- return filters;
- } else {
- return $provide.factory(name + suffix, factory);
- }
- }
- this.register = register;
-
- this.$get = ['$injector', function($injector) {
- return function(name) {
- return $injector.get(name + suffix);
- };
- }];
-
- ////////////////////////////////////////
-
- /* global
- currencyFilter: false,
- dateFilter: false,
- filterFilter: false,
- jsonFilter: false,
- limitToFilter: false,
- lowercaseFilter: false,
- numberFilter: false,
- orderByFilter: false,
- uppercaseFilter: false,
- */
-
- register('currency', currencyFilter);
- register('date', dateFilter);
- register('filter', filterFilter);
- register('json', jsonFilter);
- register('limitTo', limitToFilter);
- register('lowercase', lowercaseFilter);
- register('number', numberFilter);
- register('orderBy', orderByFilter);
- register('uppercase', uppercaseFilter);
-}
-
-/**
- * @ngdoc filter
- * @name filter
- * @kind function
- *
- * @description
- * Selects a subset of items from `array` and returns it as a new array.
- *
- * @param {Array} array The source array.
- * @param {string|Object|function()} expression The predicate to be used for selecting items from
- * `array`.
- *
- * Can be one of:
- *
- * - `string`: The string is used for matching against the contents of the `array`. All strings or
- * objects with string properties in `array` that match this string will be returned. This also
- * applies to nested object properties.
- * The predicate can be negated by prefixing the string with `!`.
- *
- * - `Object`: A pattern object can be used to filter specific properties on objects contained
- * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
- * which have property `name` containing "M" and property `phone` containing "1". A special
- * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
- * property of the object or its nested object properties. That's equivalent to the simple
- * substring match with a `string` as described above. The predicate can be negated by prefixing
- * the string with `!`.
- * For example `{name: "!M"}` predicate will return an array of items which have property `name`
- * not containing "M".
- *
- * Note that a named property will match properties on the same level only, while the special
- * `$` property will match properties on the same level or deeper. E.g. an array item like
- * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but
- * **will** be matched by `{$: 'John'}`.
- *
- * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.
- * The function is called for each element of the array, with the element, its index, and
- * the entire array itself as arguments.
- *
- * The final result is an array of those elements that the predicate returned true for.
- *
- * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
- * determining if the expected value (from the filter expression) and actual value (from
- * the object in the array) should be considered a match.
- *
- * Can be one of:
- *
- * - `function(actual, expected)`:
- * The function will be given the object value and the predicate value to compare and
- * should return true if both values should be considered equal.
- *
- * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.
- * This is essentially strict comparison of expected and actual.
- *
- * - `false|undefined`: A short hand for a function which will look for a substring match in case
- * insensitive way.
- *
- * Primitive values are converted to strings. Objects are not compared against primitives,
- * unless they have a custom `toString` method (e.g. `Date` objects).
- *
- * @example
- <example>
- <file name="index.html">
- <div ng-init="friends = [{name:'John', phone:'555-1276'},
- {name:'Mary', phone:'800-BIG-MARY'},
- {name:'Mike', phone:'555-4321'},
- {name:'Adam', phone:'555-5678'},
- {name:'Julie', phone:'555-8765'},
- {name:'Juliette', phone:'555-5678'}]"></div>
-
- <label>Search: <input ng-model="searchText"></label>
- <table id="searchTextResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friend in friends | filter:searchText">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- </tr>
- </table>
- <hr>
- <label>Any: <input ng-model="search.$"></label> <br>
- <label>Name only <input ng-model="search.name"></label><br>
- <label>Phone only <input ng-model="search.phone"></label><br>
- <label>Equality <input type="checkbox" ng-model="strict"></label><br>
- <table id="searchObjResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friendObj in friends | filter:search:strict">
- <td>{{friendObj.name}}</td>
- <td>{{friendObj.phone}}</td>
- </tr>
- </table>
- </file>
- <file name="protractor.js" type="protractor">
- var expectFriendNames = function(expectedNames, key) {
- element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {
- arr.forEach(function(wd, i) {
- expect(wd.getText()).toMatch(expectedNames[i]);
- });
- });
- };
-
- it('should search across all fields when filtering with a string', function() {
- var searchText = element(by.model('searchText'));
- searchText.clear();
- searchText.sendKeys('m');
- expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');
-
- searchText.clear();
- searchText.sendKeys('76');
- expectFriendNames(['John', 'Julie'], 'friend');
- });
-
- it('should search in specific fields when filtering with a predicate object', function() {
- var searchAny = element(by.model('search.$'));
- searchAny.clear();
- searchAny.sendKeys('i');
- expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');
- });
- it('should use a equal comparison when comparator is true', function() {
- var searchName = element(by.model('search.name'));
- var strict = element(by.model('strict'));
- searchName.clear();
- searchName.sendKeys('Julie');
- strict.click();
- expectFriendNames(['Julie'], 'friendObj');
- });
- </file>
- </example>
- */
-function filterFilter() {
- return function(array, expression, comparator) {
- if (!isArrayLike(array)) {
- if (array == null) {
- return array;
- } else {
- throw minErr('filter')('notarray', 'Expected array but received: {0}', array);
- }
- }
-
- var expressionType = getTypeForFilter(expression);
- var predicateFn;
- var matchAgainstAnyProp;
-
- switch (expressionType) {
- case 'function':
- predicateFn = expression;
- break;
- case 'boolean':
- case 'null':
- case 'number':
- case 'string':
- matchAgainstAnyProp = true;
- //jshint -W086
- case 'object':
- //jshint +W086
- predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
- break;
- default:
- return array;
- }
-
- return Array.prototype.filter.call(array, predicateFn);
- };
-}
-
-// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
- var predicateFn;
-
- if (comparator === true) {
- comparator = equals;
- } else if (!isFunction(comparator)) {
- comparator = function(actual, expected) {
- if (isUndefined(actual)) {
- // No substring matching against `undefined`
- return false;
- }
- if ((actual === null) || (expected === null)) {
- // No substring matching against `null`; only match against `null`
- return actual === expected;
- }
- if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {
- // Should not compare primitives against objects, unless they have custom `toString` method
- return false;
- }
-
- actual = lowercase('' + actual);
- expected = lowercase('' + expected);
- return actual.indexOf(expected) !== -1;
- };
- }
-
- predicateFn = function(item) {
- if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression.$, comparator, false);
- }
- return deepCompare(item, expression, comparator, matchAgainstAnyProp);
- };
-
- return predicateFn;
-}
-
-function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
- var actualType = getTypeForFilter(actual);
- var expectedType = getTypeForFilter(expected);
-
- if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
- } else if (isArray(actual)) {
- // In case `actual` is an array, consider it a match
- // if ANY of it's items matches `expected`
- return actual.some(function(item) {
- return deepCompare(item, expected, comparator, matchAgainstAnyProp);
- });
- }
-
- switch (actualType) {
- case 'object':
- var key;
- if (matchAgainstAnyProp) {
- for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
- return true;
- }
- }
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
- } else if (expectedType === 'object') {
- for (key in expected) {
- var expectedVal = expected[key];
- if (isFunction(expectedVal) || isUndefined(expectedVal)) {
- continue;
- }
-
- var matchAnyProperty = key === '$';
- var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
- return false;
- }
- }
- return true;
- } else {
- return comparator(actual, expected);
- }
- break;
- case 'function':
- return false;
- default:
- return comparator(actual, expected);
- }
-}
-
-// Used for easily differentiating between `null` and actual `object`
-function getTypeForFilter(val) {
- return (val === null) ? 'null' : typeof val;
-}
-
-/**
- * @ngdoc filter
- * @name currency
- * @kind function
- *
- * @description
- * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default
- * symbol for current locale is used.
- *
- * @param {number} amount Input to filter.
- * @param {string=} symbol Currency symbol or identifier to be displayed.
- * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
- * @returns {string} Formatted number.
- *
- *
- * @example
- <example module="currencyExample">
- <file name="index.html">
- <script>
- angular.module('currencyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.amount = 1234.56;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="number" ng-model="amount" aria-label="amount"> <br>
- default currency symbol ($): <span id="currency-default">{{amount | currency}}</span><br>
- custom currency identifier (USD$): <span id="currency-custom">{{amount | currency:"USD$"}}</span>
- no fractions (0): <span id="currency-no-fractions">{{amount | currency:"USD$":0}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should init with 1234.56', function() {
- expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');
- expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');
- expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');
- });
- it('should update', function() {
- if (browser.params.browser == 'safari') {
- // Safari does not understand the minus key. See
- // https://github.com/angular/protractor/issues/481
- return;
- }
- element(by.model('amount')).clear();
- element(by.model('amount')).sendKeys('-1234');
- expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');
- expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');
- expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');
- });
- </file>
- </example>
- */
-currencyFilter.$inject = ['$locale'];
-function currencyFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(amount, currencySymbol, fractionSize) {
- if (isUndefined(currencySymbol)) {
- currencySymbol = formats.CURRENCY_SYM;
- }
-
- if (isUndefined(fractionSize)) {
- fractionSize = formats.PATTERNS[1].maxFrac;
- }
-
- // if null or undefined pass it through
- return (amount == null)
- ? amount
- : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).
- replace(/\u00A4/g, currencySymbol);
- };
-}
-
-/**
- * @ngdoc filter
- * @name number
- * @kind function
- *
- * @description
- * Formats a number as text.
- *
- * If the input is null or undefined, it will just be returned.
- * If the input is infinite (Infinity/-Infinity) the Infinity symbol '∞' is returned.
- * If the input is not a number an empty string is returned.
- *
- *
- * @param {number|string} number Number to format.
- * @param {(number|string)=} fractionSize Number of decimal places to round the number to.
- * If this is not provided then the fraction size is computed from the current locale's number
- * formatting pattern. In the case of the default locale, it will be 3.
- * @returns {string} Number rounded to decimalPlaces and places a “,†after each third digit.
- *
- * @example
- <example module="numberFilterExample">
- <file name="index.html">
- <script>
- angular.module('numberFilterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = 1234.56789;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Enter number: <input ng-model='val'></label><br>
- Default formatting: <span id='number-default'>{{val | number}}</span><br>
- No fractions: <span>{{val | number:0}}</span><br>
- Negative number: <span>{{-val | number:4}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format numbers', function() {
- expect(element(by.id('number-default')).getText()).toBe('1,234.568');
- expect(element(by.binding('val | number:0')).getText()).toBe('1,235');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');
- });
-
- it('should update', function() {
- element(by.model('val')).clear();
- element(by.model('val')).sendKeys('3374.333');
- expect(element(by.id('number-default')).getText()).toBe('3,374.333');
- expect(element(by.binding('val | number:0')).getText()).toBe('3,374');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');
- });
- </file>
- </example>
- */
-
-
-numberFilter.$inject = ['$locale'];
-function numberFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(number, fractionSize) {
-
- // if null or undefined pass it through
- return (number == null)
- ? number
- : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,
- fractionSize);
- };
-}
-
-var DECIMAL_SEP = '.';
-function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
- if (isObject(number)) return '';
-
- var isNegative = number < 0;
- number = Math.abs(number);
-
- var isInfinity = number === Infinity;
- if (!isInfinity && !isFinite(number)) return '';
-
- var numStr = number + '',
- formatedText = '',
- hasExponent = false,
- parts = [];
-
- if (isInfinity) formatedText = '\u221e';
-
- if (!isInfinity && numStr.indexOf('e') !== -1) {
- var match = numStr.match(/([\d\.]+)e(-?)(\d+)/);
- if (match && match[2] == '-' && match[3] > fractionSize + 1) {
- number = 0;
- } else {
- formatedText = numStr;
- hasExponent = true;
- }
- }
-
- if (!isInfinity && !hasExponent) {
- var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;
-
- // determine fractionSize if it is not specified
- if (isUndefined(fractionSize)) {
- fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);
- }
-
- // safely round numbers in JS without hitting imprecisions of floating-point arithmetics
- // inspired by:
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
- number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);
-
- var fraction = ('' + number).split(DECIMAL_SEP);
- var whole = fraction[0];
- fraction = fraction[1] || '';
-
- var i, pos = 0,
- lgroup = pattern.lgSize,
- group = pattern.gSize;
-
- if (whole.length >= (lgroup + group)) {
- pos = whole.length - lgroup;
- for (i = 0; i < pos; i++) {
- if ((pos - i) % group === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
- }
-
- for (i = pos; i < whole.length; i++) {
- if ((whole.length - i) % lgroup === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
-
- // format fraction part.
- while (fraction.length < fractionSize) {
- fraction += '0';
- }
-
- if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize);
- } else {
- if (fractionSize > 0 && number < 1) {
- formatedText = number.toFixed(fractionSize);
- number = parseFloat(formatedText);
- formatedText = formatedText.replace(DECIMAL_SEP, decimalSep);
- }
- }
-
- if (number === 0) {
- isNegative = false;
- }
-
- parts.push(isNegative ? pattern.negPre : pattern.posPre,
- formatedText,
- isNegative ? pattern.negSuf : pattern.posSuf);
- return parts.join('');
-}
-
-function padNumber(num, digits, trim) {
- var neg = '';
- if (num < 0) {
- neg = '-';
- num = -num;
- }
- num = '' + num;
- while (num.length < digits) num = '0' + num;
- if (trim) {
- num = num.substr(num.length - digits);
- }
- return neg + num;
-}
-
-
-function dateGetter(name, size, offset, trim) {
- offset = offset || 0;
- return function(date) {
- var value = date['get' + name]();
- if (offset > 0 || value > -offset) {
- value += offset;
- }
- if (value === 0 && offset == -12) value = 12;
- return padNumber(value, size, trim);
- };
-}
-
-function dateStrGetter(name, shortForm) {
- return function(date, formats) {
- var value = date['get' + name]();
- var get = uppercase(shortForm ? ('SHORT' + name) : name);
-
- return formats[get][value];
- };
-}
-
-function timeZoneGetter(date, formats, offset) {
- var zone = -1 * offset;
- var paddedZone = (zone >= 0) ? "+" : "";
-
- paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +
- padNumber(Math.abs(zone % 60), 2);
-
- return paddedZone;
-}
-
-function getFirstThursdayOfYear(year) {
- // 0 = index of January
- var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();
- // 4 = index of Thursday (+1 to account for 1st = 5)
- // 11 = index of *next* Thursday (+1 account for 1st = 12)
- return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);
-}
-
-function getThursdayThisWeek(datetime) {
- return new Date(datetime.getFullYear(), datetime.getMonth(),
- // 4 = index of Thursday
- datetime.getDate() + (4 - datetime.getDay()));
-}
-
-function weekGetter(size) {
- return function(date) {
- var firstThurs = getFirstThursdayOfYear(date.getFullYear()),
- thisThurs = getThursdayThisWeek(date);
-
- var diff = +thisThurs - +firstThurs,
- result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week
-
- return padNumber(result, size);
- };
-}
-
-function ampmGetter(date, formats) {
- return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
-}
-
-function eraGetter(date, formats) {
- return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];
-}
-
-function longEraGetter(date, formats) {
- return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];
-}
-
-var DATE_FORMATS = {
- yyyy: dateGetter('FullYear', 4),
- yy: dateGetter('FullYear', 2, 0, true),
- y: dateGetter('FullYear', 1),
- MMMM: dateStrGetter('Month'),
- MMM: dateStrGetter('Month', true),
- MM: dateGetter('Month', 2, 1),
- M: dateGetter('Month', 1, 1),
- dd: dateGetter('Date', 2),
- d: dateGetter('Date', 1),
- HH: dateGetter('Hours', 2),
- H: dateGetter('Hours', 1),
- hh: dateGetter('Hours', 2, -12),
- h: dateGetter('Hours', 1, -12),
- mm: dateGetter('Minutes', 2),
- m: dateGetter('Minutes', 1),
- ss: dateGetter('Seconds', 2),
- s: dateGetter('Seconds', 1),
- // while ISO 8601 requires fractions to be prefixed with `.` or `,`
- // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions
- sss: dateGetter('Milliseconds', 3),
- EEEE: dateStrGetter('Day'),
- EEE: dateStrGetter('Day', true),
- a: ampmGetter,
- Z: timeZoneGetter,
- ww: weekGetter(2),
- w: weekGetter(1),
- G: eraGetter,
- GG: eraGetter,
- GGG: eraGetter,
- GGGG: longEraGetter
-};
-
-var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,
- NUMBER_STRING = /^\-?\d+$/;
-
-/**
- * @ngdoc filter
- * @name date
- * @kind function
- *
- * @description
- * Formats `date` to a string based on the requested `format`.
- *
- * `format` string can be composed of the following elements:
- *
- * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
- * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
- * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
- * * `'MMMM'`: Month in year (January-December)
- * * `'MMM'`: Month in year (Jan-Dec)
- * * `'MM'`: Month in year, padded (01-12)
- * * `'M'`: Month in year (1-12)
- * * `'dd'`: Day in month, padded (01-31)
- * * `'d'`: Day in month (1-31)
- * * `'EEEE'`: Day in Week,(Sunday-Saturday)
- * * `'EEE'`: Day in Week, (Sun-Sat)
- * * `'HH'`: Hour in day, padded (00-23)
- * * `'H'`: Hour in day (0-23)
- * * `'hh'`: Hour in AM/PM, padded (01-12)
- * * `'h'`: Hour in AM/PM, (1-12)
- * * `'mm'`: Minute in hour, padded (00-59)
- * * `'m'`: Minute in hour (0-59)
- * * `'ss'`: Second in minute, padded (00-59)
- * * `'s'`: Second in minute (0-59)
- * * `'sss'`: Millisecond in second, padded (000-999)
- * * `'a'`: AM/PM marker
- * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
- * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
- * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
- * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')
- * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')
- *
- * `format` string can also be one of the following predefined
- * {@link guide/i18n localizable formats}:
- *
- * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
- * (e.g. Sep 3, 2010 12:05:08 PM)
- * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)
- * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale
- * (e.g. Friday, September 3, 2010)
- * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)
- * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)
- * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)
- * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)
- * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)
- *
- * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.
- * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence
- * (e.g. `"h 'o''clock'"`).
- *
- * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or
- * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its
- * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is
- * specified in the string input, the time is considered to be in the local timezone.
- * @param {string=} format Formatting rules (see Description). If not specified,
- * `mediumDate` is used.
- * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the
- * continental US time zone abbreviations, but for general use, use a time zone offset, for
- * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
- * If not specified, the timezone of the browser will be used.
- * @returns {string} Formatted string or the input if input is not recognized as date/millis.
- *
- * @example
- <example>
- <file name="index.html">
- <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:
- <span>{{1288323623006 | date:'medium'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:
- <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
- <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}</span>:
- <span>{{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}</span><br>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format date', function() {
- expect(element(by.binding("1288323623006 | date:'medium'")).getText()).
- toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/);
- expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()).
- toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/);
- expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).
- toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
- expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()).
- toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/);
- });
- </file>
- </example>
- */
-dateFilter.$inject = ['$locale'];
-function dateFilter($locale) {
-
-
- var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
- // 1 2 3 4 5 6 7 8 9 10 11
- function jsonStringToDate(string) {
- var match;
- if (match = string.match(R_ISO8601_STR)) {
- var date = new Date(0),
- tzHour = 0,
- tzMin = 0,
- dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,
- timeSetter = match[8] ? date.setUTCHours : date.setHours;
-
- if (match[9]) {
- tzHour = toInt(match[9] + match[10]);
- tzMin = toInt(match[9] + match[11]);
- }
- dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));
- var h = toInt(match[4] || 0) - tzHour;
- var m = toInt(match[5] || 0) - tzMin;
- var s = toInt(match[6] || 0);
- var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);
- timeSetter.call(date, h, m, s, ms);
- return date;
- }
- return string;
- }
-
-
- return function(date, format, timezone) {
- var text = '',
- parts = [],
- fn, match;
-
- format = format || 'mediumDate';
- format = $locale.DATETIME_FORMATS[format] || format;
- if (isString(date)) {
- date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);
- }
-
- if (isNumber(date)) {
- date = new Date(date);
- }
-
- if (!isDate(date) || !isFinite(date.getTime())) {
- return date;
- }
-
- while (format) {
- match = DATE_FORMATS_SPLIT.exec(format);
- if (match) {
- parts = concat(parts, match, 1);
- format = parts.pop();
- } else {
- parts.push(format);
- format = null;
- }
- }
-
- var dateTimezoneOffset = date.getTimezoneOffset();
- if (timezone) {
- dateTimezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
- date = convertTimezoneToLocal(date, timezone, true);
- }
- forEach(parts, function(value) {
- fn = DATE_FORMATS[value];
- text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)
- : value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
- });
-
- return text;
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name json
- * @kind function
- *
- * @description
- * Allows you to convert a JavaScript object into JSON string.
- *
- * This filter is mostly useful for debugging. When using the double curly {{value}} notation
- * the binding is automatically converted to JSON.
- *
- * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.
- * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.
- * @returns {string} JSON string.
- *
- *
- * @example
- <example>
- <file name="index.html">
- <pre id="default-spacing">{{ {'name':'value'} | json }}</pre>
- <pre id="custom-spacing">{{ {'name':'value'} | json:4 }}</pre>
- </file>
- <file name="protractor.js" type="protractor">
- it('should jsonify filtered objects', function() {
- expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- });
- </file>
- </example>
- *
- */
-function jsonFilter() {
- return function(object, spacing) {
- if (isUndefined(spacing)) {
- spacing = 2;
- }
- return toJson(object, spacing);
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name lowercase
- * @kind function
- * @description
- * Converts string to lowercase.
- * @see angular.lowercase
- */
-var lowercaseFilter = valueFn(lowercase);
-
-
-/**
- * @ngdoc filter
- * @name uppercase
- * @kind function
- * @description
- * Converts string to uppercase.
- * @see angular.uppercase
- */
-var uppercaseFilter = valueFn(uppercase);
-
-/**
- * @ngdoc filter
- * @name limitTo
- * @kind function
- *
- * @description
- * Creates a new array or string containing only a specified number of elements. The elements
- * are taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
- * converted to a string.
- *
- * @param {Array|string|number} input Source array, string or number to be limited.
- * @param {string|number} limit The length of the returned array or string. If the `limit` number
- * is positive, `limit` number of items from the beginning of the source array/string are copied.
- * If the number is negative, `limit` number of items from the end of the source array/string
- * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
- * the input will be returned unchanged.
- * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
- * indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
- * had less than `limit` elements.
- *
- * @example
- <example module="limitToExample">
- <file name="index.html">
- <script>
- angular.module('limitToExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.numbers = [1,2,3,4,5,6,7,8,9];
- $scope.letters = "abcdefghi";
- $scope.longNumber = 2345432342;
- $scope.numLimit = 3;
- $scope.letterLimit = 3;
- $scope.longNumberLimit = 3;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>
- Limit {{numbers}} to:
- <input type="number" step="1" ng-model="numLimit">
- </label>
- <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>
- <label>
- Limit {{letters}} to:
- <input type="number" step="1" ng-model="letterLimit">
- </label>
- <p>Output letters: {{ letters | limitTo:letterLimit }}</p>
- <label>
- Limit {{longNumber}} to:
- <input type="number" step="1" ng-model="longNumberLimit">
- </label>
- <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var numLimitInput = element(by.model('numLimit'));
- var letterLimitInput = element(by.model('letterLimit'));
- var longNumberLimitInput = element(by.model('longNumberLimit'));
- var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));
- var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));
- var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));
-
- it('should limit the number array to first three items', function() {
- expect(numLimitInput.getAttribute('value')).toBe('3');
- expect(letterLimitInput.getAttribute('value')).toBe('3');
- expect(longNumberLimitInput.getAttribute('value')).toBe('3');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');
- expect(limitedLetters.getText()).toEqual('Output letters: abc');
- expect(limitedLongNumber.getText()).toEqual('Output long number: 234');
- });
-
- // There is a bug in safari and protractor that doesn't like the minus key
- // it('should update the output when -3 is entered', function() {
- // numLimitInput.clear();
- // numLimitInput.sendKeys('-3');
- // letterLimitInput.clear();
- // letterLimitInput.sendKeys('-3');
- // longNumberLimitInput.clear();
- // longNumberLimitInput.sendKeys('-3');
- // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');
- // expect(limitedLetters.getText()).toEqual('Output letters: ghi');
- // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');
- // });
-
- it('should not exceed the maximum size of input array', function() {
- numLimitInput.clear();
- numLimitInput.sendKeys('100');
- letterLimitInput.clear();
- letterLimitInput.sendKeys('100');
- longNumberLimitInput.clear();
- longNumberLimitInput.sendKeys('100');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');
- expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');
- expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');
- });
- </file>
- </example>
-*/
-function limitToFilter() {
- return function(input, limit, begin) {
- if (Math.abs(Number(limit)) === Infinity) {
- limit = Number(limit);
- } else {
- limit = toInt(limit);
- }
- if (isNaN(limit)) return input;
-
- if (isNumber(input)) input = input.toString();
- if (!isArray(input) && !isString(input)) return input;
-
- begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
- begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
-
- if (limit >= 0) {
- return input.slice(begin, begin + limit);
- } else {
- if (begin === 0) {
- return input.slice(limit, input.length);
- } else {
- return input.slice(Math.max(0, begin + limit), begin);
- }
- }
- };
-}
-
-/**
- * @ngdoc filter
- * @name orderBy
- * @kind function
- *
- * @description
- * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
- * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
- * as expected, make sure they are actually being saved as numbers and not strings.
- *
- * @param {Array} array The array to sort.
- * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
- * used by the comparator to determine the order of elements.
- *
- * Can be one of:
- *
- * - `function`: Getter function. The result of this function will be sorted using the
- * `<`, `===`, `>` operator.
- * - `string`: An Angular expression. The result of this expression is used to compare elements
- * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
- * 3 first characters of a property called `name`). The result of a constant expression
- * is interpreted as a property name to be used in comparisons (for example `"special name"`
- * to sort object by the value of their `special name` property). An expression can be
- * optionally prefixed with `+` or `-` to control ascending or descending sort order
- * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
- * element itself is used to compare where sorting.
- * - `Array`: An array of function or string predicates. The first predicate in the array
- * is used for sorting, but when two items are equivalent, the next predicate is used.
- *
- * If the predicate is missing or empty then it defaults to `'+'`.
- *
- * @param {boolean=} reverse Reverse the order of the array.
- * @returns {Array} Sorted copy of the source array.
- *
- *
- * @example
- * The example below demonstrates a simple ngRepeat, where the data is sorted
- * by age in descending order (predicate is set to `'-age'`).
- * `reverse` is not set, which means it defaults to `false`.
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th>Name</th>
- <th>Phone Number</th>
- <th>Age</th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:'-age'">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * The predicate and reverse parameters can be controlled dynamically through scope properties,
- * as shown in the next example.
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- $scope.predicate = 'age';
- $scope.reverse = true;
- $scope.order = function(predicate) {
- $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
- $scope.predicate = predicate;
- };
- }]);
- </script>
- <style type="text/css">
- .sortorder:after {
- content: '\25b2';
- }
- .sortorder.reverse:after {
- content: '\25bc';
- }
- </style>
- <div ng-controller="ExampleController">
- <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>
- <hr/>
- [ <a href="" ng-click="predicate=''">unsorted</a> ]
- <table class="friend">
- <tr>
- <th>
- <a href="" ng-click="order('name')">Name</a>
- <span class="sortorder" ng-show="predicate === 'name'" ng-class="{reverse:reverse}"></span>
- </th>
- <th>
- <a href="" ng-click="order('phone')">Phone Number</a>
- <span class="sortorder" ng-show="predicate === 'phone'" ng-class="{reverse:reverse}"></span>
- </th>
- <th>
- <a href="" ng-click="order('age')">Age</a>
- <span class="sortorder" ng-show="predicate === 'age'" ng-class="{reverse:reverse}"></span>
- </th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:predicate:reverse">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the
- * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the
- * desired parameters.
- *
- * Example:
- *
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th><a href="" ng-click="reverse=false;order('name', false)">Name</a>
- (<a href="" ng-click="order('-name',false)">^</a>)</th>
- <th><a href="" ng-click="reverse=!reverse;order('phone', reverse)">Phone Number</a></th>
- <th><a href="" ng-click="reverse=!reverse;order('age',reverse)">Age</a></th>
- </tr>
- <tr ng-repeat="friend in friends">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
- var orderBy = $filter('orderBy');
- $scope.friends = [
- { name: 'John', phone: '555-1212', age: 10 },
- { name: 'Mary', phone: '555-9876', age: 19 },
- { name: 'Mike', phone: '555-4321', age: 21 },
- { name: 'Adam', phone: '555-5678', age: 35 },
- { name: 'Julie', phone: '555-8765', age: 29 }
- ];
- $scope.order = function(predicate, reverse) {
- $scope.friends = orderBy($scope.friends, predicate, reverse);
- };
- $scope.order('-age',false);
- }]);
- </file>
-</example>
- */
-orderByFilter.$inject = ['$parse'];
-function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder) {
-
- if (!(isArrayLike(array))) return array;
-
- if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
- if (sortPredicate.length === 0) { sortPredicate = ['+']; }
-
- var predicates = processPredicates(sortPredicate, reverseOrder);
- // Add a predicate at the end that evaluates to the element index. This makes the
- // sort stable as it works as a tie-breaker when all the input predicates cannot
- // distinguish between two elements.
- predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
-
- // The next three lines are a version of a Swartzian Transform idiom from Perl
- // (sometimes called the Decorate-Sort-Undecorate idiom)
- // See https://en.wikipedia.org/wiki/Schwartzian_transform
- var compareValues = Array.prototype.map.call(array, getComparisonObject);
- compareValues.sort(doComparison);
- array = compareValues.map(function(item) { return item.value; });
-
- return array;
-
- function getComparisonObject(value, index) {
- return {
- value: value,
- predicateValues: predicates.map(function(predicate) {
- return getPredicateValue(predicate.get(value), index);
- })
- };
- }
-
- function doComparison(v1, v2) {
- var result = 0;
- for (var index=0, length = predicates.length; index < length; ++index) {
- result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
- if (result) break;
- }
- return result;
- }
- };
-
- function processPredicates(sortPredicate, reverseOrder) {
- reverseOrder = reverseOrder ? -1 : 1;
- return sortPredicate.map(function(predicate) {
- var descending = 1, get = identity;
-
- if (isFunction(predicate)) {
- get = predicate;
- } else if (isString(predicate)) {
- if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {
- descending = predicate.charAt(0) == '-' ? -1 : 1;
- predicate = predicate.substring(1);
- }
- if (predicate !== '') {
- get = $parse(predicate);
- if (get.constant) {
- var key = get();
- get = function(value) { return value[key]; };
- }
- }
- }
- return { get: get, descending: descending * reverseOrder };
- });
- }
-
- function isPrimitive(value) {
- switch (typeof value) {
- case 'number': /* falls through */
- case 'boolean': /* falls through */
- case 'string':
- return true;
- default:
- return false;
- }
- }
-
- function objectValue(value, index) {
- // If `valueOf` is a valid function use that
- if (typeof value.valueOf === 'function') {
- value = value.valueOf();
- if (isPrimitive(value)) return value;
- }
- // If `toString` is a valid function and not the one from `Object.prototype` use that
- if (hasCustomToString(value)) {
- value = value.toString();
- if (isPrimitive(value)) return value;
- }
- // We have a basic object so we use the position of the object in the collection
- return index;
- }
-
- function getPredicateValue(value, index) {
- var type = typeof value;
- if (value === null) {
- type = 'string';
- value = 'null';
- } else if (type === 'string') {
- value = value.toLowerCase();
- } else if (type === 'object') {
- value = objectValue(value, index);
- }
- return { value: value, type: type };
- }
-
- function compare(v1, v2) {
- var result = 0;
- if (v1.type === v2.type) {
- if (v1.value !== v2.value) {
- result = v1.value < v2.value ? -1 : 1;
- }
- } else {
- result = v1.type < v2.type ? -1 : 1;
- }
- return result;
- }
-}
-
-function ngDirective(directive) {
- if (isFunction(directive)) {
- directive = {
- link: directive
- };
- }
- directive.restrict = directive.restrict || 'AC';
- return valueFn(directive);
-}
-
-/**
- * @ngdoc directive
- * @name a
- * @restrict E
- *
- * @description
- * Modifies the default behavior of the html A tag so that the default action is prevented when
- * the href attribute is empty.
- *
- * This change permits the easy creation of action links with the `ngClick` directive
- * without changing the location or causing page reloads, e.g.:
- * `<a href="" ng-click="list.addItem()">Add Item</a>`
- */
-var htmlAnchorDirective = valueFn({
- restrict: 'E',
- compile: function(element, attr) {
- if (!attr.href && !attr.xlinkHref) {
- return function(scope, element) {
- // If the linked element is not an anchor tag anymore, do nothing
- if (element[0].nodeName.toLowerCase() !== 'a') return;
-
- // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
- var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
- 'xlink:href' : 'href';
- element.on('click', function(event) {
- // if we have no href url, then don't navigate anywhere.
- if (!element.attr(href)) {
- event.preventDefault();
- }
- });
- };
- }
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngHref
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in an href attribute will
- * make the link go to the wrong URL if the user clicks it before
- * Angular has a chance to replace the `{{hash}}` markup with its
- * value. Until Angular replaces the markup the link will be broken
- * and will most likely return a 404 error. The `ngHref` directive
- * solves this problem.
- *
- * The wrong way to write it:
- * ```html
- * <a href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
- * ```
- *
- * @element A
- * @param {template} ngHref any string which can contain `{{}}` markup.
- *
- * @example
- * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes
- * in links and their different behaviors:
- <example>
- <file name="index.html">
- <input ng-model="value" /><br />
- <a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
- <a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
- <a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br />
- <a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br />
- <a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br />
- <a id="link-6" ng-href="{{value}}">link</a> (link, change location)
- </file>
- <file name="protractor.js" type="protractor">
- it('should execute ng-click but not reload when href without value', function() {
- element(by.id('link-1')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('1');
- expect(element(by.id('link-1')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when href empty string', function() {
- element(by.id('link-2')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('2');
- expect(element(by.id('link-2')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click and change url when ng-href specified', function() {
- expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/);
-
- element(by.id('link-3')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
-
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/123$/);
- });
- }, 5000, 'page should navigate to /123');
- });
-
- it('should execute ng-click but not reload when href empty string and name specified', function() {
- element(by.id('link-4')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('4');
- expect(element(by.id('link-4')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when no href but name specified', function() {
- element(by.id('link-5')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('5');
- expect(element(by.id('link-5')).getAttribute('href')).toBe(null);
- });
-
- it('should only change url when only ng-href', function() {
- element(by.model('value')).clear();
- element(by.model('value')).sendKeys('6');
- expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);
-
- element(by.id('link-6')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/6$/);
- });
- }, 5000, 'page should navigate to /6');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngSrc
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `src` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrc` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img src="http://www.gravatar.com/avatar/{{hash}}" alt="Description"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-src="http://www.gravatar.com/avatar/{{hash}}" alt="Description" />
- * ```
- *
- * @element IMG
- * @param {template} ngSrc any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngSrcset
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrcset` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description" />
- * ```
- *
- * @element IMG
- * @param {template} ngSrcset any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngDisabled
- * @restrict A
- * @priority 100
- *
- * @description
- *
- * This directive sets the `disabled` attribute on the element if the
- * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.
- *
- * A special directive is necessary because we cannot use interpolation inside the `disabled`
- * attribute. The following example would make the button enabled on Chrome/Firefox
- * but not on older IEs:
- *
- * ```html
- * <!-- See below for an example of ng-disabled being used correctly -->
- * <div ng-init="isDisabled = false">
- * <button disabled="{{isDisabled}}">Disabled</button>
- * </div>
- * ```
- *
- * This is because the HTML specification does not require browsers to preserve the values of
- * boolean attributes such as `disabled` (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- *
- * @example
- <example>
- <file name="index.html">
- <label>Click me to toggle: <input type="checkbox" ng-model="checked"></label><br/>
- <button ng-model="button" ng-disabled="checked">Button</button>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle button', function() {
- expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
- * then the `disabled` attribute will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngChecked
- * @restrict A
- * @priority 100
- *
- * @description
- * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.
- *
- * Note that this directive should not be used together with {@link ngModel `ngModel`},
- * as this can lead to unexpected behavior.
- *
- * ### Why do we need `ngChecked`?
- *
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as checked. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngChecked` directive solves this problem for the `checked` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me to check both: <input type="checkbox" ng-model="master"></label><br/>
- <input id="checkSlave" type="checkbox" ng-checked="master" aria-label="Slave input">
- </file>
- <file name="protractor.js" type="protractor">
- it('should check both checkBoxes', function() {
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();
- element(by.model('master')).click();
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
- * then the `checked` attribute will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngReadonly
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as readonly. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngReadonly` directive solves this problem for the `readonly` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me to make text readonly: <input type="checkbox" ng-model="checked"></label><br/>
- <input type="text" ng-readonly="checked" value="I'm Angular" aria-label="Readonly field" />
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle readonly attr', function() {
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,
- * then special attribute "readonly" will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSelected
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as selected. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngSelected` directive solves this problem for the `selected` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- *
- * @example
- <example>
- <file name="index.html">
- <label>Check me to select: <input type="checkbox" ng-model="selected"></label><br/>
- <select aria-label="ngSelected demo">
- <option>Hello!</option>
- <option id="greet" ng-selected="selected">Greetings!</option>
- </select>
- </file>
- <file name="protractor.js" type="protractor">
- it('should select Greetings!', function() {
- expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();
- element(by.model('selected')).click();
- expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element OPTION
- * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,
- * then special attribute "selected" will be set on the element
- */
-
-/**
- * @ngdoc directive
- * @name ngOpen
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as open. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngOpen` directive solves this problem for the `open` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me check multiple: <input type="checkbox" ng-model="open"></label><br/>
- <details id="details" ng-open="open">
- <summary>Show/Hide me</summary>
- </details>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle open', function() {
- expect(element(by.id('details')).getAttribute('open')).toBeFalsy();
- element(by.model('open')).click();
- expect(element(by.id('details')).getAttribute('open')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element DETAILS
- * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,
- * then special attribute "open" will be set on the element
- */
-
-var ngAttributeAliasDirectives = {};
-
-// boolean attrs are evaluated
-forEach(BOOLEAN_ATTR, function(propName, attrName) {
- // binding to multiple is not supported
- if (propName == "multiple") return;
-
- function defaultLinkFn(scope, element, attr) {
- scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {
- attr.$set(attrName, !!value);
- });
- }
-
- var normalized = directiveNormalize('ng-' + attrName);
- var linkFn = defaultLinkFn;
-
- if (propName === 'checked') {
- linkFn = function(scope, element, attr) {
- // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input
- if (attr.ngModel !== attr[normalized]) {
- defaultLinkFn(scope, element, attr);
- }
- };
- }
-
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- restrict: 'A',
- priority: 100,
- link: linkFn
- };
- };
-});
-
-// aliased input attrs are evaluated
-forEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {
- ngAttributeAliasDirectives[ngAttr] = function() {
- return {
- priority: 100,
- link: function(scope, element, attr) {
- //special case ngPattern when a literal regular expression value
- //is used as the expression (this way we don't have to watch anything).
- if (ngAttr === "ngPattern" && attr.ngPattern.charAt(0) == "/") {
- var match = attr.ngPattern.match(REGEX_STRING_REGEXP);
- if (match) {
- attr.$set("ngPattern", new RegExp(match[1], match[2]));
- return;
- }
- }
-
- scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {
- attr.$set(ngAttr, value);
- });
- }
- };
- };
-});
-
-// ng-src, ng-srcset, ng-href are interpolated
-forEach(['src', 'srcset', 'href'], function(attrName) {
- var normalized = directiveNormalize('ng-' + attrName);
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- priority: 99, // it needs to run after the attributes are interpolated
- link: function(scope, element, attr) {
- var propName = attrName,
- name = attrName;
-
- if (attrName === 'href' &&
- toString.call(element.prop('href')) === '[object SVGAnimatedString]') {
- name = 'xlinkHref';
- attr.$attr[name] = 'xlink:href';
- propName = null;
- }
-
- attr.$observe(normalized, function(value) {
- if (!value) {
- if (attrName === 'href') {
- attr.$set(name, null);
- }
- return;
- }
-
- attr.$set(name, value);
-
- // on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist
- // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
- // to set the property as well to achieve the desired effect.
- // we use attr[attrName] value since $set can sanitize the url.
- if (msie && propName) element.prop(propName, attr[name]);
- });
- }
- };
- };
-});
-
-/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true
- */
-var nullFormCtrl = {
- $addControl: noop,
- $$renameControl: nullFormRenameControl,
- $removeControl: noop,
- $setValidity: noop,
- $setDirty: noop,
- $setPristine: noop,
- $setSubmitted: noop
-},
-SUBMITTED_CLASS = 'ng-submitted';
-
-function nullFormRenameControl(control, name) {
- control.$name = name;
-}
-
-/**
- * @ngdoc type
- * @name form.FormController
- *
- * @property {boolean} $pristine True if user has not interacted with the form yet.
- * @property {boolean} $dirty True if user has already interacted with the form.
- * @property {boolean} $valid True if all of the containing forms and controls are valid.
- * @property {boolean} $invalid True if at least one containing control or form is invalid.
- * @property {boolean} $pending True if at least one containing control or form is pending.
- * @property {boolean} $submitted True if user has submitted the form even if its invalid.
- *
- * @property {Object} $error Is an object hash, containing references to controls or
- * forms with failing validators, where:
- *
- * - keys are validation tokens (error names),
- * - values are arrays of controls or forms that have a failing validator for given error name.
- *
- * Built-in validation tokens:
- *
- * - `email`
- * - `max`
- * - `maxlength`
- * - `min`
- * - `minlength`
- * - `number`
- * - `pattern`
- * - `required`
- * - `url`
- * - `date`
- * - `datetimelocal`
- * - `time`
- * - `week`
- * - `month`
- *
- * @description
- * `FormController` keeps track of all its controls and nested forms as well as the state of them,
- * such as being valid/invalid or dirty/pristine.
- *
- * Each {@link ng.directive:form form} directive creates an instance
- * of `FormController`.
- *
- */
-//asks for $scope to fool the BC controller module
-FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];
-function FormController(element, attrs, $scope, $animate, $interpolate) {
- var form = this,
- controls = [];
-
- // init state
- form.$error = {};
- form.$$success = {};
- form.$pending = undefined;
- form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);
- form.$dirty = false;
- form.$pristine = true;
- form.$valid = true;
- form.$invalid = false;
- form.$submitted = false;
- form.$$parentForm = nullFormCtrl;
-
- /**
- * @ngdoc method
- * @name form.FormController#$rollbackViewValue
- *
- * @description
- * Rollback all form controls pending updates to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. This method is typically needed by the reset button of
- * a form that uses `ng-model-options` to pend updates.
- */
- form.$rollbackViewValue = function() {
- forEach(controls, function(control) {
- control.$rollbackViewValue();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$commitViewValue
- *
- * @description
- * Commit all form controls pending updates to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`
- * usually handles calling this in response to input events.
- */
- form.$commitViewValue = function() {
- forEach(controls, function(control) {
- control.$commitViewValue();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$addControl
- * @param {object} control control object, either a {@link form.FormController} or an
- * {@link ngModel.NgModelController}
- *
- * @description
- * Register a control with the form. Input elements using ngModelController do this automatically
- * when they are linked.
- *
- * Note that the current state of the control will not be reflected on the new parent form. This
- * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`
- * state.
- *
- * However, if the method is used programmatically, for example by adding dynamically created controls,
- * or controls that have been previously removed without destroying their corresponding DOM element,
- * it's the developers responsiblity to make sure the current state propagates to the parent form.
- *
- * For example, if an input control is added that is already `$dirty` and has `$error` properties,
- * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
- */
- form.$addControl = function(control) {
- // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored
- // and not added to the scope. Now we throw an error.
- assertNotHasOwnProperty(control.$name, 'input');
- controls.push(control);
-
- if (control.$name) {
- form[control.$name] = control;
- }
-
- control.$$parentForm = form;
- };
-
- // Private API: rename a form control
- form.$$renameControl = function(control, newName) {
- var oldName = control.$name;
-
- if (form[oldName] === control) {
- delete form[oldName];
- }
- form[newName] = control;
- control.$name = newName;
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$removeControl
- * @param {object} control control object, either a {@link form.FormController} or an
- * {@link ngModel.NgModelController}
- *
- * @description
- * Deregister a control from the form.
- *
- * Input elements using ngModelController do this automatically when they are destroyed.
- *
- * Note that only the removed control's validation state (`$errors`etc.) will be removed from the
- * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
- * different from case to case. For example, removing the only `$dirty` control from a form may or
- * may not mean that the form is still `$dirty`.
- */
- form.$removeControl = function(control) {
- if (control.$name && form[control.$name] === control) {
- delete form[control.$name];
- }
- forEach(form.$pending, function(value, name) {
- form.$setValidity(name, null, control);
- });
- forEach(form.$error, function(value, name) {
- form.$setValidity(name, null, control);
- });
- forEach(form.$$success, function(value, name) {
- form.$setValidity(name, null, control);
- });
-
- arrayRemove(controls, control);
- control.$$parentForm = nullFormCtrl;
- };
-
-
- /**
- * @ngdoc method
- * @name form.FormController#$setValidity
- *
- * @description
- * Sets the validity of a form control.
- *
- * This method will also propagate to parent forms.
- */
- addSetValidityMethod({
- ctrl: this,
- $element: element,
- set: function(object, property, controller) {
- var list = object[property];
- if (!list) {
- object[property] = [controller];
- } else {
- var index = list.indexOf(controller);
- if (index === -1) {
- list.push(controller);
- }
- }
- },
- unset: function(object, property, controller) {
- var list = object[property];
- if (!list) {
- return;
- }
- arrayRemove(list, controller);
- if (list.length === 0) {
- delete object[property];
- }
- },
- $animate: $animate
- });
-
- /**
- * @ngdoc method
- * @name form.FormController#$setDirty
- *
- * @description
- * Sets the form to a dirty state.
- *
- * This method can be called to add the 'ng-dirty' class and set the form to a dirty
- * state (ng-dirty class). This method will also propagate to parent forms.
- */
- form.$setDirty = function() {
- $animate.removeClass(element, PRISTINE_CLASS);
- $animate.addClass(element, DIRTY_CLASS);
- form.$dirty = true;
- form.$pristine = false;
- form.$$parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setPristine
- *
- * @description
- * Sets the form to its pristine state.
- *
- * This method can be called to remove the 'ng-dirty' class and set the form to its pristine
- * state (ng-pristine class). This method will also propagate to all the controls contained
- * in this form.
- *
- * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
- * saving or resetting it.
- */
- form.$setPristine = function() {
- $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);
- form.$dirty = false;
- form.$pristine = true;
- form.$submitted = false;
- forEach(controls, function(control) {
- control.$setPristine();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setUntouched
- *
- * @description
- * Sets the form to its untouched state.
- *
- * This method can be called to remove the 'ng-touched' class and set the form controls to their
- * untouched state (ng-untouched class).
- *
- * Setting a form controls back to their untouched state is often useful when setting the form
- * back to its pristine state.
- */
- form.$setUntouched = function() {
- forEach(controls, function(control) {
- control.$setUntouched();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setSubmitted
- *
- * @description
- * Sets the form to its submitted state.
- */
- form.$setSubmitted = function() {
- $animate.addClass(element, SUBMITTED_CLASS);
- form.$submitted = true;
- form.$$parentForm.$setSubmitted();
- };
-}
-
-/**
- * @ngdoc directive
- * @name ngForm
- * @restrict EAC
- *
- * @description
- * Nestable alias of {@link ng.directive:form `form`} directive. HTML
- * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
- * sub-group of controls needs to be determined.
- *
- * Note: the purpose of `ngForm` is to group controls,
- * but not to be a replacement for the `<form>` tag with all of its capabilities
- * (e.g. posting to the server, ...).
- *
- * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- *
- */
-
- /**
- * @ngdoc directive
- * @name form
- * @restrict E
- *
- * @description
- * Directive that instantiates
- * {@link form.FormController FormController}.
- *
- * If the `name` attribute is specified, the form controller is published onto the current scope under
- * this name.
- *
- * # Alias: {@link ng.directive:ngForm `ngForm`}
- *
- * In Angular, forms can be nested. This means that the outer form is valid when all of the child
- * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
- * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
- * `<form>` but can be nested. This allows you to have nested forms, which is very useful when
- * using Angular validation directives in forms that are dynamically generated using the
- * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`
- * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an
- * `ngForm` directive and nest these in an outer `form` element.
- *
- *
- * # CSS classes
- * - `ng-valid` is set if the form is valid.
- * - `ng-invalid` is set if the form is invalid.
- * - `ng-pending` is set if the form is pending.
- * - `ng-pristine` is set if the form is pristine.
- * - `ng-dirty` is set if the form is dirty.
- * - `ng-submitted` is set if the form was submitted.
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- *
- * # Submitting a form and preventing the default action
- *
- * Since the role of forms in client-side Angular applications is different than in classical
- * roundtrip apps, it is desirable for the browser not to translate the form submission into a full
- * page reload that sends the data to the server. Instead some javascript logic should be triggered
- * to handle the form submission in an application-specific way.
- *
- * For this reason, Angular prevents the default action (form submission to the server) unless the
- * `<form>` element has an `action` attribute specified.
- *
- * You can use one of the following two ways to specify what javascript method should be called when
- * a form is submitted:
- *
- * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element
- * - {@link ng.directive:ngClick ngClick} directive on the first
- * button or input field of type submit (input[type=submit])
- *
- * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}
- * or {@link ng.directive:ngClick ngClick} directives.
- * This is because of the following form submission rules in the HTML specification:
- *
- * - If a form has only one input field then hitting enter in this field triggers form submit
- * (`ngSubmit`)
- * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter
- * doesn't trigger submit
- * - if a form has one or more input fields and one or more buttons or input[type=submit] then
- * hitting enter in any of the input fields will trigger the click handler on the *first* button or
- * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)
- *
- * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is
- * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
- * to have access to the updated model.
- *
- * ## Animation Hooks
- *
- * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.
- * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any
- * other validations that are performed within the form. Animations in ngForm are similar to how
- * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well
- * as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style a form element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-form {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-form.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- <example deps="angular-animate.js" animations="true" fixBase="true" module="formExample">
- <file name="index.html">
- <script>
- angular.module('formExample', [])
- .controller('FormController', ['$scope', function($scope) {
- $scope.userType = 'guest';
- }]);
- </script>
- <style>
- .my-form {
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-form.ng-invalid {
- background: red;
- }
- </style>
- <form name="myForm" ng-controller="FormController" class="my-form">
- userType: <input name="input" ng-model="userType" required>
- <span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
- <code>userType = {{userType}}</code><br>
- <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>
- <code>myForm.input.$error = {{myForm.input.$error}}</code><br>
- <code>myForm.$valid = {{myForm.$valid}}</code><br>
- <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should initialize to model', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
-
- expect(userType.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
- var userInput = element(by.model('userType'));
-
- userInput.clear();
- userInput.sendKeys('');
-
- expect(userType.getText()).toEqual('userType =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- *
- * @param {string=} name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- */
-var formDirectiveFactory = function(isNgForm) {
- return ['$timeout', '$parse', function($timeout, $parse) {
- var formDirective = {
- name: 'form',
- restrict: isNgForm ? 'EAC' : 'E',
- require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form
- controller: FormController,
- compile: function ngFormCompile(formElement, attr) {
- // Setup initial state of the control
- formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);
-
- var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);
-
- return {
- pre: function ngFormPreLink(scope, formElement, attr, ctrls) {
- var controller = ctrls[0];
-
- // if `action` attr is not present on the form, prevent the default action (submission)
- if (!('action' in attr)) {
- // we can't use jq events because if a form is destroyed during submission the default
- // action is not prevented. see #1238
- //
- // IE 9 is not affected because it doesn't fire a submit event and try to do a full
- // page reload if the form was destroyed by submission of the form via a click handler
- // on a button in the form. Looks like an IE9 specific bug.
- var handleFormSubmission = function(event) {
- scope.$apply(function() {
- controller.$commitViewValue();
- controller.$setSubmitted();
- });
-
- event.preventDefault();
- };
-
- addEventListenerFn(formElement[0], 'submit', handleFormSubmission);
-
- // unregister the preventDefault listener so that we don't not leak memory but in a
- // way that will achieve the prevention of the default action.
- formElement.on('$destroy', function() {
- $timeout(function() {
- removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);
- }, 0, false);
- });
- }
-
- var parentFormCtrl = ctrls[1] || controller.$$parentForm;
- parentFormCtrl.$addControl(controller);
-
- var setter = nameAttr ? getSetter(controller.$name) : noop;
-
- if (nameAttr) {
- setter(scope, controller);
- attr.$observe(nameAttr, function(newValue) {
- if (controller.$name === newValue) return;
- setter(scope, undefined);
- controller.$$parentForm.$$renameControl(controller, newValue);
- setter = getSetter(controller.$name);
- setter(scope, controller);
- });
- }
- formElement.on('$destroy', function() {
- controller.$$parentForm.$removeControl(controller);
- setter(scope, undefined);
- extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
- });
- }
- };
- }
- };
-
- return formDirective;
-
- function getSetter(expression) {
- if (expression === '') {
- //create an assignable expression, so forms with an empty name can be renamed later
- return $parse('this[""]').assign;
- }
- return $parse(expression).assign || noop;
- }
- }];
-};
-
-var formDirective = formDirectiveFactory();
-var ngFormDirective = formDirectiveFactory(true);
-
-/* global VALID_CLASS: false,
- INVALID_CLASS: false,
- PRISTINE_CLASS: false,
- DIRTY_CLASS: false,
- UNTOUCHED_CLASS: false,
- TOUCHED_CLASS: false,
- ngModelMinErr: false,
-*/
-
-// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
-var ISO_DATE_REGEXP = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;
-// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)
-var URL_REGEXP = /^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/;
-var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
-var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
-var DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})$/;
-var DATETIMELOCAL_REGEXP = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
-var WEEK_REGEXP = /^(\d{4})-W(\d\d)$/;
-var MONTH_REGEXP = /^(\d{4})-(\d\d)$/;
-var TIME_REGEXP = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
-
-var inputType = {
-
- /**
- * @ngdoc input
- * @name input[text]
- *
- * @description
- * Standard HTML text input with angular data binding, inherited by most of the `input` elements.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Adds `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="text-input-directive" module="textInputExample">
- <file name="index.html">
- <script>
- angular.module('textInputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.example = {
- text: 'guest',
- word: /^\s*\w*\s*$/
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Single word:
- <input type="text" name="input" ng-model="example.text"
- ng-pattern="example.word" required ng-trim="false">
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.pattern">
- Single word only!</span>
- </div>
- <tt>text = {{example.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('example.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if multi word', function() {
- input.clear();
- input.sendKeys('hello world');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'text': textInputType,
-
- /**
- * @ngdoc input
- * @name input[date]
- *
- * @description
- * Input with date validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601
- * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many
- * modern browsers do not yet support this input type, it is important to provide cues to users on the
- * expected input format via a placeholder or label.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
- * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
- * (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Note that `min` will also add native HTML5
- * constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be
- * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
- * (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Note that `max` will also add native HTML5
- * constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="date-input-directive" module="dateInputExample">
- <file name="index.html">
- <script>
- angular.module('dateInputExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 9, 22)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a date in 2013:</label>
- <input type="date" id="exampleInput" name="input" ng-model="example.value"
- placeholder="yyyy-MM-dd" min="2013-01-01" max="2013-12-31" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.date">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM-dd"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM-dd"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (see https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-10-22');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01-01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'date': createDateInputType('date', DATE_REGEXP,
- createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),
- 'yyyy-MM-dd'),
-
- /**
- * @ngdoc input
- * @name input[datetime-local]
- *
- * @description
- * Input with datetime validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
- * inside this attribute (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
- * Note that `min` will also add native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
- * inside this attribute (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
- * Note that `max` will also add native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="datetimelocal-input-directive" module="dateExample">
- <file name="index.html">
- <script>
- angular.module('dateExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2010, 11, 28, 14, 57)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a date between in 2013:</label>
- <input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
- placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.datetimelocal">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2010-12-28T14:57:00');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01-01T23:59:00');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,
- createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),
- 'yyyy-MM-ddTHH:mm:ss.sss'),
-
- /**
- * @ngdoc input
- * @name input[time]
- *
- * @description
- * Input with time validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a
- * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
- * attribute (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the
- * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the
- * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="time-input-directive" module="timeExample">
- <file name="index.html">
- <script>
- angular.module('timeExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(1970, 0, 1, 14, 57, 0)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a between 8am and 5pm:</label>
- <input type="time" id="exampleInput" name="input" ng-model="example.value"
- placeholder="HH:mm:ss" min="08:00:00" max="17:00:00" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.time">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "HH:mm:ss"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "HH:mm:ss"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('14:57:00');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('23:59:00');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'time': createDateInputType('time', TIME_REGEXP,
- createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),
- 'HH:mm:ss.sss'),
-
- /**
- * @ngdoc input
- * @name input[week]
- *
- * @description
- * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support
- * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * week format (yyyy-W##), for example: `2013-W02`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
- * attribute (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="week-input-directive" module="weekExample">
- <file name="index.html">
- <script>
- angular.module('weekExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 0, 3)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label>Pick a date between in 2013:
- <input id="exampleInput" type="week" name="input" ng-model="example.value"
- placeholder="YYYY-W##" min="2012-W32"
- max="2013-W52" required />
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.week">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-Www"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-Www"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-W01');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-W01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),
-
- /**
- * @ngdoc input
- * @name input[month]
- *
- * @description
- * Input with month validation and transformation. In browsers that do not yet support
- * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * month format (yyyy-MM), for example: `2009-01`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- * If the model is not set to the first of the month, the next view to model update will set it
- * to the first of the month.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
- * attribute (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
-
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="month-input-directive" module="monthExample">
- <file name="index.html">
- <script>
- angular.module('monthExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 9, 1)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a month in 2013:</label>
- <input id="exampleInput" type="month" name="input" ng-model="example.value"
- placeholder="yyyy-MM" min="2013-01" max="2013-12" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.month">
- Not a valid month!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-10');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'month': createDateInputType('month', MONTH_REGEXP,
- createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),
- 'yyyy-MM'),
-
- /**
- * @ngdoc input
- * @name input[number]
- *
- * @description
- * Text input with number validation and transformation. Sets the `number` validation
- * error if not a valid number.
- *
- * <div class="alert alert-warning">
- * The model must always be of type `number` otherwise Angular will throw an error.
- * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}
- * error docs for more information and an example of how to convert your model if necessary.
- * </div>
- *
- * ## Issues with HTML5 constraint validation
- *
- * In browsers that follow the
- * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),
- * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.
- * If a non-number is entered in the input, the browser will report the value as an empty string,
- * which means the view / model values in `ngModel` and subsequently the scope value
- * will also be an empty string.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="number-input-directive" module="numberExample">
- <file name="index.html">
- <script>
- angular.module('numberExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.example = {
- value: 12
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Number:
- <input type="number" name="input" ng-model="example.value"
- min="0" max="99" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.number">
- Not valid number!</span>
- </div>
- <tt>value = {{example.value}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('12');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if over max', function() {
- input.clear();
- input.sendKeys('123');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'number': numberInputType,
-
-
- /**
- * @ngdoc input
- * @name input[url]
- *
- * @description
- * Text input with URL validation. Sets the `url` validation error key if the content is not a
- * valid URL.
- *
- * <div class="alert alert-warning">
- * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex
- * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify
- * the built-in validators (see the {@link guide/forms Forms guide})
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="url-input-directive" module="urlExample">
- <file name="index.html">
- <script>
- angular.module('urlExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.url = {
- text: 'http://google.com'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>URL:
- <input type="url" name="input" ng-model="url.text" required>
- <label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.url">
- Not valid url!</span>
- </div>
- <tt>text = {{url.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('url.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('url.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('http://google.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not url', function() {
- input.clear();
- input.sendKeys('box');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'url': urlInputType,
-
-
- /**
- * @ngdoc input
- * @name input[email]
- *
- * @description
- * Text input with email validation. Sets the `email` validation error key if not a valid email
- * address.
- *
- * <div class="alert alert-warning">
- * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex
- * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can
- * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="email-input-directive" module="emailExample">
- <file name="index.html">
- <script>
- angular.module('emailExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.email = {
- text: 'me@example.com'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Email:
- <input type="email" name="input" ng-model="email.text" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.email">
- Not valid email!</span>
- </div>
- <tt>text = {{email.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('email.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('email.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('me@example.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not email', function() {
- input.clear();
- input.sendKeys('xxx');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'email': emailInputType,
-
-
- /**
- * @ngdoc input
- * @name input[radio]
- *
- * @description
- * HTML radio button.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string} value The value to which the `ngModel` expression should be set when selected.
- * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,
- * too. Use `ngValue` if you need complex models (`number`, `object`, ...).
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio
- * is selected. Should be used instead of the `value` attribute if you need
- * a non-string `ngModel` (`boolean`, `array`, ...).
- *
- * @example
- <example name="radio-input-directive" module="radioExample">
- <file name="index.html">
- <script>
- angular.module('radioExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.color = {
- name: 'blue'
- };
- $scope.specialValue = {
- "id": "12345",
- "value": "green"
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>
- <input type="radio" ng-model="color.name" value="red">
- Red
- </label><br/>
- <label>
- <input type="radio" ng-model="color.name" ng-value="specialValue">
- Green
- </label><br/>
- <label>
- <input type="radio" ng-model="color.name" value="blue">
- Blue
- </label><br/>
- <tt>color = {{color.name | json}}</tt><br/>
- </form>
- Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`.
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var color = element(by.binding('color.name'));
-
- expect(color.getText()).toContain('blue');
-
- element.all(by.model('color.name')).get(0).click();
-
- expect(color.getText()).toContain('red');
- });
- </file>
- </example>
- */
- 'radio': radioInputType,
-
-
- /**
- * @ngdoc input
- * @name input[checkbox]
- *
- * @description
- * HTML checkbox.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {expression=} ngTrueValue The value to which the expression should be set when selected.
- * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="checkbox-input-directive" module="checkboxExample">
- <file name="index.html">
- <script>
- angular.module('checkboxExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.checkboxModel = {
- value1 : true,
- value2 : 'YES'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Value1:
- <input type="checkbox" ng-model="checkboxModel.value1">
- </label><br/>
- <label>Value2:
- <input type="checkbox" ng-model="checkboxModel.value2"
- ng-true-value="'YES'" ng-false-value="'NO'">
- </label><br/>
- <tt>value1 = {{checkboxModel.value1}}</tt><br/>
- <tt>value2 = {{checkboxModel.value2}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var value1 = element(by.binding('checkboxModel.value1'));
- var value2 = element(by.binding('checkboxModel.value2'));
-
- expect(value1.getText()).toContain('true');
- expect(value2.getText()).toContain('YES');
-
- element(by.model('checkboxModel.value1')).click();
- element(by.model('checkboxModel.value2')).click();
-
- expect(value1.getText()).toContain('false');
- expect(value2.getText()).toContain('NO');
- });
- </file>
- </example>
- */
- 'checkbox': checkboxInputType,
-
- 'hidden': noop,
- 'button': noop,
- 'submit': noop,
- 'reset': noop,
- 'file': noop
-};
-
-function stringBasedInputType(ctrl) {
- ctrl.$formatters.push(function(value) {
- return ctrl.$isEmpty(value) ? value : value.toString();
- });
-}
-
-function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-}
-
-function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- var type = lowercase(element[0].type);
-
- // In composition mode, users are still inputing intermediate text buffer,
- // hold the listener until composition is done.
- // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent
- if (!$sniffer.android) {
- var composing = false;
-
- element.on('compositionstart', function(data) {
- composing = true;
- });
-
- element.on('compositionend', function() {
- composing = false;
- listener();
- });
- }
-
- var listener = function(ev) {
- if (timeout) {
- $browser.defer.cancel(timeout);
- timeout = null;
- }
- if (composing) return;
- var value = element.val(),
- event = ev && ev.type;
-
- // By default we will trim the value
- // If the attribute ng-trim exists we will avoid trimming
- // If input type is 'password', the value is never trimmed
- if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {
- value = trim(value);
- }
-
- // If a control is suffering from bad input (due to native validators), browsers discard its
- // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the
- // control's value is the same empty value twice in a row.
- if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {
- ctrl.$setViewValue(value, event);
- }
- };
-
- // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the
- // input event on backspace, delete or cut
- if ($sniffer.hasEvent('input')) {
- element.on('input', listener);
- } else {
- var timeout;
-
- var deferListener = function(ev, input, origValue) {
- if (!timeout) {
- timeout = $browser.defer(function() {
- timeout = null;
- if (!input || input.value !== origValue) {
- listener(ev);
- }
- });
- }
- };
-
- element.on('keydown', function(event) {
- var key = event.keyCode;
-
- // ignore
- // command modifiers arrows
- if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;
-
- deferListener(event, this, this.value);
- });
-
- // if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it
- if ($sniffer.hasEvent('paste')) {
- element.on('paste cut', deferListener);
- }
- }
-
- // if user paste into input using mouse on older browser
- // or form autocomplete on newer browser, we need "change" event to catch it
- element.on('change', listener);
-
- ctrl.$render = function() {
- // Workaround for Firefox validation #12102.
- var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;
- if (element.val() !== value) {
- element.val(value);
- }
- };
-}
-
-function weekParser(isoWeek, existingDate) {
- if (isDate(isoWeek)) {
- return isoWeek;
- }
-
- if (isString(isoWeek)) {
- WEEK_REGEXP.lastIndex = 0;
- var parts = WEEK_REGEXP.exec(isoWeek);
- if (parts) {
- var year = +parts[1],
- week = +parts[2],
- hours = 0,
- minutes = 0,
- seconds = 0,
- milliseconds = 0,
- firstThurs = getFirstThursdayOfYear(year),
- addDays = (week - 1) * 7;
-
- if (existingDate) {
- hours = existingDate.getHours();
- minutes = existingDate.getMinutes();
- seconds = existingDate.getSeconds();
- milliseconds = existingDate.getMilliseconds();
- }
-
- return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);
- }
- }
-
- return NaN;
-}
-
-function createDateParser(regexp, mapping) {
- return function(iso, date) {
- var parts, map;
-
- if (isDate(iso)) {
- return iso;
- }
-
- if (isString(iso)) {
- // When a date is JSON'ified to wraps itself inside of an extra
- // set of double quotes. This makes the date parsing code unable
- // to match the date string and parse it as a date.
- if (iso.charAt(0) == '"' && iso.charAt(iso.length - 1) == '"') {
- iso = iso.substring(1, iso.length - 1);
- }
- if (ISO_DATE_REGEXP.test(iso)) {
- return new Date(iso);
- }
- regexp.lastIndex = 0;
- parts = regexp.exec(iso);
-
- if (parts) {
- parts.shift();
- if (date) {
- map = {
- yyyy: date.getFullYear(),
- MM: date.getMonth() + 1,
- dd: date.getDate(),
- HH: date.getHours(),
- mm: date.getMinutes(),
- ss: date.getSeconds(),
- sss: date.getMilliseconds() / 1000
- };
- } else {
- map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };
- }
-
- forEach(parts, function(part, index) {
- if (index < mapping.length) {
- map[mapping[index]] = +part;
- }
- });
- return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);
- }
- }
-
- return NaN;
- };
-}
-
-function createDateInputType(type, regexp, parseDate, format) {
- return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {
- badInputChecker(scope, element, attr, ctrl);
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- var timezone = ctrl && ctrl.$options && ctrl.$options.timezone;
- var previousDate;
-
- ctrl.$$parserName = type;
- ctrl.$parsers.push(function(value) {
- if (ctrl.$isEmpty(value)) return null;
- if (regexp.test(value)) {
- // Note: We cannot read ctrl.$modelValue, as there might be a different
- // parser/formatter in the processing chain so that the model
- // contains some different data format!
- var parsedDate = parseDate(value, previousDate);
- if (timezone) {
- parsedDate = convertTimezoneToLocal(parsedDate, timezone);
- }
- return parsedDate;
- }
- return undefined;
- });
-
- ctrl.$formatters.push(function(value) {
- if (value && !isDate(value)) {
- throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);
- }
- if (isValidDate(value)) {
- previousDate = value;
- if (previousDate && timezone) {
- previousDate = convertTimezoneToLocal(previousDate, timezone, true);
- }
- return $filter('date')(value, format, timezone);
- } else {
- previousDate = null;
- return '';
- }
- });
-
- if (isDefined(attr.min) || attr.ngMin) {
- var minVal;
- ctrl.$validators.min = function(value) {
- return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;
- };
- attr.$observe('min', function(val) {
- minVal = parseObservedDateValue(val);
- ctrl.$validate();
- });
- }
-
- if (isDefined(attr.max) || attr.ngMax) {
- var maxVal;
- ctrl.$validators.max = function(value) {
- return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;
- };
- attr.$observe('max', function(val) {
- maxVal = parseObservedDateValue(val);
- ctrl.$validate();
- });
- }
-
- function isValidDate(value) {
- // Invalid Date: getTime() returns NaN
- return value && !(value.getTime && value.getTime() !== value.getTime());
- }
-
- function parseObservedDateValue(val) {
- return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val;
- }
- };
-}
-
-function badInputChecker(scope, element, attr, ctrl) {
- var node = element[0];
- var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);
- if (nativeValidation) {
- ctrl.$parsers.push(function(value) {
- var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};
- // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):
- // - also sets validity.badInput (should only be validity.typeMismatch).
- // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)
- // - can ignore this case as we can still read out the erroneous email...
- return validity.badInput && !validity.typeMismatch ? undefined : value;
- });
- }
-}
-
-function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- badInputChecker(scope, element, attr, ctrl);
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
-
- ctrl.$$parserName = 'number';
- ctrl.$parsers.push(function(value) {
- if (ctrl.$isEmpty(value)) return null;
- if (NUMBER_REGEXP.test(value)) return parseFloat(value);
- return undefined;
- });
-
- ctrl.$formatters.push(function(value) {
- if (!ctrl.$isEmpty(value)) {
- if (!isNumber(value)) {
- throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);
- }
- value = value.toString();
- }
- return value;
- });
-
- if (isDefined(attr.min) || attr.ngMin) {
- var minVal;
- ctrl.$validators.min = function(value) {
- return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;
- };
-
- attr.$observe('min', function(val) {
- if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val, 10);
- }
- minVal = isNumber(val) && !isNaN(val) ? val : undefined;
- // TODO(matsko): implement validateLater to reduce number of validations
- ctrl.$validate();
- });
- }
-
- if (isDefined(attr.max) || attr.ngMax) {
- var maxVal;
- ctrl.$validators.max = function(value) {
- return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;
- };
-
- attr.$observe('max', function(val) {
- if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val, 10);
- }
- maxVal = isNumber(val) && !isNaN(val) ? val : undefined;
- // TODO(matsko): implement validateLater to reduce number of validations
- ctrl.$validate();
- });
- }
-}
-
-function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- // Note: no badInputChecker here by purpose as `url` is only a validation
- // in browsers, i.e. we can always read out input.value even if it is not valid!
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-
- ctrl.$$parserName = 'url';
- ctrl.$validators.url = function(modelValue, viewValue) {
- var value = modelValue || viewValue;
- return ctrl.$isEmpty(value) || URL_REGEXP.test(value);
- };
-}
-
-function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- // Note: no badInputChecker here by purpose as `url` is only a validation
- // in browsers, i.e. we can always read out input.value even if it is not valid!
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-
- ctrl.$$parserName = 'email';
- ctrl.$validators.email = function(modelValue, viewValue) {
- var value = modelValue || viewValue;
- return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);
- };
-}
-
-function radioInputType(scope, element, attr, ctrl) {
- // make the name unique, if not defined
- if (isUndefined(attr.name)) {
- element.attr('name', nextUid());
- }
-
- var listener = function(ev) {
- if (element[0].checked) {
- ctrl.$setViewValue(attr.value, ev && ev.type);
- }
- };
-
- element.on('click', listener);
-
- ctrl.$render = function() {
- var value = attr.value;
- element[0].checked = (value == ctrl.$viewValue);
- };
-
- attr.$observe('value', ctrl.$render);
-}
-
-function parseConstantExpr($parse, context, name, expression, fallback) {
- var parseFn;
- if (isDefined(expression)) {
- parseFn = $parse(expression);
- if (!parseFn.constant) {
- throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
- '`{1}`.', name, expression);
- }
- return parseFn(context);
- }
- return fallback;
-}
-
-function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
- var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);
- var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);
-
- var listener = function(ev) {
- ctrl.$setViewValue(element[0].checked, ev && ev.type);
- };
-
- element.on('click', listener);
-
- ctrl.$render = function() {
- element[0].checked = ctrl.$viewValue;
- };
-
- // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`
- // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert
- // it to a boolean.
- ctrl.$isEmpty = function(value) {
- return value === false;
- };
-
- ctrl.$formatters.push(function(value) {
- return equals(value, trueValue);
- });
-
- ctrl.$parsers.push(function(value) {
- return value ? trueValue : falseValue;
- });
-}
-
-
-/**
- * @ngdoc directive
- * @name textarea
- * @restrict E
- *
- * @description
- * HTML textarea element control with angular data-binding. The data-binding and validation
- * properties of this element are exactly the same as those of the
- * {@link ng.directive:input input element}.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
- * length.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- */
-
-
-/**
- * @ngdoc directive
- * @name input
- * @restrict E
- *
- * @description
- * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,
- * input state control, and validation.
- * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.
- *
- * <div class="alert alert-warning">
- * **Note:** Not every feature offered is available for all input types.
- * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {boolean=} ngRequired Sets `required` attribute if set to true
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
- * length.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="input-directive" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = {name: 'guest', last: 'visitor'};
- }]);
- </script>
- <div ng-controller="ExampleController">
- <form name="myForm">
- <label>
- User name:
- <input type="text" name="userName" ng-model="user.name" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.userName.$error.required">
- Required!</span>
- </div>
- <label>
- Last name:
- <input type="text" name="lastName" ng-model="user.last"
- ng-minlength="3" ng-maxlength="10">
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.lastName.$error.minlength">
- Too short!</span>
- <span class="error" ng-show="myForm.lastName.$error.maxlength">
- Too long!</span>
- </div>
- </form>
- <hr>
- <tt>user = {{user}}</tt><br/>
- <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>
- <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>
- <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>
- <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>
- <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var user = element(by.exactBinding('user'));
- var userNameValid = element(by.binding('myForm.userName.$valid'));
- var lastNameValid = element(by.binding('myForm.lastName.$valid'));
- var lastNameError = element(by.binding('myForm.lastName.$error'));
- var formValid = element(by.binding('myForm.$valid'));
- var userNameInput = element(by.model('user.name'));
- var userLastInput = element(by.model('user.last'));
-
- it('should initialize to model', function() {
- expect(user.getText()).toContain('{"name":"guest","last":"visitor"}');
- expect(userNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if empty when required', function() {
- userNameInput.clear();
- userNameInput.sendKeys('');
-
- expect(user.getText()).toContain('{"last":"visitor"}');
- expect(userNameValid.getText()).toContain('false');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be valid if empty when min length is set', function() {
- userLastInput.clear();
- userLastInput.sendKeys('');
-
- expect(user.getText()).toContain('{"name":"guest","last":""}');
- expect(lastNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if less than required min length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('xx');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('minlength');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be invalid if longer than max length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('some ridiculously long name');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('maxlength');
- expect(formValid.getText()).toContain('false');
- });
- </file>
- </example>
- */
-var inputDirective = ['$browser', '$sniffer', '$filter', '$parse',
- function($browser, $sniffer, $filter, $parse) {
- return {
- restrict: 'E',
- require: ['?ngModel'],
- link: {
- pre: function(scope, element, attr, ctrls) {
- if (ctrls[0]) {
- (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
- $browser, $filter, $parse);
- }
- }
- }
- };
-}];
-
-
-
-var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
-/**
- * @ngdoc directive
- * @name ngValue
- *
- * @description
- * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},
- * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to
- * the bound value.
- *
- * `ngValue` is useful when dynamically generating lists of radio buttons using
- * {@link ngRepeat `ngRepeat`}, as shown below.
- *
- * Likewise, `ngValue` can be used to generate `<option>` elements for
- * the {@link select `select`} element. In that case however, only strings are supported
- * for the `value `attribute, so the resulting `ngModel` will always be a string.
- * Support for `select` models with non-string values is available via `ngOptions`.
- *
- * @element input
- * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute
- * of the `input` element
- *
- * @example
- <example name="ngValue-directive" module="valueExample">
- <file name="index.html">
- <script>
- angular.module('valueExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.names = ['pizza', 'unicorns', 'robots'];
- $scope.my = { favorite: 'unicorns' };
- }]);
- </script>
- <form ng-controller="ExampleController">
- <h2>Which is your favorite?</h2>
- <label ng-repeat="name in names" for="{{name}}">
- {{name}}
- <input type="radio"
- ng-model="my.favorite"
- ng-value="name"
- id="{{name}}"
- name="favorite">
- </label>
- <div>You chose {{my.favorite}}</div>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var favorite = element(by.binding('my.favorite'));
-
- it('should initialize to model', function() {
- expect(favorite.getText()).toContain('unicorns');
- });
- it('should bind the values to the inputs', function() {
- element.all(by.model('my.favorite')).get(0).click();
- expect(favorite.getText()).toContain('pizza');
- });
- </file>
- </example>
- */
-var ngValueDirective = function() {
- return {
- restrict: 'A',
- priority: 100,
- compile: function(tpl, tplAttr) {
- if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {
- return function ngValueConstantLink(scope, elm, attr) {
- attr.$set('value', scope.$eval(attr.ngValue));
- };
- } else {
- return function ngValueLink(scope, elm, attr) {
- scope.$watch(attr.ngValue, function valueWatchAction(value) {
- attr.$set('value', value);
- });
- };
- }
- }
- };
-};
-
-/**
- * @ngdoc directive
- * @name ngBind
- * @restrict AC
- *
- * @description
- * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element
- * with the value of a given expression, and to update the text content when the value of that
- * expression changes.
- *
- * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
- * `{{ expression }}` which is similar but less verbose.
- *
- * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily
- * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
- * element attribute, it makes the bindings invisible to the user while the page is loading.
- *
- * An alternative solution to this problem would be using the
- * {@link ng.directive:ngCloak ngCloak} directive.
- *
- *
- * @element ANY
- * @param {expression} ngBind {@link guide/expression Expression} to evaluate.
- *
- * @example
- * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.name = 'Whirled';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Enter name: <input type="text" ng-model="name"></label><br>
- Hello <span ng-bind="name"></span>!
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var nameInput = element(by.model('name'));
-
- expect(element(by.binding('name')).getText()).toBe('Whirled');
- nameInput.clear();
- nameInput.sendKeys('world');
- expect(element(by.binding('name')).getText()).toBe('world');
- });
- </file>
- </example>
- */
-var ngBindDirective = ['$compile', function($compile) {
- return {
- restrict: 'AC',
- compile: function ngBindCompile(templateElement) {
- $compile.$$addBindingClass(templateElement);
- return function ngBindLink(scope, element, attr) {
- $compile.$$addBindingInfo(element, attr.ngBind);
- element = element[0];
- scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
- element.textContent = isUndefined(value) ? '' : value;
- });
- };
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindTemplate
- *
- * @description
- * The `ngBindTemplate` directive specifies that the element
- * text content should be replaced with the interpolation of the template
- * in the `ngBindTemplate` attribute.
- * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
- * expressions. This directive is needed since some HTML elements
- * (such as TITLE and OPTION) cannot contain SPAN elements.
- *
- * @element ANY
- * @param {string} ngBindTemplate template of form
- * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.
- *
- * @example
- * Try it here: enter text in text box and watch the greeting change.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.salutation = 'Hello';
- $scope.name = 'World';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Salutation: <input type="text" ng-model="salutation"></label><br>
- <label>Name: <input type="text" ng-model="name"></label><br>
- <pre ng-bind-template="{{salutation}} {{name}}!"></pre>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var salutationElem = element(by.binding('salutation'));
- var salutationInput = element(by.model('salutation'));
- var nameInput = element(by.model('name'));
-
- expect(salutationElem.getText()).toBe('Hello World!');
-
- salutationInput.clear();
- salutationInput.sendKeys('Greetings');
- nameInput.clear();
- nameInput.sendKeys('user');
-
- expect(salutationElem.getText()).toBe('Greetings user!');
- });
- </file>
- </example>
- */
-var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {
- return {
- compile: function ngBindTemplateCompile(templateElement) {
- $compile.$$addBindingClass(templateElement);
- return function ngBindTemplateLink(scope, element, attr) {
- var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));
- $compile.$$addBindingInfo(element, interpolateFn.expressions);
- element = element[0];
- attr.$observe('ngBindTemplate', function(value) {
- element.textContent = isUndefined(value) ? '' : value;
- });
- };
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindHtml
- *
- * @description
- * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,
- * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.
- * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link
- * ngSanitize} in your module's dependencies (not in core Angular). In order to use {@link ngSanitize}
- * in your module's dependencies, you need to include "angular-sanitize.js" in your application.
- *
- * You may also bypass sanitization for values you know are safe. To do so, bind to
- * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example
- * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.
- *
- * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you
- * will have an exception (instead of an exploit.)
- *
- * @element ANY
- * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
- *
- * @example
-
- <example module="bindHtmlExample" deps="angular-sanitize.js">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p ng-bind-html="myHTML"></p>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('bindHtmlExample', ['ngSanitize'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.myHTML =
- 'I am an <code>HTML</code>string with ' +
- '<a href="#">links!</a> and other <em>stuff</em>';
- }]);
- </file>
-
- <file name="protractor.js" type="protractor">
- it('should check ng-bind-html', function() {
- expect(element(by.binding('myHTML')).getText()).toBe(
- 'I am an HTMLstring with links! and other stuff');
- });
- </file>
- </example>
- */
-var ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {
- return {
- restrict: 'A',
- compile: function ngBindHtmlCompile(tElement, tAttrs) {
- var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);
- var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {
- return (value || '').toString();
- });
- $compile.$$addBindingClass(tElement);
-
- return function ngBindHtmlLink(scope, element, attr) {
- $compile.$$addBindingInfo(element, attr.ngBindHtml);
-
- scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {
- // we re-evaluate the expr because we want a TrustedValueHolderType
- // for $sce, not a string
- element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');
- });
- };
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngChange
- *
- * @description
- * Evaluate the given expression when the user changes the input.
- * The expression is evaluated immediately, unlike the JavaScript onchange event
- * which only triggers at the end of a change (usually, when the user leaves the
- * form element or presses the return key).
- *
- * The `ngChange` expression is only evaluated when a change in the input value causes
- * a new value to be committed to the model.
- *
- * It will not be evaluated:
- * * if the value returned from the `$parsers` transformation pipeline has not changed
- * * if the input has continued to be invalid since the model will stay `null`
- * * if the model is changed programmatically and not by a change to the input value
- *
- *
- * Note, this directive requires `ngModel` to be present.
- *
- * @element input
- * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change
- * in input value.
- *
- * @example
- * <example name="ngChange-directive" module="changeExample">
- * <file name="index.html">
- * <script>
- * angular.module('changeExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.counter = 0;
- * $scope.change = function() {
- * $scope.counter++;
- * };
- * }]);
- * </script>
- * <div ng-controller="ExampleController">
- * <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
- * <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
- * <label for="ng-change-example2">Confirmed</label><br />
- * <tt>debug = {{confirmed}}</tt><br/>
- * <tt>counter = {{counter}}</tt><br/>
- * </div>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var counter = element(by.binding('counter'));
- * var debug = element(by.binding('confirmed'));
- *
- * it('should evaluate the expression if changing from view', function() {
- * expect(counter.getText()).toContain('0');
- *
- * element(by.id('ng-change-example1')).click();
- *
- * expect(counter.getText()).toContain('1');
- * expect(debug.getText()).toContain('true');
- * });
- *
- * it('should not evaluate the expression if changing from model', function() {
- * element(by.id('ng-change-example2')).click();
-
- * expect(counter.getText()).toContain('0');
- * expect(debug.getText()).toContain('true');
- * });
- * </file>
- * </example>
- */
-var ngChangeDirective = valueFn({
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- ctrl.$viewChangeListeners.push(function() {
- scope.$eval(attr.ngChange);
- });
- }
-});
-
-function classDirective(name, selector) {
- name = 'ngClass' + name;
- return ['$animate', function($animate) {
- return {
- restrict: 'AC',
- link: function(scope, element, attr) {
- var oldVal;
-
- scope.$watch(attr[name], ngClassWatchAction, true);
-
- attr.$observe('class', function(value) {
- ngClassWatchAction(scope.$eval(attr[name]));
- });
-
-
- if (name !== 'ngClass') {
- scope.$watch('$index', function($index, old$index) {
- // jshint bitwise: false
- var mod = $index & 1;
- if (mod !== (old$index & 1)) {
- var classes = arrayClasses(scope.$eval(attr[name]));
- mod === selector ?
- addClasses(classes) :
- removeClasses(classes);
- }
- });
- }
-
- function addClasses(classes) {
- var newClasses = digestClassCounts(classes, 1);
- attr.$addClass(newClasses);
- }
-
- function removeClasses(classes) {
- var newClasses = digestClassCounts(classes, -1);
- attr.$removeClass(newClasses);
- }
-
- function digestClassCounts(classes, count) {
- // Use createMap() to prevent class assumptions involving property
- // names in Object.prototype
- var classCounts = element.data('$classCounts') || createMap();
- var classesToUpdate = [];
- forEach(classes, function(className) {
- if (count > 0 || classCounts[className]) {
- classCounts[className] = (classCounts[className] || 0) + count;
- if (classCounts[className] === +(count > 0)) {
- classesToUpdate.push(className);
- }
- }
- });
- element.data('$classCounts', classCounts);
- return classesToUpdate.join(' ');
- }
-
- function updateClasses(oldClasses, newClasses) {
- var toAdd = arrayDifference(newClasses, oldClasses);
- var toRemove = arrayDifference(oldClasses, newClasses);
- toAdd = digestClassCounts(toAdd, 1);
- toRemove = digestClassCounts(toRemove, -1);
- if (toAdd && toAdd.length) {
- $animate.addClass(element, toAdd);
- }
- if (toRemove && toRemove.length) {
- $animate.removeClass(element, toRemove);
- }
- }
-
- function ngClassWatchAction(newVal) {
- if (selector === true || scope.$index % 2 === selector) {
- var newClasses = arrayClasses(newVal || []);
- if (!oldVal) {
- addClasses(newClasses);
- } else if (!equals(newVal,oldVal)) {
- var oldClasses = arrayClasses(oldVal);
- updateClasses(oldClasses, newClasses);
- }
- }
- oldVal = shallowCopy(newVal);
- }
- }
- };
-
- function arrayDifference(tokens1, tokens2) {
- var values = [];
-
- outer:
- for (var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for (var j = 0; j < tokens2.length; j++) {
- if (token == tokens2[j]) continue outer;
- }
- values.push(token);
- }
- return values;
- }
-
- function arrayClasses(classVal) {
- var classes = [];
- if (isArray(classVal)) {
- forEach(classVal, function(v) {
- classes = classes.concat(arrayClasses(v));
- });
- return classes;
- } else if (isString(classVal)) {
- return classVal.split(' ');
- } else if (isObject(classVal)) {
- forEach(classVal, function(v, k) {
- if (v) {
- classes = classes.concat(k.split(' '));
- }
- });
- return classes;
- }
- return classVal;
- }
- }];
-}
-
-/**
- * @ngdoc directive
- * @name ngClass
- * @restrict AC
- *
- * @description
- * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding
- * an expression that represents all classes to be added.
- *
- * The directive operates in three different ways, depending on which of three types the expression
- * evaluates to:
- *
- * 1. If the expression evaluates to a string, the string should be one or more space-delimited class
- * names.
- *
- * 2. If the expression evaluates to an object, then for each key-value pair of the
- * object with a truthy value the corresponding key is used as a class name.
- *
- * 3. If the expression evaluates to an array, each element of the array should either be a string as in
- * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array
- * to give you more control over what CSS classes appear. See the code below for an example of this.
- *
- *
- * The directive won't add duplicate classes if a particular class was already set.
- *
- * When the expression changes, the previously added classes are removed and only then are the
- * new classes added.
- *
- * @animations
- * **add** - happens just before the class is applied to the elements
- *
- * **remove** - happens just before the class is removed from the element
- *
- * @element ANY
- * @param {expression} ngClass {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class
- * names, an array, or a map of class names to boolean values. In the case of a map, the
- * names of the properties whose values are truthy will be added as css classes to the
- * element.
- *
- * @example Example that demonstrates basic bindings via ngClass directive.
- <example>
- <file name="index.html">
- <p ng-class="{strike: deleted, bold: important, 'has-error': error}">Map Syntax Example</p>
- <label>
- <input type="checkbox" ng-model="deleted">
- deleted (apply "strike" class)
- </label><br>
- <label>
- <input type="checkbox" ng-model="important">
- important (apply "bold" class)
- </label><br>
- <label>
- <input type="checkbox" ng-model="error">
- error (apply "has-error" class)
- </label>
- <hr>
- <p ng-class="style">Using String Syntax</p>
- <input type="text" ng-model="style"
- placeholder="Type: bold strike red" aria-label="Type: bold strike red">
- <hr>
- <p ng-class="[style1, style2, style3]">Using Array Syntax</p>
- <input ng-model="style1"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red"><br>
- <input ng-model="style2"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 2"><br>
- <input ng-model="style3"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 3"><br>
- <hr>
- <p ng-class="[style4, {orange: warning}]">Using Array and Map Syntax</p>
- <input ng-model="style4" placeholder="Type: bold, strike" aria-label="Type: bold, strike"><br>
- <label><input type="checkbox" ng-model="warning"> warning (apply "orange" class)</label>
- </file>
- <file name="style.css">
- .strike {
- text-decoration: line-through;
- }
- .bold {
- font-weight: bold;
- }
- .red {
- color: red;
- }
- .has-error {
- color: red;
- background-color: yellow;
- }
- .orange {
- color: orange;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var ps = element.all(by.css('p'));
-
- it('should let you toggle the class', function() {
-
- expect(ps.first().getAttribute('class')).not.toMatch(/bold/);
- expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);
-
- element(by.model('important')).click();
- expect(ps.first().getAttribute('class')).toMatch(/bold/);
-
- element(by.model('error')).click();
- expect(ps.first().getAttribute('class')).toMatch(/has-error/);
- });
-
- it('should let you toggle string example', function() {
- expect(ps.get(1).getAttribute('class')).toBe('');
- element(by.model('style')).clear();
- element(by.model('style')).sendKeys('red');
- expect(ps.get(1).getAttribute('class')).toBe('red');
- });
-
- it('array example should have 3 classes', function() {
- expect(ps.get(2).getAttribute('class')).toBe('');
- element(by.model('style1')).sendKeys('bold');
- element(by.model('style2')).sendKeys('strike');
- element(by.model('style3')).sendKeys('red');
- expect(ps.get(2).getAttribute('class')).toBe('bold strike red');
- });
-
- it('array with map example should have 2 classes', function() {
- expect(ps.last().getAttribute('class')).toBe('');
- element(by.model('style4')).sendKeys('bold');
- element(by.model('warning')).click();
- expect(ps.last().getAttribute('class')).toBe('bold orange');
- });
- </file>
- </example>
-
- ## Animations
-
- The example below demonstrates how to perform animations using ngClass.
-
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <input id="setbtn" type="button" value="set" ng-click="myVar='my-class'">
- <input id="clearbtn" type="button" value="clear" ng-click="myVar=''">
- <br>
- <span class="base-class" ng-class="myVar">Sample Text</span>
- </file>
- <file name="style.css">
- .base-class {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .base-class.my-class {
- color: red;
- font-size:3em;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class', function() {
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
-
- element(by.id('setbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).
- toMatch(/my-class/);
-
- element(by.id('clearbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
- });
- </file>
- </example>
-
-
- ## ngClass and pre-existing CSS3 Transitions/Animations
- The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
- Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
- any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
- to view the step by step details of {@link $animate#addClass $animate.addClass} and
- {@link $animate#removeClass $animate.removeClass}.
- */
-var ngClassDirective = classDirective('', true);
-
-/**
- * @ngdoc directive
- * @name ngClassOdd
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}}
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassOddDirective = classDirective('Odd', 0);
-
-/**
- * @ngdoc directive
- * @name ngClassEven
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The
- * result of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}} &nbsp; &nbsp; &nbsp;
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassEvenDirective = classDirective('Even', 1);
-
-/**
- * @ngdoc directive
- * @name ngCloak
- * @restrict AC
- *
- * @description
- * The `ngCloak` directive is used to prevent the Angular html template from being briefly
- * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this
- * directive to avoid the undesirable flicker effect caused by the html template display.
- *
- * The directive can be applied to the `<body>` element, but the preferred usage is to apply
- * multiple `ngCloak` directives to small portions of the page to permit progressive rendering
- * of the browser view.
- *
- * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and
- * `angular.min.js`.
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```css
- * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
- * display: none !important;
- * }
- * ```
- *
- * When this css rule is loaded by the browser, all html elements (including their children) that
- * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive
- * during the compilation of the template it deletes the `ngCloak` element attribute, making
- * the compiled element visible.
- *
- * For the best result, the `angular.js` script must be loaded in the head section of the html
- * document; alternatively, the css rule above must be included in the external stylesheet of the
- * application.
- *
- * @element ANY
- *
- * @example
- <example>
- <file name="index.html">
- <div id="template1" ng-cloak>{{ 'hello' }}</div>
- <div id="template2" class="ng-cloak">{{ 'world' }}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should remove the template directive and css class', function() {
- expect($('#template1').getAttribute('ng-cloak')).
- toBeNull();
- expect($('#template2').getAttribute('ng-cloak')).
- toBeNull();
- });
- </file>
- </example>
- *
- */
-var ngCloakDirective = ngDirective({
- compile: function(element, attr) {
- attr.$set('ngCloak', undefined);
- element.removeClass('ng-cloak');
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngController
- *
- * @description
- * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular
- * supports the principles behind the Model-View-Controller design pattern.
- *
- * MVC components in angular:
- *
- * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties
- * are accessed through bindings.
- * * View — The template (HTML with data bindings) that is rendered into the View.
- * * Controller — The `ngController` directive specifies a Controller class; the class contains business
- * logic behind the application to decorate the scope with functions and values
- *
- * Note that you can also attach controllers to the DOM by declaring it in a route definition
- * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller
- * again using `ng-controller` in the template itself. This will cause the controller to be attached
- * and executed twice.
- *
- * @element ANY
- * @scope
- * @priority 500
- * @param {expression} ngController Name of a constructor function registered with the current
- * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}
- * that on the current scope evaluates to a constructor function.
- *
- * The controller instance can be published into a scope property by specifying
- * `ng-controller="as propertyName"`.
- *
- * If the current `$controllerProvider` is configured to use globals (via
- * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may
- * also be the name of a globally accessible constructor function (not recommended).
- *
- * @example
- * Here is a simple form for editing user contact information. Adding, removing, clearing, and
- * greeting are methods declared on the controller (see source tab). These methods can
- * easily be called from the angular markup. Any changes to the data are automatically reflected
- * in the View without the need for a manual update.
- *
- * Two different declaration styles are included below:
- *
- * * one binds methods and properties directly onto the controller using `this`:
- * `ng-controller="SettingsController1 as settings"`
- * * one injects `$scope` into the controller:
- * `ng-controller="SettingsController2"`
- *
- * The second option is more common in the Angular community, and is generally used in boilerplates
- * and in this guide. However, there are advantages to binding properties directly to the controller
- * and avoiding scope.
- *
- * * Using `controller as` makes it obvious which controller you are accessing in the template when
- * multiple controllers apply to an element.
- * * If you are writing your controllers as classes you have easier access to the properties and
- * methods, which will appear on the scope, from inside the controller code.
- * * Since there is always a `.` in the bindings, you don't have to worry about prototypal
- * inheritance masking primitives.
- *
- * This example demonstrates the `controller as` syntax.
- *
- * <example name="ngControllerAs" module="controllerAsExample">
- * <file name="index.html">
- * <div id="ctrl-as-exmpl" ng-controller="SettingsController1 as settings">
- * <label>Name: <input type="text" ng-model="settings.name"/></label>
- * <button ng-click="settings.greet()">greet</button><br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in settings.contacts">
- * <select ng-model="contact.type" aria-label="Contact method" id="select_{{$index}}">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
- * <button ng-click="settings.clearContact(contact)">clear</button>
- * <button ng-click="settings.removeContact(contact)" aria-label="Remove">X</button>
- * </li>
- * <li><button ng-click="settings.addContact()">add</button></li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerAsExample', [])
- * .controller('SettingsController1', SettingsController1);
- *
- * function SettingsController1() {
- * this.name = "John Smith";
- * this.contacts = [
- * {type: 'phone', value: '408 555 1212'},
- * {type: 'email', value: 'john.smith@example.org'} ];
- * }
- *
- * SettingsController1.prototype.greet = function() {
- * alert(this.name);
- * };
- *
- * SettingsController1.prototype.addContact = function() {
- * this.contacts.push({type: 'email', value: 'yourname@example.org'});
- * };
- *
- * SettingsController1.prototype.removeContact = function(contactToRemove) {
- * var index = this.contacts.indexOf(contactToRemove);
- * this.contacts.splice(index, 1);
- * };
- *
- * SettingsController1.prototype.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller as', function() {
- * var container = element(by.id('ctrl-as-exmpl'));
- * expect(container.element(by.model('settings.name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- *
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.buttonText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.buttonText('add')).click();
- *
- * expect(container.element(by.repeater('contact in settings.contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- * </example>
- *
- * This example demonstrates the "attach to `$scope`" style of controller.
- *
- * <example name="ngController" module="controllerExample">
- * <file name="index.html">
- * <div id="ctrl-exmpl" ng-controller="SettingsController2">
- * <label>Name: <input type="text" ng-model="name"/></label>
- * <button ng-click="greet()">greet</button><br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in contacts">
- * <select ng-model="contact.type" id="select_{{$index}}">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
- * <button ng-click="clearContact(contact)">clear</button>
- * <button ng-click="removeContact(contact)">X</button>
- * </li>
- * <li>[ <button ng-click="addContact()">add</button> ]</li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerExample', [])
- * .controller('SettingsController2', ['$scope', SettingsController2]);
- *
- * function SettingsController2($scope) {
- * $scope.name = "John Smith";
- * $scope.contacts = [
- * {type:'phone', value:'408 555 1212'},
- * {type:'email', value:'john.smith@example.org'} ];
- *
- * $scope.greet = function() {
- * alert($scope.name);
- * };
- *
- * $scope.addContact = function() {
- * $scope.contacts.push({type:'email', value:'yourname@example.org'});
- * };
- *
- * $scope.removeContact = function(contactToRemove) {
- * var index = $scope.contacts.indexOf(contactToRemove);
- * $scope.contacts.splice(index, 1);
- * };
- *
- * $scope.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * }
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller', function() {
- * var container = element(by.id('ctrl-exmpl'));
- *
- * expect(container.element(by.model('name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.buttonText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.buttonText('add')).click();
- *
- * expect(container.element(by.repeater('contact in contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- *</example>
-
- */
-var ngControllerDirective = [function() {
- return {
- restrict: 'A',
- scope: true,
- controller: '@',
- priority: 500
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngCsp
- *
- * @element html
- * @description
- *
- * Angular has some features that can break certain
- * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.
- *
- * If you intend to implement these rules then you must tell Angular not to use these features.
- *
- * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.
- *
- *
- * The following rules affect Angular:
- *
- * * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions
- * (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%
- * increase in the speed of evaluating Angular expressions.
- *
- * * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular
- * makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).
- * To make these directives work when a CSP rule is blocking inline styles, you must link to the
- * `angular-csp.css` in your HTML manually.
- *
- * If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval
- * and automatically deactivates this feature in the {@link $parse} service. This autodetection,
- * however, triggers a CSP error to be logged in the console:
- *
- * ```
- * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
- * script in the following Content Security Policy directive: "default-src 'self'". Note that
- * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
- * ```
- *
- * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
- * directive on an element of the HTML document that appears before the `<script>` tag that loads
- * the `angular.js` file.
- *
- * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*
- *
- * You can specify which of the CSP related Angular features should be deactivated by providing
- * a value for the `ng-csp` attribute. The options are as follows:
- *
- * * no-inline-style: this stops Angular from injecting CSS styles into the DOM
- *
- * * no-unsafe-eval: this stops Angular from optimising $parse with unsafe eval of strings
- *
- * You can use these values in the following combinations:
- *
- *
- * * No declaration means that Angular will assume that you can do inline styles, but it will do
- * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions
- * of Angular.
- *
- * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline
- * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions
- * of Angular.
- *
- * * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject
- * inline styles. E.g. `<body ng-csp="no-unsafe-eval">`.
- *
- * * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can
- * run eval - no automcatic check for unsafe eval will occur. E.g. `<body ng-csp="no-inline-style">`
- *
- * * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject
- * styles nor use eval, which is the same as an empty: ng-csp.
- * E.g.`<body ng-csp="no-inline-style;no-unsafe-eval">`
- *
- * @example
- * This example shows how to apply the `ngCsp` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-csp>
- ...
- ...
- </html>
- ```
- * @example
- // Note: the suffix `.csp` in the example name triggers
- // csp mode in our http server!
- <example name="example.csp" module="cspExample" ng-csp="true">
- <file name="index.html">
- <div ng-controller="MainController as ctrl">
- <div>
- <button ng-click="ctrl.inc()" id="inc">Increment</button>
- <span id="counter">
- {{ctrl.counter}}
- </span>
- </div>
-
- <div>
- <button ng-click="ctrl.evil()" id="evil">Evil</button>
- <span id="evilError">
- {{ctrl.evilError}}
- </span>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cspExample', [])
- .controller('MainController', function() {
- this.counter = 0;
- this.inc = function() {
- this.counter++;
- };
- this.evil = function() {
- // jshint evil:true
- try {
- eval('1+2');
- } catch (e) {
- this.evilError = e.message;
- }
- };
- });
- </file>
- <file name="protractor.js" type="protractor">
- var util, webdriver;
-
- var incBtn = element(by.id('inc'));
- var counter = element(by.id('counter'));
- var evilBtn = element(by.id('evil'));
- var evilError = element(by.id('evilError'));
-
- function getAndClearSevereErrors() {
- return browser.manage().logs().get('browser').then(function(browserLog) {
- return browserLog.filter(function(logEntry) {
- return logEntry.level.value > webdriver.logging.Level.WARNING.value;
- });
- });
- }
-
- function clearErrors() {
- getAndClearSevereErrors();
- }
-
- function expectNoErrors() {
- getAndClearSevereErrors().then(function(filteredLog) {
- expect(filteredLog.length).toEqual(0);
- if (filteredLog.length) {
- console.log('browser console errors: ' + util.inspect(filteredLog));
- }
- });
- }
-
- function expectError(regex) {
- getAndClearSevereErrors().then(function(filteredLog) {
- var found = false;
- filteredLog.forEach(function(log) {
- if (log.message.match(regex)) {
- found = true;
- }
- });
- if (!found) {
- throw new Error('expected an error that matches ' + regex);
- }
- });
- }
-
- beforeEach(function() {
- util = require('util');
- webdriver = require('protractor/node_modules/selenium-webdriver');
- });
-
- // For now, we only test on Chrome,
- // as Safari does not load the page with Protractor's injected scripts,
- // and Firefox webdriver always disables content security policy (#6358)
- if (browser.params.browser !== 'chrome') {
- return;
- }
-
- it('should not report errors when the page is loaded', function() {
- // clear errors so we are not dependent on previous tests
- clearErrors();
- // Need to reload the page as the page is already loaded when
- // we come here
- browser.driver.getCurrentUrl().then(function(url) {
- browser.get(url);
- });
- expectNoErrors();
- });
-
- it('should evaluate expressions', function() {
- expect(counter.getText()).toEqual('0');
- incBtn.click();
- expect(counter.getText()).toEqual('1');
- expectNoErrors();
- });
-
- it('should throw and report an error when using "eval"', function() {
- evilBtn.click();
- expect(evilError.getText()).toMatch(/Content Security Policy/);
- expectError(/Content Security Policy/);
- });
- </file>
- </example>
- */
-
-// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
-// bootstrap the system (before $parse is instantiated), for this reason we just have
-// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc
-
-/**
- * @ngdoc directive
- * @name ngClick
- *
- * @description
- * The ngClick directive allows you to specify custom behavior when
- * an element is clicked.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
- * click. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-click="count = count + 1" ng-init="count=0">
- Increment
- </button>
- <span>
- count: {{count}}
- </span>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-click', function() {
- expect(element(by.binding('count')).getText()).toMatch('0');
- element(by.css('button')).click();
- expect(element(by.binding('count')).getText()).toMatch('1');
- });
- </file>
- </example>
- */
-/*
- * A collection of directives that allows creation of custom event handlers that are defined as
- * angular expressions and are compiled and executed within the current scope.
- */
-var ngEventDirectives = {};
-
-// For events that might fire synchronously during DOM manipulation
-// we need to execute their event handlers asynchronously using $evalAsync,
-// so that they are not executed in an inconsistent state.
-var forceAsyncEvents = {
- 'blur': true,
- 'focus': true
-};
-forEach(
- 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),
- function(eventName) {
- var directiveName = directiveNormalize('ng-' + eventName);
- ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {
- return {
- restrict: 'A',
- compile: function($element, attr) {
- // We expose the powerful $event object on the scope that provides access to the Window,
- // etc. that isn't protected by the fast paths in $parse. We explicitly request better
- // checks at the cost of speed since event handler expressions are not executed as
- // frequently as regular change detection.
- var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);
- return function ngEventHandler(scope, element) {
- element.on(eventName, function(event) {
- var callback = function() {
- fn(scope, {$event:event});
- };
- if (forceAsyncEvents[eventName] && $rootScope.$$phase) {
- scope.$evalAsync(callback);
- } else {
- scope.$apply(callback);
- }
- });
- };
- }
- };
- }];
- }
-);
-
-/**
- * @ngdoc directive
- * @name ngDblclick
- *
- * @description
- * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon
- * a dblclick. (The Event object is available as `$event`)
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-dblclick="count = count + 1" ng-init="count=0">
- Increment (on double click)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousedown
- *
- * @description
- * The ngMousedown directive allows you to specify custom behavior on mousedown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
- * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousedown="count = count + 1" ng-init="count=0">
- Increment (on mouse down)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseup
- *
- * @description
- * Specify custom behavior on mouseup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
- * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseup="count = count + 1" ng-init="count=0">
- Increment (on mouse up)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngMouseover
- *
- * @description
- * Specify custom behavior on mouseover event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
- * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseover="count = count + 1" ng-init="count=0">
- Increment (when mouse is over)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseenter
- *
- * @description
- * Specify custom behavior on mouseenter event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
- * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseenter="count = count + 1" ng-init="count=0">
- Increment (when mouse enters)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseleave
- *
- * @description
- * Specify custom behavior on mouseleave event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
- * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseleave="count = count + 1" ng-init="count=0">
- Increment (when mouse leaves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousemove
- *
- * @description
- * Specify custom behavior on mousemove event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
- * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousemove="count = count + 1" ng-init="count=0">
- Increment (when mouse moves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeydown
- *
- * @description
- * Specify custom behavior on keydown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon
- * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keydown="count = count + 1" ng-init="count=0">
- key down count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeyup
- *
- * @description
- * Specify custom behavior on keyup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon
- * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <p>Typing in the input box below updates the key count</p>
- <input ng-keyup="count = count + 1" ng-init="count=0"> key up count: {{count}}
-
- <p>Typing in the input box below updates the keycode</p>
- <input ng-keyup="event=$event">
- <p>event keyCode: {{ event.keyCode }}</p>
- <p>event altKey: {{ event.altKey }}</p>
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeypress
- *
- * @description
- * Specify custom behavior on keypress event.
- *
- * @element ANY
- * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
- * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
- * and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keypress="count = count + 1" ng-init="count=0">
- key press count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSubmit
- *
- * @description
- * Enables binding angular expressions to onsubmit events.
- *
- * Additionally it prevents the default action (which for form means sending the request to the
- * server and reloading the current page), but only if the form does not contain `action`,
- * `data-action`, or `x-action` attributes.
- *
- * <div class="alert alert-warning">
- * **Warning:** Be careful not to cause "double-submission" by using both the `ngClick` and
- * `ngSubmit` handlers together. See the
- * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}
- * for a detailed discussion of when `ngSubmit` may be triggered.
- * </div>
- *
- * @element form
- * @priority 0
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
- * ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example module="submitExample">
- <file name="index.html">
- <script>
- angular.module('submitExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [];
- $scope.text = 'hello';
- $scope.submit = function() {
- if ($scope.text) {
- $scope.list.push(this.text);
- $scope.text = '';
- }
- };
- }]);
- </script>
- <form ng-submit="submit()" ng-controller="ExampleController">
- Enter text and hit enter:
- <input type="text" ng-model="text" name="text" />
- <input type="submit" id="submit" value="Submit" />
- <pre>list={{list}}</pre>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-submit', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- expect(element(by.model('text')).getAttribute('value')).toBe('');
- });
- it('should ignore empty strings', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngFocus
- *
- * @description
- * Specify custom behavior on focus event.
- *
- * Note: As the `focus` event is executed synchronously when calling `input.focus()`
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
- * focus. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngBlur
- *
- * @description
- * Specify custom behavior on blur event.
- *
- * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when
- * an element has lost focus.
- *
- * Note: As the `blur` event is executed synchronously also during DOM manipulations
- * (e.g. removing a focussed input),
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
- * blur. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngCopy
- *
- * @description
- * Specify custom behavior on copy event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
- * copy. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-copy="copied=true" ng-init="copied=false; value='copy me'" ng-model="value">
- copied: {{copied}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngCut
- *
- * @description
- * Specify custom behavior on cut event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
- * cut. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-cut="cut=true" ng-init="cut=false; value='cut me'" ng-model="value">
- cut: {{cut}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngPaste
- *
- * @description
- * Specify custom behavior on paste event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
- * paste. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>
- pasted: {{paste}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngIf
- * @restrict A
- * @multiElement
- *
- * @description
- * The `ngIf` directive removes or recreates a portion of the DOM tree based on an
- * {expression}. If the expression assigned to `ngIf` evaluates to a false
- * value then the element is removed from the DOM, otherwise a clone of the
- * element is reinserted into the DOM.
- *
- * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the
- * element in the DOM rather than changing its visibility via the `display` css property. A common
- * case when this difference is significant is when using css selectors that rely on an element's
- * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.
- *
- * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope
- * is created when the element is restored. The scope created within `ngIf` inherits from
- * its parent scope using
- * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).
- * An important implication of this is if `ngModel` is used within `ngIf` to bind to
- * a javascript primitive defined in the parent scope. In this case any modifications made to the
- * variable within the child scope will override (hide) the value in the parent scope.
- *
- * Also, `ngIf` recreates elements using their compiled state. An example of this behavior
- * is if an element's class attribute is directly modified after it's compiled, using something like
- * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element
- * the added class will be lost because the original compiled state is used to regenerate the element.
- *
- * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`
- * and `leave` effects.
- *
- * @animations
- * enter - happens just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container
- * leave - happens just before the `ngIf` contents are removed from the DOM
- *
- * @element ANY
- * @scope
- * @priority 600
- * @param {expression} ngIf If the {@link guide/expression expression} is falsy then
- * the element is removed from the DOM tree. If it is truthy a copy of the compiled
- * element is added to the DOM tree.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <label>Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /></label><br/>
- Show when checked:
- <span ng-if="checked" class="animate-if">
- This is removed when the checkbox is unchecked.
- </span>
- </file>
- <file name="animations.css">
- .animate-if {
- background:white;
- border:1px solid black;
- padding:10px;
- }
-
- .animate-if.ng-enter, .animate-if.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .animate-if.ng-enter,
- .animate-if.ng-leave.ng-leave-active {
- opacity:0;
- }
-
- .animate-if.ng-leave,
- .animate-if.ng-enter.ng-enter-active {
- opacity:1;
- }
- </file>
- </example>
- */
-var ngIfDirective = ['$animate', function($animate) {
- return {
- multiElement: true,
- transclude: 'element',
- priority: 600,
- terminal: true,
- restrict: 'A',
- $$tlb: true,
- link: function($scope, $element, $attr, ctrl, $transclude) {
- var block, childScope, previousElements;
- $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {
-
- if (value) {
- if (!childScope) {
- $transclude(function(clone, newScope) {
- childScope = newScope;
- clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block = {
- clone: clone
- };
- $animate.enter(clone, $element.parent(), $element);
- });
- }
- } else {
- if (previousElements) {
- previousElements.remove();
- previousElements = null;
- }
- if (childScope) {
- childScope.$destroy();
- childScope = null;
- }
- if (block) {
- previousElements = getBlockNodes(block.clone);
- $animate.leave(previousElements).then(function() {
- previousElements = null;
- });
- block = null;
- }
- }
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngInclude
- * @restrict ECA
- *
- * @description
- * Fetches, compiles and includes an external HTML fragment.
- *
- * By default, the template URL is restricted to the same domain and protocol as the
- * application document. This is done by calling {@link $sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
- * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
- * {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link
- * ng.$sce Strict Contextual Escaping}.
- *
- * In addition, the browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy may further restrict whether the template is successfully loaded.
- * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`
- * access on some browsers.
- *
- * @animations
- * enter - animation is used to bring new content into the browser.
- * leave - animation is used to animate existing content away.
- *
- * The enter and leave animation occur concurrently.
- *
- * @scope
- * @priority 400
- *
- * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
- * make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
- * @param {string=} onload Expression to evaluate when a new partial is loaded.
- * <div class="alert alert-warning">
- * **Note:** When using onload on SVG elements in IE11, the browser will try to call
- * a function with the name on the window element, which will usually throw a
- * "function is undefined" error. To fix this, you can instead use `data-onload` or a
- * different form that {@link guide/directive#normalization matches} `onload`.
- * </div>
- *
- * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
- * $anchorScroll} to scroll the viewport after the content is loaded.
- *
- * - If the attribute is not set, disable scrolling.
- * - If the attribute is set without value, enable scrolling.
- * - Otherwise enable scrolling only if the expression evaluates to truthy value.
- *
- * @example
- <example module="includeExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="template" ng-options="t.name for t in templates">
- <option value="">(blank)</option>
- </select>
- url of the template: <code>{{template.url}}</code>
- <hr/>
- <div class="slide-animate-container">
- <div class="slide-animate" ng-include="template.url"></div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('includeExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.templates =
- [ { name: 'template1.html', url: 'template1.html'},
- { name: 'template2.html', url: 'template2.html'} ];
- $scope.template = $scope.templates[0];
- }]);
- </file>
- <file name="template1.html">
- Content of template1.html
- </file>
- <file name="template2.html">
- Content of template2.html
- </file>
- <file name="animations.css">
- .slide-animate-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .slide-animate {
- padding:10px;
- }
-
- .slide-animate.ng-enter, .slide-animate.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- display:block;
- padding:10px;
- }
-
- .slide-animate.ng-enter {
- top:-50px;
- }
- .slide-animate.ng-enter.ng-enter-active {
- top:0;
- }
-
- .slide-animate.ng-leave {
- top:0;
- }
- .slide-animate.ng-leave.ng-leave-active {
- top:50px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var templateSelect = element(by.model('template'));
- var includeElem = element(by.css('[ng-include]'));
-
- it('should load template1.html', function() {
- expect(includeElem.getText()).toMatch(/Content of template1.html/);
- });
-
- it('should load template2.html', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- // See https://github.com/angular/protractor/issues/480
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(2).click();
- expect(includeElem.getText()).toMatch(/Content of template2.html/);
- });
-
- it('should change to blank', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(0).click();
- expect(includeElem.isPresent()).toBe(false);
- });
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentRequested
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted every time the ngInclude content is requested.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentLoaded
- * @eventType emit on the current ngInclude scope
- * @description
- * Emitted every time the ngInclude content is reloaded.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentError
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',
- function($templateRequest, $anchorScroll, $animate) {
- return {
- restrict: 'ECA',
- priority: 400,
- terminal: true,
- transclude: 'element',
- controller: angular.noop,
- compile: function(element, attr) {
- var srcExp = attr.ngInclude || attr.src,
- onloadExp = attr.onload || '',
- autoScrollExp = attr.autoscroll;
-
- return function(scope, $element, $attr, ctrl, $transclude) {
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch(srcExp, function ngIncludeWatchAction(src) {
- var afterAnimation = function() {
- if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
- $anchorScroll();
- }
- };
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) return;
- var newScope = scope.$new();
- ctrl.template = response;
-
- // Note: This will also link all children of ng-include that were contained in the original
- // html. If that content contains controllers, ... they could pollute/change the scope.
- // However, using ng-include on an element with additional content does not make sense...
- // Note: We can't remove them in the cloneAttchFn of $transclude as that
- // function is called before linking the content, which would apply child
- // directives to non existing elements.
- var clone = $transclude(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, null, $element).then(afterAnimation);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- scope.$eval(onloadExp);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- ctrl.template = null;
- }
- });
- };
- }
- };
-}];
-
-// This directive is called during the $transclude call of the first `ngInclude` directive.
-// It will replace and compile the content of the element with the loaded template.
-// We need this directive so that the element content is already filled when
-// the link function of another directive on the same element as ngInclude
-// is called.
-var ngIncludeFillContentDirective = ['$compile',
- function($compile) {
- return {
- restrict: 'ECA',
- priority: -400,
- require: 'ngInclude',
- link: function(scope, $element, $attr, ctrl) {
- if (/SVG/.test($element[0].toString())) {
- // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not
- // support innerHTML, so detect this here and try to generate the contents
- // specially.
- $element.empty();
- $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,
- function namespaceAdaptedClone(clone) {
- $element.append(clone);
- }, {futureParentElement: $element});
- return;
- }
-
- $element.html(ctrl.template);
- $compile($element.contents())(scope);
- }
- };
- }];
-
-/**
- * @ngdoc directive
- * @name ngInit
- * @restrict AC
- *
- * @description
- * The `ngInit` directive allows you to evaluate an expression in the
- * current scope.
- *
- * <div class="alert alert-danger">
- * This directive can be abused to add unnecessary amounts of logic into your templates.
- * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of
- * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via
- * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}
- * rather than `ngInit` to initialize values on a scope.
- * </div>
- *
- * <div class="alert alert-warning">
- * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make
- * sure you have parentheses to ensure correct operator precedence:
- * <pre class="prettyprint">
- * `<div ng-init="test1 = ($index | toString)"></div>`
- * </pre>
- * </div>
- *
- * @priority 450
- *
- * @element ANY
- * @param {expression} ngInit {@link guide/expression Expression} to eval.
- *
- * @example
- <example module="initExample">
- <file name="index.html">
- <script>
- angular.module('initExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [['a', 'b'], ['c', 'd']];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <div ng-repeat="innerList in list" ng-init="outerIndex = $index">
- <div ng-repeat="value in innerList" ng-init="innerIndex = $index">
- <span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
- </div>
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should alias index positions', function() {
- var elements = element.all(by.css('.example-init'));
- expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');
- expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');
- expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');
- expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');
- });
- </file>
- </example>
- */
-var ngInitDirective = ngDirective({
- priority: 450,
- compile: function() {
- return {
- pre: function(scope, element, attrs) {
- scope.$eval(attrs.ngInit);
- }
- };
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngList
- *
- * @description
- * Text input that converts between a delimited string and an array of strings. The default
- * delimiter is a comma followed by a space - equivalent to `ng-list=", "`. You can specify a custom
- * delimiter as the value of the `ngList` attribute - for example, `ng-list=" | "`.
- *
- * The behaviour of the directive is affected by the use of the `ngTrim` attribute.
- * * If `ngTrim` is set to `"false"` then whitespace around both the separator and each
- * list item is respected. This implies that the user of the directive is responsible for
- * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a
- * tab or newline character.
- * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected
- * when joining the list items back together) and whitespace around each list item is stripped
- * before it is added to the model.
- *
- * ### Example with Validation
- *
- * <example name="ngList-directive" module="listExample">
- * <file name="app.js">
- * angular.module('listExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.names = ['morpheus', 'neo', 'trinity'];
- * }]);
- * </file>
- * <file name="index.html">
- * <form name="myForm" ng-controller="ExampleController">
- * <label>List: <input name="namesInput" ng-model="names" ng-list required></label>
- * <span role="alert">
- * <span class="error" ng-show="myForm.namesInput.$error.required">
- * Required!</span>
- * </span>
- * <br>
- * <tt>names = {{names}}</tt><br/>
- * <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>
- * <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>
- * <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- * <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- * </form>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var listInput = element(by.model('names'));
- * var names = element(by.exactBinding('names'));
- * var valid = element(by.binding('myForm.namesInput.$valid'));
- * var error = element(by.css('span.error'));
- *
- * it('should initialize to model', function() {
- * expect(names.getText()).toContain('["morpheus","neo","trinity"]');
- * expect(valid.getText()).toContain('true');
- * expect(error.getCssValue('display')).toBe('none');
- * });
- *
- * it('should be invalid if empty', function() {
- * listInput.clear();
- * listInput.sendKeys('');
- *
- * expect(names.getText()).toContain('');
- * expect(valid.getText()).toContain('false');
- * expect(error.getCssValue('display')).not.toBe('none');
- * });
- * </file>
- * </example>
- *
- * ### Example - splitting on newline
- * <example name="ngList-directive-newlines">
- * <file name="index.html">
- * <textarea ng-model="list" ng-list="&#10;" ng-trim="false"></textarea>
- * <pre>{{ list | json }}</pre>
- * </file>
- * <file name="protractor.js" type="protractor">
- * it("should split the text by newlines", function() {
- * var listInput = element(by.model('list'));
- * var output = element(by.binding('list | json'));
- * listInput.sendKeys('abc\ndef\nghi');
- * expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]');
- * });
- * </file>
- * </example>
- *
- * @element input
- * @param {string=} ngList optional delimiter that should be used to split the value.
- */
-var ngListDirective = function() {
- return {
- restrict: 'A',
- priority: 100,
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- // We want to control whitespace trimming so we use this convoluted approach
- // to access the ngList attribute, which doesn't pre-trim the attribute
- var ngList = element.attr(attr.$attr.ngList) || ', ';
- var trimValues = attr.ngTrim !== 'false';
- var separator = trimValues ? trim(ngList) : ngList;
-
- var parse = function(viewValue) {
- // If the viewValue is invalid (say required but empty) it will be `undefined`
- if (isUndefined(viewValue)) return;
-
- var list = [];
-
- if (viewValue) {
- forEach(viewValue.split(separator), function(value) {
- if (value) list.push(trimValues ? trim(value) : value);
- });
- }
-
- return list;
- };
-
- ctrl.$parsers.push(parse);
- ctrl.$formatters.push(function(value) {
- if (isArray(value)) {
- return value.join(ngList);
- }
-
- return undefined;
- });
-
- // Override the standard $isEmpty because an empty array means the input is empty.
- ctrl.$isEmpty = function(value) {
- return !value || !value.length;
- };
- }
- };
-};
-
-/* global VALID_CLASS: true,
- INVALID_CLASS: true,
- PRISTINE_CLASS: true,
- DIRTY_CLASS: true,
- UNTOUCHED_CLASS: true,
- TOUCHED_CLASS: true,
-*/
-
-var VALID_CLASS = 'ng-valid',
- INVALID_CLASS = 'ng-invalid',
- PRISTINE_CLASS = 'ng-pristine',
- DIRTY_CLASS = 'ng-dirty',
- UNTOUCHED_CLASS = 'ng-untouched',
- TOUCHED_CLASS = 'ng-touched',
- PENDING_CLASS = 'ng-pending';
-
-var ngModelMinErr = minErr('ngModel');
-
-/**
- * @ngdoc type
- * @name ngModel.NgModelController
- *
- * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a
- * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue
- * is set.
- * @property {*} $modelValue The value in the model that the control is bound to.
- * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
- the control reads value from the DOM. The functions are called in array order, each passing
- its return value through to the next. The last return value is forwarded to the
- {@link ngModel.NgModelController#$validators `$validators`} collection.
-
-Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue
-`$viewValue`}.
-
-Returning `undefined` from a parser means a parse error occurred. In that case,
-no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`
-will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}
-is set to `true`. The parse error is stored in `ngModel.$error.parse`.
-
- *
- * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
- the model value changes. The functions are called in reverse array order, each passing the value through to the
- next. The last return value is used as the actual DOM value.
- Used to format / convert values for display in the control.
- * ```js
- * function formatter(value) {
- * if (value) {
- * return value.toUpperCase();
- * }
- * }
- * ngModel.$formatters.push(formatter);
- * ```
- *
- * @property {Object.<string, function>} $validators A collection of validators that are applied
- * whenever the model value changes. The key value within the object refers to the name of the
- * validator while the function refers to the validation operation. The validation operation is
- * provided with the model value as an argument and must return a true or false value depending
- * on the response of that validation.
- *
- * ```js
- * ngModel.$validators.validCharacters = function(modelValue, viewValue) {
- * var value = modelValue || viewValue;
- * return /[0-9]+/.test(value) &&
- * /[a-z]+/.test(value) &&
- * /[A-Z]+/.test(value) &&
- * /\W+/.test(value);
- * };
- * ```
- *
- * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to
- * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided
- * is expected to return a promise when it is run during the model validation process. Once the promise
- * is delivered then the validation status will be set to true when fulfilled and false when rejected.
- * When the asynchronous validators are triggered, each of the validators will run in parallel and the model
- * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator
- * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators
- * will only run once all synchronous validators have passed.
- *
- * Please note that if $http is used then it is important that the server returns a success HTTP response code
- * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.
- *
- * ```js
- * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {
- * var value = modelValue || viewValue;
- *
- * // Lookup user by username
- * return $http.get('/api/users/' + value).
- * then(function resolved() {
- * //username exists, this means validation fails
- * return $q.reject('exists');
- * }, function rejected() {
- * //username does not exist, therefore this validation passes
- * return true;
- * });
- * };
- * ```
- *
- * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the
- * view value has changed. It is called with no arguments, and its return value is ignored.
- * This can be used in place of additional $watches against the model value.
- *
- * @property {Object} $error An object hash with all failing validator ids as keys.
- * @property {Object} $pending An object hash with all pending validator ids as keys.
- *
- * @property {boolean} $untouched True if control has not lost focus yet.
- * @property {boolean} $touched True if control has lost focus.
- * @property {boolean} $pristine True if user has not interacted with the control yet.
- * @property {boolean} $dirty True if user has already interacted with the control.
- * @property {boolean} $valid True if there is no error.
- * @property {boolean} $invalid True if at least one error on the control.
- * @property {string} $name The name attribute of the control.
- *
- * @description
- *
- * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.
- * The controller contains services for data-binding, validation, CSS updates, and value formatting
- * and parsing. It purposefully does not contain any logic which deals with DOM rendering or
- * listening to DOM events.
- * Such DOM related logic should be provided by other directives which make use of
- * `NgModelController` for data-binding to control elements.
- * Angular provides this DOM logic for most {@link input `input`} elements.
- * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example
- * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.
- *
- * @example
- * ### Custom Control Example
- * This example shows how to use `NgModelController` with a custom control to achieve
- * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
- * collaborate together to achieve the desired result.
- *
- * `contenteditable` is an HTML5 attribute, which tells the browser to let the element
- * contents be edited in place by the user.
- *
- * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}
- * module to automatically remove "bad" content like inline event listener (e.g. `<span onclick="...">`).
- * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks
- * that content using the `$sce` service.
- *
- * <example name="NgModelController" module="customControl" deps="angular-sanitize.js">
- <file name="style.css">
- [contenteditable] {
- border: 1px solid black;
- background-color: white;
- min-height: 20px;
- }
-
- .ng-invalid {
- border: 1px solid red;
- }
-
- </file>
- <file name="script.js">
- angular.module('customControl', ['ngSanitize']).
- directive('contenteditable', ['$sce', function($sce) {
- return {
- restrict: 'A', // only activate on element attribute
- require: '?ngModel', // get a hold of NgModelController
- link: function(scope, element, attrs, ngModel) {
- if (!ngModel) return; // do nothing if no ng-model
-
- // Specify how UI should be updated
- ngModel.$render = function() {
- element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));
- };
-
- // Listen for change events to enable binding
- element.on('blur keyup change', function() {
- scope.$evalAsync(read);
- });
- read(); // initialize
-
- // Write data to the model
- function read() {
- var html = element.html();
- // When we clear the content editable the browser leaves a <br> behind
- // If strip-br attribute is provided then we strip this out
- if ( attrs.stripBr && html == '<br>' ) {
- html = '';
- }
- ngModel.$setViewValue(html);
- }
- }
- };
- }]);
- </file>
- <file name="index.html">
- <form name="myForm">
- <div contenteditable
- name="myWidget" ng-model="userContent"
- strip-br="true"
- required>Change me!</div>
- <span ng-show="myForm.myWidget.$error.required">Required!</span>
- <hr>
- <textarea ng-model="userContent" aria-label="Dynamic textarea"></textarea>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should data-bind and become invalid', function() {
- if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {
- // SafariDriver can't handle contenteditable
- // and Firefox driver can't clear contenteditables very well
- return;
- }
- var contentEditable = element(by.css('[contenteditable]'));
- var content = 'Change me!';
-
- expect(contentEditable.getText()).toEqual(content);
-
- contentEditable.clear();
- contentEditable.sendKeys(protractor.Key.BACK_SPACE);
- expect(contentEditable.getText()).toEqual('');
- expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);
- });
- </file>
- * </example>
- *
- *
- */
-var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',
- function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {
- this.$viewValue = Number.NaN;
- this.$modelValue = Number.NaN;
- this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.
- this.$validators = {};
- this.$asyncValidators = {};
- this.$parsers = [];
- this.$formatters = [];
- this.$viewChangeListeners = [];
- this.$untouched = true;
- this.$touched = false;
- this.$pristine = true;
- this.$dirty = false;
- this.$valid = true;
- this.$invalid = false;
- this.$error = {}; // keep invalid keys here
- this.$$success = {}; // keep valid keys here
- this.$pending = undefined; // keep pending keys here
- this.$name = $interpolate($attr.name || '', false)($scope);
- this.$$parentForm = nullFormCtrl;
-
- var parsedNgModel = $parse($attr.ngModel),
- parsedNgModelAssign = parsedNgModel.assign,
- ngModelGet = parsedNgModel,
- ngModelSet = parsedNgModelAssign,
- pendingDebounce = null,
- parserValid,
- ctrl = this;
-
- this.$$setOptions = function(options) {
- ctrl.$options = options;
- if (options && options.getterSetter) {
- var invokeModelGetter = $parse($attr.ngModel + '()'),
- invokeModelSetter = $parse($attr.ngModel + '($$$p)');
-
- ngModelGet = function($scope) {
- var modelValue = parsedNgModel($scope);
- if (isFunction(modelValue)) {
- modelValue = invokeModelGetter($scope);
- }
- return modelValue;
- };
- ngModelSet = function($scope, newValue) {
- if (isFunction(parsedNgModel($scope))) {
- invokeModelSetter($scope, {$$$p: ctrl.$modelValue});
- } else {
- parsedNgModelAssign($scope, ctrl.$modelValue);
- }
- };
- } else if (!parsedNgModel.assign) {
- throw ngModelMinErr('nonassign', "Expression '{0}' is non-assignable. Element: {1}",
- $attr.ngModel, startingTag($element));
- }
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$render
- *
- * @description
- * Called when the view needs to be updated. It is expected that the user of the ng-model
- * directive will implement this method.
- *
- * The `$render()` method is invoked in the following situations:
- *
- * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last
- * committed value then `$render()` is called to update the input control.
- * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and
- * the `$viewValue` are different from last time.
- *
- * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of
- * `$modelValue` and `$viewValue` are actually different from their previous value. If `$modelValue`
- * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be
- * invoked if you only change a property on the objects.
- */
- this.$render = noop;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$isEmpty
- *
- * @description
- * This is called when we need to determine if the value of an input is empty.
- *
- * For instance, the required directive does this to work out if the input has data or not.
- *
- * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
- *
- * You can override this for input directives whose concept of being empty is different from the
- * default. The `checkboxInputType` directive does this because in its case a value of `false`
- * implies empty.
- *
- * @param {*} value The value of the input to check for emptiness.
- * @returns {boolean} True if `value` is "empty".
- */
- this.$isEmpty = function(value) {
- return isUndefined(value) || value === '' || value === null || value !== value;
- };
-
- var currentValidationRunId = 0;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setValidity
- *
- * @description
- * Change the validity state, and notify the form.
- *
- * This method can be called within $parsers/$formatters or a custom validation implementation.
- * However, in most cases it should be sufficient to use the `ngModel.$validators` and
- * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.
- *
- * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned
- * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`
- * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.
- * The `validationErrorKey` should be in camelCase and will get converted into dash-case
- * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`
- * class and can be bound to as `{{someForm.someControl.$error.myError}}` .
- * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),
- * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.
- * Skipped is used by Angular when validators do not run because of parse errors and
- * when `$asyncValidators` do not run because any of the `$validators` failed.
- */
- addSetValidityMethod({
- ctrl: this,
- $element: $element,
- set: function(object, property) {
- object[property] = true;
- },
- unset: function(object, property) {
- delete object[property];
- },
- $animate: $animate
- });
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setPristine
- *
- * @description
- * Sets the control to its pristine state.
- *
- * This method can be called to remove the `ng-dirty` class and set the control to its pristine
- * state (`ng-pristine` class). A model is considered to be pristine when the control
- * has not been changed from when first compiled.
- */
- this.$setPristine = function() {
- ctrl.$dirty = false;
- ctrl.$pristine = true;
- $animate.removeClass($element, DIRTY_CLASS);
- $animate.addClass($element, PRISTINE_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setDirty
- *
- * @description
- * Sets the control to its dirty state.
- *
- * This method can be called to remove the `ng-pristine` class and set the control to its dirty
- * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed
- * from when first compiled.
- */
- this.$setDirty = function() {
- ctrl.$dirty = true;
- ctrl.$pristine = false;
- $animate.removeClass($element, PRISTINE_CLASS);
- $animate.addClass($element, DIRTY_CLASS);
- ctrl.$$parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setUntouched
- *
- * @description
- * Sets the control to its untouched state.
- *
- * This method can be called to remove the `ng-touched` class and set the control to its
- * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched
- * by default, however this function can be used to restore that state if the model has
- * already been touched by the user.
- */
- this.$setUntouched = function() {
- ctrl.$touched = false;
- ctrl.$untouched = true;
- $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setTouched
- *
- * @description
- * Sets the control to its touched state.
- *
- * This method can be called to remove the `ng-untouched` class and set the control to its
- * touched state (`ng-touched` class). A model is considered to be touched when the user has
- * first focused the control element and then shifted focus away from the control (blur event).
- */
- this.$setTouched = function() {
- ctrl.$touched = true;
- ctrl.$untouched = false;
- $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$rollbackViewValue
- *
- * @description
- * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,
- * which may be caused by a pending debounced event or because the input is waiting for a some
- * future event.
- *
- * If you have an input that uses `ng-model-options` to set up debounced events or events such
- * as blur you can have a situation where there is a period when the `$viewValue`
- * is out of synch with the ngModel's `$modelValue`.
- *
- * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`
- * programmatically before these debounced/future events have resolved/occurred, because Angular's
- * dirty checking mechanism is not able to tell whether the model has actually changed or not.
- *
- * The `$rollbackViewValue()` method should be called before programmatically changing the model of an
- * input which may have such events pending. This is important in order to make sure that the
- * input field will be updated with the new model value and any pending operations are cancelled.
- *
- * <example name="ng-model-cancel-update" module="cancel-update-example">
- * <file name="app.js">
- * angular.module('cancel-update-example', [])
- *
- * .controller('CancelUpdateController', ['$scope', function($scope) {
- * $scope.resetWithCancel = function(e) {
- * if (e.keyCode == 27) {
- * $scope.myForm.myInput1.$rollbackViewValue();
- * $scope.myValue = '';
- * }
- * };
- * $scope.resetWithoutCancel = function(e) {
- * if (e.keyCode == 27) {
- * $scope.myValue = '';
- * }
- * };
- * }]);
- * </file>
- * <file name="index.html">
- * <div ng-controller="CancelUpdateController">
- * <p>Try typing something in each input. See that the model only updates when you
- * blur off the input.
- * </p>
- * <p>Now see what happens if you start typing then press the Escape key</p>
- *
- * <form name="myForm" ng-model-options="{ updateOn: 'blur' }">
- * <p id="inputDescription1">With $rollbackViewValue()</p>
- * <input name="myInput1" aria-describedby="inputDescription1" ng-model="myValue"
- * ng-keydown="resetWithCancel($event)"><br/>
- * myValue: "{{ myValue }}"
- *
- * <p id="inputDescription2">Without $rollbackViewValue()</p>
- * <input name="myInput2" aria-describedby="inputDescription2" ng-model="myValue"
- * ng-keydown="resetWithoutCancel($event)"><br/>
- * myValue: "{{ myValue }}"
- * </form>
- * </div>
- * </file>
- * </example>
- */
- this.$rollbackViewValue = function() {
- $timeout.cancel(pendingDebounce);
- ctrl.$viewValue = ctrl.$$lastCommittedViewValue;
- ctrl.$render();
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$validate
- *
- * @description
- * Runs each of the registered validators (first synchronous validators and then
- * asynchronous validators).
- * If the validity changes to invalid, the model will be set to `undefined`,
- * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.
- * If the validity changes to valid, it will set the model to the last available valid
- * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
- */
- this.$validate = function() {
- // ignore $validate before model is initialized
- if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {
- return;
- }
-
- var viewValue = ctrl.$$lastCommittedViewValue;
- // Note: we use the $$rawModelValue as $modelValue might have been
- // set to undefined during a view -> model update that found validation
- // errors. We can't parse the view here, since that could change
- // the model although neither viewValue nor the model on the scope changed
- var modelValue = ctrl.$$rawModelValue;
-
- var prevValid = ctrl.$valid;
- var prevModelValue = ctrl.$modelValue;
-
- var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
-
- ctrl.$$runValidators(modelValue, viewValue, function(allValid) {
- // If there was no change in validity, don't update the model
- // This prevents changing an invalid modelValue to undefined
- if (!allowInvalid && prevValid !== allValid) {
- // Note: Don't check ctrl.$valid here, as we could have
- // external validators (e.g. calculated on the server),
- // that just call $setValidity and need the model value
- // to calculate their validity.
- ctrl.$modelValue = allValid ? modelValue : undefined;
-
- if (ctrl.$modelValue !== prevModelValue) {
- ctrl.$$writeModelToScope();
- }
- }
- });
-
- };
-
- this.$$runValidators = function(modelValue, viewValue, doneCallback) {
- currentValidationRunId++;
- var localValidationRunId = currentValidationRunId;
-
- // check parser error
- if (!processParseErrors()) {
- validationDone(false);
- return;
- }
- if (!processSyncValidators()) {
- validationDone(false);
- return;
- }
- processAsyncValidators();
-
- function processParseErrors() {
- var errorKey = ctrl.$$parserName || 'parse';
- if (isUndefined(parserValid)) {
- setValidity(errorKey, null);
- } else {
- if (!parserValid) {
- forEach(ctrl.$validators, function(v, name) {
- setValidity(name, null);
- });
- forEach(ctrl.$asyncValidators, function(v, name) {
- setValidity(name, null);
- });
- }
- // Set the parse error last, to prevent unsetting it, should a $validators key == parserName
- setValidity(errorKey, parserValid);
- return parserValid;
- }
- return true;
- }
-
- function processSyncValidators() {
- var syncValidatorsValid = true;
- forEach(ctrl.$validators, function(validator, name) {
- var result = validator(modelValue, viewValue);
- syncValidatorsValid = syncValidatorsValid && result;
- setValidity(name, result);
- });
- if (!syncValidatorsValid) {
- forEach(ctrl.$asyncValidators, function(v, name) {
- setValidity(name, null);
- });
- return false;
- }
- return true;
- }
-
- function processAsyncValidators() {
- var validatorPromises = [];
- var allValid = true;
- forEach(ctrl.$asyncValidators, function(validator, name) {
- var promise = validator(modelValue, viewValue);
- if (!isPromiseLike(promise)) {
- throw ngModelMinErr("$asyncValidators",
- "Expected asynchronous validator to return a promise but got '{0}' instead.", promise);
- }
- setValidity(name, undefined);
- validatorPromises.push(promise.then(function() {
- setValidity(name, true);
- }, function(error) {
- allValid = false;
- setValidity(name, false);
- }));
- });
- if (!validatorPromises.length) {
- validationDone(true);
- } else {
- $q.all(validatorPromises).then(function() {
- validationDone(allValid);
- }, noop);
- }
- }
-
- function setValidity(name, isValid) {
- if (localValidationRunId === currentValidationRunId) {
- ctrl.$setValidity(name, isValid);
- }
- }
-
- function validationDone(allValid) {
- if (localValidationRunId === currentValidationRunId) {
-
- doneCallback(allValid);
- }
- }
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$commitViewValue
- *
- * @description
- * Commit a pending update to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`
- * usually handles calling this in response to input events.
- */
- this.$commitViewValue = function() {
- var viewValue = ctrl.$viewValue;
-
- $timeout.cancel(pendingDebounce);
-
- // If the view value has not changed then we should just exit, except in the case where there is
- // a native validator on the element. In this case the validation state may have changed even though
- // the viewValue has stayed empty.
- if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {
- return;
- }
- ctrl.$$lastCommittedViewValue = viewValue;
-
- // change to dirty
- if (ctrl.$pristine) {
- this.$setDirty();
- }
- this.$$parseAndValidate();
- };
-
- this.$$parseAndValidate = function() {
- var viewValue = ctrl.$$lastCommittedViewValue;
- var modelValue = viewValue;
- parserValid = isUndefined(modelValue) ? undefined : true;
-
- if (parserValid) {
- for (var i = 0; i < ctrl.$parsers.length; i++) {
- modelValue = ctrl.$parsers[i](modelValue);
- if (isUndefined(modelValue)) {
- parserValid = false;
- break;
- }
- }
- }
- if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {
- // ctrl.$modelValue has not been touched yet...
- ctrl.$modelValue = ngModelGet($scope);
- }
- var prevModelValue = ctrl.$modelValue;
- var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
- ctrl.$$rawModelValue = modelValue;
-
- if (allowInvalid) {
- ctrl.$modelValue = modelValue;
- writeToModelIfNeeded();
- }
-
- // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.
- // This can happen if e.g. $setViewValue is called from inside a parser
- ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {
- if (!allowInvalid) {
- // Note: Don't check ctrl.$valid here, as we could have
- // external validators (e.g. calculated on the server),
- // that just call $setValidity and need the model value
- // to calculate their validity.
- ctrl.$modelValue = allValid ? modelValue : undefined;
- writeToModelIfNeeded();
- }
- });
-
- function writeToModelIfNeeded() {
- if (ctrl.$modelValue !== prevModelValue) {
- ctrl.$$writeModelToScope();
- }
- }
- };
-
- this.$$writeModelToScope = function() {
- ngModelSet($scope, ctrl.$modelValue);
- forEach(ctrl.$viewChangeListeners, function(listener) {
- try {
- listener();
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setViewValue
- *
- * @description
- * Update the view value.
- *
- * This method should be called when a control wants to change the view value; typically,
- * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}
- * directive calls it when the value of the input changes and {@link ng.directive:select select}
- * calls it when an option is selected.
- *
- * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`
- * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
- * value sent directly for processing, finally to be applied to `$modelValue` and then the
- * **expression** specified in the `ng-model` attribute. Lastly, all the registered change listeners,
- * in the `$viewChangeListeners` list, are called.
- *
- * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`
- * and the `default` trigger is not listed, all those actions will remain pending until one of the
- * `updateOn` events is triggered on the DOM element.
- * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}
- * directive is used with a custom debounce for this particular event.
- * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`
- * is specified, once the timer runs out.
- *
- * When used with standard inputs, the view value will always be a string (which is in some cases
- * parsed into another type, such as a `Date` object for `input[date]`.)
- * However, custom controls might also pass objects to this method. In this case, we should make
- * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not
- * perform a deep watch of objects, it only looks for a change of identity. If you only change
- * the property of the object then ngModel will not realise that the object has changed and
- * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
- * not change properties of the copy once it has been passed to `$setViewValue`.
- * Otherwise you may cause the model value on the scope to change incorrectly.
- *
- * <div class="alert alert-info">
- * In any case, the value passed to the method should always reflect the current value
- * of the control. For example, if you are calling `$setViewValue` for an input element,
- * you should pass the input DOM value. Otherwise, the control and the scope model become
- * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change
- * the control's DOM value in any way. If we want to change the control's DOM value
- * programmatically, we should update the `ngModel` scope expression. Its new value will be
- * picked up by the model controller, which will run it through the `$formatters`, `$render` it
- * to update the DOM, and finally call `$validate` on it.
- * </div>
- *
- * @param {*} value value from the view.
- * @param {string} trigger Event that triggered the update.
- */
- this.$setViewValue = function(value, trigger) {
- ctrl.$viewValue = value;
- if (!ctrl.$options || ctrl.$options.updateOnDefault) {
- ctrl.$$debounceViewValueCommit(trigger);
- }
- };
-
- this.$$debounceViewValueCommit = function(trigger) {
- var debounceDelay = 0,
- options = ctrl.$options,
- debounce;
-
- if (options && isDefined(options.debounce)) {
- debounce = options.debounce;
- if (isNumber(debounce)) {
- debounceDelay = debounce;
- } else if (isNumber(debounce[trigger])) {
- debounceDelay = debounce[trigger];
- } else if (isNumber(debounce['default'])) {
- debounceDelay = debounce['default'];
- }
- }
-
- $timeout.cancel(pendingDebounce);
- if (debounceDelay) {
- pendingDebounce = $timeout(function() {
- ctrl.$commitViewValue();
- }, debounceDelay);
- } else if ($rootScope.$$phase) {
- ctrl.$commitViewValue();
- } else {
- $scope.$apply(function() {
- ctrl.$commitViewValue();
- });
- }
- };
-
- // model -> value
- // Note: we cannot use a normal scope.$watch as we want to detect the following:
- // 1. scope value is 'a'
- // 2. user enters 'b'
- // 3. ng-change kicks in and reverts scope value to 'a'
- // -> scope value did not change since the last digest as
- // ng-change executes in apply phase
- // 4. view should be changed back to 'a'
- $scope.$watch(function ngModelWatch() {
- var modelValue = ngModelGet($scope);
-
- // if scope model value and ngModel value are out of sync
- // TODO(perf): why not move this to the action fn?
- if (modelValue !== ctrl.$modelValue &&
- // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator
- (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)
- ) {
- ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;
- parserValid = undefined;
-
- var formatters = ctrl.$formatters,
- idx = formatters.length;
-
- var viewValue = modelValue;
- while (idx--) {
- viewValue = formatters[idx](viewValue);
- }
- if (ctrl.$viewValue !== viewValue) {
- ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;
- ctrl.$render();
-
- ctrl.$$runValidators(modelValue, viewValue, noop);
- }
- }
-
- return modelValue;
- });
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngModel
- *
- * @element input
- * @priority 1
- *
- * @description
- * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a
- * property on the scope using {@link ngModel.NgModelController NgModelController},
- * which is created and exposed by this directive.
- *
- * `ngModel` is responsible for:
- *
- * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`
- * require.
- * - Providing validation behavior (i.e. required, number, email, url).
- * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).
- * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.
- * - Registering the control with its parent {@link ng.directive:form form}.
- *
- * Note: `ngModel` will try to bind to the property given by evaluating the expression on the
- * current scope. If the property doesn't already exist on this scope, it will be created
- * implicitly and added to the scope.
- *
- * For best practices on using `ngModel`, see:
- *
- * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)
- *
- * For basic examples, how to use `ngModel`, see:
- *
- * - {@link ng.directive:input input}
- * - {@link input[text] text}
- * - {@link input[checkbox] checkbox}
- * - {@link input[radio] radio}
- * - {@link input[number] number}
- * - {@link input[email] email}
- * - {@link input[url] url}
- * - {@link input[date] date}
- * - {@link input[datetime-local] datetime-local}
- * - {@link input[time] time}
- * - {@link input[month] month}
- * - {@link input[week] week}
- * - {@link ng.directive:select select}
- * - {@link ng.directive:textarea textarea}
- *
- * # CSS classes
- * The following CSS classes are added and removed on the associated input/select/textarea element
- * depending on the validity of the model.
- *
- * - `ng-valid`: the model is valid
- * - `ng-invalid`: the model is invalid
- * - `ng-valid-[key]`: for each valid key added by `$setValidity`
- * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`
- * - `ng-pristine`: the control hasn't been interacted with yet
- * - `ng-dirty`: the control has been interacted with
- * - `ng-touched`: the control has been blurred
- * - `ng-untouched`: the control hasn't been blurred
- * - `ng-pending`: any `$asyncValidators` are unfulfilled
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- * ## Animation Hooks
- *
- * Animations within models are triggered when any of the associated CSS classes are added and removed
- * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,
- * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.
- * The animations that are triggered within ngModel are similar to how they work in ngClass and
- * animations can be hooked into using CSS transitions, keyframes as well as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style an input element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-input {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-input.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- * <example deps="angular-animate.js" animations="true" fixBase="true" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = '1';
- }]);
- </script>
- <style>
- .my-input {
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-input.ng-invalid {
- color:white;
- background: red;
- }
- </style>
- <p id="inputDescription">
- Update input to see transitions when valid/invalid.
- Integer is a valid value.
- </p>
- <form name="testForm" ng-controller="ExampleController">
- <input ng-model="val" ng-pattern="/^\d+$/" name="anim" class="my-input"
- aria-describedby="inputDescription" />
- </form>
- </file>
- * </example>
- *
- * ## Binding to a getter/setter
- *
- * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a
- * function that returns a representation of the model when called with zero arguments, and sets
- * the internal state of a model when called with an argument. It's sometimes useful to use this
- * for models that have an internal representation that's different from what the model exposes
- * to the view.
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more
- * frequently than other parts of your code.
- * </div>
- *
- * You use this behavior by adding `ng-model-options="{ getterSetter: true }"` to an element that
- * has `ng-model` attached to it. You can also add `ng-model-options="{ getterSetter: true }"` to
- * a `<form>`, which will enable this behavior for all `<input>`s within it. See
- * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.
- *
- * The following example shows how to use `ngModel` with a getter/setter:
- *
- * @example
- * <example name="ngModel-getter-setter" module="getterSetterExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ getterSetter: true }" />
- </label>
- </form>
- <pre>user.name = <span ng-bind="user.name()"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('getterSetterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- var _name = 'Brian';
- $scope.user = {
- name: function(newName) {
- // Note that newName can be undefined for two reasons:
- // 1. Because it is called as a getter and thus called with no arguments
- // 2. Because the property should actually be set to undefined. This happens e.g. if the
- // input is invalid
- return arguments.length ? (_name = newName) : _name;
- }
- };
- }]);
- </file>
- * </example>
- */
-var ngModelDirective = ['$rootScope', function($rootScope) {
- return {
- restrict: 'A',
- require: ['ngModel', '^?form', '^?ngModelOptions'],
- controller: NgModelController,
- // Prelink needs to run before any input directive
- // so that we can set the NgModelOptions in NgModelController
- // before anyone else uses it.
- priority: 1,
- compile: function ngModelCompile(element) {
- // Setup initial state of the control
- element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);
-
- return {
- pre: function ngModelPreLink(scope, element, attr, ctrls) {
- var modelCtrl = ctrls[0],
- formCtrl = ctrls[1] || modelCtrl.$$parentForm;
-
- modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);
-
- // notify others, especially parent forms
- formCtrl.$addControl(modelCtrl);
-
- attr.$observe('name', function(newValue) {
- if (modelCtrl.$name !== newValue) {
- modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);
- }
- });
-
- scope.$on('$destroy', function() {
- modelCtrl.$$parentForm.$removeControl(modelCtrl);
- });
- },
- post: function ngModelPostLink(scope, element, attr, ctrls) {
- var modelCtrl = ctrls[0];
- if (modelCtrl.$options && modelCtrl.$options.updateOn) {
- element.on(modelCtrl.$options.updateOn, function(ev) {
- modelCtrl.$$debounceViewValueCommit(ev && ev.type);
- });
- }
-
- element.on('blur', function(ev) {
- if (modelCtrl.$touched) return;
-
- if ($rootScope.$$phase) {
- scope.$evalAsync(modelCtrl.$setTouched);
- } else {
- scope.$apply(modelCtrl.$setTouched);
- }
- });
- }
- };
- }
- };
-}];
-
-var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/;
-
-/**
- * @ngdoc directive
- * @name ngModelOptions
- *
- * @description
- * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of
- * events that will trigger a model update and/or a debouncing delay so that the actual update only
- * takes place when a timer expires; this timer will be reset after another change takes place.
- *
- * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might
- * be different from the value in the actual model. This means that if you update the model you
- * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in
- * order to make sure it is synchronized with the model and that any debounced action is canceled.
- *
- * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}
- * method is by making sure the input is placed inside a form that has a `name` attribute. This is
- * important because `form` controllers are published to the related scope under the name in their
- * `name` attribute.
- *
- * Any pending changes will take place immediately when an enclosing form is submitted via the
- * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
- * to have access to the updated model.
- *
- * `ngModelOptions` has an effect on the element it's declared on and its descendants.
- *
- * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:
- * - `updateOn`: string specifying which event should the input be bound to. You can set several
- * events using an space delimited list. There is a special event called `default` that
- * matches the default events belonging of the control.
- * - `debounce`: integer value which contains the debounce model update value in milliseconds. A
- * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a
- * custom value for each event. For example:
- * `ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }"`
- * - `allowInvalid`: boolean value which indicates that the model can be set with values that did
- * not validate correctly instead of the default behavior of setting the model to undefined.
- * - `getterSetter`: boolean value which determines whether or not to treat functions bound to
- `ngModel` as getters/setters.
- * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for
- * `<input type="date">`, `<input type="time">`, ... . It understands UTC/GMT and the
- * continental US time zone abbreviations, but for general use, use a time zone offset, for
- * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
- * If not specified, the timezone of the browser will be used.
- *
- * @example
-
- The following example shows how to override immediate updates. Changes on the inputs within the
- form will update the model only when the control loses focus (blur event). If `escape` key is
- pressed while the input field is focused, the value is reset to the value in the current model.
-
- <example name="ngModelOptions-directive-blur" module="optionsExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ updateOn: 'blur' }"
- ng-keyup="cancel($event)" />
- </label><br />
- <label>Other data:
- <input type="text" ng-model="user.data" />
- </label><br />
- </form>
- <pre>user.name = <span ng-bind="user.name"></span></pre>
- <pre>user.data = <span ng-bind="user.data"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('optionsExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'John', data: '' };
-
- $scope.cancel = function(e) {
- if (e.keyCode == 27) {
- $scope.userForm.userName.$rollbackViewValue();
- }
- };
- }]);
- </file>
- <file name="protractor.js" type="protractor">
- var model = element(by.binding('user.name'));
- var input = element(by.model('user.name'));
- var other = element(by.model('user.data'));
-
- it('should allow custom events', function() {
- input.sendKeys(' Doe');
- input.click();
- expect(model.getText()).toEqual('John');
- other.click();
- expect(model.getText()).toEqual('John Doe');
- });
-
- it('should $rollbackViewValue when model changes', function() {
- input.sendKeys(' Doe');
- expect(input.getAttribute('value')).toEqual('John Doe');
- input.sendKeys(protractor.Key.ESCAPE);
- expect(input.getAttribute('value')).toEqual('John');
- other.click();
- expect(model.getText()).toEqual('John');
- });
- </file>
- </example>
-
- This one shows how to debounce model changes. Model will be updated only 1 sec after last change.
- If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.
-
- <example name="ngModelOptions-directive-debounce" module="optionsExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ debounce: 1000 }" />
- </label>
- <button ng-click="userForm.userName.$rollbackViewValue(); user.name=''">Clear</button>
- <br />
- </form>
- <pre>user.name = <span ng-bind="user.name"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('optionsExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'Igor' };
- }]);
- </file>
- </example>
-
- This one shows how to bind to getter/setters:
-
- <example name="ngModelOptions-directive-getter-setter" module="getterSetterExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ getterSetter: true }" />
- </label>
- </form>
- <pre>user.name = <span ng-bind="user.name()"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('getterSetterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- var _name = 'Brian';
- $scope.user = {
- name: function(newName) {
- // Note that newName can be undefined for two reasons:
- // 1. Because it is called as a getter and thus called with no arguments
- // 2. Because the property should actually be set to undefined. This happens e.g. if the
- // input is invalid
- return arguments.length ? (_name = newName) : _name;
- }
- };
- }]);
- </file>
- </example>
- */
-var ngModelOptionsDirective = function() {
- return {
- restrict: 'A',
- controller: ['$scope', '$attrs', function($scope, $attrs) {
- var that = this;
- this.$options = copy($scope.$eval($attrs.ngModelOptions));
- // Allow adding/overriding bound events
- if (isDefined(this.$options.updateOn)) {
- this.$options.updateOnDefault = false;
- // extract "default" pseudo-event from list of events that can trigger a model update
- this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
- that.$options.updateOnDefault = true;
- return ' ';
- }));
- } else {
- this.$options.updateOnDefault = true;
- }
- }]
- };
-};
-
-
-
-// helper methods
-function addSetValidityMethod(context) {
- var ctrl = context.ctrl,
- $element = context.$element,
- classCache = {},
- set = context.set,
- unset = context.unset,
- $animate = context.$animate;
-
- classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));
-
- ctrl.$setValidity = setValidity;
-
- function setValidity(validationErrorKey, state, controller) {
- if (isUndefined(state)) {
- createAndSet('$pending', validationErrorKey, controller);
- } else {
- unsetAndCleanup('$pending', validationErrorKey, controller);
- }
- if (!isBoolean(state)) {
- unset(ctrl.$error, validationErrorKey, controller);
- unset(ctrl.$$success, validationErrorKey, controller);
- } else {
- if (state) {
- unset(ctrl.$error, validationErrorKey, controller);
- set(ctrl.$$success, validationErrorKey, controller);
- } else {
- set(ctrl.$error, validationErrorKey, controller);
- unset(ctrl.$$success, validationErrorKey, controller);
- }
- }
- if (ctrl.$pending) {
- cachedToggleClass(PENDING_CLASS, true);
- ctrl.$valid = ctrl.$invalid = undefined;
- toggleValidationCss('', null);
- } else {
- cachedToggleClass(PENDING_CLASS, false);
- ctrl.$valid = isObjectEmpty(ctrl.$error);
- ctrl.$invalid = !ctrl.$valid;
- toggleValidationCss('', ctrl.$valid);
- }
-
- // re-read the state as the set/unset methods could have
- // combined state in ctrl.$error[validationError] (used for forms),
- // where setting/unsetting only increments/decrements the value,
- // and does not replace it.
- var combinedState;
- if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {
- combinedState = undefined;
- } else if (ctrl.$error[validationErrorKey]) {
- combinedState = false;
- } else if (ctrl.$$success[validationErrorKey]) {
- combinedState = true;
- } else {
- combinedState = null;
- }
-
- toggleValidationCss(validationErrorKey, combinedState);
- ctrl.$$parentForm.$setValidity(validationErrorKey, combinedState, ctrl);
- }
-
- function createAndSet(name, value, controller) {
- if (!ctrl[name]) {
- ctrl[name] = {};
- }
- set(ctrl[name], value, controller);
- }
-
- function unsetAndCleanup(name, value, controller) {
- if (ctrl[name]) {
- unset(ctrl[name], value, controller);
- }
- if (isObjectEmpty(ctrl[name])) {
- ctrl[name] = undefined;
- }
- }
-
- function cachedToggleClass(className, switchValue) {
- if (switchValue && !classCache[className]) {
- $animate.addClass($element, className);
- classCache[className] = true;
- } else if (!switchValue && classCache[className]) {
- $animate.removeClass($element, className);
- classCache[className] = false;
- }
- }
-
- function toggleValidationCss(validationErrorKey, isValid) {
- validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
-
- cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);
- cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);
- }
-}
-
-function isObjectEmpty(obj) {
- if (obj) {
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- return false;
- }
- }
- }
- return true;
-}
-
-/**
- * @ngdoc directive
- * @name ngNonBindable
- * @restrict AC
- * @priority 1000
- *
- * @description
- * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current
- * DOM element. This is useful if the element contains what appears to be Angular directives and
- * bindings but which should be ignored by Angular. This could be the case if you have a site that
- * displays snippets of code, for instance.
- *
- * @element ANY
- *
- * @example
- * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,
- * but the one wrapped in `ngNonBindable` is left alone.
- *
- * @example
- <example>
- <file name="index.html">
- <div>Normal: {{1 + 2}}</div>
- <div ng-non-bindable>Ignored: {{1 + 2}}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-non-bindable', function() {
- expect(element(by.binding('1 + 2')).getText()).toContain('3');
- expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/);
- });
- </file>
- </example>
- */
-var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
-
-/* global jqLiteRemove */
-
-var ngOptionsMinErr = minErr('ngOptions');
-
-/**
- * @ngdoc directive
- * @name ngOptions
- * @restrict A
- *
- * @description
- *
- * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`
- * elements for the `<select>` element using the array or object obtained by evaluating the
- * `ngOptions` comprehension expression.
- *
- * In many cases, `ngRepeat` can be used on `<option>` elements instead of `ngOptions` to achieve a
- * similar result. However, `ngOptions` provides some benefits such as reducing memory and
- * increasing speed by not creating a new scope for each repeated instance, as well as providing
- * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
- * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound
- * to a non-string value. This is because an option element can only be bound to string values at
- * present.
- *
- * When an item in the `<select>` menu is selected, the array element or object property
- * represented by the selected option will be bound to the model identified by the `ngModel`
- * directive.
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * ## Complex Models (objects or collections)
- *
- * By default, `ngModel` watches the model by reference, not value. This is important to know when
- * binding the select to a model that is an object or a collection.
- *
- * One issue occurs if you want to preselect an option. For example, if you set
- * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,
- * because the objects are not identical. So by default, you should always reference the item in your collection
- * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.
- *
- * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity
- * of the item not by reference, but by the result of the `track by` expression. For example, if your
- * collection items have an id property, you would `track by item.id`.
- *
- * A different issue with objects or collections is that ngModel won't detect if an object property or
- * a collection item changes. For that reason, `ngOptions` additionally watches the model using
- * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.
- * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection
- * has not changed identity, but only a property on the object or an item in the collection changes.
- *
- * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection
- * if the model is an array). This means that changing a property deeper than the first level inside the
- * object/collection will not trigger a re-rendering.
- *
- * ## `select` **`as`**
- *
- * Using `select` **`as`** will bind the result of the `select` expression to the model, but
- * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)
- * or property name (for object data sources) of the value within the collection. If a **`track by`** expression
- * is used, the result of that expression will be set as the value of the `option` and `select` elements.
- *
- *
- * ### `select` **`as`** and **`track by`**
- *
- * <div class="alert alert-warning">
- * Be careful when using `select` **`as`** and **`track by`** in the same expression.
- * </div>
- *
- * Given this array of items on the $scope:
- *
- * ```js
- * $scope.items = [{
- * id: 1,
- * label: 'aLabel',
- * subItem: { name: 'aSubItem' }
- * }, {
- * id: 2,
- * label: 'bLabel',
- * subItem: { name: 'bSubItem' }
- * }];
- * ```
- *
- * This will work:
- *
- * ```html
- * <select ng-options="item as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0];
- * ```
- *
- * but this will not work:
- *
- * ```html
- * <select ng-options="item.subItem as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0].subItem;
- * ```
- *
- * In both examples, the **`track by`** expression is applied successfully to each `item` in the
- * `items` array. Because the selected option has been set programmatically in the controller, the
- * **`track by`** expression is also applied to the `ngModel` value. In the first example, the
- * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with
- * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**
- * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value
- * is not matched against any `<option>` and the `<select>` appears as having no selected value.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required The control is considered valid only if value is entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {comprehension_expression=} ngOptions in one of the following forms:
- *
- * * for array data sources:
- * * `label` **`for`** `value` **`in`** `array`
- * * `select` **`as`** `label` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`
- * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`
- * (for including a filter with `track by`)
- * * for object data sources:
- * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`group by`** `group`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`disable when`** `disable`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- *
- * Where:
- *
- * * `array` / `object`: an expression which evaluates to an array / object to iterate over.
- * * `value`: local variable which will refer to each item in the `array` or each property value
- * of `object` during iteration.
- * * `key`: local variable which will refer to a property name in `object` during iteration.
- * * `label`: The result of this expression will be the label for `<option>` element. The
- * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).
- * * `select`: The result of this expression will be bound to the model of the parent `<select>`
- * element. If not specified, `select` expression will default to `value`.
- * * `group`: The result of this expression will be used to group options using the `<optgroup>`
- * DOM element.
- * * `disable`: The result of this expression will be used to disable the rendered `<option>`
- * element. Return `true` to disable.
- * * `trackexpr`: Used when working with an array of objects. The result of this expression will be
- * used to identify the objects in the array. The `trackexpr` will most likely refer to the
- * `value` variable (e.g. `value.propertyName`). With this the selection is preserved
- * even when the options are recreated (e.g. reloaded from the server).
- *
- * @example
- <example module="selectExample">
- <file name="index.html">
- <script>
- angular.module('selectExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.colors = [
- {name:'black', shade:'dark'},
- {name:'white', shade:'light', notAnOption: true},
- {name:'red', shade:'dark'},
- {name:'blue', shade:'dark', notAnOption: true},
- {name:'yellow', shade:'light', notAnOption: false}
- ];
- $scope.myColor = $scope.colors[2]; // red
- }]);
- </script>
- <div ng-controller="ExampleController">
- <ul>
- <li ng-repeat="color in colors">
- <label>Name: <input ng-model="color.name"></label>
- <label><input type="checkbox" ng-model="color.notAnOption"> Disabled?</label>
- <button ng-click="colors.splice($index, 1)" aria-label="Remove">X</button>
- </li>
- <li>
- <button ng-click="colors.push({})">add</button>
- </li>
- </ul>
- <hr/>
- <label>Color (null not allowed):
- <select ng-model="myColor" ng-options="color.name for color in colors"></select>
- </label><br/>
- <label>Color (null allowed):
- <span class="nullable">
- <select ng-model="myColor" ng-options="color.name for color in colors">
- <option value="">-- choose color --</option>
- </select>
- </span></label><br/>
-
- <label>Color grouped by shade:
- <select ng-model="myColor" ng-options="color.name group by color.shade for color in colors">
- </select>
- </label><br/>
-
- <label>Color grouped by shade, with some disabled:
- <select ng-model="myColor"
- ng-options="color.name group by color.shade disable when color.notAnOption for color in colors">
- </select>
- </label><br/>
-
-
-
- Select <button ng-click="myColor = { name:'not in list', shade: 'other' }">bogus</button>.
- <br/>
- <hr/>
- Currently selected: {{ {selected_color:myColor} }}
- <div style="border:solid 1px black; height:20px"
- ng-style="{'background-color':myColor.name}">
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-options', function() {
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');
- element.all(by.model('myColor')).first().click();
- element.all(by.css('select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');
- element(by.css('.nullable select[ng-model="myColor"]')).click();
- element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');
- });
- </file>
- </example>
- */
-
-// jshint maxlen: false
-// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999
-var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/;
- // 1: value expression (valueFn)
- // 2: label expression (displayFn)
- // 3: group by expression (groupByFn)
- // 4: disable when expression (disableWhenFn)
- // 5: array item variable name
- // 6: object item key variable name
- // 7: object item value variable name
- // 8: collection expression
- // 9: track by expression
-// jshint maxlen: 100
-
-
-var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
-
- function parseOptionsExpression(optionsExp, selectElement, scope) {
-
- var match = optionsExp.match(NG_OPTIONS_REGEXP);
- if (!(match)) {
- throw ngOptionsMinErr('iexp',
- "Expected expression in form of " +
- "'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +
- " but got '{0}'. Element: {1}",
- optionsExp, startingTag(selectElement));
- }
-
- // Extract the parts from the ngOptions expression
-
- // The variable name for the value of the item in the collection
- var valueName = match[5] || match[7];
- // The variable name for the key of the item in the collection
- var keyName = match[6];
-
- // An expression that generates the viewValue for an option if there is a label expression
- var selectAs = / as /.test(match[0]) && match[1];
- // An expression that is used to track the id of each object in the options collection
- var trackBy = match[9];
- // An expression that generates the viewValue for an option if there is no label expression
- var valueFn = $parse(match[2] ? match[1] : valueName);
- var selectAsFn = selectAs && $parse(selectAs);
- var viewValueFn = selectAsFn || valueFn;
- var trackByFn = trackBy && $parse(trackBy);
-
- // Get the value by which we are going to track the option
- // if we have a trackFn then use that (passing scope and locals)
- // otherwise just hash the given viewValue
- var getTrackByValueFn = trackBy ?
- function(value, locals) { return trackByFn(scope, locals); } :
- function getHashOfValue(value) { return hashKey(value); };
- var getTrackByValue = function(value, key) {
- return getTrackByValueFn(value, getLocals(value, key));
- };
-
- var displayFn = $parse(match[2] || match[1]);
- var groupByFn = $parse(match[3] || '');
- var disableWhenFn = $parse(match[4] || '');
- var valuesFn = $parse(match[8]);
-
- var locals = {};
- var getLocals = keyName ? function(value, key) {
- locals[keyName] = key;
- locals[valueName] = value;
- return locals;
- } : function(value) {
- locals[valueName] = value;
- return locals;
- };
-
-
- function Option(selectValue, viewValue, label, group, disabled) {
- this.selectValue = selectValue;
- this.viewValue = viewValue;
- this.label = label;
- this.group = group;
- this.disabled = disabled;
- }
-
- function getOptionValuesKeys(optionValues) {
- var optionValuesKeys;
-
- if (!keyName && isArrayLike(optionValues)) {
- optionValuesKeys = optionValues;
- } else {
- // if object, extract keys, in enumeration order, unsorted
- optionValuesKeys = [];
- for (var itemKey in optionValues) {
- if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {
- optionValuesKeys.push(itemKey);
- }
- }
- }
- return optionValuesKeys;
- }
-
- return {
- trackBy: trackBy,
- getTrackByValue: getTrackByValue,
- getWatchables: $parse(valuesFn, function(optionValues) {
- // Create a collection of things that we would like to watch (watchedArray)
- // so that they can all be watched using a single $watchCollection
- // that only runs the handler once if anything changes
- var watchedArray = [];
- optionValues = optionValues || [];
-
- var optionValuesKeys = getOptionValuesKeys(optionValues);
- var optionValuesLength = optionValuesKeys.length;
- for (var index = 0; index < optionValuesLength; index++) {
- var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];
- var value = optionValues[key];
-
- var locals = getLocals(optionValues[key], key);
- var selectValue = getTrackByValueFn(optionValues[key], locals);
- watchedArray.push(selectValue);
-
- // Only need to watch the displayFn if there is a specific label expression
- if (match[2] || match[1]) {
- var label = displayFn(scope, locals);
- watchedArray.push(label);
- }
-
- // Only need to watch the disableWhenFn if there is a specific disable expression
- if (match[4]) {
- var disableWhen = disableWhenFn(scope, locals);
- watchedArray.push(disableWhen);
- }
- }
- return watchedArray;
- }),
-
- getOptions: function() {
-
- var optionItems = [];
- var selectValueMap = {};
-
- // The option values were already computed in the `getWatchables` fn,
- // which must have been called to trigger `getOptions`
- var optionValues = valuesFn(scope) || [];
- var optionValuesKeys = getOptionValuesKeys(optionValues);
- var optionValuesLength = optionValuesKeys.length;
-
- for (var index = 0; index < optionValuesLength; index++) {
- var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];
- var value = optionValues[key];
- var locals = getLocals(value, key);
- var viewValue = viewValueFn(scope, locals);
- var selectValue = getTrackByValueFn(viewValue, locals);
- var label = displayFn(scope, locals);
- var group = groupByFn(scope, locals);
- var disabled = disableWhenFn(scope, locals);
- var optionItem = new Option(selectValue, viewValue, label, group, disabled);
-
- optionItems.push(optionItem);
- selectValueMap[selectValue] = optionItem;
- }
-
- return {
- items: optionItems,
- selectValueMap: selectValueMap,
- getOptionFromViewValue: function(value) {
- return selectValueMap[getTrackByValue(value)];
- },
- getViewValueFromOption: function(option) {
- // If the viewValue could be an object that may be mutated by the application,
- // we need to make a copy and not return the reference to the value on the option.
- return trackBy ? angular.copy(option.viewValue) : option.viewValue;
- }
- };
- }
- };
- }
-
-
- // we can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- var optionTemplate = document.createElement('option'),
- optGroupTemplate = document.createElement('optgroup');
-
-
- function ngOptionsPostLink(scope, selectElement, attr, ctrls) {
-
- // if ngModel is not defined, we don't need to do anything
- var ngModelCtrl = ctrls[1];
- if (!ngModelCtrl) return;
-
- var selectCtrl = ctrls[0];
- var multiple = attr.multiple;
-
- // The emptyOption allows the application developer to provide their own custom "empty"
- // option when the viewValue does not match any of the option values.
- var emptyOption;
- for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {
- if (children[i].value === '') {
- emptyOption = children.eq(i);
- break;
- }
- }
-
- var providedEmptyOption = !!emptyOption;
-
- var unknownOption = jqLite(optionTemplate.cloneNode(false));
- unknownOption.val('?');
-
- var options;
- var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);
-
-
- var renderEmptyOption = function() {
- if (!providedEmptyOption) {
- selectElement.prepend(emptyOption);
- }
- selectElement.val('');
- emptyOption.prop('selected', true); // needed for IE
- emptyOption.attr('selected', true);
- };
-
- var removeEmptyOption = function() {
- if (!providedEmptyOption) {
- emptyOption.remove();
- }
- };
-
-
- var renderUnknownOption = function() {
- selectElement.prepend(unknownOption);
- selectElement.val('?');
- unknownOption.prop('selected', true); // needed for IE
- unknownOption.attr('selected', true);
- };
-
- var removeUnknownOption = function() {
- unknownOption.remove();
- };
-
- // Update the controller methods for multiple selectable options
- if (!multiple) {
-
- selectCtrl.writeValue = function writeNgOptionsValue(value) {
- var option = options.getOptionFromViewValue(value);
-
- if (option && !option.disabled) {
- if (selectElement[0].value !== option.selectValue) {
- removeUnknownOption();
- removeEmptyOption();
-
- selectElement[0].value = option.selectValue;
- option.element.selected = true;
- option.element.setAttribute('selected', 'selected');
- }
- } else {
- if (value === null || providedEmptyOption) {
- removeUnknownOption();
- renderEmptyOption();
- } else {
- removeEmptyOption();
- renderUnknownOption();
- }
- }
- };
-
- selectCtrl.readValue = function readNgOptionsValue() {
-
- var selectedOption = options.selectValueMap[selectElement.val()];
-
- if (selectedOption && !selectedOption.disabled) {
- removeEmptyOption();
- removeUnknownOption();
- return options.getViewValueFromOption(selectedOption);
- }
- return null;
- };
-
- // If we are using `track by` then we must watch the tracked value on the model
- // since ngModel only watches for object identity change
- if (ngOptions.trackBy) {
- scope.$watch(
- function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },
- function() { ngModelCtrl.$render(); }
- );
- }
-
- } else {
-
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
-
-
- selectCtrl.writeValue = function writeNgOptionsMultiple(value) {
- options.items.forEach(function(option) {
- option.element.selected = false;
- });
-
- if (value) {
- value.forEach(function(item) {
- var option = options.getOptionFromViewValue(item);
- if (option && !option.disabled) option.element.selected = true;
- });
- }
- };
-
-
- selectCtrl.readValue = function readNgOptionsMultiple() {
- var selectedValues = selectElement.val() || [],
- selections = [];
-
- forEach(selectedValues, function(value) {
- var option = options.selectValueMap[value];
- if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));
- });
-
- return selections;
- };
-
- // If we are using `track by` then we must watch these tracked values on the model
- // since ngModel only watches for object identity change
- if (ngOptions.trackBy) {
-
- scope.$watchCollection(function() {
- if (isArray(ngModelCtrl.$viewValue)) {
- return ngModelCtrl.$viewValue.map(function(value) {
- return ngOptions.getTrackByValue(value);
- });
- }
- }, function() {
- ngModelCtrl.$render();
- });
-
- }
- }
-
-
- if (providedEmptyOption) {
-
- // we need to remove it before calling selectElement.empty() because otherwise IE will
- // remove the label from the element. wtf?
- emptyOption.remove();
-
- // compile the element since there might be bindings in it
- $compile(emptyOption)(scope);
-
- // remove the class, which is added automatically because we recompile the element and it
- // becomes the compilation root
- emptyOption.removeClass('ng-scope');
- } else {
- emptyOption = jqLite(optionTemplate.cloneNode(false));
- }
-
- // We need to do this here to ensure that the options object is defined
- // when we first hit it in writeNgOptionsValue
- updateOptions();
-
- // We will re-render the option elements if the option values or labels change
- scope.$watchCollection(ngOptions.getWatchables, updateOptions);
-
- // ------------------------------------------------------------------ //
-
-
- function updateOptionElement(option, element) {
- option.element = element;
- element.disabled = option.disabled;
- // NOTE: The label must be set before the value, otherwise IE10/11/EDGE create unresponsive
- // selects in certain circumstances when multiple selects are next to each other and display
- // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].
- // See https://github.com/angular/angular.js/issues/11314 for more info.
- // This is unfortunately untestable with unit / e2e tests
- if (option.label !== element.label) {
- element.label = option.label;
- element.textContent = option.label;
- }
- if (option.value !== element.value) element.value = option.selectValue;
- }
-
- function addOrReuseElement(parent, current, type, templateElement) {
- var element;
- // Check whether we can reuse the next element
- if (current && lowercase(current.nodeName) === type) {
- // The next element is the right type so reuse it
- element = current;
- } else {
- // The next element is not the right type so create a new one
- element = templateElement.cloneNode(false);
- if (!current) {
- // There are no more elements so just append it to the select
- parent.appendChild(element);
- } else {
- // The next element is not a group so insert the new one
- parent.insertBefore(element, current);
- }
- }
- return element;
- }
-
-
- function removeExcessElements(current) {
- var next;
- while (current) {
- next = current.nextSibling;
- jqLiteRemove(current);
- current = next;
- }
- }
-
-
- function skipEmptyAndUnknownOptions(current) {
- var emptyOption_ = emptyOption && emptyOption[0];
- var unknownOption_ = unknownOption && unknownOption[0];
-
- // We cannot rely on the extracted empty option being the same as the compiled empty option,
- // because the compiled empty option might have been replaced by a comment because
- // it had an "element" transclusion directive on it (such as ngIf)
- if (emptyOption_ || unknownOption_) {
- while (current &&
- (current === emptyOption_ ||
- current === unknownOption_ ||
- current.nodeType === NODE_TYPE_COMMENT ||
- current.value === '')) {
- current = current.nextSibling;
- }
- }
- return current;
- }
-
-
- function updateOptions() {
-
- var previousValue = options && selectCtrl.readValue();
-
- options = ngOptions.getOptions();
-
- var groupMap = {};
- var currentElement = selectElement[0].firstChild;
-
- // Ensure that the empty option is always there if it was explicitly provided
- if (providedEmptyOption) {
- selectElement.prepend(emptyOption);
- }
-
- currentElement = skipEmptyAndUnknownOptions(currentElement);
-
- options.items.forEach(function updateOption(option) {
- var group;
- var groupElement;
- var optionElement;
-
- if (option.group) {
-
- // This option is to live in a group
- // See if we have already created this group
- group = groupMap[option.group];
-
- if (!group) {
-
- // We have not already created this group
- groupElement = addOrReuseElement(selectElement[0],
- currentElement,
- 'optgroup',
- optGroupTemplate);
- // Move to the next element
- currentElement = groupElement.nextSibling;
-
- // Update the label on the group element
- groupElement.label = option.group;
-
- // Store it for use later
- group = groupMap[option.group] = {
- groupElement: groupElement,
- currentOptionElement: groupElement.firstChild
- };
-
- }
-
- // So now we have a group for this option we add the option to the group
- optionElement = addOrReuseElement(group.groupElement,
- group.currentOptionElement,
- 'option',
- optionTemplate);
- updateOptionElement(option, optionElement);
- // Move to the next element
- group.currentOptionElement = optionElement.nextSibling;
-
- } else {
-
- // This option is not in a group
- optionElement = addOrReuseElement(selectElement[0],
- currentElement,
- 'option',
- optionTemplate);
- updateOptionElement(option, optionElement);
- // Move to the next element
- currentElement = optionElement.nextSibling;
- }
- });
-
-
- // Now remove all excess options and group
- Object.keys(groupMap).forEach(function(key) {
- removeExcessElements(groupMap[key].currentOptionElement);
- });
- removeExcessElements(currentElement);
-
- ngModelCtrl.$render();
-
- // Check to see if the value has changed due to the update to the options
- if (!ngModelCtrl.$isEmpty(previousValue)) {
- var nextValue = selectCtrl.readValue();
- if (ngOptions.trackBy ? !equals(previousValue, nextValue) : previousValue !== nextValue) {
- ngModelCtrl.$setViewValue(nextValue);
- ngModelCtrl.$render();
- }
- }
-
- }
- }
-
- return {
- restrict: 'A',
- terminal: true,
- require: ['select', '?ngModel'],
- link: {
- pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {
- // Deactivate the SelectController.register method to prevent
- // option directives from accidentally registering themselves
- // (and unwanted $destroy handlers etc.)
- ctrls[0].registerOption = noop;
- },
- post: ngOptionsPostLink
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngPluralize
- * @restrict EA
- *
- * @description
- * `ngPluralize` is a directive that displays messages according to en-US localization rules.
- * These rules are bundled with angular.js, but can be overridden
- * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive
- * by specifying the mappings between
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * and the strings to be displayed.
- *
- * # Plural categories and explicit number rules
- * There are two
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * in Angular's default en-US locale: "one" and "other".
- *
- * While a plural category may match many numbers (for example, in en-US locale, "other" can match
- * any number that is not 1), an explicit number rule can only match one number. For example, the
- * explicit number rule for "3" matches the number 3. There are examples of plural categories
- * and explicit number rules throughout the rest of this documentation.
- *
- * # Configuring ngPluralize
- * You configure ngPluralize by providing 2 attributes: `count` and `when`.
- * You can also provide an optional attribute, `offset`.
- *
- * The value of the `count` attribute can be either a string or an {@link guide/expression
- * Angular expression}; these are evaluated on the current scope for its bound value.
- *
- * The `when` attribute specifies the mappings between plural categories and the actual
- * string to be displayed. The value of the attribute should be a JSON object.
- *
- * The following example shows how to configure ngPluralize:
- *
- * ```html
- * <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- * 'one': '1 person is viewing.',
- * 'other': '{} people are viewing.'}">
- * </ng-pluralize>
- *```
- *
- * In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not
- * specify this rule, 0 would be matched to the "other" category and "0 people are viewing"
- * would be shown instead of "Nobody is viewing". You can specify an explicit number rule for
- * other numbers, for example 12, so that instead of showing "12 people are viewing", you can
- * show "a dozen people are viewing".
- *
- * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted
- * into pluralized strings. In the previous example, Angular will replace `{}` with
- * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder
- * for <span ng-non-bindable>{{numberExpression}}</span>.
- *
- * If no rule is defined for a category, then an empty string is displayed and a warning is generated.
- * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.
- *
- * # Configuring ngPluralize with offset
- * The `offset` attribute allows further customization of pluralized text, which can result in
- * a better user experience. For example, instead of the message "4 people are viewing this document",
- * you might display "John, Kate and 2 others are viewing this document".
- * The offset attribute allows you to offset a number by any desired value.
- * Let's take a look at an example:
- *
- * ```html
- * <ng-pluralize count="personCount" offset=2
- * when="{'0': 'Nobody is viewing.',
- * '1': '{{person1}} is viewing.',
- * '2': '{{person1}} and {{person2}} are viewing.',
- * 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- * </ng-pluralize>
- * ```
- *
- * Notice that we are still using two plural categories(one, other), but we added
- * three explicit number rules 0, 1 and 2.
- * When one person, perhaps John, views the document, "John is viewing" will be shown.
- * When three people view the document, no explicit number rule is found, so
- * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.
- * In this case, plural category 'one' is matched and "John, Mary and one other person are viewing"
- * is shown.
- *
- * Note that when you specify offsets, you must provide explicit number rules for
- * numbers from 0 up to and including the offset. If you use an offset of 3, for example,
- * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for
- * plural categories "one" and "other".
- *
- * @param {string|expression} count The variable to be bound to.
- * @param {string} when The mapping between plural category to its corresponding strings.
- * @param {number=} offset Offset to deduct from the total number.
- *
- * @example
- <example module="pluralizeExample">
- <file name="index.html">
- <script>
- angular.module('pluralizeExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.person1 = 'Igor';
- $scope.person2 = 'Misko';
- $scope.personCount = 1;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Person 1:<input type="text" ng-model="person1" value="Igor" /></label><br/>
- <label>Person 2:<input type="text" ng-model="person2" value="Misko" /></label><br/>
- <label>Number of People:<input type="text" ng-model="personCount" value="1" /></label><br/>
-
- <!--- Example with simple pluralization rules for en locale --->
- Without Offset:
- <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- 'one': '1 person is viewing.',
- 'other': '{} people are viewing.'}">
- </ng-pluralize><br>
-
- <!--- Example with offset --->
- With Offset(2):
- <ng-pluralize count="personCount" offset=2
- when="{'0': 'Nobody is viewing.',
- '1': '{{person1}} is viewing.',
- '2': '{{person1}} and {{person2}} are viewing.',
- 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- </ng-pluralize>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should show correct pluralized string', function() {
- var withoutOffset = element.all(by.css('ng-pluralize')).get(0);
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var countInput = element(by.model('personCount'));
-
- expect(withoutOffset.getText()).toEqual('1 person is viewing.');
- expect(withOffset.getText()).toEqual('Igor is viewing.');
-
- countInput.clear();
- countInput.sendKeys('0');
-
- expect(withoutOffset.getText()).toEqual('Nobody is viewing.');
- expect(withOffset.getText()).toEqual('Nobody is viewing.');
-
- countInput.clear();
- countInput.sendKeys('2');
-
- expect(withoutOffset.getText()).toEqual('2 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');
-
- countInput.clear();
- countInput.sendKeys('3');
-
- expect(withoutOffset.getText()).toEqual('3 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');
-
- countInput.clear();
- countInput.sendKeys('4');
-
- expect(withoutOffset.getText()).toEqual('4 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');
- });
- it('should show data-bound names', function() {
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var personCount = element(by.model('personCount'));
- var person1 = element(by.model('person1'));
- var person2 = element(by.model('person2'));
- personCount.clear();
- personCount.sendKeys('4');
- person1.clear();
- person1.sendKeys('Di');
- person2.clear();
- person2.sendKeys('Vojta');
- expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');
- });
- </file>
- </example>
- */
-var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {
- var BRACE = /{}/g,
- IS_WHEN = /^when(Minus)?(.+)$/;
-
- return {
- link: function(scope, element, attr) {
- var numberExp = attr.count,
- whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs
- offset = attr.offset || 0,
- whens = scope.$eval(whenExp) || {},
- whensExpFns = {},
- startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,
- watchRemover = angular.noop,
- lastCount;
-
- forEach(attr, function(expression, attributeName) {
- var tmpMatch = IS_WHEN.exec(attributeName);
- if (tmpMatch) {
- var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);
- whens[whenKey] = element.attr(attr.$attr[attributeName]);
- }
- });
- forEach(whens, function(expression, key) {
- whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));
-
- });
-
- scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {
- var count = parseFloat(newVal);
- var countIsNaN = isNaN(count);
-
- if (!countIsNaN && !(count in whens)) {
- // If an explicit number rule such as 1, 2, 3... is defined, just use it.
- // Otherwise, check it against pluralization rules in $locale service.
- count = $locale.pluralCat(count - offset);
- }
-
- // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.
- // In JS `NaN !== NaN`, so we have to exlicitly check.
- if ((count !== lastCount) && !(countIsNaN && isNumber(lastCount) && isNaN(lastCount))) {
- watchRemover();
- var whenExpFn = whensExpFns[count];
- if (isUndefined(whenExpFn)) {
- if (newVal != null) {
- $log.debug("ngPluralize: no rule defined for '" + count + "' in " + whenExp);
- }
- watchRemover = noop;
- updateElementText();
- } else {
- watchRemover = scope.$watch(whenExpFn, updateElementText);
- }
- lastCount = count;
- }
- });
-
- function updateElementText(newText) {
- element.text(newText || '');
- }
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngRepeat
- * @multiElement
- *
- * @description
- * The `ngRepeat` directive instantiates a template once per item from a collection. Each template
- * instance gets its own scope, where the given loop variable is set to the current collection item,
- * and `$index` is set to the item index or key.
- *
- * Special properties are exposed on the local scope of each template instance, including:
- *
- * | Variable | Type | Details |
- * |-----------|-----------------|-----------------------------------------------------------------------------|
- * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |
- * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |
- * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |
- * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |
- * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |
- * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |
- *
- * <div class="alert alert-info">
- * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.
- * This may be useful when, for instance, nesting ngRepeats.
- * </div>
- *
- *
- * # Iterating over object properties
- *
- * It is possible to get `ngRepeat` to iterate over the properties of an object using the following
- * syntax:
- *
- * ```js
- * <div ng-repeat="(key, value) in myObj"> ... </div>
- * ```
- *
- * You need to be aware that the JavaScript specification does not define the order of keys
- * returned for an object. (To mitigate this in Angular 1.3 the `ngRepeat` directive
- * used to sort the keys alphabetically.)
- *
- * Version 1.4 removed the alphabetic sorting. We now rely on the order returned by the browser
- * when running `for key in myObj`. It seems that browsers generally follow the strategy of providing
- * keys in the order in which they were defined, although there are exceptions when keys are deleted
- * and reinstated. See the [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).
- *
- * If this is not desired, the recommended workaround is to convert your object into an array
- * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
- * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)
- * or implement a `$watch` on the object yourself.
- *
- *
- * # Tracking and Duplicates
- *
- * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in
- * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:
- *
- * * When an item is added, a new instance of the template is added to the DOM.
- * * When an item is removed, its template instance is removed from the DOM.
- * * When items are reordered, their respective templates are reordered in the DOM.
- *
- * To minimize creation of DOM elements, `ngRepeat` uses a function
- * to "keep track" of all items in the collection and their corresponding DOM elements.
- * For example, if an item is added to the collection, ngRepeat will know that all other items
- * already have DOM elements, and will not re-render them.
- *
- * The default tracking function (which tracks items by their identity) does not allow
- * duplicate items in arrays. This is because when there are duplicates, it is not possible
- * to maintain a one-to-one mapping between collection items and DOM elements.
- *
- * If you do need to repeat duplicate items, you can substitute the default tracking behavior
- * with your own using the `track by` expression.
- *
- * For example, you may track items by the index of each item in the collection, using the
- * special scope property `$index`:
- * ```html
- * <div ng-repeat="n in [42, 42, 43, 43] track by $index">
- * {{n}}
- * </div>
- * ```
- *
- * You may also use arbitrary expressions in `track by`, including references to custom functions
- * on the scope:
- * ```html
- * <div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
- * {{n}}
- * </div>
- * ```
- *
- * <div class="alert alert-success">
- * If you are working with objects that have an identifier property, you should track
- * by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`
- * will not have to rebuild the DOM elements for items it has already rendered, even if the
- * JavaScript objects in the collection have been substituted for new ones. For large collections,
- * this signifincantly improves rendering performance. If you don't have a unique identifier,
- * `track by $index` can also provide a performance boost.
- * </div>
- * ```html
- * <div ng-repeat="model in collection track by model.id">
- * {{model.name}}
- * </div>
- * ```
- *
- * When no `track by` expression is provided, it is equivalent to tracking by the built-in
- * `$id` function, which tracks items by their identity:
- * ```html
- * <div ng-repeat="obj in collection track by $id(obj)">
- * {{obj.prop}}
- * </div>
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** `track by` must always be the last expression:
- * </div>
- * ```
- * <div ng-repeat="model in collection | orderBy: 'id' as filtered_result track by model.id">
- * {{model.name}}
- * </div>
- * ```
- *
- * # Special repeat start and end points
- * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
- * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
- * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)
- * up to and including the ending HTML tag where **ng-repeat-end** is placed.
- *
- * The example below makes use of this feature:
- * ```html
- * <header ng-repeat-start="item in items">
- * Header {{ item }}
- * </header>
- * <div class="body">
- * Body {{ item }}
- * </div>
- * <footer ng-repeat-end>
- * Footer {{ item }}
- * </footer>
- * ```
- *
- * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:
- * ```html
- * <header>
- * Header A
- * </header>
- * <div class="body">
- * Body A
- * </div>
- * <footer>
- * Footer A
- * </footer>
- * <header>
- * Header B
- * </header>
- * <div class="body">
- * Body B
- * </div>
- * <footer>
- * Footer B
- * </footer>
- * ```
- *
- * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
- * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
- *
- * @animations
- * **.enter** - when a new item is added to the list or when an item is revealed after a filter
- *
- * **.leave** - when an item is removed from the list or when an item is filtered out
- *
- * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered
- *
- * @element ANY
- * @scope
- * @priority 1000
- * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These
- * formats are currently supported:
- *
- * * `variable in expression` – where variable is the user defined loop variable and `expression`
- * is a scope expression giving the collection to enumerate.
- *
- * For example: `album in artist.albums`.
- *
- * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,
- * and `expression` is the scope expression giving the collection to enumerate.
- *
- * For example: `(name, age) in {'adam':10, 'amalie':12}`.
- *
- * * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression
- * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
- * is specified, ng-repeat associates elements by identity. It is an error to have
- * more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are
- * mapped to the same DOM element, which is not possible.)
- *
- * Note that the tracking expression must come last, after any filters, and the alias expression.
- *
- * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
- * will be associated by item identity in the array.
- *
- * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique
- * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements
- * with the corresponding item in the array by identity. Moving the same object in array would move the DOM
- * element in the same way in the DOM.
- *
- * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this
- * case the object identity does not matter. Two objects are considered equivalent as long as their `id`
- * property is same.
- *
- * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter
- * to items in conjunction with a tracking expression.
- *
- * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the
- * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message
- * when a filter is active on the repeater, but the filtered result set is empty.
- *
- * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after
- * the items have been processed through the filter.
- *
- * Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end
- * (and not as operator, inside an expression).
- *
- * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results` .
- *
- * @example
- * This example initializes the scope to a list of names and
- * then uses `ngRepeat` to display every person:
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-init="friends = [
- {name:'John', age:25, gender:'boy'},
- {name:'Jessie', age:30, gender:'girl'},
- {name:'Johanna', age:28, gender:'girl'},
- {name:'Joy', age:15, gender:'girl'},
- {name:'Mary', age:28, gender:'girl'},
- {name:'Peter', age:95, gender:'boy'},
- {name:'Sebastian', age:50, gender:'boy'},
- {name:'Erika', age:27, gender:'girl'},
- {name:'Patrick', age:40, gender:'boy'},
- {name:'Samantha', age:60, gender:'girl'}
- ]">
- I have {{friends.length}} friends. They are:
- <input type="search" ng-model="q" placeholder="filter friends..." aria-label="filter friends" />
- <ul class="example-animate-container">
- <li class="animate-repeat" ng-repeat="friend in friends | filter:q as results">
- [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
- </li>
- <li class="animate-repeat" ng-if="results.length == 0">
- <strong>No results found...</strong>
- </li>
- </ul>
- </div>
- </file>
- <file name="animations.css">
- .example-animate-container {
- background:white;
- border:1px solid black;
- list-style:none;
- margin:0;
- padding:0 10px;
- }
-
- .animate-repeat {
- line-height:40px;
- list-style:none;
- box-sizing:border-box;
- }
-
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter,
- .animate-repeat.ng-leave {
- transition:all linear 0.5s;
- }
-
- .animate-repeat.ng-leave.ng-leave-active,
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter {
- opacity:0;
- max-height:0;
- }
-
- .animate-repeat.ng-leave,
- .animate-repeat.ng-move.ng-move-active,
- .animate-repeat.ng-enter.ng-enter-active {
- opacity:1;
- max-height:40px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var friends = element.all(by.repeater('friend in friends'));
-
- it('should render initial data set', function() {
- expect(friends.count()).toBe(10);
- expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');
- expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');
- expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');
- expect(element(by.binding('friends.length')).getText())
- .toMatch("I have 10 friends. They are:");
- });
-
- it('should update repeater when filter predicate changes', function() {
- expect(friends.count()).toBe(10);
-
- element(by.model('q')).sendKeys('ma');
-
- expect(friends.count()).toBe(2);
- expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');
- expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');
- });
- </file>
- </example>
- */
-var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
- var NG_REMOVED = '$$NG_REMOVED';
- var ngRepeatMinErr = minErr('ngRepeat');
-
- var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {
- // TODO(perf): generate setters to shave off ~40ms or 1-1.5%
- scope[valueIdentifier] = value;
- if (keyIdentifier) scope[keyIdentifier] = key;
- scope.$index = index;
- scope.$first = (index === 0);
- scope.$last = (index === (arrayLength - 1));
- scope.$middle = !(scope.$first || scope.$last);
- // jshint bitwise: false
- scope.$odd = !(scope.$even = (index&1) === 0);
- // jshint bitwise: true
- };
-
- var getBlockStart = function(block) {
- return block.clone[0];
- };
-
- var getBlockEnd = function(block) {
- return block.clone[block.clone.length - 1];
- };
-
-
- return {
- restrict: 'A',
- multiElement: true,
- transclude: 'element',
- priority: 1000,
- terminal: true,
- $$tlb: true,
- compile: function ngRepeatCompile($element, $attr) {
- var expression = $attr.ngRepeat;
- var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');
-
- var match = expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
-
- if (!match) {
- throw ngRepeatMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",
- expression);
- }
-
- var lhs = match[1];
- var rhs = match[2];
- var aliasAs = match[3];
- var trackByExp = match[4];
-
- match = lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);
-
- if (!match) {
- throw ngRepeatMinErr('iidexp', "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
- lhs);
- }
- var valueIdentifier = match[3] || match[1];
- var keyIdentifier = match[2];
-
- if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||
- /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))) {
- throw ngRepeatMinErr('badident', "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",
- aliasAs);
- }
-
- var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;
- var hashFnLocals = {$id: hashKey};
-
- if (trackByExp) {
- trackByExpGetter = $parse(trackByExp);
- } else {
- trackByIdArrayFn = function(key, value) {
- return hashKey(value);
- };
- trackByIdObjFn = function(key) {
- return key;
- };
- }
-
- return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {
-
- if (trackByExpGetter) {
- trackByIdExpFn = function(key, value, index) {
- // assign key, value, and $index to the locals so that they can be used in hash functions
- if (keyIdentifier) hashFnLocals[keyIdentifier] = key;
- hashFnLocals[valueIdentifier] = value;
- hashFnLocals.$index = index;
- return trackByExpGetter($scope, hashFnLocals);
- };
- }
-
- // Store a list of elements from previous run. This is a hash where key is the item from the
- // iterator, and the value is objects with following properties.
- // - scope: bound scope
- // - element: previous element.
- // - index: position
- //
- // We are using no-proto object so that we don't need to guard against inherited props via
- // hasOwnProperty.
- var lastBlockMap = createMap();
-
- //watch props
- $scope.$watchCollection(rhs, function ngRepeatAction(collection) {
- var index, length,
- previousNode = $element[0], // node that cloned nodes should be inserted after
- // initialized to the comment node anchor
- nextNode,
- // Same as lastBlockMap but it has the current state. It will become the
- // lastBlockMap on the next iteration.
- nextBlockMap = createMap(),
- collectionLength,
- key, value, // key/value of iteration
- trackById,
- trackByIdFn,
- collectionKeys,
- block, // last object information {scope, element, id}
- nextBlockOrder,
- elementsToRemove;
-
- if (aliasAs) {
- $scope[aliasAs] = collection;
- }
-
- if (isArrayLike(collection)) {
- collectionKeys = collection;
- trackByIdFn = trackByIdExpFn || trackByIdArrayFn;
- } else {
- trackByIdFn = trackByIdExpFn || trackByIdObjFn;
- // if object, extract keys, in enumeration order, unsorted
- collectionKeys = [];
- for (var itemKey in collection) {
- if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {
- collectionKeys.push(itemKey);
- }
- }
- }
-
- collectionLength = collectionKeys.length;
- nextBlockOrder = new Array(collectionLength);
-
- // locate existing items
- for (index = 0; index < collectionLength; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- trackById = trackByIdFn(key, value, index);
- if (lastBlockMap[trackById]) {
- // found previously seen block
- block = lastBlockMap[trackById];
- delete lastBlockMap[trackById];
- nextBlockMap[trackById] = block;
- nextBlockOrder[index] = block;
- } else if (nextBlockMap[trackById]) {
- // if collision detected. restore lastBlockMap and throw an error
- forEach(nextBlockOrder, function(block) {
- if (block && block.scope) lastBlockMap[block.id] = block;
- });
- throw ngRepeatMinErr('dupes',
- "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
- expression, trackById, value);
- } else {
- // new never before seen block
- nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};
- nextBlockMap[trackById] = true;
- }
- }
-
- // remove leftover items
- for (var blockKey in lastBlockMap) {
- block = lastBlockMap[blockKey];
- elementsToRemove = getBlockNodes(block.clone);
- $animate.leave(elementsToRemove);
- if (elementsToRemove[0].parentNode) {
- // if the element was not removed yet because of pending animation, mark it as deleted
- // so that we can ignore it later
- for (index = 0, length = elementsToRemove.length; index < length; index++) {
- elementsToRemove[index][NG_REMOVED] = true;
- }
- }
- block.scope.$destroy();
- }
-
- // we are not using forEach for perf reasons (trying to avoid #call)
- for (index = 0; index < collectionLength; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- block = nextBlockOrder[index];
-
- if (block.scope) {
- // if we have already seen this object, then we need to reuse the
- // associated scope/element
-
- nextNode = previousNode;
-
- // skip nodes that are already pending removal via leave animation
- do {
- nextNode = nextNode.nextSibling;
- } while (nextNode && nextNode[NG_REMOVED]);
-
- if (getBlockStart(block) != nextNode) {
- // existing item which got moved
- $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));
- }
- previousNode = getBlockEnd(block);
- updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);
- } else {
- // new item which we don't know about
- $transclude(function ngRepeatTransclude(clone, scope) {
- block.scope = scope;
- // http://jsperf.com/clone-vs-createcomment
- var endNode = ngRepeatEndComment.cloneNode(false);
- clone[clone.length++] = endNode;
-
- // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?
- $animate.enter(clone, null, jqLite(previousNode));
- previousNode = endNode;
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block.clone = clone;
- nextBlockMap[block.id] = block;
- updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);
- });
- }
- }
- lastBlockMap = nextBlockMap;
- });
- };
- }
- };
-}];
-
-var NG_HIDE_CLASS = 'ng-hide';
-var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
-/**
- * @ngdoc directive
- * @name ngShow
- * @multiElement
- *
- * @description
- * The `ngShow` directive shows or hides the given HTML element based on the expression
- * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding
- * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is visible) -->
- * <div ng-show="myValue"></div>
- *
- * <!-- when $scope.myValue is falsy (element is hidden) -->
- * <div ng-show="myValue" class="ng-hide"></div>
- * ```
- *
- * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class
- * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope
- * with extra animation classes that can be added.
- *
- * ```css
- * .ng-hide:not(.ng-hide-animate) {
- * /&#42; this is just another form of hiding an element &#42;/
- * display: block!important;
- * position: absolute;
- * top: -9999px;
- * left: -9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngShow`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass except that
- * you must also include the !important flag to override the display property
- * so that you can perform an animation when the element is hidden during the time of the animation.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * /&#42; this is required as of 1.3x to properly
- * apply all styling in a show/hide animation &#42;/
- * transition: 0s linear all;
- * }
- *
- * .my-element.ng-hide-add-active,
- * .my-element.ng-hide-remove-active {
- * /&#42; the transition is defined in the active class &#42;/
- * transition: 1s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible
- * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden
- *
- * @element ANY
- * @param {expression} ngShow If the {@link guide/expression expression} is truthy
- * then the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" aria-label="Toggle ngHide"><br/>
- <div>
- Show:
- <div class="check-element animate-show" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-show" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);
- </file>
- <file name="animations.css">
- .animate-show {
- line-height: 20px;
- opacity: 1;
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
-
- .animate-show.ng-hide-add, .animate-show.ng-hide-remove {
- transition: all linear 0.5s;
- }
-
- .animate-show.ng-hide {
- line-height: 0;
- opacity: 0;
- padding: 0 10px;
- }
-
- .check-element {
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngShowDirective = ['$animate', function($animate) {
- return {
- restrict: 'A',
- multiElement: true,
- link: function(scope, element, attr) {
- scope.$watch(attr.ngShow, function ngShowWatchAction(value) {
- // we're adding a temporary, animation-specific class for ng-hide since this way
- // we can control when the element is actually displayed on screen without having
- // to have a global/greedy CSS selector that breaks when other animations are run.
- // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845
- $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {
- tempClasses: NG_HIDE_IN_PROGRESS_CLASS
- });
- });
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngHide
- * @multiElement
- *
- * @description
- * The `ngHide` directive shows or hides the given HTML element based on the expression
- * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding
- * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is hidden) -->
- * <div ng-hide="myValue" class="ng-hide"></div>
- *
- * <!-- when $scope.myValue is falsy (element is visible) -->
- * <div ng-hide="myValue"></div>
- * ```
- *
- * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class
- * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class in CSS:
- *
- * ```css
- * .ng-hide {
- * /&#42; this is just another form of hiding an element &#42;/
- * display: block!important;
- * position: absolute;
- * top: -9999px;
- * left: -9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngHide`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`
- * CSS class is added and removed for you instead of your own CSS class.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * transition: 0.5s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden
- * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible
- *
- * @element ANY
- * @param {expression} ngHide If the {@link guide/expression expression} is truthy then
- * the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" aria-label="Toggle ngShow"><br/>
- <div>
- Show:
- <div class="check-element animate-hide" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-hide" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);
- </file>
- <file name="animations.css">
- .animate-hide {
- transition: all linear 0.5s;
- line-height: 20px;
- opacity: 1;
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
-
- .animate-hide.ng-hide {
- line-height: 0;
- opacity: 0;
- padding: 0 10px;
- }
-
- .check-element {
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngHideDirective = ['$animate', function($animate) {
- return {
- restrict: 'A',
- multiElement: true,
- link: function(scope, element, attr) {
- scope.$watch(attr.ngHide, function ngHideWatchAction(value) {
- // The comment inside of the ngShowDirective explains why we add and
- // remove a temporary class for the show/hide animation
- $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {
- tempClasses: NG_HIDE_IN_PROGRESS_CLASS
- });
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngStyle
- * @restrict AC
- *
- * @description
- * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
- *
- * @element ANY
- * @param {expression} ngStyle
- *
- * {@link guide/expression Expression} which evals to an
- * object whose keys are CSS style names and values are corresponding values for those CSS
- * keys.
- *
- * Since some CSS style names are not valid keys for an object, they must be quoted.
- * See the 'background-color' style in the example below.
- *
- * @example
- <example>
- <file name="index.html">
- <input type="button" value="set color" ng-click="myStyle={color:'red'}">
- <input type="button" value="set background" ng-click="myStyle={'background-color':'blue'}">
- <input type="button" value="clear" ng-click="myStyle={}">
- <br/>
- <span ng-style="myStyle">Sample Text</span>
- <pre>myStyle={{myStyle}}</pre>
- </file>
- <file name="style.css">
- span {
- color: black;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var colorSpan = element(by.css('span'));
-
- it('should check ng-style', function() {
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- element(by.css('input[value=\'set color\']')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');
- element(by.css('input[value=clear]')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- });
- </file>
- </example>
- */
-var ngStyleDirective = ngDirective(function(scope, element, attr) {
- scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {
- if (oldStyles && (newStyles !== oldStyles)) {
- forEach(oldStyles, function(val, style) { element.css(style, '');});
- }
- if (newStyles) element.css(newStyles);
- }, true);
-});
-
-/**
- * @ngdoc directive
- * @name ngSwitch
- * @restrict EA
- *
- * @description
- * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.
- * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location
- * as specified in the template.
- *
- * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it
- * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element
- * matches the value obtained from the evaluated expression. In other words, you define a container element
- * (where you place the directive), place an expression on the **`on="..."` attribute**
- * (or the **`ng-switch="..."` attribute**), define any inner elements inside of the directive and place
- * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on
- * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default
- * attribute is displayed.
- *
- * <div class="alert alert-info">
- * Be aware that the attribute values to match against cannot be expressions. They are interpreted
- * as literal string values to match against.
- * For example, **`ng-switch-when="someVal"`** will match against the string `"someVal"` not against the
- * value of the expression `$scope.someVal`.
- * </div>
-
- * @animations
- * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container
- * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM
- *
- * @usage
- *
- * ```
- * <ANY ng-switch="expression">
- * <ANY ng-switch-when="matchValue1">...</ANY>
- * <ANY ng-switch-when="matchValue2">...</ANY>
- * <ANY ng-switch-default>...</ANY>
- * </ANY>
- * ```
- *
- *
- * @scope
- * @priority 1200
- * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.
- * On child elements add:
- *
- * * `ngSwitchWhen`: the case statement to match against. If match then this
- * case will be displayed. If the same match appears multiple times, all the
- * elements will be displayed.
- * * `ngSwitchDefault`: the default case when no other case match. If there
- * are multiple default cases, all of them will be displayed when no other
- * case match.
- *
- *
- * @example
- <example module="switchExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="selection" ng-options="item for item in items">
- </select>
- <code>selection={{selection}}</code>
- <hr/>
- <div class="animate-switch-container"
- ng-switch on="selection">
- <div class="animate-switch" ng-switch-when="settings">Settings Div</div>
- <div class="animate-switch" ng-switch-when="home">Home Span</div>
- <div class="animate-switch" ng-switch-default>default</div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('switchExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.items = ['settings', 'home', 'other'];
- $scope.selection = $scope.items[0];
- }]);
- </file>
- <file name="animations.css">
- .animate-switch-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .animate-switch {
- padding:10px;
- }
-
- .animate-switch.ng-animate {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- }
-
- .animate-switch.ng-leave.ng-leave-active,
- .animate-switch.ng-enter {
- top:-50px;
- }
- .animate-switch.ng-leave,
- .animate-switch.ng-enter.ng-enter-active {
- top:0;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var switchElem = element(by.css('[ng-switch]'));
- var select = element(by.model('selection'));
-
- it('should start in settings', function() {
- expect(switchElem.getText()).toMatch(/Settings Div/);
- });
- it('should change to home', function() {
- select.all(by.css('option')).get(1).click();
- expect(switchElem.getText()).toMatch(/Home Span/);
- });
- it('should select default', function() {
- select.all(by.css('option')).get(2).click();
- expect(switchElem.getText()).toMatch(/default/);
- });
- </file>
- </example>
- */
-var ngSwitchDirective = ['$animate', function($animate) {
- return {
- require: 'ngSwitch',
-
- // asks for $scope to fool the BC controller module
- controller: ['$scope', function ngSwitchController() {
- this.cases = {};
- }],
- link: function(scope, element, attr, ngSwitchController) {
- var watchExpr = attr.ngSwitch || attr.on,
- selectedTranscludes = [],
- selectedElements = [],
- previousLeaveAnimations = [],
- selectedScopes = [];
-
- var spliceFactory = function(array, index) {
- return function() { array.splice(index, 1); };
- };
-
- scope.$watch(watchExpr, function ngSwitchWatchAction(value) {
- var i, ii;
- for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {
- $animate.cancel(previousLeaveAnimations[i]);
- }
- previousLeaveAnimations.length = 0;
-
- for (i = 0, ii = selectedScopes.length; i < ii; ++i) {
- var selected = getBlockNodes(selectedElements[i].clone);
- selectedScopes[i].$destroy();
- var promise = previousLeaveAnimations[i] = $animate.leave(selected);
- promise.then(spliceFactory(previousLeaveAnimations, i));
- }
-
- selectedElements.length = 0;
- selectedScopes.length = 0;
-
- if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {
- forEach(selectedTranscludes, function(selectedTransclude) {
- selectedTransclude.transclude(function(caseElement, selectedScope) {
- selectedScopes.push(selectedScope);
- var anchor = selectedTransclude.element;
- caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');
- var block = { clone: caseElement };
-
- selectedElements.push(block);
- $animate.enter(caseElement, anchor.parent(), anchor);
- });
- });
- }
- });
- }
- };
-}];
-
-var ngSwitchWhenDirective = ngDirective({
- transclude: 'element',
- priority: 1200,
- require: '^ngSwitch',
- multiElement: true,
- link: function(scope, element, attrs, ctrl, $transclude) {
- ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);
- ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });
- }
-});
-
-var ngSwitchDefaultDirective = ngDirective({
- transclude: 'element',
- priority: 1200,
- require: '^ngSwitch',
- multiElement: true,
- link: function(scope, element, attr, ctrl, $transclude) {
- ctrl.cases['?'] = (ctrl.cases['?'] || []);
- ctrl.cases['?'].push({ transclude: $transclude, element: element });
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngTransclude
- * @restrict EAC
- *
- * @description
- * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.
- *
- * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.
- *
- * @element ANY
- *
- * @example
- <example module="transcludeExample">
- <file name="index.html">
- <script>
- angular.module('transcludeExample', [])
- .directive('pane', function(){
- return {
- restrict: 'E',
- transclude: true,
- scope: { title:'@' },
- template: '<div style="border: 1px solid black;">' +
- '<div style="background-color: gray">{{title}}</div>' +
- '<ng-transclude></ng-transclude>' +
- '</div>'
- };
- })
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.title = 'Lorem Ipsum';
- $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input ng-model="title" aria-label="title"> <br/>
- <textarea ng-model="text" aria-label="text"></textarea> <br/>
- <pane title="{{title}}">{{text}}</pane>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should have transcluded', function() {
- var titleElement = element(by.model('title'));
- titleElement.clear();
- titleElement.sendKeys('TITLE');
- var textElement = element(by.model('text'));
- textElement.clear();
- textElement.sendKeys('TEXT');
- expect(element(by.binding('title')).getText()).toEqual('TITLE');
- expect(element(by.binding('text')).getText()).toEqual('TEXT');
- });
- </file>
- </example>
- *
- */
-var ngTranscludeDirective = ngDirective({
- restrict: 'EAC',
- link: function($scope, $element, $attrs, controller, $transclude) {
- if (!$transclude) {
- throw minErr('ngTransclude')('orphan',
- 'Illegal use of ngTransclude directive in the template! ' +
- 'No parent directive that requires a transclusion found. ' +
- 'Element: {0}',
- startingTag($element));
- }
-
- $transclude(function(clone) {
- $element.empty();
- $element.append(clone);
- });
- }
-});
-
-/**
- * @ngdoc directive
- * @name script
- * @restrict E
- *
- * @description
- * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the
- * template can be used by {@link ng.directive:ngInclude `ngInclude`},
- * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the
- * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be
- * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.
- *
- * @param {string} type Must be set to `'text/ng-template'`.
- * @param {string} id Cache name of the template.
- *
- * @example
- <example>
- <file name="index.html">
- <script type="text/ng-template" id="/tpl.html">
- Content of the template.
- </script>
-
- <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
- <div id="tpl-content" ng-include src="currentTpl"></div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should load template defined inside script tag', function() {
- element(by.css('#tpl-link')).click();
- expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);
- });
- </file>
- </example>
- */
-var scriptDirective = ['$templateCache', function($templateCache) {
- return {
- restrict: 'E',
- terminal: true,
- compile: function(element, attr) {
- if (attr.type == 'text/ng-template') {
- var templateUrl = attr.id,
- text = element[0].text;
-
- $templateCache.put(templateUrl, text);
- }
- }
- };
-}];
-
-var noopNgModelController = { $setViewValue: noop, $render: noop };
-
-function chromeHack(optionElement) {
- // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459
- // Adding an <option selected="selected"> element to a <select required="required"> should
- // automatically select the new element
- if (optionElement[0].hasAttribute('selected')) {
- optionElement[0].selected = true;
- }
-}
-
-/**
- * @ngdoc type
- * @name select.SelectController
- * @description
- * The controller for the `<select>` directive. This provides support for reading
- * and writing the selected value(s) of the control and also coordinates dynamically
- * added `<option>` elements, perhaps by an `ngRepeat` directive.
- */
-var SelectController =
- ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
-
- var self = this,
- optionsMap = new HashMap();
-
- // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors
- self.ngModelCtrl = noopNgModelController;
-
- // The "unknown" option is one that is prepended to the list if the viewValue
- // does not match any of the options. When it is rendered the value of the unknown
- // option is '? XXX ?' where XXX is the hashKey of the value that is not known.
- //
- // We can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- self.unknownOption = jqLite(document.createElement('option'));
- self.renderUnknownOption = function(val) {
- var unknownVal = '? ' + hashKey(val) + ' ?';
- self.unknownOption.val(unknownVal);
- $element.prepend(self.unknownOption);
- $element.val(unknownVal);
- };
-
- $scope.$on('$destroy', function() {
- // disable unknown option so that we don't do work when the whole select is being destroyed
- self.renderUnknownOption = noop;
- });
-
- self.removeUnknownOption = function() {
- if (self.unknownOption.parent()) self.unknownOption.remove();
- };
-
-
- // Read the value of the select control, the implementation of this changes depending
- // upon whether the select can have multiple values and whether ngOptions is at work.
- self.readValue = function readSingleValue() {
- self.removeUnknownOption();
- return $element.val();
- };
-
-
- // Write the value to the select control, the implementation of this changes depending
- // upon whether the select can have multiple values and whether ngOptions is at work.
- self.writeValue = function writeSingleValue(value) {
- if (self.hasOption(value)) {
- self.removeUnknownOption();
- $element.val(value);
- if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy
- } else {
- if (value == null && self.emptyOption) {
- self.removeUnknownOption();
- $element.val('');
- } else {
- self.renderUnknownOption(value);
- }
- }
- };
-
-
- // Tell the select control that an option, with the given value, has been added
- self.addOption = function(value, element) {
- assertNotHasOwnProperty(value, '"option value"');
- if (value === '') {
- self.emptyOption = element;
- }
- var count = optionsMap.get(value) || 0;
- optionsMap.put(value, count + 1);
- self.ngModelCtrl.$render();
- chromeHack(element);
- };
-
- // Tell the select control that an option, with the given value, has been removed
- self.removeOption = function(value) {
- var count = optionsMap.get(value);
- if (count) {
- if (count === 1) {
- optionsMap.remove(value);
- if (value === '') {
- self.emptyOption = undefined;
- }
- } else {
- optionsMap.put(value, count - 1);
- }
- }
- };
-
- // Check whether the select control has an option matching the given value
- self.hasOption = function(value) {
- return !!optionsMap.get(value);
- };
-
-
- self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {
-
- if (interpolateValueFn) {
- // The value attribute is interpolated
- var oldVal;
- optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {
- if (isDefined(oldVal)) {
- self.removeOption(oldVal);
- }
- oldVal = newVal;
- self.addOption(newVal, optionElement);
- });
- } else if (interpolateTextFn) {
- // The text content is interpolated
- optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {
- optionAttrs.$set('value', newVal);
- if (oldVal !== newVal) {
- self.removeOption(oldVal);
- }
- self.addOption(newVal, optionElement);
- });
- } else {
- // The value attribute is static
- self.addOption(optionAttrs.value, optionElement);
- }
-
- optionElement.on('$destroy', function() {
- self.removeOption(optionAttrs.value);
- self.ngModelCtrl.$render();
- });
- };
-}];
-
-/**
- * @ngdoc directive
- * @name select
- * @restrict E
- *
- * @description
- * HTML `SELECT` element with angular data-binding.
- *
- * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding
- * between the scope and the `<select>` control (including setting default values).
- * ÃŒt also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or
- * {@link ngOptions `ngOptions`} directives.
- *
- * When an item in the `<select>` menu is selected, the value of the selected option will be bound
- * to the model identified by the `ngModel` directive. With static or repeated options, this is
- * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.
- * If you want dynamic value attributes, you can use interpolation inside the value attribute.
- *
- * <div class="alert alert-warning">
- * Note that the value of a `select` directive used without `ngOptions` is always a string.
- * When the model needs to be bound to a non-string value, you must either explictly convert it
- * using a directive (see example below) or use `ngOptions` to specify the set of options.
- * This is because an option element can only be bound to string values at present.
- * </div>
- *
- * If the viewValue of `ngModel` does not match any of the options, then the control
- * will automatically add an "unknown" option, which it then removes when the mismatch is resolved.
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * <div class="alert alert-info">
- * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions
- * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits, such as
- * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
- * comprehension expression, and additionally in reducing memory and increasing speed by not creating
- * a new scope for each repeated instance.
- * </div>
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} multiple Allows multiple options to be selected. The selected values will be
- * bound to the model as an array.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds required attribute and required validation constraint to
- * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required
- * when you want to data-bind to the required attribute.
- * @param {string=} ngChange Angular expression to be executed when selected option(s) changes due to user
- * interaction with the select element.
- * @param {string=} ngOptions sets the options that the select is populated with and defines what is
- * set on the model on selection. See {@link ngOptions `ngOptions`}.
- *
- * @example
- * ### Simple `select` elements with static options
- *
- * <example name="static-select" module="staticSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="singleSelect"> Single select: </label><br>
- * <select name="singleSelect" ng-model="data.singleSelect">
- * <option value="option-1">Option 1</option>
- * <option value="option-2">Option 2</option>
- * </select><br>
- *
- * <label for="singleSelect"> Single select with "not selected" option and dynamic option values: </label><br>
- * <select name="singleSelect" id="singleSelect" ng-model="data.singleSelect">
- * <option value="">---Please select---</option> <!-- not selected / blank option -->
- * <option value="{{data.option1}}">Option 1</option> <!-- interpolation -->
- * <option value="option-2">Option 2</option>
- * </select><br>
- * <button ng-click="forceUnknownOption()">Force unknown option</button><br>
- * <tt>singleSelect = {{data.singleSelect}}</tt>
- *
- * <hr>
- * <label for="multipleSelect"> Multiple select: </label><br>
- * <select name="multipleSelect" id="multipleSelect" ng-model="data.multipleSelect" multiple>
- * <option value="option-1">Option 1</option>
- * <option value="option-2">Option 2</option>
- * <option value="option-3">Option 3</option>
- * </select><br>
- * <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>
- * </form>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('staticSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * singleSelect: null,
- * multipleSelect: [],
- * option1: 'option-1',
- * };
- *
- * $scope.forceUnknownOption = function() {
- * $scope.data.singleSelect = 'nonsense';
- * };
- * }]);
- * </file>
- *</example>
- *
- * ### Using `ngRepeat` to generate `select` options
- * <example name="ngrepeat-select" module="ngrepeatSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="repeatSelect"> Repeat select: </label>
- * <select name="repeatSelect" id="repeatSelect" ng-model="data.repeatSelect">
- * <option ng-repeat="option in data.availableOptions" value="{{option.id}}">{{option.name}}</option>
- * </select>
- * </form>
- * <hr>
- * <tt>repeatSelect = {{data.repeatSelect}}</tt><br/>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('ngrepeatSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * repeatSelect: null,
- * availableOptions: [
- * {id: '1', name: 'Option A'},
- * {id: '2', name: 'Option B'},
- * {id: '3', name: 'Option C'}
- * ],
- * };
- * }]);
- * </file>
- *</example>
- *
- *
- * ### Using `select` with `ngOptions` and setting a default value
- * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.
- *
- * <example name="select-with-default-values" module="defaultValueSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="mySelect">Make a choice:</label>
- * <select name="mySelect" id="mySelect"
- * ng-options="option.name for option in data.availableOptions track by option.id"
- * ng-model="data.selectedOption"></select>
- * </form>
- * <hr>
- * <tt>option = {{data.selectedOption}}</tt><br/>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('defaultValueSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * availableOptions: [
- * {id: '1', name: 'Option A'},
- * {id: '2', name: 'Option B'},
- * {id: '3', name: 'Option C'}
- * ],
- * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui
- * };
- * }]);
- * </file>
- *</example>
- *
- *
- * ### Binding `select` to a non-string value via `ngModel` parsing / formatting
- *
- * <example name="select-with-non-string-options" module="nonStringSelect">
- * <file name="index.html">
- * <select ng-model="model.id" convert-to-number>
- * <option value="0">Zero</option>
- * <option value="1">One</option>
- * <option value="2">Two</option>
- * </select>
- * {{ model }}
- * </file>
- * <file name="app.js">
- * angular.module('nonStringSelect', [])
- * .run(function($rootScope) {
- * $rootScope.model = { id: 2 };
- * })
- * .directive('convertToNumber', function() {
- * return {
- * require: 'ngModel',
- * link: function(scope, element, attrs, ngModel) {
- * ngModel.$parsers.push(function(val) {
- * return parseInt(val, 10);
- * });
- * ngModel.$formatters.push(function(val) {
- * return '' + val;
- * });
- * }
- * };
- * });
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should initialize to model', function() {
- * var select = element(by.css('select'));
- * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');
- * });
- * </file>
- * </example>
- *
- */
-var selectDirective = function() {
-
- return {
- restrict: 'E',
- require: ['select', '?ngModel'],
- controller: SelectController,
- priority: 1,
- link: {
- pre: selectPreLink
- }
- };
-
- function selectPreLink(scope, element, attr, ctrls) {
-
- // if ngModel is not defined, we don't need to do anything
- var ngModelCtrl = ctrls[1];
- if (!ngModelCtrl) return;
-
- var selectCtrl = ctrls[0];
-
- selectCtrl.ngModelCtrl = ngModelCtrl;
-
- // We delegate rendering to the `writeValue` method, which can be changed
- // if the select can have multiple selected values or if the options are being
- // generated by `ngOptions`
- ngModelCtrl.$render = function() {
- selectCtrl.writeValue(ngModelCtrl.$viewValue);
- };
-
- // When the selected item(s) changes we delegate getting the value of the select control
- // to the `readValue` method, which can be changed if the select can have multiple
- // selected values or if the options are being generated by `ngOptions`
- element.on('change', function() {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(selectCtrl.readValue());
- });
- });
-
- // If the select allows multiple values then we need to modify how we read and write
- // values from and to the control; also what it means for the value to be empty and
- // we have to add an extra watch since ngModel doesn't work well with arrays - it
- // doesn't trigger rendering if only an item in the array changes.
- if (attr.multiple) {
-
- // Read value now needs to check each option to see if it is selected
- selectCtrl.readValue = function readMultipleValue() {
- var array = [];
- forEach(element.find('option'), function(option) {
- if (option.selected) {
- array.push(option.value);
- }
- });
- return array;
- };
-
- // Write value now needs to set the selected property of each matching option
- selectCtrl.writeValue = function writeMultipleValue(value) {
- var items = new HashMap(value);
- forEach(element.find('option'), function(option) {
- option.selected = isDefined(items.get(option.value));
- });
- };
-
- // we have to do it on each watch since ngModel watches reference, but
- // we need to work of an array, so we need to see if anything was inserted/removed
- var lastView, lastViewRef = NaN;
- scope.$watch(function selectMultipleWatch() {
- if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {
- lastView = shallowCopy(ngModelCtrl.$viewValue);
- ngModelCtrl.$render();
- }
- lastViewRef = ngModelCtrl.$viewValue;
- });
-
- // If we are a multiple select then value is now a collection
- // so the meaning of $isEmpty changes
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
-
- }
- }
-};
-
-
-// The option directive is purely designed to communicate the existence (or lack of)
-// of dynamically created (and destroyed) option elements to their containing select
-// directive via its controller.
-var optionDirective = ['$interpolate', function($interpolate) {
- return {
- restrict: 'E',
- priority: 100,
- compile: function(element, attr) {
-
- if (isDefined(attr.value)) {
- // If the value attribute is defined, check if it contains an interpolation
- var interpolateValueFn = $interpolate(attr.value, true);
- } else {
- // If the value attribute is not defined then we fall back to the
- // text content of the option element, which may be interpolated
- var interpolateTextFn = $interpolate(element.text(), true);
- if (!interpolateTextFn) {
- attr.$set('value', element.text());
- }
- }
-
- return function(scope, element, attr) {
-
- // This is an optimization over using ^^ since we don't want to have to search
- // all the way to the root of the DOM for every single option element
- var selectCtrlName = '$selectController',
- parent = element.parent(),
- selectCtrl = parent.data(selectCtrlName) ||
- parent.parent().data(selectCtrlName); // in case we are in optgroup
-
- if (selectCtrl) {
- selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);
- }
- };
- }
- };
-}];
-
-var styleDirective = valueFn({
- restrict: 'E',
- terminal: false
-});
-
-var requiredDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
- attr.required = true; // force truthy in case we are on non input element
-
- ctrl.$validators.required = function(modelValue, viewValue) {
- return !attr.required || !ctrl.$isEmpty(viewValue);
- };
-
- attr.$observe('required', function() {
- ctrl.$validate();
- });
- }
- };
-};
-
-
-var patternDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var regexp, patternExp = attr.ngPattern || attr.pattern;
- attr.$observe('pattern', function(regex) {
- if (isString(regex) && regex.length > 0) {
- regex = new RegExp('^' + regex + '$');
- }
-
- if (regex && !regex.test) {
- throw minErr('ngPattern')('noregexp',
- 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,
- regex, startingTag(elm));
- }
-
- regexp = regex || undefined;
- ctrl.$validate();
- });
-
- ctrl.$validators.pattern = function(modelValue, viewValue) {
- // HTML5 pattern constraint validates the input value, so we validate the viewValue
- return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);
- };
- }
- };
-};
-
-
-var maxlengthDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var maxlength = -1;
- attr.$observe('maxlength', function(value) {
- var intVal = toInt(value);
- maxlength = isNaN(intVal) ? -1 : intVal;
- ctrl.$validate();
- });
- ctrl.$validators.maxlength = function(modelValue, viewValue) {
- return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);
- };
- }
- };
-};
-
-var minlengthDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var minlength = 0;
- attr.$observe('minlength', function(value) {
- minlength = toInt(value) || 0;
- ctrl.$validate();
- });
- ctrl.$validators.minlength = function(modelValue, viewValue) {
- return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;
- };
- }
- };
-};
-
-if (window.angular.bootstrap) {
- //AngularJS is already loaded, so we can return here...
- console.log('WARNING: Tried to load angular more than once.');
- return;
-}
-
-//try to bind to jquery now so that one can write jqLite(document).ready()
-//but we will rebind on bootstrap again.
-bindJQuery();
-
-publishExternalAPI(angular);
-
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-us",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
-
-/**
- * Setup file for the Scenario.
- * Must be first in the compilation/bootstrap list.
- */
-
-// Public namespace
-angular.scenario = angular.scenario || {};
-
-/**
- * Expose jQuery (e.g. for custom dsl extensions).
- */
-angular.scenario.jQuery = _jQuery;
-
-/**
- * Defines a new output format.
- *
- * @param {string} name the name of the new output format
- * @param {function()} fn function(context, runner) that generates the output
- */
-angular.scenario.output = angular.scenario.output || function(name, fn) {
- angular.scenario.output[name] = fn;
-};
-
-/**
- * Defines a new DSL statement. If your factory function returns a Future
- * it's returned, otherwise the result is assumed to be a map of functions
- * for chaining. Chained functions are subject to the same rules.
- *
- * Note: All functions on the chain are bound to the chain scope so values
- * set on "this" in your statement function are available in the chained
- * functions.
- *
- * @param {string} name The name of the statement
- * @param {function()} fn Factory function(), return a function for
- * the statement.
- */
-angular.scenario.dsl = angular.scenario.dsl || function(name, fn) {
- angular.scenario.dsl[name] = function() {
- /* jshint -W040 *//* The dsl binds `this` for us when calling chained functions */
- function executeStatement(statement, args) {
- var result = statement.apply(this, args);
- if (angular.isFunction(result) || result instanceof angular.scenario.Future) {
- return result;
- }
- var self = this;
- var chain = angular.extend({}, result);
- angular.forEach(chain, function(value, name) {
- if (angular.isFunction(value)) {
- chain[name] = function() {
- return executeStatement.call(self, value, arguments);
- };
- } else {
- chain[name] = value;
- }
- });
- return chain;
- }
- var statement = fn.apply(this, arguments);
- return function() {
- return executeStatement.call(this, statement, arguments);
- };
- };
-};
-
-/**
- * Defines a new matcher for use with the expects() statement. The value
- * this.actual (like in Jasmine) is available in your matcher to compare
- * against. Your function should return a boolean. The future is automatically
- * created for you.
- *
- * @param {string} name The name of the matcher
- * @param {function()} fn The matching function(expected).
- */
-angular.scenario.matcher = angular.scenario.matcher || function(name, fn) {
- angular.scenario.matcher[name] = function(expected) {
- var description = this.future.name +
- (this.inverse ? ' not ' : ' ') + name +
- ' ' + angular.toJson(expected);
- var self = this;
- this.addFuture('expect ' + description,
- function(done) {
- var error;
- self.actual = self.future.value;
- if ((self.inverse && fn.call(self, expected)) ||
- (!self.inverse && !fn.call(self, expected))) {
- error = 'expected ' + description +
- ' but was ' + angular.toJson(self.actual);
- }
- done(error);
- });
- };
-};
-
-/**
- * Initialize the scenario runner and run !
- *
- * Access global window and document object
- * Access $runner through closure
- *
- * @param {Object=} config Config options
- */
-angular.scenario.setUpAndRun = function(config) {
- var href = window.location.href;
- var body = _jQuery(document.body);
- var output = [];
- var objModel = new angular.scenario.ObjectModel($runner);
-
- if (config && config.scenario_output) {
- output = config.scenario_output.split(',');
- }
-
- angular.forEach(angular.scenario.output, function(fn, name) {
- if (!output.length || output.indexOf(name) != -1) {
- var context = body.append('<div></div>').find('div:last');
- context.attr('id', name);
- fn.call({}, context, $runner, objModel);
- }
- });
-
- if (!/^http/.test(href) && !/^https/.test(href)) {
- body.append('<p id="system-error"></p>');
- body.find('#system-error').text(
- 'Scenario runner must be run using http or https. The protocol ' +
- href.split(':')[0] + ':// is not supported.'
- );
- return;
- }
-
- var appFrame = body.append('<div id="application"></div>').find('#application');
- var application = new angular.scenario.Application(appFrame);
-
- $runner.on('RunnerEnd', function() {
- appFrame.css('display', 'none');
- appFrame.find('iframe').attr('src', 'about:blank');
- });
-
- $runner.on('RunnerError', function(error) {
- if (window.console) {
- console.log(formatException(error));
- } else {
- // Do something for IE
- alert(error);
- }
- });
-
- $runner.run(application);
-};
-
-/**
- * Iterates through list with iterator function that must call the
- * continueFunction to continue iterating.
- *
- * @param {Array} list list to iterate over
- * @param {function()} iterator Callback function(value, continueFunction)
- * @param {function()} done Callback function(error, result) called when
- * iteration finishes or an error occurs.
- */
-function asyncForEach(list, iterator, done) {
- var i = 0;
- function loop(error, index) {
- if (index && index > i) {
- i = index;
- }
- if (error || i >= list.length) {
- done(error);
- } else {
- try {
- iterator(list[i++], loop);
- } catch (e) {
- done(e);
- }
- }
- }
- loop();
-}
-
-/**
- * Formats an exception into a string with the stack trace, but limits
- * to a specific line length.
- *
- * @param {Object} error The exception to format, can be anything throwable
- * @param {Number=} [maxStackLines=5] max lines of the stack trace to include
- * default is 5.
- */
-function formatException(error, maxStackLines) {
- maxStackLines = maxStackLines || 5;
- var message = error.toString();
- if (error.stack) {
- var stack = error.stack.split('\n');
- if (stack[0].indexOf(message) === -1) {
- maxStackLines++;
- stack.unshift(error.message);
- }
- message = stack.slice(0, maxStackLines).join('\n');
- }
- return message;
-}
-
-/**
- * Returns a function that gets the file name and line number from a
- * location in the stack if available based on the call site.
- *
- * Note: this returns another function because accessing .stack is very
- * expensive in Chrome.
- *
- * @param {Number} offset Number of stack lines to skip
- */
-function callerFile(offset) {
- var error = new Error();
-
- return function() {
- var line = (error.stack || '').split('\n')[offset];
-
- // Clean up the stack trace line
- if (line) {
- if (line.indexOf('@') !== -1) {
- // Firefox
- line = line.substring(line.indexOf('@') + 1);
- } else {
- // Chrome
- line = line.substring(line.indexOf('(') + 1).replace(')', '');
- }
- }
-
- return line || '';
- };
-}
-
-
-/**
- * Don't use the jQuery trigger method since it works incorrectly.
- *
- * jQuery notifies listeners and then changes the state of a checkbox and
- * does not create a real browser event. A real click changes the state of
- * the checkbox and then notifies listeners.
- *
- * To work around this we instead use our own handler that fires a real event.
- */
-(function(fn) {
- // We need a handle to the original trigger function for input tests.
- var parentTrigger = fn._originalTrigger = fn.trigger;
- fn.trigger = function(type) {
- if (/(click|change|keydown|blur|input|mousedown|mouseup)/.test(type)) {
- var processDefaults = [];
- this.each(function(index, node) {
- processDefaults.push(browserTrigger(node, type));
- });
-
- // this is not compatible with jQuery - we return an array of returned values,
- // so that scenario runner know whether JS code has preventDefault() of the event or not...
- return processDefaults;
- }
- return parentTrigger.apply(this, arguments);
- };
-})(_jQuery.fn);
-
-/**
- * Finds all bindings with the substring match of name and returns an
- * array of their values.
- *
- * @param {string} bindExp The name to match
- * @return {Array.<string>} String of binding values
- */
-_jQuery.fn.bindings = function(windowJquery, bindExp) {
- var result = [], match,
- bindSelector = '.ng-binding:visible';
- if (angular.isString(bindExp)) {
- bindExp = bindExp.replace(/\s/g, '');
- match = function(actualExp) {
- if (actualExp) {
- actualExp = actualExp.replace(/\s/g, '');
- if (actualExp == bindExp) return true;
- if (actualExp.indexOf(bindExp) === 0) {
- return actualExp.charAt(bindExp.length) == '|';
- }
- }
- };
- } else if (bindExp) {
- match = function(actualExp) {
- return actualExp && bindExp.exec(actualExp);
- };
- } else {
- match = function(actualExp) {
- return !!actualExp;
- };
- }
- var selection = this.find(bindSelector);
- if (this.is(bindSelector)) {
- selection = selection.add(this);
- }
-
- function push(value) {
- if (angular.isUndefined(value)) {
- value = '';
- } else if (typeof value !== 'string') {
- value = angular.toJson(value);
- }
- result.push('' + value);
- }
-
- selection.each(function() {
- var element = windowJquery(this),
- bindings;
- if (bindings = element.data('$binding')) {
- for (var expressions = [], binding, j=0, jj=bindings.length; j < jj; j++) {
- binding = bindings[j];
-
- if (binding.expressions) {
- expressions = binding.expressions;
- } else {
- expressions = [binding];
- }
- for (var scope, expression, i = 0, ii = expressions.length; i < ii; i++) {
- expression = expressions[i];
- if (match(expression)) {
- scope = scope || element.scope();
- push(scope.$eval(expression));
- }
- }
- }
- }
- });
- return result;
-};
-
-(function() {
- /**
- * Triggers a browser event. Attempts to choose the right event if one is
- * not specified.
- *
- * @param {Object} element Either a wrapped jQuery/jqLite node or a DOMElement
- * @param {string} eventType Optional event type
- * @param {Object=} eventData An optional object which contains additional event data (such as x,y
- * coordinates, keys, etc...) that are passed into the event when triggered
- */
- window.browserTrigger = function browserTrigger(element, eventType, eventData) {
- if (element && !element.nodeName) element = element[0];
- if (!element) return;
-
- eventData = eventData || {};
- var relatedTarget = eventData.relatedTarget || element;
- var keys = eventData.keys;
- var x = eventData.x;
- var y = eventData.y;
-
- var inputType = (element.type) ? element.type.toLowerCase() : null,
- nodeName = element.nodeName.toLowerCase();
- if (!eventType) {
- eventType = {
- 'text': 'change',
- 'textarea': 'change',
- 'hidden': 'change',
- 'password': 'change',
- 'button': 'click',
- 'submit': 'click',
- 'reset': 'click',
- 'image': 'click',
- 'checkbox': 'click',
- 'radio': 'click',
- 'select-one': 'change',
- 'select-multiple': 'change',
- '_default_': 'click'
- }[inputType || '_default_'];
- }
-
- if (nodeName == 'option') {
- element.parentNode.value = element.value;
- element = element.parentNode;
- eventType = 'change';
- }
-
- keys = keys || [];
- function pressed(key) {
- return keys.indexOf(key) !== -1;
- }
-
- var evnt;
- if (/transitionend/.test(eventType)) {
- if (window.WebKitTransitionEvent) {
- evnt = new WebKitTransitionEvent(eventType, eventData);
- evnt.initEvent(eventType, false, true);
- } else {
- try {
- evnt = new TransitionEvent(eventType, eventData);
- }
- catch (e) {
- evnt = document.createEvent('TransitionEvent');
- evnt.initTransitionEvent(eventType, null, null, null, eventData.elapsedTime || 0);
- }
- }
- } else if (/animationend/.test(eventType)) {
- if (window.WebKitAnimationEvent) {
- evnt = new WebKitAnimationEvent(eventType, eventData);
- evnt.initEvent(eventType, false, true);
- } else {
- try {
- evnt = new AnimationEvent(eventType, eventData);
- }
- catch (e) {
- evnt = document.createEvent('AnimationEvent');
- evnt.initAnimationEvent(eventType, null, null, null, eventData.elapsedTime || 0);
- }
- }
- } else if (/touch/.test(eventType) && supportsTouchEvents()) {
- evnt = createTouchEvent(element, eventType, x, y);
- } else {
- evnt = document.createEvent('MouseEvents');
- x = x || 0;
- y = y || 0;
- evnt.initMouseEvent(eventType, true, true, window, 0, x, y, x, y, pressed('ctrl'),
- pressed('alt'), pressed('shift'), pressed('meta'), 0, relatedTarget);
- }
-
- /* we're unable to change the timeStamp value directly so this
- * is only here to allow for testing where the timeStamp value is
- * read */
- evnt.$manualTimeStamp = eventData.timeStamp;
-
- if (!evnt) return;
-
- var originalPreventDefault = evnt.preventDefault,
- appWindow = element.ownerDocument.defaultView,
- fakeProcessDefault = true,
- finalProcessDefault,
- angular = appWindow.angular || {};
-
- // igor: temporary fix for https://bugzilla.mozilla.org/show_bug.cgi?id=684208
- angular['ff-684208-preventDefault'] = false;
- evnt.preventDefault = function() {
- fakeProcessDefault = false;
- return originalPreventDefault.apply(evnt, arguments);
- };
-
- element.dispatchEvent(evnt);
- finalProcessDefault = !(angular['ff-684208-preventDefault'] || !fakeProcessDefault);
-
- delete angular['ff-684208-preventDefault'];
-
- return finalProcessDefault;
- };
-
- function supportsTouchEvents() {
- if ('_cached' in supportsTouchEvents) {
- return supportsTouchEvents._cached;
- }
- if (!document.createTouch || !document.createTouchList) {
- supportsTouchEvents._cached = false;
- return false;
- }
- try {
- document.createEvent('TouchEvent');
- } catch (e) {
- supportsTouchEvents._cached = false;
- return false;
- }
- supportsTouchEvents._cached = true;
- return true;
- }
-
- function createTouchEvent(element, eventType, x, y) {
- var evnt = new Event(eventType);
- x = x || 0;
- y = y || 0;
-
- var touch = document.createTouch(window, element, Date.now(), x, y, x, y);
- var touches = document.createTouchList(touch);
-
- evnt.touches = touches;
-
- return evnt;
- }
-}());
-
-/**
- * Represents the application currently being tested and abstracts usage
- * of iframes or separate windows.
- *
- * @param {Object} context jQuery wrapper around HTML context.
- */
-angular.scenario.Application = function(context) {
- this.context = context;
- context.append(
- '<h2>Current URL: <a href="about:blank">None</a></h2>' +
- '<div id="test-frames"></div>'
- );
-};
-
-/**
- * Gets the jQuery collection of frames. Don't use this directly because
- * frames may go stale.
- *
- * @private
- * @return {Object} jQuery collection
- */
-angular.scenario.Application.prototype.getFrame_ = function() {
- return this.context.find('#test-frames iframe:last');
-};
-
-/**
- * Gets the window of the test runner frame. Always favor executeAction()
- * instead of this method since it prevents you from getting a stale window.
- *
- * @private
- * @return {Object} the window of the frame
- */
-angular.scenario.Application.prototype.getWindow_ = function() {
- var contentWindow = this.getFrame_().prop('contentWindow');
- if (!contentWindow) {
- throw 'Frame window is not accessible.';
- }
- return contentWindow;
-};
-
-/**
- * Changes the location of the frame.
- *
- * @param {string} url The URL. If it begins with a # then only the
- * hash of the page is changed.
- * @param {function()} loadFn function($window, $document) Called when frame loads.
- * @param {function()} errorFn function(error) Called if any error when loading.
- */
-angular.scenario.Application.prototype.navigateTo = function(url, loadFn, errorFn) {
- var self = this;
- var frame = self.getFrame_();
- //TODO(esprehn): Refactor to use rethrow()
- errorFn = errorFn || function(e) { throw e; };
- if (url === 'about:blank') {
- errorFn('Sandbox Error: Navigating to about:blank is not allowed.');
- } else if (url.charAt(0) === '#') {
- url = frame.attr('src').split('#')[0] + url;
- frame.attr('src', url);
- self.executeAction(loadFn);
- } else {
- frame.remove();
- self.context.find('#test-frames').append('<iframe>');
- frame = self.getFrame_();
-
- frame.load(function() {
- frame.off();
- try {
- var $window = self.getWindow_();
-
- if (!$window.angular) {
- self.executeAction(loadFn);
- return;
- }
-
- if (!$window.angular.resumeBootstrap) {
- $window.angular.resumeDeferredBootstrap = resumeDeferredBootstrap;
- } else {
- resumeDeferredBootstrap();
- }
-
- } catch (e) {
- errorFn(e);
- }
-
- function resumeDeferredBootstrap() {
- // Disable animations
- var $injector = $window.angular.resumeBootstrap([['$provide', function($provide) {
- return ['$animate', function($animate) {
- $animate.enabled(false);
- }];
- }]]);
- self.rootElement = $injector.get('$rootElement')[0];
- self.executeAction(loadFn);
- }
- }).attr('src', url);
-
- // for IE compatibility set the name *after* setting the frame url
- frame[0].contentWindow.name = "NG_DEFER_BOOTSTRAP!";
- }
- self.context.find('> h2 a').attr('href', url).text(url);
-};
-
-/**
- * Executes a function in the context of the tested application. Will wait
- * for all pending angular xhr requests before executing.
- *
- * @param {function()} action The callback to execute. function($window, $document)
- * $document is a jQuery wrapped document.
- */
-angular.scenario.Application.prototype.executeAction = function(action) {
- var self = this;
- var $window = this.getWindow_();
- if (!$window.document) {
- throw 'Sandbox Error: Application document not accessible.';
- }
- if (!$window.angular) {
- return action.call(this, $window, _jQuery($window.document));
- }
-
- if (!!this.rootElement) {
- executeWithElement(this.rootElement);
- } else {
- angularInit($window.document, angular.bind(this, executeWithElement));
- }
-
- function executeWithElement(element) {
- var $injector = $window.angular.element(element).injector();
- var $element = _jQuery(element);
-
- $element.injector = function() {
- return $injector;
- };
-
- $injector.invoke(function($browser) {
- $browser.notifyWhenNoOutstandingRequests(function() {
- action.call(self, $window, $element);
- });
- });
- }
-};
-
-/**
- * The representation of define blocks. Don't used directly, instead use
- * define() in your tests.
- *
- * @param {string} descName Name of the block
- * @param {Object} parent describe or undefined if the root.
- */
-angular.scenario.Describe = function(descName, parent) {
- this.only = parent && parent.only;
- this.beforeEachFns = [];
- this.afterEachFns = [];
- this.its = [];
- this.children = [];
- this.name = descName;
- this.parent = parent;
- this.id = angular.scenario.Describe.id++;
-
- /**
- * Calls all before functions.
- */
- var beforeEachFns = this.beforeEachFns;
- this.setupBefore = function() {
- if (parent) parent.setupBefore.call(this);
- angular.forEach(beforeEachFns, function(fn) { fn.call(this); }, this);
- };
-
- /**
- * Calls all after functions.
- */
- var afterEachFns = this.afterEachFns;
- this.setupAfter = function() {
- angular.forEach(afterEachFns, function(fn) { fn.call(this); }, this);
- if (parent) parent.setupAfter.call(this);
- };
-};
-
-// Shared Unique ID generator for every describe block
-angular.scenario.Describe.id = 0;
-
-// Shared Unique ID generator for every it (spec)
-angular.scenario.Describe.specId = 0;
-
-/**
- * Defines a block to execute before each it or nested describe.
- *
- * @param {function()} body Body of the block.
- */
-angular.scenario.Describe.prototype.beforeEach = function(body) {
- this.beforeEachFns.push(body);
-};
-
-/**
- * Defines a block to execute after each it or nested describe.
- *
- * @param {function()} body Body of the block.
- */
-angular.scenario.Describe.prototype.afterEach = function(body) {
- this.afterEachFns.push(body);
-};
-
-/**
- * Creates a new describe block that's a child of this one.
- *
- * @param {string} name Name of the block. Appended to the parent block's name.
- * @param {function()} body Body of the block.
- */
-angular.scenario.Describe.prototype.describe = function(name, body) {
- var child = new angular.scenario.Describe(name, this);
- this.children.push(child);
- body.call(child);
-};
-
-/**
- * Same as describe() but makes ddescribe blocks the only to run.
- *
- * @param {string} name Name of the test.
- * @param {function()} body Body of the block.
- */
-angular.scenario.Describe.prototype.ddescribe = function(name, body) {
- var child = new angular.scenario.Describe(name, this);
- child.only = true;
- this.children.push(child);
- body.call(child);
-};
-
-/**
- * Use to disable a describe block.
- */
-angular.scenario.Describe.prototype.xdescribe = angular.noop;
-
-/**
- * Defines a test.
- *
- * @param {string} name Name of the test.
- * @param {function()} body Body of the block.
- */
-angular.scenario.Describe.prototype.it = function(name, body) {
- this.its.push({
- id: angular.scenario.Describe.specId++,
- definition: this,
- only: this.only,
- name: name,
- before: this.setupBefore,
- body: body,
- after: this.setupAfter
- });
-};
-
-/**
- * Same as it() but makes iit tests the only test to run.
- *
- * @param {string} name Name of the test.
- * @param {function()} body Body of the block.
- */
-angular.scenario.Describe.prototype.iit = function(name, body) {
- this.it.apply(this, arguments);
- this.its[this.its.length - 1].only = true;
-};
-
-/**
- * Use to disable a test block.
- */
-angular.scenario.Describe.prototype.xit = angular.noop;
-
-/**
- * Gets an array of functions representing all the tests (recursively).
- * that can be executed with SpecRunner's.
- *
- * @return {Array<Object>} Array of it blocks {
- * definition : Object // parent Describe
- * only: boolean
- * name: string
- * before: Function
- * body: Function
- * after: Function
- * }
- */
-angular.scenario.Describe.prototype.getSpecs = function() {
- var specs = arguments[0] || [];
- angular.forEach(this.children, function(child) {
- child.getSpecs(specs);
- });
- angular.forEach(this.its, function(it) {
- specs.push(it);
- });
- var only = [];
- angular.forEach(specs, function(it) {
- if (it.only) {
- only.push(it);
- }
- });
- return (only.length && only) || specs;
-};
-
-/**
- * A future action in a spec.
- *
- * @param {string} name name of the future action
- * @param {function()} behavior future callback(error, result)
- * @param {function()} line Optional. function that returns the file/line number.
- */
-angular.scenario.Future = function(name, behavior, line) {
- this.name = name;
- this.behavior = behavior;
- this.fulfilled = false;
- this.value = undefined;
- this.parser = angular.identity;
- this.line = line || function() { return ''; };
-};
-
-/**
- * Executes the behavior of the closure.
- *
- * @param {function()} doneFn Callback function(error, result)
- */
-angular.scenario.Future.prototype.execute = function(doneFn) {
- var self = this;
- this.behavior(function(error, result) {
- self.fulfilled = true;
- if (result) {
- try {
- result = self.parser(result);
- } catch (e) {
- error = e;
- }
- }
- self.value = error || result;
- doneFn(error, result);
- });
-};
-
-/**
- * Configures the future to convert its final with a function fn(value)
- *
- * @param {function()} fn function(value) that returns the parsed value
- */
-angular.scenario.Future.prototype.parsedWith = function(fn) {
- this.parser = fn;
- return this;
-};
-
-/**
- * Configures the future to parse its final value from JSON
- * into objects.
- */
-angular.scenario.Future.prototype.fromJson = function() {
- return this.parsedWith(angular.fromJson);
-};
-
-/**
- * Configures the future to convert its final value from objects
- * into JSON.
- */
-angular.scenario.Future.prototype.toJson = function() {
- return this.parsedWith(angular.toJson);
-};
-
-/**
- * Maintains an object tree from the runner events.
- *
- * @param {Object} runner The scenario Runner instance to connect to.
- *
- * TODO(esprehn): Every output type creates one of these, but we probably
- * want one global shared instance. Need to handle events better too
- * so the HTML output doesn't need to do spec model.getSpec(spec.id)
- * silliness.
- *
- * TODO(vojta) refactor on, emit methods (from all objects) - use inheritance
- */
-angular.scenario.ObjectModel = function(runner) {
- var self = this;
-
- this.specMap = {};
- this.listeners = [];
- this.value = {
- name: '',
- children: {}
- };
-
- runner.on('SpecBegin', function(spec) {
- var block = self.value,
- definitions = [];
-
- angular.forEach(self.getDefinitionPath(spec), function(def) {
- if (!block.children[def.name]) {
- block.children[def.name] = {
- id: def.id,
- name: def.name,
- children: {},
- specs: {}
- };
- }
- block = block.children[def.name];
- definitions.push(def.name);
- });
-
- var it = self.specMap[spec.id] =
- block.specs[spec.name] =
- new angular.scenario.ObjectModel.Spec(spec.id, spec.name, definitions);
-
- // forward the event
- self.emit('SpecBegin', it);
- });
-
- runner.on('SpecError', function(spec, error) {
- var it = self.getSpec(spec.id);
- it.status = 'error';
- it.error = error;
-
- // forward the event
- self.emit('SpecError', it, error);
- });
-
- runner.on('SpecEnd', function(spec) {
- var it = self.getSpec(spec.id);
- complete(it);
-
- // forward the event
- self.emit('SpecEnd', it);
- });
-
- runner.on('StepBegin', function(spec, step) {
- var it = self.getSpec(spec.id);
- step = new angular.scenario.ObjectModel.Step(step.name);
- it.steps.push(step);
-
- // forward the event
- self.emit('StepBegin', it, step);
- });
-
- runner.on('StepEnd', function(spec) {
- var it = self.getSpec(spec.id);
- var step = it.getLastStep();
- if (step.name !== step.name) {
- throw 'Events fired in the wrong order. Step names don\'t match.';
- }
- complete(step);
-
- // forward the event
- self.emit('StepEnd', it, step);
- });
-
- runner.on('StepFailure', function(spec, step, error) {
- var it = self.getSpec(spec.id),
- modelStep = it.getLastStep();
-
- modelStep.setErrorStatus('failure', error, step.line());
- it.setStatusFromStep(modelStep);
-
- // forward the event
- self.emit('StepFailure', it, modelStep, error);
- });
-
- runner.on('StepError', function(spec, step, error) {
- var it = self.getSpec(spec.id),
- modelStep = it.getLastStep();
-
- modelStep.setErrorStatus('error', error, step.line());
- it.setStatusFromStep(modelStep);
-
- // forward the event
- self.emit('StepError', it, modelStep, error);
- });
-
- runner.on('RunnerBegin', function() {
- self.emit('RunnerBegin');
- });
- runner.on('RunnerEnd', function() {
- self.emit('RunnerEnd');
- });
-
- function complete(item) {
- item.endTime = Date.now();
- item.duration = item.endTime - item.startTime;
- item.status = item.status || 'success';
- }
-};
-
-/**
- * Adds a listener for an event.
- *
- * @param {string} eventName Name of the event to add a handler for
- * @param {function()} listener Function that will be called when event is fired
- */
-angular.scenario.ObjectModel.prototype.on = function(eventName, listener) {
- eventName = eventName.toLowerCase();
- this.listeners[eventName] = this.listeners[eventName] || [];
- this.listeners[eventName].push(listener);
-};
-
-/**
- * Emits an event which notifies listeners and passes extra
- * arguments.
- *
- * @param {string} eventName Name of the event to fire.
- */
-angular.scenario.ObjectModel.prototype.emit = function(eventName) {
- var self = this,
- args = Array.prototype.slice.call(arguments, 1);
-
- eventName = eventName.toLowerCase();
-
- if (this.listeners[eventName]) {
- angular.forEach(this.listeners[eventName], function(listener) {
- listener.apply(self, args);
- });
- }
-};
-
-/**
- * Computes the path of definition describe blocks that wrap around
- * this spec.
- *
- * @param spec Spec to compute the path for.
- * @return {Array<Describe>} The describe block path
- */
-angular.scenario.ObjectModel.prototype.getDefinitionPath = function(spec) {
- var path = [];
- var currentDefinition = spec.definition;
- while (currentDefinition && currentDefinition.name) {
- path.unshift(currentDefinition);
- currentDefinition = currentDefinition.parent;
- }
- return path;
-};
-
-/**
- * Gets a spec by id.
- *
- * @param {string} id The id of the spec to get the object for.
- * @return {Object} the Spec instance
- */
-angular.scenario.ObjectModel.prototype.getSpec = function(id) {
- return this.specMap[id];
-};
-
-/**
- * A single it block.
- *
- * @param {string} id Id of the spec
- * @param {string} name Name of the spec
- * @param {Array<string>=} definitionNames List of all describe block names that wrap this spec
- */
-angular.scenario.ObjectModel.Spec = function(id, name, definitionNames) {
- this.id = id;
- this.name = name;
- this.startTime = Date.now();
- this.steps = [];
- this.fullDefinitionName = (definitionNames || []).join(' ');
-};
-
-/**
- * Adds a new step to the Spec.
- *
- * @param {string} name Name of the step (really name of the future)
- * @return {Object} the added step
- */
-angular.scenario.ObjectModel.Spec.prototype.addStep = function(name) {
- var step = new angular.scenario.ObjectModel.Step(name);
- this.steps.push(step);
- return step;
-};
-
-/**
- * Gets the most recent step.
- *
- * @return {Object} the step
- */
-angular.scenario.ObjectModel.Spec.prototype.getLastStep = function() {
- return this.steps[this.steps.length - 1];
-};
-
-/**
- * Set status of the Spec from given Step
- *
- * @param {angular.scenario.ObjectModel.Step} step
- */
-angular.scenario.ObjectModel.Spec.prototype.setStatusFromStep = function(step) {
- if (!this.status || step.status == 'error') {
- this.status = step.status;
- this.error = step.error;
- this.line = step.line;
- }
-};
-
-/**
- * A single step inside a Spec.
- *
- * @param {string} name Name of the step
- */
-angular.scenario.ObjectModel.Step = function(name) {
- this.name = name;
- this.startTime = Date.now();
-};
-
-/**
- * Helper method for setting all error status related properties
- *
- * @param {string} status
- * @param {string} error
- * @param {string} line
- */
-angular.scenario.ObjectModel.Step.prototype.setErrorStatus = function(status, error, line) {
- this.status = status;
- this.error = error;
- this.line = line;
-};
-
-/**
- * Runner for scenarios
- *
- * Has to be initialized before any test is loaded,
- * because it publishes the API into window (global space).
- */
-angular.scenario.Runner = function($window) {
- this.listeners = [];
- this.$window = $window;
- this.rootDescribe = new angular.scenario.Describe();
- this.currentDescribe = this.rootDescribe;
- this.api = {
- it: this.it,
- iit: this.iit,
- xit: angular.noop,
- describe: this.describe,
- ddescribe: this.ddescribe,
- xdescribe: angular.noop,
- beforeEach: this.beforeEach,
- afterEach: this.afterEach
- };
- angular.forEach(this.api, angular.bind(this, function(fn, key) {
- this.$window[key] = angular.bind(this, fn);
- }));
-};
-
-/**
- * Emits an event which notifies listeners and passes extra
- * arguments.
- *
- * @param {string} eventName Name of the event to fire.
- */
-angular.scenario.Runner.prototype.emit = function(eventName) {
- var self = this;
- var args = Array.prototype.slice.call(arguments, 1);
- eventName = eventName.toLowerCase();
- if (!this.listeners[eventName]) {
- return;
- }
- angular.forEach(this.listeners[eventName], function(listener) {
- listener.apply(self, args);
- });
-};
-
-/**
- * Adds a listener for an event.
- *
- * @param {string} eventName The name of the event to add a handler for
- * @param {string} listener The fn(...) that takes the extra arguments from emit()
- */
-angular.scenario.Runner.prototype.on = function(eventName, listener) {
- eventName = eventName.toLowerCase();
- this.listeners[eventName] = this.listeners[eventName] || [];
- this.listeners[eventName].push(listener);
-};
-
-/**
- * Defines a describe block of a spec.
- *
- * @see Describe.js
- *
- * @param {string} name Name of the block
- * @param {function()} body Body of the block
- */
-angular.scenario.Runner.prototype.describe = function(name, body) {
- var self = this;
- this.currentDescribe.describe(name, function() {
- var parentDescribe = self.currentDescribe;
- self.currentDescribe = this;
- try {
- body.call(this);
- } finally {
- self.currentDescribe = parentDescribe;
- }
- });
-};
-
-/**
- * Same as describe, but makes ddescribe the only blocks to run.
- *
- * @see Describe.js
- *
- * @param {string} name Name of the block
- * @param {function()} body Body of the block
- */
-angular.scenario.Runner.prototype.ddescribe = function(name, body) {
- var self = this;
- this.currentDescribe.ddescribe(name, function() {
- var parentDescribe = self.currentDescribe;
- self.currentDescribe = this;
- try {
- body.call(this);
- } finally {
- self.currentDescribe = parentDescribe;
- }
- });
-};
-
-/**
- * Defines a test in a describe block of a spec.
- *
- * @see Describe.js
- *
- * @param {string} name Name of the block
- * @param {function()} body Body of the block
- */
-angular.scenario.Runner.prototype.it = function(name, body) {
- this.currentDescribe.it(name, body);
-};
-
-/**
- * Same as it, but makes iit tests the only tests to run.
- *
- * @see Describe.js
- *
- * @param {string} name Name of the block
- * @param {function()} body Body of the block
- */
-angular.scenario.Runner.prototype.iit = function(name, body) {
- this.currentDescribe.iit(name, body);
-};
-
-/**
- * Defines a function to be called before each it block in the describe
- * (and before all nested describes).
- *
- * @see Describe.js
- *
- * @param {function()} Callback to execute
- */
-angular.scenario.Runner.prototype.beforeEach = function(body) {
- this.currentDescribe.beforeEach(body);
-};
-
-/**
- * Defines a function to be called after each it block in the describe
- * (and before all nested describes).
- *
- * @see Describe.js
- *
- * @param {function()} Callback to execute
- */
-angular.scenario.Runner.prototype.afterEach = function(body) {
- this.currentDescribe.afterEach(body);
-};
-
-/**
- * Creates a new spec runner.
- *
- * @private
- * @param {Object} scope parent scope
- */
-angular.scenario.Runner.prototype.createSpecRunner_ = function(scope) {
- var child = scope.$new();
- var Cls = angular.scenario.SpecRunner;
-
- // Export all the methods to child scope manually as now we don't mess controllers with scopes
- // TODO(vojta): refactor scenario runner so that these objects are not tightly coupled as current
- for (var name in Cls.prototype) {
- child[name] = angular.bind(child, Cls.prototype[name]);
- }
-
- Cls.call(child);
- return child;
-};
-
-/**
- * Runs all the loaded tests with the specified runner class on the
- * provided application.
- *
- * @param {angular.scenario.Application} application App to remote control.
- */
-angular.scenario.Runner.prototype.run = function(application) {
- var self = this;
- var $root = angular.injector(['ng']).get('$rootScope');
- angular.extend($root, this);
- angular.forEach(angular.scenario.Runner.prototype, function(fn, name) {
- $root[name] = angular.bind(self, fn);
- });
- $root.application = application;
- $root.emit('RunnerBegin');
- asyncForEach(this.rootDescribe.getSpecs(), function(spec, specDone) {
- var dslCache = {};
- var runner = self.createSpecRunner_($root);
- angular.forEach(angular.scenario.dsl, function(fn, key) {
- dslCache[key] = fn.call($root);
- });
- angular.forEach(angular.scenario.dsl, function(fn, key) {
- self.$window[key] = function() {
- var line = callerFile(3);
- var scope = runner.$new();
-
- // Make the dsl accessible on the current chain
- scope.dsl = {};
- angular.forEach(dslCache, function(fn, key) {
- scope.dsl[key] = function() {
- return dslCache[key].apply(scope, arguments);
- };
- });
-
- // Make these methods work on the current chain
- scope.addFuture = function() {
- Array.prototype.push.call(arguments, line);
- return angular.scenario.SpecRunner.
- prototype.addFuture.apply(scope, arguments);
- };
- scope.addFutureAction = function() {
- Array.prototype.push.call(arguments, line);
- return angular.scenario.SpecRunner.
- prototype.addFutureAction.apply(scope, arguments);
- };
-
- return scope.dsl[key].apply(scope, arguments);
- };
- });
- runner.run(spec, function() {
- runner.$destroy();
- specDone.apply(this, arguments);
- });
- },
- function(error) {
- if (error) {
- self.emit('RunnerError', error);
- }
- self.emit('RunnerEnd');
- });
-};
-
-/**
- * This class is the "this" of the it/beforeEach/afterEach method.
- * Responsibilities:
- * - "this" for it/beforeEach/afterEach
- * - keep state for single it/beforeEach/afterEach execution
- * - keep track of all of the futures to execute
- * - run single spec (execute each future)
- */
-angular.scenario.SpecRunner = function() {
- this.futures = [];
- this.afterIndex = 0;
-};
-
-/**
- * Executes a spec which is an it block with associated before/after functions
- * based on the describe nesting.
- *
- * @param {Object} spec A spec object
- * @param {function()} specDone function that is called when the spec finishes,
- * of the form `Function(error, index)`
- */
-angular.scenario.SpecRunner.prototype.run = function(spec, specDone) {
- var self = this;
- this.spec = spec;
-
- this.emit('SpecBegin', spec);
-
- try {
- spec.before.call(this);
- spec.body.call(this);
- this.afterIndex = this.futures.length;
- spec.after.call(this);
- } catch (e) {
- this.emit('SpecError', spec, e);
- this.emit('SpecEnd', spec);
- specDone();
- return;
- }
-
- var handleError = function(error, done) {
- if (self.error) {
- return done();
- }
- self.error = true;
- done(null, self.afterIndex);
- };
-
- asyncForEach(
- this.futures,
- function(future, futureDone) {
- self.step = future;
- self.emit('StepBegin', spec, future);
- try {
- future.execute(function(error) {
- if (error) {
- self.emit('StepFailure', spec, future, error);
- self.emit('StepEnd', spec, future);
- return handleError(error, futureDone);
- }
- self.emit('StepEnd', spec, future);
- self.$window.setTimeout(function() { futureDone(); }, 0);
- });
- } catch (e) {
- self.emit('StepError', spec, future, e);
- self.emit('StepEnd', spec, future);
- handleError(e, futureDone);
- }
- },
- function(e) {
- if (e) {
- self.emit('SpecError', spec, e);
- }
- self.emit('SpecEnd', spec);
- // Call done in a timeout so exceptions don't recursively
- // call this function
- self.$window.setTimeout(function() { specDone(); }, 0);
- }
- );
-};
-
-/**
- * Adds a new future action.
- *
- * Note: Do not pass line manually. It happens automatically.
- *
- * @param {string} name Name of the future
- * @param {function()} behavior Behavior of the future
- * @param {function()} line fn() that returns file/line number
- */
-angular.scenario.SpecRunner.prototype.addFuture = function(name, behavior, line) {
- var future = new angular.scenario.Future(name, angular.bind(this, behavior), line);
- this.futures.push(future);
- return future;
-};
-
-/**
- * Adds a new future action to be executed on the application window.
- *
- * Note: Do not pass line manually. It happens automatically.
- *
- * @param {string} name Name of the future
- * @param {function()} behavior Behavior of the future
- * @param {function()} line fn() that returns file/line number
- */
-angular.scenario.SpecRunner.prototype.addFutureAction = function(name, behavior, line) {
- var self = this;
- var NG = /\[ng\\\:/;
- return this.addFuture(name, function(done) {
- this.application.executeAction(function($window, $document) {
-
- //TODO(esprehn): Refactor this so it doesn't need to be in here.
- $document.elements = function(selector) {
- var args = Array.prototype.slice.call(arguments, 1);
- selector = (self.selector || '') + ' ' + (selector || '');
- selector = _jQuery.trim(selector) || '*';
- angular.forEach(args, function(value, index) {
- selector = selector.replace('$' + (index + 1), value);
- });
- var result = $document.find(selector);
- if (selector.match(NG)) {
- angular.forEach(['[ng-','[data-ng-','[x-ng-'], function(value, index) {
- result = result.add(selector.replace(NG, value), $document);
- });
- }
- if (!result.length) {
- throw {
- type: 'selector',
- message: 'Selector ' + selector + ' did not match any elements.'
- };
- }
-
- return result;
- };
-
- try {
- behavior.call(self, $window, $document, done);
- } catch (e) {
- if (e.type && e.type === 'selector') {
- done(e.message);
- } else {
- throw e;
- }
- }
- });
- }, line);
-};
-
-/**
- * Shared DSL statements that are useful to all scenarios.
- */
-
- /**
- * Usage:
- * pause() pauses until you call resume() in the console
- */
-angular.scenario.dsl('pause', function() {
- return function() {
- return this.addFuture('pausing for you to resume', function(done) {
- this.emit('InteractivePause', this.spec, this.step);
- this.$window.resume = function() { done(); };
- });
- };
-});
-
-/**
- * Usage:
- * sleep(seconds) pauses the test for specified number of seconds
- */
-angular.scenario.dsl('sleep', function() {
- return function(time) {
- return this.addFuture('sleep for ' + time + ' seconds', function(done) {
- this.$window.setTimeout(function() { done(null, time * 1000); }, time * 1000);
- });
- };
-});
-
-/**
- * Usage:
- * browser().navigateTo(url) Loads the url into the frame
- * browser().navigateTo(url, fn) where fn(url) is called and returns the URL to navigate to
- * browser().reload() refresh the page (reload the same URL)
- * browser().window.href() window.location.href
- * browser().window.path() window.location.pathname
- * browser().window.search() window.location.search
- * browser().window.hash() window.location.hash without # prefix
- * browser().location().url() see ng.$location#url
- * browser().location().path() see ng.$location#path
- * browser().location().search() see ng.$location#search
- * browser().location().hash() see ng.$location#hash
- */
-angular.scenario.dsl('browser', function() {
- var chain = {};
-
- chain.navigateTo = function(url, delegate) {
- var application = this.application;
- return this.addFuture("browser navigate to '" + url + "'", function(done) {
- if (delegate) {
- url = delegate.call(this, url);
- }
- application.navigateTo(url, function() {
- done(null, url);
- }, done);
- });
- };
-
- chain.reload = function() {
- var application = this.application;
- return this.addFutureAction('browser reload', function($window, $document, done) {
- var href = $window.location.href;
- application.navigateTo(href, function() {
- done(null, href);
- }, done);
- });
- };
-
- chain.window = function() {
- var api = {};
-
- api.href = function() {
- return this.addFutureAction('window.location.href', function($window, $document, done) {
- done(null, $window.location.href);
- });
- };
-
- api.path = function() {
- return this.addFutureAction('window.location.path', function($window, $document, done) {
- done(null, $window.location.pathname);
- });
- };
-
- api.search = function() {
- return this.addFutureAction('window.location.search', function($window, $document, done) {
- done(null, $window.location.search);
- });
- };
-
- api.hash = function() {
- return this.addFutureAction('window.location.hash', function($window, $document, done) {
- done(null, $window.location.hash.replace('#', ''));
- });
- };
-
- return api;
- };
-
- chain.location = function() {
- var api = {};
-
- api.url = function() {
- return this.addFutureAction('$location.url()', function($window, $document, done) {
- done(null, $document.injector().get('$location').url());
- });
- };
-
- api.path = function() {
- return this.addFutureAction('$location.path()', function($window, $document, done) {
- done(null, $document.injector().get('$location').path());
- });
- };
-
- api.search = function() {
- return this.addFutureAction('$location.search()', function($window, $document, done) {
- done(null, $document.injector().get('$location').search());
- });
- };
-
- api.hash = function() {
- return this.addFutureAction('$location.hash()', function($window, $document, done) {
- done(null, $document.injector().get('$location').hash());
- });
- };
-
- return api;
- };
-
- return function() {
- return chain;
- };
-});
-
-/**
- * Usage:
- * expect(future).{matcher} where matcher is one of the matchers defined
- * with angular.scenario.matcher
- *
- * ex. expect(binding("name")).toEqual("Elliott")
- */
-angular.scenario.dsl('expect', function() {
- var chain = angular.extend({}, angular.scenario.matcher);
-
- chain.not = function() {
- this.inverse = true;
- return chain;
- };
-
- return function(future) {
- this.future = future;
- return chain;
- };
-});
-
-/**
- * Usage:
- * using(selector, label) scopes the next DSL element selection
- *
- * ex.
- * using('#foo', "'Foo' text field").input('bar')
- */
-angular.scenario.dsl('using', function() {
- return function(selector, label) {
- this.selector = _jQuery.trim((this.selector || '') + ' ' + selector);
- if (angular.isString(label) && label.length) {
- this.label = label + ' ( ' + this.selector + ' )';
- } else {
- this.label = this.selector;
- }
- return this.dsl;
- };
-});
-
-/**
- * Usage:
- * binding(name) returns the value of the first matching binding
- */
-angular.scenario.dsl('binding', function() {
- return function(name) {
- return this.addFutureAction("select binding '" + name + "'",
- function($window, $document, done) {
- var values = $document.elements().bindings($window.angular.element, name);
- if (!values.length) {
- return done("Binding selector '" + name + "' did not match.");
- }
- done(null, values[0]);
- });
- };
-});
-
-/**
- * Usage:
- * input(name).enter(value) enters value in input with specified name
- * input(name).check() checks checkbox
- * input(name).select(value) selects the radio button with specified name/value
- * input(name).val() returns the value of the input.
- */
-angular.scenario.dsl('input', function() {
- var chain = {};
- var supportInputEvent = 'oninput' in document.createElement('div') && !(msie && msie <= 11);
-
- chain.enter = function(value, event) {
- return this.addFutureAction("input '" + this.name + "' enter '" + value + "'",
- function($window, $document, done) {
- var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':input');
- input.val(value);
- input.trigger(event || (supportInputEvent ? 'input' : 'change'));
- done();
- });
- };
-
- chain.check = function() {
- return this.addFutureAction("checkbox '" + this.name + "' toggle",
- function($window, $document, done) {
- var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':checkbox');
- input.trigger('click');
- done();
- });
- };
-
- chain.select = function(value) {
- return this.addFutureAction("radio button '" + this.name + "' toggle '" + value + "'",
- function($window, $document, done) {
- var input = $document.
- elements('[ng\\:model="$1"][value="$2"]', this.name, value).filter(':radio');
- input.trigger('click');
- done();
- });
- };
-
- chain.val = function() {
- return this.addFutureAction("return input val", function($window, $document, done) {
- var input = $document.elements('[ng\\:model="$1"]', this.name).filter(':input');
- done(null,input.val());
- });
- };
-
- return function(name) {
- this.name = name;
- return chain;
- };
-});
-
-
-/**
- * Usage:
- * repeater('#products table', 'Product List').count() number of rows
- * repeater('#products table', 'Product List').row(1) all bindings in row as an array
- * repeater('#products table', 'Product List').column('product.name') all values across all rows
- * in an array
- */
-angular.scenario.dsl('repeater', function() {
- var chain = {};
-
- chain.count = function() {
- return this.addFutureAction("repeater '" + this.label + "' count",
- function($window, $document, done) {
- try {
- done(null, $document.elements().length);
- } catch (e) {
- done(null, 0);
- }
- });
- };
-
- chain.column = function(binding) {
- return this.addFutureAction("repeater '" + this.label + "' column '" + binding + "'",
- function($window, $document, done) {
- done(null, $document.elements().bindings($window.angular.element, binding));
- });
- };
-
- chain.row = function(index) {
- return this.addFutureAction("repeater '" + this.label + "' row '" + index + "'",
- function($window, $document, done) {
- var matches = $document.elements().slice(index, index + 1);
- if (!matches.length) {
- return done('row ' + index + ' out of bounds');
- }
- done(null, matches.bindings($window.angular.element));
- });
- };
-
- return function(selector, label) {
- this.dsl.using(selector, label);
- return chain;
- };
-});
-
-/**
- * Usage:
- * select(name).option('value') select one option
- * select(name).options('value1', 'value2', ...) select options from a multi select
- */
-angular.scenario.dsl('select', function() {
- var chain = {};
-
- chain.option = function(value) {
- return this.addFutureAction("select '" + this.name + "' option '" + value + "'",
- function($window, $document, done) {
- var select = $document.elements('select[ng\\:model="$1"]', this.name);
- var option = select.find('option[value="' + value + '"]');
- if (option.length) {
- select.val(value);
- } else {
- option = select.find('option').filter(function() {
- return _jQuery(this).text() === value;
- });
- if (!option.length) {
- option = select.find('option:contains("' + value + '")');
- }
- if (option.length) {
- select.val(option.val());
- } else {
- return done("option '" + value + "' not found");
- }
- }
- select.trigger('change');
- done();
- });
- };
-
- chain.options = function() {
- var values = arguments;
- return this.addFutureAction("select '" + this.name + "' options '" + values + "'",
- function($window, $document, done) {
- var select = $document.elements('select[multiple][ng\\:model="$1"]', this.name);
- select.val(values);
- select.trigger('change');
- done();
- });
- };
-
- return function(name) {
- this.name = name;
- return chain;
- };
-});
-
-/**
- * Usage:
- * element(selector, label).count() get the number of elements that match selector
- * element(selector, label).click() clicks an element
- * element(selector, label).mouseover() mouseover an element
- * element(selector, label).mousedown() mousedown an element
- * element(selector, label).mouseup() mouseup an element
- * element(selector, label).query(fn) executes fn(selectedElements, done)
- * element(selector, label).{method}() gets the value (as defined by jQuery, ex. val)
- * element(selector, label).{method}(value) sets the value (as defined by jQuery, ex. val)
- * element(selector, label).{method}(key) gets the value (as defined by jQuery, ex. attr)
- * element(selector, label).{method}(key, value) sets the value (as defined by jQuery, ex. attr)
- */
-angular.scenario.dsl('element', function() {
- var KEY_VALUE_METHODS = ['attr', 'css', 'prop'];
- var VALUE_METHODS = [
- 'val', 'text', 'html', 'height', 'innerHeight', 'outerHeight', 'width',
- 'innerWidth', 'outerWidth', 'position', 'scrollLeft', 'scrollTop', 'offset'
- ];
- var chain = {};
-
- chain.count = function() {
- return this.addFutureAction("element '" + this.label + "' count",
- function($window, $document, done) {
- try {
- done(null, $document.elements().length);
- } catch (e) {
- done(null, 0);
- }
- });
- };
-
- chain.click = function() {
- return this.addFutureAction("element '" + this.label + "' click",
- function($window, $document, done) {
- var elements = $document.elements();
- var href = elements.attr('href');
- var eventProcessDefault = elements.trigger('click')[0];
-
- if (href && elements[0].nodeName.toLowerCase() === 'a' && eventProcessDefault) {
- this.application.navigateTo(href, function() {
- done();
- }, done);
- } else {
- done();
- }
- });
- };
-
- chain.dblclick = function() {
- return this.addFutureAction("element '" + this.label + "' dblclick",
- function($window, $document, done) {
- var elements = $document.elements();
- var href = elements.attr('href');
- var eventProcessDefault = elements.trigger('dblclick')[0];
-
- if (href && elements[0].nodeName.toLowerCase() === 'a' && eventProcessDefault) {
- this.application.navigateTo(href, function() {
- done();
- }, done);
- } else {
- done();
- }
- });
- };
-
- chain.mouseover = function() {
- return this.addFutureAction("element '" + this.label + "' mouseover",
- function($window, $document, done) {
- var elements = $document.elements();
- elements.trigger('mouseover');
- done();
- });
- };
-
- chain.mousedown = function() {
- return this.addFutureAction("element '" + this.label + "' mousedown",
- function($window, $document, done) {
- var elements = $document.elements();
- elements.trigger('mousedown');
- done();
- });
- };
-
- chain.mouseup = function() {
- return this.addFutureAction("element '" + this.label + "' mouseup",
- function($window, $document, done) {
- var elements = $document.elements();
- elements.trigger('mouseup');
- done();
- });
- };
-
- chain.query = function(fn) {
- return this.addFutureAction('element ' + this.label + ' custom query',
- function($window, $document, done) {
- fn.call(this, $document.elements(), done);
- });
- };
-
- angular.forEach(KEY_VALUE_METHODS, function(methodName) {
- chain[methodName] = function(name, value) {
- var args = arguments,
- futureName = (args.length == 1)
- ? "element '" + this.label + "' get " + methodName + " '" + name + "'"
- : "element '" + this.label + "' set " + methodName + " '" + name + "' to " + "'" +
- value + "'";
-
- return this.addFutureAction(futureName, function($window, $document, done) {
- var element = $document.elements();
- done(null, element[methodName].apply(element, args));
- });
- };
- });
-
- angular.forEach(VALUE_METHODS, function(methodName) {
- chain[methodName] = function(value) {
- var args = arguments,
- futureName = (args.length === 0)
- ? "element '" + this.label + "' " + methodName
- : "element '" + this.label + "' set " + methodName + " to '" + value + "'";
-
- return this.addFutureAction(futureName, function($window, $document, done) {
- var element = $document.elements();
- done(null, element[methodName].apply(element, args));
- });
- };
- });
-
- return function(selector, label) {
- this.dsl.using(selector, label);
- return chain;
- };
-});
-
-/**
- * Matchers for implementing specs. Follows the Jasmine spec conventions.
- */
-
-angular.scenario.matcher('toEqual', function(expected) {
- return angular.equals(this.actual, expected);
-});
-
-angular.scenario.matcher('toBe', function(expected) {
- return this.actual === expected;
-});
-
-angular.scenario.matcher('toBeDefined', function() {
- return angular.isDefined(this.actual);
-});
-
-angular.scenario.matcher('toBeTruthy', function() {
- return this.actual;
-});
-
-angular.scenario.matcher('toBeFalsy', function() {
- return !this.actual;
-});
-
-angular.scenario.matcher('toMatch', function(expected) {
- return new RegExp(expected).test(this.actual);
-});
-
-angular.scenario.matcher('toBeNull', function() {
- return this.actual === null;
-});
-
-angular.scenario.matcher('toContain', function(expected) {
- return includes(this.actual, expected);
-});
-
-angular.scenario.matcher('toBeLessThan', function(expected) {
- return this.actual < expected;
-});
-
-angular.scenario.matcher('toBeGreaterThan', function(expected) {
- return this.actual > expected;
-});
-
-/**
- * User Interface for the Scenario Runner.
- *
- * TODO(esprehn): This should be refactored now that ObjectModel exists
- * to use angular bindings for the UI.
- */
-angular.scenario.output('html', function(context, runner, model) {
- var specUiMap = {},
- lastStepUiMap = {};
-
- context.append(
- '<div id="header">' +
- ' <h1><span class="angular">AngularJS</span>: Scenario Test Runner</h1>' +
- ' <ul id="status-legend" class="status-display">' +
- ' <li class="status-error">0 Errors</li>' +
- ' <li class="status-failure">0 Failures</li>' +
- ' <li class="status-success">0 Passed</li>' +
- ' </ul>' +
- '</div>' +
- '<div id="specs">' +
- ' <div class="test-children"></div>' +
- '</div>'
- );
-
- runner.on('InteractivePause', function(spec) {
- var ui = lastStepUiMap[spec.id];
- ui.find('.test-title').
- html('paused... <a href="javascript:resume()">resume</a> when ready.');
- });
-
- runner.on('SpecBegin', function(spec) {
- var ui = findContext(spec);
- ui.find('> .tests').append(
- '<li class="status-pending test-it"></li>'
- );
- ui = ui.find('> .tests li:last');
- ui.append(
- '<div class="test-info">' +
- ' <p class="test-title">' +
- ' <span class="timer-result"></span>' +
- ' <span class="test-name"></span>' +
- ' </p>' +
- '</div>' +
- '<div class="scrollpane">' +
- ' <ol class="test-actions"></ol>' +
- '</div>'
- );
- ui.find('> .test-info .test-name').text(spec.name);
- ui.find('> .test-info').click(function() {
- var scrollpane = ui.find('> .scrollpane');
- var actions = scrollpane.find('> .test-actions');
- var name = context.find('> .test-info .test-name');
- if (actions.find(':visible').length) {
- actions.hide();
- name.removeClass('open').addClass('closed');
- } else {
- actions.show();
- scrollpane.attr('scrollTop', scrollpane.attr('scrollHeight'));
- name.removeClass('closed').addClass('open');
- }
- });
-
- specUiMap[spec.id] = ui;
- });
-
- runner.on('SpecError', function(spec, error) {
- var ui = specUiMap[spec.id];
- ui.append('<pre></pre>');
- ui.find('> pre').text(formatException(error));
- });
-
- runner.on('SpecEnd', function(spec) {
- var ui = specUiMap[spec.id];
- spec = model.getSpec(spec.id);
- ui.removeClass('status-pending');
- ui.addClass('status-' + spec.status);
- ui.find("> .test-info .timer-result").text(spec.duration + "ms");
- if (spec.status === 'success') {
- ui.find('> .test-info .test-name').addClass('closed');
- ui.find('> .scrollpane .test-actions').hide();
- }
- updateTotals(spec.status);
- });
-
- runner.on('StepBegin', function(spec, step) {
- var ui = specUiMap[spec.id];
- spec = model.getSpec(spec.id);
- step = spec.getLastStep();
- ui.find('> .scrollpane .test-actions').append('<li class="status-pending"></li>');
- var stepUi = lastStepUiMap[spec.id] = ui.find('> .scrollpane .test-actions li:last');
- stepUi.append(
- '<div class="timer-result"></div>' +
- '<div class="test-title"></div>'
- );
- stepUi.find('> .test-title').text(step.name);
- var scrollpane = stepUi.parents('.scrollpane');
- scrollpane.attr('scrollTop', scrollpane.attr('scrollHeight'));
- });
-
- runner.on('StepFailure', function(spec, step, error) {
- var ui = lastStepUiMap[spec.id];
- addError(ui, step.line, error);
- });
-
- runner.on('StepError', function(spec, step, error) {
- var ui = lastStepUiMap[spec.id];
- addError(ui, step.line, error);
- });
-
- runner.on('StepEnd', function(spec, step) {
- var stepUi = lastStepUiMap[spec.id];
- spec = model.getSpec(spec.id);
- step = spec.getLastStep();
- stepUi.find('.timer-result').text(step.duration + 'ms');
- stepUi.removeClass('status-pending');
- stepUi.addClass('status-' + step.status);
- var scrollpane = specUiMap[spec.id].find('> .scrollpane');
- scrollpane.attr('scrollTop', scrollpane.attr('scrollHeight'));
- });
-
- /**
- * Finds the context of a spec block defined by the passed definition.
- *
- * @param {Object} The definition created by the Describe object.
- */
- function findContext(spec) {
- var currentContext = context.find('#specs');
- angular.forEach(model.getDefinitionPath(spec), function(defn) {
- var id = 'describe-' + defn.id;
- if (!context.find('#' + id).length) {
- currentContext.find('> .test-children').append(
- '<div class="test-describe" id="' + id + '">' +
- ' <h2></h2>' +
- ' <div class="test-children"></div>' +
- ' <ul class="tests"></ul>' +
- '</div>'
- );
- context.find('#' + id).find('> h2').text('describe: ' + defn.name);
- }
- currentContext = context.find('#' + id);
- });
- return context.find('#describe-' + spec.definition.id);
- }
-
- /**
- * Updates the test counter for the status.
- *
- * @param {string} the status.
- */
- function updateTotals(status) {
- var legend = context.find('#status-legend .status-' + status);
- var parts = legend.text().split(' ');
- var value = (parts[0] * 1) + 1;
- legend.text(value + ' ' + parts[1]);
- }
-
- /**
- * Add an error to a step.
- *
- * @param {Object} The JQuery wrapped context
- * @param {function()} fn() that should return the file/line number of the error
- * @param {Object} the error.
- */
- function addError(context, line, error) {
- context.find('.test-title').append('<pre></pre>');
- var message = _jQuery.trim(line() + '\n\n' + formatException(error));
- context.find('.test-title pre:last').text(message);
- }
-});
-
-/**
- * Generates JSON output into a context.
- */
-angular.scenario.output('json', function(context, runner, model) {
- model.on('RunnerEnd', function() {
- context.text(angular.toJson(model.value));
- });
-});
-
-/**
- * Generates XML output into a context.
- */
-angular.scenario.output('xml', function(context, runner, model) {
- var $ = function(args) {return new context.init(args);};
- model.on('RunnerEnd', function() {
- var scenario = $('<scenario></scenario>');
- context.append(scenario);
- serializeXml(scenario, model.value);
- });
-
- /**
- * Convert the tree into XML.
- *
- * @param {Object} context jQuery context to add the XML to.
- * @param {Object} tree node to serialize
- */
- function serializeXml(context, tree) {
- angular.forEach(tree.children, function(child) {
- var describeContext = $('<describe></describe>');
- describeContext.attr('id', child.id);
- describeContext.attr('name', child.name);
- context.append(describeContext);
- serializeXml(describeContext, child);
- });
- var its = $('<its></its>');
- context.append(its);
- angular.forEach(tree.specs, function(spec) {
- var it = $('<it></it>');
- it.attr('id', spec.id);
- it.attr('name', spec.name);
- it.attr('duration', spec.duration);
- it.attr('status', spec.status);
- its.append(it);
- angular.forEach(spec.steps, function(step) {
- var stepContext = $('<step></step>');
- stepContext.attr('name', step.name);
- stepContext.attr('duration', step.duration);
- stepContext.attr('status', step.status);
- it.append(stepContext);
- if (step.error) {
- var error = $('<error></error>');
- stepContext.append(error);
- error.text(formatException(step.error));
- }
- });
- });
- }
-});
-
-/**
- * Creates a global value $result with the result of the runner.
- */
-angular.scenario.output('object', function(context, runner, model) {
- runner.$window.$result = model.value;
-});
-
-bindJQuery();
-publishExternalAPI(angular);
-
-var $runner = new angular.scenario.Runner(window),
- scripts = document.getElementsByTagName('script'),
- script = scripts[scripts.length - 1],
- config = {};
-
-angular.forEach(script.attributes, function(attr) {
- var match = attr.name.match(/ng[:\-](.*)/);
- if (match) {
- config[match[1]] = attr.value || true;
- }
-});
-
-if (config.autotest) {
- JQLite(document).ready(function() {
- angular.scenario.setUpAndRun(config);
- });
-}
-})(window, document);
-
-
-!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";\n\n[ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],\n.ng-cloak, .x-ng-cloak,\n.ng-hide:not(.ng-hide-animate) {\n display: none !important;\n}\n\nng\\:form {\n display: block;\n}\n\n.ng-animate-shim {\n visibility:hidden;\n}\n\n.ng-anchor {\n position:absolute;\n}\n</style>');
-!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";\n/* CSS Document */\n\n/** Structure */\nbody {\n font-family: Arial, sans-serif;\n margin: 0;\n font-size: 14px;\n}\n\n#system-error {\n font-size: 1.5em;\n text-align: center;\n}\n\n#json, #xml {\n display: none;\n}\n\n#header {\n position: fixed;\n width: 100%;\n}\n\n#specs {\n padding-top: 50px;\n}\n\n#header .angular {\n font-family: Courier New, monospace;\n font-weight: bold;\n}\n\n#header h1 {\n font-weight: normal;\n float: left;\n font-size: 30px;\n line-height: 30px;\n margin: 0;\n padding: 10px 10px;\n height: 30px;\n}\n\n#application h2,\n#specs h2 {\n margin: 0;\n padding: 0.5em;\n font-size: 1.1em;\n}\n\n#status-legend {\n margin-top: 10px;\n margin-right: 10px;\n}\n\n#header,\n#application,\n.test-info,\n.test-actions li {\n overflow: hidden;\n}\n\n#application {\n margin: 10px;\n}\n\n#application iframe {\n width: 100%;\n height: 758px;\n}\n\n#application .popout {\n float: right;\n}\n\n#application iframe {\n border: none;\n}\n\n.tests li,\n.test-actions li,\n.test-it li,\n.test-it ol,\n.status-display {\n list-style-type: none;\n}\n\n.tests,\n.test-it ol,\n.status-display {\n margin: 0;\n padding: 0;\n}\n\n.test-info {\n margin-left: 1em;\n margin-top: 0.5em;\n border-radius: 8px 0 0 8px;\n -webkit-border-radius: 8px 0 0 8px;\n -moz-border-radius: 8px 0 0 8px;\n cursor: pointer;\n}\n\n.test-info:hover .test-name {\n text-decoration: underline;\n}\n\n.test-info .closed:before {\n content: \'\\25b8\\00A0\';\n}\n\n.test-info .open:before {\n content: \'\\25be\\00A0\';\n font-weight: bold;\n}\n\n.test-it ol {\n margin-left: 2.5em;\n}\n\n.status-display,\n.status-display li {\n float: right;\n}\n\n.status-display li {\n padding: 5px 10px;\n}\n\n.timer-result,\n.test-title {\n display: inline-block;\n margin: 0;\n padding: 4px;\n}\n\n.test-actions .test-title,\n.test-actions .test-result {\n display: table-cell;\n padding-left: 0.5em;\n padding-right: 0.5em;\n}\n\n.test-actions {\n display: table;\n}\n\n.test-actions li {\n display: table-row;\n}\n\n.timer-result {\n width: 4em;\n padding: 0 10px;\n text-align: right;\n font-family: monospace;\n}\n\n.test-it pre,\n.test-actions pre {\n clear: left;\n color: black;\n margin-left: 6em;\n}\n\n.test-describe {\n padding-bottom: 0.5em;\n}\n\n.test-describe .test-describe {\n margin: 5px 5px 10px 2em;\n}\n\n.test-actions .status-pending .test-title:before {\n content: \'\\00bb\\00A0\';\n}\n\n.scrollpane {\n max-height: 20em;\n overflow: auto;\n}\n\n/** Colors */\n\n#header {\n background-color: #F2C200;\n}\n\n#specs h2 {\n border-top: 2px solid #BABAD1;\n}\n\n#specs h2,\n#application h2 {\n background-color: #efefef;\n}\n\n#application {\n border: 1px solid #BABAD1;\n}\n\n.test-describe .test-describe {\n border-left: 1px solid #BABAD1;\n border-right: 1px solid #BABAD1;\n border-bottom: 1px solid #BABAD1;\n}\n\n.status-display {\n border: 1px solid #777;\n}\n\n.status-display .status-pending,\n.status-pending .test-info {\n background-color: #F9EEBC;\n}\n\n.status-display .status-success,\n.status-success .test-info {\n background-color: #B1D7A1;\n}\n\n.status-display .status-failure,\n.status-failure .test-info {\n background-color: #FF8286;\n}\n\n.status-display .status-error,\n.status-error .test-info {\n background-color: black;\n color: white;\n}\n\n.test-actions .status-success .test-title {\n color: #30B30A;\n}\n\n.test-actions .status-failure .test-title {\n color: #DF0000;\n}\n\n.test-actions .status-error .test-title {\n color: black;\n}\n\n.test-actions .timer-result {\n color: #888;\n}\n</style>'); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.js
deleted file mode 100644
index f622e943..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.js
+++ /dev/null
@@ -1,628 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, angular, undefined) {'use strict';
-
-/**
- * @ngdoc module
- * @name ngTouch
- * @description
- *
- * # ngTouch
- *
- * The `ngTouch` module provides touch events and other helpers for touch-enabled devices.
- * The implementation is based on jQuery Mobile touch event handling
- * ([jquerymobile.com](http://jquerymobile.com/)).
- *
- *
- * See {@link ngTouch.$swipe `$swipe`} for usage.
- *
- * <div doc-module-components="ngTouch"></div>
- *
- */
-
-// define ngTouch module
-/* global -ngTouch */
-var ngTouch = angular.module('ngTouch', []);
-
-function nodeName_(element) {
- return angular.lowercase(element.nodeName || (element[0] && element[0].nodeName));
-}
-
-/* global ngTouch: false */
-
- /**
- * @ngdoc service
- * @name $swipe
- *
- * @description
- * The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe
- * behavior, to make implementing swipe-related directives more convenient.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * `$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by
- * `ngCarousel` in a separate component.
- *
- * # Usage
- * The `$swipe` service is an object with a single method: `bind`. `bind` takes an element
- * which is to be watched for swipes, and an object with four handler functions. See the
- * documentation for `bind` below.
- */
-
-ngTouch.factory('$swipe', [function() {
- // The total distance in any direction before we make the call on swipe vs. scroll.
- var MOVE_BUFFER_RADIUS = 10;
-
- var POINTER_EVENTS = {
- 'mouse': {
- start: 'mousedown',
- move: 'mousemove',
- end: 'mouseup'
- },
- 'touch': {
- start: 'touchstart',
- move: 'touchmove',
- end: 'touchend',
- cancel: 'touchcancel'
- }
- };
-
- function getCoordinates(event) {
- var originalEvent = event.originalEvent || event;
- var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];
- var e = (originalEvent.changedTouches && originalEvent.changedTouches[0]) || touches[0];
-
- return {
- x: e.clientX,
- y: e.clientY
- };
- }
-
- function getEvents(pointerTypes, eventType) {
- var res = [];
- angular.forEach(pointerTypes, function(pointerType) {
- var eventName = POINTER_EVENTS[pointerType][eventType];
- if (eventName) {
- res.push(eventName);
- }
- });
- return res.join(' ');
- }
-
- return {
- /**
- * @ngdoc method
- * @name $swipe#bind
- *
- * @description
- * The main method of `$swipe`. It takes an element to be watched for swipe motions, and an
- * object containing event handlers.
- * The pointer types that should be used can be specified via the optional
- * third argument, which is an array of strings `'mouse'` and `'touch'`. By default,
- * `$swipe` will listen for `mouse` and `touch` events.
- *
- * The four events are `start`, `move`, `end`, and `cancel`. `start`, `move`, and `end`
- * receive as a parameter a coordinates object of the form `{ x: 150, y: 310 }` and the raw
- * `event`. `cancel` receives the raw `event` as its single parameter.
- *
- * `start` is called on either `mousedown` or `touchstart`. After this event, `$swipe` is
- * watching for `touchmove` or `mousemove` events. These events are ignored until the total
- * distance moved in either dimension exceeds a small threshold.
- *
- * Once this threshold is exceeded, either the horizontal or vertical delta is greater.
- * - If the horizontal distance is greater, this is a swipe and `move` and `end` events follow.
- * - If the vertical distance is greater, this is a scroll, and we let the browser take over.
- * A `cancel` event is sent.
- *
- * `move` is called on `mousemove` and `touchmove` after the above logic has determined that
- * a swipe is in progress.
- *
- * `end` is called when a swipe is successfully completed with a `touchend` or `mouseup`.
- *
- * `cancel` is called either on a `touchcancel` from the browser, or when we begin scrolling
- * as described above.
- *
- */
- bind: function(element, eventHandlers, pointerTypes) {
- // Absolute total movement, used to control swipe vs. scroll.
- var totalX, totalY;
- // Coordinates of the start position.
- var startCoords;
- // Last event's position.
- var lastPos;
- // Whether a swipe is active.
- var active = false;
-
- pointerTypes = pointerTypes || ['mouse', 'touch'];
- element.on(getEvents(pointerTypes, 'start'), function(event) {
- startCoords = getCoordinates(event);
- active = true;
- totalX = 0;
- totalY = 0;
- lastPos = startCoords;
- eventHandlers['start'] && eventHandlers['start'](startCoords, event);
- });
- var events = getEvents(pointerTypes, 'cancel');
- if (events) {
- element.on(events, function(event) {
- active = false;
- eventHandlers['cancel'] && eventHandlers['cancel'](event);
- });
- }
-
- element.on(getEvents(pointerTypes, 'move'), function(event) {
- if (!active) return;
-
- // Android will send a touchcancel if it thinks we're starting to scroll.
- // So when the total distance (+ or - or both) exceeds 10px in either direction,
- // we either:
- // - On totalX > totalY, we send preventDefault() and treat this as a swipe.
- // - On totalY > totalX, we let the browser handle it as a scroll.
-
- if (!startCoords) return;
- var coords = getCoordinates(event);
-
- totalX += Math.abs(coords.x - lastPos.x);
- totalY += Math.abs(coords.y - lastPos.y);
-
- lastPos = coords;
-
- if (totalX < MOVE_BUFFER_RADIUS && totalY < MOVE_BUFFER_RADIUS) {
- return;
- }
-
- // One of totalX or totalY has exceeded the buffer, so decide on swipe vs. scroll.
- if (totalY > totalX) {
- // Allow native scrolling to take over.
- active = false;
- eventHandlers['cancel'] && eventHandlers['cancel'](event);
- return;
- } else {
- // Prevent the browser from scrolling.
- event.preventDefault();
- eventHandlers['move'] && eventHandlers['move'](coords, event);
- }
- });
-
- element.on(getEvents(pointerTypes, 'end'), function(event) {
- if (!active) return;
- active = false;
- eventHandlers['end'] && eventHandlers['end'](getCoordinates(event), event);
- });
- }
- };
-}]);
-
-/* global ngTouch: false,
- nodeName_: false
-*/
-
-/**
- * @ngdoc directive
- * @name ngClick
- *
- * @description
- * A more powerful replacement for the default ngClick designed to be used on touchscreen
- * devices. Most mobile browsers wait about 300ms after a tap-and-release before sending
- * the click event. This version handles them immediately, and then prevents the
- * following click event from propagating.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * This directive can fall back to using an ordinary click event, and so works on desktop
- * browsers as well as mobile.
- *
- * This directive also sets the CSS class `ng-click-active` while the element is being held
- * down (by a mouse click or touch) so you can restyle the depressed element if you wish.
- *
- * @element ANY
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate
- * upon tap. (Event object is available as `$event`)
- *
- * @example
- <example module="ngClickExample" deps="angular-touch.js">
- <file name="index.html">
- <button ng-click="count = count + 1" ng-init="count=0">
- Increment
- </button>
- count: {{ count }}
- </file>
- <file name="script.js">
- angular.module('ngClickExample', ['ngTouch']);
- </file>
- </example>
- */
-
-ngTouch.config(['$provide', function($provide) {
- $provide.decorator('ngClickDirective', ['$delegate', function($delegate) {
- // drop the default ngClick directive
- $delegate.shift();
- return $delegate;
- }]);
-}]);
-
-ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
- function($parse, $timeout, $rootElement) {
- var TAP_DURATION = 750; // Shorter than 750ms is a tap, longer is a taphold or drag.
- var MOVE_TOLERANCE = 12; // 12px seems to work in most mobile browsers.
- var PREVENT_DURATION = 2500; // 2.5 seconds maximum from preventGhostClick call to click
- var CLICKBUSTER_THRESHOLD = 25; // 25 pixels in any dimension is the limit for busting clicks.
-
- var ACTIVE_CLASS_NAME = 'ng-click-active';
- var lastPreventedTime;
- var touchCoordinates;
- var lastLabelClickCoordinates;
-
-
- // TAP EVENTS AND GHOST CLICKS
- //
- // Why tap events?
- // Mobile browsers detect a tap, then wait a moment (usually ~300ms) to see if you're
- // double-tapping, and then fire a click event.
- //
- // This delay sucks and makes mobile apps feel unresponsive.
- // So we detect touchstart, touchcancel and touchend ourselves and determine when
- // the user has tapped on something.
- //
- // What happens when the browser then generates a click event?
- // The browser, of course, also detects the tap and fires a click after a delay. This results in
- // tapping/clicking twice. We do "clickbusting" to prevent it.
- //
- // How does it work?
- // We attach global touchstart and click handlers, that run during the capture (early) phase.
- // So the sequence for a tap is:
- // - global touchstart: Sets an "allowable region" at the point touched.
- // - element's touchstart: Starts a touch
- // (- touchcancel ends the touch, no click follows)
- // - element's touchend: Determines if the tap is valid (didn't move too far away, didn't hold
- // too long) and fires the user's tap handler. The touchend also calls preventGhostClick().
- // - preventGhostClick() removes the allowable region the global touchstart created.
- // - The browser generates a click event.
- // - The global click handler catches the click, and checks whether it was in an allowable region.
- // - If preventGhostClick was called, the region will have been removed, the click is busted.
- // - If the region is still there, the click proceeds normally. Therefore clicks on links and
- // other elements without ngTap on them work normally.
- //
- // This is an ugly, terrible hack!
- // Yeah, tell me about it. The alternatives are using the slow click events, or making our users
- // deal with the ghost clicks, so I consider this the least of evils. Fortunately Angular
- // encapsulates this ugly logic away from the user.
- //
- // Why not just put click handlers on the element?
- // We do that too, just to be sure. If the tap event caused the DOM to change,
- // it is possible another element is now in that position. To take account for these possibly
- // distinct elements, the handlers are global and care only about coordinates.
-
- // Checks if the coordinates are close enough to be within the region.
- function hit(x1, y1, x2, y2) {
- return Math.abs(x1 - x2) < CLICKBUSTER_THRESHOLD && Math.abs(y1 - y2) < CLICKBUSTER_THRESHOLD;
- }
-
- // Checks a list of allowable regions against a click location.
- // Returns true if the click should be allowed.
- // Splices out the allowable region from the list after it has been used.
- function checkAllowableRegions(touchCoordinates, x, y) {
- for (var i = 0; i < touchCoordinates.length; i += 2) {
- if (hit(touchCoordinates[i], touchCoordinates[i + 1], x, y)) {
- touchCoordinates.splice(i, i + 2);
- return true; // allowable region
- }
- }
- return false; // No allowable region; bust it.
- }
-
- // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick
- // was called recently.
- function onClick(event) {
- if (Date.now() - lastPreventedTime > PREVENT_DURATION) {
- return; // Too old.
- }
-
- var touches = event.touches && event.touches.length ? event.touches : [event];
- var x = touches[0].clientX;
- var y = touches[0].clientY;
- // Work around desktop Webkit quirk where clicking a label will fire two clicks (on the label
- // and on the input element). Depending on the exact browser, this second click we don't want
- // to bust has either (0,0), negative coordinates, or coordinates equal to triggering label
- // click event
- if (x < 1 && y < 1) {
- return; // offscreen
- }
- if (lastLabelClickCoordinates &&
- lastLabelClickCoordinates[0] === x && lastLabelClickCoordinates[1] === y) {
- return; // input click triggered by label click
- }
- // reset label click coordinates on first subsequent click
- if (lastLabelClickCoordinates) {
- lastLabelClickCoordinates = null;
- }
- // remember label click coordinates to prevent click busting of trigger click event on input
- if (nodeName_(event.target) === 'label') {
- lastLabelClickCoordinates = [x, y];
- }
-
- // Look for an allowable region containing this click.
- // If we find one, that means it was created by touchstart and not removed by
- // preventGhostClick, so we don't bust it.
- if (checkAllowableRegions(touchCoordinates, x, y)) {
- return;
- }
-
- // If we didn't find an allowable region, bust the click.
- event.stopPropagation();
- event.preventDefault();
-
- // Blur focused form elements
- event.target && event.target.blur && event.target.blur();
- }
-
-
- // Global touchstart handler that creates an allowable region for a click event.
- // This allowable region can be removed by preventGhostClick if we want to bust it.
- function onTouchStart(event) {
- var touches = event.touches && event.touches.length ? event.touches : [event];
- var x = touches[0].clientX;
- var y = touches[0].clientY;
- touchCoordinates.push(x, y);
-
- $timeout(function() {
- // Remove the allowable region.
- for (var i = 0; i < touchCoordinates.length; i += 2) {
- if (touchCoordinates[i] == x && touchCoordinates[i + 1] == y) {
- touchCoordinates.splice(i, i + 2);
- return;
- }
- }
- }, PREVENT_DURATION, false);
- }
-
- // On the first call, attaches some event handlers. Then whenever it gets called, it creates a
- // zone around the touchstart where clicks will get busted.
- function preventGhostClick(x, y) {
- if (!touchCoordinates) {
- $rootElement[0].addEventListener('click', onClick, true);
- $rootElement[0].addEventListener('touchstart', onTouchStart, true);
- touchCoordinates = [];
- }
-
- lastPreventedTime = Date.now();
-
- checkAllowableRegions(touchCoordinates, x, y);
- }
-
- // Actual linking function.
- return function(scope, element, attr) {
- var clickHandler = $parse(attr.ngClick),
- tapping = false,
- tapElement, // Used to blur the element after a tap.
- startTime, // Used to check if the tap was held too long.
- touchStartX,
- touchStartY;
-
- function resetState() {
- tapping = false;
- element.removeClass(ACTIVE_CLASS_NAME);
- }
-
- element.on('touchstart', function(event) {
- tapping = true;
- tapElement = event.target ? event.target : event.srcElement; // IE uses srcElement.
- // Hack for Safari, which can target text nodes instead of containers.
- if (tapElement.nodeType == 3) {
- tapElement = tapElement.parentNode;
- }
-
- element.addClass(ACTIVE_CLASS_NAME);
-
- startTime = Date.now();
-
- // Use jQuery originalEvent
- var originalEvent = event.originalEvent || event;
- var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];
- var e = touches[0];
- touchStartX = e.clientX;
- touchStartY = e.clientY;
- });
-
- element.on('touchcancel', function(event) {
- resetState();
- });
-
- element.on('touchend', function(event) {
- var diff = Date.now() - startTime;
-
- // Use jQuery originalEvent
- var originalEvent = event.originalEvent || event;
- var touches = (originalEvent.changedTouches && originalEvent.changedTouches.length) ?
- originalEvent.changedTouches :
- ((originalEvent.touches && originalEvent.touches.length) ? originalEvent.touches : [originalEvent]);
- var e = touches[0];
- var x = e.clientX;
- var y = e.clientY;
- var dist = Math.sqrt(Math.pow(x - touchStartX, 2) + Math.pow(y - touchStartY, 2));
-
- if (tapping && diff < TAP_DURATION && dist < MOVE_TOLERANCE) {
- // Call preventGhostClick so the clickbuster will catch the corresponding click.
- preventGhostClick(x, y);
-
- // Blur the focused element (the button, probably) before firing the callback.
- // This doesn't work perfectly on Android Chrome, but seems to work elsewhere.
- // I couldn't get anything to work reliably on Android Chrome.
- if (tapElement) {
- tapElement.blur();
- }
-
- if (!angular.isDefined(attr.disabled) || attr.disabled === false) {
- element.triggerHandler('click', [event]);
- }
- }
-
- resetState();
- });
-
- // Hack for iOS Safari's benefit. It goes searching for onclick handlers and is liable to click
- // something else nearby.
- element.onclick = function(event) { };
-
- // Actual click handler.
- // There are three different kinds of clicks, only two of which reach this point.
- // - On desktop browsers without touch events, their clicks will always come here.
- // - On mobile browsers, the simulated "fast" click will call this.
- // - But the browser's follow-up slow click will be "busted" before it reaches this handler.
- // Therefore it's safe to use this directive on both mobile and desktop.
- element.on('click', function(event, touchend) {
- scope.$apply(function() {
- clickHandler(scope, {$event: (touchend || event)});
- });
- });
-
- element.on('mousedown', function(event) {
- element.addClass(ACTIVE_CLASS_NAME);
- });
-
- element.on('mousemove mouseup', function(event) {
- element.removeClass(ACTIVE_CLASS_NAME);
- });
-
- };
-}]);
-
-/* global ngTouch: false */
-
-/**
- * @ngdoc directive
- * @name ngSwipeLeft
- *
- * @description
- * Specify custom behavior when an element is swiped to the left on a touchscreen device.
- * A leftward swipe is a quick, right-to-left slide of the finger.
- * Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag
- * too.
- *
- * To disable the mouse click and drag functionality, add `ng-swipe-disable-mouse` to
- * the `ng-swipe-left` or `ng-swipe-right` DOM Element.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * @element ANY
- * @param {expression} ngSwipeLeft {@link guide/expression Expression} to evaluate
- * upon left swipe. (Event object is available as `$event`)
- *
- * @example
- <example module="ngSwipeLeftExample" deps="angular-touch.js">
- <file name="index.html">
- <div ng-show="!showActions" ng-swipe-left="showActions = true">
- Some list content, like an email in the inbox
- </div>
- <div ng-show="showActions" ng-swipe-right="showActions = false">
- <button ng-click="reply()">Reply</button>
- <button ng-click="delete()">Delete</button>
- </div>
- </file>
- <file name="script.js">
- angular.module('ngSwipeLeftExample', ['ngTouch']);
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngSwipeRight
- *
- * @description
- * Specify custom behavior when an element is swiped to the right on a touchscreen device.
- * A rightward swipe is a quick, left-to-right slide of the finger.
- * Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag
- * too.
- *
- * Requires the {@link ngTouch `ngTouch`} module to be installed.
- *
- * @element ANY
- * @param {expression} ngSwipeRight {@link guide/expression Expression} to evaluate
- * upon right swipe. (Event object is available as `$event`)
- *
- * @example
- <example module="ngSwipeRightExample" deps="angular-touch.js">
- <file name="index.html">
- <div ng-show="!showActions" ng-swipe-left="showActions = true">
- Some list content, like an email in the inbox
- </div>
- <div ng-show="showActions" ng-swipe-right="showActions = false">
- <button ng-click="reply()">Reply</button>
- <button ng-click="delete()">Delete</button>
- </div>
- </file>
- <file name="script.js">
- angular.module('ngSwipeRightExample', ['ngTouch']);
- </file>
- </example>
- */
-
-function makeSwipeDirective(directiveName, direction, eventName) {
- ngTouch.directive(directiveName, ['$parse', '$swipe', function($parse, $swipe) {
- // The maximum vertical delta for a swipe should be less than 75px.
- var MAX_VERTICAL_DISTANCE = 75;
- // Vertical distance should not be more than a fraction of the horizontal distance.
- var MAX_VERTICAL_RATIO = 0.3;
- // At least a 30px lateral motion is necessary for a swipe.
- var MIN_HORIZONTAL_DISTANCE = 30;
-
- return function(scope, element, attr) {
- var swipeHandler = $parse(attr[directiveName]);
-
- var startCoords, valid;
-
- function validSwipe(coords) {
- // Check that it's within the coordinates.
- // Absolute vertical distance must be within tolerances.
- // Horizontal distance, we take the current X - the starting X.
- // This is negative for leftward swipes and positive for rightward swipes.
- // After multiplying by the direction (-1 for left, +1 for right), legal swipes
- // (ie. same direction as the directive wants) will have a positive delta and
- // illegal ones a negative delta.
- // Therefore this delta must be positive, and larger than the minimum.
- if (!startCoords) return false;
- var deltaY = Math.abs(coords.y - startCoords.y);
- var deltaX = (coords.x - startCoords.x) * direction;
- return valid && // Short circuit for already-invalidated swipes.
- deltaY < MAX_VERTICAL_DISTANCE &&
- deltaX > 0 &&
- deltaX > MIN_HORIZONTAL_DISTANCE &&
- deltaY / deltaX < MAX_VERTICAL_RATIO;
- }
-
- var pointerTypes = ['touch'];
- if (!angular.isDefined(attr['ngSwipeDisableMouse'])) {
- pointerTypes.push('mouse');
- }
- $swipe.bind(element, {
- 'start': function(coords, event) {
- startCoords = coords;
- valid = true;
- },
- 'cancel': function(event) {
- valid = false;
- },
- 'end': function(coords, event) {
- if (validSwipe(coords)) {
- scope.$apply(function() {
- element.triggerHandler(eventName);
- swipeHandler(scope, {$event: event});
- });
- }
- }
- }, pointerTypes);
- };
- }]);
-}
-
-// Left is negative X-coordinate, right is positive.
-makeSwipeDirective('ngSwipeLeft', -1, 'swipeleft');
-makeSwipeDirective('ngSwipeRight', 1, 'swiperight');
-
-
-
-})(window, window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js
deleted file mode 100644
index 165fba28..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(x,s,y){'use strict';function t(f,k,p){n.directive(f,["$parse","$swipe",function(c,e){return function(l,m,g){function h(a){if(!b)return!1;var d=Math.abs(a.y-b.y);a=(a.x-b.x)*k;return r&&75>d&&0<a&&30<a&&.3>d/a}var d=c(g[f]),b,r,a=["touch"];s.isDefined(g.ngSwipeDisableMouse)||a.push("mouse");e.bind(m,{start:function(a,d){b=a;r=!0},cancel:function(a){r=!1},end:function(a,b){h(a)&&l.$apply(function(){m.triggerHandler(p);d(l,{$event:b})})}},a)}}])}var n=s.module("ngTouch",[]);n.factory("$swipe",
-[function(){function f(c){c=c.originalEvent||c;var e=c.touches&&c.touches.length?c.touches:[c];c=c.changedTouches&&c.changedTouches[0]||e[0];return{x:c.clientX,y:c.clientY}}function k(c,e){var l=[];s.forEach(c,function(c){(c=p[c][e])&&l.push(c)});return l.join(" ")}var p={mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},touch:{start:"touchstart",move:"touchmove",end:"touchend",cancel:"touchcancel"}};return{bind:function(c,e,l){var m,g,h,d,b=!1;l=l||["mouse","touch"];c.on(k(l,"start"),function(a){h=
-f(a);b=!0;g=m=0;d=h;e.start&&e.start(h,a)});var r=k(l,"cancel");if(r)c.on(r,function(a){b=!1;e.cancel&&e.cancel(a)});c.on(k(l,"move"),function(a){if(b&&h){var c=f(a);m+=Math.abs(c.x-d.x);g+=Math.abs(c.y-d.y);d=c;10>m&&10>g||(g>m?(b=!1,e.cancel&&e.cancel(a)):(a.preventDefault(),e.move&&e.move(c,a)))}});c.on(k(l,"end"),function(a){b&&(b=!1,e.end&&e.end(f(a),a))})}}}]);n.config(["$provide",function(f){f.decorator("ngClickDirective",["$delegate",function(k){k.shift();return k}])}]);n.directive("ngClick",
-["$parse","$timeout","$rootElement",function(f,k,p){function c(d,b,c){for(var a=0;a<d.length;a+=2){var e=d[a+1],g=c;if(25>Math.abs(d[a]-b)&&25>Math.abs(e-g))return d.splice(a,a+2),!0}return!1}function e(d){if(!(2500<Date.now()-m)){var b=d.touches&&d.touches.length?d.touches:[d],e=b[0].clientX,b=b[0].clientY;if(!(1>e&&1>b||h&&h[0]===e&&h[1]===b)){h&&(h=null);var a=d.target;"label"===s.lowercase(a.nodeName||a[0]&&a[0].nodeName)&&(h=[e,b]);c(g,e,b)||(d.stopPropagation(),d.preventDefault(),d.target&&
-d.target.blur&&d.target.blur())}}}function l(d){d=d.touches&&d.touches.length?d.touches:[d];var b=d[0].clientX,c=d[0].clientY;g.push(b,c);k(function(){for(var a=0;a<g.length;a+=2)if(g[a]==b&&g[a+1]==c){g.splice(a,a+2);break}},2500,!1)}var m,g,h;return function(d,b,h){var a=f(h.ngClick),k=!1,q,n,t,v;b.on("touchstart",function(a){k=!0;q=a.target?a.target:a.srcElement;3==q.nodeType&&(q=q.parentNode);b.addClass("ng-click-active");n=Date.now();a=a.originalEvent||a;a=(a.touches&&a.touches.length?a.touches:
-[a])[0];t=a.clientX;v=a.clientY});b.on("touchcancel",function(a){k=!1;b.removeClass("ng-click-active")});b.on("touchend",function(a){var d=Date.now()-n,f=a.originalEvent||a,u=(f.changedTouches&&f.changedTouches.length?f.changedTouches:f.touches&&f.touches.length?f.touches:[f])[0],f=u.clientX,u=u.clientY,w=Math.sqrt(Math.pow(f-t,2)+Math.pow(u-v,2));k&&750>d&&12>w&&(g||(p[0].addEventListener("click",e,!0),p[0].addEventListener("touchstart",l,!0),g=[]),m=Date.now(),c(g,f,u),q&&q.blur(),s.isDefined(h.disabled)&&
-!1!==h.disabled||b.triggerHandler("click",[a]));k=!1;b.removeClass("ng-click-active")});b.onclick=function(a){};b.on("click",function(b,c){d.$apply(function(){a(d,{$event:c||b})})});b.on("mousedown",function(a){b.addClass("ng-click-active")});b.on("mousemove mouseup",function(a){b.removeClass("ng-click-active")})}}]);t("ngSwipeLeft",-1,"swipeleft");t("ngSwipeRight",1,"swiperight")})(window,window.angular);
-//# sourceMappingURL=angular-touch.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js.map
deleted file mode 100644
index 029bd32c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular-touch.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular-touch.min.js",
-"lineCount":12,
-"mappings":"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",
-"sources":["angular-touch.js"],
-"names":["window","angular","undefined","makeSwipeDirective","directiveName","direction","eventName","ngTouch","directive","$parse","$swipe","scope","element","attr","validSwipe","coords","startCoords","deltaY","Math","abs","y","deltaX","x","valid","MAX_VERTICAL_DISTANCE","MIN_HORIZONTAL_DISTANCE","MAX_VERTICAL_RATIO","swipeHandler","pointerTypes","isDefined","push","bind","start","event","cancel","end","$apply","triggerHandler","$event","module","factory","getCoordinates","originalEvent","touches","length","e","changedTouches","clientX","clientY","getEvents","eventType","res","forEach","pointerType","POINTER_EVENTS","join","move","eventHandlers","totalX","totalY","lastPos","active","on","events","MOVE_BUFFER_RADIUS","preventDefault","config","$provide","decorator","$delegate","shift","$timeout","$rootElement","checkAllowableRegions","touchCoordinates","i","CLICKBUSTER_THRESHOLD","x1","y1","y2","splice","onClick","PREVENT_DURATION","Date","now","lastPreventedTime","lastLabelClickCoordinates","target","lowercase","nodeName","stopPropagation","blur","onTouchStart","clickHandler","ngClick","tapping","tapElement","startTime","touchStartX","touchStartY","srcElement","nodeType","parentNode","addClass","ACTIVE_CLASS_NAME","removeClass","diff","dist","sqrt","pow","TAP_DURATION","MOVE_TOLERANCE","addEventListener","disabled","onclick","element.onclick","touchend"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.js
deleted file mode 100644
index a3aee7d6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.js
+++ /dev/null
@@ -1,29018 +0,0 @@
-/**
- * @license AngularJS v1.4.8
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, document, undefined) {'use strict';
-
-/**
- * @description
- *
- * This object provides a utility for producing rich Error messages within
- * Angular. It can be called as follows:
- *
- * var exampleMinErr = minErr('example');
- * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
- *
- * The above creates an instance of minErr in the example namespace. The
- * resulting error will have a namespaced error code of example.one. The
- * resulting error will replace {0} with the value of foo, and {1} with the
- * value of bar. The object is not restricted in the number of arguments it can
- * take.
- *
- * If fewer arguments are specified than necessary for interpolation, the extra
- * interpolation markers will be preserved in the final string.
- *
- * Since data will be parsed statically during a build step, some restrictions
- * are applied with respect to how minErr instances are created and called.
- * Instances should have names of the form namespaceMinErr for a minErr created
- * using minErr('namespace') . Error codes, namespaces and template strings
- * should all be static strings, not variables or general expressions.
- *
- * @param {string} module The namespace to use for the new minErr instance.
- * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
- * error from returned function, for cases when a particular type of error is useful.
- * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
- */
-
-function minErr(module, ErrorConstructor) {
- ErrorConstructor = ErrorConstructor || Error;
- return function() {
- var SKIP_INDEXES = 2;
-
- var templateArgs = arguments,
- code = templateArgs[0],
- message = '[' + (module ? module + ':' : '') + code + '] ',
- template = templateArgs[1],
- paramPrefix, i;
-
- message += template.replace(/\{\d+\}/g, function(match) {
- var index = +match.slice(1, -1),
- shiftedIndex = index + SKIP_INDEXES;
-
- if (shiftedIndex < templateArgs.length) {
- return toDebugString(templateArgs[shiftedIndex]);
- }
-
- return match;
- });
-
- message += '\nhttp://errors.angularjs.org/1.4.8/' +
- (module ? module + '/' : '') + code;
-
- for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
- message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
- encodeURIComponent(toDebugString(templateArgs[i]));
- }
-
- return new ErrorConstructor(message);
- };
-}
-
-/* We need to tell jshint what variables are being exported */
-/* global angular: true,
- msie: true,
- jqLite: true,
- jQuery: true,
- slice: true,
- splice: true,
- push: true,
- toString: true,
- ngMinErr: true,
- angularModule: true,
- uid: true,
- REGEX_STRING_REGEXP: true,
- VALIDITY_STATE_PROPERTY: true,
-
- lowercase: true,
- uppercase: true,
- manualLowercase: true,
- manualUppercase: true,
- nodeName_: true,
- isArrayLike: true,
- forEach: true,
- forEachSorted: true,
- reverseParams: true,
- nextUid: true,
- setHashKey: true,
- extend: true,
- toInt: true,
- inherit: true,
- merge: true,
- noop: true,
- identity: true,
- valueFn: true,
- isUndefined: true,
- isDefined: true,
- isObject: true,
- isBlankObject: true,
- isString: true,
- isNumber: true,
- isDate: true,
- isArray: true,
- isFunction: true,
- isRegExp: true,
- isWindow: true,
- isScope: true,
- isFile: true,
- isFormData: true,
- isBlob: true,
- isBoolean: true,
- isPromiseLike: true,
- trim: true,
- escapeForRegexp: true,
- isElement: true,
- makeMap: true,
- includes: true,
- arrayRemove: true,
- copy: true,
- shallowCopy: true,
- equals: true,
- csp: true,
- jq: true,
- concat: true,
- sliceArgs: true,
- bind: true,
- toJsonReplacer: true,
- toJson: true,
- fromJson: true,
- convertTimezoneToLocal: true,
- timezoneToOffset: true,
- startingTag: true,
- tryDecodeURIComponent: true,
- parseKeyValue: true,
- toKeyValue: true,
- encodeUriSegment: true,
- encodeUriQuery: true,
- angularInit: true,
- bootstrap: true,
- getTestability: true,
- snake_case: true,
- bindJQuery: true,
- assertArg: true,
- assertArgFn: true,
- assertNotHasOwnProperty: true,
- getter: true,
- getBlockNodes: true,
- hasOwnProperty: true,
- createMap: true,
-
- NODE_TYPE_ELEMENT: true,
- NODE_TYPE_ATTRIBUTE: true,
- NODE_TYPE_TEXT: true,
- NODE_TYPE_COMMENT: true,
- NODE_TYPE_DOCUMENT: true,
- NODE_TYPE_DOCUMENT_FRAGMENT: true,
-*/
-
-////////////////////////////////////
-
-/**
- * @ngdoc module
- * @name ng
- * @module ng
- * @description
- *
- * # ng (core module)
- * The ng module is loaded by default when an AngularJS application is started. The module itself
- * contains the essential components for an AngularJS application to function. The table below
- * lists a high level breakdown of each of the services/factories, filters, directives and testing
- * components available within this core module.
- *
- * <div doc-module-components="ng"></div>
- */
-
-var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
-
-// The name of a form control's ValidityState property.
-// This is used so that it's possible for internal tests to create mock ValidityStates.
-var VALIDITY_STATE_PROPERTY = 'validity';
-
-/**
- * @ngdoc function
- * @name angular.lowercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to lowercase.
- * @param {string} string String to be converted to lowercase.
- * @returns {string} Lowercased string.
- */
-var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * @ngdoc function
- * @name angular.uppercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to uppercase.
- * @param {string} string String to be converted to uppercase.
- * @returns {string} Uppercased string.
- */
-var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
-
-
-var manualLowercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
- : s;
-};
-var manualUppercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
- : s;
-};
-
-
-// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
-// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
-// with correct but slower alternatives.
-if ('i' !== 'I'.toLowerCase()) {
- lowercase = manualLowercase;
- uppercase = manualUppercase;
-}
-
-
-var
- msie, // holds major version number for IE, or NaN if UA is not IE.
- jqLite, // delay binding since jQuery could be loaded after us.
- jQuery, // delay binding
- slice = [].slice,
- splice = [].splice,
- push = [].push,
- toString = Object.prototype.toString,
- getPrototypeOf = Object.getPrototypeOf,
- ngMinErr = minErr('ng'),
-
- /** @name angular */
- angular = window.angular || (window.angular = {}),
- angularModule,
- uid = 0;
-
-/**
- * documentMode is an IE-only property
- * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx
- */
-msie = document.documentMode;
-
-
-/**
- * @private
- * @param {*} obj
- * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
- * String ...)
- */
-function isArrayLike(obj) {
-
- // `null`, `undefined` and `window` are not array-like
- if (obj == null || isWindow(obj)) return false;
-
- // arrays, strings and jQuery/jqLite objects are array like
- // * jqLite is either the jQuery or jqLite constructor function
- // * we have to check the existance of jqLite first as this method is called
- // via the forEach method when constructing the jqLite object in the first place
- if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // "length" in obj used to prevent JIT error (gh-11508)
- var length = "length" in Object(obj) && obj.length;
-
- // NodeList objects (with `item` method) and
- // other objects with suitable length characteristics are array-like
- return isNumber(length) &&
- (length >= 0 && (length - 1) in obj || typeof obj.item == 'function');
-}
-
-/**
- * @ngdoc function
- * @name angular.forEach
- * @module ng
- * @kind function
- *
- * @description
- * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
- * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
- * is the value of an object property or an array element, `key` is the object property key or
- * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.
- *
- * It is worth noting that `.forEach` does not iterate over inherited properties because it filters
- * using the `hasOwnProperty` method.
- *
- * Unlike ES262's
- * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),
- * Providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just
- * return the value provided.
- *
- ```js
- var values = {name: 'misko', gender: 'male'};
- var log = [];
- angular.forEach(values, function(value, key) {
- this.push(key + ': ' + value);
- }, log);
- expect(log).toEqual(['name: misko', 'gender: male']);
- ```
- *
- * @param {Object|Array} obj Object to iterate over.
- * @param {Function} iterator Iterator function.
- * @param {Object=} context Object to become context (`this`) for the iterator function.
- * @returns {Object|Array} Reference to `obj`.
- */
-
-function forEach(obj, iterator, context) {
- var key, length;
- if (obj) {
- if (isFunction(obj)) {
- for (key in obj) {
- // Need to check if hasOwnProperty exists,
- // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
- if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else if (isArray(obj) || isArrayLike(obj)) {
- var isPrimitive = typeof obj !== 'object';
- for (key = 0, length = obj.length; key < length; key++) {
- if (isPrimitive || key in obj) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else if (obj.forEach && obj.forEach !== forEach) {
- obj.forEach(iterator, context, obj);
- } else if (isBlankObject(obj)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in obj) {
- iterator.call(context, obj[key], key, obj);
- }
- } else if (typeof obj.hasOwnProperty === 'function') {
- // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else {
- // Slow path for objects which do not have a method `hasOwnProperty`
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- }
- }
- return obj;
-}
-
-function forEachSorted(obj, iterator, context) {
- var keys = Object.keys(obj).sort();
- for (var i = 0; i < keys.length; i++) {
- iterator.call(context, obj[keys[i]], keys[i]);
- }
- return keys;
-}
-
-
-/**
- * when using forEach the params are value, key, but it is often useful to have key, value.
- * @param {function(string, *)} iteratorFn
- * @returns {function(*, string)}
- */
-function reverseParams(iteratorFn) {
- return function(value, key) { iteratorFn(key, value); };
-}
-
-/**
- * A consistent way of creating unique IDs in angular.
- *
- * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before
- * we hit number precision issues in JavaScript.
- *
- * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M
- *
- * @returns {number} an unique alpha-numeric string
- */
-function nextUid() {
- return ++uid;
-}
-
-
-/**
- * Set or clear the hashkey for an object.
- * @param obj object
- * @param h the hashkey (!truthy to delete the hashkey)
- */
-function setHashKey(obj, h) {
- if (h) {
- obj.$$hashKey = h;
- } else {
- delete obj.$$hashKey;
- }
-}
-
-
-function baseExtend(dst, objs, deep) {
- var h = dst.$$hashKey;
-
- for (var i = 0, ii = objs.length; i < ii; ++i) {
- var obj = objs[i];
- if (!isObject(obj) && !isFunction(obj)) continue;
- var keys = Object.keys(obj);
- for (var j = 0, jj = keys.length; j < jj; j++) {
- var key = keys[j];
- var src = obj[key];
-
- if (deep && isObject(src)) {
- if (isDate(src)) {
- dst[key] = new Date(src.valueOf());
- } else if (isRegExp(src)) {
- dst[key] = new RegExp(src);
- } else if (src.nodeName) {
- dst[key] = src.cloneNode(true);
- } else if (isElement(src)) {
- dst[key] = src.clone();
- } else {
- if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
- baseExtend(dst[key], [src], true);
- }
- } else {
- dst[key] = src;
- }
- }
- }
-
- setHashKey(dst, h);
- return dst;
-}
-
-/**
- * @ngdoc function
- * @name angular.extend
- * @module ng
- * @kind function
- *
- * @description
- * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
- * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
- * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.
- *
- * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use
- * {@link angular.merge} for this.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- * @returns {Object} Reference to `dst`.
- */
-function extend(dst) {
- return baseExtend(dst, slice.call(arguments, 1), false);
-}
-
-
-/**
-* @ngdoc function
-* @name angular.merge
-* @module ng
-* @kind function
-*
-* @description
-* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
-* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
-* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.
-*
-* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source
-* objects, performing a deep copy.
-*
-* @param {Object} dst Destination object.
-* @param {...Object} src Source object(s).
-* @returns {Object} Reference to `dst`.
-*/
-function merge(dst) {
- return baseExtend(dst, slice.call(arguments, 1), true);
-}
-
-
-
-function toInt(str) {
- return parseInt(str, 10);
-}
-
-
-function inherit(parent, extra) {
- return extend(Object.create(parent), extra);
-}
-
-/**
- * @ngdoc function
- * @name angular.noop
- * @module ng
- * @kind function
- *
- * @description
- * A function that performs no operations. This function can be useful when writing code in the
- * functional style.
- ```js
- function foo(callback) {
- var result = calculateResult();
- (callback || angular.noop)(result);
- }
- ```
- */
-function noop() {}
-noop.$inject = [];
-
-
-/**
- * @ngdoc function
- * @name angular.identity
- * @module ng
- * @kind function
- *
- * @description
- * A function that returns its first argument. This function is useful when writing code in the
- * functional style.
- *
- ```js
- function transformer(transformationFn, value) {
- return (transformationFn || angular.identity)(value);
- };
- ```
- * @param {*} value to be returned.
- * @returns {*} the value passed in.
- */
-function identity($) {return $;}
-identity.$inject = [];
-
-
-function valueFn(value) {return function() {return value;};}
-
-function hasCustomToString(obj) {
- return isFunction(obj.toString) && obj.toString !== toString;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isUndefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is undefined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is undefined.
- */
-function isUndefined(value) {return typeof value === 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is defined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is defined.
- */
-function isDefined(value) {return typeof value !== 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isObject
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
- * considered to be objects. Note that JavaScript arrays are objects.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Object` but not `null`.
- */
-function isObject(value) {
- // http://jsperf.com/isobject4
- return value !== null && typeof value === 'object';
-}
-
-
-/**
- * Determine if a value is an object with a null prototype
- *
- * @returns {boolean} True if `value` is an `Object` with a null prototype
- */
-function isBlankObject(value) {
- return value !== null && typeof value === 'object' && !getPrototypeOf(value);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isString
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `String`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `String`.
- */
-function isString(value) {return typeof value === 'string';}
-
-
-/**
- * @ngdoc function
- * @name angular.isNumber
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Number`.
- *
- * This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
- *
- * If you wish to exclude these then you can use the native
- * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
- * method.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Number`.
- */
-function isNumber(value) {return typeof value === 'number';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDate
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a value is a date.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Date`.
- */
-function isDate(value) {
- return toString.call(value) === '[object Date]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isArray
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Array`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Array`.
- */
-var isArray = Array.isArray;
-
-/**
- * @ngdoc function
- * @name angular.isFunction
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Function`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Function`.
- */
-function isFunction(value) {return typeof value === 'function';}
-
-
-/**
- * Determines if a value is a regular expression object.
- *
- * @private
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `RegExp`.
- */
-function isRegExp(value) {
- return toString.call(value) === '[object RegExp]';
-}
-
-
-/**
- * Checks if `obj` is a window object.
- *
- * @private
- * @param {*} obj Object to check
- * @returns {boolean} True if `obj` is a window obj.
- */
-function isWindow(obj) {
- return obj && obj.window === obj;
-}
-
-
-function isScope(obj) {
- return obj && obj.$evalAsync && obj.$watch;
-}
-
-
-function isFile(obj) {
- return toString.call(obj) === '[object File]';
-}
-
-
-function isFormData(obj) {
- return toString.call(obj) === '[object FormData]';
-}
-
-
-function isBlob(obj) {
- return toString.call(obj) === '[object Blob]';
-}
-
-
-function isBoolean(value) {
- return typeof value === 'boolean';
-}
-
-
-function isPromiseLike(obj) {
- return obj && isFunction(obj.then);
-}
-
-
-var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;
-function isTypedArray(value) {
- return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));
-}
-
-
-var trim = function(value) {
- return isString(value) ? value.trim() : value;
-};
-
-// Copied from:
-// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
-// Prereq: s is a string.
-var escapeForRegexp = function(s) {
- return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
- replace(/\x08/g, '\\x08');
-};
-
-
-/**
- * @ngdoc function
- * @name angular.isElement
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a DOM element (or wrapped jQuery element).
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
- */
-function isElement(node) {
- return !!(node &&
- (node.nodeName // we are a direct element
- || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API
-}
-
-/**
- * @param str 'key1,key2,...'
- * @returns {object} in the form of {key1:true, key2:true, ...}
- */
-function makeMap(str) {
- var obj = {}, items = str.split(","), i;
- for (i = 0; i < items.length; i++) {
- obj[items[i]] = true;
- }
- return obj;
-}
-
-
-function nodeName_(element) {
- return lowercase(element.nodeName || (element[0] && element[0].nodeName));
-}
-
-function includes(array, obj) {
- return Array.prototype.indexOf.call(array, obj) != -1;
-}
-
-function arrayRemove(array, value) {
- var index = array.indexOf(value);
- if (index >= 0) {
- array.splice(index, 1);
- }
- return index;
-}
-
-/**
- * @ngdoc function
- * @name angular.copy
- * @module ng
- * @kind function
- *
- * @description
- * Creates a deep copy of `source`, which should be an object or an array.
- *
- * * If no destination is supplied, a copy of the object or array is created.
- * * If a destination is provided, all of its elements (for arrays) or properties (for objects)
- * are deleted and then all elements/properties from the source are copied to it.
- * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
- * * If `source` is identical to 'destination' an exception will be thrown.
- *
- * @param {*} source The source that will be used to make a copy.
- * Can be any type, including primitives, `null`, and `undefined`.
- * @param {(Object|Array)=} destination Destination into which the source is copied. If
- * provided, must be of the same type as `source`.
- * @returns {*} The copy or updated `destination`, if `destination` was specified.
- *
- * @example
- <example module="copyExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form novalidate class="simple-form">
- Name: <input type="text" ng-model="user.name" /><br />
- E-mail: <input type="email" ng-model="user.email" /><br />
- Gender: <input type="radio" ng-model="user.gender" value="male" />male
- <input type="radio" ng-model="user.gender" value="female" />female<br />
- <button ng-click="reset()">RESET</button>
- <button ng-click="update(user)">SAVE</button>
- </form>
- <pre>form = {{user | json}}</pre>
- <pre>master = {{master | json}}</pre>
- </div>
-
- <script>
- angular.module('copyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.master= {};
-
- $scope.update = function(user) {
- // Example with 1 argument
- $scope.master= angular.copy(user);
- };
-
- $scope.reset = function() {
- // Example with 2 arguments
- angular.copy($scope.master, $scope.user);
- };
-
- $scope.reset();
- }]);
- </script>
- </file>
- </example>
- */
-function copy(source, destination) {
- var stackSource = [];
- var stackDest = [];
-
- if (destination) {
- if (isTypedArray(destination)) {
- throw ngMinErr('cpta', "Can't copy! TypedArray destination cannot be mutated.");
- }
- if (source === destination) {
- throw ngMinErr('cpi', "Can't copy! Source and destination are identical.");
- }
-
- // Empty the destination object
- if (isArray(destination)) {
- destination.length = 0;
- } else {
- forEach(destination, function(value, key) {
- if (key !== '$$hashKey') {
- delete destination[key];
- }
- });
- }
-
- stackSource.push(source);
- stackDest.push(destination);
- return copyRecurse(source, destination);
- }
-
- return copyElement(source);
-
- function copyRecurse(source, destination) {
- var h = destination.$$hashKey;
- var result, key;
- if (isArray(source)) {
- for (var i = 0, ii = source.length; i < ii; i++) {
- destination.push(copyElement(source[i]));
- }
- } else if (isBlankObject(source)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in source) {
- destination[key] = copyElement(source[key]);
- }
- } else if (source && typeof source.hasOwnProperty === 'function') {
- // Slow path, which must rely on hasOwnProperty
- for (key in source) {
- if (source.hasOwnProperty(key)) {
- destination[key] = copyElement(source[key]);
- }
- }
- } else {
- // Slowest path --- hasOwnProperty can't be called as a method
- for (key in source) {
- if (hasOwnProperty.call(source, key)) {
- destination[key] = copyElement(source[key]);
- }
- }
- }
- setHashKey(destination, h);
- return destination;
- }
-
- function copyElement(source) {
- // Simple values
- if (!isObject(source)) {
- return source;
- }
-
- // Already copied values
- var index = stackSource.indexOf(source);
- if (index !== -1) {
- return stackDest[index];
- }
-
- if (isWindow(source) || isScope(source)) {
- throw ngMinErr('cpws',
- "Can't copy! Making copies of Window or Scope instances is not supported.");
- }
-
- var needsRecurse = false;
- var destination;
-
- if (isArray(source)) {
- destination = [];
- needsRecurse = true;
- } else if (isTypedArray(source)) {
- destination = new source.constructor(source);
- } else if (isDate(source)) {
- destination = new Date(source.getTime());
- } else if (isRegExp(source)) {
- destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
- destination.lastIndex = source.lastIndex;
- } else if (isFunction(source.cloneNode)) {
- destination = source.cloneNode(true);
- } else {
- destination = Object.create(getPrototypeOf(source));
- needsRecurse = true;
- }
-
- stackSource.push(source);
- stackDest.push(destination);
-
- return needsRecurse
- ? copyRecurse(source, destination)
- : destination;
- }
-}
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.equals
- * @module ng
- * @kind function
- *
- * @description
- * Determines if two objects or two values are equivalent. Supports value types, regular
- * expressions, arrays and objects.
- *
- * Two objects or values are considered equivalent if at least one of the following is true:
- *
- * * Both objects or values pass `===` comparison.
- * * Both objects or values are of the same type and all of their properties are equal by
- * comparing them with `angular.equals`.
- * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
- * * Both values represent the same regular expression (In JavaScript,
- * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
- * representation matches).
- *
- * During a property comparison, properties of `function` type and properties with names
- * that begin with `$` are ignored.
- *
- * Scope and DOMWindow objects are being compared only by identify (`===`).
- *
- * @param {*} o1 Object or value to compare.
- * @param {*} o2 Object or value to compare.
- * @returns {boolean} True if arguments are equal.
- */
-function equals(o1, o2) {
- if (o1 === o2) return true;
- if (o1 === null || o2 === null) return false;
- if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
- var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
- if (t1 == t2) {
- if (t1 == 'object') {
- if (isArray(o1)) {
- if (!isArray(o2)) return false;
- if ((length = o1.length) == o2.length) {
- for (key = 0; key < length; key++) {
- if (!equals(o1[key], o2[key])) return false;
- }
- return true;
- }
- } else if (isDate(o1)) {
- if (!isDate(o2)) return false;
- return equals(o1.getTime(), o2.getTime());
- } else if (isRegExp(o1)) {
- return isRegExp(o2) ? o1.toString() == o2.toString() : false;
- } else {
- if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
- isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
- keySet = createMap();
- for (key in o1) {
- if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
- if (!equals(o1[key], o2[key])) return false;
- keySet[key] = true;
- }
- for (key in o2) {
- if (!(key in keySet) &&
- key.charAt(0) !== '$' &&
- isDefined(o2[key]) &&
- !isFunction(o2[key])) return false;
- }
- return true;
- }
- }
- }
- return false;
-}
-
-var csp = function() {
- if (!isDefined(csp.rules)) {
-
-
- var ngCspElement = (document.querySelector('[ng-csp]') ||
- document.querySelector('[data-ng-csp]'));
-
- if (ngCspElement) {
- var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
- ngCspElement.getAttribute('data-ng-csp');
- csp.rules = {
- noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),
- noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)
- };
- } else {
- csp.rules = {
- noUnsafeEval: noUnsafeEval(),
- noInlineStyle: false
- };
- }
- }
-
- return csp.rules;
-
- function noUnsafeEval() {
- try {
- /* jshint -W031, -W054 */
- new Function('');
- /* jshint +W031, +W054 */
- return false;
- } catch (e) {
- return true;
- }
- }
-};
-
-/**
- * @ngdoc directive
- * @module ng
- * @name ngJq
- *
- * @element ANY
- * @param {string=} ngJq the name of the library available under `window`
- * to be used for angular.element
- * @description
- * Use this directive to force the angular.element library. This should be
- * used to force either jqLite by leaving ng-jq blank or setting the name of
- * the jquery variable under window (eg. jQuery).
- *
- * Since angular looks for this directive when it is loaded (doesn't wait for the
- * DOMContentLoaded event), it must be placed on an element that comes before the script
- * which loads angular. Also, only the first instance of `ng-jq` will be used and all
- * others ignored.
- *
- * @example
- * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-jq>
- ...
- ...
- </html>
- ```
- * @example
- * This example shows how to use a jQuery based library of a different name.
- * The library name must be available at the top most 'window'.
- ```html
- <!doctype html>
- <html ng-app ng-jq="jQueryLib">
- ...
- ...
- </html>
- ```
- */
-var jq = function() {
- if (isDefined(jq.name_)) return jq.name_;
- var el;
- var i, ii = ngAttrPrefixes.length, prefix, name;
- for (i = 0; i < ii; ++i) {
- prefix = ngAttrPrefixes[i];
- if (el = document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]')) {
- name = el.getAttribute(prefix + 'jq');
- break;
- }
- }
-
- return (jq.name_ = name);
-};
-
-function concat(array1, array2, index) {
- return array1.concat(slice.call(array2, index));
-}
-
-function sliceArgs(args, startIndex) {
- return slice.call(args, startIndex || 0);
-}
-
-
-/* jshint -W101 */
-/**
- * @ngdoc function
- * @name angular.bind
- * @module ng
- * @kind function
- *
- * @description
- * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
- * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
- * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
- * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
- *
- * @param {Object} self Context which `fn` should be evaluated in.
- * @param {function()} fn Function to be bound.
- * @param {...*} args Optional arguments to be prebound to the `fn` function call.
- * @returns {function()} Function that wraps the `fn` with all the specified bindings.
- */
-/* jshint +W101 */
-function bind(self, fn) {
- var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
- if (isFunction(fn) && !(fn instanceof RegExp)) {
- return curryArgs.length
- ? function() {
- return arguments.length
- ? fn.apply(self, concat(curryArgs, arguments, 0))
- : fn.apply(self, curryArgs);
- }
- : function() {
- return arguments.length
- ? fn.apply(self, arguments)
- : fn.call(self);
- };
- } else {
- // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
- return fn;
- }
-}
-
-
-function toJsonReplacer(key, value) {
- var val = value;
-
- if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
- val = undefined;
- } else if (isWindow(value)) {
- val = '$WINDOW';
- } else if (value && document === value) {
- val = '$DOCUMENT';
- } else if (isScope(value)) {
- val = '$SCOPE';
- }
-
- return val;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.toJson
- * @module ng
- * @kind function
- *
- * @description
- * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be
- * stripped since angular uses this notation internally.
- *
- * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
- * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.
- * If set to an integer, the JSON output will contain that many spaces per indentation.
- * @returns {string|undefined} JSON-ified string representing `obj`.
- */
-function toJson(obj, pretty) {
- if (typeof obj === 'undefined') return undefined;
- if (!isNumber(pretty)) {
- pretty = pretty ? 2 : null;
- }
- return JSON.stringify(obj, toJsonReplacer, pretty);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.fromJson
- * @module ng
- * @kind function
- *
- * @description
- * Deserializes a JSON string.
- *
- * @param {string} json JSON string to deserialize.
- * @returns {Object|Array|string|number} Deserialized JSON string.
- */
-function fromJson(json) {
- return isString(json)
- ? JSON.parse(json)
- : json;
-}
-
-
-function timezoneToOffset(timezone, fallback) {
- var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
- return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
-}
-
-
-function addDateMinutes(date, minutes) {
- date = new Date(date.getTime());
- date.setMinutes(date.getMinutes() + minutes);
- return date;
-}
-
-
-function convertTimezoneToLocal(date, timezone, reverse) {
- reverse = reverse ? -1 : 1;
- var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
- return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
-}
-
-
-/**
- * @returns {string} Returns the string representation of the element.
- */
-function startingTag(element) {
- element = jqLite(element).clone();
- try {
- // turns out IE does not let you set .html() on elements which
- // are not allowed to have children. So we just ignore it.
- element.empty();
- } catch (e) {}
- var elemHtml = jqLite('<div>').append(element).html();
- try {
- return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
- elemHtml.
- match(/^(<[^>]+>)/)[1].
- replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
- } catch (e) {
- return lowercase(elemHtml);
- }
-
-}
-
-
-/////////////////////////////////////////////////
-
-/**
- * Tries to decode the URI component without throwing an exception.
- *
- * @private
- * @param str value potential URI component to check.
- * @returns {boolean} True if `value` can be decoded
- * with the decodeURIComponent function.
- */
-function tryDecodeURIComponent(value) {
- try {
- return decodeURIComponent(value);
- } catch (e) {
- // Ignore any invalid uri component
- }
-}
-
-
-/**
- * Parses an escaped url query string into key-value pairs.
- * @returns {Object.<string,boolean|Array>}
- */
-function parseKeyValue(/**string*/keyValue) {
- var obj = {};
- forEach((keyValue || "").split('&'), function(keyValue) {
- var splitPoint, key, val;
- if (keyValue) {
- key = keyValue = keyValue.replace(/\+/g,'%20');
- splitPoint = keyValue.indexOf('=');
- if (splitPoint !== -1) {
- key = keyValue.substring(0, splitPoint);
- val = keyValue.substring(splitPoint + 1);
- }
- key = tryDecodeURIComponent(key);
- if (isDefined(key)) {
- val = isDefined(val) ? tryDecodeURIComponent(val) : true;
- if (!hasOwnProperty.call(obj, key)) {
- obj[key] = val;
- } else if (isArray(obj[key])) {
- obj[key].push(val);
- } else {
- obj[key] = [obj[key],val];
- }
- }
- }
- });
- return obj;
-}
-
-function toKeyValue(obj) {
- var parts = [];
- forEach(obj, function(value, key) {
- if (isArray(value)) {
- forEach(value, function(arrayValue) {
- parts.push(encodeUriQuery(key, true) +
- (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
- });
- } else {
- parts.push(encodeUriQuery(key, true) +
- (value === true ? '' : '=' + encodeUriQuery(value, true)));
- }
- });
- return parts.length ? parts.join('&') : '';
-}
-
-
-/**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
-}
-
-
-/**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace(/%3B/gi, ';').
- replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
-}
-
-var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
-
-function getNgAttribute(element, ngAttr) {
- var attr, i, ii = ngAttrPrefixes.length;
- for (i = 0; i < ii; ++i) {
- attr = ngAttrPrefixes[i] + ngAttr;
- if (isString(attr = element.getAttribute(attr))) {
- return attr;
- }
- }
- return null;
-}
-
-/**
- * @ngdoc directive
- * @name ngApp
- * @module ng
- *
- * @element ANY
- * @param {angular.Module} ngApp an optional application
- * {@link angular.module module} name to load.
- * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be
- * created in "strict-di" mode. This means that the application will fail to invoke functions which
- * do not use explicit function annotation (and are thus unsuitable for minification), as described
- * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in
- * tracking down the root of these bugs.
- *
- * @description
- *
- * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
- * designates the **root element** of the application and is typically placed near the root element
- * of the page - e.g. on the `<body>` or `<html>` tags.
- *
- * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
- * found in the document will be used to define the root element to auto-bootstrap as an
- * application. To run multiple applications in an HTML document you must manually bootstrap them using
- * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
- *
- * You can specify an **AngularJS module** to be used as the root module for the application. This
- * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It
- * should contain the application code needed or have dependencies on other modules that will
- * contain the code. See {@link angular.module} for more information.
- *
- * In the example below if the `ngApp` directive were not placed on the `html` element then the
- * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
- * would not be resolved to `3`.
- *
- * `ngApp` is the easiest, and most common way to bootstrap an application.
- *
- <example module="ngAppDemo">
- <file name="index.html">
- <div ng-controller="ngAppDemoController">
- I can add: {{a}} + {{b}} = {{ a+b }}
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- });
- </file>
- </example>
- *
- * Using `ngStrictDi`, you would see something like this:
- *
- <example ng-app-included="true">
- <file name="index.html">
- <div ng-app="ngAppStrictDemo" ng-strict-di>
- <div ng-controller="GoodController1">
- I can add: {{a}} + {{b}} = {{ a+b }}
-
- <p>This renders because the controller does not fail to
- instantiate, by using explicit annotation style (see
- script.js for details)
- </p>
- </div>
-
- <div ng-controller="GoodController2">
- Name: <input ng-model="name"><br />
- Hello, {{name}}!
-
- <p>This renders because the controller does not fail to
- instantiate, by using explicit annotation style
- (see script.js for details)
- </p>
- </div>
-
- <div ng-controller="BadController">
- I can add: {{a}} + {{b}} = {{ a+b }}
-
- <p>The controller could not be instantiated, due to relying
- on automatic function annotations (which are disabled in
- strict mode). As such, the content of this section is not
- interpolated, and there should be an error in your web console.
- </p>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppStrictDemo', [])
- // BadController will fail to instantiate, due to relying on automatic function annotation,
- // rather than an explicit annotation
- .controller('BadController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- })
- // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,
- // due to using explicit annotations using the array style and $inject property, respectively.
- .controller('GoodController1', ['$scope', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- }])
- .controller('GoodController2', GoodController2);
- function GoodController2($scope) {
- $scope.name = "World";
- }
- GoodController2.$inject = ['$scope'];
- </file>
- <file name="style.css">
- div[ng-controller] {
- margin-bottom: 1em;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- border: 1px solid;
- padding: .5em;
- }
- div[ng-controller^=Good] {
- border-color: #d6e9c6;
- background-color: #dff0d8;
- color: #3c763d;
- }
- div[ng-controller^=Bad] {
- border-color: #ebccd1;
- background-color: #f2dede;
- color: #a94442;
- margin-bottom: 0;
- }
- </file>
- </example>
- */
-function angularInit(element, bootstrap) {
- var appElement,
- module,
- config = {};
-
- // The element `element` has priority over any other element
- forEach(ngAttrPrefixes, function(prefix) {
- var name = prefix + 'app';
-
- if (!appElement && element.hasAttribute && element.hasAttribute(name)) {
- appElement = element;
- module = element.getAttribute(name);
- }
- });
- forEach(ngAttrPrefixes, function(prefix) {
- var name = prefix + 'app';
- var candidate;
-
- if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\:') + ']'))) {
- appElement = candidate;
- module = candidate.getAttribute(name);
- }
- });
- if (appElement) {
- config.strictDi = getNgAttribute(appElement, "strict-di") !== null;
- bootstrap(appElement, module ? [module] : [], config);
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.bootstrap
- * @module ng
- * @description
- * Use this function to manually start up angular application.
- *
- * See: {@link guide/bootstrap Bootstrap}
- *
- * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.
- * They must use {@link ng.directive:ngApp ngApp}.
- *
- * Angular will detect if it has been loaded into the browser more than once and only allow the
- * first loaded script to be bootstrapped and will report a warning to the browser console for
- * each of the subsequent scripts. This prevents strange results in applications, where otherwise
- * multiple instances of Angular try to work on the DOM.
- *
- * ```html
- * <!doctype html>
- * <html>
- * <body>
- * <div ng-controller="WelcomeController">
- * {{greeting}}
- * </div>
- *
- * <script src="angular.js"></script>
- * <script>
- * var app = angular.module('demo', [])
- * .controller('WelcomeController', function($scope) {
- * $scope.greeting = 'Welcome!';
- * });
- * angular.bootstrap(document, ['demo']);
- * </script>
- * </body>
- * </html>
- * ```
- *
- * @param {DOMElement} element DOM element which is the root of angular application.
- * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
- * Each item in the array should be the name of a predefined module or a (DI annotated)
- * function that will be invoked by the injector as a `config` block.
- * See: {@link angular.module modules}
- * @param {Object=} config an object for defining configuration options for the application. The
- * following keys are supported:
- *
- * * `strictDi` - disable automatic function annotation for the application. This is meant to
- * assist in finding bugs which break minified code. Defaults to `false`.
- *
- * @returns {auto.$injector} Returns the newly created injector for this app.
- */
-function bootstrap(element, modules, config) {
- if (!isObject(config)) config = {};
- var defaultConfig = {
- strictDi: false
- };
- config = extend(defaultConfig, config);
- var doBootstrap = function() {
- element = jqLite(element);
-
- if (element.injector()) {
- var tag = (element[0] === document) ? 'document' : startingTag(element);
- //Encode angle brackets to prevent input from being sanitized to empty string #8683
- throw ngMinErr(
- 'btstrpd',
- "App Already Bootstrapped with this Element '{0}'",
- tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
- }
-
- modules = modules || [];
- modules.unshift(['$provide', function($provide) {
- $provide.value('$rootElement', element);
- }]);
-
- if (config.debugInfoEnabled) {
- // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
- modules.push(['$compileProvider', function($compileProvider) {
- $compileProvider.debugInfoEnabled(true);
- }]);
- }
-
- modules.unshift('ng');
- var injector = createInjector(modules, config.strictDi);
- injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
- function bootstrapApply(scope, element, compile, injector) {
- scope.$apply(function() {
- element.data('$injector', injector);
- compile(element)(scope);
- });
- }]
- );
- return injector;
- };
-
- var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
- var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
-
- if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {
- config.debugInfoEnabled = true;
- window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');
- }
-
- if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
- return doBootstrap();
- }
-
- window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
- angular.resumeBootstrap = function(extraModules) {
- forEach(extraModules, function(module) {
- modules.push(module);
- });
- return doBootstrap();
- };
-
- if (isFunction(angular.resumeDeferredBootstrap)) {
- angular.resumeDeferredBootstrap();
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.reloadWithDebugInfo
- * @module ng
- * @description
- * Use this function to reload the current application with debug information turned on.
- * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.
- *
- * See {@link ng.$compileProvider#debugInfoEnabled} for more.
- */
-function reloadWithDebugInfo() {
- window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;
- window.location.reload();
-}
-
-/**
- * @name angular.getTestability
- * @module ng
- * @description
- * Get the testability service for the instance of Angular on the given
- * element.
- * @param {DOMElement} element DOM element which is the root of angular application.
- */
-function getTestability(rootElement) {
- var injector = angular.element(rootElement).injector();
- if (!injector) {
- throw ngMinErr('test',
- 'no injector found for element argument to getTestability');
- }
- return injector.get('$$testability');
-}
-
-var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator) {
- separator = separator || '_';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
-}
-
-var bindJQueryFired = false;
-var skipDestroyOnNextJQueryCleanData;
-function bindJQuery() {
- var originalCleanData;
-
- if (bindJQueryFired) {
- return;
- }
-
- // bind to jQuery if present;
- var jqName = jq();
- jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)
- !jqName ? undefined : // use jqLite
- window[jqName]; // use jQuery specified by `ngJq`
-
- // Use jQuery if it exists with proper functionality, otherwise default to us.
- // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.
- // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older
- // versions. It will not work for sure with jQuery <1.7, though.
- if (jQuery && jQuery.fn.on) {
- jqLite = jQuery;
- extend(jQuery.fn, {
- scope: JQLitePrototype.scope,
- isolateScope: JQLitePrototype.isolateScope,
- controller: JQLitePrototype.controller,
- injector: JQLitePrototype.injector,
- inheritedData: JQLitePrototype.inheritedData
- });
-
- // All nodes removed from the DOM via various jQuery APIs like .remove()
- // are passed through jQuery.cleanData. Monkey-patch this method to fire
- // the $destroy event on all removed nodes.
- originalCleanData = jQuery.cleanData;
- jQuery.cleanData = function(elems) {
- var events;
- if (!skipDestroyOnNextJQueryCleanData) {
- for (var i = 0, elem; (elem = elems[i]) != null; i++) {
- events = jQuery._data(elem, "events");
- if (events && events.$destroy) {
- jQuery(elem).triggerHandler('$destroy');
- }
- }
- } else {
- skipDestroyOnNextJQueryCleanData = false;
- }
- originalCleanData(elems);
- };
- } else {
- jqLite = JQLite;
- }
-
- angular.element = jqLite;
-
- // Prevent double-proxying.
- bindJQueryFired = true;
-}
-
-/**
- * throw error if the argument is falsy.
- */
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
- }
- return arg;
-}
-
-function assertArgFn(arg, name, acceptArrayAnnotation) {
- if (acceptArrayAnnotation && isArray(arg)) {
- arg = arg[arg.length - 1];
- }
-
- assertArg(isFunction(arg), name, 'not a function, got ' +
- (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
- return arg;
-}
-
-/**
- * throw error if the name given is hasOwnProperty
- * @param {String} name the name to test
- * @param {String} context the context in which the name is used, such as module or directive
- */
-function assertNotHasOwnProperty(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
- }
-}
-
-/**
- * Return the value accessible from the object by path. Any undefined traversals are ignored
- * @param {Object} obj starting object
- * @param {String} path path to traverse
- * @param {boolean} [bindFnToScope=true]
- * @returns {Object} value as accessible by path
- */
-//TODO(misko): this function needs to be removed
-function getter(obj, path, bindFnToScope) {
- if (!path) return obj;
- var keys = path.split('.');
- var key;
- var lastInstance = obj;
- var len = keys.length;
-
- for (var i = 0; i < len; i++) {
- key = keys[i];
- if (obj) {
- obj = (lastInstance = obj)[key];
- }
- }
- if (!bindFnToScope && isFunction(obj)) {
- return bind(lastInstance, obj);
- }
- return obj;
-}
-
-/**
- * Return the DOM siblings between the first and last node in the given array.
- * @param {Array} array like object
- * @returns {Array} the inputted object or a jqLite collection containing the nodes
- */
-function getBlockNodes(nodes) {
- // TODO(perf): update `nodes` instead of creating a new object?
- var node = nodes[0];
- var endNode = nodes[nodes.length - 1];
- var blockNodes;
-
- for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {
- if (blockNodes || nodes[i] !== node) {
- if (!blockNodes) {
- blockNodes = jqLite(slice.call(nodes, 0, i));
- }
- blockNodes.push(node);
- }
- }
-
- return blockNodes || nodes;
-}
-
-
-/**
- * Creates a new object without a prototype. This object is useful for lookup without having to
- * guard against prototypically inherited properties via hasOwnProperty.
- *
- * Related micro-benchmarks:
- * - http://jsperf.com/object-create2
- * - http://jsperf.com/proto-map-lookup/2
- * - http://jsperf.com/for-in-vs-object-keys2
- *
- * @returns {Object}
- */
-function createMap() {
- return Object.create(null);
-}
-
-var NODE_TYPE_ELEMENT = 1;
-var NODE_TYPE_ATTRIBUTE = 2;
-var NODE_TYPE_TEXT = 3;
-var NODE_TYPE_COMMENT = 8;
-var NODE_TYPE_DOCUMENT = 9;
-var NODE_TYPE_DOCUMENT_FRAGMENT = 11;
-
-/**
- * @ngdoc type
- * @name angular.Module
- * @module ng
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- var $injectorMinErr = minErr('$injector');
- var ngMinErr = minErr('ng');
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- var angular = ensure(window, 'angular', Object);
-
- // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
- angular.$$minErr = angular.$$minErr || minErr;
-
- return ensure(angular, 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @module ng
- * @description
- *
- * The `angular.module` is a global place for creating, registering and retrieving Angular
- * modules.
- * All modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- * Passing one argument retrieves an existing {@link angular.Module},
- * whereas passing more than one argument creates a new {@link angular.Module}
- *
- *
- * # Module
- *
- * A module is a collection of services, directives, controllers, filters, and configuration information.
- * `angular.module` is used to configure the {@link auto.$injector $injector}.
- *
- * ```js
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(['$locationProvider', function($locationProvider) {
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * }]);
- * ```
- *
- * Then you can create an injector and load your modules like this:
- *
- * ```js
- * var injector = angular.injector(['ng', 'myModule'])
- * ```
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {!Array.<string>=} requires If specified then new module is being created. If
- * unspecified then the module is being retrieved for further configuration.
- * @param {Function=} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- var assertNotHasOwnProperty = function(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
- }
- };
-
- assertNotHasOwnProperty(name, 'module');
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
- "the module name or forgot to load it. If registering a module ensure that you " +
- "specify the dependencies as the second argument.", name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var configBlocks = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke', 'push', configBlocks);
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _configBlocks: configBlocks,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @module ng
- *
- * @description
- * Holds the list of modules which the injector will load before the current module is
- * loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @module ng
- *
- * @description
- * Name of the module.
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @module ng
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the
- * service.
- * @description
- * See {@link auto.$provide#provider $provide.provider()}.
- */
- provider: invokeLaterAndSetModuleName('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @module ng
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link auto.$provide#factory $provide.factory()}.
- */
- factory: invokeLaterAndSetModuleName('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @module ng
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link auto.$provide#service $provide.service()}.
- */
- service: invokeLaterAndSetModuleName('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @module ng
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link auto.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @module ng
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constants are fixed, they get applied before other provide methods.
- * See {@link auto.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#decorator
- * @module ng
- * @param {string} The name of the service to decorate.
- * @param {Function} This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance.
- * @description
- * See {@link auto.$provide#decorator $provide.decorator()}.
- */
- decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),
-
- /**
- * @ngdoc method
- * @name angular.Module#animation
- * @module ng
- * @param {string} name animation name
- * @param {Function} animationFactory Factory function for creating new instance of an
- * animation.
- * @description
- *
- * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
- *
- *
- * Defines an animation hook that can be later used with
- * {@link $animate $animate} service and directives that use this service.
- *
- * ```js
- * module.animation('.animation-name', function($inject1, $inject2) {
- * return {
- * eventName : function(element, done) {
- * //code to run the animation
- * //once complete, then run done()
- * return function cancellationFunction(element) {
- * //code to cancel the animation
- * }
- * }
- * }
- * })
- * ```
- *
- * See {@link ng.$animateProvider#register $animateProvider.register()} and
- * {@link ngAnimate ngAnimate module} for more information.
- */
- animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @module ng
- * @param {string} name Filter name - this must be a valid angular expression identifier
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- */
- filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @module ng
- * @param {string|Object} name Controller name, or an object map of controllers where the
- * keys are the names and the values are the constructors.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @module ng
- * @param {string|Object} name Directive name, or an object map of directives where the
- * keys are the names and the values are the factories.
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @module ng
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- * For more about how to configure services, see
- * {@link providers#provider-recipe Provider Recipe}.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @module ng
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod, queue) {
- if (!queue) queue = invokeQueue;
- return function() {
- queue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- };
- }
-
- /**
- * @param {string} provider
- * @param {string} method
- * @returns {angular.Module}
- */
- function invokeLaterAndSetModuleName(provider, method) {
- return function(recipeName, factoryFunction) {
- if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;
- invokeQueue.push([provider, method, arguments]);
- return moduleInstance;
- };
- }
- });
- };
- });
-
-}
-
-/* global: toDebugString: true */
-
-function serializeObject(obj) {
- var seen = [];
-
- return JSON.stringify(obj, function(key, val) {
- val = toJsonReplacer(key, val);
- if (isObject(val)) {
-
- if (seen.indexOf(val) >= 0) return '...';
-
- seen.push(val);
- }
- return val;
- });
-}
-
-function toDebugString(obj) {
- if (typeof obj === 'function') {
- return obj.toString().replace(/ \{[\s\S]*$/, '');
- } else if (isUndefined(obj)) {
- return 'undefined';
- } else if (typeof obj !== 'string') {
- return serializeObject(obj);
- }
- return obj;
-}
-
-/* global angularModule: true,
- version: true,
-
- $CompileProvider,
-
- htmlAnchorDirective,
- inputDirective,
- inputDirective,
- formDirective,
- scriptDirective,
- selectDirective,
- styleDirective,
- optionDirective,
- ngBindDirective,
- ngBindHtmlDirective,
- ngBindTemplateDirective,
- ngClassDirective,
- ngClassEvenDirective,
- ngClassOddDirective,
- ngCloakDirective,
- ngControllerDirective,
- ngFormDirective,
- ngHideDirective,
- ngIfDirective,
- ngIncludeDirective,
- ngIncludeFillContentDirective,
- ngInitDirective,
- ngNonBindableDirective,
- ngPluralizeDirective,
- ngRepeatDirective,
- ngShowDirective,
- ngStyleDirective,
- ngSwitchDirective,
- ngSwitchWhenDirective,
- ngSwitchDefaultDirective,
- ngOptionsDirective,
- ngTranscludeDirective,
- ngModelDirective,
- ngListDirective,
- ngChangeDirective,
- patternDirective,
- patternDirective,
- requiredDirective,
- requiredDirective,
- minlengthDirective,
- minlengthDirective,
- maxlengthDirective,
- maxlengthDirective,
- ngValueDirective,
- ngModelOptionsDirective,
- ngAttributeAliasDirectives,
- ngEventDirectives,
-
- $AnchorScrollProvider,
- $AnimateProvider,
- $CoreAnimateCssProvider,
- $$CoreAnimateQueueProvider,
- $$CoreAnimateRunnerProvider,
- $BrowserProvider,
- $CacheFactoryProvider,
- $ControllerProvider,
- $DocumentProvider,
- $ExceptionHandlerProvider,
- $FilterProvider,
- $$ForceReflowProvider,
- $InterpolateProvider,
- $IntervalProvider,
- $$HashMapProvider,
- $HttpProvider,
- $HttpParamSerializerProvider,
- $HttpParamSerializerJQLikeProvider,
- $HttpBackendProvider,
- $xhrFactoryProvider,
- $LocationProvider,
- $LogProvider,
- $ParseProvider,
- $RootScopeProvider,
- $QProvider,
- $$QProvider,
- $$SanitizeUriProvider,
- $SceProvider,
- $SceDelegateProvider,
- $SnifferProvider,
- $TemplateCacheProvider,
- $TemplateRequestProvider,
- $$TestabilityProvider,
- $TimeoutProvider,
- $$RAFProvider,
- $WindowProvider,
- $$jqLiteProvider,
- $$CookieReaderProvider
-*/
-
-
-/**
- * @ngdoc object
- * @name angular.version
- * @module ng
- * @description
- * An object that contains information about the current AngularJS version.
- *
- * This object has the following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
- full: '1.4.8', // all of these placeholder strings will be replaced by grunt's
- major: 1, // package task
- minor: 4,
- dot: 8,
- codeName: 'ice-manipulation'
-};
-
-
-function publishExternalAPI(angular) {
- extend(angular, {
- 'bootstrap': bootstrap,
- 'copy': copy,
- 'extend': extend,
- 'merge': merge,
- 'equals': equals,
- 'element': jqLite,
- 'forEach': forEach,
- 'injector': createInjector,
- 'noop': noop,
- 'bind': bind,
- 'toJson': toJson,
- 'fromJson': fromJson,
- 'identity': identity,
- 'isUndefined': isUndefined,
- 'isDefined': isDefined,
- 'isString': isString,
- 'isFunction': isFunction,
- 'isObject': isObject,
- 'isNumber': isNumber,
- 'isElement': isElement,
- 'isArray': isArray,
- 'version': version,
- 'isDate': isDate,
- 'lowercase': lowercase,
- 'uppercase': uppercase,
- 'callbacks': {counter: 0},
- 'getTestability': getTestability,
- '$$minErr': minErr,
- '$$csp': csp,
- 'reloadWithDebugInfo': reloadWithDebugInfo
- });
-
- angularModule = setupModuleLoader(window);
-
- angularModule('ng', ['ngLocale'], ['$provide',
- function ngModule($provide) {
- // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
- $provide.provider({
- $$sanitizeUri: $$SanitizeUriProvider
- });
- $provide.provider('$compile', $CompileProvider).
- directive({
- a: htmlAnchorDirective,
- input: inputDirective,
- textarea: inputDirective,
- form: formDirective,
- script: scriptDirective,
- select: selectDirective,
- style: styleDirective,
- option: optionDirective,
- ngBind: ngBindDirective,
- ngBindHtml: ngBindHtmlDirective,
- ngBindTemplate: ngBindTemplateDirective,
- ngClass: ngClassDirective,
- ngClassEven: ngClassEvenDirective,
- ngClassOdd: ngClassOddDirective,
- ngCloak: ngCloakDirective,
- ngController: ngControllerDirective,
- ngForm: ngFormDirective,
- ngHide: ngHideDirective,
- ngIf: ngIfDirective,
- ngInclude: ngIncludeDirective,
- ngInit: ngInitDirective,
- ngNonBindable: ngNonBindableDirective,
- ngPluralize: ngPluralizeDirective,
- ngRepeat: ngRepeatDirective,
- ngShow: ngShowDirective,
- ngStyle: ngStyleDirective,
- ngSwitch: ngSwitchDirective,
- ngSwitchWhen: ngSwitchWhenDirective,
- ngSwitchDefault: ngSwitchDefaultDirective,
- ngOptions: ngOptionsDirective,
- ngTransclude: ngTranscludeDirective,
- ngModel: ngModelDirective,
- ngList: ngListDirective,
- ngChange: ngChangeDirective,
- pattern: patternDirective,
- ngPattern: patternDirective,
- required: requiredDirective,
- ngRequired: requiredDirective,
- minlength: minlengthDirective,
- ngMinlength: minlengthDirective,
- maxlength: maxlengthDirective,
- ngMaxlength: maxlengthDirective,
- ngValue: ngValueDirective,
- ngModelOptions: ngModelOptionsDirective
- }).
- directive({
- ngInclude: ngIncludeFillContentDirective
- }).
- directive(ngAttributeAliasDirectives).
- directive(ngEventDirectives);
- $provide.provider({
- $anchorScroll: $AnchorScrollProvider,
- $animate: $AnimateProvider,
- $animateCss: $CoreAnimateCssProvider,
- $$animateQueue: $$CoreAnimateQueueProvider,
- $$AnimateRunner: $$CoreAnimateRunnerProvider,
- $browser: $BrowserProvider,
- $cacheFactory: $CacheFactoryProvider,
- $controller: $ControllerProvider,
- $document: $DocumentProvider,
- $exceptionHandler: $ExceptionHandlerProvider,
- $filter: $FilterProvider,
- $$forceReflow: $$ForceReflowProvider,
- $interpolate: $InterpolateProvider,
- $interval: $IntervalProvider,
- $http: $HttpProvider,
- $httpParamSerializer: $HttpParamSerializerProvider,
- $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
- $httpBackend: $HttpBackendProvider,
- $xhrFactory: $xhrFactoryProvider,
- $location: $LocationProvider,
- $log: $LogProvider,
- $parse: $ParseProvider,
- $rootScope: $RootScopeProvider,
- $q: $QProvider,
- $$q: $$QProvider,
- $sce: $SceProvider,
- $sceDelegate: $SceDelegateProvider,
- $sniffer: $SnifferProvider,
- $templateCache: $TemplateCacheProvider,
- $templateRequest: $TemplateRequestProvider,
- $$testability: $$TestabilityProvider,
- $timeout: $TimeoutProvider,
- $window: $WindowProvider,
- $$rAF: $$RAFProvider,
- $$jqLite: $$jqLiteProvider,
- $$HashMap: $$HashMapProvider,
- $$cookieReader: $$CookieReaderProvider
- });
- }
- ]);
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* global JQLitePrototype: true,
- addEventListenerFn: true,
- removeEventListenerFn: true,
- BOOLEAN_ATTR: true,
- ALIASED_ATTR: true,
-*/
-
-//////////////////////////////////
-//JQLite
-//////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.element
- * @module ng
- * @kind function
- *
- * @description
- * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
- *
- * If jQuery is available, `angular.element` is an alias for the
- * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
- * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
- *
- * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
- * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
- * commonly needed functionality with the goal of having a very small footprint.</div>
- *
- * To use `jQuery`, simply ensure it is loaded before the `angular.js` file.
- *
- * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
- * jqLite; they are never raw DOM references.</div>
- *
- * ## Angular's jqLite
- * jqLite provides only the following jQuery methods:
- *
- * - [`addClass()`](http://api.jquery.com/addClass/)
- * - [`after()`](http://api.jquery.com/after/)
- * - [`append()`](http://api.jquery.com/append/)
- * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
- * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData
- * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
- * - [`clone()`](http://api.jquery.com/clone/)
- * - [`contents()`](http://api.jquery.com/contents/)
- * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. As a setter, does not convert numbers to strings or append 'px'.
- * - [`data()`](http://api.jquery.com/data/)
- * - [`detach()`](http://api.jquery.com/detach/)
- * - [`empty()`](http://api.jquery.com/empty/)
- * - [`eq()`](http://api.jquery.com/eq/)
- * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
- * - [`hasClass()`](http://api.jquery.com/hasClass/)
- * - [`html()`](http://api.jquery.com/html/)
- * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
- * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
- * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter
- * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
- * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
- * - [`prepend()`](http://api.jquery.com/prepend/)
- * - [`prop()`](http://api.jquery.com/prop/)
- * - [`ready()`](http://api.jquery.com/ready/)
- * - [`remove()`](http://api.jquery.com/remove/)
- * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/)
- * - [`removeData()`](http://api.jquery.com/removeData/)
- * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
- * - [`text()`](http://api.jquery.com/text/)
- * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
- * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
- * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces or event object as parameter
- * - [`val()`](http://api.jquery.com/val/)
- * - [`wrap()`](http://api.jquery.com/wrap/)
- *
- * ## jQuery/jqLite Extras
- * Angular also provides the following additional methods and events to both jQuery and jqLite:
- *
- * ### Events
- * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
- * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM
- * element before it is removed.
- *
- * ### Methods
- * - `controller(name)` - retrieves the controller of the current element or its parent. By default
- * retrieves controller associated with the `ngController` directive. If `name` is provided as
- * camelCase directive name, then the controller for this directive will be retrieved (e.g.
- * `'ngModel'`).
- * - `injector()` - retrieves the injector of the current element or its parent.
- * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current
- * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to
- * be enabled.
- * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the
- * current element. This getter should be used only on elements that contain a directive which starts a new isolate
- * scope. Calling `scope()` on this element always returns the original non-isolate scope.
- * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.
- * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
- * parent element is reached.
- *
- * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
- * @returns {Object} jQuery object.
- */
-
-JQLite.expando = 'ng339';
-
-var jqCache = JQLite.cache = {},
- jqId = 1,
- addEventListenerFn = function(element, type, fn) {
- element.addEventListener(type, fn, false);
- },
- removeEventListenerFn = function(element, type, fn) {
- element.removeEventListener(type, fn, false);
- };
-
-/*
- * !!! This is an undocumented "private" function !!!
- */
-JQLite._data = function(node) {
- //jQuery always returns an object on cache miss
- return this.cache[node[this.expando]] || {};
-};
-
-function jqNextId() { return ++jqId; }
-
-
-var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-var MOZ_HACK_REGEXP = /^moz([A-Z])/;
-var MOUSE_EVENT_MAP= { mouseleave: "mouseout", mouseenter: "mouseover"};
-var jqLiteMinErr = minErr('jqLite');
-
-/**
- * Converts snake_case to camelCase.
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function camelCase(name) {
- return name.
- replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
- return offset ? letter.toUpperCase() : letter;
- }).
- replace(MOZ_HACK_REGEXP, 'Moz$1');
-}
-
-var SINGLE_TAG_REGEXP = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/;
-var HTML_REGEXP = /<|&#?\w+;/;
-var TAG_NAME_REGEXP = /<([\w:-]+)/;
-var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi;
-
-var wrapMap = {
- 'option': [1, '<select multiple="multiple">', '</select>'],
-
- 'thead': [1, '<table>', '</table>'],
- 'col': [2, '<table><colgroup>', '</colgroup></table>'],
- 'tr': [2, '<table><tbody>', '</tbody></table>'],
- 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
- '_default': [0, "", ""]
-};
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function jqLiteIsTextNode(html) {
- return !HTML_REGEXP.test(html);
-}
-
-function jqLiteAcceptsData(node) {
- // The window object can accept data but has no nodeType
- // Otherwise we are only interested in elements (1) and documents (9)
- var nodeType = node.nodeType;
- return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;
-}
-
-function jqLiteHasData(node) {
- for (var key in jqCache[node.ng339]) {
- return true;
- }
- return false;
-}
-
-function jqLiteBuildFragment(html, context) {
- var tmp, tag, wrap,
- fragment = context.createDocumentFragment(),
- nodes = [], i;
-
- if (jqLiteIsTextNode(html)) {
- // Convert non-html into a text node
- nodes.push(context.createTextNode(html));
- } else {
- // Convert html into DOM nodes
- tmp = tmp || fragment.appendChild(context.createElement("div"));
- tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
- wrap = wrapMap[tag] || wrapMap._default;
- tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
-
- // Descend through wrappers to the right content
- i = wrap[0];
- while (i--) {
- tmp = tmp.lastChild;
- }
-
- nodes = concat(nodes, tmp.childNodes);
-
- tmp = fragment.firstChild;
- tmp.textContent = "";
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
- fragment.innerHTML = ""; // Clear inner HTML
- forEach(nodes, function(node) {
- fragment.appendChild(node);
- });
-
- return fragment;
-}
-
-function jqLiteParseHTML(html, context) {
- context = context || document;
- var parsed;
-
- if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
- return [context.createElement(parsed[1])];
- }
-
- if ((parsed = jqLiteBuildFragment(html, context))) {
- return parsed.childNodes;
- }
-
- return [];
-}
-
-
-// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
-var jqLiteContains = Node.prototype.contains || function(arg) {
- // jshint bitwise: false
- return !!(this.compareDocumentPosition(arg) & 16);
- // jshint bitwise: true
-};
-
-/////////////////////////////////////////////
-function JQLite(element) {
- if (element instanceof JQLite) {
- return element;
- }
-
- var argIsString;
-
- if (isString(element)) {
- element = trim(element);
- argIsString = true;
- }
- if (!(this instanceof JQLite)) {
- if (argIsString && element.charAt(0) != '<') {
- throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
- }
- return new JQLite(element);
- }
-
- if (argIsString) {
- jqLiteAddNodes(this, jqLiteParseHTML(element));
- } else {
- jqLiteAddNodes(this, element);
- }
-}
-
-function jqLiteClone(element) {
- return element.cloneNode(true);
-}
-
-function jqLiteDealoc(element, onlyDescendants) {
- if (!onlyDescendants) jqLiteRemoveData(element);
-
- if (element.querySelectorAll) {
- var descendants = element.querySelectorAll('*');
- for (var i = 0, l = descendants.length; i < l; i++) {
- jqLiteRemoveData(descendants[i]);
- }
- }
-}
-
-function jqLiteOff(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
-
- var expandoStore = jqLiteExpandoStore(element);
- var events = expandoStore && expandoStore.events;
- var handle = expandoStore && expandoStore.handle;
-
- if (!handle) return; //no listeners registered
-
- if (!type) {
- for (type in events) {
- if (type !== '$destroy') {
- removeEventListenerFn(element, type, handle);
- }
- delete events[type];
- }
- } else {
-
- var removeHandler = function(type) {
- var listenerFns = events[type];
- if (isDefined(fn)) {
- arrayRemove(listenerFns || [], fn);
- }
- if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {
- removeEventListenerFn(element, type, handle);
- delete events[type];
- }
- };
-
- forEach(type.split(' '), function(type) {
- removeHandler(type);
- if (MOUSE_EVENT_MAP[type]) {
- removeHandler(MOUSE_EVENT_MAP[type]);
- }
- });
- }
-}
-
-function jqLiteRemoveData(element, name) {
- var expandoId = element.ng339;
- var expandoStore = expandoId && jqCache[expandoId];
-
- if (expandoStore) {
- if (name) {
- delete expandoStore.data[name];
- return;
- }
-
- if (expandoStore.handle) {
- if (expandoStore.events.$destroy) {
- expandoStore.handle({}, '$destroy');
- }
- jqLiteOff(element);
- }
- delete jqCache[expandoId];
- element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
- }
-}
-
-
-function jqLiteExpandoStore(element, createIfNecessary) {
- var expandoId = element.ng339,
- expandoStore = expandoId && jqCache[expandoId];
-
- if (createIfNecessary && !expandoStore) {
- element.ng339 = expandoId = jqNextId();
- expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};
- }
-
- return expandoStore;
-}
-
-
-function jqLiteData(element, key, value) {
- if (jqLiteAcceptsData(element)) {
-
- var isSimpleSetter = isDefined(value);
- var isSimpleGetter = !isSimpleSetter && key && !isObject(key);
- var massGetter = !key;
- var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);
- var data = expandoStore && expandoStore.data;
-
- if (isSimpleSetter) { // data('key', value)
- data[key] = value;
- } else {
- if (massGetter) { // data()
- return data;
- } else {
- if (isSimpleGetter) { // data('key')
- // don't force creation of expandoStore if it doesn't exist yet
- return data && data[key];
- } else { // mass-setter: data({key1: val1, key2: val2})
- extend(data, key);
- }
- }
- }
- }
-}
-
-function jqLiteHasClass(element, selector) {
- if (!element.getAttribute) return false;
- return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
- indexOf(" " + selector + " ") > -1);
-}
-
-function jqLiteRemoveClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- forEach(cssClasses.split(' '), function(cssClass) {
- element.setAttribute('class', trim(
- (" " + (element.getAttribute('class') || '') + " ")
- .replace(/[\n\t]/g, " ")
- .replace(" " + trim(cssClass) + " ", " "))
- );
- });
- }
-}
-
-function jqLiteAddClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
- .replace(/[\n\t]/g, " ");
-
- forEach(cssClasses.split(' '), function(cssClass) {
- cssClass = trim(cssClass);
- if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
- existingClasses += cssClass + ' ';
- }
- });
-
- element.setAttribute('class', trim(existingClasses));
- }
-}
-
-
-function jqLiteAddNodes(root, elements) {
- // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
-
- if (elements) {
-
- // if a Node (the most common case)
- if (elements.nodeType) {
- root[root.length++] = elements;
- } else {
- var length = elements.length;
-
- // if an Array or NodeList and not a Window
- if (typeof length === 'number' && elements.window !== elements) {
- if (length) {
- for (var i = 0; i < length; i++) {
- root[root.length++] = elements[i];
- }
- }
- } else {
- root[root.length++] = elements;
- }
- }
- }
-}
-
-
-function jqLiteController(element, name) {
- return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');
-}
-
-function jqLiteInheritedData(element, name, value) {
- // if element is the document object work with the html element instead
- // this makes $(document).scope() possible
- if (element.nodeType == NODE_TYPE_DOCUMENT) {
- element = element.documentElement;
- }
- var names = isArray(name) ? name : [name];
-
- while (element) {
- for (var i = 0, ii = names.length; i < ii; i++) {
- if (isDefined(value = jqLite.data(element, names[i]))) return value;
- }
-
- // If dealing with a document fragment node with a host element, and no parent, use the host
- // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
- // to lookup parent controllers.
- element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
- }
-}
-
-function jqLiteEmpty(element) {
- jqLiteDealoc(element, true);
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
-}
-
-function jqLiteRemove(element, keepData) {
- if (!keepData) jqLiteDealoc(element);
- var parent = element.parentNode;
- if (parent) parent.removeChild(element);
-}
-
-
-function jqLiteDocumentLoaded(action, win) {
- win = win || window;
- if (win.document.readyState === 'complete') {
- // Force the action to be run async for consistent behaviour
- // from the action's point of view
- // i.e. it will definitely not be in a $apply
- win.setTimeout(action);
- } else {
- // No need to unbind this handler as load is only ever called once
- jqLite(win).on('load', action);
- }
-}
-
-//////////////////////////////////////////
-// Functions which are declared directly.
-//////////////////////////////////////////
-var JQLitePrototype = JQLite.prototype = {
- ready: function(fn) {
- var fired = false;
-
- function trigger() {
- if (fired) return;
- fired = true;
- fn();
- }
-
- // check if document is already loaded
- if (document.readyState === 'complete') {
- setTimeout(trigger);
- } else {
- this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
- // we can not use jqLite since we are not done loading and jQuery could be loaded later.
- // jshint -W064
- JQLite(window).on('load', trigger); // fallback to window.onload for others
- // jshint +W064
- }
- },
- toString: function() {
- var value = [];
- forEach(this, function(e) { value.push('' + e);});
- return '[' + value.join(', ') + ']';
- },
-
- eq: function(index) {
- return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
- },
-
- length: 0,
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-//////////////////////////////////////////
-// Functions iterating getter/setters.
-// these functions return self on setter and
-// value on get.
-//////////////////////////////////////////
-var BOOLEAN_ATTR = {};
-forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
- BOOLEAN_ATTR[lowercase(value)] = value;
-});
-var BOOLEAN_ELEMENTS = {};
-forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
- BOOLEAN_ELEMENTS[value] = true;
-});
-var ALIASED_ATTR = {
- 'ngMinlength': 'minlength',
- 'ngMaxlength': 'maxlength',
- 'ngMin': 'min',
- 'ngMax': 'max',
- 'ngPattern': 'pattern'
-};
-
-function getBooleanAttrName(element, name) {
- // check dom last since we will most likely fail on name
- var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
-
- // booleanAttr is here twice to minimize DOM access
- return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;
-}
-
-function getAliasedAttrName(name) {
- return ALIASED_ATTR[name];
-}
-
-forEach({
- data: jqLiteData,
- removeData: jqLiteRemoveData,
- hasData: jqLiteHasData
-}, function(fn, name) {
- JQLite[name] = fn;
-});
-
-forEach({
- data: jqLiteData,
- inheritedData: jqLiteInheritedData,
-
- scope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
- },
-
- isolateScope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
- },
-
- controller: jqLiteController,
-
- injector: function(element) {
- return jqLiteInheritedData(element, '$injector');
- },
-
- removeAttr: function(element, name) {
- element.removeAttribute(name);
- },
-
- hasClass: jqLiteHasClass,
-
- css: function(element, name, value) {
- name = camelCase(name);
-
- if (isDefined(value)) {
- element.style[name] = value;
- } else {
- return element.style[name];
- }
- },
-
- attr: function(element, name, value) {
- var nodeType = element.nodeType;
- if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {
- return;
- }
- var lowercasedName = lowercase(name);
- if (BOOLEAN_ATTR[lowercasedName]) {
- if (isDefined(value)) {
- if (!!value) {
- element[name] = true;
- element.setAttribute(name, lowercasedName);
- } else {
- element[name] = false;
- element.removeAttribute(lowercasedName);
- }
- } else {
- return (element[name] ||
- (element.attributes.getNamedItem(name) || noop).specified)
- ? lowercasedName
- : undefined;
- }
- } else if (isDefined(value)) {
- element.setAttribute(name, value);
- } else if (element.getAttribute) {
- // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
- // some elements (e.g. Document) don't have get attribute, so return undefined
- var ret = element.getAttribute(name, 2);
- // normalize non-existing attributes to undefined (as jQuery)
- return ret === null ? undefined : ret;
- }
- },
-
- prop: function(element, name, value) {
- if (isDefined(value)) {
- element[name] = value;
- } else {
- return element[name];
- }
- },
-
- text: (function() {
- getText.$dv = '';
- return getText;
-
- function getText(element, value) {
- if (isUndefined(value)) {
- var nodeType = element.nodeType;
- return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';
- }
- element.textContent = value;
- }
- })(),
-
- val: function(element, value) {
- if (isUndefined(value)) {
- if (element.multiple && nodeName_(element) === 'select') {
- var result = [];
- forEach(element.options, function(option) {
- if (option.selected) {
- result.push(option.value || option.text);
- }
- });
- return result.length === 0 ? null : result;
- }
- return element.value;
- }
- element.value = value;
- },
-
- html: function(element, value) {
- if (isUndefined(value)) {
- return element.innerHTML;
- }
- jqLiteDealoc(element, true);
- element.innerHTML = value;
- },
-
- empty: jqLiteEmpty
-}, function(fn, name) {
- /**
- * Properties: writes return selection, reads return first value
- */
- JQLite.prototype[name] = function(arg1, arg2) {
- var i, key;
- var nodeCount = this.length;
-
- // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
- // in a way that survives minification.
- // jqLiteEmpty takes no arguments but is a setter.
- if (fn !== jqLiteEmpty &&
- (isUndefined((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {
- if (isObject(arg1)) {
-
- // we are a write, but the object properties are the key/values
- for (i = 0; i < nodeCount; i++) {
- if (fn === jqLiteData) {
- // data() takes the whole object in jQuery
- fn(this[i], arg1);
- } else {
- for (key in arg1) {
- fn(this[i], key, arg1[key]);
- }
- }
- }
- // return self for chaining
- return this;
- } else {
- // we are a read, so read the first child.
- // TODO: do we still need this?
- var value = fn.$dv;
- // Only if we have $dv do we iterate over all, otherwise it is just the first element.
- var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;
- for (var j = 0; j < jj; j++) {
- var nodeValue = fn(this[j], arg1, arg2);
- value = value ? value + nodeValue : nodeValue;
- }
- return value;
- }
- } else {
- // we are a write, so apply to all children
- for (i = 0; i < nodeCount; i++) {
- fn(this[i], arg1, arg2);
- }
- // return self for chaining
- return this;
- }
- };
-});
-
-function createEventHandler(element, events) {
- var eventHandler = function(event, type) {
- // jQuery specific api
- event.isDefaultPrevented = function() {
- return event.defaultPrevented;
- };
-
- var eventFns = events[type || event.type];
- var eventFnsLength = eventFns ? eventFns.length : 0;
-
- if (!eventFnsLength) return;
-
- if (isUndefined(event.immediatePropagationStopped)) {
- var originalStopImmediatePropagation = event.stopImmediatePropagation;
- event.stopImmediatePropagation = function() {
- event.immediatePropagationStopped = true;
-
- if (event.stopPropagation) {
- event.stopPropagation();
- }
-
- if (originalStopImmediatePropagation) {
- originalStopImmediatePropagation.call(event);
- }
- };
- }
-
- event.isImmediatePropagationStopped = function() {
- return event.immediatePropagationStopped === true;
- };
-
- // Some events have special handlers that wrap the real handler
- var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;
-
- // Copy event handlers in case event handlers array is modified during execution.
- if ((eventFnsLength > 1)) {
- eventFns = shallowCopy(eventFns);
- }
-
- for (var i = 0; i < eventFnsLength; i++) {
- if (!event.isImmediatePropagationStopped()) {
- handlerWrapper(element, event, eventFns[i]);
- }
- }
- };
-
- // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all
- // events on `element`
- eventHandler.elem = element;
- return eventHandler;
-}
-
-function defaultHandlerWrapper(element, event, handler) {
- handler.call(element, event);
-}
-
-function specialMouseHandlerWrapper(target, event, handler) {
- // Refer to jQuery's implementation of mouseenter & mouseleave
- // Read about mouseenter and mouseleave:
- // http://www.quirksmode.org/js/events_mouse.html#link8
- var related = event.relatedTarget;
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if (!related || (related !== target && !jqLiteContains.call(target, related))) {
- handler.call(target, event);
- }
-}
-
-//////////////////////////////////////////
-// Functions iterating traversal.
-// These functions chain results into a single
-// selector.
-//////////////////////////////////////////
-forEach({
- removeData: jqLiteRemoveData,
-
- on: function jqLiteOn(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
-
- // Do not add event handlers to non-elements because they will not be cleaned up.
- if (!jqLiteAcceptsData(element)) {
- return;
- }
-
- var expandoStore = jqLiteExpandoStore(element, true);
- var events = expandoStore.events;
- var handle = expandoStore.handle;
-
- if (!handle) {
- handle = expandoStore.handle = createEventHandler(element, events);
- }
-
- // http://jsperf.com/string-indexof-vs-split
- var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];
- var i = types.length;
-
- var addHandler = function(type, specialHandlerWrapper, noEventListener) {
- var eventFns = events[type];
-
- if (!eventFns) {
- eventFns = events[type] = [];
- eventFns.specialHandlerWrapper = specialHandlerWrapper;
- if (type !== '$destroy' && !noEventListener) {
- addEventListenerFn(element, type, handle);
- }
- }
-
- eventFns.push(fn);
- };
-
- while (i--) {
- type = types[i];
- if (MOUSE_EVENT_MAP[type]) {
- addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);
- addHandler(type, undefined, true);
- } else {
- addHandler(type);
- }
- }
- },
-
- off: jqLiteOff,
-
- one: function(element, type, fn) {
- element = jqLite(element);
-
- //add the listener twice so that when it is called
- //you can remove the original function and still be
- //able to call element.off(ev, fn) normally
- element.on(type, function onFn() {
- element.off(type, fn);
- element.off(type, onFn);
- });
- element.on(type, fn);
- },
-
- replaceWith: function(element, replaceNode) {
- var index, parent = element.parentNode;
- jqLiteDealoc(element);
- forEach(new JQLite(replaceNode), function(node) {
- if (index) {
- parent.insertBefore(node, index.nextSibling);
- } else {
- parent.replaceChild(node, element);
- }
- index = node;
- });
- },
-
- children: function(element) {
- var children = [];
- forEach(element.childNodes, function(element) {
- if (element.nodeType === NODE_TYPE_ELEMENT) {
- children.push(element);
- }
- });
- return children;
- },
-
- contents: function(element) {
- return element.contentDocument || element.childNodes || [];
- },
-
- append: function(element, node) {
- var nodeType = element.nodeType;
- if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;
-
- node = new JQLite(node);
-
- for (var i = 0, ii = node.length; i < ii; i++) {
- var child = node[i];
- element.appendChild(child);
- }
- },
-
- prepend: function(element, node) {
- if (element.nodeType === NODE_TYPE_ELEMENT) {
- var index = element.firstChild;
- forEach(new JQLite(node), function(child) {
- element.insertBefore(child, index);
- });
- }
- },
-
- wrap: function(element, wrapNode) {
- wrapNode = jqLite(wrapNode).eq(0).clone()[0];
- var parent = element.parentNode;
- if (parent) {
- parent.replaceChild(wrapNode, element);
- }
- wrapNode.appendChild(element);
- },
-
- remove: jqLiteRemove,
-
- detach: function(element) {
- jqLiteRemove(element, true);
- },
-
- after: function(element, newElement) {
- var index = element, parent = element.parentNode;
- newElement = new JQLite(newElement);
-
- for (var i = 0, ii = newElement.length; i < ii; i++) {
- var node = newElement[i];
- parent.insertBefore(node, index.nextSibling);
- index = node;
- }
- },
-
- addClass: jqLiteAddClass,
- removeClass: jqLiteRemoveClass,
-
- toggleClass: function(element, selector, condition) {
- if (selector) {
- forEach(selector.split(' '), function(className) {
- var classCondition = condition;
- if (isUndefined(classCondition)) {
- classCondition = !jqLiteHasClass(element, className);
- }
- (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);
- });
- }
- },
-
- parent: function(element) {
- var parent = element.parentNode;
- return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;
- },
-
- next: function(element) {
- return element.nextElementSibling;
- },
-
- find: function(element, selector) {
- if (element.getElementsByTagName) {
- return element.getElementsByTagName(selector);
- } else {
- return [];
- }
- },
-
- clone: jqLiteClone,
-
- triggerHandler: function(element, event, extraParameters) {
-
- var dummyEvent, eventFnsCopy, handlerArgs;
- var eventName = event.type || event;
- var expandoStore = jqLiteExpandoStore(element);
- var events = expandoStore && expandoStore.events;
- var eventFns = events && events[eventName];
-
- if (eventFns) {
- // Create a dummy event to pass to the handlers
- dummyEvent = {
- preventDefault: function() { this.defaultPrevented = true; },
- isDefaultPrevented: function() { return this.defaultPrevented === true; },
- stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },
- isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },
- stopPropagation: noop,
- type: eventName,
- target: element
- };
-
- // If a custom event was provided then extend our dummy event with it
- if (event.type) {
- dummyEvent = extend(dummyEvent, event);
- }
-
- // Copy event handlers in case event handlers array is modified during execution.
- eventFnsCopy = shallowCopy(eventFns);
- handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];
-
- forEach(eventFnsCopy, function(fn) {
- if (!dummyEvent.isImmediatePropagationStopped()) {
- fn.apply(element, handlerArgs);
- }
- });
- }
- }
-}, function(fn, name) {
- /**
- * chaining functions
- */
- JQLite.prototype[name] = function(arg1, arg2, arg3) {
- var value;
-
- for (var i = 0, ii = this.length; i < ii; i++) {
- if (isUndefined(value)) {
- value = fn(this[i], arg1, arg2, arg3);
- if (isDefined(value)) {
- // any function which returns a value needs to be wrapped
- value = jqLite(value);
- }
- } else {
- jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));
- }
- }
- return isDefined(value) ? value : this;
- };
-
- // bind legacy bind/unbind to on/off
- JQLite.prototype.bind = JQLite.prototype.on;
- JQLite.prototype.unbind = JQLite.prototype.off;
-});
-
-
-// Provider for private $$jqLite service
-function $$jqLiteProvider() {
- this.$get = function $$jqLite() {
- return extend(JQLite, {
- hasClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteHasClass(node, classes);
- },
- addClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteAddClass(node, classes);
- },
- removeClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteRemoveClass(node, classes);
- }
- });
- };
-}
-
-/**
- * Computes a hash of an 'obj'.
- * Hash of a:
- * string is string
- * number is number as string
- * object is either result of calling $$hashKey function on the object or uniquely generated id,
- * that is also assigned to the $$hashKey property of the object.
- *
- * @param obj
- * @returns {string} hash string such that the same input will have the same hash string.
- * The resulting string key is in 'type:hashKey' format.
- */
-function hashKey(obj, nextUidFn) {
- var key = obj && obj.$$hashKey;
-
- if (key) {
- if (typeof key === 'function') {
- key = obj.$$hashKey();
- }
- return key;
- }
-
- var objType = typeof obj;
- if (objType == 'function' || (objType == 'object' && obj !== null)) {
- key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();
- } else {
- key = objType + ':' + obj;
- }
-
- return key;
-}
-
-/**
- * HashMap which can use objects as keys
- */
-function HashMap(array, isolatedUid) {
- if (isolatedUid) {
- var uid = 0;
- this.nextUid = function() {
- return ++uid;
- };
- }
- forEach(array, this.put, this);
-}
-HashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[hashKey(key, this.nextUid)] = value;
- },
-
- /**
- * @param key
- * @returns {Object} the value for the key
- */
- get: function(key) {
- return this[hashKey(key, this.nextUid)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = hashKey(key, this.nextUid)];
- delete this[key];
- return value;
- }
-};
-
-var $$HashMapProvider = [function() {
- this.$get = [function() {
- return HashMap;
- }];
-}];
-
-/**
- * @ngdoc function
- * @module ng
- * @name angular.injector
- * @kind function
- *
- * @description
- * Creates an injector object that can be used for retrieving services as well as for
- * dependency injection (see {@link guide/di dependency injection}).
- *
- * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
- * {@link angular.module}. The `ng` module must be explicitly added.
- * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which
- * disallows argument name annotation inference.
- * @returns {injector} Injector object. See {@link auto.$injector $injector}.
- *
- * @example
- * Typical usage
- * ```js
- * // create an injector
- * var $injector = angular.injector(['ng']);
- *
- * // use the injector to kick off your application
- * // use the type inference to auto inject arguments, or use implicit injection
- * $injector.invoke(function($rootScope, $compile, $document) {
- * $compile($document)($rootScope);
- * $rootScope.$digest();
- * });
- * ```
- *
- * Sometimes you want to get access to the injector of a currently running Angular app
- * from outside Angular. Perhaps, you want to inject and compile some markup after the
- * application has been bootstrapped. You can do this using the extra `injector()` added
- * to JQuery/jqLite elements. See {@link angular.element}.
- *
- * *This is fairly rare but could be the case if a third party library is injecting the
- * markup.*
- *
- * In the following example a new block of HTML containing a `ng-controller`
- * directive is added to the end of the document body by JQuery. We then compile and link
- * it into the current AngularJS scope.
- *
- * ```js
- * var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
- * $(document.body).append($div);
- *
- * angular.element(document).injector().invoke(function($compile) {
- * var scope = angular.element($div).scope();
- * $compile($div)(scope);
- * });
- * ```
- */
-
-
-/**
- * @ngdoc module
- * @name auto
- * @description
- *
- * Implicit module which gets automatically added to each {@link auto.$injector $injector}.
- */
-
-var FN_ARGS = /^[^\(]*\(\s*([^\)]*)\)/m;
-var FN_ARG_SPLIT = /,/;
-var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
-var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
-var $injectorMinErr = minErr('$injector');
-
-function anonFn(fn) {
- // For anonymous functions, showing at the very least the function signature can help in
- // debugging.
- var fnText = fn.toString().replace(STRIP_COMMENTS, ''),
- args = fnText.match(FN_ARGS);
- if (args) {
- return 'function(' + (args[1] || '').replace(/[\s\r\n]+/, ' ') + ')';
- }
- return 'fn';
-}
-
-function annotate(fn, strictDi, name) {
- var $inject,
- fnText,
- argDecl,
- last;
-
- if (typeof fn === 'function') {
- if (!($inject = fn.$inject)) {
- $inject = [];
- if (fn.length) {
- if (strictDi) {
- if (!isString(name) || !name) {
- name = fn.name || anonFn(fn);
- }
- throw $injectorMinErr('strictdi',
- '{0} is not using explicit annotation and cannot be invoked in strict mode', name);
- }
- fnText = fn.toString().replace(STRIP_COMMENTS, '');
- argDecl = fnText.match(FN_ARGS);
- forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {
- arg.replace(FN_ARG, function(all, underscore, name) {
- $inject.push(name);
- });
- });
- }
- fn.$inject = $inject;
- }
- } else if (isArray(fn)) {
- last = fn.length - 1;
- assertArgFn(fn[last], 'fn');
- $inject = fn.slice(0, last);
- } else {
- assertArgFn(fn, 'fn', true);
- }
- return $inject;
-}
-
-///////////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $injector
- *
- * @description
- *
- * `$injector` is used to retrieve object instances as defined by
- * {@link auto.$provide provider}, instantiate types, invoke methods,
- * and load modules.
- *
- * The following always holds true:
- *
- * ```js
- * var $injector = angular.injector();
- * expect($injector.get('$injector')).toBe($injector);
- * expect($injector.invoke(function($injector) {
- * return $injector;
- * })).toBe($injector);
- * ```
- *
- * # Injection Function Annotation
- *
- * JavaScript does not have annotations, and annotations are needed for dependency injection. The
- * following are all valid ways of annotating function with injection arguments and are equivalent.
- *
- * ```js
- * // inferred (only works if code not minified/obfuscated)
- * $injector.invoke(function(serviceA){});
- *
- * // annotated
- * function explicit(serviceA) {};
- * explicit.$inject = ['serviceA'];
- * $injector.invoke(explicit);
- *
- * // inline
- * $injector.invoke(['serviceA', function(serviceA){}]);
- * ```
- *
- * ## Inference
- *
- * In JavaScript calling `toString()` on a function returns the function definition. The definition
- * can then be parsed and the function arguments can be extracted. This method of discovering
- * annotations is disallowed when the injector is in strict mode.
- * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the
- * argument names.
- *
- * ## `$inject` Annotation
- * By adding an `$inject` property onto a function the injection parameters can be specified.
- *
- * ## Inline
- * As an array of injection names, where the last item in the array is the function to call.
- */
-
-/**
- * @ngdoc method
- * @name $injector#get
- *
- * @description
- * Return an instance of the service.
- *
- * @param {string} name The name of the instance to retrieve.
- * @param {string=} caller An optional string to provide the origin of the function call for error messages.
- * @return {*} The instance.
- */
-
-/**
- * @ngdoc method
- * @name $injector#invoke
- *
- * @description
- * Invoke the method and supply the method arguments from the `$injector`.
- *
- * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are
- * injected according to the {@link guide/di $inject Annotation} rules.
- * @param {Object=} self The `this` for the invoked method.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {*} the value returned by the invoked `fn` function.
- */
-
-/**
- * @ngdoc method
- * @name $injector#has
- *
- * @description
- * Allows the user to query if the particular service exists.
- *
- * @param {string} name Name of the service to query.
- * @returns {boolean} `true` if injector has given service.
- */
-
-/**
- * @ngdoc method
- * @name $injector#instantiate
- * @description
- * Create a new instance of JS type. The method takes a constructor function, invokes the new
- * operator, and supplies all of the arguments to the constructor function as specified by the
- * constructor annotation.
- *
- * @param {Function} Type Annotated constructor function.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {Object} new instance of `Type`.
- */
-
-/**
- * @ngdoc method
- * @name $injector#annotate
- *
- * @description
- * Returns an array of service names which the function is requesting for injection. This API is
- * used by the injector to determine which services need to be injected into the function when the
- * function is invoked. There are three ways in which the function can be annotated with the needed
- * dependencies.
- *
- * # Argument names
- *
- * The simplest form is to extract the dependencies from the arguments of the function. This is done
- * by converting the function into a string using `toString()` method and extracting the argument
- * names.
- * ```js
- * // Given
- * function MyController($scope, $route) {
- * // ...
- * }
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * You can disallow this method by using strict injection mode.
- *
- * This method does not work with code minification / obfuscation. For this reason the following
- * annotation strategies are supported.
- *
- * # The `$inject` property
- *
- * If a function has an `$inject` property and its value is an array of strings, then the strings
- * represent names of services to be injected into the function.
- * ```js
- * // Given
- * var MyController = function(obfuscatedScope, obfuscatedRoute) {
- * // ...
- * }
- * // Define function dependencies
- * MyController['$inject'] = ['$scope', '$route'];
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * # The array notation
- *
- * It is often desirable to inline Injected functions and that's when setting the `$inject` property
- * is very inconvenient. In these situations using the array notation to specify the dependencies in
- * a way that survives minification is a better choice:
- *
- * ```js
- * // We wish to write this (not minification / obfuscation safe)
- * injector.invoke(function($compile, $rootScope) {
- * // ...
- * });
- *
- * // We are forced to write break inlining
- * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
- * // ...
- * };
- * tmpFn.$inject = ['$compile', '$rootScope'];
- * injector.invoke(tmpFn);
- *
- * // To better support inline function the inline annotation is supported
- * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
- * // ...
- * }]);
- *
- * // Therefore
- * expect(injector.annotate(
- * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
- * ).toEqual(['$compile', '$rootScope']);
- * ```
- *
- * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
- * be retrieved as described above.
- *
- * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.
- *
- * @returns {Array.<string>} The names of the services which the function requires.
- */
-
-
-
-
-/**
- * @ngdoc service
- * @name $provide
- *
- * @description
- *
- * The {@link auto.$provide $provide} service has a number of methods for registering components
- * with the {@link auto.$injector $injector}. Many of these functions are also exposed on
- * {@link angular.Module}.
- *
- * An Angular **service** is a singleton object created by a **service factory**. These **service
- * factories** are functions which, in turn, are created by a **service provider**.
- * The **service providers** are constructor functions. When instantiated they must contain a
- * property called `$get`, which holds the **service factory** function.
- *
- * When you request a service, the {@link auto.$injector $injector} is responsible for finding the
- * correct **service provider**, instantiating it and then calling its `$get` **service factory**
- * function to get the instance of the **service**.
- *
- * Often services have no configuration options and there is no need to add methods to the service
- * provider. The provider will be no more than a constructor function with a `$get` property. For
- * these cases the {@link auto.$provide $provide} service has additional helper methods to register
- * services without specifying a provider.
- *
- * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the
- * {@link auto.$injector $injector}
- * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by
- * providers and services.
- * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by
- * services, not providers.
- * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,
- * that will be wrapped in a **service provider** object, whose `$get` property will contain the
- * given factory function.
- * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`
- * that will be wrapped in a **service provider** object, whose `$get` property will instantiate
- * a new object using the given constructor function.
- *
- * See the individual methods for more information and examples.
- */
-
-/**
- * @ngdoc method
- * @name $provide#provider
- * @description
- *
- * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions
- * are constructor functions, whose instances are responsible for "providing" a factory for a
- * service.
- *
- * Service provider names start with the name of the service they provide followed by `Provider`.
- * For example, the {@link ng.$log $log} service has a provider called
- * {@link ng.$logProvider $logProvider}.
- *
- * Service provider objects can have additional methods which allow configuration of the provider
- * and its service. Importantly, you can configure what kind of service is created by the `$get`
- * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a
- * method {@link ng.$logProvider#debugEnabled debugEnabled}
- * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the
- * console or not.
- *
- * @param {string} name The name of the instance. NOTE: the provider will be available under `name +
- 'Provider'` key.
- * @param {(Object|function())} provider If the provider is:
- *
- * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
- * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.
- * - `Constructor`: a new instance of the provider will be created using
- * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.
- *
- * @returns {Object} registered provider instance
-
- * @example
- *
- * The following example shows how to create a simple event tracking service and register it using
- * {@link auto.$provide#provider $provide.provider()}.
- *
- * ```js
- * // Define the eventTracker provider
- * function EventTrackerProvider() {
- * var trackingUrl = '/track';
- *
- * // A provider method for configuring where the tracked events should been saved
- * this.setTrackingUrl = function(url) {
- * trackingUrl = url;
- * };
- *
- * // The service factory function
- * this.$get = ['$http', function($http) {
- * var trackedEvents = {};
- * return {
- * // Call this to track an event
- * event: function(event) {
- * var count = trackedEvents[event] || 0;
- * count += 1;
- * trackedEvents[event] = count;
- * return count;
- * },
- * // Call this to save the tracked events to the trackingUrl
- * save: function() {
- * $http.post(trackingUrl, trackedEvents);
- * }
- * };
- * }];
- * }
- *
- * describe('eventTracker', function() {
- * var postSpy;
- *
- * beforeEach(module(function($provide) {
- * // Register the eventTracker provider
- * $provide.provider('eventTracker', EventTrackerProvider);
- * }));
- *
- * beforeEach(module(function(eventTrackerProvider) {
- * // Configure eventTracker provider
- * eventTrackerProvider.setTrackingUrl('/custom-track');
- * }));
- *
- * it('tracks events', inject(function(eventTracker) {
- * expect(eventTracker.event('login')).toEqual(1);
- * expect(eventTracker.event('login')).toEqual(2);
- * }));
- *
- * it('saves to the tracking url', inject(function(eventTracker, $http) {
- * postSpy = spyOn($http, 'post');
- * eventTracker.event('login');
- * eventTracker.save();
- * expect(postSpy).toHaveBeenCalled();
- * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');
- * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');
- * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });
- * }));
- * });
- * ```
- */
-
-/**
- * @ngdoc method
- * @name $provide#factory
- * @description
- *
- * Register a **service factory**, which will be called to return the service instance.
- * This is short for registering a service where its provider consists of only a `$get` property,
- * which is the given service factory function.
- * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to
- * configure your service in a provider.
- *
- * @param {string} name The name of the instance.
- * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.
- * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service
- * ```js
- * $provide.factory('ping', ['$http', function($http) {
- * return function ping() {
- * return $http.send('/ping');
- * };
- * }]);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#service
- * @description
- *
- * Register a **service constructor**, which will be invoked with `new` to create the service
- * instance.
- * This is short for registering a service where its provider's `$get` property is the service
- * constructor function that will be used to instantiate the service instance.
- *
- * You should use {@link auto.$provide#service $provide.service(class)} if you define your service
- * as a type/class.
- *
- * @param {string} name The name of the instance.
- * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)
- * that will be instantiated.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service using
- * {@link auto.$provide#service $provide.service(class)}.
- * ```js
- * var Ping = function($http) {
- * this.$http = $http;
- * };
- *
- * Ping.$inject = ['$http'];
- *
- * Ping.prototype.send = function() {
- * return this.$http.get('/ping');
- * };
- * $provide.service('ping', Ping);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping.send();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#value
- * @description
- *
- * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a
- * number, an array, an object or a function. This is short for registering a service where its
- * provider's `$get` property is a factory function that takes no arguments and returns the **value
- * service**.
- *
- * Value services are similar to constant services, except that they cannot be injected into a
- * module configuration function (see {@link angular.Module#config}) but they can be overridden by
- * an Angular
- * {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the instance.
- * @param {*} value The value.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here are some examples of creating value services.
- * ```js
- * $provide.value('ADMIN_USER', 'admin');
- *
- * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });
- *
- * $provide.value('halfOf', function(value) {
- * return value / 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#constant
- * @description
- *
- * Register a **constant service**, such as a string, a number, an array, an object or a function,
- * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be
- * injected into a module configuration function (see {@link angular.Module#config}) and it cannot
- * be overridden by an Angular {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the constant.
- * @param {*} value The constant value.
- * @returns {Object} registered instance
- *
- * @example
- * Here a some examples of creating constants:
- * ```js
- * $provide.constant('SHARD_HEIGHT', 306);
- *
- * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);
- *
- * $provide.constant('double', function(value) {
- * return value * 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#decorator
- * @description
- *
- * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator
- * intercepts the creation of a service, allowing it to override or modify the behaviour of the
- * service. The object returned by the decorator may be the original service, or a new service
- * object which replaces or wraps and delegates to the original service.
- *
- * @param {string} name The name of the service to decorate.
- * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance. The function is called using
- * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
- * Local injection arguments:
- *
- * * `$delegate` - The original service instance, which can be monkey patched, configured,
- * decorated or delegated to.
- *
- * @example
- * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting
- * calls to {@link ng.$log#error $log.warn()}.
- * ```js
- * $provide.decorator('$log', ['$delegate', function($delegate) {
- * $delegate.warn = $delegate.error;
- * return $delegate;
- * }]);
- * ```
- */
-
-
-function createInjector(modulesToLoad, strictDi) {
- strictDi = (strictDi === true);
- var INSTANTIATING = {},
- providerSuffix = 'Provider',
- path = [],
- loadedModules = new HashMap([], true),
- providerCache = {
- $provide: {
- provider: supportObject(provider),
- factory: supportObject(factory),
- service: supportObject(service),
- value: supportObject(value),
- constant: supportObject(constant),
- decorator: decorator
- }
- },
- providerInjector = (providerCache.$injector =
- createInternalInjector(providerCache, function(serviceName, caller) {
- if (angular.isString(caller)) {
- path.push(caller);
- }
- throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- '));
- })),
- instanceCache = {},
- instanceInjector = (instanceCache.$injector =
- createInternalInjector(instanceCache, function(serviceName, caller) {
- var provider = providerInjector.get(serviceName + providerSuffix, caller);
- return instanceInjector.invoke(provider.$get, provider, undefined, serviceName);
- }));
-
-
- forEach(loadModules(modulesToLoad), function(fn) { if (fn) instanceInjector.invoke(fn); });
-
- return instanceInjector;
-
- ////////////////////////////////////
- // $provider
- ////////////////////////////////////
-
- function supportObject(delegate) {
- return function(key, value) {
- if (isObject(key)) {
- forEach(key, reverseParams(delegate));
- } else {
- return delegate(key, value);
- }
- };
- }
-
- function provider(name, provider_) {
- assertNotHasOwnProperty(name, 'service');
- if (isFunction(provider_) || isArray(provider_)) {
- provider_ = providerInjector.instantiate(provider_);
- }
- if (!provider_.$get) {
- throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
- }
- return providerCache[name + providerSuffix] = provider_;
- }
-
- function enforceReturnValue(name, factory) {
- return function enforcedReturnValue() {
- var result = instanceInjector.invoke(factory, this);
- if (isUndefined(result)) {
- throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
- }
- return result;
- };
- }
-
- function factory(name, factoryFn, enforce) {
- return provider(name, {
- $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn
- });
- }
-
- function service(name, constructor) {
- return factory(name, ['$injector', function($injector) {
- return $injector.instantiate(constructor);
- }]);
- }
-
- function value(name, val) { return factory(name, valueFn(val), false); }
-
- function constant(name, value) {
- assertNotHasOwnProperty(name, 'constant');
- providerCache[name] = value;
- instanceCache[name] = value;
- }
-
- function decorator(serviceName, decorFn) {
- var origProvider = providerInjector.get(serviceName + providerSuffix),
- orig$get = origProvider.$get;
-
- origProvider.$get = function() {
- var origInstance = instanceInjector.invoke(orig$get, origProvider);
- return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
- };
- }
-
- ////////////////////////////////////
- // Module Loading
- ////////////////////////////////////
- function loadModules(modulesToLoad) {
- assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');
- var runBlocks = [], moduleFn;
- forEach(modulesToLoad, function(module) {
- if (loadedModules.get(module)) return;
- loadedModules.put(module, true);
-
- function runInvokeQueue(queue) {
- var i, ii;
- for (i = 0, ii = queue.length; i < ii; i++) {
- var invokeArgs = queue[i],
- provider = providerInjector.get(invokeArgs[0]);
-
- provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
- }
- }
-
- try {
- if (isString(module)) {
- moduleFn = angularModule(module);
- runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
- runInvokeQueue(moduleFn._invokeQueue);
- runInvokeQueue(moduleFn._configBlocks);
- } else if (isFunction(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else if (isArray(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else {
- assertArgFn(module, 'module');
- }
- } catch (e) {
- if (isArray(module)) {
- module = module[module.length - 1];
- }
- if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {
- // Safari & FF's stack traces don't contain error.message content
- // unlike those of Chrome and IE
- // So if stack doesn't contain message, we create a new string that contains both.
- // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.
- /* jshint -W022 */
- e = e.message + '\n' + e.stack;
- }
- throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}",
- module, e.stack || e.message || e);
- }
- });
- return runBlocks;
- }
-
- ////////////////////////////////////
- // internal Injector
- ////////////////////////////////////
-
- function createInternalInjector(cache, factory) {
-
- function getService(serviceName, caller) {
- if (cache.hasOwnProperty(serviceName)) {
- if (cache[serviceName] === INSTANTIATING) {
- throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
- serviceName + ' <- ' + path.join(' <- '));
- }
- return cache[serviceName];
- } else {
- try {
- path.unshift(serviceName);
- cache[serviceName] = INSTANTIATING;
- return cache[serviceName] = factory(serviceName, caller);
- } catch (err) {
- if (cache[serviceName] === INSTANTIATING) {
- delete cache[serviceName];
- }
- throw err;
- } finally {
- path.shift();
- }
- }
- }
-
- function invoke(fn, self, locals, serviceName) {
- if (typeof locals === 'string') {
- serviceName = locals;
- locals = null;
- }
-
- var args = [],
- $inject = createInjector.$$annotate(fn, strictDi, serviceName),
- length, i,
- key;
-
- for (i = 0, length = $inject.length; i < length; i++) {
- key = $inject[i];
- if (typeof key !== 'string') {
- throw $injectorMinErr('itkn',
- 'Incorrect injection token! Expected service name as string, got {0}', key);
- }
- args.push(
- locals && locals.hasOwnProperty(key)
- ? locals[key]
- : getService(key, serviceName)
- );
- }
- if (isArray(fn)) {
- fn = fn[length];
- }
-
- // http://jsperf.com/angularjs-invoke-apply-vs-switch
- // #5388
- return fn.apply(self, args);
- }
-
- function instantiate(Type, locals, serviceName) {
- // Check if Type is annotated and use just the given function at n-1 as parameter
- // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
- // Object creation: http://jsperf.com/create-constructor/2
- var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);
- var returnedValue = invoke(Type, instance, locals, serviceName);
-
- return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
- }
-
- return {
- invoke: invoke,
- instantiate: instantiate,
- get: getService,
- annotate: createInjector.$$annotate,
- has: function(name) {
- return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);
- }
- };
- }
-}
-
-createInjector.$$annotate = annotate;
-
-/**
- * @ngdoc provider
- * @name $anchorScrollProvider
- *
- * @description
- * Use `$anchorScrollProvider` to disable automatic scrolling whenever
- * {@link ng.$location#hash $location.hash()} changes.
- */
-function $AnchorScrollProvider() {
-
- var autoScrollingEnabled = true;
-
- /**
- * @ngdoc method
- * @name $anchorScrollProvider#disableAutoScrolling
- *
- * @description
- * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to
- * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />
- * Use this method to disable automatic scrolling.
- *
- * If automatic scrolling is disabled, one must explicitly call
- * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the
- * current hash.
- */
- this.disableAutoScrolling = function() {
- autoScrollingEnabled = false;
- };
-
- /**
- * @ngdoc service
- * @name $anchorScroll
- * @kind function
- * @requires $window
- * @requires $location
- * @requires $rootScope
- *
- * @description
- * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the
- * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified
- * in the
- * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-indicated-part-of-the-document).
- *
- * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to
- * match any anchor whenever it changes. This can be disabled by calling
- * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.
- *
- * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a
- * vertical scroll-offset (either fixed or dynamic).
- *
- * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of
- * {@link ng.$location#hash $location.hash()} will be used.
- *
- * @property {(number|function|jqLite)} yOffset
- * If set, specifies a vertical scroll-offset. This is often useful when there are fixed
- * positioned elements at the top of the page, such as navbars, headers etc.
- *
- * `yOffset` can be specified in various ways:
- * - **number**: A fixed number of pixels to be used as offset.<br /><br />
- * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return
- * a number representing the offset (in pixels).<br /><br />
- * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from
- * the top of the page to the element's bottom will be used as offset.<br />
- * **Note**: The element will be taken into account only as long as its `position` is set to
- * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust
- * their height and/or positioning according to the viewport's size.
- *
- * <br />
- * <div class="alert alert-warning">
- * In order for `yOffset` to work properly, scrolling should take place on the document's root and
- * not some child element.
- * </div>
- *
- * @example
- <example module="anchorScrollExample">
- <file name="index.html">
- <div id="scrollArea" ng-controller="ScrollController">
- <a ng-click="gotoBottom()">Go to bottom</a>
- <a id="bottom"></a> You're at the bottom!
- </div>
- </file>
- <file name="script.js">
- angular.module('anchorScrollExample', [])
- .controller('ScrollController', ['$scope', '$location', '$anchorScroll',
- function ($scope, $location, $anchorScroll) {
- $scope.gotoBottom = function() {
- // set the location.hash to the id of
- // the element you wish to scroll to.
- $location.hash('bottom');
-
- // call $anchorScroll()
- $anchorScroll();
- };
- }]);
- </file>
- <file name="style.css">
- #scrollArea {
- height: 280px;
- overflow: auto;
- }
-
- #bottom {
- display: block;
- margin-top: 2000px;
- }
- </file>
- </example>
- *
- * <hr />
- * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).
- * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.
- *
- * @example
- <example module="anchorScrollOffsetExample">
- <file name="index.html">
- <div class="fixed-header" ng-controller="headerCtrl">
- <a href="" ng-click="gotoAnchor(x)" ng-repeat="x in [1,2,3,4,5]">
- Go to anchor {{x}}
- </a>
- </div>
- <div id="anchor{{x}}" class="anchor" ng-repeat="x in [1,2,3,4,5]">
- Anchor {{x}} of 5
- </div>
- </file>
- <file name="script.js">
- angular.module('anchorScrollOffsetExample', [])
- .run(['$anchorScroll', function($anchorScroll) {
- $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels
- }])
- .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',
- function ($anchorScroll, $location, $scope) {
- $scope.gotoAnchor = function(x) {
- var newHash = 'anchor' + x;
- if ($location.hash() !== newHash) {
- // set the $location.hash to `newHash` and
- // $anchorScroll will automatically scroll to it
- $location.hash('anchor' + x);
- } else {
- // call $anchorScroll() explicitly,
- // since $location.hash hasn't changed
- $anchorScroll();
- }
- };
- }
- ]);
- </file>
- <file name="style.css">
- body {
- padding-top: 50px;
- }
-
- .anchor {
- border: 2px dashed DarkOrchid;
- padding: 10px 10px 200px 10px;
- }
-
- .fixed-header {
- background-color: rgba(0, 0, 0, 0.2);
- height: 50px;
- position: fixed;
- top: 0; left: 0; right: 0;
- }
-
- .fixed-header > a {
- display: inline-block;
- margin: 5px 15px;
- }
- </file>
- </example>
- */
- this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
- var document = $window.document;
-
- // Helper function to get first anchor from a NodeList
- // (using `Array#some()` instead of `angular#forEach()` since it's more performant
- // and working in all supported browsers.)
- function getFirstAnchor(list) {
- var result = null;
- Array.prototype.some.call(list, function(element) {
- if (nodeName_(element) === 'a') {
- result = element;
- return true;
- }
- });
- return result;
- }
-
- function getYOffset() {
-
- var offset = scroll.yOffset;
-
- if (isFunction(offset)) {
- offset = offset();
- } else if (isElement(offset)) {
- var elem = offset[0];
- var style = $window.getComputedStyle(elem);
- if (style.position !== 'fixed') {
- offset = 0;
- } else {
- offset = elem.getBoundingClientRect().bottom;
- }
- } else if (!isNumber(offset)) {
- offset = 0;
- }
-
- return offset;
- }
-
- function scrollTo(elem) {
- if (elem) {
- elem.scrollIntoView();
-
- var offset = getYOffset();
-
- if (offset) {
- // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.
- // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the
- // top of the viewport.
- //
- // IF the number of pixels from the top of `elem` to the end of the page's content is less
- // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some
- // way down the page.
- //
- // This is often the case for elements near the bottom of the page.
- //
- // In such cases we do not need to scroll the whole `offset` up, just the difference between
- // the top of the element and the offset, which is enough to align the top of `elem` at the
- // desired position.
- var elemTop = elem.getBoundingClientRect().top;
- $window.scrollBy(0, elemTop - offset);
- }
- } else {
- $window.scrollTo(0, 0);
- }
- }
-
- function scroll(hash) {
- hash = isString(hash) ? hash : $location.hash();
- var elm;
-
- // empty hash, scroll to the top of the page
- if (!hash) scrollTo(null);
-
- // element with given id
- else if ((elm = document.getElementById(hash))) scrollTo(elm);
-
- // first anchor with given name :-D
- else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);
-
- // no element and hash == 'top', scroll to the top of the page
- else if (hash === 'top') scrollTo(null);
- }
-
- // does not scroll when user clicks on anchor link that is currently on
- // (no url change, no $location.hash() change), browser native does scroll
- if (autoScrollingEnabled) {
- $rootScope.$watch(function autoScrollWatch() {return $location.hash();},
- function autoScrollWatchAction(newVal, oldVal) {
- // skip the initial scroll if $location.hash is empty
- if (newVal === oldVal && newVal === '') return;
-
- jqLiteDocumentLoaded(function() {
- $rootScope.$evalAsync(scroll);
- });
- });
- }
-
- return scroll;
- }];
-}
-
-var $animateMinErr = minErr('$animate');
-var ELEMENT_NODE = 1;
-var NG_ANIMATE_CLASSNAME = 'ng-animate';
-
-function mergeClasses(a,b) {
- if (!a && !b) return '';
- if (!a) return b;
- if (!b) return a;
- if (isArray(a)) a = a.join(' ');
- if (isArray(b)) b = b.join(' ');
- return a + ' ' + b;
-}
-
-function extractElementNode(element) {
- for (var i = 0; i < element.length; i++) {
- var elm = element[i];
- if (elm.nodeType === ELEMENT_NODE) {
- return elm;
- }
- }
-}
-
-function splitClasses(classes) {
- if (isString(classes)) {
- classes = classes.split(' ');
- }
-
- // Use createMap() to prevent class assumptions involving property names in
- // Object.prototype
- var obj = createMap();
- forEach(classes, function(klass) {
- // sometimes the split leaves empty string values
- // incase extra spaces were applied to the options
- if (klass.length) {
- obj[klass] = true;
- }
- });
- return obj;
-}
-
-// if any other type of options value besides an Object value is
-// passed into the $animate.method() animation then this helper code
-// will be run which will ignore it. While this patch is not the
-// greatest solution to this, a lot of existing plugins depend on
-// $animate to either call the callback (< 1.2) or return a promise
-// that can be changed. This helper function ensures that the options
-// are wiped clean incase a callback function is provided.
-function prepareAnimateOptions(options) {
- return isObject(options)
- ? options
- : {};
-}
-
-var $$CoreAnimateRunnerProvider = function() {
- this.$get = ['$q', '$$rAF', function($q, $$rAF) {
- function AnimateRunner() {}
- AnimateRunner.all = noop;
- AnimateRunner.chain = noop;
- AnimateRunner.prototype = {
- end: noop,
- cancel: noop,
- resume: noop,
- pause: noop,
- complete: noop,
- then: function(pass, fail) {
- return $q(function(resolve) {
- $$rAF(function() {
- resolve();
- });
- }).then(pass, fail);
- }
- };
- return AnimateRunner;
- }];
-};
-
-// this is prefixed with Core since it conflicts with
-// the animateQueueProvider defined in ngAnimate/animateQueue.js
-var $$CoreAnimateQueueProvider = function() {
- var postDigestQueue = new HashMap();
- var postDigestElements = [];
-
- this.$get = ['$$AnimateRunner', '$rootScope',
- function($$AnimateRunner, $rootScope) {
- return {
- enabled: noop,
- on: noop,
- off: noop,
- pin: noop,
-
- push: function(element, event, options, domOperation) {
- domOperation && domOperation();
-
- options = options || {};
- options.from && element.css(options.from);
- options.to && element.css(options.to);
-
- if (options.addClass || options.removeClass) {
- addRemoveClassesPostDigest(element, options.addClass, options.removeClass);
- }
-
- return new $$AnimateRunner(); // jshint ignore:line
- }
- };
-
-
- function updateData(data, classes, value) {
- var changed = false;
- if (classes) {
- classes = isString(classes) ? classes.split(' ') :
- isArray(classes) ? classes : [];
- forEach(classes, function(className) {
- if (className) {
- changed = true;
- data[className] = value;
- }
- });
- }
- return changed;
- }
-
- function handleCSSClassChanges() {
- forEach(postDigestElements, function(element) {
- var data = postDigestQueue.get(element);
- if (data) {
- var existing = splitClasses(element.attr('class'));
- var toAdd = '';
- var toRemove = '';
- forEach(data, function(status, className) {
- var hasClass = !!existing[className];
- if (status !== hasClass) {
- if (status) {
- toAdd += (toAdd.length ? ' ' : '') + className;
- } else {
- toRemove += (toRemove.length ? ' ' : '') + className;
- }
- }
- });
-
- forEach(element, function(elm) {
- toAdd && jqLiteAddClass(elm, toAdd);
- toRemove && jqLiteRemoveClass(elm, toRemove);
- });
- postDigestQueue.remove(element);
- }
- });
- postDigestElements.length = 0;
- }
-
-
- function addRemoveClassesPostDigest(element, add, remove) {
- var data = postDigestQueue.get(element) || {};
-
- var classesAdded = updateData(data, add, true);
- var classesRemoved = updateData(data, remove, false);
-
- if (classesAdded || classesRemoved) {
-
- postDigestQueue.put(element, data);
- postDigestElements.push(element);
-
- if (postDigestElements.length === 1) {
- $rootScope.$$postDigest(handleCSSClassChanges);
- }
- }
- }
- }];
-};
-
-/**
- * @ngdoc provider
- * @name $animateProvider
- *
- * @description
- * Default implementation of $animate that doesn't perform any animations, instead just
- * synchronously performs DOM updates and resolves the returned runner promise.
- *
- * In order to enable animations the `ngAnimate` module has to be loaded.
- *
- * To see the functional implementation check out `src/ngAnimate/animate.js`.
- */
-var $AnimateProvider = ['$provide', function($provide) {
- var provider = this;
-
- this.$$registeredAnimations = Object.create(null);
-
- /**
- * @ngdoc method
- * @name $animateProvider#register
- *
- * @description
- * Registers a new injectable animation factory function. The factory function produces the
- * animation object which contains callback functions for each event that is expected to be
- * animated.
- *
- * * `eventFn`: `function(element, ... , doneFunction, options)`
- * The element to animate, the `doneFunction` and the options fed into the animation. Depending
- * on the type of animation additional arguments will be injected into the animation function. The
- * list below explains the function signatures for the different animation methods:
- *
- * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)
- * - addClass: function(element, addedClasses, doneFunction, options)
- * - removeClass: function(element, removedClasses, doneFunction, options)
- * - enter, leave, move: function(element, doneFunction, options)
- * - animate: function(element, fromStyles, toStyles, doneFunction, options)
- *
- * Make sure to trigger the `doneFunction` once the animation is fully complete.
- *
- * ```js
- * return {
- * //enter, leave, move signature
- * eventFn : function(element, done, options) {
- * //code to run the animation
- * //once complete, then run done()
- * return function endFunction(wasCancelled) {
- * //code to cancel the animation
- * }
- * }
- * }
- * ```
- *
- * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).
- * @param {Function} factory The factory function that will be executed to return the animation
- * object.
- */
- this.register = function(name, factory) {
- if (name && name.charAt(0) !== '.') {
- throw $animateMinErr('notcsel', "Expecting class selector starting with '.' got '{0}'.", name);
- }
-
- var key = name + '-animation';
- provider.$$registeredAnimations[name.substr(1)] = key;
- $provide.factory(key, factory);
- };
-
- /**
- * @ngdoc method
- * @name $animateProvider#classNameFilter
- *
- * @description
- * Sets and/or returns the CSS class regular expression that is checked when performing
- * an animation. Upon bootstrap the classNameFilter value is not set at all and will
- * therefore enable $animate to attempt to perform an animation on any element that is triggered.
- * When setting the `classNameFilter` value, animations will only be performed on elements
- * that successfully match the filter expression. This in turn can boost performance
- * for low-powered devices as well as applications containing a lot of structural operations.
- * @param {RegExp=} expression The className expression which will be checked against all animations
- * @return {RegExp} The current CSS className expression value. If null then there is no expression value
- */
- this.classNameFilter = function(expression) {
- if (arguments.length === 1) {
- this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;
- if (this.$$classNameFilter) {
- var reservedRegex = new RegExp("(\\s+|\\/)" + NG_ANIMATE_CLASSNAME + "(\\s+|\\/)");
- if (reservedRegex.test(this.$$classNameFilter.toString())) {
- throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', NG_ANIMATE_CLASSNAME);
-
- }
- }
- }
- return this.$$classNameFilter;
- };
-
- this.$get = ['$$animateQueue', function($$animateQueue) {
- function domInsert(element, parentElement, afterElement) {
- // if for some reason the previous element was removed
- // from the dom sometime before this code runs then let's
- // just stick to using the parent element as the anchor
- if (afterElement) {
- var afterNode = extractElementNode(afterElement);
- if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {
- afterElement = null;
- }
- }
- afterElement ? afterElement.after(element) : parentElement.prepend(element);
- }
-
- /**
- * @ngdoc service
- * @name $animate
- * @description The $animate service exposes a series of DOM utility methods that provide support
- * for animation hooks. The default behavior is the application of DOM operations, however,
- * when an animation is detected (and animations are enabled), $animate will do the heavy lifting
- * to ensure that animation runs with the triggered DOM operation.
- *
- * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't
- * included and only when it is active then the animation hooks that `$animate` triggers will be
- * functional. Once active then all structural `ng-` directives will trigger animations as they perform
- * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,
- * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.
- *
- * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.
- *
- * To learn more about enabling animation support, click here to visit the
- * {@link ngAnimate ngAnimate module page}.
- */
- return {
- // we don't call it directly since non-existant arguments may
- // be interpreted as null within the sub enabled function
-
- /**
- *
- * @ngdoc method
- * @name $animate#on
- * @kind function
- * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)
- * has fired on the given element or among any of its children. Once the listener is fired, the provided callback
- * is fired with the following params:
- *
- * ```js
- * $animate.on('enter', container,
- * function callback(element, phase) {
- * // cool we detected an enter animation within the container
- * }
- * );
- * ```
- *
- * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)
- * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself
- * as well as among its children
- * @param {Function} callback the callback function that will be fired when the listener is triggered
- *
- * The arguments present in the callback function are:
- * * `element` - The captured DOM element that the animation was fired on.
- * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).
- */
- on: $$animateQueue.on,
-
- /**
- *
- * @ngdoc method
- * @name $animate#off
- * @kind function
- * @description Deregisters an event listener based on the event which has been associated with the provided element. This method
- * can be used in three different ways depending on the arguments:
- *
- * ```js
- * // remove all the animation event listeners listening for `enter`
- * $animate.off('enter');
- *
- * // remove all the animation event listeners listening for `enter` on the given element and its children
- * $animate.off('enter', container);
- *
- * // remove the event listener function provided by `listenerFn` that is set
- * // to listen for `enter` on the given `element` as well as its children
- * $animate.off('enter', container, callback);
- * ```
- *
- * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)
- * @param {DOMElement=} container the container element the event listener was placed on
- * @param {Function=} callback the callback function that was registered as the listener
- */
- off: $$animateQueue.off,
-
- /**
- * @ngdoc method
- * @name $animate#pin
- * @kind function
- * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists
- * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the
- * element despite being outside the realm of the application or within another application. Say for example if the application
- * was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated
- * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind
- * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.
- *
- * Note that this feature is only active when the `ngAnimate` module is used.
- *
- * @param {DOMElement} element the external element that will be pinned
- * @param {DOMElement} parentElement the host parent element that will be associated with the external element
- */
- pin: $$animateQueue.pin,
-
- /**
- *
- * @ngdoc method
- * @name $animate#enabled
- * @kind function
- * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This
- * function can be called in four ways:
- *
- * ```js
- * // returns true or false
- * $animate.enabled();
- *
- * // changes the enabled state for all animations
- * $animate.enabled(false);
- * $animate.enabled(true);
- *
- * // returns true or false if animations are enabled for an element
- * $animate.enabled(element);
- *
- * // changes the enabled state for an element and its children
- * $animate.enabled(element, true);
- * $animate.enabled(element, false);
- * ```
- *
- * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state
- * @param {boolean=} enabled whether or not the animations will be enabled for the element
- *
- * @return {boolean} whether or not animations are enabled
- */
- enabled: $$animateQueue.enabled,
-
- /**
- * @ngdoc method
- * @name $animate#cancel
- * @kind function
- * @description Cancels the provided animation.
- *
- * @param {Promise} animationPromise The animation promise that is returned when an animation is started.
- */
- cancel: function(runner) {
- runner.end && runner.end();
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#enter
- * @kind function
- * @description Inserts the element into the DOM either after the `after` element (if provided) or
- * as the first child within the `parent` element and then triggers an animation.
- * A promise is returned that will be resolved during the next digest once the animation
- * has completed.
- *
- * @param {DOMElement} element the element which will be inserted into the DOM
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (so long as the after element is not present)
- * @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- enter: function(element, parent, after, options) {
- parent = parent && jqLite(parent);
- after = after && jqLite(after);
- parent = parent || after.parent();
- domInsert(element, parent, after);
- return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#move
- * @kind function
- * @description Inserts (moves) the element into its new position in the DOM either after
- * the `after` element (if provided) or as the first child within the `parent` element
- * and then triggers an animation. A promise is returned that will be resolved
- * during the next digest once the animation has completed.
- *
- * @param {DOMElement} element the element which will be moved into the new DOM position
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (so long as the after element is not present)
- * @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- move: function(element, parent, after, options) {
- parent = parent && jqLite(parent);
- after = after && jqLite(after);
- parent = parent || after.parent();
- domInsert(element, parent, after);
- return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));
- },
-
- /**
- * @ngdoc method
- * @name $animate#leave
- * @kind function
- * @description Triggers an animation and then removes the element from the DOM.
- * When the function is called a promise is returned that will be resolved during the next
- * digest once the animation has completed.
- *
- * @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- leave: function(element, options) {
- return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {
- element.remove();
- });
- },
-
- /**
- * @ngdoc method
- * @name $animate#addClass
- * @kind function
- *
- * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon
- * execution, the addClass operation will only be handled after the next digest and it will not trigger an
- * animation if element already contains the CSS class or if the class is removed at a later step.
- * Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- addClass: function(element, className, options) {
- options = prepareAnimateOptions(options);
- options.addClass = mergeClasses(options.addclass, className);
- return $$animateQueue.push(element, 'addClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#removeClass
- * @kind function
- *
- * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon
- * execution, the removeClass operation will only be handled after the next digest and it will not trigger an
- * animation if element does not contain the CSS class or if the class is added at a later step.
- * Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- removeClass: function(element, className, options) {
- options = prepareAnimateOptions(options);
- options.removeClass = mergeClasses(options.removeClass, className);
- return $$animateQueue.push(element, 'removeClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#setClass
- * @kind function
- *
- * @description Performs both the addition and removal of a CSS classes on an element and (during the process)
- * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and
- * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has
- * passed. Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- setClass: function(element, add, remove, options) {
- options = prepareAnimateOptions(options);
- options.addClass = mergeClasses(options.addClass, add);
- options.removeClass = mergeClasses(options.removeClass, remove);
- return $$animateQueue.push(element, 'setClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#animate
- * @kind function
- *
- * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.
- * If any detected CSS transition, keyframe or JavaScript matches the provided className value then the animation will take
- * on the provided styles. For example, if a transition animation is set for the given className then the provided from and
- * to styles will be applied alongside the given transition. If a JavaScript animation is detected then the provided styles
- * will be given in as function paramters into the `animate` method (or as apart of the `options` parameter).
- *
- * @param {DOMElement} element the element which the CSS styles will be applied to
- * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.
- * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.
- * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
- * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
- * (Note that if no animation is detected then this value will not be appplied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- animate: function(element, from, to, className, options) {
- options = prepareAnimateOptions(options);
- options.from = options.from ? extend(options.from, from) : from;
- options.to = options.to ? extend(options.to, to) : to;
-
- className = className || 'ng-inline-animate';
- options.tempClasses = mergeClasses(options.tempClasses, className);
- return $$animateQueue.push(element, 'animate', options);
- }
- };
- }];
-}];
-
-/**
- * @ngdoc service
- * @name $animateCss
- * @kind object
- *
- * @description
- * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,
- * then the `$animateCss` service will actually perform animations.
- *
- * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.
- */
-var $CoreAnimateCssProvider = function() {
- this.$get = ['$$rAF', '$q', function($$rAF, $q) {
-
- var RAFPromise = function() {};
- RAFPromise.prototype = {
- done: function(cancel) {
- this.defer && this.defer[cancel === true ? 'reject' : 'resolve']();
- },
- end: function() {
- this.done();
- },
- cancel: function() {
- this.done(true);
- },
- getPromise: function() {
- if (!this.defer) {
- this.defer = $q.defer();
- }
- return this.defer.promise;
- },
- then: function(f1,f2) {
- return this.getPromise().then(f1,f2);
- },
- 'catch': function(f1) {
- return this.getPromise()['catch'](f1);
- },
- 'finally': function(f1) {
- return this.getPromise()['finally'](f1);
- }
- };
-
- return function(element, options) {
- // there is no point in applying the styles since
- // there is no animation that goes on at all in
- // this version of $animateCss.
- if (options.cleanupStyles) {
- options.from = options.to = null;
- }
-
- if (options.from) {
- element.css(options.from);
- options.from = null;
- }
-
- var closed, runner = new RAFPromise();
- return {
- start: run,
- end: run
- };
-
- function run() {
- $$rAF(function() {
- close();
- if (!closed) {
- runner.done();
- }
- closed = true;
- });
- return runner;
- }
-
- function close() {
- if (options.addClass) {
- element.addClass(options.addClass);
- options.addClass = null;
- }
- if (options.removeClass) {
- element.removeClass(options.removeClass);
- options.removeClass = null;
- }
- if (options.to) {
- element.css(options.to);
- options.to = null;
- }
- }
- };
- }];
-};
-
-/* global stripHash: true */
-
-/**
- * ! This is a private undocumented service !
- *
- * @name $browser
- * @requires $log
- * @description
- * This object has two goals:
- *
- * - hide all the global state in the browser caused by the window object
- * - abstract away all the browser specific features and inconsistencies
- *
- * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
- * service, which can be used for convenient testing of the application without the interaction with
- * the real browser apis.
- */
-/**
- * @param {object} window The global window object.
- * @param {object} document jQuery wrapped document.
- * @param {object} $log window.console or an object with the same interface.
- * @param {object} $sniffer $sniffer service
- */
-function Browser(window, document, $log, $sniffer) {
- var self = this,
- rawDocument = document[0],
- location = window.location,
- history = window.history,
- setTimeout = window.setTimeout,
- clearTimeout = window.clearTimeout,
- pendingDeferIds = {};
-
- self.isMock = false;
-
- var outstandingRequestCount = 0;
- var outstandingRequestCallbacks = [];
-
- // TODO(vojta): remove this temporary api
- self.$$completeOutstandingRequest = completeOutstandingRequest;
- self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };
-
- /**
- * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`
- * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
- */
- function completeOutstandingRequest(fn) {
- try {
- fn.apply(null, sliceArgs(arguments, 1));
- } finally {
- outstandingRequestCount--;
- if (outstandingRequestCount === 0) {
- while (outstandingRequestCallbacks.length) {
- try {
- outstandingRequestCallbacks.pop()();
- } catch (e) {
- $log.error(e);
- }
- }
- }
- }
- }
-
- function getHash(url) {
- var index = url.indexOf('#');
- return index === -1 ? '' : url.substr(index);
- }
-
- /**
- * @private
- * Note: this method is used only by scenario runner
- * TODO(vojta): prefix this method with $$ ?
- * @param {function()} callback Function that will be called when no outstanding request
- */
- self.notifyWhenNoOutstandingRequests = function(callback) {
- if (outstandingRequestCount === 0) {
- callback();
- } else {
- outstandingRequestCallbacks.push(callback);
- }
- };
-
- //////////////////////////////////////////////////////////////
- // URL API
- //////////////////////////////////////////////////////////////
-
- var cachedState, lastHistoryState,
- lastBrowserUrl = location.href,
- baseElement = document.find('base'),
- pendingLocation = null;
-
- cacheState();
- lastHistoryState = cachedState;
-
- /**
- * @name $browser#url
- *
- * @description
- * GETTER:
- * Without any argument, this method just returns current value of location.href.
- *
- * SETTER:
- * With at least one argument, this method sets url to new value.
- * If html5 history api supported, pushState/replaceState is used, otherwise
- * location.href/location.replace is used.
- * Returns its own instance to allow chaining
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to change url.
- *
- * @param {string} url New url (when used as setter)
- * @param {boolean=} replace Should new url replace current history record?
- * @param {object=} state object to use with pushState/replaceState
- */
- self.url = function(url, replace, state) {
- // In modern browsers `history.state` is `null` by default; treating it separately
- // from `undefined` would cause `$browser.url('/foo')` to change `history.state`
- // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.
- if (isUndefined(state)) {
- state = null;
- }
-
- // Android Browser BFCache causes location, history reference to become stale.
- if (location !== window.location) location = window.location;
- if (history !== window.history) history = window.history;
-
- // setter
- if (url) {
- var sameState = lastHistoryState === state;
-
- // Don't change anything if previous and current URLs and states match. This also prevents
- // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.
- // See https://github.com/angular/angular.js/commit/ffb2701
- if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {
- return self;
- }
- var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);
- lastBrowserUrl = url;
- lastHistoryState = state;
- // Don't use history API if only the hash changed
- // due to a bug in IE10/IE11 which leads
- // to not firing a `hashchange` nor `popstate` event
- // in some cases (see #9143).
- if ($sniffer.history && (!sameBase || !sameState)) {
- history[replace ? 'replaceState' : 'pushState'](state, '', url);
- cacheState();
- // Do the assignment again so that those two variables are referentially identical.
- lastHistoryState = cachedState;
- } else {
- if (!sameBase || pendingLocation) {
- pendingLocation = url;
- }
- if (replace) {
- location.replace(url);
- } else if (!sameBase) {
- location.href = url;
- } else {
- location.hash = getHash(url);
- }
- if (location.href !== url) {
- pendingLocation = url;
- }
- }
- return self;
- // getter
- } else {
- // - pendingLocation is needed as browsers don't allow to read out
- // the new location.href if a reload happened or if there is a bug like in iOS 9 (see
- // https://openradar.appspot.com/22186109).
- // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
- return pendingLocation || location.href.replace(/%27/g,"'");
- }
- };
-
- /**
- * @name $browser#state
- *
- * @description
- * This method is a getter.
- *
- * Return history.state or null if history.state is undefined.
- *
- * @returns {object} state
- */
- self.state = function() {
- return cachedState;
- };
-
- var urlChangeListeners = [],
- urlChangeInit = false;
-
- function cacheStateAndFireUrlChange() {
- pendingLocation = null;
- cacheState();
- fireUrlChange();
- }
-
- function getCurrentState() {
- try {
- return history.state;
- } catch (e) {
- // MSIE can reportedly throw when there is no state (UNCONFIRMED).
- }
- }
-
- // This variable should be used *only* inside the cacheState function.
- var lastCachedState = null;
- function cacheState() {
- // This should be the only place in $browser where `history.state` is read.
- cachedState = getCurrentState();
- cachedState = isUndefined(cachedState) ? null : cachedState;
-
- // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
- if (equals(cachedState, lastCachedState)) {
- cachedState = lastCachedState;
- }
- lastCachedState = cachedState;
- }
-
- function fireUrlChange() {
- if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {
- return;
- }
-
- lastBrowserUrl = self.url();
- lastHistoryState = cachedState;
- forEach(urlChangeListeners, function(listener) {
- listener(self.url(), cachedState);
- });
- }
-
- /**
- * @name $browser#onUrlChange
- *
- * @description
- * Register callback function that will be called, when url changes.
- *
- * It's only called when the url is changed from outside of angular:
- * - user types different url into address bar
- * - user clicks on history (forward/back) button
- * - user clicks on a link
- *
- * It's not called when url is changed by $browser.url() method
- *
- * The listener gets called with new url as parameter.
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to monitor url changes in angular apps.
- *
- * @param {function(string)} listener Listener function to be called when url changes.
- * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
- */
- self.onUrlChange = function(callback) {
- // TODO(vojta): refactor to use node's syntax for events
- if (!urlChangeInit) {
- // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)
- // don't fire popstate when user change the address bar and don't fire hashchange when url
- // changed by push/replaceState
-
- // html5 history api - popstate event
- if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);
- // hashchange event
- jqLite(window).on('hashchange', cacheStateAndFireUrlChange);
-
- urlChangeInit = true;
- }
-
- urlChangeListeners.push(callback);
- return callback;
- };
-
- /**
- * @private
- * Remove popstate and hashchange handler from window.
- *
- * NOTE: this api is intended for use only by $rootScope.
- */
- self.$$applicationDestroyed = function() {
- jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);
- };
-
- /**
- * Checks whether the url has changed outside of Angular.
- * Needs to be exported to be able to check for changes that have been done in sync,
- * as hashchange/popstate events fire in async.
- */
- self.$$checkUrlChange = fireUrlChange;
-
- //////////////////////////////////////////////////////////////
- // Misc API
- //////////////////////////////////////////////////////////////
-
- /**
- * @name $browser#baseHref
- *
- * @description
- * Returns current <base href>
- * (always relative - without domain)
- *
- * @returns {string} The current base href
- */
- self.baseHref = function() {
- var href = baseElement.attr('href');
- return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : '';
- };
-
- /**
- * @name $browser#defer
- * @param {function()} fn A function, who's execution should be deferred.
- * @param {number=} [delay=0] of milliseconds to defer the function execution.
- * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
- *
- * @description
- * Executes a fn asynchronously via `setTimeout(fn, delay)`.
- *
- * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
- * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
- * via `$browser.defer.flush()`.
- *
- */
- self.defer = function(fn, delay) {
- var timeoutId;
- outstandingRequestCount++;
- timeoutId = setTimeout(function() {
- delete pendingDeferIds[timeoutId];
- completeOutstandingRequest(fn);
- }, delay || 0);
- pendingDeferIds[timeoutId] = true;
- return timeoutId;
- };
-
-
- /**
- * @name $browser#defer.cancel
- *
- * @description
- * Cancels a deferred task identified with `deferId`.
- *
- * @param {*} deferId Token returned by the `$browser.defer` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- self.defer.cancel = function(deferId) {
- if (pendingDeferIds[deferId]) {
- delete pendingDeferIds[deferId];
- clearTimeout(deferId);
- completeOutstandingRequest(noop);
- return true;
- }
- return false;
- };
-
-}
-
-function $BrowserProvider() {
- this.$get = ['$window', '$log', '$sniffer', '$document',
- function($window, $log, $sniffer, $document) {
- return new Browser($window, $document, $log, $sniffer);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $cacheFactory
- *
- * @description
- * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
- * them.
- *
- * ```js
- *
- * var cache = $cacheFactory('cacheId');
- * expect($cacheFactory.get('cacheId')).toBe(cache);
- * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
- *
- * cache.put("key", "value");
- * cache.put("another key", "another value");
- *
- * // We've specified no options on creation
- * expect(cache.info()).toEqual({id: 'cacheId', size: 2});
- *
- * ```
- *
- *
- * @param {string} cacheId Name or id of the newly created cache.
- * @param {object=} options Options object that specifies the cache behavior. Properties:
- *
- * - `{number=}` `capacity` — turns the cache into LRU cache.
- *
- * @returns {object} Newly created cache object with the following set of methods:
- *
- * - `{object}` `info()` — Returns id, size, and options of cache.
- * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns
- * it.
- * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.
- * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.
- * - `{void}` `removeAll()` — Removes all cached values.
- * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
- *
- * @example
- <example module="cacheExampleApp">
- <file name="index.html">
- <div ng-controller="CacheController">
- <input ng-model="newCacheKey" placeholder="Key">
- <input ng-model="newCacheValue" placeholder="Value">
- <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
-
- <p ng-if="keys.length">Cached Values</p>
- <div ng-repeat="key in keys">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="cache.get(key)"></b>
- </div>
-
- <p>Cache Info</p>
- <div ng-repeat="(key, value) in cache.info()">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="value"></b>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cacheExampleApp', []).
- controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
- $scope.keys = [];
- $scope.cache = $cacheFactory('cacheId');
- $scope.put = function(key, value) {
- if (angular.isUndefined($scope.cache.get(key))) {
- $scope.keys.push(key);
- }
- $scope.cache.put(key, angular.isUndefined(value) ? null : value);
- };
- }]);
- </file>
- <file name="style.css">
- p {
- margin: 10px 0 3px;
- }
- </file>
- </example>
- */
-function $CacheFactoryProvider() {
-
- this.$get = function() {
- var caches = {};
-
- function cacheFactory(cacheId, options) {
- if (cacheId in caches) {
- throw minErr('$cacheFactory')('iid', "CacheId '{0}' is already taken!", cacheId);
- }
-
- var size = 0,
- stats = extend({}, options, {id: cacheId}),
- data = createMap(),
- capacity = (options && options.capacity) || Number.MAX_VALUE,
- lruHash = createMap(),
- freshEnd = null,
- staleEnd = null;
-
- /**
- * @ngdoc type
- * @name $cacheFactory.Cache
- *
- * @description
- * A cache object used to store and retrieve data, primarily used by
- * {@link $http $http} and the {@link ng.directive:script script} directive to cache
- * templates and other data.
- *
- * ```js
- * angular.module('superCache')
- * .factory('superCache', ['$cacheFactory', function($cacheFactory) {
- * return $cacheFactory('super-cache');
- * }]);
- * ```
- *
- * Example test:
- *
- * ```js
- * it('should behave like a cache', inject(function(superCache) {
- * superCache.put('key', 'value');
- * superCache.put('another key', 'another value');
- *
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 2
- * });
- *
- * superCache.remove('another key');
- * expect(superCache.get('another key')).toBeUndefined();
- *
- * superCache.removeAll();
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 0
- * });
- * }));
- * ```
- */
- return caches[cacheId] = {
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#put
- * @kind function
- *
- * @description
- * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
- * retrieved later, and incrementing the size of the cache if the key was not already
- * present in the cache. If behaving like an LRU cache, it will also remove stale
- * entries from the set.
- *
- * It will not insert undefined values into the cache.
- *
- * @param {string} key the key under which the cached data is stored.
- * @param {*} value the value to store alongside the key. If it is undefined, the key
- * will not be stored.
- * @returns {*} the value stored.
- */
- put: function(key, value) {
- if (isUndefined(value)) return;
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
-
- refresh(lruEntry);
- }
-
- if (!(key in data)) size++;
- data[key] = value;
-
- if (size > capacity) {
- this.remove(staleEnd.key);
- }
-
- return value;
- },
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#get
- * @kind function
- *
- * @description
- * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the data to be retrieved
- * @returns {*} the value stored.
- */
- get: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- refresh(lruEntry);
- }
-
- return data[key];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#remove
- * @kind function
- *
- * @description
- * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the entry to be removed
- */
- remove: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- if (lruEntry == freshEnd) freshEnd = lruEntry.p;
- if (lruEntry == staleEnd) staleEnd = lruEntry.n;
- link(lruEntry.n,lruEntry.p);
-
- delete lruHash[key];
- }
-
- if (!(key in data)) return;
-
- delete data[key];
- size--;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#removeAll
- * @kind function
- *
- * @description
- * Clears the cache object of any entries.
- */
- removeAll: function() {
- data = createMap();
- size = 0;
- lruHash = createMap();
- freshEnd = staleEnd = null;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#destroy
- * @kind function
- *
- * @description
- * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
- * removing it from the {@link $cacheFactory $cacheFactory} set.
- */
- destroy: function() {
- data = null;
- stats = null;
- lruHash = null;
- delete caches[cacheId];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#info
- * @kind function
- *
- * @description
- * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
- *
- * @returns {object} an object with the following properties:
- * <ul>
- * <li>**id**: the id of the cache instance</li>
- * <li>**size**: the number of entries kept in the cache instance</li>
- * <li>**...**: any additional properties from the options object when creating the
- * cache.</li>
- * </ul>
- */
- info: function() {
- return extend({}, stats, {size: size});
- }
- };
-
-
- /**
- * makes the `entry` the freshEnd of the LRU linked list
- */
- function refresh(entry) {
- if (entry != freshEnd) {
- if (!staleEnd) {
- staleEnd = entry;
- } else if (staleEnd == entry) {
- staleEnd = entry.n;
- }
-
- link(entry.n, entry.p);
- link(entry, freshEnd);
- freshEnd = entry;
- freshEnd.n = null;
- }
- }
-
-
- /**
- * bidirectionally links two entries of the LRU linked list
- */
- function link(nextEntry, prevEntry) {
- if (nextEntry != prevEntry) {
- if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify
- if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#info
- *
- * @description
- * Get information about all the caches that have been created
- *
- * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
- */
- cacheFactory.info = function() {
- var info = {};
- forEach(caches, function(cache, cacheId) {
- info[cacheId] = cache.info();
- });
- return info;
- };
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#get
- *
- * @description
- * Get access to a cache object by the `cacheId` used when it was created.
- *
- * @param {string} cacheId Name or id of a cache to access.
- * @returns {object} Cache object identified by the cacheId or undefined if no such cache.
- */
- cacheFactory.get = function(cacheId) {
- return caches[cacheId];
- };
-
-
- return cacheFactory;
- };
-}
-
-/**
- * @ngdoc service
- * @name $templateCache
- *
- * @description
- * The first time a template is used, it is loaded in the template cache for quick retrieval. You
- * can load templates directly into the cache in a `script` tag, or by consuming the
- * `$templateCache` service directly.
- *
- * Adding via the `script` tag:
- *
- * ```html
- * <script type="text/ng-template" id="templateId.html">
- * <p>This is the content of the template</p>
- * </script>
- * ```
- *
- * **Note:** the `script` tag containing the template does not need to be included in the `head` of
- * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,
- * element with ng-app attribute), otherwise the template will be ignored.
- *
- * Adding via the `$templateCache` service:
- *
- * ```js
- * var myApp = angular.module('myApp', []);
- * myApp.run(function($templateCache) {
- * $templateCache.put('templateId.html', 'This is the content of the template');
- * });
- * ```
- *
- * To retrieve the template later, simply use it in your HTML:
- * ```html
- * <div ng-include=" 'templateId.html' "></div>
- * ```
- *
- * or get it via Javascript:
- * ```js
- * $templateCache.get('templateId.html')
- * ```
- *
- * See {@link ng.$cacheFactory $cacheFactory}.
- *
- */
-function $TemplateCacheProvider() {
- this.$get = ['$cacheFactory', function($cacheFactory) {
- return $cacheFactory('templates');
- }];
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
- *
- * DOM-related variables:
- *
- * - "node" - DOM Node
- * - "element" - DOM Element or Node
- * - "$node" or "$element" - jqLite-wrapped node or element
- *
- *
- * Compiler related stuff:
- *
- * - "linkFn" - linking fn of a single directive
- * - "nodeLinkFn" - function that aggregates all linking fns for a particular node
- * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node
- * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList)
- */
-
-
-/**
- * @ngdoc service
- * @name $compile
- * @kind function
- *
- * @description
- * Compiles an HTML string or DOM into a template and produces a template function, which
- * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.
- *
- * The compilation is a process of walking the DOM tree and matching DOM elements to
- * {@link ng.$compileProvider#directive directives}.
- *
- * <div class="alert alert-warning">
- * **Note:** This document is an in-depth reference of all directive options.
- * For a gentle introduction to directives with examples of common use cases,
- * see the {@link guide/directive directive guide}.
- * </div>
- *
- * ## Comprehensive Directive API
- *
- * There are many different options for a directive.
- *
- * The difference resides in the return value of the factory function.
- * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
- * or just the `postLink` function (all other properties will have the default values).
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's recommended to use the "directive definition object" form.
- * </div>
- *
- * Here's an example directive declared with a Directive Definition Object:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * priority: 0,
- * template: '<div></div>', // or // function(tElement, tAttrs) { ... },
- * // or
- * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
- * transclude: false,
- * restrict: 'A',
- * templateNamespace: 'html',
- * scope: false,
- * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
- * controllerAs: 'stringIdentifier',
- * bindToController: false,
- * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
- * compile: function compile(tElement, tAttrs, transclude) {
- * return {
- * pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * }
- * // or
- * // return function postLink( ... ) { ... }
- * },
- * // or
- * // link: {
- * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * // post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * // }
- * // or
- * // link: function postLink( ... ) { ... }
- * };
- * return directiveDefinitionObject;
- * });
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** Any unspecified options will use the default value. You can see the default values below.
- * </div>
- *
- * Therefore the above can be simplified as:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * link: function postLink(scope, iElement, iAttrs) { ... }
- * };
- * return directiveDefinitionObject;
- * // or
- * // return function postLink(scope, iElement, iAttrs) { ... }
- * });
- * ```
- *
- *
- *
- * ### Directive Definition Object
- *
- * The directive definition object provides instructions to the {@link ng.$compile
- * compiler}. The attributes are:
- *
- * #### `multiElement`
- * When this property is set to true, the HTML compiler will collect DOM nodes between
- * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them
- * together as the directive elements. It is recommended that this feature be used on directives
- * which are not strictly behavioural (such as {@link ngClick}), and which
- * do not manipulate or replace child nodes (such as {@link ngInclude}).
- *
- * #### `priority`
- * When there are multiple directives defined on a single DOM element, sometimes it
- * is necessary to specify the order in which the directives are applied. The `priority` is used
- * to sort the directives before their `compile` functions get called. Priority is defined as a
- * number. Directives with greater numerical `priority` are compiled first. Pre-link functions
- * are also run in priority order, but post-link functions are run in reverse order. The order
- * of directives with the same priority is undefined. The default priority is `0`.
- *
- * #### `terminal`
- * If set to true then the current `priority` will be the last set of directives
- * which will execute (any directives at the current priority will still execute
- * as the order of execution on same `priority` is undefined). Note that expressions
- * and other directives used in the directive's template will also be excluded from execution.
- *
- * #### `scope`
- * The scope property can be `true`, an object or a falsy value:
- *
- * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.
- *
- * * **`true`:** A new child scope that prototypically inherits from its parent will be created for
- * the directive's element. If multiple directives on the same element request a new scope,
- * only one new scope is created. The new scope rule does not apply for the root of the template
- * since the root of the template always gets a new scope.
- *
- * * **`{...}` (an object hash):** A new "isolate" scope is created for the directive's element. The
- * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent
- * scope. This is useful when creating reusable components, which should not accidentally read or modify
- * data in the parent scope.
- *
- * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the
- * directive's element. These local properties are useful for aliasing values for templates. The keys in
- * the object hash map to the name of the property on the isolate scope; the values define how the property
- * is bound to the parent scope, via matching attributes on the directive's element:
- *
- * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is
- * always a string since DOM attributes are strings. If no `attr` name is specified then the
- * attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="hello {{name}}">` and widget definition
- * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect
- * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the
- * `localName` property on the widget scope. The `name` is read from the parent scope (not
- * component scope).
- *
- * * `=` or `=attr` - set up bi-directional binding between a local scope property and the
- * parent scope property of name defined via the value of the `attr` attribute. If no `attr`
- * name is specified then the attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="parentModel">` and widget definition of
- * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the
- * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected
- * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent
- * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You
- * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional. If
- * you want to shallow watch for changes (i.e. $watchCollection instead of $watch) you can use
- * `=*` or `=*attr` (`=*?` or `=*?attr` if the property is optional).
- *
- * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.
- * If no `attr` name is specified then the attribute name is assumed to be the same as the
- * local name. Given `<widget my-attr="count = count + value">` and widget definition of
- * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
- * a function wrapper for the `count = count + value` expression. Often it's desirable to
- * pass data from the isolated scope via an expression to the parent scope, this can be
- * done by passing a map of local variable names and values into the expression wrapper fn.
- * For example, if the expression is `increment(amount)` then we can specify the amount value
- * by calling the `localFn` as `localFn({amount: 22})`.
- *
- * In general it's possible to apply more than one directive to one element, but there might be limitations
- * depending on the type of scope required by the directives. The following points will help explain these limitations.
- * For simplicity only two directives are taken into account, but it is also applicable for several directives:
- *
- * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope
- * * **child scope** + **no scope** => Both directives will share one single child scope
- * * **child scope** + **child scope** => Both directives will share one single child scope
- * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use
- * its parent's scope
- * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot
- * be applied to the same element.
- * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives
- * cannot be applied to the same element.
- *
- *
- * #### `bindToController`
- * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will
- * allow a component to have its properties bound to the controller, rather than to scope. When the controller
- * is instantiated, the initial values of the isolate scope bindings are already available.
- *
- * #### `controller`
- * Controller constructor function. The controller is instantiated before the
- * pre-linking phase and can be accessed by other directives (see
- * `require` attribute). This allows the directives to communicate with each other and augment
- * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:
- *
- * * `$scope` - Current scope associated with the element
- * * `$element` - Current element
- * * `$attrs` - Current attributes object for the element
- * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:
- * `function([scope], cloneLinkingFn, futureParentElement)`.
- * * `scope`: optional argument to override the scope.
- * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.
- * * `futureParentElement`:
- * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.
- * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.
- * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)
- * and when the `cloneLinkinFn` is passed,
- * as those elements need to created and cloned in a special way when they are defined outside their
- * usual containers (e.g. like `<svg>`).
- * * See also the `directive.templateNamespace` property.
- *
- *
- * #### `require`
- * Require another directive and inject its controller as the fourth argument to the linking function. The
- * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
- * injected argument will be an array in corresponding order. If no such directive can be
- * found, or if the directive does not have a controller, then an error is raised (unless no link function
- * is specified, in which case error checking is skipped). The name can be prefixed with:
- *
- * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
- * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
- * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
- * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.
- * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
- * `null` to the `link` fn if not found.
- * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass
- * `null` to the `link` fn if not found.
- *
- *
- * #### `controllerAs`
- * Identifier name for a reference to the controller in the directive's scope.
- * This allows the controller to be referenced from the directive template. This is especially
- * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible
- * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the
- * `controllerAs` reference might overwrite a property that already exists on the parent scope.
- *
- *
- * #### `restrict`
- * String of subset of `EACM` which restricts the directive to a specific directive
- * declaration style. If omitted, the defaults (elements and attributes) are used.
- *
- * * `E` - Element name (default): `<my-directive></my-directive>`
- * * `A` - Attribute (default): `<div my-directive="exp"></div>`
- * * `C` - Class: `<div class="my-directive: exp;"></div>`
- * * `M` - Comment: `<!-- directive: my-directive exp -->`
- *
- *
- * #### `templateNamespace`
- * String representing the document type used by the markup in the template.
- * AngularJS needs this information as those elements need to be created and cloned
- * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.
- *
- * * `html` - All root nodes in the template are HTML. Root nodes may also be
- * top-level elements such as `<svg>` or `<math>`.
- * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).
- * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).
- *
- * If no `templateNamespace` is specified, then the namespace is considered to be `html`.
- *
- * #### `template`
- * HTML markup that may:
- * * Replace the contents of the directive's element (default).
- * * Replace the directive's element itself (if `replace` is true - DEPRECATED).
- * * Wrap the contents of the directive's element (if `transclude` is true).
- *
- * Value may be:
- *
- * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.
- * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
- * function api below) and returns a string value.
- *
- *
- * #### `templateUrl`
- * This is similar to `template` but the template is loaded from the specified URL, asynchronously.
- *
- * Because template loading is asynchronous the compiler will suspend compilation of directives on that element
- * for later when the template has been resolved. In the meantime it will continue to compile and link
- * sibling and parent elements as though this element had not contained any directives.
- *
- * The compiler does not suspend the entire compilation to wait for templates to be loaded because this
- * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
- * case when only one deeply nested directive has `templateUrl`.
- *
- * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}
- *
- * You can specify `templateUrl` as a string representing the URL or as a function which takes two
- * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
- * a string value representing the url. In either case, the template URL is passed through {@link
- * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
- *
- *
- * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)
- * specify what the template should replace. Defaults to `false`.
- *
- * * `true` - the template will replace the directive's element.
- * * `false` - the template will replace the contents of the directive's element.
- *
- * The replacement process migrates all of the attributes / classes from the old element to the new
- * one. See the {@link guide/directive#template-expanding-directive
- * Directives Guide} for an example.
- *
- * There are very few scenarios where element replacement is required for the application function,
- * the main one being reusable custom components that are used within SVG contexts
- * (because SVG doesn't work with custom elements in the DOM tree).
- *
- * #### `transclude`
- * Extract the contents of the element where the directive appears and make it available to the directive.
- * The contents are compiled and provided to the directive as a **transclusion function**. See the
- * {@link $compile#transclusion Transclusion} section below.
- *
- * There are two kinds of transclusion depending upon whether you want to transclude just the contents of the
- * directive's element or the entire element:
- *
- * * `true` - transclude the content (i.e. the child nodes) of the directive's element.
- * * `'element'` - transclude the whole of the directive's element including any directives on this
- * element that defined at a lower priority than this directive. When used, the `template`
- * property is ignored.
- *
- *
- * #### `compile`
- *
- * ```js
- * function compile(tElement, tAttrs, transclude) { ... }
- * ```
- *
- * The compile function deals with transforming the template DOM. Since most directives do not do
- * template transformation, it is not used often. The compile function takes the following arguments:
- *
- * * `tElement` - template element - The element where the directive has been declared. It is
- * safe to do template transformation on the element and child elements only.
- *
- * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared
- * between all directive compile functions.
- *
- * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`
- *
- * <div class="alert alert-warning">
- * **Note:** The template instance and the link instance may be different objects if the template has
- * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that
- * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
- * should be done in a linking function rather than in a compile function.
- * </div>
-
- * <div class="alert alert-warning">
- * **Note:** The compile function cannot handle directives that recursively use themselves in their
- * own templates or compile functions. Compiling these directives results in an infinite loop and a
- * stack overflow errors.
- *
- * This can be avoided by manually using $compile in the postLink function to imperatively compile
- * a directive's template instead of relying on automatic template compilation via `template` or
- * `templateUrl` declaration or manual compilation inside the compile function.
- * </div>
- *
- * <div class="alert alert-danger">
- * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
- * e.g. does not know about the right outer scope. Please use the transclude function that is passed
- * to the link function instead.
- * </div>
-
- * A compile function can have a return value which can be either a function or an object.
- *
- * * returning a (post-link) function - is equivalent to registering the linking function via the
- * `link` property of the config object when the compile function is empty.
- *
- * * returning an object with function(s) registered via `pre` and `post` properties - allows you to
- * control when a linking function should be called during the linking phase. See info about
- * pre-linking and post-linking functions below.
- *
- *
- * #### `link`
- * This property is used only if the `compile` property is not defined.
- *
- * ```js
- * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }
- * ```
- *
- * The link function is responsible for registering DOM listeners as well as updating the DOM. It is
- * executed after the template has been cloned. This is where most of the directive logic will be
- * put.
- *
- * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the
- * directive for registering {@link ng.$rootScope.Scope#$watch watches}.
- *
- * * `iElement` - instance element - The element where the directive is to be used. It is safe to
- * manipulate the children of the element only in `postLink` function since the children have
- * already been linked.
- *
- * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared
- * between all directive linking functions.
- *
- * * `controller` - the directive's required controller instance(s) - Instances are shared
- * among all directives, which allows the directives to use the controllers as a communication
- * channel. The exact value depends on the directive's `require` property:
- * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one
- * * `string`: the controller instance
- * * `array`: array of controller instances
- *
- * If a required controller cannot be found, and it is optional, the instance is `null`,
- * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.
- *
- * Note that you can also require the directive's own controller - it will be made available like
- * any other controller.
- *
- * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude`
- * parameter of directive controllers, see there for details.
- * `function([scope], cloneLinkingFn, futureParentElement)`.
- *
- * #### Pre-linking function
- *
- * Executed before the child elements are linked. Not safe to do DOM transformation since the
- * compiler linking function will fail to locate the correct elements for linking.
- *
- * #### Post-linking function
- *
- * Executed after the child elements are linked.
- *
- * Note that child elements that contain `templateUrl` directives will not have been compiled
- * and linked since they are waiting for their template to load asynchronously and their own
- * compilation and linking has been suspended until that occurs.
- *
- * It is safe to do DOM transformation in the post-linking function on elements that are not waiting
- * for their async templates to be resolved.
- *
- *
- * ### Transclusion
- *
- * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and
- * copying them to another part of the DOM, while maintaining their connection to the original AngularJS
- * scope from where they were taken.
- *
- * Transclusion is used (often with {@link ngTransclude}) to insert the
- * original contents of a directive's element into a specified place in the template of the directive.
- * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded
- * content has access to the properties on the scope from which it was taken, even if the directive
- * has isolated scope.
- * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.
- *
- * This makes it possible for the widget to have private state for its template, while the transcluded
- * content has access to its originating scope.
- *
- * <div class="alert alert-warning">
- * **Note:** When testing an element transclude directive you must not place the directive at the root of the
- * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
- * Testing Transclusion Directives}.
- * </div>
- *
- * #### Transclusion Functions
- *
- * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion
- * function** to the directive's `link` function and `controller`. This transclusion function is a special
- * **linking function** that will return the compiled contents linked to a new transclusion scope.
- *
- * <div class="alert alert-info">
- * If you are just using {@link ngTransclude} then you don't need to worry about this function, since
- * ngTransclude will deal with it for us.
- * </div>
- *
- * If you want to manually control the insertion and removal of the transcluded content in your directive
- * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery
- * object that contains the compiled DOM, which is linked to the correct transclusion scope.
- *
- * When you call a transclusion function you can pass in a **clone attach function**. This function accepts
- * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded
- * content and the `scope` is the newly created transclusion scope, to which the clone is bound.
- *
- * <div class="alert alert-info">
- * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a translude function
- * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.
- * </div>
- *
- * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone
- * attach function**:
- *
- * ```js
- * var transcludedContent, transclusionScope;
- *
- * $transclude(function(clone, scope) {
- * element.append(clone);
- * transcludedContent = clone;
- * transclusionScope = scope;
- * });
- * ```
- *
- * Later, if you want to remove the transcluded content from your DOM then you should also destroy the
- * associated transclusion scope:
- *
- * ```js
- * transcludedContent.remove();
- * transclusionScope.$destroy();
- * ```
- *
- * <div class="alert alert-info">
- * **Best Practice**: if you intend to add and remove transcluded content manually in your directive
- * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),
- * then you are also responsible for calling `$destroy` on the transclusion scope.
- * </div>
- *
- * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}
- * automatically destroy their transluded clones as necessary so you do not need to worry about this if
- * you are simply using {@link ngTransclude} to inject the transclusion into your directive.
- *
- *
- * #### Transclusion Scopes
- *
- * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion
- * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed
- * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it
- * was taken.
- *
- * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look
- * like this:
- *
- * ```html
- * <div ng-app>
- * <div isolate>
- * <div transclusion>
- * </div>
- * </div>
- * </div>
- * ```
- *
- * The `$parent` scope hierarchy will look like this:
- *
- * ```
- * - $rootScope
- * - isolate
- * - transclusion
- * ```
- *
- * but the scopes will inherit prototypically from different scopes to their `$parent`.
- *
- * ```
- * - $rootScope
- * - transclusion
- * - isolate
- * ```
- *
- *
- * ### Attributes
- *
- * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
- * `link()` or `compile()` functions. It has a variety of uses.
- *
- * accessing *Normalized attribute names:*
- * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.
- * the attributes object allows for normalized access to
- * the attributes.
- *
- * * *Directive inter-communication:* All directives share the same instance of the attributes
- * object which allows the directives to use the attributes object as inter directive
- * communication.
- *
- * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object
- * allowing other directives to read the interpolated value.
- *
- * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes
- * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also
- * the only way to easily get the actual value because during the linking phase the interpolation
- * hasn't been evaluated yet and so the value is at this time set to `undefined`.
- *
- * ```js
- * function linkingFn(scope, elm, attrs, ctrl) {
- * // get the attribute value
- * console.log(attrs.ngModel);
- *
- * // change the attribute
- * attrs.$set('ngModel', 'new value');
- *
- * // observe changes to interpolated attribute
- * attrs.$observe('ngModel', function(value) {
- * console.log('ngModel has changed value to ' + value);
- * });
- * }
- * ```
- *
- * ## Example
- *
- * <div class="alert alert-warning">
- * **Note**: Typically directives are registered with `module.directive`. The example below is
- * to illustrate how `$compile` works.
- * </div>
- *
- <example module="compileExample">
- <file name="index.html">
- <script>
- angular.module('compileExample', [], function($compileProvider) {
- // configure new 'compile' directive by passing a directive
- // factory function. The factory function injects the '$compile'
- $compileProvider.directive('compile', function($compile) {
- // directive factory creates a link function
- return function(scope, element, attrs) {
- scope.$watch(
- function(scope) {
- // watch the 'compile' expression for changes
- return scope.$eval(attrs.compile);
- },
- function(value) {
- // when the 'compile' expression changes
- // assign it into the current DOM
- element.html(value);
-
- // compile the new DOM and link it to the current
- // scope.
- // NOTE: we only compile .childNodes so that
- // we don't get into infinite loop compiling ourselves
- $compile(element.contents())(scope);
- }
- );
- };
- });
- })
- .controller('GreeterController', ['$scope', function($scope) {
- $scope.name = 'Angular';
- $scope.html = 'Hello {{name}}';
- }]);
- </script>
- <div ng-controller="GreeterController">
- <input ng-model="name"> <br/>
- <textarea ng-model="html"></textarea> <br/>
- <div compile="html"></div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should auto compile', function() {
- var textarea = $('textarea');
- var output = $('div[compile]');
- // The initial state reads 'Hello Angular'.
- expect(output.getText()).toBe('Hello Angular');
- textarea.clear();
- textarea.sendKeys('{{name}}!');
- expect(output.getText()).toBe('Angular!');
- });
- </file>
- </example>
-
- *
- *
- * @param {string|DOMElement} element Element or HTML string to compile into a template function.
- * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.
- *
- * <div class="alert alert-danger">
- * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it
- * e.g. will not use the right outer scope. Please pass the transclude function as a
- * `parentBoundTranscludeFn` to the link function instead.
- * </div>
- *
- * @param {number} maxPriority only apply directives lower than given priority (Only effects the
- * root element(s), not their children)
- * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template
- * (a DOM element/tree) to a scope. Where:
- *
- * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
- * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
- * `template` and call the `cloneAttachFn` function allowing the caller to attach the
- * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
- * called as: <br/> `cloneAttachFn(clonedElement, scope)` where:
- *
- * * `clonedElement` - is a clone of the original `element` passed into the compiler.
- * * `scope` - is the current scope with which the linking function is working with.
- *
- * * `options` - An optional object hash with linking options. If `options` is provided, then the following
- * keys may be used to control linking behavior:
- *
- * * `parentBoundTranscludeFn` - the transclude function made available to
- * directives; if given, it will be passed through to the link functions of
- * directives found in `element` during compilation.
- * * `transcludeControllers` - an object hash with keys that map controller names
- * to controller instances; if given, it will make the controllers
- * available to directives.
- * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add
- * the cloned elements; only needed for transcludes that are allowed to contain non html
- * elements (e.g. SVG elements). See also the directive.controller property.
- *
- * Calling the linking function returns the element of the template. It is either the original
- * element passed in, or the clone of the element if the `cloneAttachFn` is provided.
- *
- * After linking the view is not updated until after a call to $digest which typically is done by
- * Angular automatically.
- *
- * If you need access to the bound view, there are two ways to do it:
- *
- * - If you are not asking the linking function to clone the template, create the DOM element(s)
- * before you send them to the compiler and keep this reference around.
- * ```js
- * var element = $compile('<p>{{total}}</p>')(scope);
- * ```
- *
- * - if on the other hand, you need the element to be cloned, the view reference from the original
- * example would not point to the clone, but rather to the original template that was cloned. In
- * this case, you can access the clone via the cloneAttachFn:
- * ```js
- * var templateElement = angular.element('<p>{{total}}</p>'),
- * scope = ....;
- *
- * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
- * //attach the clone to DOM document at the right place
- * });
- *
- * //now we have reference to the cloned DOM via `clonedElement`
- * ```
- *
- *
- * For information on how the compiler works, see the
- * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
- */
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc provider
- * @name $compileProvider
- *
- * @description
- */
-$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
-function $CompileProvider($provide, $$sanitizeUriProvider) {
- var hasDirectives = {},
- Suffix = 'Directive',
- COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\w\-]+)\s+(.*)$/,
- CLASS_DIRECTIVE_REGEXP = /(([\w\-]+)(?:\:([^;]+))?;?)/,
- ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),
- REQUIRE_PREFIX_REGEXP = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/;
-
- // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
- // The assumption is that future DOM event attribute names will begin with
- // 'on' and be composed of only English letters.
- var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;
-
- function parseIsolateBindings(scope, directiveName, isController) {
- var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/;
-
- var bindings = {};
-
- forEach(scope, function(definition, scopeName) {
- var match = definition.match(LOCAL_REGEXP);
-
- if (!match) {
- throw $compileMinErr('iscp',
- "Invalid {3} for directive '{0}'." +
- " Definition: {... {1}: '{2}' ...}",
- directiveName, scopeName, definition,
- (isController ? "controller bindings definition" :
- "isolate scope definition"));
- }
-
- bindings[scopeName] = {
- mode: match[1][0],
- collection: match[2] === '*',
- optional: match[3] === '?',
- attrName: match[4] || scopeName
- };
- });
-
- return bindings;
- }
-
- function parseDirectiveBindings(directive, directiveName) {
- var bindings = {
- isolateScope: null,
- bindToController: null
- };
- if (isObject(directive.scope)) {
- if (directive.bindToController === true) {
- bindings.bindToController = parseIsolateBindings(directive.scope,
- directiveName, true);
- bindings.isolateScope = {};
- } else {
- bindings.isolateScope = parseIsolateBindings(directive.scope,
- directiveName, false);
- }
- }
- if (isObject(directive.bindToController)) {
- bindings.bindToController =
- parseIsolateBindings(directive.bindToController, directiveName, true);
- }
- if (isObject(bindings.bindToController)) {
- var controller = directive.controller;
- var controllerAs = directive.controllerAs;
- if (!controller) {
- // There is no controller, there may or may not be a controllerAs property
- throw $compileMinErr('noctrl',
- "Cannot bind to controller without directive '{0}'s controller.",
- directiveName);
- } else if (!identifierForController(controller, controllerAs)) {
- // There is a controller, but no identifier or controllerAs property
- throw $compileMinErr('noident',
- "Cannot bind to controller without identifier for directive '{0}'.",
- directiveName);
- }
- }
- return bindings;
- }
-
- function assertValidDirectiveName(name) {
- var letter = name.charAt(0);
- if (!letter || letter !== lowercase(letter)) {
- throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name);
- }
- if (name !== name.trim()) {
- throw $compileMinErr('baddir',
- "Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",
- name);
- }
- }
-
- /**
- * @ngdoc method
- * @name $compileProvider#directive
- * @kind function
- *
- * @description
- * Register a new directive with the compiler.
- *
- * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
- * will match as <code>ng-bind</code>), or an object map of directives where the keys are the
- * names and the values are the factories.
- * @param {Function|Array} directiveFactory An injectable directive factory function. See
- * {@link guide/directive} for more info.
- * @returns {ng.$compileProvider} Self for chaining.
- */
- this.directive = function registerDirective(name, directiveFactory) {
- assertNotHasOwnProperty(name, 'directive');
- if (isString(name)) {
- assertValidDirectiveName(name);
- assertArg(directiveFactory, 'directiveFactory');
- if (!hasDirectives.hasOwnProperty(name)) {
- hasDirectives[name] = [];
- $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',
- function($injector, $exceptionHandler) {
- var directives = [];
- forEach(hasDirectives[name], function(directiveFactory, index) {
- try {
- var directive = $injector.invoke(directiveFactory);
- if (isFunction(directive)) {
- directive = { compile: valueFn(directive) };
- } else if (!directive.compile && directive.link) {
- directive.compile = valueFn(directive.link);
- }
- directive.priority = directive.priority || 0;
- directive.index = index;
- directive.name = directive.name || name;
- directive.require = directive.require || (directive.controller && directive.name);
- directive.restrict = directive.restrict || 'EA';
- var bindings = directive.$$bindings =
- parseDirectiveBindings(directive, directive.name);
- if (isObject(bindings.isolateScope)) {
- directive.$$isolateBindings = bindings.isolateScope;
- }
- directive.$$moduleName = directiveFactory.$$moduleName;
- directives.push(directive);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- return directives;
- }]);
- }
- hasDirectives[name].push(directiveFactory);
- } else {
- forEach(name, reverseParams(registerDirective));
- }
- return this;
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#aHrefSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at preventing XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.aHrefSanitizationWhitelist();
- }
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#imgSrcSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();
- }
- };
-
- /**
- * @ngdoc method
- * @name $compileProvider#debugInfoEnabled
- *
- * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the
- * current debugInfoEnabled state
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- *
- * @kind function
- *
- * @description
- * Call this method to enable/disable various debug runtime information in the compiler such as adding
- * binding information and a reference to the current scope on to DOM elements.
- * If enabled, the compiler will add the following to DOM elements that have been bound to the scope
- * * `ng-binding` CSS class
- * * `$binding` data property containing an array of the binding expressions
- *
- * You may want to disable this in production for a significant performance boost. See
- * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.
- *
- * The default value is true.
- */
- var debugInfoEnabled = true;
- this.debugInfoEnabled = function(enabled) {
- if (isDefined(enabled)) {
- debugInfoEnabled = enabled;
- return this;
- }
- return debugInfoEnabled;
- };
-
- this.$get = [
- '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',
- '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',
- function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,
- $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {
-
- var Attributes = function(element, attributesToCopy) {
- if (attributesToCopy) {
- var keys = Object.keys(attributesToCopy);
- var i, l, key;
-
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- this[key] = attributesToCopy[key];
- }
- } else {
- this.$attr = {};
- }
-
- this.$$element = element;
- };
-
- Attributes.prototype = {
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$normalize
- * @kind function
- *
- * @description
- * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or
- * `data-`) to its normalized, camelCase form.
- *
- * Also there is special case for Moz prefix starting with upper case letter.
- *
- * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}
- *
- * @param {string} name Name to normalize
- */
- $normalize: directiveNormalize,
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$addClass
- * @kind function
- *
- * @description
- * Adds the CSS class value specified by the classVal parameter to the element. If animations
- * are enabled then an animation will be triggered for the class addition.
- *
- * @param {string} classVal The className value that will be added to the element
- */
- $addClass: function(classVal) {
- if (classVal && classVal.length > 0) {
- $animate.addClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$removeClass
- * @kind function
- *
- * @description
- * Removes the CSS class value specified by the classVal parameter from the element. If
- * animations are enabled then an animation will be triggered for the class removal.
- *
- * @param {string} classVal The className value that will be removed from the element
- */
- $removeClass: function(classVal) {
- if (classVal && classVal.length > 0) {
- $animate.removeClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$updateClass
- * @kind function
- *
- * @description
- * Adds and removes the appropriate CSS class values to the element based on the difference
- * between the new and old CSS class values (specified as newClasses and oldClasses).
- *
- * @param {string} newClasses The current CSS className value
- * @param {string} oldClasses The former CSS className value
- */
- $updateClass: function(newClasses, oldClasses) {
- var toAdd = tokenDifference(newClasses, oldClasses);
- if (toAdd && toAdd.length) {
- $animate.addClass(this.$$element, toAdd);
- }
-
- var toRemove = tokenDifference(oldClasses, newClasses);
- if (toRemove && toRemove.length) {
- $animate.removeClass(this.$$element, toRemove);
- }
- },
-
- /**
- * Set a normalized attribute on the element in a way such that all directives
- * can share the attribute. This function properly handles boolean attributes.
- * @param {string} key Normalized key. (ie ngAttribute)
- * @param {string|boolean} value The value to set. If `null` attribute will be deleted.
- * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.
- * Defaults to true.
- * @param {string=} attrName Optional none normalized name. Defaults to key.
- */
- $set: function(key, value, writeAttr, attrName) {
- // TODO: decide whether or not to throw an error if "class"
- //is set through this function since it may cause $updateClass to
- //become unstable.
-
- var node = this.$$element[0],
- booleanKey = getBooleanAttrName(node, key),
- aliasedKey = getAliasedAttrName(key),
- observer = key,
- nodeName;
-
- if (booleanKey) {
- this.$$element.prop(key, value);
- attrName = booleanKey;
- } else if (aliasedKey) {
- this[aliasedKey] = value;
- observer = aliasedKey;
- }
-
- this[key] = value;
-
- // translate normalized key to actual key
- if (attrName) {
- this.$attr[key] = attrName;
- } else {
- attrName = this.$attr[key];
- if (!attrName) {
- this.$attr[key] = attrName = snake_case(key, '-');
- }
- }
-
- nodeName = nodeName_(this.$$element);
-
- if ((nodeName === 'a' && key === 'href') ||
- (nodeName === 'img' && key === 'src')) {
- // sanitize a[href] and img[src] values
- this[key] = value = $$sanitizeUri(value, key === 'src');
- } else if (nodeName === 'img' && key === 'srcset') {
- // sanitize img[srcset] values
- var result = "";
-
- // first check if there are spaces because it's not the same pattern
- var trimmedSrcset = trim(value);
- // ( 999x ,| 999w ,| ,|, )
- var srcPattern = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/;
- var pattern = /\s/.test(trimmedSrcset) ? srcPattern : /(,)/;
-
- // split srcset into tuple of uri and descriptor except for the last item
- var rawUris = trimmedSrcset.split(pattern);
-
- // for each tuples
- var nbrUrisWith2parts = Math.floor(rawUris.length / 2);
- for (var i = 0; i < nbrUrisWith2parts; i++) {
- var innerIdx = i * 2;
- // sanitize the uri
- result += $$sanitizeUri(trim(rawUris[innerIdx]), true);
- // add the descriptor
- result += (" " + trim(rawUris[innerIdx + 1]));
- }
-
- // split the last item into uri and descriptor
- var lastTuple = trim(rawUris[i * 2]).split(/\s/);
-
- // sanitize the last uri
- result += $$sanitizeUri(trim(lastTuple[0]), true);
-
- // and add the last descriptor if any
- if (lastTuple.length === 2) {
- result += (" " + trim(lastTuple[1]));
- }
- this[key] = value = result;
- }
-
- if (writeAttr !== false) {
- if (value === null || isUndefined(value)) {
- this.$$element.removeAttr(attrName);
- } else {
- this.$$element.attr(attrName, value);
- }
- }
-
- // fire observers
- var $$observers = this.$$observers;
- $$observers && forEach($$observers[observer], function(fn) {
- try {
- fn(value);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$observe
- * @kind function
- *
- * @description
- * Observes an interpolated attribute.
- *
- * The observer function will be invoked once during the next `$digest` following
- * compilation. The observer is then invoked whenever the interpolated value
- * changes.
- *
- * @param {string} key Normalized key. (ie ngAttribute) .
- * @param {function(interpolatedValue)} fn Function that will be called whenever
- the interpolated value of the attribute changes.
- * See the {@link guide/directive#text-and-attribute-bindings Directives} guide for more info.
- * @returns {function()} Returns a deregistration function for this observer.
- */
- $observe: function(key, fn) {
- var attrs = this,
- $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),
- listeners = ($$observers[key] || ($$observers[key] = []));
-
- listeners.push(fn);
- $rootScope.$evalAsync(function() {
- if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {
- // no one registered attribute interpolation function, so lets call it manually
- fn(attrs[key]);
- }
- });
-
- return function() {
- arrayRemove(listeners, fn);
- };
- }
- };
-
-
- function safeAddClass($element, className) {
- try {
- $element.addClass(className);
- } catch (e) {
- // ignore, since it means that we are trying to set class on
- // SVG element, where class name is read-only.
- }
- }
-
-
- var startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')
- ? identity
- : function denormalizeTemplate(template) {
- return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
- },
- NG_ATTR_BINDING = /^ngAttr[A-Z]/;
- var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;
-
- compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {
- var bindings = $element.data('$binding') || [];
-
- if (isArray(binding)) {
- bindings = bindings.concat(binding);
- } else {
- bindings.push(binding);
- }
-
- $element.data('$binding', bindings);
- } : noop;
-
- compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {
- safeAddClass($element, 'ng-binding');
- } : noop;
-
- compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {
- var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';
- $element.data(dataName, scope);
- } : noop;
-
- compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {
- safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');
- } : noop;
-
- return compile;
-
- //================================
-
- function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,
- previousCompileContext) {
- if (!($compileNodes instanceof jqLite)) {
- // jquery always rewraps, whereas we need to preserve the original selector so that we can
- // modify it.
- $compileNodes = jqLite($compileNodes);
- }
- // We can not compile top level text elements since text nodes can be merged and we will
- // not be able to attach scope data to them, so we will wrap them in <span>
- forEach($compileNodes, function(node, index) {
- if (node.nodeType == NODE_TYPE_TEXT && node.nodeValue.match(/\S+/) /* non-empty */ ) {
- $compileNodes[index] = jqLite(node).wrap('<span></span>').parent()[0];
- }
- });
- var compositeLinkFn =
- compileNodes($compileNodes, transcludeFn, $compileNodes,
- maxPriority, ignoreDirective, previousCompileContext);
- compile.$$addScopeClass($compileNodes);
- var namespace = null;
- return function publicLinkFn(scope, cloneConnectFn, options) {
- assertArg(scope, 'scope');
-
- if (previousCompileContext && previousCompileContext.needsNewScope) {
- // A parent directive did a replace and a directive on this element asked
- // for transclusion, which caused us to lose a layer of element on which
- // we could hold the new transclusion scope, so we will create it manually
- // here.
- scope = scope.$parent.$new();
- }
-
- options = options || {};
- var parentBoundTranscludeFn = options.parentBoundTranscludeFn,
- transcludeControllers = options.transcludeControllers,
- futureParentElement = options.futureParentElement;
-
- // When `parentBoundTranscludeFn` is passed, it is a
- // `controllersBoundTransclude` function (it was previously passed
- // as `transclude` to directive.link) so we must unwrap it to get
- // its `boundTranscludeFn`
- if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {
- parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;
- }
-
- if (!namespace) {
- namespace = detectNamespaceForChildElements(futureParentElement);
- }
- var $linkNode;
- if (namespace !== 'html') {
- // When using a directive with replace:true and templateUrl the $compileNodes
- // (or a child element inside of them)
- // might change, so we need to recreate the namespace adapted compileNodes
- // for call to the link function.
- // Note: This will already clone the nodes...
- $linkNode = jqLite(
- wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())
- );
- } else if (cloneConnectFn) {
- // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
- // and sometimes changes the structure of the DOM.
- $linkNode = JQLitePrototype.clone.call($compileNodes);
- } else {
- $linkNode = $compileNodes;
- }
-
- if (transcludeControllers) {
- for (var controllerName in transcludeControllers) {
- $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);
- }
- }
-
- compile.$$addScopeInfo($linkNode, scope);
-
- if (cloneConnectFn) cloneConnectFn($linkNode, scope);
- if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);
- return $linkNode;
- };
- }
-
- function detectNamespaceForChildElements(parentElement) {
- // TODO: Make this detect MathML as well...
- var node = parentElement && parentElement[0];
- if (!node) {
- return 'html';
- } else {
- return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg' : 'html';
- }
- }
-
- /**
- * Compile function matches each node in nodeList against the directives. Once all directives
- * for a particular node are collected their compile functions are executed. The compile
- * functions return values - the linking functions - are combined into a composite linking
- * function, which is the a linking function for the node.
- *
- * @param {NodeList} nodeList an array of nodes or NodeList to compile
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new child of the transcluded parent scope.
- * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
- * the rootElement must be set the jqLite collection of the compile root. This is
- * needed so that the jqLite collection items can be replaced with widgets.
- * @param {number=} maxPriority Max directive priority.
- * @returns {Function} A composite linking function of all of the matched directives or null.
- */
- function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
- previousCompileContext) {
- var linkFns = [],
- attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;
-
- for (var i = 0; i < nodeList.length; i++) {
- attrs = new Attributes();
-
- // we must always refer to nodeList[i] since the nodes can be replaced underneath us.
- directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,
- ignoreDirective);
-
- nodeLinkFn = (directives.length)
- ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,
- null, [], [], previousCompileContext)
- : null;
-
- if (nodeLinkFn && nodeLinkFn.scope) {
- compile.$$addScopeClass(attrs.$$element);
- }
-
- childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||
- !(childNodes = nodeList[i].childNodes) ||
- !childNodes.length)
- ? null
- : compileNodes(childNodes,
- nodeLinkFn ? (
- (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)
- && nodeLinkFn.transclude) : transcludeFn);
-
- if (nodeLinkFn || childLinkFn) {
- linkFns.push(i, nodeLinkFn, childLinkFn);
- linkFnFound = true;
- nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;
- }
-
- //use the previous context only for the first element in the virtual group
- previousCompileContext = null;
- }
-
- // return a linking function if we have found anything, null otherwise
- return linkFnFound ? compositeLinkFn : null;
-
- function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
- var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;
- var stableNodeList;
-
-
- if (nodeLinkFnFound) {
- // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our
- // offsets don't get screwed up
- var nodeListLength = nodeList.length;
- stableNodeList = new Array(nodeListLength);
-
- // create a sparse array by only copying the elements which have a linkFn
- for (i = 0; i < linkFns.length; i+=3) {
- idx = linkFns[i];
- stableNodeList[idx] = nodeList[idx];
- }
- } else {
- stableNodeList = nodeList;
- }
-
- for (i = 0, ii = linkFns.length; i < ii;) {
- node = stableNodeList[linkFns[i++]];
- nodeLinkFn = linkFns[i++];
- childLinkFn = linkFns[i++];
-
- if (nodeLinkFn) {
- if (nodeLinkFn.scope) {
- childScope = scope.$new();
- compile.$$addScopeInfo(jqLite(node), childScope);
- } else {
- childScope = scope;
- }
-
- if (nodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(
- scope, nodeLinkFn.transclude, parentBoundTranscludeFn);
-
- } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {
- childBoundTranscludeFn = parentBoundTranscludeFn;
-
- } else if (!parentBoundTranscludeFn && transcludeFn) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);
-
- } else {
- childBoundTranscludeFn = null;
- }
-
- nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);
-
- } else if (childLinkFn) {
- childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
- }
- }
- }
- }
-
- function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
-
- var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
-
- if (!transcludedScope) {
- transcludedScope = scope.$new(false, containingScope);
- transcludedScope.$$transcluded = true;
- }
-
- return transcludeFn(transcludedScope, cloneFn, {
- parentBoundTranscludeFn: previousBoundTranscludeFn,
- transcludeControllers: controllers,
- futureParentElement: futureParentElement
- });
- };
-
- return boundTranscludeFn;
- }
-
- /**
- * Looks for directives on the given node and adds them to the directive collection which is
- * sorted.
- *
- * @param node Node to search.
- * @param directives An array to which the directives are added to. This array is sorted before
- * the function returns.
- * @param attrs The shared attrs object which is used to populate the normalized attributes.
- * @param {number=} maxPriority Max directive priority.
- */
- function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- var nodeType = node.nodeType,
- attrsMap = attrs.$attr,
- match,
- className;
-
- switch (nodeType) {
- case NODE_TYPE_ELEMENT: /* Element */
- // use the node name: <directive>
- addDirective(directives,
- directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);
-
- // iterate over the attributes
- for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
- j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {
- var attrStartName = false;
- var attrEndName = false;
-
- attr = nAttrs[j];
- name = attr.name;
- value = trim(attr.value);
-
- // support ngAttr attribute binding
- ngAttrName = directiveNormalize(name);
- if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
- name = name.replace(PREFIX_REGEXP, '')
- .substr(8).replace(/_(.)/g, function(match, letter) {
- return letter.toUpperCase();
- });
- }
-
- var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);
- if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {
- attrStartName = name;
- attrEndName = name.substr(0, name.length - 5) + 'end';
- name = name.substr(0, name.length - 6);
- }
-
- nName = directiveNormalize(name.toLowerCase());
- attrsMap[nName] = name;
- if (isNgAttr || !attrs.hasOwnProperty(nName)) {
- attrs[nName] = value;
- if (getBooleanAttrName(node, nName)) {
- attrs[nName] = true; // presence means true
- }
- }
- addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);
- addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
- attrEndName);
- }
-
- // use class as directive
- className = node.className;
- if (isObject(className)) {
- // Maybe SVGAnimatedString
- className = className.animVal;
- }
- if (isString(className) && className !== '') {
- while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
- nName = directiveNormalize(match[2]);
- if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[3]);
- }
- className = className.substr(match.index + match[0].length);
- }
- }
- break;
- case NODE_TYPE_TEXT: /* Text Node */
- if (msie === 11) {
- // Workaround for #11781
- while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) {
- node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;
- node.parentNode.removeChild(node.nextSibling);
- }
- }
- addTextInterpolateDirective(directives, node.nodeValue);
- break;
- case NODE_TYPE_COMMENT: /* Comment */
- try {
- match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- break;
- }
-
- directives.sort(byPriority);
- return directives;
- }
-
- /**
- * Given a node with an directive-start it collects all of the siblings until it finds
- * directive-end.
- * @param node
- * @param attrStart
- * @param attrEnd
- * @returns {*}
- */
- function groupScan(node, attrStart, attrEnd) {
- var nodes = [];
- var depth = 0;
- if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
- do {
- if (!node) {
- throw $compileMinErr('uterdir',
- "Unterminated attribute, found '{0}' but no matching '{1}' found.",
- attrStart, attrEnd);
- }
- if (node.nodeType == NODE_TYPE_ELEMENT) {
- if (node.hasAttribute(attrStart)) depth++;
- if (node.hasAttribute(attrEnd)) depth--;
- }
- nodes.push(node);
- node = node.nextSibling;
- } while (depth > 0);
- } else {
- nodes.push(node);
- }
-
- return jqLite(nodes);
- }
-
- /**
- * Wrapper for linking function which converts normal linking function into a grouped
- * linking function.
- * @param linkFn
- * @param attrStart
- * @param attrEnd
- * @returns {Function}
- */
- function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {
- return function(scope, element, attrs, controllers, transcludeFn) {
- element = groupScan(element[0], attrStart, attrEnd);
- return linkFn(scope, element, attrs, controllers, transcludeFn);
- };
- }
-
- /**
- * Once the directives have been collected, their compile functions are executed. This method
- * is responsible for inlining directive templates as well as terminating the application
- * of the directives if the terminal directive has been reached.
- *
- * @param {Array} directives Array of collected directives to execute their compile function.
- * this needs to be pre-sorted by priority order.
- * @param {Node} compileNode The raw DOM node to apply the compile functions to
- * @param {Object} templateAttrs The shared attribute function
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new
- * child of the transcluded parent scope.
- * @param {JQLite} jqCollection If we are working on the root of the compile tree then this
- * argument has the root jqLite array so that we can replace nodes
- * on it.
- * @param {Object=} originalReplaceDirective An optional directive that will be ignored when
- * compiling the transclusion.
- * @param {Array.<Function>} preLinkFns
- * @param {Array.<Function>} postLinkFns
- * @param {Object} previousCompileContext Context used for previous compilation of the current
- * node
- * @returns {Function} linkFn
- */
- function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,
- jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,
- previousCompileContext) {
- previousCompileContext = previousCompileContext || {};
-
- var terminalPriority = -Number.MAX_VALUE,
- newScopeDirective = previousCompileContext.newScopeDirective,
- controllerDirectives = previousCompileContext.controllerDirectives,
- newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,
- templateDirective = previousCompileContext.templateDirective,
- nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,
- hasTranscludeDirective = false,
- hasTemplate = false,
- hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,
- $compileNode = templateAttrs.$$element = jqLite(compileNode),
- directive,
- directiveName,
- $template,
- replaceDirective = originalReplaceDirective,
- childTranscludeFn = transcludeFn,
- linkFn,
- directiveValue;
-
- // executes all directives on the current element
- for (var i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- var attrStart = directive.$$start;
- var attrEnd = directive.$$end;
-
- // collect multiblock sections
- if (attrStart) {
- $compileNode = groupScan(compileNode, attrStart, attrEnd);
- }
- $template = undefined;
-
- if (terminalPriority > directive.priority) {
- break; // prevent further processing of directives
- }
-
- if (directiveValue = directive.scope) {
-
- // skip the check for directives with async templates, we'll check the derived sync
- // directive when the template arrives
- if (!directive.templateUrl) {
- if (isObject(directiveValue)) {
- // This directive is trying to add an isolated scope.
- // Check that there is no scope of any kind already
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,
- directive, $compileNode);
- newIsolateScopeDirective = directive;
- } else {
- // This directive is trying to add a child scope.
- // Check that there is no isolated scope already
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,
- $compileNode);
- }
- }
-
- newScopeDirective = newScopeDirective || directive;
- }
-
- directiveName = directive.name;
-
- if (!directive.templateUrl && directive.controller) {
- directiveValue = directive.controller;
- controllerDirectives = controllerDirectives || createMap();
- assertNoDuplicate("'" + directiveName + "' controller",
- controllerDirectives[directiveName], directive, $compileNode);
- controllerDirectives[directiveName] = directive;
- }
-
- if (directiveValue = directive.transclude) {
- hasTranscludeDirective = true;
-
- // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.
- // This option should only be used by directives that know how to safely handle element transclusion,
- // where the transcluded nodes are added or replaced after linking.
- if (!directive.$$tlb) {
- assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);
- nonTlbTranscludeDirective = directive;
- }
-
- if (directiveValue == 'element') {
- hasElementTranscludeDirective = true;
- terminalPriority = directive.priority;
- $template = $compileNode;
- $compileNode = templateAttrs.$$element =
- jqLite(document.createComment(' ' + directiveName + ': ' +
- templateAttrs[directiveName] + ' '));
- compileNode = $compileNode[0];
- replaceWith(jqCollection, sliceArgs($template), compileNode);
-
- childTranscludeFn = compile($template, transcludeFn, terminalPriority,
- replaceDirective && replaceDirective.name, {
- // Don't pass in:
- // - controllerDirectives - otherwise we'll create duplicates controllers
- // - newIsolateScopeDirective or templateDirective - combining templates with
- // element transclusion doesn't make sense.
- //
- // We need only nonTlbTranscludeDirective so that we prevent putting transclusion
- // on the same element more than once.
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- } else {
- $template = jqLite(jqLiteClone(compileNode)).contents();
- $compileNode.empty(); // clear contents
- childTranscludeFn = compile($template, transcludeFn, undefined,
- undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});
- }
- }
-
- if (directive.template) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- directiveValue = (isFunction(directive.template))
- ? directive.template($compileNode, templateAttrs)
- : directive.template;
-
- directiveValue = denormalizeTemplate(directiveValue);
-
- if (directive.replace) {
- replaceDirective = directive;
- if (jqLiteIsTextNode(directiveValue)) {
- $template = [];
- } else {
- $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- directiveName, '');
- }
-
- replaceWith(jqCollection, $compileNode, compileNode);
-
- var newTemplateAttrs = {$attr: {}};
-
- // combine directives from the original node and from the template:
- // - take the array of directives for this element
- // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)
- // - collect directives from the template and sort them by priority
- // - combine directives as: processed + template + unprocessed
- var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);
- var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));
-
- if (newIsolateScopeDirective || newScopeDirective) {
- // The original directive caused the current element to be replaced but this element
- // also needs to have a new scope, so we need to tell the template directives
- // that they would need to get their scope from further up, if they require transclusion
- markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);
- }
- directives = directives.concat(templateDirectives).concat(unprocessedDirectives);
- mergeTemplateAttributes(templateAttrs, newTemplateAttrs);
-
- ii = directives.length;
- } else {
- $compileNode.html(directiveValue);
- }
- }
-
- if (directive.templateUrl) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- if (directive.replace) {
- replaceDirective = directive;
- }
-
- nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,
- templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {
- controllerDirectives: controllerDirectives,
- newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,
- newIsolateScopeDirective: newIsolateScopeDirective,
- templateDirective: templateDirective,
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- ii = directives.length;
- } else if (directive.compile) {
- try {
- linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);
- if (isFunction(linkFn)) {
- addLinkFns(null, linkFn, attrStart, attrEnd);
- } else if (linkFn) {
- addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);
- }
- } catch (e) {
- $exceptionHandler(e, startingTag($compileNode));
- }
- }
-
- if (directive.terminal) {
- nodeLinkFn.terminal = true;
- terminalPriority = Math.max(terminalPriority, directive.priority);
- }
-
- }
-
- nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;
- nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;
- nodeLinkFn.templateOnThisElement = hasTemplate;
- nodeLinkFn.transclude = childTranscludeFn;
-
- previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;
-
- // might be normal or delayed nodeLinkFn depending on if templateUrl is present
- return nodeLinkFn;
-
- ////////////////////
-
- function addLinkFns(pre, post, attrStart, attrEnd) {
- if (pre) {
- if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);
- pre.require = directive.require;
- pre.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- pre = cloneAndAnnotateFn(pre, {isolateScope: true});
- }
- preLinkFns.push(pre);
- }
- if (post) {
- if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);
- post.require = directive.require;
- post.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- post = cloneAndAnnotateFn(post, {isolateScope: true});
- }
- postLinkFns.push(post);
- }
- }
-
-
- function getControllers(directiveName, require, $element, elementControllers) {
- var value;
-
- if (isString(require)) {
- var match = require.match(REQUIRE_PREFIX_REGEXP);
- var name = require.substring(match[0].length);
- var inheritType = match[1] || match[3];
- var optional = match[2] === '?';
-
- //If only parents then start at the parent element
- if (inheritType === '^^') {
- $element = $element.parent();
- //Otherwise attempt getting the controller from elementControllers in case
- //the element is transcluded (and has no data) and to avoid .data if possible
- } else {
- value = elementControllers && elementControllers[name];
- value = value && value.instance;
- }
-
- if (!value) {
- var dataName = '$' + name + 'Controller';
- value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);
- }
-
- if (!value && !optional) {
- throw $compileMinErr('ctreq',
- "Controller '{0}', required by directive '{1}', can't be found!",
- name, directiveName);
- }
- } else if (isArray(require)) {
- value = [];
- for (var i = 0, ii = require.length; i < ii; i++) {
- value[i] = getControllers(directiveName, require[i], $element, elementControllers);
- }
- }
-
- return value || null;
- }
-
- function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) {
- var elementControllers = createMap();
- for (var controllerKey in controllerDirectives) {
- var directive = controllerDirectives[controllerKey];
- var locals = {
- $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,
- $element: $element,
- $attrs: attrs,
- $transclude: transcludeFn
- };
-
- var controller = directive.controller;
- if (controller == '@') {
- controller = attrs[directive.name];
- }
-
- var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
-
- // For directives with element transclusion the element is a comment,
- // but jQuery .data doesn't support attaching data to comment nodes as it's hard to
- // clean up (http://bugs.jquery.com/ticket/8335).
- // Instead, we save the controllers for the element in a local hash and attach to .data
- // later, once we have the actual element.
- elementControllers[directive.name] = controllerInstance;
- if (!hasElementTranscludeDirective) {
- $element.data('$' + directive.name + 'Controller', controllerInstance.instance);
- }
- }
- return elementControllers;
- }
-
- function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
- var linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
- attrs, removeScopeBindingWatches, removeControllerBindingWatches;
-
- if (compileNode === linkNode) {
- attrs = templateAttrs;
- $element = templateAttrs.$$element;
- } else {
- $element = jqLite(linkNode);
- attrs = new Attributes($element, templateAttrs);
- }
-
- controllerScope = scope;
- if (newIsolateScopeDirective) {
- isolateScope = scope.$new(true);
- } else if (newScopeDirective) {
- controllerScope = scope.$parent;
- }
-
- if (boundTranscludeFn) {
- // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
- // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
- transcludeFn = controllersBoundTransclude;
- transcludeFn.$$boundTransclude = boundTranscludeFn;
- }
-
- if (controllerDirectives) {
- elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope);
- }
-
- if (newIsolateScopeDirective) {
- // Initialize isolate scope bindings for new isolate scope directive.
- compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||
- templateDirective === newIsolateScopeDirective.$$originalDirective)));
- compile.$$addScopeClass($element, true);
- isolateScope.$$isolateBindings =
- newIsolateScopeDirective.$$isolateBindings;
- removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,
- isolateScope.$$isolateBindings,
- newIsolateScopeDirective);
- if (removeScopeBindingWatches) {
- isolateScope.$on('$destroy', removeScopeBindingWatches);
- }
- }
-
- // Initialize bindToController bindings
- for (var name in elementControllers) {
- var controllerDirective = controllerDirectives[name];
- var controller = elementControllers[name];
- var bindings = controllerDirective.$$bindings.bindToController;
-
- if (controller.identifier && bindings) {
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
- }
-
- var controllerResult = controller();
- if (controllerResult !== controller.instance) {
- // If the controller constructor has a return value, overwrite the instance
- // from setupControllers
- controller.instance = controllerResult;
- $element.data('$' + controllerDirective.name + 'Controller', controllerResult);
- removeControllerBindingWatches && removeControllerBindingWatches();
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
- }
- }
-
- // PRELINKING
- for (i = 0, ii = preLinkFns.length; i < ii; i++) {
- linkFn = preLinkFns[i];
- invokeLinkFn(linkFn,
- linkFn.isolateScope ? isolateScope : scope,
- $element,
- attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),
- transcludeFn
- );
- }
-
- // RECURSION
- // We only pass the isolate scope, if the isolate directive has a template,
- // otherwise the child elements do not belong to the isolate directive.
- var scopeToChild = scope;
- if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {
- scopeToChild = isolateScope;
- }
- childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);
-
- // POSTLINKING
- for (i = postLinkFns.length - 1; i >= 0; i--) {
- linkFn = postLinkFns[i];
- invokeLinkFn(linkFn,
- linkFn.isolateScope ? isolateScope : scope,
- $element,
- attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),
- transcludeFn
- );
- }
-
- // This is the function that is injected as `$transclude`.
- // Note: all arguments are optional!
- function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement) {
- var transcludeControllers;
-
- // No scope passed in:
- if (!isScope(scope)) {
- futureParentElement = cloneAttachFn;
- cloneAttachFn = scope;
- scope = undefined;
- }
-
- if (hasElementTranscludeDirective) {
- transcludeControllers = elementControllers;
- }
- if (!futureParentElement) {
- futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;
- }
- return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
- }
- }
- }
-
- // Depending upon the context in which a directive finds itself it might need to have a new isolated
- // or child scope created. For instance:
- // * if the directive has been pulled into a template because another directive with a higher priority
- // asked for element transclusion
- // * if the directive itself asks for transclusion but it is at the root of a template and the original
- // element was replaced. See https://github.com/angular/angular.js/issues/12936
- function markDirectiveScope(directives, isolateScope, newScope) {
- for (var j = 0, jj = directives.length; j < jj; j++) {
- directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});
- }
- }
-
- /**
- * looks up the directive and decorates it with exception handling and proper parameters. We
- * call this the boundDirective.
- *
- * @param {string} name name of the directive to look up.
- * @param {string} location The directive must be found in specific format.
- * String containing any of theses characters:
- *
- * * `E`: element name
- * * `A': attribute
- * * `C`: class
- * * `M`: comment
- * @returns {boolean} true if directive was added.
- */
- function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
- endAttrName) {
- if (name === ignoreDirective) return null;
- var match = null;
- if (hasDirectives.hasOwnProperty(name)) {
- for (var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i < ii; i++) {
- try {
- directive = directives[i];
- if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
- directive.restrict.indexOf(location) != -1) {
- if (startAttrName) {
- directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
- }
- tDirectives.push(directive);
- match = directive;
- }
- } catch (e) { $exceptionHandler(e); }
- }
- }
- return match;
- }
-
-
- /**
- * looks up the directive and returns true if it is a multi-element directive,
- * and therefore requires DOM nodes between -start and -end markers to be grouped
- * together.
- *
- * @param {string} name name of the directive to look up.
- * @returns true if directive was registered as multi-element.
- */
- function directiveIsMultiElement(name) {
- if (hasDirectives.hasOwnProperty(name)) {
- for (var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- if (directive.multiElement) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * When the element is replaced with HTML template then the new attributes
- * on the template need to be merged with the existing attributes in the DOM.
- * The desired effect is to have both of the attributes present.
- *
- * @param {object} dst destination attributes (original DOM)
- * @param {object} src source attributes (from the directive template)
- */
- function mergeTemplateAttributes(dst, src) {
- var srcAttr = src.$attr,
- dstAttr = dst.$attr,
- $element = dst.$$element;
-
- // reapply the old attributes to the new element
- forEach(dst, function(value, key) {
- if (key.charAt(0) != '$') {
- if (src[key] && src[key] !== value) {
- value += (key === 'style' ? ';' : ' ') + src[key];
- }
- dst.$set(key, value, true, srcAttr[key]);
- }
- });
-
- // copy the new attributes on the old attrs object
- forEach(src, function(value, key) {
- if (key == 'class') {
- safeAddClass($element, value);
- dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
- } else if (key == 'style') {
- $element.attr('style', $element.attr('style') + ';' + value);
- dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
- dst[key] = value;
- dstAttr[key] = srcAttr[key];
- }
- });
- }
-
-
- function compileTemplateUrl(directives, $compileNode, tAttrs,
- $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
- var linkQueue = [],
- afterTemplateNodeLinkFn,
- afterTemplateChildLinkFn,
- beforeTemplateCompileNode = $compileNode[0],
- origAsyncDirective = directives.shift(),
- derivedSyncDirective = inherit(origAsyncDirective, {
- templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
- }),
- templateUrl = (isFunction(origAsyncDirective.templateUrl))
- ? origAsyncDirective.templateUrl($compileNode, tAttrs)
- : origAsyncDirective.templateUrl,
- templateNamespace = origAsyncDirective.templateNamespace;
-
- $compileNode.empty();
-
- $templateRequest(templateUrl)
- .then(function(content) {
- var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;
-
- content = denormalizeTemplate(content);
-
- if (origAsyncDirective.replace) {
- if (jqLiteIsTextNode(content)) {
- $template = [];
- } else {
- $template = removeComments(wrapTemplate(templateNamespace, trim(content)));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- origAsyncDirective.name, templateUrl);
- }
-
- tempTemplateAttrs = {$attr: {}};
- replaceWith($rootElement, $compileNode, compileNode);
- var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);
-
- if (isObject(origAsyncDirective.scope)) {
- // the original directive that caused the template to be loaded async required
- // an isolate scope
- markDirectiveScope(templateDirectives, true);
- }
- directives = templateDirectives.concat(directives);
- mergeTemplateAttributes(tAttrs, tempTemplateAttrs);
- } else {
- compileNode = beforeTemplateCompileNode;
- $compileNode.html(content);
- }
-
- directives.unshift(derivedSyncDirective);
-
- afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,
- childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,
- previousCompileContext);
- forEach($rootElement, function(node, i) {
- if (node == compileNode) {
- $rootElement[i] = $compileNode[0];
- }
- });
- afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);
-
- while (linkQueue.length) {
- var scope = linkQueue.shift(),
- beforeTemplateLinkNode = linkQueue.shift(),
- linkRootElement = linkQueue.shift(),
- boundTranscludeFn = linkQueue.shift(),
- linkNode = $compileNode[0];
-
- if (scope.$$destroyed) continue;
-
- if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {
- var oldClasses = beforeTemplateLinkNode.className;
-
- if (!(previousCompileContext.hasElementTranscludeDirective &&
- origAsyncDirective.replace)) {
- // it was cloned therefore we have to clone as well.
- linkNode = jqLiteClone(compileNode);
- }
- replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);
-
- // Copy in CSS classes from original node
- safeAddClass(jqLite(linkNode), oldClasses);
- }
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- } else {
- childBoundTranscludeFn = boundTranscludeFn;
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,
- childBoundTranscludeFn);
- }
- linkQueue = null;
- });
-
- return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {
- var childBoundTranscludeFn = boundTranscludeFn;
- if (scope.$$destroyed) return;
- if (linkQueue) {
- linkQueue.push(scope,
- node,
- rootElement,
- childBoundTranscludeFn);
- } else {
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);
- }
- };
- }
-
-
- /**
- * Sorting function for bound directives.
- */
- function byPriority(a, b) {
- var diff = b.priority - a.priority;
- if (diff !== 0) return diff;
- if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;
- return a.index - b.index;
- }
-
- function assertNoDuplicate(what, previousDirective, directive, element) {
-
- function wrapModuleNameIfDefined(moduleName) {
- return moduleName ?
- (' (module: ' + moduleName + ')') :
- '';
- }
-
- if (previousDirective) {
- throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',
- previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),
- directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));
- }
- }
-
-
- function addTextInterpolateDirective(directives, text) {
- var interpolateFn = $interpolate(text, true);
- if (interpolateFn) {
- directives.push({
- priority: 0,
- compile: function textInterpolateCompileFn(templateNode) {
- var templateNodeParent = templateNode.parent(),
- hasCompileParent = !!templateNodeParent.length;
-
- // When transcluding a template that has bindings in the root
- // we don't have a parent and thus need to add the class during linking fn.
- if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
-
- return function textInterpolateLinkFn(scope, node) {
- var parent = node.parent();
- if (!hasCompileParent) compile.$$addBindingClass(parent);
- compile.$$addBindingInfo(parent, interpolateFn.expressions);
- scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
- node[0].nodeValue = value;
- });
- };
- }
- });
- }
- }
-
-
- function wrapTemplate(type, template) {
- type = lowercase(type || 'html');
- switch (type) {
- case 'svg':
- case 'math':
- var wrapper = document.createElement('div');
- wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';
- return wrapper.childNodes[0].childNodes;
- default:
- return template;
- }
- }
-
-
- function getTrustedContext(node, attrNormalizedName) {
- if (attrNormalizedName == "srcdoc") {
- return $sce.HTML;
- }
- var tag = nodeName_(node);
- // maction[xlink:href] can source SVG. It's not limited to <maction>.
- if (attrNormalizedName == "xlinkHref" ||
- (tag == "form" && attrNormalizedName == "action") ||
- (tag != "img" && (attrNormalizedName == "src" ||
- attrNormalizedName == "ngSrc"))) {
- return $sce.RESOURCE_URL;
- }
- }
-
-
- function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {
- var trustedContext = getTrustedContext(node, name);
- allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;
-
- var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);
-
- // no interpolation found -> ignore
- if (!interpolateFn) return;
-
-
- if (name === "multiple" && nodeName_(node) === "select") {
- throw $compileMinErr("selmulti",
- "Binding to the 'multiple' attribute is not supported. Element: {0}",
- startingTag(node));
- }
-
- directives.push({
- priority: 100,
- compile: function() {
- return {
- pre: function attrInterpolatePreLinkFn(scope, element, attr) {
- var $$observers = (attr.$$observers || (attr.$$observers = createMap()));
-
- if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {
- throw $compileMinErr('nodomevents',
- "Interpolations for HTML DOM event attributes are disallowed. Please use the " +
- "ng- versions (such as ng-click instead of onclick) instead.");
- }
-
- // If the attribute has changed since last $interpolate()ed
- var newValue = attr[name];
- if (newValue !== value) {
- // we need to interpolate again since the attribute value has been updated
- // (e.g. by another directive's compile function)
- // ensure unset/empty values make interpolateFn falsy
- interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);
- value = newValue;
- }
-
- // if attribute was updated so that there is no interpolation going on we don't want to
- // register any observers
- if (!interpolateFn) return;
-
- // initialize attr object so that it's ready in case we need the value for isolate
- // scope initialization, otherwise the value would not be available from isolate
- // directive's linking fn during linking phase
- attr[name] = interpolateFn(scope);
-
- ($$observers[name] || ($$observers[name] = [])).$$inter = true;
- (attr.$$observers && attr.$$observers[name].$$scope || scope).
- $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {
- //special case for class attribute addition + removal
- //so that class changes can tap into the animation
- //hooks provided by the $animate service. Be sure to
- //skip animations when the first digest occurs (when
- //both the new and the old values are the same) since
- //the CSS classes are the non-interpolated values
- if (name === 'class' && newValue != oldValue) {
- attr.$updateClass(newValue, oldValue);
- } else {
- attr.$set(name, newValue);
- }
- });
- }
- };
- }
- });
- }
-
-
- /**
- * This is a special jqLite.replaceWith, which can replace items which
- * have no parents, provided that the containing jqLite collection is provided.
- *
- * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes
- * in the root of the tree.
- * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep
- * the shell, but replace its DOM node reference.
- * @param {Node} newNode The new DOM node.
- */
- function replaceWith($rootElement, elementsToRemove, newNode) {
- var firstElementToRemove = elementsToRemove[0],
- removeCount = elementsToRemove.length,
- parent = firstElementToRemove.parentNode,
- i, ii;
-
- if ($rootElement) {
- for (i = 0, ii = $rootElement.length; i < ii; i++) {
- if ($rootElement[i] == firstElementToRemove) {
- $rootElement[i++] = newNode;
- for (var j = i, j2 = j + removeCount - 1,
- jj = $rootElement.length;
- j < jj; j++, j2++) {
- if (j2 < jj) {
- $rootElement[j] = $rootElement[j2];
- } else {
- delete $rootElement[j];
- }
- }
- $rootElement.length -= removeCount - 1;
-
- // If the replaced element is also the jQuery .context then replace it
- // .context is a deprecated jQuery api, so we should set it only when jQuery set it
- // http://api.jquery.com/context/
- if ($rootElement.context === firstElementToRemove) {
- $rootElement.context = newNode;
- }
- break;
- }
- }
- }
-
- if (parent) {
- parent.replaceChild(newNode, firstElementToRemove);
- }
-
- // TODO(perf): what's this document fragment for? is it needed? can we at least reuse it?
- var fragment = document.createDocumentFragment();
- fragment.appendChild(firstElementToRemove);
-
- if (jqLite.hasData(firstElementToRemove)) {
- // Copy over user data (that includes Angular's $scope etc.). Don't copy private
- // data here because there's no public interface in jQuery to do that and copying over
- // event listeners (which is the main use of private data) wouldn't work anyway.
- jqLite.data(newNode, jqLite.data(firstElementToRemove));
-
- // Remove data of the replaced element. We cannot just call .remove()
- // on the element it since that would deallocate scope that is needed
- // for the new node. Instead, remove the data "manually".
- if (!jQuery) {
- delete jqLite.cache[firstElementToRemove[jqLite.expando]];
- } else {
- // jQuery 2.x doesn't expose the data storage. Use jQuery.cleanData to clean up after
- // the replaced element. The cleanData version monkey-patched by Angular would cause
- // the scope to be trashed and we do need the very same scope to work with the new
- // element. However, we cannot just cache the non-patched version and use it here as
- // that would break if another library patches the method after Angular does (one
- // example is jQuery UI). Instead, set a flag indicating scope destroying should be
- // skipped this one time.
- skipDestroyOnNextJQueryCleanData = true;
- jQuery.cleanData([firstElementToRemove]);
- }
- }
-
- for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {
- var element = elementsToRemove[k];
- jqLite(element).remove(); // must do this way to clean up expando
- fragment.appendChild(element);
- delete elementsToRemove[k];
- }
-
- elementsToRemove[0] = newNode;
- elementsToRemove.length = 1;
- }
-
-
- function cloneAndAnnotateFn(fn, annotation) {
- return extend(function() { return fn.apply(null, arguments); }, fn, annotation);
- }
-
-
- function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {
- try {
- linkFn(scope, $element, attrs, controllers, transcludeFn);
- } catch (e) {
- $exceptionHandler(e, startingTag($element));
- }
- }
-
-
- // Set up $watches for isolate scope and controller bindings. This process
- // only occurs for isolate scopes and new scopes with controllerAs.
- function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {
- var removeWatchCollection = [];
- forEach(bindings, function(definition, scopeName) {
- var attrName = definition.attrName,
- optional = definition.optional,
- mode = definition.mode, // @, =, or &
- lastValue,
- parentGet, parentSet, compare;
-
- switch (mode) {
-
- case '@':
- if (!optional && !hasOwnProperty.call(attrs, attrName)) {
- destination[scopeName] = attrs[attrName] = void 0;
- }
- attrs.$observe(attrName, function(value) {
- if (isString(value)) {
- destination[scopeName] = value;
- }
- });
- attrs.$$observers[attrName].$$scope = scope;
- if (isString(attrs[attrName])) {
- // If the attribute has been provided then we trigger an interpolation to ensure
- // the value is there for use in the link fn
- destination[scopeName] = $interpolate(attrs[attrName])(scope);
- }
- break;
-
- case '=':
- if (!hasOwnProperty.call(attrs, attrName)) {
- if (optional) break;
- attrs[attrName] = void 0;
- }
- if (optional && !attrs[attrName]) break;
-
- parentGet = $parse(attrs[attrName]);
- if (parentGet.literal) {
- compare = equals;
- } else {
- compare = function(a, b) { return a === b || (a !== a && b !== b); };
- }
- parentSet = parentGet.assign || function() {
- // reset the change, or we will throw this exception on every $digest
- lastValue = destination[scopeName] = parentGet(scope);
- throw $compileMinErr('nonassign',
- "Expression '{0}' used with directive '{1}' is non-assignable!",
- attrs[attrName], directive.name);
- };
- lastValue = destination[scopeName] = parentGet(scope);
- var parentValueWatch = function parentValueWatch(parentValue) {
- if (!compare(parentValue, destination[scopeName])) {
- // we are out of sync and need to copy
- if (!compare(parentValue, lastValue)) {
- // parent changed and it has precedence
- destination[scopeName] = parentValue;
- } else {
- // if the parent can be assigned then do so
- parentSet(scope, parentValue = destination[scopeName]);
- }
- }
- return lastValue = parentValue;
- };
- parentValueWatch.$stateful = true;
- var removeWatch;
- if (definition.collection) {
- removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);
- } else {
- removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);
- }
- removeWatchCollection.push(removeWatch);
- break;
-
- case '&':
- // Don't assign Object.prototype method to scope
- parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;
-
- // Don't assign noop to destination if expression is not valid
- if (parentGet === noop && optional) break;
-
- destination[scopeName] = function(locals) {
- return parentGet(scope, locals);
- };
- break;
- }
- });
-
- return removeWatchCollection.length && function removeWatches() {
- for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {
- removeWatchCollection[i]();
- }
- };
- }
- }];
-}
-
-var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i;
-/**
- * Converts all accepted directives format into proper directive name.
- * @param name Name to normalize
- */
-function directiveNormalize(name) {
- return camelCase(name.replace(PREFIX_REGEXP, ''));
-}
-
-/**
- * @ngdoc type
- * @name $compile.directive.Attributes
- *
- * @description
- * A shared object between directive compile / linking functions which contains normalized DOM
- * element attributes. The values reflect current binding state `{{ }}`. The normalization is
- * needed since all of these are treated as equivalent in Angular:
- *
- * ```
- * <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
- * ```
- */
-
-/**
- * @ngdoc property
- * @name $compile.directive.Attributes#$attr
- *
- * @description
- * A map of DOM element attribute names to the normalized name. This is
- * needed to do reverse lookup from normalized name back to actual name.
- */
-
-
-/**
- * @ngdoc method
- * @name $compile.directive.Attributes#$set
- * @kind function
- *
- * @description
- * Set DOM element attribute value.
- *
- *
- * @param {string} name Normalized element attribute name of the property to modify. The name is
- * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
- * property to the original name.
- * @param {string} value Value to set the attribute to. The value can be an interpolated string.
- */
-
-
-
-/**
- * Closure compiler type information
- */
-
-function nodesetLinkingFn(
- /* angular.Scope */ scope,
- /* NodeList */ nodeList,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-) {}
-
-function directiveLinkingFn(
- /* nodesetLinkingFn */ nodesetLinkingFn,
- /* angular.Scope */ scope,
- /* Node */ node,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-) {}
-
-function tokenDifference(str1, str2) {
- var values = '',
- tokens1 = str1.split(/\s+/),
- tokens2 = str2.split(/\s+/);
-
- outer:
- for (var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for (var j = 0; j < tokens2.length; j++) {
- if (token == tokens2[j]) continue outer;
- }
- values += (values.length > 0 ? ' ' : '') + token;
- }
- return values;
-}
-
-function removeComments(jqNodes) {
- jqNodes = jqLite(jqNodes);
- var i = jqNodes.length;
-
- if (i <= 1) {
- return jqNodes;
- }
-
- while (i--) {
- var node = jqNodes[i];
- if (node.nodeType === NODE_TYPE_COMMENT) {
- splice.call(jqNodes, i, 1);
- }
- }
- return jqNodes;
-}
-
-var $controllerMinErr = minErr('$controller');
-
-
-var CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/;
-function identifierForController(controller, ident) {
- if (ident && isString(ident)) return ident;
- if (isString(controller)) {
- var match = CNTRL_REG.exec(controller);
- if (match) return match[3];
- }
-}
-
-
-/**
- * @ngdoc provider
- * @name $controllerProvider
- * @description
- * The {@link ng.$controller $controller service} is used by Angular to create new
- * controllers.
- *
- * This provider allows controller registration via the
- * {@link ng.$controllerProvider#register register} method.
- */
-function $ControllerProvider() {
- var controllers = {},
- globals = false;
-
- /**
- * @ngdoc method
- * @name $controllerProvider#register
- * @param {string|Object} name Controller name, or an object map of controllers where the keys are
- * the names and the values are the constructors.
- * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
- * annotations in the array notation).
- */
- this.register = function(name, constructor) {
- assertNotHasOwnProperty(name, 'controller');
- if (isObject(name)) {
- extend(controllers, name);
- } else {
- controllers[name] = constructor;
- }
- };
-
- /**
- * @ngdoc method
- * @name $controllerProvider#allowGlobals
- * @description If called, allows `$controller` to find controller constructors on `window`
- */
- this.allowGlobals = function() {
- globals = true;
- };
-
-
- this.$get = ['$injector', '$window', function($injector, $window) {
-
- /**
- * @ngdoc service
- * @name $controller
- * @requires $injector
- *
- * @param {Function|string} constructor If called with a function then it's considered to be the
- * controller constructor function. Otherwise it's considered to be a string which is used
- * to retrieve the controller constructor using the following steps:
- *
- * * check if a controller with given name is registered via `$controllerProvider`
- * * check if evaluating the string on the current scope returns a constructor
- * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
- * `window` object (not recommended)
- *
- * The string can use the `controller as property` syntax, where the controller instance is published
- * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
- * to work correctly.
- *
- * @param {Object} locals Injection locals for Controller.
- * @return {Object} Instance of given controller.
- *
- * @description
- * `$controller` service is responsible for instantiating controllers.
- *
- * It's just a simple call to {@link auto.$injector $injector}, but extracted into
- * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).
- */
- return function(expression, locals, later, ident) {
- // PRIVATE API:
- // param `later` --- indicates that the controller's constructor is invoked at a later time.
- // If true, $controller will allocate the object with the correct
- // prototype chain, but will not invoke the controller until a returned
- // callback is invoked.
- // param `ident` --- An optional label which overrides the label parsed from the controller
- // expression, if any.
- var instance, match, constructor, identifier;
- later = later === true;
- if (ident && isString(ident)) {
- identifier = ident;
- }
-
- if (isString(expression)) {
- match = expression.match(CNTRL_REG);
- if (!match) {
- throw $controllerMinErr('ctrlfmt',
- "Badly formed controller string '{0}'. " +
- "Must match `__name__ as __id__` or `__name__`.", expression);
- }
- constructor = match[1],
- identifier = identifier || match[3];
- expression = controllers.hasOwnProperty(constructor)
- ? controllers[constructor]
- : getter(locals.$scope, constructor, true) ||
- (globals ? getter($window, constructor, true) : undefined);
-
- assertArgFn(expression, constructor, true);
- }
-
- if (later) {
- // Instantiate controller later:
- // This machinery is used to create an instance of the object before calling the
- // controller's constructor itself.
- //
- // This allows properties to be added to the controller before the constructor is
- // invoked. Primarily, this is used for isolate scope bindings in $compile.
- //
- // This feature is not intended for use by applications, and is thus not documented
- // publicly.
- // Object creation: http://jsperf.com/create-constructor/2
- var controllerPrototype = (isArray(expression) ?
- expression[expression.length - 1] : expression).prototype;
- instance = Object.create(controllerPrototype || null);
-
- if (identifier) {
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
-
- var instantiate;
- return instantiate = extend(function() {
- var result = $injector.invoke(expression, instance, locals, constructor);
- if (result !== instance && (isObject(result) || isFunction(result))) {
- instance = result;
- if (identifier) {
- // If result changed, re-assign controllerAs value to scope.
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
- }
- return instance;
- }, {
- instance: instance,
- identifier: identifier
- });
- }
-
- instance = $injector.instantiate(expression, locals, constructor);
-
- if (identifier) {
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
-
- return instance;
- };
-
- function addIdentifier(locals, identifier, instance, name) {
- if (!(locals && isObject(locals.$scope))) {
- throw minErr('$controller')('noscp',
- "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",
- name, identifier);
- }
-
- locals.$scope[identifier] = instance;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $document
- * @requires $window
- *
- * @description
- * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.
- *
- * @example
- <example module="documentExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p>$document title: <b ng-bind="title"></b></p>
- <p>window.document title: <b ng-bind="windowTitle"></b></p>
- </div>
- </file>
- <file name="script.js">
- angular.module('documentExample', [])
- .controller('ExampleController', ['$scope', '$document', function($scope, $document) {
- $scope.title = $document[0].title;
- $scope.windowTitle = angular.element(window.document)[0].title;
- }]);
- </file>
- </example>
- */
-function $DocumentProvider() {
- this.$get = ['$window', function(window) {
- return jqLite(window.document);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $exceptionHandler
- * @requires ng.$log
- *
- * @description
- * Any uncaught exception in angular expressions is delegated to this service.
- * The default implementation simply delegates to `$log.error` which logs it into
- * the browser console.
- *
- * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
- * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.
- *
- * ## Example:
- *
- * ```js
- * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
- * return function(exception, cause) {
- * exception.message += ' (caused by "' + cause + '")';
- * throw exception;
- * };
- * });
- * ```
- *
- * This example will override the normal action of `$exceptionHandler`, to make angular
- * exceptions fail hard when they happen, instead of just logging to the console.
- *
- * <hr />
- * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
- * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
- * (unless executed during a digest).
- *
- * If you wish, you can manually delegate exceptions, e.g.
- * `try { ... } catch(e) { $exceptionHandler(e); }`
- *
- * @param {Error} exception Exception associated with the error.
- * @param {string=} cause optional information about the context in which
- * the error was thrown.
- *
- */
-function $ExceptionHandlerProvider() {
- this.$get = ['$log', function($log) {
- return function(exception, cause) {
- $log.error.apply($log, arguments);
- };
- }];
-}
-
-var $$ForceReflowProvider = function() {
- this.$get = ['$document', function($document) {
- return function(domNode) {
- //the line below will force the browser to perform a repaint so
- //that all the animated elements within the animation frame will
- //be properly updated and drawn on screen. This is required to
- //ensure that the preparation animation is properly flushed so that
- //the active state picks up from there. DO NOT REMOVE THIS LINE.
- //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH
- //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND
- //WILL TAKE YEARS AWAY FROM YOUR LIFE.
- if (domNode) {
- if (!domNode.nodeType && domNode instanceof jqLite) {
- domNode = domNode[0];
- }
- } else {
- domNode = $document[0].body;
- }
- return domNode.offsetWidth + 1;
- };
- }];
-};
-
-var APPLICATION_JSON = 'application/json';
-var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
-var JSON_START = /^\[|^\{(?!\{)/;
-var JSON_ENDS = {
- '[': /]$/,
- '{': /}$/
-};
-var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/;
-var $httpMinErr = minErr('$http');
-var $httpMinErrLegacyFn = function(method) {
- return function() {
- throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);
- };
-};
-
-function serializeValue(v) {
- if (isObject(v)) {
- return isDate(v) ? v.toISOString() : toJson(v);
- }
- return v;
-}
-
-
-function $HttpParamSerializerProvider() {
- /**
- * @ngdoc service
- * @name $httpParamSerializer
- * @description
- *
- * Default {@link $http `$http`} params serializer that converts objects to strings
- * according to the following rules:
- *
- * * `{'foo': 'bar'}` results in `foo=bar`
- * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
- * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
- *
- * Note that serializer will sort the request parameters alphabetically.
- * */
-
- this.$get = function() {
- return function ngParamSerializer(params) {
- if (!params) return '';
- var parts = [];
- forEachSorted(params, function(value, key) {
- if (value === null || isUndefined(value)) return;
- if (isArray(value)) {
- forEach(value, function(v, k) {
- parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));
- });
- } else {
- parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));
- }
- });
-
- return parts.join('&');
- };
- };
-}
-
-function $HttpParamSerializerJQLikeProvider() {
- /**
- * @ngdoc service
- * @name $httpParamSerializerJQLike
- * @description
- *
- * Alternative {@link $http `$http`} params serializer that follows
- * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
- * The serializer will also sort the params alphabetically.
- *
- * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
- *
- * ```js
- * $http({
- * url: myUrl,
- * method: 'GET',
- * params: myParams,
- * paramSerializer: '$httpParamSerializerJQLike'
- * });
- * ```
- *
- * It is also possible to set it as the default `paramSerializer` in the
- * {@link $httpProvider#defaults `$httpProvider`}.
- *
- * Additionally, you can inject the serializer and use it explicitly, for example to serialize
- * form data for submission:
- *
- * ```js
- * .controller(function($http, $httpParamSerializerJQLike) {
- * //...
- *
- * $http({
- * url: myUrl,
- * method: 'POST',
- * data: $httpParamSerializerJQLike(myData),
- * headers: {
- * 'Content-Type': 'application/x-www-form-urlencoded'
- * }
- * });
- *
- * });
- * ```
- *
- * */
- this.$get = function() {
- return function jQueryLikeParamSerializer(params) {
- if (!params) return '';
- var parts = [];
- serialize(params, '', true);
- return parts.join('&');
-
- function serialize(toSerialize, prefix, topLevel) {
- if (toSerialize === null || isUndefined(toSerialize)) return;
- if (isArray(toSerialize)) {
- forEach(toSerialize, function(value, index) {
- serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');
- });
- } else if (isObject(toSerialize) && !isDate(toSerialize)) {
- forEachSorted(toSerialize, function(value, key) {
- serialize(value, prefix +
- (topLevel ? '' : '[') +
- key +
- (topLevel ? '' : ']'));
- });
- } else {
- parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));
- }
- }
- };
- };
-}
-
-function defaultHttpResponseTransform(data, headers) {
- if (isString(data)) {
- // Strip json vulnerability protection prefix and trim whitespace
- var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();
-
- if (tempData) {
- var contentType = headers('Content-Type');
- if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {
- data = fromJson(tempData);
- }
- }
- }
-
- return data;
-}
-
-function isJsonLike(str) {
- var jsonStart = str.match(JSON_START);
- return jsonStart && JSON_ENDS[jsonStart[0]].test(str);
-}
-
-/**
- * Parse headers into key value object
- *
- * @param {string} headers Raw headers as a string
- * @returns {Object} Parsed headers as key value object
- */
-function parseHeaders(headers) {
- var parsed = createMap(), i;
-
- function fillInParsed(key, val) {
- if (key) {
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
- }
- }
-
- if (isString(headers)) {
- forEach(headers.split('\n'), function(line) {
- i = line.indexOf(':');
- fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));
- });
- } else if (isObject(headers)) {
- forEach(headers, function(headerVal, headerKey) {
- fillInParsed(lowercase(headerKey), trim(headerVal));
- });
- }
-
- return parsed;
-}
-
-
-/**
- * Returns a function that provides access to parsed headers.
- *
- * Headers are lazy parsed when first requested.
- * @see parseHeaders
- *
- * @param {(string|Object)} headers Headers to provide access to.
- * @returns {function(string=)} Returns a getter function which if called with:
- *
- * - if called with single an argument returns a single header value or null
- * - if called with no arguments returns an object containing all headers.
- */
-function headersGetter(headers) {
- var headersObj;
-
- return function(name) {
- if (!headersObj) headersObj = parseHeaders(headers);
-
- if (name) {
- var value = headersObj[lowercase(name)];
- if (value === void 0) {
- value = null;
- }
- return value;
- }
-
- return headersObj;
- };
-}
-
-
-/**
- * Chain all given functions
- *
- * This function is used for both request and response transforming
- *
- * @param {*} data Data to transform.
- * @param {function(string=)} headers HTTP headers getter fn.
- * @param {number} status HTTP status code of the response.
- * @param {(Function|Array.<Function>)} fns Function or an array of functions.
- * @returns {*} Transformed data.
- */
-function transformData(data, headers, status, fns) {
- if (isFunction(fns)) {
- return fns(data, headers, status);
- }
-
- forEach(fns, function(fn) {
- data = fn(data, headers, status);
- });
-
- return data;
-}
-
-
-function isSuccess(status) {
- return 200 <= status && status < 300;
-}
-
-
-/**
- * @ngdoc provider
- * @name $httpProvider
- * @description
- * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
- * */
-function $HttpProvider() {
- /**
- * @ngdoc property
- * @name $httpProvider#defaults
- * @description
- *
- * Object containing default values for all {@link ng.$http $http} requests.
- *
- * - **`defaults.cache`** - {Object} - an object built with {@link ng.$cacheFactory `$cacheFactory`}
- * that will provide the cache for all requests who set their `cache` property to `true`.
- * If you set the `defaults.cache = false` then only requests that specify their own custom
- * cache object will be cached. See {@link $http#caching $http Caching} for more information.
- *
- * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.
- * Defaults value is `'XSRF-TOKEN'`.
- *
- * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the
- * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.
- *
- * - **`defaults.headers`** - {Object} - Default headers for all $http requests.
- * Refer to {@link ng.$http#setting-http-headers $http} for documentation on
- * setting default headers.
- * - **`defaults.headers.common`**
- * - **`defaults.headers.post`**
- * - **`defaults.headers.put`**
- * - **`defaults.headers.patch`**
- *
- *
- * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function
- * used to the prepare string representation of request parameters (specified as an object).
- * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.
- * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.
- *
- **/
- var defaults = this.defaults = {
- // transform incoming response data
- transformResponse: [defaultHttpResponseTransform],
-
- // transform outgoing request data
- transformRequest: [function(d) {
- return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;
- }],
-
- // default headers
- headers: {
- common: {
- 'Accept': 'application/json, text/plain, */*'
- },
- post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)
- },
-
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN',
-
- paramSerializer: '$httpParamSerializer'
- };
-
- var useApplyAsync = false;
- /**
- * @ngdoc method
- * @name $httpProvider#useApplyAsync
- * @description
- *
- * Configure $http service to combine processing of multiple http responses received at around
- * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
- * significant performance improvement for bigger applications that make many HTTP requests
- * concurrently (common during application bootstrap).
- *
- * Defaults to false. If no value is specified, returns the current configured value.
- *
- * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred
- * "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window
- * to load and share the same digest cycle.
- *
- * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
- * otherwise, returns the current configured value.
- **/
- this.useApplyAsync = function(value) {
- if (isDefined(value)) {
- useApplyAsync = !!value;
- return this;
- }
- return useApplyAsync;
- };
-
- var useLegacyPromise = true;
- /**
- * @ngdoc method
- * @name $httpProvider#useLegacyPromiseExtensions
- * @description
- *
- * Configure `$http` service to return promises without the shorthand methods `success` and `error`.
- * This should be used to make sure that applications work without these methods.
- *
- * Defaults to true. If no value is specified, returns the current configured value.
- *
- * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.
- *
- * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
- * otherwise, returns the current configured value.
- **/
- this.useLegacyPromiseExtensions = function(value) {
- if (isDefined(value)) {
- useLegacyPromise = !!value;
- return this;
- }
- return useLegacyPromise;
- };
-
- /**
- * @ngdoc property
- * @name $httpProvider#interceptors
- * @description
- *
- * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}
- * pre-processing of request or postprocessing of responses.
- *
- * These service factories are ordered by request, i.e. they are applied in the same order as the
- * array, on request, but reverse order, on response.
- *
- * {@link ng.$http#interceptors Interceptors detailed info}
- **/
- var interceptorFactories = this.interceptors = [];
-
- this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',
- function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {
-
- var defaultCache = $cacheFactory('$http');
-
- /**
- * Make sure that default param serializer is exposed as a function
- */
- defaults.paramSerializer = isString(defaults.paramSerializer) ?
- $injector.get(defaults.paramSerializer) : defaults.paramSerializer;
-
- /**
- * Interceptors stored in reverse order. Inner interceptors before outer interceptors.
- * The reversal is needed so that we can build up the interception chain around the
- * server request.
- */
- var reversedInterceptors = [];
-
- forEach(interceptorFactories, function(interceptorFactory) {
- reversedInterceptors.unshift(isString(interceptorFactory)
- ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));
- });
-
- /**
- * @ngdoc service
- * @kind function
- * @name $http
- * @requires ng.$httpBackend
- * @requires $cacheFactory
- * @requires $rootScope
- * @requires $q
- * @requires $injector
- *
- * @description
- * The `$http` service is a core Angular service that facilitates communication with the remote
- * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)
- * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).
- *
- * For unit testing applications that use `$http` service, see
- * {@link ngMock.$httpBackend $httpBackend mock}.
- *
- * For a higher level of abstraction, please check out the {@link ngResource.$resource
- * $resource} service.
- *
- * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by
- * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage
- * it is important to familiarize yourself with these APIs and the guarantees they provide.
- *
- *
- * ## General usage
- * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —
- * that is used to generate an HTTP request and returns a {@link ng.$q promise}.
- *
- * ```js
- * // Simple GET request example:
- * $http({
- * method: 'GET',
- * url: '/someUrl'
- * }).then(function successCallback(response) {
- * // this callback will be called asynchronously
- * // when the response is available
- * }, function errorCallback(response) {
- * // called asynchronously if an error occurs
- * // or server returns response with an error status.
- * });
- * ```
- *
- * The response object has these properties:
- *
- * - **data** – `{string|Object}` – The response body transformed with the transform
- * functions.
- * - **status** – `{number}` – HTTP status code of the response.
- * - **headers** – `{function([headerName])}` – Header getter function.
- * - **config** – `{Object}` – The configuration object that was used to generate the request.
- * - **statusText** – `{string}` – HTTP status text of the response.
- *
- * A response status code between 200 and 299 is considered a success status and
- * will result in the success callback being called. Note that if the response is a redirect,
- * XMLHttpRequest will transparently follow it, meaning that the error callback will not be
- * called for such responses.
- *
- *
- * ## Shortcut methods
- *
- * Shortcut methods are also available. All shortcut methods require passing in the URL, and
- * request data must be passed in for POST/PUT requests. An optional config can be passed as the
- * last argument.
- *
- * ```js
- * $http.get('/someUrl', config).then(successCallback, errorCallback);
- * $http.post('/someUrl', data, config).then(successCallback, errorCallback);
- * ```
- *
- * Complete list of shortcut methods:
- *
- * - {@link ng.$http#get $http.get}
- * - {@link ng.$http#head $http.head}
- * - {@link ng.$http#post $http.post}
- * - {@link ng.$http#put $http.put}
- * - {@link ng.$http#delete $http.delete}
- * - {@link ng.$http#jsonp $http.jsonp}
- * - {@link ng.$http#patch $http.patch}
- *
- *
- * ## Writing Unit Tests that use $http
- * When unit testing (using {@link ngMock ngMock}), it is necessary to call
- * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending
- * request using trained responses.
- *
- * ```
- * $httpBackend.expectGET(...);
- * $http.get(...);
- * $httpBackend.flush();
- * ```
- *
- * ## Deprecation Notice
- * <div class="alert alert-danger">
- * The `$http` legacy promise methods `success` and `error` have been deprecated.
- * Use the standard `then` method instead.
- * If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to
- * `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.
- * </div>
- *
- * ## Setting HTTP Headers
- *
- * The $http service will automatically add certain HTTP headers to all requests. These defaults
- * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration
- * object, which currently contains this default configuration:
- *
- * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):
- * - `Accept: application/json, text/plain, * / *`
- * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)
- * - `Content-Type: application/json`
- * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)
- * - `Content-Type: application/json`
- *
- * To add or overwrite these defaults, simply add or remove a property from these configuration
- * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
- * with the lowercased HTTP method name as the key, e.g.
- * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.
- *
- * The defaults can also be set at runtime via the `$http.defaults` object in the same
- * fashion. For example:
- *
- * ```
- * module.run(function($http) {
- * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'
- * });
- * ```
- *
- * In addition, you can supply a `headers` property in the config object passed when
- * calling `$http(config)`, which overrides the defaults without changing them globally.
- *
- * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,
- * Use the `headers` property, setting the desired header to `undefined`. For example:
- *
- * ```js
- * var req = {
- * method: 'POST',
- * url: 'http://example.com',
- * headers: {
- * 'Content-Type': undefined
- * },
- * data: { test: 'test' }
- * }
- *
- * $http(req).then(function(){...}, function(){...});
- * ```
- *
- * ## Transforming Requests and Responses
- *
- * Both requests and responses can be transformed using transformation functions: `transformRequest`
- * and `transformResponse`. These properties can be a single function that returns
- * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,
- * which allows you to `push` or `unshift` a new transformation function into the transformation chain.
- *
- * ### Default Transformations
- *
- * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and
- * `defaults.transformResponse` properties. If a request does not provide its own transformations
- * then these will be applied.
- *
- * You can augment or replace the default transformations by modifying these properties by adding to or
- * replacing the array.
- *
- * Angular provides the following default transformations:
- *
- * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):
- *
- * - If the `data` property of the request configuration object contains an object, serialize it
- * into JSON format.
- *
- * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):
- *
- * - If XSRF prefix is detected, strip it (see Security Considerations section below).
- * - If JSON response is detected, deserialize it using a JSON parser.
- *
- *
- * ### Overriding the Default Transformations Per Request
- *
- * If you wish override the request/response transformations only for a single request then provide
- * `transformRequest` and/or `transformResponse` properties on the configuration object passed
- * into `$http`.
- *
- * Note that if you provide these properties on the config object the default transformations will be
- * overwritten. If you wish to augment the default transformations then you must include them in your
- * local transformation array.
- *
- * The following code demonstrates adding a new response transformation to be run after the default response
- * transformations have been run.
- *
- * ```js
- * function appendTransform(defaults, transform) {
- *
- * // We can't guarantee that the default transformation is an array
- * defaults = angular.isArray(defaults) ? defaults : [defaults];
- *
- * // Append the new transformation to the defaults
- * return defaults.concat(transform);
- * }
- *
- * $http({
- * url: '...',
- * method: 'GET',
- * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {
- * return doTransform(value);
- * })
- * });
- * ```
- *
- *
- * ## Caching
- *
- * To enable caching, set the request configuration `cache` property to `true` (to use default
- * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).
- * When the cache is enabled, `$http` stores the response from the server in the specified
- * cache. The next time the same request is made, the response is served from the cache without
- * sending a request to the server.
- *
- * Note that even if the response is served from cache, delivery of the data is asynchronous in
- * the same way that real requests are.
- *
- * If there are multiple GET requests for the same URL that should be cached using the same
- * cache, but the cache is not populated yet, only one request to the server will be made and
- * the remaining requests will be fulfilled using the response from the first request.
- *
- * You can change the default cache to a new object (built with
- * {@link ng.$cacheFactory `$cacheFactory`}) by updating the
- * {@link ng.$http#defaults `$http.defaults.cache`} property. All requests who set
- * their `cache` property to `true` will now use this cache object.
- *
- * If you set the default cache to `false` then only requests that specify their own custom
- * cache object will be cached.
- *
- * ## Interceptors
- *
- * Before you start creating interceptors, be sure to understand the
- * {@link ng.$q $q and deferred/promise APIs}.
- *
- * For purposes of global error handling, authentication, or any kind of synchronous or
- * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be
- * able to intercept requests before they are handed to the server and
- * responses before they are handed over to the application code that
- * initiated these requests. The interceptors leverage the {@link ng.$q
- * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.
- *
- * The interceptors are service factories that are registered with the `$httpProvider` by
- * adding them to the `$httpProvider.interceptors` array. The factory is called and
- * injected with dependencies (if specified) and returns the interceptor.
- *
- * There are two kinds of interceptors (and two kinds of rejection interceptors):
- *
- * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to
- * modify the `config` object or create a new one. The function needs to return the `config`
- * object directly, or a promise containing the `config` or a new `config` object.
- * * `requestError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- * * `response`: interceptors get called with http `response` object. The function is free to
- * modify the `response` object or create a new one. The function needs to return the `response`
- * object directly, or as a promise containing the `response` or a new `response` object.
- * * `responseError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- *
- *
- * ```js
- * // register the interceptor as a service
- * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
- * return {
- * // optional method
- * 'request': function(config) {
- * // do something on success
- * return config;
- * },
- *
- * // optional method
- * 'requestError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * },
- *
- *
- *
- * // optional method
- * 'response': function(response) {
- * // do something on success
- * return response;
- * },
- *
- * // optional method
- * 'responseError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * }
- * };
- * });
- *
- * $httpProvider.interceptors.push('myHttpInterceptor');
- *
- *
- * // alternatively, register the interceptor via an anonymous factory
- * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {
- * return {
- * 'request': function(config) {
- * // same as above
- * },
- *
- * 'response': function(response) {
- * // same as above
- * }
- * };
- * });
- * ```
- *
- * ## Security Considerations
- *
- * When designing web applications, consider security threats from:
- *
- * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
- *
- * Both server and the client must cooperate in order to eliminate these threats. Angular comes
- * pre-configured with strategies that address these issues, but for this to work backend server
- * cooperation is required.
- *
- * ### JSON Vulnerability Protection
- *
- * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * allows third party website to turn your JSON resource URL into
- * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To
- * counter this your server can prefix all JSON requests with following string `")]}',\n"`.
- * Angular will automatically strip the prefix before processing it as JSON.
- *
- * For example if your server needs to return:
- * ```js
- * ['one','two']
- * ```
- *
- * which is vulnerable to attack, your server can return:
- * ```js
- * )]}',
- * ['one','two']
- * ```
- *
- * Angular will strip the prefix, before processing the JSON.
- *
- *
- * ### Cross Site Request Forgery (XSRF) Protection
- *
- * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which
- * an unauthorized site can gain your user's private data. Angular provides a mechanism
- * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie
- * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only
- * JavaScript that runs on your domain could read the cookie, your server can be assured that
- * the XHR came from JavaScript running on your domain. The header will not be set for
- * cross-domain requests.
- *
- * To take advantage of this, your server needs to set a token in a JavaScript readable session
- * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the
- * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure
- * that only JavaScript running on your domain could have sent the request. The token must be
- * unique for each user and must be verifiable by the server (to prevent the JavaScript from
- * making up its own tokens). We recommend that the token is a digest of your site's
- * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)
- * for added security.
- *
- * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName
- * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,
- * or the per-request config object.
- *
- * In order to prevent collisions in environments where multiple Angular apps share the
- * same domain or subdomain, we recommend that each application uses unique cookie name.
- *
- * @param {object} config Object describing the request to be made and how it should be
- * processed. The object has following properties:
- *
- * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)
- * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.
- * - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be serialized
- * with the `paramSerializer` and appended as GET parameters.
- * - **data** – `{string|Object}` – Data to be sent as the request message data.
- * - **headers** – `{Object}` – Map of strings or functions which return strings representing
- * HTTP headers to send to the server. If the return value of a function is null, the
- * header will not be sent. Functions accept a config object as an argument.
- * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.
- * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.
- * - **transformRequest** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * request body and headers and returns its transformed (typically serialized) version.
- * See {@link ng.$http#overriding-the-default-transformations-per-request
- * Overriding the Default Transformations}
- * - **transformResponse** –
- * `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * response body, headers and status and returns its transformed (typically deserialized) version.
- * See {@link ng.$http#overriding-the-default-transformations-per-request
- * Overriding the Default TransformationjqLiks}
- * - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to
- * prepare the string representation of request parameters (specified as an object).
- * If specified as string, it is interpreted as function registered with the
- * {@link $injector $injector}, which means you can create your own serializer
- * by registering it as a {@link auto.$provide#service service}.
- * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};
- * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}
- * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- * GET request, otherwise if a cache instance built with
- * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
- * caching.
- * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}
- * that should abort the request when resolved.
- * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the
- * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)
- * for more information.
- * - **responseType** - `{string}` - see
- * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).
- *
- * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object
- * when the request succeeds or fails.
- *
- *
- * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
- * requests. This is primarily meant to be used for debugging purposes.
- *
- *
- * @example
-<example module="httpExample">
-<file name="index.html">
- <div ng-controller="FetchController">
- <select ng-model="method" aria-label="Request method">
- <option>GET</option>
- <option>JSONP</option>
- </select>
- <input type="text" ng-model="url" size="80" aria-label="URL" />
- <button id="fetchbtn" ng-click="fetch()">fetch</button><br>
- <button id="samplegetbtn" ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button>
- <button id="samplejsonpbtn"
- ng-click="updateModel('JSONP',
- 'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">
- Sample JSONP
- </button>
- <button id="invalidjsonpbtn"
- ng-click="updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')">
- Invalid JSONP
- </button>
- <pre>http status code: {{status}}</pre>
- <pre>http response data: {{data}}</pre>
- </div>
-</file>
-<file name="script.js">
- angular.module('httpExample', [])
- .controller('FetchController', ['$scope', '$http', '$templateCache',
- function($scope, $http, $templateCache) {
- $scope.method = 'GET';
- $scope.url = 'http-hello.html';
-
- $scope.fetch = function() {
- $scope.code = null;
- $scope.response = null;
-
- $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
- then(function(response) {
- $scope.status = response.status;
- $scope.data = response.data;
- }, function(response) {
- $scope.data = response.data || "Request failed";
- $scope.status = response.status;
- });
- };
-
- $scope.updateModel = function(method, url) {
- $scope.method = method;
- $scope.url = url;
- };
- }]);
-</file>
-<file name="http-hello.html">
- Hello, $http!
-</file>
-<file name="protractor.js" type="protractor">
- var status = element(by.binding('status'));
- var data = element(by.binding('data'));
- var fetchBtn = element(by.id('fetchbtn'));
- var sampleGetBtn = element(by.id('samplegetbtn'));
- var sampleJsonpBtn = element(by.id('samplejsonpbtn'));
- var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));
-
- it('should make an xhr GET request', function() {
- sampleGetBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('200');
- expect(data.getText()).toMatch(/Hello, \$http!/);
- });
-
-// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185
-// it('should make a JSONP request to angularjs.org', function() {
-// sampleJsonpBtn.click();
-// fetchBtn.click();
-// expect(status.getText()).toMatch('200');
-// expect(data.getText()).toMatch(/Super Hero!/);
-// });
-
- it('should make JSONP request to invalid URL and invoke the error handler',
- function() {
- invalidJsonpBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('0');
- expect(data.getText()).toMatch('Request failed');
- });
-</file>
-</example>
- */
- function $http(requestConfig) {
-
- if (!angular.isObject(requestConfig)) {
- throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);
- }
-
- var config = extend({
- method: 'get',
- transformRequest: defaults.transformRequest,
- transformResponse: defaults.transformResponse,
- paramSerializer: defaults.paramSerializer
- }, requestConfig);
-
- config.headers = mergeHeaders(requestConfig);
- config.method = uppercase(config.method);
- config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
-
- var serverRequest = function(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- };
-
- var chain = [serverRequest, undefined];
- var promise = $q.when(config);
-
- // apply interceptors
- forEach(reversedInterceptors, function(interceptor) {
- if (interceptor.request || interceptor.requestError) {
- chain.unshift(interceptor.request, interceptor.requestError);
- }
- if (interceptor.response || interceptor.responseError) {
- chain.push(interceptor.response, interceptor.responseError);
- }
- });
-
- while (chain.length) {
- var thenFn = chain.shift();
- var rejectFn = chain.shift();
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- if (useLegacyPromise) {
- promise.success = function(fn) {
- assertArgFn(fn, 'fn');
-
- promise.then(function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
-
- promise.error = function(fn) {
- assertArgFn(fn, 'fn');
-
- promise.then(null, function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
- } else {
- promise.success = $httpMinErrLegacyFn('success');
- promise.error = $httpMinErrLegacyFn('error');
- }
-
- return promise;
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
-
- function executeHeaderFns(headers, config) {
- var headerContent, processedHeaders = {};
-
- forEach(headers, function(headerFn, header) {
- if (isFunction(headerFn)) {
- headerContent = headerFn(config);
- if (headerContent != null) {
- processedHeaders[header] = headerContent;
- }
- } else {
- processedHeaders[header] = headerFn;
- }
- });
-
- return processedHeaders;
- }
-
- function mergeHeaders(config) {
- var defHeaders = defaults.headers,
- reqHeaders = extend({}, config.headers),
- defHeaderName, lowercaseDefHeaderName, reqHeaderName;
-
- defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);
-
- // using for-in instead of forEach to avoid unecessary iteration after header has been found
- defaultHeadersIteration:
- for (defHeaderName in defHeaders) {
- lowercaseDefHeaderName = lowercase(defHeaderName);
-
- for (reqHeaderName in reqHeaders) {
- if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {
- continue defaultHeadersIteration;
- }
- }
-
- reqHeaders[defHeaderName] = defHeaders[defHeaderName];
- }
-
- // execute if header value is a function for merged headers
- return executeHeaderFns(reqHeaders, shallowCopy(config));
- }
- }
-
- $http.pendingRequests = [];
-
- /**
- * @ngdoc method
- * @name $http#get
- *
- * @description
- * Shortcut method to perform `GET` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#delete
- *
- * @description
- * Shortcut method to perform `DELETE` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#head
- *
- * @description
- * Shortcut method to perform `HEAD` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#jsonp
- *
- * @description
- * Shortcut method to perform `JSONP` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request.
- * The name of the callback should be the string `JSON_CALLBACK`.
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethods('get', 'delete', 'head', 'jsonp');
-
- /**
- * @ngdoc method
- * @name $http#post
- *
- * @description
- * Shortcut method to perform `POST` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#put
- *
- * @description
- * Shortcut method to perform `PUT` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#patch
- *
- * @description
- * Shortcut method to perform `PATCH` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethodsWithData('post', 'put', 'patch');
-
- /**
- * @ngdoc property
- * @name $http#defaults
- *
- * @description
- * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
- * default headers, withCredentials as well as request and response transformations.
- *
- * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
- */
- $http.defaults = defaults;
-
-
- return $http;
-
-
- function createShortMethods(names) {
- forEach(arguments, function(name) {
- $http[name] = function(url, config) {
- return $http(extend({}, config || {}, {
- method: name,
- url: url
- }));
- };
- });
- }
-
-
- function createShortMethodsWithData(name) {
- forEach(arguments, function(name) {
- $http[name] = function(url, data, config) {
- return $http(extend({}, config || {}, {
- method: name,
- url: url,
- data: data
- }));
- };
- });
- }
-
-
- /**
- * Makes the request.
- *
- * !!! ACCESSES CLOSURE VARS:
- * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
- */
- function sendReq(config, reqData) {
- var deferred = $q.defer(),
- promise = deferred.promise,
- cache,
- cachedResp,
- reqHeaders = config.headers,
- url = buildUrl(config.url, config.paramSerializer(config.params));
-
- $http.pendingRequests.push(config);
- promise.then(removePendingReq, removePendingReq);
-
-
- if ((config.cache || defaults.cache) && config.cache !== false &&
- (config.method === 'GET' || config.method === 'JSONP')) {
- cache = isObject(config.cache) ? config.cache
- : isObject(defaults.cache) ? defaults.cache
- : defaultCache;
- }
-
- if (cache) {
- cachedResp = cache.get(url);
- if (isDefined(cachedResp)) {
- if (isPromiseLike(cachedResp)) {
- // cached request has already been sent, but there is no response yet
- cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);
- } else {
- // serving from cache
- if (isArray(cachedResp)) {
- resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);
- } else {
- resolvePromise(cachedResp, 200, {}, 'OK');
- }
- }
- } else {
- // put the promise for the non-transformed response into cache as a placeholder
- cache.put(url, promise);
- }
- }
-
-
- // if we won't have the response in cache, set the xsrf headers and
- // send the request to the backend
- if (isUndefined(cachedResp)) {
- var xsrfValue = urlIsSameOrigin(config.url)
- ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]
- : undefined;
- if (xsrfValue) {
- reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
- }
-
- $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,
- config.withCredentials, config.responseType);
- }
-
- return promise;
-
-
- /**
- * Callback registered to $httpBackend():
- * - caches the response if desired
- * - resolves the raw $http promise
- * - calls $apply
- */
- function done(status, response, headersString, statusText) {
- if (cache) {
- if (isSuccess(status)) {
- cache.put(url, [status, response, parseHeaders(headersString), statusText]);
- } else {
- // remove promise from the cache
- cache.remove(url);
- }
- }
-
- function resolveHttpPromise() {
- resolvePromise(response, status, headersString, statusText);
- }
-
- if (useApplyAsync) {
- $rootScope.$applyAsync(resolveHttpPromise);
- } else {
- resolveHttpPromise();
- if (!$rootScope.$$phase) $rootScope.$apply();
- }
- }
-
-
- /**
- * Resolves the raw $http promise.
- */
- function resolvePromise(response, status, headers, statusText) {
- //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
- status = status >= -1 ? status : 0;
-
- (isSuccess(status) ? deferred.resolve : deferred.reject)({
- data: response,
- status: status,
- headers: headersGetter(headers),
- config: config,
- statusText: statusText
- });
- }
-
- function resolvePromiseWithResult(result) {
- resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);
- }
-
- function removePendingReq() {
- var idx = $http.pendingRequests.indexOf(config);
- if (idx !== -1) $http.pendingRequests.splice(idx, 1);
- }
- }
-
-
- function buildUrl(url, serializedParams) {
- if (serializedParams.length > 0) {
- url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams;
- }
- return url;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $xhrFactory
- *
- * @description
- * Factory function used to create XMLHttpRequest objects.
- *
- * Replace or decorate this service to create your own custom XMLHttpRequest objects.
- *
- * ```
- * angular.module('myApp', [])
- * .factory('$xhrFactory', function() {
- * return function createXhr(method, url) {
- * return new window.XMLHttpRequest({mozSystem: true});
- * };
- * });
- * ```
- *
- * @param {string} method HTTP method of the request (GET, POST, PUT, ..)
- * @param {string} url URL of the request.
- */
-function $xhrFactoryProvider() {
- this.$get = function() {
- return function createXhr() {
- return new window.XMLHttpRequest();
- };
- };
-}
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @requires $window
- * @requires $document
- * @requires $xhrFactory
- *
- * @description
- * HTTP backend used by the {@link ng.$http service} that delegates to
- * XMLHttpRequest object or JSONP and deals with browser incompatibilities.
- *
- * You should never need to use this service directly, instead use the higher-level abstractions:
- * {@link ng.$http $http} or {@link ngResource.$resource $resource}.
- *
- * During testing this implementation is swapped with {@link ngMock.$httpBackend mock
- * $httpBackend} which can be trained with responses.
- */
-function $HttpBackendProvider() {
- this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
- }];
-}
-
-function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {
- // TODO(vojta): fix the signature
- return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {
- $browser.$$incOutstandingRequestCount();
- url = url || $browser.url();
-
- if (lowercase(method) == 'jsonp') {
- var callbackId = '_' + (callbacks.counter++).toString(36);
- callbacks[callbackId] = function(data) {
- callbacks[callbackId].data = data;
- callbacks[callbackId].called = true;
- };
-
- var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
- callbackId, function(status, text) {
- completeRequest(callback, status, callbacks[callbackId].data, "", text);
- callbacks[callbackId] = noop;
- });
- } else {
-
- var xhr = createXhr(method, url);
-
- xhr.open(method, url, true);
- forEach(headers, function(value, key) {
- if (isDefined(value)) {
- xhr.setRequestHeader(key, value);
- }
- });
-
- xhr.onload = function requestLoaded() {
- var statusText = xhr.statusText || '';
-
- // responseText is the old-school way of retrieving response (supported by IE9)
- // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
- var response = ('response' in xhr) ? xhr.response : xhr.responseText;
-
- // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
- var status = xhr.status === 1223 ? 204 : xhr.status;
-
- // fix status code when it is 0 (0 status is undocumented).
- // Occurs when accessing file resources or on Android 4.1 stock browser
- // while retrieving files from application cache.
- if (status === 0) {
- status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;
- }
-
- completeRequest(callback,
- status,
- response,
- xhr.getAllResponseHeaders(),
- statusText);
- };
-
- var requestError = function() {
- // The response is always empty
- // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error
- completeRequest(callback, -1, null, null, '');
- };
-
- xhr.onerror = requestError;
- xhr.onabort = requestError;
-
- if (withCredentials) {
- xhr.withCredentials = true;
- }
-
- if (responseType) {
- try {
- xhr.responseType = responseType;
- } catch (e) {
- // WebKit added support for the json responseType value on 09/03/2013
- // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are
- // known to throw when setting the value "json" as the response type. Other older
- // browsers implementing the responseType
- //
- // The json response type can be ignored if not supported, because JSON payloads are
- // parsed on the client-side regardless.
- if (responseType !== 'json') {
- throw e;
- }
- }
- }
-
- xhr.send(isUndefined(post) ? null : post);
- }
-
- if (timeout > 0) {
- var timeoutId = $browserDefer(timeoutRequest, timeout);
- } else if (isPromiseLike(timeout)) {
- timeout.then(timeoutRequest);
- }
-
-
- function timeoutRequest() {
- jsonpDone && jsonpDone();
- xhr && xhr.abort();
- }
-
- function completeRequest(callback, status, response, headersString, statusText) {
- // cancel timeout and subsequent timeout promise resolution
- if (isDefined(timeoutId)) {
- $browserDefer.cancel(timeoutId);
- }
- jsonpDone = xhr = null;
-
- callback(status, response, headersString, statusText);
- $browser.$$completeOutstandingRequest(noop);
- }
- };
-
- function jsonpReq(url, callbackId, done) {
- // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
- // - fetches local scripts via XHR and evals them
- // - adds and immediately removes script elements from the document
- var script = rawDocument.createElement('script'), callback = null;
- script.type = "text/javascript";
- script.src = url;
- script.async = true;
-
- callback = function(event) {
- removeEventListenerFn(script, "load", callback);
- removeEventListenerFn(script, "error", callback);
- rawDocument.body.removeChild(script);
- script = null;
- var status = -1;
- var text = "unknown";
-
- if (event) {
- if (event.type === "load" && !callbacks[callbackId].called) {
- event = { type: "error" };
- }
- text = event.type;
- status = event.type === "error" ? 404 : 200;
- }
-
- if (done) {
- done(status, text);
- }
- };
-
- addEventListenerFn(script, "load", callback);
- addEventListenerFn(script, "error", callback);
- rawDocument.body.appendChild(script);
- return callback;
- }
-}
-
-var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');
-$interpolateMinErr.throwNoconcat = function(text) {
- throw $interpolateMinErr('noconcat',
- "Error while interpolating: {0}\nStrict Contextual Escaping disallows " +
- "interpolations that concatenate multiple expressions when a trusted value is " +
- "required. See http://docs.angularjs.org/api/ng.$sce", text);
-};
-
-$interpolateMinErr.interr = function(text, err) {
- return $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, err.toString());
-};
-
-/**
- * @ngdoc provider
- * @name $interpolateProvider
- *
- * @description
- *
- * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
- *
- * @example
-<example module="customInterpolationApp">
-<file name="index.html">
-<script>
- var customInterpolationApp = angular.module('customInterpolationApp', []);
-
- customInterpolationApp.config(function($interpolateProvider) {
- $interpolateProvider.startSymbol('//');
- $interpolateProvider.endSymbol('//');
- });
-
-
- customInterpolationApp.controller('DemoController', function() {
- this.label = "This binding is brought you by // interpolation symbols.";
- });
-</script>
-<div ng-app="App" ng-controller="DemoController as demo">
- //demo.label//
-</div>
-</file>
-<file name="protractor.js" type="protractor">
- it('should interpolate binding with custom symbols', function() {
- expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');
- });
-</file>
-</example>
- */
-function $InterpolateProvider() {
- var startSymbol = '{{';
- var endSymbol = '}}';
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#startSymbol
- * @description
- * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
- *
- * @param {string=} value new value to set the starting symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.startSymbol = function(value) {
- if (value) {
- startSymbol = value;
- return this;
- } else {
- return startSymbol;
- }
- };
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * @param {string=} value new value to set the ending symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.endSymbol = function(value) {
- if (value) {
- endSymbol = value;
- return this;
- } else {
- return endSymbol;
- }
- };
-
-
- this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {
- var startSymbolLength = startSymbol.length,
- endSymbolLength = endSymbol.length,
- escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),
- escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');
-
- function escape(ch) {
- return '\\\\\\' + ch;
- }
-
- function unescapeText(text) {
- return text.replace(escapedStartRegexp, startSymbol).
- replace(escapedEndRegexp, endSymbol);
- }
-
- function stringify(value) {
- if (value == null) { // null || undefined
- return '';
- }
- switch (typeof value) {
- case 'string':
- break;
- case 'number':
- value = '' + value;
- break;
- default:
- value = toJson(value);
- }
-
- return value;
- }
-
- /**
- * @ngdoc service
- * @name $interpolate
- * @kind function
- *
- * @requires $parse
- * @requires $sce
- *
- * @description
- *
- * Compiles a string with markup into an interpolation function. This service is used by the
- * HTML {@link ng.$compile $compile} service for data binding. See
- * {@link ng.$interpolateProvider $interpolateProvider} for configuring the
- * interpolation markup.
- *
- *
- * ```js
- * var $interpolate = ...; // injected
- * var exp = $interpolate('Hello {{name | uppercase}}!');
- * expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');
- * ```
- *
- * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is
- * `true`, the interpolation function will return `undefined` unless all embedded expressions
- * evaluate to a value other than `undefined`.
- *
- * ```js
- * var $interpolate = ...; // injected
- * var context = {greeting: 'Hello', name: undefined };
- *
- * // default "forgiving" mode
- * var exp = $interpolate('{{greeting}} {{name}}!');
- * expect(exp(context)).toEqual('Hello !');
- *
- * // "allOrNothing" mode
- * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);
- * expect(exp(context)).toBeUndefined();
- * context.name = 'Angular';
- * expect(exp(context)).toEqual('Hello Angular!');
- * ```
- *
- * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
- *
- * ####Escaped Interpolation
- * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
- * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
- * It will be rendered as a regular start/end marker, and will not be interpreted as an expression
- * or binding.
- *
- * This enables web-servers to prevent script injection attacks and defacing attacks, to some
- * degree, while also enabling code examples to work without relying on the
- * {@link ng.directive:ngNonBindable ngNonBindable} directive.
- *
- * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,
- * replacing angle brackets (&lt;, &gt;) with &amp;lt; and &amp;gt; respectively, and replacing all
- * interpolation start/end markers with their escaped counterparts.**
- *
- * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered
- * output when the $interpolate service processes the text. So, for HTML elements interpolated
- * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter
- * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,
- * this is typically useful only when user-data is used in rendering a template from the server, or
- * when otherwise untrusted data is used by a directive.
- *
- * <example>
- * <file name="index.html">
- * <div ng-init="username='A user'">
- * <p ng-init="apptitle='Escaping demo'">{{apptitle}}: \{\{ username = "defaced value"; \}\}
- * </p>
- * <p><strong>{{username}}</strong> attempts to inject code which will deface the
- * application, but fails to accomplish their task, because the server has correctly
- * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)
- * characters.</p>
- * <p>Instead, the result of the attempted script injection is visible, and can be removed
- * from the database by an administrator.</p>
- * </div>
- * </file>
- * </example>
- *
- * @param {string} text The text with markup to interpolate.
- * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
- * embedded expression in order to return an interpolation function. Strings with no
- * embedded expression will return null for the interpolation function.
- * @param {string=} trustedContext when provided, the returned function passes the interpolated
- * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,
- * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that
- * provides Strict Contextual Escaping for details.
- * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined
- * unless all embedded expressions evaluate to a value other than `undefined`.
- * @returns {function(context)} an interpolation function which is used to compute the
- * interpolated string. The function has these parameters:
- *
- * - `context`: evaluation context for all expressions embedded in the interpolated text
- */
- function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {
- allOrNothing = !!allOrNothing;
- var startIndex,
- endIndex,
- index = 0,
- expressions = [],
- parseFns = [],
- textLength = text.length,
- exp,
- concat = [],
- expressionPositions = [];
-
- while (index < textLength) {
- if (((startIndex = text.indexOf(startSymbol, index)) != -1) &&
- ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) {
- if (index !== startIndex) {
- concat.push(unescapeText(text.substring(index, startIndex)));
- }
- exp = text.substring(startIndex + startSymbolLength, endIndex);
- expressions.push(exp);
- parseFns.push($parse(exp, parseStringifyInterceptor));
- index = endIndex + endSymbolLength;
- expressionPositions.push(concat.length);
- concat.push('');
- } else {
- // we did not find an interpolation, so we have to add the remainder to the separators array
- if (index !== textLength) {
- concat.push(unescapeText(text.substring(index)));
- }
- break;
- }
- }
-
- // Concatenating expressions makes it hard to reason about whether some combination of
- // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a
- // single expression be used for iframe[src], object[src], etc., we ensure that the value
- // that's used is assigned or constructed by some JS code somewhere that is more testable or
- // make it obvious that you bound the value to some user controlled value. This helps reduce
- // the load when auditing for XSS issues.
- if (trustedContext && concat.length > 1) {
- $interpolateMinErr.throwNoconcat(text);
- }
-
- if (!mustHaveExpression || expressions.length) {
- var compute = function(values) {
- for (var i = 0, ii = expressions.length; i < ii; i++) {
- if (allOrNothing && isUndefined(values[i])) return;
- concat[expressionPositions[i]] = values[i];
- }
- return concat.join('');
- };
-
- var getValue = function(value) {
- return trustedContext ?
- $sce.getTrusted(trustedContext, value) :
- $sce.valueOf(value);
- };
-
- return extend(function interpolationFn(context) {
- var i = 0;
- var ii = expressions.length;
- var values = new Array(ii);
-
- try {
- for (; i < ii; i++) {
- values[i] = parseFns[i](context);
- }
-
- return compute(values);
- } catch (err) {
- $exceptionHandler($interpolateMinErr.interr(text, err));
- }
-
- }, {
- // all of these properties are undocumented for now
- exp: text, //just for compatibility with regular watchers created via $watch
- expressions: expressions,
- $$watchDelegate: function(scope, listener) {
- var lastValue;
- return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {
- var currValue = compute(values);
- if (isFunction(listener)) {
- listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);
- }
- lastValue = currValue;
- });
- }
- });
- }
-
- function parseStringifyInterceptor(value) {
- try {
- value = getValue(value);
- return allOrNothing && !isDefined(value) ? value : stringify(value);
- } catch (err) {
- $exceptionHandler($interpolateMinErr.interr(text, err));
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $interpolate#startSymbol
- * @description
- * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
- *
- * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change
- * the symbol.
- *
- * @returns {string} start symbol.
- */
- $interpolate.startSymbol = function() {
- return startSymbol;
- };
-
-
- /**
- * @ngdoc method
- * @name $interpolate#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change
- * the symbol.
- *
- * @returns {string} end symbol.
- */
- $interpolate.endSymbol = function() {
- return endSymbol;
- };
-
- return $interpolate;
- }];
-}
-
-function $IntervalProvider() {
- this.$get = ['$rootScope', '$window', '$q', '$$q',
- function($rootScope, $window, $q, $$q) {
- var intervals = {};
-
-
- /**
- * @ngdoc service
- * @name $interval
- *
- * @description
- * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`
- * milliseconds.
- *
- * The return value of registering an interval function is a promise. This promise will be
- * notified upon each tick of the interval, and will be resolved after `count` iterations, or
- * run indefinitely if `count` is not defined. The value of the notification will be the
- * number of iterations that have run.
- * To cancel an interval, call `$interval.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
- * time.
- *
- * <div class="alert alert-warning">
- * **Note**: Intervals created by this service must be explicitly destroyed when you are finished
- * with them. In particular they are not automatically destroyed when a controller's scope or a
- * directive's element are destroyed.
- * You should take this into consideration and make sure to always cancel the interval at the
- * appropriate moment. See the example below for more details on how and when to do this.
- * </div>
- *
- * @param {function()} fn A function that should be called repeatedly.
- * @param {number} delay Number of milliseconds between each function call.
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
- * indefinitely.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {promise} A promise which will be notified on each iteration.
- *
- * @example
- * <example module="intervalExample">
- * <file name="index.html">
- * <script>
- * angular.module('intervalExample', [])
- * .controller('ExampleController', ['$scope', '$interval',
- * function($scope, $interval) {
- * $scope.format = 'M/d/yy h:mm:ss a';
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- *
- * var stop;
- * $scope.fight = function() {
- * // Don't start a new fight if we are already fighting
- * if ( angular.isDefined(stop) ) return;
- *
- * stop = $interval(function() {
- * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
- * $scope.blood_1 = $scope.blood_1 - 3;
- * $scope.blood_2 = $scope.blood_2 - 4;
- * } else {
- * $scope.stopFight();
- * }
- * }, 100);
- * };
- *
- * $scope.stopFight = function() {
- * if (angular.isDefined(stop)) {
- * $interval.cancel(stop);
- * stop = undefined;
- * }
- * };
- *
- * $scope.resetFight = function() {
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- * };
- *
- * $scope.$on('$destroy', function() {
- * // Make sure that the interval is destroyed too
- * $scope.stopFight();
- * });
- * }])
- * // Register the 'myCurrentTime' directive factory method.
- * // We inject $interval and dateFilter service since the factory method is DI.
- * .directive('myCurrentTime', ['$interval', 'dateFilter',
- * function($interval, dateFilter) {
- * // return the directive link function. (compile function not needed)
- * return function(scope, element, attrs) {
- * var format, // date format
- * stopTime; // so that we can cancel the time updates
- *
- * // used to update the UI
- * function updateTime() {
- * element.text(dateFilter(new Date(), format));
- * }
- *
- * // watch the expression, and update the UI on change.
- * scope.$watch(attrs.myCurrentTime, function(value) {
- * format = value;
- * updateTime();
- * });
- *
- * stopTime = $interval(updateTime, 1000);
- *
- * // listen on DOM destroy (removal) event, and cancel the next UI update
- * // to prevent updating time after the DOM element was removed.
- * element.on('$destroy', function() {
- * $interval.cancel(stopTime);
- * });
- * }
- * }]);
- * </script>
- *
- * <div>
- * <div ng-controller="ExampleController">
- * <label>Date format: <input ng-model="format"></label> <hr/>
- * Current time is: <span my-current-time="format"></span>
- * <hr/>
- * Blood 1 : <font color='red'>{{blood_1}}</font>
- * Blood 2 : <font color='red'>{{blood_2}}</font>
- * <button type="button" data-ng-click="fight()">Fight</button>
- * <button type="button" data-ng-click="stopFight()">StopFight</button>
- * <button type="button" data-ng-click="resetFight()">resetFight</button>
- * </div>
- * </div>
- *
- * </file>
- * </example>
- */
- function interval(fn, delay, count, invokeApply) {
- var hasParams = arguments.length > 4,
- args = hasParams ? sliceArgs(arguments, 4) : [],
- setInterval = $window.setInterval,
- clearInterval = $window.clearInterval,
- iteration = 0,
- skipApply = (isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise;
-
- count = isDefined(count) ? count : 0;
-
- promise.then(null, null, (!hasParams) ? fn : function() {
- fn.apply(null, args);
- });
-
- promise.$$intervalId = setInterval(function tick() {
- deferred.notify(iteration++);
-
- if (count > 0 && iteration >= count) {
- deferred.resolve(iteration);
- clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- }
-
- if (!skipApply) $rootScope.$apply();
-
- }, delay);
-
- intervals[promise.$$intervalId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $interval#cancel
- *
- * @description
- * Cancels a task associated with the `promise`.
- *
- * @param {Promise=} promise returned by the `$interval` function.
- * @returns {boolean} Returns `true` if the task was successfully canceled.
- */
- interval.cancel = function(promise) {
- if (promise && promise.$$intervalId in intervals) {
- intervals[promise.$$intervalId].reject('canceled');
- $window.clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- return true;
- }
- return false;
- };
-
- return interval;
- }];
-}
-
-/**
- * @ngdoc service
- * @name $locale
- *
- * @description
- * $locale service provides localization rules for various Angular components. As of right now the
- * only public api is:
- *
- * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
- */
-
-var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
- DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
-var $locationMinErr = minErr('$location');
-
-
-/**
- * Encode path using encodeUriSegment, ignoring forward slashes
- *
- * @param {string} path Path to encode
- * @returns {string}
- */
-function encodePath(path) {
- var segments = path.split('/'),
- i = segments.length;
-
- while (i--) {
- segments[i] = encodeUriSegment(segments[i]);
- }
-
- return segments.join('/');
-}
-
-function parseAbsoluteUrl(absoluteUrl, locationObj) {
- var parsedUrl = urlResolve(absoluteUrl);
-
- locationObj.$$protocol = parsedUrl.protocol;
- locationObj.$$host = parsedUrl.hostname;
- locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;
-}
-
-
-function parseAppUrl(relativeUrl, locationObj) {
- var prefixed = (relativeUrl.charAt(0) !== '/');
- if (prefixed) {
- relativeUrl = '/' + relativeUrl;
- }
- var match = urlResolve(relativeUrl);
- locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?
- match.pathname.substring(1) : match.pathname);
- locationObj.$$search = parseKeyValue(match.search);
- locationObj.$$hash = decodeURIComponent(match.hash);
-
- // make sure path starts with '/';
- if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {
- locationObj.$$path = '/' + locationObj.$$path;
- }
-}
-
-
-/**
- *
- * @param {string} begin
- * @param {string} whole
- * @returns {string} returns text from whole after begin or undefined if it does not begin with
- * expected string.
- */
-function beginsWith(begin, whole) {
- if (whole.indexOf(begin) === 0) {
- return whole.substr(begin.length);
- }
-}
-
-
-function stripHash(url) {
- var index = url.indexOf('#');
- return index == -1 ? url : url.substr(0, index);
-}
-
-function trimEmptyHash(url) {
- return url.replace(/(#.+)|#$/, '$1');
-}
-
-
-function stripFile(url) {
- return url.substr(0, stripHash(url).lastIndexOf('/') + 1);
-}
-
-/* return the server only (scheme://host:port) */
-function serverBase(url) {
- return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));
-}
-
-
-/**
- * LocationHtml5Url represents an url
- * This object is exposed as $location service when HTML5 mode is enabled and supported
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} basePrefix url path prefix
- */
-function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {
- this.$$html5 = true;
- basePrefix = basePrefix || '';
- parseAbsoluteUrl(appBase, this);
-
-
- /**
- * Parse given html5 (regular) url string into properties
- * @param {string} url HTML5 url
- * @private
- */
- this.$$parse = function(url) {
- var pathUrl = beginsWith(appBaseNoFile, url);
- if (!isString(pathUrl)) {
- throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url,
- appBaseNoFile);
- }
-
- parseAppUrl(pathUrl, this);
-
- if (!this.$$path) {
- this.$$path = '/';
- }
-
- this.$$compose();
- };
-
- /**
- * Compose url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'
- };
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (relHref && relHref[0] === '#') {
- // special case for links to hash fragments:
- // keep the old url and only replace the hash fragment
- this.hash(relHref.slice(1));
- return true;
- }
- var appUrl, prevAppUrl;
- var rewrittenUrl;
-
- if (isDefined(appUrl = beginsWith(appBase, url))) {
- prevAppUrl = appUrl;
- if (isDefined(appUrl = beginsWith(basePrefix, appUrl))) {
- rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);
- } else {
- rewrittenUrl = appBase + prevAppUrl;
- }
- } else if (isDefined(appUrl = beginsWith(appBaseNoFile, url))) {
- rewrittenUrl = appBaseNoFile + appUrl;
- } else if (appBaseNoFile == url + '/') {
- rewrittenUrl = appBaseNoFile;
- }
- if (rewrittenUrl) {
- this.$$parse(rewrittenUrl);
- }
- return !!rewrittenUrl;
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when developer doesn't opt into html5 mode.
- * It also serves as the base class for html5 mode fallback on legacy browsers.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {
-
- parseAbsoluteUrl(appBase, this);
-
-
- /**
- * Parse given hashbang url into properties
- * @param {string} url Hashbang url
- * @private
- */
- this.$$parse = function(url) {
- var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
- var withoutHashUrl;
-
- if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {
-
- // The rest of the url starts with a hash so we have
- // got either a hashbang path or a plain hash fragment
- withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl);
- if (isUndefined(withoutHashUrl)) {
- // There was no hashbang prefix so we just have a hash fragment
- withoutHashUrl = withoutBaseUrl;
- }
-
- } else {
- // There was no hashbang path nor hash fragment:
- // If we are in HTML5 mode we use what is left as the path;
- // Otherwise we ignore what is left
- if (this.$$html5) {
- withoutHashUrl = withoutBaseUrl;
- } else {
- withoutHashUrl = '';
- if (isUndefined(withoutBaseUrl)) {
- appBase = url;
- this.replace();
- }
- }
- }
-
- parseAppUrl(withoutHashUrl, this);
-
- this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);
-
- this.$$compose();
-
- /*
- * In Windows, on an anchor node on documents loaded from
- * the filesystem, the browser will return a pathname
- * prefixed with the drive name ('/C:/path') when a
- * pathname without a drive is set:
- * * a.setAttribute('href', '/foo')
- * * a.pathname === '/C:/foo' //true
- *
- * Inside of Angular, we're always using pathnames that
- * do not include drive names for routing.
- */
- function removeWindowsDriveName(path, url, base) {
- /*
- Matches paths for file protocol on windows,
- such as /C:/foo/bar, and captures only /foo/bar.
- */
- var windowsFilePathExp = /^\/[A-Z]:(\/.*)/;
-
- var firstPathSegmentMatch;
-
- //Get the relative path from the input URL.
- if (url.indexOf(base) === 0) {
- url = url.replace(base, '');
- }
-
- // The input URL intentionally contains a first path segment that ends with a colon.
- if (windowsFilePathExp.exec(url)) {
- return path;
- }
-
- firstPathSegmentMatch = windowsFilePathExp.exec(path);
- return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;
- }
- };
-
- /**
- * Compose hashbang url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');
- };
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (stripHash(appBase) == stripHash(url)) {
- this.$$parse(url);
- return true;
- }
- return false;
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when html5 history api is enabled but the browser
- * does not support it.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
- this.$$html5 = true;
- LocationHashbangUrl.apply(this, arguments);
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (relHref && relHref[0] === '#') {
- // special case for links to hash fragments:
- // keep the old url and only replace the hash fragment
- this.hash(relHref.slice(1));
- return true;
- }
-
- var rewrittenUrl;
- var appUrl;
-
- if (appBase == stripHash(url)) {
- rewrittenUrl = url;
- } else if ((appUrl = beginsWith(appBaseNoFile, url))) {
- rewrittenUrl = appBase + hashPrefix + appUrl;
- } else if (appBaseNoFile === url + '/') {
- rewrittenUrl = appBaseNoFile;
- }
- if (rewrittenUrl) {
- this.$$parse(rewrittenUrl);
- }
- return !!rewrittenUrl;
- };
-
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'
- this.$$absUrl = appBase + hashPrefix + this.$$url;
- };
-
-}
-
-
-var locationPrototype = {
-
- /**
- * Are we in html5 mode?
- * @private
- */
- $$html5: false,
-
- /**
- * Has any change been replacing?
- * @private
- */
- $$replace: false,
-
- /**
- * @ngdoc method
- * @name $location#absUrl
- *
- * @description
- * This method is getter only.
- *
- * Return full url representation with all segments encoded according to rules specified in
- * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var absUrl = $location.absUrl();
- * // => "http://example.com/#/some/path?foo=bar&baz=xoxo"
- * ```
- *
- * @return {string} full url
- */
- absUrl: locationGetter('$$absUrl'),
-
- /**
- * @ngdoc method
- * @name $location#url
- *
- * @description
- * This method is getter / setter.
- *
- * Return url (e.g. `/path?a=b#hash`) when called without any parameter.
- *
- * Change path, search and hash, when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var url = $location.url();
- * // => "/some/path?foo=bar&baz=xoxo"
- * ```
- *
- * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
- * @return {string} url
- */
- url: function(url) {
- if (isUndefined(url)) {
- return this.$$url;
- }
-
- var match = PATH_MATCH.exec(url);
- if (match[1] || url === '') this.path(decodeURIComponent(match[1]));
- if (match[2] || match[1] || url === '') this.search(match[3] || '');
- this.hash(match[5] || '');
-
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#protocol
- *
- * @description
- * This method is getter only.
- *
- * Return protocol of current url.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var protocol = $location.protocol();
- * // => "http"
- * ```
- *
- * @return {string} protocol of current url
- */
- protocol: locationGetter('$$protocol'),
-
- /**
- * @ngdoc method
- * @name $location#host
- *
- * @description
- * This method is getter only.
- *
- * Return host of current url.
- *
- * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var host = $location.host();
- * // => "example.com"
- *
- * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo
- * host = $location.host();
- * // => "example.com"
- * host = location.host;
- * // => "example.com:8080"
- * ```
- *
- * @return {string} host of current url.
- */
- host: locationGetter('$$host'),
-
- /**
- * @ngdoc method
- * @name $location#port
- *
- * @description
- * This method is getter only.
- *
- * Return port of current url.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var port = $location.port();
- * // => 80
- * ```
- *
- * @return {Number} port
- */
- port: locationGetter('$$port'),
-
- /**
- * @ngdoc method
- * @name $location#path
- *
- * @description
- * This method is getter / setter.
- *
- * Return path of current url when called without any parameter.
- *
- * Change path when called with parameter and return `$location`.
- *
- * Note: Path should always begin with forward slash (/), this method will add the forward slash
- * if it is missing.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var path = $location.path();
- * // => "/some/path"
- * ```
- *
- * @param {(string|number)=} path New path
- * @return {string} path
- */
- path: locationGetterSetter('$$path', function(path) {
- path = path !== null ? path.toString() : '';
- return path.charAt(0) == '/' ? path : '/' + path;
- }),
-
- /**
- * @ngdoc method
- * @name $location#search
- *
- * @description
- * This method is getter / setter.
- *
- * Return search part (as object) of current url when called without any parameter.
- *
- * Change search part when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var searchObject = $location.search();
- * // => {foo: 'bar', baz: 'xoxo'}
- *
- * // set foo to 'yipee'
- * $location.search('foo', 'yipee');
- * // $location.search() => {foo: 'yipee', baz: 'xoxo'}
- * ```
- *
- * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
- * hash object.
- *
- * When called with a single argument the method acts as a setter, setting the `search` component
- * of `$location` to the specified value.
- *
- * If the argument is a hash object containing an array of values, these values will be encoded
- * as duplicate search parameters in the url.
- *
- * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`
- * will override only a single search property.
- *
- * If `paramValue` is an array, it will override the property of the `search` component of
- * `$location` specified via the first argument.
- *
- * If `paramValue` is `null`, the property specified via the first argument will be deleted.
- *
- * If `paramValue` is `true`, the property specified via the first argument will be added with no
- * value nor trailing equal sign.
- *
- * @return {Object} If called with no arguments returns the parsed `search` object. If called with
- * one or more arguments returns `$location` object itself.
- */
- search: function(search, paramValue) {
- switch (arguments.length) {
- case 0:
- return this.$$search;
- case 1:
- if (isString(search) || isNumber(search)) {
- search = search.toString();
- this.$$search = parseKeyValue(search);
- } else if (isObject(search)) {
- search = copy(search, {});
- // remove object undefined or null properties
- forEach(search, function(value, key) {
- if (value == null) delete search[key];
- });
-
- this.$$search = search;
- } else {
- throw $locationMinErr('isrcharg',
- 'The first argument of the `$location#search()` call must be a string or an object.');
- }
- break;
- default:
- if (isUndefined(paramValue) || paramValue === null) {
- delete this.$$search[search];
- } else {
- this.$$search[search] = paramValue;
- }
- }
-
- this.$$compose();
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#hash
- *
- * @description
- * This method is getter / setter.
- *
- * Returns the hash fragment when called without any parameters.
- *
- * Changes the hash fragment when called with a parameter and returns `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue
- * var hash = $location.hash();
- * // => "hashValue"
- * ```
- *
- * @param {(string|number)=} hash New hash fragment
- * @return {string} hash
- */
- hash: locationGetterSetter('$$hash', function(hash) {
- return hash !== null ? hash.toString() : '';
- }),
-
- /**
- * @ngdoc method
- * @name $location#replace
- *
- * @description
- * If called, all changes to $location during the current `$digest` will replace the current history
- * record, instead of adding a new one.
- */
- replace: function() {
- this.$$replace = true;
- return this;
- }
-};
-
-forEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {
- Location.prototype = Object.create(locationPrototype);
-
- /**
- * @ngdoc method
- * @name $location#state
- *
- * @description
- * This method is getter / setter.
- *
- * Return the history state object when called without any parameter.
- *
- * Change the history state object when called with one parameter and return `$location`.
- * The state object is later passed to `pushState` or `replaceState`.
- *
- * NOTE: This method is supported only in HTML5 mode and only in browsers supporting
- * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support
- * older browsers (like IE9 or Android < 4.0), don't use this method.
- *
- * @param {object=} state State object for pushState or replaceState
- * @return {object} state
- */
- Location.prototype.state = function(state) {
- if (!arguments.length) {
- return this.$$state;
- }
-
- if (Location !== LocationHtml5Url || !this.$$html5) {
- throw $locationMinErr('nostate', 'History API state support is available only ' +
- 'in HTML5 mode and only in browsers supporting HTML5 History API');
- }
- // The user might modify `stateObject` after invoking `$location.state(stateObject)`
- // but we're changing the $$state reference to $browser.state() during the $digest
- // so the modification window is narrow.
- this.$$state = isUndefined(state) ? null : state;
-
- return this;
- };
-});
-
-
-function locationGetter(property) {
- return function() {
- return this[property];
- };
-}
-
-
-function locationGetterSetter(property, preprocess) {
- return function(value) {
- if (isUndefined(value)) {
- return this[property];
- }
-
- this[property] = preprocess(value);
- this.$$compose();
-
- return this;
- };
-}
-
-
-/**
- * @ngdoc service
- * @name $location
- *
- * @requires $rootElement
- *
- * @description
- * The $location service parses the URL in the browser address bar (based on the
- * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL
- * available to your application. Changes to the URL in the address bar are reflected into
- * $location service and changes to $location are reflected into the browser address bar.
- *
- * **The $location service:**
- *
- * - Exposes the current URL in the browser address bar, so you can
- * - Watch and observe the URL.
- * - Change the URL.
- * - Synchronizes the URL with the browser when the user
- * - Changes the address bar.
- * - Clicks the back or forward button (or clicks a History link).
- * - Clicks on a link.
- * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
- *
- * For more information see {@link guide/$location Developer Guide: Using $location}
- */
-
-/**
- * @ngdoc provider
- * @name $locationProvider
- * @description
- * Use the `$locationProvider` to configure how the application deep linking paths are stored.
- */
-function $LocationProvider() {
- var hashPrefix = '',
- html5Mode = {
- enabled: false,
- requireBase: true,
- rewriteLinks: true
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#hashPrefix
- * @description
- * @param {string=} prefix Prefix for hash part (containing path and search)
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.hashPrefix = function(prefix) {
- if (isDefined(prefix)) {
- hashPrefix = prefix;
- return this;
- } else {
- return hashPrefix;
- }
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#html5Mode
- * @description
- * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.
- * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported
- * properties:
- * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to
- * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not
- * support `pushState`.
- * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies
- * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
- * true, and a base tag is not present, an error will be thrown when `$location` is injected.
- * See the {@link guide/$location $location guide for more information}
- * - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled,
- * enables/disables url rewriting for relative links.
- *
- * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter
- */
- this.html5Mode = function(mode) {
- if (isBoolean(mode)) {
- html5Mode.enabled = mode;
- return this;
- } else if (isObject(mode)) {
-
- if (isBoolean(mode.enabled)) {
- html5Mode.enabled = mode.enabled;
- }
-
- if (isBoolean(mode.requireBase)) {
- html5Mode.requireBase = mode.requireBase;
- }
-
- if (isBoolean(mode.rewriteLinks)) {
- html5Mode.rewriteLinks = mode.rewriteLinks;
- }
-
- return this;
- } else {
- return html5Mode;
- }
- };
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeStart
- * @eventType broadcast on root scope
- * @description
- * Broadcasted before a URL will change.
- *
- * This change can be prevented by calling
- * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
- * details about event object. Upon successful change
- * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
- *
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
- * the browser supports the HTML5 History API.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- * @param {string=} newState New history state object
- * @param {string=} oldState History state object that was before it was changed.
- */
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeSuccess
- * @eventType broadcast on root scope
- * @description
- * Broadcasted after a URL was changed.
- *
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
- * the browser supports the HTML5 History API.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- * @param {string=} newState New history state object
- * @param {string=} oldState History state object that was before it was changed.
- */
-
- this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',
- function($rootScope, $browser, $sniffer, $rootElement, $window) {
- var $location,
- LocationMode,
- baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''
- initialUrl = $browser.url(),
- appBase;
-
- if (html5Mode.enabled) {
- if (!baseHref && html5Mode.requireBase) {
- throw $locationMinErr('nobase',
- "$location in HTML5 mode requires a <base> tag to be present!");
- }
- appBase = serverBase(initialUrl) + (baseHref || '/');
- LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;
- } else {
- appBase = stripHash(initialUrl);
- LocationMode = LocationHashbangUrl;
- }
- var appBaseNoFile = stripFile(appBase);
-
- $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);
- $location.$$parseLinkUrl(initialUrl, initialUrl);
-
- $location.$$state = $browser.state();
-
- var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i;
-
- function setBrowserUrlWithFallback(url, replace, state) {
- var oldUrl = $location.url();
- var oldState = $location.$$state;
- try {
- $browser.url(url, replace, state);
-
- // Make sure $location.state() returns referentially identical (not just deeply equal)
- // state object; this makes possible quick checking if the state changed in the digest
- // loop. Checking deep equality would be too expensive.
- $location.$$state = $browser.state();
- } catch (e) {
- // Restore old values if pushState fails
- $location.url(oldUrl);
- $location.$$state = oldState;
-
- throw e;
- }
- }
-
- $rootElement.on('click', function(event) {
- // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
- // currently we open nice url link and redirect then
-
- if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;
-
- var elm = jqLite(event.target);
-
- // traverse the DOM up to find first A tag
- while (nodeName_(elm[0]) !== 'a') {
- // ignore rewriting if no A tag (reached root element, or no parent - removed from document)
- if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;
- }
-
- var absHref = elm.prop('href');
- // get the actual href attribute - see
- // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
- var relHref = elm.attr('href') || elm.attr('xlink:href');
-
- if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {
- // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during
- // an animation.
- absHref = urlResolve(absHref.animVal).href;
- }
-
- // Ignore when url is started with javascript: or mailto:
- if (IGNORE_URI_REGEXP.test(absHref)) return;
-
- if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {
- if ($location.$$parseLinkUrl(absHref, relHref)) {
- // We do a preventDefault for all urls that are part of the angular application,
- // in html5mode and also without, so that we are able to abort navigation without
- // getting double entries in the location history.
- event.preventDefault();
- // update location manually
- if ($location.absUrl() != $browser.url()) {
- $rootScope.$apply();
- // hack to work around FF6 bug 684208 when scenario runner clicks on links
- $window.angular['ff-684208-preventDefault'] = true;
- }
- }
- }
- });
-
-
- // rewrite hashbang url <> html5 url
- if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {
- $browser.url($location.absUrl(), true);
- }
-
- var initializing = true;
-
- // update $location when $browser url changes
- $browser.onUrlChange(function(newUrl, newState) {
-
- if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {
- // If we are navigating outside of the app then force a reload
- $window.location.href = newUrl;
- return;
- }
-
- $rootScope.$evalAsync(function() {
- var oldUrl = $location.absUrl();
- var oldState = $location.$$state;
- var defaultPrevented;
- newUrl = trimEmptyHash(newUrl);
- $location.$$parse(newUrl);
- $location.$$state = newState;
-
- defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
- newState, oldState).defaultPrevented;
-
- // if the location was changed by a `$locationChangeStart` handler then stop
- // processing this location change
- if ($location.absUrl() !== newUrl) return;
-
- if (defaultPrevented) {
- $location.$$parse(oldUrl);
- $location.$$state = oldState;
- setBrowserUrlWithFallback(oldUrl, false, oldState);
- } else {
- initializing = false;
- afterLocationChange(oldUrl, oldState);
- }
- });
- if (!$rootScope.$$phase) $rootScope.$digest();
- });
-
- // update browser
- $rootScope.$watch(function $locationWatch() {
- var oldUrl = trimEmptyHash($browser.url());
- var newUrl = trimEmptyHash($location.absUrl());
- var oldState = $browser.state();
- var currentReplace = $location.$$replace;
- var urlOrStateChanged = oldUrl !== newUrl ||
- ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);
-
- if (initializing || urlOrStateChanged) {
- initializing = false;
-
- $rootScope.$evalAsync(function() {
- var newUrl = $location.absUrl();
- var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
- $location.$$state, oldState).defaultPrevented;
-
- // if the location was changed by a `$locationChangeStart` handler then stop
- // processing this location change
- if ($location.absUrl() !== newUrl) return;
-
- if (defaultPrevented) {
- $location.$$parse(oldUrl);
- $location.$$state = oldState;
- } else {
- if (urlOrStateChanged) {
- setBrowserUrlWithFallback(newUrl, currentReplace,
- oldState === $location.$$state ? null : $location.$$state);
- }
- afterLocationChange(oldUrl, oldState);
- }
- });
- }
-
- $location.$$replace = false;
-
- // we don't need to return anything because $evalAsync will make the digest loop dirty when
- // there is a change
- });
-
- return $location;
-
- function afterLocationChange(oldUrl, oldState) {
- $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,
- $location.$$state, oldState);
- }
-}];
-}
-
-/**
- * @ngdoc service
- * @name $log
- * @requires $window
- *
- * @description
- * Simple service for logging. Default implementation safely writes the message
- * into the browser's console (if present).
- *
- * The main purpose of this service is to simplify debugging and troubleshooting.
- *
- * The default is to log `debug` messages. You can use
- * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.
- *
- * @example
- <example module="logExample">
- <file name="script.js">
- angular.module('logExample', [])
- .controller('LogController', ['$scope', '$log', function($scope, $log) {
- $scope.$log = $log;
- $scope.message = 'Hello World!';
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="LogController">
- <p>Reload this page with open console, enter text and hit the log button...</p>
- <label>Message:
- <input type="text" ng-model="message" /></label>
- <button ng-click="$log.log(message)">log</button>
- <button ng-click="$log.warn(message)">warn</button>
- <button ng-click="$log.info(message)">info</button>
- <button ng-click="$log.error(message)">error</button>
- <button ng-click="$log.debug(message)">debug</button>
- </div>
- </file>
- </example>
- */
-
-/**
- * @ngdoc provider
- * @name $logProvider
- * @description
- * Use the `$logProvider` to configure how the application logs messages
- */
-function $LogProvider() {
- var debug = true,
- self = this;
-
- /**
- * @ngdoc method
- * @name $logProvider#debugEnabled
- * @description
- * @param {boolean=} flag enable or disable debug level messages
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.debugEnabled = function(flag) {
- if (isDefined(flag)) {
- debug = flag;
- return this;
- } else {
- return debug;
- }
- };
-
- this.$get = ['$window', function($window) {
- return {
- /**
- * @ngdoc method
- * @name $log#log
- *
- * @description
- * Write a log message
- */
- log: consoleLog('log'),
-
- /**
- * @ngdoc method
- * @name $log#info
- *
- * @description
- * Write an information message
- */
- info: consoleLog('info'),
-
- /**
- * @ngdoc method
- * @name $log#warn
- *
- * @description
- * Write a warning message
- */
- warn: consoleLog('warn'),
-
- /**
- * @ngdoc method
- * @name $log#error
- *
- * @description
- * Write an error message
- */
- error: consoleLog('error'),
-
- /**
- * @ngdoc method
- * @name $log#debug
- *
- * @description
- * Write a debug message
- */
- debug: (function() {
- var fn = consoleLog('debug');
-
- return function() {
- if (debug) {
- fn.apply(self, arguments);
- }
- };
- }())
- };
-
- function formatError(arg) {
- if (arg instanceof Error) {
- if (arg.stack) {
- arg = (arg.message && arg.stack.indexOf(arg.message) === -1)
- ? 'Error: ' + arg.message + '\n' + arg.stack
- : arg.stack;
- } else if (arg.sourceURL) {
- arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line;
- }
- }
- return arg;
- }
-
- function consoleLog(type) {
- var console = $window.console || {},
- logFn = console[type] || console.log || noop,
- hasApply = false;
-
- // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.
- // The reason behind this is that console.log has type "object" in IE8...
- try {
- hasApply = !!logFn.apply;
- } catch (e) {}
-
- if (hasApply) {
- return function() {
- var args = [];
- forEach(arguments, function(arg) {
- args.push(formatError(arg));
- });
- return logFn.apply(console, args);
- };
- }
-
- // we are IE which either doesn't have window.console => this is noop and we do nothing,
- // or we are IE where console.log doesn't have apply so we log at least first 2 args
- return function(arg1, arg2) {
- logFn(arg1, arg2 == null ? '' : arg2);
- };
- }
- }];
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-var $parseMinErr = minErr('$parse');
-
-// Sandboxing Angular Expressions
-// ------------------------------
-// Angular expressions are generally considered safe because these expressions only have direct
-// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by
-// obtaining a reference to native JS functions such as the Function constructor.
-//
-// As an example, consider the following Angular expression:
-//
-// {}.toString.constructor('alert("evil JS code")')
-//
-// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits
-// against the expression language, but not to prevent exploits that were enabled by exposing
-// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good
-// practice and therefore we are not even trying to protect against interaction with an object
-// explicitly exposed in this way.
-//
-// In general, it is not possible to access a Window object from an angular expression unless a
-// window or some DOM object that has a reference to window is published onto a Scope.
-// Similarly we prevent invocations of function known to be dangerous, as well as assignments to
-// native objects.
-//
-// See https://docs.angularjs.org/guide/security
-
-
-function ensureSafeMemberName(name, fullExpression) {
- if (name === "__defineGetter__" || name === "__defineSetter__"
- || name === "__lookupGetter__" || name === "__lookupSetter__"
- || name === "__proto__") {
- throw $parseMinErr('isecfld',
- 'Attempting to access a disallowed field in Angular expressions! '
- + 'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function getStringValue(name, fullExpression) {
- // From the JavaScript docs:
- // Property names must be strings. This means that non-string objects cannot be used
- // as keys in an object. Any non-string object, including a number, is typecasted
- // into a string via the toString method.
- //
- // So, to ensure that we are checking the same `name` that JavaScript would use,
- // we cast it to a string, if possible.
- // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,
- // this is, this will handle objects that misbehave.
- name = name + '';
- if (!isString(name)) {
- throw $parseMinErr('iseccst',
- 'Cannot convert object to primitive value! '
- + 'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function ensureSafeObject(obj, fullExpression) {
- // nifty check if obj is Function that is fast and works across iframes and other contexts
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isWindow(obj)
- obj.window === obj) {
- throw $parseMinErr('isecwindow',
- 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isElement(obj)
- obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {
- throw $parseMinErr('isecdom',
- 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// block Object so that we can't get hold of dangerous Object.* methods
- obj === Object) {
- throw $parseMinErr('isecobj',
- 'Referencing Object in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
- return obj;
-}
-
-var CALL = Function.prototype.call;
-var APPLY = Function.prototype.apply;
-var BIND = Function.prototype.bind;
-
-function ensureSafeFunction(obj, fullExpression) {
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (obj === CALL || obj === APPLY || obj === BIND) {
- throw $parseMinErr('isecff',
- 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
-}
-
-function ensureSafeAssignContext(obj, fullExpression) {
- if (obj) {
- if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||
- obj === {}.constructor || obj === [].constructor || obj === Function.constructor) {
- throw $parseMinErr('isecaf',
- 'Assigning to a constructor is disallowed! Expression: {0}', fullExpression);
- }
- }
-}
-
-var OPERATORS = createMap();
-forEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });
-var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'};
-
-
-/////////////////////////////////////////
-
-
-/**
- * @constructor
- */
-var Lexer = function(options) {
- this.options = options;
-};
-
-Lexer.prototype = {
- constructor: Lexer,
-
- lex: function(text) {
- this.text = text;
- this.index = 0;
- this.tokens = [];
-
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- if (ch === '"' || ch === "'") {
- this.readString(ch);
- } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {
- this.readNumber();
- } else if (this.isIdent(ch)) {
- this.readIdent();
- } else if (this.is(ch, '(){}[].,;:?')) {
- this.tokens.push({index: this.index, text: ch});
- this.index++;
- } else if (this.isWhitespace(ch)) {
- this.index++;
- } else {
- var ch2 = ch + this.peek();
- var ch3 = ch2 + this.peek(2);
- var op1 = OPERATORS[ch];
- var op2 = OPERATORS[ch2];
- var op3 = OPERATORS[ch3];
- if (op1 || op2 || op3) {
- var token = op3 ? ch3 : (op2 ? ch2 : ch);
- this.tokens.push({index: this.index, text: token, operator: true});
- this.index += token.length;
- } else {
- this.throwError('Unexpected next character ', this.index, this.index + 1);
- }
- }
- }
- return this.tokens;
- },
-
- is: function(ch, chars) {
- return chars.indexOf(ch) !== -1;
- },
-
- peek: function(i) {
- var num = i || 1;
- return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;
- },
-
- isNumber: function(ch) {
- return ('0' <= ch && ch <= '9') && typeof ch === "string";
- },
-
- isWhitespace: function(ch) {
- // IE treats non-breaking space as \u00A0
- return (ch === ' ' || ch === '\r' || ch === '\t' ||
- ch === '\n' || ch === '\v' || ch === '\u00A0');
- },
-
- isIdent: function(ch) {
- return ('a' <= ch && ch <= 'z' ||
- 'A' <= ch && ch <= 'Z' ||
- '_' === ch || ch === '$');
- },
-
- isExpOperator: function(ch) {
- return (ch === '-' || ch === '+' || this.isNumber(ch));
- },
-
- throwError: function(error, start, end) {
- end = end || this.index;
- var colStr = (isDefined(start)
- ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'
- : ' ' + end);
- throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',
- error, colStr, this.text);
- },
-
- readNumber: function() {
- var number = '';
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = lowercase(this.text.charAt(this.index));
- if (ch == '.' || this.isNumber(ch)) {
- number += ch;
- } else {
- var peekCh = this.peek();
- if (ch == 'e' && this.isExpOperator(peekCh)) {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- peekCh && this.isNumber(peekCh) &&
- number.charAt(number.length - 1) == 'e') {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- (!peekCh || !this.isNumber(peekCh)) &&
- number.charAt(number.length - 1) == 'e') {
- this.throwError('Invalid exponent');
- } else {
- break;
- }
- }
- this.index++;
- }
- this.tokens.push({
- index: start,
- text: number,
- constant: true,
- value: Number(number)
- });
- },
-
- readIdent: function() {
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- if (!(this.isIdent(ch) || this.isNumber(ch))) {
- break;
- }
- this.index++;
- }
- this.tokens.push({
- index: start,
- text: this.text.slice(start, this.index),
- identifier: true
- });
- },
-
- readString: function(quote) {
- var start = this.index;
- this.index++;
- var string = '';
- var rawString = quote;
- var escape = false;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- rawString += ch;
- if (escape) {
- if (ch === 'u') {
- var hex = this.text.substring(this.index + 1, this.index + 5);
- if (!hex.match(/[\da-f]{4}/i)) {
- this.throwError('Invalid unicode escape [\\u' + hex + ']');
- }
- this.index += 4;
- string += String.fromCharCode(parseInt(hex, 16));
- } else {
- var rep = ESCAPE[ch];
- string = string + (rep || ch);
- }
- escape = false;
- } else if (ch === '\\') {
- escape = true;
- } else if (ch === quote) {
- this.index++;
- this.tokens.push({
- index: start,
- text: rawString,
- constant: true,
- value: string
- });
- return;
- } else {
- string += ch;
- }
- this.index++;
- }
- this.throwError('Unterminated quote', start);
- }
-};
-
-var AST = function(lexer, options) {
- this.lexer = lexer;
- this.options = options;
-};
-
-AST.Program = 'Program';
-AST.ExpressionStatement = 'ExpressionStatement';
-AST.AssignmentExpression = 'AssignmentExpression';
-AST.ConditionalExpression = 'ConditionalExpression';
-AST.LogicalExpression = 'LogicalExpression';
-AST.BinaryExpression = 'BinaryExpression';
-AST.UnaryExpression = 'UnaryExpression';
-AST.CallExpression = 'CallExpression';
-AST.MemberExpression = 'MemberExpression';
-AST.Identifier = 'Identifier';
-AST.Literal = 'Literal';
-AST.ArrayExpression = 'ArrayExpression';
-AST.Property = 'Property';
-AST.ObjectExpression = 'ObjectExpression';
-AST.ThisExpression = 'ThisExpression';
-
-// Internal use only
-AST.NGValueParameter = 'NGValueParameter';
-
-AST.prototype = {
- ast: function(text) {
- this.text = text;
- this.tokens = this.lexer.lex(text);
-
- var value = this.program();
-
- if (this.tokens.length !== 0) {
- this.throwError('is an unexpected token', this.tokens[0]);
- }
-
- return value;
- },
-
- program: function() {
- var body = [];
- while (true) {
- if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))
- body.push(this.expressionStatement());
- if (!this.expect(';')) {
- return { type: AST.Program, body: body};
- }
- }
- },
-
- expressionStatement: function() {
- return { type: AST.ExpressionStatement, expression: this.filterChain() };
- },
-
- filterChain: function() {
- var left = this.expression();
- var token;
- while ((token = this.expect('|'))) {
- left = this.filter(left);
- }
- return left;
- },
-
- expression: function() {
- return this.assignment();
- },
-
- assignment: function() {
- var result = this.ternary();
- if (this.expect('=')) {
- result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};
- }
- return result;
- },
-
- ternary: function() {
- var test = this.logicalOR();
- var alternate;
- var consequent;
- if (this.expect('?')) {
- alternate = this.expression();
- if (this.consume(':')) {
- consequent = this.expression();
- return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};
- }
- }
- return test;
- },
-
- logicalOR: function() {
- var left = this.logicalAND();
- while (this.expect('||')) {
- left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };
- }
- return left;
- },
-
- logicalAND: function() {
- var left = this.equality();
- while (this.expect('&&')) {
- left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};
- }
- return left;
- },
-
- equality: function() {
- var left = this.relational();
- var token;
- while ((token = this.expect('==','!=','===','!=='))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };
- }
- return left;
- },
-
- relational: function() {
- var left = this.additive();
- var token;
- while ((token = this.expect('<', '>', '<=', '>='))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };
- }
- return left;
- },
-
- additive: function() {
- var left = this.multiplicative();
- var token;
- while ((token = this.expect('+','-'))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };
- }
- return left;
- },
-
- multiplicative: function() {
- var left = this.unary();
- var token;
- while ((token = this.expect('*','/','%'))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };
- }
- return left;
- },
-
- unary: function() {
- var token;
- if ((token = this.expect('+', '-', '!'))) {
- return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };
- } else {
- return this.primary();
- }
- },
-
- primary: function() {
- var primary;
- if (this.expect('(')) {
- primary = this.filterChain();
- this.consume(')');
- } else if (this.expect('[')) {
- primary = this.arrayDeclaration();
- } else if (this.expect('{')) {
- primary = this.object();
- } else if (this.constants.hasOwnProperty(this.peek().text)) {
- primary = copy(this.constants[this.consume().text]);
- } else if (this.peek().identifier) {
- primary = this.identifier();
- } else if (this.peek().constant) {
- primary = this.constant();
- } else {
- this.throwError('not a primary expression', this.peek());
- }
-
- var next;
- while ((next = this.expect('(', '[', '.'))) {
- if (next.text === '(') {
- primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };
- this.consume(')');
- } else if (next.text === '[') {
- primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };
- this.consume(']');
- } else if (next.text === '.') {
- primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };
- } else {
- this.throwError('IMPOSSIBLE');
- }
- }
- return primary;
- },
-
- filter: function(baseExpression) {
- var args = [baseExpression];
- var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};
-
- while (this.expect(':')) {
- args.push(this.expression());
- }
-
- return result;
- },
-
- parseArguments: function() {
- var args = [];
- if (this.peekToken().text !== ')') {
- do {
- args.push(this.expression());
- } while (this.expect(','));
- }
- return args;
- },
-
- identifier: function() {
- var token = this.consume();
- if (!token.identifier) {
- this.throwError('is not a valid identifier', token);
- }
- return { type: AST.Identifier, name: token.text };
- },
-
- constant: function() {
- // TODO check that it is a constant
- return { type: AST.Literal, value: this.consume().value };
- },
-
- arrayDeclaration: function() {
- var elements = [];
- if (this.peekToken().text !== ']') {
- do {
- if (this.peek(']')) {
- // Support trailing commas per ES5.1.
- break;
- }
- elements.push(this.expression());
- } while (this.expect(','));
- }
- this.consume(']');
-
- return { type: AST.ArrayExpression, elements: elements };
- },
-
- object: function() {
- var properties = [], property;
- if (this.peekToken().text !== '}') {
- do {
- if (this.peek('}')) {
- // Support trailing commas per ES5.1.
- break;
- }
- property = {type: AST.Property, kind: 'init'};
- if (this.peek().constant) {
- property.key = this.constant();
- } else if (this.peek().identifier) {
- property.key = this.identifier();
- } else {
- this.throwError("invalid key", this.peek());
- }
- this.consume(':');
- property.value = this.expression();
- properties.push(property);
- } while (this.expect(','));
- }
- this.consume('}');
-
- return {type: AST.ObjectExpression, properties: properties };
- },
-
- throwError: function(msg, token) {
- throw $parseMinErr('syntax',
- 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].',
- token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));
- },
-
- consume: function(e1) {
- if (this.tokens.length === 0) {
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- }
-
- var token = this.expect(e1);
- if (!token) {
- this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());
- }
- return token;
- },
-
- peekToken: function() {
- if (this.tokens.length === 0) {
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- }
- return this.tokens[0];
- },
-
- peek: function(e1, e2, e3, e4) {
- return this.peekAhead(0, e1, e2, e3, e4);
- },
-
- peekAhead: function(i, e1, e2, e3, e4) {
- if (this.tokens.length > i) {
- var token = this.tokens[i];
- var t = token.text;
- if (t === e1 || t === e2 || t === e3 || t === e4 ||
- (!e1 && !e2 && !e3 && !e4)) {
- return token;
- }
- }
- return false;
- },
-
- expect: function(e1, e2, e3, e4) {
- var token = this.peek(e1, e2, e3, e4);
- if (token) {
- this.tokens.shift();
- return token;
- }
- return false;
- },
-
-
- /* `undefined` is not a constant, it is an identifier,
- * but using it as an identifier is not supported
- */
- constants: {
- 'true': { type: AST.Literal, value: true },
- 'false': { type: AST.Literal, value: false },
- 'null': { type: AST.Literal, value: null },
- 'undefined': {type: AST.Literal, value: undefined },
- 'this': {type: AST.ThisExpression }
- }
-};
-
-function ifDefined(v, d) {
- return typeof v !== 'undefined' ? v : d;
-}
-
-function plusFn(l, r) {
- if (typeof l === 'undefined') return r;
- if (typeof r === 'undefined') return l;
- return l + r;
-}
-
-function isStateless($filter, filterName) {
- var fn = $filter(filterName);
- return !fn.$stateful;
-}
-
-function findConstantAndWatchExpressions(ast, $filter) {
- var allConstants;
- var argsToWatch;
- switch (ast.type) {
- case AST.Program:
- allConstants = true;
- forEach(ast.body, function(expr) {
- findConstantAndWatchExpressions(expr.expression, $filter);
- allConstants = allConstants && expr.expression.constant;
- });
- ast.constant = allConstants;
- break;
- case AST.Literal:
- ast.constant = true;
- ast.toWatch = [];
- break;
- case AST.UnaryExpression:
- findConstantAndWatchExpressions(ast.argument, $filter);
- ast.constant = ast.argument.constant;
- ast.toWatch = ast.argument.toWatch;
- break;
- case AST.BinaryExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);
- break;
- case AST.LogicalExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = ast.constant ? [] : [ast];
- break;
- case AST.ConditionalExpression:
- findConstantAndWatchExpressions(ast.test, $filter);
- findConstantAndWatchExpressions(ast.alternate, $filter);
- findConstantAndWatchExpressions(ast.consequent, $filter);
- ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;
- ast.toWatch = ast.constant ? [] : [ast];
- break;
- case AST.Identifier:
- ast.constant = false;
- ast.toWatch = [ast];
- break;
- case AST.MemberExpression:
- findConstantAndWatchExpressions(ast.object, $filter);
- if (ast.computed) {
- findConstantAndWatchExpressions(ast.property, $filter);
- }
- ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);
- ast.toWatch = [ast];
- break;
- case AST.CallExpression:
- allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false;
- argsToWatch = [];
- forEach(ast.arguments, function(expr) {
- findConstantAndWatchExpressions(expr, $filter);
- allConstants = allConstants && expr.constant;
- if (!expr.constant) {
- argsToWatch.push.apply(argsToWatch, expr.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast];
- break;
- case AST.AssignmentExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = [ast];
- break;
- case AST.ArrayExpression:
- allConstants = true;
- argsToWatch = [];
- forEach(ast.elements, function(expr) {
- findConstantAndWatchExpressions(expr, $filter);
- allConstants = allConstants && expr.constant;
- if (!expr.constant) {
- argsToWatch.push.apply(argsToWatch, expr.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = argsToWatch;
- break;
- case AST.ObjectExpression:
- allConstants = true;
- argsToWatch = [];
- forEach(ast.properties, function(property) {
- findConstantAndWatchExpressions(property.value, $filter);
- allConstants = allConstants && property.value.constant;
- if (!property.value.constant) {
- argsToWatch.push.apply(argsToWatch, property.value.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = argsToWatch;
- break;
- case AST.ThisExpression:
- ast.constant = false;
- ast.toWatch = [];
- break;
- }
-}
-
-function getInputs(body) {
- if (body.length != 1) return;
- var lastExpression = body[0].expression;
- var candidate = lastExpression.toWatch;
- if (candidate.length !== 1) return candidate;
- return candidate[0] !== lastExpression ? candidate : undefined;
-}
-
-function isAssignable(ast) {
- return ast.type === AST.Identifier || ast.type === AST.MemberExpression;
-}
-
-function assignableAST(ast) {
- if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {
- return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};
- }
-}
-
-function isLiteral(ast) {
- return ast.body.length === 0 ||
- ast.body.length === 1 && (
- ast.body[0].expression.type === AST.Literal ||
- ast.body[0].expression.type === AST.ArrayExpression ||
- ast.body[0].expression.type === AST.ObjectExpression);
-}
-
-function isConstant(ast) {
- return ast.constant;
-}
-
-function ASTCompiler(astBuilder, $filter) {
- this.astBuilder = astBuilder;
- this.$filter = $filter;
-}
-
-ASTCompiler.prototype = {
- compile: function(expression, expensiveChecks) {
- var self = this;
- var ast = this.astBuilder.ast(expression);
- this.state = {
- nextId: 0,
- filters: {},
- expensiveChecks: expensiveChecks,
- fn: {vars: [], body: [], own: {}},
- assign: {vars: [], body: [], own: {}},
- inputs: []
- };
- findConstantAndWatchExpressions(ast, self.$filter);
- var extra = '';
- var assignable;
- this.stage = 'assign';
- if ((assignable = assignableAST(ast))) {
- this.state.computing = 'assign';
- var result = this.nextId();
- this.recurse(assignable, result);
- this.return_(result);
- extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');
- }
- var toWatch = getInputs(ast.body);
- self.stage = 'inputs';
- forEach(toWatch, function(watch, key) {
- var fnKey = 'fn' + key;
- self.state[fnKey] = {vars: [], body: [], own: {}};
- self.state.computing = fnKey;
- var intoId = self.nextId();
- self.recurse(watch, intoId);
- self.return_(intoId);
- self.state.inputs.push(fnKey);
- watch.watchId = key;
- });
- this.state.computing = 'fn';
- this.stage = 'main';
- this.recurse(ast);
- var fnString =
- // The build and minification steps remove the string "use strict" from the code, but this is done using a regex.
- // This is a workaround for this until we do a better job at only removing the prefix only when we should.
- '"' + this.USE + ' ' + this.STRICT + '";\n' +
- this.filterPrefix() +
- 'var fn=' + this.generateFunction('fn', 's,l,a,i') +
- extra +
- this.watchFns() +
- 'return fn;';
-
- /* jshint -W054 */
- var fn = (new Function('$filter',
- 'ensureSafeMemberName',
- 'ensureSafeObject',
- 'ensureSafeFunction',
- 'getStringValue',
- 'ensureSafeAssignContext',
- 'ifDefined',
- 'plus',
- 'text',
- fnString))(
- this.$filter,
- ensureSafeMemberName,
- ensureSafeObject,
- ensureSafeFunction,
- getStringValue,
- ensureSafeAssignContext,
- ifDefined,
- plusFn,
- expression);
- /* jshint +W054 */
- this.state = this.stage = undefined;
- fn.literal = isLiteral(ast);
- fn.constant = isConstant(ast);
- return fn;
- },
-
- USE: 'use',
-
- STRICT: 'strict',
-
- watchFns: function() {
- var result = [];
- var fns = this.state.inputs;
- var self = this;
- forEach(fns, function(name) {
- result.push('var ' + name + '=' + self.generateFunction(name, 's'));
- });
- if (fns.length) {
- result.push('fn.inputs=[' + fns.join(',') + '];');
- }
- return result.join('');
- },
-
- generateFunction: function(name, params) {
- return 'function(' + params + '){' +
- this.varsPrefix(name) +
- this.body(name) +
- '};';
- },
-
- filterPrefix: function() {
- var parts = [];
- var self = this;
- forEach(this.state.filters, function(id, filter) {
- parts.push(id + '=$filter(' + self.escape(filter) + ')');
- });
- if (parts.length) return 'var ' + parts.join(',') + ';';
- return '';
- },
-
- varsPrefix: function(section) {
- return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';
- },
-
- body: function(section) {
- return this.state[section].body.join('');
- },
-
- recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
- var left, right, self = this, args, expression;
- recursionFn = recursionFn || noop;
- if (!skipWatchIdCheck && isDefined(ast.watchId)) {
- intoId = intoId || this.nextId();
- this.if_('i',
- this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),
- this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)
- );
- return;
- }
- switch (ast.type) {
- case AST.Program:
- forEach(ast.body, function(expression, pos) {
- self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });
- if (pos !== ast.body.length - 1) {
- self.current().body.push(right, ';');
- } else {
- self.return_(right);
- }
- });
- break;
- case AST.Literal:
- expression = this.escape(ast.value);
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.UnaryExpression:
- this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });
- expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.BinaryExpression:
- this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });
- this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });
- if (ast.operator === '+') {
- expression = this.plus(left, right);
- } else if (ast.operator === '-') {
- expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);
- } else {
- expression = '(' + left + ')' + ast.operator + '(' + right + ')';
- }
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.LogicalExpression:
- intoId = intoId || this.nextId();
- self.recurse(ast.left, intoId);
- self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));
- recursionFn(intoId);
- break;
- case AST.ConditionalExpression:
- intoId = intoId || this.nextId();
- self.recurse(ast.test, intoId);
- self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));
- recursionFn(intoId);
- break;
- case AST.Identifier:
- intoId = intoId || this.nextId();
- if (nameId) {
- nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');
- nameId.computed = false;
- nameId.name = ast.name;
- }
- ensureSafeMemberName(ast.name);
- self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),
- function() {
- self.if_(self.stage === 'inputs' || 's', function() {
- if (create && create !== 1) {
- self.if_(
- self.not(self.nonComputedMember('s', ast.name)),
- self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));
- }
- self.assign(intoId, self.nonComputedMember('s', ast.name));
- });
- }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))
- );
- if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) {
- self.addEnsureSafeObject(intoId);
- }
- recursionFn(intoId);
- break;
- case AST.MemberExpression:
- left = nameId && (nameId.context = this.nextId()) || this.nextId();
- intoId = intoId || this.nextId();
- self.recurse(ast.object, left, undefined, function() {
- self.if_(self.notNull(left), function() {
- if (ast.computed) {
- right = self.nextId();
- self.recurse(ast.property, right);
- self.getStringValue(right);
- self.addEnsureSafeMemberName(right);
- if (create && create !== 1) {
- self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));
- }
- expression = self.ensureSafeObject(self.computedMember(left, right));
- self.assign(intoId, expression);
- if (nameId) {
- nameId.computed = true;
- nameId.name = right;
- }
- } else {
- ensureSafeMemberName(ast.property.name);
- if (create && create !== 1) {
- self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));
- }
- expression = self.nonComputedMember(left, ast.property.name);
- if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) {
- expression = self.ensureSafeObject(expression);
- }
- self.assign(intoId, expression);
- if (nameId) {
- nameId.computed = false;
- nameId.name = ast.property.name;
- }
- }
- }, function() {
- self.assign(intoId, 'undefined');
- });
- recursionFn(intoId);
- }, !!create);
- break;
- case AST.CallExpression:
- intoId = intoId || this.nextId();
- if (ast.filter) {
- right = self.filter(ast.callee.name);
- args = [];
- forEach(ast.arguments, function(expr) {
- var argument = self.nextId();
- self.recurse(expr, argument);
- args.push(argument);
- });
- expression = right + '(' + args.join(',') + ')';
- self.assign(intoId, expression);
- recursionFn(intoId);
- } else {
- right = self.nextId();
- left = {};
- args = [];
- self.recurse(ast.callee, right, left, function() {
- self.if_(self.notNull(right), function() {
- self.addEnsureSafeFunction(right);
- forEach(ast.arguments, function(expr) {
- self.recurse(expr, self.nextId(), undefined, function(argument) {
- args.push(self.ensureSafeObject(argument));
- });
- });
- if (left.name) {
- if (!self.state.expensiveChecks) {
- self.addEnsureSafeObject(left.context);
- }
- expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';
- } else {
- expression = right + '(' + args.join(',') + ')';
- }
- expression = self.ensureSafeObject(expression);
- self.assign(intoId, expression);
- }, function() {
- self.assign(intoId, 'undefined');
- });
- recursionFn(intoId);
- });
- }
- break;
- case AST.AssignmentExpression:
- right = this.nextId();
- left = {};
- if (!isAssignable(ast.left)) {
- throw $parseMinErr('lval', 'Trying to assing a value to a non l-value');
- }
- this.recurse(ast.left, undefined, left, function() {
- self.if_(self.notNull(left.context), function() {
- self.recurse(ast.right, right);
- self.addEnsureSafeObject(self.member(left.context, left.name, left.computed));
- self.addEnsureSafeAssignContext(left.context);
- expression = self.member(left.context, left.name, left.computed) + ast.operator + right;
- self.assign(intoId, expression);
- recursionFn(intoId || expression);
- });
- }, 1);
- break;
- case AST.ArrayExpression:
- args = [];
- forEach(ast.elements, function(expr) {
- self.recurse(expr, self.nextId(), undefined, function(argument) {
- args.push(argument);
- });
- });
- expression = '[' + args.join(',') + ']';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.ObjectExpression:
- args = [];
- forEach(ast.properties, function(property) {
- self.recurse(property.value, self.nextId(), undefined, function(expr) {
- args.push(self.escape(
- property.key.type === AST.Identifier ? property.key.name :
- ('' + property.key.value)) +
- ':' + expr);
- });
- });
- expression = '{' + args.join(',') + '}';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.ThisExpression:
- this.assign(intoId, 's');
- recursionFn('s');
- break;
- case AST.NGValueParameter:
- this.assign(intoId, 'v');
- recursionFn('v');
- break;
- }
- },
-
- getHasOwnProperty: function(element, property) {
- var key = element + '.' + property;
- var own = this.current().own;
- if (!own.hasOwnProperty(key)) {
- own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');
- }
- return own[key];
- },
-
- assign: function(id, value) {
- if (!id) return;
- this.current().body.push(id, '=', value, ';');
- return id;
- },
-
- filter: function(filterName) {
- if (!this.state.filters.hasOwnProperty(filterName)) {
- this.state.filters[filterName] = this.nextId(true);
- }
- return this.state.filters[filterName];
- },
-
- ifDefined: function(id, defaultValue) {
- return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';
- },
-
- plus: function(left, right) {
- return 'plus(' + left + ',' + right + ')';
- },
-
- return_: function(id) {
- this.current().body.push('return ', id, ';');
- },
-
- if_: function(test, alternate, consequent) {
- if (test === true) {
- alternate();
- } else {
- var body = this.current().body;
- body.push('if(', test, '){');
- alternate();
- body.push('}');
- if (consequent) {
- body.push('else{');
- consequent();
- body.push('}');
- }
- }
- },
-
- not: function(expression) {
- return '!(' + expression + ')';
- },
-
- notNull: function(expression) {
- return expression + '!=null';
- },
-
- nonComputedMember: function(left, right) {
- return left + '.' + right;
- },
-
- computedMember: function(left, right) {
- return left + '[' + right + ']';
- },
-
- member: function(left, right, computed) {
- if (computed) return this.computedMember(left, right);
- return this.nonComputedMember(left, right);
- },
-
- addEnsureSafeObject: function(item) {
- this.current().body.push(this.ensureSafeObject(item), ';');
- },
-
- addEnsureSafeMemberName: function(item) {
- this.current().body.push(this.ensureSafeMemberName(item), ';');
- },
-
- addEnsureSafeFunction: function(item) {
- this.current().body.push(this.ensureSafeFunction(item), ';');
- },
-
- addEnsureSafeAssignContext: function(item) {
- this.current().body.push(this.ensureSafeAssignContext(item), ';');
- },
-
- ensureSafeObject: function(item) {
- return 'ensureSafeObject(' + item + ',text)';
- },
-
- ensureSafeMemberName: function(item) {
- return 'ensureSafeMemberName(' + item + ',text)';
- },
-
- ensureSafeFunction: function(item) {
- return 'ensureSafeFunction(' + item + ',text)';
- },
-
- getStringValue: function(item) {
- this.assign(item, 'getStringValue(' + item + ',text)');
- },
-
- ensureSafeAssignContext: function(item) {
- return 'ensureSafeAssignContext(' + item + ',text)';
- },
-
- lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
- var self = this;
- return function() {
- self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);
- };
- },
-
- lazyAssign: function(id, value) {
- var self = this;
- return function() {
- self.assign(id, value);
- };
- },
-
- stringEscapeRegex: /[^ a-zA-Z0-9]/g,
-
- stringEscapeFn: function(c) {
- return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);
- },
-
- escape: function(value) {
- if (isString(value)) return "'" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'";
- if (isNumber(value)) return value.toString();
- if (value === true) return 'true';
- if (value === false) return 'false';
- if (value === null) return 'null';
- if (typeof value === 'undefined') return 'undefined';
-
- throw $parseMinErr('esc', 'IMPOSSIBLE');
- },
-
- nextId: function(skip, init) {
- var id = 'v' + (this.state.nextId++);
- if (!skip) {
- this.current().vars.push(id + (init ? '=' + init : ''));
- }
- return id;
- },
-
- current: function() {
- return this.state[this.state.computing];
- }
-};
-
-
-function ASTInterpreter(astBuilder, $filter) {
- this.astBuilder = astBuilder;
- this.$filter = $filter;
-}
-
-ASTInterpreter.prototype = {
- compile: function(expression, expensiveChecks) {
- var self = this;
- var ast = this.astBuilder.ast(expression);
- this.expression = expression;
- this.expensiveChecks = expensiveChecks;
- findConstantAndWatchExpressions(ast, self.$filter);
- var assignable;
- var assign;
- if ((assignable = assignableAST(ast))) {
- assign = this.recurse(assignable);
- }
- var toWatch = getInputs(ast.body);
- var inputs;
- if (toWatch) {
- inputs = [];
- forEach(toWatch, function(watch, key) {
- var input = self.recurse(watch);
- watch.input = input;
- inputs.push(input);
- watch.watchId = key;
- });
- }
- var expressions = [];
- forEach(ast.body, function(expression) {
- expressions.push(self.recurse(expression.expression));
- });
- var fn = ast.body.length === 0 ? function() {} :
- ast.body.length === 1 ? expressions[0] :
- function(scope, locals) {
- var lastValue;
- forEach(expressions, function(exp) {
- lastValue = exp(scope, locals);
- });
- return lastValue;
- };
- if (assign) {
- fn.assign = function(scope, value, locals) {
- return assign(scope, locals, value);
- };
- }
- if (inputs) {
- fn.inputs = inputs;
- }
- fn.literal = isLiteral(ast);
- fn.constant = isConstant(ast);
- return fn;
- },
-
- recurse: function(ast, context, create) {
- var left, right, self = this, args, expression;
- if (ast.input) {
- return this.inputs(ast.input, ast.watchId);
- }
- switch (ast.type) {
- case AST.Literal:
- return this.value(ast.value, context);
- case AST.UnaryExpression:
- right = this.recurse(ast.argument);
- return this['unary' + ast.operator](right, context);
- case AST.BinaryExpression:
- left = this.recurse(ast.left);
- right = this.recurse(ast.right);
- return this['binary' + ast.operator](left, right, context);
- case AST.LogicalExpression:
- left = this.recurse(ast.left);
- right = this.recurse(ast.right);
- return this['binary' + ast.operator](left, right, context);
- case AST.ConditionalExpression:
- return this['ternary?:'](
- this.recurse(ast.test),
- this.recurse(ast.alternate),
- this.recurse(ast.consequent),
- context
- );
- case AST.Identifier:
- ensureSafeMemberName(ast.name, self.expression);
- return self.identifier(ast.name,
- self.expensiveChecks || isPossiblyDangerousMemberName(ast.name),
- context, create, self.expression);
- case AST.MemberExpression:
- left = this.recurse(ast.object, false, !!create);
- if (!ast.computed) {
- ensureSafeMemberName(ast.property.name, self.expression);
- right = ast.property.name;
- }
- if (ast.computed) right = this.recurse(ast.property);
- return ast.computed ?
- this.computedMember(left, right, context, create, self.expression) :
- this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression);
- case AST.CallExpression:
- args = [];
- forEach(ast.arguments, function(expr) {
- args.push(self.recurse(expr));
- });
- if (ast.filter) right = this.$filter(ast.callee.name);
- if (!ast.filter) right = this.recurse(ast.callee, true);
- return ast.filter ?
- function(scope, locals, assign, inputs) {
- var values = [];
- for (var i = 0; i < args.length; ++i) {
- values.push(args[i](scope, locals, assign, inputs));
- }
- var value = right.apply(undefined, values, inputs);
- return context ? {context: undefined, name: undefined, value: value} : value;
- } :
- function(scope, locals, assign, inputs) {
- var rhs = right(scope, locals, assign, inputs);
- var value;
- if (rhs.value != null) {
- ensureSafeObject(rhs.context, self.expression);
- ensureSafeFunction(rhs.value, self.expression);
- var values = [];
- for (var i = 0; i < args.length; ++i) {
- values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression));
- }
- value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression);
- }
- return context ? {value: value} : value;
- };
- case AST.AssignmentExpression:
- left = this.recurse(ast.left, true, 1);
- right = this.recurse(ast.right);
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- ensureSafeObject(lhs.value, self.expression);
- ensureSafeAssignContext(lhs.context);
- lhs.context[lhs.name] = rhs;
- return context ? {value: rhs} : rhs;
- };
- case AST.ArrayExpression:
- args = [];
- forEach(ast.elements, function(expr) {
- args.push(self.recurse(expr));
- });
- return function(scope, locals, assign, inputs) {
- var value = [];
- for (var i = 0; i < args.length; ++i) {
- value.push(args[i](scope, locals, assign, inputs));
- }
- return context ? {value: value} : value;
- };
- case AST.ObjectExpression:
- args = [];
- forEach(ast.properties, function(property) {
- args.push({key: property.key.type === AST.Identifier ?
- property.key.name :
- ('' + property.key.value),
- value: self.recurse(property.value)
- });
- });
- return function(scope, locals, assign, inputs) {
- var value = {};
- for (var i = 0; i < args.length; ++i) {
- value[args[i].key] = args[i].value(scope, locals, assign, inputs);
- }
- return context ? {value: value} : value;
- };
- case AST.ThisExpression:
- return function(scope) {
- return context ? {value: scope} : scope;
- };
- case AST.NGValueParameter:
- return function(scope, locals, assign, inputs) {
- return context ? {value: assign} : assign;
- };
- }
- },
-
- 'unary+': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = argument(scope, locals, assign, inputs);
- if (isDefined(arg)) {
- arg = +arg;
- } else {
- arg = 0;
- }
- return context ? {value: arg} : arg;
- };
- },
- 'unary-': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = argument(scope, locals, assign, inputs);
- if (isDefined(arg)) {
- arg = -arg;
- } else {
- arg = 0;
- }
- return context ? {value: arg} : arg;
- };
- },
- 'unary!': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = !argument(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary+': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- var arg = plusFn(lhs, rhs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary-': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);
- return context ? {value: arg} : arg;
- };
- },
- 'binary*': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary/': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary%': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary===': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary!==': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary==': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary!=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary<': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary>': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary<=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary>=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary&&': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary||': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'ternary?:': function(test, alternate, consequent, context) {
- return function(scope, locals, assign, inputs) {
- var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- value: function(value, context) {
- return function() { return context ? {context: undefined, name: undefined, value: value} : value; };
- },
- identifier: function(name, expensiveChecks, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var base = locals && (name in locals) ? locals : scope;
- if (create && create !== 1 && base && !(base[name])) {
- base[name] = {};
- }
- var value = base ? base[name] : undefined;
- if (expensiveChecks) {
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: base, name: name, value: value};
- } else {
- return value;
- }
- };
- },
- computedMember: function(left, right, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs;
- var value;
- if (lhs != null) {
- rhs = right(scope, locals, assign, inputs);
- rhs = getStringValue(rhs);
- ensureSafeMemberName(rhs, expression);
- if (create && create !== 1 && lhs && !(lhs[rhs])) {
- lhs[rhs] = {};
- }
- value = lhs[rhs];
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: lhs, name: rhs, value: value};
- } else {
- return value;
- }
- };
- },
- nonComputedMember: function(left, right, expensiveChecks, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- if (create && create !== 1 && lhs && !(lhs[right])) {
- lhs[right] = {};
- }
- var value = lhs != null ? lhs[right] : undefined;
- if (expensiveChecks || isPossiblyDangerousMemberName(right)) {
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: lhs, name: right, value: value};
- } else {
- return value;
- }
- };
- },
- inputs: function(input, watchId) {
- return function(scope, value, locals, inputs) {
- if (inputs) return inputs[watchId];
- return input(scope, value, locals);
- };
- }
-};
-
-/**
- * @constructor
- */
-var Parser = function(lexer, $filter, options) {
- this.lexer = lexer;
- this.$filter = $filter;
- this.options = options;
- this.ast = new AST(this.lexer);
- this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) :
- new ASTCompiler(this.ast, $filter);
-};
-
-Parser.prototype = {
- constructor: Parser,
-
- parse: function(text) {
- return this.astCompiler.compile(text, this.options.expensiveChecks);
- }
-};
-
-var getterFnCacheDefault = createMap();
-var getterFnCacheExpensive = createMap();
-
-function isPossiblyDangerousMemberName(name) {
- return name == 'constructor';
-}
-
-var objectValueOf = Object.prototype.valueOf;
-
-function getValueOf(value) {
- return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);
-}
-
-///////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $parse
- * @kind function
- *
- * @description
- *
- * Converts Angular {@link guide/expression expression} into a function.
- *
- * ```js
- * var getter = $parse('user.name');
- * var setter = getter.assign;
- * var context = {user:{name:'angular'}};
- * var locals = {user:{name:'local'}};
- *
- * expect(getter(context)).toEqual('angular');
- * setter(context, 'newValue');
- * expect(context.user.name).toEqual('newValue');
- * expect(getter(context, locals)).toEqual('local');
- * ```
- *
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- *
- * The returned function also has the following properties:
- * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript
- * literal.
- * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript
- * constant literals.
- * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be
- * set to a function to change its value on the given context.
- *
- */
-
-
-/**
- * @ngdoc provider
- * @name $parseProvider
- *
- * @description
- * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}
- * service.
- */
-function $ParseProvider() {
- var cacheDefault = createMap();
- var cacheExpensive = createMap();
-
- this.$get = ['$filter', function($filter) {
- var noUnsafeEval = csp().noUnsafeEval;
- var $parseOptions = {
- csp: noUnsafeEval,
- expensiveChecks: false
- },
- $parseOptionsExpensive = {
- csp: noUnsafeEval,
- expensiveChecks: true
- };
-
- return function $parse(exp, interceptorFn, expensiveChecks) {
- var parsedExpression, oneTime, cacheKey;
-
- switch (typeof exp) {
- case 'string':
- exp = exp.trim();
- cacheKey = exp;
-
- var cache = (expensiveChecks ? cacheExpensive : cacheDefault);
- parsedExpression = cache[cacheKey];
-
- if (!parsedExpression) {
- if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {
- oneTime = true;
- exp = exp.substring(2);
- }
- var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;
- var lexer = new Lexer(parseOptions);
- var parser = new Parser(lexer, $filter, parseOptions);
- parsedExpression = parser.parse(exp);
- if (parsedExpression.constant) {
- parsedExpression.$$watchDelegate = constantWatchDelegate;
- } else if (oneTime) {
- parsedExpression.$$watchDelegate = parsedExpression.literal ?
- oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;
- } else if (parsedExpression.inputs) {
- parsedExpression.$$watchDelegate = inputsWatchDelegate;
- }
- cache[cacheKey] = parsedExpression;
- }
- return addInterceptor(parsedExpression, interceptorFn);
-
- case 'function':
- return addInterceptor(exp, interceptorFn);
-
- default:
- return noop;
- }
- };
-
- function expressionInputDirtyCheck(newValue, oldValueOfValue) {
-
- if (newValue == null || oldValueOfValue == null) { // null/undefined
- return newValue === oldValueOfValue;
- }
-
- if (typeof newValue === 'object') {
-
- // attempt to convert the value to a primitive type
- // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can
- // be cheaply dirty-checked
- newValue = getValueOf(newValue);
-
- if (typeof newValue === 'object') {
- // objects/arrays are not supported - deep-watching them would be too expensive
- return false;
- }
-
- // fall-through to the primitive equality check
- }
-
- //Primitive or NaN
- return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);
- }
-
- function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {
- var inputExpressions = parsedExpression.inputs;
- var lastResult;
-
- if (inputExpressions.length === 1) {
- var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails
- inputExpressions = inputExpressions[0];
- return scope.$watch(function expressionInputWatch(scope) {
- var newInputValue = inputExpressions(scope);
- if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) {
- lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);
- oldInputValueOf = newInputValue && getValueOf(newInputValue);
- }
- return lastResult;
- }, listener, objectEquality, prettyPrintExpression);
- }
-
- var oldInputValueOfValues = [];
- var oldInputValues = [];
- for (var i = 0, ii = inputExpressions.length; i < ii; i++) {
- oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails
- oldInputValues[i] = null;
- }
-
- return scope.$watch(function expressionInputsWatch(scope) {
- var changed = false;
-
- for (var i = 0, ii = inputExpressions.length; i < ii; i++) {
- var newInputValue = inputExpressions[i](scope);
- if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {
- oldInputValues[i] = newInputValue;
- oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);
- }
- }
-
- if (changed) {
- lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);
- }
-
- return lastResult;
- }, listener, objectEquality, prettyPrintExpression);
- }
-
- function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch, lastValue;
- return unwatch = scope.$watch(function oneTimeWatch(scope) {
- return parsedExpression(scope);
- }, function oneTimeListener(value, old, scope) {
- lastValue = value;
- if (isFunction(listener)) {
- listener.apply(this, arguments);
- }
- if (isDefined(value)) {
- scope.$$postDigest(function() {
- if (isDefined(lastValue)) {
- unwatch();
- }
- });
- }
- }, objectEquality);
- }
-
- function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch, lastValue;
- return unwatch = scope.$watch(function oneTimeWatch(scope) {
- return parsedExpression(scope);
- }, function oneTimeListener(value, old, scope) {
- lastValue = value;
- if (isFunction(listener)) {
- listener.call(this, value, old, scope);
- }
- if (isAllDefined(value)) {
- scope.$$postDigest(function() {
- if (isAllDefined(lastValue)) unwatch();
- });
- }
- }, objectEquality);
-
- function isAllDefined(value) {
- var allDefined = true;
- forEach(value, function(val) {
- if (!isDefined(val)) allDefined = false;
- });
- return allDefined;
- }
- }
-
- function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch;
- return unwatch = scope.$watch(function constantWatch(scope) {
- return parsedExpression(scope);
- }, function constantListener(value, old, scope) {
- if (isFunction(listener)) {
- listener.apply(this, arguments);
- }
- unwatch();
- }, objectEquality);
- }
-
- function addInterceptor(parsedExpression, interceptorFn) {
- if (!interceptorFn) return parsedExpression;
- var watchDelegate = parsedExpression.$$watchDelegate;
- var useInputs = false;
-
- var regularWatch =
- watchDelegate !== oneTimeLiteralWatchDelegate &&
- watchDelegate !== oneTimeWatchDelegate;
-
- var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {
- var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);
- return interceptorFn(value, scope, locals);
- } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {
- var value = parsedExpression(scope, locals, assign, inputs);
- var result = interceptorFn(value, scope, locals);
- // we only return the interceptor's result if the
- // initial value is defined (for bind-once)
- return isDefined(value) ? result : value;
- };
-
- // Propagate $$watchDelegates other then inputsWatchDelegate
- if (parsedExpression.$$watchDelegate &&
- parsedExpression.$$watchDelegate !== inputsWatchDelegate) {
- fn.$$watchDelegate = parsedExpression.$$watchDelegate;
- } else if (!interceptorFn.$stateful) {
- // If there is an interceptor, but no watchDelegate then treat the interceptor like
- // we treat filters - it is assumed to be a pure function unless flagged with $stateful
- fn.$$watchDelegate = inputsWatchDelegate;
- useInputs = !parsedExpression.inputs;
- fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];
- }
-
- return fn;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $q
- * @requires $rootScope
- *
- * @description
- * A service that helps you run functions asynchronously, and use their return values (or exceptions)
- * when they are done processing.
- *
- * This is an implementation of promises/deferred objects inspired by
- * [Kris Kowal's Q](https://github.com/kriskowal/q).
- *
- * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred
- * implementations, and the other which resembles ES6 promises to some degree.
- *
- * # $q constructor
- *
- * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`
- * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,
- * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
- *
- * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are
- * available yet.
- *
- * It can be used like so:
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * // perform some asynchronous operation, resolve or reject the promise when appropriate.
- * return $q(function(resolve, reject) {
- * setTimeout(function() {
- * if (okToGreet(name)) {
- * resolve('Hello, ' + name + '!');
- * } else {
- * reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- * });
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * });
- * ```
- *
- * Note: progress/notify callbacks are not currently supported via the ES6-style interface.
- *
- * Note: unlike ES6 behaviour, an exception thrown in the constructor function will NOT implicitly reject the promise.
- *
- * However, the more traditional CommonJS-style usage is still available, and documented below.
- *
- * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
- * interface for interacting with an object that represents the result of an action that is
- * performed asynchronously, and may or may not be finished at any given point in time.
- *
- * From the perspective of dealing with error handling, deferred and promise APIs are to
- * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * var deferred = $q.defer();
- *
- * setTimeout(function() {
- * deferred.notify('About to greet ' + name + '.');
- *
- * if (okToGreet(name)) {
- * deferred.resolve('Hello, ' + name + '!');
- * } else {
- * deferred.reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- *
- * return deferred.promise;
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * }, function(update) {
- * alert('Got notification: ' + update);
- * });
- * ```
- *
- * At first it might not be obvious why this extra complexity is worth the trouble. The payoff
- * comes in the way of guarantees that promise and deferred APIs make, see
- * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.
- *
- * Additionally the promise api allows for composition that is very hard to do with the
- * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.
- * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the
- * section on serial or parallel joining of promises.
- *
- * # The Deferred API
- *
- * A new instance of deferred is constructed by calling `$q.defer()`.
- *
- * The purpose of the deferred object is to expose the associated Promise instance as well as APIs
- * that can be used for signaling the successful or unsuccessful completion, as well as the status
- * of the task.
- *
- * **Methods**
- *
- * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection
- * constructed via `$q.reject`, the promise will be rejected instead.
- * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to
- * resolving it with a rejection constructed via `$q.reject`.
- * - `notify(value)` - provides updates on the status of the promise's execution. This may be called
- * multiple times before the promise is either resolved or rejected.
- *
- * **Properties**
- *
- * - promise – `{Promise}` – promise object associated with this deferred.
- *
- *
- * # The Promise API
- *
- * A new promise instance is created when a deferred instance is created and can be retrieved by
- * calling `deferred.promise`.
- *
- * The purpose of the promise object is to allow for interested parties to get access to the result
- * of the deferred task when it completes.
- *
- * **Methods**
- *
- * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
- * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
- * as soon as the result is available. The callbacks are called with a single argument: the result
- * or rejection reason. Additionally, the notify callback may be called zero or more times to
- * provide a progress indication, before the promise is resolved or rejected.
- *
- * This method *returns a new promise* which is resolved or rejected via the return value of the
- * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved
- * with the value which is resolved in that promise using
- * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
- * It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method.
- *
- * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
- *
- * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise,
- * but to do so without modifying the final value. This is useful to release resources or do some
- * clean-up that needs to be done whether the promise was rejected or resolved. See the [full
- * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for
- * more information.
- *
- * # Chaining promises
- *
- * Because calling the `then` method of a promise returns a new derived promise, it is easily
- * possible to create a chain of promises:
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * return result + 1;
- * });
- *
- * // promiseB will be resolved immediately after promiseA is resolved and its value
- * // will be the result of promiseA incremented by 1
- * ```
- *
- * It is possible to create chains of any length and since a promise can be resolved with another
- * promise (which will defer its resolution further), it is possible to pause/defer resolution of
- * the promises at any point in the chain. This makes it possible to implement powerful APIs like
- * $http's response interceptors.
- *
- *
- * # Differences between Kris Kowal's Q and $q
- *
- * There are two main differences:
- *
- * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation
- * mechanism in angular, which means faster propagation of resolution or rejection into your
- * models and avoiding unnecessary browser repaints, which would result in flickering UI.
- * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains
- * all the important functionality needed for common async tasks.
- *
- * # Testing
- *
- * ```js
- * it('should simulate promise', inject(function($q, $rootScope) {
- * var deferred = $q.defer();
- * var promise = deferred.promise;
- * var resolvedValue;
- *
- * promise.then(function(value) { resolvedValue = value; });
- * expect(resolvedValue).toBeUndefined();
- *
- * // Simulate resolving of promise
- * deferred.resolve(123);
- * // Note that the 'then' function does not get called synchronously.
- * // This is because we want the promise API to always be async, whether or not
- * // it got called synchronously or asynchronously.
- * expect(resolvedValue).toBeUndefined();
- *
- * // Propagate promise resolution to 'then' functions using $apply().
- * $rootScope.$apply();
- * expect(resolvedValue).toEqual(123);
- * }));
- * ```
- *
- * @param {function(function, function)} resolver Function which is responsible for resolving or
- * rejecting the newly created promise. The first parameter is a function which resolves the
- * promise, the second parameter is a function which rejects the promise.
- *
- * @returns {Promise} The newly created promise.
- */
-function $QProvider() {
-
- this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
- return qFactory(function(callback) {
- $rootScope.$evalAsync(callback);
- }, $exceptionHandler);
- }];
-}
-
-function $$QProvider() {
- this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {
- return qFactory(function(callback) {
- $browser.defer(callback);
- }, $exceptionHandler);
- }];
-}
-
-/**
- * Constructs a promise manager.
- *
- * @param {function(function)} nextTick Function for executing functions in the next turn.
- * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
- * debugging purposes.
- * @returns {object} Promise manager.
- */
-function qFactory(nextTick, exceptionHandler) {
- var $qMinErr = minErr('$q', TypeError);
- function callOnce(self, resolveFn, rejectFn) {
- var called = false;
- function wrap(fn) {
- return function(value) {
- if (called) return;
- called = true;
- fn.call(self, value);
- };
- }
-
- return [wrap(resolveFn), wrap(rejectFn)];
- }
-
- /**
- * @ngdoc method
- * @name ng.$q#defer
- * @kind function
- *
- * @description
- * Creates a `Deferred` object which represents a task which will finish in the future.
- *
- * @returns {Deferred} Returns a new instance of deferred.
- */
- var defer = function() {
- return new Deferred();
- };
-
- function Promise() {
- this.$$state = { status: 0 };
- }
-
- extend(Promise.prototype, {
- then: function(onFulfilled, onRejected, progressBack) {
- if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {
- return this;
- }
- var result = new Deferred();
-
- this.$$state.pending = this.$$state.pending || [];
- this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);
- if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);
-
- return result.promise;
- },
-
- "catch": function(callback) {
- return this.then(null, callback);
- },
-
- "finally": function(callback, progressBack) {
- return this.then(function(value) {
- return handleCallback(value, true, callback);
- }, function(error) {
- return handleCallback(error, false, callback);
- }, progressBack);
- }
- });
-
- //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native
- function simpleBind(context, fn) {
- return function(value) {
- fn.call(context, value);
- };
- }
-
- function processQueue(state) {
- var fn, deferred, pending;
-
- pending = state.pending;
- state.processScheduled = false;
- state.pending = undefined;
- for (var i = 0, ii = pending.length; i < ii; ++i) {
- deferred = pending[i][0];
- fn = pending[i][state.status];
- try {
- if (isFunction(fn)) {
- deferred.resolve(fn(state.value));
- } else if (state.status === 1) {
- deferred.resolve(state.value);
- } else {
- deferred.reject(state.value);
- }
- } catch (e) {
- deferred.reject(e);
- exceptionHandler(e);
- }
- }
- }
-
- function scheduleProcessQueue(state) {
- if (state.processScheduled || !state.pending) return;
- state.processScheduled = true;
- nextTick(function() { processQueue(state); });
- }
-
- function Deferred() {
- this.promise = new Promise();
- //Necessary to support unbound execution :/
- this.resolve = simpleBind(this, this.resolve);
- this.reject = simpleBind(this, this.reject);
- this.notify = simpleBind(this, this.notify);
- }
-
- extend(Deferred.prototype, {
- resolve: function(val) {
- if (this.promise.$$state.status) return;
- if (val === this.promise) {
- this.$$reject($qMinErr(
- 'qcycle',
- "Expected promise to be resolved with value other than itself '{0}'",
- val));
- } else {
- this.$$resolve(val);
- }
-
- },
-
- $$resolve: function(val) {
- var then, fns;
-
- fns = callOnce(this, this.$$resolve, this.$$reject);
- try {
- if ((isObject(val) || isFunction(val))) then = val && val.then;
- if (isFunction(then)) {
- this.promise.$$state.status = -1;
- then.call(val, fns[0], fns[1], this.notify);
- } else {
- this.promise.$$state.value = val;
- this.promise.$$state.status = 1;
- scheduleProcessQueue(this.promise.$$state);
- }
- } catch (e) {
- fns[1](e);
- exceptionHandler(e);
- }
- },
-
- reject: function(reason) {
- if (this.promise.$$state.status) return;
- this.$$reject(reason);
- },
-
- $$reject: function(reason) {
- this.promise.$$state.value = reason;
- this.promise.$$state.status = 2;
- scheduleProcessQueue(this.promise.$$state);
- },
-
- notify: function(progress) {
- var callbacks = this.promise.$$state.pending;
-
- if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {
- nextTick(function() {
- var callback, result;
- for (var i = 0, ii = callbacks.length; i < ii; i++) {
- result = callbacks[i][0];
- callback = callbacks[i][3];
- try {
- result.notify(isFunction(callback) ? callback(progress) : progress);
- } catch (e) {
- exceptionHandler(e);
- }
- }
- });
- }
- }
- });
-
- /**
- * @ngdoc method
- * @name $q#reject
- * @kind function
- *
- * @description
- * Creates a promise that is resolved as rejected with the specified `reason`. This api should be
- * used to forward rejection in a chain of promises. If you are dealing with the last promise in
- * a promise chain, you don't need to worry about it.
- *
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of
- * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via
- * a promise error callback and you want to forward the error to the promise derived from the
- * current promise, you have to "rethrow" the error by returning a rejection constructed via
- * `reject`.
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * // success: do something and resolve promiseB
- * // with the old or a new result
- * return result;
- * }, function(reason) {
- * // error: handle the error if possible and
- * // resolve promiseB with newPromiseOrValue,
- * // otherwise forward the rejection to promiseB
- * if (canHandle(reason)) {
- * // handle the error and recover
- * return newPromiseOrValue;
- * }
- * return $q.reject(reason);
- * });
- * ```
- *
- * @param {*} reason Constant, message, exception or an object representing the rejection reason.
- * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.
- */
- var reject = function(reason) {
- var result = new Deferred();
- result.reject(reason);
- return result.promise;
- };
-
- var makePromise = function makePromise(value, resolved) {
- var result = new Deferred();
- if (resolved) {
- result.resolve(value);
- } else {
- result.reject(value);
- }
- return result.promise;
- };
-
- var handleCallback = function handleCallback(value, isResolved, callback) {
- var callbackOutput = null;
- try {
- if (isFunction(callback)) callbackOutput = callback();
- } catch (e) {
- return makePromise(e, false);
- }
- if (isPromiseLike(callbackOutput)) {
- return callbackOutput.then(function() {
- return makePromise(value, isResolved);
- }, function(error) {
- return makePromise(error, false);
- });
- } else {
- return makePromise(value, isResolved);
- }
- };
-
- /**
- * @ngdoc method
- * @name $q#when
- * @kind function
- *
- * @description
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
- * This is useful when you are dealing with an object that might or might not be a promise, or if
- * the promise comes from a source that can't be trusted.
- *
- * @param {*} value Value or a promise
- * @param {Function=} successCallback
- * @param {Function=} errorCallback
- * @param {Function=} progressCallback
- * @returns {Promise} Returns a promise of the passed value or promise
- */
-
-
- var when = function(value, callback, errback, progressBack) {
- var result = new Deferred();
- result.resolve(value);
- return result.promise.then(callback, errback, progressBack);
- };
-
- /**
- * @ngdoc method
- * @name $q#resolve
- * @kind function
- *
- * @description
- * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.
- *
- * @param {*} value Value or a promise
- * @param {Function=} successCallback
- * @param {Function=} errorCallback
- * @param {Function=} progressCallback
- * @returns {Promise} Returns a promise of the passed value or promise
- */
- var resolve = when;
-
- /**
- * @ngdoc method
- * @name $q#all
- * @kind function
- *
- * @description
- * Combines multiple promises into a single promise that is resolved when all of the input
- * promises are resolved.
- *
- * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.
- * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,
- * each value corresponding to the promise at the same index/key in the `promises` array/hash.
- * If any of the promises is resolved with a rejection, this resulting promise will be rejected
- * with the same rejection value.
- */
-
- function all(promises) {
- var deferred = new Deferred(),
- counter = 0,
- results = isArray(promises) ? [] : {};
-
- forEach(promises, function(promise, key) {
- counter++;
- when(promise).then(function(value) {
- if (results.hasOwnProperty(key)) return;
- results[key] = value;
- if (!(--counter)) deferred.resolve(results);
- }, function(reason) {
- if (results.hasOwnProperty(key)) return;
- deferred.reject(reason);
- });
- });
-
- if (counter === 0) {
- deferred.resolve(results);
- }
-
- return deferred.promise;
- }
-
- var $Q = function Q(resolver) {
- if (!isFunction(resolver)) {
- throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
- }
-
- if (!(this instanceof Q)) {
- // More useful when $Q is the Promise itself.
- return new Q(resolver);
- }
-
- var deferred = new Deferred();
-
- function resolveFn(value) {
- deferred.resolve(value);
- }
-
- function rejectFn(reason) {
- deferred.reject(reason);
- }
-
- resolver(resolveFn, rejectFn);
-
- return deferred.promise;
- };
-
- $Q.defer = defer;
- $Q.reject = reject;
- $Q.when = when;
- $Q.resolve = resolve;
- $Q.all = all;
-
- return $Q;
-}
-
-function $$RAFProvider() { //rAF
- this.$get = ['$window', '$timeout', function($window, $timeout) {
- var requestAnimationFrame = $window.requestAnimationFrame ||
- $window.webkitRequestAnimationFrame;
-
- var cancelAnimationFrame = $window.cancelAnimationFrame ||
- $window.webkitCancelAnimationFrame ||
- $window.webkitCancelRequestAnimationFrame;
-
- var rafSupported = !!requestAnimationFrame;
- var raf = rafSupported
- ? function(fn) {
- var id = requestAnimationFrame(fn);
- return function() {
- cancelAnimationFrame(id);
- };
- }
- : function(fn) {
- var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666
- return function() {
- $timeout.cancel(timer);
- };
- };
-
- raf.supported = rafSupported;
-
- return raf;
- }];
-}
-
-/**
- * DESIGN NOTES
- *
- * The design decisions behind the scope are heavily favored for speed and memory consumption.
- *
- * The typical use of scope is to watch the expressions, which most of the time return the same
- * value as last time so we optimize the operation.
- *
- * Closures construction is expensive in terms of speed as well as memory:
- * - No closures, instead use prototypical inheritance for API
- * - Internal state needs to be stored on scope directly, which means that private state is
- * exposed as $$____ properties
- *
- * Loop operations are optimized by using while(count--) { ... }
- * - This means that in order to keep the same order of execution as addition we have to add
- * items to the array at the beginning (unshift) instead of at the end (push)
- *
- * Child scopes are created and removed often
- * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists
- *
- * There are fewer watches than observers. This is why you don't want the observer to be implemented
- * in the same way as watch. Watch requires return of the initialization function which is expensive
- * to construct.
- */
-
-
-/**
- * @ngdoc provider
- * @name $rootScopeProvider
- * @description
- *
- * Provider for the $rootScope service.
- */
-
-/**
- * @ngdoc method
- * @name $rootScopeProvider#digestTtl
- * @description
- *
- * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and
- * assuming that the model is unstable.
- *
- * The current default is 10 iterations.
- *
- * In complex applications it's possible that the dependencies between `$watch`s will result in
- * several digest iterations. However if an application needs more than the default 10 digest
- * iterations for its model to stabilize then you should investigate what is causing the model to
- * continuously change during the digest.
- *
- * Increasing the TTL could have performance implications, so you should not change it without
- * proper justification.
- *
- * @param {number} limit The number of digest iterations.
- */
-
-
-/**
- * @ngdoc service
- * @name $rootScope
- * @description
- *
- * Every application has a single root {@link ng.$rootScope.Scope scope}.
- * All other scopes are descendant scopes of the root scope. Scopes provide separation
- * between the model and the view, via a mechanism for watching the model for changes.
- * They also provide event emission/broadcast and subscription facility. See the
- * {@link guide/scope developer guide on scopes}.
- */
-function $RootScopeProvider() {
- var TTL = 10;
- var $rootScopeMinErr = minErr('$rootScope');
- var lastDirtyWatch = null;
- var applyAsyncId = null;
-
- this.digestTtl = function(value) {
- if (arguments.length) {
- TTL = value;
- }
- return TTL;
- };
-
- function createChildScopeClass(parent) {
- function ChildScope() {
- this.$$watchers = this.$$nextSibling =
- this.$$childHead = this.$$childTail = null;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$watchersCount = 0;
- this.$id = nextUid();
- this.$$ChildScope = null;
- }
- ChildScope.prototype = parent;
- return ChildScope;
- }
-
- this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',
- function($injector, $exceptionHandler, $parse, $browser) {
-
- function destroyChildScope($event) {
- $event.currentScope.$$destroyed = true;
- }
-
- function cleanUpScope($scope) {
-
- if (msie === 9) {
- // There is a memory leak in IE9 if all child scopes are not disconnected
- // completely when a scope is destroyed. So this code will recurse up through
- // all this scopes children
- //
- // See issue https://github.com/angular/angular.js/issues/10706
- $scope.$$childHead && cleanUpScope($scope.$$childHead);
- $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);
- }
-
- // The code below works around IE9 and V8's memory leaks
- //
- // See:
- // - https://code.google.com/p/v8/issues/detail?id=2073#c26
- // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
- // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
-
- $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =
- $scope.$$childTail = $scope.$root = $scope.$$watchers = null;
- }
-
- /**
- * @ngdoc type
- * @name $rootScope.Scope
- *
- * @description
- * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
- * {@link auto.$injector $injector}. Child scopes are created using the
- * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
- * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for
- * an in-depth introduction and usage examples.
- *
- *
- * # Inheritance
- * A scope can inherit from a parent scope, as in this example:
- * ```js
- var parent = $rootScope;
- var child = parent.$new();
-
- parent.salutation = "Hello";
- expect(child.salutation).toEqual('Hello');
-
- child.salutation = "Welcome";
- expect(child.salutation).toEqual('Welcome');
- expect(parent.salutation).toEqual('Hello');
- * ```
- *
- * When interacting with `Scope` in tests, additional helper methods are available on the
- * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional
- * details.
- *
- *
- * @param {Object.<string, function()>=} providers Map of service factory which need to be
- * provided for the current scope. Defaults to {@link ng}.
- * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
- * append/override services provided by `providers`. This is handy
- * when unit-testing and having the need to override a default
- * service.
- * @returns {Object} Newly created scope.
- *
- */
- function Scope() {
- this.$id = nextUid();
- this.$$phase = this.$parent = this.$$watchers =
- this.$$nextSibling = this.$$prevSibling =
- this.$$childHead = this.$$childTail = null;
- this.$root = this;
- this.$$destroyed = false;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$watchersCount = 0;
- this.$$isolateBindings = null;
- }
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$id
- *
- * @description
- * Unique scope ID (monotonically increasing) useful for debugging.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$parent
- *
- * @description
- * Reference to the parent scope.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$root
- *
- * @description
- * Reference to the root scope.
- */
-
- Scope.prototype = {
- constructor: Scope,
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$new
- * @kind function
- *
- * @description
- * Creates a new child {@link ng.$rootScope.Scope scope}.
- *
- * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.
- * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
- *
- * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is
- * desired for the scope and its child scopes to be permanently detached from the parent and
- * thus stop participating in model change detection and listener notification by invoking.
- *
- * @param {boolean} isolate If true, then the scope does not prototypically inherit from the
- * parent scope. The scope is isolated, as it can not see parent scope properties.
- * When creating widgets, it is useful for the widget to not accidentally read parent
- * state.
- *
- * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`
- * of the newly created scope. Defaults to `this` scope if not provided.
- * This is used when creating a transclude scope to correctly place it
- * in the scope hierarchy while maintaining the correct prototypical
- * inheritance.
- *
- * @returns {Object} The newly created child scope.
- *
- */
- $new: function(isolate, parent) {
- var child;
-
- parent = parent || this;
-
- if (isolate) {
- child = new Scope();
- child.$root = this.$root;
- } else {
- // Only create a child scope class if somebody asks for one,
- // but cache it to allow the VM to optimize lookups.
- if (!this.$$ChildScope) {
- this.$$ChildScope = createChildScopeClass(this);
- }
- child = new this.$$ChildScope();
- }
- child.$parent = parent;
- child.$$prevSibling = parent.$$childTail;
- if (parent.$$childHead) {
- parent.$$childTail.$$nextSibling = child;
- parent.$$childTail = child;
- } else {
- parent.$$childHead = parent.$$childTail = child;
- }
-
- // When the new scope is not isolated or we inherit from `this`, and
- // the parent scope is destroyed, the property `$$destroyed` is inherited
- // prototypically. In all other cases, this property needs to be set
- // when the parent scope is destroyed.
- // The listener needs to be added after the parent is set
- if (isolate || parent != this) child.$on('$destroy', destroyChildScope);
-
- return child;
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watch
- * @kind function
- *
- * @description
- * Registers a `listener` callback to be executed whenever the `watchExpression` changes.
- *
- * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest
- * $digest()} and should return the value that will be watched. (`watchExpression` should not change
- * its value when executed multiple times with the same input because it may be executed multiple
- * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be
- * [idempotent](http://en.wikipedia.org/wiki/Idempotence).
- * - The `listener` is called only when the value from the current `watchExpression` and the
- * previous call to `watchExpression` are not equal (with the exception of the initial run,
- * see below). Inequality is determined according to reference inequality,
- * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
- * via the `!==` Javascript operator, unless `objectEquality == true`
- * (see next point)
- * - When `objectEquality == true`, inequality of the `watchExpression` is determined
- * according to the {@link angular.equals} function. To save the value of the object for
- * later comparison, the {@link angular.copy} function is used. This therefore means that
- * watching complex objects will have adverse memory and performance implications.
- * - The watch `listener` may change the model, which may trigger other `listener`s to fire.
- * This is achieved by rerunning the watchers until no changes are detected. The rerun
- * iteration limit is 10 to prevent an infinite loop deadlock.
- *
- *
- * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
- * you can register a `watchExpression` function with no `listener`. (Be prepared for
- * multiple calls to your `watchExpression` because it will execute multiple times in a
- * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)
- *
- * After a watcher is registered with the scope, the `listener` fn is called asynchronously
- * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
- * watcher. In rare cases, this is undesirable because the listener is called when the result
- * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
- * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
- * listener was called due to initialization.
- *
- *
- *
- * # Example
- * ```js
- // let's assume that scope was dependency injected as the $rootScope
- var scope = $rootScope;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
-
-
-
- // Using a function as a watchExpression
- var food;
- scope.foodCounter = 0;
- expect(scope.foodCounter).toEqual(0);
- scope.$watch(
- // This function returns the value being watched. It is called for each turn of the $digest loop
- function() { return food; },
- // This is the change listener, called when the value returned from the above function changes
- function(newValue, oldValue) {
- if ( newValue !== oldValue ) {
- // Only increment the counter if the value changed
- scope.foodCounter = scope.foodCounter + 1;
- }
- }
- );
- // No digest has been run so the counter will be zero
- expect(scope.foodCounter).toEqual(0);
-
- // Run the digest but since food has not changed count will still be zero
- scope.$digest();
- expect(scope.foodCounter).toEqual(0);
-
- // Update food and run digest. Now the counter will increment
- food = 'cheeseburger';
- scope.$digest();
- expect(scope.foodCounter).toEqual(1);
-
- * ```
- *
- *
- *
- * @param {(function()|string)} watchExpression Expression that is evaluated on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
- * a call to the `listener`.
- *
- * - `string`: Evaluated as {@link guide/expression expression}
- * - `function(scope)`: called with current `scope` as a parameter.
- * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value
- * of `watchExpression` changes.
- *
- * - `newVal` contains the current value of the `watchExpression`
- * - `oldVal` contains the previous value of the `watchExpression`
- * - `scope` refers to the current scope
- * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
- * comparing for reference equality.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {
- var get = $parse(watchExp);
-
- if (get.$$watchDelegate) {
- return get.$$watchDelegate(this, listener, objectEquality, get, watchExp);
- }
- var scope = this,
- array = scope.$$watchers,
- watcher = {
- fn: listener,
- last: initWatchVal,
- get: get,
- exp: prettyPrintExpression || watchExp,
- eq: !!objectEquality
- };
-
- lastDirtyWatch = null;
-
- if (!isFunction(listener)) {
- watcher.fn = noop;
- }
-
- if (!array) {
- array = scope.$$watchers = [];
- }
- // we use unshift since we use a while loop in $digest for speed.
- // the while loop reads in reverse order.
- array.unshift(watcher);
- incrementWatchersCount(this, 1);
-
- return function deregisterWatch() {
- if (arrayRemove(array, watcher) >= 0) {
- incrementWatchersCount(scope, -1);
- }
- lastDirtyWatch = null;
- };
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchGroup
- * @kind function
- *
- * @description
- * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.
- * If any one expression in the collection changes the `listener` is executed.
- *
- * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every
- * call to $digest() to see if any items changes.
- * - The `listener` is called whenever any expression in the `watchExpressions` array changes.
- *
- * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually
- * watched using {@link ng.$rootScope.Scope#$watch $watch()}
- *
- * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any
- * expression in `watchExpressions` changes
- * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching
- * those of `watchExpression`
- * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching
- * those of `watchExpression`
- * The `scope` refers to the current scope.
- * @returns {function()} Returns a de-registration function for all listeners.
- */
- $watchGroup: function(watchExpressions, listener) {
- var oldValues = new Array(watchExpressions.length);
- var newValues = new Array(watchExpressions.length);
- var deregisterFns = [];
- var self = this;
- var changeReactionScheduled = false;
- var firstRun = true;
-
- if (!watchExpressions.length) {
- // No expressions means we call the listener ASAP
- var shouldCall = true;
- self.$evalAsync(function() {
- if (shouldCall) listener(newValues, newValues, self);
- });
- return function deregisterWatchGroup() {
- shouldCall = false;
- };
- }
-
- if (watchExpressions.length === 1) {
- // Special case size of one
- return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {
- newValues[0] = value;
- oldValues[0] = oldValue;
- listener(newValues, (value === oldValue) ? newValues : oldValues, scope);
- });
- }
-
- forEach(watchExpressions, function(expr, i) {
- var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {
- newValues[i] = value;
- oldValues[i] = oldValue;
- if (!changeReactionScheduled) {
- changeReactionScheduled = true;
- self.$evalAsync(watchGroupAction);
- }
- });
- deregisterFns.push(unwatchFn);
- });
-
- function watchGroupAction() {
- changeReactionScheduled = false;
-
- if (firstRun) {
- firstRun = false;
- listener(newValues, newValues, self);
- } else {
- listener(newValues, oldValues, self);
- }
- }
-
- return function deregisterWatchGroup() {
- while (deregisterFns.length) {
- deregisterFns.shift()();
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchCollection
- * @kind function
- *
- * @description
- * Shallow watches the properties of an object and fires whenever any of the properties change
- * (for arrays, this implies watching the array items; for object maps, this implies watching
- * the properties). If a change is detected, the `listener` callback is fired.
- *
- * - The `obj` collection is observed via standard $watch operation and is examined on every
- * call to $digest() to see if any items have been added, removed, or moved.
- * - The `listener` is called whenever anything within the `obj` has changed. Examples include
- * adding, removing, and moving items belonging to an object or array.
- *
- *
- * # Example
- * ```js
- $scope.names = ['igor', 'matias', 'misko', 'james'];
- $scope.dataCount = 4;
-
- $scope.$watchCollection('names', function(newNames, oldNames) {
- $scope.dataCount = newNames.length;
- });
-
- expect($scope.dataCount).toEqual(4);
- $scope.$digest();
-
- //still at 4 ... no changes
- expect($scope.dataCount).toEqual(4);
-
- $scope.names.pop();
- $scope.$digest();
-
- //now there's been a change
- expect($scope.dataCount).toEqual(3);
- * ```
- *
- *
- * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The
- * expression value should evaluate to an object or an array which is observed on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the
- * collection will trigger a call to the `listener`.
- *
- * @param {function(newCollection, oldCollection, scope)} listener a callback function called
- * when a change is detected.
- * - The `newCollection` object is the newly modified data obtained from the `obj` expression
- * - The `oldCollection` object is a copy of the former collection data.
- * Due to performance considerations, the`oldCollection` value is computed only if the
- * `listener` function declares two or more arguments.
- * - The `scope` argument refers to the current scope.
- *
- * @returns {function()} Returns a de-registration function for this listener. When the
- * de-registration function is executed, the internal watch operation is terminated.
- */
- $watchCollection: function(obj, listener) {
- $watchCollectionInterceptor.$stateful = true;
-
- var self = this;
- // the current value, updated on each dirty-check run
- var newValue;
- // a shallow copy of the newValue from the last dirty-check run,
- // updated to match newValue during dirty-check run
- var oldValue;
- // a shallow copy of the newValue from when the last change happened
- var veryOldValue;
- // only track veryOldValue if the listener is asking for it
- var trackVeryOldValue = (listener.length > 1);
- var changeDetected = 0;
- var changeDetector = $parse(obj, $watchCollectionInterceptor);
- var internalArray = [];
- var internalObject = {};
- var initRun = true;
- var oldLength = 0;
-
- function $watchCollectionInterceptor(_value) {
- newValue = _value;
- var newLength, key, bothNaN, newItem, oldItem;
-
- // If the new value is undefined, then return undefined as the watch may be a one-time watch
- if (isUndefined(newValue)) return;
-
- if (!isObject(newValue)) { // if primitive
- if (oldValue !== newValue) {
- oldValue = newValue;
- changeDetected++;
- }
- } else if (isArrayLike(newValue)) {
- if (oldValue !== internalArray) {
- // we are transitioning from something which was not an array into array.
- oldValue = internalArray;
- oldLength = oldValue.length = 0;
- changeDetected++;
- }
-
- newLength = newValue.length;
-
- if (oldLength !== newLength) {
- // if lengths do not match we need to trigger change notification
- changeDetected++;
- oldValue.length = oldLength = newLength;
- }
- // copy the items to oldValue and look for changes.
- for (var i = 0; i < newLength; i++) {
- oldItem = oldValue[i];
- newItem = newValue[i];
-
- bothNaN = (oldItem !== oldItem) && (newItem !== newItem);
- if (!bothNaN && (oldItem !== newItem)) {
- changeDetected++;
- oldValue[i] = newItem;
- }
- }
- } else {
- if (oldValue !== internalObject) {
- // we are transitioning from something which was not an object into object.
- oldValue = internalObject = {};
- oldLength = 0;
- changeDetected++;
- }
- // copy the items to oldValue and look for changes.
- newLength = 0;
- for (key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- newLength++;
- newItem = newValue[key];
- oldItem = oldValue[key];
-
- if (key in oldValue) {
- bothNaN = (oldItem !== oldItem) && (newItem !== newItem);
- if (!bothNaN && (oldItem !== newItem)) {
- changeDetected++;
- oldValue[key] = newItem;
- }
- } else {
- oldLength++;
- oldValue[key] = newItem;
- changeDetected++;
- }
- }
- }
- if (oldLength > newLength) {
- // we used to have more keys, need to find them and destroy them.
- changeDetected++;
- for (key in oldValue) {
- if (!hasOwnProperty.call(newValue, key)) {
- oldLength--;
- delete oldValue[key];
- }
- }
- }
- }
- return changeDetected;
- }
-
- function $watchCollectionAction() {
- if (initRun) {
- initRun = false;
- listener(newValue, newValue, self);
- } else {
- listener(newValue, veryOldValue, self);
- }
-
- // make a copy for the next time a collection is changed
- if (trackVeryOldValue) {
- if (!isObject(newValue)) {
- //primitive
- veryOldValue = newValue;
- } else if (isArrayLike(newValue)) {
- veryOldValue = new Array(newValue.length);
- for (var i = 0; i < newValue.length; i++) {
- veryOldValue[i] = newValue[i];
- }
- } else { // if object
- veryOldValue = {};
- for (var key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- veryOldValue[key] = newValue[key];
- }
- }
- }
- }
- }
-
- return this.$watch(changeDetector, $watchCollectionAction);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$digest
- * @kind function
- *
- * @description
- * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and
- * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change
- * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}
- * until no more listeners are firing. This means that it is possible to get into an infinite
- * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of
- * iterations exceeds 10.
- *
- * Usually, you don't call `$digest()` directly in
- * {@link ng.directive:ngController controllers} or in
- * {@link ng.$compileProvider#directive directives}.
- * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within
- * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.
- *
- * If you want to be notified whenever `$digest()` is called,
- * you can register a `watchExpression` function with
- * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.
- *
- * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.
- *
- * # Example
- * ```js
- var scope = ...;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
- * ```
- *
- */
- $digest: function() {
- var watch, value, last,
- watchers,
- length,
- dirty, ttl = TTL,
- next, current, target = this,
- watchLog = [],
- logIdx, logMsg, asyncTask;
-
- beginPhase('$digest');
- // Check for changes to browser url that happened in sync before the call to $digest
- $browser.$$checkUrlChange();
-
- if (this === $rootScope && applyAsyncId !== null) {
- // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then
- // cancel the scheduled $apply and flush the queue of expressions to be evaluated.
- $browser.defer.cancel(applyAsyncId);
- flushApplyAsync();
- }
-
- lastDirtyWatch = null;
-
- do { // "while dirty" loop
- dirty = false;
- current = target;
-
- while (asyncQueue.length) {
- try {
- asyncTask = asyncQueue.shift();
- asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);
- } catch (e) {
- $exceptionHandler(e);
- }
- lastDirtyWatch = null;
- }
-
- traverseScopesLoop:
- do { // "traverse the scopes" loop
- if ((watchers = current.$$watchers)) {
- // process our watches
- length = watchers.length;
- while (length--) {
- try {
- watch = watchers[length];
- // Most common watches are on primitives, in which case we can short
- // circuit it with === operator, only when === fails do we use .equals
- if (watch) {
- if ((value = watch.get(current)) !== (last = watch.last) &&
- !(watch.eq
- ? equals(value, last)
- : (typeof value === 'number' && typeof last === 'number'
- && isNaN(value) && isNaN(last)))) {
- dirty = true;
- lastDirtyWatch = watch;
- watch.last = watch.eq ? copy(value, null) : value;
- watch.fn(value, ((last === initWatchVal) ? value : last), current);
- if (ttl < 5) {
- logIdx = 4 - ttl;
- if (!watchLog[logIdx]) watchLog[logIdx] = [];
- watchLog[logIdx].push({
- msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,
- newVal: value,
- oldVal: last
- });
- }
- } else if (watch === lastDirtyWatch) {
- // If the most recently dirty watcher is now clean, short circuit since the remaining watchers
- // have already been tested.
- dirty = false;
- break traverseScopesLoop;
- }
- }
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $broadcast
- if (!(next = ((current.$$watchersCount && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while (current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- } while ((current = next));
-
- // `break traverseScopesLoop;` takes us to here
-
- if ((dirty || asyncQueue.length) && !(ttl--)) {
- clearPhase();
- throw $rootScopeMinErr('infdig',
- '{0} $digest() iterations reached. Aborting!\n' +
- 'Watchers fired in the last 5 iterations: {1}',
- TTL, watchLog);
- }
-
- } while (dirty || asyncQueue.length);
-
- clearPhase();
-
- while (postDigestQueue.length) {
- try {
- postDigestQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- },
-
-
- /**
- * @ngdoc event
- * @name $rootScope.Scope#$destroy
- * @eventType broadcast on scope being destroyed
- *
- * @description
- * Broadcasted when a scope and its children are being destroyed.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$destroy
- * @kind function
- *
- * @description
- * Removes the current scope (and all of its children) from the parent scope. Removal implies
- * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
- * propagate to the current scope and its children. Removal also implies that the current
- * scope is eligible for garbage collection.
- *
- * The `$destroy()` is usually used by directives such as
- * {@link ng.directive:ngRepeat ngRepeat} for managing the
- * unrolling of the loop.
- *
- * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
- * Application code can register a `$destroy` event handler that will give it a chance to
- * perform any necessary cleanup.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
- $destroy: function() {
- // We can't destroy a scope that has been already destroyed.
- if (this.$$destroyed) return;
- var parent = this.$parent;
-
- this.$broadcast('$destroy');
- this.$$destroyed = true;
-
- if (this === $rootScope) {
- //Remove handlers attached to window when $rootScope is removed
- $browser.$$applicationDestroyed();
- }
-
- incrementWatchersCount(this, -this.$$watchersCount);
- for (var eventName in this.$$listenerCount) {
- decrementListenerCount(this, this.$$listenerCount[eventName], eventName);
- }
-
- // sever all the references to parent scopes (after this cleanup, the current scope should
- // not be retained by any of our references and should be eligible for garbage collection)
- if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
- if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
- if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
- if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
-
- // Disable listeners, watchers and apply/digest methods
- this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;
- this.$on = this.$watch = this.$watchGroup = function() { return noop; };
- this.$$listeners = {};
-
- // Disconnect the next sibling to prevent `cleanUpScope` destroying those too
- this.$$nextSibling = null;
- cleanUpScope(this);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$eval
- * @kind function
- *
- * @description
- * Executes the `expression` on the current scope and returns the result. Any exceptions in
- * the expression are propagated (uncaught). This is useful when evaluating Angular
- * expressions.
- *
- * # Example
- * ```js
- var scope = ng.$rootScope.Scope();
- scope.a = 1;
- scope.b = 2;
-
- expect(scope.$eval('a+b')).toEqual(3);
- expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
- * ```
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- * @returns {*} The result of evaluating the expression.
- */
- $eval: function(expr, locals) {
- return $parse(expr)(this, locals);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$evalAsync
- * @kind function
- *
- * @description
- * Executes the expression on the current scope at a later point in time.
- *
- * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only
- * that:
- *
- * - it will execute after the function that scheduled the evaluation (preferably before DOM
- * rendering).
- * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
- * `expression` execution.
- *
- * Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle
- * will be scheduled. However, it is encouraged to always call code that changes the model
- * from within an `$apply` call. That includes code evaluated via `$evalAsync`.
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- */
- $evalAsync: function(expr, locals) {
- // if we are outside of an $digest loop and this is the first time we are scheduling async
- // task also schedule async auto-flush
- if (!$rootScope.$$phase && !asyncQueue.length) {
- $browser.defer(function() {
- if (asyncQueue.length) {
- $rootScope.$digest();
- }
- });
- }
-
- asyncQueue.push({scope: this, expression: expr, locals: locals});
- },
-
- $$postDigest: function(fn) {
- postDigestQueue.push(fn);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$apply
- * @kind function
- *
- * @description
- * `$apply()` is used to execute an expression in angular from outside of the angular
- * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).
- * Because we are calling into the angular framework we need to perform proper scope life
- * cycle of {@link ng.$exceptionHandler exception handling},
- * {@link ng.$rootScope.Scope#$digest executing watches}.
- *
- * ## Life cycle
- *
- * # Pseudo-Code of `$apply()`
- * ```js
- function $apply(expr) {
- try {
- return $eval(expr);
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- $root.$digest();
- }
- }
- * ```
- *
- *
- * Scope's `$apply()` method transitions through the following stages:
- *
- * 1. The {@link guide/expression expression} is executed using the
- * {@link ng.$rootScope.Scope#$eval $eval()} method.
- * 2. Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the
- * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
- *
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- *
- * @returns {*} The result of evaluating the expression.
- */
- $apply: function(expr) {
- try {
- beginPhase('$apply');
- try {
- return this.$eval(expr);
- } finally {
- clearPhase();
- }
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- try {
- $rootScope.$digest();
- } catch (e) {
- $exceptionHandler(e);
- throw e;
- }
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$applyAsync
- * @kind function
- *
- * @description
- * Schedule the invocation of $apply to occur at a later time. The actual time difference
- * varies across browsers, but is typically around ~10 milliseconds.
- *
- * This can be used to queue up multiple expressions which need to be evaluated in the same
- * digest.
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- */
- $applyAsync: function(expr) {
- var scope = this;
- expr && applyAsyncQueue.push($applyAsyncExpression);
- scheduleApplyAsync();
-
- function $applyAsyncExpression() {
- scope.$eval(expr);
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$on
- * @kind function
- *
- * @description
- * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
- * discussion of event life cycle.
- *
- * The event listener function format is: `function(event, args...)`. The `event` object
- * passed into the listener has the following attributes:
- *
- * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or
- * `$broadcast`-ed.
- * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the
- * event propagates through the scope hierarchy, this property is set to null.
- * - `name` - `{string}`: name of the event.
- * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel
- * further event propagation (available only for events that were `$emit`-ed).
- * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag
- * to true.
- * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
- *
- * @param {string} name Event name to listen on.
- * @param {function(event, ...args)} listener Function to call when the event is emitted.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $on: function(name, listener) {
- var namedListeners = this.$$listeners[name];
- if (!namedListeners) {
- this.$$listeners[name] = namedListeners = [];
- }
- namedListeners.push(listener);
-
- var current = this;
- do {
- if (!current.$$listenerCount[name]) {
- current.$$listenerCount[name] = 0;
- }
- current.$$listenerCount[name]++;
- } while ((current = current.$parent));
-
- var self = this;
- return function() {
- var indexOfListener = namedListeners.indexOf(listener);
- if (indexOfListener !== -1) {
- namedListeners[indexOfListener] = null;
- decrementListenerCount(self, 1, name);
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$emit
- * @kind function
- *
- * @description
- * Dispatches an event `name` upwards through the scope hierarchy notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$emit` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event traverses upwards toward the root scope and calls all
- * registered listeners along the way. The event will stop propagating if one of the listeners
- * cancels it.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to emit.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).
- */
- $emit: function(name, args) {
- var empty = [],
- namedListeners,
- scope = this,
- stopPropagation = false,
- event = {
- name: name,
- targetScope: scope,
- stopPropagation: function() {stopPropagation = true;},
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- },
- listenerArgs = concat([event], arguments, 1),
- i, length;
-
- do {
- namedListeners = scope.$$listeners[name] || empty;
- event.currentScope = scope;
- for (i = 0, length = namedListeners.length; i < length; i++) {
-
- // if listeners were deregistered, defragment the array
- if (!namedListeners[i]) {
- namedListeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
- try {
- //allow all listeners attached to the current scope to run
- namedListeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- //if any listener on the current scope stops propagation, prevent bubbling
- if (stopPropagation) {
- event.currentScope = null;
- return event;
- }
- //traverse upwards
- scope = scope.$parent;
- } while (scope);
-
- event.currentScope = null;
-
- return event;
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$broadcast
- * @kind function
- *
- * @description
- * Dispatches an event `name` downwards to all child scopes (and their children) notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$broadcast` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event propagates to all direct and indirect scopes of the current
- * scope and calls all registered listeners along the way. The event cannot be canceled.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to broadcast.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
- */
- $broadcast: function(name, args) {
- var target = this,
- current = target,
- next = target,
- event = {
- name: name,
- targetScope: target,
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- };
-
- if (!target.$$listenerCount[name]) return event;
-
- var listenerArgs = concat([event], arguments, 1),
- listeners, i, length;
-
- //down while you can, then up and next sibling or up and next sibling until back at root
- while ((current = next)) {
- event.currentScope = current;
- listeners = current.$$listeners[name] || [];
- for (i = 0, length = listeners.length; i < length; i++) {
- // if listeners were deregistered, defragment the array
- if (!listeners[i]) {
- listeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
-
- try {
- listeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $digest
- // (though it differs due to having the extra check for $$listenerCount)
- if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while (current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- }
-
- event.currentScope = null;
- return event;
- }
- };
-
- var $rootScope = new Scope();
-
- //The internal queues. Expose them on the $rootScope for debugging/testing purposes.
- var asyncQueue = $rootScope.$$asyncQueue = [];
- var postDigestQueue = $rootScope.$$postDigestQueue = [];
- var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];
-
- return $rootScope;
-
-
- function beginPhase(phase) {
- if ($rootScope.$$phase) {
- throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);
- }
-
- $rootScope.$$phase = phase;
- }
-
- function clearPhase() {
- $rootScope.$$phase = null;
- }
-
- function incrementWatchersCount(current, count) {
- do {
- current.$$watchersCount += count;
- } while ((current = current.$parent));
- }
-
- function decrementListenerCount(current, count, name) {
- do {
- current.$$listenerCount[name] -= count;
-
- if (current.$$listenerCount[name] === 0) {
- delete current.$$listenerCount[name];
- }
- } while ((current = current.$parent));
- }
-
- /**
- * function used as an initial value for watchers.
- * because it's unique we can easily tell it apart from other values
- */
- function initWatchVal() {}
-
- function flushApplyAsync() {
- while (applyAsyncQueue.length) {
- try {
- applyAsyncQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- applyAsyncId = null;
- }
-
- function scheduleApplyAsync() {
- if (applyAsyncId === null) {
- applyAsyncId = $browser.defer(function() {
- $rootScope.$apply(flushApplyAsync);
- });
- }
- }
- }];
-}
-
-/**
- * @description
- * Private service to sanitize uris for links and images. Used by $compile and $sanitize.
- */
-function $$SanitizeUriProvider() {
- var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/,
- imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file|blob):|data:image\/)/;
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- aHrefSanitizationWhitelist = regexp;
- return this;
- }
- return aHrefSanitizationWhitelist;
- };
-
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- imgSrcSanitizationWhitelist = regexp;
- return this;
- }
- return imgSrcSanitizationWhitelist;
- };
-
- this.$get = function() {
- return function sanitizeUri(uri, isImage) {
- var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;
- var normalizedVal;
- normalizedVal = urlResolve(uri).href;
- if (normalizedVal !== '' && !normalizedVal.match(regex)) {
- return 'unsafe:' + normalizedVal;
- }
- return uri;
- };
- };
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-var $sceMinErr = minErr('$sce');
-
-var SCE_CONTEXTS = {
- HTML: 'html',
- CSS: 'css',
- URL: 'url',
- // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a
- // url. (e.g. ng-include, script src, templateUrl)
- RESOURCE_URL: 'resourceUrl',
- JS: 'js'
-};
-
-// Helper functions follow.
-
-function adjustMatcher(matcher) {
- if (matcher === 'self') {
- return matcher;
- } else if (isString(matcher)) {
- // Strings match exactly except for 2 wildcards - '*' and '**'.
- // '*' matches any character except those from the set ':/.?&'.
- // '**' matches any character (like .* in a RegExp).
- // More than 2 *'s raises an error as it's ill defined.
- if (matcher.indexOf('***') > -1) {
- throw $sceMinErr('iwcard',
- 'Illegal sequence *** in string matcher. String: {0}', matcher);
- }
- matcher = escapeForRegexp(matcher).
- replace('\\*\\*', '.*').
- replace('\\*', '[^:/.?&;]*');
- return new RegExp('^' + matcher + '$');
- } else if (isRegExp(matcher)) {
- // The only other type of matcher allowed is a Regexp.
- // Match entire URL / disallow partial matches.
- // Flags are reset (i.e. no global, ignoreCase or multiline)
- return new RegExp('^' + matcher.source + '$');
- } else {
- throw $sceMinErr('imatcher',
- 'Matchers may only be "self", string patterns or RegExp objects');
- }
-}
-
-
-function adjustMatchers(matchers) {
- var adjustedMatchers = [];
- if (isDefined(matchers)) {
- forEach(matchers, function(matcher) {
- adjustedMatchers.push(adjustMatcher(matcher));
- });
- }
- return adjustedMatchers;
-}
-
-
-/**
- * @ngdoc service
- * @name $sceDelegate
- * @kind function
- *
- * @description
- *
- * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
- * Contextual Escaping (SCE)} services to AngularJS.
- *
- * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
- * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is
- * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
- * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
- * work because `$sce` delegates to `$sceDelegate` for these operations.
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.
- *
- * The default instance of `$sceDelegate` should work out of the box with little pain. While you
- * can override it completely to change the behavior of `$sce`, the common case would
- * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
- * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as
- * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist
- * $sceDelegateProvider.resourceUrlWhitelist} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- */
-
-/**
- * @ngdoc provider
- * @name $sceDelegateProvider
- * @description
- *
- * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
- * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure
- * that the URLs used for sourcing Angular templates are safe. Refer {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and
- * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- *
- * For the general details about this service in Angular, read the main page for {@link ng.$sce
- * Strict Contextual Escaping (SCE)}.
- *
- * **Example**: Consider the following case. <a name="example"></a>
- *
- * - your app is hosted at url `http://myapp.example.com/`
- * - but some of your templates are hosted on other domains you control such as
- * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.
- * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.
- *
- * Here is what a secure configuration for this scenario might look like:
- *
- * ```
- * angular.module('myApp', []).config(function($sceDelegateProvider) {
- * $sceDelegateProvider.resourceUrlWhitelist([
- * // Allow same origin resource loads.
- * 'self',
- * // Allow loading from our assets domain. Notice the difference between * and **.
- * 'http://srv*.assets.example.com/**'
- * ]);
- *
- * // The blacklist overrides the whitelist so the open redirect here is blocked.
- * $sceDelegateProvider.resourceUrlBlacklist([
- * 'http://myapp.example.com/clickThru**'
- * ]);
- * });
- * ```
- */
-
-function $SceDelegateProvider() {
- this.SCE_CONTEXTS = SCE_CONTEXTS;
-
- // Resource URLs can also be trusted by policy.
- var resourceUrlWhitelist = ['self'],
- resourceUrlBlacklist = [];
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlWhitelist
- * @kind function
- *
- * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * Note: **an empty whitelist array will block all URLs**!
- *
- * @return {Array} the currently set whitelist array.
- *
- * The **default value** when no whitelist has been explicitly set is `['self']` allowing only
- * same origin resource requests.
- *
- * @description
- * Sets/Gets the whitelist of trusted resource URLs.
- */
- this.resourceUrlWhitelist = function(value) {
- if (arguments.length) {
- resourceUrlWhitelist = adjustMatchers(value);
- }
- return resourceUrlWhitelist;
- };
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlBlacklist
- * @kind function
- *
- * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * The typical usage for the blacklist is to **block
- * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
- * these would otherwise be trusted but actually return content from the redirected domain.
- *
- * Finally, **the blacklist overrides the whitelist** and has the final say.
- *
- * @return {Array} the currently set blacklist array.
- *
- * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there
- * is no blacklist.)
- *
- * @description
- * Sets/Gets the blacklist of trusted resource URLs.
- */
-
- this.resourceUrlBlacklist = function(value) {
- if (arguments.length) {
- resourceUrlBlacklist = adjustMatchers(value);
- }
- return resourceUrlBlacklist;
- };
-
- this.$get = ['$injector', function($injector) {
-
- var htmlSanitizer = function htmlSanitizer(html) {
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- };
-
- if ($injector.has('$sanitize')) {
- htmlSanitizer = $injector.get('$sanitize');
- }
-
-
- function matchUrl(matcher, parsedUrl) {
- if (matcher === 'self') {
- return urlIsSameOrigin(parsedUrl);
- } else {
- // definitely a regex. See adjustMatchers()
- return !!matcher.exec(parsedUrl.href);
- }
- }
-
- function isResourceUrlAllowedByPolicy(url) {
- var parsedUrl = urlResolve(url.toString());
- var i, n, allowed = false;
- // Ensure that at least one item from the whitelist allows this url.
- for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {
- if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {
- allowed = true;
- break;
- }
- }
- if (allowed) {
- // Ensure that no item from the blacklist blocked this url.
- for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {
- if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {
- allowed = false;
- break;
- }
- }
- }
- return allowed;
- }
-
- function generateHolderType(Base) {
- var holderType = function TrustedValueHolderType(trustedValue) {
- this.$$unwrapTrustedValue = function() {
- return trustedValue;
- };
- };
- if (Base) {
- holderType.prototype = new Base();
- }
- holderType.prototype.valueOf = function sceValueOf() {
- return this.$$unwrapTrustedValue();
- };
- holderType.prototype.toString = function sceToString() {
- return this.$$unwrapTrustedValue().toString();
- };
- return holderType;
- }
-
- var trustedValueHolderBase = generateHolderType(),
- byType = {};
-
- byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);
-
- /**
- * @ngdoc method
- * @name $sceDelegate#trustAs
- *
- * @description
- * Returns an object that is trusted by angular for use in specified strict
- * contextual escaping contexts (such as ng-bind-html, ng-include, any src
- * attribute interpolation, any dom event binding attribute interpolation
- * such as for onclick, etc.) that uses the provided value.
- * See {@link ng.$sce $sce} for enabling strict contextual escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
- function trustAs(type, trustedValue) {
- var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (!Constructor) {
- throw $sceMinErr('icontext',
- 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',
- type, trustedValue);
- }
- if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {
- return trustedValue;
- }
- // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting
- // mutable objects, we ensure here that the value passed in is actually a string.
- if (typeof trustedValue !== 'string') {
- throw $sceMinErr('itype',
- 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',
- type);
- }
- return new Constructor(trustedValue);
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#valueOf
- *
- * @description
- * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.
- *
- * If the passed parameter is not a value that had been returned by {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.
- *
- * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}
- * call or anything else.
- * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns
- * `value` unchanged.
- */
- function valueOf(maybeTrusted) {
- if (maybeTrusted instanceof trustedValueHolderBase) {
- return maybeTrusted.$$unwrapTrustedValue();
- } else {
- return maybeTrusted;
- }
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#getTrusted
- *
- * @description
- * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and
- * returns the originally supplied value if the queried context type is a supertype of the
- * created type. If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} call.
- * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.
- */
- function getTrusted(type, maybeTrusted) {
- if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {
- return maybeTrusted;
- }
- var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (constructor && maybeTrusted instanceof constructor) {
- return maybeTrusted.$$unwrapTrustedValue();
- }
- // If we get here, then we may only take one of two actions.
- // 1. sanitize the value for the requested type, or
- // 2. throw an exception.
- if (type === SCE_CONTEXTS.RESOURCE_URL) {
- if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
- return maybeTrusted;
- } else {
- throw $sceMinErr('insecurl',
- 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',
- maybeTrusted.toString());
- }
- } else if (type === SCE_CONTEXTS.HTML) {
- return htmlSanitizer(maybeTrusted);
- }
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- }
-
- return { trustAs: trustAs,
- getTrusted: getTrusted,
- valueOf: valueOf };
- }];
-}
-
-
-/**
- * @ngdoc provider
- * @name $sceProvider
- * @description
- *
- * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.
- * - enable/disable Strict Contextual Escaping (SCE) in a module
- * - override the default implementation with a custom delegate
- *
- * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.
- */
-
-/* jshint maxlen: false*/
-
-/**
- * @ngdoc service
- * @name $sce
- * @kind function
- *
- * @description
- *
- * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.
- *
- * # Strict Contextual Escaping
- *
- * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain
- * contexts to result in a value that is marked as safe to use for that context. One example of
- * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer
- * to these contexts as privileged or SCE contexts.
- *
- * As of version 1.2, Angular ships with SCE enabled by default.
- *
- * Note: When enabled (the default), IE<11 in quirks mode is not supported. In this mode, IE<11 allow
- * one to execute arbitrary javascript by the use of the expression() syntax. Refer
- * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.
- * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`
- * to the top of your HTML document.
- *
- * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for
- * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.
- *
- * Here's an example of a binding in a privileged context:
- *
- * ```
- * <input ng-model="userHtml" aria-label="User input">
- * <div ng-bind-html="userHtml"></div>
- * ```
- *
- * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE
- * disabled, this application allows the user to render arbitrary HTML into the DIV.
- * In a more realistic example, one may be rendering user comments, blog articles, etc. via
- * bindings. (HTML is just one example of a context where rendering user controlled input creates
- * security vulnerabilities.)
- *
- * For the case of HTML, you might use a library, either on the client side, or on the server side,
- * to sanitize unsafe HTML before binding to the value and rendering it in the document.
- *
- * How would you ensure that every place that used these types of bindings was bound to a value that
- * was sanitized by your library (or returned as safe for rendering by your server?) How can you
- * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some
- * properties/fields and forgot to update the binding to the sanitized value?
- *
- * To be secure by default, you want to ensure that any such bindings are disallowed unless you can
- * determine that something explicitly says it's safe to use a value for binding in that
- * context. You can then audit your code (a simple grep would do) to ensure that this is only done
- * for those values that you can easily tell are safe - because they were received from your server,
- * sanitized by your library, etc. You can organize your codebase to help with this - perhaps
- * allowing only the files in a specific directory to do this. Ensuring that the internal API
- * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.
- *
- * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}
- * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to
- * obtain values that will be accepted by SCE / privileged contexts.
- *
- *
- * ## How does it work?
- *
- * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted
- * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link
- * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the
- * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.
- *
- * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link
- * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly
- * simplified):
- *
- * ```
- * var ngBindHtmlDirective = ['$sce', function($sce) {
- * return function(scope, element, attr) {
- * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {
- * element.html(value || '');
- * });
- * };
- * }];
- * ```
- *
- * ## Impact on loading templates
- *
- * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as
- * `templateUrl`'s specified by {@link guide/directive directives}.
- *
- * By default, Angular only loads templates from the same domain and protocol as the application
- * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or
- * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist
- * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.
- *
- * *Please note*:
- * The browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy apply in addition to this and may further restrict whether the template is successfully
- * loaded. This means that without the right CORS policy, loading templates from a different domain
- * won't work on all browsers. Also, loading templates from `file://` URL does not work on some
- * browsers.
- *
- * ## This feels like too much overhead
- *
- * It's important to remember that SCE only applies to interpolation expressions.
- *
- * If your expressions are constant literals, they're automatically trusted and you don't need to
- * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.
- * `<div ng-bind-html="'<b>implicitly trusted</b>'"></div>`) just works.
- *
- * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them
- * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.
- *
- * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load
- * templates in `ng-include` from your application's domain without having to even know about SCE.
- * It blocks loading templates from other domains or loading templates over http from an https
- * served document. You can change these by setting your own custom {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.
- *
- * This significantly reduces the overhead. It is far easier to pay the small overhead and have an
- * application that's secure and can be audited to verify that with much more ease than bolting
- * security onto an application later.
- *
- * <a name="contexts"></a>
- * ## What trusted context types are supported?
- *
- * | Context | Notes |
- * |---------------------|----------------|
- * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |
- * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
- * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |
- * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
- * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
- *
- * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
- *
- * Each element in these arrays must be one of the following:
- *
- * - **'self'**
- * - The special **string**, `'self'`, can be used to match against all URLs of the **same
- * domain** as the application document using the **same protocol**.
- * - **String** (except the special value `'self'`)
- * - The string is matched against the full *normalized / absolute URL* of the resource
- * being tested (substring matches are not good enough.)
- * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters
- * match themselves.
- * - `*`: matches zero or more occurrences of any character other than one of the following 6
- * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use
- * in a whitelist.
- * - `**`: matches zero or more occurrences of *any* character. As such, it's not
- * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.
- * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
- * not have been the intention.) Its usage at the very end of the path is ok. (e.g.
- * http://foo.example.com/templates/**).
- * - **RegExp** (*see caveat below*)
- * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
- * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
- * accidentally introduce a bug when one updates a complex expression (imho, all regexes should
- * have good test coverage). For instance, the use of `.` in the regex is correct only in a
- * small number of cases. A `.` character in the regex used when matching the scheme or a
- * subdomain could be matched against a `:` or literal `.` that was likely not intended. It
- * is highly recommended to use the string patterns and only fall back to regular expressions
- * as a last resort.
- * - The regular expression must be an instance of RegExp (i.e. not a string.) It is
- * matched against the **entire** *normalized / absolute URL* of the resource being tested
- * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
- * present on the RegExp (such as multiline, global, ignoreCase) are ignored.
- * - If you are generating your JavaScript from some other templating engine (not
- * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),
- * remember to escape your regular expression (and be aware that you might need more than
- * one level of escaping depending on your templating engine and the way you interpolated
- * the value.) Do make use of your platform's escaping mechanism as it might be good
- * enough before coding your own. E.g. Ruby has
- * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
- * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
- * Javascript lacks a similar built in function for escaping. Take a look at Google
- * Closure library's [goog.string.regExpEscape(s)](
- * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.
- *
- * ## Show me an example using SCE.
- *
- * <example module="mySceApp" deps="angular-sanitize.js">
- * <file name="index.html">
- * <div ng-controller="AppController as myCtrl">
- * <i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
- * <b>User comments</b><br>
- * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when
- * $sanitize is available. If $sanitize isn't available, this results in an error instead of an
- * exploit.
- * <div class="well">
- * <div ng-repeat="userComment in myCtrl.userComments">
- * <b>{{userComment.name}}</b>:
- * <span ng-bind-html="userComment.htmlComment" class="htmlComment"></span>
- * <br>
- * </div>
- * </div>
- * </div>
- * </file>
- *
- * <file name="script.js">
- * angular.module('mySceApp', ['ngSanitize'])
- * .controller('AppController', ['$http', '$templateCache', '$sce',
- * function($http, $templateCache, $sce) {
- * var self = this;
- * $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) {
- * self.userComments = userComments;
- * });
- * self.explicitlyTrustedHtml = $sce.trustAsHtml(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * }]);
- * </file>
- *
- * <file name="test_data.json">
- * [
- * { "name": "Alice",
- * "htmlComment":
- * "<span onmouseover='this.textContent=\"PWN3D!\"'>Is <i>anyone</i> reading this?</span>"
- * },
- * { "name": "Bob",
- * "htmlComment": "<i>Yes!</i> Am I the only other one?"
- * }
- * ]
- * </file>
- *
- * <file name="protractor.js" type="protractor">
- * describe('SCE doc demo', function() {
- * it('should sanitize untrusted values', function() {
- * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())
- * .toBe('<span>Is <i>anyone</i> reading this?</span>');
- * });
- *
- * it('should NOT sanitize explicitly trusted values', function() {
- * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * });
- * });
- * </file>
- * </example>
- *
- *
- *
- * ## Can I disable SCE completely?
- *
- * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits
- * for little coding overhead. It will be much harder to take an SCE disabled application and
- * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE
- * for cases where you have a lot of existing code that was written before SCE was introduced and
- * you're migrating them a module at a time.
- *
- * That said, here's how you can completely disable SCE:
- *
- * ```
- * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {
- * // Completely disable SCE. For demonstration purposes only!
- * // Do not use in new projects.
- * $sceProvider.enabled(false);
- * });
- * ```
- *
- */
-/* jshint maxlen: 100 */
-
-function $SceProvider() {
- var enabled = true;
-
- /**
- * @ngdoc method
- * @name $sceProvider#enabled
- * @kind function
- *
- * @param {boolean=} value If provided, then enables/disables SCE.
- * @return {boolean} true if SCE is enabled, false otherwise.
- *
- * @description
- * Enables/disables SCE and returns the current value.
- */
- this.enabled = function(value) {
- if (arguments.length) {
- enabled = !!value;
- }
- return enabled;
- };
-
-
- /* Design notes on the default implementation for SCE.
- *
- * The API contract for the SCE delegate
- * -------------------------------------
- * The SCE delegate object must provide the following 3 methods:
- *
- * - trustAs(contextEnum, value)
- * This method is used to tell the SCE service that the provided value is OK to use in the
- * contexts specified by contextEnum. It must return an object that will be accepted by
- * getTrusted() for a compatible contextEnum and return this value.
- *
- * - valueOf(value)
- * For values that were not produced by trustAs(), return them as is. For values that were
- * produced by trustAs(), return the corresponding input value to trustAs. Basically, if
- * trustAs is wrapping the given values into some type, this operation unwraps it when given
- * such a value.
- *
- * - getTrusted(contextEnum, value)
- * This function should return the a value that is safe to use in the context specified by
- * contextEnum or throw and exception otherwise.
- *
- * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be
- * opaque or wrapped in some holder object. That happens to be an implementation detail. For
- * instance, an implementation could maintain a registry of all trusted objects by context. In
- * such a case, trustAs() would return the same object that was passed in. getTrusted() would
- * return the same object passed in if it was found in the registry under a compatible context or
- * throw an exception otherwise. An implementation might only wrap values some of the time based
- * on some criteria. getTrusted() might return a value and not throw an exception for special
- * constants or objects even if not wrapped. All such implementations fulfill this contract.
- *
- *
- * A note on the inheritance model for SCE contexts
- * ------------------------------------------------
- * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This
- * is purely an implementation details.
- *
- * The contract is simply this:
- *
- * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)
- * will also succeed.
- *
- * Inheritance happens to capture this in a natural way. In some future, we
- * may not use inheritance anymore. That is OK because no code outside of
- * sce.js and sceSpecs.js would need to be aware of this detail.
- */
-
- this.$get = ['$parse', '$sceDelegate', function(
- $parse, $sceDelegate) {
- // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow
- // the "expression(javascript expression)" syntax which is insecure.
- if (enabled && msie < 8) {
- throw $sceMinErr('iequirks',
- 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +
- 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +
- 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');
- }
-
- var sce = shallowCopy(SCE_CONTEXTS);
-
- /**
- * @ngdoc method
- * @name $sce#isEnabled
- * @kind function
- *
- * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you
- * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.
- *
- * @description
- * Returns a boolean indicating if SCE is enabled.
- */
- sce.isEnabled = function() {
- return enabled;
- };
- sce.trustAs = $sceDelegate.trustAs;
- sce.getTrusted = $sceDelegate.getTrusted;
- sce.valueOf = $sceDelegate.valueOf;
-
- if (!enabled) {
- sce.trustAs = sce.getTrusted = function(type, value) { return value; };
- sce.valueOf = identity;
- }
-
- /**
- * @ngdoc method
- * @name $sce#parseAs
- *
- * @description
- * Converts Angular {@link guide/expression expression} into a function. This is like {@link
- * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it
- * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,
- * *result*)}
- *
- * @param {string} type The kind of SCE context in which this result will be used.
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
- sce.parseAs = function sceParseAs(type, expr) {
- var parsed = $parse(expr);
- if (parsed.literal && parsed.constant) {
- return parsed;
- } else {
- return $parse(expr, function(value) {
- return sce.getTrusted(type, value);
- });
- }
- };
-
- /**
- * @ngdoc method
- * @name $sce#trustAs
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,
- * returns an object that is trusted by angular for use in specified strict contextual
- * escaping contexts (such as ng-bind-html, ng-include, any src attribute
- * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)
- * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual
- * escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsHtml
- *
- * @description
- * Shorthand method. `$sce.trustAsHtml(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml
- * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl
- * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsResourceUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the return
- * value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsJs
- *
- * @description
- * Shorthand method. `$sce.trustAsJs(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs
- * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrusted
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,
- * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the
- * originally supplied value if the queried context type is a supertype of the created type.
- * If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}
- * call.
- * @returns {*} The value the was originally provided to
- * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.
- * Otherwise, throws an exception.
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedHtml
- *
- * @description
- * Shorthand method. `$sce.getTrustedHtml(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedCss
- *
- * @description
- * Shorthand method. `$sce.getTrustedCss(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedResourceUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedResourceUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to pass to `$sceDelegate.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedJs
- *
- * @description
- * Shorthand method. `$sce.getTrustedJs(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsHtml
- *
- * @description
- * Shorthand method. `$sce.parseAsHtml(expression string)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsCss
- *
- * @description
- * Shorthand method. `$sce.parseAsCss(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsUrl(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsResourceUrl(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsJs
- *
- * @description
- * Shorthand method. `$sce.parseAsJs(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- // Shorthand delegations.
- var parse = sce.parseAs,
- getTrusted = sce.getTrusted,
- trustAs = sce.trustAs;
-
- forEach(SCE_CONTEXTS, function(enumValue, name) {
- var lName = lowercase(name);
- sce[camelCase("parse_as_" + lName)] = function(expr) {
- return parse(enumValue, expr);
- };
- sce[camelCase("get_trusted_" + lName)] = function(value) {
- return getTrusted(enumValue, value);
- };
- sce[camelCase("trust_as_" + lName)] = function(value) {
- return trustAs(enumValue, value);
- };
- });
-
- return sce;
- }];
-}
-
-/**
- * !!! This is an undocumented "private" service !!!
- *
- * @name $sniffer
- * @requires $window
- * @requires $document
- *
- * @property {boolean} history Does the browser support html5 history api ?
- * @property {boolean} transitions Does the browser support CSS transition events ?
- * @property {boolean} animations Does the browser support CSS animation events ?
- *
- * @description
- * This is very simple implementation of testing browser's features.
- */
-function $SnifferProvider() {
- this.$get = ['$window', '$document', function($window, $document) {
- var eventSupport = {},
- android =
- toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
- boxee = /Boxee/i.test(($window.navigator || {}).userAgent),
- document = $document[0] || {},
- vendorPrefix,
- vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/,
- bodyStyle = document.body && document.body.style,
- transitions = false,
- animations = false,
- match;
-
- if (bodyStyle) {
- for (var prop in bodyStyle) {
- if (match = vendorRegex.exec(prop)) {
- vendorPrefix = match[0];
- vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);
- break;
- }
- }
-
- if (!vendorPrefix) {
- vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';
- }
-
- transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));
- animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));
-
- if (android && (!transitions || !animations)) {
- transitions = isString(bodyStyle.webkitTransition);
- animations = isString(bodyStyle.webkitAnimation);
- }
- }
-
-
- return {
- // Android has history.pushState, but it does not update location correctly
- // so let's not use the history API at all.
- // http://code.google.com/p/android/issues/detail?id=17471
- // https://github.com/angular/angular.js/issues/904
-
- // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has
- // so let's not use the history API also
- // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
- // jshint -W018
- history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),
- // jshint +W018
- hasEvent: function(event) {
- // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
- // it. In particular the event is not fired when backspace or delete key are pressed or
- // when cut operation is performed.
- // IE10+ implements 'input' event but it erroneously fires under various situations,
- // e.g. when placeholder changes, or a form is focused.
- if (event === 'input' && msie <= 11) return false;
-
- if (isUndefined(eventSupport[event])) {
- var divElm = document.createElement('div');
- eventSupport[event] = 'on' + event in divElm;
- }
-
- return eventSupport[event];
- },
- csp: csp(),
- vendorPrefix: vendorPrefix,
- transitions: transitions,
- animations: animations,
- android: android
- };
- }];
-}
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc service
- * @name $templateRequest
- *
- * @description
- * The `$templateRequest` service runs security checks then downloads the provided template using
- * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
- * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
- * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
- * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
- * when `tpl` is of type string and `$templateCache` has the matching entry.
- *
- * @param {string|TrustedResourceUrl} tpl The HTTP request template URL
- * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
- *
- * @return {Promise} a promise for the HTTP response data of the given URL.
- *
- * @property {number} totalPendingRequests total amount of pending template requests being downloaded.
- */
-function $TemplateRequestProvider() {
- this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {
- function handleRequestFn(tpl, ignoreRequestError) {
- handleRequestFn.totalPendingRequests++;
-
- // We consider the template cache holds only trusted templates, so
- // there's no need to go through whitelisting again for keys that already
- // are included in there. This also makes Angular accept any script
- // directive, no matter its name. However, we still need to unwrap trusted
- // types.
- if (!isString(tpl) || !$templateCache.get(tpl)) {
- tpl = $sce.getTrustedResourceUrl(tpl);
- }
-
- var transformResponse = $http.defaults && $http.defaults.transformResponse;
-
- if (isArray(transformResponse)) {
- transformResponse = transformResponse.filter(function(transformer) {
- return transformer !== defaultHttpResponseTransform;
- });
- } else if (transformResponse === defaultHttpResponseTransform) {
- transformResponse = null;
- }
-
- var httpOptions = {
- cache: $templateCache,
- transformResponse: transformResponse
- };
-
- return $http.get(tpl, httpOptions)
- ['finally'](function() {
- handleRequestFn.totalPendingRequests--;
- })
- .then(function(response) {
- $templateCache.put(tpl, response.data);
- return response.data;
- }, handleError);
-
- function handleError(resp) {
- if (!ignoreRequestError) {
- throw $compileMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})',
- tpl, resp.status, resp.statusText);
- }
- return $q.reject(resp);
- }
- }
-
- handleRequestFn.totalPendingRequests = 0;
-
- return handleRequestFn;
- }];
-}
-
-function $$TestabilityProvider() {
- this.$get = ['$rootScope', '$browser', '$location',
- function($rootScope, $browser, $location) {
-
- /**
- * @name $testability
- *
- * @description
- * The private $$testability service provides a collection of methods for use when debugging
- * or by automated test and debugging tools.
- */
- var testability = {};
-
- /**
- * @name $$testability#findBindings
- *
- * @description
- * Returns an array of elements that are bound (via ng-bind or {{}})
- * to expressions matching the input.
- *
- * @param {Element} element The element root to search from.
- * @param {string} expression The binding expression to match.
- * @param {boolean} opt_exactMatch If true, only returns exact matches
- * for the expression. Filters and whitespace are ignored.
- */
- testability.findBindings = function(element, expression, opt_exactMatch) {
- var bindings = element.getElementsByClassName('ng-binding');
- var matches = [];
- forEach(bindings, function(binding) {
- var dataBinding = angular.element(binding).data('$binding');
- if (dataBinding) {
- forEach(dataBinding, function(bindingName) {
- if (opt_exactMatch) {
- var matcher = new RegExp('(^|\\s)' + escapeForRegexp(expression) + '(\\s|\\||$)');
- if (matcher.test(bindingName)) {
- matches.push(binding);
- }
- } else {
- if (bindingName.indexOf(expression) != -1) {
- matches.push(binding);
- }
- }
- });
- }
- });
- return matches;
- };
-
- /**
- * @name $$testability#findModels
- *
- * @description
- * Returns an array of elements that are two-way found via ng-model to
- * expressions matching the input.
- *
- * @param {Element} element The element root to search from.
- * @param {string} expression The model expression to match.
- * @param {boolean} opt_exactMatch If true, only returns exact matches
- * for the expression.
- */
- testability.findModels = function(element, expression, opt_exactMatch) {
- var prefixes = ['ng-', 'data-ng-', 'ng\\:'];
- for (var p = 0; p < prefixes.length; ++p) {
- var attributeEquals = opt_exactMatch ? '=' : '*=';
- var selector = '[' + prefixes[p] + 'model' + attributeEquals + '"' + expression + '"]';
- var elements = element.querySelectorAll(selector);
- if (elements.length) {
- return elements;
- }
- }
- };
-
- /**
- * @name $$testability#getLocation
- *
- * @description
- * Shortcut for getting the location in a browser agnostic way. Returns
- * the path, search, and hash. (e.g. /path?a=b#hash)
- */
- testability.getLocation = function() {
- return $location.url();
- };
-
- /**
- * @name $$testability#setLocation
- *
- * @description
- * Shortcut for navigating to a location without doing a full page reload.
- *
- * @param {string} url The location url (path, search and hash,
- * e.g. /path?a=b#hash) to go to.
- */
- testability.setLocation = function(url) {
- if (url !== $location.url()) {
- $location.url(url);
- $rootScope.$digest();
- }
- };
-
- /**
- * @name $$testability#whenStable
- *
- * @description
- * Calls the callback when $timeout and $http requests are completed.
- *
- * @param {function} callback
- */
- testability.whenStable = function(callback) {
- $browser.notifyWhenNoOutstandingRequests(callback);
- };
-
- return testability;
- }];
-}
-
-function $TimeoutProvider() {
- this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',
- function($rootScope, $browser, $q, $$q, $exceptionHandler) {
-
- var deferreds = {};
-
-
- /**
- * @ngdoc service
- * @name $timeout
- *
- * @description
- * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch
- * block and delegates any exceptions to
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * The return value of calling `$timeout` is a promise, which will be resolved when
- * the delay has passed and the timeout function, if provided, is executed.
- *
- * To cancel a timeout request, call `$timeout.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to
- * synchronously flush the queue of deferred functions.
- *
- * If you only want a promise that will be resolved after some specified delay
- * then you can call `$timeout` without the `fn` function.
- *
- * @param {function()=} fn A function, whose execution should be delayed.
- * @param {number=} [delay=0] Delay in milliseconds.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this
- * promise will be resolved with is the return value of the `fn` function.
- *
- */
- function timeout(fn, delay, invokeApply) {
- if (!isFunction(fn)) {
- invokeApply = delay;
- delay = fn;
- fn = noop;
- }
-
- var args = sliceArgs(arguments, 3),
- skipApply = (isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise,
- timeoutId;
-
- timeoutId = $browser.defer(function() {
- try {
- deferred.resolve(fn.apply(null, args));
- } catch (e) {
- deferred.reject(e);
- $exceptionHandler(e);
- }
- finally {
- delete deferreds[promise.$$timeoutId];
- }
-
- if (!skipApply) $rootScope.$apply();
- }, delay);
-
- promise.$$timeoutId = timeoutId;
- deferreds[timeoutId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $timeout#cancel
- *
- * @description
- * Cancels a task associated with the `promise`. As a result of this, the promise will be
- * resolved with a rejection.
- *
- * @param {Promise=} promise Promise returned by the `$timeout` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- timeout.cancel = function(promise) {
- if (promise && promise.$$timeoutId in deferreds) {
- deferreds[promise.$$timeoutId].reject('canceled');
- delete deferreds[promise.$$timeoutId];
- return $browser.defer.cancel(promise.$$timeoutId);
- }
- return false;
- };
-
- return timeout;
- }];
-}
-
-// NOTE: The usage of window and document instead of $window and $document here is
-// deliberate. This service depends on the specific behavior of anchor nodes created by the
-// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and
-// cause us to break tests. In addition, when the browser resolves a URL for XHR, it
-// doesn't know about mocked locations and resolves URLs to the real document - which is
-// exactly the behavior needed here. There is little value is mocking these out for this
-// service.
-var urlParsingNode = document.createElement("a");
-var originUrl = urlResolve(window.location.href);
-
-
-/**
- *
- * Implementation Notes for non-IE browsers
- * ----------------------------------------
- * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,
- * results both in the normalizing and parsing of the URL. Normalizing means that a relative
- * URL will be resolved into an absolute URL in the context of the application document.
- * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related
- * properties are all populated to reflect the normalized URL. This approach has wide
- * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- *
- * Implementation Notes for IE
- * ---------------------------
- * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other
- * browsers. However, the parsed components will not be set if the URL assigned did not specify
- * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We
- * work around that by performing the parsing in a 2nd step by taking a previously normalized
- * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the
- * properties such as protocol, hostname, port, etc.
- *
- * References:
- * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- * http://url.spec.whatwg.org/#urlutils
- * https://github.com/angular/angular.js/pull/2902
- * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/
- *
- * @kind function
- * @param {string} url The URL to be parsed.
- * @description Normalizes and parses a URL.
- * @returns {object} Returns the normalized URL as a dictionary.
- *
- * | member name | Description |
- * |---------------|----------------|
- * | href | A normalized version of the provided URL if it was not an absolute URL |
- * | protocol | The protocol including the trailing colon |
- * | host | The host and port (if the port is non-default) of the normalizedUrl |
- * | search | The search params, minus the question mark |
- * | hash | The hash string, minus the hash symbol
- * | hostname | The hostname
- * | port | The port, without ":"
- * | pathname | The pathname, beginning with "/"
- *
- */
-function urlResolve(url) {
- var href = url;
-
- if (msie) {
- // Normalize before parse. Refer Implementation Notes on why this is
- // done in two steps on IE.
- urlParsingNode.setAttribute("href", href);
- href = urlParsingNode.href;
- }
-
- urlParsingNode.setAttribute('href', href);
-
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: (urlParsingNode.pathname.charAt(0) === '/')
- ? urlParsingNode.pathname
- : '/' + urlParsingNode.pathname
- };
-}
-
-/**
- * Parse a request URL and determine whether this is a same-origin request as the application document.
- *
- * @param {string|object} requestUrl The url of the request as a string that will be resolved
- * or a parsed URL object.
- * @returns {boolean} Whether the request is for the same origin as the application document.
- */
-function urlIsSameOrigin(requestUrl) {
- var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
- return (parsed.protocol === originUrl.protocol &&
- parsed.host === originUrl.host);
-}
-
-/**
- * @ngdoc service
- * @name $window
- *
- * @description
- * A reference to the browser's `window` object. While `window`
- * is globally available in JavaScript, it causes testability problems, because
- * it is a global variable. In angular we always refer to it through the
- * `$window` service, so it may be overridden, removed or mocked for testing.
- *
- * Expressions, like the one defined for the `ngClick` directive in the example
- * below, are evaluated with respect to the current scope. Therefore, there is
- * no risk of inadvertently coding in a dependency on a global value in such an
- * expression.
- *
- * @example
- <example module="windowExample">
- <file name="index.html">
- <script>
- angular.module('windowExample', [])
- .controller('ExampleController', ['$scope', '$window', function($scope, $window) {
- $scope.greeting = 'Hello, World!';
- $scope.doGreeting = function(greeting) {
- $window.alert(greeting);
- };
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="text" ng-model="greeting" aria-label="greeting" />
- <button ng-click="doGreeting(greeting)">ALERT</button>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should display the greeting in the input box', function() {
- element(by.model('greeting')).sendKeys('Hello, E2E Tests');
- // If we click the button it will block the test runner
- // element(':button').click();
- });
- </file>
- </example>
- */
-function $WindowProvider() {
- this.$get = valueFn(window);
-}
-
-/**
- * @name $$cookieReader
- * @requires $document
- *
- * @description
- * This is a private service for reading cookies used by $http and ngCookies
- *
- * @return {Object} a key/value map of the current cookies
- */
-function $$CookieReader($document) {
- var rawDocument = $document[0] || {};
- var lastCookies = {};
- var lastCookieString = '';
-
- function safeDecodeURIComponent(str) {
- try {
- return decodeURIComponent(str);
- } catch (e) {
- return str;
- }
- }
-
- return function() {
- var cookieArray, cookie, i, index, name;
- var currentCookieString = rawDocument.cookie || '';
-
- if (currentCookieString !== lastCookieString) {
- lastCookieString = currentCookieString;
- cookieArray = lastCookieString.split('; ');
- lastCookies = {};
-
- for (i = 0; i < cookieArray.length; i++) {
- cookie = cookieArray[i];
- index = cookie.indexOf('=');
- if (index > 0) { //ignore nameless cookies
- name = safeDecodeURIComponent(cookie.substring(0, index));
- // the first value that is seen for a cookie is the most
- // specific one. values for the same cookie name that
- // follow are for less specific paths.
- if (isUndefined(lastCookies[name])) {
- lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));
- }
- }
- }
- }
- return lastCookies;
- };
-}
-
-$$CookieReader.$inject = ['$document'];
-
-function $$CookieReaderProvider() {
- this.$get = $$CookieReader;
-}
-
-/* global currencyFilter: true,
- dateFilter: true,
- filterFilter: true,
- jsonFilter: true,
- limitToFilter: true,
- lowercaseFilter: true,
- numberFilter: true,
- orderByFilter: true,
- uppercaseFilter: true,
- */
-
-/**
- * @ngdoc provider
- * @name $filterProvider
- * @description
- *
- * Filters are just functions which transform input to an output. However filters need to be
- * Dependency Injected. To achieve this a filter definition consists of a factory function which is
- * annotated with dependencies and is responsible for creating a filter function.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- *
- * ```js
- * // Filter registration
- * function MyModule($provide, $filterProvider) {
- * // create a service to demonstrate injection (not always needed)
- * $provide.value('greet', function(name){
- * return 'Hello ' + name + '!';
- * });
- *
- * // register a filter factory which uses the
- * // greet service to demonstrate DI.
- * $filterProvider.register('greet', function(greet){
- * // return the filter function which uses the greet service
- * // to generate salutation
- * return function(text) {
- * // filters need to be forgiving so check input validity
- * return text && greet(text) || text;
- * };
- * });
- * }
- * ```
- *
- * The filter function is registered with the `$injector` under the filter name suffix with
- * `Filter`.
- *
- * ```js
- * it('should be the same instance', inject(
- * function($filterProvider) {
- * $filterProvider.register('reverse', function(){
- * return ...;
- * });
- * },
- * function($filter, reverseFilter) {
- * expect($filter('reverse')).toBe(reverseFilter);
- * });
- * ```
- *
- *
- * For more information about how angular filters work, and how to create your own filters, see
- * {@link guide/filter Filters} in the Angular Developer Guide.
- */
-
-/**
- * @ngdoc service
- * @name $filter
- * @kind function
- * @description
- * Filters are used for formatting data displayed to the user.
- *
- * The general syntax in templates is as follows:
- *
- * {{ expression [| filter_name[:parameter_value] ... ] }}
- *
- * @param {String} name Name of the filter function to retrieve
- * @return {Function} the filter function
- * @example
- <example name="$filter" module="filterExample">
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <h3>{{ originalText }}</h3>
- <h3>{{ filteredText }}</h3>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('filterExample', [])
- .controller('MainCtrl', function($scope, $filter) {
- $scope.originalText = 'hello';
- $scope.filteredText = $filter('uppercase')($scope.originalText);
- });
- </file>
- </example>
- */
-$FilterProvider.$inject = ['$provide'];
-function $FilterProvider($provide) {
- var suffix = 'Filter';
-
- /**
- * @ngdoc method
- * @name $filterProvider#register
- * @param {string|Object} name Name of the filter function, or an object map of filters where
- * the keys are the filter names and the values are the filter factories.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.
- * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
- * of the registered filter instances.
- */
- function register(name, factory) {
- if (isObject(name)) {
- var filters = {};
- forEach(name, function(filter, key) {
- filters[key] = register(key, filter);
- });
- return filters;
- } else {
- return $provide.factory(name + suffix, factory);
- }
- }
- this.register = register;
-
- this.$get = ['$injector', function($injector) {
- return function(name) {
- return $injector.get(name + suffix);
- };
- }];
-
- ////////////////////////////////////////
-
- /* global
- currencyFilter: false,
- dateFilter: false,
- filterFilter: false,
- jsonFilter: false,
- limitToFilter: false,
- lowercaseFilter: false,
- numberFilter: false,
- orderByFilter: false,
- uppercaseFilter: false,
- */
-
- register('currency', currencyFilter);
- register('date', dateFilter);
- register('filter', filterFilter);
- register('json', jsonFilter);
- register('limitTo', limitToFilter);
- register('lowercase', lowercaseFilter);
- register('number', numberFilter);
- register('orderBy', orderByFilter);
- register('uppercase', uppercaseFilter);
-}
-
-/**
- * @ngdoc filter
- * @name filter
- * @kind function
- *
- * @description
- * Selects a subset of items from `array` and returns it as a new array.
- *
- * @param {Array} array The source array.
- * @param {string|Object|function()} expression The predicate to be used for selecting items from
- * `array`.
- *
- * Can be one of:
- *
- * - `string`: The string is used for matching against the contents of the `array`. All strings or
- * objects with string properties in `array` that match this string will be returned. This also
- * applies to nested object properties.
- * The predicate can be negated by prefixing the string with `!`.
- *
- * - `Object`: A pattern object can be used to filter specific properties on objects contained
- * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
- * which have property `name` containing "M" and property `phone` containing "1". A special
- * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
- * property of the object or its nested object properties. That's equivalent to the simple
- * substring match with a `string` as described above. The predicate can be negated by prefixing
- * the string with `!`.
- * For example `{name: "!M"}` predicate will return an array of items which have property `name`
- * not containing "M".
- *
- * Note that a named property will match properties on the same level only, while the special
- * `$` property will match properties on the same level or deeper. E.g. an array item like
- * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but
- * **will** be matched by `{$: 'John'}`.
- *
- * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.
- * The function is called for each element of the array, with the element, its index, and
- * the entire array itself as arguments.
- *
- * The final result is an array of those elements that the predicate returned true for.
- *
- * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
- * determining if the expected value (from the filter expression) and actual value (from
- * the object in the array) should be considered a match.
- *
- * Can be one of:
- *
- * - `function(actual, expected)`:
- * The function will be given the object value and the predicate value to compare and
- * should return true if both values should be considered equal.
- *
- * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.
- * This is essentially strict comparison of expected and actual.
- *
- * - `false|undefined`: A short hand for a function which will look for a substring match in case
- * insensitive way.
- *
- * Primitive values are converted to strings. Objects are not compared against primitives,
- * unless they have a custom `toString` method (e.g. `Date` objects).
- *
- * @example
- <example>
- <file name="index.html">
- <div ng-init="friends = [{name:'John', phone:'555-1276'},
- {name:'Mary', phone:'800-BIG-MARY'},
- {name:'Mike', phone:'555-4321'},
- {name:'Adam', phone:'555-5678'},
- {name:'Julie', phone:'555-8765'},
- {name:'Juliette', phone:'555-5678'}]"></div>
-
- <label>Search: <input ng-model="searchText"></label>
- <table id="searchTextResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friend in friends | filter:searchText">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- </tr>
- </table>
- <hr>
- <label>Any: <input ng-model="search.$"></label> <br>
- <label>Name only <input ng-model="search.name"></label><br>
- <label>Phone only <input ng-model="search.phone"></label><br>
- <label>Equality <input type="checkbox" ng-model="strict"></label><br>
- <table id="searchObjResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friendObj in friends | filter:search:strict">
- <td>{{friendObj.name}}</td>
- <td>{{friendObj.phone}}</td>
- </tr>
- </table>
- </file>
- <file name="protractor.js" type="protractor">
- var expectFriendNames = function(expectedNames, key) {
- element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {
- arr.forEach(function(wd, i) {
- expect(wd.getText()).toMatch(expectedNames[i]);
- });
- });
- };
-
- it('should search across all fields when filtering with a string', function() {
- var searchText = element(by.model('searchText'));
- searchText.clear();
- searchText.sendKeys('m');
- expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');
-
- searchText.clear();
- searchText.sendKeys('76');
- expectFriendNames(['John', 'Julie'], 'friend');
- });
-
- it('should search in specific fields when filtering with a predicate object', function() {
- var searchAny = element(by.model('search.$'));
- searchAny.clear();
- searchAny.sendKeys('i');
- expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');
- });
- it('should use a equal comparison when comparator is true', function() {
- var searchName = element(by.model('search.name'));
- var strict = element(by.model('strict'));
- searchName.clear();
- searchName.sendKeys('Julie');
- strict.click();
- expectFriendNames(['Julie'], 'friendObj');
- });
- </file>
- </example>
- */
-function filterFilter() {
- return function(array, expression, comparator) {
- if (!isArrayLike(array)) {
- if (array == null) {
- return array;
- } else {
- throw minErr('filter')('notarray', 'Expected array but received: {0}', array);
- }
- }
-
- var expressionType = getTypeForFilter(expression);
- var predicateFn;
- var matchAgainstAnyProp;
-
- switch (expressionType) {
- case 'function':
- predicateFn = expression;
- break;
- case 'boolean':
- case 'null':
- case 'number':
- case 'string':
- matchAgainstAnyProp = true;
- //jshint -W086
- case 'object':
- //jshint +W086
- predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
- break;
- default:
- return array;
- }
-
- return Array.prototype.filter.call(array, predicateFn);
- };
-}
-
-// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
- var predicateFn;
-
- if (comparator === true) {
- comparator = equals;
- } else if (!isFunction(comparator)) {
- comparator = function(actual, expected) {
- if (isUndefined(actual)) {
- // No substring matching against `undefined`
- return false;
- }
- if ((actual === null) || (expected === null)) {
- // No substring matching against `null`; only match against `null`
- return actual === expected;
- }
- if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {
- // Should not compare primitives against objects, unless they have custom `toString` method
- return false;
- }
-
- actual = lowercase('' + actual);
- expected = lowercase('' + expected);
- return actual.indexOf(expected) !== -1;
- };
- }
-
- predicateFn = function(item) {
- if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression.$, comparator, false);
- }
- return deepCompare(item, expression, comparator, matchAgainstAnyProp);
- };
-
- return predicateFn;
-}
-
-function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
- var actualType = getTypeForFilter(actual);
- var expectedType = getTypeForFilter(expected);
-
- if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
- } else if (isArray(actual)) {
- // In case `actual` is an array, consider it a match
- // if ANY of it's items matches `expected`
- return actual.some(function(item) {
- return deepCompare(item, expected, comparator, matchAgainstAnyProp);
- });
- }
-
- switch (actualType) {
- case 'object':
- var key;
- if (matchAgainstAnyProp) {
- for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
- return true;
- }
- }
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
- } else if (expectedType === 'object') {
- for (key in expected) {
- var expectedVal = expected[key];
- if (isFunction(expectedVal) || isUndefined(expectedVal)) {
- continue;
- }
-
- var matchAnyProperty = key === '$';
- var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
- return false;
- }
- }
- return true;
- } else {
- return comparator(actual, expected);
- }
- break;
- case 'function':
- return false;
- default:
- return comparator(actual, expected);
- }
-}
-
-// Used for easily differentiating between `null` and actual `object`
-function getTypeForFilter(val) {
- return (val === null) ? 'null' : typeof val;
-}
-
-/**
- * @ngdoc filter
- * @name currency
- * @kind function
- *
- * @description
- * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default
- * symbol for current locale is used.
- *
- * @param {number} amount Input to filter.
- * @param {string=} symbol Currency symbol or identifier to be displayed.
- * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
- * @returns {string} Formatted number.
- *
- *
- * @example
- <example module="currencyExample">
- <file name="index.html">
- <script>
- angular.module('currencyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.amount = 1234.56;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="number" ng-model="amount" aria-label="amount"> <br>
- default currency symbol ($): <span id="currency-default">{{amount | currency}}</span><br>
- custom currency identifier (USD$): <span id="currency-custom">{{amount | currency:"USD$"}}</span>
- no fractions (0): <span id="currency-no-fractions">{{amount | currency:"USD$":0}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should init with 1234.56', function() {
- expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');
- expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');
- expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');
- });
- it('should update', function() {
- if (browser.params.browser == 'safari') {
- // Safari does not understand the minus key. See
- // https://github.com/angular/protractor/issues/481
- return;
- }
- element(by.model('amount')).clear();
- element(by.model('amount')).sendKeys('-1234');
- expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');
- expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');
- expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');
- });
- </file>
- </example>
- */
-currencyFilter.$inject = ['$locale'];
-function currencyFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(amount, currencySymbol, fractionSize) {
- if (isUndefined(currencySymbol)) {
- currencySymbol = formats.CURRENCY_SYM;
- }
-
- if (isUndefined(fractionSize)) {
- fractionSize = formats.PATTERNS[1].maxFrac;
- }
-
- // if null or undefined pass it through
- return (amount == null)
- ? amount
- : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).
- replace(/\u00A4/g, currencySymbol);
- };
-}
-
-/**
- * @ngdoc filter
- * @name number
- * @kind function
- *
- * @description
- * Formats a number as text.
- *
- * If the input is null or undefined, it will just be returned.
- * If the input is infinite (Infinity/-Infinity) the Infinity symbol '∞' is returned.
- * If the input is not a number an empty string is returned.
- *
- *
- * @param {number|string} number Number to format.
- * @param {(number|string)=} fractionSize Number of decimal places to round the number to.
- * If this is not provided then the fraction size is computed from the current locale's number
- * formatting pattern. In the case of the default locale, it will be 3.
- * @returns {string} Number rounded to decimalPlaces and places a “,†after each third digit.
- *
- * @example
- <example module="numberFilterExample">
- <file name="index.html">
- <script>
- angular.module('numberFilterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = 1234.56789;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Enter number: <input ng-model='val'></label><br>
- Default formatting: <span id='number-default'>{{val | number}}</span><br>
- No fractions: <span>{{val | number:0}}</span><br>
- Negative number: <span>{{-val | number:4}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format numbers', function() {
- expect(element(by.id('number-default')).getText()).toBe('1,234.568');
- expect(element(by.binding('val | number:0')).getText()).toBe('1,235');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');
- });
-
- it('should update', function() {
- element(by.model('val')).clear();
- element(by.model('val')).sendKeys('3374.333');
- expect(element(by.id('number-default')).getText()).toBe('3,374.333');
- expect(element(by.binding('val | number:0')).getText()).toBe('3,374');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');
- });
- </file>
- </example>
- */
-
-
-numberFilter.$inject = ['$locale'];
-function numberFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(number, fractionSize) {
-
- // if null or undefined pass it through
- return (number == null)
- ? number
- : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,
- fractionSize);
- };
-}
-
-var DECIMAL_SEP = '.';
-function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
- if (isObject(number)) return '';
-
- var isNegative = number < 0;
- number = Math.abs(number);
-
- var isInfinity = number === Infinity;
- if (!isInfinity && !isFinite(number)) return '';
-
- var numStr = number + '',
- formatedText = '',
- hasExponent = false,
- parts = [];
-
- if (isInfinity) formatedText = '\u221e';
-
- if (!isInfinity && numStr.indexOf('e') !== -1) {
- var match = numStr.match(/([\d\.]+)e(-?)(\d+)/);
- if (match && match[2] == '-' && match[3] > fractionSize + 1) {
- number = 0;
- } else {
- formatedText = numStr;
- hasExponent = true;
- }
- }
-
- if (!isInfinity && !hasExponent) {
- var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;
-
- // determine fractionSize if it is not specified
- if (isUndefined(fractionSize)) {
- fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);
- }
-
- // safely round numbers in JS without hitting imprecisions of floating-point arithmetics
- // inspired by:
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
- number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);
-
- var fraction = ('' + number).split(DECIMAL_SEP);
- var whole = fraction[0];
- fraction = fraction[1] || '';
-
- var i, pos = 0,
- lgroup = pattern.lgSize,
- group = pattern.gSize;
-
- if (whole.length >= (lgroup + group)) {
- pos = whole.length - lgroup;
- for (i = 0; i < pos; i++) {
- if ((pos - i) % group === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
- }
-
- for (i = pos; i < whole.length; i++) {
- if ((whole.length - i) % lgroup === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
-
- // format fraction part.
- while (fraction.length < fractionSize) {
- fraction += '0';
- }
-
- if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize);
- } else {
- if (fractionSize > 0 && number < 1) {
- formatedText = number.toFixed(fractionSize);
- number = parseFloat(formatedText);
- formatedText = formatedText.replace(DECIMAL_SEP, decimalSep);
- }
- }
-
- if (number === 0) {
- isNegative = false;
- }
-
- parts.push(isNegative ? pattern.negPre : pattern.posPre,
- formatedText,
- isNegative ? pattern.negSuf : pattern.posSuf);
- return parts.join('');
-}
-
-function padNumber(num, digits, trim) {
- var neg = '';
- if (num < 0) {
- neg = '-';
- num = -num;
- }
- num = '' + num;
- while (num.length < digits) num = '0' + num;
- if (trim) {
- num = num.substr(num.length - digits);
- }
- return neg + num;
-}
-
-
-function dateGetter(name, size, offset, trim) {
- offset = offset || 0;
- return function(date) {
- var value = date['get' + name]();
- if (offset > 0 || value > -offset) {
- value += offset;
- }
- if (value === 0 && offset == -12) value = 12;
- return padNumber(value, size, trim);
- };
-}
-
-function dateStrGetter(name, shortForm) {
- return function(date, formats) {
- var value = date['get' + name]();
- var get = uppercase(shortForm ? ('SHORT' + name) : name);
-
- return formats[get][value];
- };
-}
-
-function timeZoneGetter(date, formats, offset) {
- var zone = -1 * offset;
- var paddedZone = (zone >= 0) ? "+" : "";
-
- paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +
- padNumber(Math.abs(zone % 60), 2);
-
- return paddedZone;
-}
-
-function getFirstThursdayOfYear(year) {
- // 0 = index of January
- var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();
- // 4 = index of Thursday (+1 to account for 1st = 5)
- // 11 = index of *next* Thursday (+1 account for 1st = 12)
- return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);
-}
-
-function getThursdayThisWeek(datetime) {
- return new Date(datetime.getFullYear(), datetime.getMonth(),
- // 4 = index of Thursday
- datetime.getDate() + (4 - datetime.getDay()));
-}
-
-function weekGetter(size) {
- return function(date) {
- var firstThurs = getFirstThursdayOfYear(date.getFullYear()),
- thisThurs = getThursdayThisWeek(date);
-
- var diff = +thisThurs - +firstThurs,
- result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week
-
- return padNumber(result, size);
- };
-}
-
-function ampmGetter(date, formats) {
- return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
-}
-
-function eraGetter(date, formats) {
- return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];
-}
-
-function longEraGetter(date, formats) {
- return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];
-}
-
-var DATE_FORMATS = {
- yyyy: dateGetter('FullYear', 4),
- yy: dateGetter('FullYear', 2, 0, true),
- y: dateGetter('FullYear', 1),
- MMMM: dateStrGetter('Month'),
- MMM: dateStrGetter('Month', true),
- MM: dateGetter('Month', 2, 1),
- M: dateGetter('Month', 1, 1),
- dd: dateGetter('Date', 2),
- d: dateGetter('Date', 1),
- HH: dateGetter('Hours', 2),
- H: dateGetter('Hours', 1),
- hh: dateGetter('Hours', 2, -12),
- h: dateGetter('Hours', 1, -12),
- mm: dateGetter('Minutes', 2),
- m: dateGetter('Minutes', 1),
- ss: dateGetter('Seconds', 2),
- s: dateGetter('Seconds', 1),
- // while ISO 8601 requires fractions to be prefixed with `.` or `,`
- // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions
- sss: dateGetter('Milliseconds', 3),
- EEEE: dateStrGetter('Day'),
- EEE: dateStrGetter('Day', true),
- a: ampmGetter,
- Z: timeZoneGetter,
- ww: weekGetter(2),
- w: weekGetter(1),
- G: eraGetter,
- GG: eraGetter,
- GGG: eraGetter,
- GGGG: longEraGetter
-};
-
-var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,
- NUMBER_STRING = /^\-?\d+$/;
-
-/**
- * @ngdoc filter
- * @name date
- * @kind function
- *
- * @description
- * Formats `date` to a string based on the requested `format`.
- *
- * `format` string can be composed of the following elements:
- *
- * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
- * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
- * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
- * * `'MMMM'`: Month in year (January-December)
- * * `'MMM'`: Month in year (Jan-Dec)
- * * `'MM'`: Month in year, padded (01-12)
- * * `'M'`: Month in year (1-12)
- * * `'dd'`: Day in month, padded (01-31)
- * * `'d'`: Day in month (1-31)
- * * `'EEEE'`: Day in Week,(Sunday-Saturday)
- * * `'EEE'`: Day in Week, (Sun-Sat)
- * * `'HH'`: Hour in day, padded (00-23)
- * * `'H'`: Hour in day (0-23)
- * * `'hh'`: Hour in AM/PM, padded (01-12)
- * * `'h'`: Hour in AM/PM, (1-12)
- * * `'mm'`: Minute in hour, padded (00-59)
- * * `'m'`: Minute in hour (0-59)
- * * `'ss'`: Second in minute, padded (00-59)
- * * `'s'`: Second in minute (0-59)
- * * `'sss'`: Millisecond in second, padded (000-999)
- * * `'a'`: AM/PM marker
- * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
- * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
- * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
- * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')
- * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')
- *
- * `format` string can also be one of the following predefined
- * {@link guide/i18n localizable formats}:
- *
- * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
- * (e.g. Sep 3, 2010 12:05:08 PM)
- * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)
- * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale
- * (e.g. Friday, September 3, 2010)
- * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)
- * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)
- * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)
- * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)
- * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)
- *
- * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.
- * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence
- * (e.g. `"h 'o''clock'"`).
- *
- * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or
- * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its
- * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is
- * specified in the string input, the time is considered to be in the local timezone.
- * @param {string=} format Formatting rules (see Description). If not specified,
- * `mediumDate` is used.
- * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the
- * continental US time zone abbreviations, but for general use, use a time zone offset, for
- * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
- * If not specified, the timezone of the browser will be used.
- * @returns {string} Formatted string or the input if input is not recognized as date/millis.
- *
- * @example
- <example>
- <file name="index.html">
- <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:
- <span>{{1288323623006 | date:'medium'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:
- <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
- <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}</span>:
- <span>{{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}</span><br>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format date', function() {
- expect(element(by.binding("1288323623006 | date:'medium'")).getText()).
- toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/);
- expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()).
- toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/);
- expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).
- toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
- expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()).
- toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/);
- });
- </file>
- </example>
- */
-dateFilter.$inject = ['$locale'];
-function dateFilter($locale) {
-
-
- var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
- // 1 2 3 4 5 6 7 8 9 10 11
- function jsonStringToDate(string) {
- var match;
- if (match = string.match(R_ISO8601_STR)) {
- var date = new Date(0),
- tzHour = 0,
- tzMin = 0,
- dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,
- timeSetter = match[8] ? date.setUTCHours : date.setHours;
-
- if (match[9]) {
- tzHour = toInt(match[9] + match[10]);
- tzMin = toInt(match[9] + match[11]);
- }
- dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));
- var h = toInt(match[4] || 0) - tzHour;
- var m = toInt(match[5] || 0) - tzMin;
- var s = toInt(match[6] || 0);
- var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);
- timeSetter.call(date, h, m, s, ms);
- return date;
- }
- return string;
- }
-
-
- return function(date, format, timezone) {
- var text = '',
- parts = [],
- fn, match;
-
- format = format || 'mediumDate';
- format = $locale.DATETIME_FORMATS[format] || format;
- if (isString(date)) {
- date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);
- }
-
- if (isNumber(date)) {
- date = new Date(date);
- }
-
- if (!isDate(date) || !isFinite(date.getTime())) {
- return date;
- }
-
- while (format) {
- match = DATE_FORMATS_SPLIT.exec(format);
- if (match) {
- parts = concat(parts, match, 1);
- format = parts.pop();
- } else {
- parts.push(format);
- format = null;
- }
- }
-
- var dateTimezoneOffset = date.getTimezoneOffset();
- if (timezone) {
- dateTimezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
- date = convertTimezoneToLocal(date, timezone, true);
- }
- forEach(parts, function(value) {
- fn = DATE_FORMATS[value];
- text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)
- : value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
- });
-
- return text;
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name json
- * @kind function
- *
- * @description
- * Allows you to convert a JavaScript object into JSON string.
- *
- * This filter is mostly useful for debugging. When using the double curly {{value}} notation
- * the binding is automatically converted to JSON.
- *
- * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.
- * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.
- * @returns {string} JSON string.
- *
- *
- * @example
- <example>
- <file name="index.html">
- <pre id="default-spacing">{{ {'name':'value'} | json }}</pre>
- <pre id="custom-spacing">{{ {'name':'value'} | json:4 }}</pre>
- </file>
- <file name="protractor.js" type="protractor">
- it('should jsonify filtered objects', function() {
- expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- });
- </file>
- </example>
- *
- */
-function jsonFilter() {
- return function(object, spacing) {
- if (isUndefined(spacing)) {
- spacing = 2;
- }
- return toJson(object, spacing);
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name lowercase
- * @kind function
- * @description
- * Converts string to lowercase.
- * @see angular.lowercase
- */
-var lowercaseFilter = valueFn(lowercase);
-
-
-/**
- * @ngdoc filter
- * @name uppercase
- * @kind function
- * @description
- * Converts string to uppercase.
- * @see angular.uppercase
- */
-var uppercaseFilter = valueFn(uppercase);
-
-/**
- * @ngdoc filter
- * @name limitTo
- * @kind function
- *
- * @description
- * Creates a new array or string containing only a specified number of elements. The elements
- * are taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
- * converted to a string.
- *
- * @param {Array|string|number} input Source array, string or number to be limited.
- * @param {string|number} limit The length of the returned array or string. If the `limit` number
- * is positive, `limit` number of items from the beginning of the source array/string are copied.
- * If the number is negative, `limit` number of items from the end of the source array/string
- * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
- * the input will be returned unchanged.
- * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
- * indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
- * had less than `limit` elements.
- *
- * @example
- <example module="limitToExample">
- <file name="index.html">
- <script>
- angular.module('limitToExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.numbers = [1,2,3,4,5,6,7,8,9];
- $scope.letters = "abcdefghi";
- $scope.longNumber = 2345432342;
- $scope.numLimit = 3;
- $scope.letterLimit = 3;
- $scope.longNumberLimit = 3;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>
- Limit {{numbers}} to:
- <input type="number" step="1" ng-model="numLimit">
- </label>
- <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>
- <label>
- Limit {{letters}} to:
- <input type="number" step="1" ng-model="letterLimit">
- </label>
- <p>Output letters: {{ letters | limitTo:letterLimit }}</p>
- <label>
- Limit {{longNumber}} to:
- <input type="number" step="1" ng-model="longNumberLimit">
- </label>
- <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var numLimitInput = element(by.model('numLimit'));
- var letterLimitInput = element(by.model('letterLimit'));
- var longNumberLimitInput = element(by.model('longNumberLimit'));
- var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));
- var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));
- var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));
-
- it('should limit the number array to first three items', function() {
- expect(numLimitInput.getAttribute('value')).toBe('3');
- expect(letterLimitInput.getAttribute('value')).toBe('3');
- expect(longNumberLimitInput.getAttribute('value')).toBe('3');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');
- expect(limitedLetters.getText()).toEqual('Output letters: abc');
- expect(limitedLongNumber.getText()).toEqual('Output long number: 234');
- });
-
- // There is a bug in safari and protractor that doesn't like the minus key
- // it('should update the output when -3 is entered', function() {
- // numLimitInput.clear();
- // numLimitInput.sendKeys('-3');
- // letterLimitInput.clear();
- // letterLimitInput.sendKeys('-3');
- // longNumberLimitInput.clear();
- // longNumberLimitInput.sendKeys('-3');
- // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');
- // expect(limitedLetters.getText()).toEqual('Output letters: ghi');
- // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');
- // });
-
- it('should not exceed the maximum size of input array', function() {
- numLimitInput.clear();
- numLimitInput.sendKeys('100');
- letterLimitInput.clear();
- letterLimitInput.sendKeys('100');
- longNumberLimitInput.clear();
- longNumberLimitInput.sendKeys('100');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');
- expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');
- expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');
- });
- </file>
- </example>
-*/
-function limitToFilter() {
- return function(input, limit, begin) {
- if (Math.abs(Number(limit)) === Infinity) {
- limit = Number(limit);
- } else {
- limit = toInt(limit);
- }
- if (isNaN(limit)) return input;
-
- if (isNumber(input)) input = input.toString();
- if (!isArray(input) && !isString(input)) return input;
-
- begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
- begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
-
- if (limit >= 0) {
- return input.slice(begin, begin + limit);
- } else {
- if (begin === 0) {
- return input.slice(limit, input.length);
- } else {
- return input.slice(Math.max(0, begin + limit), begin);
- }
- }
- };
-}
-
-/**
- * @ngdoc filter
- * @name orderBy
- * @kind function
- *
- * @description
- * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
- * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
- * as expected, make sure they are actually being saved as numbers and not strings.
- *
- * @param {Array} array The array to sort.
- * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
- * used by the comparator to determine the order of elements.
- *
- * Can be one of:
- *
- * - `function`: Getter function. The result of this function will be sorted using the
- * `<`, `===`, `>` operator.
- * - `string`: An Angular expression. The result of this expression is used to compare elements
- * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
- * 3 first characters of a property called `name`). The result of a constant expression
- * is interpreted as a property name to be used in comparisons (for example `"special name"`
- * to sort object by the value of their `special name` property). An expression can be
- * optionally prefixed with `+` or `-` to control ascending or descending sort order
- * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
- * element itself is used to compare where sorting.
- * - `Array`: An array of function or string predicates. The first predicate in the array
- * is used for sorting, but when two items are equivalent, the next predicate is used.
- *
- * If the predicate is missing or empty then it defaults to `'+'`.
- *
- * @param {boolean=} reverse Reverse the order of the array.
- * @returns {Array} Sorted copy of the source array.
- *
- *
- * @example
- * The example below demonstrates a simple ngRepeat, where the data is sorted
- * by age in descending order (predicate is set to `'-age'`).
- * `reverse` is not set, which means it defaults to `false`.
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th>Name</th>
- <th>Phone Number</th>
- <th>Age</th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:'-age'">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * The predicate and reverse parameters can be controlled dynamically through scope properties,
- * as shown in the next example.
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- $scope.predicate = 'age';
- $scope.reverse = true;
- $scope.order = function(predicate) {
- $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
- $scope.predicate = predicate;
- };
- }]);
- </script>
- <style type="text/css">
- .sortorder:after {
- content: '\25b2';
- }
- .sortorder.reverse:after {
- content: '\25bc';
- }
- </style>
- <div ng-controller="ExampleController">
- <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>
- <hr/>
- [ <a href="" ng-click="predicate=''">unsorted</a> ]
- <table class="friend">
- <tr>
- <th>
- <a href="" ng-click="order('name')">Name</a>
- <span class="sortorder" ng-show="predicate === 'name'" ng-class="{reverse:reverse}"></span>
- </th>
- <th>
- <a href="" ng-click="order('phone')">Phone Number</a>
- <span class="sortorder" ng-show="predicate === 'phone'" ng-class="{reverse:reverse}"></span>
- </th>
- <th>
- <a href="" ng-click="order('age')">Age</a>
- <span class="sortorder" ng-show="predicate === 'age'" ng-class="{reverse:reverse}"></span>
- </th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:predicate:reverse">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the
- * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the
- * desired parameters.
- *
- * Example:
- *
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th><a href="" ng-click="reverse=false;order('name', false)">Name</a>
- (<a href="" ng-click="order('-name',false)">^</a>)</th>
- <th><a href="" ng-click="reverse=!reverse;order('phone', reverse)">Phone Number</a></th>
- <th><a href="" ng-click="reverse=!reverse;order('age',reverse)">Age</a></th>
- </tr>
- <tr ng-repeat="friend in friends">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
- var orderBy = $filter('orderBy');
- $scope.friends = [
- { name: 'John', phone: '555-1212', age: 10 },
- { name: 'Mary', phone: '555-9876', age: 19 },
- { name: 'Mike', phone: '555-4321', age: 21 },
- { name: 'Adam', phone: '555-5678', age: 35 },
- { name: 'Julie', phone: '555-8765', age: 29 }
- ];
- $scope.order = function(predicate, reverse) {
- $scope.friends = orderBy($scope.friends, predicate, reverse);
- };
- $scope.order('-age',false);
- }]);
- </file>
-</example>
- */
-orderByFilter.$inject = ['$parse'];
-function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder) {
-
- if (!(isArrayLike(array))) return array;
-
- if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
- if (sortPredicate.length === 0) { sortPredicate = ['+']; }
-
- var predicates = processPredicates(sortPredicate, reverseOrder);
- // Add a predicate at the end that evaluates to the element index. This makes the
- // sort stable as it works as a tie-breaker when all the input predicates cannot
- // distinguish between two elements.
- predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
-
- // The next three lines are a version of a Swartzian Transform idiom from Perl
- // (sometimes called the Decorate-Sort-Undecorate idiom)
- // See https://en.wikipedia.org/wiki/Schwartzian_transform
- var compareValues = Array.prototype.map.call(array, getComparisonObject);
- compareValues.sort(doComparison);
- array = compareValues.map(function(item) { return item.value; });
-
- return array;
-
- function getComparisonObject(value, index) {
- return {
- value: value,
- predicateValues: predicates.map(function(predicate) {
- return getPredicateValue(predicate.get(value), index);
- })
- };
- }
-
- function doComparison(v1, v2) {
- var result = 0;
- for (var index=0, length = predicates.length; index < length; ++index) {
- result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
- if (result) break;
- }
- return result;
- }
- };
-
- function processPredicates(sortPredicate, reverseOrder) {
- reverseOrder = reverseOrder ? -1 : 1;
- return sortPredicate.map(function(predicate) {
- var descending = 1, get = identity;
-
- if (isFunction(predicate)) {
- get = predicate;
- } else if (isString(predicate)) {
- if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {
- descending = predicate.charAt(0) == '-' ? -1 : 1;
- predicate = predicate.substring(1);
- }
- if (predicate !== '') {
- get = $parse(predicate);
- if (get.constant) {
- var key = get();
- get = function(value) { return value[key]; };
- }
- }
- }
- return { get: get, descending: descending * reverseOrder };
- });
- }
-
- function isPrimitive(value) {
- switch (typeof value) {
- case 'number': /* falls through */
- case 'boolean': /* falls through */
- case 'string':
- return true;
- default:
- return false;
- }
- }
-
- function objectValue(value, index) {
- // If `valueOf` is a valid function use that
- if (typeof value.valueOf === 'function') {
- value = value.valueOf();
- if (isPrimitive(value)) return value;
- }
- // If `toString` is a valid function and not the one from `Object.prototype` use that
- if (hasCustomToString(value)) {
- value = value.toString();
- if (isPrimitive(value)) return value;
- }
- // We have a basic object so we use the position of the object in the collection
- return index;
- }
-
- function getPredicateValue(value, index) {
- var type = typeof value;
- if (value === null) {
- type = 'string';
- value = 'null';
- } else if (type === 'string') {
- value = value.toLowerCase();
- } else if (type === 'object') {
- value = objectValue(value, index);
- }
- return { value: value, type: type };
- }
-
- function compare(v1, v2) {
- var result = 0;
- if (v1.type === v2.type) {
- if (v1.value !== v2.value) {
- result = v1.value < v2.value ? -1 : 1;
- }
- } else {
- result = v1.type < v2.type ? -1 : 1;
- }
- return result;
- }
-}
-
-function ngDirective(directive) {
- if (isFunction(directive)) {
- directive = {
- link: directive
- };
- }
- directive.restrict = directive.restrict || 'AC';
- return valueFn(directive);
-}
-
-/**
- * @ngdoc directive
- * @name a
- * @restrict E
- *
- * @description
- * Modifies the default behavior of the html A tag so that the default action is prevented when
- * the href attribute is empty.
- *
- * This change permits the easy creation of action links with the `ngClick` directive
- * without changing the location or causing page reloads, e.g.:
- * `<a href="" ng-click="list.addItem()">Add Item</a>`
- */
-var htmlAnchorDirective = valueFn({
- restrict: 'E',
- compile: function(element, attr) {
- if (!attr.href && !attr.xlinkHref) {
- return function(scope, element) {
- // If the linked element is not an anchor tag anymore, do nothing
- if (element[0].nodeName.toLowerCase() !== 'a') return;
-
- // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
- var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
- 'xlink:href' : 'href';
- element.on('click', function(event) {
- // if we have no href url, then don't navigate anywhere.
- if (!element.attr(href)) {
- event.preventDefault();
- }
- });
- };
- }
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngHref
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in an href attribute will
- * make the link go to the wrong URL if the user clicks it before
- * Angular has a chance to replace the `{{hash}}` markup with its
- * value. Until Angular replaces the markup the link will be broken
- * and will most likely return a 404 error. The `ngHref` directive
- * solves this problem.
- *
- * The wrong way to write it:
- * ```html
- * <a href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
- * ```
- *
- * @element A
- * @param {template} ngHref any string which can contain `{{}}` markup.
- *
- * @example
- * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes
- * in links and their different behaviors:
- <example>
- <file name="index.html">
- <input ng-model="value" /><br />
- <a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
- <a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
- <a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br />
- <a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br />
- <a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br />
- <a id="link-6" ng-href="{{value}}">link</a> (link, change location)
- </file>
- <file name="protractor.js" type="protractor">
- it('should execute ng-click but not reload when href without value', function() {
- element(by.id('link-1')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('1');
- expect(element(by.id('link-1')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when href empty string', function() {
- element(by.id('link-2')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('2');
- expect(element(by.id('link-2')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click and change url when ng-href specified', function() {
- expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/);
-
- element(by.id('link-3')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
-
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/123$/);
- });
- }, 5000, 'page should navigate to /123');
- });
-
- it('should execute ng-click but not reload when href empty string and name specified', function() {
- element(by.id('link-4')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('4');
- expect(element(by.id('link-4')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when no href but name specified', function() {
- element(by.id('link-5')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('5');
- expect(element(by.id('link-5')).getAttribute('href')).toBe(null);
- });
-
- it('should only change url when only ng-href', function() {
- element(by.model('value')).clear();
- element(by.model('value')).sendKeys('6');
- expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);
-
- element(by.id('link-6')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/6$/);
- });
- }, 5000, 'page should navigate to /6');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngSrc
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `src` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrc` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img src="http://www.gravatar.com/avatar/{{hash}}" alt="Description"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-src="http://www.gravatar.com/avatar/{{hash}}" alt="Description" />
- * ```
- *
- * @element IMG
- * @param {template} ngSrc any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngSrcset
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrcset` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description" />
- * ```
- *
- * @element IMG
- * @param {template} ngSrcset any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngDisabled
- * @restrict A
- * @priority 100
- *
- * @description
- *
- * This directive sets the `disabled` attribute on the element if the
- * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.
- *
- * A special directive is necessary because we cannot use interpolation inside the `disabled`
- * attribute. The following example would make the button enabled on Chrome/Firefox
- * but not on older IEs:
- *
- * ```html
- * <!-- See below for an example of ng-disabled being used correctly -->
- * <div ng-init="isDisabled = false">
- * <button disabled="{{isDisabled}}">Disabled</button>
- * </div>
- * ```
- *
- * This is because the HTML specification does not require browsers to preserve the values of
- * boolean attributes such as `disabled` (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- *
- * @example
- <example>
- <file name="index.html">
- <label>Click me to toggle: <input type="checkbox" ng-model="checked"></label><br/>
- <button ng-model="button" ng-disabled="checked">Button</button>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle button', function() {
- expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
- * then the `disabled` attribute will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngChecked
- * @restrict A
- * @priority 100
- *
- * @description
- * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.
- *
- * Note that this directive should not be used together with {@link ngModel `ngModel`},
- * as this can lead to unexpected behavior.
- *
- * ### Why do we need `ngChecked`?
- *
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as checked. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngChecked` directive solves this problem for the `checked` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me to check both: <input type="checkbox" ng-model="master"></label><br/>
- <input id="checkSlave" type="checkbox" ng-checked="master" aria-label="Slave input">
- </file>
- <file name="protractor.js" type="protractor">
- it('should check both checkBoxes', function() {
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();
- element(by.model('master')).click();
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
- * then the `checked` attribute will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngReadonly
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as readonly. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngReadonly` directive solves this problem for the `readonly` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me to make text readonly: <input type="checkbox" ng-model="checked"></label><br/>
- <input type="text" ng-readonly="checked" value="I'm Angular" aria-label="Readonly field" />
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle readonly attr', function() {
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,
- * then special attribute "readonly" will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSelected
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as selected. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngSelected` directive solves this problem for the `selected` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- *
- * @example
- <example>
- <file name="index.html">
- <label>Check me to select: <input type="checkbox" ng-model="selected"></label><br/>
- <select aria-label="ngSelected demo">
- <option>Hello!</option>
- <option id="greet" ng-selected="selected">Greetings!</option>
- </select>
- </file>
- <file name="protractor.js" type="protractor">
- it('should select Greetings!', function() {
- expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();
- element(by.model('selected')).click();
- expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element OPTION
- * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,
- * then special attribute "selected" will be set on the element
- */
-
-/**
- * @ngdoc directive
- * @name ngOpen
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as open. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngOpen` directive solves this problem for the `open` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me check multiple: <input type="checkbox" ng-model="open"></label><br/>
- <details id="details" ng-open="open">
- <summary>Show/Hide me</summary>
- </details>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle open', function() {
- expect(element(by.id('details')).getAttribute('open')).toBeFalsy();
- element(by.model('open')).click();
- expect(element(by.id('details')).getAttribute('open')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element DETAILS
- * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,
- * then special attribute "open" will be set on the element
- */
-
-var ngAttributeAliasDirectives = {};
-
-// boolean attrs are evaluated
-forEach(BOOLEAN_ATTR, function(propName, attrName) {
- // binding to multiple is not supported
- if (propName == "multiple") return;
-
- function defaultLinkFn(scope, element, attr) {
- scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {
- attr.$set(attrName, !!value);
- });
- }
-
- var normalized = directiveNormalize('ng-' + attrName);
- var linkFn = defaultLinkFn;
-
- if (propName === 'checked') {
- linkFn = function(scope, element, attr) {
- // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input
- if (attr.ngModel !== attr[normalized]) {
- defaultLinkFn(scope, element, attr);
- }
- };
- }
-
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- restrict: 'A',
- priority: 100,
- link: linkFn
- };
- };
-});
-
-// aliased input attrs are evaluated
-forEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {
- ngAttributeAliasDirectives[ngAttr] = function() {
- return {
- priority: 100,
- link: function(scope, element, attr) {
- //special case ngPattern when a literal regular expression value
- //is used as the expression (this way we don't have to watch anything).
- if (ngAttr === "ngPattern" && attr.ngPattern.charAt(0) == "/") {
- var match = attr.ngPattern.match(REGEX_STRING_REGEXP);
- if (match) {
- attr.$set("ngPattern", new RegExp(match[1], match[2]));
- return;
- }
- }
-
- scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {
- attr.$set(ngAttr, value);
- });
- }
- };
- };
-});
-
-// ng-src, ng-srcset, ng-href are interpolated
-forEach(['src', 'srcset', 'href'], function(attrName) {
- var normalized = directiveNormalize('ng-' + attrName);
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- priority: 99, // it needs to run after the attributes are interpolated
- link: function(scope, element, attr) {
- var propName = attrName,
- name = attrName;
-
- if (attrName === 'href' &&
- toString.call(element.prop('href')) === '[object SVGAnimatedString]') {
- name = 'xlinkHref';
- attr.$attr[name] = 'xlink:href';
- propName = null;
- }
-
- attr.$observe(normalized, function(value) {
- if (!value) {
- if (attrName === 'href') {
- attr.$set(name, null);
- }
- return;
- }
-
- attr.$set(name, value);
-
- // on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist
- // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
- // to set the property as well to achieve the desired effect.
- // we use attr[attrName] value since $set can sanitize the url.
- if (msie && propName) element.prop(propName, attr[name]);
- });
- }
- };
- };
-});
-
-/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true
- */
-var nullFormCtrl = {
- $addControl: noop,
- $$renameControl: nullFormRenameControl,
- $removeControl: noop,
- $setValidity: noop,
- $setDirty: noop,
- $setPristine: noop,
- $setSubmitted: noop
-},
-SUBMITTED_CLASS = 'ng-submitted';
-
-function nullFormRenameControl(control, name) {
- control.$name = name;
-}
-
-/**
- * @ngdoc type
- * @name form.FormController
- *
- * @property {boolean} $pristine True if user has not interacted with the form yet.
- * @property {boolean} $dirty True if user has already interacted with the form.
- * @property {boolean} $valid True if all of the containing forms and controls are valid.
- * @property {boolean} $invalid True if at least one containing control or form is invalid.
- * @property {boolean} $pending True if at least one containing control or form is pending.
- * @property {boolean} $submitted True if user has submitted the form even if its invalid.
- *
- * @property {Object} $error Is an object hash, containing references to controls or
- * forms with failing validators, where:
- *
- * - keys are validation tokens (error names),
- * - values are arrays of controls or forms that have a failing validator for given error name.
- *
- * Built-in validation tokens:
- *
- * - `email`
- * - `max`
- * - `maxlength`
- * - `min`
- * - `minlength`
- * - `number`
- * - `pattern`
- * - `required`
- * - `url`
- * - `date`
- * - `datetimelocal`
- * - `time`
- * - `week`
- * - `month`
- *
- * @description
- * `FormController` keeps track of all its controls and nested forms as well as the state of them,
- * such as being valid/invalid or dirty/pristine.
- *
- * Each {@link ng.directive:form form} directive creates an instance
- * of `FormController`.
- *
- */
-//asks for $scope to fool the BC controller module
-FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];
-function FormController(element, attrs, $scope, $animate, $interpolate) {
- var form = this,
- controls = [];
-
- // init state
- form.$error = {};
- form.$$success = {};
- form.$pending = undefined;
- form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);
- form.$dirty = false;
- form.$pristine = true;
- form.$valid = true;
- form.$invalid = false;
- form.$submitted = false;
- form.$$parentForm = nullFormCtrl;
-
- /**
- * @ngdoc method
- * @name form.FormController#$rollbackViewValue
- *
- * @description
- * Rollback all form controls pending updates to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. This method is typically needed by the reset button of
- * a form that uses `ng-model-options` to pend updates.
- */
- form.$rollbackViewValue = function() {
- forEach(controls, function(control) {
- control.$rollbackViewValue();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$commitViewValue
- *
- * @description
- * Commit all form controls pending updates to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`
- * usually handles calling this in response to input events.
- */
- form.$commitViewValue = function() {
- forEach(controls, function(control) {
- control.$commitViewValue();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$addControl
- * @param {object} control control object, either a {@link form.FormController} or an
- * {@link ngModel.NgModelController}
- *
- * @description
- * Register a control with the form. Input elements using ngModelController do this automatically
- * when they are linked.
- *
- * Note that the current state of the control will not be reflected on the new parent form. This
- * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`
- * state.
- *
- * However, if the method is used programmatically, for example by adding dynamically created controls,
- * or controls that have been previously removed without destroying their corresponding DOM element,
- * it's the developers responsiblity to make sure the current state propagates to the parent form.
- *
- * For example, if an input control is added that is already `$dirty` and has `$error` properties,
- * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
- */
- form.$addControl = function(control) {
- // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored
- // and not added to the scope. Now we throw an error.
- assertNotHasOwnProperty(control.$name, 'input');
- controls.push(control);
-
- if (control.$name) {
- form[control.$name] = control;
- }
-
- control.$$parentForm = form;
- };
-
- // Private API: rename a form control
- form.$$renameControl = function(control, newName) {
- var oldName = control.$name;
-
- if (form[oldName] === control) {
- delete form[oldName];
- }
- form[newName] = control;
- control.$name = newName;
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$removeControl
- * @param {object} control control object, either a {@link form.FormController} or an
- * {@link ngModel.NgModelController}
- *
- * @description
- * Deregister a control from the form.
- *
- * Input elements using ngModelController do this automatically when they are destroyed.
- *
- * Note that only the removed control's validation state (`$errors`etc.) will be removed from the
- * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
- * different from case to case. For example, removing the only `$dirty` control from a form may or
- * may not mean that the form is still `$dirty`.
- */
- form.$removeControl = function(control) {
- if (control.$name && form[control.$name] === control) {
- delete form[control.$name];
- }
- forEach(form.$pending, function(value, name) {
- form.$setValidity(name, null, control);
- });
- forEach(form.$error, function(value, name) {
- form.$setValidity(name, null, control);
- });
- forEach(form.$$success, function(value, name) {
- form.$setValidity(name, null, control);
- });
-
- arrayRemove(controls, control);
- control.$$parentForm = nullFormCtrl;
- };
-
-
- /**
- * @ngdoc method
- * @name form.FormController#$setValidity
- *
- * @description
- * Sets the validity of a form control.
- *
- * This method will also propagate to parent forms.
- */
- addSetValidityMethod({
- ctrl: this,
- $element: element,
- set: function(object, property, controller) {
- var list = object[property];
- if (!list) {
- object[property] = [controller];
- } else {
- var index = list.indexOf(controller);
- if (index === -1) {
- list.push(controller);
- }
- }
- },
- unset: function(object, property, controller) {
- var list = object[property];
- if (!list) {
- return;
- }
- arrayRemove(list, controller);
- if (list.length === 0) {
- delete object[property];
- }
- },
- $animate: $animate
- });
-
- /**
- * @ngdoc method
- * @name form.FormController#$setDirty
- *
- * @description
- * Sets the form to a dirty state.
- *
- * This method can be called to add the 'ng-dirty' class and set the form to a dirty
- * state (ng-dirty class). This method will also propagate to parent forms.
- */
- form.$setDirty = function() {
- $animate.removeClass(element, PRISTINE_CLASS);
- $animate.addClass(element, DIRTY_CLASS);
- form.$dirty = true;
- form.$pristine = false;
- form.$$parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setPristine
- *
- * @description
- * Sets the form to its pristine state.
- *
- * This method can be called to remove the 'ng-dirty' class and set the form to its pristine
- * state (ng-pristine class). This method will also propagate to all the controls contained
- * in this form.
- *
- * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
- * saving or resetting it.
- */
- form.$setPristine = function() {
- $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);
- form.$dirty = false;
- form.$pristine = true;
- form.$submitted = false;
- forEach(controls, function(control) {
- control.$setPristine();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setUntouched
- *
- * @description
- * Sets the form to its untouched state.
- *
- * This method can be called to remove the 'ng-touched' class and set the form controls to their
- * untouched state (ng-untouched class).
- *
- * Setting a form controls back to their untouched state is often useful when setting the form
- * back to its pristine state.
- */
- form.$setUntouched = function() {
- forEach(controls, function(control) {
- control.$setUntouched();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setSubmitted
- *
- * @description
- * Sets the form to its submitted state.
- */
- form.$setSubmitted = function() {
- $animate.addClass(element, SUBMITTED_CLASS);
- form.$submitted = true;
- form.$$parentForm.$setSubmitted();
- };
-}
-
-/**
- * @ngdoc directive
- * @name ngForm
- * @restrict EAC
- *
- * @description
- * Nestable alias of {@link ng.directive:form `form`} directive. HTML
- * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
- * sub-group of controls needs to be determined.
- *
- * Note: the purpose of `ngForm` is to group controls,
- * but not to be a replacement for the `<form>` tag with all of its capabilities
- * (e.g. posting to the server, ...).
- *
- * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- *
- */
-
- /**
- * @ngdoc directive
- * @name form
- * @restrict E
- *
- * @description
- * Directive that instantiates
- * {@link form.FormController FormController}.
- *
- * If the `name` attribute is specified, the form controller is published onto the current scope under
- * this name.
- *
- * # Alias: {@link ng.directive:ngForm `ngForm`}
- *
- * In Angular, forms can be nested. This means that the outer form is valid when all of the child
- * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
- * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
- * `<form>` but can be nested. This allows you to have nested forms, which is very useful when
- * using Angular validation directives in forms that are dynamically generated using the
- * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`
- * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an
- * `ngForm` directive and nest these in an outer `form` element.
- *
- *
- * # CSS classes
- * - `ng-valid` is set if the form is valid.
- * - `ng-invalid` is set if the form is invalid.
- * - `ng-pending` is set if the form is pending.
- * - `ng-pristine` is set if the form is pristine.
- * - `ng-dirty` is set if the form is dirty.
- * - `ng-submitted` is set if the form was submitted.
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- *
- * # Submitting a form and preventing the default action
- *
- * Since the role of forms in client-side Angular applications is different than in classical
- * roundtrip apps, it is desirable for the browser not to translate the form submission into a full
- * page reload that sends the data to the server. Instead some javascript logic should be triggered
- * to handle the form submission in an application-specific way.
- *
- * For this reason, Angular prevents the default action (form submission to the server) unless the
- * `<form>` element has an `action` attribute specified.
- *
- * You can use one of the following two ways to specify what javascript method should be called when
- * a form is submitted:
- *
- * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element
- * - {@link ng.directive:ngClick ngClick} directive on the first
- * button or input field of type submit (input[type=submit])
- *
- * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}
- * or {@link ng.directive:ngClick ngClick} directives.
- * This is because of the following form submission rules in the HTML specification:
- *
- * - If a form has only one input field then hitting enter in this field triggers form submit
- * (`ngSubmit`)
- * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter
- * doesn't trigger submit
- * - if a form has one or more input fields and one or more buttons or input[type=submit] then
- * hitting enter in any of the input fields will trigger the click handler on the *first* button or
- * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)
- *
- * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is
- * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
- * to have access to the updated model.
- *
- * ## Animation Hooks
- *
- * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.
- * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any
- * other validations that are performed within the form. Animations in ngForm are similar to how
- * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well
- * as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style a form element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-form {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-form.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- <example deps="angular-animate.js" animations="true" fixBase="true" module="formExample">
- <file name="index.html">
- <script>
- angular.module('formExample', [])
- .controller('FormController', ['$scope', function($scope) {
- $scope.userType = 'guest';
- }]);
- </script>
- <style>
- .my-form {
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-form.ng-invalid {
- background: red;
- }
- </style>
- <form name="myForm" ng-controller="FormController" class="my-form">
- userType: <input name="input" ng-model="userType" required>
- <span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
- <code>userType = {{userType}}</code><br>
- <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>
- <code>myForm.input.$error = {{myForm.input.$error}}</code><br>
- <code>myForm.$valid = {{myForm.$valid}}</code><br>
- <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should initialize to model', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
-
- expect(userType.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
- var userInput = element(by.model('userType'));
-
- userInput.clear();
- userInput.sendKeys('');
-
- expect(userType.getText()).toEqual('userType =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- *
- * @param {string=} name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- */
-var formDirectiveFactory = function(isNgForm) {
- return ['$timeout', '$parse', function($timeout, $parse) {
- var formDirective = {
- name: 'form',
- restrict: isNgForm ? 'EAC' : 'E',
- require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form
- controller: FormController,
- compile: function ngFormCompile(formElement, attr) {
- // Setup initial state of the control
- formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);
-
- var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);
-
- return {
- pre: function ngFormPreLink(scope, formElement, attr, ctrls) {
- var controller = ctrls[0];
-
- // if `action` attr is not present on the form, prevent the default action (submission)
- if (!('action' in attr)) {
- // we can't use jq events because if a form is destroyed during submission the default
- // action is not prevented. see #1238
- //
- // IE 9 is not affected because it doesn't fire a submit event and try to do a full
- // page reload if the form was destroyed by submission of the form via a click handler
- // on a button in the form. Looks like an IE9 specific bug.
- var handleFormSubmission = function(event) {
- scope.$apply(function() {
- controller.$commitViewValue();
- controller.$setSubmitted();
- });
-
- event.preventDefault();
- };
-
- addEventListenerFn(formElement[0], 'submit', handleFormSubmission);
-
- // unregister the preventDefault listener so that we don't not leak memory but in a
- // way that will achieve the prevention of the default action.
- formElement.on('$destroy', function() {
- $timeout(function() {
- removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);
- }, 0, false);
- });
- }
-
- var parentFormCtrl = ctrls[1] || controller.$$parentForm;
- parentFormCtrl.$addControl(controller);
-
- var setter = nameAttr ? getSetter(controller.$name) : noop;
-
- if (nameAttr) {
- setter(scope, controller);
- attr.$observe(nameAttr, function(newValue) {
- if (controller.$name === newValue) return;
- setter(scope, undefined);
- controller.$$parentForm.$$renameControl(controller, newValue);
- setter = getSetter(controller.$name);
- setter(scope, controller);
- });
- }
- formElement.on('$destroy', function() {
- controller.$$parentForm.$removeControl(controller);
- setter(scope, undefined);
- extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
- });
- }
- };
- }
- };
-
- return formDirective;
-
- function getSetter(expression) {
- if (expression === '') {
- //create an assignable expression, so forms with an empty name can be renamed later
- return $parse('this[""]').assign;
- }
- return $parse(expression).assign || noop;
- }
- }];
-};
-
-var formDirective = formDirectiveFactory();
-var ngFormDirective = formDirectiveFactory(true);
-
-/* global VALID_CLASS: false,
- INVALID_CLASS: false,
- PRISTINE_CLASS: false,
- DIRTY_CLASS: false,
- UNTOUCHED_CLASS: false,
- TOUCHED_CLASS: false,
- ngModelMinErr: false,
-*/
-
-// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
-var ISO_DATE_REGEXP = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;
-// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)
-var URL_REGEXP = /^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/;
-var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
-var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
-var DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})$/;
-var DATETIMELOCAL_REGEXP = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
-var WEEK_REGEXP = /^(\d{4})-W(\d\d)$/;
-var MONTH_REGEXP = /^(\d{4})-(\d\d)$/;
-var TIME_REGEXP = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
-
-var inputType = {
-
- /**
- * @ngdoc input
- * @name input[text]
- *
- * @description
- * Standard HTML text input with angular data binding, inherited by most of the `input` elements.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Adds `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="text-input-directive" module="textInputExample">
- <file name="index.html">
- <script>
- angular.module('textInputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.example = {
- text: 'guest',
- word: /^\s*\w*\s*$/
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Single word:
- <input type="text" name="input" ng-model="example.text"
- ng-pattern="example.word" required ng-trim="false">
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.pattern">
- Single word only!</span>
- </div>
- <tt>text = {{example.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('example.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if multi word', function() {
- input.clear();
- input.sendKeys('hello world');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'text': textInputType,
-
- /**
- * @ngdoc input
- * @name input[date]
- *
- * @description
- * Input with date validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601
- * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many
- * modern browsers do not yet support this input type, it is important to provide cues to users on the
- * expected input format via a placeholder or label.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
- * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
- * (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Note that `min` will also add native HTML5
- * constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be
- * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
- * (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Note that `max` will also add native HTML5
- * constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="date-input-directive" module="dateInputExample">
- <file name="index.html">
- <script>
- angular.module('dateInputExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 9, 22)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a date in 2013:</label>
- <input type="date" id="exampleInput" name="input" ng-model="example.value"
- placeholder="yyyy-MM-dd" min="2013-01-01" max="2013-12-31" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.date">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM-dd"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM-dd"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (see https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-10-22');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01-01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'date': createDateInputType('date', DATE_REGEXP,
- createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),
- 'yyyy-MM-dd'),
-
- /**
- * @ngdoc input
- * @name input[datetime-local]
- *
- * @description
- * Input with datetime validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
- * inside this attribute (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
- * Note that `min` will also add native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
- * inside this attribute (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
- * Note that `max` will also add native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="datetimelocal-input-directive" module="dateExample">
- <file name="index.html">
- <script>
- angular.module('dateExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2010, 11, 28, 14, 57)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a date between in 2013:</label>
- <input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
- placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.datetimelocal">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2010-12-28T14:57:00');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01-01T23:59:00');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,
- createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),
- 'yyyy-MM-ddTHH:mm:ss.sss'),
-
- /**
- * @ngdoc input
- * @name input[time]
- *
- * @description
- * Input with time validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a
- * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
- * attribute (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the
- * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the
- * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="time-input-directive" module="timeExample">
- <file name="index.html">
- <script>
- angular.module('timeExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(1970, 0, 1, 14, 57, 0)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a between 8am and 5pm:</label>
- <input type="time" id="exampleInput" name="input" ng-model="example.value"
- placeholder="HH:mm:ss" min="08:00:00" max="17:00:00" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.time">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "HH:mm:ss"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "HH:mm:ss"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('14:57:00');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('23:59:00');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'time': createDateInputType('time', TIME_REGEXP,
- createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),
- 'HH:mm:ss.sss'),
-
- /**
- * @ngdoc input
- * @name input[week]
- *
- * @description
- * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support
- * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * week format (yyyy-W##), for example: `2013-W02`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
- * attribute (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="week-input-directive" module="weekExample">
- <file name="index.html">
- <script>
- angular.module('weekExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 0, 3)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label>Pick a date between in 2013:
- <input id="exampleInput" type="week" name="input" ng-model="example.value"
- placeholder="YYYY-W##" min="2012-W32"
- max="2013-W52" required />
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.week">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-Www"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-Www"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-W01');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-W01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),
-
- /**
- * @ngdoc input
- * @name input[month]
- *
- * @description
- * Input with month validation and transformation. In browsers that do not yet support
- * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * month format (yyyy-MM), for example: `2009-01`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- * If the model is not set to the first of the month, the next view to model update will set it
- * to the first of the month.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
- * attribute (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
-
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="month-input-directive" module="monthExample">
- <file name="index.html">
- <script>
- angular.module('monthExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 9, 1)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a month in 2013:</label>
- <input id="exampleInput" type="month" name="input" ng-model="example.value"
- placeholder="yyyy-MM" min="2013-01" max="2013-12" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.month">
- Not a valid month!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-10');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'month': createDateInputType('month', MONTH_REGEXP,
- createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),
- 'yyyy-MM'),
-
- /**
- * @ngdoc input
- * @name input[number]
- *
- * @description
- * Text input with number validation and transformation. Sets the `number` validation
- * error if not a valid number.
- *
- * <div class="alert alert-warning">
- * The model must always be of type `number` otherwise Angular will throw an error.
- * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}
- * error docs for more information and an example of how to convert your model if necessary.
- * </div>
- *
- * ## Issues with HTML5 constraint validation
- *
- * In browsers that follow the
- * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),
- * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.
- * If a non-number is entered in the input, the browser will report the value as an empty string,
- * which means the view / model values in `ngModel` and subsequently the scope value
- * will also be an empty string.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="number-input-directive" module="numberExample">
- <file name="index.html">
- <script>
- angular.module('numberExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.example = {
- value: 12
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Number:
- <input type="number" name="input" ng-model="example.value"
- min="0" max="99" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.number">
- Not valid number!</span>
- </div>
- <tt>value = {{example.value}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('12');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if over max', function() {
- input.clear();
- input.sendKeys('123');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'number': numberInputType,
-
-
- /**
- * @ngdoc input
- * @name input[url]
- *
- * @description
- * Text input with URL validation. Sets the `url` validation error key if the content is not a
- * valid URL.
- *
- * <div class="alert alert-warning">
- * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex
- * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify
- * the built-in validators (see the {@link guide/forms Forms guide})
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="url-input-directive" module="urlExample">
- <file name="index.html">
- <script>
- angular.module('urlExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.url = {
- text: 'http://google.com'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>URL:
- <input type="url" name="input" ng-model="url.text" required>
- <label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.url">
- Not valid url!</span>
- </div>
- <tt>text = {{url.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('url.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('url.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('http://google.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not url', function() {
- input.clear();
- input.sendKeys('box');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'url': urlInputType,
-
-
- /**
- * @ngdoc input
- * @name input[email]
- *
- * @description
- * Text input with email validation. Sets the `email` validation error key if not a valid email
- * address.
- *
- * <div class="alert alert-warning">
- * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex
- * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can
- * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="email-input-directive" module="emailExample">
- <file name="index.html">
- <script>
- angular.module('emailExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.email = {
- text: 'me@example.com'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Email:
- <input type="email" name="input" ng-model="email.text" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.email">
- Not valid email!</span>
- </div>
- <tt>text = {{email.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('email.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('email.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('me@example.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not email', function() {
- input.clear();
- input.sendKeys('xxx');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'email': emailInputType,
-
-
- /**
- * @ngdoc input
- * @name input[radio]
- *
- * @description
- * HTML radio button.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string} value The value to which the `ngModel` expression should be set when selected.
- * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,
- * too. Use `ngValue` if you need complex models (`number`, `object`, ...).
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio
- * is selected. Should be used instead of the `value` attribute if you need
- * a non-string `ngModel` (`boolean`, `array`, ...).
- *
- * @example
- <example name="radio-input-directive" module="radioExample">
- <file name="index.html">
- <script>
- angular.module('radioExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.color = {
- name: 'blue'
- };
- $scope.specialValue = {
- "id": "12345",
- "value": "green"
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>
- <input type="radio" ng-model="color.name" value="red">
- Red
- </label><br/>
- <label>
- <input type="radio" ng-model="color.name" ng-value="specialValue">
- Green
- </label><br/>
- <label>
- <input type="radio" ng-model="color.name" value="blue">
- Blue
- </label><br/>
- <tt>color = {{color.name | json}}</tt><br/>
- </form>
- Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`.
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var color = element(by.binding('color.name'));
-
- expect(color.getText()).toContain('blue');
-
- element.all(by.model('color.name')).get(0).click();
-
- expect(color.getText()).toContain('red');
- });
- </file>
- </example>
- */
- 'radio': radioInputType,
-
-
- /**
- * @ngdoc input
- * @name input[checkbox]
- *
- * @description
- * HTML checkbox.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {expression=} ngTrueValue The value to which the expression should be set when selected.
- * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="checkbox-input-directive" module="checkboxExample">
- <file name="index.html">
- <script>
- angular.module('checkboxExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.checkboxModel = {
- value1 : true,
- value2 : 'YES'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Value1:
- <input type="checkbox" ng-model="checkboxModel.value1">
- </label><br/>
- <label>Value2:
- <input type="checkbox" ng-model="checkboxModel.value2"
- ng-true-value="'YES'" ng-false-value="'NO'">
- </label><br/>
- <tt>value1 = {{checkboxModel.value1}}</tt><br/>
- <tt>value2 = {{checkboxModel.value2}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var value1 = element(by.binding('checkboxModel.value1'));
- var value2 = element(by.binding('checkboxModel.value2'));
-
- expect(value1.getText()).toContain('true');
- expect(value2.getText()).toContain('YES');
-
- element(by.model('checkboxModel.value1')).click();
- element(by.model('checkboxModel.value2')).click();
-
- expect(value1.getText()).toContain('false');
- expect(value2.getText()).toContain('NO');
- });
- </file>
- </example>
- */
- 'checkbox': checkboxInputType,
-
- 'hidden': noop,
- 'button': noop,
- 'submit': noop,
- 'reset': noop,
- 'file': noop
-};
-
-function stringBasedInputType(ctrl) {
- ctrl.$formatters.push(function(value) {
- return ctrl.$isEmpty(value) ? value : value.toString();
- });
-}
-
-function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-}
-
-function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- var type = lowercase(element[0].type);
-
- // In composition mode, users are still inputing intermediate text buffer,
- // hold the listener until composition is done.
- // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent
- if (!$sniffer.android) {
- var composing = false;
-
- element.on('compositionstart', function(data) {
- composing = true;
- });
-
- element.on('compositionend', function() {
- composing = false;
- listener();
- });
- }
-
- var listener = function(ev) {
- if (timeout) {
- $browser.defer.cancel(timeout);
- timeout = null;
- }
- if (composing) return;
- var value = element.val(),
- event = ev && ev.type;
-
- // By default we will trim the value
- // If the attribute ng-trim exists we will avoid trimming
- // If input type is 'password', the value is never trimmed
- if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {
- value = trim(value);
- }
-
- // If a control is suffering from bad input (due to native validators), browsers discard its
- // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the
- // control's value is the same empty value twice in a row.
- if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {
- ctrl.$setViewValue(value, event);
- }
- };
-
- // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the
- // input event on backspace, delete or cut
- if ($sniffer.hasEvent('input')) {
- element.on('input', listener);
- } else {
- var timeout;
-
- var deferListener = function(ev, input, origValue) {
- if (!timeout) {
- timeout = $browser.defer(function() {
- timeout = null;
- if (!input || input.value !== origValue) {
- listener(ev);
- }
- });
- }
- };
-
- element.on('keydown', function(event) {
- var key = event.keyCode;
-
- // ignore
- // command modifiers arrows
- if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;
-
- deferListener(event, this, this.value);
- });
-
- // if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it
- if ($sniffer.hasEvent('paste')) {
- element.on('paste cut', deferListener);
- }
- }
-
- // if user paste into input using mouse on older browser
- // or form autocomplete on newer browser, we need "change" event to catch it
- element.on('change', listener);
-
- ctrl.$render = function() {
- // Workaround for Firefox validation #12102.
- var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;
- if (element.val() !== value) {
- element.val(value);
- }
- };
-}
-
-function weekParser(isoWeek, existingDate) {
- if (isDate(isoWeek)) {
- return isoWeek;
- }
-
- if (isString(isoWeek)) {
- WEEK_REGEXP.lastIndex = 0;
- var parts = WEEK_REGEXP.exec(isoWeek);
- if (parts) {
- var year = +parts[1],
- week = +parts[2],
- hours = 0,
- minutes = 0,
- seconds = 0,
- milliseconds = 0,
- firstThurs = getFirstThursdayOfYear(year),
- addDays = (week - 1) * 7;
-
- if (existingDate) {
- hours = existingDate.getHours();
- minutes = existingDate.getMinutes();
- seconds = existingDate.getSeconds();
- milliseconds = existingDate.getMilliseconds();
- }
-
- return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);
- }
- }
-
- return NaN;
-}
-
-function createDateParser(regexp, mapping) {
- return function(iso, date) {
- var parts, map;
-
- if (isDate(iso)) {
- return iso;
- }
-
- if (isString(iso)) {
- // When a date is JSON'ified to wraps itself inside of an extra
- // set of double quotes. This makes the date parsing code unable
- // to match the date string and parse it as a date.
- if (iso.charAt(0) == '"' && iso.charAt(iso.length - 1) == '"') {
- iso = iso.substring(1, iso.length - 1);
- }
- if (ISO_DATE_REGEXP.test(iso)) {
- return new Date(iso);
- }
- regexp.lastIndex = 0;
- parts = regexp.exec(iso);
-
- if (parts) {
- parts.shift();
- if (date) {
- map = {
- yyyy: date.getFullYear(),
- MM: date.getMonth() + 1,
- dd: date.getDate(),
- HH: date.getHours(),
- mm: date.getMinutes(),
- ss: date.getSeconds(),
- sss: date.getMilliseconds() / 1000
- };
- } else {
- map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };
- }
-
- forEach(parts, function(part, index) {
- if (index < mapping.length) {
- map[mapping[index]] = +part;
- }
- });
- return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);
- }
- }
-
- return NaN;
- };
-}
-
-function createDateInputType(type, regexp, parseDate, format) {
- return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {
- badInputChecker(scope, element, attr, ctrl);
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- var timezone = ctrl && ctrl.$options && ctrl.$options.timezone;
- var previousDate;
-
- ctrl.$$parserName = type;
- ctrl.$parsers.push(function(value) {
- if (ctrl.$isEmpty(value)) return null;
- if (regexp.test(value)) {
- // Note: We cannot read ctrl.$modelValue, as there might be a different
- // parser/formatter in the processing chain so that the model
- // contains some different data format!
- var parsedDate = parseDate(value, previousDate);
- if (timezone) {
- parsedDate = convertTimezoneToLocal(parsedDate, timezone);
- }
- return parsedDate;
- }
- return undefined;
- });
-
- ctrl.$formatters.push(function(value) {
- if (value && !isDate(value)) {
- throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);
- }
- if (isValidDate(value)) {
- previousDate = value;
- if (previousDate && timezone) {
- previousDate = convertTimezoneToLocal(previousDate, timezone, true);
- }
- return $filter('date')(value, format, timezone);
- } else {
- previousDate = null;
- return '';
- }
- });
-
- if (isDefined(attr.min) || attr.ngMin) {
- var minVal;
- ctrl.$validators.min = function(value) {
- return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;
- };
- attr.$observe('min', function(val) {
- minVal = parseObservedDateValue(val);
- ctrl.$validate();
- });
- }
-
- if (isDefined(attr.max) || attr.ngMax) {
- var maxVal;
- ctrl.$validators.max = function(value) {
- return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;
- };
- attr.$observe('max', function(val) {
- maxVal = parseObservedDateValue(val);
- ctrl.$validate();
- });
- }
-
- function isValidDate(value) {
- // Invalid Date: getTime() returns NaN
- return value && !(value.getTime && value.getTime() !== value.getTime());
- }
-
- function parseObservedDateValue(val) {
- return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val;
- }
- };
-}
-
-function badInputChecker(scope, element, attr, ctrl) {
- var node = element[0];
- var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);
- if (nativeValidation) {
- ctrl.$parsers.push(function(value) {
- var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};
- // Detect bug in FF35 for input[email] (https://bugzilla.mozilla.org/show_bug.cgi?id=1064430):
- // - also sets validity.badInput (should only be validity.typeMismatch).
- // - see http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#e-mail-state-(type=email)
- // - can ignore this case as we can still read out the erroneous email...
- return validity.badInput && !validity.typeMismatch ? undefined : value;
- });
- }
-}
-
-function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- badInputChecker(scope, element, attr, ctrl);
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
-
- ctrl.$$parserName = 'number';
- ctrl.$parsers.push(function(value) {
- if (ctrl.$isEmpty(value)) return null;
- if (NUMBER_REGEXP.test(value)) return parseFloat(value);
- return undefined;
- });
-
- ctrl.$formatters.push(function(value) {
- if (!ctrl.$isEmpty(value)) {
- if (!isNumber(value)) {
- throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);
- }
- value = value.toString();
- }
- return value;
- });
-
- if (isDefined(attr.min) || attr.ngMin) {
- var minVal;
- ctrl.$validators.min = function(value) {
- return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;
- };
-
- attr.$observe('min', function(val) {
- if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val, 10);
- }
- minVal = isNumber(val) && !isNaN(val) ? val : undefined;
- // TODO(matsko): implement validateLater to reduce number of validations
- ctrl.$validate();
- });
- }
-
- if (isDefined(attr.max) || attr.ngMax) {
- var maxVal;
- ctrl.$validators.max = function(value) {
- return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;
- };
-
- attr.$observe('max', function(val) {
- if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val, 10);
- }
- maxVal = isNumber(val) && !isNaN(val) ? val : undefined;
- // TODO(matsko): implement validateLater to reduce number of validations
- ctrl.$validate();
- });
- }
-}
-
-function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- // Note: no badInputChecker here by purpose as `url` is only a validation
- // in browsers, i.e. we can always read out input.value even if it is not valid!
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-
- ctrl.$$parserName = 'url';
- ctrl.$validators.url = function(modelValue, viewValue) {
- var value = modelValue || viewValue;
- return ctrl.$isEmpty(value) || URL_REGEXP.test(value);
- };
-}
-
-function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- // Note: no badInputChecker here by purpose as `url` is only a validation
- // in browsers, i.e. we can always read out input.value even if it is not valid!
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-
- ctrl.$$parserName = 'email';
- ctrl.$validators.email = function(modelValue, viewValue) {
- var value = modelValue || viewValue;
- return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);
- };
-}
-
-function radioInputType(scope, element, attr, ctrl) {
- // make the name unique, if not defined
- if (isUndefined(attr.name)) {
- element.attr('name', nextUid());
- }
-
- var listener = function(ev) {
- if (element[0].checked) {
- ctrl.$setViewValue(attr.value, ev && ev.type);
- }
- };
-
- element.on('click', listener);
-
- ctrl.$render = function() {
- var value = attr.value;
- element[0].checked = (value == ctrl.$viewValue);
- };
-
- attr.$observe('value', ctrl.$render);
-}
-
-function parseConstantExpr($parse, context, name, expression, fallback) {
- var parseFn;
- if (isDefined(expression)) {
- parseFn = $parse(expression);
- if (!parseFn.constant) {
- throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
- '`{1}`.', name, expression);
- }
- return parseFn(context);
- }
- return fallback;
-}
-
-function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
- var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);
- var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);
-
- var listener = function(ev) {
- ctrl.$setViewValue(element[0].checked, ev && ev.type);
- };
-
- element.on('click', listener);
-
- ctrl.$render = function() {
- element[0].checked = ctrl.$viewValue;
- };
-
- // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`
- // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert
- // it to a boolean.
- ctrl.$isEmpty = function(value) {
- return value === false;
- };
-
- ctrl.$formatters.push(function(value) {
- return equals(value, trueValue);
- });
-
- ctrl.$parsers.push(function(value) {
- return value ? trueValue : falseValue;
- });
-}
-
-
-/**
- * @ngdoc directive
- * @name textarea
- * @restrict E
- *
- * @description
- * HTML textarea element control with angular data-binding. The data-binding and validation
- * properties of this element are exactly the same as those of the
- * {@link ng.directive:input input element}.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
- * length.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- */
-
-
-/**
- * @ngdoc directive
- * @name input
- * @restrict E
- *
- * @description
- * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,
- * input state control, and validation.
- * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.
- *
- * <div class="alert alert-warning">
- * **Note:** Not every feature offered is available for all input types.
- * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {boolean=} ngRequired Sets `required` attribute if set to true
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
- * length.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="input-directive" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = {name: 'guest', last: 'visitor'};
- }]);
- </script>
- <div ng-controller="ExampleController">
- <form name="myForm">
- <label>
- User name:
- <input type="text" name="userName" ng-model="user.name" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.userName.$error.required">
- Required!</span>
- </div>
- <label>
- Last name:
- <input type="text" name="lastName" ng-model="user.last"
- ng-minlength="3" ng-maxlength="10">
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.lastName.$error.minlength">
- Too short!</span>
- <span class="error" ng-show="myForm.lastName.$error.maxlength">
- Too long!</span>
- </div>
- </form>
- <hr>
- <tt>user = {{user}}</tt><br/>
- <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>
- <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>
- <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>
- <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>
- <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var user = element(by.exactBinding('user'));
- var userNameValid = element(by.binding('myForm.userName.$valid'));
- var lastNameValid = element(by.binding('myForm.lastName.$valid'));
- var lastNameError = element(by.binding('myForm.lastName.$error'));
- var formValid = element(by.binding('myForm.$valid'));
- var userNameInput = element(by.model('user.name'));
- var userLastInput = element(by.model('user.last'));
-
- it('should initialize to model', function() {
- expect(user.getText()).toContain('{"name":"guest","last":"visitor"}');
- expect(userNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if empty when required', function() {
- userNameInput.clear();
- userNameInput.sendKeys('');
-
- expect(user.getText()).toContain('{"last":"visitor"}');
- expect(userNameValid.getText()).toContain('false');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be valid if empty when min length is set', function() {
- userLastInput.clear();
- userLastInput.sendKeys('');
-
- expect(user.getText()).toContain('{"name":"guest","last":""}');
- expect(lastNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if less than required min length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('xx');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('minlength');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be invalid if longer than max length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('some ridiculously long name');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('maxlength');
- expect(formValid.getText()).toContain('false');
- });
- </file>
- </example>
- */
-var inputDirective = ['$browser', '$sniffer', '$filter', '$parse',
- function($browser, $sniffer, $filter, $parse) {
- return {
- restrict: 'E',
- require: ['?ngModel'],
- link: {
- pre: function(scope, element, attr, ctrls) {
- if (ctrls[0]) {
- (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
- $browser, $filter, $parse);
- }
- }
- }
- };
-}];
-
-
-
-var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
-/**
- * @ngdoc directive
- * @name ngValue
- *
- * @description
- * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},
- * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to
- * the bound value.
- *
- * `ngValue` is useful when dynamically generating lists of radio buttons using
- * {@link ngRepeat `ngRepeat`}, as shown below.
- *
- * Likewise, `ngValue` can be used to generate `<option>` elements for
- * the {@link select `select`} element. In that case however, only strings are supported
- * for the `value `attribute, so the resulting `ngModel` will always be a string.
- * Support for `select` models with non-string values is available via `ngOptions`.
- *
- * @element input
- * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute
- * of the `input` element
- *
- * @example
- <example name="ngValue-directive" module="valueExample">
- <file name="index.html">
- <script>
- angular.module('valueExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.names = ['pizza', 'unicorns', 'robots'];
- $scope.my = { favorite: 'unicorns' };
- }]);
- </script>
- <form ng-controller="ExampleController">
- <h2>Which is your favorite?</h2>
- <label ng-repeat="name in names" for="{{name}}">
- {{name}}
- <input type="radio"
- ng-model="my.favorite"
- ng-value="name"
- id="{{name}}"
- name="favorite">
- </label>
- <div>You chose {{my.favorite}}</div>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var favorite = element(by.binding('my.favorite'));
-
- it('should initialize to model', function() {
- expect(favorite.getText()).toContain('unicorns');
- });
- it('should bind the values to the inputs', function() {
- element.all(by.model('my.favorite')).get(0).click();
- expect(favorite.getText()).toContain('pizza');
- });
- </file>
- </example>
- */
-var ngValueDirective = function() {
- return {
- restrict: 'A',
- priority: 100,
- compile: function(tpl, tplAttr) {
- if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {
- return function ngValueConstantLink(scope, elm, attr) {
- attr.$set('value', scope.$eval(attr.ngValue));
- };
- } else {
- return function ngValueLink(scope, elm, attr) {
- scope.$watch(attr.ngValue, function valueWatchAction(value) {
- attr.$set('value', value);
- });
- };
- }
- }
- };
-};
-
-/**
- * @ngdoc directive
- * @name ngBind
- * @restrict AC
- *
- * @description
- * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element
- * with the value of a given expression, and to update the text content when the value of that
- * expression changes.
- *
- * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
- * `{{ expression }}` which is similar but less verbose.
- *
- * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily
- * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
- * element attribute, it makes the bindings invisible to the user while the page is loading.
- *
- * An alternative solution to this problem would be using the
- * {@link ng.directive:ngCloak ngCloak} directive.
- *
- *
- * @element ANY
- * @param {expression} ngBind {@link guide/expression Expression} to evaluate.
- *
- * @example
- * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.name = 'Whirled';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Enter name: <input type="text" ng-model="name"></label><br>
- Hello <span ng-bind="name"></span>!
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var nameInput = element(by.model('name'));
-
- expect(element(by.binding('name')).getText()).toBe('Whirled');
- nameInput.clear();
- nameInput.sendKeys('world');
- expect(element(by.binding('name')).getText()).toBe('world');
- });
- </file>
- </example>
- */
-var ngBindDirective = ['$compile', function($compile) {
- return {
- restrict: 'AC',
- compile: function ngBindCompile(templateElement) {
- $compile.$$addBindingClass(templateElement);
- return function ngBindLink(scope, element, attr) {
- $compile.$$addBindingInfo(element, attr.ngBind);
- element = element[0];
- scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
- element.textContent = isUndefined(value) ? '' : value;
- });
- };
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindTemplate
- *
- * @description
- * The `ngBindTemplate` directive specifies that the element
- * text content should be replaced with the interpolation of the template
- * in the `ngBindTemplate` attribute.
- * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
- * expressions. This directive is needed since some HTML elements
- * (such as TITLE and OPTION) cannot contain SPAN elements.
- *
- * @element ANY
- * @param {string} ngBindTemplate template of form
- * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.
- *
- * @example
- * Try it here: enter text in text box and watch the greeting change.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.salutation = 'Hello';
- $scope.name = 'World';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Salutation: <input type="text" ng-model="salutation"></label><br>
- <label>Name: <input type="text" ng-model="name"></label><br>
- <pre ng-bind-template="{{salutation}} {{name}}!"></pre>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var salutationElem = element(by.binding('salutation'));
- var salutationInput = element(by.model('salutation'));
- var nameInput = element(by.model('name'));
-
- expect(salutationElem.getText()).toBe('Hello World!');
-
- salutationInput.clear();
- salutationInput.sendKeys('Greetings');
- nameInput.clear();
- nameInput.sendKeys('user');
-
- expect(salutationElem.getText()).toBe('Greetings user!');
- });
- </file>
- </example>
- */
-var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {
- return {
- compile: function ngBindTemplateCompile(templateElement) {
- $compile.$$addBindingClass(templateElement);
- return function ngBindTemplateLink(scope, element, attr) {
- var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));
- $compile.$$addBindingInfo(element, interpolateFn.expressions);
- element = element[0];
- attr.$observe('ngBindTemplate', function(value) {
- element.textContent = isUndefined(value) ? '' : value;
- });
- };
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindHtml
- *
- * @description
- * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,
- * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.
- * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link
- * ngSanitize} in your module's dependencies (not in core Angular). In order to use {@link ngSanitize}
- * in your module's dependencies, you need to include "angular-sanitize.js" in your application.
- *
- * You may also bypass sanitization for values you know are safe. To do so, bind to
- * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example
- * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.
- *
- * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you
- * will have an exception (instead of an exploit.)
- *
- * @element ANY
- * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
- *
- * @example
-
- <example module="bindHtmlExample" deps="angular-sanitize.js">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p ng-bind-html="myHTML"></p>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('bindHtmlExample', ['ngSanitize'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.myHTML =
- 'I am an <code>HTML</code>string with ' +
- '<a href="#">links!</a> and other <em>stuff</em>';
- }]);
- </file>
-
- <file name="protractor.js" type="protractor">
- it('should check ng-bind-html', function() {
- expect(element(by.binding('myHTML')).getText()).toBe(
- 'I am an HTMLstring with links! and other stuff');
- });
- </file>
- </example>
- */
-var ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {
- return {
- restrict: 'A',
- compile: function ngBindHtmlCompile(tElement, tAttrs) {
- var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);
- var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {
- return (value || '').toString();
- });
- $compile.$$addBindingClass(tElement);
-
- return function ngBindHtmlLink(scope, element, attr) {
- $compile.$$addBindingInfo(element, attr.ngBindHtml);
-
- scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {
- // we re-evaluate the expr because we want a TrustedValueHolderType
- // for $sce, not a string
- element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');
- });
- };
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngChange
- *
- * @description
- * Evaluate the given expression when the user changes the input.
- * The expression is evaluated immediately, unlike the JavaScript onchange event
- * which only triggers at the end of a change (usually, when the user leaves the
- * form element or presses the return key).
- *
- * The `ngChange` expression is only evaluated when a change in the input value causes
- * a new value to be committed to the model.
- *
- * It will not be evaluated:
- * * if the value returned from the `$parsers` transformation pipeline has not changed
- * * if the input has continued to be invalid since the model will stay `null`
- * * if the model is changed programmatically and not by a change to the input value
- *
- *
- * Note, this directive requires `ngModel` to be present.
- *
- * @element input
- * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change
- * in input value.
- *
- * @example
- * <example name="ngChange-directive" module="changeExample">
- * <file name="index.html">
- * <script>
- * angular.module('changeExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.counter = 0;
- * $scope.change = function() {
- * $scope.counter++;
- * };
- * }]);
- * </script>
- * <div ng-controller="ExampleController">
- * <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
- * <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
- * <label for="ng-change-example2">Confirmed</label><br />
- * <tt>debug = {{confirmed}}</tt><br/>
- * <tt>counter = {{counter}}</tt><br/>
- * </div>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var counter = element(by.binding('counter'));
- * var debug = element(by.binding('confirmed'));
- *
- * it('should evaluate the expression if changing from view', function() {
- * expect(counter.getText()).toContain('0');
- *
- * element(by.id('ng-change-example1')).click();
- *
- * expect(counter.getText()).toContain('1');
- * expect(debug.getText()).toContain('true');
- * });
- *
- * it('should not evaluate the expression if changing from model', function() {
- * element(by.id('ng-change-example2')).click();
-
- * expect(counter.getText()).toContain('0');
- * expect(debug.getText()).toContain('true');
- * });
- * </file>
- * </example>
- */
-var ngChangeDirective = valueFn({
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- ctrl.$viewChangeListeners.push(function() {
- scope.$eval(attr.ngChange);
- });
- }
-});
-
-function classDirective(name, selector) {
- name = 'ngClass' + name;
- return ['$animate', function($animate) {
- return {
- restrict: 'AC',
- link: function(scope, element, attr) {
- var oldVal;
-
- scope.$watch(attr[name], ngClassWatchAction, true);
-
- attr.$observe('class', function(value) {
- ngClassWatchAction(scope.$eval(attr[name]));
- });
-
-
- if (name !== 'ngClass') {
- scope.$watch('$index', function($index, old$index) {
- // jshint bitwise: false
- var mod = $index & 1;
- if (mod !== (old$index & 1)) {
- var classes = arrayClasses(scope.$eval(attr[name]));
- mod === selector ?
- addClasses(classes) :
- removeClasses(classes);
- }
- });
- }
-
- function addClasses(classes) {
- var newClasses = digestClassCounts(classes, 1);
- attr.$addClass(newClasses);
- }
-
- function removeClasses(classes) {
- var newClasses = digestClassCounts(classes, -1);
- attr.$removeClass(newClasses);
- }
-
- function digestClassCounts(classes, count) {
- // Use createMap() to prevent class assumptions involving property
- // names in Object.prototype
- var classCounts = element.data('$classCounts') || createMap();
- var classesToUpdate = [];
- forEach(classes, function(className) {
- if (count > 0 || classCounts[className]) {
- classCounts[className] = (classCounts[className] || 0) + count;
- if (classCounts[className] === +(count > 0)) {
- classesToUpdate.push(className);
- }
- }
- });
- element.data('$classCounts', classCounts);
- return classesToUpdate.join(' ');
- }
-
- function updateClasses(oldClasses, newClasses) {
- var toAdd = arrayDifference(newClasses, oldClasses);
- var toRemove = arrayDifference(oldClasses, newClasses);
- toAdd = digestClassCounts(toAdd, 1);
- toRemove = digestClassCounts(toRemove, -1);
- if (toAdd && toAdd.length) {
- $animate.addClass(element, toAdd);
- }
- if (toRemove && toRemove.length) {
- $animate.removeClass(element, toRemove);
- }
- }
-
- function ngClassWatchAction(newVal) {
- if (selector === true || scope.$index % 2 === selector) {
- var newClasses = arrayClasses(newVal || []);
- if (!oldVal) {
- addClasses(newClasses);
- } else if (!equals(newVal,oldVal)) {
- var oldClasses = arrayClasses(oldVal);
- updateClasses(oldClasses, newClasses);
- }
- }
- oldVal = shallowCopy(newVal);
- }
- }
- };
-
- function arrayDifference(tokens1, tokens2) {
- var values = [];
-
- outer:
- for (var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for (var j = 0; j < tokens2.length; j++) {
- if (token == tokens2[j]) continue outer;
- }
- values.push(token);
- }
- return values;
- }
-
- function arrayClasses(classVal) {
- var classes = [];
- if (isArray(classVal)) {
- forEach(classVal, function(v) {
- classes = classes.concat(arrayClasses(v));
- });
- return classes;
- } else if (isString(classVal)) {
- return classVal.split(' ');
- } else if (isObject(classVal)) {
- forEach(classVal, function(v, k) {
- if (v) {
- classes = classes.concat(k.split(' '));
- }
- });
- return classes;
- }
- return classVal;
- }
- }];
-}
-
-/**
- * @ngdoc directive
- * @name ngClass
- * @restrict AC
- *
- * @description
- * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding
- * an expression that represents all classes to be added.
- *
- * The directive operates in three different ways, depending on which of three types the expression
- * evaluates to:
- *
- * 1. If the expression evaluates to a string, the string should be one or more space-delimited class
- * names.
- *
- * 2. If the expression evaluates to an object, then for each key-value pair of the
- * object with a truthy value the corresponding key is used as a class name.
- *
- * 3. If the expression evaluates to an array, each element of the array should either be a string as in
- * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array
- * to give you more control over what CSS classes appear. See the code below for an example of this.
- *
- *
- * The directive won't add duplicate classes if a particular class was already set.
- *
- * When the expression changes, the previously added classes are removed and only then are the
- * new classes added.
- *
- * @animations
- * **add** - happens just before the class is applied to the elements
- *
- * **remove** - happens just before the class is removed from the element
- *
- * @element ANY
- * @param {expression} ngClass {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class
- * names, an array, or a map of class names to boolean values. In the case of a map, the
- * names of the properties whose values are truthy will be added as css classes to the
- * element.
- *
- * @example Example that demonstrates basic bindings via ngClass directive.
- <example>
- <file name="index.html">
- <p ng-class="{strike: deleted, bold: important, 'has-error': error}">Map Syntax Example</p>
- <label>
- <input type="checkbox" ng-model="deleted">
- deleted (apply "strike" class)
- </label><br>
- <label>
- <input type="checkbox" ng-model="important">
- important (apply "bold" class)
- </label><br>
- <label>
- <input type="checkbox" ng-model="error">
- error (apply "has-error" class)
- </label>
- <hr>
- <p ng-class="style">Using String Syntax</p>
- <input type="text" ng-model="style"
- placeholder="Type: bold strike red" aria-label="Type: bold strike red">
- <hr>
- <p ng-class="[style1, style2, style3]">Using Array Syntax</p>
- <input ng-model="style1"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red"><br>
- <input ng-model="style2"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 2"><br>
- <input ng-model="style3"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 3"><br>
- <hr>
- <p ng-class="[style4, {orange: warning}]">Using Array and Map Syntax</p>
- <input ng-model="style4" placeholder="Type: bold, strike" aria-label="Type: bold, strike"><br>
- <label><input type="checkbox" ng-model="warning"> warning (apply "orange" class)</label>
- </file>
- <file name="style.css">
- .strike {
- text-decoration: line-through;
- }
- .bold {
- font-weight: bold;
- }
- .red {
- color: red;
- }
- .has-error {
- color: red;
- background-color: yellow;
- }
- .orange {
- color: orange;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var ps = element.all(by.css('p'));
-
- it('should let you toggle the class', function() {
-
- expect(ps.first().getAttribute('class')).not.toMatch(/bold/);
- expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);
-
- element(by.model('important')).click();
- expect(ps.first().getAttribute('class')).toMatch(/bold/);
-
- element(by.model('error')).click();
- expect(ps.first().getAttribute('class')).toMatch(/has-error/);
- });
-
- it('should let you toggle string example', function() {
- expect(ps.get(1).getAttribute('class')).toBe('');
- element(by.model('style')).clear();
- element(by.model('style')).sendKeys('red');
- expect(ps.get(1).getAttribute('class')).toBe('red');
- });
-
- it('array example should have 3 classes', function() {
- expect(ps.get(2).getAttribute('class')).toBe('');
- element(by.model('style1')).sendKeys('bold');
- element(by.model('style2')).sendKeys('strike');
- element(by.model('style3')).sendKeys('red');
- expect(ps.get(2).getAttribute('class')).toBe('bold strike red');
- });
-
- it('array with map example should have 2 classes', function() {
- expect(ps.last().getAttribute('class')).toBe('');
- element(by.model('style4')).sendKeys('bold');
- element(by.model('warning')).click();
- expect(ps.last().getAttribute('class')).toBe('bold orange');
- });
- </file>
- </example>
-
- ## Animations
-
- The example below demonstrates how to perform animations using ngClass.
-
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <input id="setbtn" type="button" value="set" ng-click="myVar='my-class'">
- <input id="clearbtn" type="button" value="clear" ng-click="myVar=''">
- <br>
- <span class="base-class" ng-class="myVar">Sample Text</span>
- </file>
- <file name="style.css">
- .base-class {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .base-class.my-class {
- color: red;
- font-size:3em;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class', function() {
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
-
- element(by.id('setbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).
- toMatch(/my-class/);
-
- element(by.id('clearbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
- });
- </file>
- </example>
-
-
- ## ngClass and pre-existing CSS3 Transitions/Animations
- The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
- Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
- any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
- to view the step by step details of {@link $animate#addClass $animate.addClass} and
- {@link $animate#removeClass $animate.removeClass}.
- */
-var ngClassDirective = classDirective('', true);
-
-/**
- * @ngdoc directive
- * @name ngClassOdd
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}}
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassOddDirective = classDirective('Odd', 0);
-
-/**
- * @ngdoc directive
- * @name ngClassEven
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The
- * result of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}} &nbsp; &nbsp; &nbsp;
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassEvenDirective = classDirective('Even', 1);
-
-/**
- * @ngdoc directive
- * @name ngCloak
- * @restrict AC
- *
- * @description
- * The `ngCloak` directive is used to prevent the Angular html template from being briefly
- * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this
- * directive to avoid the undesirable flicker effect caused by the html template display.
- *
- * The directive can be applied to the `<body>` element, but the preferred usage is to apply
- * multiple `ngCloak` directives to small portions of the page to permit progressive rendering
- * of the browser view.
- *
- * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and
- * `angular.min.js`.
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```css
- * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
- * display: none !important;
- * }
- * ```
- *
- * When this css rule is loaded by the browser, all html elements (including their children) that
- * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive
- * during the compilation of the template it deletes the `ngCloak` element attribute, making
- * the compiled element visible.
- *
- * For the best result, the `angular.js` script must be loaded in the head section of the html
- * document; alternatively, the css rule above must be included in the external stylesheet of the
- * application.
- *
- * @element ANY
- *
- * @example
- <example>
- <file name="index.html">
- <div id="template1" ng-cloak>{{ 'hello' }}</div>
- <div id="template2" class="ng-cloak">{{ 'world' }}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should remove the template directive and css class', function() {
- expect($('#template1').getAttribute('ng-cloak')).
- toBeNull();
- expect($('#template2').getAttribute('ng-cloak')).
- toBeNull();
- });
- </file>
- </example>
- *
- */
-var ngCloakDirective = ngDirective({
- compile: function(element, attr) {
- attr.$set('ngCloak', undefined);
- element.removeClass('ng-cloak');
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngController
- *
- * @description
- * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular
- * supports the principles behind the Model-View-Controller design pattern.
- *
- * MVC components in angular:
- *
- * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties
- * are accessed through bindings.
- * * View — The template (HTML with data bindings) that is rendered into the View.
- * * Controller — The `ngController` directive specifies a Controller class; the class contains business
- * logic behind the application to decorate the scope with functions and values
- *
- * Note that you can also attach controllers to the DOM by declaring it in a route definition
- * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller
- * again using `ng-controller` in the template itself. This will cause the controller to be attached
- * and executed twice.
- *
- * @element ANY
- * @scope
- * @priority 500
- * @param {expression} ngController Name of a constructor function registered with the current
- * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}
- * that on the current scope evaluates to a constructor function.
- *
- * The controller instance can be published into a scope property by specifying
- * `ng-controller="as propertyName"`.
- *
- * If the current `$controllerProvider` is configured to use globals (via
- * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may
- * also be the name of a globally accessible constructor function (not recommended).
- *
- * @example
- * Here is a simple form for editing user contact information. Adding, removing, clearing, and
- * greeting are methods declared on the controller (see source tab). These methods can
- * easily be called from the angular markup. Any changes to the data are automatically reflected
- * in the View without the need for a manual update.
- *
- * Two different declaration styles are included below:
- *
- * * one binds methods and properties directly onto the controller using `this`:
- * `ng-controller="SettingsController1 as settings"`
- * * one injects `$scope` into the controller:
- * `ng-controller="SettingsController2"`
- *
- * The second option is more common in the Angular community, and is generally used in boilerplates
- * and in this guide. However, there are advantages to binding properties directly to the controller
- * and avoiding scope.
- *
- * * Using `controller as` makes it obvious which controller you are accessing in the template when
- * multiple controllers apply to an element.
- * * If you are writing your controllers as classes you have easier access to the properties and
- * methods, which will appear on the scope, from inside the controller code.
- * * Since there is always a `.` in the bindings, you don't have to worry about prototypal
- * inheritance masking primitives.
- *
- * This example demonstrates the `controller as` syntax.
- *
- * <example name="ngControllerAs" module="controllerAsExample">
- * <file name="index.html">
- * <div id="ctrl-as-exmpl" ng-controller="SettingsController1 as settings">
- * <label>Name: <input type="text" ng-model="settings.name"/></label>
- * <button ng-click="settings.greet()">greet</button><br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in settings.contacts">
- * <select ng-model="contact.type" aria-label="Contact method" id="select_{{$index}}">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
- * <button ng-click="settings.clearContact(contact)">clear</button>
- * <button ng-click="settings.removeContact(contact)" aria-label="Remove">X</button>
- * </li>
- * <li><button ng-click="settings.addContact()">add</button></li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerAsExample', [])
- * .controller('SettingsController1', SettingsController1);
- *
- * function SettingsController1() {
- * this.name = "John Smith";
- * this.contacts = [
- * {type: 'phone', value: '408 555 1212'},
- * {type: 'email', value: 'john.smith@example.org'} ];
- * }
- *
- * SettingsController1.prototype.greet = function() {
- * alert(this.name);
- * };
- *
- * SettingsController1.prototype.addContact = function() {
- * this.contacts.push({type: 'email', value: 'yourname@example.org'});
- * };
- *
- * SettingsController1.prototype.removeContact = function(contactToRemove) {
- * var index = this.contacts.indexOf(contactToRemove);
- * this.contacts.splice(index, 1);
- * };
- *
- * SettingsController1.prototype.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller as', function() {
- * var container = element(by.id('ctrl-as-exmpl'));
- * expect(container.element(by.model('settings.name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- *
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.buttonText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.buttonText('add')).click();
- *
- * expect(container.element(by.repeater('contact in settings.contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- * </example>
- *
- * This example demonstrates the "attach to `$scope`" style of controller.
- *
- * <example name="ngController" module="controllerExample">
- * <file name="index.html">
- * <div id="ctrl-exmpl" ng-controller="SettingsController2">
- * <label>Name: <input type="text" ng-model="name"/></label>
- * <button ng-click="greet()">greet</button><br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in contacts">
- * <select ng-model="contact.type" id="select_{{$index}}">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
- * <button ng-click="clearContact(contact)">clear</button>
- * <button ng-click="removeContact(contact)">X</button>
- * </li>
- * <li>[ <button ng-click="addContact()">add</button> ]</li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerExample', [])
- * .controller('SettingsController2', ['$scope', SettingsController2]);
- *
- * function SettingsController2($scope) {
- * $scope.name = "John Smith";
- * $scope.contacts = [
- * {type:'phone', value:'408 555 1212'},
- * {type:'email', value:'john.smith@example.org'} ];
- *
- * $scope.greet = function() {
- * alert($scope.name);
- * };
- *
- * $scope.addContact = function() {
- * $scope.contacts.push({type:'email', value:'yourname@example.org'});
- * };
- *
- * $scope.removeContact = function(contactToRemove) {
- * var index = $scope.contacts.indexOf(contactToRemove);
- * $scope.contacts.splice(index, 1);
- * };
- *
- * $scope.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * }
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller', function() {
- * var container = element(by.id('ctrl-exmpl'));
- *
- * expect(container.element(by.model('name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.buttonText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.buttonText('add')).click();
- *
- * expect(container.element(by.repeater('contact in contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- *</example>
-
- */
-var ngControllerDirective = [function() {
- return {
- restrict: 'A',
- scope: true,
- controller: '@',
- priority: 500
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngCsp
- *
- * @element html
- * @description
- *
- * Angular has some features that can break certain
- * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.
- *
- * If you intend to implement these rules then you must tell Angular not to use these features.
- *
- * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.
- *
- *
- * The following rules affect Angular:
- *
- * * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions
- * (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%
- * increase in the speed of evaluating Angular expressions.
- *
- * * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular
- * makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).
- * To make these directives work when a CSP rule is blocking inline styles, you must link to the
- * `angular-csp.css` in your HTML manually.
- *
- * If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval
- * and automatically deactivates this feature in the {@link $parse} service. This autodetection,
- * however, triggers a CSP error to be logged in the console:
- *
- * ```
- * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
- * script in the following Content Security Policy directive: "default-src 'self'". Note that
- * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
- * ```
- *
- * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
- * directive on an element of the HTML document that appears before the `<script>` tag that loads
- * the `angular.js` file.
- *
- * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*
- *
- * You can specify which of the CSP related Angular features should be deactivated by providing
- * a value for the `ng-csp` attribute. The options are as follows:
- *
- * * no-inline-style: this stops Angular from injecting CSS styles into the DOM
- *
- * * no-unsafe-eval: this stops Angular from optimising $parse with unsafe eval of strings
- *
- * You can use these values in the following combinations:
- *
- *
- * * No declaration means that Angular will assume that you can do inline styles, but it will do
- * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions
- * of Angular.
- *
- * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline
- * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions
- * of Angular.
- *
- * * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject
- * inline styles. E.g. `<body ng-csp="no-unsafe-eval">`.
- *
- * * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can
- * run eval - no automcatic check for unsafe eval will occur. E.g. `<body ng-csp="no-inline-style">`
- *
- * * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject
- * styles nor use eval, which is the same as an empty: ng-csp.
- * E.g.`<body ng-csp="no-inline-style;no-unsafe-eval">`
- *
- * @example
- * This example shows how to apply the `ngCsp` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-csp>
- ...
- ...
- </html>
- ```
- * @example
- // Note: the suffix `.csp` in the example name triggers
- // csp mode in our http server!
- <example name="example.csp" module="cspExample" ng-csp="true">
- <file name="index.html">
- <div ng-controller="MainController as ctrl">
- <div>
- <button ng-click="ctrl.inc()" id="inc">Increment</button>
- <span id="counter">
- {{ctrl.counter}}
- </span>
- </div>
-
- <div>
- <button ng-click="ctrl.evil()" id="evil">Evil</button>
- <span id="evilError">
- {{ctrl.evilError}}
- </span>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cspExample', [])
- .controller('MainController', function() {
- this.counter = 0;
- this.inc = function() {
- this.counter++;
- };
- this.evil = function() {
- // jshint evil:true
- try {
- eval('1+2');
- } catch (e) {
- this.evilError = e.message;
- }
- };
- });
- </file>
- <file name="protractor.js" type="protractor">
- var util, webdriver;
-
- var incBtn = element(by.id('inc'));
- var counter = element(by.id('counter'));
- var evilBtn = element(by.id('evil'));
- var evilError = element(by.id('evilError'));
-
- function getAndClearSevereErrors() {
- return browser.manage().logs().get('browser').then(function(browserLog) {
- return browserLog.filter(function(logEntry) {
- return logEntry.level.value > webdriver.logging.Level.WARNING.value;
- });
- });
- }
-
- function clearErrors() {
- getAndClearSevereErrors();
- }
-
- function expectNoErrors() {
- getAndClearSevereErrors().then(function(filteredLog) {
- expect(filteredLog.length).toEqual(0);
- if (filteredLog.length) {
- console.log('browser console errors: ' + util.inspect(filteredLog));
- }
- });
- }
-
- function expectError(regex) {
- getAndClearSevereErrors().then(function(filteredLog) {
- var found = false;
- filteredLog.forEach(function(log) {
- if (log.message.match(regex)) {
- found = true;
- }
- });
- if (!found) {
- throw new Error('expected an error that matches ' + regex);
- }
- });
- }
-
- beforeEach(function() {
- util = require('util');
- webdriver = require('protractor/node_modules/selenium-webdriver');
- });
-
- // For now, we only test on Chrome,
- // as Safari does not load the page with Protractor's injected scripts,
- // and Firefox webdriver always disables content security policy (#6358)
- if (browser.params.browser !== 'chrome') {
- return;
- }
-
- it('should not report errors when the page is loaded', function() {
- // clear errors so we are not dependent on previous tests
- clearErrors();
- // Need to reload the page as the page is already loaded when
- // we come here
- browser.driver.getCurrentUrl().then(function(url) {
- browser.get(url);
- });
- expectNoErrors();
- });
-
- it('should evaluate expressions', function() {
- expect(counter.getText()).toEqual('0');
- incBtn.click();
- expect(counter.getText()).toEqual('1');
- expectNoErrors();
- });
-
- it('should throw and report an error when using "eval"', function() {
- evilBtn.click();
- expect(evilError.getText()).toMatch(/Content Security Policy/);
- expectError(/Content Security Policy/);
- });
- </file>
- </example>
- */
-
-// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
-// bootstrap the system (before $parse is instantiated), for this reason we just have
-// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc
-
-/**
- * @ngdoc directive
- * @name ngClick
- *
- * @description
- * The ngClick directive allows you to specify custom behavior when
- * an element is clicked.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
- * click. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-click="count = count + 1" ng-init="count=0">
- Increment
- </button>
- <span>
- count: {{count}}
- </span>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-click', function() {
- expect(element(by.binding('count')).getText()).toMatch('0');
- element(by.css('button')).click();
- expect(element(by.binding('count')).getText()).toMatch('1');
- });
- </file>
- </example>
- */
-/*
- * A collection of directives that allows creation of custom event handlers that are defined as
- * angular expressions and are compiled and executed within the current scope.
- */
-var ngEventDirectives = {};
-
-// For events that might fire synchronously during DOM manipulation
-// we need to execute their event handlers asynchronously using $evalAsync,
-// so that they are not executed in an inconsistent state.
-var forceAsyncEvents = {
- 'blur': true,
- 'focus': true
-};
-forEach(
- 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),
- function(eventName) {
- var directiveName = directiveNormalize('ng-' + eventName);
- ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {
- return {
- restrict: 'A',
- compile: function($element, attr) {
- // We expose the powerful $event object on the scope that provides access to the Window,
- // etc. that isn't protected by the fast paths in $parse. We explicitly request better
- // checks at the cost of speed since event handler expressions are not executed as
- // frequently as regular change detection.
- var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);
- return function ngEventHandler(scope, element) {
- element.on(eventName, function(event) {
- var callback = function() {
- fn(scope, {$event:event});
- };
- if (forceAsyncEvents[eventName] && $rootScope.$$phase) {
- scope.$evalAsync(callback);
- } else {
- scope.$apply(callback);
- }
- });
- };
- }
- };
- }];
- }
-);
-
-/**
- * @ngdoc directive
- * @name ngDblclick
- *
- * @description
- * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon
- * a dblclick. (The Event object is available as `$event`)
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-dblclick="count = count + 1" ng-init="count=0">
- Increment (on double click)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousedown
- *
- * @description
- * The ngMousedown directive allows you to specify custom behavior on mousedown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
- * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousedown="count = count + 1" ng-init="count=0">
- Increment (on mouse down)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseup
- *
- * @description
- * Specify custom behavior on mouseup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
- * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseup="count = count + 1" ng-init="count=0">
- Increment (on mouse up)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngMouseover
- *
- * @description
- * Specify custom behavior on mouseover event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
- * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseover="count = count + 1" ng-init="count=0">
- Increment (when mouse is over)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseenter
- *
- * @description
- * Specify custom behavior on mouseenter event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
- * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseenter="count = count + 1" ng-init="count=0">
- Increment (when mouse enters)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseleave
- *
- * @description
- * Specify custom behavior on mouseleave event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
- * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseleave="count = count + 1" ng-init="count=0">
- Increment (when mouse leaves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousemove
- *
- * @description
- * Specify custom behavior on mousemove event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
- * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousemove="count = count + 1" ng-init="count=0">
- Increment (when mouse moves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeydown
- *
- * @description
- * Specify custom behavior on keydown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon
- * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keydown="count = count + 1" ng-init="count=0">
- key down count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeyup
- *
- * @description
- * Specify custom behavior on keyup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon
- * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <p>Typing in the input box below updates the key count</p>
- <input ng-keyup="count = count + 1" ng-init="count=0"> key up count: {{count}}
-
- <p>Typing in the input box below updates the keycode</p>
- <input ng-keyup="event=$event">
- <p>event keyCode: {{ event.keyCode }}</p>
- <p>event altKey: {{ event.altKey }}</p>
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeypress
- *
- * @description
- * Specify custom behavior on keypress event.
- *
- * @element ANY
- * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
- * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
- * and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keypress="count = count + 1" ng-init="count=0">
- key press count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSubmit
- *
- * @description
- * Enables binding angular expressions to onsubmit events.
- *
- * Additionally it prevents the default action (which for form means sending the request to the
- * server and reloading the current page), but only if the form does not contain `action`,
- * `data-action`, or `x-action` attributes.
- *
- * <div class="alert alert-warning">
- * **Warning:** Be careful not to cause "double-submission" by using both the `ngClick` and
- * `ngSubmit` handlers together. See the
- * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}
- * for a detailed discussion of when `ngSubmit` may be triggered.
- * </div>
- *
- * @element form
- * @priority 0
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
- * ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example module="submitExample">
- <file name="index.html">
- <script>
- angular.module('submitExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [];
- $scope.text = 'hello';
- $scope.submit = function() {
- if ($scope.text) {
- $scope.list.push(this.text);
- $scope.text = '';
- }
- };
- }]);
- </script>
- <form ng-submit="submit()" ng-controller="ExampleController">
- Enter text and hit enter:
- <input type="text" ng-model="text" name="text" />
- <input type="submit" id="submit" value="Submit" />
- <pre>list={{list}}</pre>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-submit', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- expect(element(by.model('text')).getAttribute('value')).toBe('');
- });
- it('should ignore empty strings', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngFocus
- *
- * @description
- * Specify custom behavior on focus event.
- *
- * Note: As the `focus` event is executed synchronously when calling `input.focus()`
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
- * focus. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngBlur
- *
- * @description
- * Specify custom behavior on blur event.
- *
- * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when
- * an element has lost focus.
- *
- * Note: As the `blur` event is executed synchronously also during DOM manipulations
- * (e.g. removing a focussed input),
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
- * blur. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngCopy
- *
- * @description
- * Specify custom behavior on copy event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
- * copy. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-copy="copied=true" ng-init="copied=false; value='copy me'" ng-model="value">
- copied: {{copied}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngCut
- *
- * @description
- * Specify custom behavior on cut event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
- * cut. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-cut="cut=true" ng-init="cut=false; value='cut me'" ng-model="value">
- cut: {{cut}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngPaste
- *
- * @description
- * Specify custom behavior on paste event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
- * paste. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>
- pasted: {{paste}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngIf
- * @restrict A
- * @multiElement
- *
- * @description
- * The `ngIf` directive removes or recreates a portion of the DOM tree based on an
- * {expression}. If the expression assigned to `ngIf` evaluates to a false
- * value then the element is removed from the DOM, otherwise a clone of the
- * element is reinserted into the DOM.
- *
- * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the
- * element in the DOM rather than changing its visibility via the `display` css property. A common
- * case when this difference is significant is when using css selectors that rely on an element's
- * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.
- *
- * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope
- * is created when the element is restored. The scope created within `ngIf` inherits from
- * its parent scope using
- * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).
- * An important implication of this is if `ngModel` is used within `ngIf` to bind to
- * a javascript primitive defined in the parent scope. In this case any modifications made to the
- * variable within the child scope will override (hide) the value in the parent scope.
- *
- * Also, `ngIf` recreates elements using their compiled state. An example of this behavior
- * is if an element's class attribute is directly modified after it's compiled, using something like
- * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element
- * the added class will be lost because the original compiled state is used to regenerate the element.
- *
- * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`
- * and `leave` effects.
- *
- * @animations
- * enter - happens just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container
- * leave - happens just before the `ngIf` contents are removed from the DOM
- *
- * @element ANY
- * @scope
- * @priority 600
- * @param {expression} ngIf If the {@link guide/expression expression} is falsy then
- * the element is removed from the DOM tree. If it is truthy a copy of the compiled
- * element is added to the DOM tree.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <label>Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /></label><br/>
- Show when checked:
- <span ng-if="checked" class="animate-if">
- This is removed when the checkbox is unchecked.
- </span>
- </file>
- <file name="animations.css">
- .animate-if {
- background:white;
- border:1px solid black;
- padding:10px;
- }
-
- .animate-if.ng-enter, .animate-if.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .animate-if.ng-enter,
- .animate-if.ng-leave.ng-leave-active {
- opacity:0;
- }
-
- .animate-if.ng-leave,
- .animate-if.ng-enter.ng-enter-active {
- opacity:1;
- }
- </file>
- </example>
- */
-var ngIfDirective = ['$animate', function($animate) {
- return {
- multiElement: true,
- transclude: 'element',
- priority: 600,
- terminal: true,
- restrict: 'A',
- $$tlb: true,
- link: function($scope, $element, $attr, ctrl, $transclude) {
- var block, childScope, previousElements;
- $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {
-
- if (value) {
- if (!childScope) {
- $transclude(function(clone, newScope) {
- childScope = newScope;
- clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block = {
- clone: clone
- };
- $animate.enter(clone, $element.parent(), $element);
- });
- }
- } else {
- if (previousElements) {
- previousElements.remove();
- previousElements = null;
- }
- if (childScope) {
- childScope.$destroy();
- childScope = null;
- }
- if (block) {
- previousElements = getBlockNodes(block.clone);
- $animate.leave(previousElements).then(function() {
- previousElements = null;
- });
- block = null;
- }
- }
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngInclude
- * @restrict ECA
- *
- * @description
- * Fetches, compiles and includes an external HTML fragment.
- *
- * By default, the template URL is restricted to the same domain and protocol as the
- * application document. This is done by calling {@link $sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
- * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
- * {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link
- * ng.$sce Strict Contextual Escaping}.
- *
- * In addition, the browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy may further restrict whether the template is successfully loaded.
- * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`
- * access on some browsers.
- *
- * @animations
- * enter - animation is used to bring new content into the browser.
- * leave - animation is used to animate existing content away.
- *
- * The enter and leave animation occur concurrently.
- *
- * @scope
- * @priority 400
- *
- * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
- * make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
- * @param {string=} onload Expression to evaluate when a new partial is loaded.
- * <div class="alert alert-warning">
- * **Note:** When using onload on SVG elements in IE11, the browser will try to call
- * a function with the name on the window element, which will usually throw a
- * "function is undefined" error. To fix this, you can instead use `data-onload` or a
- * different form that {@link guide/directive#normalization matches} `onload`.
- * </div>
- *
- * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
- * $anchorScroll} to scroll the viewport after the content is loaded.
- *
- * - If the attribute is not set, disable scrolling.
- * - If the attribute is set without value, enable scrolling.
- * - Otherwise enable scrolling only if the expression evaluates to truthy value.
- *
- * @example
- <example module="includeExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="template" ng-options="t.name for t in templates">
- <option value="">(blank)</option>
- </select>
- url of the template: <code>{{template.url}}</code>
- <hr/>
- <div class="slide-animate-container">
- <div class="slide-animate" ng-include="template.url"></div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('includeExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.templates =
- [ { name: 'template1.html', url: 'template1.html'},
- { name: 'template2.html', url: 'template2.html'} ];
- $scope.template = $scope.templates[0];
- }]);
- </file>
- <file name="template1.html">
- Content of template1.html
- </file>
- <file name="template2.html">
- Content of template2.html
- </file>
- <file name="animations.css">
- .slide-animate-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .slide-animate {
- padding:10px;
- }
-
- .slide-animate.ng-enter, .slide-animate.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- display:block;
- padding:10px;
- }
-
- .slide-animate.ng-enter {
- top:-50px;
- }
- .slide-animate.ng-enter.ng-enter-active {
- top:0;
- }
-
- .slide-animate.ng-leave {
- top:0;
- }
- .slide-animate.ng-leave.ng-leave-active {
- top:50px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var templateSelect = element(by.model('template'));
- var includeElem = element(by.css('[ng-include]'));
-
- it('should load template1.html', function() {
- expect(includeElem.getText()).toMatch(/Content of template1.html/);
- });
-
- it('should load template2.html', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- // See https://github.com/angular/protractor/issues/480
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(2).click();
- expect(includeElem.getText()).toMatch(/Content of template2.html/);
- });
-
- it('should change to blank', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(0).click();
- expect(includeElem.isPresent()).toBe(false);
- });
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentRequested
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted every time the ngInclude content is requested.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentLoaded
- * @eventType emit on the current ngInclude scope
- * @description
- * Emitted every time the ngInclude content is reloaded.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentError
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',
- function($templateRequest, $anchorScroll, $animate) {
- return {
- restrict: 'ECA',
- priority: 400,
- terminal: true,
- transclude: 'element',
- controller: angular.noop,
- compile: function(element, attr) {
- var srcExp = attr.ngInclude || attr.src,
- onloadExp = attr.onload || '',
- autoScrollExp = attr.autoscroll;
-
- return function(scope, $element, $attr, ctrl, $transclude) {
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch(srcExp, function ngIncludeWatchAction(src) {
- var afterAnimation = function() {
- if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
- $anchorScroll();
- }
- };
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) return;
- var newScope = scope.$new();
- ctrl.template = response;
-
- // Note: This will also link all children of ng-include that were contained in the original
- // html. If that content contains controllers, ... they could pollute/change the scope.
- // However, using ng-include on an element with additional content does not make sense...
- // Note: We can't remove them in the cloneAttchFn of $transclude as that
- // function is called before linking the content, which would apply child
- // directives to non existing elements.
- var clone = $transclude(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, null, $element).then(afterAnimation);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- scope.$eval(onloadExp);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- ctrl.template = null;
- }
- });
- };
- }
- };
-}];
-
-// This directive is called during the $transclude call of the first `ngInclude` directive.
-// It will replace and compile the content of the element with the loaded template.
-// We need this directive so that the element content is already filled when
-// the link function of another directive on the same element as ngInclude
-// is called.
-var ngIncludeFillContentDirective = ['$compile',
- function($compile) {
- return {
- restrict: 'ECA',
- priority: -400,
- require: 'ngInclude',
- link: function(scope, $element, $attr, ctrl) {
- if (/SVG/.test($element[0].toString())) {
- // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not
- // support innerHTML, so detect this here and try to generate the contents
- // specially.
- $element.empty();
- $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,
- function namespaceAdaptedClone(clone) {
- $element.append(clone);
- }, {futureParentElement: $element});
- return;
- }
-
- $element.html(ctrl.template);
- $compile($element.contents())(scope);
- }
- };
- }];
-
-/**
- * @ngdoc directive
- * @name ngInit
- * @restrict AC
- *
- * @description
- * The `ngInit` directive allows you to evaluate an expression in the
- * current scope.
- *
- * <div class="alert alert-danger">
- * This directive can be abused to add unnecessary amounts of logic into your templates.
- * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of
- * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via
- * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}
- * rather than `ngInit` to initialize values on a scope.
- * </div>
- *
- * <div class="alert alert-warning">
- * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make
- * sure you have parentheses to ensure correct operator precedence:
- * <pre class="prettyprint">
- * `<div ng-init="test1 = ($index | toString)"></div>`
- * </pre>
- * </div>
- *
- * @priority 450
- *
- * @element ANY
- * @param {expression} ngInit {@link guide/expression Expression} to eval.
- *
- * @example
- <example module="initExample">
- <file name="index.html">
- <script>
- angular.module('initExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [['a', 'b'], ['c', 'd']];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <div ng-repeat="innerList in list" ng-init="outerIndex = $index">
- <div ng-repeat="value in innerList" ng-init="innerIndex = $index">
- <span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
- </div>
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should alias index positions', function() {
- var elements = element.all(by.css('.example-init'));
- expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');
- expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');
- expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');
- expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');
- });
- </file>
- </example>
- */
-var ngInitDirective = ngDirective({
- priority: 450,
- compile: function() {
- return {
- pre: function(scope, element, attrs) {
- scope.$eval(attrs.ngInit);
- }
- };
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngList
- *
- * @description
- * Text input that converts between a delimited string and an array of strings. The default
- * delimiter is a comma followed by a space - equivalent to `ng-list=", "`. You can specify a custom
- * delimiter as the value of the `ngList` attribute - for example, `ng-list=" | "`.
- *
- * The behaviour of the directive is affected by the use of the `ngTrim` attribute.
- * * If `ngTrim` is set to `"false"` then whitespace around both the separator and each
- * list item is respected. This implies that the user of the directive is responsible for
- * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a
- * tab or newline character.
- * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected
- * when joining the list items back together) and whitespace around each list item is stripped
- * before it is added to the model.
- *
- * ### Example with Validation
- *
- * <example name="ngList-directive" module="listExample">
- * <file name="app.js">
- * angular.module('listExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.names = ['morpheus', 'neo', 'trinity'];
- * }]);
- * </file>
- * <file name="index.html">
- * <form name="myForm" ng-controller="ExampleController">
- * <label>List: <input name="namesInput" ng-model="names" ng-list required></label>
- * <span role="alert">
- * <span class="error" ng-show="myForm.namesInput.$error.required">
- * Required!</span>
- * </span>
- * <br>
- * <tt>names = {{names}}</tt><br/>
- * <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>
- * <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>
- * <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- * <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- * </form>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var listInput = element(by.model('names'));
- * var names = element(by.exactBinding('names'));
- * var valid = element(by.binding('myForm.namesInput.$valid'));
- * var error = element(by.css('span.error'));
- *
- * it('should initialize to model', function() {
- * expect(names.getText()).toContain('["morpheus","neo","trinity"]');
- * expect(valid.getText()).toContain('true');
- * expect(error.getCssValue('display')).toBe('none');
- * });
- *
- * it('should be invalid if empty', function() {
- * listInput.clear();
- * listInput.sendKeys('');
- *
- * expect(names.getText()).toContain('');
- * expect(valid.getText()).toContain('false');
- * expect(error.getCssValue('display')).not.toBe('none');
- * });
- * </file>
- * </example>
- *
- * ### Example - splitting on newline
- * <example name="ngList-directive-newlines">
- * <file name="index.html">
- * <textarea ng-model="list" ng-list="&#10;" ng-trim="false"></textarea>
- * <pre>{{ list | json }}</pre>
- * </file>
- * <file name="protractor.js" type="protractor">
- * it("should split the text by newlines", function() {
- * var listInput = element(by.model('list'));
- * var output = element(by.binding('list | json'));
- * listInput.sendKeys('abc\ndef\nghi');
- * expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]');
- * });
- * </file>
- * </example>
- *
- * @element input
- * @param {string=} ngList optional delimiter that should be used to split the value.
- */
-var ngListDirective = function() {
- return {
- restrict: 'A',
- priority: 100,
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- // We want to control whitespace trimming so we use this convoluted approach
- // to access the ngList attribute, which doesn't pre-trim the attribute
- var ngList = element.attr(attr.$attr.ngList) || ', ';
- var trimValues = attr.ngTrim !== 'false';
- var separator = trimValues ? trim(ngList) : ngList;
-
- var parse = function(viewValue) {
- // If the viewValue is invalid (say required but empty) it will be `undefined`
- if (isUndefined(viewValue)) return;
-
- var list = [];
-
- if (viewValue) {
- forEach(viewValue.split(separator), function(value) {
- if (value) list.push(trimValues ? trim(value) : value);
- });
- }
-
- return list;
- };
-
- ctrl.$parsers.push(parse);
- ctrl.$formatters.push(function(value) {
- if (isArray(value)) {
- return value.join(ngList);
- }
-
- return undefined;
- });
-
- // Override the standard $isEmpty because an empty array means the input is empty.
- ctrl.$isEmpty = function(value) {
- return !value || !value.length;
- };
- }
- };
-};
-
-/* global VALID_CLASS: true,
- INVALID_CLASS: true,
- PRISTINE_CLASS: true,
- DIRTY_CLASS: true,
- UNTOUCHED_CLASS: true,
- TOUCHED_CLASS: true,
-*/
-
-var VALID_CLASS = 'ng-valid',
- INVALID_CLASS = 'ng-invalid',
- PRISTINE_CLASS = 'ng-pristine',
- DIRTY_CLASS = 'ng-dirty',
- UNTOUCHED_CLASS = 'ng-untouched',
- TOUCHED_CLASS = 'ng-touched',
- PENDING_CLASS = 'ng-pending';
-
-var ngModelMinErr = minErr('ngModel');
-
-/**
- * @ngdoc type
- * @name ngModel.NgModelController
- *
- * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a
- * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue
- * is set.
- * @property {*} $modelValue The value in the model that the control is bound to.
- * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
- the control reads value from the DOM. The functions are called in array order, each passing
- its return value through to the next. The last return value is forwarded to the
- {@link ngModel.NgModelController#$validators `$validators`} collection.
-
-Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue
-`$viewValue`}.
-
-Returning `undefined` from a parser means a parse error occurred. In that case,
-no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`
-will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}
-is set to `true`. The parse error is stored in `ngModel.$error.parse`.
-
- *
- * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
- the model value changes. The functions are called in reverse array order, each passing the value through to the
- next. The last return value is used as the actual DOM value.
- Used to format / convert values for display in the control.
- * ```js
- * function formatter(value) {
- * if (value) {
- * return value.toUpperCase();
- * }
- * }
- * ngModel.$formatters.push(formatter);
- * ```
- *
- * @property {Object.<string, function>} $validators A collection of validators that are applied
- * whenever the model value changes. The key value within the object refers to the name of the
- * validator while the function refers to the validation operation. The validation operation is
- * provided with the model value as an argument and must return a true or false value depending
- * on the response of that validation.
- *
- * ```js
- * ngModel.$validators.validCharacters = function(modelValue, viewValue) {
- * var value = modelValue || viewValue;
- * return /[0-9]+/.test(value) &&
- * /[a-z]+/.test(value) &&
- * /[A-Z]+/.test(value) &&
- * /\W+/.test(value);
- * };
- * ```
- *
- * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to
- * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided
- * is expected to return a promise when it is run during the model validation process. Once the promise
- * is delivered then the validation status will be set to true when fulfilled and false when rejected.
- * When the asynchronous validators are triggered, each of the validators will run in parallel and the model
- * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator
- * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators
- * will only run once all synchronous validators have passed.
- *
- * Please note that if $http is used then it is important that the server returns a success HTTP response code
- * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.
- *
- * ```js
- * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {
- * var value = modelValue || viewValue;
- *
- * // Lookup user by username
- * return $http.get('/api/users/' + value).
- * then(function resolved() {
- * //username exists, this means validation fails
- * return $q.reject('exists');
- * }, function rejected() {
- * //username does not exist, therefore this validation passes
- * return true;
- * });
- * };
- * ```
- *
- * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the
- * view value has changed. It is called with no arguments, and its return value is ignored.
- * This can be used in place of additional $watches against the model value.
- *
- * @property {Object} $error An object hash with all failing validator ids as keys.
- * @property {Object} $pending An object hash with all pending validator ids as keys.
- *
- * @property {boolean} $untouched True if control has not lost focus yet.
- * @property {boolean} $touched True if control has lost focus.
- * @property {boolean} $pristine True if user has not interacted with the control yet.
- * @property {boolean} $dirty True if user has already interacted with the control.
- * @property {boolean} $valid True if there is no error.
- * @property {boolean} $invalid True if at least one error on the control.
- * @property {string} $name The name attribute of the control.
- *
- * @description
- *
- * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.
- * The controller contains services for data-binding, validation, CSS updates, and value formatting
- * and parsing. It purposefully does not contain any logic which deals with DOM rendering or
- * listening to DOM events.
- * Such DOM related logic should be provided by other directives which make use of
- * `NgModelController` for data-binding to control elements.
- * Angular provides this DOM logic for most {@link input `input`} elements.
- * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example
- * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.
- *
- * @example
- * ### Custom Control Example
- * This example shows how to use `NgModelController` with a custom control to achieve
- * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
- * collaborate together to achieve the desired result.
- *
- * `contenteditable` is an HTML5 attribute, which tells the browser to let the element
- * contents be edited in place by the user.
- *
- * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}
- * module to automatically remove "bad" content like inline event listener (e.g. `<span onclick="...">`).
- * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks
- * that content using the `$sce` service.
- *
- * <example name="NgModelController" module="customControl" deps="angular-sanitize.js">
- <file name="style.css">
- [contenteditable] {
- border: 1px solid black;
- background-color: white;
- min-height: 20px;
- }
-
- .ng-invalid {
- border: 1px solid red;
- }
-
- </file>
- <file name="script.js">
- angular.module('customControl', ['ngSanitize']).
- directive('contenteditable', ['$sce', function($sce) {
- return {
- restrict: 'A', // only activate on element attribute
- require: '?ngModel', // get a hold of NgModelController
- link: function(scope, element, attrs, ngModel) {
- if (!ngModel) return; // do nothing if no ng-model
-
- // Specify how UI should be updated
- ngModel.$render = function() {
- element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));
- };
-
- // Listen for change events to enable binding
- element.on('blur keyup change', function() {
- scope.$evalAsync(read);
- });
- read(); // initialize
-
- // Write data to the model
- function read() {
- var html = element.html();
- // When we clear the content editable the browser leaves a <br> behind
- // If strip-br attribute is provided then we strip this out
- if ( attrs.stripBr && html == '<br>' ) {
- html = '';
- }
- ngModel.$setViewValue(html);
- }
- }
- };
- }]);
- </file>
- <file name="index.html">
- <form name="myForm">
- <div contenteditable
- name="myWidget" ng-model="userContent"
- strip-br="true"
- required>Change me!</div>
- <span ng-show="myForm.myWidget.$error.required">Required!</span>
- <hr>
- <textarea ng-model="userContent" aria-label="Dynamic textarea"></textarea>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should data-bind and become invalid', function() {
- if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {
- // SafariDriver can't handle contenteditable
- // and Firefox driver can't clear contenteditables very well
- return;
- }
- var contentEditable = element(by.css('[contenteditable]'));
- var content = 'Change me!';
-
- expect(contentEditable.getText()).toEqual(content);
-
- contentEditable.clear();
- contentEditable.sendKeys(protractor.Key.BACK_SPACE);
- expect(contentEditable.getText()).toEqual('');
- expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);
- });
- </file>
- * </example>
- *
- *
- */
-var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',
- function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {
- this.$viewValue = Number.NaN;
- this.$modelValue = Number.NaN;
- this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.
- this.$validators = {};
- this.$asyncValidators = {};
- this.$parsers = [];
- this.$formatters = [];
- this.$viewChangeListeners = [];
- this.$untouched = true;
- this.$touched = false;
- this.$pristine = true;
- this.$dirty = false;
- this.$valid = true;
- this.$invalid = false;
- this.$error = {}; // keep invalid keys here
- this.$$success = {}; // keep valid keys here
- this.$pending = undefined; // keep pending keys here
- this.$name = $interpolate($attr.name || '', false)($scope);
- this.$$parentForm = nullFormCtrl;
-
- var parsedNgModel = $parse($attr.ngModel),
- parsedNgModelAssign = parsedNgModel.assign,
- ngModelGet = parsedNgModel,
- ngModelSet = parsedNgModelAssign,
- pendingDebounce = null,
- parserValid,
- ctrl = this;
-
- this.$$setOptions = function(options) {
- ctrl.$options = options;
- if (options && options.getterSetter) {
- var invokeModelGetter = $parse($attr.ngModel + '()'),
- invokeModelSetter = $parse($attr.ngModel + '($$$p)');
-
- ngModelGet = function($scope) {
- var modelValue = parsedNgModel($scope);
- if (isFunction(modelValue)) {
- modelValue = invokeModelGetter($scope);
- }
- return modelValue;
- };
- ngModelSet = function($scope, newValue) {
- if (isFunction(parsedNgModel($scope))) {
- invokeModelSetter($scope, {$$$p: ctrl.$modelValue});
- } else {
- parsedNgModelAssign($scope, ctrl.$modelValue);
- }
- };
- } else if (!parsedNgModel.assign) {
- throw ngModelMinErr('nonassign', "Expression '{0}' is non-assignable. Element: {1}",
- $attr.ngModel, startingTag($element));
- }
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$render
- *
- * @description
- * Called when the view needs to be updated. It is expected that the user of the ng-model
- * directive will implement this method.
- *
- * The `$render()` method is invoked in the following situations:
- *
- * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last
- * committed value then `$render()` is called to update the input control.
- * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and
- * the `$viewValue` are different from last time.
- *
- * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of
- * `$modelValue` and `$viewValue` are actually different from their previous value. If `$modelValue`
- * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be
- * invoked if you only change a property on the objects.
- */
- this.$render = noop;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$isEmpty
- *
- * @description
- * This is called when we need to determine if the value of an input is empty.
- *
- * For instance, the required directive does this to work out if the input has data or not.
- *
- * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
- *
- * You can override this for input directives whose concept of being empty is different from the
- * default. The `checkboxInputType` directive does this because in its case a value of `false`
- * implies empty.
- *
- * @param {*} value The value of the input to check for emptiness.
- * @returns {boolean} True if `value` is "empty".
- */
- this.$isEmpty = function(value) {
- return isUndefined(value) || value === '' || value === null || value !== value;
- };
-
- var currentValidationRunId = 0;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setValidity
- *
- * @description
- * Change the validity state, and notify the form.
- *
- * This method can be called within $parsers/$formatters or a custom validation implementation.
- * However, in most cases it should be sufficient to use the `ngModel.$validators` and
- * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.
- *
- * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned
- * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`
- * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.
- * The `validationErrorKey` should be in camelCase and will get converted into dash-case
- * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`
- * class and can be bound to as `{{someForm.someControl.$error.myError}}` .
- * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),
- * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.
- * Skipped is used by Angular when validators do not run because of parse errors and
- * when `$asyncValidators` do not run because any of the `$validators` failed.
- */
- addSetValidityMethod({
- ctrl: this,
- $element: $element,
- set: function(object, property) {
- object[property] = true;
- },
- unset: function(object, property) {
- delete object[property];
- },
- $animate: $animate
- });
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setPristine
- *
- * @description
- * Sets the control to its pristine state.
- *
- * This method can be called to remove the `ng-dirty` class and set the control to its pristine
- * state (`ng-pristine` class). A model is considered to be pristine when the control
- * has not been changed from when first compiled.
- */
- this.$setPristine = function() {
- ctrl.$dirty = false;
- ctrl.$pristine = true;
- $animate.removeClass($element, DIRTY_CLASS);
- $animate.addClass($element, PRISTINE_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setDirty
- *
- * @description
- * Sets the control to its dirty state.
- *
- * This method can be called to remove the `ng-pristine` class and set the control to its dirty
- * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed
- * from when first compiled.
- */
- this.$setDirty = function() {
- ctrl.$dirty = true;
- ctrl.$pristine = false;
- $animate.removeClass($element, PRISTINE_CLASS);
- $animate.addClass($element, DIRTY_CLASS);
- ctrl.$$parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setUntouched
- *
- * @description
- * Sets the control to its untouched state.
- *
- * This method can be called to remove the `ng-touched` class and set the control to its
- * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched
- * by default, however this function can be used to restore that state if the model has
- * already been touched by the user.
- */
- this.$setUntouched = function() {
- ctrl.$touched = false;
- ctrl.$untouched = true;
- $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setTouched
- *
- * @description
- * Sets the control to its touched state.
- *
- * This method can be called to remove the `ng-untouched` class and set the control to its
- * touched state (`ng-touched` class). A model is considered to be touched when the user has
- * first focused the control element and then shifted focus away from the control (blur event).
- */
- this.$setTouched = function() {
- ctrl.$touched = true;
- ctrl.$untouched = false;
- $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$rollbackViewValue
- *
- * @description
- * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,
- * which may be caused by a pending debounced event or because the input is waiting for a some
- * future event.
- *
- * If you have an input that uses `ng-model-options` to set up debounced events or events such
- * as blur you can have a situation where there is a period when the `$viewValue`
- * is out of synch with the ngModel's `$modelValue`.
- *
- * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`
- * programmatically before these debounced/future events have resolved/occurred, because Angular's
- * dirty checking mechanism is not able to tell whether the model has actually changed or not.
- *
- * The `$rollbackViewValue()` method should be called before programmatically changing the model of an
- * input which may have such events pending. This is important in order to make sure that the
- * input field will be updated with the new model value and any pending operations are cancelled.
- *
- * <example name="ng-model-cancel-update" module="cancel-update-example">
- * <file name="app.js">
- * angular.module('cancel-update-example', [])
- *
- * .controller('CancelUpdateController', ['$scope', function($scope) {
- * $scope.resetWithCancel = function(e) {
- * if (e.keyCode == 27) {
- * $scope.myForm.myInput1.$rollbackViewValue();
- * $scope.myValue = '';
- * }
- * };
- * $scope.resetWithoutCancel = function(e) {
- * if (e.keyCode == 27) {
- * $scope.myValue = '';
- * }
- * };
- * }]);
- * </file>
- * <file name="index.html">
- * <div ng-controller="CancelUpdateController">
- * <p>Try typing something in each input. See that the model only updates when you
- * blur off the input.
- * </p>
- * <p>Now see what happens if you start typing then press the Escape key</p>
- *
- * <form name="myForm" ng-model-options="{ updateOn: 'blur' }">
- * <p id="inputDescription1">With $rollbackViewValue()</p>
- * <input name="myInput1" aria-describedby="inputDescription1" ng-model="myValue"
- * ng-keydown="resetWithCancel($event)"><br/>
- * myValue: "{{ myValue }}"
- *
- * <p id="inputDescription2">Without $rollbackViewValue()</p>
- * <input name="myInput2" aria-describedby="inputDescription2" ng-model="myValue"
- * ng-keydown="resetWithoutCancel($event)"><br/>
- * myValue: "{{ myValue }}"
- * </form>
- * </div>
- * </file>
- * </example>
- */
- this.$rollbackViewValue = function() {
- $timeout.cancel(pendingDebounce);
- ctrl.$viewValue = ctrl.$$lastCommittedViewValue;
- ctrl.$render();
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$validate
- *
- * @description
- * Runs each of the registered validators (first synchronous validators and then
- * asynchronous validators).
- * If the validity changes to invalid, the model will be set to `undefined`,
- * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.
- * If the validity changes to valid, it will set the model to the last available valid
- * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
- */
- this.$validate = function() {
- // ignore $validate before model is initialized
- if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {
- return;
- }
-
- var viewValue = ctrl.$$lastCommittedViewValue;
- // Note: we use the $$rawModelValue as $modelValue might have been
- // set to undefined during a view -> model update that found validation
- // errors. We can't parse the view here, since that could change
- // the model although neither viewValue nor the model on the scope changed
- var modelValue = ctrl.$$rawModelValue;
-
- var prevValid = ctrl.$valid;
- var prevModelValue = ctrl.$modelValue;
-
- var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
-
- ctrl.$$runValidators(modelValue, viewValue, function(allValid) {
- // If there was no change in validity, don't update the model
- // This prevents changing an invalid modelValue to undefined
- if (!allowInvalid && prevValid !== allValid) {
- // Note: Don't check ctrl.$valid here, as we could have
- // external validators (e.g. calculated on the server),
- // that just call $setValidity and need the model value
- // to calculate their validity.
- ctrl.$modelValue = allValid ? modelValue : undefined;
-
- if (ctrl.$modelValue !== prevModelValue) {
- ctrl.$$writeModelToScope();
- }
- }
- });
-
- };
-
- this.$$runValidators = function(modelValue, viewValue, doneCallback) {
- currentValidationRunId++;
- var localValidationRunId = currentValidationRunId;
-
- // check parser error
- if (!processParseErrors()) {
- validationDone(false);
- return;
- }
- if (!processSyncValidators()) {
- validationDone(false);
- return;
- }
- processAsyncValidators();
-
- function processParseErrors() {
- var errorKey = ctrl.$$parserName || 'parse';
- if (isUndefined(parserValid)) {
- setValidity(errorKey, null);
- } else {
- if (!parserValid) {
- forEach(ctrl.$validators, function(v, name) {
- setValidity(name, null);
- });
- forEach(ctrl.$asyncValidators, function(v, name) {
- setValidity(name, null);
- });
- }
- // Set the parse error last, to prevent unsetting it, should a $validators key == parserName
- setValidity(errorKey, parserValid);
- return parserValid;
- }
- return true;
- }
-
- function processSyncValidators() {
- var syncValidatorsValid = true;
- forEach(ctrl.$validators, function(validator, name) {
- var result = validator(modelValue, viewValue);
- syncValidatorsValid = syncValidatorsValid && result;
- setValidity(name, result);
- });
- if (!syncValidatorsValid) {
- forEach(ctrl.$asyncValidators, function(v, name) {
- setValidity(name, null);
- });
- return false;
- }
- return true;
- }
-
- function processAsyncValidators() {
- var validatorPromises = [];
- var allValid = true;
- forEach(ctrl.$asyncValidators, function(validator, name) {
- var promise = validator(modelValue, viewValue);
- if (!isPromiseLike(promise)) {
- throw ngModelMinErr("$asyncValidators",
- "Expected asynchronous validator to return a promise but got '{0}' instead.", promise);
- }
- setValidity(name, undefined);
- validatorPromises.push(promise.then(function() {
- setValidity(name, true);
- }, function(error) {
- allValid = false;
- setValidity(name, false);
- }));
- });
- if (!validatorPromises.length) {
- validationDone(true);
- } else {
- $q.all(validatorPromises).then(function() {
- validationDone(allValid);
- }, noop);
- }
- }
-
- function setValidity(name, isValid) {
- if (localValidationRunId === currentValidationRunId) {
- ctrl.$setValidity(name, isValid);
- }
- }
-
- function validationDone(allValid) {
- if (localValidationRunId === currentValidationRunId) {
-
- doneCallback(allValid);
- }
- }
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$commitViewValue
- *
- * @description
- * Commit a pending update to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`
- * usually handles calling this in response to input events.
- */
- this.$commitViewValue = function() {
- var viewValue = ctrl.$viewValue;
-
- $timeout.cancel(pendingDebounce);
-
- // If the view value has not changed then we should just exit, except in the case where there is
- // a native validator on the element. In this case the validation state may have changed even though
- // the viewValue has stayed empty.
- if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {
- return;
- }
- ctrl.$$lastCommittedViewValue = viewValue;
-
- // change to dirty
- if (ctrl.$pristine) {
- this.$setDirty();
- }
- this.$$parseAndValidate();
- };
-
- this.$$parseAndValidate = function() {
- var viewValue = ctrl.$$lastCommittedViewValue;
- var modelValue = viewValue;
- parserValid = isUndefined(modelValue) ? undefined : true;
-
- if (parserValid) {
- for (var i = 0; i < ctrl.$parsers.length; i++) {
- modelValue = ctrl.$parsers[i](modelValue);
- if (isUndefined(modelValue)) {
- parserValid = false;
- break;
- }
- }
- }
- if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {
- // ctrl.$modelValue has not been touched yet...
- ctrl.$modelValue = ngModelGet($scope);
- }
- var prevModelValue = ctrl.$modelValue;
- var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
- ctrl.$$rawModelValue = modelValue;
-
- if (allowInvalid) {
- ctrl.$modelValue = modelValue;
- writeToModelIfNeeded();
- }
-
- // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.
- // This can happen if e.g. $setViewValue is called from inside a parser
- ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {
- if (!allowInvalid) {
- // Note: Don't check ctrl.$valid here, as we could have
- // external validators (e.g. calculated on the server),
- // that just call $setValidity and need the model value
- // to calculate their validity.
- ctrl.$modelValue = allValid ? modelValue : undefined;
- writeToModelIfNeeded();
- }
- });
-
- function writeToModelIfNeeded() {
- if (ctrl.$modelValue !== prevModelValue) {
- ctrl.$$writeModelToScope();
- }
- }
- };
-
- this.$$writeModelToScope = function() {
- ngModelSet($scope, ctrl.$modelValue);
- forEach(ctrl.$viewChangeListeners, function(listener) {
- try {
- listener();
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setViewValue
- *
- * @description
- * Update the view value.
- *
- * This method should be called when a control wants to change the view value; typically,
- * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}
- * directive calls it when the value of the input changes and {@link ng.directive:select select}
- * calls it when an option is selected.
- *
- * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`
- * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
- * value sent directly for processing, finally to be applied to `$modelValue` and then the
- * **expression** specified in the `ng-model` attribute. Lastly, all the registered change listeners,
- * in the `$viewChangeListeners` list, are called.
- *
- * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`
- * and the `default` trigger is not listed, all those actions will remain pending until one of the
- * `updateOn` events is triggered on the DOM element.
- * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}
- * directive is used with a custom debounce for this particular event.
- * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`
- * is specified, once the timer runs out.
- *
- * When used with standard inputs, the view value will always be a string (which is in some cases
- * parsed into another type, such as a `Date` object for `input[date]`.)
- * However, custom controls might also pass objects to this method. In this case, we should make
- * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not
- * perform a deep watch of objects, it only looks for a change of identity. If you only change
- * the property of the object then ngModel will not realise that the object has changed and
- * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
- * not change properties of the copy once it has been passed to `$setViewValue`.
- * Otherwise you may cause the model value on the scope to change incorrectly.
- *
- * <div class="alert alert-info">
- * In any case, the value passed to the method should always reflect the current value
- * of the control. For example, if you are calling `$setViewValue` for an input element,
- * you should pass the input DOM value. Otherwise, the control and the scope model become
- * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change
- * the control's DOM value in any way. If we want to change the control's DOM value
- * programmatically, we should update the `ngModel` scope expression. Its new value will be
- * picked up by the model controller, which will run it through the `$formatters`, `$render` it
- * to update the DOM, and finally call `$validate` on it.
- * </div>
- *
- * @param {*} value value from the view.
- * @param {string} trigger Event that triggered the update.
- */
- this.$setViewValue = function(value, trigger) {
- ctrl.$viewValue = value;
- if (!ctrl.$options || ctrl.$options.updateOnDefault) {
- ctrl.$$debounceViewValueCommit(trigger);
- }
- };
-
- this.$$debounceViewValueCommit = function(trigger) {
- var debounceDelay = 0,
- options = ctrl.$options,
- debounce;
-
- if (options && isDefined(options.debounce)) {
- debounce = options.debounce;
- if (isNumber(debounce)) {
- debounceDelay = debounce;
- } else if (isNumber(debounce[trigger])) {
- debounceDelay = debounce[trigger];
- } else if (isNumber(debounce['default'])) {
- debounceDelay = debounce['default'];
- }
- }
-
- $timeout.cancel(pendingDebounce);
- if (debounceDelay) {
- pendingDebounce = $timeout(function() {
- ctrl.$commitViewValue();
- }, debounceDelay);
- } else if ($rootScope.$$phase) {
- ctrl.$commitViewValue();
- } else {
- $scope.$apply(function() {
- ctrl.$commitViewValue();
- });
- }
- };
-
- // model -> value
- // Note: we cannot use a normal scope.$watch as we want to detect the following:
- // 1. scope value is 'a'
- // 2. user enters 'b'
- // 3. ng-change kicks in and reverts scope value to 'a'
- // -> scope value did not change since the last digest as
- // ng-change executes in apply phase
- // 4. view should be changed back to 'a'
- $scope.$watch(function ngModelWatch() {
- var modelValue = ngModelGet($scope);
-
- // if scope model value and ngModel value are out of sync
- // TODO(perf): why not move this to the action fn?
- if (modelValue !== ctrl.$modelValue &&
- // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator
- (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)
- ) {
- ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;
- parserValid = undefined;
-
- var formatters = ctrl.$formatters,
- idx = formatters.length;
-
- var viewValue = modelValue;
- while (idx--) {
- viewValue = formatters[idx](viewValue);
- }
- if (ctrl.$viewValue !== viewValue) {
- ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;
- ctrl.$render();
-
- ctrl.$$runValidators(modelValue, viewValue, noop);
- }
- }
-
- return modelValue;
- });
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngModel
- *
- * @element input
- * @priority 1
- *
- * @description
- * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a
- * property on the scope using {@link ngModel.NgModelController NgModelController},
- * which is created and exposed by this directive.
- *
- * `ngModel` is responsible for:
- *
- * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`
- * require.
- * - Providing validation behavior (i.e. required, number, email, url).
- * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).
- * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`, `ng-untouched`) including animations.
- * - Registering the control with its parent {@link ng.directive:form form}.
- *
- * Note: `ngModel` will try to bind to the property given by evaluating the expression on the
- * current scope. If the property doesn't already exist on this scope, it will be created
- * implicitly and added to the scope.
- *
- * For best practices on using `ngModel`, see:
- *
- * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)
- *
- * For basic examples, how to use `ngModel`, see:
- *
- * - {@link ng.directive:input input}
- * - {@link input[text] text}
- * - {@link input[checkbox] checkbox}
- * - {@link input[radio] radio}
- * - {@link input[number] number}
- * - {@link input[email] email}
- * - {@link input[url] url}
- * - {@link input[date] date}
- * - {@link input[datetime-local] datetime-local}
- * - {@link input[time] time}
- * - {@link input[month] month}
- * - {@link input[week] week}
- * - {@link ng.directive:select select}
- * - {@link ng.directive:textarea textarea}
- *
- * # CSS classes
- * The following CSS classes are added and removed on the associated input/select/textarea element
- * depending on the validity of the model.
- *
- * - `ng-valid`: the model is valid
- * - `ng-invalid`: the model is invalid
- * - `ng-valid-[key]`: for each valid key added by `$setValidity`
- * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`
- * - `ng-pristine`: the control hasn't been interacted with yet
- * - `ng-dirty`: the control has been interacted with
- * - `ng-touched`: the control has been blurred
- * - `ng-untouched`: the control hasn't been blurred
- * - `ng-pending`: any `$asyncValidators` are unfulfilled
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- * ## Animation Hooks
- *
- * Animations within models are triggered when any of the associated CSS classes are added and removed
- * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,
- * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.
- * The animations that are triggered within ngModel are similar to how they work in ngClass and
- * animations can be hooked into using CSS transitions, keyframes as well as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style an input element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-input {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-input.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- * <example deps="angular-animate.js" animations="true" fixBase="true" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = '1';
- }]);
- </script>
- <style>
- .my-input {
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-input.ng-invalid {
- color:white;
- background: red;
- }
- </style>
- <p id="inputDescription">
- Update input to see transitions when valid/invalid.
- Integer is a valid value.
- </p>
- <form name="testForm" ng-controller="ExampleController">
- <input ng-model="val" ng-pattern="/^\d+$/" name="anim" class="my-input"
- aria-describedby="inputDescription" />
- </form>
- </file>
- * </example>
- *
- * ## Binding to a getter/setter
- *
- * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a
- * function that returns a representation of the model when called with zero arguments, and sets
- * the internal state of a model when called with an argument. It's sometimes useful to use this
- * for models that have an internal representation that's different from what the model exposes
- * to the view.
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more
- * frequently than other parts of your code.
- * </div>
- *
- * You use this behavior by adding `ng-model-options="{ getterSetter: true }"` to an element that
- * has `ng-model` attached to it. You can also add `ng-model-options="{ getterSetter: true }"` to
- * a `<form>`, which will enable this behavior for all `<input>`s within it. See
- * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.
- *
- * The following example shows how to use `ngModel` with a getter/setter:
- *
- * @example
- * <example name="ngModel-getter-setter" module="getterSetterExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ getterSetter: true }" />
- </label>
- </form>
- <pre>user.name = <span ng-bind="user.name()"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('getterSetterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- var _name = 'Brian';
- $scope.user = {
- name: function(newName) {
- // Note that newName can be undefined for two reasons:
- // 1. Because it is called as a getter and thus called with no arguments
- // 2. Because the property should actually be set to undefined. This happens e.g. if the
- // input is invalid
- return arguments.length ? (_name = newName) : _name;
- }
- };
- }]);
- </file>
- * </example>
- */
-var ngModelDirective = ['$rootScope', function($rootScope) {
- return {
- restrict: 'A',
- require: ['ngModel', '^?form', '^?ngModelOptions'],
- controller: NgModelController,
- // Prelink needs to run before any input directive
- // so that we can set the NgModelOptions in NgModelController
- // before anyone else uses it.
- priority: 1,
- compile: function ngModelCompile(element) {
- // Setup initial state of the control
- element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);
-
- return {
- pre: function ngModelPreLink(scope, element, attr, ctrls) {
- var modelCtrl = ctrls[0],
- formCtrl = ctrls[1] || modelCtrl.$$parentForm;
-
- modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);
-
- // notify others, especially parent forms
- formCtrl.$addControl(modelCtrl);
-
- attr.$observe('name', function(newValue) {
- if (modelCtrl.$name !== newValue) {
- modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);
- }
- });
-
- scope.$on('$destroy', function() {
- modelCtrl.$$parentForm.$removeControl(modelCtrl);
- });
- },
- post: function ngModelPostLink(scope, element, attr, ctrls) {
- var modelCtrl = ctrls[0];
- if (modelCtrl.$options && modelCtrl.$options.updateOn) {
- element.on(modelCtrl.$options.updateOn, function(ev) {
- modelCtrl.$$debounceViewValueCommit(ev && ev.type);
- });
- }
-
- element.on('blur', function(ev) {
- if (modelCtrl.$touched) return;
-
- if ($rootScope.$$phase) {
- scope.$evalAsync(modelCtrl.$setTouched);
- } else {
- scope.$apply(modelCtrl.$setTouched);
- }
- });
- }
- };
- }
- };
-}];
-
-var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/;
-
-/**
- * @ngdoc directive
- * @name ngModelOptions
- *
- * @description
- * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of
- * events that will trigger a model update and/or a debouncing delay so that the actual update only
- * takes place when a timer expires; this timer will be reset after another change takes place.
- *
- * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might
- * be different from the value in the actual model. This means that if you update the model you
- * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in
- * order to make sure it is synchronized with the model and that any debounced action is canceled.
- *
- * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}
- * method is by making sure the input is placed inside a form that has a `name` attribute. This is
- * important because `form` controllers are published to the related scope under the name in their
- * `name` attribute.
- *
- * Any pending changes will take place immediately when an enclosing form is submitted via the
- * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
- * to have access to the updated model.
- *
- * `ngModelOptions` has an effect on the element it's declared on and its descendants.
- *
- * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:
- * - `updateOn`: string specifying which event should the input be bound to. You can set several
- * events using an space delimited list. There is a special event called `default` that
- * matches the default events belonging of the control.
- * - `debounce`: integer value which contains the debounce model update value in milliseconds. A
- * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a
- * custom value for each event. For example:
- * `ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }"`
- * - `allowInvalid`: boolean value which indicates that the model can be set with values that did
- * not validate correctly instead of the default behavior of setting the model to undefined.
- * - `getterSetter`: boolean value which determines whether or not to treat functions bound to
- `ngModel` as getters/setters.
- * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for
- * `<input type="date">`, `<input type="time">`, ... . It understands UTC/GMT and the
- * continental US time zone abbreviations, but for general use, use a time zone offset, for
- * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
- * If not specified, the timezone of the browser will be used.
- *
- * @example
-
- The following example shows how to override immediate updates. Changes on the inputs within the
- form will update the model only when the control loses focus (blur event). If `escape` key is
- pressed while the input field is focused, the value is reset to the value in the current model.
-
- <example name="ngModelOptions-directive-blur" module="optionsExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ updateOn: 'blur' }"
- ng-keyup="cancel($event)" />
- </label><br />
- <label>Other data:
- <input type="text" ng-model="user.data" />
- </label><br />
- </form>
- <pre>user.name = <span ng-bind="user.name"></span></pre>
- <pre>user.data = <span ng-bind="user.data"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('optionsExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'John', data: '' };
-
- $scope.cancel = function(e) {
- if (e.keyCode == 27) {
- $scope.userForm.userName.$rollbackViewValue();
- }
- };
- }]);
- </file>
- <file name="protractor.js" type="protractor">
- var model = element(by.binding('user.name'));
- var input = element(by.model('user.name'));
- var other = element(by.model('user.data'));
-
- it('should allow custom events', function() {
- input.sendKeys(' Doe');
- input.click();
- expect(model.getText()).toEqual('John');
- other.click();
- expect(model.getText()).toEqual('John Doe');
- });
-
- it('should $rollbackViewValue when model changes', function() {
- input.sendKeys(' Doe');
- expect(input.getAttribute('value')).toEqual('John Doe');
- input.sendKeys(protractor.Key.ESCAPE);
- expect(input.getAttribute('value')).toEqual('John');
- other.click();
- expect(model.getText()).toEqual('John');
- });
- </file>
- </example>
-
- This one shows how to debounce model changes. Model will be updated only 1 sec after last change.
- If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.
-
- <example name="ngModelOptions-directive-debounce" module="optionsExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ debounce: 1000 }" />
- </label>
- <button ng-click="userForm.userName.$rollbackViewValue(); user.name=''">Clear</button>
- <br />
- </form>
- <pre>user.name = <span ng-bind="user.name"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('optionsExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'Igor' };
- }]);
- </file>
- </example>
-
- This one shows how to bind to getter/setters:
-
- <example name="ngModelOptions-directive-getter-setter" module="getterSetterExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ getterSetter: true }" />
- </label>
- </form>
- <pre>user.name = <span ng-bind="user.name()"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('getterSetterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- var _name = 'Brian';
- $scope.user = {
- name: function(newName) {
- // Note that newName can be undefined for two reasons:
- // 1. Because it is called as a getter and thus called with no arguments
- // 2. Because the property should actually be set to undefined. This happens e.g. if the
- // input is invalid
- return arguments.length ? (_name = newName) : _name;
- }
- };
- }]);
- </file>
- </example>
- */
-var ngModelOptionsDirective = function() {
- return {
- restrict: 'A',
- controller: ['$scope', '$attrs', function($scope, $attrs) {
- var that = this;
- this.$options = copy($scope.$eval($attrs.ngModelOptions));
- // Allow adding/overriding bound events
- if (isDefined(this.$options.updateOn)) {
- this.$options.updateOnDefault = false;
- // extract "default" pseudo-event from list of events that can trigger a model update
- this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
- that.$options.updateOnDefault = true;
- return ' ';
- }));
- } else {
- this.$options.updateOnDefault = true;
- }
- }]
- };
-};
-
-
-
-// helper methods
-function addSetValidityMethod(context) {
- var ctrl = context.ctrl,
- $element = context.$element,
- classCache = {},
- set = context.set,
- unset = context.unset,
- $animate = context.$animate;
-
- classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));
-
- ctrl.$setValidity = setValidity;
-
- function setValidity(validationErrorKey, state, controller) {
- if (isUndefined(state)) {
- createAndSet('$pending', validationErrorKey, controller);
- } else {
- unsetAndCleanup('$pending', validationErrorKey, controller);
- }
- if (!isBoolean(state)) {
- unset(ctrl.$error, validationErrorKey, controller);
- unset(ctrl.$$success, validationErrorKey, controller);
- } else {
- if (state) {
- unset(ctrl.$error, validationErrorKey, controller);
- set(ctrl.$$success, validationErrorKey, controller);
- } else {
- set(ctrl.$error, validationErrorKey, controller);
- unset(ctrl.$$success, validationErrorKey, controller);
- }
- }
- if (ctrl.$pending) {
- cachedToggleClass(PENDING_CLASS, true);
- ctrl.$valid = ctrl.$invalid = undefined;
- toggleValidationCss('', null);
- } else {
- cachedToggleClass(PENDING_CLASS, false);
- ctrl.$valid = isObjectEmpty(ctrl.$error);
- ctrl.$invalid = !ctrl.$valid;
- toggleValidationCss('', ctrl.$valid);
- }
-
- // re-read the state as the set/unset methods could have
- // combined state in ctrl.$error[validationError] (used for forms),
- // where setting/unsetting only increments/decrements the value,
- // and does not replace it.
- var combinedState;
- if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {
- combinedState = undefined;
- } else if (ctrl.$error[validationErrorKey]) {
- combinedState = false;
- } else if (ctrl.$$success[validationErrorKey]) {
- combinedState = true;
- } else {
- combinedState = null;
- }
-
- toggleValidationCss(validationErrorKey, combinedState);
- ctrl.$$parentForm.$setValidity(validationErrorKey, combinedState, ctrl);
- }
-
- function createAndSet(name, value, controller) {
- if (!ctrl[name]) {
- ctrl[name] = {};
- }
- set(ctrl[name], value, controller);
- }
-
- function unsetAndCleanup(name, value, controller) {
- if (ctrl[name]) {
- unset(ctrl[name], value, controller);
- }
- if (isObjectEmpty(ctrl[name])) {
- ctrl[name] = undefined;
- }
- }
-
- function cachedToggleClass(className, switchValue) {
- if (switchValue && !classCache[className]) {
- $animate.addClass($element, className);
- classCache[className] = true;
- } else if (!switchValue && classCache[className]) {
- $animate.removeClass($element, className);
- classCache[className] = false;
- }
- }
-
- function toggleValidationCss(validationErrorKey, isValid) {
- validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
-
- cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);
- cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);
- }
-}
-
-function isObjectEmpty(obj) {
- if (obj) {
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- return false;
- }
- }
- }
- return true;
-}
-
-/**
- * @ngdoc directive
- * @name ngNonBindable
- * @restrict AC
- * @priority 1000
- *
- * @description
- * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current
- * DOM element. This is useful if the element contains what appears to be Angular directives and
- * bindings but which should be ignored by Angular. This could be the case if you have a site that
- * displays snippets of code, for instance.
- *
- * @element ANY
- *
- * @example
- * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,
- * but the one wrapped in `ngNonBindable` is left alone.
- *
- * @example
- <example>
- <file name="index.html">
- <div>Normal: {{1 + 2}}</div>
- <div ng-non-bindable>Ignored: {{1 + 2}}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-non-bindable', function() {
- expect(element(by.binding('1 + 2')).getText()).toContain('3');
- expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/);
- });
- </file>
- </example>
- */
-var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
-
-/* global jqLiteRemove */
-
-var ngOptionsMinErr = minErr('ngOptions');
-
-/**
- * @ngdoc directive
- * @name ngOptions
- * @restrict A
- *
- * @description
- *
- * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`
- * elements for the `<select>` element using the array or object obtained by evaluating the
- * `ngOptions` comprehension expression.
- *
- * In many cases, `ngRepeat` can be used on `<option>` elements instead of `ngOptions` to achieve a
- * similar result. However, `ngOptions` provides some benefits such as reducing memory and
- * increasing speed by not creating a new scope for each repeated instance, as well as providing
- * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
- * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound
- * to a non-string value. This is because an option element can only be bound to string values at
- * present.
- *
- * When an item in the `<select>` menu is selected, the array element or object property
- * represented by the selected option will be bound to the model identified by the `ngModel`
- * directive.
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * ## Complex Models (objects or collections)
- *
- * By default, `ngModel` watches the model by reference, not value. This is important to know when
- * binding the select to a model that is an object or a collection.
- *
- * One issue occurs if you want to preselect an option. For example, if you set
- * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,
- * because the objects are not identical. So by default, you should always reference the item in your collection
- * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.
- *
- * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity
- * of the item not by reference, but by the result of the `track by` expression. For example, if your
- * collection items have an id property, you would `track by item.id`.
- *
- * A different issue with objects or collections is that ngModel won't detect if an object property or
- * a collection item changes. For that reason, `ngOptions` additionally watches the model using
- * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.
- * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection
- * has not changed identity, but only a property on the object or an item in the collection changes.
- *
- * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection
- * if the model is an array). This means that changing a property deeper than the first level inside the
- * object/collection will not trigger a re-rendering.
- *
- * ## `select` **`as`**
- *
- * Using `select` **`as`** will bind the result of the `select` expression to the model, but
- * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)
- * or property name (for object data sources) of the value within the collection. If a **`track by`** expression
- * is used, the result of that expression will be set as the value of the `option` and `select` elements.
- *
- *
- * ### `select` **`as`** and **`track by`**
- *
- * <div class="alert alert-warning">
- * Be careful when using `select` **`as`** and **`track by`** in the same expression.
- * </div>
- *
- * Given this array of items on the $scope:
- *
- * ```js
- * $scope.items = [{
- * id: 1,
- * label: 'aLabel',
- * subItem: { name: 'aSubItem' }
- * }, {
- * id: 2,
- * label: 'bLabel',
- * subItem: { name: 'bSubItem' }
- * }];
- * ```
- *
- * This will work:
- *
- * ```html
- * <select ng-options="item as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0];
- * ```
- *
- * but this will not work:
- *
- * ```html
- * <select ng-options="item.subItem as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0].subItem;
- * ```
- *
- * In both examples, the **`track by`** expression is applied successfully to each `item` in the
- * `items` array. Because the selected option has been set programmatically in the controller, the
- * **`track by`** expression is also applied to the `ngModel` value. In the first example, the
- * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with
- * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**
- * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value
- * is not matched against any `<option>` and the `<select>` appears as having no selected value.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required The control is considered valid only if value is entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {comprehension_expression=} ngOptions in one of the following forms:
- *
- * * for array data sources:
- * * `label` **`for`** `value` **`in`** `array`
- * * `select` **`as`** `label` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`
- * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`
- * (for including a filter with `track by`)
- * * for object data sources:
- * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`group by`** `group`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`disable when`** `disable`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- *
- * Where:
- *
- * * `array` / `object`: an expression which evaluates to an array / object to iterate over.
- * * `value`: local variable which will refer to each item in the `array` or each property value
- * of `object` during iteration.
- * * `key`: local variable which will refer to a property name in `object` during iteration.
- * * `label`: The result of this expression will be the label for `<option>` element. The
- * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).
- * * `select`: The result of this expression will be bound to the model of the parent `<select>`
- * element. If not specified, `select` expression will default to `value`.
- * * `group`: The result of this expression will be used to group options using the `<optgroup>`
- * DOM element.
- * * `disable`: The result of this expression will be used to disable the rendered `<option>`
- * element. Return `true` to disable.
- * * `trackexpr`: Used when working with an array of objects. The result of this expression will be
- * used to identify the objects in the array. The `trackexpr` will most likely refer to the
- * `value` variable (e.g. `value.propertyName`). With this the selection is preserved
- * even when the options are recreated (e.g. reloaded from the server).
- *
- * @example
- <example module="selectExample">
- <file name="index.html">
- <script>
- angular.module('selectExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.colors = [
- {name:'black', shade:'dark'},
- {name:'white', shade:'light', notAnOption: true},
- {name:'red', shade:'dark'},
- {name:'blue', shade:'dark', notAnOption: true},
- {name:'yellow', shade:'light', notAnOption: false}
- ];
- $scope.myColor = $scope.colors[2]; // red
- }]);
- </script>
- <div ng-controller="ExampleController">
- <ul>
- <li ng-repeat="color in colors">
- <label>Name: <input ng-model="color.name"></label>
- <label><input type="checkbox" ng-model="color.notAnOption"> Disabled?</label>
- <button ng-click="colors.splice($index, 1)" aria-label="Remove">X</button>
- </li>
- <li>
- <button ng-click="colors.push({})">add</button>
- </li>
- </ul>
- <hr/>
- <label>Color (null not allowed):
- <select ng-model="myColor" ng-options="color.name for color in colors"></select>
- </label><br/>
- <label>Color (null allowed):
- <span class="nullable">
- <select ng-model="myColor" ng-options="color.name for color in colors">
- <option value="">-- choose color --</option>
- </select>
- </span></label><br/>
-
- <label>Color grouped by shade:
- <select ng-model="myColor" ng-options="color.name group by color.shade for color in colors">
- </select>
- </label><br/>
-
- <label>Color grouped by shade, with some disabled:
- <select ng-model="myColor"
- ng-options="color.name group by color.shade disable when color.notAnOption for color in colors">
- </select>
- </label><br/>
-
-
-
- Select <button ng-click="myColor = { name:'not in list', shade: 'other' }">bogus</button>.
- <br/>
- <hr/>
- Currently selected: {{ {selected_color:myColor} }}
- <div style="border:solid 1px black; height:20px"
- ng-style="{'background-color':myColor.name}">
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-options', function() {
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');
- element.all(by.model('myColor')).first().click();
- element.all(by.css('select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');
- element(by.css('.nullable select[ng-model="myColor"]')).click();
- element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');
- });
- </file>
- </example>
- */
-
-// jshint maxlen: false
-// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999
-var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/;
- // 1: value expression (valueFn)
- // 2: label expression (displayFn)
- // 3: group by expression (groupByFn)
- // 4: disable when expression (disableWhenFn)
- // 5: array item variable name
- // 6: object item key variable name
- // 7: object item value variable name
- // 8: collection expression
- // 9: track by expression
-// jshint maxlen: 100
-
-
-var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
-
- function parseOptionsExpression(optionsExp, selectElement, scope) {
-
- var match = optionsExp.match(NG_OPTIONS_REGEXP);
- if (!(match)) {
- throw ngOptionsMinErr('iexp',
- "Expected expression in form of " +
- "'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +
- " but got '{0}'. Element: {1}",
- optionsExp, startingTag(selectElement));
- }
-
- // Extract the parts from the ngOptions expression
-
- // The variable name for the value of the item in the collection
- var valueName = match[5] || match[7];
- // The variable name for the key of the item in the collection
- var keyName = match[6];
-
- // An expression that generates the viewValue for an option if there is a label expression
- var selectAs = / as /.test(match[0]) && match[1];
- // An expression that is used to track the id of each object in the options collection
- var trackBy = match[9];
- // An expression that generates the viewValue for an option if there is no label expression
- var valueFn = $parse(match[2] ? match[1] : valueName);
- var selectAsFn = selectAs && $parse(selectAs);
- var viewValueFn = selectAsFn || valueFn;
- var trackByFn = trackBy && $parse(trackBy);
-
- // Get the value by which we are going to track the option
- // if we have a trackFn then use that (passing scope and locals)
- // otherwise just hash the given viewValue
- var getTrackByValueFn = trackBy ?
- function(value, locals) { return trackByFn(scope, locals); } :
- function getHashOfValue(value) { return hashKey(value); };
- var getTrackByValue = function(value, key) {
- return getTrackByValueFn(value, getLocals(value, key));
- };
-
- var displayFn = $parse(match[2] || match[1]);
- var groupByFn = $parse(match[3] || '');
- var disableWhenFn = $parse(match[4] || '');
- var valuesFn = $parse(match[8]);
-
- var locals = {};
- var getLocals = keyName ? function(value, key) {
- locals[keyName] = key;
- locals[valueName] = value;
- return locals;
- } : function(value) {
- locals[valueName] = value;
- return locals;
- };
-
-
- function Option(selectValue, viewValue, label, group, disabled) {
- this.selectValue = selectValue;
- this.viewValue = viewValue;
- this.label = label;
- this.group = group;
- this.disabled = disabled;
- }
-
- function getOptionValuesKeys(optionValues) {
- var optionValuesKeys;
-
- if (!keyName && isArrayLike(optionValues)) {
- optionValuesKeys = optionValues;
- } else {
- // if object, extract keys, in enumeration order, unsorted
- optionValuesKeys = [];
- for (var itemKey in optionValues) {
- if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {
- optionValuesKeys.push(itemKey);
- }
- }
- }
- return optionValuesKeys;
- }
-
- return {
- trackBy: trackBy,
- getTrackByValue: getTrackByValue,
- getWatchables: $parse(valuesFn, function(optionValues) {
- // Create a collection of things that we would like to watch (watchedArray)
- // so that they can all be watched using a single $watchCollection
- // that only runs the handler once if anything changes
- var watchedArray = [];
- optionValues = optionValues || [];
-
- var optionValuesKeys = getOptionValuesKeys(optionValues);
- var optionValuesLength = optionValuesKeys.length;
- for (var index = 0; index < optionValuesLength; index++) {
- var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];
- var value = optionValues[key];
-
- var locals = getLocals(optionValues[key], key);
- var selectValue = getTrackByValueFn(optionValues[key], locals);
- watchedArray.push(selectValue);
-
- // Only need to watch the displayFn if there is a specific label expression
- if (match[2] || match[1]) {
- var label = displayFn(scope, locals);
- watchedArray.push(label);
- }
-
- // Only need to watch the disableWhenFn if there is a specific disable expression
- if (match[4]) {
- var disableWhen = disableWhenFn(scope, locals);
- watchedArray.push(disableWhen);
- }
- }
- return watchedArray;
- }),
-
- getOptions: function() {
-
- var optionItems = [];
- var selectValueMap = {};
-
- // The option values were already computed in the `getWatchables` fn,
- // which must have been called to trigger `getOptions`
- var optionValues = valuesFn(scope) || [];
- var optionValuesKeys = getOptionValuesKeys(optionValues);
- var optionValuesLength = optionValuesKeys.length;
-
- for (var index = 0; index < optionValuesLength; index++) {
- var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];
- var value = optionValues[key];
- var locals = getLocals(value, key);
- var viewValue = viewValueFn(scope, locals);
- var selectValue = getTrackByValueFn(viewValue, locals);
- var label = displayFn(scope, locals);
- var group = groupByFn(scope, locals);
- var disabled = disableWhenFn(scope, locals);
- var optionItem = new Option(selectValue, viewValue, label, group, disabled);
-
- optionItems.push(optionItem);
- selectValueMap[selectValue] = optionItem;
- }
-
- return {
- items: optionItems,
- selectValueMap: selectValueMap,
- getOptionFromViewValue: function(value) {
- return selectValueMap[getTrackByValue(value)];
- },
- getViewValueFromOption: function(option) {
- // If the viewValue could be an object that may be mutated by the application,
- // we need to make a copy and not return the reference to the value on the option.
- return trackBy ? angular.copy(option.viewValue) : option.viewValue;
- }
- };
- }
- };
- }
-
-
- // we can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- var optionTemplate = document.createElement('option'),
- optGroupTemplate = document.createElement('optgroup');
-
-
- function ngOptionsPostLink(scope, selectElement, attr, ctrls) {
-
- // if ngModel is not defined, we don't need to do anything
- var ngModelCtrl = ctrls[1];
- if (!ngModelCtrl) return;
-
- var selectCtrl = ctrls[0];
- var multiple = attr.multiple;
-
- // The emptyOption allows the application developer to provide their own custom "empty"
- // option when the viewValue does not match any of the option values.
- var emptyOption;
- for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {
- if (children[i].value === '') {
- emptyOption = children.eq(i);
- break;
- }
- }
-
- var providedEmptyOption = !!emptyOption;
-
- var unknownOption = jqLite(optionTemplate.cloneNode(false));
- unknownOption.val('?');
-
- var options;
- var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);
-
-
- var renderEmptyOption = function() {
- if (!providedEmptyOption) {
- selectElement.prepend(emptyOption);
- }
- selectElement.val('');
- emptyOption.prop('selected', true); // needed for IE
- emptyOption.attr('selected', true);
- };
-
- var removeEmptyOption = function() {
- if (!providedEmptyOption) {
- emptyOption.remove();
- }
- };
-
-
- var renderUnknownOption = function() {
- selectElement.prepend(unknownOption);
- selectElement.val('?');
- unknownOption.prop('selected', true); // needed for IE
- unknownOption.attr('selected', true);
- };
-
- var removeUnknownOption = function() {
- unknownOption.remove();
- };
-
- // Update the controller methods for multiple selectable options
- if (!multiple) {
-
- selectCtrl.writeValue = function writeNgOptionsValue(value) {
- var option = options.getOptionFromViewValue(value);
-
- if (option && !option.disabled) {
- if (selectElement[0].value !== option.selectValue) {
- removeUnknownOption();
- removeEmptyOption();
-
- selectElement[0].value = option.selectValue;
- option.element.selected = true;
- option.element.setAttribute('selected', 'selected');
- }
- } else {
- if (value === null || providedEmptyOption) {
- removeUnknownOption();
- renderEmptyOption();
- } else {
- removeEmptyOption();
- renderUnknownOption();
- }
- }
- };
-
- selectCtrl.readValue = function readNgOptionsValue() {
-
- var selectedOption = options.selectValueMap[selectElement.val()];
-
- if (selectedOption && !selectedOption.disabled) {
- removeEmptyOption();
- removeUnknownOption();
- return options.getViewValueFromOption(selectedOption);
- }
- return null;
- };
-
- // If we are using `track by` then we must watch the tracked value on the model
- // since ngModel only watches for object identity change
- if (ngOptions.trackBy) {
- scope.$watch(
- function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },
- function() { ngModelCtrl.$render(); }
- );
- }
-
- } else {
-
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
-
-
- selectCtrl.writeValue = function writeNgOptionsMultiple(value) {
- options.items.forEach(function(option) {
- option.element.selected = false;
- });
-
- if (value) {
- value.forEach(function(item) {
- var option = options.getOptionFromViewValue(item);
- if (option && !option.disabled) option.element.selected = true;
- });
- }
- };
-
-
- selectCtrl.readValue = function readNgOptionsMultiple() {
- var selectedValues = selectElement.val() || [],
- selections = [];
-
- forEach(selectedValues, function(value) {
- var option = options.selectValueMap[value];
- if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));
- });
-
- return selections;
- };
-
- // If we are using `track by` then we must watch these tracked values on the model
- // since ngModel only watches for object identity change
- if (ngOptions.trackBy) {
-
- scope.$watchCollection(function() {
- if (isArray(ngModelCtrl.$viewValue)) {
- return ngModelCtrl.$viewValue.map(function(value) {
- return ngOptions.getTrackByValue(value);
- });
- }
- }, function() {
- ngModelCtrl.$render();
- });
-
- }
- }
-
-
- if (providedEmptyOption) {
-
- // we need to remove it before calling selectElement.empty() because otherwise IE will
- // remove the label from the element. wtf?
- emptyOption.remove();
-
- // compile the element since there might be bindings in it
- $compile(emptyOption)(scope);
-
- // remove the class, which is added automatically because we recompile the element and it
- // becomes the compilation root
- emptyOption.removeClass('ng-scope');
- } else {
- emptyOption = jqLite(optionTemplate.cloneNode(false));
- }
-
- // We need to do this here to ensure that the options object is defined
- // when we first hit it in writeNgOptionsValue
- updateOptions();
-
- // We will re-render the option elements if the option values or labels change
- scope.$watchCollection(ngOptions.getWatchables, updateOptions);
-
- // ------------------------------------------------------------------ //
-
-
- function updateOptionElement(option, element) {
- option.element = element;
- element.disabled = option.disabled;
- // NOTE: The label must be set before the value, otherwise IE10/11/EDGE create unresponsive
- // selects in certain circumstances when multiple selects are next to each other and display
- // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].
- // See https://github.com/angular/angular.js/issues/11314 for more info.
- // This is unfortunately untestable with unit / e2e tests
- if (option.label !== element.label) {
- element.label = option.label;
- element.textContent = option.label;
- }
- if (option.value !== element.value) element.value = option.selectValue;
- }
-
- function addOrReuseElement(parent, current, type, templateElement) {
- var element;
- // Check whether we can reuse the next element
- if (current && lowercase(current.nodeName) === type) {
- // The next element is the right type so reuse it
- element = current;
- } else {
- // The next element is not the right type so create a new one
- element = templateElement.cloneNode(false);
- if (!current) {
- // There are no more elements so just append it to the select
- parent.appendChild(element);
- } else {
- // The next element is not a group so insert the new one
- parent.insertBefore(element, current);
- }
- }
- return element;
- }
-
-
- function removeExcessElements(current) {
- var next;
- while (current) {
- next = current.nextSibling;
- jqLiteRemove(current);
- current = next;
- }
- }
-
-
- function skipEmptyAndUnknownOptions(current) {
- var emptyOption_ = emptyOption && emptyOption[0];
- var unknownOption_ = unknownOption && unknownOption[0];
-
- // We cannot rely on the extracted empty option being the same as the compiled empty option,
- // because the compiled empty option might have been replaced by a comment because
- // it had an "element" transclusion directive on it (such as ngIf)
- if (emptyOption_ || unknownOption_) {
- while (current &&
- (current === emptyOption_ ||
- current === unknownOption_ ||
- current.nodeType === NODE_TYPE_COMMENT ||
- current.value === '')) {
- current = current.nextSibling;
- }
- }
- return current;
- }
-
-
- function updateOptions() {
-
- var previousValue = options && selectCtrl.readValue();
-
- options = ngOptions.getOptions();
-
- var groupMap = {};
- var currentElement = selectElement[0].firstChild;
-
- // Ensure that the empty option is always there if it was explicitly provided
- if (providedEmptyOption) {
- selectElement.prepend(emptyOption);
- }
-
- currentElement = skipEmptyAndUnknownOptions(currentElement);
-
- options.items.forEach(function updateOption(option) {
- var group;
- var groupElement;
- var optionElement;
-
- if (option.group) {
-
- // This option is to live in a group
- // See if we have already created this group
- group = groupMap[option.group];
-
- if (!group) {
-
- // We have not already created this group
- groupElement = addOrReuseElement(selectElement[0],
- currentElement,
- 'optgroup',
- optGroupTemplate);
- // Move to the next element
- currentElement = groupElement.nextSibling;
-
- // Update the label on the group element
- groupElement.label = option.group;
-
- // Store it for use later
- group = groupMap[option.group] = {
- groupElement: groupElement,
- currentOptionElement: groupElement.firstChild
- };
-
- }
-
- // So now we have a group for this option we add the option to the group
- optionElement = addOrReuseElement(group.groupElement,
- group.currentOptionElement,
- 'option',
- optionTemplate);
- updateOptionElement(option, optionElement);
- // Move to the next element
- group.currentOptionElement = optionElement.nextSibling;
-
- } else {
-
- // This option is not in a group
- optionElement = addOrReuseElement(selectElement[0],
- currentElement,
- 'option',
- optionTemplate);
- updateOptionElement(option, optionElement);
- // Move to the next element
- currentElement = optionElement.nextSibling;
- }
- });
-
-
- // Now remove all excess options and group
- Object.keys(groupMap).forEach(function(key) {
- removeExcessElements(groupMap[key].currentOptionElement);
- });
- removeExcessElements(currentElement);
-
- ngModelCtrl.$render();
-
- // Check to see if the value has changed due to the update to the options
- if (!ngModelCtrl.$isEmpty(previousValue)) {
- var nextValue = selectCtrl.readValue();
- if (ngOptions.trackBy ? !equals(previousValue, nextValue) : previousValue !== nextValue) {
- ngModelCtrl.$setViewValue(nextValue);
- ngModelCtrl.$render();
- }
- }
-
- }
- }
-
- return {
- restrict: 'A',
- terminal: true,
- require: ['select', '?ngModel'],
- link: {
- pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {
- // Deactivate the SelectController.register method to prevent
- // option directives from accidentally registering themselves
- // (and unwanted $destroy handlers etc.)
- ctrls[0].registerOption = noop;
- },
- post: ngOptionsPostLink
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngPluralize
- * @restrict EA
- *
- * @description
- * `ngPluralize` is a directive that displays messages according to en-US localization rules.
- * These rules are bundled with angular.js, but can be overridden
- * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive
- * by specifying the mappings between
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * and the strings to be displayed.
- *
- * # Plural categories and explicit number rules
- * There are two
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * in Angular's default en-US locale: "one" and "other".
- *
- * While a plural category may match many numbers (for example, in en-US locale, "other" can match
- * any number that is not 1), an explicit number rule can only match one number. For example, the
- * explicit number rule for "3" matches the number 3. There are examples of plural categories
- * and explicit number rules throughout the rest of this documentation.
- *
- * # Configuring ngPluralize
- * You configure ngPluralize by providing 2 attributes: `count` and `when`.
- * You can also provide an optional attribute, `offset`.
- *
- * The value of the `count` attribute can be either a string or an {@link guide/expression
- * Angular expression}; these are evaluated on the current scope for its bound value.
- *
- * The `when` attribute specifies the mappings between plural categories and the actual
- * string to be displayed. The value of the attribute should be a JSON object.
- *
- * The following example shows how to configure ngPluralize:
- *
- * ```html
- * <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- * 'one': '1 person is viewing.',
- * 'other': '{} people are viewing.'}">
- * </ng-pluralize>
- *```
- *
- * In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not
- * specify this rule, 0 would be matched to the "other" category and "0 people are viewing"
- * would be shown instead of "Nobody is viewing". You can specify an explicit number rule for
- * other numbers, for example 12, so that instead of showing "12 people are viewing", you can
- * show "a dozen people are viewing".
- *
- * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted
- * into pluralized strings. In the previous example, Angular will replace `{}` with
- * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder
- * for <span ng-non-bindable>{{numberExpression}}</span>.
- *
- * If no rule is defined for a category, then an empty string is displayed and a warning is generated.
- * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.
- *
- * # Configuring ngPluralize with offset
- * The `offset` attribute allows further customization of pluralized text, which can result in
- * a better user experience. For example, instead of the message "4 people are viewing this document",
- * you might display "John, Kate and 2 others are viewing this document".
- * The offset attribute allows you to offset a number by any desired value.
- * Let's take a look at an example:
- *
- * ```html
- * <ng-pluralize count="personCount" offset=2
- * when="{'0': 'Nobody is viewing.',
- * '1': '{{person1}} is viewing.',
- * '2': '{{person1}} and {{person2}} are viewing.',
- * 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- * </ng-pluralize>
- * ```
- *
- * Notice that we are still using two plural categories(one, other), but we added
- * three explicit number rules 0, 1 and 2.
- * When one person, perhaps John, views the document, "John is viewing" will be shown.
- * When three people view the document, no explicit number rule is found, so
- * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.
- * In this case, plural category 'one' is matched and "John, Mary and one other person are viewing"
- * is shown.
- *
- * Note that when you specify offsets, you must provide explicit number rules for
- * numbers from 0 up to and including the offset. If you use an offset of 3, for example,
- * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for
- * plural categories "one" and "other".
- *
- * @param {string|expression} count The variable to be bound to.
- * @param {string} when The mapping between plural category to its corresponding strings.
- * @param {number=} offset Offset to deduct from the total number.
- *
- * @example
- <example module="pluralizeExample">
- <file name="index.html">
- <script>
- angular.module('pluralizeExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.person1 = 'Igor';
- $scope.person2 = 'Misko';
- $scope.personCount = 1;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Person 1:<input type="text" ng-model="person1" value="Igor" /></label><br/>
- <label>Person 2:<input type="text" ng-model="person2" value="Misko" /></label><br/>
- <label>Number of People:<input type="text" ng-model="personCount" value="1" /></label><br/>
-
- <!--- Example with simple pluralization rules for en locale --->
- Without Offset:
- <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- 'one': '1 person is viewing.',
- 'other': '{} people are viewing.'}">
- </ng-pluralize><br>
-
- <!--- Example with offset --->
- With Offset(2):
- <ng-pluralize count="personCount" offset=2
- when="{'0': 'Nobody is viewing.',
- '1': '{{person1}} is viewing.',
- '2': '{{person1}} and {{person2}} are viewing.',
- 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- </ng-pluralize>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should show correct pluralized string', function() {
- var withoutOffset = element.all(by.css('ng-pluralize')).get(0);
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var countInput = element(by.model('personCount'));
-
- expect(withoutOffset.getText()).toEqual('1 person is viewing.');
- expect(withOffset.getText()).toEqual('Igor is viewing.');
-
- countInput.clear();
- countInput.sendKeys('0');
-
- expect(withoutOffset.getText()).toEqual('Nobody is viewing.');
- expect(withOffset.getText()).toEqual('Nobody is viewing.');
-
- countInput.clear();
- countInput.sendKeys('2');
-
- expect(withoutOffset.getText()).toEqual('2 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');
-
- countInput.clear();
- countInput.sendKeys('3');
-
- expect(withoutOffset.getText()).toEqual('3 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');
-
- countInput.clear();
- countInput.sendKeys('4');
-
- expect(withoutOffset.getText()).toEqual('4 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');
- });
- it('should show data-bound names', function() {
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var personCount = element(by.model('personCount'));
- var person1 = element(by.model('person1'));
- var person2 = element(by.model('person2'));
- personCount.clear();
- personCount.sendKeys('4');
- person1.clear();
- person1.sendKeys('Di');
- person2.clear();
- person2.sendKeys('Vojta');
- expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');
- });
- </file>
- </example>
- */
-var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {
- var BRACE = /{}/g,
- IS_WHEN = /^when(Minus)?(.+)$/;
-
- return {
- link: function(scope, element, attr) {
- var numberExp = attr.count,
- whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs
- offset = attr.offset || 0,
- whens = scope.$eval(whenExp) || {},
- whensExpFns = {},
- startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,
- watchRemover = angular.noop,
- lastCount;
-
- forEach(attr, function(expression, attributeName) {
- var tmpMatch = IS_WHEN.exec(attributeName);
- if (tmpMatch) {
- var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);
- whens[whenKey] = element.attr(attr.$attr[attributeName]);
- }
- });
- forEach(whens, function(expression, key) {
- whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));
-
- });
-
- scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {
- var count = parseFloat(newVal);
- var countIsNaN = isNaN(count);
-
- if (!countIsNaN && !(count in whens)) {
- // If an explicit number rule such as 1, 2, 3... is defined, just use it.
- // Otherwise, check it against pluralization rules in $locale service.
- count = $locale.pluralCat(count - offset);
- }
-
- // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.
- // In JS `NaN !== NaN`, so we have to exlicitly check.
- if ((count !== lastCount) && !(countIsNaN && isNumber(lastCount) && isNaN(lastCount))) {
- watchRemover();
- var whenExpFn = whensExpFns[count];
- if (isUndefined(whenExpFn)) {
- if (newVal != null) {
- $log.debug("ngPluralize: no rule defined for '" + count + "' in " + whenExp);
- }
- watchRemover = noop;
- updateElementText();
- } else {
- watchRemover = scope.$watch(whenExpFn, updateElementText);
- }
- lastCount = count;
- }
- });
-
- function updateElementText(newText) {
- element.text(newText || '');
- }
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngRepeat
- * @multiElement
- *
- * @description
- * The `ngRepeat` directive instantiates a template once per item from a collection. Each template
- * instance gets its own scope, where the given loop variable is set to the current collection item,
- * and `$index` is set to the item index or key.
- *
- * Special properties are exposed on the local scope of each template instance, including:
- *
- * | Variable | Type | Details |
- * |-----------|-----------------|-----------------------------------------------------------------------------|
- * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |
- * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |
- * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |
- * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |
- * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |
- * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |
- *
- * <div class="alert alert-info">
- * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.
- * This may be useful when, for instance, nesting ngRepeats.
- * </div>
- *
- *
- * # Iterating over object properties
- *
- * It is possible to get `ngRepeat` to iterate over the properties of an object using the following
- * syntax:
- *
- * ```js
- * <div ng-repeat="(key, value) in myObj"> ... </div>
- * ```
- *
- * You need to be aware that the JavaScript specification does not define the order of keys
- * returned for an object. (To mitigate this in Angular 1.3 the `ngRepeat` directive
- * used to sort the keys alphabetically.)
- *
- * Version 1.4 removed the alphabetic sorting. We now rely on the order returned by the browser
- * when running `for key in myObj`. It seems that browsers generally follow the strategy of providing
- * keys in the order in which they were defined, although there are exceptions when keys are deleted
- * and reinstated. See the [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).
- *
- * If this is not desired, the recommended workaround is to convert your object into an array
- * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
- * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)
- * or implement a `$watch` on the object yourself.
- *
- *
- * # Tracking and Duplicates
- *
- * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in
- * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:
- *
- * * When an item is added, a new instance of the template is added to the DOM.
- * * When an item is removed, its template instance is removed from the DOM.
- * * When items are reordered, their respective templates are reordered in the DOM.
- *
- * To minimize creation of DOM elements, `ngRepeat` uses a function
- * to "keep track" of all items in the collection and their corresponding DOM elements.
- * For example, if an item is added to the collection, ngRepeat will know that all other items
- * already have DOM elements, and will not re-render them.
- *
- * The default tracking function (which tracks items by their identity) does not allow
- * duplicate items in arrays. This is because when there are duplicates, it is not possible
- * to maintain a one-to-one mapping between collection items and DOM elements.
- *
- * If you do need to repeat duplicate items, you can substitute the default tracking behavior
- * with your own using the `track by` expression.
- *
- * For example, you may track items by the index of each item in the collection, using the
- * special scope property `$index`:
- * ```html
- * <div ng-repeat="n in [42, 42, 43, 43] track by $index">
- * {{n}}
- * </div>
- * ```
- *
- * You may also use arbitrary expressions in `track by`, including references to custom functions
- * on the scope:
- * ```html
- * <div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
- * {{n}}
- * </div>
- * ```
- *
- * <div class="alert alert-success">
- * If you are working with objects that have an identifier property, you should track
- * by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`
- * will not have to rebuild the DOM elements for items it has already rendered, even if the
- * JavaScript objects in the collection have been substituted for new ones. For large collections,
- * this signifincantly improves rendering performance. If you don't have a unique identifier,
- * `track by $index` can also provide a performance boost.
- * </div>
- * ```html
- * <div ng-repeat="model in collection track by model.id">
- * {{model.name}}
- * </div>
- * ```
- *
- * When no `track by` expression is provided, it is equivalent to tracking by the built-in
- * `$id` function, which tracks items by their identity:
- * ```html
- * <div ng-repeat="obj in collection track by $id(obj)">
- * {{obj.prop}}
- * </div>
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** `track by` must always be the last expression:
- * </div>
- * ```
- * <div ng-repeat="model in collection | orderBy: 'id' as filtered_result track by model.id">
- * {{model.name}}
- * </div>
- * ```
- *
- * # Special repeat start and end points
- * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
- * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
- * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)
- * up to and including the ending HTML tag where **ng-repeat-end** is placed.
- *
- * The example below makes use of this feature:
- * ```html
- * <header ng-repeat-start="item in items">
- * Header {{ item }}
- * </header>
- * <div class="body">
- * Body {{ item }}
- * </div>
- * <footer ng-repeat-end>
- * Footer {{ item }}
- * </footer>
- * ```
- *
- * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:
- * ```html
- * <header>
- * Header A
- * </header>
- * <div class="body">
- * Body A
- * </div>
- * <footer>
- * Footer A
- * </footer>
- * <header>
- * Header B
- * </header>
- * <div class="body">
- * Body B
- * </div>
- * <footer>
- * Footer B
- * </footer>
- * ```
- *
- * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
- * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
- *
- * @animations
- * **.enter** - when a new item is added to the list or when an item is revealed after a filter
- *
- * **.leave** - when an item is removed from the list or when an item is filtered out
- *
- * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered
- *
- * @element ANY
- * @scope
- * @priority 1000
- * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These
- * formats are currently supported:
- *
- * * `variable in expression` – where variable is the user defined loop variable and `expression`
- * is a scope expression giving the collection to enumerate.
- *
- * For example: `album in artist.albums`.
- *
- * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,
- * and `expression` is the scope expression giving the collection to enumerate.
- *
- * For example: `(name, age) in {'adam':10, 'amalie':12}`.
- *
- * * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression
- * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
- * is specified, ng-repeat associates elements by identity. It is an error to have
- * more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are
- * mapped to the same DOM element, which is not possible.)
- *
- * Note that the tracking expression must come last, after any filters, and the alias expression.
- *
- * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
- * will be associated by item identity in the array.
- *
- * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique
- * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements
- * with the corresponding item in the array by identity. Moving the same object in array would move the DOM
- * element in the same way in the DOM.
- *
- * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this
- * case the object identity does not matter. Two objects are considered equivalent as long as their `id`
- * property is same.
- *
- * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter
- * to items in conjunction with a tracking expression.
- *
- * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the
- * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message
- * when a filter is active on the repeater, but the filtered result set is empty.
- *
- * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after
- * the items have been processed through the filter.
- *
- * Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end
- * (and not as operator, inside an expression).
- *
- * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results` .
- *
- * @example
- * This example initializes the scope to a list of names and
- * then uses `ngRepeat` to display every person:
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-init="friends = [
- {name:'John', age:25, gender:'boy'},
- {name:'Jessie', age:30, gender:'girl'},
- {name:'Johanna', age:28, gender:'girl'},
- {name:'Joy', age:15, gender:'girl'},
- {name:'Mary', age:28, gender:'girl'},
- {name:'Peter', age:95, gender:'boy'},
- {name:'Sebastian', age:50, gender:'boy'},
- {name:'Erika', age:27, gender:'girl'},
- {name:'Patrick', age:40, gender:'boy'},
- {name:'Samantha', age:60, gender:'girl'}
- ]">
- I have {{friends.length}} friends. They are:
- <input type="search" ng-model="q" placeholder="filter friends..." aria-label="filter friends" />
- <ul class="example-animate-container">
- <li class="animate-repeat" ng-repeat="friend in friends | filter:q as results">
- [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
- </li>
- <li class="animate-repeat" ng-if="results.length == 0">
- <strong>No results found...</strong>
- </li>
- </ul>
- </div>
- </file>
- <file name="animations.css">
- .example-animate-container {
- background:white;
- border:1px solid black;
- list-style:none;
- margin:0;
- padding:0 10px;
- }
-
- .animate-repeat {
- line-height:40px;
- list-style:none;
- box-sizing:border-box;
- }
-
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter,
- .animate-repeat.ng-leave {
- transition:all linear 0.5s;
- }
-
- .animate-repeat.ng-leave.ng-leave-active,
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter {
- opacity:0;
- max-height:0;
- }
-
- .animate-repeat.ng-leave,
- .animate-repeat.ng-move.ng-move-active,
- .animate-repeat.ng-enter.ng-enter-active {
- opacity:1;
- max-height:40px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var friends = element.all(by.repeater('friend in friends'));
-
- it('should render initial data set', function() {
- expect(friends.count()).toBe(10);
- expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');
- expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');
- expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');
- expect(element(by.binding('friends.length')).getText())
- .toMatch("I have 10 friends. They are:");
- });
-
- it('should update repeater when filter predicate changes', function() {
- expect(friends.count()).toBe(10);
-
- element(by.model('q')).sendKeys('ma');
-
- expect(friends.count()).toBe(2);
- expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');
- expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');
- });
- </file>
- </example>
- */
-var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
- var NG_REMOVED = '$$NG_REMOVED';
- var ngRepeatMinErr = minErr('ngRepeat');
-
- var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {
- // TODO(perf): generate setters to shave off ~40ms or 1-1.5%
- scope[valueIdentifier] = value;
- if (keyIdentifier) scope[keyIdentifier] = key;
- scope.$index = index;
- scope.$first = (index === 0);
- scope.$last = (index === (arrayLength - 1));
- scope.$middle = !(scope.$first || scope.$last);
- // jshint bitwise: false
- scope.$odd = !(scope.$even = (index&1) === 0);
- // jshint bitwise: true
- };
-
- var getBlockStart = function(block) {
- return block.clone[0];
- };
-
- var getBlockEnd = function(block) {
- return block.clone[block.clone.length - 1];
- };
-
-
- return {
- restrict: 'A',
- multiElement: true,
- transclude: 'element',
- priority: 1000,
- terminal: true,
- $$tlb: true,
- compile: function ngRepeatCompile($element, $attr) {
- var expression = $attr.ngRepeat;
- var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');
-
- var match = expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
-
- if (!match) {
- throw ngRepeatMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",
- expression);
- }
-
- var lhs = match[1];
- var rhs = match[2];
- var aliasAs = match[3];
- var trackByExp = match[4];
-
- match = lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);
-
- if (!match) {
- throw ngRepeatMinErr('iidexp', "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
- lhs);
- }
- var valueIdentifier = match[3] || match[1];
- var keyIdentifier = match[2];
-
- if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||
- /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))) {
- throw ngRepeatMinErr('badident', "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",
- aliasAs);
- }
-
- var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;
- var hashFnLocals = {$id: hashKey};
-
- if (trackByExp) {
- trackByExpGetter = $parse(trackByExp);
- } else {
- trackByIdArrayFn = function(key, value) {
- return hashKey(value);
- };
- trackByIdObjFn = function(key) {
- return key;
- };
- }
-
- return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {
-
- if (trackByExpGetter) {
- trackByIdExpFn = function(key, value, index) {
- // assign key, value, and $index to the locals so that they can be used in hash functions
- if (keyIdentifier) hashFnLocals[keyIdentifier] = key;
- hashFnLocals[valueIdentifier] = value;
- hashFnLocals.$index = index;
- return trackByExpGetter($scope, hashFnLocals);
- };
- }
-
- // Store a list of elements from previous run. This is a hash where key is the item from the
- // iterator, and the value is objects with following properties.
- // - scope: bound scope
- // - element: previous element.
- // - index: position
- //
- // We are using no-proto object so that we don't need to guard against inherited props via
- // hasOwnProperty.
- var lastBlockMap = createMap();
-
- //watch props
- $scope.$watchCollection(rhs, function ngRepeatAction(collection) {
- var index, length,
- previousNode = $element[0], // node that cloned nodes should be inserted after
- // initialized to the comment node anchor
- nextNode,
- // Same as lastBlockMap but it has the current state. It will become the
- // lastBlockMap on the next iteration.
- nextBlockMap = createMap(),
- collectionLength,
- key, value, // key/value of iteration
- trackById,
- trackByIdFn,
- collectionKeys,
- block, // last object information {scope, element, id}
- nextBlockOrder,
- elementsToRemove;
-
- if (aliasAs) {
- $scope[aliasAs] = collection;
- }
-
- if (isArrayLike(collection)) {
- collectionKeys = collection;
- trackByIdFn = trackByIdExpFn || trackByIdArrayFn;
- } else {
- trackByIdFn = trackByIdExpFn || trackByIdObjFn;
- // if object, extract keys, in enumeration order, unsorted
- collectionKeys = [];
- for (var itemKey in collection) {
- if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {
- collectionKeys.push(itemKey);
- }
- }
- }
-
- collectionLength = collectionKeys.length;
- nextBlockOrder = new Array(collectionLength);
-
- // locate existing items
- for (index = 0; index < collectionLength; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- trackById = trackByIdFn(key, value, index);
- if (lastBlockMap[trackById]) {
- // found previously seen block
- block = lastBlockMap[trackById];
- delete lastBlockMap[trackById];
- nextBlockMap[trackById] = block;
- nextBlockOrder[index] = block;
- } else if (nextBlockMap[trackById]) {
- // if collision detected. restore lastBlockMap and throw an error
- forEach(nextBlockOrder, function(block) {
- if (block && block.scope) lastBlockMap[block.id] = block;
- });
- throw ngRepeatMinErr('dupes',
- "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
- expression, trackById, value);
- } else {
- // new never before seen block
- nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};
- nextBlockMap[trackById] = true;
- }
- }
-
- // remove leftover items
- for (var blockKey in lastBlockMap) {
- block = lastBlockMap[blockKey];
- elementsToRemove = getBlockNodes(block.clone);
- $animate.leave(elementsToRemove);
- if (elementsToRemove[0].parentNode) {
- // if the element was not removed yet because of pending animation, mark it as deleted
- // so that we can ignore it later
- for (index = 0, length = elementsToRemove.length; index < length; index++) {
- elementsToRemove[index][NG_REMOVED] = true;
- }
- }
- block.scope.$destroy();
- }
-
- // we are not using forEach for perf reasons (trying to avoid #call)
- for (index = 0; index < collectionLength; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- block = nextBlockOrder[index];
-
- if (block.scope) {
- // if we have already seen this object, then we need to reuse the
- // associated scope/element
-
- nextNode = previousNode;
-
- // skip nodes that are already pending removal via leave animation
- do {
- nextNode = nextNode.nextSibling;
- } while (nextNode && nextNode[NG_REMOVED]);
-
- if (getBlockStart(block) != nextNode) {
- // existing item which got moved
- $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));
- }
- previousNode = getBlockEnd(block);
- updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);
- } else {
- // new item which we don't know about
- $transclude(function ngRepeatTransclude(clone, scope) {
- block.scope = scope;
- // http://jsperf.com/clone-vs-createcomment
- var endNode = ngRepeatEndComment.cloneNode(false);
- clone[clone.length++] = endNode;
-
- // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?
- $animate.enter(clone, null, jqLite(previousNode));
- previousNode = endNode;
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block.clone = clone;
- nextBlockMap[block.id] = block;
- updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);
- });
- }
- }
- lastBlockMap = nextBlockMap;
- });
- };
- }
- };
-}];
-
-var NG_HIDE_CLASS = 'ng-hide';
-var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
-/**
- * @ngdoc directive
- * @name ngShow
- * @multiElement
- *
- * @description
- * The `ngShow` directive shows or hides the given HTML element based on the expression
- * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding
- * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is visible) -->
- * <div ng-show="myValue"></div>
- *
- * <!-- when $scope.myValue is falsy (element is hidden) -->
- * <div ng-show="myValue" class="ng-hide"></div>
- * ```
- *
- * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class
- * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope
- * with extra animation classes that can be added.
- *
- * ```css
- * .ng-hide:not(.ng-hide-animate) {
- * /&#42; this is just another form of hiding an element &#42;/
- * display: block!important;
- * position: absolute;
- * top: -9999px;
- * left: -9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngShow`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass except that
- * you must also include the !important flag to override the display property
- * so that you can perform an animation when the element is hidden during the time of the animation.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * /&#42; this is required as of 1.3x to properly
- * apply all styling in a show/hide animation &#42;/
- * transition: 0s linear all;
- * }
- *
- * .my-element.ng-hide-add-active,
- * .my-element.ng-hide-remove-active {
- * /&#42; the transition is defined in the active class &#42;/
- * transition: 1s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible
- * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden
- *
- * @element ANY
- * @param {expression} ngShow If the {@link guide/expression expression} is truthy
- * then the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" aria-label="Toggle ngHide"><br/>
- <div>
- Show:
- <div class="check-element animate-show" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-show" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);
- </file>
- <file name="animations.css">
- .animate-show {
- line-height: 20px;
- opacity: 1;
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
-
- .animate-show.ng-hide-add, .animate-show.ng-hide-remove {
- transition: all linear 0.5s;
- }
-
- .animate-show.ng-hide {
- line-height: 0;
- opacity: 0;
- padding: 0 10px;
- }
-
- .check-element {
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngShowDirective = ['$animate', function($animate) {
- return {
- restrict: 'A',
- multiElement: true,
- link: function(scope, element, attr) {
- scope.$watch(attr.ngShow, function ngShowWatchAction(value) {
- // we're adding a temporary, animation-specific class for ng-hide since this way
- // we can control when the element is actually displayed on screen without having
- // to have a global/greedy CSS selector that breaks when other animations are run.
- // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845
- $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {
- tempClasses: NG_HIDE_IN_PROGRESS_CLASS
- });
- });
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngHide
- * @multiElement
- *
- * @description
- * The `ngHide` directive shows or hides the given HTML element based on the expression
- * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding
- * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is hidden) -->
- * <div ng-hide="myValue" class="ng-hide"></div>
- *
- * <!-- when $scope.myValue is falsy (element is visible) -->
- * <div ng-hide="myValue"></div>
- * ```
- *
- * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class
- * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class in CSS:
- *
- * ```css
- * .ng-hide {
- * /&#42; this is just another form of hiding an element &#42;/
- * display: block!important;
- * position: absolute;
- * top: -9999px;
- * left: -9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngHide`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`
- * CSS class is added and removed for you instead of your own CSS class.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * transition: 0.5s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden
- * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible
- *
- * @element ANY
- * @param {expression} ngHide If the {@link guide/expression expression} is truthy then
- * the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" aria-label="Toggle ngShow"><br/>
- <div>
- Show:
- <div class="check-element animate-hide" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-hide" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);
- </file>
- <file name="animations.css">
- .animate-hide {
- transition: all linear 0.5s;
- line-height: 20px;
- opacity: 1;
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
-
- .animate-hide.ng-hide {
- line-height: 0;
- opacity: 0;
- padding: 0 10px;
- }
-
- .check-element {
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngHideDirective = ['$animate', function($animate) {
- return {
- restrict: 'A',
- multiElement: true,
- link: function(scope, element, attr) {
- scope.$watch(attr.ngHide, function ngHideWatchAction(value) {
- // The comment inside of the ngShowDirective explains why we add and
- // remove a temporary class for the show/hide animation
- $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {
- tempClasses: NG_HIDE_IN_PROGRESS_CLASS
- });
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngStyle
- * @restrict AC
- *
- * @description
- * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
- *
- * @element ANY
- * @param {expression} ngStyle
- *
- * {@link guide/expression Expression} which evals to an
- * object whose keys are CSS style names and values are corresponding values for those CSS
- * keys.
- *
- * Since some CSS style names are not valid keys for an object, they must be quoted.
- * See the 'background-color' style in the example below.
- *
- * @example
- <example>
- <file name="index.html">
- <input type="button" value="set color" ng-click="myStyle={color:'red'}">
- <input type="button" value="set background" ng-click="myStyle={'background-color':'blue'}">
- <input type="button" value="clear" ng-click="myStyle={}">
- <br/>
- <span ng-style="myStyle">Sample Text</span>
- <pre>myStyle={{myStyle}}</pre>
- </file>
- <file name="style.css">
- span {
- color: black;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var colorSpan = element(by.css('span'));
-
- it('should check ng-style', function() {
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- element(by.css('input[value=\'set color\']')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');
- element(by.css('input[value=clear]')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- });
- </file>
- </example>
- */
-var ngStyleDirective = ngDirective(function(scope, element, attr) {
- scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {
- if (oldStyles && (newStyles !== oldStyles)) {
- forEach(oldStyles, function(val, style) { element.css(style, '');});
- }
- if (newStyles) element.css(newStyles);
- }, true);
-});
-
-/**
- * @ngdoc directive
- * @name ngSwitch
- * @restrict EA
- *
- * @description
- * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.
- * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location
- * as specified in the template.
- *
- * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it
- * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element
- * matches the value obtained from the evaluated expression. In other words, you define a container element
- * (where you place the directive), place an expression on the **`on="..."` attribute**
- * (or the **`ng-switch="..."` attribute**), define any inner elements inside of the directive and place
- * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on
- * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default
- * attribute is displayed.
- *
- * <div class="alert alert-info">
- * Be aware that the attribute values to match against cannot be expressions. They are interpreted
- * as literal string values to match against.
- * For example, **`ng-switch-when="someVal"`** will match against the string `"someVal"` not against the
- * value of the expression `$scope.someVal`.
- * </div>
-
- * @animations
- * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container
- * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM
- *
- * @usage
- *
- * ```
- * <ANY ng-switch="expression">
- * <ANY ng-switch-when="matchValue1">...</ANY>
- * <ANY ng-switch-when="matchValue2">...</ANY>
- * <ANY ng-switch-default>...</ANY>
- * </ANY>
- * ```
- *
- *
- * @scope
- * @priority 1200
- * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.
- * On child elements add:
- *
- * * `ngSwitchWhen`: the case statement to match against. If match then this
- * case will be displayed. If the same match appears multiple times, all the
- * elements will be displayed.
- * * `ngSwitchDefault`: the default case when no other case match. If there
- * are multiple default cases, all of them will be displayed when no other
- * case match.
- *
- *
- * @example
- <example module="switchExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="selection" ng-options="item for item in items">
- </select>
- <code>selection={{selection}}</code>
- <hr/>
- <div class="animate-switch-container"
- ng-switch on="selection">
- <div class="animate-switch" ng-switch-when="settings">Settings Div</div>
- <div class="animate-switch" ng-switch-when="home">Home Span</div>
- <div class="animate-switch" ng-switch-default>default</div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('switchExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.items = ['settings', 'home', 'other'];
- $scope.selection = $scope.items[0];
- }]);
- </file>
- <file name="animations.css">
- .animate-switch-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .animate-switch {
- padding:10px;
- }
-
- .animate-switch.ng-animate {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- }
-
- .animate-switch.ng-leave.ng-leave-active,
- .animate-switch.ng-enter {
- top:-50px;
- }
- .animate-switch.ng-leave,
- .animate-switch.ng-enter.ng-enter-active {
- top:0;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var switchElem = element(by.css('[ng-switch]'));
- var select = element(by.model('selection'));
-
- it('should start in settings', function() {
- expect(switchElem.getText()).toMatch(/Settings Div/);
- });
- it('should change to home', function() {
- select.all(by.css('option')).get(1).click();
- expect(switchElem.getText()).toMatch(/Home Span/);
- });
- it('should select default', function() {
- select.all(by.css('option')).get(2).click();
- expect(switchElem.getText()).toMatch(/default/);
- });
- </file>
- </example>
- */
-var ngSwitchDirective = ['$animate', function($animate) {
- return {
- require: 'ngSwitch',
-
- // asks for $scope to fool the BC controller module
- controller: ['$scope', function ngSwitchController() {
- this.cases = {};
- }],
- link: function(scope, element, attr, ngSwitchController) {
- var watchExpr = attr.ngSwitch || attr.on,
- selectedTranscludes = [],
- selectedElements = [],
- previousLeaveAnimations = [],
- selectedScopes = [];
-
- var spliceFactory = function(array, index) {
- return function() { array.splice(index, 1); };
- };
-
- scope.$watch(watchExpr, function ngSwitchWatchAction(value) {
- var i, ii;
- for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {
- $animate.cancel(previousLeaveAnimations[i]);
- }
- previousLeaveAnimations.length = 0;
-
- for (i = 0, ii = selectedScopes.length; i < ii; ++i) {
- var selected = getBlockNodes(selectedElements[i].clone);
- selectedScopes[i].$destroy();
- var promise = previousLeaveAnimations[i] = $animate.leave(selected);
- promise.then(spliceFactory(previousLeaveAnimations, i));
- }
-
- selectedElements.length = 0;
- selectedScopes.length = 0;
-
- if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {
- forEach(selectedTranscludes, function(selectedTransclude) {
- selectedTransclude.transclude(function(caseElement, selectedScope) {
- selectedScopes.push(selectedScope);
- var anchor = selectedTransclude.element;
- caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');
- var block = { clone: caseElement };
-
- selectedElements.push(block);
- $animate.enter(caseElement, anchor.parent(), anchor);
- });
- });
- }
- });
- }
- };
-}];
-
-var ngSwitchWhenDirective = ngDirective({
- transclude: 'element',
- priority: 1200,
- require: '^ngSwitch',
- multiElement: true,
- link: function(scope, element, attrs, ctrl, $transclude) {
- ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);
- ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });
- }
-});
-
-var ngSwitchDefaultDirective = ngDirective({
- transclude: 'element',
- priority: 1200,
- require: '^ngSwitch',
- multiElement: true,
- link: function(scope, element, attr, ctrl, $transclude) {
- ctrl.cases['?'] = (ctrl.cases['?'] || []);
- ctrl.cases['?'].push({ transclude: $transclude, element: element });
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngTransclude
- * @restrict EAC
- *
- * @description
- * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.
- *
- * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.
- *
- * @element ANY
- *
- * @example
- <example module="transcludeExample">
- <file name="index.html">
- <script>
- angular.module('transcludeExample', [])
- .directive('pane', function(){
- return {
- restrict: 'E',
- transclude: true,
- scope: { title:'@' },
- template: '<div style="border: 1px solid black;">' +
- '<div style="background-color: gray">{{title}}</div>' +
- '<ng-transclude></ng-transclude>' +
- '</div>'
- };
- })
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.title = 'Lorem Ipsum';
- $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input ng-model="title" aria-label="title"> <br/>
- <textarea ng-model="text" aria-label="text"></textarea> <br/>
- <pane title="{{title}}">{{text}}</pane>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should have transcluded', function() {
- var titleElement = element(by.model('title'));
- titleElement.clear();
- titleElement.sendKeys('TITLE');
- var textElement = element(by.model('text'));
- textElement.clear();
- textElement.sendKeys('TEXT');
- expect(element(by.binding('title')).getText()).toEqual('TITLE');
- expect(element(by.binding('text')).getText()).toEqual('TEXT');
- });
- </file>
- </example>
- *
- */
-var ngTranscludeDirective = ngDirective({
- restrict: 'EAC',
- link: function($scope, $element, $attrs, controller, $transclude) {
- if (!$transclude) {
- throw minErr('ngTransclude')('orphan',
- 'Illegal use of ngTransclude directive in the template! ' +
- 'No parent directive that requires a transclusion found. ' +
- 'Element: {0}',
- startingTag($element));
- }
-
- $transclude(function(clone) {
- $element.empty();
- $element.append(clone);
- });
- }
-});
-
-/**
- * @ngdoc directive
- * @name script
- * @restrict E
- *
- * @description
- * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the
- * template can be used by {@link ng.directive:ngInclude `ngInclude`},
- * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the
- * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be
- * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.
- *
- * @param {string} type Must be set to `'text/ng-template'`.
- * @param {string} id Cache name of the template.
- *
- * @example
- <example>
- <file name="index.html">
- <script type="text/ng-template" id="/tpl.html">
- Content of the template.
- </script>
-
- <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
- <div id="tpl-content" ng-include src="currentTpl"></div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should load template defined inside script tag', function() {
- element(by.css('#tpl-link')).click();
- expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);
- });
- </file>
- </example>
- */
-var scriptDirective = ['$templateCache', function($templateCache) {
- return {
- restrict: 'E',
- terminal: true,
- compile: function(element, attr) {
- if (attr.type == 'text/ng-template') {
- var templateUrl = attr.id,
- text = element[0].text;
-
- $templateCache.put(templateUrl, text);
- }
- }
- };
-}];
-
-var noopNgModelController = { $setViewValue: noop, $render: noop };
-
-function chromeHack(optionElement) {
- // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459
- // Adding an <option selected="selected"> element to a <select required="required"> should
- // automatically select the new element
- if (optionElement[0].hasAttribute('selected')) {
- optionElement[0].selected = true;
- }
-}
-
-/**
- * @ngdoc type
- * @name select.SelectController
- * @description
- * The controller for the `<select>` directive. This provides support for reading
- * and writing the selected value(s) of the control and also coordinates dynamically
- * added `<option>` elements, perhaps by an `ngRepeat` directive.
- */
-var SelectController =
- ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
-
- var self = this,
- optionsMap = new HashMap();
-
- // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors
- self.ngModelCtrl = noopNgModelController;
-
- // The "unknown" option is one that is prepended to the list if the viewValue
- // does not match any of the options. When it is rendered the value of the unknown
- // option is '? XXX ?' where XXX is the hashKey of the value that is not known.
- //
- // We can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- self.unknownOption = jqLite(document.createElement('option'));
- self.renderUnknownOption = function(val) {
- var unknownVal = '? ' + hashKey(val) + ' ?';
- self.unknownOption.val(unknownVal);
- $element.prepend(self.unknownOption);
- $element.val(unknownVal);
- };
-
- $scope.$on('$destroy', function() {
- // disable unknown option so that we don't do work when the whole select is being destroyed
- self.renderUnknownOption = noop;
- });
-
- self.removeUnknownOption = function() {
- if (self.unknownOption.parent()) self.unknownOption.remove();
- };
-
-
- // Read the value of the select control, the implementation of this changes depending
- // upon whether the select can have multiple values and whether ngOptions is at work.
- self.readValue = function readSingleValue() {
- self.removeUnknownOption();
- return $element.val();
- };
-
-
- // Write the value to the select control, the implementation of this changes depending
- // upon whether the select can have multiple values and whether ngOptions is at work.
- self.writeValue = function writeSingleValue(value) {
- if (self.hasOption(value)) {
- self.removeUnknownOption();
- $element.val(value);
- if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy
- } else {
- if (value == null && self.emptyOption) {
- self.removeUnknownOption();
- $element.val('');
- } else {
- self.renderUnknownOption(value);
- }
- }
- };
-
-
- // Tell the select control that an option, with the given value, has been added
- self.addOption = function(value, element) {
- assertNotHasOwnProperty(value, '"option value"');
- if (value === '') {
- self.emptyOption = element;
- }
- var count = optionsMap.get(value) || 0;
- optionsMap.put(value, count + 1);
- self.ngModelCtrl.$render();
- chromeHack(element);
- };
-
- // Tell the select control that an option, with the given value, has been removed
- self.removeOption = function(value) {
- var count = optionsMap.get(value);
- if (count) {
- if (count === 1) {
- optionsMap.remove(value);
- if (value === '') {
- self.emptyOption = undefined;
- }
- } else {
- optionsMap.put(value, count - 1);
- }
- }
- };
-
- // Check whether the select control has an option matching the given value
- self.hasOption = function(value) {
- return !!optionsMap.get(value);
- };
-
-
- self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {
-
- if (interpolateValueFn) {
- // The value attribute is interpolated
- var oldVal;
- optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {
- if (isDefined(oldVal)) {
- self.removeOption(oldVal);
- }
- oldVal = newVal;
- self.addOption(newVal, optionElement);
- });
- } else if (interpolateTextFn) {
- // The text content is interpolated
- optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {
- optionAttrs.$set('value', newVal);
- if (oldVal !== newVal) {
- self.removeOption(oldVal);
- }
- self.addOption(newVal, optionElement);
- });
- } else {
- // The value attribute is static
- self.addOption(optionAttrs.value, optionElement);
- }
-
- optionElement.on('$destroy', function() {
- self.removeOption(optionAttrs.value);
- self.ngModelCtrl.$render();
- });
- };
-}];
-
-/**
- * @ngdoc directive
- * @name select
- * @restrict E
- *
- * @description
- * HTML `SELECT` element with angular data-binding.
- *
- * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding
- * between the scope and the `<select>` control (including setting default values).
- * ÃŒt also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or
- * {@link ngOptions `ngOptions`} directives.
- *
- * When an item in the `<select>` menu is selected, the value of the selected option will be bound
- * to the model identified by the `ngModel` directive. With static or repeated options, this is
- * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.
- * If you want dynamic value attributes, you can use interpolation inside the value attribute.
- *
- * <div class="alert alert-warning">
- * Note that the value of a `select` directive used without `ngOptions` is always a string.
- * When the model needs to be bound to a non-string value, you must either explictly convert it
- * using a directive (see example below) or use `ngOptions` to specify the set of options.
- * This is because an option element can only be bound to string values at present.
- * </div>
- *
- * If the viewValue of `ngModel` does not match any of the options, then the control
- * will automatically add an "unknown" option, which it then removes when the mismatch is resolved.
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * <div class="alert alert-info">
- * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions
- * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits, such as
- * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
- * comprehension expression, and additionally in reducing memory and increasing speed by not creating
- * a new scope for each repeated instance.
- * </div>
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} multiple Allows multiple options to be selected. The selected values will be
- * bound to the model as an array.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds required attribute and required validation constraint to
- * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required
- * when you want to data-bind to the required attribute.
- * @param {string=} ngChange Angular expression to be executed when selected option(s) changes due to user
- * interaction with the select element.
- * @param {string=} ngOptions sets the options that the select is populated with and defines what is
- * set on the model on selection. See {@link ngOptions `ngOptions`}.
- *
- * @example
- * ### Simple `select` elements with static options
- *
- * <example name="static-select" module="staticSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="singleSelect"> Single select: </label><br>
- * <select name="singleSelect" ng-model="data.singleSelect">
- * <option value="option-1">Option 1</option>
- * <option value="option-2">Option 2</option>
- * </select><br>
- *
- * <label for="singleSelect"> Single select with "not selected" option and dynamic option values: </label><br>
- * <select name="singleSelect" id="singleSelect" ng-model="data.singleSelect">
- * <option value="">---Please select---</option> <!-- not selected / blank option -->
- * <option value="{{data.option1}}">Option 1</option> <!-- interpolation -->
- * <option value="option-2">Option 2</option>
- * </select><br>
- * <button ng-click="forceUnknownOption()">Force unknown option</button><br>
- * <tt>singleSelect = {{data.singleSelect}}</tt>
- *
- * <hr>
- * <label for="multipleSelect"> Multiple select: </label><br>
- * <select name="multipleSelect" id="multipleSelect" ng-model="data.multipleSelect" multiple>
- * <option value="option-1">Option 1</option>
- * <option value="option-2">Option 2</option>
- * <option value="option-3">Option 3</option>
- * </select><br>
- * <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>
- * </form>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('staticSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * singleSelect: null,
- * multipleSelect: [],
- * option1: 'option-1',
- * };
- *
- * $scope.forceUnknownOption = function() {
- * $scope.data.singleSelect = 'nonsense';
- * };
- * }]);
- * </file>
- *</example>
- *
- * ### Using `ngRepeat` to generate `select` options
- * <example name="ngrepeat-select" module="ngrepeatSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="repeatSelect"> Repeat select: </label>
- * <select name="repeatSelect" id="repeatSelect" ng-model="data.repeatSelect">
- * <option ng-repeat="option in data.availableOptions" value="{{option.id}}">{{option.name}}</option>
- * </select>
- * </form>
- * <hr>
- * <tt>repeatSelect = {{data.repeatSelect}}</tt><br/>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('ngrepeatSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * repeatSelect: null,
- * availableOptions: [
- * {id: '1', name: 'Option A'},
- * {id: '2', name: 'Option B'},
- * {id: '3', name: 'Option C'}
- * ],
- * };
- * }]);
- * </file>
- *</example>
- *
- *
- * ### Using `select` with `ngOptions` and setting a default value
- * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.
- *
- * <example name="select-with-default-values" module="defaultValueSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="mySelect">Make a choice:</label>
- * <select name="mySelect" id="mySelect"
- * ng-options="option.name for option in data.availableOptions track by option.id"
- * ng-model="data.selectedOption"></select>
- * </form>
- * <hr>
- * <tt>option = {{data.selectedOption}}</tt><br/>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('defaultValueSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * availableOptions: [
- * {id: '1', name: 'Option A'},
- * {id: '2', name: 'Option B'},
- * {id: '3', name: 'Option C'}
- * ],
- * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui
- * };
- * }]);
- * </file>
- *</example>
- *
- *
- * ### Binding `select` to a non-string value via `ngModel` parsing / formatting
- *
- * <example name="select-with-non-string-options" module="nonStringSelect">
- * <file name="index.html">
- * <select ng-model="model.id" convert-to-number>
- * <option value="0">Zero</option>
- * <option value="1">One</option>
- * <option value="2">Two</option>
- * </select>
- * {{ model }}
- * </file>
- * <file name="app.js">
- * angular.module('nonStringSelect', [])
- * .run(function($rootScope) {
- * $rootScope.model = { id: 2 };
- * })
- * .directive('convertToNumber', function() {
- * return {
- * require: 'ngModel',
- * link: function(scope, element, attrs, ngModel) {
- * ngModel.$parsers.push(function(val) {
- * return parseInt(val, 10);
- * });
- * ngModel.$formatters.push(function(val) {
- * return '' + val;
- * });
- * }
- * };
- * });
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should initialize to model', function() {
- * var select = element(by.css('select'));
- * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');
- * });
- * </file>
- * </example>
- *
- */
-var selectDirective = function() {
-
- return {
- restrict: 'E',
- require: ['select', '?ngModel'],
- controller: SelectController,
- priority: 1,
- link: {
- pre: selectPreLink
- }
- };
-
- function selectPreLink(scope, element, attr, ctrls) {
-
- // if ngModel is not defined, we don't need to do anything
- var ngModelCtrl = ctrls[1];
- if (!ngModelCtrl) return;
-
- var selectCtrl = ctrls[0];
-
- selectCtrl.ngModelCtrl = ngModelCtrl;
-
- // We delegate rendering to the `writeValue` method, which can be changed
- // if the select can have multiple selected values or if the options are being
- // generated by `ngOptions`
- ngModelCtrl.$render = function() {
- selectCtrl.writeValue(ngModelCtrl.$viewValue);
- };
-
- // When the selected item(s) changes we delegate getting the value of the select control
- // to the `readValue` method, which can be changed if the select can have multiple
- // selected values or if the options are being generated by `ngOptions`
- element.on('change', function() {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(selectCtrl.readValue());
- });
- });
-
- // If the select allows multiple values then we need to modify how we read and write
- // values from and to the control; also what it means for the value to be empty and
- // we have to add an extra watch since ngModel doesn't work well with arrays - it
- // doesn't trigger rendering if only an item in the array changes.
- if (attr.multiple) {
-
- // Read value now needs to check each option to see if it is selected
- selectCtrl.readValue = function readMultipleValue() {
- var array = [];
- forEach(element.find('option'), function(option) {
- if (option.selected) {
- array.push(option.value);
- }
- });
- return array;
- };
-
- // Write value now needs to set the selected property of each matching option
- selectCtrl.writeValue = function writeMultipleValue(value) {
- var items = new HashMap(value);
- forEach(element.find('option'), function(option) {
- option.selected = isDefined(items.get(option.value));
- });
- };
-
- // we have to do it on each watch since ngModel watches reference, but
- // we need to work of an array, so we need to see if anything was inserted/removed
- var lastView, lastViewRef = NaN;
- scope.$watch(function selectMultipleWatch() {
- if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {
- lastView = shallowCopy(ngModelCtrl.$viewValue);
- ngModelCtrl.$render();
- }
- lastViewRef = ngModelCtrl.$viewValue;
- });
-
- // If we are a multiple select then value is now a collection
- // so the meaning of $isEmpty changes
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
-
- }
- }
-};
-
-
-// The option directive is purely designed to communicate the existence (or lack of)
-// of dynamically created (and destroyed) option elements to their containing select
-// directive via its controller.
-var optionDirective = ['$interpolate', function($interpolate) {
- return {
- restrict: 'E',
- priority: 100,
- compile: function(element, attr) {
-
- if (isDefined(attr.value)) {
- // If the value attribute is defined, check if it contains an interpolation
- var interpolateValueFn = $interpolate(attr.value, true);
- } else {
- // If the value attribute is not defined then we fall back to the
- // text content of the option element, which may be interpolated
- var interpolateTextFn = $interpolate(element.text(), true);
- if (!interpolateTextFn) {
- attr.$set('value', element.text());
- }
- }
-
- return function(scope, element, attr) {
-
- // This is an optimization over using ^^ since we don't want to have to search
- // all the way to the root of the DOM for every single option element
- var selectCtrlName = '$selectController',
- parent = element.parent(),
- selectCtrl = parent.data(selectCtrlName) ||
- parent.parent().data(selectCtrlName); // in case we are in optgroup
-
- if (selectCtrl) {
- selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);
- }
- };
- }
- };
-}];
-
-var styleDirective = valueFn({
- restrict: 'E',
- terminal: false
-});
-
-var requiredDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
- attr.required = true; // force truthy in case we are on non input element
-
- ctrl.$validators.required = function(modelValue, viewValue) {
- return !attr.required || !ctrl.$isEmpty(viewValue);
- };
-
- attr.$observe('required', function() {
- ctrl.$validate();
- });
- }
- };
-};
-
-
-var patternDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var regexp, patternExp = attr.ngPattern || attr.pattern;
- attr.$observe('pattern', function(regex) {
- if (isString(regex) && regex.length > 0) {
- regex = new RegExp('^' + regex + '$');
- }
-
- if (regex && !regex.test) {
- throw minErr('ngPattern')('noregexp',
- 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,
- regex, startingTag(elm));
- }
-
- regexp = regex || undefined;
- ctrl.$validate();
- });
-
- ctrl.$validators.pattern = function(modelValue, viewValue) {
- // HTML5 pattern constraint validates the input value, so we validate the viewValue
- return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);
- };
- }
- };
-};
-
-
-var maxlengthDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var maxlength = -1;
- attr.$observe('maxlength', function(value) {
- var intVal = toInt(value);
- maxlength = isNaN(intVal) ? -1 : intVal;
- ctrl.$validate();
- });
- ctrl.$validators.maxlength = function(modelValue, viewValue) {
- return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);
- };
- }
- };
-};
-
-var minlengthDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var minlength = 0;
- attr.$observe('minlength', function(value) {
- minlength = toInt(value) || 0;
- ctrl.$validate();
- });
- ctrl.$validators.minlength = function(modelValue, viewValue) {
- return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;
- };
- }
- };
-};
-
-if (window.angular.bootstrap) {
- //AngularJS is already loaded, so we can return here...
- console.log('WARNING: Tried to load angular more than once.');
- return;
-}
-
-//try to bind to jquery now so that one can write jqLite(document).ready()
-//but we will rebind on bootstrap again.
-bindJQuery();
-
-publishExternalAPI(angular);
-
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-us",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
-
- jqLite(document).ready(function() {
- angularInit(document, bootstrap);
- });
-
-})(window, document);
-
-!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js
deleted file mode 100644
index b4f9b07e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- AngularJS v1.4.8
- (c) 2010-2015 Google, Inc. http://angularjs.org
- License: MIT
-*/
-(function(S,X,u){'use strict';function G(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.4.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function za(a){if(null==a||Xa(a))return!1;if(I(a)||E(a)||B&&a instanceof B)return!0;
-var b="length"in Object(a)&&a.length;return Q(b)&&(0<=b&&b-1 in a||"function"==typeof a.item)}function n(a,b,d){var c,e;if(a)if(z(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(I(a)||za(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==n)a.forEach(b,d,a);else if(nc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&
-b.call(d,a[c],c,a);else for(c in a)qa.call(a,c)&&b.call(d,a[c],c,a);return a}function oc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function pc(a){return function(b,d){a(d,b)}}function Td(){return++nb}function Mb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(H(g)||z(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],r=g[m];d&&H(r)?da(r)?a[m]=new Date(r.valueOf()):Ma(r)?a[m]=new RegExp(r):r.nodeName?a[m]=r.cloneNode(!0):
-Nb(r)?a[m]=r.clone():(H(a[m])||(a[m]=I(r)?[]:{}),Mb(a[m],[r],!0)):a[m]=r}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function M(a){return Mb(a,ra.call(arguments,1),!1)}function Ud(a){return Mb(a,ra.call(arguments,1),!0)}function ea(a){return parseInt(a,10)}function Ob(a,b){return M(Object.create(a),b)}function x(){}function Ya(a){return a}function na(a){return function(){return a}}function qc(a){return z(a.toString)&&a.toString!==sa}function q(a){return"undefined"===typeof a}function y(a){return"undefined"!==
-typeof a}function H(a){return null!==a&&"object"===typeof a}function nc(a){return null!==a&&"object"===typeof a&&!rc(a)}function E(a){return"string"===typeof a}function Q(a){return"number"===typeof a}function da(a){return"[object Date]"===sa.call(a)}function z(a){return"function"===typeof a}function Ma(a){return"[object RegExp]"===sa.call(a)}function Xa(a){return a&&a.window===a}function Za(a){return a&&a.$evalAsync&&a.$watch}function $a(a){return"boolean"===typeof a}function sc(a){return a&&Q(a.length)&&
-Vd.test(sa.call(a))}function Nb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function Wd(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function ta(a){return F(a.nodeName||a[0]&&a[0].nodeName)}function ab(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function bb(a,b){function d(a,b){var d=b.$$hashKey,e;if(I(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(nc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&
-(b[e]=c(a[e]));else for(e in a)qa.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!H(a))return a;var b=e.indexOf(a);if(-1!==b)return f[b];if(Xa(a)||Za(a))throw Aa("cpws");var b=!1,c;I(a)?(c=[],b=!0):sc(a)?c=new a.constructor(a):da(a)?c=new Date(a.getTime()):Ma(a)?(c=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),c.lastIndex=a.lastIndex):z(a.cloneNode)?c=a.cloneNode(!0):(c=Object.create(rc(a)),b=!0);e.push(a);f.push(c);return b?d(a,c):c}var e=[],f=[];if(b){if(sc(b))throw Aa("cpta");
-if(a===b)throw Aa("cpi");I(b)?b.length=0:n(b,function(a,c){"$$hashKey"!==c&&delete b[c]});e.push(a);f.push(b);return d(a,b)}return c(a)}function ia(a,b){if(I(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(H(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function ma(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&&"object"==d)if(I(a)){if(!I(b))return!1;if((d=a.length)==b.length){for(c=
-0;c<d;c++)if(!ma(a[c],b[c]))return!1;return!0}}else{if(da(a))return da(b)?ma(a.getTime(),b.getTime()):!1;if(Ma(a))return Ma(b)?a.toString()==b.toString():!1;if(Za(a)||Za(b)||Xa(a)||Xa(b)||I(b)||da(b)||Ma(b))return!1;d=$();for(c in a)if("$"!==c.charAt(0)&&!z(a[c])){if(!ma(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&y(b[c])&&!z(b[c]))return!1;return!0}return!1}function cb(a,b,d){return a.concat(ra.call(b,d))}function tc(a,b){var d=2<arguments.length?ra.call(arguments,2):
-[];return!z(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,cb(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function Xd(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=u:Xa(b)?d="$WINDOW":b&&X===b?d="$DOCUMENT":Za(b)&&(d="$SCOPE");return d}function db(a,b){if("undefined"===typeof a)return u;Q(b)||(b=b?2:null);return JSON.stringify(a,Xd,b)}function uc(a){return E(a)?JSON.parse(a):a}function vc(a,
-b){var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Pb(a,b,d){d=d?-1:1;var c=vc(b,a.getTimezoneOffset());b=a;a=d*(c-a.getTimezoneOffset());b=new Date(b.getTime());b.setMinutes(b.getMinutes()+a);return b}function ua(a){a=B(a).clone();try{a.empty()}catch(b){}var d=B("<div>").append(a).html();try{return a[0].nodeType===Na?F(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+F(b)})}catch(c){return F(d)}}function wc(a){try{return decodeURIComponent(a)}catch(b){}}
-function xc(a){var b={};n((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=wc(e),y(e)&&(f=y(f)?wc(f):!0,qa.call(b,e)?I(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Qb(a){var b=[];n(a,function(a,c){I(a)?n(a,function(a){b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))}):b.push(ja(c,!0)+(!0===a?"":"="+ja(a,!0)))});return b.length?b.join("&"):""}function ob(a){return ja(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,
-"=").replace(/%2B/gi,"+")}function ja(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Yd(a,b){var d,c,e=Oa.length;for(c=0;c<e;++c)if(d=Oa[c]+b,E(d=a.getAttribute(d)))return d;return null}function Zd(a,b){var d,c,e={};n(Oa,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});n(Oa,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":",
-"\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==Yd(d,"strict-di"),b(d,c?[c]:[],e))}function yc(a,b,d){H(d)||(d={});d=M({strictDi:!1},d);var c=function(){a=B(a);if(a.injector()){var c=a[0]===X?"document":ua(a);throw Aa("btstrpd",c.replace(/</,"&lt;").replace(/>/,"&gt;"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=eb(b,d.strictDi);c.invoke(["$rootScope",
-"$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;S&&e.test(S.name)&&(d.debugInfoEnabled=!0,S.name=S.name.replace(e,""));if(S&&!f.test(S.name))return c();S.name=S.name.replace(f,"");fa.resumeBootstrap=function(a){n(a,function(a){b.push(a)});return c()};z(fa.resumeDeferredBootstrap)&&fa.resumeDeferredBootstrap()}function $d(){S.name="NG_ENABLE_DEBUG_INFO!"+S.name;S.location.reload()}
-function ae(a){a=fa.element(a).injector();if(!a)throw Aa("test");return a.get("$$testability")}function zc(a,b){b=b||"_";return a.replace(be,function(a,c){return(c?b:"")+a.toLowerCase()})}function ce(){var a;if(!Ac){var b=pb();(oa=q(b)?S.jQuery:b?S[b]:u)&&oa.fn.on?(B=oa,M(oa.fn,{scope:Pa.scope,isolateScope:Pa.isolateScope,controller:Pa.controller,injector:Pa.injector,inheritedData:Pa.inheritedData}),a=oa.cleanData,oa.cleanData=function(b){var c;if(Rb)Rb=!1;else for(var e=0,f;null!=(f=b[e]);e++)(c=
-oa._data(f,"events"))&&c.$destroy&&oa(f).triggerHandler("$destroy");a(b)}):B=N;fa.element=B;Ac=!0}}function qb(a,b,d){if(!a)throw Aa("areq",b||"?",d||"required");return a}function Qa(a,b,d){d&&I(a)&&(a=a[a.length-1]);qb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ra(a,b){if("hasOwnProperty"===a)throw Aa("badname",b);}function Bc(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&
-z(a)?tc(e,a):a}function rb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==b)c||(c=B(ra.call(a,0,e))),c.push(b);return c||a}function $(){return Object.create(null)}function de(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=G("$injector"),c=G("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||G;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,
-d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return v}}function b(a,d){return function(b,e){e&&z(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return v}}if(!g)throw d("nomod",f);var c=[],e=[],t=[],A=a("$injector","invoke","push",e),v={_invokeQueue:c,_configBlocks:e,_runBlocks:t,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide",
-"decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider","register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),config:A,run:function(a){t.push(a);return this}};h&&A(h);return v})}})}function ee(a){M(a,{bootstrap:yc,copy:bb,extend:M,merge:Ud,equals:ma,element:B,forEach:n,injector:eb,noop:x,bind:tc,toJson:db,fromJson:uc,identity:Ya,isUndefined:q,isDefined:y,isString:E,isFunction:z,isObject:H,isNumber:Q,isElement:Nb,isArray:I,
-version:fe,isDate:da,lowercase:F,uppercase:sb,callbacks:{counter:0},getTestability:ae,$$minErr:G,$$csp:Ba,reloadWithDebugInfo:$d});Sb=de(S);Sb("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ge});a.provider("$compile",Cc).directive({a:he,input:Dc,textarea:Dc,form:ie,script:je,select:ke,style:le,option:me,ngBind:ne,ngBindHtml:oe,ngBindTemplate:pe,ngClass:qe,ngClassEven:re,ngClassOdd:se,ngCloak:te,ngController:ue,ngForm:ve,ngHide:we,ngIf:xe,ngInclude:ye,ngInit:ze,ngNonBindable:Ae,
-ngPluralize:Be,ngRepeat:Ce,ngShow:De,ngStyle:Ee,ngSwitch:Fe,ngSwitchWhen:Ge,ngSwitchDefault:He,ngOptions:Ie,ngTransclude:Je,ngModel:Ke,ngList:Le,ngChange:Me,pattern:Ec,ngPattern:Ec,required:Fc,ngRequired:Fc,minlength:Gc,ngMinlength:Gc,maxlength:Hc,ngMaxlength:Hc,ngValue:Ne,ngModelOptions:Oe}).directive({ngInclude:Pe}).directive(tb).directive(Ic);a.provider({$anchorScroll:Qe,$animate:Re,$animateCss:Se,$$animateQueue:Te,$$AnimateRunner:Ue,$browser:Ve,$cacheFactory:We,$controller:Xe,$document:Ye,$exceptionHandler:Ze,
-$filter:Jc,$$forceReflow:$e,$interpolate:af,$interval:bf,$http:cf,$httpParamSerializer:df,$httpParamSerializerJQLike:ef,$httpBackend:ff,$xhrFactory:gf,$location:hf,$log:jf,$parse:kf,$rootScope:lf,$q:mf,$$q:nf,$sce:of,$sceDelegate:pf,$sniffer:qf,$templateCache:rf,$templateRequest:sf,$$testability:tf,$timeout:uf,$window:vf,$$rAF:wf,$$jqLite:xf,$$HashMap:yf,$$cookieReader:zf})}])}function fb(a){return a.replace(Af,function(a,d,c,e){return e?c.toUpperCase():c}).replace(Bf,"Moz$1")}function Kc(a){a=a.nodeType;
-return 1===a||!a||9===a}function Lc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Tb.test(a)){d=d||e.appendChild(b.createElement("div"));c=(Cf.exec(a)||["",""])[1].toLowerCase();c=ka[c]||ka._default;d.innerHTML=c[1]+a.replace(Df,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=cb(f,d.childNodes);d=e.firstChild;d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";n(f,function(a){e.appendChild(a)});return e}function N(a){if(a instanceof N)return a;var b;E(a)&&(a=U(a),
-b=!0);if(!(this instanceof N)){if(b&&"<"!=a.charAt(0))throw Ub("nosel");return new N(a)}if(b){b=X;var d;a=(d=Ef.exec(a))?[b.createElement(d[1])]:(d=Lc(a,b))?d.childNodes:[]}Mc(this,a)}function Vb(a){return a.cloneNode(!0)}function ub(a,b){b||vb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)vb(d[c])}function Nc(a,b,d,c){if(y(c))throw Ub("offargs");var e=(c=wb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];y(d)&&ab(c||[],d);y(d)&&c&&0<c.length||
-(a.removeEventListener(b,f,!1),delete e[b])};n(b.split(" "),function(a){g(a);xb[a]&&g(xb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function vb(a,b){var d=a.ng339,c=d&&gb[d];c&&(b?delete c.data[b]:(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Nc(a)),delete gb[d],a.ng339=u))}function wb(a,b){var d=a.ng339,d=d&&gb[d];b&&!d&&(a.ng339=d=++Ff,d=gb[d]={events:{},data:{},handle:u});return d}function Wb(a,b,d){if(Kc(a)){var c=y(d),e=!c&&b&&!H(b),f=!b;a=(a=wb(a,
-!e))&&a.data;if(c)a[b]=d;else{if(f)return a;if(e)return a&&a[b];M(a,b)}}}function yb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function zb(a,b){b&&a.setAttribute&&n(b.split(" "),function(b){a.setAttribute("class",U((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+U(b)+" "," ")))})}function Ab(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");n(b.split(" "),
-function(a){a=U(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",U(d))}}function Mc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=b[c]}else a[a.length++]=b}}function Oc(a,b){return Bb(a,"$"+(b||"ngController")+"Controller")}function Bb(a,b,d){9==a.nodeType&&(a=a.documentElement);for(b=I(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(y(d=B.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&
-a.host}}function Pc(a){for(ub(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Xb(a,b){b||ub(a);var d=a.parentNode;d&&d.removeChild(a)}function Gf(a,b){b=b||S;if("complete"===b.document.readyState)b.setTimeout(a);else B(b).on("load",a)}function Qc(a,b){var d=Cb[b.toLowerCase()];return d&&Rc[ta(a)]&&d}function Hf(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(q(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;
-c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||If;1<g&&(f=ia(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem=a;return d}function If(a,b,d){d.call(a,b)}function Jf(a,b,d){var c=b.relatedTarget;c&&(c===a||Kf.call(a,c))||d.call(a,b)}function xf(){this.$get=function(){return M(N,
-{hasClass:function(a,b){a.attr&&(a=a[0]);return yb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Ab(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)}})}}function Ca(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||Td)():d+":"+a}function Sa(a,b){if(b){var d=0;this.nextUid=function(){return++d}}n(a,this.put,this)}function Lf(a){return(a=a.toString().replace(Sc,"").match(Tc))?
-"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function eb(a,b){function d(a){return function(b,c){if(H(b))n(b,pc(a));else return a(b,c)}}function c(a,b){Ra(a,"service");if(z(b)||I(b))b=t.instantiate(b);if(!b.$get)throw Da("pget",a);return r[a+"Provider"]=b}function e(a,b){return function(){var c=v.invoke(b,this);if(q(c))throw Da("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){qb(q(a)||I(a),"modulesToLoad","not an array");var b=[],c;n(a,function(a){function d(a){var b,
-c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=t.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{E(a)?(c=Sb(a),b=b.concat(g(c.requires)).concat(c._runBlocks),d(c._invokeQueue),d(c._configBlocks)):z(a)?b.push(t.invoke(a)):I(a)?b.push(t.invoke(a)):Qa(a,"module")}catch(e){throw I(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Da("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===
-k)throw Da("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,c,f,g){"string"===typeof f&&(g=f,f=null);var h=[],k=eb.$$annotate(a,b,g),l,m,t;m=0;for(l=k.length;m<l;m++){t=k[m];if("string"!==typeof t)throw Da("itkn",t);h.push(f&&f.hasOwnProperty(t)?f[t]:d(t,g))}I(a)&&(a=a[l]);return a.apply(c,h)}return{invoke:e,instantiate:function(a,b,c){var d=Object.create((I(a)?a[a.length-1]:a).prototype||
-null);a=e(a,d,b,c);return H(a)||z(a)?a:d},get:d,annotate:eb.$$annotate,has:function(b){return r.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Sa([],!0),r={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,na(b),!1)}),constant:d(function(a,b){Ra(a,"constant");r[a]=b;A[a]=b}),decorator:function(a,b){var c=t.get(a+"Provider"),d=c.$get;c.$get=function(){var a=
-v.invoke(d,c);return v.invoke(b,null,{$delegate:a})}}}},t=r.$injector=h(r,function(a,b){fa.isString(b)&&l.push(b);throw Da("unpr",l.join(" <- "));}),A={},v=A.$injector=h(A,function(a,b){var c=t.get(a+"Provider",b);return v.invoke(c.$get,c,u,a)});n(g(a),function(a){a&&v.invoke(a)});return v}function Qe(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window","$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===ta(a))return b=
-a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;z(c)?c=c():Nb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):Q(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=E(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Gf(function(){c.$evalAsync(g)})});
-return g}]}function hb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;I(a)&&(a=a.join(" "));I(b)&&(b=b.join(" "));return a+" "+b}function Mf(a){E(a)&&(a=a.split(" "));var b=$();n(a,function(a){a.length&&(b[a]=!0)});return b}function Ea(a){return H(a)?a:{}}function Nf(a,b,d,c){function e(a){try{a.apply(null,ra.call(arguments,1))}finally{if(v--,0===v)for(;T.length;)try{T.pop()()}catch(b){d.error(b)}}}function f(){L=null;g();h()}function g(){a:{try{p=m.state;break a}catch(a){}p=void 0}p=q(p)?
-null:p;ma(p,J)&&(p=J);J=p}function h(){if(w!==k.url()||C!==p)w=k.url(),C=p,n(aa,function(a){a(k.url(),p)})}var k=this,l=a.location,m=a.history,r=a.setTimeout,t=a.clearTimeout,A={};k.isMock=!1;var v=0,T=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){v++};k.notifyWhenNoOutstandingRequests=function(a){0===v?a():T.push(a)};var p,C,w=l.href,ga=b.find("base"),L=null;g();C=p;k.url=function(b,d,e){q(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=
-C===e;if(w===b&&(!c.history||f))return k;var h=w&&Fa(w)===Fa(b);w=b;C=e;if(!c.history||h&&f){if(!h||L)L=b;d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b;l.href!==b&&(L=b)}else m[d?"replaceState":"pushState"](e,"",b),g(),C=p;return k}return L||l.href.replace(/%27/g,"'")};k.state=function(){return p};var aa=[],D=!1,J=null;k.onUrlChange=function(b){if(!D){if(c.history)B(a).on("popstate",f);B(a).on("hashchange",f);D=!0}aa.push(b);return b};k.$$applicationDestroyed=function(){B(a).off("hashchange popstate",
-f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=ga.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;v++;c=r(function(){delete A[c];e(a)},b||0);A[c]=!0;return c};k.defer.cancel=function(a){return A[a]?(delete A[a],t(a),e(x),!0):!1}}function Ve(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new Nf(a,c,b,d)}]}function We(){this.$get=function(){function a(a,c){function e(a){a!=r&&(t?t==a&&(t=a.n):t=a,f(a.n,a.p),f(a,r),r=a,
-r.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw G("$cacheFactory")("iid",a);var g=0,h=M({},c,{id:a}),k=$(),l=c&&c.capacity||Number.MAX_VALUE,m=$(),r=null,t=null;return b[a]={put:function(a,b){if(!q(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(t.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;e(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b==r&&(r=b.p);b==t&&
-(t=b.n);f(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=$();g=0;m=$();r=t=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return M({},h,{size:g})}}}var b={};a.info=function(){var a={};n(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function rf(){this.$get=["$cacheFactory",function(a){return a("templates")}]}function Cc(a,b){function d(a,b,c){var d=/^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/,e={};n(a,function(a,f){var g=a.match(d);
-if(!g)throw ha("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f}});return e}function c(a){var b=a.charAt(0);if(!b||b!==F(b))throw ha("baddir",a);if(a!==a.trim())throw ha("baddir",a);}var e={},f=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,g=/(([\w\-]+)(?:\:([^;]+))?;?)/,h=Wd("ngSrc,ngSrcset,src,srcset"),k=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,l=/^(on[a-z]+|formaction)$/;this.directive=function t(b,f){Ra(b,"directive");
-E(b)?(c(b),qb(f,"directiveFactory"),e.hasOwnProperty(b)||(e[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var f=[];n(e[b],function(e,g){try{var h=a.invoke(e);z(h)?h={compile:na(h)}:!h.compile&&h.link&&(h.compile=na(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=h.require||h.controller&&h.name;h.restrict=h.restrict||"EA";var k=h,l=h,m=h.name,t={isolateScope:null,bindToController:null};H(l.scope)&&(!0===l.bindToController?(t.bindToController=d(l.scope,
-m,!0),t.isolateScope={}):t.isolateScope=d(l.scope,m,!1));H(l.bindToController)&&(t.bindToController=d(l.bindToController,m,!0));if(H(t.bindToController)){var v=l.controller,R=l.controllerAs;if(!v)throw ha("noctrl",m);var V;a:if(R&&E(R))V=R;else{if(E(v)){var n=Uc.exec(v);if(n){V=n[3];break a}}V=void 0}if(!V)throw ha("noident",m);}var s=k.$$bindings=t;H(s.isolateScope)&&(h.$$isolateBindings=s.isolateScope);h.$$moduleName=e.$$moduleName;f.push(h)}catch(u){c(u)}});return f}])),e[b].push(f)):n(b,pc(t));
-return this};this.aHrefSanitizationWhitelist=function(a){return y(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var m=!0;this.debugInfoEnabled=function(a){return y(a)?(m=a,this):m};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$document","$sce","$animate","$$sanitizeUri",function(a,
-b,c,d,p,C,w,ga,L,aa,D){function J(a,b){try{a.addClass(b)}catch(c){}}function K(a,b,c,d,e){a instanceof B||(a=B(a));n(a,function(b,c){b.nodeType==Na&&b.nodeValue.match(/\S+/)&&(a[c]=B(b).wrap("<span></span>").parent()[0])});var f=O(a,b,a,c,d,e);K.$$addScopeClass(a);var g=null;return function(b,c,d){qb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement;h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=
-d&&d[0])?"foreignobject"!==ta(d)&&d.toString().match(/SVG/)?"svg":"html":"html");d="html"!==g?B(Yb(g,B("<div>").append(a).html())):c?Pa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);K.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);return d}}function O(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,t,w,D;if(p)for(D=Array(c.length),m=0;m<h.length;m+=3)f=h[m],D[f]=c[f];else D=c;m=0;for(t=h.length;m<t;)k=D[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),K.$$addScopeInfo(B(k),
-l)):l=a,w=c.transcludeOnThisElement?R(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?R(a,b):null,c(f,l,k,d,w)):f&&f(a,k.childNodes,u,e)}for(var h=[],k,l,m,t,p,w=0;w<a.length;w++){k=new fa;l=V(a[w],[],k,0===w?d:u,e);(f=l.length?Z(l,a[w],k,b,c,null,[],[],f):null)&&f.scope&&K.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[w].childNodes)||!m.length?null:O(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(w,f,k),t=!0,p=p||f;f=null}return t?g:null}function R(a,
-b,c){return function(d,e,f,g,h){d||(d=a.$new(!1,h),d.$$transcluded=!0);return b(d,e,{parentBoundTranscludeFn:c,transcludeControllers:f,futureParentElement:g})}}function V(a,b,c,d,e){var h=c.$attr,k;switch(a.nodeType){case 1:P(b,va(ta(a)),"E",d,e);for(var l,m,t,p=a.attributes,w=0,D=p&&p.length;w<D;w++){var K=!1,A=!1;l=p[w];k=l.name;m=U(l.value);l=va(k);if(t=ka.test(l))k=k.replace(Vc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(l=l.match(la))&&G(l[1])&&(K=k,A=k.substr(0,k.length-
-5)+"end",k=k.substr(0,k.length-6));l=va(k.toLowerCase());h[l]=k;if(t||!c.hasOwnProperty(l))c[l]=m,Qc(a,l)&&(c[l]=!0);W(a,b,m,l,t);P(b,l,"A",d,e,K,A)}a=a.className;H(a)&&(a=a.animVal);if(E(a)&&""!==a)for(;k=g.exec(a);)l=va(k[2]),P(b,l,"C",d,e)&&(c[l]=U(k[3])),a=a.substr(k.index+k[0].length);break;case Na:if(11===Ha)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Na;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);N(b,a.nodeValue);break;case 8:try{if(k=f.exec(a.nodeValue))l=
-va(k[1]),P(b,l,"M",d,e)&&(c[l]=U(k[2]))}catch(R){}}b.sort(Ia);return b}function Ta(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ha("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return B(d)}function s(a,b,c){return function(d,e,f,g,h){e=Ta(e[0],b,c);return a(d,e,f,g,h)}}function Z(a,b,d,e,f,g,h,l,m){function t(a,b,c,d){if(a){c&&(a=s(a,c,d));a.require=q.require;a.directiveName=x;if(O===
-q||q.$$isolateScope)a=ca(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=s(b,c,d));b.require=q.require;b.directiveName=x;if(O===q||q.$$isolateScope)b=ca(b,{isolateScope:!0});l.push(b)}}function p(a,b,c,d){var e;if(E(b)){var f=b.match(k);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;e||(d="$"+b+"Controller",e=g?c.inheritedData(d):c.data(d));if(!e&&!f)throw ha("ctreq",b,a);}else if(I(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=p(a,b[g],c,d);return e||
-null}function w(a,b,c,d,e,f){var g=$(),h;for(h in d){var k=d[h],l={$scope:k===O||k.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},m=k.controller;"@"==m&&(m=b[k.name]);l=C(m,l,!0,k.controllerAs);g[k.name]=l;aa||a.data("$"+k.name+"Controller",l.instance)}return g}function D(a,c,e,f,g){function k(a,b,c){var d;Za(a)||(c=b,b=a,a=u);aa&&(d=v);c||(c=aa?V.parent():V);return g(a,b,d,c,Ta)}var m,t,A,v,C,V,Ga;b===e?(f=d,V=d.$$element):(V=B(e),f=new fa(V,d));A=c;O?t=c.$new(!0):R&&(A=c.$parent);g&&(C=k,
-C.$$boundTransclude=g);T&&(v=w(V,f,C,T,t,c));O&&(K.$$addScopeInfo(V,t,!0,!(J&&(J===O||J===O.$$originalDirective))),K.$$addScopeClass(V,!0),t.$$isolateBindings=O.$$isolateBindings,(Ga=ba(c,f,t,t.$$isolateBindings,O))&&t.$on("$destroy",Ga));for(var n in v){Ga=T[n];var ga=v[n],L=Ga.$$bindings.bindToController;ga.identifier&&L&&(m=ba(A,f,ga.instance,L,Ga));var q=ga();q!==ga.instance&&(ga.instance=q,V.data("$"+Ga.name+"Controller",q),m&&m(),m=ba(A,f,ga.instance,L,Ga))}F=0;for(M=h.length;F<M;F++)m=h[F],
-ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C);var Ta=c;O&&(O.template||null===O.templateUrl)&&(Ta=t);a&&a(Ta,e.childNodes,u,g);for(F=l.length-1;0<=F;F--)m=l[F],ea(m,m.isolateScope?t:c,V,f,m.require&&p(m.directiveName,m.require,V,v),C)}m=m||{};for(var A=-Number.MAX_VALUE,R=m.newScopeDirective,T=m.controllerDirectives,O=m.newIsolateScopeDirective,J=m.templateDirective,n=m.nonTlbTranscludeDirective,ga=!1,L=!1,aa=m.hasElementTranscludeDirective,Z=d.$$element=B(b),q,x,P,Ia=
-e,G,F=0,M=a.length;F<M;F++){q=a[F];var N=q.$$start,Q=q.$$end;N&&(Z=Ta(b,N,Q));P=u;if(A>q.priority)break;if(P=q.scope)q.templateUrl||(H(P)?(Ua("new/isolated scope",O||R,q,Z),O=q):Ua("new/isolated scope",O,q,Z)),R=R||q;x=q.name;!q.templateUrl&&q.controller&&(P=q.controller,T=T||$(),Ua("'"+x+"' controller",T[x],q,Z),T[x]=q);if(P=q.transclude)ga=!0,q.$$tlb||(Ua("transclusion",n,q,Z),n=q),"element"==P?(aa=!0,A=q.priority,P=Z,Z=d.$$element=B(X.createComment(" "+x+": "+d[x]+" ")),b=Z[0],Y(f,ra.call(P,0),
-b),Ia=K(P,e,A,g&&g.name,{nonTlbTranscludeDirective:n})):(P=B(Vb(b)).contents(),Z.empty(),Ia=K(P,e,u,u,{needsNewScope:q.$$isolateScope||q.$$newScope}));if(q.template)if(L=!0,Ua("template",J,q,Z),J=q,P=z(q.template)?q.template(Z,d):q.template,P=ja(P),q.replace){g=q;P=Tb.test(P)?Xc(Yb(q.templateNamespace,U(P))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ha("tplrt",x,"");Y(f,Z,b);P={$attr:{}};var Wc=V(b,[],P),W=a.splice(F+1,a.length-(F+1));(O||R)&&y(Wc,O,R);a=a.concat(Wc).concat(W);S(d,P);M=a.length}else Z.html(P);
-if(q.templateUrl)L=!0,Ua("template",J,q,Z),J=q,q.replace&&(g=q),D=Of(a.splice(F,a.length-F),Z,d,f,ga&&Ia,h,l,{controllerDirectives:T,newScopeDirective:R!==q&&R,newIsolateScopeDirective:O,templateDirective:J,nonTlbTranscludeDirective:n}),M=a.length;else if(q.compile)try{G=q.compile(Z,d,Ia),z(G)?t(null,G,N,Q):G&&t(G.pre,G.post,N,Q)}catch(da){c(da,ua(Z))}q.terminal&&(D.terminal=!0,A=Math.max(A,q.priority))}D.scope=R&&!0===R.scope;D.transcludeOnThisElement=ga;D.templateOnThisElement=L;D.transclude=Ia;
-m.hasElementTranscludeDirective=aa;return D}function y(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Ob(a[d],{$$isolateScope:b,$$newScope:c})}function P(b,d,f,g,h,k,l){if(d===h)return null;h=null;if(e.hasOwnProperty(d)){var m;d=a.get(d+"Directive");for(var p=0,w=d.length;p<w;p++)try{m=d[p],(q(g)||g>m.priority)&&-1!=m.restrict.indexOf(f)&&(k&&(m=Ob(m,{$$start:k,$$end:l})),b.push(m),h=m)}catch(D){c(D)}}return h}function G(b){if(e.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,f=c.length;d<f;d++)if(b=
-c[d],b.multiElement)return!0;return!1}function S(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,f){"class"==f?(J(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):"style"==f?(e.attr("style",e.attr("style")+";"+b),a.style=(a.style?a.style+";":"")+b):"$"==f.charAt(0)||a.hasOwnProperty(f)||(a[f]=b,d[f]=c[f])})}function Of(a,b,c,e,f,g,h,k){var l=[],m,t,p=b[0],w=a.shift(),D=Ob(w,{templateUrl:null,
-transclude:null,replace:null,$$originalDirective:w}),A=z(w.templateUrl)?w.templateUrl(b,c):w.templateUrl,K=w.templateNamespace;b.empty();d(A).then(function(d){var T,v;d=ja(d);if(w.replace){d=Tb.test(d)?Xc(Yb(K,U(d))):[];T=d[0];if(1!=d.length||1!==T.nodeType)throw ha("tplrt",w.name,A);d={$attr:{}};Y(e,b,T);var C=V(T,[],d);H(w.scope)&&y(C,!0);a=C.concat(a);S(c,d)}else T=p,b.html(d);a.unshift(D);m=Z(a,T,c,f,b,w,g,h,k);n(e,function(a,c){a==T&&(e[c]=b[0])});for(t=O(b[0].childNodes,f);l.length;){d=l.shift();
-v=l.shift();var ga=l.shift(),L=l.shift(),C=b[0];if(!d.$$destroyed){if(v!==p){var q=v.className;k.hasElementTranscludeDirective&&w.replace||(C=Vb(T));Y(ga,B(v),C);J(B(C),q)}v=m.transcludeOnThisElement?R(d,m.transclude,L):L;m(t,d,C,e,v)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=R(b,m.transclude,e)),m(t,b,c,d,a)))}}function Ia(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function Ua(a,
-b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ha("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,ua(d));}function N(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=a.parent();var b=!!a.length;b&&K.$$addBindingClass(a);return function(a,c){var e=c.parent();b||K.$$addBindingClass(e);K.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function Yb(a,b){a=F(a||"html");switch(a){case "svg":case "math":var c=X.createElement("div");
-c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function Q(a,b){if("srcdoc"==b)return L.HTML;var c=ta(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b))return L.RESOURCE_URL}function W(a,c,d,e,f){var g=Q(a,e);f=h[e]||f;var k=b(d,!0,g,f);if(k){if("multiple"===e&&"select"===ta(a))throw ha("selmulti",ua(a));c.push({priority:100,compile:function(){return{pre:function(a,c,h){c=h.$$observers||(h.$$observers=$());if(l.test(e))throw ha("nodomevents");
-var m=h[e];m!==d&&(k=m&&b(m,!0,g,f),d=m);k&&(h[e]=k(a),(c[e]||(c[e]=[])).$$inter=!0,(h.$$observers&&h.$$observers[e].$$scope||a).$watch(k,function(a,b){"class"===e&&a!=b?h.$updateClass(a,b):h.$set(e,a)}))}}}})}}function Y(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=X.createDocumentFragment();a.appendChild(d);
-B.hasData(d)&&(B.data(c,B.data(d)),oa?(Rb=!0,oa.cleanData([d])):delete B.cache[d[B.expando]]);d=1;for(e=b.length;d<e;d++)f=b[d],B(f).remove(),a.appendChild(f),delete b[d];b[0]=c;b.length=1}function ca(a,b){return M(function(){return a.apply(null,arguments)},a,b)}function ea(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ua(d))}}function ba(a,c,d,e,f){var g=[];n(e,function(e,h){var k=e.attrName,l=e.optional,m,t,w,D;switch(e.mode){case "@":l||qa.call(c,k)||(d[h]=c[k]=void 0);c.$observe(k,function(a){E(a)&&
-(d[h]=a)});c.$$observers[k].$$scope=a;E(c[k])&&(d[h]=b(c[k])(a));break;case "=":if(!qa.call(c,k)){if(l)break;c[k]=void 0}if(l&&!c[k])break;t=p(c[k]);D=t.literal?ma:function(a,b){return a===b||a!==a&&b!==b};w=t.assign||function(){m=d[h]=t(a);throw ha("nonassign",c[k],f.name);};m=d[h]=t(a);l=function(b){D(b,d[h])||(D(b,m)?w(a,b=d[h]):d[h]=b);return m=b};l.$stateful=!0;l=e.collection?a.$watchCollection(c[k],l):a.$watch(p(c[k],l),null,t.literal);g.push(l);break;case "&":t=c.hasOwnProperty(k)?p(c[k]):
-x;if(t===x&&l)break;d[h]=function(b){return t(a,b)}}});return g.length&&function(){for(var a=0,b=g.length;a<b;++a)g[a]()}}var fa=function(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a};fa.prototype={$normalize:va,$addClass:function(a){a&&0<a.length&&aa.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&aa.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=Yc(a,b);c&&c.length&&aa.addClass(this.$$element,
-c);(c=Yc(b,a))&&c.length&&aa.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Qc(this.$$element[0],a),g=Zc[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=zc(a,"-"));f=ta(this.$$element);if("a"===f&&"href"===a||"img"===f&&"src"===a)this[a]=b=D(b,"src"===a);else if("img"===f&&"srcset"===a){for(var f="",g=U(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<
-k;l++)var m=2*l,f=f+D(U(g[m]),!0),f=f+(" "+U(g[m+1]));g=U(g[2*l]).split(/\s/);f+=D(U(g[0]),!0);2===g.length&&(f+=" "+U(g[1]));this[a]=b=f}!1!==d&&(null===b||q(b)?this.$$element.removeAttr(e):this.$$element.attr(e,b));(a=this.$$observers)&&n(a[h],function(a){try{a(b)}catch(d){c(d)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=$()),e=d[a]||(d[a]=[]);e.push(b);w.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||q(c[a])||b(c[a])});return function(){ab(e,b)}}};var da=b.startSymbol(),
-ia=b.endSymbol(),ja="{{"==da||"}}"==ia?Ya:function(a){return a.replace(/\{\{/g,da).replace(/}}/g,ia)},ka=/^ngAttr[A-Z]/,la=/^(.+)Start$/;K.$$addBindingInfo=m?function(a,b){var c=a.data("$binding")||[];I(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:x;K.$$addBindingClass=m?function(a){J(a,"ng-binding")}:x;K.$$addScopeInfo=m?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:x;K.$$addScopeClass=m?function(a,b){J(a,b?"ng-isolate-scope":"ng-scope")}:x;return K}]}function va(a){return fb(a.replace(Vc,
-""))}function Yc(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function Xc(a){a=B(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&Pf.call(a,b,1);return a}function Xe(){var a={},b=!1;this.register=function(b,c){Ra(b,"controller");H(b)?M(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector","$window",function(d,c){function e(a,b,c,d){if(!a||!H(a.$scope))throw G("$controller")("noscp",
-d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,r;h=!0===h;k&&E(k)&&(r=k);if(E(f)){k=f.match(Uc);if(!k)throw Qf("ctrlfmt",f);m=k[1];r=r||k[3];f=a.hasOwnProperty(m)?a[m]:Bc(g.$scope,m,!0)||(b?Bc(c,m,!0):u);Qa(f,m,!0)}if(h)return h=(I(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),r&&e(g,r,l,m||f.name),M(function(){var a=d.invoke(f,l,g,m);a!==l&&(H(a)||z(a))&&(l=a,r&&e(g,r,l,m||f.name));return l},{instance:l,identifier:r});l=d.instantiate(f,g,m);r&&e(g,r,l,m||f.name);return l}}]}function Ye(){this.$get=
-["$window",function(a){return B(a.document)}]}function Ze(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function Zb(a){return H(a)?da(a)?a.toISOString():db(a):a}function df(){this.$get=function(){return function(a){if(!a)return"";var b=[];oc(a,function(a,c){null===a||q(a)||(I(a)?n(a,function(a,d){b.push(ja(c)+"="+ja(Zb(a)))}):b.push(ja(c)+"="+ja(Zb(a))))});return b.join("&")}}}function ef(){this.$get=function(){return function(a){function b(a,e,f){null===a||q(a)||
-(I(a)?n(a,function(a,c){b(a,e+"["+(H(a)?c:"")+"]")}):H(a)&&!da(a)?oc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ja(e)+"="+ja(Zb(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function $b(a,b){if(E(a)){var d=a.replace(Rf,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf($c))||(c=(c=d.match(Sf))&&Tf[c[0]].test(d));c&&(a=uc(d))}}return a}function ad(a){var b=$(),d;E(a)?n(a.split("\n"),function(a){d=a.indexOf(":");var e=F(U(a.substr(0,d)));a=U(a.substr(d+1));e&&
-(b[e]=b[e]?b[e]+", "+a:a)}):H(a)&&n(a,function(a,d){var f=F(d),g=U(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function bd(a){var b;return function(d){b||(b=ad(a));return d?(d=b[F(d)],void 0===d&&(d=null),d):b}}function cd(a,b,d,c){if(z(c))return c(a,b,d);n(c,function(c){a=c(a,b,d)});return a}function cf(){var a=this.defaults={transformResponse:[$b],transformRequest:[function(a){return H(a)&&"[object File]"!==sa.call(a)&&"[object Blob]"!==sa.call(a)&&"[object FormData]"!==sa.call(a)?db(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},
-post:ia(ac),put:ia(ac),patch:ia(ac)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return y(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return y(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a){var b=M({},a);b.data=cd(a.data,a.headers,a.status,f.transformResponse);
-a=a.status;return 200<=a&&300>a?b:k.reject(b)}function e(a,b){var c,d={};n(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}if(!fa.isObject(b))throw G("$http")("badreq",b);var f=M({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);f.headers=function(b){var c=a.headers,d=M({},b.headers),f,g,h,c=M({},c.common,c[F(b.method)]);a:for(f in c){g=F(f);for(h in d)if(F(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);
-f.method=sb(f.method);f.paramSerializer=E(f.paramSerializer)?l.get(f.paramSerializer):f.paramSerializer;var g=[function(b){var d=b.headers,e=cd(b.data,bd(d),u,b.transformRequest);q(e)&&n(d,function(a,b){"content-type"===F(b)&&delete d[b]});q(b.withCredentials)&&!q(a.withCredentials)&&(b.withCredentials=a.withCredentials);return r(b,e).then(c,c)},u],h=k.when(f);for(n(v,function(a){(a.request||a.requestError)&&g.unshift(a.request,a.requestError);(a.response||a.responseError)&&g.push(a.response,a.responseError)});g.length;){b=
-g.shift();var m=g.shift(),h=h.then(b,m)}d?(h.success=function(a){Qa(a,"fn");h.then(function(b){a(b.data,b.status,b.headers,f)});return h},h.error=function(a){Qa(a,"fn");h.then(null,function(b){a(b.data,b.status,b.headers,f)});return h}):(h.success=dd("success"),h.error=dd("error"));return h}function r(c,d){function g(a,c,d,e){function f(){l(c,a,d,e)}J&&(200<=a&&300>a?J.put(R,[a,c,ad(d),e]):J.remove(R));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function l(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?n.resolve:
-n.reject)({data:a,status:b,headers:bd(d),config:c,statusText:e})}function r(a){l(a.data,a.status,ia(a.headers()),a.statusText)}function v(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var n=k.defer(),D=n.promise,J,K,O=c.headers,R=t(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);D.then(v,v);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(J=H(c.cache)?c.cache:H(a.cache)?a.cache:A);J&&(K=J.get(R),y(K)?K&&z(K.then)?K.then(r,r):I(K)?l(K[1],
-K[0],ia(K[2]),K[3]):l(K,200,{},"OK"):J.put(R,D));q(K)&&((K=ed(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:u)&&(O[c.xsrfHeaderName||a.xsrfHeaderName]=K),e(c.method,R,d,g,O,c.timeout,c.withCredentials,c.responseType));return D}function t(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var A=g("$http");a.paramSerializer=E(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var v=[];n(c,function(a){v.unshift(E(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,
-function(a){m[a]=function(b,c){return m(M({},c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=function(b,c,d){return m(M({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function gf(){this.$get=function(){return function(){return new S.XMLHttpRequest}}}function ff(){this.$get=["$browser","$window","$document","$xhrFactory",function(a,b,d,c){return Uf(a,c,a.defer,b.angular.callbacks,d[0])}]}function Uf(a,b,d,
-c,e){function f(a,b,d){var f=e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,A="unknown";a&&("load"!==a.type||c[b].called||(a={type:"error"}),A=a.type,g="error"===a.type?404:200);d&&d(g,A)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,k,l,m,r,t,A){function v(){C&&C();w&&w.abort()}
-function T(b,c,e,f,g){y(L)&&d.cancel(L);C=w=null;b(c,e,f,g);a.$$completeOutstandingRequest(x)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"==F(e)){var p="_"+(c.counter++).toString(36);c[p]=function(a){c[p].data=a;c[p].called=!0};var C=f(h.replace("JSON_CALLBACK","angular.callbacks."+p),p,function(a,b){T(l,a,c[p].data,"",b);c[p]=x})}else{var w=b(e,h);w.open(e,h,!0);n(m,function(a,b){y(a)&&w.setRequestHeader(b,a)});w.onload=function(){var a=w.statusText||"",b="response"in w?w.response:w.responseText,
-c=1223===w.status?204:w.status;0===c&&(c=b?200:"file"==wa(h).protocol?404:0);T(l,c,b,w.getAllResponseHeaders(),a)};e=function(){T(l,-1,null,null,"")};w.onerror=e;w.onabort=e;t&&(w.withCredentials=!0);if(A)try{w.responseType=A}catch(ga){if("json"!==A)throw ga;}w.send(q(k)?null:k)}if(0<r)var L=d(v,r);else r&&z(r.then)&&r.then(v)}}function af(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse","$exceptionHandler",
-"$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(m,a).replace(r,b)}function h(f,h,m,r){function p(a){try{var b=a;a=m?e.getTrusted(m,b):e.valueOf(b);var d;if(r&&!y(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=db(a)}d=a}return d}catch(g){c(Ja.interr(f,g))}}r=!!r;for(var C,w,n=0,L=[],s=[],D=f.length,J=[],K=[];n<D;)if(-1!=(C=f.indexOf(a,n))&&-1!=(w=f.indexOf(b,C+k)))n!==C&&J.push(g(f.substring(n,C))),n=f.substring(C+
-k,w),L.push(n),s.push(d(n,p)),n=w+l,K.push(J.length),J.push("");else{n!==D&&J.push(g(f.substring(n)));break}m&&1<J.length&&Ja.throwNoconcat(f);if(!h||L.length){var O=function(a){for(var b=0,c=L.length;b<c;b++){if(r&&q(a[b]))return;J[K[b]]=a[b]}return J.join("")};return M(function(a){var b=0,d=L.length,e=Array(d);try{for(;b<d;b++)e[b]=s[b](a);return O(e)}catch(g){c(Ja.interr(f,g))}},{exp:f,expressions:L,$$watchDelegate:function(a,b){var c;return a.$watchGroup(s,function(d,e){var f=O(d);z(b)&&b.call(this,
-f,d!==e?c:f,a);c=f})}})}}var k=a.length,l=b.length,m=new RegExp(a.replace(/./g,f),"g"),r=new RegExp(b.replace(/./g,f),"g");h.startSymbol=function(){return a};h.endSymbol=function(){return b};return h}]}function bf(){this.$get=["$rootScope","$window","$q","$$q",function(a,b,d,c){function e(e,h,k,l){var m=4<arguments.length,r=m?ra.call(arguments,4):[],t=b.setInterval,A=b.clearInterval,v=0,n=y(l)&&!l,p=(n?c:d).defer(),C=p.promise;k=y(k)?k:0;C.then(null,null,m?function(){e.apply(null,r)}:e);C.$$intervalId=
-t(function(){p.notify(v++);0<k&&v>=k&&(p.resolve(v),A(C.$$intervalId),delete f[C.$$intervalId]);n||a.$apply()},h);f[C.$$intervalId]=p;return C}var f={};e.cancel=function(a){return a&&a.$$intervalId in f?(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0):!1};return e}]}function bc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=ob(a[b]);return a.join("/")}function fd(a,b){var d=wa(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=ea(d.port)||Vf[d.protocol]||
-null}function gd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=wa(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=xc(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function pa(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function Fa(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ib(a){return a.replace(/(#.+)|#$/,"$1")}function cc(a,b,d){this.$$html5=!0;d=d||"";
-fd(a,this);this.$$parse=function(a){var d=pa(b,a);if(!E(d))throw Db("ipthprfx",a,b);gd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Qb(this.$$search),d=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(a?"?"+a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;y(f=pa(a,c))?(g=f,g=y(f=pa(d,f))?b+(pa("/",f)||f):a+g):y(f=pa(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);
-return!!g}}function dc(a,b,d){fd(a,this);this.$$parse=function(c){var e=pa(a,c)||pa(b,c),f;q(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",q(e)&&(a=c,this.replace())):(f=pa(d,e),q(f)&&(f=e));gd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.indexOf(e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?
-d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Fa(a)==Fa(b)?(this.$$parse(b),!0):!1}}function hd(a,b,d){this.$$html5=!0;dc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Fa(c)?f=c:(g=pa(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Qb(this.$$search),e=this.$$hash?"#"+ob(this.$$hash):"";this.$$url=bc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Eb(a){return function(){return this[a]}}
-function id(a,b){return function(d){if(q(d))return this[a];this[a]=b(d);this.$$compose();return this}}function hf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return y(b)?(a=b,this):a};this.html5Mode=function(a){return $a(a)?(b.enabled=a,this):H(a)?($a(a.enabled)&&(b.enabled=a.enabled),$a(a.requireBase)&&(b.requireBase=a.requireBase),$a(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",
-function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,b)}var l,m;m=c.baseHref();var r=c.url(),t;if(b.enabled){if(!m&&b.requireBase)throw Db("nobase");t=r.substring(0,r.indexOf("/",r.indexOf("//")+2))+(m||"/");m=e.history?cc:hd}else t=Fa(r),m=dc;var A=t.substr(0,Fa(t).lastIndexOf("/")+1);l=new m(t,A,"#"+a);l.$$parseLinkUrl(r,r);l.$$state=
-c.state();var v=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=B(a.target);"a"!==ta(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");H(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=wa(h.animVal).href);v.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=
-!0))}});ib(l.absUrl())!=ib(r)&&c.url(l.absUrl(),!0);var n=!0;c.onUrlChange(function(a,b){q(pa(A,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=ib(a);l.$$parse(a);l.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(n=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=ib(c.url()),b=ib(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(n||
-m)n=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),k(a,f)))});l.$$replace=!1});return l}]}function jf(){var a=!0,b=this;this.debugEnabled=function(b){return y(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&
-(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||x;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];n(arguments,function(b){a.push(c(b))});return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Va(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===
-a||"__proto__"===a)throw ba("isecfld",b);return a}function jd(a,b){a+="";if(!E(a))throw ba("iseccst",b);return a}function xa(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a.window===a)throw ba("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ba("isecdom",b);if(a===Object)throw ba("isecobj",b);}return a}function kd(a,b){if(a){if(a.constructor===a)throw ba("isecfn",b);if(a===Wf||a===Xf||a===Yf)throw ba("isecff",b);}}function ld(a,b){if(a&&(a===(0).constructor||a===
-(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ba("isecaf",b);}function Zf(a,b){return"undefined"!==typeof a?a:b}function md(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function W(a,b){var d,c;switch(a.type){case s.Program:d=!0;n(a.body,function(a){W(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:W(a.argument,b);a.constant=a.argument.constant;
-a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:W(a.test,b);W(a.alternate,b);W(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=
-!1;a.toWatch=[a];break;case s.MemberExpression:W(a.object,b);a.computed&&W(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:!1;c=[];n(a.arguments,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:W(a.left,b);W(a.right,b);a.constant=a.left.constant&&a.right.constant;
-a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];n(a.elements,function(a){W(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];n(a.properties,function(a){W(a.value,b);d=d&&a.value.constant;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1,a.toWatch=[]}}function nd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:u}}
-function od(a){return a.type===s.Identifier||a.type===s.MemberExpression}function pd(a){if(1===a.body.length&&od(a.body[0].expression))return{type:s.AssignmentExpression,left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function qd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function rd(a,b){this.astBuilder=a;this.$filter=b}function sd(a,
-b){this.astBuilder=a;this.$filter=b}function Fb(a){return"constructor"==a}function ec(a){return z(a.valueOf)?a.valueOf():$f.call(a)}function kf(){var a=$(),b=$();this.$get=["$filter",function(d){function c(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ec(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function e(a,b,d,e,f){var g=e.inputs,h;if(1===g.length){var k=c,g=g[0];return a.$watch(function(a){var b=g(a);c(b,k)||(h=e(a,u,u,[b]),k=b&&ec(b));return h},b,d,f)}for(var l=[],m=[],r=0,n=
-g.length;r<n;r++)l[r]=c,m[r]=null;return a.$watch(function(a){for(var b=!1,d=0,f=g.length;d<f;d++){var k=g[d](a);if(b||(b=!c(k,l[d])))m[d]=k,l[d]=k&&ec(k)}b&&(h=e(a,u,u,m));return h},b,d,f)}function f(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;z(b)&&b.apply(this,arguments);y(a)&&d.$$postDigest(function(){y(f)&&e()})},c)}function g(a,b,c,d){function e(a){var b=!0;n(a,function(a){y(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,
-c,d){g=a;z(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function h(a,b,c,d){var e;return e=a.$watch(function(a){return d(a)},function(a,c,d){z(b)&&b.apply(this,arguments);e()},c)}function k(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==g&&c!==f?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,d,e,f);c=b(e,c,d);return y(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==e?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=
-e,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var l=Ba().noUnsafeEval,m={csp:l,expensiveChecks:!1},r={csp:l,expensiveChecks:!0};return function(c,l,v){var n,p,q;switch(typeof c){case "string":q=c=c.trim();var w=v?b:a;n=w[q];n||(":"===c.charAt(0)&&":"===c.charAt(1)&&(p=!0,c=c.substring(2)),v=v?r:m,n=new fc(v),n=(new gc(n,d,v)).parse(c),n.constant?n.$$watchDelegate=h:p?n.$$watchDelegate=n.literal?g:f:n.inputs&&(n.$$watchDelegate=e),w[q]=n);return k(n,l);case "function":return k(c,l);default:return x}}}]}
-function mf(){this.$get=["$rootScope","$exceptionHandler",function(a,b){return td(function(b){a.$evalAsync(b)},b)}]}function nf(){this.$get=["$browser","$exceptionHandler",function(a,b){return td(function(b){a.defer(b)},b)}]}function td(a,b){function d(a,b,c){function d(b){return function(c){e||(e=!0,b.call(a,c))}}var e=!1;return[d(b),d(c)]}function c(){this.$$state={status:0}}function e(a,b){return function(c){b.call(a,c)}}function f(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,
-d,e;e=c.pending;c.processScheduled=!1;c.pending=u;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];try{z(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function g(){this.promise=new c;this.resolve=e(this,this.resolve);this.reject=e(this,this.reject);this.notify=e(this,this.notify)}var h=G("$q",TypeError);M(c.prototype,{then:function(a,b,c){if(q(a)&&q(b)&&q(c))return this;var d=new g;this.$$state.pending=this.$$state.pending||[];
-this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&f(this.$$state);return d.promise},"catch":function(a){return this.then(null,a)},"finally":function(a,b){return this.then(function(b){return l(b,!0,a)},function(b){return l(b,!1,a)},b)}});M(g.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(h("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){var c,e;e=d(this,this.$$resolve,this.$$reject);try{if(H(a)||z(a))c=a&&a.then;z(c)?(this.promise.$$state.status=
--1,c.call(a,e[0],e[1],this.notify)):(this.promise.$$state.value=a,this.promise.$$state.status=1,f(this.promise.$$state))}catch(g){e[1](g),b(g)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;f(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(z(a)?
-a(c):c)}catch(h){b(h)}}})}});var k=function(a,b){var c=new g;b?c.resolve(a):c.reject(a);return c.promise},l=function(a,b,c){var d=null;try{z(c)&&(d=c())}catch(e){return k(e,!1)}return d&&z(d.then)?d.then(function(){return k(a,b)},function(a){return k(a,!1)}):k(a,b)},m=function(a,b,c,d){var e=new g;e.resolve(a);return e.promise.then(b,c,d)},r=function A(a){if(!z(a))throw h("norslvr",a);if(!(this instanceof A))return new A(a);var b=new g;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};
-r.defer=function(){return new g};r.reject=function(a){var b=new g;b.reject(a);return b.promise};r.when=m;r.resolve=m;r.all=function(a){var b=new g,c=0,d=I(a)?[]:{};n(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};return r}function wf(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||
-a.webkitCancelRequestAnimationFrame,e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function lf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++nb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=G("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&
-(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse","$browser",function(f,g,h,k){function l(a){a.currentScope.$$destroyed=!0}function m(a){9===Ha&&(a.$$childHead&&m(a.$$childHead),a.$$nextSibling&&m(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function r(){this.$id=++nb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=
-!1;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$$isolateBindings=null}function t(a){if(w.$$phase)throw d("inprog",w.$$phase);w.$$phase=a}function A(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function v(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function p(){for(;aa.length;)try{aa.shift()()}catch(a){g(a)}e=null}function C(){null===e&&(e=k.defer(function(){w.$apply(p)}))}r.prototype={constructor:r,
-$new:function(b,c){var d;c=c||this;b?(d=new r,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",l);return d},$watch:function(a,b,d,e){var f=h(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var g=this,k=g.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;z(b)||(l.fn=x);k||
-(k=g.$$watchers=[]);k.unshift(l);A(this,1);return function(){0<=ab(k,l)&&A(g,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});n(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},
-$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!q(e)){if(H(e))if(za(e))for(f!==r&&(f=r,n=f.length=0,l++),a=e.length,n!==a&&(l++,f.length=n=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==t&&(f=t={},n=0,l++);a=0;for(b in e)qa.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(n++,f[b]=g,l++));if(n>a)for(b in l++,f)qa.call(e,b)||(n--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,g,k=1<b.length,l=0,m=
-h(a,c),r=[],t={},p=!0,n=0;return this.$watch(m,function(){p?(p=!1,b(e,e,d)):b(e,g,d);if(k)if(H(e))if(za(e)){g=Array(e.length);for(var a=0;a<e.length;a++)g[a]=e[a]}else for(a in g={},e)qa.call(e,a)&&(g[a]=e[a]);else g=e})},$digest:function(){var a,f,h,l,m,r,n=b,A,q=[],v,C;t("$digest");k.$$checkUrlChange();this===w&&null!==e&&(k.defer.cancel(e),p());c=null;do{r=!1;for(A=this;u.length;){try{C=u.shift(),C.scope.$eval(C.expression,C.locals)}catch(aa){g(aa)}c=null}a:do{if(l=A.$$watchers)for(m=l.length;m--;)try{if(a=
-l[m])if((f=a.get(A))!==(h=a.last)&&!(a.eq?ma(f,h):"number"===typeof f&&"number"===typeof h&&isNaN(f)&&isNaN(h)))r=!0,c=a,a.last=a.eq?bb(f,null):f,a.fn(f,h===s?f:h,A),5>n&&(v=4-n,q[v]||(q[v]=[]),q[v].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:f,oldVal:h}));else if(a===c){r=!1;break a}}catch(y){g(y)}if(!(l=A.$$watchersCount&&A.$$childHead||A!==this&&A.$$nextSibling))for(;A!==this&&!(l=A.$$nextSibling);)A=A.$parent}while(A=l);if((r||u.length)&&!n--)throw w.$$phase=null,d("infdig",
-b,q);}while(r||u.length);for(w.$$phase=null;L.length;)try{L.shift()()}catch(x){g(x)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===w&&k.$$applicationDestroyed();A(this,-this.$$watchersCount);for(var b in this.$$listenerCount)v(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=
-this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=x;this.$on=this.$watch=this.$watchGroup=function(){return x};this.$$listeners={};this.$$nextSibling=null;m(this)}},$eval:function(a,b){return h(a)(this,b)},$evalAsync:function(a,b){w.$$phase||u.length||k.defer(function(){u.length&&w.$digest()});u.push({scope:this,expression:a,locals:b})},$$postDigest:function(a){L.push(a)},$apply:function(a){try{t("$apply");
-try{return this.$eval(a)}finally{w.$$phase=null}}catch(b){g(b)}finally{try{w.$digest()}catch(c){throw g(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&aa.push(b);C()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,v(e,1,a))}},$emit:function(a,b){var c=[],d,e=this,f=!1,h=
-{name:a,targetScope:e,stopPropagation:function(){f=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=cb([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(r){g(r)}else d.splice(l,1),l--,m--;if(f)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=!0},defaultPrevented:!1};
-if(!this.$$listenerCount[a])return e;for(var f=cb([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,f)}catch(l){g(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var w=new r,u=w.$$asyncQueue=[],L=w.$$postDigestQueue=[],aa=w.$$applyAsyncQueue=[];return w}]}function ge(){var a=/^\s*(https?|ftp|mailto|tel|file):/,
-b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return y(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return y(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=wa(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function ag(a){if("self"===a)return a;if(E(a)){if(-1<a.indexOf("***"))throw ya("iwcard",a);a=ud(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+a+"$")}if(Ma(a))return new RegExp("^"+
-a.source+"$");throw ya("imatcher");}function vd(a){var b=[];y(a)&&n(a,function(a){b.push(ag(a))});return b}function pf(){this.SCE_CONTEXTS=la;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=vd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=vd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?ed(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=function(){return a}};a&&(b.prototype=
-new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw ya("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[la.HTML]=e(g);h[la.CSS]=e(g);h[la.URL]=e(g);h[la.JS]=e(g);h[la.RESOURCE_URL]=e(h[la.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw ya("icontext",a,b);if(null===b||q(b)||""===b)return b;if("string"!==typeof b)throw ya("itype",
-a);return new c(b)},getTrusted:function(d,e){if(null===e||q(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===la.RESOURCE_URL){var g=wa(e.toString()),r,t,n=!1;r=0;for(t=a.length;r<t;r++)if(c(a[r],g)){n=!0;break}if(n)for(r=0,t=b.length;r<t;r++)if(c(b[r],g)){n=!1;break}if(n)return e;throw ya("insecurl",e.toString());}if(d===la.HTML)return f(e);throw ya("unsafe");},valueOf:function(a){return a instanceof g?a.$$unwrapTrustedValue():a}}}]}
-function of(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ha)throw ya("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ya);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;n(la,function(a,
-b){var d=F(b);c[fb("parse_as_"+d)]=function(b){return e(a,b)};c[fb("get_trusted_"+d)]=function(b){return f(a,b)};c[fb("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function qf(){this.$get=["$window","$document",function(a,b){var d={},c=ea((/android (\d+)/.exec(F((a.navigator||{}).userAgent))||[])[1]),e=/Boxee/i.test((a.navigator||{}).userAgent),f=b[0]||{},g,h=/^(Moz|webkit|ms)(?=[A-Z])/,k=f.body&&f.body.style,l=!1,m=!1;if(k){for(var r in k)if(l=h.exec(r)){g=l[0];g=g.substr(0,1).toUpperCase()+
-g.substr(1);break}g||(g="WebkitOpacity"in k&&"webkit");l=!!("transition"in k||g+"Transition"in k);m=!!("animation"in k||g+"Animation"in k);!c||l&&m||(l=E(k.webkitTransition),m=E(k.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>c||e),hasEvent:function(a){if("input"===a&&11>=Ha)return!1;if(q(d[a])){var b=f.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:g,transitions:l,animations:m,android:c}}]}function sf(){this.$get=["$templateCache","$http","$q","$sce",
-function(a,b,d,c){function e(f,g){e.totalPendingRequests++;E(f)&&a.get(f)||(f=c.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;I(h)?h=h.filter(function(a){return a!==$b}):h===$b&&(h=null);return b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){a.put(f,b.data);return b.data},function(a){if(!g)throw ha("tpload",f,a.status,a.statusText);return d.reject(a)})}e.totalPendingRequests=0;return e}]}function tf(){this.$get=["$rootScope",
-"$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];n(a,function(a){var c=fa.element(a).data("$binding");c&&n(c,function(c){d?(new RegExp("(^|\\s)"+ud(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},
-setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function uf(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,k,l){z(f)||(l=k,k=f,f=x);var m=ra.call(arguments,3),r=y(l)&&!l,t=(r?c:d).defer(),n=t.promise,q;q=b.defer(function(){try{t.resolve(f.apply(null,m))}catch(b){t.reject(b),e(b)}finally{delete g[n.$$timeoutId]}r||a.$apply()},k);n.$$timeoutId=q;g[q]=t;return n}var g={};
-f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function wa(a){Ha&&(Y.setAttribute("href",a),a=Y.href);Y.setAttribute("href",a);return{href:Y.href,protocol:Y.protocol?Y.protocol.replace(/:$/,""):"",host:Y.host,search:Y.search?Y.search.replace(/^\?/,""):"",hash:Y.hash?Y.hash.replace(/^#/,""):"",hostname:Y.hostname,port:Y.port,pathname:"/"===Y.pathname.charAt(0)?Y.pathname:"/"+Y.pathname}}function ed(a){a=
-E(a)?wa(a):a;return a.protocol===wd.protocol&&a.host===wd.host}function vf(){this.$get=na(S)}function xd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),q(c[l])&&(c[l]=b(g.substring(k+1))));return c}}function zf(){this.$get=xd}function Jc(a){function b(d,c){if(H(d)){var e={};n(d,function(a,c){e[c]=
-b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",yd);b("date",zd);b("filter",bg);b("json",cg);b("limitTo",dg);b("lowercase",eg);b("number",Ad);b("orderBy",Bd);b("uppercase",fg)}function bg(){return function(a,b,d){if(!za(a)){if(null==a)return a;throw G("filter")("notarray",a);}var c;switch(hc(b)){case "function":break;case "boolean":case "null":case "number":case "string":c=!0;case "object":b=
-gg(b,d,c);break;default:return a}return Array.prototype.filter.call(a,b)}}function gg(a,b,d){var c=H(a)&&"$"in a;!0===b?b=ma:z(b)||(b=function(a,b){if(q(a))return!1;if(null===a||null===b)return a===b;if(H(b)||H(a)&&!qc(a))return!1;a=F(""+a);b=F(""+b);return-1!==a.indexOf(b)});return function(e){return c&&!H(e)?Ka(e,a.$,b,!1):Ka(e,a,b,d)}}function Ka(a,b,d,c,e){var f=hc(a),g=hc(b);if("string"===g&&"!"===b.charAt(0))return!Ka(a,b.substring(1),d,c);if(I(a))return a.some(function(a){return Ka(a,b,d,c)});
-switch(f){case "object":var h;if(c){for(h in a)if("$"!==h.charAt(0)&&Ka(a[h],b,d,!0))return!0;return e?!1:Ka(a,b,d,!1)}if("object"===g){for(h in b)if(e=b[h],!z(e)&&!q(e)&&(f="$"===h,!Ka(f?a:a[h],e,d,f,f)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function hc(a){return null===a?"null":typeof a}function yd(a){var b=a.NUMBER_FORMATS;return function(a,c,e){q(c)&&(c=b.CURRENCY_SYM);q(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Cd(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,
-e).replace(/\u00A4/g,c)}}function Ad(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Cd(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function Cd(a,b,d,c,e){if(H(a))return"";var f=0>a;a=Math.abs(a);var g=Infinity===a;if(!g&&!isFinite(a))return"";var h=a+"",k="",l=!1,m=[];g&&(k="\u221e");if(!g&&-1!==h.indexOf("e")){var r=h.match(/([\d\.]+)e(-?)(\d+)/);r&&"-"==r[2]&&r[3]>e+1?a=0:(k=h,l=!0)}if(g||l)0<e&&1>a&&(k=a.toFixed(e),a=parseFloat(k),k=k.replace(ic,c));else{g=(h.split(ic)[1]||"").length;
-q(e)&&(e=Math.min(Math.max(b.minFrac,g),b.maxFrac));a=+(Math.round(+(a.toString()+"e"+e)).toString()+"e"+-e);var g=(""+a).split(ic),h=g[0],g=g[1]||"",r=0,t=b.lgSize,n=b.gSize;if(h.length>=t+n)for(r=h.length-t,l=0;l<r;l++)0===(r-l)%n&&0!==l&&(k+=d),k+=h.charAt(l);for(l=r;l<h.length;l++)0===(h.length-l)%t&&0!==l&&(k+=d),k+=h.charAt(l);for(;g.length<e;)g+="0";e&&"0"!==e&&(k+=c+g.substr(0,e))}0===a&&(f=!1);m.push(f?b.negPre:b.posPre,k,f?b.negSuf:b.posSuf);return m.join("")}function Gb(a,b,d){var c="";
-0>a&&(c="-",a=-a);for(a=""+a;a.length<b;)a="0"+a;d&&(a=a.substr(a.length-b));return c+a}function ca(a,b,d,c){d=d||0;return function(e){e=e["get"+a]();if(0<d||e>-d)e+=d;0===e&&-12==d&&(e=12);return Gb(e,b,c)}}function Hb(a,b){return function(d,c){var e=d["get"+a](),f=sb(b?"SHORT"+a:a);return c[f][e]}}function Dd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Ed(a){return function(b){var d=Dd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-
-+d;b=1+Math.round(b/6048E5);return Gb(b,a)}}function jc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function zd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=ea(b[9]+b[10]),g=ea(b[9]+b[11]));h.call(a,ea(b[1]),ea(b[2])-1,ea(b[3]));f=ea(b[4]||0)-f;g=ea(b[5]||0)-g;h=ea(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
-return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;E(c)&&(c=hg.test(c)?ea(c):b(c));Q(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;for(;d;)(l=ig.exec(d))?(h=cb(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=vc(f,c.getTimezoneOffset()),c=Pb(c,f,!0));n(h,function(b){k=jg[b];g+=k?k(c,a.DATETIME_FORMATS,m):b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function cg(){return function(a,b){q(b)&&(b=2);return db(a,b)}}function dg(){return function(a,
-b,d){b=Infinity===Math.abs(Number(b))?Number(b):ea(b);if(isNaN(b))return a;Q(a)&&(a=a.toString());if(!I(a)&&!E(a))return a;d=!d||isNaN(d)?0:ea(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?a.slice(d,d+b):0===d?a.slice(b,a.length):a.slice(Math.max(0,d+b),d)}}function Bd(a){function b(b,d){d=d?-1:1;return b.map(function(b){var c=1,h=Ya;if(z(b))h=b;else if(E(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(h=a(b),h.constant))var k=h(),h=function(a){return a[k]}}return{get:h,
-descending:c*d}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}return function(a,e,f){if(!za(a))return a;I(e)||(e=[e]);0===e.length&&(e=["+"]);var g=b(e,f);g.push({get:function(){return{}},descending:f?-1:1});a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(c){var e=c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("string"===c)e=e.toLowerCase();else if("object"===c)a:{if("function"===typeof e.valueOf&&
-(e=e.valueOf(),d(e)))break a;if(qc(e)&&(e=e.toString(),d(e)))break a;e=b}return{value:e,type:c}})}});a.sort(function(a,b){for(var c=0,d=0,e=g.length;d<e;++d){var c=a.predicateValues[d],f=b.predicateValues[d],n=0;c.type===f.type?c.value!==f.value&&(n=c.value<f.value?-1:1):n=c.type<f.type?-1:1;if(c=n*g[d].descending)break}return c});return a=a.map(function(a){return a.value})}}function La(a){z(a)&&(a={link:a});a.restrict=a.restrict||"AC";return na(a)}function Fd(a,b,d,c,e){var f=this,g=[];f.$error=
-{};f.$$success={};f.$pending=u;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Ib;f.$rollbackViewValue=function(){n(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){n(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Ra(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=a;a.$name=b};f.$removeControl=function(a){a.$name&&
-f[a.$name]===a&&delete f[a.$name];n(f.$pending,function(b,c){f.$setValidity(c,null,a)});n(f.$error,function(b,c){f.$setValidity(c,null,a)});n(f.$$success,function(b,c){f.$setValidity(c,null,a)});ab(g,a);a.$$parentForm=Ib};Gd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(ab(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Wa);c.addClass(a,Jb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};
-f.$setPristine=function(){c.setClass(a,Wa,Jb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;n(g,function(a){a.$setPristine()})};f.$setUntouched=function(){n(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function kc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function jb(a,b,d,c,e,f){var g=F(b[0].type);if(!e.android){var h=!1;b.on("compositionstart",function(a){h=!0});
-b.on("compositionend",function(){h=!1;k()})}var k=function(a){l&&(f.defer.cancel(l),l=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=U(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",k);else{var l,m=function(a,b,c){l||(l=f.defer(function(){l=null;b&&b.value===c||k(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",
-m)}b.on("change",k);c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Kb(a,b){return function(d,c){var e,f;if(da(d))return d;if(E(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-1)&&(d=d.substring(1,d.length-1));if(kg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,
-mm:0,ss:0,sss:0},n(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function kb(a,b,d,c){return function(e,f,g,h,k,l,m){function r(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function n(a){return y(a)&&!da(a)?d(a)||u:a}Hd(e,f,g,h);jb(e,f,g,h,k,l);var A=h&&h.$options&&h.$options.timezone,v;h.$$parserName=a;h.$parsers.push(function(a){return h.$isEmpty(a)?null:b.test(a)?(a=d(a,v),A&&(a=Pb(a,A)),a):u});h.$formatters.push(function(a){if(a&&
-!da(a))throw lb("datefmt",a);if(r(a))return(v=a)&&A&&(v=Pb(v,A,!0)),m("date")(a,c,A);v=null;return""});if(y(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!r(a)||q(s)||d(a)>=s};g.$observe("min",function(a){s=n(a);h.$validate()})}if(y(g.max)||g.ngMax){var p;h.$validators.max=function(a){return!r(a)||q(p)||d(a)<=p};g.$observe("max",function(a){p=n(a);h.$validate()})}}}function Hd(a,b,d,c){(c.$$hasNativeValidators=H(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};
-return c.badInput&&!c.typeMismatch?u:a})}function Id(a,b,d,c,e){if(y(c)){a=a(c);if(!a.constant)throw lb("constexpr",d,c);return a(b)}return e}function lc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){var b=[];return I(a)?(n(a,function(a){b=b.concat(e(a))}),b):E(a)?a.split(" "):H(a)?(n(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",
-link:function(f,g,h){function k(a,b){var c=g.data("$classCounts")||$(),d=[];n(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}function l(a){if(!0===b||f.$index%2===b){var l=e(a||[]);if(!m){var n=k(l,1);h.$addClass(n)}else if(!ma(a,m)){var q=e(m),n=c(l,q),l=c(q,l),n=k(n,1),l=k(l,-1);n&&n.length&&d.addClass(g,n);l&&l.length&&d.removeClass(g,l)}}m=ia(a)}var m;f.$watch(h[a],l,!0);h.$observe("class",function(b){l(f.$eval(h[a]))});"ngClass"!==
-a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var l=e(f.$eval(h[a]));g===b?(g=k(l,1),h.$addClass(g)):(g=k(l,-1),h.$removeClass(g))}})}}}]}function Gd(a){function b(a,b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+zc(a,"-"):"";b(mb+a,!0===c);b(Jd+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Jd]=!(f[mb]=e.hasClass(mb));c.$setValidity=function(a,e,f){q(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&
-h(c.$pending,a,f),Kd(c.$pending)&&(c.$pending=u));$a(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,a,f));c.$pending?(b(Ld,!0),c.$valid=c.$invalid=u,d("",null)):(b(Ld,!1),c.$valid=Kd(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?u:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Kd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var lg=/^\/(.+)\/([a-z]*)$/,
-F=function(a){return E(a)?a.toLowerCase():a},qa=Object.prototype.hasOwnProperty,sb=function(a){return E(a)?a.toUpperCase():a},Ha,B,oa,ra=[].slice,Pf=[].splice,mg=[].push,sa=Object.prototype.toString,rc=Object.getPrototypeOf,Aa=G("ng"),fa=S.angular||(S.angular={}),Sb,nb=0;Ha=X.documentMode;x.$inject=[];Ya.$inject=[];var I=Array.isArray,Vd=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,U=function(a){return E(a)?a.trim():a},ud=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,
-"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!y(Ba.rules)){var a=X.querySelector("[ng-csp]")||X.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},pb=function(){if(y(pb.name_))return pb.name_;var a,b,d=Oa.length,c,e;for(b=0;b<
-d;++b)if(c=Oa[b],a=X.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+"jq");break}return pb.name_=e},Oa=["ng-","data-ng-","ng:","x-ng-"],be=/[A-Z]/g,Ac=!1,Rb,Na=3,fe={full:"1.4.8",major:1,minor:4,dot:8,codeName:"ice-manipulation"};N.expando="ng339";var gb=N.cache={},Ff=1;N._data=function(a){return this.cache[a[this.expando]]||{}};var Af=/([\:\-\_]+(.))/g,Bf=/^moz([A-Z])/,xb={mouseleave:"mouseout",mouseenter:"mouseover"},Ub=G("jqLite"),Ef=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Tb=/<|&#?\w+;/,
-Cf=/<([\w:-]+)/,Df=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,ka={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option;ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead;ka.th=ka.td;var Kf=Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&
-16)},Pa=N.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===X.readyState?setTimeout(b):(this.on("DOMContentLoaded",b),N(S).on("load",b))},toString:function(){var a=[];n(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?B(this[a]):B(this[this.length+a])},length:0,push:mg,sort:[].sort,splice:[].splice},Cb={};n("multiple selected checked disabled readOnly required open".split(" "),function(a){Cb[F(a)]=a});var Rc={};n("input select option textarea button form details".split(" "),
-function(a){Rc[a]=!0});var Zc={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};n({data:Wb,removeData:vb,hasData:function(a){for(var b in gb[a.ng339])return!0;return!1}},function(a,b){N[b]=a});n({data:Wb,inheritedData:Bb,scope:function(a){return B.data(a,"$scope")||Bb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return B.data(a,"$isolateScope")||B.data(a,"$isolateScopeNoTemplate")},controller:Oc,injector:function(a){return Bb(a,
-"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:yb,css:function(a,b,d){b=fb(b);if(y(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Na&&2!==c&&8!==c)if(c=F(b),Cb[c])if(y(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||x).specified?c:u;else if(y(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?u:a},prop:function(a,b,d){if(y(d))a[b]=d;else return a[b]},
-text:function(){function a(a,d){if(q(d)){var c=a.nodeType;return 1===c||c===Na?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(q(b)){if(a.multiple&&"select"===ta(a)){var d=[];n(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(q(b))return a.innerHTML;ub(a,!0);a.innerHTML=b},empty:Pc},function(a,b){N.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Pc&&q(2==a.length&&a!==yb&&a!==Oc?
-b:c)){if(H(b)){for(e=0;e<g;e++)if(a===Wb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=q(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});n({removeData:vb,on:function(a,b,d,c){if(y(c))throw Ub("onargs");if(Kc(a)){c=wb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Hf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper=c,"$destroy"===
-b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],xb[b]?(h(xb[b],Jf),h(b,u,!0)):h(b)}},off:Nc,one:function(a,b,d){a=B(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;ub(a);n(new N(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];n(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,b){var d=
-a.nodeType;if(1===d||11===d){b=new N(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;n(new N(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){b=B(b).eq(0).clone()[0];var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)},remove:Xb,detach:function(a){Xb(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new N(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:Ab,removeClass:zb,
-toggleClass:function(a,b,d){b&&n(b.split(" "),function(b){var e=d;q(e)&&(e=!yb(a,b));(e?Ab:zb)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Vb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=wb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},
-stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:x,type:f,target:a},b.type&&(c=M(c,b)),b=ia(g),e=d?[c].concat(d):[c],n(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){N.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)q(f)?(f=a(this[g],b,c,e),y(f)&&(f=B(f))):Mc(f,a(this[g],b,c,e));return y(f)?f:this};N.prototype.bind=N.prototype.on;
-N.prototype.unbind=N.prototype.off});Sa.prototype={put:function(a,b){this[Ca(a,this.nextUid)]=b},get:function(a){return this[Ca(a,this.nextUid)]},remove:function(a){var b=this[a=Ca(a,this.nextUid)];delete this[a];return b}};var yf=[function(){this.$get=[function(){return Sa}]}],Tc=/^[^\(]*\(\s*([^\)]*)\)/m,ng=/,/,og=/^\s*(_?)(\S+?)\1\s*$/,Sc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Da=G("$injector");eb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw E(d)&&
-d||(d=a.name||Lf(a)),Da("strictdi",d);b=a.toString().replace(Sc,"");b=b.match(Tc);n(b[1].split(ng),function(a){a.replace(og,function(a,b,d){c.push(d)})})}a.$inject=c}}else I(a)?(b=a.length-1,Qa(a[b],"fn"),c=a.slice(0,b)):Qa(a,"fn",!0);return c};var Md=G("$animate"),Ue=function(){this.$get=["$q","$$rAF",function(a,b){function d(){}d.all=x;d.chain=x;d.prototype={end:x,cancel:x,resume:x,pause:x,complete:x,then:function(c,d){return a(function(a){b(function(){a()})}).then(c,d)}};return d}]},Te=function(){var a=
-new Sa,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=E(b)?b.split(" "):I(b)?b:[],n(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){n(b,function(b){var c=a.get(b);if(c){var d=Mf(b.attr("class")),e="",f="";n(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});n(b,function(a){e&&Ab(a,e);f&&zb(a,f)});a.remove(b)}});b.length=0}return{enabled:x,on:x,off:x,pin:x,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);
-k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);return new d}}}]},Re=["$provide",function(a){var b=this;this.$$registeredAnimations=Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Md("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=
-a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Md("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=
-f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ea(h))},move:function(e,f,g,h){f=f&&B(f);g=g&&B(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ea(h))},leave:function(b,c){return a.push(b,"leave",Ea(c),function(){b.remove()})},addClass:function(b,c,g){g=Ea(g);g.addClass=hb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ea(g);g.removeClass=hb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ea(h);h.addClass=hb(h.addClass,
-c);h.removeClass=hb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ea(k);k.from=k.from?M(k.from,c):c;k.to=k.to?M(k.to,g):g;k.tempClasses=hb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],Se=function(){this.$get=["$$rAF","$q",function(a,b){var d=function(){};d.prototype={done:function(a){this.defer&&this.defer[!0===a?"reject":"resolve"]()},end:function(){this.done()},cancel:function(){this.done(!0)},getPromise:function(){this.defer||(this.defer=
-b.defer());return this.defer.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},"finally":function(a){return this.getPromise()["finally"](a)}};return function(b,e){function f(){a(function(){e.addClass&&(b.addClass(e.addClass),e.addClass=null);e.removeClass&&(b.removeClass(e.removeClass),e.removeClass=null);e.to&&(b.css(e.to),e.to=null);g||h.done();g=!0});return h}e.cleanupStyles&&(e.from=e.to=null);e.from&&(b.css(e.from),e.from=
-null);var g,h=new d;return{start:f,end:f}}}]},ha=G("$compile");Cc.$inject=["$provide","$$sanitizeUriProvider"];var Vc=/^((?:x|data)[\:\-_])/i,Qf=G("$controller"),Uc=/^(\S+)(\s+as\s+(\w+))?$/,$e=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof B&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},$c="application/json",ac={"Content-Type":$c+";charset=utf-8"},Sf=/^\[|^\{(?!\{)/,Tf={"[":/]$/,"{":/}$/},Rf=/^\)\]\}',?\n/,pg=G("$http"),dd=function(a){return function(){throw pg("legacy",
-a);}},Ja=fa.$interpolateMinErr=G("$interpolate");Ja.throwNoconcat=function(a){throw Ja("noconcat",a);};Ja.interr=function(a,b){return Ja("interr",a,b.toString())};var qg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,Vf={http:80,https:443,ftp:21},Db=G("$location"),rg={$$html5:!1,$$replace:!1,absUrl:Eb("$$absUrl"),url:function(a){if(q(a))return this.$$url;var b=qg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Eb("$$protocol"),
-host:Eb("$$host"),port:Eb("$$port"),path:id("$$path",function(a){a=null!==a?a.toString():"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(E(a)||Q(a))a=a.toString(),this.$$search=xc(a);else if(H(a))a=bb(a,{}),n(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Db("isrcharg");break;default:q(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:id("$$hash",function(a){return null!==
-a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};n([hd,dc,cc],function(a){a.prototype=Object.create(rg);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==cc||!this.$$html5)throw Db("nostate");this.$$state=q(b)?null:b;return this}});var ba=G("$parse"),Wf=Function.prototype.call,Xf=Function.prototype.apply,Yf=Function.prototype.bind,Lb=$();n("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Lb[a]=!0});var sg={n:"\n",f:"\f",r:"\r",
-t:"\t",v:"\v","'":"'",'"':'"'},fc=function(a){this.options=a};fc.prototype={constructor:fc,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdent(a))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;
-else{var b=a+this.peek(),d=b+this.peek(2),c=Lb[b],e=Lb[d];Lb[a]||c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||
-"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=y(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw ba("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<this.text.length;){var d=F(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();
-if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){for(var a=this.index;this.index<this.text.length;){var b=this.text.charAt(this.index);if(!this.isIdent(b)&&!this.isNumber(b))break;this.index++}this.tokens.push({index:a,
-text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,16))):d+=sg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,
-value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal=
-"Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,
-body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?
-(d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,
-operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,
-left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=bb(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():
-this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),
-arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.expression());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;
-a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:s.Property,kind:"init"};this.peek().constant?b.key=this.constant():this.peek().identifier?b.key=this.identifier():this.throwError("invalid key",this.peek());this.consume(":");b.value=this.expression();a.push(b)}while(this.expect(","))}this.consume("}");return{type:s.ObjectExpression,properties:a}},
-throwError:function(a,b){throw ba("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw ba("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw ba("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];
-var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},constants:{"true":{type:s.Literal,value:!0},"false":{type:s.Literal,value:!1},"null":{type:s.Literal,value:null},undefined:{type:s.Literal,value:u},"this":{type:s.ThisExpression}}};rd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],
-body:[],own:{}},inputs:[]};W(c,d.$filter);var e="",f;this.stage="assign";if(f=pd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=nd(c.body);d.stage="inputs";n(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+
-'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Va,xa,kd,jd,ld,Zf,md,a);this.state=this.stage=u;e.literal=qd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;n(b,function(b){a.push("var "+b+"="+d.generateFunction(b,
-"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;n(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,
-d,c,e,f){var g,h,k=this,l,m;c=c||x;if(!f&&y(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:n(a.body,function(b,c){k.recurse(b.expression,u,u,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,u,u,function(a){h=a});m=a.operator+"("+this.ifDefined(h,
-0)+")";this.assign(b,m);c(m);break;case s.BinaryExpression:this.recurse(a.left,u,u,function(a){g=a});this.recurse(a.right,u,u,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,
-b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Va(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",
-a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Fb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,u,function(){k.if_(k.notNull(g),function(){if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,h),"{}")),m=k.ensureSafeObject(k.computedMember(g,
-h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Va(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Fb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();a.filter?(h=k.filter(a.callee.name),l=[],n(a.arguments,
-function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);n(a.arguments,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},
-function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!od(a.left))throw ba("lval");this.recurse(a.left,u,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=[];n(a.elements,function(a){k.recurse(a,k.nextId(),u,function(a){l.push(a)})});
-m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n(a.properties,function(a){k.recurse(a.value,k.nextId(),u,function(b){l.push(k.escape(a.key.type===s.Identifier?a.key.name:""+a.key.value)+":"+b)})});m="{"+l.join(",")+"}";this.assign(b,m);c(m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+
-this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,
-"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},
-addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+
-a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(E(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(Q(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===
-typeof a)return"undefined";throw ba("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};sd.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;W(c,d.$filter);var e,f;if(e=pd(c))f=this.recurse(e);e=nd(c.body);var g;e&&(g=[],n(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];n(c.body,function(a){h.push(d.recurse(a.expression))});
-e=0===c.body.length?function(){}:1===c.body.length?h[0]:function(a,b){var c;n(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=qd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),
-e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Va(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Fb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Va(a.property.name,
-f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],n(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var r=[],n=0;n<g.length;++n)r.push(g[n](a,c,d,f));a=e.apply(u,r,f);return b?{context:u,name:u,value:a}:a}:function(a,
-c,d,m){var r=e(a,c,d,m),n;if(null!=r.value){xa(r.context,f.expression);kd(r.value,f.expression);n=[];for(var q=0;q<g.length;++q)n.push(xa(g[q](a,c,d,m),f.expression));n=xa(r.value.apply(r.context,n),f.expression)}return b?{value:n}:n};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,m){var n=c(a,d,g,m);a=e(a,d,g,m);xa(n.value,f.expression);ld(n.context);n.context[n.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],n(a.elements,function(a){g.push(f.recurse(a))}),
-function(a,c,d,e){for(var f=[],n=0;n<g.length;++n)f.push(g[n](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],n(a.properties,function(a){g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},n=0;n<g.length;++n)f[g[n].key]=g[n].value(a,c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.NGValueParameter:return function(a,c,d,e){return b?{value:d}:d}}},"unary+":function(a,
-b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=y(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=md(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=(y(h)?h:0)-(y(c)?c:0);return d?{value:h}:h}},"binary*":function(a,
-b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,
-d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,
-e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:u,name:u,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=
-g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:u;b&&xa(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,g,h,k),m=jd(m),Va(m,e),c&&1!==c&&l&&!l[m]&&(l[m]={}),n=l[m],xa(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&g&&!g[b]&&(g[b]={});h=null!=g?g[b]:u;(d||Fb(b))&&xa(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,
-b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var gc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(this.lexer);this.astCompiler=d.csp?new sd(this.ast,b):new rd(this.ast,b)};gc.prototype={constructor:gc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};$();$();var $f=Object.prototype.valueOf,ya=G("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},ha=G("$compile"),Y=X.createElement("a"),wd=wa(S.location.href);
-xd.$inject=["$document"];Jc.$inject=["$provide"];yd.$inject=["$locale"];Ad.$inject=["$locale"];var ic=".",jg={yyyy:ca("FullYear",4),yy:ca("FullYear",2,0,!0),y:ca("FullYear",1),MMMM:Hb("Month"),MMM:Hb("Month",!0),MM:ca("Month",2,1),M:ca("Month",1,1),dd:ca("Date",2),d:ca("Date",1),HH:ca("Hours",2),H:ca("Hours",1),hh:ca("Hours",2,-12),h:ca("Hours",1,-12),mm:ca("Minutes",2),m:ca("Minutes",1),ss:ca("Seconds",2),s:ca("Seconds",1),sss:ca("Milliseconds",3),EEEE:Hb("Day"),EEE:Hb("Day",!0),a:function(a,b){return 12>
-a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Gb(Math[0<a?"floor":"ceil"](a/60),2)+Gb(Math.abs(a%60),2))},ww:Ed(2),w:Ed(1),G:jc,GG:jc,GGG:jc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},ig=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,hg=/^\-?\d+$/;zd.$inject=["$locale"];var eg=na(F),fg=na(sb);Bd.$inject=["$parse"];var he=na({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,
-b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===sa.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),tb={};n(Cb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=va("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});tb[c]=function(){return{restrict:"A",priority:100,link:e}}}});n(Zc,function(a,b){tb[b]=function(){return{priority:100,link:function(a,
-c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(lg))){e.$set("ngPattern",new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});n(["src","srcset","href"],function(a){var b=va("ng-"+a);tb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===sa.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ha&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});
-var Ib={$addControl:x,$$renameControl:function(a,b){a.$name=b},$removeControl:x,$setValidity:x,$setDirty:x,$setPristine:x,$setSubmitted:x};Fd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Nd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||x}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fd,compile:function(d,f){d.addClass(Wa).addClass(mb);var g=f.name?"name":a&&f.ngForm?"ngForm":
-!1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var q=function(b){a.$apply(function(){n.$commitViewValue();n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",q,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",q,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var s=g?c(n.$name):x;g&&(s(a,n),e.$observe(g,function(b){n.$name!==b&&(s(a,u),n.$$parentForm.$$renameControl(n,b),s=c(n.$name),s(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);
-s(a,u);M(n,Ib)})}}}}}]},ie=Nd(),ve=Nd(!0),kg=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,tg=/^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/,ug=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,vg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Od=/^(\d{4})-(\d{2})-(\d{2})$/,Pd=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,mc=/^(\d{4})-W(\d\d)$/,Qd=/^(\d{4})-(\d\d)$/,
-Rd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Sd={text:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c)},date:kb("date",Od,Kb(Od,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":kb("datetimelocal",Pd,Kb(Pd,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:kb("time",Rd,Kb(Rd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:kb("week",mc,function(a,b){if(da(a))return a;if(E(a)){mc.lastIndex=0;var d=mc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Dd(c),e=7*(e-1);b&&(d=b.getHours(),f=
-b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:kb("month",Qd,Kb(Qd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Hd(a,b,d,c);jb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){return c.$isEmpty(a)?null:vg.test(a)?parseFloat(a):u});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!Q(a))throw lb("numfmt",a);a=a.toString()}return a});if(y(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||
-q(g)||a>=g};d.$observe("min",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));g=Q(a)&&!isNaN(a)?a:u;c.$validate()})}if(y(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||q(h)||a<=h};d.$observe("max",function(a){y(a)&&!Q(a)&&(a=parseFloat(a,10));h=Q(a)&&!isNaN(a)?a:u;c.$validate()})}},url:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);c.$$parserName="url";c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||tg.test(d)}},email:function(a,b,d,c,e,f){jb(a,b,d,c,e,f);kc(c);
-c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||ug.test(d)}},radio:function(a,b,d,c){q(d.name)&&b.attr("name",++nb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Id(h,a,"ngTrueValue",d.ngTrueValue,!0),l=Id(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&
-a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return ma(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:x,button:x,submit:x,reset:x,file:x},Dc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Sd[F(g.type)]||Sd.text)(e,f,g,h[0],b,a,d,c)}}}}],wg=/^(true|false|\d+)$/,Ne=function(){return{restrict:"A",priority:100,compile:function(a,
-b){return wg.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ne=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=q(a)?"":a})}}}}],pe=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));
-b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=q(a)?"":a})}}}}],oe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(a){return(a||"").toString()});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){c.html(a.getTrustedHtml(f(b))||"")})}}}}],Me=na({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),
-qe=lc("",!0),se=lc("Odd",0),re=lc("Even",1),te=La({compile:function(a,b){b.$set("ngCloak",u);a.removeClass("ng-cloak")}}),ue=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ic={},xg={blur:!0,focus:!0};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=va("ng-"+a);Ic[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=
-d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};xg[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var xe=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(b,d,c,e,f){var g,h,k;b.$watch(c.ngIf,function(b){b?h||f(function(b,e){h=e;b[b.length++]=X.createComment(" end ngIf: "+c.ngIf+" ");g={clone:b};a.enter(b,d.parent(),d)}):(k&&(k.remove(),k=null),h&&(h.$destroy(),h=null),g&&(k=
-rb(g.clone),a.leave(k).then(function(){k=null}),g=null))})}}}],ye=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:fa.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,q){var s=0,v,u,p,C=function(){u&&(u.remove(),u=null);v&&(v.$destroy(),v=null);p&&(d.leave(p).then(function(){u=null}),u=p,p=null)};c.$watch(f,function(f){var m=function(){!y(h)||h&&!c.$eval(h)||
-b()},u=++s;f?(a(f,!0).then(function(a){if(u===s){var b=c.$new();n.template=a;a=q(b,function(a){C();d.enter(a,null,e).then(m)});v=b;p=a;v.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){u===s&&(C(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(C(),n.template=null)})}}}}],Pe=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){/SVG/.test(d[0].toString())?(d.empty(),a(Lc(e.template,X).childNodes)(b,function(a){d.append(a)},
-{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],ze=La({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Le=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?U(e):e;c.$parsers.push(function(a){if(!q(a)){var b=[];a&&n(a.split(g),function(a){a&&b.push(f?U(a):a)});return b}});c.$formatters.push(function(a){return I(a)?a.join(e):u});c.$isEmpty=function(a){return!a||
-!a.length}}}},mb="ng-valid",Jd="ng-invalid",Wa="ng-pristine",Jb="ng-dirty",Ld="ng-pending",lb=G("ngModel"),yg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=u;this.$validators={};this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;
-this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=u;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Ib;var m=e(d.ngModel),r=m.assign,t=m,s=r,v=null,B,p=this;this.$$setOptions=function(a){if((p.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");t=function(a){var c=m(a);z(c)&&(c=b(a));return c};s=function(a,b){z(m(a))?f(a,{$$$p:p.$modelValue}):r(a,p.$modelValue)}}else if(!m.assign)throw lb("nonassign",d.ngModel,ua(c));};this.$render=x;this.$isEmpty=
-function(a){return q(a)||""===a||null===a||a!==a};var C=0;Gd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){p.$dirty=!1;p.$pristine=!0;f.removeClass(c,Jb);f.addClass(c,Wa)};this.$setDirty=function(){p.$dirty=!0;p.$pristine=!1;f.removeClass(c,Wa);f.addClass(c,Jb);p.$$parentForm.$setDirty()};this.$setUntouched=function(){p.$touched=!1;p.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){p.$touched=
-!0;p.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(v);p.$viewValue=p.$$lastCommittedViewValue;p.$render()};this.$validate=function(){if(!Q(p.$modelValue)||!isNaN(p.$modelValue)){var a=p.$$rawModelValue,b=p.$valid,c=p.$modelValue,d=p.$options&&p.$options.allowInvalid;p.$$runValidators(a,p.$$lastCommittedViewValue,function(e){d||b===e||(p.$modelValue=e?a:u,p.$modelValue!==c&&p.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=
-!0;n(p.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(n(p.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;n(p.$asyncValidators,function(e,g){var h=e(a,b);if(!h||!z(h.then))throw lb("$asyncValidators",h);f(g,u);c.push(h.then(function(){f(g,!0)},function(a){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},x):g(!0)}function f(a,b){h===C&&p.$setValidity(a,b)}function g(a){h===C&&c(a)}C++;var h=C;(function(){var a=p.$$parserName||"parse";if(q(B))f(a,
-null);else return B||(n(p.$validators,function(a,b){f(b,null)}),n(p.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=p.$viewValue;g.cancel(v);if(p.$$lastCommittedViewValue!==a||""===a&&p.$$hasNativeValidators)p.$$lastCommittedViewValue=a,p.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=p.$$lastCommittedViewValue;if(B=q(b)?u:!0)for(var c=0;c<p.$parsers.length;c++)if(b=p.$parsers[c](b),
-q(b)){B=!1;break}Q(p.$modelValue)&&isNaN(p.$modelValue)&&(p.$modelValue=t(a));var d=p.$modelValue,e=p.$options&&p.$options.allowInvalid;p.$$rawModelValue=b;e&&(p.$modelValue=b,p.$modelValue!==d&&p.$$writeModelToScope());p.$$runValidators(b,p.$$lastCommittedViewValue,function(a){e||(p.$modelValue=a?b:u,p.$modelValue!==d&&p.$$writeModelToScope())})};this.$$writeModelToScope=function(){s(a,p.$modelValue);n(p.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){p.$viewValue=
-a;p.$options&&!p.$options.updateOnDefault||p.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=p.$options;d&&y(d.debounce)&&(d=d.debounce,Q(d)?c=d:Q(d[b])?c=d[b]:Q(d["default"])&&(c=d["default"]));g.cancel(v);c?v=g(function(){p.$commitViewValue()},c):h.$$phase?p.$commitViewValue():a.$apply(function(){p.$commitViewValue()})};a.$watch(function(){var b=t(a);if(b!==p.$modelValue&&(p.$modelValue===p.$modelValue||b===b)){p.$modelValue=p.$$rawModelValue=b;B=u;for(var c=p.$formatters,
-d=c.length,e=b;d--;)e=c[d](e);p.$viewValue!==e&&(p.$viewValue=p.$$lastCommittedViewValue=e,p.$render(),p.$$runValidators(b,e,x))}return b})}],Ke=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:yg,priority:1,compile:function(b){b.addClass(Wa).addClass("ng-untouched").addClass(mb);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,
-a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(c){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],zg=/(\s+|^)default(\s+|$)/,Oe=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=bb(a.$eval(b.ngModelOptions));y(this.$options.updateOn)?
-(this.$options.updateOnDefault=!1,this.$options.updateOn=U(this.$options.updateOn.replace(zg,function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},Ae=La({terminal:!0,priority:1E3}),Ag=G("ngOptions"),Bg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Ie=["$compile","$parse",function(a,
-b){function d(a,c,d){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=b;this.label=c;this.group=d;this.disabled=f}function l(a){var b;if(!q&&za(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var m=a.match(Bg);if(!m)throw Ag("iexp",a,ua(c));var n=m[5]||m[7],q=m[6];a=/ as /.test(m[0])&&m[1];var s=m[9];c=b(m[2]?m[1]:n);var v=a&&b(a)||c,u=s&&b(s),p=s?function(a,b){return u(d,b)}:function(a){return Ca(a)},C=function(a,b){return p(a,z(a,b))},w=b(m[2]||
-m[1]),y=b(m[3]||""),B=b(m[4]||""),x=b(m[8]),D={},z=q?function(a,b){D[q]=b;D[n]=a;return D}:function(a){D[n]=a;return D};return{trackBy:s,getTrackByValue:C,getWatchables:b(x,function(a){var b=[];a=a||[];for(var c=l(a),e=c.length,f=0;f<e;f++){var g=a===c?f:c[f],k=z(a[g],g),g=p(a[g],k);b.push(g);if(m[2]||m[1])g=w(d,k),b.push(g);m[4]&&(k=B(d,k),b.push(k))}return b}),getOptions:function(){for(var a=[],b={},c=x(d)||[],f=l(c),g=f.length,m=0;m<g;m++){var n=c===f?m:f[m],r=z(c[n],n),q=v(d,r),n=p(q,r),t=w(d,
-r),u=y(d,r),r=B(d,r),q=new e(n,q,t,u,r);a.push(q);b[n]=q}return{items:a,selectValueMap:b,getOptionFromViewValue:function(a){return b[C(a)]},getViewValueFromOption:function(a){return s?fa.copy(a.viewValue):a.viewValue}}}}}var c=X.createElement("option"),e=X.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","?ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=x},post:function(b,g,h,k){function l(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,
-b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function m(a,b,c,d){b&&F(b.nodeName)===c?c=b:(c=d.cloneNode(!1),b?a.insertBefore(c,b):a.appendChild(c));return c}function r(a){for(var b;a;)b=a.nextSibling,Xb(a),a=b}function q(a){var b=p&&p[0],c=z&&z[0];if(b||c)for(;a&&(a===b||a===c||8===a.nodeType||""===a.value);)a=a.nextSibling;return a}function s(){var a=D&&u.readValue();D=E.getOptions();var b={},d=g[0].firstChild;x&&g.prepend(p);d=q(d);D.items.forEach(function(a){var f,h;a.group?
-(f=b[a.group],f||(f=m(g[0],d,"optgroup",e),d=f.nextSibling,f.label=a.group,f=b[a.group]={groupElement:f,currentOptionElement:f.firstChild}),h=m(f.groupElement,f.currentOptionElement,"option",c),l(a,h),f.currentOptionElement=h.nextSibling):(h=m(g[0],d,"option",c),l(a,h),d=h.nextSibling)});Object.keys(b).forEach(function(a){r(b[a].currentOptionElement)});r(d);v.$render();if(!v.$isEmpty(a)){var f=u.readValue();(E.trackBy?ma(a,f):a===f)||(v.$setViewValue(f),v.$render())}}var v=k[1];if(v){var u=k[0];k=
-h.multiple;for(var p,C=0,w=g.children(),y=w.length;C<y;C++)if(""===w[C].value){p=w.eq(C);break}var x=!!p,z=B(c.cloneNode(!1));z.val("?");var D,E=d(h.ngOptions,g,b);k?(v.$isEmpty=function(a){return!a||0===a.length},u.writeValue=function(a){D.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){(a=D.getOptionFromViewValue(a))&&!a.disabled&&(a.element.selected=!0)})},u.readValue=function(){var a=g.val()||[],b=[];n(a,function(a){(a=D.selectValueMap[a])&&!a.disabled&&b.push(D.getViewValueFromOption(a))});
-return b},E.trackBy&&b.$watchCollection(function(){if(I(v.$viewValue))return v.$viewValue.map(function(a){return E.getTrackByValue(a)})},function(){v.$render()})):(u.writeValue=function(a){var b=D.getOptionFromViewValue(a);b&&!b.disabled?g[0].value!==b.selectValue&&(z.remove(),x||p.remove(),g[0].value=b.selectValue,b.element.selected=!0,b.element.setAttribute("selected","selected")):null===a||x?(z.remove(),x||g.prepend(p),g.val(""),p.prop("selected",!0),p.attr("selected",!0)):(x||p.remove(),g.prepend(z),
-g.val("?"),z.prop("selected",!0),z.attr("selected",!0))},u.readValue=function(){var a=D.selectValueMap[g.val()];return a&&!a.disabled?(x||p.remove(),z.remove(),D.getViewValueFromOption(a)):null},E.trackBy&&b.$watch(function(){return E.getTrackByValue(v.$viewValue)},function(){v.$render()}));x?(p.remove(),a(p)(b),p.removeClass("ng-scope")):p=B(c.cloneNode(!1));s();b.$watchCollection(E.getWatchables,s)}}}}}],Be=["$locale","$interpolate","$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,
-g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),r=h.offset||0,s=f.$eval(m)||{},u={},v=b.startSymbol(),y=b.endSymbol(),p=v+l+"-"+r+y,C=fa.noop,w;n(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+F(c[2]),s[c]=g.attr(h.$attr[b]))});n(s,function(a,d){u[d]=b(a.replace(c,p))});f.$watch(l,function(b){var c=parseFloat(b),e=isNaN(c);e||c in s||(c=a.pluralCat(c-r));c===w||e&&Q(w)&&isNaN(w)||(C(),e=u[c],q(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+
-m),C=x,k()):C=f.$watch(e,k),w=c)})}}}],Ce=["$parse","$animate",function(a,b){var d=G("ngRepeat"),c=function(a,b,c,d,k,l,m){a[c]=d;k&&(a[k]=l);a.$index=b;a.$first=0===b;a.$last=b===m-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(e,f){var g=f.ngRepeat,h=X.createComment(" end ngRepeat: "+g+" "),k=g.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
-if(!k)throw d("iexp",g);var l=k[1],m=k[2],r=k[3],q=k[4],k=l.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!k)throw d("iidexp",l);var s=k[3]||k[1],v=k[2];if(r&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(r)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(r)))throw d("badident",r);var x,p,y,w,z={$id:Ca};q?x=a(q):(y=function(a,b){return Ca(b)},w=function(a){return a});return function(a,e,f,k,l){x&&(p=function(b,c,d){v&&(z[v]=b);z[s]=c;z.$index=
-d;return x(a,z)});var q=$();a.$watchCollection(m,function(f){var k,m,t=e[0],x,z=$(),D,E,H,F,I,G,J;r&&(a[r]=f);if(za(f))I=f,m=p||y;else for(J in m=p||w,I=[],f)qa.call(f,J)&&"$"!==J.charAt(0)&&I.push(J);D=I.length;J=Array(D);for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],F=m(E,H,k),q[F])G=q[F],delete q[F],z[F]=G,J[k]=G;else{if(z[F])throw n(J,function(a){a&&a.scope&&(q[a.id]=a)}),d("dupes",g,F,H);J[k]={id:F,scope:u,clone:u};z[F]=!0}for(x in q){G=q[x];F=rb(G.clone);b.leave(F);if(F[0].parentNode)for(k=0,m=F.length;k<
-m;k++)F[k].$$NG_REMOVED=!0;G.scope.$destroy()}for(k=0;k<D;k++)if(E=f===I?k:I[k],H=f[E],G=J[k],G.scope){x=t;do x=x.nextSibling;while(x&&x.$$NG_REMOVED);G.clone[0]!=x&&b.move(rb(G.clone),null,B(t));t=G.clone[G.clone.length-1];c(G.scope,k,s,H,v,E,D)}else l(function(a,d){G.scope=d;var e=h.cloneNode(!1);a[a.length++]=e;b.enter(a,null,B(t));t=e;G.clone=a;z[G.id]=G;c(G.scope,k,s,H,v,E,D)});q=z})}}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?
-"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],we=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Ee=La(function(a,b,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,c){b.css(c,"")});a&&b.css(a)},!0)}),Fe=["$animate",function(a){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(b,
-d,c,e){var f=[],g=[],h=[],k=[],l=function(a,b){return function(){a.splice(b,1)}};b.$watch(c.ngSwitch||c.on,function(b){var c,d;c=0;for(d=h.length;c<d;++c)a.cancel(h[c]);c=h.length=0;for(d=k.length;c<d;++c){var q=rb(g[c].clone);k[c].$destroy();(h[c]=a.leave(q)).then(l(h,c))}g.length=0;k.length=0;(f=e.cases["!"+b]||e.cases["?"])&&n(f,function(b){b.transclude(function(c,d){k.push(d);var e=b.element;c[c.length++]=X.createComment(" end ngSwitchWhen: ");g.push({clone:c});a.enter(c,e.parent(),e)})})})}}}],
-Ge=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),He=La({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,element:b})}}),Je=La({restrict:"EAC",link:function(a,b,d,c,e){if(!e)throw G("ngTransclude")("orphan",ua(b));e(function(a){b.empty();
-b.append(a)})}}),je=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Cg={$setViewValue:x,$render:x},Dg=["$element","$scope","$attrs",function(a,b,d){var c=this,e=new Sa;c.ngModelCtrl=Cg;c.unknownOption=B(X.createElement("option"));c.renderUnknownOption=function(b){b="? "+Ca(b)+" ?";c.unknownOption.val(b);a.prepend(c.unknownOption);a.val(b)};b.$on("$destroy",function(){c.renderUnknownOption=x});c.removeUnknownOption=
-function(){c.unknownOption.parent()&&c.unknownOption.remove()};c.readValue=function(){c.removeUnknownOption();return a.val()};c.writeValue=function(b){c.hasOption(b)?(c.removeUnknownOption(),a.val(b),""===b&&c.emptyOption.prop("selected",!0)):null==b&&c.emptyOption?(c.removeUnknownOption(),a.val("")):c.renderUnknownOption(b)};c.addOption=function(a,b){Ra(a,'"option value"');""===a&&(c.emptyOption=b);var d=e.get(a)||0;e.put(a,d+1);c.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=
-!0)};c.removeOption=function(a){var b=e.get(a);b&&(1===b?(e.remove(a),""===a&&(c.emptyOption=u)):e.put(a,b-1))};c.hasOption=function(a){return!!e.get(a)};c.registerOption=function(a,b,d,e,l){if(e){var m;d.$observe("value",function(a){y(m)&&c.removeOption(m);m=a;c.addOption(a,b)})}else l?a.$watch(l,function(a,e){d.$set("value",a);e!==a&&c.removeOption(e);c.addOption(a,b)}):c.addOption(d.value,b);b.on("$destroy",function(){c.removeOption(d.value);c.ngModelCtrl.$render()})}}],ke=function(){return{restrict:"E",
-require:["select","?ngModel"],controller:Dg,priority:1,link:{pre:function(a,b,d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;e.$render=function(){f.writeValue(e.$viewValue)};b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})});if(d.multiple){f.readValue=function(){var a=[];n(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Sa(a);n(b.find("option"),function(a){a.selected=y(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==
-e.$viewValue||ma(g,e.$viewValue)||(g=ia(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||0===a.length}}}}}}},me=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){if(y(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],le=na({restrict:"E",terminal:!1}),Fc=function(){return{restrict:"A",
-require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Ec=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){E(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw G("ngPattern")("noregexp",f,a,ua(b));e=a||u;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||
-q(e)||e.test(b)}}}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a=ea(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Gc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=ea(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};S.angular.bootstrap?
-console.log("WARNING: Tried to load angular more than once."):(ce(),ee(fa),fa.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),
-SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",
-negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",pluralCat:function(a,c){var e=a|0,f=c;u===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),B(X).ready(function(){Zd(X,yc)}))})(window,document);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
-//# sourceMappingURL=angular.min.js.map
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js.map b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js.map
deleted file mode 100644
index fbb9d467..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/angular.min.js.map
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-"version":3,
-"file":"angular.min.js",
-"lineCount":294,
-"mappings":"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",
-"sources":["angular.js"],
-"names":["window","document","undefined","minErr","isArrayLike","obj","isWindow","isArray","isString","jqLite","length","Object","isNumber","item","forEach","iterator","context","key","isFunction","hasOwnProperty","call","isPrimitive","isBlankObject","forEachSorted","keys","sort","i","reverseParams","iteratorFn","value","nextUid","uid","baseExtend","dst","objs","deep","h","$$hashKey","ii","isObject","j","jj","src","isDate","Date","valueOf","isRegExp","RegExp","nodeName","cloneNode","isElement","clone","extend","slice","arguments","merge","toInt","str","parseInt","inherit","parent","extra","create","noop","identity","$","valueFn","hasCustomToString","toString","isUndefined","isDefined","getPrototypeOf","isScope","$evalAsync","$watch","isBoolean","isTypedArray","TYPED_ARRAY_REGEXP","test","node","prop","attr","find","makeMap","items","split","nodeName_","element","lowercase","arrayRemove","array","index","indexOf","splice","copy","source","destination","copyRecurse","push","copyElement","stackSource","stackDest","ngMinErr","needsRecurse","constructor","getTime","match","lastIndex","shallowCopy","charAt","equals","o1","o2","t1","t2","keySet","createMap","concat","array1","array2","bind","self","fn","curryArgs","startIndex","apply","toJsonReplacer","val","toJson","pretty","JSON","stringify","fromJson","json","parse","timezoneToOffset","timezone","fallback","requestedTimezoneOffset","isNaN","convertTimezoneToLocal","date","reverse","timezoneOffset","getTimezoneOffset","setMinutes","getMinutes","minutes","startingTag","empty","e","elemHtml","append","html","nodeType","NODE_TYPE_TEXT","replace","tryDecodeURIComponent","decodeURIComponent","parseKeyValue","keyValue","splitPoint","substring","toKeyValue","parts","arrayValue","encodeUriQuery","join","encodeUriSegment","pctEncodeSpaces","encodeURIComponent","getNgAttribute","ngAttr","ngAttrPrefixes","getAttribute","angularInit","bootstrap","appElement","module","config","prefix","name","hasAttribute","candidate","querySelector","strictDi","modules","defaultConfig","doBootstrap","injector","tag","unshift","$provide","debugInfoEnabled","$compileProvider","createInjector","invoke","bootstrapApply","scope","compile","$apply","data","NG_ENABLE_DEBUG_INFO","NG_DEFER_BOOTSTRAP","angular","resumeBootstrap","angular.resumeBootstrap","extraModules","resumeDeferredBootstrap","reloadWithDebugInfo","location","reload","getTestability","rootElement","get","snake_case","separator","SNAKE_CASE_REGEXP","letter","pos","toLowerCase","bindJQuery","originalCleanData","bindJQueryFired","jqName","jq","jQuery","on","JQLitePrototype","isolateScope","controller","inheritedData","cleanData","jQuery.cleanData","elems","events","skipDestroyOnNextJQueryCleanData","elem","_data","$destroy","triggerHandler","JQLite","assertArg","arg","reason","assertArgFn","acceptArrayAnnotation","assertNotHasOwnProperty","getter","path","bindFnToScope","lastInstance","len","getBlockNodes","nodes","endNode","blockNodes","nextSibling","setupModuleLoader","ensure","factory","$injectorMinErr","$$minErr","requires","configFn","invokeLater","provider","method","insertMethod","queue","invokeQueue","moduleInstance","invokeLaterAndSetModuleName","recipeName","factoryFunction","$$moduleName","configBlocks","runBlocks","_invokeQueue","_configBlocks","_runBlocks","service","constant","decorator","animation","filter","directive","run","block","publishExternalAPI","version","uppercase","counter","csp","angularModule","ngModule","$$sanitizeUri","$$SanitizeUriProvider","$CompileProvider","a","htmlAnchorDirective","input","inputDirective","textarea","form","formDirective","script","scriptDirective","select","selectDirective","style","styleDirective","option","optionDirective","ngBind","ngBindDirective","ngBindHtml","ngBindHtmlDirective","ngBindTemplate","ngBindTemplateDirective","ngClass","ngClassDirective","ngClassEven","ngClassEvenDirective","ngClassOdd","ngClassOddDirective","ngCloak","ngCloakDirective","ngController","ngControllerDirective","ngForm","ngFormDirective","ngHide","ngHideDirective","ngIf","ngIfDirective","ngInclude","ngIncludeDirective","ngInit","ngInitDirective","ngNonBindable","ngNonBindableDirective","ngPluralize","ngPluralizeDirective","ngRepeat","ngRepeatDirective","ngShow","ngShowDirective","ngStyle","ngStyleDirective","ngSwitch","ngSwitchDirective","ngSwitchWhen","ngSwitchWhenDirective","ngSwitchDefault","ngSwitchDefaultDirective","ngOptions","ngOptionsDirective","ngTransclude","ngTranscludeDirective","ngModel","ngModelDirective","ngList","ngListDirective","ngChange","ngChangeDirective","pattern","patternDirective","ngPattern","required","requiredDirective","ngRequired","minlength","minlengthDirective","ngMinlength","maxlength","maxlengthDirective","ngMaxlength","ngValue","ngValueDirective","ngModelOptions","ngModelOptionsDirective","ngIncludeFillContentDirective","ngAttributeAliasDirectives","ngEventDirectives","$anchorScroll","$AnchorScrollProvider","$animate","$AnimateProvider","$animateCss","$CoreAnimateCssProvider","$$animateQueue","$$CoreAnimateQueueProvider","$$AnimateRunner","$$CoreAnimateRunnerProvider","$browser","$BrowserProvider","$cacheFactory","$CacheFactoryProvider","$controller","$ControllerProvider","$document","$DocumentProvider","$exceptionHandler","$ExceptionHandlerProvider","$filter","$FilterProvider","$$forceReflow","$$ForceReflowProvider","$interpolate","$InterpolateProvider","$interval","$IntervalProvider","$http","$HttpProvider","$httpParamSerializer","$HttpParamSerializerProvider","$httpParamSerializerJQLike","$HttpParamSerializerJQLikeProvider","$httpBackend","$HttpBackendProvider","$xhrFactory","$xhrFactoryProvider","$location","$LocationProvider","$log","$LogProvider","$parse","$ParseProvider","$rootScope","$RootScopeProvider","$q","$QProvider","$$q","$$QProvider","$sce","$SceProvider","$sceDelegate","$SceDelegateProvider","$sniffer","$SnifferProvider","$templateCache","$TemplateCacheProvider","$templateRequest","$TemplateRequestProvider","$$testability","$$TestabilityProvider","$timeout","$TimeoutProvider","$window","$WindowProvider","$$rAF","$$RAFProvider","$$jqLite","$$jqLiteProvider","$$HashMap","$$HashMapProvider","$$cookieReader","$$CookieReaderProvider","camelCase","SPECIAL_CHARS_REGEXP","_","offset","toUpperCase","MOZ_HACK_REGEXP","jqLiteAcceptsData","NODE_TYPE_ELEMENT","NODE_TYPE_DOCUMENT","jqLiteBuildFragment","tmp","fragment","createDocumentFragment","HTML_REGEXP","appendChild","createElement","TAG_NAME_REGEXP","exec","wrap","wrapMap","_default","innerHTML","XHTML_TAG_REGEXP","lastChild","childNodes","firstChild","textContent","createTextNode","argIsString","trim","jqLiteMinErr","parsed","SINGLE_TAG_REGEXP","jqLiteAddNodes","jqLiteClone","jqLiteDealoc","onlyDescendants","jqLiteRemoveData","querySelectorAll","descendants","l","jqLiteOff","type","unsupported","expandoStore","jqLiteExpandoStore","handle","removeHandler","listenerFns","removeEventListener","MOUSE_EVENT_MAP","expandoId","ng339","jqCache","createIfNecessary","jqId","jqLiteData","isSimpleSetter","isSimpleGetter","massGetter","jqLiteHasClass","selector","jqLiteRemoveClass","cssClasses","setAttribute","cssClass","jqLiteAddClass","existingClasses","root","elements","jqLiteController","jqLiteInheritedData","documentElement","names","parentNode","NODE_TYPE_DOCUMENT_FRAGMENT","host","jqLiteEmpty","removeChild","jqLiteRemove","keepData","jqLiteDocumentLoaded","action","win","readyState","setTimeout","getBooleanAttrName","booleanAttr","BOOLEAN_ATTR","BOOLEAN_ELEMENTS","createEventHandler","eventHandler","event","isDefaultPrevented","event.isDefaultPrevented","defaultPrevented","eventFns","eventFnsLength","immediatePropagationStopped","originalStopImmediatePropagation","stopImmediatePropagation","event.stopImmediatePropagation","stopPropagation","isImmediatePropagationStopped","event.isImmediatePropagationStopped","handlerWrapper","specialHandlerWrapper","defaultHandlerWrapper","handler","specialMouseHandlerWrapper","target","related","relatedTarget","jqLiteContains","$get","this.$get","hasClass","classes","addClass","removeClass","hashKey","nextUidFn","objType","HashMap","isolatedUid","this.nextUid","put","anonFn","args","fnText","STRIP_COMMENTS","FN_ARGS","modulesToLoad","supportObject","delegate","provider_","providerInjector","instantiate","providerCache","providerSuffix","enforceReturnValue","enforcedReturnValue","result","instanceInjector","factoryFn","enforce","loadModules","moduleFn","runInvokeQueue","invokeArgs","loadedModules","message","stack","createInternalInjector","cache","getService","serviceName","caller","INSTANTIATING","err","shift","locals","$inject","$$annotate","Type","instance","prototype","returnedValue","annotate","has","$injector","instanceCache","decorFn","origProvider","orig$get","origProvider.$get","origInstance","$delegate","autoScrollingEnabled","disableAutoScrolling","this.disableAutoScrolling","getFirstAnchor","list","Array","some","scrollTo","scrollIntoView","scroll","yOffset","getComputedStyle","position","getBoundingClientRect","bottom","elemTop","top","scrollBy","hash","elm","getElementById","getElementsByName","autoScrollWatch","autoScrollWatchAction","newVal","oldVal","mergeClasses","b","splitClasses","klass","prepareAnimateOptions","options","Browser","completeOutstandingRequest","outstandingRequestCount","outstandingRequestCallbacks","pop","error","cacheStateAndFireUrlChange","pendingLocation","cacheState","fireUrlChange","history","state","cachedState","lastCachedState","lastBrowserUrl","url","lastHistoryState","urlChangeListeners","listener","clearTimeout","pendingDeferIds","isMock","$$completeOutstandingRequest","$$incOutstandingRequestCount","self.$$incOutstandingRequestCount","notifyWhenNoOutstandingRequests","self.notifyWhenNoOutstandingRequests","callback","href","baseElement","self.url","sameState","sameBase","stripHash","substr","self.state","urlChangeInit","onUrlChange","self.onUrlChange","$$applicationDestroyed","self.$$applicationDestroyed","off","$$checkUrlChange","baseHref","self.baseHref","defer","self.defer","delay","timeoutId","cancel","self.defer.cancel","deferId","cacheFactory","cacheId","refresh","entry","freshEnd","staleEnd","n","link","p","nextEntry","prevEntry","caches","size","stats","id","capacity","Number","MAX_VALUE","lruHash","lruEntry","remove","removeAll","destroy","info","cacheFactory.info","cacheFactory.get","$$sanitizeUriProvider","parseIsolateBindings","directiveName","isController","LOCAL_REGEXP","bindings","definition","scopeName","$compileMinErr","mode","collection","optional","attrName","assertValidDirectiveName","hasDirectives","COMMENT_DIRECTIVE_REGEXP","CLASS_DIRECTIVE_REGEXP","ALL_OR_NOTHING_ATTRS","REQUIRE_PREFIX_REGEXP","EVENT_HANDLER_ATTR_REGEXP","this.directive","registerDirective","directiveFactory","Suffix","directives","priority","require","restrict","bindToController","controllerAs","CNTRL_REG","$$bindings","$$isolateBindings","aHrefSanitizationWhitelist","this.aHrefSanitizationWhitelist","regexp","imgSrcSanitizationWhitelist","this.imgSrcSanitizationWhitelist","this.debugInfoEnabled","enabled","safeAddClass","$element","className","$compileNodes","transcludeFn","maxPriority","ignoreDirective","previousCompileContext","nodeValue","compositeLinkFn","compileNodes","$$addScopeClass","namespace","publicLinkFn","cloneConnectFn","needsNewScope","$parent","$new","parentBoundTranscludeFn","transcludeControllers","futureParentElement","$$boundTransclude","$linkNode","wrapTemplate","controllerName","$$addScopeInfo","nodeList","$rootElement","childLinkFn","childScope","childBoundTranscludeFn","stableNodeList","nodeLinkFnFound","linkFns","idx","nodeLinkFn","transcludeOnThisElement","createBoundTranscludeFn","transclude","templateOnThisElement","attrs","linkFnFound","Attributes","collectDirectives","applyDirectivesToNode","$$element","terminal","previousBoundTranscludeFn","boundTranscludeFn","transcludedScope","cloneFn","controllers","containingScope","$$transcluded","attrsMap","$attr","addDirective","directiveNormalize","isNgAttr","nAttrs","attributes","attrStartName","attrEndName","ngAttrName","NG_ATTR_BINDING","PREFIX_REGEXP","multiElementMatch","MULTI_ELEMENT_DIR_RE","directiveIsMultiElement","nName","addAttrInterpolateDirective","animVal","msie","addTextInterpolateDirective","NODE_TYPE_COMMENT","byPriority","groupScan","attrStart","attrEnd","depth","groupElementsLinkFnWrapper","linkFn","compileNode","templateAttrs","jqCollection","originalReplaceDirective","preLinkFns","postLinkFns","addLinkFns","pre","post","newIsolateScopeDirective","$$isolateScope","cloneAndAnnotateFn","getControllers","elementControllers","inheritType","dataName","setupControllers","controllerDirectives","controllerKey","$scope","$attrs","$transclude","controllerInstance","hasElementTranscludeDirective","linkNode","controllersBoundTransclude","cloneAttachFn","scopeToChild","controllerScope","removeScopeBindingWatches","newScopeDirective","templateDirective","$$originalDirective","initializeDirectiveBindings","$on","controllerDirective","identifier","removeControllerBindingWatches","controllerResult","invokeLinkFn","template","templateUrl","terminalPriority","nonTlbTranscludeDirective","hasTranscludeDirective","hasTemplate","$compileNode","$template","childTranscludeFn","$$start","$$end","directiveValue","assertNoDuplicate","$$tlb","createComment","replaceWith","replaceDirective","contents","$$newScope","denormalizeTemplate","removeComments","templateNamespace","newTemplateAttrs","templateDirectives","unprocessedDirectives","markDirectiveScope","mergeTemplateAttributes","compileTemplateUrl","Math","max","newScope","tDirectives","startAttrName","endAttrName","multiElement","srcAttr","dstAttr","$set","tAttrs","linkQueue","afterTemplateNodeLinkFn","afterTemplateChildLinkFn","beforeTemplateCompileNode","origAsyncDirective","derivedSyncDirective","then","content","tempTemplateAttrs","beforeTemplateLinkNode","linkRootElement","$$destroyed","oldClasses","delayedNodeLinkFn","ignoreChildLinkFn","diff","what","previousDirective","wrapModuleNameIfDefined","moduleName","text","interpolateFn","textInterpolateCompileFn","templateNode","templateNodeParent","hasCompileParent","$$addBindingClass","textInterpolateLinkFn","$$addBindingInfo","expressions","interpolateFnWatchAction","wrapper","getTrustedContext","attrNormalizedName","HTML","RESOURCE_URL","allOrNothing","trustedContext","attrInterpolatePreLinkFn","$$observers","newValue","$$inter","$$scope","oldValue","$updateClass","elementsToRemove","newNode","firstElementToRemove","removeCount","j2","replaceChild","hasData","expando","k","kk","annotation","removeWatchCollection","lastValue","parentGet","parentSet","compare","$observe","literal","assign","parentValueWatch","parentValue","$stateful","removeWatch","$watchCollection","removeWatches","attributesToCopy","$normalize","$addClass","classVal","$removeClass","newClasses","toAdd","tokenDifference","toRemove","writeAttr","booleanKey","aliasedKey","ALIASED_ATTR","observer","trimmedSrcset","srcPattern","rawUris","nbrUrisWith2parts","floor","innerIdx","lastTuple","removeAttr","listeners","startSymbol","endSymbol","binding","isolated","noTemplate","str1","str2","values","tokens1","tokens2","token","jqNodes","globals","register","this.register","allowGlobals","this.allowGlobals","addIdentifier","expression","later","ident","$controllerMinErr","controllerPrototype","exception","cause","serializeValue","v","toISOString","ngParamSerializer","params","jQueryLikeParamSerializer","serialize","toSerialize","topLevel","defaultHttpResponseTransform","headers","tempData","JSON_PROTECTION_PREFIX","contentType","jsonStart","JSON_START","JSON_ENDS","parseHeaders","line","headerVal","headerKey","headersGetter","headersObj","transformData","status","fns","defaults","transformResponse","transformRequest","d","common","CONTENT_TYPE_APPLICATION_JSON","patch","xsrfCookieName","xsrfHeaderName","paramSerializer","useApplyAsync","this.useApplyAsync","useLegacyPromise","useLegacyPromiseExtensions","this.useLegacyPromiseExtensions","interceptorFactories","interceptors","requestConfig","response","resp","reject","executeHeaderFns","headerContent","processedHeaders","headerFn","header","mergeHeaders","defHeaders","reqHeaders","defHeaderName","lowercaseDefHeaderName","reqHeaderName","chain","serverRequest","reqData","withCredentials","sendReq","promise","when","reversedInterceptors","interceptor","request","requestError","responseError","thenFn","rejectFn","success","promise.success","promise.error","$httpMinErrLegacyFn","done","headersString","statusText","resolveHttpPromise","resolvePromise","$applyAsync","$$phase","deferred","resolve","resolvePromiseWithResult","removePendingReq","pendingRequests","cachedResp","buildUrl","defaultCache","xsrfValue","urlIsSameOrigin","timeout","responseType","serializedParams","interceptorFactory","createShortMethods","createShortMethodsWithData","createXhr","XMLHttpRequest","createHttpBackend","callbacks","$browserDefer","rawDocument","jsonpReq","callbackId","async","body","called","addEventListener","timeoutRequest","jsonpDone","xhr","abort","completeRequest","open","setRequestHeader","onload","xhr.onload","responseText","urlResolve","protocol","getAllResponseHeaders","onerror","onabort","send","this.startSymbol","this.endSymbol","escape","ch","unescapeText","escapedStartRegexp","escapedEndRegexp","mustHaveExpression","parseStringifyInterceptor","getTrusted","$interpolateMinErr","interr","endIndex","parseFns","textLength","expressionPositions","startSymbolLength","exp","endSymbolLength","throwNoconcat","compute","interpolationFn","$$watchDelegate","$watchGroup","interpolateFnWatcher","oldValues","currValue","$interpolate.startSymbol","$interpolate.endSymbol","interval","count","invokeApply","hasParams","setInterval","clearInterval","iteration","skipApply","$$intervalId","tick","notify","intervals","interval.cancel","encodePath","segments","parseAbsoluteUrl","absoluteUrl","locationObj","parsedUrl","$$protocol","$$host","hostname","$$port","port","DEFAULT_PORTS","parseAppUrl","relativeUrl","prefixed","$$path","pathname","$$search","search","$$hash","beginsWith","begin","whole","trimEmptyHash","LocationHtml5Url","appBase","appBaseNoFile","basePrefix","$$html5","$$parse","this.$$parse","pathUrl","$locationMinErr","$$compose","this.$$compose","$$url","$$absUrl","$$parseLinkUrl","this.$$parseLinkUrl","relHref","appUrl","prevAppUrl","rewrittenUrl","LocationHashbangUrl","hashPrefix","withoutBaseUrl","withoutHashUrl","windowsFilePathExp","base","firstPathSegmentMatch","LocationHashbangInHtml5Url","locationGetter","property","locationGetterSetter","preprocess","html5Mode","requireBase","rewriteLinks","this.hashPrefix","this.html5Mode","setBrowserUrlWithFallback","oldUrl","oldState","$$state","afterLocationChange","$broadcast","absUrl","LocationMode","initialUrl","lastIndexOf","IGNORE_URI_REGEXP","ctrlKey","metaKey","shiftKey","which","button","absHref","preventDefault","initializing","newUrl","newState","$digest","$locationWatch","currentReplace","$$replace","urlOrStateChanged","debug","debugEnabled","this.debugEnabled","flag","formatError","Error","sourceURL","consoleLog","console","logFn","log","hasApply","arg1","arg2","warn","ensureSafeMemberName","fullExpression","$parseMinErr","getStringValue","ensureSafeObject","children","ensureSafeFunction","CALL","APPLY","BIND","ensureSafeAssignContext","Function","ifDefined","plusFn","r","findConstantAndWatchExpressions","ast","allConstants","argsToWatch","AST","Program","expr","Literal","toWatch","UnaryExpression","argument","BinaryExpression","left","right","LogicalExpression","ConditionalExpression","alternate","consequent","Identifier","MemberExpression","object","computed","CallExpression","callee","AssignmentExpression","ArrayExpression","ObjectExpression","properties","ThisExpression","getInputs","lastExpression","isAssignable","assignableAST","NGValueParameter","operator","isLiteral","ASTCompiler","astBuilder","ASTInterpreter","isPossiblyDangerousMemberName","getValueOf","objectValueOf","cacheDefault","cacheExpensive","expressionInputDirtyCheck","oldValueOfValue","inputsWatchDelegate","objectEquality","parsedExpression","prettyPrintExpression","inputExpressions","inputs","lastResult","oldInputValueOf","expressionInputWatch","newInputValue","oldInputValueOfValues","oldInputValues","expressionInputsWatch","changed","oneTimeWatchDelegate","unwatch","oneTimeWatch","oneTimeListener","old","$$postDigest","oneTimeLiteralWatchDelegate","isAllDefined","allDefined","constantWatchDelegate","constantWatch","constantListener","addInterceptor","interceptorFn","watchDelegate","useInputs","regularInterceptedExpression","oneTimeInterceptedExpression","noUnsafeEval","$parseOptions","expensiveChecks","$parseOptionsExpensive","oneTime","cacheKey","parseOptions","lexer","Lexer","parser","Parser","qFactory","nextTick","exceptionHandler","callOnce","resolveFn","Promise","simpleBind","scheduleProcessQueue","processScheduled","pending","Deferred","$qMinErr","TypeError","onFulfilled","onRejected","progressBack","catch","finally","handleCallback","$$reject","$$resolve","progress","makePromise","resolved","isResolved","callbackOutput","errback","$Q","Q","resolver","all","promises","results","requestAnimationFrame","webkitRequestAnimationFrame","cancelAnimationFrame","webkitCancelAnimationFrame","webkitCancelRequestAnimationFrame","rafSupported","raf","timer","supported","createChildScopeClass","ChildScope","$$watchers","$$nextSibling","$$childHead","$$childTail","$$listeners","$$listenerCount","$$watchersCount","$id","$$ChildScope","TTL","$rootScopeMinErr","lastDirtyWatch","applyAsyncId","digestTtl","this.digestTtl","destroyChildScope","$event","currentScope","cleanUpScope","$$prevSibling","$root","Scope","beginPhase","phase","incrementWatchersCount","current","decrementListenerCount","initWatchVal","flushApplyAsync","applyAsyncQueue","scheduleApplyAsync","isolate","child","watchExp","watcher","last","eq","deregisterWatch","watchExpressions","watchGroupAction","changeReactionScheduled","firstRun","newValues","deregisterFns","shouldCall","deregisterWatchGroup","unwatchFn","watchGroupSubAction","$watchCollectionInterceptor","_value","bothNaN","newItem","oldItem","internalArray","oldLength","changeDetected","newLength","internalObject","veryOldValue","trackVeryOldValue","changeDetector","initRun","$watchCollectionAction","watch","watchers","dirty","ttl","watchLog","logIdx","asyncTask","asyncQueue","$eval","msg","next","postDigestQueue","eventName","this.$watchGroup","$applyAsyncExpression","namedListeners","indexOfListener","$emit","targetScope","listenerArgs","$$asyncQueue","$$postDigestQueue","$$applyAsyncQueue","sanitizeUri","uri","isImage","regex","normalizedVal","adjustMatcher","matcher","$sceMinErr","escapeForRegexp","adjustMatchers","matchers","adjustedMatchers","SCE_CONTEXTS","resourceUrlWhitelist","resourceUrlBlacklist","this.resourceUrlWhitelist","this.resourceUrlBlacklist","matchUrl","generateHolderType","Base","holderType","trustedValue","$$unwrapTrustedValue","this.$$unwrapTrustedValue","holderType.prototype.valueOf","holderType.prototype.toString","htmlSanitizer","trustedValueHolderBase","byType","CSS","URL","JS","trustAs","Constructor","maybeTrusted","allowed","this.enabled","sce","isEnabled","sce.isEnabled","sce.getTrusted","parseAs","sce.parseAs","enumValue","lName","eventSupport","android","userAgent","navigator","boxee","vendorPrefix","vendorRegex","bodyStyle","transitions","animations","webkitTransition","webkitAnimation","pushState","hasEvent","divElm","handleRequestFn","tpl","ignoreRequestError","totalPendingRequests","getTrustedResourceUrl","transformer","httpOptions","handleError","testability","testability.findBindings","opt_exactMatch","getElementsByClassName","matches","dataBinding","bindingName","testability.findModels","prefixes","attributeEquals","testability.getLocation","testability.setLocation","testability.whenStable","deferreds","$$timeoutId","timeout.cancel","urlParsingNode","requestUrl","originUrl","$$CookieReader","safeDecodeURIComponent","lastCookies","lastCookieString","cookieArray","cookie","currentCookieString","filters","suffix","currencyFilter","dateFilter","filterFilter","jsonFilter","limitToFilter","lowercaseFilter","numberFilter","orderByFilter","uppercaseFilter","comparator","matchAgainstAnyProp","getTypeForFilter","expressionType","predicateFn","createPredicateFn","shouldMatchPrimitives","actual","expected","deepCompare","dontMatchWholeObject","actualType","expectedType","expectedVal","matchAnyProperty","actualVal","$locale","formats","NUMBER_FORMATS","amount","currencySymbol","fractionSize","CURRENCY_SYM","PATTERNS","maxFrac","formatNumber","GROUP_SEP","DECIMAL_SEP","number","groupSep","decimalSep","isNegative","abs","isInfinity","Infinity","isFinite","numStr","formatedText","hasExponent","toFixed","parseFloat","fractionLen","min","minFrac","round","fraction","lgroup","lgSize","group","gSize","negPre","posPre","negSuf","posSuf","padNumber","num","digits","neg","dateGetter","dateStrGetter","shortForm","getFirstThursdayOfYear","year","dayOfWeekOnFirst","getDay","weekGetter","firstThurs","getFullYear","thisThurs","getMonth","getDate","eraGetter","ERAS","jsonStringToDate","string","R_ISO8601_STR","tzHour","tzMin","dateSetter","setUTCFullYear","setFullYear","timeSetter","setUTCHours","setHours","m","s","ms","format","DATETIME_FORMATS","NUMBER_STRING","DATE_FORMATS_SPLIT","dateTimezoneOffset","DATE_FORMATS","spacing","limit","processPredicates","sortPredicate","reverseOrder","map","predicate","descending","predicates","compareValues","getComparisonObject","predicateValues","doComparison","v1","v2","ngDirective","FormController","controls","$error","$$success","$pending","$name","$dirty","$pristine","$valid","$invalid","$submitted","$$parentForm","nullFormCtrl","$rollbackViewValue","form.$rollbackViewValue","control","$commitViewValue","form.$commitViewValue","$addControl","form.$addControl","$$renameControl","form.$$renameControl","newName","oldName","$removeControl","form.$removeControl","$setValidity","addSetValidityMethod","ctrl","set","unset","$setDirty","form.$setDirty","PRISTINE_CLASS","DIRTY_CLASS","$setPristine","form.$setPristine","setClass","SUBMITTED_CLASS","$setUntouched","form.$setUntouched","$setSubmitted","form.$setSubmitted","stringBasedInputType","$formatters","$isEmpty","baseInputType","composing","ev","ngTrim","$viewValue","$$hasNativeValidators","$setViewValue","deferListener","origValue","keyCode","$render","ctrl.$render","createDateParser","mapping","iso","ISO_DATE_REGEXP","yyyy","MM","dd","HH","getHours","mm","ss","getSeconds","sss","getMilliseconds","part","NaN","createDateInputType","parseDate","dynamicDateInputType","isValidDate","parseObservedDateValue","badInputChecker","$options","previousDate","$$parserName","$parsers","parsedDate","ngModelMinErr","ngMin","minVal","$validators","ctrl.$validators.min","$validate","ngMax","maxVal","ctrl.$validators.max","validity","VALIDITY_STATE_PROPERTY","badInput","typeMismatch","parseConstantExpr","parseFn","classDirective","arrayDifference","arrayClasses","digestClassCounts","classCounts","classesToUpdate","ngClassWatchAction","$index","old$index","mod","cachedToggleClass","switchValue","classCache","toggleValidationCss","validationErrorKey","isValid","VALID_CLASS","INVALID_CLASS","setValidity","isObjectEmpty","PENDING_CLASS","combinedState","REGEX_STRING_REGEXP","documentMode","rules","ngCspElement","ngCspAttribute","noInlineStyle","name_","el","full","major","minor","dot","codeName","JQLite._data","mouseleave","mouseenter","optgroup","tbody","tfoot","colgroup","caption","thead","th","td","Node","contains","compareDocumentPosition","ready","trigger","fired","removeData","jqLiteHasData","removeAttribute","css","NODE_TYPE_ATTRIBUTE","lowercasedName","specified","getNamedItem","ret","getText","$dv","multiple","selected","nodeCount","jqLiteOn","types","addHandler","noEventListener","one","onFn","replaceNode","insertBefore","contentDocument","prepend","wrapNode","detach","after","newElement","toggleClass","condition","classCondition","nextElementSibling","getElementsByTagName","extraParameters","dummyEvent","handlerArgs","eventFnsCopy","arg3","unbind","FN_ARG_SPLIT","FN_ARG","argDecl","underscore","$animateMinErr","AnimateRunner","end","resume","pause","complete","pass","fail","postDigestElements","updateData","handleCSSClassChanges","existing","pin","domOperation","from","to","classesAdded","add","classesRemoved","$$registeredAnimations","classNameFilter","this.classNameFilter","$$classNameFilter","reservedRegex","NG_ANIMATE_CLASSNAME","domInsert","parentElement","afterElement","afterNode","ELEMENT_NODE","previousElementSibling","runner","enter","move","leave","addclass","animate","tempClasses","RAFPromise","getPromise","f1","f2","closed","cleanupStyles","start","domNode","offsetWidth","APPLICATION_JSON","$httpMinErr","$interpolateMinErr.throwNoconcat","$interpolateMinErr.interr","PATH_MATCH","locationPrototype","paramValue","Location","Location.prototype.state","OPERATORS","ESCAPE","lex","tokens","readString","peek","readNumber","isIdent","readIdent","is","isWhitespace","ch2","ch3","op2","op3","op1","throwError","chars","isExpOperator","colStr","peekCh","quote","rawString","hex","String","fromCharCode","rep","ExpressionStatement","Property","program","expressionStatement","expect","filterChain","assignment","ternary","logicalOR","consume","logicalAND","equality","relational","additive","multiplicative","unary","primary","arrayDeclaration","constants","parseArguments","baseExpression","peekToken","kind","e1","e2","e3","e4","peekAhead","t","nextId","vars","own","assignable","stage","computing","recurse","return_","generateFunction","fnKey","intoId","watchId","fnString","USE","STRICT","filterPrefix","watchFns","varsPrefix","section","nameId","recursionFn","skipWatchIdCheck","if_","lazyAssign","computedMember","lazyRecurse","plus","not","getHasOwnProperty","nonComputedMember","addEnsureSafeObject","notNull","addEnsureSafeMemberName","addEnsureSafeFunction","member","addEnsureSafeAssignContext","filterName","defaultValue","stringEscapeRegex","stringEscapeFn","c","charCodeAt","skip","init","fn.assign","rhs","lhs","unary+","unary-","unary!","binary+","binary-","binary*","binary/","binary%","binary===","binary!==","binary==","binary!=","binary<","binary>","binary<=","binary>=","binary&&","binary||","ternary?:","astCompiler","yy","y","MMMM","MMM","M","H","hh","EEEE","EEE","ampmGetter","AMPMS","Z","timeZoneGetter","zone","paddedZone","ww","w","G","GG","GGG","GGGG","longEraGetter","ERANAMES","xlinkHref","propName","defaultLinkFn","normalized","ngBooleanAttrWatchAction","htmlAttr","ngAttrAliasWatchAction","nullFormRenameControl","formDirectiveFactory","isNgForm","getSetter","ngFormCompile","formElement","nameAttr","ngFormPreLink","ctrls","handleFormSubmission","setter","URL_REGEXP","EMAIL_REGEXP","NUMBER_REGEXP","DATE_REGEXP","DATETIMELOCAL_REGEXP","WEEK_REGEXP","MONTH_REGEXP","TIME_REGEXP","inputType","textInputType","weekParser","isoWeek","existingDate","week","hours","seconds","milliseconds","addDays","numberInputType","urlInputType","ctrl.$validators.url","modelValue","viewValue","emailInputType","email","ctrl.$validators.email","radioInputType","checked","checkboxInputType","trueValue","ngTrueValue","falseValue","ngFalseValue","ctrl.$isEmpty","CONSTANT_VALUE_REGEXP","tplAttr","ngValueConstantLink","ngValueLink","valueWatchAction","$compile","ngBindCompile","templateElement","ngBindLink","ngBindWatchAction","ngBindTemplateCompile","ngBindTemplateLink","ngBindHtmlCompile","tElement","ngBindHtmlGetter","ngBindHtmlWatch","ngBindHtmlLink","ngBindHtmlWatchAction","getTrustedHtml","$viewChangeListeners","forceAsyncEvents","ngEventHandler","previousElements","ngIfWatchAction","srcExp","onloadExp","autoScrollExp","autoscroll","changeCounter","previousElement","currentElement","cleanupLastIncludeContent","ngIncludeWatchAction","afterAnimation","thisChangeId","namespaceAdaptedClone","trimValues","NgModelController","$modelValue","$$rawModelValue","$asyncValidators","$untouched","$touched","parsedNgModel","parsedNgModelAssign","ngModelGet","ngModelSet","pendingDebounce","parserValid","$$setOptions","this.$$setOptions","getterSetter","invokeModelGetter","invokeModelSetter","$$$p","this.$isEmpty","currentValidationRunId","this.$setPristine","this.$setDirty","this.$setUntouched","UNTOUCHED_CLASS","TOUCHED_CLASS","$setTouched","this.$setTouched","this.$rollbackViewValue","$$lastCommittedViewValue","this.$validate","prevValid","prevModelValue","allowInvalid","$$runValidators","allValid","$$writeModelToScope","this.$$runValidators","doneCallback","processSyncValidators","syncValidatorsValid","validator","processAsyncValidators","validatorPromises","validationDone","localValidationRunId","processParseErrors","errorKey","this.$commitViewValue","$$parseAndValidate","this.$$parseAndValidate","this.$$writeModelToScope","this.$setViewValue","updateOnDefault","$$debounceViewValueCommit","this.$$debounceViewValueCommit","debounceDelay","debounce","ngModelWatch","formatters","ngModelCompile","ngModelPreLink","modelCtrl","formCtrl","ngModelPostLink","updateOn","DEFAULT_REGEXP","that","ngOptionsMinErr","NG_OPTIONS_REGEXP","parseOptionsExpression","optionsExp","selectElement","Option","selectValue","label","disabled","getOptionValuesKeys","optionValues","optionValuesKeys","keyName","itemKey","valueName","selectAs","trackBy","viewValueFn","trackByFn","getTrackByValueFn","getHashOfValue","getTrackByValue","getLocals","displayFn","groupByFn","disableWhenFn","valuesFn","getWatchables","watchedArray","optionValuesLength","disableWhen","getOptions","optionItems","selectValueMap","optionItem","getOptionFromViewValue","getViewValueFromOption","optionTemplate","optGroupTemplate","ngOptionsPreLink","registerOption","ngOptionsPostLink","updateOptionElement","addOrReuseElement","removeExcessElements","skipEmptyAndUnknownOptions","emptyOption_","emptyOption","unknownOption_","unknownOption","updateOptions","previousValue","selectCtrl","readValue","groupMap","providedEmptyOption","updateOption","optionElement","groupElement","currentOptionElement","ngModelCtrl","nextValue","ngModelCtrl.$isEmpty","writeValue","selectCtrl.writeValue","selectCtrl.readValue","selectedValues","selections","selectedOption","BRACE","IS_WHEN","updateElementText","newText","numberExp","whenExp","whens","whensExpFns","braceReplacement","watchRemover","lastCount","attributeName","tmpMatch","whenKey","ngPluralizeWatchAction","countIsNaN","pluralCat","whenExpFn","ngRepeatMinErr","updateScope","valueIdentifier","keyIdentifier","arrayLength","$first","$last","$middle","$odd","$even","ngRepeatCompile","ngRepeatEndComment","aliasAs","trackByExp","trackByExpGetter","trackByIdExpFn","trackByIdArrayFn","trackByIdObjFn","hashFnLocals","ngRepeatLink","lastBlockMap","ngRepeatAction","previousNode","nextNode","nextBlockMap","collectionLength","trackById","collectionKeys","nextBlockOrder","trackByIdFn","blockKey","ngRepeatTransclude","ngShowWatchAction","NG_HIDE_CLASS","NG_HIDE_IN_PROGRESS_CLASS","ngHideWatchAction","ngStyleWatchAction","newStyles","oldStyles","ngSwitchController","cases","selectedTranscludes","selectedElements","previousLeaveAnimations","selectedScopes","spliceFactory","ngSwitchWatchAction","selectedTransclude","caseElement","selectedScope","anchor","noopNgModelController","SelectController","optionsMap","renderUnknownOption","self.renderUnknownOption","unknownVal","removeUnknownOption","self.removeUnknownOption","self.readValue","self.writeValue","hasOption","addOption","self.addOption","removeOption","self.removeOption","self.hasOption","self.registerOption","optionScope","optionAttrs","interpolateValueFn","interpolateTextFn","valueAttributeObserveAction","interpolateWatchAction","selectPreLink","ngModelCtrl.$render","lastView","lastViewRef","selectMultipleWatch","selectCtrlName","ctrl.$validators.required","patternExp","ctrl.$validators.pattern","intVal","ctrl.$validators.maxlength","ctrl.$validators.minlength","getDecimals","opt_precision","pow","ONE","OTHER","$$csp","head"]
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/errors.json b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/errors.json
deleted file mode 100644
index 954d1d9f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/errors.json
+++ /dev/null
@@ -1 +0,0 @@
-{"id":"ng","generated":"Fri Nov 20 2015 00:03:11 GMT-0800 (PST)","errors":{"ng":{"areq":"Argument '{0}' is {1}","cpta":"Can't copy! TypedArray destination cannot be mutated.","test":"no injector found for element argument to getTestability","cpws":"Can't copy! Making copies of Window or Scope instances is not supported.","btstrpd":"App Already Bootstrapped with this Element '{0}'","cpi":"Can't copy! Source and destination are identical.","badname":"hasOwnProperty is not a valid {0} name"},"$http":{"legacy":"The method `{0}` on the promise returned from `$http` has been disabled.","badreq":"Http request configuration must be an object. Received: {0}"},"ngRepeat":{"badident":"alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.","iexp":"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.","dupes":"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}","iidexp":"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'."},"$sce":{"imatcher":"Matchers may only be \"self\", string patterns or RegExp objects","icontext":"Attempted to trust a value in invalid context. Context: {0}; Value: {1}","iwcard":"Illegal sequence *** in string matcher. String: {0}","insecurl":"Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}","iequirks":"Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.","unsafe":"Attempting to use an unsafe value in a safe context.","itype":"Attempted to trust a non-string value in a content requiring a string: Context: {0}"},"ngPattern":{"noregexp":"Expected {0} to be a RegExp but was {1}. Element: {2}"},"$controller":{"ctrlfmt":"Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.","noscp":"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`."},"$parse":{"isecfn":"Referencing Function in Angular expressions is disallowed! Expression: {0}","isecobj":"Referencing Object in Angular expressions is disallowed! Expression: {0}","lval":"Trying to assing a value to a non l-value","isecwindow":"Referencing the Window in Angular expressions is disallowed! Expression: {0}","ueoe":"Unexpected end of expression: {0}","isecdom":"Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}","lexerr":"Lexer Error: {0} at column{1} in expression [{2}].","esc":"IMPOSSIBLE","iseccst":"Cannot convert object to primitive value! Expression: {0}","isecff":"Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}","syntax":"Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].","isecaf":"Assigning to a constructor is disallowed! Expression: {0}","isecfld":"Attempting to access a disallowed field in Angular expressions! Expression: {0}"},"jqLite":{"offargs":"jqLite#off() does not support the `selector` argument","onargs":"jqLite#on() does not support the `selector` or `eventData` parameters","nosel":"Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element"},"$animate":{"notcsel":"Expecting class selector starting with '.' got '{0}'.","nongcls":"$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the \"{0}\" CSS class."},"$q":{"norslvr":"Expected resolverFn, got '{0}'","qcycle":"Expected promise to be resolved with value other than itself '{0}'"},"$injector":{"pget":"Provider '{0}' must define $get factory method.","cdep":"Circular dependency found: {0}","nomod":"Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.","strictdi":"{0} is not using explicit annotation and cannot be invoked in strict mode","modulerr":"Failed to instantiate module {0} due to:\n{1}","undef":"Provider '{0}' must return a value from $get factory method.","unpr":"Unknown provider: {0}","itkn":"Incorrect injection token! Expected service name as string, got {0}"},"filter":{"notarray":"Expected array but received: {0}"},"ngTransclude":{"orphan":"Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}"},"ngModel":{"nonassign":"Expression '{0}' is non-assignable. Element: {1}","datefmt":"Expected `{0}` to be a date","$asyncValidators":"Expected asynchronous validator to return a promise but got '{0}' instead.","constexpr":"Expected constant expression for `{0}`, but saw `{1}`.","numfmt":"Expected `{0}` to be a number"},"$location":{"nostate":"History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API","ipthprfx":"Invalid url \"{0}\", missing path prefix \"{1}\".","isrcharg":"The first argument of the `$location#search()` call must be a string or an object.","nobase":"$location in HTML5 mode requires a <base> tag to be present!"},"$cacheFactory":{"iid":"CacheId '{0}' is already taken!"},"$interpolate":{"noconcat":"Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce","interr":"Can't interpolate: {0}\n{1}","nochgmustache":"angular-message-format.js currently does not allow you to use custom start and end symbols for interpolation.","reqcomma":"Expected a comma after the keyword “{0}†at line {1}, column {2} of text “{3}â€","untermstr":"The string beginning at line {0}, column {1} is unterminated in text “{2}â€","badexpr":"Unexpected operator “{0}†at line {1}, column {2} in text. Was expecting “{3}â€. Text: “{4}â€","dupvalue":"The choice “{0}†is specified more than once. Duplicate key is at line {1}, column {2} in text “{3}â€","unsafe":"Use of select/plural MessageFormat syntax is currently disallowed in a secure context ({0}). At line {1}, column {2} of text “{3}â€","reqother":"“other†is a required option.","reqendinterp":"Expecting end of interpolation symbol, “{0}â€, at line {1}, column {2} in text “{3}â€","reqarg":"Expected one of “plural†or “select†at line {0}, column {1} of text “{2}â€","wantstring":"Expected the beginning of a string at line {0}, column {1} in text “{2}â€","logicbug":"The messageformat parser has encountered an internal error. Please file a github issue against the AngularJS project and provide this message text that triggers the bug. Text: “{0}â€","reqopenbrace":"The plural choice “{0}†must be followed by a message in braces at line {1}, column {2} in text “{3}â€","unknarg":"Unsupported keyword “{0}†at line {0}, column {1}. Only “plural†and “select†are currently supported. Text: “{3}â€","reqendbrace":"The plural/select choice “{0}†message starting at line {1}, column {2} does not have an ending closing brace. Text “{3}â€"},"ngOptions":{"iexp":"Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}"},"$rootScope":{"inprog":"{0} already in progress","infdig":"{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}"},"$compile":{"noident":"Cannot bind to controller without identifier for directive '{0}'.","selmulti":"Binding to the 'multiple' attribute is not supported. Element: {0}","nodomevents":"Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.","ctreq":"Controller '{0}', required by directive '{1}', can't be found!","nonassign":"Expression '{0}' used with directive '{1}' is non-assignable!","tplrt":"Template for directive '{0}' must have exactly one root element. {1}","iscp":"Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}","baddir":"Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces","noctrl":"Cannot bind to controller without directive '{0}'s controller.","multidir":"Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}","tpload":"Failed to load template: {0} (HTTP status: {1} {2})","uterdir":"Unterminated attribute, found '{0}' but no matching '{1}' found."},"$resource":{"badargs":"Expected up to 4 arguments [params, data, success, error], got {0} arguments","badmember":"Dotted member path \"@{0}\" is invalid.","badname":"hasOwnProperty is not a valid parameter name.","badcfg":"Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})"},"$route":{"norout":"Tried updating route when with no current route"},"$sanitize":{"badparse":"The sanitizer was unable to parse the following block of html: {0}"}}} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-dj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-dj.js
deleted file mode 100644
index 2fe0c303..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-dj.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "saaku",
- "carra"
- ],
- "DAY": [
- "Acaada",
- "Etleeni",
- "Talaata",
- "Arbaqa",
- "Kamiisi",
- "Gumqata",
- "Sabti"
- ],
- "ERANAMES": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "ERAS": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "Qunxa Garablu",
- "Kudo",
- "Ciggilta Kudo",
- "Agda Baxis",
- "Caxah Alsa",
- "Qasa Dirri",
- "Qado Dirri",
- "Leqeeni",
- "Waysu",
- "Diteli",
- "Ximoli",
- "Kaxxa Garablu"
- ],
- "SHORTDAY": [
- "Aca",
- "Etl",
- "Tal",
- "Arb",
- "Kam",
- "Gum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qun",
- "Nah",
- "Cig",
- "Agd",
- "Cax",
- "Qas",
- "Qad",
- "Leq",
- "Way",
- "Dit",
- "Xim",
- "Kax"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Fdj",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "aa-dj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-er.js
deleted file mode 100644
index 48c1e7c3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-er.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "saaku",
- "carra"
- ],
- "DAY": [
- "Acaada",
- "Etleeni",
- "Talaata",
- "Arbaqa",
- "Kamiisi",
- "Gumqata",
- "Sabti"
- ],
- "ERANAMES": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "ERAS": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Qunxa Garablu",
- "Kudo",
- "Ciggilta Kudo",
- "Agda Baxis",
- "Caxah Alsa",
- "Qasa Dirri",
- "Qado Dirri",
- "Liiqen",
- "Waysu",
- "Diteli",
- "Ximoli",
- "Kaxxa Garablu"
- ],
- "SHORTDAY": [
- "Aca",
- "Etl",
- "Tal",
- "Arb",
- "Kam",
- "Gum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qun",
- "Nah",
- "Cig",
- "Agd",
- "Cax",
- "Qas",
- "Qad",
- "Leq",
- "Way",
- "Dit",
- "Xim",
- "Kax"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "aa-er",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-et.js
deleted file mode 100644
index 03b62551..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa-et.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "saaku",
- "carra"
- ],
- "DAY": [
- "Acaada",
- "Etleeni",
- "Talaata",
- "Arbaqa",
- "Kamiisi",
- "Gumqata",
- "Sabti"
- ],
- "ERANAMES": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "ERAS": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Qunxa Garablu",
- "Kudo",
- "Ciggilta Kudo",
- "Agda Baxis",
- "Caxah Alsa",
- "Qasa Dirri",
- "Qado Dirri",
- "Liiqen",
- "Waysu",
- "Diteli",
- "Ximoli",
- "Kaxxa Garablu"
- ],
- "SHORTDAY": [
- "Aca",
- "Etl",
- "Tal",
- "Arb",
- "Kam",
- "Gum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qun",
- "Nah",
- "Cig",
- "Agd",
- "Cax",
- "Qas",
- "Qad",
- "Leq",
- "Way",
- "Dit",
- "Xim",
- "Kax"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "aa-et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa.js
deleted file mode 100644
index 661fa2e1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_aa.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "saaku",
- "carra"
- ],
- "DAY": [
- "Acaada",
- "Etleeni",
- "Talaata",
- "Arbaqa",
- "Kamiisi",
- "Gumqata",
- "Sabti"
- ],
- "ERANAMES": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "ERAS": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Qunxa Garablu",
- "Kudo",
- "Ciggilta Kudo",
- "Agda Baxis",
- "Caxah Alsa",
- "Qasa Dirri",
- "Qado Dirri",
- "Liiqen",
- "Waysu",
- "Diteli",
- "Ximoli",
- "Kaxxa Garablu"
- ],
- "SHORTDAY": [
- "Aca",
- "Etl",
- "Tal",
- "Arb",
- "Kam",
- "Gum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qun",
- "Nah",
- "Cig",
- "Agd",
- "Cax",
- "Qas",
- "Qad",
- "Leq",
- "Way",
- "Dit",
- "Xim",
- "Kax"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "aa",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-na.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-na.js
deleted file mode 100644
index 4647a92b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-na.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vm.",
- "nm."
- ],
- "DAY": [
- "Sondag",
- "Maandag",
- "Dinsdag",
- "Woensdag",
- "Donderdag",
- "Vrydag",
- "Saterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.C.",
- "n.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januarie",
- "Februarie",
- "Maart",
- "April",
- "Mei",
- "Junie",
- "Julie",
- "Augustus",
- "September",
- "Oktober",
- "November",
- "Desember"
- ],
- "SHORTDAY": [
- "So",
- "Ma",
- "Di",
- "Wo",
- "Do",
- "Vr",
- "Sa"
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "Mrt.",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "af-na",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-za.js
deleted file mode 100644
index 38c2217c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af-za.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vm.",
- "nm."
- ],
- "DAY": [
- "Sondag",
- "Maandag",
- "Dinsdag",
- "Woensdag",
- "Donderdag",
- "Vrydag",
- "Saterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.C.",
- "n.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januarie",
- "Februarie",
- "Maart",
- "April",
- "Mei",
- "Junie",
- "Julie",
- "Augustus",
- "September",
- "Oktober",
- "November",
- "Desember"
- ],
- "SHORTDAY": [
- "So",
- "Ma",
- "Di",
- "Wo",
- "Do",
- "Vr",
- "Sa"
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "Mrt.",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "y-MM-dd h:mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "af-za",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af.js
deleted file mode 100644
index 9ed43d14..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_af.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vm.",
- "nm."
- ],
- "DAY": [
- "Sondag",
- "Maandag",
- "Dinsdag",
- "Woensdag",
- "Donderdag",
- "Vrydag",
- "Saterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.C.",
- "n.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januarie",
- "Februarie",
- "Maart",
- "April",
- "Mei",
- "Junie",
- "Julie",
- "Augustus",
- "September",
- "Oktober",
- "November",
- "Desember"
- ],
- "SHORTDAY": [
- "So",
- "Ma",
- "Di",
- "Wo",
- "Do",
- "Vr",
- "Sa"
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "Mrt.",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "y-MM-dd h:mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "af",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq-cm.js
deleted file mode 100644
index 9d3f9e9c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.g",
- "a.k"
- ],
- "DAY": [
- "tsu\u0294nts\u0268",
- "tsu\u0294ukp\u00e0",
- "tsu\u0294ugh\u0254e",
- "tsu\u0294ut\u0254\u0300ml\u00f2",
- "tsu\u0294um\u00e8",
- "tsu\u0294ugh\u0268\u0302m",
- "tsu\u0294ndz\u0268k\u0254\u0294\u0254"
- ],
- "ERANAMES": [
- "S\u011be K\u0268\u0300lesto",
- "B\u01cea K\u0268\u0300lesto"
- ],
- "ERAS": [
- "SK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ndz\u0254\u0300\u014b\u0254\u0300n\u00f9m",
- "ndz\u0254\u0300\u014b\u0254\u0300k\u0197\u0300z\u00f9\u0294",
- "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300d\u0289\u0300gh\u00e0",
- "ndz\u0254\u0300\u014b\u0254\u0300t\u01ceaf\u0289\u0304gh\u0101",
- "ndz\u0254\u0300\u014b\u00e8s\u00e8e",
- "ndz\u0254\u0300\u014b\u0254\u0300nz\u00f9gh\u00f2",
- "ndz\u0254\u0300\u014b\u0254\u0300d\u00f9mlo",
- "ndz\u0254\u0300\u014b\u0254\u0300kw\u00eef\u0254\u0300e",
- "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300f\u0289\u0300gh\u00e0dzugh\u00f9",
- "ndz\u0254\u0300\u014b\u0254\u0300gh\u01d4uwel\u0254\u0300m",
- "ndz\u0254\u0300\u014b\u0254\u0300chwa\u0294\u00e0kaa wo",
- "ndz\u0254\u0300\u014b\u00e8fw\u00f2o"
- ],
- "SHORTDAY": [
- "nts",
- "kpa",
- "gh\u0254",
- "t\u0254m",
- "ume",
- "gh\u0268",
- "dzk"
- ],
- "SHORTMONTH": [
- "n\u00f9m",
- "k\u0268z",
- "t\u0268d",
- "taa",
- "see",
- "nzu",
- "dum",
- "f\u0254e",
- "dzu",
- "l\u0254m",
- "kaa",
- "fwo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "agq-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq.js
deleted file mode 100644
index 2bd28260..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_agq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.g",
- "a.k"
- ],
- "DAY": [
- "tsu\u0294nts\u0268",
- "tsu\u0294ukp\u00e0",
- "tsu\u0294ugh\u0254e",
- "tsu\u0294ut\u0254\u0300ml\u00f2",
- "tsu\u0294um\u00e8",
- "tsu\u0294ugh\u0268\u0302m",
- "tsu\u0294ndz\u0268k\u0254\u0294\u0254"
- ],
- "ERANAMES": [
- "S\u011be K\u0268\u0300lesto",
- "B\u01cea K\u0268\u0300lesto"
- ],
- "ERAS": [
- "SK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ndz\u0254\u0300\u014b\u0254\u0300n\u00f9m",
- "ndz\u0254\u0300\u014b\u0254\u0300k\u0197\u0300z\u00f9\u0294",
- "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300d\u0289\u0300gh\u00e0",
- "ndz\u0254\u0300\u014b\u0254\u0300t\u01ceaf\u0289\u0304gh\u0101",
- "ndz\u0254\u0300\u014b\u00e8s\u00e8e",
- "ndz\u0254\u0300\u014b\u0254\u0300nz\u00f9gh\u00f2",
- "ndz\u0254\u0300\u014b\u0254\u0300d\u00f9mlo",
- "ndz\u0254\u0300\u014b\u0254\u0300kw\u00eef\u0254\u0300e",
- "ndz\u0254\u0300\u014b\u0254\u0300t\u0197\u0300f\u0289\u0300gh\u00e0dzugh\u00f9",
- "ndz\u0254\u0300\u014b\u0254\u0300gh\u01d4uwel\u0254\u0300m",
- "ndz\u0254\u0300\u014b\u0254\u0300chwa\u0294\u00e0kaa wo",
- "ndz\u0254\u0300\u014b\u00e8fw\u00f2o"
- ],
- "SHORTDAY": [
- "nts",
- "kpa",
- "gh\u0254",
- "t\u0254m",
- "ume",
- "gh\u0268",
- "dzk"
- ],
- "SHORTMONTH": [
- "n\u00f9m",
- "k\u0268z",
- "t\u0268d",
- "taa",
- "see",
- "nzu",
- "dum",
- "f\u0254e",
- "dzu",
- "l\u0254m",
- "kaa",
- "fwo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "agq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak-gh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak-gh.js
deleted file mode 100644
index 8407b96f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak-gh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AN",
- "EW"
- ],
- "DAY": [
- "Kwesida",
- "Dwowda",
- "Benada",
- "Wukuda",
- "Yawda",
- "Fida",
- "Memeneda"
- ],
- "ERANAMES": [
- "Ansa Kristo",
- "Kristo Ekyiri"
- ],
- "ERAS": [
- "AK",
- "KE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Sanda-\u0186p\u025bp\u0254n",
- "Kwakwar-\u0186gyefuo",
- "Eb\u0254w-\u0186benem",
- "Eb\u0254bira-Oforisuo",
- "Esusow Aketseaba-K\u0254t\u0254nimba",
- "Obirade-Ay\u025bwohomumu",
- "Ay\u025bwoho-Kitawonsa",
- "Difuu-\u0186sandaa",
- "Fankwa-\u0190b\u0254",
- "\u0186b\u025bs\u025b-Ahinime",
- "\u0186ber\u025bf\u025bw-Obubuo",
- "Mumu-\u0186p\u025bnimba"
- ],
- "SHORTDAY": [
- "Kwe",
- "Dwo",
- "Ben",
- "Wuk",
- "Yaw",
- "Fia",
- "Mem"
- ],
- "SHORTMONTH": [
- "S-\u0186",
- "K-\u0186",
- "E-\u0186",
- "E-O",
- "E-K",
- "O-A",
- "A-K",
- "D-\u0186",
- "F-\u0190",
- "\u0186-A",
- "\u0186-O",
- "M-\u0186"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GHS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ak-gh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak.js
deleted file mode 100644
index 9117b354..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ak.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AN",
- "EW"
- ],
- "DAY": [
- "Kwesida",
- "Dwowda",
- "Benada",
- "Wukuda",
- "Yawda",
- "Fida",
- "Memeneda"
- ],
- "ERANAMES": [
- "Ansa Kristo",
- "Kristo Ekyiri"
- ],
- "ERAS": [
- "AK",
- "KE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Sanda-\u0186p\u025bp\u0254n",
- "Kwakwar-\u0186gyefuo",
- "Eb\u0254w-\u0186benem",
- "Eb\u0254bira-Oforisuo",
- "Esusow Aketseaba-K\u0254t\u0254nimba",
- "Obirade-Ay\u025bwohomumu",
- "Ay\u025bwoho-Kitawonsa",
- "Difuu-\u0186sandaa",
- "Fankwa-\u0190b\u0254",
- "\u0186b\u025bs\u025b-Ahinime",
- "\u0186ber\u025bf\u025bw-Obubuo",
- "Mumu-\u0186p\u025bnimba"
- ],
- "SHORTDAY": [
- "Kwe",
- "Dwo",
- "Ben",
- "Wuk",
- "Yaw",
- "Fia",
- "Mem"
- ],
- "SHORTMONTH": [
- "S-\u0186",
- "K-\u0186",
- "E-\u0186",
- "E-O",
- "E-K",
- "O-A",
- "A-K",
- "D-\u0186",
- "F-\u0190",
- "\u0186-A",
- "\u0186-O",
- "M-\u0186"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GHS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ak",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am-et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am-et.js
deleted file mode 100644
index 77b38ff8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am-et.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1325\u12cb\u1275",
- "\u12a8\u1230\u12d3\u1275"
- ],
- "DAY": [
- "\u12a5\u1211\u12f5",
- "\u1230\u129e",
- "\u121b\u12ad\u1230\u129e",
- "\u1228\u1261\u12d5",
- "\u1210\u1219\u1235",
- "\u12d3\u122d\u1265",
- "\u1245\u12f3\u121c"
- ],
- "ERANAMES": [
- "\u12d3\u1218\u1270 \u12d3\u1208\u121d",
- "\u12d3\u1218\u1270 \u121d\u1215\u1228\u1275"
- ],
- "ERAS": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u122a\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1276\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u12a5\u1211\u12f5",
- "\u1230\u129e",
- "\u121b\u12ad\u1230",
- "\u1228\u1261\u12d5",
- "\u1210\u1219\u1235",
- "\u12d3\u122d\u1265",
- "\u1245\u12f3\u121c"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u122a",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1276",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "am-et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am.js
deleted file mode 100644
index 03146492..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_am.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1325\u12cb\u1275",
- "\u12a8\u1230\u12d3\u1275"
- ],
- "DAY": [
- "\u12a5\u1211\u12f5",
- "\u1230\u129e",
- "\u121b\u12ad\u1230\u129e",
- "\u1228\u1261\u12d5",
- "\u1210\u1219\u1235",
- "\u12d3\u122d\u1265",
- "\u1245\u12f3\u121c"
- ],
- "ERANAMES": [
- "\u12d3\u1218\u1270 \u12d3\u1208\u121d",
- "\u12d3\u1218\u1270 \u121d\u1215\u1228\u1275"
- ],
- "ERAS": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u122a\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1276\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u12a5\u1211\u12f5",
- "\u1230\u129e",
- "\u121b\u12ad\u1230",
- "\u1228\u1261\u12d5",
- "\u1210\u1219\u1235",
- "\u12d3\u122d\u1265",
- "\u1245\u12f3\u121c"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u122a",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1276",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "am",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-001.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-001.js
deleted file mode 100644
index a9a7875a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-001.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-001",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ae.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ae.js
deleted file mode 100644
index 6b335da1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ae.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-ae",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-bh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-bh.js
deleted file mode 100644
index 361f8ab9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-bh.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-bh",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dj.js
deleted file mode 100644
index d44bbce0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dj.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Fdj",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-dj",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dz.js
deleted file mode 100644
index 871d2ce4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-dz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u062c\u0627\u0646\u0641\u064a",
- "\u0641\u064a\u0641\u0631\u064a",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0641\u0631\u064a\u0644",
- "\u0645\u0627\u064a",
- "\u062c\u0648\u0627\u0646",
- "\u062c\u0648\u064a\u0644\u064a\u0629",
- "\u0623\u0648\u062a",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u062c\u0627\u0646\u0641\u064a",
- "\u0641\u064a\u0641\u0631\u064a",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0641\u0631\u064a\u0644",
- "\u0645\u0627\u064a",
- "\u062c\u0648\u0627\u0646",
- "\u062c\u0648\u064a\u0644\u064a\u0629",
- "\u0623\u0648\u062a",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-dz",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eg.js
deleted file mode 100644
index 734c629a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-eg",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eh.js
deleted file mode 100644
index f9c2666a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-eh.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-eh",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-er.js
deleted file mode 100644
index 0510d70b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-er.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-er",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-il.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-il.js
deleted file mode 100644
index ea6e8932..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-il.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20aa",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-il",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-iq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-iq.js
deleted file mode 100644
index 9f08ac2f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-iq.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-iq",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-jo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-jo.js
deleted file mode 100644
index 793b3534..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-jo.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-jo",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-km.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-km.js
deleted file mode 100644
index 6f9031de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-km.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CF",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-km",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-kw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-kw.js
deleted file mode 100644
index b0b55a7b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-kw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-kw",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-lb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-lb.js
deleted file mode 100644
index b2eb263a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-lb.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "L\u00a3",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-lb",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ly.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ly.js
deleted file mode 100644
index 0a9dbf62..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ly.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-ly",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ma.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ma.js
deleted file mode 100644
index 589e258a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ma.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648\u0632",
- "\u063a\u0634\u062a",
- "\u0634\u062a\u0646\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0646\u0628\u0631",
- "\u062f\u062c\u0646\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648\u0632",
- "\u063a\u0634\u062a",
- "\u0634\u062a\u0646\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0646\u0628\u0631",
- "\u062f\u062c\u0646\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-ma",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-mr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-mr.js
deleted file mode 100644
index 6fbc49a5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-mr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0625\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0634\u062a",
- "\u0634\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u062c\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0625\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0634\u062a",
- "\u0634\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u062c\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MRO",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-mr",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-om.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-om.js
deleted file mode 100644
index b12fc576..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-om.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-om",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ps.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ps.js
deleted file mode 100644
index 0e5a8aec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ps.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20aa",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-ps",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-qa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-qa.js
deleted file mode 100644
index 0007850d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-qa.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-qa",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sa.js
deleted file mode 100644
index dcaa4a68..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sa.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-sa",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sd.js
deleted file mode 100644
index 769ce9bf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sd.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SDG",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-sd",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-so.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-so.js
deleted file mode 100644
index 4aea4a8e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-so.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SOS",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-so",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ss.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ss.js
deleted file mode 100644
index 23338b3f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ss.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-ss",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sy.js
deleted file mode 100644
index 80f4b5ee..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-sy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0634\u0628\u0627\u0637",
- "\u0622\u0630\u0627\u0631",
- "\u0646\u064a\u0633\u0627\u0646",
- "\u0623\u064a\u0627\u0631",
- "\u062d\u0632\u064a\u0631\u0627\u0646",
- "\u062a\u0645\u0648\u0632",
- "\u0622\u0628",
- "\u0623\u064a\u0644\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u0623\u0648\u0644",
- "\u062a\u0634\u0631\u064a\u0646 \u0627\u0644\u062b\u0627\u0646\u064a",
- "\u0643\u0627\u0646\u0648\u0646 \u0627\u0644\u0623\u0648\u0644"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-sy",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-td.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-td.js
deleted file mode 100644
index 408e9393..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-td.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-td",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-tn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-tn.js
deleted file mode 100644
index 2784ed5f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-tn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0627\u0646\u0641\u064a",
- "\u0641\u064a\u0641\u0631\u064a",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0641\u0631\u064a\u0644",
- "\u0645\u0627\u064a",
- "\u062c\u0648\u0627\u0646",
- "\u062c\u0648\u064a\u0644\u064a\u0629",
- "\u0623\u0648\u062a",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u062c\u0627\u0646\u0641\u064a",
- "\u0641\u064a\u0641\u0631\u064a",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0641\u0631\u064a\u0644",
- "\u0645\u0627\u064a",
- "\u062c\u0648\u0627\u0646",
- "\u062c\u0648\u064a\u0644\u064a\u0629",
- "\u0623\u0648\u062a",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-tn",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ye.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ye.js
deleted file mode 100644
index 700b4aef..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar-ye.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar-ye",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar.js
deleted file mode 100644
index dd58093d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ar.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0635",
- "\u0645"
- ],
- "DAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f",
- "\u0645\u064a\u0644\u0627\u062f\u064a"
- ],
- "ERAS": [
- "\u0642.\u0645",
- "\u0645"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u0644\u0623\u062d\u062f",
- "\u0627\u0644\u0627\u062b\u0646\u064a\u0646",
- "\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621",
- "\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621",
- "\u0627\u0644\u062e\u0645\u064a\u0633",
- "\u0627\u0644\u062c\u0645\u0639\u0629",
- "\u0627\u0644\u0633\u0628\u062a"
- ],
- "SHORTMONTH": [
- "\u064a\u0646\u0627\u064a\u0631",
- "\u0641\u0628\u0631\u0627\u064a\u0631",
- "\u0645\u0627\u0631\u0633",
- "\u0623\u0628\u0631\u064a\u0644",
- "\u0645\u0627\u064a\u0648",
- "\u064a\u0648\u0646\u064a\u0648",
- "\u064a\u0648\u0644\u064a\u0648",
- "\u0623\u063a\u0633\u0637\u0633",
- "\u0633\u0628\u062a\u0645\u0628\u0631",
- "\u0623\u0643\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0641\u0645\u0628\u0631",
- "\u062f\u064a\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "dd\u200f/MM\u200f/y h:mm:ss a",
- "mediumDate": "dd\u200f/MM\u200f/y",
- "mediumTime": "h:mm:ss a",
- "short": "d\u200f/M\u200f/y h:mm a",
- "shortDate": "d\u200f/M\u200f/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ar",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n % 100 >= 3 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 99) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as-in.js
deleted file mode 100644
index 27f59242..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u09aa\u09c2\u09f0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3",
- "\u0985\u09aa\u09f0\u09be\u09b9\u09cd\u09a3"
- ],
- "DAY": [
- "\u09a6\u09c7\u0993\u09ac\u09be\u09f0",
- "\u09b8\u09cb\u09ae\u09ac\u09be\u09f0",
- "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09f0",
- "\u09ac\u09c1\u09a7\u09ac\u09be\u09f0",
- "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09f0",
- "\u09b6\u09c1\u0995\u09cd\u09f0\u09ac\u09be\u09f0",
- "\u09b6\u09a8\u09bf\u09ac\u09be\u09f0"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u099c\u09be\u09a8\u09c1\u09f1\u09be\u09f0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1\u09f1\u09be\u09f0\u09c0",
- "\u09ae\u09be\u09f0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b7\u09cd\u099f",
- "\u099b\u09c7\u09aa\u09cd\u09a4\u09c7\u09ae\u09cd\u09ac\u09f0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09f0",
- "\u09a8\u09f1\u09c7\u09ae\u09cd\u09ac\u09f0",
- "\u09a1\u09bf\u099a\u09c7\u09ae\u09cd\u09ac\u09f0"
- ],
- "SHORTDAY": [
- "\u09f0\u09ac\u09bf",
- "\u09b8\u09cb\u09ae",
- "\u09ae\u0999\u09cd\u0997\u09b2",
- "\u09ac\u09c1\u09a7",
- "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf",
- "\u09b6\u09c1\u0995\u09cd\u09f0",
- "\u09b6\u09a8\u09bf"
- ],
- "SHORTMONTH": [
- "\u099c\u09be\u09a8\u09c1",
- "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1",
- "\u09ae\u09be\u09f0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997",
- "\u09b8\u09c7\u09aa\u09cd\u099f",
- "\u0985\u0995\u09cd\u099f\u09cb",
- "\u09a8\u09ad\u09c7",
- "\u09a1\u09bf\u09b8\u09c7"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "dd-MM-y h.mm.ss a",
- "mediumDate": "dd-MM-y",
- "mediumTime": "h.mm.ss a",
- "short": "d-M-y h.mm. a",
- "shortDate": "d-M-y",
- "shortTime": "h.mm. a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "as-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as.js
deleted file mode 100644
index 5172d54c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_as.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u09aa\u09c2\u09f0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3",
- "\u0985\u09aa\u09f0\u09be\u09b9\u09cd\u09a3"
- ],
- "DAY": [
- "\u09a6\u09c7\u0993\u09ac\u09be\u09f0",
- "\u09b8\u09cb\u09ae\u09ac\u09be\u09f0",
- "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09f0",
- "\u09ac\u09c1\u09a7\u09ac\u09be\u09f0",
- "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09f0",
- "\u09b6\u09c1\u0995\u09cd\u09f0\u09ac\u09be\u09f0",
- "\u09b6\u09a8\u09bf\u09ac\u09be\u09f0"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u099c\u09be\u09a8\u09c1\u09f1\u09be\u09f0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1\u09f1\u09be\u09f0\u09c0",
- "\u09ae\u09be\u09f0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b7\u09cd\u099f",
- "\u099b\u09c7\u09aa\u09cd\u09a4\u09c7\u09ae\u09cd\u09ac\u09f0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09f0",
- "\u09a8\u09f1\u09c7\u09ae\u09cd\u09ac\u09f0",
- "\u09a1\u09bf\u099a\u09c7\u09ae\u09cd\u09ac\u09f0"
- ],
- "SHORTDAY": [
- "\u09f0\u09ac\u09bf",
- "\u09b8\u09cb\u09ae",
- "\u09ae\u0999\u09cd\u0997\u09b2",
- "\u09ac\u09c1\u09a7",
- "\u09ac\u09c3\u09b9\u09b7\u09cd\u09aa\u09a4\u09bf",
- "\u09b6\u09c1\u0995\u09cd\u09f0",
- "\u09b6\u09a8\u09bf"
- ],
- "SHORTMONTH": [
- "\u099c\u09be\u09a8\u09c1",
- "\u09ab\u09c7\u09ac\u09cd\u09f0\u09c1",
- "\u09ae\u09be\u09f0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09f0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997",
- "\u09b8\u09c7\u09aa\u09cd\u099f",
- "\u0985\u0995\u09cd\u099f\u09cb",
- "\u09a8\u09ad\u09c7",
- "\u09a1\u09bf\u09b8\u09c7"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "dd-MM-y h.mm.ss a",
- "mediumDate": "dd-MM-y",
- "mediumTime": "h.mm.ss a",
- "short": "d-M-y h.mm. a",
- "shortDate": "d-M-y",
- "shortTime": "h.mm. a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "as",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa-tz.js
deleted file mode 100644
index 5add04ff..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "icheheavo",
- "ichamthi"
- ],
- "DAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla yakwe Yethu",
- "Baada yakwe Yethu"
- ],
- "ERAS": [
- "KM",
- "BM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Ijm",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "asa-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa.js
deleted file mode 100644
index 05e1f0bc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_asa.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "icheheavo",
- "ichamthi"
- ],
- "DAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla yakwe Yethu",
- "Baada yakwe Yethu"
- ],
- "ERAS": [
- "KM",
- "BM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Ijm",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "asa",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast-es.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast-es.js
deleted file mode 100644
index af513b1a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast-es.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domingu",
- "llunes",
- "martes",
- "mi\u00e9rcoles",
- "xueves",
- "vienres",
- "s\u00e1badu"
- ],
- "ERANAMES": [
- "a.C.",
- "d.C."
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de xineru",
- "de febreru",
- "de marzu",
- "d\u2019abril",
- "de mayu",
- "de xunu",
- "de xunetu",
- "d\u2019agostu",
- "de setiembre",
- "d\u2019ochobre",
- "de payares",
- "d\u2019avientu"
- ],
- "SHORTDAY": [
- "dom",
- "llu",
- "mar",
- "mie",
- "xue",
- "vie",
- "sab"
- ],
- "SHORTMONTH": [
- "xin",
- "feb",
- "mar",
- "abr",
- "may",
- "xun",
- "xnt",
- "ago",
- "set",
- "och",
- "pay",
- "avi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ast-es",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast.js
deleted file mode 100644
index 2fc061ee..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ast.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domingu",
- "llunes",
- "martes",
- "mi\u00e9rcoles",
- "xueves",
- "vienres",
- "s\u00e1badu"
- ],
- "ERANAMES": [
- "a.C.",
- "d.C."
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de xineru",
- "de febreru",
- "de marzu",
- "d\u2019abril",
- "de mayu",
- "de xunu",
- "de xunetu",
- "d\u2019agostu",
- "de setiembre",
- "d\u2019ochobre",
- "de payares",
- "d\u2019avientu"
- ],
- "SHORTDAY": [
- "dom",
- "llu",
- "mar",
- "mie",
- "xue",
- "vie",
- "sab"
- ],
- "SHORTMONTH": [
- "xin",
- "feb",
- "mar",
- "abr",
- "may",
- "xun",
- "xnt",
- "ago",
- "set",
- "och",
- "pay",
- "avi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ast",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl-az.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl-az.js
deleted file mode 100644
index 1b9a6ad9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl-az.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0431\u0430\u0437\u0430\u0440",
- "\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9",
- "\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u04b9\u04af\u043c\u04d9",
- "\u0448\u04d9\u043d\u0431\u04d9"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0432\u0430\u0440",
- "\u0444\u0435\u0432\u0440\u0430\u043b",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b",
- "\u043c\u0430\u0439",
- "\u0438\u0458\u0443\u043d",
- "\u0438\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440",
- "\u043e\u043a\u0442\u0458\u0430\u0431\u0440",
- "\u043d\u043e\u0458\u0430\u0431\u0440",
- "\u0434\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u0431\u0430\u0437\u0430\u0440",
- "\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9",
- "\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u04b9\u04af\u043c\u04d9",
- "\u0448\u04d9\u043d\u0431\u04d9"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d\u0432\u0430\u0440",
- "\u0444\u0435\u0432\u0440\u0430\u043b",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b",
- "\u043c\u0430\u0439",
- "\u0438\u0458\u0443\u043d",
- "\u0438\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440",
- "\u043e\u043a\u0442\u0458\u0430\u0431\u0440",
- "\u043d\u043e\u0458\u0430\u0431\u0440",
- "\u0434\u0435\u043a\u0430\u0431\u0440"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d, MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "man.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "az-cyrl-az",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl.js
deleted file mode 100644
index d9f52819..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-cyrl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0431\u0430\u0437\u0430\u0440",
- "\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9",
- "\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u04b9\u04af\u043c\u04d9",
- "\u0448\u04d9\u043d\u0431\u04d9"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0432\u0430\u0440",
- "\u0444\u0435\u0432\u0440\u0430\u043b",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b",
- "\u043c\u0430\u0439",
- "\u0438\u0458\u0443\u043d",
- "\u0438\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440",
- "\u043e\u043a\u0442\u0458\u0430\u0431\u0440",
- "\u043d\u043e\u0458\u0430\u0431\u0440",
- "\u0434\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u0431\u0430\u0437\u0430\u0440",
- "\u0431\u0430\u0437\u0430\u0440 \u0435\u0440\u0442\u04d9\u0441\u0438",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u0447\u04d9\u0440\u0448\u04d9\u043d\u0431\u04d9",
- "\u04b9\u04af\u043c\u04d9 \u0430\u0445\u0448\u0430\u043c\u044b",
- "\u04b9\u04af\u043c\u04d9",
- "\u0448\u04d9\u043d\u0431\u04d9"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d\u0432\u0430\u0440",
- "\u0444\u0435\u0432\u0440\u0430\u043b",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b",
- "\u043c\u0430\u0439",
- "\u0438\u0458\u0443\u043d",
- "\u0438\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u0458\u0430\u0431\u0440",
- "\u043e\u043a\u0442\u0458\u0430\u0431\u0440",
- "\u043d\u043e\u0458\u0430\u0431\u0440",
- "\u0434\u0435\u043a\u0430\u0431\u0440"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d, MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "man.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "az-cyrl",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn-az.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn-az.js
deleted file mode 100644
index 72ff9e80..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn-az.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "bazar",
- "bazar ert\u0259si",
- "\u00e7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131",
- "\u00e7\u0259r\u015f\u0259nb\u0259",
- "c\u00fcm\u0259 ax\u015fam\u0131",
- "c\u00fcm\u0259",
- "\u015f\u0259nb\u0259"
- ],
- "ERANAMES": [
- "eram\u0131zdan \u0259vv\u0259l",
- "bizim eram\u0131z\u0131n"
- ],
- "ERAS": [
- "e.\u0259.",
- "b.e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "yanvar",
- "fevral",
- "mart",
- "aprel",
- "may",
- "iyun",
- "iyul",
- "avqust",
- "sentyabr",
- "oktyabr",
- "noyabr",
- "dekabr"
- ],
- "SHORTDAY": [
- "B.",
- "B.E.",
- "\u00c7.A.",
- "\u00c7.",
- "C.A.",
- "C.",
- "\u015e."
- ],
- "SHORTMONTH": [
- "yan",
- "fev",
- "mar",
- "apr",
- "may",
- "iyn",
- "iyl",
- "avq",
- "sen",
- "okt",
- "noy",
- "dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "d MMMM y, EEEE",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "man.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "az-latn-az",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn.js
deleted file mode 100644
index c01135c8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az-latn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "bazar",
- "bazar ert\u0259si",
- "\u00e7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131",
- "\u00e7\u0259r\u015f\u0259nb\u0259",
- "c\u00fcm\u0259 ax\u015fam\u0131",
- "c\u00fcm\u0259",
- "\u015f\u0259nb\u0259"
- ],
- "ERANAMES": [
- "eram\u0131zdan \u0259vv\u0259l",
- "bizim eram\u0131z\u0131n"
- ],
- "ERAS": [
- "e.\u0259.",
- "b.e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "yanvar",
- "fevral",
- "mart",
- "aprel",
- "may",
- "iyun",
- "iyul",
- "avqust",
- "sentyabr",
- "oktyabr",
- "noyabr",
- "dekabr"
- ],
- "SHORTDAY": [
- "B.",
- "B.E.",
- "\u00c7.A.",
- "\u00c7.",
- "C.A.",
- "C.",
- "\u015e."
- ],
- "SHORTMONTH": [
- "yan",
- "fev",
- "mar",
- "apr",
- "may",
- "iyn",
- "iyl",
- "avq",
- "sen",
- "okt",
- "noy",
- "dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "d MMMM y, EEEE",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "man.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "az-latn",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az.js
deleted file mode 100644
index df1dd9e4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_az.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "bazar",
- "bazar ert\u0259si",
- "\u00e7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131",
- "\u00e7\u0259r\u015f\u0259nb\u0259",
- "c\u00fcm\u0259 ax\u015fam\u0131",
- "c\u00fcm\u0259",
- "\u015f\u0259nb\u0259"
- ],
- "ERANAMES": [
- "eram\u0131zdan \u0259vv\u0259l",
- "bizim eram\u0131z\u0131n"
- ],
- "ERAS": [
- "e.\u0259.",
- "b.e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "yanvar",
- "fevral",
- "mart",
- "aprel",
- "may",
- "iyun",
- "iyul",
- "avqust",
- "sentyabr",
- "oktyabr",
- "noyabr",
- "dekabr"
- ],
- "SHORTDAY": [
- "B.",
- "B.E.",
- "\u00c7.A.",
- "\u00c7.",
- "C.A.",
- "C.",
- "\u015e."
- ],
- "SHORTMONTH": [
- "yan",
- "fev",
- "mar",
- "apr",
- "may",
- "iyn",
- "iyl",
- "avq",
- "sen",
- "okt",
- "noy",
- "dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "d MMMM y, EEEE",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "man.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "az",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas-cm.js
deleted file mode 100644
index ccc7ea07..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "I bik\u025b\u0302gl\u00e0",
- "I \u0253ugaj\u0254p"
- ],
- "DAY": [
- "\u014bgw\u00e0 n\u0254\u0302y",
- "\u014bgw\u00e0 nja\u014bgumba",
- "\u014bgw\u00e0 \u00fbm",
- "\u014bgw\u00e0 \u014bg\u00ea",
- "\u014bgw\u00e0 mb\u0254k",
- "\u014bgw\u00e0 k\u0254\u0254",
- "\u014bgw\u00e0 j\u00f4n"
- ],
- "ERANAMES": [
- "bis\u016b bi Yes\u00f9 Kr\u01d0st\u00f2",
- "i mb\u016bs Yes\u00f9 Kr\u01d0st\u00f2"
- ],
- "ERAS": [
- "b.Y.K",
- "m.Y.K"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "K\u0254nd\u0254\u014b",
- "M\u00e0c\u025b\u0302l",
- "M\u00e0t\u00f9mb",
- "M\u00e0top",
- "M\u0300puy\u025b",
- "H\u00ecl\u00f2nd\u025b\u0300",
- "Nj\u00e8b\u00e0",
- "H\u00ecka\u014b",
- "D\u00ecp\u0254\u0300s",
- "B\u00ec\u00f2\u00f4m",
- "M\u00e0y\u025bs\u00e8p",
- "L\u00ecbuy li \u0144y\u00e8e"
- ],
- "SHORTDAY": [
- "n\u0254y",
- "nja",
- "uum",
- "\u014bge",
- "mb\u0254",
- "k\u0254\u0254",
- "jon"
- ],
- "SHORTMONTH": [
- "k\u0254n",
- "mac",
- "mat",
- "mto",
- "mpu",
- "hil",
- "nje",
- "hik",
- "dip",
- "bio",
- "may",
- "li\u0253"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bas-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas.js
deleted file mode 100644
index e32cc420..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bas.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "I bik\u025b\u0302gl\u00e0",
- "I \u0253ugaj\u0254p"
- ],
- "DAY": [
- "\u014bgw\u00e0 n\u0254\u0302y",
- "\u014bgw\u00e0 nja\u014bgumba",
- "\u014bgw\u00e0 \u00fbm",
- "\u014bgw\u00e0 \u014bg\u00ea",
- "\u014bgw\u00e0 mb\u0254k",
- "\u014bgw\u00e0 k\u0254\u0254",
- "\u014bgw\u00e0 j\u00f4n"
- ],
- "ERANAMES": [
- "bis\u016b bi Yes\u00f9 Kr\u01d0st\u00f2",
- "i mb\u016bs Yes\u00f9 Kr\u01d0st\u00f2"
- ],
- "ERAS": [
- "b.Y.K",
- "m.Y.K"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "K\u0254nd\u0254\u014b",
- "M\u00e0c\u025b\u0302l",
- "M\u00e0t\u00f9mb",
- "M\u00e0top",
- "M\u0300puy\u025b",
- "H\u00ecl\u00f2nd\u025b\u0300",
- "Nj\u00e8b\u00e0",
- "H\u00ecka\u014b",
- "D\u00ecp\u0254\u0300s",
- "B\u00ec\u00f2\u00f4m",
- "M\u00e0y\u025bs\u00e8p",
- "L\u00ecbuy li \u0144y\u00e8e"
- ],
- "SHORTDAY": [
- "n\u0254y",
- "nja",
- "uum",
- "\u014bge",
- "mb\u0254",
- "k\u0254\u0254",
- "jon"
- ],
- "SHORTMONTH": [
- "k\u0254n",
- "mac",
- "mat",
- "mto",
- "mpu",
- "hil",
- "nje",
- "hik",
- "dip",
- "bio",
- "may",
- "li\u0253"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bas",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be-by.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be-by.js
deleted file mode 100644
index 87fb319b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be-by.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0434\u0430 \u043f\u0430\u043b\u0443\u0434\u043d\u044f",
- "\u043f\u0430\u0441\u043b\u044f \u043f\u0430\u043b\u0443\u0434\u043d\u044f"
- ],
- "DAY": [
- "\u043d\u044f\u0434\u0437\u0435\u043b\u044f",
- "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a",
- "\u0430\u045e\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0435\u0440\u0430\u0434\u0430",
- "\u0447\u0430\u0446\u0432\u0435\u0440",
- "\u043f\u044f\u0442\u043d\u0456\u0446\u0430",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u0430 \u043d.\u044d.",
- "\u043d.\u044d."
- ],
- "ERAS": [
- "\u0434\u0430 \u043d.\u044d.",
- "\u043d.\u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f",
- "\u043b\u044e\u0442\u0430\u0433\u0430",
- "\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430",
- "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430",
- "\u043c\u0430\u044f",
- "\u0447\u044d\u0440\u0432\u0435\u043d\u044f",
- "\u043b\u0456\u043f\u0435\u043d\u044f",
- "\u0436\u043d\u0456\u045e\u043d\u044f",
- "\u0432\u0435\u0440\u0430\u0441\u043d\u044f",
- "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430",
- "\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430",
- "\u0441\u043d\u0435\u0436\u043d\u044f"
- ],
- "SHORTDAY": [
- "\u043d\u0434",
- "\u043f\u043d",
- "\u0430\u045e",
- "\u0441\u0440",
- "\u0447\u0446",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u0441\u0442\u0443",
- "\u043b\u044e\u0442",
- "\u0441\u0430\u043a",
- "\u043a\u0440\u0430",
- "\u043c\u0430\u044f",
- "\u0447\u044d\u0440",
- "\u043b\u0456\u043f",
- "\u0436\u043d\u0456",
- "\u0432\u0435\u0440",
- "\u043a\u0430\u0441",
- "\u043b\u0456\u0441",
- "\u0441\u043d\u0435"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d.M.y HH.mm.ss",
- "mediumDate": "d.M.y",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy HH.mm",
- "shortDate": "d.M.yy",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "BYR",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "be-by",
- "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (n % 10 == 0 || n % 10 >= 5 && n % 10 <= 9 || n % 100 >= 11 && n % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be.js
deleted file mode 100644
index 8baa3ced..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_be.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0434\u0430 \u043f\u0430\u043b\u0443\u0434\u043d\u044f",
- "\u043f\u0430\u0441\u043b\u044f \u043f\u0430\u043b\u0443\u0434\u043d\u044f"
- ],
- "DAY": [
- "\u043d\u044f\u0434\u0437\u0435\u043b\u044f",
- "\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a",
- "\u0430\u045e\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0435\u0440\u0430\u0434\u0430",
- "\u0447\u0430\u0446\u0432\u0435\u0440",
- "\u043f\u044f\u0442\u043d\u0456\u0446\u0430",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u0430 \u043d.\u044d.",
- "\u043d.\u044d."
- ],
- "ERAS": [
- "\u0434\u0430 \u043d.\u044d.",
- "\u043d.\u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f",
- "\u043b\u044e\u0442\u0430\u0433\u0430",
- "\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430",
- "\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430",
- "\u043c\u0430\u044f",
- "\u0447\u044d\u0440\u0432\u0435\u043d\u044f",
- "\u043b\u0456\u043f\u0435\u043d\u044f",
- "\u0436\u043d\u0456\u045e\u043d\u044f",
- "\u0432\u0435\u0440\u0430\u0441\u043d\u044f",
- "\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430",
- "\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430",
- "\u0441\u043d\u0435\u0436\u043d\u044f"
- ],
- "SHORTDAY": [
- "\u043d\u0434",
- "\u043f\u043d",
- "\u0430\u045e",
- "\u0441\u0440",
- "\u0447\u0446",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u0441\u0442\u0443",
- "\u043b\u044e\u0442",
- "\u0441\u0430\u043a",
- "\u043a\u0440\u0430",
- "\u043c\u0430\u044f",
- "\u0447\u044d\u0440",
- "\u043b\u0456\u043f",
- "\u0436\u043d\u0456",
- "\u0432\u0435\u0440",
- "\u043a\u0430\u0441",
- "\u043b\u0456\u0441",
- "\u0441\u043d\u0435"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d.M.y HH.mm.ss",
- "mediumDate": "d.M.y",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy HH.mm",
- "shortDate": "d.M.yy",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "BYR",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "be",
- "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (n % 10 == 0 || n % 10 >= 5 && n % 10 <= 9 || n % 100 >= 11 && n % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem-zm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem-zm.js
deleted file mode 100644
index 307347a8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem-zm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "uluchelo",
- "akasuba"
- ],
- "DAY": [
- "Pa Mulungu",
- "Palichimo",
- "Palichibuli",
- "Palichitatu",
- "Palichine",
- "Palichisano",
- "Pachibelushi"
- ],
- "ERANAMES": [
- "Before Yesu",
- "After Yesu"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Epreo",
- "Mei",
- "Juni",
- "Julai",
- "Ogasti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Pa Mulungu",
- "Palichimo",
- "Palichibuli",
- "Palichitatu",
- "Palichine",
- "Palichisano",
- "Pachibelushi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Epr",
- "Mei",
- "Jun",
- "Jul",
- "Oga",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "ZMW",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "bem-zm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem.js
deleted file mode 100644
index 99778938..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bem.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "uluchelo",
- "akasuba"
- ],
- "DAY": [
- "Pa Mulungu",
- "Palichimo",
- "Palichibuli",
- "Palichitatu",
- "Palichine",
- "Palichisano",
- "Pachibelushi"
- ],
- "ERANAMES": [
- "Before Yesu",
- "After Yesu"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Epreo",
- "Mei",
- "Juni",
- "Julai",
- "Ogasti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Pa Mulungu",
- "Palichimo",
- "Palichibuli",
- "Palichitatu",
- "Palichine",
- "Palichisano",
- "Pachibelushi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Epr",
- "Mei",
- "Jun",
- "Jul",
- "Oga",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "ZMW",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "bem",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez-tz.js
deleted file mode 100644
index d8d80a1b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pamilau",
- "pamunyi"
- ],
- "DAY": [
- "pa mulungu",
- "pa shahuviluha",
- "pa hivili",
- "pa hidatu",
- "pa hitayi",
- "pa hihanu",
- "pa shahulembela"
- ],
- "ERANAMES": [
- "Kabla ya Mtwaa",
- "Baada ya Mtwaa"
- ],
- "ERAS": [
- "KM",
- "BM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "pa mwedzi gwa hutala",
- "pa mwedzi gwa wuvili",
- "pa mwedzi gwa wudatu",
- "pa mwedzi gwa wutai",
- "pa mwedzi gwa wuhanu",
- "pa mwedzi gwa sita",
- "pa mwedzi gwa saba",
- "pa mwedzi gwa nane",
- "pa mwedzi gwa tisa",
- "pa mwedzi gwa kumi",
- "pa mwedzi gwa kumi na moja",
- "pa mwedzi gwa kumi na mbili"
- ],
- "SHORTDAY": [
- "Mul",
- "Vil",
- "Hiv",
- "Hid",
- "Hit",
- "Hih",
- "Lem"
- ],
- "SHORTMONTH": [
- "Hut",
- "Vil",
- "Dat",
- "Tai",
- "Han",
- "Sit",
- "Sab",
- "Nan",
- "Tis",
- "Kum",
- "Kmj",
- "Kmb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "bez-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez.js
deleted file mode 100644
index a240ee9b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bez.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pamilau",
- "pamunyi"
- ],
- "DAY": [
- "pa mulungu",
- "pa shahuviluha",
- "pa hivili",
- "pa hidatu",
- "pa hitayi",
- "pa hihanu",
- "pa shahulembela"
- ],
- "ERANAMES": [
- "Kabla ya Mtwaa",
- "Baada ya Mtwaa"
- ],
- "ERAS": [
- "KM",
- "BM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "pa mwedzi gwa hutala",
- "pa mwedzi gwa wuvili",
- "pa mwedzi gwa wudatu",
- "pa mwedzi gwa wutai",
- "pa mwedzi gwa wuhanu",
- "pa mwedzi gwa sita",
- "pa mwedzi gwa saba",
- "pa mwedzi gwa nane",
- "pa mwedzi gwa tisa",
- "pa mwedzi gwa kumi",
- "pa mwedzi gwa kumi na moja",
- "pa mwedzi gwa kumi na mbili"
- ],
- "SHORTDAY": [
- "Mul",
- "Vil",
- "Hiv",
- "Hid",
- "Hit",
- "Hih",
- "Lem"
- ],
- "SHORTMONTH": [
- "Hut",
- "Vil",
- "Dat",
- "Tai",
- "Han",
- "Sit",
- "Sab",
- "Nan",
- "Tis",
- "Kum",
- "Kmj",
- "Kmb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "bez",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg-bg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg-bg.js
deleted file mode 100644
index 984801da..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg-bg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440.\u043e\u0431.",
- "\u0441\u043b.\u043e\u0431."
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u043b\u044f",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u044f\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a",
- "\u043f\u0435\u0442\u044a\u043a",
- "\u0441\u044a\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u043f\u0440\u0435\u0434\u0438 \u0425\u0440\u0438\u0441\u0442\u0430",
- "\u0441\u043b\u0435\u0434 \u0425\u0440\u0438\u0441\u0442\u0430"
- ],
- "ERAS": [
- "\u043f\u0440.\u0425\u0440.",
- "\u0441\u043b.\u0425\u0440."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0443\u0430\u0440\u0438",
- "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0439",
- "\u044e\u043d\u0438",
- "\u044e\u043b\u0438",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438",
- "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438",
- "\u043d\u043e\u0435\u043c\u0432\u0440\u0438",
- "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438"
- ],
- "SHORTDAY": [
- "\u043d\u0434",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0439",
- "\u044e\u043d\u0438",
- "\u044e\u043b\u0438",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043f\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u0435\u043c.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d.MM.y '\u0433'. H:mm:ss",
- "mediumDate": "d.MM.y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "d.MM.yy '\u0433'. H:mm",
- "shortDate": "d.MM.yy '\u0433'.",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "lev",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bg-bg",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg.js
deleted file mode 100644
index 1bfb1328..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440.\u043e\u0431.",
- "\u0441\u043b.\u043e\u0431."
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u043b\u044f",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u044f\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a",
- "\u043f\u0435\u0442\u044a\u043a",
- "\u0441\u044a\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u043f\u0440\u0435\u0434\u0438 \u0425\u0440\u0438\u0441\u0442\u0430",
- "\u0441\u043b\u0435\u0434 \u0425\u0440\u0438\u0441\u0442\u0430"
- ],
- "ERAS": [
- "\u043f\u0440.\u0425\u0440.",
- "\u0441\u043b.\u0425\u0440."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0443\u0430\u0440\u0438",
- "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0439",
- "\u044e\u043d\u0438",
- "\u044e\u043b\u0438",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438",
- "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438",
- "\u043d\u043e\u0435\u043c\u0432\u0440\u0438",
- "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438"
- ],
- "SHORTDAY": [
- "\u043d\u0434",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0439",
- "\u044e\u043d\u0438",
- "\u044e\u043b\u0438",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043f\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u0435\u043c.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d.MM.y '\u0433'. H:mm:ss",
- "mediumDate": "d.MM.y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "d.MM.yy '\u0433'. H:mm",
- "shortDate": "d.MM.yy '\u0433'.",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "lev",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bg",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn-ml.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn-ml.js
deleted file mode 100644
index 6a0b184a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn-ml.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "kari",
- "nt\u025bn\u025b",
- "tarata",
- "araba",
- "alamisa",
- "juma",
- "sibiri"
- ],
- "ERANAMES": [
- "jezu krisiti \u0272\u025b",
- "jezu krisiti mink\u025b"
- ],
- "ERAS": [
- "J.-C. \u0272\u025b",
- "ni J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "zanwuye",
- "feburuye",
- "marisi",
- "awirili",
- "m\u025b",
- "zuw\u025bn",
- "zuluye",
- "uti",
- "s\u025btanburu",
- "\u0254kut\u0254buru",
- "nowanburu",
- "desanburu"
- ],
- "SHORTDAY": [
- "kar",
- "nt\u025b",
- "tar",
- "ara",
- "ala",
- "jum",
- "sib"
- ],
- "SHORTMONTH": [
- "zan",
- "feb",
- "mar",
- "awi",
- "m\u025b",
- "zuw",
- "zul",
- "uti",
- "s\u025bt",
- "\u0254ku",
- "now",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "bm-latn-ml",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn.js
deleted file mode 100644
index 686fcf15..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "kari",
- "nt\u025bn\u025b",
- "tarata",
- "araba",
- "alamisa",
- "juma",
- "sibiri"
- ],
- "ERANAMES": [
- "jezu krisiti \u0272\u025b",
- "jezu krisiti mink\u025b"
- ],
- "ERAS": [
- "J.-C. \u0272\u025b",
- "ni J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "zanwuye",
- "feburuye",
- "marisi",
- "awirili",
- "m\u025b",
- "zuw\u025bn",
- "zuluye",
- "uti",
- "s\u025btanburu",
- "\u0254kut\u0254buru",
- "nowanburu",
- "desanburu"
- ],
- "SHORTDAY": [
- "kar",
- "nt\u025b",
- "tar",
- "ara",
- "ala",
- "jum",
- "sib"
- ],
- "SHORTMONTH": [
- "zan",
- "feb",
- "mar",
- "awi",
- "m\u025b",
- "zuw",
- "zul",
- "uti",
- "s\u025bt",
- "\u0254ku",
- "now",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "bm-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-ml.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-ml.js
deleted file mode 100644
index 1fd18527..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm-ml.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "kari",
- "nt\u025bn\u025b",
- "tarata",
- "araba",
- "alamisa",
- "juma",
- "sibiri"
- ],
- "MONTH": [
- "zanwuye",
- "feburuye",
- "marisi",
- "awirili",
- "m\u025b",
- "zuw\u025bn",
- "zuluye",
- "uti",
- "s\u025btanburu",
- "\u0254kut\u0254buru",
- "nowanburu",
- "desanburu"
- ],
- "SHORTDAY": [
- "kar",
- "nt\u025b",
- "tar",
- "ara",
- "ala",
- "jum",
- "sib"
- ],
- "SHORTMONTH": [
- "zan",
- "feb",
- "mar",
- "awi",
- "m\u025b",
- "zuw",
- "zul",
- "uti",
- "s\u025bt",
- "\u0254ku",
- "now",
- "des"
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "bm-ml",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm.js
deleted file mode 100644
index 30c2cf0b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "kari",
- "nt\u025bn\u025b",
- "tarata",
- "araba",
- "alamisa",
- "juma",
- "sibiri"
- ],
- "ERANAMES": [
- "jezu krisiti \u0272\u025b",
- "jezu krisiti mink\u025b"
- ],
- "ERAS": [
- "J.-C. \u0272\u025b",
- "ni J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "zanwuye",
- "feburuye",
- "marisi",
- "awirili",
- "m\u025b",
- "zuw\u025bn",
- "zuluye",
- "uti",
- "s\u025btanburu",
- "\u0254kut\u0254buru",
- "nowanburu",
- "desanburu"
- ],
- "SHORTDAY": [
- "kar",
- "nt\u025b",
- "tar",
- "ara",
- "ala",
- "jum",
- "sib"
- ],
- "SHORTMONTH": [
- "zan",
- "feb",
- "mar",
- "awi",
- "m\u025b",
- "zuw",
- "zul",
- "uti",
- "s\u025bt",
- "\u0254ku",
- "now",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "bm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-bd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-bd.js
deleted file mode 100644
index 24fb37ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-bd.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0",
- "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0",
- "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0",
- "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0",
- "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0",
- "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0",
- "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0"
- ],
- "ERANAMES": [
- "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac",
- "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6"
- ],
- "ERAS": [
- "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac",
- "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6"
- ],
- "FIRSTDAYOFWEEK": 4,
- "MONTH": [
- "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ae\u09be\u09b0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b8\u09cd\u099f",
- "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0",
- "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"
- ],
- "SHORTDAY": [
- "\u09b0\u09ac\u09bf",
- "\u09b8\u09cb\u09ae",
- "\u09ae\u0999\u09cd\u0997\u09b2",
- "\u09ac\u09c1\u09a7",
- "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf",
- "\u09b6\u09c1\u0995\u09cd\u09b0",
- "\u09b6\u09a8\u09bf"
- ],
- "SHORTMONTH": [
- "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ae\u09be\u09b0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b8\u09cd\u099f",
- "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0",
- "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u09f3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "bn-bd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-in.js
deleted file mode 100644
index 63a3c3e6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0",
- "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0",
- "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0",
- "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0",
- "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0",
- "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0",
- "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0"
- ],
- "ERANAMES": [
- "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac",
- "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6"
- ],
- "ERAS": [
- "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac",
- "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ae\u09be\u09b0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b8\u09cd\u099f",
- "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0",
- "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"
- ],
- "SHORTDAY": [
- "\u09b0\u09ac\u09bf",
- "\u09b8\u09cb\u09ae",
- "\u09ae\u0999\u09cd\u0997\u09b2",
- "\u09ac\u09c1\u09a7",
- "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf",
- "\u09b6\u09c1\u0995\u09cd\u09b0",
- "\u09b6\u09a8\u09bf"
- ],
- "SHORTMONTH": [
- "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ae\u09be\u09b0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b8\u09cd\u099f",
- "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0",
- "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "bn-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn.js
deleted file mode 100644
index 022ce931..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u09b0\u09ac\u09bf\u09ac\u09be\u09b0",
- "\u09b8\u09cb\u09ae\u09ac\u09be\u09b0",
- "\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0",
- "\u09ac\u09c1\u09a7\u09ac\u09be\u09b0",
- "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0",
- "\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0",
- "\u09b6\u09a8\u09bf\u09ac\u09be\u09b0"
- ],
- "ERANAMES": [
- "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac",
- "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6"
- ],
- "ERAS": [
- "\u0996\u09cd\u09b0\u09bf\u09b8\u09cd\u099f\u09aa\u09c2\u09b0\u09cd\u09ac",
- "\u0996\u09c3\u09b7\u09cd\u099f\u09be\u09ac\u09cd\u09a6"
- ],
- "FIRSTDAYOFWEEK": 4,
- "MONTH": [
- "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ae\u09be\u09b0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b8\u09cd\u099f",
- "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0",
- "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"
- ],
- "SHORTDAY": [
- "\u09b0\u09ac\u09bf",
- "\u09b8\u09cb\u09ae",
- "\u09ae\u0999\u09cd\u0997\u09b2",
- "\u09ac\u09c1\u09a7",
- "\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf",
- "\u09b6\u09c1\u0995\u09cd\u09b0",
- "\u09b6\u09a8\u09bf"
- ],
- "SHORTMONTH": [
- "\u099c\u09be\u09a8\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09af\u09bc\u09be\u09b0\u09c0",
- "\u09ae\u09be\u09b0\u09cd\u099a",
- "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2",
- "\u09ae\u09c7",
- "\u099c\u09c1\u09a8",
- "\u099c\u09c1\u09b2\u09be\u0987",
- "\u0986\u0997\u09b8\u09cd\u099f",
- "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0",
- "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0",
- "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u09f3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "bn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-cn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-cn.js
deleted file mode 100644
index ea070697..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-cn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0f66\u0f94\u0f0b\u0f51\u0fb2\u0f7c\u0f0b",
- "\u0f55\u0fb1\u0f72\u0f0b\u0f51\u0fb2\u0f7c\u0f0b"
- ],
- "DAY": [
- "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b"
- ],
- "ERANAMES": [
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0d",
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0d"
- ],
- "ERAS": [
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0d",
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b"
- ],
- "SHORTDAY": [
- "\u0f49\u0f72\u0f0b\u0f58\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b"
- ],
- "SHORTMONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f21",
- "\u0f5f\u0fb3\u0f0b\u0f22",
- "\u0f5f\u0fb3\u0f0b\u0f23",
- "\u0f5f\u0fb3\u0f0b\u0f24",
- "\u0f5f\u0fb3\u0f0b\u0f25",
- "\u0f5f\u0fb3\u0f0b\u0f26",
- "\u0f5f\u0fb3\u0f0b\u0f27",
- "\u0f5f\u0fb3\u0f0b\u0f28",
- "\u0f5f\u0fb3\u0f0b\u0f29",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f20",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f21",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f22"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM\u0f60\u0f72\u0f0b\u0f59\u0f7a\u0f66\u0f0bd\u0f51",
- "medium": "y \u0f63\u0f7c\u0f0b\u0f60\u0f72\u0f0bMMM\u0f59\u0f7a\u0f66\u0f0bd HH:mm:ss",
- "mediumDate": "y \u0f63\u0f7c\u0f0b\u0f60\u0f72\u0f0bMMM\u0f59\u0f7a\u0f66\u0f0bd",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "bo-cn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-in.js
deleted file mode 100644
index 89738d38..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0f66\u0f94\u0f0b\u0f51\u0fb2\u0f7c\u0f0b",
- "\u0f55\u0fb1\u0f72\u0f0b\u0f51\u0fb2\u0f7c\u0f0b"
- ],
- "DAY": [
- "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b"
- ],
- "ERANAMES": [
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0d",
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0d"
- ],
- "ERAS": [
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0d",
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b"
- ],
- "SHORTDAY": [
- "\u0f49\u0f72\u0f0b\u0f58\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b"
- ],
- "SHORTMONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f21",
- "\u0f5f\u0fb3\u0f0b\u0f22",
- "\u0f5f\u0fb3\u0f0b\u0f23",
- "\u0f5f\u0fb3\u0f0b\u0f24",
- "\u0f5f\u0fb3\u0f0b\u0f25",
- "\u0f5f\u0fb3\u0f0b\u0f26",
- "\u0f5f\u0fb3\u0f0b\u0f27",
- "\u0f5f\u0fb3\u0f0b\u0f28",
- "\u0f5f\u0fb3\u0f0b\u0f29",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f20",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f21",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f22"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM\u0f60\u0f72\u0f0b\u0f59\u0f7a\u0f66\u0f0bd\u0f51",
- "medium": "y \u0f63\u0f7c\u0f0b\u0f60\u0f72\u0f0bMMM\u0f59\u0f7a\u0f66\u0f0bd HH:mm:ss",
- "mediumDate": "y \u0f63\u0f7c\u0f0b\u0f60\u0f72\u0f0bMMM\u0f59\u0f7a\u0f66\u0f0bd",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "bo-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo.js
deleted file mode 100644
index 117e4d6a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0f66\u0f94\u0f0b\u0f51\u0fb2\u0f7c\u0f0b",
- "\u0f55\u0fb1\u0f72\u0f0b\u0f51\u0fb2\u0f7c\u0f0b"
- ],
- "DAY": [
- "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b"
- ],
- "ERANAMES": [
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0d",
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0d"
- ],
- "ERAS": [
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0b\u0f66\u0f94\u0f7c\u0f53\u0f0d",
- "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b"
- ],
- "SHORTDAY": [
- "\u0f49\u0f72\u0f0b\u0f58\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b"
- ],
- "SHORTMONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f21",
- "\u0f5f\u0fb3\u0f0b\u0f22",
- "\u0f5f\u0fb3\u0f0b\u0f23",
- "\u0f5f\u0fb3\u0f0b\u0f24",
- "\u0f5f\u0fb3\u0f0b\u0f25",
- "\u0f5f\u0fb3\u0f0b\u0f26",
- "\u0f5f\u0fb3\u0f0b\u0f27",
- "\u0f5f\u0fb3\u0f0b\u0f28",
- "\u0f5f\u0fb3\u0f0b\u0f29",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f20",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f21",
- "\u0f5f\u0fb3\u0f0b\u0f21\u0f22"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM\u0f60\u0f72\u0f0b\u0f59\u0f7a\u0f66\u0f0bd\u0f51",
- "medium": "y \u0f63\u0f7c\u0f0b\u0f60\u0f72\u0f0bMMM\u0f59\u0f7a\u0f66\u0f0bd HH:mm:ss",
- "mediumDate": "y \u0f63\u0f7c\u0f0b\u0f60\u0f72\u0f0bMMM\u0f59\u0f7a\u0f66\u0f0bd",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "bo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br-fr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br-fr.js
deleted file mode 100644
index 111b19cf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br-fr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "A.M.",
- "G.M."
- ],
- "DAY": [
- "Sul",
- "Lun",
- "Meurzh",
- "Merc\u02bcher",
- "Yaou",
- "Gwener",
- "Sadorn"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Genver",
- "C\u02bchwevrer",
- "Meurzh",
- "Ebrel",
- "Mae",
- "Mezheven",
- "Gouere",
- "Eost",
- "Gwengolo",
- "Here",
- "Du",
- "Kerzu"
- ],
- "SHORTDAY": [
- "Sul",
- "Lun",
- "Meu.",
- "Mer.",
- "Yaou",
- "Gwe.",
- "Sad."
- ],
- "SHORTMONTH": [
- "Gen",
- "C\u02bchwe",
- "Meur",
- "Ebr",
- "Mae",
- "Mezh",
- "Goue",
- "Eost",
- "Gwen",
- "Here",
- "Du",
- "Ker"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "br-fr",
- "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) { return PLURAL_CATEGORY.ONE; } if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) { return PLURAL_CATEGORY.TWO; } if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) { return PLURAL_CATEGORY.FEW; } if (n != 0 && n % 1000000 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br.js
deleted file mode 100644
index 2fbf8714..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_br.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "A.M.",
- "G.M."
- ],
- "DAY": [
- "Sul",
- "Lun",
- "Meurzh",
- "Merc\u02bcher",
- "Yaou",
- "Gwener",
- "Sadorn"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Genver",
- "C\u02bchwevrer",
- "Meurzh",
- "Ebrel",
- "Mae",
- "Mezheven",
- "Gouere",
- "Eost",
- "Gwengolo",
- "Here",
- "Du",
- "Kerzu"
- ],
- "SHORTDAY": [
- "Sul",
- "Lun",
- "Meu.",
- "Mer.",
- "Yaou",
- "Gwe.",
- "Sad."
- ],
- "SHORTMONTH": [
- "Gen",
- "C\u02bchwe",
- "Meur",
- "Ebr",
- "Mae",
- "Mezh",
- "Goue",
- "Eost",
- "Gwen",
- "Here",
- "Du",
- "Ker"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "br",
- "pluralCat": function(n, opt_precision) { if (n % 10 == 1 && n % 100 != 11 && n % 100 != 71 && n % 100 != 91) { return PLURAL_CATEGORY.ONE; } if (n % 10 == 2 && n % 100 != 12 && n % 100 != 72 && n % 100 != 92) { return PLURAL_CATEGORY.TWO; } if ((n % 10 >= 3 && n % 10 <= 4 || n % 10 == 9) && (n % 100 < 10 || n % 100 > 19) && (n % 100 < 70 || n % 100 > 79) && (n % 100 < 90 || n % 100 > 99)) { return PLURAL_CATEGORY.FEW; } if (n != 0 && n % 1000000 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx-in.js
deleted file mode 100644
index 2d6ad847..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092b\u0941\u0902",
- "\u092c\u0947\u0932\u093e\u0938\u0947"
- ],
- "DAY": [
- "\u0930\u092c\u093f\u092c\u093e\u0930",
- "\u0938\u092e\u092c\u093e\u0930",
- "\u092e\u0902\u0917\u0932\u092c\u093e\u0930",
- "\u092c\u0941\u0926\u092c\u093e\u0930",
- "\u092c\u093f\u0938\u0925\u093f\u092c\u093e\u0930",
- "\u0938\u0941\u0916\u0941\u0930\u092c\u093e\u0930",
- "\u0938\u0941\u0928\u093f\u092c\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928"
- ],
- "ERAS": [
- "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u0938",
- "\u090f\u092b\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0907",
- "\u0906\u0917\u0938\u094d\u0925",
- "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0905\u0916\u0925\u092c\u0930",
- "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u092c\u093f",
- "\u0938\u092e",
- "\u092e\u0902\u0917\u0932",
- "\u092c\u0941\u0926",
- "\u092c\u093f\u0938\u0925\u093f",
- "\u0938\u0941\u0916\u0941\u0930",
- "\u0938\u0941\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u0938",
- "\u090f\u092b\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0907",
- "\u0906\u0917\u0938\u094d\u0925",
- "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0905\u0916\u0925\u092c\u0930",
- "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "brx-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx.js
deleted file mode 100644
index 85aa1d7d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_brx.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092b\u0941\u0902",
- "\u092c\u0947\u0932\u093e\u0938\u0947"
- ],
- "DAY": [
- "\u0930\u092c\u093f\u092c\u093e\u0930",
- "\u0938\u092e\u092c\u093e\u0930",
- "\u092e\u0902\u0917\u0932\u092c\u093e\u0930",
- "\u092c\u0941\u0926\u092c\u093e\u0930",
- "\u092c\u093f\u0938\u0925\u093f\u092c\u093e\u0930",
- "\u0938\u0941\u0916\u0941\u0930\u092c\u093e\u0930",
- "\u0938\u0941\u0928\u093f\u092c\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928"
- ],
- "ERAS": [
- "\u0908\u0938\u093e.\u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u0938",
- "\u090f\u092b\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0907",
- "\u0906\u0917\u0938\u094d\u0925",
- "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0905\u0916\u0925\u092c\u0930",
- "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u092c\u093f",
- "\u0938\u092e",
- "\u092e\u0902\u0917\u0932",
- "\u092c\u0941\u0926",
- "\u092c\u093f\u0938\u0925\u093f",
- "\u0938\u0941\u0916\u0941\u0930",
- "\u0938\u0941\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u093e\u0928\u0941\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u0938",
- "\u090f\u092b\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0907",
- "\u0906\u0917\u0938\u094d\u0925",
- "\u0938\u0947\u092c\u0925\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0905\u0916\u0925\u092c\u0930",
- "\u0928\u092c\u0947\u091c\u094d\u092c\u093c\u0930",
- "\u0926\u093f\u0938\u0947\u091c\u094d\u092c\u093c\u0930"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "brx",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl-ba.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl-ba.js
deleted file mode 100644
index 24322a44..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl-ba.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e\u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0438\u0458\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d\u0438",
- "\u0458\u0443\u043b\u0438",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0438",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH:mm:ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy. HH:mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bs-cyrl-ba",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl.js
deleted file mode 100644
index 63e52e07..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-cyrl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e\u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0438\u0458\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d\u0438",
- "\u0458\u0443\u043b\u0438",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0438",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH:mm:ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy. HH:mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bs-cyrl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn-ba.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn-ba.js
deleted file mode 100644
index 32c933ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn-ba.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "prije podne",
- "popodne"
- ],
- "DAY": [
- "nedjelja",
- "ponedjeljak",
- "utorak",
- "srijeda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Prije nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "juni",
- "juli",
- "august",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sri",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd. MMM. y. HH:mm:ss",
- "mediumDate": "dd. MMM. y.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy. HH:mm",
- "shortDate": "dd.MM.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bs-latn-ba",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn.js
deleted file mode 100644
index b5e5f925..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "prije podne",
- "popodne"
- ],
- "DAY": [
- "nedjelja",
- "ponedjeljak",
- "utorak",
- "srijeda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Prije nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "juni",
- "juli",
- "august",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sri",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd. MMM. y. HH:mm:ss",
- "mediumDate": "dd. MMM. y.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy. HH:mm",
- "shortDate": "dd.MM.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bs-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs.js
deleted file mode 100644
index c9cf4634..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_bs.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "prije podne",
- "popodne"
- ],
- "DAY": [
- "nedjelja",
- "ponedjeljak",
- "utorak",
- "srijeda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Prije nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "juni",
- "juli",
- "august",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sri",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd. MMM. y. HH:mm:ss",
- "mediumDate": "dd. MMM. y.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy. HH:mm",
- "shortDate": "dd.MM.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "bs",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn-er.js
deleted file mode 100644
index f6ee233b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn-er.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u134b\u12f1\u1235 \u1303\u1265",
- "\u134b\u12f1\u1235 \u12f0\u121d\u1262"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u122d \u1245\u12f3\u12c5",
- "\u1230\u1291",
- "\u1230\u120a\u131d",
- "\u1208\u1313 \u12c8\u122a \u1208\u1265\u12cb",
- "\u12a3\u121d\u12f5",
- "\u12a3\u122d\u1265",
- "\u1230\u1295\u1260\u122d \u123d\u1313\u12c5"
- ],
- "MONTH": [
- "\u120d\u12f0\u1275\u122a",
- "\u12ab\u1265\u12bd\u1265\u1272",
- "\u12ad\u1265\u120b",
- "\u134b\u1305\u12ba\u122a",
- "\u12ad\u1262\u1245\u122a",
- "\u121d\u12aa\u12a4\u120d \u1275\u131f\u1292\u122a",
- "\u12b0\u122d\u12a9",
- "\u121b\u122d\u12eb\u121d \u1275\u122a",
- "\u12eb\u12b8\u1292 \u1218\u1233\u1245\u1208\u122a",
- "\u1218\u1270\u1209",
- "\u121d\u12aa\u12a4\u120d \u1218\u123d\u12c8\u122a",
- "\u1270\u1215\u1233\u1235\u122a"
- ],
- "SHORTDAY": [
- "\u1230/\u1245",
- "\u1230\u1291",
- "\u1230\u120a\u131d",
- "\u1208\u1313",
- "\u12a3\u121d\u12f5",
- "\u12a3\u122d\u1265",
- "\u1230/\u123d"
- ],
- "SHORTMONTH": [
- "\u120d\u12f0\u1275",
- "\u12ab\u1265\u12bd",
- "\u12ad\u1265\u120b",
- "\u134b\u1305\u12ba",
- "\u12ad\u1262\u1245",
- "\u121d/\u1275",
- "\u12b0\u122d",
- "\u121b\u122d\u12eb",
- "\u12eb\u12b8\u1292",
- "\u1218\u1270\u1209",
- "\u121d/\u121d",
- "\u1270\u1215\u1233"
- ],
- "fullDate": "EEEE\u1361 dd MMMM \u130d\u122d\u130b y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "byn-er",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn.js
deleted file mode 100644
index 578ce6dd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_byn.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u134b\u12f1\u1235 \u1303\u1265",
- "\u134b\u12f1\u1235 \u12f0\u121d\u1262"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u122d \u1245\u12f3\u12c5",
- "\u1230\u1291",
- "\u1230\u120a\u131d",
- "\u1208\u1313 \u12c8\u122a \u1208\u1265\u12cb",
- "\u12a3\u121d\u12f5",
- "\u12a3\u122d\u1265",
- "\u1230\u1295\u1260\u122d \u123d\u1313\u12c5"
- ],
- "MONTH": [
- "\u120d\u12f0\u1275\u122a",
- "\u12ab\u1265\u12bd\u1265\u1272",
- "\u12ad\u1265\u120b",
- "\u134b\u1305\u12ba\u122a",
- "\u12ad\u1262\u1245\u122a",
- "\u121d\u12aa\u12a4\u120d \u1275\u131f\u1292\u122a",
- "\u12b0\u122d\u12a9",
- "\u121b\u122d\u12eb\u121d \u1275\u122a",
- "\u12eb\u12b8\u1292 \u1218\u1233\u1245\u1208\u122a",
- "\u1218\u1270\u1209",
- "\u121d\u12aa\u12a4\u120d \u1218\u123d\u12c8\u122a",
- "\u1270\u1215\u1233\u1235\u122a"
- ],
- "SHORTDAY": [
- "\u1230/\u1245",
- "\u1230\u1291",
- "\u1230\u120a\u131d",
- "\u1208\u1313",
- "\u12a3\u121d\u12f5",
- "\u12a3\u122d\u1265",
- "\u1230/\u123d"
- ],
- "SHORTMONTH": [
- "\u120d\u12f0\u1275",
- "\u12ab\u1265\u12bd",
- "\u12ad\u1265\u120b",
- "\u134b\u1305\u12ba",
- "\u12ad\u1262\u1245",
- "\u121d/\u1275",
- "\u12b0\u122d",
- "\u121b\u122d\u12eb",
- "\u12eb\u12b8\u1292",
- "\u1218\u1270\u1209",
- "\u121d/\u121d",
- "\u1270\u1215\u1233"
- ],
- "fullDate": "EEEE\u1361 dd MMMM \u130d\u122d\u130b y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "byn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-ad.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-ad.js
deleted file mode 100644
index 44830645..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-ad.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "diumenge",
- "dilluns",
- "dimarts",
- "dimecres",
- "dijous",
- "divendres",
- "dissabte"
- ],
- "ERANAMES": [
- "abans de Crist",
- "despr\u00e9s de Crist"
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de gener",
- "de febrer",
- "de mar\u00e7",
- "d\u2019abril",
- "de maig",
- "de juny",
- "de juliol",
- "d\u2019agost",
- "de setembre",
- "d\u2019octubre",
- "de novembre",
- "de desembre"
- ],
- "SHORTDAY": [
- "dg.",
- "dl.",
- "dt.",
- "dc.",
- "dj.",
- "dv.",
- "ds."
- ],
- "SHORTMONTH": [
- "gen.",
- "febr.",
- "mar\u00e7",
- "abr.",
- "maig",
- "juny",
- "jul.",
- "ag.",
- "set.",
- "oct.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ca-ad",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es-valencia.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es-valencia.js
deleted file mode 100644
index 725478c4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es-valencia.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "diumenge",
- "dilluns",
- "dimarts",
- "dimecres",
- "dijous",
- "divendres",
- "dissabte"
- ],
- "ERANAMES": [
- "abans de Crist",
- "despr\u00e9s de Crist"
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de gener",
- "de febrer",
- "de mar\u00e7",
- "d\u2019abril",
- "de maig",
- "de juny",
- "de juliol",
- "d\u2019agost",
- "de setembre",
- "d\u2019octubre",
- "de novembre",
- "de desembre"
- ],
- "SHORTDAY": [
- "dg.",
- "dl.",
- "dt.",
- "dc.",
- "dj.",
- "dv.",
- "ds."
- ],
- "SHORTMONTH": [
- "gen.",
- "febr.",
- "mar\u00e7",
- "abr.",
- "maig",
- "juny",
- "jul.",
- "ag.",
- "set.",
- "oct.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ca-es-valencia",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es.js
deleted file mode 100644
index 427201b6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-es.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "diumenge",
- "dilluns",
- "dimarts",
- "dimecres",
- "dijous",
- "divendres",
- "dissabte"
- ],
- "ERANAMES": [
- "abans de Crist",
- "despr\u00e9s de Crist"
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de gener",
- "de febrer",
- "de mar\u00e7",
- "d\u2019abril",
- "de maig",
- "de juny",
- "de juliol",
- "d\u2019agost",
- "de setembre",
- "d\u2019octubre",
- "de novembre",
- "de desembre"
- ],
- "SHORTDAY": [
- "dg.",
- "dl.",
- "dt.",
- "dc.",
- "dj.",
- "dv.",
- "ds."
- ],
- "SHORTMONTH": [
- "gen.",
- "febr.",
- "mar\u00e7",
- "abr.",
- "maig",
- "juny",
- "jul.",
- "ag.",
- "set.",
- "oct.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ca-es",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-fr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-fr.js
deleted file mode 100644
index 22f1f7b3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-fr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "diumenge",
- "dilluns",
- "dimarts",
- "dimecres",
- "dijous",
- "divendres",
- "dissabte"
- ],
- "ERANAMES": [
- "abans de Crist",
- "despr\u00e9s de Crist"
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de gener",
- "de febrer",
- "de mar\u00e7",
- "d\u2019abril",
- "de maig",
- "de juny",
- "de juliol",
- "d\u2019agost",
- "de setembre",
- "d\u2019octubre",
- "de novembre",
- "de desembre"
- ],
- "SHORTDAY": [
- "dg.",
- "dl.",
- "dt.",
- "dc.",
- "dj.",
- "dv.",
- "ds."
- ],
- "SHORTMONTH": [
- "gen.",
- "febr.",
- "mar\u00e7",
- "abr.",
- "maig",
- "juny",
- "jul.",
- "ag.",
- "set.",
- "oct.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ca-fr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-it.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-it.js
deleted file mode 100644
index 8bb952cf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca-it.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "diumenge",
- "dilluns",
- "dimarts",
- "dimecres",
- "dijous",
- "divendres",
- "dissabte"
- ],
- "ERANAMES": [
- "abans de Crist",
- "despr\u00e9s de Crist"
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de gener",
- "de febrer",
- "de mar\u00e7",
- "d\u2019abril",
- "de maig",
- "de juny",
- "de juliol",
- "d\u2019agost",
- "de setembre",
- "d\u2019octubre",
- "de novembre",
- "de desembre"
- ],
- "SHORTDAY": [
- "dg.",
- "dl.",
- "dt.",
- "dc.",
- "dj.",
- "dv.",
- "ds."
- ],
- "SHORTMONTH": [
- "gen.",
- "febr.",
- "mar\u00e7",
- "abr.",
- "maig",
- "juny",
- "jul.",
- "ag.",
- "set.",
- "oct.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ca-it",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca.js
deleted file mode 100644
index 9f1a6069..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ca.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "diumenge",
- "dilluns",
- "dimarts",
- "dimecres",
- "dijous",
- "divendres",
- "dissabte"
- ],
- "ERANAMES": [
- "abans de Crist",
- "despr\u00e9s de Crist"
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "de gener",
- "de febrer",
- "de mar\u00e7",
- "d\u2019abril",
- "de maig",
- "de juny",
- "de juliol",
- "d\u2019agost",
- "de setembre",
- "d\u2019octubre",
- "de novembre",
- "de desembre"
- ],
- "SHORTDAY": [
- "dg.",
- "dl.",
- "dt.",
- "dc.",
- "dj.",
- "dv.",
- "ds."
- ],
- "SHORTMONTH": [
- "gen.",
- "febr.",
- "mar\u00e7",
- "abr.",
- "maig",
- "juny",
- "jul.",
- "ag.",
- "set.",
- "oct.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM 'de' y",
- "longDate": "d MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ca",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg-ug.js
deleted file mode 100644
index 544346c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sande",
- "Orwokubanza",
- "Orwakabiri",
- "Orwakashatu",
- "Orwakana",
- "Orwakataano",
- "Orwamukaaga"
- ],
- "ERANAMES": [
- "Kurisito Atakaijire",
- "Kurisito Yaijire"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Okwokubanza",
- "Okwakabiri",
- "Okwakashatu",
- "Okwakana",
- "Okwakataana",
- "Okwamukaaga",
- "Okwamushanju",
- "Okwamunaana",
- "Okwamwenda",
- "Okwaikumi",
- "Okwaikumi na kumwe",
- "Okwaikumi na ibiri"
- ],
- "SHORTDAY": [
- "SAN",
- "ORK",
- "OKB",
- "OKS",
- "OKN",
- "OKT",
- "OMK"
- ],
- "SHORTMONTH": [
- "KBZ",
- "KBR",
- "KST",
- "KKN",
- "KTN",
- "KMK",
- "KMS",
- "KMN",
- "KMW",
- "KKM",
- "KNK",
- "KNB"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "cgg-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg.js
deleted file mode 100644
index 7068c522..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cgg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sande",
- "Orwokubanza",
- "Orwakabiri",
- "Orwakashatu",
- "Orwakana",
- "Orwakataano",
- "Orwamukaaga"
- ],
- "ERANAMES": [
- "Kurisito Atakaijire",
- "Kurisito Yaijire"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Okwokubanza",
- "Okwakabiri",
- "Okwakashatu",
- "Okwakana",
- "Okwakataana",
- "Okwamukaaga",
- "Okwamushanju",
- "Okwamunaana",
- "Okwamwenda",
- "Okwaikumi",
- "Okwaikumi na kumwe",
- "Okwaikumi na ibiri"
- ],
- "SHORTDAY": [
- "SAN",
- "ORK",
- "OKB",
- "OKS",
- "OKN",
- "OKT",
- "OMK"
- ],
- "SHORTMONTH": [
- "KBZ",
- "KBR",
- "KST",
- "KKN",
- "KTN",
- "KMK",
- "KMS",
- "KMN",
- "KMW",
- "KKM",
- "KNK",
- "KNB"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "cgg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr-us.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr-us.js
deleted file mode 100644
index bc9e9220..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr-us.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u13cc\u13be\u13b4",
- "\u13d2\u13af\u13f1\u13a2\u13d7\u13e2"
- ],
- "DAY": [
- "\u13a4\u13be\u13d9\u13d3\u13c6\u13cd\u13ac",
- "\u13a4\u13be\u13d9\u13d3\u13c9\u13c5\u13af",
- "\u13d4\u13b5\u13c1\u13a2\u13a6",
- "\u13e6\u13a2\u13c1\u13a2\u13a6",
- "\u13c5\u13a9\u13c1\u13a2\u13a6",
- "\u13e7\u13be\u13a9\u13b6\u13cd\u13d7",
- "\u13a4\u13be\u13d9\u13d3\u13c8\u13d5\u13be"
- ],
- "ERANAMES": [
- "\u13cf \u13e5\u13cc \u13be\u13d5\u13b2\u13cd\u13ac\u13be",
- "\u13a0\u13a9\u13c3\u13ae\u13b5\u13d3\u13cd\u13d7\u13f1 \u13a0\u13d5\u13d8\u13f1\u13cd\u13ac \u13f1\u13b0\u13e9 \u13e7\u13d3\u13c2\u13b8\u13a2\u13cd\u13d7"
- ],
- "ERAS": [
- "\u13a4\u13d3\u13b7\u13b8",
- "\u13a4\u13b6\u13d0\u13c5"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u13a4\u13c3\u13b8\u13d4\u13c5",
- "\u13a7\u13a6\u13b5",
- "\u13a0\u13c5\u13f1",
- "\u13a7\u13ec\u13c2",
- "\u13a0\u13c2\u13cd\u13ac\u13d8",
- "\u13d5\u13ad\u13b7\u13f1",
- "\u13ab\u13f0\u13c9\u13c2",
- "\u13a6\u13b6\u13c2",
- "\u13da\u13b5\u13cd\u13d7",
- "\u13da\u13c2\u13c5\u13d7",
- "\u13c5\u13d3\u13d5\u13c6",
- "\u13a5\u13cd\u13a9\u13f1"
- ],
- "SHORTDAY": [
- "\u13c6\u13cd\u13ac",
- "\u13c9\u13c5\u13af",
- "\u13d4\u13b5\u13c1",
- "\u13e6\u13a2\u13c1",
- "\u13c5\u13a9\u13c1",
- "\u13e7\u13be\u13a9",
- "\u13c8\u13d5\u13be"
- ],
- "SHORTMONTH": [
- "\u13a4\u13c3",
- "\u13a7\u13a6",
- "\u13a0\u13c5",
- "\u13a7\u13ec",
- "\u13a0\u13c2",
- "\u13d5\u13ad",
- "\u13ab\u13f0",
- "\u13a6\u13b6",
- "\u13da\u13b5",
- "\u13da\u13c2",
- "\u13c5\u13d3",
- "\u13a5\u13cd"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "chr-us",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr.js
deleted file mode 100644
index 589816f9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_chr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u13cc\u13be\u13b4",
- "\u13d2\u13af\u13f1\u13a2\u13d7\u13e2"
- ],
- "DAY": [
- "\u13a4\u13be\u13d9\u13d3\u13c6\u13cd\u13ac",
- "\u13a4\u13be\u13d9\u13d3\u13c9\u13c5\u13af",
- "\u13d4\u13b5\u13c1\u13a2\u13a6",
- "\u13e6\u13a2\u13c1\u13a2\u13a6",
- "\u13c5\u13a9\u13c1\u13a2\u13a6",
- "\u13e7\u13be\u13a9\u13b6\u13cd\u13d7",
- "\u13a4\u13be\u13d9\u13d3\u13c8\u13d5\u13be"
- ],
- "ERANAMES": [
- "\u13cf \u13e5\u13cc \u13be\u13d5\u13b2\u13cd\u13ac\u13be",
- "\u13a0\u13a9\u13c3\u13ae\u13b5\u13d3\u13cd\u13d7\u13f1 \u13a0\u13d5\u13d8\u13f1\u13cd\u13ac \u13f1\u13b0\u13e9 \u13e7\u13d3\u13c2\u13b8\u13a2\u13cd\u13d7"
- ],
- "ERAS": [
- "\u13a4\u13d3\u13b7\u13b8",
- "\u13a4\u13b6\u13d0\u13c5"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u13a4\u13c3\u13b8\u13d4\u13c5",
- "\u13a7\u13a6\u13b5",
- "\u13a0\u13c5\u13f1",
- "\u13a7\u13ec\u13c2",
- "\u13a0\u13c2\u13cd\u13ac\u13d8",
- "\u13d5\u13ad\u13b7\u13f1",
- "\u13ab\u13f0\u13c9\u13c2",
- "\u13a6\u13b6\u13c2",
- "\u13da\u13b5\u13cd\u13d7",
- "\u13da\u13c2\u13c5\u13d7",
- "\u13c5\u13d3\u13d5\u13c6",
- "\u13a5\u13cd\u13a9\u13f1"
- ],
- "SHORTDAY": [
- "\u13c6\u13cd\u13ac",
- "\u13c9\u13c5\u13af",
- "\u13d4\u13b5\u13c1",
- "\u13e6\u13a2\u13c1",
- "\u13c5\u13a9\u13c1",
- "\u13e7\u13be\u13a9",
- "\u13c8\u13d5\u13be"
- ],
- "SHORTMONTH": [
- "\u13a4\u13c3",
- "\u13a7\u13a6",
- "\u13a0\u13c5",
- "\u13a7\u13ec",
- "\u13a0\u13c2",
- "\u13d5\u13ad",
- "\u13ab\u13f0",
- "\u13a6\u13b6",
- "\u13da\u13b5",
- "\u13da\u13c2",
- "\u13c5\u13d3",
- "\u13a5\u13cd"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "chr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-iq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-iq.js
deleted file mode 100644
index 083bf182..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-iq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-arab-iq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-ir.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-ir.js
deleted file mode 100644
index cc23f51e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab-ir.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-arab-ir",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab.js
deleted file mode 100644
index 8f1fd700..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-arab.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-arab",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-iq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-iq.js
deleted file mode 100644
index 2786ebd7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-iq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-iq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-ir.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-ir.js
deleted file mode 100644
index fb0bd006..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-ir.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-ir",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn-iq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn-iq.js
deleted file mode 100644
index 4e3c8b79..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn-iq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-latn-iq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn.js
deleted file mode 100644
index e2a333fd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb.js
deleted file mode 100644
index e0321122..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ckb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0628.\u0646",
- "\u062f.\u0646"
- ],
- "DAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "ERANAMES": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u0646",
- "\u0632\u0627\u06cc\u06cc\u0646\u06cc"
- ],
- "ERAS": [
- "\u067e\u06ce\u0634 \u0632\u0627\u06cc\u06cc\u06cc\u0646",
- "\u0632"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "SHORTDAY": [
- "\u06cc\u06d5\u06a9\u0634\u06d5\u0645\u0645\u06d5",
- "\u062f\u0648\u0648\u0634\u06d5\u0645\u0645\u06d5",
- "\u0633\u06ce\u0634\u06d5\u0645\u0645\u06d5",
- "\u0686\u0648\u0627\u0631\u0634\u06d5\u0645\u0645\u06d5",
- "\u067e\u06ce\u0646\u062c\u0634\u06d5\u0645\u0645\u06d5",
- "\u06be\u06d5\u06cc\u0646\u06cc",
- "\u0634\u06d5\u0645\u0645\u06d5"
- ],
- "SHORTMONTH": [
- "\u06a9\u0627\u0646\u0648\u0648\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u0634\u0648\u0628\u0627\u062a",
- "\u0626\u0627\u0632\u0627\u0631",
- "\u0646\u06cc\u0633\u0627\u0646",
- "\u0626\u0627\u06cc\u0627\u0631",
- "\u062d\u0648\u0632\u06d5\u06cc\u0631\u0627\u0646",
- "\u062a\u06d5\u0645\u0648\u0648\u0632",
- "\u0626\u0627\u0628",
- "\u0626\u06d5\u06cc\u0644\u0648\u0648\u0644",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645",
- "\u062a\u0634\u0631\u06cc\u0646\u06cc \u062f\u0648\u0648\u06d5\u0645",
- "\u06a9\u0627\u0646\u0648\u0646\u06cc \u06cc\u06d5\u06a9\u06d5\u0645"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "d\u06cc MMMM\u06cc y",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ckb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs-cz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs-cz.js
deleted file mode 100644
index d260d8de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs-cz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopoledne",
- "odpoledne"
- ],
- "DAY": [
- "ned\u011ble",
- "pond\u011bl\u00ed",
- "\u00fater\u00fd",
- "st\u0159eda",
- "\u010dtvrtek",
- "p\u00e1tek",
- "sobota"
- ],
- "ERANAMES": [
- "p\u0159. n. l.",
- "n. l."
- ],
- "ERAS": [
- "p\u0159. n. l.",
- "n. l."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ledna",
- "\u00fanora",
- "b\u0159ezna",
- "dubna",
- "kv\u011btna",
- "\u010dervna",
- "\u010dervence",
- "srpna",
- "z\u00e1\u0159\u00ed",
- "\u0159\u00edjna",
- "listopadu",
- "prosince"
- ],
- "SHORTDAY": [
- "ne",
- "po",
- "\u00fat",
- "st",
- "\u010dt",
- "p\u00e1",
- "so"
- ],
- "SHORTMONTH": [
- "led",
- "\u00fano",
- "b\u0159e",
- "dub",
- "kv\u011b",
- "\u010dvn",
- "\u010dvc",
- "srp",
- "z\u00e1\u0159",
- "\u0159\u00edj",
- "lis",
- "pro"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. M. y H:mm:ss",
- "mediumDate": "d. M. y",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "K\u010d",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "cs-cz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs.js
deleted file mode 100644
index 3f9cb70e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cs.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopoledne",
- "odpoledne"
- ],
- "DAY": [
- "ned\u011ble",
- "pond\u011bl\u00ed",
- "\u00fater\u00fd",
- "st\u0159eda",
- "\u010dtvrtek",
- "p\u00e1tek",
- "sobota"
- ],
- "ERANAMES": [
- "p\u0159. n. l.",
- "n. l."
- ],
- "ERAS": [
- "p\u0159. n. l.",
- "n. l."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ledna",
- "\u00fanora",
- "b\u0159ezna",
- "dubna",
- "kv\u011btna",
- "\u010dervna",
- "\u010dervence",
- "srpna",
- "z\u00e1\u0159\u00ed",
- "\u0159\u00edjna",
- "listopadu",
- "prosince"
- ],
- "SHORTDAY": [
- "ne",
- "po",
- "\u00fat",
- "st",
- "\u010dt",
- "p\u00e1",
- "so"
- ],
- "SHORTMONTH": [
- "led",
- "\u00fano",
- "b\u0159e",
- "dub",
- "kv\u011b",
- "\u010dvn",
- "\u010dvc",
- "srp",
- "z\u00e1\u0159",
- "\u0159\u00edj",
- "lis",
- "pro"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. M. y H:mm:ss",
- "mediumDate": "d. M. y",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "K\u010d",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "cs",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy-gb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy-gb.js
deleted file mode 100644
index d6a9b5d7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy-gb.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Dydd Sul",
- "Dydd Llun",
- "Dydd Mawrth",
- "Dydd Mercher",
- "Dydd Iau",
- "Dydd Gwener",
- "Dydd Sadwrn"
- ],
- "ERANAMES": [
- "Cyn Crist",
- "Oed Crist"
- ],
- "ERAS": [
- "CC",
- "OC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ionawr",
- "Chwefror",
- "Mawrth",
- "Ebrill",
- "Mai",
- "Mehefin",
- "Gorffennaf",
- "Awst",
- "Medi",
- "Hydref",
- "Tachwedd",
- "Rhagfyr"
- ],
- "SHORTDAY": [
- "Sul",
- "Llun",
- "Maw",
- "Mer",
- "Iau",
- "Gwen",
- "Sad"
- ],
- "SHORTMONTH": [
- "Ion",
- "Chwef",
- "Mawrth",
- "Ebrill",
- "Mai",
- "Meh",
- "Gorff",
- "Awst",
- "Medi",
- "Hyd",
- "Tach",
- "Rhag"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "cy-gb",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n == 3) { return PLURAL_CATEGORY.FEW; } if (n == 6) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy.js
deleted file mode 100644
index 057a5278..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_cy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Dydd Sul",
- "Dydd Llun",
- "Dydd Mawrth",
- "Dydd Mercher",
- "Dydd Iau",
- "Dydd Gwener",
- "Dydd Sadwrn"
- ],
- "ERANAMES": [
- "Cyn Crist",
- "Oed Crist"
- ],
- "ERAS": [
- "CC",
- "OC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ionawr",
- "Chwefror",
- "Mawrth",
- "Ebrill",
- "Mai",
- "Mehefin",
- "Gorffennaf",
- "Awst",
- "Medi",
- "Hydref",
- "Tachwedd",
- "Rhagfyr"
- ],
- "SHORTDAY": [
- "Sul",
- "Llun",
- "Maw",
- "Mer",
- "Iau",
- "Gwen",
- "Sad"
- ],
- "SHORTMONTH": [
- "Ion",
- "Chwef",
- "Mawrth",
- "Ebrill",
- "Mai",
- "Meh",
- "Gorff",
- "Awst",
- "Medi",
- "Hyd",
- "Tach",
- "Rhag"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "cy",
- "pluralCat": function(n, opt_precision) { if (n == 0) { return PLURAL_CATEGORY.ZERO; } if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n == 3) { return PLURAL_CATEGORY.FEW; } if (n == 6) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-dk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-dk.js
deleted file mode 100644
index fe2f432a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-dk.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-function getWT(v, f) {
- if (f === 0) {
- return {w: 0, t: 0};
- }
-
- while ((f % 10) === 0) {
- f /= 10;
- v--;
- }
-
- return {w: v, t: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "marts",
- "april",
- "maj",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "maj",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE 'den' d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd/MM/y HH.mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "da-dk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-gl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-gl.js
deleted file mode 100644
index 9714d083..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da-gl.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-function getWT(v, f) {
- if (f === 0) {
- return {w: 0, t: 0};
- }
-
- while ((f % 10) === 0) {
- f /= 10;
- v--;
- }
-
- return {w: v, t: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "marts",
- "april",
- "maj",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "maj",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE 'den' d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd/MM/y HH.mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "da-gl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da.js
deleted file mode 100644
index 7e263cf9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_da.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-function getWT(v, f) {
- if (f === 0) {
- return {w: 0, t: 0};
- }
-
- while ((f % 10) === 0) {
- f /= 10;
- v--;
- }
-
- return {w: v, t: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "marts",
- "april",
- "maj",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "maj",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE 'den' d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd/MM/y HH.mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "da",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav-ke.js
deleted file mode 100644
index 4a689b50..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Luma lwa K",
- "luma lwa p"
- ],
- "DAY": [
- "Ituku ja jumwa",
- "Kuramuka jimweri",
- "Kuramuka kawi",
- "Kuramuka kadadu",
- "Kuramuka kana",
- "Kuramuka kasanu",
- "Kifula nguwo"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mori ghwa imbiri",
- "Mori ghwa kawi",
- "Mori ghwa kadadu",
- "Mori ghwa kana",
- "Mori ghwa kasanu",
- "Mori ghwa karandadu",
- "Mori ghwa mfungade",
- "Mori ghwa wunyanya",
- "Mori ghwa ikenda",
- "Mori ghwa ikumi",
- "Mori ghwa ikumi na imweri",
- "Mori ghwa ikumi na iwi"
- ],
- "SHORTDAY": [
- "Jum",
- "Jim",
- "Kaw",
- "Kad",
- "Kan",
- "Kas",
- "Ngu"
- ],
- "SHORTMONTH": [
- "Imb",
- "Kaw",
- "Kad",
- "Kan",
- "Kas",
- "Kar",
- "Mfu",
- "Wun",
- "Ike",
- "Iku",
- "Imw",
- "Iwi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "dav-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav.js
deleted file mode 100644
index 946c59f4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dav.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Luma lwa K",
- "luma lwa p"
- ],
- "DAY": [
- "Ituku ja jumwa",
- "Kuramuka jimweri",
- "Kuramuka kawi",
- "Kuramuka kadadu",
- "Kuramuka kana",
- "Kuramuka kasanu",
- "Kifula nguwo"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mori ghwa imbiri",
- "Mori ghwa kawi",
- "Mori ghwa kadadu",
- "Mori ghwa kana",
- "Mori ghwa kasanu",
- "Mori ghwa karandadu",
- "Mori ghwa mfungade",
- "Mori ghwa wunyanya",
- "Mori ghwa ikenda",
- "Mori ghwa ikumi",
- "Mori ghwa ikumi na imweri",
- "Mori ghwa ikumi na iwi"
- ],
- "SHORTDAY": [
- "Jum",
- "Jim",
- "Kaw",
- "Kad",
- "Kan",
- "Kas",
- "Ngu"
- ],
- "SHORTMONTH": [
- "Imb",
- "Kaw",
- "Kad",
- "Kan",
- "Kas",
- "Kar",
- "Mfu",
- "Wun",
- "Ike",
- "Iku",
- "Imw",
- "Iwi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "dav",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-at.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-at.js
deleted file mode 100644
index b3ee8e15..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-at.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "J\u00e4nner",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "J\u00e4n.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "de-at",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-be.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-be.js
deleted file mode 100644
index 61390da4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-be.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "de-be",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-ch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-ch.js
deleted file mode 100644
index cdb75cac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-ch.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "'",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "de-ch",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-de.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-de.js
deleted file mode 100644
index b69252f5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-de.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "de-de",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-li.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-li.js
deleted file mode 100644
index 867e08d9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-li.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "'",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "de-li",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-lu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-lu.js
deleted file mode 100644
index f141217c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de-lu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "de-lu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de.js
deleted file mode 100644
index cbc6643f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_de.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nachm."
- ],
- "DAY": [
- "Sonntag",
- "Montag",
- "Dienstag",
- "Mittwoch",
- "Donnerstag",
- "Freitag",
- "Samstag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "So.",
- "Mo.",
- "Di.",
- "Mi.",
- "Do.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4rz",
- "Apr.",
- "Mai",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "de",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje-ne.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje-ne.js
deleted file mode 100644
index a5f24033..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje-ne.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Subbaahi",
- "Zaarikay b"
- ],
- "DAY": [
- "Alhadi",
- "Atinni",
- "Atalaata",
- "Alarba",
- "Alhamisi",
- "Alzuma",
- "Asibti"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa zamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alz",
- "Asi"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "dje-ne",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje.js
deleted file mode 100644
index 630c9f4a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dje.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Subbaahi",
- "Zaarikay b"
- ],
- "DAY": [
- "Alhadi",
- "Atinni",
- "Atalaata",
- "Alarba",
- "Alhamisi",
- "Alzuma",
- "Asibti"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa zamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alz",
- "Asi"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "dje",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb-de.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb-de.js
deleted file mode 100644
index 8d7ca9f2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb-de.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopo\u0142dnja",
- "w\u00f3tpo\u0142dnja"
- ],
- "DAY": [
- "nje\u017aela",
- "p\u00f3nje\u017aele",
- "wa\u0142tora",
- "srjoda",
- "stw\u00f3rtk",
- "p\u011btk",
- "sobota"
- ],
- "ERANAMES": [
- "p\u015bed Kristusowym naro\u017aenim",
- "p\u00f3 Kristusowem naro\u017aenju"
- ],
- "ERAS": [
- "p\u015b.Chr.n.",
- "p\u00f3 Chr.n."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januara",
- "februara",
- "m\u011brca",
- "apryla",
- "maja",
- "junija",
- "julija",
- "awgusta",
- "septembra",
- "oktobra",
- "nowembra",
- "decembra"
- ],
- "SHORTDAY": [
- "nje",
- "p\u00f3n",
- "wa\u0142",
- "srj",
- "stw",
- "p\u011bt",
- "sob"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "m\u011br.",
- "apr.",
- "maj.",
- "jun.",
- "jul.",
- "awg.",
- "sep.",
- "okt.",
- "now.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d.M.y H:mm:ss",
- "mediumDate": "d.M.y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.yy H:mm",
- "shortDate": "d.M.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "dsb-de",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb.js
deleted file mode 100644
index f774a75b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dsb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopo\u0142dnja",
- "w\u00f3tpo\u0142dnja"
- ],
- "DAY": [
- "nje\u017aela",
- "p\u00f3nje\u017aele",
- "wa\u0142tora",
- "srjoda",
- "stw\u00f3rtk",
- "p\u011btk",
- "sobota"
- ],
- "ERANAMES": [
- "p\u015bed Kristusowym naro\u017aenim",
- "p\u00f3 Kristusowem naro\u017aenju"
- ],
- "ERAS": [
- "p\u015b.Chr.n.",
- "p\u00f3 Chr.n."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januara",
- "februara",
- "m\u011brca",
- "apryla",
- "maja",
- "junija",
- "julija",
- "awgusta",
- "septembra",
- "oktobra",
- "nowembra",
- "decembra"
- ],
- "SHORTDAY": [
- "nje",
- "p\u00f3n",
- "wa\u0142",
- "srj",
- "stw",
- "p\u011bt",
- "sob"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "m\u011br.",
- "apr.",
- "maj.",
- "jun.",
- "jul.",
- "awg.",
- "sep.",
- "okt.",
- "now.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d.M.y H:mm:ss",
- "mediumDate": "d.M.y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.yy H:mm",
- "shortDate": "d.M.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "dsb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua-cm.js
deleted file mode 100644
index 84d78017..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "idi\u0253a",
- "eby\u00e1mu"
- ],
- "DAY": [
- "\u00e9ti",
- "m\u0254\u0301s\u00fa",
- "kwas\u00fa",
- "muk\u0254\u0301s\u00fa",
- "\u014bgis\u00fa",
- "\u0257\u00f3n\u025bs\u00fa",
- "esa\u0253as\u00fa"
- ],
- "ERANAMES": [
- "\u0253oso \u0253w\u00e1 y\u00e1\u0253e l\u00e1",
- "mb\u00fasa kw\u00e9di a Y\u00e9s"
- ],
- "ERAS": [
- "\u0253.Ys",
- "mb.Ys"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dim\u0254\u0301di",
- "\u014bg\u0254nd\u025b",
- "s\u0254\u014b\u025b",
- "di\u0253\u00e1\u0253\u00e1",
- "emiasele",
- "es\u0254p\u025bs\u0254p\u025b",
- "madi\u0253\u025b\u0301d\u00ed\u0253\u025b\u0301",
- "di\u014bgindi",
- "ny\u025bt\u025bki",
- "may\u00e9s\u025b\u0301",
- "tin\u00edn\u00ed",
- "el\u00e1\u014bg\u025b\u0301"
- ],
- "SHORTDAY": [
- "\u00e9t",
- "m\u0254\u0301s",
- "kwa",
- "muk",
- "\u014bgi",
- "\u0257\u00f3n",
- "esa"
- ],
- "SHORTMONTH": [
- "di",
- "\u014bg\u0254n",
- "s\u0254\u014b",
- "di\u0253",
- "emi",
- "es\u0254",
- "mad",
- "di\u014b",
- "ny\u025bt",
- "may",
- "tin",
- "el\u00e1"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "dua-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua.js
deleted file mode 100644
index c2ffe945..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dua.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "idi\u0253a",
- "eby\u00e1mu"
- ],
- "DAY": [
- "\u00e9ti",
- "m\u0254\u0301s\u00fa",
- "kwas\u00fa",
- "muk\u0254\u0301s\u00fa",
- "\u014bgis\u00fa",
- "\u0257\u00f3n\u025bs\u00fa",
- "esa\u0253as\u00fa"
- ],
- "ERANAMES": [
- "\u0253oso \u0253w\u00e1 y\u00e1\u0253e l\u00e1",
- "mb\u00fasa kw\u00e9di a Y\u00e9s"
- ],
- "ERAS": [
- "\u0253.Ys",
- "mb.Ys"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dim\u0254\u0301di",
- "\u014bg\u0254nd\u025b",
- "s\u0254\u014b\u025b",
- "di\u0253\u00e1\u0253\u00e1",
- "emiasele",
- "es\u0254p\u025bs\u0254p\u025b",
- "madi\u0253\u025b\u0301d\u00ed\u0253\u025b\u0301",
- "di\u014bgindi",
- "ny\u025bt\u025bki",
- "may\u00e9s\u025b\u0301",
- "tin\u00edn\u00ed",
- "el\u00e1\u014bg\u025b\u0301"
- ],
- "SHORTDAY": [
- "\u00e9t",
- "m\u0254\u0301s",
- "kwa",
- "muk",
- "\u014bgi",
- "\u0257\u00f3n",
- "esa"
- ],
- "SHORTMONTH": [
- "di",
- "\u014bg\u0254n",
- "s\u0254\u014b",
- "di\u0253",
- "emi",
- "es\u0254",
- "mad",
- "di\u014b",
- "ny\u025bt",
- "may",
- "tin",
- "el\u00e1"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "dua",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo-sn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo-sn.js
deleted file mode 100644
index e8fadc71..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo-sn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Dimas",
- "Tene\u014b",
- "Talata",
- "Alarbay",
- "Aramisay",
- "Arjuma",
- "Sibiti"
- ],
- "ERANAMES": [
- "Ari\u014buu Yeesu",
- "Atoo\u014be Yeesu"
- ],
- "ERAS": [
- "ArY",
- "AtY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Sanvie",
- "F\u00e9birie",
- "Mars",
- "Aburil",
- "Mee",
- "Sue\u014b",
- "S\u00fauyee",
- "Ut",
- "Settembar",
- "Oktobar",
- "Novembar",
- "Disambar"
- ],
- "SHORTDAY": [
- "Dim",
- "Ten",
- "Tal",
- "Ala",
- "Ara",
- "Arj",
- "Sib"
- ],
- "SHORTMONTH": [
- "Sa",
- "Fe",
- "Ma",
- "Ab",
- "Me",
- "Su",
- "S\u00fa",
- "Ut",
- "Se",
- "Ok",
- "No",
- "De"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "dyo-sn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo.js
deleted file mode 100644
index 5699f4a2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dyo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Dimas",
- "Tene\u014b",
- "Talata",
- "Alarbay",
- "Aramisay",
- "Arjuma",
- "Sibiti"
- ],
- "ERANAMES": [
- "Ari\u014buu Yeesu",
- "Atoo\u014be Yeesu"
- ],
- "ERAS": [
- "ArY",
- "AtY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Sanvie",
- "F\u00e9birie",
- "Mars",
- "Aburil",
- "Mee",
- "Sue\u014b",
- "S\u00fauyee",
- "Ut",
- "Settembar",
- "Oktobar",
- "Novembar",
- "Disambar"
- ],
- "SHORTDAY": [
- "Dim",
- "Ten",
- "Tal",
- "Ala",
- "Ara",
- "Arj",
- "Sib"
- ],
- "SHORTMONTH": [
- "Sa",
- "Fe",
- "Ma",
- "Ab",
- "Me",
- "Su",
- "S\u00fa",
- "Ut",
- "Se",
- "Ok",
- "No",
- "De"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "dyo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz-bt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz-bt.js
deleted file mode 100644
index c82e0508..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz-bt.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0f66\u0f94\u0f0b\u0f46\u0f0b",
- "\u0f55\u0fb1\u0f72\u0f0b\u0f46\u0f0b"
- ],
- "DAY": [
- "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f51\u0f44\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b"
- ],
- "SHORTDAY": [
- "\u0f5f\u0fb3\u0f0b",
- "\u0f58\u0f72\u0f62\u0f0b",
- "\u0f63\u0fb7\u0f42\u0f0b",
- "\u0f55\u0f74\u0f62\u0f0b",
- "\u0f66\u0f44\u0f66\u0f0b",
- "\u0f66\u0fa4\u0f7a\u0f53\u0f0b",
- "\u0f49\u0f72\u0f0b"
- ],
- "SHORTMONTH": [
- "\u0f21",
- "\u0f22",
- "\u0f23",
- "\u0f24",
- "\u0f25",
- "\u0f26",
- "\u0f27",
- "\u0f28",
- "\u0f29",
- "\u0f21\u0f20",
- "\u0f21\u0f21",
- "12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, \u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0bdd",
- "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0b dd",
- "medium": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a",
- "mediumDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd",
- "mediumTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a",
- "short": "y-MM-dd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nu.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "dz-bt",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz.js
deleted file mode 100644
index 3ef63d10..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_dz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0f66\u0f94\u0f0b\u0f46\u0f0b",
- "\u0f55\u0fb1\u0f72\u0f0b\u0f46\u0f0b"
- ],
- "DAY": [
- "\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0f5f\u0fb3\u0f0b\u0f51\u0f44\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f63\u0f94\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54\u0f0b",
- "\u0f5f\u0fb3\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54\u0f0b"
- ],
- "SHORTDAY": [
- "\u0f5f\u0fb3\u0f0b",
- "\u0f58\u0f72\u0f62\u0f0b",
- "\u0f63\u0fb7\u0f42\u0f0b",
- "\u0f55\u0f74\u0f62\u0f0b",
- "\u0f66\u0f44\u0f66\u0f0b",
- "\u0f66\u0fa4\u0f7a\u0f53\u0f0b",
- "\u0f49\u0f72\u0f0b"
- ],
- "SHORTMONTH": [
- "\u0f21",
- "\u0f22",
- "\u0f23",
- "\u0f24",
- "\u0f25",
- "\u0f26",
- "\u0f27",
- "\u0f28",
- "\u0f29",
- "\u0f21\u0f20",
- "\u0f21\u0f21",
- "12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, \u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0bdd",
- "longDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by MMMM \u0f5a\u0f7a\u0f66\u0f0b dd",
- "medium": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a",
- "mediumDate": "\u0f66\u0fa4\u0fb1\u0f72\u0f0b\u0f63\u0f7c\u0f0by \u0f5f\u0fb3\u0f0bMMM \u0f5a\u0f7a\u0f66\u0f0bdd",
- "mediumTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0bh:mm:ss a",
- "short": "y-MM-dd \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b h \u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nu.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "dz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu-ke.js
deleted file mode 100644
index 6f6761f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "KI",
- "UT"
- ],
- "DAY": [
- "Kiumia",
- "Njumatatu",
- "Njumaine",
- "Njumatano",
- "Aramithi",
- "Njumaa",
- "NJumamothii"
- ],
- "ERANAMES": [
- "Mbere ya Kristo",
- "Thutha wa Kristo"
- ],
- "ERAS": [
- "MK",
- "TK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mweri wa mbere",
- "Mweri wa ka\u0129ri",
- "Mweri wa kathat\u0169",
- "Mweri wa kana",
- "Mweri wa gatano",
- "Mweri wa gatantat\u0169",
- "Mweri wa m\u0169gwanja",
- "Mweri wa kanana",
- "Mweri wa kenda",
- "Mweri wa ik\u0169mi",
- "Mweri wa ik\u0169mi na \u0169mwe",
- "Mweri wa ik\u0169mi na Ka\u0129r\u0129"
- ],
- "SHORTDAY": [
- "Kma",
- "Tat",
- "Ine",
- "Tan",
- "Arm",
- "Maa",
- "NMM"
- ],
- "SHORTMONTH": [
- "Mbe",
- "Kai",
- "Kat",
- "Kan",
- "Gat",
- "Gan",
- "Mug",
- "Knn",
- "Ken",
- "Iku",
- "Imw",
- "Igi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ebu-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu.js
deleted file mode 100644
index d92a16d2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ebu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "KI",
- "UT"
- ],
- "DAY": [
- "Kiumia",
- "Njumatatu",
- "Njumaine",
- "Njumatano",
- "Aramithi",
- "Njumaa",
- "NJumamothii"
- ],
- "ERANAMES": [
- "Mbere ya Kristo",
- "Thutha wa Kristo"
- ],
- "ERAS": [
- "MK",
- "TK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mweri wa mbere",
- "Mweri wa ka\u0129ri",
- "Mweri wa kathat\u0169",
- "Mweri wa kana",
- "Mweri wa gatano",
- "Mweri wa gatantat\u0169",
- "Mweri wa m\u0169gwanja",
- "Mweri wa kanana",
- "Mweri wa kenda",
- "Mweri wa ik\u0169mi",
- "Mweri wa ik\u0169mi na \u0169mwe",
- "Mweri wa ik\u0169mi na Ka\u0129r\u0129"
- ],
- "SHORTDAY": [
- "Kma",
- "Tat",
- "Ine",
- "Tan",
- "Arm",
- "Maa",
- "NMM"
- ],
- "SHORTMONTH": [
- "Mbe",
- "Kai",
- "Kat",
- "Kan",
- "Gat",
- "Gan",
- "Mug",
- "Knn",
- "Ken",
- "Iku",
- "Imw",
- "Igi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ebu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-gh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-gh.js
deleted file mode 100644
index 16848bab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-gh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u014bdi",
- "\u0263etr\u0254"
- ],
- "DAY": [
- "k\u0254si\u0256a",
- "dzo\u0256a",
- "bla\u0256a",
- "ku\u0256a",
- "yawo\u0256a",
- "fi\u0256a",
- "memle\u0256a"
- ],
- "ERANAMES": [
- "Hafi Yesu Va Do \u014bg\u0254",
- "Yesu \u014a\u0254li"
- ],
- "ERAS": [
- "hY",
- "Y\u014b"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dzove",
- "dzodze",
- "tedoxe",
- "af\u0254f\u0129e",
- "dama",
- "masa",
- "siaml\u0254m",
- "deasiamime",
- "any\u0254ny\u0254",
- "kele",
- "ade\u025bmekp\u0254xe",
- "dzome"
- ],
- "SHORTDAY": [
- "k\u0254s",
- "dzo",
- "bla",
- "ku\u0256",
- "yaw",
- "fi\u0256",
- "mem"
- ],
- "SHORTMONTH": [
- "dzv",
- "dzd",
- "ted",
- "af\u0254",
- "dam",
- "mas",
- "sia",
- "dea",
- "any",
- "kel",
- "ade",
- "dzm"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d 'lia' y",
- "longDate": "MMMM d 'lia' y",
- "medium": "MMM d 'lia', y a 'ga' h:mm:ss",
- "mediumDate": "MMM d 'lia', y",
- "mediumTime": "a 'ga' h:mm:ss",
- "short": "M/d/yy a 'ga' h:mm",
- "shortDate": "M/d/yy",
- "shortTime": "a 'ga' h:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GHS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ee-gh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-tg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-tg.js
deleted file mode 100644
index de48746a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee-tg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u014bdi",
- "\u0263etr\u0254"
- ],
- "DAY": [
- "k\u0254si\u0256a",
- "dzo\u0256a",
- "bla\u0256a",
- "ku\u0256a",
- "yawo\u0256a",
- "fi\u0256a",
- "memle\u0256a"
- ],
- "ERANAMES": [
- "Hafi Yesu Va Do \u014bg\u0254",
- "Yesu \u014a\u0254li"
- ],
- "ERAS": [
- "hY",
- "Y\u014b"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dzove",
- "dzodze",
- "tedoxe",
- "af\u0254f\u0129e",
- "dama",
- "masa",
- "siaml\u0254m",
- "deasiamime",
- "any\u0254ny\u0254",
- "kele",
- "ade\u025bmekp\u0254xe",
- "dzome"
- ],
- "SHORTDAY": [
- "k\u0254s",
- "dzo",
- "bla",
- "ku\u0256",
- "yaw",
- "fi\u0256",
- "mem"
- ],
- "SHORTMONTH": [
- "dzv",
- "dzd",
- "ted",
- "af\u0254",
- "dam",
- "mas",
- "sia",
- "dea",
- "any",
- "kel",
- "ade",
- "dzm"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d 'lia' y",
- "longDate": "MMMM d 'lia' y",
- "medium": "MMM d 'lia', y a 'ga' h:mm:ss",
- "mediumDate": "MMM d 'lia', y",
- "mediumTime": "a 'ga' h:mm:ss",
- "short": "M/d/yy a 'ga' h:mm",
- "shortDate": "M/d/yy",
- "shortTime": "a 'ga' h:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ee-tg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee.js
deleted file mode 100644
index fdc03beb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ee.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u014bdi",
- "\u0263etr\u0254"
- ],
- "DAY": [
- "k\u0254si\u0256a",
- "dzo\u0256a",
- "bla\u0256a",
- "ku\u0256a",
- "yawo\u0256a",
- "fi\u0256a",
- "memle\u0256a"
- ],
- "ERANAMES": [
- "Hafi Yesu Va Do \u014bg\u0254",
- "Yesu \u014a\u0254li"
- ],
- "ERAS": [
- "hY",
- "Y\u014b"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dzove",
- "dzodze",
- "tedoxe",
- "af\u0254f\u0129e",
- "dama",
- "masa",
- "siaml\u0254m",
- "deasiamime",
- "any\u0254ny\u0254",
- "kele",
- "ade\u025bmekp\u0254xe",
- "dzome"
- ],
- "SHORTDAY": [
- "k\u0254s",
- "dzo",
- "bla",
- "ku\u0256",
- "yaw",
- "fi\u0256",
- "mem"
- ],
- "SHORTMONTH": [
- "dzv",
- "dzd",
- "ted",
- "af\u0254",
- "dam",
- "mas",
- "sia",
- "dea",
- "any",
- "kel",
- "ade",
- "dzm"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d 'lia' y",
- "longDate": "MMMM d 'lia' y",
- "medium": "MMM d 'lia', y a 'ga' h:mm:ss",
- "mediumDate": "MMM d 'lia', y",
- "mediumTime": "a 'ga' h:mm:ss",
- "short": "M/d/yy a 'ga' h:mm",
- "shortDate": "M/d/yy",
- "shortTime": "a 'ga' h:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GHS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ee",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-cy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-cy.js
deleted file mode 100644
index 5637d3fb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-cy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u03c0.\u03bc.",
- "\u03bc.\u03bc."
- ],
- "DAY": [
- "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
- "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
- "\u03a4\u03c1\u03af\u03c4\u03b7",
- "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
- "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
- "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
- "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf"
- ],
- "ERANAMES": [
- "\u03c0\u03c1\u03bf \u03a7\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd",
- "\u03bc\u03b5\u03c4\u03ac \u03a7\u03c1\u03b9\u03c3\u03c4\u03cc\u03bd"
- ],
- "ERAS": [
- "\u03c0.\u03a7.",
- "\u03bc.\u03a7."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5",
- "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5",
- "\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5",
- "\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5",
- "\u039c\u03b1\u0390\u03bf\u03c5",
- "\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5",
- "\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5",
- "\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5",
- "\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5"
- ],
- "SHORTDAY": [
- "\u039a\u03c5\u03c1",
- "\u0394\u03b5\u03c5",
- "\u03a4\u03c1\u03af",
- "\u03a4\u03b5\u03c4",
- "\u03a0\u03ad\u03bc",
- "\u03a0\u03b1\u03c1",
- "\u03a3\u03ac\u03b2"
- ],
- "SHORTMONTH": [
- "\u0399\u03b1\u03bd",
- "\u03a6\u03b5\u03b2",
- "\u039c\u03b1\u03c1",
- "\u0391\u03c0\u03c1",
- "\u039c\u03b1\u0390",
- "\u0399\u03bf\u03c5\u03bd",
- "\u0399\u03bf\u03c5\u03bb",
- "\u0391\u03c5\u03b3",
- "\u03a3\u03b5\u03c0",
- "\u039f\u03ba\u03c4",
- "\u039d\u03bf\u03b5",
- "\u0394\u03b5\u03ba"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "el-cy",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-gr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-gr.js
deleted file mode 100644
index 72c8b719..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el-gr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u03c0.\u03bc.",
- "\u03bc.\u03bc."
- ],
- "DAY": [
- "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
- "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
- "\u03a4\u03c1\u03af\u03c4\u03b7",
- "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
- "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
- "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
- "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf"
- ],
- "ERANAMES": [
- "\u03c0\u03c1\u03bf \u03a7\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd",
- "\u03bc\u03b5\u03c4\u03ac \u03a7\u03c1\u03b9\u03c3\u03c4\u03cc\u03bd"
- ],
- "ERAS": [
- "\u03c0.\u03a7.",
- "\u03bc.\u03a7."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5",
- "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5",
- "\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5",
- "\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5",
- "\u039c\u03b1\u0390\u03bf\u03c5",
- "\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5",
- "\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5",
- "\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5",
- "\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5"
- ],
- "SHORTDAY": [
- "\u039a\u03c5\u03c1",
- "\u0394\u03b5\u03c5",
- "\u03a4\u03c1\u03af",
- "\u03a4\u03b5\u03c4",
- "\u03a0\u03ad\u03bc",
- "\u03a0\u03b1\u03c1",
- "\u03a3\u03ac\u03b2"
- ],
- "SHORTMONTH": [
- "\u0399\u03b1\u03bd",
- "\u03a6\u03b5\u03b2",
- "\u039c\u03b1\u03c1",
- "\u0391\u03c0\u03c1",
- "\u039c\u03b1\u0390",
- "\u0399\u03bf\u03c5\u03bd",
- "\u0399\u03bf\u03c5\u03bb",
- "\u0391\u03c5\u03b3",
- "\u03a3\u03b5\u03c0",
- "\u039f\u03ba\u03c4",
- "\u039d\u03bf\u03b5",
- "\u0394\u03b5\u03ba"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "el-gr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el.js
deleted file mode 100644
index 216542b8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_el.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u03c0.\u03bc.",
- "\u03bc.\u03bc."
- ],
- "DAY": [
- "\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae",
- "\u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1",
- "\u03a4\u03c1\u03af\u03c4\u03b7",
- "\u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
- "\u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
- "\u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae",
- "\u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf"
- ],
- "ERANAMES": [
- "\u03c0\u03c1\u03bf \u03a7\u03c1\u03b9\u03c3\u03c4\u03bf\u03cd",
- "\u03bc\u03b5\u03c4\u03ac \u03a7\u03c1\u03b9\u03c3\u03c4\u03cc\u03bd"
- ],
- "ERAS": [
- "\u03c0.\u03a7.",
- "\u03bc.\u03a7."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5",
- "\u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5",
- "\u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5",
- "\u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5",
- "\u039c\u03b1\u0390\u03bf\u03c5",
- "\u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5",
- "\u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5",
- "\u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5",
- "\u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5",
- "\u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5"
- ],
- "SHORTDAY": [
- "\u039a\u03c5\u03c1",
- "\u0394\u03b5\u03c5",
- "\u03a4\u03c1\u03af",
- "\u03a4\u03b5\u03c4",
- "\u03a0\u03ad\u03bc",
- "\u03a0\u03b1\u03c1",
- "\u03a3\u03ac\u03b2"
- ],
- "SHORTMONTH": [
- "\u0399\u03b1\u03bd",
- "\u03a6\u03b5\u03b2",
- "\u039c\u03b1\u03c1",
- "\u0391\u03c0\u03c1",
- "\u039c\u03b1\u0390",
- "\u0399\u03bf\u03c5\u03bd",
- "\u0399\u03bf\u03c5\u03bb",
- "\u0391\u03c5\u03b3",
- "\u03a3\u03b5\u03c0",
- "\u039f\u03ba\u03c4",
- "\u039d\u03bf\u03b5",
- "\u0394\u03b5\u03ba"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "el",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-001.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-001.js
deleted file mode 100644
index 49c98073..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-001.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-001",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-150.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-150.js
deleted file mode 100644
index 88468dad..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-150.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "en-150",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ag.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ag.js
deleted file mode 100644
index effeae65..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ag.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ag",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ai.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ai.js
deleted file mode 100644
index 29a39cb3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ai.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ai",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-as.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-as.js
deleted file mode 100644
index b121ecba..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-as.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-as",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-au.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-au.js
deleted file mode 100644
index a1ea9d76..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-au.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/y h:mm a",
- "shortDate": "d/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-au",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bb.js
deleted file mode 100644
index a183bab2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-bb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-be.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-be.js
deleted file mode 100644
index 8a79877f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-be.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "en-be",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bm.js
deleted file mode 100644
index 217c162f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-bm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bs.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bs.js
deleted file mode 100644
index dfcf301e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bs.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-bs",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bw.js
deleted file mode 100644
index 9433a32d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "P",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-bw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bz.js
deleted file mode 100644
index 50b70783..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-bz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y HH:mm:ss",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-bz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ca.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ca.js
deleted file mode 100644
index 5ca0d1d3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ca.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "y-MM-dd h:mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ca",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cc.js
deleted file mode 100644
index e840c699..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-cc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ck.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ck.js
deleted file mode 100644
index 5cdb9138..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ck.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ck",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cm.js
deleted file mode 100644
index 06821311..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cx.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cx.js
deleted file mode 100644
index e6c4f106..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-cx.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-cx",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dg.js
deleted file mode 100644
index 6c2c605f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-dg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dm.js
deleted file mode 100644
index 7225a1dd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-dm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-dm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-er.js
deleted file mode 100644
index 85232a6a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-er.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-er",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fj.js
deleted file mode 100644
index a7dfbe68..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fj.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-fj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fk.js
deleted file mode 100644
index 5da1bcb8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-fk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fm.js
deleted file mode 100644
index 19cfa055..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-fm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-fm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gb.js
deleted file mode 100644
index 3eb37db2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gd.js
deleted file mode 100644
index 4fbcd1c3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gg.js
deleted file mode 100644
index 8da65cc0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gh.js
deleted file mode 100644
index bcaa1bcc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GHS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gi.js
deleted file mode 100644
index 926bacd0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gm.js
deleted file mode 100644
index fec1b604..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GMD",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gu.js
deleted file mode 100644
index 68d66d51..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gy.js
deleted file mode 100644
index 405cfc39..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-gy.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-gy",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-hk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-hk.js
deleted file mode 100644
index 6efd6924..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-hk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/y h:mm a",
- "shortDate": "d/M/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-hk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ie.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ie.js
deleted file mode 100644
index d6eb9505..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ie.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ie",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-im.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-im.js
deleted file mode 100644
index b9d1717c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-im.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-im",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-in.js
deleted file mode 100644
index 050ef178..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "en-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-io.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-io.js
deleted file mode 100644
index 3e0cc47f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-io.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-io",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-iso.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-iso.js
deleted file mode 100644
index 4e1ba795..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-iso.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yyyy-MM-dd HH:mm",
- "shortDate": "yyyy-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-iso",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-je.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-je.js
deleted file mode 100644
index 6883396c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-je.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-je",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-jm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-jm.js
deleted file mode 100644
index 080daec1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-jm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-jm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ke.js
deleted file mode 100644
index e0e16af6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ki.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ki.js
deleted file mode 100644
index de6c4ff5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ki.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ki",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-kn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-kn.js
deleted file mode 100644
index 88f8d651..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-kn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-kn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ky.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ky.js
deleted file mode 100644
index f19fdb76..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ky.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ky",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lc.js
deleted file mode 100644
index cf95b831..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-lc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lr.js
deleted file mode 100644
index 87c7c8c5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-lr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-lr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ls.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ls.js
deleted file mode 100644
index 08575f9e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ls.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ls",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mg.js
deleted file mode 100644
index 10c070ab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ar",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mh.js
deleted file mode 100644
index 3ec0b3d4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mo.js
deleted file mode 100644
index e56ec63c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MOP",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mp.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mp.js
deleted file mode 100644
index 1d830bf7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mp.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mp",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ms.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ms.js
deleted file mode 100644
index 599a03fe..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ms.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ms",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mt.js
deleted file mode 100644
index 05818a8b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mt.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mt",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mu.js
deleted file mode 100644
index 37e64915..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MURs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mw.js
deleted file mode 100644
index d850392c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-mw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MWK",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-mw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-my.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-my.js
deleted file mode 100644
index f02af281..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-my.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RM",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-my",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-na.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-na.js
deleted file mode 100644
index 13dc95aa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-na.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-na",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nf.js
deleted file mode 100644
index 72154ecb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nf.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-nf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ng.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ng.js
deleted file mode 100644
index 3f506f47..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ng.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ng",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nr.js
deleted file mode 100644
index fb7e1319..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-nr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nu.js
deleted file mode 100644
index 3ff530dd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-nu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nz.js
deleted file mode 100644
index b0c2ce07..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-nz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d/MM/y h:mm:ss a",
- "mediumDate": "d/MM/y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-nz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pg.js
deleted file mode 100644
index e4379057..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "PGK",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-pg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ph.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ph.js
deleted file mode 100644
index a1ae7ea8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ph.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b1",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ph",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pk.js
deleted file mode 100644
index 4d99a3e6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-pk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pn.js
deleted file mode 100644
index 460e76ab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-pn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pr.js
deleted file mode 100644
index 5a2e9ef5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-pr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pw.js
deleted file mode 100644
index 5be68581..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-pw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-pw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-rw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-rw.js
deleted file mode 100644
index 477fe01e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-rw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-rw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sb.js
deleted file mode 100644
index 4f195c03..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sc.js
deleted file mode 100644
index c77368e4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SCR",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sd.js
deleted file mode 100644
index 642fed13..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SDG",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sg.js
deleted file mode 100644
index 9a573044..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sh.js
deleted file mode 100644
index f44ca8a1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sl.js
deleted file mode 100644
index c66cc354..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SLL",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ss.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ss.js
deleted file mode 100644
index 8c0e6947..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ss.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ss",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sx.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sx.js
deleted file mode 100644
index b84c964f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sx.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "NAf.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sx",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sz.js
deleted file mode 100644
index 5dc361c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-sz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SZL",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-sz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tc.js
deleted file mode 100644
index d075f25c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-tc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tk.js
deleted file mode 100644
index 048c9256..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-tk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-to.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-to.js
deleted file mode 100644
index a208e521..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-to.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "T$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-to",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tt.js
deleted file mode 100644
index c10e2eea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tt.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-tt",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tv.js
deleted file mode 100644
index 32c7a2c8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tv.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-tv",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tz.js
deleted file mode 100644
index 488954d7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ug.js
deleted file mode 100644
index 9cde496b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-um.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-um.js
deleted file mode 100644
index 827b56c1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-um.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-um",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-us.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-us.js
deleted file mode 100644
index 9a9bfe82..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-us.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-us",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vc.js
deleted file mode 100644
index f9c1ab9b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-vc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vg.js
deleted file mode 100644
index 74fabbf8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-vg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vi.js
deleted file mode 100644
index 3d02ce57..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-vi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vu.js
deleted file mode 100644
index a9f6a6ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-vu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "VUV",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-vu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ws.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ws.js
deleted file mode 100644
index 49d0931e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-ws.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "WST",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-ws",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-za.js
deleted file mode 100644
index 56283c80..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd MMM y h:mm:ss a",
- "mediumDate": "dd MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "y/MM/dd h:mm a",
- "shortDate": "y/MM/dd",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zm.js
deleted file mode 100644
index 78a5cd99..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "ZMW",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-zm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zw.js
deleted file mode 100644
index 84125681..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en-zw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd MMM,y h:mm:ss a",
- "mediumDate": "dd MMM,y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/y h:mm a",
- "shortDate": "d/M/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-zw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en.js
deleted file mode 100644
index 55076c84..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_en.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo-001.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo-001.js
deleted file mode 100644
index 4a153257..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo-001.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "atm",
- "ptm"
- ],
- "DAY": [
- "diman\u0109o",
- "lundo",
- "mardo",
- "merkredo",
- "\u0135a\u016ddo",
- "vendredo",
- "sabato"
- ],
- "ERANAMES": [
- "aK",
- "pK"
- ],
- "ERAS": [
- "aK",
- "pK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januaro",
- "februaro",
- "marto",
- "aprilo",
- "majo",
- "junio",
- "julio",
- "a\u016dgusto",
- "septembro",
- "oktobro",
- "novembro",
- "decembro"
- ],
- "SHORTDAY": [
- "di",
- "lu",
- "ma",
- "me",
- "\u0135a",
- "ve",
- "sa"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "a\u016dg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d-'a' 'de' MMMM y",
- "longDate": "y-MMMM-dd",
- "medium": "y-MMM-dd HH:mm:ss",
- "mediumDate": "y-MMM-dd",
- "mediumTime": "HH:mm:ss",
- "short": "yy-MM-dd HH:mm",
- "shortDate": "yy-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "eo-001",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo.js
deleted file mode 100644
index b70d7a05..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "atm",
- "ptm"
- ],
- "DAY": [
- "diman\u0109o",
- "lundo",
- "mardo",
- "merkredo",
- "\u0135a\u016ddo",
- "vendredo",
- "sabato"
- ],
- "ERANAMES": [
- "aK",
- "pK"
- ],
- "ERAS": [
- "aK",
- "pK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januaro",
- "februaro",
- "marto",
- "aprilo",
- "majo",
- "junio",
- "julio",
- "a\u016dgusto",
- "septembro",
- "oktobro",
- "novembro",
- "decembro"
- ],
- "SHORTDAY": [
- "di",
- "lu",
- "ma",
- "me",
- "\u0135a",
- "ve",
- "sa"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "a\u016dg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d-'a' 'de' MMMM y",
- "longDate": "y-MMMM-dd",
- "medium": "y-MMM-dd HH:mm:ss",
- "mediumDate": "y-MMM-dd",
- "mediumTime": "HH:mm:ss",
- "short": "yy-MM-dd HH:mm",
- "shortDate": "yy-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "eo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-419.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-419.js
deleted file mode 100644
index 00dcab26..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-419.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-419",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ar.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ar.js
deleted file mode 100644
index 155dfad9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ar.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-ar",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-bo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-bo.js
deleted file mode 100644
index b7aa597b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-bo.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Bs",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-bo",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cl.js
deleted file mode 100644
index 2b4a8a5a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd-MM-y h:mm:ss a",
- "mediumDate": "dd-MM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd-MM-yy h:mm a",
- "shortDate": "dd-MM-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-cl",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-co.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-co.js
deleted file mode 100644
index 46b4d6bf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-co.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d/MM/y h:mm:ss a",
- "mediumDate": "d/MM/y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-co",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cr.js
deleted file mode 100644
index 42927de9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a1",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-cr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cu.js
deleted file mode 100644
index ec16c71b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-cu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-cu",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-do.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-do.js
deleted file mode 100644
index beedf8a3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-do.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-do",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ea.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ea.js
deleted file mode 100644
index ffefb9d1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ea.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "es-ea",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ec.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ec.js
deleted file mode 100644
index 10949c12..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ec.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-ec",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-es.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-es.js
deleted file mode 100644
index 9d0eb656..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-es.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "es-es",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gq.js
deleted file mode 100644
index d8fcd4b7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gq.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-gq",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gt.js
deleted file mode 100644
index e9b27cc0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-gt.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d/MM/y h:mm:ss a",
- "mediumDate": "d/MM/y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Q",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-gt",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-hn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-hn.js
deleted file mode 100644
index 1fc839e6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-hn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd 'de' MMMM 'de' y",
- "longDate": "dd 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "L",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-hn",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ic.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ic.js
deleted file mode 100644
index 10987395..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ic.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "es-ic",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-mx.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-mx.js
deleted file mode 100644
index 95eb1456..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-mx.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene",
- "feb",
- "mar",
- "abr",
- "may",
- "jun",
- "jul",
- "ago",
- "sep",
- "oct",
- "nov",
- "dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y h:mm:ss a",
- "mediumDate": "dd/MM/y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-mx",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ni.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ni.js
deleted file mode 100644
index 775fb5fd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ni.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "C$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-ni",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pa.js
deleted file mode 100644
index 141605ed..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pa.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "MM/dd/y h:mm:ss a",
- "mediumDate": "MM/dd/y",
- "mediumTime": "h:mm:ss a",
- "short": "MM/dd/yy h:mm a",
- "shortDate": "MM/dd/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "B/.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-pa",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pe.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pe.js
deleted file mode 100644
index ea7dfd22..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pe.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "setiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "set.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "S/.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-pe",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ph.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ph.js
deleted file mode 100644
index 0d7bc983..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ph.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b1",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "es-ph",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pr.js
deleted file mode 100644
index 0ac3ff95..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-pr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "MM/dd/y h:mm:ss a",
- "mediumDate": "MM/dd/y",
- "mediumTime": "h:mm:ss a",
- "short": "MM/dd/yy h:mm a",
- "shortDate": "MM/dd/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-pr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-py.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-py.js
deleted file mode 100644
index 3dd2301b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-py.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Gs",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "es-py",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-sv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-sv.js
deleted file mode 100644
index 9a7574f2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-sv.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-sv",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-us.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-us.js
deleted file mode 100644
index bb8e3ccc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-us.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-us",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-uy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-uy.js
deleted file mode 100644
index adfccd9f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-uy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "setiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "set.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "es-uy",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ve.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ve.js
deleted file mode 100644
index ed2093cf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es-ve.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Bs",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "es-ve",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es.js
deleted file mode 100644
index 929ab026..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_es.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a. m.",
- "p. m."
- ],
- "DAY": [
- "domingo",
- "lunes",
- "martes",
- "mi\u00e9rcoles",
- "jueves",
- "viernes",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despu\u00e9s de Cristo"
- ],
- "ERAS": [
- "a. C.",
- "d. C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "enero",
- "febrero",
- "marzo",
- "abril",
- "mayo",
- "junio",
- "julio",
- "agosto",
- "septiembre",
- "octubre",
- "noviembre",
- "diciembre"
- ],
- "SHORTDAY": [
- "dom.",
- "lun.",
- "mar.",
- "mi\u00e9.",
- "jue.",
- "vie.",
- "s\u00e1b."
- ],
- "SHORTMONTH": [
- "ene.",
- "feb.",
- "mar.",
- "abr.",
- "may.",
- "jun.",
- "jul.",
- "ago.",
- "sept.",
- "oct.",
- "nov.",
- "dic."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/yy H:mm",
- "shortDate": "d/M/yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "es",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et-ee.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et-ee.js
deleted file mode 100644
index 3b900ae3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et-ee.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "p\u00fchap\u00e4ev",
- "esmasp\u00e4ev",
- "teisip\u00e4ev",
- "kolmap\u00e4ev",
- "neljap\u00e4ev",
- "reede",
- "laup\u00e4ev"
- ],
- "ERANAMES": [
- "enne meie aega",
- "meie aja j\u00e4rgi"
- ],
- "ERAS": [
- "e.m.a.",
- "m.a.j."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "jaanuar",
- "veebruar",
- "m\u00e4rts",
- "aprill",
- "mai",
- "juuni",
- "juuli",
- "august",
- "september",
- "oktoober",
- "november",
- "detsember"
- ],
- "SHORTDAY": [
- "P",
- "E",
- "T",
- "K",
- "N",
- "R",
- "L"
- ],
- "SHORTMONTH": [
- "jaan",
- "veebr",
- "m\u00e4rts",
- "apr",
- "mai",
- "juuni",
- "juuli",
- "aug",
- "sept",
- "okt",
- "nov",
- "dets"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y H:mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "H:mm.ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "et-ee",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et.js
deleted file mode 100644
index d10ad68a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_et.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "p\u00fchap\u00e4ev",
- "esmasp\u00e4ev",
- "teisip\u00e4ev",
- "kolmap\u00e4ev",
- "neljap\u00e4ev",
- "reede",
- "laup\u00e4ev"
- ],
- "ERANAMES": [
- "enne meie aega",
- "meie aja j\u00e4rgi"
- ],
- "ERAS": [
- "e.m.a.",
- "m.a.j."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "jaanuar",
- "veebruar",
- "m\u00e4rts",
- "aprill",
- "mai",
- "juuni",
- "juuli",
- "august",
- "september",
- "oktoober",
- "november",
- "detsember"
- ],
- "SHORTDAY": [
- "P",
- "E",
- "T",
- "K",
- "N",
- "R",
- "L"
- ],
- "SHORTMONTH": [
- "jaan",
- "veebr",
- "m\u00e4rts",
- "apr",
- "mai",
- "juuni",
- "juuli",
- "aug",
- "sept",
- "okt",
- "nov",
- "dets"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y H:mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "H:mm.ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu-es.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu-es.js
deleted file mode 100644
index 3a38161c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu-es.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "igandea",
- "astelehena",
- "asteartea",
- "asteazkena",
- "osteguna",
- "ostirala",
- "larunbata"
- ],
- "ERANAMES": [
- "K.a.",
- "K.o."
- ],
- "ERAS": [
- "K.a.",
- "K.o."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "urtarrilak",
- "otsailak",
- "martxoak",
- "apirilak",
- "maiatzak",
- "ekainak",
- "uztailak",
- "abuztuak",
- "irailak",
- "urriak",
- "azaroak",
- "abenduak"
- ],
- "SHORTDAY": [
- "ig.",
- "al.",
- "ar.",
- "az.",
- "og.",
- "or.",
- "lr."
- ],
- "SHORTMONTH": [
- "urt.",
- "ots.",
- "mar.",
- "api.",
- "mai.",
- "eka.",
- "uzt.",
- "abu.",
- "ira.",
- "urr.",
- "aza.",
- "abe."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y('e')'ko' MMMM d, EEEE",
- "longDate": "y('e')'ko' MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y/MM/dd HH:mm",
- "shortDate": "y/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "eu-es",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu.js
deleted file mode 100644
index 47e84711..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_eu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "igandea",
- "astelehena",
- "asteartea",
- "asteazkena",
- "osteguna",
- "ostirala",
- "larunbata"
- ],
- "ERANAMES": [
- "K.a.",
- "K.o."
- ],
- "ERAS": [
- "K.a.",
- "K.o."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "urtarrilak",
- "otsailak",
- "martxoak",
- "apirilak",
- "maiatzak",
- "ekainak",
- "uztailak",
- "abuztuak",
- "irailak",
- "urriak",
- "azaroak",
- "abenduak"
- ],
- "SHORTDAY": [
- "ig.",
- "al.",
- "ar.",
- "az.",
- "og.",
- "or.",
- "lr."
- ],
- "SHORTMONTH": [
- "urt.",
- "ots.",
- "mar.",
- "api.",
- "mai.",
- "eka.",
- "uzt.",
- "abu.",
- "ira.",
- "urr.",
- "aza.",
- "abe."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y('e')'ko' MMMM d, EEEE",
- "longDate": "y('e')'ko' MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y/MM/dd HH:mm",
- "shortDate": "y/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "eu",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo-cm.js
deleted file mode 100644
index 0acddea8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "k\u00edk\u00edr\u00edg",
- "ng\u0259g\u00f3g\u0259le"
- ],
- "DAY": [
- "s\u0254\u0301nd\u0254",
- "m\u0254\u0301ndi",
- "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301b\u025b\u030c",
- "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301l\u025b\u0301",
- "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301nyi",
- "f\u00falad\u00e9",
- "s\u00e9rad\u00e9"
- ],
- "ERANAMES": [
- "os\u00fas\u00faa Y\u00e9sus kiri",
- "\u00e1mvus Y\u00e9sus Kir\u00eds"
- ],
- "ERAS": [
- "oyk",
- "ayk"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ng\u0254n os\u00fa",
- "ng\u0254n b\u025b\u030c",
- "ng\u0254n l\u00e1la",
- "ng\u0254n nyina",
- "ng\u0254n t\u00e1na",
- "ng\u0254n sam\u0259na",
- "ng\u0254n zamgb\u00e1la",
- "ng\u0254n mwom",
- "ng\u0254n ebul\u00fa",
- "ng\u0254n aw\u00f3m",
- "ng\u0254n aw\u00f3m ai dzi\u00e1",
- "ng\u0254n aw\u00f3m ai b\u025b\u030c"
- ],
- "SHORTDAY": [
- "s\u0254\u0301n",
- "m\u0254\u0301n",
- "smb",
- "sml",
- "smn",
- "f\u00fal",
- "s\u00e9r"
- ],
- "SHORTMONTH": [
- "ngo",
- "ngb",
- "ngl",
- "ngn",
- "ngt",
- "ngs",
- "ngz",
- "ngm",
- "nge",
- "nga",
- "ngad",
- "ngab"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ewo-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo.js
deleted file mode 100644
index dbef8cde..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ewo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "k\u00edk\u00edr\u00edg",
- "ng\u0259g\u00f3g\u0259le"
- ],
- "DAY": [
- "s\u0254\u0301nd\u0254",
- "m\u0254\u0301ndi",
- "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301b\u025b\u030c",
- "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301l\u025b\u0301",
- "s\u0254\u0301nd\u0254 m\u0259l\u00fa m\u0259\u0301nyi",
- "f\u00falad\u00e9",
- "s\u00e9rad\u00e9"
- ],
- "ERANAMES": [
- "os\u00fas\u00faa Y\u00e9sus kiri",
- "\u00e1mvus Y\u00e9sus Kir\u00eds"
- ],
- "ERAS": [
- "oyk",
- "ayk"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ng\u0254n os\u00fa",
- "ng\u0254n b\u025b\u030c",
- "ng\u0254n l\u00e1la",
- "ng\u0254n nyina",
- "ng\u0254n t\u00e1na",
- "ng\u0254n sam\u0259na",
- "ng\u0254n zamgb\u00e1la",
- "ng\u0254n mwom",
- "ng\u0254n ebul\u00fa",
- "ng\u0254n aw\u00f3m",
- "ng\u0254n aw\u00f3m ai dzi\u00e1",
- "ng\u0254n aw\u00f3m ai b\u025b\u030c"
- ],
- "SHORTDAY": [
- "s\u0254\u0301n",
- "m\u0254\u0301n",
- "smb",
- "sml",
- "smn",
- "f\u00fal",
- "s\u00e9r"
- ],
- "SHORTMONTH": [
- "ngo",
- "ngb",
- "ngl",
- "ngn",
- "ngt",
- "ngs",
- "ngz",
- "ngm",
- "nge",
- "nga",
- "ngad",
- "ngab"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ewo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-af.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-af.js
deleted file mode 100644
index e3fccd39..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-af.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631",
- "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631"
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f",
- "\u0645\u06cc\u0644\u0627\u062f\u06cc"
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0628\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648",
- "\u0641\u0648\u0631\u06cc\u0647\u0654",
- "\u0645\u0627\u0631\u0633",
- "\u0622\u0648\u0631\u06cc\u0644",
- "\u0645\u0640\u06cc",
- "\u0698\u0648\u0626\u0646",
- "\u062c\u0648\u0644",
- "\u0627\u0648\u062a",
- "\u0633\u067e\u062a\u0627\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0628\u0631",
- "\u0646\u0648\u0627\u0645\u0628\u0631",
- "\u062f\u0633\u0645"
- ],
- "WEEKENDRANGE": [
- 3,
- 4
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Af.",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u200e\u00a4",
- "negSuf": "",
- "posPre": "\u200e\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fa-af",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-ir.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-ir.js
deleted file mode 100644
index 44a72b74..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa-ir.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631",
- "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631"
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f",
- "\u0645\u06cc\u0644\u0627\u062f\u06cc"
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654",
- "\u0641\u0648\u0631\u06cc\u0647\u0654",
- "\u0645\u0627\u0631\u0633",
- "\u0622\u0648\u0631\u06cc\u0644",
- "\u0645\u0647\u0654",
- "\u0698\u0648\u0626\u0646",
- "\u0698\u0648\u0626\u06cc\u0647\u0654",
- "\u0627\u0648\u062a",
- "\u0633\u067e\u062a\u0627\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0628\u0631",
- "\u0646\u0648\u0627\u0645\u0628\u0631",
- "\u062f\u0633\u0627\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "SHORTMONTH": [
- "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654",
- "\u0641\u0648\u0631\u06cc\u0647\u0654",
- "\u0645\u0627\u0631\u0633",
- "\u0622\u0648\u0631\u06cc\u0644",
- "\u0645\u0647\u0654",
- "\u0698\u0648\u0626\u0646",
- "\u0698\u0648\u0626\u06cc\u0647\u0654",
- "\u0627\u0648\u062a",
- "\u0633\u067e\u062a\u0627\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0628\u0631",
- "\u0646\u0648\u0627\u0645\u0628\u0631",
- "\u062f\u0633\u0627\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 4
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u200e\u00a4",
- "negSuf": "",
- "posPre": "\u200e\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fa-ir",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa.js
deleted file mode 100644
index 48eb5dd0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fa.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0642\u0628\u0644\u200c\u0627\u0632\u0638\u0647\u0631",
- "\u0628\u0639\u062f\u0627\u0632\u0638\u0647\u0631"
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0627\u0632 \u0645\u06cc\u0644\u0627\u062f",
- "\u0645\u06cc\u0644\u0627\u062f\u06cc"
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654",
- "\u0641\u0648\u0631\u06cc\u0647\u0654",
- "\u0645\u0627\u0631\u0633",
- "\u0622\u0648\u0631\u06cc\u0644",
- "\u0645\u0647\u0654",
- "\u0698\u0648\u0626\u0646",
- "\u0698\u0648\u0626\u06cc\u0647\u0654",
- "\u0627\u0648\u062a",
- "\u0633\u067e\u062a\u0627\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0628\u0631",
- "\u0646\u0648\u0627\u0645\u0628\u0631",
- "\u062f\u0633\u0627\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "SHORTMONTH": [
- "\u0698\u0627\u0646\u0648\u06cc\u0647\u0654",
- "\u0641\u0648\u0631\u06cc\u0647\u0654",
- "\u0645\u0627\u0631\u0633",
- "\u0622\u0648\u0631\u06cc\u0644",
- "\u0645\u0647\u0654",
- "\u0698\u0648\u0626\u0646",
- "\u0698\u0648\u0626\u06cc\u0647\u0654",
- "\u0627\u0648\u062a",
- "\u0633\u067e\u062a\u0627\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0628\u0631",
- "\u0646\u0648\u0627\u0645\u0628\u0631",
- "\u062f\u0633\u0627\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 4,
- 4
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rial",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u200e\u00a4",
- "negSuf": "",
- "posPre": "\u200e\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fa",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-cm.js
deleted file mode 100644
index 87589cf1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "subaka",
- "kikii\u0257e"
- ],
- "DAY": [
- "dewo",
- "aa\u0253nde",
- "mawbaare",
- "njeslaare",
- "naasaande",
- "mawnde",
- "hoore-biir"
- ],
- "ERANAMES": [
- "Hade Iisa",
- "Caggal Iisa"
- ],
- "ERAS": [
- "H-I",
- "C-I"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "siilo",
- "colte",
- "mbooy",
- "see\u0257to",
- "duujal",
- "korse",
- "morso",
- "juko",
- "siilto",
- "yarkomaa",
- "jolal",
- "bowte"
- ],
- "SHORTDAY": [
- "dew",
- "aa\u0253",
- "maw",
- "nje",
- "naa",
- "mwd",
- "hbi"
- ],
- "SHORTMONTH": [
- "sii",
- "col",
- "mbo",
- "see",
- "duu",
- "kor",
- "mor",
- "juk",
- "slt",
- "yar",
- "jol",
- "bow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ff-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-gn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-gn.js
deleted file mode 100644
index a7678f02..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-gn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "subaka",
- "kikii\u0257e"
- ],
- "DAY": [
- "dewo",
- "aa\u0253nde",
- "mawbaare",
- "njeslaare",
- "naasaande",
- "mawnde",
- "hoore-biir"
- ],
- "ERANAMES": [
- "Hade Iisa",
- "Caggal Iisa"
- ],
- "ERAS": [
- "H-I",
- "C-I"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "siilo",
- "colte",
- "mbooy",
- "see\u0257to",
- "duujal",
- "korse",
- "morso",
- "juko",
- "siilto",
- "yarkomaa",
- "jolal",
- "bowte"
- ],
- "SHORTDAY": [
- "dew",
- "aa\u0253",
- "maw",
- "nje",
- "naa",
- "mwd",
- "hbi"
- ],
- "SHORTMONTH": [
- "sii",
- "col",
- "mbo",
- "see",
- "duu",
- "kor",
- "mor",
- "juk",
- "slt",
- "yar",
- "jol",
- "bow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FG",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ff-gn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-mr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-mr.js
deleted file mode 100644
index c36b8a25..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-mr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "subaka",
- "kikii\u0257e"
- ],
- "DAY": [
- "dewo",
- "aa\u0253nde",
- "mawbaare",
- "njeslaare",
- "naasaande",
- "mawnde",
- "hoore-biir"
- ],
- "ERANAMES": [
- "Hade Iisa",
- "Caggal Iisa"
- ],
- "ERAS": [
- "H-I",
- "C-I"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "siilo",
- "colte",
- "mbooy",
- "see\u0257to",
- "duujal",
- "korse",
- "morso",
- "juko",
- "siilto",
- "yarkomaa",
- "jolal",
- "bowte"
- ],
- "SHORTDAY": [
- "dew",
- "aa\u0253",
- "maw",
- "nje",
- "naa",
- "mwd",
- "hbi"
- ],
- "SHORTMONTH": [
- "sii",
- "col",
- "mbo",
- "see",
- "duu",
- "kor",
- "mor",
- "juk",
- "slt",
- "yar",
- "jol",
- "bow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MRO",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ff-mr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-sn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-sn.js
deleted file mode 100644
index e71e7b62..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff-sn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "subaka",
- "kikii\u0257e"
- ],
- "DAY": [
- "dewo",
- "aa\u0253nde",
- "mawbaare",
- "njeslaare",
- "naasaande",
- "mawnde",
- "hoore-biir"
- ],
- "ERANAMES": [
- "Hade Iisa",
- "Caggal Iisa"
- ],
- "ERAS": [
- "H-I",
- "C-I"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "siilo",
- "colte",
- "mbooy",
- "see\u0257to",
- "duujal",
- "korse",
- "morso",
- "juko",
- "siilto",
- "yarkomaa",
- "jolal",
- "bowte"
- ],
- "SHORTDAY": [
- "dew",
- "aa\u0253",
- "maw",
- "nje",
- "naa",
- "mwd",
- "hbi"
- ],
- "SHORTMONTH": [
- "sii",
- "col",
- "mbo",
- "see",
- "duu",
- "kor",
- "mor",
- "juk",
- "slt",
- "yar",
- "jol",
- "bow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ff-sn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff.js
deleted file mode 100644
index 9ce7b830..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ff.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "subaka",
- "kikii\u0257e"
- ],
- "DAY": [
- "dewo",
- "aa\u0253nde",
- "mawbaare",
- "njeslaare",
- "naasaande",
- "mawnde",
- "hoore-biir"
- ],
- "ERANAMES": [
- "Hade Iisa",
- "Caggal Iisa"
- ],
- "ERAS": [
- "H-I",
- "C-I"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "siilo",
- "colte",
- "mbooy",
- "see\u0257to",
- "duujal",
- "korse",
- "morso",
- "juko",
- "siilto",
- "yarkomaa",
- "jolal",
- "bowte"
- ],
- "SHORTDAY": [
- "dew",
- "aa\u0253",
- "maw",
- "nje",
- "naa",
- "mwd",
- "hbi"
- ],
- "SHORTMONTH": [
- "sii",
- "col",
- "mbo",
- "see",
- "duu",
- "kor",
- "mor",
- "juk",
- "slt",
- "yar",
- "jol",
- "bow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ff",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi-fi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi-fi.js
deleted file mode 100644
index 44bd4120..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi-fi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ap.",
- "ip."
- ],
- "DAY": [
- "sunnuntaina",
- "maanantaina",
- "tiistaina",
- "keskiviikkona",
- "torstaina",
- "perjantaina",
- "lauantaina"
- ],
- "ERANAMES": [
- "ennen Kristuksen syntym\u00e4\u00e4",
- "j\u00e4lkeen Kristuksen syntym\u00e4n"
- ],
- "ERAS": [
- "eKr.",
- "jKr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "tammikuuta",
- "helmikuuta",
- "maaliskuuta",
- "huhtikuuta",
- "toukokuuta",
- "kes\u00e4kuuta",
- "hein\u00e4kuuta",
- "elokuuta",
- "syyskuuta",
- "lokakuuta",
- "marraskuuta",
- "joulukuuta"
- ],
- "SHORTDAY": [
- "su",
- "ma",
- "ti",
- "ke",
- "to",
- "pe",
- "la"
- ],
- "SHORTMONTH": [
- "tammikuuta",
- "helmikuuta",
- "maaliskuuta",
- "huhtikuuta",
- "toukokuuta",
- "kes\u00e4kuuta",
- "hein\u00e4kuuta",
- "elokuuta",
- "syyskuuta",
- "lokakuuta",
- "marraskuuta",
- "joulukuuta"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "cccc d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d.M.y H.mm.ss",
- "mediumDate": "d.M.y",
- "mediumTime": "H.mm.ss",
- "short": "d.M.y H.mm",
- "shortDate": "d.M.y",
- "shortTime": "H.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fi-fi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi.js
deleted file mode 100644
index ade16564..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ap.",
- "ip."
- ],
- "DAY": [
- "sunnuntaina",
- "maanantaina",
- "tiistaina",
- "keskiviikkona",
- "torstaina",
- "perjantaina",
- "lauantaina"
- ],
- "ERANAMES": [
- "ennen Kristuksen syntym\u00e4\u00e4",
- "j\u00e4lkeen Kristuksen syntym\u00e4n"
- ],
- "ERAS": [
- "eKr.",
- "jKr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "tammikuuta",
- "helmikuuta",
- "maaliskuuta",
- "huhtikuuta",
- "toukokuuta",
- "kes\u00e4kuuta",
- "hein\u00e4kuuta",
- "elokuuta",
- "syyskuuta",
- "lokakuuta",
- "marraskuuta",
- "joulukuuta"
- ],
- "SHORTDAY": [
- "su",
- "ma",
- "ti",
- "ke",
- "to",
- "pe",
- "la"
- ],
- "SHORTMONTH": [
- "tammikuuta",
- "helmikuuta",
- "maaliskuuta",
- "huhtikuuta",
- "toukokuuta",
- "kes\u00e4kuuta",
- "hein\u00e4kuuta",
- "elokuuta",
- "syyskuuta",
- "lokakuuta",
- "marraskuuta",
- "joulukuuta"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "cccc d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d.M.y H.mm.ss",
- "mediumDate": "d.M.y",
- "mediumTime": "H.mm.ss",
- "short": "d.M.y H.mm",
- "shortDate": "d.M.y",
- "shortTime": "H.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil-ph.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil-ph.js
deleted file mode 100644
index 541d3cde..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil-ph.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Linggo",
- "Lunes",
- "Martes",
- "Miyerkules",
- "Huwebes",
- "Biyernes",
- "Sabado"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Enero",
- "Pebrero",
- "Marso",
- "Abril",
- "Mayo",
- "Hunyo",
- "Hulyo",
- "Agosto",
- "Setyembre",
- "Oktubre",
- "Nobyembre",
- "Disyembre"
- ],
- "SHORTDAY": [
- "Lin",
- "Lun",
- "Mar",
- "Miy",
- "Huw",
- "Biy",
- "Sab"
- ],
- "SHORTMONTH": [
- "Ene",
- "Peb",
- "Mar",
- "Abr",
- "May",
- "Hun",
- "Hul",
- "Ago",
- "Set",
- "Okt",
- "Nob",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b1",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fil-ph",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil.js
deleted file mode 100644
index 5cded550..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fil.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Linggo",
- "Lunes",
- "Martes",
- "Miyerkules",
- "Huwebes",
- "Biyernes",
- "Sabado"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Enero",
- "Pebrero",
- "Marso",
- "Abril",
- "Mayo",
- "Hunyo",
- "Hulyo",
- "Agosto",
- "Setyembre",
- "Oktubre",
- "Nobyembre",
- "Disyembre"
- ],
- "SHORTDAY": [
- "Lin",
- "Lun",
- "Mar",
- "Miy",
- "Huw",
- "Biy",
- "Sab"
- ],
- "SHORTMONTH": [
- "Ene",
- "Peb",
- "Mar",
- "Abr",
- "May",
- "Hun",
- "Hul",
- "Ago",
- "Set",
- "Okt",
- "Nob",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b1",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fil",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo-fo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo-fo.js
deleted file mode 100644
index a861d8c3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo-fo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "um fyrrapartur",
- "um seinnapartur"
- ],
- "DAY": [
- "sunnudagur",
- "m\u00e1nadagur",
- "t\u00fdsdagur",
- "mikudagur",
- "h\u00f3sdagur",
- "fr\u00edggjadagur",
- "leygardagur"
- ],
- "ERANAMES": [
- "fyrir Krist",
- "eftir Krist"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "apr\u00edl",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "sun",
- "m\u00e1n",
- "t\u00fds",
- "mik",
- "h\u00f3s",
- "fr\u00ed",
- "ley"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "mai",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "d. MMM y",
- "medium": "dd-MM-y HH:mm:ss",
- "mediumDate": "dd-MM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fo-fo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo.js
deleted file mode 100644
index aa33cd32..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "um fyrrapartur",
- "um seinnapartur"
- ],
- "DAY": [
- "sunnudagur",
- "m\u00e1nadagur",
- "t\u00fdsdagur",
- "mikudagur",
- "h\u00f3sdagur",
- "fr\u00edggjadagur",
- "leygardagur"
- ],
- "ERANAMES": [
- "fyrir Krist",
- "eftir Krist"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "apr\u00edl",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "sun",
- "m\u00e1n",
- "t\u00fds",
- "mik",
- "h\u00f3s",
- "fr\u00ed",
- "ley"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "mai",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "d. MMM y",
- "medium": "dd-MM-y HH:mm:ss",
- "mediumDate": "dd-MM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "fo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-be.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-be.js
deleted file mode 100644
index acec9a42..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-be.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/MM/yy HH:mm",
- "shortDate": "d/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-be",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bf.js
deleted file mode 100644
index bd30d550..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-bf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bi.js
deleted file mode 100644
index 39d3b329..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bi.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FBu",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-bi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bj.js
deleted file mode 100644
index 6753f020..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bj.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-bj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bl.js
deleted file mode 100644
index 2f15f5a3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-bl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-bl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ca.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ca.js
deleted file mode 100644
index 6f5f703b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ca.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "yy-MM-dd HH:mm",
- "shortDate": "yy-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ca",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cd.js
deleted file mode 100644
index 1e1d1cc3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cd.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-cd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cf.js
deleted file mode 100644
index bf605538..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-cf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cg.js
deleted file mode 100644
index c4417732..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-cg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ch.js
deleted file mode 100644
index e69d2fe3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ch.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "fr-ch",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ci.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ci.js
deleted file mode 100644
index 2954b103..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ci.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ci",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cm.js
deleted file mode 100644
index d8f03d2e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-cm.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dj.js
deleted file mode 100644
index 9c850c29..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dj.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Fdj",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-dj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dz.js
deleted file mode 100644
index ae1e1c67..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-dz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-dz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-fr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-fr.js
deleted file mode 100644
index bdef4eff..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-fr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-fr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ga.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ga.js
deleted file mode 100644
index 6268c777..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ga.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ga",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gf.js
deleted file mode 100644
index a7d37a0f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-gf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gn.js
deleted file mode 100644
index 34f4b101..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FG",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-gn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gp.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gp.js
deleted file mode 100644
index 9db67089..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gp.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-gp",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gq.js
deleted file mode 100644
index 02bbba29..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-gq.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-gq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ht.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ht.js
deleted file mode 100644
index 116e0da6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ht.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "HTG",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ht",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-km.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-km.js
deleted file mode 100644
index e178c7f3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-km.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CF",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-km",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-lu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-lu.js
deleted file mode 100644
index bb236277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-lu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-lu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ma.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ma.js
deleted file mode 100644
index 92edf74b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ma.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ma",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mc.js
deleted file mode 100644
index 85e0233e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mc.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-mc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mf.js
deleted file mode 100644
index 2abced5c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-mf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mg.js
deleted file mode 100644
index 02d27478..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ar",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-mg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ml.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ml.js
deleted file mode 100644
index e4549e2b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ml.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ml",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mq.js
deleted file mode 100644
index 3973b32e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mq.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-mq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mr.js
deleted file mode 100644
index 5b993c6d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MRO",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-mr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mu.js
deleted file mode 100644
index 7b09bd2e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-mu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MURs",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-mu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-nc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-nc.js
deleted file mode 100644
index a0694a9f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-nc.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFP",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-nc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ne.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ne.js
deleted file mode 100644
index 7fd04821..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-ne.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-ne",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pf.js
deleted file mode 100644
index d5d023a3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFP",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-pf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pm.js
deleted file mode 100644
index 2ed15ec9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-pm.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-pm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-re.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-re.js
deleted file mode 100644
index 1c1e849e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-re.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-re",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-rw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-rw.js
deleted file mode 100644
index 8966b7a8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-rw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RF",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-rw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sc.js
deleted file mode 100644
index 80410913..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sc.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SCR",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-sc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sn.js
deleted file mode 100644
index 100a1025..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-sn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sy.js
deleted file mode 100644
index 8bcfaf1a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-sy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-sy",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-td.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-td.js
deleted file mode 100644
index 2341ef76..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-td.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-td",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tg.js
deleted file mode 100644
index a7c21313..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-tg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tn.js
deleted file mode 100644
index 14a31151..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-tn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-tn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-vu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-vu.js
deleted file mode 100644
index d23d528c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-vu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "VUV",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-vu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-wf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-wf.js
deleted file mode 100644
index bf5a357b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-wf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFP",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-wf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-yt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-yt.js
deleted file mode 100644
index 265a0324..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr-yt.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr-yt",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr.js
deleted file mode 100644
index f4d89ba2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimanche",
- "lundi",
- "mardi",
- "mercredi",
- "jeudi",
- "vendredi",
- "samedi"
- ],
- "ERANAMES": [
- "avant J\u00e9sus-Christ",
- "apr\u00e8s J\u00e9sus-Christ"
- ],
- "ERAS": [
- "av. J.-C.",
- "ap. J.-C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janvier",
- "f\u00e9vrier",
- "mars",
- "avril",
- "mai",
- "juin",
- "juillet",
- "ao\u00fbt",
- "septembre",
- "octobre",
- "novembre",
- "d\u00e9cembre"
- ],
- "SHORTDAY": [
- "dim.",
- "lun.",
- "mar.",
- "mer.",
- "jeu.",
- "ven.",
- "sam."
- ],
- "SHORTMONTH": [
- "janv.",
- "f\u00e9vr.",
- "mars",
- "avr.",
- "mai",
- "juin",
- "juil.",
- "ao\u00fbt",
- "sept.",
- "oct.",
- "nov.",
- "d\u00e9c."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "fr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur-it.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur-it.js
deleted file mode 100644
index 8f1e80b9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur-it.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.",
- "p."
- ],
- "DAY": [
- "domenie",
- "lunis",
- "martars",
- "miercus",
- "joibe",
- "vinars",
- "sabide"
- ],
- "ERANAMES": [
- "pdC",
- "ddC"
- ],
- "ERAS": [
- "pdC",
- "ddC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Zen\u00e2r",
- "Fevr\u00e2r",
- "Mar\u00e7",
- "Avr\u00eel",
- "Mai",
- "Jugn",
- "Lui",
- "Avost",
- "Setembar",
- "Otubar",
- "Novembar",
- "Dicembar"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mie",
- "joi",
- "vin",
- "sab"
- ],
- "SHORTMONTH": [
- "Zen",
- "Fev",
- "Mar",
- "Avr",
- "Mai",
- "Jug",
- "Lui",
- "Avo",
- "Set",
- "Otu",
- "Nov",
- "Dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d 'di' MMMM 'dal' y",
- "longDate": "d 'di' MMMM 'dal' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "fur-it",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur.js
deleted file mode 100644
index ccb73300..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fur.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.",
- "p."
- ],
- "DAY": [
- "domenie",
- "lunis",
- "martars",
- "miercus",
- "joibe",
- "vinars",
- "sabide"
- ],
- "ERANAMES": [
- "pdC",
- "ddC"
- ],
- "ERAS": [
- "pdC",
- "ddC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Zen\u00e2r",
- "Fevr\u00e2r",
- "Mar\u00e7",
- "Avr\u00eel",
- "Mai",
- "Jugn",
- "Lui",
- "Avost",
- "Setembar",
- "Otubar",
- "Novembar",
- "Dicembar"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mie",
- "joi",
- "vin",
- "sab"
- ],
- "SHORTMONTH": [
- "Zen",
- "Fev",
- "Mar",
- "Avr",
- "Mai",
- "Jug",
- "Lui",
- "Avo",
- "Set",
- "Otu",
- "Nov",
- "Dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d 'di' MMMM 'dal' y",
- "longDate": "d 'di' MMMM 'dal' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "fur",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy-nl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy-nl.js
deleted file mode 100644
index 234e983b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy-nl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "snein",
- "moandei",
- "tiisdei",
- "woansdei",
- "tongersdei",
- "freed",
- "sneon"
- ],
- "ERANAMES": [
- "Foar Kristus",
- "nei Kristus"
- ],
- "ERAS": [
- "f.Kr.",
- "n.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "jannewaris",
- "febrewaris",
- "maart",
- "april",
- "maaie",
- "juny",
- "july",
- "augustus",
- "septimber",
- "oktober",
- "novimber",
- "desimber"
- ],
- "SHORTDAY": [
- "si",
- "mo",
- "ti",
- "wo",
- "to",
- "fr",
- "so"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0",
- "negSuf": "-",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "fy-nl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy.js
deleted file mode 100644
index 6bf7ba6b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_fy.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "snein",
- "moandei",
- "tiisdei",
- "woansdei",
- "tongersdei",
- "freed",
- "sneon"
- ],
- "ERANAMES": [
- "Foar Kristus",
- "nei Kristus"
- ],
- "ERAS": [
- "f.Kr.",
- "n.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "jannewaris",
- "febrewaris",
- "maart",
- "april",
- "maaie",
- "juny",
- "july",
- "augustus",
- "septimber",
- "oktober",
- "novimber",
- "desimber"
- ],
- "SHORTDAY": [
- "si",
- "mo",
- "ti",
- "wo",
- "to",
- "fr",
- "so"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0",
- "negSuf": "-",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "fy",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga-ie.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga-ie.js
deleted file mode 100644
index 5740a197..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga-ie.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "D\u00e9 Domhnaigh",
- "D\u00e9 Luain",
- "D\u00e9 M\u00e1irt",
- "D\u00e9 C\u00e9adaoin",
- "D\u00e9ardaoin",
- "D\u00e9 hAoine",
- "D\u00e9 Sathairn"
- ],
- "ERANAMES": [
- "Roimh Chr\u00edost",
- "Anno Domini"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ean\u00e1ir",
- "Feabhra",
- "M\u00e1rta",
- "Aibre\u00e1n",
- "Bealtaine",
- "Meitheamh",
- "I\u00fail",
- "L\u00fanasa",
- "Me\u00e1n F\u00f3mhair",
- "Deireadh F\u00f3mhair",
- "Samhain",
- "Nollaig"
- ],
- "SHORTDAY": [
- "Domh",
- "Luan",
- "M\u00e1irt",
- "C\u00e9ad",
- "D\u00e9ar",
- "Aoine",
- "Sath"
- ],
- "SHORTMONTH": [
- "Ean",
- "Feabh",
- "M\u00e1rta",
- "Aib",
- "Beal",
- "Meith",
- "I\u00fail",
- "L\u00fan",
- "MF\u00f3mh",
- "DF\u00f3mh",
- "Samh",
- "Noll"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ga-ie",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n >= 3 && n <= 6) { return PLURAL_CATEGORY.FEW; } if (n >= 7 && n <= 10) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga.js
deleted file mode 100644
index 76f0d145..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ga.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "D\u00e9 Domhnaigh",
- "D\u00e9 Luain",
- "D\u00e9 M\u00e1irt",
- "D\u00e9 C\u00e9adaoin",
- "D\u00e9ardaoin",
- "D\u00e9 hAoine",
- "D\u00e9 Sathairn"
- ],
- "ERANAMES": [
- "Roimh Chr\u00edost",
- "Anno Domini"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ean\u00e1ir",
- "Feabhra",
- "M\u00e1rta",
- "Aibre\u00e1n",
- "Bealtaine",
- "Meitheamh",
- "I\u00fail",
- "L\u00fanasa",
- "Me\u00e1n F\u00f3mhair",
- "Deireadh F\u00f3mhair",
- "Samhain",
- "Nollaig"
- ],
- "SHORTDAY": [
- "Domh",
- "Luan",
- "M\u00e1irt",
- "C\u00e9ad",
- "D\u00e9ar",
- "Aoine",
- "Sath"
- ],
- "SHORTMONTH": [
- "Ean",
- "Feabh",
- "M\u00e1rta",
- "Aib",
- "Beal",
- "Meith",
- "I\u00fail",
- "L\u00fan",
- "MF\u00f3mh",
- "DF\u00f3mh",
- "Samh",
- "Noll"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ga",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 2) { return PLURAL_CATEGORY.TWO; } if (n >= 3 && n <= 6) { return PLURAL_CATEGORY.FEW; } if (n >= 7 && n <= 10) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd-gb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd-gb.js
deleted file mode 100644
index c245bc5d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd-gb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "m",
- "f"
- ],
- "DAY": [
- "DiD\u00f2mhnaich",
- "DiLuain",
- "DiM\u00e0irt",
- "DiCiadain",
- "DiarDaoin",
- "DihAoine",
- "DiSathairne"
- ],
- "ERANAMES": [
- "Ro Chr\u00ecosta",
- "An d\u00e8idh Chr\u00ecosta"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dhen Fhaoilleach",
- "dhen Ghearran",
- "dhen Mh\u00e0rt",
- "dhen Ghiblean",
- "dhen Ch\u00e8itean",
- "dhen \u00d2gmhios",
- "dhen Iuchar",
- "dhen L\u00f9nastal",
- "dhen t-Sultain",
- "dhen D\u00e0mhair",
- "dhen t-Samhain",
- "dhen D\u00f9bhlachd"
- ],
- "SHORTDAY": [
- "DiD",
- "DiL",
- "DiM",
- "DiC",
- "Dia",
- "Dih",
- "DiS"
- ],
- "SHORTMONTH": [
- "Faoi",
- "Gearr",
- "M\u00e0rt",
- "Gibl",
- "C\u00e8it",
- "\u00d2gmh",
- "Iuch",
- "L\u00f9na",
- "Sult",
- "D\u00e0mh",
- "Samh",
- "D\u00f9bh"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d'mh' MMMM y",
- "longDate": "d'mh' MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gd-gb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd.js
deleted file mode 100644
index 9fe0c4d8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "m",
- "f"
- ],
- "DAY": [
- "DiD\u00f2mhnaich",
- "DiLuain",
- "DiM\u00e0irt",
- "DiCiadain",
- "DiarDaoin",
- "DihAoine",
- "DiSathairne"
- ],
- "ERANAMES": [
- "Ro Chr\u00ecosta",
- "An d\u00e8idh Chr\u00ecosta"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "dhen Fhaoilleach",
- "dhen Ghearran",
- "dhen Mh\u00e0rt",
- "dhen Ghiblean",
- "dhen Ch\u00e8itean",
- "dhen \u00d2gmhios",
- "dhen Iuchar",
- "dhen L\u00f9nastal",
- "dhen t-Sultain",
- "dhen D\u00e0mhair",
- "dhen t-Samhain",
- "dhen D\u00f9bhlachd"
- ],
- "SHORTDAY": [
- "DiD",
- "DiL",
- "DiM",
- "DiC",
- "Dia",
- "Dih",
- "DiS"
- ],
- "SHORTMONTH": [
- "Faoi",
- "Gearr",
- "M\u00e0rt",
- "Gibl",
- "C\u00e8it",
- "\u00d2gmh",
- "Iuch",
- "L\u00f9na",
- "Sult",
- "D\u00e0mh",
- "Samh",
- "D\u00f9bh"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d'mh' MMMM y",
- "longDate": "d'mh' MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl-es.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl-es.js
deleted file mode 100644
index fff9928c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl-es.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "domingo",
- "luns",
- "martes",
- "m\u00e9rcores",
- "xoves",
- "venres",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "xaneiro",
- "febreiro",
- "marzo",
- "abril",
- "maio",
- "xu\u00f1o",
- "xullo",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "decembro"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "m\u00e9r",
- "xov",
- "ven",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "xan",
- "feb",
- "mar",
- "abr",
- "mai",
- "xu\u00f1",
- "xul",
- "ago",
- "set",
- "out",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gl-es",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl.js
deleted file mode 100644
index 9223c276..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "domingo",
- "luns",
- "martes",
- "m\u00e9rcores",
- "xoves",
- "venres",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "despois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "xaneiro",
- "febreiro",
- "marzo",
- "abril",
- "maio",
- "xu\u00f1o",
- "xullo",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "decembro"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "m\u00e9r",
- "xov",
- "ven",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "xan",
- "feb",
- "mar",
- "abr",
- "mai",
- "xu\u00f1",
- "xul",
- "ago",
- "set",
- "out",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-ch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-ch.js
deleted file mode 100644
index 54278de0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-ch.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nam."
- ],
- "DAY": [
- "Sunntig",
- "M\u00e4\u00e4ntig",
- "Ziischtig",
- "Mittwuch",
- "Dunschtig",
- "Friitig",
- "Samschtig"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "Auguscht",
- "Sept\u00e4mber",
- "Oktoober",
- "Nov\u00e4mber",
- "Dez\u00e4mber"
- ],
- "SHORTDAY": [
- "Su.",
- "M\u00e4.",
- "Zi.",
- "Mi.",
- "Du.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "M\u00e4r",
- "Apr",
- "Mai",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "gsw-ch",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-fr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-fr.js
deleted file mode 100644
index 979ced7a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-fr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nam."
- ],
- "DAY": [
- "Sunntig",
- "M\u00e4\u00e4ntig",
- "Ziischtig",
- "Mittwuch",
- "Dunschtig",
- "Friitig",
- "Samschtig"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "Auguscht",
- "Sept\u00e4mber",
- "Oktoober",
- "Nov\u00e4mber",
- "Dez\u00e4mber"
- ],
- "SHORTDAY": [
- "Su.",
- "M\u00e4.",
- "Zi.",
- "Mi.",
- "Du.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "M\u00e4r",
- "Apr",
- "Mai",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "gsw-fr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-li.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-li.js
deleted file mode 100644
index c1a5aebc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw-li.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nam."
- ],
- "DAY": [
- "Sunntig",
- "M\u00e4\u00e4ntig",
- "Ziischtig",
- "Mittwuch",
- "Dunschtig",
- "Friitig",
- "Samschtig"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "Auguscht",
- "Sept\u00e4mber",
- "Oktoober",
- "Nov\u00e4mber",
- "Dez\u00e4mber"
- ],
- "SHORTDAY": [
- "Su.",
- "M\u00e4.",
- "Zi.",
- "Mi.",
- "Du.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "M\u00e4r",
- "Apr",
- "Mai",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "gsw-li",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw.js
deleted file mode 100644
index 93ef2cd0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gsw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "vorm.",
- "nam."
- ],
- "DAY": [
- "Sunntig",
- "M\u00e4\u00e4ntig",
- "Ziischtig",
- "Mittwuch",
- "Dunschtig",
- "Friitig",
- "Samschtig"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4rz",
- "April",
- "Mai",
- "Juni",
- "Juli",
- "Auguscht",
- "Sept\u00e4mber",
- "Oktoober",
- "Nov\u00e4mber",
- "Dez\u00e4mber"
- ],
- "SHORTDAY": [
- "Su.",
- "M\u00e4.",
- "Zi.",
- "Mi.",
- "Du.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "M\u00e4r",
- "Apr",
- "Mai",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Okt",
- "Nov",
- "Dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "gsw",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu-in.js
deleted file mode 100644
index db7daba8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0",
- "\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0",
- "\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0",
- "\u0aac\u0ac1\u0aa7\u0ab5\u0abe\u0ab0",
- "\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0",
- "\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0",
- "\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0"
- ],
- "ERANAMES": [
- "\u0a88\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8 \u0aaa\u0ac2\u0ab0\u0acd\u0ab5\u0ac7",
- "\u0a87\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8"
- ],
- "ERAS": [
- "\u0a88\u0ab8\u0ac1\u0aa8\u0abe \u0a9c\u0aa8\u0acd\u0aae \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",
- "\u0a87\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0",
- "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0",
- "\u0aae\u0abe\u0ab0\u0acd\u0a9a",
- "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2",
- "\u0aae\u0ac7",
- "\u0a9c\u0ac2\u0aa8",
- "\u0a9c\u0ac1\u0ab2\u0abe\u0a88",
- "\u0a91\u0a97\u0ab8\u0acd\u0a9f",
- "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0",
- "\u0a91\u0a95\u0acd\u0a9f\u0acb\u0aac\u0ab0",
- "\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0",
- "\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0"
- ],
- "SHORTDAY": [
- "\u0ab0\u0ab5\u0abf",
- "\u0ab8\u0acb\u0aae",
- "\u0aae\u0a82\u0a97\u0ab3",
- "\u0aac\u0ac1\u0aa7",
- "\u0a97\u0ac1\u0ab0\u0ac1",
- "\u0ab6\u0ac1\u0a95\u0acd\u0ab0",
- "\u0ab6\u0aa8\u0abf"
- ],
- "SHORTMONTH": [
- "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1",
- "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1",
- "\u0aae\u0abe\u0ab0\u0acd\u0a9a",
- "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2",
- "\u0aae\u0ac7",
- "\u0a9c\u0ac2\u0aa8",
- "\u0a9c\u0ac1\u0ab2\u0abe\u0a88",
- "\u0a91\u0a97",
- "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7",
- "\u0a91\u0a95\u0acd\u0a9f\u0acb",
- "\u0aa8\u0ab5\u0ac7",
- "\u0aa1\u0abf\u0ab8\u0ac7"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y hh:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "hh:mm:ss a",
- "short": "d/M/yy hh:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gu-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu.js
deleted file mode 100644
index a66e2b54..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0ab0\u0ab5\u0abf\u0ab5\u0abe\u0ab0",
- "\u0ab8\u0acb\u0aae\u0ab5\u0abe\u0ab0",
- "\u0aae\u0a82\u0a97\u0ab3\u0ab5\u0abe\u0ab0",
- "\u0aac\u0ac1\u0aa7\u0ab5\u0abe\u0ab0",
- "\u0a97\u0ac1\u0ab0\u0ac1\u0ab5\u0abe\u0ab0",
- "\u0ab6\u0ac1\u0a95\u0acd\u0ab0\u0ab5\u0abe\u0ab0",
- "\u0ab6\u0aa8\u0abf\u0ab5\u0abe\u0ab0"
- ],
- "ERANAMES": [
- "\u0a88\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8 \u0aaa\u0ac2\u0ab0\u0acd\u0ab5\u0ac7",
- "\u0a87\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8"
- ],
- "ERAS": [
- "\u0a88\u0ab8\u0ac1\u0aa8\u0abe \u0a9c\u0aa8\u0acd\u0aae \u0aaa\u0ab9\u0ac7\u0ab2\u0abe",
- "\u0a87\u0ab8\u0ab5\u0ac0\u0ab8\u0aa8"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1\u0a86\u0ab0\u0ac0",
- "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1\u0a86\u0ab0\u0ac0",
- "\u0aae\u0abe\u0ab0\u0acd\u0a9a",
- "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2",
- "\u0aae\u0ac7",
- "\u0a9c\u0ac2\u0aa8",
- "\u0a9c\u0ac1\u0ab2\u0abe\u0a88",
- "\u0a91\u0a97\u0ab8\u0acd\u0a9f",
- "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7\u0aae\u0acd\u0aac\u0ab0",
- "\u0a91\u0a95\u0acd\u0a9f\u0acb\u0aac\u0ab0",
- "\u0aa8\u0ab5\u0ac7\u0aae\u0acd\u0aac\u0ab0",
- "\u0aa1\u0abf\u0ab8\u0ac7\u0aae\u0acd\u0aac\u0ab0"
- ],
- "SHORTDAY": [
- "\u0ab0\u0ab5\u0abf",
- "\u0ab8\u0acb\u0aae",
- "\u0aae\u0a82\u0a97\u0ab3",
- "\u0aac\u0ac1\u0aa7",
- "\u0a97\u0ac1\u0ab0\u0ac1",
- "\u0ab6\u0ac1\u0a95\u0acd\u0ab0",
- "\u0ab6\u0aa8\u0abf"
- ],
- "SHORTMONTH": [
- "\u0a9c\u0abe\u0aa8\u0acd\u0aaf\u0ac1",
- "\u0aab\u0ac7\u0aac\u0acd\u0ab0\u0ac1",
- "\u0aae\u0abe\u0ab0\u0acd\u0a9a",
- "\u0a8f\u0aaa\u0acd\u0ab0\u0abf\u0ab2",
- "\u0aae\u0ac7",
- "\u0a9c\u0ac2\u0aa8",
- "\u0a9c\u0ac1\u0ab2\u0abe\u0a88",
- "\u0a91\u0a97",
- "\u0ab8\u0aaa\u0acd\u0a9f\u0ac7",
- "\u0a91\u0a95\u0acd\u0a9f\u0acb",
- "\u0aa8\u0ab5\u0ac7",
- "\u0aa1\u0abf\u0ab8\u0ac7"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y hh:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "hh:mm:ss a",
- "short": "d/M/yy hh:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz-ke.js
deleted file mode 100644
index 675efe95..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Ma/Mo",
- "Mambia/Mog"
- ],
- "DAY": [
- "Chumapiri",
- "Chumatato",
- "Chumaine",
- "Chumatano",
- "Aramisi",
- "Ichuma",
- "Esabato"
- ],
- "ERANAMES": [
- "Yeso ataiborwa",
- "Yeso kaiboirwe"
- ],
- "ERAS": [
- "YA",
- "YK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Chanuari",
- "Feburari",
- "Machi",
- "Apiriri",
- "Mei",
- "Juni",
- "Chulai",
- "Agosti",
- "Septemba",
- "Okitoba",
- "Nobemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Cpr",
- "Ctt",
- "Cmn",
- "Cmt",
- "Ars",
- "Icm",
- "Est"
- ],
- "SHORTMONTH": [
- "Can",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Cul",
- "Agt",
- "Sep",
- "Okt",
- "Nob",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "guz-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz.js
deleted file mode 100644
index 9ce1ce3f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_guz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Ma/Mo",
- "Mambia/Mog"
- ],
- "DAY": [
- "Chumapiri",
- "Chumatato",
- "Chumaine",
- "Chumatano",
- "Aramisi",
- "Ichuma",
- "Esabato"
- ],
- "ERANAMES": [
- "Yeso ataiborwa",
- "Yeso kaiboirwe"
- ],
- "ERAS": [
- "YA",
- "YK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Chanuari",
- "Feburari",
- "Machi",
- "Apiriri",
- "Mei",
- "Juni",
- "Chulai",
- "Agosti",
- "Septemba",
- "Okitoba",
- "Nobemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Cpr",
- "Ctt",
- "Cmn",
- "Cmt",
- "Ars",
- "Icm",
- "Est"
- ],
- "SHORTMONTH": [
- "Can",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Cul",
- "Agt",
- "Sep",
- "Okt",
- "Nob",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "guz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv-im.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv-im.js
deleted file mode 100644
index aca51df1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv-im.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Jedoonee",
- "Jelhein",
- "Jemayrt",
- "Jercean",
- "Jerdein",
- "Jeheiney",
- "Jesarn"
- ],
- "ERANAMES": [
- "RC",
- "AD"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jerrey-geuree",
- "Toshiaght-arree",
- "Mayrnt",
- "Averil",
- "Boaldyn",
- "Mean-souree",
- "Jerrey-souree",
- "Luanistyn",
- "Mean-fouyir",
- "Jerrey-fouyir",
- "Mee Houney",
- "Mee ny Nollick"
- ],
- "SHORTDAY": [
- "Jed",
- "Jel",
- "Jem",
- "Jerc",
- "Jerd",
- "Jeh",
- "Jes"
- ],
- "SHORTMONTH": [
- "J-guer",
- "T-arree",
- "Mayrnt",
- "Avrril",
- "Boaldyn",
- "M-souree",
- "J-souree",
- "Luanistyn",
- "M-fouyir",
- "J-fouyir",
- "M.Houney",
- "M.Nollick"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "MMM dd, y HH:mm:ss",
- "mediumDate": "MMM dd, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gv-im",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv.js
deleted file mode 100644
index 0f99b6a4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_gv.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Jedoonee",
- "Jelhein",
- "Jemayrt",
- "Jercean",
- "Jerdein",
- "Jeheiney",
- "Jesarn"
- ],
- "ERANAMES": [
- "RC",
- "AD"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jerrey-geuree",
- "Toshiaght-arree",
- "Mayrnt",
- "Averil",
- "Boaldyn",
- "Mean-souree",
- "Jerrey-souree",
- "Luanistyn",
- "Mean-fouyir",
- "Jerrey-fouyir",
- "Mee Houney",
- "Mee ny Nollick"
- ],
- "SHORTDAY": [
- "Jed",
- "Jel",
- "Jem",
- "Jerc",
- "Jerd",
- "Jeh",
- "Jes"
- ],
- "SHORTMONTH": [
- "J-guer",
- "T-arree",
- "Mayrnt",
- "Avrril",
- "Boaldyn",
- "M-souree",
- "J-souree",
- "Luanistyn",
- "M-fouyir",
- "J-fouyir",
- "M.Houney",
- "M.Nollick"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "MMM dd, y HH:mm:ss",
- "mediumDate": "MMM dd, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "gv",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-gh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-gh.js
deleted file mode 100644
index c5209311..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-gh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lahadi",
- "Litinin",
- "Talata",
- "Laraba",
- "Alhamis",
- "Jumma\u02bca",
- "Asabar"
- ],
- "ERANAMES": [
- "Kafin haihuwar annab",
- "Bayan haihuwar annab"
- ],
- "ERAS": [
- "KHAI",
- "BHAI"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janairu",
- "Faburairu",
- "Maris",
- "Afirilu",
- "Mayu",
- "Yuni",
- "Yuli",
- "Agusta",
- "Satumba",
- "Oktoba",
- "Nuwamba",
- "Disamba"
- ],
- "SHORTDAY": [
- "Lh",
- "Li",
- "Ta",
- "Lr",
- "Al",
- "Ju",
- "As"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fab",
- "Mar",
- "Afi",
- "May",
- "Yun",
- "Yul",
- "Agu",
- "Sat",
- "Okt",
- "Nuw",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GHS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ha-latn-gh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ne.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ne.js
deleted file mode 100644
index f4b280c5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ne.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lahadi",
- "Litinin",
- "Talata",
- "Laraba",
- "Alhamis",
- "Jumma\u02bca",
- "Asabar"
- ],
- "ERANAMES": [
- "Kafin haihuwar annab",
- "Bayan haihuwar annab"
- ],
- "ERAS": [
- "KHAI",
- "BHAI"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janairu",
- "Faburairu",
- "Maris",
- "Afirilu",
- "Mayu",
- "Yuni",
- "Yuli",
- "Agusta",
- "Satumba",
- "Oktoba",
- "Nuwamba",
- "Disamba"
- ],
- "SHORTDAY": [
- "Lh",
- "Li",
- "Ta",
- "Lr",
- "Al",
- "Ju",
- "As"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fab",
- "Mar",
- "Afi",
- "May",
- "Yun",
- "Yul",
- "Agu",
- "Sat",
- "Okt",
- "Nuw",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ha-latn-ne",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ng.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ng.js
deleted file mode 100644
index 81af53eb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn-ng.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lahadi",
- "Litinin",
- "Talata",
- "Laraba",
- "Alhamis",
- "Jumma\u02bca",
- "Asabar"
- ],
- "ERANAMES": [
- "Kafin haihuwar annab",
- "Bayan haihuwar annab"
- ],
- "ERAS": [
- "KHAI",
- "BHAI"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janairu",
- "Faburairu",
- "Maris",
- "Afirilu",
- "Mayu",
- "Yuni",
- "Yuli",
- "Agusta",
- "Satumba",
- "Oktoba",
- "Nuwamba",
- "Disamba"
- ],
- "SHORTDAY": [
- "Lh",
- "Li",
- "Ta",
- "Lr",
- "Al",
- "Ju",
- "As"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fab",
- "Mar",
- "Afi",
- "May",
- "Yun",
- "Yul",
- "Agu",
- "Sat",
- "Okt",
- "Nuw",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ha-latn-ng",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn.js
deleted file mode 100644
index 615939cd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lahadi",
- "Litinin",
- "Talata",
- "Laraba",
- "Alhamis",
- "Jumma\u02bca",
- "Asabar"
- ],
- "ERANAMES": [
- "Kafin haihuwar annab",
- "Bayan haihuwar annab"
- ],
- "ERAS": [
- "KHAI",
- "BHAI"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janairu",
- "Faburairu",
- "Maris",
- "Afirilu",
- "Mayu",
- "Yuni",
- "Yuli",
- "Agusta",
- "Satumba",
- "Oktoba",
- "Nuwamba",
- "Disamba"
- ],
- "SHORTDAY": [
- "Lh",
- "Li",
- "Ta",
- "Lr",
- "Al",
- "Ju",
- "As"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fab",
- "Mar",
- "Afi",
- "May",
- "Yun",
- "Yul",
- "Agu",
- "Sat",
- "Okt",
- "Nuw",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ha-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha.js
deleted file mode 100644
index 0f36507e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ha.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lahadi",
- "Litinin",
- "Talata",
- "Laraba",
- "Alhamis",
- "Jumma\u02bca",
- "Asabar"
- ],
- "ERANAMES": [
- "Kafin haihuwar annab",
- "Bayan haihuwar annab"
- ],
- "ERAS": [
- "KHAI",
- "BHAI"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janairu",
- "Faburairu",
- "Maris",
- "Afirilu",
- "Mayu",
- "Yuni",
- "Yuli",
- "Agusta",
- "Satumba",
- "Oktoba",
- "Nuwamba",
- "Disamba"
- ],
- "SHORTDAY": [
- "Lh",
- "Li",
- "Ta",
- "Lr",
- "Al",
- "Ju",
- "As"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fab",
- "Mar",
- "Afi",
- "May",
- "Yun",
- "Yul",
- "Agu",
- "Sat",
- "Okt",
- "Nuw",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ha",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw-us.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw-us.js
deleted file mode 100644
index 4091590e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw-us.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "L\u0101pule",
- "Po\u02bbakahi",
- "Po\u02bbalua",
- "Po\u02bbakolu",
- "Po\u02bbah\u0101",
- "Po\u02bbalima",
- "Po\u02bbaono"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ianuali",
- "Pepeluali",
- "Malaki",
- "\u02bbApelila",
- "Mei",
- "Iune",
- "Iulai",
- "\u02bbAukake",
- "Kepakemapa",
- "\u02bbOkakopa",
- "Nowemapa",
- "Kekemapa"
- ],
- "SHORTDAY": [
- "LP",
- "P1",
- "P2",
- "P3",
- "P4",
- "P5",
- "P6"
- ],
- "SHORTMONTH": [
- "Ian.",
- "Pep.",
- "Mal.",
- "\u02bbAp.",
- "Mei",
- "Iun.",
- "Iul.",
- "\u02bbAu.",
- "Kep.",
- "\u02bbOk.",
- "Now.",
- "Kek."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "haw-us",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw.js
deleted file mode 100644
index a1253a4a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_haw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "L\u0101pule",
- "Po\u02bbakahi",
- "Po\u02bbalua",
- "Po\u02bbakolu",
- "Po\u02bbah\u0101",
- "Po\u02bbalima",
- "Po\u02bbaono"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ianuali",
- "Pepeluali",
- "Malaki",
- "\u02bbApelila",
- "Mei",
- "Iune",
- "Iulai",
- "\u02bbAukake",
- "Kepakemapa",
- "\u02bbOkakopa",
- "Nowemapa",
- "Kekemapa"
- ],
- "SHORTDAY": [
- "LP",
- "P1",
- "P2",
- "P3",
- "P4",
- "P5",
- "P6"
- ],
- "SHORTMONTH": [
- "Ian.",
- "Pep.",
- "Mal.",
- "\u02bbAp.",
- "Mei",
- "Iun.",
- "Iul.",
- "\u02bbAu.",
- "Kep.",
- "\u02bbOk.",
- "Now.",
- "Kek."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "haw",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he-il.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he-il.js
deleted file mode 100644
index 7a05b986..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he-il.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
- "\u05d0\u05d7\u05d4\u05f4\u05e6"
- ],
- "DAY": [
- "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df",
- "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9",
- "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea"
- ],
- "ERANAMES": [
- "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4",
- "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4"
- ],
- "ERAS": [
- "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1",
- "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u05d9\u05e0\u05d5\u05d0\u05e8",
- "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8",
- "\u05de\u05e8\u05e5",
- "\u05d0\u05e4\u05e8\u05d9\u05dc",
- "\u05de\u05d0\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8",
- "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8",
- "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8",
- "\u05d3\u05e6\u05de\u05d1\u05e8"
- ],
- "SHORTDAY": [
- "\u05d9\u05d5\u05dd \u05d0\u05f3",
- "\u05d9\u05d5\u05dd \u05d1\u05f3",
- "\u05d9\u05d5\u05dd \u05d2\u05f3",
- "\u05d9\u05d5\u05dd \u05d3\u05f3",
- "\u05d9\u05d5\u05dd \u05d4\u05f3",
- "\u05d9\u05d5\u05dd \u05d5\u05f3",
- "\u05e9\u05d1\u05ea"
- ],
- "SHORTMONTH": [
- "\u05d9\u05e0\u05d5\u05f3",
- "\u05e4\u05d1\u05e8\u05f3",
- "\u05de\u05e8\u05e5",
- "\u05d0\u05e4\u05e8\u05f3",
- "\u05de\u05d0\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d2\u05f3",
- "\u05e1\u05e4\u05d8\u05f3",
- "\u05d0\u05d5\u05e7\u05f3",
- "\u05e0\u05d5\u05d1\u05f3",
- "\u05d3\u05e6\u05de\u05f3"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d \u05d1MMMM y",
- "longDate": "d \u05d1MMMM y",
- "medium": "d \u05d1MMM y H:mm:ss",
- "mediumDate": "d \u05d1MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.y H:mm",
- "shortDate": "d.M.y",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20aa",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "he-il",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i == 2 && vf.v == 0) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he.js
deleted file mode 100644
index 2ef1d3c2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_he.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
- "\u05d0\u05d7\u05d4\u05f4\u05e6"
- ],
- "DAY": [
- "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df",
- "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9",
- "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea"
- ],
- "ERANAMES": [
- "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4",
- "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4"
- ],
- "ERAS": [
- "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1",
- "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u05d9\u05e0\u05d5\u05d0\u05e8",
- "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8",
- "\u05de\u05e8\u05e5",
- "\u05d0\u05e4\u05e8\u05d9\u05dc",
- "\u05de\u05d0\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8",
- "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8",
- "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8",
- "\u05d3\u05e6\u05de\u05d1\u05e8"
- ],
- "SHORTDAY": [
- "\u05d9\u05d5\u05dd \u05d0\u05f3",
- "\u05d9\u05d5\u05dd \u05d1\u05f3",
- "\u05d9\u05d5\u05dd \u05d2\u05f3",
- "\u05d9\u05d5\u05dd \u05d3\u05f3",
- "\u05d9\u05d5\u05dd \u05d4\u05f3",
- "\u05d9\u05d5\u05dd \u05d5\u05f3",
- "\u05e9\u05d1\u05ea"
- ],
- "SHORTMONTH": [
- "\u05d9\u05e0\u05d5\u05f3",
- "\u05e4\u05d1\u05e8\u05f3",
- "\u05de\u05e8\u05e5",
- "\u05d0\u05e4\u05e8\u05f3",
- "\u05de\u05d0\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d2\u05f3",
- "\u05e1\u05e4\u05d8\u05f3",
- "\u05d0\u05d5\u05e7\u05f3",
- "\u05e0\u05d5\u05d1\u05f3",
- "\u05d3\u05e6\u05de\u05f3"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d \u05d1MMMM y",
- "longDate": "d \u05d1MMMM y",
- "medium": "d \u05d1MMM y H:mm:ss",
- "mediumDate": "d \u05d1MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.y H:mm",
- "shortDate": "d.M.y",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20aa",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "he",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i == 2 && vf.v == 0) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi-in.js
deleted file mode 100644
index febae399..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u0930\u0935\u093f\u0935\u093e\u0930",
- "\u0938\u094b\u092e\u0935\u093e\u0930",
- "\u092e\u0902\u0917\u0932\u0935\u093e\u0930",
- "\u092c\u0941\u0927\u0935\u093e\u0930",
- "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
- "\u0936\u0928\u093f\u0935\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935",
- "\u0908\u0938\u0935\u0940 \u0938\u0928"
- ],
- "ERAS": [
- "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935",
- "\u0908\u0938\u094d\u0935\u0940"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u093c\u0930\u0935\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u0948\u0932",
- "\u092e\u0908",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u0924",
- "\u0938\u093f\u0924\u0902\u092c\u0930",
- "\u0905\u0915\u094d\u0924\u0942\u092c\u0930",
- "\u0928\u0935\u0902\u092c\u0930",
- "\u0926\u093f\u0938\u0902\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u0935\u093f",
- "\u0938\u094b\u092e",
- "\u092e\u0902\u0917\u0932",
- "\u092c\u0941\u0927",
- "\u0917\u0941\u0930\u0941",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u0928\u0970",
- "\u092b\u093c\u0930\u0970",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u0948\u0932",
- "\u092e\u0908",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0970",
- "\u0905\u0917\u0970",
- "\u0938\u093f\u0924\u0970",
- "\u0905\u0915\u094d\u0924\u0942\u0970",
- "\u0928\u0935\u0970",
- "\u0926\u093f\u0938\u0970"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd/MM/y h:mm:ss a",
- "mediumDate": "dd/MM/y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "hi-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi.js
deleted file mode 100644
index e5c34123..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hi.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u0930\u0935\u093f\u0935\u093e\u0930",
- "\u0938\u094b\u092e\u0935\u093e\u0930",
- "\u092e\u0902\u0917\u0932\u0935\u093e\u0930",
- "\u092c\u0941\u0927\u0935\u093e\u0930",
- "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
- "\u0936\u0928\u093f\u0935\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935",
- "\u0908\u0938\u0935\u0940 \u0938\u0928"
- ],
- "ERAS": [
- "\u0908\u0938\u093e-\u092a\u0942\u0930\u094d\u0935",
- "\u0908\u0938\u094d\u0935\u0940"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u093c\u0930\u0935\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u0948\u0932",
- "\u092e\u0908",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u0924",
- "\u0938\u093f\u0924\u0902\u092c\u0930",
- "\u0905\u0915\u094d\u0924\u0942\u092c\u0930",
- "\u0928\u0935\u0902\u092c\u0930",
- "\u0926\u093f\u0938\u0902\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u0935\u093f",
- "\u0938\u094b\u092e",
- "\u092e\u0902\u0917\u0932",
- "\u092c\u0941\u0927",
- "\u0917\u0941\u0930\u0941",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u0928\u0970",
- "\u092b\u093c\u0930\u0970",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u0948\u0932",
- "\u092e\u0908",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0970",
- "\u0905\u0917\u0970",
- "\u0938\u093f\u0924\u0970",
- "\u0905\u0915\u094d\u0924\u0942\u0970",
- "\u0928\u0935\u0970",
- "\u0926\u093f\u0938\u0970"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd/MM/y h:mm:ss a",
- "mediumDate": "dd/MM/y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "hi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-ba.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-ba.js
deleted file mode 100644
index cb70c76e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-ba.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "nedjelja",
- "ponedjeljak",
- "utorak",
- "srijeda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Prije Krista",
- "Poslije Krista"
- ],
- "ERAS": [
- "pr. Kr.",
- "p. Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sije\u010dnja",
- "velja\u010de",
- "o\u017eujka",
- "travnja",
- "svibnja",
- "lipnja",
- "srpnja",
- "kolovoza",
- "rujna",
- "listopada",
- "studenoga",
- "prosinca"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sri",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "sij",
- "velj",
- "o\u017eu",
- "tra",
- "svi",
- "lip",
- "srp",
- "kol",
- "ruj",
- "lis",
- "stu",
- "pro"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y.",
- "longDate": "d. MMMM y.",
- "medium": "d. MMM y. HH:mm:ss",
- "mediumDate": "d. MMM y.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y. HH:mm",
- "shortDate": "dd.MM.y.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hr-ba",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-hr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-hr.js
deleted file mode 100644
index 248734f6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr-hr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "nedjelja",
- "ponedjeljak",
- "utorak",
- "srijeda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Prije Krista",
- "Poslije Krista"
- ],
- "ERAS": [
- "pr. Kr.",
- "p. Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sije\u010dnja",
- "velja\u010de",
- "o\u017eujka",
- "travnja",
- "svibnja",
- "lipnja",
- "srpnja",
- "kolovoza",
- "rujna",
- "listopada",
- "studenoga",
- "prosinca"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sri",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "sij",
- "velj",
- "o\u017eu",
- "tra",
- "svi",
- "lip",
- "srp",
- "kol",
- "ruj",
- "lis",
- "stu",
- "pro"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y.",
- "longDate": "d. MMMM y.",
- "medium": "d. MMM y. HH:mm:ss",
- "mediumDate": "d. MMM y.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y. HH:mm",
- "shortDate": "dd.MM.y.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hr-hr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr.js
deleted file mode 100644
index 4f6f1c14..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "nedjelja",
- "ponedjeljak",
- "utorak",
- "srijeda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Prije Krista",
- "Poslije Krista"
- ],
- "ERAS": [
- "pr. Kr.",
- "p. Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sije\u010dnja",
- "velja\u010de",
- "o\u017eujka",
- "travnja",
- "svibnja",
- "lipnja",
- "srpnja",
- "kolovoza",
- "rujna",
- "listopada",
- "studenoga",
- "prosinca"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sri",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "sij",
- "velj",
- "o\u017eu",
- "tra",
- "svi",
- "lip",
- "srp",
- "kol",
- "ruj",
- "lis",
- "stu",
- "pro"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y.",
- "longDate": "d. MMMM y.",
- "medium": "d. MMM y. HH:mm:ss",
- "mediumDate": "d. MMM y.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y. HH:mm",
- "shortDate": "dd.MM.y.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb-de.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb-de.js
deleted file mode 100644
index f432ed94..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb-de.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopo\u0142dnja",
- "popo\u0142dnju"
- ],
- "DAY": [
- "njed\u017aela",
- "p\u00f3nd\u017aela",
- "wutora",
- "srjeda",
- "\u0161tw\u00f3rtk",
- "pjatk",
- "sobota"
- ],
- "ERANAMES": [
- "p\u0159ed Chrystowym narod\u017aenjom",
- "po Chrystowym narod\u017aenju"
- ],
- "ERAS": [
- "p\u0159.Chr.n.",
- "po Chr.n."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januara",
- "februara",
- "m\u011brca",
- "apryla",
- "meje",
- "junija",
- "julija",
- "awgusta",
- "septembra",
- "oktobra",
- "nowembra",
- "decembra"
- ],
- "SHORTDAY": [
- "nje",
- "p\u00f3n",
- "wut",
- "srj",
- "\u0161tw",
- "pja",
- "sob"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "m\u011br.",
- "apr.",
- "mej.",
- "jun.",
- "jul.",
- "awg.",
- "sep.",
- "okt.",
- "now.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d.M.y H:mm:ss",
- "mediumDate": "d.M.y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.yy H:mm 'hod\u017a'.",
- "shortDate": "d.M.yy",
- "shortTime": "H:mm 'hod\u017a'."
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hsb-de",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb.js
deleted file mode 100644
index c11ebc78..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hsb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopo\u0142dnja",
- "popo\u0142dnju"
- ],
- "DAY": [
- "njed\u017aela",
- "p\u00f3nd\u017aela",
- "wutora",
- "srjeda",
- "\u0161tw\u00f3rtk",
- "pjatk",
- "sobota"
- ],
- "ERANAMES": [
- "p\u0159ed Chrystowym narod\u017aenjom",
- "po Chrystowym narod\u017aenju"
- ],
- "ERAS": [
- "p\u0159.Chr.n.",
- "po Chr.n."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januara",
- "februara",
- "m\u011brca",
- "apryla",
- "meje",
- "junija",
- "julija",
- "awgusta",
- "septembra",
- "oktobra",
- "nowembra",
- "decembra"
- ],
- "SHORTDAY": [
- "nje",
- "p\u00f3n",
- "wut",
- "srj",
- "\u0161tw",
- "pja",
- "sob"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "m\u011br.",
- "apr.",
- "mej.",
- "jun.",
- "jul.",
- "awg.",
- "sep.",
- "okt.",
- "now.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d.M.y H:mm:ss",
- "mediumDate": "d.M.y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.yy H:mm 'hod\u017a'.",
- "shortDate": "d.M.yy",
- "shortTime": "H:mm 'hod\u017a'."
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hsb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu-hu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu-hu.js
deleted file mode 100644
index 10a3bbc5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu-hu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "de.",
- "du."
- ],
- "DAY": [
- "vas\u00e1rnap",
- "h\u00e9tf\u0151",
- "kedd",
- "szerda",
- "cs\u00fct\u00f6rt\u00f6k",
- "p\u00e9ntek",
- "szombat"
- ],
- "ERANAMES": [
- "id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt",
- "id\u0151sz\u00e1m\u00edt\u00e1sunk szerint"
- ],
- "ERAS": [
- "i. e.",
- "i. sz."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janu\u00e1r",
- "febru\u00e1r",
- "m\u00e1rcius",
- "\u00e1prilis",
- "m\u00e1jus",
- "j\u00fanius",
- "j\u00falius",
- "augusztus",
- "szeptember",
- "okt\u00f3ber",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "V",
- "H",
- "K",
- "Sze",
- "Cs",
- "P",
- "Szo"
- ],
- "SHORTMONTH": [
- "jan.",
- "febr.",
- "m\u00e1rc.",
- "\u00e1pr.",
- "m\u00e1j.",
- "j\u00fan.",
- "j\u00fal.",
- "aug.",
- "szept.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y. MMMM d., EEEE",
- "longDate": "y. MMMM d.",
- "medium": "y. MMM d. H:mm:ss",
- "mediumDate": "y. MMM d.",
- "mediumTime": "H:mm:ss",
- "short": "y. MM. dd. H:mm",
- "shortDate": "y. MM. dd.",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ft",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hu-hu",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu.js
deleted file mode 100644
index 1e61f045..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "de.",
- "du."
- ],
- "DAY": [
- "vas\u00e1rnap",
- "h\u00e9tf\u0151",
- "kedd",
- "szerda",
- "cs\u00fct\u00f6rt\u00f6k",
- "p\u00e9ntek",
- "szombat"
- ],
- "ERANAMES": [
- "id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt",
- "id\u0151sz\u00e1m\u00edt\u00e1sunk szerint"
- ],
- "ERAS": [
- "i. e.",
- "i. sz."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janu\u00e1r",
- "febru\u00e1r",
- "m\u00e1rcius",
- "\u00e1prilis",
- "m\u00e1jus",
- "j\u00fanius",
- "j\u00falius",
- "augusztus",
- "szeptember",
- "okt\u00f3ber",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "V",
- "H",
- "K",
- "Sze",
- "Cs",
- "P",
- "Szo"
- ],
- "SHORTMONTH": [
- "jan.",
- "febr.",
- "m\u00e1rc.",
- "\u00e1pr.",
- "m\u00e1j.",
- "j\u00fan.",
- "j\u00fal.",
- "aug.",
- "szept.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y. MMMM d., EEEE",
- "longDate": "y. MMMM d.",
- "medium": "y. MMM d. H:mm:ss",
- "mediumDate": "y. MMM d.",
- "mediumTime": "H:mm:ss",
- "short": "y. MM. dd. H:mm",
- "shortDate": "y. MM. dd.",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ft",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hu",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy-am.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy-am.js
deleted file mode 100644
index 17afd276..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy-am.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u056f\u0565\u057d\u0585\u0580\u056b\u0581 \u0561\u057c\u0561\u057b",
- "\u056f\u0565\u057d\u0585\u0580\u056b\u0581 \u0570\u0565\u057f\u0578"
- ],
- "DAY": [
- "\u056f\u056b\u0580\u0561\u056f\u056b",
- "\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b",
- "\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b",
- "\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b",
- "\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b",
- "\u0578\u0582\u0580\u0562\u0561\u0569",
- "\u0577\u0561\u0562\u0561\u0569"
- ],
- "ERANAMES": [
- "\u0574.\u0569.\u0561.",
- "\u0574.\u0569."
- ],
- "ERAS": [
- "\u0574.\u0569.\u0561.",
- "\u0574.\u0569."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b",
- "\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b",
- "\u0574\u0561\u0580\u057f\u056b",
- "\u0561\u057a\u0580\u056b\u056c\u056b",
- "\u0574\u0561\u0575\u056b\u057d\u056b",
- "\u0570\u0578\u0582\u0576\u056b\u057d\u056b",
- "\u0570\u0578\u0582\u056c\u056b\u057d\u056b",
- "\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b",
- "\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b",
- "\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b",
- "\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b",
- "\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b"
- ],
- "SHORTDAY": [
- "\u056f\u056b\u0580",
- "\u0565\u0580\u056f",
- "\u0565\u0580\u0584",
- "\u0579\u0580\u0584",
- "\u0570\u0576\u0563",
- "\u0578\u0582\u0580",
- "\u0577\u0562\u0569"
- ],
- "SHORTMONTH": [
- "\u0570\u0576\u057e",
- "\u0583\u057f\u057e",
- "\u0574\u0580\u057f",
- "\u0561\u057a\u0580",
- "\u0574\u0575\u057d",
- "\u0570\u0576\u057d",
- "\u0570\u056c\u057d",
- "\u0585\u0563\u057d",
- "\u057d\u0565\u057a",
- "\u0570\u0578\u056f",
- "\u0576\u0578\u0575",
- "\u0564\u0565\u056f"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u0569. MMMM d, EEEE",
- "longDate": "dd MMMM, y\u0569.",
- "medium": "dd MMM, y\u0569. H:mm:ss",
- "mediumDate": "dd MMM, y\u0569.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Dram",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 0,
- "lgSize": 0,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 0,
- "lgSize": 0,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hy-am",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy.js
deleted file mode 100644
index c54fe770..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_hy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u056f\u0565\u057d\u0585\u0580\u056b\u0581 \u0561\u057c\u0561\u057b",
- "\u056f\u0565\u057d\u0585\u0580\u056b\u0581 \u0570\u0565\u057f\u0578"
- ],
- "DAY": [
- "\u056f\u056b\u0580\u0561\u056f\u056b",
- "\u0565\u0580\u056f\u0578\u0582\u0577\u0561\u0562\u0569\u056b",
- "\u0565\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b",
- "\u0579\u0578\u0580\u0565\u0584\u0577\u0561\u0562\u0569\u056b",
- "\u0570\u056b\u0576\u0563\u0577\u0561\u0562\u0569\u056b",
- "\u0578\u0582\u0580\u0562\u0561\u0569",
- "\u0577\u0561\u0562\u0561\u0569"
- ],
- "ERANAMES": [
- "\u0574.\u0569.\u0561.",
- "\u0574.\u0569."
- ],
- "ERAS": [
- "\u0574.\u0569.\u0561.",
- "\u0574.\u0569."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0570\u0578\u0582\u0576\u057e\u0561\u0580\u056b",
- "\u0583\u0565\u057f\u0580\u057e\u0561\u0580\u056b",
- "\u0574\u0561\u0580\u057f\u056b",
- "\u0561\u057a\u0580\u056b\u056c\u056b",
- "\u0574\u0561\u0575\u056b\u057d\u056b",
- "\u0570\u0578\u0582\u0576\u056b\u057d\u056b",
- "\u0570\u0578\u0582\u056c\u056b\u057d\u056b",
- "\u0585\u0563\u0578\u057d\u057f\u0578\u057d\u056b",
- "\u057d\u0565\u057a\u057f\u0565\u0574\u0562\u0565\u0580\u056b",
- "\u0570\u0578\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b",
- "\u0576\u0578\u0575\u0565\u0574\u0562\u0565\u0580\u056b",
- "\u0564\u0565\u056f\u057f\u0565\u0574\u0562\u0565\u0580\u056b"
- ],
- "SHORTDAY": [
- "\u056f\u056b\u0580",
- "\u0565\u0580\u056f",
- "\u0565\u0580\u0584",
- "\u0579\u0580\u0584",
- "\u0570\u0576\u0563",
- "\u0578\u0582\u0580",
- "\u0577\u0562\u0569"
- ],
- "SHORTMONTH": [
- "\u0570\u0576\u057e",
- "\u0583\u057f\u057e",
- "\u0574\u0580\u057f",
- "\u0561\u057a\u0580",
- "\u0574\u0575\u057d",
- "\u0570\u0576\u057d",
- "\u0570\u056c\u057d",
- "\u0585\u0563\u057d",
- "\u057d\u0565\u057a",
- "\u0570\u0578\u056f",
- "\u0576\u0578\u0575",
- "\u0564\u0565\u056f"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u0569. MMMM d, EEEE",
- "longDate": "dd MMMM, y\u0569.",
- "medium": "dd MMM, y\u0569. H:mm:ss",
- "mediumDate": "dd MMM, y\u0569.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Dram",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 0,
- "lgSize": 0,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 0,
- "lgSize": 0,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "hy",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia-fr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia-fr.js
deleted file mode 100644
index f7b636b3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia-fr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "dominica",
- "lunedi",
- "martedi",
- "mercuridi",
- "jovedi",
- "venerdi",
- "sabbato"
- ],
- "ERANAMES": [
- "ante Christo",
- "post Christo"
- ],
- "ERAS": [
- "a.Chr.",
- "p.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januario",
- "februario",
- "martio",
- "april",
- "maio",
- "junio",
- "julio",
- "augusto",
- "septembre",
- "octobre",
- "novembre",
- "decembre"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mer",
- "jov",
- "ven",
- "sab"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "mai",
- "jun",
- "jul",
- "aug",
- "sep",
- "oct",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ia-fr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia.js
deleted file mode 100644
index 38ead226..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ia.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "dominica",
- "lunedi",
- "martedi",
- "mercuridi",
- "jovedi",
- "venerdi",
- "sabbato"
- ],
- "ERANAMES": [
- "ante Christo",
- "post Christo"
- ],
- "ERAS": [
- "a.Chr.",
- "p.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januario",
- "februario",
- "martio",
- "april",
- "maio",
- "junio",
- "julio",
- "augusto",
- "septembre",
- "octobre",
- "novembre",
- "decembre"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mer",
- "jov",
- "ven",
- "sab"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "mai",
- "jun",
- "jul",
- "aug",
- "sep",
- "oct",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ia",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id-id.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id-id.js
deleted file mode 100644
index 8324dce6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id-id.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Minggu",
- "Senin",
- "Selasa",
- "Rabu",
- "Kamis",
- "Jumat",
- "Sabtu"
- ],
- "ERANAMES": [
- "Sebelum Masehi",
- "M"
- ],
- "ERAS": [
- "SM",
- "M"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januari",
- "Februari",
- "Maret",
- "April",
- "Mei",
- "Juni",
- "Juli",
- "Agustus",
- "September",
- "Oktober",
- "November",
- "Desember"
- ],
- "SHORTDAY": [
- "Min",
- "Sen",
- "Sel",
- "Rab",
- "Kam",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Agt",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH.mm.ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd/MM/yy HH.mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rp",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "id-id",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id.js
deleted file mode 100644
index b91f32dd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_id.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Minggu",
- "Senin",
- "Selasa",
- "Rabu",
- "Kamis",
- "Jumat",
- "Sabtu"
- ],
- "ERANAMES": [
- "Sebelum Masehi",
- "M"
- ],
- "ERAS": [
- "SM",
- "M"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januari",
- "Februari",
- "Maret",
- "April",
- "Mei",
- "Juni",
- "Juli",
- "Agustus",
- "September",
- "Oktober",
- "November",
- "Desember"
- ],
- "SHORTDAY": [
- "Min",
- "Sen",
- "Sel",
- "Rab",
- "Kam",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Agt",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH.mm.ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd/MM/yy HH.mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rp",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "id",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig-ng.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig-ng.js
deleted file mode 100644
index 0515635b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig-ng.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "A.M.",
- "P.M."
- ],
- "DAY": [
- "Mb\u1ecds\u1ecb \u1ee4ka",
- "M\u1ecdnde",
- "Tiuzdee",
- "Wenezdee",
- "T\u1ecd\u1ecdzdee",
- "Fra\u1ecbdee",
- "Sat\u1ecddee"
- ],
- "ERANAMES": [
- "Tupu Kristi",
- "Af\u1ecd Kristi"
- ],
- "ERAS": [
- "T.K.",
- "A.K."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jen\u1ee5war\u1ecb",
- "Febr\u1ee5war\u1ecb",
- "Maach\u1ecb",
- "Eprel",
- "Mee",
- "Juun",
- "Jula\u1ecb",
- "\u1eccg\u1ecd\u1ecdst",
- "Septemba",
- "\u1eccktoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "\u1ee4ka",
- "M\u1ecdn",
- "Tiu",
- "Wen",
- "T\u1ecd\u1ecd",
- "Fra\u1ecb",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jen",
- "Feb",
- "Maa",
- "Epr",
- "Mee",
- "Juu",
- "Jul",
- "\u1eccg\u1ecd",
- "Sep",
- "\u1ecckt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ig-ng",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig.js
deleted file mode 100644
index 2c9cfe40..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ig.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "A.M.",
- "P.M."
- ],
- "DAY": [
- "Mb\u1ecds\u1ecb \u1ee4ka",
- "M\u1ecdnde",
- "Tiuzdee",
- "Wenezdee",
- "T\u1ecd\u1ecdzdee",
- "Fra\u1ecbdee",
- "Sat\u1ecddee"
- ],
- "ERANAMES": [
- "Tupu Kristi",
- "Af\u1ecd Kristi"
- ],
- "ERAS": [
- "T.K.",
- "A.K."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jen\u1ee5war\u1ecb",
- "Febr\u1ee5war\u1ecb",
- "Maach\u1ecb",
- "Eprel",
- "Mee",
- "Juun",
- "Jula\u1ecb",
- "\u1eccg\u1ecd\u1ecdst",
- "Septemba",
- "\u1eccktoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "\u1ee4ka",
- "M\u1ecdn",
- "Tiu",
- "Wen",
- "T\u1ecd\u1ecd",
- "Fra\u1ecb",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jen",
- "Feb",
- "Maa",
- "Epr",
- "Mee",
- "Juu",
- "Jul",
- "\u1eccg\u1ecd",
- "Sep",
- "\u1ecckt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ig",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii-cn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii-cn.js
deleted file mode 100644
index 5cddd202..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii-cn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\ua3b8\ua111",
- "\ua06f\ua2d2"
- ],
- "DAY": [
- "\ua46d\ua18f\ua44d",
- "\ua18f\ua282\ua2cd",
- "\ua18f\ua282\ua44d",
- "\ua18f\ua282\ua315",
- "\ua18f\ua282\ua1d6",
- "\ua18f\ua282\ua26c",
- "\ua18f\ua282\ua0d8"
- ],
- "ERANAMES": [
- "\ua0c5\ua2ca\ua0bf",
- "\ua0c5\ua2ca\ua282"
- ],
- "ERAS": [
- "\ua0c5\ua2ca\ua0bf",
- "\ua0c5\ua2ca\ua282"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\ua2cd\ua1aa",
- "\ua44d\ua1aa",
- "\ua315\ua1aa",
- "\ua1d6\ua1aa",
- "\ua26c\ua1aa",
- "\ua0d8\ua1aa",
- "\ua3c3\ua1aa",
- "\ua246\ua1aa",
- "\ua22c\ua1aa",
- "\ua2b0\ua1aa",
- "\ua2b0\ua2aa\ua1aa",
- "\ua2b0\ua44b\ua1aa"
- ],
- "SHORTDAY": [
- "\ua46d\ua18f",
- "\ua18f\ua2cd",
- "\ua18f\ua44d",
- "\ua18f\ua315",
- "\ua18f\ua1d6",
- "\ua18f\ua26c",
- "\ua18f\ua0d8"
- ],
- "SHORTMONTH": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ii-cn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii.js
deleted file mode 100644
index 2b4f22f8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ii.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\ua3b8\ua111",
- "\ua06f\ua2d2"
- ],
- "DAY": [
- "\ua46d\ua18f\ua44d",
- "\ua18f\ua282\ua2cd",
- "\ua18f\ua282\ua44d",
- "\ua18f\ua282\ua315",
- "\ua18f\ua282\ua1d6",
- "\ua18f\ua282\ua26c",
- "\ua18f\ua282\ua0d8"
- ],
- "ERANAMES": [
- "\ua0c5\ua2ca\ua0bf",
- "\ua0c5\ua2ca\ua282"
- ],
- "ERAS": [
- "\ua0c5\ua2ca\ua0bf",
- "\ua0c5\ua2ca\ua282"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\ua2cd\ua1aa",
- "\ua44d\ua1aa",
- "\ua315\ua1aa",
- "\ua1d6\ua1aa",
- "\ua26c\ua1aa",
- "\ua0d8\ua1aa",
- "\ua3c3\ua1aa",
- "\ua246\ua1aa",
- "\ua22c\ua1aa",
- "\ua2b0\ua1aa",
- "\ua2b0\ua2aa\ua1aa",
- "\ua2b0\ua44b\ua1aa"
- ],
- "SHORTDAY": [
- "\ua46d\ua18f",
- "\ua18f\ua2cd",
- "\ua18f\ua44d",
- "\ua18f\ua315",
- "\ua18f\ua1d6",
- "\ua18f\ua26c",
- "\ua18f\ua0d8"
- ],
- "SHORTMONTH": [
- "1",
- "2",
- "3",
- "4",
- "5",
- "6",
- "7",
- "8",
- "9",
- "10",
- "11",
- "12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ii",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_in.js
deleted file mode 100644
index f9d523ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Minggu",
- "Senin",
- "Selasa",
- "Rabu",
- "Kamis",
- "Jumat",
- "Sabtu"
- ],
- "ERANAMES": [
- "Sebelum Masehi",
- "M"
- ],
- "ERAS": [
- "SM",
- "M"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januari",
- "Februari",
- "Maret",
- "April",
- "Mei",
- "Juni",
- "Juli",
- "Agustus",
- "September",
- "Oktober",
- "November",
- "Desember"
- ],
- "SHORTDAY": [
- "Min",
- "Sen",
- "Sel",
- "Rab",
- "Kam",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Agt",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH.mm.ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd/MM/yy HH.mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rp",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "in",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is-is.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is-is.js
deleted file mode 100644
index b38bd19f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is-is.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-function getWT(v, f) {
- if (f === 0) {
- return {w: 0, t: 0};
- }
-
- while ((f % 10) === 0) {
- f /= 10;
- v--;
- }
-
- return {w: v, t: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "f.h.",
- "e.h."
- ],
- "DAY": [
- "sunnudagur",
- "m\u00e1nudagur",
- "\u00feri\u00f0judagur",
- "mi\u00f0vikudagur",
- "fimmtudagur",
- "f\u00f6studagur",
- "laugardagur"
- ],
- "ERANAMES": [
- "fyrir Krist",
- "eftir Krist"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "jan\u00faar",
- "febr\u00faar",
- "mars",
- "apr\u00edl",
- "ma\u00ed",
- "j\u00fan\u00ed",
- "j\u00fal\u00ed",
- "\u00e1g\u00fast",
- "september",
- "okt\u00f3ber",
- "n\u00f3vember",
- "desember"
- ],
- "SHORTDAY": [
- "sun.",
- "m\u00e1n.",
- "\u00feri.",
- "mi\u00f0.",
- "fim.",
- "f\u00f6s.",
- "lau."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "ma\u00ed",
- "j\u00fan.",
- "j\u00fal.",
- "\u00e1g\u00fa.",
- "sep.",
- "okt.",
- "n\u00f3v.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.y HH:mm",
- "shortDate": "d.M.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "is-is",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (wt.t == 0 && i % 10 == 1 && i % 100 != 11 || wt.t != 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is.js
deleted file mode 100644
index 5b3ad431..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_is.js
+++ /dev/null
@@ -1,141 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-function getWT(v, f) {
- if (f === 0) {
- return {w: 0, t: 0};
- }
-
- while ((f % 10) === 0) {
- f /= 10;
- v--;
- }
-
- return {w: v, t: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "f.h.",
- "e.h."
- ],
- "DAY": [
- "sunnudagur",
- "m\u00e1nudagur",
- "\u00feri\u00f0judagur",
- "mi\u00f0vikudagur",
- "fimmtudagur",
- "f\u00f6studagur",
- "laugardagur"
- ],
- "ERANAMES": [
- "fyrir Krist",
- "eftir Krist"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "jan\u00faar",
- "febr\u00faar",
- "mars",
- "apr\u00edl",
- "ma\u00ed",
- "j\u00fan\u00ed",
- "j\u00fal\u00ed",
- "\u00e1g\u00fast",
- "september",
- "okt\u00f3ber",
- "n\u00f3vember",
- "desember"
- ],
- "SHORTDAY": [
- "sun.",
- "m\u00e1n.",
- "\u00feri.",
- "mi\u00f0.",
- "fim.",
- "f\u00f6s.",
- "lau."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "ma\u00ed",
- "j\u00fan.",
- "j\u00fal.",
- "\u00e1g\u00fa.",
- "sep.",
- "okt.",
- "n\u00f3v.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.y HH:mm",
- "shortDate": "d.M.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "is",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); var wt = getWT(vf.v, vf.f); if (wt.t == 0 && i % 10 == 1 && i % 100 != 11 || wt.t != 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-ch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-ch.js
deleted file mode 100644
index 1adbbe48..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-ch.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domenica",
- "luned\u00ec",
- "marted\u00ec",
- "mercoled\u00ec",
- "gioved\u00ec",
- "venerd\u00ec",
- "sabato"
- ],
- "ERANAMES": [
- "a.C.",
- "d.C."
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "gennaio",
- "febbraio",
- "marzo",
- "aprile",
- "maggio",
- "giugno",
- "luglio",
- "agosto",
- "settembre",
- "ottobre",
- "novembre",
- "dicembre"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mer",
- "gio",
- "ven",
- "sab"
- ],
- "SHORTMONTH": [
- "gen",
- "feb",
- "mar",
- "apr",
- "mag",
- "giu",
- "lug",
- "ago",
- "set",
- "ott",
- "nov",
- "dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d-MMM-y HH:mm:ss",
- "mediumDate": "d-MMM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "'",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "it-ch",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-it.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-it.js
deleted file mode 100644
index f02cc459..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-it.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domenica",
- "luned\u00ec",
- "marted\u00ec",
- "mercoled\u00ec",
- "gioved\u00ec",
- "venerd\u00ec",
- "sabato"
- ],
- "ERANAMES": [
- "a.C.",
- "d.C."
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "gennaio",
- "febbraio",
- "marzo",
- "aprile",
- "maggio",
- "giugno",
- "luglio",
- "agosto",
- "settembre",
- "ottobre",
- "novembre",
- "dicembre"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mer",
- "gio",
- "ven",
- "sab"
- ],
- "SHORTMONTH": [
- "gen",
- "feb",
- "mar",
- "apr",
- "mag",
- "giu",
- "lug",
- "ago",
- "set",
- "ott",
- "nov",
- "dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd MMM y HH:mm:ss",
- "mediumDate": "dd MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "it-it",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-sm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-sm.js
deleted file mode 100644
index 5ee2ce18..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it-sm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domenica",
- "luned\u00ec",
- "marted\u00ec",
- "mercoled\u00ec",
- "gioved\u00ec",
- "venerd\u00ec",
- "sabato"
- ],
- "ERANAMES": [
- "a.C.",
- "d.C."
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "gennaio",
- "febbraio",
- "marzo",
- "aprile",
- "maggio",
- "giugno",
- "luglio",
- "agosto",
- "settembre",
- "ottobre",
- "novembre",
- "dicembre"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mer",
- "gio",
- "ven",
- "sab"
- ],
- "SHORTMONTH": [
- "gen",
- "feb",
- "mar",
- "apr",
- "mag",
- "giu",
- "lug",
- "ago",
- "set",
- "ott",
- "nov",
- "dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd MMM y HH:mm:ss",
- "mediumDate": "dd MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "it-sm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it.js
deleted file mode 100644
index b4b5e4e5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_it.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domenica",
- "luned\u00ec",
- "marted\u00ec",
- "mercoled\u00ec",
- "gioved\u00ec",
- "venerd\u00ec",
- "sabato"
- ],
- "ERANAMES": [
- "a.C.",
- "d.C."
- ],
- "ERAS": [
- "aC",
- "dC"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "gennaio",
- "febbraio",
- "marzo",
- "aprile",
- "maggio",
- "giugno",
- "luglio",
- "agosto",
- "settembre",
- "ottobre",
- "novembre",
- "dicembre"
- ],
- "SHORTDAY": [
- "dom",
- "lun",
- "mar",
- "mer",
- "gio",
- "ven",
- "sab"
- ],
- "SHORTMONTH": [
- "gen",
- "feb",
- "mar",
- "apr",
- "mag",
- "giu",
- "lug",
- "ago",
- "set",
- "ott",
- "nov",
- "dic"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd MMM y HH:mm:ss",
- "mediumDate": "dd MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "it",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_iw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_iw.js
deleted file mode 100644
index 02622c14..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_iw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6",
- "\u05d0\u05d7\u05d4\u05f4\u05e6"
- ],
- "DAY": [
- "\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df",
- "\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9",
- "\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9",
- "\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea"
- ],
- "ERANAMES": [
- "\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4",
- "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4"
- ],
- "ERAS": [
- "\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1",
- "\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u05d9\u05e0\u05d5\u05d0\u05e8",
- "\u05e4\u05d1\u05e8\u05d5\u05d0\u05e8",
- "\u05de\u05e8\u05e5",
- "\u05d0\u05e4\u05e8\u05d9\u05dc",
- "\u05de\u05d0\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e4\u05d8\u05de\u05d1\u05e8",
- "\u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8",
- "\u05e0\u05d5\u05d1\u05de\u05d1\u05e8",
- "\u05d3\u05e6\u05de\u05d1\u05e8"
- ],
- "SHORTDAY": [
- "\u05d9\u05d5\u05dd \u05d0\u05f3",
- "\u05d9\u05d5\u05dd \u05d1\u05f3",
- "\u05d9\u05d5\u05dd \u05d2\u05f3",
- "\u05d9\u05d5\u05dd \u05d3\u05f3",
- "\u05d9\u05d5\u05dd \u05d4\u05f3",
- "\u05d9\u05d5\u05dd \u05d5\u05f3",
- "\u05e9\u05d1\u05ea"
- ],
- "SHORTMONTH": [
- "\u05d9\u05e0\u05d5\u05f3",
- "\u05e4\u05d1\u05e8\u05f3",
- "\u05de\u05e8\u05e5",
- "\u05d0\u05e4\u05e8\u05f3",
- "\u05de\u05d0\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d2\u05f3",
- "\u05e1\u05e4\u05d8\u05f3",
- "\u05d0\u05d5\u05e7\u05f3",
- "\u05e0\u05d5\u05d1\u05f3",
- "\u05d3\u05e6\u05de\u05f3"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d \u05d1MMMM y",
- "longDate": "d \u05d1MMMM y",
- "medium": "d \u05d1MMM y H:mm:ss",
- "mediumDate": "d \u05d1MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d.M.y H:mm",
- "shortDate": "d.M.y",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20aa",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "iw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i == 2 && vf.v == 0) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && (n < 0 || n > 10) && n % 10 == 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja-jp.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja-jp.js
deleted file mode 100644
index 78cd0694..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja-jp.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u5348\u524d",
- "\u5348\u5f8c"
- ],
- "DAY": [
- "\u65e5\u66dc\u65e5",
- "\u6708\u66dc\u65e5",
- "\u706b\u66dc\u65e5",
- "\u6c34\u66dc\u65e5",
- "\u6728\u66dc\u65e5",
- "\u91d1\u66dc\u65e5",
- "\u571f\u66dc\u65e5"
- ],
- "ERANAMES": [
- "\u7d00\u5143\u524d",
- "\u897f\u66a6"
- ],
- "ERAS": [
- "\u7d00\u5143\u524d",
- "\u897f\u66a6"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u65e5",
- "\u6708",
- "\u706b",
- "\u6c34",
- "\u6728",
- "\u91d1",
- "\u571f"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y/MM/dd H:mm:ss",
- "mediumDate": "y/MM/dd",
- "mediumTime": "H:mm:ss",
- "short": "y/MM/dd H:mm",
- "shortDate": "y/MM/dd",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ja-jp",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja.js
deleted file mode 100644
index 0011b5cc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ja.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u5348\u524d",
- "\u5348\u5f8c"
- ],
- "DAY": [
- "\u65e5\u66dc\u65e5",
- "\u6708\u66dc\u65e5",
- "\u706b\u66dc\u65e5",
- "\u6c34\u66dc\u65e5",
- "\u6728\u66dc\u65e5",
- "\u91d1\u66dc\u65e5",
- "\u571f\u66dc\u65e5"
- ],
- "ERANAMES": [
- "\u7d00\u5143\u524d",
- "\u897f\u66a6"
- ],
- "ERAS": [
- "\u7d00\u5143\u524d",
- "\u897f\u66a6"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u65e5",
- "\u6708",
- "\u706b",
- "\u6c34",
- "\u6728",
- "\u91d1",
- "\u571f"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y/MM/dd H:mm:ss",
- "mediumDate": "y/MM/dd",
- "mediumTime": "H:mm:ss",
- "short": "y/MM/dd H:mm",
- "shortDate": "y/MM/dd",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ja",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo-cm.js
deleted file mode 100644
index ae05a5a7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "mba\ua78cmba\ua78c",
- "\u014bka mb\u0254\u0301t nji"
- ],
- "DAY": [
- "S\u0254\u0301ndi",
- "M\u0254\u0301ndi",
- "\u00c1pta M\u0254\u0301ndi",
- "W\u025b\u0301n\u025bs\u025bd\u025b",
- "T\u0254\u0301s\u025bd\u025b",
- "F\u025bl\u00e2y\u025bd\u025b",
- "S\u00e1sid\u025b"
- ],
- "ERANAMES": [
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 l\u025b\u025bn\u025b K\u025bl\u00eds\u025bt\u0254 g\u0254 \u0144\u0254\u0301",
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 f\u00fan\u025b K\u025bl\u00eds\u025bt\u0254 t\u0254\u0301 m\u0254\u0301"
- ],
- "ERAS": [
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 l\u025b\u025bn\u025b K\u025bl\u00eds\u025bt\u0254 g\u0254 \u0144\u0254\u0301",
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 f\u00fan\u025b K\u025bl\u00eds\u025bt\u0254 t\u0254\u0301 m\u0254\u0301"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ndu\u014bmbi Sa\u014b",
- "P\u025bsa\u014b P\u025b\u0301p\u00e1",
- "P\u025bsa\u014b P\u025b\u0301t\u00e1t",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa",
- "P\u025bsa\u014b Pataa",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa",
- "P\u025bsa\u014b Saamb\u00e1",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa",
- "P\u025bsa\u014b N\u025bg\u025b\u0301m",
- "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301",
- "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1"
- ],
- "SHORTDAY": [
- "S\u0254\u0301ndi",
- "M\u0254\u0301ndi",
- "\u00c1pta M\u0254\u0301ndi",
- "W\u025b\u0301n\u025bs\u025bd\u025b",
- "T\u0254\u0301s\u025bd\u025b",
- "F\u025bl\u00e2y\u025bd\u025b",
- "S\u00e1sid\u025b"
- ],
- "SHORTMONTH": [
- "Ndu\u014bmbi Sa\u014b",
- "P\u025bsa\u014b P\u025b\u0301p\u00e1",
- "P\u025bsa\u014b P\u025b\u0301t\u00e1t",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa",
- "P\u025bsa\u014b Pataa",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa",
- "P\u025bsa\u014b Saamb\u00e1",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa",
- "P\u025bsa\u014b N\u025bg\u025b\u0301m",
- "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301",
- "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "jgo-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo.js
deleted file mode 100644
index f27c22c3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jgo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "mba\ua78cmba\ua78c",
- "\u014bka mb\u0254\u0301t nji"
- ],
- "DAY": [
- "S\u0254\u0301ndi",
- "M\u0254\u0301ndi",
- "\u00c1pta M\u0254\u0301ndi",
- "W\u025b\u0301n\u025bs\u025bd\u025b",
- "T\u0254\u0301s\u025bd\u025b",
- "F\u025bl\u00e2y\u025bd\u025b",
- "S\u00e1sid\u025b"
- ],
- "ERANAMES": [
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 l\u025b\u025bn\u025b K\u025bl\u00eds\u025bt\u0254 g\u0254 \u0144\u0254\u0301",
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 f\u00fan\u025b K\u025bl\u00eds\u025bt\u0254 t\u0254\u0301 m\u0254\u0301"
- ],
- "ERAS": [
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 l\u025b\u025bn\u025b K\u025bl\u00eds\u025bt\u0254 g\u0254 \u0144\u0254\u0301",
- "ts\u025btts\u025bt m\u025b\u014bgu\ua78c mi \u025b\u0301 f\u00fan\u025b K\u025bl\u00eds\u025bt\u0254 t\u0254\u0301 m\u0254\u0301"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ndu\u014bmbi Sa\u014b",
- "P\u025bsa\u014b P\u025b\u0301p\u00e1",
- "P\u025bsa\u014b P\u025b\u0301t\u00e1t",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa",
- "P\u025bsa\u014b Pataa",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa",
- "P\u025bsa\u014b Saamb\u00e1",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa",
- "P\u025bsa\u014b N\u025bg\u025b\u0301m",
- "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301",
- "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1"
- ],
- "SHORTDAY": [
- "S\u0254\u0301ndi",
- "M\u0254\u0301ndi",
- "\u00c1pta M\u0254\u0301ndi",
- "W\u025b\u0301n\u025bs\u025bd\u025b",
- "T\u0254\u0301s\u025bd\u025b",
- "F\u025bl\u00e2y\u025bd\u025b",
- "S\u00e1sid\u025b"
- ],
- "SHORTMONTH": [
- "Ndu\u014bmbi Sa\u014b",
- "P\u025bsa\u014b P\u025b\u0301p\u00e1",
- "P\u025bsa\u014b P\u025b\u0301t\u00e1t",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301kwa",
- "P\u025bsa\u014b Pataa",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301nt\u00fak\u00fa",
- "P\u025bsa\u014b Saamb\u00e1",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301f\u0254m",
- "P\u025bsa\u014b P\u025b\u0301n\u025b\u0301pf\u00fa\ua78b\u00fa",
- "P\u025bsa\u014b N\u025bg\u025b\u0301m",
- "P\u025bsa\u014b Nts\u0254\u030cpm\u0254\u0301",
- "P\u025bsa\u014b Nts\u0254\u030cpp\u00e1"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "jgo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc-tz.js
deleted file mode 100644
index 8eff91df..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "utuko",
- "kyiukonyi"
- ],
- "DAY": [
- "Jumapilyi",
- "Jumatatuu",
- "Jumanne",
- "Jumatanu",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristu",
- "Baada ya Kristu"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprilyi",
- "Mei",
- "Junyi",
- "Julyai",
- "Agusti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "jmc-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc.js
deleted file mode 100644
index dd754e93..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_jmc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "utuko",
- "kyiukonyi"
- ],
- "DAY": [
- "Jumapilyi",
- "Jumatatuu",
- "Jumanne",
- "Jumatanu",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristu",
- "Baada ya Kristu"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprilyi",
- "Mei",
- "Junyi",
- "Julyai",
- "Agusti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "jmc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka-ge.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka-ge.js
deleted file mode 100644
index 4383940a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka-ge.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u10d9\u10d5\u10d8\u10e0\u10d0",
- "\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8",
- "\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8"
- ],
- "ERANAMES": [
- "\u10eb\u10d5\u10d4\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7",
- "\u10d0\u10ee\u10d0\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7"
- ],
- "ERAS": [
- "\u10eb\u10d5. \u10ec.",
- "\u10d0\u10ee. \u10ec."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8",
- "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8",
- "\u10db\u10d0\u10e0\u10e2\u10d8",
- "\u10d0\u10de\u10e0\u10d8\u10da\u10d8",
- "\u10db\u10d0\u10d8\u10e1\u10d8",
- "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8",
- "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8",
- "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd",
- "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8",
- "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8",
- "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8",
- "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8"
- ],
- "SHORTDAY": [
- "\u10d9\u10d5\u10d8",
- "\u10dd\u10e0\u10e8",
- "\u10e1\u10d0\u10db",
- "\u10dd\u10d7\u10ee",
- "\u10ee\u10e3\u10d7",
- "\u10de\u10d0\u10e0",
- "\u10e8\u10d0\u10d1"
- ],
- "SHORTMONTH": [
- "\u10d8\u10d0\u10dc",
- "\u10d7\u10d4\u10d1",
- "\u10db\u10d0\u10e0",
- "\u10d0\u10de\u10e0",
- "\u10db\u10d0\u10d8",
- "\u10d8\u10d5\u10dc",
- "\u10d8\u10d5\u10da",
- "\u10d0\u10d2\u10d5",
- "\u10e1\u10d4\u10e5",
- "\u10dd\u10e5\u10e2",
- "\u10dc\u10dd\u10d4",
- "\u10d3\u10d4\u10d9"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GEL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ka-ge",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka.js
deleted file mode 100644
index fc846cae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ka.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u10d9\u10d5\u10d8\u10e0\u10d0",
- "\u10dd\u10e0\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10e1\u10d0\u10db\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10dd\u10d7\u10ee\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10ee\u10e3\u10d7\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8",
- "\u10de\u10d0\u10e0\u10d0\u10e1\u10d9\u10d4\u10d5\u10d8",
- "\u10e8\u10d0\u10d1\u10d0\u10d7\u10d8"
- ],
- "ERANAMES": [
- "\u10eb\u10d5\u10d4\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7",
- "\u10d0\u10ee\u10d0\u10da\u10d8 \u10ec\u10d4\u10da\u10d7\u10d0\u10e6\u10e0\u10d8\u10ea\u10ee\u10d5\u10d8\u10d7"
- ],
- "ERAS": [
- "\u10eb\u10d5. \u10ec.",
- "\u10d0\u10ee. \u10ec."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u10d8\u10d0\u10dc\u10d5\u10d0\u10e0\u10d8",
- "\u10d7\u10d4\u10d1\u10d4\u10e0\u10d5\u10d0\u10da\u10d8",
- "\u10db\u10d0\u10e0\u10e2\u10d8",
- "\u10d0\u10de\u10e0\u10d8\u10da\u10d8",
- "\u10db\u10d0\u10d8\u10e1\u10d8",
- "\u10d8\u10d5\u10dc\u10d8\u10e1\u10d8",
- "\u10d8\u10d5\u10da\u10d8\u10e1\u10d8",
- "\u10d0\u10d2\u10d5\u10d8\u10e1\u10e2\u10dd",
- "\u10e1\u10d4\u10e5\u10e2\u10d4\u10db\u10d1\u10d4\u10e0\u10d8",
- "\u10dd\u10e5\u10e2\u10dd\u10db\u10d1\u10d4\u10e0\u10d8",
- "\u10dc\u10dd\u10d4\u10db\u10d1\u10d4\u10e0\u10d8",
- "\u10d3\u10d4\u10d9\u10d4\u10db\u10d1\u10d4\u10e0\u10d8"
- ],
- "SHORTDAY": [
- "\u10d9\u10d5\u10d8",
- "\u10dd\u10e0\u10e8",
- "\u10e1\u10d0\u10db",
- "\u10dd\u10d7\u10ee",
- "\u10ee\u10e3\u10d7",
- "\u10de\u10d0\u10e0",
- "\u10e8\u10d0\u10d1"
- ],
- "SHORTMONTH": [
- "\u10d8\u10d0\u10dc",
- "\u10d7\u10d4\u10d1",
- "\u10db\u10d0\u10e0",
- "\u10d0\u10de\u10e0",
- "\u10db\u10d0\u10d8",
- "\u10d8\u10d5\u10dc",
- "\u10d8\u10d5\u10da",
- "\u10d0\u10d2\u10d5",
- "\u10e1\u10d4\u10e5",
- "\u10dd\u10e5\u10e2",
- "\u10dc\u10dd\u10d4",
- "\u10d3\u10d4\u10d9"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GEL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ka",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab-dz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab-dz.js
deleted file mode 100644
index 6063c588..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab-dz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "n tufat",
- "n tmeddit"
- ],
- "DAY": [
- "Yanass",
- "Sanass",
- "Kra\u1e0dass",
- "Ku\u1e93ass",
- "Samass",
- "S\u1e0disass",
- "Sayass"
- ],
- "ERANAMES": [
- "send talalit n \u0190isa",
- "seld talalit n \u0190isa"
- ],
- "ERAS": [
- "snd. T.\u0190",
- "sld. T.\u0190"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Yennayer",
- "Fu\u1e5bar",
- "Me\u0263res",
- "Yebrir",
- "Mayyu",
- "Yunyu",
- "Yulyu",
- "\u0194uct",
- "Ctembe\u1e5b",
- "Tube\u1e5b",
- "Nunembe\u1e5b",
- "Du\u01e7embe\u1e5b"
- ],
- "SHORTDAY": [
- "Yan",
- "San",
- "Kra\u1e0d",
- "Ku\u1e93",
- "Sam",
- "S\u1e0dis",
- "Say"
- ],
- "SHORTMONTH": [
- "Yen",
- "Fur",
- "Me\u0263",
- "Yeb",
- "May",
- "Yun",
- "Yul",
- "\u0194uc",
- "Cte",
- "Tub",
- "Nun",
- "Du\u01e7"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "kab-dz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab.js
deleted file mode 100644
index d7b82a94..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kab.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "n tufat",
- "n tmeddit"
- ],
- "DAY": [
- "Yanass",
- "Sanass",
- "Kra\u1e0dass",
- "Ku\u1e93ass",
- "Samass",
- "S\u1e0disass",
- "Sayass"
- ],
- "ERANAMES": [
- "send talalit n \u0190isa",
- "seld talalit n \u0190isa"
- ],
- "ERAS": [
- "snd. T.\u0190",
- "sld. T.\u0190"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Yennayer",
- "Fu\u1e5bar",
- "Me\u0263res",
- "Yebrir",
- "Mayyu",
- "Yunyu",
- "Yulyu",
- "\u0194uct",
- "Ctembe\u1e5b",
- "Tube\u1e5b",
- "Nunembe\u1e5b",
- "Du\u01e7embe\u1e5b"
- ],
- "SHORTDAY": [
- "Yan",
- "San",
- "Kra\u1e0d",
- "Ku\u1e93",
- "Sam",
- "S\u1e0dis",
- "Say"
- ],
- "SHORTMONTH": [
- "Yen",
- "Fur",
- "Me\u0263",
- "Yeb",
- "May",
- "Yun",
- "Yul",
- "\u0194uc",
- "Cte",
- "Tub",
- "Nun",
- "Du\u01e7"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "kab",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam-ke.js
deleted file mode 100644
index 669f17f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0128yakwakya",
- "\u0128yaw\u0129oo"
- ],
- "DAY": [
- "Wa kyumwa",
- "Wa kwamb\u0129l\u0129lya",
- "Wa kel\u0129",
- "Wa katat\u0169",
- "Wa kana",
- "Wa katano",
- "Wa thanthat\u0169"
- ],
- "ERANAMES": [
- "Mbee wa Yes\u0169",
- "\u0128tina wa Yes\u0169"
- ],
- "ERAS": [
- "MY",
- "IY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mwai wa mbee",
- "Mwai wa kel\u0129",
- "Mwai wa katat\u0169",
- "Mwai wa kana",
- "Mwai wa katano",
- "Mwai wa thanthat\u0169",
- "Mwai wa muonza",
- "Mwai wa nyaanya",
- "Mwai wa kenda",
- "Mwai wa \u0129kumi",
- "Mwai wa \u0129kumi na \u0129mwe",
- "Mwai wa \u0129kumi na il\u0129"
- ],
- "SHORTDAY": [
- "Wky",
- "Wkw",
- "Wkl",
- "Wt\u0169",
- "Wkn",
- "Wtn",
- "Wth"
- ],
- "SHORTMONTH": [
- "Mbe",
- "Kel",
- "Kt\u0169",
- "Kan",
- "Ktn",
- "Tha",
- "Moo",
- "Nya",
- "Knd",
- "\u0128ku",
- "\u0128km",
- "\u0128kl"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kam-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam.js
deleted file mode 100644
index f0998400..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kam.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0128yakwakya",
- "\u0128yaw\u0129oo"
- ],
- "DAY": [
- "Wa kyumwa",
- "Wa kwamb\u0129l\u0129lya",
- "Wa kel\u0129",
- "Wa katat\u0169",
- "Wa kana",
- "Wa katano",
- "Wa thanthat\u0169"
- ],
- "ERANAMES": [
- "Mbee wa Yes\u0169",
- "\u0128tina wa Yes\u0169"
- ],
- "ERAS": [
- "MY",
- "IY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mwai wa mbee",
- "Mwai wa kel\u0129",
- "Mwai wa katat\u0169",
- "Mwai wa kana",
- "Mwai wa katano",
- "Mwai wa thanthat\u0169",
- "Mwai wa muonza",
- "Mwai wa nyaanya",
- "Mwai wa kenda",
- "Mwai wa \u0129kumi",
- "Mwai wa \u0129kumi na \u0129mwe",
- "Mwai wa \u0129kumi na il\u0129"
- ],
- "SHORTDAY": [
- "Wky",
- "Wkw",
- "Wkl",
- "Wt\u0169",
- "Wkn",
- "Wtn",
- "Wth"
- ],
- "SHORTMONTH": [
- "Mbe",
- "Kel",
- "Kt\u0169",
- "Kan",
- "Ktn",
- "Tha",
- "Moo",
- "Nya",
- "Knd",
- "\u0128ku",
- "\u0128km",
- "\u0128kl"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kam",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde-tz.js
deleted file mode 100644
index 0363929f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Muhi",
- "Chilo"
- ],
- "DAY": [
- "Liduva lyapili",
- "Liduva lyatatu",
- "Liduva lyanchechi",
- "Liduva lyannyano",
- "Liduva lyannyano na linji",
- "Liduva lyannyano na mavili",
- "Liduva litandi"
- ],
- "ERANAMES": [
- "Akanapawa Yesu",
- "Nankuida Yesu"
- ],
- "ERAS": [
- "AY",
- "NY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mwedi Ntandi",
- "Mwedi wa Pili",
- "Mwedi wa Tatu",
- "Mwedi wa Nchechi",
- "Mwedi wa Nnyano",
- "Mwedi wa Nnyano na Umo",
- "Mwedi wa Nnyano na Mivili",
- "Mwedi wa Nnyano na Mitatu",
- "Mwedi wa Nnyano na Nchechi",
- "Mwedi wa Nnyano na Nnyano",
- "Mwedi wa Nnyano na Nnyano na U",
- "Mwedi wa Nnyano na Nnyano na M"
- ],
- "SHORTDAY": [
- "Ll2",
- "Ll3",
- "Ll4",
- "Ll5",
- "Ll6",
- "Ll7",
- "Ll1"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kde-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde.js
deleted file mode 100644
index 6dcc55eb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kde.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Muhi",
- "Chilo"
- ],
- "DAY": [
- "Liduva lyapili",
- "Liduva lyatatu",
- "Liduva lyanchechi",
- "Liduva lyannyano",
- "Liduva lyannyano na linji",
- "Liduva lyannyano na mavili",
- "Liduva litandi"
- ],
- "ERANAMES": [
- "Akanapawa Yesu",
- "Nankuida Yesu"
- ],
- "ERAS": [
- "AY",
- "NY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mwedi Ntandi",
- "Mwedi wa Pili",
- "Mwedi wa Tatu",
- "Mwedi wa Nchechi",
- "Mwedi wa Nnyano",
- "Mwedi wa Nnyano na Umo",
- "Mwedi wa Nnyano na Mivili",
- "Mwedi wa Nnyano na Mitatu",
- "Mwedi wa Nnyano na Nchechi",
- "Mwedi wa Nnyano na Nnyano",
- "Mwedi wa Nnyano na Nnyano na U",
- "Mwedi wa Nnyano na Nnyano na M"
- ],
- "SHORTDAY": [
- "Ll2",
- "Ll3",
- "Ll4",
- "Ll5",
- "Ll6",
- "Ll7",
- "Ll1"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kde",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea-cv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea-cv.js
deleted file mode 100644
index 1fc8d8e6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea-cv.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "dumingu",
- "sigunda-fera",
- "tersa-fera",
- "kuarta-fera",
- "kinta-fera",
- "sesta-fera",
- "sabadu"
- ],
- "ERANAMES": [
- "Antis di Kristu",
- "Dispos di Kristu"
- ],
- "ERAS": [
- "AK",
- "DK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janeru",
- "Febreru",
- "Marsu",
- "Abril",
- "Maiu",
- "Junhu",
- "Julhu",
- "Agostu",
- "Setenbru",
- "Otubru",
- "Nuvenbru",
- "Dizenbru"
- ],
- "SHORTDAY": [
- "dum",
- "sig",
- "ter",
- "kua",
- "kin",
- "ses",
- "sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Abr",
- "Mai",
- "Jun",
- "Jul",
- "Ago",
- "Set",
- "Otu",
- "Nuv",
- "Diz"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'di' MMMM 'di' y",
- "longDate": "d 'di' MMMM 'di' y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CVE",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "kea-cv",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea.js
deleted file mode 100644
index 0bab114d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kea.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "dumingu",
- "sigunda-fera",
- "tersa-fera",
- "kuarta-fera",
- "kinta-fera",
- "sesta-fera",
- "sabadu"
- ],
- "ERANAMES": [
- "Antis di Kristu",
- "Dispos di Kristu"
- ],
- "ERAS": [
- "AK",
- "DK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janeru",
- "Febreru",
- "Marsu",
- "Abril",
- "Maiu",
- "Junhu",
- "Julhu",
- "Agostu",
- "Setenbru",
- "Otubru",
- "Nuvenbru",
- "Dizenbru"
- ],
- "SHORTDAY": [
- "dum",
- "sig",
- "ter",
- "kua",
- "kin",
- "ses",
- "sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Abr",
- "Mai",
- "Jun",
- "Jul",
- "Ago",
- "Set",
- "Otu",
- "Nuv",
- "Diz"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'di' MMMM 'di' y",
- "longDate": "d 'di' MMMM 'di' y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CVE",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "kea",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq-ml.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq-ml.js
deleted file mode 100644
index 328809e1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq-ml.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Adduha",
- "Aluula"
- ],
- "DAY": [
- "Alhadi",
- "Atini",
- "Atalata",
- "Alarba",
- "Alhamiisa",
- "Aljuma",
- "Assabdu"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa jamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alj",
- "Ass"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "khq-ml",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq.js
deleted file mode 100644
index 90fa7e6b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_khq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Adduha",
- "Aluula"
- ],
- "DAY": [
- "Alhadi",
- "Atini",
- "Atalata",
- "Alarba",
- "Alhamiisa",
- "Aljuma",
- "Assabdu"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa jamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alj",
- "Ass"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "khq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki-ke.js
deleted file mode 100644
index c8d312b7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Kiroko",
- "Hwa\u0129-in\u0129"
- ],
- "DAY": [
- "Kiumia",
- "Njumatat\u0169",
- "Njumaine",
- "Njumatana",
- "Aramithi",
- "Njumaa",
- "Njumamothi"
- ],
- "ERANAMES": [
- "Mbere ya Kristo",
- "Thutha wa Kristo"
- ],
- "ERAS": [
- "MK",
- "TK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Njenuar\u0129",
- "Mwere wa ker\u0129",
- "Mwere wa gatat\u0169",
- "Mwere wa kana",
- "Mwere wa gatano",
- "Mwere wa gatandat\u0169",
- "Mwere wa m\u0169gwanja",
- "Mwere wa kanana",
- "Mwere wa kenda",
- "Mwere wa ik\u0169mi",
- "Mwere wa ik\u0169mi na \u0169mwe",
- "Ndithemba"
- ],
- "SHORTDAY": [
- "KMA",
- "NTT",
- "NMN",
- "NMT",
- "ART",
- "NMA",
- "NMM"
- ],
- "SHORTMONTH": [
- "JEN",
- "WKR",
- "WGT",
- "WKN",
- "WTN",
- "WTD",
- "WMJ",
- "WNN",
- "WKD",
- "WIK",
- "WMW",
- "DIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ki-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki.js
deleted file mode 100644
index b21103da..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ki.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Kiroko",
- "Hwa\u0129-in\u0129"
- ],
- "DAY": [
- "Kiumia",
- "Njumatat\u0169",
- "Njumaine",
- "Njumatana",
- "Aramithi",
- "Njumaa",
- "Njumamothi"
- ],
- "ERANAMES": [
- "Mbere ya Kristo",
- "Thutha wa Kristo"
- ],
- "ERAS": [
- "MK",
- "TK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Njenuar\u0129",
- "Mwere wa ker\u0129",
- "Mwere wa gatat\u0169",
- "Mwere wa kana",
- "Mwere wa gatano",
- "Mwere wa gatandat\u0169",
- "Mwere wa m\u0169gwanja",
- "Mwere wa kanana",
- "Mwere wa kenda",
- "Mwere wa ik\u0169mi",
- "Mwere wa ik\u0169mi na \u0169mwe",
- "Ndithemba"
- ],
- "SHORTDAY": [
- "KMA",
- "NTT",
- "NMN",
- "NMT",
- "ART",
- "NMA",
- "NMM"
- ],
- "SHORTMONTH": [
- "JEN",
- "WKR",
- "WGT",
- "WKN",
- "WTN",
- "WTD",
- "WMJ",
- "WNN",
- "WKD",
- "WIK",
- "WMW",
- "DIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ki",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl-kz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl-kz.js
deleted file mode 100644
index 828abbf4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl-kz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0442\u0430\u04a3\u0435\u0440\u0442\u0435\u04a3\u0433\u0456",
- "\u0442\u04af\u0441\u0442\u0435\u043d \u043a\u0435\u0439\u0456\u043d\u0433\u0456"
- ],
- "DAY": [
- "\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456",
- "\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456",
- "\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0436\u04b1\u043c\u0430",
- "\u0441\u0435\u043d\u0431\u0456"
- ],
- "ERANAMES": [
- "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437\u0493\u0430 \u0434\u0435\u0439\u0456\u043d",
- "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437"
- ],
- "ERAS": [
- "\u0431.\u0437.\u0434.",
- "\u0431.\u0437."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u049b\u0430\u04a3\u0442\u0430\u0440",
- "\u0430\u049b\u043f\u0430\u043d",
- "\u043d\u0430\u0443\u0440\u044b\u0437",
- "\u0441\u04d9\u0443\u0456\u0440",
- "\u043c\u0430\u043c\u044b\u0440",
- "\u043c\u0430\u0443\u0441\u044b\u043c",
- "\u0448\u0456\u043b\u0434\u0435",
- "\u0442\u0430\u043c\u044b\u0437",
- "\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a",
- "\u049b\u0430\u0437\u0430\u043d",
- "\u049b\u0430\u0440\u0430\u0448\u0430",
- "\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d"
- ],
- "SHORTDAY": [
- "\u0436\u0435\u043a",
- "\u0434\u04af\u0439",
- "\u0441\u0435\u0439",
- "\u0441\u04d9\u0440",
- "\u0431\u0435\u0439",
- "\u0436\u04b1\u043c\u0430",
- "\u0441\u0435\u043d"
- ],
- "SHORTMONTH": [
- "\u049b\u0430\u04a3.",
- "\u0430\u049b\u043f.",
- "\u043d\u0430\u0443.",
- "\u0441\u04d9\u0443.",
- "\u043c\u0430\u043c.",
- "\u043c\u0430\u0443.",
- "\u0448\u0456\u043b.",
- "\u0442\u0430\u043c.",
- "\u049b\u044b\u0440.",
- "\u049b\u0430\u0437.",
- "\u049b\u0430\u0440.",
- "\u0436\u0435\u043b\u0442."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "y, dd-MMM HH:mm:ss",
- "mediumDate": "y, dd-MMM",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b8",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "kk-cyrl-kz",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl.js
deleted file mode 100644
index 321fad88..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk-cyrl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0442\u0430\u04a3\u0435\u0440\u0442\u0435\u04a3\u0433\u0456",
- "\u0442\u04af\u0441\u0442\u0435\u043d \u043a\u0435\u0439\u0456\u043d\u0433\u0456"
- ],
- "DAY": [
- "\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456",
- "\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456",
- "\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0436\u04b1\u043c\u0430",
- "\u0441\u0435\u043d\u0431\u0456"
- ],
- "ERANAMES": [
- "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437\u0493\u0430 \u0434\u0435\u0439\u0456\u043d",
- "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437"
- ],
- "ERAS": [
- "\u0431.\u0437.\u0434.",
- "\u0431.\u0437."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u049b\u0430\u04a3\u0442\u0430\u0440",
- "\u0430\u049b\u043f\u0430\u043d",
- "\u043d\u0430\u0443\u0440\u044b\u0437",
- "\u0441\u04d9\u0443\u0456\u0440",
- "\u043c\u0430\u043c\u044b\u0440",
- "\u043c\u0430\u0443\u0441\u044b\u043c",
- "\u0448\u0456\u043b\u0434\u0435",
- "\u0442\u0430\u043c\u044b\u0437",
- "\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a",
- "\u049b\u0430\u0437\u0430\u043d",
- "\u049b\u0430\u0440\u0430\u0448\u0430",
- "\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d"
- ],
- "SHORTDAY": [
- "\u0436\u0435\u043a",
- "\u0434\u04af\u0439",
- "\u0441\u0435\u0439",
- "\u0441\u04d9\u0440",
- "\u0431\u0435\u0439",
- "\u0436\u04b1\u043c\u0430",
- "\u0441\u0435\u043d"
- ],
- "SHORTMONTH": [
- "\u049b\u0430\u04a3.",
- "\u0430\u049b\u043f.",
- "\u043d\u0430\u0443.",
- "\u0441\u04d9\u0443.",
- "\u043c\u0430\u043c.",
- "\u043c\u0430\u0443.",
- "\u0448\u0456\u043b.",
- "\u0442\u0430\u043c.",
- "\u049b\u044b\u0440.",
- "\u049b\u0430\u0437.",
- "\u049b\u0430\u0440.",
- "\u0436\u0435\u043b\u0442."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "y, dd-MMM HH:mm:ss",
- "mediumDate": "y, dd-MMM",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b8",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "kk-cyrl",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk.js
deleted file mode 100644
index 3d4a44e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0442\u0430\u04a3\u0435\u0440\u0442\u0435\u04a3\u0433\u0456",
- "\u0442\u04af\u0441\u0442\u0435\u043d \u043a\u0435\u0439\u0456\u043d\u0433\u0456"
- ],
- "DAY": [
- "\u0436\u0435\u043a\u0441\u0435\u043d\u0431\u0456",
- "\u0434\u04af\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0441\u0435\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0441\u04d9\u0440\u0441\u0435\u043d\u0431\u0456",
- "\u0431\u0435\u0439\u0441\u0435\u043d\u0431\u0456",
- "\u0436\u04b1\u043c\u0430",
- "\u0441\u0435\u043d\u0431\u0456"
- ],
- "ERANAMES": [
- "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437\u0493\u0430 \u0434\u0435\u0439\u0456\u043d",
- "\u0411\u0456\u0437\u0434\u0456\u04a3 \u0437\u0430\u043c\u0430\u043d\u044b\u043c\u044b\u0437"
- ],
- "ERAS": [
- "\u0431.\u0437.\u0434.",
- "\u0431.\u0437."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u049b\u0430\u04a3\u0442\u0430\u0440",
- "\u0430\u049b\u043f\u0430\u043d",
- "\u043d\u0430\u0443\u0440\u044b\u0437",
- "\u0441\u04d9\u0443\u0456\u0440",
- "\u043c\u0430\u043c\u044b\u0440",
- "\u043c\u0430\u0443\u0441\u044b\u043c",
- "\u0448\u0456\u043b\u0434\u0435",
- "\u0442\u0430\u043c\u044b\u0437",
- "\u049b\u044b\u0440\u043a\u04af\u0439\u0435\u043a",
- "\u049b\u0430\u0437\u0430\u043d",
- "\u049b\u0430\u0440\u0430\u0448\u0430",
- "\u0436\u0435\u043b\u0442\u043e\u049b\u0441\u0430\u043d"
- ],
- "SHORTDAY": [
- "\u0436\u0435\u043a",
- "\u0434\u04af\u0439",
- "\u0441\u0435\u0439",
- "\u0441\u04d9\u0440",
- "\u0431\u0435\u0439",
- "\u0436\u04b1\u043c\u0430",
- "\u0441\u0435\u043d"
- ],
- "SHORTMONTH": [
- "\u049b\u0430\u04a3.",
- "\u0430\u049b\u043f.",
- "\u043d\u0430\u0443.",
- "\u0441\u04d9\u0443.",
- "\u043c\u0430\u043c.",
- "\u043c\u0430\u0443.",
- "\u0448\u0456\u043b.",
- "\u0442\u0430\u043c.",
- "\u049b\u044b\u0440.",
- "\u049b\u0430\u0437.",
- "\u049b\u0430\u0440.",
- "\u0436\u0435\u043b\u0442."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "y, dd-MMM HH:mm:ss",
- "mediumDate": "y, dd-MMM",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b8",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "kk",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj-cm.js
deleted file mode 100644
index 8b2a2538..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "s\u0254ndi",
- "lundi",
- "mardi",
- "m\u025brk\u025br\u025bdi",
- "yedi",
- "va\u014bd\u025br\u025bdi",
- "m\u0254n\u0254 s\u0254ndi"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "pamba",
- "wanja",
- "mbiy\u0254 m\u025bndo\u014bg\u0254",
- "Ny\u0254l\u0254mb\u0254\u014bg\u0254",
- "M\u0254n\u0254 \u014bgbanja",
- "Nya\u014bgw\u025b \u014bgbanja",
- "ku\u014bgw\u025b",
- "f\u025b",
- "njapi",
- "nyukul",
- "11",
- "\u0253ul\u0253us\u025b"
- ],
- "SHORTDAY": [
- "s\u0254ndi",
- "lundi",
- "mardi",
- "m\u025brk\u025br\u025bdi",
- "yedi",
- "va\u014bd\u025br\u025bdi",
- "m\u0254n\u0254 s\u0254ndi"
- ],
- "SHORTMONTH": [
- "pamba",
- "wanja",
- "mbiy\u0254 m\u025bndo\u014bg\u0254",
- "Ny\u0254l\u0254mb\u0254\u014bg\u0254",
- "M\u0254n\u0254 \u014bgbanja",
- "Nya\u014bgw\u025b \u014bgbanja",
- "ku\u014bgw\u025b",
- "f\u025b",
- "njapi",
- "nyukul",
- "11",
- "\u0253ul\u0253us\u025b"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM y HH:mm",
- "shortDate": "dd/MM y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "kkj-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj.js
deleted file mode 100644
index dc0b25ad..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kkj.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "s\u0254ndi",
- "lundi",
- "mardi",
- "m\u025brk\u025br\u025bdi",
- "yedi",
- "va\u014bd\u025br\u025bdi",
- "m\u0254n\u0254 s\u0254ndi"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "pamba",
- "wanja",
- "mbiy\u0254 m\u025bndo\u014bg\u0254",
- "Ny\u0254l\u0254mb\u0254\u014bg\u0254",
- "M\u0254n\u0254 \u014bgbanja",
- "Nya\u014bgw\u025b \u014bgbanja",
- "ku\u014bgw\u025b",
- "f\u025b",
- "njapi",
- "nyukul",
- "11",
- "\u0253ul\u0253us\u025b"
- ],
- "SHORTDAY": [
- "s\u0254ndi",
- "lundi",
- "mardi",
- "m\u025brk\u025br\u025bdi",
- "yedi",
- "va\u014bd\u025br\u025bdi",
- "m\u0254n\u0254 s\u0254ndi"
- ],
- "SHORTMONTH": [
- "pamba",
- "wanja",
- "mbiy\u0254 m\u025bndo\u014bg\u0254",
- "Ny\u0254l\u0254mb\u0254\u014bg\u0254",
- "M\u0254n\u0254 \u014bgbanja",
- "Nya\u014bgw\u025b \u014bgbanja",
- "ku\u014bgw\u025b",
- "f\u025b",
- "njapi",
- "nyukul",
- "11",
- "\u0253ul\u0253us\u025b"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM y HH:mm",
- "shortDate": "dd/MM y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "kkj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl-gl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl-gl.js
deleted file mode 100644
index 3b3e77d0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl-gl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ulloqeqqata-tungaa",
- "ulloqeqqata-kingorna"
- ],
- "DAY": [
- "sabaat",
- "ataasinngorneq",
- "marlunngorneq",
- "pingasunngorneq",
- "sisamanngorneq",
- "tallimanngorneq",
- "arfininngorneq"
- ],
- "ERANAMES": [
- "Kristusip inunngornerata siornagut",
- "Kristusip inunngornerata kingornagut"
- ],
- "ERAS": [
- "Kr.in.si.",
- "Kr.in.king."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "martsi",
- "aprili",
- "maji",
- "juni",
- "juli",
- "augustusi",
- "septemberi",
- "oktoberi",
- "novemberi",
- "decemberi"
- ],
- "SHORTDAY": [
- "sab",
- "ata",
- "mar",
- "pin",
- "sis",
- "tal",
- "arf"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "MMM dd, y h:mm:ss a",
- "mediumDate": "MMM dd, y",
- "mediumTime": "h:mm:ss a",
- "short": "y-MM-dd h:mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kl-gl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl.js
deleted file mode 100644
index a20a1950..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ulloqeqqata-tungaa",
- "ulloqeqqata-kingorna"
- ],
- "DAY": [
- "sabaat",
- "ataasinngorneq",
- "marlunngorneq",
- "pingasunngorneq",
- "sisamanngorneq",
- "tallimanngorneq",
- "arfininngorneq"
- ],
- "ERANAMES": [
- "Kristusip inunngornerata siornagut",
- "Kristusip inunngornerata kingornagut"
- ],
- "ERAS": [
- "Kr.in.si.",
- "Kr.in.king."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "martsi",
- "aprili",
- "maji",
- "juni",
- "juli",
- "augustusi",
- "septemberi",
- "oktoberi",
- "novemberi",
- "decemberi"
- ],
- "SHORTDAY": [
- "sab",
- "ata",
- "mar",
- "pin",
- "sis",
- "tal",
- "arf"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "MMM dd, y h:mm:ss a",
- "mediumDate": "MMM dd, y",
- "mediumTime": "h:mm:ss a",
- "short": "y-MM-dd h:mm a",
- "shortDate": "y-MM-dd",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln-ke.js
deleted file mode 100644
index 41e74050..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "karoon",
- "kooskoliny"
- ],
- "DAY": [
- "Kotisap",
- "Kotaai",
- "Koaeng\u2019",
- "Kosomok",
- "Koang\u2019wan",
- "Komuut",
- "Kolo"
- ],
- "ERANAMES": [
- "Amait kesich Jesu",
- "Kokakesich Jesu"
- ],
- "ERAS": [
- "AM",
- "KO"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mulgul",
- "Ng\u2019atyaato",
- "Kiptaamo",
- "Iwootkuut",
- "Mamuut",
- "Paagi",
- "Ng\u2019eiyeet",
- "Rooptui",
- "Bureet",
- "Epeeso",
- "Kipsuunde ne taai",
- "Kipsuunde nebo aeng\u2019"
- ],
- "SHORTDAY": [
- "Kts",
- "Kot",
- "Koo",
- "Kos",
- "Koa",
- "Kom",
- "Kol"
- ],
- "SHORTMONTH": [
- "Mul",
- "Ngat",
- "Taa",
- "Iwo",
- "Mam",
- "Paa",
- "Nge",
- "Roo",
- "Bur",
- "Epe",
- "Kpt",
- "Kpa"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kln-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln.js
deleted file mode 100644
index 973b711f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kln.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "karoon",
- "kooskoliny"
- ],
- "DAY": [
- "Kotisap",
- "Kotaai",
- "Koaeng\u2019",
- "Kosomok",
- "Koang\u2019wan",
- "Komuut",
- "Kolo"
- ],
- "ERANAMES": [
- "Amait kesich Jesu",
- "Kokakesich Jesu"
- ],
- "ERAS": [
- "AM",
- "KO"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mulgul",
- "Ng\u2019atyaato",
- "Kiptaamo",
- "Iwootkuut",
- "Mamuut",
- "Paagi",
- "Ng\u2019eiyeet",
- "Rooptui",
- "Bureet",
- "Epeeso",
- "Kipsuunde ne taai",
- "Kipsuunde nebo aeng\u2019"
- ],
- "SHORTDAY": [
- "Kts",
- "Kot",
- "Koo",
- "Kos",
- "Koa",
- "Kom",
- "Kol"
- ],
- "SHORTMONTH": [
- "Mul",
- "Ngat",
- "Taa",
- "Iwo",
- "Mam",
- "Paa",
- "Nge",
- "Roo",
- "Bur",
- "Epe",
- "Kpt",
- "Kpa"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kln",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km-kh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km-kh.js
deleted file mode 100644
index 43649cd6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km-kh.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1796\u17d2\u179a\u17b9\u1780",
- "\u179b\u17d2\u1784\u17b6\u1785"
- ],
- "DAY": [
- "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799",
- "\u1785\u1793\u17d2\u1791",
- "\u17a2\u1784\u17d2\u1782\u17b6\u179a",
- "\u1796\u17bb\u1792",
- "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd",
- "\u179f\u17bb\u1780\u17d2\u179a",
- "\u179f\u17c5\u179a\u17cd"
- ],
- "ERANAMES": [
- "\u1798\u17bb\u1793\u200b\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787",
- "\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787"
- ],
- "ERAS": [
- "\u1798\u17bb\u1793 \u1782.\u179f.",
- "\u1782.\u179f."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u1798\u1780\u179a\u17b6",
- "\u1780\u17bb\u1798\u17d2\u1797\u17c8",
- "\u1798\u17b8\u1793\u17b6",
- "\u1798\u17c1\u179f\u17b6",
- "\u17a7\u179f\u1797\u17b6",
- "\u1798\u17b7\u1790\u17bb\u1793\u17b6",
- "\u1780\u1780\u17d2\u1780\u178a\u17b6",
- "\u179f\u17b8\u17a0\u17b6",
- "\u1780\u1789\u17d2\u1789\u17b6",
- "\u178f\u17bb\u179b\u17b6",
- "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6",
- "\u1792\u17d2\u1793\u17bc"
- ],
- "SHORTDAY": [
- "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799",
- "\u1785\u1793\u17d2\u1791",
- "\u17a2\u1784\u17d2\u1782\u17b6\u179a",
- "\u1796\u17bb\u1792",
- "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd",
- "\u179f\u17bb\u1780\u17d2\u179a",
- "\u179f\u17c5\u179a\u17cd"
- ],
- "SHORTMONTH": [
- "\u1798\u1780\u179a\u17b6",
- "\u1780\u17bb\u1798\u17d2\u1797\u17c8",
- "\u1798\u17b8\u1793\u17b6",
- "\u1798\u17c1\u179f\u17b6",
- "\u17a7\u179f\u1797\u17b6",
- "\u1798\u17b7\u1790\u17bb\u1793\u17b6",
- "\u1780\u1780\u17d2\u1780\u178a\u17b6",
- "\u179f\u17b8\u17a0\u17b6",
- "\u1780\u1789\u17d2\u1789\u17b6",
- "\u178f\u17bb\u179b\u17b6",
- "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6",
- "\u1792\u17d2\u1793\u17bc"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Riel",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "km-kh",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km.js
deleted file mode 100644
index ee21ccc1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_km.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1796\u17d2\u179a\u17b9\u1780",
- "\u179b\u17d2\u1784\u17b6\u1785"
- ],
- "DAY": [
- "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799",
- "\u1785\u1793\u17d2\u1791",
- "\u17a2\u1784\u17d2\u1782\u17b6\u179a",
- "\u1796\u17bb\u1792",
- "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd",
- "\u179f\u17bb\u1780\u17d2\u179a",
- "\u179f\u17c5\u179a\u17cd"
- ],
- "ERANAMES": [
- "\u1798\u17bb\u1793\u200b\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787",
- "\u1782\u17d2\u179a\u17b7\u179f\u17d2\u178f\u179f\u1780\u179a\u17b6\u1787"
- ],
- "ERAS": [
- "\u1798\u17bb\u1793 \u1782.\u179f.",
- "\u1782.\u179f."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u1798\u1780\u179a\u17b6",
- "\u1780\u17bb\u1798\u17d2\u1797\u17c8",
- "\u1798\u17b8\u1793\u17b6",
- "\u1798\u17c1\u179f\u17b6",
- "\u17a7\u179f\u1797\u17b6",
- "\u1798\u17b7\u1790\u17bb\u1793\u17b6",
- "\u1780\u1780\u17d2\u1780\u178a\u17b6",
- "\u179f\u17b8\u17a0\u17b6",
- "\u1780\u1789\u17d2\u1789\u17b6",
- "\u178f\u17bb\u179b\u17b6",
- "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6",
- "\u1792\u17d2\u1793\u17bc"
- ],
- "SHORTDAY": [
- "\u17a2\u17b6\u1791\u17b7\u178f\u17d2\u1799",
- "\u1785\u1793\u17d2\u1791",
- "\u17a2\u1784\u17d2\u1782\u17b6\u179a",
- "\u1796\u17bb\u1792",
- "\u1796\u17d2\u179a\u17a0\u179f\u17d2\u1794\u178f\u17b7\u17cd",
- "\u179f\u17bb\u1780\u17d2\u179a",
- "\u179f\u17c5\u179a\u17cd"
- ],
- "SHORTMONTH": [
- "\u1798\u1780\u179a\u17b6",
- "\u1780\u17bb\u1798\u17d2\u1797\u17c8",
- "\u1798\u17b8\u1793\u17b6",
- "\u1798\u17c1\u179f\u17b6",
- "\u17a7\u179f\u1797\u17b6",
- "\u1798\u17b7\u1790\u17bb\u1793\u17b6",
- "\u1780\u1780\u17d2\u1780\u178a\u17b6",
- "\u179f\u17b8\u17a0\u17b6",
- "\u1780\u1789\u17d2\u1789\u17b6",
- "\u178f\u17bb\u179b\u17b6",
- "\u179c\u17b7\u1785\u17d2\u1786\u17b7\u1780\u17b6",
- "\u1792\u17d2\u1793\u17bc"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Riel",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "km",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn-in.js
deleted file mode 100644
index 59f60a75..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0caa\u0cc2\u0cb0\u0ccd\u0cb5\u0cbe\u0cb9\u0ccd\u0ca8",
- "\u0c85\u0caa\u0cb0\u0cbe\u0cb9\u0ccd\u0ca8"
- ],
- "DAY": [
- "\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0",
- "\u0cb8\u0ccb\u0cae\u0cb5\u0cbe\u0cb0",
- "\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0",
- "\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0",
- "\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0",
- "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0",
- "\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0"
- ],
- "ERANAMES": [
- "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0caa\u0cc2\u0cb0\u0ccd\u0cb5",
- "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0cb6\u0c95"
- ],
- "ERAS": [
- "\u0c95\u0ccd\u0cb0\u0cbf.\u0caa\u0cc2",
- "\u0c95\u0ccd\u0cb0\u0cbf.\u0cb6"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf",
- "\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf",
- "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd",
- "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd",
- "\u0cae\u0cc7",
- "\u0c9c\u0cc2\u0ca8\u0ccd",
- "\u0c9c\u0cc1\u0cb2\u0cc8",
- "\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd",
- "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd",
- "\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd",
- "\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd",
- "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd"
- ],
- "SHORTDAY": [
- "\u0cad\u0cbe\u0ca8\u0cc1",
- "\u0cb8\u0ccb\u0cae",
- "\u0cae\u0c82\u0c97\u0cb3",
- "\u0cac\u0cc1\u0ca7",
- "\u0c97\u0cc1\u0cb0\u0cc1",
- "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0",
- "\u0cb6\u0ca8\u0cbf"
- ],
- "SHORTMONTH": [
- "\u0c9c\u0ca8",
- "\u0cab\u0cc6\u0cac\u0ccd\u0cb0",
- "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd",
- "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf",
- "\u0cae\u0cc7",
- "\u0c9c\u0cc2\u0ca8\u0ccd",
- "\u0c9c\u0cc1\u0cb2\u0cc8",
- "\u0c86\u0c97",
- "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82",
- "\u0c85\u0c95\u0ccd\u0c9f\u0ccb",
- "\u0ca8\u0cb5\u0cc6\u0c82",
- "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y hh:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "hh:mm:ss a",
- "short": "M/d/yy hh:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kn-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn.js
deleted file mode 100644
index 4dcebb61..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0caa\u0cc2\u0cb0\u0ccd\u0cb5\u0cbe\u0cb9\u0ccd\u0ca8",
- "\u0c85\u0caa\u0cb0\u0cbe\u0cb9\u0ccd\u0ca8"
- ],
- "DAY": [
- "\u0cad\u0cbe\u0ca8\u0cc1\u0cb5\u0cbe\u0cb0",
- "\u0cb8\u0ccb\u0cae\u0cb5\u0cbe\u0cb0",
- "\u0cae\u0c82\u0c97\u0cb3\u0cb5\u0cbe\u0cb0",
- "\u0cac\u0cc1\u0ca7\u0cb5\u0cbe\u0cb0",
- "\u0c97\u0cc1\u0cb0\u0cc1\u0cb5\u0cbe\u0cb0",
- "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0\u0cb5\u0cbe\u0cb0",
- "\u0cb6\u0ca8\u0cbf\u0cb5\u0cbe\u0cb0"
- ],
- "ERANAMES": [
- "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0caa\u0cc2\u0cb0\u0ccd\u0cb5",
- "\u0c95\u0ccd\u0cb0\u0cbf\u0cb8\u0ccd\u0ca4 \u0cb6\u0c95"
- ],
- "ERAS": [
- "\u0c95\u0ccd\u0cb0\u0cbf.\u0caa\u0cc2",
- "\u0c95\u0ccd\u0cb0\u0cbf.\u0cb6"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0c9c\u0ca8\u0cb5\u0cb0\u0cbf",
- "\u0cab\u0cc6\u0cac\u0ccd\u0cb0\u0cb5\u0cb0\u0cbf",
- "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd",
- "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf\u0cb2\u0ccd",
- "\u0cae\u0cc7",
- "\u0c9c\u0cc2\u0ca8\u0ccd",
- "\u0c9c\u0cc1\u0cb2\u0cc8",
- "\u0c86\u0c97\u0cb8\u0ccd\u0c9f\u0ccd",
- "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82\u0cac\u0cb0\u0ccd",
- "\u0c85\u0c95\u0ccd\u0c9f\u0ccb\u0cac\u0cb0\u0ccd",
- "\u0ca8\u0cb5\u0cc6\u0c82\u0cac\u0cb0\u0ccd",
- "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82\u0cac\u0cb0\u0ccd"
- ],
- "SHORTDAY": [
- "\u0cad\u0cbe\u0ca8\u0cc1",
- "\u0cb8\u0ccb\u0cae",
- "\u0cae\u0c82\u0c97\u0cb3",
- "\u0cac\u0cc1\u0ca7",
- "\u0c97\u0cc1\u0cb0\u0cc1",
- "\u0cb6\u0cc1\u0c95\u0ccd\u0cb0",
- "\u0cb6\u0ca8\u0cbf"
- ],
- "SHORTMONTH": [
- "\u0c9c\u0ca8",
- "\u0cab\u0cc6\u0cac\u0ccd\u0cb0",
- "\u0cae\u0cbe\u0cb0\u0ccd\u0c9a\u0ccd",
- "\u0c8f\u0caa\u0ccd\u0cb0\u0cbf",
- "\u0cae\u0cc7",
- "\u0c9c\u0cc2\u0ca8\u0ccd",
- "\u0c9c\u0cc1\u0cb2\u0cc8",
- "\u0c86\u0c97",
- "\u0cb8\u0cc6\u0caa\u0ccd\u0c9f\u0cc6\u0c82",
- "\u0c85\u0c95\u0ccd\u0c9f\u0ccb",
- "\u0ca8\u0cb5\u0cc6\u0c82",
- "\u0ca1\u0cbf\u0cb8\u0cc6\u0c82"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y hh:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "hh:mm:ss a",
- "short": "M/d/yy hh:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kp.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kp.js
deleted file mode 100644
index 61ae2b1b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kp.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\uc624\uc804",
- "\uc624\ud6c4"
- ],
- "DAY": [
- "\uc77c\uc694\uc77c",
- "\uc6d4\uc694\uc77c",
- "\ud654\uc694\uc77c",
- "\uc218\uc694\uc77c",
- "\ubaa9\uc694\uc77c",
- "\uae08\uc694\uc77c",
- "\ud1a0\uc694\uc77c"
- ],
- "ERANAMES": [
- "\uae30\uc6d0\uc804",
- "\uc11c\uae30"
- ],
- "ERAS": [
- "\uae30\uc6d0\uc804",
- "\uc11c\uae30"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "1\uc6d4",
- "2\uc6d4",
- "3\uc6d4",
- "4\uc6d4",
- "5\uc6d4",
- "6\uc6d4",
- "7\uc6d4",
- "8\uc6d4",
- "9\uc6d4",
- "10\uc6d4",
- "11\uc6d4",
- "12\uc6d4"
- ],
- "SHORTDAY": [
- "\uc77c",
- "\uc6d4",
- "\ud654",
- "\uc218",
- "\ubaa9",
- "\uae08",
- "\ud1a0"
- ],
- "SHORTMONTH": [
- "1\uc6d4",
- "2\uc6d4",
- "3\uc6d4",
- "4\uc6d4",
- "5\uc6d4",
- "6\uc6d4",
- "7\uc6d4",
- "8\uc6d4",
- "9\uc6d4",
- "10\uc6d4",
- "11\uc6d4",
- "12\uc6d4"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\ub144 M\uc6d4 d\uc77c EEEE",
- "longDate": "y\ub144 M\uc6d4 d\uc77c",
- "medium": "y. M. d. a h:mm:ss",
- "mediumDate": "y. M. d.",
- "mediumTime": "a h:mm:ss",
- "short": "yy. M. d. a h:mm",
- "shortDate": "yy. M. d.",
- "shortTime": "a h:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a9KP",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ko-kp",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kr.js
deleted file mode 100644
index 004a2d8d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko-kr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\uc624\uc804",
- "\uc624\ud6c4"
- ],
- "DAY": [
- "\uc77c\uc694\uc77c",
- "\uc6d4\uc694\uc77c",
- "\ud654\uc694\uc77c",
- "\uc218\uc694\uc77c",
- "\ubaa9\uc694\uc77c",
- "\uae08\uc694\uc77c",
- "\ud1a0\uc694\uc77c"
- ],
- "ERANAMES": [
- "\uae30\uc6d0\uc804",
- "\uc11c\uae30"
- ],
- "ERAS": [
- "\uae30\uc6d0\uc804",
- "\uc11c\uae30"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\uc6d4",
- "2\uc6d4",
- "3\uc6d4",
- "4\uc6d4",
- "5\uc6d4",
- "6\uc6d4",
- "7\uc6d4",
- "8\uc6d4",
- "9\uc6d4",
- "10\uc6d4",
- "11\uc6d4",
- "12\uc6d4"
- ],
- "SHORTDAY": [
- "\uc77c",
- "\uc6d4",
- "\ud654",
- "\uc218",
- "\ubaa9",
- "\uae08",
- "\ud1a0"
- ],
- "SHORTMONTH": [
- "1\uc6d4",
- "2\uc6d4",
- "3\uc6d4",
- "4\uc6d4",
- "5\uc6d4",
- "6\uc6d4",
- "7\uc6d4",
- "8\uc6d4",
- "9\uc6d4",
- "10\uc6d4",
- "11\uc6d4",
- "12\uc6d4"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\ub144 M\uc6d4 d\uc77c EEEE",
- "longDate": "y\ub144 M\uc6d4 d\uc77c",
- "medium": "y. M. d. a h:mm:ss",
- "mediumDate": "y. M. d.",
- "mediumTime": "a h:mm:ss",
- "short": "yy. M. d. a h:mm",
- "shortDate": "yy. M. d.",
- "shortTime": "a h:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ko-kr",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko.js
deleted file mode 100644
index b9c6fea3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ko.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\uc624\uc804",
- "\uc624\ud6c4"
- ],
- "DAY": [
- "\uc77c\uc694\uc77c",
- "\uc6d4\uc694\uc77c",
- "\ud654\uc694\uc77c",
- "\uc218\uc694\uc77c",
- "\ubaa9\uc694\uc77c",
- "\uae08\uc694\uc77c",
- "\ud1a0\uc694\uc77c"
- ],
- "ERANAMES": [
- "\uae30\uc6d0\uc804",
- "\uc11c\uae30"
- ],
- "ERAS": [
- "\uae30\uc6d0\uc804",
- "\uc11c\uae30"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\uc6d4",
- "2\uc6d4",
- "3\uc6d4",
- "4\uc6d4",
- "5\uc6d4",
- "6\uc6d4",
- "7\uc6d4",
- "8\uc6d4",
- "9\uc6d4",
- "10\uc6d4",
- "11\uc6d4",
- "12\uc6d4"
- ],
- "SHORTDAY": [
- "\uc77c",
- "\uc6d4",
- "\ud654",
- "\uc218",
- "\ubaa9",
- "\uae08",
- "\ud1a0"
- ],
- "SHORTMONTH": [
- "1\uc6d4",
- "2\uc6d4",
- "3\uc6d4",
- "4\uc6d4",
- "5\uc6d4",
- "6\uc6d4",
- "7\uc6d4",
- "8\uc6d4",
- "9\uc6d4",
- "10\uc6d4",
- "11\uc6d4",
- "12\uc6d4"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\ub144 M\uc6d4 d\uc77c EEEE",
- "longDate": "y\ub144 M\uc6d4 d\uc77c",
- "medium": "y. M. d. a h:mm:ss",
- "mediumDate": "y. M. d.",
- "mediumTime": "a h:mm:ss",
- "short": "yy. M. d. a h:mm",
- "shortDate": "yy. M. d.",
- "shortTime": "a h:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ko",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok-in.js
deleted file mode 100644
index fde838b7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092e.\u092a\u0942.",
- "\u092e.\u0928\u0902."
- ],
- "DAY": [
- "\u0906\u0926\u093f\u0924\u094d\u092f\u0935\u093e\u0930",
- "\u0938\u094b\u092e\u0935\u093e\u0930",
- "\u092e\u0902\u0917\u0933\u093e\u0930",
- "\u092c\u0941\u0927\u0935\u093e\u0930",
- "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
- "\u0936\u0928\u093f\u0935\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935",
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e"
- ],
- "ERAS": [
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935",
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0913\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930",
- "\u0913\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u0935\u093f",
- "\u0938\u094b\u092e",
- "\u092e\u0902\u0917\u0933",
- "\u092c\u0941\u0927",
- "\u0917\u0941\u0930\u0941",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0913\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930",
- "\u0913\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd-MM-y h:mm:ss a",
- "mediumDate": "dd-MM-y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "kok-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok.js
deleted file mode 100644
index 701c8f7e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kok.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092e.\u092a\u0942.",
- "\u092e.\u0928\u0902."
- ],
- "DAY": [
- "\u0906\u0926\u093f\u0924\u094d\u092f\u0935\u093e\u0930",
- "\u0938\u094b\u092e\u0935\u093e\u0930",
- "\u092e\u0902\u0917\u0933\u093e\u0930",
- "\u092c\u0941\u0927\u0935\u093e\u0930",
- "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
- "\u0936\u0928\u093f\u0935\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935",
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e"
- ],
- "ERAS": [
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u092a\u0942\u0930\u094d\u0935",
- "\u0915\u094d\u0930\u093f\u0938\u094d\u0924\u0936\u0916\u093e"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0913\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930",
- "\u0913\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u0935\u093f",
- "\u0938\u094b\u092e",
- "\u092e\u0902\u0917\u0933",
- "\u092c\u0941\u0927",
- "\u0917\u0941\u0930\u0941",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0913\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u0902\u092c\u0930",
- "\u0913\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd-MM-y h:mm:ss a",
- "mediumDate": "dd-MM-y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "kok",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab-in.js
deleted file mode 100644
index 3f2caf1c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0627\u064e\u062a\u06be\u0648\u0627\u0631",
- "\u0698\u0654\u0646\u065b\u062f\u0631\u0655\u0631\u0648\u0627\u0631",
- "\u0628\u0648\u065a\u0645\u0648\u0627\u0631",
- "\u0628\u0648\u062f\u0648\u0627\u0631",
- "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631",
- "\u062c\u064f\u0645\u06c1",
- "\u0628\u0679\u0648\u0627\u0631"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0655\u0644 \u0645\u0633\u06cc\u0656\u062d",
- "\u0639\u06cc\u0656\u0633\u0648\u06cc \u0633\u0646\u06c1\u0655"
- ],
- "ERAS": [
- "\u0628\u06cc \u0633\u06cc",
- "\u0627\u06d2 \u0688\u06cc"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0646\u0624\u0631\u06cc",
- "\u0641\u0631\u0624\u0631\u06cc",
- "\u0645\u0627\u0631\u0655\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc\u0654",
- "\u062c\u0648\u0657\u0646",
- "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0622\u062a\u06be\u0648\u0627\u0631",
- "\u0698\u0654\u0646\u065b\u062f\u0655\u0631\u0648\u0627\u0631",
- "\u0628\u0648\u065a\u0645\u0648\u0627\u0631",
- "\u0628\u0648\u062f\u0648\u0627\u0631",
- "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631",
- "\u062c\u064f\u0645\u06c1",
- "\u0628\u0679\u0648\u0627\u0631"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0624\u0631\u06cc",
- "\u0641\u0631\u0624\u0631\u06cc",
- "\u0645\u0627\u0631\u0655\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc\u0654",
- "\u062c\u0648\u0657\u0646",
- "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ks-arab-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab.js
deleted file mode 100644
index 364703ca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks-arab.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0627\u064e\u062a\u06be\u0648\u0627\u0631",
- "\u0698\u0654\u0646\u065b\u062f\u0631\u0655\u0631\u0648\u0627\u0631",
- "\u0628\u0648\u065a\u0645\u0648\u0627\u0631",
- "\u0628\u0648\u062f\u0648\u0627\u0631",
- "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631",
- "\u062c\u064f\u0645\u06c1",
- "\u0628\u0679\u0648\u0627\u0631"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0655\u0644 \u0645\u0633\u06cc\u0656\u062d",
- "\u0639\u06cc\u0656\u0633\u0648\u06cc \u0633\u0646\u06c1\u0655"
- ],
- "ERAS": [
- "\u0628\u06cc \u0633\u06cc",
- "\u0627\u06d2 \u0688\u06cc"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0646\u0624\u0631\u06cc",
- "\u0641\u0631\u0624\u0631\u06cc",
- "\u0645\u0627\u0631\u0655\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc\u0654",
- "\u062c\u0648\u0657\u0646",
- "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0622\u062a\u06be\u0648\u0627\u0631",
- "\u0698\u0654\u0646\u065b\u062f\u0655\u0631\u0648\u0627\u0631",
- "\u0628\u0648\u065a\u0645\u0648\u0627\u0631",
- "\u0628\u0648\u062f\u0648\u0627\u0631",
- "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631",
- "\u062c\u064f\u0645\u06c1",
- "\u0628\u0679\u0648\u0627\u0631"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0624\u0631\u06cc",
- "\u0641\u0631\u0624\u0631\u06cc",
- "\u0645\u0627\u0631\u0655\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc\u0654",
- "\u062c\u0648\u0657\u0646",
- "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ks-arab",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks.js
deleted file mode 100644
index d5d58c66..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ks.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0627\u064e\u062a\u06be\u0648\u0627\u0631",
- "\u0698\u0654\u0646\u065b\u062f\u0631\u0655\u0631\u0648\u0627\u0631",
- "\u0628\u0648\u065a\u0645\u0648\u0627\u0631",
- "\u0628\u0648\u062f\u0648\u0627\u0631",
- "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631",
- "\u062c\u064f\u0645\u06c1",
- "\u0628\u0679\u0648\u0627\u0631"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0655\u0644 \u0645\u0633\u06cc\u0656\u062d",
- "\u0639\u06cc\u0656\u0633\u0648\u06cc \u0633\u0646\u06c1\u0655"
- ],
- "ERAS": [
- "\u0628\u06cc \u0633\u06cc",
- "\u0627\u06d2 \u0688\u06cc"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0646\u0624\u0631\u06cc",
- "\u0641\u0631\u0624\u0631\u06cc",
- "\u0645\u0627\u0631\u0655\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc\u0654",
- "\u062c\u0648\u0657\u0646",
- "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0622\u062a\u06be\u0648\u0627\u0631",
- "\u0698\u0654\u0646\u065b\u062f\u0655\u0631\u0648\u0627\u0631",
- "\u0628\u0648\u065a\u0645\u0648\u0627\u0631",
- "\u0628\u0648\u062f\u0648\u0627\u0631",
- "\u0628\u0631\u065b\u066e\u06ea\u0633\u0648\u0627\u0631",
- "\u062c\u064f\u0645\u06c1",
- "\u0628\u0679\u0648\u0627\u0631"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0624\u0631\u06cc",
- "\u0641\u0631\u0624\u0631\u06cc",
- "\u0645\u0627\u0631\u0655\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc\u0654",
- "\u062c\u0648\u0657\u0646",
- "\u062c\u0648\u0657\u0644\u0627\u06cc\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0657\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ks",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb-tz.js
deleted file mode 100644
index f52a6f36..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "makeo",
- "nyiaghuo"
- ],
- "DAY": [
- "Jumaapii",
- "Jumaatatu",
- "Jumaane",
- "Jumaatano",
- "Alhamisi",
- "Ijumaa",
- "Jumaamosi"
- ],
- "ERANAMES": [
- "Kabla ya Klisto",
- "Baada ya Klisto"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januali",
- "Febluali",
- "Machi",
- "Aplili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jmn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "ksb-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb.js
deleted file mode 100644
index 14528926..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "makeo",
- "nyiaghuo"
- ],
- "DAY": [
- "Jumaapii",
- "Jumaatatu",
- "Jumaane",
- "Jumaatano",
- "Alhamisi",
- "Ijumaa",
- "Jumaamosi"
- ],
- "ERANAMES": [
- "Kabla ya Klisto",
- "Baada ya Klisto"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januali",
- "Febluali",
- "Machi",
- "Aplili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jmn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "ksb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf-cm.js
deleted file mode 100644
index a3f69547..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "s\u00e1r\u00faw\u00e1",
- "c\u025b\u025b\u0301nko"
- ],
- "DAY": [
- "s\u0254\u0301nd\u01dd",
- "l\u01ddnd\u00ed",
- "maad\u00ed",
- "m\u025bkr\u025bd\u00ed",
- "j\u01dd\u01ddd\u00ed",
- "j\u00famb\u00e1",
- "samd\u00ed"
- ],
- "ERANAMES": [
- "di Y\u025b\u0301sus ak\u00e1 y\u00e1l\u025b",
- "c\u00e1m\u025b\u025bn k\u01dd k\u01ddb\u0254pka Y"
- ],
- "ERAS": [
- "d.Y.",
- "k.Y."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u014bw\u00ed\u00ed a nt\u0254\u0301nt\u0254",
- "\u014bw\u00ed\u00ed ak\u01dd b\u025b\u0301\u025b",
- "\u014bw\u00ed\u00ed ak\u01dd r\u00e1\u00e1",
- "\u014bw\u00ed\u00ed ak\u01dd nin",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1an",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1af\u0254k",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1ab\u025b\u025b",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1araa",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1anin",
- "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk",
- "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u0254\u0301k",
- "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u025b\u0301\u025b"
- ],
- "SHORTDAY": [
- "s\u0254\u0301n",
- "l\u01ddn",
- "maa",
- "m\u025bk",
- "j\u01dd\u01dd",
- "j\u00fam",
- "sam"
- ],
- "SHORTMONTH": [
- "\u014b1",
- "\u014b2",
- "\u014b3",
- "\u014b4",
- "\u014b5",
- "\u014b6",
- "\u014b7",
- "\u014b8",
- "\u014b9",
- "\u014b10",
- "\u014b11",
- "\u014b12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ksf-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf.js
deleted file mode 100644
index dfd65a2e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksf.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "s\u00e1r\u00faw\u00e1",
- "c\u025b\u025b\u0301nko"
- ],
- "DAY": [
- "s\u0254\u0301nd\u01dd",
- "l\u01ddnd\u00ed",
- "maad\u00ed",
- "m\u025bkr\u025bd\u00ed",
- "j\u01dd\u01ddd\u00ed",
- "j\u00famb\u00e1",
- "samd\u00ed"
- ],
- "ERANAMES": [
- "di Y\u025b\u0301sus ak\u00e1 y\u00e1l\u025b",
- "c\u00e1m\u025b\u025bn k\u01dd k\u01ddb\u0254pka Y"
- ],
- "ERAS": [
- "d.Y.",
- "k.Y."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u014bw\u00ed\u00ed a nt\u0254\u0301nt\u0254",
- "\u014bw\u00ed\u00ed ak\u01dd b\u025b\u0301\u025b",
- "\u014bw\u00ed\u00ed ak\u01dd r\u00e1\u00e1",
- "\u014bw\u00ed\u00ed ak\u01dd nin",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1an",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1af\u0254k",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1ab\u025b\u025b",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1araa",
- "\u014bw\u00ed\u00ed ak\u01dd t\u00e1anin",
- "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk",
- "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u0254\u0301k",
- "\u014bw\u00ed\u00ed ak\u01dd nt\u025bk di b\u025b\u0301\u025b"
- ],
- "SHORTDAY": [
- "s\u0254\u0301n",
- "l\u01ddn",
- "maa",
- "m\u025bk",
- "j\u01dd\u01dd",
- "j\u00fam",
- "sam"
- ],
- "SHORTMONTH": [
- "\u014b1",
- "\u014b2",
- "\u014b3",
- "\u014b4",
- "\u014b5",
- "\u014b6",
- "\u014b7",
- "\u014b8",
- "\u014b9",
- "\u014b10",
- "\u014b11",
- "\u014b12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ksf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh-de.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh-de.js
deleted file mode 100644
index c69f40d7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh-de.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Uhr v\u00f6rmiddaachs",
- "Uhr nommendaachs"
- ],
- "DAY": [
- "Sunndaach",
- "Moondaach",
- "Dinnsdaach",
- "Metwoch",
- "Dunnersdaach",
- "Friidaach",
- "Samsdaach"
- ],
- "ERANAMES": [
- "v\u00fcr Chrestus",
- "noh Chrestus"
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jannewa",
- "F\u00e4browa",
- "M\u00e4\u00e4z",
- "Aprell",
- "M\u00e4i",
- "Juuni",
- "Juuli",
- "Oujo\u00df",
- "Sept\u00e4mber",
- "Oktoober",
- "Nov\u00e4mber",
- "Dez\u00e4mber"
- ],
- "SHORTDAY": [
- "Su.",
- "Mo.",
- "Di.",
- "Me.",
- "Du.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan",
- "F\u00e4b",
- "M\u00e4z",
- "Apr",
- "M\u00e4i",
- "Jun",
- "Jul",
- "Ouj",
- "S\u00e4p",
- "Okt",
- "Nov",
- "Dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, 'd\u00e4' d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM. y HH:mm:ss",
- "mediumDate": "d. MMM. y",
- "mediumTime": "HH:mm:ss",
- "short": "d. M. y HH:mm",
- "shortDate": "d. M. y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ksh-de",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh.js
deleted file mode 100644
index cb166982..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ksh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Uhr v\u00f6rmiddaachs",
- "Uhr nommendaachs"
- ],
- "DAY": [
- "Sunndaach",
- "Moondaach",
- "Dinnsdaach",
- "Metwoch",
- "Dunnersdaach",
- "Friidaach",
- "Samsdaach"
- ],
- "ERANAMES": [
- "v\u00fcr Chrestus",
- "noh Chrestus"
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jannewa",
- "F\u00e4browa",
- "M\u00e4\u00e4z",
- "Aprell",
- "M\u00e4i",
- "Juuni",
- "Juuli",
- "Oujo\u00df",
- "Sept\u00e4mber",
- "Oktoober",
- "Nov\u00e4mber",
- "Dez\u00e4mber"
- ],
- "SHORTDAY": [
- "Su.",
- "Mo.",
- "Di.",
- "Me.",
- "Du.",
- "Fr.",
- "Sa."
- ],
- "SHORTMONTH": [
- "Jan",
- "F\u00e4b",
- "M\u00e4z",
- "Apr",
- "M\u00e4i",
- "Jun",
- "Jul",
- "Ouj",
- "S\u00e4p",
- "Okt",
- "Nov",
- "Dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, 'd\u00e4' d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM. y HH:mm:ss",
- "mediumDate": "d. MMM. y",
- "mediumTime": "HH:mm:ss",
- "short": "d. M. y HH:mm",
- "shortDate": "d. M. y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ksh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw-gb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw-gb.js
deleted file mode 100644
index 45be1507..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw-gb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "dy Sul",
- "dy Lun",
- "dy Meurth",
- "dy Merher",
- "dy Yow",
- "dy Gwener",
- "dy Sadorn"
- ],
- "ERANAMES": [
- "RC",
- "AD"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "mis Genver",
- "mis Hwevrer",
- "mis Meurth",
- "mis Ebrel",
- "mis Me",
- "mis Metheven",
- "mis Gortheren",
- "mis Est",
- "mis Gwynngala",
- "mis Hedra",
- "mis Du",
- "mis Kevardhu"
- ],
- "SHORTDAY": [
- "Sul",
- "Lun",
- "Mth",
- "Mhr",
- "Yow",
- "Gwe",
- "Sad"
- ],
- "SHORTMONTH": [
- "Gen",
- "Hwe",
- "Meu",
- "Ebr",
- "Me",
- "Met",
- "Gor",
- "Est",
- "Gwn",
- "Hed",
- "Du",
- "Kev"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kw-gb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw.js
deleted file mode 100644
index b1349d6a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_kw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "dy Sul",
- "dy Lun",
- "dy Meurth",
- "dy Merher",
- "dy Yow",
- "dy Gwener",
- "dy Sadorn"
- ],
- "ERANAMES": [
- "RC",
- "AD"
- ],
- "ERAS": [
- "RC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "mis Genver",
- "mis Hwevrer",
- "mis Meurth",
- "mis Ebrel",
- "mis Me",
- "mis Metheven",
- "mis Gortheren",
- "mis Est",
- "mis Gwynngala",
- "mis Hedra",
- "mis Du",
- "mis Kevardhu"
- ],
- "SHORTDAY": [
- "Sul",
- "Lun",
- "Mth",
- "Mhr",
- "Yow",
- "Gwe",
- "Sad"
- ],
- "SHORTMONTH": [
- "Gen",
- "Hwe",
- "Meu",
- "Ebr",
- "Me",
- "Met",
- "Gor",
- "Est",
- "Gwn",
- "Hed",
- "Du",
- "Kev"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a3",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "kw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl-kg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl-kg.js
deleted file mode 100644
index 75a59471..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl-kg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0442\u0430\u04a3\u043a\u044b",
- "\u0442\u04af\u0448\u0442\u04e9\u043d \u043a\u0438\u0439\u0438\u043d"
- ],
- "DAY": [
- "\u0436\u0435\u043a\u0448\u0435\u043c\u0431\u0438",
- "\u0434\u04af\u0439\u0448\u04e9\u043c\u0431\u04af",
- "\u0448\u0435\u0439\u0448\u0435\u043c\u0431\u0438",
- "\u0448\u0430\u0440\u0448\u0435\u043c\u0431\u0438",
- "\u0431\u0435\u0439\u0448\u0435\u043c\u0431\u0438",
- "\u0436\u0443\u043c\u0430",
- "\u0438\u0448\u0435\u043c\u0431\u0438"
- ],
- "ERANAMES": [
- "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d\u0433\u0430 \u0447\u0435\u0439\u0438\u043d",
- "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d"
- ],
- "ERAS": [
- "\u0431.\u0437.\u0447.",
- "\u0431.\u0437."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044c",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044c",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b\u044c",
- "\u043c\u0430\u0439",
- "\u0438\u044e\u043d\u044c",
- "\u0438\u044e\u043b\u044c",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044c",
- "\u043d\u043e\u044f\u0431\u0440\u044c",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044c"
- ],
- "SHORTDAY": [
- "\u0436\u0435\u043a.",
- "\u0434\u04af\u0439.",
- "\u0448\u0435\u0439\u0448.",
- "\u0448\u0430\u0440\u0448.",
- "\u0431\u0435\u0439\u0448.",
- "\u0436\u0443\u043c\u0430",
- "\u0438\u0448\u043c."
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0439",
- "\u0438\u044e\u043d.",
- "\u0438\u044e\u043b.",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d-MMMM, y-'\u0436'.",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KGS",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ky-cyrl-kg",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl.js
deleted file mode 100644
index 7c5a5778..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky-cyrl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0442\u0430\u04a3\u043a\u044b",
- "\u0442\u04af\u0448\u0442\u04e9\u043d \u043a\u0438\u0439\u0438\u043d"
- ],
- "DAY": [
- "\u0436\u0435\u043a\u0448\u0435\u043c\u0431\u0438",
- "\u0434\u04af\u0439\u0448\u04e9\u043c\u0431\u04af",
- "\u0448\u0435\u0439\u0448\u0435\u043c\u0431\u0438",
- "\u0448\u0430\u0440\u0448\u0435\u043c\u0431\u0438",
- "\u0431\u0435\u0439\u0448\u0435\u043c\u0431\u0438",
- "\u0436\u0443\u043c\u0430",
- "\u0438\u0448\u0435\u043c\u0431\u0438"
- ],
- "ERANAMES": [
- "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d\u0433\u0430 \u0447\u0435\u0439\u0438\u043d",
- "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d"
- ],
- "ERAS": [
- "\u0431.\u0437.\u0447.",
- "\u0431.\u0437."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044c",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044c",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b\u044c",
- "\u043c\u0430\u0439",
- "\u0438\u044e\u043d\u044c",
- "\u0438\u044e\u043b\u044c",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044c",
- "\u043d\u043e\u044f\u0431\u0440\u044c",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044c"
- ],
- "SHORTDAY": [
- "\u0436\u0435\u043a.",
- "\u0434\u04af\u0439.",
- "\u0448\u0435\u0439\u0448.",
- "\u0448\u0430\u0440\u0448.",
- "\u0431\u0435\u0439\u0448.",
- "\u0436\u0443\u043c\u0430",
- "\u0438\u0448\u043c."
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0439",
- "\u0438\u044e\u043d.",
- "\u0438\u044e\u043b.",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d-MMMM, y-'\u0436'.",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KGS",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ky-cyrl",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky.js
deleted file mode 100644
index b7fe2635..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ky.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0442\u0430\u04a3\u043a\u044b",
- "\u0442\u04af\u0448\u0442\u04e9\u043d \u043a\u0438\u0439\u0438\u043d"
- ],
- "DAY": [
- "\u0436\u0435\u043a\u0448\u0435\u043c\u0431\u0438",
- "\u0434\u04af\u0439\u0448\u04e9\u043c\u0431\u04af",
- "\u0448\u0435\u0439\u0448\u0435\u043c\u0431\u0438",
- "\u0448\u0430\u0440\u0448\u0435\u043c\u0431\u0438",
- "\u0431\u0435\u0439\u0448\u0435\u043c\u0431\u0438",
- "\u0436\u0443\u043c\u0430",
- "\u0438\u0448\u0435\u043c\u0431\u0438"
- ],
- "ERANAMES": [
- "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d\u0433\u0430 \u0447\u0435\u0439\u0438\u043d",
- "\u0431\u0438\u0437\u0434\u0438\u043d \u0437\u0430\u043c\u0430\u043d"
- ],
- "ERAS": [
- "\u0431.\u0437.\u0447.",
- "\u0431.\u0437."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044c",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044c",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0435\u043b\u044c",
- "\u043c\u0430\u0439",
- "\u0438\u044e\u043d\u044c",
- "\u0438\u044e\u043b\u044c",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044c",
- "\u043d\u043e\u044f\u0431\u0440\u044c",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044c"
- ],
- "SHORTDAY": [
- "\u0436\u0435\u043a.",
- "\u0434\u04af\u0439.",
- "\u0448\u0435\u0439\u0448.",
- "\u0448\u0430\u0440\u0448.",
- "\u0431\u0435\u0439\u0448.",
- "\u0436\u0443\u043c\u0430",
- "\u0438\u0448\u043c."
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0439",
- "\u0438\u044e\u043d.",
- "\u0438\u044e\u043b.",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d-MMMM, y-'\u0436'.",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KGS",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ky",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag-tz.js
deleted file mode 100644
index a76e7696..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "TOO",
- "MUU"
- ],
- "DAY": [
- "Jumap\u00ediri",
- "Jumat\u00e1tu",
- "Juma\u00edne",
- "Jumat\u00e1ano",
- "Alam\u00edisi",
- "Ijum\u00e1a",
- "Jumam\u00f3osi"
- ],
- "ERANAMES": [
- "K\u0268r\u0268sit\u0289 s\u0268 anavyaal",
- "K\u0268r\u0268sit\u0289 akavyaalwe"
- ],
- "ERAS": [
- "KSA",
- "KA"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "K\u0289f\u00fangat\u0268",
- "K\u0289naan\u0268",
- "K\u0289keenda",
- "Kwiikumi",
- "Kwiinyamb\u00e1la",
- "Kwiidwaata",
- "K\u0289m\u0289\u0289nch\u0268",
- "K\u0289v\u0268\u0268r\u0268",
- "K\u0289saat\u0289",
- "Kwiinyi",
- "K\u0289saano",
- "K\u0289sasat\u0289"
- ],
- "SHORTDAY": [
- "P\u00edili",
- "T\u00e1atu",
- "\u00cdne",
- "T\u00e1ano",
- "Alh",
- "Ijm",
- "M\u00f3osi"
- ],
- "SHORTMONTH": [
- "F\u00fangat\u0268",
- "Naan\u0268",
- "Keenda",
- "Ik\u00fami",
- "Inyambala",
- "Idwaata",
- "M\u0289\u0289nch\u0268",
- "V\u0268\u0268r\u0268",
- "Saat\u0289",
- "Inyi",
- "Saano",
- "Sasat\u0289"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "lag-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag.js
deleted file mode 100644
index 6fb2f6e5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lag.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "TOO",
- "MUU"
- ],
- "DAY": [
- "Jumap\u00ediri",
- "Jumat\u00e1tu",
- "Juma\u00edne",
- "Jumat\u00e1ano",
- "Alam\u00edisi",
- "Ijum\u00e1a",
- "Jumam\u00f3osi"
- ],
- "ERANAMES": [
- "K\u0268r\u0268sit\u0289 s\u0268 anavyaal",
- "K\u0268r\u0268sit\u0289 akavyaalwe"
- ],
- "ERAS": [
- "KSA",
- "KA"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "K\u0289f\u00fangat\u0268",
- "K\u0289naan\u0268",
- "K\u0289keenda",
- "Kwiikumi",
- "Kwiinyamb\u00e1la",
- "Kwiidwaata",
- "K\u0289m\u0289\u0289nch\u0268",
- "K\u0289v\u0268\u0268r\u0268",
- "K\u0289saat\u0289",
- "Kwiinyi",
- "K\u0289saano",
- "K\u0289sasat\u0289"
- ],
- "SHORTDAY": [
- "P\u00edili",
- "T\u00e1atu",
- "\u00cdne",
- "T\u00e1ano",
- "Alh",
- "Ijm",
- "M\u00f3osi"
- ],
- "SHORTMONTH": [
- "F\u00fangat\u0268",
- "Naan\u0268",
- "Keenda",
- "Ik\u00fami",
- "Inyambala",
- "Idwaata",
- "M\u0289\u0289nch\u0268",
- "V\u0268\u0268r\u0268",
- "Saat\u0289",
- "Inyi",
- "Saano",
- "Sasat\u0289"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "lag",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb-lu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb-lu.js
deleted file mode 100644
index 64ef9776..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb-lu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "moies",
- "nom\u00ebttes"
- ],
- "DAY": [
- "Sonndeg",
- "M\u00e9indeg",
- "D\u00ebnschdeg",
- "M\u00ebttwoch",
- "Donneschdeg",
- "Freideg",
- "Samschdeg"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4erz",
- "Abr\u00ebll",
- "Mee",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "Son.",
- "M\u00e9i.",
- "D\u00ebn.",
- "M\u00ebt.",
- "Don.",
- "Fre.",
- "Sam."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4e.",
- "Abr.",
- "Mee",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "lb-lu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb.js
deleted file mode 100644
index dd721993..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lb.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "moies",
- "nom\u00ebttes"
- ],
- "DAY": [
- "Sonndeg",
- "M\u00e9indeg",
- "D\u00ebnschdeg",
- "M\u00ebttwoch",
- "Donneschdeg",
- "Freideg",
- "Samschdeg"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr."
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar",
- "Februar",
- "M\u00e4erz",
- "Abr\u00ebll",
- "Mee",
- "Juni",
- "Juli",
- "August",
- "September",
- "Oktober",
- "November",
- "Dezember"
- ],
- "SHORTDAY": [
- "Son.",
- "M\u00e9i.",
- "D\u00ebn.",
- "M\u00ebt.",
- "Don.",
- "Fre.",
- "Sam."
- ],
- "SHORTMONTH": [
- "Jan.",
- "Feb.",
- "M\u00e4e.",
- "Abr.",
- "Mee",
- "Juni",
- "Juli",
- "Aug.",
- "Sep.",
- "Okt.",
- "Nov.",
- "Dez."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "lb",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg-ug.js
deleted file mode 100644
index 78d1c9f0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sabbiiti",
- "Balaza",
- "Lwakubiri",
- "Lwakusatu",
- "Lwakuna",
- "Lwakutaano",
- "Lwamukaaga"
- ],
- "ERANAMES": [
- "Kulisito nga tannaza",
- "Bukya Kulisito Azaal"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janwaliyo",
- "Febwaliyo",
- "Marisi",
- "Apuli",
- "Maayi",
- "Juuni",
- "Julaayi",
- "Agusito",
- "Sebuttemba",
- "Okitobba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Sab",
- "Bal",
- "Lw2",
- "Lw3",
- "Lw4",
- "Lw5",
- "Lw6"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apu",
- "Maa",
- "Juu",
- "Jul",
- "Agu",
- "Seb",
- "Oki",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "lg-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg.js
deleted file mode 100644
index e0bbf02f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sabbiiti",
- "Balaza",
- "Lwakubiri",
- "Lwakusatu",
- "Lwakuna",
- "Lwakutaano",
- "Lwamukaaga"
- ],
- "ERANAMES": [
- "Kulisito nga tannaza",
- "Bukya Kulisito Azaal"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janwaliyo",
- "Febwaliyo",
- "Marisi",
- "Apuli",
- "Maayi",
- "Juuni",
- "Julaayi",
- "Agusito",
- "Sebuttemba",
- "Okitobba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Sab",
- "Bal",
- "Lw2",
- "Lw3",
- "Lw4",
- "Lw5",
- "Lw6"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apu",
- "Maa",
- "Juu",
- "Jul",
- "Agu",
- "Seb",
- "Oki",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "lg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt-us.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt-us.js
deleted file mode 100644
index e5b488b8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt-us.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "A\u014bp\u00e9tuwak\u021fa\u014b",
- "A\u014bp\u00e9tuwa\u014b\u017ei",
- "A\u014bp\u00e9tunu\u014bpa",
- "A\u014bp\u00e9tuyamni",
- "A\u014bp\u00e9tutopa",
- "A\u014bp\u00e9tuzapta\u014b",
- "Ow\u00e1\u014bgyu\u017ea\u017eapi"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Wi\u00f3the\u021fika W\u00ed",
- "Thiy\u00f3\u021feyu\u014bka W\u00ed",
- "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed",
- "P\u021fe\u017e\u00edt\u021fo W\u00ed",
- "\u010cha\u014bw\u00e1pet\u021fo W\u00ed",
- "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed",
- "\u010cha\u014bp\u021f\u00e1sapa W\u00ed",
- "Was\u00fat\u021fu\u014b W\u00ed",
- "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed",
- "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed",
- "Wan\u00edyetu W\u00ed",
- "T\u021fah\u00e9kap\u0161u\u014b W\u00ed"
- ],
- "SHORTDAY": [
- "A\u014bp\u00e9tuwak\u021fa\u014b",
- "A\u014bp\u00e9tuwa\u014b\u017ei",
- "A\u014bp\u00e9tunu\u014bpa",
- "A\u014bp\u00e9tuyamni",
- "A\u014bp\u00e9tutopa",
- "A\u014bp\u00e9tuzapta\u014b",
- "Ow\u00e1\u014bgyu\u017ea\u017eapi"
- ],
- "SHORTMONTH": [
- "Wi\u00f3the\u021fika W\u00ed",
- "Thiy\u00f3\u021feyu\u014bka W\u00ed",
- "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed",
- "P\u021fe\u017e\u00edt\u021fo W\u00ed",
- "\u010cha\u014bw\u00e1pet\u021fo W\u00ed",
- "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed",
- "\u010cha\u014bp\u021f\u00e1sapa W\u00ed",
- "Was\u00fat\u021fu\u014b W\u00ed",
- "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed",
- "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed",
- "Wan\u00edyetu W\u00ed",
- "T\u021fah\u00e9kap\u0161u\u014b W\u00ed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "lkt-us",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt.js
deleted file mode 100644
index 57398cb3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lkt.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "A\u014bp\u00e9tuwak\u021fa\u014b",
- "A\u014bp\u00e9tuwa\u014b\u017ei",
- "A\u014bp\u00e9tunu\u014bpa",
- "A\u014bp\u00e9tuyamni",
- "A\u014bp\u00e9tutopa",
- "A\u014bp\u00e9tuzapta\u014b",
- "Ow\u00e1\u014bgyu\u017ea\u017eapi"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Wi\u00f3the\u021fika W\u00ed",
- "Thiy\u00f3\u021feyu\u014bka W\u00ed",
- "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed",
- "P\u021fe\u017e\u00edt\u021fo W\u00ed",
- "\u010cha\u014bw\u00e1pet\u021fo W\u00ed",
- "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed",
- "\u010cha\u014bp\u021f\u00e1sapa W\u00ed",
- "Was\u00fat\u021fu\u014b W\u00ed",
- "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed",
- "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed",
- "Wan\u00edyetu W\u00ed",
- "T\u021fah\u00e9kap\u0161u\u014b W\u00ed"
- ],
- "SHORTDAY": [
- "A\u014bp\u00e9tuwak\u021fa\u014b",
- "A\u014bp\u00e9tuwa\u014b\u017ei",
- "A\u014bp\u00e9tunu\u014bpa",
- "A\u014bp\u00e9tuyamni",
- "A\u014bp\u00e9tutopa",
- "A\u014bp\u00e9tuzapta\u014b",
- "Ow\u00e1\u014bgyu\u017ea\u017eapi"
- ],
- "SHORTMONTH": [
- "Wi\u00f3the\u021fika W\u00ed",
- "Thiy\u00f3\u021feyu\u014bka W\u00ed",
- "I\u0161t\u00e1wi\u010dhayaza\u014b W\u00ed",
- "P\u021fe\u017e\u00edt\u021fo W\u00ed",
- "\u010cha\u014bw\u00e1pet\u021fo W\u00ed",
- "W\u00edpazuk\u021fa-wa\u0161t\u00e9 W\u00ed",
- "\u010cha\u014bp\u021f\u00e1sapa W\u00ed",
- "Was\u00fat\u021fu\u014b W\u00ed",
- "\u010cha\u014bw\u00e1pe\u01e7i W\u00ed",
- "\u010cha\u014bw\u00e1pe-kasn\u00e1 W\u00ed",
- "Wan\u00edyetu W\u00ed",
- "T\u021fah\u00e9kap\u0161u\u014b W\u00ed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "lkt",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-ao.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-ao.js
deleted file mode 100644
index 8a88e889..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-ao.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "nt\u0254\u0301ng\u0254\u0301",
- "mp\u00f3kwa"
- ],
- "DAY": [
- "eyenga",
- "mok\u0254l\u0254 mwa yambo",
- "mok\u0254l\u0254 mwa m\u00edbal\u00e9",
- "mok\u0254l\u0254 mwa m\u00eds\u00e1to",
- "mok\u0254l\u0254 ya m\u00edn\u00e9i",
- "mok\u0254l\u0254 ya m\u00edt\u00e1no",
- "mp\u0254\u0301s\u0254"
- ],
- "ERANAMES": [
- "Yambo ya Y\u00e9zu Kr\u00eds",
- "Nsima ya Y\u00e9zu Kr\u00eds"
- ],
- "ERAS": [
- "lib\u00f3so ya",
- "nsima ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "s\u00e1nz\u00e1 ya yambo",
- "s\u00e1nz\u00e1 ya m\u00edbal\u00e9",
- "s\u00e1nz\u00e1 ya m\u00eds\u00e1to",
- "s\u00e1nz\u00e1 ya m\u00ednei",
- "s\u00e1nz\u00e1 ya m\u00edt\u00e1no",
- "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1",
- "s\u00e1nz\u00e1 ya nsambo",
- "s\u00e1nz\u00e1 ya mwambe",
- "s\u00e1nz\u00e1 ya libwa",
- "s\u00e1nz\u00e1 ya z\u00f3mi",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9"
- ],
- "SHORTDAY": [
- "eye",
- "ybo",
- "mbl",
- "mst",
- "min",
- "mtn",
- "mps"
- ],
- "SHORTMONTH": [
- "yan",
- "fbl",
- "msi",
- "apl",
- "mai",
- "yun",
- "yul",
- "agt",
- "stb",
- "\u0254tb",
- "nvb",
- "dsb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Kz",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ln-ao",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cd.js
deleted file mode 100644
index f08e4f4f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cd.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "nt\u0254\u0301ng\u0254\u0301",
- "mp\u00f3kwa"
- ],
- "DAY": [
- "eyenga",
- "mok\u0254l\u0254 mwa yambo",
- "mok\u0254l\u0254 mwa m\u00edbal\u00e9",
- "mok\u0254l\u0254 mwa m\u00eds\u00e1to",
- "mok\u0254l\u0254 ya m\u00edn\u00e9i",
- "mok\u0254l\u0254 ya m\u00edt\u00e1no",
- "mp\u0254\u0301s\u0254"
- ],
- "ERANAMES": [
- "Yambo ya Y\u00e9zu Kr\u00eds",
- "Nsima ya Y\u00e9zu Kr\u00eds"
- ],
- "ERAS": [
- "lib\u00f3so ya",
- "nsima ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "s\u00e1nz\u00e1 ya yambo",
- "s\u00e1nz\u00e1 ya m\u00edbal\u00e9",
- "s\u00e1nz\u00e1 ya m\u00eds\u00e1to",
- "s\u00e1nz\u00e1 ya m\u00ednei",
- "s\u00e1nz\u00e1 ya m\u00edt\u00e1no",
- "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1",
- "s\u00e1nz\u00e1 ya nsambo",
- "s\u00e1nz\u00e1 ya mwambe",
- "s\u00e1nz\u00e1 ya libwa",
- "s\u00e1nz\u00e1 ya z\u00f3mi",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9"
- ],
- "SHORTDAY": [
- "eye",
- "ybo",
- "mbl",
- "mst",
- "min",
- "mtn",
- "mps"
- ],
- "SHORTMONTH": [
- "yan",
- "fbl",
- "msi",
- "apl",
- "mai",
- "yun",
- "yul",
- "agt",
- "stb",
- "\u0254tb",
- "nvb",
- "dsb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ln-cd",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cf.js
deleted file mode 100644
index 7af86d5a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cf.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "nt\u0254\u0301ng\u0254\u0301",
- "mp\u00f3kwa"
- ],
- "DAY": [
- "eyenga",
- "mok\u0254l\u0254 mwa yambo",
- "mok\u0254l\u0254 mwa m\u00edbal\u00e9",
- "mok\u0254l\u0254 mwa m\u00eds\u00e1to",
- "mok\u0254l\u0254 ya m\u00edn\u00e9i",
- "mok\u0254l\u0254 ya m\u00edt\u00e1no",
- "mp\u0254\u0301s\u0254"
- ],
- "ERANAMES": [
- "Yambo ya Y\u00e9zu Kr\u00eds",
- "Nsima ya Y\u00e9zu Kr\u00eds"
- ],
- "ERAS": [
- "lib\u00f3so ya",
- "nsima ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "s\u00e1nz\u00e1 ya yambo",
- "s\u00e1nz\u00e1 ya m\u00edbal\u00e9",
- "s\u00e1nz\u00e1 ya m\u00eds\u00e1to",
- "s\u00e1nz\u00e1 ya m\u00ednei",
- "s\u00e1nz\u00e1 ya m\u00edt\u00e1no",
- "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1",
- "s\u00e1nz\u00e1 ya nsambo",
- "s\u00e1nz\u00e1 ya mwambe",
- "s\u00e1nz\u00e1 ya libwa",
- "s\u00e1nz\u00e1 ya z\u00f3mi",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9"
- ],
- "SHORTDAY": [
- "eye",
- "ybo",
- "mbl",
- "mst",
- "min",
- "mtn",
- "mps"
- ],
- "SHORTMONTH": [
- "yan",
- "fbl",
- "msi",
- "apl",
- "mai",
- "yun",
- "yul",
- "agt",
- "stb",
- "\u0254tb",
- "nvb",
- "dsb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ln-cf",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cg.js
deleted file mode 100644
index 5c8e41cd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln-cg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "nt\u0254\u0301ng\u0254\u0301",
- "mp\u00f3kwa"
- ],
- "DAY": [
- "eyenga",
- "mok\u0254l\u0254 mwa yambo",
- "mok\u0254l\u0254 mwa m\u00edbal\u00e9",
- "mok\u0254l\u0254 mwa m\u00eds\u00e1to",
- "mok\u0254l\u0254 ya m\u00edn\u00e9i",
- "mok\u0254l\u0254 ya m\u00edt\u00e1no",
- "mp\u0254\u0301s\u0254"
- ],
- "ERANAMES": [
- "Yambo ya Y\u00e9zu Kr\u00eds",
- "Nsima ya Y\u00e9zu Kr\u00eds"
- ],
- "ERAS": [
- "lib\u00f3so ya",
- "nsima ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "s\u00e1nz\u00e1 ya yambo",
- "s\u00e1nz\u00e1 ya m\u00edbal\u00e9",
- "s\u00e1nz\u00e1 ya m\u00eds\u00e1to",
- "s\u00e1nz\u00e1 ya m\u00ednei",
- "s\u00e1nz\u00e1 ya m\u00edt\u00e1no",
- "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1",
- "s\u00e1nz\u00e1 ya nsambo",
- "s\u00e1nz\u00e1 ya mwambe",
- "s\u00e1nz\u00e1 ya libwa",
- "s\u00e1nz\u00e1 ya z\u00f3mi",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9"
- ],
- "SHORTDAY": [
- "eye",
- "ybo",
- "mbl",
- "mst",
- "min",
- "mtn",
- "mps"
- ],
- "SHORTMONTH": [
- "yan",
- "fbl",
- "msi",
- "apl",
- "mai",
- "yun",
- "yul",
- "agt",
- "stb",
- "\u0254tb",
- "nvb",
- "dsb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ln-cg",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln.js
deleted file mode 100644
index 300de98e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ln.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "nt\u0254\u0301ng\u0254\u0301",
- "mp\u00f3kwa"
- ],
- "DAY": [
- "eyenga",
- "mok\u0254l\u0254 mwa yambo",
- "mok\u0254l\u0254 mwa m\u00edbal\u00e9",
- "mok\u0254l\u0254 mwa m\u00eds\u00e1to",
- "mok\u0254l\u0254 ya m\u00edn\u00e9i",
- "mok\u0254l\u0254 ya m\u00edt\u00e1no",
- "mp\u0254\u0301s\u0254"
- ],
- "ERANAMES": [
- "Yambo ya Y\u00e9zu Kr\u00eds",
- "Nsima ya Y\u00e9zu Kr\u00eds"
- ],
- "ERAS": [
- "lib\u00f3so ya",
- "nsima ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "s\u00e1nz\u00e1 ya yambo",
- "s\u00e1nz\u00e1 ya m\u00edbal\u00e9",
- "s\u00e1nz\u00e1 ya m\u00eds\u00e1to",
- "s\u00e1nz\u00e1 ya m\u00ednei",
- "s\u00e1nz\u00e1 ya m\u00edt\u00e1no",
- "s\u00e1nz\u00e1 ya mot\u00f3b\u00e1",
- "s\u00e1nz\u00e1 ya nsambo",
- "s\u00e1nz\u00e1 ya mwambe",
- "s\u00e1nz\u00e1 ya libwa",
- "s\u00e1nz\u00e1 ya z\u00f3mi",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u0254\u030ck\u0254\u0301",
- "s\u00e1nz\u00e1 ya z\u00f3mi na m\u00edbal\u00e9"
- ],
- "SHORTDAY": [
- "eye",
- "ybo",
- "mbl",
- "mst",
- "min",
- "mtn",
- "mps"
- ],
- "SHORTMONTH": [
- "yan",
- "fbl",
- "msi",
- "apl",
- "mai",
- "yun",
- "yul",
- "agt",
- "stb",
- "\u0254tb",
- "nvb",
- "dsb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ln",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo-la.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo-la.js
deleted file mode 100644
index f6bf34f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo-la.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0e81\u0ec8\u0ead\u0e99\u0e97\u0ec8\u0ebd\u0e87",
- "\u0eab\u0ebc\u0eb1\u0e87\u0e97\u0ec8\u0ebd\u0e87"
- ],
- "DAY": [
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb2\u0e97\u0eb4\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e88\u0eb1\u0e99",
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb8\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb0\u0eab\u0eb1\u0e94",
- "\u0ea7\u0eb1\u0e99\u0eaa\u0eb8\u0e81",
- "\u0ea7\u0eb1\u0e99\u0ec0\u0eaa\u0ebb\u0eb2"
- ],
- "ERANAMES": [
- "\u0e81\u0ec8\u0ead\u0e99\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94",
- "\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94"
- ],
- "ERAS": [
- "\u0e81\u0ec8\u0ead\u0e99 \u0e84.\u0eaa.",
- "\u0e84.\u0eaa."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99",
- "\u0e81\u0eb8\u0ea1\u0e9e\u0eb2",
- "\u0ea1\u0eb5\u0e99\u0eb2",
- "\u0ec0\u0ea1\u0eaa\u0eb2",
- "\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2",
- "\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2",
- "\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94",
- "\u0eaa\u0eb4\u0e87\u0eab\u0eb2",
- "\u0e81\u0eb1\u0e99\u0e8d\u0eb2",
- "\u0e95\u0eb8\u0ea5\u0eb2",
- "\u0e9e\u0eb0\u0e88\u0eb4\u0e81",
- "\u0e97\u0eb1\u0e99\u0ea7\u0eb2"
- ],
- "SHORTDAY": [
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb2\u0e97\u0eb4\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e88\u0eb1\u0e99",
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb8\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb0\u0eab\u0eb1\u0e94",
- "\u0ea7\u0eb1\u0e99\u0eaa\u0eb8\u0e81",
- "\u0ea7\u0eb1\u0e99\u0ec0\u0eaa\u0ebb\u0eb2"
- ],
- "SHORTMONTH": [
- "\u0ea1.\u0e81.",
- "\u0e81.\u0e9e.",
- "\u0ea1.\u0e99.",
- "\u0ea1.\u0eaa.",
- "\u0e9e.\u0e9e.",
- "\u0ea1\u0eb4.\u0e96.",
- "\u0e81.\u0ea5.",
- "\u0eaa.\u0eab.",
- "\u0e81.\u0e8d.",
- "\u0e95.\u0ea5.",
- "\u0e9e.\u0e88.",
- "\u0e97.\u0ea7."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE \u0e97\u0eb5 d MMMM G y",
- "longDate": "d MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/y H:mm",
- "shortDate": "d/M/y",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ad",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "lo-la",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo.js
deleted file mode 100644
index 76d51754..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lo.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0e81\u0ec8\u0ead\u0e99\u0e97\u0ec8\u0ebd\u0e87",
- "\u0eab\u0ebc\u0eb1\u0e87\u0e97\u0ec8\u0ebd\u0e87"
- ],
- "DAY": [
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb2\u0e97\u0eb4\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e88\u0eb1\u0e99",
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb8\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb0\u0eab\u0eb1\u0e94",
- "\u0ea7\u0eb1\u0e99\u0eaa\u0eb8\u0e81",
- "\u0ea7\u0eb1\u0e99\u0ec0\u0eaa\u0ebb\u0eb2"
- ],
- "ERANAMES": [
- "\u0e81\u0ec8\u0ead\u0e99\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94",
- "\u0e84\u0ea3\u0eb4\u0e94\u0eaa\u0eb1\u0e81\u0e81\u0eb0\u0ea5\u0eb2\u0e94"
- ],
- "ERAS": [
- "\u0e81\u0ec8\u0ead\u0e99 \u0e84.\u0eaa.",
- "\u0e84.\u0eaa."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0ea1\u0eb1\u0e87\u0e81\u0ead\u0e99",
- "\u0e81\u0eb8\u0ea1\u0e9e\u0eb2",
- "\u0ea1\u0eb5\u0e99\u0eb2",
- "\u0ec0\u0ea1\u0eaa\u0eb2",
- "\u0e9e\u0eb6\u0e94\u0eaa\u0eb0\u0e9e\u0eb2",
- "\u0ea1\u0eb4\u0e96\u0eb8\u0e99\u0eb2",
- "\u0e81\u0ecd\u0ea5\u0eb0\u0e81\u0ebb\u0e94",
- "\u0eaa\u0eb4\u0e87\u0eab\u0eb2",
- "\u0e81\u0eb1\u0e99\u0e8d\u0eb2",
- "\u0e95\u0eb8\u0ea5\u0eb2",
- "\u0e9e\u0eb0\u0e88\u0eb4\u0e81",
- "\u0e97\u0eb1\u0e99\u0ea7\u0eb2"
- ],
- "SHORTDAY": [
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb2\u0e97\u0eb4\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e88\u0eb1\u0e99",
- "\u0ea7\u0eb1\u0e99\u0ead\u0eb1\u0e87\u0e84\u0eb2\u0e99",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb8\u0e94",
- "\u0ea7\u0eb1\u0e99\u0e9e\u0eb0\u0eab\u0eb1\u0e94",
- "\u0ea7\u0eb1\u0e99\u0eaa\u0eb8\u0e81",
- "\u0ea7\u0eb1\u0e99\u0ec0\u0eaa\u0ebb\u0eb2"
- ],
- "SHORTMONTH": [
- "\u0ea1.\u0e81.",
- "\u0e81.\u0e9e.",
- "\u0ea1.\u0e99.",
- "\u0ea1.\u0eaa.",
- "\u0e9e.\u0e9e.",
- "\u0ea1\u0eb4.\u0e96.",
- "\u0e81.\u0ea5.",
- "\u0eaa.\u0eab.",
- "\u0e81.\u0e8d.",
- "\u0e95.\u0ea5.",
- "\u0e9e.\u0e88.",
- "\u0e97.\u0ea7."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE \u0e97\u0eb5 d MMMM G y",
- "longDate": "d MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "d/M/y H:mm",
- "shortDate": "d/M/y",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ad",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "lo",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt-lt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt-lt.js
deleted file mode 100644
index 34e16f9d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt-lt.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "prie\u0161piet",
- "popiet"
- ],
- "DAY": [
- "sekmadienis",
- "pirmadienis",
- "antradienis",
- "tre\u010diadienis",
- "ketvirtadienis",
- "penktadienis",
- "\u0161e\u0161tadienis"
- ],
- "ERANAMES": [
- "prie\u0161 Krist\u0173",
- "po Kristaus"
- ],
- "ERAS": [
- "pr. Kr.",
- "po Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sausio",
- "vasario",
- "kovo",
- "baland\u017eio",
- "gegu\u017e\u0117s",
- "bir\u017eelio",
- "liepos",
- "rugpj\u016b\u010dio",
- "rugs\u0117jo",
- "spalio",
- "lapkri\u010dio",
- "gruod\u017eio"
- ],
- "SHORTDAY": [
- "sk",
- "pr",
- "an",
- "tr",
- "kt",
- "pn",
- "\u0161t"
- ],
- "SHORTMONTH": [
- "saus.",
- "vas.",
- "kov.",
- "bal.",
- "geg.",
- "bir\u017e.",
- "liep.",
- "rugp.",
- "rugs.",
- "spal.",
- "lapkr.",
- "gruod."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y 'm'. MMMM d 'd'., EEEE",
- "longDate": "y 'm'. MMMM d 'd'.",
- "medium": "y-MM-dd HH:mm:ss",
- "mediumDate": "y-MM-dd",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "lt-lt",
- "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 1 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.FEW; } if (vf.f != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt.js
deleted file mode 100644
index b8f7a9b3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lt.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "prie\u0161piet",
- "popiet"
- ],
- "DAY": [
- "sekmadienis",
- "pirmadienis",
- "antradienis",
- "tre\u010diadienis",
- "ketvirtadienis",
- "penktadienis",
- "\u0161e\u0161tadienis"
- ],
- "ERANAMES": [
- "prie\u0161 Krist\u0173",
- "po Kristaus"
- ],
- "ERAS": [
- "pr. Kr.",
- "po Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sausio",
- "vasario",
- "kovo",
- "baland\u017eio",
- "gegu\u017e\u0117s",
- "bir\u017eelio",
- "liepos",
- "rugpj\u016b\u010dio",
- "rugs\u0117jo",
- "spalio",
- "lapkri\u010dio",
- "gruod\u017eio"
- ],
- "SHORTDAY": [
- "sk",
- "pr",
- "an",
- "tr",
- "kt",
- "pn",
- "\u0161t"
- ],
- "SHORTMONTH": [
- "saus.",
- "vas.",
- "kov.",
- "bal.",
- "geg.",
- "bir\u017e.",
- "liep.",
- "rugp.",
- "rugs.",
- "spal.",
- "lapkr.",
- "gruod."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y 'm'. MMMM d 'd'., EEEE",
- "longDate": "y 'm'. MMMM d 'd'.",
- "medium": "y-MM-dd HH:mm:ss",
- "mediumDate": "y-MM-dd",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "lt",
- "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 1 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.ONE; } if (n % 10 >= 2 && n % 10 <= 9 && (n % 100 < 11 || n % 100 > 19)) { return PLURAL_CATEGORY.FEW; } if (vf.f != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu-cd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu-cd.js
deleted file mode 100644
index 05533233..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu-cd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Dinda",
- "Dilolo"
- ],
- "DAY": [
- "Lumingu",
- "Nkodya",
- "Nd\u00e0ay\u00e0",
- "Ndang\u00f9",
- "Nj\u00f2wa",
- "Ng\u00f2vya",
- "Lubingu"
- ],
- "ERANAMES": [
- "Kumpala kwa Yezu Kli",
- "Kunyima kwa Yezu Kli"
- ],
- "ERAS": [
- "kmp. Y.K.",
- "kny. Y. K."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ciongo",
- "L\u00f9ishi",
- "Lus\u00f2lo",
- "M\u00f9uy\u00e0",
- "Lum\u00f9ng\u00f9l\u00f9",
- "Lufuimi",
- "Kab\u00e0l\u00e0sh\u00ecp\u00f9",
- "L\u00f9sh\u00eck\u00e0",
- "Lutongolo",
- "Lung\u00f9di",
- "Kasw\u00e8k\u00e8s\u00e8",
- "Cisw\u00e0"
- ],
- "SHORTDAY": [
- "Lum",
- "Nko",
- "Ndy",
- "Ndg",
- "Njw",
- "Ngv",
- "Lub"
- ],
- "SHORTMONTH": [
- "Cio",
- "Lui",
- "Lus",
- "Muu",
- "Lum",
- "Luf",
- "Kab",
- "Lush",
- "Lut",
- "Lun",
- "Kas",
- "Cis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "lu-cd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu.js
deleted file mode 100644
index 9cddb8fa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Dinda",
- "Dilolo"
- ],
- "DAY": [
- "Lumingu",
- "Nkodya",
- "Nd\u00e0ay\u00e0",
- "Ndang\u00f9",
- "Nj\u00f2wa",
- "Ng\u00f2vya",
- "Lubingu"
- ],
- "ERANAMES": [
- "Kumpala kwa Yezu Kli",
- "Kunyima kwa Yezu Kli"
- ],
- "ERAS": [
- "kmp. Y.K.",
- "kny. Y. K."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ciongo",
- "L\u00f9ishi",
- "Lus\u00f2lo",
- "M\u00f9uy\u00e0",
- "Lum\u00f9ng\u00f9l\u00f9",
- "Lufuimi",
- "Kab\u00e0l\u00e0sh\u00ecp\u00f9",
- "L\u00f9sh\u00eck\u00e0",
- "Lutongolo",
- "Lung\u00f9di",
- "Kasw\u00e8k\u00e8s\u00e8",
- "Cisw\u00e0"
- ],
- "SHORTDAY": [
- "Lum",
- "Nko",
- "Ndy",
- "Ndg",
- "Njw",
- "Ngv",
- "Lub"
- ],
- "SHORTMONTH": [
- "Cio",
- "Lui",
- "Lus",
- "Muu",
- "Lum",
- "Luf",
- "Kab",
- "Lush",
- "Lut",
- "Lun",
- "Kas",
- "Cis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "lu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo-ke.js
deleted file mode 100644
index 0f85ee6b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "OD",
- "OT"
- ],
- "DAY": [
- "Jumapil",
- "Wuok Tich",
- "Tich Ariyo",
- "Tich Adek",
- "Tich Ang\u2019wen",
- "Tich Abich",
- "Ngeso"
- ],
- "ERANAMES": [
- "Kapok Kristo obiro",
- "Ka Kristo osebiro"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Dwe mar Achiel",
- "Dwe mar Ariyo",
- "Dwe mar Adek",
- "Dwe mar Ang\u2019wen",
- "Dwe mar Abich",
- "Dwe mar Auchiel",
- "Dwe mar Abiriyo",
- "Dwe mar Aboro",
- "Dwe mar Ochiko",
- "Dwe mar Apar",
- "Dwe mar gi achiel",
- "Dwe mar Apar gi ariyo"
- ],
- "SHORTDAY": [
- "JMP",
- "WUT",
- "TAR",
- "TAD",
- "TAN",
- "TAB",
- "NGS"
- ],
- "SHORTMONTH": [
- "DAC",
- "DAR",
- "DAD",
- "DAN",
- "DAH",
- "DAU",
- "DAO",
- "DAB",
- "DOC",
- "DAP",
- "DGI",
- "DAG"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "luo-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo.js
deleted file mode 100644
index 0067d1f4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "OD",
- "OT"
- ],
- "DAY": [
- "Jumapil",
- "Wuok Tich",
- "Tich Ariyo",
- "Tich Adek",
- "Tich Ang\u2019wen",
- "Tich Abich",
- "Ngeso"
- ],
- "ERANAMES": [
- "Kapok Kristo obiro",
- "Ka Kristo osebiro"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Dwe mar Achiel",
- "Dwe mar Ariyo",
- "Dwe mar Adek",
- "Dwe mar Ang\u2019wen",
- "Dwe mar Abich",
- "Dwe mar Auchiel",
- "Dwe mar Abiriyo",
- "Dwe mar Aboro",
- "Dwe mar Ochiko",
- "Dwe mar Apar",
- "Dwe mar gi achiel",
- "Dwe mar Apar gi ariyo"
- ],
- "SHORTDAY": [
- "JMP",
- "WUT",
- "TAR",
- "TAD",
- "TAN",
- "TAB",
- "NGS"
- ],
- "SHORTMONTH": [
- "DAC",
- "DAR",
- "DAD",
- "DAN",
- "DAH",
- "DAU",
- "DAO",
- "DAB",
- "DOC",
- "DAP",
- "DGI",
- "DAG"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "luo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy-ke.js
deleted file mode 100644
index 301f5bf8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Jumapiri",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Murwa wa Kanne",
- "Murwa wa Katano",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Imberi ya Kuuza Kwa",
- "Muhiga Kuvita Kuuza"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "J2",
- "J3",
- "J4",
- "J5",
- "Al",
- "Ij",
- "J1"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-\u00a0",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "luy-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy.js
deleted file mode 100644
index 01f683a5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_luy.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Jumapiri",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Murwa wa Kanne",
- "Murwa wa Katano",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Imberi ya Kuuza Kwa",
- "Muhiga Kuvita Kuuza"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "J2",
- "J3",
- "J4",
- "J5",
- "Al",
- "Ij",
- "J1"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-\u00a0",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "luy",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv-lv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv-lv.js
deleted file mode 100644
index e892fd43..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv-lv.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "priek\u0161pusdien\u0101",
- "p\u0113cpusdien\u0101"
- ],
- "DAY": [
- "sv\u0113tdiena",
- "pirmdiena",
- "otrdiena",
- "tre\u0161diena",
- "ceturtdiena",
- "piektdiena",
- "sestdiena"
- ],
- "ERANAMES": [
- "pirms m\u016bsu \u0113ras",
- "m\u016bsu \u0113r\u0101"
- ],
- "ERAS": [
- "p.m.\u0113.",
- "m.\u0113."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janv\u0101ris",
- "febru\u0101ris",
- "marts",
- "apr\u012blis",
- "maijs",
- "j\u016bnijs",
- "j\u016blijs",
- "augusts",
- "septembris",
- "oktobris",
- "novembris",
- "decembris"
- ],
- "SHORTDAY": [
- "Sv",
- "Pr",
- "Ot",
- "Tr",
- "Ce",
- "Pk",
- "Se"
- ],
- "SHORTMONTH": [
- "janv.",
- "febr.",
- "marts",
- "apr.",
- "maijs",
- "j\u016bn.",
- "j\u016bl.",
- "aug.",
- "sept.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y. 'gada' d. MMMM",
- "longDate": "y. 'gada' d. MMMM",
- "medium": "y. 'gada' d. MMM HH:mm:ss",
- "mediumDate": "y. 'gada' d. MMM",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 0,
- "lgSize": 0,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "lv-lv",
- "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19 || vf.v == 2 && vf.f % 100 >= 11 && vf.f % 100 <= 19) { return PLURAL_CATEGORY.ZERO; } if (n % 10 == 1 && n % 100 != 11 || vf.v == 2 && vf.f % 10 == 1 && vf.f % 100 != 11 || vf.v != 2 && vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv.js
deleted file mode 100644
index c22256cb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_lv.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "priek\u0161pusdien\u0101",
- "p\u0113cpusdien\u0101"
- ],
- "DAY": [
- "sv\u0113tdiena",
- "pirmdiena",
- "otrdiena",
- "tre\u0161diena",
- "ceturtdiena",
- "piektdiena",
- "sestdiena"
- ],
- "ERANAMES": [
- "pirms m\u016bsu \u0113ras",
- "m\u016bsu \u0113r\u0101"
- ],
- "ERAS": [
- "p.m.\u0113.",
- "m.\u0113."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janv\u0101ris",
- "febru\u0101ris",
- "marts",
- "apr\u012blis",
- "maijs",
- "j\u016bnijs",
- "j\u016blijs",
- "augusts",
- "septembris",
- "oktobris",
- "novembris",
- "decembris"
- ],
- "SHORTDAY": [
- "Sv",
- "Pr",
- "Ot",
- "Tr",
- "Ce",
- "Pk",
- "Se"
- ],
- "SHORTMONTH": [
- "janv.",
- "febr.",
- "marts",
- "apr.",
- "maijs",
- "j\u016bn.",
- "j\u016bl.",
- "aug.",
- "sept.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y. 'gada' d. MMMM",
- "longDate": "y. 'gada' d. MMMM",
- "medium": "y. 'gada' d. MMM HH:mm:ss",
- "mediumDate": "y. 'gada' d. MMM",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 0,
- "lgSize": 0,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "lv",
- "pluralCat": function(n, opt_precision) { var vf = getVF(n, opt_precision); if (n % 10 == 0 || n % 100 >= 11 && n % 100 <= 19 || vf.v == 2 && vf.f % 100 >= 11 && vf.f % 100 <= 19) { return PLURAL_CATEGORY.ZERO; } if (n % 10 == 1 && n % 100 != 11 || vf.v == 2 && vf.f % 10 == 1 && vf.f % 100 != 11 || vf.v != 2 && vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-ke.js
deleted file mode 100644
index 74bf268b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0190nkak\u025bny\u00e1",
- "\u0190nd\u00e1m\u00e2"
- ],
- "DAY": [
- "Jumap\u00edl\u00ed",
- "Jumat\u00e1tu",
- "Jumane",
- "Jumat\u00e1n\u0254",
- "Ala\u00e1misi",
- "Jum\u00e1a",
- "Jumam\u00f3si"
- ],
- "ERANAMES": [
- "Me\u00edn\u014d Y\u025b\u0301s\u0289",
- "E\u00edn\u014d Y\u025b\u0301s\u0289"
- ],
- "ERAS": [
- "MY",
- "EY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Oladal\u0289\u0301",
- "Ar\u00e1t",
- "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k",
- "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2",
- "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2",
- "K\u00faj\u00fa\u0254r\u0254k",
- "M\u00f3rus\u00e1sin",
- "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b",
- "K\u00fash\u00een",
- "Olg\u00edsan",
- "P\u0289sh\u0289\u0301ka",
- "Nt\u0289\u0301\u014b\u0289\u0301s"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Dal",
- "Ar\u00e1",
- "\u0186\u025bn",
- "Doy",
- "L\u00e9p",
- "Rok",
- "S\u00e1s",
- "B\u0254\u0301r",
- "K\u00fas",
- "G\u00eds",
- "Sh\u0289\u0301",
- "Nt\u0289\u0301"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mas-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-tz.js
deleted file mode 100644
index 0a81920b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0190nkak\u025bny\u00e1",
- "\u0190nd\u00e1m\u00e2"
- ],
- "DAY": [
- "Jumap\u00edl\u00ed",
- "Jumat\u00e1tu",
- "Jumane",
- "Jumat\u00e1n\u0254",
- "Ala\u00e1misi",
- "Jum\u00e1a",
- "Jumam\u00f3si"
- ],
- "ERANAMES": [
- "Me\u00edn\u014d Y\u025b\u0301s\u0289",
- "E\u00edn\u014d Y\u025b\u0301s\u0289"
- ],
- "ERAS": [
- "MY",
- "EY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Oladal\u0289\u0301",
- "Ar\u00e1t",
- "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k",
- "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2",
- "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2",
- "K\u00faj\u00fa\u0254r\u0254k",
- "M\u00f3rus\u00e1sin",
- "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b",
- "K\u00fash\u00een",
- "Olg\u00edsan",
- "P\u0289sh\u0289\u0301ka",
- "Nt\u0289\u0301\u014b\u0289\u0301s"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Dal",
- "Ar\u00e1",
- "\u0186\u025bn",
- "Doy",
- "L\u00e9p",
- "Rok",
- "S\u00e1s",
- "B\u0254\u0301r",
- "K\u00fas",
- "G\u00eds",
- "Sh\u0289\u0301",
- "Nt\u0289\u0301"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mas-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas.js
deleted file mode 100644
index 16938f98..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mas.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0190nkak\u025bny\u00e1",
- "\u0190nd\u00e1m\u00e2"
- ],
- "DAY": [
- "Jumap\u00edl\u00ed",
- "Jumat\u00e1tu",
- "Jumane",
- "Jumat\u00e1n\u0254",
- "Ala\u00e1misi",
- "Jum\u00e1a",
- "Jumam\u00f3si"
- ],
- "ERANAMES": [
- "Me\u00edn\u014d Y\u025b\u0301s\u0289",
- "E\u00edn\u014d Y\u025b\u0301s\u0289"
- ],
- "ERAS": [
- "MY",
- "EY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Oladal\u0289\u0301",
- "Ar\u00e1t",
- "\u0186\u025bn\u0268\u0301\u0254\u0268\u014b\u0254k",
- "Olodoy\u00ed\u00f3r\u00ed\u00ea ink\u00f3k\u00fa\u00e2",
- "Oloil\u00e9p\u016bny\u012b\u0113 ink\u00f3k\u00fa\u00e2",
- "K\u00faj\u00fa\u0254r\u0254k",
- "M\u00f3rus\u00e1sin",
- "\u0186l\u0254\u0301\u0268\u0301b\u0254\u0301r\u00e1r\u025b",
- "K\u00fash\u00een",
- "Olg\u00edsan",
- "P\u0289sh\u0289\u0301ka",
- "Nt\u0289\u0301\u014b\u0289\u0301s"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Dal",
- "Ar\u00e1",
- "\u0186\u025bn",
- "Doy",
- "L\u00e9p",
- "Rok",
- "S\u00e1s",
- "B\u0254\u0301r",
- "K\u00fas",
- "G\u00eds",
- "Sh\u0289\u0301",
- "Nt\u0289\u0301"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mas",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer-ke.js
deleted file mode 100644
index da3e57d0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "R\u0168",
- "\u0168G"
- ],
- "DAY": [
- "Kiumia",
- "Muramuko",
- "Wairi",
- "Wethatu",
- "Wena",
- "Wetano",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Mbere ya Krist\u0169",
- "Nyuma ya Krist\u0169"
- ],
- "ERAS": [
- "MK",
- "NK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar\u0129",
- "Feburuar\u0129",
- "Machi",
- "\u0128pur\u0169",
- "M\u0129\u0129",
- "Njuni",
- "Njura\u0129",
- "Agasti",
- "Septemba",
- "Okt\u0169ba",
- "Novemba",
- "Dicemba"
- ],
- "SHORTDAY": [
- "KIU",
- "MRA",
- "WAI",
- "WET",
- "WEN",
- "WTN",
- "JUM"
- ],
- "SHORTMONTH": [
- "JAN",
- "FEB",
- "MAC",
- "\u0128PU",
- "M\u0128\u0128",
- "NJU",
- "NJR",
- "AGA",
- "SPT",
- "OKT",
- "NOV",
- "DEC"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mer-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer.js
deleted file mode 100644
index 8c359f30..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mer.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "R\u0168",
- "\u0168G"
- ],
- "DAY": [
- "Kiumia",
- "Muramuko",
- "Wairi",
- "Wethatu",
- "Wena",
- "Wetano",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Mbere ya Krist\u0169",
- "Nyuma ya Krist\u0169"
- ],
- "ERAS": [
- "MK",
- "NK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januar\u0129",
- "Feburuar\u0129",
- "Machi",
- "\u0128pur\u0169",
- "M\u0129\u0129",
- "Njuni",
- "Njura\u0129",
- "Agasti",
- "Septemba",
- "Okt\u0169ba",
- "Novemba",
- "Dicemba"
- ],
- "SHORTDAY": [
- "KIU",
- "MRA",
- "WAI",
- "WET",
- "WEN",
- "WTN",
- "JUM"
- ],
- "SHORTMONTH": [
- "JAN",
- "FEB",
- "MAC",
- "\u0128PU",
- "M\u0128\u0128",
- "NJU",
- "NJR",
- "AGA",
- "SPT",
- "OKT",
- "NOV",
- "DEC"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mer",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe-mu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe-mu.js
deleted file mode 100644
index 1222582e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe-mu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimans",
- "lindi",
- "mardi",
- "merkredi",
- "zedi",
- "vandredi",
- "samdi"
- ],
- "ERANAMES": [
- "avan Zezi-Krist",
- "apre Zezi-Krist"
- ],
- "ERAS": [
- "av. Z-K",
- "ap. Z-K"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "zanvie",
- "fevriye",
- "mars",
- "avril",
- "me",
- "zin",
- "zilye",
- "out",
- "septam",
- "oktob",
- "novam",
- "desam"
- ],
- "SHORTDAY": [
- "dim",
- "lin",
- "mar",
- "mer",
- "ze",
- "van",
- "sam"
- ],
- "SHORTMONTH": [
- "zan",
- "fev",
- "mar",
- "avr",
- "me",
- "zin",
- "zil",
- "out",
- "sep",
- "okt",
- "nov",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MURs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mfe-mu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe.js
deleted file mode 100644
index 56029318..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mfe.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "dimans",
- "lindi",
- "mardi",
- "merkredi",
- "zedi",
- "vandredi",
- "samdi"
- ],
- "ERANAMES": [
- "avan Zezi-Krist",
- "apre Zezi-Krist"
- ],
- "ERAS": [
- "av. Z-K",
- "ap. Z-K"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "zanvie",
- "fevriye",
- "mars",
- "avril",
- "me",
- "zin",
- "zilye",
- "out",
- "septam",
- "oktob",
- "novam",
- "desam"
- ],
- "SHORTDAY": [
- "dim",
- "lin",
- "mar",
- "mer",
- "ze",
- "van",
- "sam"
- ],
- "SHORTMONTH": [
- "zan",
- "fev",
- "mar",
- "avr",
- "me",
- "zin",
- "zil",
- "out",
- "sep",
- "okt",
- "nov",
- "des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MURs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mfe",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg-mg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg-mg.js
deleted file mode 100644
index 7d649917..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg-mg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Alahady",
- "Alatsinainy",
- "Talata",
- "Alarobia",
- "Alakamisy",
- "Zoma",
- "Asabotsy"
- ],
- "ERANAMES": [
- "Alohan\u2019i JK",
- "Aorian\u2019i JK"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janoary",
- "Febroary",
- "Martsa",
- "Aprily",
- "Mey",
- "Jona",
- "Jolay",
- "Aogositra",
- "Septambra",
- "Oktobra",
- "Novambra",
- "Desambra"
- ],
- "SHORTDAY": [
- "Alah",
- "Alats",
- "Tal",
- "Alar",
- "Alak",
- "Zom",
- "Asab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mey",
- "Jon",
- "Jol",
- "Aog",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ar",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mg-mg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg.js
deleted file mode 100644
index 7b4b8716..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Alahady",
- "Alatsinainy",
- "Talata",
- "Alarobia",
- "Alakamisy",
- "Zoma",
- "Asabotsy"
- ],
- "ERANAMES": [
- "Alohan\u2019i JK",
- "Aorian\u2019i JK"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janoary",
- "Febroary",
- "Martsa",
- "Aprily",
- "Mey",
- "Jona",
- "Jolay",
- "Aogositra",
- "Septambra",
- "Oktobra",
- "Novambra",
- "Desambra"
- ],
- "SHORTDAY": [
- "Alah",
- "Alats",
- "Tal",
- "Alar",
- "Alak",
- "Zom",
- "Asab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "Mey",
- "Jon",
- "Jol",
- "Aog",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ar",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh-mz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh-mz.js
deleted file mode 100644
index 3a96657c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh-mz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "wichishu",
- "mchochil\u2019l"
- ],
- "DAY": [
- "Sabato",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Arahamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Hinapiya yesu",
- "Yopia yesu"
- ],
- "ERAS": [
- "HY",
- "YY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mweri wo kwanza",
- "Mweri wo unayeli",
- "Mweri wo uneraru",
- "Mweri wo unecheshe",
- "Mweri wo unethanu",
- "Mweri wo thanu na mocha",
- "Mweri wo saba",
- "Mweri wo nane",
- "Mweri wo tisa",
- "Mweri wo kumi",
- "Mweri wo kumi na moja",
- "Mweri wo kumi na yel\u2019li"
- ],
- "SHORTDAY": [
- "Sab",
- "Jtt",
- "Jnn",
- "Jtn",
- "Ara",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Kwa",
- "Una",
- "Rar",
- "Che",
- "Tha",
- "Moc",
- "Sab",
- "Nan",
- "Tis",
- "Kum",
- "Moj",
- "Yel"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MTn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mgh-mz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh.js
deleted file mode 100644
index 8b52d094..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "wichishu",
- "mchochil\u2019l"
- ],
- "DAY": [
- "Sabato",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Arahamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Hinapiya yesu",
- "Yopia yesu"
- ],
- "ERAS": [
- "HY",
- "YY"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mweri wo kwanza",
- "Mweri wo unayeli",
- "Mweri wo uneraru",
- "Mweri wo unecheshe",
- "Mweri wo unethanu",
- "Mweri wo thanu na mocha",
- "Mweri wo saba",
- "Mweri wo nane",
- "Mweri wo tisa",
- "Mweri wo kumi",
- "Mweri wo kumi na moja",
- "Mweri wo kumi na yel\u2019li"
- ],
- "SHORTDAY": [
- "Sab",
- "Jtt",
- "Jnn",
- "Jtn",
- "Ara",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Kwa",
- "Una",
- "Rar",
- "Che",
- "Tha",
- "Moc",
- "Sab",
- "Nan",
- "Tis",
- "Kum",
- "Moj",
- "Yel"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MTn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mgh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo-cm.js
deleted file mode 100644
index da0baa9d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Aneg 1",
- "Aneg 2",
- "Aneg 3",
- "Aneg 4",
- "Aneg 5",
- "Aneg 6",
- "Aneg 7"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "im\u0259g mbegtug",
- "imeg \u00e0b\u00f9b\u00ec",
- "imeg mb\u0259\u014bchubi",
- "im\u0259g ngw\u0259\u0300t",
- "im\u0259g fog",
- "im\u0259g ichiib\u0254d",
- "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b",
- "im\u0259g ichika",
- "im\u0259g kud",
- "im\u0259g t\u00e8si\u02bce",
- "im\u0259g z\u00f2",
- "im\u0259g krizmed"
- ],
- "SHORTDAY": [
- "Aneg 1",
- "Aneg 2",
- "Aneg 3",
- "Aneg 4",
- "Aneg 5",
- "Aneg 6",
- "Aneg 7"
- ],
- "SHORTMONTH": [
- "mbegtug",
- "imeg \u00e0b\u00f9b\u00ec",
- "imeg mb\u0259\u014bchubi",
- "im\u0259g ngw\u0259\u0300t",
- "im\u0259g fog",
- "im\u0259g ichiib\u0254d",
- "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b",
- "im\u0259g ichika",
- "im\u0259g kud",
- "im\u0259g t\u00e8si\u02bce",
- "im\u0259g z\u00f2",
- "im\u0259g krizmed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mgo-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo.js
deleted file mode 100644
index 74bc53ec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mgo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Aneg 1",
- "Aneg 2",
- "Aneg 3",
- "Aneg 4",
- "Aneg 5",
- "Aneg 6",
- "Aneg 7"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "im\u0259g mbegtug",
- "imeg \u00e0b\u00f9b\u00ec",
- "imeg mb\u0259\u014bchubi",
- "im\u0259g ngw\u0259\u0300t",
- "im\u0259g fog",
- "im\u0259g ichiib\u0254d",
- "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b",
- "im\u0259g ichika",
- "im\u0259g kud",
- "im\u0259g t\u00e8si\u02bce",
- "im\u0259g z\u00f2",
- "im\u0259g krizmed"
- ],
- "SHORTDAY": [
- "Aneg 1",
- "Aneg 2",
- "Aneg 3",
- "Aneg 4",
- "Aneg 5",
- "Aneg 6",
- "Aneg 7"
- ],
- "SHORTMONTH": [
- "mbegtug",
- "imeg \u00e0b\u00f9b\u00ec",
- "imeg mb\u0259\u014bchubi",
- "im\u0259g ngw\u0259\u0300t",
- "im\u0259g fog",
- "im\u0259g ichiib\u0254d",
- "im\u0259g \u00e0d\u00f9mb\u0259\u0300\u014b",
- "im\u0259g ichika",
- "im\u0259g kud",
- "im\u0259g t\u00e8si\u02bce",
- "im\u0259g z\u00f2",
- "im\u0259g krizmed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mgo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk-mk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk-mk.js
deleted file mode 100644
index bd775d86..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk-mk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
- "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u043b\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a",
- "\u043f\u0435\u0442\u043e\u043a",
- "\u0441\u0430\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u043f\u0440\u0435\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430",
- "\u043e\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430"
- ],
- "ERAS": [
- "\u043f\u0440.\u043d.\u0435.",
- "\u043d.\u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440\u0438",
- "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d\u0438",
- "\u0458\u0443\u043b\u0438",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438",
- "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438",
- "\u043d\u043e\u0435\u043c\u0432\u0440\u0438",
- "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434.",
- "\u043f\u043e\u043d.",
- "\u0432\u0442.",
- "\u0441\u0440\u0435.",
- "\u0447\u0435\u0442.",
- "\u043f\u0435\u0442.",
- "\u0441\u0430\u0431."
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d.",
- "\u0458\u0443\u043b.",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043f\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u0435\u043c.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd.M.y HH:mm:ss",
- "mediumDate": "dd.M.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.M.yy HH:mm",
- "shortDate": "dd.M.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mk-mk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 || vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk.js
deleted file mode 100644
index b456dc6e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435",
- "\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u043b\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a",
- "\u043f\u0435\u0442\u043e\u043a",
- "\u0441\u0430\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u043f\u0440\u0435\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430",
- "\u043e\u0434 \u043d\u0430\u0448\u0430\u0442\u0430 \u0435\u0440\u0430"
- ],
- "ERAS": [
- "\u043f\u0440.\u043d.\u0435.",
- "\u043d.\u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440\u0438",
- "\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d\u0438",
- "\u0458\u0443\u043b\u0438",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438",
- "\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438",
- "\u043d\u043e\u0435\u043c\u0432\u0440\u0438",
- "\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434.",
- "\u043f\u043e\u043d.",
- "\u0432\u0442.",
- "\u0441\u0440\u0435.",
- "\u0447\u0435\u0442.",
- "\u043f\u0435\u0442.",
- "\u0441\u0430\u0431."
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d.",
- "\u0458\u0443\u043b.",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043f\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u0435\u043c.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "dd MMMM y",
- "medium": "dd.M.y HH:mm:ss",
- "mediumDate": "dd.M.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.M.yy HH:mm",
- "shortDate": "dd.M.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 || vf.f % 10 == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml-in.js
deleted file mode 100644
index c3d012ff..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a",
- "\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a"
- ],
- "ERANAMES": [
- "\u0d15\u0d4d\u0d30\u0d3f\u0d38\u0d4d\u200c\u0d24\u0d41\u0d35\u0d3f\u0d28\u0d4d \u0d2e\u0d41\u0d2e\u0d4d\u0d2a\u0d4d",
- "\u0d06\u0d28\u0d4d\u0d28\u0d4b \u0d21\u0d4a\u0d2e\u0d3f\u0d28\u0d3f"
- ],
- "ERAS": [
- "\u0d15\u0d4d\u0d30\u0d3f.\u0d2e\u0d41.",
- "\u0d0e\u0d21\u0d3f"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f",
- "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f",
- "\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d",
- "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d",
- "\u0d2e\u0d47\u0d2f\u0d4d",
- "\u0d1c\u0d42\u0d7a",
- "\u0d1c\u0d42\u0d32\u0d48",
- "\u0d06\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d",
- "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c",
- "\u0d12\u0d15\u0d4d\u200c\u0d1f\u0d4b\u0d2c\u0d7c",
- "\u0d28\u0d35\u0d02\u0d2c\u0d7c",
- "\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c"
- ],
- "SHORTDAY": [
- "\u0d1e\u0d3e\u0d2f\u0d7c",
- "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e",
- "\u0d1a\u0d4a\u0d35\u0d4d\u0d35",
- "\u0d2c\u0d41\u0d27\u0d7b",
- "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02",
- "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f",
- "\u0d36\u0d28\u0d3f"
- ],
- "SHORTMONTH": [
- "\u0d1c\u0d28\u0d41",
- "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41",
- "\u0d2e\u0d3e\u0d7c",
- "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f",
- "\u0d2e\u0d47\u0d2f\u0d4d",
- "\u0d1c\u0d42\u0d7a",
- "\u0d1c\u0d42\u0d32\u0d48",
- "\u0d13\u0d17",
- "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02",
- "\u0d12\u0d15\u0d4d\u0d1f\u0d4b",
- "\u0d28\u0d35\u0d02",
- "\u0d21\u0d3f\u0d38\u0d02"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "y, MMMM d, EEEE",
- "longDate": "y, MMMM d",
- "medium": "y, MMM d h:mm:ss a",
- "mediumDate": "y, MMM d",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ml-in",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml.js
deleted file mode 100644
index 8d50656e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ml.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0d1e\u0d3e\u0d2f\u0d31\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d33\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d1a\u0d4a\u0d35\u0d4d\u0d35\u0d3e\u0d34\u0d4d\u0d1a",
- "\u0d2c\u0d41\u0d27\u0d28\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a",
- "\u0d36\u0d28\u0d3f\u0d2f\u0d3e\u0d34\u0d4d\u200c\u0d1a"
- ],
- "ERANAMES": [
- "\u0d15\u0d4d\u0d30\u0d3f\u0d38\u0d4d\u200c\u0d24\u0d41\u0d35\u0d3f\u0d28\u0d4d \u0d2e\u0d41\u0d2e\u0d4d\u0d2a\u0d4d",
- "\u0d06\u0d28\u0d4d\u0d28\u0d4b \u0d21\u0d4a\u0d2e\u0d3f\u0d28\u0d3f"
- ],
- "ERAS": [
- "\u0d15\u0d4d\u0d30\u0d3f.\u0d2e\u0d41.",
- "\u0d0e\u0d21\u0d3f"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0d1c\u0d28\u0d41\u0d35\u0d30\u0d3f",
- "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41\u0d35\u0d30\u0d3f",
- "\u0d2e\u0d3e\u0d7c\u0d1a\u0d4d\u0d1a\u0d4d",
- "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f\u0d7d",
- "\u0d2e\u0d47\u0d2f\u0d4d",
- "\u0d1c\u0d42\u0d7a",
- "\u0d1c\u0d42\u0d32\u0d48",
- "\u0d06\u0d17\u0d38\u0d4d\u0d31\u0d4d\u0d31\u0d4d",
- "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02\u0d2c\u0d7c",
- "\u0d12\u0d15\u0d4d\u200c\u0d1f\u0d4b\u0d2c\u0d7c",
- "\u0d28\u0d35\u0d02\u0d2c\u0d7c",
- "\u0d21\u0d3f\u0d38\u0d02\u0d2c\u0d7c"
- ],
- "SHORTDAY": [
- "\u0d1e\u0d3e\u0d2f\u0d7c",
- "\u0d24\u0d3f\u0d19\u0d4d\u0d15\u0d7e",
- "\u0d1a\u0d4a\u0d35\u0d4d\u0d35",
- "\u0d2c\u0d41\u0d27\u0d7b",
- "\u0d35\u0d4d\u0d2f\u0d3e\u0d34\u0d02",
- "\u0d35\u0d46\u0d33\u0d4d\u0d33\u0d3f",
- "\u0d36\u0d28\u0d3f"
- ],
- "SHORTMONTH": [
- "\u0d1c\u0d28\u0d41",
- "\u0d2b\u0d46\u0d2c\u0d4d\u0d30\u0d41",
- "\u0d2e\u0d3e\u0d7c",
- "\u0d0f\u0d2a\u0d4d\u0d30\u0d3f",
- "\u0d2e\u0d47\u0d2f\u0d4d",
- "\u0d1c\u0d42\u0d7a",
- "\u0d1c\u0d42\u0d32\u0d48",
- "\u0d13\u0d17",
- "\u0d38\u0d46\u0d2a\u0d4d\u0d31\u0d4d\u0d31\u0d02",
- "\u0d12\u0d15\u0d4d\u0d1f\u0d4b",
- "\u0d28\u0d35\u0d02",
- "\u0d21\u0d3f\u0d38\u0d02"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "y, MMMM d, EEEE",
- "longDate": "y, MMMM d",
- "medium": "y, MMM d h:mm:ss a",
- "mediumDate": "y, MMM d",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ml",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl-mn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl-mn.js
deleted file mode 100644
index 961fdd2c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl-mn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u04ae\u04e8",
- "\u04ae\u0425"
- ],
- "DAY": [
- "\u043d\u044f\u043c",
- "\u0434\u0430\u0432\u0430\u0430",
- "\u043c\u044f\u0433\u043c\u0430\u0440",
- "\u043b\u0445\u0430\u0433\u0432\u0430",
- "\u043f\u04af\u0440\u044d\u0432",
- "\u0431\u0430\u0430\u0441\u0430\u043d",
- "\u0431\u044f\u043c\u0431\u0430"
- ],
- "ERANAMES": [
- "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439 \u04e9\u043c\u043d\u04e9\u0445",
- "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439"
- ],
- "ERAS": [
- "\u041c\u042d\u04e8",
- "\u041c\u042d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u041d\u044f",
- "\u0414\u0430",
- "\u041c\u044f",
- "\u041b\u0445",
- "\u041f\u04af",
- "\u0411\u0430",
- "\u0411\u044f"
- ],
- "SHORTMONTH": [
- "1-\u0440 \u0441\u0430\u0440",
- "2-\u0440 \u0441\u0430\u0440",
- "3-\u0440 \u0441\u0430\u0440",
- "4-\u0440 \u0441\u0430\u0440",
- "5-\u0440 \u0441\u0430\u0440",
- "6-\u0440 \u0441\u0430\u0440",
- "7-\u0440 \u0441\u0430\u0440",
- "8-\u0440 \u0441\u0430\u0440",
- "9-\u0440 \u0441\u0430\u0440",
- "10-\u0440 \u0441\u0430\u0440",
- "11-\u0440 \u0441\u0430\u0440",
- "12-\u0440 \u0441\u0430\u0440"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d",
- "longDate": "y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ae",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mn-cyrl-mn",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl.js
deleted file mode 100644
index c69a40d3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn-cyrl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u04ae\u04e8",
- "\u04ae\u0425"
- ],
- "DAY": [
- "\u043d\u044f\u043c",
- "\u0434\u0430\u0432\u0430\u0430",
- "\u043c\u044f\u0433\u043c\u0430\u0440",
- "\u043b\u0445\u0430\u0433\u0432\u0430",
- "\u043f\u04af\u0440\u044d\u0432",
- "\u0431\u0430\u0430\u0441\u0430\u043d",
- "\u0431\u044f\u043c\u0431\u0430"
- ],
- "ERANAMES": [
- "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439 \u04e9\u043c\u043d\u04e9\u0445",
- "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439"
- ],
- "ERAS": [
- "\u041c\u042d\u04e8",
- "\u041c\u042d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u041d\u044f",
- "\u0414\u0430",
- "\u041c\u044f",
- "\u041b\u0445",
- "\u041f\u04af",
- "\u0411\u0430",
- "\u0411\u044f"
- ],
- "SHORTMONTH": [
- "1-\u0440 \u0441\u0430\u0440",
- "2-\u0440 \u0441\u0430\u0440",
- "3-\u0440 \u0441\u0430\u0440",
- "4-\u0440 \u0441\u0430\u0440",
- "5-\u0440 \u0441\u0430\u0440",
- "6-\u0440 \u0441\u0430\u0440",
- "7-\u0440 \u0441\u0430\u0440",
- "8-\u0440 \u0441\u0430\u0440",
- "9-\u0440 \u0441\u0430\u0440",
- "10-\u0440 \u0441\u0430\u0440",
- "11-\u0440 \u0441\u0430\u0440",
- "12-\u0440 \u0441\u0430\u0440"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d",
- "longDate": "y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ae",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mn-cyrl",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn.js
deleted file mode 100644
index 0b424093..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u04ae\u04e8",
- "\u04ae\u0425"
- ],
- "DAY": [
- "\u043d\u044f\u043c",
- "\u0434\u0430\u0432\u0430\u0430",
- "\u043c\u044f\u0433\u043c\u0430\u0440",
- "\u043b\u0445\u0430\u0433\u0432\u0430",
- "\u043f\u04af\u0440\u044d\u0432",
- "\u0431\u0430\u0430\u0441\u0430\u043d",
- "\u0431\u044f\u043c\u0431\u0430"
- ],
- "ERANAMES": [
- "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439 \u04e9\u043c\u043d\u04e9\u0445",
- "\u043c\u0430\u043d\u0430\u0439 \u044d\u0440\u0438\u043d\u0438\u0439"
- ],
- "ERAS": [
- "\u041c\u042d\u04e8",
- "\u041c\u042d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u041d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0425\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0413\u0443\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0414\u04e9\u0440\u04e9\u0432\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0422\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0417\u0443\u0440\u0433\u0430\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0414\u043e\u043b\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u041d\u0430\u0439\u043c\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0415\u0441\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0430\u0432\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0432\u0430\u043d \u043d\u044d\u0433\u0434\u04af\u0433\u044d\u044d\u0440 \u0441\u0430\u0440",
- "\u0410\u0440\u0432\u0430\u043d \u0445\u043e\u0451\u0440\u0434\u0443\u0433\u0430\u0430\u0440 \u0441\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u041d\u044f",
- "\u0414\u0430",
- "\u041c\u044f",
- "\u041b\u0445",
- "\u041f\u04af",
- "\u0411\u0430",
- "\u0411\u044f"
- ],
- "SHORTMONTH": [
- "1-\u0440 \u0441\u0430\u0440",
- "2-\u0440 \u0441\u0430\u0440",
- "3-\u0440 \u0441\u0430\u0440",
- "4-\u0440 \u0441\u0430\u0440",
- "5-\u0440 \u0441\u0430\u0440",
- "6-\u0440 \u0441\u0430\u0440",
- "7-\u0440 \u0441\u0430\u0440",
- "8-\u0440 \u0441\u0430\u0440",
- "9-\u0440 \u0441\u0430\u0440",
- "10-\u0440 \u0441\u0430\u0440",
- "11-\u0440 \u0441\u0430\u0440",
- "12-\u0440 \u0441\u0430\u0440"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d",
- "longDate": "y '\u043e\u043d\u044b' MM '\u0441\u0430\u0440\u044b\u043d' d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ae",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "mn",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr-in.js
deleted file mode 100644
index b040d89d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092e.\u092a\u0942.",
- "\u092e.\u0909."
- ],
- "DAY": [
- "\u0930\u0935\u093f\u0935\u093e\u0930",
- "\u0938\u094b\u092e\u0935\u093e\u0930",
- "\u092e\u0902\u0917\u0933\u0935\u093e\u0930",
- "\u092c\u0941\u0927\u0935\u093e\u0930",
- "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
- "\u0936\u0928\u093f\u0935\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u0935\u0940\u0938\u0928\u092a\u0942\u0930\u094d\u0935",
- "\u0908\u0938\u0935\u0940\u0938\u0928"
- ],
- "ERAS": [
- "\u0907. \u0938. \u092a\u0942.",
- "\u0907. \u0938."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0911\u0917\u0938\u094d\u091f",
- "\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930",
- "\u0911\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u0935\u093f",
- "\u0938\u094b\u092e",
- "\u092e\u0902\u0917\u0933",
- "\u092c\u0941\u0927",
- "\u0917\u0941\u0930\u0941",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u093e\u0928\u0947",
- "\u092b\u0947\u092c\u094d\u0930\u0941",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0911\u0917",
- "\u0938\u092a\u094d\u091f\u0947\u0902",
- "\u0911\u0915\u094d\u091f\u094b",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902",
- "\u0921\u093f\u0938\u0947\u0902"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mr-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr.js
deleted file mode 100644
index 5f5847df..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092e.\u092a\u0942.",
- "\u092e.\u0909."
- ],
- "DAY": [
- "\u0930\u0935\u093f\u0935\u093e\u0930",
- "\u0938\u094b\u092e\u0935\u093e\u0930",
- "\u092e\u0902\u0917\u0933\u0935\u093e\u0930",
- "\u092c\u0941\u0927\u0935\u093e\u0930",
- "\u0917\u0941\u0930\u0941\u0935\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u0935\u093e\u0930",
- "\u0936\u0928\u093f\u0935\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u0935\u0940\u0938\u0928\u092a\u0942\u0930\u094d\u0935",
- "\u0908\u0938\u0935\u0940\u0938\u0928"
- ],
- "ERAS": [
- "\u0907. \u0938. \u092a\u0942.",
- "\u0907. \u0938."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u093e\u0928\u0947\u0935\u093e\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0935\u093e\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0911\u0917\u0938\u094d\u091f",
- "\u0938\u092a\u094d\u091f\u0947\u0902\u092c\u0930",
- "\u0911\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u0902\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0930\u0935\u093f",
- "\u0938\u094b\u092e",
- "\u092e\u0902\u0917\u0933",
- "\u092c\u0941\u0927",
- "\u0917\u0941\u0930\u0941",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u093e\u0928\u0947",
- "\u092b\u0947\u092c\u094d\u0930\u0941",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u090f\u092a\u094d\u0930\u093f",
- "\u092e\u0947",
- "\u091c\u0942\u0928",
- "\u091c\u0941\u0932\u0948",
- "\u0911\u0917",
- "\u0938\u092a\u094d\u091f\u0947\u0902",
- "\u0911\u0915\u094d\u091f\u094b",
- "\u0928\u094b\u0935\u094d\u0939\u0947\u0902",
- "\u0921\u093f\u0938\u0947\u0902"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-bn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-bn.js
deleted file mode 100644
index 1bc9d07c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-bn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "PG",
- "PTG"
- ],
- "DAY": [
- "Ahad",
- "Isnin",
- "Selasa",
- "Rabu",
- "Khamis",
- "Jumaat",
- "Sabtu"
- ],
- "ERANAMES": [
- "S.M.",
- "TM"
- ],
- "ERAS": [
- "S.M.",
- "TM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Mac",
- "April",
- "Mei",
- "Jun",
- "Julai",
- "Ogos",
- "September",
- "Oktober",
- "November",
- "Disember"
- ],
- "SHORTDAY": [
- "Ahd",
- "Isn",
- "Sel",
- "Rab",
- "Kha",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ogo",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ms-latn-bn",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-my.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-my.js
deleted file mode 100644
index 5177e15f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-my.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "PG",
- "PTG"
- ],
- "DAY": [
- "Ahad",
- "Isnin",
- "Selasa",
- "Rabu",
- "Khamis",
- "Jumaat",
- "Sabtu"
- ],
- "ERANAMES": [
- "S.M.",
- "TM"
- ],
- "ERAS": [
- "S.M.",
- "TM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Mac",
- "April",
- "Mei",
- "Jun",
- "Julai",
- "Ogos",
- "September",
- "Oktober",
- "November",
- "Disember"
- ],
- "SHORTDAY": [
- "Ahd",
- "Isn",
- "Sel",
- "Rab",
- "Kha",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ogo",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RM",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ms-latn-my",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-sg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-sg.js
deleted file mode 100644
index ebd3bd4c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn-sg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "PG",
- "PTG"
- ],
- "DAY": [
- "Ahad",
- "Isnin",
- "Selasa",
- "Rabu",
- "Khamis",
- "Jumaat",
- "Sabtu"
- ],
- "ERANAMES": [
- "S.M.",
- "TM"
- ],
- "ERAS": [
- "S.M.",
- "TM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Mac",
- "April",
- "Mei",
- "Jun",
- "Julai",
- "Ogos",
- "September",
- "Oktober",
- "November",
- "Disember"
- ],
- "SHORTDAY": [
- "Ahd",
- "Isn",
- "Sel",
- "Rab",
- "Kha",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ogo",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ms-latn-sg",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn.js
deleted file mode 100644
index 2d4c07a8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms-latn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "PG",
- "PTG"
- ],
- "DAY": [
- "Ahad",
- "Isnin",
- "Selasa",
- "Rabu",
- "Khamis",
- "Jumaat",
- "Sabtu"
- ],
- "ERANAMES": [
- "S.M.",
- "TM"
- ],
- "ERAS": [
- "S.M.",
- "TM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Mac",
- "April",
- "Mei",
- "Jun",
- "Julai",
- "Ogos",
- "September",
- "Oktober",
- "November",
- "Disember"
- ],
- "SHORTDAY": [
- "Ahd",
- "Isn",
- "Sel",
- "Rab",
- "Kha",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ogo",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RM",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ms-latn",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms.js
deleted file mode 100644
index 0549f85b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ms.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "PG",
- "PTG"
- ],
- "DAY": [
- "Ahad",
- "Isnin",
- "Selasa",
- "Rabu",
- "Khamis",
- "Jumaat",
- "Sabtu"
- ],
- "ERANAMES": [
- "S.M.",
- "TM"
- ],
- "ERAS": [
- "S.M.",
- "TM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Mac",
- "April",
- "Mei",
- "Jun",
- "Julai",
- "Ogos",
- "September",
- "Oktober",
- "November",
- "Disember"
- ],
- "SHORTDAY": [
- "Ahd",
- "Isn",
- "Sel",
- "Rab",
- "Kha",
- "Jum",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ogo",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/yy h:mm a",
- "shortDate": "d/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RM",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ms",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt-mt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt-mt.js
deleted file mode 100644
index 20170a1a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt-mt.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Il-\u0126add",
- "It-Tnejn",
- "It-Tlieta",
- "L-Erbg\u0127a",
- "Il-\u0126amis",
- "Il-\u0120img\u0127a",
- "Is-Sibt"
- ],
- "ERANAMES": [
- "Qabel Kristu",
- "Wara Kristu"
- ],
- "ERAS": [
- "QK",
- "WK"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Jannar",
- "Frar",
- "Marzu",
- "April",
- "Mejju",
- "\u0120unju",
- "Lulju",
- "Awwissu",
- "Settembru",
- "Ottubru",
- "Novembru",
- "Di\u010bembru"
- ],
- "SHORTDAY": [
- "\u0126ad",
- "Tne",
- "Tli",
- "Erb",
- "\u0126am",
- "\u0120im",
- "Sib"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fra",
- "Mar",
- "Apr",
- "Mej",
- "\u0120un",
- "Lul",
- "Aww",
- "Set",
- "Ott",
- "Nov",
- "Di\u010b"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'ta'\u2019 MMMM y",
- "longDate": "d 'ta'\u2019 MMMM y",
- "medium": "dd MMM y HH:mm:ss",
- "mediumDate": "dd MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mt-mt",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 0 || n % 100 >= 2 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 19) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt.js
deleted file mode 100644
index 94902b19..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mt.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Il-\u0126add",
- "It-Tnejn",
- "It-Tlieta",
- "L-Erbg\u0127a",
- "Il-\u0126amis",
- "Il-\u0120img\u0127a",
- "Is-Sibt"
- ],
- "ERANAMES": [
- "Qabel Kristu",
- "Wara Kristu"
- ],
- "ERAS": [
- "QK",
- "WK"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Jannar",
- "Frar",
- "Marzu",
- "April",
- "Mejju",
- "\u0120unju",
- "Lulju",
- "Awwissu",
- "Settembru",
- "Ottubru",
- "Novembru",
- "Di\u010bembru"
- ],
- "SHORTDAY": [
- "\u0126ad",
- "Tne",
- "Tli",
- "Erb",
- "\u0126am",
- "\u0120im",
- "Sib"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fra",
- "Mar",
- "Apr",
- "Mej",
- "\u0120un",
- "Lul",
- "Aww",
- "Set",
- "Ott",
- "Nov",
- "Di\u010b"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'ta'\u2019 MMMM y",
- "longDate": "d 'ta'\u2019 MMMM y",
- "medium": "dd MMM y HH:mm:ss",
- "mediumDate": "dd MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mt",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } if (n == 0 || n % 100 >= 2 && n % 100 <= 10) { return PLURAL_CATEGORY.FEW; } if (n % 100 >= 11 && n % 100 <= 19) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua-cm.js
deleted file mode 100644
index 49c1012d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "comme",
- "lilli"
- ],
- "DAY": [
- "Com\u2019yakke",
- "Comlaa\u0257ii",
- "Comzyii\u0257ii",
- "Comkolle",
- "Comkald\u01dd\u0253lii",
- "Comgaisuu",
- "Comzye\u0253suu"
- ],
- "ERANAMES": [
- "K\u01ddPel Kristu",
- "Pel Kristu"
- ],
- "ERAS": [
- "KK",
- "PK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "F\u0129i Loo",
- "Cokcwakla\u014bne",
- "Cokcwaklii",
- "F\u0129i Marfoo",
- "Mad\u01dd\u01dduut\u01ddbija\u014b",
- "Mam\u01dd\u014bgw\u00e3afahbii",
- "Mam\u01dd\u014bgw\u00e3alii",
- "Mad\u01ddmbii",
- "F\u0129i D\u01dd\u0253lii",
- "F\u0129i Munda\u014b",
- "F\u0129i Gwahlle",
- "F\u0129i Yuru"
- ],
- "SHORTDAY": [
- "Cya",
- "Cla",
- "Czi",
- "Cko",
- "Cka",
- "Cga",
- "Cze"
- ],
- "SHORTMONTH": [
- "FLO",
- "CLA",
- "CKI",
- "FMF",
- "MAD",
- "MBI",
- "MLI",
- "MAM",
- "FDE",
- "FMU",
- "FGW",
- "FYU"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mua-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua.js
deleted file mode 100644
index c5f30a2f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_mua.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "comme",
- "lilli"
- ],
- "DAY": [
- "Com\u2019yakke",
- "Comlaa\u0257ii",
- "Comzyii\u0257ii",
- "Comkolle",
- "Comkald\u01dd\u0253lii",
- "Comgaisuu",
- "Comzye\u0253suu"
- ],
- "ERANAMES": [
- "K\u01ddPel Kristu",
- "Pel Kristu"
- ],
- "ERAS": [
- "KK",
- "PK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "F\u0129i Loo",
- "Cokcwakla\u014bne",
- "Cokcwaklii",
- "F\u0129i Marfoo",
- "Mad\u01dd\u01dduut\u01ddbija\u014b",
- "Mam\u01dd\u014bgw\u00e3afahbii",
- "Mam\u01dd\u014bgw\u00e3alii",
- "Mad\u01ddmbii",
- "F\u0129i D\u01dd\u0253lii",
- "F\u0129i Munda\u014b",
- "F\u0129i Gwahlle",
- "F\u0129i Yuru"
- ],
- "SHORTDAY": [
- "Cya",
- "Cla",
- "Czi",
- "Cko",
- "Cka",
- "Cga",
- "Cze"
- ],
- "SHORTMONTH": [
- "FLO",
- "CLA",
- "CKI",
- "FMF",
- "MAD",
- "MBI",
- "MLI",
- "MAM",
- "FDE",
- "FMU",
- "FGW",
- "FYU"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "mua",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my-mm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my-mm.js
deleted file mode 100644
index d658ac96..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my-mm.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1014\u1036\u1014\u1000\u103a",
- "\u100a\u1014\u1031"
- ],
- "DAY": [
- "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031",
- "\u1010\u1014\u1004\u103a\u1039\u101c\u102c",
- "\u1021\u1004\u103a\u1039\u1002\u102b",
- "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038",
- "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038",
- "\u101e\u1031\u102c\u1000\u103c\u102c",
- "\u1005\u1014\u1031"
- ],
- "ERANAMES": [
- "\u1001\u101b\u1005\u103a\u1010\u1031\u102c\u103a \u1019\u1015\u1031\u102b\u103a\u1019\u102e\u1000\u102c\u101c",
- "\u1001\u101b\u1005\u103a\u1010\u1031\u102c\u103a \u1015\u1031\u102b\u103a\u1011\u103d\u1014\u103a\u1038\u1015\u103c\u102e\u1038\u1000\u102c\u101c"
- ],
- "ERAS": [
- "\u1018\u102e\u1005\u102e",
- "\u1021\u1031\u1012\u102e"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e",
- "\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e",
- "\u1019\u1010\u103a",
- "\u1027\u1015\u103c\u102e",
- "\u1019\u1031",
- "\u1007\u103d\u1014\u103a",
- "\u1007\u1030\u101c\u102d\u102f\u1004\u103a",
- "\u1029\u1002\u102f\u1010\u103a",
- "\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c",
- "\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c",
- "\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c",
- "\u1012\u102e\u1007\u1004\u103a\u1018\u102c"
- ],
- "SHORTDAY": [
- "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031",
- "\u1010\u1014\u1004\u103a\u1039\u101c\u102c",
- "\u1021\u1004\u103a\u1039\u1002\u102b",
- "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038",
- "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038",
- "\u101e\u1031\u102c\u1000\u103c\u102c",
- "\u1005\u1014\u1031"
- ],
- "SHORTMONTH": [
- "\u1007\u1014\u103a",
- "\u1016\u1031",
- "\u1019\u1010\u103a",
- "\u1027\u1015\u103c\u102e",
- "\u1019\u1031",
- "\u1007\u103d\u1014\u103a",
- "\u1007\u1030",
- "\u1029",
- "\u1005\u1000\u103a",
- "\u1021\u1031\u102c\u1000\u103a",
- "\u1014\u102d\u102f",
- "\u1012\u102e"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u104a dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "K",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "my-mm",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my.js
deleted file mode 100644
index 7a6c02b4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_my.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1014\u1036\u1014\u1000\u103a",
- "\u100a\u1014\u1031"
- ],
- "DAY": [
- "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031",
- "\u1010\u1014\u1004\u103a\u1039\u101c\u102c",
- "\u1021\u1004\u103a\u1039\u1002\u102b",
- "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038",
- "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038",
- "\u101e\u1031\u102c\u1000\u103c\u102c",
- "\u1005\u1014\u1031"
- ],
- "ERANAMES": [
- "\u1001\u101b\u1005\u103a\u1010\u1031\u102c\u103a \u1019\u1015\u1031\u102b\u103a\u1019\u102e\u1000\u102c\u101c",
- "\u1001\u101b\u1005\u103a\u1010\u1031\u102c\u103a \u1015\u1031\u102b\u103a\u1011\u103d\u1014\u103a\u1038\u1015\u103c\u102e\u1038\u1000\u102c\u101c"
- ],
- "ERAS": [
- "\u1018\u102e\u1005\u102e",
- "\u1021\u1031\u1012\u102e"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u1007\u1014\u103a\u1014\u101d\u102b\u101b\u102e",
- "\u1016\u1031\u1016\u1031\u102c\u103a\u101d\u102b\u101b\u102e",
- "\u1019\u1010\u103a",
- "\u1027\u1015\u103c\u102e",
- "\u1019\u1031",
- "\u1007\u103d\u1014\u103a",
- "\u1007\u1030\u101c\u102d\u102f\u1004\u103a",
- "\u1029\u1002\u102f\u1010\u103a",
- "\u1005\u1000\u103a\u1010\u1004\u103a\u1018\u102c",
- "\u1021\u1031\u102c\u1000\u103a\u1010\u102d\u102f\u1018\u102c",
- "\u1014\u102d\u102f\u101d\u1004\u103a\u1018\u102c",
- "\u1012\u102e\u1007\u1004\u103a\u1018\u102c"
- ],
- "SHORTDAY": [
- "\u1010\u1014\u1004\u103a\u1039\u1002\u1014\u103d\u1031",
- "\u1010\u1014\u1004\u103a\u1039\u101c\u102c",
- "\u1021\u1004\u103a\u1039\u1002\u102b",
- "\u1017\u102f\u1012\u1039\u1013\u101f\u1030\u1038",
- "\u1000\u103c\u102c\u101e\u1015\u1010\u1031\u1038",
- "\u101e\u1031\u102c\u1000\u103c\u102c",
- "\u1005\u1014\u1031"
- ],
- "SHORTMONTH": [
- "\u1007\u1014\u103a",
- "\u1016\u1031",
- "\u1019\u1010\u103a",
- "\u1027\u1015\u103c\u102e",
- "\u1019\u1031",
- "\u1007\u103d\u1014\u103a",
- "\u1007\u1030",
- "\u1029",
- "\u1005\u1000\u103a",
- "\u1021\u1031\u102c\u1000\u103a",
- "\u1014\u102d\u102f",
- "\u1012\u102e"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u104a dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "K",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "my",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq-na.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq-na.js
deleted file mode 100644
index 699ab621..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq-na.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u01c1goagas",
- "\u01c3uias"
- ],
- "DAY": [
- "Sontaxtsees",
- "Mantaxtsees",
- "Denstaxtsees",
- "Wunstaxtsees",
- "Dondertaxtsees",
- "Fraitaxtsees",
- "Satertaxtsees"
- ],
- "ERANAMES": [
- "Xristub ai\u01c3\u00e2",
- "Xristub khao\u01c3g\u00e2"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u01c3Khanni",
- "\u01c3Khan\u01c0g\u00f4ab",
- "\u01c0Khuu\u01c1kh\u00e2b",
- "\u01c3H\u00f4a\u01c2khaib",
- "\u01c3Khaits\u00e2b",
- "Gama\u01c0aeb",
- "\u01c2Khoesaob",
- "Ao\u01c1khuum\u00fb\u01c1kh\u00e2b",
- "Tara\u01c0khuum\u00fb\u01c1kh\u00e2b",
- "\u01c2N\u00fb\u01c1n\u00e2iseb",
- "\u01c0Hoo\u01c2gaeb",
- "H\u00f4asore\u01c1kh\u00e2b"
- ],
- "SHORTDAY": [
- "Son",
- "Ma",
- "De",
- "Wu",
- "Do",
- "Fr",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "naq-na",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq.js
deleted file mode 100644
index 3c376cdb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_naq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u01c1goagas",
- "\u01c3uias"
- ],
- "DAY": [
- "Sontaxtsees",
- "Mantaxtsees",
- "Denstaxtsees",
- "Wunstaxtsees",
- "Dondertaxtsees",
- "Fraitaxtsees",
- "Satertaxtsees"
- ],
- "ERANAMES": [
- "Xristub ai\u01c3\u00e2",
- "Xristub khao\u01c3g\u00e2"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u01c3Khanni",
- "\u01c3Khan\u01c0g\u00f4ab",
- "\u01c0Khuu\u01c1kh\u00e2b",
- "\u01c3H\u00f4a\u01c2khaib",
- "\u01c3Khaits\u00e2b",
- "Gama\u01c0aeb",
- "\u01c2Khoesaob",
- "Ao\u01c1khuum\u00fb\u01c1kh\u00e2b",
- "Tara\u01c0khuum\u00fb\u01c1kh\u00e2b",
- "\u01c2N\u00fb\u01c1n\u00e2iseb",
- "\u01c0Hoo\u01c2gaeb",
- "H\u00f4asore\u01c1kh\u00e2b"
- ],
- "SHORTDAY": [
- "Son",
- "Ma",
- "De",
- "Wu",
- "Do",
- "Fr",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "naq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-no.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-no.js
deleted file mode 100644
index 931bf639..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-no.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd.MM.y HH.mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nb-no",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-sj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-sj.js
deleted file mode 100644
index 487815bf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb-sj.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd.MM.y HH.mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nb-sj",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb.js
deleted file mode 100644
index 61106d82..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nb.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd.MM.y HH.mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nb",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd-zw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd-zw.js
deleted file mode 100644
index b9ac5814..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd-zw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sonto",
- "Mvulo",
- "Sibili",
- "Sithathu",
- "Sine",
- "Sihlanu",
- "Mgqibelo"
- ],
- "ERANAMES": [
- "UKristo angakabuyi",
- "Ukristo ebuyile"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Zibandlela",
- "Nhlolanja",
- "Mbimbitho",
- "Mabasa",
- "Nkwenkwezi",
- "Nhlangula",
- "Ntulikazi",
- "Ncwabakazi",
- "Mpandula",
- "Mfumfu",
- "Lwezi",
- "Mpalakazi"
- ],
- "SHORTDAY": [
- "Son",
- "Mvu",
- "Sib",
- "Sit",
- "Sin",
- "Sih",
- "Mgq"
- ],
- "SHORTMONTH": [
- "Zib",
- "Nhlo",
- "Mbi",
- "Mab",
- "Nkw",
- "Nhla",
- "Ntu",
- "Ncw",
- "Mpan",
- "Mfu",
- "Lwe",
- "Mpal"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nd-zw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd.js
deleted file mode 100644
index 96d113bd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sonto",
- "Mvulo",
- "Sibili",
- "Sithathu",
- "Sine",
- "Sihlanu",
- "Mgqibelo"
- ],
- "ERANAMES": [
- "UKristo angakabuyi",
- "Ukristo ebuyile"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Zibandlela",
- "Nhlolanja",
- "Mbimbitho",
- "Mabasa",
- "Nkwenkwezi",
- "Nhlangula",
- "Ntulikazi",
- "Ncwabakazi",
- "Mpandula",
- "Mfumfu",
- "Lwezi",
- "Mpalakazi"
- ],
- "SHORTDAY": [
- "Son",
- "Mvu",
- "Sib",
- "Sit",
- "Sin",
- "Sih",
- "Mgq"
- ],
- "SHORTMONTH": [
- "Zib",
- "Nhlo",
- "Mbi",
- "Mab",
- "Nkw",
- "Nhla",
- "Ntu",
- "Ncw",
- "Mpan",
- "Mfu",
- "Lwe",
- "Mpal"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-in.js
deleted file mode 100644
index 283c8ca2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928",
- "\u0905\u092a\u0930\u093e\u0939\u094d\u0928"
- ],
- "DAY": [
- "\u0906\u0907\u0924\u092c\u093e\u0930",
- "\u0938\u094b\u092e\u092c\u093e\u0930",
- "\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930",
- "\u092c\u0941\u0927\u092c\u093e\u0930",
- "\u092c\u093f\u0939\u093f\u092c\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930",
- "\u0936\u0928\u093f\u092c\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928\u094d"
- ],
- "ERAS": [
- "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928\u094d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0908",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930",
- "\u0905\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0906\u0907\u0924",
- "\u0938\u094b\u092e",
- "\u092e\u0919\u094d\u0917\u0932",
- "\u092c\u0941\u0927",
- "\u092c\u093f\u0939\u0940",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930",
- "\u0905\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ne-in",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-np.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-np.js
deleted file mode 100644
index d8e52d08..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne-np.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928",
- "\u0905\u092a\u0930\u093e\u0939\u094d\u0928"
- ],
- "DAY": [
- "\u0906\u0907\u0924\u092c\u093e\u0930",
- "\u0938\u094b\u092e\u092c\u093e\u0930",
- "\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930",
- "\u092c\u0941\u0927\u092c\u093e\u0930",
- "\u092c\u093f\u0939\u093f\u092c\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930",
- "\u0936\u0928\u093f\u092c\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928\u094d"
- ],
- "ERAS": [
- "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928\u094d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0908",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930",
- "\u0905\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0906\u0907\u0924",
- "\u0938\u094b\u092e",
- "\u092e\u0919\u094d\u0917\u0932",
- "\u092c\u0941\u0927",
- "\u092c\u093f\u0939\u0940",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930",
- "\u0905\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ne-np",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne.js
deleted file mode 100644
index cff99fec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ne.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u092a\u0942\u0930\u094d\u0935\u093e\u0939\u094d\u0928",
- "\u0905\u092a\u0930\u093e\u0939\u094d\u0928"
- ],
- "DAY": [
- "\u0906\u0907\u0924\u092c\u093e\u0930",
- "\u0938\u094b\u092e\u092c\u093e\u0930",
- "\u092e\u0919\u094d\u0917\u0932\u092c\u093e\u0930",
- "\u092c\u0941\u0927\u092c\u093e\u0930",
- "\u092c\u093f\u0939\u093f\u092c\u093e\u0930",
- "\u0936\u0941\u0915\u094d\u0930\u092c\u093e\u0930",
- "\u0936\u0928\u093f\u092c\u093e\u0930"
- ],
- "ERANAMES": [
- "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928\u094d"
- ],
- "ERAS": [
- "\u0908\u0938\u093e \u092a\u0942\u0930\u094d\u0935",
- "\u0938\u0928\u094d"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0908",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930",
- "\u0905\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930"
- ],
- "SHORTDAY": [
- "\u0906\u0907\u0924",
- "\u0938\u094b\u092e",
- "\u092e\u0919\u094d\u0917\u0932",
- "\u092c\u0941\u0927",
- "\u092c\u093f\u0939\u0940",
- "\u0936\u0941\u0915\u094d\u0930",
- "\u0936\u0928\u093f"
- ],
- "SHORTMONTH": [
- "\u091c\u0928\u0935\u0930\u0940",
- "\u092b\u0947\u092c\u094d\u0930\u0941\u0905\u0930\u0940",
- "\u092e\u093e\u0930\u094d\u091a",
- "\u0905\u092a\u094d\u0930\u093f\u0932",
- "\u092e\u0947",
- "\u091c\u0941\u0928",
- "\u091c\u0941\u0932\u093e\u0908",
- "\u0905\u0917\u0938\u094d\u091f",
- "\u0938\u0947\u092a\u094d\u091f\u0947\u092e\u094d\u092c\u0930",
- "\u0905\u0915\u094d\u091f\u094b\u092c\u0930",
- "\u0928\u094b\u092d\u0947\u092e\u094d\u092c\u0930",
- "\u0921\u093f\u0938\u0947\u092e\u094d\u092c\u0930"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ne",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-aw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-aw.js
deleted file mode 100644
index 3e22477d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-aw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Afl.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl-aw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-be.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-be.js
deleted file mode 100644
index 38ba3ab8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-be.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/MM/yy HH:mm",
- "shortDate": "d/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "nl-be",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-bq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-bq.js
deleted file mode 100644
index 87c008a2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-bq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl-bq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-cw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-cw.js
deleted file mode 100644
index 7475f6ed..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-cw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "NAf.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl-cw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-nl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-nl.js
deleted file mode 100644
index 3b7bd150..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-nl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl-nl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sr.js
deleted file mode 100644
index 06875a81..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl-sr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sx.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sx.js
deleted file mode 100644
index c59dfb5a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl-sx.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "NAf.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl-sx",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl.js
deleted file mode 100644
index 79428d98..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "zondag",
- "maandag",
- "dinsdag",
- "woensdag",
- "donderdag",
- "vrijdag",
- "zaterdag"
- ],
- "ERANAMES": [
- "voor Christus",
- "na Christus"
- ],
- "ERAS": [
- "v.Chr.",
- "n.Chr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "maart",
- "april",
- "mei",
- "juni",
- "juli",
- "augustus",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "zo",
- "ma",
- "di",
- "wo",
- "do",
- "vr",
- "za"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mrt.",
- "apr.",
- "mei",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg-cm.js
deleted file mode 100644
index 24594190..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "man\u00e1",
- "kug\u00fa"
- ],
- "DAY": [
- "s\u0254\u0301nd\u0254",
- "m\u0254\u0301nd\u0254",
- "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1ba",
- "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1lal",
- "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1na",
- "mab\u00e1g\u00e1 m\u00e1 sukul",
- "s\u00e1sadi"
- ],
- "ERANAMES": [
- "B\u00f3 Lahl\u025b\u0304",
- "Pfi\u025b Bur\u012b"
- ],
- "ERAS": [
- "BL",
- "PB"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ngw\u025bn mat\u00e1hra",
- "ngw\u025bn \u0144mba",
- "ngw\u025bn \u0144lal",
- "ngw\u025bn \u0144na",
- "ngw\u025bn \u0144tan",
- "ngw\u025bn \u0144tu\u00f3",
- "ngw\u025bn h\u025bmbu\u025br\u00ed",
- "ngw\u025bn l\u0254mbi",
- "ngw\u025bn r\u025bbvu\u00e2",
- "ngw\u025bn wum",
- "ngw\u025bn wum nav\u01d4r",
- "kr\u00edsimin"
- ],
- "SHORTDAY": [
- "s\u0254\u0301n",
- "m\u0254\u0301n",
- "smb",
- "sml",
- "smn",
- "mbs",
- "sas"
- ],
- "SHORTMONTH": [
- "ng1",
- "ng2",
- "ng3",
- "ng4",
- "ng5",
- "ng6",
- "ng7",
- "ng8",
- "ng9",
- "ng10",
- "ng11",
- "kris"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "nmg-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg.js
deleted file mode 100644
index 98f5073e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nmg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "man\u00e1",
- "kug\u00fa"
- ],
- "DAY": [
- "s\u0254\u0301nd\u0254",
- "m\u0254\u0301nd\u0254",
- "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1ba",
- "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1lal",
- "s\u0254\u0301nd\u0254 maf\u00fa m\u00e1na",
- "mab\u00e1g\u00e1 m\u00e1 sukul",
- "s\u00e1sadi"
- ],
- "ERANAMES": [
- "B\u00f3 Lahl\u025b\u0304",
- "Pfi\u025b Bur\u012b"
- ],
- "ERAS": [
- "BL",
- "PB"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ngw\u025bn mat\u00e1hra",
- "ngw\u025bn \u0144mba",
- "ngw\u025bn \u0144lal",
- "ngw\u025bn \u0144na",
- "ngw\u025bn \u0144tan",
- "ngw\u025bn \u0144tu\u00f3",
- "ngw\u025bn h\u025bmbu\u025br\u00ed",
- "ngw\u025bn l\u0254mbi",
- "ngw\u025bn r\u025bbvu\u00e2",
- "ngw\u025bn wum",
- "ngw\u025bn wum nav\u01d4r",
- "kr\u00edsimin"
- ],
- "SHORTDAY": [
- "s\u0254\u0301n",
- "m\u0254\u0301n",
- "smb",
- "sml",
- "smn",
- "mbs",
- "sas"
- ],
- "SHORTMONTH": [
- "ng1",
- "ng2",
- "ng3",
- "ng4",
- "ng5",
- "ng6",
- "ng7",
- "ng8",
- "ng9",
- "ng10",
- "ng11",
- "kris"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "nmg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn-no.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn-no.js
deleted file mode 100644
index c303718b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn-no.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "formiddag",
- "ettermiddag"
- ],
- "DAY": [
- "s\u00f8ndag",
- "m\u00e5ndag",
- "tysdag",
- "onsdag",
- "torsdag",
- "fredag",
- "laurdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8.",
- "m\u00e5.",
- "ty.",
- "on.",
- "to.",
- "fr.",
- "la."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mars",
- "apr.",
- "mai",
- "juni",
- "juli",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "nn-no",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn.js
deleted file mode 100644
index 6d2f0370..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "formiddag",
- "ettermiddag"
- ],
- "DAY": [
- "s\u00f8ndag",
- "m\u00e5ndag",
- "tysdag",
- "onsdag",
- "torsdag",
- "fredag",
- "laurdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8.",
- "m\u00e5.",
- "ty.",
- "on.",
- "to.",
- "fr.",
- "la."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mars",
- "apr.",
- "mai",
- "juni",
- "juli",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "nn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh-cm.js
deleted file mode 100644
index 92eef3bf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "mba\u02bc\u00e1mba\u02bc",
- "ncw\u00f2nz\u00e9m"
- ],
- "DAY": [
- "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8",
- "mvf\u00f2 ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc",
- "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc",
- "m\u00e0ga ly\u025b\u030c\u02bc"
- ],
- "ERANAMES": [
- "m\u00e9 zy\u00e9 Y\u011bs\u00f4",
- "m\u00e9 g\u00ffo \u0144zy\u00e9 Y\u011bs\u00f4"
- ],
- "ERAS": [
- "m.z.Y.",
- "m.g.n.Y."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sa\u014b tsets\u025b\u0300\u025b l\u00f9m",
- "sa\u014b k\u00e0g ngw\u00f3\u014b",
- "sa\u014b lepy\u00e8 sh\u00fam",
- "sa\u014b c\u00ff\u00f3",
- "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3",
- "sa\u014b nj\u00ffol\u00e1\u02bc",
- "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300",
- "sa\u014b mb\u0289\u0300\u014b",
- "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b",
- "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc",
- "sa\u014b mejwo\u014b\u00f3",
- "sa\u014b l\u00f9m"
- ],
- "SHORTDAY": [
- "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8",
- "mvf\u00f2 ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc",
- "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc",
- "m\u00e0ga ly\u025b\u030c\u02bc"
- ],
- "SHORTMONTH": [
- "sa\u014b tsets\u025b\u0300\u025b l\u00f9m",
- "sa\u014b k\u00e0g ngw\u00f3\u014b",
- "sa\u014b lepy\u00e8 sh\u00fam",
- "sa\u014b c\u00ff\u00f3",
- "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3",
- "sa\u014b nj\u00ffol\u00e1\u02bc",
- "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300",
- "sa\u014b mb\u0289\u0300\u014b",
- "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b",
- "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc",
- "sa\u014b mejwo\u014b\u00f3",
- "sa\u014b l\u00f9m"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE , 'ly\u025b'\u030c\u02bc d 'na' MMMM, y",
- "longDate": "'ly\u025b'\u030c\u02bc d 'na' MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nnh-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh.js
deleted file mode 100644
index b8745d19..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nnh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "mba\u02bc\u00e1mba\u02bc",
- "ncw\u00f2nz\u00e9m"
- ],
- "DAY": [
- "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8",
- "mvf\u00f2 ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc",
- "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc",
- "m\u00e0ga ly\u025b\u030c\u02bc"
- ],
- "ERANAMES": [
- "m\u00e9 zy\u00e9 Y\u011bs\u00f4",
- "m\u00e9 g\u00ffo \u0144zy\u00e9 Y\u011bs\u00f4"
- ],
- "ERAS": [
- "m.z.Y.",
- "m.g.n.Y."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "sa\u014b tsets\u025b\u0300\u025b l\u00f9m",
- "sa\u014b k\u00e0g ngw\u00f3\u014b",
- "sa\u014b lepy\u00e8 sh\u00fam",
- "sa\u014b c\u00ff\u00f3",
- "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3",
- "sa\u014b nj\u00ffol\u00e1\u02bc",
- "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300",
- "sa\u014b mb\u0289\u0300\u014b",
- "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b",
- "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc",
- "sa\u014b mejwo\u014b\u00f3",
- "sa\u014b l\u00f9m"
- ],
- "SHORTDAY": [
- "ly\u025b\u02bc\u025b\u0301 s\u1e85\u00ed\u014bt\u00e8",
- "mvf\u00f2 ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 mvf\u00f2 ly\u025b\u030c\u02bc",
- "ts\u00e8ts\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mb\u0254\u0301\u0254nt\u00e8 tsets\u025b\u0300\u025b ly\u025b\u030c\u02bc",
- "mvf\u00f2 m\u00e0ga ly\u025b\u030c\u02bc",
- "m\u00e0ga ly\u025b\u030c\u02bc"
- ],
- "SHORTMONTH": [
- "sa\u014b tsets\u025b\u0300\u025b l\u00f9m",
- "sa\u014b k\u00e0g ngw\u00f3\u014b",
- "sa\u014b lepy\u00e8 sh\u00fam",
- "sa\u014b c\u00ff\u00f3",
- "sa\u014b ts\u025b\u0300\u025b c\u00ff\u00f3",
- "sa\u014b nj\u00ffol\u00e1\u02bc",
- "sa\u014b ty\u025b\u0300b ty\u025b\u0300b mb\u0289\u0300",
- "sa\u014b mb\u0289\u0300\u014b",
- "sa\u014b ngw\u0254\u0300\u02bc mb\u00ff\u025b",
- "sa\u014b t\u00e0\u014ba tsets\u00e1\u02bc",
- "sa\u014b mejwo\u014b\u00f3",
- "sa\u014b l\u00f9m"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE , 'ly\u025b'\u030c\u02bc d 'na' MMMM, y",
- "longDate": "'ly\u025b'\u030c\u02bc d 'na' MMMM, y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "nnh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no-no.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no-no.js
deleted file mode 100644
index dc93791c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no-no.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd.MM.y HH.mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "no-no",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no.js
deleted file mode 100644
index b0b2fec1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_no.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "s\u00f8ndag",
- "mandag",
- "tirsdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f8rdag"
- ],
- "ERANAMES": [
- "f.Kr.",
- "e.Kr."
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mars",
- "april",
- "mai",
- "juni",
- "juli",
- "august",
- "september",
- "oktober",
- "november",
- "desember"
- ],
- "SHORTDAY": [
- "s\u00f8n.",
- "man.",
- "tir.",
- "ons.",
- "tor.",
- "fre.",
- "l\u00f8r."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "jun.",
- "jul.",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "des."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH.mm.ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH.mm.ss",
- "short": "dd.MM.y HH.mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "no",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr-za.js
deleted file mode 100644
index 60a2745f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "uSonto",
- "uMvulo",
- "uLesibili",
- "Lesithathu",
- "uLesine",
- "ngoLesihlanu",
- "umGqibelo"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Janabari",
- "uFeberbari",
- "uMatjhi",
- "u-Apreli",
- "Meyi",
- "Juni",
- "Julayi",
- "Arhostosi",
- "Septemba",
- "Oktoba",
- "Usinyikhaba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Son",
- "Mvu",
- "Bil",
- "Tha",
- "Ne",
- "Hla",
- "Gqi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mat",
- "Apr",
- "Mey",
- "Jun",
- "Jul",
- "Arh",
- "Sep",
- "Okt",
- "Usi",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nr-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr.js
deleted file mode 100644
index daa76c0a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "uSonto",
- "uMvulo",
- "uLesibili",
- "Lesithathu",
- "uLesine",
- "ngoLesihlanu",
- "umGqibelo"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Janabari",
- "uFeberbari",
- "uMatjhi",
- "u-Apreli",
- "Meyi",
- "Juni",
- "Julayi",
- "Arhostosi",
- "Septemba",
- "Oktoba",
- "Usinyikhaba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Son",
- "Mvu",
- "Bil",
- "Tha",
- "Ne",
- "Hla",
- "Gqi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mat",
- "Apr",
- "Mey",
- "Jun",
- "Jul",
- "Arh",
- "Sep",
- "Okt",
- "Usi",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso-za.js
deleted file mode 100644
index 493ec38e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sontaga",
- "Mosupalogo",
- "Labobedi",
- "Laboraro",
- "Labone",
- "Labohlano",
- "Mokibelo"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Janaware",
- "Feberware",
- "Mat\u0161he",
- "Aporele",
- "Mei",
- "June",
- "Julae",
- "Agostose",
- "Setemere",
- "Oktobore",
- "Nofemere",
- "Disemere"
- ],
- "SHORTDAY": [
- "Son",
- "Mos",
- "Bed",
- "Rar",
- "Ne",
- "Hla",
- "Mok"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mat",
- "Apo",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Set",
- "Okt",
- "Nof",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nso-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso.js
deleted file mode 100644
index 50d5663a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nso.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sontaga",
- "Mosupalogo",
- "Labobedi",
- "Laboraro",
- "Labone",
- "Labohlano",
- "Mokibelo"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Janaware",
- "Feberware",
- "Mat\u0161he",
- "Aporele",
- "Mei",
- "June",
- "Julae",
- "Agostose",
- "Setemere",
- "Oktobore",
- "Nofemere",
- "Disemere"
- ],
- "SHORTDAY": [
- "Son",
- "Mos",
- "Bed",
- "Rar",
- "Ne",
- "Hla",
- "Mok"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mat",
- "Apo",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Set",
- "Okt",
- "Nof",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nso",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus-sd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus-sd.js
deleted file mode 100644
index a46aee48..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus-sd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "RW",
- "T\u014a"
- ],
- "DAY": [
- "C\u00e4\u014b ku\u0254th",
- "Jiec la\u0331t",
- "R\u025bw l\u00e4tni",
- "Di\u0254\u0331k l\u00e4tni",
- "\u014auaan l\u00e4tni",
- "Dhieec l\u00e4tni",
- "B\u00e4k\u025bl l\u00e4tni"
- ],
- "ERANAMES": [
- "A ka\u0331n Yecu ni dap",
- "\u0190 ca Yecu dap"
- ],
- "ERAS": [
- "AY",
- "\u0190Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Tiop thar p\u025bt",
- "P\u025bt",
- "Du\u0254\u0331\u0254\u0331\u014b",
- "Guak",
- "Du\u00e4t",
- "Kornyoot",
- "Pay yie\u0331tni",
- "Tho\u0331o\u0331r",
- "T\u025b\u025br",
- "Laath",
- "Kur",
- "Tio\u0331p in di\u0331i\u0331t"
- ],
- "SHORTDAY": [
- "C\u00e4\u014b",
- "Jiec",
- "R\u025bw",
- "Di\u0254\u0331k",
- "\u014auaan",
- "Dhieec",
- "B\u00e4k\u025bl"
- ],
- "SHORTMONTH": [
- "Tiop",
- "P\u025bt",
- "Du\u0254\u0331\u0254\u0331",
- "Guak",
- "Du\u00e4",
- "Kor",
- "Pay",
- "Thoo",
- "T\u025b\u025b",
- "Laa",
- "Kur",
- "Tid"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/y h:mm a",
- "shortDate": "d/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SDG",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nus-sd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus.js
deleted file mode 100644
index 8d201498..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nus.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "RW",
- "T\u014a"
- ],
- "DAY": [
- "C\u00e4\u014b ku\u0254th",
- "Jiec la\u0331t",
- "R\u025bw l\u00e4tni",
- "Di\u0254\u0331k l\u00e4tni",
- "\u014auaan l\u00e4tni",
- "Dhieec l\u00e4tni",
- "B\u00e4k\u025bl l\u00e4tni"
- ],
- "ERANAMES": [
- "A ka\u0331n Yecu ni dap",
- "\u0190 ca Yecu dap"
- ],
- "ERAS": [
- "AY",
- "\u0190Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Tiop thar p\u025bt",
- "P\u025bt",
- "Du\u0254\u0331\u0254\u0331\u014b",
- "Guak",
- "Du\u00e4t",
- "Kornyoot",
- "Pay yie\u0331tni",
- "Tho\u0331o\u0331r",
- "T\u025b\u025br",
- "Laath",
- "Kur",
- "Tio\u0331p in di\u0331i\u0331t"
- ],
- "SHORTDAY": [
- "C\u00e4\u014b",
- "Jiec",
- "R\u025bw",
- "Di\u0254\u0331k",
- "\u014auaan",
- "Dhieec",
- "B\u00e4k\u025bl"
- ],
- "SHORTMONTH": [
- "Tiop",
- "P\u025bt",
- "Du\u0254\u0331\u0254\u0331",
- "Guak",
- "Du\u00e4",
- "Kor",
- "Pay",
- "Thoo",
- "T\u025b\u025b",
- "Laa",
- "Kur",
- "Tid"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/MM/y h:mm a",
- "shortDate": "d/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SDG",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nus",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn-ug.js
deleted file mode 100644
index bc15a7dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sande",
- "Orwokubanza",
- "Orwakabiri",
- "Orwakashatu",
- "Orwakana",
- "Orwakataano",
- "Orwamukaaga"
- ],
- "ERANAMES": [
- "Kurisito Atakaijire",
- "Kurisito Yaijire"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Okwokubanza",
- "Okwakabiri",
- "Okwakashatu",
- "Okwakana",
- "Okwakataana",
- "Okwamukaaga",
- "Okwamushanju",
- "Okwamunaana",
- "Okwamwenda",
- "Okwaikumi",
- "Okwaikumi na kumwe",
- "Okwaikumi na ibiri"
- ],
- "SHORTDAY": [
- "SAN",
- "ORK",
- "OKB",
- "OKS",
- "OKN",
- "OKT",
- "OMK"
- ],
- "SHORTMONTH": [
- "KBZ",
- "KBR",
- "KST",
- "KKN",
- "KTN",
- "KMK",
- "KMS",
- "KMN",
- "KMW",
- "KKM",
- "KNK",
- "KNB"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nyn-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn.js
deleted file mode 100644
index ecc65b9b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_nyn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sande",
- "Orwokubanza",
- "Orwakabiri",
- "Orwakashatu",
- "Orwakana",
- "Orwakataano",
- "Orwamukaaga"
- ],
- "ERANAMES": [
- "Kurisito Atakaijire",
- "Kurisito Yaijire"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Okwokubanza",
- "Okwakabiri",
- "Okwakashatu",
- "Okwakana",
- "Okwakataana",
- "Okwamukaaga",
- "Okwamushanju",
- "Okwamunaana",
- "Okwamwenda",
- "Okwaikumi",
- "Okwaikumi na kumwe",
- "Okwaikumi na ibiri"
- ],
- "SHORTDAY": [
- "SAN",
- "ORK",
- "OKB",
- "OKS",
- "OKN",
- "OKT",
- "OMK"
- ],
- "SHORTMONTH": [
- "KBZ",
- "KBR",
- "KST",
- "KKN",
- "KTN",
- "KMK",
- "KMS",
- "KMN",
- "KMW",
- "KKM",
- "KNK",
- "KNB"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "nyn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-et.js
deleted file mode 100644
index 3857abd0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-et.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "WD",
- "WB"
- ],
- "DAY": [
- "Dilbata",
- "Wiixata",
- "Qibxata",
- "Roobii",
- "Kamiisa",
- "Jimaata",
- "Sanbata"
- ],
- "ERANAMES": [
- "KD",
- "KB"
- ],
- "ERAS": [
- "KD",
- "KB"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Amajjii",
- "Guraandhala",
- "Bitooteessa",
- "Elba",
- "Caamsa",
- "Waxabajjii",
- "Adooleessa",
- "Hagayya",
- "Fuulbana",
- "Onkololeessa",
- "Sadaasa",
- "Muddee"
- ],
- "SHORTDAY": [
- "Dil",
- "Wix",
- "Qib",
- "Rob",
- "Kam",
- "Jim",
- "San"
- ],
- "SHORTMONTH": [
- "Ama",
- "Gur",
- "Bit",
- "Elb",
- "Cam",
- "Wax",
- "Ado",
- "Hag",
- "Ful",
- "Onk",
- "Sad",
- "Mud"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "om-et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-ke.js
deleted file mode 100644
index dba7fd1f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "WD",
- "WB"
- ],
- "DAY": [
- "Dilbata",
- "Wiixata",
- "Qibxata",
- "Roobii",
- "Kamiisa",
- "Jimaata",
- "Sanbata"
- ],
- "ERANAMES": [
- "KD",
- "KB"
- ],
- "ERAS": [
- "KD",
- "KB"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Amajjii",
- "Guraandhala",
- "Bitooteessa",
- "Elba",
- "Caamsa",
- "Waxabajjii",
- "Adooleessa",
- "Hagayya",
- "Fuulbana",
- "Onkololeessa",
- "Sadaasa",
- "Muddee"
- ],
- "SHORTDAY": [
- "Dil",
- "Wix",
- "Qib",
- "Rob",
- "Kam",
- "Jim",
- "San"
- ],
- "SHORTMONTH": [
- "Ama",
- "Gur",
- "Bit",
- "Elb",
- "Cam",
- "Wax",
- "Ado",
- "Hag",
- "Ful",
- "Onk",
- "Sad",
- "Mud"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "om-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om.js
deleted file mode 100644
index c41c2772..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_om.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "WD",
- "WB"
- ],
- "DAY": [
- "Dilbata",
- "Wiixata",
- "Qibxata",
- "Roobii",
- "Kamiisa",
- "Jimaata",
- "Sanbata"
- ],
- "ERANAMES": [
- "KD",
- "KB"
- ],
- "ERAS": [
- "KD",
- "KB"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Amajjii",
- "Guraandhala",
- "Bitooteessa",
- "Elba",
- "Caamsa",
- "Waxabajjii",
- "Adooleessa",
- "Hagayya",
- "Fuulbana",
- "Onkololeessa",
- "Sadaasa",
- "Muddee"
- ],
- "SHORTDAY": [
- "Dil",
- "Wix",
- "Qib",
- "Rob",
- "Kam",
- "Jim",
- "San"
- ],
- "SHORTMONTH": [
- "Ama",
- "Gur",
- "Bit",
- "Elb",
- "Cam",
- "Wax",
- "Ado",
- "Hag",
- "Ful",
- "Onk",
- "Sad",
- "Mud"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "om",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or-in.js
deleted file mode 100644
index 5f1da84c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u0b30\u0b2c\u0b3f\u0b2c\u0b3e\u0b30",
- "\u0b38\u0b4b\u0b2e\u0b2c\u0b3e\u0b30",
- "\u0b2e\u0b19\u0b4d\u0b17\u0b33\u0b2c\u0b3e\u0b30",
- "\u0b2c\u0b41\u0b27\u0b2c\u0b3e\u0b30",
- "\u0b17\u0b41\u0b30\u0b41\u0b2c\u0b3e\u0b30",
- "\u0b36\u0b41\u0b15\u0b4d\u0b30\u0b2c\u0b3e\u0b30",
- "\u0b36\u0b28\u0b3f\u0b2c\u0b3e\u0b30"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40",
- "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40",
- "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a",
- "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32",
- "\u0b2e\u0b07",
- "\u0b1c\u0b41\u0b28",
- "\u0b1c\u0b41\u0b32\u0b3e\u0b07",
- "\u0b05\u0b17\u0b37\u0b4d\u0b1f",
- "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30",
- "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30"
- ],
- "SHORTDAY": [
- "\u0b30\u0b2c\u0b3f",
- "\u0b38\u0b4b\u0b2e",
- "\u0b2e\u0b19\u0b4d\u0b17\u0b33",
- "\u0b2c\u0b41\u0b27",
- "\u0b17\u0b41\u0b30\u0b41",
- "\u0b36\u0b41\u0b15\u0b4d\u0b30",
- "\u0b36\u0b28\u0b3f"
- ],
- "SHORTMONTH": [
- "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40",
- "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40",
- "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a",
- "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32",
- "\u0b2e\u0b07",
- "\u0b1c\u0b41\u0b28",
- "\u0b1c\u0b41\u0b32\u0b3e\u0b07",
- "\u0b05\u0b17\u0b37\u0b4d\u0b1f",
- "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30",
- "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "or-in",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or.js
deleted file mode 100644
index 43c4fd3a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_or.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "pm"
- ],
- "DAY": [
- "\u0b30\u0b2c\u0b3f\u0b2c\u0b3e\u0b30",
- "\u0b38\u0b4b\u0b2e\u0b2c\u0b3e\u0b30",
- "\u0b2e\u0b19\u0b4d\u0b17\u0b33\u0b2c\u0b3e\u0b30",
- "\u0b2c\u0b41\u0b27\u0b2c\u0b3e\u0b30",
- "\u0b17\u0b41\u0b30\u0b41\u0b2c\u0b3e\u0b30",
- "\u0b36\u0b41\u0b15\u0b4d\u0b30\u0b2c\u0b3e\u0b30",
- "\u0b36\u0b28\u0b3f\u0b2c\u0b3e\u0b30"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40",
- "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40",
- "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a",
- "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32",
- "\u0b2e\u0b07",
- "\u0b1c\u0b41\u0b28",
- "\u0b1c\u0b41\u0b32\u0b3e\u0b07",
- "\u0b05\u0b17\u0b37\u0b4d\u0b1f",
- "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30",
- "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30"
- ],
- "SHORTDAY": [
- "\u0b30\u0b2c\u0b3f",
- "\u0b38\u0b4b\u0b2e",
- "\u0b2e\u0b19\u0b4d\u0b17\u0b33",
- "\u0b2c\u0b41\u0b27",
- "\u0b17\u0b41\u0b30\u0b41",
- "\u0b36\u0b41\u0b15\u0b4d\u0b30",
- "\u0b36\u0b28\u0b3f"
- ],
- "SHORTMONTH": [
- "\u0b1c\u0b3e\u0b28\u0b41\u0b06\u0b30\u0b40",
- "\u0b2b\u0b47\u0b2c\u0b43\u0b06\u0b30\u0b40",
- "\u0b2e\u0b3e\u0b30\u0b4d\u0b1a\u0b4d\u0b1a",
- "\u0b05\u0b2a\u0b4d\u0b30\u0b47\u0b32",
- "\u0b2e\u0b07",
- "\u0b1c\u0b41\u0b28",
- "\u0b1c\u0b41\u0b32\u0b3e\u0b07",
- "\u0b05\u0b17\u0b37\u0b4d\u0b1f",
- "\u0b38\u0b47\u0b2a\u0b4d\u0b1f\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b05\u0b15\u0b4d\u0b1f\u0b4b\u0b2c\u0b30",
- "\u0b28\u0b2d\u0b47\u0b2e\u0b4d\u0b2c\u0b30",
- "\u0b21\u0b3f\u0b38\u0b47\u0b2e\u0b4d\u0b2c\u0b30"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "or",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ge.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ge.js
deleted file mode 100644
index 3516f726..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ge.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u04d5",
- "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0444\u04d5\u0441\u0442\u04d5"
- ],
- "DAY": [
- "\u0445\u0443\u044b\u0446\u0430\u0443\u0431\u043e\u043d",
- "\u043a\u044a\u0443\u044b\u0440\u0438\u0441\u04d5\u0440",
- "\u0434\u044b\u0446\u0446\u04d5\u0433",
- "\u04d5\u0440\u0442\u044b\u0446\u0446\u04d5\u0433",
- "\u0446\u044b\u043f\u043f\u04d5\u0440\u04d5\u043c",
- "\u043c\u0430\u0439\u0440\u04d5\u043c\u0431\u043e\u043d",
- "\u0441\u0430\u0431\u0430\u0442"
- ],
- "ERANAMES": [
- "\u043d.\u0434.\u0430.",
- "\u043d.\u0434."
- ],
- "ERAS": [
- "\u043d.\u0434.\u0430.",
- "\u043d.\u0434."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044b",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044b",
- "\u043c\u0430\u0440\u0442\u044a\u0438\u0439\u044b",
- "\u0430\u043f\u0440\u0435\u043b\u044b",
- "\u043c\u0430\u0439\u044b",
- "\u0438\u044e\u043d\u044b",
- "\u0438\u044e\u043b\u044b",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u044b",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044b",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044b",
- "\u043d\u043e\u044f\u0431\u0440\u044b",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044b"
- ],
- "SHORTDAY": [
- "\u0445\u0446\u0431",
- "\u043a\u0440\u0441",
- "\u0434\u0446\u0433",
- "\u04d5\u0440\u0442",
- "\u0446\u043f\u0440",
- "\u043c\u0440\u0431",
- "\u0441\u0431\u0442"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044b",
- "\u0438\u044e\u043b\u044b",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y '\u0430\u0437'",
- "longDate": "d MMMM, y '\u0430\u0437'",
- "medium": "dd MMM y '\u0430\u0437' HH:mm:ss",
- "mediumDate": "dd MMM y '\u0430\u0437'",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GEL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "os-ge",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ru.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ru.js
deleted file mode 100644
index d740670b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os-ru.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u04d5",
- "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0444\u04d5\u0441\u0442\u04d5"
- ],
- "DAY": [
- "\u0445\u0443\u044b\u0446\u0430\u0443\u0431\u043e\u043d",
- "\u043a\u044a\u0443\u044b\u0440\u0438\u0441\u04d5\u0440",
- "\u0434\u044b\u0446\u0446\u04d5\u0433",
- "\u04d5\u0440\u0442\u044b\u0446\u0446\u04d5\u0433",
- "\u0446\u044b\u043f\u043f\u04d5\u0440\u04d5\u043c",
- "\u043c\u0430\u0439\u0440\u04d5\u043c\u0431\u043e\u043d",
- "\u0441\u0430\u0431\u0430\u0442"
- ],
- "ERANAMES": [
- "\u043d.\u0434.\u0430.",
- "\u043d.\u0434."
- ],
- "ERAS": [
- "\u043d.\u0434.\u0430.",
- "\u043d.\u0434."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044b",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044b",
- "\u043c\u0430\u0440\u0442\u044a\u0438\u0439\u044b",
- "\u0430\u043f\u0440\u0435\u043b\u044b",
- "\u043c\u0430\u0439\u044b",
- "\u0438\u044e\u043d\u044b",
- "\u0438\u044e\u043b\u044b",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u044b",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044b",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044b",
- "\u043d\u043e\u044f\u0431\u0440\u044b",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044b"
- ],
- "SHORTDAY": [
- "\u0445\u0446\u0431",
- "\u043a\u0440\u0441",
- "\u0434\u0446\u0433",
- "\u04d5\u0440\u0442",
- "\u0446\u043f\u0440",
- "\u043c\u0440\u0431",
- "\u0441\u0431\u0442"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044b",
- "\u0438\u044e\u043b\u044b",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y '\u0430\u0437'",
- "longDate": "d MMMM, y '\u0430\u0437'",
- "medium": "dd MMM y '\u0430\u0437' HH:mm:ss",
- "mediumDate": "dd MMM y '\u0430\u0437'",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0440\u0443\u0431.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "os-ru",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os.js
deleted file mode 100644
index a643a330..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_os.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0440\u0430\u0437\u043c\u04d5",
- "\u04d5\u043c\u0431\u0438\u0441\u0431\u043e\u043d\u044b \u0444\u04d5\u0441\u0442\u04d5"
- ],
- "DAY": [
- "\u0445\u0443\u044b\u0446\u0430\u0443\u0431\u043e\u043d",
- "\u043a\u044a\u0443\u044b\u0440\u0438\u0441\u04d5\u0440",
- "\u0434\u044b\u0446\u0446\u04d5\u0433",
- "\u04d5\u0440\u0442\u044b\u0446\u0446\u04d5\u0433",
- "\u0446\u044b\u043f\u043f\u04d5\u0440\u04d5\u043c",
- "\u043c\u0430\u0439\u0440\u04d5\u043c\u0431\u043e\u043d",
- "\u0441\u0430\u0431\u0430\u0442"
- ],
- "ERANAMES": [
- "\u043d.\u0434.\u0430.",
- "\u043d.\u0434."
- ],
- "ERAS": [
- "\u043d.\u0434.\u0430.",
- "\u043d.\u0434."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044b",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044b",
- "\u043c\u0430\u0440\u0442\u044a\u0438\u0439\u044b",
- "\u0430\u043f\u0440\u0435\u043b\u044b",
- "\u043c\u0430\u0439\u044b",
- "\u0438\u044e\u043d\u044b",
- "\u0438\u044e\u043b\u044b",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u044b",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044b",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044b",
- "\u043d\u043e\u044f\u0431\u0440\u044b",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044b"
- ],
- "SHORTDAY": [
- "\u0445\u0446\u0431",
- "\u043a\u0440\u0441",
- "\u0434\u0446\u0433",
- "\u04d5\u0440\u0442",
- "\u0446\u043f\u0440",
- "\u043c\u0440\u0431",
- "\u0441\u0431\u0442"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432.",
- "\u043c\u0430\u0440.",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044b",
- "\u0438\u044e\u043b\u044b",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y '\u0430\u0437'",
- "longDate": "d MMMM, y '\u0430\u0437'",
- "medium": "dd MMM y '\u0430\u0437' HH:mm:ss",
- "mediumDate": "dd MMM y '\u0430\u0437'",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "GEL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "os",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab-pk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab-pk.js
deleted file mode 100644
index 90f60579..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab-pk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u067e\u06cc\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u064f\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "ERANAMES": [
- "\u0627\u064a\u0633\u0627\u067e\u0648\u0631\u0648",
- "\u0633\u06ba"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u067e\u06cc\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u064f\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "pa-arab-pk",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab.js
deleted file mode 100644
index 184a60c7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-arab.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u067e\u06cc\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u064f\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "ERANAMES": [
- "\u0627\u064a\u0633\u0627\u067e\u0648\u0631\u0648",
- "\u0633\u06ba"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u067e\u06cc\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u064f\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "pa-arab",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru-in.js
deleted file mode 100644
index 3572f992..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0a2a\u0a42.\u0a26\u0a41.",
- "\u0a2c\u0a3e.\u0a26\u0a41."
- ],
- "DAY": [
- "\u0a10\u0a24\u0a35\u0a3e\u0a30",
- "\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30",
- "\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30",
- "\u0a2c\u0a41\u0a71\u0a27\u0a35\u0a3e\u0a30",
- "\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30",
- "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30",
- "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30\u0a35\u0a3e\u0a30"
- ],
- "ERANAMES": [
- "\u0a08\u0a38\u0a35\u0a40 \u0a2a\u0a42\u0a30\u0a35",
- "\u0a08\u0a38\u0a35\u0a40 \u0a38\u0a70\u0a28"
- ],
- "ERAS": [
- "\u0a08. \u0a2a\u0a42.",
- "\u0a38\u0a70\u0a28"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0a1c\u0a28\u0a35\u0a30\u0a40",
- "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40",
- "\u0a2e\u0a3e\u0a30\u0a1a",
- "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32",
- "\u0a2e\u0a08",
- "\u0a1c\u0a42\u0a28",
- "\u0a1c\u0a41\u0a32\u0a3e\u0a08",
- "\u0a05\u0a17\u0a38\u0a24",
- "\u0a38\u0a24\u0a70\u0a2c\u0a30",
- "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30",
- "\u0a28\u0a35\u0a70\u0a2c\u0a30",
- "\u0a26\u0a38\u0a70\u0a2c\u0a30"
- ],
- "SHORTDAY": [
- "\u0a10\u0a24",
- "\u0a38\u0a4b\u0a2e",
- "\u0a2e\u0a70\u0a17\u0a32",
- "\u0a2c\u0a41\u0a71\u0a27",
- "\u0a35\u0a40\u0a30",
- "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30",
- "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30"
- ],
- "SHORTMONTH": [
- "\u0a1c\u0a28",
- "\u0a2b\u0a3c\u0a30",
- "\u0a2e\u0a3e\u0a30\u0a1a",
- "\u0a05\u0a2a\u0a4d\u0a30\u0a48",
- "\u0a2e\u0a08",
- "\u0a1c\u0a42\u0a28",
- "\u0a1c\u0a41\u0a32\u0a3e",
- "\u0a05\u0a17",
- "\u0a38\u0a24\u0a70",
- "\u0a05\u0a15\u0a24\u0a42",
- "\u0a28\u0a35\u0a70",
- "\u0a26\u0a38\u0a70"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "pa-guru-in",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru.js
deleted file mode 100644
index 18c8431c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa-guru.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0a2a\u0a42.\u0a26\u0a41.",
- "\u0a2c\u0a3e.\u0a26\u0a41."
- ],
- "DAY": [
- "\u0a10\u0a24\u0a35\u0a3e\u0a30",
- "\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30",
- "\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30",
- "\u0a2c\u0a41\u0a71\u0a27\u0a35\u0a3e\u0a30",
- "\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30",
- "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30",
- "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30\u0a35\u0a3e\u0a30"
- ],
- "ERANAMES": [
- "\u0a08\u0a38\u0a35\u0a40 \u0a2a\u0a42\u0a30\u0a35",
- "\u0a08\u0a38\u0a35\u0a40 \u0a38\u0a70\u0a28"
- ],
- "ERAS": [
- "\u0a08. \u0a2a\u0a42.",
- "\u0a38\u0a70\u0a28"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0a1c\u0a28\u0a35\u0a30\u0a40",
- "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40",
- "\u0a2e\u0a3e\u0a30\u0a1a",
- "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32",
- "\u0a2e\u0a08",
- "\u0a1c\u0a42\u0a28",
- "\u0a1c\u0a41\u0a32\u0a3e\u0a08",
- "\u0a05\u0a17\u0a38\u0a24",
- "\u0a38\u0a24\u0a70\u0a2c\u0a30",
- "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30",
- "\u0a28\u0a35\u0a70\u0a2c\u0a30",
- "\u0a26\u0a38\u0a70\u0a2c\u0a30"
- ],
- "SHORTDAY": [
- "\u0a10\u0a24",
- "\u0a38\u0a4b\u0a2e",
- "\u0a2e\u0a70\u0a17\u0a32",
- "\u0a2c\u0a41\u0a71\u0a27",
- "\u0a35\u0a40\u0a30",
- "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30",
- "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30"
- ],
- "SHORTMONTH": [
- "\u0a1c\u0a28",
- "\u0a2b\u0a3c\u0a30",
- "\u0a2e\u0a3e\u0a30\u0a1a",
- "\u0a05\u0a2a\u0a4d\u0a30\u0a48",
- "\u0a2e\u0a08",
- "\u0a1c\u0a42\u0a28",
- "\u0a1c\u0a41\u0a32\u0a3e",
- "\u0a05\u0a17",
- "\u0a38\u0a24\u0a70",
- "\u0a05\u0a15\u0a24\u0a42",
- "\u0a28\u0a35\u0a70",
- "\u0a26\u0a38\u0a70"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "pa-guru",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa.js
deleted file mode 100644
index 6f6dc995..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pa.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0a2a\u0a42.\u0a26\u0a41.",
- "\u0a2c\u0a3e.\u0a26\u0a41."
- ],
- "DAY": [
- "\u0a10\u0a24\u0a35\u0a3e\u0a30",
- "\u0a38\u0a4b\u0a2e\u0a35\u0a3e\u0a30",
- "\u0a2e\u0a70\u0a17\u0a32\u0a35\u0a3e\u0a30",
- "\u0a2c\u0a41\u0a71\u0a27\u0a35\u0a3e\u0a30",
- "\u0a35\u0a40\u0a30\u0a35\u0a3e\u0a30",
- "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30\u0a35\u0a3e\u0a30",
- "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30\u0a35\u0a3e\u0a30"
- ],
- "ERANAMES": [
- "\u0a08\u0a38\u0a35\u0a40 \u0a2a\u0a42\u0a30\u0a35",
- "\u0a08\u0a38\u0a35\u0a40 \u0a38\u0a70\u0a28"
- ],
- "ERAS": [
- "\u0a08. \u0a2a\u0a42.",
- "\u0a38\u0a70\u0a28"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0a1c\u0a28\u0a35\u0a30\u0a40",
- "\u0a2b\u0a3c\u0a30\u0a35\u0a30\u0a40",
- "\u0a2e\u0a3e\u0a30\u0a1a",
- "\u0a05\u0a2a\u0a4d\u0a30\u0a48\u0a32",
- "\u0a2e\u0a08",
- "\u0a1c\u0a42\u0a28",
- "\u0a1c\u0a41\u0a32\u0a3e\u0a08",
- "\u0a05\u0a17\u0a38\u0a24",
- "\u0a38\u0a24\u0a70\u0a2c\u0a30",
- "\u0a05\u0a15\u0a24\u0a42\u0a2c\u0a30",
- "\u0a28\u0a35\u0a70\u0a2c\u0a30",
- "\u0a26\u0a38\u0a70\u0a2c\u0a30"
- ],
- "SHORTDAY": [
- "\u0a10\u0a24",
- "\u0a38\u0a4b\u0a2e",
- "\u0a2e\u0a70\u0a17\u0a32",
- "\u0a2c\u0a41\u0a71\u0a27",
- "\u0a35\u0a40\u0a30",
- "\u0a38\u0a3c\u0a41\u0a71\u0a15\u0a30",
- "\u0a38\u0a3c\u0a28\u0a3f\u0a71\u0a1a\u0a30"
- ],
- "SHORTMONTH": [
- "\u0a1c\u0a28",
- "\u0a2b\u0a3c\u0a30",
- "\u0a2e\u0a3e\u0a30\u0a1a",
- "\u0a05\u0a2a\u0a4d\u0a30\u0a48",
- "\u0a2e\u0a08",
- "\u0a1c\u0a42\u0a28",
- "\u0a1c\u0a41\u0a32\u0a3e",
- "\u0a05\u0a17",
- "\u0a38\u0a24\u0a70",
- "\u0a05\u0a15\u0a24\u0a42",
- "\u0a28\u0a35\u0a70",
- "\u0a26\u0a38\u0a70"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "pa",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl-pl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl-pl.js
deleted file mode 100644
index fae20c89..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl-pl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "niedziela",
- "poniedzia\u0142ek",
- "wtorek",
- "\u015broda",
- "czwartek",
- "pi\u0105tek",
- "sobota"
- ],
- "ERANAMES": [
- "p.n.e.",
- "n.e."
- ],
- "ERAS": [
- "p.n.e.",
- "n.e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "stycznia",
- "lutego",
- "marca",
- "kwietnia",
- "maja",
- "czerwca",
- "lipca",
- "sierpnia",
- "wrze\u015bnia",
- "pa\u017adziernika",
- "listopada",
- "grudnia"
- ],
- "SHORTDAY": [
- "niedz.",
- "pon.",
- "wt.",
- "\u015br.",
- "czw.",
- "pt.",
- "sob."
- ],
- "SHORTMONTH": [
- "sty",
- "lut",
- "mar",
- "kwi",
- "maj",
- "cze",
- "lip",
- "sie",
- "wrz",
- "pa\u017a",
- "lis",
- "gru"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "z\u0142",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pl-pl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl.js
deleted file mode 100644
index a37a284f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "niedziela",
- "poniedzia\u0142ek",
- "wtorek",
- "\u015broda",
- "czwartek",
- "pi\u0105tek",
- "sobota"
- ],
- "ERANAMES": [
- "p.n.e.",
- "n.e."
- ],
- "ERAS": [
- "p.n.e.",
- "n.e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "stycznia",
- "lutego",
- "marca",
- "kwietnia",
- "maja",
- "czerwca",
- "lipca",
- "sierpnia",
- "wrze\u015bnia",
- "pa\u017adziernika",
- "listopada",
- "grudnia"
- ],
- "SHORTDAY": [
- "niedz.",
- "pon.",
- "wt.",
- "\u015br.",
- "czw.",
- "pt.",
- "sob."
- ],
- "SHORTMONTH": [
- "sty",
- "lut",
- "mar",
- "kwi",
- "maj",
- "cze",
- "lip",
- "sie",
- "wrz",
- "pa\u017a",
- "lis",
- "gru"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "dd.MM.y HH:mm:ss",
- "mediumDate": "dd.MM.y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "z\u0142",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i != 1 && i % 10 >= 0 && i % 10 <= 1 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 12 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps-af.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps-af.js
deleted file mode 100644
index d6d40775..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps-af.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u063a.\u0645.",
- "\u063a.\u0648."
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u064a",
- "\u0641\u0628\u0631\u0648\u0631\u064a",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06ab\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u064a",
- "\u0641\u0628\u0631\u0648\u0631\u064a",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06ab\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 3,
- 4
- ],
- "fullDate": "EEEE \u062f y \u062f MMMM d",
- "longDate": "\u062f y \u062f MMMM d",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Af.",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ps-af",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps.js
deleted file mode 100644
index 4bbe5111..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ps.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u063a.\u0645.",
- "\u063a.\u0648."
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u064a",
- "\u0641\u0628\u0631\u0648\u0631\u064a",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06ab\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u064a",
- "\u0641\u0628\u0631\u0648\u0631\u064a",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06ab\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 3,
- 4
- ],
- "fullDate": "EEEE \u062f y \u062f MMMM d",
- "longDate": "\u062f y \u062f MMMM d",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Af.",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ps",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-ao.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-ao.js
deleted file mode 100644
index dcc91dab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-ao.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Kz",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-ao",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-br.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-br.js
deleted file mode 100644
index 146aad33..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-br.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "Antes de Cristo",
- "Ano do Senhor"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d 'de' MMM 'de' y HH:mm:ss",
- "mediumDate": "d 'de' MMM 'de' y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "pt-br",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-cv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-cv.js
deleted file mode 100644
index d9beaa1d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-cv.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CVE",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-cv",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-gw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-gw.js
deleted file mode 100644
index 801f3e72..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-gw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-gw",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mo.js
deleted file mode 100644
index fecce7cb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mo.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MOP",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-mo",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mz.js
deleted file mode 100644
index e7450a21..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-mz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MTn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-mz",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-pt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-pt.js
deleted file mode 100644
index 6718f9dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-pt.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-pt",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-st.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-st.js
deleted file mode 100644
index a6ff9cd7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-st.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Db",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-st",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-tl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-tl.js
deleted file mode 100644
index bb36d6dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt-tl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "da manh\u00e3",
- "da tarde"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "antes de Cristo",
- "depois de Cristo"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "dd/MM/y HH:mm:ss",
- "mediumDate": "dd/MM/y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "pt-tl",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt.js
deleted file mode 100644
index 4c80611e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_pt.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "domingo",
- "segunda-feira",
- "ter\u00e7a-feira",
- "quarta-feira",
- "quinta-feira",
- "sexta-feira",
- "s\u00e1bado"
- ],
- "ERANAMES": [
- "Antes de Cristo",
- "Ano do Senhor"
- ],
- "ERAS": [
- "a.C.",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "janeiro",
- "fevereiro",
- "mar\u00e7o",
- "abril",
- "maio",
- "junho",
- "julho",
- "agosto",
- "setembro",
- "outubro",
- "novembro",
- "dezembro"
- ],
- "SHORTDAY": [
- "dom",
- "seg",
- "ter",
- "qua",
- "qui",
- "sex",
- "s\u00e1b"
- ],
- "SHORTMONTH": [
- "jan",
- "fev",
- "mar",
- "abr",
- "mai",
- "jun",
- "jul",
- "ago",
- "set",
- "out",
- "nov",
- "dez"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d 'de' MMM 'de' y HH:mm:ss",
- "mediumDate": "d 'de' MMM 'de' y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R$",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "pt",
- "pluralCat": function(n, opt_precision) { if (n >= 0 && n <= 2 && n != 2) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-bo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-bo.js
deleted file mode 100644
index cb05d91a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-bo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Domingo",
- "Lunes",
- "Martes",
- "Mi\u00e9rcoles",
- "Jueves",
- "Viernes",
- "S\u00e1bado"
- ],
- "ERANAMES": [
- "BCE",
- "d.C."
- ],
- "ERAS": [
- "BCE",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Qulla puquy",
- "Hatun puquy",
- "Pauqar waray",
- "Ayriwa",
- "Aymuray",
- "Inti raymi",
- "Anta Sitwa",
- "Qhapaq Sitwa",
- "Uma raymi",
- "Kantaray",
- "Ayamarq\u02bca",
- "Kapaq Raymi"
- ],
- "SHORTDAY": [
- "Dom",
- "Lun",
- "Mar",
- "Mi\u00e9",
- "Jue",
- "Vie",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qul",
- "Hat",
- "Pau",
- "Ayr",
- "Aym",
- "Int",
- "Ant",
- "Qha",
- "Uma",
- "Kan",
- "Aya",
- "Kap"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "y MMMM d",
- "medium": "y MMM d hh:mm:ss a",
- "mediumDate": "y MMM d",
- "mediumTime": "hh:mm:ss a",
- "short": "dd/MM/y hh:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Bs",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "qu-bo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-ec.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-ec.js
deleted file mode 100644
index 9978c4a3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-ec.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Domingo",
- "Lunes",
- "Martes",
- "Mi\u00e9rcoles",
- "Jueves",
- "Viernes",
- "S\u00e1bado"
- ],
- "ERANAMES": [
- "BCE",
- "d.C."
- ],
- "ERAS": [
- "BCE",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Qulla puquy",
- "Hatun puquy",
- "Pauqar waray",
- "Ayriwa",
- "Aymuray",
- "Inti raymi",
- "Anta Sitwa",
- "Qhapaq Sitwa",
- "Uma raymi",
- "Kantaray",
- "Ayamarq\u02bca",
- "Kapaq Raymi"
- ],
- "SHORTDAY": [
- "Dom",
- "Lun",
- "Mar",
- "Mi\u00e9",
- "Jue",
- "Vie",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qul",
- "Hat",
- "Pau",
- "Ayr",
- "Aym",
- "Int",
- "Ant",
- "Qha",
- "Uma",
- "Kan",
- "Aya",
- "Kap"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "y MMMM d",
- "medium": "y MMM d hh:mm:ss a",
- "mediumDate": "y MMM d",
- "mediumTime": "hh:mm:ss a",
- "short": "dd/MM/y hh:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "qu-ec",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-pe.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-pe.js
deleted file mode 100644
index 942275b6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu-pe.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Domingo",
- "Lunes",
- "Martes",
- "Mi\u00e9rcoles",
- "Jueves",
- "Viernes",
- "S\u00e1bado"
- ],
- "ERANAMES": [
- "BCE",
- "d.C."
- ],
- "ERAS": [
- "BCE",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Qulla puquy",
- "Hatun puquy",
- "Pauqar waray",
- "Ayriwa",
- "Aymuray",
- "Inti raymi",
- "Anta Sitwa",
- "Qhapaq Sitwa",
- "Uma raymi",
- "Kantaray",
- "Ayamarq\u02bca",
- "Kapaq Raymi"
- ],
- "SHORTDAY": [
- "Dom",
- "Lun",
- "Mar",
- "Mi\u00e9",
- "Jue",
- "Vie",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qul",
- "Hat",
- "Pau",
- "Ayr",
- "Aym",
- "Int",
- "Ant",
- "Qha",
- "Uma",
- "Kan",
- "Aya",
- "Kap"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "y MMMM d",
- "medium": "y MMM d hh:mm:ss a",
- "mediumDate": "y MMM d",
- "mediumTime": "hh:mm:ss a",
- "short": "dd/MM/y hh:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "S/.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "qu-pe",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu.js
deleted file mode 100644
index e2b56e6d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_qu.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "Domingo",
- "Lunes",
- "Martes",
- "Mi\u00e9rcoles",
- "Jueves",
- "Viernes",
- "S\u00e1bado"
- ],
- "ERANAMES": [
- "BCE",
- "d.C."
- ],
- "ERAS": [
- "BCE",
- "d.C."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Qulla puquy",
- "Hatun puquy",
- "Pauqar waray",
- "Ayriwa",
- "Aymuray",
- "Inti raymi",
- "Anta Sitwa",
- "Qhapaq Sitwa",
- "Uma raymi",
- "Kantaray",
- "Ayamarq\u02bca",
- "Kapaq Raymi"
- ],
- "SHORTDAY": [
- "Dom",
- "Lun",
- "Mar",
- "Mi\u00e9",
- "Jue",
- "Vie",
- "Sab"
- ],
- "SHORTMONTH": [
- "Qul",
- "Hat",
- "Pau",
- "Ayr",
- "Aym",
- "Int",
- "Ant",
- "Qha",
- "Uma",
- "Kan",
- "Aya",
- "Kap"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "y MMMM d",
- "medium": "y MMM d hh:mm:ss a",
- "mediumDate": "y MMM d",
- "mediumTime": "hh:mm:ss a",
- "short": "dd/MM/y hh:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "hh:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "S/.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "qu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm-ch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm-ch.js
deleted file mode 100644
index 091c0827..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm-ch.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "sm"
- ],
- "DAY": [
- "dumengia",
- "glindesdi",
- "mardi",
- "mesemna",
- "gievgia",
- "venderdi",
- "sonda"
- ],
- "ERANAMES": [
- "avant Cristus",
- "suenter Cristus"
- ],
- "ERAS": [
- "av. Cr.",
- "s. Cr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "schaner",
- "favrer",
- "mars",
- "avrigl",
- "matg",
- "zercladur",
- "fanadur",
- "avust",
- "settember",
- "october",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "du",
- "gli",
- "ma",
- "me",
- "gie",
- "ve",
- "so"
- ],
- "SHORTMONTH": [
- "schan.",
- "favr.",
- "mars",
- "avr.",
- "matg",
- "zercl.",
- "fan.",
- "avust",
- "sett.",
- "oct.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, 'ils' d 'da' MMMM y",
- "longDate": "d 'da' MMMM y",
- "medium": "dd-MM-y HH:mm:ss",
- "mediumDate": "dd-MM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "rm-ch",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm.js
deleted file mode 100644
index 7bddcf97..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "am",
- "sm"
- ],
- "DAY": [
- "dumengia",
- "glindesdi",
- "mardi",
- "mesemna",
- "gievgia",
- "venderdi",
- "sonda"
- ],
- "ERANAMES": [
- "avant Cristus",
- "suenter Cristus"
- ],
- "ERAS": [
- "av. Cr.",
- "s. Cr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "schaner",
- "favrer",
- "mars",
- "avrigl",
- "matg",
- "zercladur",
- "fanadur",
- "avust",
- "settember",
- "october",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "du",
- "gli",
- "ma",
- "me",
- "gie",
- "ve",
- "so"
- ],
- "SHORTMONTH": [
- "schan.",
- "favr.",
- "mars",
- "avr.",
- "matg",
- "zercl.",
- "fan.",
- "avust",
- "sett.",
- "oct.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, 'ils' d 'da' MMMM y",
- "longDate": "d 'da' MMMM y",
- "medium": "dd-MM-y HH:mm:ss",
- "mediumDate": "dd-MM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-yy HH:mm",
- "shortDate": "dd-MM-yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "rm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn-bi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn-bi.js
deleted file mode 100644
index cd61a1d4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn-bi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Z.MU.",
- "Z.MW."
- ],
- "DAY": [
- "Ku w\u2019indwi",
- "Ku wa mbere",
- "Ku wa kabiri",
- "Ku wa gatatu",
- "Ku wa kane",
- "Ku wa gatanu",
- "Ku wa gatandatu"
- ],
- "ERANAMES": [
- "Mbere ya Yezu",
- "Nyuma ya Yezu"
- ],
- "ERAS": [
- "Mb.Y.",
- "Ny.Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Nzero",
- "Ruhuhuma",
- "Ntwarante",
- "Ndamukiza",
- "Rusama",
- "Ruheshi",
- "Mukakaro",
- "Nyandagaro",
- "Nyakanga",
- "Gitugutu",
- "Munyonyo",
- "Kigarama"
- ],
- "SHORTDAY": [
- "cu.",
- "mbe.",
- "kab.",
- "gtu.",
- "kan.",
- "gnu.",
- "gnd."
- ],
- "SHORTMONTH": [
- "Mut.",
- "Gas.",
- "Wer.",
- "Mat.",
- "Gic.",
- "Kam.",
- "Nya.",
- "Kan.",
- "Nze.",
- "Ukw.",
- "Ugu.",
- "Uku."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FBu",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "rn-bi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn.js
deleted file mode 100644
index 0a2a5e8e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Z.MU.",
- "Z.MW."
- ],
- "DAY": [
- "Ku w\u2019indwi",
- "Ku wa mbere",
- "Ku wa kabiri",
- "Ku wa gatatu",
- "Ku wa kane",
- "Ku wa gatanu",
- "Ku wa gatandatu"
- ],
- "ERANAMES": [
- "Mbere ya Yezu",
- "Nyuma ya Yezu"
- ],
- "ERAS": [
- "Mb.Y.",
- "Ny.Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Nzero",
- "Ruhuhuma",
- "Ntwarante",
- "Ndamukiza",
- "Rusama",
- "Ruheshi",
- "Mukakaro",
- "Nyandagaro",
- "Nyakanga",
- "Gitugutu",
- "Munyonyo",
- "Kigarama"
- ],
- "SHORTDAY": [
- "cu.",
- "mbe.",
- "kab.",
- "gtu.",
- "kan.",
- "gnu.",
- "gnd."
- ],
- "SHORTMONTH": [
- "Mut.",
- "Gas.",
- "Wer.",
- "Mat.",
- "Gic.",
- "Kam.",
- "Nya.",
- "Kan.",
- "Nze.",
- "Ukw.",
- "Ugu.",
- "Uku."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FBu",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "rn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-md.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-md.js
deleted file mode 100644
index b3630470..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-md.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "duminic\u0103",
- "luni",
- "mar\u021bi",
- "miercuri",
- "joi",
- "vineri",
- "s\u00e2mb\u0103t\u0103"
- ],
- "ERANAMES": [
- "\u00eenainte de Hristos",
- "dup\u0103 Hristos"
- ],
- "ERAS": [
- "\u00ee.Hr.",
- "d.Hr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ianuarie",
- "februarie",
- "martie",
- "aprilie",
- "mai",
- "iunie",
- "iulie",
- "august",
- "septembrie",
- "octombrie",
- "noiembrie",
- "decembrie"
- ],
- "SHORTDAY": [
- "Dum",
- "Lun",
- "Mar",
- "Mie",
- "Joi",
- "Vin",
- "S\u00e2m"
- ],
- "SHORTMONTH": [
- "ian.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "iun.",
- "iul.",
- "aug.",
- "sept.",
- "oct.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MDL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ro-md",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-ro.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-ro.js
deleted file mode 100644
index d8792260..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro-ro.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "duminic\u0103",
- "luni",
- "mar\u021bi",
- "miercuri",
- "joi",
- "vineri",
- "s\u00e2mb\u0103t\u0103"
- ],
- "ERANAMES": [
- "\u00eenainte de Hristos",
- "dup\u0103 Hristos"
- ],
- "ERAS": [
- "\u00ee.Hr.",
- "d.Hr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ianuarie",
- "februarie",
- "martie",
- "aprilie",
- "mai",
- "iunie",
- "iulie",
- "august",
- "septembrie",
- "octombrie",
- "noiembrie",
- "decembrie"
- ],
- "SHORTDAY": [
- "Dum",
- "Lun",
- "Mar",
- "Mie",
- "Joi",
- "Vin",
- "S\u00e2m"
- ],
- "SHORTMONTH": [
- "ian.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "iun.",
- "iul.",
- "aug.",
- "sept.",
- "oct.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RON",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ro-ro",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro.js
deleted file mode 100644
index 3c52dd2a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ro.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "a.m.",
- "p.m."
- ],
- "DAY": [
- "duminic\u0103",
- "luni",
- "mar\u021bi",
- "miercuri",
- "joi",
- "vineri",
- "s\u00e2mb\u0103t\u0103"
- ],
- "ERANAMES": [
- "\u00eenainte de Hristos",
- "dup\u0103 Hristos"
- ],
- "ERAS": [
- "\u00ee.Hr.",
- "d.Hr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "ianuarie",
- "februarie",
- "martie",
- "aprilie",
- "mai",
- "iunie",
- "iulie",
- "august",
- "septembrie",
- "octombrie",
- "noiembrie",
- "decembrie"
- ],
- "SHORTDAY": [
- "Dum",
- "Lun",
- "Mar",
- "Mie",
- "Joi",
- "Vin",
- "S\u00e2m"
- ],
- "SHORTMONTH": [
- "ian.",
- "feb.",
- "mar.",
- "apr.",
- "mai",
- "iun.",
- "iul.",
- "aug.",
- "sept.",
- "oct.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.y HH:mm",
- "shortDate": "dd.MM.y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RON",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ro",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (vf.v != 0 || n == 0 || n != 1 && n % 100 >= 1 && n % 100 <= 19) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof-tz.js
deleted file mode 100644
index 8458d5ca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "kang\u2019ama",
- "kingoto"
- ],
- "DAY": [
- "Ijumapili",
- "Ijumatatu",
- "Ijumanne",
- "Ijumatano",
- "Alhamisi",
- "Ijumaa",
- "Ijumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Mayesu",
- "Baada ya Mayesu"
- ],
- "ERAS": [
- "KM",
- "BM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mweri wa kwanza",
- "Mweri wa kaili",
- "Mweri wa katatu",
- "Mweri wa kaana",
- "Mweri wa tanu",
- "Mweri wa sita",
- "Mweri wa saba",
- "Mweri wa nane",
- "Mweri wa tisa",
- "Mweri wa ikumi",
- "Mweri wa ikumi na moja",
- "Mweri wa ikumi na mbili"
- ],
- "SHORTDAY": [
- "Ijp",
- "Ijt",
- "Ijn",
- "Ijtn",
- "Alh",
- "Iju",
- "Ijm"
- ],
- "SHORTMONTH": [
- "M1",
- "M2",
- "M3",
- "M4",
- "M5",
- "M6",
- "M7",
- "M8",
- "M9",
- "M10",
- "M11",
- "M12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "rof-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof.js
deleted file mode 100644
index a233d6ca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rof.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "kang\u2019ama",
- "kingoto"
- ],
- "DAY": [
- "Ijumapili",
- "Ijumatatu",
- "Ijumanne",
- "Ijumatano",
- "Alhamisi",
- "Ijumaa",
- "Ijumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Mayesu",
- "Baada ya Mayesu"
- ],
- "ERAS": [
- "KM",
- "BM"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mweri wa kwanza",
- "Mweri wa kaili",
- "Mweri wa katatu",
- "Mweri wa kaana",
- "Mweri wa tanu",
- "Mweri wa sita",
- "Mweri wa saba",
- "Mweri wa nane",
- "Mweri wa tisa",
- "Mweri wa ikumi",
- "Mweri wa ikumi na moja",
- "Mweri wa ikumi na mbili"
- ],
- "SHORTDAY": [
- "Ijp",
- "Ijt",
- "Ijn",
- "Ijtn",
- "Alh",
- "Iju",
- "Ijm"
- ],
- "SHORTMONTH": [
- "M1",
- "M2",
- "M3",
- "M4",
- "M5",
- "M6",
- "M7",
- "M8",
- "M9",
- "M10",
- "M11",
- "M12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "rof",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-by.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-by.js
deleted file mode 100644
index f735266c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-by.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. H:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "BYR",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru-by",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kg.js
deleted file mode 100644
index b1d9db98..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. H:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KGS",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru-kg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kz.js
deleted file mode 100644
index a1c93672..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-kz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. H:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b8",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru-kz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-md.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-md.js
deleted file mode 100644
index de3f0498..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-md.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. H:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MDL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru-md",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ru.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ru.js
deleted file mode 100644
index e9337210..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ru.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. H:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0440\u0443\u0431.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru-ru",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ua.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ua.js
deleted file mode 100644
index f6dfc507..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru-ua.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. HH:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b4",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru-ua",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru.js
deleted file mode 100644
index 553360f0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ru.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
- "\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
- "\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
- "\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "ERAS": [
- "\u0434\u043e \u043d. \u044d.",
- "\u043d. \u044d."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u044f\u043d\u0432\u0430\u0440\u044f",
- "\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440\u0435\u043b\u044f",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
- "\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
- "\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
- "\u043d\u043e\u044f\u0431\u0440\u044f",
- "\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
- ],
- "SHORTDAY": [
- "\u0432\u0441",
- "\u043f\u043d",
- "\u0432\u0442",
- "\u0441\u0440",
- "\u0447\u0442",
- "\u043f\u0442",
- "\u0441\u0431"
- ],
- "SHORTMONTH": [
- "\u044f\u043d\u0432.",
- "\u0444\u0435\u0432\u0440.",
- "\u043c\u0430\u0440\u0442\u0430",
- "\u0430\u043f\u0440.",
- "\u043c\u0430\u044f",
- "\u0438\u044e\u043d\u044f",
- "\u0438\u044e\u043b\u044f",
- "\u0430\u0432\u0433.",
- "\u0441\u0435\u043d\u0442.",
- "\u043e\u043a\u0442.",
- "\u043d\u043e\u044f\u0431.",
- "\u0434\u0435\u043a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0433'.",
- "longDate": "d MMMM y '\u0433'.",
- "medium": "d MMM y '\u0433'. H:mm:ss",
- "mediumDate": "d MMM y '\u0433'.",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0440\u0443\u0431.",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "ru",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw-rw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw-rw.js
deleted file mode 100644
index 7e679df6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw-rw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Ku cyumweru",
- "Kuwa mbere",
- "Kuwa kabiri",
- "Kuwa gatatu",
- "Kuwa kane",
- "Kuwa gatanu",
- "Kuwa gatandatu"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mutarama",
- "Gashyantare",
- "Werurwe",
- "Mata",
- "Gicuransi",
- "Kamena",
- "Nyakanga",
- "Kanama",
- "Nzeli",
- "Ukwakira",
- "Ugushyingo",
- "Ukuboza"
- ],
- "SHORTDAY": [
- "cyu.",
- "mbe.",
- "kab.",
- "gtu.",
- "kan.",
- "gnu.",
- "gnd."
- ],
- "SHORTMONTH": [
- "mut.",
- "gas.",
- "wer.",
- "mat.",
- "gic.",
- "kam.",
- "nya.",
- "kan.",
- "nze.",
- "ukw.",
- "ugu.",
- "uku."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RF",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "rw-rw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw.js
deleted file mode 100644
index 2e5db17a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Ku cyumweru",
- "Kuwa mbere",
- "Kuwa kabiri",
- "Kuwa gatatu",
- "Kuwa kane",
- "Kuwa gatanu",
- "Kuwa gatandatu"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mutarama",
- "Gashyantare",
- "Werurwe",
- "Mata",
- "Gicuransi",
- "Kamena",
- "Nyakanga",
- "Kanama",
- "Nzeli",
- "Ukwakira",
- "Ugushyingo",
- "Ukuboza"
- ],
- "SHORTDAY": [
- "cyu.",
- "mbe.",
- "kab.",
- "gtu.",
- "kan.",
- "gnu.",
- "gnd."
- ],
- "SHORTMONTH": [
- "mut.",
- "gas.",
- "wer.",
- "mat.",
- "gic.",
- "kam.",
- "nya.",
- "kan.",
- "nze.",
- "ukw.",
- "ugu.",
- "uku."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RF",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "rw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk-tz.js
deleted file mode 100644
index 3dcb29ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "utuko",
- "kyiukonyi"
- ],
- "DAY": [
- "Jumapilyi",
- "Jumatatuu",
- "Jumanne",
- "Jumatanu",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristu",
- "Baada ya Kristu"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprilyi",
- "Mei",
- "Junyi",
- "Julyai",
- "Agusti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "rwk-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk.js
deleted file mode 100644
index 726ed59a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_rwk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "utuko",
- "kyiukonyi"
- ],
- "DAY": [
- "Jumapilyi",
- "Jumatatuu",
- "Jumanne",
- "Jumatanu",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristu",
- "Baada ya Kristu"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprilyi",
- "Mei",
- "Junyi",
- "Julyai",
- "Agusti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "rwk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah-ru.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah-ru.js
deleted file mode 100644
index 85b3776f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah-ru.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u042d\u0418",
- "\u042d\u041a"
- ],
- "DAY": [
- "\u0411\u0430\u0441\u043a\u044b\u04bb\u044b\u0430\u043d\u043d\u044c\u0430",
- "\u0411\u044d\u043d\u0438\u0434\u0438\u044d\u043b\u0438\u043d\u043d\u044c\u0438\u043a",
- "\u041e\u043f\u0442\u0443\u043e\u0440\u0443\u043d\u043d\u044c\u0443\u043a",
- "\u0421\u044d\u0440\u044d\u0434\u044d",
- "\u0427\u044d\u043f\u043f\u0438\u044d\u0440",
- "\u0411\u044d\u044d\u0442\u0438\u04a5\u0441\u044d",
- "\u0421\u0443\u0431\u0443\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0431. \u044d. \u0438.",
- "\u0431. \u044d"
- ],
- "ERAS": [
- "\u0431. \u044d. \u0438.",
- "\u0431. \u044d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0422\u043e\u0445\u0441\u0443\u043d\u043d\u044c\u0443",
- "\u041e\u043b\u0443\u043d\u043d\u044c\u0443",
- "\u041a\u0443\u043b\u0443\u043d \u0442\u0443\u0442\u0430\u0440",
- "\u041c\u0443\u0443\u0441 \u0443\u0441\u0442\u0430\u0440",
- "\u042b\u0430\u043c \u044b\u0439\u044b\u043d",
- "\u0411\u044d\u0441 \u044b\u0439\u044b\u043d",
- "\u041e\u0442 \u044b\u0439\u044b\u043d",
- "\u0410\u0442\u044b\u0440\u0434\u044c\u044b\u0445 \u044b\u0439\u044b\u043d",
- "\u0411\u0430\u043b\u0430\u0495\u0430\u043d \u044b\u0439\u044b\u043d",
- "\u0410\u043b\u0442\u044b\u043d\u043d\u044c\u044b",
- "\u0421\u044d\u0442\u0438\u043d\u043d\u044c\u0438",
- "\u0410\u0445\u0441\u044b\u043d\u043d\u044c\u044b"
- ],
- "SHORTDAY": [
- "\u0411\u0441",
- "\u0411\u043d",
- "\u041e\u043f",
- "\u0421\u044d",
- "\u0427\u043f",
- "\u0411\u044d",
- "\u0421\u0431"
- ],
- "SHORTMONTH": [
- "\u0422\u043e\u0445\u0441",
- "\u041e\u043b\u0443\u043d",
- "\u041a\u043b\u043d_\u0442\u0442\u0440",
- "\u041c\u0443\u0441_\u0443\u0441\u0442",
- "\u042b\u0430\u043c_\u0439\u043d",
- "\u0411\u044d\u0441_\u0439\u043d",
- "\u041e\u0442_\u0439\u043d",
- "\u0410\u0442\u0440\u0434\u044c_\u0439\u043d",
- "\u0411\u043b\u0495\u043d_\u0439\u043d",
- "\u0410\u043b\u0442",
- "\u0421\u044d\u0442",
- "\u0410\u0445\u0441"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y '\u0441\u044b\u043b' MMMM d '\u043a\u04af\u043d\u044d', EEEE",
- "longDate": "y, MMMM d",
- "medium": "y, MMM d HH:mm:ss",
- "mediumDate": "y, MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/M/d HH:mm",
- "shortDate": "yy/M/d",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0440\u0443\u0431.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "sah-ru",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah.js
deleted file mode 100644
index 23bd88ee..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sah.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u042d\u0418",
- "\u042d\u041a"
- ],
- "DAY": [
- "\u0411\u0430\u0441\u043a\u044b\u04bb\u044b\u0430\u043d\u043d\u044c\u0430",
- "\u0411\u044d\u043d\u0438\u0434\u0438\u044d\u043b\u0438\u043d\u043d\u044c\u0438\u043a",
- "\u041e\u043f\u0442\u0443\u043e\u0440\u0443\u043d\u043d\u044c\u0443\u043a",
- "\u0421\u044d\u0440\u044d\u0434\u044d",
- "\u0427\u044d\u043f\u043f\u0438\u044d\u0440",
- "\u0411\u044d\u044d\u0442\u0438\u04a5\u0441\u044d",
- "\u0421\u0443\u0431\u0443\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0431. \u044d. \u0438.",
- "\u0431. \u044d"
- ],
- "ERAS": [
- "\u0431. \u044d. \u0438.",
- "\u0431. \u044d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0422\u043e\u0445\u0441\u0443\u043d\u043d\u044c\u0443",
- "\u041e\u043b\u0443\u043d\u043d\u044c\u0443",
- "\u041a\u0443\u043b\u0443\u043d \u0442\u0443\u0442\u0430\u0440",
- "\u041c\u0443\u0443\u0441 \u0443\u0441\u0442\u0430\u0440",
- "\u042b\u0430\u043c \u044b\u0439\u044b\u043d",
- "\u0411\u044d\u0441 \u044b\u0439\u044b\u043d",
- "\u041e\u0442 \u044b\u0439\u044b\u043d",
- "\u0410\u0442\u044b\u0440\u0434\u044c\u044b\u0445 \u044b\u0439\u044b\u043d",
- "\u0411\u0430\u043b\u0430\u0495\u0430\u043d \u044b\u0439\u044b\u043d",
- "\u0410\u043b\u0442\u044b\u043d\u043d\u044c\u044b",
- "\u0421\u044d\u0442\u0438\u043d\u043d\u044c\u0438",
- "\u0410\u0445\u0441\u044b\u043d\u043d\u044c\u044b"
- ],
- "SHORTDAY": [
- "\u0411\u0441",
- "\u0411\u043d",
- "\u041e\u043f",
- "\u0421\u044d",
- "\u0427\u043f",
- "\u0411\u044d",
- "\u0421\u0431"
- ],
- "SHORTMONTH": [
- "\u0422\u043e\u0445\u0441",
- "\u041e\u043b\u0443\u043d",
- "\u041a\u043b\u043d_\u0442\u0442\u0440",
- "\u041c\u0443\u0441_\u0443\u0441\u0442",
- "\u042b\u0430\u043c_\u0439\u043d",
- "\u0411\u044d\u0441_\u0439\u043d",
- "\u041e\u0442_\u0439\u043d",
- "\u0410\u0442\u0440\u0434\u044c_\u0439\u043d",
- "\u0411\u043b\u0495\u043d_\u0439\u043d",
- "\u0410\u043b\u0442",
- "\u0421\u044d\u0442",
- "\u0410\u0445\u0441"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y '\u0441\u044b\u043b' MMMM d '\u043a\u04af\u043d\u044d', EEEE",
- "longDate": "y, MMMM d",
- "medium": "y, MMM d HH:mm:ss",
- "mediumDate": "y, MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/M/d HH:mm",
- "shortDate": "yy/M/d",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0440\u0443\u0431.",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "sah",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq-ke.js
deleted file mode 100644
index a7f89980..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Tesiran",
- "Teipa"
- ],
- "DAY": [
- "Mderot ee are",
- "Mderot ee kuni",
- "Mderot ee ong\u2019wan",
- "Mderot ee inet",
- "Mderot ee ile",
- "Mderot ee sapa",
- "Mderot ee kwe"
- ],
- "ERANAMES": [
- "Kabla ya Christo",
- "Baada ya Christo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Lapa le obo",
- "Lapa le waare",
- "Lapa le okuni",
- "Lapa le ong\u2019wan",
- "Lapa le imet",
- "Lapa le ile",
- "Lapa le sapa",
- "Lapa le isiet",
- "Lapa le saal",
- "Lapa le tomon",
- "Lapa le tomon obo",
- "Lapa le tomon waare"
- ],
- "SHORTDAY": [
- "Are",
- "Kun",
- "Ong",
- "Ine",
- "Ile",
- "Sap",
- "Kwe"
- ],
- "SHORTMONTH": [
- "Obo",
- "Waa",
- "Oku",
- "Ong",
- "Ime",
- "Ile",
- "Sap",
- "Isi",
- "Saa",
- "Tom",
- "Tob",
- "Tow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "saq-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq.js
deleted file mode 100644
index b515603a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_saq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Tesiran",
- "Teipa"
- ],
- "DAY": [
- "Mderot ee are",
- "Mderot ee kuni",
- "Mderot ee ong\u2019wan",
- "Mderot ee inet",
- "Mderot ee ile",
- "Mderot ee sapa",
- "Mderot ee kwe"
- ],
- "ERANAMES": [
- "Kabla ya Christo",
- "Baada ya Christo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Lapa le obo",
- "Lapa le waare",
- "Lapa le okuni",
- "Lapa le ong\u2019wan",
- "Lapa le imet",
- "Lapa le ile",
- "Lapa le sapa",
- "Lapa le isiet",
- "Lapa le saal",
- "Lapa le tomon",
- "Lapa le tomon obo",
- "Lapa le tomon waare"
- ],
- "SHORTDAY": [
- "Are",
- "Kun",
- "Ong",
- "Ine",
- "Ile",
- "Sap",
- "Kwe"
- ],
- "SHORTMONTH": [
- "Obo",
- "Waa",
- "Oku",
- "Ong",
- "Ime",
- "Ile",
- "Sap",
- "Isi",
- "Saa",
- "Tom",
- "Tob",
- "Tow"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "saq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp-tz.js
deleted file mode 100644
index 1e5a0e82..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Lwamilawu",
- "Pashamihe"
- ],
- "DAY": [
- "Mulungu",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alahamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Ashanali uKilisito",
- "Pamwandi ya Kilisto"
- ],
- "ERAS": [
- "AK",
- "PK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mupalangulwa",
- "Mwitope",
- "Mushende",
- "Munyi",
- "Mushende Magali",
- "Mujimbi",
- "Mushipepo",
- "Mupuguto",
- "Munyense",
- "Mokhu",
- "Musongandembwe",
- "Muhaano"
- ],
- "SHORTDAY": [
- "Mul",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Mup",
- "Mwi",
- "Msh",
- "Mun",
- "Mag",
- "Muj",
- "Msp",
- "Mpg",
- "Mye",
- "Mok",
- "Mus",
- "Muh"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "sbp-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp.js
deleted file mode 100644
index da6106a6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sbp.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Lwamilawu",
- "Pashamihe"
- ],
- "DAY": [
- "Mulungu",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alahamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Ashanali uKilisito",
- "Pamwandi ya Kilisto"
- ],
- "ERAS": [
- "AK",
- "PK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Mupalangulwa",
- "Mwitope",
- "Mushende",
- "Munyi",
- "Mushende Magali",
- "Mujimbi",
- "Mushipepo",
- "Mupuguto",
- "Munyense",
- "Mokhu",
- "Musongandembwe",
- "Muhaano"
- ],
- "SHORTDAY": [
- "Mul",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Mup",
- "Mwi",
- "Msh",
- "Mun",
- "Mag",
- "Muj",
- "Msp",
- "Mpg",
- "Mye",
- "Mok",
- "Mus",
- "Muh"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "sbp",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-fi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-fi.js
deleted file mode 100644
index 62de6b1a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-fi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "i\u0111itbeaivet",
- "eahketbeaivet"
- ],
- "DAY": [
- "aejlege",
- "m\u00e5anta",
- "d\u00e4jsta",
- "gaskevahkoe",
- "d\u00e5arsta",
- "bearjadahke",
- "laavadahke"
- ],
- "ERANAMES": [
- "ovdal Kristtusa",
- "ma\u014b\u014bel Kristtusa"
- ],
- "ERAS": [
- "o.Kr.",
- "m.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "o\u0111\u0111ajagem\u00e1nnu",
- "guovvam\u00e1nnu",
- "njuk\u010dam\u00e1nnu",
- "cuo\u014bom\u00e1nnu",
- "miessem\u00e1nnu",
- "geassem\u00e1nnu",
- "suoidnem\u00e1nnu",
- "borgem\u00e1nnu",
- "\u010dak\u010dam\u00e1nnu",
- "golggotm\u00e1nnu",
- "sk\u00e1bmam\u00e1nnu",
- "juovlam\u00e1nnu"
- ],
- "SHORTDAY": [
- "sotn",
- "vuos",
- "ma\u014b",
- "gask",
- "duor",
- "bear",
- "l\u00e1v"
- ],
- "SHORTMONTH": [
- "o\u0111\u0111ajage",
- "guovva",
- "njuk\u010da",
- "cuo\u014bo",
- "miesse",
- "geasse",
- "suoidne",
- "borge",
- "\u010dak\u010da",
- "golggot",
- "sk\u00e1bma",
- "juovla"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "se-fi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-no.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-no.js
deleted file mode 100644
index b2e24ae6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-no.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "i\u0111itbeaivet",
- "eahketbeaivet"
- ],
- "DAY": [
- "sotnabeaivi",
- "vuoss\u00e1rga",
- "ma\u014b\u014beb\u00e1rga",
- "gaskavahkku",
- "duorasdat",
- "bearjadat",
- "l\u00e1vvardat"
- ],
- "ERANAMES": [
- "ovdal Kristtusa",
- "ma\u014b\u014bel Kristtusa"
- ],
- "ERAS": [
- "o.Kr.",
- "m.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "o\u0111\u0111ajagem\u00e1nnu",
- "guovvam\u00e1nnu",
- "njuk\u010dam\u00e1nnu",
- "cuo\u014bom\u00e1nnu",
- "miessem\u00e1nnu",
- "geassem\u00e1nnu",
- "suoidnem\u00e1nnu",
- "borgem\u00e1nnu",
- "\u010dak\u010dam\u00e1nnu",
- "golggotm\u00e1nnu",
- "sk\u00e1bmam\u00e1nnu",
- "juovlam\u00e1nnu"
- ],
- "SHORTDAY": [
- "sotn",
- "vuos",
- "ma\u014b",
- "gask",
- "duor",
- "bear",
- "l\u00e1v"
- ],
- "SHORTMONTH": [
- "o\u0111\u0111j",
- "guov",
- "njuk",
- "cuo",
- "mies",
- "geas",
- "suoi",
- "borg",
- "\u010dak\u010d",
- "golg",
- "sk\u00e1b",
- "juov"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "se-no",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-se.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-se.js
deleted file mode 100644
index 7915d431..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se-se.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "i\u0111itbeaivet",
- "eahketbeaivet"
- ],
- "DAY": [
- "sotnabeaivi",
- "vuoss\u00e1rga",
- "ma\u014b\u014beb\u00e1rga",
- "gaskavahkku",
- "duorasdat",
- "bearjadat",
- "l\u00e1vvardat"
- ],
- "ERANAMES": [
- "ovdal Kristtusa",
- "ma\u014b\u014bel Kristtusa"
- ],
- "ERAS": [
- "o.Kr.",
- "m.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "o\u0111\u0111ajagem\u00e1nnu",
- "guovvam\u00e1nnu",
- "njuk\u010dam\u00e1nnu",
- "cuo\u014bom\u00e1nnu",
- "miessem\u00e1nnu",
- "geassem\u00e1nnu",
- "suoidnem\u00e1nnu",
- "borgem\u00e1nnu",
- "\u010dak\u010dam\u00e1nnu",
- "golggotm\u00e1nnu",
- "sk\u00e1bmam\u00e1nnu",
- "juovlam\u00e1nnu"
- ],
- "SHORTDAY": [
- "sotn",
- "vuos",
- "ma\u014b",
- "gask",
- "duor",
- "bear",
- "l\u00e1v"
- ],
- "SHORTMONTH": [
- "o\u0111\u0111j",
- "guov",
- "njuk",
- "cuo",
- "mies",
- "geas",
- "suoi",
- "borg",
- "\u010dak\u010d",
- "golg",
- "sk\u00e1b",
- "juov"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "se-se",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se.js
deleted file mode 100644
index 0a6d7d66..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_se.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "i\u0111itbeaivet",
- "eahketbeaivet"
- ],
- "DAY": [
- "sotnabeaivi",
- "vuoss\u00e1rga",
- "ma\u014b\u014beb\u00e1rga",
- "gaskavahkku",
- "duorasdat",
- "bearjadat",
- "l\u00e1vvardat"
- ],
- "ERANAMES": [
- "ovdal Kristtusa",
- "ma\u014b\u014bel Kristtusa"
- ],
- "ERAS": [
- "o.Kr.",
- "m.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "o\u0111\u0111ajagem\u00e1nnu",
- "guovvam\u00e1nnu",
- "njuk\u010dam\u00e1nnu",
- "cuo\u014bom\u00e1nnu",
- "miessem\u00e1nnu",
- "geassem\u00e1nnu",
- "suoidnem\u00e1nnu",
- "borgem\u00e1nnu",
- "\u010dak\u010dam\u00e1nnu",
- "golggotm\u00e1nnu",
- "sk\u00e1bmam\u00e1nnu",
- "juovlam\u00e1nnu"
- ],
- "SHORTDAY": [
- "sotn",
- "vuos",
- "ma\u014b",
- "gask",
- "duor",
- "bear",
- "l\u00e1v"
- ],
- "SHORTMONTH": [
- "o\u0111\u0111j",
- "guov",
- "njuk",
- "cuo",
- "mies",
- "geas",
- "suoi",
- "borg",
- "\u010dak\u010d",
- "golg",
- "sk\u00e1b",
- "juov"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "se",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh-mz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh-mz.js
deleted file mode 100644
index f723c867..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh-mz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Dimingu",
- "Chiposi",
- "Chipiri",
- "Chitatu",
- "Chinai",
- "Chishanu",
- "Sabudu"
- ],
- "ERANAMES": [
- "Antes de Cristo",
- "Anno Domini"
- ],
- "ERAS": [
- "AC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janeiro",
- "Fevreiro",
- "Marco",
- "Abril",
- "Maio",
- "Junho",
- "Julho",
- "Augusto",
- "Setembro",
- "Otubro",
- "Novembro",
- "Decembro"
- ],
- "SHORTDAY": [
- "Dim",
- "Pos",
- "Pir",
- "Tat",
- "Nai",
- "Sha",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fev",
- "Mar",
- "Abr",
- "Mai",
- "Jun",
- "Jul",
- "Aug",
- "Set",
- "Otu",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d 'de' MMM 'de' y HH:mm:ss",
- "mediumDate": "d 'de' MMM 'de' y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MTn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "seh-mz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh.js
deleted file mode 100644
index d9c55eec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_seh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Dimingu",
- "Chiposi",
- "Chipiri",
- "Chitatu",
- "Chinai",
- "Chishanu",
- "Sabudu"
- ],
- "ERANAMES": [
- "Antes de Cristo",
- "Anno Domini"
- ],
- "ERAS": [
- "AC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janeiro",
- "Fevreiro",
- "Marco",
- "Abril",
- "Maio",
- "Junho",
- "Julho",
- "Augusto",
- "Setembro",
- "Otubro",
- "Novembro",
- "Decembro"
- ],
- "SHORTDAY": [
- "Dim",
- "Pos",
- "Pir",
- "Tat",
- "Nai",
- "Sha",
- "Sab"
- ],
- "SHORTMONTH": [
- "Jan",
- "Fev",
- "Mar",
- "Abr",
- "Mai",
- "Jun",
- "Jul",
- "Aug",
- "Set",
- "Otu",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d 'de' MMMM 'de' y",
- "longDate": "d 'de' MMMM 'de' y",
- "medium": "d 'de' MMM 'de' y HH:mm:ss",
- "mediumDate": "d 'de' MMM 'de' y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MTn",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "seh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses-ml.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses-ml.js
deleted file mode 100644
index 596dfe43..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses-ml.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Adduha",
- "Aluula"
- ],
- "DAY": [
- "Alhadi",
- "Atinni",
- "Atalaata",
- "Alarba",
- "Alhamiisa",
- "Alzuma",
- "Asibti"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa zamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alz",
- "Asi"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "ses-ml",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses.js
deleted file mode 100644
index e150d779..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ses.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Adduha",
- "Aluula"
- ],
- "DAY": [
- "Alhadi",
- "Atinni",
- "Atalaata",
- "Alarba",
- "Alhamiisa",
- "Alzuma",
- "Asibti"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa zamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alz",
- "Asi"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "ses",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg-cf.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg-cf.js
deleted file mode 100644
index fb6d2f76..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg-cf.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ND",
- "LK"
- ],
- "DAY": [
- "Bikua-\u00f4ko",
- "B\u00efkua-\u00fbse",
- "B\u00efkua-pt\u00e2",
- "B\u00efkua-us\u00ef\u00f6",
- "B\u00efkua-ok\u00fc",
- "L\u00e2p\u00f4s\u00f6",
- "L\u00e2yenga"
- ],
- "ERANAMES": [
- "K\u00f4zo na Kr\u00eestu",
- "Na pek\u00f4 t\u00ee Kr\u00eestu"
- ],
- "ERAS": [
- "KnK",
- "NpK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Nyenye",
- "Fulund\u00efgi",
- "Mb\u00e4ng\u00fc",
- "Ngub\u00f9e",
- "B\u00eal\u00e4w\u00fc",
- "F\u00f6ndo",
- "Lengua",
- "K\u00fck\u00fcr\u00fc",
- "Mvuka",
- "Ngberere",
- "Nab\u00e4nd\u00fcru",
- "Kakauka"
- ],
- "SHORTDAY": [
- "Bk1",
- "Bk2",
- "Bk3",
- "Bk4",
- "Bk5",
- "L\u00e2p",
- "L\u00e2y"
- ],
- "SHORTMONTH": [
- "Nye",
- "Ful",
- "Mb\u00e4",
- "Ngu",
- "B\u00eal",
- "F\u00f6n",
- "Len",
- "K\u00fck",
- "Mvu",
- "Ngb",
- "Nab",
- "Kak"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sg-cf",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg.js
deleted file mode 100644
index 3b671dae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sg.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ND",
- "LK"
- ],
- "DAY": [
- "Bikua-\u00f4ko",
- "B\u00efkua-\u00fbse",
- "B\u00efkua-pt\u00e2",
- "B\u00efkua-us\u00ef\u00f6",
- "B\u00efkua-ok\u00fc",
- "L\u00e2p\u00f4s\u00f6",
- "L\u00e2yenga"
- ],
- "ERANAMES": [
- "K\u00f4zo na Kr\u00eestu",
- "Na pek\u00f4 t\u00ee Kr\u00eestu"
- ],
- "ERAS": [
- "KnK",
- "NpK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Nyenye",
- "Fulund\u00efgi",
- "Mb\u00e4ng\u00fc",
- "Ngub\u00f9e",
- "B\u00eal\u00e4w\u00fc",
- "F\u00f6ndo",
- "Lengua",
- "K\u00fck\u00fcr\u00fc",
- "Mvuka",
- "Ngberere",
- "Nab\u00e4nd\u00fcru",
- "Kakauka"
- ],
- "SHORTDAY": [
- "Bk1",
- "Bk2",
- "Bk3",
- "Bk4",
- "Bk5",
- "L\u00e2p",
- "L\u00e2y"
- ],
- "SHORTMONTH": [
- "Nye",
- "Ful",
- "Mb\u00e4",
- "Ngu",
- "B\u00eal",
- "F\u00f6n",
- "Len",
- "K\u00fck",
- "Mvu",
- "Ngb",
- "Nab",
- "Kak"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn-ma.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn-ma.js
deleted file mode 100644
index 02156c69..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn-ma.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "tifawt",
- "tadgg\u02b7at"
- ],
- "DAY": [
- "asamas",
- "aynas",
- "asinas",
- "ak\u1e5bas",
- "akwas",
- "asimwas",
- "asi\u1e0dyas"
- ],
- "ERANAMES": [
- "dat n \u025bisa",
- "dffir n \u025bisa"
- ],
- "ERAS": [
- "da\u025b",
- "df\u025b"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "innayr",
- "b\u1e5bay\u1e5b",
- "ma\u1e5b\u1e63",
- "ibrir",
- "mayyu",
- "yunyu",
- "yulyuz",
- "\u0263uct",
- "cutanbir",
- "ktubr",
- "nuwanbir",
- "dujanbir"
- ],
- "SHORTDAY": [
- "asa",
- "ayn",
- "asi",
- "ak\u1e5b",
- "akw",
- "asim",
- "asi\u1e0d"
- ],
- "SHORTMONTH": [
- "inn",
- "b\u1e5ba",
- "ma\u1e5b",
- "ibr",
- "may",
- "yun",
- "yul",
- "\u0263uc",
- "cut",
- "ktu",
- "nuw",
- "duj"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "shi-latn-ma",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn.js
deleted file mode 100644
index 6b8b6f70..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "tifawt",
- "tadgg\u02b7at"
- ],
- "DAY": [
- "asamas",
- "aynas",
- "asinas",
- "ak\u1e5bas",
- "akwas",
- "asimwas",
- "asi\u1e0dyas"
- ],
- "ERANAMES": [
- "dat n \u025bisa",
- "dffir n \u025bisa"
- ],
- "ERAS": [
- "da\u025b",
- "df\u025b"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "innayr",
- "b\u1e5bay\u1e5b",
- "ma\u1e5b\u1e63",
- "ibrir",
- "mayyu",
- "yunyu",
- "yulyuz",
- "\u0263uct",
- "cutanbir",
- "ktubr",
- "nuwanbir",
- "dujanbir"
- ],
- "SHORTDAY": [
- "asa",
- "ayn",
- "asi",
- "ak\u1e5b",
- "akw",
- "asim",
- "asi\u1e0d"
- ],
- "SHORTMONTH": [
- "inn",
- "b\u1e5ba",
- "ma\u1e5b",
- "ibr",
- "may",
- "yun",
- "yul",
- "\u0263uc",
- "cut",
- "ktu",
- "nuw",
- "duj"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "shi-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng-ma.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng-ma.js
deleted file mode 100644
index 998d17a2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng-ma.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c",
- "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c"
- ],
- "DAY": [
- "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59",
- "\u2d30\u2d62\u2d4f\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59",
- "\u2d30\u2d3d\u2d55\u2d30\u2d59",
- "\u2d30\u2d3d\u2d61\u2d30\u2d59",
- "\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59"
- ],
- "ERANAMES": [
- "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30",
- "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30"
- ],
- "ERAS": [
- "\u2d37\u2d30\u2d44",
- "\u2d37\u2d3c\u2d44"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54",
- "\u2d31\u2d55\u2d30\u2d62\u2d55",
- "\u2d4e\u2d30\u2d55\u2d5a",
- "\u2d49\u2d31\u2d54\u2d49\u2d54",
- "\u2d4e\u2d30\u2d62\u2d62\u2d53",
- "\u2d62\u2d53\u2d4f\u2d62\u2d53",
- "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63",
- "\u2d56\u2d53\u2d5b\u2d5c",
- "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d3d\u2d5c\u2d53\u2d31\u2d54",
- "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54"
- ],
- "SHORTDAY": [
- "\u2d30\u2d59\u2d30",
- "\u2d30\u2d62\u2d4f",
- "\u2d30\u2d59\u2d49",
- "\u2d30\u2d3d\u2d55",
- "\u2d30\u2d3d\u2d61",
- "\u2d30\u2d59\u2d49\u2d4e",
- "\u2d30\u2d59\u2d49\u2d39"
- ],
- "SHORTMONTH": [
- "\u2d49\u2d4f\u2d4f",
- "\u2d31\u2d55\u2d30",
- "\u2d4e\u2d30\u2d55",
- "\u2d49\u2d31\u2d54",
- "\u2d4e\u2d30\u2d62",
- "\u2d62\u2d53\u2d4f",
- "\u2d62\u2d53\u2d4d",
- "\u2d56\u2d53\u2d5b",
- "\u2d5b\u2d53\u2d5c",
- "\u2d3d\u2d5c\u2d53",
- "\u2d4f\u2d53\u2d61",
- "\u2d37\u2d53\u2d4a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "shi-tfng-ma",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng.js
deleted file mode 100644
index a2d825b3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi-tfng.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c",
- "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c"
- ],
- "DAY": [
- "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59",
- "\u2d30\u2d62\u2d4f\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59",
- "\u2d30\u2d3d\u2d55\u2d30\u2d59",
- "\u2d30\u2d3d\u2d61\u2d30\u2d59",
- "\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59"
- ],
- "ERANAMES": [
- "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30",
- "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30"
- ],
- "ERAS": [
- "\u2d37\u2d30\u2d44",
- "\u2d37\u2d3c\u2d44"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54",
- "\u2d31\u2d55\u2d30\u2d62\u2d55",
- "\u2d4e\u2d30\u2d55\u2d5a",
- "\u2d49\u2d31\u2d54\u2d49\u2d54",
- "\u2d4e\u2d30\u2d62\u2d62\u2d53",
- "\u2d62\u2d53\u2d4f\u2d62\u2d53",
- "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63",
- "\u2d56\u2d53\u2d5b\u2d5c",
- "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d3d\u2d5c\u2d53\u2d31\u2d54",
- "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54"
- ],
- "SHORTDAY": [
- "\u2d30\u2d59\u2d30",
- "\u2d30\u2d62\u2d4f",
- "\u2d30\u2d59\u2d49",
- "\u2d30\u2d3d\u2d55",
- "\u2d30\u2d3d\u2d61",
- "\u2d30\u2d59\u2d49\u2d4e",
- "\u2d30\u2d59\u2d49\u2d39"
- ],
- "SHORTMONTH": [
- "\u2d49\u2d4f\u2d4f",
- "\u2d31\u2d55\u2d30",
- "\u2d4e\u2d30\u2d55",
- "\u2d49\u2d31\u2d54",
- "\u2d4e\u2d30\u2d62",
- "\u2d62\u2d53\u2d4f",
- "\u2d62\u2d53\u2d4d",
- "\u2d56\u2d53\u2d5b",
- "\u2d5b\u2d53\u2d5c",
- "\u2d3d\u2d5c\u2d53",
- "\u2d4f\u2d53\u2d61",
- "\u2d37\u2d53\u2d4a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "shi-tfng",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi.js
deleted file mode 100644
index 5f2fe453..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_shi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c",
- "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c"
- ],
- "DAY": [
- "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59",
- "\u2d30\u2d62\u2d4f\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59",
- "\u2d30\u2d3d\u2d55\u2d30\u2d59",
- "\u2d30\u2d3d\u2d61\u2d30\u2d59",
- "\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59"
- ],
- "ERANAMES": [
- "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30",
- "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30"
- ],
- "ERAS": [
- "\u2d37\u2d30\u2d44",
- "\u2d37\u2d3c\u2d44"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54",
- "\u2d31\u2d55\u2d30\u2d62\u2d55",
- "\u2d4e\u2d30\u2d55\u2d5a",
- "\u2d49\u2d31\u2d54\u2d49\u2d54",
- "\u2d4e\u2d30\u2d62\u2d62\u2d53",
- "\u2d62\u2d53\u2d4f\u2d62\u2d53",
- "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63",
- "\u2d56\u2d53\u2d5b\u2d5c",
- "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d3d\u2d5c\u2d53\u2d31\u2d54",
- "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54"
- ],
- "SHORTDAY": [
- "\u2d30\u2d59\u2d30",
- "\u2d30\u2d62\u2d4f",
- "\u2d30\u2d59\u2d49",
- "\u2d30\u2d3d\u2d55",
- "\u2d30\u2d3d\u2d61",
- "\u2d30\u2d59\u2d49\u2d4e",
- "\u2d30\u2d59\u2d49\u2d39"
- ],
- "SHORTMONTH": [
- "\u2d49\u2d4f\u2d4f",
- "\u2d31\u2d55\u2d30",
- "\u2d4e\u2d30\u2d55",
- "\u2d49\u2d31\u2d54",
- "\u2d4e\u2d30\u2d62",
- "\u2d62\u2d53\u2d4f",
- "\u2d62\u2d53\u2d4d",
- "\u2d56\u2d53\u2d5b",
- "\u2d5b\u2d53\u2d5c",
- "\u2d3d\u2d5c\u2d53",
- "\u2d4f\u2d53\u2d61",
- "\u2d37\u2d53\u2d4a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "shi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si-lk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si-lk.js
deleted file mode 100644
index c216c753..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si-lk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0db4\u0dd9.\u0dc0.",
- "\u0db4.\u0dc0."
- ],
- "DAY": [
- "\u0d89\u0dbb\u0dd2\u0daf\u0dcf",
- "\u0dc3\u0db3\u0dd4\u0daf\u0dcf",
- "\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf",
- "\u0db6\u0daf\u0dcf\u0daf\u0dcf",
- "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf",
- "\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf",
- "\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf"
- ],
- "ERANAMES": [
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0db4\u0dd6\u0dbb\u0dca\u200d\u0dc0",
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0dc0\u0dbb\u0dca\u200d\u0dc2"
- ],
- "ERAS": [
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0db4\u0dd6.",
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0dc0."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2",
- "\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2",
- "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4",
- "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca",
- "\u0db8\u0dd0\u0dba\u0dd2",
- "\u0da2\u0dd6\u0db1\u0dd2",
- "\u0da2\u0dd6\u0dbd\u0dd2",
- "\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4",
- "\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca",
- "\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca",
- "\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca",
- "\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca"
- ],
- "SHORTDAY": [
- "\u0d89\u0dbb\u0dd2\u0daf\u0dcf",
- "\u0dc3\u0db3\u0dd4\u0daf\u0dcf",
- "\u0d85\u0d9f\u0dc4",
- "\u0db6\u0daf\u0dcf\u0daf\u0dcf",
- "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca",
- "\u0dc3\u0dd2\u0d9a\u0dd4",
- "\u0dc3\u0dd9\u0db1"
- ],
- "SHORTMONTH": [
- "\u0da2\u0db1",
- "\u0db4\u0dd9\u0db6",
- "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4",
- "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca",
- "\u0db8\u0dd0\u0dba\u0dd2",
- "\u0da2\u0dd6\u0db1\u0dd2",
- "\u0da2\u0dd6\u0dbd\u0dd2",
- "\u0d85\u0d9c\u0ddd",
- "\u0dc3\u0dd0\u0db4\u0dca",
- "\u0d94\u0d9a\u0dca",
- "\u0db1\u0ddc\u0dc0\u0dd0",
- "\u0daf\u0dd9\u0dc3\u0dd0"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d a h.mm.ss",
- "mediumDate": "y MMM d",
- "mediumTime": "a h.mm.ss",
- "short": "y-MM-dd a h.mm",
- "shortDate": "y-MM-dd",
- "shortTime": "a h.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "si-lk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if ((n == 0 || n == 1) || i == 0 && vf.f == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si.js
deleted file mode 100644
index bfcdd628..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_si.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0db4\u0dd9.\u0dc0.",
- "\u0db4.\u0dc0."
- ],
- "DAY": [
- "\u0d89\u0dbb\u0dd2\u0daf\u0dcf",
- "\u0dc3\u0db3\u0dd4\u0daf\u0dcf",
- "\u0d85\u0d9f\u0dc4\u0dbb\u0dd4\u0dc0\u0dcf\u0daf\u0dcf",
- "\u0db6\u0daf\u0dcf\u0daf\u0dcf",
- "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca\u0db4\u0dad\u0dd2\u0db1\u0dca\u0daf\u0dcf",
- "\u0dc3\u0dd2\u0d9a\u0dd4\u0dbb\u0dcf\u0daf\u0dcf",
- "\u0dc3\u0dd9\u0db1\u0dc3\u0dd4\u0dbb\u0dcf\u0daf\u0dcf"
- ],
- "ERANAMES": [
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0db4\u0dd6\u0dbb\u0dca\u200d\u0dc0",
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2\u0dc3\u0dca\u0dad\u0dd4 \u0dc0\u0dbb\u0dca\u200d\u0dc2"
- ],
- "ERAS": [
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0db4\u0dd6.",
- "\u0d9a\u0dca\u200d\u0dbb\u0dd2.\u0dc0."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0da2\u0db1\u0dc0\u0dcf\u0dbb\u0dd2",
- "\u0db4\u0dd9\u0db6\u0dbb\u0dc0\u0dcf\u0dbb\u0dd2",
- "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4",
- "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca",
- "\u0db8\u0dd0\u0dba\u0dd2",
- "\u0da2\u0dd6\u0db1\u0dd2",
- "\u0da2\u0dd6\u0dbd\u0dd2",
- "\u0d85\u0d9c\u0ddd\u0dc3\u0dca\u0dad\u0dd4",
- "\u0dc3\u0dd0\u0db4\u0dca\u0dad\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca",
- "\u0d94\u0d9a\u0dca\u0dad\u0ddd\u0db6\u0dbb\u0dca",
- "\u0db1\u0ddc\u0dc0\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca",
- "\u0daf\u0dd9\u0dc3\u0dd0\u0db8\u0dca\u0db6\u0dbb\u0dca"
- ],
- "SHORTDAY": [
- "\u0d89\u0dbb\u0dd2\u0daf\u0dcf",
- "\u0dc3\u0db3\u0dd4\u0daf\u0dcf",
- "\u0d85\u0d9f\u0dc4",
- "\u0db6\u0daf\u0dcf\u0daf\u0dcf",
- "\u0db6\u0dca\u200d\u0dbb\u0dc4\u0dc3\u0dca",
- "\u0dc3\u0dd2\u0d9a\u0dd4",
- "\u0dc3\u0dd9\u0db1"
- ],
- "SHORTMONTH": [
- "\u0da2\u0db1",
- "\u0db4\u0dd9\u0db6",
- "\u0db8\u0dcf\u0dbb\u0dca\u0dad\u0dd4",
- "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dda\u0dbd\u0dca",
- "\u0db8\u0dd0\u0dba\u0dd2",
- "\u0da2\u0dd6\u0db1\u0dd2",
- "\u0da2\u0dd6\u0dbd\u0dd2",
- "\u0d85\u0d9c\u0ddd",
- "\u0dc3\u0dd0\u0db4\u0dca",
- "\u0d94\u0d9a\u0dca",
- "\u0db1\u0ddc\u0dc0\u0dd0",
- "\u0daf\u0dd9\u0dc3\u0dd0"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d a h.mm.ss",
- "mediumDate": "y MMM d",
- "mediumTime": "a h.mm.ss",
- "short": "y-MM-dd a h.mm",
- "shortDate": "y-MM-dd",
- "shortTime": "a h.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "si",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if ((n == 0 || n == 1) || i == 0 && vf.f == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk-sk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk-sk.js
deleted file mode 100644
index 01f0f0cb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk-sk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopoludnia",
- "odpoludnia"
- ],
- "DAY": [
- "nede\u013ea",
- "pondelok",
- "utorok",
- "streda",
- "\u0161tvrtok",
- "piatok",
- "sobota"
- ],
- "ERANAMES": [
- "pred Kristom",
- "po Kristovi"
- ],
- "ERAS": [
- "pred Kr.",
- "po Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janu\u00e1ra",
- "febru\u00e1ra",
- "marca",
- "apr\u00edla",
- "m\u00e1ja",
- "j\u00fana",
- "j\u00fala",
- "augusta",
- "septembra",
- "okt\u00f3bra",
- "novembra",
- "decembra"
- ],
- "SHORTDAY": [
- "ne",
- "po",
- "ut",
- "st",
- "\u0161t",
- "pi",
- "so"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "m\u00e1j",
- "j\u00fan",
- "j\u00fal",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. M. y H:mm:ss",
- "mediumDate": "d. M. y",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sk-sk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk.js
deleted file mode 100644
index 7618fe38..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dopoludnia",
- "odpoludnia"
- ],
- "DAY": [
- "nede\u013ea",
- "pondelok",
- "utorok",
- "streda",
- "\u0161tvrtok",
- "piatok",
- "sobota"
- ],
- "ERANAMES": [
- "pred Kristom",
- "po Kristovi"
- ],
- "ERAS": [
- "pred Kr.",
- "po Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janu\u00e1ra",
- "febru\u00e1ra",
- "marca",
- "apr\u00edla",
- "m\u00e1ja",
- "j\u00fana",
- "j\u00fala",
- "augusta",
- "septembra",
- "okt\u00f3bra",
- "novembra",
- "decembra"
- ],
- "SHORTDAY": [
- "ne",
- "po",
- "ut",
- "st",
- "\u0161t",
- "pi",
- "so"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "m\u00e1j",
- "j\u00fan",
- "j\u00fal",
- "aug",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. M. y H:mm:ss",
- "mediumDate": "d. M. y",
- "mediumTime": "H:mm:ss",
- "short": "dd.MM.yy H:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } if (i >= 2 && i <= 4 && vf.v == 0) { return PLURAL_CATEGORY.FEW; } if (vf.v != 0) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl-si.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl-si.js
deleted file mode 100644
index f480b789..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl-si.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dop.",
- "pop."
- ],
- "DAY": [
- "nedelja",
- "ponedeljek",
- "torek",
- "sreda",
- "\u010detrtek",
- "petek",
- "sobota"
- ],
- "ERANAMES": [
- "pred na\u0161im \u0161tetjem",
- "na\u0161e \u0161tetje"
- ],
- "ERAS": [
- "pr. n. \u0161t.",
- "po Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "marec",
- "april",
- "maj",
- "junij",
- "julij",
- "avgust",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "ned.",
- "pon.",
- "tor.",
- "sre.",
- "\u010det.",
- "pet.",
- "sob."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "maj",
- "jun.",
- "jul.",
- "avg.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y",
- "longDate": "dd. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d. MM. yy HH:mm",
- "shortDate": "d. MM. yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sl-si",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 100 == 1) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 100 == 2) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && i % 100 >= 3 && i % 100 <= 4 || vf.v != 0) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl.js
deleted file mode 100644
index 24d4a779..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "dop.",
- "pop."
- ],
- "DAY": [
- "nedelja",
- "ponedeljek",
- "torek",
- "sreda",
- "\u010detrtek",
- "petek",
- "sobota"
- ],
- "ERANAMES": [
- "pred na\u0161im \u0161tetjem",
- "na\u0161e \u0161tetje"
- ],
- "ERAS": [
- "pr. n. \u0161t.",
- "po Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "marec",
- "april",
- "maj",
- "junij",
- "julij",
- "avgust",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "ned.",
- "pon.",
- "tor.",
- "sre.",
- "\u010det.",
- "pet.",
- "sob."
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mar.",
- "apr.",
- "maj",
- "jun.",
- "jul.",
- "avg.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y",
- "longDate": "dd. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d. MM. yy HH:mm",
- "shortDate": "d. MM. yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 100 == 1) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 100 == 2) { return PLURAL_CATEGORY.TWO; } if (vf.v == 0 && i % 100 >= 3 && i % 100 <= 4 || vf.v != 0) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn-fi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn-fi.js
deleted file mode 100644
index 027b0a2c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn-fi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "pasepeeivi",
- "vuossaarg\u00e2",
- "majebaarg\u00e2",
- "koskoho",
- "tuor\u00e2stuv",
- "v\u00e1stuppeeivi",
- "l\u00e1vurduv"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "M01",
- "M02",
- "M03",
- "M04",
- "M05",
- "M06",
- "M07",
- "M08",
- "M09",
- "M10",
- "M11",
- "M12"
- ],
- "SHORTDAY": [
- "pa",
- "vu",
- "ma",
- "ko",
- "tu",
- "v\u00e1",
- "l\u00e1"
- ],
- "SHORTMONTH": [
- "M01",
- "M02",
- "M03",
- "M04",
- "M05",
- "M06",
- "M07",
- "M08",
- "M09",
- "M10",
- "M11",
- "M12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "smn-fi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn.js
deleted file mode 100644
index 68c71cfa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_smn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "pasepeeivi",
- "vuossaarg\u00e2",
- "majebaarg\u00e2",
- "koskoho",
- "tuor\u00e2stuv",
- "v\u00e1stuppeeivi",
- "l\u00e1vurduv"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "M01",
- "M02",
- "M03",
- "M04",
- "M05",
- "M06",
- "M07",
- "M08",
- "M09",
- "M10",
- "M11",
- "M12"
- ],
- "SHORTDAY": [
- "pa",
- "vu",
- "ma",
- "ko",
- "tu",
- "v\u00e1",
- "l\u00e1"
- ],
- "SHORTMONTH": [
- "M01",
- "M02",
- "M03",
- "M04",
- "M05",
- "M06",
- "M07",
- "M08",
- "M09",
- "M10",
- "M11",
- "M12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "smn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn-zw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn-zw.js
deleted file mode 100644
index 1d8cd0ff..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn-zw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Svondo",
- "Muvhuro",
- "Chipiri",
- "Chitatu",
- "China",
- "Chishanu",
- "Mugovera"
- ],
- "ERANAMES": [
- "Kristo asati auya",
- "Kristo ashaya"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ndira",
- "Kukadzi",
- "Kurume",
- "Kubvumbi",
- "Chivabvu",
- "Chikumi",
- "Chikunguru",
- "Nyamavhuvhu",
- "Gunyana",
- "Gumiguru",
- "Mbudzi",
- "Zvita"
- ],
- "SHORTDAY": [
- "Svo",
- "Muv",
- "Chip",
- "Chit",
- "Chin",
- "Chis",
- "Mug"
- ],
- "SHORTMONTH": [
- "Ndi",
- "Kuk",
- "Kur",
- "Kub",
- "Chv",
- "Chk",
- "Chg",
- "Nya",
- "Gun",
- "Gum",
- "Mb",
- "Zvi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sn-zw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn.js
deleted file mode 100644
index 7b16b4dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Svondo",
- "Muvhuro",
- "Chipiri",
- "Chitatu",
- "China",
- "Chishanu",
- "Mugovera"
- ],
- "ERANAMES": [
- "Kristo asati auya",
- "Kristo ashaya"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ndira",
- "Kukadzi",
- "Kurume",
- "Kubvumbi",
- "Chivabvu",
- "Chikumi",
- "Chikunguru",
- "Nyamavhuvhu",
- "Gunyana",
- "Gumiguru",
- "Mbudzi",
- "Zvita"
- ],
- "SHORTDAY": [
- "Svo",
- "Muv",
- "Chip",
- "Chit",
- "Chin",
- "Chis",
- "Mug"
- ],
- "SHORTMONTH": [
- "Ndi",
- "Kuk",
- "Kur",
- "Kub",
- "Chv",
- "Chk",
- "Chg",
- "Nya",
- "Gun",
- "Gum",
- "Mb",
- "Zvi"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-dj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-dj.js
deleted file mode 100644
index d8307cbd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-dj.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "sn.",
- "gn."
- ],
- "DAY": [
- "Axad",
- "Isniin",
- "Talaado",
- "Arbaco",
- "Khamiis",
- "Jimco",
- "Sabti"
- ],
- "ERANAMES": [
- "Ciise ka hor (CS)",
- "Ciise ka dib (CS)"
- ],
- "ERAS": [
- "CK",
- "CD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Bisha Koobaad",
- "Bisha Labaad",
- "Bisha Saddexaad",
- "Bisha Afraad",
- "Bisha Shanaad",
- "Bisha Lixaad",
- "Bisha Todobaad",
- "Bisha Sideedaad",
- "Bisha Sagaalaad",
- "Bisha Tobnaad",
- "Bisha Kow iyo Tobnaad",
- "Bisha Laba iyo Tobnaad"
- ],
- "SHORTDAY": [
- "Axd",
- "Isn",
- "Tal",
- "Arb",
- "Kha",
- "Jim",
- "Sab"
- ],
- "SHORTMONTH": [
- "Kob",
- "Lab",
- "Sad",
- "Afr",
- "Sha",
- "Lix",
- "Tod",
- "Sid",
- "Sag",
- "Tob",
- "KIT",
- "LIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Fdj",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "so-dj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-et.js
deleted file mode 100644
index ef34ea2c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-et.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "sn.",
- "gn."
- ],
- "DAY": [
- "Axad",
- "Isniin",
- "Talaado",
- "Arbaco",
- "Khamiis",
- "Jimco",
- "Sabti"
- ],
- "ERANAMES": [
- "Ciise ka hor (CS)",
- "Ciise ka dib (CS)"
- ],
- "ERAS": [
- "CK",
- "CD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Bisha Koobaad",
- "Bisha Labaad",
- "Bisha Saddexaad",
- "Bisha Afraad",
- "Bisha Shanaad",
- "Bisha Lixaad",
- "Bisha Todobaad",
- "Bisha Sideedaad",
- "Bisha Sagaalaad",
- "Bisha Tobnaad",
- "Bisha Kow iyo Tobnaad",
- "Bisha Laba iyo Tobnaad"
- ],
- "SHORTDAY": [
- "Axd",
- "Isn",
- "Tal",
- "Arb",
- "Kha",
- "Jim",
- "Sab"
- ],
- "SHORTMONTH": [
- "Kob",
- "Lab",
- "Sad",
- "Afr",
- "Sha",
- "Lix",
- "Tod",
- "Sid",
- "Sag",
- "Tob",
- "KIT",
- "LIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "so-et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-ke.js
deleted file mode 100644
index 67fc74e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "sn.",
- "gn."
- ],
- "DAY": [
- "Axad",
- "Isniin",
- "Talaado",
- "Arbaco",
- "Khamiis",
- "Jimco",
- "Sabti"
- ],
- "ERANAMES": [
- "Ciise ka hor (CS)",
- "Ciise ka dib (CS)"
- ],
- "ERAS": [
- "CK",
- "CD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Bisha Koobaad",
- "Bisha Labaad",
- "Bisha Saddexaad",
- "Bisha Afraad",
- "Bisha Shanaad",
- "Bisha Lixaad",
- "Bisha Todobaad",
- "Bisha Sideedaad",
- "Bisha Sagaalaad",
- "Bisha Tobnaad",
- "Bisha Kow iyo Tobnaad",
- "Bisha Laba iyo Tobnaad"
- ],
- "SHORTDAY": [
- "Axd",
- "Isn",
- "Tal",
- "Arb",
- "Kha",
- "Jim",
- "Sab"
- ],
- "SHORTMONTH": [
- "Kob",
- "Lab",
- "Sad",
- "Afr",
- "Sha",
- "Lix",
- "Tod",
- "Sid",
- "Sag",
- "Tob",
- "KIT",
- "LIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "so-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-so.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-so.js
deleted file mode 100644
index c91a4235..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so-so.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "sn.",
- "gn."
- ],
- "DAY": [
- "Axad",
- "Isniin",
- "Talaado",
- "Arbaco",
- "Khamiis",
- "Jimco",
- "Sabti"
- ],
- "ERANAMES": [
- "Ciise ka hor (CS)",
- "Ciise ka dib (CS)"
- ],
- "ERAS": [
- "CK",
- "CD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Bisha Koobaad",
- "Bisha Labaad",
- "Bisha Saddexaad",
- "Bisha Afraad",
- "Bisha Shanaad",
- "Bisha Lixaad",
- "Bisha Todobaad",
- "Bisha Sideedaad",
- "Bisha Sagaalaad",
- "Bisha Tobnaad",
- "Bisha Kow iyo Tobnaad",
- "Bisha Laba iyo Tobnaad"
- ],
- "SHORTDAY": [
- "Axd",
- "Isn",
- "Tal",
- "Arb",
- "Kha",
- "Jim",
- "Sab"
- ],
- "SHORTMONTH": [
- "Kob",
- "Lab",
- "Sad",
- "Afr",
- "Sha",
- "Lix",
- "Tod",
- "Sid",
- "Sag",
- "Tob",
- "KIT",
- "LIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SOS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "so-so",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so.js
deleted file mode 100644
index 743a24ba..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_so.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "sn.",
- "gn."
- ],
- "DAY": [
- "Axad",
- "Isniin",
- "Talaado",
- "Arbaco",
- "Khamiis",
- "Jimco",
- "Sabti"
- ],
- "ERANAMES": [
- "Ciise ka hor (CS)",
- "Ciise ka dib (CS)"
- ],
- "ERAS": [
- "CK",
- "CD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Bisha Koobaad",
- "Bisha Labaad",
- "Bisha Saddexaad",
- "Bisha Afraad",
- "Bisha Shanaad",
- "Bisha Lixaad",
- "Bisha Todobaad",
- "Bisha Sideedaad",
- "Bisha Sagaalaad",
- "Bisha Tobnaad",
- "Bisha Kow iyo Tobnaad",
- "Bisha Laba iyo Tobnaad"
- ],
- "SHORTDAY": [
- "Axd",
- "Isn",
- "Tal",
- "Arb",
- "Kha",
- "Jim",
- "Sab"
- ],
- "SHORTMONTH": [
- "Kob",
- "Lab",
- "Sad",
- "Afr",
- "Sha",
- "Lix",
- "Tod",
- "Sid",
- "Sag",
- "Tob",
- "KIT",
- "LIT"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SOS",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "so",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-al.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-al.js
deleted file mode 100644
index 6dac5e79..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-al.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "paradite",
- "pasdite"
- ],
- "DAY": [
- "e diel",
- "e h\u00ebn\u00eb",
- "e mart\u00eb",
- "e m\u00ebrkur\u00eb",
- "e enjte",
- "e premte",
- "e shtun\u00eb"
- ],
- "ERANAMES": [
- "para er\u00ebs s\u00eb re",
- "er\u00ebs s\u00eb re"
- ],
- "ERAS": [
- "p.e.r.",
- "e.r."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janar",
- "shkurt",
- "mars",
- "prill",
- "maj",
- "qershor",
- "korrik",
- "gusht",
- "shtator",
- "tetor",
- "n\u00ebntor",
- "dhjetor"
- ],
- "SHORTDAY": [
- "Die",
- "H\u00ebn",
- "Mar",
- "M\u00ebr",
- "Enj",
- "Pre",
- "Sht"
- ],
- "SHORTMONTH": [
- "Jan",
- "Shk",
- "Mar",
- "Pri",
- "Maj",
- "Qer",
- "Kor",
- "Gsh",
- "Sht",
- "Tet",
- "N\u00ebn",
- "Dhj"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy HH:mm",
- "shortDate": "d.M.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Lek",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sq-al",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-mk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-mk.js
deleted file mode 100644
index e7f5c31e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-mk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "paradite",
- "pasdite"
- ],
- "DAY": [
- "e diel",
- "e h\u00ebn\u00eb",
- "e mart\u00eb",
- "e m\u00ebrkur\u00eb",
- "e enjte",
- "e premte",
- "e shtun\u00eb"
- ],
- "ERANAMES": [
- "para er\u00ebs s\u00eb re",
- "er\u00ebs s\u00eb re"
- ],
- "ERAS": [
- "p.e.r.",
- "e.r."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janar",
- "shkurt",
- "mars",
- "prill",
- "maj",
- "qershor",
- "korrik",
- "gusht",
- "shtator",
- "tetor",
- "n\u00ebntor",
- "dhjetor"
- ],
- "SHORTDAY": [
- "Die",
- "H\u00ebn",
- "Mar",
- "M\u00ebr",
- "Enj",
- "Pre",
- "Sht"
- ],
- "SHORTMONTH": [
- "Jan",
- "Shk",
- "Mar",
- "Pri",
- "Maj",
- "Qer",
- "Kor",
- "Gsh",
- "Sht",
- "Tet",
- "N\u00ebn",
- "Dhj"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy HH:mm",
- "shortDate": "d.M.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sq-mk",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-xk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-xk.js
deleted file mode 100644
index ccdf61f5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq-xk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "paradite",
- "pasdite"
- ],
- "DAY": [
- "e diel",
- "e h\u00ebn\u00eb",
- "e mart\u00eb",
- "e m\u00ebrkur\u00eb",
- "e enjte",
- "e premte",
- "e shtun\u00eb"
- ],
- "ERANAMES": [
- "para er\u00ebs s\u00eb re",
- "er\u00ebs s\u00eb re"
- ],
- "ERAS": [
- "p.e.r.",
- "e.r."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janar",
- "shkurt",
- "mars",
- "prill",
- "maj",
- "qershor",
- "korrik",
- "gusht",
- "shtator",
- "tetor",
- "n\u00ebntor",
- "dhjetor"
- ],
- "SHORTDAY": [
- "Die",
- "H\u00ebn",
- "Mar",
- "M\u00ebr",
- "Enj",
- "Pre",
- "Sht"
- ],
- "SHORTMONTH": [
- "Jan",
- "Shk",
- "Mar",
- "Pri",
- "Maj",
- "Qer",
- "Kor",
- "Gsh",
- "Sht",
- "Tet",
- "N\u00ebn",
- "Dhj"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy HH:mm",
- "shortDate": "d.M.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sq-xk",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq.js
deleted file mode 100644
index bc614eed..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sq.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "paradite",
- "pasdite"
- ],
- "DAY": [
- "e diel",
- "e h\u00ebn\u00eb",
- "e mart\u00eb",
- "e m\u00ebrkur\u00eb",
- "e enjte",
- "e premte",
- "e shtun\u00eb"
- ],
- "ERANAMES": [
- "para er\u00ebs s\u00eb re",
- "er\u00ebs s\u00eb re"
- ],
- "ERAS": [
- "p.e.r.",
- "e.r."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janar",
- "shkurt",
- "mars",
- "prill",
- "maj",
- "qershor",
- "korrik",
- "gusht",
- "shtator",
- "tetor",
- "n\u00ebntor",
- "dhjetor"
- ],
- "SHORTDAY": [
- "Die",
- "H\u00ebn",
- "Mar",
- "M\u00ebr",
- "Enj",
- "Pre",
- "Sht"
- ],
- "SHORTMONTH": [
- "Jan",
- "Shk",
- "Mar",
- "Pri",
- "Maj",
- "Qer",
- "Kor",
- "Gsh",
- "Sht",
- "Tet",
- "N\u00ebn",
- "Dhj"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy HH:mm",
- "shortDate": "d.M.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Lek",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sq",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-ba.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-ba.js
deleted file mode 100644
index e3843b15..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-ba.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e \u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0435",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH:mm:ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy. HH:mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-cyrl-ba",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-me.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-me.js
deleted file mode 100644
index 3bf9c2cc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-me.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e \u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0435",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-cyrl-me",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-rs.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-rs.js
deleted file mode 100644
index 0f883f0b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-rs.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e \u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0435",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-cyrl-rs",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-xk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-xk.js
deleted file mode 100644
index cf7c3e2f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl-xk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e \u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0435",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-cyrl-xk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl.js
deleted file mode 100644
index a917cf7f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-cyrl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e \u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0435",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-cyrl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-ba.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-ba.js
deleted file mode 100644
index 54d8cd0e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-ba.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pre podne",
- "po podne"
- ],
- "DAY": [
- "nedelja",
- "ponedeljak",
- "utorak",
- "sreda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Pre nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "jun",
- "jul",
- "avgust",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sre",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "avg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH:mm:ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH:mm:ss",
- "short": "d.M.yy. HH:mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "KM",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-latn-ba",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-me.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-me.js
deleted file mode 100644
index cc0607a1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-me.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pre podne",
- "po podne"
- ],
- "DAY": [
- "nedelja",
- "ponedeljak",
- "utorak",
- "sreda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Pre nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "jun",
- "jul",
- "avgust",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sre",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "avg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-latn-me",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-rs.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-rs.js
deleted file mode 100644
index 517e8eab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-rs.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pre podne",
- "po podne"
- ],
- "DAY": [
- "nedelja",
- "ponedeljak",
- "utorak",
- "sreda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Pre nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "jun",
- "jul",
- "avgust",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sre",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "avg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-latn-rs",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-xk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-xk.js
deleted file mode 100644
index 1cb50a73..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn-xk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pre podne",
- "po podne"
- ],
- "DAY": [
- "nedelja",
- "ponedeljak",
- "utorak",
- "sreda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Pre nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "jun",
- "jul",
- "avgust",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sre",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "avg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-latn-xk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn.js
deleted file mode 100644
index 040041da..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "pre podne",
- "po podne"
- ],
- "DAY": [
- "nedelja",
- "ponedeljak",
- "utorak",
- "sreda",
- "\u010detvrtak",
- "petak",
- "subota"
- ],
- "ERANAMES": [
- "Pre nove ere",
- "Nove ere"
- ],
- "ERAS": [
- "p. n. e.",
- "n. e."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januar",
- "februar",
- "mart",
- "april",
- "maj",
- "jun",
- "jul",
- "avgust",
- "septembar",
- "oktobar",
- "novembar",
- "decembar"
- ],
- "SHORTDAY": [
- "ned",
- "pon",
- "uto",
- "sre",
- "\u010det",
- "pet",
- "sub"
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "mar",
- "apr",
- "maj",
- "jun",
- "jul",
- "avg",
- "sep",
- "okt",
- "nov",
- "dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr.js
deleted file mode 100644
index 15f2f1de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435",
- "\u043f\u043e \u043f\u043e\u0434\u043d\u0435"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0435\u0459\u0430",
- "\u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a",
- "\u0443\u0442\u043e\u0440\u0430\u043a",
- "\u0441\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a",
- "\u043f\u0435\u0442\u0430\u043a",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435",
- "\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"
- ],
- "ERAS": [
- "\u043f. \u043d. \u0435.",
- "\u043d. \u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0458\u0430\u043d\u0443\u0430\u0440",
- "\u0444\u0435\u0431\u0440\u0443\u0430\u0440",
- "\u043c\u0430\u0440\u0442",
- "\u0430\u043f\u0440\u0438\u043b",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433\u0443\u0441\u0442",
- "\u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440",
- "\u043e\u043a\u0442\u043e\u0431\u0430\u0440",
- "\u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440",
- "\u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440"
- ],
- "SHORTDAY": [
- "\u043d\u0435\u0434",
- "\u043f\u043e\u043d",
- "\u0443\u0442\u043e",
- "\u0441\u0440\u0435",
- "\u0447\u0435\u0442",
- "\u043f\u0435\u0442",
- "\u0441\u0443\u0431"
- ],
- "SHORTMONTH": [
- "\u0458\u0430\u043d",
- "\u0444\u0435\u0431",
- "\u043c\u0430\u0440",
- "\u0430\u043f\u0440",
- "\u043c\u0430\u0458",
- "\u0458\u0443\u043d",
- "\u0458\u0443\u043b",
- "\u0430\u0432\u0433",
- "\u0441\u0435\u043f",
- "\u043e\u043a\u0442",
- "\u043d\u043e\u0432",
- "\u0434\u0435\u0446"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, dd. MMMM y.",
- "longDate": "dd. MMMM y.",
- "medium": "dd.MM.y. HH.mm.ss",
- "mediumDate": "dd.MM.y.",
- "mediumTime": "HH.mm.ss",
- "short": "d.M.yy. HH.mm",
- "shortDate": "d.M.yy.",
- "shortTime": "HH.mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "din",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-sz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-sz.js
deleted file mode 100644
index ae1fdd5f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-sz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lisontfo",
- "uMsombuluko",
- "Lesibili",
- "Lesitsatfu",
- "Lesine",
- "Lesihlanu",
- "uMgcibelo"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Bhimbidvwane",
- "iNdlovana",
- "iNdlovu-lenkhulu",
- "Mabasa",
- "iNkhwekhweti",
- "iNhlaba",
- "Kholwane",
- "iNgci",
- "iNyoni",
- "iMphala",
- "Lweti",
- "iNgongoni"
- ],
- "SHORTDAY": [
- "Son",
- "Mso",
- "Bil",
- "Tsa",
- "Ne",
- "Hla",
- "Mgc"
- ],
- "SHORTMONTH": [
- "Bhi",
- "Van",
- "Vol",
- "Mab",
- "Nkh",
- "Nhl",
- "Kho",
- "Ngc",
- "Nyo",
- "Mph",
- "Lwe",
- "Ngo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "SZL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ss-sz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-za.js
deleted file mode 100644
index afb5b99b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lisontfo",
- "uMsombuluko",
- "Lesibili",
- "Lesitsatfu",
- "Lesine",
- "Lesihlanu",
- "uMgcibelo"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Bhimbidvwane",
- "iNdlovana",
- "iNdlovu-lenkhulu",
- "Mabasa",
- "iNkhwekhweti",
- "iNhlaba",
- "Kholwane",
- "iNgci",
- "iNyoni",
- "iMphala",
- "Lweti",
- "iNgongoni"
- ],
- "SHORTDAY": [
- "Son",
- "Mso",
- "Bil",
- "Tsa",
- "Ne",
- "Hla",
- "Mgc"
- ],
- "SHORTMONTH": [
- "Bhi",
- "Van",
- "Vol",
- "Mab",
- "Nkh",
- "Nhl",
- "Kho",
- "Ngc",
- "Nyo",
- "Mph",
- "Lwe",
- "Ngo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ss-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss.js
deleted file mode 100644
index 3ff88460..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ss.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Lisontfo",
- "uMsombuluko",
- "Lesibili",
- "Lesitsatfu",
- "Lesine",
- "Lesihlanu",
- "uMgcibelo"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Bhimbidvwane",
- "iNdlovana",
- "iNdlovu-lenkhulu",
- "Mabasa",
- "iNkhwekhweti",
- "iNhlaba",
- "Kholwane",
- "iNgci",
- "iNyoni",
- "iMphala",
- "Lweti",
- "iNgongoni"
- ],
- "SHORTDAY": [
- "Son",
- "Mso",
- "Bil",
- "Tsa",
- "Ne",
- "Hla",
- "Mgc"
- ],
- "SHORTMONTH": [
- "Bhi",
- "Van",
- "Vol",
- "Mab",
- "Nkh",
- "Nhl",
- "Kho",
- "Ngc",
- "Nyo",
- "Mph",
- "Lwe",
- "Ngo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ss",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy-er.js
deleted file mode 100644
index d4cb8e5d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy-er.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "saaku",
- "carra"
- ],
- "DAY": [
- "Naba Sambat",
- "Sani",
- "Salus",
- "Rabuq",
- "Camus",
- "Jumqata",
- "Qunxa Sambat"
- ],
- "ERANAMES": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "ERAS": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Qunxa Garablu",
- "Kudo",
- "Ciggilta Kudo",
- "Agda Baxis",
- "Caxah Alsa",
- "Qasa Dirri",
- "Qado Dirri",
- "Liiqen",
- "Waysu",
- "Diteli",
- "Ximoli",
- "Kaxxa Garablu"
- ],
- "SHORTDAY": [
- "Nab",
- "San",
- "Sal",
- "Rab",
- "Cam",
- "Jum",
- "Qun"
- ],
- "SHORTMONTH": [
- "Qun",
- "Nah",
- "Cig",
- "Agd",
- "Cax",
- "Qas",
- "Qad",
- "Leq",
- "Way",
- "Dit",
- "Xim",
- "Kax"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ssy-er",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy.js
deleted file mode 100644
index 93c0eba0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ssy.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "saaku",
- "carra"
- ],
- "DAY": [
- "Naba Sambat",
- "Sani",
- "Salus",
- "Rabuq",
- "Camus",
- "Jumqata",
- "Qunxa Sambat"
- ],
- "ERANAMES": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "ERAS": [
- "Yaasuusuk Duma",
- "Yaasuusuk Wadir"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Qunxa Garablu",
- "Kudo",
- "Ciggilta Kudo",
- "Agda Baxis",
- "Caxah Alsa",
- "Qasa Dirri",
- "Qado Dirri",
- "Liiqen",
- "Waysu",
- "Diteli",
- "Ximoli",
- "Kaxxa Garablu"
- ],
- "SHORTDAY": [
- "Nab",
- "San",
- "Sal",
- "Rab",
- "Cam",
- "Jum",
- "Qun"
- ],
- "SHORTMONTH": [
- "Qun",
- "Nah",
- "Cig",
- "Agd",
- "Cax",
- "Qas",
- "Qad",
- "Leq",
- "Way",
- "Dit",
- "Xim",
- "Kax"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM dd, y",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ssy",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-ls.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-ls.js
deleted file mode 100644
index c17e6a3c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-ls.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sontaha",
- "Mmantaha",
- "Labobedi",
- "Laboraru",
- "Labone",
- "Labohlane",
- "Moqebelo"
- ],
- "MONTH": [
- "Phesekgong",
- "Hlakola",
- "Hlakubele",
- "Mmese",
- "Motsheanong",
- "Phupjane",
- "Phupu",
- "Phata",
- "Leotshe",
- "Mphalane",
- "Pundungwane",
- "Tshitwe"
- ],
- "SHORTDAY": [
- "Son",
- "Mma",
- "Bed",
- "Rar",
- "Ne",
- "Hla",
- "Moq"
- ],
- "SHORTMONTH": [
- "Phe",
- "Kol",
- "Ube",
- "Mme",
- "Mot",
- "Jan",
- "Upu",
- "Pha",
- "Leo",
- "Mph",
- "Pun",
- "Tsh"
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "st-ls",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-za.js
deleted file mode 100644
index ed1ac9cd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st-za.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sontaha",
- "Mmantaha",
- "Labobedi",
- "Laboraru",
- "Labone",
- "Labohlane",
- "Moqebelo"
- ],
- "MONTH": [
- "Phesekgong",
- "Hlakola",
- "Hlakubele",
- "Mmese",
- "Motsheanong",
- "Phupjane",
- "Phupu",
- "Phata",
- "Leotshe",
- "Mphalane",
- "Pundungwane",
- "Tshitwe"
- ],
- "SHORTDAY": [
- "Son",
- "Mma",
- "Bed",
- "Rar",
- "Ne",
- "Hla",
- "Moq"
- ],
- "SHORTMONTH": [
- "Phe",
- "Kol",
- "Ube",
- "Mme",
- "Mot",
- "Jan",
- "Upu",
- "Pha",
- "Leo",
- "Mph",
- "Pun",
- "Tsh"
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "st-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st.js
deleted file mode 100644
index 64d95b6b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_st.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sontaha",
- "Mmantaha",
- "Labobedi",
- "Laboraru",
- "Labone",
- "Labohlane",
- "Moqebelo"
- ],
- "MONTH": [
- "Phesekgong",
- "Hlakola",
- "Hlakubele",
- "Mmese",
- "Motsheanong",
- "Phupjane",
- "Phupu",
- "Phata",
- "Leotshe",
- "Mphalane",
- "Pundungwane",
- "Tshitwe"
- ],
- "SHORTDAY": [
- "Son",
- "Mma",
- "Bed",
- "Rar",
- "Ne",
- "Hla",
- "Moq"
- ],
- "SHORTMONTH": [
- "Phe",
- "Kol",
- "Ube",
- "Mme",
- "Mot",
- "Jan",
- "Upu",
- "Pha",
- "Leo",
- "Mph",
- "Pun",
- "Tsh"
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "st",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-ax.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-ax.js
deleted file mode 100644
index 3c2e1f0d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-ax.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "fm",
- "em"
- ],
- "DAY": [
- "s\u00f6ndag",
- "m\u00e5ndag",
- "tisdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f6rdag"
- ],
- "ERANAMES": [
- "f\u00f6re Kristus",
- "efter Kristus"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "mars",
- "april",
- "maj",
- "juni",
- "juli",
- "augusti",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f6n",
- "m\u00e5n",
- "tis",
- "ons",
- "tors",
- "fre",
- "l\u00f6r"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mars",
- "apr.",
- "maj",
- "juni",
- "juli",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sv-ax",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-fi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-fi.js
deleted file mode 100644
index 2d62ce66..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-fi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "fm",
- "em"
- ],
- "DAY": [
- "s\u00f6ndag",
- "m\u00e5ndag",
- "tisdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f6rdag"
- ],
- "ERANAMES": [
- "f\u00f6re Kristus",
- "efter Kristus"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "mars",
- "april",
- "maj",
- "juni",
- "juli",
- "augusti",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f6n",
- "m\u00e5n",
- "tis",
- "ons",
- "tors",
- "fre",
- "l\u00f6r"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mars",
- "apr.",
- "maj",
- "juni",
- "juli",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd-MM-y HH:mm",
- "shortDate": "dd-MM-y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sv-fi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-se.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-se.js
deleted file mode 100644
index 124285db..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv-se.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "fm",
- "em"
- ],
- "DAY": [
- "s\u00f6ndag",
- "m\u00e5ndag",
- "tisdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f6rdag"
- ],
- "ERANAMES": [
- "f\u00f6re Kristus",
- "efter Kristus"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "mars",
- "april",
- "maj",
- "juni",
- "juli",
- "augusti",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f6n",
- "m\u00e5n",
- "tis",
- "ons",
- "tors",
- "fre",
- "l\u00f6r"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mars",
- "apr.",
- "maj",
- "juni",
- "juli",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sv-se",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv.js
deleted file mode 100644
index dfd1aa78..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sv.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "fm",
- "em"
- ],
- "DAY": [
- "s\u00f6ndag",
- "m\u00e5ndag",
- "tisdag",
- "onsdag",
- "torsdag",
- "fredag",
- "l\u00f6rdag"
- ],
- "ERANAMES": [
- "f\u00f6re Kristus",
- "efter Kristus"
- ],
- "ERAS": [
- "f.Kr.",
- "e.Kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "januari",
- "februari",
- "mars",
- "april",
- "maj",
- "juni",
- "juli",
- "augusti",
- "september",
- "oktober",
- "november",
- "december"
- ],
- "SHORTDAY": [
- "s\u00f6n",
- "m\u00e5n",
- "tis",
- "ons",
- "tors",
- "fre",
- "l\u00f6r"
- ],
- "SHORTMONTH": [
- "jan.",
- "feb.",
- "mars",
- "apr.",
- "maj",
- "juni",
- "juli",
- "aug.",
- "sep.",
- "okt.",
- "nov.",
- "dec."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "kr",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "sv",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-cd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-cd.js
deleted file mode 100644
index b41d77c8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-cd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ya asubuyi",
- "ya muchana"
- ],
- "DAY": [
- "siku ya yenga",
- "siku ya kwanza",
- "siku ya pili",
- "siku ya tatu",
- "siku ya ine",
- "siku ya tanu",
- "siku ya sita"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "mwezi ya kwanja",
- "mwezi ya pili",
- "mwezi ya tatu",
- "mwezi ya ine",
- "mwezi ya tanu",
- "mwezi ya sita",
- "mwezi ya saba",
- "mwezi ya munane",
- "mwezi ya tisa",
- "mwezi ya kumi",
- "mwezi ya kumi na moya",
- "mwezi ya kumi ya mbili"
- ],
- "SHORTDAY": [
- "yen",
- "kwa",
- "pil",
- "tat",
- "ine",
- "tan",
- "sit"
- ],
- "SHORTMONTH": [
- "mkw",
- "mpi",
- "mtu",
- "min",
- "mtn",
- "mst",
- "msb",
- "mun",
- "mts",
- "mku",
- "mkm",
- "mkb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sw-cd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ke.js
deleted file mode 100644
index 6230e7c9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sw-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-tz.js
deleted file mode 100644
index 3f1cc2d2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sw-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ug.js
deleted file mode 100644
index f2d03120..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sw-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw.js
deleted file mode 100644
index e6dd8fe8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_sw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristo",
- "Baada ya Kristo"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprili",
- "Mei",
- "Juni",
- "Julai",
- "Agosti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jumapili",
- "Jumatatu",
- "Jumanne",
- "Jumatano",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "sw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc-cd.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc-cd.js
deleted file mode 100644
index 4e51c156..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc-cd.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ya asubuyi",
- "ya muchana"
- ],
- "DAY": [
- "siku ya yenga",
- "siku ya kwanza",
- "siku ya pili",
- "siku ya tatu",
- "siku ya ine",
- "siku ya tanu",
- "siku ya sita"
- ],
- "ERANAMES": [
- "mbele ya Yezu Kristo",
- "kisha ya Yezu Kristo"
- ],
- "ERAS": [
- "mbele ya Y",
- "kisha ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "mwezi ya kwanja",
- "mwezi ya pili",
- "mwezi ya tatu",
- "mwezi ya ine",
- "mwezi ya tanu",
- "mwezi ya sita",
- "mwezi ya saba",
- "mwezi ya munane",
- "mwezi ya tisa",
- "mwezi ya kumi",
- "mwezi ya kumi na moya",
- "mwezi ya kumi ya mbili"
- ],
- "SHORTDAY": [
- "yen",
- "kwa",
- "pil",
- "tat",
- "ine",
- "tan",
- "sit"
- ],
- "SHORTMONTH": [
- "mkw",
- "mpi",
- "mtu",
- "min",
- "mtn",
- "mst",
- "msb",
- "mun",
- "mts",
- "mku",
- "mkm",
- "mkb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "swc-cd",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc.js
deleted file mode 100644
index 5390f3bf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_swc.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ya asubuyi",
- "ya muchana"
- ],
- "DAY": [
- "siku ya yenga",
- "siku ya kwanza",
- "siku ya pili",
- "siku ya tatu",
- "siku ya ine",
- "siku ya tanu",
- "siku ya sita"
- ],
- "ERANAMES": [
- "mbele ya Yezu Kristo",
- "kisha ya Yezu Kristo"
- ],
- "ERAS": [
- "mbele ya Y",
- "kisha ya Y"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "mwezi ya kwanja",
- "mwezi ya pili",
- "mwezi ya tatu",
- "mwezi ya ine",
- "mwezi ya tanu",
- "mwezi ya sita",
- "mwezi ya saba",
- "mwezi ya munane",
- "mwezi ya tisa",
- "mwezi ya kumi",
- "mwezi ya kumi na moya",
- "mwezi ya kumi ya mbili"
- ],
- "SHORTDAY": [
- "yen",
- "kwa",
- "pil",
- "tat",
- "ine",
- "tan",
- "sit"
- ],
- "SHORTMONTH": [
- "mkw",
- "mpi",
- "mtu",
- "min",
- "mtn",
- "mst",
- "msb",
- "mun",
- "mts",
- "mku",
- "mkm",
- "mkb"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FrCD",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "swc",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-in.js
deleted file mode 100644
index 8ef2205a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd",
- "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd"
- ],
- "DAY": [
- "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1",
- "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd",
- "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd",
- "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd",
- "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf",
- "\u0b9a\u0ba9\u0bbf"
- ],
- "ERANAMES": [
- "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd",
- "\u0b85\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf"
- ],
- "ERAS": [
- "\u0b95\u0bbf.\u0bae\u0bc1.",
- "\u0b95\u0bbf.\u0baa\u0bbf."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf",
- "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf",
- "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd",
- "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd",
- "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd",
- "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd"
- ],
- "SHORTDAY": [
- "\u0b9e\u0bbe",
- "\u0ba4\u0bbf",
- "\u0b9a\u0bc6",
- "\u0baa\u0bc1",
- "\u0bb5\u0bbf",
- "\u0bb5\u0bc6",
- "\u0b9a"
- ],
- "SHORTMONTH": [
- "\u0b9c\u0ba9.",
- "\u0baa\u0bbf\u0baa\u0bcd.",
- "\u0bae\u0bbe\u0bb0\u0bcd.",
- "\u0b8f\u0baa\u0bcd.",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95.",
- "\u0b9a\u0bc6\u0baa\u0bcd.",
- "\u0b85\u0b95\u0bcd.",
- "\u0ba8\u0bb5.",
- "\u0b9f\u0bbf\u0b9a."
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ta-in",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-lk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-lk.js
deleted file mode 100644
index ffb0e7ca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-lk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd",
- "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd"
- ],
- "DAY": [
- "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1",
- "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd",
- "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd",
- "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd",
- "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf",
- "\u0b9a\u0ba9\u0bbf"
- ],
- "ERANAMES": [
- "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd",
- "\u0b85\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf"
- ],
- "ERAS": [
- "\u0b95\u0bbf.\u0bae\u0bc1.",
- "\u0b95\u0bbf.\u0baa\u0bbf."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf",
- "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf",
- "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd",
- "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd",
- "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd",
- "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd"
- ],
- "SHORTDAY": [
- "\u0b9e\u0bbe",
- "\u0ba4\u0bbf",
- "\u0b9a\u0bc6",
- "\u0baa\u0bc1",
- "\u0bb5\u0bbf",
- "\u0bb5\u0bc6",
- "\u0b9a"
- ],
- "SHORTMONTH": [
- "\u0b9c\u0ba9.",
- "\u0baa\u0bbf\u0baa\u0bcd.",
- "\u0bae\u0bbe\u0bb0\u0bcd.",
- "\u0b8f\u0baa\u0bcd.",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95.",
- "\u0b9a\u0bc6\u0baa\u0bcd.",
- "\u0b85\u0b95\u0bcd.",
- "\u0ba8\u0bb5.",
- "\u0b9f\u0bbf\u0b9a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ta-lk",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-my.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-my.js
deleted file mode 100644
index 3a9287a6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-my.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd",
- "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd"
- ],
- "DAY": [
- "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1",
- "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd",
- "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd",
- "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd",
- "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf",
- "\u0b9a\u0ba9\u0bbf"
- ],
- "ERANAMES": [
- "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd",
- "\u0b85\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf"
- ],
- "ERAS": [
- "\u0b95\u0bbf.\u0bae\u0bc1.",
- "\u0b95\u0bbf.\u0baa\u0bbf."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf",
- "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf",
- "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd",
- "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd",
- "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd",
- "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd"
- ],
- "SHORTDAY": [
- "\u0b9e\u0bbe",
- "\u0ba4\u0bbf",
- "\u0b9a\u0bc6",
- "\u0baa\u0bc1",
- "\u0bb5\u0bbf",
- "\u0bb5\u0bc6",
- "\u0b9a"
- ],
- "SHORTMONTH": [
- "\u0b9c\u0ba9.",
- "\u0baa\u0bbf\u0baa\u0bcd.",
- "\u0bae\u0bbe\u0bb0\u0bcd.",
- "\u0b8f\u0baa\u0bcd.",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95.",
- "\u0b9a\u0bc6\u0baa\u0bcd.",
- "\u0b85\u0b95\u0bcd.",
- "\u0ba8\u0bb5.",
- "\u0b9f\u0bbf\u0b9a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "RM",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ta-my",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-sg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-sg.js
deleted file mode 100644
index fc6a77d8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta-sg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd",
- "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd"
- ],
- "DAY": [
- "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1",
- "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd",
- "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd",
- "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd",
- "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf",
- "\u0b9a\u0ba9\u0bbf"
- ],
- "ERANAMES": [
- "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd",
- "\u0b85\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf"
- ],
- "ERAS": [
- "\u0b95\u0bbf.\u0bae\u0bc1.",
- "\u0b95\u0bbf.\u0baa\u0bbf."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf",
- "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf",
- "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd",
- "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd",
- "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd",
- "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd"
- ],
- "SHORTDAY": [
- "\u0b9e\u0bbe",
- "\u0ba4\u0bbf",
- "\u0b9a\u0bc6",
- "\u0baa\u0bc1",
- "\u0bb5\u0bbf",
- "\u0bb5\u0bc6",
- "\u0b9a"
- ],
- "SHORTMONTH": [
- "\u0b9c\u0ba9.",
- "\u0baa\u0bbf\u0baa\u0bcd.",
- "\u0bae\u0bbe\u0bb0\u0bcd.",
- "\u0b8f\u0baa\u0bcd.",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95.",
- "\u0b9a\u0bc6\u0baa\u0bcd.",
- "\u0b85\u0b95\u0bcd.",
- "\u0ba8\u0bb5.",
- "\u0b9f\u0bbf\u0b9a."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ta-sg",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta.js
deleted file mode 100644
index 62726246..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ta.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0bae\u0bc1\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd",
- "\u0baa\u0bbf\u0bb1\u0bcd\u0baa\u0b95\u0bb2\u0bcd"
- ],
- "DAY": [
- "\u0b9e\u0bbe\u0baf\u0bbf\u0bb1\u0bc1",
- "\u0ba4\u0bbf\u0b99\u0bcd\u0b95\u0bb3\u0bcd",
- "\u0b9a\u0bc6\u0bb5\u0bcd\u0bb5\u0bbe\u0baf\u0bcd",
- "\u0baa\u0bc1\u0ba4\u0ba9\u0bcd",
- "\u0bb5\u0bbf\u0baf\u0bbe\u0bb4\u0ba9\u0bcd",
- "\u0bb5\u0bc6\u0bb3\u0bcd\u0bb3\u0bbf",
- "\u0b9a\u0ba9\u0bbf"
- ],
- "ERANAMES": [
- "\u0b95\u0bbf\u0bb1\u0bbf\u0bb8\u0bcd\u0ba4\u0bc1\u0bb5\u0bc1\u0b95\u0bcd\u0b95\u0bc1 \u0bae\u0bc1\u0ba9\u0bcd",
- "\u0b85\u0ba9\u0bcb \u0b9f\u0bcb\u0bae\u0bbf\u0ba9\u0bbf"
- ],
- "ERAS": [
- "\u0b95\u0bbf.\u0bae\u0bc1.",
- "\u0b95\u0bbf.\u0baa\u0bbf."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0b9c\u0ba9\u0bb5\u0bb0\u0bbf",
- "\u0baa\u0bbf\u0baa\u0bcd\u0bb0\u0bb5\u0bb0\u0bbf",
- "\u0bae\u0bbe\u0bb0\u0bcd\u0b9a\u0bcd",
- "\u0b8f\u0baa\u0bcd\u0bb0\u0bb2\u0bcd",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95\u0bb8\u0bcd\u0b9f\u0bcd",
- "\u0b9a\u0bc6\u0baa\u0bcd\u0b9f\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b85\u0b95\u0bcd\u0b9f\u0bcb\u0baa\u0bb0\u0bcd",
- "\u0ba8\u0bb5\u0bae\u0bcd\u0baa\u0bb0\u0bcd",
- "\u0b9f\u0bbf\u0b9a\u0bae\u0bcd\u0baa\u0bb0\u0bcd"
- ],
- "SHORTDAY": [
- "\u0b9e\u0bbe",
- "\u0ba4\u0bbf",
- "\u0b9a\u0bc6",
- "\u0baa\u0bc1",
- "\u0bb5\u0bbf",
- "\u0bb5\u0bc6",
- "\u0b9a"
- ],
- "SHORTMONTH": [
- "\u0b9c\u0ba9.",
- "\u0baa\u0bbf\u0baa\u0bcd.",
- "\u0bae\u0bbe\u0bb0\u0bcd.",
- "\u0b8f\u0baa\u0bcd.",
- "\u0bae\u0bc7",
- "\u0b9c\u0bc2\u0ba9\u0bcd",
- "\u0b9c\u0bc2\u0bb2\u0bc8",
- "\u0b86\u0b95.",
- "\u0b9a\u0bc6\u0baa\u0bcd.",
- "\u0b85\u0b95\u0bcd.",
- "\u0ba8\u0bb5.",
- "\u0b9f\u0bbf\u0b9a."
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE, d MMMM, y",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "d-M-yy h:mm a",
- "shortDate": "d-M-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ta",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te-in.js
deleted file mode 100644
index fccdcfe8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te-in.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "[AM]",
- "[PM]"
- ],
- "DAY": [
- "\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02",
- "\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02",
- "\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02",
- "\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02",
- "\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02",
- "\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02",
- "\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02"
- ],
- "ERANAMES": [
- "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c2a\u0c42\u0c30\u0c4d\u0c35\u0c02",
- "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c36\u0c15\u0c02"
- ],
- "ERAS": [
- "\u0c15\u0c4d\u0c30\u0c40\u0c2a\u0c42",
- "\u0c15\u0c4d\u0c30\u0c40\u0c36"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0c1c\u0c28\u0c35\u0c30\u0c3f",
- "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f",
- "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f",
- "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d",
- "\u0c2e\u0c47",
- "\u0c1c\u0c42\u0c28\u0c4d",
- "\u0c1c\u0c41\u0c32\u0c48",
- "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41",
- "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d",
- "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d",
- "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d",
- "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d"
- ],
- "SHORTDAY": [
- "\u0c06\u0c26\u0c3f",
- "\u0c38\u0c4b\u0c2e",
- "\u0c2e\u0c02\u0c17\u0c33",
- "\u0c2c\u0c41\u0c27",
- "\u0c17\u0c41\u0c30\u0c41",
- "\u0c36\u0c41\u0c15\u0c4d\u0c30",
- "\u0c36\u0c28\u0c3f"
- ],
- "SHORTMONTH": [
- "\u0c1c\u0c28",
- "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30",
- "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f",
- "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f",
- "\u0c2e\u0c47",
- "\u0c1c\u0c42\u0c28\u0c4d",
- "\u0c1c\u0c41\u0c32\u0c48",
- "\u0c06\u0c17",
- "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02",
- "\u0c05\u0c15\u0c4d\u0c1f\u0c4b",
- "\u0c28\u0c35\u0c02",
- "\u0c21\u0c3f\u0c38\u0c46\u0c02"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "d, MMMM y, EEEE",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "dd-MM-yy h:mm a",
- "shortDate": "dd-MM-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "te-in",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te.js
deleted file mode 100644
index a3c493fc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_te.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "[AM]",
- "[PM]"
- ],
- "DAY": [
- "\u0c06\u0c26\u0c3f\u0c35\u0c3e\u0c30\u0c02",
- "\u0c38\u0c4b\u0c2e\u0c35\u0c3e\u0c30\u0c02",
- "\u0c2e\u0c02\u0c17\u0c33\u0c35\u0c3e\u0c30\u0c02",
- "\u0c2c\u0c41\u0c27\u0c35\u0c3e\u0c30\u0c02",
- "\u0c17\u0c41\u0c30\u0c41\u0c35\u0c3e\u0c30\u0c02",
- "\u0c36\u0c41\u0c15\u0c4d\u0c30\u0c35\u0c3e\u0c30\u0c02",
- "\u0c36\u0c28\u0c3f\u0c35\u0c3e\u0c30\u0c02"
- ],
- "ERANAMES": [
- "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c2a\u0c42\u0c30\u0c4d\u0c35\u0c02",
- "\u0c15\u0c4d\u0c30\u0c40\u0c38\u0c4d\u0c24\u0c41 \u0c36\u0c15\u0c02"
- ],
- "ERAS": [
- "\u0c15\u0c4d\u0c30\u0c40\u0c2a\u0c42",
- "\u0c15\u0c4d\u0c30\u0c40\u0c36"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0c1c\u0c28\u0c35\u0c30\u0c3f",
- "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30\u0c35\u0c30\u0c3f",
- "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f",
- "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f\u0c32\u0c4d",
- "\u0c2e\u0c47",
- "\u0c1c\u0c42\u0c28\u0c4d",
- "\u0c1c\u0c41\u0c32\u0c48",
- "\u0c06\u0c17\u0c38\u0c4d\u0c1f\u0c41",
- "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02\u0c2c\u0c30\u0c4d",
- "\u0c05\u0c15\u0c4d\u0c1f\u0c4b\u0c2c\u0c30\u0c4d",
- "\u0c28\u0c35\u0c02\u0c2c\u0c30\u0c4d",
- "\u0c21\u0c3f\u0c38\u0c46\u0c02\u0c2c\u0c30\u0c4d"
- ],
- "SHORTDAY": [
- "\u0c06\u0c26\u0c3f",
- "\u0c38\u0c4b\u0c2e",
- "\u0c2e\u0c02\u0c17\u0c33",
- "\u0c2c\u0c41\u0c27",
- "\u0c17\u0c41\u0c30\u0c41",
- "\u0c36\u0c41\u0c15\u0c4d\u0c30",
- "\u0c36\u0c28\u0c3f"
- ],
- "SHORTMONTH": [
- "\u0c1c\u0c28",
- "\u0c2b\u0c3f\u0c2c\u0c4d\u0c30",
- "\u0c2e\u0c3e\u0c30\u0c4d\u0c1a\u0c3f",
- "\u0c0f\u0c2a\u0c4d\u0c30\u0c3f",
- "\u0c2e\u0c47",
- "\u0c1c\u0c42\u0c28\u0c4d",
- "\u0c1c\u0c41\u0c32\u0c48",
- "\u0c06\u0c17",
- "\u0c38\u0c46\u0c2a\u0c4d\u0c1f\u0c46\u0c02",
- "\u0c05\u0c15\u0c4d\u0c1f\u0c4b",
- "\u0c28\u0c35\u0c02",
- "\u0c21\u0c3f\u0c38\u0c46\u0c02"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "d, MMMM y, EEEE",
- "longDate": "d MMMM, y",
- "medium": "d MMM, y h:mm:ss a",
- "mediumDate": "d MMM, y",
- "mediumTime": "h:mm:ss a",
- "short": "dd-MM-yy h:mm a",
- "shortDate": "dd-MM-yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "te",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ke.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ke.js
deleted file mode 100644
index 04178e1c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ke.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Taparachu",
- "Ebongi"
- ],
- "DAY": [
- "Nakaejuma",
- "Nakaebarasa",
- "Nakaare",
- "Nakauni",
- "Nakaung\u2019on",
- "Nakakany",
- "Nakasabiti"
- ],
- "ERANAMES": [
- "Kabla ya Christo",
- "Baada ya Christo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Orara",
- "Omuk",
- "Okwamg\u2019",
- "Odung\u2019el",
- "Omaruk",
- "Omodok\u2019king\u2019ol",
- "Ojola",
- "Opedel",
- "Osokosokoma",
- "Otibar",
- "Olabor",
- "Opoo"
- ],
- "SHORTDAY": [
- "Jum",
- "Bar",
- "Aar",
- "Uni",
- "Ung",
- "Kan",
- "Sab"
- ],
- "SHORTMONTH": [
- "Rar",
- "Muk",
- "Kwa",
- "Dun",
- "Mar",
- "Mod",
- "Jol",
- "Ped",
- "Sok",
- "Tib",
- "Lab",
- "Poo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Ksh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "teo-ke",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ug.js
deleted file mode 100644
index 8a6e1a78..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Taparachu",
- "Ebongi"
- ],
- "DAY": [
- "Nakaejuma",
- "Nakaebarasa",
- "Nakaare",
- "Nakauni",
- "Nakaung\u2019on",
- "Nakakany",
- "Nakasabiti"
- ],
- "ERANAMES": [
- "Kabla ya Christo",
- "Baada ya Christo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Orara",
- "Omuk",
- "Okwamg\u2019",
- "Odung\u2019el",
- "Omaruk",
- "Omodok\u2019king\u2019ol",
- "Ojola",
- "Opedel",
- "Osokosokoma",
- "Otibar",
- "Olabor",
- "Opoo"
- ],
- "SHORTDAY": [
- "Jum",
- "Bar",
- "Aar",
- "Uni",
- "Ung",
- "Kan",
- "Sab"
- ],
- "SHORTMONTH": [
- "Rar",
- "Muk",
- "Kwa",
- "Dun",
- "Mar",
- "Mod",
- "Jol",
- "Ped",
- "Sok",
- "Tib",
- "Lab",
- "Poo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "teo-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo.js
deleted file mode 100644
index b3a750c6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_teo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Taparachu",
- "Ebongi"
- ],
- "DAY": [
- "Nakaejuma",
- "Nakaebarasa",
- "Nakaare",
- "Nakauni",
- "Nakaung\u2019on",
- "Nakakany",
- "Nakasabiti"
- ],
- "ERANAMES": [
- "Kabla ya Christo",
- "Baada ya Christo"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Orara",
- "Omuk",
- "Okwamg\u2019",
- "Odung\u2019el",
- "Omaruk",
- "Omodok\u2019king\u2019ol",
- "Ojola",
- "Opedel",
- "Osokosokoma",
- "Otibar",
- "Olabor",
- "Opoo"
- ],
- "SHORTDAY": [
- "Jum",
- "Bar",
- "Aar",
- "Uni",
- "Ung",
- "Kan",
- "Sab"
- ],
- "SHORTMONTH": [
- "Rar",
- "Muk",
- "Kwa",
- "Dun",
- "Mar",
- "Mod",
- "Jol",
- "Ped",
- "Sok",
- "Tib",
- "Lab",
- "Poo"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "teo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl-tj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl-tj.js
deleted file mode 100644
index c25e8f70..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl-tj.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0435. \u0447\u043e.",
- "\u043f\u0430. \u0447\u043e."
- ],
- "DAY": [
- "\u042f\u043a\u0448\u0430\u043d\u0431\u0435",
- "\u0414\u0443\u0448\u0430\u043d\u0431\u0435",
- "\u0421\u0435\u0448\u0430\u043d\u0431\u0435",
- "\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0435",
- "\u041f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435",
- "\u04b6\u0443\u043c\u044a\u0430",
- "\u0428\u0430\u043d\u0431\u0435"
- ],
- "MONTH": [
- "\u042f\u043d\u0432\u0430\u0440",
- "\u0424\u0435\u0432\u0440\u0430\u043b",
- "\u041c\u0430\u0440\u0442",
- "\u0410\u043f\u0440\u0435\u043b",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433\u0443\u0441\u0442",
- "\u0421\u0435\u043d\u0442\u044f\u0431\u0440",
- "\u041e\u043a\u0442\u044f\u0431\u0440",
- "\u041d\u043e\u044f\u0431\u0440",
- "\u0414\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u042f\u0448\u0431",
- "\u0414\u0448\u0431",
- "\u0421\u0448\u0431",
- "\u0427\u0448\u0431",
- "\u041f\u0448\u0431",
- "\u04b6\u043c\u044a",
- "\u0428\u043d\u0431"
- ],
- "SHORTMONTH": [
- "\u042f\u043d\u0432",
- "\u0424\u0435\u0432",
- "\u041c\u0430\u0440",
- "\u0410\u043f\u0440",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433",
- "\u0421\u0435\u043d",
- "\u041e\u043a\u0442",
- "\u041d\u043e\u044f",
- "\u0414\u0435\u043a"
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Som",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "tg-cyrl-tj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl.js
deleted file mode 100644
index 7c0b60f6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg-cyrl.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0435. \u0447\u043e.",
- "\u043f\u0430. \u0447\u043e."
- ],
- "DAY": [
- "\u042f\u043a\u0448\u0430\u043d\u0431\u0435",
- "\u0414\u0443\u0448\u0430\u043d\u0431\u0435",
- "\u0421\u0435\u0448\u0430\u043d\u0431\u0435",
- "\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0435",
- "\u041f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435",
- "\u04b6\u0443\u043c\u044a\u0430",
- "\u0428\u0430\u043d\u0431\u0435"
- ],
- "MONTH": [
- "\u042f\u043d\u0432\u0430\u0440",
- "\u0424\u0435\u0432\u0440\u0430\u043b",
- "\u041c\u0430\u0440\u0442",
- "\u0410\u043f\u0440\u0435\u043b",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433\u0443\u0441\u0442",
- "\u0421\u0435\u043d\u0442\u044f\u0431\u0440",
- "\u041e\u043a\u0442\u044f\u0431\u0440",
- "\u041d\u043e\u044f\u0431\u0440",
- "\u0414\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u042f\u0448\u0431",
- "\u0414\u0448\u0431",
- "\u0421\u0448\u0431",
- "\u0427\u0448\u0431",
- "\u041f\u0448\u0431",
- "\u04b6\u043c\u044a",
- "\u0428\u043d\u0431"
- ],
- "SHORTMONTH": [
- "\u042f\u043d\u0432",
- "\u0424\u0435\u0432",
- "\u041c\u0430\u0440",
- "\u0410\u043f\u0440",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433",
- "\u0421\u0435\u043d",
- "\u041e\u043a\u0442",
- "\u041d\u043e\u044f",
- "\u0414\u0435\u043a"
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "tg-cyrl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg.js
deleted file mode 100644
index 6a15c5c6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tg.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u043f\u0435. \u0447\u043e.",
- "\u043f\u0430. \u0447\u043e."
- ],
- "DAY": [
- "\u042f\u043a\u0448\u0430\u043d\u0431\u0435",
- "\u0414\u0443\u0448\u0430\u043d\u0431\u0435",
- "\u0421\u0435\u0448\u0430\u043d\u0431\u0435",
- "\u0427\u043e\u0440\u0448\u0430\u043d\u0431\u0435",
- "\u041f\u0430\u043d\u04b7\u0448\u0430\u043d\u0431\u0435",
- "\u04b6\u0443\u043c\u044a\u0430",
- "\u0428\u0430\u043d\u0431\u0435"
- ],
- "MONTH": [
- "\u042f\u043d\u0432\u0430\u0440",
- "\u0424\u0435\u0432\u0440\u0430\u043b",
- "\u041c\u0430\u0440\u0442",
- "\u0410\u043f\u0440\u0435\u043b",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433\u0443\u0441\u0442",
- "\u0421\u0435\u043d\u0442\u044f\u0431\u0440",
- "\u041e\u043a\u0442\u044f\u0431\u0440",
- "\u041d\u043e\u044f\u0431\u0440",
- "\u0414\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u042f\u0448\u0431",
- "\u0414\u0448\u0431",
- "\u0421\u0448\u0431",
- "\u0427\u0448\u0431",
- "\u041f\u0448\u0431",
- "\u04b6\u043c\u044a",
- "\u0428\u043d\u0431"
- ],
- "SHORTMONTH": [
- "\u042f\u043d\u0432",
- "\u0424\u0435\u0432",
- "\u041c\u0430\u0440",
- "\u0410\u043f\u0440",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433",
- "\u0421\u0435\u043d",
- "\u041e\u043a\u0442",
- "\u041d\u043e\u044f",
- "\u0414\u0435\u043a"
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Som",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "tg",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th-th.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th-th.js
deleted file mode 100644
index 93c1cce8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th-th.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
- "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"
- ],
- "DAY": [
- "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c",
- "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c",
- "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23",
- "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18",
- "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35",
- "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c",
- "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c"
- ],
- "ERANAMES": [
- "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
- "\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a"
- ],
- "ERAS": [
- "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.",
- "\u0e04.\u0e28."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21",
- "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c",
- "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21",
- "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19",
- "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21",
- "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19",
- "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21",
- "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21",
- "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19",
- "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21",
- "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19",
- "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21"
- ],
- "SHORTDAY": [
- "\u0e2d\u0e32.",
- "\u0e08.",
- "\u0e2d.",
- "\u0e1e.",
- "\u0e1e\u0e24.",
- "\u0e28.",
- "\u0e2a."
- ],
- "SHORTMONTH": [
- "\u0e21.\u0e04.",
- "\u0e01.\u0e1e.",
- "\u0e21\u0e35.\u0e04.",
- "\u0e40\u0e21.\u0e22.",
- "\u0e1e.\u0e04.",
- "\u0e21\u0e34.\u0e22.",
- "\u0e01.\u0e04.",
- "\u0e2a.\u0e04.",
- "\u0e01.\u0e22.",
- "\u0e15.\u0e04.",
- "\u0e1e.\u0e22.",
- "\u0e18.\u0e04."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u0e17\u0e35\u0e48 d MMMM G y",
- "longDate": "d MMMM G y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0e3f",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "th-th",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th.js
deleted file mode 100644
index d9c21b28..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_th.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
- "\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07"
- ],
- "DAY": [
- "\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c",
- "\u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c",
- "\u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23",
- "\u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18",
- "\u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35",
- "\u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c",
- "\u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c"
- ],
- "ERANAMES": [
- "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a",
- "\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a"
- ],
- "ERAS": [
- "\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.",
- "\u0e04.\u0e28."
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21",
- "\u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c",
- "\u0e21\u0e35\u0e19\u0e32\u0e04\u0e21",
- "\u0e40\u0e21\u0e29\u0e32\u0e22\u0e19",
- "\u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21",
- "\u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19",
- "\u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21",
- "\u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21",
- "\u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19",
- "\u0e15\u0e38\u0e25\u0e32\u0e04\u0e21",
- "\u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19",
- "\u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21"
- ],
- "SHORTDAY": [
- "\u0e2d\u0e32.",
- "\u0e08.",
- "\u0e2d.",
- "\u0e1e.",
- "\u0e1e\u0e24.",
- "\u0e28.",
- "\u0e2a."
- ],
- "SHORTMONTH": [
- "\u0e21.\u0e04.",
- "\u0e01.\u0e1e.",
- "\u0e21\u0e35.\u0e04.",
- "\u0e40\u0e21.\u0e22.",
- "\u0e1e.\u0e04.",
- "\u0e21\u0e34.\u0e22.",
- "\u0e01.\u0e04.",
- "\u0e2a.\u0e04.",
- "\u0e01.\u0e22.",
- "\u0e15.\u0e04.",
- "\u0e1e.\u0e22.",
- "\u0e18.\u0e04."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u0e17\u0e35\u0e48 d MMMM G y",
- "longDate": "d MMMM G y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/yy HH:mm",
- "shortDate": "d/M/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u0e3f",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "th",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-er.js
deleted file mode 100644
index 26948d7c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-er.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1295\u1309\u1206 \u1230\u12d3\u1270",
- "\u12f5\u1215\u122d \u1230\u12d3\u1275"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u1275",
- "\u1230\u1291\u12ed",
- "\u1230\u1209\u1235",
- "\u1228\u1261\u12d5",
- "\u1213\u1219\u1235",
- "\u12d3\u122d\u1262",
- "\u1240\u12f3\u121d"
- ],
- "ERANAMES": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "ERAS": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u1325\u122a",
- "\u1208\u12ab\u1272\u1275",
- "\u1218\u130b\u1262\u1275",
- "\u121a\u12eb\u12dd\u12eb",
- "\u130d\u1295\u1266\u1275",
- "\u1230\u1290",
- "\u1213\u121d\u1208",
- "\u1290\u1213\u1230",
- "\u1218\u1235\u12a8\u1228\u121d",
- "\u1325\u1245\u121d\u1272",
- "\u1215\u12f3\u122d",
- "\u1273\u1215\u1233\u1235"
- ],
- "SHORTDAY": [
- "\u1230\u1295\u1260\u1275",
- "\u1230\u1291\u12ed",
- "\u1230\u1209\u1235",
- "\u1228\u1261\u12d5",
- "\u1213\u1219\u1235",
- "\u12d3\u122d\u1262",
- "\u1240\u12f3\u121d"
- ],
- "SHORTMONTH": [
- "\u1325\u122a",
- "\u1208\u12ab\u1272",
- "\u1218\u130b\u1262",
- "\u121a\u12eb\u12dd",
- "\u130d\u1295\u1266",
- "\u1230\u1290",
- "\u1213\u121d\u1208",
- "\u1290\u1213\u1230",
- "\u1218\u1235\u12a8",
- "\u1325\u1245\u121d",
- "\u1215\u12f3\u122d",
- "\u1273\u1215\u1233"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u1361 dd MMMM \u1218\u12d3\u120d\u1272 y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ti-er",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-et.js
deleted file mode 100644
index 1be479a0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti-et.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1295\u1309\u1206 \u1230\u12d3\u1270",
- "\u12f5\u1215\u122d \u1230\u12d3\u1275"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u1275",
- "\u1230\u1291\u12ed",
- "\u1220\u1209\u1235",
- "\u1228\u1261\u12d5",
- "\u1283\u1219\u1235",
- "\u12d3\u122d\u1262",
- "\u1240\u12f3\u121d"
- ],
- "ERANAMES": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "ERAS": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1270\u12cd\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u1230\u1295\u1260\u1275",
- "\u1230\u1291\u12ed",
- "\u1220\u1209\u1235",
- "\u1228\u1261\u12d5",
- "\u1283\u1219\u1235",
- "\u12d3\u122d\u1262",
- "\u1240\u12f3\u121d"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1270",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u1363 dd MMMM \u1218\u12d3\u120d\u1272 y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ti-et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti.js
deleted file mode 100644
index 872204c4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ti.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1295\u1309\u1206 \u1230\u12d3\u1270",
- "\u12f5\u1215\u122d \u1230\u12d3\u1275"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u1275",
- "\u1230\u1291\u12ed",
- "\u1220\u1209\u1235",
- "\u1228\u1261\u12d5",
- "\u1283\u1219\u1235",
- "\u12d3\u122d\u1262",
- "\u1240\u12f3\u121d"
- ],
- "ERANAMES": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "ERAS": [
- "\u12d3/\u12d3",
- "\u12d3/\u121d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1270\u12cd\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u1230\u1295\u1260\u1275",
- "\u1230\u1291\u12ed",
- "\u1220\u1209\u1235",
- "\u1228\u1261\u12d5",
- "\u1283\u1219\u1235",
- "\u12d3\u122d\u1262",
- "\u1240\u12f3\u121d"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1270",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u1363 dd MMMM \u1218\u12d3\u120d\u1272 y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ti",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig-er.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig-er.js
deleted file mode 100644
index 0f137e05..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig-er.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1240\u12f0\u121d \u1230\u122d\u121d\u12d5\u120d",
- "\u1213\u1246 \u1235\u122d\u121d\u12d5\u120d"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u1275 \u12d3\u1263\u12ed",
- "\u1230\u1296",
- "\u1273\u120b\u1238\u1296",
- "\u12a3\u1228\u122d\u1263\u12d3",
- "\u12a8\u121a\u123d",
- "\u1305\u121d\u12d3\u1275",
- "\u1230\u1295\u1260\u1275 \u1295\u12a2\u123d"
- ],
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1270\u12cd\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u1230/\u12d3",
- "\u1230\u1296",
- "\u1273\u120b\u1238",
- "\u12a3\u1228\u122d",
- "\u12a8\u121a\u123d",
- "\u1305\u121d\u12d3",
- "\u1230/\u1295"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1270",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "fullDate": "EEEE\u1361 dd MMMM \u12ee\u121d y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "tig-er",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig.js
deleted file mode 100644
index 493fd396..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tig.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u1240\u12f0\u121d \u1230\u122d\u121d\u12d5\u120d",
- "\u1213\u1246 \u1235\u122d\u121d\u12d5\u120d"
- ],
- "DAY": [
- "\u1230\u1295\u1260\u1275 \u12d3\u1263\u12ed",
- "\u1230\u1296",
- "\u1273\u120b\u1238\u1296",
- "\u12a3\u1228\u122d\u1263\u12d3",
- "\u12a8\u121a\u123d",
- "\u1305\u121d\u12d3\u1275",
- "\u1230\u1295\u1260\u1275 \u1295\u12a2\u123d"
- ],
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1270\u12cd\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u1230/\u12d3",
- "\u1230\u1296",
- "\u1273\u120b\u1238",
- "\u12a3\u1228\u122d",
- "\u12a8\u121a\u123d",
- "\u1305\u121d\u12d3",
- "\u1230/\u1295"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1270",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "fullDate": "EEEE\u1361 dd MMMM \u12ee\u121d y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Nfk",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "tig",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tl.js
deleted file mode 100644
index 59b7a10d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tl.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Linggo",
- "Lunes",
- "Martes",
- "Miyerkules",
- "Huwebes",
- "Biyernes",
- "Sabado"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Enero",
- "Pebrero",
- "Marso",
- "Abril",
- "Mayo",
- "Hunyo",
- "Hulyo",
- "Agosto",
- "Setyembre",
- "Oktubre",
- "Nobyembre",
- "Disyembre"
- ],
- "SHORTDAY": [
- "Lin",
- "Lun",
- "Mar",
- "Miy",
- "Huw",
- "Biy",
- "Sab"
- ],
- "SHORTMONTH": [
- "Ene",
- "Peb",
- "Mar",
- "Abr",
- "May",
- "Hun",
- "Hul",
- "Ago",
- "Set",
- "Okt",
- "Nob",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b1",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "tl",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && (i == 1 || i == 2 || i == 3) || vf.v == 0 && i % 10 != 4 && i % 10 != 6 && i % 10 != 9 || vf.v != 0 && vf.f % 10 != 4 && vf.f % 10 != 6 && vf.f % 10 != 9) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-bw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-bw.js
deleted file mode 100644
index bc05b8e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-bw.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Tshipi",
- "Mosopulogo",
- "Labobedi",
- "Laboraro",
- "Labone",
- "Labotlhano",
- "Matlhatso"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ferikgong",
- "Tlhakole",
- "Mopitlo",
- "Moranang",
- "Motsheganang",
- "Seetebosigo",
- "Phukwi",
- "Phatwe",
- "Lwetse",
- "Diphalane",
- "Ngwanatsele",
- "Sedimonthole"
- ],
- "SHORTDAY": [
- "Tsh",
- "Mos",
- "Bed",
- "Rar",
- "Ne",
- "Tla",
- "Mat"
- ],
- "SHORTMONTH": [
- "Fer",
- "Tlh",
- "Mop",
- "Mor",
- "Mot",
- "See",
- "Phu",
- "Pha",
- "Lwe",
- "Dip",
- "Ngw",
- "Sed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "P",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "tn-bw",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-za.js
deleted file mode 100644
index cecb7eeb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Tshipi",
- "Mosopulogo",
- "Labobedi",
- "Laboraro",
- "Labone",
- "Labotlhano",
- "Matlhatso"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ferikgong",
- "Tlhakole",
- "Mopitlo",
- "Moranang",
- "Motsheganang",
- "Seetebosigo",
- "Phukwi",
- "Phatwe",
- "Lwetse",
- "Diphalane",
- "Ngwanatsele",
- "Sedimonthole"
- ],
- "SHORTDAY": [
- "Tsh",
- "Mos",
- "Bed",
- "Rar",
- "Ne",
- "Tla",
- "Mat"
- ],
- "SHORTMONTH": [
- "Fer",
- "Tlh",
- "Mop",
- "Mor",
- "Mot",
- "See",
- "Phu",
- "Pha",
- "Lwe",
- "Dip",
- "Ngw",
- "Sed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "tn-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn.js
deleted file mode 100644
index f2495560..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Tshipi",
- "Mosopulogo",
- "Labobedi",
- "Laboraro",
- "Labone",
- "Labotlhano",
- "Matlhatso"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Ferikgong",
- "Tlhakole",
- "Mopitlo",
- "Moranang",
- "Motsheganang",
- "Seetebosigo",
- "Phukwi",
- "Phatwe",
- "Lwetse",
- "Diphalane",
- "Ngwanatsele",
- "Sedimonthole"
- ],
- "SHORTDAY": [
- "Tsh",
- "Mos",
- "Bed",
- "Rar",
- "Ne",
- "Tla",
- "Mat"
- ],
- "SHORTMONTH": [
- "Fer",
- "Tlh",
- "Mop",
- "Mor",
- "Mot",
- "See",
- "Phu",
- "Pha",
- "Lwe",
- "Dip",
- "Ngw",
- "Sed"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "tn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to-to.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to-to.js
deleted file mode 100644
index 568ba879..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to-to.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "S\u0101pate",
- "M\u014dnite",
- "T\u016bsite",
- "Pulelulu",
- "Tu\u02bbapulelulu",
- "Falaite",
- "Tokonaki"
- ],
- "ERANAMES": [
- "ki mu\u02bba",
- "ta\u02bbu \u02bbo S\u012bs\u016b"
- ],
- "ERAS": [
- "KM",
- "TS"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "S\u0101nuali",
- "F\u0113pueli",
- "Ma\u02bbasi",
- "\u02bbEpeleli",
- "M\u0113",
- "Sune",
- "Siulai",
- "\u02bbAokosi",
- "Sepitema",
- "\u02bbOkatopa",
- "N\u014dvema",
- "T\u012bsema"
- ],
- "SHORTDAY": [
- "S\u0101p",
- "M\u014dn",
- "T\u016bs",
- "Pul",
- "Tu\u02bba",
- "Fal",
- "Tok"
- ],
- "SHORTMONTH": [
- "S\u0101n",
- "F\u0113p",
- "Ma\u02bba",
- "\u02bbEpe",
- "M\u0113",
- "Sun",
- "Siu",
- "\u02bbAok",
- "Sep",
- "\u02bbOka",
- "N\u014dv",
- "T\u012bs"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "T$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "to-to",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to.js
deleted file mode 100644
index 81ee5758..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_to.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "S\u0101pate",
- "M\u014dnite",
- "T\u016bsite",
- "Pulelulu",
- "Tu\u02bbapulelulu",
- "Falaite",
- "Tokonaki"
- ],
- "ERANAMES": [
- "ki mu\u02bba",
- "ta\u02bbu \u02bbo S\u012bs\u016b"
- ],
- "ERAS": [
- "KM",
- "TS"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "S\u0101nuali",
- "F\u0113pueli",
- "Ma\u02bbasi",
- "\u02bbEpeleli",
- "M\u0113",
- "Sune",
- "Siulai",
- "\u02bbAokosi",
- "Sepitema",
- "\u02bbOkatopa",
- "N\u014dvema",
- "T\u012bsema"
- ],
- "SHORTDAY": [
- "S\u0101p",
- "M\u014dn",
- "T\u016bs",
- "Pul",
- "Tu\u02bba",
- "Fal",
- "Tok"
- ],
- "SHORTMONTH": [
- "S\u0101n",
- "F\u0113p",
- "Ma\u02bba",
- "\u02bbEpe",
- "M\u0113",
- "Sun",
- "Siu",
- "\u02bbAok",
- "Sep",
- "\u02bbOka",
- "N\u014dv",
- "T\u012bs"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "T$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "to",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-cy.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-cy.js
deleted file mode 100644
index ea484759..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-cy.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u00d6\u00d6",
- "\u00d6S"
- ],
- "DAY": [
- "Pazar",
- "Pazartesi",
- "Sal\u0131",
- "\u00c7ar\u015famba",
- "Per\u015fembe",
- "Cuma",
- "Cumartesi"
- ],
- "ERANAMES": [
- "Milattan \u00d6nce",
- "Milattan Sonra"
- ],
- "ERAS": [
- "M\u00d6",
- "MS"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ocak",
- "\u015eubat",
- "Mart",
- "Nisan",
- "May\u0131s",
- "Haziran",
- "Temmuz",
- "A\u011fustos",
- "Eyl\u00fcl",
- "Ekim",
- "Kas\u0131m",
- "Aral\u0131k"
- ],
- "SHORTDAY": [
- "Paz",
- "Pzt",
- "Sal",
- "\u00c7ar",
- "Per",
- "Cum",
- "Cmt"
- ],
- "SHORTMONTH": [
- "Oca",
- "\u015eub",
- "Mar",
- "Nis",
- "May",
- "Haz",
- "Tem",
- "A\u011fu",
- "Eyl",
- "Eki",
- "Kas",
- "Ara"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "d MMMM y EEEE",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d MM y HH:mm",
- "shortDate": "d MM y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ac",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "tr-cy",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-tr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-tr.js
deleted file mode 100644
index e9575d34..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr-tr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u00d6\u00d6",
- "\u00d6S"
- ],
- "DAY": [
- "Pazar",
- "Pazartesi",
- "Sal\u0131",
- "\u00c7ar\u015famba",
- "Per\u015fembe",
- "Cuma",
- "Cumartesi"
- ],
- "ERANAMES": [
- "Milattan \u00d6nce",
- "Milattan Sonra"
- ],
- "ERAS": [
- "M\u00d6",
- "MS"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ocak",
- "\u015eubat",
- "Mart",
- "Nisan",
- "May\u0131s",
- "Haziran",
- "Temmuz",
- "A\u011fustos",
- "Eyl\u00fcl",
- "Ekim",
- "Kas\u0131m",
- "Aral\u0131k"
- ],
- "SHORTDAY": [
- "Paz",
- "Pzt",
- "Sal",
- "\u00c7ar",
- "Per",
- "Cum",
- "Cmt"
- ],
- "SHORTMONTH": [
- "Oca",
- "\u015eub",
- "Mar",
- "Nis",
- "May",
- "Haz",
- "Tem",
- "A\u011fu",
- "Eyl",
- "Eki",
- "Kas",
- "Ara"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "d MMMM y EEEE",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d MM y HH:mm",
- "shortDate": "d MM y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "tr-tr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr.js
deleted file mode 100644
index e3521251..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tr.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u00d6\u00d6",
- "\u00d6S"
- ],
- "DAY": [
- "Pazar",
- "Pazartesi",
- "Sal\u0131",
- "\u00c7ar\u015famba",
- "Per\u015fembe",
- "Cuma",
- "Cumartesi"
- ],
- "ERANAMES": [
- "Milattan \u00d6nce",
- "Milattan Sonra"
- ],
- "ERAS": [
- "M\u00d6",
- "MS"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Ocak",
- "\u015eubat",
- "Mart",
- "Nisan",
- "May\u0131s",
- "Haziran",
- "Temmuz",
- "A\u011fustos",
- "Eyl\u00fcl",
- "Ekim",
- "Kas\u0131m",
- "Aral\u0131k"
- ],
- "SHORTDAY": [
- "Paz",
- "Pzt",
- "Sal",
- "\u00c7ar",
- "Per",
- "Cum",
- "Cmt"
- ],
- "SHORTMONTH": [
- "Oca",
- "\u015eub",
- "Mar",
- "Nis",
- "May",
- "Haz",
- "Tem",
- "A\u011fu",
- "Eyl",
- "Eki",
- "Kas",
- "Ara"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "d MMMM y EEEE",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d MM y HH:mm",
- "shortDate": "d MM y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TL",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "tr",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts-za.js
deleted file mode 100644
index 077c4a58..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sonto",
- "Musumbhunuku",
- "Ravumbirhi",
- "Ravunharhu",
- "Ravumune",
- "Ravuntlhanu",
- "Mugqivela"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Sunguti",
- "Nyenyenyani",
- "Nyenyankulu",
- "Dzivamisoko",
- "Mudyaxihi",
- "Khotavuxika",
- "Mawuwani",
- "Mhawuri",
- "Ndzhati",
- "Nhlangula",
- "Hukuri",
- "N\u2019wendzamhala"
- ],
- "SHORTDAY": [
- "Son",
- "Mus",
- "Bir",
- "Har",
- "Ne",
- "Tlh",
- "Mug"
- ],
- "SHORTMONTH": [
- "Sun",
- "Yan",
- "Kul",
- "Dzi",
- "Mud",
- "Kho",
- "Maw",
- "Mha",
- "Ndz",
- "Nhl",
- "Huk",
- "N\u2019w"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ts-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts.js
deleted file mode 100644
index e5299089..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ts.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sonto",
- "Musumbhunuku",
- "Ravumbirhi",
- "Ravunharhu",
- "Ravumune",
- "Ravuntlhanu",
- "Mugqivela"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Sunguti",
- "Nyenyenyani",
- "Nyenyankulu",
- "Dzivamisoko",
- "Mudyaxihi",
- "Khotavuxika",
- "Mawuwani",
- "Mhawuri",
- "Ndzhati",
- "Nhlangula",
- "Hukuri",
- "N\u2019wendzamhala"
- ],
- "SHORTDAY": [
- "Son",
- "Mus",
- "Bir",
- "Har",
- "Ne",
- "Tlh",
- "Mug"
- ],
- "SHORTMONTH": [
- "Sun",
- "Yan",
- "Kul",
- "Dzi",
- "Mud",
- "Kho",
- "Maw",
- "Mha",
- "Ndz",
- "Nhl",
- "Huk",
- "N\u2019w"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ts",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq-ne.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq-ne.js
deleted file mode 100644
index 6213c47e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq-ne.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Subbaahi",
- "Zaarikay b"
- ],
- "DAY": [
- "Alhadi",
- "Atinni",
- "Atalaata",
- "Alarba",
- "Alhamiisa",
- "Alzuma",
- "Asibti"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa zamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alz",
- "Asi"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "twq-ne",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq.js
deleted file mode 100644
index b477674a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_twq.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Subbaahi",
- "Zaarikay b"
- ],
- "DAY": [
- "Alhadi",
- "Atinni",
- "Atalaata",
- "Alarba",
- "Alhamiisa",
- "Alzuma",
- "Asibti"
- ],
- "ERANAMES": [
- "Isaa jine",
- "Isaa zamanoo"
- ],
- "ERAS": [
- "IJ",
- "IZ"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u017danwiye",
- "Feewiriye",
- "Marsi",
- "Awiril",
- "Me",
- "\u017duwe\u014b",
- "\u017duyye",
- "Ut",
- "Sektanbur",
- "Oktoobur",
- "Noowanbur",
- "Deesanbur"
- ],
- "SHORTDAY": [
- "Alh",
- "Ati",
- "Ata",
- "Ala",
- "Alm",
- "Alz",
- "Asi"
- ],
- "SHORTMONTH": [
- "\u017dan",
- "Fee",
- "Mar",
- "Awi",
- "Me",
- "\u017duw",
- "\u017duy",
- "Ut",
- "Sek",
- "Okt",
- "Noo",
- "Dee"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "twq",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn-ma.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn-ma.js
deleted file mode 100644
index bbfe0a7e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn-ma.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Zdat azal",
- "\u1e0ceffir aza"
- ],
- "DAY": [
- "Asamas",
- "Aynas",
- "Asinas",
- "Akras",
- "Akwas",
- "Asimwas",
- "Asi\u1e0dyas"
- ],
- "ERANAMES": [
- "Zdat \u0190isa (TA\u0194)",
- "\u1e0ceffir \u0190isa (TA\u0194)"
- ],
- "ERAS": [
- "Z\u0190",
- "\u1e0c\u0190"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "Yennayer",
- "Yebrayer",
- "Mars",
- "Ibrir",
- "Mayyu",
- "Yunyu",
- "Yulyuz",
- "\u0194uct",
- "Cutanbir",
- "K\u1e6duber",
- "Nwanbir",
- "Dujanbir"
- ],
- "SHORTDAY": [
- "Asa",
- "Ayn",
- "Asn",
- "Akr",
- "Akw",
- "Asm",
- "As\u1e0d"
- ],
- "SHORTMONTH": [
- "Yen",
- "Yeb",
- "Mar",
- "Ibr",
- "May",
- "Yun",
- "Yul",
- "\u0194uc",
- "Cut",
- "K\u1e6du",
- "Nwa",
- "Duj"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "tzm-latn-ma",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn.js
deleted file mode 100644
index b17a71dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Zdat azal",
- "\u1e0ceffir aza"
- ],
- "DAY": [
- "Asamas",
- "Aynas",
- "Asinas",
- "Akras",
- "Akwas",
- "Asimwas",
- "Asi\u1e0dyas"
- ],
- "ERANAMES": [
- "Zdat \u0190isa (TA\u0194)",
- "\u1e0ceffir \u0190isa (TA\u0194)"
- ],
- "ERAS": [
- "Z\u0190",
- "\u1e0c\u0190"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "Yennayer",
- "Yebrayer",
- "Mars",
- "Ibrir",
- "Mayyu",
- "Yunyu",
- "Yulyuz",
- "\u0194uct",
- "Cutanbir",
- "K\u1e6duber",
- "Nwanbir",
- "Dujanbir"
- ],
- "SHORTDAY": [
- "Asa",
- "Ayn",
- "Asn",
- "Akr",
- "Akw",
- "Asm",
- "As\u1e0d"
- ],
- "SHORTMONTH": [
- "Yen",
- "Yeb",
- "Mar",
- "Ibr",
- "May",
- "Yun",
- "Yul",
- "\u0194uc",
- "Cut",
- "K\u1e6du",
- "Nwa",
- "Duj"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "tzm-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm.js
deleted file mode 100644
index a2f34ff5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_tzm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Zdat azal",
- "\u1e0ceffir aza"
- ],
- "DAY": [
- "Asamas",
- "Aynas",
- "Asinas",
- "Akras",
- "Akwas",
- "Asimwas",
- "Asi\u1e0dyas"
- ],
- "ERANAMES": [
- "Zdat \u0190isa (TA\u0194)",
- "\u1e0ceffir \u0190isa (TA\u0194)"
- ],
- "ERAS": [
- "Z\u0190",
- "\u1e0c\u0190"
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "Yennayer",
- "Yebrayer",
- "Mars",
- "Ibrir",
- "Mayyu",
- "Yunyu",
- "Yulyuz",
- "\u0194uct",
- "Cutanbir",
- "K\u1e6duber",
- "Nwanbir",
- "Dujanbir"
- ],
- "SHORTDAY": [
- "Asa",
- "Ayn",
- "Asn",
- "Akr",
- "Akw",
- "Asm",
- "As\u1e0d"
- ],
- "SHORTMONTH": [
- "Yen",
- "Yeb",
- "Mar",
- "Ibr",
- "May",
- "Yun",
- "Yul",
- "\u0194uc",
- "Cut",
- "K\u1e6du",
- "Nwa",
- "Duj"
- ],
- "WEEKENDRANGE": [
- 4,
- 5
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "tzm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab-cn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab-cn.js
deleted file mode 100644
index 67092f1e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab-cn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"
- ],
- "DAY": [
- "\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5",
- "\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5",
- "\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
- "\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5",
- "\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
- "\u062c\u06c8\u0645\u06d5",
- "\u0634\u06d5\u0646\u0628\u06d5"
- ],
- "ERANAMES": [
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
- ],
- "ERAS": [
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u064a\u0627\u0646\u06cb\u0627\u0631",
- "\u0641\u06d0\u06cb\u0631\u0627\u0644",
- "\u0645\u0627\u0631\u062a",
- "\u0626\u0627\u067e\u0631\u06d0\u0644",
- "\u0645\u0627\u064a",
- "\u0626\u0649\u064a\u06c7\u0646",
- "\u0626\u0649\u064a\u06c7\u0644",
- "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
- "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
- "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
- "\u0628\u0648\u064a\u0627\u0628\u0649\u0631",
- "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
- ],
- "SHORTDAY": [
- "\u064a\u06d5",
- "\u062f\u06c8",
- "\u0633\u06d5",
- "\u0686\u0627",
- "\u067e\u06d5",
- "\u0686\u06c8",
- "\u0634\u06d5"
- ],
- "SHORTMONTH": [
- "\u064a\u0627\u0646\u06cb\u0627\u0631",
- "\u0641\u06d0\u06cb\u0631\u0627\u0644",
- "\u0645\u0627\u0631\u062a",
- "\u0626\u0627\u067e\u0631\u06d0\u0644",
- "\u0645\u0627\u064a",
- "\u0626\u0649\u064a\u06c7\u0646",
- "\u0626\u0649\u064a\u06c7\u0644",
- "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
- "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
- "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
- "\u0646\u0648\u064a\u0627\u0628\u0649\u0631",
- "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c MMMM d\u060c y",
- "longDate": "MMMM d\u060c y",
- "medium": "MMM d\u060c y h:mm:ss a",
- "mediumDate": "MMM d\u060c y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ug-arab-cn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab.js
deleted file mode 100644
index bd9ae4ab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug-arab.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"
- ],
- "DAY": [
- "\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5",
- "\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5",
- "\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
- "\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5",
- "\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
- "\u062c\u06c8\u0645\u06d5",
- "\u0634\u06d5\u0646\u0628\u06d5"
- ],
- "ERANAMES": [
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
- ],
- "ERAS": [
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u064a\u0627\u0646\u06cb\u0627\u0631",
- "\u0641\u06d0\u06cb\u0631\u0627\u0644",
- "\u0645\u0627\u0631\u062a",
- "\u0626\u0627\u067e\u0631\u06d0\u0644",
- "\u0645\u0627\u064a",
- "\u0626\u0649\u064a\u06c7\u0646",
- "\u0626\u0649\u064a\u06c7\u0644",
- "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
- "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
- "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
- "\u0628\u0648\u064a\u0627\u0628\u0649\u0631",
- "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
- ],
- "SHORTDAY": [
- "\u064a\u06d5",
- "\u062f\u06c8",
- "\u0633\u06d5",
- "\u0686\u0627",
- "\u067e\u06d5",
- "\u0686\u06c8",
- "\u0634\u06d5"
- ],
- "SHORTMONTH": [
- "\u064a\u0627\u0646\u06cb\u0627\u0631",
- "\u0641\u06d0\u06cb\u0631\u0627\u0644",
- "\u0645\u0627\u0631\u062a",
- "\u0626\u0627\u067e\u0631\u06d0\u0644",
- "\u0645\u0627\u064a",
- "\u0626\u0649\u064a\u06c7\u0646",
- "\u0626\u0649\u064a\u06c7\u0644",
- "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
- "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
- "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
- "\u0646\u0648\u064a\u0627\u0628\u0649\u0631",
- "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c MMMM d\u060c y",
- "longDate": "MMMM d\u060c y",
- "medium": "MMM d\u060c y h:mm:ss a",
- "mediumDate": "MMM d\u060c y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ug-arab",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug.js
deleted file mode 100644
index 2ed49abc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0686\u06c8\u0634\u062a\u0649\u0646 \u0643\u06d0\u064a\u0649\u0646"
- ],
- "DAY": [
- "\u064a\u06d5\u0643\u0634\u06d5\u0646\u0628\u06d5",
- "\u062f\u06c8\u0634\u06d5\u0646\u0628\u06d5",
- "\u0633\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
- "\u0686\u0627\u0631\u0634\u06d5\u0646\u0628\u06d5",
- "\u067e\u06d5\u064a\u0634\u06d5\u0646\u0628\u06d5",
- "\u062c\u06c8\u0645\u06d5",
- "\u0634\u06d5\u0646\u0628\u06d5"
- ],
- "ERANAMES": [
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
- ],
- "ERAS": [
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5\u062f\u0649\u0646 \u0628\u06c7\u0631\u06c7\u0646",
- "\u0645\u0649\u0644\u0627\u062f\u0649\u064a\u06d5"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u064a\u0627\u0646\u06cb\u0627\u0631",
- "\u0641\u06d0\u06cb\u0631\u0627\u0644",
- "\u0645\u0627\u0631\u062a",
- "\u0626\u0627\u067e\u0631\u06d0\u0644",
- "\u0645\u0627\u064a",
- "\u0626\u0649\u064a\u06c7\u0646",
- "\u0626\u0649\u064a\u06c7\u0644",
- "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
- "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
- "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
- "\u0628\u0648\u064a\u0627\u0628\u0649\u0631",
- "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
- ],
- "SHORTDAY": [
- "\u064a\u06d5",
- "\u062f\u06c8",
- "\u0633\u06d5",
- "\u0686\u0627",
- "\u067e\u06d5",
- "\u0686\u06c8",
- "\u0634\u06d5"
- ],
- "SHORTMONTH": [
- "\u064a\u0627\u0646\u06cb\u0627\u0631",
- "\u0641\u06d0\u06cb\u0631\u0627\u0644",
- "\u0645\u0627\u0631\u062a",
- "\u0626\u0627\u067e\u0631\u06d0\u0644",
- "\u0645\u0627\u064a",
- "\u0626\u0649\u064a\u06c7\u0646",
- "\u0626\u0649\u064a\u06c7\u0644",
- "\u0626\u0627\u06cb\u063a\u06c7\u0633\u062a",
- "\u0633\u06d0\u0646\u062a\u06d5\u0628\u0649\u0631",
- "\u0626\u06c6\u0643\u062a\u06d5\u0628\u0649\u0631",
- "\u0646\u0648\u064a\u0627\u0628\u0649\u0631",
- "\u062f\u06d0\u0643\u0627\u0628\u0649\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c MMMM d\u060c y",
- "longDate": "MMMM d\u060c y",
- "medium": "MMM d\u060c y h:mm:ss a",
- "mediumDate": "MMM d\u060c y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk-ua.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk-ua.js
deleted file mode 100644
index 1fca063b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk-ua.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0434\u043f",
- "\u043f\u043f"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0456\u043b\u044f",
- "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a",
- "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a",
- "\u0441\u0435\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440",
- "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438",
- "\u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438"
- ],
- "ERAS": [
- "\u0434\u043e \u043d.\u0435.",
- "\u043d.\u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0441\u0456\u0447\u043d\u044f",
- "\u043b\u044e\u0442\u043e\u0433\u043e",
- "\u0431\u0435\u0440\u0435\u0437\u043d\u044f",
- "\u043a\u0432\u0456\u0442\u043d\u044f",
- "\u0442\u0440\u0430\u0432\u043d\u044f",
- "\u0447\u0435\u0440\u0432\u043d\u044f",
- "\u043b\u0438\u043f\u043d\u044f",
- "\u0441\u0435\u0440\u043f\u043d\u044f",
- "\u0432\u0435\u0440\u0435\u0441\u043d\u044f",
- "\u0436\u043e\u0432\u0442\u043d\u044f",
- "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430",
- "\u0433\u0440\u0443\u0434\u043d\u044f"
- ],
- "SHORTDAY": [
- "\u041d\u0434",
- "\u041f\u043d",
- "\u0412\u0442",
- "\u0421\u0440",
- "\u0427\u0442",
- "\u041f\u0442",
- "\u0421\u0431"
- ],
- "SHORTMONTH": [
- "\u0441\u0456\u0447.",
- "\u043b\u044e\u0442.",
- "\u0431\u0435\u0440.",
- "\u043a\u0432\u0456\u0442.",
- "\u0442\u0440\u0430\u0432.",
- "\u0447\u0435\u0440\u0432.",
- "\u043b\u0438\u043f.",
- "\u0441\u0435\u0440\u043f.",
- "\u0432\u0435\u0440.",
- "\u0436\u043e\u0432\u0442.",
- "\u043b\u0438\u0441\u0442.",
- "\u0433\u0440\u0443\u0434."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0440'.",
- "longDate": "d MMMM y '\u0440'.",
- "medium": "d MMM y '\u0440'. HH:mm:ss",
- "mediumDate": "d MMM y '\u0440'.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b4",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "uk-ua",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk.js
deleted file mode 100644
index 9519ad86..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0434\u043f",
- "\u043f\u043f"
- ],
- "DAY": [
- "\u043d\u0435\u0434\u0456\u043b\u044f",
- "\u043f\u043e\u043d\u0435\u0434\u0456\u043b\u043e\u043a",
- "\u0432\u0456\u0432\u0442\u043e\u0440\u043e\u043a",
- "\u0441\u0435\u0440\u0435\u0434\u0430",
- "\u0447\u0435\u0442\u0432\u0435\u0440",
- "\u043f\u02bc\u044f\u0442\u043d\u0438\u0446\u044f",
- "\u0441\u0443\u0431\u043e\u0442\u0430"
- ],
- "ERANAMES": [
- "\u0434\u043e \u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438",
- "\u043d\u0430\u0448\u043e\u0457 \u0435\u0440\u0438"
- ],
- "ERAS": [
- "\u0434\u043e \u043d.\u0435.",
- "\u043d.\u0435."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u0441\u0456\u0447\u043d\u044f",
- "\u043b\u044e\u0442\u043e\u0433\u043e",
- "\u0431\u0435\u0440\u0435\u0437\u043d\u044f",
- "\u043a\u0432\u0456\u0442\u043d\u044f",
- "\u0442\u0440\u0430\u0432\u043d\u044f",
- "\u0447\u0435\u0440\u0432\u043d\u044f",
- "\u043b\u0438\u043f\u043d\u044f",
- "\u0441\u0435\u0440\u043f\u043d\u044f",
- "\u0432\u0435\u0440\u0435\u0441\u043d\u044f",
- "\u0436\u043e\u0432\u0442\u043d\u044f",
- "\u043b\u0438\u0441\u0442\u043e\u043f\u0430\u0434\u0430",
- "\u0433\u0440\u0443\u0434\u043d\u044f"
- ],
- "SHORTDAY": [
- "\u041d\u0434",
- "\u041f\u043d",
- "\u0412\u0442",
- "\u0421\u0440",
- "\u0427\u0442",
- "\u041f\u0442",
- "\u0421\u0431"
- ],
- "SHORTMONTH": [
- "\u0441\u0456\u0447.",
- "\u043b\u044e\u0442.",
- "\u0431\u0435\u0440.",
- "\u043a\u0432\u0456\u0442.",
- "\u0442\u0440\u0430\u0432.",
- "\u0447\u0435\u0440\u0432.",
- "\u043b\u0438\u043f.",
- "\u0441\u0435\u0440\u043f.",
- "\u0432\u0435\u0440.",
- "\u0436\u043e\u0432\u0442.",
- "\u043b\u0438\u0441\u0442.",
- "\u0433\u0440\u0443\u0434."
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y '\u0440'.",
- "longDate": "d MMMM y '\u0440'.",
- "medium": "d MMM y '\u0440'. HH:mm:ss",
- "mediumDate": "d MMM y '\u0440'.",
- "mediumTime": "HH:mm:ss",
- "short": "dd.MM.yy HH:mm",
- "shortDate": "dd.MM.yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b4",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "uk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-in.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-in.js
deleted file mode 100644
index c81b2df1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-in.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0642\u0628\u0644 \u062f\u0648\u067e\u06c1\u0631",
- "\u0628\u0639\u062f \u062f\u0648\u067e\u06c1\u0631"
- ],
- "DAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u0633\u0648\u0645\u0648\u0627\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d",
- "\u0639\u06cc\u0633\u0648\u06cc"
- ],
- "ERAS": [
- "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d",
- "\u0639\u06cc\u0633\u0648\u06cc"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u0633\u0648\u0645\u0648\u0627\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 6,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "d MMM\u060c y h:mm:ss a",
- "mediumDate": "d MMM\u060c y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20b9",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ur-in",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-pk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-pk.js
deleted file mode 100644
index f64e8f60..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur-pk.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0642\u0628\u0644 \u062f\u0648\u067e\u06c1\u0631",
- "\u0628\u0639\u062f \u062f\u0648\u067e\u06c1\u0631"
- ],
- "DAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u0633\u0648\u0645\u0648\u0627\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d",
- "\u0639\u06cc\u0633\u0648\u06cc \u0633\u0646"
- ],
- "ERAS": [
- "\u0642 \u0645",
- "\u0639\u06cc\u0633\u0648\u06cc \u0633\u0646"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u0633\u0648\u0645\u0648\u0627\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "d MMM\u060c y h:mm:ss a",
- "mediumDate": "d MMM\u060c y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ur-pk",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur.js
deleted file mode 100644
index 79bf686c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ur.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u0642\u0628\u0644 \u062f\u0648\u067e\u06c1\u0631",
- "\u0628\u0639\u062f \u062f\u0648\u067e\u06c1\u0631"
- ],
- "DAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u0633\u0648\u0645\u0648\u0627\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "ERANAMES": [
- "\u0642\u0628\u0644 \u0645\u0633\u06cc\u062d",
- "\u0639\u06cc\u0633\u0648\u06cc \u0633\u0646"
- ],
- "ERAS": [
- "\u0642 \u0645",
- "\u0639\u06cc\u0633\u0648\u06cc \u0633\u0646"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u0627\u062a\u0648\u0627\u0631",
- "\u0633\u0648\u0645\u0648\u0627\u0631",
- "\u0645\u0646\u06af\u0644",
- "\u0628\u062f\u06be",
- "\u062c\u0645\u0639\u0631\u0627\u062a",
- "\u062c\u0645\u0639\u06c1",
- "\u06c1\u0641\u062a\u06c1"
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u0626\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u0626\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE\u060c d MMMM\u060c y",
- "longDate": "d MMMM\u060c y",
- "medium": "d MMM\u060c y h:mm:ss a",
- "mediumDate": "d MMM\u060c y",
- "mediumTime": "h:mm:ss a",
- "short": "d/M/yy h:mm a",
- "shortDate": "d/M/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Rs",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 2,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "ur",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab-af.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab-af.js
deleted file mode 100644
index 118132ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab-af.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0628\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc.",
- "\u062f.",
- "\u0633.",
- "\u0686.",
- "\u067e.",
- "\u062c.",
- "\u0634."
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648",
- "\u0641\u0628\u0631",
- "\u0645\u0627\u0631",
- "\u0627\u067e\u0631",
- "\u0645\u0640\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644",
- "\u0627\u06af\u0633",
- "\u0633\u067e\u062a",
- "\u0627\u06a9\u062a",
- "\u0646\u0648\u0645",
- "\u062f\u0633\u0645"
- ],
- "WEEKENDRANGE": [
- 3,
- 4
- ],
- "fullDate": "y \u0646\u0686\u06cc \u06cc\u06cc\u0644 d \u0646\u0686\u06cc MMMM EEEE \u06a9\u0648\u0646\u06cc",
- "longDate": "d \u0646\u0686\u06cc MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Af.",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "uz-arab-af",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab.js
deleted file mode 100644
index 3f1a20da..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-arab.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u06cc\u06a9\u0634\u0646\u0628\u0647",
- "\u062f\u0648\u0634\u0646\u0628\u0647",
- "\u0633\u0647\u200c\u0634\u0646\u0628\u0647",
- "\u0686\u0647\u0627\u0631\u0634\u0646\u0628\u0647",
- "\u067e\u0646\u062c\u0634\u0646\u0628\u0647",
- "\u062c\u0645\u0639\u0647",
- "\u0634\u0646\u0628\u0647"
- ],
- "ERANAMES": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "ERAS": [
- "\u0642.\u0645.",
- "\u0645."
- ],
- "FIRSTDAYOFWEEK": 5,
- "MONTH": [
- "\u062c\u0646\u0648\u0631\u06cc",
- "\u0641\u0628\u0631\u0648\u0631\u06cc",
- "\u0645\u0627\u0631\u0686",
- "\u0627\u067e\u0631\u06cc\u0644",
- "\u0645\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644\u0627\u06cc",
- "\u0627\u06af\u0633\u062a",
- "\u0633\u067e\u062a\u0645\u0628\u0631",
- "\u0627\u06a9\u062a\u0648\u0628\u0631",
- "\u0646\u0648\u0645\u0628\u0631",
- "\u062f\u0633\u0645\u0628\u0631"
- ],
- "SHORTDAY": [
- "\u06cc.",
- "\u062f.",
- "\u0633.",
- "\u0686.",
- "\u067e.",
- "\u062c.",
- "\u0634."
- ],
- "SHORTMONTH": [
- "\u062c\u0646\u0648",
- "\u0641\u0628\u0631",
- "\u0645\u0627\u0631",
- "\u0627\u067e\u0631",
- "\u0645\u0640\u06cc",
- "\u062c\u0648\u0646",
- "\u062c\u0648\u0644",
- "\u0627\u06af\u0633",
- "\u0633\u067e\u062a",
- "\u0627\u06a9\u062a",
- "\u0646\u0648\u0645",
- "\u062f\u0633\u0645"
- ],
- "WEEKENDRANGE": [
- 3,
- 4
- ],
- "fullDate": "y \u0646\u0686\u06cc \u06cc\u06cc\u0644 d \u0646\u0686\u06cc MMMM EEEE \u06a9\u0648\u0646\u06cc",
- "longDate": "d \u0646\u0686\u06cc MMMM y",
- "medium": "d MMM y H:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "H:mm:ss",
- "short": "y/M/d H:mm",
- "shortDate": "y/M/d",
- "shortTime": "H:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Af.",
- "DECIMAL_SEP": "\u066b",
- "GROUP_SEP": "\u066c",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "uz-arab",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl-uz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl-uz.js
deleted file mode 100644
index 03e74ba6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl-uz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u044f\u043a\u0448\u0430\u043d\u0431\u0430",
- "\u0434\u0443\u0448\u0430\u043d\u0431\u0430",
- "\u0441\u0435\u0448\u0430\u043d\u0431\u0430",
- "\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0430",
- "\u043f\u0430\u0439\u0448\u0430\u043d\u0431\u0430",
- "\u0436\u0443\u043c\u0430",
- "\u0448\u0430\u043d\u0431\u0430"
- ],
- "ERANAMES": [
- "\u041c.\u0410.",
- "\u042d"
- ],
- "ERAS": [
- "\u041c.\u0410.",
- "\u042d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u042f\u043d\u0432\u0430\u0440",
- "\u0424\u0435\u0432\u0440\u0430\u043b",
- "\u041c\u0430\u0440\u0442",
- "\u0410\u043f\u0440\u0435\u043b",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433\u0443\u0441\u0442",
- "\u0421\u0435\u043d\u0442\u044f\u0431\u0440",
- "\u041e\u043a\u0442\u044f\u0431\u0440",
- "\u041d\u043e\u044f\u0431\u0440",
- "\u0414\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u042f\u043a\u0448",
- "\u0414\u0443\u0448",
- "\u0421\u0435\u0448",
- "\u0427\u043e\u0440",
- "\u041f\u0430\u0439",
- "\u0416\u0443\u043c",
- "\u0428\u0430\u043d"
- ],
- "SHORTMONTH": [
- "\u042f\u043d\u0432",
- "\u0424\u0435\u0432",
- "\u041c\u0430\u0440",
- "\u0410\u043f\u0440",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433",
- "\u0421\u0435\u043d",
- "\u041e\u043a\u0442",
- "\u041d\u043e\u044f",
- "\u0414\u0435\u043a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "so\u02bcm",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "uz-cyrl-uz",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl.js
deleted file mode 100644
index d284657c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-cyrl.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\u044f\u043a\u0448\u0430\u043d\u0431\u0430",
- "\u0434\u0443\u0448\u0430\u043d\u0431\u0430",
- "\u0441\u0435\u0448\u0430\u043d\u0431\u0430",
- "\u0447\u043e\u0440\u0448\u0430\u043d\u0431\u0430",
- "\u043f\u0430\u0439\u0448\u0430\u043d\u0431\u0430",
- "\u0436\u0443\u043c\u0430",
- "\u0448\u0430\u043d\u0431\u0430"
- ],
- "ERANAMES": [
- "\u041c.\u0410.",
- "\u042d"
- ],
- "ERAS": [
- "\u041c.\u0410.",
- "\u042d"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u042f\u043d\u0432\u0430\u0440",
- "\u0424\u0435\u0432\u0440\u0430\u043b",
- "\u041c\u0430\u0440\u0442",
- "\u0410\u043f\u0440\u0435\u043b",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433\u0443\u0441\u0442",
- "\u0421\u0435\u043d\u0442\u044f\u0431\u0440",
- "\u041e\u043a\u0442\u044f\u0431\u0440",
- "\u041d\u043e\u044f\u0431\u0440",
- "\u0414\u0435\u043a\u0430\u0431\u0440"
- ],
- "SHORTDAY": [
- "\u042f\u043a\u0448",
- "\u0414\u0443\u0448",
- "\u0421\u0435\u0448",
- "\u0427\u043e\u0440",
- "\u041f\u0430\u0439",
- "\u0416\u0443\u043c",
- "\u0428\u0430\u043d"
- ],
- "SHORTMONTH": [
- "\u042f\u043d\u0432",
- "\u0424\u0435\u0432",
- "\u041c\u0430\u0440",
- "\u0410\u043f\u0440",
- "\u041c\u0430\u0439",
- "\u0418\u044e\u043d",
- "\u0418\u044e\u043b",
- "\u0410\u0432\u0433",
- "\u0421\u0435\u043d",
- "\u041e\u043a\u0442",
- "\u041d\u043e\u044f",
- "\u0414\u0435\u043a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "so\u02bcm",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "uz-cyrl",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn-uz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn-uz.js
deleted file mode 100644
index d7b41bd0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn-uz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "TO",
- "TK"
- ],
- "DAY": [
- "yakshanba",
- "dushanba",
- "seshanba",
- "chorshanba",
- "payshanba",
- "juma",
- "shanba"
- ],
- "ERANAMES": [
- "M.A.",
- "E"
- ],
- "ERAS": [
- "M.A.",
- "E"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Yanvar",
- "Fevral",
- "Mart",
- "Aprel",
- "May",
- "Iyun",
- "Iyul",
- "Avgust",
- "Sentabr",
- "Oktabr",
- "Noyabr",
- "Dekabr"
- ],
- "SHORTDAY": [
- "Yaksh",
- "Dush",
- "Sesh",
- "Chor",
- "Pay",
- "Jum",
- "Shan"
- ],
- "SHORTMONTH": [
- "Yanv",
- "Fev",
- "Mar",
- "Apr",
- "May",
- "Iyun",
- "Iyul",
- "Avg",
- "Sen",
- "Okt",
- "Noya",
- "Dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "so\u02bcm",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "uz-latn-uz",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn.js
deleted file mode 100644
index a0262271..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz-latn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "TO",
- "TK"
- ],
- "DAY": [
- "yakshanba",
- "dushanba",
- "seshanba",
- "chorshanba",
- "payshanba",
- "juma",
- "shanba"
- ],
- "ERANAMES": [
- "M.A.",
- "E"
- ],
- "ERAS": [
- "M.A.",
- "E"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Yanvar",
- "Fevral",
- "Mart",
- "Aprel",
- "May",
- "Iyun",
- "Iyul",
- "Avgust",
- "Sentabr",
- "Oktabr",
- "Noyabr",
- "Dekabr"
- ],
- "SHORTDAY": [
- "Yaksh",
- "Dush",
- "Sesh",
- "Chor",
- "Pay",
- "Jum",
- "Shan"
- ],
- "SHORTMONTH": [
- "Yanv",
- "Fev",
- "Mar",
- "Apr",
- "May",
- "Iyun",
- "Iyul",
- "Avg",
- "Sen",
- "Okt",
- "Noya",
- "Dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "so\u02bcm",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "uz-latn",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz.js
deleted file mode 100644
index 1bf9a645..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_uz.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "TO",
- "TK"
- ],
- "DAY": [
- "yakshanba",
- "dushanba",
- "seshanba",
- "chorshanba",
- "payshanba",
- "juma",
- "shanba"
- ],
- "ERANAMES": [
- "M.A.",
- "E"
- ],
- "ERAS": [
- "M.A.",
- "E"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Yanvar",
- "Fevral",
- "Mart",
- "Aprel",
- "May",
- "Iyun",
- "Iyul",
- "Avgust",
- "Sentabr",
- "Oktabr",
- "Noyabr",
- "Dekabr"
- ],
- "SHORTDAY": [
- "Yaksh",
- "Dush",
- "Sesh",
- "Chor",
- "Pay",
- "Jum",
- "Shan"
- ],
- "SHORTMONTH": [
- "Yanv",
- "Fev",
- "Mar",
- "Apr",
- "May",
- "Iyun",
- "Iyul",
- "Avg",
- "Sen",
- "Okt",
- "Noya",
- "Dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, y MMMM dd",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "yy/MM/dd HH:mm",
- "shortDate": "yy/MM/dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "so\u02bcm",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "uz",
- "pluralCat": function(n, opt_precision) { if (n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn-lr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn-lr.js
deleted file mode 100644
index a3d63c35..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn-lr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "lahadi",
- "t\u025b\u025bn\u025b\u025b",
- "talata",
- "alaba",
- "aimisa",
- "aijima",
- "si\u0253iti"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "luukao kem\u00e3",
- "\u0253anda\u0253u",
- "v\u0254\u0254",
- "fulu",
- "goo",
- "6",
- "7",
- "k\u0254nde",
- "saah",
- "galo",
- "kenpkato \u0253olol\u0254",
- "luukao l\u0254ma"
- ],
- "SHORTDAY": [
- "lahadi",
- "t\u025b\u025bn\u025b\u025b",
- "talata",
- "alaba",
- "aimisa",
- "aijima",
- "si\u0253iti"
- ],
- "SHORTMONTH": [
- "luukao kem\u00e3",
- "\u0253anda\u0253u",
- "v\u0254\u0254",
- "fulu",
- "goo",
- "6",
- "7",
- "k\u0254nde",
- "saah",
- "galo",
- "kenpkato \u0253olol\u0254",
- "luukao l\u0254ma"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vai-latn-lr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn.js
deleted file mode 100644
index 3afe6629..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-latn.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "lahadi",
- "t\u025b\u025bn\u025b\u025b",
- "talata",
- "alaba",
- "aimisa",
- "aijima",
- "si\u0253iti"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "luukao kem\u00e3",
- "\u0253anda\u0253u",
- "v\u0254\u0254",
- "fulu",
- "goo",
- "6",
- "7",
- "k\u0254nde",
- "saah",
- "galo",
- "kenpkato \u0253olol\u0254",
- "luukao l\u0254ma"
- ],
- "SHORTDAY": [
- "lahadi",
- "t\u025b\u025bn\u025b\u025b",
- "talata",
- "alaba",
- "aimisa",
- "aijima",
- "si\u0253iti"
- ],
- "SHORTMONTH": [
- "luukao kem\u00e3",
- "\u0253anda\u0253u",
- "v\u0254\u0254",
- "fulu",
- "goo",
- "6",
- "7",
- "k\u0254nde",
- "saah",
- "galo",
- "kenpkato \u0253olol\u0254",
- "luukao l\u0254ma"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vai-latn",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii-lr.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii-lr.js
deleted file mode 100644
index 66666949..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii-lr.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\ua55e\ua54c\ua535",
- "\ua5f3\ua5e1\ua609",
- "\ua55a\ua55e\ua55a",
- "\ua549\ua55e\ua552",
- "\ua549\ua524\ua546\ua562",
- "\ua549\ua524\ua540\ua56e",
- "\ua53b\ua52c\ua533"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\ua5a8\ua56a\ua583 \ua51e\ua56e",
- "\ua552\ua561\ua59d\ua595",
- "\ua57e\ua5ba",
- "\ua5a2\ua595",
- "\ua591\ua571",
- "6",
- "7",
- "\ua5db\ua515",
- "\ua562\ua54c",
- "\ua56d\ua583",
- "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf",
- "\ua5a8\ua56a\ua571 \ua5cf\ua56e"
- ],
- "SHORTDAY": [
- "\ua55e\ua54c\ua535",
- "\ua5f3\ua5e1\ua609",
- "\ua55a\ua55e\ua55a",
- "\ua549\ua55e\ua552",
- "\ua549\ua524\ua546\ua562",
- "\ua549\ua524\ua540\ua56e",
- "\ua53b\ua52c\ua533"
- ],
- "SHORTMONTH": [
- "\ua5a8\ua56a\ua583 \ua51e\ua56e",
- "\ua552\ua561\ua59d\ua595",
- "\ua57e\ua5ba",
- "\ua5a2\ua595",
- "\ua591\ua571",
- "6",
- "7",
- "\ua5db\ua515",
- "\ua562\ua54c",
- "\ua56d\ua583",
- "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf",
- "\ua5a8\ua56a\ua571 \ua5cf\ua56e"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vai-vaii-lr",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii.js
deleted file mode 100644
index fc172f82..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai-vaii.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\ua55e\ua54c\ua535",
- "\ua5f3\ua5e1\ua609",
- "\ua55a\ua55e\ua55a",
- "\ua549\ua55e\ua552",
- "\ua549\ua524\ua546\ua562",
- "\ua549\ua524\ua540\ua56e",
- "\ua53b\ua52c\ua533"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\ua5a8\ua56a\ua583 \ua51e\ua56e",
- "\ua552\ua561\ua59d\ua595",
- "\ua57e\ua5ba",
- "\ua5a2\ua595",
- "\ua591\ua571",
- "6",
- "7",
- "\ua5db\ua515",
- "\ua562\ua54c",
- "\ua56d\ua583",
- "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf",
- "\ua5a8\ua56a\ua571 \ua5cf\ua56e"
- ],
- "SHORTDAY": [
- "\ua55e\ua54c\ua535",
- "\ua5f3\ua5e1\ua609",
- "\ua55a\ua55e\ua55a",
- "\ua549\ua55e\ua552",
- "\ua549\ua524\ua546\ua562",
- "\ua549\ua524\ua540\ua56e",
- "\ua53b\ua52c\ua533"
- ],
- "SHORTMONTH": [
- "\ua5a8\ua56a\ua583 \ua51e\ua56e",
- "\ua552\ua561\ua59d\ua595",
- "\ua57e\ua5ba",
- "\ua5a2\ua595",
- "\ua591\ua571",
- "6",
- "7",
- "\ua5db\ua515",
- "\ua562\ua54c",
- "\ua56d\ua583",
- "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf",
- "\ua5a8\ua56a\ua571 \ua5cf\ua56e"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vai-vaii",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai.js
deleted file mode 100644
index bdf3393a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vai.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "\ua55e\ua54c\ua535",
- "\ua5f3\ua5e1\ua609",
- "\ua55a\ua55e\ua55a",
- "\ua549\ua55e\ua552",
- "\ua549\ua524\ua546\ua562",
- "\ua549\ua524\ua540\ua56e",
- "\ua53b\ua52c\ua533"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\ua5a8\ua56a\ua583 \ua51e\ua56e",
- "\ua552\ua561\ua59d\ua595",
- "\ua57e\ua5ba",
- "\ua5a2\ua595",
- "\ua591\ua571",
- "6",
- "7",
- "\ua5db\ua515",
- "\ua562\ua54c",
- "\ua56d\ua583",
- "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf",
- "\ua5a8\ua56a\ua571 \ua5cf\ua56e"
- ],
- "SHORTDAY": [
- "\ua55e\ua54c\ua535",
- "\ua5f3\ua5e1\ua609",
- "\ua55a\ua55e\ua55a",
- "\ua549\ua55e\ua552",
- "\ua549\ua524\ua546\ua562",
- "\ua549\ua524\ua540\ua56e",
- "\ua53b\ua52c\ua533"
- ],
- "SHORTMONTH": [
- "\ua5a8\ua56a\ua583 \ua51e\ua56e",
- "\ua552\ua561\ua59d\ua595",
- "\ua57e\ua5ba",
- "\ua5a2\ua595",
- "\ua591\ua571",
- "6",
- "7",
- "\ua5db\ua515",
- "\ua562\ua54c",
- "\ua56d\ua583",
- "\ua51e\ua60b\ua554\ua57f \ua578\ua583\ua5cf",
- "\ua5a8\ua56a\ua571 \ua5cf\ua56e"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vai",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve-za.js
deleted file mode 100644
index eb526307..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve-za.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Swondaha",
- "Musumbuluwo",
- "\u1e3cavhuvhili",
- "\u1e3cavhuraru",
- "\u1e3cavhu\u1e4ba",
- "\u1e3cavhu\u1e71anu",
- "Mugivhela"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Phando",
- "Luhuhi",
- "\u1e70hafamuhwe",
- "Lambamai",
- "Shundunthule",
- "Fulwi",
- "Fulwana",
- "\u1e70hangule",
- "Khubvumedzi",
- "Tshimedzi",
- "\u1e3cara",
- "Nyendavhusiku"
- ],
- "SHORTDAY": [
- "Swo",
- "Mus",
- "Vhi",
- "Rar",
- "\u1e4aa",
- "\u1e70an",
- "Mug"
- ],
- "SHORTMONTH": [
- "Pha",
- "Luh",
- "\u1e70hf",
- "Lam",
- "Shu",
- "Lwi",
- "Lwa",
- "\u1e70ha",
- "Khu",
- "Tsh",
- "\u1e3car",
- "Nye"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ve-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve.js
deleted file mode 100644
index 0acd86f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_ve.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Swondaha",
- "Musumbuluwo",
- "\u1e3cavhuvhili",
- "\u1e3cavhuraru",
- "\u1e3cavhu\u1e4ba",
- "\u1e3cavhu\u1e71anu",
- "Mugivhela"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Phando",
- "Luhuhi",
- "\u1e70hafamuhwe",
- "Lambamai",
- "Shundunthule",
- "Fulwi",
- "Fulwana",
- "\u1e70hangule",
- "Khubvumedzi",
- "Tshimedzi",
- "\u1e3cara",
- "Nyendavhusiku"
- ],
- "SHORTDAY": [
- "Swo",
- "Mus",
- "Vhi",
- "Rar",
- "\u1e4aa",
- "\u1e70an",
- "Mug"
- ],
- "SHORTMONTH": [
- "Pha",
- "Luh",
- "\u1e70hf",
- "Lam",
- "Shu",
- "Lwi",
- "Lwa",
- "\u1e70ha",
- "Khu",
- "Tsh",
- "\u1e3car",
- "Nye"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "ve",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi-vn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi-vn.js
deleted file mode 100644
index 112e96ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi-vn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "SA",
- "CH"
- ],
- "DAY": [
- "Ch\u1ee7 Nh\u1eadt",
- "Th\u1ee9 Hai",
- "Th\u1ee9 Ba",
- "Th\u1ee9 T\u01b0",
- "Th\u1ee9 N\u0103m",
- "Th\u1ee9 S\u00e1u",
- "Th\u1ee9 B\u1ea3y"
- ],
- "ERANAMES": [
- "tr. CN",
- "sau CN"
- ],
- "ERAS": [
- "tr. CN",
- "sau CN"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "th\u00e1ng 1",
- "th\u00e1ng 2",
- "th\u00e1ng 3",
- "th\u00e1ng 4",
- "th\u00e1ng 5",
- "th\u00e1ng 6",
- "th\u00e1ng 7",
- "th\u00e1ng 8",
- "th\u00e1ng 9",
- "th\u00e1ng 10",
- "th\u00e1ng 11",
- "th\u00e1ng 12"
- ],
- "SHORTDAY": [
- "CN",
- "Th 2",
- "Th 3",
- "Th 4",
- "Th 5",
- "Th 6",
- "Th 7"
- ],
- "SHORTMONTH": [
- "thg 1",
- "thg 2",
- "thg 3",
- "thg 4",
- "thg 5",
- "thg 6",
- "thg 7",
- "thg 8",
- "thg 9",
- "thg 10",
- "thg 11",
- "thg 12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y",
- "longDate": "'Ng\u00e0y' dd 'th\u00e1ng' MM 'n\u0103m' y",
- "medium": "dd-MM-y HH:mm:ss",
- "mediumDate": "dd-MM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ab",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "vi-vn",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi.js
deleted file mode 100644
index be70bd8e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vi.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "SA",
- "CH"
- ],
- "DAY": [
- "Ch\u1ee7 Nh\u1eadt",
- "Th\u1ee9 Hai",
- "Th\u1ee9 Ba",
- "Th\u1ee9 T\u01b0",
- "Th\u1ee9 N\u0103m",
- "Th\u1ee9 S\u00e1u",
- "Th\u1ee9 B\u1ea3y"
- ],
- "ERANAMES": [
- "tr. CN",
- "sau CN"
- ],
- "ERAS": [
- "tr. CN",
- "sau CN"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "th\u00e1ng 1",
- "th\u00e1ng 2",
- "th\u00e1ng 3",
- "th\u00e1ng 4",
- "th\u00e1ng 5",
- "th\u00e1ng 6",
- "th\u00e1ng 7",
- "th\u00e1ng 8",
- "th\u00e1ng 9",
- "th\u00e1ng 10",
- "th\u00e1ng 11",
- "th\u00e1ng 12"
- ],
- "SHORTDAY": [
- "CN",
- "Th 2",
- "Th 3",
- "Th 4",
- "Th 5",
- "Th 6",
- "Th 7"
- ],
- "SHORTMONTH": [
- "thg 1",
- "thg 2",
- "thg 3",
- "thg 4",
- "thg 5",
- "thg 6",
- "thg 7",
- "thg 8",
- "thg 9",
- "thg 10",
- "thg 11",
- "thg 12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, 'ng\u00e0y' dd MMMM 'n\u0103m' y",
- "longDate": "'Ng\u00e0y' dd 'th\u00e1ng' MM 'n\u0103m' y",
- "medium": "dd-MM-y HH:mm:ss",
- "mediumDate": "dd-MM-y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/y HH:mm",
- "shortDate": "dd/MM/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20ab",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": ".",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "vi",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo-001.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo-001.js
deleted file mode 100644
index a17a26da..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo-001.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "posz.",
- "b\u00fcz."
- ],
- "DAY": [
- "sudel",
- "mudel",
- "tudel",
- "vedel",
- "d\u00f6del",
- "fridel",
- "z\u00e4del"
- ],
- "ERANAMES": [
- "b. t. kr.",
- "p. t. kr."
- ],
- "ERAS": [
- "b. t. kr.",
- "p. t. kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janul",
- "febul",
- "m\u00e4zil",
- "prilul",
- "mayul",
- "yunul",
- "yulul",
- "gustul",
- "setul",
- "tobul",
- "novul",
- "dekul"
- ],
- "SHORTDAY": [
- "su.",
- "mu.",
- "tu.",
- "ve.",
- "d\u00f6.",
- "fr.",
- "z\u00e4."
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "m\u00e4z",
- "prl",
- "may",
- "yun",
- "yul",
- "gst",
- "set",
- "ton",
- "nov",
- "dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMMa 'd'. d'id'",
- "longDate": "y MMMM d",
- "medium": "y MMM. d HH:mm:ss",
- "mediumDate": "y MMM. d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "vo-001",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo.js
deleted file mode 100644
index f8507993..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "posz.",
- "b\u00fcz."
- ],
- "DAY": [
- "sudel",
- "mudel",
- "tudel",
- "vedel",
- "d\u00f6del",
- "fridel",
- "z\u00e4del"
- ],
- "ERANAMES": [
- "b. t. kr.",
- "p. t. kr."
- ],
- "ERAS": [
- "b. t. kr.",
- "p. t. kr."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "janul",
- "febul",
- "m\u00e4zil",
- "prilul",
- "mayul",
- "yunul",
- "yulul",
- "gustul",
- "setul",
- "tobul",
- "novul",
- "dekul"
- ],
- "SHORTDAY": [
- "su.",
- "mu.",
- "tu.",
- "ve.",
- "d\u00f6.",
- "fr.",
- "z\u00e4."
- ],
- "SHORTMONTH": [
- "jan",
- "feb",
- "m\u00e4z",
- "prl",
- "may",
- "yun",
- "yul",
- "gst",
- "set",
- "ton",
- "nov",
- "dek"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y MMMMa 'd'. d'id'",
- "longDate": "y MMMM d",
- "medium": "y MMM. d HH:mm:ss",
- "mediumDate": "y MMM. d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4\u00a0-",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "vo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun-tz.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun-tz.js
deleted file mode 100644
index 52b0670e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun-tz.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "utuko",
- "kyiukonyi"
- ],
- "DAY": [
- "Jumapilyi",
- "Jumatatuu",
- "Jumanne",
- "Jumatanu",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristu",
- "Baada ya Kristu"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprilyi",
- "Mei",
- "Junyi",
- "Julyai",
- "Agusti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vun-tz",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun.js
deleted file mode 100644
index 4efacdf0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_vun.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "utuko",
- "kyiukonyi"
- ],
- "DAY": [
- "Jumapilyi",
- "Jumatatuu",
- "Jumanne",
- "Jumatanu",
- "Alhamisi",
- "Ijumaa",
- "Jumamosi"
- ],
- "ERANAMES": [
- "Kabla ya Kristu",
- "Baada ya Kristu"
- ],
- "ERAS": [
- "KK",
- "BK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Januari",
- "Februari",
- "Machi",
- "Aprilyi",
- "Mei",
- "Junyi",
- "Julyai",
- "Agusti",
- "Septemba",
- "Oktoba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Jpi",
- "Jtt",
- "Jnn",
- "Jtn",
- "Alh",
- "Iju",
- "Jmo"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mac",
- "Apr",
- "Mei",
- "Jun",
- "Jul",
- "Ago",
- "Sep",
- "Okt",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "TSh",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "vun",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae-ch.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae-ch.js
deleted file mode 100644
index fba5d6ff..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae-ch.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunntag",
- "M\u00e4ntag",
- "Zi\u0161tag",
- "Mittwu\u010d",
- "Fr\u00f3ntag",
- "Fritag",
- "Sam\u0161tag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr"
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jenner",
- "Hornig",
- "M\u00e4rze",
- "Abrille",
- "Meije",
- "Br\u00e1\u010det",
- "Heiwet",
- "\u00d6ig\u0161te",
- "Herb\u0161tm\u00e1net",
- "W\u00edm\u00e1net",
- "Winterm\u00e1net",
- "Chri\u0161tm\u00e1net"
- ],
- "SHORTDAY": [
- "Sun",
- "M\u00e4n",
- "Zi\u0161",
- "Mit",
- "Fr\u00f3",
- "Fri",
- "Sam"
- ],
- "SHORTMONTH": [
- "Jen",
- "Hor",
- "M\u00e4r",
- "Abr",
- "Mei",
- "Br\u00e1",
- "Hei",
- "\u00d6ig",
- "Her",
- "W\u00edm",
- "Win",
- "Chr"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "wae-ch",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae.js
deleted file mode 100644
index 0e16d916..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wae.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunntag",
- "M\u00e4ntag",
- "Zi\u0161tag",
- "Mittwu\u010d",
- "Fr\u00f3ntag",
- "Fritag",
- "Sam\u0161tag"
- ],
- "ERANAMES": [
- "v. Chr.",
- "n. Chr"
- ],
- "ERAS": [
- "v. Chr.",
- "n. Chr"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Jenner",
- "Hornig",
- "M\u00e4rze",
- "Abrille",
- "Meije",
- "Br\u00e1\u010det",
- "Heiwet",
- "\u00d6ig\u0161te",
- "Herb\u0161tm\u00e1net",
- "W\u00edm\u00e1net",
- "Winterm\u00e1net",
- "Chri\u0161tm\u00e1net"
- ],
- "SHORTDAY": [
- "Sun",
- "M\u00e4n",
- "Zi\u0161",
- "Mit",
- "Fr\u00f3",
- "Fri",
- "Sam"
- ],
- "SHORTMONTH": [
- "Jen",
- "Hor",
- "M\u00e4r",
- "Abr",
- "Mei",
- "Br\u00e1",
- "Hei",
- "\u00d6ig",
- "Her",
- "W\u00edm",
- "Win",
- "Chr"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d. MMMM y",
- "longDate": "d. MMMM y",
- "medium": "d. MMM y HH:mm:ss",
- "mediumDate": "d. MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CHF",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "wae",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal-et.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal-et.js
deleted file mode 100644
index 16a842ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal-et.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u121b\u1208\u12f6",
- "\u1243\u121b"
- ],
- "DAY": [
- "\u12c8\u130b",
- "\u1233\u12ed\u1296",
- "\u121b\u1246\u1233\u129b",
- "\u12a0\u1229\u12cb",
- "\u1203\u1219\u1233",
- "\u12a0\u122d\u1263",
- "\u1244\u122b"
- ],
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1270\u12cd\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u12c8\u130b",
- "\u1233\u12ed\u1296",
- "\u121b\u1246\u1233\u129b",
- "\u12a0\u1229\u12cb",
- "\u1203\u1219\u1233",
- "\u12a0\u122d\u1263",
- "\u1244\u122b"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1270",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "fullDate": "EEEE\u1365 dd MMMM \u130b\u120b\u1233 y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "wal-et",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal.js
deleted file mode 100644
index 795c02d2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_wal.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u121b\u1208\u12f6",
- "\u1243\u121b"
- ],
- "DAY": [
- "\u12c8\u130b",
- "\u1233\u12ed\u1296",
- "\u121b\u1246\u1233\u129b",
- "\u12a0\u1229\u12cb",
- "\u1203\u1219\u1233",
- "\u12a0\u122d\u1263",
- "\u1244\u122b"
- ],
- "MONTH": [
- "\u1303\u1295\u12e9\u12c8\u122a",
- "\u134c\u1265\u1229\u12c8\u122a",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228\u120d",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235\u1275",
- "\u1234\u1355\u1274\u121d\u1260\u122d",
- "\u12a6\u12ad\u1270\u12cd\u1260\u122d",
- "\u1296\u126c\u121d\u1260\u122d",
- "\u12f2\u1234\u121d\u1260\u122d"
- ],
- "SHORTDAY": [
- "\u12c8\u130b",
- "\u1233\u12ed\u1296",
- "\u121b\u1246\u1233\u129b",
- "\u12a0\u1229\u12cb",
- "\u1203\u1219\u1233",
- "\u12a0\u122d\u1263",
- "\u1244\u122b"
- ],
- "SHORTMONTH": [
- "\u1303\u1295\u12e9",
- "\u134c\u1265\u1229",
- "\u121b\u122d\u127d",
- "\u12a4\u1355\u1228",
- "\u121c\u12ed",
- "\u1301\u1295",
- "\u1301\u120b\u12ed",
- "\u12a6\u1308\u1235",
- "\u1234\u1355\u1274",
- "\u12a6\u12ad\u1270",
- "\u1296\u126c\u121d",
- "\u12f2\u1234\u121d"
- ],
- "fullDate": "EEEE\u1365 dd MMMM \u130b\u120b\u1233 y G",
- "longDate": "dd MMMM y",
- "medium": "dd-MMM-y h:mm:ss a",
- "mediumDate": "dd-MMM-y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/yy h:mm a",
- "shortDate": "dd/MM/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "Birr",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": "\u2019",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "wal",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh-za.js
deleted file mode 100644
index 5eeb809a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh-za.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Cawe",
- "Mvulo",
- "Lwesibini",
- "Lwesithathu",
- "Lwesine",
- "Lwesihlanu",
- "Mgqibelo"
- ],
- "MONTH": [
- "Janyuwari",
- "Februwari",
- "Matshi",
- "Epreli",
- "Meyi",
- "Juni",
- "Julayi",
- "Agasti",
- "Septemba",
- "Okthoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Caw",
- "Mvu",
- "Bin",
- "Tha",
- "Sin",
- "Hla",
- "Mgq"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mat",
- "Epr",
- "Mey",
- "Jun",
- "Jul",
- "Aga",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "xh-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh.js
deleted file mode 100644
index 756a9f77..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xh.js
+++ /dev/null
@@ -1,115 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Cawe",
- "Mvulo",
- "Lwesibini",
- "Lwesithathu",
- "Lwesine",
- "Lwesihlanu",
- "Mgqibelo"
- ],
- "MONTH": [
- "Janyuwari",
- "Februwari",
- "Matshi",
- "Epreli",
- "Meyi",
- "Juni",
- "Julayi",
- "Agasti",
- "Septemba",
- "Okthoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Caw",
- "Mvu",
- "Bin",
- "Tha",
- "Sin",
- "Hla",
- "Mgq"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mat",
- "Epr",
- "Mey",
- "Jun",
- "Jul",
- "Aga",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "fullDate": "y MMMM d, EEEE",
- "longDate": "y MMMM d",
- "medium": "y MMM d HH:mm:ss",
- "mediumDate": "y MMM d",
- "mediumTime": "HH:mm:ss",
- "short": "y-MM-dd HH:mm",
- "shortDate": "y-MM-dd",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "\u00a4-",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "xh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog-ug.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog-ug.js
deleted file mode 100644
index 0288518e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog-ug.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Munkyo",
- "Eigulo"
- ],
- "DAY": [
- "Sabiiti",
- "Balaza",
- "Owokubili",
- "Owokusatu",
- "Olokuna",
- "Olokutaanu",
- "Olomukaaga"
- ],
- "ERANAMES": [
- "Kulisto nga azilawo",
- "Kulisto nga affile"
- ],
- "ERAS": [
- "AZ",
- "AF"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janwaliyo",
- "Febwaliyo",
- "Marisi",
- "Apuli",
- "Maayi",
- "Juuni",
- "Julaayi",
- "Agusito",
- "Sebuttemba",
- "Okitobba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Sabi",
- "Bala",
- "Kubi",
- "Kusa",
- "Kuna",
- "Kuta",
- "Muka"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apu",
- "Maa",
- "Juu",
- "Jul",
- "Agu",
- "Seb",
- "Oki",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "xog-ug",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog.js
deleted file mode 100644
index 1a42ccf0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_xog.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Munkyo",
- "Eigulo"
- ],
- "DAY": [
- "Sabiiti",
- "Balaza",
- "Owokubili",
- "Owokusatu",
- "Olokuna",
- "Olokutaanu",
- "Olomukaaga"
- ],
- "ERANAMES": [
- "Kulisto nga azilawo",
- "Kulisto nga affile"
- ],
- "ERAS": [
- "AZ",
- "AF"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Janwaliyo",
- "Febwaliyo",
- "Marisi",
- "Apuli",
- "Maayi",
- "Juuni",
- "Julaayi",
- "Agusito",
- "Sebuttemba",
- "Okitobba",
- "Novemba",
- "Desemba"
- ],
- "SHORTDAY": [
- "Sabi",
- "Bala",
- "Kubi",
- "Kusa",
- "Kuna",
- "Kuta",
- "Muka"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apu",
- "Maa",
- "Juu",
- "Jul",
- "Agu",
- "Seb",
- "Oki",
- "Nov",
- "Des"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "UGX",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "xog",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav-cm.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav-cm.js
deleted file mode 100644
index 142164fc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav-cm.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ki\u025bm\u025b\u0301\u025bm",
- "kis\u025b\u0301nd\u025b"
- ],
- "DAY": [
- "s\u0254\u0301ndi\u025b",
- "m\u00f3ndie",
- "mu\u00e1ny\u00e1\u014bm\u00f3ndie",
- "met\u00fakp\u00ed\u00e1p\u025b",
- "k\u00fap\u00e9limet\u00fakpiap\u025b",
- "fel\u00e9te",
- "s\u00e9sel\u00e9"
- ],
- "ERANAMES": [
- "katikup\u00eden Y\u00e9suse",
- "\u00e9k\u00e9l\u00e9mk\u00fanup\u00ed\u00e9n n"
- ],
- "ERAS": [
- "k.Y.",
- "+J.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "pik\u00edt\u00edk\u00edtie, o\u00f3l\u00ed \u00fa kut\u00faan",
- "si\u025by\u025b\u0301, o\u00f3li \u00fa k\u00e1nd\u00ed\u025b",
- "\u0254ns\u00famb\u0254l, o\u00f3li \u00fa k\u00e1t\u00e1t\u00fa\u025b",
- "mesi\u014b, o\u00f3li \u00fa k\u00e9nie",
- "ensil, o\u00f3li \u00fa k\u00e1t\u00e1nu\u025b",
- "\u0254s\u0254n",
- "efute",
- "pisuy\u00fa",
- "im\u025b\u014b i pu\u0254s",
- "im\u025b\u014b i put\u00fak,o\u00f3li \u00fa k\u00e1t\u00ed\u025b",
- "makandik\u025b",
- "pil\u0254nd\u0254\u0301"
- ],
- "SHORTDAY": [
- "sd",
- "md",
- "mw",
- "et",
- "kl",
- "fl",
- "ss"
- ],
- "SHORTMONTH": [
- "o.1",
- "o.2",
- "o.3",
- "o.4",
- "o.5",
- "o.6",
- "o.7",
- "o.8",
- "o.9",
- "o.10",
- "o.11",
- "o.12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "yav-cm",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav.js
deleted file mode 100644
index 01781a0d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yav.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "ki\u025bm\u025b\u0301\u025bm",
- "kis\u025b\u0301nd\u025b"
- ],
- "DAY": [
- "s\u0254\u0301ndi\u025b",
- "m\u00f3ndie",
- "mu\u00e1ny\u00e1\u014bm\u00f3ndie",
- "met\u00fakp\u00ed\u00e1p\u025b",
- "k\u00fap\u00e9limet\u00fakpiap\u025b",
- "fel\u00e9te",
- "s\u00e9sel\u00e9"
- ],
- "ERANAMES": [
- "katikup\u00eden Y\u00e9suse",
- "\u00e9k\u00e9l\u00e9mk\u00fanup\u00ed\u00e9n n"
- ],
- "ERAS": [
- "k.Y.",
- "+J.C."
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "pik\u00edt\u00edk\u00edtie, o\u00f3l\u00ed \u00fa kut\u00faan",
- "si\u025by\u025b\u0301, o\u00f3li \u00fa k\u00e1nd\u00ed\u025b",
- "\u0254ns\u00famb\u0254l, o\u00f3li \u00fa k\u00e1t\u00e1t\u00fa\u025b",
- "mesi\u014b, o\u00f3li \u00fa k\u00e9nie",
- "ensil, o\u00f3li \u00fa k\u00e1t\u00e1nu\u025b",
- "\u0254s\u0254n",
- "efute",
- "pisuy\u00fa",
- "im\u025b\u014b i pu\u0254s",
- "im\u025b\u014b i put\u00fak,o\u00f3li \u00fa k\u00e1t\u00ed\u025b",
- "makandik\u025b",
- "pil\u0254nd\u0254\u0301"
- ],
- "SHORTDAY": [
- "sd",
- "md",
- "mw",
- "et",
- "kl",
- "fl",
- "ss"
- ],
- "SHORTMONTH": [
- "o.1",
- "o.2",
- "o.3",
- "o.4",
- "o.5",
- "o.6",
- "o.7",
- "o.8",
- "o.9",
- "o.10",
- "o.11",
- "o.12"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y HH:mm:ss",
- "mediumDate": "d MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "FCFA",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a0\u00a4",
- "posPre": "",
- "posSuf": "\u00a0\u00a4"
- }
- ]
- },
- "id": "yav",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi-001.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi-001.js
deleted file mode 100644
index 0ba2042d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi-001.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u05e4\u05d0\u05e8\u05de\u05d9\u05d8\u05d0\u05d2",
- "\u05e0\u05d0\u05db\u05de\u05d9\u05d8\u05d0\u05d2"
- ],
- "DAY": [
- "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7",
- "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7",
- "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7",
- "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da",
- "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7",
- "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7",
- "\u05e9\u05d1\u05ea"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8",
- "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8",
- "\u05de\u05e2\u05e8\u05e5",
- "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc",
- "\u05de\u05d9\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8",
- "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8"
- ],
- "SHORTDAY": [
- "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7",
- "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7",
- "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7",
- "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da",
- "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7",
- "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7",
- "\u05e9\u05d1\u05ea"
- ],
- "SHORTMONTH": [
- "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8",
- "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8",
- "\u05de\u05e2\u05e8\u05e5",
- "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc",
- "\u05de\u05d9\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8",
- "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d\u05d8\u05df MMMM y",
- "longDate": "d\u05d8\u05df MMMM y",
- "medium": "d\u05d8\u05df MMM y HH:mm:ss",
- "mediumDate": "d\u05d8\u05df MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "yi-001",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi.js
deleted file mode 100644
index 57fb4a9d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yi.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u05e4\u05d0\u05e8\u05de\u05d9\u05d8\u05d0\u05d2",
- "\u05e0\u05d0\u05db\u05de\u05d9\u05d8\u05d0\u05d2"
- ],
- "DAY": [
- "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7",
- "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7",
- "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7",
- "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da",
- "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7",
- "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7",
- "\u05e9\u05d1\u05ea"
- ],
- "ERANAMES": [
- "BCE",
- "CE"
- ],
- "ERAS": [
- "BCE",
- "CE"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8",
- "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8",
- "\u05de\u05e2\u05e8\u05e5",
- "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc",
- "\u05de\u05d9\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8",
- "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8"
- ],
- "SHORTDAY": [
- "\u05d6\u05d5\u05e0\u05d8\u05d9\u05e7",
- "\u05de\u05d0\u05b8\u05e0\u05d8\u05d9\u05e7",
- "\u05d3\u05d9\u05e0\u05e1\u05d8\u05d9\u05e7",
- "\u05de\u05d9\u05d8\u05d5\u05d5\u05d0\u05da",
- "\u05d3\u05d0\u05e0\u05e2\u05e8\u05e9\u05d8\u05d9\u05e7",
- "\u05e4\u05bf\u05e8\u05f2\u05b7\u05d8\u05d9\u05e7",
- "\u05e9\u05d1\u05ea"
- ],
- "SHORTMONTH": [
- "\u05d9\u05d0\u05b7\u05e0\u05d5\u05d0\u05b7\u05e8",
- "\u05e4\u05bf\u05e2\u05d1\u05e8\u05d5\u05d0\u05b7\u05e8",
- "\u05de\u05e2\u05e8\u05e5",
- "\u05d0\u05b7\u05e4\u05bc\u05e8\u05d9\u05dc",
- "\u05de\u05d9\u05d9",
- "\u05d9\u05d5\u05e0\u05d9",
- "\u05d9\u05d5\u05dc\u05d9",
- "\u05d0\u05d5\u05d9\u05d2\u05d5\u05e1\u05d8",
- "\u05e1\u05e2\u05e4\u05bc\u05d8\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d0\u05e7\u05d8\u05d0\u05d1\u05e2\u05e8",
- "\u05e0\u05d0\u05d5\u05d5\u05e2\u05de\u05d1\u05e2\u05e8",
- "\u05d3\u05e2\u05e6\u05e2\u05de\u05d1\u05e2\u05e8"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d\u05d8\u05df MMMM y",
- "longDate": "d\u05d8\u05df MMMM y",
- "medium": "d\u05d8\u05df MMM y HH:mm:ss",
- "mediumDate": "d\u05d8\u05df MMM y",
- "mediumTime": "HH:mm:ss",
- "short": "dd/MM/yy HH:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "yi",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-bj.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-bj.js
deleted file mode 100644
index afc112c3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-bj.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u00c0\u00e1r\u0254\u0300",
- "\u0186\u0300s\u00e1n"
- ],
- "DAY": [
- "\u0186j\u0254\u0301 \u00c0\u00eck\u00fa",
- "\u0186j\u0254\u0301 Aj\u00e9",
- "\u0186j\u0254\u0301 \u00ccs\u025b\u0301gun",
- "\u0186j\u0254\u0301r\u00fa",
- "\u0186j\u0254\u0301b\u0254",
- "\u0186j\u0254\u0301 \u0190t\u00ec",
- "\u0186j\u0254\u0301 \u00c0b\u00e1m\u025b\u0301ta"
- ],
- "ERANAMES": [
- "Saju Kristi",
- "Lehin Kristi"
- ],
- "ERAS": [
- "SK",
- "LK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "Osh\u00f9 Sh\u025b\u0301r\u025b\u0301",
- "Osh\u00f9 \u00c8r\u00e8l\u00e8",
- "Osh\u00f9 \u0190r\u025b\u0300n\u00e0",
- "Osh\u00f9 \u00ccgb\u00e9",
- "Osh\u00f9 \u0190\u0300bibi",
- "Osh\u00f9 \u00d2k\u00fadu",
- "Osh\u00f9 Ag\u025bm\u0254",
- "Osh\u00f9 \u00d2g\u00fan",
- "Osh\u00f9 Owewe",
- "Osh\u00f9 \u0186\u0300w\u00e0r\u00e0",
- "Osh\u00f9 B\u00e9l\u00fa",
- "Osh\u00f9 \u0186\u0300p\u025b\u0300"
- ],
- "SHORTDAY": [
- "\u00c0\u00eck\u00fa",
- "Aj\u00e9",
- "\u00ccs\u025b\u0301gun",
- "\u0186j\u0254\u0301r\u00fa",
- "\u0186j\u0254\u0301b\u0254",
- "\u0190t\u00ec",
- "\u00c0b\u00e1m\u025b\u0301ta"
- ],
- "SHORTMONTH": [
- "Sh\u025b\u0301r\u025b\u0301",
- "\u00c8r\u00e8l\u00e8",
- "\u0190r\u025b\u0300n\u00e0",
- "\u00ccgb\u00e9",
- "\u0190\u0300bibi",
- "\u00d2k\u00fadu",
- "Ag\u025bm\u0254",
- "\u00d2g\u00fan",
- "Owewe",
- "\u0186\u0300w\u00e0r\u00e0",
- "B\u00e9l\u00fa",
- "\u0186\u0300p\u025b\u0300"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "CFA",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "yo-bj",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-ng.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-ng.js
deleted file mode 100644
index 37b44503..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo-ng.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u00c0\u00e1r\u1ecd\u0300",
- "\u1ecc\u0300s\u00e1n"
- ],
- "DAY": [
- "\u1eccj\u1ecd\u0301 \u00c0\u00eck\u00fa",
- "\u1eccj\u1ecd\u0301 Aj\u00e9",
- "\u1eccj\u1ecd\u0301 \u00ccs\u1eb9\u0301gun",
- "\u1eccj\u1ecd\u0301r\u00fa",
- "\u1eccj\u1ecd\u0301b\u1ecd",
- "\u1eccj\u1ecd\u0301 \u1eb8t\u00ec",
- "\u1eccj\u1ecd\u0301 \u00c0b\u00e1m\u1eb9\u0301ta"
- ],
- "ERANAMES": [
- "Saju Kristi",
- "Lehin Kristi"
- ],
- "ERAS": [
- "SK",
- "LK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "O\u1e63\u00f9 \u1e62\u1eb9\u0301r\u1eb9\u0301",
- "O\u1e63\u00f9 \u00c8r\u00e8l\u00e8",
- "O\u1e63\u00f9 \u1eb8r\u1eb9\u0300n\u00e0",
- "O\u1e63\u00f9 \u00ccgb\u00e9",
- "O\u1e63\u00f9 \u1eb8\u0300bibi",
- "O\u1e63\u00f9 \u00d2k\u00fadu",
- "O\u1e63\u00f9 Ag\u1eb9m\u1ecd",
- "O\u1e63\u00f9 \u00d2g\u00fan",
- "O\u1e63\u00f9 Owewe",
- "O\u1e63\u00f9 \u1ecc\u0300w\u00e0r\u00e0",
- "O\u1e63\u00f9 B\u00e9l\u00fa",
- "O\u1e63\u00f9 \u1ecc\u0300p\u1eb9\u0300"
- ],
- "SHORTDAY": [
- "\u00c0\u00eck\u00fa",
- "Aj\u00e9",
- "\u00ccs\u1eb9\u0301gun",
- "\u1eccj\u1ecd\u0301r\u00fa",
- "\u1eccj\u1ecd\u0301b\u1ecd",
- "\u1eb8t\u00ec",
- "\u00c0b\u00e1m\u1eb9\u0301ta"
- ],
- "SHORTMONTH": [
- "\u1e62\u1eb9\u0301r\u1eb9\u0301",
- "\u00c8r\u00e8l\u00e8",
- "\u1eb8r\u1eb9\u0300n\u00e0",
- "\u00ccgb\u00e9",
- "\u1eb8\u0300bibi",
- "\u00d2k\u00fadu",
- "Ag\u1eb9m\u1ecd",
- "\u00d2g\u00fan",
- "Owewe",
- "\u1ecc\u0300w\u00e0r\u00e0",
- "B\u00e9l\u00fa",
- "\u1ecc\u0300p\u1eb9\u0300"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "yo-ng",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo.js
deleted file mode 100644
index 49d87d4f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_yo.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u00c0\u00e1r\u1ecd\u0300",
- "\u1ecc\u0300s\u00e1n"
- ],
- "DAY": [
- "\u1eccj\u1ecd\u0301 \u00c0\u00eck\u00fa",
- "\u1eccj\u1ecd\u0301 Aj\u00e9",
- "\u1eccj\u1ecd\u0301 \u00ccs\u1eb9\u0301gun",
- "\u1eccj\u1ecd\u0301r\u00fa",
- "\u1eccj\u1ecd\u0301b\u1ecd",
- "\u1eccj\u1ecd\u0301 \u1eb8t\u00ec",
- "\u1eccj\u1ecd\u0301 \u00c0b\u00e1m\u1eb9\u0301ta"
- ],
- "ERANAMES": [
- "Saju Kristi",
- "Lehin Kristi"
- ],
- "ERAS": [
- "SK",
- "LK"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "O\u1e63\u00f9 \u1e62\u1eb9\u0301r\u1eb9\u0301",
- "O\u1e63\u00f9 \u00c8r\u00e8l\u00e8",
- "O\u1e63\u00f9 \u1eb8r\u1eb9\u0300n\u00e0",
- "O\u1e63\u00f9 \u00ccgb\u00e9",
- "O\u1e63\u00f9 \u1eb8\u0300bibi",
- "O\u1e63\u00f9 \u00d2k\u00fadu",
- "O\u1e63\u00f9 Ag\u1eb9m\u1ecd",
- "O\u1e63\u00f9 \u00d2g\u00fan",
- "O\u1e63\u00f9 Owewe",
- "O\u1e63\u00f9 \u1ecc\u0300w\u00e0r\u00e0",
- "O\u1e63\u00f9 B\u00e9l\u00fa",
- "O\u1e63\u00f9 \u1ecc\u0300p\u1eb9\u0300"
- ],
- "SHORTDAY": [
- "\u00c0\u00eck\u00fa",
- "Aj\u00e9",
- "\u00ccs\u1eb9\u0301gun",
- "\u1eccj\u1ecd\u0301r\u00fa",
- "\u1eccj\u1ecd\u0301b\u1ecd",
- "\u1eb8t\u00ec",
- "\u00c0b\u00e1m\u1eb9\u0301ta"
- ],
- "SHORTMONTH": [
- "\u1e62\u1eb9\u0301r\u1eb9\u0301",
- "\u00c8r\u00e8l\u00e8",
- "\u1eb8r\u1eb9\u0300n\u00e0",
- "\u00ccgb\u00e9",
- "\u1eb8\u0300bibi",
- "\u00d2k\u00fadu",
- "Ag\u1eb9m\u1ecd",
- "\u00d2g\u00fan",
- "Owewe",
- "\u1ecc\u0300w\u00e0r\u00e0",
- "B\u00e9l\u00fa",
- "\u1ecc\u0300p\u1eb9\u0300"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM y h:mm:ss a",
- "mediumDate": "d MMM y",
- "mediumTime": "h:mm:ss a",
- "short": "dd/MM/y h:mm a",
- "shortDate": "dd/MM/y",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u20a6",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "yo",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh-ma.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh-ma.js
deleted file mode 100644
index ec0c86b1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh-ma.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c",
- "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c"
- ],
- "DAY": [
- "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59",
- "\u2d30\u2d62\u2d4f\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59",
- "\u2d30\u2d3d\u2d55\u2d30\u2d59",
- "\u2d30\u2d3d\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59"
- ],
- "ERANAMES": [
- "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30",
- "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30"
- ],
- "ERAS": [
- "\u2d37\u2d30\u2d44",
- "\u2d37\u2d3c\u2d44"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54",
- "\u2d31\u2d55\u2d30\u2d62\u2d55",
- "\u2d4e\u2d30\u2d55\u2d5a",
- "\u2d49\u2d31\u2d54\u2d49\u2d54",
- "\u2d4e\u2d30\u2d62\u2d62\u2d53",
- "\u2d62\u2d53\u2d4f\u2d62\u2d53",
- "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63",
- "\u2d56\u2d53\u2d5b\u2d5c",
- "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d3d\u2d5c\u2d53\u2d31\u2d54",
- "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54"
- ],
- "SHORTDAY": [
- "\u2d30\u2d59\u2d30",
- "\u2d30\u2d62\u2d4f",
- "\u2d30\u2d59\u2d49",
- "\u2d30\u2d3d\u2d55",
- "\u2d30\u2d3d\u2d61",
- "\u2d30\u2d59\u2d49\u2d4e",
- "\u2d30\u2d59\u2d49\u2d39"
- ],
- "SHORTMONTH": [
- "\u2d49\u2d4f\u2d4f",
- "\u2d31\u2d55\u2d30",
- "\u2d4e\u2d30\u2d55",
- "\u2d49\u2d31\u2d54",
- "\u2d4e\u2d30\u2d62",
- "\u2d62\u2d53\u2d4f",
- "\u2d62\u2d53\u2d4d",
- "\u2d56\u2d53\u2d5b",
- "\u2d5b\u2d53\u2d5c",
- "\u2d3d\u2d5c\u2d53",
- "\u2d4f\u2d53\u2d61",
- "\u2d37\u2d53\u2d4a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "zgh-ma",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh.js
deleted file mode 100644
index c4c7a64e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zgh.js
+++ /dev/null
@@ -1,128 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u2d5c\u2d49\u2d3c\u2d30\u2d61\u2d5c",
- "\u2d5c\u2d30\u2d37\u2d33\u2d33\u2d6f\u2d30\u2d5c"
- ],
- "DAY": [
- "\u2d30\u2d59\u2d30\u2d4e\u2d30\u2d59",
- "\u2d30\u2d62\u2d4f\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4f\u2d30\u2d59",
- "\u2d30\u2d3d\u2d55\u2d30\u2d59",
- "\u2d30\u2d3d\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d4e\u2d61\u2d30\u2d59",
- "\u2d30\u2d59\u2d49\u2d39\u2d62\u2d30\u2d59"
- ],
- "ERANAMES": [
- "\u2d37\u2d30\u2d5c \u2d4f \u2d44\u2d49\u2d59\u2d30",
- "\u2d37\u2d3c\u2d3c\u2d49\u2d54 \u2d4f \u2d44\u2d49\u2d59\u2d30"
- ],
- "ERAS": [
- "\u2d37\u2d30\u2d44",
- "\u2d37\u2d3c\u2d44"
- ],
- "FIRSTDAYOFWEEK": 0,
- "MONTH": [
- "\u2d49\u2d4f\u2d4f\u2d30\u2d62\u2d54",
- "\u2d31\u2d55\u2d30\u2d62\u2d55",
- "\u2d4e\u2d30\u2d55\u2d5a",
- "\u2d49\u2d31\u2d54\u2d49\u2d54",
- "\u2d4e\u2d30\u2d62\u2d62\u2d53",
- "\u2d62\u2d53\u2d4f\u2d62\u2d53",
- "\u2d62\u2d53\u2d4d\u2d62\u2d53\u2d63",
- "\u2d56\u2d53\u2d5b\u2d5c",
- "\u2d5b\u2d53\u2d5c\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d3d\u2d5c\u2d53\u2d31\u2d54",
- "\u2d4f\u2d53\u2d61\u2d30\u2d4f\u2d31\u2d49\u2d54",
- "\u2d37\u2d53\u2d4a\u2d30\u2d4f\u2d31\u2d49\u2d54"
- ],
- "SHORTDAY": [
- "\u2d30\u2d59\u2d30",
- "\u2d30\u2d62\u2d4f",
- "\u2d30\u2d59\u2d49",
- "\u2d30\u2d3d\u2d55",
- "\u2d30\u2d3d\u2d61",
- "\u2d30\u2d59\u2d49\u2d4e",
- "\u2d30\u2d59\u2d49\u2d39"
- ],
- "SHORTMONTH": [
- "\u2d49\u2d4f\u2d4f",
- "\u2d31\u2d55\u2d30",
- "\u2d4e\u2d30\u2d55",
- "\u2d49\u2d31\u2d54",
- "\u2d4e\u2d30\u2d62",
- "\u2d62\u2d53\u2d4f",
- "\u2d62\u2d53\u2d4d",
- "\u2d56\u2d53\u2d5b",
- "\u2d5b\u2d53\u2d5c",
- "\u2d3d\u2d5c\u2d53",
- "\u2d4f\u2d53\u2d61",
- "\u2d37\u2d53\u2d4a"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE d MMMM y",
- "longDate": "d MMMM y",
- "medium": "d MMM, y HH:mm:ss",
- "mediumDate": "d MMM, y",
- "mediumTime": "HH:mm:ss",
- "short": "d/M/y HH:mm",
- "shortDate": "d/M/y",
- "shortTime": "HH:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "dh",
- "DECIMAL_SEP": ",",
- "GROUP_SEP": "\u00a0",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "\u00a4",
- "posPre": "",
- "posSuf": "\u00a4"
- }
- ]
- },
- "id": "zgh",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-cn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-cn.js
deleted file mode 100644
index d15cdd61..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-cn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "yy/M/d ah:mm",
- "shortDate": "yy/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-cn",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-cn.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-cn.js
deleted file mode 100644
index 120aa830..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-cn.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "yy/M/d ah:mm",
- "shortDate": "yy/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hans-cn",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-hk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-hk.js
deleted file mode 100644
index d47c48b1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-hk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "d/M/yy ah:mm",
- "shortDate": "d/M/yy",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hans-hk",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-mo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-mo.js
deleted file mode 100644
index 750fd374..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-mo.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "d/M/yy ah:mm",
- "shortDate": "d/M/yy",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MOP",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hans-mo",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-sg.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-sg.js
deleted file mode 100644
index 329df2df..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans-sg.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "dd/MM/yy ah:mm",
- "shortDate": "dd/MM/yy",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hans-sg",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans.js
deleted file mode 100644
index 920d39d0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hans.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "yy/M/d ah:mm",
- "shortDate": "yy/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hans",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-hk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-hk.js
deleted file mode 100644
index 23d60d7c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-hk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u9031\u65e5",
- "\u9031\u4e00",
- "\u9031\u4e8c",
- "\u9031\u4e09",
- "\u9031\u56db",
- "\u9031\u4e94",
- "\u9031\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "d/M/yy ah:mm",
- "shortDate": "d/M/yy",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hant-hk",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-mo.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-mo.js
deleted file mode 100644
index a6e4a328..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-mo.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u9031\u65e5",
- "\u9031\u4e00",
- "\u9031\u4e8c",
- "\u9031\u4e09",
- "\u9031\u56db",
- "\u9031\u4e94",
- "\u9031\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "d/M/yy ah:mm",
- "shortDate": "d/M/yy",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "MOP",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hant-mo",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-tw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-tw.js
deleted file mode 100644
index 7caaa086..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant-tw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u897f\u5143\u524d",
- "\u897f\u5143"
- ],
- "ERAS": [
- "\u897f\u5143\u524d",
- "\u897f\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u9031\u65e5",
- "\u9031\u4e00",
- "\u9031\u4e8c",
- "\u9031\u4e09",
- "\u9031\u56db",
- "\u9031\u4e94",
- "\u9031\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5 EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "y/M/d ah:mm",
- "shortDate": "y/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "NT$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hant-tw",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant.js
deleted file mode 100644
index 99b7e43d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hant.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u897f\u5143\u524d",
- "\u897f\u5143"
- ],
- "ERAS": [
- "\u897f\u5143\u524d",
- "\u897f\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u9031\u65e5",
- "\u9031\u4e00",
- "\u9031\u4e8c",
- "\u9031\u4e09",
- "\u9031\u56db",
- "\u9031\u4e94",
- "\u9031\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5 EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "y/M/d ah:mm",
- "shortDate": "y/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "NT$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hant",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hk.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hk.js
deleted file mode 100644
index 6c8fefb3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-hk.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u9031\u65e5",
- "\u9031\u4e00",
- "\u9031\u4e8c",
- "\u9031\u4e09",
- "\u9031\u56db",
- "\u9031\u4e94",
- "\u9031\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "d/M/yy ah:mm",
- "shortDate": "d/M/yy",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-hk",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-tw.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-tw.js
deleted file mode 100644
index b834a617..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh-tw.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u897f\u5143\u524d",
- "\u897f\u5143"
- ],
- "ERAS": [
- "\u897f\u5143\u524d",
- "\u897f\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "SHORTDAY": [
- "\u9031\u65e5",
- "\u9031\u4e00",
- "\u9031\u4e8c",
- "\u9031\u4e09",
- "\u9031\u56db",
- "\u9031\u4e94",
- "\u9031\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5 EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "y/M/d ah:mm",
- "shortDate": "y/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "NT$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zh-tw",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh.js
deleted file mode 100644
index 8c764a76..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zh.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "\u4e0a\u5348",
- "\u4e0b\u5348"
- ],
- "DAY": [
- "\u661f\u671f\u65e5",
- "\u661f\u671f\u4e00",
- "\u661f\u671f\u4e8c",
- "\u661f\u671f\u4e09",
- "\u661f\u671f\u56db",
- "\u661f\u671f\u4e94",
- "\u661f\u671f\u516d"
- ],
- "ERANAMES": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "ERAS": [
- "\u516c\u5143\u524d",
- "\u516c\u5143"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "\u4e00\u6708",
- "\u4e8c\u6708",
- "\u4e09\u6708",
- "\u56db\u6708",
- "\u4e94\u6708",
- "\u516d\u6708",
- "\u4e03\u6708",
- "\u516b\u6708",
- "\u4e5d\u6708",
- "\u5341\u6708",
- "\u5341\u4e00\u6708",
- "\u5341\u4e8c\u6708"
- ],
- "SHORTDAY": [
- "\u5468\u65e5",
- "\u5468\u4e00",
- "\u5468\u4e8c",
- "\u5468\u4e09",
- "\u5468\u56db",
- "\u5468\u4e94",
- "\u5468\u516d"
- ],
- "SHORTMONTH": [
- "1\u6708",
- "2\u6708",
- "3\u6708",
- "4\u6708",
- "5\u6708",
- "6\u6708",
- "7\u6708",
- "8\u6708",
- "9\u6708",
- "10\u6708",
- "11\u6708",
- "12\u6708"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "y\u5e74M\u6708d\u65e5EEEE",
- "longDate": "y\u5e74M\u6708d\u65e5",
- "medium": "y\u5e74M\u6708d\u65e5 ah:mm:ss",
- "mediumDate": "y\u5e74M\u6708d\u65e5",
- "mediumTime": "ah:mm:ss",
- "short": "yy/M/d ah:mm",
- "shortDate": "yy/M/d",
- "shortTime": "ah:mm"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "\u00a5",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4\u00a0",
- "negSuf": "",
- "posPre": "\u00a4\u00a0",
- "posSuf": ""
- }
- ]
- },
- "id": "zh",
- "pluralCat": function(n, opt_precision) { return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu-za.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu-za.js
deleted file mode 100644
index 4f48a9fd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu-za.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Ekuseni",
- "Ntambama"
- ],
- "DAY": [
- "Sonto",
- "Msombuluko",
- "Lwesibili",
- "Lwesithathu",
- "Lwesine",
- "Lwesihlanu",
- "Mgqibelo"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januwari",
- "Februwari",
- "Mashi",
- "Apreli",
- "Meyi",
- "Juni",
- "Julayi",
- "Agasti",
- "Septhemba",
- "Okthoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Son",
- "Mso",
- "Bil",
- "Tha",
- "Sin",
- "Hla",
- "Mgq"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mas",
- "Apr",
- "Mey",
- "Jun",
- "Jul",
- "Aga",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zu-za",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu.js
deleted file mode 100644
index bd4d00ec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/i18n/angular-locale_zu.js
+++ /dev/null
@@ -1,110 +0,0 @@
-'use strict';
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "Ekuseni",
- "Ntambama"
- ],
- "DAY": [
- "Sonto",
- "Msombuluko",
- "Lwesibili",
- "Lwesithathu",
- "Lwesine",
- "Lwesihlanu",
- "Mgqibelo"
- ],
- "ERANAMES": [
- "BC",
- "AD"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "Januwari",
- "Februwari",
- "Mashi",
- "Apreli",
- "Meyi",
- "Juni",
- "Julayi",
- "Agasti",
- "Septhemba",
- "Okthoba",
- "Novemba",
- "Disemba"
- ],
- "SHORTDAY": [
- "Son",
- "Mso",
- "Bil",
- "Tha",
- "Sin",
- "Hla",
- "Mgq"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mas",
- "Apr",
- "Mey",
- "Jun",
- "Jul",
- "Aga",
- "Sep",
- "Okt",
- "Nov",
- "Dis"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "R",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "zu",
- "pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || n == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.json b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.json
deleted file mode 100644
index f58f0b59..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.json
+++ /dev/null
@@ -1 +0,0 @@
-{"raw":"v1.4.8","major":1,"minor":4,"patch":8,"prerelease":[],"build":[],"version":"1.4.8","codeName":"ice-manipulation","full":"1.4.8","branch":"v1.4.x","cdn":{"raw":"v1.4.7","major":1,"minor":4,"patch":7,"prerelease":[],"build":[],"version":"1.4.7","docsUrl":"http://code.angularjs.org/1.4.7/docs"}} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.txt b/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.txt
deleted file mode 100644
index 721b9931..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-1.4.8/version.txt
+++ /dev/null
@@ -1 +0,0 @@
-1.4.8 \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/index.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/index.js
deleted file mode 100644
index a174f26d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('./ui-bootstrap-tpls');
-module.exports = 'ui.bootstrap';
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css b/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css
deleted file mode 100644
index 3b69cf64..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css
+++ /dev/null
@@ -1,115 +0,0 @@
-/* Include this file in your html if you are using the CSP mode. */
-
-.ng-animate.item:not(.left):not(.right) {
- -webkit-transition: 0s ease-in-out left;
- transition: 0s ease-in-out left
-}
-.uib-datepicker .uib-title {
- width: 100%;
-}
-
-.uib-day button, .uib-month button, .uib-year button {
- min-width: 100%;
-}
-
-.uib-left, .uib-right {
- width: 100%
-}
-
-.uib-position-measure {
- display: block !important;
- visibility: hidden !important;
- position: absolute !important;
- top: -9999px !important;
- left: -9999px !important;
-}
-
-.uib-position-scrollbar-measure {
- position: absolute !important;
- top: -9999px !important;
- width: 50px !important;
- height: 50px !important;
- overflow: scroll !important;
-}
-
-.uib-position-body-scrollbar-measure {
- overflow: scroll !important;
-}
-.uib-datepicker-popup.dropdown-menu {
- display: block;
- float: none;
- margin: 0;
-}
-
-.uib-button-bar {
- padding: 10px 9px 2px;
-}
-
-[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,
-[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,
-[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,
-[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,
-[uib-popover-popup].popover.top-left > .arrow,
-[uib-popover-popup].popover.top-right > .arrow,
-[uib-popover-popup].popover.bottom-left > .arrow,
-[uib-popover-popup].popover.bottom-right > .arrow,
-[uib-popover-popup].popover.left-top > .arrow,
-[uib-popover-popup].popover.left-bottom > .arrow,
-[uib-popover-popup].popover.right-top > .arrow,
-[uib-popover-popup].popover.right-bottom > .arrow,
-[uib-popover-html-popup].popover.top-left > .arrow,
-[uib-popover-html-popup].popover.top-right > .arrow,
-[uib-popover-html-popup].popover.bottom-left > .arrow,
-[uib-popover-html-popup].popover.bottom-right > .arrow,
-[uib-popover-html-popup].popover.left-top > .arrow,
-[uib-popover-html-popup].popover.left-bottom > .arrow,
-[uib-popover-html-popup].popover.right-top > .arrow,
-[uib-popover-html-popup].popover.right-bottom > .arrow,
-[uib-popover-template-popup].popover.top-left > .arrow,
-[uib-popover-template-popup].popover.top-right > .arrow,
-[uib-popover-template-popup].popover.bottom-left > .arrow,
-[uib-popover-template-popup].popover.bottom-right > .arrow,
-[uib-popover-template-popup].popover.left-top > .arrow,
-[uib-popover-template-popup].popover.left-bottom > .arrow,
-[uib-popover-template-popup].popover.right-top > .arrow,
-[uib-popover-template-popup].popover.right-bottom > .arrow {
- top: auto;
- bottom: auto;
- left: auto;
- right: auto;
- margin: 0;
-}
-
-[uib-popover-popup].popover,
-[uib-popover-html-popup].popover,
-[uib-popover-template-popup].popover {
- display: block !important;
-}
-
-.uib-time input {
- width: 50px;
-}
-
-[uib-typeahead-popup].dropdown-menu {
- display: block;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.js
deleted file mode 100644
index 67838936..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.js
+++ /dev/null
@@ -1,7776 +0,0 @@
-/*
- * angular-ui-bootstrap
- * http://angular-ui.github.io/bootstrap/
-
- * Version: 2.5.0 - 2017-01-28
- * License: MIT
- */angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
-angular.module("ui.bootstrap.tpls", ["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]);
-angular.module('ui.bootstrap.collapse', [])
-
- .directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) {
- var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null;
- return {
- link: function(scope, element, attrs) {
- var expandingExpr = $parse(attrs.expanding),
- expandedExpr = $parse(attrs.expanded),
- collapsingExpr = $parse(attrs.collapsing),
- collapsedExpr = $parse(attrs.collapsed),
- horizontal = false,
- css = {},
- cssTo = {};
-
- init();
-
- function init() {
- horizontal = !!('horizontal' in attrs);
- if (horizontal) {
- css = {
- width: ''
- };
- cssTo = {width: '0'};
- } else {
- css = {
- height: ''
- };
- cssTo = {height: '0'};
- }
- if (!scope.$eval(attrs.uibCollapse)) {
- element.addClass('in')
- .addClass('collapse')
- .attr('aria-expanded', true)
- .attr('aria-hidden', false)
- .css(css);
- }
- }
-
- function getScrollFromElement(element) {
- if (horizontal) {
- return {width: element.scrollWidth + 'px'};
- }
- return {height: element.scrollHeight + 'px'};
- }
-
- function expand() {
- if (element.hasClass('collapse') && element.hasClass('in')) {
- return;
- }
-
- $q.resolve(expandingExpr(scope))
- .then(function() {
- element.removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', true)
- .attr('aria-hidden', false);
-
- if ($animateCss) {
- $animateCss(element, {
- addClass: 'in',
- easing: 'ease',
- css: {
- overflow: 'hidden'
- },
- to: getScrollFromElement(element[0])
- }).start()['finally'](expandDone);
- } else {
- $animate.addClass(element, 'in', {
- css: {
- overflow: 'hidden'
- },
- to: getScrollFromElement(element[0])
- }).then(expandDone);
- }
- }, angular.noop);
- }
-
- function expandDone() {
- element.removeClass('collapsing')
- .addClass('collapse')
- .css(css);
- expandedExpr(scope);
- }
-
- function collapse() {
- if (!element.hasClass('collapse') && !element.hasClass('in')) {
- return collapseDone();
- }
-
- $q.resolve(collapsingExpr(scope))
- .then(function() {
- element
- // IMPORTANT: The width must be set before adding "collapsing" class.
- // Otherwise, the browser attempts to animate from width 0 (in
- // collapsing class) to the given width here.
- .css(getScrollFromElement(element[0]))
- // initially all panel collapse have the collapse class, this removal
- // prevents the animation from jumping to collapsed state
- .removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', false)
- .attr('aria-hidden', true);
-
- if ($animateCss) {
- $animateCss(element, {
- removeClass: 'in',
- to: cssTo
- }).start()['finally'](collapseDone);
- } else {
- $animate.removeClass(element, 'in', {
- to: cssTo
- }).then(collapseDone);
- }
- }, angular.noop);
- }
-
- function collapseDone() {
- element.css(cssTo); // Required so that collapse works when animation is disabled
- element.removeClass('collapsing')
- .addClass('collapse');
- collapsedExpr(scope);
- }
-
- scope.$watch(attrs.uibCollapse, function(shouldCollapse) {
- if (shouldCollapse) {
- collapse();
- } else {
- expand();
- }
- });
- }
- };
- }]);
-
-angular.module('ui.bootstrap.tabindex', [])
-
-.directive('uibTabindexToggle', function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attrs) {
- attrs.$observe('disabled', function(disabled) {
- attrs.$set('tabindex', disabled ? -1 : null);
- });
- }
- };
-});
-
-angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse', 'ui.bootstrap.tabindex'])
-
-.constant('uibAccordionConfig', {
- closeOthers: true
-})
-
-.controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) {
- // This array keeps track of the accordion groups
- this.groups = [];
-
- // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
- this.closeOthers = function(openGroup) {
- var closeOthers = angular.isDefined($attrs.closeOthers) ?
- $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;
- if (closeOthers) {
- angular.forEach(this.groups, function(group) {
- if (group !== openGroup) {
- group.isOpen = false;
- }
- });
- }
- };
-
- // This is called from the accordion-group directive to add itself to the accordion
- this.addGroup = function(groupScope) {
- var that = this;
- this.groups.push(groupScope);
-
- groupScope.$on('$destroy', function(event) {
- that.removeGroup(groupScope);
- });
- };
-
- // This is called from the accordion-group directive when to remove itself
- this.removeGroup = function(group) {
- var index = this.groups.indexOf(group);
- if (index !== -1) {
- this.groups.splice(index, 1);
- }
- };
-}])
-
-// The accordion directive simply sets up the directive controller
-// and adds an accordion CSS class to itself element.
-.directive('uibAccordion', function() {
- return {
- controller: 'UibAccordionController',
- controllerAs: 'accordion',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/accordion/accordion.html';
- }
- };
-})
-
-// The accordion-group directive indicates a block of html that will expand and collapse in an accordion
-.directive('uibAccordionGroup', function() {
- return {
- require: '^uibAccordion', // We need this directive to be inside an accordion
- transclude: true, // It transcludes the contents of the directive into the template
- restrict: 'A',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/accordion/accordion-group.html';
- },
- scope: {
- heading: '@', // Interpolate the heading attribute onto this scope
- panelClass: '@?', // Ditto with panelClass
- isOpen: '=?',
- isDisabled: '=?'
- },
- controller: function() {
- this.setHeading = function(element) {
- this.heading = element;
- };
- },
- link: function(scope, element, attrs, accordionCtrl) {
- element.addClass('panel');
- accordionCtrl.addGroup(scope);
-
- scope.openClass = attrs.openClass || 'panel-open';
- scope.panelClass = attrs.panelClass || 'panel-default';
- scope.$watch('isOpen', function(value) {
- element.toggleClass(scope.openClass, !!value);
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.toggleOpen = function($event) {
- if (!scope.isDisabled) {
- if (!$event || $event.which === 32) {
- scope.isOpen = !scope.isOpen;
- }
- }
- };
-
- var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
- scope.headingId = id + '-tab';
- scope.panelId = id + '-panel';
- }
- };
-})
-
-// Use accordion-heading below an accordion-group to provide a heading containing HTML
-.directive('uibAccordionHeading', function() {
- return {
- transclude: true, // Grab the contents to be used as the heading
- template: '', // In effect remove this element!
- replace: true,
- require: '^uibAccordionGroup',
- link: function(scope, element, attrs, accordionGroupCtrl, transclude) {
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- accordionGroupCtrl.setHeading(transclude(scope, angular.noop));
- }
- };
-})
-
-// Use in the accordion-group template to indicate where you want the heading to be transcluded
-// You must provide the property on the accordion-group controller that will hold the transcluded element
-.directive('uibAccordionTransclude', function() {
- return {
- require: '^uibAccordionGroup',
- link: function(scope, element, attrs, controller) {
- scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {
- if (heading) {
- var elem = angular.element(element[0].querySelector(getHeaderSelectors()));
- elem.html('');
- elem.append(heading);
- }
- });
- }
- };
-
- function getHeaderSelectors() {
- return 'uib-accordion-header,' +
- 'data-uib-accordion-header,' +
- 'x-uib-accordion-header,' +
- 'uib\\:accordion-header,' +
- '[uib-accordion-header],' +
- '[data-uib-accordion-header],' +
- '[x-uib-accordion-header]';
- }
-});
-
-angular.module('ui.bootstrap.alert', [])
-
-.controller('UibAlertController', ['$scope', '$element', '$attrs', '$interpolate', '$timeout', function($scope, $element, $attrs, $interpolate, $timeout) {
- $scope.closeable = !!$attrs.close;
- $element.addClass('alert');
- $attrs.$set('role', 'alert');
- if ($scope.closeable) {
- $element.addClass('alert-dismissible');
- }
-
- var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ?
- $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null;
-
- if (dismissOnTimeout) {
- $timeout(function() {
- $scope.close();
- }, parseInt(dismissOnTimeout, 10));
- }
-}])
-
-.directive('uibAlert', function() {
- return {
- controller: 'UibAlertController',
- controllerAs: 'alert',
- restrict: 'A',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/alert/alert.html';
- },
- transclude: true,
- scope: {
- close: '&'
- }
- };
-});
-
-angular.module('ui.bootstrap.buttons', [])
-
-.constant('uibButtonConfig', {
- activeClass: 'active',
- toggleEvent: 'click'
-})
-
-.controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) {
- this.activeClass = buttonConfig.activeClass || 'active';
- this.toggleEvent = buttonConfig.toggleEvent || 'click';
-}])
-
-.directive('uibBtnRadio', ['$parse', function($parse) {
- return {
- require: ['uibBtnRadio', 'ngModel'],
- controller: 'UibButtonsController',
- controllerAs: 'buttons',
- link: function(scope, element, attrs, ctrls) {
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
- var uncheckableExpr = $parse(attrs.uibUncheckable);
-
- element.find('input').css({display: 'none'});
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio)));
- };
-
- //ui->model
- element.on(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- var isActive = element.hasClass(buttonsCtrl.activeClass);
-
- if (!isActive || angular.isDefined(attrs.uncheckable)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio));
- ngModelCtrl.$render();
- });
- }
- });
-
- if (attrs.uibUncheckable) {
- scope.$watch(uncheckableExpr, function(uncheckable) {
- attrs.$set('uncheckable', uncheckable ? '' : undefined);
- });
- }
- }
- };
-}])
-
-.directive('uibBtnCheckbox', function() {
- return {
- require: ['uibBtnCheckbox', 'ngModel'],
- controller: 'UibButtonsController',
- controllerAs: 'button',
- link: function(scope, element, attrs, ctrls) {
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- element.find('input').css({display: 'none'});
-
- function getTrueValue() {
- return getCheckboxValue(attrs.btnCheckboxTrue, true);
- }
-
- function getFalseValue() {
- return getCheckboxValue(attrs.btnCheckboxFalse, false);
- }
-
- function getCheckboxValue(attribute, defaultValue) {
- return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue;
- }
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- };
-
- //ui->model
- element.on(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
-});
-
-angular.module('ui.bootstrap.carousel', [])
-
-.controller('UibCarouselController', ['$scope', '$element', '$interval', '$timeout', '$animate', function($scope, $element, $interval, $timeout, $animate) {
- var self = this,
- slides = self.slides = $scope.slides = [],
- SLIDE_DIRECTION = 'uib-slideDirection',
- currentIndex = $scope.active,
- currentInterval, isPlaying;
-
- var destroyed = false;
- $element.addClass('carousel');
-
- self.addSlide = function(slide, element) {
- slides.push({
- slide: slide,
- element: element
- });
- slides.sort(function(a, b) {
- return +a.slide.index - +b.slide.index;
- });
- //if this is the first slide or the slide is set to active, select it
- if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) {
- if ($scope.$currentTransition) {
- $scope.$currentTransition = null;
- }
-
- currentIndex = slide.index;
- $scope.active = slide.index;
- setActive(currentIndex);
- self.select(slides[findSlideIndex(slide)]);
- if (slides.length === 1) {
- $scope.play();
- }
- }
- };
-
- self.getCurrentIndex = function() {
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].slide.index === currentIndex) {
- return i;
- }
- }
- };
-
- self.next = $scope.next = function() {
- var newIndex = (self.getCurrentIndex() + 1) % slides.length;
-
- if (newIndex === 0 && $scope.noWrap()) {
- $scope.pause();
- return;
- }
-
- return self.select(slides[newIndex], 'next');
- };
-
- self.prev = $scope.prev = function() {
- var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1;
-
- if ($scope.noWrap() && newIndex === slides.length - 1) {
- $scope.pause();
- return;
- }
-
- return self.select(slides[newIndex], 'prev');
- };
-
- self.removeSlide = function(slide) {
- var index = findSlideIndex(slide);
-
- //get the index of the slide inside the carousel
- slides.splice(index, 1);
- if (slides.length > 0 && currentIndex === index) {
- if (index >= slides.length) {
- currentIndex = slides.length - 1;
- $scope.active = currentIndex;
- setActive(currentIndex);
- self.select(slides[slides.length - 1]);
- } else {
- currentIndex = index;
- $scope.active = currentIndex;
- setActive(currentIndex);
- self.select(slides[index]);
- }
- } else if (currentIndex > index) {
- currentIndex--;
- $scope.active = currentIndex;
- }
-
- //clean the active value when no more slide
- if (slides.length === 0) {
- currentIndex = null;
- $scope.active = null;
- }
- };
-
- /* direction: "prev" or "next" */
- self.select = $scope.select = function(nextSlide, direction) {
- var nextIndex = findSlideIndex(nextSlide.slide);
- //Decide direction if it's not given
- if (direction === undefined) {
- direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';
- }
- //Prevent this user-triggered transition from occurring if there is already one in progress
- if (nextSlide.slide.index !== currentIndex &&
- !$scope.$currentTransition) {
- goNext(nextSlide.slide, nextIndex, direction);
- }
- };
-
- /* Allow outside people to call indexOf on slides array */
- $scope.indexOfSlide = function(slide) {
- return +slide.slide.index;
- };
-
- $scope.isActive = function(slide) {
- return $scope.active === slide.slide.index;
- };
-
- $scope.isPrevDisabled = function() {
- return $scope.active === 0 && $scope.noWrap();
- };
-
- $scope.isNextDisabled = function() {
- return $scope.active === slides.length - 1 && $scope.noWrap();
- };
-
- $scope.pause = function() {
- if (!$scope.noPause) {
- isPlaying = false;
- resetTimer();
- }
- };
-
- $scope.play = function() {
- if (!isPlaying) {
- isPlaying = true;
- restartTimer();
- }
- };
-
- $element.on('mouseenter', $scope.pause);
- $element.on('mouseleave', $scope.play);
-
- $scope.$on('$destroy', function() {
- destroyed = true;
- resetTimer();
- });
-
- $scope.$watch('noTransition', function(noTransition) {
- $animate.enabled($element, !noTransition);
- });
-
- $scope.$watch('interval', restartTimer);
-
- $scope.$watchCollection('slides', resetTransition);
-
- $scope.$watch('active', function(index) {
- if (angular.isNumber(index) && currentIndex !== index) {
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].slide.index === index) {
- index = i;
- break;
- }
- }
-
- var slide = slides[index];
- if (slide) {
- setActive(index);
- self.select(slides[index]);
- currentIndex = index;
- }
- }
- });
-
- function getSlideByIndex(index) {
- for (var i = 0, l = slides.length; i < l; ++i) {
- if (slides[i].index === index) {
- return slides[i];
- }
- }
- }
-
- function setActive(index) {
- for (var i = 0; i < slides.length; i++) {
- slides[i].slide.active = i === index;
- }
- }
-
- function goNext(slide, index, direction) {
- if (destroyed) {
- return;
- }
-
- angular.extend(slide, {direction: direction});
- angular.extend(slides[currentIndex].slide || {}, {direction: direction});
- if ($animate.enabled($element) && !$scope.$currentTransition &&
- slides[index].element && self.slides.length > 1) {
- slides[index].element.data(SLIDE_DIRECTION, slide.direction);
- var currentIdx = self.getCurrentIndex();
-
- if (angular.isNumber(currentIdx) && slides[currentIdx].element) {
- slides[currentIdx].element.data(SLIDE_DIRECTION, slide.direction);
- }
-
- $scope.$currentTransition = true;
- $animate.on('addClass', slides[index].element, function(element, phase) {
- if (phase === 'close') {
- $scope.$currentTransition = null;
- $animate.off('addClass', element);
- }
- });
- }
-
- $scope.active = slide.index;
- currentIndex = slide.index;
- setActive(index);
-
- //every time you change slides, reset the timer
- restartTimer();
- }
-
- function findSlideIndex(slide) {
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].slide === slide) {
- return i;
- }
- }
- }
-
- function resetTimer() {
- if (currentInterval) {
- $interval.cancel(currentInterval);
- currentInterval = null;
- }
- }
-
- function resetTransition(slides) {
- if (!slides.length) {
- $scope.$currentTransition = null;
- }
- }
-
- function restartTimer() {
- resetTimer();
- var interval = +$scope.interval;
- if (!isNaN(interval) && interval > 0) {
- currentInterval = $interval(timerFn, interval);
- }
- }
-
- function timerFn() {
- var interval = +$scope.interval;
- if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) {
- $scope.next();
- } else {
- $scope.pause();
- }
- }
-}])
-
-.directive('uibCarousel', function() {
- return {
- transclude: true,
- controller: 'UibCarouselController',
- controllerAs: 'carousel',
- restrict: 'A',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/carousel/carousel.html';
- },
- scope: {
- active: '=',
- interval: '=',
- noTransition: '=',
- noPause: '=',
- noWrap: '&'
- }
- };
-})
-
-.directive('uibSlide', ['$animate', function($animate) {
- return {
- require: '^uibCarousel',
- restrict: 'A',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/carousel/slide.html';
- },
- scope: {
- actual: '=?',
- index: '=?'
- },
- link: function (scope, element, attrs, carouselCtrl) {
- element.addClass('item');
- carouselCtrl.addSlide(scope, element);
- //when the scope is destroyed then remove the slide from the current slides array
- scope.$on('$destroy', function() {
- carouselCtrl.removeSlide(scope);
- });
-
- scope.$watch('active', function(active) {
- $animate[active ? 'addClass' : 'removeClass'](element, 'active');
- });
- }
- };
-}])
-
-.animation('.item', ['$animateCss',
-function($animateCss) {
- var SLIDE_DIRECTION = 'uib-slideDirection';
-
- function removeClass(element, className, callback) {
- element.removeClass(className);
- if (callback) {
- callback();
- }
- }
-
- return {
- beforeAddClass: function(element, className, done) {
- if (className === 'active') {
- var stopped = false;
- var direction = element.data(SLIDE_DIRECTION);
- var directionClass = direction === 'next' ? 'left' : 'right';
- var removeClassFn = removeClass.bind(this, element,
- directionClass + ' ' + direction, done);
- element.addClass(direction);
-
- $animateCss(element, {addClass: directionClass})
- .start()
- .done(removeClassFn);
-
- return function() {
- stopped = true;
- };
- }
- done();
- },
- beforeRemoveClass: function (element, className, done) {
- if (className === 'active') {
- var stopped = false;
- var direction = element.data(SLIDE_DIRECTION);
- var directionClass = direction === 'next' ? 'left' : 'right';
- var removeClassFn = removeClass.bind(this, element, directionClass, done);
-
- $animateCss(element, {addClass: directionClass})
- .start()
- .done(removeClassFn);
-
- return function() {
- stopped = true;
- };
- }
- done();
- }
- };
-}]);
-
-angular.module('ui.bootstrap.dateparser', [])
-
-.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) {
- // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js
- var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
-
- var localeId;
- var formatCodeToRegex;
-
- this.init = function() {
- localeId = $locale.id;
-
- this.parsers = {};
- this.formatters = {};
-
- formatCodeToRegex = [
- {
- key: 'yyyy',
- regex: '\\d{4}',
- apply: function(value) { this.year = +value; },
- formatter: function(date) {
- var _date = new Date();
- _date.setFullYear(Math.abs(date.getFullYear()));
- return dateFilter(_date, 'yyyy');
- }
- },
- {
- key: 'yy',
- regex: '\\d{2}',
- apply: function(value) { value = +value; this.year = value < 69 ? value + 2000 : value + 1900; },
- formatter: function(date) {
- var _date = new Date();
- _date.setFullYear(Math.abs(date.getFullYear()));
- return dateFilter(_date, 'yy');
- }
- },
- {
- key: 'y',
- regex: '\\d{1,4}',
- apply: function(value) { this.year = +value; },
- formatter: function(date) {
- var _date = new Date();
- _date.setFullYear(Math.abs(date.getFullYear()));
- return dateFilter(_date, 'y');
- }
- },
- {
- key: 'M!',
- regex: '0?[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; },
- formatter: function(date) {
- var value = date.getMonth();
- if (/^[0-9]$/.test(value)) {
- return dateFilter(date, 'MM');
- }
-
- return dateFilter(date, 'M');
- }
- },
- {
- key: 'MMMM',
- regex: $locale.DATETIME_FORMATS.MONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); },
- formatter: function(date) { return dateFilter(date, 'MMMM'); }
- },
- {
- key: 'MMM',
- regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); },
- formatter: function(date) { return dateFilter(date, 'MMM'); }
- },
- {
- key: 'MM',
- regex: '0[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; },
- formatter: function(date) { return dateFilter(date, 'MM'); }
- },
- {
- key: 'M',
- regex: '[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; },
- formatter: function(date) { return dateFilter(date, 'M'); }
- },
- {
- key: 'd!',
- regex: '[0-2]?[0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; },
- formatter: function(date) {
- var value = date.getDate();
- if (/^[1-9]$/.test(value)) {
- return dateFilter(date, 'dd');
- }
-
- return dateFilter(date, 'd');
- }
- },
- {
- key: 'dd',
- regex: '[0-2][0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; },
- formatter: function(date) { return dateFilter(date, 'dd'); }
- },
- {
- key: 'd',
- regex: '[1-2]?[0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; },
- formatter: function(date) { return dateFilter(date, 'd'); }
- },
- {
- key: 'EEEE',
- regex: $locale.DATETIME_FORMATS.DAY.join('|'),
- formatter: function(date) { return dateFilter(date, 'EEEE'); }
- },
- {
- key: 'EEE',
- regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|'),
- formatter: function(date) { return dateFilter(date, 'EEE'); }
- },
- {
- key: 'HH',
- regex: '(?:0|1)[0-9]|2[0-3]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'HH'); }
- },
- {
- key: 'hh',
- regex: '0[0-9]|1[0-2]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'hh'); }
- },
- {
- key: 'H',
- regex: '1?[0-9]|2[0-3]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'H'); }
- },
- {
- key: 'h',
- regex: '[0-9]|1[0-2]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'h'); }
- },
- {
- key: 'mm',
- regex: '[0-5][0-9]',
- apply: function(value) { this.minutes = +value; },
- formatter: function(date) { return dateFilter(date, 'mm'); }
- },
- {
- key: 'm',
- regex: '[0-9]|[1-5][0-9]',
- apply: function(value) { this.minutes = +value; },
- formatter: function(date) { return dateFilter(date, 'm'); }
- },
- {
- key: 'sss',
- regex: '[0-9][0-9][0-9]',
- apply: function(value) { this.milliseconds = +value; },
- formatter: function(date) { return dateFilter(date, 'sss'); }
- },
- {
- key: 'ss',
- regex: '[0-5][0-9]',
- apply: function(value) { this.seconds = +value; },
- formatter: function(date) { return dateFilter(date, 'ss'); }
- },
- {
- key: 's',
- regex: '[0-9]|[1-5][0-9]',
- apply: function(value) { this.seconds = +value; },
- formatter: function(date) { return dateFilter(date, 's'); }
- },
- {
- key: 'a',
- regex: $locale.DATETIME_FORMATS.AMPMS.join('|'),
- apply: function(value) {
- if (this.hours === 12) {
- this.hours = 0;
- }
-
- if (value === 'PM') {
- this.hours += 12;
- }
- },
- formatter: function(date) { return dateFilter(date, 'a'); }
- },
- {
- key: 'Z',
- regex: '[+-]\\d{4}',
- apply: function(value) {
- var matches = value.match(/([+-])(\d{2})(\d{2})/),
- sign = matches[1],
- hours = matches[2],
- minutes = matches[3];
- this.hours += toInt(sign + hours);
- this.minutes += toInt(sign + minutes);
- },
- formatter: function(date) {
- return dateFilter(date, 'Z');
- }
- },
- {
- key: 'ww',
- regex: '[0-4][0-9]|5[0-3]',
- formatter: function(date) { return dateFilter(date, 'ww'); }
- },
- {
- key: 'w',
- regex: '[0-9]|[1-4][0-9]|5[0-3]',
- formatter: function(date) { return dateFilter(date, 'w'); }
- },
- {
- key: 'GGGG',
- regex: $locale.DATETIME_FORMATS.ERANAMES.join('|').replace(/\s/g, '\\s'),
- formatter: function(date) { return dateFilter(date, 'GGGG'); }
- },
- {
- key: 'GGG',
- regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
- formatter: function(date) { return dateFilter(date, 'GGG'); }
- },
- {
- key: 'GG',
- regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
- formatter: function(date) { return dateFilter(date, 'GG'); }
- },
- {
- key: 'G',
- regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
- formatter: function(date) { return dateFilter(date, 'G'); }
- }
- ];
-
- if (angular.version.major >= 1 && angular.version.minor > 4) {
- formatCodeToRegex.push({
- key: 'LLLL',
- regex: $locale.DATETIME_FORMATS.STANDALONEMONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.STANDALONEMONTH.indexOf(value); },
- formatter: function(date) { return dateFilter(date, 'LLLL'); }
- });
- }
- };
-
- this.init();
-
- function getFormatCodeToRegex(key) {
- return filterFilter(formatCodeToRegex, {key: key}, true)[0];
- }
-
- this.getParser = function (key) {
- var f = getFormatCodeToRegex(key);
- return f && f.apply || null;
- };
-
- this.overrideParser = function (key, parser) {
- var f = getFormatCodeToRegex(key);
- if (f && angular.isFunction(parser)) {
- this.parsers = {};
- f.apply = parser;
- }
- }.bind(this);
-
- function createParser(format) {
- var map = [], regex = format.split('');
-
- // check for literal values
- var quoteIndex = format.indexOf('\'');
- if (quoteIndex > -1) {
- var inLiteral = false;
- format = format.split('');
- for (var i = quoteIndex; i < format.length; i++) {
- if (inLiteral) {
- if (format[i] === '\'') {
- if (i + 1 < format.length && format[i+1] === '\'') { // escaped single quote
- format[i+1] = '$';
- regex[i+1] = '';
- } else { // end of literal
- regex[i] = '';
- inLiteral = false;
- }
- }
- format[i] = '$';
- } else {
- if (format[i] === '\'') { // start of literal
- format[i] = '$';
- regex[i] = '';
- inLiteral = true;
- }
- }
- }
-
- format = format.join('');
- }
-
- angular.forEach(formatCodeToRegex, function(data) {
- var index = format.indexOf(data.key);
-
- if (index > -1) {
- format = format.split('');
-
- regex[index] = '(' + data.regex + ')';
- format[index] = '$'; // Custom symbol to define consumed part of format
- for (var i = index + 1, n = index + data.key.length; i < n; i++) {
- regex[i] = '';
- format[i] = '$';
- }
- format = format.join('');
-
- map.push({
- index: index,
- key: data.key,
- apply: data.apply,
- matcher: data.regex
- });
- }
- });
-
- return {
- regex: new RegExp('^' + regex.join('') + '$'),
- map: orderByFilter(map, 'index')
- };
- }
-
- function createFormatter(format) {
- var formatters = [];
- var i = 0;
- var formatter, literalIdx;
- while (i < format.length) {
- if (angular.isNumber(literalIdx)) {
- if (format.charAt(i) === '\'') {
- if (i + 1 >= format.length || format.charAt(i + 1) !== '\'') {
- formatters.push(constructLiteralFormatter(format, literalIdx, i));
- literalIdx = null;
- }
- } else if (i === format.length) {
- while (literalIdx < format.length) {
- formatter = constructFormatterFromIdx(format, literalIdx);
- formatters.push(formatter);
- literalIdx = formatter.endIdx;
- }
- }
-
- i++;
- continue;
- }
-
- if (format.charAt(i) === '\'') {
- literalIdx = i;
- i++;
- continue;
- }
-
- formatter = constructFormatterFromIdx(format, i);
-
- formatters.push(formatter.parser);
- i = formatter.endIdx;
- }
-
- return formatters;
- }
-
- function constructLiteralFormatter(format, literalIdx, endIdx) {
- return function() {
- return format.substr(literalIdx + 1, endIdx - literalIdx - 1);
- };
- }
-
- function constructFormatterFromIdx(format, i) {
- var currentPosStr = format.substr(i);
- for (var j = 0; j < formatCodeToRegex.length; j++) {
- if (new RegExp('^' + formatCodeToRegex[j].key).test(currentPosStr)) {
- var data = formatCodeToRegex[j];
- return {
- endIdx: i + data.key.length,
- parser: data.formatter
- };
- }
- }
-
- return {
- endIdx: i + 1,
- parser: function() {
- return currentPosStr.charAt(0);
- }
- };
- }
-
- this.filter = function(date, format) {
- if (!angular.isDate(date) || isNaN(date) || !format) {
- return '';
- }
-
- format = $locale.DATETIME_FORMATS[format] || format;
-
- if ($locale.id !== localeId) {
- this.init();
- }
-
- if (!this.formatters[format]) {
- this.formatters[format] = createFormatter(format);
- }
-
- var formatters = this.formatters[format];
-
- return formatters.reduce(function(str, formatter) {
- return str + formatter(date);
- }, '');
- };
-
- this.parse = function(input, format, baseDate) {
- if (!angular.isString(input) || !format) {
- return input;
- }
-
- format = $locale.DATETIME_FORMATS[format] || format;
- format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&');
-
- if ($locale.id !== localeId) {
- this.init();
- }
-
- if (!this.parsers[format]) {
- this.parsers[format] = createParser(format, 'apply');
- }
-
- var parser = this.parsers[format],
- regex = parser.regex,
- map = parser.map,
- results = input.match(regex),
- tzOffset = false;
- if (results && results.length) {
- var fields, dt;
- if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) {
- fields = {
- year: baseDate.getFullYear(),
- month: baseDate.getMonth(),
- date: baseDate.getDate(),
- hours: baseDate.getHours(),
- minutes: baseDate.getMinutes(),
- seconds: baseDate.getSeconds(),
- milliseconds: baseDate.getMilliseconds()
- };
- } else {
- if (baseDate) {
- $log.warn('dateparser:', 'baseDate is not a valid date');
- }
- fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };
- }
-
- for (var i = 1, n = results.length; i < n; i++) {
- var mapper = map[i - 1];
- if (mapper.matcher === 'Z') {
- tzOffset = true;
- }
-
- if (mapper.apply) {
- mapper.apply.call(fields, results[i]);
- }
- }
-
- var datesetter = tzOffset ? Date.prototype.setUTCFullYear :
- Date.prototype.setFullYear;
- var timesetter = tzOffset ? Date.prototype.setUTCHours :
- Date.prototype.setHours;
-
- if (isValid(fields.year, fields.month, fields.date)) {
- if (angular.isDate(baseDate) && !isNaN(baseDate.getTime()) && !tzOffset) {
- dt = new Date(baseDate);
- datesetter.call(dt, fields.year, fields.month, fields.date);
- timesetter.call(dt, fields.hours, fields.minutes,
- fields.seconds, fields.milliseconds);
- } else {
- dt = new Date(0);
- datesetter.call(dt, fields.year, fields.month, fields.date);
- timesetter.call(dt, fields.hours || 0, fields.minutes || 0,
- fields.seconds || 0, fields.milliseconds || 0);
- }
- }
-
- return dt;
- }
- };
-
- // Check if date is valid for specific month (and year for February).
- // Month: 0 = Jan, 1 = Feb, etc
- function isValid(year, month, date) {
- if (date < 1) {
- return false;
- }
-
- if (month === 1 && date > 28) {
- return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0);
- }
-
- if (month === 3 || month === 5 || month === 8 || month === 10) {
- return date < 31;
- }
-
- return true;
- }
-
- function toInt(str) {
- return parseInt(str, 10);
- }
-
- this.toTimezone = toTimezone;
- this.fromTimezone = fromTimezone;
- this.timezoneToOffset = timezoneToOffset;
- this.addDateMinutes = addDateMinutes;
- this.convertTimezoneToLocal = convertTimezoneToLocal;
-
- function toTimezone(date, timezone) {
- return date && timezone ? convertTimezoneToLocal(date, timezone) : date;
- }
-
- function fromTimezone(date, timezone) {
- return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date;
- }
-
- //https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207
- function timezoneToOffset(timezone, fallback) {
- timezone = timezone.replace(/:/g, '');
- var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
- return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
- }
-
- function addDateMinutes(date, minutes) {
- date = new Date(date.getTime());
- date.setMinutes(date.getMinutes() + minutes);
- return date;
- }
-
- function convertTimezoneToLocal(date, timezone, reverse) {
- reverse = reverse ? -1 : 1;
- var dateTimezoneOffset = date.getTimezoneOffset();
- var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
- return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));
- }
-}]);
-
-// Avoiding use of ng-class as it creates a lot of watchers when a class is to be applied to
-// at most one element.
-angular.module('ui.bootstrap.isClass', [])
-.directive('uibIsClass', [
- '$animate',
-function ($animate) {
- // 11111111 22222222
- var ON_REGEXP = /^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/;
- // 11111111 22222222
- var IS_REGEXP = /^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;
-
- var dataPerTracked = {};
-
- return {
- restrict: 'A',
- compile: function(tElement, tAttrs) {
- var linkedScopes = [];
- var instances = [];
- var expToData = {};
- var lastActivated = null;
- var onExpMatches = tAttrs.uibIsClass.match(ON_REGEXP);
- var onExp = onExpMatches[2];
- var expsStr = onExpMatches[1];
- var exps = expsStr.split(',');
-
- return linkFn;
-
- function linkFn(scope, element, attrs) {
- linkedScopes.push(scope);
- instances.push({
- scope: scope,
- element: element
- });
-
- exps.forEach(function(exp, k) {
- addForExp(exp, scope);
- });
-
- scope.$on('$destroy', removeScope);
- }
-
- function addForExp(exp, scope) {
- var matches = exp.match(IS_REGEXP);
- var clazz = scope.$eval(matches[1]);
- var compareWithExp = matches[2];
- var data = expToData[exp];
- if (!data) {
- var watchFn = function(compareWithVal) {
- var newActivated = null;
- instances.some(function(instance) {
- var thisVal = instance.scope.$eval(onExp);
- if (thisVal === compareWithVal) {
- newActivated = instance;
- return true;
- }
- });
- if (data.lastActivated !== newActivated) {
- if (data.lastActivated) {
- $animate.removeClass(data.lastActivated.element, clazz);
- }
- if (newActivated) {
- $animate.addClass(newActivated.element, clazz);
- }
- data.lastActivated = newActivated;
- }
- };
- expToData[exp] = data = {
- lastActivated: null,
- scope: scope,
- watchFn: watchFn,
- compareWithExp: compareWithExp,
- watcher: scope.$watch(compareWithExp, watchFn)
- };
- }
- data.watchFn(scope.$eval(compareWithExp));
- }
-
- function removeScope(e) {
- var removedScope = e.targetScope;
- var index = linkedScopes.indexOf(removedScope);
- linkedScopes.splice(index, 1);
- instances.splice(index, 1);
- if (linkedScopes.length) {
- var newWatchScope = linkedScopes[0];
- angular.forEach(expToData, function(data) {
- if (data.scope === removedScope) {
- data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn);
- data.scope = newWatchScope;
- }
- });
- } else {
- expToData = {};
- }
- }
- }
- };
-}]);
-angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.isClass'])
-
-.value('$datepickerSuppressError', false)
-
-.value('$datepickerLiteralWarning', true)
-
-.constant('uibDatepickerConfig', {
- datepickerMode: 'day',
- formatDay: 'dd',
- formatMonth: 'MMMM',
- formatYear: 'yyyy',
- formatDayHeader: 'EEE',
- formatDayTitle: 'MMMM yyyy',
- formatMonthTitle: 'yyyy',
- maxDate: null,
- maxMode: 'year',
- minDate: null,
- minMode: 'day',
- monthColumns: 3,
- ngModelOptions: {},
- shortcutPropagation: false,
- showWeeks: true,
- yearColumns: 5,
- yearRows: 4
-})
-
-.controller('UibDatepickerController', ['$scope', '$element', '$attrs', '$parse', '$interpolate', '$locale', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerLiteralWarning', '$datepickerSuppressError', 'uibDateParser',
- function($scope, $element, $attrs, $parse, $interpolate, $locale, $log, dateFilter, datepickerConfig, $datepickerLiteralWarning, $datepickerSuppressError, dateParser) {
- var self = this,
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl;
- ngModelOptions = {},
- watchListeners = [];
-
- $element.addClass('uib-datepicker');
- $attrs.$set('role', 'application');
-
- if (!$scope.datepickerOptions) {
- $scope.datepickerOptions = {};
- }
-
- // Modes chain
- this.modes = ['day', 'month', 'year'];
-
- [
- 'customClass',
- 'dateDisabled',
- 'datepickerMode',
- 'formatDay',
- 'formatDayHeader',
- 'formatDayTitle',
- 'formatMonth',
- 'formatMonthTitle',
- 'formatYear',
- 'maxDate',
- 'maxMode',
- 'minDate',
- 'minMode',
- 'monthColumns',
- 'showWeeks',
- 'shortcutPropagation',
- 'startingDay',
- 'yearColumns',
- 'yearRows'
- ].forEach(function(key) {
- switch (key) {
- case 'customClass':
- case 'dateDisabled':
- $scope[key] = $scope.datepickerOptions[key] || angular.noop;
- break;
- case 'datepickerMode':
- $scope.datepickerMode = angular.isDefined($scope.datepickerOptions.datepickerMode) ?
- $scope.datepickerOptions.datepickerMode : datepickerConfig.datepickerMode;
- break;
- case 'formatDay':
- case 'formatDayHeader':
- case 'formatDayTitle':
- case 'formatMonth':
- case 'formatMonthTitle':
- case 'formatYear':
- self[key] = angular.isDefined($scope.datepickerOptions[key]) ?
- $interpolate($scope.datepickerOptions[key])($scope.$parent) :
- datepickerConfig[key];
- break;
- case 'monthColumns':
- case 'showWeeks':
- case 'shortcutPropagation':
- case 'yearColumns':
- case 'yearRows':
- self[key] = angular.isDefined($scope.datepickerOptions[key]) ?
- $scope.datepickerOptions[key] : datepickerConfig[key];
- break;
- case 'startingDay':
- if (angular.isDefined($scope.datepickerOptions.startingDay)) {
- self.startingDay = $scope.datepickerOptions.startingDay;
- } else if (angular.isNumber(datepickerConfig.startingDay)) {
- self.startingDay = datepickerConfig.startingDay;
- } else {
- self.startingDay = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7;
- }
-
- break;
- case 'maxDate':
- case 'minDate':
- $scope.$watch('datepickerOptions.' + key, function(value) {
- if (value) {
- if (angular.isDate(value)) {
- self[key] = dateParser.fromTimezone(new Date(value), ngModelOptions.getOption('timezone'));
- } else {
- if ($datepickerLiteralWarning) {
- $log.warn('Literal date support has been deprecated, please switch to date object usage');
- }
-
- self[key] = new Date(dateFilter(value, 'medium'));
- }
- } else {
- self[key] = datepickerConfig[key] ?
- dateParser.fromTimezone(new Date(datepickerConfig[key]), ngModelOptions.getOption('timezone')) :
- null;
- }
-
- self.refreshView();
- });
-
- break;
- case 'maxMode':
- case 'minMode':
- if ($scope.datepickerOptions[key]) {
- $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) {
- self[key] = $scope[key] = angular.isDefined(value) ? value : $scope.datepickerOptions[key];
- if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) ||
- key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) {
- $scope.datepickerMode = self[key];
- $scope.datepickerOptions.datepickerMode = self[key];
- }
- });
- } else {
- self[key] = $scope[key] = datepickerConfig[key] || null;
- }
-
- break;
- }
- });
-
- $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);
-
- $scope.disabled = angular.isDefined($attrs.disabled) || false;
- if (angular.isDefined($attrs.ngDisabled)) {
- watchListeners.push($scope.$parent.$watch($attrs.ngDisabled, function(disabled) {
- $scope.disabled = disabled;
- self.refreshView();
- }));
- }
-
- $scope.isActive = function(dateObject) {
- if (self.compare(dateObject.date, self.activeDate) === 0) {
- $scope.activeDateId = dateObject.uid;
- return true;
- }
- return false;
- };
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
- ngModelOptions = extractOptions(ngModelCtrl);
-
- if ($scope.datepickerOptions.initDate) {
- self.activeDate = dateParser.fromTimezone($scope.datepickerOptions.initDate, ngModelOptions.getOption('timezone')) || new Date();
- $scope.$watch('datepickerOptions.initDate', function(initDate) {
- if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) {
- self.activeDate = dateParser.fromTimezone(initDate, ngModelOptions.getOption('timezone'));
- self.refreshView();
- }
- });
- } else {
- self.activeDate = new Date();
- }
-
- var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date();
- this.activeDate = !isNaN(date) ?
- dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')) :
- dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone'));
-
- ngModelCtrl.$render = function() {
- self.render();
- };
- };
-
- this.render = function() {
- if (ngModelCtrl.$viewValue) {
- var date = new Date(ngModelCtrl.$viewValue),
- isValid = !isNaN(date);
-
- if (isValid) {
- this.activeDate = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone'));
- } else if (!$datepickerSuppressError) {
- $log.error('Datepicker directive: "ng-model" value must be a Date object');
- }
- }
- this.refreshView();
- };
-
- this.refreshView = function() {
- if (this.element) {
- $scope.selectedDt = null;
- this._refreshView();
- if ($scope.activeDt) {
- $scope.activeDateId = $scope.activeDt.uid;
- }
-
- var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- date = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone'));
- ngModelCtrl.$setValidity('dateDisabled', !date ||
- this.element && !this.isDisabled(date));
- }
- };
-
- this.createDateObject = function(date, format) {
- var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- model = dateParser.fromTimezone(model, ngModelOptions.getOption('timezone'));
- var today = new Date();
- today = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone'));
- var time = this.compare(date, today);
- var dt = {
- date: date,
- label: dateParser.filter(date, format),
- selected: model && this.compare(date, model) === 0,
- disabled: this.isDisabled(date),
- past: time < 0,
- current: time === 0,
- future: time > 0,
- customClass: this.customClass(date) || null
- };
-
- if (model && this.compare(date, model) === 0) {
- $scope.selectedDt = dt;
- }
-
- if (self.activeDate && this.compare(dt.date, self.activeDate) === 0) {
- $scope.activeDt = dt;
- }
-
- return dt;
- };
-
- this.isDisabled = function(date) {
- return $scope.disabled ||
- this.minDate && this.compare(date, this.minDate) < 0 ||
- this.maxDate && this.compare(date, this.maxDate) > 0 ||
- $scope.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode});
- };
-
- this.customClass = function(date) {
- return $scope.customClass({date: date, mode: $scope.datepickerMode});
- };
-
- // Split array into smaller arrays
- this.split = function(arr, size) {
- var arrays = [];
- while (arr.length > 0) {
- arrays.push(arr.splice(0, size));
- }
- return arrays;
- };
-
- $scope.select = function(date) {
- if ($scope.datepickerMode === self.minMode) {
- var dt = ngModelCtrl.$viewValue ? dateParser.fromTimezone(new Date(ngModelCtrl.$viewValue), ngModelOptions.getOption('timezone')) : new Date(0, 0, 0, 0, 0, 0, 0);
- dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- dt = dateParser.toTimezone(dt, ngModelOptions.getOption('timezone'));
- ngModelCtrl.$setViewValue(dt);
- ngModelCtrl.$render();
- } else {
- self.activeDate = date;
- setMode(self.modes[self.modes.indexOf($scope.datepickerMode) - 1]);
-
- $scope.$emit('uib:datepicker.mode');
- }
-
- $scope.$broadcast('uib:datepicker.focus');
- };
-
- $scope.move = function(direction) {
- var year = self.activeDate.getFullYear() + direction * (self.step.years || 0),
- month = self.activeDate.getMonth() + direction * (self.step.months || 0);
- self.activeDate.setFullYear(year, month, 1);
- self.refreshView();
- };
-
- $scope.toggleMode = function(direction) {
- direction = direction || 1;
-
- if ($scope.datepickerMode === self.maxMode && direction === 1 ||
- $scope.datepickerMode === self.minMode && direction === -1) {
- return;
- }
-
- setMode(self.modes[self.modes.indexOf($scope.datepickerMode) + direction]);
-
- $scope.$emit('uib:datepicker.mode');
- };
-
- // Key event mapper
- $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' };
-
- var focusElement = function() {
- self.element[0].focus();
- };
-
- // Listen for focus requests from popup directive
- $scope.$on('uib:datepicker.focus', focusElement);
-
- $scope.keydown = function(evt) {
- var key = $scope.keys[evt.which];
-
- if (!key || evt.shiftKey || evt.altKey || $scope.disabled) {
- return;
- }
-
- evt.preventDefault();
- if (!self.shortcutPropagation) {
- evt.stopPropagation();
- }
-
- if (key === 'enter' || key === 'space') {
- if (self.isDisabled(self.activeDate)) {
- return; // do nothing
- }
- $scope.select(self.activeDate);
- } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
- $scope.toggleMode(key === 'up' ? 1 : -1);
- } else {
- self.handleKeyDown(key, evt);
- self.refreshView();
- }
- };
-
- $element.on('keydown', function(evt) {
- $scope.$apply(function() {
- $scope.keydown(evt);
- });
- });
-
- $scope.$on('$destroy', function() {
- //Clear all watch listeners on destroy
- while (watchListeners.length) {
- watchListeners.shift()();
- }
- });
-
- function setMode(mode) {
- $scope.datepickerMode = mode;
- $scope.datepickerOptions.datepickerMode = mode;
- }
-
- function extractOptions(ngModelCtrl) {
- var ngModelOptions;
-
- if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing
- // guarantee a value
- ngModelOptions = ngModelCtrl.$options ||
- $scope.datepickerOptions.ngModelOptions ||
- datepickerConfig.ngModelOptions ||
- {};
-
- // mimic 1.6+ api
- ngModelOptions.getOption = function (key) {
- return ngModelOptions[key];
- };
- } else { // in angular >=1.6 $options is always present
- // ng-model-options defaults timezone to null; don't let its precedence squash a non-null value
- var timezone = ngModelCtrl.$options.getOption('timezone') ||
- ($scope.datepickerOptions.ngModelOptions ? $scope.datepickerOptions.ngModelOptions.timezone : null) ||
- (datepickerConfig.ngModelOptions ? datepickerConfig.ngModelOptions.timezone : null);
-
- // values passed to createChild override existing values
- ngModelOptions = ngModelCtrl.$options // start with a ModelOptions instance
- .createChild(datepickerConfig.ngModelOptions) // lowest precedence
- .createChild($scope.datepickerOptions.ngModelOptions)
- .createChild(ngModelCtrl.$options) // highest precedence
- .createChild({timezone: timezone}); // to keep from squashing a non-null value
- }
-
- return ngModelOptions;
- }
-}])
-
-.controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
- this.step = { months: 1 };
- this.element = $element;
- function getDaysInMonth(year, month) {
- return month === 1 && year % 4 === 0 &&
- (year % 100 !== 0 || year % 400 === 0) ? 29 : DAYS_IN_MONTH[month];
- }
-
- this.init = function(ctrl) {
- angular.extend(ctrl, this);
- scope.showWeeks = ctrl.showWeeks;
- ctrl.refreshView();
- };
-
- this.getDates = function(startDate, n) {
- var dates = new Array(n), current = new Date(startDate), i = 0, date;
- while (i < n) {
- date = new Date(current);
- dates[i++] = date;
- current.setDate(current.getDate() + 1);
- }
- return dates;
- };
-
- this._refreshView = function() {
- var year = this.activeDate.getFullYear(),
- month = this.activeDate.getMonth(),
- firstDayOfMonth = new Date(this.activeDate);
-
- firstDayOfMonth.setFullYear(year, month, 1);
-
- var difference = this.startingDay - firstDayOfMonth.getDay(),
- numDisplayedFromPreviousMonth = difference > 0 ?
- 7 - difference : - difference,
- firstDate = new Date(firstDayOfMonth);
-
- if (numDisplayedFromPreviousMonth > 0) {
- firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
- }
-
- // 42 is the number of days on a six-week calendar
- var days = this.getDates(firstDate, 42);
- for (var i = 0; i < 42; i ++) {
- days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), {
- secondary: days[i].getMonth() !== month,
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.labels = new Array(7);
- for (var j = 0; j < 7; j++) {
- scope.labels[j] = {
- abbr: dateFilter(days[j].date, this.formatDayHeader),
- full: dateFilter(days[j].date, 'EEEE')
- };
- }
-
- scope.title = dateFilter(this.activeDate, this.formatDayTitle);
- scope.rows = this.split(days, 7);
-
- if (scope.showWeeks) {
- scope.weekNumbers = [];
- var thursdayIndex = (4 + 7 - this.startingDay) % 7,
- numWeeks = scope.rows.length;
- for (var curWeek = 0; curWeek < numWeeks; curWeek++) {
- scope.weekNumbers.push(
- getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date));
- }
- }
- };
-
- this.compare = function(date1, date2) {
- var _date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
- var _date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
- _date1.setFullYear(date1.getFullYear());
- _date2.setFullYear(date2.getFullYear());
- return _date1 - _date2;
- };
-
- function getISO8601WeekNumber(date) {
- var checkDate = new Date(date);
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday
- var time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- }
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getDate();
-
- if (key === 'left') {
- date = date - 1;
- } else if (key === 'up') {
- date = date - 7;
- } else if (key === 'right') {
- date = date + 1;
- } else if (key === 'down') {
- date = date + 7;
- } else if (key === 'pageup' || key === 'pagedown') {
- var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1);
- this.activeDate.setMonth(month, 1);
- date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date);
- } else if (key === 'home') {
- date = 1;
- } else if (key === 'end') {
- date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth());
- }
- this.activeDate.setDate(date);
- };
-}])
-
-.controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- this.step = { years: 1 };
- this.element = $element;
-
- this.init = function(ctrl) {
- angular.extend(ctrl, this);
- ctrl.refreshView();
- };
-
- this._refreshView = function() {
- var months = new Array(12),
- year = this.activeDate.getFullYear(),
- date;
-
- for (var i = 0; i < 12; i++) {
- date = new Date(this.activeDate);
- date.setFullYear(year, i, 1);
- months[i] = angular.extend(this.createDateObject(date, this.formatMonth), {
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.title = dateFilter(this.activeDate, this.formatMonthTitle);
- scope.rows = this.split(months, this.monthColumns);
- scope.yearHeaderColspan = this.monthColumns > 3 ? this.monthColumns - 2 : 1;
- };
-
- this.compare = function(date1, date2) {
- var _date1 = new Date(date1.getFullYear(), date1.getMonth());
- var _date2 = new Date(date2.getFullYear(), date2.getMonth());
- _date1.setFullYear(date1.getFullYear());
- _date2.setFullYear(date2.getFullYear());
- return _date1 - _date2;
- };
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getMonth();
-
- if (key === 'left') {
- date = date - 1;
- } else if (key === 'up') {
- date = date - this.monthColumns;
- } else if (key === 'right') {
- date = date + 1;
- } else if (key === 'down') {
- date = date + this.monthColumns;
- } else if (key === 'pageup' || key === 'pagedown') {
- var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1);
- this.activeDate.setFullYear(year);
- } else if (key === 'home') {
- date = 0;
- } else if (key === 'end') {
- date = 11;
- }
- this.activeDate.setMonth(date);
- };
-}])
-
-.controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- var columns, range;
- this.element = $element;
-
- function getStartingYear(year) {
- return parseInt((year - 1) / range, 10) * range + 1;
- }
-
- this.yearpickerInit = function() {
- columns = this.yearColumns;
- range = this.yearRows * columns;
- this.step = { years: range };
- };
-
- this._refreshView = function() {
- var years = new Array(range), date;
-
- for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) {
- date = new Date(this.activeDate);
- date.setFullYear(start + i, 0, 1);
- years[i] = angular.extend(this.createDateObject(date, this.formatYear), {
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.title = [years[0].label, years[range - 1].label].join(' - ');
- scope.rows = this.split(years, columns);
- scope.columns = columns;
- };
-
- this.compare = function(date1, date2) {
- return date1.getFullYear() - date2.getFullYear();
- };
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getFullYear();
-
- if (key === 'left') {
- date = date - 1;
- } else if (key === 'up') {
- date = date - columns;
- } else if (key === 'right') {
- date = date + 1;
- } else if (key === 'down') {
- date = date + columns;
- } else if (key === 'pageup' || key === 'pagedown') {
- date += (key === 'pageup' ? - 1 : 1) * range;
- } else if (key === 'home') {
- date = getStartingYear(this.activeDate.getFullYear());
- } else if (key === 'end') {
- date = getStartingYear(this.activeDate.getFullYear()) + range - 1;
- }
- this.activeDate.setFullYear(date);
- };
-}])
-
-.directive('uibDatepicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/datepicker.html';
- },
- scope: {
- datepickerOptions: '=?'
- },
- require: ['uibDatepicker', '^ngModel'],
- restrict: 'A',
- controller: 'UibDatepickerController',
- controllerAs: 'datepicker',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- datepickerCtrl.init(ngModelCtrl);
- }
- };
-})
-
-.directive('uibDaypicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/day.html';
- },
- require: ['^uibDatepicker', 'uibDaypicker'],
- restrict: 'A',
- controller: 'UibDaypickerController',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0],
- daypickerCtrl = ctrls[1];
-
- daypickerCtrl.init(datepickerCtrl);
- }
- };
-})
-
-.directive('uibMonthpicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/month.html';
- },
- require: ['^uibDatepicker', 'uibMonthpicker'],
- restrict: 'A',
- controller: 'UibMonthpickerController',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0],
- monthpickerCtrl = ctrls[1];
-
- monthpickerCtrl.init(datepickerCtrl);
- }
- };
-})
-
-.directive('uibYearpicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/year.html';
- },
- require: ['^uibDatepicker', 'uibYearpicker'],
- restrict: 'A',
- controller: 'UibYearpickerController',
- link: function(scope, element, attrs, ctrls) {
- var ctrl = ctrls[0];
- angular.extend(ctrl, ctrls[1]);
- ctrl.yearpickerInit();
-
- ctrl.refreshView();
- }
- };
-});
-
-angular.module('ui.bootstrap.position', [])
-
-/**
- * A set of utility methods for working with the DOM.
- * It is meant to be used where we need to absolute-position elements in
- * relation to another element (this is the case for tooltips, popovers,
- * typeahead suggestions etc.).
- */
- .factory('$uibPosition', ['$document', '$window', function($document, $window) {
- /**
- * Used by scrollbarWidth() function to cache scrollbar's width.
- * Do not access this variable directly, use scrollbarWidth() instead.
- */
- var SCROLLBAR_WIDTH;
- /**
- * scrollbar on body and html element in IE and Edge overlay
- * content and should be considered 0 width.
- */
- var BODY_SCROLLBAR_WIDTH;
- var OVERFLOW_REGEX = {
- normal: /(auto|scroll)/,
- hidden: /(auto|scroll|hidden)/
- };
- var PLACEMENT_REGEX = {
- auto: /\s?auto?\s?/i,
- primary: /^(top|bottom|left|right)$/,
- secondary: /^(top|bottom|left|right|center)$/,
- vertical: /^(top|bottom)$/
- };
- var BODY_REGEX = /(HTML|BODY)/;
-
- return {
-
- /**
- * Provides a raw DOM element from a jQuery/jQLite element.
- *
- * @param {element} elem - The element to convert.
- *
- * @returns {element} A HTML element.
- */
- getRawNode: function(elem) {
- return elem.nodeName ? elem : elem[0] || elem;
- },
-
- /**
- * Provides a parsed number for a style property. Strips
- * units and casts invalid numbers to 0.
- *
- * @param {string} value - The style value to parse.
- *
- * @returns {number} A valid number.
- */
- parseStyle: function(value) {
- value = parseFloat(value);
- return isFinite(value) ? value : 0;
- },
-
- /**
- * Provides the closest positioned ancestor.
- *
- * @param {element} element - The element to get the offest parent for.
- *
- * @returns {element} The closest positioned ancestor.
- */
- offsetParent: function(elem) {
- elem = this.getRawNode(elem);
-
- var offsetParent = elem.offsetParent || $document[0].documentElement;
-
- function isStaticPositioned(el) {
- return ($window.getComputedStyle(el).position || 'static') === 'static';
- }
-
- while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) {
- offsetParent = offsetParent.offsetParent;
- }
-
- return offsetParent || $document[0].documentElement;
- },
-
- /**
- * Provides the scrollbar width, concept from TWBS measureScrollbar()
- * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js
- * In IE and Edge, scollbar on body and html element overlay and should
- * return a width of 0.
- *
- * @returns {number} The width of the browser scollbar.
- */
- scrollbarWidth: function(isBody) {
- if (isBody) {
- if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) {
- var bodyElem = $document.find('body');
- bodyElem.addClass('uib-position-body-scrollbar-measure');
- BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth;
- BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0;
- bodyElem.removeClass('uib-position-body-scrollbar-measure');
- }
- return BODY_SCROLLBAR_WIDTH;
- }
-
- if (angular.isUndefined(SCROLLBAR_WIDTH)) {
- var scrollElem = angular.element('<div class="uib-position-scrollbar-measure"></div>');
- $document.find('body').append(scrollElem);
- SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth;
- SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0;
- scrollElem.remove();
- }
-
- return SCROLLBAR_WIDTH;
- },
-
- /**
- * Provides the padding required on an element to replace the scrollbar.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**scrollbarWidth**: the width of the scrollbar</li>
- * <li>**widthOverflow**: whether the the width is overflowing</li>
- * <li>**right**: the amount of right padding on the element needed to replace the scrollbar</li>
- * <li>**rightOriginal**: the amount of right padding currently on the element</li>
- * <li>**heightOverflow**: whether the the height is overflowing</li>
- * <li>**bottom**: the amount of bottom padding on the element needed to replace the scrollbar</li>
- * <li>**bottomOriginal**: the amount of bottom padding currently on the element</li>
- * </ul>
- */
- scrollbarPadding: function(elem) {
- elem = this.getRawNode(elem);
-
- var elemStyle = $window.getComputedStyle(elem);
- var paddingRight = this.parseStyle(elemStyle.paddingRight);
- var paddingBottom = this.parseStyle(elemStyle.paddingBottom);
- var scrollParent = this.scrollParent(elem, false, true);
- var scrollbarWidth = this.scrollbarWidth(BODY_REGEX.test(scrollParent.tagName));
-
- return {
- scrollbarWidth: scrollbarWidth,
- widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth,
- right: paddingRight + scrollbarWidth,
- originalRight: paddingRight,
- heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight,
- bottom: paddingBottom + scrollbarWidth,
- originalBottom: paddingBottom
- };
- },
-
- /**
- * Checks to see if the element is scrollable.
- *
- * @param {element} elem - The element to check.
- * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
- * default is false.
- *
- * @returns {boolean} Whether the element is scrollable.
- */
- isScrollable: function(elem, includeHidden) {
- elem = this.getRawNode(elem);
-
- var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;
- var elemStyle = $window.getComputedStyle(elem);
- return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX);
- },
-
- /**
- * Provides the closest scrollable ancestor.
- * A port of the jQuery UI scrollParent method:
- * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
- *
- * @param {element} elem - The element to find the scroll parent of.
- * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
- * default is false.
- * @param {boolean=} [includeSelf=false] - Should the element being passed be
- * included in the scrollable llokup.
- *
- * @returns {element} A HTML element.
- */
- scrollParent: function(elem, includeHidden, includeSelf) {
- elem = this.getRawNode(elem);
-
- var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;
- var documentEl = $document[0].documentElement;
- var elemStyle = $window.getComputedStyle(elem);
- if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) {
- return elem;
- }
- var excludeStatic = elemStyle.position === 'absolute';
- var scrollParent = elem.parentElement || documentEl;
-
- if (scrollParent === documentEl || elemStyle.position === 'fixed') {
- return documentEl;
- }
-
- while (scrollParent.parentElement && scrollParent !== documentEl) {
- var spStyle = $window.getComputedStyle(scrollParent);
- if (excludeStatic && spStyle.position !== 'static') {
- excludeStatic = false;
- }
-
- if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) {
- break;
- }
- scrollParent = scrollParent.parentElement;
- }
-
- return scrollParent;
- },
-
- /**
- * Provides read-only equivalent of jQuery's position function:
- * http://api.jquery.com/position/ - distance to closest positioned
- * ancestor. Does not account for margins by default like jQuery position.
- *
- * @param {element} elem - The element to caclulate the position on.
- * @param {boolean=} [includeMargins=false] - Should margins be accounted
- * for, default is false.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**width**: the width of the element</li>
- * <li>**height**: the height of the element</li>
- * <li>**top**: distance to top edge of offset parent</li>
- * <li>**left**: distance to left edge of offset parent</li>
- * </ul>
- */
- position: function(elem, includeMagins) {
- elem = this.getRawNode(elem);
-
- var elemOffset = this.offset(elem);
- if (includeMagins) {
- var elemStyle = $window.getComputedStyle(elem);
- elemOffset.top -= this.parseStyle(elemStyle.marginTop);
- elemOffset.left -= this.parseStyle(elemStyle.marginLeft);
- }
- var parent = this.offsetParent(elem);
- var parentOffset = {top: 0, left: 0};
-
- if (parent !== $document[0].documentElement) {
- parentOffset = this.offset(parent);
- parentOffset.top += parent.clientTop - parent.scrollTop;
- parentOffset.left += parent.clientLeft - parent.scrollLeft;
- }
-
- return {
- width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth),
- height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight),
- top: Math.round(elemOffset.top - parentOffset.top),
- left: Math.round(elemOffset.left - parentOffset.left)
- };
- },
-
- /**
- * Provides read-only equivalent of jQuery's offset function:
- * http://api.jquery.com/offset/ - distance to viewport. Does
- * not account for borders, margins, or padding on the body
- * element.
- *
- * @param {element} elem - The element to calculate the offset on.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**width**: the width of the element</li>
- * <li>**height**: the height of the element</li>
- * <li>**top**: distance to top edge of viewport</li>
- * <li>**right**: distance to bottom edge of viewport</li>
- * </ul>
- */
- offset: function(elem) {
- elem = this.getRawNode(elem);
-
- var elemBCR = elem.getBoundingClientRect();
- return {
- width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth),
- height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight),
- top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)),
- left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft))
- };
- },
-
- /**
- * Provides offset distance to the closest scrollable ancestor
- * or viewport. Accounts for border and scrollbar width.
- *
- * Right and bottom dimensions represent the distance to the
- * respective edge of the viewport element. If the element
- * edge extends beyond the viewport, a negative value will be
- * reported.
- *
- * @param {element} elem - The element to get the viewport offset for.
- * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead
- * of the first scrollable element, default is false.
- * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element
- * be accounted for, default is true.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**top**: distance to the top content edge of viewport element</li>
- * <li>**bottom**: distance to the bottom content edge of viewport element</li>
- * <li>**left**: distance to the left content edge of viewport element</li>
- * <li>**right**: distance to the right content edge of viewport element</li>
- * </ul>
- */
- viewportOffset: function(elem, useDocument, includePadding) {
- elem = this.getRawNode(elem);
- includePadding = includePadding !== false ? true : false;
-
- var elemBCR = elem.getBoundingClientRect();
- var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0};
-
- var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem);
- var offsetParentBCR = offsetParent.getBoundingClientRect();
-
- offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop;
- offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft;
- if (offsetParent === $document[0].documentElement) {
- offsetBCR.top += $window.pageYOffset;
- offsetBCR.left += $window.pageXOffset;
- }
- offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight;
- offsetBCR.right = offsetBCR.left + offsetParent.clientWidth;
-
- if (includePadding) {
- var offsetParentStyle = $window.getComputedStyle(offsetParent);
- offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop);
- offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom);
- offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft);
- offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight);
- }
-
- return {
- top: Math.round(elemBCR.top - offsetBCR.top),
- bottom: Math.round(offsetBCR.bottom - elemBCR.bottom),
- left: Math.round(elemBCR.left - offsetBCR.left),
- right: Math.round(offsetBCR.right - elemBCR.right)
- };
- },
-
- /**
- * Provides an array of placement values parsed from a placement string.
- * Along with the 'auto' indicator, supported placement strings are:
- * <ul>
- * <li>top: element on top, horizontally centered on host element.</li>
- * <li>top-left: element on top, left edge aligned with host element left edge.</li>
- * <li>top-right: element on top, lerightft edge aligned with host element right edge.</li>
- * <li>bottom: element on bottom, horizontally centered on host element.</li>
- * <li>bottom-left: element on bottom, left edge aligned with host element left edge.</li>
- * <li>bottom-right: element on bottom, right edge aligned with host element right edge.</li>
- * <li>left: element on left, vertically centered on host element.</li>
- * <li>left-top: element on left, top edge aligned with host element top edge.</li>
- * <li>left-bottom: element on left, bottom edge aligned with host element bottom edge.</li>
- * <li>right: element on right, vertically centered on host element.</li>
- * <li>right-top: element on right, top edge aligned with host element top edge.</li>
- * <li>right-bottom: element on right, bottom edge aligned with host element bottom edge.</li>
- * </ul>
- * A placement string with an 'auto' indicator is expected to be
- * space separated from the placement, i.e: 'auto bottom-left' If
- * the primary and secondary placement values do not match 'top,
- * bottom, left, right' then 'top' will be the primary placement and
- * 'center' will be the secondary placement. If 'auto' is passed, true
- * will be returned as the 3rd value of the array.
- *
- * @param {string} placement - The placement string to parse.
- *
- * @returns {array} An array with the following values
- * <ul>
- * <li>**[0]**: The primary placement.</li>
- * <li>**[1]**: The secondary placement.</li>
- * <li>**[2]**: If auto is passed: true, else undefined.</li>
- * </ul>
- */
- parsePlacement: function(placement) {
- var autoPlace = PLACEMENT_REGEX.auto.test(placement);
- if (autoPlace) {
- placement = placement.replace(PLACEMENT_REGEX.auto, '');
- }
-
- placement = placement.split('-');
-
- placement[0] = placement[0] || 'top';
- if (!PLACEMENT_REGEX.primary.test(placement[0])) {
- placement[0] = 'top';
- }
-
- placement[1] = placement[1] || 'center';
- if (!PLACEMENT_REGEX.secondary.test(placement[1])) {
- placement[1] = 'center';
- }
-
- if (autoPlace) {
- placement[2] = true;
- } else {
- placement[2] = false;
- }
-
- return placement;
- },
-
- /**
- * Provides coordinates for an element to be positioned relative to
- * another element. Passing 'auto' as part of the placement parameter
- * will enable smart placement - where the element fits. i.e:
- * 'auto left-top' will check to see if there is enough space to the left
- * of the hostElem to fit the targetElem, if not place right (same for secondary
- * top placement). Available space is calculated using the viewportOffset
- * function.
- *
- * @param {element} hostElem - The element to position against.
- * @param {element} targetElem - The element to position.
- * @param {string=} [placement=top] - The placement for the targetElem,
- * default is 'top'. 'center' is assumed as secondary placement for
- * 'top', 'left', 'right', and 'bottom' placements. Available placements are:
- * <ul>
- * <li>top</li>
- * <li>top-right</li>
- * <li>top-left</li>
- * <li>bottom</li>
- * <li>bottom-left</li>
- * <li>bottom-right</li>
- * <li>left</li>
- * <li>left-top</li>
- * <li>left-bottom</li>
- * <li>right</li>
- * <li>right-top</li>
- * <li>right-bottom</li>
- * </ul>
- * @param {boolean=} [appendToBody=false] - Should the top and left values returned
- * be calculated from the body element, default is false.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**top**: Value for targetElem top.</li>
- * <li>**left**: Value for targetElem left.</li>
- * <li>**placement**: The resolved placement.</li>
- * </ul>
- */
- positionElements: function(hostElem, targetElem, placement, appendToBody) {
- hostElem = this.getRawNode(hostElem);
- targetElem = this.getRawNode(targetElem);
-
- // need to read from prop to support tests.
- var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth');
- var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight');
-
- placement = this.parsePlacement(placement);
-
- var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem);
- var targetElemPos = {top: 0, left: 0, placement: ''};
-
- if (placement[2]) {
- var viewportOffset = this.viewportOffset(hostElem, appendToBody);
-
- var targetElemStyle = $window.getComputedStyle(targetElem);
- var adjustedSize = {
- width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))),
- height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom)))
- };
-
- placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' :
- placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' :
- placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' :
- placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' :
- placement[0];
-
- placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' :
- placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' :
- placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' :
- placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' :
- placement[1];
-
- if (placement[1] === 'center') {
- if (PLACEMENT_REGEX.vertical.test(placement[0])) {
- var xOverflow = hostElemPos.width / 2 - targetWidth / 2;
- if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) {
- placement[1] = 'left';
- } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) {
- placement[1] = 'right';
- }
- } else {
- var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2;
- if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) {
- placement[1] = 'top';
- } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) {
- placement[1] = 'bottom';
- }
- }
- }
- }
-
- switch (placement[0]) {
- case 'top':
- targetElemPos.top = hostElemPos.top - targetHeight;
- break;
- case 'bottom':
- targetElemPos.top = hostElemPos.top + hostElemPos.height;
- break;
- case 'left':
- targetElemPos.left = hostElemPos.left - targetWidth;
- break;
- case 'right':
- targetElemPos.left = hostElemPos.left + hostElemPos.width;
- break;
- }
-
- switch (placement[1]) {
- case 'top':
- targetElemPos.top = hostElemPos.top;
- break;
- case 'bottom':
- targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight;
- break;
- case 'left':
- targetElemPos.left = hostElemPos.left;
- break;
- case 'right':
- targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth;
- break;
- case 'center':
- if (PLACEMENT_REGEX.vertical.test(placement[0])) {
- targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2;
- } else {
- targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2;
- }
- break;
- }
-
- targetElemPos.top = Math.round(targetElemPos.top);
- targetElemPos.left = Math.round(targetElemPos.left);
- targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1];
-
- return targetElemPos;
- },
-
- /**
- * Provides a way to adjust the top positioning after first
- * render to correctly align element to top after content
- * rendering causes resized element height
- *
- * @param {array} placementClasses - The array of strings of classes
- * element should have.
- * @param {object} containerPosition - The object with container
- * position information
- * @param {number} initialHeight - The initial height for the elem.
- * @param {number} currentHeight - The current height for the elem.
- */
- adjustTop: function(placementClasses, containerPosition, initialHeight, currentHeight) {
- if (placementClasses.indexOf('top') !== -1 && initialHeight !== currentHeight) {
- return {
- top: containerPosition.top - currentHeight + 'px'
- };
- }
- },
-
- /**
- * Provides a way for positioning tooltip & dropdown
- * arrows when using placement options beyond the standard
- * left, right, top, or bottom.
- *
- * @param {element} elem - The tooltip/dropdown element.
- * @param {string} placement - The placement for the elem.
- */
- positionArrow: function(elem, placement) {
- elem = this.getRawNode(elem);
-
- var innerElem = elem.querySelector('.tooltip-inner, .popover-inner');
- if (!innerElem) {
- return;
- }
-
- var isTooltip = angular.element(innerElem).hasClass('tooltip-inner');
-
- var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow');
- if (!arrowElem) {
- return;
- }
-
- var arrowCss = {
- top: '',
- bottom: '',
- left: '',
- right: ''
- };
-
- placement = this.parsePlacement(placement);
- if (placement[1] === 'center') {
- // no adjustment necessary - just reset styles
- angular.element(arrowElem).css(arrowCss);
- return;
- }
-
- var borderProp = 'border-' + placement[0] + '-width';
- var borderWidth = $window.getComputedStyle(arrowElem)[borderProp];
-
- var borderRadiusProp = 'border-';
- if (PLACEMENT_REGEX.vertical.test(placement[0])) {
- borderRadiusProp += placement[0] + '-' + placement[1];
- } else {
- borderRadiusProp += placement[1] + '-' + placement[0];
- }
- borderRadiusProp += '-radius';
- var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp];
-
- switch (placement[0]) {
- case 'top':
- arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth;
- break;
- case 'bottom':
- arrowCss.top = isTooltip ? '0' : '-' + borderWidth;
- break;
- case 'left':
- arrowCss.right = isTooltip ? '0' : '-' + borderWidth;
- break;
- case 'right':
- arrowCss.left = isTooltip ? '0' : '-' + borderWidth;
- break;
- }
-
- arrowCss[placement[1]] = borderRadius;
-
- angular.element(arrowElem).css(arrowCss);
- }
- };
- }]);
-
-angular.module('ui.bootstrap.datepickerPopup', ['ui.bootstrap.datepicker', 'ui.bootstrap.position'])
-
-.value('$datepickerPopupLiteralWarning', true)
-
-.constant('uibDatepickerPopupConfig', {
- altInputFormats: [],
- appendToBody: false,
- clearText: 'Clear',
- closeOnDateSelection: true,
- closeText: 'Done',
- currentText: 'Today',
- datepickerPopup: 'yyyy-MM-dd',
- datepickerPopupTemplateUrl: 'uib/template/datepickerPopup/popup.html',
- datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html',
- html5Types: {
- date: 'yyyy-MM-dd',
- 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
- 'month': 'yyyy-MM'
- },
- onOpenFocus: true,
- showButtonBar: true,
- placement: 'auto bottom-left'
-})
-
-.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$log', '$parse', '$window', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig', '$datepickerPopupLiteralWarning',
-function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout, datepickerConfig, $datepickerPopupLiteralWarning) {
- var cache = {},
- isHtml5DateInput = false;
- var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus,
- datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl, scrollParentEl,
- ngModel, ngModelOptions, $popup, altInputFormats, watchListeners = [];
-
- this.init = function(_ngModel_) {
- ngModel = _ngModel_;
- ngModelOptions = extractOptions(ngModel);
- closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ?
- $scope.$parent.$eval($attrs.closeOnDateSelection) :
- datepickerPopupConfig.closeOnDateSelection;
- appendToBody = angular.isDefined($attrs.datepickerAppendToBody) ?
- $scope.$parent.$eval($attrs.datepickerAppendToBody) :
- datepickerPopupConfig.appendToBody;
- onOpenFocus = angular.isDefined($attrs.onOpenFocus) ?
- $scope.$parent.$eval($attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus;
- datepickerPopupTemplateUrl = angular.isDefined($attrs.datepickerPopupTemplateUrl) ?
- $attrs.datepickerPopupTemplateUrl :
- datepickerPopupConfig.datepickerPopupTemplateUrl;
- datepickerTemplateUrl = angular.isDefined($attrs.datepickerTemplateUrl) ?
- $attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl;
- altInputFormats = angular.isDefined($attrs.altInputFormats) ?
- $scope.$parent.$eval($attrs.altInputFormats) :
- datepickerPopupConfig.altInputFormats;
-
- $scope.showButtonBar = angular.isDefined($attrs.showButtonBar) ?
- $scope.$parent.$eval($attrs.showButtonBar) :
- datepickerPopupConfig.showButtonBar;
-
- if (datepickerPopupConfig.html5Types[$attrs.type]) {
- dateFormat = datepickerPopupConfig.html5Types[$attrs.type];
- isHtml5DateInput = true;
- } else {
- dateFormat = $attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup;
- $attrs.$observe('uibDatepickerPopup', function(value, oldValue) {
- var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
- // Invalidate the $modelValue to ensure that formatters re-run
- // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
- if (newDateFormat !== dateFormat) {
- dateFormat = newDateFormat;
- ngModel.$modelValue = null;
-
- if (!dateFormat) {
- throw new Error('uibDatepickerPopup must have a date format specified.');
- }
- }
- });
- }
-
- if (!dateFormat) {
- throw new Error('uibDatepickerPopup must have a date format specified.');
- }
-
- if (isHtml5DateInput && $attrs.uibDatepickerPopup) {
- throw new Error('HTML5 date input types do not support custom formats.');
- }
-
- // popup element used to display calendar
- popupEl = angular.element('<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>');
-
- popupEl.attr({
- 'ng-model': 'date',
- 'ng-change': 'dateSelection(date)',
- 'template-url': datepickerPopupTemplateUrl
- });
-
- // datepicker element
- datepickerEl = angular.element(popupEl.children()[0]);
- datepickerEl.attr('template-url', datepickerTemplateUrl);
-
- if (!$scope.datepickerOptions) {
- $scope.datepickerOptions = {};
- }
-
- if (isHtml5DateInput) {
- if ($attrs.type === 'month') {
- $scope.datepickerOptions.datepickerMode = 'month';
- $scope.datepickerOptions.minMode = 'month';
- }
- }
-
- datepickerEl.attr('datepicker-options', 'datepickerOptions');
-
- if (!isHtml5DateInput) {
- // Internal API to maintain the correct ng-invalid-[key] class
- ngModel.$$parserName = 'date';
- ngModel.$validators.date = validator;
- ngModel.$parsers.unshift(parseDate);
- ngModel.$formatters.push(function(value) {
- if (ngModel.$isEmpty(value)) {
- $scope.date = value;
- return value;
- }
-
- if (angular.isNumber(value)) {
- value = new Date(value);
- }
-
- $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone'));
-
- return dateParser.filter($scope.date, dateFormat);
- });
- } else {
- ngModel.$formatters.push(function(value) {
- $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone'));
- return value;
- });
- }
-
- // Detect changes in the view from the text box
- ngModel.$viewChangeListeners.push(function() {
- $scope.date = parseDateString(ngModel.$viewValue);
- });
-
- $element.on('keydown', inputKeydownBind);
-
- $popup = $compile(popupEl)($scope);
- // Prevent jQuery cache memory leak (template is now redundant after linking)
- popupEl.remove();
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else {
- $element.after($popup);
- }
-
- $scope.$on('$destroy', function() {
- if ($scope.isOpen === true) {
- if (!$rootScope.$$phase) {
- $scope.$apply(function() {
- $scope.isOpen = false;
- });
- }
- }
-
- $popup.remove();
- $element.off('keydown', inputKeydownBind);
- $document.off('click', documentClickBind);
- if (scrollParentEl) {
- scrollParentEl.off('scroll', positionPopup);
- }
- angular.element($window).off('resize', positionPopup);
-
- //Clear all watch listeners on destroy
- while (watchListeners.length) {
- watchListeners.shift()();
- }
- });
- };
-
- $scope.getText = function(key) {
- return $scope[key + 'Text'] || datepickerPopupConfig[key + 'Text'];
- };
-
- $scope.isDisabled = function(date) {
- if (date === 'today') {
- date = dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone'));
- }
-
- var dates = {};
- angular.forEach(['minDate', 'maxDate'], function(key) {
- if (!$scope.datepickerOptions[key]) {
- dates[key] = null;
- } else if (angular.isDate($scope.datepickerOptions[key])) {
- dates[key] = new Date($scope.datepickerOptions[key]);
- } else {
- if ($datepickerPopupLiteralWarning) {
- $log.warn('Literal date support has been deprecated, please switch to date object usage');
- }
-
- dates[key] = new Date(dateFilter($scope.datepickerOptions[key], 'medium'));
- }
- });
-
- return $scope.datepickerOptions &&
- dates.minDate && $scope.compare(date, dates.minDate) < 0 ||
- dates.maxDate && $scope.compare(date, dates.maxDate) > 0;
- };
-
- $scope.compare = function(date1, date2) {
- return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
- };
-
- // Inner change
- $scope.dateSelection = function(dt) {
- $scope.date = dt;
- var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function
- $element.val(date);
- ngModel.$setViewValue(date);
-
- if (closeOnDateSelection) {
- $scope.isOpen = false;
- $element[0].focus();
- }
- };
-
- $scope.keydown = function(evt) {
- if (evt.which === 27) {
- evt.stopPropagation();
- $scope.isOpen = false;
- $element[0].focus();
- }
- };
-
- $scope.select = function(date, evt) {
- evt.stopPropagation();
-
- if (date === 'today') {
- var today = new Date();
- if (angular.isDate($scope.date)) {
- date = new Date($scope.date);
- date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());
- } else {
- date = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone'));
- date.setHours(0, 0, 0, 0);
- }
- }
- $scope.dateSelection(date);
- };
-
- $scope.close = function(evt) {
- evt.stopPropagation();
-
- $scope.isOpen = false;
- $element[0].focus();
- };
-
- $scope.disabled = angular.isDefined($attrs.disabled) || false;
- if ($attrs.ngDisabled) {
- watchListeners.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(disabled) {
- $scope.disabled = disabled;
- }));
- }
-
- $scope.$watch('isOpen', function(value) {
- if (value) {
- if (!$scope.disabled) {
- $timeout(function() {
- positionPopup();
-
- if (onOpenFocus) {
- $scope.$broadcast('uib:datepicker.focus');
- }
-
- $document.on('click', documentClickBind);
-
- var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;
- if (appendToBody || $position.parsePlacement(placement)[2]) {
- scrollParentEl = scrollParentEl || angular.element($position.scrollParent($element));
- if (scrollParentEl) {
- scrollParentEl.on('scroll', positionPopup);
- }
- } else {
- scrollParentEl = null;
- }
-
- angular.element($window).on('resize', positionPopup);
- }, 0, false);
- } else {
- $scope.isOpen = false;
- }
- } else {
- $document.off('click', documentClickBind);
- if (scrollParentEl) {
- scrollParentEl.off('scroll', positionPopup);
- }
- angular.element($window).off('resize', positionPopup);
- }
- });
-
- function cameltoDash(string) {
- return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); });
- }
-
- function parseDateString(viewValue) {
- var date = dateParser.parse(viewValue, dateFormat, $scope.date);
- if (isNaN(date)) {
- for (var i = 0; i < altInputFormats.length; i++) {
- date = dateParser.parse(viewValue, altInputFormats[i], $scope.date);
- if (!isNaN(date)) {
- return date;
- }
- }
- }
- return date;
- }
-
- function parseDate(viewValue) {
- if (angular.isNumber(viewValue)) {
- // presumably timestamp to date object
- viewValue = new Date(viewValue);
- }
-
- if (!viewValue) {
- return null;
- }
-
- if (angular.isDate(viewValue) && !isNaN(viewValue)) {
- return viewValue;
- }
-
- if (angular.isString(viewValue)) {
- var date = parseDateString(viewValue);
- if (!isNaN(date)) {
- return dateParser.toTimezone(date, ngModelOptions.getOption('timezone'));
- }
- }
-
- return ngModelOptions.getOption('allowInvalid') ? viewValue : undefined;
- }
-
- function validator(modelValue, viewValue) {
- var value = modelValue || viewValue;
-
- if (!$attrs.ngRequired && !value) {
- return true;
- }
-
- if (angular.isNumber(value)) {
- value = new Date(value);
- }
-
- if (!value) {
- return true;
- }
-
- if (angular.isDate(value) && !isNaN(value)) {
- return true;
- }
-
- if (angular.isString(value)) {
- return !isNaN(parseDateString(value));
- }
-
- return false;
- }
-
- function documentClickBind(event) {
- if (!$scope.isOpen && $scope.disabled) {
- return;
- }
-
- var popup = $popup[0];
- var dpContainsTarget = $element[0].contains(event.target);
- // The popup node may not be an element node
- // In some browsers (IE) only element nodes have the 'contains' function
- var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target);
- if ($scope.isOpen && !(dpContainsTarget || popupContainsTarget)) {
- $scope.$apply(function() {
- $scope.isOpen = false;
- });
- }
- }
-
- function inputKeydownBind(evt) {
- if (evt.which === 27 && $scope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.$apply(function() {
- $scope.isOpen = false;
- });
- $element[0].focus();
- } else if (evt.which === 40 && !$scope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.$apply(function() {
- $scope.isOpen = true;
- });
- }
- }
-
- function positionPopup() {
- if ($scope.isOpen) {
- var dpElement = angular.element($popup[0].querySelector('.uib-datepicker-popup'));
- var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;
- var position = $position.positionElements($element, dpElement, placement, appendToBody);
- dpElement.css({top: position.top + 'px', left: position.left + 'px'});
- if (dpElement.hasClass('uib-position-measure')) {
- dpElement.removeClass('uib-position-measure');
- }
- }
- }
-
- function extractOptions(ngModelCtrl) {
- var ngModelOptions;
-
- if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing
- // guarantee a value
- ngModelOptions = angular.isObject(ngModelCtrl.$options) ?
- ngModelCtrl.$options :
- {
- timezone: null
- };
-
- // mimic 1.6+ api
- ngModelOptions.getOption = function (key) {
- return ngModelOptions[key];
- };
- } else { // in angular >=1.6 $options is always present
- ngModelOptions = ngModelCtrl.$options;
- }
-
- return ngModelOptions;
- }
-
- $scope.$on('uib:datepicker.mode', function() {
- $timeout(positionPopup, 0, false);
- });
-}])
-
-.directive('uibDatepickerPopup', function() {
- return {
- require: ['ngModel', 'uibDatepickerPopup'],
- controller: 'UibDatepickerPopupController',
- scope: {
- datepickerOptions: '=?',
- isOpen: '=?',
- currentText: '@',
- clearText: '@',
- closeText: '@'
- },
- link: function(scope, element, attrs, ctrls) {
- var ngModel = ctrls[0],
- ctrl = ctrls[1];
-
- ctrl.init(ngModel);
- }
- };
-})
-
-.directive('uibDatepickerPopupWrap', function() {
- return {
- restrict: 'A',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html';
- }
- };
-});
-
-angular.module('ui.bootstrap.debounce', [])
-/**
- * A helper, internal service that debounces a function
- */
- .factory('$$debounce', ['$timeout', function($timeout) {
- return function(callback, debounceTime) {
- var timeoutPromise;
-
- return function() {
- var self = this;
- var args = Array.prototype.slice.call(arguments);
- if (timeoutPromise) {
- $timeout.cancel(timeoutPromise);
- }
-
- timeoutPromise = $timeout(function() {
- callback.apply(self, args);
- }, debounceTime);
- };
- };
- }]);
-
-angular.module('ui.bootstrap.multiMap', [])
-/**
- * A helper, internal data structure that stores all references attached to key
- */
- .factory('$$multiMap', function() {
- return {
- createNew: function() {
- var map = {};
-
- return {
- entries: function() {
- return Object.keys(map).map(function(key) {
- return {
- key: key,
- value: map[key]
- };
- });
- },
- get: function(key) {
- return map[key];
- },
- hasKey: function(key) {
- return !!map[key];
- },
- keys: function() {
- return Object.keys(map);
- },
- put: function(key, value) {
- if (!map[key]) {
- map[key] = [];
- }
-
- map[key].push(value);
- },
- remove: function(key, value) {
- var values = map[key];
-
- if (!values) {
- return;
- }
-
- var idx = values.indexOf(value);
-
- if (idx !== -1) {
- values.splice(idx, 1);
- }
-
- if (!values.length) {
- delete map[key];
- }
- }
- };
- }
- };
- });
-
-angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.position'])
-
-.constant('uibDropdownConfig', {
- appendToOpenClass: 'uib-dropdown-open',
- openClass: 'open'
-})
-
-.service('uibDropdownService', ['$document', '$rootScope', '$$multiMap', function($document, $rootScope, $$multiMap) {
- var openScope = null;
- var openedContainers = $$multiMap.createNew();
-
- this.isOnlyOpen = function(dropdownScope, appendTo) {
- var openedDropdowns = openedContainers.get(appendTo);
- if (openedDropdowns) {
- var openDropdown = openedDropdowns.reduce(function(toClose, dropdown) {
- if (dropdown.scope === dropdownScope) {
- return dropdown;
- }
-
- return toClose;
- }, {});
- if (openDropdown) {
- return openedDropdowns.length === 1;
- }
- }
-
- return false;
- };
-
- this.open = function(dropdownScope, element, appendTo) {
- if (!openScope) {
- $document.on('click', closeDropdown);
- }
-
- if (openScope && openScope !== dropdownScope) {
- openScope.isOpen = false;
- }
-
- openScope = dropdownScope;
-
- if (!appendTo) {
- return;
- }
-
- var openedDropdowns = openedContainers.get(appendTo);
- if (openedDropdowns) {
- var openedScopes = openedDropdowns.map(function(dropdown) {
- return dropdown.scope;
- });
- if (openedScopes.indexOf(dropdownScope) === -1) {
- openedContainers.put(appendTo, {
- scope: dropdownScope
- });
- }
- } else {
- openedContainers.put(appendTo, {
- scope: dropdownScope
- });
- }
- };
-
- this.close = function(dropdownScope, element, appendTo) {
- if (openScope === dropdownScope) {
- $document.off('click', closeDropdown);
- $document.off('keydown', this.keybindFilter);
- openScope = null;
- }
-
- if (!appendTo) {
- return;
- }
-
- var openedDropdowns = openedContainers.get(appendTo);
- if (openedDropdowns) {
- var dropdownToClose = openedDropdowns.reduce(function(toClose, dropdown) {
- if (dropdown.scope === dropdownScope) {
- return dropdown;
- }
-
- return toClose;
- }, {});
- if (dropdownToClose) {
- openedContainers.remove(appendTo, dropdownToClose);
- }
- }
- };
-
- var closeDropdown = function(evt) {
- // This method may still be called during the same mouse event that
- // unbound this event handler. So check openScope before proceeding.
- if (!openScope || !openScope.isOpen) { return; }
-
- if (evt && openScope.getAutoClose() === 'disabled') { return; }
-
- if (evt && evt.which === 3) { return; }
-
- var toggleElement = openScope.getToggleElement();
- if (evt && toggleElement && toggleElement[0].contains(evt.target)) {
- return;
- }
-
- var dropdownElement = openScope.getDropdownElement();
- if (evt && openScope.getAutoClose() === 'outsideClick' &&
- dropdownElement && dropdownElement[0].contains(evt.target)) {
- return;
- }
-
- openScope.focusToggleElement();
- openScope.isOpen = false;
-
- if (!$rootScope.$$phase) {
- openScope.$apply();
- }
- };
-
- this.keybindFilter = function(evt) {
- if (!openScope) {
- // see this.close as ESC could have been pressed which kills the scope so we can not proceed
- return;
- }
-
- var dropdownElement = openScope.getDropdownElement();
- var toggleElement = openScope.getToggleElement();
- var dropdownElementTargeted = dropdownElement && dropdownElement[0].contains(evt.target);
- var toggleElementTargeted = toggleElement && toggleElement[0].contains(evt.target);
- if (evt.which === 27) {
- evt.stopPropagation();
- openScope.focusToggleElement();
- closeDropdown();
- } else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen && (dropdownElementTargeted || toggleElementTargeted)) {
- evt.preventDefault();
- evt.stopPropagation();
- openScope.focusDropdownEntry(evt.which);
- }
- };
-}])
-
-.controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) {
- var self = this,
- scope = $scope.$new(), // create a child scope so we are not polluting original one
- templateScope,
- appendToOpenClass = dropdownConfig.appendToOpenClass,
- openClass = dropdownConfig.openClass,
- getIsOpen,
- setIsOpen = angular.noop,
- toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,
- keynavEnabled = false,
- selectedOption = null,
- body = $document.find('body');
-
- $element.addClass('dropdown');
-
- this.init = function() {
- if ($attrs.isOpen) {
- getIsOpen = $parse($attrs.isOpen);
- setIsOpen = getIsOpen.assign;
-
- $scope.$watch(getIsOpen, function(value) {
- scope.isOpen = !!value;
- });
- }
-
- keynavEnabled = angular.isDefined($attrs.keyboardNav);
- };
-
- this.toggle = function(open) {
- scope.isOpen = arguments.length ? !!open : !scope.isOpen;
- if (angular.isFunction(setIsOpen)) {
- setIsOpen(scope, scope.isOpen);
- }
-
- return scope.isOpen;
- };
-
- // Allow other directives to watch status
- this.isOpen = function() {
- return scope.isOpen;
- };
-
- scope.getToggleElement = function() {
- return self.toggleElement;
- };
-
- scope.getAutoClose = function() {
- return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'
- };
-
- scope.getElement = function() {
- return $element;
- };
-
- scope.isKeynavEnabled = function() {
- return keynavEnabled;
- };
-
- scope.focusDropdownEntry = function(keyCode) {
- var elems = self.dropdownMenu ? //If append to body is used.
- angular.element(self.dropdownMenu).find('a') :
- $element.find('ul').eq(0).find('a');
-
- switch (keyCode) {
- case 40: {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = 0;
- } else {
- self.selectedOption = self.selectedOption === elems.length - 1 ?
- self.selectedOption :
- self.selectedOption + 1;
- }
- break;
- }
- case 38: {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = elems.length - 1;
- } else {
- self.selectedOption = self.selectedOption === 0 ?
- 0 : self.selectedOption - 1;
- }
- break;
- }
- }
- elems[self.selectedOption].focus();
- };
-
- scope.getDropdownElement = function() {
- return self.dropdownMenu;
- };
-
- scope.focusToggleElement = function() {
- if (self.toggleElement) {
- self.toggleElement[0].focus();
- }
- };
-
- function removeDropdownMenu() {
- $element.append(self.dropdownMenu);
- }
-
- scope.$watch('isOpen', function(isOpen, wasOpen) {
- var appendTo = null,
- appendToBody = false;
-
- if (angular.isDefined($attrs.dropdownAppendTo)) {
- var appendToEl = $parse($attrs.dropdownAppendTo)(scope);
- if (appendToEl) {
- appendTo = angular.element(appendToEl);
- }
- }
-
- if (angular.isDefined($attrs.dropdownAppendToBody)) {
- var appendToBodyValue = $parse($attrs.dropdownAppendToBody)(scope);
- if (appendToBodyValue !== false) {
- appendToBody = true;
- }
- }
-
- if (appendToBody && !appendTo) {
- appendTo = body;
- }
-
- if (appendTo && self.dropdownMenu) {
- if (isOpen) {
- appendTo.append(self.dropdownMenu);
- $element.on('$destroy', removeDropdownMenu);
- } else {
- $element.off('$destroy', removeDropdownMenu);
- removeDropdownMenu();
- }
- }
-
- if (appendTo && self.dropdownMenu) {
- var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true),
- css,
- rightalign,
- scrollbarPadding,
- scrollbarWidth = 0;
-
- css = {
- top: pos.top + 'px',
- display: isOpen ? 'block' : 'none'
- };
-
- rightalign = self.dropdownMenu.hasClass('dropdown-menu-right');
- if (!rightalign) {
- css.left = pos.left + 'px';
- css.right = 'auto';
- } else {
- css.left = 'auto';
- scrollbarPadding = $position.scrollbarPadding(appendTo);
-
- if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
- scrollbarWidth = scrollbarPadding.scrollbarWidth;
- }
-
- css.right = window.innerWidth - scrollbarWidth -
- (pos.left + $element.prop('offsetWidth')) + 'px';
- }
-
- // Need to adjust our positioning to be relative to the appendTo container
- // if it's not the body element
- if (!appendToBody) {
- var appendOffset = $position.offset(appendTo);
-
- css.top = pos.top - appendOffset.top + 'px';
-
- if (!rightalign) {
- css.left = pos.left - appendOffset.left + 'px';
- } else {
- css.right = window.innerWidth -
- (pos.left - appendOffset.left + $element.prop('offsetWidth')) + 'px';
- }
- }
-
- self.dropdownMenu.css(css);
- }
-
- var openContainer = appendTo ? appendTo : $element;
- var dropdownOpenClass = appendTo ? appendToOpenClass : openClass;
- var hasOpenClass = openContainer.hasClass(dropdownOpenClass);
- var isOnlyOpen = uibDropdownService.isOnlyOpen($scope, appendTo);
-
- if (hasOpenClass === !isOpen) {
- var toggleClass;
- if (appendTo) {
- toggleClass = !isOnlyOpen ? 'addClass' : 'removeClass';
- } else {
- toggleClass = isOpen ? 'addClass' : 'removeClass';
- }
- $animate[toggleClass](openContainer, dropdownOpenClass).then(function() {
- if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
- toggleInvoker($scope, { open: !!isOpen });
- }
- });
- }
-
- if (isOpen) {
- if (self.dropdownMenuTemplateUrl) {
- $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) {
- templateScope = scope.$new();
- $compile(tplContent.trim())(templateScope, function(dropdownElement) {
- var newEl = dropdownElement;
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- $document.on('keydown', uibDropdownService.keybindFilter);
- });
- });
- } else {
- $document.on('keydown', uibDropdownService.keybindFilter);
- }
-
- scope.focusToggleElement();
- uibDropdownService.open(scope, $element, appendTo);
- } else {
- uibDropdownService.close(scope, $element, appendTo);
- if (self.dropdownMenuTemplateUrl) {
- if (templateScope) {
- templateScope.$destroy();
- }
- var newEl = angular.element('<ul class="dropdown-menu"></ul>');
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- }
-
- self.selectedOption = null;
- }
-
- if (angular.isFunction(setIsOpen)) {
- setIsOpen($scope, isOpen);
- }
- });
-}])
-
-.directive('uibDropdown', function() {
- return {
- controller: 'UibDropdownController',
- link: function(scope, element, attrs, dropdownCtrl) {
- dropdownCtrl.init();
- }
- };
-})
-
-.directive('uibDropdownMenu', function() {
- return {
- restrict: 'A',
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) {
- return;
- }
-
- element.addClass('dropdown-menu');
-
- var tplUrl = attrs.templateUrl;
- if (tplUrl) {
- dropdownCtrl.dropdownMenuTemplateUrl = tplUrl;
- }
-
- if (!dropdownCtrl.dropdownMenu) {
- dropdownCtrl.dropdownMenu = element;
- }
- }
- };
-})
-
-.directive('uibDropdownToggle', function() {
- return {
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl) {
- return;
- }
-
- element.addClass('dropdown-toggle');
-
- dropdownCtrl.toggleElement = element;
-
- var toggleDropdown = function(event) {
- event.preventDefault();
-
- if (!element.hasClass('disabled') && !attrs.disabled) {
- scope.$apply(function() {
- dropdownCtrl.toggle();
- });
- }
- };
-
- element.on('click', toggleDropdown);
-
- // WAI-ARIA
- element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
- scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
- element.attr('aria-expanded', !!isOpen);
- });
-
- scope.$on('$destroy', function() {
- element.off('click', toggleDropdown);
- });
- }
- };
-});
-
-angular.module('ui.bootstrap.stackedMap', [])
-/**
- * A helper, internal data structure that acts as a map but also allows getting / removing
- * elements in the LIFO order
- */
- .factory('$$stackedMap', function() {
- return {
- createNew: function() {
- var stack = [];
-
- return {
- add: function(key, value) {
- stack.push({
- key: key,
- value: value
- });
- },
- get: function(key) {
- for (var i = 0; i < stack.length; i++) {
- if (key === stack[i].key) {
- return stack[i];
- }
- }
- },
- keys: function() {
- var keys = [];
- for (var i = 0; i < stack.length; i++) {
- keys.push(stack[i].key);
- }
- return keys;
- },
- top: function() {
- return stack[stack.length - 1];
- },
- remove: function(key) {
- var idx = -1;
- for (var i = 0; i < stack.length; i++) {
- if (key === stack[i].key) {
- idx = i;
- break;
- }
- }
- return stack.splice(idx, 1)[0];
- },
- removeTop: function() {
- return stack.pop();
- },
- length: function() {
- return stack.length;
- }
- };
- }
- };
- });
-angular.module('ui.bootstrap.modal', ['ui.bootstrap.multiMap', 'ui.bootstrap.stackedMap', 'ui.bootstrap.position'])
-/**
- * Pluggable resolve mechanism for the modal resolve resolution
- * Supports UI Router's $resolve service
- */
- .provider('$uibResolve', function() {
- var resolve = this;
- this.resolver = null;
-
- this.setResolver = function(resolver) {
- this.resolver = resolver;
- };
-
- this.$get = ['$injector', '$q', function($injector, $q) {
- var resolver = resolve.resolver ? $injector.get(resolve.resolver) : null;
- return {
- resolve: function(invocables, locals, parent, self) {
- if (resolver) {
- return resolver.resolve(invocables, locals, parent, self);
- }
-
- var promises = [];
-
- angular.forEach(invocables, function(value) {
- if (angular.isFunction(value) || angular.isArray(value)) {
- promises.push($q.resolve($injector.invoke(value)));
- } else if (angular.isString(value)) {
- promises.push($q.resolve($injector.get(value)));
- } else {
- promises.push($q.resolve(value));
- }
- });
-
- return $q.all(promises).then(function(resolves) {
- var resolveObj = {};
- var resolveIter = 0;
- angular.forEach(invocables, function(value, key) {
- resolveObj[key] = resolves[resolveIter++];
- });
-
- return resolveObj;
- });
- }
- };
- }];
- })
-
-/**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack',
- function($animate, $injector, $modalStack) {
- return {
- restrict: 'A',
- compile: function(tElement, tAttrs) {
- tElement.addClass(tAttrs.backdropClass);
- return linkFn;
- }
- };
-
- function linkFn(scope, element, attrs) {
- if (attrs.modalInClass) {
- $animate.addClass(element, attrs.modalInClass);
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- if (scope.modalOptions.animation) {
- $animate.removeClass(element, attrs.modalInClass).then(done);
- } else {
- done();
- }
- });
- }
- }
- }])
-
- .directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document',
- function($modalStack, $q, $animateCss, $document) {
- return {
- scope: {
- index: '@'
- },
- restrict: 'A',
- transclude: true,
- templateUrl: function(tElement, tAttrs) {
- return tAttrs.templateUrl || 'uib/template/modal/window.html';
- },
- link: function(scope, element, attrs) {
- element.addClass(attrs.windowTopClass || '');
- scope.size = attrs.size;
-
- scope.close = function(evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop &&
- modal.value.backdrop !== 'static' &&
- evt.target === evt.currentTarget) {
- evt.preventDefault();
- evt.stopPropagation();
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
-
- // moved from template to fix issue #2280
- element.on('click', scope.close);
-
- // This property is only added to the scope for the purpose of detecting when this directive is rendered.
- // We can detect that by using this property in the template associated with this directive and then use
- // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.
- scope.$isRendered = true;
-
- // Deferred object that will be resolved when this modal is rendered.
- var modalRenderDeferObj = $q.defer();
- // Resolve render promise post-digest
- scope.$$postDigest(function() {
- modalRenderDeferObj.resolve();
- });
-
- modalRenderDeferObj.promise.then(function() {
- var animationPromise = null;
-
- if (attrs.modalInClass) {
- animationPromise = $animateCss(element, {
- addClass: attrs.modalInClass
- }).start();
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- $animateCss(element, {
- removeClass: attrs.modalInClass
- }).start().then(done);
- });
- }
-
-
- $q.when(animationPromise).then(function() {
- // Notify {@link $modalStack} that modal is rendered.
- var modal = $modalStack.getTop();
- if (modal) {
- $modalStack.modalRendered(modal.key);
- }
-
- /**
- * If something within the freshly-opened modal already has focus (perhaps via a
- * directive that causes focus) then there's no need to try to focus anything.
- */
- if (!($document[0].activeElement && element[0].contains($document[0].activeElement))) {
- var inputWithAutofocus = element[0].querySelector('[autofocus]');
- /**
- * Auto-focusing of a freshly-opened modal element causes any child elements
- * with the autofocus attribute to lose focus. This is an issue on touch
- * based devices which will show and then hide the onscreen keyboard.
- * Attempts to refocus the autofocus element via JavaScript will not reopen
- * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus
- * the modal element if the modal does not contain an autofocus element.
- */
- if (inputWithAutofocus) {
- inputWithAutofocus.focus();
- } else {
- element[0].focus();
- }
- }
- });
- });
- }
- };
- }])
-
- .directive('uibModalAnimationClass', function() {
- return {
- compile: function(tElement, tAttrs) {
- if (tAttrs.modalAnimation) {
- tElement.addClass(tAttrs.uibModalAnimationClass);
- }
- }
- };
- })
-
- .directive('uibModalTransclude', ['$animate', function($animate) {
- return {
- link: function(scope, element, attrs, controller, transclude) {
- transclude(scope.$parent, function(clone) {
- element.empty();
- $animate.enter(clone, element);
- });
- }
- };
- }])
-
- .factory('$uibModalStack', ['$animate', '$animateCss', '$document',
- '$compile', '$rootScope', '$q', '$$multiMap', '$$stackedMap', '$uibPosition',
- function($animate, $animateCss, $document, $compile, $rootScope, $q, $$multiMap, $$stackedMap, $uibPosition) {
- var OPENED_MODAL_CLASS = 'modal-open';
-
- var backdropDomEl, backdropScope;
- var openedWindows = $$stackedMap.createNew();
- var openedClasses = $$multiMap.createNew();
- var $modalStack = {
- NOW_CLOSING_EVENT: 'modal.stack.now-closing'
- };
- var topModalIndex = 0;
- var previousTopOpenedModal = null;
- var ARIA_HIDDEN_ATTRIBUTE_NAME = 'data-bootstrap-modal-aria-hidden-count';
-
- //Modal focus behavior
- var tabbableSelector = 'a[href], area[href], input:not([disabled]):not([tabindex=\'-1\']), ' +
- 'button:not([disabled]):not([tabindex=\'-1\']),select:not([disabled]):not([tabindex=\'-1\']), textarea:not([disabled]):not([tabindex=\'-1\']), ' +
- 'iframe, object, embed, *[tabindex]:not([tabindex=\'-1\']), *[contenteditable=true]';
- var scrollbarPadding;
- var SNAKE_CASE_REGEXP = /[A-Z]/g;
-
- // TODO: extract into common dependency with tooltip
- function snake_case(name) {
- var separator = '-';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- function isVisible(element) {
- return !!(element.offsetWidth ||
- element.offsetHeight ||
- element.getClientRects().length);
- }
-
- function backdropIndex() {
- var topBackdropIndex = -1;
- var opened = openedWindows.keys();
- for (var i = 0; i < opened.length; i++) {
- if (openedWindows.get(opened[i]).value.backdrop) {
- topBackdropIndex = i;
- }
- }
-
- // If any backdrop exist, ensure that it's index is always
- // right below the top modal
- if (topBackdropIndex > -1 && topBackdropIndex < topModalIndex) {
- topBackdropIndex = topModalIndex;
- }
- return topBackdropIndex;
- }
-
- $rootScope.$watch(backdropIndex, function(newBackdropIndex) {
- if (backdropScope) {
- backdropScope.index = newBackdropIndex;
- }
- });
-
- function removeModalWindow(modalInstance, elementToReceiveFocus) {
- var modalWindow = openedWindows.get(modalInstance).value;
- var appendToElement = modalWindow.appendTo;
-
- //clean up the stack
- openedWindows.remove(modalInstance);
- previousTopOpenedModal = openedWindows.top();
- if (previousTopOpenedModal) {
- topModalIndex = parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10);
- }
-
- removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {
- var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS;
- openedClasses.remove(modalBodyClass, modalInstance);
- var areAnyOpen = openedClasses.hasKey(modalBodyClass);
- appendToElement.toggleClass(modalBodyClass, areAnyOpen);
- if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
- if (scrollbarPadding.originalRight) {
- appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'});
- } else {
- appendToElement.css({paddingRight: ''});
- }
- scrollbarPadding = null;
- }
- toggleTopWindowClass(true);
- }, modalWindow.closedDeferred);
- checkRemoveBackdrop();
-
- //move focus to specified element if available, or else to body
- if (elementToReceiveFocus && elementToReceiveFocus.focus) {
- elementToReceiveFocus.focus();
- } else if (appendToElement.focus) {
- appendToElement.focus();
- }
- }
-
- // Add or remove "windowTopClass" from the top window in the stack
- function toggleTopWindowClass(toggleSwitch) {
- var modalWindow;
-
- if (openedWindows.length() > 0) {
- modalWindow = openedWindows.top().value;
- modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch);
- }
- }
-
- function checkRemoveBackdrop() {
- //remove backdrop if no longer needed
- if (backdropDomEl && backdropIndex() === -1) {
- var backdropScopeRef = backdropScope;
- removeAfterAnimate(backdropDomEl, backdropScope, function() {
- backdropScopeRef = null;
- });
- backdropDomEl = undefined;
- backdropScope = undefined;
- }
- }
-
- function removeAfterAnimate(domEl, scope, done, closedDeferred) {
- var asyncDeferred;
- var asyncPromise = null;
- var setIsAsync = function() {
- if (!asyncDeferred) {
- asyncDeferred = $q.defer();
- asyncPromise = asyncDeferred.promise;
- }
-
- return function asyncDone() {
- asyncDeferred.resolve();
- };
- };
- scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync);
-
- // Note that it's intentional that asyncPromise might be null.
- // That's when setIsAsync has not been called during the
- // NOW_CLOSING_EVENT broadcast.
- return $q.when(asyncPromise).then(afterAnimating);
-
- function afterAnimating() {
- if (afterAnimating.done) {
- return;
- }
- afterAnimating.done = true;
-
- $animate.leave(domEl).then(function() {
- if (done) {
- done();
- }
-
- domEl.remove();
- if (closedDeferred) {
- closedDeferred.resolve();
- }
- });
-
- scope.$destroy();
- }
- }
-
- $document.on('keydown', keydownListener);
-
- $rootScope.$on('$destroy', function() {
- $document.off('keydown', keydownListener);
- });
-
- function keydownListener(evt) {
- if (evt.isDefaultPrevented()) {
- return evt;
- }
-
- var modal = openedWindows.top();
- if (modal) {
- switch (evt.which) {
- case 27: {
- if (modal.value.keyboard) {
- evt.preventDefault();
- $rootScope.$apply(function() {
- $modalStack.dismiss(modal.key, 'escape key press');
- });
- }
- break;
- }
- case 9: {
- var list = $modalStack.loadFocusElementList(modal);
- var focusChanged = false;
- if (evt.shiftKey) {
- if ($modalStack.isFocusInFirstItem(evt, list) || $modalStack.isModalFocused(evt, modal)) {
- focusChanged = $modalStack.focusLastFocusableElement(list);
- }
- } else {
- if ($modalStack.isFocusInLastItem(evt, list)) {
- focusChanged = $modalStack.focusFirstFocusableElement(list);
- }
- }
-
- if (focusChanged) {
- evt.preventDefault();
- evt.stopPropagation();
- }
-
- break;
- }
- }
- }
- }
-
- $modalStack.open = function(modalInstance, modal) {
- var modalOpener = $document[0].activeElement,
- modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS;
-
- toggleTopWindowClass(false);
-
- // Store the current top first, to determine what index we ought to use
- // for the current top modal
- previousTopOpenedModal = openedWindows.top();
-
- openedWindows.add(modalInstance, {
- deferred: modal.deferred,
- renderDeferred: modal.renderDeferred,
- closedDeferred: modal.closedDeferred,
- modalScope: modal.scope,
- backdrop: modal.backdrop,
- keyboard: modal.keyboard,
- openedClass: modal.openedClass,
- windowTopClass: modal.windowTopClass,
- animation: modal.animation,
- appendTo: modal.appendTo
- });
-
- openedClasses.put(modalBodyClass, modalInstance);
-
- var appendToElement = modal.appendTo,
- currBackdropIndex = backdropIndex();
-
- if (currBackdropIndex >= 0 && !backdropDomEl) {
- backdropScope = $rootScope.$new(true);
- backdropScope.modalOptions = modal;
- backdropScope.index = currBackdropIndex;
- backdropDomEl = angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');
- backdropDomEl.attr({
- 'class': 'modal-backdrop',
- 'ng-style': '{\'z-index\': 1040 + (index && 1 || 0) + index*10}',
- 'uib-modal-animation-class': 'fade',
- 'modal-in-class': 'in'
- });
- if (modal.backdropClass) {
- backdropDomEl.addClass(modal.backdropClass);
- }
-
- if (modal.animation) {
- backdropDomEl.attr('modal-animation', 'true');
- }
- $compile(backdropDomEl)(backdropScope);
- $animate.enter(backdropDomEl, appendToElement);
- if ($uibPosition.isScrollable(appendToElement)) {
- scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement);
- if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
- appendToElement.css({paddingRight: scrollbarPadding.right + 'px'});
- }
- }
- }
-
- var content;
- if (modal.component) {
- content = document.createElement(snake_case(modal.component.name));
- content = angular.element(content);
- content.attr({
- resolve: '$resolve',
- 'modal-instance': '$uibModalInstance',
- close: '$close($value)',
- dismiss: '$dismiss($value)'
- });
- } else {
- content = modal.content;
- }
-
- // Set the top modal index based on the index of the previous top modal
- topModalIndex = previousTopOpenedModal ? parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10) + 1 : 0;
- var angularDomEl = angular.element('<div uib-modal-window="modal-window"></div>');
- angularDomEl.attr({
- 'class': 'modal',
- 'template-url': modal.windowTemplateUrl,
- 'window-top-class': modal.windowTopClass,
- 'role': 'dialog',
- 'aria-labelledby': modal.ariaLabelledBy,
- 'aria-describedby': modal.ariaDescribedBy,
- 'size': modal.size,
- 'index': topModalIndex,
- 'animate': 'animate',
- 'ng-style': '{\'z-index\': 1050 + $$topModalIndex*10, display: \'block\'}',
- 'tabindex': -1,
- 'uib-modal-animation-class': 'fade',
- 'modal-in-class': 'in'
- }).append(content);
- if (modal.windowClass) {
- angularDomEl.addClass(modal.windowClass);
- }
-
- if (modal.animation) {
- angularDomEl.attr('modal-animation', 'true');
- }
-
- appendToElement.addClass(modalBodyClass);
- if (modal.scope) {
- // we need to explicitly add the modal index to the modal scope
- // because it is needed by ngStyle to compute the zIndex property.
- modal.scope.$$topModalIndex = topModalIndex;
- }
- $animate.enter($compile(angularDomEl)(modal.scope), appendToElement);
-
- openedWindows.top().value.modalDomEl = angularDomEl;
- openedWindows.top().value.modalOpener = modalOpener;
-
- applyAriaHidden(angularDomEl);
-
- function applyAriaHidden(el) {
- if (!el || el[0].tagName === 'BODY') {
- return;
- }
-
- getSiblings(el).forEach(function(sibling) {
- var elemIsAlreadyHidden = sibling.getAttribute('aria-hidden') === 'true',
- ariaHiddenCount = parseInt(sibling.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10);
-
- if (!ariaHiddenCount) {
- ariaHiddenCount = elemIsAlreadyHidden ? 1 : 0;
- }
-
- sibling.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, ariaHiddenCount + 1);
- sibling.setAttribute('aria-hidden', 'true');
- });
-
- return applyAriaHidden(el.parent());
-
- function getSiblings(el) {
- var children = el.parent() ? el.parent().children() : [];
-
- return Array.prototype.filter.call(children, function(child) {
- return child !== el[0];
- });
- }
- }
- };
-
- function broadcastClosing(modalWindow, resultOrReason, closing) {
- return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented;
- }
-
- function unhideBackgroundElements() {
- Array.prototype.forEach.call(
- document.querySelectorAll('[' + ARIA_HIDDEN_ATTRIBUTE_NAME + ']'),
- function(hiddenEl) {
- var ariaHiddenCount = parseInt(hiddenEl.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10),
- newHiddenCount = ariaHiddenCount - 1;
- hiddenEl.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, newHiddenCount);
-
- if (!newHiddenCount) {
- hiddenEl.removeAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME);
- hiddenEl.removeAttribute('aria-hidden');
- }
- }
- );
- }
-
- $modalStack.close = function(modalInstance, result) {
- var modalWindow = openedWindows.get(modalInstance);
- unhideBackgroundElements();
- if (modalWindow && broadcastClosing(modalWindow, result, true)) {
- modalWindow.value.modalScope.$$uibDestructionScheduled = true;
- modalWindow.value.deferred.resolve(result);
- removeModalWindow(modalInstance, modalWindow.value.modalOpener);
- return true;
- }
-
- return !modalWindow;
- };
-
- $modalStack.dismiss = function(modalInstance, reason) {
- var modalWindow = openedWindows.get(modalInstance);
- unhideBackgroundElements();
- if (modalWindow && broadcastClosing(modalWindow, reason, false)) {
- modalWindow.value.modalScope.$$uibDestructionScheduled = true;
- modalWindow.value.deferred.reject(reason);
- removeModalWindow(modalInstance, modalWindow.value.modalOpener);
- return true;
- }
- return !modalWindow;
- };
-
- $modalStack.dismissAll = function(reason) {
- var topModal = this.getTop();
- while (topModal && this.dismiss(topModal.key, reason)) {
- topModal = this.getTop();
- }
- };
-
- $modalStack.getTop = function() {
- return openedWindows.top();
- };
-
- $modalStack.modalRendered = function(modalInstance) {
- var modalWindow = openedWindows.get(modalInstance);
- if (modalWindow) {
- modalWindow.value.renderDeferred.resolve();
- }
- };
-
- $modalStack.focusFirstFocusableElement = function(list) {
- if (list.length > 0) {
- list[0].focus();
- return true;
- }
- return false;
- };
-
- $modalStack.focusLastFocusableElement = function(list) {
- if (list.length > 0) {
- list[list.length - 1].focus();
- return true;
- }
- return false;
- };
-
- $modalStack.isModalFocused = function(evt, modalWindow) {
- if (evt && modalWindow) {
- var modalDomEl = modalWindow.value.modalDomEl;
- if (modalDomEl && modalDomEl.length) {
- return (evt.target || evt.srcElement) === modalDomEl[0];
- }
- }
- return false;
- };
-
- $modalStack.isFocusInFirstItem = function(evt, list) {
- if (list.length > 0) {
- return (evt.target || evt.srcElement) === list[0];
- }
- return false;
- };
-
- $modalStack.isFocusInLastItem = function(evt, list) {
- if (list.length > 0) {
- return (evt.target || evt.srcElement) === list[list.length - 1];
- }
- return false;
- };
-
- $modalStack.loadFocusElementList = function(modalWindow) {
- if (modalWindow) {
- var modalDomE1 = modalWindow.value.modalDomEl;
- if (modalDomE1 && modalDomE1.length) {
- var elements = modalDomE1[0].querySelectorAll(tabbableSelector);
- return elements ?
- Array.prototype.filter.call(elements, function(element) {
- return isVisible(element);
- }) : elements;
- }
- }
- };
-
- return $modalStack;
- }])
-
- .provider('$uibModal', function() {
- var $modalProvider = {
- options: {
- animation: true,
- backdrop: true, //can also be false or 'static'
- keyboard: true
- },
- $get: ['$rootScope', '$q', '$document', '$templateRequest', '$controller', '$uibResolve', '$uibModalStack',
- function ($rootScope, $q, $document, $templateRequest, $controller, $uibResolve, $modalStack) {
- var $modal = {};
-
- function getTemplatePromise(options) {
- return options.template ? $q.when(options.template) :
- $templateRequest(angular.isFunction(options.templateUrl) ?
- options.templateUrl() : options.templateUrl);
- }
-
- var promiseChain = null;
- $modal.getPromiseChain = function() {
- return promiseChain;
- };
-
- $modal.open = function(modalOptions) {
- var modalResultDeferred = $q.defer();
- var modalOpenedDeferred = $q.defer();
- var modalClosedDeferred = $q.defer();
- var modalRenderDeferred = $q.defer();
-
- //prepare an instance of a modal to be injected into controllers and returned to a caller
- var modalInstance = {
- result: modalResultDeferred.promise,
- opened: modalOpenedDeferred.promise,
- closed: modalClosedDeferred.promise,
- rendered: modalRenderDeferred.promise,
- close: function (result) {
- return $modalStack.close(modalInstance, result);
- },
- dismiss: function (reason) {
- return $modalStack.dismiss(modalInstance, reason);
- }
- };
-
- //merge and clean up options
- modalOptions = angular.extend({}, $modalProvider.options, modalOptions);
- modalOptions.resolve = modalOptions.resolve || {};
- modalOptions.appendTo = modalOptions.appendTo || $document.find('body').eq(0);
-
- if (!modalOptions.appendTo.length) {
- throw new Error('appendTo element not found. Make sure that the element passed is in DOM.');
- }
-
- //verify options
- if (!modalOptions.component && !modalOptions.template && !modalOptions.templateUrl) {
- throw new Error('One of component or template or templateUrl options is required.');
- }
-
- var templateAndResolvePromise;
- if (modalOptions.component) {
- templateAndResolvePromise = $q.when($uibResolve.resolve(modalOptions.resolve, {}, null, null));
- } else {
- templateAndResolvePromise =
- $q.all([getTemplatePromise(modalOptions), $uibResolve.resolve(modalOptions.resolve, {}, null, null)]);
- }
-
- function resolveWithTemplate() {
- return templateAndResolvePromise;
- }
-
- // Wait for the resolution of the existing promise chain.
- // Then switch to our own combined promise dependency (regardless of how the previous modal fared).
- // Then add to $modalStack and resolve opened.
- // Finally clean up the chain variable if no subsequent modal has overwritten it.
- var samePromise;
- samePromise = promiseChain = $q.all([promiseChain])
- .then(resolveWithTemplate, resolveWithTemplate)
- .then(function resolveSuccess(tplAndVars) {
- var providedScope = modalOptions.scope || $rootScope;
-
- var modalScope = providedScope.$new();
- modalScope.$close = modalInstance.close;
- modalScope.$dismiss = modalInstance.dismiss;
-
- modalScope.$on('$destroy', function() {
- if (!modalScope.$$uibDestructionScheduled) {
- modalScope.$dismiss('$uibUnscheduledDestruction');
- }
- });
-
- var modal = {
- scope: modalScope,
- deferred: modalResultDeferred,
- renderDeferred: modalRenderDeferred,
- closedDeferred: modalClosedDeferred,
- animation: modalOptions.animation,
- backdrop: modalOptions.backdrop,
- keyboard: modalOptions.keyboard,
- backdropClass: modalOptions.backdropClass,
- windowTopClass: modalOptions.windowTopClass,
- windowClass: modalOptions.windowClass,
- windowTemplateUrl: modalOptions.windowTemplateUrl,
- ariaLabelledBy: modalOptions.ariaLabelledBy,
- ariaDescribedBy: modalOptions.ariaDescribedBy,
- size: modalOptions.size,
- openedClass: modalOptions.openedClass,
- appendTo: modalOptions.appendTo
- };
-
- var component = {};
- var ctrlInstance, ctrlInstantiate, ctrlLocals = {};
-
- if (modalOptions.component) {
- constructLocals(component, false, true, false);
- component.name = modalOptions.component;
- modal.component = component;
- } else if (modalOptions.controller) {
- constructLocals(ctrlLocals, true, false, true);
-
- // the third param will make the controller instantiate later,private api
- // @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126
- ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs);
- if (modalOptions.controllerAs && modalOptions.bindToController) {
- ctrlInstance = ctrlInstantiate.instance;
- ctrlInstance.$close = modalScope.$close;
- ctrlInstance.$dismiss = modalScope.$dismiss;
- angular.extend(ctrlInstance, {
- $resolve: ctrlLocals.$scope.$resolve
- }, providedScope);
- }
-
- ctrlInstance = ctrlInstantiate();
-
- if (angular.isFunction(ctrlInstance.$onInit)) {
- ctrlInstance.$onInit();
- }
- }
-
- if (!modalOptions.component) {
- modal.content = tplAndVars[0];
- }
-
- $modalStack.open(modalInstance, modal);
- modalOpenedDeferred.resolve(true);
-
- function constructLocals(obj, template, instanceOnScope, injectable) {
- obj.$scope = modalScope;
- obj.$scope.$resolve = {};
- if (instanceOnScope) {
- obj.$scope.$uibModalInstance = modalInstance;
- } else {
- obj.$uibModalInstance = modalInstance;
- }
-
- var resolves = template ? tplAndVars[1] : tplAndVars;
- angular.forEach(resolves, function(value, key) {
- if (injectable) {
- obj[key] = value;
- }
-
- obj.$scope.$resolve[key] = value;
- });
- }
- }, function resolveError(reason) {
- modalOpenedDeferred.reject(reason);
- modalResultDeferred.reject(reason);
- })['finally'](function() {
- if (promiseChain === samePromise) {
- promiseChain = null;
- }
- });
-
- return modalInstance;
- };
-
- return $modal;
- }
- ]
- };
-
- return $modalProvider;
- });
-
-angular.module('ui.bootstrap.paging', [])
-/**
- * Helper internal service for generating common controller code between the
- * pager and pagination components
- */
-.factory('uibPaging', ['$parse', function($parse) {
- return {
- create: function(ctrl, $scope, $attrs) {
- ctrl.setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
- ctrl.ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl
- ctrl._watchers = [];
-
- ctrl.init = function(ngModelCtrl, config) {
- ctrl.ngModelCtrl = ngModelCtrl;
- ctrl.config = config;
-
- ngModelCtrl.$render = function() {
- ctrl.render();
- };
-
- if ($attrs.itemsPerPage) {
- ctrl._watchers.push($scope.$parent.$watch($attrs.itemsPerPage, function(value) {
- ctrl.itemsPerPage = parseInt(value, 10);
- $scope.totalPages = ctrl.calculateTotalPages();
- ctrl.updatePage();
- }));
- } else {
- ctrl.itemsPerPage = config.itemsPerPage;
- }
-
- $scope.$watch('totalItems', function(newTotal, oldTotal) {
- if (angular.isDefined(newTotal) || newTotal !== oldTotal) {
- $scope.totalPages = ctrl.calculateTotalPages();
- ctrl.updatePage();
- }
- });
- };
-
- ctrl.calculateTotalPages = function() {
- var totalPages = ctrl.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / ctrl.itemsPerPage);
- return Math.max(totalPages || 0, 1);
- };
-
- ctrl.render = function() {
- $scope.page = parseInt(ctrl.ngModelCtrl.$viewValue, 10) || 1;
- };
-
- $scope.selectPage = function(page, evt) {
- if (evt) {
- evt.preventDefault();
- }
-
- var clickAllowed = !$scope.ngDisabled || !evt;
- if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) {
- if (evt && evt.target) {
- evt.target.blur();
- }
- ctrl.ngModelCtrl.$setViewValue(page);
- ctrl.ngModelCtrl.$render();
- }
- };
-
- $scope.getText = function(key) {
- return $scope[key + 'Text'] || ctrl.config[key + 'Text'];
- };
-
- $scope.noPrevious = function() {
- return $scope.page === 1;
- };
-
- $scope.noNext = function() {
- return $scope.page === $scope.totalPages;
- };
-
- ctrl.updatePage = function() {
- ctrl.setNumPages($scope.$parent, $scope.totalPages); // Readonly variable
-
- if ($scope.page > $scope.totalPages) {
- $scope.selectPage($scope.totalPages);
- } else {
- ctrl.ngModelCtrl.$render();
- }
- };
-
- $scope.$on('$destroy', function() {
- while (ctrl._watchers.length) {
- ctrl._watchers.shift()();
- }
- });
- }
- };
-}]);
-
-angular.module('ui.bootstrap.pager', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex'])
-
-.controller('UibPagerController', ['$scope', '$attrs', 'uibPaging', 'uibPagerConfig', function($scope, $attrs, uibPaging, uibPagerConfig) {
- $scope.align = angular.isDefined($attrs.align) ? $scope.$parent.$eval($attrs.align) : uibPagerConfig.align;
-
- uibPaging.create(this, $scope, $attrs);
-}])
-
-.constant('uibPagerConfig', {
- itemsPerPage: 10,
- previousText: '« Previous',
- nextText: 'Next »',
- align: true
-})
-
-.directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) {
- return {
- scope: {
- totalItems: '=',
- previousText: '@',
- nextText: '@',
- ngDisabled: '='
- },
- require: ['uibPager', '?ngModel'],
- restrict: 'A',
- controller: 'UibPagerController',
- controllerAs: 'pager',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/pager/pager.html';
- },
- link: function(scope, element, attrs, ctrls) {
- element.addClass('pager');
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- paginationCtrl.init(ngModelCtrl, uibPagerConfig);
- }
- };
-}]);
-
-angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex'])
-.controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) {
- var ctrl = this;
- // Setup configuration parameters
- var maxSize = angular.isDefined($attrs.maxSize) ? $scope.$parent.$eval($attrs.maxSize) : uibPaginationConfig.maxSize,
- rotate = angular.isDefined($attrs.rotate) ? $scope.$parent.$eval($attrs.rotate) : uibPaginationConfig.rotate,
- forceEllipses = angular.isDefined($attrs.forceEllipses) ? $scope.$parent.$eval($attrs.forceEllipses) : uibPaginationConfig.forceEllipses,
- boundaryLinkNumbers = angular.isDefined($attrs.boundaryLinkNumbers) ? $scope.$parent.$eval($attrs.boundaryLinkNumbers) : uibPaginationConfig.boundaryLinkNumbers,
- pageLabel = angular.isDefined($attrs.pageLabel) ? function(idx) { return $scope.$parent.$eval($attrs.pageLabel, {$page: idx}); } : angular.identity;
- $scope.boundaryLinks = angular.isDefined($attrs.boundaryLinks) ? $scope.$parent.$eval($attrs.boundaryLinks) : uibPaginationConfig.boundaryLinks;
- $scope.directionLinks = angular.isDefined($attrs.directionLinks) ? $scope.$parent.$eval($attrs.directionLinks) : uibPaginationConfig.directionLinks;
- $attrs.$set('role', 'menu');
-
- uibPaging.create(this, $scope, $attrs);
-
- if ($attrs.maxSize) {
- ctrl._watchers.push($scope.$parent.$watch($parse($attrs.maxSize), function(value) {
- maxSize = parseInt(value, 10);
- ctrl.render();
- }));
- }
-
- // Create page object used in template
- function makePage(number, text, isActive) {
- return {
- number: number,
- text: text,
- active: isActive
- };
- }
-
- function getPages(currentPage, totalPages) {
- var pages = [];
-
- // Default page limits
- var startPage = 1, endPage = totalPages;
- var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;
-
- // recompute if maxSize
- if (isMaxSized) {
- if (rotate) {
- // Current page is displayed in the middle of the visible ones
- startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1);
- endPage = startPage + maxSize - 1;
-
- // Adjust if limit is exceeded
- if (endPage > totalPages) {
- endPage = totalPages;
- startPage = endPage - maxSize + 1;
- }
- } else {
- // Visible pages are paginated with maxSize
- startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1;
-
- // Adjust last page if limit is exceeded
- endPage = Math.min(startPage + maxSize - 1, totalPages);
- }
- }
-
- // Add page number links
- for (var number = startPage; number <= endPage; number++) {
- var page = makePage(number, pageLabel(number), number === currentPage);
- pages.push(page);
- }
-
- // Add links to move between page sets
- if (isMaxSized && maxSize > 0 && (!rotate || forceEllipses || boundaryLinkNumbers)) {
- if (startPage > 1) {
- if (!boundaryLinkNumbers || startPage > 3) { //need ellipsis for all options unless range is too close to beginning
- var previousPageSet = makePage(startPage - 1, '...', false);
- pages.unshift(previousPageSet);
- }
- if (boundaryLinkNumbers) {
- if (startPage === 3) { //need to replace ellipsis when the buttons would be sequential
- var secondPageLink = makePage(2, '2', false);
- pages.unshift(secondPageLink);
- }
- //add the first page
- var firstPageLink = makePage(1, '1', false);
- pages.unshift(firstPageLink);
- }
- }
-
- if (endPage < totalPages) {
- if (!boundaryLinkNumbers || endPage < totalPages - 2) { //need ellipsis for all options unless range is too close to end
- var nextPageSet = makePage(endPage + 1, '...', false);
- pages.push(nextPageSet);
- }
- if (boundaryLinkNumbers) {
- if (endPage === totalPages - 2) { //need to replace ellipsis when the buttons would be sequential
- var secondToLastPageLink = makePage(totalPages - 1, totalPages - 1, false);
- pages.push(secondToLastPageLink);
- }
- //add the last page
- var lastPageLink = makePage(totalPages, totalPages, false);
- pages.push(lastPageLink);
- }
- }
- }
- return pages;
- }
-
- var originalRender = this.render;
- this.render = function() {
- originalRender();
- if ($scope.page > 0 && $scope.page <= $scope.totalPages) {
- $scope.pages = getPages($scope.page, $scope.totalPages);
- }
- };
-}])
-
-.constant('uibPaginationConfig', {
- itemsPerPage: 10,
- boundaryLinks: false,
- boundaryLinkNumbers: false,
- directionLinks: true,
- firstText: 'First',
- previousText: 'Previous',
- nextText: 'Next',
- lastText: 'Last',
- rotate: true,
- forceEllipses: false
-})
-
-.directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, uibPaginationConfig) {
- return {
- scope: {
- totalItems: '=',
- firstText: '@',
- previousText: '@',
- nextText: '@',
- lastText: '@',
- ngDisabled:'='
- },
- require: ['uibPagination', '?ngModel'],
- restrict: 'A',
- controller: 'UibPaginationController',
- controllerAs: 'pagination',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/pagination/pagination.html';
- },
- link: function(scope, element, attrs, ctrls) {
- element.addClass('pagination');
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- paginationCtrl.init(ngModelCtrl, uibPaginationConfig);
- }
- };
-}]);
-
-/**
- * The following features are still outstanding: animation as a
- * function, placement as a function, inside, support for more triggers than
- * just mouse enter/leave, html tooltips, and selector delegation.
- */
-angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap'])
-
-/**
- * The $tooltip service creates tooltip- and popover-like directives as well as
- * houses global options for them.
- */
-.provider('$uibTooltip', function() {
- // The default options tooltip and popover.
- var defaultOptions = {
- placement: 'top',
- placementClassPrefix: '',
- animation: true,
- popupDelay: 0,
- popupCloseDelay: 0,
- useContentExp: false
- };
-
- // Default hide triggers for each show trigger
- var triggerMap = {
- 'mouseenter': 'mouseleave',
- 'click': 'click',
- 'outsideClick': 'outsideClick',
- 'focus': 'blur',
- 'none': ''
- };
-
- // The options specified to the provider globally.
- var globalOptions = {};
-
- /**
- * `options({})` allows global configuration of all tooltips in the
- * application.
- *
- * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) {
- * // place tooltips left instead of top by default
- * $tooltipProvider.options( { placement: 'left' } );
- * });
- */
- this.options = function(value) {
- angular.extend(globalOptions, value);
- };
-
- /**
- * This allows you to extend the set of trigger mappings available. E.g.:
- *
- * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } );
- */
- this.setTriggers = function setTriggers(triggers) {
- angular.extend(triggerMap, triggers);
- };
-
- /**
- * This is a helper function for translating camel-case to snake_case.
- */
- function snake_case(name) {
- var regexp = /[A-Z]/g;
- var separator = '-';
- return name.replace(regexp, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- /**
- * Returns the actual instance of the $tooltip service.
- * TODO support multiple triggers
- */
- this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) {
- var openedTooltips = $$stackedMap.createNew();
- $document.on('keyup', keypressListener);
-
- $rootScope.$on('$destroy', function() {
- $document.off('keyup', keypressListener);
- });
-
- function keypressListener(e) {
- if (e.which === 27) {
- var last = openedTooltips.top();
- if (last) {
- last.value.close();
- last = null;
- }
- }
- }
-
- return function $tooltip(ttType, prefix, defaultTriggerShow, options) {
- options = angular.extend({}, defaultOptions, globalOptions, options);
-
- /**
- * Returns an object of show and hide triggers.
- *
- * If a trigger is supplied,
- * it is used to show the tooltip; otherwise, it will use the `trigger`
- * option passed to the `$tooltipProvider.options` method; else it will
- * default to the trigger supplied to this directive factory.
- *
- * The hide trigger is based on the show trigger. If the `trigger` option
- * was passed to the `$tooltipProvider.options` method, it will use the
- * mapped trigger from `triggerMap` or the passed trigger if the map is
- * undefined; otherwise, it uses the `triggerMap` value of the show
- * trigger; else it will just use the show trigger.
- */
- function getTriggers(trigger) {
- var show = (trigger || options.trigger || defaultTriggerShow).split(' ');
- var hide = show.map(function(trigger) {
- return triggerMap[trigger] || trigger;
- });
- return {
- show: show,
- hide: hide
- };
- }
-
- var directiveName = snake_case(ttType);
-
- var startSym = $interpolate.startSymbol();
- var endSym = $interpolate.endSymbol();
- var template =
- '<div '+ directiveName + '-popup ' +
- 'uib-title="' + startSym + 'title' + endSym + '" ' +
- (options.useContentExp ?
- 'content-exp="contentExp()" ' :
- 'content="' + startSym + 'content' + endSym + '" ') +
- 'origin-scope="origScope" ' +
- 'class="uib-position-measure ' + prefix + '" ' +
- 'tooltip-animation-class="fade"' +
- 'uib-tooltip-classes ' +
- 'ng-class="{ in: isOpen }" ' +
- '>' +
- '</div>';
-
- return {
- compile: function(tElem, tAttrs) {
- var tooltipLinker = $compile(template);
-
- return function link(scope, element, attrs, tooltipCtrl) {
- var tooltip;
- var tooltipLinkedScope;
- var transitionTimeout;
- var showTimeout;
- var hideTimeout;
- var positionTimeout;
- var adjustmentTimeout;
- var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
- var triggers = getTriggers(undefined);
- var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
- var ttScope = scope.$new(true);
- var repositionScheduled = false;
- var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false;
- var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false;
- var observers = [];
- var lastPlacement;
-
- var positionTooltip = function() {
- // check if tooltip exists and is not empty
- if (!tooltip || !tooltip.html()) { return; }
-
- if (!positionTimeout) {
- positionTimeout = $timeout(function() {
- var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);
- var initialHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');
- var elementPos = appendToBody ? $position.offset(element) : $position.position(element);
- tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' });
- var placementClasses = ttPosition.placement.split('-');
-
- if (!tooltip.hasClass(placementClasses[0])) {
- tooltip.removeClass(lastPlacement.split('-')[0]);
- tooltip.addClass(placementClasses[0]);
- }
-
- if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) {
- tooltip.removeClass(options.placementClassPrefix + lastPlacement);
- tooltip.addClass(options.placementClassPrefix + ttPosition.placement);
- }
-
- adjustmentTimeout = $timeout(function() {
- var currentHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');
- var adjustment = $position.adjustTop(placementClasses, elementPos, initialHeight, currentHeight);
- if (adjustment) {
- tooltip.css(adjustment);
- }
- adjustmentTimeout = null;
- }, 0, false);
-
- // first time through tt element will have the
- // uib-position-measure class or if the placement
- // has changed we need to position the arrow.
- if (tooltip.hasClass('uib-position-measure')) {
- $position.positionArrow(tooltip, ttPosition.placement);
- tooltip.removeClass('uib-position-measure');
- } else if (lastPlacement !== ttPosition.placement) {
- $position.positionArrow(tooltip, ttPosition.placement);
- }
- lastPlacement = ttPosition.placement;
-
- positionTimeout = null;
- }, 0, false);
- }
- };
-
- // Set up the correct scope to allow transclusion later
- ttScope.origScope = scope;
-
- // By default, the tooltip is not open.
- // TODO add ability to start tooltip opened
- ttScope.isOpen = false;
-
- function toggleTooltipBind() {
- if (!ttScope.isOpen) {
- showTooltipBind();
- } else {
- hideTooltipBind();
- }
- }
-
- // Show the tooltip with delay if specified, otherwise show it immediately
- function showTooltipBind() {
- if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
- return;
- }
-
- cancelHide();
- prepareTooltip();
-
- if (ttScope.popupDelay) {
- // Do nothing if the tooltip was already scheduled to pop-up.
- // This happens if show is triggered multiple times before any hide is triggered.
- if (!showTimeout) {
- showTimeout = $timeout(show, ttScope.popupDelay, false);
- }
- } else {
- show();
- }
- }
-
- function hideTooltipBind() {
- cancelShow();
-
- if (ttScope.popupCloseDelay) {
- if (!hideTimeout) {
- hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false);
- }
- } else {
- hide();
- }
- }
-
- // Show the tooltip popup element.
- function show() {
- cancelShow();
- cancelHide();
-
- // Don't show empty tooltips.
- if (!ttScope.content) {
- return angular.noop;
- }
-
- createTooltip();
-
- // And show the tooltip.
- ttScope.$evalAsync(function() {
- ttScope.isOpen = true;
- assignIsOpen(true);
- positionTooltip();
- });
- }
-
- function cancelShow() {
- if (showTimeout) {
- $timeout.cancel(showTimeout);
- showTimeout = null;
- }
-
- if (positionTimeout) {
- $timeout.cancel(positionTimeout);
- positionTimeout = null;
- }
- }
-
- // Hide the tooltip popup element.
- function hide() {
- if (!ttScope) {
- return;
- }
-
- // First things first: we don't show it anymore.
- ttScope.$evalAsync(function() {
- if (ttScope) {
- ttScope.isOpen = false;
- assignIsOpen(false);
- // And now we remove it from the DOM. However, if we have animation, we
- // need to wait for it to expire beforehand.
- // FIXME: this is a placeholder for a port of the transitions library.
- // The fade transition in TWBS is 150ms.
- if (ttScope.animation) {
- if (!transitionTimeout) {
- transitionTimeout = $timeout(removeTooltip, 150, false);
- }
- } else {
- removeTooltip();
- }
- }
- });
- }
-
- function cancelHide() {
- if (hideTimeout) {
- $timeout.cancel(hideTimeout);
- hideTimeout = null;
- }
-
- if (transitionTimeout) {
- $timeout.cancel(transitionTimeout);
- transitionTimeout = null;
- }
- }
-
- function createTooltip() {
- // There can only be one tooltip element per directive shown at once.
- if (tooltip) {
- return;
- }
-
- tooltipLinkedScope = ttScope.$new();
- tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {
- if (appendToBody) {
- $document.find('body').append(tooltip);
- } else {
- element.after(tooltip);
- }
- });
-
- openedTooltips.add(ttScope, {
- close: hide
- });
-
- prepObservers();
- }
-
- function removeTooltip() {
- cancelShow();
- cancelHide();
- unregisterObservers();
-
- if (tooltip) {
- tooltip.remove();
-
- tooltip = null;
- if (adjustmentTimeout) {
- $timeout.cancel(adjustmentTimeout);
- }
- }
-
- openedTooltips.remove(ttScope);
-
- if (tooltipLinkedScope) {
- tooltipLinkedScope.$destroy();
- tooltipLinkedScope = null;
- }
- }
-
- /**
- * Set the initial scope values. Once
- * the tooltip is created, the observers
- * will be added to keep things in sync.
- */
- function prepareTooltip() {
- ttScope.title = attrs[prefix + 'Title'];
- if (contentParse) {
- ttScope.content = contentParse(scope);
- } else {
- ttScope.content = attrs[ttType];
- }
-
- ttScope.popupClass = attrs[prefix + 'Class'];
- ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement;
- var placement = $position.parsePlacement(ttScope.placement);
- lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0];
-
- var delay = parseInt(attrs[prefix + 'PopupDelay'], 10);
- var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10);
- ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay;
- ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay;
- }
-
- function assignIsOpen(isOpen) {
- if (isOpenParse && angular.isFunction(isOpenParse.assign)) {
- isOpenParse.assign(scope, isOpen);
- }
- }
-
- ttScope.contentExp = function() {
- return ttScope.content;
- };
-
- /**
- * Observe the relevant attributes.
- */
- attrs.$observe('disabled', function(val) {
- if (val) {
- cancelShow();
- }
-
- if (val && ttScope.isOpen) {
- hide();
- }
- });
-
- if (isOpenParse) {
- scope.$watch(isOpenParse, function(val) {
- if (ttScope && !val === ttScope.isOpen) {
- toggleTooltipBind();
- }
- });
- }
-
- function prepObservers() {
- observers.length = 0;
-
- if (contentParse) {
- observers.push(
- scope.$watch(contentParse, function(val) {
- ttScope.content = val;
- if (!val && ttScope.isOpen) {
- hide();
- }
- })
- );
-
- observers.push(
- tooltipLinkedScope.$watch(function() {
- if (!repositionScheduled) {
- repositionScheduled = true;
- tooltipLinkedScope.$$postDigest(function() {
- repositionScheduled = false;
- if (ttScope && ttScope.isOpen) {
- positionTooltip();
- }
- });
- }
- })
- );
- } else {
- observers.push(
- attrs.$observe(ttType, function(val) {
- ttScope.content = val;
- if (!val && ttScope.isOpen) {
- hide();
- } else {
- positionTooltip();
- }
- })
- );
- }
-
- observers.push(
- attrs.$observe(prefix + 'Title', function(val) {
- ttScope.title = val;
- if (ttScope.isOpen) {
- positionTooltip();
- }
- })
- );
-
- observers.push(
- attrs.$observe(prefix + 'Placement', function(val) {
- ttScope.placement = val ? val : options.placement;
- if (ttScope.isOpen) {
- positionTooltip();
- }
- })
- );
- }
-
- function unregisterObservers() {
- if (observers.length) {
- angular.forEach(observers, function(observer) {
- observer();
- });
- observers.length = 0;
- }
- }
-
- // hide tooltips/popovers for outsideClick trigger
- function bodyHideTooltipBind(e) {
- if (!ttScope || !ttScope.isOpen || !tooltip) {
- return;
- }
- // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked
- if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) {
- hideTooltipBind();
- }
- }
-
- // KeyboardEvent handler to hide the tooltip on Escape key press
- function hideOnEscapeKey(e) {
- if (e.which === 27) {
- hideTooltipBind();
- }
- }
-
- var unregisterTriggers = function() {
- triggers.show.forEach(function(trigger) {
- if (trigger === 'outsideClick') {
- element.off('click', toggleTooltipBind);
- } else {
- element.off(trigger, showTooltipBind);
- element.off(trigger, toggleTooltipBind);
- }
- element.off('keypress', hideOnEscapeKey);
- });
- triggers.hide.forEach(function(trigger) {
- if (trigger === 'outsideClick') {
- $document.off('click', bodyHideTooltipBind);
- } else {
- element.off(trigger, hideTooltipBind);
- }
- });
- };
-
- function prepTriggers() {
- var showTriggers = [], hideTriggers = [];
- var val = scope.$eval(attrs[prefix + 'Trigger']);
- unregisterTriggers();
-
- if (angular.isObject(val)) {
- Object.keys(val).forEach(function(key) {
- showTriggers.push(key);
- hideTriggers.push(val[key]);
- });
- triggers = {
- show: showTriggers,
- hide: hideTriggers
- };
- } else {
- triggers = getTriggers(val);
- }
-
- if (triggers.show !== 'none') {
- triggers.show.forEach(function(trigger, idx) {
- if (trigger === 'outsideClick') {
- element.on('click', toggleTooltipBind);
- $document.on('click', bodyHideTooltipBind);
- } else if (trigger === triggers.hide[idx]) {
- element.on(trigger, toggleTooltipBind);
- } else if (trigger) {
- element.on(trigger, showTooltipBind);
- element.on(triggers.hide[idx], hideTooltipBind);
- }
- element.on('keypress', hideOnEscapeKey);
- });
- }
- }
-
- prepTriggers();
-
- var animation = scope.$eval(attrs[prefix + 'Animation']);
- ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;
-
- var appendToBodyVal;
- var appendKey = prefix + 'AppendToBody';
- if (appendKey in attrs && attrs[appendKey] === undefined) {
- appendToBodyVal = true;
- } else {
- appendToBodyVal = scope.$eval(attrs[appendKey]);
- }
-
- appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;
-
- // Make sure tooltip is destroyed and removed.
- scope.$on('$destroy', function onDestroyTooltip() {
- unregisterTriggers();
- removeTooltip();
- ttScope = null;
- });
- };
- }
- };
- };
- }];
-})
-
-// This is mostly ngInclude code but with a custom scope
-.directive('uibTooltipTemplateTransclude', [
- '$animate', '$sce', '$compile', '$templateRequest',
-function ($animate, $sce, $compile, $templateRequest) {
- return {
- link: function(scope, elem, attrs) {
- var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);
-
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
-
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
-
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) {
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) { return; }
- var newScope = origScope.$new();
- var template = response;
-
- var clone = $compile(template)(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, elem);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- }
- });
-
- scope.$on('$destroy', cleanupLastIncludeContent);
- }
- };
-}])
-
-/**
- * Note that it's intentional that these classes are *not* applied through $animate.
- * They must not be animated as they're expected to be present on the tooltip on
- * initialization.
- */
-.directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- // need to set the primary position so the
- // arrow has space during position measure.
- // tooltip.positionTooltip()
- if (scope.placement) {
- // // There are no top-left etc... classes
- // // in TWBS, so we need the primary position.
- var position = $uibPosition.parsePlacement(scope.placement);
- element.addClass(position[0]);
- }
-
- if (scope.popupClass) {
- element.addClass(scope.popupClass);
- }
-
- if (scope.animation) {
- element.addClass(attrs.tooltipAnimationClass);
- }
- }
- };
-}])
-
-.directive('uibTooltipPopup', function() {
- return {
- restrict: 'A',
- scope: { content: '@' },
- templateUrl: 'uib/template/tooltip/tooltip-popup.html'
- };
-})
-
-.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter');
-}])
-
-.directive('uibTooltipTemplatePopup', function() {
- return {
- restrict: 'A',
- scope: { contentExp: '&', originScope: '&' },
- templateUrl: 'uib/template/tooltip/tooltip-template-popup.html'
- };
-})
-
-.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}])
-
-.directive('uibTooltipHtmlPopup', function() {
- return {
- restrict: 'A',
- scope: { contentExp: '&' },
- templateUrl: 'uib/template/tooltip/tooltip-html-popup.html'
- };
-})
-
-.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}]);
-
-/**
- * The following features are still outstanding: popup delay, animation as a
- * function, placement as a function, inside, support for more triggers than
- * just mouse enter/leave, and selector delegatation.
- */
-angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
-
-.directive('uibPopoverTemplatePopup', function() {
- return {
- restrict: 'A',
- scope: { uibTitle: '@', contentExp: '&', originScope: '&' },
- templateUrl: 'uib/template/popover/popover-template.html'
- };
-})
-
-.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopoverTemplate', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('uibPopoverHtmlPopup', function() {
- return {
- restrict: 'A',
- scope: { contentExp: '&', uibTitle: '@' },
- templateUrl: 'uib/template/popover/popover-html.html'
- };
-})
-
-.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopoverHtml', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('uibPopoverPopup', function() {
- return {
- restrict: 'A',
- scope: { uibTitle: '@', content: '@' },
- templateUrl: 'uib/template/popover/popover.html'
- };
-})
-
-.directive('uibPopover', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopover', 'popover', 'click');
-}]);
-
-angular.module('ui.bootstrap.progressbar', [])
-
-.constant('uibProgressConfig', {
- animate: true,
- max: 100
-})
-
-.controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) {
- var self = this,
- animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
-
- this.bars = [];
- $scope.max = getMaxOrDefault();
-
- this.addBar = function(bar, element, attrs) {
- if (!animate) {
- element.css({'transition': 'none'});
- }
-
- this.bars.push(bar);
-
- bar.max = getMaxOrDefault();
- bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar';
-
- bar.$watch('value', function(value) {
- bar.recalculatePercentage();
- });
-
- bar.recalculatePercentage = function() {
- var totalPercentage = self.bars.reduce(function(total, bar) {
- bar.percent = +(100 * bar.value / bar.max).toFixed(2);
- return total + bar.percent;
- }, 0);
-
- if (totalPercentage > 100) {
- bar.percent -= totalPercentage - 100;
- }
- };
-
- bar.$on('$destroy', function() {
- element = null;
- self.removeBar(bar);
- });
- };
-
- this.removeBar = function(bar) {
- this.bars.splice(this.bars.indexOf(bar), 1);
- this.bars.forEach(function (bar) {
- bar.recalculatePercentage();
- });
- };
-
- //$attrs.$observe('maxParam', function(maxParam) {
- $scope.$watch('maxParam', function(maxParam) {
- self.bars.forEach(function(bar) {
- bar.max = getMaxOrDefault();
- bar.recalculatePercentage();
- });
- });
-
- function getMaxOrDefault () {
- return angular.isDefined($scope.maxParam) ? $scope.maxParam : progressConfig.max;
- }
-}])
-
-.directive('uibProgress', function() {
- return {
- replace: true,
- transclude: true,
- controller: 'UibProgressController',
- require: 'uibProgress',
- scope: {
- maxParam: '=?max'
- },
- templateUrl: 'uib/template/progressbar/progress.html'
- };
-})
-
-.directive('uibBar', function() {
- return {
- replace: true,
- transclude: true,
- require: '^uibProgress',
- scope: {
- value: '=',
- type: '@'
- },
- templateUrl: 'uib/template/progressbar/bar.html',
- link: function(scope, element, attrs, progressCtrl) {
- progressCtrl.addBar(scope, element, attrs);
- }
- };
-})
-
-.directive('uibProgressbar', function() {
- return {
- replace: true,
- transclude: true,
- controller: 'UibProgressController',
- scope: {
- value: '=',
- maxParam: '=?max',
- type: '@'
- },
- templateUrl: 'uib/template/progressbar/progressbar.html',
- link: function(scope, element, attrs, progressCtrl) {
- progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title});
- }
- };
-});
-
-angular.module('ui.bootstrap.rating', [])
-
-.constant('uibRatingConfig', {
- max: 5,
- stateOn: null,
- stateOff: null,
- enableReset: true,
- titles: ['one', 'two', 'three', 'four', 'five']
-})
-
-.controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) {
- var ngModelCtrl = { $setViewValue: angular.noop },
- self = this;
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
- ngModelCtrl.$render = this.render;
-
- ngModelCtrl.$formatters.push(function(value) {
- if (angular.isNumber(value) && value << 0 !== value) {
- value = Math.round(value);
- }
-
- return value;
- });
-
- this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
- this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
- this.enableReset = angular.isDefined($attrs.enableReset) ?
- $scope.$parent.$eval($attrs.enableReset) : ratingConfig.enableReset;
- var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles;
- this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ?
- tmpTitles : ratingConfig.titles;
-
- var ratingStates = angular.isDefined($attrs.ratingStates) ?
- $scope.$parent.$eval($attrs.ratingStates) :
- new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max);
- $scope.range = this.buildTemplateObjects(ratingStates);
- };
-
- this.buildTemplateObjects = function(states) {
- for (var i = 0, n = states.length; i < n; i++) {
- states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]);
- }
- return states;
- };
-
- this.getTitle = function(index) {
- if (index >= this.titles.length) {
- return index + 1;
- }
-
- return this.titles[index];
- };
-
- $scope.rate = function(value) {
- if (!$scope.readonly && value >= 0 && value <= $scope.range.length) {
- var newViewValue = self.enableReset && ngModelCtrl.$viewValue === value ? 0 : value;
- ngModelCtrl.$setViewValue(newViewValue);
- ngModelCtrl.$render();
- }
- };
-
- $scope.enter = function(value) {
- if (!$scope.readonly) {
- $scope.value = value;
- }
- $scope.onHover({value: value});
- };
-
- $scope.reset = function() {
- $scope.value = ngModelCtrl.$viewValue;
- $scope.onLeave();
- };
-
- $scope.onKeydown = function(evt) {
- if (/(37|38|39|40)/.test(evt.which)) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1));
- }
- };
-
- this.render = function() {
- $scope.value = ngModelCtrl.$viewValue;
- $scope.title = self.getTitle($scope.value - 1);
- };
-}])
-
-.directive('uibRating', function() {
- return {
- require: ['uibRating', 'ngModel'],
- restrict: 'A',
- scope: {
- readonly: '=?readOnly',
- onHover: '&',
- onLeave: '&'
- },
- controller: 'UibRatingController',
- templateUrl: 'uib/template/rating/rating.html',
- link: function(scope, element, attrs, ctrls) {
- var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];
- ratingCtrl.init(ngModelCtrl);
- }
- };
-});
-
-angular.module('ui.bootstrap.tabs', [])
-
-.controller('UibTabsetController', ['$scope', function ($scope) {
- var ctrl = this,
- oldIndex;
- ctrl.tabs = [];
-
- ctrl.select = function(index, evt) {
- if (!destroyed) {
- var previousIndex = findTabIndex(oldIndex);
- var previousSelected = ctrl.tabs[previousIndex];
- if (previousSelected) {
- previousSelected.tab.onDeselect({
- $event: evt,
- $selectedIndex: index
- });
- if (evt && evt.isDefaultPrevented()) {
- return;
- }
- previousSelected.tab.active = false;
- }
-
- var selected = ctrl.tabs[index];
- if (selected) {
- selected.tab.onSelect({
- $event: evt
- });
- selected.tab.active = true;
- ctrl.active = selected.index;
- oldIndex = selected.index;
- } else if (!selected && angular.isDefined(oldIndex)) {
- ctrl.active = null;
- oldIndex = null;
- }
- }
- };
-
- ctrl.addTab = function addTab(tab) {
- ctrl.tabs.push({
- tab: tab,
- index: tab.index
- });
- ctrl.tabs.sort(function(t1, t2) {
- if (t1.index > t2.index) {
- return 1;
- }
-
- if (t1.index < t2.index) {
- return -1;
- }
-
- return 0;
- });
-
- if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) {
- var newActiveIndex = findTabIndex(tab.index);
- ctrl.select(newActiveIndex);
- }
- };
-
- ctrl.removeTab = function removeTab(tab) {
- var index;
- for (var i = 0; i < ctrl.tabs.length; i++) {
- if (ctrl.tabs[i].tab === tab) {
- index = i;
- break;
- }
- }
-
- if (ctrl.tabs[index].index === ctrl.active) {
- var newActiveTabIndex = index === ctrl.tabs.length - 1 ?
- index - 1 : index + 1 % ctrl.tabs.length;
- ctrl.select(newActiveTabIndex);
- }
-
- ctrl.tabs.splice(index, 1);
- };
-
- $scope.$watch('tabset.active', function(val) {
- if (angular.isDefined(val) && val !== oldIndex) {
- ctrl.select(findTabIndex(val));
- }
- });
-
- var destroyed;
- $scope.$on('$destroy', function() {
- destroyed = true;
- });
-
- function findTabIndex(index) {
- for (var i = 0; i < ctrl.tabs.length; i++) {
- if (ctrl.tabs[i].index === index) {
- return i;
- }
- }
- }
-}])
-
-.directive('uibTabset', function() {
- return {
- transclude: true,
- replace: true,
- scope: {},
- bindToController: {
- active: '=?',
- type: '@'
- },
- controller: 'UibTabsetController',
- controllerAs: 'tabset',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/tabs/tabset.html';
- },
- link: function(scope, element, attrs) {
- scope.vertical = angular.isDefined(attrs.vertical) ?
- scope.$parent.$eval(attrs.vertical) : false;
- scope.justified = angular.isDefined(attrs.justified) ?
- scope.$parent.$eval(attrs.justified) : false;
- }
- };
-})
-
-.directive('uibTab', ['$parse', function($parse) {
- return {
- require: '^uibTabset',
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/tabs/tab.html';
- },
- transclude: true,
- scope: {
- heading: '@',
- index: '=?',
- classes: '@?',
- onSelect: '&select', //This callback is called in contentHeadingTransclude
- //once it inserts the tab's content into the dom
- onDeselect: '&deselect'
- },
- controller: function() {
- //Empty controller so other directives can require being 'under' a tab
- },
- controllerAs: 'tab',
- link: function(scope, elm, attrs, tabsetCtrl, transclude) {
- scope.disabled = false;
- if (attrs.disable) {
- scope.$parent.$watch($parse(attrs.disable), function(value) {
- scope.disabled = !! value;
- });
- }
-
- if (angular.isUndefined(attrs.index)) {
- if (tabsetCtrl.tabs && tabsetCtrl.tabs.length) {
- scope.index = Math.max.apply(null, tabsetCtrl.tabs.map(function(t) { return t.index; })) + 1;
- } else {
- scope.index = 0;
- }
- }
-
- if (angular.isUndefined(attrs.classes)) {
- scope.classes = '';
- }
-
- scope.select = function(evt) {
- if (!scope.disabled) {
- var index;
- for (var i = 0; i < tabsetCtrl.tabs.length; i++) {
- if (tabsetCtrl.tabs[i].tab === scope) {
- index = i;
- break;
- }
- }
-
- tabsetCtrl.select(index, evt);
- }
- };
-
- tabsetCtrl.addTab(scope);
- scope.$on('$destroy', function() {
- tabsetCtrl.removeTab(scope);
- });
-
- //We need to transclude later, once the content container is ready.
- //when this link happens, we're inside a tab heading.
- scope.$transcludeFn = transclude;
- }
- };
-}])
-
-.directive('uibTabHeadingTransclude', function() {
- return {
- restrict: 'A',
- require: '^uibTab',
- link: function(scope, elm) {
- scope.$watch('headingElement', function updateHeadingElement(heading) {
- if (heading) {
- elm.html('');
- elm.append(heading);
- }
- });
- }
- };
-})
-
-.directive('uibTabContentTransclude', function() {
- return {
- restrict: 'A',
- require: '^uibTabset',
- link: function(scope, elm, attrs) {
- var tab = scope.$eval(attrs.uibTabContentTransclude).tab;
-
- //Now our tab is ready to be transcluded: both the tab heading area
- //and the tab content area are loaded. Transclude 'em both.
- tab.$transcludeFn(tab.$parent, function(contents) {
- angular.forEach(contents, function(node) {
- if (isTabHeading(node)) {
- //Let tabHeadingTransclude know.
- tab.headingElement = node;
- } else {
- elm.append(node);
- }
- });
- });
- }
- };
-
- function isTabHeading(node) {
- return node.tagName && (
- node.hasAttribute('uib-tab-heading') ||
- node.hasAttribute('data-uib-tab-heading') ||
- node.hasAttribute('x-uib-tab-heading') ||
- node.tagName.toLowerCase() === 'uib-tab-heading' ||
- node.tagName.toLowerCase() === 'data-uib-tab-heading' ||
- node.tagName.toLowerCase() === 'x-uib-tab-heading' ||
- node.tagName.toLowerCase() === 'uib:tab-heading'
- );
- }
-});
-
-angular.module('ui.bootstrap.timepicker', [])
-
-.constant('uibTimepickerConfig', {
- hourStep: 1,
- minuteStep: 1,
- secondStep: 1,
- showMeridian: true,
- showSeconds: false,
- meridians: null,
- readonlyInput: false,
- mousewheel: true,
- arrowkeys: true,
- showSpinners: true,
- templateUrl: 'uib/template/timepicker/timepicker.html'
-})
-
-.controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) {
- var hoursModelCtrl, minutesModelCtrl, secondsModelCtrl;
- var selected = new Date(),
- watchers = [],
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl
- meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS,
- padHours = angular.isDefined($attrs.padHours) ? $scope.$parent.$eval($attrs.padHours) : true;
-
- $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0;
- $element.removeAttr('tabindex');
-
- this.init = function(ngModelCtrl_, inputs) {
- ngModelCtrl = ngModelCtrl_;
- ngModelCtrl.$render = this.render;
-
- ngModelCtrl.$formatters.unshift(function(modelValue) {
- return modelValue ? new Date(modelValue) : null;
- });
-
- var hoursInputEl = inputs.eq(0),
- minutesInputEl = inputs.eq(1),
- secondsInputEl = inputs.eq(2);
-
- hoursModelCtrl = hoursInputEl.controller('ngModel');
- minutesModelCtrl = minutesInputEl.controller('ngModel');
- secondsModelCtrl = secondsInputEl.controller('ngModel');
-
- var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel;
-
- if (mousewheel) {
- this.setupMousewheelEvents(hoursInputEl, minutesInputEl, secondsInputEl);
- }
-
- var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys;
- if (arrowkeys) {
- this.setupArrowkeyEvents(hoursInputEl, minutesInputEl, secondsInputEl);
- }
-
- $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;
- this.setupInputEvents(hoursInputEl, minutesInputEl, secondsInputEl);
- };
-
- var hourStep = timepickerConfig.hourStep;
- if ($attrs.hourStep) {
- watchers.push($scope.$parent.$watch($parse($attrs.hourStep), function(value) {
- hourStep = +value;
- }));
- }
-
- var minuteStep = timepickerConfig.minuteStep;
- if ($attrs.minuteStep) {
- watchers.push($scope.$parent.$watch($parse($attrs.minuteStep), function(value) {
- minuteStep = +value;
- }));
- }
-
- var min;
- watchers.push($scope.$parent.$watch($parse($attrs.min), function(value) {
- var dt = new Date(value);
- min = isNaN(dt) ? undefined : dt;
- }));
-
- var max;
- watchers.push($scope.$parent.$watch($parse($attrs.max), function(value) {
- var dt = new Date(value);
- max = isNaN(dt) ? undefined : dt;
- }));
-
- var disabled = false;
- if ($attrs.ngDisabled) {
- watchers.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(value) {
- disabled = value;
- }));
- }
-
- $scope.noIncrementHours = function() {
- var incrementedSelected = addMinutes(selected, hourStep * 60);
- return disabled || incrementedSelected > max ||
- incrementedSelected < selected && incrementedSelected < min;
- };
-
- $scope.noDecrementHours = function() {
- var decrementedSelected = addMinutes(selected, -hourStep * 60);
- return disabled || decrementedSelected < min ||
- decrementedSelected > selected && decrementedSelected > max;
- };
-
- $scope.noIncrementMinutes = function() {
- var incrementedSelected = addMinutes(selected, minuteStep);
- return disabled || incrementedSelected > max ||
- incrementedSelected < selected && incrementedSelected < min;
- };
-
- $scope.noDecrementMinutes = function() {
- var decrementedSelected = addMinutes(selected, -minuteStep);
- return disabled || decrementedSelected < min ||
- decrementedSelected > selected && decrementedSelected > max;
- };
-
- $scope.noIncrementSeconds = function() {
- var incrementedSelected = addSeconds(selected, secondStep);
- return disabled || incrementedSelected > max ||
- incrementedSelected < selected && incrementedSelected < min;
- };
-
- $scope.noDecrementSeconds = function() {
- var decrementedSelected = addSeconds(selected, -secondStep);
- return disabled || decrementedSelected < min ||
- decrementedSelected > selected && decrementedSelected > max;
- };
-
- $scope.noToggleMeridian = function() {
- if (selected.getHours() < 12) {
- return disabled || addMinutes(selected, 12 * 60) > max;
- }
-
- return disabled || addMinutes(selected, -12 * 60) < min;
- };
-
- var secondStep = timepickerConfig.secondStep;
- if ($attrs.secondStep) {
- watchers.push($scope.$parent.$watch($parse($attrs.secondStep), function(value) {
- secondStep = +value;
- }));
- }
-
- $scope.showSeconds = timepickerConfig.showSeconds;
- if ($attrs.showSeconds) {
- watchers.push($scope.$parent.$watch($parse($attrs.showSeconds), function(value) {
- $scope.showSeconds = !!value;
- }));
- }
-
- // 12H / 24H mode
- $scope.showMeridian = timepickerConfig.showMeridian;
- if ($attrs.showMeridian) {
- watchers.push($scope.$parent.$watch($parse($attrs.showMeridian), function(value) {
- $scope.showMeridian = !!value;
-
- if (ngModelCtrl.$error.time) {
- // Evaluate from template
- var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate();
- if (angular.isDefined(hours) && angular.isDefined(minutes)) {
- selected.setHours(hours);
- refresh();
- }
- } else {
- updateTemplate();
- }
- }));
- }
-
- // Get $scope.hours in 24H mode if valid
- function getHoursFromTemplate() {
- var hours = +$scope.hours;
- var valid = $scope.showMeridian ? hours > 0 && hours < 13 :
- hours >= 0 && hours < 24;
- if (!valid || $scope.hours === '') {
- return undefined;
- }
-
- if ($scope.showMeridian) {
- if (hours === 12) {
- hours = 0;
- }
- if ($scope.meridian === meridians[1]) {
- hours = hours + 12;
- }
- }
- return hours;
- }
-
- function getMinutesFromTemplate() {
- var minutes = +$scope.minutes;
- var valid = minutes >= 0 && minutes < 60;
- if (!valid || $scope.minutes === '') {
- return undefined;
- }
- return minutes;
- }
-
- function getSecondsFromTemplate() {
- var seconds = +$scope.seconds;
- return seconds >= 0 && seconds < 60 ? seconds : undefined;
- }
-
- function pad(value, noPad) {
- if (value === null) {
- return '';
- }
-
- return angular.isDefined(value) && value.toString().length < 2 && !noPad ?
- '0' + value : value.toString();
- }
-
- // Respond on mousewheel spin
- this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
- var isScrollingUp = function(e) {
- if (e.originalEvent) {
- e = e.originalEvent;
- }
- //pick correct delta variable depending on event
- var delta = e.wheelDelta ? e.wheelDelta : -e.deltaY;
- return e.detail || delta > 0;
- };
-
- hoursInputEl.on('mousewheel wheel', function(e) {
- if (!disabled) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours());
- }
- e.preventDefault();
- });
-
- minutesInputEl.on('mousewheel wheel', function(e) {
- if (!disabled) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes());
- }
- e.preventDefault();
- });
-
- secondsInputEl.on('mousewheel wheel', function(e) {
- if (!disabled) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementSeconds() : $scope.decrementSeconds());
- }
- e.preventDefault();
- });
- };
-
- // Respond on up/down arrowkeys
- this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
- hoursInputEl.on('keydown', function(e) {
- if (!disabled) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementHours();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementHours();
- $scope.$apply();
- }
- }
- });
-
- minutesInputEl.on('keydown', function(e) {
- if (!disabled) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementMinutes();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementMinutes();
- $scope.$apply();
- }
- }
- });
-
- secondsInputEl.on('keydown', function(e) {
- if (!disabled) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementSeconds();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementSeconds();
- $scope.$apply();
- }
- }
- });
- };
-
- this.setupInputEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
- if ($scope.readonlyInput) {
- $scope.updateHours = angular.noop;
- $scope.updateMinutes = angular.noop;
- $scope.updateSeconds = angular.noop;
- return;
- }
-
- var invalidate = function(invalidHours, invalidMinutes, invalidSeconds) {
- ngModelCtrl.$setViewValue(null);
- ngModelCtrl.$setValidity('time', false);
- if (angular.isDefined(invalidHours)) {
- $scope.invalidHours = invalidHours;
- if (hoursModelCtrl) {
- hoursModelCtrl.$setValidity('hours', false);
- }
- }
-
- if (angular.isDefined(invalidMinutes)) {
- $scope.invalidMinutes = invalidMinutes;
- if (minutesModelCtrl) {
- minutesModelCtrl.$setValidity('minutes', false);
- }
- }
-
- if (angular.isDefined(invalidSeconds)) {
- $scope.invalidSeconds = invalidSeconds;
- if (secondsModelCtrl) {
- secondsModelCtrl.$setValidity('seconds', false);
- }
- }
- };
-
- $scope.updateHours = function() {
- var hours = getHoursFromTemplate(),
- minutes = getMinutesFromTemplate();
-
- ngModelCtrl.$setDirty();
-
- if (angular.isDefined(hours) && angular.isDefined(minutes)) {
- selected.setHours(hours);
- selected.setMinutes(minutes);
- if (selected < min || selected > max) {
- invalidate(true);
- } else {
- refresh('h');
- }
- } else {
- invalidate(true);
- }
- };
-
- hoursInputEl.on('blur', function(e) {
- ngModelCtrl.$setTouched();
- if (modelIsEmpty()) {
- makeValid();
- } else if ($scope.hours === null || $scope.hours === '') {
- invalidate(true);
- } else if (!$scope.invalidHours && $scope.hours < 10) {
- $scope.$apply(function() {
- $scope.hours = pad($scope.hours, !padHours);
- });
- }
- });
-
- $scope.updateMinutes = function() {
- var minutes = getMinutesFromTemplate(),
- hours = getHoursFromTemplate();
-
- ngModelCtrl.$setDirty();
-
- if (angular.isDefined(minutes) && angular.isDefined(hours)) {
- selected.setHours(hours);
- selected.setMinutes(minutes);
- if (selected < min || selected > max) {
- invalidate(undefined, true);
- } else {
- refresh('m');
- }
- } else {
- invalidate(undefined, true);
- }
- };
-
- minutesInputEl.on('blur', function(e) {
- ngModelCtrl.$setTouched();
- if (modelIsEmpty()) {
- makeValid();
- } else if ($scope.minutes === null) {
- invalidate(undefined, true);
- } else if (!$scope.invalidMinutes && $scope.minutes < 10) {
- $scope.$apply(function() {
- $scope.minutes = pad($scope.minutes);
- });
- }
- });
-
- $scope.updateSeconds = function() {
- var seconds = getSecondsFromTemplate();
-
- ngModelCtrl.$setDirty();
-
- if (angular.isDefined(seconds)) {
- selected.setSeconds(seconds);
- refresh('s');
- } else {
- invalidate(undefined, undefined, true);
- }
- };
-
- secondsInputEl.on('blur', function(e) {
- if (modelIsEmpty()) {
- makeValid();
- } else if (!$scope.invalidSeconds && $scope.seconds < 10) {
- $scope.$apply( function() {
- $scope.seconds = pad($scope.seconds);
- });
- }
- });
-
- };
-
- this.render = function() {
- var date = ngModelCtrl.$viewValue;
-
- if (isNaN(date)) {
- ngModelCtrl.$setValidity('time', false);
- $log.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');
- } else {
- if (date) {
- selected = date;
- }
-
- if (selected < min || selected > max) {
- ngModelCtrl.$setValidity('time', false);
- $scope.invalidHours = true;
- $scope.invalidMinutes = true;
- } else {
- makeValid();
- }
- updateTemplate();
- }
- };
-
- // Call internally when we know that model is valid.
- function refresh(keyboardChange) {
- makeValid();
- ngModelCtrl.$setViewValue(new Date(selected));
- updateTemplate(keyboardChange);
- }
-
- function makeValid() {
- if (hoursModelCtrl) {
- hoursModelCtrl.$setValidity('hours', true);
- }
-
- if (minutesModelCtrl) {
- minutesModelCtrl.$setValidity('minutes', true);
- }
-
- if (secondsModelCtrl) {
- secondsModelCtrl.$setValidity('seconds', true);
- }
-
- ngModelCtrl.$setValidity('time', true);
- $scope.invalidHours = false;
- $scope.invalidMinutes = false;
- $scope.invalidSeconds = false;
- }
-
- function updateTemplate(keyboardChange) {
- if (!ngModelCtrl.$modelValue) {
- $scope.hours = null;
- $scope.minutes = null;
- $scope.seconds = null;
- $scope.meridian = meridians[0];
- } else {
- var hours = selected.getHours(),
- minutes = selected.getMinutes(),
- seconds = selected.getSeconds();
-
- if ($scope.showMeridian) {
- hours = hours === 0 || hours === 12 ? 12 : hours % 12; // Convert 24 to 12 hour system
- }
-
- $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours);
- if (keyboardChange !== 'm') {
- $scope.minutes = pad(minutes);
- }
- $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
-
- if (keyboardChange !== 's') {
- $scope.seconds = pad(seconds);
- }
- $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
- }
- }
-
- function addSecondsToSelected(seconds) {
- selected = addSeconds(selected, seconds);
- refresh();
- }
-
- function addMinutes(selected, minutes) {
- return addSeconds(selected, minutes*60);
- }
-
- function addSeconds(date, seconds) {
- var dt = new Date(date.getTime() + seconds * 1000);
- var newDate = new Date(date);
- newDate.setHours(dt.getHours(), dt.getMinutes(), dt.getSeconds());
- return newDate;
- }
-
- function modelIsEmpty() {
- return ($scope.hours === null || $scope.hours === '') &&
- ($scope.minutes === null || $scope.minutes === '') &&
- (!$scope.showSeconds || $scope.showSeconds && ($scope.seconds === null || $scope.seconds === ''));
- }
-
- $scope.showSpinners = angular.isDefined($attrs.showSpinners) ?
- $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners;
-
- $scope.incrementHours = function() {
- if (!$scope.noIncrementHours()) {
- addSecondsToSelected(hourStep * 60 * 60);
- }
- };
-
- $scope.decrementHours = function() {
- if (!$scope.noDecrementHours()) {
- addSecondsToSelected(-hourStep * 60 * 60);
- }
- };
-
- $scope.incrementMinutes = function() {
- if (!$scope.noIncrementMinutes()) {
- addSecondsToSelected(minuteStep * 60);
- }
- };
-
- $scope.decrementMinutes = function() {
- if (!$scope.noDecrementMinutes()) {
- addSecondsToSelected(-minuteStep * 60);
- }
- };
-
- $scope.incrementSeconds = function() {
- if (!$scope.noIncrementSeconds()) {
- addSecondsToSelected(secondStep);
- }
- };
-
- $scope.decrementSeconds = function() {
- if (!$scope.noDecrementSeconds()) {
- addSecondsToSelected(-secondStep);
- }
- };
-
- $scope.toggleMeridian = function() {
- var minutes = getMinutesFromTemplate(),
- hours = getHoursFromTemplate();
-
- if (!$scope.noToggleMeridian()) {
- if (angular.isDefined(minutes) && angular.isDefined(hours)) {
- addSecondsToSelected(12 * 60 * (selected.getHours() < 12 ? 60 : -60));
- } else {
- $scope.meridian = $scope.meridian === meridians[0] ? meridians[1] : meridians[0];
- }
- }
- };
-
- $scope.blur = function() {
- ngModelCtrl.$setTouched();
- };
-
- $scope.$on('$destroy', function() {
- while (watchers.length) {
- watchers.shift()();
- }
- });
-}])
-
-.directive('uibTimepicker', ['uibTimepickerConfig', function(uibTimepickerConfig) {
- return {
- require: ['uibTimepicker', '?^ngModel'],
- restrict: 'A',
- controller: 'UibTimepickerController',
- controllerAs: 'timepicker',
- scope: {},
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || uibTimepickerConfig.templateUrl;
- },
- link: function(scope, element, attrs, ctrls) {
- var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (ngModelCtrl) {
- timepickerCtrl.init(ngModelCtrl, element.find('input'));
- }
- }
- };
-}]);
-
-angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap.position'])
-
-/**
- * A helper service that can parse typeahead's syntax (string provided by users)
- * Extracted to a separate service for ease of unit testing
- */
- .factory('uibTypeaheadParser', ['$parse', function($parse) {
- // 000001111111100000000000002222222200000000000000003333333333333330000000000044444444000
- var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
- return {
- parse: function(input) {
- var match = input.match(TYPEAHEAD_REGEXP);
- if (!match) {
- throw new Error(
- 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' +
- ' but got "' + input + '".');
- }
-
- return {
- itemName: match[3],
- source: $parse(match[4]),
- viewMapper: $parse(match[2] || match[1]),
- modelMapper: $parse(match[1])
- };
- }
- };
- }])
-
- .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$$debounce', '$uibPosition', 'uibTypeaheadParser',
- function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $$debounce, $position, typeaheadParser) {
- var HOT_KEYS = [9, 13, 27, 38, 40];
- var eventDebounceTime = 200;
- var modelCtrl, ngModelOptions;
- //SUPPORTED ATTRIBUTES (OPTIONS)
-
- //minimal no of characters that needs to be entered before typeahead kicks-in
- var minLength = originalScope.$eval(attrs.typeaheadMinLength);
- if (!minLength && minLength !== 0) {
- minLength = 1;
- }
-
- originalScope.$watch(attrs.typeaheadMinLength, function (newVal) {
- minLength = !newVal && newVal !== 0 ? 1 : newVal;
- });
-
- //minimal wait time after last character typed before typeahead kicks-in
- var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
-
- //should it restrict model values to the ones selected from the popup only?
- var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;
- originalScope.$watch(attrs.typeaheadEditable, function (newVal) {
- isEditable = newVal !== false;
- });
-
- //binding to a variable that indicates if matches are being retrieved asynchronously
- var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
-
- //a function to determine if an event should cause selection
- var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) {
- var evt = vals.$event;
- return evt.which === 13 || evt.which === 9;
- };
-
- //a callback executed when a match is selected
- var onSelectCallback = $parse(attrs.typeaheadOnSelect);
-
- //should it select highlighted popup value when losing focus?
- var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false;
-
- //binding to a variable that indicates if there were no results after the query is completed
- var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop;
-
- var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined;
-
- var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;
-
- var appendTo = attrs.typeaheadAppendTo ?
- originalScope.$eval(attrs.typeaheadAppendTo) : null;
-
- var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;
-
- //If input matches an item of the list exactly, select it automatically
- var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false;
-
- //binding to a variable that indicates if dropdown is open
- var isOpenSetter = $parse(attrs.typeaheadIsOpen).assign || angular.noop;
-
- var showHint = originalScope.$eval(attrs.typeaheadShowHint) || false;
-
- //INTERNAL VARIABLES
-
- //model setter executed upon match selection
- var parsedModel = $parse(attrs.ngModel);
- var invokeModelSetter = $parse(attrs.ngModel + '($$$p)');
- var $setModelValue = function(scope, newValue) {
- if (angular.isFunction(parsedModel(originalScope)) &&
- ngModelOptions.getOption('getterSetter')) {
- return invokeModelSetter(scope, {$$$p: newValue});
- }
-
- return parsedModel.assign(scope, newValue);
- };
-
- //expressions used by typeahead
- var parserResult = typeaheadParser.parse(attrs.uibTypeahead);
-
- var hasFocus;
-
- //Used to avoid bug in iOS webview where iOS keyboard does not fire
- //mousedown & mouseup events
- //Issue #3699
- var selected;
-
- //create a child scope for the typeahead directive so we are not polluting original scope
- //with typeahead-specific data (matches, query etc.)
- var scope = originalScope.$new();
- var offDestroy = originalScope.$on('$destroy', function() {
- scope.$destroy();
- });
- scope.$on('$destroy', offDestroy);
-
- // WAI-ARIA
- var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
- element.attr({
- 'aria-autocomplete': 'list',
- 'aria-expanded': false,
- 'aria-owns': popupId
- });
-
- var inputsContainer, hintInputElem;
- //add read-only input to show hint
- if (showHint) {
- inputsContainer = angular.element('<div></div>');
- inputsContainer.css('position', 'relative');
- element.after(inputsContainer);
- hintInputElem = element.clone();
- hintInputElem.attr('placeholder', '');
- hintInputElem.attr('tabindex', '-1');
- hintInputElem.val('');
- hintInputElem.css({
- 'position': 'absolute',
- 'top': '0px',
- 'left': '0px',
- 'border-color': 'transparent',
- 'box-shadow': 'none',
- 'opacity': 1,
- 'background': 'none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)',
- 'color': '#999'
- });
- element.css({
- 'position': 'relative',
- 'vertical-align': 'top',
- 'background-color': 'transparent'
- });
-
- if (hintInputElem.attr('id')) {
- hintInputElem.removeAttr('id'); // remove duplicate id if present.
- }
- inputsContainer.append(hintInputElem);
- hintInputElem.after(element);
- }
-
- //pop-up element used to display matches
- var popUpEl = angular.element('<div uib-typeahead-popup></div>');
- popUpEl.attr({
- id: popupId,
- matches: 'matches',
- active: 'activeIdx',
- select: 'select(activeIdx, evt)',
- 'move-in-progress': 'moveInProgress',
- query: 'query',
- position: 'position',
- 'assign-is-open': 'assignIsOpen(isOpen)',
- debounce: 'debounceUpdate'
- });
- //custom item template
- if (angular.isDefined(attrs.typeaheadTemplateUrl)) {
- popUpEl.attr('template-url', attrs.typeaheadTemplateUrl);
- }
-
- if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) {
- popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl);
- }
-
- var resetHint = function() {
- if (showHint) {
- hintInputElem.val('');
- }
- };
-
- var resetMatches = function() {
- scope.matches = [];
- scope.activeIdx = -1;
- element.attr('aria-expanded', false);
- resetHint();
- };
-
- var getMatchId = function(index) {
- return popupId + '-option-' + index;
- };
-
- // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead.
- // This attribute is added or removed automatically when the `activeIdx` changes.
- scope.$watch('activeIdx', function(index) {
- if (index < 0) {
- element.removeAttr('aria-activedescendant');
- } else {
- element.attr('aria-activedescendant', getMatchId(index));
- }
- });
-
- var inputIsExactMatch = function(inputValue, index) {
- if (scope.matches.length > index && inputValue) {
- return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase();
- }
-
- return false;
- };
-
- var getMatchesAsync = function(inputValue, evt) {
- var locals = {$viewValue: inputValue};
- isLoadingSetter(originalScope, true);
- isNoResultsSetter(originalScope, false);
- $q.when(parserResult.source(originalScope, locals)).then(function(matches) {
- //it might happen that several async queries were in progress if a user were typing fast
- //but we are interested only in responses that correspond to the current view value
- var onCurrentRequest = inputValue === modelCtrl.$viewValue;
- if (onCurrentRequest && hasFocus) {
- if (matches && matches.length > 0) {
- scope.activeIdx = focusFirst ? 0 : -1;
- isNoResultsSetter(originalScope, false);
- scope.matches.length = 0;
-
- //transform labels
- for (var i = 0; i < matches.length; i++) {
- locals[parserResult.itemName] = matches[i];
- scope.matches.push({
- id: getMatchId(i),
- label: parserResult.viewMapper(scope, locals),
- model: matches[i]
- });
- }
-
- scope.query = inputValue;
- //position pop-up with matches - we need to re-calculate its position each time we are opening a window
- //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page
- //due to other elements being rendered
- recalculatePosition();
-
- element.attr('aria-expanded', true);
-
- //Select the single remaining option if user input matches
- if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) {
- if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
- $$debounce(function() {
- scope.select(0, evt);
- }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
- } else {
- scope.select(0, evt);
- }
- }
-
- if (showHint) {
- var firstLabel = scope.matches[0].label;
- if (angular.isString(inputValue) &&
- inputValue.length > 0 &&
- firstLabel.slice(0, inputValue.length).toUpperCase() === inputValue.toUpperCase()) {
- hintInputElem.val(inputValue + firstLabel.slice(inputValue.length));
- } else {
- hintInputElem.val('');
- }
- }
- } else {
- resetMatches();
- isNoResultsSetter(originalScope, true);
- }
- }
- if (onCurrentRequest) {
- isLoadingSetter(originalScope, false);
- }
- }, function() {
- resetMatches();
- isLoadingSetter(originalScope, false);
- isNoResultsSetter(originalScope, true);
- });
- };
-
- // bind events only if appendToBody params exist - performance feature
- if (appendToBody) {
- angular.element($window).on('resize', fireRecalculating);
- $document.find('body').on('scroll', fireRecalculating);
- }
-
- // Declare the debounced function outside recalculating for
- // proper debouncing
- var debouncedRecalculate = $$debounce(function() {
- // if popup is visible
- if (scope.matches.length) {
- recalculatePosition();
- }
-
- scope.moveInProgress = false;
- }, eventDebounceTime);
-
- // Default progress type
- scope.moveInProgress = false;
-
- function fireRecalculating() {
- if (!scope.moveInProgress) {
- scope.moveInProgress = true;
- scope.$digest();
- }
-
- debouncedRecalculate();
- }
-
- // recalculate actual position and set new values to scope
- // after digest loop is popup in right position
- function recalculatePosition() {
- scope.position = appendToBody ? $position.offset(element) : $position.position(element);
- scope.position.top += element.prop('offsetHeight');
- }
-
- //we need to propagate user's query so we can higlight matches
- scope.query = undefined;
-
- //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
- var timeoutPromise;
-
- var scheduleSearchWithTimeout = function(inputValue) {
- timeoutPromise = $timeout(function() {
- getMatchesAsync(inputValue);
- }, waitTime);
- };
-
- var cancelPreviousTimeout = function() {
- if (timeoutPromise) {
- $timeout.cancel(timeoutPromise);
- }
- };
-
- resetMatches();
-
- scope.assignIsOpen = function (isOpen) {
- isOpenSetter(originalScope, isOpen);
- };
-
- scope.select = function(activeIdx, evt) {
- //called from within the $digest() cycle
- var locals = {};
- var model, item;
-
- selected = true;
- locals[parserResult.itemName] = item = scope.matches[activeIdx].model;
- model = parserResult.modelMapper(originalScope, locals);
- $setModelValue(originalScope, model);
- modelCtrl.$setValidity('editable', true);
- modelCtrl.$setValidity('parse', true);
-
- onSelectCallback(originalScope, {
- $item: item,
- $model: model,
- $label: parserResult.viewMapper(originalScope, locals),
- $event: evt
- });
-
- resetMatches();
-
- //return focus to the input element if a match was selected via a mouse click event
- // use timeout to avoid $rootScope:inprog error
- if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) {
- $timeout(function() { element[0].focus(); }, 0, false);
- }
- };
-
- //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)
- element.on('keydown', function(evt) {
- //typeahead is open and an "interesting" key was pressed
- if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
- return;
- }
-
- var shouldSelect = isSelectEvent(originalScope, {$event: evt});
-
- /**
- * if there's nothing selected (i.e. focusFirst) and enter or tab is hit
- * or
- * shift + tab is pressed to bring focus to the previous element
- * then clear the results
- */
- if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) {
- resetMatches();
- scope.$digest();
- return;
- }
-
- evt.preventDefault();
- var target;
- switch (evt.which) {
- case 27: // escape
- evt.stopPropagation();
-
- resetMatches();
- originalScope.$digest();
- break;
- case 38: // up arrow
- scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
- scope.$digest();
- target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx];
- target.parentNode.scrollTop = target.offsetTop;
- break;
- case 40: // down arrow
- scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
- scope.$digest();
- target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx];
- target.parentNode.scrollTop = target.offsetTop;
- break;
- default:
- if (shouldSelect) {
- scope.$apply(function() {
- if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
- $$debounce(function() {
- scope.select(scope.activeIdx, evt);
- }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
- } else {
- scope.select(scope.activeIdx, evt);
- }
- });
- }
- }
- });
-
- element.on('focus', function (evt) {
- hasFocus = true;
- if (minLength === 0 && !modelCtrl.$viewValue) {
- $timeout(function() {
- getMatchesAsync(modelCtrl.$viewValue, evt);
- }, 0);
- }
- });
-
- element.on('blur', function(evt) {
- if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) {
- selected = true;
- scope.$apply(function() {
- if (angular.isObject(scope.debounceUpdate) && angular.isNumber(scope.debounceUpdate.blur)) {
- $$debounce(function() {
- scope.select(scope.activeIdx, evt);
- }, scope.debounceUpdate.blur);
- } else {
- scope.select(scope.activeIdx, evt);
- }
- });
- }
- if (!isEditable && modelCtrl.$error.editable) {
- modelCtrl.$setViewValue();
- scope.$apply(function() {
- // Reset validity as we are clearing
- modelCtrl.$setValidity('editable', true);
- modelCtrl.$setValidity('parse', true);
- });
- element.val('');
- }
- hasFocus = false;
- selected = false;
- });
-
- // Keep reference to click handler to unbind it.
- var dismissClickHandler = function(evt) {
- // Issue #3973
- // Firefox treats right click as a click on document
- if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
- resetMatches();
- if (!$rootScope.$$phase) {
- originalScope.$digest();
- }
- }
- };
-
- $document.on('click', dismissClickHandler);
-
- originalScope.$on('$destroy', function() {
- $document.off('click', dismissClickHandler);
- if (appendToBody || appendTo) {
- $popup.remove();
- }
-
- if (appendToBody) {
- angular.element($window).off('resize', fireRecalculating);
- $document.find('body').off('scroll', fireRecalculating);
- }
- // Prevent jQuery cache memory leak
- popUpEl.remove();
-
- if (showHint) {
- inputsContainer.remove();
- }
- });
-
- var $popup = $compile(popUpEl)(scope);
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else if (appendTo) {
- angular.element(appendTo).eq(0).append($popup);
- } else {
- element.after($popup);
- }
-
- this.init = function(_modelCtrl) {
- modelCtrl = _modelCtrl;
- ngModelOptions = extractOptions(modelCtrl);
-
- scope.debounceUpdate = $parse(ngModelOptions.getOption('debounce'))(originalScope);
-
- //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM
- //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
- modelCtrl.$parsers.unshift(function(inputValue) {
- hasFocus = true;
-
- if (minLength === 0 || inputValue && inputValue.length >= minLength) {
- if (waitTime > 0) {
- cancelPreviousTimeout();
- scheduleSearchWithTimeout(inputValue);
- } else {
- getMatchesAsync(inputValue);
- }
- } else {
- isLoadingSetter(originalScope, false);
- cancelPreviousTimeout();
- resetMatches();
- }
-
- if (isEditable) {
- return inputValue;
- }
-
- if (!inputValue) {
- // Reset in case user had typed something previously.
- modelCtrl.$setValidity('editable', true);
- return null;
- }
-
- modelCtrl.$setValidity('editable', false);
- return undefined;
- });
-
- modelCtrl.$formatters.push(function(modelValue) {
- var candidateViewValue, emptyViewValue;
- var locals = {};
-
- // The validity may be set to false via $parsers (see above) if
- // the model is restricted to selected values. If the model
- // is set manually it is considered to be valid.
- if (!isEditable) {
- modelCtrl.$setValidity('editable', true);
- }
-
- if (inputFormatter) {
- locals.$model = modelValue;
- return inputFormatter(originalScope, locals);
- }
-
- //it might happen that we don't have enough info to properly render input value
- //we need to check for this situation and simply return model value if we can't apply custom formatting
- locals[parserResult.itemName] = modelValue;
- candidateViewValue = parserResult.viewMapper(originalScope, locals);
- locals[parserResult.itemName] = undefined;
- emptyViewValue = parserResult.viewMapper(originalScope, locals);
-
- return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue;
- });
- };
-
- function extractOptions(ngModelCtrl) {
- var ngModelOptions;
-
- if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing
- // guarantee a value
- ngModelOptions = ngModelCtrl.$options || {};
-
- // mimic 1.6+ api
- ngModelOptions.getOption = function (key) {
- return ngModelOptions[key];
- };
- } else { // in angular >=1.6 $options is always present
- ngModelOptions = ngModelCtrl.$options;
- }
-
- return ngModelOptions;
- }
- }])
-
- .directive('uibTypeahead', function() {
- return {
- controller: 'UibTypeaheadController',
- require: ['ngModel', 'uibTypeahead'],
- link: function(originalScope, element, attrs, ctrls) {
- ctrls[1].init(ctrls[0]);
- }
- };
- })
-
- .directive('uibTypeaheadPopup', ['$$debounce', function($$debounce) {
- return {
- scope: {
- matches: '=',
- query: '=',
- active: '=',
- position: '&',
- moveInProgress: '=',
- select: '&',
- assignIsOpen: '&',
- debounce: '&'
- },
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html';
- },
- link: function(scope, element, attrs) {
- scope.templateUrl = attrs.templateUrl;
-
- scope.isOpen = function() {
- var isDropdownOpen = scope.matches.length > 0;
- scope.assignIsOpen({ isOpen: isDropdownOpen });
- return isDropdownOpen;
- };
-
- scope.isActive = function(matchIdx) {
- return scope.active === matchIdx;
- };
-
- scope.selectActive = function(matchIdx) {
- scope.active = matchIdx;
- };
-
- scope.selectMatch = function(activeIdx, evt) {
- var debounce = scope.debounce();
- if (angular.isNumber(debounce) || angular.isObject(debounce)) {
- $$debounce(function() {
- scope.select({activeIdx: activeIdx, evt: evt});
- }, angular.isNumber(debounce) ? debounce : debounce['default']);
- } else {
- scope.select({activeIdx: activeIdx, evt: evt});
- }
- };
- }
- };
- }])
-
- .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) {
- return {
- scope: {
- index: '=',
- match: '=',
- query: '='
- },
- link: function(scope, element, attrs) {
- var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html';
- $templateRequest(tplUrl).then(function(tplContent) {
- var tplEl = angular.element(tplContent.trim());
- element.replaceWith(tplEl);
- $compile(tplEl)(scope);
- });
- }
- };
- }])
-
- .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) {
- var isSanitizePresent;
- isSanitizePresent = $injector.has('$sanitize');
-
- function escapeRegexp(queryToEscape) {
- // Regex: capture the whole query string and replace it with the string that will be used to match
- // the results, for example if the capture is "a" the result will be \a
- return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
- }
-
- function containsHtml(matchItem) {
- return /<.*>/g.test(matchItem);
- }
-
- return function(matchItem, query) {
- if (!isSanitizePresent && containsHtml(matchItem)) {
- $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger
- }
- matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag
- if (!isSanitizePresent) {
- matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive
- }
- return matchItem;
- };
- }]);
-
-angular.module("uib/template/accordion/accordion-group.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/accordion/accordion-group.html",
- "<div role=\"tab\" id=\"{{::headingId}}\" aria-selected=\"{{isOpen}}\" class=\"panel-heading\" ng-keypress=\"toggleOpen($event)\">\n" +
- " <h4 class=\"panel-title\">\n" +
- " <a role=\"button\" data-toggle=\"collapse\" href aria-expanded=\"{{isOpen}}\" aria-controls=\"{{::panelId}}\" tabindex=\"0\" class=\"accordion-toggle\" ng-click=\"toggleOpen()\" uib-accordion-transclude=\"heading\" ng-disabled=\"isDisabled\" uib-tabindex-toggle><span uib-accordion-header ng-class=\"{'text-muted': isDisabled}\">{{heading}}</span></a>\n" +
- " </h4>\n" +
- "</div>\n" +
- "<div id=\"{{::panelId}}\" aria-labelledby=\"{{::headingId}}\" aria-hidden=\"{{!isOpen}}\" role=\"tabpanel\" class=\"panel-collapse collapse\" uib-collapse=\"!isOpen\">\n" +
- " <div class=\"panel-body\" ng-transclude></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/accordion/accordion.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/accordion/accordion.html",
- "<div role=\"tablist\" class=\"panel-group\" ng-transclude></div>");
-}]);
-
-angular.module("uib/template/alert/alert.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/alert/alert.html",
- "<button ng-show=\"closeable\" type=\"button\" class=\"close\" ng-click=\"close({$event: $event})\">\n" +
- " <span aria-hidden=\"true\">&times;</span>\n" +
- " <span class=\"sr-only\">Close</span>\n" +
- "</button>\n" +
- "<div ng-transclude></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/carousel/carousel.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/carousel/carousel.html",
- "<div class=\"carousel-inner\" ng-transclude></div>\n" +
- "<a role=\"button\" href class=\"left carousel-control\" ng-click=\"prev()\" ng-class=\"{ disabled: isPrevDisabled() }\" ng-show=\"slides.length > 1\">\n" +
- " <span aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-left\"></span>\n" +
- " <span class=\"sr-only\">previous</span>\n" +
- "</a>\n" +
- "<a role=\"button\" href class=\"right carousel-control\" ng-click=\"next()\" ng-class=\"{ disabled: isNextDisabled() }\" ng-show=\"slides.length > 1\">\n" +
- " <span aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-right\"></span>\n" +
- " <span class=\"sr-only\">next</span>\n" +
- "</a>\n" +
- "<ol class=\"carousel-indicators\" ng-show=\"slides.length > 1\">\n" +
- " <li ng-repeat=\"slide in slides | orderBy:indexOfSlide track by $index\" ng-class=\"{ active: isActive(slide) }\" ng-click=\"select(slide)\">\n" +
- " <span class=\"sr-only\">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if=\"isActive(slide)\">, currently active</span></span>\n" +
- " </li>\n" +
- "</ol>\n" +
- "");
-}]);
-
-angular.module("uib/template/carousel/slide.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/carousel/slide.html",
- "<div class=\"text-center\" ng-transclude></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/datepicker/datepicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/datepicker/datepicker.html",
- "<div ng-switch=\"datepickerMode\">\n" +
- " <div uib-daypicker ng-switch-when=\"day\" tabindex=\"0\" class=\"uib-daypicker\"></div>\n" +
- " <div uib-monthpicker ng-switch-when=\"month\" tabindex=\"0\" class=\"uib-monthpicker\"></div>\n" +
- " <div uib-yearpicker ng-switch-when=\"year\" tabindex=\"0\" class=\"uib-yearpicker\"></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/datepicker/day.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/datepicker/day.html",
- "<table role=\"grid\" aria-labelledby=\"{{::uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\n" +
- " <thead>\n" +
- " <tr>\n" +
- " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left uib-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-left\"></i><span class=\"sr-only\">previous</span></button></th>\n" +
- " <th colspan=\"{{::5 + showWeeks}}\"><button id=\"{{::uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm uib-title\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\"><strong>{{title}}</strong></button></th>\n" +
- " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right uib-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-right\"></i><span class=\"sr-only\">next</span></button></th>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <th ng-if=\"showWeeks\" class=\"text-center\"></th>\n" +
- " <th ng-repeat=\"label in ::labels track by $index\" class=\"text-center\"><small aria-label=\"{{::label.full}}\">{{::label.abbr}}</small></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr class=\"uib-weeks\" ng-repeat=\"row in rows track by $index\" role=\"row\">\n" +
- " <td ng-if=\"showWeeks\" class=\"text-center h6\"><em>{{ weekNumbers[$index] }}</em></td>\n" +
- " <td ng-repeat=\"dt in row\" class=\"uib-day text-center\" role=\"gridcell\"\n" +
- " id=\"{{::dt.uid}}\"\n" +
- " ng-class=\"::dt.customClass\">\n" +
- " <button type=\"button\" class=\"btn btn-default btn-sm\"\n" +
- " uib-is-class=\"\n" +
- " 'btn-info' for selectedDt,\n" +
- " 'active' for activeDt\n" +
- " on dt\"\n" +
- " ng-click=\"select(dt.date)\"\n" +
- " ng-disabled=\"::dt.disabled\"\n" +
- " tabindex=\"-1\"><span ng-class=\"::{'text-muted': dt.secondary, 'text-info': dt.current}\">{{::dt.label}}</span></button>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- "</table>\n" +
- "");
-}]);
-
-angular.module("uib/template/datepicker/month.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/datepicker/month.html",
- "<table role=\"grid\" aria-labelledby=\"{{::uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\n" +
- " <thead>\n" +
- " <tr>\n" +
- " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left uib-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-left\"></i><span class=\"sr-only\">previous</span></button></th>\n" +
- " <th colspan=\"{{::yearHeaderColspan}}\"><button id=\"{{::uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm uib-title\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\"><strong>{{title}}</strong></button></th>\n" +
- " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right uib-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-right\"></i><span class=\"sr-only\">next</span></i></button></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr class=\"uib-months\" ng-repeat=\"row in rows track by $index\" role=\"row\">\n" +
- " <td ng-repeat=\"dt in row\" class=\"uib-month text-center\" role=\"gridcell\"\n" +
- " id=\"{{::dt.uid}}\"\n" +
- " ng-class=\"::dt.customClass\">\n" +
- " <button type=\"button\" class=\"btn btn-default\"\n" +
- " uib-is-class=\"\n" +
- " 'btn-info' for selectedDt,\n" +
- " 'active' for activeDt\n" +
- " on dt\"\n" +
- " ng-click=\"select(dt.date)\"\n" +
- " ng-disabled=\"::dt.disabled\"\n" +
- " tabindex=\"-1\"><span ng-class=\"::{'text-info': dt.current}\">{{::dt.label}}</span></button>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- "</table>\n" +
- "");
-}]);
-
-angular.module("uib/template/datepicker/year.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/datepicker/year.html",
- "<table role=\"grid\" aria-labelledby=\"{{::uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\n" +
- " <thead>\n" +
- " <tr>\n" +
- " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left uib-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-left\"></i><span class=\"sr-only\">previous</span></button></th>\n" +
- " <th colspan=\"{{::columns - 2}}\"><button id=\"{{::uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm uib-title\" ng-click=\"toggleMode()\" ng-disabled=\"datepickerMode === maxMode\" tabindex=\"-1\"><strong>{{title}}</strong></button></th>\n" +
- " <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right uib-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i aria-hidden=\"true\" class=\"glyphicon glyphicon-chevron-right\"></i><span class=\"sr-only\">next</span></button></th>\n" +
- " </tr>\n" +
- " </thead>\n" +
- " <tbody>\n" +
- " <tr class=\"uib-years\" ng-repeat=\"row in rows track by $index\" role=\"row\">\n" +
- " <td ng-repeat=\"dt in row\" class=\"uib-year text-center\" role=\"gridcell\"\n" +
- " id=\"{{::dt.uid}}\"\n" +
- " ng-class=\"::dt.customClass\">\n" +
- " <button type=\"button\" class=\"btn btn-default\"\n" +
- " uib-is-class=\"\n" +
- " 'btn-info' for selectedDt,\n" +
- " 'active' for activeDt\n" +
- " on dt\"\n" +
- " ng-click=\"select(dt.date)\"\n" +
- " ng-disabled=\"::dt.disabled\"\n" +
- " tabindex=\"-1\"><span ng-class=\"::{'text-info': dt.current}\">{{::dt.label}}</span></button>\n" +
- " </td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- "</table>\n" +
- "");
-}]);
-
-angular.module("uib/template/datepickerPopup/popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/datepickerPopup/popup.html",
- "<ul role=\"presentation\" class=\"uib-datepicker-popup dropdown-menu uib-position-measure\" dropdown-nested ng-if=\"isOpen\" ng-keydown=\"keydown($event)\" ng-click=\"$event.stopPropagation()\">\n" +
- " <li ng-transclude></li>\n" +
- " <li ng-if=\"showButtonBar\" class=\"uib-button-bar\">\n" +
- " <span class=\"btn-group pull-left\">\n" +
- " <button type=\"button\" class=\"btn btn-sm btn-info uib-datepicker-current\" ng-click=\"select('today', $event)\" ng-disabled=\"isDisabled('today')\">{{ getText('current') }}</button>\n" +
- " <button type=\"button\" class=\"btn btn-sm btn-danger uib-clear\" ng-click=\"select(null, $event)\">{{ getText('clear') }}</button>\n" +
- " </span>\n" +
- " <button type=\"button\" class=\"btn btn-sm btn-success pull-right uib-close\" ng-click=\"close($event)\">{{ getText('close') }}</button>\n" +
- " </li>\n" +
- "</ul>\n" +
- "");
-}]);
-
-angular.module("uib/template/modal/window.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/modal/window.html",
- "<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/pager/pager.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/pager/pager.html",
- "<li ng-class=\"{disabled: noPrevious()||ngDisabled, previous: align}\"><a href ng-click=\"selectPage(page - 1, $event)\" ng-disabled=\"noPrevious()||ngDisabled\" uib-tabindex-toggle>{{::getText('previous')}}</a></li>\n" +
- "<li ng-class=\"{disabled: noNext()||ngDisabled, next: align}\"><a href ng-click=\"selectPage(page + 1, $event)\" ng-disabled=\"noNext()||ngDisabled\" uib-tabindex-toggle>{{::getText('next')}}</a></li>\n" +
- "");
-}]);
-
-angular.module("uib/template/pagination/pagination.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/pagination/pagination.html",
- "<li role=\"menuitem\" ng-if=\"::boundaryLinks\" ng-class=\"{disabled: noPrevious()||ngDisabled}\" class=\"pagination-first\"><a href ng-click=\"selectPage(1, $event)\" ng-disabled=\"noPrevious()||ngDisabled\" uib-tabindex-toggle>{{::getText('first')}}</a></li>\n" +
- "<li role=\"menuitem\" ng-if=\"::directionLinks\" ng-class=\"{disabled: noPrevious()||ngDisabled}\" class=\"pagination-prev\"><a href ng-click=\"selectPage(page - 1, $event)\" ng-disabled=\"noPrevious()||ngDisabled\" uib-tabindex-toggle>{{::getText('previous')}}</a></li>\n" +
- "<li role=\"menuitem\" ng-repeat=\"page in pages track by $index\" ng-class=\"{active: page.active,disabled: ngDisabled&&!page.active}\" class=\"pagination-page\"><a href ng-click=\"selectPage(page.number, $event)\" ng-disabled=\"ngDisabled&&!page.active\" uib-tabindex-toggle>{{page.text}}</a></li>\n" +
- "<li role=\"menuitem\" ng-if=\"::directionLinks\" ng-class=\"{disabled: noNext()||ngDisabled}\" class=\"pagination-next\"><a href ng-click=\"selectPage(page + 1, $event)\" ng-disabled=\"noNext()||ngDisabled\" uib-tabindex-toggle>{{::getText('next')}}</a></li>\n" +
- "<li role=\"menuitem\" ng-if=\"::boundaryLinks\" ng-class=\"{disabled: noNext()||ngDisabled}\" class=\"pagination-last\"><a href ng-click=\"selectPage(totalPages, $event)\" ng-disabled=\"noNext()||ngDisabled\" uib-tabindex-toggle>{{::getText('last')}}</a></li>\n" +
- "");
-}]);
-
-angular.module("uib/template/tooltip/tooltip-html-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/tooltip/tooltip-html-popup.html",
- "<div class=\"tooltip-arrow\"></div>\n" +
- "<div class=\"tooltip-inner\" ng-bind-html=\"contentExp()\"></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/tooltip/tooltip-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/tooltip/tooltip-popup.html",
- "<div class=\"tooltip-arrow\"></div>\n" +
- "<div class=\"tooltip-inner\" ng-bind=\"content\"></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/tooltip/tooltip-template-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/tooltip/tooltip-template-popup.html",
- "<div class=\"tooltip-arrow\"></div>\n" +
- "<div class=\"tooltip-inner\"\n" +
- " uib-tooltip-template-transclude=\"contentExp()\"\n" +
- " tooltip-template-transclude-scope=\"originScope()\"></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/popover/popover-html.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/popover/popover-html.html",
- "<div class=\"arrow\"></div>\n" +
- "\n" +
- "<div class=\"popover-inner\">\n" +
- " <h3 class=\"popover-title\" ng-bind=\"uibTitle\" ng-if=\"uibTitle\"></h3>\n" +
- " <div class=\"popover-content\" ng-bind-html=\"contentExp()\"></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/popover/popover-template.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/popover/popover-template.html",
- "<div class=\"arrow\"></div>\n" +
- "\n" +
- "<div class=\"popover-inner\">\n" +
- " <h3 class=\"popover-title\" ng-bind=\"uibTitle\" ng-if=\"uibTitle\"></h3>\n" +
- " <div class=\"popover-content\"\n" +
- " uib-tooltip-template-transclude=\"contentExp()\"\n" +
- " tooltip-template-transclude-scope=\"originScope()\"></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/popover/popover.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/popover/popover.html",
- "<div class=\"arrow\"></div>\n" +
- "\n" +
- "<div class=\"popover-inner\">\n" +
- " <h3 class=\"popover-title\" ng-bind=\"uibTitle\" ng-if=\"uibTitle\"></h3>\n" +
- " <div class=\"popover-content\" ng-bind=\"content\"></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/progressbar/bar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/progressbar/bar.html",
- "<div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: (percent < 100 ? percent : 100) + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" aria-labelledby=\"{{::title}}\" ng-transclude></div>\n" +
- "");
-}]);
-
-angular.module("uib/template/progressbar/progress.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/progressbar/progress.html",
- "<div class=\"progress\" ng-transclude aria-labelledby=\"{{::title}}\"></div>");
-}]);
-
-angular.module("uib/template/progressbar/progressbar.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/progressbar/progressbar.html",
- "<div class=\"progress\">\n" +
- " <div class=\"progress-bar\" ng-class=\"type && 'progress-bar-' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: (percent < 100 ? percent : 100) + '%'}\" aria-valuetext=\"{{percent | number:0}}%\" aria-labelledby=\"{{::title}}\" ng-transclude></div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/rating/rating.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/rating/rating.html",
- "<span ng-mouseleave=\"reset()\" ng-keydown=\"onKeydown($event)\" tabindex=\"0\" role=\"slider\" aria-valuemin=\"0\" aria-valuemax=\"{{range.length}}\" aria-valuenow=\"{{value}}\" aria-valuetext=\"{{title}}\">\n" +
- " <span ng-repeat-start=\"r in range track by $index\" class=\"sr-only\">({{ $index < value ? '*' : ' ' }})</span>\n" +
- " <i ng-repeat-end ng-mouseenter=\"enter($index + 1)\" ng-click=\"rate($index + 1)\" class=\"glyphicon\" ng-class=\"$index < value && (r.stateOn || 'glyphicon-star') || (r.stateOff || 'glyphicon-star-empty')\" ng-attr-title=\"{{r.title}}\"></i>\n" +
- "</span>\n" +
- "");
-}]);
-
-angular.module("uib/template/tabs/tab.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/tabs/tab.html",
- "<li ng-class=\"[{active: active, disabled: disabled}, classes]\" class=\"uib-tab nav-item\">\n" +
- " <a href ng-click=\"select($event)\" class=\"nav-link\" uib-tab-heading-transclude>{{heading}}</a>\n" +
- "</li>\n" +
- "");
-}]);
-
-angular.module("uib/template/tabs/tabset.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/tabs/tabset.html",
- "<div>\n" +
- " <ul class=\"nav nav-{{tabset.type || 'tabs'}}\" ng-class=\"{'nav-stacked': vertical, 'nav-justified': justified}\" ng-transclude></ul>\n" +
- " <div class=\"tab-content\">\n" +
- " <div class=\"tab-pane\"\n" +
- " ng-repeat=\"tab in tabset.tabs\"\n" +
- " ng-class=\"{active: tabset.active === tab.index}\"\n" +
- " uib-tab-content-transclude=\"tab\">\n" +
- " </div>\n" +
- " </div>\n" +
- "</div>\n" +
- "");
-}]);
-
-angular.module("uib/template/timepicker/timepicker.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/timepicker/timepicker.html",
- "<table class=\"uib-timepicker\">\n" +
- " <tbody>\n" +
- " <tr class=\"text-center\" ng-show=\"::showSpinners\">\n" +
- " <td class=\"uib-increment hours\"><a ng-click=\"incrementHours()\" ng-class=\"{disabled: noIncrementHours()}\" class=\"btn btn-link\" ng-disabled=\"noIncrementHours()\" tabindex=\"-1\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\n" +
- " <td>&nbsp;</td>\n" +
- " <td class=\"uib-increment minutes\"><a ng-click=\"incrementMinutes()\" ng-class=\"{disabled: noIncrementMinutes()}\" class=\"btn btn-link\" ng-disabled=\"noIncrementMinutes()\" tabindex=\"-1\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\n" +
- " <td ng-show=\"showSeconds\">&nbsp;</td>\n" +
- " <td ng-show=\"showSeconds\" class=\"uib-increment seconds\"><a ng-click=\"incrementSeconds()\" ng-class=\"{disabled: noIncrementSeconds()}\" class=\"btn btn-link\" ng-disabled=\"noIncrementSeconds()\" tabindex=\"-1\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\n" +
- " <td ng-show=\"showMeridian\"></td>\n" +
- " </tr>\n" +
- " <tr>\n" +
- " <td class=\"form-group uib-time hours\" ng-class=\"{'has-error': invalidHours}\">\n" +
- " <input type=\"text\" placeholder=\"HH\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementHours()\" ng-blur=\"blur()\">\n" +
- " </td>\n" +
- " <td class=\"uib-separator\">:</td>\n" +
- " <td class=\"form-group uib-time minutes\" ng-class=\"{'has-error': invalidMinutes}\">\n" +
- " <input type=\"text\" placeholder=\"MM\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"::readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementMinutes()\" ng-blur=\"blur()\">\n" +
- " </td>\n" +
- " <td ng-show=\"showSeconds\" class=\"uib-separator\">:</td>\n" +
- " <td class=\"form-group uib-time seconds\" ng-class=\"{'has-error': invalidSeconds}\" ng-show=\"showSeconds\">\n" +
- " <input type=\"text\" placeholder=\"SS\" ng-model=\"seconds\" ng-change=\"updateSeconds()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\" tabindex=\"{{::tabindex}}\" ng-disabled=\"noIncrementSeconds()\" ng-blur=\"blur()\">\n" +
- " </td>\n" +
- " <td ng-show=\"showMeridian\" class=\"uib-time am-pm\"><button type=\"button\" ng-class=\"{disabled: noToggleMeridian()}\" class=\"btn btn-default text-center\" ng-click=\"toggleMeridian()\" ng-disabled=\"noToggleMeridian()\" tabindex=\"{{::tabindex}}\">{{meridian}}</button></td>\n" +
- " </tr>\n" +
- " <tr class=\"text-center\" ng-show=\"::showSpinners\">\n" +
- " <td class=\"uib-decrement hours\"><a ng-click=\"decrementHours()\" ng-class=\"{disabled: noDecrementHours()}\" class=\"btn btn-link\" ng-disabled=\"noDecrementHours()\" tabindex=\"-1\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\n" +
- " <td>&nbsp;</td>\n" +
- " <td class=\"uib-decrement minutes\"><a ng-click=\"decrementMinutes()\" ng-class=\"{disabled: noDecrementMinutes()}\" class=\"btn btn-link\" ng-disabled=\"noDecrementMinutes()\" tabindex=\"-1\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\n" +
- " <td ng-show=\"showSeconds\">&nbsp;</td>\n" +
- " <td ng-show=\"showSeconds\" class=\"uib-decrement seconds\"><a ng-click=\"decrementSeconds()\" ng-class=\"{disabled: noDecrementSeconds()}\" class=\"btn btn-link\" ng-disabled=\"noDecrementSeconds()\" tabindex=\"-1\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\n" +
- " <td ng-show=\"showMeridian\"></td>\n" +
- " </tr>\n" +
- " </tbody>\n" +
- "</table>\n" +
- "");
-}]);
-
-angular.module("uib/template/typeahead/typeahead-match.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/typeahead/typeahead-match.html",
- "<a href\n" +
- " tabindex=\"-1\"\n" +
- " ng-bind-html=\"match.label | uibTypeaheadHighlight:query\"\n" +
- " ng-attr-title=\"{{match.label}}\"></a>\n" +
- "");
-}]);
-
-angular.module("uib/template/typeahead/typeahead-popup.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("uib/template/typeahead/typeahead-popup.html",
- "<ul class=\"dropdown-menu\" ng-show=\"isOpen() && !moveInProgress\" ng-style=\"{top: position().top+'px', left: position().left+'px'}\" role=\"listbox\" aria-hidden=\"{{!isOpen()}}\">\n" +
- " <li class=\"uib-typeahead-match\" ng-repeat=\"match in matches track by $index\" ng-class=\"{active: isActive($index) }\" ng-mouseenter=\"selectActive($index)\" ng-click=\"selectMatch($index, $event)\" role=\"option\" id=\"{{::match.id}}\">\n" +
- " <div uib-typeahead-match index=\"$index\" match=\"match\" query=\"query\" template-url=\"templateUrl\"></div>\n" +
- " </li>\n" +
- "</ul>\n" +
- "");
-}]);
-angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'); angular.$$uibCarouselCss = true; });
-angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'); angular.$$uibDatepickerCss = true; });
-angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'); angular.$$uibPositionCss = true; });
-angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'); angular.$$uibDatepickerpopupCss = true; });
-angular.module('ui.bootstrap.tooltip').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTooltipCss && angular.element(document).find('head').prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'); angular.$$uibTooltipCss = true; });
-angular.module('ui.bootstrap.timepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTimepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-time input{width:50px;}</style>'); angular.$$uibTimepickerCss = true; });
-angular.module('ui.bootstrap.typeahead').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTypeaheadCss && angular.element(document).find('head').prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'); angular.$$uibTypeaheadCss = true; }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js
deleted file mode 100644
index 0b1fc7f0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * angular-ui-bootstrap
- * http://angular-ui.github.io/bootstrap/
-
- * Version: 2.5.0 - 2017-01-28
- * License: MIT
- */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){r=!!("horizontal"in g),r?(s={width:""},t={width:"0"}):(s={height:""},t={height:"0"}),d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(s)}function i(a){return r?{width:a.scrollWidth+"px"}:{height:a.scrollHeight+"px"}}function j(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(n(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:i(f[0])}).start()["finally"](k):a.addClass(f,"in",{css:{overflow:"hidden"},to:i(f[0])}).then(k)},angular.noop)}function k(){f.removeClass("collapsing").addClass("collapse").css(s),o(d)}function l(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(p(d)).then(function(){f.css(i(f[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:t}).start()["finally"](m):a.removeClass(f,"in",{to:t}).then(m)},angular.noop):m()}function m(){f.css(t),f.removeClass("collapsing").addClass("collapse"),q(d)}var n=c(g.expanding),o=c(g.expanded),p=c(g.collapsing),q=c(g.collapsed),r=!1,s={},t={};h(),d.$watch(g.uibCollapse,function(a){a?l():j()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(a,b,c){c.$observe("disabled",function(a){c.$set("tabindex",a?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){b.addClass("panel"),d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){function a(){return"uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"}return{require:"^uibAccordionGroup",link:function(b,c,d,e){b.$watch(function(){return e[d.uibAccordionTransclude]},function(b){if(b){var d=angular.element(c[0].querySelector(a()));d.html(""),d.append(b)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(a,b,c,d,e){a.closeable=!!c.close,b.addClass("alert"),c.$set("role","alert"),a.closeable&&b.addClass("alert-dismissible");var f=angular.isDefined(c.dismissOnTimeout)?d(c.dismissOnTimeout)(a.$parent):null;f&&e(function(){a.close()},parseInt(f,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(a){for(var b=0;b<p.length;b++)p[b].slide.active=b===a}function g(c,d,g){if(!s){if(angular.extend(c,{direction:g}),angular.extend(p[r].slide||{},{direction:g}),e.enabled(b)&&!a.$currentTransition&&p[d].element&&o.slides.length>1){p[d].element.data(q,c.direction);var h=o.getCurrentIndex();angular.isNumber(h)&&p[h].element&&p[h].element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",p[d].element,function(b,c){"close"===c&&(a.$currentTransition=null,e.off("addClass",b))})}a.active=c.index,r=c.index,f(d),k()}}function h(a){for(var b=0;b<p.length;b++)if(p[b].slide===a)return b}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null)}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=a.active,s=!1;b.addClass("carousel"),o.addSlide=function(b,c){p.push({slide:b,element:c}),p.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===p.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),r=b.index,a.active=b.index,f(r),o.select(p[h(b)]),1===p.length&&a.play())},o.getCurrentIndex=function(){for(var a=0;a<p.length;a++)if(p[a].slide.index===r)return a},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(p[b],"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(p[b],"prev")},o.removeSlide=function(b){var c=h(b);p.splice(c,1),p.length>0&&r===c?c>=p.length?(r=p.length-1,a.active=r,f(r),o.select(p[p.length-1])):(r=c,a.active=r,f(r),o.select(p[c])):r>c&&(r--,a.active=r),0===p.length&&(r=null,a.active=null)},o.select=a.select=function(b,c){var d=h(b.slide);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b.slide.index===r||a.$currentTransition||g(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===p.length-1&&a.noWrap()},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},b.on("mouseenter",a.pause),b.on("mouseleave",a.play),a.$on("$destroy",function(){s=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j),a.$watch("active",function(a){if(angular.isNumber(a)&&r!==a){for(var b=0;b<p.length;b++)if(p[b].slide.index===a){a=b;break}var c=p[a];c&&(f(a),o.select(p[a]),r=a)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(a){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(b,c,d,e){c.addClass("item"),e.addSlide(b,c),b.$on("$destroy",function(){e.removeSlide(b)}),b.$watch("active",function(b){a[b?"addClass":"removeClass"](c,"active")})}}}]).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(a,b,c,d,e){function f(a){return e(s,{key:a},!0)[0]}function g(a){var b=[],c=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g<a.length;g++)f?("'"===a[g]&&(g+1<a.length&&"'"===a[g+1]?(a[g+1]="$",c[g+1]=""):(c[g]="",f=!1)),a[g]="$"):"'"===a[g]&&(a[g]="$",c[g]="",f=!0);a=a.join("")}return angular.forEach(s,function(d){var e=a.indexOf(d.key);if(e>-1){a=a.split(""),c[e]="("+d.regex+")",a[e]="$";for(var f=e+1,g=e+d.key.length;g>f;f++)c[f]="",a[f]="$";a=a.join(""),b.push({index:e,key:d.key,apply:d.apply,matcher:d.regex})}}),{regex:new RegExp("^"+c.join("")+"$"),map:d(b,"index")}}function h(a){for(var b,c,d=[],e=0;e<a.length;)if(angular.isNumber(c)){if("'"===a.charAt(e))(e+1>=a.length||"'"!==a.charAt(e+1))&&(d.push(i(a,c,e)),c=null);else if(e===a.length)for(;c<a.length;)b=j(a,c),d.push(b),c=b.endIdx;e++}else"'"!==a.charAt(e)?(b=j(a,e),d.push(b.parser),e=b.endIdx):(c=e,e++);return d}function i(a,b,c){return function(){return a.substr(b+1,c-b-1)}}function j(a,b){for(var c=a.substr(b),d=0;d<s.length;d++)if(new RegExp("^"+s[d].key).test(c)){var e=s[d];return{endIdx:b+e.key.length,parser:e.formatter}}return{endIdx:b+1,parser:function(){return c.charAt(0)}}}function k(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function l(a){return parseInt(a,10)}function m(a,b){return a&&b?q(a,b):a}function n(a,b){return a&&b?q(a,b,!0):a}function o(a,b){a=a.replace(/:/g,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function p(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function q(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=o(b,d);return p(a,c*(e-d))}var r,s,t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){r=b.id,this.parsers={},this.formatters={},s=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=l(c+d),this.minutes+=l(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}],angular.version.major>=1&&angular.version.minor>4&&s.push({key:"LLLL",regex:b.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.STANDALONEMONTH.indexOf(a)},formatter:function(a){return c(a,"LLLL")}})},this.init(),this.getParser=function(a){var b=f(a);return b&&b.apply||null},this.overrideParser=function(a,b){var c=f(a);c&&angular.isFunction(b)&&(this.parsers={},c.apply=b)}.bind(this),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==r&&this.init(),this.formatters[c]||(this.formatters[c]=h(c));var d=this.formatters[c];return d.reduce(function(b,c){return b+c(a)},"")},this.parse=function(c,d,e){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(t,"\\$&"),b.id!==r&&this.init(),this.parsers[d]||(this.parsers[d]=g(d,"apply"));var f=this.parsers[d],h=f.regex,i=f.map,j=c.match(h),l=!1;if(j&&j.length){var m,n;angular.isDate(e)&&!isNaN(e.getTime())?m={year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}:(e&&a.warn("dateparser:","baseDate is not a valid date"),m={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var o=1,p=j.length;p>o;o++){var q=i[o-1];"Z"===q.matcher&&(l=!0),q.apply&&q.apply.call(m,j[o])}var s=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return k(m.year,m.month,m.date)&&(!angular.isDate(e)||isNaN(e.getTime())||l?(n=new Date(0),s.call(n,m.year,m.month,m.date),u.call(n,m.hours||0,m.minutes||0,m.seconds||0,m.milliseconds||0)):(n=new Date(e),s.call(n,m.year,m.month,m.date),u.call(n,m.hours,m.minutes,m.seconds,m.milliseconds))),n}},this.toTimezone=m,this.fromTimezone=n,this.timezoneToOffset=o,this.addDateMinutes=p,this.convertTimezoneToLocal=q}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}function n(b){var c;if(angular.version.minor<6)c=b.$options||a.datepickerOptions.ngModelOptions||i.ngModelOptions||{},c.getOption=function(a){return c[a]};else{var d=b.$options.getOption("timezone")||(a.datepickerOptions.ngModelOptions?a.datepickerOptions.ngModelOptions.timezone:null)||(i.ngModelOptions?i.ngModelOptions.timezone:null);c=b.$options.createChild(i.ngModelOptions).createChild(a.datepickerOptions.ngModelOptions).createChild(b.$options).createChild({timezone:d})}return c}var o=this,p={$setViewValue:angular.noop},q={},r=[];b.addClass("uib-datepicker"),c.$set("role","application"),a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:i.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":o[b]=angular.isDefined(a.datepickerOptions[b])?e(a.datepickerOptions[b])(a.$parent):i[b];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":o[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:i[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?o.startingDay=a.datepickerOptions.startingDay:angular.isNumber(i.startingDay)?o.startingDay=i.startingDay:o.startingDay=(f.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?o[b]=l.fromTimezone(new Date(a),q.getOption("timezone")):(j&&g.warn("Literal date support has been deprecated, please switch to date object usage"),o[b]=new Date(h(a,"medium"))):o[b]=i[b]?l.fromTimezone(new Date(i[b]),q.getOption("timezone")):null,o.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){o[b]=a[b]=angular.isDefined(c)?c:a.datepickerOptions[b],("minMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)<o.modes.indexOf(o[b])||"maxMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)>o.modes.indexOf(o[b]))&&(a.datepickerMode=o[b],a.datepickerOptions.datepickerMode=o[b])}):o[b]=a[b]=i[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(c.disabled)||!1,angular.isDefined(c.ngDisabled)&&r.push(a.$parent.$watch(c.ngDisabled,function(b){a.disabled=b,o.refreshView()})),a.isActive=function(b){return 0===o.compare(b.date,o.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){p=b,q=n(p),a.datepickerOptions.initDate?(o.activeDate=l.fromTimezone(a.datepickerOptions.initDate,q.getOption("timezone"))||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(p.$isEmpty(p.$modelValue)||p.$invalid)&&(o.activeDate=l.fromTimezone(a,q.getOption("timezone")),o.refreshView())})):o.activeDate=new Date;var c=p.$modelValue?new Date(p.$modelValue):new Date;this.activeDate=isNaN(c)?l.fromTimezone(new Date,q.getOption("timezone")):l.fromTimezone(c,q.getOption("timezone")),p.$render=function(){o.render()}},this.render=function(){if(p.$viewValue){var a=new Date(p.$viewValue),b=!isNaN(a);b?this.activeDate=l.fromTimezone(a,q.getOption("timezone")):k||g.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=p.$viewValue?new Date(p.$viewValue):null;b=l.fromTimezone(b,q.getOption("timezone")),p.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=p.$viewValue?new Date(p.$viewValue):null;d=l.fromTimezone(d,q.getOption("timezone"));var e=new Date;e=l.fromTimezone(e,q.getOption("timezone"));var f=this.compare(b,e),g={date:b,label:l.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),o.activeDate&&0===this.compare(g.date,o.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===o.minMode){var c=p.$viewValue?l.fromTimezone(new Date(p.$viewValue),q.getOption("timezone")):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=l.toTimezone(c,q.getOption("timezone")),p.$setViewValue(c),p.$render()}else o.activeDate=b,m(o.modes[o.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=o.activeDate.getFullYear()+a*(o.step.years||0),c=o.activeDate.getMonth()+a*(o.step.months||0);o.activeDate.setFullYear(b,c,1),o.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===o.maxMode&&1===b||a.datepickerMode===o.minMode&&-1===b||(m(o.modes[o.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var s=function(){o.element[0].focus()};a.$on("uib:datepicker.focus",s),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),o.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(o.isDisabled(o.activeDate))return;a.select(o.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(o.handleKeyDown(c,b),o.refreshView()):a.toggleMode("up"===c?1:-1)},b.on("keydown",function(b){a.$apply(function(){a.keydown(b)})}),a.$on("$destroy",function(){for(;r.length;)r.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,this.monthColumns),a.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=this.monthColumns;else if("right"===a)c+=1;else if("down"===a)c+=this.monthColumns;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},
-require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},adjustTop:function(a,b,c,d){return-1!==a.indexOf("top")&&c!==d?{top:b.top-d+"px"}:void 0},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,x,a.date);if(isNaN(c))for(var d=0;d<J.length;d++)if(c=l.parse(b,J[d],a.date),!isNaN(c))return c;return c}function r(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=q(a);if(!isNaN(b))return l.toTimezone(b,H.getOption("timezone"))}return H.getOption("allowInvalid")?a:void 0}function s(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(q(d)):!1:!0):!0}function t(c){if(a.isOpen||!a.disabled){var d=I[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function u(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function v(){if(a.isOpen){var d=angular.element(I[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,z);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}function w(a){var b;return angular.version.minor<6?(b=angular.isObject(a.$options)?a.$options:{timezone:null},b.getOption=function(a){return b[a]}):b=a.$options,b}var x,y,z,A,B,C,D,E,F,G,H,I,J,K=!1,L=[];this.init=function(e){if(G=e,H=w(G),y=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,z=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,A=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,B=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,C=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,J=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(x=m.html5Types[c.type],K=!0):(x=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==x&&(x=c,G.$modelValue=null,!x))throw new Error("uibDatepickerPopup must have a date format specified.")})),!x)throw new Error("uibDatepickerPopup must have a date format specified.");if(K&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");D=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),D.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":B}),E=angular.element(D.children()[0]),E.attr("template-url",C),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),E.attr("datepicker-options","datepickerOptions"),K?G.$formatters.push(function(b){return a.date=l.fromTimezone(b,H.getOption("timezone")),b}):(G.$$parserName="date",G.$validators.date=s,G.$parsers.unshift(r),G.$formatters.push(function(b){return G.$isEmpty(b)?(a.date=b,b):(angular.isNumber(b)&&(b=new Date(b)),a.date=l.fromTimezone(b,H.getOption("timezone")),l.filter(a.date,x))})),G.$viewChangeListeners.push(function(){a.date=q(G.$viewValue)}),b.on("keydown",u),I=d(D)(a),D.remove(),z?h.find("body").append(I):b.after(I),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),I.remove(),b.off("keydown",u),h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,H.getOption("timezone")));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=new Date(a.datepickerOptions[b]):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){a.date=c;var d=a.date?l.filter(a.date,x):null;b.val(d),G.$setViewValue(d),y&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):(b=l.fromTimezone(d,H.getOption("timezone")),b.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),A&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;z||j.parsePlacement(d)[2]?(F=F||angular.element(j.scrollParent(b)),F&&F.on("scroll",v)):F=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,b,c){var d=null,e=c.createNew();this.isOnlyOpen=function(a,b){var c=e.get(b);if(c){var d=c.reduce(function(b,c){return c.scope===a?c:b},{});if(d)return 1===c.length}return!1},this.open=function(b,c,g){if(d||a.on("click",f),d&&d!==b&&(d.isOpen=!1),d=b,g){var h=e.get(g);if(h){var i=h.map(function(a){return a.scope});-1===i.indexOf(b)&&e.put(g,{scope:b})}else e.put(g,{scope:b})}},this.close=function(b,c,g){if(d===b&&(a.off("click",f),a.off("keydown",this.keybindFilter),d=null),g){var h=e.get(g);if(h){var i=h.reduce(function(a,c){return c.scope===b?c:a},{});i&&e.remove(g,i)}}};var f=function(a){if(d&&d.isOpen&&!(a&&"disabled"===d.getAutoClose()||a&&3===a.which)){var c=d.getToggleElement();if(!(a&&c&&c[0].contains(a.target))){var e=d.getDropdownElement();a&&"outsideClick"===d.getAutoClose()&&e&&e[0].contains(a.target)||(d.focusToggleElement(),d.isOpen=!1,b.$$phase||d.$apply())}}};this.keybindFilter=function(a){if(d){var b=d.getDropdownElement(),c=d.getToggleElement(),e=b&&b[0].contains(a.target),g=c&&c[0].contains(a.target);27===a.which?(a.stopPropagation(),d.focusToggleElement(),f()):d.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&d.isOpen&&(e||g)&&(a.preventDefault(),a.stopPropagation(),d.focusDropdownEntry(a.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){function l(){b.append(o.dropdownMenu)}var m,n,o=this,p=a.$new(),q=e.appendToOpenClass,r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=i.find("body");b.addClass("dropdown"),this.init=function(){c.isOpen&&(n=d(c.isOpen),s=n.assign,a.$watch(n,function(a){p.isOpen=!!a})),u=angular.isDefined(c.keyboardNav)},this.toggle=function(a){return p.isOpen=arguments.length?!!a:!p.isOpen,angular.isFunction(s)&&s(p,p.isOpen),p.isOpen},this.isOpen=function(){return p.isOpen},p.getToggleElement=function(){return o.toggleElement},p.getAutoClose=function(){return c.autoClose||"always"},p.getElement=function(){return b},p.isKeynavEnabled=function(){return u},p.focusDropdownEntry=function(a){var c=o.dropdownMenu?angular.element(o.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(o.selectedOption)?o.selectedOption=o.selectedOption===c.length-1?o.selectedOption:o.selectedOption+1:o.selectedOption=0;break;case 38:angular.isNumber(o.selectedOption)?o.selectedOption=0===o.selectedOption?0:o.selectedOption-1:o.selectedOption=c.length-1}c[o.selectedOption].focus()},p.getDropdownElement=function(){return o.dropdownMenu},p.focusToggleElement=function(){o.toggleElement&&o.toggleElement[0].focus()},p.$watch("isOpen",function(e,n){var u=null,w=!1;if(angular.isDefined(c.dropdownAppendTo)){var x=d(c.dropdownAppendTo)(p);x&&(u=angular.element(x))}if(angular.isDefined(c.dropdownAppendToBody)){var y=d(c.dropdownAppendToBody)(p);y!==!1&&(w=!0)}if(w&&!u&&(u=v),u&&o.dropdownMenu&&(e?(u.append(o.dropdownMenu),b.on("$destroy",l)):(b.off("$destroy",l),l())),u&&o.dropdownMenu){var z,A,B,C=h.positionElements(b,o.dropdownMenu,"bottom-left",!0),D=0;if(z={top:C.top+"px",display:e?"block":"none"},A=o.dropdownMenu.hasClass("dropdown-menu-right"),A?(z.left="auto",B=h.scrollbarPadding(u),B.heightOverflow&&B.scrollbarWidth&&(D=B.scrollbarWidth),z.right=window.innerWidth-D-(C.left+b.prop("offsetWidth"))+"px"):(z.left=C.left+"px",z.right="auto"),!w){var E=h.offset(u);z.top=C.top-E.top+"px",A?z.right=window.innerWidth-(C.left-E.left+b.prop("offsetWidth"))+"px":z.left=C.left-E.left+"px"}o.dropdownMenu.css(z)}var F=u?u:b,G=u?q:r,H=F.hasClass(G),I=f.isOnlyOpen(a,u);if(H===!e){var J;J=u?I?"removeClass":"addClass":e?"addClass":"removeClass",g[J](F,G).then(function(){angular.isDefined(e)&&e!==n&&t(a,{open:!!e})})}if(e)o.dropdownMenuTemplateUrl?k(o.dropdownMenuTemplateUrl).then(function(a){m=p.$new(),j(a.trim())(m,function(a){var b=a;o.dropdownMenu.replaceWith(b),o.dropdownMenu=b,i.on("keydown",f.keybindFilter)})}):i.on("keydown",f.keybindFilter),p.focusToggleElement(),f.open(p,b,u);else{if(f.close(p,b,u),o.dropdownMenuTemplateUrl){m&&m.$destroy();var K=angular.element('<ul class="dropdown-menu"></ul>');o.dropdownMenu.replaceWith(K),o.dropdownMenu=K}o.selectedOption=null}angular.isFunction(s)&&s(a,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.on("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.pop()},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{restrict:"A",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();e.$$postDigest(function(){h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(a){return{link:function(b,c,d,e,f){f(b.$parent,function(b){c.empty(),a.enter(b,c)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(a,b,c,d,e,f,g,h,i){function j(a){var b="-";return a.replace(E,function(a,c){return(c?b:"")+a.toLowerCase()})}function k(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function l(){for(var a=-1,b=x.keys(),c=0;c<b.length;c++)x.get(b[c]).value.backdrop&&(a=c);return a>-1&&A>a&&(a=A),a}function m(a,b){var c=x.get(a).value,d=c.appendTo;x.remove(a),B=x.top(),B&&(A=parseInt(B.value.modalDomEl.attr("index"),10)),p(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||w;y.remove(b,a);var e=y.hasKey(b);d.toggleClass(b,e),!e&&v&&v.heightOverflow&&v.scrollbarWidth&&(v.originalRight?d.css({paddingRight:v.originalRight+"px"}):d.css({paddingRight:""}),v=null),n(!0)},c.closedDeferred),o(),b&&b.focus?b.focus():d.focus&&d.focus()}function n(a){var b;x.length()>0&&(b=x.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function o(){if(t&&-1===l()){var a=u;p(t,u,function(){a=null}),t=void 0,u=void 0}}function p(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){d&&d(),b.remove(),e&&e.resolve()}),c.$destroy())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(z.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function q(a){if(a.isDefaultPrevented())return a;var b=x.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){z.dismiss(b.key,"escape key press")}));break;case 9:var c=z.loadFocusElementList(b),d=!1;a.shiftKey?(z.isFocusInFirstItem(a,c)||z.isModalFocused(a,b))&&(d=z.focusLastFocusableElement(c)):z.isFocusInLastItem(a,c)&&(d=z.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function r(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}function s(){Array.prototype.forEach.call(document.querySelectorAll("["+C+"]"),function(a){var b=parseInt(a.getAttribute(C),10),c=b-1;a.setAttribute(C,c),c||(a.removeAttribute(C),a.removeAttribute("aria-hidden"))})}var t,u,v,w="modal-open",x=h.createNew(),y=g.createNew(),z={NOW_CLOSING_EVENT:"modal.stack.now-closing"},A=0,B=null,C="data-bootstrap-modal-aria-hidden-count",D="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",E=/[A-Z]/g;return e.$watch(l,function(a){u&&(u.index=a)}),c.on("keydown",q),e.$on("$destroy",function(){c.off("keydown",q)}),z.open=function(b,f){function g(a){function b(a){var b=a.parent()?a.parent().children():[];return Array.prototype.filter.call(b,function(b){return b!==a[0]})}if(a&&"BODY"!==a[0].tagName)return b(a).forEach(function(a){var b="true"===a.getAttribute("aria-hidden"),c=parseInt(a.getAttribute(C),10);c||(c=b?1:0),a.setAttribute(C,c+1),a.setAttribute("aria-hidden","true")}),g(a.parent())}var h=c[0].activeElement,k=f.openedClass||w;n(!1),B=x.top(),x.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),y.put(k,b);var m=f.appendTo,o=l();o>=0&&!t&&(u=e.$new(!0),u.modalOptions=f,u.index=o,t=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),t.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),f.backdropClass&&t.addClass(f.backdropClass),f.animation&&t.attr("modal-animation","true"),d(t)(u),a.enter(t,m),i.isScrollable(m)&&(v=i.scrollbarPadding(m),v.heightOverflow&&v.scrollbarWidth&&m.css({paddingRight:v.right+"px"})));var p;f.component?(p=document.createElement(j(f.component.name)),p=angular.element(p),p.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):p=f.content,A=B?parseInt(B.value.modalDomEl.attr("index"),10)+1:0;var q=angular.element('<div uib-modal-window="modal-window"></div>');q.attr({"class":"modal","template-url":f.windowTemplateUrl,"window-top-class":f.windowTopClass,role:"dialog","aria-labelledby":f.ariaLabelledBy,"aria-describedby":f.ariaDescribedBy,size:f.size,index:A,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(p),f.windowClass&&q.addClass(f.windowClass),f.animation&&q.attr("modal-animation","true"),m.addClass(k),f.scope&&(f.scope.$$topModalIndex=A),a.enter(d(q)(f.scope),m),x.top().value.modalDomEl=q,x.top().value.modalOpener=h,g(q)},z.close=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),m(a,c.value.modalOpener),!0):!c},z.dismiss=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),m(a,c.value.modalOpener),!0):!c},z.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},z.getTop=function(){return x.top()},z.modalRendered=function(a){var b=x.get(a);b&&b.value.renderDeferred.resolve()},z.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},z.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},z.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},z.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},z.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},z.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(D);return c?Array.prototype.filter.call(c,function(a){return k(a)}):c}}},z}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return q}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!e.component&&!e.template&&!e.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var q;q=e.component?c.when(g.resolve(e.resolve,{},null,null)):c.all([i(e),g.resolve(e.resolve,{},null,null)]);var r;return r=k=c.all([k]).then(j,j).then(function(a){function c(b,c,d,e){b.$scope=g,b.$scope.$resolve={},d?b.$scope.$uibModalInstance=p:b.$uibModalInstance=p;var f=c?a[1]:a;angular.forEach(f,function(a,c){e&&(b[c]=a),b.$scope.$resolve[c]=a})}var d=e.scope||b,g=d.$new();g.$close=p.close,g.$dismiss=p.dismiss,g.$on("$destroy",function(){g.$$uibDestructionScheduled||g.$dismiss("$uibUnscheduledDestruction")});var i,j,k={scope:g,deferred:l,renderDeferred:o,closedDeferred:n,animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,ariaLabelledBy:e.ariaLabelledBy,ariaDescribedBy:e.ariaDescribedBy,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo},q={},r={};e.component?(c(q,!1,!0,!1),q.name=e.component,k.component=q):e.controller&&(c(r,!0,!1,!0),j=f(e.controller,r,!0,e.controllerAs),e.controllerAs&&e.bindToController&&(i=j.instance,i.$close=g.$close,i.$dismiss=g.$dismiss,angular.extend(i,{$resolve:r.$scope.$resolve},d)),i=j(),angular.isFunction(i.$onInit)&&i.$onInit()),e.component||(k.content=a[0]),h.open(p,k),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===r&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){
-b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},link:function(b,c,d,e){c.addClass("pager");var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,b.$set("role","menu"),d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},link:function(a,c,d,e){c.addClass("pagination");var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),b=null)}}var o=m.createNew();return h.on("keyup",n),k.$on("$destroy",function(){h.off("keyup",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup uib-title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'origin-scope="origScope" class="uib-position-measure '+k+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){P.isOpen?q():m()}function m(){O&&!a.$eval(d[k+"Enable"])||(u(),x(),P.popupDelay?H||(H=g(r,P.popupDelay,!1)):r())}function q(){s(),P.popupCloseDelay?I||(I=g(t,P.popupCloseDelay,!1)):t()}function r(){return s(),u(),P.content?(v(),void P.$evalAsync(function(){P.isOpen=!0,y(!0),U()})):angular.noop}function s(){H&&(g.cancel(H),H=null),J&&(g.cancel(J),J=null)}function t(){P&&P.$evalAsync(function(){P&&(P.isOpen=!1,y(!1),P.animation?G||(G=g(w,150,!1)):w())})}function u(){I&&(g.cancel(I),I=null),G&&(g.cancel(G),G=null)}function v(){E||(F=P.$new(),E=c(F,function(a){M?h.find("body").append(a):b.after(a)}),o.add(P,{close:t}),z())}function w(){s(),u(),A(),E&&(E.remove(),E=null,K&&g.cancel(K)),o.remove(P),F&&(F.$destroy(),F=null)}function x(){P.title=d[k+"Title"],S?P.content=S(a):P.content=d[e],P.popupClass=d[k+"Class"],P.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(P.placement);L=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);P.popupDelay=isNaN(c)?n.popupDelay:c,P.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){R&&angular.isFunction(R.assign)&&R.assign(a,b)}function z(){T.length=0,S?(T.push(a.$watch(S,function(a){P.content=a,!a&&P.isOpen&&t()})),T.push(F.$watch(function(){Q||(Q=!0,F.$$postDigest(function(){Q=!1,P&&P.isOpen&&U()}))}))):T.push(d.$observe(e,function(a){P.content=a,!a&&P.isOpen?t():U()})),T.push(d.$observe(k+"Title",function(a){P.title=a,P.isOpen&&U()})),T.push(d.$observe(k+"Placement",function(a){P.placement=a?a:n.placement,P.isOpen&&U()}))}function A(){T.length&&(angular.forEach(T,function(a){a()}),T.length=0)}function B(a){P&&P.isOpen&&E&&(b[0].contains(a.target)||E[0].contains(a.target)||q())}function C(a){27===a.which&&q()}function D(){var c=[],e=[],f=a.$eval(d[k+"Trigger"]);V(),angular.isObject(f)?(Object.keys(f).forEach(function(a){c.push(a),e.push(f[a])}),N={show:c,hide:e}):N=p(f),"none"!==N.show&&N.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===N.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(N.hide[c],q)),b.on("keypress",C)})}var E,F,G,H,I,J,K,L,M=angular.isDefined(n.appendToBody)?n.appendToBody:!1,N=p(void 0),O=angular.isDefined(d[k+"Enable"]),P=a.$new(!0),Q=!1,R=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,S=n.useContentExp?l(d[e]):!1,T=[],U=function(){E&&E.html()&&(J||(J=g(function(){var a=i.positionElements(b,E,P.placement,M),c=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),d=M?i.offset(b):i.position(b);E.css({top:a.top+"px",left:a.left+"px"});var e=a.placement.split("-");E.hasClass(e[0])||(E.removeClass(L.split("-")[0]),E.addClass(e[0])),E.hasClass(n.placementClassPrefix+a.placement)||(E.removeClass(n.placementClassPrefix+L),E.addClass(n.placementClassPrefix+a.placement)),K=g(function(){var a=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),b=i.adjustTop(e,d,c,a);b&&E.css(b),K=null},0,!1),E.hasClass("uib-position-measure")?(i.positionArrow(E,a.placement),E.removeClass("uib-position-measure")):L!==a.placement&&i.positionArrow(E,a.placement),L=a.placement,J=null},0,!1)))};P.origScope=a,P.isOpen=!1,P.contentExp=function(){return P.content},d.$observe("disabled",function(a){a&&s(),a&&P.isOpen&&t()}),R&&a.$watch(R,function(a){P&&!a===P.isOpen&&j()});var V=function(){N.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j)),b.off("keypress",C)}),N.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};D();var W=a.$eval(d[k+"Animation"]);P.animation=angular.isDefined(W)?!!W:n.animation;var X,Y=k+"AppendToBody";X=Y in d&&void 0===d[Y]?!0:a.$eval(d[Y]),M=angular.isDefined(X)?X:M,a.$on("$destroy",function(){V(),w(),P=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a,f){if(!e){var g=b(c),h=d.tabs[g];if(h){if(h.tab.onDeselect({$event:f,$selectedIndex:a}),f&&f.isDefaultPrevented())return;h.tab.active=!1}var i=d.tabs[a];i?(i.tab.onSelect({$event:f}),i.tab.active=!0,d.active=i.index,c=i.index):!i&&angular.isDefined(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isDefined(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){for(var b,c=0;c<d.tabs.length;c++)if(d.tabs[c].tab===a){b=c;break}if(d.tabs[b].index===d.active){var e=b===d.tabs.length-1?b-1:b+1%d.tabs.length;d.select(e)}d.tabs.splice(b,1)},a.$watch("tabset.active",function(a){angular.isDefined(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(a){if(!b.disabled){for(var c,d=0;d<e.tabs.length;d++)if(e.tabs[d].tab===b){c=d;break}e.select(c,a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===y[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),x.$setViewValue(new Date(v)),n(a)}function m(){s&&s.$setValidity("hours",!0),t&&t.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),x.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(x.$modelValue){var c=v.getHours(),d=v.getMinutes(),e=v.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!z),"m"!==b&&(a.minutes=k(d)),a.meridian=v.getHours()<12?y[0]:y[1],"s"!==b&&(a.seconds=k(e)),a.meridian=v.getHours()<12?y[0]:y[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=y[0]}function o(a){v=q(v,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s,t,u,v=new Date,w=[],x={$setViewValue:angular.noop},y=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,z=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){x=b,x.$render=this.render,x.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2);s=e.controller("ngModel"),t=f.controller("ngModel"),u=h.controller("ngModel");var i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var A=g.hourStep;c.hourStep&&w.push(a.$parent.$watch(d(c.hourStep),function(a){A=+a}));var B=g.minuteStep;c.minuteStep&&w.push(a.$parent.$watch(d(c.minuteStep),function(a){B=+a}));var C;w.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);C=isNaN(b)?void 0:b}));var D;w.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);D=isNaN(b)?void 0:b}));var E=!1;c.ngDisabled&&w.push(a.$parent.$watch(d(c.ngDisabled),function(a){E=a})),a.noIncrementHours=function(){var a=p(v,60*A);return E||a>D||v>a&&C>a},a.noDecrementHours=function(){var a=p(v,60*-A);return E||C>a||a>v&&a>D},a.noIncrementMinutes=function(){var a=p(v,B);return E||a>D||v>a&&C>a},a.noDecrementMinutes=function(){var a=p(v,-B);return E||C>a||a>v&&a>D},a.noIncrementSeconds=function(){var a=q(v,F);return E||a>D||v>a&&C>a},a.noDecrementSeconds=function(){var a=q(v,-F);return E||C>a||a>v&&a>D},a.noToggleMeridian=function(){return v.getHours()<12?E||p(v,720)>D:E||p(v,-720)<C};var F=g.secondStep;c.secondStep&&w.push(a.$parent.$watch(d(c.secondStep),function(a){F=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&w.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&w.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,x.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(v.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){x.$setViewValue(null),x.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b,s&&s.$setValidity("hours",!1)),angular.isDefined(c)&&(a.invalidMinutes=c,t&&t.$setValidity("minutes",!1)),angular.isDefined(d)&&(a.invalidSeconds=d,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var a=h(),b=i();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(a),v.setMinutes(b),C>v||v>D?e(!0):l("h")):e(!0)},b.on("blur",function(b){x.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!z)})}),a.updateMinutes=function(){var a=i(),b=h();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(b),v.setMinutes(a),C>v||v>D?e(void 0,!0):l("m")):e(void 0,!0)},c.on("blur",function(b){x.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();x.$setDirty(),angular.isDefined(a)?(v.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.on("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=x.$viewValue;isNaN(b)?(x.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(v=b),C>v||v>D?(x.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*A*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-A*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*B)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-B)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(F)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-F)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(v.getHours()<12?60:-60)):a.meridian=a.meridian===y[0]?y[1]:y[0])},a.blur=function(){x.$setTouched()},a.$on("$destroy",function(){for(;w.length;)w.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){P.moveInProgress||(P.moveInProgress=!0,P.$digest()),$()}function o(){P.position=F?l.offset(b):l.position(b),P.position.top+=b.prop("offsetHeight")}function p(a){var b;return angular.version.minor<6?(b=a.$options||{},b.getOption=function(a){return b[a]}):b=a.$options,b}var q,r,s=[9,13,27,38,40],t=200,u=a.$eval(c.typeaheadMinLength);u||0===u||(u=1),a.$watch(c.typeaheadMinLength,function(a){u=a||0===a?a:1});var v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){w=a!==!1});var x,y,z=e(c.typeaheadLoading).assign||angular.noop,A=c.typeaheadShouldSelect?e(c.typeaheadShouldSelect):function(a,b){var c=b.$event;return 13===c.which||9===c.which},B=e(c.typeaheadOnSelect),C=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,D=e(c.typeaheadNoResults).assign||angular.noop,E=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,F=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,G=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,H=a.$eval(c.typeaheadFocusFirst)!==!1,I=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,J=e(c.typeaheadIsOpen).assign||angular.noop,K=a.$eval(c.typeaheadShowHint)||!1,L=e(c.ngModel),M=e(c.ngModel+"($$$p)"),N=function(b,c){return angular.isFunction(L(a))&&r.getOption("getterSetter")?M(b,{$$$p:c}):L.assign(b,c)},O=m.parse(c.uibTypeahead),P=a.$new(),Q=a.$on("$destroy",function(){P.$destroy()});P.$on("$destroy",Q);var R="typeahead-"+P.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":R});var S,T;K&&(S=angular.element("<div></div>"),S.css("position","relative"),b.after(S),T=b.clone(),T.attr("placeholder",""),T.attr("tabindex","-1"),T.val(""),T.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),T.attr("id")&&T.removeAttr("id"),S.append(T),T.after(b));var U=angular.element("<div uib-typeahead-popup></div>");U.attr({id:R,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&U.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&U.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var V=function(){K&&T.val("")},W=function(){P.matches=[],P.activeIdx=-1,b.attr("aria-expanded",!1),V()},X=function(a){return R+"-option-"+a};P.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",X(a))});var Y=function(a,b){return P.matches.length>b&&a?a.toUpperCase()===P.matches[b].label.toUpperCase():!1},Z=function(c,d){var e={$viewValue:c};z(a,!0),D(a,!1),f.when(O.source(a,e)).then(function(f){var g=c===q.$viewValue;if(g&&x)if(f&&f.length>0){P.activeIdx=H?0:-1,D(a,!1),P.matches.length=0;for(var h=0;h<f.length;h++)e[O.itemName]=f[h],P.matches.push({id:X(h),label:O.viewMapper(P,e),model:f[h]});if(P.query=c,o(),b.attr("aria-expanded",!0),I&&1===P.matches.length&&Y(c,0)&&(angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(0,d)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(0,d)),K){var i=P.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?T.val(c+i.slice(c.length)):T.val("")}}else W(),D(a,!0);g&&z(a,!1)},function(){W(),z(a,!1),D(a,!0)})};F&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var $=k(function(){P.matches.length&&o(),P.moveInProgress=!1},t);P.moveInProgress=!1,P.query=void 0;var _,aa=function(a){_=g(function(){Z(a)},v)},ba=function(){_&&g.cancel(_)};W(),P.assignIsOpen=function(b){J(a,b)},P.select=function(d,e){var f,h,i={};y=!0,i[O.itemName]=h=P.matches[d].model,f=O.modelMapper(a,i),N(a,f),q.$setValidity("editable",!0),q.$setValidity("parse",!0),B(a,{$item:h,$model:f,$label:O.viewMapper(a,i),$event:e}),W(),P.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==P.matches.length&&-1!==s.indexOf(b.which)){var c=A(a,{$event:b});if(-1===P.activeIdx&&c||9===b.which&&b.shiftKey)return W(),void P.$digest();b.preventDefault();var d;switch(b.which){case 27:b.stopPropagation(),W(),a.$digest();break;case 38:P.activeIdx=(P.activeIdx>0?P.activeIdx:P.matches.length)-1,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;case 40:P.activeIdx=(P.activeIdx+1)%P.matches.length,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],
-d.parentNode.scrollTop=d.offsetTop;break;default:c&&P.$apply(function(){angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(P.activeIdx,b)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(P.activeIdx,b)})}}}),b.on("focus",function(a){x=!0,0!==u||q.$viewValue||g(function(){Z(q.$viewValue,a)},0)}),b.on("blur",function(a){C&&P.matches.length&&-1!==P.activeIdx&&!y&&(y=!0,P.$apply(function(){angular.isObject(P.debounceUpdate)&&angular.isNumber(P.debounceUpdate.blur)?k(function(){P.select(P.activeIdx,a)},P.debounceUpdate.blur):P.select(P.activeIdx,a)})),!w&&q.$error.editable&&(q.$setViewValue(),P.$apply(function(){q.$setValidity("editable",!0),q.$setValidity("parse",!0)}),b.val("")),x=!1,y=!1});var ca=function(c){b[0]!==c.target&&3!==c.which&&0!==P.matches.length&&(W(),j.$$phase||a.$digest())};h.on("click",ca),a.$on("$destroy",function(){h.off("click",ca),(F||G)&&da.remove(),F&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),U.remove(),K&&S.remove()});var da=d(U)(P);F?h.find("body").append(da):G?angular.element(G).eq(0).append(da):b.after(da),this.init=function(b){q=b,r=p(q),P.debounceUpdate=e(r.getOption("debounce"))(a),q.$parsers.unshift(function(b){return x=!0,0===u||b&&b.length>=u?v>0?(ba(),aa(b)):Z(b):(z(a,!1),ba(),W()),w?b:b?void q.$setValidity("editable",!1):(q.$setValidity("editable",!0),null)}),q.$formatters.push(function(b){var c,d,e={};return w||q.$setValidity("editable",!0),E?(e.$model=b,E(a,e)):(e[O.itemName]=b,c=O.viewMapper(a,e),e[O.itemName]=void 0,d=O.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(a,b,c,d){d[1].init(d[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index" role="row">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepickerPopup/popup.html",'<ul role="presentation" class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li role="menuitem" ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.js
deleted file mode 100644
index 8bcf397b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.js
+++ /dev/null
@@ -1,7412 +0,0 @@
-/*
- * angular-ui-bootstrap
- * http://angular-ui.github.io/bootstrap/
-
- * Version: 2.5.0 - 2017-01-28
- * License: MIT
- */angular.module("ui.bootstrap", ["ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]);
-angular.module('ui.bootstrap.collapse', [])
-
- .directive('uibCollapse', ['$animate', '$q', '$parse', '$injector', function($animate, $q, $parse, $injector) {
- var $animateCss = $injector.has('$animateCss') ? $injector.get('$animateCss') : null;
- return {
- link: function(scope, element, attrs) {
- var expandingExpr = $parse(attrs.expanding),
- expandedExpr = $parse(attrs.expanded),
- collapsingExpr = $parse(attrs.collapsing),
- collapsedExpr = $parse(attrs.collapsed),
- horizontal = false,
- css = {},
- cssTo = {};
-
- init();
-
- function init() {
- horizontal = !!('horizontal' in attrs);
- if (horizontal) {
- css = {
- width: ''
- };
- cssTo = {width: '0'};
- } else {
- css = {
- height: ''
- };
- cssTo = {height: '0'};
- }
- if (!scope.$eval(attrs.uibCollapse)) {
- element.addClass('in')
- .addClass('collapse')
- .attr('aria-expanded', true)
- .attr('aria-hidden', false)
- .css(css);
- }
- }
-
- function getScrollFromElement(element) {
- if (horizontal) {
- return {width: element.scrollWidth + 'px'};
- }
- return {height: element.scrollHeight + 'px'};
- }
-
- function expand() {
- if (element.hasClass('collapse') && element.hasClass('in')) {
- return;
- }
-
- $q.resolve(expandingExpr(scope))
- .then(function() {
- element.removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', true)
- .attr('aria-hidden', false);
-
- if ($animateCss) {
- $animateCss(element, {
- addClass: 'in',
- easing: 'ease',
- css: {
- overflow: 'hidden'
- },
- to: getScrollFromElement(element[0])
- }).start()['finally'](expandDone);
- } else {
- $animate.addClass(element, 'in', {
- css: {
- overflow: 'hidden'
- },
- to: getScrollFromElement(element[0])
- }).then(expandDone);
- }
- }, angular.noop);
- }
-
- function expandDone() {
- element.removeClass('collapsing')
- .addClass('collapse')
- .css(css);
- expandedExpr(scope);
- }
-
- function collapse() {
- if (!element.hasClass('collapse') && !element.hasClass('in')) {
- return collapseDone();
- }
-
- $q.resolve(collapsingExpr(scope))
- .then(function() {
- element
- // IMPORTANT: The width must be set before adding "collapsing" class.
- // Otherwise, the browser attempts to animate from width 0 (in
- // collapsing class) to the given width here.
- .css(getScrollFromElement(element[0]))
- // initially all panel collapse have the collapse class, this removal
- // prevents the animation from jumping to collapsed state
- .removeClass('collapse')
- .addClass('collapsing')
- .attr('aria-expanded', false)
- .attr('aria-hidden', true);
-
- if ($animateCss) {
- $animateCss(element, {
- removeClass: 'in',
- to: cssTo
- }).start()['finally'](collapseDone);
- } else {
- $animate.removeClass(element, 'in', {
- to: cssTo
- }).then(collapseDone);
- }
- }, angular.noop);
- }
-
- function collapseDone() {
- element.css(cssTo); // Required so that collapse works when animation is disabled
- element.removeClass('collapsing')
- .addClass('collapse');
- collapsedExpr(scope);
- }
-
- scope.$watch(attrs.uibCollapse, function(shouldCollapse) {
- if (shouldCollapse) {
- collapse();
- } else {
- expand();
- }
- });
- }
- };
- }]);
-
-angular.module('ui.bootstrap.tabindex', [])
-
-.directive('uibTabindexToggle', function() {
- return {
- restrict: 'A',
- link: function(scope, elem, attrs) {
- attrs.$observe('disabled', function(disabled) {
- attrs.$set('tabindex', disabled ? -1 : null);
- });
- }
- };
-});
-
-angular.module('ui.bootstrap.accordion', ['ui.bootstrap.collapse', 'ui.bootstrap.tabindex'])
-
-.constant('uibAccordionConfig', {
- closeOthers: true
-})
-
-.controller('UibAccordionController', ['$scope', '$attrs', 'uibAccordionConfig', function($scope, $attrs, accordionConfig) {
- // This array keeps track of the accordion groups
- this.groups = [];
-
- // Ensure that all the groups in this accordion are closed, unless close-others explicitly says not to
- this.closeOthers = function(openGroup) {
- var closeOthers = angular.isDefined($attrs.closeOthers) ?
- $scope.$eval($attrs.closeOthers) : accordionConfig.closeOthers;
- if (closeOthers) {
- angular.forEach(this.groups, function(group) {
- if (group !== openGroup) {
- group.isOpen = false;
- }
- });
- }
- };
-
- // This is called from the accordion-group directive to add itself to the accordion
- this.addGroup = function(groupScope) {
- var that = this;
- this.groups.push(groupScope);
-
- groupScope.$on('$destroy', function(event) {
- that.removeGroup(groupScope);
- });
- };
-
- // This is called from the accordion-group directive when to remove itself
- this.removeGroup = function(group) {
- var index = this.groups.indexOf(group);
- if (index !== -1) {
- this.groups.splice(index, 1);
- }
- };
-}])
-
-// The accordion directive simply sets up the directive controller
-// and adds an accordion CSS class to itself element.
-.directive('uibAccordion', function() {
- return {
- controller: 'UibAccordionController',
- controllerAs: 'accordion',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/accordion/accordion.html';
- }
- };
-})
-
-// The accordion-group directive indicates a block of html that will expand and collapse in an accordion
-.directive('uibAccordionGroup', function() {
- return {
- require: '^uibAccordion', // We need this directive to be inside an accordion
- transclude: true, // It transcludes the contents of the directive into the template
- restrict: 'A',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/accordion/accordion-group.html';
- },
- scope: {
- heading: '@', // Interpolate the heading attribute onto this scope
- panelClass: '@?', // Ditto with panelClass
- isOpen: '=?',
- isDisabled: '=?'
- },
- controller: function() {
- this.setHeading = function(element) {
- this.heading = element;
- };
- },
- link: function(scope, element, attrs, accordionCtrl) {
- element.addClass('panel');
- accordionCtrl.addGroup(scope);
-
- scope.openClass = attrs.openClass || 'panel-open';
- scope.panelClass = attrs.panelClass || 'panel-default';
- scope.$watch('isOpen', function(value) {
- element.toggleClass(scope.openClass, !!value);
- if (value) {
- accordionCtrl.closeOthers(scope);
- }
- });
-
- scope.toggleOpen = function($event) {
- if (!scope.isDisabled) {
- if (!$event || $event.which === 32) {
- scope.isOpen = !scope.isOpen;
- }
- }
- };
-
- var id = 'accordiongroup-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
- scope.headingId = id + '-tab';
- scope.panelId = id + '-panel';
- }
- };
-})
-
-// Use accordion-heading below an accordion-group to provide a heading containing HTML
-.directive('uibAccordionHeading', function() {
- return {
- transclude: true, // Grab the contents to be used as the heading
- template: '', // In effect remove this element!
- replace: true,
- require: '^uibAccordionGroup',
- link: function(scope, element, attrs, accordionGroupCtrl, transclude) {
- // Pass the heading to the accordion-group controller
- // so that it can be transcluded into the right place in the template
- // [The second parameter to transclude causes the elements to be cloned so that they work in ng-repeat]
- accordionGroupCtrl.setHeading(transclude(scope, angular.noop));
- }
- };
-})
-
-// Use in the accordion-group template to indicate where you want the heading to be transcluded
-// You must provide the property on the accordion-group controller that will hold the transcluded element
-.directive('uibAccordionTransclude', function() {
- return {
- require: '^uibAccordionGroup',
- link: function(scope, element, attrs, controller) {
- scope.$watch(function() { return controller[attrs.uibAccordionTransclude]; }, function(heading) {
- if (heading) {
- var elem = angular.element(element[0].querySelector(getHeaderSelectors()));
- elem.html('');
- elem.append(heading);
- }
- });
- }
- };
-
- function getHeaderSelectors() {
- return 'uib-accordion-header,' +
- 'data-uib-accordion-header,' +
- 'x-uib-accordion-header,' +
- 'uib\\:accordion-header,' +
- '[uib-accordion-header],' +
- '[data-uib-accordion-header],' +
- '[x-uib-accordion-header]';
- }
-});
-
-angular.module('ui.bootstrap.alert', [])
-
-.controller('UibAlertController', ['$scope', '$element', '$attrs', '$interpolate', '$timeout', function($scope, $element, $attrs, $interpolate, $timeout) {
- $scope.closeable = !!$attrs.close;
- $element.addClass('alert');
- $attrs.$set('role', 'alert');
- if ($scope.closeable) {
- $element.addClass('alert-dismissible');
- }
-
- var dismissOnTimeout = angular.isDefined($attrs.dismissOnTimeout) ?
- $interpolate($attrs.dismissOnTimeout)($scope.$parent) : null;
-
- if (dismissOnTimeout) {
- $timeout(function() {
- $scope.close();
- }, parseInt(dismissOnTimeout, 10));
- }
-}])
-
-.directive('uibAlert', function() {
- return {
- controller: 'UibAlertController',
- controllerAs: 'alert',
- restrict: 'A',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/alert/alert.html';
- },
- transclude: true,
- scope: {
- close: '&'
- }
- };
-});
-
-angular.module('ui.bootstrap.buttons', [])
-
-.constant('uibButtonConfig', {
- activeClass: 'active',
- toggleEvent: 'click'
-})
-
-.controller('UibButtonsController', ['uibButtonConfig', function(buttonConfig) {
- this.activeClass = buttonConfig.activeClass || 'active';
- this.toggleEvent = buttonConfig.toggleEvent || 'click';
-}])
-
-.directive('uibBtnRadio', ['$parse', function($parse) {
- return {
- require: ['uibBtnRadio', 'ngModel'],
- controller: 'UibButtonsController',
- controllerAs: 'buttons',
- link: function(scope, element, attrs, ctrls) {
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
- var uncheckableExpr = $parse(attrs.uibUncheckable);
-
- element.find('input').css({display: 'none'});
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.uibBtnRadio)));
- };
-
- //ui->model
- element.on(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- var isActive = element.hasClass(buttonsCtrl.activeClass);
-
- if (!isActive || angular.isDefined(attrs.uncheckable)) {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(isActive ? null : scope.$eval(attrs.uibBtnRadio));
- ngModelCtrl.$render();
- });
- }
- });
-
- if (attrs.uibUncheckable) {
- scope.$watch(uncheckableExpr, function(uncheckable) {
- attrs.$set('uncheckable', uncheckable ? '' : undefined);
- });
- }
- }
- };
-}])
-
-.directive('uibBtnCheckbox', function() {
- return {
- require: ['uibBtnCheckbox', 'ngModel'],
- controller: 'UibButtonsController',
- controllerAs: 'button',
- link: function(scope, element, attrs, ctrls) {
- var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- element.find('input').css({display: 'none'});
-
- function getTrueValue() {
- return getCheckboxValue(attrs.btnCheckboxTrue, true);
- }
-
- function getFalseValue() {
- return getCheckboxValue(attrs.btnCheckboxFalse, false);
- }
-
- function getCheckboxValue(attribute, defaultValue) {
- return angular.isDefined(attribute) ? scope.$eval(attribute) : defaultValue;
- }
-
- //model -> UI
- ngModelCtrl.$render = function() {
- element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, getTrueValue()));
- };
-
- //ui->model
- element.on(buttonsCtrl.toggleEvent, function() {
- if (attrs.disabled) {
- return;
- }
-
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(element.hasClass(buttonsCtrl.activeClass) ? getFalseValue() : getTrueValue());
- ngModelCtrl.$render();
- });
- });
- }
- };
-});
-
-angular.module('ui.bootstrap.carousel', [])
-
-.controller('UibCarouselController', ['$scope', '$element', '$interval', '$timeout', '$animate', function($scope, $element, $interval, $timeout, $animate) {
- var self = this,
- slides = self.slides = $scope.slides = [],
- SLIDE_DIRECTION = 'uib-slideDirection',
- currentIndex = $scope.active,
- currentInterval, isPlaying;
-
- var destroyed = false;
- $element.addClass('carousel');
-
- self.addSlide = function(slide, element) {
- slides.push({
- slide: slide,
- element: element
- });
- slides.sort(function(a, b) {
- return +a.slide.index - +b.slide.index;
- });
- //if this is the first slide or the slide is set to active, select it
- if (slide.index === $scope.active || slides.length === 1 && !angular.isNumber($scope.active)) {
- if ($scope.$currentTransition) {
- $scope.$currentTransition = null;
- }
-
- currentIndex = slide.index;
- $scope.active = slide.index;
- setActive(currentIndex);
- self.select(slides[findSlideIndex(slide)]);
- if (slides.length === 1) {
- $scope.play();
- }
- }
- };
-
- self.getCurrentIndex = function() {
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].slide.index === currentIndex) {
- return i;
- }
- }
- };
-
- self.next = $scope.next = function() {
- var newIndex = (self.getCurrentIndex() + 1) % slides.length;
-
- if (newIndex === 0 && $scope.noWrap()) {
- $scope.pause();
- return;
- }
-
- return self.select(slides[newIndex], 'next');
- };
-
- self.prev = $scope.prev = function() {
- var newIndex = self.getCurrentIndex() - 1 < 0 ? slides.length - 1 : self.getCurrentIndex() - 1;
-
- if ($scope.noWrap() && newIndex === slides.length - 1) {
- $scope.pause();
- return;
- }
-
- return self.select(slides[newIndex], 'prev');
- };
-
- self.removeSlide = function(slide) {
- var index = findSlideIndex(slide);
-
- //get the index of the slide inside the carousel
- slides.splice(index, 1);
- if (slides.length > 0 && currentIndex === index) {
- if (index >= slides.length) {
- currentIndex = slides.length - 1;
- $scope.active = currentIndex;
- setActive(currentIndex);
- self.select(slides[slides.length - 1]);
- } else {
- currentIndex = index;
- $scope.active = currentIndex;
- setActive(currentIndex);
- self.select(slides[index]);
- }
- } else if (currentIndex > index) {
- currentIndex--;
- $scope.active = currentIndex;
- }
-
- //clean the active value when no more slide
- if (slides.length === 0) {
- currentIndex = null;
- $scope.active = null;
- }
- };
-
- /* direction: "prev" or "next" */
- self.select = $scope.select = function(nextSlide, direction) {
- var nextIndex = findSlideIndex(nextSlide.slide);
- //Decide direction if it's not given
- if (direction === undefined) {
- direction = nextIndex > self.getCurrentIndex() ? 'next' : 'prev';
- }
- //Prevent this user-triggered transition from occurring if there is already one in progress
- if (nextSlide.slide.index !== currentIndex &&
- !$scope.$currentTransition) {
- goNext(nextSlide.slide, nextIndex, direction);
- }
- };
-
- /* Allow outside people to call indexOf on slides array */
- $scope.indexOfSlide = function(slide) {
- return +slide.slide.index;
- };
-
- $scope.isActive = function(slide) {
- return $scope.active === slide.slide.index;
- };
-
- $scope.isPrevDisabled = function() {
- return $scope.active === 0 && $scope.noWrap();
- };
-
- $scope.isNextDisabled = function() {
- return $scope.active === slides.length - 1 && $scope.noWrap();
- };
-
- $scope.pause = function() {
- if (!$scope.noPause) {
- isPlaying = false;
- resetTimer();
- }
- };
-
- $scope.play = function() {
- if (!isPlaying) {
- isPlaying = true;
- restartTimer();
- }
- };
-
- $element.on('mouseenter', $scope.pause);
- $element.on('mouseleave', $scope.play);
-
- $scope.$on('$destroy', function() {
- destroyed = true;
- resetTimer();
- });
-
- $scope.$watch('noTransition', function(noTransition) {
- $animate.enabled($element, !noTransition);
- });
-
- $scope.$watch('interval', restartTimer);
-
- $scope.$watchCollection('slides', resetTransition);
-
- $scope.$watch('active', function(index) {
- if (angular.isNumber(index) && currentIndex !== index) {
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].slide.index === index) {
- index = i;
- break;
- }
- }
-
- var slide = slides[index];
- if (slide) {
- setActive(index);
- self.select(slides[index]);
- currentIndex = index;
- }
- }
- });
-
- function getSlideByIndex(index) {
- for (var i = 0, l = slides.length; i < l; ++i) {
- if (slides[i].index === index) {
- return slides[i];
- }
- }
- }
-
- function setActive(index) {
- for (var i = 0; i < slides.length; i++) {
- slides[i].slide.active = i === index;
- }
- }
-
- function goNext(slide, index, direction) {
- if (destroyed) {
- return;
- }
-
- angular.extend(slide, {direction: direction});
- angular.extend(slides[currentIndex].slide || {}, {direction: direction});
- if ($animate.enabled($element) && !$scope.$currentTransition &&
- slides[index].element && self.slides.length > 1) {
- slides[index].element.data(SLIDE_DIRECTION, slide.direction);
- var currentIdx = self.getCurrentIndex();
-
- if (angular.isNumber(currentIdx) && slides[currentIdx].element) {
- slides[currentIdx].element.data(SLIDE_DIRECTION, slide.direction);
- }
-
- $scope.$currentTransition = true;
- $animate.on('addClass', slides[index].element, function(element, phase) {
- if (phase === 'close') {
- $scope.$currentTransition = null;
- $animate.off('addClass', element);
- }
- });
- }
-
- $scope.active = slide.index;
- currentIndex = slide.index;
- setActive(index);
-
- //every time you change slides, reset the timer
- restartTimer();
- }
-
- function findSlideIndex(slide) {
- for (var i = 0; i < slides.length; i++) {
- if (slides[i].slide === slide) {
- return i;
- }
- }
- }
-
- function resetTimer() {
- if (currentInterval) {
- $interval.cancel(currentInterval);
- currentInterval = null;
- }
- }
-
- function resetTransition(slides) {
- if (!slides.length) {
- $scope.$currentTransition = null;
- }
- }
-
- function restartTimer() {
- resetTimer();
- var interval = +$scope.interval;
- if (!isNaN(interval) && interval > 0) {
- currentInterval = $interval(timerFn, interval);
- }
- }
-
- function timerFn() {
- var interval = +$scope.interval;
- if (isPlaying && !isNaN(interval) && interval > 0 && slides.length) {
- $scope.next();
- } else {
- $scope.pause();
- }
- }
-}])
-
-.directive('uibCarousel', function() {
- return {
- transclude: true,
- controller: 'UibCarouselController',
- controllerAs: 'carousel',
- restrict: 'A',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/carousel/carousel.html';
- },
- scope: {
- active: '=',
- interval: '=',
- noTransition: '=',
- noPause: '=',
- noWrap: '&'
- }
- };
-})
-
-.directive('uibSlide', ['$animate', function($animate) {
- return {
- require: '^uibCarousel',
- restrict: 'A',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/carousel/slide.html';
- },
- scope: {
- actual: '=?',
- index: '=?'
- },
- link: function (scope, element, attrs, carouselCtrl) {
- element.addClass('item');
- carouselCtrl.addSlide(scope, element);
- //when the scope is destroyed then remove the slide from the current slides array
- scope.$on('$destroy', function() {
- carouselCtrl.removeSlide(scope);
- });
-
- scope.$watch('active', function(active) {
- $animate[active ? 'addClass' : 'removeClass'](element, 'active');
- });
- }
- };
-}])
-
-.animation('.item', ['$animateCss',
-function($animateCss) {
- var SLIDE_DIRECTION = 'uib-slideDirection';
-
- function removeClass(element, className, callback) {
- element.removeClass(className);
- if (callback) {
- callback();
- }
- }
-
- return {
- beforeAddClass: function(element, className, done) {
- if (className === 'active') {
- var stopped = false;
- var direction = element.data(SLIDE_DIRECTION);
- var directionClass = direction === 'next' ? 'left' : 'right';
- var removeClassFn = removeClass.bind(this, element,
- directionClass + ' ' + direction, done);
- element.addClass(direction);
-
- $animateCss(element, {addClass: directionClass})
- .start()
- .done(removeClassFn);
-
- return function() {
- stopped = true;
- };
- }
- done();
- },
- beforeRemoveClass: function (element, className, done) {
- if (className === 'active') {
- var stopped = false;
- var direction = element.data(SLIDE_DIRECTION);
- var directionClass = direction === 'next' ? 'left' : 'right';
- var removeClassFn = removeClass.bind(this, element, directionClass, done);
-
- $animateCss(element, {addClass: directionClass})
- .start()
- .done(removeClassFn);
-
- return function() {
- stopped = true;
- };
- }
- done();
- }
- };
-}]);
-
-angular.module('ui.bootstrap.dateparser', [])
-
-.service('uibDateParser', ['$log', '$locale', 'dateFilter', 'orderByFilter', 'filterFilter', function($log, $locale, dateFilter, orderByFilter, filterFilter) {
- // Pulled from https://github.com/mbostock/d3/blob/master/src/format/requote.js
- var SPECIAL_CHARACTERS_REGEXP = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
-
- var localeId;
- var formatCodeToRegex;
-
- this.init = function() {
- localeId = $locale.id;
-
- this.parsers = {};
- this.formatters = {};
-
- formatCodeToRegex = [
- {
- key: 'yyyy',
- regex: '\\d{4}',
- apply: function(value) { this.year = +value; },
- formatter: function(date) {
- var _date = new Date();
- _date.setFullYear(Math.abs(date.getFullYear()));
- return dateFilter(_date, 'yyyy');
- }
- },
- {
- key: 'yy',
- regex: '\\d{2}',
- apply: function(value) { value = +value; this.year = value < 69 ? value + 2000 : value + 1900; },
- formatter: function(date) {
- var _date = new Date();
- _date.setFullYear(Math.abs(date.getFullYear()));
- return dateFilter(_date, 'yy');
- }
- },
- {
- key: 'y',
- regex: '\\d{1,4}',
- apply: function(value) { this.year = +value; },
- formatter: function(date) {
- var _date = new Date();
- _date.setFullYear(Math.abs(date.getFullYear()));
- return dateFilter(_date, 'y');
- }
- },
- {
- key: 'M!',
- regex: '0?[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; },
- formatter: function(date) {
- var value = date.getMonth();
- if (/^[0-9]$/.test(value)) {
- return dateFilter(date, 'MM');
- }
-
- return dateFilter(date, 'M');
- }
- },
- {
- key: 'MMMM',
- regex: $locale.DATETIME_FORMATS.MONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.MONTH.indexOf(value); },
- formatter: function(date) { return dateFilter(date, 'MMMM'); }
- },
- {
- key: 'MMM',
- regex: $locale.DATETIME_FORMATS.SHORTMONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value); },
- formatter: function(date) { return dateFilter(date, 'MMM'); }
- },
- {
- key: 'MM',
- regex: '0[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; },
- formatter: function(date) { return dateFilter(date, 'MM'); }
- },
- {
- key: 'M',
- regex: '[1-9]|1[0-2]',
- apply: function(value) { this.month = value - 1; },
- formatter: function(date) { return dateFilter(date, 'M'); }
- },
- {
- key: 'd!',
- regex: '[0-2]?[0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; },
- formatter: function(date) {
- var value = date.getDate();
- if (/^[1-9]$/.test(value)) {
- return dateFilter(date, 'dd');
- }
-
- return dateFilter(date, 'd');
- }
- },
- {
- key: 'dd',
- regex: '[0-2][0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; },
- formatter: function(date) { return dateFilter(date, 'dd'); }
- },
- {
- key: 'd',
- regex: '[1-2]?[0-9]{1}|3[0-1]{1}',
- apply: function(value) { this.date = +value; },
- formatter: function(date) { return dateFilter(date, 'd'); }
- },
- {
- key: 'EEEE',
- regex: $locale.DATETIME_FORMATS.DAY.join('|'),
- formatter: function(date) { return dateFilter(date, 'EEEE'); }
- },
- {
- key: 'EEE',
- regex: $locale.DATETIME_FORMATS.SHORTDAY.join('|'),
- formatter: function(date) { return dateFilter(date, 'EEE'); }
- },
- {
- key: 'HH',
- regex: '(?:0|1)[0-9]|2[0-3]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'HH'); }
- },
- {
- key: 'hh',
- regex: '0[0-9]|1[0-2]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'hh'); }
- },
- {
- key: 'H',
- regex: '1?[0-9]|2[0-3]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'H'); }
- },
- {
- key: 'h',
- regex: '[0-9]|1[0-2]',
- apply: function(value) { this.hours = +value; },
- formatter: function(date) { return dateFilter(date, 'h'); }
- },
- {
- key: 'mm',
- regex: '[0-5][0-9]',
- apply: function(value) { this.minutes = +value; },
- formatter: function(date) { return dateFilter(date, 'mm'); }
- },
- {
- key: 'm',
- regex: '[0-9]|[1-5][0-9]',
- apply: function(value) { this.minutes = +value; },
- formatter: function(date) { return dateFilter(date, 'm'); }
- },
- {
- key: 'sss',
- regex: '[0-9][0-9][0-9]',
- apply: function(value) { this.milliseconds = +value; },
- formatter: function(date) { return dateFilter(date, 'sss'); }
- },
- {
- key: 'ss',
- regex: '[0-5][0-9]',
- apply: function(value) { this.seconds = +value; },
- formatter: function(date) { return dateFilter(date, 'ss'); }
- },
- {
- key: 's',
- regex: '[0-9]|[1-5][0-9]',
- apply: function(value) { this.seconds = +value; },
- formatter: function(date) { return dateFilter(date, 's'); }
- },
- {
- key: 'a',
- regex: $locale.DATETIME_FORMATS.AMPMS.join('|'),
- apply: function(value) {
- if (this.hours === 12) {
- this.hours = 0;
- }
-
- if (value === 'PM') {
- this.hours += 12;
- }
- },
- formatter: function(date) { return dateFilter(date, 'a'); }
- },
- {
- key: 'Z',
- regex: '[+-]\\d{4}',
- apply: function(value) {
- var matches = value.match(/([+-])(\d{2})(\d{2})/),
- sign = matches[1],
- hours = matches[2],
- minutes = matches[3];
- this.hours += toInt(sign + hours);
- this.minutes += toInt(sign + minutes);
- },
- formatter: function(date) {
- return dateFilter(date, 'Z');
- }
- },
- {
- key: 'ww',
- regex: '[0-4][0-9]|5[0-3]',
- formatter: function(date) { return dateFilter(date, 'ww'); }
- },
- {
- key: 'w',
- regex: '[0-9]|[1-4][0-9]|5[0-3]',
- formatter: function(date) { return dateFilter(date, 'w'); }
- },
- {
- key: 'GGGG',
- regex: $locale.DATETIME_FORMATS.ERANAMES.join('|').replace(/\s/g, '\\s'),
- formatter: function(date) { return dateFilter(date, 'GGGG'); }
- },
- {
- key: 'GGG',
- regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
- formatter: function(date) { return dateFilter(date, 'GGG'); }
- },
- {
- key: 'GG',
- regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
- formatter: function(date) { return dateFilter(date, 'GG'); }
- },
- {
- key: 'G',
- regex: $locale.DATETIME_FORMATS.ERAS.join('|'),
- formatter: function(date) { return dateFilter(date, 'G'); }
- }
- ];
-
- if (angular.version.major >= 1 && angular.version.minor > 4) {
- formatCodeToRegex.push({
- key: 'LLLL',
- regex: $locale.DATETIME_FORMATS.STANDALONEMONTH.join('|'),
- apply: function(value) { this.month = $locale.DATETIME_FORMATS.STANDALONEMONTH.indexOf(value); },
- formatter: function(date) { return dateFilter(date, 'LLLL'); }
- });
- }
- };
-
- this.init();
-
- function getFormatCodeToRegex(key) {
- return filterFilter(formatCodeToRegex, {key: key}, true)[0];
- }
-
- this.getParser = function (key) {
- var f = getFormatCodeToRegex(key);
- return f && f.apply || null;
- };
-
- this.overrideParser = function (key, parser) {
- var f = getFormatCodeToRegex(key);
- if (f && angular.isFunction(parser)) {
- this.parsers = {};
- f.apply = parser;
- }
- }.bind(this);
-
- function createParser(format) {
- var map = [], regex = format.split('');
-
- // check for literal values
- var quoteIndex = format.indexOf('\'');
- if (quoteIndex > -1) {
- var inLiteral = false;
- format = format.split('');
- for (var i = quoteIndex; i < format.length; i++) {
- if (inLiteral) {
- if (format[i] === '\'') {
- if (i + 1 < format.length && format[i+1] === '\'') { // escaped single quote
- format[i+1] = '$';
- regex[i+1] = '';
- } else { // end of literal
- regex[i] = '';
- inLiteral = false;
- }
- }
- format[i] = '$';
- } else {
- if (format[i] === '\'') { // start of literal
- format[i] = '$';
- regex[i] = '';
- inLiteral = true;
- }
- }
- }
-
- format = format.join('');
- }
-
- angular.forEach(formatCodeToRegex, function(data) {
- var index = format.indexOf(data.key);
-
- if (index > -1) {
- format = format.split('');
-
- regex[index] = '(' + data.regex + ')';
- format[index] = '$'; // Custom symbol to define consumed part of format
- for (var i = index + 1, n = index + data.key.length; i < n; i++) {
- regex[i] = '';
- format[i] = '$';
- }
- format = format.join('');
-
- map.push({
- index: index,
- key: data.key,
- apply: data.apply,
- matcher: data.regex
- });
- }
- });
-
- return {
- regex: new RegExp('^' + regex.join('') + '$'),
- map: orderByFilter(map, 'index')
- };
- }
-
- function createFormatter(format) {
- var formatters = [];
- var i = 0;
- var formatter, literalIdx;
- while (i < format.length) {
- if (angular.isNumber(literalIdx)) {
- if (format.charAt(i) === '\'') {
- if (i + 1 >= format.length || format.charAt(i + 1) !== '\'') {
- formatters.push(constructLiteralFormatter(format, literalIdx, i));
- literalIdx = null;
- }
- } else if (i === format.length) {
- while (literalIdx < format.length) {
- formatter = constructFormatterFromIdx(format, literalIdx);
- formatters.push(formatter);
- literalIdx = formatter.endIdx;
- }
- }
-
- i++;
- continue;
- }
-
- if (format.charAt(i) === '\'') {
- literalIdx = i;
- i++;
- continue;
- }
-
- formatter = constructFormatterFromIdx(format, i);
-
- formatters.push(formatter.parser);
- i = formatter.endIdx;
- }
-
- return formatters;
- }
-
- function constructLiteralFormatter(format, literalIdx, endIdx) {
- return function() {
- return format.substr(literalIdx + 1, endIdx - literalIdx - 1);
- };
- }
-
- function constructFormatterFromIdx(format, i) {
- var currentPosStr = format.substr(i);
- for (var j = 0; j < formatCodeToRegex.length; j++) {
- if (new RegExp('^' + formatCodeToRegex[j].key).test(currentPosStr)) {
- var data = formatCodeToRegex[j];
- return {
- endIdx: i + data.key.length,
- parser: data.formatter
- };
- }
- }
-
- return {
- endIdx: i + 1,
- parser: function() {
- return currentPosStr.charAt(0);
- }
- };
- }
-
- this.filter = function(date, format) {
- if (!angular.isDate(date) || isNaN(date) || !format) {
- return '';
- }
-
- format = $locale.DATETIME_FORMATS[format] || format;
-
- if ($locale.id !== localeId) {
- this.init();
- }
-
- if (!this.formatters[format]) {
- this.formatters[format] = createFormatter(format);
- }
-
- var formatters = this.formatters[format];
-
- return formatters.reduce(function(str, formatter) {
- return str + formatter(date);
- }, '');
- };
-
- this.parse = function(input, format, baseDate) {
- if (!angular.isString(input) || !format) {
- return input;
- }
-
- format = $locale.DATETIME_FORMATS[format] || format;
- format = format.replace(SPECIAL_CHARACTERS_REGEXP, '\\$&');
-
- if ($locale.id !== localeId) {
- this.init();
- }
-
- if (!this.parsers[format]) {
- this.parsers[format] = createParser(format, 'apply');
- }
-
- var parser = this.parsers[format],
- regex = parser.regex,
- map = parser.map,
- results = input.match(regex),
- tzOffset = false;
- if (results && results.length) {
- var fields, dt;
- if (angular.isDate(baseDate) && !isNaN(baseDate.getTime())) {
- fields = {
- year: baseDate.getFullYear(),
- month: baseDate.getMonth(),
- date: baseDate.getDate(),
- hours: baseDate.getHours(),
- minutes: baseDate.getMinutes(),
- seconds: baseDate.getSeconds(),
- milliseconds: baseDate.getMilliseconds()
- };
- } else {
- if (baseDate) {
- $log.warn('dateparser:', 'baseDate is not a valid date');
- }
- fields = { year: 1900, month: 0, date: 1, hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };
- }
-
- for (var i = 1, n = results.length; i < n; i++) {
- var mapper = map[i - 1];
- if (mapper.matcher === 'Z') {
- tzOffset = true;
- }
-
- if (mapper.apply) {
- mapper.apply.call(fields, results[i]);
- }
- }
-
- var datesetter = tzOffset ? Date.prototype.setUTCFullYear :
- Date.prototype.setFullYear;
- var timesetter = tzOffset ? Date.prototype.setUTCHours :
- Date.prototype.setHours;
-
- if (isValid(fields.year, fields.month, fields.date)) {
- if (angular.isDate(baseDate) && !isNaN(baseDate.getTime()) && !tzOffset) {
- dt = new Date(baseDate);
- datesetter.call(dt, fields.year, fields.month, fields.date);
- timesetter.call(dt, fields.hours, fields.minutes,
- fields.seconds, fields.milliseconds);
- } else {
- dt = new Date(0);
- datesetter.call(dt, fields.year, fields.month, fields.date);
- timesetter.call(dt, fields.hours || 0, fields.minutes || 0,
- fields.seconds || 0, fields.milliseconds || 0);
- }
- }
-
- return dt;
- }
- };
-
- // Check if date is valid for specific month (and year for February).
- // Month: 0 = Jan, 1 = Feb, etc
- function isValid(year, month, date) {
- if (date < 1) {
- return false;
- }
-
- if (month === 1 && date > 28) {
- return date === 29 && (year % 4 === 0 && year % 100 !== 0 || year % 400 === 0);
- }
-
- if (month === 3 || month === 5 || month === 8 || month === 10) {
- return date < 31;
- }
-
- return true;
- }
-
- function toInt(str) {
- return parseInt(str, 10);
- }
-
- this.toTimezone = toTimezone;
- this.fromTimezone = fromTimezone;
- this.timezoneToOffset = timezoneToOffset;
- this.addDateMinutes = addDateMinutes;
- this.convertTimezoneToLocal = convertTimezoneToLocal;
-
- function toTimezone(date, timezone) {
- return date && timezone ? convertTimezoneToLocal(date, timezone) : date;
- }
-
- function fromTimezone(date, timezone) {
- return date && timezone ? convertTimezoneToLocal(date, timezone, true) : date;
- }
-
- //https://github.com/angular/angular.js/blob/622c42169699ec07fc6daaa19fe6d224e5d2f70e/src/Angular.js#L1207
- function timezoneToOffset(timezone, fallback) {
- timezone = timezone.replace(/:/g, '');
- var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
- return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
- }
-
- function addDateMinutes(date, minutes) {
- date = new Date(date.getTime());
- date.setMinutes(date.getMinutes() + minutes);
- return date;
- }
-
- function convertTimezoneToLocal(date, timezone, reverse) {
- reverse = reverse ? -1 : 1;
- var dateTimezoneOffset = date.getTimezoneOffset();
- var timezoneOffset = timezoneToOffset(timezone, dateTimezoneOffset);
- return addDateMinutes(date, reverse * (timezoneOffset - dateTimezoneOffset));
- }
-}]);
-
-// Avoiding use of ng-class as it creates a lot of watchers when a class is to be applied to
-// at most one element.
-angular.module('ui.bootstrap.isClass', [])
-.directive('uibIsClass', [
- '$animate',
-function ($animate) {
- // 11111111 22222222
- var ON_REGEXP = /^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/;
- // 11111111 22222222
- var IS_REGEXP = /^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;
-
- var dataPerTracked = {};
-
- return {
- restrict: 'A',
- compile: function(tElement, tAttrs) {
- var linkedScopes = [];
- var instances = [];
- var expToData = {};
- var lastActivated = null;
- var onExpMatches = tAttrs.uibIsClass.match(ON_REGEXP);
- var onExp = onExpMatches[2];
- var expsStr = onExpMatches[1];
- var exps = expsStr.split(',');
-
- return linkFn;
-
- function linkFn(scope, element, attrs) {
- linkedScopes.push(scope);
- instances.push({
- scope: scope,
- element: element
- });
-
- exps.forEach(function(exp, k) {
- addForExp(exp, scope);
- });
-
- scope.$on('$destroy', removeScope);
- }
-
- function addForExp(exp, scope) {
- var matches = exp.match(IS_REGEXP);
- var clazz = scope.$eval(matches[1]);
- var compareWithExp = matches[2];
- var data = expToData[exp];
- if (!data) {
- var watchFn = function(compareWithVal) {
- var newActivated = null;
- instances.some(function(instance) {
- var thisVal = instance.scope.$eval(onExp);
- if (thisVal === compareWithVal) {
- newActivated = instance;
- return true;
- }
- });
- if (data.lastActivated !== newActivated) {
- if (data.lastActivated) {
- $animate.removeClass(data.lastActivated.element, clazz);
- }
- if (newActivated) {
- $animate.addClass(newActivated.element, clazz);
- }
- data.lastActivated = newActivated;
- }
- };
- expToData[exp] = data = {
- lastActivated: null,
- scope: scope,
- watchFn: watchFn,
- compareWithExp: compareWithExp,
- watcher: scope.$watch(compareWithExp, watchFn)
- };
- }
- data.watchFn(scope.$eval(compareWithExp));
- }
-
- function removeScope(e) {
- var removedScope = e.targetScope;
- var index = linkedScopes.indexOf(removedScope);
- linkedScopes.splice(index, 1);
- instances.splice(index, 1);
- if (linkedScopes.length) {
- var newWatchScope = linkedScopes[0];
- angular.forEach(expToData, function(data) {
- if (data.scope === removedScope) {
- data.watcher = newWatchScope.$watch(data.compareWithExp, data.watchFn);
- data.scope = newWatchScope;
- }
- });
- } else {
- expToData = {};
- }
- }
- }
- };
-}]);
-angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.isClass'])
-
-.value('$datepickerSuppressError', false)
-
-.value('$datepickerLiteralWarning', true)
-
-.constant('uibDatepickerConfig', {
- datepickerMode: 'day',
- formatDay: 'dd',
- formatMonth: 'MMMM',
- formatYear: 'yyyy',
- formatDayHeader: 'EEE',
- formatDayTitle: 'MMMM yyyy',
- formatMonthTitle: 'yyyy',
- maxDate: null,
- maxMode: 'year',
- minDate: null,
- minMode: 'day',
- monthColumns: 3,
- ngModelOptions: {},
- shortcutPropagation: false,
- showWeeks: true,
- yearColumns: 5,
- yearRows: 4
-})
-
-.controller('UibDatepickerController', ['$scope', '$element', '$attrs', '$parse', '$interpolate', '$locale', '$log', 'dateFilter', 'uibDatepickerConfig', '$datepickerLiteralWarning', '$datepickerSuppressError', 'uibDateParser',
- function($scope, $element, $attrs, $parse, $interpolate, $locale, $log, dateFilter, datepickerConfig, $datepickerLiteralWarning, $datepickerSuppressError, dateParser) {
- var self = this,
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl;
- ngModelOptions = {},
- watchListeners = [];
-
- $element.addClass('uib-datepicker');
- $attrs.$set('role', 'application');
-
- if (!$scope.datepickerOptions) {
- $scope.datepickerOptions = {};
- }
-
- // Modes chain
- this.modes = ['day', 'month', 'year'];
-
- [
- 'customClass',
- 'dateDisabled',
- 'datepickerMode',
- 'formatDay',
- 'formatDayHeader',
- 'formatDayTitle',
- 'formatMonth',
- 'formatMonthTitle',
- 'formatYear',
- 'maxDate',
- 'maxMode',
- 'minDate',
- 'minMode',
- 'monthColumns',
- 'showWeeks',
- 'shortcutPropagation',
- 'startingDay',
- 'yearColumns',
- 'yearRows'
- ].forEach(function(key) {
- switch (key) {
- case 'customClass':
- case 'dateDisabled':
- $scope[key] = $scope.datepickerOptions[key] || angular.noop;
- break;
- case 'datepickerMode':
- $scope.datepickerMode = angular.isDefined($scope.datepickerOptions.datepickerMode) ?
- $scope.datepickerOptions.datepickerMode : datepickerConfig.datepickerMode;
- break;
- case 'formatDay':
- case 'formatDayHeader':
- case 'formatDayTitle':
- case 'formatMonth':
- case 'formatMonthTitle':
- case 'formatYear':
- self[key] = angular.isDefined($scope.datepickerOptions[key]) ?
- $interpolate($scope.datepickerOptions[key])($scope.$parent) :
- datepickerConfig[key];
- break;
- case 'monthColumns':
- case 'showWeeks':
- case 'shortcutPropagation':
- case 'yearColumns':
- case 'yearRows':
- self[key] = angular.isDefined($scope.datepickerOptions[key]) ?
- $scope.datepickerOptions[key] : datepickerConfig[key];
- break;
- case 'startingDay':
- if (angular.isDefined($scope.datepickerOptions.startingDay)) {
- self.startingDay = $scope.datepickerOptions.startingDay;
- } else if (angular.isNumber(datepickerConfig.startingDay)) {
- self.startingDay = datepickerConfig.startingDay;
- } else {
- self.startingDay = ($locale.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7;
- }
-
- break;
- case 'maxDate':
- case 'minDate':
- $scope.$watch('datepickerOptions.' + key, function(value) {
- if (value) {
- if (angular.isDate(value)) {
- self[key] = dateParser.fromTimezone(new Date(value), ngModelOptions.getOption('timezone'));
- } else {
- if ($datepickerLiteralWarning) {
- $log.warn('Literal date support has been deprecated, please switch to date object usage');
- }
-
- self[key] = new Date(dateFilter(value, 'medium'));
- }
- } else {
- self[key] = datepickerConfig[key] ?
- dateParser.fromTimezone(new Date(datepickerConfig[key]), ngModelOptions.getOption('timezone')) :
- null;
- }
-
- self.refreshView();
- });
-
- break;
- case 'maxMode':
- case 'minMode':
- if ($scope.datepickerOptions[key]) {
- $scope.$watch(function() { return $scope.datepickerOptions[key]; }, function(value) {
- self[key] = $scope[key] = angular.isDefined(value) ? value : $scope.datepickerOptions[key];
- if (key === 'minMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) < self.modes.indexOf(self[key]) ||
- key === 'maxMode' && self.modes.indexOf($scope.datepickerOptions.datepickerMode) > self.modes.indexOf(self[key])) {
- $scope.datepickerMode = self[key];
- $scope.datepickerOptions.datepickerMode = self[key];
- }
- });
- } else {
- self[key] = $scope[key] = datepickerConfig[key] || null;
- }
-
- break;
- }
- });
-
- $scope.uniqueId = 'datepicker-' + $scope.$id + '-' + Math.floor(Math.random() * 10000);
-
- $scope.disabled = angular.isDefined($attrs.disabled) || false;
- if (angular.isDefined($attrs.ngDisabled)) {
- watchListeners.push($scope.$parent.$watch($attrs.ngDisabled, function(disabled) {
- $scope.disabled = disabled;
- self.refreshView();
- }));
- }
-
- $scope.isActive = function(dateObject) {
- if (self.compare(dateObject.date, self.activeDate) === 0) {
- $scope.activeDateId = dateObject.uid;
- return true;
- }
- return false;
- };
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
- ngModelOptions = extractOptions(ngModelCtrl);
-
- if ($scope.datepickerOptions.initDate) {
- self.activeDate = dateParser.fromTimezone($scope.datepickerOptions.initDate, ngModelOptions.getOption('timezone')) || new Date();
- $scope.$watch('datepickerOptions.initDate', function(initDate) {
- if (initDate && (ngModelCtrl.$isEmpty(ngModelCtrl.$modelValue) || ngModelCtrl.$invalid)) {
- self.activeDate = dateParser.fromTimezone(initDate, ngModelOptions.getOption('timezone'));
- self.refreshView();
- }
- });
- } else {
- self.activeDate = new Date();
- }
-
- var date = ngModelCtrl.$modelValue ? new Date(ngModelCtrl.$modelValue) : new Date();
- this.activeDate = !isNaN(date) ?
- dateParser.fromTimezone(date, ngModelOptions.getOption('timezone')) :
- dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone'));
-
- ngModelCtrl.$render = function() {
- self.render();
- };
- };
-
- this.render = function() {
- if (ngModelCtrl.$viewValue) {
- var date = new Date(ngModelCtrl.$viewValue),
- isValid = !isNaN(date);
-
- if (isValid) {
- this.activeDate = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone'));
- } else if (!$datepickerSuppressError) {
- $log.error('Datepicker directive: "ng-model" value must be a Date object');
- }
- }
- this.refreshView();
- };
-
- this.refreshView = function() {
- if (this.element) {
- $scope.selectedDt = null;
- this._refreshView();
- if ($scope.activeDt) {
- $scope.activeDateId = $scope.activeDt.uid;
- }
-
- var date = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- date = dateParser.fromTimezone(date, ngModelOptions.getOption('timezone'));
- ngModelCtrl.$setValidity('dateDisabled', !date ||
- this.element && !this.isDisabled(date));
- }
- };
-
- this.createDateObject = function(date, format) {
- var model = ngModelCtrl.$viewValue ? new Date(ngModelCtrl.$viewValue) : null;
- model = dateParser.fromTimezone(model, ngModelOptions.getOption('timezone'));
- var today = new Date();
- today = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone'));
- var time = this.compare(date, today);
- var dt = {
- date: date,
- label: dateParser.filter(date, format),
- selected: model && this.compare(date, model) === 0,
- disabled: this.isDisabled(date),
- past: time < 0,
- current: time === 0,
- future: time > 0,
- customClass: this.customClass(date) || null
- };
-
- if (model && this.compare(date, model) === 0) {
- $scope.selectedDt = dt;
- }
-
- if (self.activeDate && this.compare(dt.date, self.activeDate) === 0) {
- $scope.activeDt = dt;
- }
-
- return dt;
- };
-
- this.isDisabled = function(date) {
- return $scope.disabled ||
- this.minDate && this.compare(date, this.minDate) < 0 ||
- this.maxDate && this.compare(date, this.maxDate) > 0 ||
- $scope.dateDisabled && $scope.dateDisabled({date: date, mode: $scope.datepickerMode});
- };
-
- this.customClass = function(date) {
- return $scope.customClass({date: date, mode: $scope.datepickerMode});
- };
-
- // Split array into smaller arrays
- this.split = function(arr, size) {
- var arrays = [];
- while (arr.length > 0) {
- arrays.push(arr.splice(0, size));
- }
- return arrays;
- };
-
- $scope.select = function(date) {
- if ($scope.datepickerMode === self.minMode) {
- var dt = ngModelCtrl.$viewValue ? dateParser.fromTimezone(new Date(ngModelCtrl.$viewValue), ngModelOptions.getOption('timezone')) : new Date(0, 0, 0, 0, 0, 0, 0);
- dt.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- dt = dateParser.toTimezone(dt, ngModelOptions.getOption('timezone'));
- ngModelCtrl.$setViewValue(dt);
- ngModelCtrl.$render();
- } else {
- self.activeDate = date;
- setMode(self.modes[self.modes.indexOf($scope.datepickerMode) - 1]);
-
- $scope.$emit('uib:datepicker.mode');
- }
-
- $scope.$broadcast('uib:datepicker.focus');
- };
-
- $scope.move = function(direction) {
- var year = self.activeDate.getFullYear() + direction * (self.step.years || 0),
- month = self.activeDate.getMonth() + direction * (self.step.months || 0);
- self.activeDate.setFullYear(year, month, 1);
- self.refreshView();
- };
-
- $scope.toggleMode = function(direction) {
- direction = direction || 1;
-
- if ($scope.datepickerMode === self.maxMode && direction === 1 ||
- $scope.datepickerMode === self.minMode && direction === -1) {
- return;
- }
-
- setMode(self.modes[self.modes.indexOf($scope.datepickerMode) + direction]);
-
- $scope.$emit('uib:datepicker.mode');
- };
-
- // Key event mapper
- $scope.keys = { 13: 'enter', 32: 'space', 33: 'pageup', 34: 'pagedown', 35: 'end', 36: 'home', 37: 'left', 38: 'up', 39: 'right', 40: 'down' };
-
- var focusElement = function() {
- self.element[0].focus();
- };
-
- // Listen for focus requests from popup directive
- $scope.$on('uib:datepicker.focus', focusElement);
-
- $scope.keydown = function(evt) {
- var key = $scope.keys[evt.which];
-
- if (!key || evt.shiftKey || evt.altKey || $scope.disabled) {
- return;
- }
-
- evt.preventDefault();
- if (!self.shortcutPropagation) {
- evt.stopPropagation();
- }
-
- if (key === 'enter' || key === 'space') {
- if (self.isDisabled(self.activeDate)) {
- return; // do nothing
- }
- $scope.select(self.activeDate);
- } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
- $scope.toggleMode(key === 'up' ? 1 : -1);
- } else {
- self.handleKeyDown(key, evt);
- self.refreshView();
- }
- };
-
- $element.on('keydown', function(evt) {
- $scope.$apply(function() {
- $scope.keydown(evt);
- });
- });
-
- $scope.$on('$destroy', function() {
- //Clear all watch listeners on destroy
- while (watchListeners.length) {
- watchListeners.shift()();
- }
- });
-
- function setMode(mode) {
- $scope.datepickerMode = mode;
- $scope.datepickerOptions.datepickerMode = mode;
- }
-
- function extractOptions(ngModelCtrl) {
- var ngModelOptions;
-
- if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing
- // guarantee a value
- ngModelOptions = ngModelCtrl.$options ||
- $scope.datepickerOptions.ngModelOptions ||
- datepickerConfig.ngModelOptions ||
- {};
-
- // mimic 1.6+ api
- ngModelOptions.getOption = function (key) {
- return ngModelOptions[key];
- };
- } else { // in angular >=1.6 $options is always present
- // ng-model-options defaults timezone to null; don't let its precedence squash a non-null value
- var timezone = ngModelCtrl.$options.getOption('timezone') ||
- ($scope.datepickerOptions.ngModelOptions ? $scope.datepickerOptions.ngModelOptions.timezone : null) ||
- (datepickerConfig.ngModelOptions ? datepickerConfig.ngModelOptions.timezone : null);
-
- // values passed to createChild override existing values
- ngModelOptions = ngModelCtrl.$options // start with a ModelOptions instance
- .createChild(datepickerConfig.ngModelOptions) // lowest precedence
- .createChild($scope.datepickerOptions.ngModelOptions)
- .createChild(ngModelCtrl.$options) // highest precedence
- .createChild({timezone: timezone}); // to keep from squashing a non-null value
- }
-
- return ngModelOptions;
- }
-}])
-
-.controller('UibDaypickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-
- this.step = { months: 1 };
- this.element = $element;
- function getDaysInMonth(year, month) {
- return month === 1 && year % 4 === 0 &&
- (year % 100 !== 0 || year % 400 === 0) ? 29 : DAYS_IN_MONTH[month];
- }
-
- this.init = function(ctrl) {
- angular.extend(ctrl, this);
- scope.showWeeks = ctrl.showWeeks;
- ctrl.refreshView();
- };
-
- this.getDates = function(startDate, n) {
- var dates = new Array(n), current = new Date(startDate), i = 0, date;
- while (i < n) {
- date = new Date(current);
- dates[i++] = date;
- current.setDate(current.getDate() + 1);
- }
- return dates;
- };
-
- this._refreshView = function() {
- var year = this.activeDate.getFullYear(),
- month = this.activeDate.getMonth(),
- firstDayOfMonth = new Date(this.activeDate);
-
- firstDayOfMonth.setFullYear(year, month, 1);
-
- var difference = this.startingDay - firstDayOfMonth.getDay(),
- numDisplayedFromPreviousMonth = difference > 0 ?
- 7 - difference : - difference,
- firstDate = new Date(firstDayOfMonth);
-
- if (numDisplayedFromPreviousMonth > 0) {
- firstDate.setDate(-numDisplayedFromPreviousMonth + 1);
- }
-
- // 42 is the number of days on a six-week calendar
- var days = this.getDates(firstDate, 42);
- for (var i = 0; i < 42; i ++) {
- days[i] = angular.extend(this.createDateObject(days[i], this.formatDay), {
- secondary: days[i].getMonth() !== month,
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.labels = new Array(7);
- for (var j = 0; j < 7; j++) {
- scope.labels[j] = {
- abbr: dateFilter(days[j].date, this.formatDayHeader),
- full: dateFilter(days[j].date, 'EEEE')
- };
- }
-
- scope.title = dateFilter(this.activeDate, this.formatDayTitle);
- scope.rows = this.split(days, 7);
-
- if (scope.showWeeks) {
- scope.weekNumbers = [];
- var thursdayIndex = (4 + 7 - this.startingDay) % 7,
- numWeeks = scope.rows.length;
- for (var curWeek = 0; curWeek < numWeeks; curWeek++) {
- scope.weekNumbers.push(
- getISO8601WeekNumber(scope.rows[curWeek][thursdayIndex].date));
- }
- }
- };
-
- this.compare = function(date1, date2) {
- var _date1 = new Date(date1.getFullYear(), date1.getMonth(), date1.getDate());
- var _date2 = new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
- _date1.setFullYear(date1.getFullYear());
- _date2.setFullYear(date2.getFullYear());
- return _date1 - _date2;
- };
-
- function getISO8601WeekNumber(date) {
- var checkDate = new Date(date);
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); // Thursday
- var time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- }
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getDate();
-
- if (key === 'left') {
- date = date - 1;
- } else if (key === 'up') {
- date = date - 7;
- } else if (key === 'right') {
- date = date + 1;
- } else if (key === 'down') {
- date = date + 7;
- } else if (key === 'pageup' || key === 'pagedown') {
- var month = this.activeDate.getMonth() + (key === 'pageup' ? - 1 : 1);
- this.activeDate.setMonth(month, 1);
- date = Math.min(getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth()), date);
- } else if (key === 'home') {
- date = 1;
- } else if (key === 'end') {
- date = getDaysInMonth(this.activeDate.getFullYear(), this.activeDate.getMonth());
- }
- this.activeDate.setDate(date);
- };
-}])
-
-.controller('UibMonthpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- this.step = { years: 1 };
- this.element = $element;
-
- this.init = function(ctrl) {
- angular.extend(ctrl, this);
- ctrl.refreshView();
- };
-
- this._refreshView = function() {
- var months = new Array(12),
- year = this.activeDate.getFullYear(),
- date;
-
- for (var i = 0; i < 12; i++) {
- date = new Date(this.activeDate);
- date.setFullYear(year, i, 1);
- months[i] = angular.extend(this.createDateObject(date, this.formatMonth), {
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.title = dateFilter(this.activeDate, this.formatMonthTitle);
- scope.rows = this.split(months, this.monthColumns);
- scope.yearHeaderColspan = this.monthColumns > 3 ? this.monthColumns - 2 : 1;
- };
-
- this.compare = function(date1, date2) {
- var _date1 = new Date(date1.getFullYear(), date1.getMonth());
- var _date2 = new Date(date2.getFullYear(), date2.getMonth());
- _date1.setFullYear(date1.getFullYear());
- _date2.setFullYear(date2.getFullYear());
- return _date1 - _date2;
- };
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getMonth();
-
- if (key === 'left') {
- date = date - 1;
- } else if (key === 'up') {
- date = date - this.monthColumns;
- } else if (key === 'right') {
- date = date + 1;
- } else if (key === 'down') {
- date = date + this.monthColumns;
- } else if (key === 'pageup' || key === 'pagedown') {
- var year = this.activeDate.getFullYear() + (key === 'pageup' ? - 1 : 1);
- this.activeDate.setFullYear(year);
- } else if (key === 'home') {
- date = 0;
- } else if (key === 'end') {
- date = 11;
- }
- this.activeDate.setMonth(date);
- };
-}])
-
-.controller('UibYearpickerController', ['$scope', '$element', 'dateFilter', function(scope, $element, dateFilter) {
- var columns, range;
- this.element = $element;
-
- function getStartingYear(year) {
- return parseInt((year - 1) / range, 10) * range + 1;
- }
-
- this.yearpickerInit = function() {
- columns = this.yearColumns;
- range = this.yearRows * columns;
- this.step = { years: range };
- };
-
- this._refreshView = function() {
- var years = new Array(range), date;
-
- for (var i = 0, start = getStartingYear(this.activeDate.getFullYear()); i < range; i++) {
- date = new Date(this.activeDate);
- date.setFullYear(start + i, 0, 1);
- years[i] = angular.extend(this.createDateObject(date, this.formatYear), {
- uid: scope.uniqueId + '-' + i
- });
- }
-
- scope.title = [years[0].label, years[range - 1].label].join(' - ');
- scope.rows = this.split(years, columns);
- scope.columns = columns;
- };
-
- this.compare = function(date1, date2) {
- return date1.getFullYear() - date2.getFullYear();
- };
-
- this.handleKeyDown = function(key, evt) {
- var date = this.activeDate.getFullYear();
-
- if (key === 'left') {
- date = date - 1;
- } else if (key === 'up') {
- date = date - columns;
- } else if (key === 'right') {
- date = date + 1;
- } else if (key === 'down') {
- date = date + columns;
- } else if (key === 'pageup' || key === 'pagedown') {
- date += (key === 'pageup' ? - 1 : 1) * range;
- } else if (key === 'home') {
- date = getStartingYear(this.activeDate.getFullYear());
- } else if (key === 'end') {
- date = getStartingYear(this.activeDate.getFullYear()) + range - 1;
- }
- this.activeDate.setFullYear(date);
- };
-}])
-
-.directive('uibDatepicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/datepicker.html';
- },
- scope: {
- datepickerOptions: '=?'
- },
- require: ['uibDatepicker', '^ngModel'],
- restrict: 'A',
- controller: 'UibDatepickerController',
- controllerAs: 'datepicker',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- datepickerCtrl.init(ngModelCtrl);
- }
- };
-})
-
-.directive('uibDaypicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/day.html';
- },
- require: ['^uibDatepicker', 'uibDaypicker'],
- restrict: 'A',
- controller: 'UibDaypickerController',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0],
- daypickerCtrl = ctrls[1];
-
- daypickerCtrl.init(datepickerCtrl);
- }
- };
-})
-
-.directive('uibMonthpicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/month.html';
- },
- require: ['^uibDatepicker', 'uibMonthpicker'],
- restrict: 'A',
- controller: 'UibMonthpickerController',
- link: function(scope, element, attrs, ctrls) {
- var datepickerCtrl = ctrls[0],
- monthpickerCtrl = ctrls[1];
-
- monthpickerCtrl.init(datepickerCtrl);
- }
- };
-})
-
-.directive('uibYearpicker', function() {
- return {
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepicker/year.html';
- },
- require: ['^uibDatepicker', 'uibYearpicker'],
- restrict: 'A',
- controller: 'UibYearpickerController',
- link: function(scope, element, attrs, ctrls) {
- var ctrl = ctrls[0];
- angular.extend(ctrl, ctrls[1]);
- ctrl.yearpickerInit();
-
- ctrl.refreshView();
- }
- };
-});
-
-angular.module('ui.bootstrap.position', [])
-
-/**
- * A set of utility methods for working with the DOM.
- * It is meant to be used where we need to absolute-position elements in
- * relation to another element (this is the case for tooltips, popovers,
- * typeahead suggestions etc.).
- */
- .factory('$uibPosition', ['$document', '$window', function($document, $window) {
- /**
- * Used by scrollbarWidth() function to cache scrollbar's width.
- * Do not access this variable directly, use scrollbarWidth() instead.
- */
- var SCROLLBAR_WIDTH;
- /**
- * scrollbar on body and html element in IE and Edge overlay
- * content and should be considered 0 width.
- */
- var BODY_SCROLLBAR_WIDTH;
- var OVERFLOW_REGEX = {
- normal: /(auto|scroll)/,
- hidden: /(auto|scroll|hidden)/
- };
- var PLACEMENT_REGEX = {
- auto: /\s?auto?\s?/i,
- primary: /^(top|bottom|left|right)$/,
- secondary: /^(top|bottom|left|right|center)$/,
- vertical: /^(top|bottom)$/
- };
- var BODY_REGEX = /(HTML|BODY)/;
-
- return {
-
- /**
- * Provides a raw DOM element from a jQuery/jQLite element.
- *
- * @param {element} elem - The element to convert.
- *
- * @returns {element} A HTML element.
- */
- getRawNode: function(elem) {
- return elem.nodeName ? elem : elem[0] || elem;
- },
-
- /**
- * Provides a parsed number for a style property. Strips
- * units and casts invalid numbers to 0.
- *
- * @param {string} value - The style value to parse.
- *
- * @returns {number} A valid number.
- */
- parseStyle: function(value) {
- value = parseFloat(value);
- return isFinite(value) ? value : 0;
- },
-
- /**
- * Provides the closest positioned ancestor.
- *
- * @param {element} element - The element to get the offest parent for.
- *
- * @returns {element} The closest positioned ancestor.
- */
- offsetParent: function(elem) {
- elem = this.getRawNode(elem);
-
- var offsetParent = elem.offsetParent || $document[0].documentElement;
-
- function isStaticPositioned(el) {
- return ($window.getComputedStyle(el).position || 'static') === 'static';
- }
-
- while (offsetParent && offsetParent !== $document[0].documentElement && isStaticPositioned(offsetParent)) {
- offsetParent = offsetParent.offsetParent;
- }
-
- return offsetParent || $document[0].documentElement;
- },
-
- /**
- * Provides the scrollbar width, concept from TWBS measureScrollbar()
- * function in https://github.com/twbs/bootstrap/blob/master/js/modal.js
- * In IE and Edge, scollbar on body and html element overlay and should
- * return a width of 0.
- *
- * @returns {number} The width of the browser scollbar.
- */
- scrollbarWidth: function(isBody) {
- if (isBody) {
- if (angular.isUndefined(BODY_SCROLLBAR_WIDTH)) {
- var bodyElem = $document.find('body');
- bodyElem.addClass('uib-position-body-scrollbar-measure');
- BODY_SCROLLBAR_WIDTH = $window.innerWidth - bodyElem[0].clientWidth;
- BODY_SCROLLBAR_WIDTH = isFinite(BODY_SCROLLBAR_WIDTH) ? BODY_SCROLLBAR_WIDTH : 0;
- bodyElem.removeClass('uib-position-body-scrollbar-measure');
- }
- return BODY_SCROLLBAR_WIDTH;
- }
-
- if (angular.isUndefined(SCROLLBAR_WIDTH)) {
- var scrollElem = angular.element('<div class="uib-position-scrollbar-measure"></div>');
- $document.find('body').append(scrollElem);
- SCROLLBAR_WIDTH = scrollElem[0].offsetWidth - scrollElem[0].clientWidth;
- SCROLLBAR_WIDTH = isFinite(SCROLLBAR_WIDTH) ? SCROLLBAR_WIDTH : 0;
- scrollElem.remove();
- }
-
- return SCROLLBAR_WIDTH;
- },
-
- /**
- * Provides the padding required on an element to replace the scrollbar.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**scrollbarWidth**: the width of the scrollbar</li>
- * <li>**widthOverflow**: whether the the width is overflowing</li>
- * <li>**right**: the amount of right padding on the element needed to replace the scrollbar</li>
- * <li>**rightOriginal**: the amount of right padding currently on the element</li>
- * <li>**heightOverflow**: whether the the height is overflowing</li>
- * <li>**bottom**: the amount of bottom padding on the element needed to replace the scrollbar</li>
- * <li>**bottomOriginal**: the amount of bottom padding currently on the element</li>
- * </ul>
- */
- scrollbarPadding: function(elem) {
- elem = this.getRawNode(elem);
-
- var elemStyle = $window.getComputedStyle(elem);
- var paddingRight = this.parseStyle(elemStyle.paddingRight);
- var paddingBottom = this.parseStyle(elemStyle.paddingBottom);
- var scrollParent = this.scrollParent(elem, false, true);
- var scrollbarWidth = this.scrollbarWidth(BODY_REGEX.test(scrollParent.tagName));
-
- return {
- scrollbarWidth: scrollbarWidth,
- widthOverflow: scrollParent.scrollWidth > scrollParent.clientWidth,
- right: paddingRight + scrollbarWidth,
- originalRight: paddingRight,
- heightOverflow: scrollParent.scrollHeight > scrollParent.clientHeight,
- bottom: paddingBottom + scrollbarWidth,
- originalBottom: paddingBottom
- };
- },
-
- /**
- * Checks to see if the element is scrollable.
- *
- * @param {element} elem - The element to check.
- * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
- * default is false.
- *
- * @returns {boolean} Whether the element is scrollable.
- */
- isScrollable: function(elem, includeHidden) {
- elem = this.getRawNode(elem);
-
- var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;
- var elemStyle = $window.getComputedStyle(elem);
- return overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX);
- },
-
- /**
- * Provides the closest scrollable ancestor.
- * A port of the jQuery UI scrollParent method:
- * https://github.com/jquery/jquery-ui/blob/master/ui/scroll-parent.js
- *
- * @param {element} elem - The element to find the scroll parent of.
- * @param {boolean=} [includeHidden=false] - Should scroll style of 'hidden' be considered,
- * default is false.
- * @param {boolean=} [includeSelf=false] - Should the element being passed be
- * included in the scrollable llokup.
- *
- * @returns {element} A HTML element.
- */
- scrollParent: function(elem, includeHidden, includeSelf) {
- elem = this.getRawNode(elem);
-
- var overflowRegex = includeHidden ? OVERFLOW_REGEX.hidden : OVERFLOW_REGEX.normal;
- var documentEl = $document[0].documentElement;
- var elemStyle = $window.getComputedStyle(elem);
- if (includeSelf && overflowRegex.test(elemStyle.overflow + elemStyle.overflowY + elemStyle.overflowX)) {
- return elem;
- }
- var excludeStatic = elemStyle.position === 'absolute';
- var scrollParent = elem.parentElement || documentEl;
-
- if (scrollParent === documentEl || elemStyle.position === 'fixed') {
- return documentEl;
- }
-
- while (scrollParent.parentElement && scrollParent !== documentEl) {
- var spStyle = $window.getComputedStyle(scrollParent);
- if (excludeStatic && spStyle.position !== 'static') {
- excludeStatic = false;
- }
-
- if (!excludeStatic && overflowRegex.test(spStyle.overflow + spStyle.overflowY + spStyle.overflowX)) {
- break;
- }
- scrollParent = scrollParent.parentElement;
- }
-
- return scrollParent;
- },
-
- /**
- * Provides read-only equivalent of jQuery's position function:
- * http://api.jquery.com/position/ - distance to closest positioned
- * ancestor. Does not account for margins by default like jQuery position.
- *
- * @param {element} elem - The element to caclulate the position on.
- * @param {boolean=} [includeMargins=false] - Should margins be accounted
- * for, default is false.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**width**: the width of the element</li>
- * <li>**height**: the height of the element</li>
- * <li>**top**: distance to top edge of offset parent</li>
- * <li>**left**: distance to left edge of offset parent</li>
- * </ul>
- */
- position: function(elem, includeMagins) {
- elem = this.getRawNode(elem);
-
- var elemOffset = this.offset(elem);
- if (includeMagins) {
- var elemStyle = $window.getComputedStyle(elem);
- elemOffset.top -= this.parseStyle(elemStyle.marginTop);
- elemOffset.left -= this.parseStyle(elemStyle.marginLeft);
- }
- var parent = this.offsetParent(elem);
- var parentOffset = {top: 0, left: 0};
-
- if (parent !== $document[0].documentElement) {
- parentOffset = this.offset(parent);
- parentOffset.top += parent.clientTop - parent.scrollTop;
- parentOffset.left += parent.clientLeft - parent.scrollLeft;
- }
-
- return {
- width: Math.round(angular.isNumber(elemOffset.width) ? elemOffset.width : elem.offsetWidth),
- height: Math.round(angular.isNumber(elemOffset.height) ? elemOffset.height : elem.offsetHeight),
- top: Math.round(elemOffset.top - parentOffset.top),
- left: Math.round(elemOffset.left - parentOffset.left)
- };
- },
-
- /**
- * Provides read-only equivalent of jQuery's offset function:
- * http://api.jquery.com/offset/ - distance to viewport. Does
- * not account for borders, margins, or padding on the body
- * element.
- *
- * @param {element} elem - The element to calculate the offset on.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**width**: the width of the element</li>
- * <li>**height**: the height of the element</li>
- * <li>**top**: distance to top edge of viewport</li>
- * <li>**right**: distance to bottom edge of viewport</li>
- * </ul>
- */
- offset: function(elem) {
- elem = this.getRawNode(elem);
-
- var elemBCR = elem.getBoundingClientRect();
- return {
- width: Math.round(angular.isNumber(elemBCR.width) ? elemBCR.width : elem.offsetWidth),
- height: Math.round(angular.isNumber(elemBCR.height) ? elemBCR.height : elem.offsetHeight),
- top: Math.round(elemBCR.top + ($window.pageYOffset || $document[0].documentElement.scrollTop)),
- left: Math.round(elemBCR.left + ($window.pageXOffset || $document[0].documentElement.scrollLeft))
- };
- },
-
- /**
- * Provides offset distance to the closest scrollable ancestor
- * or viewport. Accounts for border and scrollbar width.
- *
- * Right and bottom dimensions represent the distance to the
- * respective edge of the viewport element. If the element
- * edge extends beyond the viewport, a negative value will be
- * reported.
- *
- * @param {element} elem - The element to get the viewport offset for.
- * @param {boolean=} [useDocument=false] - Should the viewport be the document element instead
- * of the first scrollable element, default is false.
- * @param {boolean=} [includePadding=true] - Should the padding on the offset parent element
- * be accounted for, default is true.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**top**: distance to the top content edge of viewport element</li>
- * <li>**bottom**: distance to the bottom content edge of viewport element</li>
- * <li>**left**: distance to the left content edge of viewport element</li>
- * <li>**right**: distance to the right content edge of viewport element</li>
- * </ul>
- */
- viewportOffset: function(elem, useDocument, includePadding) {
- elem = this.getRawNode(elem);
- includePadding = includePadding !== false ? true : false;
-
- var elemBCR = elem.getBoundingClientRect();
- var offsetBCR = {top: 0, left: 0, bottom: 0, right: 0};
-
- var offsetParent = useDocument ? $document[0].documentElement : this.scrollParent(elem);
- var offsetParentBCR = offsetParent.getBoundingClientRect();
-
- offsetBCR.top = offsetParentBCR.top + offsetParent.clientTop;
- offsetBCR.left = offsetParentBCR.left + offsetParent.clientLeft;
- if (offsetParent === $document[0].documentElement) {
- offsetBCR.top += $window.pageYOffset;
- offsetBCR.left += $window.pageXOffset;
- }
- offsetBCR.bottom = offsetBCR.top + offsetParent.clientHeight;
- offsetBCR.right = offsetBCR.left + offsetParent.clientWidth;
-
- if (includePadding) {
- var offsetParentStyle = $window.getComputedStyle(offsetParent);
- offsetBCR.top += this.parseStyle(offsetParentStyle.paddingTop);
- offsetBCR.bottom -= this.parseStyle(offsetParentStyle.paddingBottom);
- offsetBCR.left += this.parseStyle(offsetParentStyle.paddingLeft);
- offsetBCR.right -= this.parseStyle(offsetParentStyle.paddingRight);
- }
-
- return {
- top: Math.round(elemBCR.top - offsetBCR.top),
- bottom: Math.round(offsetBCR.bottom - elemBCR.bottom),
- left: Math.round(elemBCR.left - offsetBCR.left),
- right: Math.round(offsetBCR.right - elemBCR.right)
- };
- },
-
- /**
- * Provides an array of placement values parsed from a placement string.
- * Along with the 'auto' indicator, supported placement strings are:
- * <ul>
- * <li>top: element on top, horizontally centered on host element.</li>
- * <li>top-left: element on top, left edge aligned with host element left edge.</li>
- * <li>top-right: element on top, lerightft edge aligned with host element right edge.</li>
- * <li>bottom: element on bottom, horizontally centered on host element.</li>
- * <li>bottom-left: element on bottom, left edge aligned with host element left edge.</li>
- * <li>bottom-right: element on bottom, right edge aligned with host element right edge.</li>
- * <li>left: element on left, vertically centered on host element.</li>
- * <li>left-top: element on left, top edge aligned with host element top edge.</li>
- * <li>left-bottom: element on left, bottom edge aligned with host element bottom edge.</li>
- * <li>right: element on right, vertically centered on host element.</li>
- * <li>right-top: element on right, top edge aligned with host element top edge.</li>
- * <li>right-bottom: element on right, bottom edge aligned with host element bottom edge.</li>
- * </ul>
- * A placement string with an 'auto' indicator is expected to be
- * space separated from the placement, i.e: 'auto bottom-left' If
- * the primary and secondary placement values do not match 'top,
- * bottom, left, right' then 'top' will be the primary placement and
- * 'center' will be the secondary placement. If 'auto' is passed, true
- * will be returned as the 3rd value of the array.
- *
- * @param {string} placement - The placement string to parse.
- *
- * @returns {array} An array with the following values
- * <ul>
- * <li>**[0]**: The primary placement.</li>
- * <li>**[1]**: The secondary placement.</li>
- * <li>**[2]**: If auto is passed: true, else undefined.</li>
- * </ul>
- */
- parsePlacement: function(placement) {
- var autoPlace = PLACEMENT_REGEX.auto.test(placement);
- if (autoPlace) {
- placement = placement.replace(PLACEMENT_REGEX.auto, '');
- }
-
- placement = placement.split('-');
-
- placement[0] = placement[0] || 'top';
- if (!PLACEMENT_REGEX.primary.test(placement[0])) {
- placement[0] = 'top';
- }
-
- placement[1] = placement[1] || 'center';
- if (!PLACEMENT_REGEX.secondary.test(placement[1])) {
- placement[1] = 'center';
- }
-
- if (autoPlace) {
- placement[2] = true;
- } else {
- placement[2] = false;
- }
-
- return placement;
- },
-
- /**
- * Provides coordinates for an element to be positioned relative to
- * another element. Passing 'auto' as part of the placement parameter
- * will enable smart placement - where the element fits. i.e:
- * 'auto left-top' will check to see if there is enough space to the left
- * of the hostElem to fit the targetElem, if not place right (same for secondary
- * top placement). Available space is calculated using the viewportOffset
- * function.
- *
- * @param {element} hostElem - The element to position against.
- * @param {element} targetElem - The element to position.
- * @param {string=} [placement=top] - The placement for the targetElem,
- * default is 'top'. 'center' is assumed as secondary placement for
- * 'top', 'left', 'right', and 'bottom' placements. Available placements are:
- * <ul>
- * <li>top</li>
- * <li>top-right</li>
- * <li>top-left</li>
- * <li>bottom</li>
- * <li>bottom-left</li>
- * <li>bottom-right</li>
- * <li>left</li>
- * <li>left-top</li>
- * <li>left-bottom</li>
- * <li>right</li>
- * <li>right-top</li>
- * <li>right-bottom</li>
- * </ul>
- * @param {boolean=} [appendToBody=false] - Should the top and left values returned
- * be calculated from the body element, default is false.
- *
- * @returns {object} An object with the following properties:
- * <ul>
- * <li>**top**: Value for targetElem top.</li>
- * <li>**left**: Value for targetElem left.</li>
- * <li>**placement**: The resolved placement.</li>
- * </ul>
- */
- positionElements: function(hostElem, targetElem, placement, appendToBody) {
- hostElem = this.getRawNode(hostElem);
- targetElem = this.getRawNode(targetElem);
-
- // need to read from prop to support tests.
- var targetWidth = angular.isDefined(targetElem.offsetWidth) ? targetElem.offsetWidth : targetElem.prop('offsetWidth');
- var targetHeight = angular.isDefined(targetElem.offsetHeight) ? targetElem.offsetHeight : targetElem.prop('offsetHeight');
-
- placement = this.parsePlacement(placement);
-
- var hostElemPos = appendToBody ? this.offset(hostElem) : this.position(hostElem);
- var targetElemPos = {top: 0, left: 0, placement: ''};
-
- if (placement[2]) {
- var viewportOffset = this.viewportOffset(hostElem, appendToBody);
-
- var targetElemStyle = $window.getComputedStyle(targetElem);
- var adjustedSize = {
- width: targetWidth + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginLeft) + this.parseStyle(targetElemStyle.marginRight))),
- height: targetHeight + Math.round(Math.abs(this.parseStyle(targetElemStyle.marginTop) + this.parseStyle(targetElemStyle.marginBottom)))
- };
-
- placement[0] = placement[0] === 'top' && adjustedSize.height > viewportOffset.top && adjustedSize.height <= viewportOffset.bottom ? 'bottom' :
- placement[0] === 'bottom' && adjustedSize.height > viewportOffset.bottom && adjustedSize.height <= viewportOffset.top ? 'top' :
- placement[0] === 'left' && adjustedSize.width > viewportOffset.left && adjustedSize.width <= viewportOffset.right ? 'right' :
- placement[0] === 'right' && adjustedSize.width > viewportOffset.right && adjustedSize.width <= viewportOffset.left ? 'left' :
- placement[0];
-
- placement[1] = placement[1] === 'top' && adjustedSize.height - hostElemPos.height > viewportOffset.bottom && adjustedSize.height - hostElemPos.height <= viewportOffset.top ? 'bottom' :
- placement[1] === 'bottom' && adjustedSize.height - hostElemPos.height > viewportOffset.top && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom ? 'top' :
- placement[1] === 'left' && adjustedSize.width - hostElemPos.width > viewportOffset.right && adjustedSize.width - hostElemPos.width <= viewportOffset.left ? 'right' :
- placement[1] === 'right' && adjustedSize.width - hostElemPos.width > viewportOffset.left && adjustedSize.width - hostElemPos.width <= viewportOffset.right ? 'left' :
- placement[1];
-
- if (placement[1] === 'center') {
- if (PLACEMENT_REGEX.vertical.test(placement[0])) {
- var xOverflow = hostElemPos.width / 2 - targetWidth / 2;
- if (viewportOffset.left + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.right) {
- placement[1] = 'left';
- } else if (viewportOffset.right + xOverflow < 0 && adjustedSize.width - hostElemPos.width <= viewportOffset.left) {
- placement[1] = 'right';
- }
- } else {
- var yOverflow = hostElemPos.height / 2 - adjustedSize.height / 2;
- if (viewportOffset.top + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.bottom) {
- placement[1] = 'top';
- } else if (viewportOffset.bottom + yOverflow < 0 && adjustedSize.height - hostElemPos.height <= viewportOffset.top) {
- placement[1] = 'bottom';
- }
- }
- }
- }
-
- switch (placement[0]) {
- case 'top':
- targetElemPos.top = hostElemPos.top - targetHeight;
- break;
- case 'bottom':
- targetElemPos.top = hostElemPos.top + hostElemPos.height;
- break;
- case 'left':
- targetElemPos.left = hostElemPos.left - targetWidth;
- break;
- case 'right':
- targetElemPos.left = hostElemPos.left + hostElemPos.width;
- break;
- }
-
- switch (placement[1]) {
- case 'top':
- targetElemPos.top = hostElemPos.top;
- break;
- case 'bottom':
- targetElemPos.top = hostElemPos.top + hostElemPos.height - targetHeight;
- break;
- case 'left':
- targetElemPos.left = hostElemPos.left;
- break;
- case 'right':
- targetElemPos.left = hostElemPos.left + hostElemPos.width - targetWidth;
- break;
- case 'center':
- if (PLACEMENT_REGEX.vertical.test(placement[0])) {
- targetElemPos.left = hostElemPos.left + hostElemPos.width / 2 - targetWidth / 2;
- } else {
- targetElemPos.top = hostElemPos.top + hostElemPos.height / 2 - targetHeight / 2;
- }
- break;
- }
-
- targetElemPos.top = Math.round(targetElemPos.top);
- targetElemPos.left = Math.round(targetElemPos.left);
- targetElemPos.placement = placement[1] === 'center' ? placement[0] : placement[0] + '-' + placement[1];
-
- return targetElemPos;
- },
-
- /**
- * Provides a way to adjust the top positioning after first
- * render to correctly align element to top after content
- * rendering causes resized element height
- *
- * @param {array} placementClasses - The array of strings of classes
- * element should have.
- * @param {object} containerPosition - The object with container
- * position information
- * @param {number} initialHeight - The initial height for the elem.
- * @param {number} currentHeight - The current height for the elem.
- */
- adjustTop: function(placementClasses, containerPosition, initialHeight, currentHeight) {
- if (placementClasses.indexOf('top') !== -1 && initialHeight !== currentHeight) {
- return {
- top: containerPosition.top - currentHeight + 'px'
- };
- }
- },
-
- /**
- * Provides a way for positioning tooltip & dropdown
- * arrows when using placement options beyond the standard
- * left, right, top, or bottom.
- *
- * @param {element} elem - The tooltip/dropdown element.
- * @param {string} placement - The placement for the elem.
- */
- positionArrow: function(elem, placement) {
- elem = this.getRawNode(elem);
-
- var innerElem = elem.querySelector('.tooltip-inner, .popover-inner');
- if (!innerElem) {
- return;
- }
-
- var isTooltip = angular.element(innerElem).hasClass('tooltip-inner');
-
- var arrowElem = isTooltip ? elem.querySelector('.tooltip-arrow') : elem.querySelector('.arrow');
- if (!arrowElem) {
- return;
- }
-
- var arrowCss = {
- top: '',
- bottom: '',
- left: '',
- right: ''
- };
-
- placement = this.parsePlacement(placement);
- if (placement[1] === 'center') {
- // no adjustment necessary - just reset styles
- angular.element(arrowElem).css(arrowCss);
- return;
- }
-
- var borderProp = 'border-' + placement[0] + '-width';
- var borderWidth = $window.getComputedStyle(arrowElem)[borderProp];
-
- var borderRadiusProp = 'border-';
- if (PLACEMENT_REGEX.vertical.test(placement[0])) {
- borderRadiusProp += placement[0] + '-' + placement[1];
- } else {
- borderRadiusProp += placement[1] + '-' + placement[0];
- }
- borderRadiusProp += '-radius';
- var borderRadius = $window.getComputedStyle(isTooltip ? innerElem : elem)[borderRadiusProp];
-
- switch (placement[0]) {
- case 'top':
- arrowCss.bottom = isTooltip ? '0' : '-' + borderWidth;
- break;
- case 'bottom':
- arrowCss.top = isTooltip ? '0' : '-' + borderWidth;
- break;
- case 'left':
- arrowCss.right = isTooltip ? '0' : '-' + borderWidth;
- break;
- case 'right':
- arrowCss.left = isTooltip ? '0' : '-' + borderWidth;
- break;
- }
-
- arrowCss[placement[1]] = borderRadius;
-
- angular.element(arrowElem).css(arrowCss);
- }
- };
- }]);
-
-angular.module('ui.bootstrap.datepickerPopup', ['ui.bootstrap.datepicker', 'ui.bootstrap.position'])
-
-.value('$datepickerPopupLiteralWarning', true)
-
-.constant('uibDatepickerPopupConfig', {
- altInputFormats: [],
- appendToBody: false,
- clearText: 'Clear',
- closeOnDateSelection: true,
- closeText: 'Done',
- currentText: 'Today',
- datepickerPopup: 'yyyy-MM-dd',
- datepickerPopupTemplateUrl: 'uib/template/datepickerPopup/popup.html',
- datepickerTemplateUrl: 'uib/template/datepicker/datepicker.html',
- html5Types: {
- date: 'yyyy-MM-dd',
- 'datetime-local': 'yyyy-MM-ddTHH:mm:ss.sss',
- 'month': 'yyyy-MM'
- },
- onOpenFocus: true,
- showButtonBar: true,
- placement: 'auto bottom-left'
-})
-
-.controller('UibDatepickerPopupController', ['$scope', '$element', '$attrs', '$compile', '$log', '$parse', '$window', '$document', '$rootScope', '$uibPosition', 'dateFilter', 'uibDateParser', 'uibDatepickerPopupConfig', '$timeout', 'uibDatepickerConfig', '$datepickerPopupLiteralWarning',
-function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $rootScope, $position, dateFilter, dateParser, datepickerPopupConfig, $timeout, datepickerConfig, $datepickerPopupLiteralWarning) {
- var cache = {},
- isHtml5DateInput = false;
- var dateFormat, closeOnDateSelection, appendToBody, onOpenFocus,
- datepickerPopupTemplateUrl, datepickerTemplateUrl, popupEl, datepickerEl, scrollParentEl,
- ngModel, ngModelOptions, $popup, altInputFormats, watchListeners = [];
-
- this.init = function(_ngModel_) {
- ngModel = _ngModel_;
- ngModelOptions = extractOptions(ngModel);
- closeOnDateSelection = angular.isDefined($attrs.closeOnDateSelection) ?
- $scope.$parent.$eval($attrs.closeOnDateSelection) :
- datepickerPopupConfig.closeOnDateSelection;
- appendToBody = angular.isDefined($attrs.datepickerAppendToBody) ?
- $scope.$parent.$eval($attrs.datepickerAppendToBody) :
- datepickerPopupConfig.appendToBody;
- onOpenFocus = angular.isDefined($attrs.onOpenFocus) ?
- $scope.$parent.$eval($attrs.onOpenFocus) : datepickerPopupConfig.onOpenFocus;
- datepickerPopupTemplateUrl = angular.isDefined($attrs.datepickerPopupTemplateUrl) ?
- $attrs.datepickerPopupTemplateUrl :
- datepickerPopupConfig.datepickerPopupTemplateUrl;
- datepickerTemplateUrl = angular.isDefined($attrs.datepickerTemplateUrl) ?
- $attrs.datepickerTemplateUrl : datepickerPopupConfig.datepickerTemplateUrl;
- altInputFormats = angular.isDefined($attrs.altInputFormats) ?
- $scope.$parent.$eval($attrs.altInputFormats) :
- datepickerPopupConfig.altInputFormats;
-
- $scope.showButtonBar = angular.isDefined($attrs.showButtonBar) ?
- $scope.$parent.$eval($attrs.showButtonBar) :
- datepickerPopupConfig.showButtonBar;
-
- if (datepickerPopupConfig.html5Types[$attrs.type]) {
- dateFormat = datepickerPopupConfig.html5Types[$attrs.type];
- isHtml5DateInput = true;
- } else {
- dateFormat = $attrs.uibDatepickerPopup || datepickerPopupConfig.datepickerPopup;
- $attrs.$observe('uibDatepickerPopup', function(value, oldValue) {
- var newDateFormat = value || datepickerPopupConfig.datepickerPopup;
- // Invalidate the $modelValue to ensure that formatters re-run
- // FIXME: Refactor when PR is merged: https://github.com/angular/angular.js/pull/10764
- if (newDateFormat !== dateFormat) {
- dateFormat = newDateFormat;
- ngModel.$modelValue = null;
-
- if (!dateFormat) {
- throw new Error('uibDatepickerPopup must have a date format specified.');
- }
- }
- });
- }
-
- if (!dateFormat) {
- throw new Error('uibDatepickerPopup must have a date format specified.');
- }
-
- if (isHtml5DateInput && $attrs.uibDatepickerPopup) {
- throw new Error('HTML5 date input types do not support custom formats.');
- }
-
- // popup element used to display calendar
- popupEl = angular.element('<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>');
-
- popupEl.attr({
- 'ng-model': 'date',
- 'ng-change': 'dateSelection(date)',
- 'template-url': datepickerPopupTemplateUrl
- });
-
- // datepicker element
- datepickerEl = angular.element(popupEl.children()[0]);
- datepickerEl.attr('template-url', datepickerTemplateUrl);
-
- if (!$scope.datepickerOptions) {
- $scope.datepickerOptions = {};
- }
-
- if (isHtml5DateInput) {
- if ($attrs.type === 'month') {
- $scope.datepickerOptions.datepickerMode = 'month';
- $scope.datepickerOptions.minMode = 'month';
- }
- }
-
- datepickerEl.attr('datepicker-options', 'datepickerOptions');
-
- if (!isHtml5DateInput) {
- // Internal API to maintain the correct ng-invalid-[key] class
- ngModel.$$parserName = 'date';
- ngModel.$validators.date = validator;
- ngModel.$parsers.unshift(parseDate);
- ngModel.$formatters.push(function(value) {
- if (ngModel.$isEmpty(value)) {
- $scope.date = value;
- return value;
- }
-
- if (angular.isNumber(value)) {
- value = new Date(value);
- }
-
- $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone'));
-
- return dateParser.filter($scope.date, dateFormat);
- });
- } else {
- ngModel.$formatters.push(function(value) {
- $scope.date = dateParser.fromTimezone(value, ngModelOptions.getOption('timezone'));
- return value;
- });
- }
-
- // Detect changes in the view from the text box
- ngModel.$viewChangeListeners.push(function() {
- $scope.date = parseDateString(ngModel.$viewValue);
- });
-
- $element.on('keydown', inputKeydownBind);
-
- $popup = $compile(popupEl)($scope);
- // Prevent jQuery cache memory leak (template is now redundant after linking)
- popupEl.remove();
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else {
- $element.after($popup);
- }
-
- $scope.$on('$destroy', function() {
- if ($scope.isOpen === true) {
- if (!$rootScope.$$phase) {
- $scope.$apply(function() {
- $scope.isOpen = false;
- });
- }
- }
-
- $popup.remove();
- $element.off('keydown', inputKeydownBind);
- $document.off('click', documentClickBind);
- if (scrollParentEl) {
- scrollParentEl.off('scroll', positionPopup);
- }
- angular.element($window).off('resize', positionPopup);
-
- //Clear all watch listeners on destroy
- while (watchListeners.length) {
- watchListeners.shift()();
- }
- });
- };
-
- $scope.getText = function(key) {
- return $scope[key + 'Text'] || datepickerPopupConfig[key + 'Text'];
- };
-
- $scope.isDisabled = function(date) {
- if (date === 'today') {
- date = dateParser.fromTimezone(new Date(), ngModelOptions.getOption('timezone'));
- }
-
- var dates = {};
- angular.forEach(['minDate', 'maxDate'], function(key) {
- if (!$scope.datepickerOptions[key]) {
- dates[key] = null;
- } else if (angular.isDate($scope.datepickerOptions[key])) {
- dates[key] = new Date($scope.datepickerOptions[key]);
- } else {
- if ($datepickerPopupLiteralWarning) {
- $log.warn('Literal date support has been deprecated, please switch to date object usage');
- }
-
- dates[key] = new Date(dateFilter($scope.datepickerOptions[key], 'medium'));
- }
- });
-
- return $scope.datepickerOptions &&
- dates.minDate && $scope.compare(date, dates.minDate) < 0 ||
- dates.maxDate && $scope.compare(date, dates.maxDate) > 0;
- };
-
- $scope.compare = function(date1, date2) {
- return new Date(date1.getFullYear(), date1.getMonth(), date1.getDate()) - new Date(date2.getFullYear(), date2.getMonth(), date2.getDate());
- };
-
- // Inner change
- $scope.dateSelection = function(dt) {
- $scope.date = dt;
- var date = $scope.date ? dateParser.filter($scope.date, dateFormat) : null; // Setting to NULL is necessary for form validators to function
- $element.val(date);
- ngModel.$setViewValue(date);
-
- if (closeOnDateSelection) {
- $scope.isOpen = false;
- $element[0].focus();
- }
- };
-
- $scope.keydown = function(evt) {
- if (evt.which === 27) {
- evt.stopPropagation();
- $scope.isOpen = false;
- $element[0].focus();
- }
- };
-
- $scope.select = function(date, evt) {
- evt.stopPropagation();
-
- if (date === 'today') {
- var today = new Date();
- if (angular.isDate($scope.date)) {
- date = new Date($scope.date);
- date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());
- } else {
- date = dateParser.fromTimezone(today, ngModelOptions.getOption('timezone'));
- date.setHours(0, 0, 0, 0);
- }
- }
- $scope.dateSelection(date);
- };
-
- $scope.close = function(evt) {
- evt.stopPropagation();
-
- $scope.isOpen = false;
- $element[0].focus();
- };
-
- $scope.disabled = angular.isDefined($attrs.disabled) || false;
- if ($attrs.ngDisabled) {
- watchListeners.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(disabled) {
- $scope.disabled = disabled;
- }));
- }
-
- $scope.$watch('isOpen', function(value) {
- if (value) {
- if (!$scope.disabled) {
- $timeout(function() {
- positionPopup();
-
- if (onOpenFocus) {
- $scope.$broadcast('uib:datepicker.focus');
- }
-
- $document.on('click', documentClickBind);
-
- var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;
- if (appendToBody || $position.parsePlacement(placement)[2]) {
- scrollParentEl = scrollParentEl || angular.element($position.scrollParent($element));
- if (scrollParentEl) {
- scrollParentEl.on('scroll', positionPopup);
- }
- } else {
- scrollParentEl = null;
- }
-
- angular.element($window).on('resize', positionPopup);
- }, 0, false);
- } else {
- $scope.isOpen = false;
- }
- } else {
- $document.off('click', documentClickBind);
- if (scrollParentEl) {
- scrollParentEl.off('scroll', positionPopup);
- }
- angular.element($window).off('resize', positionPopup);
- }
- });
-
- function cameltoDash(string) {
- return string.replace(/([A-Z])/g, function($1) { return '-' + $1.toLowerCase(); });
- }
-
- function parseDateString(viewValue) {
- var date = dateParser.parse(viewValue, dateFormat, $scope.date);
- if (isNaN(date)) {
- for (var i = 0; i < altInputFormats.length; i++) {
- date = dateParser.parse(viewValue, altInputFormats[i], $scope.date);
- if (!isNaN(date)) {
- return date;
- }
- }
- }
- return date;
- }
-
- function parseDate(viewValue) {
- if (angular.isNumber(viewValue)) {
- // presumably timestamp to date object
- viewValue = new Date(viewValue);
- }
-
- if (!viewValue) {
- return null;
- }
-
- if (angular.isDate(viewValue) && !isNaN(viewValue)) {
- return viewValue;
- }
-
- if (angular.isString(viewValue)) {
- var date = parseDateString(viewValue);
- if (!isNaN(date)) {
- return dateParser.toTimezone(date, ngModelOptions.getOption('timezone'));
- }
- }
-
- return ngModelOptions.getOption('allowInvalid') ? viewValue : undefined;
- }
-
- function validator(modelValue, viewValue) {
- var value = modelValue || viewValue;
-
- if (!$attrs.ngRequired && !value) {
- return true;
- }
-
- if (angular.isNumber(value)) {
- value = new Date(value);
- }
-
- if (!value) {
- return true;
- }
-
- if (angular.isDate(value) && !isNaN(value)) {
- return true;
- }
-
- if (angular.isString(value)) {
- return !isNaN(parseDateString(value));
- }
-
- return false;
- }
-
- function documentClickBind(event) {
- if (!$scope.isOpen && $scope.disabled) {
- return;
- }
-
- var popup = $popup[0];
- var dpContainsTarget = $element[0].contains(event.target);
- // The popup node may not be an element node
- // In some browsers (IE) only element nodes have the 'contains' function
- var popupContainsTarget = popup.contains !== undefined && popup.contains(event.target);
- if ($scope.isOpen && !(dpContainsTarget || popupContainsTarget)) {
- $scope.$apply(function() {
- $scope.isOpen = false;
- });
- }
- }
-
- function inputKeydownBind(evt) {
- if (evt.which === 27 && $scope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.$apply(function() {
- $scope.isOpen = false;
- });
- $element[0].focus();
- } else if (evt.which === 40 && !$scope.isOpen) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.$apply(function() {
- $scope.isOpen = true;
- });
- }
- }
-
- function positionPopup() {
- if ($scope.isOpen) {
- var dpElement = angular.element($popup[0].querySelector('.uib-datepicker-popup'));
- var placement = $attrs.popupPlacement ? $attrs.popupPlacement : datepickerPopupConfig.placement;
- var position = $position.positionElements($element, dpElement, placement, appendToBody);
- dpElement.css({top: position.top + 'px', left: position.left + 'px'});
- if (dpElement.hasClass('uib-position-measure')) {
- dpElement.removeClass('uib-position-measure');
- }
- }
- }
-
- function extractOptions(ngModelCtrl) {
- var ngModelOptions;
-
- if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing
- // guarantee a value
- ngModelOptions = angular.isObject(ngModelCtrl.$options) ?
- ngModelCtrl.$options :
- {
- timezone: null
- };
-
- // mimic 1.6+ api
- ngModelOptions.getOption = function (key) {
- return ngModelOptions[key];
- };
- } else { // in angular >=1.6 $options is always present
- ngModelOptions = ngModelCtrl.$options;
- }
-
- return ngModelOptions;
- }
-
- $scope.$on('uib:datepicker.mode', function() {
- $timeout(positionPopup, 0, false);
- });
-}])
-
-.directive('uibDatepickerPopup', function() {
- return {
- require: ['ngModel', 'uibDatepickerPopup'],
- controller: 'UibDatepickerPopupController',
- scope: {
- datepickerOptions: '=?',
- isOpen: '=?',
- currentText: '@',
- clearText: '@',
- closeText: '@'
- },
- link: function(scope, element, attrs, ctrls) {
- var ngModel = ctrls[0],
- ctrl = ctrls[1];
-
- ctrl.init(ngModel);
- }
- };
-})
-
-.directive('uibDatepickerPopupWrap', function() {
- return {
- restrict: 'A',
- transclude: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/datepickerPopup/popup.html';
- }
- };
-});
-
-angular.module('ui.bootstrap.debounce', [])
-/**
- * A helper, internal service that debounces a function
- */
- .factory('$$debounce', ['$timeout', function($timeout) {
- return function(callback, debounceTime) {
- var timeoutPromise;
-
- return function() {
- var self = this;
- var args = Array.prototype.slice.call(arguments);
- if (timeoutPromise) {
- $timeout.cancel(timeoutPromise);
- }
-
- timeoutPromise = $timeout(function() {
- callback.apply(self, args);
- }, debounceTime);
- };
- };
- }]);
-
-angular.module('ui.bootstrap.multiMap', [])
-/**
- * A helper, internal data structure that stores all references attached to key
- */
- .factory('$$multiMap', function() {
- return {
- createNew: function() {
- var map = {};
-
- return {
- entries: function() {
- return Object.keys(map).map(function(key) {
- return {
- key: key,
- value: map[key]
- };
- });
- },
- get: function(key) {
- return map[key];
- },
- hasKey: function(key) {
- return !!map[key];
- },
- keys: function() {
- return Object.keys(map);
- },
- put: function(key, value) {
- if (!map[key]) {
- map[key] = [];
- }
-
- map[key].push(value);
- },
- remove: function(key, value) {
- var values = map[key];
-
- if (!values) {
- return;
- }
-
- var idx = values.indexOf(value);
-
- if (idx !== -1) {
- values.splice(idx, 1);
- }
-
- if (!values.length) {
- delete map[key];
- }
- }
- };
- }
- };
- });
-
-angular.module('ui.bootstrap.dropdown', ['ui.bootstrap.multiMap', 'ui.bootstrap.position'])
-
-.constant('uibDropdownConfig', {
- appendToOpenClass: 'uib-dropdown-open',
- openClass: 'open'
-})
-
-.service('uibDropdownService', ['$document', '$rootScope', '$$multiMap', function($document, $rootScope, $$multiMap) {
- var openScope = null;
- var openedContainers = $$multiMap.createNew();
-
- this.isOnlyOpen = function(dropdownScope, appendTo) {
- var openedDropdowns = openedContainers.get(appendTo);
- if (openedDropdowns) {
- var openDropdown = openedDropdowns.reduce(function(toClose, dropdown) {
- if (dropdown.scope === dropdownScope) {
- return dropdown;
- }
-
- return toClose;
- }, {});
- if (openDropdown) {
- return openedDropdowns.length === 1;
- }
- }
-
- return false;
- };
-
- this.open = function(dropdownScope, element, appendTo) {
- if (!openScope) {
- $document.on('click', closeDropdown);
- }
-
- if (openScope && openScope !== dropdownScope) {
- openScope.isOpen = false;
- }
-
- openScope = dropdownScope;
-
- if (!appendTo) {
- return;
- }
-
- var openedDropdowns = openedContainers.get(appendTo);
- if (openedDropdowns) {
- var openedScopes = openedDropdowns.map(function(dropdown) {
- return dropdown.scope;
- });
- if (openedScopes.indexOf(dropdownScope) === -1) {
- openedContainers.put(appendTo, {
- scope: dropdownScope
- });
- }
- } else {
- openedContainers.put(appendTo, {
- scope: dropdownScope
- });
- }
- };
-
- this.close = function(dropdownScope, element, appendTo) {
- if (openScope === dropdownScope) {
- $document.off('click', closeDropdown);
- $document.off('keydown', this.keybindFilter);
- openScope = null;
- }
-
- if (!appendTo) {
- return;
- }
-
- var openedDropdowns = openedContainers.get(appendTo);
- if (openedDropdowns) {
- var dropdownToClose = openedDropdowns.reduce(function(toClose, dropdown) {
- if (dropdown.scope === dropdownScope) {
- return dropdown;
- }
-
- return toClose;
- }, {});
- if (dropdownToClose) {
- openedContainers.remove(appendTo, dropdownToClose);
- }
- }
- };
-
- var closeDropdown = function(evt) {
- // This method may still be called during the same mouse event that
- // unbound this event handler. So check openScope before proceeding.
- if (!openScope || !openScope.isOpen) { return; }
-
- if (evt && openScope.getAutoClose() === 'disabled') { return; }
-
- if (evt && evt.which === 3) { return; }
-
- var toggleElement = openScope.getToggleElement();
- if (evt && toggleElement && toggleElement[0].contains(evt.target)) {
- return;
- }
-
- var dropdownElement = openScope.getDropdownElement();
- if (evt && openScope.getAutoClose() === 'outsideClick' &&
- dropdownElement && dropdownElement[0].contains(evt.target)) {
- return;
- }
-
- openScope.focusToggleElement();
- openScope.isOpen = false;
-
- if (!$rootScope.$$phase) {
- openScope.$apply();
- }
- };
-
- this.keybindFilter = function(evt) {
- if (!openScope) {
- // see this.close as ESC could have been pressed which kills the scope so we can not proceed
- return;
- }
-
- var dropdownElement = openScope.getDropdownElement();
- var toggleElement = openScope.getToggleElement();
- var dropdownElementTargeted = dropdownElement && dropdownElement[0].contains(evt.target);
- var toggleElementTargeted = toggleElement && toggleElement[0].contains(evt.target);
- if (evt.which === 27) {
- evt.stopPropagation();
- openScope.focusToggleElement();
- closeDropdown();
- } else if (openScope.isKeynavEnabled() && [38, 40].indexOf(evt.which) !== -1 && openScope.isOpen && (dropdownElementTargeted || toggleElementTargeted)) {
- evt.preventDefault();
- evt.stopPropagation();
- openScope.focusDropdownEntry(evt.which);
- }
- };
-}])
-
-.controller('UibDropdownController', ['$scope', '$element', '$attrs', '$parse', 'uibDropdownConfig', 'uibDropdownService', '$animate', '$uibPosition', '$document', '$compile', '$templateRequest', function($scope, $element, $attrs, $parse, dropdownConfig, uibDropdownService, $animate, $position, $document, $compile, $templateRequest) {
- var self = this,
- scope = $scope.$new(), // create a child scope so we are not polluting original one
- templateScope,
- appendToOpenClass = dropdownConfig.appendToOpenClass,
- openClass = dropdownConfig.openClass,
- getIsOpen,
- setIsOpen = angular.noop,
- toggleInvoker = $attrs.onToggle ? $parse($attrs.onToggle) : angular.noop,
- keynavEnabled = false,
- selectedOption = null,
- body = $document.find('body');
-
- $element.addClass('dropdown');
-
- this.init = function() {
- if ($attrs.isOpen) {
- getIsOpen = $parse($attrs.isOpen);
- setIsOpen = getIsOpen.assign;
-
- $scope.$watch(getIsOpen, function(value) {
- scope.isOpen = !!value;
- });
- }
-
- keynavEnabled = angular.isDefined($attrs.keyboardNav);
- };
-
- this.toggle = function(open) {
- scope.isOpen = arguments.length ? !!open : !scope.isOpen;
- if (angular.isFunction(setIsOpen)) {
- setIsOpen(scope, scope.isOpen);
- }
-
- return scope.isOpen;
- };
-
- // Allow other directives to watch status
- this.isOpen = function() {
- return scope.isOpen;
- };
-
- scope.getToggleElement = function() {
- return self.toggleElement;
- };
-
- scope.getAutoClose = function() {
- return $attrs.autoClose || 'always'; //or 'outsideClick' or 'disabled'
- };
-
- scope.getElement = function() {
- return $element;
- };
-
- scope.isKeynavEnabled = function() {
- return keynavEnabled;
- };
-
- scope.focusDropdownEntry = function(keyCode) {
- var elems = self.dropdownMenu ? //If append to body is used.
- angular.element(self.dropdownMenu).find('a') :
- $element.find('ul').eq(0).find('a');
-
- switch (keyCode) {
- case 40: {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = 0;
- } else {
- self.selectedOption = self.selectedOption === elems.length - 1 ?
- self.selectedOption :
- self.selectedOption + 1;
- }
- break;
- }
- case 38: {
- if (!angular.isNumber(self.selectedOption)) {
- self.selectedOption = elems.length - 1;
- } else {
- self.selectedOption = self.selectedOption === 0 ?
- 0 : self.selectedOption - 1;
- }
- break;
- }
- }
- elems[self.selectedOption].focus();
- };
-
- scope.getDropdownElement = function() {
- return self.dropdownMenu;
- };
-
- scope.focusToggleElement = function() {
- if (self.toggleElement) {
- self.toggleElement[0].focus();
- }
- };
-
- function removeDropdownMenu() {
- $element.append(self.dropdownMenu);
- }
-
- scope.$watch('isOpen', function(isOpen, wasOpen) {
- var appendTo = null,
- appendToBody = false;
-
- if (angular.isDefined($attrs.dropdownAppendTo)) {
- var appendToEl = $parse($attrs.dropdownAppendTo)(scope);
- if (appendToEl) {
- appendTo = angular.element(appendToEl);
- }
- }
-
- if (angular.isDefined($attrs.dropdownAppendToBody)) {
- var appendToBodyValue = $parse($attrs.dropdownAppendToBody)(scope);
- if (appendToBodyValue !== false) {
- appendToBody = true;
- }
- }
-
- if (appendToBody && !appendTo) {
- appendTo = body;
- }
-
- if (appendTo && self.dropdownMenu) {
- if (isOpen) {
- appendTo.append(self.dropdownMenu);
- $element.on('$destroy', removeDropdownMenu);
- } else {
- $element.off('$destroy', removeDropdownMenu);
- removeDropdownMenu();
- }
- }
-
- if (appendTo && self.dropdownMenu) {
- var pos = $position.positionElements($element, self.dropdownMenu, 'bottom-left', true),
- css,
- rightalign,
- scrollbarPadding,
- scrollbarWidth = 0;
-
- css = {
- top: pos.top + 'px',
- display: isOpen ? 'block' : 'none'
- };
-
- rightalign = self.dropdownMenu.hasClass('dropdown-menu-right');
- if (!rightalign) {
- css.left = pos.left + 'px';
- css.right = 'auto';
- } else {
- css.left = 'auto';
- scrollbarPadding = $position.scrollbarPadding(appendTo);
-
- if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
- scrollbarWidth = scrollbarPadding.scrollbarWidth;
- }
-
- css.right = window.innerWidth - scrollbarWidth -
- (pos.left + $element.prop('offsetWidth')) + 'px';
- }
-
- // Need to adjust our positioning to be relative to the appendTo container
- // if it's not the body element
- if (!appendToBody) {
- var appendOffset = $position.offset(appendTo);
-
- css.top = pos.top - appendOffset.top + 'px';
-
- if (!rightalign) {
- css.left = pos.left - appendOffset.left + 'px';
- } else {
- css.right = window.innerWidth -
- (pos.left - appendOffset.left + $element.prop('offsetWidth')) + 'px';
- }
- }
-
- self.dropdownMenu.css(css);
- }
-
- var openContainer = appendTo ? appendTo : $element;
- var dropdownOpenClass = appendTo ? appendToOpenClass : openClass;
- var hasOpenClass = openContainer.hasClass(dropdownOpenClass);
- var isOnlyOpen = uibDropdownService.isOnlyOpen($scope, appendTo);
-
- if (hasOpenClass === !isOpen) {
- var toggleClass;
- if (appendTo) {
- toggleClass = !isOnlyOpen ? 'addClass' : 'removeClass';
- } else {
- toggleClass = isOpen ? 'addClass' : 'removeClass';
- }
- $animate[toggleClass](openContainer, dropdownOpenClass).then(function() {
- if (angular.isDefined(isOpen) && isOpen !== wasOpen) {
- toggleInvoker($scope, { open: !!isOpen });
- }
- });
- }
-
- if (isOpen) {
- if (self.dropdownMenuTemplateUrl) {
- $templateRequest(self.dropdownMenuTemplateUrl).then(function(tplContent) {
- templateScope = scope.$new();
- $compile(tplContent.trim())(templateScope, function(dropdownElement) {
- var newEl = dropdownElement;
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- $document.on('keydown', uibDropdownService.keybindFilter);
- });
- });
- } else {
- $document.on('keydown', uibDropdownService.keybindFilter);
- }
-
- scope.focusToggleElement();
- uibDropdownService.open(scope, $element, appendTo);
- } else {
- uibDropdownService.close(scope, $element, appendTo);
- if (self.dropdownMenuTemplateUrl) {
- if (templateScope) {
- templateScope.$destroy();
- }
- var newEl = angular.element('<ul class="dropdown-menu"></ul>');
- self.dropdownMenu.replaceWith(newEl);
- self.dropdownMenu = newEl;
- }
-
- self.selectedOption = null;
- }
-
- if (angular.isFunction(setIsOpen)) {
- setIsOpen($scope, isOpen);
- }
- });
-}])
-
-.directive('uibDropdown', function() {
- return {
- controller: 'UibDropdownController',
- link: function(scope, element, attrs, dropdownCtrl) {
- dropdownCtrl.init();
- }
- };
-})
-
-.directive('uibDropdownMenu', function() {
- return {
- restrict: 'A',
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl || angular.isDefined(attrs.dropdownNested)) {
- return;
- }
-
- element.addClass('dropdown-menu');
-
- var tplUrl = attrs.templateUrl;
- if (tplUrl) {
- dropdownCtrl.dropdownMenuTemplateUrl = tplUrl;
- }
-
- if (!dropdownCtrl.dropdownMenu) {
- dropdownCtrl.dropdownMenu = element;
- }
- }
- };
-})
-
-.directive('uibDropdownToggle', function() {
- return {
- require: '?^uibDropdown',
- link: function(scope, element, attrs, dropdownCtrl) {
- if (!dropdownCtrl) {
- return;
- }
-
- element.addClass('dropdown-toggle');
-
- dropdownCtrl.toggleElement = element;
-
- var toggleDropdown = function(event) {
- event.preventDefault();
-
- if (!element.hasClass('disabled') && !attrs.disabled) {
- scope.$apply(function() {
- dropdownCtrl.toggle();
- });
- }
- };
-
- element.on('click', toggleDropdown);
-
- // WAI-ARIA
- element.attr({ 'aria-haspopup': true, 'aria-expanded': false });
- scope.$watch(dropdownCtrl.isOpen, function(isOpen) {
- element.attr('aria-expanded', !!isOpen);
- });
-
- scope.$on('$destroy', function() {
- element.off('click', toggleDropdown);
- });
- }
- };
-});
-
-angular.module('ui.bootstrap.stackedMap', [])
-/**
- * A helper, internal data structure that acts as a map but also allows getting / removing
- * elements in the LIFO order
- */
- .factory('$$stackedMap', function() {
- return {
- createNew: function() {
- var stack = [];
-
- return {
- add: function(key, value) {
- stack.push({
- key: key,
- value: value
- });
- },
- get: function(key) {
- for (var i = 0; i < stack.length; i++) {
- if (key === stack[i].key) {
- return stack[i];
- }
- }
- },
- keys: function() {
- var keys = [];
- for (var i = 0; i < stack.length; i++) {
- keys.push(stack[i].key);
- }
- return keys;
- },
- top: function() {
- return stack[stack.length - 1];
- },
- remove: function(key) {
- var idx = -1;
- for (var i = 0; i < stack.length; i++) {
- if (key === stack[i].key) {
- idx = i;
- break;
- }
- }
- return stack.splice(idx, 1)[0];
- },
- removeTop: function() {
- return stack.pop();
- },
- length: function() {
- return stack.length;
- }
- };
- }
- };
- });
-angular.module('ui.bootstrap.modal', ['ui.bootstrap.multiMap', 'ui.bootstrap.stackedMap', 'ui.bootstrap.position'])
-/**
- * Pluggable resolve mechanism for the modal resolve resolution
- * Supports UI Router's $resolve service
- */
- .provider('$uibResolve', function() {
- var resolve = this;
- this.resolver = null;
-
- this.setResolver = function(resolver) {
- this.resolver = resolver;
- };
-
- this.$get = ['$injector', '$q', function($injector, $q) {
- var resolver = resolve.resolver ? $injector.get(resolve.resolver) : null;
- return {
- resolve: function(invocables, locals, parent, self) {
- if (resolver) {
- return resolver.resolve(invocables, locals, parent, self);
- }
-
- var promises = [];
-
- angular.forEach(invocables, function(value) {
- if (angular.isFunction(value) || angular.isArray(value)) {
- promises.push($q.resolve($injector.invoke(value)));
- } else if (angular.isString(value)) {
- promises.push($q.resolve($injector.get(value)));
- } else {
- promises.push($q.resolve(value));
- }
- });
-
- return $q.all(promises).then(function(resolves) {
- var resolveObj = {};
- var resolveIter = 0;
- angular.forEach(invocables, function(value, key) {
- resolveObj[key] = resolves[resolveIter++];
- });
-
- return resolveObj;
- });
- }
- };
- }];
- })
-
-/**
- * A helper directive for the $modal service. It creates a backdrop element.
- */
- .directive('uibModalBackdrop', ['$animate', '$injector', '$uibModalStack',
- function($animate, $injector, $modalStack) {
- return {
- restrict: 'A',
- compile: function(tElement, tAttrs) {
- tElement.addClass(tAttrs.backdropClass);
- return linkFn;
- }
- };
-
- function linkFn(scope, element, attrs) {
- if (attrs.modalInClass) {
- $animate.addClass(element, attrs.modalInClass);
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- if (scope.modalOptions.animation) {
- $animate.removeClass(element, attrs.modalInClass).then(done);
- } else {
- done();
- }
- });
- }
- }
- }])
-
- .directive('uibModalWindow', ['$uibModalStack', '$q', '$animateCss', '$document',
- function($modalStack, $q, $animateCss, $document) {
- return {
- scope: {
- index: '@'
- },
- restrict: 'A',
- transclude: true,
- templateUrl: function(tElement, tAttrs) {
- return tAttrs.templateUrl || 'uib/template/modal/window.html';
- },
- link: function(scope, element, attrs) {
- element.addClass(attrs.windowTopClass || '');
- scope.size = attrs.size;
-
- scope.close = function(evt) {
- var modal = $modalStack.getTop();
- if (modal && modal.value.backdrop &&
- modal.value.backdrop !== 'static' &&
- evt.target === evt.currentTarget) {
- evt.preventDefault();
- evt.stopPropagation();
- $modalStack.dismiss(modal.key, 'backdrop click');
- }
- };
-
- // moved from template to fix issue #2280
- element.on('click', scope.close);
-
- // This property is only added to the scope for the purpose of detecting when this directive is rendered.
- // We can detect that by using this property in the template associated with this directive and then use
- // {@link Attribute#$observe} on it. For more details please see {@link TableColumnResize}.
- scope.$isRendered = true;
-
- // Deferred object that will be resolved when this modal is rendered.
- var modalRenderDeferObj = $q.defer();
- // Resolve render promise post-digest
- scope.$$postDigest(function() {
- modalRenderDeferObj.resolve();
- });
-
- modalRenderDeferObj.promise.then(function() {
- var animationPromise = null;
-
- if (attrs.modalInClass) {
- animationPromise = $animateCss(element, {
- addClass: attrs.modalInClass
- }).start();
-
- scope.$on($modalStack.NOW_CLOSING_EVENT, function(e, setIsAsync) {
- var done = setIsAsync();
- $animateCss(element, {
- removeClass: attrs.modalInClass
- }).start().then(done);
- });
- }
-
-
- $q.when(animationPromise).then(function() {
- // Notify {@link $modalStack} that modal is rendered.
- var modal = $modalStack.getTop();
- if (modal) {
- $modalStack.modalRendered(modal.key);
- }
-
- /**
- * If something within the freshly-opened modal already has focus (perhaps via a
- * directive that causes focus) then there's no need to try to focus anything.
- */
- if (!($document[0].activeElement && element[0].contains($document[0].activeElement))) {
- var inputWithAutofocus = element[0].querySelector('[autofocus]');
- /**
- * Auto-focusing of a freshly-opened modal element causes any child elements
- * with the autofocus attribute to lose focus. This is an issue on touch
- * based devices which will show and then hide the onscreen keyboard.
- * Attempts to refocus the autofocus element via JavaScript will not reopen
- * the onscreen keyboard. Fixed by updated the focusing logic to only autofocus
- * the modal element if the modal does not contain an autofocus element.
- */
- if (inputWithAutofocus) {
- inputWithAutofocus.focus();
- } else {
- element[0].focus();
- }
- }
- });
- });
- }
- };
- }])
-
- .directive('uibModalAnimationClass', function() {
- return {
- compile: function(tElement, tAttrs) {
- if (tAttrs.modalAnimation) {
- tElement.addClass(tAttrs.uibModalAnimationClass);
- }
- }
- };
- })
-
- .directive('uibModalTransclude', ['$animate', function($animate) {
- return {
- link: function(scope, element, attrs, controller, transclude) {
- transclude(scope.$parent, function(clone) {
- element.empty();
- $animate.enter(clone, element);
- });
- }
- };
- }])
-
- .factory('$uibModalStack', ['$animate', '$animateCss', '$document',
- '$compile', '$rootScope', '$q', '$$multiMap', '$$stackedMap', '$uibPosition',
- function($animate, $animateCss, $document, $compile, $rootScope, $q, $$multiMap, $$stackedMap, $uibPosition) {
- var OPENED_MODAL_CLASS = 'modal-open';
-
- var backdropDomEl, backdropScope;
- var openedWindows = $$stackedMap.createNew();
- var openedClasses = $$multiMap.createNew();
- var $modalStack = {
- NOW_CLOSING_EVENT: 'modal.stack.now-closing'
- };
- var topModalIndex = 0;
- var previousTopOpenedModal = null;
- var ARIA_HIDDEN_ATTRIBUTE_NAME = 'data-bootstrap-modal-aria-hidden-count';
-
- //Modal focus behavior
- var tabbableSelector = 'a[href], area[href], input:not([disabled]):not([tabindex=\'-1\']), ' +
- 'button:not([disabled]):not([tabindex=\'-1\']),select:not([disabled]):not([tabindex=\'-1\']), textarea:not([disabled]):not([tabindex=\'-1\']), ' +
- 'iframe, object, embed, *[tabindex]:not([tabindex=\'-1\']), *[contenteditable=true]';
- var scrollbarPadding;
- var SNAKE_CASE_REGEXP = /[A-Z]/g;
-
- // TODO: extract into common dependency with tooltip
- function snake_case(name) {
- var separator = '-';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- function isVisible(element) {
- return !!(element.offsetWidth ||
- element.offsetHeight ||
- element.getClientRects().length);
- }
-
- function backdropIndex() {
- var topBackdropIndex = -1;
- var opened = openedWindows.keys();
- for (var i = 0; i < opened.length; i++) {
- if (openedWindows.get(opened[i]).value.backdrop) {
- topBackdropIndex = i;
- }
- }
-
- // If any backdrop exist, ensure that it's index is always
- // right below the top modal
- if (topBackdropIndex > -1 && topBackdropIndex < topModalIndex) {
- topBackdropIndex = topModalIndex;
- }
- return topBackdropIndex;
- }
-
- $rootScope.$watch(backdropIndex, function(newBackdropIndex) {
- if (backdropScope) {
- backdropScope.index = newBackdropIndex;
- }
- });
-
- function removeModalWindow(modalInstance, elementToReceiveFocus) {
- var modalWindow = openedWindows.get(modalInstance).value;
- var appendToElement = modalWindow.appendTo;
-
- //clean up the stack
- openedWindows.remove(modalInstance);
- previousTopOpenedModal = openedWindows.top();
- if (previousTopOpenedModal) {
- topModalIndex = parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10);
- }
-
- removeAfterAnimate(modalWindow.modalDomEl, modalWindow.modalScope, function() {
- var modalBodyClass = modalWindow.openedClass || OPENED_MODAL_CLASS;
- openedClasses.remove(modalBodyClass, modalInstance);
- var areAnyOpen = openedClasses.hasKey(modalBodyClass);
- appendToElement.toggleClass(modalBodyClass, areAnyOpen);
- if (!areAnyOpen && scrollbarPadding && scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
- if (scrollbarPadding.originalRight) {
- appendToElement.css({paddingRight: scrollbarPadding.originalRight + 'px'});
- } else {
- appendToElement.css({paddingRight: ''});
- }
- scrollbarPadding = null;
- }
- toggleTopWindowClass(true);
- }, modalWindow.closedDeferred);
- checkRemoveBackdrop();
-
- //move focus to specified element if available, or else to body
- if (elementToReceiveFocus && elementToReceiveFocus.focus) {
- elementToReceiveFocus.focus();
- } else if (appendToElement.focus) {
- appendToElement.focus();
- }
- }
-
- // Add or remove "windowTopClass" from the top window in the stack
- function toggleTopWindowClass(toggleSwitch) {
- var modalWindow;
-
- if (openedWindows.length() > 0) {
- modalWindow = openedWindows.top().value;
- modalWindow.modalDomEl.toggleClass(modalWindow.windowTopClass || '', toggleSwitch);
- }
- }
-
- function checkRemoveBackdrop() {
- //remove backdrop if no longer needed
- if (backdropDomEl && backdropIndex() === -1) {
- var backdropScopeRef = backdropScope;
- removeAfterAnimate(backdropDomEl, backdropScope, function() {
- backdropScopeRef = null;
- });
- backdropDomEl = undefined;
- backdropScope = undefined;
- }
- }
-
- function removeAfterAnimate(domEl, scope, done, closedDeferred) {
- var asyncDeferred;
- var asyncPromise = null;
- var setIsAsync = function() {
- if (!asyncDeferred) {
- asyncDeferred = $q.defer();
- asyncPromise = asyncDeferred.promise;
- }
-
- return function asyncDone() {
- asyncDeferred.resolve();
- };
- };
- scope.$broadcast($modalStack.NOW_CLOSING_EVENT, setIsAsync);
-
- // Note that it's intentional that asyncPromise might be null.
- // That's when setIsAsync has not been called during the
- // NOW_CLOSING_EVENT broadcast.
- return $q.when(asyncPromise).then(afterAnimating);
-
- function afterAnimating() {
- if (afterAnimating.done) {
- return;
- }
- afterAnimating.done = true;
-
- $animate.leave(domEl).then(function() {
- if (done) {
- done();
- }
-
- domEl.remove();
- if (closedDeferred) {
- closedDeferred.resolve();
- }
- });
-
- scope.$destroy();
- }
- }
-
- $document.on('keydown', keydownListener);
-
- $rootScope.$on('$destroy', function() {
- $document.off('keydown', keydownListener);
- });
-
- function keydownListener(evt) {
- if (evt.isDefaultPrevented()) {
- return evt;
- }
-
- var modal = openedWindows.top();
- if (modal) {
- switch (evt.which) {
- case 27: {
- if (modal.value.keyboard) {
- evt.preventDefault();
- $rootScope.$apply(function() {
- $modalStack.dismiss(modal.key, 'escape key press');
- });
- }
- break;
- }
- case 9: {
- var list = $modalStack.loadFocusElementList(modal);
- var focusChanged = false;
- if (evt.shiftKey) {
- if ($modalStack.isFocusInFirstItem(evt, list) || $modalStack.isModalFocused(evt, modal)) {
- focusChanged = $modalStack.focusLastFocusableElement(list);
- }
- } else {
- if ($modalStack.isFocusInLastItem(evt, list)) {
- focusChanged = $modalStack.focusFirstFocusableElement(list);
- }
- }
-
- if (focusChanged) {
- evt.preventDefault();
- evt.stopPropagation();
- }
-
- break;
- }
- }
- }
- }
-
- $modalStack.open = function(modalInstance, modal) {
- var modalOpener = $document[0].activeElement,
- modalBodyClass = modal.openedClass || OPENED_MODAL_CLASS;
-
- toggleTopWindowClass(false);
-
- // Store the current top first, to determine what index we ought to use
- // for the current top modal
- previousTopOpenedModal = openedWindows.top();
-
- openedWindows.add(modalInstance, {
- deferred: modal.deferred,
- renderDeferred: modal.renderDeferred,
- closedDeferred: modal.closedDeferred,
- modalScope: modal.scope,
- backdrop: modal.backdrop,
- keyboard: modal.keyboard,
- openedClass: modal.openedClass,
- windowTopClass: modal.windowTopClass,
- animation: modal.animation,
- appendTo: modal.appendTo
- });
-
- openedClasses.put(modalBodyClass, modalInstance);
-
- var appendToElement = modal.appendTo,
- currBackdropIndex = backdropIndex();
-
- if (currBackdropIndex >= 0 && !backdropDomEl) {
- backdropScope = $rootScope.$new(true);
- backdropScope.modalOptions = modal;
- backdropScope.index = currBackdropIndex;
- backdropDomEl = angular.element('<div uib-modal-backdrop="modal-backdrop"></div>');
- backdropDomEl.attr({
- 'class': 'modal-backdrop',
- 'ng-style': '{\'z-index\': 1040 + (index && 1 || 0) + index*10}',
- 'uib-modal-animation-class': 'fade',
- 'modal-in-class': 'in'
- });
- if (modal.backdropClass) {
- backdropDomEl.addClass(modal.backdropClass);
- }
-
- if (modal.animation) {
- backdropDomEl.attr('modal-animation', 'true');
- }
- $compile(backdropDomEl)(backdropScope);
- $animate.enter(backdropDomEl, appendToElement);
- if ($uibPosition.isScrollable(appendToElement)) {
- scrollbarPadding = $uibPosition.scrollbarPadding(appendToElement);
- if (scrollbarPadding.heightOverflow && scrollbarPadding.scrollbarWidth) {
- appendToElement.css({paddingRight: scrollbarPadding.right + 'px'});
- }
- }
- }
-
- var content;
- if (modal.component) {
- content = document.createElement(snake_case(modal.component.name));
- content = angular.element(content);
- content.attr({
- resolve: '$resolve',
- 'modal-instance': '$uibModalInstance',
- close: '$close($value)',
- dismiss: '$dismiss($value)'
- });
- } else {
- content = modal.content;
- }
-
- // Set the top modal index based on the index of the previous top modal
- topModalIndex = previousTopOpenedModal ? parseInt(previousTopOpenedModal.value.modalDomEl.attr('index'), 10) + 1 : 0;
- var angularDomEl = angular.element('<div uib-modal-window="modal-window"></div>');
- angularDomEl.attr({
- 'class': 'modal',
- 'template-url': modal.windowTemplateUrl,
- 'window-top-class': modal.windowTopClass,
- 'role': 'dialog',
- 'aria-labelledby': modal.ariaLabelledBy,
- 'aria-describedby': modal.ariaDescribedBy,
- 'size': modal.size,
- 'index': topModalIndex,
- 'animate': 'animate',
- 'ng-style': '{\'z-index\': 1050 + $$topModalIndex*10, display: \'block\'}',
- 'tabindex': -1,
- 'uib-modal-animation-class': 'fade',
- 'modal-in-class': 'in'
- }).append(content);
- if (modal.windowClass) {
- angularDomEl.addClass(modal.windowClass);
- }
-
- if (modal.animation) {
- angularDomEl.attr('modal-animation', 'true');
- }
-
- appendToElement.addClass(modalBodyClass);
- if (modal.scope) {
- // we need to explicitly add the modal index to the modal scope
- // because it is needed by ngStyle to compute the zIndex property.
- modal.scope.$$topModalIndex = topModalIndex;
- }
- $animate.enter($compile(angularDomEl)(modal.scope), appendToElement);
-
- openedWindows.top().value.modalDomEl = angularDomEl;
- openedWindows.top().value.modalOpener = modalOpener;
-
- applyAriaHidden(angularDomEl);
-
- function applyAriaHidden(el) {
- if (!el || el[0].tagName === 'BODY') {
- return;
- }
-
- getSiblings(el).forEach(function(sibling) {
- var elemIsAlreadyHidden = sibling.getAttribute('aria-hidden') === 'true',
- ariaHiddenCount = parseInt(sibling.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10);
-
- if (!ariaHiddenCount) {
- ariaHiddenCount = elemIsAlreadyHidden ? 1 : 0;
- }
-
- sibling.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, ariaHiddenCount + 1);
- sibling.setAttribute('aria-hidden', 'true');
- });
-
- return applyAriaHidden(el.parent());
-
- function getSiblings(el) {
- var children = el.parent() ? el.parent().children() : [];
-
- return Array.prototype.filter.call(children, function(child) {
- return child !== el[0];
- });
- }
- }
- };
-
- function broadcastClosing(modalWindow, resultOrReason, closing) {
- return !modalWindow.value.modalScope.$broadcast('modal.closing', resultOrReason, closing).defaultPrevented;
- }
-
- function unhideBackgroundElements() {
- Array.prototype.forEach.call(
- document.querySelectorAll('[' + ARIA_HIDDEN_ATTRIBUTE_NAME + ']'),
- function(hiddenEl) {
- var ariaHiddenCount = parseInt(hiddenEl.getAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME), 10),
- newHiddenCount = ariaHiddenCount - 1;
- hiddenEl.setAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME, newHiddenCount);
-
- if (!newHiddenCount) {
- hiddenEl.removeAttribute(ARIA_HIDDEN_ATTRIBUTE_NAME);
- hiddenEl.removeAttribute('aria-hidden');
- }
- }
- );
- }
-
- $modalStack.close = function(modalInstance, result) {
- var modalWindow = openedWindows.get(modalInstance);
- unhideBackgroundElements();
- if (modalWindow && broadcastClosing(modalWindow, result, true)) {
- modalWindow.value.modalScope.$$uibDestructionScheduled = true;
- modalWindow.value.deferred.resolve(result);
- removeModalWindow(modalInstance, modalWindow.value.modalOpener);
- return true;
- }
-
- return !modalWindow;
- };
-
- $modalStack.dismiss = function(modalInstance, reason) {
- var modalWindow = openedWindows.get(modalInstance);
- unhideBackgroundElements();
- if (modalWindow && broadcastClosing(modalWindow, reason, false)) {
- modalWindow.value.modalScope.$$uibDestructionScheduled = true;
- modalWindow.value.deferred.reject(reason);
- removeModalWindow(modalInstance, modalWindow.value.modalOpener);
- return true;
- }
- return !modalWindow;
- };
-
- $modalStack.dismissAll = function(reason) {
- var topModal = this.getTop();
- while (topModal && this.dismiss(topModal.key, reason)) {
- topModal = this.getTop();
- }
- };
-
- $modalStack.getTop = function() {
- return openedWindows.top();
- };
-
- $modalStack.modalRendered = function(modalInstance) {
- var modalWindow = openedWindows.get(modalInstance);
- if (modalWindow) {
- modalWindow.value.renderDeferred.resolve();
- }
- };
-
- $modalStack.focusFirstFocusableElement = function(list) {
- if (list.length > 0) {
- list[0].focus();
- return true;
- }
- return false;
- };
-
- $modalStack.focusLastFocusableElement = function(list) {
- if (list.length > 0) {
- list[list.length - 1].focus();
- return true;
- }
- return false;
- };
-
- $modalStack.isModalFocused = function(evt, modalWindow) {
- if (evt && modalWindow) {
- var modalDomEl = modalWindow.value.modalDomEl;
- if (modalDomEl && modalDomEl.length) {
- return (evt.target || evt.srcElement) === modalDomEl[0];
- }
- }
- return false;
- };
-
- $modalStack.isFocusInFirstItem = function(evt, list) {
- if (list.length > 0) {
- return (evt.target || evt.srcElement) === list[0];
- }
- return false;
- };
-
- $modalStack.isFocusInLastItem = function(evt, list) {
- if (list.length > 0) {
- return (evt.target || evt.srcElement) === list[list.length - 1];
- }
- return false;
- };
-
- $modalStack.loadFocusElementList = function(modalWindow) {
- if (modalWindow) {
- var modalDomE1 = modalWindow.value.modalDomEl;
- if (modalDomE1 && modalDomE1.length) {
- var elements = modalDomE1[0].querySelectorAll(tabbableSelector);
- return elements ?
- Array.prototype.filter.call(elements, function(element) {
- return isVisible(element);
- }) : elements;
- }
- }
- };
-
- return $modalStack;
- }])
-
- .provider('$uibModal', function() {
- var $modalProvider = {
- options: {
- animation: true,
- backdrop: true, //can also be false or 'static'
- keyboard: true
- },
- $get: ['$rootScope', '$q', '$document', '$templateRequest', '$controller', '$uibResolve', '$uibModalStack',
- function ($rootScope, $q, $document, $templateRequest, $controller, $uibResolve, $modalStack) {
- var $modal = {};
-
- function getTemplatePromise(options) {
- return options.template ? $q.when(options.template) :
- $templateRequest(angular.isFunction(options.templateUrl) ?
- options.templateUrl() : options.templateUrl);
- }
-
- var promiseChain = null;
- $modal.getPromiseChain = function() {
- return promiseChain;
- };
-
- $modal.open = function(modalOptions) {
- var modalResultDeferred = $q.defer();
- var modalOpenedDeferred = $q.defer();
- var modalClosedDeferred = $q.defer();
- var modalRenderDeferred = $q.defer();
-
- //prepare an instance of a modal to be injected into controllers and returned to a caller
- var modalInstance = {
- result: modalResultDeferred.promise,
- opened: modalOpenedDeferred.promise,
- closed: modalClosedDeferred.promise,
- rendered: modalRenderDeferred.promise,
- close: function (result) {
- return $modalStack.close(modalInstance, result);
- },
- dismiss: function (reason) {
- return $modalStack.dismiss(modalInstance, reason);
- }
- };
-
- //merge and clean up options
- modalOptions = angular.extend({}, $modalProvider.options, modalOptions);
- modalOptions.resolve = modalOptions.resolve || {};
- modalOptions.appendTo = modalOptions.appendTo || $document.find('body').eq(0);
-
- if (!modalOptions.appendTo.length) {
- throw new Error('appendTo element not found. Make sure that the element passed is in DOM.');
- }
-
- //verify options
- if (!modalOptions.component && !modalOptions.template && !modalOptions.templateUrl) {
- throw new Error('One of component or template or templateUrl options is required.');
- }
-
- var templateAndResolvePromise;
- if (modalOptions.component) {
- templateAndResolvePromise = $q.when($uibResolve.resolve(modalOptions.resolve, {}, null, null));
- } else {
- templateAndResolvePromise =
- $q.all([getTemplatePromise(modalOptions), $uibResolve.resolve(modalOptions.resolve, {}, null, null)]);
- }
-
- function resolveWithTemplate() {
- return templateAndResolvePromise;
- }
-
- // Wait for the resolution of the existing promise chain.
- // Then switch to our own combined promise dependency (regardless of how the previous modal fared).
- // Then add to $modalStack and resolve opened.
- // Finally clean up the chain variable if no subsequent modal has overwritten it.
- var samePromise;
- samePromise = promiseChain = $q.all([promiseChain])
- .then(resolveWithTemplate, resolveWithTemplate)
- .then(function resolveSuccess(tplAndVars) {
- var providedScope = modalOptions.scope || $rootScope;
-
- var modalScope = providedScope.$new();
- modalScope.$close = modalInstance.close;
- modalScope.$dismiss = modalInstance.dismiss;
-
- modalScope.$on('$destroy', function() {
- if (!modalScope.$$uibDestructionScheduled) {
- modalScope.$dismiss('$uibUnscheduledDestruction');
- }
- });
-
- var modal = {
- scope: modalScope,
- deferred: modalResultDeferred,
- renderDeferred: modalRenderDeferred,
- closedDeferred: modalClosedDeferred,
- animation: modalOptions.animation,
- backdrop: modalOptions.backdrop,
- keyboard: modalOptions.keyboard,
- backdropClass: modalOptions.backdropClass,
- windowTopClass: modalOptions.windowTopClass,
- windowClass: modalOptions.windowClass,
- windowTemplateUrl: modalOptions.windowTemplateUrl,
- ariaLabelledBy: modalOptions.ariaLabelledBy,
- ariaDescribedBy: modalOptions.ariaDescribedBy,
- size: modalOptions.size,
- openedClass: modalOptions.openedClass,
- appendTo: modalOptions.appendTo
- };
-
- var component = {};
- var ctrlInstance, ctrlInstantiate, ctrlLocals = {};
-
- if (modalOptions.component) {
- constructLocals(component, false, true, false);
- component.name = modalOptions.component;
- modal.component = component;
- } else if (modalOptions.controller) {
- constructLocals(ctrlLocals, true, false, true);
-
- // the third param will make the controller instantiate later,private api
- // @see https://github.com/angular/angular.js/blob/master/src/ng/controller.js#L126
- ctrlInstantiate = $controller(modalOptions.controller, ctrlLocals, true, modalOptions.controllerAs);
- if (modalOptions.controllerAs && modalOptions.bindToController) {
- ctrlInstance = ctrlInstantiate.instance;
- ctrlInstance.$close = modalScope.$close;
- ctrlInstance.$dismiss = modalScope.$dismiss;
- angular.extend(ctrlInstance, {
- $resolve: ctrlLocals.$scope.$resolve
- }, providedScope);
- }
-
- ctrlInstance = ctrlInstantiate();
-
- if (angular.isFunction(ctrlInstance.$onInit)) {
- ctrlInstance.$onInit();
- }
- }
-
- if (!modalOptions.component) {
- modal.content = tplAndVars[0];
- }
-
- $modalStack.open(modalInstance, modal);
- modalOpenedDeferred.resolve(true);
-
- function constructLocals(obj, template, instanceOnScope, injectable) {
- obj.$scope = modalScope;
- obj.$scope.$resolve = {};
- if (instanceOnScope) {
- obj.$scope.$uibModalInstance = modalInstance;
- } else {
- obj.$uibModalInstance = modalInstance;
- }
-
- var resolves = template ? tplAndVars[1] : tplAndVars;
- angular.forEach(resolves, function(value, key) {
- if (injectable) {
- obj[key] = value;
- }
-
- obj.$scope.$resolve[key] = value;
- });
- }
- }, function resolveError(reason) {
- modalOpenedDeferred.reject(reason);
- modalResultDeferred.reject(reason);
- })['finally'](function() {
- if (promiseChain === samePromise) {
- promiseChain = null;
- }
- });
-
- return modalInstance;
- };
-
- return $modal;
- }
- ]
- };
-
- return $modalProvider;
- });
-
-angular.module('ui.bootstrap.paging', [])
-/**
- * Helper internal service for generating common controller code between the
- * pager and pagination components
- */
-.factory('uibPaging', ['$parse', function($parse) {
- return {
- create: function(ctrl, $scope, $attrs) {
- ctrl.setNumPages = $attrs.numPages ? $parse($attrs.numPages).assign : angular.noop;
- ctrl.ngModelCtrl = { $setViewValue: angular.noop }; // nullModelCtrl
- ctrl._watchers = [];
-
- ctrl.init = function(ngModelCtrl, config) {
- ctrl.ngModelCtrl = ngModelCtrl;
- ctrl.config = config;
-
- ngModelCtrl.$render = function() {
- ctrl.render();
- };
-
- if ($attrs.itemsPerPage) {
- ctrl._watchers.push($scope.$parent.$watch($attrs.itemsPerPage, function(value) {
- ctrl.itemsPerPage = parseInt(value, 10);
- $scope.totalPages = ctrl.calculateTotalPages();
- ctrl.updatePage();
- }));
- } else {
- ctrl.itemsPerPage = config.itemsPerPage;
- }
-
- $scope.$watch('totalItems', function(newTotal, oldTotal) {
- if (angular.isDefined(newTotal) || newTotal !== oldTotal) {
- $scope.totalPages = ctrl.calculateTotalPages();
- ctrl.updatePage();
- }
- });
- };
-
- ctrl.calculateTotalPages = function() {
- var totalPages = ctrl.itemsPerPage < 1 ? 1 : Math.ceil($scope.totalItems / ctrl.itemsPerPage);
- return Math.max(totalPages || 0, 1);
- };
-
- ctrl.render = function() {
- $scope.page = parseInt(ctrl.ngModelCtrl.$viewValue, 10) || 1;
- };
-
- $scope.selectPage = function(page, evt) {
- if (evt) {
- evt.preventDefault();
- }
-
- var clickAllowed = !$scope.ngDisabled || !evt;
- if (clickAllowed && $scope.page !== page && page > 0 && page <= $scope.totalPages) {
- if (evt && evt.target) {
- evt.target.blur();
- }
- ctrl.ngModelCtrl.$setViewValue(page);
- ctrl.ngModelCtrl.$render();
- }
- };
-
- $scope.getText = function(key) {
- return $scope[key + 'Text'] || ctrl.config[key + 'Text'];
- };
-
- $scope.noPrevious = function() {
- return $scope.page === 1;
- };
-
- $scope.noNext = function() {
- return $scope.page === $scope.totalPages;
- };
-
- ctrl.updatePage = function() {
- ctrl.setNumPages($scope.$parent, $scope.totalPages); // Readonly variable
-
- if ($scope.page > $scope.totalPages) {
- $scope.selectPage($scope.totalPages);
- } else {
- ctrl.ngModelCtrl.$render();
- }
- };
-
- $scope.$on('$destroy', function() {
- while (ctrl._watchers.length) {
- ctrl._watchers.shift()();
- }
- });
- }
- };
-}]);
-
-angular.module('ui.bootstrap.pager', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex'])
-
-.controller('UibPagerController', ['$scope', '$attrs', 'uibPaging', 'uibPagerConfig', function($scope, $attrs, uibPaging, uibPagerConfig) {
- $scope.align = angular.isDefined($attrs.align) ? $scope.$parent.$eval($attrs.align) : uibPagerConfig.align;
-
- uibPaging.create(this, $scope, $attrs);
-}])
-
-.constant('uibPagerConfig', {
- itemsPerPage: 10,
- previousText: '« Previous',
- nextText: 'Next »',
- align: true
-})
-
-.directive('uibPager', ['uibPagerConfig', function(uibPagerConfig) {
- return {
- scope: {
- totalItems: '=',
- previousText: '@',
- nextText: '@',
- ngDisabled: '='
- },
- require: ['uibPager', '?ngModel'],
- restrict: 'A',
- controller: 'UibPagerController',
- controllerAs: 'pager',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/pager/pager.html';
- },
- link: function(scope, element, attrs, ctrls) {
- element.addClass('pager');
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- paginationCtrl.init(ngModelCtrl, uibPagerConfig);
- }
- };
-}]);
-
-angular.module('ui.bootstrap.pagination', ['ui.bootstrap.paging', 'ui.bootstrap.tabindex'])
-.controller('UibPaginationController', ['$scope', '$attrs', '$parse', 'uibPaging', 'uibPaginationConfig', function($scope, $attrs, $parse, uibPaging, uibPaginationConfig) {
- var ctrl = this;
- // Setup configuration parameters
- var maxSize = angular.isDefined($attrs.maxSize) ? $scope.$parent.$eval($attrs.maxSize) : uibPaginationConfig.maxSize,
- rotate = angular.isDefined($attrs.rotate) ? $scope.$parent.$eval($attrs.rotate) : uibPaginationConfig.rotate,
- forceEllipses = angular.isDefined($attrs.forceEllipses) ? $scope.$parent.$eval($attrs.forceEllipses) : uibPaginationConfig.forceEllipses,
- boundaryLinkNumbers = angular.isDefined($attrs.boundaryLinkNumbers) ? $scope.$parent.$eval($attrs.boundaryLinkNumbers) : uibPaginationConfig.boundaryLinkNumbers,
- pageLabel = angular.isDefined($attrs.pageLabel) ? function(idx) { return $scope.$parent.$eval($attrs.pageLabel, {$page: idx}); } : angular.identity;
- $scope.boundaryLinks = angular.isDefined($attrs.boundaryLinks) ? $scope.$parent.$eval($attrs.boundaryLinks) : uibPaginationConfig.boundaryLinks;
- $scope.directionLinks = angular.isDefined($attrs.directionLinks) ? $scope.$parent.$eval($attrs.directionLinks) : uibPaginationConfig.directionLinks;
- $attrs.$set('role', 'menu');
-
- uibPaging.create(this, $scope, $attrs);
-
- if ($attrs.maxSize) {
- ctrl._watchers.push($scope.$parent.$watch($parse($attrs.maxSize), function(value) {
- maxSize = parseInt(value, 10);
- ctrl.render();
- }));
- }
-
- // Create page object used in template
- function makePage(number, text, isActive) {
- return {
- number: number,
- text: text,
- active: isActive
- };
- }
-
- function getPages(currentPage, totalPages) {
- var pages = [];
-
- // Default page limits
- var startPage = 1, endPage = totalPages;
- var isMaxSized = angular.isDefined(maxSize) && maxSize < totalPages;
-
- // recompute if maxSize
- if (isMaxSized) {
- if (rotate) {
- // Current page is displayed in the middle of the visible ones
- startPage = Math.max(currentPage - Math.floor(maxSize / 2), 1);
- endPage = startPage + maxSize - 1;
-
- // Adjust if limit is exceeded
- if (endPage > totalPages) {
- endPage = totalPages;
- startPage = endPage - maxSize + 1;
- }
- } else {
- // Visible pages are paginated with maxSize
- startPage = (Math.ceil(currentPage / maxSize) - 1) * maxSize + 1;
-
- // Adjust last page if limit is exceeded
- endPage = Math.min(startPage + maxSize - 1, totalPages);
- }
- }
-
- // Add page number links
- for (var number = startPage; number <= endPage; number++) {
- var page = makePage(number, pageLabel(number), number === currentPage);
- pages.push(page);
- }
-
- // Add links to move between page sets
- if (isMaxSized && maxSize > 0 && (!rotate || forceEllipses || boundaryLinkNumbers)) {
- if (startPage > 1) {
- if (!boundaryLinkNumbers || startPage > 3) { //need ellipsis for all options unless range is too close to beginning
- var previousPageSet = makePage(startPage - 1, '...', false);
- pages.unshift(previousPageSet);
- }
- if (boundaryLinkNumbers) {
- if (startPage === 3) { //need to replace ellipsis when the buttons would be sequential
- var secondPageLink = makePage(2, '2', false);
- pages.unshift(secondPageLink);
- }
- //add the first page
- var firstPageLink = makePage(1, '1', false);
- pages.unshift(firstPageLink);
- }
- }
-
- if (endPage < totalPages) {
- if (!boundaryLinkNumbers || endPage < totalPages - 2) { //need ellipsis for all options unless range is too close to end
- var nextPageSet = makePage(endPage + 1, '...', false);
- pages.push(nextPageSet);
- }
- if (boundaryLinkNumbers) {
- if (endPage === totalPages - 2) { //need to replace ellipsis when the buttons would be sequential
- var secondToLastPageLink = makePage(totalPages - 1, totalPages - 1, false);
- pages.push(secondToLastPageLink);
- }
- //add the last page
- var lastPageLink = makePage(totalPages, totalPages, false);
- pages.push(lastPageLink);
- }
- }
- }
- return pages;
- }
-
- var originalRender = this.render;
- this.render = function() {
- originalRender();
- if ($scope.page > 0 && $scope.page <= $scope.totalPages) {
- $scope.pages = getPages($scope.page, $scope.totalPages);
- }
- };
-}])
-
-.constant('uibPaginationConfig', {
- itemsPerPage: 10,
- boundaryLinks: false,
- boundaryLinkNumbers: false,
- directionLinks: true,
- firstText: 'First',
- previousText: 'Previous',
- nextText: 'Next',
- lastText: 'Last',
- rotate: true,
- forceEllipses: false
-})
-
-.directive('uibPagination', ['$parse', 'uibPaginationConfig', function($parse, uibPaginationConfig) {
- return {
- scope: {
- totalItems: '=',
- firstText: '@',
- previousText: '@',
- nextText: '@',
- lastText: '@',
- ngDisabled:'='
- },
- require: ['uibPagination', '?ngModel'],
- restrict: 'A',
- controller: 'UibPaginationController',
- controllerAs: 'pagination',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/pagination/pagination.html';
- },
- link: function(scope, element, attrs, ctrls) {
- element.addClass('pagination');
- var paginationCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (!ngModelCtrl) {
- return; // do nothing if no ng-model
- }
-
- paginationCtrl.init(ngModelCtrl, uibPaginationConfig);
- }
- };
-}]);
-
-/**
- * The following features are still outstanding: animation as a
- * function, placement as a function, inside, support for more triggers than
- * just mouse enter/leave, html tooltips, and selector delegation.
- */
-angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.stackedMap'])
-
-/**
- * The $tooltip service creates tooltip- and popover-like directives as well as
- * houses global options for them.
- */
-.provider('$uibTooltip', function() {
- // The default options tooltip and popover.
- var defaultOptions = {
- placement: 'top',
- placementClassPrefix: '',
- animation: true,
- popupDelay: 0,
- popupCloseDelay: 0,
- useContentExp: false
- };
-
- // Default hide triggers for each show trigger
- var triggerMap = {
- 'mouseenter': 'mouseleave',
- 'click': 'click',
- 'outsideClick': 'outsideClick',
- 'focus': 'blur',
- 'none': ''
- };
-
- // The options specified to the provider globally.
- var globalOptions = {};
-
- /**
- * `options({})` allows global configuration of all tooltips in the
- * application.
- *
- * var app = angular.module( 'App', ['ui.bootstrap.tooltip'], function( $tooltipProvider ) {
- * // place tooltips left instead of top by default
- * $tooltipProvider.options( { placement: 'left' } );
- * });
- */
- this.options = function(value) {
- angular.extend(globalOptions, value);
- };
-
- /**
- * This allows you to extend the set of trigger mappings available. E.g.:
- *
- * $tooltipProvider.setTriggers( { 'openTrigger': 'closeTrigger' } );
- */
- this.setTriggers = function setTriggers(triggers) {
- angular.extend(triggerMap, triggers);
- };
-
- /**
- * This is a helper function for translating camel-case to snake_case.
- */
- function snake_case(name) {
- var regexp = /[A-Z]/g;
- var separator = '-';
- return name.replace(regexp, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
- }
-
- /**
- * Returns the actual instance of the $tooltip service.
- * TODO support multiple triggers
- */
- this.$get = ['$window', '$compile', '$timeout', '$document', '$uibPosition', '$interpolate', '$rootScope', '$parse', '$$stackedMap', function($window, $compile, $timeout, $document, $position, $interpolate, $rootScope, $parse, $$stackedMap) {
- var openedTooltips = $$stackedMap.createNew();
- $document.on('keyup', keypressListener);
-
- $rootScope.$on('$destroy', function() {
- $document.off('keyup', keypressListener);
- });
-
- function keypressListener(e) {
- if (e.which === 27) {
- var last = openedTooltips.top();
- if (last) {
- last.value.close();
- last = null;
- }
- }
- }
-
- return function $tooltip(ttType, prefix, defaultTriggerShow, options) {
- options = angular.extend({}, defaultOptions, globalOptions, options);
-
- /**
- * Returns an object of show and hide triggers.
- *
- * If a trigger is supplied,
- * it is used to show the tooltip; otherwise, it will use the `trigger`
- * option passed to the `$tooltipProvider.options` method; else it will
- * default to the trigger supplied to this directive factory.
- *
- * The hide trigger is based on the show trigger. If the `trigger` option
- * was passed to the `$tooltipProvider.options` method, it will use the
- * mapped trigger from `triggerMap` or the passed trigger if the map is
- * undefined; otherwise, it uses the `triggerMap` value of the show
- * trigger; else it will just use the show trigger.
- */
- function getTriggers(trigger) {
- var show = (trigger || options.trigger || defaultTriggerShow).split(' ');
- var hide = show.map(function(trigger) {
- return triggerMap[trigger] || trigger;
- });
- return {
- show: show,
- hide: hide
- };
- }
-
- var directiveName = snake_case(ttType);
-
- var startSym = $interpolate.startSymbol();
- var endSym = $interpolate.endSymbol();
- var template =
- '<div '+ directiveName + '-popup ' +
- 'uib-title="' + startSym + 'title' + endSym + '" ' +
- (options.useContentExp ?
- 'content-exp="contentExp()" ' :
- 'content="' + startSym + 'content' + endSym + '" ') +
- 'origin-scope="origScope" ' +
- 'class="uib-position-measure ' + prefix + '" ' +
- 'tooltip-animation-class="fade"' +
- 'uib-tooltip-classes ' +
- 'ng-class="{ in: isOpen }" ' +
- '>' +
- '</div>';
-
- return {
- compile: function(tElem, tAttrs) {
- var tooltipLinker = $compile(template);
-
- return function link(scope, element, attrs, tooltipCtrl) {
- var tooltip;
- var tooltipLinkedScope;
- var transitionTimeout;
- var showTimeout;
- var hideTimeout;
- var positionTimeout;
- var adjustmentTimeout;
- var appendToBody = angular.isDefined(options.appendToBody) ? options.appendToBody : false;
- var triggers = getTriggers(undefined);
- var hasEnableExp = angular.isDefined(attrs[prefix + 'Enable']);
- var ttScope = scope.$new(true);
- var repositionScheduled = false;
- var isOpenParse = angular.isDefined(attrs[prefix + 'IsOpen']) ? $parse(attrs[prefix + 'IsOpen']) : false;
- var contentParse = options.useContentExp ? $parse(attrs[ttType]) : false;
- var observers = [];
- var lastPlacement;
-
- var positionTooltip = function() {
- // check if tooltip exists and is not empty
- if (!tooltip || !tooltip.html()) { return; }
-
- if (!positionTimeout) {
- positionTimeout = $timeout(function() {
- var ttPosition = $position.positionElements(element, tooltip, ttScope.placement, appendToBody);
- var initialHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');
- var elementPos = appendToBody ? $position.offset(element) : $position.position(element);
- tooltip.css({ top: ttPosition.top + 'px', left: ttPosition.left + 'px' });
- var placementClasses = ttPosition.placement.split('-');
-
- if (!tooltip.hasClass(placementClasses[0])) {
- tooltip.removeClass(lastPlacement.split('-')[0]);
- tooltip.addClass(placementClasses[0]);
- }
-
- if (!tooltip.hasClass(options.placementClassPrefix + ttPosition.placement)) {
- tooltip.removeClass(options.placementClassPrefix + lastPlacement);
- tooltip.addClass(options.placementClassPrefix + ttPosition.placement);
- }
-
- adjustmentTimeout = $timeout(function() {
- var currentHeight = angular.isDefined(tooltip.offsetHeight) ? tooltip.offsetHeight : tooltip.prop('offsetHeight');
- var adjustment = $position.adjustTop(placementClasses, elementPos, initialHeight, currentHeight);
- if (adjustment) {
- tooltip.css(adjustment);
- }
- adjustmentTimeout = null;
- }, 0, false);
-
- // first time through tt element will have the
- // uib-position-measure class or if the placement
- // has changed we need to position the arrow.
- if (tooltip.hasClass('uib-position-measure')) {
- $position.positionArrow(tooltip, ttPosition.placement);
- tooltip.removeClass('uib-position-measure');
- } else if (lastPlacement !== ttPosition.placement) {
- $position.positionArrow(tooltip, ttPosition.placement);
- }
- lastPlacement = ttPosition.placement;
-
- positionTimeout = null;
- }, 0, false);
- }
- };
-
- // Set up the correct scope to allow transclusion later
- ttScope.origScope = scope;
-
- // By default, the tooltip is not open.
- // TODO add ability to start tooltip opened
- ttScope.isOpen = false;
-
- function toggleTooltipBind() {
- if (!ttScope.isOpen) {
- showTooltipBind();
- } else {
- hideTooltipBind();
- }
- }
-
- // Show the tooltip with delay if specified, otherwise show it immediately
- function showTooltipBind() {
- if (hasEnableExp && !scope.$eval(attrs[prefix + 'Enable'])) {
- return;
- }
-
- cancelHide();
- prepareTooltip();
-
- if (ttScope.popupDelay) {
- // Do nothing if the tooltip was already scheduled to pop-up.
- // This happens if show is triggered multiple times before any hide is triggered.
- if (!showTimeout) {
- showTimeout = $timeout(show, ttScope.popupDelay, false);
- }
- } else {
- show();
- }
- }
-
- function hideTooltipBind() {
- cancelShow();
-
- if (ttScope.popupCloseDelay) {
- if (!hideTimeout) {
- hideTimeout = $timeout(hide, ttScope.popupCloseDelay, false);
- }
- } else {
- hide();
- }
- }
-
- // Show the tooltip popup element.
- function show() {
- cancelShow();
- cancelHide();
-
- // Don't show empty tooltips.
- if (!ttScope.content) {
- return angular.noop;
- }
-
- createTooltip();
-
- // And show the tooltip.
- ttScope.$evalAsync(function() {
- ttScope.isOpen = true;
- assignIsOpen(true);
- positionTooltip();
- });
- }
-
- function cancelShow() {
- if (showTimeout) {
- $timeout.cancel(showTimeout);
- showTimeout = null;
- }
-
- if (positionTimeout) {
- $timeout.cancel(positionTimeout);
- positionTimeout = null;
- }
- }
-
- // Hide the tooltip popup element.
- function hide() {
- if (!ttScope) {
- return;
- }
-
- // First things first: we don't show it anymore.
- ttScope.$evalAsync(function() {
- if (ttScope) {
- ttScope.isOpen = false;
- assignIsOpen(false);
- // And now we remove it from the DOM. However, if we have animation, we
- // need to wait for it to expire beforehand.
- // FIXME: this is a placeholder for a port of the transitions library.
- // The fade transition in TWBS is 150ms.
- if (ttScope.animation) {
- if (!transitionTimeout) {
- transitionTimeout = $timeout(removeTooltip, 150, false);
- }
- } else {
- removeTooltip();
- }
- }
- });
- }
-
- function cancelHide() {
- if (hideTimeout) {
- $timeout.cancel(hideTimeout);
- hideTimeout = null;
- }
-
- if (transitionTimeout) {
- $timeout.cancel(transitionTimeout);
- transitionTimeout = null;
- }
- }
-
- function createTooltip() {
- // There can only be one tooltip element per directive shown at once.
- if (tooltip) {
- return;
- }
-
- tooltipLinkedScope = ttScope.$new();
- tooltip = tooltipLinker(tooltipLinkedScope, function(tooltip) {
- if (appendToBody) {
- $document.find('body').append(tooltip);
- } else {
- element.after(tooltip);
- }
- });
-
- openedTooltips.add(ttScope, {
- close: hide
- });
-
- prepObservers();
- }
-
- function removeTooltip() {
- cancelShow();
- cancelHide();
- unregisterObservers();
-
- if (tooltip) {
- tooltip.remove();
-
- tooltip = null;
- if (adjustmentTimeout) {
- $timeout.cancel(adjustmentTimeout);
- }
- }
-
- openedTooltips.remove(ttScope);
-
- if (tooltipLinkedScope) {
- tooltipLinkedScope.$destroy();
- tooltipLinkedScope = null;
- }
- }
-
- /**
- * Set the initial scope values. Once
- * the tooltip is created, the observers
- * will be added to keep things in sync.
- */
- function prepareTooltip() {
- ttScope.title = attrs[prefix + 'Title'];
- if (contentParse) {
- ttScope.content = contentParse(scope);
- } else {
- ttScope.content = attrs[ttType];
- }
-
- ttScope.popupClass = attrs[prefix + 'Class'];
- ttScope.placement = angular.isDefined(attrs[prefix + 'Placement']) ? attrs[prefix + 'Placement'] : options.placement;
- var placement = $position.parsePlacement(ttScope.placement);
- lastPlacement = placement[1] ? placement[0] + '-' + placement[1] : placement[0];
-
- var delay = parseInt(attrs[prefix + 'PopupDelay'], 10);
- var closeDelay = parseInt(attrs[prefix + 'PopupCloseDelay'], 10);
- ttScope.popupDelay = !isNaN(delay) ? delay : options.popupDelay;
- ttScope.popupCloseDelay = !isNaN(closeDelay) ? closeDelay : options.popupCloseDelay;
- }
-
- function assignIsOpen(isOpen) {
- if (isOpenParse && angular.isFunction(isOpenParse.assign)) {
- isOpenParse.assign(scope, isOpen);
- }
- }
-
- ttScope.contentExp = function() {
- return ttScope.content;
- };
-
- /**
- * Observe the relevant attributes.
- */
- attrs.$observe('disabled', function(val) {
- if (val) {
- cancelShow();
- }
-
- if (val && ttScope.isOpen) {
- hide();
- }
- });
-
- if (isOpenParse) {
- scope.$watch(isOpenParse, function(val) {
- if (ttScope && !val === ttScope.isOpen) {
- toggleTooltipBind();
- }
- });
- }
-
- function prepObservers() {
- observers.length = 0;
-
- if (contentParse) {
- observers.push(
- scope.$watch(contentParse, function(val) {
- ttScope.content = val;
- if (!val && ttScope.isOpen) {
- hide();
- }
- })
- );
-
- observers.push(
- tooltipLinkedScope.$watch(function() {
- if (!repositionScheduled) {
- repositionScheduled = true;
- tooltipLinkedScope.$$postDigest(function() {
- repositionScheduled = false;
- if (ttScope && ttScope.isOpen) {
- positionTooltip();
- }
- });
- }
- })
- );
- } else {
- observers.push(
- attrs.$observe(ttType, function(val) {
- ttScope.content = val;
- if (!val && ttScope.isOpen) {
- hide();
- } else {
- positionTooltip();
- }
- })
- );
- }
-
- observers.push(
- attrs.$observe(prefix + 'Title', function(val) {
- ttScope.title = val;
- if (ttScope.isOpen) {
- positionTooltip();
- }
- })
- );
-
- observers.push(
- attrs.$observe(prefix + 'Placement', function(val) {
- ttScope.placement = val ? val : options.placement;
- if (ttScope.isOpen) {
- positionTooltip();
- }
- })
- );
- }
-
- function unregisterObservers() {
- if (observers.length) {
- angular.forEach(observers, function(observer) {
- observer();
- });
- observers.length = 0;
- }
- }
-
- // hide tooltips/popovers for outsideClick trigger
- function bodyHideTooltipBind(e) {
- if (!ttScope || !ttScope.isOpen || !tooltip) {
- return;
- }
- // make sure the tooltip/popover link or tool tooltip/popover itself were not clicked
- if (!element[0].contains(e.target) && !tooltip[0].contains(e.target)) {
- hideTooltipBind();
- }
- }
-
- // KeyboardEvent handler to hide the tooltip on Escape key press
- function hideOnEscapeKey(e) {
- if (e.which === 27) {
- hideTooltipBind();
- }
- }
-
- var unregisterTriggers = function() {
- triggers.show.forEach(function(trigger) {
- if (trigger === 'outsideClick') {
- element.off('click', toggleTooltipBind);
- } else {
- element.off(trigger, showTooltipBind);
- element.off(trigger, toggleTooltipBind);
- }
- element.off('keypress', hideOnEscapeKey);
- });
- triggers.hide.forEach(function(trigger) {
- if (trigger === 'outsideClick') {
- $document.off('click', bodyHideTooltipBind);
- } else {
- element.off(trigger, hideTooltipBind);
- }
- });
- };
-
- function prepTriggers() {
- var showTriggers = [], hideTriggers = [];
- var val = scope.$eval(attrs[prefix + 'Trigger']);
- unregisterTriggers();
-
- if (angular.isObject(val)) {
- Object.keys(val).forEach(function(key) {
- showTriggers.push(key);
- hideTriggers.push(val[key]);
- });
- triggers = {
- show: showTriggers,
- hide: hideTriggers
- };
- } else {
- triggers = getTriggers(val);
- }
-
- if (triggers.show !== 'none') {
- triggers.show.forEach(function(trigger, idx) {
- if (trigger === 'outsideClick') {
- element.on('click', toggleTooltipBind);
- $document.on('click', bodyHideTooltipBind);
- } else if (trigger === triggers.hide[idx]) {
- element.on(trigger, toggleTooltipBind);
- } else if (trigger) {
- element.on(trigger, showTooltipBind);
- element.on(triggers.hide[idx], hideTooltipBind);
- }
- element.on('keypress', hideOnEscapeKey);
- });
- }
- }
-
- prepTriggers();
-
- var animation = scope.$eval(attrs[prefix + 'Animation']);
- ttScope.animation = angular.isDefined(animation) ? !!animation : options.animation;
-
- var appendToBodyVal;
- var appendKey = prefix + 'AppendToBody';
- if (appendKey in attrs && attrs[appendKey] === undefined) {
- appendToBodyVal = true;
- } else {
- appendToBodyVal = scope.$eval(attrs[appendKey]);
- }
-
- appendToBody = angular.isDefined(appendToBodyVal) ? appendToBodyVal : appendToBody;
-
- // Make sure tooltip is destroyed and removed.
- scope.$on('$destroy', function onDestroyTooltip() {
- unregisterTriggers();
- removeTooltip();
- ttScope = null;
- });
- };
- }
- };
- };
- }];
-})
-
-// This is mostly ngInclude code but with a custom scope
-.directive('uibTooltipTemplateTransclude', [
- '$animate', '$sce', '$compile', '$templateRequest',
-function ($animate, $sce, $compile, $templateRequest) {
- return {
- link: function(scope, elem, attrs) {
- var origScope = scope.$eval(attrs.tooltipTemplateTranscludeScope);
-
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
-
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
-
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch($sce.parseAsResourceUrl(attrs.uibTooltipTemplateTransclude), function(src) {
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) { return; }
- var newScope = origScope.$new();
- var template = response;
-
- var clone = $compile(template)(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, elem);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- }
- });
-
- scope.$on('$destroy', cleanupLastIncludeContent);
- }
- };
-}])
-
-/**
- * Note that it's intentional that these classes are *not* applied through $animate.
- * They must not be animated as they're expected to be present on the tooltip on
- * initialization.
- */
-.directive('uibTooltipClasses', ['$uibPosition', function($uibPosition) {
- return {
- restrict: 'A',
- link: function(scope, element, attrs) {
- // need to set the primary position so the
- // arrow has space during position measure.
- // tooltip.positionTooltip()
- if (scope.placement) {
- // // There are no top-left etc... classes
- // // in TWBS, so we need the primary position.
- var position = $uibPosition.parsePlacement(scope.placement);
- element.addClass(position[0]);
- }
-
- if (scope.popupClass) {
- element.addClass(scope.popupClass);
- }
-
- if (scope.animation) {
- element.addClass(attrs.tooltipAnimationClass);
- }
- }
- };
-}])
-
-.directive('uibTooltipPopup', function() {
- return {
- restrict: 'A',
- scope: { content: '@' },
- templateUrl: 'uib/template/tooltip/tooltip-popup.html'
- };
-})
-
-.directive('uibTooltip', [ '$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltip', 'tooltip', 'mouseenter');
-}])
-
-.directive('uibTooltipTemplatePopup', function() {
- return {
- restrict: 'A',
- scope: { contentExp: '&', originScope: '&' },
- templateUrl: 'uib/template/tooltip/tooltip-template-popup.html'
- };
-})
-
-.directive('uibTooltipTemplate', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltipTemplate', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}])
-
-.directive('uibTooltipHtmlPopup', function() {
- return {
- restrict: 'A',
- scope: { contentExp: '&' },
- templateUrl: 'uib/template/tooltip/tooltip-html-popup.html'
- };
-})
-
-.directive('uibTooltipHtml', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibTooltipHtml', 'tooltip', 'mouseenter', {
- useContentExp: true
- });
-}]);
-
-/**
- * The following features are still outstanding: popup delay, animation as a
- * function, placement as a function, inside, support for more triggers than
- * just mouse enter/leave, and selector delegatation.
- */
-angular.module('ui.bootstrap.popover', ['ui.bootstrap.tooltip'])
-
-.directive('uibPopoverTemplatePopup', function() {
- return {
- restrict: 'A',
- scope: { uibTitle: '@', contentExp: '&', originScope: '&' },
- templateUrl: 'uib/template/popover/popover-template.html'
- };
-})
-
-.directive('uibPopoverTemplate', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopoverTemplate', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('uibPopoverHtmlPopup', function() {
- return {
- restrict: 'A',
- scope: { contentExp: '&', uibTitle: '@' },
- templateUrl: 'uib/template/popover/popover-html.html'
- };
-})
-
-.directive('uibPopoverHtml', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopoverHtml', 'popover', 'click', {
- useContentExp: true
- });
-}])
-
-.directive('uibPopoverPopup', function() {
- return {
- restrict: 'A',
- scope: { uibTitle: '@', content: '@' },
- templateUrl: 'uib/template/popover/popover.html'
- };
-})
-
-.directive('uibPopover', ['$uibTooltip', function($uibTooltip) {
- return $uibTooltip('uibPopover', 'popover', 'click');
-}]);
-
-angular.module('ui.bootstrap.progressbar', [])
-
-.constant('uibProgressConfig', {
- animate: true,
- max: 100
-})
-
-.controller('UibProgressController', ['$scope', '$attrs', 'uibProgressConfig', function($scope, $attrs, progressConfig) {
- var self = this,
- animate = angular.isDefined($attrs.animate) ? $scope.$parent.$eval($attrs.animate) : progressConfig.animate;
-
- this.bars = [];
- $scope.max = getMaxOrDefault();
-
- this.addBar = function(bar, element, attrs) {
- if (!animate) {
- element.css({'transition': 'none'});
- }
-
- this.bars.push(bar);
-
- bar.max = getMaxOrDefault();
- bar.title = attrs && angular.isDefined(attrs.title) ? attrs.title : 'progressbar';
-
- bar.$watch('value', function(value) {
- bar.recalculatePercentage();
- });
-
- bar.recalculatePercentage = function() {
- var totalPercentage = self.bars.reduce(function(total, bar) {
- bar.percent = +(100 * bar.value / bar.max).toFixed(2);
- return total + bar.percent;
- }, 0);
-
- if (totalPercentage > 100) {
- bar.percent -= totalPercentage - 100;
- }
- };
-
- bar.$on('$destroy', function() {
- element = null;
- self.removeBar(bar);
- });
- };
-
- this.removeBar = function(bar) {
- this.bars.splice(this.bars.indexOf(bar), 1);
- this.bars.forEach(function (bar) {
- bar.recalculatePercentage();
- });
- };
-
- //$attrs.$observe('maxParam', function(maxParam) {
- $scope.$watch('maxParam', function(maxParam) {
- self.bars.forEach(function(bar) {
- bar.max = getMaxOrDefault();
- bar.recalculatePercentage();
- });
- });
-
- function getMaxOrDefault () {
- return angular.isDefined($scope.maxParam) ? $scope.maxParam : progressConfig.max;
- }
-}])
-
-.directive('uibProgress', function() {
- return {
- replace: true,
- transclude: true,
- controller: 'UibProgressController',
- require: 'uibProgress',
- scope: {
- maxParam: '=?max'
- },
- templateUrl: 'uib/template/progressbar/progress.html'
- };
-})
-
-.directive('uibBar', function() {
- return {
- replace: true,
- transclude: true,
- require: '^uibProgress',
- scope: {
- value: '=',
- type: '@'
- },
- templateUrl: 'uib/template/progressbar/bar.html',
- link: function(scope, element, attrs, progressCtrl) {
- progressCtrl.addBar(scope, element, attrs);
- }
- };
-})
-
-.directive('uibProgressbar', function() {
- return {
- replace: true,
- transclude: true,
- controller: 'UibProgressController',
- scope: {
- value: '=',
- maxParam: '=?max',
- type: '@'
- },
- templateUrl: 'uib/template/progressbar/progressbar.html',
- link: function(scope, element, attrs, progressCtrl) {
- progressCtrl.addBar(scope, angular.element(element.children()[0]), {title: attrs.title});
- }
- };
-});
-
-angular.module('ui.bootstrap.rating', [])
-
-.constant('uibRatingConfig', {
- max: 5,
- stateOn: null,
- stateOff: null,
- enableReset: true,
- titles: ['one', 'two', 'three', 'four', 'five']
-})
-
-.controller('UibRatingController', ['$scope', '$attrs', 'uibRatingConfig', function($scope, $attrs, ratingConfig) {
- var ngModelCtrl = { $setViewValue: angular.noop },
- self = this;
-
- this.init = function(ngModelCtrl_) {
- ngModelCtrl = ngModelCtrl_;
- ngModelCtrl.$render = this.render;
-
- ngModelCtrl.$formatters.push(function(value) {
- if (angular.isNumber(value) && value << 0 !== value) {
- value = Math.round(value);
- }
-
- return value;
- });
-
- this.stateOn = angular.isDefined($attrs.stateOn) ? $scope.$parent.$eval($attrs.stateOn) : ratingConfig.stateOn;
- this.stateOff = angular.isDefined($attrs.stateOff) ? $scope.$parent.$eval($attrs.stateOff) : ratingConfig.stateOff;
- this.enableReset = angular.isDefined($attrs.enableReset) ?
- $scope.$parent.$eval($attrs.enableReset) : ratingConfig.enableReset;
- var tmpTitles = angular.isDefined($attrs.titles) ? $scope.$parent.$eval($attrs.titles) : ratingConfig.titles;
- this.titles = angular.isArray(tmpTitles) && tmpTitles.length > 0 ?
- tmpTitles : ratingConfig.titles;
-
- var ratingStates = angular.isDefined($attrs.ratingStates) ?
- $scope.$parent.$eval($attrs.ratingStates) :
- new Array(angular.isDefined($attrs.max) ? $scope.$parent.$eval($attrs.max) : ratingConfig.max);
- $scope.range = this.buildTemplateObjects(ratingStates);
- };
-
- this.buildTemplateObjects = function(states) {
- for (var i = 0, n = states.length; i < n; i++) {
- states[i] = angular.extend({ index: i }, { stateOn: this.stateOn, stateOff: this.stateOff, title: this.getTitle(i) }, states[i]);
- }
- return states;
- };
-
- this.getTitle = function(index) {
- if (index >= this.titles.length) {
- return index + 1;
- }
-
- return this.titles[index];
- };
-
- $scope.rate = function(value) {
- if (!$scope.readonly && value >= 0 && value <= $scope.range.length) {
- var newViewValue = self.enableReset && ngModelCtrl.$viewValue === value ? 0 : value;
- ngModelCtrl.$setViewValue(newViewValue);
- ngModelCtrl.$render();
- }
- };
-
- $scope.enter = function(value) {
- if (!$scope.readonly) {
- $scope.value = value;
- }
- $scope.onHover({value: value});
- };
-
- $scope.reset = function() {
- $scope.value = ngModelCtrl.$viewValue;
- $scope.onLeave();
- };
-
- $scope.onKeydown = function(evt) {
- if (/(37|38|39|40)/.test(evt.which)) {
- evt.preventDefault();
- evt.stopPropagation();
- $scope.rate($scope.value + (evt.which === 38 || evt.which === 39 ? 1 : -1));
- }
- };
-
- this.render = function() {
- $scope.value = ngModelCtrl.$viewValue;
- $scope.title = self.getTitle($scope.value - 1);
- };
-}])
-
-.directive('uibRating', function() {
- return {
- require: ['uibRating', 'ngModel'],
- restrict: 'A',
- scope: {
- readonly: '=?readOnly',
- onHover: '&',
- onLeave: '&'
- },
- controller: 'UibRatingController',
- templateUrl: 'uib/template/rating/rating.html',
- link: function(scope, element, attrs, ctrls) {
- var ratingCtrl = ctrls[0], ngModelCtrl = ctrls[1];
- ratingCtrl.init(ngModelCtrl);
- }
- };
-});
-
-angular.module('ui.bootstrap.tabs', [])
-
-.controller('UibTabsetController', ['$scope', function ($scope) {
- var ctrl = this,
- oldIndex;
- ctrl.tabs = [];
-
- ctrl.select = function(index, evt) {
- if (!destroyed) {
- var previousIndex = findTabIndex(oldIndex);
- var previousSelected = ctrl.tabs[previousIndex];
- if (previousSelected) {
- previousSelected.tab.onDeselect({
- $event: evt,
- $selectedIndex: index
- });
- if (evt && evt.isDefaultPrevented()) {
- return;
- }
- previousSelected.tab.active = false;
- }
-
- var selected = ctrl.tabs[index];
- if (selected) {
- selected.tab.onSelect({
- $event: evt
- });
- selected.tab.active = true;
- ctrl.active = selected.index;
- oldIndex = selected.index;
- } else if (!selected && angular.isDefined(oldIndex)) {
- ctrl.active = null;
- oldIndex = null;
- }
- }
- };
-
- ctrl.addTab = function addTab(tab) {
- ctrl.tabs.push({
- tab: tab,
- index: tab.index
- });
- ctrl.tabs.sort(function(t1, t2) {
- if (t1.index > t2.index) {
- return 1;
- }
-
- if (t1.index < t2.index) {
- return -1;
- }
-
- return 0;
- });
-
- if (tab.index === ctrl.active || !angular.isDefined(ctrl.active) && ctrl.tabs.length === 1) {
- var newActiveIndex = findTabIndex(tab.index);
- ctrl.select(newActiveIndex);
- }
- };
-
- ctrl.removeTab = function removeTab(tab) {
- var index;
- for (var i = 0; i < ctrl.tabs.length; i++) {
- if (ctrl.tabs[i].tab === tab) {
- index = i;
- break;
- }
- }
-
- if (ctrl.tabs[index].index === ctrl.active) {
- var newActiveTabIndex = index === ctrl.tabs.length - 1 ?
- index - 1 : index + 1 % ctrl.tabs.length;
- ctrl.select(newActiveTabIndex);
- }
-
- ctrl.tabs.splice(index, 1);
- };
-
- $scope.$watch('tabset.active', function(val) {
- if (angular.isDefined(val) && val !== oldIndex) {
- ctrl.select(findTabIndex(val));
- }
- });
-
- var destroyed;
- $scope.$on('$destroy', function() {
- destroyed = true;
- });
-
- function findTabIndex(index) {
- for (var i = 0; i < ctrl.tabs.length; i++) {
- if (ctrl.tabs[i].index === index) {
- return i;
- }
- }
- }
-}])
-
-.directive('uibTabset', function() {
- return {
- transclude: true,
- replace: true,
- scope: {},
- bindToController: {
- active: '=?',
- type: '@'
- },
- controller: 'UibTabsetController',
- controllerAs: 'tabset',
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/tabs/tabset.html';
- },
- link: function(scope, element, attrs) {
- scope.vertical = angular.isDefined(attrs.vertical) ?
- scope.$parent.$eval(attrs.vertical) : false;
- scope.justified = angular.isDefined(attrs.justified) ?
- scope.$parent.$eval(attrs.justified) : false;
- }
- };
-})
-
-.directive('uibTab', ['$parse', function($parse) {
- return {
- require: '^uibTabset',
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || 'uib/template/tabs/tab.html';
- },
- transclude: true,
- scope: {
- heading: '@',
- index: '=?',
- classes: '@?',
- onSelect: '&select', //This callback is called in contentHeadingTransclude
- //once it inserts the tab's content into the dom
- onDeselect: '&deselect'
- },
- controller: function() {
- //Empty controller so other directives can require being 'under' a tab
- },
- controllerAs: 'tab',
- link: function(scope, elm, attrs, tabsetCtrl, transclude) {
- scope.disabled = false;
- if (attrs.disable) {
- scope.$parent.$watch($parse(attrs.disable), function(value) {
- scope.disabled = !! value;
- });
- }
-
- if (angular.isUndefined(attrs.index)) {
- if (tabsetCtrl.tabs && tabsetCtrl.tabs.length) {
- scope.index = Math.max.apply(null, tabsetCtrl.tabs.map(function(t) { return t.index; })) + 1;
- } else {
- scope.index = 0;
- }
- }
-
- if (angular.isUndefined(attrs.classes)) {
- scope.classes = '';
- }
-
- scope.select = function(evt) {
- if (!scope.disabled) {
- var index;
- for (var i = 0; i < tabsetCtrl.tabs.length; i++) {
- if (tabsetCtrl.tabs[i].tab === scope) {
- index = i;
- break;
- }
- }
-
- tabsetCtrl.select(index, evt);
- }
- };
-
- tabsetCtrl.addTab(scope);
- scope.$on('$destroy', function() {
- tabsetCtrl.removeTab(scope);
- });
-
- //We need to transclude later, once the content container is ready.
- //when this link happens, we're inside a tab heading.
- scope.$transcludeFn = transclude;
- }
- };
-}])
-
-.directive('uibTabHeadingTransclude', function() {
- return {
- restrict: 'A',
- require: '^uibTab',
- link: function(scope, elm) {
- scope.$watch('headingElement', function updateHeadingElement(heading) {
- if (heading) {
- elm.html('');
- elm.append(heading);
- }
- });
- }
- };
-})
-
-.directive('uibTabContentTransclude', function() {
- return {
- restrict: 'A',
- require: '^uibTabset',
- link: function(scope, elm, attrs) {
- var tab = scope.$eval(attrs.uibTabContentTransclude).tab;
-
- //Now our tab is ready to be transcluded: both the tab heading area
- //and the tab content area are loaded. Transclude 'em both.
- tab.$transcludeFn(tab.$parent, function(contents) {
- angular.forEach(contents, function(node) {
- if (isTabHeading(node)) {
- //Let tabHeadingTransclude know.
- tab.headingElement = node;
- } else {
- elm.append(node);
- }
- });
- });
- }
- };
-
- function isTabHeading(node) {
- return node.tagName && (
- node.hasAttribute('uib-tab-heading') ||
- node.hasAttribute('data-uib-tab-heading') ||
- node.hasAttribute('x-uib-tab-heading') ||
- node.tagName.toLowerCase() === 'uib-tab-heading' ||
- node.tagName.toLowerCase() === 'data-uib-tab-heading' ||
- node.tagName.toLowerCase() === 'x-uib-tab-heading' ||
- node.tagName.toLowerCase() === 'uib:tab-heading'
- );
- }
-});
-
-angular.module('ui.bootstrap.timepicker', [])
-
-.constant('uibTimepickerConfig', {
- hourStep: 1,
- minuteStep: 1,
- secondStep: 1,
- showMeridian: true,
- showSeconds: false,
- meridians: null,
- readonlyInput: false,
- mousewheel: true,
- arrowkeys: true,
- showSpinners: true,
- templateUrl: 'uib/template/timepicker/timepicker.html'
-})
-
-.controller('UibTimepickerController', ['$scope', '$element', '$attrs', '$parse', '$log', '$locale', 'uibTimepickerConfig', function($scope, $element, $attrs, $parse, $log, $locale, timepickerConfig) {
- var hoursModelCtrl, minutesModelCtrl, secondsModelCtrl;
- var selected = new Date(),
- watchers = [],
- ngModelCtrl = { $setViewValue: angular.noop }, // nullModelCtrl
- meridians = angular.isDefined($attrs.meridians) ? $scope.$parent.$eval($attrs.meridians) : timepickerConfig.meridians || $locale.DATETIME_FORMATS.AMPMS,
- padHours = angular.isDefined($attrs.padHours) ? $scope.$parent.$eval($attrs.padHours) : true;
-
- $scope.tabindex = angular.isDefined($attrs.tabindex) ? $attrs.tabindex : 0;
- $element.removeAttr('tabindex');
-
- this.init = function(ngModelCtrl_, inputs) {
- ngModelCtrl = ngModelCtrl_;
- ngModelCtrl.$render = this.render;
-
- ngModelCtrl.$formatters.unshift(function(modelValue) {
- return modelValue ? new Date(modelValue) : null;
- });
-
- var hoursInputEl = inputs.eq(0),
- minutesInputEl = inputs.eq(1),
- secondsInputEl = inputs.eq(2);
-
- hoursModelCtrl = hoursInputEl.controller('ngModel');
- minutesModelCtrl = minutesInputEl.controller('ngModel');
- secondsModelCtrl = secondsInputEl.controller('ngModel');
-
- var mousewheel = angular.isDefined($attrs.mousewheel) ? $scope.$parent.$eval($attrs.mousewheel) : timepickerConfig.mousewheel;
-
- if (mousewheel) {
- this.setupMousewheelEvents(hoursInputEl, minutesInputEl, secondsInputEl);
- }
-
- var arrowkeys = angular.isDefined($attrs.arrowkeys) ? $scope.$parent.$eval($attrs.arrowkeys) : timepickerConfig.arrowkeys;
- if (arrowkeys) {
- this.setupArrowkeyEvents(hoursInputEl, minutesInputEl, secondsInputEl);
- }
-
- $scope.readonlyInput = angular.isDefined($attrs.readonlyInput) ? $scope.$parent.$eval($attrs.readonlyInput) : timepickerConfig.readonlyInput;
- this.setupInputEvents(hoursInputEl, minutesInputEl, secondsInputEl);
- };
-
- var hourStep = timepickerConfig.hourStep;
- if ($attrs.hourStep) {
- watchers.push($scope.$parent.$watch($parse($attrs.hourStep), function(value) {
- hourStep = +value;
- }));
- }
-
- var minuteStep = timepickerConfig.minuteStep;
- if ($attrs.minuteStep) {
- watchers.push($scope.$parent.$watch($parse($attrs.minuteStep), function(value) {
- minuteStep = +value;
- }));
- }
-
- var min;
- watchers.push($scope.$parent.$watch($parse($attrs.min), function(value) {
- var dt = new Date(value);
- min = isNaN(dt) ? undefined : dt;
- }));
-
- var max;
- watchers.push($scope.$parent.$watch($parse($attrs.max), function(value) {
- var dt = new Date(value);
- max = isNaN(dt) ? undefined : dt;
- }));
-
- var disabled = false;
- if ($attrs.ngDisabled) {
- watchers.push($scope.$parent.$watch($parse($attrs.ngDisabled), function(value) {
- disabled = value;
- }));
- }
-
- $scope.noIncrementHours = function() {
- var incrementedSelected = addMinutes(selected, hourStep * 60);
- return disabled || incrementedSelected > max ||
- incrementedSelected < selected && incrementedSelected < min;
- };
-
- $scope.noDecrementHours = function() {
- var decrementedSelected = addMinutes(selected, -hourStep * 60);
- return disabled || decrementedSelected < min ||
- decrementedSelected > selected && decrementedSelected > max;
- };
-
- $scope.noIncrementMinutes = function() {
- var incrementedSelected = addMinutes(selected, minuteStep);
- return disabled || incrementedSelected > max ||
- incrementedSelected < selected && incrementedSelected < min;
- };
-
- $scope.noDecrementMinutes = function() {
- var decrementedSelected = addMinutes(selected, -minuteStep);
- return disabled || decrementedSelected < min ||
- decrementedSelected > selected && decrementedSelected > max;
- };
-
- $scope.noIncrementSeconds = function() {
- var incrementedSelected = addSeconds(selected, secondStep);
- return disabled || incrementedSelected > max ||
- incrementedSelected < selected && incrementedSelected < min;
- };
-
- $scope.noDecrementSeconds = function() {
- var decrementedSelected = addSeconds(selected, -secondStep);
- return disabled || decrementedSelected < min ||
- decrementedSelected > selected && decrementedSelected > max;
- };
-
- $scope.noToggleMeridian = function() {
- if (selected.getHours() < 12) {
- return disabled || addMinutes(selected, 12 * 60) > max;
- }
-
- return disabled || addMinutes(selected, -12 * 60) < min;
- };
-
- var secondStep = timepickerConfig.secondStep;
- if ($attrs.secondStep) {
- watchers.push($scope.$parent.$watch($parse($attrs.secondStep), function(value) {
- secondStep = +value;
- }));
- }
-
- $scope.showSeconds = timepickerConfig.showSeconds;
- if ($attrs.showSeconds) {
- watchers.push($scope.$parent.$watch($parse($attrs.showSeconds), function(value) {
- $scope.showSeconds = !!value;
- }));
- }
-
- // 12H / 24H mode
- $scope.showMeridian = timepickerConfig.showMeridian;
- if ($attrs.showMeridian) {
- watchers.push($scope.$parent.$watch($parse($attrs.showMeridian), function(value) {
- $scope.showMeridian = !!value;
-
- if (ngModelCtrl.$error.time) {
- // Evaluate from template
- var hours = getHoursFromTemplate(), minutes = getMinutesFromTemplate();
- if (angular.isDefined(hours) && angular.isDefined(minutes)) {
- selected.setHours(hours);
- refresh();
- }
- } else {
- updateTemplate();
- }
- }));
- }
-
- // Get $scope.hours in 24H mode if valid
- function getHoursFromTemplate() {
- var hours = +$scope.hours;
- var valid = $scope.showMeridian ? hours > 0 && hours < 13 :
- hours >= 0 && hours < 24;
- if (!valid || $scope.hours === '') {
- return undefined;
- }
-
- if ($scope.showMeridian) {
- if (hours === 12) {
- hours = 0;
- }
- if ($scope.meridian === meridians[1]) {
- hours = hours + 12;
- }
- }
- return hours;
- }
-
- function getMinutesFromTemplate() {
- var minutes = +$scope.minutes;
- var valid = minutes >= 0 && minutes < 60;
- if (!valid || $scope.minutes === '') {
- return undefined;
- }
- return minutes;
- }
-
- function getSecondsFromTemplate() {
- var seconds = +$scope.seconds;
- return seconds >= 0 && seconds < 60 ? seconds : undefined;
- }
-
- function pad(value, noPad) {
- if (value === null) {
- return '';
- }
-
- return angular.isDefined(value) && value.toString().length < 2 && !noPad ?
- '0' + value : value.toString();
- }
-
- // Respond on mousewheel spin
- this.setupMousewheelEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
- var isScrollingUp = function(e) {
- if (e.originalEvent) {
- e = e.originalEvent;
- }
- //pick correct delta variable depending on event
- var delta = e.wheelDelta ? e.wheelDelta : -e.deltaY;
- return e.detail || delta > 0;
- };
-
- hoursInputEl.on('mousewheel wheel', function(e) {
- if (!disabled) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementHours() : $scope.decrementHours());
- }
- e.preventDefault();
- });
-
- minutesInputEl.on('mousewheel wheel', function(e) {
- if (!disabled) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementMinutes() : $scope.decrementMinutes());
- }
- e.preventDefault();
- });
-
- secondsInputEl.on('mousewheel wheel', function(e) {
- if (!disabled) {
- $scope.$apply(isScrollingUp(e) ? $scope.incrementSeconds() : $scope.decrementSeconds());
- }
- e.preventDefault();
- });
- };
-
- // Respond on up/down arrowkeys
- this.setupArrowkeyEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
- hoursInputEl.on('keydown', function(e) {
- if (!disabled) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementHours();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementHours();
- $scope.$apply();
- }
- }
- });
-
- minutesInputEl.on('keydown', function(e) {
- if (!disabled) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementMinutes();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementMinutes();
- $scope.$apply();
- }
- }
- });
-
- secondsInputEl.on('keydown', function(e) {
- if (!disabled) {
- if (e.which === 38) { // up
- e.preventDefault();
- $scope.incrementSeconds();
- $scope.$apply();
- } else if (e.which === 40) { // down
- e.preventDefault();
- $scope.decrementSeconds();
- $scope.$apply();
- }
- }
- });
- };
-
- this.setupInputEvents = function(hoursInputEl, minutesInputEl, secondsInputEl) {
- if ($scope.readonlyInput) {
- $scope.updateHours = angular.noop;
- $scope.updateMinutes = angular.noop;
- $scope.updateSeconds = angular.noop;
- return;
- }
-
- var invalidate = function(invalidHours, invalidMinutes, invalidSeconds) {
- ngModelCtrl.$setViewValue(null);
- ngModelCtrl.$setValidity('time', false);
- if (angular.isDefined(invalidHours)) {
- $scope.invalidHours = invalidHours;
- if (hoursModelCtrl) {
- hoursModelCtrl.$setValidity('hours', false);
- }
- }
-
- if (angular.isDefined(invalidMinutes)) {
- $scope.invalidMinutes = invalidMinutes;
- if (minutesModelCtrl) {
- minutesModelCtrl.$setValidity('minutes', false);
- }
- }
-
- if (angular.isDefined(invalidSeconds)) {
- $scope.invalidSeconds = invalidSeconds;
- if (secondsModelCtrl) {
- secondsModelCtrl.$setValidity('seconds', false);
- }
- }
- };
-
- $scope.updateHours = function() {
- var hours = getHoursFromTemplate(),
- minutes = getMinutesFromTemplate();
-
- ngModelCtrl.$setDirty();
-
- if (angular.isDefined(hours) && angular.isDefined(minutes)) {
- selected.setHours(hours);
- selected.setMinutes(minutes);
- if (selected < min || selected > max) {
- invalidate(true);
- } else {
- refresh('h');
- }
- } else {
- invalidate(true);
- }
- };
-
- hoursInputEl.on('blur', function(e) {
- ngModelCtrl.$setTouched();
- if (modelIsEmpty()) {
- makeValid();
- } else if ($scope.hours === null || $scope.hours === '') {
- invalidate(true);
- } else if (!$scope.invalidHours && $scope.hours < 10) {
- $scope.$apply(function() {
- $scope.hours = pad($scope.hours, !padHours);
- });
- }
- });
-
- $scope.updateMinutes = function() {
- var minutes = getMinutesFromTemplate(),
- hours = getHoursFromTemplate();
-
- ngModelCtrl.$setDirty();
-
- if (angular.isDefined(minutes) && angular.isDefined(hours)) {
- selected.setHours(hours);
- selected.setMinutes(minutes);
- if (selected < min || selected > max) {
- invalidate(undefined, true);
- } else {
- refresh('m');
- }
- } else {
- invalidate(undefined, true);
- }
- };
-
- minutesInputEl.on('blur', function(e) {
- ngModelCtrl.$setTouched();
- if (modelIsEmpty()) {
- makeValid();
- } else if ($scope.minutes === null) {
- invalidate(undefined, true);
- } else if (!$scope.invalidMinutes && $scope.minutes < 10) {
- $scope.$apply(function() {
- $scope.minutes = pad($scope.minutes);
- });
- }
- });
-
- $scope.updateSeconds = function() {
- var seconds = getSecondsFromTemplate();
-
- ngModelCtrl.$setDirty();
-
- if (angular.isDefined(seconds)) {
- selected.setSeconds(seconds);
- refresh('s');
- } else {
- invalidate(undefined, undefined, true);
- }
- };
-
- secondsInputEl.on('blur', function(e) {
- if (modelIsEmpty()) {
- makeValid();
- } else if (!$scope.invalidSeconds && $scope.seconds < 10) {
- $scope.$apply( function() {
- $scope.seconds = pad($scope.seconds);
- });
- }
- });
-
- };
-
- this.render = function() {
- var date = ngModelCtrl.$viewValue;
-
- if (isNaN(date)) {
- ngModelCtrl.$setValidity('time', false);
- $log.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.');
- } else {
- if (date) {
- selected = date;
- }
-
- if (selected < min || selected > max) {
- ngModelCtrl.$setValidity('time', false);
- $scope.invalidHours = true;
- $scope.invalidMinutes = true;
- } else {
- makeValid();
- }
- updateTemplate();
- }
- };
-
- // Call internally when we know that model is valid.
- function refresh(keyboardChange) {
- makeValid();
- ngModelCtrl.$setViewValue(new Date(selected));
- updateTemplate(keyboardChange);
- }
-
- function makeValid() {
- if (hoursModelCtrl) {
- hoursModelCtrl.$setValidity('hours', true);
- }
-
- if (minutesModelCtrl) {
- minutesModelCtrl.$setValidity('minutes', true);
- }
-
- if (secondsModelCtrl) {
- secondsModelCtrl.$setValidity('seconds', true);
- }
-
- ngModelCtrl.$setValidity('time', true);
- $scope.invalidHours = false;
- $scope.invalidMinutes = false;
- $scope.invalidSeconds = false;
- }
-
- function updateTemplate(keyboardChange) {
- if (!ngModelCtrl.$modelValue) {
- $scope.hours = null;
- $scope.minutes = null;
- $scope.seconds = null;
- $scope.meridian = meridians[0];
- } else {
- var hours = selected.getHours(),
- minutes = selected.getMinutes(),
- seconds = selected.getSeconds();
-
- if ($scope.showMeridian) {
- hours = hours === 0 || hours === 12 ? 12 : hours % 12; // Convert 24 to 12 hour system
- }
-
- $scope.hours = keyboardChange === 'h' ? hours : pad(hours, !padHours);
- if (keyboardChange !== 'm') {
- $scope.minutes = pad(minutes);
- }
- $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
-
- if (keyboardChange !== 's') {
- $scope.seconds = pad(seconds);
- }
- $scope.meridian = selected.getHours() < 12 ? meridians[0] : meridians[1];
- }
- }
-
- function addSecondsToSelected(seconds) {
- selected = addSeconds(selected, seconds);
- refresh();
- }
-
- function addMinutes(selected, minutes) {
- return addSeconds(selected, minutes*60);
- }
-
- function addSeconds(date, seconds) {
- var dt = new Date(date.getTime() + seconds * 1000);
- var newDate = new Date(date);
- newDate.setHours(dt.getHours(), dt.getMinutes(), dt.getSeconds());
- return newDate;
- }
-
- function modelIsEmpty() {
- return ($scope.hours === null || $scope.hours === '') &&
- ($scope.minutes === null || $scope.minutes === '') &&
- (!$scope.showSeconds || $scope.showSeconds && ($scope.seconds === null || $scope.seconds === ''));
- }
-
- $scope.showSpinners = angular.isDefined($attrs.showSpinners) ?
- $scope.$parent.$eval($attrs.showSpinners) : timepickerConfig.showSpinners;
-
- $scope.incrementHours = function() {
- if (!$scope.noIncrementHours()) {
- addSecondsToSelected(hourStep * 60 * 60);
- }
- };
-
- $scope.decrementHours = function() {
- if (!$scope.noDecrementHours()) {
- addSecondsToSelected(-hourStep * 60 * 60);
- }
- };
-
- $scope.incrementMinutes = function() {
- if (!$scope.noIncrementMinutes()) {
- addSecondsToSelected(minuteStep * 60);
- }
- };
-
- $scope.decrementMinutes = function() {
- if (!$scope.noDecrementMinutes()) {
- addSecondsToSelected(-minuteStep * 60);
- }
- };
-
- $scope.incrementSeconds = function() {
- if (!$scope.noIncrementSeconds()) {
- addSecondsToSelected(secondStep);
- }
- };
-
- $scope.decrementSeconds = function() {
- if (!$scope.noDecrementSeconds()) {
- addSecondsToSelected(-secondStep);
- }
- };
-
- $scope.toggleMeridian = function() {
- var minutes = getMinutesFromTemplate(),
- hours = getHoursFromTemplate();
-
- if (!$scope.noToggleMeridian()) {
- if (angular.isDefined(minutes) && angular.isDefined(hours)) {
- addSecondsToSelected(12 * 60 * (selected.getHours() < 12 ? 60 : -60));
- } else {
- $scope.meridian = $scope.meridian === meridians[0] ? meridians[1] : meridians[0];
- }
- }
- };
-
- $scope.blur = function() {
- ngModelCtrl.$setTouched();
- };
-
- $scope.$on('$destroy', function() {
- while (watchers.length) {
- watchers.shift()();
- }
- });
-}])
-
-.directive('uibTimepicker', ['uibTimepickerConfig', function(uibTimepickerConfig) {
- return {
- require: ['uibTimepicker', '?^ngModel'],
- restrict: 'A',
- controller: 'UibTimepickerController',
- controllerAs: 'timepicker',
- scope: {},
- templateUrl: function(element, attrs) {
- return attrs.templateUrl || uibTimepickerConfig.templateUrl;
- },
- link: function(scope, element, attrs, ctrls) {
- var timepickerCtrl = ctrls[0], ngModelCtrl = ctrls[1];
-
- if (ngModelCtrl) {
- timepickerCtrl.init(ngModelCtrl, element.find('input'));
- }
- }
- };
-}]);
-
-angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap.position'])
-
-/**
- * A helper service that can parse typeahead's syntax (string provided by users)
- * Extracted to a separate service for ease of unit testing
- */
- .factory('uibTypeaheadParser', ['$parse', function($parse) {
- // 000001111111100000000000002222222200000000000000003333333333333330000000000044444444000
- var TYPEAHEAD_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
- return {
- parse: function(input) {
- var match = input.match(TYPEAHEAD_REGEXP);
- if (!match) {
- throw new Error(
- 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' +
- ' but got "' + input + '".');
- }
-
- return {
- itemName: match[3],
- source: $parse(match[4]),
- viewMapper: $parse(match[2] || match[1]),
- modelMapper: $parse(match[1])
- };
- }
- };
- }])
-
- .controller('UibTypeaheadController', ['$scope', '$element', '$attrs', '$compile', '$parse', '$q', '$timeout', '$document', '$window', '$rootScope', '$$debounce', '$uibPosition', 'uibTypeaheadParser',
- function(originalScope, element, attrs, $compile, $parse, $q, $timeout, $document, $window, $rootScope, $$debounce, $position, typeaheadParser) {
- var HOT_KEYS = [9, 13, 27, 38, 40];
- var eventDebounceTime = 200;
- var modelCtrl, ngModelOptions;
- //SUPPORTED ATTRIBUTES (OPTIONS)
-
- //minimal no of characters that needs to be entered before typeahead kicks-in
- var minLength = originalScope.$eval(attrs.typeaheadMinLength);
- if (!minLength && minLength !== 0) {
- minLength = 1;
- }
-
- originalScope.$watch(attrs.typeaheadMinLength, function (newVal) {
- minLength = !newVal && newVal !== 0 ? 1 : newVal;
- });
-
- //minimal wait time after last character typed before typeahead kicks-in
- var waitTime = originalScope.$eval(attrs.typeaheadWaitMs) || 0;
-
- //should it restrict model values to the ones selected from the popup only?
- var isEditable = originalScope.$eval(attrs.typeaheadEditable) !== false;
- originalScope.$watch(attrs.typeaheadEditable, function (newVal) {
- isEditable = newVal !== false;
- });
-
- //binding to a variable that indicates if matches are being retrieved asynchronously
- var isLoadingSetter = $parse(attrs.typeaheadLoading).assign || angular.noop;
-
- //a function to determine if an event should cause selection
- var isSelectEvent = attrs.typeaheadShouldSelect ? $parse(attrs.typeaheadShouldSelect) : function(scope, vals) {
- var evt = vals.$event;
- return evt.which === 13 || evt.which === 9;
- };
-
- //a callback executed when a match is selected
- var onSelectCallback = $parse(attrs.typeaheadOnSelect);
-
- //should it select highlighted popup value when losing focus?
- var isSelectOnBlur = angular.isDefined(attrs.typeaheadSelectOnBlur) ? originalScope.$eval(attrs.typeaheadSelectOnBlur) : false;
-
- //binding to a variable that indicates if there were no results after the query is completed
- var isNoResultsSetter = $parse(attrs.typeaheadNoResults).assign || angular.noop;
-
- var inputFormatter = attrs.typeaheadInputFormatter ? $parse(attrs.typeaheadInputFormatter) : undefined;
-
- var appendToBody = attrs.typeaheadAppendToBody ? originalScope.$eval(attrs.typeaheadAppendToBody) : false;
-
- var appendTo = attrs.typeaheadAppendTo ?
- originalScope.$eval(attrs.typeaheadAppendTo) : null;
-
- var focusFirst = originalScope.$eval(attrs.typeaheadFocusFirst) !== false;
-
- //If input matches an item of the list exactly, select it automatically
- var selectOnExact = attrs.typeaheadSelectOnExact ? originalScope.$eval(attrs.typeaheadSelectOnExact) : false;
-
- //binding to a variable that indicates if dropdown is open
- var isOpenSetter = $parse(attrs.typeaheadIsOpen).assign || angular.noop;
-
- var showHint = originalScope.$eval(attrs.typeaheadShowHint) || false;
-
- //INTERNAL VARIABLES
-
- //model setter executed upon match selection
- var parsedModel = $parse(attrs.ngModel);
- var invokeModelSetter = $parse(attrs.ngModel + '($$$p)');
- var $setModelValue = function(scope, newValue) {
- if (angular.isFunction(parsedModel(originalScope)) &&
- ngModelOptions.getOption('getterSetter')) {
- return invokeModelSetter(scope, {$$$p: newValue});
- }
-
- return parsedModel.assign(scope, newValue);
- };
-
- //expressions used by typeahead
- var parserResult = typeaheadParser.parse(attrs.uibTypeahead);
-
- var hasFocus;
-
- //Used to avoid bug in iOS webview where iOS keyboard does not fire
- //mousedown & mouseup events
- //Issue #3699
- var selected;
-
- //create a child scope for the typeahead directive so we are not polluting original scope
- //with typeahead-specific data (matches, query etc.)
- var scope = originalScope.$new();
- var offDestroy = originalScope.$on('$destroy', function() {
- scope.$destroy();
- });
- scope.$on('$destroy', offDestroy);
-
- // WAI-ARIA
- var popupId = 'typeahead-' + scope.$id + '-' + Math.floor(Math.random() * 10000);
- element.attr({
- 'aria-autocomplete': 'list',
- 'aria-expanded': false,
- 'aria-owns': popupId
- });
-
- var inputsContainer, hintInputElem;
- //add read-only input to show hint
- if (showHint) {
- inputsContainer = angular.element('<div></div>');
- inputsContainer.css('position', 'relative');
- element.after(inputsContainer);
- hintInputElem = element.clone();
- hintInputElem.attr('placeholder', '');
- hintInputElem.attr('tabindex', '-1');
- hintInputElem.val('');
- hintInputElem.css({
- 'position': 'absolute',
- 'top': '0px',
- 'left': '0px',
- 'border-color': 'transparent',
- 'box-shadow': 'none',
- 'opacity': 1,
- 'background': 'none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)',
- 'color': '#999'
- });
- element.css({
- 'position': 'relative',
- 'vertical-align': 'top',
- 'background-color': 'transparent'
- });
-
- if (hintInputElem.attr('id')) {
- hintInputElem.removeAttr('id'); // remove duplicate id if present.
- }
- inputsContainer.append(hintInputElem);
- hintInputElem.after(element);
- }
-
- //pop-up element used to display matches
- var popUpEl = angular.element('<div uib-typeahead-popup></div>');
- popUpEl.attr({
- id: popupId,
- matches: 'matches',
- active: 'activeIdx',
- select: 'select(activeIdx, evt)',
- 'move-in-progress': 'moveInProgress',
- query: 'query',
- position: 'position',
- 'assign-is-open': 'assignIsOpen(isOpen)',
- debounce: 'debounceUpdate'
- });
- //custom item template
- if (angular.isDefined(attrs.typeaheadTemplateUrl)) {
- popUpEl.attr('template-url', attrs.typeaheadTemplateUrl);
- }
-
- if (angular.isDefined(attrs.typeaheadPopupTemplateUrl)) {
- popUpEl.attr('popup-template-url', attrs.typeaheadPopupTemplateUrl);
- }
-
- var resetHint = function() {
- if (showHint) {
- hintInputElem.val('');
- }
- };
-
- var resetMatches = function() {
- scope.matches = [];
- scope.activeIdx = -1;
- element.attr('aria-expanded', false);
- resetHint();
- };
-
- var getMatchId = function(index) {
- return popupId + '-option-' + index;
- };
-
- // Indicate that the specified match is the active (pre-selected) item in the list owned by this typeahead.
- // This attribute is added or removed automatically when the `activeIdx` changes.
- scope.$watch('activeIdx', function(index) {
- if (index < 0) {
- element.removeAttr('aria-activedescendant');
- } else {
- element.attr('aria-activedescendant', getMatchId(index));
- }
- });
-
- var inputIsExactMatch = function(inputValue, index) {
- if (scope.matches.length > index && inputValue) {
- return inputValue.toUpperCase() === scope.matches[index].label.toUpperCase();
- }
-
- return false;
- };
-
- var getMatchesAsync = function(inputValue, evt) {
- var locals = {$viewValue: inputValue};
- isLoadingSetter(originalScope, true);
- isNoResultsSetter(originalScope, false);
- $q.when(parserResult.source(originalScope, locals)).then(function(matches) {
- //it might happen that several async queries were in progress if a user were typing fast
- //but we are interested only in responses that correspond to the current view value
- var onCurrentRequest = inputValue === modelCtrl.$viewValue;
- if (onCurrentRequest && hasFocus) {
- if (matches && matches.length > 0) {
- scope.activeIdx = focusFirst ? 0 : -1;
- isNoResultsSetter(originalScope, false);
- scope.matches.length = 0;
-
- //transform labels
- for (var i = 0; i < matches.length; i++) {
- locals[parserResult.itemName] = matches[i];
- scope.matches.push({
- id: getMatchId(i),
- label: parserResult.viewMapper(scope, locals),
- model: matches[i]
- });
- }
-
- scope.query = inputValue;
- //position pop-up with matches - we need to re-calculate its position each time we are opening a window
- //with matches as a pop-up might be absolute-positioned and position of an input might have changed on a page
- //due to other elements being rendered
- recalculatePosition();
-
- element.attr('aria-expanded', true);
-
- //Select the single remaining option if user input matches
- if (selectOnExact && scope.matches.length === 1 && inputIsExactMatch(inputValue, 0)) {
- if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
- $$debounce(function() {
- scope.select(0, evt);
- }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
- } else {
- scope.select(0, evt);
- }
- }
-
- if (showHint) {
- var firstLabel = scope.matches[0].label;
- if (angular.isString(inputValue) &&
- inputValue.length > 0 &&
- firstLabel.slice(0, inputValue.length).toUpperCase() === inputValue.toUpperCase()) {
- hintInputElem.val(inputValue + firstLabel.slice(inputValue.length));
- } else {
- hintInputElem.val('');
- }
- }
- } else {
- resetMatches();
- isNoResultsSetter(originalScope, true);
- }
- }
- if (onCurrentRequest) {
- isLoadingSetter(originalScope, false);
- }
- }, function() {
- resetMatches();
- isLoadingSetter(originalScope, false);
- isNoResultsSetter(originalScope, true);
- });
- };
-
- // bind events only if appendToBody params exist - performance feature
- if (appendToBody) {
- angular.element($window).on('resize', fireRecalculating);
- $document.find('body').on('scroll', fireRecalculating);
- }
-
- // Declare the debounced function outside recalculating for
- // proper debouncing
- var debouncedRecalculate = $$debounce(function() {
- // if popup is visible
- if (scope.matches.length) {
- recalculatePosition();
- }
-
- scope.moveInProgress = false;
- }, eventDebounceTime);
-
- // Default progress type
- scope.moveInProgress = false;
-
- function fireRecalculating() {
- if (!scope.moveInProgress) {
- scope.moveInProgress = true;
- scope.$digest();
- }
-
- debouncedRecalculate();
- }
-
- // recalculate actual position and set new values to scope
- // after digest loop is popup in right position
- function recalculatePosition() {
- scope.position = appendToBody ? $position.offset(element) : $position.position(element);
- scope.position.top += element.prop('offsetHeight');
- }
-
- //we need to propagate user's query so we can higlight matches
- scope.query = undefined;
-
- //Declare the timeout promise var outside the function scope so that stacked calls can be cancelled later
- var timeoutPromise;
-
- var scheduleSearchWithTimeout = function(inputValue) {
- timeoutPromise = $timeout(function() {
- getMatchesAsync(inputValue);
- }, waitTime);
- };
-
- var cancelPreviousTimeout = function() {
- if (timeoutPromise) {
- $timeout.cancel(timeoutPromise);
- }
- };
-
- resetMatches();
-
- scope.assignIsOpen = function (isOpen) {
- isOpenSetter(originalScope, isOpen);
- };
-
- scope.select = function(activeIdx, evt) {
- //called from within the $digest() cycle
- var locals = {};
- var model, item;
-
- selected = true;
- locals[parserResult.itemName] = item = scope.matches[activeIdx].model;
- model = parserResult.modelMapper(originalScope, locals);
- $setModelValue(originalScope, model);
- modelCtrl.$setValidity('editable', true);
- modelCtrl.$setValidity('parse', true);
-
- onSelectCallback(originalScope, {
- $item: item,
- $model: model,
- $label: parserResult.viewMapper(originalScope, locals),
- $event: evt
- });
-
- resetMatches();
-
- //return focus to the input element if a match was selected via a mouse click event
- // use timeout to avoid $rootScope:inprog error
- if (scope.$eval(attrs.typeaheadFocusOnSelect) !== false) {
- $timeout(function() { element[0].focus(); }, 0, false);
- }
- };
-
- //bind keyboard events: arrows up(38) / down(40), enter(13) and tab(9), esc(27)
- element.on('keydown', function(evt) {
- //typeahead is open and an "interesting" key was pressed
- if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
- return;
- }
-
- var shouldSelect = isSelectEvent(originalScope, {$event: evt});
-
- /**
- * if there's nothing selected (i.e. focusFirst) and enter or tab is hit
- * or
- * shift + tab is pressed to bring focus to the previous element
- * then clear the results
- */
- if (scope.activeIdx === -1 && shouldSelect || evt.which === 9 && !!evt.shiftKey) {
- resetMatches();
- scope.$digest();
- return;
- }
-
- evt.preventDefault();
- var target;
- switch (evt.which) {
- case 27: // escape
- evt.stopPropagation();
-
- resetMatches();
- originalScope.$digest();
- break;
- case 38: // up arrow
- scope.activeIdx = (scope.activeIdx > 0 ? scope.activeIdx : scope.matches.length) - 1;
- scope.$digest();
- target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx];
- target.parentNode.scrollTop = target.offsetTop;
- break;
- case 40: // down arrow
- scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
- scope.$digest();
- target = popUpEl[0].querySelectorAll('.uib-typeahead-match')[scope.activeIdx];
- target.parentNode.scrollTop = target.offsetTop;
- break;
- default:
- if (shouldSelect) {
- scope.$apply(function() {
- if (angular.isNumber(scope.debounceUpdate) || angular.isObject(scope.debounceUpdate)) {
- $$debounce(function() {
- scope.select(scope.activeIdx, evt);
- }, angular.isNumber(scope.debounceUpdate) ? scope.debounceUpdate : scope.debounceUpdate['default']);
- } else {
- scope.select(scope.activeIdx, evt);
- }
- });
- }
- }
- });
-
- element.on('focus', function (evt) {
- hasFocus = true;
- if (minLength === 0 && !modelCtrl.$viewValue) {
- $timeout(function() {
- getMatchesAsync(modelCtrl.$viewValue, evt);
- }, 0);
- }
- });
-
- element.on('blur', function(evt) {
- if (isSelectOnBlur && scope.matches.length && scope.activeIdx !== -1 && !selected) {
- selected = true;
- scope.$apply(function() {
- if (angular.isObject(scope.debounceUpdate) && angular.isNumber(scope.debounceUpdate.blur)) {
- $$debounce(function() {
- scope.select(scope.activeIdx, evt);
- }, scope.debounceUpdate.blur);
- } else {
- scope.select(scope.activeIdx, evt);
- }
- });
- }
- if (!isEditable && modelCtrl.$error.editable) {
- modelCtrl.$setViewValue();
- scope.$apply(function() {
- // Reset validity as we are clearing
- modelCtrl.$setValidity('editable', true);
- modelCtrl.$setValidity('parse', true);
- });
- element.val('');
- }
- hasFocus = false;
- selected = false;
- });
-
- // Keep reference to click handler to unbind it.
- var dismissClickHandler = function(evt) {
- // Issue #3973
- // Firefox treats right click as a click on document
- if (element[0] !== evt.target && evt.which !== 3 && scope.matches.length !== 0) {
- resetMatches();
- if (!$rootScope.$$phase) {
- originalScope.$digest();
- }
- }
- };
-
- $document.on('click', dismissClickHandler);
-
- originalScope.$on('$destroy', function() {
- $document.off('click', dismissClickHandler);
- if (appendToBody || appendTo) {
- $popup.remove();
- }
-
- if (appendToBody) {
- angular.element($window).off('resize', fireRecalculating);
- $document.find('body').off('scroll', fireRecalculating);
- }
- // Prevent jQuery cache memory leak
- popUpEl.remove();
-
- if (showHint) {
- inputsContainer.remove();
- }
- });
-
- var $popup = $compile(popUpEl)(scope);
-
- if (appendToBody) {
- $document.find('body').append($popup);
- } else if (appendTo) {
- angular.element(appendTo).eq(0).append($popup);
- } else {
- element.after($popup);
- }
-
- this.init = function(_modelCtrl) {
- modelCtrl = _modelCtrl;
- ngModelOptions = extractOptions(modelCtrl);
-
- scope.debounceUpdate = $parse(ngModelOptions.getOption('debounce'))(originalScope);
-
- //plug into $parsers pipeline to open a typeahead on view changes initiated from DOM
- //$parsers kick-in on all the changes coming from the view as well as manually triggered by $setViewValue
- modelCtrl.$parsers.unshift(function(inputValue) {
- hasFocus = true;
-
- if (minLength === 0 || inputValue && inputValue.length >= minLength) {
- if (waitTime > 0) {
- cancelPreviousTimeout();
- scheduleSearchWithTimeout(inputValue);
- } else {
- getMatchesAsync(inputValue);
- }
- } else {
- isLoadingSetter(originalScope, false);
- cancelPreviousTimeout();
- resetMatches();
- }
-
- if (isEditable) {
- return inputValue;
- }
-
- if (!inputValue) {
- // Reset in case user had typed something previously.
- modelCtrl.$setValidity('editable', true);
- return null;
- }
-
- modelCtrl.$setValidity('editable', false);
- return undefined;
- });
-
- modelCtrl.$formatters.push(function(modelValue) {
- var candidateViewValue, emptyViewValue;
- var locals = {};
-
- // The validity may be set to false via $parsers (see above) if
- // the model is restricted to selected values. If the model
- // is set manually it is considered to be valid.
- if (!isEditable) {
- modelCtrl.$setValidity('editable', true);
- }
-
- if (inputFormatter) {
- locals.$model = modelValue;
- return inputFormatter(originalScope, locals);
- }
-
- //it might happen that we don't have enough info to properly render input value
- //we need to check for this situation and simply return model value if we can't apply custom formatting
- locals[parserResult.itemName] = modelValue;
- candidateViewValue = parserResult.viewMapper(originalScope, locals);
- locals[parserResult.itemName] = undefined;
- emptyViewValue = parserResult.viewMapper(originalScope, locals);
-
- return candidateViewValue !== emptyViewValue ? candidateViewValue : modelValue;
- });
- };
-
- function extractOptions(ngModelCtrl) {
- var ngModelOptions;
-
- if (angular.version.minor < 6) { // in angular < 1.6 $options could be missing
- // guarantee a value
- ngModelOptions = ngModelCtrl.$options || {};
-
- // mimic 1.6+ api
- ngModelOptions.getOption = function (key) {
- return ngModelOptions[key];
- };
- } else { // in angular >=1.6 $options is always present
- ngModelOptions = ngModelCtrl.$options;
- }
-
- return ngModelOptions;
- }
- }])
-
- .directive('uibTypeahead', function() {
- return {
- controller: 'UibTypeaheadController',
- require: ['ngModel', 'uibTypeahead'],
- link: function(originalScope, element, attrs, ctrls) {
- ctrls[1].init(ctrls[0]);
- }
- };
- })
-
- .directive('uibTypeaheadPopup', ['$$debounce', function($$debounce) {
- return {
- scope: {
- matches: '=',
- query: '=',
- active: '=',
- position: '&',
- moveInProgress: '=',
- select: '&',
- assignIsOpen: '&',
- debounce: '&'
- },
- replace: true,
- templateUrl: function(element, attrs) {
- return attrs.popupTemplateUrl || 'uib/template/typeahead/typeahead-popup.html';
- },
- link: function(scope, element, attrs) {
- scope.templateUrl = attrs.templateUrl;
-
- scope.isOpen = function() {
- var isDropdownOpen = scope.matches.length > 0;
- scope.assignIsOpen({ isOpen: isDropdownOpen });
- return isDropdownOpen;
- };
-
- scope.isActive = function(matchIdx) {
- return scope.active === matchIdx;
- };
-
- scope.selectActive = function(matchIdx) {
- scope.active = matchIdx;
- };
-
- scope.selectMatch = function(activeIdx, evt) {
- var debounce = scope.debounce();
- if (angular.isNumber(debounce) || angular.isObject(debounce)) {
- $$debounce(function() {
- scope.select({activeIdx: activeIdx, evt: evt});
- }, angular.isNumber(debounce) ? debounce : debounce['default']);
- } else {
- scope.select({activeIdx: activeIdx, evt: evt});
- }
- };
- }
- };
- }])
-
- .directive('uibTypeaheadMatch', ['$templateRequest', '$compile', '$parse', function($templateRequest, $compile, $parse) {
- return {
- scope: {
- index: '=',
- match: '=',
- query: '='
- },
- link: function(scope, element, attrs) {
- var tplUrl = $parse(attrs.templateUrl)(scope.$parent) || 'uib/template/typeahead/typeahead-match.html';
- $templateRequest(tplUrl).then(function(tplContent) {
- var tplEl = angular.element(tplContent.trim());
- element.replaceWith(tplEl);
- $compile(tplEl)(scope);
- });
- }
- };
- }])
-
- .filter('uibTypeaheadHighlight', ['$sce', '$injector', '$log', function($sce, $injector, $log) {
- var isSanitizePresent;
- isSanitizePresent = $injector.has('$sanitize');
-
- function escapeRegexp(queryToEscape) {
- // Regex: capture the whole query string and replace it with the string that will be used to match
- // the results, for example if the capture is "a" the result will be \a
- return queryToEscape.replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
- }
-
- function containsHtml(matchItem) {
- return /<.*>/g.test(matchItem);
- }
-
- return function(matchItem, query) {
- if (!isSanitizePresent && containsHtml(matchItem)) {
- $log.warn('Unsafe use of typeahead please use ngSanitize'); // Warn the user about the danger
- }
- matchItem = query ? ('' + matchItem).replace(new RegExp(escapeRegexp(query), 'gi'), '<strong>$&</strong>') : matchItem; // Replaces the capture string with a the same string inside of a "strong" tag
- if (!isSanitizePresent) {
- matchItem = $sce.trustAsHtml(matchItem); // If $sanitize is not present we pack the string in a $sce object for the ng-bind-html directive
- }
- return matchItem;
- };
- }]);
-angular.module('ui.bootstrap.carousel').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibCarouselCss && angular.element(document).find('head').prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'); angular.$$uibCarouselCss = true; });
-angular.module('ui.bootstrap.datepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'); angular.$$uibDatepickerCss = true; });
-angular.module('ui.bootstrap.position').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibPositionCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'); angular.$$uibPositionCss = true; });
-angular.module('ui.bootstrap.datepickerPopup').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibDatepickerpopupCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'); angular.$$uibDatepickerpopupCss = true; });
-angular.module('ui.bootstrap.tooltip').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTooltipCss && angular.element(document).find('head').prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'); angular.$$uibTooltipCss = true; });
-angular.module('ui.bootstrap.timepicker').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTimepickerCss && angular.element(document).find('head').prepend('<style type="text/css">.uib-time input{width:50px;}</style>'); angular.$$uibTimepickerCss = true; });
-angular.module('ui.bootstrap.typeahead').run(function() {!angular.$$csp().noInlineStyle && !angular.$$uibTypeaheadCss && angular.element(document).find('head').prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'); angular.$$uibTypeaheadCss = true; }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.min.js
deleted file mode 100644
index db7fad7d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-bootstrap/ui-bootstrap.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * angular-ui-bootstrap
- * http://angular-ui.github.io/bootstrap/
-
- * Version: 2.5.0 - 2017-01-28
- * License: MIT
- */angular.module("ui.bootstrap",["ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){r=!!("horizontal"in g),r?(s={width:""},t={width:"0"}):(s={height:""},t={height:"0"}),d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(s)}function i(a){return r?{width:a.scrollWidth+"px"}:{height:a.scrollHeight+"px"}}function j(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(n(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:i(f[0])}).start()["finally"](k):a.addClass(f,"in",{css:{overflow:"hidden"},to:i(f[0])}).then(k)},angular.noop)}function k(){f.removeClass("collapsing").addClass("collapse").css(s),o(d)}function l(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(p(d)).then(function(){f.css(i(f[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:t}).start()["finally"](m):a.removeClass(f,"in",{to:t}).then(m)},angular.noop):m()}function m(){f.css(t),f.removeClass("collapsing").addClass("collapse"),q(d)}var n=c(g.expanding),o=c(g.expanded),p=c(g.collapsing),q=c(g.collapsed),r=!1,s={},t={};h(),d.$watch(g.uibCollapse,function(a){a?l():j()})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(a,b,c){c.$observe("disabled",function(a){c.$set("tabindex",a?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){b.addClass("panel"),d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){function a(){return"uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"}return{require:"^uibAccordionGroup",link:function(b,c,d,e){b.$watch(function(){return e[d.uibAccordionTransclude]},function(b){if(b){var d=angular.element(c[0].querySelector(a()));d.html(""),d.append(b)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(a,b,c,d,e){a.closeable=!!c.close,b.addClass("alert"),c.$set("role","alert"),a.closeable&&b.addClass("alert-dismissible");var f=angular.isDefined(c.dismissOnTimeout)?d(c.dismissOnTimeout)(a.$parent):null;f&&e(function(){a.close()},parseInt(f,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);a&&!angular.isDefined(d.uncheckable)||b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(a){for(var b=0;b<p.length;b++)p[b].slide.active=b===a}function g(c,d,g){if(!s){if(angular.extend(c,{direction:g}),angular.extend(p[r].slide||{},{direction:g}),e.enabled(b)&&!a.$currentTransition&&p[d].element&&o.slides.length>1){p[d].element.data(q,c.direction);var h=o.getCurrentIndex();angular.isNumber(h)&&p[h].element&&p[h].element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",p[d].element,function(b,c){"close"===c&&(a.$currentTransition=null,e.off("addClass",b))})}a.active=c.index,r=c.index,f(d),k()}}function h(a){for(var b=0;b<p.length;b++)if(p[b].slide===a)return b}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null)}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=a.active,s=!1;b.addClass("carousel"),o.addSlide=function(b,c){p.push({slide:b,element:c}),p.sort(function(a,b){return+a.slide.index-+b.slide.index}),(b.index===a.active||1===p.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),r=b.index,a.active=b.index,f(r),o.select(p[h(b)]),1===p.length&&a.play())},o.getCurrentIndex=function(){for(var a=0;a<p.length;a++)if(p[a].slide.index===r)return a},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(p[b],"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(p[b],"prev")},o.removeSlide=function(b){var c=h(b);p.splice(c,1),p.length>0&&r===c?c>=p.length?(r=p.length-1,a.active=r,f(r),o.select(p[p.length-1])):(r=c,a.active=r,f(r),o.select(p[c])):r>c&&(r--,a.active=r),0===p.length&&(r=null,a.active=null)},o.select=a.select=function(b,c){var d=h(b.slide);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b.slide.index===r||a.$currentTransition||g(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.isPrevDisabled=function(){return 0===a.active&&a.noWrap()},a.isNextDisabled=function(){return a.active===p.length-1&&a.noWrap()},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},b.on("mouseenter",a.pause),b.on("mouseleave",a.play),a.$on("$destroy",function(){s=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j),a.$watch("active",function(a){if(angular.isNumber(a)&&r!==a){for(var b=0;b<p.length;b++)if(p[b].slide.index===a){a=b;break}var c=p[a];c&&(f(a),o.select(p[a]),r=a)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(a){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(b,c,d,e){c.addClass("item"),e.addSlide(b,c),b.$on("$destroy",function(){e.removeSlide(b)}),b.$watch("active",function(b){a[b?"addClass":"removeClass"](c,"active")})}}}]).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(a,b,c,d,e){function f(a){return e(s,{key:a},!0)[0]}function g(a){var b=[],c=a.split(""),e=a.indexOf("'");if(e>-1){var f=!1;a=a.split("");for(var g=e;g<a.length;g++)f?("'"===a[g]&&(g+1<a.length&&"'"===a[g+1]?(a[g+1]="$",c[g+1]=""):(c[g]="",f=!1)),a[g]="$"):"'"===a[g]&&(a[g]="$",c[g]="",f=!0);a=a.join("")}return angular.forEach(s,function(d){var e=a.indexOf(d.key);if(e>-1){a=a.split(""),c[e]="("+d.regex+")",a[e]="$";for(var f=e+1,g=e+d.key.length;g>f;f++)c[f]="",a[f]="$";a=a.join(""),b.push({index:e,key:d.key,apply:d.apply,matcher:d.regex})}}),{regex:new RegExp("^"+c.join("")+"$"),map:d(b,"index")}}function h(a){for(var b,c,d=[],e=0;e<a.length;)if(angular.isNumber(c)){if("'"===a.charAt(e))(e+1>=a.length||"'"!==a.charAt(e+1))&&(d.push(i(a,c,e)),c=null);else if(e===a.length)for(;c<a.length;)b=j(a,c),d.push(b),c=b.endIdx;e++}else"'"!==a.charAt(e)?(b=j(a,e),d.push(b.parser),e=b.endIdx):(c=e,e++);return d}function i(a,b,c){return function(){return a.substr(b+1,c-b-1)}}function j(a,b){for(var c=a.substr(b),d=0;d<s.length;d++)if(new RegExp("^"+s[d].key).test(c)){var e=s[d];return{endIdx:b+e.key.length,parser:e.formatter}}return{endIdx:b+1,parser:function(){return c.charAt(0)}}}function k(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function l(a){return parseInt(a,10)}function m(a,b){return a&&b?q(a,b):a}function n(a,b){return a&&b?q(a,b,!0):a}function o(a,b){a=a.replace(/:/g,"");var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function p(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function q(a,b,c){c=c?-1:1;var d=a.getTimezoneOffset(),e=o(b,d);return p(a,c*(e-d))}var r,s,t=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){r=b.id,this.parsers={},this.formatters={},s=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){a=+a,this.year=69>a?a+2e3:a+1900},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=l(c+d),this.minutes+=l(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}],angular.version.major>=1&&angular.version.minor>4&&s.push({key:"LLLL",regex:b.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.STANDALONEMONTH.indexOf(a)},formatter:function(a){return c(a,"LLLL")}})},this.init(),this.getParser=function(a){var b=f(a);return b&&b.apply||null},this.overrideParser=function(a,b){var c=f(a);c&&angular.isFunction(b)&&(this.parsers={},c.apply=b)}.bind(this),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==r&&this.init(),this.formatters[c]||(this.formatters[c]=h(c));var d=this.formatters[c];return d.reduce(function(b,c){return b+c(a)},"")},this.parse=function(c,d,e){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(t,"\\$&"),b.id!==r&&this.init(),this.parsers[d]||(this.parsers[d]=g(d,"apply"));var f=this.parsers[d],h=f.regex,i=f.map,j=c.match(h),l=!1;if(j&&j.length){var m,n;angular.isDate(e)&&!isNaN(e.getTime())?m={year:e.getFullYear(),month:e.getMonth(),date:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}:(e&&a.warn("dateparser:","baseDate is not a valid date"),m={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var o=1,p=j.length;p>o;o++){var q=i[o-1];"Z"===q.matcher&&(l=!0),q.apply&&q.apply.call(m,j[o])}var s=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return k(m.year,m.month,m.date)&&(!angular.isDate(e)||isNaN(e.getTime())||l?(n=new Date(0),s.call(n,m.year,m.month,m.date),u.call(n,m.hours||0,m.minutes||0,m.seconds||0,m.milliseconds||0)):(n=new Date(e),s.call(n,m.year,m.month,m.date),u.call(n,m.hours,m.minutes,m.seconds,m.milliseconds))),n}},this.toTimezone=m,this.fromTimezone=n,this.timezoneToOffset=o,this.addDateMinutes=p,this.convertTimezoneToLocal=q}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(b){a.datepickerMode=b,a.datepickerOptions.datepickerMode=b}function n(b){var c;if(angular.version.minor<6)c=b.$options||a.datepickerOptions.ngModelOptions||i.ngModelOptions||{},c.getOption=function(a){return c[a]};else{var d=b.$options.getOption("timezone")||(a.datepickerOptions.ngModelOptions?a.datepickerOptions.ngModelOptions.timezone:null)||(i.ngModelOptions?i.ngModelOptions.timezone:null);c=b.$options.createChild(i.ngModelOptions).createChild(a.datepickerOptions.ngModelOptions).createChild(b.$options).createChild({timezone:d})}return c}var o=this,p={$setViewValue:angular.noop},q={},r=[];b.addClass("uib-datepicker"),c.$set("role","application"),a.datepickerOptions||(a.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:i.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":o[b]=angular.isDefined(a.datepickerOptions[b])?e(a.datepickerOptions[b])(a.$parent):i[b];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":o[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:i[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?o.startingDay=a.datepickerOptions.startingDay:angular.isNumber(i.startingDay)?o.startingDay=i.startingDay:o.startingDay=(f.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.$watch("datepickerOptions."+b,function(a){a?angular.isDate(a)?o[b]=l.fromTimezone(new Date(a),q.getOption("timezone")):(j&&g.warn("Literal date support has been deprecated, please switch to date object usage"),o[b]=new Date(h(a,"medium"))):o[b]=i[b]?l.fromTimezone(new Date(i[b]),q.getOption("timezone")):null,o.refreshView()});break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){o[b]=a[b]=angular.isDefined(c)?c:a.datepickerOptions[b],("minMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)<o.modes.indexOf(o[b])||"maxMode"===b&&o.modes.indexOf(a.datepickerOptions.datepickerMode)>o.modes.indexOf(o[b]))&&(a.datepickerMode=o[b],a.datepickerOptions.datepickerMode=o[b])}):o[b]=a[b]=i[b]||null}}),a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(c.disabled)||!1,angular.isDefined(c.ngDisabled)&&r.push(a.$parent.$watch(c.ngDisabled,function(b){a.disabled=b,o.refreshView()})),a.isActive=function(b){return 0===o.compare(b.date,o.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(b){p=b,q=n(p),a.datepickerOptions.initDate?(o.activeDate=l.fromTimezone(a.datepickerOptions.initDate,q.getOption("timezone"))||new Date,a.$watch("datepickerOptions.initDate",function(a){a&&(p.$isEmpty(p.$modelValue)||p.$invalid)&&(o.activeDate=l.fromTimezone(a,q.getOption("timezone")),o.refreshView())})):o.activeDate=new Date;var c=p.$modelValue?new Date(p.$modelValue):new Date;this.activeDate=isNaN(c)?l.fromTimezone(new Date,q.getOption("timezone")):l.fromTimezone(c,q.getOption("timezone")),p.$render=function(){o.render()}},this.render=function(){if(p.$viewValue){var a=new Date(p.$viewValue),b=!isNaN(a);b?this.activeDate=l.fromTimezone(a,q.getOption("timezone")):k||g.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=p.$viewValue?new Date(p.$viewValue):null;b=l.fromTimezone(b,q.getOption("timezone")),p.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=p.$viewValue?new Date(p.$viewValue):null;d=l.fromTimezone(d,q.getOption("timezone"));var e=new Date;e=l.fromTimezone(e,q.getOption("timezone"));var f=this.compare(b,e),g={date:b,label:l.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),o.activeDate&&0===this.compare(g.date,o.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===o.minMode){var c=p.$viewValue?l.fromTimezone(new Date(p.$viewValue),q.getOption("timezone")):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=l.toTimezone(c,q.getOption("timezone")),p.$setViewValue(c),p.$render()}else o.activeDate=b,m(o.modes[o.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode");a.$broadcast("uib:datepicker.focus")},a.move=function(a){var b=o.activeDate.getFullYear()+a*(o.step.years||0),c=o.activeDate.getMonth()+a*(o.step.months||0);o.activeDate.setFullYear(b,c,1),o.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===o.maxMode&&1===b||a.datepickerMode===o.minMode&&-1===b||(m(o.modes[o.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var s=function(){o.element[0].focus()};a.$on("uib:datepicker.focus",s),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),o.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(o.isDisabled(o.activeDate))return;a.select(o.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(o.handleKeyDown(c,b),o.refreshView()):a.toggleMode("up"===c?1:-1)},b.on("keydown",function(b){a.$apply(function(){a.keydown(b)})}),a.$on("$destroy",function(){for(;r.length;)r.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,this.monthColumns),a.yearHeaderColspan=this.monthColumns>3?this.monthColumns-2:1},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=this.monthColumns;else if("right"===a)c+=1;else if("down"===a)c+=this.monthColumns;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d,e={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},f={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},g=/(HTML|BODY)/;return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),
-isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(d)){var f=a.find("body");f.addClass("uib-position-body-scrollbar-measure"),d=b.innerWidth-f[0].clientWidth,d=isFinite(d)?d:0,f.removeClass("uib-position-body-scrollbar-measure")}return d}if(angular.isUndefined(c)){var g=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(g),c=g[0].offsetWidth-g[0].clientWidth,c=isFinite(c)?c:0,g.remove()}return c},scrollbarPadding:function(a){a=this.getRawNode(a);var c=b.getComputedStyle(a),d=this.parseStyle(c.paddingRight),e=this.parseStyle(c.paddingBottom),f=this.scrollParent(a,!1,!0),h=this.scrollbarWidth(g.test(f.tagName));return{scrollbarWidth:h,widthOverflow:f.scrollWidth>f.clientWidth,right:d+h,originalRight:d,heightOverflow:f.scrollHeight>f.clientHeight,bottom:e+h,originalBottom:e}},isScrollable:function(a,c){a=this.getRawNode(a);var d=c?e.hidden:e.normal,f=b.getComputedStyle(a);return d.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,d,f){c=this.getRawNode(c);var g=d?e.hidden:e.normal,h=a[0].documentElement,i=b.getComputedStyle(c);if(f&&g.test(i.overflow+i.overflowY+i.overflowX))return c;var j="absolute"===i.position,k=c.parentElement||h;if(k===h||"fixed"===i.position)return h;for(;k.parentElement&&k!==h;){var l=b.getComputedStyle(k);if(j&&"static"!==l.position&&(j=!1),!j&&g.test(l.overflow+l.overflowY+l.overflowX))break;k=k.parentElement}return k},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=f.auto.test(a);return b&&(a=a.replace(f.auto,"")),a=a.split("-"),a[0]=a[0]||"top",f.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",f.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,e){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=e?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,e),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(f.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":f.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},adjustTop:function(a,b,c,d){return-1!==a.indexOf("top")&&c!==d?{top:b.top-d+"px"}:void 0},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var e=angular.element(d).hasClass("tooltip-inner"),g=e?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=f.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(e?d:a)[k];switch(c[0]){case"top":h.bottom=e?"0":"-"+j;break;case"bottom":h.top=e?"0":"-"+j;break;case"left":h.right=e?"0":"-"+j;break;case"right":h.left=e?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(b){var c=l.parse(b,x,a.date);if(isNaN(c))for(var d=0;d<J.length;d++)if(c=l.parse(b,J[d],a.date),!isNaN(c))return c;return c}function r(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=q(a);if(!isNaN(b))return l.toTimezone(b,H.getOption("timezone"))}return H.getOption("allowInvalid")?a:void 0}function s(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(q(d)):!1:!0):!0}function t(c){if(a.isOpen||!a.disabled){var d=I[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function u(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function v(){if(a.isOpen){var d=angular.element(I[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,z);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}function w(a){var b;return angular.version.minor<6?(b=angular.isObject(a.$options)?a.$options:{timezone:null},b.getOption=function(a){return b[a]}):b=a.$options,b}var x,y,z,A,B,C,D,E,F,G,H,I,J,K=!1,L=[];this.init=function(e){if(G=e,H=w(G),y=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,z=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,A=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,B=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,C=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,J=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(x=m.html5Types[c.type],K=!0):(x=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==x&&(x=c,G.$modelValue=null,!x))throw new Error("uibDatepickerPopup must have a date format specified.")})),!x)throw new Error("uibDatepickerPopup must have a date format specified.");if(K&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");D=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),D.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":B}),E=angular.element(D.children()[0]),E.attr("template-url",C),a.datepickerOptions||(a.datepickerOptions={}),K&&"month"===c.type&&(a.datepickerOptions.datepickerMode="month",a.datepickerOptions.minMode="month"),E.attr("datepicker-options","datepickerOptions"),K?G.$formatters.push(function(b){return a.date=l.fromTimezone(b,H.getOption("timezone")),b}):(G.$$parserName="date",G.$validators.date=s,G.$parsers.unshift(r),G.$formatters.push(function(b){return G.$isEmpty(b)?(a.date=b,b):(angular.isNumber(b)&&(b=new Date(b)),a.date=l.fromTimezone(b,H.getOption("timezone")),l.filter(a.date,x))})),G.$viewChangeListeners.push(function(){a.date=q(G.$viewValue)}),b.on("keydown",u),I=d(D)(a),D.remove(),z?h.find("body").append(I):b.after(I),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),I.remove(),b.off("keydown",u),h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v);L.length;)L.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){"today"===b&&(b=l.fromTimezone(new Date,H.getOption("timezone")));var c={};return angular.forEach(["minDate","maxDate"],function(b){a.datepickerOptions[b]?angular.isDate(a.datepickerOptions[b])?c[b]=new Date(a.datepickerOptions[b]):(p&&e.warn("Literal date support has been deprecated, please switch to date object usage"),c[b]=new Date(k(a.datepickerOptions[b],"medium"))):c[b]=null}),a.datepickerOptions&&c.minDate&&a.compare(b,c.minDate)<0||c.maxDate&&a.compare(b,c.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){a.date=c;var d=a.date?l.filter(a.date,x):null;b.val(d),G.$setViewValue(d),y&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):(b=l.fromTimezone(d,H.getOption("timezone")),b.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&L.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){v(),A&&a.$broadcast("uib:datepicker.focus"),h.on("click",t);var d=c.popupPlacement?c.popupPlacement:m.placement;z||j.parsePlacement(d)[2]?(F=F||angular.element(j.scrollParent(b)),F&&F.on("scroll",v)):F=null,angular.element(g).on("resize",v)},0,!1):(h.off("click",t),F&&F.off("scroll",v),angular.element(g).off("resize",v))}),a.$on("uib:datepicker.mode",function(){n(v,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,b,c){var d=null,e=c.createNew();this.isOnlyOpen=function(a,b){var c=e.get(b);if(c){var d=c.reduce(function(b,c){return c.scope===a?c:b},{});if(d)return 1===c.length}return!1},this.open=function(b,c,g){if(d||a.on("click",f),d&&d!==b&&(d.isOpen=!1),d=b,g){var h=e.get(g);if(h){var i=h.map(function(a){return a.scope});-1===i.indexOf(b)&&e.put(g,{scope:b})}else e.put(g,{scope:b})}},this.close=function(b,c,g){if(d===b&&(a.off("click",f),a.off("keydown",this.keybindFilter),d=null),g){var h=e.get(g);if(h){var i=h.reduce(function(a,c){return c.scope===b?c:a},{});i&&e.remove(g,i)}}};var f=function(a){if(d&&d.isOpen&&!(a&&"disabled"===d.getAutoClose()||a&&3===a.which)){var c=d.getToggleElement();if(!(a&&c&&c[0].contains(a.target))){var e=d.getDropdownElement();a&&"outsideClick"===d.getAutoClose()&&e&&e[0].contains(a.target)||(d.focusToggleElement(),d.isOpen=!1,b.$$phase||d.$apply())}}};this.keybindFilter=function(a){if(d){var b=d.getDropdownElement(),c=d.getToggleElement(),e=b&&b[0].contains(a.target),g=c&&c[0].contains(a.target);27===a.which?(a.stopPropagation(),d.focusToggleElement(),f()):d.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&d.isOpen&&(e||g)&&(a.preventDefault(),a.stopPropagation(),d.focusDropdownEntry(a.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){function l(){b.append(o.dropdownMenu)}var m,n,o=this,p=a.$new(),q=e.appendToOpenClass,r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=i.find("body");b.addClass("dropdown"),this.init=function(){c.isOpen&&(n=d(c.isOpen),s=n.assign,a.$watch(n,function(a){p.isOpen=!!a})),u=angular.isDefined(c.keyboardNav)},this.toggle=function(a){return p.isOpen=arguments.length?!!a:!p.isOpen,angular.isFunction(s)&&s(p,p.isOpen),p.isOpen},this.isOpen=function(){return p.isOpen},p.getToggleElement=function(){return o.toggleElement},p.getAutoClose=function(){return c.autoClose||"always"},p.getElement=function(){return b},p.isKeynavEnabled=function(){return u},p.focusDropdownEntry=function(a){var c=o.dropdownMenu?angular.element(o.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(o.selectedOption)?o.selectedOption=o.selectedOption===c.length-1?o.selectedOption:o.selectedOption+1:o.selectedOption=0;break;case 38:angular.isNumber(o.selectedOption)?o.selectedOption=0===o.selectedOption?0:o.selectedOption-1:o.selectedOption=c.length-1}c[o.selectedOption].focus()},p.getDropdownElement=function(){return o.dropdownMenu},p.focusToggleElement=function(){o.toggleElement&&o.toggleElement[0].focus()},p.$watch("isOpen",function(e,n){var u=null,w=!1;if(angular.isDefined(c.dropdownAppendTo)){var x=d(c.dropdownAppendTo)(p);x&&(u=angular.element(x))}if(angular.isDefined(c.dropdownAppendToBody)){var y=d(c.dropdownAppendToBody)(p);y!==!1&&(w=!0)}if(w&&!u&&(u=v),u&&o.dropdownMenu&&(e?(u.append(o.dropdownMenu),b.on("$destroy",l)):(b.off("$destroy",l),l())),u&&o.dropdownMenu){var z,A,B,C=h.positionElements(b,o.dropdownMenu,"bottom-left",!0),D=0;if(z={top:C.top+"px",display:e?"block":"none"},A=o.dropdownMenu.hasClass("dropdown-menu-right"),A?(z.left="auto",B=h.scrollbarPadding(u),B.heightOverflow&&B.scrollbarWidth&&(D=B.scrollbarWidth),z.right=window.innerWidth-D-(C.left+b.prop("offsetWidth"))+"px"):(z.left=C.left+"px",z.right="auto"),!w){var E=h.offset(u);z.top=C.top-E.top+"px",A?z.right=window.innerWidth-(C.left-E.left+b.prop("offsetWidth"))+"px":z.left=C.left-E.left+"px"}o.dropdownMenu.css(z)}var F=u?u:b,G=u?q:r,H=F.hasClass(G),I=f.isOnlyOpen(a,u);if(H===!e){var J;J=u?I?"removeClass":"addClass":e?"addClass":"removeClass",g[J](F,G).then(function(){angular.isDefined(e)&&e!==n&&t(a,{open:!!e})})}if(e)o.dropdownMenuTemplateUrl?k(o.dropdownMenuTemplateUrl).then(function(a){m=p.$new(),j(a.trim())(m,function(a){var b=a;o.dropdownMenu.replaceWith(b),o.dropdownMenu=b,i.on("keydown",f.keybindFilter)})}):i.on("keydown",f.keybindFilter),p.focusToggleElement(),f.open(p,b,u);else{if(f.close(p,b,u),o.dropdownMenuTemplateUrl){m&&m.$destroy();var K=angular.element('<ul class="dropdown-menu"></ul>');o.dropdownMenu.replaceWith(K),o.dropdownMenu=K}o.selectedOption=null}angular.isFunction(s)&&s(a,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.on("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.pop()},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{restrict:"A",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();e.$$postDigest(function(){h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(a){return{link:function(b,c,d,e,f){f(b.$parent,function(b){c.empty(),a.enter(b,c)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(a,b,c,d,e,f,g,h,i){function j(a){var b="-";return a.replace(E,function(a,c){return(c?b:"")+a.toLowerCase()})}function k(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)}function l(){for(var a=-1,b=x.keys(),c=0;c<b.length;c++)x.get(b[c]).value.backdrop&&(a=c);return a>-1&&A>a&&(a=A),a}function m(a,b){var c=x.get(a).value,d=c.appendTo;x.remove(a),B=x.top(),B&&(A=parseInt(B.value.modalDomEl.attr("index"),10)),p(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||w;y.remove(b,a);var e=y.hasKey(b);d.toggleClass(b,e),!e&&v&&v.heightOverflow&&v.scrollbarWidth&&(v.originalRight?d.css({paddingRight:v.originalRight+"px"}):d.css({paddingRight:""}),v=null),n(!0)},c.closedDeferred),o(),b&&b.focus?b.focus():d.focus&&d.focus()}function n(a){var b;x.length()>0&&(b=x.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function o(){if(t&&-1===l()){var a=u;p(t,u,function(){a=null}),t=void 0,u=void 0}}function p(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){d&&d(),b.remove(),e&&e.resolve()}),c.$destroy())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(z.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function q(a){if(a.isDefaultPrevented())return a;var b=x.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){z.dismiss(b.key,"escape key press")}));break;case 9:var c=z.loadFocusElementList(b),d=!1;a.shiftKey?(z.isFocusInFirstItem(a,c)||z.isModalFocused(a,b))&&(d=z.focusLastFocusableElement(c)):z.isFocusInLastItem(a,c)&&(d=z.focusFirstFocusableElement(c)),d&&(a.preventDefault(),a.stopPropagation())}}function r(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}function s(){Array.prototype.forEach.call(document.querySelectorAll("["+C+"]"),function(a){var b=parseInt(a.getAttribute(C),10),c=b-1;a.setAttribute(C,c),c||(a.removeAttribute(C),a.removeAttribute("aria-hidden"))})}var t,u,v,w="modal-open",x=h.createNew(),y=g.createNew(),z={NOW_CLOSING_EVENT:"modal.stack.now-closing"},A=0,B=null,C="data-bootstrap-modal-aria-hidden-count",D="a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]",E=/[A-Z]/g;return e.$watch(l,function(a){u&&(u.index=a)}),c.on("keydown",q),e.$on("$destroy",function(){c.off("keydown",q)}),z.open=function(b,f){function g(a){function b(a){var b=a.parent()?a.parent().children():[];return Array.prototype.filter.call(b,function(b){return b!==a[0]})}if(a&&"BODY"!==a[0].tagName)return b(a).forEach(function(a){var b="true"===a.getAttribute("aria-hidden"),c=parseInt(a.getAttribute(C),10);c||(c=b?1:0),a.setAttribute(C,c+1),a.setAttribute("aria-hidden","true")}),g(a.parent())}var h=c[0].activeElement,k=f.openedClass||w;n(!1),B=x.top(),x.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),y.put(k,b);var m=f.appendTo,o=l();o>=0&&!t&&(u=e.$new(!0),u.modalOptions=f,u.index=o,t=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),t.attr({"class":"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),f.backdropClass&&t.addClass(f.backdropClass),f.animation&&t.attr("modal-animation","true"),d(t)(u),a.enter(t,m),i.isScrollable(m)&&(v=i.scrollbarPadding(m),v.heightOverflow&&v.scrollbarWidth&&m.css({paddingRight:v.right+"px"})));var p;f.component?(p=document.createElement(j(f.component.name)),p=angular.element(p),p.attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):p=f.content,A=B?parseInt(B.value.modalDomEl.attr("index"),10)+1:0;var q=angular.element('<div uib-modal-window="modal-window"></div>');q.attr({"class":"modal","template-url":f.windowTemplateUrl,"window-top-class":f.windowTopClass,role:"dialog","aria-labelledby":f.ariaLabelledBy,"aria-describedby":f.ariaDescribedBy,size:f.size,index:A,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(p),f.windowClass&&q.addClass(f.windowClass),f.animation&&q.attr("modal-animation","true"),m.addClass(k),f.scope&&(f.scope.$$topModalIndex=A),a.enter(d(q)(f.scope),m),x.top().value.modalDomEl=q,x.top().value.modalOpener=h,g(q)},z.close=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),m(a,c.value.modalOpener),!0):!c},z.dismiss=function(a,b){var c=x.get(a);return s(),c&&r(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),m(a,c.value.modalOpener),!0):!c},z.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},z.getTop=function(){return x.top()},z.modalRendered=function(a){var b=x.get(a);b&&b.value.renderDeferred.resolve()},z.focusFirstFocusableElement=function(a){return a.length>0?(a[0].focus(),!0):!1},z.focusLastFocusableElement=function(a){return a.length>0?(a[a.length-1].focus(),!0):!1},z.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},z.isFocusInFirstItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[0]:!1},z.isFocusInLastItem=function(a,b){return b.length>0?(a.target||a.srcElement)===b[b.length-1]:!1},z.loadFocusElementList=function(a){if(a){var b=a.value.modalDomEl;if(b&&b.length){var c=b[0].querySelectorAll(D);return c?Array.prototype.filter.call(c,function(a){return k(a)}):c}}},z}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return q}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!e.component&&!e.template&&!e.templateUrl)throw new Error("One of component or template or templateUrl options is required.");var q;q=e.component?c.when(g.resolve(e.resolve,{},null,null)):c.all([i(e),g.resolve(e.resolve,{},null,null)]);var r;return r=k=c.all([k]).then(j,j).then(function(a){function c(b,c,d,e){b.$scope=g,b.$scope.$resolve={},d?b.$scope.$uibModalInstance=p:b.$uibModalInstance=p;var f=c?a[1]:a;angular.forEach(f,function(a,c){e&&(b[c]=a),b.$scope.$resolve[c]=a})}var d=e.scope||b,g=d.$new();g.$close=p.close,g.$dismiss=p.dismiss,g.$on("$destroy",function(){g.$$uibDestructionScheduled||g.$dismiss("$uibUnscheduledDestruction")});var i,j,k={scope:g,deferred:l,renderDeferred:o,closedDeferred:n,animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,ariaLabelledBy:e.ariaLabelledBy,ariaDescribedBy:e.ariaDescribedBy,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo},q={},r={};e.component?(c(q,!1,!0,!1),q.name=e.component,k.component=q):e.controller&&(c(r,!0,!1,!0),j=f(e.controller,r,!0,e.controllerAs),e.controllerAs&&e.bindToController&&(i=j.instance,i.$close=g.$close,i.$dismiss=g.$dismiss,angular.extend(i,{$resolve:r.$scope.$resolve},d)),i=j(),angular.isFunction(i.$onInit)&&i.$onInit()),e.component||(k.content=a[0]),h.open(p,k),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===r&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){
-a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},link:function(b,c,d,e){c.addClass("pager");var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,b.$set("role","menu"),d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},link:function(a,c,d,e){c.addClass("pagination");var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),b=null)}}var o=m.createNew();return h.on("keyup",n),k.$on("$destroy",function(){h.off("keyup",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup uib-title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'origin-scope="origScope" class="uib-position-measure '+k+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){P.isOpen?q():m()}function m(){O&&!a.$eval(d[k+"Enable"])||(u(),x(),P.popupDelay?H||(H=g(r,P.popupDelay,!1)):r())}function q(){s(),P.popupCloseDelay?I||(I=g(t,P.popupCloseDelay,!1)):t()}function r(){return s(),u(),P.content?(v(),void P.$evalAsync(function(){P.isOpen=!0,y(!0),U()})):angular.noop}function s(){H&&(g.cancel(H),H=null),J&&(g.cancel(J),J=null)}function t(){P&&P.$evalAsync(function(){P&&(P.isOpen=!1,y(!1),P.animation?G||(G=g(w,150,!1)):w())})}function u(){I&&(g.cancel(I),I=null),G&&(g.cancel(G),G=null)}function v(){E||(F=P.$new(),E=c(F,function(a){M?h.find("body").append(a):b.after(a)}),o.add(P,{close:t}),z())}function w(){s(),u(),A(),E&&(E.remove(),E=null,K&&g.cancel(K)),o.remove(P),F&&(F.$destroy(),F=null)}function x(){P.title=d[k+"Title"],S?P.content=S(a):P.content=d[e],P.popupClass=d[k+"Class"],P.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(P.placement);L=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);P.popupDelay=isNaN(c)?n.popupDelay:c,P.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){R&&angular.isFunction(R.assign)&&R.assign(a,b)}function z(){T.length=0,S?(T.push(a.$watch(S,function(a){P.content=a,!a&&P.isOpen&&t()})),T.push(F.$watch(function(){Q||(Q=!0,F.$$postDigest(function(){Q=!1,P&&P.isOpen&&U()}))}))):T.push(d.$observe(e,function(a){P.content=a,!a&&P.isOpen?t():U()})),T.push(d.$observe(k+"Title",function(a){P.title=a,P.isOpen&&U()})),T.push(d.$observe(k+"Placement",function(a){P.placement=a?a:n.placement,P.isOpen&&U()}))}function A(){T.length&&(angular.forEach(T,function(a){a()}),T.length=0)}function B(a){P&&P.isOpen&&E&&(b[0].contains(a.target)||E[0].contains(a.target)||q())}function C(a){27===a.which&&q()}function D(){var c=[],e=[],f=a.$eval(d[k+"Trigger"]);V(),angular.isObject(f)?(Object.keys(f).forEach(function(a){c.push(a),e.push(f[a])}),N={show:c,hide:e}):N=p(f),"none"!==N.show&&N.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===N.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(N.hide[c],q)),b.on("keypress",C)})}var E,F,G,H,I,J,K,L,M=angular.isDefined(n.appendToBody)?n.appendToBody:!1,N=p(void 0),O=angular.isDefined(d[k+"Enable"]),P=a.$new(!0),Q=!1,R=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,S=n.useContentExp?l(d[e]):!1,T=[],U=function(){E&&E.html()&&(J||(J=g(function(){var a=i.positionElements(b,E,P.placement,M),c=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),d=M?i.offset(b):i.position(b);E.css({top:a.top+"px",left:a.left+"px"});var e=a.placement.split("-");E.hasClass(e[0])||(E.removeClass(L.split("-")[0]),E.addClass(e[0])),E.hasClass(n.placementClassPrefix+a.placement)||(E.removeClass(n.placementClassPrefix+L),E.addClass(n.placementClassPrefix+a.placement)),K=g(function(){var a=angular.isDefined(E.offsetHeight)?E.offsetHeight:E.prop("offsetHeight"),b=i.adjustTop(e,d,c,a);b&&E.css(b),K=null},0,!1),E.hasClass("uib-position-measure")?(i.positionArrow(E,a.placement),E.removeClass("uib-position-measure")):L!==a.placement&&i.positionArrow(E,a.placement),L=a.placement,J=null},0,!1)))};P.origScope=a,P.isOpen=!1,P.contentExp=function(){return P.content},d.$observe("disabled",function(a){a&&s(),a&&P.isOpen&&t()}),R&&a.$watch(R,function(a){P&&!a===P.isOpen&&j()});var V=function(){N.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j)),b.off("keypress",C)}),N.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};D();var W=a.$eval(d[k+"Animation"]);P.animation=angular.isDefined(W)?!!W:n.animation;var X,Y=k+"AppendToBody";X=Y in d&&void 0===d[Y]?!0:a.$eval(d[Y]),M=angular.isDefined(X)?X:M,a.$on("$destroy",function(){V(),w(),P=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff,this.enableReset=angular.isDefined(b.enableReset)?a.$parent.$eval(b.enableReset):c.enableReset;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){if(!a.readonly&&b>=0&&b<=a.range.length){var c=e.enableReset&&d.$viewValue===b?0:b;d.$setViewValue(c),d.$render()}},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a,f){if(!e){var g=b(c),h=d.tabs[g];if(h){if(h.tab.onDeselect({$event:f,$selectedIndex:a}),f&&f.isDefaultPrevented())return;h.tab.active=!1}var i=d.tabs[a];i?(i.tab.onSelect({$event:f}),i.tab.active=!0,d.active=i.index,c=i.index):!i&&angular.isDefined(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isDefined(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){for(var b,c=0;c<d.tabs.length;c++)if(d.tabs[c].tab===a){b=c;break}if(d.tabs[b].index===d.active){var e=b===d.tabs.length-1?b-1:b+1%d.tabs.length;d.select(e)}d.tabs.splice(b,1)},a.$watch("tabset.active",function(a){angular.isDefined(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(a){if(!b.disabled){for(var c,d=0;d<e.tabs.length;d++)if(e.tabs[d].tab===b){c=d;break}e.select(c,a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c&&""!==a.hours?(a.showMeridian&&(12===b&&(b=0),a.meridian===y[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes,c=b>=0&&60>b;return c&&""!==a.minutes?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a,b){return null===a?"":angular.isDefined(a)&&a.toString().length<2&&!b?"0"+a:a.toString()}function l(a){m(),x.$setViewValue(new Date(v)),n(a)}function m(){s&&s.$setValidity("hours",!0),t&&t.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),x.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(x.$modelValue){var c=v.getHours(),d=v.getMinutes(),e=v.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c,!z),"m"!==b&&(a.minutes=k(d)),a.meridian=v.getHours()<12?y[0]:y[1],"s"!==b&&(a.seconds=k(e)),a.meridian=v.getHours()<12?y[0]:y[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=y[0]}function o(a){v=q(v,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}function r(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}var s,t,u,v=new Date,w=[],x={$setViewValue:angular.noop},y=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS,z=angular.isDefined(c.padHours)?a.$parent.$eval(c.padHours):!0;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){x=b,x.$render=this.render,x.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2);s=e.controller("ngModel"),t=f.controller("ngModel"),u=h.controller("ngModel");var i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var A=g.hourStep;c.hourStep&&w.push(a.$parent.$watch(d(c.hourStep),function(a){A=+a}));var B=g.minuteStep;c.minuteStep&&w.push(a.$parent.$watch(d(c.minuteStep),function(a){B=+a}));var C;w.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);C=isNaN(b)?void 0:b}));var D;w.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);D=isNaN(b)?void 0:b}));var E=!1;c.ngDisabled&&w.push(a.$parent.$watch(d(c.ngDisabled),function(a){E=a})),a.noIncrementHours=function(){var a=p(v,60*A);return E||a>D||v>a&&C>a},a.noDecrementHours=function(){var a=p(v,60*-A);return E||C>a||a>v&&a>D},a.noIncrementMinutes=function(){var a=p(v,B);return E||a>D||v>a&&C>a},a.noDecrementMinutes=function(){var a=p(v,-B);return E||C>a||a>v&&a>D},a.noIncrementSeconds=function(){var a=q(v,F);return E||a>D||v>a&&C>a},a.noDecrementSeconds=function(){var a=q(v,-F);return E||C>a||a>v&&a>D},a.noToggleMeridian=function(){return v.getHours()<12?E||p(v,720)>D:E||p(v,-720)<C};var F=g.secondStep;c.secondStep&&w.push(a.$parent.$watch(d(c.secondStep),function(a){F=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&w.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&w.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,x.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(v.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.on("mousewheel wheel",function(b){E||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.on("keydown",function(b){E||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){x.$setViewValue(null),x.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b,s&&s.$setValidity("hours",!1)),angular.isDefined(c)&&(a.invalidMinutes=c,t&&t.$setValidity("minutes",!1)),angular.isDefined(d)&&(a.invalidSeconds=d,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var a=h(),b=i();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(a),v.setMinutes(b),C>v||v>D?e(!0):l("h")):e(!0)},b.on("blur",function(b){x.$setTouched(),r()?m():null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours,!z)})}),a.updateMinutes=function(){var a=i(),b=h();x.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(v.setHours(b),v.setMinutes(a),C>v||v>D?e(void 0,!0):l("m")):e(void 0,!0)},c.on("blur",function(b){x.$setTouched(),r()?m():null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();x.$setDirty(),angular.isDefined(a)?(v.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.on("blur",function(b){r()?m():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=x.$viewValue;isNaN(b)?(x.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(v=b),C>v||v>D?(x.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*A*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-A*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*B)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-B)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(F)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-F)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(v.getHours()<12?60:-60)):a.meridian=a.meridian===y[0]?y[1]:y[0])},a.blur=function(){x.$setTouched()},a.$on("$destroy",function(){for(;w.length;)w.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){P.moveInProgress||(P.moveInProgress=!0,P.$digest()),$()}function o(){P.position=F?l.offset(b):l.position(b),P.position.top+=b.prop("offsetHeight")}function p(a){var b;return angular.version.minor<6?(b=a.$options||{},b.getOption=function(a){return b[a]}):b=a.$options,b}var q,r,s=[9,13,27,38,40],t=200,u=a.$eval(c.typeaheadMinLength);u||0===u||(u=1),a.$watch(c.typeaheadMinLength,function(a){u=a||0===a?a:1});var v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){w=a!==!1});var x,y,z=e(c.typeaheadLoading).assign||angular.noop,A=c.typeaheadShouldSelect?e(c.typeaheadShouldSelect):function(a,b){var c=b.$event;return 13===c.which||9===c.which},B=e(c.typeaheadOnSelect),C=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,D=e(c.typeaheadNoResults).assign||angular.noop,E=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,F=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,G=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,H=a.$eval(c.typeaheadFocusFirst)!==!1,I=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,J=e(c.typeaheadIsOpen).assign||angular.noop,K=a.$eval(c.typeaheadShowHint)||!1,L=e(c.ngModel),M=e(c.ngModel+"($$$p)"),N=function(b,c){return angular.isFunction(L(a))&&r.getOption("getterSetter")?M(b,{$$$p:c}):L.assign(b,c)},O=m.parse(c.uibTypeahead),P=a.$new(),Q=a.$on("$destroy",function(){P.$destroy()});P.$on("$destroy",Q);var R="typeahead-"+P.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":R});var S,T;K&&(S=angular.element("<div></div>"),S.css("position","relative"),b.after(S),T=b.clone(),T.attr("placeholder",""),T.attr("tabindex","-1"),T.val(""),T.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),T.attr("id")&&T.removeAttr("id"),S.append(T),T.after(b));var U=angular.element("<div uib-typeahead-popup></div>");U.attr({id:R,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&U.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&U.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var V=function(){K&&T.val("")},W=function(){P.matches=[],P.activeIdx=-1,b.attr("aria-expanded",!1),V()},X=function(a){return R+"-option-"+a};P.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",X(a))});var Y=function(a,b){return P.matches.length>b&&a?a.toUpperCase()===P.matches[b].label.toUpperCase():!1},Z=function(c,d){var e={$viewValue:c};z(a,!0),D(a,!1),f.when(O.source(a,e)).then(function(f){var g=c===q.$viewValue;if(g&&x)if(f&&f.length>0){P.activeIdx=H?0:-1,D(a,!1),P.matches.length=0;for(var h=0;h<f.length;h++)e[O.itemName]=f[h],P.matches.push({id:X(h),label:O.viewMapper(P,e),model:f[h]});if(P.query=c,o(),b.attr("aria-expanded",!0),I&&1===P.matches.length&&Y(c,0)&&(angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(0,d)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(0,d)),K){var i=P.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?T.val(c+i.slice(c.length)):T.val("")}}else W(),D(a,!0);g&&z(a,!1)},function(){W(),z(a,!1),D(a,!0)})};F&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var $=k(function(){P.matches.length&&o(),P.moveInProgress=!1},t);P.moveInProgress=!1,P.query=void 0;var _,aa=function(a){_=g(function(){Z(a)},v)},ba=function(){_&&g.cancel(_)};W(),P.assignIsOpen=function(b){J(a,b)},P.select=function(d,e){var f,h,i={};y=!0,i[O.itemName]=h=P.matches[d].model,f=O.modelMapper(a,i),N(a,f),q.$setValidity("editable",!0),q.$setValidity("parse",!0),B(a,{$item:h,$model:f,$label:O.viewMapper(a,i),$event:e}),W(),P.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==P.matches.length&&-1!==s.indexOf(b.which)){var c=A(a,{$event:b});if(-1===P.activeIdx&&c||9===b.which&&b.shiftKey)return W(),void P.$digest();b.preventDefault();var d;switch(b.which){case 27:b.stopPropagation(),W(),a.$digest();break;case 38:P.activeIdx=(P.activeIdx>0?P.activeIdx:P.matches.length)-1,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;case 40:P.activeIdx=(P.activeIdx+1)%P.matches.length,P.$digest(),d=U[0].querySelectorAll(".uib-typeahead-match")[P.activeIdx],d.parentNode.scrollTop=d.offsetTop;break;default:c&&P.$apply(function(){angular.isNumber(P.debounceUpdate)||angular.isObject(P.debounceUpdate)?k(function(){P.select(P.activeIdx,b)},angular.isNumber(P.debounceUpdate)?P.debounceUpdate:P.debounceUpdate["default"]):P.select(P.activeIdx,b)})}}}),b.on("focus",function(a){x=!0,0!==u||q.$viewValue||g(function(){Z(q.$viewValue,a)},0)}),b.on("blur",function(a){C&&P.matches.length&&-1!==P.activeIdx&&!y&&(y=!0,P.$apply(function(){angular.isObject(P.debounceUpdate)&&angular.isNumber(P.debounceUpdate.blur)?k(function(){P.select(P.activeIdx,a)},P.debounceUpdate.blur):P.select(P.activeIdx,a)})),!w&&q.$error.editable&&(q.$setViewValue(),P.$apply(function(){q.$setValidity("editable",!0),q.$setValidity("parse",!0)}),b.val("")),x=!1,y=!1});var ca=function(c){b[0]!==c.target&&3!==c.which&&0!==P.matches.length&&(W(),j.$$phase||a.$digest())};h.on("click",ca),a.$on("$destroy",function(){h.off("click",ca),(F||G)&&da.remove(),F&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),U.remove(),K&&S.remove()});var da=d(U)(P);F?h.find("body").append(da):G?angular.element(G).eq(0).append(da):b.after(da),
-this.init=function(b){q=b,r=p(q),P.debounceUpdate=e(r.getOption("debounce"))(a),q.$parsers.unshift(function(b){return x=!0,0===u||b&&b.length>=u?v>0?(ba(),aa(b)):Z(b):(z(a,!1),ba(),W()),w?b:b?void q.$setValidity("editable",!1):(q.$setValidity("editable",!0),null)}),q.$formatters.push(function(b){var c,d,e={};return w||q.$setValidity("editable",!0),E?(e.$model=b,E(a,e)):(e[O.itemName]=b,c=O.viewMapper(a,e),e[O.itemName]=void 0,d=O.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(a,b,c,d){d[1].init(d[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.css b/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.css
deleted file mode 100644
index f89af3e8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.css
+++ /dev/null
@@ -1,145 +0,0 @@
-/**
- * gridster.js - v0.2.1 - 2013-10-28 * http://gridster.net
- * Copyright (c) 2013 ducksboard; Licensed MIT
- */
-.gridster {
- position: relative;
- margin: auto;
- height: 0;
-}
-.gridster > ul {
- margin: 0;
- list-style: none;
- padding: 0;
-}
-.gridster-item {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- list-style: none;
- z-index: 2;
- position: absolute;
- display: none;
-}
-.gridster-loaded {
- -webkit-transition: height .3s;
- -moz-transition: height .3s;
- -o-transition: height .3s;
- transition: height .3s;
-}
-.gridster-loaded .gridster-item {
- display: block;
- position: absolute;
- -webkit-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -moz-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -o-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms;
-}
-.gridster-loaded .gridster-preview-holder {
- display: none;
- z-index: 1;
- position: absolute;
- background-color: #ddd;
- border-color: #fff;
- opacity: 0.2;
-}
-.gridster-loaded .gridster-item.gridster-item-moving,
-.gridster-loaded .gridster-preview-holder {
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
-}
-.gridster-mobile {
- height: auto !important;
-}
-.gridster-mobile .gridster-item {
- height: auto;
- position: static;
- float: none;
-}
-.gridster-item.ng-leave.ng-leave-active {
- opacity: 0;
-}
-.gridster-item.ng-enter {
- opacity: 1;
-}
-.gridster-item-moving {
- z-index: 3;
-}
-/* RESIZE */
-.gridster-item-resizable-handler {
- position: absolute;
- font-size: 1px;
- display: block;
- z-index: 5;
-}
-.handle-se {
- cursor: se-resize;
- width: 0;
- height: 0;
- right: 1px;
- bottom: 1px;
- border-style: solid;
- border-width: 0 0 12px 12px;
- border-color: transparent;
-}
-.handle-ne {
- cursor: ne-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- top: 1px;
-}
-.handle-nw {
- cursor: nw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- top: 1px;
-}
-.handle-sw {
- cursor: sw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- bottom: 1px;
-}
-.handle-e {
- cursor: e-resize;
- width: 12px;
- bottom: 0;
- right: 1px;
- top: 0;
-}
-.handle-s {
- cursor: s-resize;
- height: 12px;
- right: 0;
- bottom: 1px;
- left: 0;
-}
-.handle-n {
- cursor: n-resize;
- height: 12px;
- right: 0;
- top: 1px;
- left: 0;
-}
-.handle-w {
- cursor: w-resize;
- width: 12px;
- left: 1px;
- top: 0;
- bottom: 0;
-}
-.gridster .gridster-item:hover .gridster-box {
- border: 1.5px solid #B3B2B3;
-}
-.gridster .gridster-item:hover .handle-se {
- border-color: transparent transparent #ccc;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.css b/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.css
deleted file mode 100644
index 1bb601d3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.css
+++ /dev/null
@@ -1 +0,0 @@
-.gridster{position:relative;margin:auto;height:0}.gridster>ul{margin:0;list-style:none;padding:0}.gridster-item{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;list-style:none;z-index:2;position:absolute;display:none}.gridster-loaded{-webkit-transition:height .3s;-moz-transition:height .3s;-o-transition:height .3s;transition:height .3s}.gridster-loaded .gridster-item{display:block;position:absolute;-webkit-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-moz-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-o-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-webkit-transition-delay:50ms;-moz-transition-delay:50ms;-o-transition-delay:50ms;transition-delay:50ms}.gridster-loaded .gridster-preview-holder{display:none;z-index:1;position:absolute;background-color:#ddd;border-color:#fff;opacity:.2}.gridster-loaded .gridster-item.gridster-item-moving,.gridster-loaded .gridster-preview-holder{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.gridster-mobile{height:auto !important}.gridster-mobile .gridster-item{height:auto;position:static;float:none}.gridster-item.ng-leave.ng-leave-active{opacity:0}.gridster-item.ng-enter{opacity:1}.gridster-item-moving{z-index:3}.gridster-item-resizable-handler{position:absolute;font-size:1px;display:block;z-index:5}.handle-se{cursor:se-resize;width:0;height:0;right:1px;bottom:1px;border-style:solid;border-width:0 0 12px 12px;border-color:transparent}.handle-ne{cursor:ne-resize;width:12px;height:12px;right:1px;top:1px}.handle-nw{cursor:nw-resize;width:12px;height:12px;left:1px;top:1px}.handle-sw{cursor:sw-resize;width:12px;height:12px;left:1px;bottom:1px}.handle-e{cursor:e-resize;width:12px;bottom:0;right:1px;top:0}.handle-s{cursor:s-resize;height:12px;right:0;bottom:1px;left:0}.handle-n{cursor:n-resize;height:12px;right:0;top:1px;left:0}.handle-w{cursor:w-resize;width:12px;left:1px;top:0;bottom:0}.gridster .gridster-item:hover .gridster-box{border:1.5px solid #B3B2B3}.gridster .gridster-item:hover .handle-se{border-color:transparent transparent #ccc} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.js
deleted file mode 100644
index 07d7c878..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/dist/angular-gridster.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * angular-gridster
- * http://manifestwebdesign.github.io/angular-gridster
- *
- * @version: 0.13.14
- * @license: MIT
- */
-!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["angular"],b):"object"==typeof exports?module.exports=b(require("angular")):b(a.angular)}(this,function(a){"use strict";return a.module("gridster",[]).constant("gridsterConfig",{columns:6,pushing:!0,floating:!0,swapping:!1,width:"auto",colWidth:"auto",rowHeight:"match",margins:[10,10],outerMargin:!0,sparse:!1,isMobile:!1,mobileBreakPoint:600,mobileModeEnabled:!0,minColumns:1,minRows:1,maxRows:100,defaultSizeX:2,defaultSizeY:1,minSizeX:1,maxSizeX:null,minSizeY:1,maxSizeY:null,saveGridItemCalculatedHeightInMobile:!1,resizable:{enabled:!0,handles:["s","e","n","w","se","ne","sw","nw"]},draggable:{enabled:!0,scrollSensitivity:20,scrollSpeed:15}}).controller("GridsterCtrl",["gridsterConfig","$timeout",function(b,c){var d=this;a.extend(this,b),this.resizable=a.extend({},b.resizable||{}),this.draggable=a.extend({},b.draggable||{});var e=!1;this.layoutChanged=function(){e||(e=!0,c(function(){e=!1,d.loaded&&d.floatItemsUp(),d.updateHeight(d.movingItem?d.movingItem.sizeY:0)},30))},this.grid=[],this.allItems=[],this.destroy=function(){this.grid&&(this.grid=[]),this.$element=null,this.allItems&&(this.allItems.length=0,this.allItems=null)},this.setOptions=function(b){if(b)if(b=a.extend({},b),b.draggable&&(a.extend(this.draggable,b.draggable),delete b.draggable),b.resizable&&(a.extend(this.resizable,b.resizable),delete b.resizable),a.extend(this,b),this.margins&&2===this.margins.length)for(var c=0,d=this.margins.length;c<d;++c)this.margins[c]=parseInt(this.margins[c],10),isNaN(this.margins[c])&&(this.margins[c]=0);else this.margins=[0,0]},this.canItemOccupy=function(a,b,c){return b>-1&&c>-1&&a.sizeX+c<=this.columns&&a.sizeY+b<=this.maxRows},this.autoSetItemPosition=function(a){for(var b=0;b<this.maxRows;++b)for(var c=0;c<this.columns;++c){var d=this.getItems(b,c,a.sizeX,a.sizeY,a);if(0===d.length&&this.canItemOccupy(a,b,c))return void this.putItem(a,b,c)}throw new Error("Unable to place item!")},this.getItems=function(a,b,c,d,e){var f=[];c&&d||(c=d=1),!e||e instanceof Array||(e=[e]);var g;if(this.sparse===!1)for(var h=0;h<d;++h)for(var i=0;i<c;++i)g=this.getItem(a+h,b+i,e),!g||e&&e.indexOf(g)!==-1||f.indexOf(g)!==-1||f.push(g);else for(var j=a+d-1,k=b+c-1,l=0;l<this.allItems.length;++l)g=this.allItems[l],!g||e&&e.indexOf(g)!==-1||f.indexOf(g)!==-1||!this.intersect(g,b,k,a,j)||f.push(g);return f},this.getBoundingBox=function(a){if(0===a.length)return null;if(1===a.length)return{row:a[0].row,col:a[0].col,sizeY:a[0].sizeY,sizeX:a[0].sizeX};for(var b=0,c=0,d=9999,e=9999,f=0,g=a.length;f<g;++f){var h=a[f];d=Math.min(h.row,d),e=Math.min(h.col,e),b=Math.max(h.row+h.sizeY,b),c=Math.max(h.col+h.sizeX,c)}return{row:d,col:e,sizeY:b-d,sizeX:c-e}},this.intersect=function(a,b,c,d,e){return b<=a.col+a.sizeX-1&&c>=a.col&&d<=a.row+a.sizeY-1&&e>=a.row},this.removeItem=function(a){for(var b,c=0,d=this.grid.length;c<d;++c){var e=this.grid[c];if(e&&(b=e.indexOf(a),b!==-1)){e[b]=null;break}}this.sparse&&(b=this.allItems.indexOf(a),b!==-1&&this.allItems.splice(b,1)),this.layoutChanged()},this.getItem=function(a,b,c){!c||c instanceof Array||(c=[c]);for(var d=1;a>-1;){for(var e=1,f=b;f>-1;){var g=this.grid[a];if(g){var h=g[f];if(h&&(!c||c.indexOf(h)===-1)&&h.sizeX>=e&&h.sizeY>=d)return h}++e,--f}--a,++d}return null},this.putItems=function(a){for(var b=0,c=a.length;b<c;++b)this.putItem(a[b])},this.putItem=function(a,b,c,d){if(("undefined"==typeof b||null===b)&&(b=a.row,c=a.col,"undefined"==typeof b||null===b))return void this.autoSetItemPosition(a);if(this.canItemOccupy(a,b,c)||(c=Math.min(this.columns-a.sizeX,Math.max(0,c)),b=Math.min(this.maxRows-a.sizeY,Math.max(0,b))),null!==a.oldRow&&"undefined"!=typeof a.oldRow){var e=a.oldRow===b&&a.oldColumn===c,f=this.grid[b]&&this.grid[b][c]===a;if(e&&f)return a.row=b,void(a.col=c);var g=this.grid[a.oldRow];g&&g[a.oldColumn]===a&&delete g[a.oldColumn]}a.oldRow=a.row=b,a.oldColumn=a.col=c,this.moveOverlappingItems(a,d),this.grid[b]||(this.grid[b]=[]),this.grid[b][c]=a,this.sparse&&this.allItems.indexOf(a)===-1&&this.allItems.push(a),this.movingItem===a&&this.floatItemUp(a),this.layoutChanged()},this.swapItems=function(a,b){this.grid[a.row][a.col]=b,this.grid[b.row][b.col]=a;var c=a.row,d=a.col;a.row=b.row,a.col=b.col,b.row=c,b.col=d},this.moveOverlappingItems=function(a,b){b?b.indexOf(a)===-1&&(b=b.slice(0),b.push(a)):b=[a];var c=this.getItems(a.row,a.col,a.sizeX,a.sizeY,b);this.moveItemsDown(c,a.row+a.sizeY,b)},this.moveItemsDown=function(a,b,c){if(a&&0!==a.length){a.sort(function(a,b){return a.row-b.row}),c=c?c.slice(0):[];var d,e,f,g={};for(e=0,f=a.length;e<f;++e){d=a[e];var h=g[d.col];("undefined"==typeof h||d.row<h)&&(g[d.col]=d.row)}for(e=0,f=a.length;e<f;++e){d=a[e];var i=b-g[d.col];this.moveItemDown(d,d.row+i,c),c.push(d)}}},this.moveItemDown=function(a,b,c){if(!(a.row>=b)){for(;a.row<b;)++a.row,this.moveOverlappingItems(a,c);this.putItem(a,a.row,a.col,c)}},this.floatItemsUp=function(){if(this.floating!==!1)for(var a=0,b=this.grid.length;a<b;++a){var c=this.grid[a];if(c)for(var d=0,e=c.length;d<e;++d){var f=c[d];f&&this.floatItemUp(f)}}},this.floatItemUp=function(a){if(this.floating!==!1){for(var b=a.col,c=a.sizeY,d=a.sizeX,e=null,f=null,g=a.row-1;g>-1;){var h=this.getItems(g,b,d,c,a);if(0!==h.length)break;e=g,f=b,--g}null!==e&&this.putItem(a,e,f)}},this.updateHeight=function(a){var b=this.minRows;a=a||0;for(var c=this.grid.length;c>=0;--c){var d=this.grid[c];if(d)for(var e=0,f=d.length;e<f;++e)d[e]&&(b=Math.max(b,c+a+d[e].sizeY))}this.gridHeight=this.maxRows-b>0?Math.min(this.maxRows,b):Math.max(this.maxRows,b)},this.pixelsToRows=function(a,b){return this.outerMargin||(a+=this.margins[0]/2),b===!0?Math.ceil(a/this.curRowHeight):b===!1?Math.floor(a/this.curRowHeight):Math.round(a/this.curRowHeight)},this.pixelsToColumns=function(a,b){return this.outerMargin||(a+=this.margins[1]/2),b===!0?Math.ceil(a/this.curColWidth):b===!1?Math.floor(a/this.curColWidth):Math.round(a/this.curColWidth)}}]).directive("gridsterPreview",function(){return{replace:!0,scope:!0,require:"^gridster",template:'<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',link:function(a,b,c,d){a.previewStyle=function(){return d.movingItem?{display:"block",height:d.movingItem.sizeY*d.curRowHeight-d.margins[0]+"px",width:d.movingItem.sizeX*d.curColWidth-d.margins[1]+"px",top:d.movingItem.row*d.curRowHeight+(d.outerMargin?d.margins[0]:0)+"px",left:d.movingItem.col*d.curColWidth+(d.outerMargin?d.margins[1]:0)+"px"}:{display:"none"}}}}}).directive("gridster",["$timeout","$window","$rootScope","gridsterDebounce",function(b,c,d,e){return{scope:!0,restrict:"EAC",controller:"GridsterCtrl",controllerAs:"gridster",compile:function(f){return f.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>'),function(f,g,h,i){function j(){g.css("height",i.gridHeight*i.curRowHeight+(i.outerMargin?i.margins[0]:-i.margins[0])+"px")}function k(a){if(i.setOptions(a),l(g[0])){"auto"===i.width?i.curWidth=g[0].offsetWidth||parseInt(g.css("width"),10):i.curWidth=i.width,"auto"===i.colWidth?i.curColWidth=(i.curWidth+(i.outerMargin?-i.margins[1]:i.margins[1]))/i.columns:i.curColWidth=i.colWidth,i.curRowHeight=i.rowHeight,"string"==typeof i.rowHeight&&("match"===i.rowHeight?i.curRowHeight=Math.round(i.curColWidth):i.rowHeight.indexOf("*")!==-1?i.curRowHeight=Math.round(i.curColWidth*i.rowHeight.replace("*","").replace(" ","")):i.rowHeight.indexOf("/")!==-1&&(i.curRowHeight=Math.round(i.curColWidth/i.rowHeight.replace("/","").replace(" ","")))),i.isMobile=i.mobileModeEnabled&&i.curWidth<=i.mobileBreakPoint;for(var b=0,c=i.grid.length;b<c;++b){var d=i.grid[b];if(d)for(var e=0,f=d.length;e<f;++e)if(d[e]){var h=d[e];h.setElementPosition(),h.setElementSizeY(),h.setElementSizeX()}}j()}}i.loaded=!1,i.$element=g,f.gridster=i,g.addClass("gridster");var l=function(a){return"hidden"!==a.style.visibility&&"none"!==a.style.display};f.$watch(function(){return i.gridHeight},j),f.$watch(function(){return i.movingItem},function(){i.updateHeight(i.movingItem?i.movingItem.sizeY:0)});var m=h.gridster;m?f.$parent.$watch(m,function(a){k(a)},!0):k({}),f.$watch(function(){return i.loaded},function(){i.loaded?(g.addClass("gridster-loaded"),d.$broadcast("gridster-loaded",i)):g.removeClass("gridster-loaded")}),f.$watch(function(){return i.isMobile},function(){i.isMobile?g.addClass("gridster-mobile").removeClass("gridster-desktop"):g.removeClass("gridster-mobile").addClass("gridster-desktop"),d.$broadcast("gridster-mobile-changed",i)}),f.$watch(function(){return i.draggable},function(){d.$broadcast("gridster-draggable-changed",i)},!0),f.$watch(function(){return i.resizable},function(){d.$broadcast("gridster-resizable-changed",i)},!0);var n=g[0].offsetWidth||parseInt(g.css("width"),10),o=function(){var a=g[0].offsetWidth||parseInt(g.css("width"),10);a&&a!==n&&!i.movingItem&&(n=a,i.loaded&&g.removeClass("gridster-loaded"),k(),i.loaded&&g.addClass("gridster-loaded"),d.$broadcast("gridster-resized",[a,g[0].offsetHeight],i))},p=e(function(){o(),b(function(){f.$apply()})},100);f.$watch(function(){return l(g[0])},p),"function"==typeof window.addResizeListener?window.addResizeListener(g[0],p):f.$watch(function(){return g[0].offsetWidth||parseInt(g.css("width"),10)},o);var q=a.element(c);q.on("resize",p),f.$on("$destroy",function(){i.destroy(),q.off("resize",p),"function"==typeof window.removeResizeListener&&window.removeResizeListener(g[0],p)}),b(function(){f.$watch("gridster.floating",function(){i.floatItemsUp()}),i.loaded=!0},100)}}}}]).controller("GridsterItemCtrl",function(){this.$element=null,this.gridster=null,this.row=null,this.col=null,this.sizeX=null,this.sizeY=null,this.minSizeX=0,this.minSizeY=0,this.maxSizeX=null,this.maxSizeY=null,this.init=function(a,b){this.$element=a,this.gridster=b,this.sizeX=b.defaultSizeX,this.sizeY=b.defaultSizeY},this.destroy=function(){this.gridster=null,this.$element=null},this.toJSON=function(){return{row:this.row,col:this.col,sizeY:this.sizeY,sizeX:this.sizeX}},this.isMoving=function(){return this.gridster.movingItem===this},this.setPosition=function(a,b){this.gridster.putItem(this,a,b),this.isMoving()||this.setElementPosition()},this.setSize=function(a,b,c){a=a.toUpperCase();var d="size"+a,e="Size"+a;if(""!==b){b=parseInt(b,10),(isNaN(b)||0===b)&&(b=this.gridster["default"+e]);var f="X"===a?this.gridster.columns:this.gridster.maxRows;this["max"+e]&&(f=Math.min(this["max"+e],f)),this.gridster["max"+e]&&(f=Math.min(this.gridster["max"+e],f)),"X"===a&&this.cols?f-=this.cols:"Y"===a&&this.rows&&(f-=this.rows);var g=0;this["min"+e]&&(g=Math.max(this["min"+e],g)),this.gridster["min"+e]&&(g=Math.max(this.gridster["min"+e],g)),b=Math.max(Math.min(b,f),g);var h=this[d]!==b||this["old"+e]&&this["old"+e]!==b;return this["old"+e]=this[d]=b,this.isMoving()||this["setElement"+e](),!c&&h&&(this.gridster.moveOverlappingItems(this),this.gridster.layoutChanged()),h}},this.setSizeY=function(a,b){return this.setSize("Y",a,b)},this.setSizeX=function(a,b){return this.setSize("X",a,b)},this.setElementPosition=function(){this.gridster.isMobile?this.$element.css({marginLeft:this.gridster.margins[0]+"px",marginRight:this.gridster.margins[0]+"px",marginTop:this.gridster.margins[1]+"px",marginBottom:this.gridster.margins[1]+"px",top:"",left:""}):this.$element.css({margin:0,top:this.row*this.gridster.curRowHeight+(this.gridster.outerMargin?this.gridster.margins[0]:0)+"px",left:this.col*this.gridster.curColWidth+(this.gridster.outerMargin?this.gridster.margins[1]:0)+"px"})},this.setElementSizeY=function(){this.gridster.isMobile&&!this.gridster.saveGridItemCalculatedHeightInMobile?this.$element.css("height",""):this.$element.css("height",this.sizeY*this.gridster.curRowHeight-this.gridster.margins[0]+"px")},this.setElementSizeX=function(){this.gridster.isMobile?this.$element.css("width",""):this.$element.css("width",this.sizeX*this.gridster.curColWidth-this.gridster.margins[1]+"px")},this.getElementSizeX=function(){return this.sizeX*this.gridster.curColWidth-this.gridster.margins[1]},this.getElementSizeY=function(){return this.sizeY*this.gridster.curRowHeight-this.gridster.margins[0]}}).factory("GridsterTouch",[function(){return function(a,b,c,d){var e,f,g={},h=function(a){if(Object.keys)return Object.keys(a).length;var b,c=0;for(b in a)++c;return c},i=function(a){for(var b=0,c=0,d=navigator.userAgent.match(/\bMSIE\b/),e=a;null!=e;e=e.offsetParent)d&&(!document.documentMode||document.documentMode<8)&&"relative"===e.currentStyle.position&&e.offsetParent&&"relative"===e.offsetParent.currentStyle.position&&e.offsetLeft===e.offsetParent.offsetLeft?c+=e.offsetTop:(b+=e.offsetLeft,c+=e.offsetTop);return{x:b,y:c}},j=i(a),k=!1,l=function(e){if("mousemove"!==e.type||0!==h(g)){for(var f=!0,m=e.changedTouches?e.changedTouches:[e],n=0;n<m.length;++n){var o=m[n],p="undefined"!=typeof o.identifier?o.identifier:"undefined"!=typeof o.pointerId?o.pointerId:1;if("undefined"==typeof o.pageX)if(o.pageX=o.offsetX+j.x,o.pageY=o.offsetY+j.y,o.srcElement.offsetParent===a&&document.documentMode&&8===document.documentMode&&"mousedown"===o.type)o.pageX+=o.srcElement.offsetLeft,o.pageY+=o.srcElement.offsetTop;else if(o.srcElement!==a&&!document.documentMode||document.documentMode<8){for(var q=-2,r=-2,s=o.srcElement;null!==s;s=s.parentNode)q+=s.scrollLeft?s.scrollLeft:0,r+=s.scrollTop?s.scrollTop:0;o.pageX=o.clientX+q,o.pageY=o.clientY+r}var t=o.pageX,u=o.pageY;e.type.match(/(start|down)$/i)?(j=i(a),g[p]&&(d&&d({target:e.target,which:e.which,pointerId:p,pageX:t,pageY:u}),delete g[p]),b&&f&&(f=b({target:e.target,which:e.which,pointerId:p,pageX:t,pageY:u})),g[p]={x:t,y:u},a.msSetPointerCapture&&f?a.msSetPointerCapture(p):"mousedown"===e.type&&1===h(g)&&(k?a.setCapture(!0):(document.addEventListener("mousemove",l,!1),document.addEventListener("mouseup",l,!1)))):e.type.match(/move$/i)?!g[p]||g[p].x===t&&g[p].y===u||(c&&f&&(f=c({target:e.target,which:e.which,pointerId:p,pageX:t,pageY:u})),g[p].x=t,g[p].y=u):g[p]&&e.type.match(/(up|end|cancel)$/i)&&(d&&f&&(f=d({target:e.target,which:e.which,pointerId:p,pageX:t,pageY:u})),delete g[p],a.msReleasePointerCapture?a.msReleasePointerCapture(p):"mouseup"===e.type&&0===h(g)&&(k?a.releaseCapture():(document.removeEventListener("mousemove",l,!1),document.removeEventListener("mouseup",l,!1))))}f&&(e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation(),e.preventMouseEvent&&e.preventMouseEvent())}};return this.enable=function(){window.navigator.msPointerEnabled?(a.addEventListener("MSPointerDown",l,!1),a.addEventListener("MSPointerMove",l,!1),a.addEventListener("MSPointerUp",l,!1),a.addEventListener("MSPointerCancel",l,!1),"undefined"!=typeof a.style.msContentZooming&&(e=a.style.msContentZooming,a.style.msContentZooming="none"),"undefined"!=typeof a.style.msTouchAction&&(f=a.style.msTouchAction,a.style.msTouchAction="none")):a.addEventListener?(a.addEventListener("touchstart",l,!1),a.addEventListener("touchmove",l,!1),a.addEventListener("touchend",l,!1),a.addEventListener("touchcancel",l,!1),a.addEventListener("mousedown",l,!1),a.setCapture&&!window.navigator.userAgent.match(/\bGecko\b/)&&(k=!0,a.addEventListener("mousemove",l,!1),a.addEventListener("mouseup",l,!1))):a.attachEvent&&a.setCapture&&(k=!0,a.attachEvent("onmousedown",function(){return l(window.event),window.event.returnValue=!1,!1}),a.attachEvent("onmousemove",function(){return l(window.event),window.event.returnValue=!1,!1}),a.attachEvent("onmouseup",function(){return l(window.event),window.event.returnValue=!1,!1}))},this.disable=function(){window.navigator.msPointerEnabled?(a.removeEventListener("MSPointerDown",l,!1),a.removeEventListener("MSPointerMove",l,!1),a.removeEventListener("MSPointerUp",l,!1),a.removeEventListener("MSPointerCancel",l,!1),e&&(a.style.msContentZooming=e),f&&(a.style.msTouchAction=f)):a.removeEventListener?(a.removeEventListener("touchstart",l,!1),a.removeEventListener("touchmove",l,!1),a.removeEventListener("touchend",l,!1),a.removeEventListener("touchcancel",l,!1),a.removeEventListener("mousedown",l,!1),a.setCapture&&!window.navigator.userAgent.match(/\bGecko\b/)&&(k=!0,a.removeEventListener("mousemove",l,!1),a.removeEventListener("mouseup",l,!1))):a.detachEvent&&a.setCapture&&(k=!0,a.detachEvent("onmousedown"),a.detachEvent("onmousemove"),a.detachEvent("onmouseup"))},this}}]).factory("GridsterDraggable",["$document","$window","GridsterTouch",function(b,c,d){function e(e,f,g,h,i){function j(a){e.addClass("gridster-item-moving"),g.movingItem=h,g.updateHeight(h.sizeY),f.$apply(function(){g.draggable&&g.draggable.start&&g.draggable.start(a,e,i,h)})}function k(a){var b=h.row,d=h.col,j=g.draggable&&g.draggable.drag,k=g.draggable.scrollSensitivity,l=g.draggable.scrollSpeed,m=Math.min(g.pixelsToRows(q),g.maxRows-1),n=Math.min(g.pixelsToColumns(p),g.columns-1),o=g.getItems(m,n,h.sizeX,h.sizeY,h),r=0!==o.length;if(g.swapping===!0&&r){var s=g.getBoundingBox(o),t=s.sizeX===h.sizeX&&s.sizeY===h.sizeY,u=s.row===b,v=s.col===d,w=s.row===m&&s.col===n,x=u||v;if(t&&1===o.length){if(w)g.swapItems(h,o[0]);else if(x)return}else if(s.sizeX<=h.sizeX&&s.sizeY<=h.sizeY&&x)for(var y=h.row<=m?h.row:m+h.sizeY,z=h.col<=n?h.col:n+h.sizeX,A=y-s.row,B=z-s.col,C=0,E=o.length;C<E;++C){var F=o[C],G=g.getItems(F.row+A,F.col+B,F.sizeX,F.sizeY,h);0===G.length&&g.putItem(F,F.row+A,F.col+B)}}g.pushing===!1&&r||(h.row=m,h.col=n),a.pageY-D.body.scrollTop<k?D.body.scrollTop=D.body.scrollTop-l:c.innerHeight-(a.pageY-D.body.scrollTop)<k&&(D.body.scrollTop=D.body.scrollTop+l),a.pageX-D.body.scrollLeft<k?D.body.scrollLeft=D.body.scrollLeft-l:c.innerWidth-(a.pageX-D.body.scrollLeft)<k&&(D.body.scrollLeft=D.body.scrollLeft+l),(j||b!==h.row||d!==h.col)&&f.$apply(function(){j&&g.draggable.drag(a,e,i,h)})}function l(a){e.removeClass("gridster-item-moving");var b=Math.min(g.pixelsToRows(q),g.maxRows-1),c=Math.min(g.pixelsToColumns(p),g.columns-1);g.pushing===!1&&0!==g.getItems(b,c,h.sizeX,h.sizeY,h).length||(h.row=b,h.col=c),g.movingItem=null,h.setPosition(h.row,h.col),f.$apply(function(){g.draggable&&g.draggable.stop&&g.draggable.stop(a,e,i,h)})}function m(b){if(E.indexOf(b.target.nodeName.toLowerCase())!==-1)return!1;var c=a.element(b.target);if(c.hasClass("gridster-item-resizable-handler"))return!1;if(c.attr("onclick")||c.attr("ng-click"))return!1;if(c.closest&&c.closest(".gridster-no-drag").length)return!1;if(g.draggable&&g.draggable.handle){var d=a.element(e[0].querySelectorAll(g.draggable.handle)),f=!1;a:for(var i=0,k=d.length;i<k;++i){var l=d[i];if(l===b.target){f=!0;break}for(var m=b.target,n=0;n<20;++n){var o=m.parentNode;if(o===e[0]||!o)break;if(o===l){f=!0;break a}m=o}}if(!f)return!1}switch(b.which){case 1:break;case 2:case 3:return}return x=b.pageX,y=b.pageY,p=parseInt(e.css("left"),10),q=parseInt(e.css("top"),10),r=e[0].offsetWidth,s=e[0].offsetHeight,t=h.col,u=h.row,j(b),!0}function n(a){if(!e.hasClass("gridster-item-moving")||e.hasClass("gridster-item-resizing"))return!1;var b=g.curWidth-1,c=g.curRowHeight*g.maxRows-1;v=a.pageX,w=a.pageY;var d=v-x+z,f=w-y+A;z=A=0,x=v,y=w;var h=d,i=f;return p+h<C?(d=C-p,z=h-d):p+r+h>b&&(d=b-p-r,z=h-d),q+i<B?(f=B-q,A=i-f):q+s+i>c&&(f=c-q-s,A=i-f),p+=d,q+=f,e.css({top:q+"px",left:p+"px"}),k(a),!0}function o(a){return!(!e.hasClass("gridster-item-moving")||e.hasClass("gridster-item-resizing"))&&(z=A=0,l(a),!0)}var p,q,r,s,t,u,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=b[0],E=["select","option","input","textarea","button"],F=null,G=null;this.enable=function(){if(F!==!0){if(F=!0,G)return void G.enable();G=new d(e[0],m,n,o),G.enable()}},this.disable=function(){F!==!1&&(F=!1,G&&G.disable())},this.toggle=function(a){a?this.enable():this.disable()},this.destroy=function(){this.disable()}}return e}]).factory("GridsterResizable",["GridsterTouch",function(b){function c(c,d,e,f,g){function h(h){function i(a){c.addClass("gridster-item-moving"),c.addClass("gridster-item-resizing"),e.movingItem=f,f.setElementSizeX(),f.setElementSizeY(),f.setElementPosition(),e.updateHeight(1),d.$apply(function(){e.resizable&&e.resizable.start&&e.resizable.start(a,c,g,f)})}function j(a){var b=f.row,i=f.col,j=f.sizeX,k=f.sizeY,l=e.resizable&&e.resizable.resize,m=f.col;["w","nw","sw"].indexOf(h)!==-1&&(m=e.pixelsToColumns(o,!1));var n=f.row;["n","ne","nw"].indexOf(h)!==-1&&(n=e.pixelsToRows(p,!1));var s=f.sizeX;["n","s"].indexOf(h)===-1&&(s=e.pixelsToColumns(q,!0));var t=f.sizeY;["e","w"].indexOf(h)===-1&&(t=e.pixelsToRows(r,!0));var u=n>-1&&m>-1&&s+m<=e.columns&&t+n<=e.maxRows;!u||e.pushing===!1&&0!==e.getItems(n,m,s,t,f).length||(f.row=n,f.col=m,f.sizeX=s,f.sizeY=t);var v=f.row!==b||f.col!==i||f.sizeX!==j||f.sizeY!==k;(l||v)&&d.$apply(function(){l&&e.resizable.resize(a,c,g,f)})}function k(a){c.removeClass("gridster-item-moving"),c.removeClass("gridster-item-resizing"),e.movingItem=null,f.setPosition(f.row,f.col),f.setSizeY(f.sizeY),f.setSizeX(f.sizeX),d.$apply(function(){e.resizable&&e.resizable.stop&&e.resizable.stop(a,c,g,f)})}function l(a){switch(a.which){case 1:break;case 2:case 3:return}return u=e.draggable.enabled,u&&(e.draggable.enabled=!1,d.$broadcast("gridster-draggable-changed",e)),z=a.pageX,A=a.pageY,o=parseInt(c.css("left"),10),p=parseInt(c.css("top"),10),q=c[0].offsetWidth,r=c[0].offsetHeight,s=f.sizeX,t=f.sizeY,i(a),!0}function m(a){var b=e.curWidth-1;x=a.pageX,y=a.pageY;var d=x-z+B,f=y-A+C;B=C=0,z=x,A=y;var g=f,h=d;return w.indexOf("n")>=0&&(r-g<G()?(f=r-G(),C=g-f):p+g<D&&(f=D-p,C=g-f),p+=f,r-=f),w.indexOf("s")>=0&&(r+g<G()?(f=G()-r,C=g-f):p+r+g>E&&(f=E-p-r,C=g-f),r+=f),w.indexOf("w")>=0&&(q-h<H()?(d=q-H(),B=h-d):o+h<F&&(d=F-o,B=h-d),o+=d,q-=d),w.indexOf("e")>=0&&(q+h<H()?(d=H()-q,B=h-d):o+q+h>b&&(d=b-o-q,B=h-d),q+=d),c.css({top:p+"px",left:o+"px",width:q+"px",height:r+"px"}),j(a),!0}function n(a){return e.draggable.enabled!==u&&(e.draggable.enabled=u,d.$broadcast("gridster-draggable-changed",e)),B=C=0,k(a),!0}var o,p,q,r,s,t,u,v,w=h,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=9999,F=0,G=function(){return(f.minSizeY?f.minSizeY:1)*e.curRowHeight-e.margins[0]},H=function(){return(f.minSizeX?f.minSizeX:1)*e.curColWidth-e.margins[1]},I=null;this.enable=function(){I||(I=a.element('<div class="gridster-item-resizable-handler handle-'+w+'"></div>'),c.append(I)),v=new b(I[0],l,m,n),v.enable()},this.disable=function(){I&&(I.remove(),I=null),v.disable(),v=void 0},this.destroy=function(){this.disable()}}var i=[],j=e.resizable.handles;"string"==typeof j&&(j=e.resizable.handles.split(","));for(var k=!1,l=0,m=j.length;l<m;l++)i.push(new h(j[l]));this.enable=function(){if(!k){for(var a=0,b=i.length;a<b;a++)i[a].enable();k=!0}},this.disable=function(){if(k){for(var a=0,b=i.length;a<b;a++)i[a].disable();k=!1}},this.toggle=function(a){a?this.enable():this.disable()},this.destroy=function(){for(var a=0,b=i.length;a<b;a++)i[a].destroy()}}return c}]).factory("gridsterDebounce",function(){return function(a,b,c){var d;return function(){var e=this,f=arguments,g=function(){d=null,c||a.apply(e,f)},h=c&&!d;clearTimeout(d),d=setTimeout(g,b),h&&a.apply(e,f)}}}).directive("gridsterItem",["$parse","GridsterDraggable","GridsterResizable","gridsterDebounce",function(a,b,c,d){return{scope:!0,restrict:"EA",controller:"GridsterItemCtrl",controllerAs:"gridsterItem",require:["^gridster","gridsterItem"],link:function(e,f,g,h){function i(){o.setPosition(o.row,o.col),r.row&&r.row.assign&&r.row.assign(e,o.row),r.col&&r.col.assign&&r.col.assign(e,o.col)}function j(){var a=o.setSizeX(o.sizeX,!0);a&&r.sizeX&&r.sizeX.assign&&r.sizeX.assign(e,o.sizeX);var b=o.setSizeY(o.sizeY,!0);b&&r.sizeY&&r.sizeY.assign&&r.sizeY.assign(e,o.sizeY),(a||b)&&(o.gridster.moveOverlappingItems(o),n.layoutChanged(),e.$broadcast("gridster-item-resized",o))}function k(){var a=document.createElement("div"),b={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(var c in b)if(void 0!==a.style[c])return b[c]}var l,m=g.gridsterItem,n=h[0],o=h[1];if(e.gridster=n,m){var p=a(m);l=p(e)||{},!l&&p.assign&&(l={row:o.row,col:o.col,sizeX:o.sizeX,sizeY:o.sizeY,minSizeX:0,minSizeY:0,maxSizeX:null,maxSizeY:null},p.assign(e,l))}else l=g;o.init(f,n),f.addClass("gridster-item");for(var q=["minSizeX","maxSizeX","minSizeY","maxSizeY","sizeX","sizeY","row","col"],r={},s=[],t=function(b){var c;if("string"==typeof l[b])c=l[b];else if("string"==typeof l[b.toLowerCase()])c=l[b.toLowerCase()];else{if(!m)return;c=m+"."+b}s.push('"'+b+'":'+c),r[b]=a(c);var d=r[b](e);"number"==typeof d&&(o[b]=d)},u=0,v=q.length;u<v;++u)t(q[u]);var w="{"+s.join(",")+"}";e.$watchCollection(w,function(a,b){for(var c in a){var d=a[c],e=b[c];e!==d&&(d=parseInt(d,10),isNaN(d)||(o[c]=d))}}),e.$watch(function(){return o.row+","+o.col},i),e.$watch(function(){return o.sizeY+","+o.sizeX+","+o.minSizeX+","+o.maxSizeX+","+o.minSizeY+","+o.maxSizeY},j);var x=new b(f,e,n,o,l),y=new c(f,e,n,o,l),z=function(){y.toggle(!n.isMobile&&n.resizable&&n.resizable.enabled)};z();var A=function(){x.toggle(!n.isMobile&&n.draggable&&n.draggable.enabled)};A(),e.$on("gridster-draggable-changed",A),e.$on("gridster-resizable-changed",z),e.$on("gridster-resized",z),e.$on("gridster-mobile-changed",function(){z(),A()});var B=d(function(){e.$apply(function(){e.$broadcast("gridster-item-transition-end",o)})},50);return f.on(k(),B),e.$broadcast("gridster-item-initialized",o),e.$on("$destroy",function(){try{y.destroy(),x.destroy()}catch(a){}try{n.removeItem(o)}catch(a){}try{o.destroy()}catch(a){}})}}}]).directive("gridsterNoDrag",function(){return{restrict:"A",link:function(a,b){b.addClass("gridster-no-drag")}}})}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.js
deleted file mode 100644
index 5fa8499f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.js
+++ /dev/null
@@ -1,2239 +0,0 @@
-/*global define:true*/
-(function(root, factory) {
-
- 'use strict';
-
- if (typeof define === 'function' && define.amd) {
- // AMD
- define(['angular'], factory);
- } else if (typeof exports === 'object') {
- // CommonJS
- module.exports = factory(require('angular'));
- } else {
- // Browser, nothing "exported". Only registered as a module with angular.
- factory(root.angular);
- }
-}(this, function(angular) {
-
- 'use strict';
-
- // This returned angular module 'gridster' is what is exported.
- return angular.module('gridster', [])
-
- .constant('gridsterConfig', {
- columns: 6, // number of columns in the grid
- pushing: true, // whether to push other items out of the way
- floating: true, // whether to automatically float items up so they stack
- swapping: false, // whether or not to have items switch places instead of push down if they are the same size
- width: 'auto', // width of the grid. "auto" will expand the grid to its parent container
- colWidth: 'auto', // width of grid columns. "auto" will divide the width of the grid evenly among the columns
- rowHeight: 'match', // height of grid rows. 'match' will make it the same as the column width, a numeric value will be interpreted as pixels, '/2' is half the column width, '*5' is five times the column width, etc.
- margins: [10, 10], // margins in between grid items
- outerMargin: true,
- sparse: false, // "true" can increase performance of dragging and resizing for big grid (e.g. 20x50)
- isMobile: false, // toggle mobile view
- mobileBreakPoint: 600, // width threshold to toggle mobile mode
- mobileModeEnabled: true, // whether or not to toggle mobile mode when screen width is less than mobileBreakPoint
- minColumns: 1, // minimum amount of columns the grid can scale down to
- minRows: 1, // minimum amount of rows to show if the grid is empty
- maxRows: 100, // maximum amount of rows in the grid
- defaultSizeX: 2, // default width of an item in columns
- defaultSizeY: 1, // default height of an item in rows
- minSizeX: 1, // minimum column width of an item
- maxSizeX: null, // maximum column width of an item
- minSizeY: 1, // minumum row height of an item
- maxSizeY: null, // maximum row height of an item
- saveGridItemCalculatedHeightInMobile: false, // grid item height in mobile display. true- to use the calculated height by sizeY given
- resizable: { // options to pass to resizable handler
- enabled: true,
- handles: ['s', 'e', 'n', 'w', 'se', 'ne', 'sw', 'nw']
- },
- draggable: { // options to pass to draggable handler
- enabled: true,
- scrollSensitivity: 20, // Distance in pixels from the edge of the viewport after which the viewport should scroll, relative to pointer
- scrollSpeed: 15 // Speed at which the window should scroll once the mouse pointer gets within scrollSensitivity distance
- }
- })
-
- .controller('GridsterCtrl', ['gridsterConfig', '$timeout',
- function(gridsterConfig, $timeout) {
-
- var gridster = this;
-
- /**
- * Create options from gridsterConfig constant
- */
- angular.extend(this, gridsterConfig);
-
- this.resizable = angular.extend({}, gridsterConfig.resizable || {});
- this.draggable = angular.extend({}, gridsterConfig.draggable || {});
-
- var flag = false;
- this.layoutChanged = function() {
- if (flag) {
- return;
- }
- flag = true;
- $timeout(function() {
- flag = false;
- if (gridster.loaded) {
- gridster.floatItemsUp();
- }
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- }, 30);
- };
-
- /**
- * A positional array of the items in the grid
- */
- this.grid = [];
- this.allItems = [];
-
- /**
- * Clean up after yourself
- */
- this.destroy = function() {
- // empty the grid to cut back on the possibility
- // of circular references
- if (this.grid) {
- this.grid = [];
- }
- this.$element = null;
-
- if (this.allItems) {
- this.allItems.length = 0;
- this.allItems = null;
- }
- };
-
- /**
- * Overrides default options
- *
- * @param {Object} options The options to override
- */
- this.setOptions = function(options) {
- if (!options) {
- return;
- }
-
- options = angular.extend({}, options);
-
- // all this to avoid using jQuery...
- if (options.draggable) {
- angular.extend(this.draggable, options.draggable);
- delete(options.draggable);
- }
- if (options.resizable) {
- angular.extend(this.resizable, options.resizable);
- delete(options.resizable);
- }
-
- angular.extend(this, options);
-
- if (!this.margins || this.margins.length !== 2) {
- this.margins = [0, 0];
- } else {
- for (var x = 0, l = this.margins.length; x < l; ++x) {
- this.margins[x] = parseInt(this.margins[x], 10);
- if (isNaN(this.margins[x])) {
- this.margins[x] = 0;
- }
- }
- }
- };
-
- /**
- * Check if item can occupy a specified position in the grid
- *
- * @param {Object} item The item in question
- * @param {Number} row The row index
- * @param {Number} column The column index
- * @returns {Boolean} True if if item fits
- */
- this.canItemOccupy = function(item, row, column) {
- return row > -1 && column > -1 && item.sizeX + column <= this.columns && item.sizeY + row <= this.maxRows;
- };
-
- /**
- * Set the item in the first suitable position
- *
- * @param {Object} item The item to insert
- */
- this.autoSetItemPosition = function(item) {
- // walk through each row and column looking for a place it will fit
- for (var rowIndex = 0; rowIndex < this.maxRows; ++rowIndex) {
- for (var colIndex = 0; colIndex < this.columns; ++colIndex) {
- // only insert if position is not already taken and it can fit
- var items = this.getItems(rowIndex, colIndex, item.sizeX, item.sizeY, item);
- if (items.length === 0 && this.canItemOccupy(item, rowIndex, colIndex)) {
- this.putItem(item, rowIndex, colIndex);
- return;
- }
- }
- }
- throw new Error('Unable to place item!');
- };
-
- /**
- * Gets items at a specific coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Number} sizeX
- * @param {Number} sizeY
- * @param {Array} excludeItems An array of items to exclude from selection
- * @returns {Array} Items that match the criteria
- */
- this.getItems = function(row, column, sizeX, sizeY, excludeItems) {
- var items = [];
- if (!sizeX || !sizeY) {
- sizeX = sizeY = 1;
- }
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- var item;
- if (this.sparse === false) { // check all cells
- for (var h = 0; h < sizeY; ++h) {
- for (var w = 0; w < sizeX; ++w) {
- item = this.getItem(row + h, column + w, excludeItems);
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && items.indexOf(item) === -1) {
- items.push(item);
- }
- }
- }
- } else { // check intersection with all items
- var bottom = row + sizeY - 1;
- var right = column + sizeX - 1;
- for (var i = 0; i < this.allItems.length; ++i) {
- item = this.allItems[i];
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && items.indexOf(item) === -1 && this.intersect(item, column, right, row, bottom)) {
- items.push(item);
- }
- }
- }
- return items;
- };
-
- /**
- * @param {Array} items
- * @returns {Object} An item that represents the bounding box of the items
- */
- this.getBoundingBox = function(items) {
-
- if (items.length === 0) {
- return null;
- }
- if (items.length === 1) {
- return {
- row: items[0].row,
- col: items[0].col,
- sizeY: items[0].sizeY,
- sizeX: items[0].sizeX
- };
- }
-
- var maxRow = 0;
- var maxCol = 0;
- var minRow = 9999;
- var minCol = 9999;
-
- for (var i = 0, l = items.length; i < l; ++i) {
- var item = items[i];
- minRow = Math.min(item.row, minRow);
- minCol = Math.min(item.col, minCol);
- maxRow = Math.max(item.row + item.sizeY, maxRow);
- maxCol = Math.max(item.col + item.sizeX, maxCol);
- }
-
- return {
- row: minRow,
- col: minCol,
- sizeY: maxRow - minRow,
- sizeX: maxCol - minCol
- };
- };
-
- /**
- * Checks if item intersects specified box
- *
- * @param {object} item
- * @param {number} left
- * @param {number} right
- * @param {number} top
- * @param {number} bottom
- */
-
- this.intersect = function(item, left, right, top, bottom) {
- return (left <= item.col + item.sizeX - 1 &&
- right >= item.col &&
- top <= item.row + item.sizeY - 1 &&
- bottom >= item.row);
- };
-
-
- /**
- * Removes an item from the grid
- *
- * @param {Object} item
- */
- this.removeItem = function(item) {
- var index;
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- index = columns.indexOf(item);
- if (index !== -1) {
- columns[index] = null;
- break;
- }
- }
- if (this.sparse) {
- index = this.allItems.indexOf(item);
- if (index !== -1) {
- this.allItems.splice(index, 1);
- }
- }
- this.layoutChanged();
- };
-
- /**
- * Returns the item at a specified coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Array} excludeItems Items to exclude from selection
- * @returns {Object} The matched item or null
- */
- this.getItem = function(row, column, excludeItems) {
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- var sizeY = 1;
- while (row > -1) {
- var sizeX = 1,
- col = column;
- while (col > -1) {
- var items = this.grid[row];
- if (items) {
- var item = items[col];
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && item.sizeX >= sizeX && item.sizeY >= sizeY) {
- return item;
- }
- }
- ++sizeX;
- --col;
- }
- --row;
- ++sizeY;
- }
- return null;
- };
-
- /**
- * Insert an array of items into the grid
- *
- * @param {Array} items An array of items to insert
- */
- this.putItems = function(items) {
- for (var i = 0, l = items.length; i < l; ++i) {
- this.putItem(items[i]);
- }
- };
-
- /**
- * Insert a single item into the grid
- *
- * @param {Object} item The item to insert
- * @param {Number} row (Optional) Specifies the items row index
- * @param {Number} column (Optional) Specifies the items column index
- * @param {Array} ignoreItems
- */
- this.putItem = function(item, row, column, ignoreItems) {
- // auto place item if no row specified
- if (typeof row === 'undefined' || row === null) {
- row = item.row;
- column = item.col;
- if (typeof row === 'undefined' || row === null) {
- this.autoSetItemPosition(item);
- return;
- }
- }
-
- // keep item within allowed bounds
- if (!this.canItemOccupy(item, row, column)) {
- column = Math.min(this.columns - item.sizeX, Math.max(0, column));
- row = Math.min(this.maxRows - item.sizeY, Math.max(0, row));
- }
-
- // check if item is already in grid
- if (item.oldRow !== null && typeof item.oldRow !== 'undefined') {
- var samePosition = item.oldRow === row && item.oldColumn === column;
- var inGrid = this.grid[row] && this.grid[row][column] === item;
- if (samePosition && inGrid) {
- item.row = row;
- item.col = column;
- return;
- } else {
- // remove from old position
- var oldRow = this.grid[item.oldRow];
- if (oldRow && oldRow[item.oldColumn] === item) {
- delete oldRow[item.oldColumn];
- }
- }
- }
-
- item.oldRow = item.row = row;
- item.oldColumn = item.col = column;
-
- this.moveOverlappingItems(item, ignoreItems);
-
- if (!this.grid[row]) {
- this.grid[row] = [];
- }
- this.grid[row][column] = item;
-
- if (this.sparse && this.allItems.indexOf(item) === -1) {
- this.allItems.push(item);
- }
-
- if (this.movingItem === item) {
- this.floatItemUp(item);
- }
- this.layoutChanged();
- };
-
- /**
- * Trade row and column if item1 with item2
- *
- * @param {Object} item1
- * @param {Object} item2
- */
- this.swapItems = function(item1, item2) {
- this.grid[item1.row][item1.col] = item2;
- this.grid[item2.row][item2.col] = item1;
-
- var item1Row = item1.row;
- var item1Col = item1.col;
- item1.row = item2.row;
- item1.col = item2.col;
- item2.row = item1Row;
- item2.col = item1Col;
- };
-
- /**
- * Prevents items from being overlapped
- *
- * @param {Object} item The item that should remain
- * @param {Array} ignoreItems
- */
- this.moveOverlappingItems = function(item, ignoreItems) {
- // don't move item, so ignore it
- if (!ignoreItems) {
- ignoreItems = [item];
- } else if (ignoreItems.indexOf(item) === -1) {
- ignoreItems = ignoreItems.slice(0);
- ignoreItems.push(item);
- }
-
- // get the items in the space occupied by the item's coordinates
- var overlappingItems = this.getItems(
- item.row,
- item.col,
- item.sizeX,
- item.sizeY,
- ignoreItems
- );
- this.moveItemsDown(overlappingItems, item.row + item.sizeY, ignoreItems);
- };
-
- /**
- * Moves an array of items to a specified row
- *
- * @param {Array} items The items to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemsDown = function(items, newRow, ignoreItems) {
- if (!items || items.length === 0) {
- return;
- }
- items.sort(function(a, b) {
- return a.row - b.row;
- });
-
- ignoreItems = ignoreItems ? ignoreItems.slice(0) : [];
- var topRows = {},
- item, i, l;
-
- // calculate the top rows in each column
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var topRow = topRows[item.col];
- if (typeof topRow === 'undefined' || item.row < topRow) {
- topRows[item.col] = item.row;
- }
- }
-
- // move each item down from the top row in its column to the row
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var rowsToMove = newRow - topRows[item.col];
- this.moveItemDown(item, item.row + rowsToMove, ignoreItems);
- ignoreItems.push(item);
- }
- };
-
- /**
- * Moves an item down to a specified row
- *
- * @param {Object} item The item to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemDown = function(item, newRow, ignoreItems) {
- if (item.row >= newRow) {
- return;
- }
- while (item.row < newRow) {
- ++item.row;
- this.moveOverlappingItems(item, ignoreItems);
- }
- this.putItem(item, item.row, item.col, ignoreItems);
- };
-
- /**
- * Moves all items up as much as possible
- */
- this.floatItemsUp = function() {
- if (this.floating === false) {
- return;
- }
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- var item = columns[colIndex];
- if (item) {
- this.floatItemUp(item);
- }
- }
- }
- };
-
- /**
- * Float an item up to the most suitable row
- *
- * @param {Object} item The item to move
- */
- this.floatItemUp = function(item) {
- if (this.floating === false) {
- return;
- }
- var colIndex = item.col,
- sizeY = item.sizeY,
- sizeX = item.sizeX,
- bestRow = null,
- bestColumn = null,
- rowIndex = item.row - 1;
-
- while (rowIndex > -1) {
- var items = this.getItems(rowIndex, colIndex, sizeX, sizeY, item);
- if (items.length !== 0) {
- break;
- }
- bestRow = rowIndex;
- bestColumn = colIndex;
- --rowIndex;
- }
- if (bestRow !== null) {
- this.putItem(item, bestRow, bestColumn);
- }
- };
-
- /**
- * Update gridsters height
- *
- * @param {Number} plus (Optional) Additional height to add
- */
- this.updateHeight = function(plus) {
- var maxHeight = this.minRows;
- plus = plus || 0;
- for (var rowIndex = this.grid.length; rowIndex >= 0; --rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- maxHeight = Math.max(maxHeight, rowIndex + plus + columns[colIndex].sizeY);
- }
- }
- }
- this.gridHeight = this.maxRows - maxHeight > 0 ? Math.min(this.maxRows, maxHeight) : Math.max(this.maxRows, maxHeight);
- };
-
- /**
- * Returns the number of rows that will fit in given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- */
- this.pixelsToRows = function(pixels, ceilOrFloor) {
- if (!this.outerMargin) {
- pixels += this.margins[0] / 2;
- }
-
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curRowHeight);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curRowHeight);
- }
-
- return Math.round(pixels / this.curRowHeight);
- };
-
- /**
- * Returns the number of columns that will fit in a given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- * @returns {Number} The number of columns
- */
- this.pixelsToColumns = function(pixels, ceilOrFloor) {
- if (!this.outerMargin) {
- pixels += this.margins[1] / 2;
- }
-
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curColWidth);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curColWidth);
- }
-
- return Math.round(pixels / this.curColWidth);
- };
- }
- ])
-
- .directive('gridsterPreview', function() {
- return {
- replace: true,
- scope: true,
- require: '^gridster',
- template: '<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',
- link: function(scope, $el, attrs, gridster) {
-
- /**
- * @returns {Object} style object for preview element
- */
- scope.previewStyle = function() {
- if (!gridster.movingItem) {
- return {
- display: 'none'
- };
- }
-
- return {
- display: 'block',
- height: (gridster.movingItem.sizeY * gridster.curRowHeight - gridster.margins[0]) + 'px',
- width: (gridster.movingItem.sizeX * gridster.curColWidth - gridster.margins[1]) + 'px',
- top: (gridster.movingItem.row * gridster.curRowHeight + (gridster.outerMargin ? gridster.margins[0] : 0)) + 'px',
- left: (gridster.movingItem.col * gridster.curColWidth + (gridster.outerMargin ? gridster.margins[1] : 0)) + 'px'
- };
- };
- }
- };
- })
-
- /**
- * The gridster directive
- *
- * @param {Function} $timeout
- * @param {Object} $window
- * @param {Object} $rootScope
- * @param {Function} gridsterDebounce
- */
- .directive('gridster', ['$timeout', '$window', '$rootScope', 'gridsterDebounce',
- function($timeout, $window, $rootScope, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EAC',
- controller: 'GridsterCtrl',
- controllerAs: 'gridster',
- compile: function($tplElem) {
-
- $tplElem.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>');
-
- return function(scope, $elem, attrs, gridster) {
- gridster.loaded = false;
-
- gridster.$element = $elem;
-
- scope.gridster = gridster;
-
- $elem.addClass('gridster');
-
- var isVisible = function(ele) {
- return ele.style.visibility !== 'hidden' && ele.style.display !== 'none';
- };
-
- function updateHeight() {
- $elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px');
- }
-
- scope.$watch(function() {
- return gridster.gridHeight;
- }, updateHeight);
-
- scope.$watch(function() {
- return gridster.movingItem;
- }, function() {
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- });
-
- function refresh(config) {
- gridster.setOptions(config);
-
- if (!isVisible($elem[0])) {
- return;
- }
-
- // resolve "auto" & "match" values
- if (gridster.width === 'auto') {
- gridster.curWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- } else {
- gridster.curWidth = gridster.width;
- }
-
- if (gridster.colWidth === 'auto') {
- gridster.curColWidth = (gridster.curWidth + (gridster.outerMargin ? -gridster.margins[1] : gridster.margins[1])) / gridster.columns;
- } else {
- gridster.curColWidth = gridster.colWidth;
- }
-
- gridster.curRowHeight = gridster.rowHeight;
- if (typeof gridster.rowHeight === 'string') {
- if (gridster.rowHeight === 'match') {
- gridster.curRowHeight = Math.round(gridster.curColWidth);
- } else if (gridster.rowHeight.indexOf('*') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth * gridster.rowHeight.replace('*', '').replace(' ', ''));
- } else if (gridster.rowHeight.indexOf('/') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth / gridster.rowHeight.replace('/', '').replace(' ', ''));
- }
- }
-
- gridster.isMobile = gridster.mobileModeEnabled && gridster.curWidth <= gridster.mobileBreakPoint;
-
- // loop through all items and reset their CSS
- for (var rowIndex = 0, l = gridster.grid.length; rowIndex < l; ++rowIndex) {
- var columns = gridster.grid[rowIndex];
- if (!columns) {
- continue;
- }
-
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- var item = columns[colIndex];
- item.setElementPosition();
- item.setElementSizeY();
- item.setElementSizeX();
- }
- }
- }
-
- updateHeight();
- }
-
- var optionsKey = attrs.gridster;
- if (optionsKey) {
- scope.$parent.$watch(optionsKey, function(newConfig) {
- refresh(newConfig);
- }, true);
- } else {
- refresh({});
- }
-
- scope.$watch(function() {
- return gridster.loaded;
- }, function() {
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- $rootScope.$broadcast('gridster-loaded', gridster);
- } else {
- $elem.removeClass('gridster-loaded');
- }
- });
-
- scope.$watch(function() {
- return gridster.isMobile;
- }, function() {
- if (gridster.isMobile) {
- $elem.addClass('gridster-mobile').removeClass('gridster-desktop');
- } else {
- $elem.removeClass('gridster-mobile').addClass('gridster-desktop');
- }
- $rootScope.$broadcast('gridster-mobile-changed', gridster);
- });
-
- scope.$watch(function() {
- return gridster.draggable;
- }, function() {
- $rootScope.$broadcast('gridster-draggable-changed', gridster);
- }, true);
-
- scope.$watch(function() {
- return gridster.resizable;
- }, function() {
- $rootScope.$broadcast('gridster-resizable-changed', gridster);
- }, true);
-
- var prevWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- var resize = function() {
- var width = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- if (!width || width === prevWidth || gridster.movingItem) {
- return;
- }
- prevWidth = width;
-
- if (gridster.loaded) {
- $elem.removeClass('gridster-loaded');
- }
-
- refresh();
-
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- }
-
- $rootScope.$broadcast('gridster-resized', [width, $elem[0].offsetHeight], gridster);
- };
-
- // track element width changes any way we can
- var onResize = gridsterDebounce(function onResize() {
- resize();
- $timeout(function() {
- scope.$apply();
- });
- }, 100);
-
- scope.$watch(function() {
- return isVisible($elem[0]);
- }, onResize);
-
- // see https://github.com/sdecima/javascript-detect-element-resize
- if (typeof window.addResizeListener === 'function') {
- window.addResizeListener($elem[0], onResize);
- } else {
- scope.$watch(function() {
- return $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- }, resize);
- }
- var $win = angular.element($window);
- $win.on('resize', onResize);
-
- // be sure to cleanup
- scope.$on('$destroy', function() {
- gridster.destroy();
- $win.off('resize', onResize);
- if (typeof window.removeResizeListener === 'function') {
- window.removeResizeListener($elem[0], onResize);
- }
- });
-
- // allow a little time to place items before floating up
- $timeout(function() {
- scope.$watch('gridster.floating', function() {
- gridster.floatItemsUp();
- });
- gridster.loaded = true;
- }, 100);
- };
- }
- };
- }
- ])
-
- .controller('GridsterItemCtrl', function() {
- this.$element = null;
- this.gridster = null;
- this.row = null;
- this.col = null;
- this.sizeX = null;
- this.sizeY = null;
- this.minSizeX = 0;
- this.minSizeY = 0;
- this.maxSizeX = null;
- this.maxSizeY = null;
-
- this.init = function($element, gridster) {
- this.$element = $element;
- this.gridster = gridster;
- this.sizeX = gridster.defaultSizeX;
- this.sizeY = gridster.defaultSizeY;
- };
-
- this.destroy = function() {
- // set these to null to avoid the possibility of circular references
- this.gridster = null;
- this.$element = null;
- };
-
- /**
- * Returns the items most important attributes
- */
- this.toJSON = function() {
- return {
- row: this.row,
- col: this.col,
- sizeY: this.sizeY,
- sizeX: this.sizeX
- };
- };
-
- this.isMoving = function() {
- return this.gridster.movingItem === this;
- };
-
- /**
- * Set the items position
- *
- * @param {Number} row
- * @param {Number} column
- */
- this.setPosition = function(row, column) {
- this.gridster.putItem(this, row, column);
-
- if (!this.isMoving()) {
- this.setElementPosition();
- }
- };
-
- /**
- * Sets a specified size property
- *
- * @param {String} key Can be either "x" or "y"
- * @param {Number} value The size amount
- * @param {Boolean} preventMove
- */
- this.setSize = function(key, value, preventMove) {
- key = key.toUpperCase();
- var camelCase = 'size' + key,
- titleCase = 'Size' + key;
- if (value === '') {
- return;
- }
- value = parseInt(value, 10);
- if (isNaN(value) || value === 0) {
- value = this.gridster['default' + titleCase];
- }
- var max = key === 'X' ? this.gridster.columns : this.gridster.maxRows;
- if (this['max' + titleCase]) {
- max = Math.min(this['max' + titleCase], max);
- }
- if (this.gridster['max' + titleCase]) {
- max = Math.min(this.gridster['max' + titleCase], max);
- }
- if (key === 'X' && this.cols) {
- max -= this.cols;
- } else if (key === 'Y' && this.rows) {
- max -= this.rows;
- }
-
- var min = 0;
- if (this['min' + titleCase]) {
- min = Math.max(this['min' + titleCase], min);
- }
- if (this.gridster['min' + titleCase]) {
- min = Math.max(this.gridster['min' + titleCase], min);
- }
-
- value = Math.max(Math.min(value, max), min);
-
- var changed = (this[camelCase] !== value || (this['old' + titleCase] && this['old' + titleCase] !== value));
- this['old' + titleCase] = this[camelCase] = value;
-
- if (!this.isMoving()) {
- this['setElement' + titleCase]();
- }
- if (!preventMove && changed) {
- this.gridster.moveOverlappingItems(this);
- this.gridster.layoutChanged();
- }
-
- return changed;
- };
-
- /**
- * Sets the items sizeY property
- *
- * @param {Number} rows
- * @param {Boolean} preventMove
- */
- this.setSizeY = function(rows, preventMove) {
- return this.setSize('Y', rows, preventMove);
- };
-
- /**
- * Sets the items sizeX property
- *
- * @param {Number} columns
- * @param {Boolean} preventMove
- */
- this.setSizeX = function(columns, preventMove) {
- return this.setSize('X', columns, preventMove);
- };
-
- /**
- * Sets an elements position on the page
- */
- this.setElementPosition = function() {
- if (this.gridster.isMobile) {
- this.$element.css({
- marginLeft: this.gridster.margins[0] + 'px',
- marginRight: this.gridster.margins[0] + 'px',
- marginTop: this.gridster.margins[1] + 'px',
- marginBottom: this.gridster.margins[1] + 'px',
- top: '',
- left: ''
- });
- } else {
- this.$element.css({
- margin: 0,
- top: (this.row * this.gridster.curRowHeight + (this.gridster.outerMargin ? this.gridster.margins[0] : 0)) + 'px',
- left: (this.col * this.gridster.curColWidth + (this.gridster.outerMargin ? this.gridster.margins[1] : 0)) + 'px'
- });
- }
- };
-
- /**
- * Sets an elements height
- */
- this.setElementSizeY = function() {
- if (this.gridster.isMobile && !this.gridster.saveGridItemCalculatedHeightInMobile) {
- this.$element.css('height', '');
- } else {
- this.$element.css('height', (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]) + 'px');
- }
- };
-
- /**
- * Sets an elements width
- */
- this.setElementSizeX = function() {
- if (this.gridster.isMobile) {
- this.$element.css('width', '');
- } else {
- this.$element.css('width', (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]) + 'px');
- }
- };
-
- /**
- * Gets an element's width
- */
- this.getElementSizeX = function() {
- return (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]);
- };
-
- /**
- * Gets an element's height
- */
- this.getElementSizeY = function() {
- return (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]);
- };
-
- })
-
- .factory('GridsterTouch', [function() {
- return function GridsterTouch(target, startEvent, moveEvent, endEvent) {
- var lastXYById = {};
-
- // Opera doesn't have Object.keys so we use this wrapper
- var numberOfKeys = function(theObject) {
- if (Object.keys) {
- return Object.keys(theObject).length;
- }
-
- var n = 0,
- key;
- for (key in theObject) {
- ++n;
- }
-
- return n;
- };
-
- // this calculates the delta needed to convert pageX/Y to offsetX/Y because offsetX/Y don't exist in the TouchEvent object or in Firefox's MouseEvent object
- var computeDocumentToElementDelta = function(theElement) {
- var elementLeft = 0;
- var elementTop = 0;
- var oldIEUserAgent = navigator.userAgent.match(/\bMSIE\b/);
-
- for (var offsetElement = theElement; offsetElement != null; offsetElement = offsetElement.offsetParent) {
- // the following is a major hack for versions of IE less than 8 to avoid an apparent problem on the IEBlog with double-counting the offsets
- // this may not be a general solution to IE7's problem with offsetLeft/offsetParent
- if (oldIEUserAgent &&
- (!document.documentMode || document.documentMode < 8) &&
- offsetElement.currentStyle.position === 'relative' && offsetElement.offsetParent && offsetElement.offsetParent.currentStyle.position === 'relative' && offsetElement.offsetLeft === offsetElement.offsetParent.offsetLeft) {
- // add only the top
- elementTop += offsetElement.offsetTop;
- } else {
- elementLeft += offsetElement.offsetLeft;
- elementTop += offsetElement.offsetTop;
- }
- }
-
- return {
- x: elementLeft,
- y: elementTop
- };
- };
-
- // cache the delta from the document to our event target (reinitialized each mousedown/MSPointerDown/touchstart)
- var documentToTargetDelta = computeDocumentToElementDelta(target);
- var useSetReleaseCapture = false;
-
- // common event handler for the mouse/pointer/touch models and their down/start, move, up/end, and cancel events
- var doEvent = function(theEvtObj) {
-
- if (theEvtObj.type === 'mousemove' && numberOfKeys(lastXYById) === 0) {
- return;
- }
-
- var prevent = true;
-
- var pointerList = theEvtObj.changedTouches ? theEvtObj.changedTouches : [theEvtObj];
- for (var i = 0; i < pointerList.length; ++i) {
- var pointerObj = pointerList[i];
- var pointerId = (typeof pointerObj.identifier !== 'undefined') ? pointerObj.identifier : (typeof pointerObj.pointerId !== 'undefined') ? pointerObj.pointerId : 1;
-
- // use the pageX/Y coordinates to compute target-relative coordinates when we have them (in ie < 9, we need to do a little work to put them there)
- if (typeof pointerObj.pageX === 'undefined') {
- // initialize assuming our source element is our target
- pointerObj.pageX = pointerObj.offsetX + documentToTargetDelta.x;
- pointerObj.pageY = pointerObj.offsetY + documentToTargetDelta.y;
-
- if (pointerObj.srcElement.offsetParent === target && document.documentMode && document.documentMode === 8 && pointerObj.type === 'mousedown') {
- // source element is a child piece of VML, we're in IE8, and we've not called setCapture yet - add the origin of the source element
- pointerObj.pageX += pointerObj.srcElement.offsetLeft;
- pointerObj.pageY += pointerObj.srcElement.offsetTop;
- } else if (pointerObj.srcElement !== target && !document.documentMode || document.documentMode < 8) {
- // source element isn't the target (most likely it's a child piece of VML) and we're in a version of IE before IE8 -
- // the offsetX/Y values are unpredictable so use the clientX/Y values and adjust by the scroll offsets of its parents
- // to get the document-relative coordinates (the same as pageX/Y)
- var sx = -2,
- sy = -2; // adjust for old IE's 2-pixel border
- for (var scrollElement = pointerObj.srcElement; scrollElement !== null; scrollElement = scrollElement.parentNode) {
- sx += scrollElement.scrollLeft ? scrollElement.scrollLeft : 0;
- sy += scrollElement.scrollTop ? scrollElement.scrollTop : 0;
- }
-
- pointerObj.pageX = pointerObj.clientX + sx;
- pointerObj.pageY = pointerObj.clientY + sy;
- }
- }
-
-
- var pageX = pointerObj.pageX;
- var pageY = pointerObj.pageY;
-
- if (theEvtObj.type.match(/(start|down)$/i)) {
- // clause for processing MSPointerDown, touchstart, and mousedown
-
- // refresh the document-to-target delta on start in case the target has moved relative to document
- documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // protect against failing to get an up or end on this pointerId
- if (lastXYById[pointerId]) {
- if (endEvent) {
- endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- delete lastXYById[pointerId];
- }
-
- if (startEvent) {
- if (prevent) {
- prevent = startEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
- }
-
- // init last page positions for this pointer
- lastXYById[pointerId] = {
- x: pageX,
- y: pageY
- };
-
- // IE pointer model
- if (target.msSetPointerCapture && prevent) {
- target.msSetPointerCapture(pointerId);
- } else if (theEvtObj.type === 'mousedown' && numberOfKeys(lastXYById) === 1) {
- if (useSetReleaseCapture) {
- target.setCapture(true);
- } else {
- document.addEventListener('mousemove', doEvent, false);
- document.addEventListener('mouseup', doEvent, false);
- }
- }
- } else if (theEvtObj.type.match(/move$/i)) {
- // clause handles mousemove, MSPointerMove, and touchmove
-
- if (lastXYById[pointerId] && !(lastXYById[pointerId].x === pageX && lastXYById[pointerId].y === pageY)) {
- // only extend if the pointer is down and it's not the same as the last point
-
- if (moveEvent && prevent) {
- prevent = moveEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // update last page positions for this pointer
- lastXYById[pointerId].x = pageX;
- lastXYById[pointerId].y = pageY;
- }
- } else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel)$/i)) {
- // clause handles up/end/cancel
-
- if (endEvent && prevent) {
- prevent = endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // delete last page positions for this pointer
- delete lastXYById[pointerId];
-
- // in the Microsoft pointer model, release the capture for this pointer
- // in the mouse model, release the capture or remove document-level event handlers if there are no down points
- // nothing is required for the iOS touch model because capture is implied on touchstart
- if (target.msReleasePointerCapture) {
- target.msReleasePointerCapture(pointerId);
- } else if (theEvtObj.type === 'mouseup' && numberOfKeys(lastXYById) === 0) {
- if (useSetReleaseCapture) {
- target.releaseCapture();
- } else {
- document.removeEventListener('mousemove', doEvent, false);
- document.removeEventListener('mouseup', doEvent, false);
- }
- }
- }
- }
-
- if (prevent) {
- if (theEvtObj.preventDefault) {
- theEvtObj.preventDefault();
- }
-
- if (theEvtObj.preventManipulation) {
- theEvtObj.preventManipulation();
- }
-
- if (theEvtObj.preventMouseEvent) {
- theEvtObj.preventMouseEvent();
- }
- }
- };
-
- // saving the settings for contentZooming and touchaction before activation
- var contentZooming, msTouchAction;
-
- this.enable = function() {
-
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.addEventListener('MSPointerDown', doEvent, false);
- target.addEventListener('MSPointerMove', doEvent, false);
- target.addEventListener('MSPointerUp', doEvent, false);
- target.addEventListener('MSPointerCancel', doEvent, false);
-
- // css way to prevent panning in our target area
- if (typeof target.style.msContentZooming !== 'undefined') {
- contentZooming = target.style.msContentZooming;
- target.style.msContentZooming = 'none';
- }
-
- // new in Windows Consumer Preview: css way to prevent all built-in touch actions on our target
- // without this, you cannot touch draw on the element because IE will intercept the touch events
- if (typeof target.style.msTouchAction !== 'undefined') {
- msTouchAction = target.style.msTouchAction;
- target.style.msTouchAction = 'none';
- }
- } else if (target.addEventListener) {
- // iOS touch model
- target.addEventListener('touchstart', doEvent, false);
- target.addEventListener('touchmove', doEvent, false);
- target.addEventListener('touchend', doEvent, false);
- target.addEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.addEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.addEventListener('mousemove', doEvent, false);
- target.addEventListener('mouseup', doEvent, false);
- }
- } else if (target.attachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.attachEvent('onmousedown', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmousemove', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmouseup', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- }
- };
-
- this.disable = function() {
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.removeEventListener('MSPointerDown', doEvent, false);
- target.removeEventListener('MSPointerMove', doEvent, false);
- target.removeEventListener('MSPointerUp', doEvent, false);
- target.removeEventListener('MSPointerCancel', doEvent, false);
-
- // reset zooming to saved value
- if (contentZooming) {
- target.style.msContentZooming = contentZooming;
- }
-
- // reset touch action setting
- if (msTouchAction) {
- target.style.msTouchAction = msTouchAction;
- }
- } else if (target.removeEventListener) {
- // iOS touch model
- target.removeEventListener('touchstart', doEvent, false);
- target.removeEventListener('touchmove', doEvent, false);
- target.removeEventListener('touchend', doEvent, false);
- target.removeEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.removeEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.removeEventListener('mousemove', doEvent, false);
- target.removeEventListener('mouseup', doEvent, false);
- }
- } else if (target.detachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.detachEvent('onmousedown');
- target.detachEvent('onmousemove');
- target.detachEvent('onmouseup');
- }
- };
-
- return this;
- };
- }])
-
- .factory('GridsterDraggable', ['$document', '$window', 'GridsterTouch',
- function($document, $window, GridsterTouch) {
- function GridsterDraggable($el, scope, gridster, item, itemOptions) {
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- minLeft = 0,
- realdocument = $document[0];
-
- var originalCol, originalRow;
- var inputTags = ['select', 'option', 'input', 'textarea', 'button'];
-
- function dragStart(event) {
- $el.addClass('gridster-item-moving');
- gridster.movingItem = item;
-
- gridster.updateHeight(item.sizeY);
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.start) {
- gridster.draggable.start(event, $el, itemOptions, item);
- }
- });
- }
-
- function drag(event) {
- var oldRow = item.row,
- oldCol = item.col,
- hasCallback = gridster.draggable && gridster.draggable.drag,
- scrollSensitivity = gridster.draggable.scrollSensitivity,
- scrollSpeed = gridster.draggable.scrollSpeed;
-
- var row = Math.min(gridster.pixelsToRows(elmY), gridster.maxRows - 1);
- var col = Math.min(gridster.pixelsToColumns(elmX), gridster.columns - 1);
-
- var itemsInTheWay = gridster.getItems(row, col, item.sizeX, item.sizeY, item);
- var hasItemsInTheWay = itemsInTheWay.length !== 0;
-
- if (gridster.swapping === true && hasItemsInTheWay) {
- var boundingBoxItem = gridster.getBoundingBox(itemsInTheWay),
- sameSize = boundingBoxItem.sizeX === item.sizeX && boundingBoxItem.sizeY === item.sizeY,
- sameRow = boundingBoxItem.row === oldRow,
- sameCol = boundingBoxItem.col === oldCol,
- samePosition = boundingBoxItem.row === row && boundingBoxItem.col === col,
- inline = sameRow || sameCol;
-
- if (sameSize && itemsInTheWay.length === 1) {
- if (samePosition) {
- gridster.swapItems(item, itemsInTheWay[0]);
- } else if (inline) {
- return;
- }
- } else if (boundingBoxItem.sizeX <= item.sizeX && boundingBoxItem.sizeY <= item.sizeY && inline) {
- var emptyRow = item.row <= row ? item.row : row + item.sizeY,
- emptyCol = item.col <= col ? item.col : col + item.sizeX,
- rowOffset = emptyRow - boundingBoxItem.row,
- colOffset = emptyCol - boundingBoxItem.col;
-
- for (var i = 0, l = itemsInTheWay.length; i < l; ++i) {
- var itemInTheWay = itemsInTheWay[i];
-
- var itemsInFreeSpace = gridster.getItems(
- itemInTheWay.row + rowOffset,
- itemInTheWay.col + colOffset,
- itemInTheWay.sizeX,
- itemInTheWay.sizeY,
- item
- );
-
- if (itemsInFreeSpace.length === 0) {
- gridster.putItem(itemInTheWay, itemInTheWay.row + rowOffset, itemInTheWay.col + colOffset);
- }
- }
- }
- }
-
- if (gridster.pushing !== false || !hasItemsInTheWay) {
- item.row = row;
- item.col = col;
- }
-
- if (event.pageY - realdocument.body.scrollTop < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.body.scrollTop) < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop + scrollSpeed;
- }
-
- if (event.pageX - realdocument.body.scrollLeft < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft - scrollSpeed;
- } else if ($window.innerWidth - (event.pageX - realdocument.body.scrollLeft) < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft + scrollSpeed;
- }
-
- if (hasCallback || oldRow !== item.row || oldCol !== item.col) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.draggable.drag(event, $el, itemOptions, item);
- }
- });
- }
- }
-
- function dragStop(event) {
- $el.removeClass('gridster-item-moving');
- var row = Math.min(gridster.pixelsToRows(elmY), gridster.maxRows - 1);
- var col = Math.min(gridster.pixelsToColumns(elmX), gridster.columns - 1);
- if (gridster.pushing !== false || gridster.getItems(row, col, item.sizeX, item.sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- }
- gridster.movingItem = null;
- item.setPosition(item.row, item.col);
-
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.stop) {
- gridster.draggable.stop(event, $el, itemOptions, item);
- }
- });
- }
-
- function mouseDown(e) {
- if (inputTags.indexOf(e.target.nodeName.toLowerCase()) !== -1) {
- return false;
- }
-
- var $target = angular.element(e.target);
-
- // exit, if a resize handle was hit
- if ($target.hasClass('gridster-item-resizable-handler')) {
- return false;
- }
-
- // exit, if the target has it's own click event
- if ($target.attr('onclick') || $target.attr('ng-click')) {
- return false;
- }
-
- // only works if you have jQuery
- if ($target.closest && $target.closest('.gridster-no-drag').length) {
- return false;
- }
-
- // apply drag handle filter
- if (gridster.draggable && gridster.draggable.handle) {
- var $dragHandles = angular.element($el[0].querySelectorAll(gridster.draggable.handle));
- var match = false;
- outerloop:
- for (var h = 0, hl = $dragHandles.length; h < hl; ++h) {
- var handle = $dragHandles[h];
- if (handle === e.target) {
- match = true;
- break;
- }
- var target = e.target;
- for (var p = 0; p < 20; ++p) {
- var parent = target.parentNode;
- if (parent === $el[0] || !parent) {
- break;
- }
- if (parent === handle) {
- match = true;
- break outerloop;
- }
- target = parent;
- }
- }
- if (!match) {
- return false;
- }
- }
-
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalCol = item.col;
- originalRow = item.row;
-
- dragStart(e);
-
- return true;
- }
-
- function mouseMove(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- var maxLeft = gridster.curWidth - 1;
- var maxTop = gridster.curRowHeight * gridster.maxRows - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dX = diffX,
- dY = diffY;
- if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
-
- if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmX += diffX;
- elmY += diffY;
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px'
- });
-
- drag(e);
-
- return true;
- }
-
- function mouseUp(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- mOffX = mOffY = 0;
-
- dragStop(e);
-
- return true;
- }
-
- var enabled = null;
- var gridsterTouch = null;
-
- this.enable = function() {
- if (enabled === true) {
- return;
- }
- enabled = true;
-
- if (gridsterTouch) {
- gridsterTouch.enable();
- return;
- }
-
- gridsterTouch = new GridsterTouch($el[0], mouseDown, mouseMove, mouseUp);
- gridsterTouch.enable();
- };
-
- this.disable = function() {
- if (enabled === false) {
- return;
- }
-
- enabled = false;
- if (gridsterTouch) {
- gridsterTouch.disable();
- }
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- return GridsterDraggable;
- }
- ])
-
- .factory('GridsterResizable', ['GridsterTouch', function(GridsterTouch) {
- function GridsterResizable($el, scope, gridster, item, itemOptions) {
-
- function ResizeHandle(handleClass) {
-
- var hClass = handleClass;
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0;
-
- var getMinHeight = function() {
- return (item.minSizeY ? item.minSizeY : 1) * gridster.curRowHeight - gridster.margins[0];
- };
- var getMinWidth = function() {
- return (item.minSizeX ? item.minSizeX : 1) * gridster.curColWidth - gridster.margins[1];
- };
-
- var originalWidth, originalHeight;
- var savedDraggable;
-
- function resizeStart(e) {
- $el.addClass('gridster-item-moving');
- $el.addClass('gridster-item-resizing');
-
- gridster.movingItem = item;
-
- item.setElementSizeX();
- item.setElementSizeY();
- item.setElementPosition();
- gridster.updateHeight(1);
-
- scope.$apply(function() {
- // callback
- if (gridster.resizable && gridster.resizable.start) {
- gridster.resizable.start(e, $el, itemOptions, item); // options is the item model
- }
- });
- }
-
- function resize(e) {
- var oldRow = item.row,
- oldCol = item.col,
- oldSizeX = item.sizeX,
- oldSizeY = item.sizeY,
- hasCallback = gridster.resizable && gridster.resizable.resize;
-
- var col = item.col;
- // only change column if grabbing left edge
- if (['w', 'nw', 'sw'].indexOf(handleClass) !== -1) {
- col = gridster.pixelsToColumns(elmX, false);
- }
-
- var row = item.row;
- // only change row if grabbing top edge
- if (['n', 'ne', 'nw'].indexOf(handleClass) !== -1) {
- row = gridster.pixelsToRows(elmY, false);
- }
-
- var sizeX = item.sizeX;
- // only change row if grabbing left or right edge
- if (['n', 's'].indexOf(handleClass) === -1) {
- sizeX = gridster.pixelsToColumns(elmW, true);
- }
-
- var sizeY = item.sizeY;
- // only change row if grabbing top or bottom edge
- if (['e', 'w'].indexOf(handleClass) === -1) {
- sizeY = gridster.pixelsToRows(elmH, true);
- }
-
-
- var canOccupy = row > -1 && col > -1 && sizeX + col <= gridster.columns && sizeY + row <= gridster.maxRows;
- if (canOccupy && (gridster.pushing !== false || gridster.getItems(row, col, sizeX, sizeY, item).length === 0)) {
- item.row = row;
- item.col = col;
- item.sizeX = sizeX;
- item.sizeY = sizeY;
- }
- var isChanged = item.row !== oldRow || item.col !== oldCol || item.sizeX !== oldSizeX || item.sizeY !== oldSizeY;
-
- if (hasCallback || isChanged) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.resizable.resize(e, $el, itemOptions, item); // options is the item model
- }
- });
- }
- }
-
- function resizeStop(e) {
- $el.removeClass('gridster-item-moving');
- $el.removeClass('gridster-item-resizing');
-
- gridster.movingItem = null;
-
- item.setPosition(item.row, item.col);
- item.setSizeY(item.sizeY);
- item.setSizeX(item.sizeX);
-
- scope.$apply(function() {
- if (gridster.resizable && gridster.resizable.stop) {
- gridster.resizable.stop(e, $el, itemOptions, item); // options is the item model
- }
- });
- }
-
- function mouseDown(e) {
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- // save the draggable setting to restore after resize
- savedDraggable = gridster.draggable.enabled;
- if (savedDraggable) {
- gridster.draggable.enabled = false;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- // Get the current mouse position.
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- // Record current widget dimensions
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalWidth = item.sizeX;
- originalHeight = item.sizeY;
-
- resizeStart(e);
-
- return true;
- }
-
- function mouseMove(e) {
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dY = diffY,
- dX = diffX;
-
- if (hClass.indexOf('n') >= 0) {
- if (elmH - dY < getMinHeight()) {
- diffY = elmH - getMinHeight();
- mOffY = dY - diffY;
- } else if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- }
- elmY += diffY;
- elmH -= diffY;
- }
- if (hClass.indexOf('s') >= 0) {
- if (elmH + dY < getMinHeight()) {
- diffY = getMinHeight() - elmH;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmH += diffY;
- }
- if (hClass.indexOf('w') >= 0) {
- if (elmW - dX < getMinWidth()) {
- diffX = elmW - getMinWidth();
- mOffX = dX - diffX;
- } else if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- }
- elmX += diffX;
- elmW -= diffX;
- }
- if (hClass.indexOf('e') >= 0) {
- if (elmW + dX < getMinWidth()) {
- diffX = getMinWidth() - elmW;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
- elmW += diffX;
- }
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px',
- 'width': elmW + 'px',
- 'height': elmH + 'px'
- });
-
- resize(e);
-
- return true;
- }
-
- function mouseUp(e) {
- // restore draggable setting to its original state
- if (gridster.draggable.enabled !== savedDraggable) {
- gridster.draggable.enabled = savedDraggable;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- mOffX = mOffY = 0;
-
- resizeStop(e);
-
- return true;
- }
-
- var $dragHandle = null;
- var unifiedInput;
-
- this.enable = function() {
- if (!$dragHandle) {
- $dragHandle = angular.element('<div class="gridster-item-resizable-handler handle-' + hClass + '"></div>');
- $el.append($dragHandle);
- }
-
- unifiedInput = new GridsterTouch($dragHandle[0], mouseDown, mouseMove, mouseUp);
- unifiedInput.enable();
- };
-
- this.disable = function() {
- if ($dragHandle) {
- $dragHandle.remove();
- $dragHandle = null;
- }
-
- unifiedInput.disable();
- unifiedInput = undefined;
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- var handles = [];
- var handlesOpts = gridster.resizable.handles;
- if (typeof handlesOpts === 'string') {
- handlesOpts = gridster.resizable.handles.split(',');
- }
- var enabled = false;
-
- for (var c = 0, l = handlesOpts.length; c < l; c++) {
- handles.push(new ResizeHandle(handlesOpts[c]));
- }
-
- this.enable = function() {
- if (enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].enable();
- }
- enabled = true;
- };
-
- this.disable = function() {
- if (!enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].disable();
- }
- enabled = false;
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].destroy();
- }
- };
- }
- return GridsterResizable;
- }])
-
- .factory('gridsterDebounce', function() {
- return function gridsterDebounce(func, wait, immediate) {
- var timeout;
- return function() {
- var context = this,
- args = arguments;
- var later = function() {
- timeout = null;
- if (!immediate) {
- func.apply(context, args);
- }
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- func.apply(context, args);
- }
- };
- };
- })
-
- /**
- * GridsterItem directive
- * @param $parse
- * @param GridsterDraggable
- * @param GridsterResizable
- * @param gridsterDebounce
- */
- .directive('gridsterItem', ['$parse', 'GridsterDraggable', 'GridsterResizable', 'gridsterDebounce',
- function($parse, GridsterDraggable, GridsterResizable, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EA',
- controller: 'GridsterItemCtrl',
- controllerAs: 'gridsterItem',
- require: ['^gridster', 'gridsterItem'],
- link: function(scope, $el, attrs, controllers) {
- var optionsKey = attrs.gridsterItem,
- options;
-
- var gridster = controllers[0],
- item = controllers[1];
-
- scope.gridster = gridster;
-
- // bind the item's position properties
- // options can be an object specified by gridster-item="object"
- // or the options can be the element html attributes object
- if (optionsKey) {
- var $optionsGetter = $parse(optionsKey);
- options = $optionsGetter(scope) || {};
- if (!options && $optionsGetter.assign) {
- options = {
- row: item.row,
- col: item.col,
- sizeX: item.sizeX,
- sizeY: item.sizeY,
- minSizeX: 0,
- minSizeY: 0,
- maxSizeX: null,
- maxSizeY: null
- };
- $optionsGetter.assign(scope, options);
- }
- } else {
- options = attrs;
- }
-
- item.init($el, gridster);
-
- $el.addClass('gridster-item');
-
- var aspects = ['minSizeX', 'maxSizeX', 'minSizeY', 'maxSizeY', 'sizeX', 'sizeY', 'row', 'col'],
- $getters = {};
-
- var expressions = [];
- var aspectFn = function(aspect) {
- var expression;
- if (typeof options[aspect] === 'string') {
- // watch the expression in the scope
- expression = options[aspect];
- } else if (typeof options[aspect.toLowerCase()] === 'string') {
- // watch the expression in the scope
- expression = options[aspect.toLowerCase()];
- } else if (optionsKey) {
- // watch the expression on the options object in the scope
- expression = optionsKey + '.' + aspect;
- } else {
- return;
- }
- expressions.push('"' + aspect + '":' + expression);
- $getters[aspect] = $parse(expression);
-
- // initial set
- var val = $getters[aspect](scope);
- if (typeof val === 'number') {
- item[aspect] = val;
- }
- };
-
- for (var i = 0, l = aspects.length; i < l; ++i) {
- aspectFn(aspects[i]);
- }
-
- var watchExpressions = '{' + expressions.join(',') + '}';
- // when the value changes externally, update the internal item object
- scope.$watchCollection(watchExpressions, function(newVals, oldVals) {
- for (var aspect in newVals) {
- var newVal = newVals[aspect];
- var oldVal = oldVals[aspect];
- if (oldVal === newVal) {
- continue;
- }
- newVal = parseInt(newVal, 10);
- if (!isNaN(newVal)) {
- item[aspect] = newVal;
- }
- }
- });
-
- function positionChanged() {
- // call setPosition so the element and gridster controller are updated
- item.setPosition(item.row, item.col);
-
- // when internal item position changes, update externally bound values
- if ($getters.row && $getters.row.assign) {
- $getters.row.assign(scope, item.row);
- }
- if ($getters.col && $getters.col.assign) {
- $getters.col.assign(scope, item.col);
- }
- }
- scope.$watch(function() {
- return item.row + ',' + item.col;
- }, positionChanged);
-
- function sizeChanged() {
- var changedX = item.setSizeX(item.sizeX, true);
- if (changedX && $getters.sizeX && $getters.sizeX.assign) {
- $getters.sizeX.assign(scope, item.sizeX);
- }
- var changedY = item.setSizeY(item.sizeY, true);
- if (changedY && $getters.sizeY && $getters.sizeY.assign) {
- $getters.sizeY.assign(scope, item.sizeY);
- }
-
- if (changedX || changedY) {
- item.gridster.moveOverlappingItems(item);
- gridster.layoutChanged();
- scope.$broadcast('gridster-item-resized', item);
- }
- }
-
- scope.$watch(function() {
- return item.sizeY + ',' + item.sizeX + ',' + item.minSizeX + ',' + item.maxSizeX + ',' + item.minSizeY + ',' + item.maxSizeY;
- }, sizeChanged);
-
- var draggable = new GridsterDraggable($el, scope, gridster, item, options);
- var resizable = new GridsterResizable($el, scope, gridster, item, options);
-
- var updateResizable = function() {
- resizable.toggle(!gridster.isMobile && gridster.resizable && gridster.resizable.enabled);
- };
- updateResizable();
-
- var updateDraggable = function() {
- draggable.toggle(!gridster.isMobile && gridster.draggable && gridster.draggable.enabled);
- };
- updateDraggable();
-
- scope.$on('gridster-draggable-changed', updateDraggable);
- scope.$on('gridster-resizable-changed', updateResizable);
- scope.$on('gridster-resized', updateResizable);
- scope.$on('gridster-mobile-changed', function() {
- updateResizable();
- updateDraggable();
- });
-
- function whichTransitionEvent() {
- var el = document.createElement('div');
- var transitions = {
- 'transition': 'transitionend',
- 'OTransition': 'oTransitionEnd',
- 'MozTransition': 'transitionend',
- 'WebkitTransition': 'webkitTransitionEnd'
- };
- for (var t in transitions) {
- if (el.style[t] !== undefined) {
- return transitions[t];
- }
- }
- }
-
- var debouncedTransitionEndPublisher = gridsterDebounce(function() {
- scope.$apply(function() {
- scope.$broadcast('gridster-item-transition-end', item);
- });
- }, 50);
-
- $el.on(whichTransitionEvent(), debouncedTransitionEndPublisher);
-
- scope.$broadcast('gridster-item-initialized', item);
-
- return scope.$on('$destroy', function() {
- try {
- resizable.destroy();
- draggable.destroy();
- } catch (e) {}
-
- try {
- gridster.removeItem(item);
- } catch (e) {}
-
- try {
- item.destroy();
- } catch (e) {}
- });
- }
- };
- }
- ])
-
- .directive('gridsterNoDrag', function() {
- return {
- restrict: 'A',
- link: function(scope, $element) {
- $element.addClass('gridster-no-drag');
- }
- };
- })
-
- ;
-
-}));
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.less b/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.less
deleted file mode 100644
index e8160dd2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-gridster/src/angular-gridster.less
+++ /dev/null
@@ -1,167 +0,0 @@
-/**
- * gridster.js - v0.2.1 - 2013-10-28 * http://gridster.net
- * Copyright (c) 2013 ducksboard; Licensed MIT
- */
-
-.gridster {
- position: relative;
- margin: auto;
- height: 0;
-}
-
-.gridster > ul {
- margin: 0;
- list-style: none;
- padding: 0;
-}
-
-.gridster-item {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- list-style: none;
- z-index: 2;
- position: absolute;
- display: none;
-}
-
-.gridster-loaded {
- -webkit-transition: height .3s;
- -moz-transition: height .3s;
- -o-transition: height .3s;
- transition: height .3s;
-
- .gridster-item {
- display: block;
- position: absolute;
- -webkit-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -moz-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -o-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms;
- }
-
- .gridster-preview-holder {
- display: none;
- z-index: 1;
- position: absolute;
- background-color: #ddd;
- border-color: #fff;
- opacity: 0.2;
- }
-
- .gridster-item.gridster-item-moving,
- .gridster-preview-holder {
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
- }
-}
-
-.gridster-mobile {
- height: auto !important;
-
- .gridster-item {
- height: auto;
- position: static;
- float: none;
- }
-}
-
-.gridster-item.ng-leave.ng-leave-active {
- opacity: 0;
-}
-.gridster-item.ng-enter {
- opacity: 1;
-}
-
-.gridster-item-moving {
- z-index: 3;
-}
-
-/* RESIZE */
-.gridster-item-resizable-handler {
- position: absolute;
- font-size: 1px;
- display: block;
- z-index: 5;
-}
-
-.handle-se {
- cursor: se-resize;
- width: 0;
- height: 0;
- right: 1px;
- bottom: 1px;
- border-style: solid;
- border-width: 0 0 12px 12px;
- border-color: transparent;
-}
-
-.handle-ne {
- cursor: ne-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- top: 1px;
-}
-
-.handle-nw {
- cursor: nw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- top: 1px;
-}
-
-.handle-sw {
- cursor: sw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- bottom: 1px;
-}
-
-.handle-e {
- cursor: e-resize;
- width: 12px;
- bottom: 0;
- right: 1px;
- top: 0;
-}
-
-.handle-s {
- cursor: s-resize;
- height: 12px;
- right: 0;
- bottom: 1px;
- left: 0;
-}
-
-.handle-n {
- cursor: n-resize;
- height: 12px;
- right: 0;
- top: 1px;
- left: 0;
-}
-
-.handle-w {
- cursor: w-resize;
- width: 12px;
- left: 1px;
- top: 0;
- bottom: 0;
-}
-
-.gridster .gridster-item:hover .gridster-box {
- border: 1.5px solid #B3B2B3;
-}
-
-.gridster .gridster-item:hover .handle-se {
- border-color: transparent transparent #ccc;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/index.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/index.js
deleted file mode 100644
index 99a08334..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/index.js
+++ /dev/null
@@ -1,2 +0,0 @@
-require('./ui-grid');
-module.exports = 'ui.grid';
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.css b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.css
deleted file mode 100644
index 819592c5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.css
+++ /dev/null
@@ -1,2005 +0,0 @@
-/*!
- * ui-grid - v4.0.2 - 2016-12-30
- * Copyright (c) 2016 ; License: MIT
- */
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- content: " ";
- display: table;
-}
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- clear: both;
-}
-.ui-grid {
- border: 1px solid #d4d4d4;
- box-sizing: content-box;
- -webkit-border-radius: 0px;
- -moz-border-radius: 0px;
- border-radius: 0px;
- -webkit-transform: translateZ(0);
- -moz-transform: translateZ(0);
- -o-transform: translateZ(0);
- -ms-transform: translateZ(0);
- transform: translateZ(0);
-}
-.ui-grid-vertical-bar {
- position: absolute;
- right: 0;
- width: 0;
-}
-.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,
-.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- width: 1px;
-}
-.ui-grid-scrollbar-placeholder {
- background-color: transparent;
-}
-.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-header-cell:last-child .ui-grid-vertical-bar {
- right: -1px;
- width: 1px;
- background-color: #d4d4d4;
-}
-.ui-grid-clearfix:before,
-.ui-grid-clearfix:after {
- content: "";
- display: table;
-}
-.ui-grid-clearfix:after {
- clear: both;
-}
-.ui-grid-invisible {
- visibility: hidden;
-}
-.ui-grid-contents-wrapper {
- position: relative;
- height: 100%;
- width: 100%;
-}
-.ui-grid-sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- margin: -1px;
- padding: 0;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
-}
-.ui-grid-top-panel-background {
- background: #f3f3f3;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
-}
-.ui-grid-header {
- border-bottom: 1px solid #d4d4d4;
- box-sizing: border-box;
-}
-.ui-grid-top-panel {
- position: relative;
- overflow: hidden;
- font-weight: bold;
- background: #f3f3f3;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- -webkit-border-top-right-radius: -1px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: -1px;
- -moz-border-radius-topright: -1px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: -1px;
- border-top-right-radius: -1px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: -1px;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-.ui-grid-header-viewport {
- overflow: hidden;
-}
-.ui-grid-header-canvas:before,
-.ui-grid-header-canvas:after {
- content: "";
- display: table;
- line-height: 0;
-}
-.ui-grid-header-canvas:after {
- clear: both;
-}
-.ui-grid-header-cell-wrapper {
- position: relative;
- display: table;
- box-sizing: border-box;
- height: 100%;
-}
-.ui-grid-header-cell-row {
- display: table-row;
- position: relative;
-}
-.ui-grid-header-cell {
- position: relative;
- box-sizing: border-box;
- background-color: inherit;
- border-right: 1px solid;
- border-color: #d4d4d4;
- display: table-cell;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- width: 0;
-}
-.ui-grid-header-cell:last-child {
- border-right: 0;
-}
-.ui-grid-header-cell .sortable {
- cursor: pointer;
-}
-.ui-grid-header-cell .ui-grid-sort-priority-number {
- margin-left: -8px;
-}
-.ui-grid-header .ui-grid-vertical-bar {
- top: 0;
- bottom: 0;
-}
-.ui-grid-column-menu-button {
- position: absolute;
- right: 1px;
- top: 0;
-}
-.ui-grid-column-menu-button .ui-grid-icon-angle-down {
- vertical-align: sub;
-}
-.ui-grid-column-menu-button-last-col {
- margin-right: 25px;
-}
-.ui-grid-column-menu {
- position: absolute;
-}
-/* Slide up/down animations */
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transition: all 0.05s linear;
- -moz-transition: all 0.05s linear;
- -o-transition: all 0.05s linear;
- transition: all 0.05s linear;
- display: block !important;
-}
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transform: translateY(-100%);
- -moz-transform: translateY(-100%);
- -o-transform: translateY(-100%);
- -ms-transform: translateY(-100%);
- transform: translateY(-100%);
-}
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active {
- -webkit-transform: translateY(0);
- -moz-transform: translateY(0);
- -o-transform: translateY(0);
- -ms-transform: translateY(0);
- transform: translateY(0);
-}
-/* Slide up/down animations */
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transition: all 0.05s linear;
- -moz-transition: all 0.05s linear;
- -o-transition: all 0.05s linear;
- transition: all 0.05s linear;
- display: block !important;
-}
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transform: translateY(-100%);
- -moz-transform: translateY(-100%);
- -o-transform: translateY(-100%);
- -ms-transform: translateY(-100%);
- transform: translateY(-100%);
-}
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active {
- -webkit-transform: translateY(0);
- -moz-transform: translateY(0);
- -o-transform: translateY(0);
- -ms-transform: translateY(0);
- transform: translateY(0);
-}
-.ui-grid-filter-container {
- padding: 4px 10px;
- position: relative;
-}
-.ui-grid-filter-container .ui-grid-filter-button {
- position: absolute;
- top: 0;
- bottom: 0;
- right: 0;
-}
-.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] {
- position: absolute;
- top: 50%;
- line-height: 32px;
- margin-top: -16px;
- right: 10px;
- opacity: 0.66;
-}
-.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]:hover {
- opacity: 1;
-}
-.ui-grid-filter-container .ui-grid-filter-button-select {
- position: absolute;
- top: 0;
- bottom: 0;
- right: 0;
-}
-.ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"] {
- position: absolute;
- top: 50%;
- line-height: 32px;
- margin-top: -16px;
- right: 0px;
- opacity: 0.66;
-}
-.ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"]:hover {
- opacity: 1;
-}
-input[type="text"].ui-grid-filter-input {
- padding: 0;
- margin: 0;
- border: 0;
- width: 100%;
- border: 1px solid #d4d4d4;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-input[type="text"].ui-grid-filter-input:hover {
- border: 1px solid #d4d4d4;
-}
-select.ui-grid-filter-select {
- padding: 0;
- margin: 0;
- border: 0;
- width: 90%;
- border: 1px solid #d4d4d4;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-select.ui-grid-filter-select:hover {
- border: 1px solid #d4d4d4;
-}
-.ui-grid-filter-cancel-button-hidden select.ui-grid-filter-select {
- width: 100%;
-}
-.ui-grid-render-container {
- position: inherit;
- -webkit-border-top-right-radius: 0;
- -webkit-border-bottom-right-radius: 0px;
- -webkit-border-bottom-left-radius: 0px;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0;
- -moz-border-radius-bottomright: 0px;
- -moz-border-radius-bottomleft: 0px;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0px;
- border-bottom-left-radius: 0px;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-.ui-grid-render-container:focus {
- outline: none;
-}
-.ui-grid-viewport {
- min-height: 20px;
- position: relative;
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
-}
-.ui-grid-viewport:focus {
- outline: none !important;
-}
-.ui-grid-canvas {
- position: relative;
- padding-top: 1px;
-}
-.ui-grid-row {
- clear: both;
-}
-.ui-grid-row:nth-child(odd) .ui-grid-cell {
- background-color: #fdfdfd;
-}
-.ui-grid-row:nth-child(even) .ui-grid-cell {
- background-color: #f3f3f3;
-}
-.ui-grid-row:last-child .ui-grid-cell {
- border-bottom-color: #d4d4d4;
- border-bottom-style: solid;
-}
-.ui-grid-no-row-overlay {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: 10%;
- background: #f3f3f3;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #d4d4d4;
- font-size: 2em;
- text-align: center;
-}
-.ui-grid-no-row-overlay > * {
- position: absolute;
- display: table;
- margin: auto 0;
- width: 100%;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- opacity: 0.66;
-}
-.ui-grid-cell {
- overflow: hidden;
- float: left;
- background-color: inherit;
- border-right: 1px solid;
- border-color: #d4d4d4;
- box-sizing: border-box;
-}
-.ui-grid-cell:last-child {
- border-right: 0;
-}
-.ui-grid-cell-contents {
- padding: 5px;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- white-space: nowrap;
- -ms-text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- text-overflow: ellipsis;
- overflow: hidden;
- height: 100%;
-}
-.ui-grid-cell-contents-hidden {
- visibility: hidden;
- width: 0;
- height: 0;
- display: none;
-}
-.ui-grid-row .ui-grid-cell.ui-grid-row-header-cell {
- background-color: #f0f0ee;
- border-bottom: solid 1px #d4d4d4;
-}
-.ui-grid-footer-panel-background {
- background: #f3f3f3;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
-}
-.ui-grid-footer-panel {
- position: relative;
- border-bottom: 1px solid #d4d4d4;
- border-top: 1px solid #d4d4d4;
- overflow: hidden;
- font-weight: bold;
- background: #f3f3f3;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- -webkit-border-top-right-radius: -1px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: -1px;
- -moz-border-radius-topright: -1px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: -1px;
- border-top-right-radius: -1px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: -1px;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-.ui-grid-grid-footer {
- float: left;
- width: 100%;
-}
-.ui-grid-footer-viewport {
- overflow: hidden;
-}
-.ui-grid-footer-canvas {
- position: relative;
-}
-.ui-grid-footer-canvas:before,
-.ui-grid-footer-canvas:after {
- content: "";
- display: table;
- line-height: 0;
-}
-.ui-grid-footer-canvas:after {
- clear: both;
-}
-.ui-grid-footer-cell-wrapper {
- position: relative;
- display: table;
- box-sizing: border-box;
- height: 100%;
-}
-.ui-grid-footer-cell-row {
- display: table-row;
-}
-.ui-grid-footer-cell {
- overflow: hidden;
- background-color: inherit;
- border-right: 1px solid;
- border-color: #d4d4d4;
- box-sizing: border-box;
- display: table-cell;
-}
-.ui-grid-footer-cell:last-child {
- border-right: 0;
-}
-input[type="text"].ui-grid-filter-input {
- padding: 0;
- margin: 0;
- border: 0;
- width: 100%;
- border: 1px solid #d4d4d4;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-input[type="text"].ui-grid-filter-input:hover {
- border: 1px solid #d4d4d4;
-}
-.ui-grid-menu-button {
- z-index: 2;
- position: absolute;
- right: 0;
- top: 0;
- background: #f3f3f3;
- border: 1px solid #d4d4d4;
- cursor: pointer;
- height: 31px;
- font-weight: normal;
-}
-.ui-grid-menu-button .ui-grid-icon-container {
- margin-top: 3px;
-}
-.ui-grid-menu-button .ui-grid-menu {
- right: 0;
-}
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid {
- overflow: scroll;
- border: 1px solid #d4d4d4;
-}
-.ui-grid-menu {
- z-index: 2;
- position: absolute;
- padding: 0 10px 20px 10px;
- cursor: pointer;
- box-sizing: border-box;
-}
-.ui-grid-menu .ui-grid-menu-inner {
- background: #f3f3f3;
- border: 1px solid #d4d4d4;
- position: relative;
- white-space: nowrap;
- -webkit-border-radius: 0px;
- -moz-border-radius: 0px;
- border-radius: 0px;
- -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- position: absolute;
- right: 0px;
- top: 0px;
- display: inline-block;
- margin-bottom: 0;
- font-weight: normal;
- text-align: center;
- vertical-align: middle;
- touch-action: manipulation;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- white-space: nowrap;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- border-radius: 4px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- padding: 1px 1px;
- font-size: 10px;
- line-height: 1;
- border-radius: 2px;
- color: transparent;
- background-color: transparent;
- border-color: transparent;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus {
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- color: #333333;
- text-decoration: none;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active {
- outline: 0;
- background-image: none;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled],
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- cursor: not-allowed;
- opacity: 0.65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,
-fieldset[disabled] a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- pointer-events: none;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:hover,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- background-image: none;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:hover,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:focus,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].focus,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- background-color: transparent;
- border-color: transparent;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button .badge {
- color: transparent;
- background-color: transparent;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button > i {
- opacity: 0.75;
- color: black;
-}
-.ui-grid-menu .ui-grid-menu-inner ul {
- margin: 0;
- padding: 0;
- list-style-type: none;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li {
- padding: 0px;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li button {
- min-width: 100%;
- padding: 8px;
- text-align: left;
- background: transparent;
- border: none;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li button:hover,
-.ui-grid-menu .ui-grid-menu-inner ul li button:focus {
- -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
-}
-.ui-grid-menu .ui-grid-menu-inner ul li button.ui-grid-menu-item-active {
- -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- background-color: #cecece;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child) > button {
- border-bottom: 1px solid #d4d4d4;
-}
-.ui-grid-sortarrow {
- right: 5px;
- position: absolute;
- width: 20px;
- top: 0;
- bottom: 0;
- background-position: center;
-}
-.ui-grid-sortarrow.down {
- -webkit-transform: rotate(180deg);
- -moz-transform: rotate(180deg);
- -o-transform: rotate(180deg);
- -ms-transform: rotate(180deg);
- transform: rotate(180deg);
-}
-@font-face {
- font-family: 'ui-grid';
- src: url('ui-grid.eot');
- src: url('ui-grid.eot#iefix') format('embedded-opentype'), url('ui-grid.woff') format('woff'), url('ui-grid.ttf') format('truetype'), url('ui-grid.svg?#ui-grid') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
-/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
-/*
-@media screen and (-webkit-min-device-pixel-ratio:0) {
- @font-face {
- font-family: 'ui-grid';
- src: url('@{font-path}ui-grid.svg?12312827#ui-grid') format('svg');
- }
-}
-*/
-[class^="ui-grid-icon"]:before,
-[class*=" ui-grid-icon"]:before {
- font-family: "ui-grid";
- font-style: normal;
- font-weight: normal;
- speak: none;
- display: inline-block;
- text-decoration: inherit;
- width: 1em;
- margin-right: .2em;
- text-align: center;
- /* opacity: .8; */
- /* For safety - reset parent styles, that can break glyph codes*/
- font-variant: normal;
- text-transform: none;
- /* fix buttons height, for twitter bootstrap */
- line-height: 1em;
- /* Animation center compensation - margins should be symmetric */
- /* remove if not needed */
- margin-left: .2em;
- /* you can be more comfortable with increased icons size */
- /* font-size: 120%; */
- /* Uncomment for 3D effect */
- /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
-}
-.ui-grid-icon-blank::before {
- width: 1em;
- content: ' ';
-}
-.ui-grid-icon-plus-squared:before {
- content: '\c350';
-}
-.ui-grid-icon-minus-squared:before {
- content: '\c351';
-}
-.ui-grid-icon-search:before {
- content: '\c352';
-}
-.ui-grid-icon-cancel:before {
- content: '\c353';
-}
-.ui-grid-icon-info-circled:before {
- content: '\c354';
-}
-.ui-grid-icon-lock:before {
- content: '\c355';
-}
-.ui-grid-icon-lock-open:before {
- content: '\c356';
-}
-.ui-grid-icon-pencil:before {
- content: '\c357';
-}
-.ui-grid-icon-down-dir:before {
- content: '\c358';
-}
-.ui-grid-icon-up-dir:before {
- content: '\c359';
-}
-.ui-grid-icon-left-dir:before {
- content: '\c35a';
-}
-.ui-grid-icon-right-dir:before {
- content: '\c35b';
-}
-.ui-grid-icon-left-open:before {
- content: '\c35c';
-}
-.ui-grid-icon-right-open:before {
- content: '\c35d';
-}
-.ui-grid-icon-angle-down:before {
- content: '\c35e';
-}
-.ui-grid-icon-filter:before {
- content: '\c35f';
-}
-.ui-grid-icon-sort-alt-up:before {
- content: '\c360';
-}
-.ui-grid-icon-sort-alt-down:before {
- content: '\c361';
-}
-.ui-grid-icon-ok:before {
- content: '\c362';
-}
-.ui-grid-icon-menu:before {
- content: '\c363';
-}
-.ui-grid-icon-indent-left:before {
- content: '\e800';
-}
-.ui-grid-icon-indent-right:before {
- content: '\e801';
-}
-.ui-grid-icon-spin5:before {
- content: '\ea61';
-}
-/*
-* RTL Styles
-*/
-.ui-grid[dir=rtl] .ui-grid-header-cell,
-.ui-grid[dir=rtl] .ui-grid-footer-cell,
-.ui-grid[dir=rtl] .ui-grid-cell {
- float: right !important;
-}
-.ui-grid[dir=rtl] .ui-grid-column-menu-button {
- position: absolute;
- left: 1px;
- top: 0;
- right: inherit;
-}
-.ui-grid[dir=rtl] .ui-grid-cell:first-child,
-.ui-grid[dir=rtl] .ui-grid-header-cell:first-child,
-.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child {
- border-right: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-cell:last-child,
-.ui-grid[dir=rtl] .ui-grid-header-cell:last-child {
- border-right: 1px solid #d4d4d4;
- border-left: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar,
-.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,
-.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar {
- width: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-menu-button {
- z-index: 2;
- position: absolute;
- left: 0;
- right: auto;
- background: #f3f3f3;
- border: 1px solid #d4d4d4;
- cursor: pointer;
- min-height: 27px;
- font-weight: normal;
-}
-.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu {
- left: 0;
- right: auto;
-}
-.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button {
- right: initial;
- left: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] {
- right: initial;
- left: 10px;
-}
-/*
- Animation example, for spinners
-*/
-.ui-grid-animate-spin {
- -moz-animation: ui-grid-spin 2s infinite linear;
- -o-animation: ui-grid-spin 2s infinite linear;
- -webkit-animation: ui-grid-spin 2s infinite linear;
- animation: ui-grid-spin 2s infinite linear;
- display: inline-block;
-}
-@-moz-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@-webkit-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@-o-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@-ms-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-/*---------------------------------------------------
- LESS Elements 0.9
- ---------------------------------------------------
- A set of useful LESS mixins
- More info at: http://lesselements.com
- ---------------------------------------------------*/
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- content: " ";
- display: table;
-}
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- clear: both;
-}
-.ui-grid-cell-focus {
- outline: 0;
- background-color: #b3c4c7;
-}
-.ui-grid-focuser {
- position: absolute;
- left: 0px;
- top: 0px;
- z-index: -1;
- width: 100%;
- height: 100%;
-}
-.ui-grid-focuser:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.ui-grid-offscreen {
- display: block;
- position: absolute;
- left: -10000px;
- top: -10000px;
- clip: rect(0px, 0px, 0px, 0px);
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-div.ui-grid-cell input {
- border-radius: inherit;
- padding: 0;
- width: 100%;
- color: inherit;
- height: auto;
- font: inherit;
- outline: none;
-}
-div.ui-grid-cell input:focus {
- color: inherit;
- outline: none;
-}
-div.ui-grid-cell input[type="checkbox"] {
- margin: 9px 0 0 6px;
- width: auto;
-}
-div.ui-grid-cell input.ng-invalid {
- border: 1px solid #fc8f8f;
-}
-div.ui-grid-cell input.ng-valid {
- border: 1px solid #d4d4d4;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-viewport .ui-grid-empty-base-layer-container {
- position: absolute;
- overflow: hidden;
- pointer-events: none;
- z-index: -1;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell {
- background-color: #fdfdfd;
-}
-.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell {
- background-color: #f3f3f3;
-}
-.ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell {
- pointer-events: none;
-}
-.ui-grid-expandable-buttons-cell i {
- pointer-events: all;
-}
-.scrollFiller {
- float: left;
- border: 1px solid #d4d4d4;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-tree-header-row {
- font-weight: bold !important;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.movingColumn {
- position: absolute;
- top: 0;
- border: 1px solid #d4d4d4;
- box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
-}
-.movingColumn .ui-grid-icon-angle-down {
- display: none;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/*---------------------------------------------------
- LESS Elements 0.9
- ---------------------------------------------------
- A set of useful LESS mixins
- More info at: http://lesselements.com
- ---------------------------------------------------*/
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- content: " ";
- display: table;
-}
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- clear: both;
-}
-.ui-grid-pager-panel {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- padding-top: 3px;
- padding-bottom: 3px;
- box-sizing: content-box;
-}
-.ui-grid-pager-container {
- float: left;
-}
-.ui-grid-pager-control {
- margin-right: 10px;
- margin-left: 10px;
- min-width: 135px;
- float: left;
-}
-.ui-grid-pager-control button {
- height: 25px;
- min-width: 26px;
- display: inline-block;
- margin-bottom: 0;
- font-weight: normal;
- text-align: center;
- vertical-align: middle;
- touch-action: manipulation;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- white-space: nowrap;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- border-radius: 4px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #eeeeee;
- background-color: #f3f3f3;
- border-color: #cccccc;
-}
-.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button:active:focus,
-.ui-grid-pager-control button.active:focus,
-.ui-grid-pager-control button.focus,
-.ui-grid-pager-control button:active.focus,
-.ui-grid-pager-control button.active.focus {
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.ui-grid-pager-control button:hover,
-.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button.focus {
- color: #333333;
- text-decoration: none;
-}
-.ui-grid-pager-control button:active,
-.ui-grid-pager-control button.active {
- outline: 0;
- background-image: none;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.ui-grid-pager-control button.disabled,
-.ui-grid-pager-control button[disabled],
-fieldset[disabled] .ui-grid-pager-control button {
- cursor: not-allowed;
- opacity: 0.65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-a.ui-grid-pager-control button.disabled,
-fieldset[disabled] a.ui-grid-pager-control button {
- pointer-events: none;
-}
-.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button.focus {
- color: #eeeeee;
- background-color: #dadada;
- border-color: #8c8c8c;
-}
-.ui-grid-pager-control button:hover {
- color: #eeeeee;
- background-color: #dadada;
- border-color: #adadad;
-}
-.ui-grid-pager-control button:active,
-.ui-grid-pager-control button.active,
-.open > .dropdown-toggle.ui-grid-pager-control button {
- color: #eeeeee;
- background-color: #dadada;
- border-color: #adadad;
-}
-.ui-grid-pager-control button:active:hover,
-.ui-grid-pager-control button.active:hover,
-.open > .dropdown-toggle.ui-grid-pager-control button:hover,
-.ui-grid-pager-control button:active:focus,
-.ui-grid-pager-control button.active:focus,
-.open > .dropdown-toggle.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button:active.focus,
-.ui-grid-pager-control button.active.focus,
-.open > .dropdown-toggle.ui-grid-pager-control button.focus {
- color: #eeeeee;
- background-color: #c8c8c8;
- border-color: #8c8c8c;
-}
-.ui-grid-pager-control button:active,
-.ui-grid-pager-control button.active,
-.open > .dropdown-toggle.ui-grid-pager-control button {
- background-image: none;
-}
-.ui-grid-pager-control button.disabled:hover,
-.ui-grid-pager-control button[disabled]:hover,
-fieldset[disabled] .ui-grid-pager-control button:hover,
-.ui-grid-pager-control button.disabled:focus,
-.ui-grid-pager-control button[disabled]:focus,
-fieldset[disabled] .ui-grid-pager-control button:focus,
-.ui-grid-pager-control button.disabled.focus,
-.ui-grid-pager-control button[disabled].focus,
-fieldset[disabled] .ui-grid-pager-control button.focus {
- background-color: #f3f3f3;
- border-color: #cccccc;
-}
-.ui-grid-pager-control button .badge {
- color: #f3f3f3;
- background-color: #eeeeee;
-}
-.ui-grid-pager-control input {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555555;
- background-color: #ffffff;
- background-image: none;
- border: 1px solid #cccccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
- display: inline;
- height: 26px;
- width: 50px;
- vertical-align: top;
-}
-.ui-grid-pager-control input:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.ui-grid-pager-control input::-moz-placeholder {
- color: #999999;
- opacity: 1;
-}
-.ui-grid-pager-control input:-ms-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-control input::-webkit-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-control input::-ms-expand {
- border: 0;
- background-color: transparent;
-}
-.ui-grid-pager-control input[disabled],
-.ui-grid-pager-control input[readonly],
-fieldset[disabled] .ui-grid-pager-control input {
- background-color: #eeeeee;
- opacity: 1;
-}
-.ui-grid-pager-control input[disabled],
-fieldset[disabled] .ui-grid-pager-control input {
- cursor: not-allowed;
-}
-textarea.ui-grid-pager-control input {
- height: auto;
-}
-select.ui-grid-pager-control input {
- height: 30px;
- line-height: 30px;
-}
-textarea.ui-grid-pager-control input,
-select[multiple].ui-grid-pager-control input {
- height: auto;
-}
-.ui-grid-pager-control .ui-grid-pager-max-pages-number {
- vertical-align: bottom;
-}
-.ui-grid-pager-control .ui-grid-pager-max-pages-number > * {
- vertical-align: middle;
-}
-.ui-grid-pager-control .first-bar {
- width: 10px;
- border-left: 2px solid #4d4d4d;
- margin-top: -6px;
- height: 12px;
- margin-left: -3px;
-}
-.ui-grid-pager-control .first-bar-rtl {
- width: 10px;
- border-left: 2px solid #4d4d4d;
- margin-top: -6px;
- height: 12px;
- margin-right: -7px;
-}
-.ui-grid-pager-control .first-triangle {
- width: 0;
- height: 0;
- border-style: solid;
- border-width: 5px 8.7px 5px 0;
- border-color: transparent #4d4d4d transparent transparent;
- margin-left: 2px;
-}
-.ui-grid-pager-control .next-triangle {
- margin-left: 1px;
-}
-.ui-grid-pager-control .prev-triangle {
- margin-left: 0;
-}
-.ui-grid-pager-control .last-triangle {
- width: 0;
- height: 0;
- border-style: solid;
- border-width: 5px 0 5px 8.7px;
- border-color: transparent transparent transparent #4d4d4d;
- margin-left: -1px;
-}
-.ui-grid-pager-control .last-bar {
- width: 10px;
- border-left: 2px solid #4d4d4d;
- margin-top: -6px;
- height: 12px;
- margin-left: 1px;
-}
-.ui-grid-pager-control .last-bar-rtl {
- width: 10px;
- border-left: 2px solid #4d4d4d;
- margin-top: -6px;
- height: 12px;
- margin-right: -11px;
-}
-.ui-grid-pager-row-count-picker {
- float: left;
-}
-.ui-grid-pager-row-count-picker select {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555555;
- background-color: #ffffff;
- background-image: none;
- border: 1px solid #cccccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
- height: 26px;
- width: 67px;
- display: inline;
-}
-.ui-grid-pager-row-count-picker select:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.ui-grid-pager-row-count-picker select::-moz-placeholder {
- color: #999999;
- opacity: 1;
-}
-.ui-grid-pager-row-count-picker select:-ms-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-row-count-picker select::-webkit-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-row-count-picker select::-ms-expand {
- border: 0;
- background-color: transparent;
-}
-.ui-grid-pager-row-count-picker select[disabled],
-.ui-grid-pager-row-count-picker select[readonly],
-fieldset[disabled] .ui-grid-pager-row-count-picker select {
- background-color: #eeeeee;
- opacity: 1;
-}
-.ui-grid-pager-row-count-picker select[disabled],
-fieldset[disabled] .ui-grid-pager-row-count-picker select {
- cursor: not-allowed;
-}
-textarea.ui-grid-pager-row-count-picker select {
- height: auto;
-}
-select.ui-grid-pager-row-count-picker select {
- height: 30px;
- line-height: 30px;
-}
-textarea.ui-grid-pager-row-count-picker select,
-select[multiple].ui-grid-pager-row-count-picker select {
- height: auto;
-}
-.ui-grid-pager-row-count-picker .ui-grid-pager-row-count-label {
- margin-top: 3px;
-}
-.ui-grid-pager-count-container {
- float: right;
- margin-top: 4px;
- min-width: 50px;
-}
-.ui-grid-pager-count-container .ui-grid-pager-count {
- margin-right: 10px;
- margin-left: 10px;
- float: right;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-pinned-container {
- position: absolute;
- display: inline;
- top: 0;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left {
- float: left;
- left: 0;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right {
- float: right;
- right: 0;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child {
- box-sizing: border-box;
- border-right: 1px solid;
- border-width: 1px;
- border-right-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child {
- box-sizing: border-box;
- border-right: 1px solid;
- border-width: 1px;
- border-right-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,
-.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- width: 1px;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar {
- right: -1px;
- width: 1px;
- background-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:first-child {
- box-sizing: border-box;
- border-left: 1px solid;
- border-width: 1px;
- border-left-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-cell:first-child {
- box-sizing: border-box;
- border-left: 1px solid;
- border-width: 1px;
- border-left-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:not(:first-child) .ui-grid-vertical-bar,
-.ui-grid-pinned-container .ui-grid-cell:not(:first-child) .ui-grid-vertical-bar {
- width: 1px;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:not(:first-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-first .ui-grid-header-cell:first-child .ui-grid-vertical-bar {
- left: -1px;
- width: 1px;
- background-color: #aeaeae;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-column-resizer {
- top: 0;
- bottom: 0;
- width: 5px;
- position: absolute;
- cursor: col-resize;
-}
-.ui-grid-column-resizer.left {
- left: 0;
-}
-.ui-grid-column-resizer.right {
- right: 0;
-}
-.ui-grid-header-cell:last-child .ui-grid-column-resizer.right {
- border-right: 1px solid #d4d4d4;
-}
-.ui-grid[dir=rtl] .ui-grid-header-cell:last-child .ui-grid-column-resizer.right {
- border-right: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-header-cell:last-child .ui-grid-column-resizer.left {
- border-left: 1px solid #d4d4d4;
-}
-.ui-grid.column-resizing {
- cursor: col-resize;
-}
-.ui-grid.column-resizing .ui-grid-resize-overlay {
- position: absolute;
- top: 0;
- height: 100%;
- width: 1px;
- background-color: #aeaeae;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-row-saving .ui-grid-cell {
- color: #848484 !important;
-}
-.ui-grid-row-dirty .ui-grid-cell {
- color: #610b38;
-}
-.ui-grid-row-error .ui-grid-cell {
- color: #ff0000 !important;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell {
- background-color: #c9dde1;
-}
-.ui-grid-disable-selection {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- cursor: default;
-}
-.ui-grid-selection-row-header-buttons {
- cursor: pointer;
- opacity: 0.1;
-}
-.ui-grid-selection-row-header-buttons.ui-grid-row-selected {
- opacity: 1;
-}
-.ui-grid-selection-row-header-buttons.ui-grid-all-selected {
- opacity: 1;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-tree-row-header-buttons.ui-grid-tree-header {
- cursor: pointer;
- opacity: 1;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-tree-header-row {
- font-weight: bold !important;
-}
-.ui-grid-tree-header-row .ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell {
- pointer-events: all;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-div.ui-grid-cell-contents.invalid {
- border: 1px solid #fc8f8f;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.eot b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.eot
deleted file mode 100644
index 3b343158..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.eot
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.js
deleted file mode 100644
index df03c974..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.js
+++ /dev/null
@@ -1,28935 +0,0 @@
-/*!
- * ui-grid - v4.0.2 - 2016-12-30
- * Copyright (c) 2016 ; License: MIT
- */
-
-(function () {
- 'use strict';
- angular.module('ui.grid.i18n', []);
- angular.module('ui.grid', ['ui.grid.i18n']);
-})();
-(function () {
- 'use strict';
-
- /**
- * @ngdoc object
- * @name ui.grid.service:uiGridConstants
- * @description Constants for use across many grid features
- *
- */
-
-
- angular.module('ui.grid').constant('uiGridConstants', {
- LOG_DEBUG_MESSAGES: true,
- LOG_WARN_MESSAGES: true,
- LOG_ERROR_MESSAGES: true,
- CUSTOM_FILTERS: /CUSTOM_FILTERS/g,
- COL_FIELD: /COL_FIELD/g,
- MODEL_COL_FIELD: /MODEL_COL_FIELD/g,
- TOOLTIP: /title=\"TOOLTIP\"/g,
- DISPLAY_CELL_TEMPLATE: /DISPLAY_CELL_TEMPLATE/g,
- TEMPLATE_REGEXP: /<.+>/,
- FUNC_REGEXP: /(\([^)]*\))?$/,
- DOT_REGEXP: /\./g,
- APOS_REGEXP: /'/g,
- BRACKET_REGEXP: /^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,
- COL_CLASS_PREFIX: 'ui-grid-col',
- ENTITY_BINDING: '$$this',
- events: {
- GRID_SCROLL: 'uiGridScroll',
- COLUMN_MENU_SHOWN: 'uiGridColMenuShown',
- ITEM_DRAGGING: 'uiGridItemDragStart', // For any item being dragged
- COLUMN_HEADER_CLICK: 'uiGridColumnHeaderClick'
- },
- // copied from http://www.lsauer.com/2011/08/javascript-keymap-keycodes-in-json.html
- keymap: {
- TAB: 9,
- STRG: 17,
- CAPSLOCK: 20,
- CTRL: 17,
- CTRLRIGHT: 18,
- CTRLR: 18,
- SHIFT: 16,
- RETURN: 13,
- ENTER: 13,
- BACKSPACE: 8,
- BCKSP: 8,
- ALT: 18,
- ALTR: 17,
- ALTRIGHT: 17,
- SPACE: 32,
- WIN: 91,
- MAC: 91,
- FN: null,
- PG_UP: 33,
- PG_DOWN: 34,
- UP: 38,
- DOWN: 40,
- LEFT: 37,
- RIGHT: 39,
- ESC: 27,
- DEL: 46,
- F1: 112,
- F2: 113,
- F3: 114,
- F4: 115,
- F5: 116,
- F6: 117,
- F7: 118,
- F8: 119,
- F9: 120,
- F10: 121,
- F11: 122,
- F12: 123
- },
- /**
- * @ngdoc object
- * @name ASC
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Used in {@link ui.grid.class:GridOptions.columnDef#properties_sort columnDef.sort} and
- * {@link ui.grid.class:GridOptions.columnDef#properties_sortDirectionCycle columnDef.sortDirectionCycle}
- * to configure the sorting direction of the column
- */
- ASC: 'asc',
- /**
- * @ngdoc object
- * @name DESC
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Used in {@link ui.grid.class:GridOptions.columnDef#properties_sort columnDef.sort} and
- * {@link ui.grid.class:GridOptions.columnDef#properties_sortDirectionCycle columnDef.sortDirectionCycle}
- * to configure the sorting direction of the column
- */
- DESC: 'desc',
-
-
- /**
- * @ngdoc object
- * @name filter
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Used in {@link ui.grid.class:GridOptions.columnDef#properties_filter columnDef.filter}
- * to configure filtering on the column
- *
- * `SELECT` and `INPUT` are used with the `type` property of the filter, the rest are used to specify
- * one of the built-in conditions.
- *
- * Available `condition` options are:
- * - `uiGridConstants.filter.STARTS_WITH`
- * - `uiGridConstants.filter.ENDS_WITH`
- * - `uiGridConstants.filter.CONTAINS`
- * - `uiGridConstants.filter.GREATER_THAN`
- * - `uiGridConstants.filter.GREATER_THAN_OR_EQUAL`
- * - `uiGridConstants.filter.LESS_THAN`
- * - `uiGridConstants.filter.LESS_THAN_OR_EQUAL`
- * - `uiGridConstants.filter.NOT_EQUAL`
- * - `uiGridConstants.filter.STARTS_WITH`
- *
- *
- * Available `type` options are:
- * - `uiGridConstants.filter.SELECT` - use a dropdown box for the cell header filter field
- * - `uiGridConstants.filter.INPUT` - use a text box for the cell header filter field
- */
- filter: {
- STARTS_WITH: 2,
- ENDS_WITH: 4,
- EXACT: 8,
- CONTAINS: 16,
- GREATER_THAN: 32,
- GREATER_THAN_OR_EQUAL: 64,
- LESS_THAN: 128,
- LESS_THAN_OR_EQUAL: 256,
- NOT_EQUAL: 512,
- SELECT: 'select',
- INPUT: 'input'
- },
-
- /**
- * @ngdoc object
- * @name aggregationTypes
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Used in {@link ui.grid.class:GridOptions.columnDef#properties_aggregationType columnDef.aggregationType}
- * to specify the type of built-in aggregation the column should use.
- *
- * Available options are:
- * - `uiGridConstants.aggregationTypes.sum` - add the values in this column to produce the aggregated value
- * - `uiGridConstants.aggregationTypes.count` - count the number of rows to produce the aggregated value
- * - `uiGridConstants.aggregationTypes.avg` - average the values in this column to produce the aggregated value
- * - `uiGridConstants.aggregationTypes.min` - use the minimum value in this column as the aggregated value
- * - `uiGridConstants.aggregationTypes.max` - use the maximum value in this column as the aggregated value
- */
- aggregationTypes: {
- sum: 2,
- count: 4,
- avg: 8,
- min: 16,
- max: 32
- },
-
- /**
- * @ngdoc array
- * @name CURRENCY_SYMBOLS
- * @propertyOf ui.grid.service:uiGridConstants
- * @description A list of all presently circulating currency symbols that was copied from
- * https://en.wikipedia.org/wiki/Currency_symbol#List_of_presently-circulating_currency_symbols
- *
- * Can be used on {@link ui.grid.class:rowSorter} to create a number string regex that ignores currency symbols.
- */
- CURRENCY_SYMBOLS: ['¤', '؋', 'Ar', 'Ƀ', '฿', 'B/.', 'Br', 'Bs.', 'Bs.F.', 'GH₵', '¢', 'c', 'Ch.', '₡', 'C$', 'D', 'ден',
- 'دج', '.د.ب', 'د.ع', 'JD', 'د.ك', 'ل.د', 'дин', 'د.ت', 'د.م.', 'د.إ', 'Db', '$', '₫', 'Esc', '€', 'ƒ', 'Ft', 'FBu',
- 'FCFA', 'CFA', 'Fr', 'FRw', 'G', 'gr', '₲', 'h', 'â‚´', 'â‚­', 'KÄ', 'kr', 'kn', 'MK', 'ZK', 'Kz', 'K', 'L', 'Le', 'лв',
- 'E', 'lp', 'M', 'KM', 'MT', '₥', 'Nfk', '₦', 'Nu.', 'UM', 'T$', 'MOP$', '₱', 'Pt.', '£', 'ج.م.', 'LL', 'LS', 'P', 'Q',
- 'q', 'R', 'R$', 'ر.ع.', 'ر.ق', 'ر.س', '៛', 'RM', 'p', 'Rf.', '₹', '₨', 'SRe', 'Rp', '₪', 'Ksh', 'Sh.So.', 'USh', 'S/',
- 'SDR', 'Ñом', '৳ ', 'WS$', 'â‚®', 'VT', 'â‚©', 'Â¥', 'zÅ‚'],
-
- /**
- * @ngdoc object
- * @name scrollDirection
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Set on {@link ui.grid.class:Grid#properties_scrollDirection Grid.scrollDirection},
- * to indicate the direction the grid is currently scrolling in
- *
- * Available options are:
- * - `uiGridConstants.scrollDirection.UP` - set when the grid is scrolling up
- * - `uiGridConstants.scrollDirection.DOWN` - set when the grid is scrolling down
- * - `uiGridConstants.scrollDirection.LEFT` - set when the grid is scrolling left
- * - `uiGridConstants.scrollDirection.RIGHT` - set when the grid is scrolling right
- * - `uiGridConstants.scrollDirection.NONE` - set when the grid is not scrolling, this is the default
- */
- scrollDirection: {
- UP: 'up',
- DOWN: 'down',
- LEFT: 'left',
- RIGHT: 'right',
- NONE: 'none'
-
- },
-
- /**
- * @ngdoc object
- * @name dataChange
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Used with {@link ui.grid.core.api:PublicApi#methods_notifyDataChange PublicApi.notifyDataChange},
- * {@link ui.grid.class:Grid#methods_callDataChangeCallbacks Grid.callDataChangeCallbacks},
- * and {@link ui.grid.class:Grid#methods_registerDataChangeCallback Grid.registerDataChangeCallback}
- * to specify the type of the event(s).
- *
- * Available options are:
- * - `uiGridConstants.dataChange.ALL` - listeners fired on any of these events, fires listeners on all events.
- * - `uiGridConstants.dataChange.EDIT` - fired when the data in a cell is edited
- * - `uiGridConstants.dataChange.ROW` - fired when a row is added or removed
- * - `uiGridConstants.dataChange.COLUMN` - fired when the column definitions are modified
- * - `uiGridConstants.dataChange.OPTIONS` - fired when the grid options are modified
- */
- dataChange: {
- ALL: 'all',
- EDIT: 'edit',
- ROW: 'row',
- COLUMN: 'column',
- OPTIONS: 'options'
- },
-
- /**
- * @ngdoc object
- * @name scrollbars
- * @propertyOf ui.grid.service:uiGridConstants
- * @description Used with {@link ui.grid.class:GridOptions#properties_enableHorizontalScrollbar GridOptions.enableHorizontalScrollbar}
- * and {@link ui.grid.class:GridOptions#properties_enableVerticalScrollbar GridOptions.enableVerticalScrollbar}
- * to specify the scrollbar policy for that direction.
- *
- * Available options are:
- * - `uiGridConstants.scrollbars.NEVER` - never show scrollbars in this direction
- * - `uiGridConstants.scrollbars.ALWAYS` - always show scrollbars in this direction
- */
-
- scrollbars: {
- NEVER: 0,
- ALWAYS: 1
- //WHEN_NEEDED: 2
- }
- });
-
-})();
-
-angular.module('ui.grid').directive('uiGridCell', ['$compile', '$parse', 'gridUtil', 'uiGridConstants', function ($compile, $parse, gridUtil, uiGridConstants) {
- var uiGridCell = {
- priority: 0,
- scope: false,
- require: '?^uiGrid',
- compile: function() {
- return {
- pre: function($scope, $elm, $attrs, uiGridCtrl) {
- function compileTemplate() {
- var compiledElementFn = $scope.col.compiledElementFn;
-
- compiledElementFn($scope, function(clonedElement, scope) {
- $elm.append(clonedElement);
- });
- }
-
- // If the grid controller is present, use it to get the compiled cell template function
- if (uiGridCtrl && $scope.col.compiledElementFn) {
- compileTemplate();
- }
- // No controller, compile the element manually (for unit tests)
- else {
- if ( uiGridCtrl && !$scope.col.compiledElementFn ){
- // gridUtil.logError('Render has been called before precompile. Please log a ui-grid issue');
-
- $scope.col.getCompiledElementFn()
- .then(function (compiledElementFn) {
- compiledElementFn($scope, function(clonedElement, scope) {
- $elm.append(clonedElement);
- });
- });
- }
- else {
- var html = $scope.col.cellTemplate
- .replace(uiGridConstants.MODEL_COL_FIELD, 'row.entity.' + gridUtil.preEval($scope.col.field))
- .replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)');
-
- var cellElement = $compile(html)($scope);
- $elm.append(cellElement);
- }
- }
- },
- post: function($scope, $elm, $attrs, uiGridCtrl) {
- var initColClass = $scope.col.getColClass(false);
- $elm.addClass(initColClass);
-
- var classAdded;
- var updateClass = function( grid ){
- var contents = $elm;
- if ( classAdded ){
- contents.removeClass( classAdded );
- classAdded = null;
- }
-
- if (angular.isFunction($scope.col.cellClass)) {
- classAdded = $scope.col.cellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex);
- }
- else {
- classAdded = $scope.col.cellClass;
- }
- contents.addClass(classAdded);
- };
-
- if ($scope.col.cellClass) {
- updateClass();
- }
-
- // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN, uiGridConstants.dataChange.EDIT]);
-
- // watch the col and row to see if they change - which would indicate that we've scrolled or sorted or otherwise
- // changed the row/col that this cell relates to, and we need to re-evaluate cell classes and maybe other things
- var cellChangeFunction = function( n, o ){
- if ( n !== o ) {
- if ( classAdded || $scope.col.cellClass ){
- updateClass();
- }
-
- // See if the column's internal class has changed
- var newColClass = $scope.col.getColClass(false);
- if (newColClass !== initColClass) {
- $elm.removeClass(initColClass);
- $elm.addClass(newColClass);
- initColClass = newColClass;
- }
- }
- };
-
- // TODO(c0bra): Turn this into a deep array watch
-/* shouldn't be needed any more given track by col.name
- var colWatchDereg = $scope.$watch( 'col', cellChangeFunction );
-*/
- var rowWatchDereg = $scope.$watch( 'row', cellChangeFunction );
-
-
- var deregisterFunction = function() {
- dataChangeDereg();
-// colWatchDereg();
- rowWatchDereg();
- };
-
- $scope.$on( '$destroy', deregisterFunction );
- $elm.on( '$destroy', deregisterFunction );
- }
- };
- }
- };
-
- return uiGridCell;
-}]);
-
-
-(function(){
-
-angular.module('ui.grid')
-.service('uiGridColumnMenuService', [ 'i18nService', 'uiGridConstants', 'gridUtil',
-function ( i18nService, uiGridConstants, gridUtil ) {
-/**
- * @ngdoc service
- * @name ui.grid.service:uiGridColumnMenuService
- *
- * @description Services for working with column menus, factored out
- * to make the code easier to understand
- */
-
- var service = {
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name initialize
- * @description Sets defaults, puts a reference to the $scope on
- * the uiGridController
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {controller} uiGridCtrl the uiGridController for the grid
- * we're on
- *
- */
- initialize: function( $scope, uiGridCtrl ){
- $scope.grid = uiGridCtrl.grid;
-
- // Store a reference to this link/controller in the main uiGrid controller
- // to allow showMenu later
- uiGridCtrl.columnMenuScope = $scope;
-
- // Save whether we're shown or not so the columns can check
- $scope.menuShown = false;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name setColMenuItemWatch
- * @description Setup a watch on $scope.col.menuItems, and update
- * menuItems based on this. $scope.col needs to be set by the column
- * before calling the menu.
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {controller} uiGridCtrl the uiGridController for the grid
- * we're on
- *
- */
- setColMenuItemWatch: function ( $scope ){
- var deregFunction = $scope.$watch('col.menuItems', function (n) {
- if (typeof(n) !== 'undefined' && n && angular.isArray(n)) {
- n.forEach(function (item) {
- if (typeof(item.context) === 'undefined' || !item.context) {
- item.context = {};
- }
- item.context.col = $scope.col;
- });
-
- $scope.menuItems = $scope.defaultMenuItems.concat(n);
- }
- else {
- $scope.menuItems = $scope.defaultMenuItems;
- }
- });
-
- $scope.$on( '$destroy', deregFunction );
- },
-
-
- /**
- * @ngdoc boolean
- * @name enableSorting
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) True by default. When enabled, this setting adds sort
- * widgets to the column header, allowing sorting of the data in the individual column.
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name sortable
- * @description determines whether this column is sortable
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- sortable: function( $scope ) {
- if ( $scope.grid.options.enableSorting && typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.enableSorting) {
- return true;
- }
- else {
- return false;
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name isActiveSort
- * @description determines whether the requested sort direction is current active, to
- * allow highlighting in the menu
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {string} direction the direction that we'd have selected for us to be active
- *
- */
- isActiveSort: function( $scope, direction ){
- return (typeof($scope.col) !== 'undefined' && typeof($scope.col.sort) !== 'undefined' &&
- typeof($scope.col.sort.direction) !== 'undefined' && $scope.col.sort.direction === direction);
-
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name suppressRemoveSort
- * @description determines whether we should suppress the removeSort option
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- suppressRemoveSort: function( $scope ) {
- if ($scope.col && $scope.col.suppressRemoveSort) {
- return true;
- }
- else {
- return false;
- }
- },
-
-
- /**
- * @ngdoc boolean
- * @name enableHiding
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) True by default. When set to false, this setting prevents a user from hiding the column
- * using the column menu or the grid menu.
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name hideable
- * @description determines whether a column can be hidden, by checking the enableHiding columnDef option
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- hideable: function( $scope ) {
- if (typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.colDef && $scope.col.colDef.enableHiding === false ) {
- return false;
- }
- else {
- return true;
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name getDefaultMenuItems
- * @description returns the default menu items for a column menu
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- getDefaultMenuItems: function( $scope ){
- return [
- {
- title: i18nService.getSafeText('sort.ascending'),
- icon: 'ui-grid-icon-sort-alt-up',
- action: function($event) {
- $event.stopPropagation();
- $scope.sortColumn($event, uiGridConstants.ASC);
- },
- shown: function () {
- return service.sortable( $scope );
- },
- active: function() {
- return service.isActiveSort( $scope, uiGridConstants.ASC);
- }
- },
- {
- title: i18nService.getSafeText('sort.descending'),
- icon: 'ui-grid-icon-sort-alt-down',
- action: function($event) {
- $event.stopPropagation();
- $scope.sortColumn($event, uiGridConstants.DESC);
- },
- shown: function() {
- return service.sortable( $scope );
- },
- active: function() {
- return service.isActiveSort( $scope, uiGridConstants.DESC);
- }
- },
- {
- title: i18nService.getSafeText('sort.remove'),
- icon: 'ui-grid-icon-cancel',
- action: function ($event) {
- $event.stopPropagation();
- $scope.unsortColumn();
- },
- shown: function() {
- return service.sortable( $scope ) &&
- typeof($scope.col) !== 'undefined' && (typeof($scope.col.sort) !== 'undefined' &&
- typeof($scope.col.sort.direction) !== 'undefined') && $scope.col.sort.direction !== null &&
- !service.suppressRemoveSort( $scope );
- }
- },
- {
- title: i18nService.getSafeText('column.hide'),
- icon: 'ui-grid-icon-cancel',
- shown: function() {
- return service.hideable( $scope );
- },
- action: function ($event) {
- $event.stopPropagation();
- $scope.hideColumn();
- }
- }
- ];
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name getColumnElementPosition
- * @description gets the position information needed to place the column
- * menu below the column header
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {GridCol} column the column we want to position below
- * @param {element} $columnElement the column element we want to position below
- * @returns {hash} containing left, top, offset, height, width
- *
- */
- getColumnElementPosition: function( $scope, column, $columnElement ){
- var positionData = {};
- positionData.left = $columnElement[0].offsetLeft;
- positionData.top = $columnElement[0].offsetTop;
- positionData.parentLeft = $columnElement[0].offsetParent.offsetLeft;
-
- // Get the grid scrollLeft
- positionData.offset = 0;
- if (column.grid.options.offsetLeft) {
- positionData.offset = column.grid.options.offsetLeft;
- }
-
- positionData.height = gridUtil.elementHeight($columnElement, true);
- positionData.width = gridUtil.elementWidth($columnElement, true);
-
- return positionData;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name repositionMenu
- * @description Reposition the menu below the new column. If the menu has no child nodes
- * (i.e. it's not currently visible) then we guess it's width at 100, we'll be called again
- * later to fix it
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {GridCol} column the column we want to position below
- * @param {hash} positionData a hash containing left, top, offset, height, width
- * @param {element} $elm the column menu element that we want to reposition
- * @param {element} $columnElement the column element that we want to reposition underneath
- *
- */
- repositionMenu: function( $scope, column, positionData, $elm, $columnElement ) {
- var menu = $elm[0].querySelectorAll('.ui-grid-menu');
-
- // It's possible that the render container of the column we're attaching to is
- // offset from the grid (i.e. pinned containers), we need to get the difference in the offsetLeft
- // between the render container and the grid
- var renderContainerElm = gridUtil.closestElm($columnElement, '.ui-grid-render-container');
- var renderContainerOffset = renderContainerElm.getBoundingClientRect().left - $scope.grid.element[0].getBoundingClientRect().left;
-
- var containerScrollLeft = renderContainerElm.querySelectorAll('.ui-grid-viewport')[0].scrollLeft;
-
- // default value the last width for _this_ column, otherwise last width for _any_ column, otherwise default to 170
- var myWidth = column.lastMenuWidth ? column.lastMenuWidth : ( $scope.lastMenuWidth ? $scope.lastMenuWidth : 170);
- var paddingRight = column.lastMenuPaddingRight ? column.lastMenuPaddingRight : ( $scope.lastMenuPaddingRight ? $scope.lastMenuPaddingRight : 10);
-
- if ( menu.length !== 0 ){
- var mid = menu[0].querySelectorAll('.ui-grid-menu-mid');
- if ( mid.length !== 0 && !angular.element(mid).hasClass('ng-hide') ) {
- myWidth = gridUtil.elementWidth(menu, true);
- $scope.lastMenuWidth = myWidth;
- column.lastMenuWidth = myWidth;
-
- // TODO(c0bra): use padding-left/padding-right based on document direction (ltr/rtl), place menu on proper side
- // Get the column menu right padding
- paddingRight = parseInt(gridUtil.getStyles(angular.element(menu)[0])['paddingRight'], 10);
- $scope.lastMenuPaddingRight = paddingRight;
- column.lastMenuPaddingRight = paddingRight;
- }
- }
-
- var left = positionData.left + renderContainerOffset - containerScrollLeft + positionData.parentLeft + positionData.width - myWidth + paddingRight;
- if (left < positionData.offset){
- left = positionData.offset;
- }
-
- $elm.css('left', left + 'px');
- $elm.css('top', (positionData.top + positionData.height) + 'px');
- }
-
- };
-
- return service;
-}])
-
-
-.directive('uiGridColumnMenu', ['$timeout', 'gridUtil', 'uiGridConstants', 'uiGridColumnMenuService', '$document',
-function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $document) {
-/**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridColumnMenu
- * @description Provides the column menu framework, leverages uiGridMenu underneath
- *
- */
-
- var uiGridColumnMenu = {
- priority: 0,
- scope: true,
- require: '^uiGrid',
- templateUrl: 'ui-grid/uiGridColumnMenu',
- replace: true,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridColumnMenuService.initialize( $scope, uiGridCtrl );
-
- $scope.defaultMenuItems = uiGridColumnMenuService.getDefaultMenuItems( $scope );
-
- // Set the menu items for use with the column menu. The user can later add additional items via the watch
- $scope.menuItems = $scope.defaultMenuItems;
- uiGridColumnMenuService.setColMenuItemWatch( $scope );
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.directive:uiGridColumnMenu
- * @name showMenu
- * @description Shows the column menu. If the menu is already displayed it
- * calls the menu to ask it to hide (it will animate), then it repositions the menu
- * to the right place whilst hidden (it will make an assumption on menu width),
- * then it asks the menu to show (it will animate), then it repositions the menu again
- * once we can calculate it's size.
- * @param {GridCol} column the column we want to position below
- * @param {element} $columnElement the column element we want to position below
- */
- $scope.showMenu = function(column, $columnElement, event) {
- // Swap to this column
- $scope.col = column;
-
- // Get the position information for the column element
- var colElementPosition = uiGridColumnMenuService.getColumnElementPosition( $scope, column, $columnElement );
-
- if ($scope.menuShown) {
- // we want to hide, then reposition, then show, but we want to wait for animations
- // we set a variable, and then rely on the menu-hidden event to call the reposition and show
- $scope.colElement = $columnElement;
- $scope.colElementPosition = colElementPosition;
- $scope.hideThenShow = true;
-
- $scope.$broadcast('hide-menu', { originalEvent: event });
- } else {
- $scope.menuShown = true;
- uiGridColumnMenuService.repositionMenu( $scope, column, colElementPosition, $elm, $columnElement );
-
- $scope.colElement = $columnElement;
- $scope.colElementPosition = colElementPosition;
- $scope.$broadcast('show-menu', { originalEvent: event });
-
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.directive:uiGridColumnMenu
- * @name hideMenu
- * @description Hides the column menu.
- * @param {boolean} broadcastTrigger true if we were triggered by a broadcast
- * from the menu itself - in which case don't broadcast again as we'll get
- * an infinite loop
- */
- $scope.hideMenu = function( broadcastTrigger ) {
- $scope.menuShown = false;
- if ( !broadcastTrigger ){
- $scope.$broadcast('hide-menu');
- }
- };
-
-
- $scope.$on('menu-hidden', function() {
- if ( $scope.hideThenShow ){
- delete $scope.hideThenShow;
-
- uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement );
- $scope.$broadcast('show-menu');
-
- $scope.menuShown = true;
- } else {
- $scope.hideMenu( true );
-
- if ($scope.col) {
- //Focus on the menu button
- gridUtil.focus.bySelector($document, '.ui-grid-header-cell.' + $scope.col.getColClass()+ ' .ui-grid-column-menu-button', $scope.col.grid, false);
- }
- }
- });
-
- $scope.$on('menu-shown', function() {
- $timeout( function() {
- uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement );
- //Focus on the first item
- gridUtil.focus.bySelector($document, '.ui-grid-menu-items .ui-grid-menu-item', true);
- delete $scope.colElementPosition;
- delete $scope.columnElement;
- }, 200);
- });
-
-
- /* Column methods */
- $scope.sortColumn = function (event, dir) {
- event.stopPropagation();
-
- $scope.grid.sortColumn($scope.col, dir, true)
- .then(function () {
- $scope.grid.refresh();
- $scope.hideMenu();
- });
- };
-
- $scope.unsortColumn = function () {
- $scope.col.unsort();
-
- $scope.grid.refresh();
- $scope.hideMenu();
- };
-
- //Since we are hiding this column the default hide action will fail so we need to focus somewhere else.
- var setFocusOnHideColumn = function(){
- $timeout(function(){
- // Get the UID of the first
- var focusToGridMenu = function(){
- return gridUtil.focus.byId('grid-menu', $scope.grid);
- };
-
- var thisIndex;
- $scope.grid.columns.some(function(element, index){
- if (angular.equals(element, $scope.col)) {
- thisIndex = index;
- return true;
- }
- });
-
- var previousVisibleCol;
- // Try and find the next lower or nearest column to focus on
- $scope.grid.columns.some(function(element, index){
- if (!element.visible){
- return false;
- } // This columns index is below the current column index
- else if ( index < thisIndex){
- previousVisibleCol = element;
- } // This elements index is above this column index and we haven't found one that is lower
- else if ( index > thisIndex && !previousVisibleCol) {
- // This is the next best thing
- previousVisibleCol = element;
- // We've found one so use it.
- return true;
- } // We've reached an element with an index above this column and the previousVisibleCol variable has been set
- else if (index > thisIndex && previousVisibleCol) {
- // We are done.
- return true;
- }
- });
- // If found then focus on it
- if (previousVisibleCol){
- var colClass = previousVisibleCol.getColClass();
- gridUtil.focus.bySelector($document, '.ui-grid-header-cell.' + colClass+ ' .ui-grid-header-cell-primary-focus', true).then(angular.noop, function(reason){
- if (reason !== 'canceled'){ // If this is canceled then don't perform the action
- //The fallback action is to focus on the grid menu
- return focusToGridMenu();
- }
- });
- } else {
- // Fallback action to focus on the grid menu
- focusToGridMenu();
- }
- });
- };
-
- $scope.hideColumn = function () {
- $scope.col.colDef.visible = false;
- $scope.col.visible = false;
-
- $scope.grid.queueGridRefresh();
- $scope.hideMenu();
- $scope.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- $scope.grid.api.core.raise.columnVisibilityChanged( $scope.col );
-
- // We are hiding so the default action of focusing on the button that opened this menu will fail.
- setFocusOnHideColumn();
- };
- },
-
-
-
- controller: ['$scope', function ($scope) {
- var self = this;
-
- $scope.$watch('menuItems', function (n) {
- self.menuItems = n;
- });
- }]
- };
-
- return uiGridColumnMenu;
-
-}]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridFilter', ['$compile', '$templateCache', 'i18nService', 'gridUtil', function ($compile, $templateCache, i18nService, gridUtil) {
-
- return {
- compile: function() {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- $scope.col.updateFilters = function( filterable ){
- $elm.children().remove();
- if ( filterable ){
- var template = $scope.col.filterHeaderTemplate;
-
- $elm.append($compile(template)($scope));
- }
- };
-
- $scope.$on( '$destroy', function() {
- delete $scope.col.updateFilters;
- });
- },
- post: function ($scope, $elm, $attrs, controllers){
- $scope.aria = i18nService.getSafeText('headerCell.aria');
- $scope.removeFilter = function(colFilter, index){
- colFilter.term = null;
- //Set the focus to the filter input after the action disables the button
- gridUtil.focus.bySelector($elm, '.ui-grid-filter-input-' + index);
- };
- }
- };
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridFooterCell', ['$timeout', 'gridUtil', 'uiGridConstants', '$compile',
- function ($timeout, gridUtil, uiGridConstants, $compile) {
- var uiGridFooterCell = {
- priority: 0,
- scope: {
- col: '=',
- row: '=',
- renderIndex: '='
- },
- replace: true,
- require: '^uiGrid',
- compile: function compile(tElement, tAttrs, transclude) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var cellFooter = $compile($scope.col.footerCellTemplate)($scope);
- $elm.append(cellFooter);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- //$elm.addClass($scope.col.getColClass(false));
- $scope.grid = uiGridCtrl.grid;
-
- var initColClass = $scope.col.getColClass(false);
- $elm.addClass(initColClass);
-
- // apply any footerCellClass
- var classAdded;
- var updateClass = function( grid ){
- var contents = $elm;
- if ( classAdded ){
- contents.removeClass( classAdded );
- classAdded = null;
- }
-
- if (angular.isFunction($scope.col.footerCellClass)) {
- classAdded = $scope.col.footerCellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex);
- }
- else {
- classAdded = $scope.col.footerCellClass;
- }
- contents.addClass(classAdded);
- };
-
- if ($scope.col.footerCellClass) {
- updateClass();
- }
-
- $scope.col.updateAggregationValue();
-
- // Watch for column changes so we can alter the col cell class properly
-/* shouldn't be needed any more, given track by col.name
- $scope.$watch('col', function (n, o) {
- if (n !== o) {
- // See if the column's internal class has changed
- var newColClass = $scope.col.getColClass(false);
- if (newColClass !== initColClass) {
- $elm.removeClass(initColClass);
- $elm.addClass(newColClass);
- initColClass = newColClass;
- }
- }
- });
-*/
-
-
- // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN]);
- // listen for visible rows change and update aggregation values
- $scope.grid.api.core.on.rowsRendered( $scope, $scope.col.updateAggregationValue );
- $scope.grid.api.core.on.rowsRendered( $scope, updateClass );
- $scope.$on( '$destroy', dataChangeDereg );
- }
- };
- }
- };
-
- return uiGridFooterCell;
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridFooter', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($templateCache, $compile, uiGridConstants, gridUtil, $timeout) {
-
- return {
- restrict: 'EA',
- replace: true,
- // priority: 1000,
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: true,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- $scope.grid = uiGridCtrl.grid;
- $scope.colContainer = containerCtrl.colContainer;
-
- containerCtrl.footer = $elm;
-
- var footerTemplate = $scope.grid.options.footerTemplate;
- gridUtil.getTemplate(footerTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.append(newElm);
-
- if (containerCtrl) {
- // Inject a reference to the footer viewport (if it exists) into the grid controller for use in the horizontal scroll handler below
- var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0];
-
- if (footerViewport) {
- containerCtrl.footerViewport = footerViewport;
- }
- }
- });
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- // gridUtil.logDebug('ui-grid-footer link');
-
- var grid = uiGridCtrl.grid;
-
- // Don't animate footer cells
- gridUtil.disableAnimations($elm);
-
- containerCtrl.footer = $elm;
-
- var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0];
- if (footerViewport) {
- containerCtrl.footerViewport = footerViewport;
- }
- }
- };
- }
- };
- }]);
-
-})();
-(function () {
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridGridFooter', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($templateCache, $compile, uiGridConstants, gridUtil, $timeout) {
-
- return {
- restrict: 'EA',
- replace: true,
- // priority: 1000,
- require: '^uiGrid',
- scope: true,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- $scope.grid = uiGridCtrl.grid;
-
-
-
- var footerTemplate = $scope.grid.options.gridFooterTemplate;
- gridUtil.getTemplate(footerTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.append(newElm);
- });
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
-
- }
- };
- }
- };
- }]);
-
-})();
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridGroupPanel', ["$compile", "uiGridConstants", "gridUtil", function($compile, uiGridConstants, gridUtil) {
- var defaultTemplate = 'ui-grid/ui-grid-group-panel';
-
- return {
- restrict: 'EA',
- replace: true,
- require: '?^uiGrid',
- scope: false,
- compile: function($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var groupPanelTemplate = $scope.grid.options.groupPanelTemplate || defaultTemplate;
-
- gridUtil.getTemplate(groupPanelTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.append(newElm);
- });
- },
-
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- $elm.bind('$destroy', function() {
- // scrollUnbinder();
- });
- }
- };
- }
- };
- }]);
-
-})();
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridHeaderCell', ['$compile', '$timeout', '$window', '$document', 'gridUtil', 'uiGridConstants', 'ScrollEvent', 'i18nService',
- function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, ScrollEvent, i18nService) {
- // Do stuff after mouse has been down this many ms on the header cell
- var mousedownTimeout = 500;
- var changeModeTimeout = 500; // length of time between a touch event and a mouse event being recognised again, and vice versa
-
- var uiGridHeaderCell = {
- priority: 0,
- scope: {
- col: '=',
- row: '=',
- renderIndex: '='
- },
- require: ['^uiGrid', '^uiGridRenderContainer'],
- replace: true,
- compile: function() {
- return {
- pre: function ($scope, $elm, $attrs) {
- var cellHeader = $compile($scope.col.headerCellTemplate)($scope);
- $elm.append(cellHeader);
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var renderContainerCtrl = controllers[1];
-
- $scope.i18n = {
- headerCell: i18nService.getSafeText('headerCell'),
- sort: i18nService.getSafeText('sort')
- };
- $scope.isSortPriorityVisible = function() {
- //show sort priority if column is sorted and there is at least one other sorted column
- return angular.isNumber($scope.col.sort.priority) && $scope.grid.columns.some(function(element, index){
- return angular.isNumber(element.sort.priority) && element !== $scope.col;
- });
- };
- $scope.getSortDirectionAriaLabel = function(){
- var col = $scope.col;
- //Trying to recreate this sort of thing but it was getting messy having it in the template.
- //Sort direction {{col.sort.direction == asc ? 'ascending' : ( col.sort.direction == desc ? 'descending':'none')}}. {{col.sort.priority ? {{columnPriorityText}} {{col.sort.priority}} : ''}
- var sortDirectionText = col.sort.direction === uiGridConstants.ASC ? $scope.i18n.sort.ascending : ( col.sort.direction === uiGridConstants.DESC ? $scope.i18n.sort.descending : $scope.i18n.sort.none);
- var label = sortDirectionText;
-
- if ($scope.isSortPriorityVisible()) {
- label = label + '. ' + $scope.i18n.headerCell.priority + ' ' + col.sort.priority;
- }
- return label;
- };
-
- $scope.grid = uiGridCtrl.grid;
-
- $scope.renderContainer = uiGridCtrl.grid.renderContainers[renderContainerCtrl.containerId];
-
- var initColClass = $scope.col.getColClass(false);
- $elm.addClass(initColClass);
-
- // Hide the menu by default
- $scope.menuShown = false;
-
- // Put asc and desc sort directions in scope
- $scope.asc = uiGridConstants.ASC;
- $scope.desc = uiGridConstants.DESC;
-
- // Store a reference to menu element
- var $colMenu = angular.element( $elm[0].querySelectorAll('.ui-grid-header-cell-menu') );
-
- var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') );
-
-
- // apply any headerCellClass
- var classAdded;
- var previousMouseX;
-
- // filter watchers
- var filterDeregisters = [];
-
-
- /*
- * Our basic approach here for event handlers is that we listen for a down event (mousedown or touchstart).
- * Once we have a down event, we need to work out whether we have a click, a drag, or a
- * hold. A click would sort the grid (if sortable). A drag would be used by moveable, so
- * we ignore it. A hold would open the menu.
- *
- * So, on down event, we put in place handlers for move and up events, and a timer. If the
- * timer expires before we see a move or up, then we have a long press and hence a column menu open.
- * If the up happens before the timer, then we have a click, and we sort if the column is sortable.
- * If a move happens before the timer, then we are doing column move, so we do nothing, the moveable feature
- * will handle it.
- *
- * To deal with touch enabled devices that also have mice, we only create our handlers when
- * we get the down event, and we create the corresponding handlers - if we're touchstart then
- * we get touchmove and touchend, if we're mousedown then we get mousemove and mouseup.
- *
- * We also suppress the click action whilst this is happening - otherwise after the mouseup there
- * will be a click event and that can cause the column menu to close
- *
- */
-
- $scope.downFn = function( event ){
- event.stopPropagation();
-
- if (typeof(event.originalEvent) !== 'undefined' && event.originalEvent !== undefined) {
- event = event.originalEvent;
- }
-
- // Don't show the menu if it's not the left button
- if (event.button && event.button !== 0) {
- return;
- }
- previousMouseX = event.pageX;
-
- $scope.mousedownStartTime = (new Date()).getTime();
- $scope.mousedownTimeout = $timeout(function() { }, mousedownTimeout);
-
- $scope.mousedownTimeout.then(function () {
- if ( $scope.colMenu ) {
- uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm, event);
- }
- });
-
- uiGridCtrl.fireEvent(uiGridConstants.events.COLUMN_HEADER_CLICK, {event: event, columnName: $scope.col.colDef.name});
-
- $scope.offAllEvents();
- if ( event.type === 'touchstart'){
- $document.on('touchend', $scope.upFn);
- $document.on('touchmove', $scope.moveFn);
- } else if ( event.type === 'mousedown' ){
- $document.on('mouseup', $scope.upFn);
- $document.on('mousemove', $scope.moveFn);
- }
- };
-
- $scope.upFn = function( event ){
- event.stopPropagation();
- $timeout.cancel($scope.mousedownTimeout);
- $scope.offAllEvents();
- $scope.onDownEvents(event.type);
-
- var mousedownEndTime = (new Date()).getTime();
- var mousedownTime = mousedownEndTime - $scope.mousedownStartTime;
-
- if (mousedownTime > mousedownTimeout) {
- // long click, handled above with mousedown
- }
- else {
- // short click
- if ( $scope.sortable ){
- $scope.handleClick(event);
- }
- }
- };
-
- $scope.moveFn = function( event ){
- // Chrome is known to fire some bogus move events.
- var changeValue = event.pageX - previousMouseX;
- if ( changeValue === 0 ){ return; }
-
- // we're a move, so do nothing and leave for column move (if enabled) to take over
- $timeout.cancel($scope.mousedownTimeout);
- $scope.offAllEvents();
- $scope.onDownEvents(event.type);
- };
-
- $scope.clickFn = function ( event ){
- event.stopPropagation();
- $contentsElm.off('click', $scope.clickFn);
- };
-
-
- $scope.offAllEvents = function(){
- $contentsElm.off('touchstart', $scope.downFn);
- $contentsElm.off('mousedown', $scope.downFn);
-
- $document.off('touchend', $scope.upFn);
- $document.off('mouseup', $scope.upFn);
-
- $document.off('touchmove', $scope.moveFn);
- $document.off('mousemove', $scope.moveFn);
-
- $contentsElm.off('click', $scope.clickFn);
- };
-
- $scope.onDownEvents = function( type ){
- // If there is a previous event, then wait a while before
- // activating the other mode - i.e. if the last event was a touch event then
- // don't enable mouse events for a wee while (500ms or so)
- // Avoids problems with devices that emulate mouse events when you have touch events
-
- switch (type){
- case 'touchmove':
- case 'touchend':
- $contentsElm.on('click', $scope.clickFn);
- $contentsElm.on('touchstart', $scope.downFn);
- $timeout(function(){
- $contentsElm.on('mousedown', $scope.downFn);
- }, changeModeTimeout);
- break;
- case 'mousemove':
- case 'mouseup':
- $contentsElm.on('click', $scope.clickFn);
- $contentsElm.on('mousedown', $scope.downFn);
- $timeout(function(){
- $contentsElm.on('touchstart', $scope.downFn);
- }, changeModeTimeout);
- break;
- default:
- $contentsElm.on('click', $scope.clickFn);
- $contentsElm.on('touchstart', $scope.downFn);
- $contentsElm.on('mousedown', $scope.downFn);
- }
- };
-
-
- var updateHeaderOptions = function( grid ){
- var contents = $elm;
- if ( classAdded ){
- contents.removeClass( classAdded );
- classAdded = null;
- }
-
- if (angular.isFunction($scope.col.headerCellClass)) {
- classAdded = $scope.col.headerCellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex);
- }
- else {
- classAdded = $scope.col.headerCellClass;
- }
- contents.addClass(classAdded);
-
- $timeout(function (){
- var rightMostContainer = $scope.grid.renderContainers['right'] ? $scope.grid.renderContainers['right'] : $scope.grid.renderContainers['body'];
- $scope.isLastCol = ( $scope.col === rightMostContainer.visibleColumnCache[ rightMostContainer.visibleColumnCache.length - 1 ] );
- });
-
- // Figure out whether this column is sortable or not
- if ($scope.col.enableSorting) {
- $scope.sortable = true;
- }
- else {
- $scope.sortable = false;
- }
-
- // Figure out whether this column is filterable or not
- var oldFilterable = $scope.filterable;
- if (uiGridCtrl.grid.options.enableFiltering && $scope.col.enableFiltering) {
- $scope.filterable = true;
- }
- else {
- $scope.filterable = false;
- }
-
- if ( oldFilterable !== $scope.filterable){
- if ( typeof($scope.col.updateFilters) !== 'undefined' ){
- $scope.col.updateFilters($scope.filterable);
- }
-
- // if column is filterable add a filter watcher
- if ($scope.filterable) {
- $scope.col.filters.forEach( function(filter, i) {
- filterDeregisters.push($scope.$watch('col.filters[' + i + '].term', function(n, o) {
- if (n !== o) {
- uiGridCtrl.grid.api.core.raise.filterChanged();
- uiGridCtrl.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- uiGridCtrl.grid.queueGridRefresh();
- }
- }));
- });
- $scope.$on('$destroy', function() {
- filterDeregisters.forEach( function(filterDeregister) {
- filterDeregister();
- });
- });
- } else {
- filterDeregisters.forEach( function(filterDeregister) {
- filterDeregister();
- });
- }
-
- }
-
- // figure out whether we support column menus
- if ($scope.col.grid.options && $scope.col.grid.options.enableColumnMenus !== false &&
- $scope.col.colDef && $scope.col.colDef.enableColumnMenu !== false){
- $scope.colMenu = true;
- } else {
- $scope.colMenu = false;
- }
-
- /**
- * @ngdoc property
- * @name enableColumnMenu
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description if column menus are enabled, controls the column menus for this specific
- * column (i.e. if gridOptions.enableColumnMenus, then you can control column menus
- * using this option. If gridOptions.enableColumnMenus === false then you get no column
- * menus irrespective of the value of this option ). Defaults to true.
- *
- */
- /**
- * @ngdoc property
- * @name enableColumnMenus
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Override for column menus everywhere - if set to false then you get no
- * column menus. Defaults to true.
- *
- */
-
- $scope.offAllEvents();
-
- if ($scope.sortable || $scope.colMenu) {
- $scope.onDownEvents();
-
- $scope.$on('$destroy', function () {
- $scope.offAllEvents();
- });
- }
- };
-
-/*
- $scope.$watch('col', function (n, o) {
- if (n !== o) {
- // See if the column's internal class has changed
- var newColClass = $scope.col.getColClass(false);
- if (newColClass !== initColClass) {
- $elm.removeClass(initColClass);
- $elm.addClass(newColClass);
- initColClass = newColClass;
- }
- }
- });
-*/
- updateHeaderOptions();
-
- // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( updateHeaderOptions, [uiGridConstants.dataChange.COLUMN]);
-
- $scope.$on( '$destroy', dataChangeDereg );
-
- $scope.handleClick = function(event) {
- // If the shift key is being held down, add this column to the sort
- var add = false;
- if (event.shiftKey) {
- add = true;
- }
-
- // Sort this column then rebuild the grid's rows
- uiGridCtrl.grid.sortColumn($scope.col, add)
- .then(function () {
- if (uiGridCtrl.columnMenuScope) { uiGridCtrl.columnMenuScope.hideMenu(); }
- uiGridCtrl.grid.refresh();
- });
- };
-
-
- $scope.toggleMenu = function(event) {
- event.stopPropagation();
-
- // If the menu is already showing...
- if (uiGridCtrl.columnMenuScope.menuShown) {
- // ... and we're the column the menu is on...
- if (uiGridCtrl.columnMenuScope.col === $scope.col) {
- // ... hide it
- uiGridCtrl.columnMenuScope.hideMenu();
- }
- // ... and we're NOT the column the menu is on
- else {
- // ... move the menu to our column
- uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm);
- }
- }
- // If the menu is NOT showing
- else {
- // ... show it on our column
- uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm);
- }
- };
- }
- };
- }
- };
-
- return uiGridHeaderCell;
- }]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridHeader', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', 'ScrollEvent',
- function($templateCache, $compile, uiGridConstants, gridUtil, $timeout, ScrollEvent) {
- var defaultTemplate = 'ui-grid/ui-grid-header';
- var emptyTemplate = 'ui-grid/ui-grid-no-header';
-
- return {
- restrict: 'EA',
- // templateUrl: 'ui-grid/ui-grid-header',
- replace: true,
- // priority: 1000,
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: true,
- compile: function($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- $scope.grid = uiGridCtrl.grid;
- $scope.colContainer = containerCtrl.colContainer;
-
- updateHeaderReferences();
-
- var headerTemplate;
- if (!$scope.grid.options.showHeader) {
- headerTemplate = emptyTemplate;
- }
- else {
- headerTemplate = ($scope.grid.options.headerTemplate) ? $scope.grid.options.headerTemplate : defaultTemplate;
- }
-
- gridUtil.getTemplate(headerTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.replaceWith(newElm);
-
- // And update $elm to be the new element
- $elm = newElm;
-
- updateHeaderReferences();
-
- if (containerCtrl) {
- // Inject a reference to the header viewport (if it exists) into the grid controller for use in the horizontal scroll handler below
- var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0];
-
-
- if (headerViewport) {
- containerCtrl.headerViewport = headerViewport;
- angular.element(headerViewport).on('scroll', scrollHandler);
- $scope.$on('$destroy', function () {
- angular.element(headerViewport).off('scroll', scrollHandler);
- });
- }
- }
-
- $scope.grid.queueRefresh();
- });
-
- function updateHeaderReferences() {
- containerCtrl.header = containerCtrl.colContainer.header = $elm;
-
- var headerCanvases = $elm[0].getElementsByClassName('ui-grid-header-canvas');
-
- if (headerCanvases.length > 0) {
- containerCtrl.headerCanvas = containerCtrl.colContainer.headerCanvas = headerCanvases[0];
- }
- else {
- containerCtrl.headerCanvas = null;
- }
- }
-
- function scrollHandler(evt) {
- if (uiGridCtrl.grid.isScrollingHorizontally) {
- return;
- }
- var newScrollLeft = gridUtil.normalizeScrollLeft(containerCtrl.headerViewport, uiGridCtrl.grid);
- var horizScrollPercentage = containerCtrl.colContainer.scrollHorizontal(newScrollLeft);
-
- var scrollEvent = new ScrollEvent(uiGridCtrl.grid, null, containerCtrl.colContainer, ScrollEvent.Sources.ViewPortScroll);
- scrollEvent.newScrollLeft = newScrollLeft;
- if ( horizScrollPercentage > -1 ){
- scrollEvent.x = { percentage: horizScrollPercentage };
- }
-
- uiGridCtrl.grid.scrollContainers(null, scrollEvent);
- }
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- // gridUtil.logDebug('ui-grid-header link');
-
- var grid = uiGridCtrl.grid;
-
- // Don't animate header cells
- gridUtil.disableAnimations($elm);
-
- function updateColumnWidths() {
- // this styleBuilder always runs after the renderContainer, so we can rely on the column widths
- // already being populated correctly
-
- var columnCache = containerCtrl.colContainer.visibleColumnCache;
-
- // Build the CSS
- // uiGridCtrl.grid.columns.forEach(function (column) {
- var ret = '';
- var canvasWidth = 0;
- columnCache.forEach(function (column) {
- ret = ret + column.getColClassDefinition();
- canvasWidth += column.drawnWidth;
- });
-
- containerCtrl.colContainer.canvasWidth = canvasWidth;
-
- // Return the styles back to buildStyles which pops them into the `customStyles` scope variable
- return ret;
- }
-
- containerCtrl.header = $elm;
-
- var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0];
- if (headerViewport) {
- containerCtrl.headerViewport = headerViewport;
- }
-
- //todo: remove this if by injecting gridCtrl into unit tests
- if (uiGridCtrl) {
- uiGridCtrl.grid.registerStyleComputation({
- priority: 15,
- func: updateColumnWidths
- });
- }
- }
- };
- }
- };
- }]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.service('uiGridGridMenuService', [ 'gridUtil', 'i18nService', 'uiGridConstants', function( gridUtil, i18nService, uiGridConstants ) {
- /**
- * @ngdoc service
- * @name ui.grid.gridMenuService
- *
- * @description Methods for working with the grid menu
- */
-
- var service = {
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name initialize
- * @description Sets up the gridMenu. Most importantly, sets our
- * scope onto the grid object as grid.gridMenuScope, allowing us
- * to operate when passed only the grid. Second most importantly,
- * we register the 'addToGridMenu' and 'removeFromGridMenu' methods
- * on the core api.
- * @param {$scope} $scope the scope of this gridMenu
- * @param {Grid} grid the grid to which this gridMenu is associated
- */
- initialize: function( $scope, grid ){
- grid.gridMenuScope = $scope;
- $scope.grid = grid;
- $scope.registeredMenuItems = [];
-
- // not certain this is needed, but would be bad to create a memory leak
- $scope.$on('$destroy', function() {
- if ( $scope.grid && $scope.grid.gridMenuScope ){
- $scope.grid.gridMenuScope = null;
- }
- if ( $scope.grid ){
- $scope.grid = null;
- }
- if ( $scope.registeredMenuItems ){
- $scope.registeredMenuItems = null;
- }
- });
-
- $scope.registeredMenuItems = [];
-
- /**
- * @ngdoc function
- * @name addToGridMenu
- * @methodOf ui.grid.core.api:PublicApi
- * @description add items to the grid menu. Used by features
- * to add their menu items if they are enabled, can also be used by
- * end users to add menu items. This method has the advantage of allowing
- * remove again, which can simplify management of which items are included
- * in the menu when. (Noting that in most cases the shown and active functions
- * provide a better way to handle visibility of menu items)
- * @param {Grid} grid the grid on which we are acting
- * @param {array} items menu items in the format as described in the tutorial, with
- * the added note that if you want to use remove you must also specify an `id` field,
- * which is provided when you want to remove an item. The id should be unique.
- *
- */
- grid.api.registerMethod( 'core', 'addToGridMenu', service.addToGridMenu );
-
- /**
- * @ngdoc function
- * @name removeFromGridMenu
- * @methodOf ui.grid.core.api:PublicApi
- * @description Remove an item from the grid menu based on a provided id. Assumes
- * that the id is unique, removes only the last instance of that id. Does nothing if
- * the specified id is not found
- * @param {Grid} grid the grid on which we are acting
- * @param {string} id the id we'd like to remove from the menu
- *
- */
- grid.api.registerMethod( 'core', 'removeFromGridMenu', service.removeFromGridMenu );
- },
-
-
- /**
- * @ngdoc function
- * @name addToGridMenu
- * @propertyOf ui.grid.gridMenuService
- * @description add items to the grid menu. Used by features
- * to add their menu items if they are enabled, can also be used by
- * end users to add menu items. This method has the advantage of allowing
- * remove again, which can simplify management of which items are included
- * in the menu when. (Noting that in most cases the shown and active functions
- * provide a better way to handle visibility of menu items)
- * @param {Grid} grid the grid on which we are acting
- * @param {array} items menu items in the format as described in the tutorial, with
- * the added note that if you want to use remove you must also specify an `id` field,
- * which is provided when you want to remove an item. The id should be unique.
- *
- */
- addToGridMenu: function( grid, menuItems ) {
- if ( !angular.isArray( menuItems ) ) {
- gridUtil.logError( 'addToGridMenu: menuItems must be an array, and is not, not adding any items');
- } else {
- if ( grid.gridMenuScope ){
- grid.gridMenuScope.registeredMenuItems = grid.gridMenuScope.registeredMenuItems ? grid.gridMenuScope.registeredMenuItems : [];
- grid.gridMenuScope.registeredMenuItems = grid.gridMenuScope.registeredMenuItems.concat( menuItems );
- } else {
- gridUtil.logError( 'Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid');
- }
- }
- },
-
-
- /**
- * @ngdoc function
- * @name removeFromGridMenu
- * @methodOf ui.grid.gridMenuService
- * @description Remove an item from the grid menu based on a provided id. Assumes
- * that the id is unique, removes only the last instance of that id. Does nothing if
- * the specified id is not found. If there is no gridMenuScope or registeredMenuItems
- * then do nothing silently - the desired result is those menu items not be present and they
- * aren't.
- * @param {Grid} grid the grid on which we are acting
- * @param {string} id the id we'd like to remove from the menu
- *
- */
- removeFromGridMenu: function( grid, id ){
- var foundIndex = -1;
-
- if ( grid && grid.gridMenuScope ){
- grid.gridMenuScope.registeredMenuItems.forEach( function( value, index ) {
- if ( value.id === id ){
- if (foundIndex > -1) {
- gridUtil.logError( 'removeFromGridMenu: found multiple items with the same id, removing only the last' );
- } else {
-
- foundIndex = index;
- }
- }
- });
- }
-
- if ( foundIndex > -1 ){
- grid.gridMenuScope.registeredMenuItems.splice( foundIndex, 1 );
- }
- },
-
-
- /**
- * @ngdoc array
- * @name gridMenuCustomItems
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) An array of menu items that should be added to
- * the gridMenu. Follow the format documented in the tutorial for column
- * menu customisation. The context provided to the action function will
- * include context.grid. An alternative if working with dynamic menus is to use the
- * provided api - core.addToGridMenu and core.removeFromGridMenu, which handles
- * some of the management of items for you.
- *
- */
- /**
- * @ngdoc boolean
- * @name gridMenuShowHideColumns
- * @propertyOf ui.grid.class:GridOptions
- * @description true by default, whether the grid menu should allow hide/show
- * of columns
- *
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name getMenuItems
- * @description Decides the menu items to show in the menu. This is a
- * combination of:
- *
- * - the default menu items that are always included,
- * - any menu items that have been provided through the addMenuItem api. These
- * are typically added by features within the grid
- * - any menu items included in grid.options.gridMenuCustomItems. These can be
- * changed dynamically, as they're always recalculated whenever we show the
- * menu
- * @param {$scope} $scope the scope of this gridMenu, from which we can find all
- * the information that we need
- * @returns {array} an array of menu items that can be shown
- */
- getMenuItems: function( $scope ) {
- var menuItems = [
- // this is where we add any menu items we want to always include
- ];
-
- if ( $scope.grid.options.gridMenuCustomItems ){
- if ( !angular.isArray( $scope.grid.options.gridMenuCustomItems ) ){
- gridUtil.logError( 'gridOptions.gridMenuCustomItems must be an array, and is not');
- } else {
- menuItems = menuItems.concat( $scope.grid.options.gridMenuCustomItems );
- }
- }
-
- var clearFilters = [{
- title: i18nService.getSafeText('gridMenu.clearAllFilters'),
- action: function ($event) {
- $scope.grid.clearAllFilters();
- },
- shown: function() {
- return $scope.grid.options.enableFiltering;
- },
- order: 100
- }];
- menuItems = menuItems.concat( clearFilters );
-
- menuItems = menuItems.concat( $scope.registeredMenuItems );
-
- if ( $scope.grid.options.gridMenuShowHideColumns !== false ){
- menuItems = menuItems.concat( service.showHideColumns( $scope ) );
- }
-
- menuItems.sort(function(a, b){
- return a.order - b.order;
- });
-
- return menuItems;
- },
-
-
- /**
- * @ngdoc array
- * @name gridMenuTitleFilter
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) A function that takes a title string
- * (usually the col.displayName), and converts it into a display value. The function
- * must return either a string or a promise.
- *
- * Used for internationalization of the grid menu column names - for angular-translate
- * you can pass $translate as the function, for i18nService you can pass getSafeText as the
- * function
- * @example
- * <pre>
- * gridOptions = {
- * gridMenuTitleFilter: $translate
- * }
- * </pre>
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name showHideColumns
- * @description Adds two menu items for each of the columns in columnDefs. One
- * menu item for hide, one menu item for show. Each is visible when appropriate
- * (show when column is not visible, hide when column is visible). Each toggles
- * the visible property on the columnDef using toggleColumnVisibility
- * @param {$scope} $scope of a gridMenu, which contains a reference to the grid
- */
- showHideColumns: function( $scope ){
- var showHideColumns = [];
- if ( !$scope.grid.options.columnDefs || $scope.grid.options.columnDefs.length === 0 || $scope.grid.columns.length === 0 ) {
- return showHideColumns;
- }
-
- // add header for columns
- showHideColumns.push({
- title: i18nService.getSafeText('gridMenu.columns'),
- order: 300
- });
-
- $scope.grid.options.gridMenuTitleFilter = $scope.grid.options.gridMenuTitleFilter ? $scope.grid.options.gridMenuTitleFilter : function( title ) { return title; };
-
- $scope.grid.options.columnDefs.forEach( function( colDef, index ){
- if ( colDef.enableHiding !== false ){
- // add hide menu item - shows an OK icon as we only show when column is already visible
- var menuItem = {
- icon: 'ui-grid-icon-ok',
- action: function($event) {
- $event.stopPropagation();
- service.toggleColumnVisibility( this.context.gridCol );
- },
- shown: function() {
- return this.context.gridCol.colDef.visible === true || this.context.gridCol.colDef.visible === undefined;
- },
- context: { gridCol: $scope.grid.getColumn(colDef.name || colDef.field) },
- leaveOpen: true,
- order: 301 + index * 2
- };
- service.setMenuItemTitle( menuItem, colDef, $scope.grid );
- showHideColumns.push( menuItem );
-
- // add show menu item - shows no icon as we only show when column is invisible
- menuItem = {
- icon: 'ui-grid-icon-cancel',
- action: function($event) {
- $event.stopPropagation();
- service.toggleColumnVisibility( this.context.gridCol );
- },
- shown: function() {
- return !(this.context.gridCol.colDef.visible === true || this.context.gridCol.colDef.visible === undefined);
- },
- context: { gridCol: $scope.grid.getColumn(colDef.name || colDef.field) },
- leaveOpen: true,
- order: 301 + index * 2 + 1
- };
- service.setMenuItemTitle( menuItem, colDef, $scope.grid );
- showHideColumns.push( menuItem );
- }
- });
- return showHideColumns;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name setMenuItemTitle
- * @description Handles the response from gridMenuTitleFilter, adding it directly to the menu
- * item if it returns a string, otherwise waiting for the promise to resolve or reject then
- * putting the result into the title
- * @param {object} menuItem the menuItem we want to put the title on
- * @param {object} colDef the colDef from which we can get displayName, name or field
- * @param {Grid} grid the grid, from which we can get the options.gridMenuTitleFilter
- *
- */
- setMenuItemTitle: function( menuItem, colDef, grid ){
- var title = grid.options.gridMenuTitleFilter( colDef.displayName || gridUtil.readableColumnName(colDef.name) || colDef.field );
-
- if ( typeof(title) === 'string' ){
- menuItem.title = title;
- } else if ( title.then ){
- // must be a promise
- menuItem.title = "";
- title.then( function( successValue ) {
- menuItem.title = successValue;
- }, function( errorValue ) {
- menuItem.title = errorValue;
- });
- } else {
- gridUtil.logError('Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config');
- menuItem.title = 'badconfig';
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name toggleColumnVisibility
- * @description Toggles the visibility of an individual column. Expects to be
- * provided a context that has on it a gridColumn, which is the column that
- * we'll operate upon. We change the visibility, and refresh the grid as appropriate
- * @param {GridCol} gridCol the column that we want to toggle
- *
- */
- toggleColumnVisibility: function( gridCol ) {
- gridCol.colDef.visible = !( gridCol.colDef.visible === true || gridCol.colDef.visible === undefined );
-
- gridCol.grid.refresh();
- gridCol.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- gridCol.grid.api.core.raise.columnVisibilityChanged( gridCol );
- }
- };
-
- return service;
-}])
-
-
-
-.directive('uiGridMenuButton', ['gridUtil', 'uiGridConstants', 'uiGridGridMenuService', 'i18nService',
-function (gridUtil, uiGridConstants, uiGridGridMenuService, i18nService) {
-
- return {
- priority: 0,
- scope: true,
- require: ['^uiGrid'],
- templateUrl: 'ui-grid/ui-grid-menu-button',
- replace: true,
-
- link: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
-
- // For the aria label
- $scope.i18n = {
- aria: i18nService.getSafeText('gridMenu.aria')
- };
-
- uiGridGridMenuService.initialize($scope, uiGridCtrl.grid);
-
- $scope.shown = false;
-
- $scope.toggleMenu = function () {
- if ( $scope.shown ){
- $scope.$broadcast('hide-menu');
- $scope.shown = false;
- } else {
- $scope.menuItems = uiGridGridMenuService.getMenuItems( $scope );
- $scope.$broadcast('show-menu');
- $scope.shown = true;
- }
- };
-
- $scope.$on('menu-hidden', function() {
- $scope.shown = false;
- gridUtil.focus.bySelector($elm, '.ui-grid-icon-container');
- });
- }
- };
-
-}]);
-
-})();
-
-(function(){
-
-/**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridMenu
- * @element style
- * @restrict A
- *
- * @description
- * Allows us to interpolate expressions in `<style>` elements. Angular doesn't do this by default as it can/will/might? break in IE8.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
-
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <div ui-grid-menu shown="true" ></div>
- </div>
- </doc:source>
- <doc:scenario>
- </doc:scenario>
- </doc:example>
- */
-angular.module('ui.grid')
-
-.directive('uiGridMenu', ['$compile', '$timeout', '$window', '$document', 'gridUtil', 'uiGridConstants', 'i18nService',
-function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18nService) {
- var uiGridMenu = {
- priority: 0,
- scope: {
- // shown: '&',
- menuItems: '=',
- autoHide: '=?'
- },
- require: '?^uiGrid',
- templateUrl: 'ui-grid/uiGridMenu',
- replace: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- $scope.dynamicStyles = '';
- if (uiGridCtrl && uiGridCtrl.grid && uiGridCtrl.grid.options && uiGridCtrl.grid.options.gridMenuTemplate) {
- var gridMenuTemplate = uiGridCtrl.grid.options.gridMenuTemplate;
- gridUtil.getTemplate(gridMenuTemplate).then(function (contents) {
- var template = angular.element(contents);
- var newElm = $compile(template)($scope);
- $elm.replaceWith(newElm);
- });
- }
-
- var setupHeightStyle = function(gridHeight) {
- //menu appears under header row, so substract that height from it's total
- // additional 20px for general padding
- var gridMenuMaxHeight = gridHeight - uiGridCtrl.grid.headerHeight - 20;
- $scope.dynamicStyles = [
- '.grid' + uiGridCtrl.grid.id + ' .ui-grid-menu-mid {',
- 'max-height: ' + gridMenuMaxHeight + 'px;',
- '}'
- ].join(' ');
- };
-
- if (uiGridCtrl) {
- setupHeightStyle(uiGridCtrl.grid.gridHeight);
- uiGridCtrl.grid.api.core.on.gridDimensionChanged($scope, function(oldGridHeight, oldGridWidth, newGridHeight, newGridWidth) {
- setupHeightStyle(newGridHeight);
- });
- }
-
- $scope.i18n = {
- close: i18nService.getSafeText('columnMenu.close')
- };
-
- // *** Show/Hide functions ******
- $scope.showMenu = function(event, args) {
- if ( !$scope.shown ){
-
- /*
- * In order to animate cleanly we remove the ng-if, wait a digest cycle, then
- * animate the removal of the ng-hide. We can't successfully (so far as I can tell)
- * animate removal of the ng-if, as the menu items aren't there yet. And we don't want
- * to rely on ng-show only, as that leaves elements in the DOM that are needlessly evaluated
- * on scroll events.
- *
- * Note when testing animation that animations don't run on the tutorials. When debugging it looks
- * like they do, but angular has a default $animate provider that is just a stub, and that's what's
- * being called. ALso don't be fooled by the fact that your browser has actually loaded the
- * angular-translate.js, it's not using it. You need to test animations in an external application.
- */
- $scope.shown = true;
-
- $timeout( function() {
- $scope.shownMid = true;
- $scope.$emit('menu-shown');
- });
- } else if ( !$scope.shownMid ) {
- // we're probably doing a hide then show, so we don't need to wait for ng-if
- $scope.shownMid = true;
- $scope.$emit('menu-shown');
- }
-
- var docEventType = 'click';
- if (args && args.originalEvent && args.originalEvent.type && args.originalEvent.type === 'touchstart') {
- docEventType = args.originalEvent.type;
- }
-
- // Turn off an existing document click handler
- angular.element(document).off('click touchstart', applyHideMenu);
- $elm.off('keyup', checkKeyUp);
- $elm.off('keydown', checkKeyDown);
-
- // Turn on the document click handler, but in a timeout so it doesn't apply to THIS click if there is one
- $timeout(function() {
- angular.element(document).on(docEventType, applyHideMenu);
- $elm.on('keyup', checkKeyUp);
- $elm.on('keydown', checkKeyDown);
-
- });
- //automatically set the focus to the first button element in the now open menu.
- gridUtil.focus.bySelector($elm, 'button[type=button]', true);
- };
-
-
- $scope.hideMenu = function(event) {
- if ( $scope.shown ){
- /*
- * In order to animate cleanly we animate the addition of ng-hide, then use a $timeout to
- * set the ng-if (shown = false) after the animation runs. In theory we can cascade off the
- * callback on the addClass method, but it is very unreliable with unit tests for no discernable reason.
- *
- * The user may have clicked on the menu again whilst
- * we're waiting, so we check that the mid isn't shown before applying the ng-if.
- */
- $scope.shownMid = false;
- $timeout( function() {
- if ( !$scope.shownMid ){
- $scope.shown = false;
- $scope.$emit('menu-hidden');
- }
- }, 200);
- }
-
- angular.element(document).off('click touchstart', applyHideMenu);
- $elm.off('keyup', checkKeyUp);
- $elm.off('keydown', checkKeyDown);
- };
-
- $scope.$on('hide-menu', function (event, args) {
- $scope.hideMenu(event, args);
- });
-
- $scope.$on('show-menu', function (event, args) {
- $scope.showMenu(event, args);
- });
-
-
- // *** Auto hide when click elsewhere ******
- var applyHideMenu = function(){
- if ($scope.shown) {
- $scope.$apply(function () {
- $scope.hideMenu();
- });
- }
- };
-
- // close menu on ESC and keep tab cyclical
- var checkKeyUp = function(event) {
- if (event.keyCode === 27) {
- $scope.hideMenu();
- }
- };
-
- var checkKeyDown = function(event) {
- var setFocus = function(elm) {
- elm.focus();
- event.preventDefault();
- return false;
- };
- if (event.keyCode === 9) {
- var firstMenuItem, lastMenuItem;
- var menuItemButtons = $elm[0].querySelectorAll('button:not(.ng-hide)');
- if (menuItemButtons.length > 0) {
- firstMenuItem = menuItemButtons[0];
- lastMenuItem = menuItemButtons[menuItemButtons.length - 1];
- if (event.target === lastMenuItem && !event.shiftKey) {
- setFocus(firstMenuItem);
- } else if (event.target === firstMenuItem && event.shiftKey) {
- setFocus(lastMenuItem);
- }
- }
- }
- };
-
- if (typeof($scope.autoHide) === 'undefined' || $scope.autoHide === undefined) {
- $scope.autoHide = true;
- }
-
- if ($scope.autoHide) {
- angular.element($window).on('resize', applyHideMenu);
- }
-
- $scope.$on('$destroy', function unbindEvents() {
- angular.element($window).off('resize', applyHideMenu);
- angular.element(document).off('click touchstart', applyHideMenu);
- $elm.off('keyup', checkKeyUp);
- $elm.off('keydown', checkKeyDown);
- });
-
- if (uiGridCtrl) {
- $scope.$on('$destroy', uiGridCtrl.grid.api.core.on.scrollBegin($scope, applyHideMenu ));
- }
-
- $scope.$on('$destroy', $scope.$on(uiGridConstants.events.ITEM_DRAGGING, applyHideMenu ));
- }
- };
-
- return uiGridMenu;
-}])
-
-.directive('uiGridMenuItem', ['gridUtil', '$compile', 'i18nService', function (gridUtil, $compile, i18nService) {
- var uiGridMenuItem = {
- priority: 0,
- scope: {
- name: '=',
- active: '=',
- action: '=',
- icon: '=',
- shown: '=',
- context: '=',
- templateUrl: '=',
- leaveOpen: '=',
- screenReaderOnly: '='
- },
- require: ['?^uiGrid'],
- templateUrl: 'ui-grid/uiGridMenuItem',
- replace: false,
- compile: function() {
- return {
- pre: function ($scope, $elm) {
- if ($scope.templateUrl) {
- gridUtil.getTemplate($scope.templateUrl)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.replaceWith(newElm);
- });
- }
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
-
- // TODO(c0bra): validate that shown and active are functions if they're defined. An exception is already thrown above this though
- // if (typeof($scope.shown) !== 'undefined' && $scope.shown && typeof($scope.shown) !== 'function') {
- // throw new TypeError("$scope.shown is defined but not a function");
- // }
- if (typeof($scope.shown) === 'undefined' || $scope.shown === null) {
- $scope.shown = function() { return true; };
- }
-
- $scope.itemShown = function () {
- var context = {};
- if ($scope.context) {
- context.context = $scope.context;
- }
-
- if (typeof(uiGridCtrl) !== 'undefined' && uiGridCtrl) {
- context.grid = uiGridCtrl.grid;
- }
-
- return $scope.shown.call(context);
- };
-
- $scope.itemAction = function($event,title) {
- $event.stopPropagation();
-
- if (typeof($scope.action) === 'function') {
- var context = {};
-
- if ($scope.context) {
- context.context = $scope.context;
- }
-
- // Add the grid to the function call context if the uiGrid controller is present
- if (typeof(uiGridCtrl) !== 'undefined' && uiGridCtrl) {
- context.grid = uiGridCtrl.grid;
- }
-
- $scope.action.call(context, $event, title);
-
- if ( !$scope.leaveOpen ){
- $scope.$emit('hide-menu');
- } else {
- /*
- * XXX: Fix after column refactor
- * Ideally the focus would remain on the item.
- * However, since there are two menu items that have their 'show' property toggled instead. This is a quick fix.
- */
- gridUtil.focus.bySelector(angular.element(gridUtil.closestElm($elm, ".ui-grid-menu-items")), 'button[type=button]', true);
- }
- }
- };
-
- $scope.i18n = i18nService.get();
- }
- };
- }
- };
-
- return uiGridMenuItem;
-}]);
-
-})();
-
-(function(){
- 'use strict';
- /**
- * @ngdoc overview
- * @name ui.grid.directive:uiGridOneBind
- * @summary A group of directives that provide a one time bind to a dom element.
- * @description A group of directives that provide a one time bind to a dom element.
- * As one time bindings are not supported in Angular 1.2.* this directive provdes this capability.
- * This is done to reduce the number of watchers on the dom.
- * <br/>
- * <h2>Short Example ({@link ui.grid.directive:uiGridOneBindSrc ui-grid-one-bind-src})</h2>
- * <pre>
- <div ng-init="imageName = 'myImageDir.jpg'">
- <img ui-grid-one-bind-src="imageName"></img>
- </div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="imageName = 'myImageDir.jpg'">
- <img ui-grid-one-bind-src="imageName" src="myImageDir.jpg"></img>
- </div>
- </pre>
- </br>
- <h2>Short Example ({@link ui.grid.directive:uiGridOneBindText ui-grid-one-bind-text})</h2>
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-text="text"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-text="text">Add this text</div>
- </pre>
- </br>
- * <b>Note:</b> This behavior is slightly different for the {@link ui.grid.directive:uiGridOneBindIdGrid uiGridOneBindIdGrid}
- * and {@link ui.grid.directive:uiGridOneBindAriaLabelledbyGrid uiGridOneBindAriaLabelledbyGrid} directives.
- *
- */
- //https://github.com/joshkurz/Black-Belt-AngularJS-Directives/blob/master/directives/Optimization/oneBind.js
- var oneBinders = angular.module('ui.grid');
- angular.forEach([
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindSrc
- * @memberof ui.grid.directive:uiGridOneBind
- * @element img
- * @restrict A
- * @param {String} uiGridOneBindSrc The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the src dom tag.
- *
- */
- {tag: 'Src', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindText
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindText The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the text dom tag.
- */
- {tag: 'Text', method: 'text'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindHref
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindHref The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the href dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Href', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindClass
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindClass The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @param {Object} uiGridOneBindClass The object that you want to bind. At least one of the values in the object must be something other than null or undefined for the watcher to be removed.
- * this is to prevent the watcher from being removed before the scope is initialized.
- * @param {Array} uiGridOneBindClass An array of classes to bind to this element.
- * @description One time binding for the class dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Class', method: 'addClass'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindHtml
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindHtml The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the html method on a dom element. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Html', method: 'html'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAlt
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAlt The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the alt dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Alt', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindStyle
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindStyle The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the style dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Style', method: 'css'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindValue
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindValue The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the value dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Value', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindId
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindId The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the value dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Id', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindIdGrid
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindIdGrid The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the id dom tag.
- * <h1>Important Note!</h1>
- * If the id tag passed as a parameter does <b>not</b> contain the grid id as a substring
- * then the directive will search the scope and the parent controller (if it is a uiGridController) for the grid.id value.
- * If this value is found then it is appended to the begining of the id tag. If the grid is not found then the directive throws an error.
- * This is done in order to ensure uniqueness of id tags across the grid.
- * This is to prevent two grids in the same document having duplicate id tags.
- */
- {tag: 'Id', directiveName:'IdGrid', method: 'attr', appendGridId: true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindTitle
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindTitle The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the title dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Title', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaLabel
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAriaLabel The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-label dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- *<br/>
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-aria-label="text"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-aria-label="text" aria-label="Add this text"></div>
- </pre>
- */
- {tag: 'Label', method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaLabelledby
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAriaLabelledby The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-labelledby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby="anId"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby="anId" aria-labelledby="gridID32"></div>
- </pre>
- */
- {tag: 'Labelledby', method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaLabelledbyGrid
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAriaLabelledbyGrid The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-labelledby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- * Works somewhat like {@link ui.grid.directive:uiGridOneBindIdGrid} however this one supports a list of ids (seperated by a space) and will dynamically add the
- * grid id to each one.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby-grid="anId"></div>
- </pre>
- * Will become ([grid.id] will be replaced by the actual grid id):
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby-grid="anId" aria-labelledby-Grid="[grid.id]-gridID32"></div>
- </pre>
- */
- {tag: 'Labelledby', directiveName:'LabelledbyGrid', appendGridId:true, method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaDescribedby
- * @element ANY
- * @restrict A
- * @param {String} uiGridOneBindAriaDescribedby The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-describedby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby="anId"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby="anId" aria-describedby="gridID32"></div>
- </pre>
- */
- {tag: 'Describedby', method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaDescribedbyGrid
- * @element ANY
- * @restrict A
- * @param {String} uiGridOneBindAriaDescribedbyGrid The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-labelledby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- * Works somewhat like {@link ui.grid.directive:uiGridOneBindIdGrid} however this one supports a list of ids (seperated by a space) and will dynamically add the
- * grid id to each one.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby-grid="anId"></div>
- </pre>
- * Will become ([grid.id] will be replaced by the actual grid id):
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby-grid="anId" aria-describedby="[grid.id]-gridID32"></div>
- </pre>
- */
- {tag: 'Describedby', directiveName:'DescribedbyGrid', appendGridId:true, method: 'attr', aria:true}],
- function(v){
-
- var baseDirectiveName = 'uiGridOneBind';
- //If it is an aria tag then append the aria label seperately
- //This is done because the aria tags are formatted aria-* and the directive name can't have a '-' character in it.
- //If the diretiveName has to be overridden then it does so here. This is because the tag being modified and the directive sometimes don't match up.
- var directiveName = (v.aria ? baseDirectiveName + 'Aria' : baseDirectiveName) + (v.directiveName ? v.directiveName : v.tag);
- oneBinders.directive(directiveName, ['gridUtil', function(gridUtil){
- return {
- restrict: 'A',
- require: ['?uiGrid','?^uiGrid'],
- link: function(scope, iElement, iAttrs, controllers){
- /* Appends the grid id to the beginnig of the value. */
- var appendGridId = function(val){
- var grid; //Get an instance of the grid if its available
- //If its available in the scope then we don't need to try to find it elsewhere
- if (scope.grid) {
- grid = scope.grid;
- }
- //Another possible location to try to find the grid
- else if (scope.col && scope.col.grid){
- grid = scope.col.grid;
- }
- //Last ditch effort: Search through the provided controllers.
- else if (!controllers.some( //Go through the controllers till one has the element we need
- function(controller){
- if (controller && controller.grid) {
- grid = controller.grid;
- return true; //We've found the grid
- }
- })){
- //We tried our best to find it for you
- gridUtil.logError("["+directiveName+"] A valid grid could not be found to bind id. Are you using this directive " +
- "within the correct scope? Trying to generate id: [gridID]-" + val);
- throw new Error("No valid grid could be found");
- }
-
- if (grid){
- var idRegex = new RegExp(grid.id.toString());
- //If the grid id hasn't been appended already in the template declaration
- if (!idRegex.test(val)){
- val = grid.id.toString() + '-' + val;
- }
- }
- return val;
- };
-
- // The watch returns a function to remove itself.
- var rmWatcher = scope.$watch(iAttrs[directiveName], function(newV){
- if (newV){
- //If we are trying to add an id element then we also apply the grid id if it isn't already there
- if (v.appendGridId) {
- var newIdString = null;
- //Append the id to all of the new ids.
- angular.forEach( newV.split(' '), function(s){
- newIdString = (newIdString ? (newIdString + ' ') : '') + appendGridId(s);
- });
- newV = newIdString;
- }
-
- // Append this newValue to the dom element.
- switch (v.method) {
- case 'attr': //The attr method takes two paraams the tag and the value
- if (v.aria) {
- //If it is an aria element then append the aria prefix
- iElement[v.method]('aria-' + v.tag.toLowerCase(),newV);
- } else {
- iElement[v.method](v.tag.toLowerCase(),newV);
- }
- break;
- case 'addClass':
- //Pulled from https://github.com/Pasvaz/bindonce/blob/master/bindonce.js
- if (angular.isObject(newV) && !angular.isArray(newV)) {
- var results = [];
- var nonNullFound = false; //We don't want to remove the binding unless the key is actually defined
- angular.forEach(newV, function (value, index) {
- if (value !== null && typeof(value) !== "undefined"){
- nonNullFound = true; //A non null value for a key was found so the object must have been initialized
- if (value) {results.push(index);}
- }
- });
- //A non null value for a key wasn't found so assume that the scope values haven't been fully initialized
- if (!nonNullFound){
- return; // If not initialized then the watcher should not be removed yet.
- }
- newV = results;
- }
-
- if (newV) {
- iElement.addClass(angular.isArray(newV) ? newV.join(' ') : newV);
- } else {
- return;
- }
- break;
- default:
- iElement[v.method](newV);
- break;
- }
-
- //Removes the watcher on itself after the bind
- rmWatcher();
- }
- // True ensures that equality is determined using angular.equals instead of ===
- }, true); //End rm watchers
- } //End compile function
- }; //End directive return
- } // End directive function
- ]); //End directive
- }); // End angular foreach
-})();
-
-(function () {
- 'use strict';
-
- var module = angular.module('ui.grid');
-
- module.directive('uiGridRenderContainer', ['$timeout', '$document', 'uiGridConstants', 'gridUtil', 'ScrollEvent',
- function($timeout, $document, uiGridConstants, gridUtil, ScrollEvent) {
- return {
- replace: true,
- transclude: true,
- templateUrl: 'ui-grid/uiGridRenderContainer',
- require: ['^uiGrid', 'uiGridRenderContainer'],
- scope: {
- containerId: '=',
- rowContainerName: '=',
- colContainerName: '=',
- bindScrollHorizontal: '=',
- bindScrollVertical: '=',
- enableVerticalScrollbar: '=',
- enableHorizontalScrollbar: '='
- },
- controller: 'uiGridRenderContainer as RenderContainer',
- compile: function () {
- return {
- pre: function prelink($scope, $elm, $attrs, controllers) {
-
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
- var grid = $scope.grid = uiGridCtrl.grid;
-
- // Verify that the render container for this element exists
- if (!$scope.rowContainerName) {
- throw "No row render container name specified";
- }
- if (!$scope.colContainerName) {
- throw "No column render container name specified";
- }
-
- if (!grid.renderContainers[$scope.rowContainerName]) {
- throw "Row render container '" + $scope.rowContainerName + "' is not registered.";
- }
- if (!grid.renderContainers[$scope.colContainerName]) {
- throw "Column render container '" + $scope.colContainerName + "' is not registered.";
- }
-
- var rowContainer = $scope.rowContainer = grid.renderContainers[$scope.rowContainerName];
- var colContainer = $scope.colContainer = grid.renderContainers[$scope.colContainerName];
-
- containerCtrl.containerId = $scope.containerId;
- containerCtrl.rowContainer = rowContainer;
- containerCtrl.colContainer = colContainer;
- },
- post: function postlink($scope, $elm, $attrs, controllers) {
-
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- var grid = uiGridCtrl.grid;
- var rowContainer = containerCtrl.rowContainer;
- var colContainer = containerCtrl.colContainer;
- var scrollTop = null;
- var scrollLeft = null;
-
-
- var renderContainer = grid.renderContainers[$scope.containerId];
-
- // Put the container name on this element as a class
- $elm.addClass('ui-grid-render-container-' + $scope.containerId);
-
- // Scroll the render container viewport when the mousewheel is used
- gridUtil.on.mousewheel($elm, function (event) {
- var scrollEvent = new ScrollEvent(grid, rowContainer, colContainer, ScrollEvent.Sources.RenderContainerMouseWheel);
- if (event.deltaY !== 0) {
- var scrollYAmount = event.deltaY * -1 * event.deltaFactor;
-
- scrollTop = containerCtrl.viewport[0].scrollTop;
-
- // Get the scroll percentage
- scrollEvent.verticalScrollLength = rowContainer.getVerticalScrollLength();
- var scrollYPercentage = (scrollTop + scrollYAmount) / scrollEvent.verticalScrollLength;
-
- // If we should be scrolled 100%, make sure the scrollTop matches the maximum scroll length
- // Viewports that have "overflow: hidden" don't let the mousewheel scroll all the way to the bottom without this check
- if (scrollYPercentage >= 1 && scrollTop < scrollEvent.verticalScrollLength) {
- containerCtrl.viewport[0].scrollTop = scrollEvent.verticalScrollLength;
- }
-
- // Keep scrollPercentage within the range 0-1.
- if (scrollYPercentage < 0) { scrollYPercentage = 0; }
- else if (scrollYPercentage > 1) { scrollYPercentage = 1; }
-
- scrollEvent.y = { percentage: scrollYPercentage, pixels: scrollYAmount };
- }
- if (event.deltaX !== 0) {
- var scrollXAmount = event.deltaX * event.deltaFactor;
-
- // Get the scroll percentage
- scrollLeft = gridUtil.normalizeScrollLeft(containerCtrl.viewport, grid);
- scrollEvent.horizontalScrollLength = (colContainer.getCanvasWidth() - colContainer.getViewportWidth());
- var scrollXPercentage = (scrollLeft + scrollXAmount) / scrollEvent.horizontalScrollLength;
-
- // Keep scrollPercentage within the range 0-1.
- if (scrollXPercentage < 0) { scrollXPercentage = 0; }
- else if (scrollXPercentage > 1) { scrollXPercentage = 1; }
-
- scrollEvent.x = { percentage: scrollXPercentage, pixels: scrollXAmount };
- }
-
- // Let the parent container scroll if the grid is already at the top/bottom
- if ((event.deltaY !== 0 && (scrollEvent.atTop(scrollTop) || scrollEvent.atBottom(scrollTop))) ||
- (event.deltaX !== 0 && (scrollEvent.atLeft(scrollLeft) || scrollEvent.atRight(scrollLeft)))) {
- //parent controller scrolls
- }
- else {
- event.preventDefault();
- event.stopPropagation();
- scrollEvent.fireThrottledScrollingEvent('', scrollEvent);
- }
-
- });
-
- $elm.bind('$destroy', function() {
- $elm.unbind('keydown');
-
- ['touchstart', 'touchmove', 'touchend','keydown', 'wheel', 'mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'].forEach(function (eventName) {
- $elm.unbind(eventName);
- });
- });
-
- // TODO(c0bra): Handle resizing the inner canvas based on the number of elements
- function update() {
- var ret = '';
-
- var canvasWidth = colContainer.canvasWidth;
- var viewportWidth = colContainer.getViewportWidth();
-
- var canvasHeight = rowContainer.getCanvasHeight();
-
- //add additional height for scrollbar on left and right container
- //if ($scope.containerId !== 'body') {
- // canvasHeight -= grid.scrollbarHeight;
- //}
-
- var viewportHeight = rowContainer.getViewportHeight();
- //shorten the height to make room for a scrollbar placeholder
- if (colContainer.needsHScrollbarPlaceholder()) {
- viewportHeight -= grid.scrollbarHeight;
- }
-
- var headerViewportWidth,
- footerViewportWidth;
- headerViewportWidth = footerViewportWidth = colContainer.getHeaderViewportWidth();
-
- // Set canvas dimensions
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-canvas { width: ' + canvasWidth + 'px; height: ' + canvasHeight + 'px; }';
-
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-canvas { width: ' + (canvasWidth + grid.scrollbarWidth) + 'px; }';
-
- if (renderContainer.explicitHeaderCanvasHeight) {
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-canvas { height: ' + renderContainer.explicitHeaderCanvasHeight + 'px; }';
- }
- else {
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-canvas { height: inherit; }';
- }
-
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-viewport { width: ' + viewportWidth + 'px; height: ' + viewportHeight + 'px; }';
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-viewport { width: ' + headerViewportWidth + 'px; }';
-
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-footer-canvas { width: ' + (canvasWidth + grid.scrollbarWidth) + 'px; }';
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-footer-viewport { width: ' + footerViewportWidth + 'px; }';
-
- return ret;
- }
-
- uiGridCtrl.grid.registerStyleComputation({
- priority: 6,
- func: update
- });
- }
- };
- }
- };
-
- }]);
-
- module.controller('uiGridRenderContainer', ['$scope', 'gridUtil', function ($scope, gridUtil) {
-
- }]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridRow', ['gridUtil', function(gridUtil) {
- return {
- replace: true,
- // priority: 2001,
- // templateUrl: 'ui-grid/ui-grid-row',
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: {
- row: '=uiGridRow',
- //rowRenderIndex is added to scope to give the true visual index of the row to any directives that need it
- rowRenderIndex: '='
- },
- compile: function() {
- return {
- pre: function($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- var grid = uiGridCtrl.grid;
-
- $scope.grid = uiGridCtrl.grid;
- $scope.colContainer = containerCtrl.colContainer;
-
- // Function for attaching the template to this scope
- var clonedElement, cloneScope;
- function compileTemplate() {
- $scope.row.getRowTemplateFn.then(function (compiledElementFn) {
- // var compiledElementFn = $scope.row.compiledElementFn;
-
- // Create a new scope for the contents of this row, so we can destroy it later if need be
- var newScope = $scope.$new();
-
- compiledElementFn(newScope, function (newElm, scope) {
- // If we already have a cloned element, we need to remove it and destroy its scope
- if (clonedElement) {
- clonedElement.remove();
- cloneScope.$destroy();
- }
-
- // Empty the row and append the new element
- $elm.empty().append(newElm);
-
- // Save the new cloned element and scope
- clonedElement = newElm;
- cloneScope = newScope;
- });
- });
- }
-
- // Initially attach the compiled template to this scope
- compileTemplate();
-
- // If the row's compiled element function changes, we need to replace this element's contents with the new compiled template
- $scope.$watch('row.getRowTemplateFn', function (newFunc, oldFunc) {
- if (newFunc !== oldFunc) {
- compileTemplate();
- }
- });
- },
- post: function($scope, $elm, $attrs, controllers) {
-
- }
- };
- }
- };
- }]);
-
-})();
-(function(){
-// 'use strict';
-
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridStyle
- * @element style
- * @restrict A
- *
- * @description
- * Allows us to interpolate expressions in `<style>` elements. Angular doesn't do this by default as it can/will/might? break in IE8.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.myStyle = '.blah { border: 1px solid }';
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <style ui-grid-style>{{ myStyle }}</style>
- <span class="blah">I am in a box.</span>
- </div>
- </doc:source>
- <doc:scenario>
- it('should apply the right class to the element', function () {
- element(by.css('.blah')).getCssValue('border-top-width')
- .then(function(c) {
- expect(c).toContain('1px');
- });
- });
- </doc:scenario>
- </doc:example>
- */
-
-
- angular.module('ui.grid').directive('uiGridStyle', ['gridUtil', '$interpolate', function(gridUtil, $interpolate) {
- return {
- // restrict: 'A',
- // priority: 1000,
- // require: '?^uiGrid',
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- // gridUtil.logDebug('ui-grid-style link');
- // if (uiGridCtrl === undefined) {
- // gridUtil.logWarn('[ui-grid-style link] uiGridCtrl is undefined!');
- // }
-
- var interpolateFn = $interpolate($elm.text(), true);
-
- if (interpolateFn) {
- $scope.$watch(interpolateFn, function(value) {
- $elm.text(value);
- });
- }
-
- // uiGridCtrl.recalcRowStyles = function() {
- // var offset = (scope.options.offsetTop || 0) - (scope.options.excessRows * scope.options.rowHeight);
- // var rowHeight = scope.options.rowHeight;
-
- // var ret = '';
- // var rowStyleCount = uiGridCtrl.minRowsToRender() + (scope.options.excessRows * 2);
- // for (var i = 1; i <= rowStyleCount; i++) {
- // ret = ret + ' .grid' + scope.gridId + ' .ui-grid-row:nth-child(' + i + ') { top: ' + offset + 'px; }';
- // offset = offset + rowHeight;
- // }
-
- // scope.rowStyles = ret;
- // };
-
- // uiGridCtrl.styleComputions.push(uiGridCtrl.recalcRowStyles);
-
- }
- };
- }]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridViewport', ['gridUtil','ScrollEvent','uiGridConstants', '$log',
- function(gridUtil, ScrollEvent, uiGridConstants, $log) {
- return {
- replace: true,
- scope: {},
- controllerAs: 'Viewport',
- templateUrl: 'ui-grid/uiGridViewport',
- require: ['^uiGrid', '^uiGridRenderContainer'],
- link: function($scope, $elm, $attrs, controllers) {
- // gridUtil.logDebug('viewport post-link');
-
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- $scope.containerCtrl = containerCtrl;
-
- var rowContainer = containerCtrl.rowContainer;
- var colContainer = containerCtrl.colContainer;
-
- var grid = uiGridCtrl.grid;
-
- $scope.grid = uiGridCtrl.grid;
-
- // Put the containers in scope so we can get rows and columns from them
- $scope.rowContainer = containerCtrl.rowContainer;
- $scope.colContainer = containerCtrl.colContainer;
-
- // Register this viewport with its container
- containerCtrl.viewport = $elm;
-
- /**
- * @ngdoc function
- * @name customScroller
- * @methodOf ui.grid.class:GridOptions
- * @description (optional) uiGridViewport.on('scroll', scrollHandler) by default.
- * A function that allows you to provide your own scroller function. It is particularly helpful if you want to use third party scrollers
- * as this allows you to do that.
- *
- * <div class="alert alert-info" role="alert"> <strong>NOTE:</strong> It is important to remember to always pass in an event object to
- * the scrollHandler as the grid scrolling behavior will break without it.</div>
- * <h5>Example</h5>
- * <pre>
- * $scope.gridOptions = {
- * customScroller: function myScrolling(uiGridViewport, scrollHandler) {
- * uiGridViewport.on('scroll', function myScrollingOverride(event) {
- * // Do something here
- *
- * scrollHandler(event);
- * });
- * }
- * };
- * </pre>
- * @param {object} uiGridViewport Element being scrolled. (this gets passed in by the grid).
- * @param {function} scrollHandler Function that needs to be called when scrolling happens. (this gets passed in by the grid).
- */
- if (grid && grid.options && grid.options.customScroller) {
- grid.options.customScroller($elm, scrollHandler);
- } else {
- $elm.on('scroll', scrollHandler);
- }
-
- var ignoreScroll = false;
-
- function scrollHandler(evt) {
- //Leaving in this commented code in case it can someday be used
- //It does improve performance, but because the horizontal scroll is normalized,
- // using this code will lead to the column header getting slightly out of line with columns
- //
- //if (ignoreScroll && (grid.isScrollingHorizontally || grid.isScrollingHorizontally)) {
- // //don't ask for scrollTop if we just set it
- // ignoreScroll = false;
- // return;
- //}
- //ignoreScroll = true;
-
- var newScrollTop = $elm[0].scrollTop;
- var newScrollLeft = gridUtil.normalizeScrollLeft($elm, grid);
-
- var vertScrollPercentage = rowContainer.scrollVertical(newScrollTop);
- var horizScrollPercentage = colContainer.scrollHorizontal(newScrollLeft);
-
- var scrollEvent = new ScrollEvent(grid, rowContainer, colContainer, ScrollEvent.Sources.ViewPortScroll);
- scrollEvent.newScrollLeft = newScrollLeft;
- scrollEvent.newScrollTop = newScrollTop;
- if ( horizScrollPercentage > -1 ){
- scrollEvent.x = { percentage: horizScrollPercentage };
- }
-
- if ( vertScrollPercentage > -1 ){
- scrollEvent.y = { percentage: vertScrollPercentage };
- }
-
- grid.scrollContainers($scope.$parent.containerId, scrollEvent);
- }
-
- if ($scope.$parent.bindScrollVertical) {
- grid.addVerticalScrollSync($scope.$parent.containerId, syncVerticalScroll);
- }
-
- if ($scope.$parent.bindScrollHorizontal) {
- grid.addHorizontalScrollSync($scope.$parent.containerId, syncHorizontalScroll);
- grid.addHorizontalScrollSync($scope.$parent.containerId + 'header', syncHorizontalHeader);
- grid.addHorizontalScrollSync($scope.$parent.containerId + 'footer', syncHorizontalFooter);
- }
-
- function syncVerticalScroll(scrollEvent){
- containerCtrl.prevScrollArgs = scrollEvent;
- var newScrollTop = scrollEvent.getNewScrollTop(rowContainer,containerCtrl.viewport);
- $elm[0].scrollTop = newScrollTop;
-
- }
-
- function syncHorizontalScroll(scrollEvent){
- containerCtrl.prevScrollArgs = scrollEvent;
- var newScrollLeft = scrollEvent.getNewScrollLeft(colContainer, containerCtrl.viewport);
- $elm[0].scrollLeft = gridUtil.denormalizeScrollLeft(containerCtrl.viewport,newScrollLeft, grid);
- }
-
- function syncHorizontalHeader(scrollEvent){
- var newScrollLeft = scrollEvent.getNewScrollLeft(colContainer, containerCtrl.viewport);
- if (containerCtrl.headerViewport) {
- containerCtrl.headerViewport.scrollLeft = gridUtil.denormalizeScrollLeft(containerCtrl.viewport,newScrollLeft, grid);
- }
- }
-
- function syncHorizontalFooter(scrollEvent){
- var newScrollLeft = scrollEvent.getNewScrollLeft(colContainer, containerCtrl.viewport);
- if (containerCtrl.footerViewport) {
- containerCtrl.footerViewport.scrollLeft = gridUtil.denormalizeScrollLeft(containerCtrl.viewport,newScrollLeft, grid);
- }
- }
-
- $scope.$on('$destroy', function unbindEvents() {
- $elm.off();
- });
- },
- controller: ['$scope', function ($scope) {
- this.rowStyle = function (index) {
- var rowContainer = $scope.rowContainer;
- var colContainer = $scope.colContainer;
-
- var styles = {};
-
- if (rowContainer.currentTopRow !== 0){
- //top offset based on hidden rows count
- var translateY = "translateY("+ (rowContainer.currentTopRow * rowContainer.grid.options.rowHeight) +"px)";
- styles['transform'] = translateY;
- styles['-webkit-transform'] = translateY;
- styles['-ms-transform'] = translateY;
- }
-
- if (colContainer.currentFirstColumn !== 0) {
- if (colContainer.grid.isRTL()) {
- styles['margin-right'] = colContainer.columnOffset + 'px';
- }
- else {
- styles['margin-left'] = colContainer.columnOffset + 'px';
- }
- }
-
- return styles;
- };
- }]
- };
- }
- ]);
-
-})();
-
-(function() {
-
-angular.module('ui.grid')
-.directive('uiGridVisible', function uiGridVisibleAction() {
- return function ($scope, $elm, $attr) {
- $scope.$watch($attr.uiGridVisible, function (visible) {
- // $elm.css('visibility', visible ? 'visible' : 'hidden');
- $elm[visible ? 'removeClass' : 'addClass']('ui-grid-invisible');
- });
- };
-});
-
-})();
-(function () {
- 'use strict';
-
- angular.module('ui.grid').controller('uiGridController', ['$scope', '$element', '$attrs', 'gridUtil', '$q', 'uiGridConstants',
- '$templateCache', 'gridClassFactory', '$timeout', '$parse', '$compile',
- function ($scope, $elm, $attrs, gridUtil, $q, uiGridConstants,
- $templateCache, gridClassFactory, $timeout, $parse, $compile) {
- // gridUtil.logDebug('ui-grid controller');
-
- var self = this;
-
- self.grid = gridClassFactory.createGrid($scope.uiGrid);
-
- //assign $scope.$parent if appScope not already assigned
- self.grid.appScope = self.grid.appScope || $scope.$parent;
-
- $elm.addClass('grid' + self.grid.id);
- self.grid.rtl = gridUtil.getStyles($elm[0])['direction'] === 'rtl';
-
-
- // angular.extend(self.grid.options, );
-
- //all properties of grid are available on scope
- $scope.grid = self.grid;
-
- if ($attrs.uiGridColumns) {
- $attrs.$observe('uiGridColumns', function(value) {
- self.grid.options.columnDefs = value;
- self.grid.buildColumns()
- .then(function(){
- self.grid.preCompileCellTemplates();
-
- self.grid.refreshCanvas(true);
- });
- });
- }
-
-
- // if fastWatch is set we watch only the length and the reference, not every individual object
- var deregFunctions = [];
- if (self.grid.options.fastWatch) {
- self.uiGrid = $scope.uiGrid;
- if (angular.isString($scope.uiGrid.data)) {
- deregFunctions.push( $scope.$parent.$watch($scope.uiGrid.data, dataWatchFunction) );
- deregFunctions.push( $scope.$parent.$watch(function() {
- if ( self.grid.appScope[$scope.uiGrid.data] ){
- return self.grid.appScope[$scope.uiGrid.data].length;
- } else {
- return undefined;
- }
- }, dataWatchFunction) );
- } else {
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data; }, dataWatchFunction) );
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data.length; }, function(){ dataWatchFunction($scope.uiGrid.data); }) );
- }
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction) );
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs.length; }, function(){ columnDefsWatchFunction($scope.uiGrid.columnDefs); }) );
- } else {
- if (angular.isString($scope.uiGrid.data)) {
- deregFunctions.push( $scope.$parent.$watchCollection($scope.uiGrid.data, dataWatchFunction) );
- } else {
- deregFunctions.push( $scope.$parent.$watchCollection(function() { return $scope.uiGrid.data; }, dataWatchFunction) );
- }
- deregFunctions.push( $scope.$parent.$watchCollection(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction) );
- }
-
-
- function columnDefsWatchFunction(n, o) {
- if (n && n !== o) {
- self.grid.options.columnDefs = $scope.uiGrid.columnDefs;
- self.grid.buildColumns({ orderByColumnDefs: true })
- .then(function(){
-
- self.grid.preCompileCellTemplates();
-
- self.grid.callDataChangeCallbacks(uiGridConstants.dataChange.COLUMN);
- });
- }
- }
-
- var mostRecentData;
-
- function dataWatchFunction(newData) {
- // gridUtil.logDebug('dataWatch fired');
- var promises = [];
-
- if ( self.grid.options.fastWatch ){
- if (angular.isString($scope.uiGrid.data)) {
- newData = self.grid.appScope[$scope.uiGrid.data];
- } else {
- newData = $scope.uiGrid.data;
- }
- }
-
- mostRecentData = newData;
-
- if (newData) {
- // columns length is greater than the number of row header columns, which don't count because they're created automatically
- var hasColumns = self.grid.columns.length > (self.grid.rowHeaderColumns ? self.grid.rowHeaderColumns.length : 0);
-
- if (
- // If we have no columns
- !hasColumns &&
- // ... and we don't have a ui-grid-columns attribute, which would define columns for us
- !$attrs.uiGridColumns &&
- // ... and we have no pre-defined columns
- self.grid.options.columnDefs.length === 0 &&
- // ... but we DO have data
- newData.length > 0
- ) {
- // ... then build the column definitions from the data that we have
- self.grid.buildColumnDefsFromData(newData);
- }
-
- // If we haven't built columns before and either have some columns defined or some data defined
- if (!hasColumns && (self.grid.options.columnDefs.length > 0 || newData.length > 0)) {
- // Build the column set, then pre-compile the column cell templates
- promises.push(self.grid.buildColumns()
- .then(function() {
- self.grid.preCompileCellTemplates();
- }));
- }
-
- $q.all(promises).then(function() {
- // use most recent data, rather than the potentially outdated data passed into watcher handler
- self.grid.modifyRows(mostRecentData)
- .then(function () {
- // if (self.viewport) {
- self.grid.redrawInPlace(true);
- // }
-
- $scope.$evalAsync(function() {
- self.grid.refreshCanvas(true);
- self.grid.callDataChangeCallbacks(uiGridConstants.dataChange.ROW);
- });
- });
- });
- }
- }
-
- var styleWatchDereg = $scope.$watch(function () { return self.grid.styleComputations; }, function() {
- self.grid.refreshCanvas(true);
- });
-
- $scope.$on('$destroy', function() {
- deregFunctions.forEach( function( deregFn ){ deregFn(); });
- styleWatchDereg();
- });
-
- self.fireEvent = function(eventName, args) {
- // Add the grid to the event arguments if it's not there
- if (typeof(args) === 'undefined' || args === undefined) {
- args = {};
- }
-
- if (typeof(args.grid) === 'undefined' || args.grid === undefined) {
- args.grid = self.grid;
- }
-
- $scope.$broadcast(eventName, args);
- };
-
- self.innerCompile = function innerCompile(elm) {
- $compile(elm)($scope);
- };
-
- }]);
-
-/**
- * @ngdoc directive
- * @name ui.grid.directive:uiGrid
- * @element div
- * @restrict EA
- * @param {Object} uiGrid Options for the grid to use
- *
- * @description Create a very basic grid.
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data }"></div>
- </div>
- </file>
- </example>
- */
-angular.module('ui.grid').directive('uiGrid', uiGridDirective);
-
-uiGridDirective.$inject = ['$compile', '$templateCache', '$timeout', '$window', 'gridUtil', 'uiGridConstants'];
-function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil, uiGridConstants) {
- return {
- templateUrl: 'ui-grid/ui-grid',
- scope: {
- uiGrid: '='
- },
- replace: true,
- transclude: true,
- controller: 'uiGridController',
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- var grid = uiGridCtrl.grid;
- // Initialize scrollbars (TODO: move to controller??)
- uiGridCtrl.scrollbars = [];
- grid.element = $elm;
-
-
- // See if the grid has a rendered width, if not, wait a bit and try again
- var sizeCheckInterval = 100; // ms
- var maxSizeChecks = 20; // 2 seconds total
- var sizeChecks = 0;
-
- // Setup (event listeners) the grid
- setup();
-
- // And initialize it
- init();
-
- // Mark rendering complete so API events can happen
- grid.renderingComplete();
-
- // If the grid doesn't have size currently, wait for a bit to see if it gets size
- checkSize();
-
- /*-- Methods --*/
-
- function checkSize() {
- // If the grid has no width and we haven't checked more than <maxSizeChecks> times, check again in <sizeCheckInterval> milliseconds
- if ($elm[0].offsetWidth <= 0 && sizeChecks < maxSizeChecks) {
- setTimeout(checkSize, sizeCheckInterval);
- sizeChecks++;
- }
- else {
- $timeout(init);
- }
- }
-
- // Setup event listeners and watchers
- function setup() {
- // Bind to window resize events
- angular.element($window).on('resize', gridResize);
-
- // Unbind from window resize events when the grid is destroyed
- $elm.on('$destroy', function () {
- angular.element($window).off('resize', gridResize);
- });
-
- // If we add a left container after render, we need to watch and react
- $scope.$watch(function () { return grid.hasLeftContainer();}, function (newValue, oldValue) {
- if (newValue === oldValue) {
- return;
- }
- grid.refreshCanvas(true);
- });
-
- // If we add a right container after render, we need to watch and react
- $scope.$watch(function () { return grid.hasRightContainer();}, function (newValue, oldValue) {
- if (newValue === oldValue) {
- return;
- }
- grid.refreshCanvas(true);
- });
- }
-
- // Initialize the directive
- function init() {
- grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm);
-
- // Default canvasWidth to the grid width, in case we don't get any column definitions to calculate it from
- grid.canvasWidth = uiGridCtrl.grid.gridWidth;
-
- grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
-
- // If the grid isn't tall enough to fit a single row, it's kind of useless. Resize it to fit a minimum number of rows
- if (grid.gridHeight <= grid.options.rowHeight && grid.options.enableMinHeightCheck) {
- autoAdjustHeight();
- }
-
- // Run initial canvas refresh
- grid.refreshCanvas(true);
- }
-
- // Set the grid's height ourselves in the case that its height would be unusably small
- function autoAdjustHeight() {
- // Figure out the new height
- var contentHeight = grid.options.minRowsToShow * grid.options.rowHeight;
- var headerHeight = grid.options.showHeader ? grid.options.headerRowHeight : 0;
- var footerHeight = grid.calcFooterHeight();
-
- var scrollbarHeight = 0;
- if (grid.options.enableHorizontalScrollbar === uiGridConstants.scrollbars.ALWAYS) {
- scrollbarHeight = gridUtil.getScrollbarWidth();
- }
-
- var maxNumberOfFilters = 0;
- // Calculates the maximum number of filters in the columns
- angular.forEach(grid.options.columnDefs, function(col) {
- if (col.hasOwnProperty('filter')) {
- if (maxNumberOfFilters < 1) {
- maxNumberOfFilters = 1;
- }
- }
- else if (col.hasOwnProperty('filters')) {
- if (maxNumberOfFilters < col.filters.length) {
- maxNumberOfFilters = col.filters.length;
- }
- }
- });
-
- if (grid.options.enableFiltering && !maxNumberOfFilters) {
- var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.length && grid.options.columnDefs.every(function(col) {
- return col.enableFiltering === false;
- });
-
- if (!allColumnsHaveFilteringTurnedOff) {
- maxNumberOfFilters = 1;
- }
- }
-
- var filterHeight = maxNumberOfFilters * headerHeight;
-
- var newHeight = headerHeight + contentHeight + footerHeight + scrollbarHeight + filterHeight;
-
- $elm.css('height', newHeight + 'px');
-
- grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
- }
-
- // Resize the grid on window resize events
- function gridResize($event) {
- grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm);
- grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
-
- grid.refreshCanvas(true);
- }
- }
- };
- }
- };
-}
-
-})();
-
-(function(){
- 'use strict';
-
- // TODO: rename this file to ui-grid-pinned-container.js
-
- angular.module('ui.grid').directive('uiGridPinnedContainer', ['gridUtil', function (gridUtil) {
- return {
- restrict: 'EA',
- replace: true,
- template: '<div class="ui-grid-pinned-container"><div ui-grid-render-container container-id="side" row-container-name="\'body\'" col-container-name="side" bind-scroll-vertical="true" class="{{ side }} ui-grid-render-container-{{ side }}"></div></div>',
- scope: {
- side: '=uiGridPinnedContainer'
- },
- require: '^uiGrid',
- compile: function compile() {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- // gridUtil.logDebug('ui-grid-pinned-container ' + $scope.side + ' link');
-
- var grid = uiGridCtrl.grid;
-
- var myWidth = 0;
-
- $elm.addClass('ui-grid-pinned-container-' + $scope.side);
-
- // Monkey-patch the viewport width function
- if ($scope.side === 'left' || $scope.side === 'right') {
- grid.renderContainers[$scope.side].getViewportWidth = monkeyPatchedGetViewportWidth;
- }
-
- function monkeyPatchedGetViewportWidth() {
- /*jshint validthis: true */
- var self = this;
-
- var viewportWidth = 0;
- self.visibleColumnCache.forEach(function (column) {
- viewportWidth += column.drawnWidth;
- });
-
- var adjustment = self.getViewportAdjustment();
-
- viewportWidth = viewportWidth + adjustment.width;
-
- return viewportWidth;
- }
-
- function updateContainerWidth() {
- if ($scope.side === 'left' || $scope.side === 'right') {
- var cols = grid.renderContainers[$scope.side].visibleColumnCache;
- var width = 0;
- for (var i = 0; i < cols.length; i++) {
- var col = cols[i];
- width += col.drawnWidth || col.width || 0;
- }
-
- return width;
- }
- }
-
- function updateContainerDimensions() {
- var ret = '';
-
- // Column containers
- if ($scope.side === 'left' || $scope.side === 'right') {
- myWidth = updateContainerWidth();
-
- // gridUtil.logDebug('myWidth', myWidth);
-
- // TODO(c0bra): Subtract sum of col widths from grid viewport width and update it
- $elm.attr('style', null);
-
- // var myHeight = grid.renderContainers.body.getViewportHeight(); // + grid.horizontalScrollbarHeight;
-
- ret += '.grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ', .grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ' .ui-grid-render-container-' + $scope.side + ' .ui-grid-viewport { width: ' + myWidth + 'px; } ';
- }
-
- return ret;
- }
-
- grid.renderContainers.body.registerViewportAdjuster(function (adjustment) {
- myWidth = updateContainerWidth();
-
- // Subtract our own width
- adjustment.width -= myWidth;
- adjustment.side = $scope.side;
-
- return adjustment;
- });
-
- // Register style computation to adjust for columns in `side`'s render container
- grid.registerStyleComputation({
- priority: 15,
- func: updateContainerDimensions
- });
- }
- };
- }
- };
- }]);
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.factory('Grid', ['$q', '$compile', '$parse', 'gridUtil', 'uiGridConstants', 'GridOptions', 'GridColumn', 'GridRow', 'GridApi', 'rowSorter', 'rowSearcher', 'GridRenderContainer', '$timeout','ScrollEvent',
- function($q, $compile, $parse, gridUtil, uiGridConstants, GridOptions, GridColumn, GridRow, GridApi, rowSorter, rowSearcher, GridRenderContainer, $timeout, ScrollEvent) {
-
- /**
- * @ngdoc object
- * @name ui.grid.core.api:PublicApi
- * @description Public Api for the core grid features
- *
- */
-
- /**
- * @ngdoc function
- * @name ui.grid.class:Grid
- * @description Grid is the main viewModel. Any properties or methods needed to maintain state are defined in
- * this prototype. One instance of Grid is created per Grid directive instance.
- * @param {object} options Object map of options to pass into the grid. An 'id' property is expected.
- */
- var Grid = function Grid(options) {
- var self = this;
- // Get the id out of the options, then remove it
- if (options !== undefined && typeof(options.id) !== 'undefined' && options.id) {
- if (!/^[_a-zA-Z0-9-]+$/.test(options.id)) {
- throw new Error("Grid id '" + options.id + '" is invalid. It must follow CSS selector syntax rules.');
- }
- }
- else {
- throw new Error('No ID provided. An ID must be given when creating a grid.');
- }
-
- self.id = options.id;
- delete options.id;
-
- // Get default options
- self.options = GridOptions.initialize( options );
-
- /**
- * @ngdoc object
- * @name appScope
- * @propertyOf ui.grid.class:Grid
- * @description reference to the application scope (the parent scope of the ui-grid element). Assigned in ui-grid controller
- * <br/>
- * use gridOptions.appScopeProvider to override the default assignment of $scope.$parent with any reference
- */
- self.appScope = self.options.appScopeProvider;
-
- self.headerHeight = self.options.headerRowHeight;
-
-
- /**
- * @ngdoc object
- * @name footerHeight
- * @propertyOf ui.grid.class:Grid
- * @description returns the total footer height gridFooter + columnFooter
- */
- self.footerHeight = self.calcFooterHeight();
-
-
- /**
- * @ngdoc object
- * @name columnFooterHeight
- * @propertyOf ui.grid.class:Grid
- * @description returns the total column footer height
- */
- self.columnFooterHeight = self.calcColumnFooterHeight();
-
- self.rtl = false;
- self.gridHeight = 0;
- self.gridWidth = 0;
- self.columnBuilders = [];
- self.rowBuilders = [];
- self.rowsProcessors = [];
- self.columnsProcessors = [];
- self.styleComputations = [];
- self.viewportAdjusters = [];
- self.rowHeaderColumns = [];
- self.dataChangeCallbacks = {};
- self.verticalScrollSyncCallBackFns = {};
- self.horizontalScrollSyncCallBackFns = {};
-
- // self.visibleRowCache = [];
-
- // Set of 'render' containers for self grid, which can render sets of rows
- self.renderContainers = {};
-
- // Create a
- self.renderContainers.body = new GridRenderContainer('body', self);
-
- self.cellValueGetterCache = {};
-
- // Cached function to use with custom row templates
- self.getRowTemplateFn = null;
-
-
- //representation of the rows on the grid.
- //these are wrapped references to the actual data rows (options.data)
- self.rows = [];
-
- //represents the columns on the grid
- self.columns = [];
-
- /**
- * @ngdoc boolean
- * @name isScrollingVertically
- * @propertyOf ui.grid.class:Grid
- * @description set to true when Grid is scrolling vertically. Set to false via debounced method
- */
- self.isScrollingVertically = false;
-
- /**
- * @ngdoc boolean
- * @name isScrollingHorizontally
- * @propertyOf ui.grid.class:Grid
- * @description set to true when Grid is scrolling horizontally. Set to false via debounced method
- */
- self.isScrollingHorizontally = false;
-
- /**
- * @ngdoc property
- * @name scrollDirection
- * @propertyOf ui.grid.class:Grid
- * @description set one of the {@link ui.grid.service:uiGridConstants#properties_scrollDirection uiGridConstants.scrollDirection}
- * values (UP, DOWN, LEFT, RIGHT, NONE), which tells us which direction we are scrolling.
- * Set to NONE via debounced method
- */
- self.scrollDirection = uiGridConstants.scrollDirection.NONE;
-
- //if true, grid will not respond to any scroll events
- self.disableScrolling = false;
-
-
- function vertical (scrollEvent) {
- self.isScrollingVertically = false;
- self.api.core.raise.scrollEnd(scrollEvent);
- self.scrollDirection = uiGridConstants.scrollDirection.NONE;
- }
-
- var debouncedVertical = gridUtil.debounce(vertical, self.options.scrollDebounce);
- var debouncedVerticalMinDelay = gridUtil.debounce(vertical, 0);
-
- function horizontal (scrollEvent) {
- self.isScrollingHorizontally = false;
- self.api.core.raise.scrollEnd(scrollEvent);
- self.scrollDirection = uiGridConstants.scrollDirection.NONE;
- }
-
- var debouncedHorizontal = gridUtil.debounce(horizontal, self.options.scrollDebounce);
- var debouncedHorizontalMinDelay = gridUtil.debounce(horizontal, 0);
-
-
- /**
- * @ngdoc function
- * @name flagScrollingVertically
- * @methodOf ui.grid.class:Grid
- * @description sets isScrollingVertically to true and sets it to false in a debounced function
- */
- self.flagScrollingVertically = function(scrollEvent) {
- if (!self.isScrollingVertically && !self.isScrollingHorizontally) {
- self.api.core.raise.scrollBegin(scrollEvent);
- }
- self.isScrollingVertically = true;
- if (self.options.scrollDebounce === 0 || !scrollEvent.withDelay) {
- debouncedVerticalMinDelay(scrollEvent);
- }
- else {
- debouncedVertical(scrollEvent);
- }
- };
-
- /**
- * @ngdoc function
- * @name flagScrollingHorizontally
- * @methodOf ui.grid.class:Grid
- * @description sets isScrollingHorizontally to true and sets it to false in a debounced function
- */
- self.flagScrollingHorizontally = function(scrollEvent) {
- if (!self.isScrollingVertically && !self.isScrollingHorizontally) {
- self.api.core.raise.scrollBegin(scrollEvent);
- }
- self.isScrollingHorizontally = true;
- if (self.options.scrollDebounce === 0 || !scrollEvent.withDelay) {
- debouncedHorizontalMinDelay(scrollEvent);
- }
- else {
- debouncedHorizontal(scrollEvent);
- }
- };
-
- self.scrollbarHeight = 0;
- self.scrollbarWidth = 0;
- if (self.options.enableHorizontalScrollbar === uiGridConstants.scrollbars.ALWAYS) {
- self.scrollbarHeight = gridUtil.getScrollbarWidth();
- }
-
- if (self.options.enableVerticalScrollbar === uiGridConstants.scrollbars.ALWAYS) {
- self.scrollbarWidth = gridUtil.getScrollbarWidth();
- }
-
-
-
- self.api = new GridApi(self);
-
- /**
- * @ngdoc function
- * @name refresh
- * @methodOf ui.grid.core.api:PublicApi
- * @description Refresh the rendered grid on screen.
- * The refresh method re-runs both the columnProcessors and the
- * rowProcessors, as well as calling refreshCanvas to update all
- * the grid sizing. In general you should prefer to use queueGridRefresh
- * instead, which is basically a debounced version of refresh.
- *
- * If you only want to resize the grid, not regenerate all the rows
- * and columns, you should consider directly calling refreshCanvas instead.
- *
- * @param {boolean} [rowsAltered] Optional flag for refreshing when the number of rows has changed
- */
- self.api.registerMethod( 'core', 'refresh', this.refresh );
-
- /**
- * @ngdoc function
- * @name queueGridRefresh
- * @methodOf ui.grid.core.api:PublicApi
- * @description Request a refresh of the rendered grid on screen, if multiple
- * calls to queueGridRefresh are made within a digest cycle only one will execute.
- * The refresh method re-runs both the columnProcessors and the
- * rowProcessors, as well as calling refreshCanvas to update all
- * the grid sizing. In general you should prefer to use queueGridRefresh
- * instead, which is basically a debounced version of refresh.
- *
- */
- self.api.registerMethod( 'core', 'queueGridRefresh', this.queueGridRefresh );
-
- /**
- * @ngdoc function
- * @name refreshRows
- * @methodOf ui.grid.core.api:PublicApi
- * @description Runs only the rowProcessors, columns remain as they were.
- * It then calls redrawInPlace and refreshCanvas, which adjust the grid sizing.
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- self.api.registerMethod( 'core', 'refreshRows', this.refreshRows );
-
- /**
- * @ngdoc function
- * @name queueRefresh
- * @methodOf ui.grid.core.api:PublicApi
- * @description Requests execution of refreshCanvas, if multiple requests are made
- * during a digest cycle only one will run. RefreshCanvas updates the grid sizing.
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- self.api.registerMethod( 'core', 'queueRefresh', this.queueRefresh );
-
- /**
- * @ngdoc function
- * @name handleWindowResize
- * @methodOf ui.grid.core.api:PublicApi
- * @description Trigger a grid resize, normally this would be picked
- * up by a watch on window size, but in some circumstances it is necessary
- * to call this manually
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- self.api.registerMethod( 'core', 'handleWindowResize', this.handleWindowResize );
-
-
- /**
- * @ngdoc function
- * @name addRowHeaderColumn
- * @methodOf ui.grid.core.api:PublicApi
- * @description adds a row header column to the grid
- * @param {object} column def
- * @param {number} order Determines order of header column on grid. Lower order means header
- * is positioned to the left of higher order headers
- *
- */
- self.api.registerMethod( 'core', 'addRowHeaderColumn', this.addRowHeaderColumn );
-
- /**
- * @ngdoc function
- * @name scrollToIfNecessary
- * @methodOf ui.grid.core.api:PublicApi
- * @description Scrolls the grid to make a certain row and column combo visible,
- * in the case that it is not completely visible on the screen already.
- * @param {GridRow} gridRow row to make visible
- * @param {GridCol} gridCol column to make visible
- * @returns {promise} a promise that is resolved when scrolling is complete
- *
- */
- self.api.registerMethod( 'core', 'scrollToIfNecessary', function(gridRow, gridCol) { return self.scrollToIfNecessary(gridRow, gridCol);} );
-
- /**
- * @ngdoc function
- * @name scrollTo
- * @methodOf ui.grid.core.api:PublicApi
- * @description Scroll the grid such that the specified
- * row and column is in view
- * @param {object} rowEntity gridOptions.data[] array instance to make visible
- * @param {object} colDef to make visible
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- self.api.registerMethod( 'core', 'scrollTo', function (rowEntity, colDef) { return self.scrollTo(rowEntity, colDef);} );
-
- /**
- * @ngdoc function
- * @name registerRowsProcessor
- * @methodOf ui.grid.core.api:PublicApi
- * @description
- * Register a "rows processor" function. When the rows are updated,
- * the grid calls each registered "rows processor", which has a chance
- * to alter the set of rows (sorting, etc) as long as the count is not
- * modified.
- *
- * @param {function(renderedRowsToProcess, columns )} processorFunction rows processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and must
- * return the updated rows list, which is passed to the next processor in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject rows processors at intermediate priorities. Lower priority rowsProcessors run earlier.
- *
- * At present allRowsVisible is running at 50, sort manipulations running at 60-65, filter is running at 100,
- * sort is at 200, grouping and treeview at 400-410, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- */
- self.api.registerMethod( 'core', 'registerRowsProcessor', this.registerRowsProcessor );
-
- /**
- * @ngdoc function
- * @name registerColumnsProcessor
- * @methodOf ui.grid.core.api:PublicApi
- * @description
- * Register a "columns processor" function. When the columns are updated,
- * the grid calls each registered "columns processor", which has a chance
- * to alter the set of columns as long as the count is not
- * modified.
- *
- * @param {function(renderedColumnsToProcess, rows )} processorFunction columns processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and must
- * return the updated columns list, which is passed to the next processor in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject columns processors at intermediate priorities. Lower priority columnsProcessors run earlier.
- *
- * At present allRowsVisible is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- */
- self.api.registerMethod( 'core', 'registerColumnsProcessor', this.registerColumnsProcessor );
-
-
-
- /**
- * @ngdoc function
- * @name sortHandleNulls
- * @methodOf ui.grid.core.api:PublicApi
- * @description A null handling method that can be used when building custom sort
- * functions
- * @example
- * <pre>
- * mySortFn = function(a, b) {
- * var nulls = $scope.gridApi.core.sortHandleNulls(a, b);
- * if ( nulls !== null ){
- * return nulls;
- * } else {
- * // your code for sorting here
- * };
- * </pre>
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} null if there were no nulls/undefineds, otherwise returns
- * a sort value that should be passed back from the sort function
- *
- */
- self.api.registerMethod( 'core', 'sortHandleNulls', rowSorter.handleNulls );
-
-
- /**
- * @ngdoc function
- * @name sortChanged
- * @methodOf ui.grid.core.api:PublicApi
- * @description The sort criteria on one or more columns has
- * changed. Provides as parameters the grid and the output of
- * getColumnSorting, which is an array of gridColumns
- * that have sorting on them, sorted in priority order.
- *
- * @param {$scope} scope The scope of the controller. This is used to deregister this event when the scope is destroyed.
- * @param {Function} callBack Will be called when the event is emited. The function passes back the grid and an array of
- * columns with sorts on them, in priority order.
- *
- * @example
- * <pre>
- * gridApi.core.on.sortChanged( $scope, function(grid, sortColumns){
- * // do something
- * });
- * </pre>
- */
- self.api.registerEvent( 'core', 'sortChanged' );
-
- /**
- * @ngdoc function
- * @name columnVisibilityChanged
- * @methodOf ui.grid.core.api:PublicApi
- * @description The visibility of a column has changed,
- * the column itself is passed out as a parameter of the event.
- *
- * @param {$scope} scope The scope of the controller. This is used to deregister this event when the scope is destroyed.
- * @param {Function} callBack Will be called when the event is emited. The function passes back the GridCol that has changed.
- *
- * @example
- * <pre>
- * gridApi.core.on.columnVisibilityChanged( $scope, function (column) {
- * // do something
- * } );
- * </pre>
- */
- self.api.registerEvent( 'core', 'columnVisibilityChanged' );
-
- /**
- * @ngdoc method
- * @name notifyDataChange
- * @methodOf ui.grid.core.api:PublicApi
- * @description Notify the grid that a data or config change has occurred,
- * where that change isn't something the grid was otherwise noticing. This
- * might be particularly relevant where you've changed values within the data
- * and you'd like cell classes to be re-evaluated, or changed config within
- * the columnDef and you'd like headerCellClasses to be re-evaluated.
- * @param {string} type one of the
- * {@link ui.grid.service:uiGridConstants#properties_dataChange uiGridConstants.dataChange}
- * values (ALL, ROW, EDIT, COLUMN), which tells us which refreshes to fire.
- *
- */
- self.api.registerMethod( 'core', 'notifyDataChange', this.notifyDataChange );
-
- /**
- * @ngdoc method
- * @name clearAllFilters
- * @methodOf ui.grid.core.api:PublicApi
- * @description Clears all filters and optionally refreshes the visible rows.
- * @param {object} refreshRows Defaults to true.
- * @param {object} clearConditions Defaults to false.
- * @param {object} clearFlags Defaults to false.
- * @returns {promise} If `refreshRows` is true, returns a promise of the rows refreshing.
- */
- self.api.registerMethod('core', 'clearAllFilters', this.clearAllFilters);
-
- self.registerDataChangeCallback( self.columnRefreshCallback, [uiGridConstants.dataChange.COLUMN]);
- self.registerDataChangeCallback( self.processRowsCallback, [uiGridConstants.dataChange.EDIT]);
- self.registerDataChangeCallback( self.updateFooterHeightCallback, [uiGridConstants.dataChange.OPTIONS]);
-
- self.registerStyleComputation({
- priority: 10,
- func: self.getFooterStyles
- });
- };
-
- Grid.prototype.calcFooterHeight = function () {
- if (!this.hasFooter()) {
- return 0;
- }
-
- var height = 0;
- if (this.options.showGridFooter) {
- height += this.options.gridFooterHeight;
- }
-
- height += this.calcColumnFooterHeight();
-
- return height;
- };
-
- Grid.prototype.calcColumnFooterHeight = function () {
- var height = 0;
-
- if (this.options.showColumnFooter) {
- height += this.options.columnFooterHeight;
- }
-
- return height;
- };
-
- Grid.prototype.getFooterStyles = function () {
- var style = '.grid' + this.id + ' .ui-grid-footer-aggregates-row { height: ' + this.options.columnFooterHeight + 'px; }';
- style += ' .grid' + this.id + ' .ui-grid-footer-info { height: ' + this.options.gridFooterHeight + 'px; }';
- return style;
- };
-
- Grid.prototype.hasFooter = function () {
- return this.options.showGridFooter || this.options.showColumnFooter;
- };
-
- /**
- * @ngdoc function
- * @name isRTL
- * @methodOf ui.grid.class:Grid
- * @description Returns true if grid is RightToLeft
- */
- Grid.prototype.isRTL = function () {
- return this.rtl;
- };
-
-
- /**
- * @ngdoc function
- * @name registerColumnBuilder
- * @methodOf ui.grid.class:Grid
- * @description When the build creates columns from column definitions, the columnbuilders will be called to add
- * additional properties to the column.
- * @param {function(colDef, col, gridOptions)} columnBuilder function to be called
- */
- Grid.prototype.registerColumnBuilder = function registerColumnBuilder(columnBuilder) {
- this.columnBuilders.push(columnBuilder);
- };
-
- /**
- * @ngdoc function
- * @name buildColumnDefsFromData
- * @methodOf ui.grid.class:Grid
- * @description Populates columnDefs from the provided data
- * @param {function(colDef, col, gridOptions)} rowBuilder function to be called
- */
- Grid.prototype.buildColumnDefsFromData = function (dataRows){
- this.options.columnDefs = gridUtil.getColumnsFromData(dataRows, this.options.excludeProperties);
- };
-
- /**
- * @ngdoc function
- * @name registerRowBuilder
- * @methodOf ui.grid.class:Grid
- * @description When the build creates rows from gridOptions.data, the rowBuilders will be called to add
- * additional properties to the row.
- * @param {function(row, gridOptions)} rowBuilder function to be called
- */
- Grid.prototype.registerRowBuilder = function registerRowBuilder(rowBuilder) {
- this.rowBuilders.push(rowBuilder);
- };
-
-
- /**
- * @ngdoc function
- * @name registerDataChangeCallback
- * @methodOf ui.grid.class:Grid
- * @description When a data change occurs, the data change callbacks of the specified type
- * will be called. The rules are:
- *
- * - when the data watch fires, that is considered a ROW change (the data watch only notices
- * added or removed rows)
- * - when the api is called to inform us of a change, the declared type of that change is used
- * - when a cell edit completes, the EDIT callbacks are triggered
- * - when the columnDef watch fires, the COLUMN callbacks are triggered
- * - when the options watch fires, the OPTIONS callbacks are triggered
- *
- * For a given event:
- * - ALL calls ROW, EDIT, COLUMN, OPTIONS and ALL callbacks
- * - ROW calls ROW and ALL callbacks
- * - EDIT calls EDIT and ALL callbacks
- * - COLUMN calls COLUMN and ALL callbacks
- * - OPTIONS calls OPTIONS and ALL callbacks
- *
- * @param {function(grid)} callback function to be called
- * @param {array} types the types of data change you want to be informed of. Values from
- * the {@link ui.grid.service:uiGridConstants#properties_dataChange uiGridConstants.dataChange}
- * values ( ALL, EDIT, ROW, COLUMN, OPTIONS ). Optional and defaults to ALL
- * @returns {function} deregister function - a function that can be called to deregister this callback
- */
- Grid.prototype.registerDataChangeCallback = function registerDataChangeCallback(callback, types, _this) {
- var uid = gridUtil.nextUid();
- if ( !types ){
- types = [uiGridConstants.dataChange.ALL];
- }
- if ( !Array.isArray(types)){
- gridUtil.logError("Expected types to be an array or null in registerDataChangeCallback, value passed was: " + types );
- }
- this.dataChangeCallbacks[uid] = { callback: callback, types: types, _this:_this };
-
- var self = this;
- var deregisterFunction = function() {
- delete self.dataChangeCallbacks[uid];
- };
- return deregisterFunction;
- };
-
- /**
- * @ngdoc function
- * @name callDataChangeCallbacks
- * @methodOf ui.grid.class:Grid
- * @description Calls the callbacks based on the type of data change that
- * has occurred. Always calls the ALL callbacks, calls the ROW, EDIT, COLUMN and OPTIONS callbacks if the
- * event type is matching, or if the type is ALL.
- * @param {string} type the type of event that occurred - one of the
- * {@link ui.grid.service:uiGridConstants#properties_dataChange uiGridConstants.dataChange}
- * values (ALL, ROW, EDIT, COLUMN, OPTIONS)
- */
- Grid.prototype.callDataChangeCallbacks = function callDataChangeCallbacks(type, options) {
- angular.forEach( this.dataChangeCallbacks, function( callback, uid ){
- if ( callback.types.indexOf( uiGridConstants.dataChange.ALL ) !== -1 ||
- callback.types.indexOf( type ) !== -1 ||
- type === uiGridConstants.dataChange.ALL ) {
- if (callback._this) {
- callback.callback.apply(callback._this,this);
- }
- else {
- callback.callback( this );
- }
- }
- }, this);
- };
-
- /**
- * @ngdoc function
- * @name notifyDataChange
- * @methodOf ui.grid.class:Grid
- * @description Notifies us that a data change has occurred, used in the public
- * api for users to tell us when they've changed data or some other event that
- * our watches cannot pick up
- * @param {string} type the type of event that occurred - one of the
- * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN)
- */
- Grid.prototype.notifyDataChange = function notifyDataChange(type) {
- var constants = uiGridConstants.dataChange;
- if ( type === constants.ALL ||
- type === constants.COLUMN ||
- type === constants.EDIT ||
- type === constants.ROW ||
- type === constants.OPTIONS ){
- this.callDataChangeCallbacks( type );
- } else {
- gridUtil.logError("Notified of a data change, but the type was not recognised, so no action taken, type was: " + type);
- }
- };
-
-
- /**
- * @ngdoc function
- * @name columnRefreshCallback
- * @methodOf ui.grid.class:Grid
- * @description refreshes the grid when a column refresh
- * is notified, which triggers handling of the visible flag.
- * This is called on uiGridConstants.dataChange.COLUMN, and is
- * registered as a dataChangeCallback in grid.js
- * @param {string} name column name
- */
- Grid.prototype.columnRefreshCallback = function columnRefreshCallback( grid ){
- grid.buildColumns();
- grid.queueGridRefresh();
- };
-
-
- /**
- * @ngdoc function
- * @name processRowsCallback
- * @methodOf ui.grid.class:Grid
- * @description calls the row processors, specifically
- * intended to reset the sorting when an edit is called,
- * registered as a dataChangeCallback on uiGridConstants.dataChange.EDIT
- * @param {string} name column name
- */
- Grid.prototype.processRowsCallback = function processRowsCallback( grid ){
- grid.queueGridRefresh();
- };
-
-
- /**
- * @ngdoc function
- * @name updateFooterHeightCallback
- * @methodOf ui.grid.class:Grid
- * @description recalculates the footer height,
- * registered as a dataChangeCallback on uiGridConstants.dataChange.OPTIONS
- * @param {string} name column name
- */
- Grid.prototype.updateFooterHeightCallback = function updateFooterHeightCallback( grid ){
- grid.footerHeight = grid.calcFooterHeight();
- grid.columnFooterHeight = grid.calcColumnFooterHeight();
- };
-
-
- /**
- * @ngdoc function
- * @name getColumn
- * @methodOf ui.grid.class:Grid
- * @description returns a grid column for the column name
- * @param {string} name column name
- */
- Grid.prototype.getColumn = function getColumn(name) {
- var columns = this.columns.filter(function (column) {
- return column.colDef.name === name;
- });
- return columns.length > 0 ? columns[0] : null;
- };
-
- /**
- * @ngdoc function
- * @name getColDef
- * @methodOf ui.grid.class:Grid
- * @description returns a grid colDef for the column name
- * @param {string} name column.field
- */
- Grid.prototype.getColDef = function getColDef(name) {
- var colDefs = this.options.columnDefs.filter(function (colDef) {
- return colDef.name === name;
- });
- return colDefs.length > 0 ? colDefs[0] : null;
- };
-
- /**
- * @ngdoc function
- * @name assignTypes
- * @methodOf ui.grid.class:Grid
- * @description uses the first row of data to assign colDef.type for any types not defined.
- */
- /**
- * @ngdoc property
- * @name type
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description the type of the column, used in sorting. If not provided then the
- * grid will guess the type. Add this only if the grid guessing is not to your
- * satisfaction. One of:
- * - 'string'
- * - 'boolean'
- * - 'number'
- * - 'date'
- * - 'object'
- * - 'numberStr'
- * Note that if you choose date, your dates should be in a javascript date type
- *
- */
- Grid.prototype.assignTypes = function(){
- var self = this;
- self.options.columnDefs.forEach(function (colDef, index) {
-
- //Assign colDef type if not specified
- if (!colDef.type) {
- var col = new GridColumn(colDef, index, self);
- var firstRow = self.rows.length > 0 ? self.rows[0] : null;
- if (firstRow) {
- colDef.type = gridUtil.guessType(self.getCellValue(firstRow, col));
- }
- else {
- colDef.type = 'string';
- }
- }
- });
- };
-
-
- /**
- * @ngdoc function
- * @name isRowHeaderColumn
- * @methodOf ui.grid.class:Grid
- * @description returns true if the column is a row Header
- * @param {object} column column
- */
- Grid.prototype.isRowHeaderColumn = function isRowHeaderColumn(column) {
- return this.rowHeaderColumns.indexOf(column) !== -1;
- };
-
- /**
- * @ngdoc function
- * @name addRowHeaderColumn
- * @methodOf ui.grid.class:Grid
- * @description adds a row header column to the grid
- * @param {object} column def
- */
- Grid.prototype.addRowHeaderColumn = function addRowHeaderColumn(colDef, order) {
- var self = this;
-
- //default order
- if (order === undefined) {
- order = 0;
- }
-
- var rowHeaderCol = new GridColumn(colDef, gridUtil.nextUid(), self);
- rowHeaderCol.isRowHeader = true;
- if (self.isRTL()) {
- self.createRightContainer();
- rowHeaderCol.renderContainer = 'right';
- }
- else {
- self.createLeftContainer();
- rowHeaderCol.renderContainer = 'left';
- }
-
- // relies on the default column builder being first in array, as it is instantiated
- // as part of grid creation
- self.columnBuilders[0](colDef,rowHeaderCol,self.options)
- .then(function(){
- rowHeaderCol.enableFiltering = false;
- rowHeaderCol.enableSorting = false;
- rowHeaderCol.enableHiding = false;
- rowHeaderCol.headerPriority = order;
- self.rowHeaderColumns.push(rowHeaderCol);
- self.rowHeaderColumns = self.rowHeaderColumns.sort(function (a, b) {
- return a.headerPriority - b.headerPriority;
- });
-
- self.buildColumns()
- .then( function() {
- self.preCompileCellTemplates();
- self.queueGridRefresh();
- });
- });
- };
-
- /**
- * @ngdoc function
- * @name getOnlyDataColumns
- * @methodOf ui.grid.class:Grid
- * @description returns all columns except for rowHeader columns
- */
- Grid.prototype.getOnlyDataColumns = function getOnlyDataColumns() {
- var self = this;
- var cols = [];
- self.columns.forEach(function (col) {
- if (self.rowHeaderColumns.indexOf(col) === -1) {
- cols.push(col);
- }
- });
- return cols;
- };
-
- /**
- * @ngdoc function
- * @name buildColumns
- * @methodOf ui.grid.class:Grid
- * @description creates GridColumn objects from the columnDefinition. Calls each registered
- * columnBuilder to further process the column
- * @param {object} options An object contains options to use when building columns
- *
- * * **orderByColumnDefs**: defaults to **false**. When true, `buildColumns` will reorder existing columns according to the order within the column definitions.
- *
- * @returns {Promise} a promise to load any needed column resources
- */
- Grid.prototype.buildColumns = function buildColumns(opts) {
- var options = {
- orderByColumnDefs: false
- };
-
- angular.extend(options, opts);
-
- // gridUtil.logDebug('buildColumns');
- var self = this;
- var builderPromises = [];
- var headerOffset = self.rowHeaderColumns.length;
- var i;
-
- // Remove any columns for which a columnDef cannot be found
- // Deliberately don't use forEach, as it doesn't like splice being called in the middle
- // Also don't cache columns.length, as it will change during this operation
- for (i = 0; i < self.columns.length; i++){
- if (!self.getColDef(self.columns[i].name)) {
- self.columns.splice(i, 1);
- i--;
- }
- }
-
- //add row header columns to the grid columns array _after_ columns without columnDefs have been removed
- //rowHeaderColumns is ordered by priority so insert in reverse
- for (var j = self.rowHeaderColumns.length - 1; j >= 0; j--) {
- self.columns.unshift(self.rowHeaderColumns[j]);
- }
-
-
-
- // look at each column def, and update column properties to match. If the column def
- // doesn't have a column, then splice in a new gridCol
- self.options.columnDefs.forEach(function (colDef, index) {
- self.preprocessColDef(colDef);
- var col = self.getColumn(colDef.name);
-
- if (!col) {
- col = new GridColumn(colDef, gridUtil.nextUid(), self);
- self.columns.splice(index + headerOffset, 0, col);
- }
- else {
- // tell updateColumnDef that the column was pre-existing
- col.updateColumnDef(colDef, false);
- }
-
- self.columnBuilders.forEach(function (builder) {
- builderPromises.push(builder.call(self, colDef, col, self.options));
- });
- });
-
- /*** Reorder columns if necessary ***/
- if (!!options.orderByColumnDefs) {
- // Create a shallow copy of the columns as a cache
- var columnCache = self.columns.slice(0);
-
- // We need to allow for the "row headers" when mapping from the column defs array to the columns array
- // If we have a row header in columns[0] and don't account for it we'll overwrite it with the column in columnDefs[0]
-
- // Go through all the column defs, use the shorter of columns length and colDefs.length because if a user has given two columns the same name then
- // columns will be shorter than columnDefs. In this situation we'll avoid an error, but the user will still get an unexpected result
- var len = Math.min(self.options.columnDefs.length, self.columns.length);
- for (i = 0; i < len; i++) {
- // If the column at this index has a different name than the column at the same index in the column defs...
- if (self.columns[i + headerOffset].name !== self.options.columnDefs[i].name) {
- // Replace the one in the cache with the appropriate column
- columnCache[i + headerOffset] = self.getColumn(self.options.columnDefs[i].name);
- }
- else {
- // Otherwise just copy over the one from the initial columns
- columnCache[i + headerOffset] = self.columns[i + headerOffset];
- }
- }
-
- // Empty out the columns array, non-destructively
- self.columns.length = 0;
-
- // And splice in the updated, ordered columns from the cache
- Array.prototype.splice.apply(self.columns, [0, 0].concat(columnCache));
- }
-
- return $q.all(builderPromises).then(function(){
- if (self.rows.length > 0){
- self.assignTypes();
- }
- });
- };
-
- Grid.prototype.preCompileCellTemplate = function(col) {
- var self = this;
- var html = col.cellTemplate.replace(uiGridConstants.MODEL_COL_FIELD, self.getQualifiedColField(col));
- html = html.replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)');
-
- var compiledElementFn = $compile(html);
- col.compiledElementFn = compiledElementFn;
-
- if (col.compiledElementFnDefer) {
- col.compiledElementFnDefer.resolve(col.compiledElementFn);
- }
- };
-
-/**
- * @ngdoc function
- * @name preCompileCellTemplates
- * @methodOf ui.grid.class:Grid
- * @description precompiles all cell templates
- */
- Grid.prototype.preCompileCellTemplates = function() {
- var self = this;
- self.columns.forEach(function (col) {
- if ( col.cellTemplate ){
- self.preCompileCellTemplate( col );
- } else if ( col.cellTemplatePromise ){
- col.cellTemplatePromise.then( function() {
- self.preCompileCellTemplate( col );
- });
- }
- });
- };
-
- /**
- * @ngdoc function
- * @name getGridQualifiedColField
- * @methodOf ui.grid.class:Grid
- * @description Returns the $parse-able accessor for a column within its $scope
- * @param {GridColumn} col col object
- */
- Grid.prototype.getQualifiedColField = function (col) {
- var base = 'row.entity';
- if ( col.field === uiGridConstants.ENTITY_BINDING ) {
- return base;
- }
- return gridUtil.preEval(base + '.' + col.field);
- };
-
- /**
- * @ngdoc function
- * @name createLeftContainer
- * @methodOf ui.grid.class:Grid
- * @description creates the left render container if it doesn't already exist
- */
- Grid.prototype.createLeftContainer = function() {
- if (!this.hasLeftContainer()) {
- this.renderContainers.left = new GridRenderContainer('left', this, { disableColumnOffset: true });
- }
- };
-
- /**
- * @ngdoc function
- * @name createRightContainer
- * @methodOf ui.grid.class:Grid
- * @description creates the right render container if it doesn't already exist
- */
- Grid.prototype.createRightContainer = function() {
- if (!this.hasRightContainer()) {
- this.renderContainers.right = new GridRenderContainer('right', this, { disableColumnOffset: true });
- }
- };
-
- /**
- * @ngdoc function
- * @name hasLeftContainer
- * @methodOf ui.grid.class:Grid
- * @description returns true if leftContainer exists
- */
- Grid.prototype.hasLeftContainer = function() {
- return this.renderContainers.left !== undefined;
- };
-
- /**
- * @ngdoc function
- * @name hasRightContainer
- * @methodOf ui.grid.class:Grid
- * @description returns true if rightContainer exists
- */
- Grid.prototype.hasRightContainer = function() {
- return this.renderContainers.right !== undefined;
- };
-
-
- /**
- * undocumented function
- * @name preprocessColDef
- * @methodOf ui.grid.class:Grid
- * @description defaults the name property from field to maintain backwards compatibility with 2.x
- * validates that name or field is present
- */
- Grid.prototype.preprocessColDef = function preprocessColDef(colDef) {
- var self = this;
-
- if (!colDef.field && !colDef.name) {
- throw new Error('colDef.name or colDef.field property is required');
- }
-
- //maintain backwards compatibility with 2.x
- //field was required in 2.x. now name is required
- if (colDef.name === undefined && colDef.field !== undefined) {
- // See if the column name already exists:
- var newName = colDef.field,
- counter = 2;
- while (self.getColumn(newName)) {
- newName = colDef.field + counter.toString();
- counter++;
- }
- colDef.name = newName;
- }
- };
-
- // Return a list of items that exist in the `n` array but not the `o` array. Uses optional property accessors passed as third & fourth parameters
- Grid.prototype.newInN = function newInN(o, n, oAccessor, nAccessor) {
- var self = this;
-
- var t = [];
- for (var i = 0; i < n.length; i++) {
- var nV = nAccessor ? n[i][nAccessor] : n[i];
-
- var found = false;
- for (var j = 0; j < o.length; j++) {
- var oV = oAccessor ? o[j][oAccessor] : o[j];
- if (self.options.rowEquality(nV, oV)) {
- found = true;
- break;
- }
- }
- if (!found) {
- t.push(nV);
- }
- }
-
- return t;
- };
-
- /**
- * @ngdoc function
- * @name getRow
- * @methodOf ui.grid.class:Grid
- * @description returns the GridRow that contains the rowEntity
- * @param {object} rowEntity the gridOptions.data array element instance
- * @param {array} lookInRows [optional] the rows to look in - if not provided then
- * looks in grid.rows
- */
- Grid.prototype.getRow = function getRow(rowEntity, lookInRows) {
- var self = this;
-
- lookInRows = typeof(lookInRows) === 'undefined' ? self.rows : lookInRows;
-
- var rows = lookInRows.filter(function (row) {
- return self.options.rowEquality(row.entity, rowEntity);
- });
- return rows.length > 0 ? rows[0] : null;
- };
-
-
- /**
- * @ngdoc function
- * @name modifyRows
- * @methodOf ui.grid.class:Grid
- * @description creates or removes GridRow objects from the newRawData array. Calls each registered
- * rowBuilder to further process the row
- * @param {array} newRawData Modified set of data
- *
- * This method aims to achieve three things:
- * 1. the resulting rows array is in the same order as the newRawData, we'll call
- * rowsProcessors immediately after to sort the data anyway
- * 2. if we have row hashing available, we try to use the rowHash to find the row
- * 3. no memory leaks - rows that are no longer in newRawData need to be garbage collected
- *
- * The basic logic flow makes use of the newRawData, oldRows and oldHash, and creates
- * the newRows and newHash
- *
- * ```
- * newRawData.forEach newEntity
- * if (hashing enabled)
- * check oldHash for newEntity
- * else
- * look for old row directly in oldRows
- * if !oldRowFound // must be a new row
- * create newRow
- * append to the newRows and add to newHash
- * run the processors
- * ```
- *
- * Rows are identified using the hashKey if configured. If not configured, then rows
- * are identified using the gridOptions.rowEquality function
- *
- * This method is useful when trying to select rows immediately after loading data without
- * using a $timeout/$interval, e.g.:
- *
- * $scope.gridOptions.data = someData;
- * $scope.gridApi.grid.modifyRows($scope.gridOptions.data);
- * $scope.gridApi.selection.selectRow($scope.gridOptions.data[0]);
- *
- * OR to persist row selection after data update (e.g. rows selected, new data loaded, want
- * originally selected rows to be re-selected))
- */
- Grid.prototype.modifyRows = function modifyRows(newRawData) {
- var self = this;
- var oldRows = self.rows.slice(0);
- var oldRowHash = self.rowHashMap || self.createRowHashMap();
- self.rowHashMap = self.createRowHashMap();
- self.rows.length = 0;
-
- newRawData.forEach( function( newEntity, i ) {
- var newRow, oldRow;
-
- if ( self.options.enableRowHashing ){
- // if hashing is enabled, then this row will be in the hash if we already know about it
- oldRow = oldRowHash.get( newEntity );
- } else {
- // otherwise, manually search the oldRows to see if we can find this row
- oldRow = self.getRow(newEntity, oldRows);
- }
-
- // update newRow to have an entity
- if ( oldRow ) {
- newRow = oldRow;
- newRow.entity = newEntity;
- }
-
- // if we didn't find the row, it must be new, so create it
- if ( !newRow ){
- newRow = self.processRowBuilders(new GridRow(newEntity, i, self));
- }
-
- self.rows.push( newRow );
- self.rowHashMap.put( newEntity, newRow );
- });
-
- self.assignTypes();
-
- var p1 = $q.when(self.processRowsProcessors(self.rows))
- .then(function (renderableRows) {
- return self.setVisibleRows(renderableRows);
- });
-
- var p2 = $q.when(self.processColumnsProcessors(self.columns))
- .then(function (renderableColumns) {
- return self.setVisibleColumns(renderableColumns);
- });
-
- return $q.all([p1, p2]);
- };
-
-
- /**
- * Private Undocumented Method
- * @name addRows
- * @methodOf ui.grid.class:Grid
- * @description adds the newRawData array of rows to the grid and calls all registered
- * rowBuilders. this keyword will reference the grid
- */
- Grid.prototype.addRows = function addRows(newRawData) {
- var self = this;
-
- var existingRowCount = self.rows.length;
- for (var i = 0; i < newRawData.length; i++) {
- var newRow = self.processRowBuilders(new GridRow(newRawData[i], i + existingRowCount, self));
-
- if (self.options.enableRowHashing) {
- var found = self.rowHashMap.get(newRow.entity);
- if (found) {
- found.row = newRow;
- }
- }
-
- self.rows.push(newRow);
- }
- };
-
- /**
- * @ngdoc function
- * @name processRowBuilders
- * @methodOf ui.grid.class:Grid
- * @description processes all RowBuilders for the gridRow
- * @param {GridRow} gridRow reference to gridRow
- * @returns {GridRow} the gridRow with all additional behavior added
- */
- Grid.prototype.processRowBuilders = function processRowBuilders(gridRow) {
- var self = this;
-
- self.rowBuilders.forEach(function (builder) {
- builder.call(self, gridRow, self.options);
- });
-
- return gridRow;
- };
-
- /**
- * @ngdoc function
- * @name registerStyleComputation
- * @methodOf ui.grid.class:Grid
- * @description registered a styleComputation function
- *
- * If the function returns a value it will be appended into the grid's `<style>` block
- * @param {function($scope)} styleComputation function
- */
- Grid.prototype.registerStyleComputation = function registerStyleComputation(styleComputationInfo) {
- this.styleComputations.push(styleComputationInfo);
- };
-
-
- // NOTE (c0bra): We already have rowBuilders. I think these do exactly the same thing...
- // Grid.prototype.registerRowFilter = function(filter) {
- // // TODO(c0bra): validate filter?
-
- // this.rowFilters.push(filter);
- // };
-
- // Grid.prototype.removeRowFilter = function(filter) {
- // var idx = this.rowFilters.indexOf(filter);
-
- // if (typeof(idx) !== 'undefined' && idx !== undefined) {
- // this.rowFilters.slice(idx, 1);
- // }
- // };
-
- // Grid.prototype.processRowFilters = function(rows) {
- // var self = this;
- // self.rowFilters.forEach(function (filter) {
- // filter.call(self, rows);
- // });
- // };
-
-
- /**
- * @ngdoc function
- * @name registerRowsProcessor
- * @methodOf ui.grid.class:Grid
- * @description
- *
- * Register a "rows processor" function. When the rows are updated,
- * the grid calls each registered "rows processor", which has a chance
- * to alter the set of rows (sorting, etc) as long as the count is not
- * modified.
- *
- * @param {function(renderedRowsToProcess, columns )} processorFunction rows processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and must
- * return the updated rows list, which is passed to the next processor in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject rows processors at intermediate priorities. Lower priority rowsProcessors run earlier.
- *
- * At present all rows visible is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- *
- */
- Grid.prototype.registerRowsProcessor = function registerRowsProcessor(processor, priority) {
- if (!angular.isFunction(processor)) {
- throw 'Attempt to register non-function rows processor: ' + processor;
- }
-
- this.rowsProcessors.push({processor: processor, priority: priority});
- this.rowsProcessors.sort(function sortByPriority( a, b ){
- return a.priority - b.priority;
- });
- };
-
- /**
- * @ngdoc function
- * @name removeRowsProcessor
- * @methodOf ui.grid.class:Grid
- * @param {function(renderableRows)} rows processor function
- * @description Remove a registered rows processor
- */
- Grid.prototype.removeRowsProcessor = function removeRowsProcessor(processor) {
- var idx = -1;
- this.rowsProcessors.forEach(function(rowsProcessor, index){
- if ( rowsProcessor.processor === processor ){
- idx = index;
- }
- });
-
- if ( idx !== -1 ) {
- this.rowsProcessors.splice(idx, 1);
- }
- };
-
- /**
- * Private Undocumented Method
- * @name processRowsProcessors
- * @methodOf ui.grid.class:Grid
- * @param {Array[GridRow]} The array of "renderable" rows
- * @param {Array[GridColumn]} The array of columns
- * @description Run all the registered rows processors on the array of renderable rows
- */
- Grid.prototype.processRowsProcessors = function processRowsProcessors(renderableRows) {
- var self = this;
-
- // Create a shallow copy of the rows so that we can safely sort them without altering the original grid.rows sort order
- var myRenderableRows = renderableRows.slice(0);
-
- // Return myRenderableRows with no processing if we have no rows processors
- if (self.rowsProcessors.length === 0) {
- return $q.when(myRenderableRows);
- }
-
- // Counter for iterating through rows processors
- var i = 0;
-
- // Promise for when we're done with all the processors
- var finished = $q.defer();
-
- // This function will call the processor in self.rowsProcessors at index 'i', and then
- // when done will call the next processor in the list, using the output from the processor
- // at i as the argument for 'renderedRowsToProcess' on the next iteration.
- //
- // If we're at the end of the list of processors, we resolve our 'finished' callback with
- // the result.
- function startProcessor(i, renderedRowsToProcess) {
- // Get the processor at 'i'
- var processor = self.rowsProcessors[i].processor;
-
- // Call the processor, passing in the rows to process and the current columns
- // (note: it's wrapped in $q.when() in case the processor does not return a promise)
- return $q.when( processor.call(self, renderedRowsToProcess, self.columns) )
- .then(function handleProcessedRows(processedRows) {
- // Check for errors
- if (!processedRows) {
- throw "Processor at index " + i + " did not return a set of renderable rows";
- }
-
- if (!angular.isArray(processedRows)) {
- throw "Processor at index " + i + " did not return an array";
- }
-
- // Processor is done, increment the counter
- i++;
-
- // If we're not done with the processors, call the next one
- if (i <= self.rowsProcessors.length - 1) {
- return startProcessor(i, processedRows);
- }
- // We're done! Resolve the 'finished' promise
- else {
- finished.resolve(processedRows);
- }
- });
- }
-
- // Start on the first processor
- startProcessor(0, myRenderableRows);
-
- return finished.promise;
- };
-
- Grid.prototype.setVisibleRows = function setVisibleRows(rows) {
- var self = this;
-
- // Reset all the render container row caches
- for (var i in self.renderContainers) {
- var container = self.renderContainers[i];
-
- container.canvasHeightShouldUpdate = true;
-
- if ( typeof(container.visibleRowCache) === 'undefined' ){
- container.visibleRowCache = [];
- } else {
- container.visibleRowCache.length = 0;
- }
- }
-
- // rows.forEach(function (row) {
- for (var ri = 0; ri < rows.length; ri++) {
- var row = rows[ri];
-
- var targetContainer = (typeof(row.renderContainer) !== 'undefined' && row.renderContainer) ? row.renderContainer : 'body';
-
- // If the row is visible
- if (row.visible) {
- self.renderContainers[targetContainer].visibleRowCache.push(row);
- }
- }
- self.api.core.raise.rowsVisibleChanged(this.api);
- self.api.core.raise.rowsRendered(this.api);
- };
-
- /**
- * @ngdoc function
- * @name registerColumnsProcessor
- * @methodOf ui.grid.class:Grid
- * @param {function(renderedColumnsToProcess, rows)} columnProcessor column processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and
- * which must return an updated renderedColumnsToProcess which can be passed to the next processor
- * in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject columns processors at intermediate priorities. Lower priority columnsProcessors run earlier.
- *
- * At present all rows visible is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- * @description
-
- Register a "columns processor" function. When the columns are updated,
- the grid calls each registered "columns processor", which has a chance
- to alter the set of columns, as long as the count is not modified.
- */
- Grid.prototype.registerColumnsProcessor = function registerColumnsProcessor(processor, priority) {
- if (!angular.isFunction(processor)) {
- throw 'Attempt to register non-function rows processor: ' + processor;
- }
-
- this.columnsProcessors.push({processor: processor, priority: priority});
- this.columnsProcessors.sort(function sortByPriority( a, b ){
- return a.priority - b.priority;
- });
- };
-
- Grid.prototype.removeColumnsProcessor = function removeColumnsProcessor(processor) {
- var idx = this.columnsProcessors.indexOf(processor);
-
- if (typeof(idx) !== 'undefined' && idx !== undefined) {
- this.columnsProcessors.splice(idx, 1);
- }
- };
-
- Grid.prototype.processColumnsProcessors = function processColumnsProcessors(renderableColumns) {
- var self = this;
-
- // Create a shallow copy of the rows so that we can safely sort them without altering the original grid.rows sort order
- var myRenderableColumns = renderableColumns.slice(0);
-
- // Return myRenderableRows with no processing if we have no rows processors
- if (self.columnsProcessors.length === 0) {
- return $q.when(myRenderableColumns);
- }
-
- // Counter for iterating through rows processors
- var i = 0;
-
- // Promise for when we're done with all the processors
- var finished = $q.defer();
-
- // This function will call the processor in self.rowsProcessors at index 'i', and then
- // when done will call the next processor in the list, using the output from the processor
- // at i as the argument for 'renderedRowsToProcess' on the next iteration.
- //
- // If we're at the end of the list of processors, we resolve our 'finished' callback with
- // the result.
- function startProcessor(i, renderedColumnsToProcess) {
- // Get the processor at 'i'
- var processor = self.columnsProcessors[i].processor;
-
- // Call the processor, passing in the rows to process and the current columns
- // (note: it's wrapped in $q.when() in case the processor does not return a promise)
- return $q.when( processor.call(self, renderedColumnsToProcess, self.rows) )
- .then(function handleProcessedRows(processedColumns) {
- // Check for errors
- if (!processedColumns) {
- throw "Processor at index " + i + " did not return a set of renderable rows";
- }
-
- if (!angular.isArray(processedColumns)) {
- throw "Processor at index " + i + " did not return an array";
- }
-
- // Processor is done, increment the counter
- i++;
-
- // If we're not done with the processors, call the next one
- if (i <= self.columnsProcessors.length - 1) {
- return startProcessor(i, myRenderableColumns);
- }
- // We're done! Resolve the 'finished' promise
- else {
- finished.resolve(myRenderableColumns);
- }
- });
- }
-
- // Start on the first processor
- startProcessor(0, myRenderableColumns);
-
- return finished.promise;
- };
-
- Grid.prototype.setVisibleColumns = function setVisibleColumns(columns) {
- // gridUtil.logDebug('setVisibleColumns');
-
- var self = this;
-
- // Reset all the render container row caches
- for (var i in self.renderContainers) {
- var container = self.renderContainers[i];
-
- container.visibleColumnCache.length = 0;
- }
-
- for (var ci = 0; ci < columns.length; ci++) {
- var column = columns[ci];
-
- // If the column is visible
- if (column.visible) {
- // If the column has a container specified
- if (typeof(column.renderContainer) !== 'undefined' && column.renderContainer) {
- self.renderContainers[column.renderContainer].visibleColumnCache.push(column);
- }
- // If not, put it into the body container
- else {
- self.renderContainers.body.visibleColumnCache.push(column);
- }
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name handleWindowResize
- * @methodOf ui.grid.class:Grid
- * @description Triggered when the browser window resizes; automatically resizes the grid
- * @returns {Promise} A resolved promise once the window resize has completed.
- */
- Grid.prototype.handleWindowResize = function handleWindowResize($event) {
- var self = this;
-
- self.gridWidth = gridUtil.elementWidth(self.element);
- self.gridHeight = gridUtil.elementHeight(self.element);
-
- return self.queueRefresh();
- };
-
- /**
- * @ngdoc function
- * @name queueRefresh
- * @methodOf ui.grid.class:Grid
- * @description queues a grid refreshCanvas, a way of debouncing all the refreshes we might otherwise issue
- */
- Grid.prototype.queueRefresh = function queueRefresh() {
- var self = this;
-
- if (self.refreshCanceller) {
- $timeout.cancel(self.refreshCanceller);
- }
-
- self.refreshCanceller = $timeout(function () {
- self.refreshCanvas(true);
- });
-
- self.refreshCanceller.then(function () {
- self.refreshCanceller = null;
- });
-
- return self.refreshCanceller;
- };
-
-
- /**
- * @ngdoc function
- * @name queueGridRefresh
- * @methodOf ui.grid.class:Grid
- * @description queues a grid refresh, a way of debouncing all the refreshes we might otherwise issue
- */
- Grid.prototype.queueGridRefresh = function queueGridRefresh() {
- var self = this;
-
- if (self.gridRefreshCanceller) {
- $timeout.cancel(self.gridRefreshCanceller);
- }
-
- self.gridRefreshCanceller = $timeout(function () {
- self.refresh(true);
- });
-
- self.gridRefreshCanceller.then(function () {
- self.gridRefreshCanceller = null;
- });
-
- return self.gridRefreshCanceller;
- };
-
-
- /**
- * @ngdoc function
- * @name updateCanvasHeight
- * @methodOf ui.grid.class:Grid
- * @description flags all render containers to update their canvas height
- */
- Grid.prototype.updateCanvasHeight = function updateCanvasHeight() {
- var self = this;
-
- for (var containerId in self.renderContainers) {
- if (self.renderContainers.hasOwnProperty(containerId)) {
- var container = self.renderContainers[containerId];
- container.canvasHeightShouldUpdate = true;
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name buildStyles
- * @methodOf ui.grid.class:Grid
- * @description calls each styleComputation function
- */
- // TODO: this used to take $scope, but couldn't see that it was used
- Grid.prototype.buildStyles = function buildStyles() {
- // gridUtil.logDebug('buildStyles');
-
- var self = this;
-
- self.customStyles = '';
-
- self.styleComputations
- .sort(function(a, b) {
- if (a.priority === null) { return 1; }
- if (b.priority === null) { return -1; }
- if (a.priority === null && b.priority === null) { return 0; }
- return a.priority - b.priority;
- })
- .forEach(function (compInfo) {
- // this used to provide $scope as a second parameter, but I couldn't find any
- // style builders that used it, so removed it as part of moving to grid from controller
- var ret = compInfo.func.call(self);
-
- if (angular.isString(ret)) {
- self.customStyles += '\n' + ret;
- }
- });
- };
-
-
- Grid.prototype.minColumnsToRender = function minColumnsToRender() {
- var self = this;
- var viewport = this.getViewportWidth();
-
- var min = 0;
- var totalWidth = 0;
- self.columns.forEach(function(col, i) {
- if (totalWidth < viewport) {
- totalWidth += col.drawnWidth;
- min++;
- }
- else {
- var currWidth = 0;
- for (var j = i; j >= i - min; j--) {
- currWidth += self.columns[j].drawnWidth;
- }
- if (currWidth < viewport) {
- min++;
- }
- }
- });
-
- return min;
- };
-
- Grid.prototype.getBodyHeight = function getBodyHeight() {
- // Start with the viewportHeight
- var bodyHeight = this.getViewportHeight();
-
- // Add the horizontal scrollbar height if there is one
- //if (typeof(this.horizontalScrollbarHeight) !== 'undefined' && this.horizontalScrollbarHeight !== undefined && this.horizontalScrollbarHeight > 0) {
- // bodyHeight = bodyHeight + this.horizontalScrollbarHeight;
- //}
-
- return bodyHeight;
- };
-
- // NOTE: viewport drawable height is the height of the grid minus the header row height (including any border)
- // TODO(c0bra): account for footer height
- Grid.prototype.getViewportHeight = function getViewportHeight() {
- var self = this;
-
- var viewPortHeight = this.gridHeight - this.headerHeight - this.footerHeight;
-
- // Account for native horizontal scrollbar, if present
- //if (typeof(this.horizontalScrollbarHeight) !== 'undefined' && this.horizontalScrollbarHeight !== undefined && this.horizontalScrollbarHeight > 0) {
- // viewPortHeight = viewPortHeight - this.horizontalScrollbarHeight;
- //}
-
- var adjustment = self.getViewportAdjustment();
-
- viewPortHeight = viewPortHeight + adjustment.height;
-
- //gridUtil.logDebug('viewPortHeight', viewPortHeight);
-
- return viewPortHeight;
- };
-
- Grid.prototype.getViewportWidth = function getViewportWidth() {
- var self = this;
-
- var viewPortWidth = this.gridWidth;
-
- //if (typeof(this.verticalScrollbarWidth) !== 'undefined' && this.verticalScrollbarWidth !== undefined && this.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth - this.verticalScrollbarWidth;
- //}
-
- var adjustment = self.getViewportAdjustment();
-
- viewPortWidth = viewPortWidth + adjustment.width;
-
- //gridUtil.logDebug('getviewPortWidth', viewPortWidth);
-
- return viewPortWidth;
- };
-
- Grid.prototype.getHeaderViewportWidth = function getHeaderViewportWidth() {
- var viewPortWidth = this.getViewportWidth();
-
- //if (typeof(this.verticalScrollbarWidth) !== 'undefined' && this.verticalScrollbarWidth !== undefined && this.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth + this.verticalScrollbarWidth;
- //}
-
- return viewPortWidth;
- };
-
- Grid.prototype.addVerticalScrollSync = function (containerId, callBackFn) {
- this.verticalScrollSyncCallBackFns[containerId] = callBackFn;
- };
-
- Grid.prototype.addHorizontalScrollSync = function (containerId, callBackFn) {
- this.horizontalScrollSyncCallBackFns[containerId] = callBackFn;
- };
-
-/**
- * Scroll needed containers by calling their ScrollSyncs
- * @param sourceContainerId the containerId that has already set it's top/left.
- * can be empty string which means all containers need to set top/left
- * @param scrollEvent
- */
- Grid.prototype.scrollContainers = function (sourceContainerId, scrollEvent) {
-
- if (scrollEvent.y) {
- //default for no container Id (ex. mousewheel means that all containers must set scrollTop/Left)
- var verts = ['body','left', 'right'];
-
- this.flagScrollingVertically(scrollEvent);
-
- if (sourceContainerId === 'body') {
- verts = ['left', 'right'];
- }
- else if (sourceContainerId === 'left') {
- verts = ['body', 'right'];
- }
- else if (sourceContainerId === 'right') {
- verts = ['body', 'left'];
- }
-
- for (var i = 0; i < verts.length; i++) {
- var id = verts[i];
- if (this.verticalScrollSyncCallBackFns[id]) {
- this.verticalScrollSyncCallBackFns[id](scrollEvent);
- }
- }
-
- }
-
- if (scrollEvent.x) {
- //default for no container Id (ex. mousewheel means that all containers must set scrollTop/Left)
- var horizs = ['body','bodyheader', 'bodyfooter'];
-
- this.flagScrollingHorizontally(scrollEvent);
- if (sourceContainerId === 'body') {
- horizs = ['bodyheader', 'bodyfooter'];
- }
-
- for (var j = 0; j < horizs.length; j++) {
- var idh = horizs[j];
- if (this.horizontalScrollSyncCallBackFns[idh]) {
- this.horizontalScrollSyncCallBackFns[idh](scrollEvent);
- }
- }
-
- }
-
- };
-
- Grid.prototype.registerViewportAdjuster = function registerViewportAdjuster(func) {
- this.viewportAdjusters.push(func);
- };
-
- Grid.prototype.removeViewportAdjuster = function registerViewportAdjuster(func) {
- var idx = this.viewportAdjusters.indexOf(func);
-
- if (typeof(idx) !== 'undefined' && idx !== undefined) {
- this.viewportAdjusters.splice(idx, 1);
- }
- };
-
- Grid.prototype.getViewportAdjustment = function getViewportAdjustment() {
- var self = this;
-
- var adjustment = { height: 0, width: 0 };
-
- self.viewportAdjusters.forEach(function (func) {
- adjustment = func.call(this, adjustment);
- });
-
- return adjustment;
- };
-
- Grid.prototype.getVisibleRowCount = function getVisibleRowCount() {
- // var count = 0;
-
- // this.rows.forEach(function (row) {
- // if (row.visible) {
- // count++;
- // }
- // });
-
- // return this.visibleRowCache.length;
- return this.renderContainers.body.visibleRowCache.length;
- };
-
- Grid.prototype.getVisibleRows = function getVisibleRows() {
- return this.renderContainers.body.visibleRowCache;
- };
-
- Grid.prototype.getVisibleColumnCount = function getVisibleColumnCount() {
- // var count = 0;
-
- // this.rows.forEach(function (row) {
- // if (row.visible) {
- // count++;
- // }
- // });
-
- // return this.visibleRowCache.length;
- return this.renderContainers.body.visibleColumnCache.length;
- };
-
-
- Grid.prototype.searchRows = function searchRows(renderableRows) {
- return rowSearcher.search(this, renderableRows, this.columns);
- };
-
- Grid.prototype.sortByColumn = function sortByColumn(renderableRows) {
- return rowSorter.sort(this, renderableRows, this.columns);
- };
-
- /**
- * @ngdoc function
- * @name getCellValue
- * @methodOf ui.grid.class:Grid
- * @description Gets the value of a cell for a particular row and column
- * @param {GridRow} row Row to access
- * @param {GridColumn} col Column to access
- */
- Grid.prototype.getCellValue = function getCellValue(row, col){
- if ( typeof(row.entity[ '$$' + col.uid ]) !== 'undefined' ) {
- return row.entity[ '$$' + col.uid].rendered;
- } else if (this.options.flatEntityAccess && typeof(col.field) !== 'undefined' ){
- return row.entity[col.field];
- } else {
- if (!col.cellValueGetterCache) {
- col.cellValueGetterCache = $parse(row.getEntityQualifiedColField(col));
- }
-
- return col.cellValueGetterCache(row);
- }
- };
-
- /**
- * @ngdoc function
- * @name getCellDisplayValue
- * @methodOf ui.grid.class:Grid
- * @description Gets the displayed value of a cell after applying any the `cellFilter`
- * @param {GridRow} row Row to access
- * @param {GridColumn} col Column to access
- */
- Grid.prototype.getCellDisplayValue = function getCellDisplayValue(row, col) {
- if ( !col.cellDisplayGetterCache ) {
- var custom_filter = col.cellFilter ? " | " + col.cellFilter : "";
-
- if (typeof(row.entity['$$' + col.uid]) !== 'undefined') {
- col.cellDisplayGetterCache = $parse(row.entity['$$' + col.uid].rendered + custom_filter);
- } else if (this.options.flatEntityAccess && typeof(col.field) !== 'undefined') {
- col.cellDisplayGetterCache = $parse(row.entity[col.field] + custom_filter);
- } else {
- col.cellDisplayGetterCache = $parse(row.getEntityQualifiedColField(col) + custom_filter);
- }
- }
-
- return col.cellDisplayGetterCache(row);
- };
-
-
- Grid.prototype.getNextColumnSortPriority = function getNextColumnSortPriority() {
- var self = this,
- p = 0;
-
- self.columns.forEach(function (col) {
- if (col.sort && col.sort.priority !== undefined && col.sort.priority >= p) {
- p = col.sort.priority + 1;
- }
- });
-
- return p;
- };
-
- /**
- * @ngdoc function
- * @name resetColumnSorting
- * @methodOf ui.grid.class:Grid
- * @description Return the columns that the grid is currently being sorted by
- * @param {GridColumn} [excludedColumn] Optional GridColumn to exclude from having its sorting reset
- */
- Grid.prototype.resetColumnSorting = function resetColumnSorting(excludeCol) {
- var self = this;
-
- self.columns.forEach(function (col) {
- if (col !== excludeCol && !col.suppressRemoveSort) {
- col.sort = {};
- }
- });
- };
-
- /**
- * @ngdoc function
- * @name getColumnSorting
- * @methodOf ui.grid.class:Grid
- * @description Return the columns that the grid is currently being sorted by
- * @returns {Array[GridColumn]} An array of GridColumn objects
- */
- Grid.prototype.getColumnSorting = function getColumnSorting() {
- var self = this;
-
- var sortedCols = [], myCols;
-
- // Iterate through all the columns, sorted by priority
- // Make local copy of column list, because sorting is in-place and we do not want to
- // change the original sequence of columns
- myCols = self.columns.slice(0);
- myCols.sort(rowSorter.prioritySort).forEach(function (col) {
- if (col.sort && typeof(col.sort.direction) !== 'undefined' && col.sort.direction && (col.sort.direction === uiGridConstants.ASC || col.sort.direction === uiGridConstants.DESC)) {
- sortedCols.push(col);
- }
- });
-
- return sortedCols;
- };
-
- /**
- * @ngdoc function
- * @name sortColumn
- * @methodOf ui.grid.class:Grid
- * @description Set the sorting on a given column, optionally resetting any existing sorting on the Grid.
- * Emits the sortChanged event whenever the sort criteria are changed.
- * @param {GridColumn} column Column to set the sorting on
- * @param {uiGridConstants.ASC|uiGridConstants.DESC} [direction] Direction to sort by, either descending or ascending.
- * If not provided, the column will iterate through the sort directions
- * specified in the {@link ui.grid.class:GridOptions.columnDef#sortDirectionCycle sortDirectionCycle} attribute.
- * @param {boolean} [add] Add this column to the sorting. If not provided or set to `false`, the Grid will reset any existing sorting and sort
- * by this column only
- * @returns {Promise} A resolved promise that supplies the column.
- */
-
- Grid.prototype.sortColumn = function sortColumn(column, directionOrAdd, add) {
- var self = this,
- direction = null;
-
- if (typeof(column) === 'undefined' || !column) {
- throw new Error('No column parameter provided');
- }
-
- // Second argument can either be a direction or whether to add this column to the existing sort.
- // If it's a boolean, it's an add, otherwise, it's a direction
- if (typeof(directionOrAdd) === 'boolean') {
- add = directionOrAdd;
- }
- else {
- direction = directionOrAdd;
- }
-
- if (!add) {
- self.resetColumnSorting(column);
- column.sort.priority = undefined;
- // Get the actual priority since there may be columns which have suppressRemoveSort set
- column.sort.priority = self.getNextColumnSortPriority();
- }
- else if (column.sort.priority === undefined){
- column.sort.priority = self.getNextColumnSortPriority();
- }
-
- if (!direction) {
- // Find the current position in the cycle (or -1).
- var i = column.sortDirectionCycle.indexOf(column.sort.direction ? column.sort.direction : null);
- // Proceed to the next position in the cycle (or start at the beginning).
- i = (i+1) % column.sortDirectionCycle.length;
- // If suppressRemoveSort is set, and the next position in the cycle would
- // remove the sort, skip it.
- if (column.colDef && column.suppressRemoveSort && !column.sortDirectionCycle[i]) {
- i = (i+1) % column.sortDirectionCycle.length;
- }
-
- if (column.sortDirectionCycle[i]) {
- column.sort.direction = column.sortDirectionCycle[i];
- } else {
- removeSortOfColumn(column, self);
- }
- }
- else {
- column.sort.direction = direction;
- }
-
- self.api.core.raise.sortChanged( self, self.getColumnSorting() );
-
- return $q.when(column);
- };
-
- var removeSortOfColumn = function removeSortOfColumn(column, grid) {
- //Decrease priority for every col where priority is higher than the removed sort's priority.
- grid.columns.forEach(function (col) {
- if (col.sort && col.sort.priority !== undefined && col.sort.priority > column.sort.priority) {
- col.sort.priority -= 1;
- }
- });
-
- //Remove sort
- column.sort = {};
- };
-
- /**
- * communicate to outside world that we are done with initial rendering
- */
- Grid.prototype.renderingComplete = function(){
- if (angular.isFunction(this.options.onRegisterApi)) {
- this.options.onRegisterApi(this.api);
- }
- this.api.core.raise.renderingComplete( this.api );
- };
-
- Grid.prototype.createRowHashMap = function createRowHashMap() {
- var self = this;
-
- var hashMap = new RowHashMap();
- hashMap.grid = self;
-
- return hashMap;
- };
-
-
- /**
- * @ngdoc function
- * @name refresh
- * @methodOf ui.grid.class:Grid
- * @description Refresh the rendered grid on screen.
- * @param {boolean} [rowsAltered] Optional flag for refreshing when the number of rows has changed.
- */
- Grid.prototype.refresh = function refresh(rowsAltered) {
- var self = this;
-
- var p1 = self.processRowsProcessors(self.rows).then(function (renderableRows) {
- self.setVisibleRows(renderableRows);
- });
-
- var p2 = self.processColumnsProcessors(self.columns).then(function (renderableColumns) {
- self.setVisibleColumns(renderableColumns);
- });
-
- return $q.all([p1, p2]).then(function () {
- self.redrawInPlace(rowsAltered);
-
- self.refreshCanvas(true);
- });
- };
-
- /**
- * @ngdoc function
- * @name refreshRows
- * @methodOf ui.grid.class:Grid
- * @description Refresh the rendered rows on screen? Note: not functional at present
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- Grid.prototype.refreshRows = function refreshRows() {
- var self = this;
-
- return self.processRowsProcessors(self.rows)
- .then(function (renderableRows) {
- self.setVisibleRows(renderableRows);
-
- self.redrawInPlace();
-
- self.refreshCanvas( true );
- });
- };
-
- /**
- * @ngdoc function
- * @name refreshCanvas
- * @methodOf ui.grid.class:Grid
- * @description Builds all styles and recalculates much of the grid sizing
- * @param {object} buildStyles optional parameter. Use TBD
- * @returns {promise} promise that is resolved when the canvas
- * has been refreshed
- *
- */
- Grid.prototype.refreshCanvas = function(buildStyles) {
- var self = this;
-
- if (buildStyles) {
- self.buildStyles();
- }
-
- var p = $q.defer();
-
- // Get all the header heights
- var containerHeadersToRecalc = [];
- for (var containerId in self.renderContainers) {
- if (self.renderContainers.hasOwnProperty(containerId)) {
- var container = self.renderContainers[containerId];
-
- // Skip containers that have no canvasWidth set yet
- if (container.canvasWidth === null || isNaN(container.canvasWidth)) {
- continue;
- }
-
- if (container.header || container.headerCanvas) {
- container.explicitHeaderHeight = container.explicitHeaderHeight || null;
- container.explicitHeaderCanvasHeight = container.explicitHeaderCanvasHeight || null;
-
- containerHeadersToRecalc.push(container);
- }
- }
- }
-
- /*
- *
- * Here we loop through the headers, measuring each element as well as any header "canvas" it has within it.
- *
- * If any header is less than the largest header height, it will be resized to that so that we don't have headers
- * with different heights, which looks like a rendering problem
- *
- * We'll do the same thing with the header canvases, and give the header CELLS an explicit height if their canvas
- * is smaller than the largest canvas height. That was header cells without extra controls like filtering don't
- * appear shorter than other cells.
- *
- */
- if (containerHeadersToRecalc.length > 0) {
- // Build the styles without the explicit header heights
- if (buildStyles) {
- self.buildStyles();
- }
-
- // Putting in a timeout as it's not calculating after the grid element is rendered and filled out
- $timeout(function() {
- // var oldHeaderHeight = self.grid.headerHeight;
- // self.grid.headerHeight = gridUtil.outerElementHeight(self.header);
-
- var rebuildStyles = false;
-
- // Get all the header heights
- var maxHeaderHeight = 0;
- var maxHeaderCanvasHeight = 0;
- var i, container;
- var getHeight = function(oldVal, newVal){
- if ( oldVal !== newVal){
- rebuildStyles = true;
- }
- return newVal;
- };
- for (i = 0; i < containerHeadersToRecalc.length; i++) {
- container = containerHeadersToRecalc[i];
-
- // Skip containers that have no canvasWidth set yet
- if (container.canvasWidth === null || isNaN(container.canvasWidth)) {
- continue;
- }
-
- if (container.header) {
- var headerHeight = container.headerHeight = getHeight(container.headerHeight, parseInt(gridUtil.outerElementHeight(container.header), 10));
-
- // Get the "inner" header height, that is the height minus the top and bottom borders, if present. We'll use it to make sure all the headers have a consistent height
- var topBorder = gridUtil.getBorderSize(container.header, 'top');
- var bottomBorder = gridUtil.getBorderSize(container.header, 'bottom');
- var innerHeaderHeight = parseInt(headerHeight - topBorder - bottomBorder, 10);
-
- innerHeaderHeight = innerHeaderHeight < 0 ? 0 : innerHeaderHeight;
-
- container.innerHeaderHeight = innerHeaderHeight;
-
- // If the header doesn't have an explicit height set, save the largest header height for use later
- // Explicit header heights are based off of the max we are calculating here. We never want to base the max on something we're setting explicitly
- if (!container.explicitHeaderHeight && innerHeaderHeight > maxHeaderHeight) {
- maxHeaderHeight = innerHeaderHeight;
- }
- }
-
- if (container.headerCanvas) {
- var headerCanvasHeight = container.headerCanvasHeight = getHeight(container.headerCanvasHeight, parseInt(gridUtil.outerElementHeight(container.headerCanvas), 10));
-
-
- // If the header doesn't have an explicit canvas height, save the largest header canvas height for use later
- // Explicit header heights are based off of the max we are calculating here. We never want to base the max on something we're setting explicitly
- if (!container.explicitHeaderCanvasHeight && headerCanvasHeight > maxHeaderCanvasHeight) {
- maxHeaderCanvasHeight = headerCanvasHeight;
- }
- }
- }
-
- // Go through all the headers
- for (i = 0; i < containerHeadersToRecalc.length; i++) {
- container = containerHeadersToRecalc[i];
-
- /* If:
- 1. We have a max header height
- 2. This container has a header height defined
- 3. And either this container has an explicit header height set, OR its header height is less than the max
-
- then:
-
- Give this container's header an explicit height so it will line up with the tallest header
- */
- if (
- maxHeaderHeight > 0 && typeof(container.headerHeight) !== 'undefined' && container.headerHeight !== null &&
- (container.explicitHeaderHeight || container.headerHeight < maxHeaderHeight)
- ) {
- container.explicitHeaderHeight = getHeight(container.explicitHeaderHeight, maxHeaderHeight);
- }
-
- // Do the same as above except for the header canvas
- if (
- maxHeaderCanvasHeight > 0 && typeof(container.headerCanvasHeight) !== 'undefined' && container.headerCanvasHeight !== null &&
- (container.explicitHeaderCanvasHeight || container.headerCanvasHeight < maxHeaderCanvasHeight)
- ) {
- container.explicitHeaderCanvasHeight = getHeight(container.explicitHeaderCanvasHeight, maxHeaderCanvasHeight);
- }
- }
-
- // Rebuild styles if the header height has changed
- // The header height is used in body/viewport calculations and those are then used in other styles so we need it to be available
- if (buildStyles && rebuildStyles) {
- self.buildStyles();
- }
-
- p.resolve();
- });
- }
- else {
- // Timeout still needs to be here to trigger digest after styles have been rebuilt
- $timeout(function() {
- p.resolve();
- });
- }
-
- return p.promise;
- };
-
-
- /**
- * @ngdoc function
- * @name redrawCanvas
- * @methodOf ui.grid.class:Grid
- * @description Redraw the rows and columns based on our current scroll position
- * @param {boolean} [rowsAdded] Optional to indicate rows are added and the scroll percentage must be recalculated
- *
- */
- Grid.prototype.redrawInPlace = function redrawInPlace(rowsAdded) {
- // gridUtil.logDebug('redrawInPlace');
-
- var self = this;
-
- for (var i in self.renderContainers) {
- var container = self.renderContainers[i];
-
- // gridUtil.logDebug('redrawing container', i);
-
- if (rowsAdded) {
- container.adjustRows(container.prevScrollTop, null);
- container.adjustColumns(container.prevScrollLeft, null);
- }
- else {
- container.adjustRows(null, container.prevScrolltopPercentage);
- container.adjustColumns(null, container.prevScrollleftPercentage);
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name hasLeftContainerColumns
- * @methodOf ui.grid.class:Grid
- * @description returns true if leftContainer has columns
- */
- Grid.prototype.hasLeftContainerColumns = function () {
- return this.hasLeftContainer() && this.renderContainers.left.renderedColumns.length > 0;
- };
-
- /**
- * @ngdoc function
- * @name hasRightContainerColumns
- * @methodOf ui.grid.class:Grid
- * @description returns true if rightContainer has columns
- */
- Grid.prototype.hasRightContainerColumns = function () {
- return this.hasRightContainer() && this.renderContainers.right.renderedColumns.length > 0;
- };
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:Grid
- * @name scrollToIfNecessary
- * @description Scrolls the grid to make a certain row and column combo visible,
- * in the case that it is not completely visible on the screen already.
- * @param {GridRow} gridRow row to make visible
- * @param {GridCol} gridCol column to make visible
- * @returns {promise} a promise that is resolved when scrolling is complete
- */
- Grid.prototype.scrollToIfNecessary = function (gridRow, gridCol) {
- var self = this;
-
- var scrollEvent = new ScrollEvent(self, 'uiGrid.scrollToIfNecessary');
-
- // Alias the visible row and column caches
- var visRowCache = self.renderContainers.body.visibleRowCache;
- var visColCache = self.renderContainers.body.visibleColumnCache;
-
- /*-- Get the top, left, right, and bottom "scrolled" edges of the grid --*/
-
- // The top boundary is the current Y scroll position PLUS the header height, because the header can obscure rows when the grid is scrolled downwards
- var topBound = self.renderContainers.body.prevScrollTop + self.headerHeight;
-
- // Don't the let top boundary be less than 0
- topBound = (topBound < 0) ? 0 : topBound;
-
- // The left boundary is the current X scroll position
- var leftBound = self.renderContainers.body.prevScrollLeft;
-
- // The bottom boundary is the current Y scroll position, plus the height of the grid, but minus the header height.
- // Basically this is the viewport height added on to the scroll position
- var bottomBound = self.renderContainers.body.prevScrollTop + self.gridHeight - self.renderContainers.body.headerHeight - self.footerHeight - self.scrollbarWidth;
-
- // If there's a horizontal scrollbar, remove its height from the bottom boundary, otherwise we'll be letting it obscure rows
- //if (self.horizontalScrollbarHeight) {
- // bottomBound = bottomBound - self.horizontalScrollbarHeight;
- //}
-
- // The right position is the current X scroll position minus the grid width
- var rightBound = self.renderContainers.body.prevScrollLeft + Math.ceil(self.renderContainers.body.getViewportWidth());
-
- // If there's a vertical scrollbar, subtract it from the right boundary or we'll allow it to obscure cells
- //if (self.verticalScrollbarWidth) {
- // rightBound = rightBound - self.verticalScrollbarWidth;
- //}
-
- // We were given a row to scroll to
- if (gridRow !== null) {
- // This is the index of the row we want to scroll to, within the list of rows that can be visible
- var seekRowIndex = visRowCache.indexOf(gridRow);
-
- // Total vertical scroll length of the grid
- var scrollLength = (self.renderContainers.body.getCanvasHeight() - self.renderContainers.body.getViewportHeight());
-
- // Add the height of the native horizontal scrollbar to the scroll length, if it's there. Otherwise it will mask over the final row
- //if (self.horizontalScrollbarHeight && self.horizontalScrollbarHeight > 0) {
- // scrollLength = scrollLength + self.horizontalScrollbarHeight;
- //}
-
- // This is the minimum amount of pixels we need to scroll vertical in order to see this row.
- var pixelsToSeeRow = (seekRowIndex * self.options.rowHeight + self.headerHeight);
-
- // Don't let the pixels required to see the row be less than zero
- pixelsToSeeRow = (pixelsToSeeRow < 0) ? 0 : pixelsToSeeRow;
-
- var scrollPixels, percentage;
-
- // If the scroll position we need to see the row is LESS than the top boundary, i.e. obscured above the top of the self...
- if (pixelsToSeeRow < topBound) {
- // Get the different between the top boundary and the required scroll position and subtract it from the current scroll position\
- // to get the full position we need
- scrollPixels = self.renderContainers.body.prevScrollTop - (topBound - pixelsToSeeRow);
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- percentage = scrollPixels / scrollLength;
- scrollEvent.y = { percentage: percentage };
- }
- // Otherwise if the scroll position we need to see the row is MORE than the bottom boundary, i.e. obscured below the bottom of the self...
- else if (pixelsToSeeRow > bottomBound) {
- // Get the different between the bottom boundary and the required scroll position and add it to the current scroll position
- // to get the full position we need
- scrollPixels = pixelsToSeeRow - bottomBound + self.renderContainers.body.prevScrollTop;
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- percentage = scrollPixels / scrollLength;
- scrollEvent.y = { percentage: percentage };
- }
- }
-
- // We were given a column to scroll to
- if (gridCol !== null) {
- // This is the index of the column we want to scroll to, within the list of columns that can be visible
- var seekColumnIndex = visColCache.indexOf(gridCol);
-
- // Total horizontal scroll length of the grid
- var horizScrollLength = (self.renderContainers.body.getCanvasWidth() - self.renderContainers.body.getViewportWidth());
-
- // This is the minimum amount of pixels we need to scroll horizontal in order to see this column
- var columnLeftEdge = 0;
- for (var i = 0; i < seekColumnIndex; i++) {
- var col = visColCache[i];
- columnLeftEdge += col.drawnWidth;
- }
- columnLeftEdge = (columnLeftEdge < 0) ? 0 : columnLeftEdge;
-
- var columnRightEdge = columnLeftEdge + gridCol.drawnWidth;
-
- // Don't let the pixels required to see the column be less than zero
- columnRightEdge = (columnRightEdge < 0) ? 0 : columnRightEdge;
-
- var horizScrollPixels, horizPercentage;
-
- // If the scroll position we need to see the column is LESS than the left boundary, i.e. obscured before the left of the self...
- if (columnLeftEdge < leftBound) {
- // Get the different between the left boundary and the required scroll position and subtract it from the current scroll position\
- // to get the full position we need
- horizScrollPixels = self.renderContainers.body.prevScrollLeft - (leftBound - columnLeftEdge);
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- horizPercentage = horizScrollPixels / horizScrollLength;
- horizPercentage = (horizPercentage > 1) ? 1 : horizPercentage;
- scrollEvent.x = { percentage: horizPercentage };
- }
- // Otherwise if the scroll position we need to see the column is MORE than the right boundary, i.e. obscured after the right of the self...
- else if (columnRightEdge > rightBound) {
- // Get the different between the right boundary and the required scroll position and add it to the current scroll position
- // to get the full position we need
- horizScrollPixels = columnRightEdge - rightBound + self.renderContainers.body.prevScrollLeft;
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- horizPercentage = horizScrollPixels / horizScrollLength;
- horizPercentage = (horizPercentage > 1) ? 1 : horizPercentage;
- scrollEvent.x = { percentage: horizPercentage };
- }
- }
-
- var deferred = $q.defer();
-
- // If we need to scroll on either the x or y axes, fire a scroll event
- if (scrollEvent.y || scrollEvent.x) {
- scrollEvent.withDelay = false;
- self.scrollContainers('',scrollEvent);
- var dereg = self.api.core.on.scrollEnd(null,function() {
- deferred.resolve(scrollEvent);
- dereg();
- });
- }
- else {
- deferred.resolve();
- }
-
- return deferred.promise;
- };
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:Grid
- * @name scrollTo
- * @description Scroll the grid such that the specified
- * row and column is in view
- * @param {object} rowEntity gridOptions.data[] array instance to make visible
- * @param {object} colDef to make visible
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- Grid.prototype.scrollTo = function (rowEntity, colDef) {
- var gridRow = null, gridCol = null;
-
- if (rowEntity !== null && typeof(rowEntity) !== 'undefined' ) {
- gridRow = this.getRow(rowEntity);
- }
-
- if (colDef !== null && typeof(colDef) !== 'undefined' ) {
- gridCol = this.getColumn(colDef.name ? colDef.name : colDef.field);
- }
- return this.scrollToIfNecessary(gridRow, gridCol);
- };
-
- /**
- * @ngdoc function
- * @name clearAllFilters
- * @methodOf ui.grid.class:Grid
- * @description Clears all filters and optionally refreshes the visible rows.
- * @param {object} refreshRows Defaults to true.
- * @param {object} clearConditions Defaults to false.
- * @param {object} clearFlags Defaults to false.
- * @returns {promise} If `refreshRows` is true, returns a promise of the rows refreshing.
- */
- Grid.prototype.clearAllFilters = function clearAllFilters(refreshRows, clearConditions, clearFlags) {
- // Default `refreshRows` to true because it will be the most commonly desired behaviour.
- if (refreshRows === undefined) {
- refreshRows = true;
- }
- if (clearConditions === undefined) {
- clearConditions = false;
- }
- if (clearFlags === undefined) {
- clearFlags = false;
- }
-
- this.columns.forEach(function(column) {
- column.filters.forEach(function(filter) {
- filter.term = undefined;
-
- if (clearConditions) {
- filter.condition = undefined;
- }
-
- if (clearFlags) {
- filter.flags = undefined;
- }
- });
- });
-
- if (refreshRows) {
- return this.refreshRows();
- }
- };
-
-
- // Blatantly stolen from Angular as it isn't exposed (yet? 2.0?)
- function RowHashMap() {}
-
- RowHashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[this.grid.options.rowIdentity(key)] = value;
- },
-
- /**
- * @param key
- * @returns {Object} the value for the key
- */
- get: function(key) {
- return this[this.grid.options.rowIdentity(key)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = this.grid.options.rowIdentity(key)];
- delete this[key];
- return value;
- }
- };
-
-
-
- return Grid;
-
-}]);
-
-})();
-
-(function () {
-
- angular.module('ui.grid')
- .factory('GridApi', ['$q', '$rootScope', 'gridUtil', 'uiGridConstants', 'GridRow', 'uiGridGridMenuService',
- function ($q, $rootScope, gridUtil, uiGridConstants, GridRow, uiGridGridMenuService) {
- /**
- * @ngdoc function
- * @name ui.grid.class:GridApi
- * @description GridApi provides the ability to register public methods events inside the grid and allow
- * for other components to use the api via featureName.raise.methodName and featureName.on.eventName(function(args){}.
- * <br/>
- * To listen to events, you must add a callback to gridOptions.onRegisterApi
- * <pre>
- * $scope.gridOptions.onRegisterApi = function(gridApi){
- * gridApi.cellNav.on.navigate($scope,function(newRowCol, oldRowCol){
- * $log.log('navigation event');
- * });
- * };
- * </pre>
- * @param {object} grid grid that owns api
- */
- var GridApi = function GridApi(grid) {
- this.grid = grid;
- this.listeners = [];
-
- /**
- * @ngdoc function
- * @name renderingComplete
- * @methodOf ui.grid.core.api:PublicApi
- * @description Rendering is complete, called at the same
- * time as `onRegisterApi`, but provides a way to obtain
- * that same event within features without stopping end
- * users from getting at the onRegisterApi method.
- *
- * Included in gridApi so that it's always there - otherwise
- * there is still a timing problem with when a feature can
- * call this.
- *
- * @param {GridApi} gridApi the grid api, as normally
- * returned in the onRegisterApi method
- *
- * @example
- * <pre>
- * gridApi.core.on.renderingComplete( grid );
- * </pre>
- */
- this.registerEvent( 'core', 'renderingComplete' );
-
- /**
- * @ngdoc event
- * @name filterChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised after the filter is changed. The nature
- * of the watch expression doesn't allow notification of what changed,
- * so the receiver of this event will need to re-extract the filter
- * conditions from the columns.
- *
- */
- this.registerEvent( 'core', 'filterChanged' );
-
- /**
- * @ngdoc function
- * @name setRowInvisible
- * @methodOf ui.grid.core.api:PublicApi
- * @description Sets an override on the row to make it always invisible,
- * which will override any filtering or other visibility calculations.
- * If the row is currently visible then sets it to invisible and calls
- * both grid refresh and emits the rowsVisibleChanged event
- * @param {GridRow} row the row we want to make invisible
- */
- this.registerMethod( 'core', 'setRowInvisible', GridRow.prototype.setRowInvisible );
-
- /**
- * @ngdoc function
- * @name clearRowInvisible
- * @methodOf ui.grid.core.api:PublicApi
- * @description Clears any override on visibility for the row so that it returns to
- * using normal filtering and other visibility calculations.
- * If the row is currently invisible then sets it to visible and calls
- * both grid refresh and emits the rowsVisibleChanged event
- * TODO: if a filter is active then we can't just set it to visible?
- * @param {GridRow} row the row we want to make visible
- */
- this.registerMethod( 'core', 'clearRowInvisible', GridRow.prototype.clearRowInvisible );
-
- /**
- * @ngdoc function
- * @name getVisibleRows
- * @methodOf ui.grid.core.api:PublicApi
- * @description Returns all visible rows
- * @param {Grid} grid the grid you want to get visible rows from
- * @returns {array} an array of gridRow
- */
- this.registerMethod( 'core', 'getVisibleRows', this.grid.getVisibleRows );
-
- /**
- * @ngdoc event
- * @name rowsVisibleChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised after the rows that are visible
- * change. The filtering is zero-based, so it isn't possible
- * to say which rows changed (unlike in the selection feature).
- * We can plausibly know which row was changed when setRowInvisible
- * is called, but in that situation the user already knows which row
- * they changed. When a filter runs we don't know what changed,
- * and that is the one that would have been useful.
- *
- */
- this.registerEvent( 'core', 'rowsVisibleChanged' );
-
- /**
- * @ngdoc event
- * @name rowsRendered
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised after the cache of visible rows is changed.
- */
- this.registerEvent( 'core', 'rowsRendered' );
-
-
- /**
- * @ngdoc event
- * @name scrollBegin
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when scroll begins. Is throttled, so won't be raised too frequently
- */
- this.registerEvent( 'core', 'scrollBegin' );
-
- /**
- * @ngdoc event
- * @name scrollEnd
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when scroll has finished. Is throttled, so won't be raised too frequently
- */
- this.registerEvent( 'core', 'scrollEnd' );
-
- /**
- * @ngdoc event
- * @name canvasHeightChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when the canvas height has changed
- * <br/>
- * arguments: oldHeight, newHeight
- */
- this.registerEvent( 'core', 'canvasHeightChanged');
-
- /**
- * @ngdoc event
- * @name gridDimensionChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when the grid dimensions have changed (when autoResize is on)
- * <br/>
- * arguments: oldGridHeight, oldGridWidth, newGridHeight, newGridWidth
- */
- this.registerEvent( 'core', 'gridDimensionChanged');
- };
-
- /**
- * @ngdoc function
- * @name ui.grid.class:suppressEvents
- * @methodOf ui.grid.class:GridApi
- * @description Used to execute a function while disabling the specified event listeners.
- * Disables the listenerFunctions, executes the callbackFn, and then enables
- * the listenerFunctions again
- * @param {object} listenerFuncs listenerFunc or array of listenerFuncs to suppress. These must be the same
- * functions that were used in the .on.eventName method
- * @param {object} callBackFn function to execute
- * @example
- * <pre>
- * var navigate = function (newRowCol, oldRowCol){
- * //do something on navigate
- * }
- *
- * gridApi.cellNav.on.navigate(scope,navigate);
- *
- *
- * //call the scrollTo event and suppress our navigate listener
- * //scrollTo will still raise the event for other listeners
- * gridApi.suppressEvents(navigate, function(){
- * gridApi.cellNav.scrollTo(aRow, aCol);
- * });
- *
- * </pre>
- */
- GridApi.prototype.suppressEvents = function (listenerFuncs, callBackFn) {
- var self = this;
- var listeners = angular.isArray(listenerFuncs) ? listenerFuncs : [listenerFuncs];
-
- //find all registered listeners
- var foundListeners = self.listeners.filter(function(listener) {
- return listeners.some(function(l) {
- return listener.handler === l;
- });
- });
-
- //deregister all the listeners
- foundListeners.forEach(function(l){
- l.dereg();
- });
-
- callBackFn();
-
- //reregister all the listeners
- foundListeners.forEach(function(l){
- l.dereg = registerEventWithAngular(l.eventId, l.handler, self.grid, l._this);
- });
-
- };
-
- /**
- * @ngdoc function
- * @name registerEvent
- * @methodOf ui.grid.class:GridApi
- * @description Registers a new event for the given feature. The event will get a
- * .raise and .on prepended to it
- * <br>
- * .raise.eventName() - takes no arguments
- * <br/>
- * <br/>
- * .on.eventName(scope, callBackFn, _this)
- * <br/>
- * scope - a scope reference to add a deregister call to the scopes .$on('destroy'). Scope is optional and can be a null value,
- * but in this case you must deregister it yourself via the returned deregister function
- * <br/>
- * callBackFn - The function to call
- * <br/>
- * _this - optional this context variable for callbackFn. If omitted, grid.api will be used for the context
- * <br/>
- * .on.eventName returns a dereg funtion that will remove the listener. It's not necessary to use it as the listener
- * will be removed when the scope is destroyed.
- * @param {string} featureName name of the feature that raises the event
- * @param {string} eventName name of the event
- */
- GridApi.prototype.registerEvent = function (featureName, eventName) {
- var self = this;
- if (!self[featureName]) {
- self[featureName] = {};
- }
-
- var feature = self[featureName];
- if (!feature.on) {
- feature.on = {};
- feature.raise = {};
- }
-
- var eventId = self.grid.id + featureName + eventName;
-
- // gridUtil.logDebug('Creating raise event method ' + featureName + '.raise.' + eventName);
- feature.raise[eventName] = function () {
- $rootScope.$emit.apply($rootScope, [eventId].concat(Array.prototype.slice.call(arguments)));
- };
-
- // gridUtil.logDebug('Creating on event method ' + featureName + '.on.' + eventName);
- feature.on[eventName] = function (scope, handler, _this) {
- if ( scope !== null && typeof(scope.$on) === 'undefined' ){
- gridUtil.logError('asked to listen on ' + featureName + '.on.' + eventName + ' but scope wasn\'t passed in the input parameters. It is legitimate to pass null, but you\'ve passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering');
- return;
- }
- var deregAngularOn = registerEventWithAngular(eventId, handler, self.grid, _this);
-
- //track our listener so we can turn off and on
- var listener = {handler: handler, dereg: deregAngularOn, eventId: eventId, scope: scope, _this:_this};
- self.listeners.push(listener);
-
- var removeListener = function(){
- listener.dereg();
- var index = self.listeners.indexOf(listener);
- self.listeners.splice(index,1);
- };
-
- //destroy tracking when scope is destroyed
- if (scope) {
- scope.$on('$destroy', function() {
- removeListener();
- });
- }
-
-
- return removeListener;
- };
- };
-
- function registerEventWithAngular(eventId, handler, grid, _this) {
- return $rootScope.$on(eventId, function (event) {
- var args = Array.prototype.slice.call(arguments);
- args.splice(0, 1); //remove evt argument
- handler.apply(_this ? _this : grid.api, args);
- });
- }
-
- /**
- * @ngdoc function
- * @name registerEventsFromObject
- * @methodOf ui.grid.class:GridApi
- * @description Registers features and events from a simple objectMap.
- * eventObjectMap must be in this format (multiple features allowed)
- * <pre>
- * {featureName:
- * {
- * eventNameOne:function(args){},
- * eventNameTwo:function(args){}
- * }
- * }
- * </pre>
- * @param {object} eventObjectMap map of feature/event names
- */
- GridApi.prototype.registerEventsFromObject = function (eventObjectMap) {
- var self = this;
- var features = [];
- angular.forEach(eventObjectMap, function (featProp, featPropName) {
- var feature = {name: featPropName, events: []};
- angular.forEach(featProp, function (prop, propName) {
- feature.events.push(propName);
- });
- features.push(feature);
- });
-
- features.forEach(function (feature) {
- feature.events.forEach(function (event) {
- self.registerEvent(feature.name, event);
- });
- });
-
- };
-
- /**
- * @ngdoc function
- * @name registerMethod
- * @methodOf ui.grid.class:GridApi
- * @description Registers a new event for the given feature
- * @param {string} featureName name of the feature
- * @param {string} methodName name of the method
- * @param {object} callBackFn function to execute
- * @param {object} _this binds callBackFn 'this' to _this. Defaults to gridApi.grid
- */
- GridApi.prototype.registerMethod = function (featureName, methodName, callBackFn, _this) {
- if (!this[featureName]) {
- this[featureName] = {};
- }
-
- var feature = this[featureName];
-
- feature[methodName] = gridUtil.createBoundedWrapper(_this || this.grid, callBackFn);
- };
-
- /**
- * @ngdoc function
- * @name registerMethodsFromObject
- * @methodOf ui.grid.class:GridApi
- * @description Registers features and methods from a simple objectMap.
- * eventObjectMap must be in this format (multiple features allowed)
- * <br>
- * {featureName:
- * {
- * methodNameOne:function(args){},
- * methodNameTwo:function(args){}
- * }
- * @param {object} eventObjectMap map of feature/event names
- * @param {object} _this binds this to _this for all functions. Defaults to gridApi.grid
- */
- GridApi.prototype.registerMethodsFromObject = function (methodMap, _this) {
- var self = this;
- var features = [];
- angular.forEach(methodMap, function (featProp, featPropName) {
- var feature = {name: featPropName, methods: []};
- angular.forEach(featProp, function (prop, propName) {
- feature.methods.push({name: propName, fn: prop});
- });
- features.push(feature);
- });
-
- features.forEach(function (feature) {
- feature.methods.forEach(function (method) {
- self.registerMethod(feature.name, method.name, method.fn, _this);
- });
- });
-
- };
-
- return GridApi;
-
- }]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.factory('GridColumn', ['gridUtil', 'uiGridConstants', 'i18nService', function(gridUtil, uiGridConstants, i18nService) {
-
- /**
- * ******************************************************************************************
- * PaulL1: Ugly hack here in documentation. These properties are clearly properties of GridColumn,
- * and need to be noted as such for those extending and building ui-grid itself.
- * However, from an end-developer perspective, they interact with all these through columnDefs,
- * and they really need to be documented there. I feel like they're relatively static, and
- * I can't find an elegant way for ngDoc to reference to both....so I've duplicated each
- * comment block. Ugh.
- *
- */
-
- /**
- * @ngdoc property
- * @name name
- * @propertyOf ui.grid.class:GridColumn
- * @description (mandatory) each column should have a name, although for backward
- * compatibility with 2.x name can be omitted if field is present
- *
- */
-
- /**
- * @ngdoc property
- * @name name
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (mandatory) each column should have a name, although for backward
- * compatibility with 2.x name can be omitted if field is present
- *
- */
-
- /**
- * @ngdoc property
- * @name displayName
- * @propertyOf ui.grid.class:GridColumn
- * @description Column name that will be shown in the header. If displayName is not
- * provided then one is generated using the name.
- *
- */
-
- /**
- * @ngdoc property
- * @name displayName
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Column name that will be shown in the header. If displayName is not
- * provided then one is generated using the name.
- *
- */
-
- /**
- * @ngdoc property
- * @name field
- * @propertyOf ui.grid.class:GridColumn
- * @description field must be provided if you wish to bind to a
- * property in the data source. Should be an angular expression that evaluates against grid.options.data
- * array element. Can be a complex expression: <code>employee.address.city</code>, or can be a function: <code>employee.getFullAddress()</code>.
- * See the angular docs on binding expressions.
- *
- */
-
- /**
- * @ngdoc property
- * @name field
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description field must be provided if you wish to bind to a
- * property in the data source. Should be an angular expression that evaluates against grid.options.data
- * array element. Can be a complex expression: <code>employee.address.city</code>, or can be a function: <code>employee.getFullAddress()</code>. * See the angular docs on binding expressions. *
- */
-
- /**
- * @ngdoc property
- * @name filter
- * @propertyOf ui.grid.class:GridColumn
- * @description Filter on this column.
- *
- * Available built-in conditions and types are listed under {@link jui.grid.service:uiGridConstants#properties_filter uiGridOptions.filter}
- * @example
- * <pre>{ term: 'text', condition: uiGridConstants.filter.STARTS_WITH, placeholder: 'type to filter...', ariaLabel: 'Filter for text', flags: { caseSensitive: false }, type: uiGridConstants.filter.SELECT, [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ] }</pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name extraStyle
- * @propertyOf ui.grid.class:GridColumn
- * @description additional on this column.
- * @example
- * <pre>{extraStyle: {display:'table-cell'}}</pre>
- *
- */
-
- /**
- * @ngdoc object
- * @name ui.grid.class:GridColumn
- * @description Represents the viewModel for each column. Any state or methods needed for a Grid Column
- * are defined on this prototype
- * @param {ColumnDef} colDef the column def to associate with this column
- * @param {number} uid the unique and immutable uid we'd like to allocate to this column
- * @param {Grid} grid the grid we'd like to create this column in
- */
- function GridColumn(colDef, uid, grid) {
- var self = this;
-
- self.grid = grid;
- self.uid = uid;
-
- self.updateColumnDef(colDef, true);
-
- self.aggregationValue = undefined;
-
- // The footer cell registers to listen for the rowsRendered event, and calls this. Needed to be
- // in something with a scope so that the dereg would get called
- self.updateAggregationValue = function() {
-
- // gridUtil.logDebug('getAggregationValue for Column ' + self.colDef.name);
-
- /**
- * @ngdoc property
- * @name aggregationType
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description The aggregation that you'd like to show in the columnFooter for this
- * column. Valid values are in
- * {@link ui.grid.service:uiGridConstants#properties_aggregationTypes uiGridConstants.aggregationTypes},
- * and currently include `uiGridConstants.aggregationTypes.count`,
- * `uiGridConstants.aggregationTypes.sum`, `uiGridConstants.aggregationTypes.avg`, `uiGridConstants.aggregationTypes.min`,
- * `uiGridConstants.aggregationTypes.max`.
- *
- * You can also provide a function as the aggregation type, in this case your function needs to accept the full
- * set of visible rows, and return a value that should be shown
- */
- if (!self.aggregationType) {
- self.aggregationValue = undefined;
- return;
- }
-
- var result = 0;
- var visibleRows = self.grid.getVisibleRows();
-
- var cellValues = function(){
- var values = [];
- visibleRows.forEach(function (row) {
- var cellValue = self.grid.getCellValue(row, self);
- var cellNumber = Number(cellValue);
- if (!isNaN(cellNumber)) {
- values.push(cellNumber);
- }
- });
- return values;
- };
-
- if (angular.isFunction(self.aggregationType)) {
- self.aggregationValue = self.aggregationType(visibleRows, self);
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.count) {
- self.aggregationValue = self.grid.getVisibleRowCount();
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.sum) {
- cellValues().forEach(function (value) {
- result += value;
- });
- self.aggregationValue = result;
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.avg) {
- cellValues().forEach(function (value) {
- result += value;
- });
- result = result / cellValues().length;
- self.aggregationValue = result;
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.min) {
- self.aggregationValue = Math.min.apply(null, cellValues());
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.max) {
- self.aggregationValue = Math.max.apply(null, cellValues());
- }
- else {
- self.aggregationValue = '\u00A0';
- }
- };
-
-// var throttledUpdateAggregationValue = gridUtil.throttle(updateAggregationValue, self.grid.options.aggregationCalcThrottle, { trailing: true, context: self.name });
-
- /**
- * @ngdoc function
- * @name getAggregationValue
- * @methodOf ui.grid.class:GridColumn
- * @description gets the aggregation value based on the aggregation type for this column.
- * Debounced using scrollDebounce option setting
- */
- this.getAggregationValue = function() {
-// if (!self.grid.isScrollingVertically && !self.grid.isScrollingHorizontally) {
-// throttledUpdateAggregationValue();
-// }
-
- return self.aggregationValue;
- };
- }
-
- /**
- * @ngdoc function
- * @name hideColumn
- * @methodOf ui.grid.class:GridColumn
- * @description Hides the column by setting colDef.visible = false
- */
- GridColumn.prototype.hideColumn = function() {
- this.colDef.visible = false;
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:GridColumn
- * @name setPropertyOrDefault
- * @description Sets a property on the column using the passed in columnDef, and
- * setting the defaultValue if the value cannot be found on the colDef
- * @param {ColumnDef} colDef the column def to look in for the property value
- * @param {string} propName the property name we'd like to set
- * @param {object} defaultValue the value to use if the colDef doesn't provide the setting
- */
- GridColumn.prototype.setPropertyOrDefault = function (colDef, propName, defaultValue) {
- var self = this;
-
- // Use the column definition filter if we were passed it
- if (typeof(colDef[propName]) !== 'undefined' && colDef[propName]) {
- self[propName] = colDef[propName];
- }
- // Otherwise use our own if it's set
- else if (typeof(self[propName]) !== 'undefined') {
- self[propName] = self[propName];
- }
- // Default to empty object for the filter
- else {
- self[propName] = defaultValue ? defaultValue : {};
- }
- };
-
-
-
- /**
- * @ngdoc property
- * @name width
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets the column width. Can be either
- * a number or a percentage, or an * for auto.
- * @example
- * <pre> $scope.gridOptions.columnDefs = [ { field: 'field1', width: 100},
- * { field: 'field2', width: '20%'},
- * { field: 'field3', width: '*' }]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name minWidth
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets the minimum column width. Should be a number.
- * @example
- * <pre> $scope.gridOptions.columnDefs = [ { field: 'field1', minWidth: 100}]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name maxWidth
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets the maximum column width. Should be a number.
- * @example
- * <pre> $scope.gridOptions.columnDefs = [ { field: 'field1', maxWidth: 100}]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name visible
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets whether or not the column is visible
- * </br>Default is true
- * @example
- * <pre> $scope.gridOptions.columnDefs = [
- * { field: 'field1', visible: true},
- * { field: 'field2', visible: false }
- * ]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name sort
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description An object of sort information, attributes are:
- *
- * - direction: values are {@link ui.grid.service:uiGridConstants#properties_ASC uiGridConstants.ASC}
- * or {@link ui.grid.service:uiGridConstants#properties_DESC uiGridConstants.DESC}
- * - ignoreSort: if set to true this sort is ignored (used by tree to manipulate the sort functionality)
- * - priority: says what order to sort the columns in (lower priority gets sorted first).
- * @example
- * <pre>
- * $scope.gridOptions.columnDefs = [{
- * field: 'field1',
- * sort: {
- * direction: uiGridConstants.ASC,
- * ignoreSort: true,
- * priority: 0
- * }
- * }];
- * </pre>
- */
-
-
- /**
- * @ngdoc property
- * @name sortingAlgorithm
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Algorithm to use for sorting this column. Takes 'a' and 'b' parameters
- * like any normal sorting function with additional 'rowA', 'rowB', and 'direction' parameters
- * that are the row objects and the current direction of the sort respectively.
- *
- */
-
- /**
- * @ngdoc array
- * @name filters
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Specify multiple filter fields.
- * @example
- * <pre>$scope.gridOptions.columnDefs = [
- * {
- * field: 'field1', filters: [
- * {
- * term: 'aa',
- * condition: uiGridConstants.filter.STARTS_WITH,
- * placeholder: 'starts with...',
- * ariaLabel: 'Filter for field1',
- * flags: { caseSensitive: false },
- * type: uiGridConstants.filter.SELECT,
- * selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ]
- * },
- * {
- * condition: uiGridConstants.filter.ENDS_WITH,
- * placeholder: 'ends with...'
- * }
- * ]
- * }
- * ]; </pre>
- *
- *
- */
-
- /**
- * @ngdoc array
- * @name filters
- * @propertyOf ui.grid.class:GridColumn
- * @description Filters for this column. Includes 'term' property bound to filter input elements.
- * @example
- * <pre>[
- * {
- * term: 'foo', // ngModel for <input>
- * condition: uiGridConstants.filter.STARTS_WITH,
- * placeholder: 'starts with...',
- * ariaLabel: 'Filter for foo',
- * flags: { caseSensitive: false },
- * type: uiGridConstants.filter.SELECT,
- * selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ]
- * },
- * {
- * term: 'baz',
- * condition: uiGridConstants.filter.ENDS_WITH,
- * placeholder: 'ends with...'
- * }
- * ] </pre>
- *
- *
- */
-
- /**
- * @ngdoc array
- * @name menuItems
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description used to add menu items to a column. Refer to the tutorial on this
- * functionality. A number of settings are supported:
- *
- * - title: controls the title that is displayed in the menu
- * - icon: the icon shown alongside that title
- * - action: the method to call when the menu is clicked
- * - shown: a function to evaluate to determine whether or not to show the item
- * - active: a function to evaluate to determine whether or not the item is currently selected
- * - context: context to pass to the action function, available in this.context in your handler
- * - leaveOpen: if set to true, the menu should stay open after the action, defaults to false
- * @example
- * <pre> $scope.gridOptions.columnDefs = [
- * { field: 'field1', menuItems: [
- * {
- * title: 'Outer Scope Alert',
- * icon: 'ui-grid-icon-info-circled',
- * action: function($event) {
- * this.context.blargh(); // $scope.blargh() would work too, this is just an example
- * },
- * shown: function() { return true; },
- * active: function() { return true; },
- * context: $scope
- * },
- * {
- * title: 'Grid ID',
- * action: function() {
- * alert('Grid ID: ' + this.grid.id);
- * }
- * }
- * ] }]; </pre>
- *
- */
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:GridColumn
- * @name updateColumnDef
- * @description Moves settings from the columnDef down onto the column,
- * and sets properties as appropriate
- * @param {ColumnDef} colDef the column def to look in for the property value
- * @param {boolean} isNew whether the column is being newly created, if not
- * we're updating an existing column, and some items such as the sort shouldn't
- * be copied down
- */
- GridColumn.prototype.updateColumnDef = function(colDef, isNew) {
- var self = this;
-
- self.colDef = colDef;
-
- if (colDef.name === undefined) {
- throw new Error('colDef.name is required for column at index ' + self.grid.options.columnDefs.indexOf(colDef));
- }
-
- self.displayName = (colDef.displayName === undefined) ? gridUtil.readableColumnName(colDef.name) : colDef.displayName;
-
- if (!angular.isNumber(self.width) || !self.hasCustomWidth || colDef.allowCustomWidthOverride) {
- var colDefWidth = colDef.width;
- var parseErrorMsg = "Cannot parse column width '" + colDefWidth + "' for column named '" + colDef.name + "'";
- self.hasCustomWidth = false;
-
- if (!angular.isString(colDefWidth) && !angular.isNumber(colDefWidth)) {
- self.width = '*';
- } else if (angular.isString(colDefWidth)) {
- // See if it ends with a percent
- if (gridUtil.endsWith(colDefWidth, '%')) {
- // If so we should be able to parse the non-percent-sign part to a number
- var percentStr = colDefWidth.replace(/%/g, '');
- var percent = parseInt(percentStr, 10);
- if (isNaN(percent)) {
- throw new Error(parseErrorMsg);
- }
- self.width = colDefWidth;
- }
- // And see if it's a number string
- else if (colDefWidth.match(/^(\d+)$/)) {
- self.width = parseInt(colDefWidth.match(/^(\d+)$/)[1], 10);
- }
- // Otherwise it should be a string of asterisks
- else if (colDefWidth.match(/^\*+$/)) {
- self.width = colDefWidth;
- }
- // No idea, throw an Error
- else {
- throw new Error(parseErrorMsg);
- }
- }
- // Is a number, use it as the width
- else {
- self.width = colDefWidth;
- }
- }
-
- ['minWidth', 'maxWidth'].forEach(function (name) {
- var minOrMaxWidth = colDef[name];
- var parseErrorMsg = "Cannot parse column " + name + " '" + minOrMaxWidth + "' for column named '" + colDef.name + "'";
-
- if (!angular.isString(minOrMaxWidth) && !angular.isNumber(minOrMaxWidth)) {
- //Sets default minWidth and maxWidth values
- self[name] = ((name === 'minWidth') ? 30 : 9000);
- } else if (angular.isString(minOrMaxWidth)) {
- if (minOrMaxWidth.match(/^(\d+)$/)) {
- self[name] = parseInt(minOrMaxWidth.match(/^(\d+)$/)[1], 10);
- } else {
- throw new Error(parseErrorMsg);
- }
- } else {
- self[name] = minOrMaxWidth;
- }
- });
-
- //use field if it is defined; name if it is not
- self.field = (colDef.field === undefined) ? colDef.name : colDef.field;
-
- if ( typeof( self.field ) !== 'string' ){
- gridUtil.logError( 'Field is not a string, this is likely to break the code, Field is: ' + self.field );
- }
-
- self.name = colDef.name;
-
- // Use colDef.displayName as long as it's not undefined, otherwise default to the field name
- self.displayName = (colDef.displayName === undefined) ? gridUtil.readableColumnName(colDef.name) : colDef.displayName;
-
- //self.originalIndex = index;
-
- self.aggregationType = angular.isDefined(colDef.aggregationType) ? colDef.aggregationType : null;
- self.footerCellTemplate = angular.isDefined(colDef.footerCellTemplate) ? colDef.footerCellTemplate : null;
-
- /**
- * @ngdoc property
- * @name cellTooltip
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Whether or not to show a tooltip when a user hovers over the cell.
- * If set to false, no tooltip. If true, the cell value is shown in the tooltip (useful
- * if you have long values in your cells), if a function then that function is called
- * passing in the row and the col `cellTooltip( row, col )`, and the return value is shown in the tooltip,
- * if it is a static string then displays that static string.
- *
- * Defaults to false
- *
- */
- if ( typeof(colDef.cellTooltip) === 'undefined' || colDef.cellTooltip === false ) {
- self.cellTooltip = false;
- } else if ( colDef.cellTooltip === true ){
- self.cellTooltip = function(row, col) {
- return self.grid.getCellValue( row, col );
- };
- } else if (typeof(colDef.cellTooltip) === 'function' ){
- self.cellTooltip = colDef.cellTooltip;
- } else {
- self.cellTooltip = function ( row, col ){
- return col.colDef.cellTooltip;
- };
- }
-
- /**
- * @ngdoc property
- * @name headerTooltip
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Whether or not to show a tooltip when a user hovers over the header cell.
- * If set to false, no tooltip. If true, the displayName is shown in the tooltip (useful
- * if you have long values in your headers), if a function then that function is called
- * passing in the row and the col `headerTooltip( col )`, and the return value is shown in the tooltip,
- * if a static string then shows that static string.
- *
- * Defaults to false
- *
- */
- if ( typeof(colDef.headerTooltip) === 'undefined' || colDef.headerTooltip === false ) {
- self.headerTooltip = false;
- } else if ( colDef.headerTooltip === true ){
- self.headerTooltip = function(col) {
- return col.displayName;
- };
- } else if (typeof(colDef.headerTooltip) === 'function' ){
- self.headerTooltip = colDef.headerTooltip;
- } else {
- self.headerTooltip = function ( col ) {
- return col.colDef.headerTooltip;
- };
- }
-
-
- /**
- * @ngdoc property
- * @name footerCellClass
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description footerCellClass can be a string specifying the class to append to a cell
- * or it can be a function(grid, row, col, rowRenderIndex, colRenderIndex) that returns a class name
- *
- */
- self.footerCellClass = colDef.footerCellClass;
-
- /**
- * @ngdoc property
- * @name cellClass
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description cellClass can be a string specifying the class to append to a cell
- * or it can be a function(grid, row, col, rowRenderIndex, colRenderIndex) that returns a class name
- *
- */
- self.cellClass = colDef.cellClass;
-
- /**
- * @ngdoc property
- * @name headerCellClass
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description headerCellClass can be a string specifying the class to append to a cell
- * or it can be a function(grid, row, col, rowRenderIndex, colRenderIndex) that returns a class name
- *
- */
- self.headerCellClass = colDef.headerCellClass;
-
- /**
- * @ngdoc property
- * @name cellFilter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description cellFilter is a filter to apply to the content of each cell
- * @example
- * <pre>
- * gridOptions.columnDefs[0].cellFilter = 'date'
- *
- */
- self.cellFilter = colDef.cellFilter ? colDef.cellFilter : "";
-
- /**
- * @ngdoc boolean
- * @name sortCellFiltered
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) False by default. When `true` uiGrid will apply the cellFilter before
- * sorting the data. Note that when using this option uiGrid will assume that the displayed value is
- * a string, and use the {@link ui.grid.class:RowSorter#sortAlpha sortAlpha} `sortFn`. It is possible
- * to return a non-string value from an angularjs filter, in which case you should define a {@link ui.grid.class:GridOptions.columnDef#sortingAlgorithm sortingAlgorithm}
- * for the column which hanldes the returned type. You may specify one of the `sortingAlgorithms`
- * found in the {@link ui.grid.RowSorter rowSorter} service.
- */
- self.sortCellFiltered = colDef.sortCellFiltered ? true : false;
-
- /**
- * @ngdoc boolean
- * @name filterCellFiltered
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) False by default. When `true` uiGrid will apply the cellFilter before
- * applying "search" `filters`.
- */
- self.filterCellFiltered = colDef.filterCellFiltered ? true : false;
-
- /**
- * @ngdoc property
- * @name headerCellFilter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description headerCellFilter is a filter to apply to the content of the column header
- * @example
- * <pre>
- * gridOptions.columnDefs[0].headerCellFilter = 'translate'
- *
- */
- self.headerCellFilter = colDef.headerCellFilter ? colDef.headerCellFilter : "";
-
- /**
- * @ngdoc property
- * @name footerCellFilter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description footerCellFilter is a filter to apply to the content of the column footer
- * @example
- * <pre>
- * gridOptions.columnDefs[0].footerCellFilter = 'date'
- *
- */
- self.footerCellFilter = colDef.footerCellFilter ? colDef.footerCellFilter : "";
-
- self.visible = gridUtil.isNullOrUndefined(colDef.visible) || colDef.visible;
-
- self.headerClass = colDef.headerClass;
- //self.cursor = self.sortable ? 'pointer' : 'default';
-
- // Turn on sorting by default
- self.enableSorting = typeof(colDef.enableSorting) !== 'undefined' ? colDef.enableSorting : self.grid.options.enableSorting;
- self.sortingAlgorithm = colDef.sortingAlgorithm;
-
- /**
- * @ngdoc property
- * @name sortDirectionCycle
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) An array of {@link ui.grid.service:uiGridConstants#properties_ASC sort directions},
- * specifying the order that they should cycle through as the user repeatedly clicks on the column heading.
- * The default is `[null, uiGridConstants.ASC, uiGridConstants.DESC]`. Null
- * refers to the unsorted state. This does not affect the initial sort
- * direction; use the {@link ui.grid.class:GridOptions.columnDef#sort sort}
- * property for that. If
- * {@link ui.grid.class:GridOptions.columnDef#suppressRemoveSort suppressRemoveSort}
- * is also set, the unsorted state will be skipped even if it is listed here.
- * Each direction may not appear in the list more than once (e.g. `[ASC,
- * DESC, DESC]` is not allowed), and the list may not be empty.
- */
- self.sortDirectionCycle = typeof(colDef.sortDirectionCycle) !== 'undefined' ?
- colDef.sortDirectionCycle :
- [null, uiGridConstants.ASC, uiGridConstants.DESC];
-
- /**
- * @ngdoc boolean
- * @name suppressRemoveSort
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) False by default. When enabled, this setting hides the removeSort option
- * in the menu, and prevents users from manually removing the sort
- */
- if ( typeof(self.suppressRemoveSort) === 'undefined'){
- self.suppressRemoveSort = typeof(colDef.suppressRemoveSort) !== 'undefined' ? colDef.suppressRemoveSort : false;
- }
-
- /**
- * @ngdoc property
- * @name enableFiltering
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description turn off filtering for an individual column, where
- * you've turned on filtering for the overall grid
- * @example
- * <pre>
- * gridOptions.columnDefs[0].enableFiltering = false;
- *
- */
- // Turn on filtering by default (it's disabled by default at the Grid level)
- self.enableFiltering = typeof(colDef.enableFiltering) !== 'undefined' ? colDef.enableFiltering : true;
-
- // self.menuItems = colDef.menuItems;
- self.setPropertyOrDefault(colDef, 'menuItems', []);
-
- // Use the column definition sort if we were passed it, but only if this is a newly added column
- if ( isNew ){
- self.setPropertyOrDefault(colDef, 'sort');
- }
-
- // Set up default filters array for when one is not provided.
- // In other words, this (in column def):
- //
- // filter: { term: 'something', flags: {}, condition: [CONDITION] }
- //
- // is just shorthand for this:
- //
- // filters: [{ term: 'something', flags: {}, condition: [CONDITION] }]
- //
- var defaultFilters = [];
- if (colDef.filter) {
- defaultFilters.push(colDef.filter);
- }
- else if ( colDef.filters ){
- defaultFilters = colDef.filters;
- } else {
- // Add an empty filter definition object, which will
- // translate to a guessed condition and no pre-populated
- // value for the filter <input>.
- defaultFilters.push({});
- }
-
- /**
- * @ngdoc property
- * @name filter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Specify a single filter field on this column.
- *
- * A filter consists of a condition, a term, and a placeholder:
- *
- * - condition defines how rows are chosen as matching the filter term. This can be set to
- * one of the constants in {@link ui.grid.service:uiGridConstants#properties_filter uiGridConstants.filter},
- * or you can supply a custom filter function
- * that gets passed the following arguments: [searchTerm, cellValue, row, column].
- * - term: If set, the filter field will be pre-populated
- * with this value.
- * - placeholder: String that will be set to the `<input>.placeholder` attribute.
- * - ariaLabel: String that will be set to the `<input>.ariaLabel` attribute. This is what is read as a label to screen reader users.
- * - noTerm: set this to true if you have defined a custom function in condition, and
- * your custom function doesn't require a term (so it can run even when the term is null)
- * - rawTerm: set this to true if you have defined a custom function in condition, and
- * your custom function requires access to the raw unmodified search term that was entered
- * - flags: only flag currently available is `caseSensitive`, set to false if you don't want
- * case sensitive matching
- * - type: defaults to {@link ui.grid.service:uiGridConstants#properties_filter uiGridConstants.filter.INPUT},
- * which gives a text box. If set to {@link ui.grid.service:uiGridConstants#properties_filter uiGridConstants.filter.SELECT}
- * then a select box will be shown with options selectOptions
- * - selectOptions: options in the format `[ { value: 1, label: 'male' }]`. No i18n filter is provided, you need
- * to perform the i18n on the values before you provide them
- * - disableCancelFilterButton: defaults to false. If set to true then the 'x' button that cancels/clears the filter
- * will not be shown.
- * @example
- * <pre>$scope.gridOptions.columnDefs = [
- * {
- * field: 'field1',
- * filter: {
- * term: 'xx',
- * condition: uiGridConstants.filter.STARTS_WITH,
- * placeholder: 'starts with...',
- * ariaLabel: 'Starts with filter for field1',
- * flags: { caseSensitive: false },
- * type: uiGridConstants.filter.SELECT,
- * selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ],
- * disableCancelFilterButton: true
- * }
- * }
- * ]; </pre>
- *
- */
-
- /*
-
-
- /*
-
- self.filters = [
- {
- term: 'search term'
- condition: uiGridConstants.filter.CONTAINS,
- placeholder: 'my placeholder',
- ariaLabel: 'Starts with filter for field1',
- flags: {
- caseSensitive: true
- }
- }
- ]
-
- */
-
- // Only set filter if this is a newly added column, if we're updating an existing
- // column then we don't want to put the default filter back if the user may have already
- // removed it.
- // However, we do want to keep the settings if they change, just not the term
- if ( isNew ) {
- self.setPropertyOrDefault(colDef, 'filter');
- self.setPropertyOrDefault(colDef, 'extraStyle');
- self.setPropertyOrDefault(colDef, 'filters', defaultFilters);
- } else if ( self.filters.length === defaultFilters.length ) {
- self.filters.forEach( function( filter, index ){
- if (typeof(defaultFilters[index].placeholder) !== 'undefined') {
- filter.placeholder = defaultFilters[index].placeholder;
- }
- if (typeof(defaultFilters[index].ariaLabel) !== 'undefined') {
- filter.ariaLabel = defaultFilters[index].ariaLabel;
- }
- if (typeof(defaultFilters[index].flags) !== 'undefined') {
- filter.flags = defaultFilters[index].flags;
- }
- if (typeof(defaultFilters[index].type) !== 'undefined') {
- filter.type = defaultFilters[index].type;
- }
- if (typeof(defaultFilters[index].selectOptions) !== 'undefined') {
- filter.selectOptions = defaultFilters[index].selectOptions;
- }
- });
- }
- };
-
- /**
- * @ngdoc function
- * @name unsort
- * @methodOf ui.grid.class:GridColumn
- * @description Removes column from the grid sorting
- */
- GridColumn.prototype.unsort = function () {
- this.sort = {};
- this.grid.api.core.raise.sortChanged( this.grid, this.grid.getColumnSorting() );
- };
-
-
- /**
- * @ngdoc function
- * @name getColClass
- * @methodOf ui.grid.class:GridColumn
- * @description Returns the class name for the column
- * @param {bool} prefixDot if true, will return .className instead of className
- */
- GridColumn.prototype.getColClass = function (prefixDot) {
- var cls = uiGridConstants.COL_CLASS_PREFIX + this.uid;
-
- return prefixDot ? '.' + cls : cls;
- };
-
- /**
- * @ngdoc function
- * @name isPinnedLeft
- * @methodOf ui.grid.class:GridColumn
- * @description Returns true if column is in the left render container
- */
- GridColumn.prototype.isPinnedLeft = function () {
- return this.renderContainer === 'left';
- };
-
- /**
- * @ngdoc function
- * @name isPinnedRight
- * @methodOf ui.grid.class:GridColumn
- * @description Returns true if column is in the right render container
- */
- GridColumn.prototype.isPinnedRight = function () {
- return this.renderContainer === 'right';
- };
-
-
- /**
- * @ngdoc function
- * @name getColClassDefinition
- * @methodOf ui.grid.class:GridColumn
- * @description Returns the class definition for th column
- */
- GridColumn.prototype.getColClassDefinition = function () {
- return ' .grid' + this.grid.id + ' ' + this.getColClass(true) + ' { min-width: ' + this.drawnWidth + 'px; max-width: ' + this.drawnWidth + 'px; }';
- };
-
- /**
- * @ngdoc function
- * @name getRenderContainer
- * @methodOf ui.grid.class:GridColumn
- * @description Returns the render container object that this column belongs to.
- *
- * Columns will be default be in the `body` render container if they aren't allocated to one specifically.
- */
- GridColumn.prototype.getRenderContainer = function getRenderContainer() {
- var self = this;
-
- var containerId = self.renderContainer;
-
- if (containerId === null || containerId === '' || containerId === undefined) {
- containerId = 'body';
- }
-
- return self.grid.renderContainers[containerId];
- };
-
- /**
- * @ngdoc function
- * @name showColumn
- * @methodOf ui.grid.class:GridColumn
- * @description Makes the column visible by setting colDef.visible = true
- */
- GridColumn.prototype.showColumn = function() {
- this.colDef.visible = true;
- };
-
-
- /**
- * @ngdoc property
- * @name aggregationHideLabel
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description defaults to false, if set to true hides the label text
- * in the aggregation footer, so only the value is displayed.
- *
- */
- /**
- * @ngdoc function
- * @name getAggregationText
- * @methodOf ui.grid.class:GridColumn
- * @description Gets the aggregation label from colDef.aggregationLabel if
- * specified or by using i18n, including deciding whether or not to display
- * based on colDef.aggregationHideLabel.
- *
- * @param {string} label the i18n lookup value to use for the column label
- *
- */
- GridColumn.prototype.getAggregationText = function () {
- var self = this;
- if ( self.colDef.aggregationHideLabel ){
- return '';
- }
- else if ( self.colDef.aggregationLabel ) {
- return self.colDef.aggregationLabel;
- }
- else {
- switch ( self.colDef.aggregationType ){
- case uiGridConstants.aggregationTypes.count:
- return i18nService.getSafeText('aggregation.count');
- case uiGridConstants.aggregationTypes.sum:
- return i18nService.getSafeText('aggregation.sum');
- case uiGridConstants.aggregationTypes.avg:
- return i18nService.getSafeText('aggregation.avg');
- case uiGridConstants.aggregationTypes.min:
- return i18nService.getSafeText('aggregation.min');
- case uiGridConstants.aggregationTypes.max:
- return i18nService.getSafeText('aggregation.max');
- default:
- return '';
- }
- }
- };
-
- GridColumn.prototype.getCellTemplate = function () {
- var self = this;
-
- return self.cellTemplatePromise;
- };
-
- GridColumn.prototype.getCompiledElementFn = function () {
- var self = this;
-
- return self.compiledElementFnDefer.promise;
- };
-
- return GridColumn;
-}]);
-
-})();
-
- (function(){
-
-angular.module('ui.grid')
-.factory('GridOptions', ['gridUtil','uiGridConstants', function(gridUtil,uiGridConstants) {
-
- /**
- * @ngdoc function
- * @name ui.grid.class:GridOptions
- * @description Default GridOptions class. GridOptions are defined by the application developer and overlaid
- * over this object. Setting gridOptions within your controller is the most common method for an application
- * developer to configure the behaviour of their ui-grid
- *
- * @example To define your gridOptions within your controller:
- * <pre>$scope.gridOptions = {
- * data: $scope.myData,
- * columnDefs: [
- * { name: 'field1', displayName: 'pretty display name' },
- * { name: 'field2', visible: false }
- * ]
- * };</pre>
- *
- * You can then use this within your html template, when you define your grid:
- * <pre>&lt;div ui-grid="gridOptions"&gt;&lt;/div&gt;</pre>
- *
- * To provide default options for all of the grids within your application, use an angular
- * decorator to modify the GridOptions factory.
- * <pre>
- * app.config(function($provide){
- * $provide.decorator('GridOptions',function($delegate){
- * var gridOptions;
- * gridOptions = angular.copy($delegate);
- * gridOptions.initialize = function(options) {
- * var initOptions;
- * initOptions = $delegate.initialize(options);
- * initOptions.enableColumnMenus = false;
- * return initOptions;
- * };
- * return gridOptions;
- * });
- * });
- * </pre>
- */
- return {
- initialize: function( baseOptions ){
- /**
- * @ngdoc function
- * @name onRegisterApi
- * @propertyOf ui.grid.class:GridOptions
- * @description A callback that returns the gridApi once the grid is instantiated, which is
- * then used to interact with the grid programatically.
- *
- * Note that the gridApi.core.renderingComplete event is identical to this
- * callback, but has the advantage that it can be called from multiple places
- * if needed
- *
- * @example
- * <pre>
- * $scope.gridOptions.onRegisterApi = function ( gridApi ) {
- * $scope.gridApi = gridApi;
- * $scope.gridApi.selection.selectAllRows( $scope.gridApi.grid );
- * };
- * </pre>
- *
- */
- baseOptions.onRegisterApi = baseOptions.onRegisterApi || angular.noop();
-
- /**
- * @ngdoc object
- * @name data
- * @propertyOf ui.grid.class:GridOptions
- * @description (mandatory) Array of data to be rendered into the grid, providing the data source or data binding for
- * the grid.
- *
- * Most commonly the data is an array of objects, where each object has a number of attributes.
- * Each attribute automatically becomes a column in your grid. This array could, for example, be sourced from
- * an angularJS $resource query request. The array can also contain complex objects, refer the binding tutorial
- * for examples of that.
- *
- * The most flexible usage is to set your data on $scope:
- *
- * `$scope.data = data;`
- *
- * And then direct the grid to resolve whatever is in $scope.data:
- *
- * `$scope.gridOptions.data = 'data';`
- *
- * This is the most flexible approach as it allows you to replace $scope.data whenever you feel like it without
- * getting pointer issues.
- *
- * Alternatively you can directly set the data array:
- *
- * `$scope.gridOptions.data = [ ];`
- * or
- *
- * `$http.get('/data/100.json')
- * .success(function(data) {
- * $scope.myData = data;
- * $scope.gridOptions.data = $scope.myData;
- * });`
- *
- * Where you do this, you need to take care in updating the data - you can't just update `$scope.myData` to some other
- * array, you need to update $scope.gridOptions.data to point to that new array as well.
- *
- */
- baseOptions.data = baseOptions.data || [];
-
- /**
- * @ngdoc array
- * @name columnDefs
- * @propertyOf ui.grid.class:GridOptions
- * @description Array of columnDef objects. Only required property is name.
- * The individual options available in columnDefs are documented in the
- * {@link ui.grid.class:GridOptions.columnDef columnDef} section
- * </br>_field property can be used in place of name for backwards compatibility with 2.x_
- * @example
- *
- * <pre>var columnDefs = [{name:'field1'}, {name:'field2'}];</pre>
- *
- */
- baseOptions.columnDefs = baseOptions.columnDefs || [];
-
- /**
- * @ngdoc object
- * @name ui.grid.class:GridOptions.columnDef
- * @description Definition / configuration of an individual column, which would typically be
- * one of many column definitions within the gridOptions.columnDefs array
- * @example
- * <pre>{name:'field1', field: 'field1', filter: { term: 'xxx' }}</pre>
- *
- */
-
-
- /**
- * @ngdoc array
- * @name excludeProperties
- * @propertyOf ui.grid.class:GridOptions
- * @description Array of property names in data to ignore when auto-generating column names. Provides the
- * inverse of columnDefs - columnDefs is a list of columns to include, excludeProperties is a list of columns
- * to exclude.
- *
- * If columnDefs is defined, this will be ignored.
- *
- * Defaults to ['$$hashKey']
- */
-
- baseOptions.excludeProperties = baseOptions.excludeProperties || ['$$hashKey'];
-
- /**
- * @ngdoc boolean
- * @name enableRowHashing
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, this setting allows uiGrid to add
- * `$$hashKey`-type properties (similar to Angular) to elements in the `data` array. This allows
- * the grid to maintain state while vastly speeding up the process of altering `data` by adding/moving/removing rows.
- *
- * Note that this DOES add properties to your data that you may not want, but they are stripped out when using `angular.toJson()`. IF
- * you do not want this at all you can disable this setting but you will take a performance hit if you are using large numbers of rows
- * and are altering the data set often.
- */
- baseOptions.enableRowHashing = baseOptions.enableRowHashing !== false;
-
- /**
- * @ngdoc function
- * @name rowIdentity
- * @methodOf ui.grid.class:GridOptions
- * @description This function is used to get and, if necessary, set the value uniquely identifying this row (i.e. if an identity is not present it will set one).
- *
- * By default it returns the `$$hashKey` property if it exists. If it doesn't it uses gridUtil.nextUid() to generate one
- */
- baseOptions.rowIdentity = baseOptions.rowIdentity || function rowIdentity(row) {
- return gridUtil.hashKey(row);
- };
-
- /**
- * @ngdoc function
- * @name getRowIdentity
- * @methodOf ui.grid.class:GridOptions
- * @description This function returns the identity value uniquely identifying this row, if one is not present it does not set it.
- *
- * By default it returns the `$$hashKey` property but can be overridden to use any property or set of properties you want.
- */
- baseOptions.getRowIdentity = baseOptions.getRowIdentity || function getRowIdentity(row) {
- return row.$$hashKey;
- };
-
- /**
- * @ngdoc property
- * @name flatEntityAccess
- * @propertyOf ui.grid.class:GridOptions
- * @description Set to true if your columns are all related directly to fields in a flat object structure - i.e.
- * each of your columns associate directly with a property on each of the entities in your data array.
- *
- * In that situation we can avoid all the logic associated with complex binding to functions or to properties of sub-objects,
- * which can provide a significant speed improvement with large data sets when filtering or sorting.
- *
- * By default false
- */
- baseOptions.flatEntityAccess = baseOptions.flatEntityAccess === true;
-
- /**
- * @ngdoc property
- * @name showHeader
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When set to false, this setting will replace the
- * standard header template with '<div></div>', resulting in no header being shown.
- */
- baseOptions.showHeader = typeof(baseOptions.showHeader) !== "undefined" ? baseOptions.showHeader : true;
-
- /* (NOTE): Don't show this in the docs. We only use it internally
- * @ngdoc property
- * @name headerRowHeight
- * @propertyOf ui.grid.class:GridOptions
- * @description The height of the header in pixels, defaults to 30
- *
- */
- if (!baseOptions.showHeader) {
- baseOptions.headerRowHeight = 0;
- }
- else {
- baseOptions.headerRowHeight = typeof(baseOptions.headerRowHeight) !== "undefined" ? baseOptions.headerRowHeight : 30;
- }
-
- /**
- * @ngdoc property
- * @name rowHeight
- * @propertyOf ui.grid.class:GridOptions
- * @description The height of the row in pixels, Can be passed as integer or string. defaults to 30.
- *
- */
-
- if (typeof baseOptions.rowHeight === "string") {
- baseOptions.rowHeight = parseInt(baseOptions.rowHeight) || 30;
- }
-
- else {
- baseOptions.rowHeight = baseOptions.rowHeight || 30;
- }
-
- /**
- * @ngdoc integer
- * @name minRowsToShow
- * @propertyOf ui.grid.class:GridOptions
- * @description Minimum number of rows to show when the grid doesn't have a defined height. Defaults to "10".
- */
- baseOptions.minRowsToShow = typeof(baseOptions.minRowsToShow) !== "undefined" ? baseOptions.minRowsToShow : 10;
-
- /**
- * @ngdoc property
- * @name showGridFooter
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether or not to show the footer, defaults to false
- * The footer display Total Rows and Visible Rows (filtered rows)
- */
- baseOptions.showGridFooter = baseOptions.showGridFooter === true;
-
- /**
- * @ngdoc property
- * @name showColumnFooter
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether or not to show the column footer, defaults to false
- * The column footer displays column aggregates
- */
- baseOptions.showColumnFooter = baseOptions.showColumnFooter === true;
-
- /**
- * @ngdoc property
- * @name columnFooterHeight
- * @propertyOf ui.grid.class:GridOptions
- * @description The height of the footer rows (column footer and grid footer) in pixels
- *
- */
- baseOptions.columnFooterHeight = typeof(baseOptions.columnFooterHeight) !== "undefined" ? baseOptions.columnFooterHeight : 30;
- baseOptions.gridFooterHeight = typeof(baseOptions.gridFooterHeight) !== "undefined" ? baseOptions.gridFooterHeight : 30;
-
- baseOptions.columnWidth = typeof(baseOptions.columnWidth) !== "undefined" ? baseOptions.columnWidth : 50;
-
- /**
- * @ngdoc property
- * @name maxVisibleColumnCount
- * @propertyOf ui.grid.class:GridOptions
- * @description Defaults to 200
- *
- */
- baseOptions.maxVisibleColumnCount = typeof(baseOptions.maxVisibleColumnCount) !== "undefined" ? baseOptions.maxVisibleColumnCount : 200;
-
- /**
- * @ngdoc property
- * @name virtualizationThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Turn virtualization on when number of data elements goes over this number, defaults to 20
- */
- baseOptions.virtualizationThreshold = typeof(baseOptions.virtualizationThreshold) !== "undefined" ? baseOptions.virtualizationThreshold : 20;
-
- /**
- * @ngdoc property
- * @name columnVirtualizationThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Turn virtualization on when number of columns goes over this number, defaults to 10
- */
- baseOptions.columnVirtualizationThreshold = typeof(baseOptions.columnVirtualizationThreshold) !== "undefined" ? baseOptions.columnVirtualizationThreshold : 10;
-
- /**
- * @ngdoc property
- * @name excessRows
- * @propertyOf ui.grid.class:GridOptions
- * @description Extra rows to to render outside of the viewport, which helps with smoothness of scrolling.
- * Defaults to 4
- */
- baseOptions.excessRows = typeof(baseOptions.excessRows) !== "undefined" ? baseOptions.excessRows : 4;
- /**
- * @ngdoc property
- * @name scrollThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Defaults to 4
- */
- baseOptions.scrollThreshold = typeof(baseOptions.scrollThreshold) !== "undefined" ? baseOptions.scrollThreshold : 4;
-
- /**
- * @ngdoc property
- * @name excessColumns
- * @propertyOf ui.grid.class:GridOptions
- * @description Extra columns to to render outside of the viewport, which helps with smoothness of scrolling.
- * Defaults to 4
- */
- baseOptions.excessColumns = typeof(baseOptions.excessColumns) !== "undefined" ? baseOptions.excessColumns : 4;
- /**
- * @ngdoc property
- * @name horizontalScrollThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Defaults to 4
- */
- baseOptions.horizontalScrollThreshold = typeof(baseOptions.horizontalScrollThreshold) !== "undefined" ? baseOptions.horizontalScrollThreshold : 2;
-
-
- /**
- * @ngdoc property
- * @name aggregationCalcThrottle
- * @propertyOf ui.grid.class:GridOptions
- * @description Default time in milliseconds to throttle aggregation calcuations, defaults to 500ms
- */
- baseOptions.aggregationCalcThrottle = typeof(baseOptions.aggregationCalcThrottle) !== "undefined" ? baseOptions.aggregationCalcThrottle : 500;
-
- /**
- * @ngdoc property
- * @name wheelScrollThrottle
- * @propertyOf ui.grid.class:GridOptions
- * @description Default time in milliseconds to throttle scroll events to, defaults to 70ms
- */
- baseOptions.wheelScrollThrottle = typeof(baseOptions.wheelScrollThrottle) !== "undefined" ? baseOptions.wheelScrollThrottle : 70;
-
-
- /**
- * @ngdoc property
- * @name scrollDebounce
- * @propertyOf ui.grid.class:GridOptions
- * @description Default time in milliseconds to debounce scroll events, defaults to 300ms
- */
- baseOptions.scrollDebounce = typeof(baseOptions.scrollDebounce) !== "undefined" ? baseOptions.scrollDebounce : 300;
-
- /**
- * @ngdoc boolean
- * @name enableSorting
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, this setting adds sort
- * widgets to the column headers, allowing sorting of the data for the entire grid.
- * Sorting can then be disabled / enabled on individual columns using the columnDefs,
- * if it set, it will override GridOptions enableSorting setting.
- */
- baseOptions.enableSorting = baseOptions.enableSorting !== false;
-
- /**
- * @ngdoc boolean
- * @name enableFiltering
- * @propertyOf ui.grid.class:GridOptions
- * @description False by default. When enabled, this setting adds filter
- * boxes to each column header, allowing filtering within the column for the entire grid.
- * Filtering can then be disabled on individual columns using the columnDefs.
- */
- baseOptions.enableFiltering = baseOptions.enableFiltering === true;
-
- /**
- * @ngdoc boolean
- * @name enableColumnMenus
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, this setting displays a column
- * menu within each column.
- */
- baseOptions.enableColumnMenus = baseOptions.enableColumnMenus !== false;
-
- /**
- * @ngdoc boolean
- * @name enableVerticalScrollbar
- * @propertyOf ui.grid.class:GridOptions
- * @description {@link ui.grid.service:uiGridConstants#properties_scrollbars uiGridConstants.scrollbars.ALWAYS} by default.
- * This settings controls the vertical scrollbar for the grid.
- * Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER
- */
- baseOptions.enableVerticalScrollbar = typeof(baseOptions.enableVerticalScrollbar) !== "undefined" ? baseOptions.enableVerticalScrollbar : uiGridConstants.scrollbars.ALWAYS;
-
- /**
- * @ngdoc boolean
- * @name enableHorizontalScrollbar
- * @propertyOf ui.grid.class:GridOptions
- * @description {@link ui.grid.service:uiGridConstants#properties_scrollbars uiGridConstants.scrollbars.ALWAYS} by default.
- * This settings controls the horizontal scrollbar for the grid.
- * Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER
- */
- baseOptions.enableHorizontalScrollbar = typeof(baseOptions.enableHorizontalScrollbar) !== "undefined" ? baseOptions.enableHorizontalScrollbar : uiGridConstants.scrollbars.ALWAYS;
-
- /**
- * @ngdoc boolean
- * @name enableMinHeightCheck
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, a newly initialized grid will check to see if it is tall enough to display
- * at least one row of data. If the grid is not tall enough, it will resize the DOM element to display minRowsToShow number
- * of rows.
- */
- baseOptions.enableMinHeightCheck = baseOptions.enableMinHeightCheck !== false;
-
- /**
- * @ngdoc boolean
- * @name minimumColumnSize
- * @propertyOf ui.grid.class:GridOptions
- * @description Columns can't be smaller than this, defaults to 10 pixels
- */
- baseOptions.minimumColumnSize = typeof(baseOptions.minimumColumnSize) !== "undefined" ? baseOptions.minimumColumnSize : 10;
-
- /**
- * @ngdoc function
- * @name rowEquality
- * @methodOf ui.grid.class:GridOptions
- * @description By default, rows are compared using object equality. This option can be overridden
- * to compare on any data item property or function
- * @param {object} entityA First Data Item to compare
- * @param {object} entityB Second Data Item to compare
- */
- baseOptions.rowEquality = baseOptions.rowEquality || function(entityA, entityB) {
- return entityA === entityB;
- };
-
- /**
- * @ngdoc string
- * @name headerTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description Null by default. When provided, this setting uses a custom header
- * template, rather than the default template. Can be set to either the name of a template file:
- * <pre> $scope.gridOptions.headerTemplate = 'header_template.html';</pre>
- * inline html
- * <pre> $scope.gridOptions.headerTemplate = '<div class="ui-grid-top-panel" style="text-align: center">I am a Custom Grid Header</div>'</pre>
- * or the id of a precompiled template (TBD how to use this).
- * </br>Refer to the custom header tutorial for more information.
- * If you want no header at all, you can set to an empty div:
- * <pre> $scope.gridOptions.headerTemplate = '<div></div>';</pre>
- *
- * If you want to only have a static header, then you can set to static content. If
- * you want to tailor the existing column headers, then you should look at the
- * current 'ui-grid-header.html' template in github as your starting point.
- *
- */
- baseOptions.headerTemplate = baseOptions.headerTemplate || null;
-
- /**
- * @ngdoc string
- * @name footerTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) ui-grid/ui-grid-footer by default. This footer shows the per-column
- * aggregation totals.
- * When provided, this setting uses a custom footer template. Can be set to either the name of a template file 'footer_template.html', inline html
- * <pre>'<div class="ui-grid-bottom-panel" style="text-align: center">I am a Custom Grid Footer</div>'</pre>, or the id
- * of a precompiled template (TBD how to use this). Refer to the custom footer tutorial for more information.
- */
- baseOptions.footerTemplate = baseOptions.footerTemplate || 'ui-grid/ui-grid-footer';
-
- /**
- * @ngdoc string
- * @name gridFooterTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) ui-grid/ui-grid-grid-footer by default. This template by default shows the
- * total items at the bottom of the grid, and the selected items if selection is enabled.
- */
- baseOptions.gridFooterTemplate = baseOptions.gridFooterTemplate || 'ui-grid/ui-grid-grid-footer';
-
- /**
- * @ngdoc string
- * @name rowTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description 'ui-grid/ui-grid-row' by default. When provided, this setting uses a
- * custom row template. Can be set to either the name of a template file:
- * <pre> $scope.gridOptions.rowTemplate = 'row_template.html';</pre>
- * inline html
- * <pre> $scope.gridOptions.rowTemplate = '<div style="background-color: aquamarine" ng-click="grid.appScope.fnOne(row)" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ui-grid-cell></div>';</pre>
- * or the id of a precompiled template (TBD how to use this) can be provided.
- * </br>Refer to the custom row template tutorial for more information.
- */
- baseOptions.rowTemplate = baseOptions.rowTemplate || 'ui-grid/ui-grid-row';
-
- /**
- * @ngdoc string
- * @name gridMenuTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description 'ui-grid/uiGridMenu' by default. When provided, this setting uses a
- * custom grid menu template.
- */
- baseOptions.gridMenuTemplate = baseOptions.gridMenuTemplate || 'ui-grid/uiGridMenu';
-
- /**
- * @ngdoc object
- * @name appScopeProvider
- * @propertyOf ui.grid.class:GridOptions
- * @description by default, the parent scope of the ui-grid element will be assigned to grid.appScope
- * this property allows you to assign any reference you want to grid.appScope
- */
- baseOptions.appScopeProvider = baseOptions.appScopeProvider || null;
-
- return baseOptions;
- }
- };
-
-
-}]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-
- /**
- * @ngdoc function
- * @name ui.grid.class:GridRenderContainer
- * @description The grid has render containers, allowing the ability to have pinned columns. If the grid
- * is right-to-left then there may be a right render container, if left-to-right then there may
- * be a left render container. There is always a body render container.
- * @param {string} name The name of the render container ('body', 'left', or 'right')
- * @param {Grid} grid the grid the render container is in
- * @param {object} options the render container options
- */
-.factory('GridRenderContainer', ['gridUtil', 'uiGridConstants', function(gridUtil, uiGridConstants) {
- function GridRenderContainer(name, grid, options) {
- var self = this;
-
- // if (gridUtil.type(grid) !== 'Grid') {
- // throw new Error('Grid argument is not a Grid object');
- // }
-
- self.name = name;
-
- self.grid = grid;
-
- // self.rowCache = [];
- // self.columnCache = [];
-
- self.visibleRowCache = [];
- self.visibleColumnCache = [];
-
- self.renderedRows = [];
- self.renderedColumns = [];
-
- self.prevScrollTop = 0;
- self.prevScrolltopPercentage = 0;
- self.prevRowScrollIndex = 0;
-
- self.prevScrollLeft = 0;
- self.prevScrollleftPercentage = 0;
- self.prevColumnScrollIndex = 0;
-
- self.columnStyles = "";
-
- self.viewportAdjusters = [];
-
- /**
- * @ngdoc boolean
- * @name hasHScrollbar
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description flag to signal that container has a horizontal scrollbar
- */
- self.hasHScrollbar = false;
-
- /**
- * @ngdoc boolean
- * @name hasVScrollbar
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description flag to signal that container has a vertical scrollbar
- */
- self.hasVScrollbar = false;
-
- /**
- * @ngdoc boolean
- * @name canvasHeightShouldUpdate
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description flag to signal that container should recalculate the canvas size
- */
- self.canvasHeightShouldUpdate = true;
-
- /**
- * @ngdoc boolean
- * @name canvasHeight
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description last calculated canvas height value
- */
- self.$$canvasHeight = 0;
-
- if (options && angular.isObject(options)) {
- angular.extend(self, options);
- }
-
- grid.registerStyleComputation({
- priority: 5,
- func: function () {
- self.updateColumnWidths();
- return self.columnStyles;
- }
- });
- }
-
-
- GridRenderContainer.prototype.reset = function reset() {
- // this.rowCache.length = 0;
- // this.columnCache.length = 0;
-
- this.visibleColumnCache.length = 0;
- this.visibleRowCache.length = 0;
-
- this.renderedRows.length = 0;
- this.renderedColumns.length = 0;
- };
-
- // TODO(c0bra): calculate size?? Should this be in a stackable directive?
-
-
- GridRenderContainer.prototype.containsColumn = function (col) {
- return this.visibleColumnCache.indexOf(col) !== -1;
- };
-
- GridRenderContainer.prototype.minRowsToRender = function minRowsToRender() {
- var self = this;
- var minRows = 0;
- var rowAddedHeight = 0;
- var viewPortHeight = self.getViewportHeight();
- for (var i = self.visibleRowCache.length - 1; rowAddedHeight < viewPortHeight && i >= 0; i--) {
- rowAddedHeight += self.visibleRowCache[i].height;
- minRows++;
- }
- return minRows;
- };
-
- GridRenderContainer.prototype.minColumnsToRender = function minColumnsToRender() {
- var self = this;
- var viewportWidth = this.getViewportWidth();
-
- var min = 0;
- var totalWidth = 0;
- // self.columns.forEach(function(col, i) {
- for (var i = 0; i < self.visibleColumnCache.length; i++) {
- var col = self.visibleColumnCache[i];
-
- if (totalWidth < viewportWidth) {
- totalWidth += col.drawnWidth ? col.drawnWidth : 0;
- min++;
- }
- else {
- var currWidth = 0;
- for (var j = i; j >= i - min; j--) {
- currWidth += self.visibleColumnCache[j].drawnWidth ? self.visibleColumnCache[j].drawnWidth : 0;
- }
- if (currWidth < viewportWidth) {
- min++;
- }
- }
- }
-
- return min;
- };
-
- GridRenderContainer.prototype.getVisibleRowCount = function getVisibleRowCount() {
- return this.visibleRowCache.length;
- };
-
- /**
- * @ngdoc function
- * @name registerViewportAdjuster
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Registers an adjuster to the render container's available width or height. Adjusters are used
- * to tell the render container that there is something else consuming space, and to adjust it's size
- * appropriately.
- * @param {function} func the adjuster function we want to register
- */
-
- GridRenderContainer.prototype.registerViewportAdjuster = function registerViewportAdjuster(func) {
- this.viewportAdjusters.push(func);
- };
-
- /**
- * @ngdoc function
- * @name removeViewportAdjuster
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Removes an adjuster, should be used when your element is destroyed
- * @param {function} func the adjuster function we want to remove
- */
- GridRenderContainer.prototype.removeViewportAdjuster = function removeViewportAdjuster(func) {
- var idx = this.viewportAdjusters.indexOf(func);
-
- if (idx > -1) {
- this.viewportAdjusters.splice(idx, 1);
- }
- };
-
- /**
- * @ngdoc function
- * @name getViewportAdjustment
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Gets the adjustment based on the viewportAdjusters.
- * @returns {object} a hash of { height: x, width: y }. Usually the values will be negative
- */
- GridRenderContainer.prototype.getViewportAdjustment = function getViewportAdjustment() {
- var self = this;
-
- var adjustment = { height: 0, width: 0 };
-
- self.viewportAdjusters.forEach(function (func) {
- adjustment = func.call(this, adjustment);
- });
-
- return adjustment;
- };
-
- GridRenderContainer.prototype.getMargin = function getMargin(side) {
- var self = this;
-
- var amount = 0;
-
- self.viewportAdjusters.forEach(function (func) {
- var adjustment = func.call(this, { height: 0, width: 0 });
-
- if (adjustment.side && adjustment.side === side) {
- amount += adjustment.width * -1;
- }
- });
-
- return amount;
- };
-
- GridRenderContainer.prototype.getViewportHeight = function getViewportHeight() {
- var self = this;
-
- var headerHeight = (self.headerHeight) ? self.headerHeight : self.grid.headerHeight;
-
- var viewPortHeight = self.grid.gridHeight - headerHeight - self.grid.footerHeight;
-
-
- var adjustment = self.getViewportAdjustment();
-
- viewPortHeight = viewPortHeight + adjustment.height;
-
- return viewPortHeight;
- };
-
- GridRenderContainer.prototype.getViewportWidth = function getViewportWidth() {
- var self = this;
-
- var viewportWidth = self.grid.gridWidth;
-
- //if (typeof(self.grid.verticalScrollbarWidth) !== 'undefined' && self.grid.verticalScrollbarWidth !== undefined && self.grid.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth - self.grid.verticalScrollbarWidth;
- //}
-
- // var viewportWidth = 0;\
- // self.visibleColumnCache.forEach(function (column) {
- // viewportWidth += column.drawnWidth;
- // });
-
- var adjustment = self.getViewportAdjustment();
-
- viewportWidth = viewportWidth + adjustment.width;
-
- return viewportWidth;
- };
-
- GridRenderContainer.prototype.getHeaderViewportWidth = function getHeaderViewportWidth() {
- var self = this;
-
- var viewportWidth = this.getViewportWidth();
-
- //if (typeof(self.grid.verticalScrollbarWidth) !== 'undefined' && self.grid.verticalScrollbarWidth !== undefined && self.grid.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth + self.grid.verticalScrollbarWidth;
- //}
-
- // var adjustment = self.getViewportAdjustment();
- // viewPortWidth = viewPortWidth + adjustment.width;
-
- return viewportWidth;
- };
-
-
- /**
- * @ngdoc function
- * @name getCanvasHeight
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Returns the total canvas height. Only recalculates if canvasHeightShouldUpdate = false
- * @returns {number} total height of all the visible rows in the container
- */
- GridRenderContainer.prototype.getCanvasHeight = function getCanvasHeight() {
- var self = this;
-
- if (!self.canvasHeightShouldUpdate) {
- return self.$$canvasHeight;
- }
-
- var oldCanvasHeight = self.$$canvasHeight;
-
- self.$$canvasHeight = 0;
-
- self.visibleRowCache.forEach(function(row){
- self.$$canvasHeight += row.height;
- });
-
-
- self.canvasHeightShouldUpdate = false;
-
- self.grid.api.core.raise.canvasHeightChanged(oldCanvasHeight, self.$$canvasHeight);
-
- return self.$$canvasHeight;
- };
-
- GridRenderContainer.prototype.getVerticalScrollLength = function getVerticalScrollLength() {
- return this.getCanvasHeight() - this.getViewportHeight() + this.grid.scrollbarHeight !== 0 ? this.getCanvasHeight() - this.getViewportHeight() + this.grid.scrollbarHeight : -1;
- };
-
- GridRenderContainer.prototype.getHorizontalScrollLength = function getHorizontalScrollLength() {
- return this.getCanvasWidth() - this.getViewportWidth() + this.grid.scrollbarWidth !== 0 ? this.getCanvasWidth() - this.getViewportWidth() + this.grid.scrollbarWidth : -1;
- };
-
- GridRenderContainer.prototype.getCanvasWidth = function getCanvasWidth() {
- var self = this;
-
- var ret = self.canvasWidth;
-
- return ret;
- };
-
- GridRenderContainer.prototype.setRenderedRows = function setRenderedRows(newRows) {
- this.renderedRows.length = newRows.length;
- for (var i = 0; i < newRows.length; i++) {
- this.renderedRows[i] = newRows[i];
- }
- };
-
- GridRenderContainer.prototype.setRenderedColumns = function setRenderedColumns(newColumns) {
- var self = this;
-
- // OLD:
- this.renderedColumns.length = newColumns.length;
- for (var i = 0; i < newColumns.length; i++) {
- this.renderedColumns[i] = newColumns[i];
- }
-
- this.updateColumnOffset();
- };
-
- GridRenderContainer.prototype.updateColumnOffset = function updateColumnOffset() {
- // Calculate the width of the columns on the left side that are no longer rendered.
- // That will be the offset for the columns as we scroll horizontally.
- var hiddenColumnsWidth = 0;
- for (var i = 0; i < this.currentFirstColumn; i++) {
- hiddenColumnsWidth += this.visibleColumnCache[i].drawnWidth;
- }
-
- this.columnOffset = hiddenColumnsWidth;
- };
-
- GridRenderContainer.prototype.scrollVertical = function (newScrollTop) {
- var vertScrollPercentage = -1;
-
- if (newScrollTop !== this.prevScrollTop) {
- var yDiff = newScrollTop - this.prevScrollTop;
-
- if (yDiff > 0 ) { this.grid.scrollDirection = uiGridConstants.scrollDirection.DOWN; }
- if (yDiff < 0 ) { this.grid.scrollDirection = uiGridConstants.scrollDirection.UP; }
-
- var vertScrollLength = this.getVerticalScrollLength();
-
- vertScrollPercentage = newScrollTop / vertScrollLength;
-
- // console.log('vert', vertScrollPercentage, newScrollTop, vertScrollLength);
-
- if (vertScrollPercentage > 1) { vertScrollPercentage = 1; }
- if (vertScrollPercentage < 0) { vertScrollPercentage = 0; }
-
- this.adjustScrollVertical(newScrollTop, vertScrollPercentage);
- return vertScrollPercentage;
- }
- };
-
- GridRenderContainer.prototype.scrollHorizontal = function(newScrollLeft){
- var horizScrollPercentage = -1;
-
- // Handle RTL here
-
- if (newScrollLeft !== this.prevScrollLeft) {
- var xDiff = newScrollLeft - this.prevScrollLeft;
-
- if (xDiff > 0) { this.grid.scrollDirection = uiGridConstants.scrollDirection.RIGHT; }
- if (xDiff < 0) { this.grid.scrollDirection = uiGridConstants.scrollDirection.LEFT; }
-
- var horizScrollLength = this.getHorizontalScrollLength();
- if (horizScrollLength !== 0) {
- horizScrollPercentage = newScrollLeft / horizScrollLength;
- }
- else {
- horizScrollPercentage = 0;
- }
-
- this.adjustScrollHorizontal(newScrollLeft, horizScrollPercentage);
- return horizScrollPercentage;
- }
- };
-
- GridRenderContainer.prototype.adjustScrollVertical = function adjustScrollVertical(scrollTop, scrollPercentage, force) {
- if (this.prevScrollTop === scrollTop && !force) {
- return;
- }
-
- if (typeof(scrollTop) === 'undefined' || scrollTop === undefined || scrollTop === null) {
- scrollTop = (this.getCanvasHeight() - this.getViewportHeight()) * scrollPercentage;
- }
-
- this.adjustRows(scrollTop, scrollPercentage, false);
-
- this.prevScrollTop = scrollTop;
- this.prevScrolltopPercentage = scrollPercentage;
-
- this.grid.queueRefresh();
- };
-
- GridRenderContainer.prototype.adjustScrollHorizontal = function adjustScrollHorizontal(scrollLeft, scrollPercentage, force) {
- if (this.prevScrollLeft === scrollLeft && !force) {
- return;
- }
-
- if (typeof(scrollLeft) === 'undefined' || scrollLeft === undefined || scrollLeft === null) {
- scrollLeft = (this.getCanvasWidth() - this.getViewportWidth()) * scrollPercentage;
- }
-
- this.adjustColumns(scrollLeft, scrollPercentage);
-
- this.prevScrollLeft = scrollLeft;
- this.prevScrollleftPercentage = scrollPercentage;
-
- this.grid.queueRefresh();
- };
-
- GridRenderContainer.prototype.adjustRows = function adjustRows(scrollTop, scrollPercentage, postDataLoaded) {
- var self = this;
-
- var minRows = self.minRowsToRender();
-
- var rowCache = self.visibleRowCache;
-
- var maxRowIndex = rowCache.length - minRows;
-
- // console.log('scroll%1', scrollPercentage);
-
- // Calculate the scroll percentage according to the scrollTop location, if no percentage was provided
- if ((typeof(scrollPercentage) === 'undefined' || scrollPercentage === null) && scrollTop) {
- scrollPercentage = scrollTop / self.getVerticalScrollLength();
- }
-
- var rowIndex = Math.ceil(Math.min(maxRowIndex, maxRowIndex * scrollPercentage));
-
- // console.log('maxRowIndex / scroll%', maxRowIndex, scrollPercentage, rowIndex);
-
- // Define a max row index that we can't scroll past
- if (rowIndex > maxRowIndex) {
- rowIndex = maxRowIndex;
- }
-
- var newRange = [];
- if (rowCache.length > self.grid.options.virtualizationThreshold) {
- if (!(typeof(scrollTop) === 'undefined' || scrollTop === null)) {
- // Have we hit the threshold going down?
- if ( !self.grid.suppressParentScrollDown && self.prevScrollTop < scrollTop && rowIndex < self.prevRowScrollIndex + self.grid.options.scrollThreshold && rowIndex < maxRowIndex) {
- return;
- }
- //Have we hit the threshold going up?
- if ( !self.grid.suppressParentScrollUp && self.prevScrollTop > scrollTop && rowIndex > self.prevRowScrollIndex - self.grid.options.scrollThreshold && rowIndex < maxRowIndex) {
- return;
- }
- }
- var rangeStart = {};
- var rangeEnd = {};
-
- rangeStart = Math.max(0, rowIndex - self.grid.options.excessRows);
- rangeEnd = Math.min(rowCache.length, rowIndex + minRows + self.grid.options.excessRows);
-
- newRange = [rangeStart, rangeEnd];
- }
- else {
- var maxLen = self.visibleRowCache.length;
- newRange = [0, Math.max(maxLen, minRows + self.grid.options.excessRows)];
- }
-
- self.updateViewableRowRange(newRange);
-
- self.prevRowScrollIndex = rowIndex;
- };
-
- GridRenderContainer.prototype.adjustColumns = function adjustColumns(scrollLeft, scrollPercentage) {
- var self = this;
-
- var minCols = self.minColumnsToRender();
-
- var columnCache = self.visibleColumnCache;
- var maxColumnIndex = columnCache.length - minCols;
-
- // Calculate the scroll percentage according to the scrollLeft location, if no percentage was provided
- if ((typeof(scrollPercentage) === 'undefined' || scrollPercentage === null) && scrollLeft) {
- scrollPercentage = scrollLeft / self.getHorizontalScrollLength();
- }
-
- var colIndex = Math.ceil(Math.min(maxColumnIndex, maxColumnIndex * scrollPercentage));
-
- // Define a max row index that we can't scroll past
- if (colIndex > maxColumnIndex) {
- colIndex = maxColumnIndex;
- }
-
- var newRange = [];
- if (columnCache.length > self.grid.options.columnVirtualizationThreshold && self.getCanvasWidth() > self.getViewportWidth()) {
- /* Commented the following lines because otherwise the moved column wasn't visible immediately on the new position
- * in the case of many columns with horizontal scroll, one had to scroll left or right and then return in order to see it
- // Have we hit the threshold going down?
- if (self.prevScrollLeft < scrollLeft && colIndex < self.prevColumnScrollIndex + self.grid.options.horizontalScrollThreshold && colIndex < maxColumnIndex) {
- return;
- }
- //Have we hit the threshold going up?
- if (self.prevScrollLeft > scrollLeft && colIndex > self.prevColumnScrollIndex - self.grid.options.horizontalScrollThreshold && colIndex < maxColumnIndex) {
- return;
- }*/
-
- var rangeStart = Math.max(0, colIndex - self.grid.options.excessColumns);
- var rangeEnd = Math.min(columnCache.length, colIndex + minCols + self.grid.options.excessColumns);
-
- newRange = [rangeStart, rangeEnd];
- }
- else {
- var maxLen = self.visibleColumnCache.length;
-
- newRange = [0, Math.max(maxLen, minCols + self.grid.options.excessColumns)];
- }
-
- self.updateViewableColumnRange(newRange);
-
- self.prevColumnScrollIndex = colIndex;
- };
-
- // Method for updating the visible rows
- GridRenderContainer.prototype.updateViewableRowRange = function updateViewableRowRange(renderedRange) {
- // Slice out the range of rows from the data
- // var rowArr = uiGridCtrl.grid.rows.slice(renderedRange[0], renderedRange[1]);
- var rowArr = this.visibleRowCache.slice(renderedRange[0], renderedRange[1]);
-
- // Define the top-most rendered row
- this.currentTopRow = renderedRange[0];
-
- this.setRenderedRows(rowArr);
- };
-
- // Method for updating the visible columns
- GridRenderContainer.prototype.updateViewableColumnRange = function updateViewableColumnRange(renderedRange) {
- // Slice out the range of rows from the data
- // var columnArr = uiGridCtrl.grid.columns.slice(renderedRange[0], renderedRange[1]);
- var columnArr = this.visibleColumnCache.slice(renderedRange[0], renderedRange[1]);
-
- // Define the left-most rendered columns
- this.currentFirstColumn = renderedRange[0];
-
- this.setRenderedColumns(columnArr);
- };
-
- GridRenderContainer.prototype.headerCellWrapperStyle = function () {
- var self = this;
-
- if (self.currentFirstColumn !== 0) {
- var offset = self.columnOffset;
-
- if (self.grid.isRTL()) {
- return { 'margin-right': offset + 'px' };
- }
- else {
- return { 'margin-left': offset + 'px' };
- }
- }
-
- return null;
- };
-
- /**
- * @ngdoc boolean
- * @name updateColumnWidths
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description Determine the appropriate column width of each column across all render containers.
- *
- * Column width is easy when each column has a specified width. When columns are variable width (i.e.
- * have an * or % of the viewport) then we try to calculate so that things fit in. The problem is that
- * we have multiple render containers, and we don't want one render container to just take the whole viewport
- * when it doesn't need to - we want things to balance out across the render containers.
- *
- * To do this, we use this method to calculate all the renderContainers, recognising that in a given render
- * cycle it'll get called once per render container, so it needs to return the same values each time.
- *
- * The constraints on this method are therefore:
- * - must return the same value when called multiple times, to do this it needs to rely on properties of the
- * columns, but not properties that change when this is called (so it shouldn't rely on drawnWidth)
- *
- * The general logic of this method is:
- * - calculate our total available width
- * - look at all the columns across all render containers, and work out which have widths and which have
- * constraints such as % or * or something else
- * - for those with *, count the total number of * we see and add it onto a running total, add this column to an * array
- * - for those with a %, allocate the % as a percentage of the viewport, having consideration of min and max
- * - for those with manual width (in pixels) we set the drawnWidth to the specified width
- * - we end up with an asterisks array still to process
- * - we look at our remaining width. If it's greater than zero, we divide it up among the asterisk columns, then process
- * them for min and max width constraints
- * - if it's zero or less, we set the asterisk columns to their minimum widths
- * - we use parseInt quite a bit, as we try to make all our column widths integers
- */
- GridRenderContainer.prototype.updateColumnWidths = function () {
- var self = this;
-
- var asterisksArray = [],
- asteriskNum = 0,
- usedWidthSum = 0,
- ret = '';
-
- // Get the width of the viewport
- var availableWidth = self.grid.getViewportWidth() - self.grid.scrollbarWidth;
-
- // get all the columns across all render containers, we have to calculate them all or one render container
- // could consume the whole viewport
- var columnCache = [];
- angular.forEach(self.grid.renderContainers, function( container, name){
- columnCache = columnCache.concat(container.visibleColumnCache);
- });
-
- // look at each column, process any manual values or %, put the * into an array to look at later
- columnCache.forEach(function(column, i) {
- var width = 0;
- // Skip hidden columns
- if (!column.visible) { return; }
-
- if (angular.isNumber(column.width)) {
- // pixel width, set to this value
- width = parseInt(column.width, 10);
- usedWidthSum = usedWidthSum + width;
- column.drawnWidth = width;
-
- } else if (gridUtil.endsWith(column.width, "%")) {
- // percentage width, set to percentage of the viewport
- width = parseFloat(parseInt(column.width.replace(/%/g, ''), 10) / 100 * availableWidth);
-
- if ( width > column.maxWidth ){
- width = column.maxWidth;
- }
-
- if ( width < column.minWidth ){
- width = column.minWidth;
- }
-
- usedWidthSum = usedWidthSum + width;
- column.drawnWidth = width;
- } else if (angular.isString(column.width) && column.width.indexOf('*') !== -1) {
- // is an asterisk column, the gridColumn already checked the string consists only of '****'
- asteriskNum = asteriskNum + column.width.length;
- asterisksArray.push(column);
- }
- });
-
- // Get the remaining width (available width subtracted by the used widths sum)
- var remainingWidth = availableWidth - usedWidthSum;
-
- var i, column, colWidth;
-
- if (asterisksArray.length > 0) {
- // the width that each asterisk value would be assigned (this can be negative)
- var asteriskVal = remainingWidth / asteriskNum;
-
- asterisksArray.forEach(function( column ){
- var width = parseInt(column.width.length * asteriskVal, 10);
-
- if ( width > column.maxWidth ){
- width = column.maxWidth;
- }
-
- if ( width < column.minWidth ){
- width = column.minWidth;
- }
-
- usedWidthSum = usedWidthSum + width;
- column.drawnWidth = width;
- });
- }
-
- // If the grid width didn't divide evenly into the column widths and we have pixels left over, or our
- // calculated widths would have the grid narrower than the available space,
- // dole the remainder out one by one to make everything fit
- var processColumnUpwards = function(column){
- if ( column.drawnWidth < column.maxWidth && leftoverWidth > 0) {
- column.drawnWidth++;
- usedWidthSum++;
- leftoverWidth--;
- columnsToChange = true;
- }
- };
-
- var leftoverWidth = availableWidth - usedWidthSum;
- var columnsToChange = true;
-
- while (leftoverWidth > 0 && columnsToChange) {
- columnsToChange = false;
- asterisksArray.forEach(processColumnUpwards);
- }
-
- // We can end up with too much width even though some columns aren't at their max width, in this situation
- // we can trim the columns a little
- var processColumnDownwards = function(column){
- if ( column.drawnWidth > column.minWidth && excessWidth > 0) {
- column.drawnWidth--;
- usedWidthSum--;
- excessWidth--;
- columnsToChange = true;
- }
- };
-
- var excessWidth = usedWidthSum - availableWidth;
- columnsToChange = true;
-
- while (excessWidth > 0 && columnsToChange) {
- columnsToChange = false;
- asterisksArray.forEach(processColumnDownwards);
- }
-
-
- // all that was across all the renderContainers, now we need to work out what that calculation decided for
- // our renderContainer
- var canvasWidth = 0;
- self.visibleColumnCache.forEach(function(column){
- if ( column.visible ){
- canvasWidth = canvasWidth + column.drawnWidth;
- }
- });
-
- // Build the CSS
- columnCache.forEach(function (column) {
- ret = ret + column.getColClassDefinition();
- });
-
- self.canvasWidth = canvasWidth;
-
- // Return the styles back to buildStyles which pops them into the `customStyles` scope variable
- // return ret;
-
- // Set this render container's column styles so they can be used in style computation
- this.columnStyles = ret;
- };
-
- GridRenderContainer.prototype.needsHScrollbarPlaceholder = function () {
- return this.grid.options.enableHorizontalScrollbar && !this.hasHScrollbar && !this.grid.disableScrolling;
- };
-
- GridRenderContainer.prototype.getViewportStyle = function () {
- var self = this;
- var styles = {};
-
- self.hasHScrollbar = false;
- self.hasVScrollbar = false;
-
- if (self.grid.disableScrolling) {
- styles['overflow-x'] = 'hidden';
- styles['overflow-y'] = 'hidden';
- return styles;
- }
-
- if (self.name === 'body') {
- self.hasHScrollbar = self.grid.options.enableHorizontalScrollbar !== uiGridConstants.scrollbars.NEVER;
- if (!self.grid.isRTL()) {
- if (!self.grid.hasRightContainerColumns()) {
- self.hasVScrollbar = self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER;
- }
- }
- else {
- if (!self.grid.hasLeftContainerColumns()) {
- self.hasVScrollbar = self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER;
- }
- }
- }
- else if (self.name === 'left') {
- self.hasVScrollbar = self.grid.isRTL() ? self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER : false;
- }
- else {
- self.hasVScrollbar = !self.grid.isRTL() ? self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER : false;
- }
-
- styles['overflow-x'] = self.hasHScrollbar ? 'scroll' : 'hidden';
- styles['overflow-y'] = self.hasVScrollbar ? 'scroll' : 'hidden';
-
-
- return styles;
-
-
- };
-
- return GridRenderContainer;
-}]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.factory('GridRow', ['gridUtil', 'uiGridConstants', function(gridUtil, uiGridConstants) {
-
- /**
- * @ngdoc function
- * @name ui.grid.class:GridRow
- * @description GridRow is the viewModel for one logical row on the grid. A grid Row is not necessarily a one-to-one
- * relation to gridOptions.data.
- * @param {object} entity the array item from GridOptions.data
- * @param {number} index the current position of the row in the array
- * @param {Grid} reference to the parent grid
- */
- function GridRow(entity, index, grid) {
-
- /**
- * @ngdoc object
- * @name grid
- * @propertyOf ui.grid.class:GridRow
- * @description A reference back to the grid
- */
- this.grid = grid;
-
- /**
- * @ngdoc object
- * @name entity
- * @propertyOf ui.grid.class:GridRow
- * @description A reference to an item in gridOptions.data[]
- */
- this.entity = entity;
-
- /**
- * @ngdoc object
- * @name uid
- * @propertyOf ui.grid.class:GridRow
- * @description UniqueId of row
- */
- this.uid = gridUtil.nextUid();
-
- /**
- * @ngdoc object
- * @name visible
- * @propertyOf ui.grid.class:GridRow
- * @description If true, the row will be rendered
- */
- // Default to true
- this.visible = true;
-
-
- this.$$height = grid.options.rowHeight;
-
- }
-
- /**
- * @ngdoc object
- * @name height
- * @propertyOf ui.grid.class:GridRow
- * @description height of each individual row. changing the height will flag all
- * row renderContainers to recalculate their canvas height
- */
- Object.defineProperty(GridRow.prototype, 'height', {
- get: function() {
- return this.$$height;
- },
- set: function(height) {
- if (height !== this.$$height) {
- this.grid.updateCanvasHeight();
- this.$$height = height;
- }
- }
- });
-
- /**
- * @ngdoc function
- * @name getQualifiedColField
- * @methodOf ui.grid.class:GridRow
- * @description returns the qualified field name as it exists on scope
- * ie: row.entity.fieldA
- * @param {GridCol} col column instance
- * @returns {string} resulting name that can be evaluated on scope
- */
- GridRow.prototype.getQualifiedColField = function(col) {
- return 'row.' + this.getEntityQualifiedColField(col);
- };
-
- /**
- * @ngdoc function
- * @name getEntityQualifiedColField
- * @methodOf ui.grid.class:GridRow
- * @description returns the qualified field name minus the row path
- * ie: entity.fieldA
- * @param {GridCol} col column instance
- * @returns {string} resulting name that can be evaluated against a row
- */
- GridRow.prototype.getEntityQualifiedColField = function(col) {
- var base = 'entity';
- if ( col.field === uiGridConstants.ENTITY_BINDING ) {
- return base;
- }
- return gridUtil.preEval(base + '.' + col.field);
- };
-
-
- /**
- * @ngdoc function
- * @name setRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Sets an override on the row that forces it to always
- * be invisible. Emits the rowsVisibleChanged event if it changed the row visibility.
- *
- * This method can be called from the api, passing in the gridRow we want
- * altered. It should really work by calling gridRow.setRowInvisible, but that's
- * not the way I coded it, and too late to change now. Changed to just call
- * the internal function row.setThisRowInvisible().
- *
- * @param {GridRow} row the row we want to set to invisible
- *
- */
- GridRow.prototype.setRowInvisible = function ( row ) {
- if (row && row.setThisRowInvisible){
- row.setThisRowInvisible( 'user' );
- }
- };
-
-
- /**
- * @ngdoc function
- * @name clearRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Clears an override on the row that forces it to always
- * be invisible. Emits the rowsVisibleChanged event if it changed the row visibility.
- *
- * This method can be called from the api, passing in the gridRow we want
- * altered. It should really work by calling gridRow.clearRowInvisible, but that's
- * not the way I coded it, and too late to change now. Changed to just call
- * the internal function row.clearThisRowInvisible().
- *
- * @param {GridRow} row the row we want to clear the invisible flag
- *
- */
- GridRow.prototype.clearRowInvisible = function ( row ) {
- if (row && row.clearThisRowInvisible){
- row.clearThisRowInvisible( 'user' );
- }
- };
-
-
- /**
- * @ngdoc function
- * @name setThisRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Sets an override on the row that forces it to always
- * be invisible. Emits the rowsVisibleChanged event if it changed the row visibility
- *
- * @param {string} reason the reason (usually the module) for the row to be invisible.
- * E.g. grouping, user, filter
- * @param {boolean} fromRowsProcessor whether we were called from a rowsProcessor, passed through to evaluateRowVisibility
- */
- GridRow.prototype.setThisRowInvisible = function ( reason, fromRowsProcessor ) {
- if ( !this.invisibleReason ){
- this.invisibleReason = {};
- }
- this.invisibleReason[reason] = true;
- this.evaluateRowVisibility( fromRowsProcessor);
- };
-
-
- /**
- * @ngdoc function
- * @name clearRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Clears any override on the row visibility, returning it
- * to normal visibility calculations. Emits the rowsVisibleChanged
- * event
- *
- * @param {string} reason the reason (usually the module) for the row to be invisible.
- * E.g. grouping, user, filter
- * @param {boolean} fromRowsProcessor whether we were called from a rowsProcessor, passed through to evaluateRowVisibility
- */
- GridRow.prototype.clearThisRowInvisible = function ( reason, fromRowsProcessor ) {
- if (typeof(this.invisibleReason) !== 'undefined' ) {
- delete this.invisibleReason[reason];
- }
- this.evaluateRowVisibility( fromRowsProcessor );
- };
-
-
- /**
- * @ngdoc function
- * @name evaluateRowVisibility
- * @methodOf ui.grid.class:GridRow
- * @description Determines whether the row should be visible based on invisibleReason,
- * and if it changes the row visibility, then emits the rowsVisibleChanged event.
- *
- * Queues a grid refresh, but doesn't call it directly to avoid hitting lots of grid refreshes.
- * @param {boolean} fromRowProcessor if true, then it won't raise events or queue the refresh, the
- * row processor does that already
- */
- GridRow.prototype.evaluateRowVisibility = function ( fromRowProcessor ) {
- var newVisibility = true;
- if ( typeof(this.invisibleReason) !== 'undefined' ){
- angular.forEach(this.invisibleReason, function( value, key ){
- if ( value ){
- newVisibility = false;
- }
- });
- }
-
- if ( typeof(this.visible) === 'undefined' || this.visible !== newVisibility ){
- this.visible = newVisibility;
- if ( !fromRowProcessor ){
- this.grid.queueGridRefresh();
- this.grid.api.core.raise.rowsVisibleChanged(this);
- }
- }
- };
-
-
- return GridRow;
-}]);
-
-})();
-
-(function(){
- 'use strict';
- /**
- * @ngdoc object
- * @name ui.grid.class:GridRowColumn
- * @param {GridRow} row The row for this pair
- * @param {GridColumn} column The column for this pair
- * @description A row and column pair that represents the intersection of these two entities.
- * Must be instantiated as a constructor using the `new` keyword.
- */
- angular.module('ui.grid')
- .factory('GridRowColumn', ['$parse', '$filter',
- function GridRowColumnFactory($parse, $filter){
- var GridRowColumn = function GridRowColumn(row, col) {
- if ( !(this instanceof GridRowColumn)){
- throw "Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";
- }
-
- /**
- * @ngdoc object
- * @name row
- * @propertyOf ui.grid.class:GridRowColumn
- * @description {@link ui.grid.class:GridRow }
- */
- this.row = row;
- /**
- * @ngdoc object
- * @name col
- * @propertyOf ui.grid.class:GridRowColumn
- * @description {@link ui.grid.class:GridColumn }
- */
- this.col = col;
- };
-
- /**
- * @ngdoc function
- * @name getIntersectionValueRaw
- * @methodOf ui.grid.class:GridRowColumn
- * @description Gets the intersection of where the row and column meet.
- * @returns {String|Number|Object} The value from the grid data that this GridRowColumn points too.
- * If the column has a cellFilter this will NOT return the filtered value.
- */
- GridRowColumn.prototype.getIntersectionValueRaw = function(){
- var getter = $parse(this.row.getEntityQualifiedColField(this.col));
- var context = this.row;
- return getter(context);
- };
- return GridRowColumn;
- }
- ]);
-})();
-
-(function () {
- angular.module('ui.grid')
- .factory('ScrollEvent', ['gridUtil', function (gridUtil) {
-
- /**
- * @ngdoc function
- * @name ui.grid.class:ScrollEvent
- * @description Model for all scrollEvents
- * @param {Grid} grid that owns the scroll event
- * @param {GridRenderContainer} sourceRowContainer that owns the scroll event. Can be null
- * @param {GridRenderContainer} sourceColContainer that owns the scroll event. Can be null
- * @param {string} source the source of the event - from uiGridConstants.scrollEventSources or a string value of directive/service/factory.functionName
- */
- function ScrollEvent(grid, sourceRowContainer, sourceColContainer, source) {
- var self = this;
- if (!grid) {
- throw new Error("grid argument is required");
- }
-
- /**
- * @ngdoc object
- * @name grid
- * @propertyOf ui.grid.class:ScrollEvent
- * @description A reference back to the grid
- */
- self.grid = grid;
-
-
-
- /**
- * @ngdoc object
- * @name source
- * @propertyOf ui.grid.class:ScrollEvent
- * @description the source of the scroll event. limited to values from uiGridConstants.scrollEventSources
- */
- self.source = source;
-
-
- /**
- * @ngdoc object
- * @name noDelay
- * @propertyOf ui.grid.class:ScrollEvent
- * @description most scroll events from the mouse or trackpad require delay to operate properly
- * set to false to eliminate delay. Useful for scroll events that the grid causes, such as scrolling to make a row visible.
- */
- self.withDelay = true;
-
- self.sourceRowContainer = sourceRowContainer;
- self.sourceColContainer = sourceColContainer;
-
- self.newScrollLeft = null;
- self.newScrollTop = null;
- self.x = null;
- self.y = null;
-
- self.verticalScrollLength = -9999999;
- self.horizontalScrollLength = -999999;
-
-
- /**
- * @ngdoc function
- * @name fireThrottledScrollingEvent
- * @methodOf ui.grid.class:ScrollEvent
- * @description fires a throttled event using grid.api.core.raise.scrollEvent
- */
- self.fireThrottledScrollingEvent = gridUtil.throttle(function(sourceContainerId) {
- self.grid.scrollContainers(sourceContainerId, self);
- }, self.grid.options.wheelScrollThrottle, {trailing: true});
-
- }
-
-
- /**
- * @ngdoc function
- * @name getNewScrollLeft
- * @methodOf ui.grid.class:ScrollEvent
- * @description returns newScrollLeft property if available; calculates a new value if it isn't
- */
- ScrollEvent.prototype.getNewScrollLeft = function(colContainer, viewport){
- var self = this;
-
- if (!self.newScrollLeft){
- var scrollWidth = (colContainer.getCanvasWidth() - colContainer.getViewportWidth());
-
- var oldScrollLeft = gridUtil.normalizeScrollLeft(viewport, self.grid);
-
- var scrollXPercentage;
- if (typeof(self.x.percentage) !== 'undefined' && self.x.percentage !== undefined) {
- scrollXPercentage = self.x.percentage;
- }
- else if (typeof(self.x.pixels) !== 'undefined' && self.x.pixels !== undefined) {
- scrollXPercentage = self.x.percentage = (oldScrollLeft + self.x.pixels) / scrollWidth;
- }
- else {
- throw new Error("No percentage or pixel value provided for scroll event X axis");
- }
-
- return Math.max(0, scrollXPercentage * scrollWidth);
- }
-
- return self.newScrollLeft;
- };
-
-
- /**
- * @ngdoc function
- * @name getNewScrollTop
- * @methodOf ui.grid.class:ScrollEvent
- * @description returns newScrollTop property if available; calculates a new value if it isn't
- */
- ScrollEvent.prototype.getNewScrollTop = function(rowContainer, viewport){
- var self = this;
-
-
- if (!self.newScrollTop){
- var scrollLength = rowContainer.getVerticalScrollLength();
-
- var oldScrollTop = viewport[0].scrollTop;
-
- var scrollYPercentage;
- if (typeof(self.y.percentage) !== 'undefined' && self.y.percentage !== undefined) {
- scrollYPercentage = self.y.percentage;
- }
- else if (typeof(self.y.pixels) !== 'undefined' && self.y.pixels !== undefined) {
- scrollYPercentage = self.y.percentage = (oldScrollTop + self.y.pixels) / scrollLength;
- }
- else {
- throw new Error("No percentage or pixel value provided for scroll event Y axis");
- }
-
- return Math.max(0, scrollYPercentage * scrollLength);
- }
-
- return self.newScrollTop;
- };
-
- ScrollEvent.prototype.atTop = function(scrollTop) {
- return (this.y && (this.y.percentage === 0 || this.verticalScrollLength < 0) && scrollTop === 0);
- };
-
- ScrollEvent.prototype.atBottom = function(scrollTop) {
- return (this.y && (this.y.percentage === 1 || this.verticalScrollLength === 0) && scrollTop > 0);
- };
-
- ScrollEvent.prototype.atLeft = function(scrollLeft) {
- return (this.x && (this.x.percentage === 0 || this.horizontalScrollLength < 0) && scrollLeft === 0);
- };
-
- ScrollEvent.prototype.atRight = function(scrollLeft) {
- return (this.x && (this.x.percentage === 1 || this.horizontalScrollLength ===0) && scrollLeft > 0);
- };
-
-
- ScrollEvent.Sources = {
- ViewPortScroll: 'ViewPortScroll',
- RenderContainerMouseWheel: 'RenderContainerMouseWheel',
- RenderContainerTouchMove: 'RenderContainerTouchMove',
- Other: 99
- };
-
- return ScrollEvent;
- }]);
-
-
-
-})();
-
-(function () {
- 'use strict';
- /**
- * @ngdoc object
- * @name ui.grid.service:gridClassFactory
- *
- * @description factory to return dom specific instances of a grid
- *
- */
- angular.module('ui.grid').service('gridClassFactory', ['gridUtil', '$q', '$compile', '$templateCache', 'uiGridConstants', 'Grid', 'GridColumn', 'GridRow',
- function (gridUtil, $q, $compile, $templateCache, uiGridConstants, Grid, GridColumn, GridRow) {
-
- var service = {
- /**
- * @ngdoc method
- * @name createGrid
- * @methodOf ui.grid.service:gridClassFactory
- * @description Creates a new grid instance. Each instance will have a unique id
- * @param {object} options An object map of options to pass into the created grid instance.
- * @returns {Grid} grid
- */
- createGrid : function(options) {
- options = (typeof(options) !== 'undefined') ? options : {};
- options.id = gridUtil.newId();
- var grid = new Grid(options);
-
- // NOTE/TODO: rowTemplate should always be defined...
- if (grid.options.rowTemplate) {
- var rowTemplateFnPromise = $q.defer();
- grid.getRowTemplateFn = rowTemplateFnPromise.promise;
-
- gridUtil.getTemplate(grid.options.rowTemplate)
- .then(
- function (template) {
- var rowTemplateFn = $compile(template);
- rowTemplateFnPromise.resolve(rowTemplateFn);
- },
- function (res) {
- // Todo handle response error here?
- throw new Error("Couldn't fetch/use row template '" + grid.options.rowTemplate + "'");
- });
- }
-
- grid.registerColumnBuilder(service.defaultColumnBuilder);
-
- // Row builder for custom row templates
- grid.registerRowBuilder(service.rowTemplateAssigner);
-
- // Reset all rows to visible initially
- grid.registerRowsProcessor(function allRowsVisible(rows) {
- rows.forEach(function (row) {
- row.evaluateRowVisibility( true );
- }, 50);
-
- return rows;
- });
-
- grid.registerColumnsProcessor(function applyColumnVisibility(columns) {
- columns.forEach(function (column) {
- column.visible = angular.isDefined(column.colDef.visible) ? column.colDef.visible : true;
- });
-
- return columns;
- }, 50);
-
- grid.registerRowsProcessor(grid.searchRows, 100);
-
- // Register the default row processor, it sorts rows by selected columns
- if (grid.options.externalSort && angular.isFunction(grid.options.externalSort)) {
- grid.registerRowsProcessor(grid.options.externalSort, 200);
- }
- else {
- grid.registerRowsProcessor(grid.sortByColumn, 200);
- }
-
- return grid;
- },
-
- /**
- * @ngdoc function
- * @name defaultColumnBuilder
- * @methodOf ui.grid.service:gridClassFactory
- * @description Processes designTime column definitions and applies them to col for the
- * core grid features
- * @param {object} colDef reference to column definition
- * @param {GridColumn} col reference to gridCol
- * @param {object} gridOptions reference to grid options
- */
- defaultColumnBuilder: function (colDef, col, gridOptions) {
-
- var templateGetPromises = [];
-
- // Abstracts the standard template processing we do for every template type.
- var processTemplate = function( templateType, providedType, defaultTemplate, filterType, tooltipType ) {
- if ( !colDef[templateType] ){
- col[providedType] = defaultTemplate;
- } else {
- col[providedType] = colDef[templateType];
- }
-
- templateGetPromises.push(gridUtil.getTemplate(col[providedType])
- .then(
- function (template) {
- if ( angular.isFunction(template) ) { template = template(); }
- var tooltipCall = ( tooltipType === 'cellTooltip' ) ? 'col.cellTooltip(row,col)' : 'col.headerTooltip(col)';
- if ( tooltipType && col[tooltipType] === false ){
- template = template.replace(uiGridConstants.TOOLTIP, '');
- } else if ( tooltipType && col[tooltipType] ){
- template = template.replace(uiGridConstants.TOOLTIP, 'title="{{' + tooltipCall + ' CUSTOM_FILTERS }}"');
- }
-
- if ( filterType ){
- col[templateType] = template.replace(uiGridConstants.CUSTOM_FILTERS, function() {
- return col[filterType] ? "|" + col[filterType] : "";
- });
- } else {
- col[templateType] = template;
- }
- },
- function (res) {
- throw new Error("Couldn't fetch/use colDef." + templateType + " '" + colDef[templateType] + "'");
- })
- );
-
- };
-
-
- /**
- * @ngdoc property
- * @name cellTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for each cell in this column. The default
- * is ui-grid/uiGridCell. If you are using the cellNav feature, this template
- * must contain a div that can receive focus.
- *
- */
- processTemplate( 'cellTemplate', 'providedCellTemplate', 'ui-grid/uiGridCell', 'cellFilter', 'cellTooltip' );
- col.cellTemplatePromise = templateGetPromises[0];
-
- /**
- * @ngdoc property
- * @name headerCellTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for the header for this column. The default
- * is ui-grid/uiGridHeaderCell
- *
- */
- processTemplate( 'headerCellTemplate', 'providedHeaderCellTemplate', 'ui-grid/uiGridHeaderCell', 'headerCellFilter', 'headerTooltip' );
-
- /**
- * @ngdoc property
- * @name footerCellTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for the footer for this column. The default
- * is ui-grid/uiGridFooterCell
- *
- */
- processTemplate( 'footerCellTemplate', 'providedFooterCellTemplate', 'ui-grid/uiGridFooterCell', 'footerCellFilter' );
-
- /**
- * @ngdoc property
- * @name filterHeaderTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for the filter input. The default is ui-grid/ui-grid-filter
- *
- */
- processTemplate( 'filterHeaderTemplate', 'providedFilterHeaderTemplate', 'ui-grid/ui-grid-filter' );
-
- // Create a promise for the compiled element function
- col.compiledElementFnDefer = $q.defer();
-
- return $q.all(templateGetPromises);
- },
-
-
- rowTemplateAssigner: function rowTemplateAssigner(row) {
- var grid = this;
-
- // Row has no template assigned to it
- if (!row.rowTemplate) {
- // Use the default row template from the grid
- row.rowTemplate = grid.options.rowTemplate;
-
- // Use the grid's function for fetching the compiled row template function
- row.getRowTemplateFn = grid.getRowTemplateFn;
- }
- // Row has its own template assigned
- else {
- // Create a promise for the compiled row template function
- var perRowTemplateFnPromise = $q.defer();
- row.getRowTemplateFn = perRowTemplateFnPromise.promise;
-
- // Get the row template
- gridUtil.getTemplate(row.rowTemplate)
- .then(function (template) {
- // Compile the template
- var rowTemplateFn = $compile(template);
-
- // Resolve the compiled template function promise
- perRowTemplateFnPromise.resolve(rowTemplateFn);
- },
- function (res) {
- // Todo handle response error here?
- throw new Error("Couldn't fetch/use row template '" + row.rowTemplate + "'");
- });
- }
-
- return row.getRowTemplateFn;
- }
- };
-
- //class definitions (moved to separate factories)
-
- return service;
- }]);
-
-})();
-
-(function() {
-
-var module = angular.module('ui.grid');
-
-function escapeRegExp(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
-}
-
-
-/**
- * @ngdoc service
- * @name ui.grid.service:rowSearcher
- *
- * @description Service for searching/filtering rows based on column value conditions.
- */
-module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil, uiGridConstants) {
- var defaultCondition = uiGridConstants.filter.CONTAINS;
-
- var rowSearcher = {};
-
- /**
- * @ngdoc function
- * @name getTerm
- * @methodOf ui.grid.service:rowSearcher
- * @description Get the term from a filter
- * Trims leading and trailing whitespace
- * @param {object} filter object to use
- * @returns {object} Parsed term
- */
- rowSearcher.getTerm = function getTerm(filter) {
- if (typeof(filter.term) === 'undefined') { return filter.term; }
-
- var term = filter.term;
-
- // Strip leading and trailing whitespace if the term is a string
- if (typeof(term) === 'string') {
- term = term.trim();
- }
-
- return term;
- };
-
- /**
- * @ngdoc function
- * @name stripTerm
- * @methodOf ui.grid.service:rowSearcher
- * @description Remove leading and trailing asterisk (*) from the filter's term
- * @param {object} filter object to use
- * @returns {uiGridConstants.filter<int>} Value representing the condition constant value
- */
- rowSearcher.stripTerm = function stripTerm(filter) {
- var term = rowSearcher.getTerm(filter);
-
- if (typeof(term) === 'string') {
- return escapeRegExp(term.replace(/(^\*|\*$)/g, ''));
- }
- else {
- return term;
- }
- };
-
-
- /**
- * @ngdoc function
- * @name guessCondition
- * @methodOf ui.grid.service:rowSearcher
- * @description Guess the condition for a filter based on its term
- * <br>
- * Defaults to STARTS_WITH. Uses CONTAINS for strings beginning and ending with *s (*bob*).
- * Uses STARTS_WITH for strings ending with * (bo*). Uses ENDS_WITH for strings starting with * (*ob).
- * @param {object} filter object to use
- * @returns {uiGridConstants.filter<int>} Value representing the condition constant value
- */
- rowSearcher.guessCondition = function guessCondition(filter) {
- if (typeof(filter.term) === 'undefined' || !filter.term) {
- return defaultCondition;
- }
-
- var term = rowSearcher.getTerm(filter);
-
- if (/\*/.test(term)) {
- var regexpFlags = '';
- if (!filter.flags || !filter.flags.caseSensitive) {
- regexpFlags += 'i';
- }
-
- var reText = term.replace(/(\\)?\*/g, function ($0, $1) { return $1 ? $0 : '[\\s\\S]*?'; });
- return new RegExp('^' + reText + '$', regexpFlags);
- }
- // Otherwise default to default condition
- else {
- return defaultCondition;
- }
- };
-
-
- /**
- * @ngdoc function
- * @name setupFilters
- * @methodOf ui.grid.service:rowSearcher
- * @description For a given columns filters (either col.filters, or [col.filter] can be passed in),
- * do all the parsing and pre-processing and store that data into a new filters object. The object
- * has the condition, the flags, the stripped term, and a parsed reg exp if there was one.
- *
- * We could use a forEach in here, since it's much less performance sensitive, but since we're using
- * for loops everywhere else in this module...
- *
- * @param {array} filters the filters from the column (col.filters or [col.filter])
- * @returns {array} An array of parsed/preprocessed filters
- */
- rowSearcher.setupFilters = function setupFilters( filters ){
- var newFilters = [];
-
- var filtersLength = filters.length;
- for ( var i = 0; i < filtersLength; i++ ){
- var filter = filters[i];
-
- if ( filter.noTerm || !gridUtil.isNullOrUndefined(filter.term) ){
- var newFilter = {};
-
- var regexpFlags = '';
- if (!filter.flags || !filter.flags.caseSensitive) {
- regexpFlags += 'i';
- }
-
- if ( !gridUtil.isNullOrUndefined(filter.term) ){
- // it is possible to have noTerm.
- if ( filter.rawTerm ){
- newFilter.term = filter.term;
- } else {
- newFilter.term = rowSearcher.stripTerm(filter);
- }
- }
- newFilter.noTerm = filter.noTerm;
-
- if ( filter.condition ){
- newFilter.condition = filter.condition;
- } else {
- newFilter.condition = rowSearcher.guessCondition(filter);
- }
-
- newFilter.flags = angular.extend( { caseSensitive: false, date: false }, filter.flags );
-
- if (newFilter.condition === uiGridConstants.filter.STARTS_WITH) {
- newFilter.startswithRE = new RegExp('^' + newFilter.term, regexpFlags);
- }
-
- if (newFilter.condition === uiGridConstants.filter.ENDS_WITH) {
- newFilter.endswithRE = new RegExp(newFilter.term + '$', regexpFlags);
- }
-
- if (newFilter.condition === uiGridConstants.filter.CONTAINS) {
- newFilter.containsRE = new RegExp(newFilter.term, regexpFlags);
- }
-
- if (newFilter.condition === uiGridConstants.filter.EXACT) {
- newFilter.exactRE = new RegExp('^' + newFilter.term + '$', regexpFlags);
- }
-
- newFilters.push(newFilter);
- }
- }
- return newFilters;
- };
-
-
- /**
- * @ngdoc function
- * @name runColumnFilter
- * @methodOf ui.grid.service:rowSearcher
- * @description Runs a single pre-parsed filter against a cell, returning true
- * if the cell matches that one filter.
- *
- * @param {Grid} grid the grid we're working against
- * @param {GridRow} row the row we're matching against
- * @param {GridCol} column the column that we're working against
- * @param {object} filter the specific, preparsed, filter that we want to test
- * @returns {boolean} true if we match (row stays visible)
- */
- rowSearcher.runColumnFilter = function runColumnFilter(grid, row, column, filter) {
- // Cache typeof condition
- var conditionType = typeof(filter.condition);
-
- // Term to search for.
- var term = filter.term;
-
- // Get the column value for this row
- var value;
- if ( column.filterCellFiltered ){
- value = grid.getCellDisplayValue(row, column);
- } else {
- value = grid.getCellValue(row, column);
- }
-
-
- // If the filter's condition is a RegExp, then use it
- if (filter.condition instanceof RegExp) {
- return filter.condition.test(value);
- }
-
- // If the filter's condition is a function, run it
- if (conditionType === 'function') {
- return filter.condition(term, value, row, column);
- }
-
- if (filter.startswithRE) {
- return filter.startswithRE.test(value);
- }
-
- if (filter.endswithRE) {
- return filter.endswithRE.test(value);
- }
-
- if (filter.containsRE) {
- return filter.containsRE.test(value);
- }
-
- if (filter.exactRE) {
- return filter.exactRE.test(value);
- }
-
- if (filter.condition === uiGridConstants.filter.NOT_EQUAL) {
- var regex = new RegExp('^' + term + '$');
- return !regex.exec(value);
- }
-
- if (typeof(value) === 'number' && typeof(term) === 'string' ){
- // if the term has a decimal in it, it comes through as '9\.4', we need to take out the \
- // the same for negative numbers
- // TODO: I suspect the right answer is to look at escapeRegExp at the top of this code file, maybe it's not needed?
- var tempFloat = parseFloat(term.replace(/\\\./,'.').replace(/\\\-/,'-'));
- if (!isNaN(tempFloat)) {
- term = tempFloat;
- }
- }
-
- if (filter.flags.date === true) {
- value = new Date(value);
- // If the term has a dash in it, it comes through as '\-' -- we need to take out the '\'.
- term = new Date(term.replace(/\\/g, ''));
- }
-
- if (filter.condition === uiGridConstants.filter.GREATER_THAN) {
- return (value > term);
- }
-
- if (filter.condition === uiGridConstants.filter.GREATER_THAN_OR_EQUAL) {
- return (value >= term);
- }
-
- if (filter.condition === uiGridConstants.filter.LESS_THAN) {
- return (value < term);
- }
-
- if (filter.condition === uiGridConstants.filter.LESS_THAN_OR_EQUAL) {
- return (value <= term);
- }
-
- return true;
- };
-
-
- /**
- * @ngdoc boolean
- * @name useExternalFiltering
- * @propertyOf ui.grid.class:GridOptions
- * @description False by default. When enabled, this setting suppresses the internal filtering.
- * All UI logic will still operate, allowing filter conditions to be set and modified.
- *
- * The external filter logic can listen for the `filterChange` event, which fires whenever
- * a filter has been adjusted.
- */
- /**
- * @ngdoc function
- * @name searchColumn
- * @methodOf ui.grid.service:rowSearcher
- * @description Process provided filters on provided column against a given row. If the row meets
- * the conditions on all the filters, return true.
- * @param {Grid} grid Grid to search in
- * @param {GridRow} row Row to search on
- * @param {GridCol} column Column with the filters to use
- * @param {array} filters array of pre-parsed/preprocessed filters to apply
- * @returns {boolean} Whether the column matches or not.
- */
- rowSearcher.searchColumn = function searchColumn(grid, row, column, filters) {
- if (grid.options.useExternalFiltering) {
- return true;
- }
-
- var filtersLength = filters.length;
- for (var i = 0; i < filtersLength; i++) {
- var filter = filters[i];
-
- if ( !gridUtil.isNullOrUndefined(filter.term) && filter.term !== '' || filter.noTerm ){
- var ret = rowSearcher.runColumnFilter(grid, row, column, filter);
- if (!ret) {
- return false;
- }
- }
- }
-
- return true;
- };
-
-
- /**
- * @ngdoc function
- * @name search
- * @methodOf ui.grid.service:rowSearcher
- * @description Run a search across the given rows and columns, marking any rows that don't
- * match the stored col.filters or col.filter as invisible.
- * @param {Grid} grid Grid instance to search inside
- * @param {Array[GridRow]} rows GridRows to filter
- * @param {Array[GridColumn]} columns GridColumns with filters to process
- */
- rowSearcher.search = function search(grid, rows, columns) {
- /*
- * Added performance optimisations into this code base, as this logic creates deeply nested
- * loops and is therefore very performance sensitive. In particular, avoiding forEach as
- * this impacts some browser optimisers (particularly Chrome), using iterators instead
- */
-
- // Don't do anything if we weren't passed any rows
- if (!rows) {
- return;
- }
-
- // don't filter if filtering currently disabled
- if (!grid.options.enableFiltering){
- return rows;
- }
-
- // Build list of filters to apply
- var filterData = [];
-
- var colsLength = columns.length;
-
- var hasTerm = function( filters ) {
- var hasTerm = false;
-
- filters.forEach( function (filter) {
- if ( !gridUtil.isNullOrUndefined(filter.term) && filter.term !== '' || filter.noTerm ){
- hasTerm = true;
- }
- });
-
- return hasTerm;
- };
-
- for (var i = 0; i < colsLength; i++) {
- var col = columns[i];
-
- if (typeof(col.filters) !== 'undefined' && hasTerm(col.filters) ) {
- filterData.push( { col: col, filters: rowSearcher.setupFilters(col.filters) } );
- }
- }
-
- if (filterData.length > 0) {
- // define functions outside the loop, performance optimisation
- var foreachRow = function(grid, row, col, filters){
- if ( row.visible && !rowSearcher.searchColumn(grid, row, col, filters) ) {
- row.visible = false;
- }
- };
-
- var foreachFilterCol = function(grid, filterData){
- var rowsLength = rows.length;
- for ( var i = 0; i < rowsLength; i++){
- foreachRow(grid, rows[i], filterData.col, filterData.filters);
- }
- };
-
- // nested loop itself - foreachFilterCol, which in turn calls foreachRow
- var filterDataLength = filterData.length;
- for ( var j = 0; j < filterDataLength; j++){
- foreachFilterCol( grid, filterData[j] );
- }
-
- if (grid.api.core.raise.rowsVisibleChanged) {
- grid.api.core.raise.rowsVisibleChanged();
- }
-
- // drop any invisible rows
- // keeping these, as needed with filtering for trees - we have to come back and make parent nodes visible if child nodes are selected in the filter
- // rows = rows.filter(function(row){ return row.visible; });
-
- }
-
- return rows;
- };
-
- return rowSearcher;
-}]);
-
-})();
-
-(function() {
-
-var module = angular.module('ui.grid');
-
-/**
- * @ngdoc object
- * @name ui.grid.class:rowSorter
- * @description rowSorter provides the default sorting mechanisms,
- * including guessing column types and applying appropriate sort
- * algorithms
- *
- */
-
-module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGridConstants) {
- var currencyRegexStr =
- '(' +
- uiGridConstants.CURRENCY_SYMBOLS
- .map(function (a) { return '\\' + a; }) // Escape all the currency symbols ($ at least will jack up this regex)
- .join('|') + // Join all the symbols together with |s
- ')?';
-
- // /^[-+]?[£$¤¥]?[\d,.]+%?$/
- var numberStrRegex = new RegExp('^[-+]?' + currencyRegexStr + '[\\d,.]+' + currencyRegexStr + '%?$');
-
- var rowSorter = {
- // Cache of sorting functions. Once we create them, we don't want to keep re-doing it
- // this takes a piece of data from the cell and tries to determine its type and what sorting
- // function to use for it
- colSortFnCache: {}
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name guessSortFn
- * @description Assigns a sort function to use based on the itemType in the column
- * @param {string} itemType one of 'number', 'boolean', 'string', 'date', 'object'. And
- * error will be thrown for any other type.
- * @returns {function} a sort function that will sort that type
- */
- rowSorter.guessSortFn = function guessSortFn(itemType) {
- switch (itemType) {
- case "number":
- return rowSorter.sortNumber;
- case "numberStr":
- return rowSorter.sortNumberStr;
- case "boolean":
- return rowSorter.sortBool;
- case "string":
- return rowSorter.sortAlpha;
- case "date":
- return rowSorter.sortDate;
- case "object":
- return rowSorter.basicSort;
- default:
- throw new Error('No sorting function found for type:' + itemType);
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name handleNulls
- * @description Sorts nulls and undefined to the bottom (top when
- * descending). Called by each of the internal sorters before
- * attempting to sort. Note that this method is available on the core api
- * via gridApi.core.sortHandleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} null if there were no nulls/undefineds, otherwise returns
- * a sort value that should be passed back from the sort function
- */
- rowSorter.handleNulls = function handleNulls(a, b) {
- // We want to allow zero values and false values to be evaluated in the sort function
- if ((!a && a !== 0 && a !== false) || (!b && b !== 0 && b !== false)) {
- // We want to force nulls and such to the bottom when we sort... which effectively is "greater than"
- if ((!a && a !== 0 && a !== false) && (!b && b !== 0 && b !== false)) {
- return 0;
- }
- else if (!a && a !== 0 && a !== false) {
- return 1;
- }
- else if (!b && b !== 0 && b !== false) {
- return -1;
- }
- }
- return null;
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name basicSort
- * @description Sorts any values that provide the < method, including strings
- * or numbers. Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.basicSort = function basicSort(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- if (a === b) {
- return 0;
- }
- if (a < b) {
- return -1;
- }
- return 1;
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name sortNumber
- * @description Sorts numerical values. Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortNumber = function sortNumber(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- return a - b;
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name sortNumberStr
- * @description Sorts numerical values that are stored in a string (i.e. parses them to numbers first).
- * Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortNumberStr = function sortNumberStr(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- var numA, // The parsed number form of 'a'
- numB, // The parsed number form of 'b'
- badA = false,
- badB = false;
-
- // Try to parse 'a' to a float
- numA = parseFloat(a.replace(/[^0-9.-]/g, ''));
-
- // If 'a' couldn't be parsed to float, flag it as bad
- if (isNaN(numA)) {
- badA = true;
- }
-
- // Try to parse 'b' to a float
- numB = parseFloat(b.replace(/[^0-9.-]/g, ''));
-
- // If 'b' couldn't be parsed to float, flag it as bad
- if (isNaN(numB)) {
- badB = true;
- }
-
- // We want bad ones to get pushed to the bottom... which effectively is "greater than"
- if (badA && badB) {
- return 0;
- }
-
- if (badA) {
- return 1;
- }
-
- if (badB) {
- return -1;
- }
-
- return numA - numB;
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name sortAlpha
- * @description Sorts string values. Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortAlpha = function sortAlpha(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- var strA = a.toString().toLowerCase(),
- strB = b.toString().toLowerCase();
-
- return strA === strB ? 0 : strA.localeCompare(strB);
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name sortDate
- * @description Sorts date values. Handles nulls and undefined through calling handleNulls.
- * Handles date strings by converting to Date object if not already an instance of Date
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortDate = function sortDate(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- if (!(a instanceof Date)) {
- a = new Date(a);
- }
- if (!(b instanceof Date)){
- b = new Date(b);
- }
- var timeA = a.getTime(),
- timeB = b.getTime();
-
- return timeA === timeB ? 0 : (timeA < timeB ? -1 : 1);
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name sortBool
- * @description Sorts boolean values, true is considered larger than false.
- * Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortBool = function sortBool(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- if (a && b) {
- return 0;
- }
-
- if (!a && !b) {
- return 0;
- }
- else {
- return a ? 1 : -1;
- }
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name getSortFn
- * @description Get the sort function for the column. Looks first in
- * rowSorter.colSortFnCache using the column name, failing that it
- * looks at col.sortingAlgorithm (and puts it in the cache), failing that
- * it guesses the sort algorithm based on the data type.
- *
- * The cache currently seems a bit pointless, as none of the work we do is
- * processor intensive enough to need caching. Presumably in future we might
- * inspect the row data itself to guess the sort function, and in that case
- * it would make sense to have a cache, the infrastructure is in place to allow
- * that.
- *
- * @param {Grid} grid the grid to consider
- * @param {GridCol} col the column to find a function for
- * @param {array} rows an array of grid rows. Currently unused, but presumably in future
- * we might inspect the rows themselves to decide what sort of data might be there
- * @returns {function} the sort function chosen for the column
- */
- rowSorter.getSortFn = function getSortFn(grid, col, rows) {
- var sortFn, item;
-
- // See if we already figured out what to use to sort the column and have it in the cache
- if (rowSorter.colSortFnCache[col.colDef.name]) {
- sortFn = rowSorter.colSortFnCache[col.colDef.name];
- }
- // If the column has its OWN sorting algorithm, use that
- else if (col.sortingAlgorithm !== undefined) {
- sortFn = col.sortingAlgorithm;
- rowSorter.colSortFnCache[col.colDef.name] = col.sortingAlgorithm;
- }
- // Always default to sortAlpha when sorting after a cellFilter
- else if ( col.sortCellFiltered && col.cellFilter ){
- sortFn = rowSorter.sortAlpha;
- rowSorter.colSortFnCache[col.colDef.name] = sortFn;
- }
- // Try and guess what sort function to use
- else {
- // Guess the sort function
- sortFn = rowSorter.guessSortFn(col.colDef.type);
-
- // If we found a sort function, cache it
- if (sortFn) {
- rowSorter.colSortFnCache[col.colDef.name] = sortFn;
- }
- else {
- // We assign the alpha sort because anything that is null/undefined will never get passed to
- // the actual sorting function. It will get caught in our null check and returned to be sorted
- // down to the bottom
- sortFn = rowSorter.sortAlpha;
- }
- }
-
- return sortFn;
- };
-
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name prioritySort
- * @description Used where multiple columns are present in the sort criteria,
- * we determine which column should take precedence in the sort by sorting
- * the columns based on their sort.priority
- *
- * @param {gridColumn} a column a
- * @param {gridColumn} b column b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.prioritySort = function (a, b) {
- // Both columns have a sort priority
- if (a.sort.priority !== undefined && b.sort.priority !== undefined) {
- // A is higher priority
- if (a.sort.priority < b.sort.priority) {
- return -1;
- }
- // Equal
- else if (a.sort.priority === b.sort.priority) {
- return 0;
- }
- // B is higher
- else {
- return 1;
- }
- }
- // Only A has a priority
- else if (a.sort.priority !== undefined) {
- return -1;
- }
- // Only B has a priority
- else if (b.sort.priority !== undefined) {
- return 1;
- }
- // Neither has a priority
- else {
- return 0;
- }
- };
-
-
- /**
- * @ngdoc object
- * @name useExternalSorting
- * @propertyOf ui.grid.class:GridOptions
- * @description Prevents the internal sorting from executing. Events will
- * still be fired when the sort changes, and the sort information on
- * the columns will be updated, allowing an external sorter (for example,
- * server sorting) to be implemented. Defaults to false.
- *
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:rowSorter
- * @name sort
- * @description sorts the grid
- * @param {Object} grid the grid itself
- * @param {array} rows the rows to be sorted
- * @param {array} columns the columns in which to look
- * for sort criteria
- * @returns {array} sorted rows
- */
- rowSorter.sort = function rowSorterSort(grid, rows, columns) {
- // first make sure we are even supposed to do work
- if (!rows) {
- return;
- }
-
- if (grid.options.useExternalSorting){
- return rows;
- }
-
- // Build the list of columns to sort by
- var sortCols = [];
- columns.forEach(function (col) {
- if (col.sort && !col.sort.ignoreSort && col.sort.direction && (col.sort.direction === uiGridConstants.ASC || col.sort.direction === uiGridConstants.DESC)) {
- sortCols.push(col);
- }
- });
-
- // Sort the "sort columns" by their sort priority
- sortCols = sortCols.sort(rowSorter.prioritySort);
-
- // Now rows to sort by, maintain original order
- if (sortCols.length === 0) {
- return rows;
- }
-
- // Re-usable variables
- var col, direction;
-
- // put a custom index field on each row, used to make a stable sort out of unstable sorts (e.g. Chrome)
- var setIndex = function( row, idx ){
- row.entity.$$uiGridIndex = idx;
- };
- rows.forEach(setIndex);
-
- // IE9-11 HACK.... the 'rows' variable would be empty where we call rowSorter.getSortFn(...) below. We have to use a separate reference
- // var d = data.slice(0);
- var r = rows.slice(0);
-
- // Now actually sort the data
- var rowSortFn = function (rowA, rowB) {
- var tem = 0,
- idx = 0,
- sortFn;
-
- while (tem === 0 && idx < sortCols.length) {
- // grab the metadata for the rest of the logic
- col = sortCols[idx];
- direction = sortCols[idx].sort.direction;
-
- sortFn = rowSorter.getSortFn(grid, col, r);
-
- var propA, propB;
-
- if ( col.sortCellFiltered ){
- propA = grid.getCellDisplayValue(rowA, col);
- propB = grid.getCellDisplayValue(rowB, col);
- } else {
- propA = grid.getCellValue(rowA, col);
- propB = grid.getCellValue(rowB, col);
- }
-
- tem = sortFn(propA, propB, rowA, rowB, direction, col);
-
- idx++;
- }
-
- // Chrome doesn't implement a stable sort function. If our sort returns 0
- // (i.e. the items are equal), and we're at the last sort column in the list,
- // then return the previous order using our custom
- // index variable
- if (tem === 0 ) {
- return rowA.entity.$$uiGridIndex - rowB.entity.$$uiGridIndex;
- }
-
- // Made it this far, we don't have to worry about null & undefined
- if (direction === uiGridConstants.ASC) {
- return tem;
- } else {
- return 0 - tem;
- }
- };
-
- var newRows = rows.sort(rowSortFn);
-
- // remove the custom index field on each row, used to make a stable sort out of unstable sorts (e.g. Chrome)
- var clearIndex = function( row, idx ){
- delete row.entity.$$uiGridIndex;
- };
- rows.forEach(clearIndex);
-
- return newRows;
- };
-
- return rowSorter;
-}]);
-
-})();
-
-(function() {
-
-var module = angular.module('ui.grid');
-
-var bindPolyfill;
-if (typeof Function.prototype.bind !== "function") {
- bindPolyfill = function() {
- var slice = Array.prototype.slice;
- return function(context) {
- var fn = this,
- args = slice.call(arguments, 1);
- if (args.length) {
- return function() {
- return arguments.length ? fn.apply(context, args.concat(slice.call(arguments))) : fn.apply(context, args);
- };
- }
- return function() {
- return arguments.length ? fn.apply(context, arguments) : fn.call(context);
- };
- };
- };
-}
-
-function getStyles (elem) {
- var e = elem;
- if (typeof(e.length) !== 'undefined' && e.length) {
- e = elem[0];
- }
-
- return e.ownerDocument.defaultView.getComputedStyle(e, null);
-}
-
-var rnumnonpx = new RegExp( "^(" + (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source + ")(?!px)[a-z%]+$", "i" ),
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(block|none|table(?!-c[ea]).+)/,
- cssShow = { position: "absolute", visibility: "hidden", display: "block" };
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? 'border' : 'content' ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === 'width' ? 1 : 0,
-
- val = 0;
-
- var sides = ['Top', 'Right', 'Bottom', 'Left'];
-
- for ( ; i < 4; i += 2 ) {
- var side = sides[i];
- // dump('side', side);
-
- // both box models exclude margin, so add it if we want it
- if ( extra === 'margin' ) {
- var marg = parseFloat(styles[extra + side]);
- if (!isNaN(marg)) {
- val += marg;
- }
- }
- // dump('val1', val);
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === 'content' ) {
- var padd = parseFloat(styles['padding' + side]);
- if (!isNaN(padd)) {
- val -= padd;
- // dump('val2', val);
- }
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== 'margin' ) {
- var bordermarg = parseFloat(styles['border' + side + 'Width']);
- if (!isNaN(bordermarg)) {
- val -= bordermarg;
- // dump('val3', val);
- }
- }
- }
- else {
- // at this point, extra isn't content, so add padding
- var nocontentPad = parseFloat(styles['padding' + side]);
- if (!isNaN(nocontentPad)) {
- val += nocontentPad;
- // dump('val4', val);
- }
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== 'padding') {
- var nocontentnopad = parseFloat(styles['border' + side + 'Width']);
- if (!isNaN(nocontentnopad)) {
- val += nocontentnopad;
- // dump('val5', val);
- }
- }
- }
- }
-
- // dump('augVal', val);
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val, // = name === 'width' ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles(elem),
- isBorderBox = styles['boxSizing'] === 'border-box';
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = styles[name];
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox &&
- ( true || val === elem.style[ name ] ); // use 'true' instead of 'support.boxSizingReliable()'
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- var ret = ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- );
-
- // dump('ret', ret, val);
- return ret;
-}
-
-function getLineHeight(elm) {
- elm = angular.element(elm)[0];
- var parent = elm.parentElement;
-
- if (!parent) {
- parent = document.getElementsByTagName('body')[0];
- }
-
- return parseInt( getStyles(parent).fontSize ) || parseInt( getStyles(elm).fontSize ) || 16;
-}
-
-var uid = ['0', '0', '0', '0'];
-var uidPrefix = 'uiGrid-';
-
-/**
- * @ngdoc service
- * @name ui.grid.service:GridUtil
- *
- * @description Grid utility functions
- */
-module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateCache', '$timeout', '$interval', '$injector', '$q', '$interpolate', 'uiGridConstants',
- function ($log, $window, $document, $http, $templateCache, $timeout, $interval, $injector, $q, $interpolate, uiGridConstants) {
- var s = {
-
- augmentWidthOrHeight: augmentWidthOrHeight,
-
- getStyles: getStyles,
-
- /**
- * @ngdoc method
- * @name createBoundedWrapper
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {object} Object to bind 'this' to
- * @param {method} Method to bind
- * @returns {Function} The wrapper that performs the binding
- *
- * @description
- * Binds given method to given object.
- *
- * By means of a wrapper, ensures that ``method`` is always bound to
- * ``object`` regardless of its calling environment.
- * Iow, inside ``method``, ``this`` always points to ``object``.
- *
- * See http://alistapart.com/article/getoutbindingsituations
- *
- */
- createBoundedWrapper: function(object, method) {
- return function() {
- return method.apply(object, arguments);
- };
- },
-
-
- /**
- * @ngdoc method
- * @name readableColumnName
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {string} columnName Column name as a string
- * @returns {string} Column name appropriately capitalized and split apart
- *
- @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', 'gridUtil', function ($scope, gridUtil) {
- $scope.name = 'firstName';
- $scope.columnName = function(name) {
- return gridUtil.readableColumnName(name);
- };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <strong>Column name:</strong> <input ng-model="name" />
- <br>
- <strong>Output:</strong> <span ng-bind="columnName(name)"></span>
- </div>
- </file>
- </example>
- */
- readableColumnName: function (columnName) {
- // Convert underscores to spaces
- if (typeof(columnName) === 'undefined' || columnName === undefined || columnName === null) { return columnName; }
-
- if (typeof(columnName) !== 'string') {
- columnName = String(columnName);
- }
-
- return columnName.replace(/_+/g, ' ')
- // Replace a completely all-capsed word with a first-letter-capitalized version
- .replace(/^[A-Z]+$/, function (match) {
- return angular.lowercase(angular.uppercase(match.charAt(0)) + match.slice(1));
- })
- // Capitalize the first letter of words
- .replace(/([\w\u00C0-\u017F]+)/g, function (match) {
- return angular.uppercase(match.charAt(0)) + match.slice(1);
- })
- // Put a space in between words that have partial capilizations (i.e. 'firstName' becomes 'First Name')
- // .replace(/([A-Z]|[A-Z]\w+)([A-Z])/g, "$1 $2");
- // .replace(/(\w+?|\w)([A-Z])/g, "$1 $2");
- .replace(/(\w+?(?=[A-Z]))/g, '$1 ');
- },
-
- /**
- * @ngdoc method
- * @name getColumnsFromData
- * @methodOf ui.grid.service:GridUtil
- * @description Return a list of column names, given a data set
- *
- * @param {string} data Data array for grid
- * @returns {Object} Column definitions with field accessor and column name
- *
- * @example
- <pre>
- var data = [
- { firstName: 'Bob', lastName: 'Jones' },
- { firstName: 'Frank', lastName: 'Smith' }
- ];
-
- var columnDefs = GridUtil.getColumnsFromData(data, excludeProperties);
-
- columnDefs == [
- {
- field: 'firstName',
- name: 'First Name'
- },
- {
- field: 'lastName',
- name: 'Last Name'
- }
- ];
- </pre>
- */
- getColumnsFromData: function (data, excludeProperties) {
- var columnDefs = [];
-
- if (!data || typeof(data[0]) === 'undefined' || data[0] === undefined) { return []; }
- if (angular.isUndefined(excludeProperties)) { excludeProperties = []; }
-
- var item = data[0];
-
- angular.forEach(item,function (prop, propName) {
- if ( excludeProperties.indexOf(propName) === -1){
- columnDefs.push({
- name: propName
- });
- }
- });
-
- return columnDefs;
- },
-
- /**
- * @ngdoc method
- * @name newId
- * @methodOf ui.grid.service:GridUtil
- * @description Return a unique ID string
- *
- * @returns {string} Unique string
- *
- * @example
- <pre>
- var id = GridUtil.newId();
-
- # 1387305700482;
- </pre>
- */
- newId: (function() {
- var seedId = new Date().getTime();
- return function() {
- return seedId += 1;
- };
- })(),
-
-
- /**
- * @ngdoc method
- * @name getTemplate
- * @methodOf ui.grid.service:GridUtil
- * @description Get's template from cache / element / url
- *
- * @param {string|element|promise} Either a string representing the template id, a string representing the template url,
- * an jQuery/Angualr element, or a promise that returns the template contents to use.
- * @returns {object} a promise resolving to template contents
- *
- * @example
- <pre>
- GridUtil.getTemplate(url).then(function (contents) {
- alert(contents);
- })
- </pre>
- */
- getTemplate: function (template) {
- // Try to fetch the template out of the templateCache
- if ($templateCache.get(template)) {
- return s.postProcessTemplate($templateCache.get(template));
- }
-
- // See if the template is itself a promise
- if (angular.isFunction(template.then)) {
- return template.then(s.postProcessTemplate);
- }
-
- // If the template is an element, return the element
- try {
- if (angular.element(template).length > 0) {
- return $q.when(template).then(s.postProcessTemplate);
- }
- }
- catch (err){
- //do nothing; not valid html
- }
-
- s.logDebug('fetching url', template);
-
- // Default to trying to fetch the template as a url with $http
- return $http({ method: 'GET', url: template})
- .then(
- function (result) {
- var templateHtml = result.data.trim();
- //put in templateCache for next call
- $templateCache.put(template, templateHtml);
- return templateHtml;
- },
- function (err) {
- throw new Error("Could not get template " + template + ": " + err);
- }
- )
- .then(s.postProcessTemplate);
- },
-
- //
- postProcessTemplate: function (template) {
- var startSym = $interpolate.startSymbol(),
- endSym = $interpolate.endSymbol();
-
- // If either of the interpolation symbols have been changed, we need to alter this template
- if (startSym !== '{{' || endSym !== '}}') {
- template = template.replace(/\{\{/g, startSym);
- template = template.replace(/\}\}/g, endSym);
- }
-
- return $q.when(template);
- },
-
- /**
- * @ngdoc method
- * @name guessType
- * @methodOf ui.grid.service:GridUtil
- * @description guesses the type of an argument
- *
- * @param {string/number/bool/object} item variable to examine
- * @returns {string} one of the following
- * - 'string'
- * - 'boolean'
- * - 'number'
- * - 'date'
- * - 'object'
- */
- guessType : function (item) {
- var itemType = typeof(item);
-
- // Check for numbers and booleans
- switch (itemType) {
- case "number":
- case "boolean":
- case "string":
- return itemType;
- default:
- if (angular.isDate(item)) {
- return "date";
- }
- return "object";
- }
- },
-
-
- /**
- * @ngdoc method
- * @name elementWidth
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element DOM element
- * @param {string} [extra] Optional modifier for calculation. Use 'margin' to account for margins on element
- *
- * @returns {number} Element width in pixels, accounting for any borders, etc.
- */
- elementWidth: function (elem) {
-
- },
-
- /**
- * @ngdoc method
- * @name elementHeight
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element DOM element
- * @param {string} [extra] Optional modifier for calculation. Use 'margin' to account for margins on element
- *
- * @returns {number} Element height in pixels, accounting for any borders, etc.
- */
- elementHeight: function (elem) {
-
- },
-
- // Thanks to http://stackoverflow.com/a/13382873/888165
- getScrollbarWidth: function() {
- var outer = document.createElement("div");
- outer.style.visibility = "hidden";
- outer.style.width = "100px";
- outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
-
- document.body.appendChild(outer);
-
- var widthNoScroll = outer.offsetWidth;
- // force scrollbars
- outer.style.overflow = "scroll";
-
- // add innerdiv
- var inner = document.createElement("div");
- inner.style.width = "100%";
- outer.appendChild(inner);
-
- var widthWithScroll = inner.offsetWidth;
-
- // remove divs
- outer.parentNode.removeChild(outer);
-
- return widthNoScroll - widthWithScroll;
- },
-
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- },
-
- fakeElement: function( elem, options, callback, args ) {
- var ret, name,
- newElement = angular.element(elem).clone()[0];
-
- for ( name in options ) {
- newElement.style[ name ] = options[ name ];
- }
-
- angular.element(document.body).append(newElement);
-
- ret = callback.call( newElement, newElement );
-
- angular.element(newElement).remove();
-
- return ret;
- },
-
- /**
- * @ngdoc method
- * @name normalizeWheelEvent
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {event} event A mouse wheel event
- *
- * @returns {event} A normalized event
- *
- * @description
- * Given an event from this list:
- *
- * `wheel, mousewheel, DomMouseScroll, MozMousePixelScroll`
- *
- * "normalize" it
- * so that it stays consistent no matter what browser it comes from (i.e. scale it correctly and make sure the direction is right.)
- */
- normalizeWheelEvent: function (event) {
- // var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'];
- // var toBind = 'onwheel' in document || document.documentMode >= 9 ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'];
- var lowestDelta, lowestDeltaXY;
-
- var orgEvent = event || window.event,
- args = [].slice.call(arguments, 1),
- delta = 0,
- deltaX = 0,
- deltaY = 0,
- absDelta = 0,
- absDeltaXY = 0,
- fn;
-
- // event = $.event.fix(orgEvent);
- // event.type = 'mousewheel';
-
- // NOTE: jQuery masks the event and stores it in the event as originalEvent
- if (orgEvent.originalEvent) {
- orgEvent = orgEvent.originalEvent;
- }
-
- // Old school scrollwheel delta
- if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta; }
- if ( orgEvent.detail ) { delta = orgEvent.detail * -1; }
-
- // At a minimum, setup the deltaY to be delta
- deltaY = delta;
-
- // Firefox < 17 related to DOMMouseScroll event
- if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
- deltaY = 0;
- deltaX = delta * -1;
- }
-
- // New school wheel delta (wheel event)
- if ( orgEvent.deltaY ) {
- deltaY = orgEvent.deltaY * -1;
- delta = deltaY;
- }
- if ( orgEvent.deltaX ) {
- deltaX = orgEvent.deltaX;
- delta = deltaX * -1;
- }
-
- // Webkit
- if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY; }
- if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = orgEvent.wheelDeltaX; }
-
- // Look for lowest delta to normalize the delta values
- absDelta = Math.abs(delta);
- if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; }
- absDeltaXY = Math.max(Math.abs(deltaY), Math.abs(deltaX));
- if ( !lowestDeltaXY || absDeltaXY < lowestDeltaXY ) { lowestDeltaXY = absDeltaXY; }
-
- // Get a whole value for the deltas
- fn = delta > 0 ? 'floor' : 'ceil';
- delta = Math[fn](delta / lowestDelta);
- deltaX = Math[fn](deltaX / lowestDeltaXY);
- deltaY = Math[fn](deltaY / lowestDeltaXY);
-
- return {
- delta: delta,
- deltaX: deltaX,
- deltaY: deltaY
- };
- },
-
- // Stolen from Modernizr
- // TODO: make this, and everythign that flows from it, robust
- //http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
- isTouchEnabled: function() {
- var bool;
-
- if (('ontouchstart' in $window) || $window.DocumentTouch && $document instanceof DocumentTouch) {
- bool = true;
- }
-
- return bool;
- },
-
- isNullOrUndefined: function(obj) {
- if (obj === undefined || obj === null) {
- return true;
- }
- return false;
- },
-
- endsWith: function(str, suffix) {
- if (!str || !suffix || typeof str !== "string") {
- return false;
- }
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- },
-
- arrayContainsObjectWithProperty: function(array, propertyName, propertyValue) {
- var found = false;
- angular.forEach(array, function (object) {
- if (object[propertyName] === propertyValue) {
- found = true;
- }
- });
- return found;
- },
-
- //// Shim requestAnimationFrame
- //requestAnimationFrame: $window.requestAnimationFrame && $window.requestAnimationFrame.bind($window) ||
- // $window.webkitRequestAnimationFrame && $window.webkitRequestAnimationFrame.bind($window) ||
- // function(fn) {
- // return $timeout(fn, 10, false);
- // },
-
- numericAndNullSort: function (a, b) {
- if (a === null) { return 1; }
- if (b === null) { return -1; }
- if (a === null && b === null) { return 0; }
- return a - b;
- },
-
- // Disable ngAnimate animations on an element
- disableAnimations: function (element) {
- var $animate;
- try {
- $animate = $injector.get('$animate');
- // See: http://brianhann.com/angular-1-4-breaking-changes-to-be-aware-of/#animate
- if (angular.version.major > 1 || (angular.version.major === 1 && angular.version.minor >= 4)) {
- $animate.enabled(element, false);
- } else {
- $animate.enabled(false, element);
- }
- }
- catch (e) {}
- },
-
- enableAnimations: function (element) {
- var $animate;
- try {
- $animate = $injector.get('$animate');
- // See: http://brianhann.com/angular-1-4-breaking-changes-to-be-aware-of/#animate
- if (angular.version.major > 1 || (angular.version.major === 1 && angular.version.minor >= 4)) {
- $animate.enabled(element, true);
- } else {
- $animate.enabled(true, element);
- }
- return $animate;
- }
- catch (e) {}
- },
-
- // Blatantly stolen from Angular as it isn't exposed (yet. 2.0 maybe?)
- nextUid: function nextUid() {
- var index = uid.length;
- var digit;
-
- while (index) {
- index--;
- digit = uid[index].charCodeAt(0);
- if (digit === 57 /*'9'*/) {
- uid[index] = 'A';
- return uidPrefix + uid.join('');
- }
- if (digit === 90 /*'Z'*/) {
- uid[index] = '0';
- } else {
- uid[index] = String.fromCharCode(digit + 1);
- return uidPrefix + uid.join('');
- }
- }
- uid.unshift('0');
-
- return uidPrefix + uid.join('');
- },
-
- // Blatantly stolen from Angular as it isn't exposed (yet. 2.0 maybe?)
- hashKey: function hashKey(obj) {
- var objType = typeof obj,
- key;
-
- if (objType === 'object' && obj !== null) {
- if (typeof (key = obj.$$hashKey) === 'function') {
- // must invoke on object to keep the right this
- key = obj.$$hashKey();
- }
- else if (typeof(obj.$$hashKey) !== 'undefined' && obj.$$hashKey) {
- key = obj.$$hashKey;
- }
- else if (key === undefined) {
- key = obj.$$hashKey = s.nextUid();
- }
- }
- else {
- key = obj;
- }
-
- return objType + ':' + key;
- },
-
- resetUids: function () {
- uid = ['0', '0', '0'];
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil
- * @name logError
- * @description wraps the $log method, allowing us to choose different
- * treatment within ui-grid if we so desired. At present we only log
- * error messages if uiGridConstants.LOG_ERROR_MESSAGES is set to true
- * @param {string} logMessage message to be logged to the console
- *
- */
- logError: function( logMessage ){
- if ( uiGridConstants.LOG_ERROR_MESSAGES ){
- $log.error( logMessage );
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil
- * @name logWarn
- * @description wraps the $log method, allowing us to choose different
- * treatment within ui-grid if we so desired. At present we only log
- * warning messages if uiGridConstants.LOG_WARN_MESSAGES is set to true
- * @param {string} logMessage message to be logged to the console
- *
- */
- logWarn: function( logMessage ){
- if ( uiGridConstants.LOG_WARN_MESSAGES ){
- $log.warn( logMessage );
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil
- * @name logDebug
- * @description wraps the $log method, allowing us to choose different
- * treatment within ui-grid if we so desired. At present we only log
- * debug messages if uiGridConstants.LOG_DEBUG_MESSAGES is set to true
- *
- */
- logDebug: function() {
- if ( uiGridConstants.LOG_DEBUG_MESSAGES ){
- $log.debug.apply($log, arguments);
- }
- }
-
- };
-
- /**
- * @ngdoc object
- * @name focus
- * @propertyOf ui.grid.service:GridUtil
- * @description Provies a set of methods to set the document focus inside the grid.
- * See {@link ui.grid.service:GridUtil.focus} for more information.
- */
-
- /**
- * @ngdoc object
- * @name ui.grid.service:GridUtil.focus
- * @description Provies a set of methods to set the document focus inside the grid.
- * Timeouts are utilized to ensure that the focus is invoked after any other event has been triggered.
- * e.g. click events that need to run before the focus or
- * inputs elements that are in a disabled state but are enabled when those events
- * are triggered.
- */
- s.focus = {
- queue: [],
- //http://stackoverflow.com/questions/25596399/set-element-focus-in-angular-way
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil.focus
- * @name byId
- * @description Sets the focus of the document to the given id value.
- * If provided with the grid object it will automatically append the grid id.
- * This is done to encourage unique dom id's as it allows for multiple grids on a
- * page.
- * @param {String} id the id of the dom element to set the focus on
- * @param {Object=} Grid the grid object for this grid instance. See: {@link ui.grid.class:Grid}
- * @param {Number} Grid.id the unique id for this grid. Already set on an initialized grid object.
- * @returns {Promise} The `$timeout` promise that will be resolved once focus is set. If another focus is requested before this request is evaluated.
- * then the promise will fail with the `'canceled'` reason.
- */
- byId: function (id, Grid) {
- this._purgeQueue();
- var promise = $timeout(function() {
- var elementID = (Grid && Grid.id ? Grid.id + '-' : '') + id;
- var element = $window.document.getElementById(elementID);
- if (element) {
- element.focus();
- } else {
- s.logWarn('[focus.byId] Element id ' + elementID + ' was not found.');
- }
- });
- this.queue.push(promise);
- return promise;
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil.focus
- * @name byElement
- * @description Sets the focus of the document to the given dom element.
- * @param {(element|angular.element)} element the DOM element to set the focus on
- * @returns {Promise} The `$timeout` promise that will be resolved once focus is set. If another focus is requested before this request is evaluated.
- * then the promise will fail with the `'canceled'` reason.
- */
- byElement: function(element){
- if (!angular.isElement(element)){
- s.logWarn("Trying to focus on an element that isn\'t an element.");
- return $q.reject('not-element');
- }
- element = angular.element(element);
- this._purgeQueue();
- var promise = $timeout(function(){
- if (element){
- element[0].focus();
- }
- });
- this.queue.push(promise);
- return promise;
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil.focus
- * @name bySelector
- * @description Sets the focus of the document to the given dom element.
- * @param {(element|angular.element)} parentElement the parent/ancestor of the dom element that you are selecting using the query selector
- * @param {String} querySelector finds the dom element using the {@link http://www.w3schools.com/jsref/met_document_queryselector.asp querySelector}
- * @param {boolean} [aSync=false] If true then the selector will be querried inside of a timeout. Otherwise the selector will be querried imidately
- * then the focus will be called.
- * @returns {Promise} The `$timeout` promise that will be resolved once focus is set. If another focus is requested before this request is evaluated.
- * then the promise will fail with the `'canceled'` reason.
- */
- bySelector: function(parentElement, querySelector, aSync){
- var self = this;
- if (!angular.isElement(parentElement)){
- throw new Error("The parent element is not an element.");
- }
- // Ensure that this is an angular element.
- // It is fine if this is already an angular element.
- parentElement = angular.element(parentElement);
- var focusBySelector = function(){
- var element = parentElement[0].querySelector(querySelector);
- return self.byElement(element);
- };
- this._purgeQueue();
- if (aSync){ //Do this asynchronysly
- var promise = $timeout(focusBySelector);
- this.queue.push($timeout(focusBySelector));
- return promise;
- } else {
- return focusBySelector();
- }
- },
- _purgeQueue: function(){
- this.queue.forEach(function(element){
- $timeout.cancel(element);
- });
- this.queue = [];
- }
- };
-
-
- ['width', 'height'].forEach(function (name) {
- var capsName = angular.uppercase(name.charAt(0)) + name.substr(1);
- s['element' + capsName] = function (elem, extra) {
- var e = elem;
- if (e && typeof(e.length) !== 'undefined' && e.length) {
- e = elem[0];
- }
-
- if (e && e !== null) {
- var styles = getStyles(e);
- return e.offsetWidth === 0 && rdisplayswap.test(styles.display) ?
- s.swap(e, cssShow, function() {
- return getWidthOrHeight(e, name, extra );
- }) :
- getWidthOrHeight( e, name, extra );
- }
- else {
- return null;
- }
- };
-
- s['outerElement' + capsName] = function (elem, margin) {
- return elem ? s['element' + capsName].call(this, elem, margin ? 'margin' : 'border') : null;
- };
- });
-
- // http://stackoverflow.com/a/24107550/888165
- s.closestElm = function closestElm(el, selector) {
- if (typeof(el.length) !== 'undefined' && el.length) {
- el = el[0];
- }
-
- var matchesFn;
-
- // find vendor prefix
- ['matches','webkitMatchesSelector','mozMatchesSelector','msMatchesSelector','oMatchesSelector'].some(function(fn) {
- if (typeof document.body[fn] === 'function') {
- matchesFn = fn;
- return true;
- }
- return false;
- });
-
- // traverse parents
- var parent;
- while (el !== null) {
- parent = el.parentElement;
- if (parent !== null && parent[matchesFn](selector)) {
- return parent;
- }
- el = parent;
- }
-
- return null;
- };
-
- s.type = function (obj) {
- var text = Function.prototype.toString.call(obj.constructor);
- return text.match(/function (.*?)\(/)[1];
- };
-
- s.getBorderSize = function getBorderSize(elem, borderType) {
- if (typeof(elem.length) !== 'undefined' && elem.length) {
- elem = elem[0];
- }
-
- var styles = getStyles(elem);
-
- // If a specific border is supplied, like 'top', read the 'borderTop' style property
- if (borderType) {
- borderType = 'border' + borderType.charAt(0).toUpperCase() + borderType.slice(1);
- }
- else {
- borderType = 'border';
- }
-
- borderType += 'Width';
-
- var val = parseInt(styles[borderType], 10);
-
- if (isNaN(val)) {
- return 0;
- }
- else {
- return val;
- }
- };
-
- // http://stackoverflow.com/a/22948274/888165
- // TODO: Opera? Mobile?
- s.detectBrowser = function detectBrowser() {
- var userAgent = $window.navigator.userAgent;
-
- var browsers = {chrome: /chrome/i, safari: /safari/i, firefox: /firefox/i, ie: /internet explorer|trident\//i};
-
- for (var key in browsers) {
- if (browsers[key].test(userAgent)) {
- return key;
- }
- }
-
- return 'unknown';
- };
-
- // Borrowed from https://github.com/othree/jquery.rtl-scroll-type
- // Determine the scroll "type" this browser is using for RTL
- s.rtlScrollType = function rtlScrollType() {
- if (rtlScrollType.type) {
- return rtlScrollType.type;
- }
-
- var definer = angular.element('<div dir="rtl" style="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll">A</div>')[0],
- type = 'reverse';
-
- document.body.appendChild(definer);
-
- if (definer.scrollLeft > 0) {
- type = 'default';
- }
- else {
- definer.scrollLeft = 1;
- if (definer.scrollLeft === 0) {
- type = 'negative';
- }
- }
-
- angular.element(definer).remove();
- rtlScrollType.type = type;
-
- return type;
- };
-
- /**
- * @ngdoc method
- * @name normalizeScrollLeft
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element The element to get the `scrollLeft` from.
- * @param {grid} grid - grid used to normalize (uses the rtl property)
- *
- * @returns {number} A normalized scrollLeft value for the current browser.
- *
- * @description
- * Browsers currently handle RTL in different ways, resulting in inconsistent scrollLeft values. This method normalizes them
- */
- s.normalizeScrollLeft = function normalizeScrollLeft(element, grid) {
- if (typeof(element.length) !== 'undefined' && element.length) {
- element = element[0];
- }
-
- var scrollLeft = element.scrollLeft;
-
- if (grid.isRTL()) {
- switch (s.rtlScrollType()) {
- case 'default':
- return element.scrollWidth - scrollLeft - element.clientWidth;
- case 'negative':
- return Math.abs(scrollLeft);
- case 'reverse':
- return scrollLeft;
- }
- }
-
- return scrollLeft;
- };
-
- /**
- * @ngdoc method
- * @name denormalizeScrollLeft
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element The element to normalize the `scrollLeft` value for
- * @param {number} scrollLeft The `scrollLeft` value to denormalize.
- * @param {grid} grid The grid that owns the scroll event.
- *
- * @returns {number} A normalized scrollLeft value for the current browser.
- *
- * @description
- * Browsers currently handle RTL in different ways, resulting in inconsistent scrollLeft values. This method denormalizes a value for the current browser.
- */
- s.denormalizeScrollLeft = function denormalizeScrollLeft(element, scrollLeft, grid) {
- if (typeof(element.length) !== 'undefined' && element.length) {
- element = element[0];
- }
-
- if (grid.isRTL()) {
- switch (s.rtlScrollType()) {
- case 'default':
- // Get the max scroll for the element
- var maxScrollLeft = element.scrollWidth - element.clientWidth;
-
- // Subtract the current scroll amount from the max scroll
- return maxScrollLeft - scrollLeft;
- case 'negative':
- return scrollLeft * -1;
- case 'reverse':
- return scrollLeft;
- }
- }
-
- return scrollLeft;
- };
-
- /**
- * @ngdoc method
- * @name preEval
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {string} path Path to evaluate
- *
- * @returns {string} A path that is normalized.
- *
- * @description
- * Takes a field path and converts it to bracket notation to allow for special characters in path
- * @example
- * <pre>
- * gridUtil.preEval('property') == 'property'
- * gridUtil.preEval('nested.deep.prop-erty') = "nested['deep']['prop-erty']"
- * </pre>
- */
- s.preEval = function (path) {
- var m = uiGridConstants.BRACKET_REGEXP.exec(path);
- if (m) {
- return (m[1] ? s.preEval(m[1]) : m[1]) + m[2] + (m[3] ? s.preEval(m[3]) : m[3]);
- } else {
- path = path.replace(uiGridConstants.APOS_REGEXP, '\\\'');
- var parts = path.split(uiGridConstants.DOT_REGEXP);
- var preparsed = [parts.shift()]; // first item must be var notation, thus skip
- angular.forEach(parts, function (part) {
- preparsed.push(part.replace(uiGridConstants.FUNC_REGEXP, '\']$1'));
- });
- return preparsed.join('[\'');
- }
- };
-
- /**
- * @ngdoc method
- * @name debounce
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {function} func function to debounce
- * @param {number} wait milliseconds to delay
- * @param {boolean} immediate execute before delay
- *
- * @returns {function} A function that can be executed as debounced function
- *
- * @description
- * Copied from https://github.com/shahata/angular-debounce
- * Takes a function, decorates it to execute only 1 time after multiple calls, and returns the decorated function
- * @example
- * <pre>
- * var debouncedFunc = gridUtil.debounce(function(){alert('debounced');}, 500);
- * debouncedFunc();
- * debouncedFunc();
- * debouncedFunc();
- * </pre>
- */
- s.debounce = function (func, wait, immediate) {
- var timeout, args, context, result;
- function debounce() {
- /* jshint validthis:true */
- context = this;
- args = arguments;
- var later = function () {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- }
- };
- var callNow = immediate && !timeout;
- if (timeout) {
- $timeout.cancel(timeout);
- }
- timeout = $timeout(later, wait, false);
- if (callNow) {
- result = func.apply(context, args);
- }
- return result;
- }
- debounce.cancel = function () {
- $timeout.cancel(timeout);
- timeout = null;
- };
- return debounce;
- };
-
- /**
- * @ngdoc method
- * @name throttle
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {function} func function to throttle
- * @param {number} wait milliseconds to delay after first trigger
- * @param {Object} params to use in throttle.
- *
- * @returns {function} A function that can be executed as throttled function
- *
- * @description
- * Adapted from debounce function (above)
- * Potential keys for Params Object are:
- * trailing (bool) - whether to trigger after throttle time ends if called multiple times
- * Updated to use $interval rather than $timeout, as protractor (e2e tests) is able to work with $interval,
- * but not with $timeout
- *
- * Note that when using throttle, you need to use throttle to create a new function upfront, then use the function
- * return from that call each time you need to call throttle. If you call throttle itself repeatedly, the lastCall
- * variable will get overwritten and the throttling won't work
- *
- * @example
- * <pre>
- * var throttledFunc = gridUtil.throttle(function(){console.log('throttled');}, 500, {trailing: true});
- * throttledFunc(); //=> logs throttled
- * throttledFunc(); //=> queues attempt to log throttled for ~500ms (since trailing param is truthy)
- * throttledFunc(); //=> updates arguments to keep most-recent request, but does not do anything else.
- * </pre>
- */
- s.throttle = function(func, wait, options){
- options = options || {};
- var lastCall = 0, queued = null, context, args;
-
- function runFunc(endDate){
- lastCall = +new Date();
- func.apply(context, args);
- $interval(function(){queued = null; }, 0, 1, false);
- }
-
- return function(){
- /* jshint validthis:true */
- context = this;
- args = arguments;
- if (queued === null){
- var sinceLast = +new Date() - lastCall;
- if (sinceLast > wait){
- runFunc();
- }
- else if (options.trailing){
- queued = $interval(runFunc, wait - sinceLast, 1, false);
- }
- }
- };
- };
-
- s.on = {};
- s.off = {};
- s._events = {};
-
- s.addOff = function (eventName) {
- s.off[eventName] = function (elm, fn) {
- var idx = s._events[eventName].indexOf(fn);
- if (idx > 0) {
- s._events[eventName].removeAt(idx);
- }
- };
- };
-
- var mouseWheeltoBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
- nullLowestDeltaTimeout,
- lowestDelta;
-
- s.on.mousewheel = function (elm, fn) {
- if (!elm || !fn) { return; }
-
- var $elm = angular.element(elm);
-
- // Store the line height and page height for this particular element
- $elm.data('mousewheel-line-height', getLineHeight($elm));
- $elm.data('mousewheel-page-height', s.elementHeight($elm));
- if (!$elm.data('mousewheel-callbacks')) { $elm.data('mousewheel-callbacks', {}); }
-
- var cbs = $elm.data('mousewheel-callbacks');
- cbs[fn] = (Function.prototype.bind || bindPolyfill).call(mousewheelHandler, $elm[0], fn);
-
- // Bind all the mousew heel events
- for ( var i = mouseWheeltoBind.length; i; ) {
- $elm.on(mouseWheeltoBind[--i], cbs[fn]);
- }
- $elm.on('$destroy', function unbindEvents() {
- for ( var i = mouseWheeltoBind.length; i; ) {
- $elm.off(mouseWheeltoBind[--i], cbs[fn]);
- }
- });
- };
- s.off.mousewheel = function (elm, fn) {
- var $elm = angular.element(elm);
-
- var cbs = $elm.data('mousewheel-callbacks');
- var handler = cbs[fn];
-
- if (handler) {
- for ( var i = mouseWheeltoBind.length; i; ) {
- $elm.off(mouseWheeltoBind[--i], handler);
- }
- }
-
- delete cbs[fn];
-
- if (Object.keys(cbs).length === 0) {
- $elm.removeData('mousewheel-line-height');
- $elm.removeData('mousewheel-page-height');
- $elm.removeData('mousewheel-callbacks');
- }
- };
-
- function mousewheelHandler(fn, event) {
- var $elm = angular.element(this);
-
- var delta = 0,
- deltaX = 0,
- deltaY = 0,
- absDelta = 0,
- offsetX = 0,
- offsetY = 0;
-
- // jQuery masks events
- if (event.originalEvent) { event = event.originalEvent; }
-
- if ( 'detail' in event ) { deltaY = event.detail * -1; }
- if ( 'wheelDelta' in event ) { deltaY = event.wheelDelta; }
- if ( 'wheelDeltaY' in event ) { deltaY = event.wheelDeltaY; }
- if ( 'wheelDeltaX' in event ) { deltaX = event.wheelDeltaX * -1; }
-
- // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
- if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
- deltaX = deltaY * -1;
- deltaY = 0;
- }
-
- // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
- delta = deltaY === 0 ? deltaX : deltaY;
-
- // New school wheel delta (wheel event)
- if ( 'deltaY' in event ) {
- deltaY = event.deltaY * -1;
- delta = deltaY;
- }
- if ( 'deltaX' in event ) {
- deltaX = event.deltaX;
- if ( deltaY === 0 ) { delta = deltaX * -1; }
- }
-
- // No change actually happened, no reason to go any further
- if ( deltaY === 0 && deltaX === 0 ) { return; }
-
- // Need to convert lines and pages to pixels if we aren't already in pixels
- // There are three delta modes:
- // * deltaMode 0 is by pixels, nothing to do
- // * deltaMode 1 is by lines
- // * deltaMode 2 is by pages
- if ( event.deltaMode === 1 ) {
- var lineHeight = $elm.data('mousewheel-line-height');
- delta *= lineHeight;
- deltaY *= lineHeight;
- deltaX *= lineHeight;
- }
- else if ( event.deltaMode === 2 ) {
- var pageHeight = $elm.data('mousewheel-page-height');
- delta *= pageHeight;
- deltaY *= pageHeight;
- deltaX *= pageHeight;
- }
-
- // Store lowest absolute delta to normalize the delta values
- absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
-
- if ( !lowestDelta || absDelta < lowestDelta ) {
- lowestDelta = absDelta;
-
- // Adjust older deltas if necessary
- if ( shouldAdjustOldDeltas(event, absDelta) ) {
- lowestDelta /= 40;
- }
- }
-
- // Get a whole, normalized value for the deltas
- delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
- deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
- deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
-
- // Normalise offsetX and offsetY properties
- // if ($elm[0].getBoundingClientRect ) {
- // var boundingRect = $(elm)[0].getBoundingClientRect();
- // offsetX = event.clientX - boundingRect.left;
- // offsetY = event.clientY - boundingRect.top;
- // }
-
- // event.deltaX = deltaX;
- // event.deltaY = deltaY;
- // event.deltaFactor = lowestDelta;
-
- var newEvent = {
- originalEvent: event,
- deltaX: deltaX,
- deltaY: deltaY,
- deltaFactor: lowestDelta,
- preventDefault: function () { event.preventDefault(); },
- stopPropagation: function () { event.stopPropagation(); }
- };
-
- // Clearout lowestDelta after sometime to better
- // handle multiple device types that give
- // a different lowestDelta
- // Ex: trackpad = 3 and mouse wheel = 120
- if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
- nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
-
- fn.call($elm[0], newEvent);
- }
-
- function nullLowestDelta() {
- lowestDelta = null;
- }
-
- function shouldAdjustOldDeltas(orgEvent, absDelta) {
- // If this is an older event and the delta is divisable by 120,
- // then we are assuming that the browser is treating this as an
- // older mouse wheel event and that we should divide the deltas
- // by 40 to try and get a more usable deltaFactor.
- // Side note, this actually impacts the reported scroll distance
- // in older browsers and can cause scrolling to be slower than native.
- // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
- return orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
- }
-
- return s;
-}]);
-
-// Add 'px' to the end of a number string if it doesn't have it already
-module.filter('px', function() {
- return function(str) {
- if (str.match(/^[\d\.]+$/)) {
- return str + 'px';
- }
- else {
- return str;
- }
- };
-});
-
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- var lang = {
- aggregate: {
- label: 'položky'
- },
- groupPanel: {
- description: 'Přesuňte záhlaví zde pro vytvoření skupiny dle sloupce.'
- },
- search: {
- placeholder: 'Hledat...',
- showingItems: 'Zobrazuji položky:',
- selectedItems: 'Vybrané položky:',
- totalItems: 'Celkem položek:',
- size: 'Velikost strany:',
- first: 'První strana',
- next: 'Další strana',
- previous: 'Předchozí strana',
- last: 'Poslední strana'
- },
- menu: {
- text: 'Vyberte sloupec:'
- },
- sort: {
- ascending: 'Seřadit od A-Z',
- descending: 'Seřadit od Z-A',
- remove: 'Odebrat seřazení'
- },
- column: {
- hide: 'Schovat sloupec'
- },
- aggregation: {
- count: 'celkem řádků: ',
- sum: 'celkem: ',
- avg: 'avg: ',
- min: 'min.: ',
- max: 'max.: '
- },
- pinning: {
- pinLeft: 'Zamknout vlevo',
- pinRight: 'Zamknout vpravo',
- unpin: 'Odemknout'
- },
- gridMenu: {
- columns: 'Sloupce:',
- importerTitle: 'Importovat soubor',
- exporterAllAsCsv: 'Exportovat všechna data do csv',
- exporterVisibleAsCsv: 'Exportovat viditelná data do csv',
- exporterSelectedAsCsv: 'Exportovat vybraná data do csv',
- exporterAllAsPdf: 'Exportovat všechna data do pdf',
- exporterVisibleAsPdf: 'Exportovat viditelná data do pdf',
- exporterSelectedAsPdf: 'Exportovat vybraná data do pdf',
- clearAllFilters: 'Odstranit všechny filtry'
- },
- importer: {
- noHeaders: 'Názvy sloupců se nepodařilo získat, obsahuje soubor záhlaví?',
- noObjects: 'Data se nepodařilo zpracovat, obsahuje soubor řádky mimo záhlaví?',
- invalidCsv: 'Soubor nelze zpracovat, jedná se o CSV?',
- invalidJson: 'Soubor nelze zpracovat, je to JSON?',
- jsonNotArray: 'Soubor musí obsahovat json. UkonÄuji..'
- },
- pagination: {
- sizes: 'položek na stránku',
- totalItems: 'položek'
- },
- grouping: {
- group: 'Seskupit',
- ungroup: 'Odebrat seskupení',
- aggregate_count: 'Agregace: Count',
- aggregate_sum: 'Agregace: Sum',
- aggregate_max: 'Agregace: Max',
- aggregate_min: 'Agregace: Min',
- aggregate_avg: 'Agregace: Avg',
- aggregate_remove: 'Agregace: Odebrat'
- }
- };
-
- // support varianty of different czech keys.
- $delegate.add('cs', lang);
- $delegate.add('cz', lang);
- $delegate.add('cs-cz', lang);
- $delegate.add('cs-CZ', lang);
- return $delegate;
- }]);
- }]);
-})();
-
-(function(){
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('da', {
- aggregate:{
- label: 'artikler'
- },
- groupPanel:{
- description: 'Grupér rækker udfra en kolonne ved at trække dens overskift hertil.'
- },
- search:{
- placeholder: 'Søg...',
- showingItems: 'Viste rækker:',
- selectedItems: 'Valgte rækker:',
- totalItems: 'Rækker totalt:',
- size: 'Side størrelse:',
- first: 'Første side',
- next: 'Næste side',
- previous: 'Forrige side',
- last: 'Sidste side'
- },
- menu:{
- text: 'Vælg kolonner:'
- },
- sort: {
- ascending: 'Sorter stigende',
- descending: 'Sorter faldende',
- none: 'Sorter ingen',
- remove: 'Fjern sortering'
- },
- column: {
- hide: 'Skjul kolonne'
- },
- aggregation: {
- count: 'antal rækker: ',
- sum: 'sum: ',
- avg: 'gns: ',
- min: 'min: ',
- max: 'max: '
- },
- gridMenu: {
- columns: 'Kolonner:',
- importerTitle: 'Importer fil',
- exporterAllAsCsv: 'Eksporter alle data som csv',
- exporterVisibleAsCsv: 'Eksporter synlige data som csv',
- exporterSelectedAsCsv: 'Eksporter markerede data som csv',
- exporterAllAsPdf: 'Eksporter alle data som pdf',
- exporterVisibleAsPdf: 'Eksporter synlige data som pdf',
- exporterSelectedAsPdf: 'Eksporter markerede data som pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Gå til første',
- pageBack: 'GÃ¥ tilbage',
- pageSelected: 'Valgte side',
- pageForward: 'GÃ¥ frem',
- pageToLast: 'GÃ¥ til sidste'
- },
- sizes: 'genstande per side',
- totalItems: 'genstande',
- through: 'gennem',
- of: 'af'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function ($provide) {
- $provide.decorator('i18nService', ['$delegate', function ($delegate) {
- $delegate.add('de', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filter für Spalte',
- removeFilter: 'Filter löschen',
- columnMenuButtonLabel: 'Spaltenmenü'
- },
- priority: 'Priorität:',
- filterLabel: "Filter für Spalte: "
- },
- aggregate: {
- label: 'Eintrag'
- },
- groupPanel: {
- description: 'Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren.'
- },
- search: {
- placeholder: 'Suche...',
- showingItems: 'Zeige Einträge:',
- selectedItems: 'Ausgewählte Einträge:',
- totalItems: 'Einträge gesamt:',
- size: 'Einträge pro Seite:',
- first: 'Erste Seite',
- next: 'Nächste Seite',
- previous: 'Vorherige Seite',
- last: 'Letzte Seite'
- },
- menu: {
- text: 'Spalten auswählen:'
- },
- sort: {
- ascending: 'aufsteigend sortieren',
- descending: 'absteigend sortieren',
- none: 'keine Sortierung',
- remove: 'Sortierung zurücksetzen'
- },
- column: {
- hide: 'Spalte ausblenden'
- },
- aggregation: {
- count: 'Zeilen insgesamt: ',
- sum: 'gesamt: ',
- avg: 'Durchschnitt: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Links anheften',
- pinRight: 'Rechts anheften',
- unpin: 'Lösen'
- },
- columnMenu: {
- close: 'Schließen'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Tabellenmenü'
- },
- columns: 'Spalten:',
- importerTitle: 'Datei importieren',
- exporterAllAsCsv: 'Alle Daten als CSV exportieren',
- exporterVisibleAsCsv: 'sichtbare Daten als CSV exportieren',
- exporterSelectedAsCsv: 'markierte Daten als CSV exportieren',
- exporterAllAsPdf: 'Alle Daten als PDF exportieren',
- exporterVisibleAsPdf: 'sichtbare Daten als PDF exportieren',
- exporterSelectedAsPdf: 'markierte Daten als PDF exportieren',
- clearAllFilters: 'Alle Filter zurücksetzen'
- },
- importer: {
- noHeaders: 'Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?',
- noObjects: 'Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?',
- invalidCsv: 'Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?',
- invalidJson: 'Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?',
- jsonNotArray: 'Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Zum Anfang',
- pageBack: 'Seite zurück',
- pageSelected: 'Ausgwählte Seite',
- pageForward: 'Seite vor',
- pageToLast: 'Zum Ende'
- },
- sizes: 'Einträge pro Seite',
- totalItems: 'Einträge',
- through: 'bis',
- of: 'von'
- },
- grouping: {
- group: 'Gruppieren',
- ungroup: 'Gruppierung aufheben',
- aggregate_count: 'Agg: Anzahl',
- aggregate_sum: 'Agg: Summe',
- aggregate_max: 'Agg: Maximum',
- aggregate_min: 'Agg: Minimum',
- aggregate_avg: 'Agg: Mittelwert',
- aggregate_remove: 'Aggregation entfernen'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('en', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filter for column',
- removeFilter: 'Remove Filter',
- columnMenuButtonLabel: 'Column Menu'
- },
- priority: 'Priority:',
- filterLabel: "Filter for column: "
- },
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Drag a column header here and drop it to group by that column.'
- },
- search: {
- placeholder: 'Search...',
- showingItems: 'Showing Items:',
- selectedItems: 'Selected Items:',
- totalItems: 'Total Items:',
- size: 'Page Size:',
- first: 'First Page',
- next: 'Next Page',
- previous: 'Previous Page',
- last: 'Last Page'
- },
- menu: {
- text: 'Choose Columns:'
- },
- sort: {
- ascending: 'Sort Ascending',
- descending: 'Sort Descending',
- none: 'Sort None',
- remove: 'Remove Sort'
- },
- column: {
- hide: 'Hide Column'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Pin Left',
- pinRight: 'Pin Right',
- unpin: 'Unpin'
- },
- columnMenu: {
- close: 'Close'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Grid Menu'
- },
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Page to first',
- pageBack: 'Page back',
- pageSelected: 'Selected page',
- pageForward: 'Page forward',
- pageToLast: 'Page to last'
- },
- sizes: 'items per page',
- totalItems: 'items',
- through: 'through',
- of: 'of'
- },
- grouping: {
- group: 'Group',
- ungroup: 'Ungroup',
- aggregate_count: 'Agg: Count',
- aggregate_sum: 'Agg: Sum',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Avg',
- aggregate_remove: 'Agg: Remove'
- },
- validate: {
- error: 'Error:',
- minLength: 'Value should be at least THRESHOLD characters long.',
- maxLength: 'Value should be at most THRESHOLD characters long.',
- required: 'A value is needed.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('es', {
- aggregate: {
- label: 'Artículos'
- },
- groupPanel: {
- description: 'Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna.'
- },
- search: {
- placeholder: 'Buscar...',
- showingItems: 'Artículos Mostrados:',
- selectedItems: 'Artículos Seleccionados:',
- totalItems: 'Artículos Totales:',
- size: 'Tamaño de Página:',
- first: 'Primera Página',
- next: 'Página Siguiente',
- previous: 'Página Anterior',
- last: 'Última Página'
- },
- menu: {
- text: 'Elegir columnas:'
- },
- sort: {
- ascending: 'Orden Ascendente',
- descending: 'Orden Descendente',
- remove: 'Sin Ordenar'
- },
- column: {
- hide: 'Ocultar la columna'
- },
- aggregation: {
- count: 'filas totales: ',
- sum: 'total: ',
- avg: 'media: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Fijar a la Izquierda',
- pinRight: 'Fijar a la Derecha',
- unpin: 'Quitar Fijación'
- },
- gridMenu: {
- columns: 'Columnas:',
- importerTitle: 'Importar archivo',
- exporterAllAsCsv: 'Exportar todo como csv',
- exporterVisibleAsCsv: 'Exportar vista como csv',
- exporterSelectedAsCsv: 'Exportar selección como csv',
- exporterAllAsPdf: 'Exportar todo como pdf',
- exporterVisibleAsPdf: 'Exportar vista como pdf',
- exporterSelectedAsPdf: 'Exportar selección como pdf',
- clearAllFilters: 'Limpiar todos los filtros'
- },
- importer: {
- noHeaders: 'No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?',
- noObjects: 'No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?',
- invalidCsv: 'No fue posible procesar el archivo, ¿es un CSV válido?',
- invalidJson: 'No fue posible procesar el archivo, ¿es un Json válido?',
- jsonNotArray: 'El archivo json importado debe contener un array, abortando.'
- },
- pagination: {
- sizes: 'registros por página',
- totalItems: 'registros',
- of: 'de'
- },
- grouping: {
- group: 'Agrupar',
- ungroup: 'Desagrupar',
- aggregate_count: 'Agr: Cont',
- aggregate_sum: 'Agr: Sum',
- aggregate_max: 'Agr: Máx',
- aggregate_min: 'Agr: Min',
- aggregate_avg: 'Agr: Prom',
- aggregate_remove: 'Agr: Quitar'
- }
- });
- return $delegate;
- }]);
-}]);
-})();
-
-/**
- * Translated by: R. Salarmehr
- * M. Hosseynzade
- * Using Vajje.com online dictionary.
- */
-(function () {
- angular.module('ui.grid').config(['$provide', function ($provide) {
- $provide.decorator('i18nService', ['$delegate', function ($delegate) {
- $delegate.add('fa', {
- aggregate: {
- label: 'قلم'
- },
- groupPanel: {
- description: 'عنوان یک ستون را بگیر و به گروهی از آن ستون رها کن.'
- },
- search: {
- placeholder: 'جستجو...',
- showingItems: 'نمایش اقلام:',
- selectedItems: 'قلم\u200cهای انتخاب شده:',
- totalItems: 'مجموع اقلام:',
- size: 'اندازه\u200cÛŒ صÙحه:',
- first: 'اولین صÙحه',
- next: 'صÙحه\u200cÛŒ\u200cبعدی',
- previous: 'صÙحه\u200cÛŒ\u200c قبلی',
- last: 'آخرین صÙحه'
- },
- menu: {
- text: 'ستون\u200cهای انتخابی:'
- },
- sort: {
- ascending: 'ترتیب صعودی',
- descending: 'ترتیب نزولی',
- remove: 'حذ٠مرتب کردن'
- },
- column: {
- hide: 'پنهان\u200cکردن ستون'
- },
- aggregation: {
- count: 'تعداد: ',
- sum: 'مجموع: ',
- avg: 'میانگین: ',
- min: 'کمترین: ',
- max: 'بیشترین: '
- },
- pinning: {
- pinLeft: 'پین کردن سمت چپ',
- pinRight: 'پین کردن سمت راست',
- unpin: 'حذ٠پین'
- },
- gridMenu: {
- columns: 'ستون\u200cها:',
- importerTitle: 'وارد کردن Ùایل',
- exporterAllAsCsv: 'خروجی تمام داده\u200cها در Ùایل csv',
- exporterVisibleAsCsv: 'خروجی داده\u200cهای قابل مشاهده در Ùایل csv',
- exporterSelectedAsCsv: 'خروجی داده\u200cهای انتخاب\u200cشده در Ùایل csv',
- exporterAllAsPdf: 'خروجی تمام داده\u200cها در Ùایل pdf',
- exporterVisibleAsPdf: 'خروجی داده\u200cهای قابل مشاهده در Ùایل pdf',
- exporterSelectedAsPdf: 'خروجی داده\u200cهای انتخاب\u200cشده در Ùایل pdf',
- clearAllFilters: 'پاک کردن تمام Ùیلتر'
- },
- importer: {
- noHeaders: 'نام ستون قابل استخراج نیست. آیا Ùایل عنوان دارد؟',
- noObjects: 'اشیا قابل استخراج نیستند. آیا به جز عنوان\u200cها در Ùایل داده وجود دارد؟',
- invalidCsv: 'Ùایل قابل پردازش نیست. آیا Ùرمت csv معتبر است؟',
- invalidJson: 'Ùایل قابل پردازش نیست. آیا Ùرمت json معتبر است؟',
- jsonNotArray: 'Ùایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد.'
- },
- pagination: {
- sizes: 'اقلام در هر صÙحه',
- totalItems: 'اقلام',
- of: 'از'
- },
- grouping: {
- group: 'گروه\u200cبندی',
- ungroup: 'حذ٠گروه\u200cبندی',
- aggregate_count: 'Agg: تعداد',
- aggregate_sum: 'Agg: جمع',
- aggregate_max: 'Agg: بیشینه',
- aggregate_min: 'Agg: کمینه',
- aggregate_avg: 'Agg: میانگین',
- aggregate_remove: 'Agg: حذÙ'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('fi', {
- aggregate: {
- label: 'rivit'
- },
- groupPanel: {
- description: 'Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan.'
- },
- search: {
- placeholder: 'Hae...',
- showingItems: 'Näytetään rivejä:',
- selectedItems: 'Valitut rivit:',
- totalItems: 'Rivejä yht.:',
- size: 'Näytä:',
- first: 'Ensimmäinen sivu',
- next: 'Seuraava sivu',
- previous: 'Edellinen sivu',
- last: 'Viimeinen sivu'
- },
- menu: {
- text: 'Valitse sarakkeet:'
- },
- sort: {
- ascending: 'Järjestä nouseva',
- descending: 'Järjestä laskeva',
- remove: 'Poista järjestys'
- },
- column: {
- hide: 'Piilota sarake'
- },
- aggregation: {
- count: 'Rivejä yht.: ',
- sum: 'Summa: ',
- avg: 'K.a.: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Lukitse vasemmalle',
- pinRight: 'Lukitse oikealle',
- unpin: 'Poista lukitus'
- },
- gridMenu: {
- columns: 'Sarakkeet:',
- importerTitle: 'Tuo tiedosto',
- exporterAllAsCsv: 'Vie tiedot csv-muodossa',
- exporterVisibleAsCsv: 'Vie näkyvä tieto csv-muodossa',
- exporterSelectedAsCsv: 'Vie valittu tieto csv-muodossa',
- exporterAllAsPdf: 'Vie tiedot pdf-muodossa',
- exporterVisibleAsPdf: 'Vie näkyvä tieto pdf-muodossa',
- exporterSelectedAsPdf: 'Vie valittu tieto pdf-muodossa',
- clearAllFilters: 'Puhdista kaikki suodattimet'
- },
- importer: {
- noHeaders: 'Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?',
- noObjects: 'Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?',
- invalidCsv: 'Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?',
- invalidJson: 'Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?',
- jsonNotArray: 'Tiedosto ei sisältänyt taulukkoa, lopetetaan.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('fr', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filtre de la colonne',
- removeFilter: 'Supprimer le filtre',
- columnMenuButtonLabel: 'Menu de la colonne'
- },
- priority: 'Priorité:',
- filterLabel: "Filtre de la colonne: "
- },
- aggregate: {
- label: 'éléments'
- },
- groupPanel: {
- description: 'Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes.'
- },
- search: {
- placeholder: 'Recherche...',
- showingItems: 'Affichage des éléments :',
- selectedItems: 'Éléments sélectionnés :',
- totalItems: 'Nombre total d\'éléments:',
- size: 'Taille de page:',
- first: 'Première page',
- next: 'Page Suivante',
- previous: 'Page précédente',
- last: 'Dernière page'
- },
- menu: {
- text: 'Choisir des colonnes :'
- },
- sort: {
- ascending: 'Trier par ordre croissant',
- descending: 'Trier par ordre décroissant',
- none: 'Aucun tri',
- remove: 'Enlever le tri'
- },
- column: {
- hide: 'Cacher la colonne'
- },
- aggregation: {
- count: 'lignes totales: ',
- sum: 'total: ',
- avg: 'moy: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Épingler à gauche',
- pinRight: 'Épingler à droite',
- unpin: 'Détacher'
- },
- columnMenu: {
- close: 'Fermer'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Menu du tableau'
- },
- columns: 'Colonnes:',
- importerTitle: 'Importer un fichier',
- exporterAllAsCsv: 'Exporter toutes les données en CSV',
- exporterVisibleAsCsv: 'Exporter les données visibles en CSV',
- exporterSelectedAsCsv: 'Exporter les données sélectionnées en CSV',
- exporterAllAsPdf: 'Exporter toutes les données en PDF',
- exporterVisibleAsPdf: 'Exporter les données visibles en PDF',
- exporterSelectedAsPdf: 'Exporter les données sélectionnées en PDF',
- clearAllFilters: 'Nettoyez tous les filtres'
- },
- importer: {
- noHeaders: 'Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?',
- noObjects: 'Aucun objet trouvé, le fichier possède-t-il des données autres que l\'en-tête ?',
- invalidCsv: 'Le fichier n\'a pas pu être traité, le CSV est-il valide ?',
- invalidJson: 'Le fichier n\'a pas pu être traité, le JSON est-il valide ?',
- jsonNotArray: 'Le fichier JSON importé doit contenir un tableau, abandon.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Aller à la première page',
- pageBack: 'Page précédente',
- pageSelected: 'Page sélectionnée',
- pageForward: 'Page suivante',
- pageToLast: 'Aller à la dernière page'
- },
- sizes: 'éléments par page',
- totalItems: 'éléments',
- through: 'à',
- of: 'sur'
- },
- grouping: {
- group: 'Grouper',
- ungroup: 'Dégrouper',
- aggregate_count: 'Agg: Compter',
- aggregate_sum: 'Agg: Somme',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Moy',
- aggregate_remove: 'Agg: Retirer'
- },
- validate: {
- error: 'Erreur:',
- minLength: 'La valeur doit être supérieure ou égale à THRESHOLD caractères.',
- maxLength: 'La valeur doit être inférieure ou égale à THRESHOLD caractères.',
- required: 'Une valeur est nécéssaire.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function ($provide) {
- $provide.decorator('i18nService', ['$delegate', function ($delegate) {
- $delegate.add('he', {
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'גרור עמודה לכ×ן ושחרר בכדי לקבץ עמודה זו.'
- },
- search: {
- placeholder: 'חפש...',
- showingItems: 'מציג:',
- selectedItems: 'סה"כ נבחרו:',
- totalItems: 'סה"כ רשומות:',
- size: 'תוצ×ות בדף:',
- first: 'דף ר×שון',
- next: 'דף הב×',
- previous: 'דף קוד×',
- last: 'דף ×חרון'
- },
- menu: {
- text: 'בחר עמודות:'
- },
- sort: {
- ascending: 'סדר עולה',
- descending: 'סדר יורד',
- remove: 'בטל'
- },
- column: {
- hide: 'טור הסתר'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- gridMenu: {
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clean all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('hy', {
- aggregate: {
- label: 'Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€'
- },
- groupPanel: {
- description: 'Ô¸Õ½Õ¿ Õ½ÕµÕ¡Õ¶ Õ­Õ´Õ¢Õ¡Õ¾Õ¸Ö€Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€ Ö„Õ¡Õ·Õ¥Ö„ Ö‡ Õ£ÖÕ¥Ö„ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Õ«Ö€Õ¶ Õ¡ÕµÕ½Õ¿Õ¥Õ²Ö‰'
- },
- search: {
- placeholder: 'Õ“Õ¶Õ¿Ö€Õ¸Ö‚Õ´...',
- showingItems: 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ',
- selectedItems: 'Ô¸Õ¶Õ¿Ö€Õ¾Õ¡Õ®:',
- totalItems: 'Ô¸Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨Õ',
- size: 'ÕÕ¸Õ²Õ¥Ö€Õ« Ö„Õ¡Õ¶Õ¡Õ¯Õ¨ Õ§Õ»Õ¸Ö‚Õ´Õ',
- first: 'Ô±Õ¼Õ¡Õ»Õ«Õ¶ Õ§Õ»',
- next: 'Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ§Õ»',
- previous: 'Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ§Õ»',
- last: 'ÕŽÕ¥Ö€Õ»Õ«Õ¶ Õ§Õ»'
- },
- menu: {
- text: 'Ô¸Õ¶Õ¿Ö€Õ¥Õ¬ Õ½ÕµÕ¸Ö‚Õ¶Õ¥Ö€Õ¨:'
- },
- sort: {
- ascending: 'Ô±Õ³Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¸Õ¾',
- descending: 'Õ†Õ¾Õ¡Õ¦Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¸Õ¾',
- remove: 'Õ€Õ¡Õ¶Õ¥Õ¬ '
- },
- column: {
- hide: 'Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ½ÕµÕ¸Ö‚Õ¶Õ¨'
- },
- aggregation: {
- count: 'Õ¨Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨ Õ¿Õ¸Õ²Õ ',
- sum: 'Õ¨Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨Õ ',
- avg: 'Õ´Õ«Õ»Õ«Õ¶Õ ',
- min: 'Õ´Õ«Õ¶Õ ',
- max: 'Õ´Õ¡Ö„Õ½Õ '
- },
- pinning: {
- pinLeft: 'Ô¿ÕºÖÕ¶Õ¥Õ¬ Õ±Õ¡Õ­ Õ¯Õ¸Õ²Õ´Õ¸Ö‚Õ´',
- pinRight: 'Ô¿ÕºÖÕ¶Õ¥Õ¬ Õ¡Õ» Õ¯Õ¸Õ²Õ´Õ¸Ö‚Õ´',
- unpin: 'Ô±Ö€Õ±Õ¡Õ¯Õ¥Õ¬'
- },
- gridMenu: {
- columns: 'ÕÕµÕ¸Ö‚Õ¶Õ¥Ö€:',
- importerTitle: 'Õ†Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬',
- exporterAllAsCsv: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¨ CSV',
- exporterVisibleAsCsv: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¥Ö€Ö‡Õ¡ÖÕ¸Õ² Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ CSV',
- exporterSelectedAsCsv: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ CSV',
- exporterAllAsPdf: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ PDF',
- exporterVisibleAsPdf: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¥Ö€Ö‡Õ¡ÖÕ¸Õ² Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ PDF',
- exporterSelectedAsPdf: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ PDF',
- clearAllFilters: 'Õ„Õ¡Ö„Ö€Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€ Ö†Õ«Õ¬Õ¿Ö€Õ¥Ö€Õ¨'
- },
- importer: {
- noHeaders: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ¸Ö€Õ¸Õ·Õ¥Õ¬ Õ½ÕµÕ¡Õ¶ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ¥Ö€Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Ö†Õ¡ÕµÕ¬Õ¨ Õ¸Ö‚Õ¶Õ« Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ¥Ö€Ö‰',
- noObjects: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ¯Õ¡Ö€Õ¤Õ¡Õ¬ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Ö†Õ¡ÕµÕ¬Õ¸Ö‚Õ´ Õ¯Õ¡Õ¶ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Ö‰',
- invalidCsv: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ´Õ·Õ¡Õ¯Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Õ¡ÕµÕ¶ Õ¾Õ¡Õ¾Õ¥Ö€ CSV Õ§Ö‰',
- invalidJson: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ´Õ·Õ¡Õ¯Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Õ¡ÕµÕ¶ Õ¾Õ¡Õ¾Õ¥Ö€ Json Õ§Ö‰',
- jsonNotArray: 'Õ†Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¾Õ¡Õ® json Ö†Õ¡ÕµÕ¬Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« Õ¦Õ¡Õ¶Õ£Õ¾Õ¡Õ®, Õ¯Õ¡Õ½Õ¥ÖÕ¾Õ¸Ö‚Õ´ Õ§Ö‰'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('it', {
- aggregate: {
- label: 'elementi'
- },
- groupPanel: {
- description: 'Trascina un\'intestazione all\'interno del gruppo della colonna.'
- },
- search: {
- placeholder: 'Ricerca...',
- showingItems: 'Mostra:',
- selectedItems: 'Selezionati:',
- totalItems: 'Totali:',
- size: 'Tot Pagine:',
- first: 'Prima',
- next: 'Prossima',
- previous: 'Precedente',
- last: 'Ultima'
- },
- menu: {
- text: 'Scegli le colonne:'
- },
- sort: {
- ascending: 'Asc.',
- descending: 'Desc.',
- remove: 'Annulla ordinamento'
- },
- column: {
- hide: 'Nascondi'
- },
- aggregation: {
- count: 'righe totali: ',
- sum: 'tot: ',
- avg: 'media: ',
- min: 'minimo: ',
- max: 'massimo: '
- },
- pinning: {
- pinLeft: 'Blocca a sx',
- pinRight: 'Blocca a dx',
- unpin: 'Blocca in alto'
- },
- gridMenu: {
- columns: 'Colonne:',
- importerTitle: 'Importa',
- exporterAllAsCsv: 'Esporta tutti i dati in CSV',
- exporterVisibleAsCsv: 'Esporta i dati visibili in CSV',
- exporterSelectedAsCsv: 'Esporta i dati selezionati in CSV',
- exporterAllAsPdf: 'Esporta tutti i dati in PDF',
- exporterVisibleAsPdf: 'Esporta i dati visibili in PDF',
- exporterSelectedAsPdf: 'Esporta i dati selezionati in PDF',
- clearAllFilters: 'Pulire tutti i filtri'
- },
- importer: {
- noHeaders: 'Impossibile reperire i nomi delle colonne, sicuro che siano indicati all\'interno del file?',
- noObjects: 'Impossibile reperire gli oggetti, sicuro che siano indicati all\'interno del file?',
- invalidCsv: 'Impossibile elaborare il file, sicuro che sia un CSV?',
- invalidJson: 'Impossibile elaborare il file, sicuro che sia un JSON valido?',
- jsonNotArray: 'Errore! Il file JSON da importare deve contenere un array.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Prima',
- pageBack: 'Indietro',
- pageSelected: 'Pagina selezionata',
- pageForward: 'Avanti',
- pageToLast: 'Ultima'
- },
- sizes: 'elementi per pagina',
- totalItems: 'elementi',
- through: 'a',
- of: 'di'
- },
- grouping: {
- group: 'Raggruppa',
- ungroup: 'Separa',
- aggregate_count: 'Agg: N. Elem.',
- aggregate_sum: 'Agg: Somma',
- aggregate_max: 'Agg: Massimo',
- aggregate_min: 'Agg: Minimo',
- aggregate_avg: 'Agg: Media',
- aggregate_remove: 'Agg: Rimuovi'
- },
- validate: {
- error: 'Errore:',
- minLength: 'Lunghezza minima pari a THRESHOLD caratteri.',
- maxLength: 'Lunghezza massima pari a THRESHOLD caratteri.',
- required: 'Necessario inserire un valore.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function() {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ja', {
- aggregate: {
- label: 'é …ç›®'
- },
- groupPanel: {
- description: 'ã“ã“ã«åˆ—ヘッダをドラッグアンドドロップã—ã¦ã€ãã®åˆ—ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚'
- },
- search: {
- placeholder: '検索...',
- showingItems: '表示中ã®é …ç›®:',
- selectedItems: 'é¸æŠžã—ãŸé …ç›®:',
- totalItems: 'é …ç›®ã®ç·æ•°:',
- size: 'ページサイズ:',
- first: '最åˆã®ãƒšãƒ¼ã‚¸',
- next: '次ã®ãƒšãƒ¼ã‚¸',
- previous: 'å‰ã®ãƒšãƒ¼ã‚¸',
- last: 'å‰ã®ãƒšãƒ¼ã‚¸'
- },
- menu: {
- text: '列ã®é¸æŠž:'
- },
- sort: {
- ascending: '昇順ã«ä¸¦ã¹æ›¿ãˆ',
- descending: 'é™é †ã«ä¸¦ã¹æ›¿ãˆ',
- remove: '並ã¹æ›¿ãˆã®è§£é™¤'
- },
- column: {
- hide: '列ã®éžè¡¨ç¤º'
- },
- aggregation: {
- count: 'åˆè¨ˆè¡Œæ•°: ',
- sum: 'åˆè¨ˆ: ',
- avg: 'å¹³å‡: ',
- min: '最å°: ',
- max: '最大: '
- },
- pinning: {
- pinLeft: 'å·¦ã«å›ºå®š',
- pinRight: 'å³ã«å›ºå®š',
- unpin: '固定解除'
- },
- gridMenu: {
- columns: '列:',
- importerTitle: 'ファイルã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ',
- exporterAllAsCsv: 'ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterVisibleAsCsv: '表示中ã®ãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterSelectedAsCsv: 'é¸æŠžã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterAllAsPdf: 'ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterVisibleAsPdf: '表示中ã®ãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterSelectedAsPdf: 'é¸æŠžã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- clearAllFilters: 'ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’清掃ã—ã¦ãã ã•ã„'
- },
- importer: {
- noHeaders: '列åã‚’å–å¾—ã§ãã¾ã›ã‚“。ファイルã«ãƒ˜ãƒƒãƒ€ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- noObjects: 'オブジェクトをå–å¾—ã§ãã¾ã›ã‚“。ファイルã«ãƒ˜ãƒƒãƒ€ä»¥å¤–ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- invalidCsv: 'ファイルを処ç†ã§ãã¾ã›ã‚“。ファイルãŒæœ‰åŠ¹ãªCSVå½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- invalidJson: 'ファイルを処ç†ã§ãã¾ã›ã‚“。ファイルãŒæœ‰åŠ¹ãªJSONå½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- jsonNotArray: 'インãƒãƒ¼ãƒˆã—ãŸJSONファイルã«ã¯é…列ãŒå«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚処ç†ã‚’中止ã—ã¾ã™ã€‚'
- },
- pagination: {
- aria: {
- pageToFirst: '最åˆã®ãƒšãƒ¼ã‚¸',
- pageBack: 'å‰ã®ãƒšãƒ¼ã‚¸',
- pageSelected: 'ç¾åœ¨ã®ãƒšãƒ¼ã‚¸',
- pageForward: '次ã®ãƒšãƒ¼ã‚¸',
- pageToLast: '最後ã®ãƒšãƒ¼ã‚¸'
- },
- sizes: '項目/ページ',
- totalItems: 'é …ç›®',
- through: 'ã‹ã‚‰',
- of: 'é …ç›®/å…¨'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ko', {
- aggregate: {
- label: 'ì•„ì´í…œ'
- },
- groupPanel: {
- description: '컬럼으로 그룹핑하기 위해서는 컬럼 í—¤ë”를 ëŒì–´ 떨어뜨려 주세요.'
- },
- search: {
- placeholder: '검색...',
- showingItems: '항목 보여주기:',
- selectedItems: 'ì„ íƒ í•­ëª©:',
- totalItems: '전체 항목:',
- size: '페ì´ì§€ í¬ê¸°:',
- first: '첫번째 페ì´ì§€',
- next: 'ë‹¤ìŒ íŽ˜ì´ì§€',
- previous: 'ì´ì „ 페ì´ì§€',
- last: '마지막 페ì´ì§€'
- },
- menu: {
- text: 'ì»¬ëŸ¼ì„ ì„ íƒí•˜ì„¸ìš”:'
- },
- sort: {
- ascending: '오름차순 정렬',
- descending: '내림차순 정렬',
- remove: '소팅 제거'
- },
- column: {
- hide: '컬럼 제거'
- },
- aggregation: {
- count: '전체 갯수: ',
- sum: 'ì „ì²´: ',
- avg: 'í‰ê· : ',
- min: '최소: ',
- max: '최대: '
- },
- pinning: {
- pinLeft: '왼쪽 핀',
- pinRight: '오른쪽 핀',
- unpin: '핀 제거'
- },
- gridMenu: {
- columns: '컬럼:',
- importerTitle: 'íŒŒì¼ ê°€ì ¸ì˜¤ê¸°',
- exporterAllAsCsv: 'csvë¡œ 모든 ë°ì´í„° 내보내기',
- exporterVisibleAsCsv: 'csvë¡œ ë³´ì´ëŠ” ë°ì´í„° 내보내기',
- exporterSelectedAsCsv: 'csvë¡œ ì„ íƒëœ ë°ì´í„° 내보내기',
- exporterAllAsPdf: 'pdfë¡œ 모든 ë°ì´í„° 내보내기',
- exporterVisibleAsPdf: 'pdfë¡œ ë³´ì´ëŠ” ë°ì´í„° 내보내기',
- exporterSelectedAsPdf: 'pdfë¡œ ì„ íƒ ë°ì´í„° 내보내기',
- clearAllFilters: '모든 필터를 청소'
- },
- importer: {
- noHeaders: 'ì»¬ëŸ¼ëª…ì´ ì§€ì •ë˜ì–´ 있지 않습니다. 파ì¼ì— í—¤ë”ê°€ 명시ë˜ì–´ 있는지 확ì¸í•´ 주세요.',
- noObjects: 'ë°ì´í„°ê°€ 지정ë˜ì–´ 있지 않습니다. ë°ì´í„°ê°€ 파ì¼ì— 있는지 확ì¸í•´ 주세요.',
- invalidCsv: '파ì¼ì„ 처리할 수 없습니다. 올바른 csvì¸ì§€ 확ì¸í•´ 주세요.',
- invalidJson: '파ì¼ì„ 처리할 수 없습니다. 올바른 jsonì¸ì§€ 확ì¸í•´ 주세요.',
- jsonNotArray: 'json 파ì¼ì€ ë°°ì—´ì„ í¬í•¨í•´ì•¼ 합니다.'
- },
- pagination: {
- sizes: '페ì´ì§€ë‹¹ 항목',
- totalItems: '전체 항목'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('nl', {
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Sleep hier een kolomnaam heen om op te groeperen.'
- },
- search: {
- placeholder: 'Zoeken...',
- showingItems: 'Getoonde items:',
- selectedItems: 'Geselecteerde items:',
- totalItems: 'Totaal aantal items:',
- size: 'Items per pagina:',
- first: 'Eerste pagina',
- next: 'Volgende pagina',
- previous: 'Vorige pagina',
- last: 'Laatste pagina'
- },
- menu: {
- text: 'Kies kolommen:'
- },
- sort: {
- ascending: 'Sorteer oplopend',
- descending: 'Sorteer aflopend',
- remove: 'Verwijder sortering'
- },
- column: {
- hide: 'Verberg kolom'
- },
- aggregation: {
- count: 'Aantal rijen: ',
- sum: 'Som: ',
- avg: 'Gemiddelde: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Zet links vast',
- pinRight: 'Zet rechts vast',
- unpin: 'Maak los'
- },
- gridMenu: {
- columns: 'Kolommen:',
- importerTitle: 'Importeer bestand',
- exporterAllAsCsv: 'Exporteer alle data als csv',
- exporterVisibleAsCsv: 'Exporteer zichtbare data als csv',
- exporterSelectedAsCsv: 'Exporteer geselecteerde data als csv',
- exporterAllAsPdf: 'Exporteer alle data als pdf',
- exporterVisibleAsPdf: 'Exporteer zichtbare data als pdf',
- exporterSelectedAsPdf: 'Exporteer geselecteerde data als pdf',
- clearAllFilters: 'Reinig alle filters'
- },
- importer: {
- noHeaders: 'Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?',
- noObjects: 'Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?',
- invalidCsv: 'Het bestand kan niet verwerkt worden. Is het een valide csv bestand?',
- invalidJson: 'Het bestand kan niet verwerkt worden. Is het valide json?',
- jsonNotArray: 'Het json bestand moet een array bevatten. De actie wordt geannuleerd.'
- },
- pagination: {
- sizes: 'items per pagina',
- totalItems: 'items',
- of: 'van de'
- },
- grouping: {
- group: 'Groepeer',
- ungroup: 'Groepering opheffen',
- aggregate_count: 'Agg: Aantal',
- aggregate_sum: 'Agg: Som',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Gem',
- aggregate_remove: 'Agg: Verwijder'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('no', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filter for column',
- removeFilter: 'Remove Filter',
- columnMenuButtonLabel: 'Column Menu'
- },
- priority: 'Priority:',
- filterLabel: "Filter for column: "
- },
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Drag a column header here and drop it to group by that column.'
- },
- search: {
- placeholder: 'Search...',
- showingItems: 'Showing Items:',
- selectedItems: 'Selected Items:',
- totalItems: 'Total Items:',
- size: 'Page Size:',
- first: 'First Page',
- next: 'Next Page',
- previous: 'Previous Page',
- last: 'Last Page'
- },
- menu: {
- text: 'Choose Columns:'
- },
- sort: {
- ascending: 'Sort Ascending',
- descending: 'Sort Descending',
- none: 'Sort None',
- remove: 'Remove Sort'
- },
- column: {
- hide: 'Hide Column'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Pin Left',
- pinRight: 'Pin Right',
- unpin: 'Unpin'
- },
- columnMenu: {
- close: 'Close'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Grid Menu'
- },
- columns: 'Kolonner:',
- importerTitle: 'Importer fil',
- exporterAllAsCsv: 'Eksporter alle data som csv',
- exporterVisibleAsCsv: 'Eksporter synlige data som csv',
- exporterSelectedAsCsv: 'Eksporter utvalgte data som csv',
- exporterAllAsPdf: 'Eksporter alle data som pdf',
- exporterVisibleAsPdf: 'Eksporter synlige data som pdf',
- exporterSelectedAsPdf: 'Eksporter utvalgte data som pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Page to first',
- pageBack: 'Page back',
- pageSelected: 'Selected page',
- pageForward: 'Page forward',
- pageToLast: 'Page to last'
- },
- sizes: 'items per page',
- totalItems: 'items',
- through: 'through',
- of: 'of'
- },
- grouping: {
- group: 'Group',
- ungroup: 'Ungroup',
- aggregate_count: 'Agg: Count',
- aggregate_sum: 'Agg: Sum',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Avg',
- aggregate_remove: 'Agg: Remove'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('pl', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filtr dla kolumny',
- removeFilter: 'Usuń filtr',
- columnMenuButtonLabel: 'Menu kolumny'
- },
- priority: 'Prioritet:',
- filterLabel: "Filtr dla kolumny: "
- },
- aggregate: {
- label: 'pozycji'
- },
- groupPanel: {
- description: 'Przeciągnij nagłówek kolumny tutaj, aby pogrupować według niej.'
- },
- search: {
- placeholder: 'Szukaj...',
- showingItems: 'Widoczne pozycje:',
- selectedItems: 'Zaznaczone pozycje:',
- totalItems: 'Wszystkich pozycji:',
- size: 'Rozmiar strony:',
- first: 'Pierwsza strona',
- next: 'Następna strona',
- previous: 'Poprzednia strona',
- last: 'Ostatnia strona'
- },
- menu: {
- text: 'Wybierz kolumny:'
- },
- sort: {
- ascending: 'Sortuj rosnÄ…co',
- descending: 'Sortuj malejÄ…co',
- none: 'Brak sortowania',
- remove: 'Wyłącz sortowanie'
- },
- column: {
- hide: 'Ukryj kolumne'
- },
- aggregation: {
- count: 'Razem pozycji: ',
- sum: 'Razem: ',
- avg: 'Åšrednia: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Przypnij do lewej',
- pinRight: 'Przypnij do prawej',
- unpin: 'Odepnij'
- },
- columnMenu: {
- close: 'Zamknij'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Menu Grida'
- },
- columns: 'Kolumny:',
- importerTitle: 'Importuj plik',
- exporterAllAsCsv: 'Eksportuj wszystkie dane do csv',
- exporterVisibleAsCsv: 'Eksportuj widoczne dane do csv',
- exporterSelectedAsCsv: 'Eksportuj zaznaczone dane do csv',
- exporterAllAsPdf: 'Eksportuj wszystkie dane do pdf',
- exporterVisibleAsPdf: 'Eksportuj widoczne dane do pdf',
- exporterSelectedAsPdf: 'Eksportuj zaznaczone dane do pdf',
- clearAllFilters: 'Wyczyść filtry'
- },
- importer: {
- noHeaders: 'Nie udało się wczytać nazw kolumn. Czy plik posiada nagłówek?',
- noObjects: 'Nie udalo się wczytać pozycji. Czy plik zawiera dane??',
- invalidCsv: 'Nie udało się przetworzyć pliku, jest to prawidlowy plik CSV??',
- invalidJson: 'Nie udało się przetworzyć pliku, jest to prawidlowy plik Json?',
- jsonNotArray: 'Importowany plik json musi zawierać tablicę, importowanie przerwane.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Pierwsza strona',
- pageBack: 'Poprzednia strona',
- pageSelected: 'Wybrana strona',
- pageForward: 'Następna strona',
- pageToLast: 'Ostatnia strona'
- },
- sizes: 'pozycji na stronÄ™',
- totalItems: 'pozycji',
- through: 'do',
- of: 'z'
- },
- grouping: {
- group: 'Grupuj',
- ungroup: 'Rozgrupuj',
- aggregate_count: 'Zbiorczo: Razem',
- aggregate_sum: 'Zbiorczo: Suma',
- aggregate_max: 'Zbiorczo: Max',
- aggregate_min: 'Zbiorczo: Min',
- aggregate_avg: 'Zbiorczo: Åšrednia',
- aggregate_remove: 'Zbiorczo: Usuń'
- },
- validate: {
- error: 'BÅ‚Ä…d:',
- minLength: 'Wartość powinna składać się z co najmniej THRESHOLD znaków.',
- maxLength: 'Wartość powinna składać się z przynajmniej THRESHOLD znaków.',
- required: 'Wartość jest wymagana.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('pt-br', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filtro por coluna',
- removeFilter: 'Remover filtro',
- columnMenuButtonLabel: 'Menu coluna'
- },
- priority: 'Prioridade:',
- filterLabel: "Filtro por coluna: "
- },
- aggregate: {
- label: 'itens'
- },
- groupPanel: {
- description: 'Arraste e solte uma coluna aqui para agrupar por essa coluna'
- },
- search: {
- placeholder: 'Procurar...',
- showingItems: 'Mostrando os Itens:',
- selectedItems: 'Items Selecionados:',
- totalItems: 'Total de Itens:',
- size: 'Tamanho da Página:',
- first: 'Primeira Página',
- next: 'Próxima Página',
- previous: 'Página Anterior',
- last: 'Última Página'
- },
- menu: {
- text: 'Selecione as colunas:'
- },
- sort: {
- ascending: 'Ordenar Ascendente',
- descending: 'Ordenar Descendente',
- none: 'Nenhuma Ordem',
- remove: 'Remover Ordenação'
- },
- column: {
- hide: 'Esconder coluna'
- },
- aggregation: {
- count: 'total de linhas: ',
- sum: 'total: ',
- avg: 'med: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Fixar Esquerda',
- pinRight: 'Fixar Direita',
- unpin: 'Desprender'
- },
- columnMenu: {
- close: 'Fechar'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Menu Grid'
- },
- columns: 'Colunas:',
- importerTitle: 'Importar arquivo',
- exporterAllAsCsv: 'Exportar todos os dados como csv',
- exporterVisibleAsCsv: 'Exportar dados visíveis como csv',
- exporterSelectedAsCsv: 'Exportar dados selecionados como csv',
- exporterAllAsPdf: 'Exportar todos os dados como pdf',
- exporterVisibleAsPdf: 'Exportar dados visíveis como pdf',
- exporterSelectedAsPdf: 'Exportar dados selecionados como pdf',
- clearAllFilters: 'Limpar todos os filtros'
- },
- importer: {
- noHeaders: 'Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?',
- noObjects: 'Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?',
- invalidCsv: 'Arquivo não pode ser processado. É um CSV válido?',
- invalidJson: 'Arquivo não pode ser processado. É um Json válido?',
- jsonNotArray: 'Arquivo json importado tem que conter um array. Abortando.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Primeira página',
- pageBack: 'Página anterior',
- pageSelected: 'Página Selecionada',
- pageForward: 'Proxima',
- pageToLast: 'Anterior'
- },
- sizes: 'itens por página',
- totalItems: 'itens',
- through: 'através dos',
- of: 'de'
- },
- grouping: {
- group: 'Agrupar',
- ungroup: 'Desagrupar',
- aggregate_count: 'Agr: Contar',
- aggregate_sum: 'Agr: Soma',
- aggregate_max: 'Agr: Max',
- aggregate_min: 'Agr: Min',
- aggregate_avg: 'Agr: Med',
- aggregate_remove: 'Agr: Remover'
- }
- });
- return $delegate;
- }]);
-}]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('pt', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filtro por coluna',
- removeFilter: 'Remover filtro',
- columnMenuButtonLabel: 'Menu coluna'
- },
- priority: 'Prioridade:',
- filterLabel: "Filtro por coluna: "
- },
- aggregate: {
- label: 'itens'
- },
- groupPanel: {
- description: 'Arraste e solte uma coluna aqui para agrupar por essa coluna'
- },
- search: {
- placeholder: 'Procurar...',
- showingItems: 'Mostrando os Itens:',
- selectedItems: 'Itens Selecionados:',
- totalItems: 'Total de Itens:',
- size: 'Tamanho da Página:',
- first: 'Primeira Página',
- next: 'Próxima Página',
- previous: 'Página Anterior',
- last: 'Última Página'
- },
- menu: {
- text: 'Selecione as colunas:'
- },
- sort: {
- ascending: 'Ordenar Ascendente',
- descending: 'Ordenar Descendente',
- none: 'Nenhuma Ordem',
- remove: 'Remover Ordenação'
- },
- column: {
- hide: 'Esconder coluna'
- },
- aggregation: {
- count: 'total de linhas: ',
- sum: 'total: ',
- avg: 'med: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Fixar Esquerda',
- pinRight: 'Fixar Direita',
- unpin: 'Desprender'
- },
- columnMenu: {
- close: 'Fechar'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Menu Grid'
- },
- columns: 'Colunas:',
- importerTitle: 'Importar ficheiro',
- exporterAllAsCsv: 'Exportar todos os dados como csv',
- exporterVisibleAsCsv: 'Exportar dados visíveis como csv',
- exporterSelectedAsCsv: 'Exportar dados selecionados como csv',
- exporterAllAsPdf: 'Exportar todos os dados como pdf',
- exporterVisibleAsPdf: 'Exportar dados visíveis como pdf',
- exporterSelectedAsPdf: 'Exportar dados selecionados como pdf',
- clearAllFilters: 'Limpar todos os filtros'
- },
- importer: {
- noHeaders: 'Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?',
- noObjects: 'Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?',
- invalidCsv: 'Ficheiro não pode ser processado. É um CSV válido?',
- invalidJson: 'Ficheiro não pode ser processado. É um Json válido?',
- jsonNotArray: 'Ficheiro json importado tem que conter um array. Interrompendo.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Primeira página',
- pageBack: 'Página anterior',
- pageSelected: 'Página Selecionada',
- pageForward: 'Próxima',
- pageToLast: 'Anterior'
- },
- sizes: 'itens por página',
- totalItems: 'itens',
- through: 'através dos',
- of: 'de'
- },
- grouping: {
- group: 'Agrupar',
- ungroup: 'Desagrupar',
- aggregate_count: 'Agr: Contar',
- aggregate_sum: 'Agr: Soma',
- aggregate_max: 'Agr: Max',
- aggregate_min: 'Agr: Min',
- aggregate_avg: 'Agr: Med',
- aggregate_remove: 'Agr: Remover'
- }
- });
- return $delegate;
- }]);
-}]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ro', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filtru pentru coloana',
- removeFilter: 'Sterge filtru',
- columnMenuButtonLabel: 'Column Menu'
- },
- priority: 'Prioritate:',
- filterLabel: "Filtru pentru coloana:"
- },
- aggregate: {
- label: 'Elemente'
- },
- groupPanel: {
- description: 'Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva'
- },
- search: {
- placeholder: 'Cauta...',
- showingItems: 'Arata elementele:',
- selectedItems: 'Elementele selectate:',
- totalItems: 'Total elemente:',
- size: 'Marime pagina:',
- first: 'Prima pagina',
- next: 'Pagina urmatoare',
- previous: 'Pagina anterioara',
- last: 'Ultima pagina'
- },
- menu: {
- text: 'Alege coloane:'
- },
- sort: {
- ascending: 'Ordoneaza crescator',
- descending: 'Ordoneaza descrescator',
- none: 'Fara ordonare',
- remove: 'Sterge ordonarea'
- },
- column: {
- hide: 'Ascunde coloana'
- },
- aggregation: {
- count: 'total linii: ',
- sum: 'total: ',
- avg: 'medie: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Pin la stanga',
- pinRight: 'Pin la dreapta',
- unpin: 'Sterge pinul'
- },
- columnMenu: {
- close: 'Inchide'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Grid Menu'
- },
- columns: 'Coloane:',
- importerTitle: 'Incarca fisier',
- exporterAllAsCsv: 'Exporta toate datele ca csv',
- exporterVisibleAsCsv: 'Exporta datele vizibile ca csv',
- exporterSelectedAsCsv: 'Exporta datele selectate ca csv',
- exporterAllAsPdf: 'Exporta toate datele ca pdf',
- exporterVisibleAsPdf: 'Exporta datele vizibile ca pdf',
- exporterSelectedAsPdf: 'Exporta datele selectate ca csv pdf',
- clearAllFilters: 'Sterge toate filtrele'
- },
- importer: {
- noHeaders: 'Numele coloanelor nu a putut fi incarcat, acest fisier are un header?',
- noObjects: 'Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?',
- invalidCsv: 'Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?',
- invalidJson: 'Fisierul nu a putut fi procesat, ati incarcat un Json valid?',
- jsonNotArray: 'Json-ul incarcat trebuie sa contina un array, inchidere.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Prima pagina',
- pageBack: 'O pagina inapoi',
- pageSelected: 'Pagina selectata',
- pageForward: 'O pagina inainte',
- pageToLast: 'Ultima pagina'
- },
- sizes: 'Elemente per pagina',
- totalItems: 'elemente',
- through: 'prin',
- of: 'of'
- },
- grouping: {
- group: 'Grupeaza',
- ungroup: 'Opreste gruparea',
- aggregate_count: 'Agg: Count',
- aggregate_sum: 'Agg: Sum',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Avg',
- aggregate_remove: 'Agg: Remove'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ru', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Фильтр Ñтолбца',
- removeFilter: 'Удалить фильтр',
- columnMenuButtonLabel: 'Меню Ñтолбца'
- },
- priority: 'Приоритет:',
- filterLabel: "Фильтр Ñтолбца: "
- },
- aggregate: {
- label: 'Ñлементы'
- },
- groupPanel: {
- description: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð¸Ñ€Ð¾Ð²ÐºÐ¸ по Ñтолбцу перетащите Ñюда его название.'
- },
- search: {
- placeholder: 'ПоиÑк...',
- showingItems: 'Показать Ñлементы:',
- selectedItems: 'Выбранные Ñлементы:',
- totalItems: 'Ð’Ñего Ñлементов:',
- size: 'Размер Ñтраницы:',
- first: 'ÐŸÐµÑ€Ð²Ð°Ñ Ñтраница',
- next: 'Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница',
- previous: 'ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница',
- last: 'ПоÑледнÑÑ Ñтраница'
- },
- menu: {
- text: 'Выбрать Ñтолбцы:'
- },
- sort: {
- ascending: 'По возраÑтанию',
- descending: 'По убыванию',
- none: 'Без Ñортировки',
- remove: 'Убрать Ñортировку'
- },
- column: {
- hide: 'СпрÑтать Ñтолбец'
- },
- aggregation: {
- count: 'вÑего Ñтрок: ',
- sum: 'итого: ',
- avg: 'Ñреднее: ',
- min: 'мин: ',
- max: 'макÑ: '
- },
- pinning: {
- pinLeft: 'Закрепить Ñлева',
- pinRight: 'Закрепить Ñправа',
- unpin: 'Открепить'
- },
- columnMenu: {
- close: 'Закрыть'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Меню'
- },
- columns: 'Столбцы:',
- importerTitle: 'Импортировать файл',
- exporterAllAsCsv: 'ЭкÑпортировать вÑÑ‘ в CSV',
- exporterVisibleAsCsv: 'ЭкÑпортировать видимые данные в CSV',
- exporterSelectedAsCsv: 'ЭкÑпортировать выбранные данные в CSV',
- exporterAllAsPdf: 'ЭкÑпортировать вÑÑ‘ в PDF',
- exporterVisibleAsPdf: 'ЭкÑпортировать видимые данные в PDF',
- exporterSelectedAsPdf: 'ЭкÑпортировать выбранные данные в PDF',
- clearAllFilters: 'ОчиÑтите вÑе фильтры'
- },
- importer: {
- noHeaders: 'Ðе удалоÑÑŒ получить Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñтолбцов, еÑÑ‚ÑŒ ли в файле заголовок?',
- noObjects: 'Ðе удалоÑÑŒ получить данные, еÑÑ‚ÑŒ ли в файле Ñтроки кроме заголовка?',
- invalidCsv: 'Ðе удалоÑÑŒ обработать файл, Ñто правильный CSV-файл?',
- invalidJson: 'Ðе удалоÑÑŒ обработать файл, Ñто правильный JSON?',
- jsonNotArray: 'Импортируемый JSON-файл должен Ñодержать маÑÑив, Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¾Ñ‚Ð¼ÐµÐ½ÐµÐ½Ð°.'
- },
- pagination: {
- aria: {
- pageToFirst: 'ÐŸÐµÑ€Ð²Ð°Ñ Ñтраница',
- pageBack: 'ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница',
- pageSelected: 'Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ñтраница',
- pageForward: 'Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница',
- pageToLast: 'ПоÑледнÑÑ Ñтраница'
- },
- sizes: 'Ñтрок на Ñтраницу',
- totalItems: 'Ñтрок',
- through: 'по',
- of: 'из'
- },
- grouping: {
- group: 'Группировать',
- ungroup: 'Разгруппировать',
- aggregate_count: 'Группировать: Count',
- aggregate_sum: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: Сумма',
- aggregate_max: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: МакÑимум',
- aggregate_min: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: Минимум',
- aggregate_avg: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: Среднее',
- aggregate_remove: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: ПуÑто'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('sk', {
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca.'
- },
- search: {
- placeholder: 'Hľadaj...',
- showingItems: 'Zobrazujem položky:',
- selectedItems: 'Vybraté položky:',
- totalItems: 'PoÄet položiek:',
- size: 'PoÄet:',
- first: 'Prvá strana',
- next: 'Ďalšia strana',
- previous: 'Predchádzajúca strana',
- last: 'Posledná strana'
- },
- menu: {
- text: 'Vyberte stĺpce:'
- },
- sort: {
- ascending: 'Zotriediť vzostupne',
- descending: 'Zotriediť zostupne',
- remove: 'Vymazať triedenie'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- gridMenu: {
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('sv', {
- aggregate: {
- label: 'Artiklar'
- },
- groupPanel: {
- description: 'Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen.'
- },
- search: {
- placeholder: 'Sök...',
- showingItems: 'Visar artiklar:',
- selectedItems: 'Valda artiklar:',
- totalItems: 'Antal artiklar:',
- size: 'Sidstorlek:',
- first: 'Första sidan',
- next: 'Nästa sida',
- previous: 'Föregående sida',
- last: 'Sista sidan'
- },
- menu: {
- text: 'Välj kolumner:'
- },
- sort: {
- ascending: 'Sortera stigande',
- descending: 'Sortera fallande',
- remove: 'Inaktivera sortering'
- },
- column: {
- hide: 'Göm kolumn'
- },
- aggregation: {
- count: 'Antal rader: ',
- sum: 'Summa: ',
- avg: 'Genomsnitt: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Fäst vänster',
- pinRight: 'Fäst höger',
- unpin: 'Lösgör'
- },
- gridMenu: {
- columns: 'Kolumner:',
- importerTitle: 'Importera fil',
- exporterAllAsCsv: 'Exportera all data som CSV',
- exporterVisibleAsCsv: 'Exportera synlig data som CSV',
- exporterSelectedAsCsv: 'Exportera markerad data som CSV',
- exporterAllAsPdf: 'Exportera all data som PDF',
- exporterVisibleAsPdf: 'Exportera synlig data som PDF',
- exporterSelectedAsPdf: 'Exportera markerad data som PDF',
- clearAllFilters: 'Rengör alla filter'
- },
- importer: {
- noHeaders: 'Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?',
- noObjects: 'Objekt kunde inte härledas. Har filen data undantaget sidhuvud?',
- invalidCsv: 'Filen kunde inte behandlas, är den en giltig CSV?',
- invalidJson: 'Filen kunde inte behandlas, är den en giltig JSON?',
- jsonNotArray: 'Importerad JSON-fil måste innehålla ett fält. Import avbruten.'
- },
- pagination: {
- sizes: 'Artiklar per sida',
- totalItems: 'Artiklar'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ta', {
- aggregate: {
- label: 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯'
- },
- groupPanel: {
- description: 'ஒர௠பதà¯à®¤à®¿à®¯à¯ˆ கà¯à®´à¯à®µà®¾à®• அமைகà¯à®• அபà¯à®ªà®¤à¯à®¤à®¿à®¯à®¿à®©à¯ தலைபà¯à®ªà¯ˆ இஙà¯à®•à¯‡ இழà¯à®¤à¯à®¤à¯ வரவà¯à®®à¯ '
- },
- search: {
- placeholder: 'தேடல௠...',
- showingItems: 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ˆ காணà¯à®ªà®¿à®¤à¯à®¤à®²à¯:',
- selectedItems: 'தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿ உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯:',
- totalItems: 'மொதà¯à®¤ உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯:',
- size: 'பகà¯à®• அளவà¯: ',
- first: 'à®®à¯à®¤à®²à¯ பகà¯à®•à®®à¯',
- next: 'அடà¯à®¤à¯à®¤ பகà¯à®•à®®à¯',
- previous: 'à®®à¯à®¨à¯à®¤à¯ˆà®¯ பகà¯à®•à®®à¯ ',
- last: 'இறà¯à®¤à®¿ பகà¯à®•à®®à¯'
- },
- menu: {
- text: 'பதà¯à®¤à®¿à®•à®³à¯ˆ தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯:'
- },
- sort: {
- ascending: 'மேலிரà¯à®¨à¯à®¤à¯ கீழாக',
- descending: 'கீழிரà¯à®¨à¯à®¤à¯ மேலாக',
- remove: 'வரிசையை நீகà¯à®•à¯'
- },
- column: {
- hide: 'பதà¯à®¤à®¿à®¯à¯ˆ மறைதà¯à®¤à¯ வை '
- },
- aggregation: {
- count: 'மொதà¯à®¤ வரிகளà¯:',
- sum: 'மொதà¯à®¤à®®à¯: ',
- avg: 'சராசரி: ',
- min: 'கà¯à®±à¯ˆà®¨à¯à®¤à®ªà®Ÿà¯à®š: ',
- max: 'அதிகபடà¯à®š: '
- },
- pinning: {
- pinLeft: 'இடதà¯à®ªà¯à®±à®®à®¾à®• தைகà¯à®• ',
- pinRight: 'வலதà¯à®ªà¯à®±à®®à®¾à®• தைகà¯à®•',
- unpin: 'பிரி'
- },
- gridMenu: {
- columns: 'பதà¯à®¤à®¿à®•à®³à¯:',
- importerTitle: 'கோபà¯à®ªà¯ : படிதà¯à®¤à®²à¯',
- exporterAllAsCsv: 'எலà¯à®²à®¾ தரவà¯à®•à®³à¯ˆà®¯à¯à®®à¯ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv',
- exporterVisibleAsCsv: 'இரà¯à®•à¯à®•à¯à®®à¯ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv',
- exporterSelectedAsCsv: 'தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®¤à¯à®¤ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv',
- exporterAllAsPdf: 'எலà¯à®²à®¾ தரவà¯à®•à®³à¯ˆà®¯à¯à®®à¯ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf',
- exporterVisibleAsPdf: 'இரà¯à®•à¯à®•à¯à®®à¯ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf',
- exporterSelectedAsPdf: 'தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®¤à¯à®¤ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'பதà¯à®¤à®¿à®¯à®¿à®©à¯ தலைபà¯à®ªà¯à®•à®³à¯ˆ பெற இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà®¿à®±à¯à®•à¯ தலைபà¯à®ªà¯ உளà¯à®³à®¤à®¾?',
- noObjects: 'இலகà¯à®•à¯à®•à®³à¯ˆ உரà¯à®µà®¾à®•à¯à®• à®®à¯à®Ÿà®¿à®¯à®µà®¿à®²à¯à®²à¯ˆ, கோபà¯à®ªà®¿à®²à¯ தலைபà¯à®ªà¯à®•à®³à¯ˆ தவிர தரவ௠à®à®¤à¯‡à®©à¯à®®à¯ உளà¯à®³à®¤à®¾? ',
- invalidCsv: 'சரிவர நடைமà¯à®±à¯ˆ படà¯à®¤à¯à®¤ இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà¯ சரிதானா? - csv',
- invalidJson: 'சரிவர நடைமà¯à®±à¯ˆ படà¯à®¤à¯à®¤ இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà¯ சரிதானா? - json',
- jsonNotArray: 'படிதà¯à®¤ கோபà¯à®ªà®¿à®²à¯ வரிசைகள௠உளà¯à®³à®¤à¯, நடைமà¯à®±à¯ˆ ரதà¯à®¤à¯ செய௠: json'
- },
- pagination: {
- sizes : 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ / பகà¯à®•à®®à¯',
- totalItems : 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ '
- },
- grouping: {
- group : 'கà¯à®´à¯',
- ungroup : 'பிரி',
- aggregate_count : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : எணà¯à®£à¯',
- aggregate_sum : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : கூடà¯à®Ÿà®²à¯',
- aggregate_max : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : அதிகபடà¯à®šà®®à¯',
- aggregate_min : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : கà¯à®±à¯ˆà®¨à¯à®¤à®ªà®Ÿà¯à®šà®®à¯',
- aggregate_avg : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : சராசரி',
- aggregate_remove : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : நீகà¯à®•à¯'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('tr', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Sütun için filtre',
- removeFilter: 'Filtreyi Kaldır',
- columnMenuButtonLabel: 'Sütun Menüsü'
- },
- priority: 'Öncelik:',
- filterLabel: "Sütun için filtre: "
- },
- aggregate: {
- label: 'kayıtlar'
- },
- groupPanel: {
- description: 'Sütuna göre gruplamak için sütun başlığını buraya sürükleyin ve bırakın.'
- },
- search: {
- placeholder: 'Arama...',
- showingItems: 'Gösterilen Kayıt:',
- selectedItems: 'Seçili Kayıt:',
- totalItems: 'Toplam Kayıt:',
- size: 'Sayfa Boyutu:',
- first: 'Ä°lk Sayfa',
- next: 'Sonraki Sayfa',
- previous: 'Önceki Sayfa',
- last: 'Son Sayfa'
- },
- menu: {
- text: 'Sütunları Seç:'
- },
- sort: {
- ascending: 'Artan Sırada Sırala',
- descending: 'Azalan Sırada Sırala',
- none: 'Sıralama Yapma',
- remove: 'Sıralamayı Kaldır'
- },
- column: {
- hide: 'Sütunu Gizle'
- },
- aggregation: {
- count: 'toplam satır: ',
- sum: 'toplam: ',
- avg: 'ort: ',
- min: 'min: ',
- max: 'maks: '
- },
- pinning: {
- pinLeft: 'Sola Sabitle',
- pinRight: 'SaÄŸa Sabitle',
- unpin: 'Sabitlemeyi Kaldır'
- },
- columnMenu: {
- close: 'Kapat'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Tablo Menü'
- },
- columns: 'Sütunlar:',
- importerTitle: 'Dosya içeri aktar',
- exporterAllAsCsv: 'Bütün veriyi CSV olarak dışarı aktar',
- exporterVisibleAsCsv: 'Görünen veriyi CSV olarak dışarı aktar',
- exporterSelectedAsCsv: 'Seçili veriyi CSV olarak dışarı aktar',
- exporterAllAsPdf: 'Bütün veriyi PDF olarak dışarı aktar',
- exporterVisibleAsPdf: 'Görünen veriyi PDF olarak dışarı aktar',
- exporterSelectedAsPdf: 'Seçili veriyi PDF olarak dışarı aktar',
- clearAllFilters: 'Bütün filtreleri kaldır'
- },
- importer: {
- noHeaders: 'Sütun isimleri üretilemiyor, dosyanın bir başlığı var mı?',
- noObjects: 'Nesneler üretilemiyor, dosyada başlıktan başka bir veri var mı?',
- invalidCsv: 'Dosya işlenemedi, geçerli bir CSV dosyası mı?',
- invalidJson: 'Dosya işlenemedi, geçerli bir Json dosyası mı?',
- jsonNotArray: 'Alınan Json dosyasında bir dizi bulunmalıdır, işlem iptal ediliyor.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Ä°lk sayfaya',
- pageBack: 'Geri git',
- pageSelected: 'Seçili sayfa',
- pageForward: 'Ä°leri git',
- pageToLast: 'Sona git'
- },
- sizes: 'Sayfadaki nesne sayısı',
- totalItems: 'kayıtlar',
- through: '', //note(fsw) : turkish dont have this preposition
- of: '' //note(fsw) : turkish dont have this preposition
- },
- grouping: {
- group: 'Grupla',
- ungroup: 'Gruplama',
- aggregate_count: 'Yekun: Sayı',
- aggregate_sum: 'Yekun: Toplam',
- aggregate_max: 'Yekun: Maks',
- aggregate_min: 'Yekun: Min',
- aggregate_avg: 'Yekun: Ort',
- aggregate_remove: 'Yekun: Sil'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ua', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Фільтр Ñтовпчика',
- removeFilter: 'Видалити фільтр',
- columnMenuButtonLabel: 'Меню Ñтвпчика'
- },
- priority: 'Пріоритет:',
- filterLabel: "Фільтр Ñтовпчика: "
- },
- aggregate: {
- label: 'елементи'
- },
- groupPanel: {
- description: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð° Ñтовпчиком перетÑгніть Ñюди його назву.'
- },
- search: {
- placeholder: 'Пошук...',
- showingItems: 'Показати елементи:',
- selectedItems: 'Обрані елементи:',
- totalItems: 'УÑього елементів:',
- size: 'Розмір Ñторінки:',
- first: 'Перша Ñторінка',
- next: 'ÐаÑтупна Ñторінка',
- previous: 'ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñторінка',
- last: 'ОÑÑ‚Ð°Ð½Ð½Ñ Ñторінка'
- },
- menu: {
- text: 'Обрати Ñтвпчики:'
- },
- sort: {
- ascending: 'За зроÑтаннÑм',
- descending: 'За ÑпаданнÑм',
- none: 'Без ÑортуваннÑ',
- remove: 'Прибрати ÑортуваннÑ'
- },
- column: {
- hide: 'Приховати Ñтовпчик'
- },
- aggregation: {
- count: 'уÑього Ñ€Ñдків: ',
- sum: 'ітого: ',
- avg: 'Ñереднє: ',
- min: 'мін: ',
- max: 'макÑ: '
- },
- pinning: {
- pinLeft: 'Закріпити ліворуч',
- pinRight: 'Закріпити праворуч',
- unpin: 'Відкріпити'
- },
- columnMenu: {
- close: 'Закрити'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Меню'
- },
- columns: 'Стовпчики:',
- importerTitle: 'Імпортувати файл',
- exporterAllAsCsv: 'ЕкÑпортувати вÑе в CSV',
- exporterVisibleAsCsv: 'ЕкÑпортувати видимі дані в CSV',
- exporterSelectedAsCsv: 'ЕкÑпортувати обрані дані в CSV',
- exporterAllAsPdf: 'ЕкÑпортувати вÑе в PDF',
- exporterVisibleAsPdf: 'ЕкÑпортувати видимі дані в PDF',
- exporterSelectedAsPdf: 'ЕкÑпортувати обрані дані в PDF',
- clearAllFilters: 'ОчиÑтити вÑÑ– фільтри'
- },
- importer: {
- noHeaders: 'Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ назви Ñтовпчиків, чи Ñ” в файлі заголовок?',
- noObjects: 'Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані, чи Ñ” в файлі Ñ€Ñдки окрім заголовка?',
- invalidCsv: 'Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ файл, чи це коректний CSV-файл?',
- invalidJson: 'Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ файл, чи це коректний JSON?',
- jsonNotArray: 'JSON-файл що імпортуєтьÑÑ Ð¿Ð¾Ð²Ð¸Ð½ÐµÐ½ міÑтити маÑив, операцію ÑкаÑовано.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Перша Ñторінка',
- pageBack: 'ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñторінка',
- pageSelected: 'Обрана Ñторінка',
- pageForward: 'ÐаÑтупна Ñторінка',
- pageToLast: 'ОÑÑ‚Ð°Ð½Ð½Ñ Ñторінка'
- },
- sizes: 'Ñ€Ñдків на Ñторінку',
- totalItems: 'Ñ€Ñдків',
- through: 'по',
- of: 'з'
- },
- grouping: {
- group: 'Групувати',
- ungroup: 'Розгрупувати',
- aggregate_count: 'Групувати: КількіÑÑ‚ÑŒ',
- aggregate_sum: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: Сума',
- aggregate_max: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: МакÑимум',
- aggregate_min: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: Мінімум',
- aggregate_avg: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: Серднє',
- aggregate_remove: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: ПуÑто'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-/**
- * @ngdoc overview
- * @name ui.grid.i18n
- * @description
- *
- * # ui.grid.i18n
- * This module provides i18n functions to ui.grid and any application that wants to use it
-
- *
- * <div doc-module-components="ui.grid.i18n"></div>
- */
-
-(function () {
- var DIRECTIVE_ALIASES = ['uiT', 'uiTranslate'];
- var FILTER_ALIASES = ['t', 'uiTranslate'];
-
- var module = angular.module('ui.grid.i18n');
-
-
- /**
- * @ngdoc object
- * @name ui.grid.i18n.constant:i18nConstants
- *
- * @description constants available in i18n module
- */
- module.constant('i18nConstants', {
- MISSING: '[MISSING]',
- UPDATE_EVENT: '$uiI18n',
-
- LOCALE_DIRECTIVE_ALIAS: 'uiI18n',
- // default to english
- DEFAULT_LANG: 'en'
- });
-
-// module.config(['$provide', function($provide) {
-// $provide.decorator('i18nService', ['$delegate', function($delegate) {}])}]);
-
- /**
- * @ngdoc service
- * @name ui.grid.i18n.service:i18nService
- *
- * @description Services for i18n
- */
- module.service('i18nService', ['$log', 'i18nConstants', '$rootScope',
- function ($log, i18nConstants, $rootScope) {
-
- var langCache = {
- _langs: {},
- current: null,
- get: function (lang) {
- return this._langs[lang.toLowerCase()];
- },
- add: function (lang, strings) {
- var lower = lang.toLowerCase();
- if (!this._langs[lower]) {
- this._langs[lower] = {};
- }
- angular.extend(this._langs[lower], strings);
- },
- getAllLangs: function () {
- var langs = [];
- if (!this._langs) {
- return langs;
- }
-
- for (var key in this._langs) {
- langs.push(key);
- }
-
- return langs;
- },
- setCurrent: function (lang) {
- this.current = lang.toLowerCase();
- },
- getCurrentLang: function () {
- return this.current;
- }
- };
-
- var service = {
-
- /**
- * @ngdoc service
- * @name add
- * @methodOf ui.grid.i18n.service:i18nService
- * @description Adds the languages and strings to the cache. Decorate this service to
- * add more translation strings
- * @param {string} lang language to add
- * @param {object} stringMaps of strings to add grouped by property names
- * @example
- * <pre>
- * i18nService.add('en', {
- * aggregate: {
- * label1: 'items',
- * label2: 'some more items'
- * }
- * },
- * groupPanel: {
- * description: 'Drag a column header here and drop it to group by that column.'
- * }
- * }
- * </pre>
- */
- add: function (langs, stringMaps) {
- if (typeof(langs) === 'object') {
- angular.forEach(langs, function (lang) {
- if (lang) {
- langCache.add(lang, stringMaps);
- }
- });
- } else {
- langCache.add(langs, stringMaps);
- }
- },
-
- /**
- * @ngdoc service
- * @name getAllLangs
- * @methodOf ui.grid.i18n.service:i18nService
- * @description return all currently loaded languages
- * @returns {array} string
- */
- getAllLangs: function () {
- return langCache.getAllLangs();
- },
-
- /**
- * @ngdoc service
- * @name get
- * @methodOf ui.grid.i18n.service:i18nService
- * @description return all currently loaded languages
- * @param {string} lang to return. If not specified, returns current language
- * @returns {object} the translation string maps for the language
- */
- get: function (lang) {
- var language = lang ? lang : service.getCurrentLang();
- return langCache.get(language);
- },
-
- /**
- * @ngdoc service
- * @name getSafeText
- * @methodOf ui.grid.i18n.service:i18nService
- * @description returns the text specified in the path or a Missing text if text is not found
- * @param {string} path property path to use for retrieving text from string map
- * @param {string} lang to return. If not specified, returns current language
- * @returns {object} the translation for the path
- * @example
- * <pre>
- * i18nService.getSafeText('sort.ascending')
- * </pre>
- */
- getSafeText: function (path, lang) {
- var language = lang ? lang : service.getCurrentLang();
- var trans = langCache.get(language);
-
- if (!trans) {
- return i18nConstants.MISSING;
- }
-
- var paths = path.split('.');
- var current = trans;
-
- for (var i = 0; i < paths.length; ++i) {
- if (current[paths[i]] === undefined || current[paths[i]] === null) {
- return i18nConstants.MISSING;
- } else {
- current = current[paths[i]];
- }
- }
-
- return current;
-
- },
-
- /**
- * @ngdoc service
- * @name setCurrentLang
- * @methodOf ui.grid.i18n.service:i18nService
- * @description sets the current language to use in the application
- * $broadcasts the Update_Event on the $rootScope
- * @param {string} lang to set
- * @example
- * <pre>
- * i18nService.setCurrentLang('fr');
- * </pre>
- */
-
- setCurrentLang: function (lang) {
- if (lang) {
- langCache.setCurrent(lang);
- $rootScope.$broadcast(i18nConstants.UPDATE_EVENT);
- }
- },
-
- /**
- * @ngdoc service
- * @name getCurrentLang
- * @methodOf ui.grid.i18n.service:i18nService
- * @description returns the current language used in the application
- */
- getCurrentLang: function () {
- var lang = langCache.getCurrentLang();
- if (!lang) {
- lang = i18nConstants.DEFAULT_LANG;
- langCache.setCurrent(lang);
- }
- return lang;
- }
-
- };
-
- return service;
-
- }]);
-
- var localeDirective = function (i18nService, i18nConstants) {
- return {
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
- var alias = i18nConstants.LOCALE_DIRECTIVE_ALIAS;
- // check for watchable property
- var lang = $scope.$eval($attrs[alias]);
- if (lang) {
- $scope.$watch($attrs[alias], function () {
- i18nService.setCurrentLang(lang);
- });
- } else if ($attrs.$$observers) {
- $attrs.$observe(alias, function () {
- i18nService.setCurrentLang($attrs[alias] || i18nConstants.DEFAULT_LANG);
- });
- }
- }
- };
- }
- };
- };
-
- module.directive('uiI18n', ['i18nService', 'i18nConstants', localeDirective]);
-
- // directive syntax
- var uitDirective = function ($parse, i18nService, i18nConstants) {
- return {
- restrict: 'EA',
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
- var alias1 = DIRECTIVE_ALIASES[0],
- alias2 = DIRECTIVE_ALIASES[1];
- var token = $attrs[alias1] || $attrs[alias2] || $elm.html();
- var missing = i18nConstants.MISSING + token;
- var observer;
- if ($attrs.$$observers) {
- var prop = $attrs[alias1] ? alias1 : alias2;
- observer = $attrs.$observe(prop, function (result) {
- if (result) {
- $elm.html($parse(result)(i18nService.getCurrentLang()) || missing);
- }
- });
- }
- var getter = $parse(token);
- var listener = $scope.$on(i18nConstants.UPDATE_EVENT, function (evt) {
- if (observer) {
- observer($attrs[alias1] || $attrs[alias2]);
- } else {
- // set text based on i18n current language
- $elm.html(getter(i18nService.get()) || missing);
- }
- });
- $scope.$on('$destroy', listener);
-
- $elm.html(getter(i18nService.get()) || missing);
- }
- };
- }
- };
- };
-
- angular.forEach( DIRECTIVE_ALIASES, function ( alias ) {
- module.directive( alias, ['$parse', 'i18nService', 'i18nConstants', uitDirective] );
- } );
-
- // optional filter syntax
- var uitFilter = function ($parse, i18nService, i18nConstants) {
- return function (data) {
- var getter = $parse(data);
- // set text based on i18n current language
- return getter(i18nService.get()) || i18nConstants.MISSING + data;
- };
- };
-
- angular.forEach( FILTER_ALIASES, function ( alias ) {
- module.filter( alias, ['$parse', 'i18nService', 'i18nConstants', uitFilter] );
- } );
-
-
-})();
-(function() {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('zh-cn', {
- headerCell: {
- aria: {
- defaultFilterLabel: '列过滤器',
- removeFilter: '移除过滤器',
- columnMenuButtonLabel: '列èœå•'
- },
- priority: '优先级:',
- filterLabel: "列过滤器: "
- },
- aggregate: {
- label: '行'
- },
- groupPanel: {
- description: '拖曳表头到此处进行分组'
- },
- search: {
- placeholder: '查找',
- showingItems: '已显示行数:',
- selectedItems: '已选择行数:',
- totalItems: '总行数:',
- size: 'æ¯é¡µæ˜¾ç¤ºè¡Œæ•°ï¼š',
- first: '首页',
- next: '下一页',
- previous: '上一页',
- last: '末页'
- },
- menu: {
- text: '选择列:'
- },
- sort: {
- ascending: 'å‡åº',
- descending: 'é™åº',
- none: 'æ— åº',
- remove: 'å–消排åº'
- },
- column: {
- hide: 'éšè—列'
- },
- aggregation: {
- count: '计数:',
- sum: '求和:',
- avg: 'å‡å€¼ï¼š',
- min: '最å°å€¼ï¼š',
- max: '最大值:'
- },
- pinning: {
- pinLeft: '左侧固定',
- pinRight: 'å³ä¾§å›ºå®š',
- unpin: 'å–消固定'
- },
- columnMenu: {
- close: '关闭'
- },
- gridMenu: {
- aria: {
- buttonLabel: '表格èœå•'
- },
- columns: '列:',
- importerTitle: '导入文件',
- exporterAllAsCsv: '导出全部数æ®åˆ°CSV',
- exporterVisibleAsCsv: '导出å¯è§æ•°æ®åˆ°CSV',
- exporterSelectedAsCsv: '导出已选数æ®åˆ°CSV',
- exporterAllAsPdf: '导出全部数æ®åˆ°PDF',
- exporterVisibleAsPdf: '导出å¯è§æ•°æ®åˆ°PDF',
- exporterSelectedAsPdf: '导出已选数æ®åˆ°PDF',
- clearAllFilters: '清除所有过滤器'
- },
- importer: {
- noHeaders: '无法获å–列å,确定文件包å«è¡¨å¤´ï¼Ÿ',
- noObjects: '无法获å–æ•°æ®ï¼Œç¡®å®šæ–‡ä»¶åŒ…å«æ•°æ®ï¼Ÿ',
- invalidCsv: '无法处ç†æ–‡ä»¶ï¼Œç¡®å®šæ˜¯åˆæ³•çš„CSV文件?',
- invalidJson: '无法处ç†æ–‡ä»¶ï¼Œç¡®å®šæ˜¯åˆæ³•çš„JSON文件?',
- jsonNotArray: '导入的文件ä¸æ˜¯JSON数组ï¼'
- },
- pagination: {
- aria: {
- pageToFirst: '第一页',
- pageBack: '上一页',
- pageSelected: '当å‰é¡µ',
- pageForward: '下一页',
- pageToLast: '最åŽä¸€é¡µ'
- },
- sizes: 'è¡Œæ¯é¡µ',
- totalItems: '行',
- through: '至',
- of: 'å…±'
- },
- grouping: {
- group: '分组',
- ungroup: 'å–消分组',
- aggregate_count: 'åˆè®¡: 计数',
- aggregate_sum: 'åˆè®¡: 求和',
- aggregate_max: 'åˆè®¡: 最大',
- aggregate_min: 'åˆè®¡: 最å°',
- aggregate_avg: 'åˆè®¡: å¹³å‡',
- aggregate_remove: 'åˆè®¡: 移除'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function() {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('zh-tw', {
- aggregate: {
- label: '行'
- },
- groupPanel: {
- description: '拖曳表頭到此處進行分組'
- },
- search: {
- placeholder: '查找',
- showingItems: '已顯示行數:',
- selectedItems: 'å·²é¸æ“‡è¡Œæ•¸ï¼š',
- totalItems: '總行數:',
- size: 'æ¯é é¡¯ç¤ºè¡Œæ•¸ï¼š',
- first: '首é ',
- next: '下壹é ',
- previous: '上壹é ',
- last: '末é '
- },
- menu: {
- text: 'é¸æ“‡åˆ—:'
- },
- sort: {
- ascending: 'å‡åº',
- descending: 'é™åº',
- remove: 'å–消排åº'
- },
- column: {
- hide: 'éš±è—列'
- },
- aggregation: {
- count: '計數:',
- sum: '求和:',
- avg: 'å‡å€¼ï¼š',
- min: '最å°å€¼ï¼š',
- max: '最大值:'
- },
- pinning: {
- pinLeft: 'å·¦å´å›ºå®š',
- pinRight: 'å³å´å›ºå®š',
- unpin: 'å–消固定'
- },
- gridMenu: {
- columns: '列:',
- importerTitle: '導入文件',
- exporterAllAsCsv: '導出全部數據到CSV',
- exporterVisibleAsCsv: '導出å¯è¦‹æ•¸æ“šåˆ°CSV',
- exporterSelectedAsCsv: '導出已é¸æ•¸æ“šåˆ°CSV',
- exporterAllAsPdf: '導出全部數據到PDF',
- exporterVisibleAsPdf: '導出å¯è¦‹æ•¸æ“šåˆ°PDF',
- exporterSelectedAsPdf: '導出已é¸æ•¸æ“šåˆ°PDF',
- clearAllFilters: '清除所有过滤器'
- },
- importer: {
- noHeaders: '無法ç²å–列å,確定文件包å«è¡¨é ­ï¼Ÿ',
- noObjects: '無法ç²å–數據,確定文件包å«æ•¸æ“šï¼Ÿ',
- invalidCsv: '無法處ç†æ–‡ä»¶ï¼Œç¢ºå®šæ˜¯åˆæ³•çš„CSV文件?',
- invalidJson: '無法處ç†æ–‡ä»¶ï¼Œç¢ºå®šæ˜¯åˆæ³•çš„JSON文件?',
- jsonNotArray: '導入的文件ä¸æ˜¯JSON數組ï¼'
- },
- pagination: {
- sizes: 'è¡Œæ¯é ',
- totalItems: '行'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function() {
- 'use strict';
- /**
- * @ngdoc overview
- * @name ui.grid.autoResize
- *
- * @description
- *
- * #ui.grid.autoResize
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides auto-resizing functionality to UI-Grid.
- */
- var module = angular.module('ui.grid.autoResize', ['ui.grid']);
-
-
- module.directive('uiGridAutoResize', ['$timeout', 'gridUtil', function ($timeout, gridUtil) {
- return {
- require: 'uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var prevGridWidth, prevGridHeight;
-
- function getDimensions() {
- prevGridHeight = gridUtil.elementHeight($elm);
- prevGridWidth = gridUtil.elementWidth($elm);
- }
-
- // Initialize the dimensions
- getDimensions();
-
- var resizeTimeoutId;
- function startTimeout() {
- clearTimeout(resizeTimeoutId);
-
- resizeTimeoutId = setTimeout(function () {
- var newGridHeight = gridUtil.elementHeight($elm);
- var newGridWidth = gridUtil.elementWidth($elm);
-
- if (newGridHeight !== prevGridHeight || newGridWidth !== prevGridWidth) {
- uiGridCtrl.grid.gridHeight = newGridHeight;
- uiGridCtrl.grid.gridWidth = newGridWidth;
- uiGridCtrl.grid.api.core.raise.gridDimensionChanged(prevGridHeight, prevGridWidth, newGridHeight, newGridWidth);
-
- $scope.$apply(function () {
- uiGridCtrl.grid.refresh()
- .then(function () {
- getDimensions();
-
- startTimeout();
- });
- });
- }
- else {
- startTimeout();
- }
- }, 250);
- }
-
- startTimeout();
-
- $scope.$on('$destroy', function() {
- clearTimeout(resizeTimeoutId);
- });
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.cellNav
- *
- * @description
-
- #ui.grid.cellNav
-
- <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
-
- This module provides cell navigation functionality to UI-Grid.
- */
- var module = angular.module('ui.grid.cellNav', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.constant:uiGridCellNavConstants
- *
- * @description constants available in cellNav
- */
- module.constant('uiGridCellNavConstants', {
- FEATURE_NAME: 'gridCellNav',
- CELL_NAV_EVENT: 'cellNav',
- direction: {LEFT: 0, RIGHT: 1, UP: 2, DOWN: 3, PG_UP: 4, PG_DOWN: 5},
- EVENT_TYPE: {
- KEYDOWN: 0,
- CLICK: 1,
- CLEAR: 2
- }
- });
-
-
- module.factory('uiGridCellNavFactory', ['gridUtil', 'uiGridConstants', 'uiGridCellNavConstants', 'GridRowColumn', '$q',
- function (gridUtil, uiGridConstants, uiGridCellNavConstants, GridRowColumn, $q) {
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.object:CellNav
- * @description returns a CellNav prototype function
- * @param {object} rowContainer container for rows
- * @param {object} colContainer parent column container
- * @param {object} leftColContainer column container to the left of parent
- * @param {object} rightColContainer column container to the right of parent
- */
- var UiGridCellNav = function UiGridCellNav(rowContainer, colContainer, leftColContainer, rightColContainer) {
- this.rows = rowContainer.visibleRowCache;
- this.columns = colContainer.visibleColumnCache;
- this.leftColumns = leftColContainer ? leftColContainer.visibleColumnCache : [];
- this.rightColumns = rightColContainer ? rightColContainer.visibleColumnCache : [];
- this.bodyContainer = rowContainer;
- };
-
- /** returns focusable columns of all containers */
- UiGridCellNav.prototype.getFocusableCols = function () {
- var allColumns = this.leftColumns.concat(this.columns, this.rightColumns);
-
- return allColumns.filter(function (col) {
- return col.colDef.allowCellFocus;
- });
- };
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:GridRow
- *
- * @description GridRow settings for cellNav feature, these are available to be
- * set only internally (for example, by other features)
- */
-
- /**
- * @ngdoc object
- * @name allowCellFocus
- * @propertyOf ui.grid.cellNav.api:GridRow
- * @description Enable focus on a cell within this row. If set to false then no cells
- * in this row can be focused - group header rows as an example would set this to false.
- * <br/>Defaults to true
- */
- /** returns focusable rows */
- UiGridCellNav.prototype.getFocusableRows = function () {
- return this.rows.filter(function(row) {
- return row.allowCellFocus !== false;
- });
- };
-
- UiGridCellNav.prototype.getNextRowCol = function (direction, curRow, curCol) {
- switch (direction) {
- case uiGridCellNavConstants.direction.LEFT:
- return this.getRowColLeft(curRow, curCol);
- case uiGridCellNavConstants.direction.RIGHT:
- return this.getRowColRight(curRow, curCol);
- case uiGridCellNavConstants.direction.UP:
- return this.getRowColUp(curRow, curCol);
- case uiGridCellNavConstants.direction.DOWN:
- return this.getRowColDown(curRow, curCol);
- case uiGridCellNavConstants.direction.PG_UP:
- return this.getRowColPageUp(curRow, curCol);
- case uiGridCellNavConstants.direction.PG_DOWN:
- return this.getRowColPageDown(curRow, curCol);
- }
-
- };
-
- UiGridCellNav.prototype.initializeSelection = function () {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- if (focusableCols.length === 0 || focusableRows.length === 0) {
- return null;
- }
-
- var curRowIndex = 0;
- var curColIndex = 0;
- return new GridRowColumn(focusableRows[0], focusableCols[0]); //return same row
- };
-
- UiGridCellNav.prototype.getRowColLeft = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 1
- if (curColIndex === -1) {
- curColIndex = 1;
- }
-
- var nextColIndex = curColIndex === 0 ? focusableCols.length - 1 : curColIndex - 1;
-
- //get column to left
- if (nextColIndex >= curColIndex) {
- // On the first row
- // if (curRowIndex === 0 && curColIndex === 0) {
- // return null;
- // }
- if (curRowIndex === 0) {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]); //return same row
- }
- else {
- //up one row and far right column
- return new GridRowColumn(focusableRows[curRowIndex - 1], focusableCols[nextColIndex]);
- }
- }
- else {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]);
- }
- };
-
-
-
- UiGridCellNav.prototype.getRowColRight = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
- var nextColIndex = curColIndex === focusableCols.length - 1 ? 0 : curColIndex + 1;
-
- if (nextColIndex <= curColIndex) {
- if (curRowIndex === focusableRows.length - 1) {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]); //return same row
- }
- else {
- //down one row and far left column
- return new GridRowColumn(focusableRows[curRowIndex + 1], focusableCols[nextColIndex]);
- }
- }
- else {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColDown = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- if (curRowIndex === focusableRows.length - 1) {
- return new GridRowColumn(curRow, focusableCols[curColIndex]); //return same row
- }
- else {
- //down one row
- return new GridRowColumn(focusableRows[curRowIndex + 1], focusableCols[curColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColPageDown = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- var pageSize = this.bodyContainer.minRowsToRender();
- if (curRowIndex >= focusableRows.length - pageSize) {
- return new GridRowColumn(focusableRows[focusableRows.length - 1], focusableCols[curColIndex]); //return last row
- }
- else {
- //down one page
- return new GridRowColumn(focusableRows[curRowIndex + pageSize], focusableCols[curColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColUp = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- if (curRowIndex === 0) {
- return new GridRowColumn(curRow, focusableCols[curColIndex]); //return same row
- }
- else {
- //up one row
- return new GridRowColumn(focusableRows[curRowIndex - 1], focusableCols[curColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColPageUp = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- var pageSize = this.bodyContainer.minRowsToRender();
- if (curRowIndex - pageSize < 0) {
- return new GridRowColumn(focusableRows[0], focusableCols[curColIndex]); //return first row
- }
- else {
- //up one page
- return new GridRowColumn(focusableRows[curRowIndex - pageSize], focusableCols[curColIndex]);
- }
- };
- return UiGridCellNav;
- }]);
-
- /**
- * @ngdoc service
- * @name ui.grid.cellNav.service:uiGridCellNavService
- *
- * @description Services for cell navigation features. If you don't like the key maps we use,
- * or the direction cells navigation, override with a service decorator (see angular docs)
- */
- module.service('uiGridCellNavService', ['gridUtil', 'uiGridConstants', 'uiGridCellNavConstants', '$q', 'uiGridCellNavFactory', 'GridRowColumn', 'ScrollEvent',
- function (gridUtil, uiGridConstants, uiGridCellNavConstants, $q, UiGridCellNav, GridRowColumn, ScrollEvent) {
-
- var service = {
-
- initializeGrid: function (grid) {
- grid.registerColumnBuilder(service.cellNavColumnBuilder);
-
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav:Grid.cellNav
- * @description cellNav properties added to grid class
- */
- grid.cellNav = {};
- grid.cellNav.lastRowCol = null;
- grid.cellNav.focusedCells = [];
-
- service.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:PublicApi
- *
- * @description Public Api for cellNav feature
- */
- var publicApi = {
- events: {
- cellNav: {
- /**
- * @ngdoc event
- * @name navigate
- * @eventOf ui.grid.cellNav.api:PublicApi
- * @description raised when the active cell is changed
- * <pre>
- * gridApi.cellNav.on.navigate(scope,function(newRowcol, oldRowCol){})
- * </pre>
- * @param {object} newRowCol new position
- * @param {object} oldRowCol old position
- */
- navigate: function (newRowCol, oldRowCol) {},
- /**
- * @ngdoc event
- * @name viewPortKeyDown
- * @eventOf ui.grid.cellNav.api:PublicApi
- * @description is raised when the viewPort receives a keyDown event. Cells never get focus in uiGrid
- * due to the difficulties of setting focus on a cell that is not visible in the viewport. Use this
- * event whenever you need a keydown event on a cell
- * <br/>
- * @param {object} event keydown event
- * @param {object} rowCol current rowCol position
- */
- viewPortKeyDown: function (event, rowCol) {},
-
- /**
- * @ngdoc event
- * @name viewPortKeyPress
- * @eventOf ui.grid.cellNav.api:PublicApi
- * @description is raised when the viewPort receives a keyPress event. Cells never get focus in uiGrid
- * due to the difficulties of setting focus on a cell that is not visible in the viewport. Use this
- * event whenever you need a keypress event on a cell
- * <br/>
- * @param {object} event keypress event
- * @param {object} rowCol current rowCol position
- */
- viewPortKeyPress: function (event, rowCol) {}
- }
- },
- methods: {
- cellNav: {
- /**
- * @ngdoc function
- * @name scrollToFocus
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description brings the specified row and column into view, and sets focus
- * to that cell
- * @param {object} rowEntity gridOptions.data[] array instance to make visible and set focus
- * @param {object} colDef to make visible and set focus
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- scrollToFocus: function (rowEntity, colDef) {
- return service.scrollToFocus(grid, rowEntity, colDef);
- },
-
- /**
- * @ngdoc function
- * @name getFocusedCell
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description returns the current (or last if Grid does not have focus) focused row and column
- * <br> value is null if no selection has occurred
- */
- getFocusedCell: function () {
- return grid.cellNav.lastRowCol;
- },
-
- /**
- * @ngdoc function
- * @name getCurrentSelection
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description returns an array containing the current selection
- * <br> array is empty if no selection has occurred
- */
- getCurrentSelection: function () {
- return grid.cellNav.focusedCells;
- },
-
- /**
- * @ngdoc function
- * @name rowColSelectIndex
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description returns the index in the order in which the GridRowColumn was selected, returns -1 if the GridRowColumn
- * isn't selected
- * @param {object} rowCol the rowCol to evaluate
- */
- rowColSelectIndex: function (rowCol) {
- //return gridUtil.arrayContainsObjectWithProperty(grid.cellNav.focusedCells, 'col.uid', rowCol.col.uid) &&
- var index = -1;
- for (var i = 0; i < grid.cellNav.focusedCells.length; i++) {
- if (grid.cellNav.focusedCells[i].col.uid === rowCol.col.uid &&
- grid.cellNav.focusedCells[i].row.uid === rowCol.row.uid) {
- index = i;
- break;
- }
- }
- return index;
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:GridOptions
- *
- * @description GridOptions for cellNav feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name modifierKeysToMultiSelectCells
- * @propertyOf ui.grid.cellNav.api:GridOptions
- * @description Enable multiple cell selection only when using the ctrlKey or shiftKey.
- * <br/>Defaults to false
- */
- gridOptions.modifierKeysToMultiSelectCells = gridOptions.modifierKeysToMultiSelectCells === true;
-
- /**
- * @ngdoc array
- * @name keyDownOverrides
- * @propertyOf ui.grid.cellNav.api:GridOptions
- * @description An array of event objects to override on keydown. If an event is overridden, the viewPortKeyDown event will
- * be raised with the overridden events, allowing custom keydown behavior.
- * <br/>Defaults to []
- */
- gridOptions.keyDownOverrides = gridOptions.keyDownOverrides || [];
-
- },
-
- /**
- * @ngdoc service
- * @name decorateRenderContainers
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @description decorates grid renderContainers with cellNav functions
- */
- decorateRenderContainers: function (grid) {
-
- var rightContainer = grid.hasRightContainer() ? grid.renderContainers.right : null;
- var leftContainer = grid.hasLeftContainer() ? grid.renderContainers.left : null;
-
- if (leftContainer !== null) {
- grid.renderContainers.left.cellNav = new UiGridCellNav(grid.renderContainers.body, leftContainer, rightContainer, grid.renderContainers.body);
- }
- if (rightContainer !== null) {
- grid.renderContainers.right.cellNav = new UiGridCellNav(grid.renderContainers.body, rightContainer, grid.renderContainers.body, leftContainer);
- }
-
- grid.renderContainers.body.cellNav = new UiGridCellNav(grid.renderContainers.body, grid.renderContainers.body, leftContainer, rightContainer);
- },
-
- /**
- * @ngdoc service
- * @name getDirection
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @description determines which direction to for a given keyDown event
- * @returns {uiGridCellNavConstants.direction} direction
- */
- getDirection: function (evt) {
- if (evt.keyCode === uiGridConstants.keymap.LEFT ||
- (evt.keyCode === uiGridConstants.keymap.TAB && evt.shiftKey)) {
- return uiGridCellNavConstants.direction.LEFT;
- }
- if (evt.keyCode === uiGridConstants.keymap.RIGHT ||
- evt.keyCode === uiGridConstants.keymap.TAB) {
- return uiGridCellNavConstants.direction.RIGHT;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.UP ||
- (evt.keyCode === uiGridConstants.keymap.ENTER && evt.shiftKey) ) {
- return uiGridCellNavConstants.direction.UP;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.PG_UP){
- return uiGridCellNavConstants.direction.PG_UP;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.DOWN ||
- evt.keyCode === uiGridConstants.keymap.ENTER && !(evt.ctrlKey || evt.altKey)) {
- return uiGridCellNavConstants.direction.DOWN;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.PG_DOWN){
- return uiGridCellNavConstants.direction.PG_DOWN;
- }
-
- return null;
- },
-
- /**
- * @ngdoc service
- * @name cellNavColumnBuilder
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @description columnBuilder function that adds cell navigation properties to grid column
- * @returns {promise} promise that will load any needed templates when resolved
- */
- cellNavColumnBuilder: function (colDef, col, gridOptions) {
- var promises = [];
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:ColumnDef
- *
- * @description Column Definitions for cellNav feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name allowCellFocus
- * @propertyOf ui.grid.cellNav.api:ColumnDef
- * @description Enable focus on a cell within this column.
- * <br/>Defaults to true
- */
- colDef.allowCellFocus = colDef.allowCellFocus === undefined ? true : colDef.allowCellFocus;
-
- return $q.all(promises);
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @name scrollToFocus
- * @description Scroll the grid such that the specified
- * row and column is in view, and set focus to the cell in that row and column
- * @param {Grid} grid the grid you'd like to act upon, usually available
- * from gridApi.grid
- * @param {object} rowEntity gridOptions.data[] array instance to make visible and set focus to
- * @param {object} colDef to make visible and set focus to
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- scrollToFocus: function (grid, rowEntity, colDef) {
- var gridRow = null, gridCol = null;
-
- if (typeof(rowEntity) !== 'undefined' && rowEntity !== null) {
- gridRow = grid.getRow(rowEntity);
- }
-
- if (typeof(colDef) !== 'undefined' && colDef !== null) {
- gridCol = grid.getColumn(colDef.name ? colDef.name : colDef.field);
- }
- return grid.api.core.scrollToIfNecessary(gridRow, gridCol).then(function () {
- var rowCol = { row: gridRow, col: gridCol };
-
- // Broadcast the navigation
- if (gridRow !== null && gridCol !== null) {
- grid.cellNav.broadcastCellNav(rowCol);
- }
- });
-
-
-
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @name getLeftWidth
- * @description Get the current drawn width of the columns in the
- * grid up to the numbered column, and add an apportionment for the
- * column that we're on. So if we are on column 0, we want to scroll
- * 0% (i.e. exclude this column from calc). If we're on the last column
- * we want to scroll to 100% (i.e. include this column in the calc). So
- * we include (thisColIndex / totalNumberCols) % of this column width
- * @param {Grid} grid the grid you'd like to act upon, usually available
- * from gridApi.grid
- * @param {gridCol} upToCol the column to total up to and including
- */
- getLeftWidth: function (grid, upToCol) {
- var width = 0;
-
- if (!upToCol) {
- return width;
- }
-
- var lastIndex = grid.renderContainers.body.visibleColumnCache.indexOf( upToCol );
-
- // total column widths up-to but not including the passed in column
- grid.renderContainers.body.visibleColumnCache.forEach( function( col, index ) {
- if ( index < lastIndex ){
- width += col.drawnWidth;
- }
- });
-
- // pro-rata the final column based on % of total columns.
- var percentage = lastIndex === 0 ? 0 : (lastIndex + 1) / grid.renderContainers.body.visibleColumnCache.length;
- width += upToCol.drawnWidth * percentage;
-
- return width;
- }
- };
-
- return service;
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.cellNav.directive:uiCellNav
- * @element div
- * @restrict EA
- *
- * @description Adds cell navigation features to the grid columns
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.cellNav']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name'},
- {name: 'title'}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-cellnav></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridCellnav', ['gridUtil', 'uiGridCellNavService', 'uiGridCellNavConstants', 'uiGridConstants', 'GridRowColumn', '$timeout', '$compile',
- function (gridUtil, uiGridCellNavService, uiGridCellNavConstants, uiGridConstants, GridRowColumn, $timeout, $compile) {
- return {
- replace: true,
- priority: -150,
- require: '^uiGrid',
- scope: false,
- controller: function () {},
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var _scope = $scope;
-
- var grid = uiGridCtrl.grid;
- uiGridCellNavService.initializeGrid(grid);
-
- uiGridCtrl.cellNav = {};
-
- //Ensure that the object has all of the methods we expect it to
- uiGridCtrl.cellNav.makeRowCol = function (obj) {
- if (!(obj instanceof GridRowColumn)) {
- obj = new GridRowColumn(obj.row, obj.col);
- }
- return obj;
- };
-
- uiGridCtrl.cellNav.getActiveCell = function () {
- var elms = $elm[0].getElementsByClassName('ui-grid-cell-focus');
- if (elms.length > 0){
- return elms[0];
- }
-
- return undefined;
- };
-
- uiGridCtrl.cellNav.broadcastCellNav = grid.cellNav.broadcastCellNav = function (newRowCol, modifierDown, originEvt) {
- modifierDown = !(modifierDown === undefined || !modifierDown);
-
- newRowCol = uiGridCtrl.cellNav.makeRowCol(newRowCol);
-
- uiGridCtrl.cellNav.broadcastFocus(newRowCol, modifierDown, originEvt);
- _scope.$broadcast(uiGridCellNavConstants.CELL_NAV_EVENT, newRowCol, modifierDown, originEvt);
- };
-
- uiGridCtrl.cellNav.clearFocus = grid.cellNav.clearFocus = function () {
- grid.cellNav.focusedCells = [];
- _scope.$broadcast(uiGridCellNavConstants.CELL_NAV_EVENT);
- };
-
- uiGridCtrl.cellNav.broadcastFocus = function (rowCol, modifierDown, originEvt) {
- modifierDown = !(modifierDown === undefined || !modifierDown);
-
- rowCol = uiGridCtrl.cellNav.makeRowCol(rowCol);
-
- var row = rowCol.row,
- col = rowCol.col;
-
- var rowColSelectIndex = uiGridCtrl.grid.api.cellNav.rowColSelectIndex(rowCol);
-
- if (grid.cellNav.lastRowCol === null || rowColSelectIndex === -1) {
- var newRowCol = new GridRowColumn(row, col);
-
- if (grid.cellNav.lastRowCol === null || grid.cellNav.lastRowCol.row !== newRowCol.row || grid.cellNav.lastRowCol.col !== newRowCol.col){
- grid.api.cellNav.raise.navigate(newRowCol, grid.cellNav.lastRowCol, originEvt);
- grid.cellNav.lastRowCol = newRowCol;
- }
- if (uiGridCtrl.grid.options.modifierKeysToMultiSelectCells && modifierDown) {
- grid.cellNav.focusedCells.push(rowCol);
- } else {
- grid.cellNav.focusedCells = [rowCol];
- }
- } else if (grid.options.modifierKeysToMultiSelectCells && modifierDown &&
- rowColSelectIndex >= 0) {
-
- grid.cellNav.focusedCells.splice(rowColSelectIndex, 1);
- }
- };
-
- uiGridCtrl.cellNav.handleKeyDown = function (evt) {
- var direction = uiGridCellNavService.getDirection(evt);
- if (direction === null) {
- return null;
- }
-
- var containerId = 'body';
- if (evt.uiGridTargetRenderContainerId) {
- containerId = evt.uiGridTargetRenderContainerId;
- }
-
- // Get the last-focused row+col combo
- var lastRowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (lastRowCol) {
- // Figure out which new row+combo we're navigating to
- var rowCol = uiGridCtrl.grid.renderContainers[containerId].cellNav.getNextRowCol(direction, lastRowCol.row, lastRowCol.col);
- var focusableCols = uiGridCtrl.grid.renderContainers[containerId].cellNav.getFocusableCols();
- var rowColSelectIndex = uiGridCtrl.grid.api.cellNav.rowColSelectIndex(rowCol);
- // Shift+tab on top-left cell should exit cellnav on render container
- if (
- // Navigating left
- direction === uiGridCellNavConstants.direction.LEFT &&
- // New col is last col (i.e. wrap around)
- rowCol.col === focusableCols[focusableCols.length - 1] &&
- // Staying on same row, which means we're at first row
- rowCol.row === lastRowCol.row &&
- evt.keyCode === uiGridConstants.keymap.TAB &&
- evt.shiftKey
- ) {
- grid.cellNav.focusedCells.splice(rowColSelectIndex, 1);
- uiGridCtrl.cellNav.clearFocus();
- return true;
- }
- // Tab on bottom-right cell should exit cellnav on render container
- else if (
- direction === uiGridCellNavConstants.direction.RIGHT &&
- // New col is first col (i.e. wrap around)
- rowCol.col === focusableCols[0] &&
- // Staying on same row, which means we're at first row
- rowCol.row === lastRowCol.row &&
- evt.keyCode === uiGridConstants.keymap.TAB &&
- !evt.shiftKey
- ) {
- grid.cellNav.focusedCells.splice(rowColSelectIndex, 1);
- uiGridCtrl.cellNav.clearFocus();
- return true;
- }
-
- // Scroll to the new cell, if it's not completely visible within the render container's viewport
- grid.scrollToIfNecessary(rowCol.row, rowCol.col).then(function () {
- uiGridCtrl.cellNav.broadcastCellNav(rowCol, null, evt);
- });
-
-
- evt.stopPropagation();
- evt.preventDefault();
-
- return false;
- }
- };
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- var _scope = $scope;
- var grid = uiGridCtrl.grid;
-
- function addAriaLiveRegion(){
- // Thanks to google docs for the inspiration behind how to do this
- // XXX: Why is this entire mess nessasary?
- // Because browsers take a lot of coercing to get them to read out live regions
- //http://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/
- var ariaNotifierDomElt = '<div ' +
- 'id="' + grid.id +'-aria-speakable" ' +
- 'class="ui-grid-a11y-ariascreenreader-speakable ui-grid-offscreen" ' +
- 'aria-live="assertive" ' +
- 'role="region" ' +
- 'aria-atomic="true" ' +
- 'aria-hidden="false" ' +
- 'aria-relevant="additions" ' +
- '>' +
- '&nbsp;' +
- '</div>';
-
- var ariaNotifier = $compile(ariaNotifierDomElt)($scope);
- $elm.prepend(ariaNotifier);
- $scope.$on(uiGridCellNavConstants.CELL_NAV_EVENT, function (evt, rowCol, modifierDown, originEvt) {
- /*
- * If the cell nav event was because of a focus event then we don't want to
- * change the notifier text.
- * Reasoning: Voice Over fires a focus events when moving arround the grid.
- * If the screen reader is handing the grid nav properly then we don't need to
- * use the alert to notify the user of the movement.
- * In all other cases we do want a notification event.
- */
- if (originEvt && originEvt.type === 'focus'){return;}
-
- function setNotifyText(text){
- if (text === ariaNotifier.text()){return;}
- ariaNotifier[0].style.clip = 'rect(0px,0px,0px,0px)';
- /*
- * This is how google docs handles clearing the div. Seems to work better than setting the text of the div to ''
- */
- ariaNotifier[0].innerHTML = "";
- ariaNotifier[0].style.visibility = 'hidden';
- ariaNotifier[0].style.visibility = 'visible';
- if (text !== ''){
- ariaNotifier[0].style.clip = 'auto';
- /*
- * The space after the text is something that google docs does.
- */
- ariaNotifier[0].appendChild(document.createTextNode(text + " "));
- ariaNotifier[0].style.visibility = 'hidden';
- ariaNotifier[0].style.visibility = 'visible';
- }
- }
-
- var values = [];
- var currentSelection = grid.api.cellNav.getCurrentSelection();
- for (var i = 0; i < currentSelection.length; i++) {
- values.push(grid.getCellDisplayValue(currentSelection[i].row, currentSelection[i].col));
- }
- var cellText = values.toString();
- setNotifyText(cellText);
-
- });
- }
- addAriaLiveRegion();
- }
- };
- }
- };
- }]);
-
- module.directive('uiGridRenderContainer', ['$timeout', '$document', 'gridUtil', 'uiGridConstants', 'uiGridCellNavService', '$compile','uiGridCellNavConstants',
- function ($timeout, $document, gridUtil, uiGridConstants, uiGridCellNavService, $compile, uiGridCellNavConstants) {
- return {
- replace: true,
- priority: -99999, //this needs to run very last
- require: ['^uiGrid', 'uiGridRenderContainer', '?^uiGridCellnav'],
- scope: false,
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- renderContainerCtrl = controllers[1],
- uiGridCellnavCtrl = controllers[2];
-
- // Skip attaching cell-nav specific logic if the directive is not attached above us
- if (!uiGridCtrl.grid.api.cellNav) { return; }
-
- var containerId = renderContainerCtrl.containerId;
-
- var grid = uiGridCtrl.grid;
-
- //run each time a render container is created
- uiGridCellNavService.decorateRenderContainers(grid);
-
- // focusser only created for body
- if (containerId !== 'body') {
- return;
- }
-
-
-
- if (uiGridCtrl.grid.options.modifierKeysToMultiSelectCells){
- $elm.attr('aria-multiselectable', true);
- } else {
- $elm.attr('aria-multiselectable', false);
- }
-
- //add an element with no dimensions that can be used to set focus and capture keystrokes
- var focuser = $compile('<div class="ui-grid-focuser" role="region" aria-live="assertive" aria-atomic="false" tabindex="0" aria-controls="' + grid.id +'-aria-speakable '+ grid.id + '-grid-container' +'" aria-owns="' + grid.id + '-grid-container' + '"></div>')($scope);
- $elm.append(focuser);
-
- focuser.on('focus', function (evt) {
- evt.uiGridTargetRenderContainerId = containerId;
- var rowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (rowCol === null) {
- rowCol = uiGridCtrl.grid.renderContainers[containerId].cellNav.getNextRowCol(uiGridCellNavConstants.direction.DOWN, null, null);
- if (rowCol.row && rowCol.col) {
- uiGridCtrl.cellNav.broadcastCellNav(rowCol);
- }
- }
- });
-
- uiGridCellnavCtrl.setAriaActivedescendant = function(id){
- $elm.attr('aria-activedescendant', id);
- };
-
- uiGridCellnavCtrl.removeAriaActivedescendant = function(id){
- if ($elm.attr('aria-activedescendant') === id){
- $elm.attr('aria-activedescendant', '');
- }
- };
-
-
- uiGridCtrl.focus = function () {
- gridUtil.focus.byElement(focuser[0]);
- //allow for first time grid focus
- };
-
- var viewPortKeyDownWasRaisedForRowCol = null;
- // Bind to keydown events in the render container
- focuser.on('keydown', function (evt) {
- evt.uiGridTargetRenderContainerId = containerId;
- var rowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- var raiseViewPortKeyDown = uiGridCtrl.grid.options.keyDownOverrides.some(function (override) {
- return Object.keys(override).every( function (property) {
- return override[property] === evt[property];
- });
- });
- var result = raiseViewPortKeyDown ? null : uiGridCtrl.cellNav.handleKeyDown(evt);
- if (result === null) {
- uiGridCtrl.grid.api.cellNav.raise.viewPortKeyDown(evt, rowCol);
- viewPortKeyDownWasRaisedForRowCol = rowCol;
- }
- });
- //Bind to keypress events in the render container
- //keypress events are needed by edit function so the key press
- //that initiated an edit is not lost
- //must fire the event in a timeout so the editor can
- //initialize and subscribe to the event on another event loop
- focuser.on('keypress', function (evt) {
- if (viewPortKeyDownWasRaisedForRowCol) {
- $timeout(function () {
- uiGridCtrl.grid.api.cellNav.raise.viewPortKeyPress(evt, viewPortKeyDownWasRaisedForRowCol);
- },4);
-
- viewPortKeyDownWasRaisedForRowCol = null;
- }
- });
-
- $scope.$on('$destroy', function(){
- //Remove all event handlers associated with this focuser.
- focuser.off();
- });
-
- }
- };
- }
- };
- }]);
-
- module.directive('uiGridViewport', ['$timeout', '$document', 'gridUtil', 'uiGridConstants', 'uiGridCellNavService', 'uiGridCellNavConstants','$log','$compile',
- function ($timeout, $document, gridUtil, uiGridConstants, uiGridCellNavService, uiGridCellNavConstants, $log, $compile) {
- return {
- replace: true,
- priority: -99999, //this needs to run very last
- require: ['^uiGrid', '^uiGridRenderContainer', '?^uiGridCellnav'],
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- renderContainerCtrl = controllers[1];
-
- // Skip attaching cell-nav specific logic if the directive is not attached above us
- if (!uiGridCtrl.grid.api.cellNav) { return; }
-
- var containerId = renderContainerCtrl.containerId;
- //no need to process for other containers
- if (containerId !== 'body') {
- return;
- }
-
- var grid = uiGridCtrl.grid;
-
- grid.api.core.on.scrollBegin($scope, function (args) {
-
- // Skip if there's no currently-focused cell
- var lastRowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (lastRowCol === null) {
- return;
- }
-
- //if not in my container, move on
- //todo: worry about horiz scroll
- if (!renderContainerCtrl.colContainer.containsColumn(lastRowCol.col)) {
- return;
- }
-
- uiGridCtrl.cellNav.clearFocus();
-
- });
-
- grid.api.core.on.scrollEnd($scope, function (args) {
- // Skip if there's no currently-focused cell
- var lastRowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (lastRowCol === null) {
- return;
- }
-
- //if not in my container, move on
- //todo: worry about horiz scroll
- if (!renderContainerCtrl.colContainer.containsColumn(lastRowCol.col)) {
- return;
- }
-
- uiGridCtrl.cellNav.broadcastCellNav(lastRowCol);
-
- });
-
- grid.api.cellNav.on.navigate($scope, function () {
- //focus again because it can be lost
- uiGridCtrl.focus();
- });
-
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.cellNav.directive:uiGridCell
- * @element div
- * @restrict A
- * @description Stacks on top of ui.grid.uiGridCell to provide cell navigation
- */
- module.directive('uiGridCell', ['$timeout', '$document', 'uiGridCellNavService', 'gridUtil', 'uiGridCellNavConstants', 'uiGridConstants', 'GridRowColumn',
- function ($timeout, $document, uiGridCellNavService, gridUtil, uiGridCellNavConstants, uiGridConstants, GridRowColumn) {
- return {
- priority: -150, // run after default uiGridCell directive and ui.grid.edit uiGridCell
- restrict: 'A',
- require: ['^uiGrid', '?^uiGridCellnav'],
- scope: false,
- link: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- uiGridCellnavCtrl = controllers[1];
- // Skip attaching cell-nav specific logic if the directive is not attached above us
- if (!uiGridCtrl.grid.api.cellNav) { return; }
-
- if (!$scope.col.colDef.allowCellFocus) {
- return;
- }
-
- //Convinience local variables
- var grid = uiGridCtrl.grid;
- $scope.focused = false;
-
- // Make this cell focusable but only with javascript/a mouse click
- $elm.attr('tabindex', -1);
-
- // When a cell is clicked, broadcast a cellNav event saying that this row+col combo is now focused
- $elm.find('div').on('click', function (evt) {
- uiGridCtrl.cellNav.broadcastCellNav(new GridRowColumn($scope.row, $scope.col), evt.ctrlKey || evt.metaKey, evt);
-
- evt.stopPropagation();
- $scope.$apply();
- });
-
-
- /*
- * XXX Hack for screen readers.
- * This allows the grid to focus using only the screen reader cursor.
- * Since the focus event doesn't include key press information we can't use it
- * as our primary source of the event.
- */
- $elm.on('mousedown', preventMouseDown);
-
- //turn on and off for edit events
- if (uiGridCtrl.grid.api.edit) {
- uiGridCtrl.grid.api.edit.on.beginCellEdit($scope, function () {
- $elm.off('mousedown', preventMouseDown);
- });
-
- uiGridCtrl.grid.api.edit.on.afterCellEdit($scope, function () {
- $elm.on('mousedown', preventMouseDown);
- });
-
- uiGridCtrl.grid.api.edit.on.cancelCellEdit($scope, function () {
- $elm.on('mousedown', preventMouseDown);
- });
- }
-
- // In case we created a new row, and we are the new created row by ngRepeat
- // then this cell content might have been selected previously
- refreshCellFocus();
-
- function preventMouseDown(evt) {
- //Prevents the foucus event from firing if the click event is already going to fire.
- //If both events fire it will cause bouncing behavior.
- evt.preventDefault();
- }
-
- //You can only focus on elements with a tabindex value
- $elm.on('focus', function (evt) {
- uiGridCtrl.cellNav.broadcastCellNav(new GridRowColumn($scope.row, $scope.col), false, evt);
- evt.stopPropagation();
- $scope.$apply();
- });
-
- // This event is fired for all cells. If the cell matches, then focus is set
- $scope.$on(uiGridCellNavConstants.CELL_NAV_EVENT, refreshCellFocus);
-
- // Refresh cell focus when a new row id added to the grid
- var dataChangeDereg = uiGridCtrl.grid.registerDataChangeCallback(function (grid) {
- // Clear the focus if it's set to avoid the wrong cell getting focused during
- // a short period of time (from now until $timeout function executed)
- clearFocus();
-
- $timeout(refreshCellFocus);
- }, [uiGridConstants.dataChange.ROW]);
-
- function refreshCellFocus() {
- var isFocused = grid.cellNav.focusedCells.some(function (focusedRowCol, index) {
- return (focusedRowCol.row === $scope.row && focusedRowCol.col === $scope.col);
- });
- if (isFocused) {
- setFocused();
- } else {
- clearFocus();
- }
- }
-
- function setFocused() {
- if (!$scope.focused){
- var div = $elm.find('div');
- div.addClass('ui-grid-cell-focus');
- $elm.attr('aria-selected', true);
- uiGridCellnavCtrl.setAriaActivedescendant($elm.attr('id'));
- $scope.focused = true;
- }
- }
-
- function clearFocus() {
- if ($scope.focused){
- var div = $elm.find('div');
- div.removeClass('ui-grid-cell-focus');
- $elm.attr('aria-selected', false);
- uiGridCellnavCtrl.removeAriaActivedescendant($elm.attr('id'));
- $scope.focused = false;
- }
- }
-
- $scope.$on('$destroy', function () {
- dataChangeDereg();
-
- //.off withouth paramaters removes all handlers
- $elm.find('div').off();
- $elm.off();
- });
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.edit
- * @description
- *
- * # ui.grid.edit
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides cell editing capability to ui.grid. The goal was to emulate keying data in a spreadsheet via
- * a keyboard.
- * <br/>
- * <br/>
- * To really get the full spreadsheet-like data entry, the ui.grid.cellNav module should be used. This will allow the
- * user to key data and then tab, arrow, or enter to the cells beside or below.
- *
- * <div doc-module-components="ui.grid.edit"></div>
- */
-
- var module = angular.module('ui.grid.edit', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.constant:uiGridEditConstants
- *
- * @description constants available in edit module
- */
- module.constant('uiGridEditConstants', {
- EDITABLE_CELL_TEMPLATE: /EDITABLE_CELL_TEMPLATE/g,
- //must be lowercase because template bulder converts to lower
- EDITABLE_CELL_DIRECTIVE: /editable_cell_directive/g,
- events: {
- BEGIN_CELL_EDIT: 'uiGridEventBeginCellEdit',
- END_CELL_EDIT: 'uiGridEventEndCellEdit',
- CANCEL_CELL_EDIT: 'uiGridEventCancelCellEdit'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.edit.service:uiGridEditService
- *
- * @description Services for editing features
- */
- module.service('uiGridEditService', ['$q', 'uiGridConstants', 'gridUtil',
- function ($q, uiGridConstants, gridUtil) {
-
- var service = {
-
- initializeGrid: function (grid) {
-
- service.defaultGridOptions(grid.options);
-
- grid.registerColumnBuilder(service.editColumnBuilder);
- grid.edit = {};
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:PublicApi
- *
- * @description Public Api for edit feature
- */
- var publicApi = {
- events: {
- edit: {
- /**
- * @ngdoc event
- * @name afterCellEdit
- * @eventOf ui.grid.edit.api:PublicApi
- * @description raised when cell editing is complete
- * <pre>
- * gridApi.edit.on.afterCellEdit(scope,function(rowEntity, colDef){})
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @param {object} colDef the column that was edited
- * @param {object} newValue new value
- * @param {object} oldValue old value
- */
- afterCellEdit: function (rowEntity, colDef, newValue, oldValue) {
- },
- /**
- * @ngdoc event
- * @name beginCellEdit
- * @eventOf ui.grid.edit.api:PublicApi
- * @description raised when cell editing starts on a cell
- * <pre>
- * gridApi.edit.on.beginCellEdit(scope,function(rowEntity, colDef){})
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @param {object} colDef the column that was edited
- * @param {object} triggerEvent the event that triggered the edit. Useful to prevent losing keystrokes on some
- * complex editors
- */
- beginCellEdit: function (rowEntity, colDef, triggerEvent) {
- },
- /**
- * @ngdoc event
- * @name cancelCellEdit
- * @eventOf ui.grid.edit.api:PublicApi
- * @description raised when cell editing is cancelled on a cell
- * <pre>
- * gridApi.edit.on.cancelCellEdit(scope,function(rowEntity, colDef){})
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @param {object} colDef the column that was edited
- */
- cancelCellEdit: function (rowEntity, colDef) {
- }
- }
- },
- methods: {
- edit: { }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- //grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:GridOptions
- *
- * @description Options for configuring the edit feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableCellEdit
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If defined, sets the default value for the editable flag on each individual colDefs
- * if their individual enableCellEdit configuration is not defined. Defaults to undefined.
- */
-
- /**
- * @ngdoc object
- * @name cellEditableCondition
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If specified, either a value or function to be used by all columns before editing.
- * If falsy, then editing of cell is not allowed.
- * @example
- * <pre>
- * function($scope){
- * //use $scope.row.entity and $scope.col.colDef to determine if editing is allowed
- * return true;
- * }
- * </pre>
- */
- gridOptions.cellEditableCondition = gridOptions.cellEditableCondition === undefined ? true : gridOptions.cellEditableCondition;
-
- /**
- * @ngdoc object
- * @name editableCellTemplate
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If specified, cellTemplate to use as the editor for all columns.
- * <br/> defaults to 'ui-grid/cellTextEditor'
- */
-
- /**
- * @ngdoc object
- * @name enableCellEditOnFocus
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If true, then editor is invoked as soon as cell receives focus. Default false.
- * <br/>_requires cellNav feature and the edit feature to be enabled_
- */
- //enableCellEditOnFocus can only be used if cellnav module is used
- gridOptions.enableCellEditOnFocus = gridOptions.enableCellEditOnFocus === undefined ? false : gridOptions.enableCellEditOnFocus;
- },
-
- /**
- * @ngdoc service
- * @name editColumnBuilder
- * @methodOf ui.grid.edit.service:uiGridEditService
- * @description columnBuilder function that adds edit properties to grid column
- * @returns {promise} promise that will load any needed templates when resolved
- */
- editColumnBuilder: function (colDef, col, gridOptions) {
-
- var promises = [];
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:ColumnDef
- *
- * @description Column Definition for edit feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enableCellEdit
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description enable editing on column
- */
- colDef.enableCellEdit = colDef.enableCellEdit === undefined ? (gridOptions.enableCellEdit === undefined ?
- (colDef.type !== 'object') : gridOptions.enableCellEdit) : colDef.enableCellEdit;
-
- /**
- * @ngdoc object
- * @name cellEditableCondition
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description If specified, either a value or function evaluated before editing cell. If falsy, then editing of cell is not allowed.
- * @example
- * <pre>
- * function($scope){
- * //use $scope.row.entity and $scope.col.colDef to determine if editing is allowed
- * return true;
- * }
- * </pre>
- */
- colDef.cellEditableCondition = colDef.cellEditableCondition === undefined ? gridOptions.cellEditableCondition : colDef.cellEditableCondition;
-
- /**
- * @ngdoc object
- * @name editableCellTemplate
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description cell template to be used when editing this column. Can be Url or text template
- * <br/>Defaults to gridOptions.editableCellTemplate
- */
- if (colDef.enableCellEdit) {
- colDef.editableCellTemplate = colDef.editableCellTemplate || gridOptions.editableCellTemplate || 'ui-grid/cellEditor';
-
- promises.push(gridUtil.getTemplate(colDef.editableCellTemplate)
- .then(
- function (template) {
- col.editableCellTemplate = template;
- },
- function (res) {
- // Todo handle response error here?
- throw new Error("Couldn't fetch/use colDef.editableCellTemplate '" + colDef.editableCellTemplate + "'");
- }));
- }
-
- /**
- * @ngdoc object
- * @name enableCellEditOnFocus
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @requires ui.grid.cellNav
- * @description If true, then editor is invoked as soon as cell receives focus. Default false.
- * <br>_requires both the cellNav feature and the edit feature to be enabled_
- */
- //enableCellEditOnFocus can only be used if cellnav module is used
- colDef.enableCellEditOnFocus = colDef.enableCellEditOnFocus === undefined ? gridOptions.enableCellEditOnFocus : colDef.enableCellEditOnFocus;
-
-
- /**
- * @ngdoc string
- * @name editModelField
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description a bindable string value that is used when binding to edit controls instead of colDef.field
- * <br/> example: You have a complex property on and object like state:{abbrev:'MS',name:'Mississippi'}. The
- * grid should display state.name in the cell and sort/filter based on the state.name property but the editor
- * requires the full state object.
- * <br/>colDef.field = 'state.name'
- * <br/>colDef.editModelField = 'state'
- */
- //colDef.editModelField
-
- return $q.all(promises);
- },
-
- /**
- * @ngdoc service
- * @name isStartEditKey
- * @methodOf ui.grid.edit.service:uiGridEditService
- * @description Determines if a keypress should start editing. Decorate this service to override with your
- * own key events. See service decorator in angular docs.
- * @param {Event} evt keydown event
- * @returns {boolean} true if an edit should start
- */
- isStartEditKey: function (evt) {
- if (evt.metaKey ||
- evt.keyCode === uiGridConstants.keymap.ESC ||
- evt.keyCode === uiGridConstants.keymap.SHIFT ||
- evt.keyCode === uiGridConstants.keymap.CTRL ||
- evt.keyCode === uiGridConstants.keymap.ALT ||
- evt.keyCode === uiGridConstants.keymap.WIN ||
- evt.keyCode === uiGridConstants.keymap.CAPSLOCK ||
-
- evt.keyCode === uiGridConstants.keymap.LEFT ||
- (evt.keyCode === uiGridConstants.keymap.TAB && evt.shiftKey) ||
-
- evt.keyCode === uiGridConstants.keymap.RIGHT ||
- evt.keyCode === uiGridConstants.keymap.TAB ||
-
- evt.keyCode === uiGridConstants.keymap.UP ||
- (evt.keyCode === uiGridConstants.keymap.ENTER && evt.shiftKey) ||
-
- evt.keyCode === uiGridConstants.keymap.DOWN ||
- evt.keyCode === uiGridConstants.keymap.ENTER) {
- return false;
-
- }
- return true;
- }
-
-
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEdit
- * @element div
- * @restrict A
- *
- * @description Adds editing features to the ui-grid directive.
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.edit']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-edit></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridEdit', ['gridUtil', 'uiGridEditService', function (gridUtil, uiGridEditService) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridEditService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridRenderContainer
- * @element div
- * @restrict A
- *
- * @description Adds keydown listeners to renderContainer element so we can capture when to begin edits
- *
- */
- module.directive('uiGridViewport', [ 'uiGridEditConstants',
- function ( uiGridEditConstants) {
- return {
- replace: true,
- priority: -99998, //run before cellNav
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: false,
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
-
- // Skip attaching if edit and cellNav is not enabled
- if (!uiGridCtrl.grid.api.edit || !uiGridCtrl.grid.api.cellNav) { return; }
-
- var containerId = controllers[1].containerId;
- //no need to process for other containers
- if (containerId !== 'body') {
- return;
- }
-
- //refocus on the grid
- $scope.$on(uiGridEditConstants.events.CANCEL_CELL_EDIT, function () {
- uiGridCtrl.focus();
- });
- $scope.$on(uiGridEditConstants.events.END_CELL_EDIT, function () {
- uiGridCtrl.focus();
- });
-
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridCell
- * @element div
- * @restrict A
- *
- * @description Stacks on top of ui.grid.uiGridCell to provide in-line editing capabilities to the cell
- * Editing Actions.
- *
- * Binds edit start events to the uiGridCell element. When the events fire, the gridCell element is appended
- * with the columnDef.editableCellTemplate element ('cellEditor.html' by default).
- *
- * The editableCellTemplate should respond to uiGridEditConstants.events.BEGIN\_CELL\_EDIT angular event
- * and do the initial steps needed to edit the cell (setfocus on input element, etc).
- *
- * When the editableCellTemplate recognizes that the editing is ended (blur event, Enter key, etc.)
- * it should emit the uiGridEditConstants.events.END\_CELL\_EDIT event.
- *
- * If editableCellTemplate recognizes that the editing has been cancelled (esc key)
- * it should emit the uiGridEditConstants.events.CANCEL\_CELL\_EDIT event. The original value
- * will be set back on the model by the uiGridCell directive.
- *
- * Events that invoke editing:
- * - dblclick
- * - F2 keydown (when using cell selection)
- *
- * Events that end editing:
- * - Dependent on the specific editableCellTemplate
- * - Standards should be blur and enter keydown
- *
- * Events that cancel editing:
- * - Dependent on the specific editableCellTemplate
- * - Standards should be Esc keydown
- *
- * Grid Events that end editing:
- * - uiGridConstants.events.GRID_SCROLL
- *
- */
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:GridRow
- *
- * @description GridRow options for edit feature, these are available to be
- * set internally only, by other features
- */
-
- /**
- * @ngdoc object
- * @name enableCellEdit
- * @propertyOf ui.grid.edit.api:GridRow
- * @description enable editing on row, grouping for example might disable editing on group header rows
- */
-
- module.directive('uiGridCell',
- ['$compile', '$injector', '$timeout', 'uiGridConstants', 'uiGridEditConstants', 'gridUtil', '$parse', 'uiGridEditService', '$rootScope', '$q',
- function ($compile, $injector, $timeout, uiGridConstants, uiGridEditConstants, gridUtil, $parse, uiGridEditService, $rootScope, $q) {
- var touchstartTimeout = 500;
- if ($injector.has('uiGridCellNavService')) {
- var uiGridCellNavService = $injector.get('uiGridCellNavService');
- }
-
- return {
- priority: -100, // run after default uiGridCell directive
- restrict: 'A',
- scope: false,
- require: '?^uiGrid',
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var html;
- var origCellValue;
- var inEdit = false;
- var cellModel;
- var cancelTouchstartTimeout;
-
- var editCellScope;
-
- if (!$scope.col.colDef.enableCellEdit) {
- return;
- }
-
- var cellNavNavigateDereg = function() {};
- var viewPortKeyDownDereg = function() {};
-
-
- var setEditable = function() {
- if ($scope.col.colDef.enableCellEdit && $scope.row.enableCellEdit !== false) {
- if (!$scope.beginEditEventsWired) { //prevent multiple attachments
- registerBeginEditEvents();
- }
- } else {
- if ($scope.beginEditEventsWired) {
- cancelBeginEditEvents();
- }
- }
- };
-
- setEditable();
-
- var rowWatchDereg = $scope.$watch('row', function (n, o) {
- if (n !== o) {
- setEditable();
- }
- });
-
-
- $scope.$on('$destroy', function destroyEvents() {
- rowWatchDereg();
- // unbind all jquery events in order to avoid memory leaks
- $elm.off();
- });
-
- function registerBeginEditEvents() {
- $elm.on('dblclick', beginEdit);
-
- // Add touchstart handling. If the users starts a touch and it doesn't end after X milliseconds, then start the edit
- $elm.on('touchstart', touchStart);
-
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
-
- viewPortKeyDownDereg = uiGridCtrl.grid.api.cellNav.on.viewPortKeyDown($scope, function (evt, rowCol) {
- if (rowCol === null) {
- return;
- }
-
- if (rowCol.row === $scope.row && rowCol.col === $scope.col && !$scope.col.colDef.enableCellEditOnFocus) {
- //important to do this before scrollToIfNecessary
- beginEditKeyDown(evt);
- }
- });
-
- cellNavNavigateDereg = uiGridCtrl.grid.api.cellNav.on.navigate($scope, function (newRowCol, oldRowCol, evt) {
- if ($scope.col.colDef.enableCellEditOnFocus) {
- // Don't begin edit if the cell hasn't changed
- if ((!oldRowCol || newRowCol.row !== oldRowCol.row || newRowCol.col !== oldRowCol.col) &&
- newRowCol.row === $scope.row && newRowCol.col === $scope.col) {
- $timeout(function () {
- beginEdit(evt);
- });
- }
- }
- });
- }
-
- $scope.beginEditEventsWired = true;
-
- }
-
- function touchStart(event) {
- // jQuery masks events
- if (typeof(event.originalEvent) !== 'undefined' && event.originalEvent !== undefined) {
- event = event.originalEvent;
- }
-
- // Bind touchend handler
- $elm.on('touchend', touchEnd);
-
- // Start a timeout
- cancelTouchstartTimeout = $timeout(function() { }, touchstartTimeout);
-
- // Timeout's done! Start the edit
- cancelTouchstartTimeout.then(function () {
- // Use setTimeout to start the edit because beginEdit expects to be outside of $digest
- setTimeout(beginEdit, 0);
-
- // Undbind the touchend handler, we don't need it anymore
- $elm.off('touchend', touchEnd);
- });
- }
-
- // Cancel any touchstart timeout
- function touchEnd(event) {
- $timeout.cancel(cancelTouchstartTimeout);
- $elm.off('touchend', touchEnd);
- }
-
- function cancelBeginEditEvents() {
- $elm.off('dblclick', beginEdit);
- $elm.off('keydown', beginEditKeyDown);
- $elm.off('touchstart', touchStart);
- cellNavNavigateDereg();
- viewPortKeyDownDereg();
- $scope.beginEditEventsWired = false;
- }
-
- function beginEditKeyDown(evt) {
- if (uiGridEditService.isStartEditKey(evt)) {
- beginEdit(evt);
- }
- }
-
- function shouldEdit(col, row) {
- return !row.isSaving &&
- ( angular.isFunction(col.colDef.cellEditableCondition) ?
- col.colDef.cellEditableCondition($scope) :
- col.colDef.cellEditableCondition );
- }
-
-
- function beginEdit(triggerEvent) {
- //we need to scroll the cell into focus before invoking the editor
- $scope.grid.api.core.scrollToIfNecessary($scope.row, $scope.col)
- .then(function () {
- beginEditAfterScroll(triggerEvent);
- });
- }
-
- /**
- * @ngdoc property
- * @name editDropdownOptionsArray
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description an array of values in the format
- * [ {id: xxx, value: xxx} ], which is populated
- * into the edit dropdown
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownIdLabel
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description the label for the "id" field
- * in the editDropdownOptionsArray. Defaults
- * to 'id'
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsArray: [{code: 1, status: 'active'}, {code: 2, status: 'inactive'}],
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownRowEntityOptionsArrayPath
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description a path to a property on row.entity containing an
- * array of values in the format
- * [ {id: xxx, value: xxx} ], which will be used to populate
- * the edit dropdown. This can be used when the dropdown values are dependent on
- * the backing row entity.
- * If this property is set then editDropdownOptionsArray will be ignored.
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownRowEntityOptionsArrayPath: 'foo.bars[0].baz',
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc service
- * @name editDropdownOptionsFunction
- * @methodOf ui.grid.edit.api:ColumnDef
- * @description a function returning an array of values in the format
- * [ {id: xxx, value: xxx} ], which will be used to populate
- * the edit dropdown. This can be used when the dropdown values are dependent on
- * the backing row entity with some kind of algorithm.
- * If this property is set then both editDropdownOptionsArray and
- * editDropdownRowEntityOptionsArrayPath will be ignored.
- * @param {object} rowEntity the options.data element that the returned array refers to
- * @param {object} colDef the column that implements this dropdown
- * @returns {object} an array of values in the format
- * [ {id: xxx, value: xxx} ] used to populate the edit dropdown
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsFunction: function(rowEntity, colDef) {
- * if (rowEntity.foo === 'bar') {
- * return [{id: 'bar1', value: 'BAR 1'},
- * {id: 'bar2', value: 'BAR 2'},
- * {id: 'bar3', value: 'BAR 3'}];
- * } else {
- * return [{id: 'foo1', value: 'FOO 1'},
- * {id: 'foo2', value: 'FOO 2'}];
- * }
- * },
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownValueLabel
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description the label for the "value" field
- * in the editDropdownOptionsArray. Defaults
- * to 'value'
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsArray: [{code: 1, status: 'active'}, {code: 2, status: 'inactive'}],
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownFilter
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description A filter that you would like to apply to the values in the options list
- * of the dropdown. For example if you were using angular-translate you might set this
- * to `'translate'`
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsArray: [{code: 1, status: 'active'}, {code: 2, status: 'inactive'}],
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status', editDropdownFilter: 'translate' }
- * ],
- * </pre>
- *
- */
- function beginEditAfterScroll(triggerEvent) {
- // If we are already editing, then just skip this so we don't try editing twice...
- if (inEdit) {
- return;
- }
-
- if (!shouldEdit($scope.col, $scope.row)) {
- return;
- }
-
- var modelField = $scope.row.getQualifiedColField($scope.col);
- if ($scope.col.colDef.editModelField) {
- modelField = gridUtil.preEval('row.entity.' + $scope.col.colDef.editModelField);
- }
-
- cellModel = $parse(modelField);
-
- //get original value from the cell
- origCellValue = cellModel($scope);
-
- html = $scope.col.editableCellTemplate;
- html = html.replace(uiGridConstants.MODEL_COL_FIELD, modelField);
- html = html.replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)');
-
- var optionFilter = $scope.col.colDef.editDropdownFilter ? '|' + $scope.col.colDef.editDropdownFilter : '';
- html = html.replace(uiGridConstants.CUSTOM_FILTERS, optionFilter);
-
- var inputType = 'text';
- switch ($scope.col.colDef.type){
- case 'boolean':
- inputType = 'checkbox';
- break;
- case 'number':
- inputType = 'number';
- break;
- case 'date':
- inputType = 'date';
- break;
- }
- html = html.replace('INPUT_TYPE', inputType);
-
- // In order to fill dropdown options we use:
- // - A function/promise or
- // - An array inside of row entity if no function exists or
- // - A single array for the whole column if none of the previous exists.
- var editDropdownOptionsFunction = $scope.col.colDef.editDropdownOptionsFunction;
- if (editDropdownOptionsFunction) {
- $q.when(editDropdownOptionsFunction($scope.row.entity, $scope.col.colDef))
- .then(function(result) {
- $scope.editDropdownOptionsArray = result;
- });
- } else {
- var editDropdownRowEntityOptionsArrayPath = $scope.col.colDef.editDropdownRowEntityOptionsArrayPath;
- if (editDropdownRowEntityOptionsArrayPath) {
- $scope.editDropdownOptionsArray = resolveObjectFromPath($scope.row.entity, editDropdownRowEntityOptionsArrayPath);
- }
- else {
- $scope.editDropdownOptionsArray = $scope.col.colDef.editDropdownOptionsArray;
- }
- }
- $scope.editDropdownIdLabel = $scope.col.colDef.editDropdownIdLabel ? $scope.col.colDef.editDropdownIdLabel : 'id';
- $scope.editDropdownValueLabel = $scope.col.colDef.editDropdownValueLabel ? $scope.col.colDef.editDropdownValueLabel : 'value';
-
- var cellElement;
- var createEditor = function(){
- inEdit = true;
- cancelBeginEditEvents();
- var cellElement = angular.element(html);
- $elm.append(cellElement);
- editCellScope = $scope.$new();
- $compile(cellElement)(editCellScope);
- var gridCellContentsEl = angular.element($elm.children()[0]);
- gridCellContentsEl.addClass('ui-grid-cell-contents-hidden');
- };
- if (!$rootScope.$$phase) {
- $scope.$apply(createEditor);
- } else {
- createEditor();
- }
-
- //stop editing when grid is scrolled
- var deregOnGridScroll = $scope.col.grid.api.core.on.scrollBegin($scope, function () {
- if ($scope.grid.disableScrolling) {
- return;
- }
- endEdit();
- $scope.grid.api.edit.raise.afterCellEdit($scope.row.entity, $scope.col.colDef, cellModel($scope), origCellValue);
- deregOnGridScroll();
- deregOnEndCellEdit();
- deregOnCancelCellEdit();
- });
-
- //end editing
- var deregOnEndCellEdit = $scope.$on(uiGridEditConstants.events.END_CELL_EDIT, function () {
- endEdit();
- $scope.grid.api.edit.raise.afterCellEdit($scope.row.entity, $scope.col.colDef, cellModel($scope), origCellValue);
- deregOnEndCellEdit();
- deregOnGridScroll();
- deregOnCancelCellEdit();
- });
-
- //cancel editing
- var deregOnCancelCellEdit = $scope.$on(uiGridEditConstants.events.CANCEL_CELL_EDIT, function () {
- cancelEdit();
- deregOnCancelCellEdit();
- deregOnGridScroll();
- deregOnEndCellEdit();
- });
-
- $scope.$broadcast(uiGridEditConstants.events.BEGIN_CELL_EDIT, triggerEvent);
- $timeout(function () {
- //execute in a timeout to give any complex editor templates a cycle to completely render
- $scope.grid.api.edit.raise.beginCellEdit($scope.row.entity, $scope.col.colDef, triggerEvent);
- });
- }
-
- function endEdit() {
- $scope.grid.disableScrolling = false;
- if (!inEdit) {
- return;
- }
-
- //sometimes the events can't keep up with the keyboard and grid focus is lost, so always focus
- //back to grid here. The focus call needs to be before the $destroy and removal of the control,
- //otherwise ng-model-options of UpdateOn: 'blur' will not work.
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- uiGridCtrl.focus();
- }
-
- var gridCellContentsEl = angular.element($elm.children()[0]);
- //remove edit element
- editCellScope.$destroy();
- var children = $elm.children();
- for (var i = 1; i < children.length; i++) {
- angular.element(children[i]).remove();
- }
- gridCellContentsEl.removeClass('ui-grid-cell-contents-hidden');
- inEdit = false;
- registerBeginEditEvents();
- $scope.grid.api.core.notifyDataChange( uiGridConstants.dataChange.EDIT );
- }
-
- function cancelEdit() {
- $scope.grid.disableScrolling = false;
- if (!inEdit) {
- return;
- }
- cellModel.assign($scope, origCellValue);
- $scope.$apply();
-
- $scope.grid.api.edit.raise.cancelCellEdit($scope.row.entity, $scope.col.colDef);
- endEdit();
- }
-
- // resolves a string path against the given object
- // shamelessly borrowed from
- // http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key
- function resolveObjectFromPath(object, path) {
- path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
- path = path.replace(/^\./, ''); // strip a leading dot
- var a = path.split('.');
- while (a.length) {
- var n = a.shift();
- if (n in object) {
- object = object[n];
- } else {
- return;
- }
- }
- return object;
- }
-
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEditor
- * @element div
- * @restrict A
- *
- * @description input editor directive for editable fields.
- * Provides EndEdit and CancelEdit events
- *
- * Events that end editing:
- * blur and enter keydown
- *
- * Events that cancel editing:
- * - Esc keydown
- *
- */
- module.directive('uiGridEditor',
- ['gridUtil', 'uiGridConstants', 'uiGridEditConstants','$timeout', 'uiGridEditService',
- function (gridUtil, uiGridConstants, uiGridEditConstants, $timeout, uiGridEditService) {
- return {
- scope: true,
- require: ['?^uiGrid', '?^uiGridRenderContainer', 'ngModel'],
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl, renderContainerCtrl, ngModel;
- if (controllers[0]) { uiGridCtrl = controllers[0]; }
- if (controllers[1]) { renderContainerCtrl = controllers[1]; }
- if (controllers[2]) { ngModel = controllers[2]; }
-
- //set focus at start of edit
- $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function (evt,triggerEvent) {
- $timeout(function () {
- $elm[0].focus();
- //only select text if it is not being replaced below in the cellNav viewPortKeyPress
- if ($elm[0].select && ($scope.col.colDef.enableCellEditOnFocus || !(uiGridCtrl && uiGridCtrl.grid.api.cellNav))) {
- $elm[0].select();
- }
- else {
- //some browsers (Chrome) stupidly, imo, support the w3 standard that number, email, ...
- //fields should not allow setSelectionRange. We ignore the error for those browsers
- //https://www.w3.org/Bugs/Public/show_bug.cgi?id=24796
- try {
- $elm[0].setSelectionRange($elm[0].value.length, $elm[0].value.length);
- }
- catch (ex) {
- //ignore
- }
- }
- });
-
- //set the keystroke that started the edit event
- //we must do this because the BeginEdit is done in a different event loop than the intitial
- //keydown event
- //fire this event for the keypress that is received
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- var viewPortKeyDownUnregister = uiGridCtrl.grid.api.cellNav.on.viewPortKeyPress($scope, function (evt, rowCol) {
- if (uiGridEditService.isStartEditKey(evt)) {
- ngModel.$setViewValue(String.fromCharCode( typeof evt.which === 'number' ? evt.which : evt.keyCode), evt);
- ngModel.$render();
- }
- viewPortKeyDownUnregister();
- });
- }
-
- // macOS will blur the checkbox when clicked in Safari and Firefox,
- // to get around this, we disable the blur handler on mousedown,
- // and then focus the checkbox and re-enable the blur handler after $timeout
- $elm.on('mousedown', function(evt) {
- if ($elm[0].type === 'checkbox') {
- $elm.off('blur', $scope.stopEdit);
- $timeout(function() {
- $elm.focus();
- $elm.on('blur', $scope.stopEdit);
- });
- }
- });
-
- $elm.on('blur', $scope.stopEdit);
- });
-
-
- $scope.deepEdit = false;
-
- $scope.stopEdit = function (evt) {
- if ($scope.inputForm && !$scope.inputForm.$valid) {
- evt.stopPropagation();
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- }
- else {
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- }
- $scope.deepEdit = false;
- };
-
-
- $elm.on('click', function (evt) {
- if ($elm[0].type !== 'checkbox') {
- $scope.deepEdit = true;
- $timeout(function () {
- $scope.grid.disableScrolling = true;
- });
- }
- });
-
- $elm.on('keydown', function (evt) {
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ESC:
- evt.stopPropagation();
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- break;
- }
-
- if ($scope.deepEdit &&
- (evt.keyCode === uiGridConstants.keymap.LEFT ||
- evt.keyCode === uiGridConstants.keymap.RIGHT ||
- evt.keyCode === uiGridConstants.keymap.UP ||
- evt.keyCode === uiGridConstants.keymap.DOWN)) {
- evt.stopPropagation();
- }
- // Pass the keydown event off to the cellNav service, if it exists
- else if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- evt.uiGridTargetRenderContainerId = renderContainerCtrl.containerId;
- if (uiGridCtrl.cellNav.handleKeyDown(evt) !== null) {
- $scope.stopEdit(evt);
- }
- }
- else {
- //handle enter and tab for editing not using cellNav
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ENTER: // Enter (Leave Field)
- case uiGridConstants.keymap.TAB:
- evt.stopPropagation();
- evt.preventDefault();
- $scope.stopEdit(evt);
- break;
- }
- }
-
- return true;
- });
-
- $scope.$on('$destroy', function unbindEvents() {
- // unbind all jquery events in order to avoid memory leaks
- $elm.off();
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:input
- * @element input
- * @restrict E
- *
- * @description directive to provide binding between input[date] value and ng-model for angular 1.2
- * It is similar to input[date] directive of angular 1.3
- *
- * Supported date format for input is 'yyyy-MM-dd'
- * The directive will set the $valid property of input element and the enclosing form to false if
- * model is invalid date or value of input is entered wrong.
- *
- */
- module.directive('uiGridEditor', ['$filter', function ($filter) {
- function parseDateString(dateString) {
- if (typeof(dateString) === 'undefined' || dateString === '') {
- return null;
- }
- var parts = dateString.split('-');
- if (parts.length !== 3) {
- return null;
- }
- var year = parseInt(parts[0], 10);
- var month = parseInt(parts[1], 10);
- var day = parseInt(parts[2], 10);
-
- if (month < 1 || year < 1 || day < 1) {
- return null;
- }
- return new Date(year, (month - 1), day);
- }
- return {
- priority: -100, // run after default uiGridEditor directive
- require: '?ngModel',
- link: function (scope, element, attrs, ngModel) {
-
- if (angular.version.minor === 2 && attrs.type && attrs.type === 'date' && ngModel) {
-
- ngModel.$formatters.push(function (modelValue) {
- ngModel.$setValidity(null,(!modelValue || !isNaN(modelValue.getTime())));
- return $filter('date')(modelValue, 'yyyy-MM-dd');
- });
-
- ngModel.$parsers.push(function (viewValue) {
- if (viewValue && viewValue.length > 0) {
- var dateValue = parseDateString(viewValue);
- ngModel.$setValidity(null, (dateValue && !isNaN(dateValue.getTime())));
- return dateValue;
- }
- else {
- ngModel.$setValidity(null, true);
- return null;
- }
- });
- }
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEditDropdown
- * @element div
- * @restrict A
- *
- * @description dropdown editor for editable fields.
- * Provides EndEdit and CancelEdit events
- *
- * Events that end editing:
- * blur and enter keydown, and any left/right nav
- *
- * Events that cancel editing:
- * - Esc keydown
- *
- */
- module.directive('uiGridEditDropdown',
- ['uiGridConstants', 'uiGridEditConstants', '$timeout',
- function (uiGridConstants, uiGridEditConstants, $timeout) {
- return {
- require: ['?^uiGrid', '?^uiGridRenderContainer'],
- scope: true,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var renderContainerCtrl = controllers[1];
-
- //set focus at start of edit
- $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function () {
- $timeout(function(){
- $elm[0].focus();
- });
-
- $elm[0].style.width = ($elm[0].parentElement.offsetWidth - 1) + 'px';
- $elm.on('blur', function (evt) {
- $scope.stopEdit(evt);
- });
- });
-
-
- $scope.stopEdit = function (evt) {
- // no need to validate a dropdown - invalid values shouldn't be
- // available in the list
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- };
-
- $elm.on('keydown', function (evt) {
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ESC:
- evt.stopPropagation();
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- break;
- }
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- evt.uiGridTargetRenderContainerId = renderContainerCtrl.containerId;
- if (uiGridCtrl.cellNav.handleKeyDown(evt) !== null) {
- $scope.stopEdit(evt);
- }
- }
- else {
- //handle enter and tab for editing not using cellNav
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ENTER: // Enter (Leave Field)
- case uiGridConstants.keymap.TAB:
- evt.stopPropagation();
- evt.preventDefault();
- $scope.stopEdit(evt);
- break;
- }
- }
- return true;
- });
-
- $scope.$on('$destroy', function unbindEvents() {
- // unbind jquery events to prevent memory leaks
- $elm.off();
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEditFileChooser
- * @element div
- * @restrict A
- *
- * @description input editor directive for editable fields.
- * Provides EndEdit and CancelEdit events
- *
- * Events that end editing:
- * blur and enter keydown
- *
- * Events that cancel editing:
- * - Esc keydown
- *
- */
- module.directive('uiGridEditFileChooser',
- ['gridUtil', 'uiGridConstants', 'uiGridEditConstants','$timeout',
- function (gridUtil, uiGridConstants, uiGridEditConstants, $timeout) {
- return {
- scope: true,
- require: ['?^uiGrid', '?^uiGridRenderContainer'],
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl, renderContainerCtrl;
- if (controllers[0]) { uiGridCtrl = controllers[0]; }
- if (controllers[1]) { renderContainerCtrl = controllers[1]; }
- var grid = uiGridCtrl.grid;
-
- var handleFileSelect = function( event ){
- var target = event.srcElement || event.target;
-
- if (target && target.files && target.files.length > 0) {
- /**
- * @ngdoc property
- * @name editFileChooserCallback
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description A function that should be called when any files have been chosen
- * by the user. You should use this to process the files appropriately for your
- * application.
- *
- * It passes the gridCol, the gridRow (from which you can get gridRow.entity),
- * and the files. The files are in the format as returned from the file chooser,
- * an array of files, with each having useful information such as:
- * - `files[0].lastModifiedDate`
- * - `files[0].name`
- * - `files[0].size` (appears to be in bytes)
- * - `files[0].type` (MIME type by the looks)
- *
- * Typically you would do something with these files - most commonly you would
- * use the filename or read the file itself in. The example function does both.
- *
- * @example
- * <pre>
- * editFileChooserCallBack: function(gridRow, gridCol, files ){
- * // ignore all but the first file, it can only choose one anyway
- * // set the filename into this column
- * gridRow.entity.filename = file[0].name;
- *
- * // read the file and set it into a hidden column, which we may do stuff with later
- * var setFile = function(fileContent){
- * gridRow.entity.file = fileContent.currentTarget.result;
- * };
- * var reader = new FileReader();
- * reader.onload = setFile;
- * reader.readAsText( files[0] );
- * }
- * </pre>
- */
- if ( typeof($scope.col.colDef.editFileChooserCallback) === 'function' ) {
- $scope.col.colDef.editFileChooserCallback($scope.row, $scope.col, target.files);
- } else {
- gridUtil.logError('You need to set colDef.editFileChooserCallback to use the file chooser');
- }
-
- target.form.reset();
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- } else {
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- }
- };
-
- $elm[0].addEventListener('change', handleFileSelect, false);
-
- $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function () {
- $elm[0].focus();
- $elm[0].select();
-
- $elm.on('blur', function (evt) {
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- });
- });
-
- $scope.$on('$destroy', function unbindEvents() {
- // unbind jquery events to prevent memory leaks
- $elm.off();
- $elm[0].removeEventListener('change', handleFileSelect, false);
- });
- }
- };
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.emptyBaseLayer
- * @description
- *
- * # ui.grid.emptyBaseLayer
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides the ability to have the background of the ui-grid be empty rows, this would be displayed in the case were
- * the grid height is greater then the amount of rows displayed.
- *
- * <div doc-module-components="ui.grid.emptyBaseLayer"></div>
- */
- var module = angular.module('ui.grid.emptyBaseLayer', ['ui.grid']);
-
-
- /**
- * @ngdoc service
- * @name ui.grid.emptyBaseLayer.service:uiGridBaseLayerService
- *
- * @description Services for the empty base layer grid
- */
- module.service('uiGridBaseLayerService', ['gridUtil', '$compile', function (gridUtil, $compile) {
- var service = {
- initializeGrid: function (grid, disableEmptyBaseLayer) {
-
- /**
- * @ngdoc object
- * @name ui.grid.emptyBaseLayer.api:GridOptions
- *
- * @description GridOptions for emptyBaseLayer feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- grid.baseLayer = {
- emptyRows: []
- };
-
- /**
- * @ngdoc object
- * @name enableEmptyGridBaseLayer
- * @propertyOf ui.grid.emptyBaseLayer.api:GridOptions
- * @description Enable empty base layer, which shows empty rows as background on the entire grid
- * <br/>Defaults to true, if the directive is used.
- * <br/>Set to false either by setting this attribute or passing false to the directive.
- */
- //default option to true unless it was explicitly set to false
- if (grid.options.enableEmptyGridBaseLayer !== false) {
- grid.options.enableEmptyGridBaseLayer = !disableEmptyBaseLayer;
- }
- },
-
- setNumberOfEmptyRows: function(viewportHeight, grid) {
- var rowHeight = grid.options.rowHeight,
- rows = Math.ceil(viewportHeight / rowHeight);
- if (rows > 0) {
- grid.baseLayer.emptyRows = [];
- for (var i = 0; i < rows; i++) {
- grid.baseLayer.emptyRows.push({});
- }
- }
- }
- };
- return service;
- }]);
-
- /**
- * @ngdoc object
- * @name ui.grid.emptyBaseLayer.directive:uiGridEmptyBaseLayer
- * @description Shows empty rows in the background of the ui-grid, these span
- * the full height of the ui-grid, so that there won't be blank space below the shown rows.
- * @example
- * <pre>
- * <div ui-grid="gridOptions" class="grid" ui-grid-empty-base-layer></div>
- * </pre>
- * Or you can enable/disable it dynamically by passing in true or false. It doesn't
- * the value, so it would only be set on initial render.
- * <pre>
- * <div ui-grid="gridOptions" class="grid" ui-grid-empty-base-layer="false"></div>
- * </pre>
- */
- module.directive('uiGridEmptyBaseLayer', ['gridUtil', 'uiGridBaseLayerService',
- '$parse',
- function (gridUtil, uiGridBaseLayerService, $parse) {
- return {
- require: '^uiGrid',
- scope: false,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var disableEmptyBaseLayer = $parse($attrs.uiGridEmptyBaseLayer)($scope) === false;
- uiGridBaseLayerService.initializeGrid(uiGridCtrl.grid, disableEmptyBaseLayer);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- if (!uiGridCtrl.grid.options.enableEmptyGridBaseLayer) {
- return;
- }
-
- var renderBodyContainer = uiGridCtrl.grid.renderContainers.body,
- viewportHeight = renderBodyContainer.getViewportHeight();
-
- function heightHasChanged() {
- var newViewPortHeight = renderBodyContainer.getViewportHeight();
-
- if (newViewPortHeight !== viewportHeight) {
- viewportHeight = newViewPortHeight;
- return true;
- }
- return false;
- }
-
- function getEmptyBaseLayerCss(viewportHeight) {
- // Set ui-grid-empty-base-layer height
- return '.grid' + uiGridCtrl.grid.id +
- ' .ui-grid-render-container ' +
- '.ui-grid-empty-base-layer-container.ui-grid-canvas ' +
- '{ height: ' + viewportHeight + 'px; }';
- }
-
- uiGridCtrl.grid.registerStyleComputation({
- func: function() {
- if (heightHasChanged()) {
- uiGridBaseLayerService.setNumberOfEmptyRows(viewportHeight, uiGridCtrl.grid);
- }
- return getEmptyBaseLayerCss(viewportHeight);
- }
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.emptyBaseLayer.directive:uiGridViewport
- * @description stacks on the uiGridViewport directive to append the empty grid base layer html elements to the
- * default gridRow template
- */
- module.directive('uiGridViewport',
- ['$compile', 'gridUtil', '$templateCache',
- function ($compile, gridUtil, $templateCache) {
- return {
- priority: -200,
- scope: false,
- compile: function ($elm, $attrs) {
- var emptyBaseLayerContainer = $templateCache.get('ui-grid/emptyBaseLayerContainer');
- $elm.prepend(emptyBaseLayerContainer);
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.expandable
- * @description
- *
- * # ui.grid.expandable
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides the ability to create subgrids with the ability to expand a row
- * to show the subgrid.
- *
- * <div doc-module-components="ui.grid.expandable"></div>
- */
- var module = angular.module('ui.grid.expandable', ['ui.grid']);
-
- /**
- * @ngdoc service
- * @name ui.grid.expandable.service:uiGridExpandableService
- *
- * @description Services for the expandable grid
- */
- module.service('uiGridExpandableService', ['gridUtil', '$compile', function (gridUtil, $compile) {
- var service = {
- initializeGrid: function (grid) {
-
- grid.expandable = {};
- grid.expandable.expandedAll = false;
-
- /**
- * @ngdoc object
- * @name enableExpandable
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Whether or not to use expandable feature, allows you to turn off expandable on specific grids
- * within your application, or in specific modes on _this_ grid. Defaults to true.
- * @example
- * <pre>
- * $scope.gridOptions = {
- * enableExpandable: false
- * }
- * </pre>
- */
- grid.options.enableExpandable = grid.options.enableExpandable !== false;
-
- /**
- * @ngdoc object
- * @name expandableRowHeight
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Height in pixels of the expanded subgrid. Defaults to
- * 150
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowHeight: 150
- * }
- * </pre>
- */
- grid.options.expandableRowHeight = grid.options.expandableRowHeight || 150;
-
- /**
- * @ngdoc object
- * @name
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Width in pixels of the expandable column. Defaults to 40
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowHeaderWidth: 40
- * }
- * </pre>
- */
- grid.options.expandableRowHeaderWidth = grid.options.expandableRowHeaderWidth || 40;
-
- /**
- * @ngdoc object
- * @name expandableRowTemplate
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Mandatory. The template for your expanded row
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowTemplate: 'expandableRowTemplate.html'
- * }
- * </pre>
- */
- if ( grid.options.enableExpandable && !grid.options.expandableRowTemplate ){
- gridUtil.logError( 'You have not set the expandableRowTemplate, disabling expandable module' );
- grid.options.enableExpandable = false;
- }
-
- /**
- * @ngdoc object
- * @name ui.grid.expandable.api:PublicApi
- *
- * @description Public Api for expandable feature
- */
- /**
- * @ngdoc object
- * @name ui.grid.expandable.api:GridRow
- *
- * @description Additional properties added to GridRow when using the expandable module
- */
- /**
- * @ngdoc object
- * @name ui.grid.expandable.api:GridOptions
- *
- * @description Options for configuring the expandable feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- var publicApi = {
- events: {
- expandable: {
- /**
- * @ngdoc event
- * @name rowExpandedStateChanged
- * @eventOf ui.grid.expandable.api:PublicApi
- * @description raised when row expanded or collapsed
- * <pre>
- * gridApi.expandable.on.rowExpandedStateChanged(scope,function(row){})
- * </pre>
- * @param {GridRow} row the row that was expanded
- */
- rowExpandedBeforeStateChanged: function(scope,row){
- },
- rowExpandedStateChanged: function (scope, row) {
- }
- }
- },
-
- methods: {
- expandable: {
- /**
- * @ngdoc method
- * @name toggleRowExpansion
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Toggle a specific row
- * <pre>
- * gridApi.expandable.toggleRowExpansion(rowEntity);
- * </pre>
- * @param {object} rowEntity the data entity for the row you want to expand
- */
- toggleRowExpansion: function (rowEntity) {
- var row = grid.getRow(rowEntity);
- if (row !== null) {
- service.toggleRowExpansion(grid, row);
- }
- },
-
- /**
- * @ngdoc method
- * @name expandAllRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Expand all subgrids.
- * <pre>
- * gridApi.expandable.expandAllRows();
- * </pre>
- */
- expandAllRows: function() {
- service.expandAllRows(grid);
- },
-
- /**
- * @ngdoc method
- * @name collapseAllRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Collapse all subgrids.
- * <pre>
- * gridApi.expandable.collapseAllRows();
- * </pre>
- */
- collapseAllRows: function() {
- service.collapseAllRows(grid);
- },
-
- /**
- * @ngdoc method
- * @name toggleAllRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Toggle all subgrids.
- * <pre>
- * gridApi.expandable.toggleAllRows();
- * </pre>
- */
- toggleAllRows: function() {
- service.toggleAllRows(grid);
- },
- /**
- * @ngdoc function
- * @name expandRow
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Expand the data row
- * @param {object} rowEntity gridOptions.data[] array instance
- */
- expandRow: function (rowEntity) {
- var row = grid.getRow(rowEntity);
- if (row !== null && !row.isExpanded) {
- service.toggleRowExpansion(grid, row);
- }
- },
- /**
- * @ngdoc function
- * @name collapseRow
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Collapse the data row
- * @param {object} rowEntity gridOptions.data[] array instance
- */
- collapseRow: function (rowEntity) {
- var row = grid.getRow(rowEntity);
- if (row !== null && row.isExpanded) {
- service.toggleRowExpansion(grid, row);
- }
- },
- /**
- * @ngdoc function
- * @name getExpandedRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description returns all expandedRow's entity references
- */
- getExpandedRows: function () {
- return service.getExpandedRows(grid).map(function (gridRow) {
- return gridRow.entity;
- });
- }
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
- toggleRowExpansion: function (grid, row) {
- // trigger the "before change" event. Can change row height dynamically this way.
- grid.api.expandable.raise.rowExpandedBeforeStateChanged(row);
- /**
- * @ngdoc object
- * @name isExpanded
- * @propertyOf ui.grid.expandable.api:GridRow
- * @description Whether or not the row is currently expanded.
- * @example
- * <pre>
- * $scope.api.expandable.on.rowExpandedStateChanged($scope, function (row) {
- * if (row.isExpanded) {
- * //...
- * }
- * });
- * </pre>
- */
- row.isExpanded = !row.isExpanded;
- if (angular.isUndefined(row.expandedRowHeight)){
- row.expandedRowHeight = grid.options.expandableRowHeight;
- }
-
- if (row.isExpanded) {
- row.height = row.grid.options.rowHeight + row.expandedRowHeight;
- }
- else {
- row.height = row.grid.options.rowHeight;
- grid.expandable.expandedAll = false;
- }
- grid.api.expandable.raise.rowExpandedStateChanged(row);
- },
-
- expandAllRows: function(grid, $scope) {
- grid.renderContainers.body.visibleRowCache.forEach( function(row) {
- if (!row.isExpanded) {
- service.toggleRowExpansion(grid, row);
- }
- });
- grid.expandable.expandedAll = true;
- grid.queueGridRefresh();
- },
-
- collapseAllRows: function(grid) {
- grid.renderContainers.body.visibleRowCache.forEach( function(row) {
- if (row.isExpanded) {
- service.toggleRowExpansion(grid, row);
- }
- });
- grid.expandable.expandedAll = false;
- grid.queueGridRefresh();
- },
-
- toggleAllRows: function(grid) {
- if (grid.expandable.expandedAll) {
- service.collapseAllRows(grid);
- }
- else {
- service.expandAllRows(grid);
- }
- },
-
- getExpandedRows: function (grid) {
- return grid.rows.filter(function (row) {
- return row.isExpanded;
- });
- }
- };
- return service;
- }]);
-
- /**
- * @ngdoc object
- * @name enableExpandableRowHeader
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Show a rowHeader to provide the expandable buttons. If set to false then implies
- * you're going to use a custom method for expanding and collapsing the subgrids. Defaults to true.
- * @example
- * <pre>
- * $scope.gridOptions = {
- * enableExpandableRowHeader: false
- * }
- * </pre>
- */
- module.directive('uiGridExpandable', ['uiGridExpandableService', '$templateCache',
- function (uiGridExpandableService, $templateCache) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridExpandableService.initializeGrid(uiGridCtrl.grid);
-
- if (!uiGridCtrl.grid.options.enableExpandable) {
- return;
- }
-
- if (uiGridCtrl.grid.options.enableExpandableRowHeader !== false ) {
- var expandableRowHeaderColDef = {
- name: 'expandableButtons',
- displayName: '',
- exporterSuppressExport: true,
- enableColumnResizing: false,
- enableColumnMenu: false,
- width: uiGridCtrl.grid.options.expandableRowHeaderWidth || 40
- };
- expandableRowHeaderColDef.cellTemplate = $templateCache.get('ui-grid/expandableRowHeader');
- expandableRowHeaderColDef.headerCellTemplate = $templateCache.get('ui-grid/expandableTopRowHeader');
- uiGridCtrl.grid.addRowHeaderColumn(expandableRowHeaderColDef, -90);
- }
-
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGrid
- * @description stacks on the uiGrid directive to register child grid with parent row when child is created
- */
- module.directive('uiGrid', ['uiGridExpandableService', '$templateCache',
- function (uiGridExpandableService, $templateCache) {
- return {
- replace: true,
- priority: 599,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- uiGridCtrl.grid.api.core.on.renderingComplete($scope, function() {
- //if a parent grid row is on the scope, then add the parentRow property to this childGrid
- if ($scope.row && $scope.row.grid && $scope.row.grid.options && $scope.row.grid.options.enableExpandable) {
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.class:Grid
- * @description Additional Grid properties added by expandable module
- */
-
- /**
- * @ngdoc object
- * @name parentRow
- * @propertyOf ui.grid.expandable.class:Grid
- * @description reference to the expanded parent row that owns this grid
- */
- uiGridCtrl.grid.parentRow = $scope.row;
-
- //todo: adjust height on parent row when child grid height changes. we need some sort of gridHeightChanged event
- // uiGridCtrl.grid.core.on.canvasHeightChanged($scope, function(oldHeight, newHeight) {
- // uiGridCtrl.grid.parentRow = newHeight;
- // });
- }
-
- });
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGridExpandableRow
- * @description directive to render the expandable row template
- */
- module.directive('uiGridExpandableRow',
- ['uiGridExpandableService', '$timeout', '$compile', 'uiGridConstants','gridUtil','$interval', '$log',
- function (uiGridExpandableService, $timeout, $compile, uiGridConstants, gridUtil, $interval, $log) {
-
- return {
- replace: false,
- priority: 0,
- scope: false,
-
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- gridUtil.getTemplate($scope.grid.options.expandableRowTemplate).then(
- function (template) {
- if ($scope.grid.options.expandableRowScope) {
- /**
- * @ngdoc object
- * @name expandableRowScope
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Variables of object expandableScope will be available in the scope of the expanded subgrid
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowScope: expandableScope
- * }
- * </pre>
- */
- var expandableRowScope = $scope.grid.options.expandableRowScope;
- for (var property in expandableRowScope) {
- if (expandableRowScope.hasOwnProperty(property)) {
- $scope[property] = expandableRowScope[property];
- }
- }
- }
- var expandedRowElement = angular.element(template);
- $elm.append(expandedRowElement);
- expandedRowElement = $compile(expandedRowElement)($scope);
- $scope.row.expandedRendered = true;
- });
- },
-
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- $scope.$on('$destroy', function() {
- $scope.row.expandedRendered = false;
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGridRow
- * @description stacks on the uiGridRow directive to add support for expandable rows
- */
- module.directive('uiGridRow',
- ['$compile', 'gridUtil', '$templateCache',
- function ($compile, gridUtil, $templateCache) {
- return {
- priority: -200,
- scope: false,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- if (!$scope.grid.options.enableExpandable) {
- return;
- }
-
- $scope.expandableRow = {};
-
- $scope.expandableRow.shouldRenderExpand = function () {
- var ret = $scope.colContainer.name === 'body' && $scope.grid.options.enableExpandable !== false && $scope.row.isExpanded && (!$scope.grid.isScrollingVertically || $scope.row.expandedRendered);
- return ret;
- };
-
- $scope.expandableRow.shouldRenderFiller = function () {
- var ret = $scope.row.isExpanded && ( $scope.colContainer.name !== 'body' || ($scope.grid.isScrollingVertically && !$scope.row.expandedRendered));
- return ret;
- };
-
- /*
- * Commented out @PaulL1. This has no purpose that I can see, and causes #2964. If this code needs to be reinstated for some
- * reason it needs to use drawnWidth, not width, and needs to check column visibility. It should really use render container
- * visible column cache also instead of checking column.renderContainer.
- function updateRowContainerWidth() {
- var grid = $scope.grid;
- var colWidth = 0;
- grid.columns.forEach( function (column) {
- if (column.renderContainer === 'left') {
- colWidth += column.width;
- }
- });
- colWidth = Math.floor(colWidth);
- return '.grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.colContainer.name + ', .grid' + grid.id +
- ' .ui-grid-pinned-container-' + $scope.colContainer.name + ' .ui-grid-render-container-' + $scope.colContainer.name +
- ' .ui-grid-viewport .ui-grid-canvas .ui-grid-row { width: ' + colWidth + 'px; }';
- }
-
- if ($scope.colContainer.name === 'left') {
- $scope.grid.registerStyleComputation({
- priority: 15,
- func: updateRowContainerWidth
- });
- }*/
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGridViewport
- * @description stacks on the uiGridViewport directive to append the expandable row html elements to the
- * default gridRow template
- */
- module.directive('uiGridViewport',
- ['$compile', 'gridUtil', '$templateCache',
- function ($compile, gridUtil, $templateCache) {
- return {
- priority: -200,
- scope: false,
- compile: function ($elm, $attrs) {
-
- //todo: this adds ng-if watchers to each row even if the grid is not using expandable directive
- // or options.enableExpandable == false
- // The alternative is to compile the template and append to each row in a uiGridRow directive
-
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
- var expandedRowFillerElement = $templateCache.get('ui-grid/expandableScrollFiller');
- var expandedRowElement = $templateCache.get('ui-grid/expandableRow');
- rowRepeatDiv.append(expandedRowElement);
- rowRepeatDiv.append(expandedRowFillerElement);
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
-})();
-
-/* global console */
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.exporter
- * @description
- *
- * # ui.grid.exporter
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides the ability to export data from the grid.
- *
- * Data can be exported in a range of formats, and all data, visible
- * data, or selected rows can be exported, with all columns or visible
- * columns.
- *
- * No UI is provided, the caller should provide their own UI/buttons
- * as appropriate, or enable the gridMenu
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.exporter"></div>
- */
-
- var module = angular.module('ui.grid.exporter', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.exporter.constant:uiGridExporterConstants
- *
- * @description constants available in exporter module
- */
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.constant:uiGridExporterConstants
- * @name ALL
- * @description export all data, including data not visible. Can
- * be set for either rowTypes or colTypes
- */
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.constant:uiGridExporterConstants
- * @name VISIBLE
- * @description export only visible data, including data not visible. Can
- * be set for either rowTypes or colTypes
- */
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.constant:uiGridExporterConstants
- * @name SELECTED
- * @description export all data, including data not visible. Can
- * be set only for rowTypes, selection of only some columns is
- * not supported
- */
- module.constant('uiGridExporterConstants', {
- featureName: 'exporter',
- ALL: 'all',
- VISIBLE: 'visible',
- SELECTED: 'selected',
- CSV_CONTENT: 'CSV_CONTENT',
- BUTTON_LABEL: 'BUTTON_LABEL',
- FILE_NAME: 'FILE_NAME'
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.exporter.service:uiGridExporterService
- *
- * @description Services for exporter feature
- */
- module.service('uiGridExporterService', ['$q', 'uiGridExporterConstants', 'gridUtil', '$compile', '$interval', 'i18nService',
- function ($q, uiGridExporterConstants, gridUtil, $compile, $interval, i18nService) {
-
- var service = {
-
- delay: 100,
-
- initializeGrid: function (grid) {
-
- //add feature namespace and any properties to grid for needed state
- grid.exporter = {};
- this.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:PublicApi
- *
- * @description Public Api for exporter feature
- */
- var publicApi = {
- events: {
- exporter: {
- }
- },
- methods: {
- exporter: {
- /**
- * @ngdoc function
- * @name csvExport
- * @methodOf ui.grid.exporter.api:PublicApi
- * @description Exports rows from the grid in csv format,
- * the data exported is selected based on the provided options
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE
- */
- csvExport: function (rowTypes, colTypes) {
- service.csvExport(grid, rowTypes, colTypes);
- },
- /**
- * @ngdoc function
- * @name pdfExport
- * @methodOf ui.grid.exporter.api:PublicApi
- * @description Exports rows from the grid in pdf format,
- * the data exported is selected based on the provided options
- * Note that this function has a dependency on pdfMake, all
- * going well this has been installed for you.
- * The resulting pdf opens in a new browser window.
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE
- */
- pdfExport: function (rowTypes, colTypes) {
- service.pdfExport(grid, rowTypes, colTypes);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- if (grid.api.core.addToGridMenu){
- service.addToMenu( grid );
- } else {
- // order of registration is not guaranteed, register in a little while
- $interval( function() {
- if (grid.api.core.addToGridMenu){
- service.addToMenu( grid );
- }
- }, this.delay, 1);
- }
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:GridOptions
- *
- * @description GridOptions for exporter feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:ColumnDef
- * @description ColumnDef settings for exporter
- */
- /**
- * @ngdoc object
- * @name exporterSuppressMenu
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Don't show the export menu button, implying the user
- * will roll their own UI for calling the exporter
- * <br/>Defaults to false
- */
- gridOptions.exporterSuppressMenu = gridOptions.exporterSuppressMenu === true;
- /**
- * @ngdoc object
- * @name exporterMenuLabel
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The text to show on the exporter menu button
- * link
- * <br/>Defaults to 'Export'
- */
- gridOptions.exporterMenuLabel = gridOptions.exporterMenuLabel ? gridOptions.exporterMenuLabel : 'Export';
- /**
- * @ngdoc object
- * @name exporterSuppressColumns
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Columns that should not be exported. The selectionRowHeader is already automatically
- * suppressed, but if you had a button column or some other "system" column that shouldn't be shown in the
- * output then add it in this list. You should provide an array of column names.
- * <br/>Defaults to: []
- * <pre>
- * gridOptions.exporterSuppressColumns = [ 'buttons' ];
- * </pre>
- */
- gridOptions.exporterSuppressColumns = gridOptions.exporterSuppressColumns ? gridOptions.exporterSuppressColumns : [];
- /**
- * @ngdoc object
- * @name exporterCsvColumnSeparator
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The character to use as column separator
- * link
- * <br/>Defaults to ','
- */
- gridOptions.exporterCsvColumnSeparator = gridOptions.exporterCsvColumnSeparator ? gridOptions.exporterCsvColumnSeparator : ',';
- /**
- * @ngdoc object
- * @name exporterCsvFilename
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The default filename to use when saving the downloaded csv.
- * This will only work in some browsers.
- * <br/>Defaults to 'download.csv'
- */
- gridOptions.exporterCsvFilename = gridOptions.exporterCsvFilename ? gridOptions.exporterCsvFilename : 'download.csv';
- /**
- * @ngdoc object
- * @name exporterPdfFilename
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The default filename to use when saving the downloaded pdf, only used in IE (other browsers open pdfs in a new window)
- * <br/>Defaults to 'download.pdf'
- */
- gridOptions.exporterPdfFilename = gridOptions.exporterPdfFilename ? gridOptions.exporterPdfFilename : 'download.pdf';
- /**
- * @ngdoc object
- * @name exporterOlderExcelCompatibility
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Some versions of excel don't like the utf-16 BOM on the front, and it comes
- * through as  in the first column header. Setting this option to false will suppress this, at the
- * expense of proper utf-16 handling in applications that do recognise the BOM
- * <br/>Defaults to false
- */
- gridOptions.exporterOlderExcelCompatibility = gridOptions.exporterOlderExcelCompatibility === true;
- /**
- * @ngdoc object
- * @name exporterIsExcelCompatible
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Separator header, used to set a custom column separator in a csv file, only works on MS Excel.
- * Used it on other programs will make csv content display unproperly. Setting this option to false won't add this header.
- * <br/>Defaults to false
- */
- gridOptions.exporterIsExcelCompatible = gridOptions.exporterIsExcelCompatible === true;
- /**
- * @ngdoc object
- * @name exporterMenuItemOrder
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description An option to determine the starting point for the menu items created by the exporter
- * <br/>Defaults to 200
- */
- gridOptions.exporterMenuItemOrder = gridOptions.exporterMenuItemOrder ? gridOptions.exporterMenuItemOrder : 200;
- /**
- * @ngdoc object
- * @name exporterPdfDefaultStyle
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The default style in pdfMake format
- * <br/>Defaults to:
- * <pre>
- * {
- * fontSize: 11
- * }
- * </pre>
- */
- gridOptions.exporterPdfDefaultStyle = gridOptions.exporterPdfDefaultStyle ? gridOptions.exporterPdfDefaultStyle : { fontSize: 11 };
- /**
- * @ngdoc object
- * @name exporterPdfTableStyle
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The table style in pdfMake format
- * <br/>Defaults to:
- * <pre>
- * {
- * margin: [0, 5, 0, 15]
- * }
- * </pre>
- */
- gridOptions.exporterPdfTableStyle = gridOptions.exporterPdfTableStyle ? gridOptions.exporterPdfTableStyle : { margin: [0, 5, 0, 15] };
- /**
- * @ngdoc object
- * @name exporterPdfTableHeaderStyle
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The tableHeader style in pdfMake format
- * <br/>Defaults to:
- * <pre>
- * {
- * bold: true,
- * fontSize: 12,
- * color: 'black'
- * }
- * </pre>
- */
- gridOptions.exporterPdfTableHeaderStyle = gridOptions.exporterPdfTableHeaderStyle ? gridOptions.exporterPdfTableHeaderStyle : { bold: true, fontSize: 12, color: 'black' };
- /**
- * @ngdoc object
- * @name exporterPdfHeader
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The header section for pdf exports. Can be
- * simple text:
- * <pre>
- * gridOptions.exporterPdfHeader = 'My Header';
- * </pre>
- * Can be a more complex object in pdfMake format:
- * <pre>
- * gridOptions.exporterPdfHeader = {
- * columns: [
- * 'Left part',
- * { text: 'Right part', alignment: 'right' }
- * ]
- * };
- * </pre>
- * Or can be a function, allowing page numbers and the like
- * <pre>
- * gridOptions.exporterPdfHeader: function(currentPage, pageCount) { return currentPage.toString() + ' of ' + pageCount; };
- * </pre>
- */
- gridOptions.exporterPdfHeader = gridOptions.exporterPdfHeader ? gridOptions.exporterPdfHeader : null;
- /**
- * @ngdoc object
- * @name exporterPdfFooter
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The header section for pdf exports. Can be
- * simple text:
- * <pre>
- * gridOptions.exporterPdfFooter = 'My Footer';
- * </pre>
- * Can be a more complex object in pdfMake format:
- * <pre>
- * gridOptions.exporterPdfFooter = {
- * columns: [
- * 'Left part',
- * { text: 'Right part', alignment: 'right' }
- * ]
- * };
- * </pre>
- * Or can be a function, allowing page numbers and the like
- * <pre>
- * gridOptions.exporterPdfFooter: function(currentPage, pageCount) { return currentPage.toString() + ' of ' + pageCount; };
- * </pre>
- */
- gridOptions.exporterPdfFooter = gridOptions.exporterPdfFooter ? gridOptions.exporterPdfFooter : null;
- /**
- * @ngdoc object
- * @name exporterPdfOrientation
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The orientation, should be a valid pdfMake value,
- * 'landscape' or 'portrait'
- * <br/>Defaults to landscape
- */
- gridOptions.exporterPdfOrientation = gridOptions.exporterPdfOrientation ? gridOptions.exporterPdfOrientation : 'landscape';
- /**
- * @ngdoc object
- * @name exporterPdfPageSize
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The orientation, should be a valid pdfMake
- * paper size, usually 'A4' or 'LETTER'
- * {@link https://github.com/bpampuch/pdfmake/blob/master/src/standardPageSizes.js pdfMake page sizes}
- * <br/>Defaults to A4
- */
- gridOptions.exporterPdfPageSize = gridOptions.exporterPdfPageSize ? gridOptions.exporterPdfPageSize : 'A4';
- /**
- * @ngdoc object
- * @name exporterPdfMaxGridWidth
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The maxium grid width - the current grid width
- * will be scaled to match this, with any fixed width columns
- * being adjusted accordingly.
- * <br/>Defaults to 720 (for A4 landscape), use 670 for LETTER
- */
- gridOptions.exporterPdfMaxGridWidth = gridOptions.exporterPdfMaxGridWidth ? gridOptions.exporterPdfMaxGridWidth : 720;
- /**
- * @ngdoc object
- * @name exporterPdfTableLayout
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A tableLayout in pdfMake format,
- * controls gridlines and the like. We use the default
- * layout usually.
- * <br/>Defaults to null, which means no layout
- */
-
- /**
- * @ngdoc object
- * @name exporterMenuAllData
- * @porpertyOf ui.grid.exporter.api:GridOptions
- * @description Add export all data as cvs/pdf menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuAllData = gridOptions.exporterMenuAllData !== undefined ? gridOptions.exporterMenuAllData : true;
-
- /**
- * @ngdoc object
- * @name exporterMenuVisibleData
- * @porpertyOf ui.grid.exporter.api:GridOptions
- * @description Add export visible data as cvs/pdf menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuVisibleData = gridOptions.exporterMenuVisibleData !== undefined ? gridOptions.exporterMenuVisibleData : true;
-
- /**
- * @ngdoc object
- * @name exporterMenuSelectedData
- * @porpertyOf ui.grid.exporter.api:GridOptions
- * @description Add export selected data as cvs/pdf menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuSelectedData = gridOptions.exporterMenuSelectedData !== undefined ? gridOptions.exporterMenuSelectedData : true;
-
- /**
- * @ngdoc object
- * @name exporterMenuCsv
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Add csv export menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuCsv = gridOptions.exporterMenuCsv !== undefined ? gridOptions.exporterMenuCsv : true;
-
- /**
- * @ngdoc object
- * @name exporterMenuPdf
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Add pdf export menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuPdf = gridOptions.exporterMenuPdf !== undefined ? gridOptions.exporterMenuPdf : true;
-
- /**
- * @ngdoc object
- * @name exporterPdfCustomFormatter
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A custom callback routine that changes the pdf document, adding any
- * custom styling or content that is supported by pdfMake. Takes in the complete docDefinition, and
- * must return an updated docDefinition ready for pdfMake.
- * @example
- * In this example we add a style to the style array, so that we can use it in our
- * footer definition.
- * <pre>
- * gridOptions.exporterPdfCustomFormatter = function ( docDefinition ) {
- * docDefinition.styles.footerStyle = { bold: true, fontSize: 10 };
- * return docDefinition;
- * }
- *
- * gridOptions.exporterPdfFooter = { text: 'My footer', style: 'footerStyle' }
- * </pre>
- */
- gridOptions.exporterPdfCustomFormatter = ( gridOptions.exporterPdfCustomFormatter && typeof( gridOptions.exporterPdfCustomFormatter ) === 'function' ) ? gridOptions.exporterPdfCustomFormatter : function ( docDef ) { return docDef; };
-
- /**
- * @ngdoc object
- * @name exporterHeaderFilterUseName
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Defaults to false, which leads to `displayName` being passed into the headerFilter.
- * If set to true, then will pass `name` instead.
- *
- *
- * @example
- * <pre>
- * gridOptions.exporterHeaderFilterUseName = true;
- * </pre>
- */
- gridOptions.exporterHeaderFilterUseName = gridOptions.exporterHeaderFilterUseName === true;
-
- /**
- * @ngdoc object
- * @name exporterHeaderFilter
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A function to apply to the header displayNames before exporting. Useful for internationalisation,
- * for example if you were using angular-translate you'd set this to `$translate.instant`. Note that this
- * call must be synchronous, it cannot be a call that returns a promise.
- *
- * Behaviour can be changed to pass in `name` instead of `displayName` through use of `exporterHeaderFilterUseName: true`.
- *
- * @example
- * <pre>
- * gridOptions.exporterHeaderFilter = function( displayName ){ return 'col: ' + name; };
- * </pre>
- * OR
- * <pre>
- * gridOptions.exporterHeaderFilter = $translate.instant;
- * </pre>
- */
-
- /**
- * @ngdoc function
- * @name exporterFieldCallback
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A function to call for each field before exporting it. Allows
- * massaging of raw data into a display format, for example if you have applied
- * filters to convert codes into decodes, or you require
- * a specific date format in the exported content.
- *
- * The method is called once for each field exported, and provides the grid, the
- * gridCol and the GridRow for you to use as context in massaging the data.
- *
- * @param {Grid} grid provides the grid in case you have need of it
- * @param {GridRow} row the row from which the data comes
- * @param {GridCol} col the column from which the data comes
- * @param {object} value the value for your massaging
- * @returns {object} you must return the massaged value ready for exporting
- *
- * @example
- * <pre>
- * gridOptions.exporterFieldCallback = function ( grid, row, col, value ){
- * if ( col.name === 'status' ){
- * value = decodeStatus( value );
- * }
- * return value;
- * }
- * </pre>
- */
- gridOptions.exporterFieldCallback = gridOptions.exporterFieldCallback ? gridOptions.exporterFieldCallback : function( grid, row, col, value ) { return value; };
-
- /**
- * @ngdoc function
- * @name exporterAllDataFn
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description This promise is needed when exporting all rows,
- * and the data need to be provided by server side. Default is null.
- * @returns {Promise} a promise to load all data from server
- *
- * @example
- * <pre>
- * gridOptions.exporterAllDataFn = function () {
- * return $http.get('/data/100.json')
- * }
- * </pre>
- */
- gridOptions.exporterAllDataFn = gridOptions.exporterAllDataFn ? gridOptions.exporterAllDataFn : null;
-
- /**
- * @ngdoc function
- * @name exporterAllDataPromise
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description DEPRECATED - exporterAllDataFn used to be
- * called this, but it wasn't a promise, it was a function that returned
- * a promise. Deprecated, but supported for backward compatibility, use
- * exporterAllDataFn instead.
- * @returns {Promise} a promise to load all data from server
- *
- * @example
- * <pre>
- * gridOptions.exporterAllDataFn = function () {
- * return $http.get('/data/100.json')
- * }
- * </pre>
- */
- if ( gridOptions.exporterAllDataFn == null && gridOptions.exporterAllDataPromise ) {
- gridOptions.exporterAllDataFn = gridOptions.exporterAllDataPromise;
- }
- },
-
-
- /**
- * @ngdoc function
- * @name addToMenu
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Adds export items to the grid menu,
- * allowing the user to select export options
- * @param {Grid} grid the grid from which data should be exported
- */
- addToMenu: function ( grid ) {
- grid.api.core.addToGridMenu( grid, [
- {
- title: i18nService.getSafeText('gridMenu.exporterAllAsCsv'),
- action: function ($event) {
- this.grid.api.exporter.csvExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
- },
- shown: function() {
- return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuAllData;
- },
- order: grid.options.exporterMenuItemOrder
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterVisibleAsCsv'),
- action: function ($event) {
- this.grid.api.exporter.csvExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuVisibleData;
- },
- order: grid.options.exporterMenuItemOrder + 1
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterSelectedAsCsv'),
- action: function ($event) {
- this.grid.api.exporter.csvExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuSelectedData &&
- ( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
- },
- order: grid.options.exporterMenuItemOrder + 2
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterAllAsPdf'),
- action: function ($event) {
- this.grid.api.exporter.pdfExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
- },
- shown: function() {
- return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuAllData;
- },
- order: grid.options.exporterMenuItemOrder + 3
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterVisibleAsPdf'),
- action: function ($event) {
- this.grid.api.exporter.pdfExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuVisibleData;
- },
- order: grid.options.exporterMenuItemOrder + 4
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterSelectedAsPdf'),
- action: function ($event) {
- this.grid.api.exporter.pdfExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuSelectedData &&
- ( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
- },
- order: grid.options.exporterMenuItemOrder + 5
- }
- ]);
- },
-
-
- /**
- * @ngdoc function
- * @name csvExport
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Exports rows from the grid in csv format,
- * the data exported is selected based on the provided options
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- csvExport: function (grid, rowTypes, colTypes) {
- var self = this;
- this.loadAllDataIfNeeded(grid, rowTypes, colTypes).then(function() {
- var exportColumnHeaders = grid.options.showHeader ? self.getColumnHeaders(grid, colTypes) : [];
- var exportData = self.getData(grid, rowTypes, colTypes);
- var csvContent = self.formatAsCsv(exportColumnHeaders, exportData, grid.options.exporterCsvColumnSeparator);
-
- self.downloadFile (grid.options.exporterCsvFilename, csvContent, grid.options.exporterCsvColumnSeparator, grid.options.exporterOlderExcelCompatibility, grid.options.exporterIsExcelCompatible);
- });
- },
-
- /**
- * @ngdoc function
- * @name loadAllDataIfNeeded
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description When using server side pagination, use exporterAllDataFn to
- * load all data before continuing processing.
- * When using client side pagination, return a resolved promise so processing
- * continues immediately
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- loadAllDataIfNeeded: function (grid, rowTypes, colTypes) {
- if ( rowTypes === uiGridExporterConstants.ALL && grid.rows.length !== grid.options.totalItems && grid.options.exporterAllDataFn) {
- return grid.options.exporterAllDataFn()
- .then(function() {
- grid.modifyRows(grid.options.data);
- });
- } else {
- var deferred = $q.defer();
- deferred.resolve();
- return deferred.promise;
- }
- },
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.api:ColumnDef
- * @name exporterSuppressExport
- * @description Suppresses export for this column. Used by selection and expandable.
- */
-
- /**
- * @ngdoc function
- * @name getColumnHeaders
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Gets the column headers from the grid to use
- * as a title row for the exported file, all headers have
- * headerCellFilters applied as appropriate.
- *
- * Column headers are an array of objects, each object has
- * name, displayName, width and align attributes. Only name is
- * used for csv, all attributes are used for pdf.
- *
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- getColumnHeaders: function (grid, colTypes) {
- var headers = [];
- var columns;
-
- if ( colTypes === uiGridExporterConstants.ALL ){
- columns = grid.columns;
- } else {
- var leftColumns = grid.renderContainers.left ? grid.renderContainers.left.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var bodyColumns = grid.renderContainers.body ? grid.renderContainers.body.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var rightColumns = grid.renderContainers.right ? grid.renderContainers.right.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
-
- columns = leftColumns.concat(bodyColumns,rightColumns);
- }
-
- columns.forEach( function( gridCol, index ) {
- if ( gridCol.colDef.exporterSuppressExport !== true &&
- grid.options.exporterSuppressColumns.indexOf( gridCol.name ) === -1 ){
- headers.push({
- name: gridCol.field,
- displayName: grid.options.exporterHeaderFilter ? ( grid.options.exporterHeaderFilterUseName ? grid.options.exporterHeaderFilter(gridCol.name) : grid.options.exporterHeaderFilter(gridCol.displayName) ) : gridCol.displayName,
- width: gridCol.drawnWidth ? gridCol.drawnWidth : gridCol.width,
- align: gridCol.colDef.type === 'number' ? 'right' : 'left'
- });
- }
- });
-
- return headers;
- },
-
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.api:ColumnDef
- * @name exporterPdfAlign
- * @description the alignment you'd like for this specific column when
- * exported into a pdf. Can be 'left', 'right', 'center' or any other
- * valid pdfMake alignment option.
- */
-
-
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:GridRow
- * @description GridRow settings for exporter
- */
- /**
- * @ngdoc object
- * @name exporterEnableExporting
- * @propertyOf ui.grid.exporter.api:GridRow
- * @description If set to false, then don't export this row, notwithstanding visible or
- * other settings
- * <br/>Defaults to true
- */
-
- /**
- * @ngdoc function
- * @name getData
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Gets data from the grid based on the provided options,
- * all cells have cellFilters applied as appropriate. Any rows marked
- * `exporterEnableExporting: false` will not be exported
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {boolean} applyCellFilters whether or not to get the display value or the raw value of the data
- */
- getData: function (grid, rowTypes, colTypes, applyCellFilters) {
- var data = [];
- var rows;
- var columns;
-
- switch ( rowTypes ) {
- case uiGridExporterConstants.ALL:
- rows = grid.rows;
- break;
- case uiGridExporterConstants.VISIBLE:
- rows = grid.getVisibleRows();
- break;
- case uiGridExporterConstants.SELECTED:
- if ( grid.api.selection ){
- rows = grid.api.selection.getSelectedGridRows();
- } else {
- gridUtil.logError('selection feature must be enabled to allow selected rows to be exported');
- }
- break;
- }
-
- if ( colTypes === uiGridExporterConstants.ALL ){
- columns = grid.columns;
- } else {
- var leftColumns = grid.renderContainers.left ? grid.renderContainers.left.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var bodyColumns = grid.renderContainers.body ? grid.renderContainers.body.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var rightColumns = grid.renderContainers.right ? grid.renderContainers.right.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
-
- columns = leftColumns.concat(bodyColumns,rightColumns);
- }
-
- rows.forEach( function( row, index ) {
-
- if (row.exporterEnableExporting !== false) {
- var extractedRow = [];
-
-
- columns.forEach( function( gridCol, index ) {
- if ( (gridCol.visible || colTypes === uiGridExporterConstants.ALL ) &&
- gridCol.colDef.exporterSuppressExport !== true &&
- grid.options.exporterSuppressColumns.indexOf( gridCol.name ) === -1 ){
- var cellValue = applyCellFilters ? grid.getCellDisplayValue( row, gridCol ) : grid.getCellValue( row, gridCol );
- var extractedField = { value: grid.options.exporterFieldCallback( grid, row, gridCol, cellValue ) };
- if ( gridCol.colDef.exporterPdfAlign ) {
- extractedField.alignment = gridCol.colDef.exporterPdfAlign;
- }
- extractedRow.push(extractedField);
- }
- });
-
- data.push(extractedRow);
- }
- });
-
- return data;
- },
-
-
- /**
- * @ngdoc function
- * @name formatAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Formats the column headers and data as a CSV,
- * and sends that data to the user
- * @param {array} exportColumnHeaders an array of column headers,
- * where each header is an object with name, width and maybe alignment
- * @param {array} exportData an array of rows, where each row is
- * an array of column data
- * @param {string} separator a string that represents the separator to be used in the csv file
- * @returns {string} csv the formatted csv as a string
- */
- formatAsCsv: function (exportColumnHeaders, exportData, separator) {
- var self = this;
-
- var bareHeaders = exportColumnHeaders.map(function(header){return { value: header.displayName };});
-
- var csv = bareHeaders.length > 0 ? (self.formatRowAsCsv(this, separator)(bareHeaders) + '\n') : '';
-
- csv += exportData.map(this.formatRowAsCsv(this, separator)).join('\n');
-
- return csv;
- },
-
- /**
- * @ngdoc function
- * @name formatRowAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a single field as a csv field, including
- * quotes around the value
- * @param {exporterService} exporter pass in exporter
- * @param {array} row the row to be turned into a csv string
- * @returns {string} a csv-ified version of the row
- */
- formatRowAsCsv: function (exporter, separator) {
- return function (row) {
- return row.map(exporter.formatFieldAsCsv).join(separator);
- };
- },
-
- /**
- * @ngdoc function
- * @name formatFieldAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a single field as a csv field, including
- * quotes around the value
- * @param {field} field the field to be turned into a csv string,
- * may be of any type
- * @returns {string} a csv-ified version of the field
- */
- formatFieldAsCsv: function (field) {
- if (field.value == null) { // we want to catch anything null-ish, hence just == not ===
- return '';
- }
- if (typeof(field.value) === 'number') {
- return field.value;
- }
- if (typeof(field.value) === 'boolean') {
- return (field.value ? 'TRUE' : 'FALSE') ;
- }
- if (typeof(field.value) === 'string') {
- return '"' + field.value.replace(/"/g,'""') + '"';
- }
-
- return JSON.stringify(field.value);
- },
-
-
- /**
- * @ngdoc function
- * @name isIE
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Checks whether current browser is IE and returns it's version if it is
- */
- isIE: function () {
- var match = navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/);
- var isIE = false;
-
- if (match !== -1) {
- isIE = true;
- }
-
- return isIE;
- },
-
-
- /**
- * @ngdoc function
- * @name downloadFile
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Triggers download of a csv file. Logic provided
- * by @cssensei (from his colleagues at https://github.com/ifeelgoods) in issue #2391
- * @param {string} fileName the filename we'd like our file to be
- * given
- * @param {string} csvContent the csv content that we'd like to
- * download as a file
- * @param {boolean} exporterOlderExcelCompatibility whether or not we put a utf-16 BOM on the from (\uFEFF)
- * @param {boolean} exporterIsExcelCompatible whether or not we add separator header ('sep=X')
- */
- downloadFile: function (fileName, csvContent, columnSeparator, exporterOlderExcelCompatibility, exporterIsExcelCompatible) {
- var D = document;
- var a = D.createElement('a');
- var strMimeType = 'application/octet-stream;charset=utf-8';
- var rawFile;
- var ieVersion = this.isIE();
-
- if (exporterIsExcelCompatible) {
- csvContent = 'sep=' + columnSeparator + '\r\n' + csvContent;
- }
-
- // IE10+
- if (navigator.msSaveBlob) {
- return navigator.msSaveOrOpenBlob(
- new Blob(
- [exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent],
- { type: strMimeType } ),
- fileName
- );
- }
-
- if (ieVersion) {
- var frame = D.createElement('iframe');
- document.body.appendChild(frame);
-
- frame.contentWindow.document.open('text/html', 'replace');
- frame.contentWindow.document.write(csvContent);
- frame.contentWindow.document.close();
- frame.contentWindow.focus();
- frame.contentWindow.document.execCommand('SaveAs', true, fileName);
-
- document.body.removeChild(frame);
- return true;
- }
-
- //html5 A[download]
- if ('download' in a) {
- var blob = new Blob(
- [exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent],
- { type: strMimeType }
- );
- rawFile = URL.createObjectURL(blob);
- a.setAttribute('download', fileName);
- } else {
- rawFile = 'data:' + strMimeType + ',' + encodeURIComponent(csvContent);
- a.setAttribute('target', '_blank');
- }
-
- a.href = rawFile;
- a.setAttribute('style', 'display:none;');
- D.body.appendChild(a);
- setTimeout(function() {
- if (a.click) {
- a.click();
- // Workaround for Safari 5
- } else if (document.createEvent) {
- var eventObj = document.createEvent('MouseEvents');
- eventObj.initEvent('click', true, true);
- a.dispatchEvent(eventObj);
- }
- D.body.removeChild(a);
-
- }, this.delay);
- },
-
- /**
- * @ngdoc function
- * @name pdfExport
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Exports rows from the grid in pdf format,
- * the data exported is selected based on the provided options.
- * Note that this function has a dependency on pdfMake, which must
- * be installed. The resulting pdf opens in a new
- * browser window.
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- pdfExport: function (grid, rowTypes, colTypes) {
- var self = this;
- this.loadAllDataIfNeeded(grid, rowTypes, colTypes).then(function () {
- var exportColumnHeaders = self.getColumnHeaders(grid, colTypes);
- var exportData = self.getData(grid, rowTypes, colTypes);
- var docDefinition = self.prepareAsPdf(grid, exportColumnHeaders, exportData);
-
- if (self.isIE() || navigator.appVersion.indexOf("Edge") !== -1) {
- self.downloadPDF(grid.options.exporterPdfFilename, docDefinition);
- } else {
- pdfMake.createPdf(docDefinition).open();
- }
- });
- },
-
-
- /**
- * @ngdoc function
- * @name downloadPdf
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Generates and retrieves the pdf as a blob, then downloads
- * it as a file. Only used in IE, in all other browsers we use the native
- * pdfMake.open function to just open the PDF
- * @param {string} fileName the filename to give to the pdf, can be set
- * through exporterPdfFilename
- * @param {object} docDefinition a pdf docDefinition that we can generate
- * and get a blob from
- */
- downloadPDF: function (fileName, docDefinition) {
- var D = document;
- var a = D.createElement('a');
- var strMimeType = 'application/octet-stream;charset=utf-8';
- var rawFile;
- var ieVersion;
-
- ieVersion = this.isIE(); // This is now a boolean value
- var doc = pdfMake.createPdf(docDefinition);
- var blob;
-
- doc.getBuffer( function (buffer) {
- blob = new Blob([buffer]);
-
- // IE10+
- if (navigator.msSaveBlob) {
- return navigator.msSaveBlob(
- blob, fileName
- );
- }
-
- // Previously: && ieVersion < 10
- // ieVersion now returns a boolean for the
- // sake of sanity. We just check `msSaveBlob` first.
- if (ieVersion) {
- var frame = D.createElement('iframe');
- document.body.appendChild(frame);
-
- frame.contentWindow.document.open("text/html", "replace");
- frame.contentWindow.document.write(blob);
- frame.contentWindow.document.close();
- frame.contentWindow.focus();
- frame.contentWindow.document.execCommand('SaveAs', true, fileName);
-
- document.body.removeChild(frame);
- return true;
- }
- });
- },
-
-
- /**
- * @ngdoc function
- * @name renderAsPdf
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders the data into a pdf, and opens that pdf.
- *
- * @param {Grid} grid the grid from which data should be exported
- * @param {array} exportColumnHeaders an array of column headers,
- * where each header is an object with name, width and maybe alignment
- * @param {array} exportData an array of rows, where each row is
- * an array of column data
- * @returns {object} a pdfMake format document definition, ready
- * for generation
- */
- prepareAsPdf: function(grid, exportColumnHeaders, exportData) {
- var headerWidths = this.calculatePdfHeaderWidths( grid, exportColumnHeaders );
-
- var headerColumns = exportColumnHeaders.map( function( header ) {
- return { text: header.displayName, style: 'tableHeader' };
- });
-
- var stringData = exportData.map(this.formatRowAsPdf(this));
-
- var allData = [headerColumns].concat(stringData);
-
- var docDefinition = {
- pageOrientation: grid.options.exporterPdfOrientation,
- pageSize: grid.options.exporterPdfPageSize,
- content: [{
- style: 'tableStyle',
- table: {
- headerRows: 1,
- widths: headerWidths,
- body: allData
- }
- }],
- styles: {
- tableStyle: grid.options.exporterPdfTableStyle,
- tableHeader: grid.options.exporterPdfTableHeaderStyle
- },
- defaultStyle: grid.options.exporterPdfDefaultStyle
- };
-
- if ( grid.options.exporterPdfLayout ){
- docDefinition.layout = grid.options.exporterPdfLayout;
- }
-
- if ( grid.options.exporterPdfHeader ){
- docDefinition.header = grid.options.exporterPdfHeader;
- }
-
- if ( grid.options.exporterPdfFooter ){
- docDefinition.footer = grid.options.exporterPdfFooter;
- }
-
- if ( grid.options.exporterPdfCustomFormatter ){
- docDefinition = grid.options.exporterPdfCustomFormatter( docDefinition );
- }
- return docDefinition;
-
- },
-
-
- /**
- * @ngdoc function
- * @name calculatePdfHeaderWidths
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Determines the column widths base on the
- * widths we got from the grid. If the column is drawn
- * then we have a drawnWidth. If the column is not visible
- * then we have '*', 'x%' or a width. When columns are
- * not visible they don't contribute to the overall gridWidth,
- * so we need to adjust to allow for extra columns
- *
- * Our basic heuristic is to take the current gridWidth, plus
- * numeric columns and call this the base gridwidth.
- *
- * To that we add 100 for any '*' column, and x% of the base gridWidth
- * for any column that is a %
- *
- * @param {Grid} grid the grid from which data should be exported
- * @param {array} exportHeaders array of header information
- * @returns {object} an array of header widths
- */
- calculatePdfHeaderWidths: function ( grid, exportHeaders ) {
- var baseGridWidth = 0;
- exportHeaders.forEach( function(value){
- if (typeof(value.width) === 'number'){
- baseGridWidth += value.width;
- }
- });
-
- var extraColumns = 0;
- exportHeaders.forEach( function(value){
- if (value.width === '*'){
- extraColumns += 100;
- }
- if (typeof(value.width) === 'string' && value.width.match(/(\d)*%/)) {
- var percent = parseInt(value.width.match(/(\d)*%/)[0]);
-
- value.width = baseGridWidth * percent / 100;
- extraColumns += value.width;
- }
- });
-
- var gridWidth = baseGridWidth + extraColumns;
-
- return exportHeaders.map(function( header ) {
- return header.width === '*' ? header.width : header.width * grid.options.exporterPdfMaxGridWidth / gridWidth;
- });
-
- },
-
- /**
- * @ngdoc function
- * @name formatRowAsPdf
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a row in a format consumable by PDF,
- * mainly meaning casting everything to a string
- * @param {exporterService} exporter pass in exporter
- * @param {array} row the row to be turned into a csv string
- * @returns {string} a csv-ified version of the row
- */
- formatRowAsPdf: function ( exporter ) {
- return function( row ) {
- return row.map(exporter.formatFieldAsPdfString);
- };
- },
-
-
- /**
- * @ngdoc function
- * @name formatFieldAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a single field as a pdf-able field, which
- * is different from a csv field only in that strings don't have quotes
- * around them
- * @param {field} field the field to be turned into a pdf string,
- * may be of any type
- * @returns {string} a string-ified version of the field
- */
- formatFieldAsPdfString: function (field) {
- var returnVal;
- if (field.value == null) { // we want to catch anything null-ish, hence just == not ===
- returnVal = '';
- } else if (typeof(field.value) === 'number') {
- returnVal = field.value.toString();
- } else if (typeof(field.value) === 'boolean') {
- returnVal = (field.value ? 'TRUE' : 'FALSE') ;
- } else if (typeof(field.value) === 'string') {
- returnVal = field.value.replace(/"/g,'""');
- } else {
- returnVal = JSON.stringify(field.value).replace(/^"/,'').replace(/"$/,'');
- }
-
- if (field.alignment && typeof(field.alignment) === 'string' ){
- returnVal = { text: returnVal, alignment: field.alignment };
- }
-
- return returnVal;
- }
- };
-
- return service;
-
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.exporter.directive:uiGridExporter
- * @element div
- * @restrict A
- *
- * @description Adds exporter features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.exporter']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.gridOptions = {
- enableGridMenu: true,
- exporterMenuCsv: false,
- columnDefs: [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ],
- data: $scope.data
- };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-exporter></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridExporter', ['uiGridExporterConstants', 'uiGridExporterService', 'gridUtil', '$compile',
- function (uiGridExporterConstants, uiGridExporterService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridExporterService.initializeGrid(uiGridCtrl.grid);
- uiGridCtrl.grid.exporter.$scope = $scope;
- }
- };
- }
- ]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.grouping
- * @description
- *
- * # ui.grid.grouping
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides grouping of rows based on the data in them, similar
- * in concept to excel grouping. You can group multiple columns, resulting in
- * nested grouping.
- *
- * In concept this feature is similar to sorting + grid footer/aggregation, it
- * sorts the data based on the grouped columns, then creates group rows that
- * reflect a break in the data. Each of those group rows can have aggregations for
- * the data within that group.
- *
- * This feature leverages treeBase to provide the tree functionality itself,
- * the key thing this feature does therefore is to set treeLevels on the rows
- * and insert the group headers.
- *
- * Design information:
- * -------------------
- *
- * Each column will get new menu items - group by, and aggregate by. Group by
- * will cause this column to be sorted (if not already), and will move this column
- * to the front of the sorted columns (i.e. grouped columns take precedence over
- * sorted columns). It will respect the sort order already set if there is one,
- * and it will allow the sorting logic to change that sort order, it just forces
- * the column to the front of the sorting. You can group by multiple columns, the
- * logic will add this column to the sorting after any already grouped columns.
- *
- * Once a grouping is defined, grouping logic is added to the rowsProcessors. This
- * will process the rows, identifying a break in the data value, and inserting a grouping row.
- * Grouping rows have specific attributes on them:
- *
- * - internalRow = true: tells us that this isn't a real row, so we can ignore it
- * from any processing that it looking at core data rows. This is used by the core
- * logic (or will be one day), as it's not grouping specific
- * - groupHeader = true: tells us this is a groupHeader. This is used by the grouping logic
- * to know if this is a groupHeader row or not
- *
- * Since the logic is baked into the rowsProcessors, it should get triggered whenever
- * row order or filtering or anything like that is changed. In order to avoid the row instantiation
- * time, and to preserve state across invocations, we hold a cache of the rows that we created
- * last time, and we use them again this time if we can.
- *
- * By default rows are collapsed, which means all data rows have their visible property
- * set to false, and only level 0 group rows are set to visible.
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.grouping"></div>
- */
-
- var module = angular.module('ui.grid.grouping', ['ui.grid', 'ui.grid.treeBase']);
-
- /**
- * @ngdoc object
- * @name ui.grid.grouping.constant:uiGridGroupingConstants
- *
- * @description constants available in grouping module, this includes
- * all the constants declared in the treeBase module (these are manually copied
- * as there isn't an easy way to include constants in another constants file, and
- * we don't want to make users include treeBase)
- *
- */
- module.constant('uiGridGroupingConstants', {
- featureName: "grouping",
- rowHeaderColName: 'treeBaseRowHeaderCol',
- EXPANDED: 'expanded',
- COLLAPSED: 'collapsed',
- aggregation: {
- COUNT: 'count',
- SUM: 'sum',
- MAX: 'max',
- MIN: 'min',
- AVG: 'avg'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.grouping.service:uiGridGroupingService
- *
- * @description Services for grouping features
- */
- module.service('uiGridGroupingService', ['$q', 'uiGridGroupingConstants', 'gridUtil', 'rowSorter', 'GridRow', 'gridClassFactory', 'i18nService', 'uiGridConstants', 'uiGridTreeBaseService',
- function ($q, uiGridGroupingConstants, gridUtil, rowSorter, GridRow, gridClassFactory, i18nService, uiGridConstants, uiGridTreeBaseService) {
-
- var service = {
-
- initializeGrid: function (grid, $scope) {
- uiGridTreeBaseService.initializeGrid( grid, $scope );
-
- //add feature namespace and any properties to grid for needed
- /**
- * @ngdoc object
- * @name ui.grid.grouping.grid:grouping
- *
- * @description Grid properties and functions added for grouping
- */
- grid.grouping = {};
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.grouping.grid:grouping
- * @name groupHeaderCache
- *
- * @description Cache that holds the group header rows we created last time, we'll
- * reuse these next time, not least because they hold our expanded states.
- *
- * We need to take care with these that they don't become a memory leak, we
- * create a new cache each time using the values from the old cache. This works
- * so long as we're creating group rows for invisible rows as well.
- *
- * The cache is a nested hash, indexed on the value we grouped by. So if we
- * grouped by gender then age, we'd maybe have something like:
- * ```
- * {
- * male: {
- * row: <pointer to the old row>,
- * children: {
- * 22: { row: <pointer to the old row> },
- * 31: { row: <pointer to the old row> }
- * },
- * female: {
- * row: <pointer to the old row>,
- * children: {
- * 28: { row: <pointer to the old row> },
- * 55: { row: <pointer to the old row> }
- * }
- * }
- * ```
- *
- * We create new rows for any missing rows, this means that they come in as collapsed.
- *
- */
- grid.grouping.groupHeaderCache = {};
-
- service.defaultGridOptions(grid.options);
-
- grid.registerRowsProcessor(service.groupRows, 400);
-
- grid.registerColumnBuilder( service.groupingColumnBuilder);
-
- grid.registerColumnsProcessor(service.groupingColumnProcessor, 400);
-
- /**
- * @ngdoc object
- * @name ui.grid.grouping.api:PublicApi
- *
- * @description Public Api for grouping feature
- */
- var publicApi = {
- events: {
- grouping: {
- /**
- * @ngdoc event
- * @eventOf ui.grid.grouping.api:PublicApi
- * @name aggregationChanged
- * @description raised whenever aggregation is changed, added or removed from a column
- *
- * <pre>
- * gridApi.grouping.on.aggregationChanged(scope,function(col){})
- * </pre>
- * @param {gridCol} col the column which on which aggregation changed. The aggregation
- * type is available as `col.treeAggregation.type`
- */
- aggregationChanged: {},
- /**
- * @ngdoc event
- * @eventOf ui.grid.grouping.api:PublicApi
- * @name groupingChanged
- * @description raised whenever the grouped columns changes
- *
- * <pre>
- * gridApi.grouping.on.groupingChanged(scope,function(col){})
- * </pre>
- * @param {gridCol} col the column which on which grouping changed. The new grouping is
- * available as `col.grouping`
- */
- groupingChanged: {}
- }
- },
- methods: {
- grouping: {
- /**
- * @ngdoc function
- * @name getGrouping
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Get the grouping configuration for this grid,
- * used by the saveState feature. Adds expandedState to the information
- * provided by the internal getGrouping, and removes any aggregations that have a source
- * of grouping (i.e. will be automatically reapplied when we regroup the column)
- * Returned grouping is an object
- * `{ grouping: groupArray, treeAggregations: aggregateArray, expandedState: hash }`
- * where grouping contains an array of objects:
- * `{ field: column.field, colName: column.name, groupPriority: column.grouping.groupPriority }`
- * and aggregations contains an array of objects:
- * `{ field: column.field, colName: column.name, aggregation: column.grouping.aggregation }`
- * and expandedState is a hash of the currently expanded nodes
- *
- * The groupArray will be sorted by groupPriority.
- *
- * @param {boolean} getExpanded whether or not to return the expanded state
- * @returns {object} grouping configuration
- */
- getGrouping: function ( getExpanded ) {
- var grouping = service.getGrouping(grid);
-
- grouping.grouping.forEach( function( group ) {
- group.colName = group.col.name;
- delete group.col;
- });
-
- grouping.aggregations.forEach( function( aggregation ) {
- aggregation.colName = aggregation.col.name;
- delete aggregation.col;
- });
-
- grouping.aggregations = grouping.aggregations.filter( function( aggregation ){
- return !aggregation.aggregation.source || aggregation.aggregation.source !== 'grouping';
- });
-
- if ( getExpanded ){
- grouping.rowExpandedStates = service.getRowExpandedStates( grid.grouping.groupingHeaderCache );
- }
-
- return grouping;
- },
-
- /**
- * @ngdoc function
- * @name setGrouping
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Set the grouping configuration for this grid,
- * used by the saveState feature, but can also be used by any
- * user to specify a combined grouping and aggregation configuration
- * @param {object} config the config you want to apply, in the format
- * provided out by getGrouping
- */
- setGrouping: function ( config ) {
- service.setGrouping(grid, config);
- },
-
- /**
- * @ngdoc function
- * @name groupColumn
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Adds this column to the existing grouping, at the end of the priority order.
- * If the column doesn't have a sort, adds one, by default ASC
- *
- * This column will move to the left of any non-group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {string} columnName the name of the column we want to group
- */
- groupColumn: function( columnName ) {
- var column = grid.getColumn(columnName);
- service.groupColumn(grid, column);
- },
-
- /**
- * @ngdoc function
- * @name ungroupColumn
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Removes the groupPriority from this column. If the
- * column was previously aggregated the aggregation will come back.
- * The sort will remain.
- *
- * This column will move to the right of any other group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {string} columnName the name of the column we want to ungroup
- */
- ungroupColumn: function( columnName ) {
- var column = grid.getColumn(columnName);
- service.ungroupColumn(grid, column);
- },
-
- /**
- * @ngdoc function
- * @name clearGrouping
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Clear any grouped columns and any aggregations. Doesn't remove sorting,
- * as we don't know whether that sorting was added by grouping or was there beforehand
- *
- */
- clearGrouping: function() {
- service.clearGrouping(grid);
- },
-
- /**
- * @ngdoc function
- * @name aggregateColumn
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Sets the aggregation type on a column, if the
- * column is currently grouped then it removes the grouping first.
- * If the aggregationDef is null then will result in the aggregation
- * being removed
- *
- * @param {string} columnName the column we want to aggregate
- * @param {string} or {function} aggregationDef one of the recognised types
- * from uiGridGroupingConstants or a custom aggregation function.
- * @param {string} aggregationLabel (optional) The label to use for this aggregation.
- */
- aggregateColumn: function( columnName, aggregationDef, aggregationLabel){
- var column = grid.getColumn(columnName);
- service.aggregateColumn( grid, column, aggregationDef, aggregationLabel);
- }
-
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- grid.api.core.on.sortChanged( $scope, service.tidyPriorities);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.grouping.api:GridOptions
- *
- * @description GridOptions for grouping feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableGrouping
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description Enable row grouping for entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enableGrouping = gridOptions.enableGrouping !== false;
-
- /**
- * @ngdoc object
- * @name groupingShowCounts
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description shows counts on the groupHeader rows. Not that if you are using a cellFilter or a
- * sortingAlgorithm which relies on a specific format or data type, showing counts may cause that
- * to break, since the group header rows will always be a string with groupingShowCounts enabled.
- * <br/>Defaults to true except on columns of types 'date' and 'object'
- */
- gridOptions.groupingShowCounts = gridOptions.groupingShowCounts !== false;
-
- /**
- * @ngdoc object
- * @name groupingNullLabel
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description The string to use for the grouping header row label on rows which contain a null or undefined value in the grouped column.
- * <br/>Defaults to "Null"
- */
- gridOptions.groupingNullLabel = typeof(gridOptions.groupingNullLabel) === 'undefined' ? 'Null' : gridOptions.groupingNullLabel;
-
- /**
- * @ngdoc object
- * @name enableGroupHeaderSelection
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description Allows group header rows to be selected.
- * <br/>Defaults to false
- */
- gridOptions.enableGroupHeaderSelection = gridOptions.enableGroupHeaderSelection === true;
- },
-
-
- /**
- * @ngdoc function
- * @name groupingColumnBuilder
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Sets the grouping defaults based on the columnDefs
- *
- * @param {object} colDef columnDef we're basing on
- * @param {GridCol} col the column we're to update
- * @param {object} gridOptions the options we should use
- * @returns {promise} promise for the builder - actually we do it all inline so it's immediately resolved
- */
- groupingColumnBuilder: function (colDef, col, gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.grouping.api:ColumnDef
- *
- * @description ColumnDef for grouping feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enableGrouping
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Enable grouping on this column
- * <br/>Defaults to true.
- */
- if (colDef.enableGrouping === false){
- return;
- }
-
- /**
- * @ngdoc object
- * @name grouping
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Set the grouping for a column. Format is:
- * ```
- * {
- * groupPriority: <number, starts at 0, if less than 0 or undefined then we're aggregating in this column>
- * }
- * ```
- *
- * **Note that aggregation used to be included in grouping, but is now separately set on the column via treeAggregation
- * setting in treeBase**
- *
- * We group in the priority order given, this will also put these columns to the high order of the sort irrespective
- * of the sort priority given them. If there is no sort defined then we sort ascending, if there is a sort defined then
- * we use that sort.
- *
- * If the groupPriority is undefined or less than 0, then we expect to be aggregating, and we look at the
- * aggregation types to determine what sort of aggregation we can do. Values are in the constants file, but
- * include SUM, COUNT, MAX, MIN
- *
- * groupPriorities should generally be sequential, if they're not then the next time getGrouping is called
- * we'll renumber them to be sequential.
- * <br/>Defaults to undefined.
- */
-
- if ( typeof(col.grouping) === 'undefined' && typeof(colDef.grouping) !== 'undefined') {
- col.grouping = angular.copy(colDef.grouping);
- if ( typeof(col.grouping.groupPriority) !== 'undefined' && col.grouping.groupPriority > -1 ){
- col.treeAggregationFn = uiGridTreeBaseService.nativeAggregations()[uiGridGroupingConstants.aggregation.COUNT].aggregationFn;
- col.treeAggregationFinalizerFn = service.groupedFinalizerFn;
- }
- } else if (typeof(col.grouping) === 'undefined'){
- col.grouping = {};
- }
-
- if (typeof(col.grouping) !== 'undefined' && typeof(col.grouping.groupPriority) !== 'undefined' && col.grouping.groupPriority >= 0){
- col.suppressRemoveSort = true;
- }
-
- var groupColumn = {
- name: 'ui.grid.grouping.group',
- title: i18nService.get().grouping.group,
- icon: 'ui-grid-icon-indent-right',
- shown: function () {
- return typeof(this.context.col.grouping) === 'undefined' ||
- typeof(this.context.col.grouping.groupPriority) === 'undefined' ||
- this.context.col.grouping.groupPriority < 0;
- },
- action: function () {
- service.groupColumn( this.context.col.grid, this.context.col );
- }
- };
-
- var ungroupColumn = {
- name: 'ui.grid.grouping.ungroup',
- title: i18nService.get().grouping.ungroup,
- icon: 'ui-grid-icon-indent-left',
- shown: function () {
- return typeof(this.context.col.grouping) !== 'undefined' &&
- typeof(this.context.col.grouping.groupPriority) !== 'undefined' &&
- this.context.col.grouping.groupPriority >= 0;
- },
- action: function () {
- service.ungroupColumn( this.context.col.grid, this.context.col );
- }
- };
-
- var aggregateRemove = {
- name: 'ui.grid.grouping.aggregateRemove',
- title: i18nService.get().grouping.aggregate_remove,
- shown: function () {
- return typeof(this.context.col.treeAggregationFn) !== 'undefined';
- },
- action: function () {
- service.aggregateColumn( this.context.col.grid, this.context.col, null);
- }
- };
-
- // generic adder for the aggregation menus, which follow a pattern
- var addAggregationMenu = function(type, title){
- title = title || i18nService.get().grouping['aggregate_' + type] || type;
- var menuItem = {
- name: 'ui.grid.grouping.aggregate' + type,
- title: title,
- shown: function () {
- return typeof(this.context.col.treeAggregation) === 'undefined' ||
- typeof(this.context.col.treeAggregation.type) === 'undefined' ||
- this.context.col.treeAggregation.type !== type;
- },
- action: function () {
- service.aggregateColumn( this.context.col.grid, this.context.col, type);
- }
- };
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.aggregate' + type)) {
- col.menuItems.push(menuItem);
- }
- };
-
- /**
- * @ngdoc object
- * @name groupingShowGroupingMenu
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Show the grouping (group and ungroup items) menu on this column
- * <br/>Defaults to true.
- */
- if ( col.colDef.groupingShowGroupingMenu !== false ){
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.group')) {
- col.menuItems.push(groupColumn);
- }
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.ungroup')) {
- col.menuItems.push(ungroupColumn);
- }
- }
-
-
- /**
- * @ngdoc object
- * @name groupingShowAggregationMenu
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Show the aggregation menu on this column
- * <br/>Defaults to true.
- */
- if ( col.colDef.groupingShowAggregationMenu !== false ){
- angular.forEach(uiGridTreeBaseService.nativeAggregations(), function(aggregationDef, name){
- addAggregationMenu(name);
- });
- angular.forEach(gridOptions.treeCustomAggregations, function(aggregationDef, name){
- addAggregationMenu(name, aggregationDef.menuTitle);
- });
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.aggregateRemove')) {
- col.menuItems.push(aggregateRemove);
- }
- }
- },
-
-
-
-
- /**
- * @ngdoc function
- * @name groupingColumnProcessor
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Moves the columns around based on which are grouped
- *
- * @param {array} columns the columns to consider rendering
- * @param {array} rows the grid rows, which we don't use but are passed to us
- * @returns {array} updated columns array
- */
- groupingColumnProcessor: function( columns, rows ) {
- var grid = this;
-
- columns = service.moveGroupColumns(this, columns, rows);
- return columns;
- },
-
- /**
- * @ngdoc function
- * @name groupedFinalizerFn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Used on group columns to display the rendered value and optionally
- * display the count of rows.
- *
- * @param {aggregation} the aggregation entity for a grouped column
- */
- groupedFinalizerFn: function( aggregation ){
- var col = this;
-
- if ( typeof(aggregation.groupVal) !== 'undefined') {
- aggregation.rendered = aggregation.groupVal;
- if ( col.grid.options.groupingShowCounts && col.colDef.type !== 'date' && col.colDef.type !== 'object' ){
- aggregation.rendered += (' (' + aggregation.value + ')');
- }
- } else {
- aggregation.rendered = null;
- }
- },
-
- /**
- * @ngdoc function
- * @name moveGroupColumns
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Moves the column order so that the grouped columns are lined up
- * to the left (well, unless you're RTL, then it's the right). By doing this in
- * the columnsProcessor, we make it transient - when the column is ungrouped it'll
- * go back to where it was.
- *
- * Does nothing if the option `moveGroupColumns` is set to false.
- *
- * @param {Grid} grid grid object
- * @param {array} columns the columns that we should process/move
- * @param {array} rows the grid rows
- * @returns {array} updated columns
- */
- moveGroupColumns: function( grid, columns, rows ){
- if ( grid.options.moveGroupColumns === false){
- return columns;
- }
-
- columns.forEach( function(column, index){
- // position used to make stable sort in moveGroupColumns
- column.groupingPosition = index;
- });
-
- columns.sort(function(a, b){
- var a_group, b_group;
- if (a.isRowHeader){
- a_group = a.headerPriority;
- }
- else if ( typeof(a.grouping) === 'undefined' || typeof(a.grouping.groupPriority) === 'undefined' || a.grouping.groupPriority < 0){
- a_group = null;
- } else {
- a_group = a.grouping.groupPriority;
- }
-
- if (b.isRowHeader){
- b_group = b.headerPriority;
- }
- else if ( typeof(b.grouping) === 'undefined' || typeof(b.grouping.groupPriority) === 'undefined' || b.grouping.groupPriority < 0){
- b_group = null;
- } else {
- b_group = b.grouping.groupPriority;
- }
-
- // groups get sorted to the top
- if ( a_group !== null && b_group === null) { return -1; }
- if ( b_group !== null && a_group === null) { return 1; }
- if ( a_group !== null && b_group !== null) {return a_group - b_group; }
-
- return a.groupingPosition - b.groupingPosition;
- });
-
- columns.forEach( function(column, index) {
- delete column.groupingPosition;
- });
-
- return columns;
- },
-
-
- /**
- * @ngdoc function
- * @name groupColumn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Adds this column to the existing grouping, at the end of the priority order.
- * If the column doesn't have a sort, adds one, by default ASC
- *
- * This column will move to the left of any non-group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {Grid} grid grid object
- * @param {GridCol} column the column we want to group
- */
- groupColumn: function( grid, column){
- if ( typeof(column.grouping) === 'undefined' ){
- column.grouping = {};
- }
-
- // set the group priority to the next number in the hierarchy
- var existingGrouping = service.getGrouping( grid );
- column.grouping.groupPriority = existingGrouping.grouping.length;
-
- // save sort in order to restore it when column is ungrouped
- column.previousSort = angular.copy(column.sort);
-
- // add sort if not present
- if ( !column.sort ){
- column.sort = { direction: uiGridConstants.ASC };
- } else if ( typeof(column.sort.direction) === 'undefined' || column.sort.direction === null ){
- column.sort.direction = uiGridConstants.ASC;
- }
-
- column.treeAggregation = { type: uiGridGroupingConstants.aggregation.COUNT, source: 'grouping' };
- column.treeAggregationFn = uiGridTreeBaseService.nativeAggregations()[uiGridGroupingConstants.aggregation.COUNT].aggregationFn;
- column.treeAggregationFinalizerFn = service.groupedFinalizerFn;
-
- grid.api.grouping.raise.groupingChanged(column);
- // This indirectly calls service.tidyPriorities( grid );
- grid.api.core.raise.sortChanged(grid, grid.getColumnSorting());
-
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name ungroupColumn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Removes the groupPriority from this column. If the
- * column was previously aggregated the aggregation will come back.
- * The sort will remain.
- *
- * This column will move to the right of any other group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {Grid} grid grid object
- * @param {GridCol} column the column we want to ungroup
- */
- ungroupColumn: function( grid, column){
- if ( typeof(column.grouping) === 'undefined' ){
- return;
- }
-
- delete column.grouping.groupPriority;
- delete column.treeAggregation;
- delete column.customTreeAggregationFinalizer;
-
- if (column.previousSort) {
- column.sort = column.previousSort;
- delete column.previousSort;
- }
-
- service.tidyPriorities( grid );
-
- grid.api.grouping.raise.groupingChanged(column);
- grid.api.core.raise.sortChanged(grid, grid.getColumnSorting());
-
- grid.queueGridRefresh();
- },
-
- /**
- * @ngdoc function
- * @name aggregateColumn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Sets the aggregation type on a column, if the
- * column is currently grouped then it removes the grouping first.
- *
- * @param {Grid} grid grid object
- * @param {GridCol} column the column we want to aggregate
- * @param {string} one of the recognised types from uiGridGroupingConstants or one of the custom aggregations from gridOptions
- */
- aggregateColumn: function( grid, column, aggregationType){
-
- if (typeof(column.grouping) !== 'undefined' && typeof(column.grouping.groupPriority) !== 'undefined' && column.grouping.groupPriority >= 0){
- service.ungroupColumn( grid, column );
- }
-
- var aggregationDef = {};
- if ( typeof(grid.options.treeCustomAggregations[aggregationType]) !== 'undefined' ){
- aggregationDef = grid.options.treeCustomAggregations[aggregationType];
- } else if ( typeof(uiGridTreeBaseService.nativeAggregations()[aggregationType]) !== 'undefined' ){
- aggregationDef = uiGridTreeBaseService.nativeAggregations()[aggregationType];
- }
-
- column.treeAggregation = { type: aggregationType, label: i18nService.get().aggregation[aggregationDef.label] || aggregationDef.label };
- column.treeAggregationFn = aggregationDef.aggregationFn;
- column.treeAggregationFinalizerFn = aggregationDef.finalizerFn;
-
- grid.api.grouping.raise.aggregationChanged(column);
-
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name setGrouping
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Set the grouping based on a config object, used by the save state feature
- * (more specifically, by the restore function in that feature )
- *
- * @param {Grid} grid grid object
- * @param {object} config the config we want to set, same format as that returned by getGrouping
- */
- setGrouping: function ( grid, config ){
- if ( typeof(config) === 'undefined' ){
- return;
- }
-
- // first remove any existing grouping
- service.clearGrouping(grid);
-
- if ( config.grouping && config.grouping.length && config.grouping.length > 0 ){
- config.grouping.forEach( function( group ) {
- var col = grid.getColumn(group.colName);
-
- if ( col ) {
- service.groupColumn( grid, col );
- }
- });
- }
-
- if ( config.aggregations && config.aggregations.length ){
- config.aggregations.forEach( function( aggregation ) {
- var col = grid.getColumn(aggregation.colName);
-
- if ( col ) {
- service.aggregateColumn( grid, col, aggregation.aggregation.type );
- }
- });
- }
-
- if ( config.rowExpandedStates ){
- service.applyRowExpandedStates( grid.grouping.groupingHeaderCache, config.rowExpandedStates );
- }
- },
-
-
- /**
- * @ngdoc function
- * @name clearGrouping
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Clear any grouped columns and any aggregations. Doesn't remove sorting,
- * as we don't know whether that sorting was added by grouping or was there beforehand
- *
- * @param {Grid} grid grid object
- */
- clearGrouping: function( grid ) {
- var currentGrouping = service.getGrouping(grid);
-
- if ( currentGrouping.grouping.length > 0 ){
- currentGrouping.grouping.forEach( function( group ) {
- if (!group.col){
- // should have a group.colName if there's no col
- group.col = grid.getColumn(group.colName);
- }
- service.ungroupColumn(grid, group.col);
- });
- }
-
- if ( currentGrouping.aggregations.length > 0 ){
- currentGrouping.aggregations.forEach( function( aggregation ){
- if (!aggregation.col){
- // should have a group.colName if there's no col
- aggregation.col = grid.getColumn(aggregation.colName);
- }
- service.aggregateColumn(grid, aggregation.col, null);
- });
- }
- },
-
-
- /**
- * @ngdoc function
- * @name tidyPriorities
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Renumbers groupPriority and sortPriority such that
- * groupPriority is contiguous, and sortPriority either matches
- * groupPriority (for group columns), and otherwise is contiguous and
- * higher than groupPriority.
- *
- * @param {Grid} grid grid object
- */
- tidyPriorities: function( grid ){
- // if we're called from sortChanged, grid is in this, not passed as param, the param can be a column or undefined
- if ( ( typeof(grid) === 'undefined' || typeof(grid.grid) !== 'undefined' ) && typeof(this.grid) !== 'undefined' ) {
- grid = this.grid;
- }
-
- var groupArray = [];
- var sortArray = [];
-
- grid.columns.forEach( function(column, index){
- if ( typeof(column.grouping) !== 'undefined' && typeof(column.grouping.groupPriority) !== 'undefined' && column.grouping.groupPriority >= 0){
- groupArray.push(column);
- } else if ( typeof(column.sort) !== 'undefined' && typeof(column.sort.priority) !== 'undefined' && column.sort.priority >= 0){
- sortArray.push(column);
- }
- });
-
- groupArray.sort(function(a, b){ return a.grouping.groupPriority - b.grouping.groupPriority; });
- groupArray.forEach( function(column, index){
- column.grouping.groupPriority = index;
- column.suppressRemoveSort = true;
- if ( typeof(column.sort) === 'undefined'){
- column.sort = {};
- }
- column.sort.priority = index;
- });
-
- var i = groupArray.length;
- sortArray.sort(function(a, b){ return a.sort.priority - b.sort.priority; });
- sortArray.forEach( function(column, index){
- column.sort.priority = i;
- column.suppressRemoveSort = column.colDef.suppressRemoveSort;
- i++;
- });
- },
-
-
- /**
- * @ngdoc function
- * @name groupRows
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description The rowProcessor that creates the groupHeaders (i.e. does
- * the actual grouping).
- *
- * Assumes it is always called after the sorting processor, guaranteed by the priority setting
- *
- * Processes all the rows in order, inserting a groupHeader row whenever there is a change
- * in value of a grouped row, based on the sortAlgorithm used for the column. The group header row
- * is looked up in the groupHeaderCache, and used from there if there is one. The entity is reset
- * to {} if one is found.
- *
- * As it processes it maintains a `processingState` array. This records, for each level of grouping we're
- * working with, the following information:
- * ```
- * {
- * fieldName: name,
- * col: col,
- * initialised: boolean,
- * currentValue: value,
- * currentRow: gridRow,
- * }
- * ```
- * We look for changes in the currentValue at any of the levels. Where we find a change we:
- *
- * - create a new groupHeader row in the array
- *
- * @param {array} renderableRows the rows we want to process, usually the output from the previous rowProcessor
- * @returns {array} the updated rows, including our new group rows
- */
- groupRows: function( renderableRows ) {
- if (renderableRows.length === 0){
- return renderableRows;
- }
-
- var grid = this;
- grid.grouping.oldGroupingHeaderCache = grid.grouping.groupingHeaderCache || {};
- grid.grouping.groupingHeaderCache = {};
-
- var processingState = service.initialiseProcessingState( grid );
-
- // processes each of the fields we are grouping by, checks if the value has changed and inserts a groupHeader
- // Broken out as shouldn't create functions in a loop.
- var updateProcessingState = function( groupFieldState, stateIndex ) {
- var fieldValue = grid.getCellValue(row, groupFieldState.col);
-
- // look for change of value - and insert a header
- if ( !groupFieldState.initialised || rowSorter.getSortFn(grid, groupFieldState.col, renderableRows)(fieldValue, groupFieldState.currentValue) !== 0 ){
- service.insertGroupHeader( grid, renderableRows, i, processingState, stateIndex );
- i++;
- }
- };
-
- // use a for loop because it's tolerant of the array length changing whilst we go - we can
- // manipulate the iterator when we insert groupHeader rows
- for (var i = 0; i < renderableRows.length; i++ ){
- var row = renderableRows[i];
-
- if ( row.visible ){
- processingState.forEach( updateProcessingState );
- }
- }
-
- delete grid.grouping.oldGroupingHeaderCache;
- return renderableRows;
- },
-
-
- /**
- * @ngdoc function
- * @name initialiseProcessingState
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Creates the processing state array that is used
- * for groupRows.
- *
- * @param {Grid} grid grid object
- * @returns {array} an array in the format described in the groupRows method,
- * initialised with blank values
- */
- initialiseProcessingState: function( grid ){
- var processingState = [];
- var columnSettings = service.getGrouping( grid );
-
- columnSettings.grouping.forEach( function( groupItem, index){
- processingState.push({
- fieldName: groupItem.field,
- col: groupItem.col,
- initialised: false,
- currentValue: null,
- currentRow: null
- });
- });
-
- return processingState;
- },
-
-
- /**
- * @ngdoc function
- * @name getGrouping
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Get the grouping settings from the columns. As a side effect
- * this always renumbers the grouping starting at 0
- * @param {Grid} grid grid object
- * @returns {array} an array of the group fields, in order of priority
- */
- getGrouping: function( grid ){
- var groupArray = [];
- var aggregateArray = [];
-
- // get all the grouping
- grid.columns.forEach( function(column, columnIndex){
- if ( column.grouping ){
- if ( typeof(column.grouping.groupPriority) !== 'undefined' && column.grouping.groupPriority >= 0){
- groupArray.push({ field: column.field, col: column, groupPriority: column.grouping.groupPriority, grouping: column.grouping });
- }
- }
- if ( column.treeAggregation && column.treeAggregation.type ){
- aggregateArray.push({ field: column.field, col: column, aggregation: column.treeAggregation });
- }
- });
-
- // sort grouping into priority order
- groupArray.sort( function(a, b){
- return a.groupPriority - b.groupPriority;
- });
-
- // renumber the priority in case it was somewhat messed up, then remove the grouping reference
- groupArray.forEach( function( group, index) {
- group.grouping.groupPriority = index;
- group.groupPriority = index;
- delete group.grouping;
- });
-
- return { grouping: groupArray, aggregations: aggregateArray };
- },
-
-
- /**
- * @ngdoc function
- * @name insertGroupHeader
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Create a group header row, and link it to the various configuration
- * items that we use.
- *
- * Look for the row in the oldGroupingHeaderCache, write the row into the new groupingHeaderCache.
- *
- * @param {Grid} grid grid object
- * @param {array} renderableRows the rows that we are processing
- * @param {number} rowIndex the row we were up to processing
- * @param {array} processingState the current processing state
- * @param {number} stateIndex the processing state item that we were on when we triggered a new group header -
- * i.e. the column that we want to create a header for
- */
- insertGroupHeader: function( grid, renderableRows, rowIndex, processingState, stateIndex ) {
- // set the value that caused the end of a group into the header row and the processing state
- var fieldName = processingState[stateIndex].fieldName;
- var col = processingState[stateIndex].col;
-
- var newValue = grid.getCellValue(renderableRows[rowIndex], col);
- var newDisplayValue = newValue;
- if ( typeof(newValue) === 'undefined' || newValue === null ) {
- newDisplayValue = grid.options.groupingNullLabel;
- }
-
- var getKeyAsValueForCacheMap = function(key) {
- if (angular.isObject(key)) {
- return JSON.stringify(key);
- } else {
- return key;
- }
- };
-
- var cacheItem = grid.grouping.oldGroupingHeaderCache;
- for ( var i = 0; i < stateIndex; i++ ){
- if ( cacheItem && cacheItem[getKeyAsValueForCacheMap(processingState[i].currentValue)] ){
- cacheItem = cacheItem[getKeyAsValueForCacheMap(processingState[i].currentValue)].children;
- }
- }
-
- var headerRow;
- if ( cacheItem && cacheItem[getKeyAsValueForCacheMap(newValue)]){
- headerRow = cacheItem[getKeyAsValueForCacheMap(newValue)].row;
- headerRow.entity = {};
- } else {
- headerRow = new GridRow( {}, null, grid );
- gridClassFactory.rowTemplateAssigner.call(grid, headerRow);
- }
-
- headerRow.entity['$$' + processingState[stateIndex].col.uid] = { groupVal: newDisplayValue };
- headerRow.treeLevel = stateIndex;
- headerRow.groupHeader = true;
- headerRow.internalRow = true;
- headerRow.enableCellEdit = false;
- headerRow.enableSelection = grid.options.enableGroupHeaderSelection;
- processingState[stateIndex].initialised = true;
- processingState[stateIndex].currentValue = newValue;
- processingState[stateIndex].currentRow = headerRow;
-
- // set all processing states below this one to not be initialised - change of this state
- // means all those need to start again
- service.finaliseProcessingState( processingState, stateIndex + 1);
-
- // insert our new header row
- renderableRows.splice(rowIndex, 0, headerRow);
-
- // add our new header row to the cache
- cacheItem = grid.grouping.groupingHeaderCache;
- for ( i = 0; i < stateIndex; i++ ){
- cacheItem = cacheItem[getKeyAsValueForCacheMap(processingState[i].currentValue)].children;
- }
- cacheItem[getKeyAsValueForCacheMap(newValue)] = { row: headerRow, children: {} };
- },
-
-
- /**
- * @ngdoc function
- * @name finaliseProcessingState
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Set all processing states lower than the one that had a break in value to
- * no longer be initialised. Render the counts into the entity ready for display.
- *
- * @param {Grid} grid grid object
- * @param {array} processingState the current processing state
- * @param {number} stateIndex the processing state item that we were on when we triggered a new group header, all
- * processing states after this need to be finalised
- */
- finaliseProcessingState: function( processingState, stateIndex ){
- for ( var i = stateIndex; i < processingState.length; i++){
- processingState[i].initialised = false;
- processingState[i].currentRow = null;
- processingState[i].currentValue = null;
- }
- },
-
-
- /**
- * @ngdoc function
- * @name getRowExpandedStates
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Extract the groupHeaderCache hash, pulling out only the states.
- *
- * The example below shows a grid that is grouped by gender then age
- *
- * <pre>
- * {
- * male: {
- * state: 'expanded',
- * children: {
- * 22: { state: 'expanded' },
- * 30: { state: 'collapsed' }
- * }
- * },
- * female: {
- * state: 'expanded',
- * children: {
- * 28: { state: 'expanded' },
- * 55: { state: 'collapsed' }
- * }
- * }
- * }
- * </pre>
- *
- * @param {Grid} grid grid object
- * @returns {hash} the expanded states as a hash
- */
- getRowExpandedStates: function(treeChildren){
- if ( typeof(treeChildren) === 'undefined' ){
- return {};
- }
-
- var newChildren = {};
-
- angular.forEach( treeChildren, function( value, key ){
- newChildren[key] = { state: value.row.treeNode.state };
- if ( value.children ){
- newChildren[key].children = service.getRowExpandedStates( value.children );
- } else {
- newChildren[key].children = {};
- }
- });
-
- return newChildren;
- },
-
-
- /**
- * @ngdoc function
- * @name applyRowExpandedStates
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Take a hash in the format as created by getRowExpandedStates,
- * and apply it to the grid.grouping.groupHeaderCache.
- *
- * Takes a treeSubset, and applies to a treeSubset - so can be called
- * recursively.
- *
- * @param {object} currentNode can be grid.grouping.groupHeaderCache, or any of
- * the children of that hash
- * @returns {hash} expandedStates can be the full expanded states, or children
- * of that expanded states (which hopefully matches the subset of the groupHeaderCache)
- */
- applyRowExpandedStates: function( currentNode, expandedStates ){
- if ( typeof(expandedStates) === 'undefined' ){
- return;
- }
-
- angular.forEach(expandedStates, function( value, key ) {
- if ( currentNode[key] ){
- currentNode[key].row.treeNode.state = value.state;
-
- if (value.children && currentNode[key].children){
- service.applyRowExpandedStates( currentNode[key].children, value.children );
- }
- }
- });
- }
-
-
- };
-
- return service;
-
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.grouping.directive:uiGridGrouping
- * @element div
- * @restrict A
- *
- * @description Adds grouping features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.grouping']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
-
- $scope.gridOptions = { columnDefs: $scope.columnDefs, data: $scope.data };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-grouping></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridGrouping', ['uiGridGroupingConstants', 'uiGridGroupingService', '$templateCache',
- function (uiGridGroupingConstants, uiGridGroupingService, $templateCache) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- if (uiGridCtrl.grid.options.enableGrouping !== false){
- uiGridGroupingService.initializeGrid(uiGridCtrl.grid, $scope);
- }
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.importer
- * @description
- *
- * # ui.grid.importer
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides the ability to import data into the grid. It
- * uses the column defs to work out which data belongs in which column,
- * and creates entities from a configured class (typically a $resource).
- *
- * If the rowEdit feature is enabled, it also calls save on those newly
- * created objects, and then displays any errors in the imported data.
- *
- * Currently the importer imports only CSV and json files, although provision has been
- * made to process other file formats, and these can be added over time.
- *
- * For json files, the properties within each object in the json must match the column names
- * (to put it another way, the importer doesn't process the json, it just copies the objects
- * within the json into a new instance of the specified object type)
- *
- * For CSV import, the default column identification relies on each column in the
- * header row matching a column.name or column.displayName. Optionally, a column identification
- * callback can be used. This allows matching using other attributes, which is particularly
- * useful if your application has internationalised column headings (i.e. the headings that
- * the user sees don't match the column names).
- *
- * The importer makes use of the grid menu as the UI for requesting an
- * import.
- *
- * <div ui-grid-importer></div>
- */
-
- var module = angular.module('ui.grid.importer', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.importer.constant:uiGridImporterConstants
- *
- * @description constants available in importer module
- */
-
- module.constant('uiGridImporterConstants', {
- featureName: 'importer'
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.importer.service:uiGridImporterService
- *
- * @description Services for importer feature
- */
- module.service('uiGridImporterService', ['$q', 'uiGridConstants', 'uiGridImporterConstants', 'gridUtil', '$compile', '$interval', 'i18nService', '$window',
- function ($q, uiGridConstants, uiGridImporterConstants, gridUtil, $compile, $interval, i18nService, $window) {
-
- var service = {
-
- initializeGrid: function ($scope, grid) {
-
- //add feature namespace and any properties to grid for needed state
- grid.importer = {
- $scope: $scope
- };
-
- this.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.importer.api:PublicApi
- *
- * @description Public Api for importer feature
- */
- var publicApi = {
- events: {
- importer: {
- }
- },
- methods: {
- importer: {
- /**
- * @ngdoc function
- * @name importFile
- * @methodOf ui.grid.importer.api:PublicApi
- * @description Imports a file into the grid using the file object
- * provided. Bypasses the grid menu
- * @param {File} fileObject the file we want to import, as a javascript
- * File object
- */
- importFile: function ( fileObject ) {
- service.importThisFile( grid, fileObject );
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- if ( grid.options.enableImporter && grid.options.importerShowMenu ){
- if ( grid.api.core.addToGridMenu ){
- service.addToMenu( grid );
- } else {
- // order of registration is not guaranteed, register in a little while
- $interval( function() {
- if (grid.api.core.addToGridMenu){
- service.addToMenu( grid );
- }
- }, 100, 1);
- }
- }
- },
-
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.importer.api:GridOptions
- *
- * @description GridOptions for importer feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.importer.api:GridOptions
- * @name enableImporter
- * @description Whether or not importer is enabled. Automatically set
- * to false if the user's browser does not support the required fileApi.
- * Otherwise defaults to true.
- *
- */
- if (gridOptions.enableImporter || gridOptions.enableImporter === undefined) {
- if ( !($window.hasOwnProperty('File') && $window.hasOwnProperty('FileReader') && $window.hasOwnProperty('FileList') && $window.hasOwnProperty('Blob')) ) {
- gridUtil.logError('The File APIs are not fully supported in this browser, grid importer cannot be used.');
- gridOptions.enableImporter = false;
- } else {
- gridOptions.enableImporter = true;
- }
- } else {
- gridOptions.enableImporter = false;
- }
-
- /**
- * @ngdoc method
- * @name importerProcessHeaders
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A callback function that will process headers using custom
- * logic. Set this callback function if the headers that your user will provide in their
- * import file don't necessarily match the grid header or field names. This might commonly
- * occur where your application is internationalised, and therefore the field names
- * that the user recognises are in a different language than the field names that
- * ui-grid knows about.
- *
- * Defaults to the internal `processHeaders` method, which seeks to match using both
- * displayName and column.name. Any non-matching columns are discarded.
- *
- * Your callback routine should respond by processing the header array, and returning an array
- * of matching column names. A null value in any given position means "don't import this column"
- *
- * <pre>
- * gridOptions.importerProcessHeaders: function( headerArray ) {
- * var myHeaderColumns = [];
- * var thisCol;
- * headerArray.forEach( function( value, index ) {
- * thisCol = mySpecialLookupFunction( value );
- * myHeaderColumns.push( thisCol.name );
- * });
- *
- * return myHeaderCols;
- * })
- * </pre>
- * @param {Grid} grid the grid we're importing into
- * @param {array} headerArray an array of the text from the first row of the csv file,
- * which you need to match to column.names
- * @returns {array} array of matching column names, in the same order as the headerArray
- *
- */
- gridOptions.importerProcessHeaders = gridOptions.importerProcessHeaders || service.processHeaders;
-
- /**
- * @ngdoc method
- * @name importerHeaderFilter
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A callback function that will filter (usually translate) a single
- * header. Used when you want to match the passed in column names to the column
- * displayName after the header filter.
- *
- * Your callback routine needs to return the filtered header value.
- * <pre>
- * gridOptions.importerHeaderFilter: function( displayName ) {
- * return $translate.instant( displayName );
- * })
- * </pre>
- *
- * or:
- * <pre>
- * gridOptions.importerHeaderFilter: $translate.instant
- * </pre>
- * @param {string} displayName the displayName that we'd like to translate
- * @returns {string} the translated name
- *
- */
- gridOptions.importerHeaderFilter = gridOptions.importerHeaderFilter || function( displayName ) { return displayName; };
-
- /**
- * @ngdoc method
- * @name importerErrorCallback
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A callback function that provides custom error handling, rather
- * than the standard grid behaviour of an alert box and a console message. You
- * might use this to internationalise the console log messages, or to write to a
- * custom logging routine that returned errors to the server.
- *
- * <pre>
- * gridOptions.importerErrorCallback: function( grid, errorKey, consoleMessage, context ) {
- * myUserDisplayRoutine( errorKey );
- * myLoggingRoutine( consoleMessage, context );
- * })
- * </pre>
- * @param {Grid} grid the grid we're importing into, may be useful if you're positioning messages
- * in some way
- * @param {string} errorKey one of the i18n keys the importer can return - importer.noHeaders,
- * importer.noObjects, importer.invalidCsv, importer.invalidJson, importer.jsonNotArray
- * @param {string} consoleMessage the English console message that importer would have written
- * @param {object} context the context data that importer would have appended to that console message,
- * often the file content itself or the element that is in error
- *
- */
- if ( !gridOptions.importerErrorCallback || typeof(gridOptions.importerErrorCallback) !== 'function' ){
- delete gridOptions.importerErrorCallback;
- }
-
- /**
- * @ngdoc method
- * @name importerDataAddCallback
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A mandatory callback function that adds data to the source data array. The grid
- * generally doesn't add rows to the source data array, it is tidier to handle this through a user
- * callback.
- *
- * <pre>
- * gridOptions.importerDataAddCallback: function( grid, newObjects ) {
- * $scope.myData = $scope.myData.concat( newObjects );
- * })
- * </pre>
- * @param {Grid} grid the grid we're importing into, may be useful in some way
- * @param {array} newObjects an array of new objects that you should add to your data
- *
- */
- if ( gridOptions.enableImporter === true && !gridOptions.importerDataAddCallback ) {
- gridUtil.logError("You have not set an importerDataAddCallback, importer is disabled");
- gridOptions.enableImporter = false;
- }
-
- /**
- * @ngdoc object
- * @name importerNewObject
- * @propertyOf ui.grid.importer.api:GridOptions
- * @description An object on which we call `new` to create each new row before inserting it into
- * the data array. Typically this would be a $resource entity, which means that if you're using
- * the rowEdit feature, you can directly call save on this entity when the save event is triggered.
- *
- * Defaults to a vanilla javascript object
- *
- * @example
- * <pre>
- * gridOptions.importerNewObject = MyRes;
- * </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.importer.api:GridOptions
- * @name importerShowMenu
- * @description Whether or not to show an item in the grid menu. Defaults to true.
- *
- */
- gridOptions.importerShowMenu = gridOptions.importerShowMenu !== false;
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.importer.api:GridOptions
- * @name importerObjectCallback
- * @description A callback that massages the data for each object. For example,
- * you might have data stored as a code value, but display the decode. This callback
- * can be used to change the decoded value back into a code. Defaults to doing nothing.
- * @param {Grid} grid in case you need it
- * @param {object} newObject the new object as importer has created it, modify it
- * then return the modified version
- * @returns {object} the modified object
- * @example
- * <pre>
- * gridOptions.importerObjectCallback = function ( grid, newObject ) {
- * switch newObject.status {
- * case 'Active':
- * newObject.status = 1;
- * break;
- * case 'Inactive':
- * newObject.status = 2;
- * break;
- * }
- * return newObject;
- * };
- * </pre>
- */
- gridOptions.importerObjectCallback = gridOptions.importerObjectCallback || function( grid, newObject ) { return newObject; };
- },
-
-
- /**
- * @ngdoc function
- * @name addToMenu
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Adds import menu item to the grid menu,
- * allowing the user to request import of a file
- * @param {Grid} grid the grid into which data should be imported
- */
- addToMenu: function ( grid ) {
- grid.api.core.addToGridMenu( grid, [
- {
- title: i18nService.getSafeText('gridMenu.importerTitle'),
- order: 150
- },
- {
- templateUrl: 'ui-grid/importerMenuItemContainer',
- action: function ($event) {
- this.grid.api.importer.importAFile( grid );
- },
- order: 151
- }
- ]);
- },
-
-
- /**
- * @ngdoc function
- * @name importThisFile
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Imports the provided file into the grid using the file object
- * provided. Bypasses the grid menu
- * @param {Grid} grid the grid we're importing into
- * @param {File} fileObject the file we want to import, as returned from the File
- * javascript object
- */
- importThisFile: function ( grid, fileObject ) {
- if (!fileObject){
- gridUtil.logError( 'No file object provided to importThisFile, should be impossible, aborting');
- return;
- }
-
- var reader = new FileReader();
-
- switch ( fileObject.type ){
- case 'application/json':
- reader.onload = service.importJsonClosure( grid );
- break;
- default:
- reader.onload = service.importCsvClosure( grid );
- break;
- }
-
- reader.readAsText( fileObject );
- },
-
-
- /**
- * @ngdoc function
- * @name importJson
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Creates a function that imports a json file into the grid.
- * The json data is imported into new objects of type `gridOptions.importerNewObject`,
- * and if the rowEdit feature is enabled the rows are marked as dirty
- * @param {Grid} grid the grid we want to import into
- * @param {FileObject} importFile the file that we want to import, as
- * a FileObject
- */
- importJsonClosure: function( grid ) {
- return function( importFile ){
- var newObjects = [];
- var newObject;
-
- var importArray = service.parseJson( grid, importFile );
- if (importArray === null){
- return;
- }
- importArray.forEach( function( value, index ) {
- newObject = service.newObject( grid );
- angular.extend( newObject, value );
- newObject = grid.options.importerObjectCallback( grid, newObject );
- newObjects.push( newObject );
- });
-
- service.addObjects( grid, newObjects );
-
- };
- },
-
-
- /**
- * @ngdoc function
- * @name parseJson
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Parses a json file, returns the parsed data.
- * Displays an error if file doesn't parse
- * @param {Grid} grid the grid that we want to import into
- * @param {FileObject} importFile the file that we want to import, as
- * a FileObject
- * @returns {array} array of objects from the imported json
- */
- parseJson: function( grid, importFile ){
- var loadedObjects;
- try {
- loadedObjects = JSON.parse( importFile.target.result );
- } catch (e) {
- service.alertError( grid, 'importer.invalidJson', 'File could not be processed, is it valid json? Content was: ', importFile.target.result );
- return;
- }
-
- if ( !Array.isArray( loadedObjects ) ){
- service.alertError( grid, 'importer.jsonNotarray', 'Import failed, file is not an array, file was: ', importFile.target.result );
- return [];
- } else {
- return loadedObjects;
- }
- },
-
-
-
- /**
- * @ngdoc function
- * @name importCsvClosure
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Creates a function that imports a csv file into the grid
- * (allowing it to be used in the reader.onload event)
- * @param {Grid} grid the grid that we want to import into
- * @param {FileObject} importFile the file that we want to import, as
- * a file object
- */
- importCsvClosure: function( grid ) {
- return function( importFile ){
- var importArray = service.parseCsv( importFile );
- if ( !importArray || importArray.length < 1 ){
- service.alertError( grid, 'importer.invalidCsv', 'File could not be processed, is it valid csv? Content was: ', importFile.target.result );
- return;
- }
-
- var newObjects = service.createCsvObjects( grid, importArray );
- if ( !newObjects || newObjects.length === 0 ){
- service.alertError( grid, 'importer.noObjects', 'Objects were not able to be derived, content was: ', importFile.target.result );
- return;
- }
-
- service.addObjects( grid, newObjects );
- };
- },
-
-
- /**
- * @ngdoc function
- * @name parseCsv
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Parses a csv file into an array of arrays, with the first
- * array being the headers, and the remaining arrays being the data.
- * The logic for this comes from https://github.com/thetalecrafter/excel.js/blob/master/src/csv.js,
- * which is noted as being under the MIT license. The code is modified to pass the jscs yoda condition
- * checker
- * @param {FileObject} importFile the file that we want to import, as a
- * file object
- */
- parseCsv: function( importFile ) {
- var csv = importFile.target.result;
-
- // use the CSV-JS library to parse
- return CSV.parse(csv);
- },
-
-
- /**
- * @ngdoc function
- * @name createCsvObjects
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Converts an array of arrays (representing the csv file)
- * into a set of objects. Uses the provided `gridOptions.importerNewObject`
- * to create the objects, and maps the header row into the individual columns
- * using either `gridOptions.importerProcessHeaders`, or by using a native method
- * of matching to either the displayName, column name or column field of
- * the columns in the column defs. The resulting objects will have attributes
- * that are named based on the column.field or column.name, in that order.
- * @param {Grid} grid the grid that we want to import into
- * @param {Array} importArray the data that we want to import, as an array
- */
- createCsvObjects: function( grid, importArray ){
- // pull off header row and turn into headers
- var headerMapping = grid.options.importerProcessHeaders( grid, importArray.shift() );
- if ( !headerMapping || headerMapping.length === 0 ){
- service.alertError( grid, 'importer.noHeaders', 'Column names could not be derived, content was: ', importArray );
- return [];
- }
-
- var newObjects = [];
- var newObject;
- importArray.forEach( function( row, index ) {
- newObject = service.newObject( grid );
- if ( row !== null ){
- row.forEach( function( field, index ){
- if ( headerMapping[index] !== null ){
- newObject[ headerMapping[index] ] = field;
- }
- });
- }
- newObject = grid.options.importerObjectCallback( grid, newObject );
- newObjects.push( newObject );
- });
-
- return newObjects;
- },
-
-
- /**
- * @ngdoc function
- * @name processHeaders
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Determines the columns that the header row from
- * a csv (or other) file represents.
- * @param {Grid} grid the grid we're importing into
- * @param {array} headerRow the header row that we wish to match against
- * the column definitions
- * @returns {array} an array of the attribute names that should be used
- * for that column, based on matching the headers or creating the headers
- *
- */
- processHeaders: function( grid, headerRow ) {
- var headers = [];
- if ( !grid.options.columnDefs || grid.options.columnDefs.length === 0 ){
- // we are going to create new columnDefs for all these columns, so just remove
- // spaces from the names to create fields
- headerRow.forEach( function( value, index ) {
- headers.push( value.replace( /[^0-9a-zA-Z\-_]/g, '_' ) );
- });
- return headers;
- } else {
- var lookupHash = service.flattenColumnDefs( grid, grid.options.columnDefs );
- headerRow.forEach( function( value, index ) {
- if ( lookupHash[value] ) {
- headers.push( lookupHash[value] );
- } else if ( lookupHash[ value.toLowerCase() ] ) {
- headers.push( lookupHash[ value.toLowerCase() ] );
- } else {
- headers.push( null );
- }
- });
- return headers;
- }
- },
-
-
- /**
- * @name flattenColumnDefs
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Runs through the column defs and creates a hash of
- * the displayName, name and field, and of each of those values forced to lower case,
- * with each pointing to the field or name
- * (whichever is present). Used to lookup column headers and decide what
- * attribute name to give to the resulting field.
- * @param {Grid} grid the grid we're importing into
- * @param {array} columnDefs the columnDefs that we should flatten
- * @returns {hash} the flattened version of the column def information, allowing
- * us to look up a value by `flattenedHash[ headerValue ]`
- */
- flattenColumnDefs: function( grid, columnDefs ){
- var flattenedHash = {};
- columnDefs.forEach( function( columnDef, index) {
- if ( columnDef.name ){
- flattenedHash[ columnDef.name ] = columnDef.field || columnDef.name;
- flattenedHash[ columnDef.name.toLowerCase() ] = columnDef.field || columnDef.name;
- }
-
- if ( columnDef.field ){
- flattenedHash[ columnDef.field ] = columnDef.field || columnDef.name;
- flattenedHash[ columnDef.field.toLowerCase() ] = columnDef.field || columnDef.name;
- }
-
- if ( columnDef.displayName ){
- flattenedHash[ columnDef.displayName ] = columnDef.field || columnDef.name;
- flattenedHash[ columnDef.displayName.toLowerCase() ] = columnDef.field || columnDef.name;
- }
-
- if ( columnDef.displayName && grid.options.importerHeaderFilter ){
- flattenedHash[ grid.options.importerHeaderFilter(columnDef.displayName) ] = columnDef.field || columnDef.name;
- flattenedHash[ grid.options.importerHeaderFilter(columnDef.displayName).toLowerCase() ] = columnDef.field || columnDef.name;
- }
- });
-
- return flattenedHash;
- },
-
-
- /**
- * @ngdoc function
- * @name addObjects
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Inserts our new objects into the grid data, and
- * sets the rows to dirty if the rowEdit feature is being used
- *
- * Does this by registering a watch on dataChanges, which essentially
- * is waiting on the result of the grid data watch, and downstream processing.
- *
- * When the callback is called, it deregisters itself - we don't want to run
- * again next time data is added.
- *
- * If we never get called, we deregister on destroy.
- *
- * @param {Grid} grid the grid we're importing into
- * @param {array} newObjects the objects we want to insert into the grid data
- * @returns {object} the new object
- */
- addObjects: function( grid, newObjects, $scope ){
- if ( grid.api.rowEdit ){
- var dataChangeDereg = grid.registerDataChangeCallback( function() {
- grid.api.rowEdit.setRowsDirty( newObjects );
- dataChangeDereg();
- }, [uiGridConstants.dataChange.ROW] );
-
- grid.importer.$scope.$on( '$destroy', dataChangeDereg );
- }
-
- grid.importer.$scope.$apply( grid.options.importerDataAddCallback( grid, newObjects ) );
-
- },
-
-
- /**
- * @ngdoc function
- * @name newObject
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Makes a new object based on `gridOptions.importerNewObject`,
- * or based on an empty object if not present
- * @param {Grid} grid the grid we're importing into
- * @returns {object} the new object
- */
- newObject: function( grid ){
- if ( typeof(grid.options) !== "undefined" && typeof(grid.options.importerNewObject) !== "undefined" ){
- return new grid.options.importerNewObject();
- } else {
- return {};
- }
- },
-
-
- /**
- * @ngdoc function
- * @name alertError
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Provides an internationalised user alert for the failure,
- * and logs a console message including diagnostic content.
- * Optionally, if the the `gridOptions.importerErrorCallback` routine
- * is defined, then calls that instead, allowing user specified error routines
- * @param {Grid} grid the grid we're importing into
- * @param {array} headerRow the header row that we wish to match against
- * the column definitions
- */
- alertError: function( grid, alertI18nToken, consoleMessage, context ){
- if ( grid.options.importerErrorCallback ){
- grid.options.importerErrorCallback( grid, alertI18nToken, consoleMessage, context );
- } else {
- $window.alert(i18nService.getSafeText( alertI18nToken ));
- gridUtil.logError(consoleMessage + context );
- }
- }
- };
-
- return service;
-
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.importer.directive:uiGridImporter
- * @element div
- * @restrict A
- *
- * @description Adds importer features to grid
- *
- */
- module.directive('uiGridImporter', ['uiGridImporterConstants', 'uiGridImporterService', 'gridUtil', '$compile',
- function (uiGridImporterConstants, uiGridImporterService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridImporterService.initializeGrid($scope, uiGridCtrl.grid);
- }
- };
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.importer.directive:uiGridImporterMenuItem
- * @element div
- * @restrict A
- *
- * @description Handles the processing from the importer menu item - once a file is
- * selected
- *
- */
- module.directive('uiGridImporterMenuItem', ['uiGridImporterConstants', 'uiGridImporterService', 'gridUtil', '$compile',
- function (uiGridImporterConstants, uiGridImporterService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- templateUrl: 'ui-grid/importerMenuItem',
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var handleFileSelect = function( event ){
- var target = event.srcElement || event.target;
-
- if (target && target.files && target.files.length === 1) {
- var fileObject = target.files[0];
- uiGridImporterService.importThisFile( grid, fileObject );
- target.form.reset();
- }
- };
-
- var fileChooser = $elm[0].querySelectorAll('.ui-grid-importer-file-chooser');
- var grid = uiGridCtrl.grid;
-
- if ( fileChooser.length !== 1 ){
- gridUtil.logError('Found > 1 or < 1 file choosers within the menu item, error, cannot continue');
- } else {
- fileChooser[0].addEventListener('change', handleFileSelect, false); // TODO: why the false on the end? Google
- }
- }
- };
- }
- ]);
-})();
-
-(function() {
- 'use strict';
- /**
- * @ngdoc overview
- * @name ui.grid.infiniteScroll
- *
- * @description
- *
- * #ui.grid.infiniteScroll
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides infinite scroll functionality to ui-grid
- *
- */
- var module = angular.module('ui.grid.infiniteScroll', ['ui.grid']);
- /**
- * @ngdoc service
- * @name ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- *
- * @description Service for infinite scroll features
- */
- module.service('uiGridInfiniteScrollService', ['gridUtil', '$compile', '$timeout', 'uiGridConstants', 'ScrollEvent', '$q', function (gridUtil, $compile, $timeout, uiGridConstants, ScrollEvent, $q) {
-
- var service = {
-
- /**
- * @ngdoc function
- * @name initializeGrid
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description This method register events and methods into grid public API
- */
-
- initializeGrid: function(grid, $scope) {
- service.defaultGridOptions(grid.options);
-
- if (!grid.options.enableInfiniteScroll){
- return;
- }
-
- grid.infiniteScroll = { dataLoading: false };
- service.setScrollDirections( grid, grid.options.infiniteScrollUp, grid.options.infiniteScrollDown );
- grid.api.core.on.scrollEnd($scope, service.handleScroll);
-
- /**
- * @ngdoc object
- * @name ui.grid.infiniteScroll.api:PublicAPI
- *
- * @description Public API for infinite scroll feature
- */
- var publicApi = {
- events: {
- infiniteScroll: {
-
- /**
- * @ngdoc event
- * @name needLoadMoreData
- * @eventOf ui.grid.infiniteScroll.api:PublicAPI
- * @description This event fires when scroll reaches bottom percentage of grid
- * and needs to load data
- */
-
- needLoadMoreData: function ($scope, fn) {
- },
-
- /**
- * @ngdoc event
- * @name needLoadMoreDataTop
- * @eventOf ui.grid.infiniteScroll.api:PublicAPI
- * @description This event fires when scroll reaches top percentage of grid
- * and needs to load data
- */
-
- needLoadMoreDataTop: function ($scope, fn) {
- }
- }
- },
- methods: {
- infiniteScroll: {
-
- /**
- * @ngdoc function
- * @name dataLoaded
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Call this function when you have loaded the additional data
- * requested. You should set scrollUp and scrollDown to indicate
- * whether there are still more pages in each direction.
- *
- * If you call dataLoaded without first calling `saveScrollPercentage` then we will
- * scroll the user to the start of the newly loaded data, which usually gives a smooth scroll
- * experience, but can give a jumpy experience with large `infiniteScrollRowsFromEnd` values, and
- * on variable speed internet connections. Using `saveScrollPercentage` as demonstrated in the tutorial
- * should give a smoother scrolling experience for users.
- *
- * See infinite_scroll tutorial for example of usage
- * @param {boolean} scrollUp if set to false flags that there are no more pages upwards, so don't fire
- * any more infinite scroll events upward
- * @param {boolean} scrollDown if set to false flags that there are no more pages downwards, so don't
- * fire any more infinite scroll events downward
- * @returns {promise} a promise that is resolved when the grid scrolling is fully adjusted. If you're
- * planning to remove pages, you should wait on this promise first, or you'll break the scroll positioning
- */
- dataLoaded: function( scrollUp, scrollDown ) {
- service.setScrollDirections(grid, scrollUp, scrollDown);
-
- var promise = service.adjustScroll(grid).then(function() {
- grid.infiniteScroll.dataLoading = false;
- });
-
- return promise;
- },
-
- /**
- * @ngdoc function
- * @name resetScroll
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Call this function when you have taken some action that makes the current
- * scroll position invalid. For example, if you're using external sorting and you've resorted
- * then you might reset the scroll, or if you've otherwise substantially changed the data, perhaps
- * you've reused an existing grid for a new data set
- *
- * You must tell us whether there is data upwards or downwards after the reset
- *
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- resetScroll: function( scrollUp, scrollDown ) {
- service.setScrollDirections( grid, scrollUp, scrollDown);
-
- service.adjustInfiniteScrollPosition(grid, 0);
- },
-
-
- /**
- * @ngdoc function
- * @name saveScrollPercentage
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Saves the scroll percentage and number of visible rows before you adjust the data,
- * used if you're subsequently going to call `dataRemovedTop` or `dataRemovedBottom`
- */
- saveScrollPercentage: function() {
- grid.infiniteScroll.prevScrollTop = grid.renderContainers.body.prevScrollTop;
- grid.infiniteScroll.previousVisibleRows = grid.getVisibleRowCount();
- },
-
-
- /**
- * @ngdoc function
- * @name dataRemovedTop
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the top
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedTop: function( scrollUp, scrollDown ) {
- service.dataRemovedTop( grid, scrollUp, scrollDown );
- },
-
- /**
- * @ngdoc function
- * @name dataRemovedBottom
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the bottom
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedBottom: function( scrollUp, scrollDown ) {
- service.dataRemovedBottom( grid, scrollUp, scrollDown );
- },
-
- /**
- * @ngdoc function
- * @name setScrollDirections
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Sets the scrollUp and scrollDown flags, handling nulls and undefined,
- * and also sets the grid.suppressParentScroll
- * @param {boolean} scrollUp whether there are pages available up - defaults to false
- * @param {boolean} scrollDown whether there are pages available down - defaults to true
- */
- setScrollDirections: function ( scrollUp, scrollDown ) {
- service.setScrollDirections( grid, scrollUp, scrollDown );
- }
-
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.infiniteScroll.api:GridOptions
- *
- * @description GridOptions for infinite scroll feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableInfiniteScroll
- * @propertyOf ui.grid.infiniteScroll.api:GridOptions
- * @description Enable infinite scrolling for this grid
- * <br/>Defaults to true
- */
- gridOptions.enableInfiniteScroll = gridOptions.enableInfiniteScroll !== false;
-
- /**
- * @ngdoc property
- * @name infiniteScrollRowsFromEnd
- * @propertyOf ui.grid.class:GridOptions
- * @description This setting controls how close to the end of the dataset a user gets before
- * more data is requested by the infinite scroll, whether scrolling up or down. This allows you to
- * 'prefetch' rows before the user actually runs out of scrolling.
- *
- * Note that if you set this value too high it may give jumpy scrolling behaviour, if you're getting
- * this behaviour you could use the `saveScrollPercentageMethod` right before loading your data, and we'll
- * preserve that scroll position
- *
- * <br> Defaults to 20
- */
- gridOptions.infiniteScrollRowsFromEnd = gridOptions.infiniteScrollRowsFromEnd || 20;
-
- /**
- * @ngdoc property
- * @name infiniteScrollUp
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether you allow infinite scroll up, implying that the first page of data
- * you have displayed is in the middle of your data set. If set to true then we trigger the
- * needMoreDataTop event when the user hits the top of the scrollbar.
- * <br> Defaults to false
- */
- gridOptions.infiniteScrollUp = gridOptions.infiniteScrollUp === true;
-
- /**
- * @ngdoc property
- * @name infiniteScrollDown
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether you allow infinite scroll down, implying that the first page of data
- * you have displayed is in the middle of your data set. If set to true then we trigger the
- * needMoreData event when the user hits the bottom of the scrollbar.
- * <br> Defaults to true
- */
- gridOptions.infiniteScrollDown = gridOptions.infiniteScrollDown !== false;
- },
-
-
- /**
- * @ngdoc function
- * @name setScrollDirections
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Sets the scrollUp and scrollDown flags, handling nulls and undefined,
- * and also sets the grid.suppressParentScroll
- * @param {grid} grid the grid we're operating on
- * @param {boolean} scrollUp whether there are pages available up - defaults to false
- * @param {boolean} scrollDown whether there are pages available down - defaults to true
- */
- setScrollDirections: function ( grid, scrollUp, scrollDown ) {
- grid.infiniteScroll.scrollUp = ( scrollUp === true );
- grid.suppressParentScrollUp = ( scrollUp === true );
-
- grid.infiniteScroll.scrollDown = ( scrollDown !== false);
- grid.suppressParentScrollDown = ( scrollDown !== false);
- },
-
-
- /**
- * @ngdoc function
- * @name handleScroll
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Called whenever the grid scrolls, determines whether the scroll should
- * trigger an infinite scroll request for more data
- * @param {object} args the args from the event
- */
- handleScroll: function (args) {
- // don't request data if already waiting for data, or if source is coming from ui.grid.adjustInfiniteScrollPosition() function
- if ( args.grid.infiniteScroll && args.grid.infiniteScroll.dataLoading || args.source === 'ui.grid.adjustInfiniteScrollPosition' ){
- return;
- }
-
- if (args.y) {
-
- // If the user is scrolling very quickly all the way to the top/bottom, the scroll handler can get confused
- // about the direction. First we check if they've gone all the way, and data always is loaded in this case.
- if (args.y.percentage === 0) {
- args.grid.scrollDirection = uiGridConstants.scrollDirection.UP;
- service.loadData(args.grid);
- } else if (args.y.percentage === 1) {
- args.grid.scrollDirection = uiGridConstants.scrollDirection.DOWN;
- service.loadData(args.grid);
- } else { // Scroll position is somewhere in between top/bottom, so determine whether it's far enough to load more data.
- var percentage;
- var targetPercentage = args.grid.options.infiniteScrollRowsFromEnd / args.grid.renderContainers.body.visibleRowCache.length;
- if (args.grid.scrollDirection === uiGridConstants.scrollDirection.UP ) {
- percentage = args.y.percentage;
- if (percentage <= targetPercentage){
- service.loadData(args.grid);
- }
- } else if (args.grid.scrollDirection === uiGridConstants.scrollDirection.DOWN) {
- percentage = 1 - args.y.percentage;
- if (percentage <= targetPercentage){
- service.loadData(args.grid);
- }
- }
- }
- }
- },
-
-
- /**
- * @ngdoc function
- * @name loadData
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description This function fires 'needLoadMoreData' or 'needLoadMoreDataTop' event based on scrollDirection
- * and whether there are more pages upwards or downwards. It also stores the number of rows that we had previously,
- * and clears out any saved scroll position so that we know whether or not the user calls `saveScrollPercentage`
- * @param {Grid} grid the grid we're working on
- */
- loadData: function (grid) {
- // save number of currently visible rows to calculate new scroll position later - we know that we want
- // to be at approximately the row we're currently at
- grid.infiniteScroll.previousVisibleRows = grid.renderContainers.body.visibleRowCache.length;
- grid.infiniteScroll.direction = grid.scrollDirection;
- delete grid.infiniteScroll.prevScrollTop;
-
- if (grid.scrollDirection === uiGridConstants.scrollDirection.UP && grid.infiniteScroll.scrollUp ) {
- grid.infiniteScroll.dataLoading = true;
- grid.api.infiniteScroll.raise.needLoadMoreDataTop();
- } else if (grid.scrollDirection === uiGridConstants.scrollDirection.DOWN && grid.infiniteScroll.scrollDown ) {
- grid.infiniteScroll.dataLoading = true;
- grid.api.infiniteScroll.raise.needLoadMoreData();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name adjustScroll
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Once we are informed that data has been loaded, adjust the scroll position to account for that
- * addition and to make things look clean.
- *
- * If we're scrolling up we scroll to the first row of the old data set -
- * so we're assuming that you would have gotten to the top of the grid (from the 20% need more data trigger) by
- * the time the data comes back. If we're scrolling down we scoll to the last row of the old data set - so we're
- * assuming that you would have gotten to the bottom of the grid (from the 80% need more data trigger) by the time
- * the data comes back.
- *
- * Neither of these are good assumptions, but making this a smoother experience really requires
- * that trigger to not be a percentage, and to be much closer to the end of the data (say, 5 rows off the end). Even then
- * it'd be better still to actually run into the end. But if the data takes a while to come back, they may have scrolled
- * somewhere else in the mean-time, in which case they'll get a jump back to the new data. Anyway, this will do for
- * now, until someone wants to do better.
- * @param {Grid} grid the grid we're working on
- * @returns {promise} a promise that is resolved when scrolling has finished
- */
- adjustScroll: function(grid){
- var promise = $q.defer();
- $timeout(function () {
- var newPercentage, viewportHeight, rowHeight, newVisibleRows, oldTop, newTop;
-
- viewportHeight = grid.getViewportHeight() + grid.headerHeight - grid.renderContainers.body.headerHeight - grid.scrollbarHeight;
- rowHeight = grid.options.rowHeight;
-
- if ( grid.infiniteScroll.direction === undefined ){
- // called from initialize, tweak our scroll up a little
- service.adjustInfiniteScrollPosition(grid, 0);
- }
-
- newVisibleRows = grid.getVisibleRowCount();
-
- // in case not enough data is loaded to enable scroller - load more data
- var canvasHeight = rowHeight * newVisibleRows;
- if (grid.infiniteScroll.scrollDown && (viewportHeight > canvasHeight)) {
- grid.api.infiniteScroll.raise.needLoadMoreData();
- }
-
- if ( grid.infiniteScroll.direction === uiGridConstants.scrollDirection.UP ){
- oldTop = grid.infiniteScroll.prevScrollTop || 0;
- newTop = oldTop + (newVisibleRows - grid.infiniteScroll.previousVisibleRows)*rowHeight;
- service.adjustInfiniteScrollPosition(grid, newTop);
- $timeout( function() {
- promise.resolve();
- });
- }
-
- if ( grid.infiniteScroll.direction === uiGridConstants.scrollDirection.DOWN ){
- newTop = grid.infiniteScroll.prevScrollTop || (grid.infiniteScroll.previousVisibleRows*rowHeight - viewportHeight);
- service.adjustInfiniteScrollPosition(grid, newTop);
- $timeout( function() {
- promise.resolve();
- });
- }
- }, 0);
-
- return promise.promise;
- },
-
-
- /**
- * @ngdoc function
- * @name adjustInfiniteScrollPosition
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description This function fires 'needLoadMoreData' or 'needLoadMoreDataTop' event based on scrollDirection
- * @param {Grid} grid the grid we're working on
- * @param {number} scrollTop the position through the grid that we want to scroll to
- */
- adjustInfiniteScrollPosition: function (grid, scrollTop) {
- var scrollEvent = new ScrollEvent(grid, null, null, 'ui.grid.adjustInfiniteScrollPosition'),
- visibleRows = grid.getVisibleRowCount(),
- viewportHeight = grid.getViewportHeight() + grid.headerHeight - grid.renderContainers.body.headerHeight - grid.scrollbarHeight,
- rowHeight = grid.options.rowHeight,
- scrollHeight = visibleRows*rowHeight-viewportHeight;
-
- //for infinite scroll, if there are pages upwards then never allow it to be at the zero position so the up button can be active
- if (scrollTop === 0 && grid.infiniteScroll.scrollUp) {
- // using pixels results in a relative scroll, hence we have to use percentage
- scrollEvent.y = {percentage: 1/scrollHeight};
- }
- else {
- scrollEvent.y = {percentage: scrollTop/scrollHeight};
- }
- grid.scrollContainers('', scrollEvent);
- },
-
-
- /**
- * @ngdoc function
- * @name dataRemovedTop
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the top. You should
- * have called `saveScrollPercentage` before you remove the data, and if you're doing this in
- * response to a `needMoreData` you should wait until the promise from `loadData` has resolved
- * before you start removing data
- * @param {Grid} grid the grid we're working on
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedTop: function( grid, scrollUp, scrollDown ) {
- var newVisibleRows, oldTop, newTop, rowHeight;
- service.setScrollDirections( grid, scrollUp, scrollDown );
-
- newVisibleRows = grid.renderContainers.body.visibleRowCache.length;
- oldTop = grid.infiniteScroll.prevScrollTop;
- rowHeight = grid.options.rowHeight;
-
- // since we removed from the top, our new scroll row will be the old scroll row less the number
- // of rows removed
- newTop = oldTop - ( grid.infiniteScroll.previousVisibleRows - newVisibleRows )*rowHeight;
-
- service.adjustInfiniteScrollPosition( grid, newTop );
- },
-
- /**
- * @ngdoc function
- * @name dataRemovedBottom
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the bottom. You should
- * have called `saveScrollPercentage` before you remove the data, and if you're doing this in
- * response to a `needMoreData` you should wait until the promise from `loadData` has resolved
- * before you start removing data
- * @param {Grid} grid the grid we're working on
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedBottom: function( grid, scrollUp, scrollDown ) {
- var newTop;
- service.setScrollDirections( grid, scrollUp, scrollDown );
-
- newTop = grid.infiniteScroll.prevScrollTop;
-
- service.adjustInfiniteScrollPosition( grid, newTop );
- }
- };
- return service;
- }]);
- /**
- * @ngdoc directive
- * @name ui.grid.infiniteScroll.directive:uiGridInfiniteScroll
- * @element div
- * @restrict A
- *
- * @description Adds infinite scroll features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.infiniteScroll']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Alex', car: 'Toyota' },
- { name: 'Sam', car: 'Lexus' }
- ];
-
- $scope.columnDefs = [
- {name: 'name'},
- {name: 'car'}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-infinite-scroll="20"></div>
- </div>
- </file>
- </example>
- */
-
- module.directive('uiGridInfiniteScroll', ['uiGridInfiniteScrollService',
- function (uiGridInfiniteScrollService) {
- return {
- priority: -200,
- scope: false,
- require: '^uiGrid',
- compile: function($scope, $elm, $attr){
- return {
- pre: function($scope, $elm, $attr, uiGridCtrl) {
- uiGridInfiniteScrollService.initializeGrid(uiGridCtrl.grid, $scope);
- },
- post: function($scope, $elm, $attr) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.moveColumns
- * @description
- *
- * # ui.grid.moveColumns
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides column moving capability to ui.grid. It enables to change the position of columns.
- * <div doc-module-components="ui.grid.moveColumns"></div>
- */
- var module = angular.module('ui.grid.moveColumns', ['ui.grid']);
-
- /**
- * @ngdoc service
- * @name ui.grid.moveColumns.service:uiGridMoveColumnService
- * @description Service for column moving feature.
- */
- module.service('uiGridMoveColumnService', ['$q', '$timeout', '$log', 'ScrollEvent', 'uiGridConstants', 'gridUtil', function ($q, $timeout, $log, ScrollEvent, uiGridConstants, gridUtil) {
-
- var service = {
- initializeGrid: function (grid) {
- var self = this;
- this.registerPublicApi(grid);
- this.defaultGridOptions(grid.options);
- grid.moveColumns = {orderCache: []}; // Used to cache the order before columns are rebuilt
- grid.registerColumnBuilder(self.movableColumnBuilder);
- grid.registerDataChangeCallback(self.verifyColumnOrder, [uiGridConstants.dataChange.COLUMN]);
- },
- registerPublicApi: function (grid) {
- var self = this;
- /**
- * @ngdoc object
- * @name ui.grid.moveColumns.api:PublicApi
- * @description Public Api for column moving feature.
- */
- var publicApi = {
- events: {
- /**
- * @ngdoc event
- * @name columnPositionChanged
- * @eventOf ui.grid.moveColumns.api:PublicApi
- * @description raised when column is moved
- * <pre>
- * gridApi.colMovable.on.columnPositionChanged(scope,function(colDef, originalPosition, newPosition){})
- * </pre>
- * @param {object} colDef the column that was moved
- * @param {integer} originalPosition of the column
- * @param {integer} finalPosition of the column
- */
- colMovable: {
- columnPositionChanged: function (colDef, originalPosition, newPosition) {
- }
- }
- },
- methods: {
- /**
- * @ngdoc method
- * @name moveColumn
- * @methodOf ui.grid.moveColumns.api:PublicApi
- * @description Method can be used to change column position.
- * <pre>
- * gridApi.colMovable.moveColumn(oldPosition, newPosition)
- * </pre>
- * @param {integer} originalPosition of the column
- * @param {integer} finalPosition of the column
- */
- colMovable: {
- moveColumn: function (originalPosition, finalPosition) {
- var columns = grid.columns;
- if (!angular.isNumber(originalPosition) || !angular.isNumber(finalPosition)) {
- gridUtil.logError('MoveColumn: Please provide valid values for originalPosition and finalPosition');
- return;
- }
- var nonMovableColumns = 0;
- for (var i = 0; i < columns.length; i++) {
- if ((angular.isDefined(columns[i].colDef.visible) && columns[i].colDef.visible === false) || columns[i].isRowHeader === true) {
- nonMovableColumns++;
- }
- }
- if (originalPosition >= (columns.length - nonMovableColumns) || finalPosition >= (columns.length - nonMovableColumns)) {
- gridUtil.logError('MoveColumn: Invalid values for originalPosition, finalPosition');
- return;
- }
- var findPositionForRenderIndex = function (index) {
- var position = index;
- for (var i = 0; i <= position; i++) {
- if (angular.isDefined(columns[i]) && ((angular.isDefined(columns[i].colDef.visible) && columns[i].colDef.visible === false) || columns[i].isRowHeader === true)) {
- position++;
- }
- }
- return position;
- };
- self.redrawColumnAtPosition(grid, findPositionForRenderIndex(originalPosition), findPositionForRenderIndex(finalPosition));
- }
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
- defaultGridOptions: function (gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.moveColumns.api:GridOptions
- *
- * @description Options for configuring the move column feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- /**
- * @ngdoc object
- * @name enableColumnMoving
- * @propertyOf ui.grid.moveColumns.api:GridOptions
- * @description If defined, sets the default value for the colMovable flag on each individual colDefs
- * if their individual enableColumnMoving configuration is not defined. Defaults to true.
- */
- gridOptions.enableColumnMoving = gridOptions.enableColumnMoving !== false;
- },
- movableColumnBuilder: function (colDef, col, gridOptions) {
- var promises = [];
- /**
- * @ngdoc object
- * @name ui.grid.moveColumns.api:ColumnDef
- *
- * @description Column Definition for move column feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
- /**
- * @ngdoc object
- * @name enableColumnMoving
- * @propertyOf ui.grid.moveColumns.api:ColumnDef
- * @description Enable column moving for the column.
- */
- colDef.enableColumnMoving = colDef.enableColumnMoving === undefined ? gridOptions.enableColumnMoving
- : colDef.enableColumnMoving;
- return $q.all(promises);
- },
- /**
- * @ngdoc method
- * @name updateColumnCache
- * @methodOf ui.grid.moveColumns
- * @description Cache the current order of columns, so we can restore them after new columnDefs are defined
- */
- updateColumnCache: function(grid){
- grid.moveColumns.orderCache = grid.getOnlyDataColumns();
- },
- /**
- * @ngdoc method
- * @name verifyColumnOrder
- * @methodOf ui.grid.moveColumns
- * @description dataChangeCallback which uses the cached column order to restore the column order
- * when it is reset by altering the columnDefs array.
- */
- verifyColumnOrder: function(grid){
- var headerRowOffset = grid.rowHeaderColumns.length;
- var newIndex;
-
- angular.forEach(grid.moveColumns.orderCache, function(cacheCol, cacheIndex){
- newIndex = grid.columns.indexOf(cacheCol);
- if ( newIndex !== -1 && newIndex - headerRowOffset !== cacheIndex ){
- var column = grid.columns.splice(newIndex, 1)[0];
- grid.columns.splice(cacheIndex + headerRowOffset, 0, column);
- }
- });
- },
- redrawColumnAtPosition: function (grid, originalPosition, newPosition) {
- var columns = grid.columns;
-
- if (originalPosition === newPosition) {
- return;
- }
-
- //check columns in between move-range to make sure they are visible columns
- var pos = (originalPosition < newPosition) ? originalPosition + 1 : originalPosition - 1;
- var i0 = Math.min(pos, newPosition);
- for (i0; i0 <= Math.max(pos, newPosition); i0++) {
- if (columns[i0].visible) {
- break;
- }
- }
- if (i0 > Math.max(pos, newPosition)) {
- //no visible column found, column did not visibly move
- return;
- }
-
- var originalColumn = columns[originalPosition];
- if (originalColumn.colDef.enableColumnMoving) {
- if (originalPosition > newPosition) {
- for (var i1 = originalPosition; i1 > newPosition; i1--) {
- columns[i1] = columns[i1 - 1];
- }
- }
- else if (newPosition > originalPosition) {
- for (var i2 = originalPosition; i2 < newPosition; i2++) {
- columns[i2] = columns[i2 + 1];
- }
- }
- columns[newPosition] = originalColumn;
- service.updateColumnCache(grid);
- grid.queueGridRefresh();
- $timeout(function () {
- grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- grid.api.colMovable.raise.columnPositionChanged(originalColumn.colDef, originalPosition, newPosition);
- });
- }
- }
- };
- return service;
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.moveColumns.directive:uiGridMoveColumns
- * @element div
- * @restrict A
- * @description Adds column moving features to the ui-grid directive.
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.moveColumns']);
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO', age: 45 },
- { name: 'Frank', title: 'Lowly Developer', age: 25 },
- { name: 'Jenny', title: 'Highly Developer', age: 35 }
- ];
- $scope.columnDefs = [
- {name: 'name'},
- {name: 'title'},
- {name: 'age'}
- ];
- }]);
- </file>
- <file name="main.css">
- .grid {
- width: 100%;
- height: 150px;
- }
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div class="grid" ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-move-columns></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridMoveColumns', ['uiGridMoveColumnService', function (uiGridMoveColumnService) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridMoveColumnService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.moveColumns.directive:uiGridHeaderCell
- * @element div
- * @restrict A
- *
- * @description Stacks on top of ui.grid.uiGridHeaderCell to provide capability to be able to move it to reposition column.
- *
- * On receiving mouseDown event headerCell is cloned, now as the mouse moves the cloned header cell also moved in the grid.
- * In case the moving cloned header cell reaches the left or right extreme of grid, grid scrolling is triggered (if horizontal scroll exists).
- * On mouseUp event column is repositioned at position where mouse is released and cloned header cell is removed.
- *
- * Events that invoke cloning of header cell:
- * - mousedown
- *
- * Events that invoke movement of cloned header cell:
- * - mousemove
- *
- * Events that invoke repositioning of column:
- * - mouseup
- */
- module.directive('uiGridHeaderCell', ['$q', 'gridUtil', 'uiGridMoveColumnService', '$document', '$log', 'uiGridConstants', 'ScrollEvent',
- function ($q, gridUtil, uiGridMoveColumnService, $document, $log, uiGridConstants, ScrollEvent) {
- return {
- priority: -10,
- require: '^uiGrid',
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- if ($scope.col.colDef.enableColumnMoving) {
-
- /*
- * Our general approach to column move is that we listen to a touchstart or mousedown
- * event over the column header. When we hear one, then we wait for a move of the same type
- * - if we are a touchstart then we listen for a touchmove, if we are a mousedown we listen for
- * a mousemove (i.e. a drag) before we decide that there's a move underway. If there's never a move,
- * and we instead get a mouseup or a touchend, then we just drop out again and do nothing.
- *
- */
- var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') );
-
- var gridLeft;
- var previousMouseX;
- var totalMouseMovement;
- var rightMoveLimit;
- var elmCloned = false;
- var movingElm;
- var reducedWidth;
- var moveOccurred = false;
-
- var downFn = function( event ){
- //Setting some variables required for calculations.
- gridLeft = $scope.grid.element[0].getBoundingClientRect().left;
- if ( $scope.grid.hasLeftContainer() ){
- gridLeft += $scope.grid.renderContainers.left.header[0].getBoundingClientRect().width;
- }
-
- previousMouseX = event.pageX || (event.originalEvent ? event.originalEvent.pageX : 0);
- totalMouseMovement = 0;
- rightMoveLimit = gridLeft + $scope.grid.getViewportWidth();
-
- if ( event.type === 'mousedown' ){
- $document.on('mousemove', moveFn);
- $document.on('mouseup', upFn);
- } else if ( event.type === 'touchstart' ){
- $document.on('touchmove', moveFn);
- $document.on('touchend', upFn);
- }
- };
-
- var moveFn = function( event ) {
- var pageX = event.pageX || (event.originalEvent ? event.originalEvent.pageX : 0);
- var changeValue = pageX - previousMouseX;
- if ( changeValue === 0 ){ return; }
- //Disable text selection in Chrome during column move
- document.onselectstart = function() { return false; };
-
- moveOccurred = true;
-
- if (!elmCloned) {
- cloneElement();
- }
- else if (elmCloned) {
- moveElement(changeValue);
- previousMouseX = pageX;
- }
- };
-
- var upFn = function( event ){
- //Re-enable text selection after column move
- document.onselectstart = null;
-
- //Remove the cloned element on mouse up.
- if (movingElm) {
- movingElm.remove();
- elmCloned = false;
- }
-
- offAllEvents();
- onDownEvents();
-
- if (!moveOccurred){
- return;
- }
-
- var columns = $scope.grid.columns;
- var columnIndex = 0;
- for (var i = 0; i < columns.length; i++) {
- if (columns[i].colDef.name !== $scope.col.colDef.name) {
- columnIndex++;
- }
- else {
- break;
- }
- }
-
- var targetIndex;
-
- //Case where column should be moved to a position on its left
- if (totalMouseMovement < 0) {
- var totalColumnsLeftWidth = 0;
- var il;
- if ( $scope.grid.isRTL() ){
- for (il = columnIndex + 1; il < columns.length; il++) {
- if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) {
- totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width;
- if (totalColumnsLeftWidth > Math.abs(totalMouseMovement)) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, il - 1);
- break;
- }
- }
- }
- }
- else {
- for (il = columnIndex - 1; il >= 0; il--) {
- if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) {
- totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width;
- if (totalColumnsLeftWidth > Math.abs(totalMouseMovement)) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, il + 1);
- break;
- }
- }
- }
- }
-
- //Case where column should be moved to beginning (or end in RTL) of the grid.
- if (totalColumnsLeftWidth < Math.abs(totalMouseMovement)) {
- targetIndex = 0;
- if ( $scope.grid.isRTL() ){
- targetIndex = columns.length - 1;
- }
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, targetIndex);
- }
- }
-
- //Case where column should be moved to a position on its right
- else if (totalMouseMovement > 0) {
- var totalColumnsRightWidth = 0;
- var ir;
- if ( $scope.grid.isRTL() ){
- for (ir = columnIndex - 1; ir > 0; ir--) {
- if (angular.isUndefined(columns[ir].colDef.visible) || columns[ir].colDef.visible === true) {
- totalColumnsRightWidth += columns[ir].drawnWidth || columns[ir].width || columns[ir].colDef.width;
- if (totalColumnsRightWidth > totalMouseMovement) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, ir);
- break;
- }
- }
- }
- }
- else {
- for (ir = columnIndex + 1; ir < columns.length; ir++) {
- if (angular.isUndefined(columns[ir].colDef.visible) || columns[ir].colDef.visible === true) {
- totalColumnsRightWidth += columns[ir].drawnWidth || columns[ir].width || columns[ir].colDef.width;
- if (totalColumnsRightWidth > totalMouseMovement) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, ir - 1);
- break;
- }
- }
- }
- }
-
-
- //Case where column should be moved to end (or beginning in RTL) of the grid.
- if (totalColumnsRightWidth < totalMouseMovement) {
- targetIndex = columns.length - 1;
- if ( $scope.grid.isRTL() ){
- targetIndex = 0;
- }
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, targetIndex);
- }
- }
-
-
-
- };
-
- var onDownEvents = function(){
- $contentsElm.on('touchstart', downFn);
- $contentsElm.on('mousedown', downFn);
- };
-
- var offAllEvents = function() {
- $contentsElm.off('touchstart', downFn);
- $contentsElm.off('mousedown', downFn);
-
- $document.off('mousemove', moveFn);
- $document.off('touchmove', moveFn);
-
- $document.off('mouseup', upFn);
- $document.off('touchend', upFn);
- };
-
- onDownEvents();
-
-
- var cloneElement = function () {
- elmCloned = true;
-
- //Cloning header cell and appending to current header cell.
- movingElm = $elm.clone();
- $elm.parent().append(movingElm);
-
- //Left of cloned element should be aligned to original header cell.
- movingElm.addClass('movingColumn');
- var movingElementStyles = {};
- movingElementStyles.left = $elm[0].offsetLeft + 'px';
- var gridRight = $scope.grid.element[0].getBoundingClientRect().right;
- var elmRight = $elm[0].getBoundingClientRect().right;
- if (elmRight > gridRight) {
- reducedWidth = $scope.col.drawnWidth + (gridRight - elmRight);
- movingElementStyles.width = reducedWidth + 'px';
- }
- movingElm.css(movingElementStyles);
- };
-
- var moveElement = function (changeValue) {
- //Calculate total column width
- var columns = $scope.grid.columns;
- var totalColumnWidth = 0;
- for (var i = 0; i < columns.length; i++) {
- if (angular.isUndefined(columns[i].colDef.visible) || columns[i].colDef.visible === true) {
- totalColumnWidth += columns[i].drawnWidth || columns[i].width || columns[i].colDef.width;
- }
- }
-
- //Calculate new position of left of column
- var currentElmLeft = movingElm[0].getBoundingClientRect().left - 1;
- var currentElmRight = movingElm[0].getBoundingClientRect().right;
- var newElementLeft;
-
- newElementLeft = currentElmLeft - gridLeft + changeValue;
- newElementLeft = newElementLeft < rightMoveLimit ? newElementLeft : rightMoveLimit;
-
- //Update css of moving column to adjust to new left value or fire scroll in case column has reached edge of grid
- if ((currentElmLeft >= gridLeft || changeValue > 0) && (currentElmRight <= rightMoveLimit || changeValue < 0)) {
- movingElm.css({visibility: 'visible', 'left': (movingElm[0].offsetLeft +
- (newElementLeft < rightMoveLimit ? changeValue : (rightMoveLimit - currentElmLeft))) + 'px'});
- }
- else if (totalColumnWidth > Math.ceil(uiGridCtrl.grid.gridWidth)) {
- changeValue *= 8;
- var scrollEvent = new ScrollEvent($scope.col.grid, null, null, 'uiGridHeaderCell.moveElement');
- scrollEvent.x = {pixels: changeValue};
- scrollEvent.grid.scrollContainers('',scrollEvent);
- }
-
- //Calculate total width of columns on the left of the moving column and the mouse movement
- var totalColumnsLeftWidth = 0;
- for (var il = 0; il < columns.length; il++) {
- if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) {
- if (columns[il].colDef.name !== $scope.col.colDef.name) {
- totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width;
- }
- else {
- break;
- }
- }
- }
- if ($scope.newScrollLeft === undefined) {
- totalMouseMovement += changeValue;
- }
- else {
- totalMouseMovement = $scope.newScrollLeft + newElementLeft - totalColumnsLeftWidth;
- }
-
- //Increase width of moving column, in case the rightmost column was moved and its width was
- //decreased because of overflow
- if (reducedWidth < $scope.col.drawnWidth) {
- reducedWidth += Math.abs(changeValue);
- movingElm.css({'width': reducedWidth + 'px'});
- }
- };
-
- $scope.$on('$destroy', offAllEvents);
- }
- }
- };
- }
- };
- }]);
-})();
-
-(function() {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.pagination
- *
- * @description
- *
- * # ui.grid.pagination
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides pagination support to ui-grid
- */
- var module = angular.module('ui.grid.pagination', ['ng', 'ui.grid']);
-
- /**
- * @ngdoc service
- * @name ui.grid.pagination.service:uiGridPaginationService
- *
- * @description Service for the pagination feature
- */
- module.service('uiGridPaginationService', ['gridUtil',
- function (gridUtil) {
- var service = {
- /**
- * @ngdoc method
- * @name initializeGrid
- * @methodOf ui.grid.pagination.service:uiGridPaginationService
- * @description Attaches the service to a certain grid
- * @param {Grid} grid The grid we want to work with
- */
- initializeGrid: function (grid) {
- service.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.pagination.api:PublicAPI
- *
- * @description Public API for the pagination feature
- */
- var publicApi = {
- events: {
- pagination: {
- /**
- * @ngdoc event
- * @name paginationChanged
- * @eventOf ui.grid.pagination.api:PublicAPI
- * @description This event fires when the pageSize or currentPage changes
- * @param {int} currentPage requested page number
- * @param {int} pageSize requested page size
- */
- paginationChanged: function (currentPage, pageSize) { }
- }
- },
- methods: {
- pagination: {
- /**
- * @ngdoc method
- * @name getPage
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Returns the number of the current page
- */
- getPage: function () {
- return grid.options.enablePagination ? grid.options.paginationCurrentPage : null;
- },
- /**
- * @ngdoc method
- * @name getFirstRowIndex
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Returns the index of the first row of the current page.
- */
- getFirstRowIndex: function () {
- if (grid.options.useCustomPagination) {
- return grid.options.paginationPageSizes.reduce(function(result, size, index) {
- return index < grid.options.paginationCurrentPage - 1 ? result + size : result;
- }, 0);
- }
- return ((grid.options.paginationCurrentPage - 1) * grid.options.paginationPageSize);
- },
- /**
- * @ngdoc method
- * @name getLastRowIndex
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Returns the index of the last row of the current page.
- */
- getLastRowIndex: function () {
- if (grid.options.useCustomPagination) {
- return publicApi.methods.pagination.getFirstRowIndex() + grid.options.paginationPageSizes[grid.options.paginationCurrentPage - 1];
- }
- return Math.min(grid.options.paginationCurrentPage * grid.options.paginationPageSize, grid.options.totalItems);
- },
- /**
- * @ngdoc method
- * @name getTotalPages
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Returns the total number of pages
- */
- getTotalPages: function () {
- if (!grid.options.enablePagination) {
- return null;
- }
-
- if (grid.options.useCustomPagination) {
- return grid.options.paginationPageSizes.length;
- }
-
- return (grid.options.totalItems === 0) ? 1 : Math.ceil(grid.options.totalItems / grid.options.paginationPageSize);
- },
- /**
- * @ngdoc method
- * @name nextPage
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Moves to the next page, if possible
- */
- nextPage: function () {
- if (!grid.options.enablePagination) {
- return;
- }
-
- if (grid.options.totalItems > 0) {
- grid.options.paginationCurrentPage = Math.min(
- grid.options.paginationCurrentPage + 1,
- publicApi.methods.pagination.getTotalPages()
- );
- } else {
- grid.options.paginationCurrentPage++;
- }
- },
- /**
- * @ngdoc method
- * @name previousPage
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Moves to the previous page, if we're not on the first page
- */
- previousPage: function () {
- if (!grid.options.enablePagination) {
- return;
- }
-
- grid.options.paginationCurrentPage = Math.max(grid.options.paginationCurrentPage - 1, 1);
- },
- /**
- * @ngdoc method
- * @name seek
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Moves to the requested page
- * @param {int} page The number of the page that should be displayed
- */
- seek: function (page) {
- if (!grid.options.enablePagination) {
- return;
- }
- if (!angular.isNumber(page) || page < 1) {
- throw 'Invalid page number: ' + page;
- }
-
- grid.options.paginationCurrentPage = Math.min(page, publicApi.methods.pagination.getTotalPages());
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- var processPagination = function( renderableRows ){
- if (grid.options.useExternalPagination || !grid.options.enablePagination) {
- return renderableRows;
- }
- //client side pagination
- var pageSize = parseInt(grid.options.paginationPageSize, 10);
- var currentPage = parseInt(grid.options.paginationCurrentPage, 10);
-
- var visibleRows = renderableRows.filter(function (row) { return row.visible; });
- grid.options.totalItems = visibleRows.length;
-
- var firstRow = publicApi.methods.pagination.getFirstRowIndex();
- var lastRow = publicApi.methods.pagination.getLastRowIndex();
-
- if (firstRow > visibleRows.length) {
- currentPage = grid.options.paginationCurrentPage = 1;
- firstRow = (currentPage - 1) * pageSize;
- }
- return visibleRows.slice(firstRow, lastRow);
- };
-
- grid.registerRowsProcessor(processPagination, 900 );
-
- },
- defaultGridOptions: function (gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.pagination.api:GridOptions
- *
- * @description GridOptions for the pagination feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc property
- * @name enablePagination
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Enables pagination. Defaults to true.
- */
- gridOptions.enablePagination = gridOptions.enablePagination !== false;
- /**
- * @ngdoc property
- * @name enablePaginationControls
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Enables the paginator at the bottom of the grid. Turn this off if you want to implement your
- * own controls outside the grid.
- */
- gridOptions.enablePaginationControls = gridOptions.enablePaginationControls !== false;
- /**
- * @ngdoc property
- * @name useExternalPagination
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Disables client side pagination. When true, handle the paginationChanged event and set data
- * and totalItems. Defaults to `false`
- */
- gridOptions.useExternalPagination = gridOptions.useExternalPagination === true;
-
- /**
- * @ngdoc property
- * @name useCustomPagination
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Disables client-side pagination. When true, handle the `paginationChanged` event and set `data`,
- * `firstRowIndex`, `lastRowIndex`, and `totalItems`. Defaults to `false`.
- */
- gridOptions.useCustomPagination = gridOptions.useCustomPagination === true;
-
- /**
- * @ngdoc property
- * @name totalItems
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Total number of items, set automatically when using client side pagination, but needs set by user
- * for server side pagination
- */
- if (gridUtil.isNullOrUndefined(gridOptions.totalItems)) {
- gridOptions.totalItems = 0;
- }
- /**
- * @ngdoc property
- * @name paginationPageSizes
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Array of page sizes, defaults to `[250, 500, 1000]`
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationPageSizes)) {
- gridOptions.paginationPageSizes = [250, 500, 1000];
- }
- /**
- * @ngdoc property
- * @name paginationPageSize
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Page size, defaults to the first item in paginationPageSizes, or 0 if paginationPageSizes is empty
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationPageSize)) {
- if (gridOptions.paginationPageSizes.length > 0) {
- gridOptions.paginationPageSize = gridOptions.paginationPageSizes[0];
- } else {
- gridOptions.paginationPageSize = 0;
- }
- }
- /**
- * @ngdoc property
- * @name paginationCurrentPage
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Current page number, defaults to 1
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationCurrentPage)) {
- gridOptions.paginationCurrentPage = 1;
- }
-
- /**
- * @ngdoc property
- * @name paginationTemplate
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description A custom template for the pager, defaults to `ui-grid/pagination`
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationTemplate)) {
- gridOptions.paginationTemplate = 'ui-grid/pagination';
- }
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.pagination.service:uiGridPaginationService
- * @name uiGridPaginationService
- * @description Raises paginationChanged and calls refresh for client side pagination
- * @param {Grid} grid the grid for which the pagination changed
- * @param {int} currentPage requested page number
- * @param {int} pageSize requested page size
- */
- onPaginationChanged: function (grid, currentPage, pageSize) {
- grid.api.pagination.raise.paginationChanged(currentPage, pageSize);
- if (!grid.options.useExternalPagination) {
- grid.queueGridRefresh(); //client side pagination
- }
- }
- };
-
- return service;
- }
- ]);
- /**
- * @ngdoc directive
- * @name ui.grid.pagination.directive:uiGridPagination
- * @element div
- * @restrict A
- *
- * @description Adds pagination features to grid
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.pagination']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Alex', car: 'Toyota' },
- { name: 'Sam', car: 'Lexus' },
- { name: 'Joe', car: 'Dodge' },
- { name: 'Bob', car: 'Buick' },
- { name: 'Cindy', car: 'Ford' },
- { name: 'Brian', car: 'Audi' },
- { name: 'Malcom', car: 'Mercedes Benz' },
- { name: 'Dave', car: 'Ford' },
- { name: 'Stacey', car: 'Audi' },
- { name: 'Amy', car: 'Acura' },
- { name: 'Scott', car: 'Toyota' },
- { name: 'Ryan', car: 'BMW' },
- ];
-
- $scope.gridOptions = {
- data: 'data',
- paginationPageSizes: [5, 10, 25],
- paginationPageSize: 5,
- columnDefs: [
- {name: 'name'},
- {name: 'car'}
- ]
- }
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-pagination></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridPagination', ['gridUtil', 'uiGridPaginationService',
- function (gridUtil, uiGridPaginationService) {
- return {
- priority: -200,
- scope: false,
- require: 'uiGrid',
- link: {
- pre: function ($scope, $elm, $attr, uiGridCtrl) {
- uiGridPaginationService.initializeGrid(uiGridCtrl.grid);
-
- gridUtil.getTemplate(uiGridCtrl.grid.options.paginationTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
- $elm.append(template);
- uiGridCtrl.innerCompile(template);
- });
- }
- }
- };
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.pagination.directive:uiGridPager
- * @element div
- *
- * @description Panel for handling pagination
- */
- module.directive('uiGridPager', ['uiGridPaginationService', 'uiGridConstants', 'gridUtil', 'i18nService',
- function (uiGridPaginationService, uiGridConstants, gridUtil, i18nService) {
- return {
- priority: -200,
- scope: true,
- require: '^uiGrid',
- link: function ($scope, $elm, $attr, uiGridCtrl) {
- var defaultFocusElementSelector = '.ui-grid-pager-control-input';
- $scope.aria = i18nService.getSafeText('pagination.aria'); //Returns an object with all of the aria labels
-
- $scope.paginationApi = uiGridCtrl.grid.api.pagination;
- $scope.sizesLabel = i18nService.getSafeText('pagination.sizes');
- $scope.totalItemsLabel = i18nService.getSafeText('pagination.totalItems');
- $scope.paginationOf = i18nService.getSafeText('pagination.of');
- $scope.paginationThrough = i18nService.getSafeText('pagination.through');
-
- var options = uiGridCtrl.grid.options;
-
- uiGridCtrl.grid.renderContainers.body.registerViewportAdjuster(function (adjustment) {
- adjustment.height = adjustment.height - gridUtil.elementHeight($elm, "padding");
- return adjustment;
- });
-
- var dataChangeDereg = uiGridCtrl.grid.registerDataChangeCallback(function (grid) {
- if (!grid.options.useExternalPagination) {
- grid.options.totalItems = grid.rows.length;
- }
- }, [uiGridConstants.dataChange.ROW]);
-
- $scope.$on('$destroy', dataChangeDereg);
-
- var deregP = $scope.$watch('grid.options.paginationCurrentPage + grid.options.paginationPageSize', function (newValues, oldValues) {
- if (newValues === oldValues || oldValues === undefined) {
- return;
- }
-
- if (!angular.isNumber(options.paginationCurrentPage) || options.paginationCurrentPage < 1) {
- options.paginationCurrentPage = 1;
- return;
- }
-
- if (options.totalItems > 0 && options.paginationCurrentPage > $scope.paginationApi.getTotalPages()) {
- options.paginationCurrentPage = $scope.paginationApi.getTotalPages();
- return;
- }
-
- uiGridPaginationService.onPaginationChanged($scope.grid, options.paginationCurrentPage, options.paginationPageSize);
- }
- );
-
- $scope.$on('$destroy', function() {
- deregP();
- });
-
- $scope.cantPageForward = function () {
- if ($scope.paginationApi.getTotalPages()) {
- return $scope.cantPageToLast();
- } else {
- return options.data.length < 1;
- }
- };
-
- $scope.cantPageToLast = function () {
- var totalPages = $scope.paginationApi.getTotalPages();
- return !totalPages || options.paginationCurrentPage >= totalPages;
- };
-
- $scope.cantPageBackward = function () {
- return options.paginationCurrentPage <= 1;
- };
-
- var focusToInputIf = function(condition){
- if (condition){
- gridUtil.focus.bySelector($elm, defaultFocusElementSelector);
- }
- };
-
- //Takes care of setting focus to the middle element when focus is lost
- $scope.pageFirstPageClick = function () {
- $scope.paginationApi.seek(1);
- focusToInputIf($scope.cantPageBackward());
- };
-
- $scope.pagePreviousPageClick = function () {
- $scope.paginationApi.previousPage();
- focusToInputIf($scope.cantPageBackward());
- };
-
- $scope.pageNextPageClick = function () {
- $scope.paginationApi.nextPage();
- focusToInputIf($scope.cantPageForward());
- };
-
- $scope.pageLastPageClick = function () {
- $scope.paginationApi.seek($scope.paginationApi.getTotalPages());
- focusToInputIf($scope.cantPageToLast());
- };
-
- }
- };
- }
- ]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.pinning
- * @description
- *
- * # ui.grid.pinning
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides column pinning to the end user via menu options in the column header
- *
- * <div doc-module-components="ui.grid.pinning"></div>
- */
-
- var module = angular.module('ui.grid.pinning', ['ui.grid']);
-
- module.constant('uiGridPinningConstants', {
- container: {
- LEFT: 'left',
- RIGHT: 'right',
- NONE: ''
- }
- });
-
- module.service('uiGridPinningService', ['gridUtil', 'GridRenderContainer', 'i18nService', 'uiGridPinningConstants', function (gridUtil, GridRenderContainer, i18nService, uiGridPinningConstants) {
- var service = {
-
- initializeGrid: function (grid) {
- service.defaultGridOptions(grid.options);
-
- // Register a column builder to add new menu items for pinning left and right
- grid.registerColumnBuilder(service.pinningColumnBuilder);
-
- /**
- * @ngdoc object
- * @name ui.grid.pinning.api:PublicApi
- *
- * @description Public Api for pinning feature
- */
- var publicApi = {
- events: {
- pinning: {
- /**
- * @ngdoc event
- * @name columnPin
- * @eventOf ui.grid.pinning.api:PublicApi
- * @description raised when column pin state has changed
- * <pre>
- * gridApi.pinning.on.columnPinned(scope, function(colDef){})
- * </pre>
- * @param {object} colDef the column that was changed
- * @param {string} container the render container the column is in ('left', 'right', '')
- */
- columnPinned: function(colDef, container) {
- }
- }
- },
- methods: {
- pinning: {
- /**
- * @ngdoc function
- * @name pinColumn
- * @methodOf ui.grid.pinning.api:PublicApi
- * @description pin column left, right, or none
- * <pre>
- * gridApi.pinning.pinColumn(col, uiGridPinningConstants.container.LEFT)
- * </pre>
- * @param {gridColumn} col the column being pinned
- * @param {string} container one of the recognised types
- * from uiGridPinningConstants
- */
- pinColumn: function(col, container) {
- service.pinColumn(grid, col, container);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.pinning.api:GridOptions
- *
- * @description GridOptions for pinning feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enablePinning
- * @propertyOf ui.grid.pinning.api:GridOptions
- * @description Enable pinning for the entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enablePinning = gridOptions.enablePinning !== false;
-
- },
-
- pinningColumnBuilder: function (colDef, col, gridOptions) {
- //default to true unless gridOptions or colDef is explicitly false
-
- /**
- * @ngdoc object
- * @name ui.grid.pinning.api:ColumnDef
- *
- * @description ColumnDef for pinning feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enablePinning
- * @propertyOf ui.grid.pinning.api:ColumnDef
- * @description Enable pinning for the individual column.
- * <br/>Defaults to true
- */
- colDef.enablePinning = colDef.enablePinning === undefined ? gridOptions.enablePinning : colDef.enablePinning;
-
-
- /**
- * @ngdoc object
- * @name pinnedLeft
- * @propertyOf ui.grid.pinning.api:ColumnDef
- * @description Column is pinned left when grid is rendered
- * <br/>Defaults to false
- */
-
- /**
- * @ngdoc object
- * @name pinnedRight
- * @propertyOf ui.grid.pinning.api:ColumnDef
- * @description Column is pinned right when grid is rendered
- * <br/>Defaults to false
- */
- if (colDef.pinnedLeft) {
- col.renderContainer = 'left';
- col.grid.createLeftContainer();
- }
- else if (colDef.pinnedRight) {
- col.renderContainer = 'right';
- col.grid.createRightContainer();
- }
-
- if (!colDef.enablePinning) {
- return;
- }
-
- var pinColumnLeftAction = {
- name: 'ui.grid.pinning.pinLeft',
- title: i18nService.get().pinning.pinLeft,
- icon: 'ui-grid-icon-left-open',
- shown: function () {
- return typeof(this.context.col.renderContainer) === 'undefined' || !this.context.col.renderContainer || this.context.col.renderContainer !== 'left';
- },
- action: function () {
- service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.LEFT);
- }
- };
-
- var pinColumnRightAction = {
- name: 'ui.grid.pinning.pinRight',
- title: i18nService.get().pinning.pinRight,
- icon: 'ui-grid-icon-right-open',
- shown: function () {
- return typeof(this.context.col.renderContainer) === 'undefined' || !this.context.col.renderContainer || this.context.col.renderContainer !== 'right';
- },
- action: function () {
- service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.RIGHT);
- }
- };
-
- var removePinAction = {
- name: 'ui.grid.pinning.unpin',
- title: i18nService.get().pinning.unpin,
- icon: 'ui-grid-icon-cancel',
- shown: function () {
- return typeof(this.context.col.renderContainer) !== 'undefined' && this.context.col.renderContainer !== null && this.context.col.renderContainer !== 'body';
- },
- action: function () {
- service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.NONE);
- }
- };
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.pinning.pinLeft')) {
- col.menuItems.push(pinColumnLeftAction);
- }
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.pinning.pinRight')) {
- col.menuItems.push(pinColumnRightAction);
- }
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.pinning.unpin')) {
- col.menuItems.push(removePinAction);
- }
- },
-
- pinColumn: function(grid, col, container) {
- if (container === uiGridPinningConstants.container.NONE) {
- col.renderContainer = null;
- col.colDef.pinnedLeft = col.colDef.pinnedRight = false;
- }
- else {
- col.renderContainer = container;
- if (container === uiGridPinningConstants.container.LEFT) {
- grid.createLeftContainer();
- }
- else if (container === uiGridPinningConstants.container.RIGHT) {
- grid.createRightContainer();
- }
- }
-
- grid.refresh()
- .then(function() {
- grid.api.pinning.raise.columnPinned( col.colDef, container );
- });
- }
- };
-
- return service;
- }]);
-
- module.directive('uiGridPinning', ['gridUtil', 'uiGridPinningService',
- function (gridUtil, uiGridPinningService) {
- return {
- require: 'uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridPinningService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
-
-})();
-
-(function(){
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.resizeColumns
- * @description
- *
- * # ui.grid.resizeColumns
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module allows columns to be resized.
- */
- var module = angular.module('ui.grid.resizeColumns', ['ui.grid']);
-
- module.service('uiGridResizeColumnsService', ['gridUtil', '$q', '$timeout',
- function (gridUtil, $q, $timeout) {
-
- var service = {
- defaultGridOptions: function(gridOptions){
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.resizeColumns.api:GridOptions
- *
- * @description GridOptions for resizeColumns feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableColumnResizing
- * @propertyOf ui.grid.resizeColumns.api:GridOptions
- * @description Enable column resizing on the entire grid
- * <br/>Defaults to true
- */
- gridOptions.enableColumnResizing = gridOptions.enableColumnResizing !== false;
-
- //legacy support
- //use old name if it is explicitly false
- if (gridOptions.enableColumnResize === false){
- gridOptions.enableColumnResizing = false;
- }
- },
-
- colResizerColumnBuilder: function (colDef, col, gridOptions) {
-
- var promises = [];
- /**
- * @ngdoc object
- * @name ui.grid.resizeColumns.api:ColumnDef
- *
- * @description ColumnDef for resizeColumns feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enableColumnResizing
- * @propertyOf ui.grid.resizeColumns.api:ColumnDef
- * @description Enable column resizing on an individual column
- * <br/>Defaults to GridOptions.enableColumnResizing
- */
- //default to true unless gridOptions or colDef is explicitly false
- colDef.enableColumnResizing = colDef.enableColumnResizing === undefined ? gridOptions.enableColumnResizing : colDef.enableColumnResizing;
-
-
- //legacy support of old option name
- if (colDef.enableColumnResize === false){
- colDef.enableColumnResizing = false;
- }
-
- return $q.all(promises);
- },
-
- registerPublicApi: function (grid) {
- /**
- * @ngdoc object
- * @name ui.grid.resizeColumns.api:PublicApi
- * @description Public Api for column resize feature.
- */
- var publicApi = {
- events: {
- /**
- * @ngdoc event
- * @name columnSizeChanged
- * @eventOf ui.grid.resizeColumns.api:PublicApi
- * @description raised when column is resized
- * <pre>
- * gridApi.colResizable.on.columnSizeChanged(scope,function(colDef, deltaChange){})
- * </pre>
- * @param {object} colDef the column that was resized
- * @param {integer} delta of the column size change
- */
- colResizable: {
- columnSizeChanged: function (colDef, deltaChange) {
- }
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- },
-
- fireColumnSizeChanged: function (grid, colDef, deltaChange) {
- $timeout(function () {
- if ( grid.api.colResizable ){
- grid.api.colResizable.raise.columnSizeChanged(colDef, deltaChange);
- } else {
- gridUtil.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.");
- }
- });
- },
-
- // get either this column, or the column next to this column, to resize,
- // returns the column we're going to resize
- findTargetCol: function(col, position, rtlMultiplier){
- var renderContainer = col.getRenderContainer();
-
- if (position === 'left') {
- // Get the column to the left of this one
- var colIndex = renderContainer.visibleColumnCache.indexOf(col);
- return renderContainer.visibleColumnCache[colIndex - 1 * rtlMultiplier];
- } else {
- return col;
- }
- }
-
- };
-
- return service;
-
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.resizeColumns.directive:uiGridResizeColumns
- * @element div
- * @restrict A
- * @description
- * Enables resizing for all columns on the grid. If, for some reason, you want to use the ui-grid-resize-columns directive, but not allow column resizing, you can explicitly set the
- * option to false. This prevents resizing for the entire grid, regardless of individual columnDef options.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid', 'ui.grid.resizeColumns']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.gridOpts = {
- data: [
- { "name": "Ethel Price", "gender": "female", "company": "Enersol" },
- { "name": "Claudine Neal", "gender": "female", "company": "Sealoud" },
- { "name": "Beryl Rice", "gender": "female", "company": "Velity" },
- { "name": "Wilder Gonzales", "gender": "male", "company": "Geekko" }
- ]
- };
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <div class="testGrid" ui-grid="gridOpts" ui-grid-resize-columns ></div>
- </div>
- </doc:source>
- <doc:scenario>
-
- </doc:scenario>
- </doc:example>
- */
- module.directive('uiGridResizeColumns', ['gridUtil', 'uiGridResizeColumnsService', function (gridUtil, uiGridResizeColumnsService) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridResizeColumnsService.defaultGridOptions(uiGridCtrl.grid.options);
- uiGridCtrl.grid.registerColumnBuilder( uiGridResizeColumnsService.colResizerColumnBuilder);
- uiGridResizeColumnsService.registerPublicApi(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- // Extend the uiGridHeaderCell directive
- module.directive('uiGridHeaderCell', ['gridUtil', '$templateCache', '$compile', '$q', 'uiGridResizeColumnsService', 'uiGridConstants', '$timeout', function (gridUtil, $templateCache, $compile, $q, uiGridResizeColumnsService, uiGridConstants, $timeout) {
- return {
- // Run after the original uiGridHeaderCell
- priority: -10,
- require: '^uiGrid',
- // scope: false,
- compile: function() {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- var grid = uiGridCtrl.grid;
-
- if (grid.options.enableColumnResizing) {
- var columnResizerElm = $templateCache.get('ui-grid/columnResizer');
-
- var rtlMultiplier = 1;
- //when in RTL mode reverse the direction using the rtlMultiplier and change the position to left
- if (grid.isRTL()) {
- $scope.position = 'left';
- rtlMultiplier = -1;
- }
-
- var displayResizers = function(){
-
- // remove any existing resizers.
- var resizers = $elm[0].getElementsByClassName('ui-grid-column-resizer');
- for ( var i = 0; i < resizers.length; i++ ){
- angular.element(resizers[i]).remove();
- }
-
- // get the target column for the left resizer
- var otherCol = uiGridResizeColumnsService.findTargetCol($scope.col, 'left', rtlMultiplier);
- var renderContainer = $scope.col.getRenderContainer();
-
- // Don't append the left resizer if this is the first column or the column to the left of this one has resizing disabled
- if (otherCol && renderContainer.visibleColumnCache.indexOf($scope.col) !== 0 && otherCol.colDef.enableColumnResizing !== false) {
- var resizerLeft = angular.element(columnResizerElm).clone();
- resizerLeft.attr('position', 'left');
-
- $elm.prepend(resizerLeft);
- $compile(resizerLeft)($scope);
- }
-
- // Don't append the right resizer if this column has resizing disabled
- if ($scope.col.colDef.enableColumnResizing !== false) {
- var resizerRight = angular.element(columnResizerElm).clone();
- resizerRight.attr('position', 'right');
-
- $elm.append(resizerRight);
- $compile(resizerRight)($scope);
- }
- };
-
- displayResizers();
-
- var waitDisplay = function(){
- $timeout(displayResizers);
- };
-
- var dataChangeDereg = grid.registerDataChangeCallback( waitDisplay, [uiGridConstants.dataChange.COLUMN] );
-
- $scope.$on( '$destroy', dataChangeDereg );
- }
- }
- };
- }
- };
- }]);
-
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.resizeColumns.directive:uiGridColumnResizer
- * @element div
- * @restrict A
- *
- * @description
- * Draggable handle that controls column resizing.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid', 'ui.grid.resizeColumns']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.gridOpts = {
- enableColumnResizing: true,
- data: [
- { "name": "Ethel Price", "gender": "female", "company": "Enersol" },
- { "name": "Claudine Neal", "gender": "female", "company": "Sealoud" },
- { "name": "Beryl Rice", "gender": "female", "company": "Velity" },
- { "name": "Wilder Gonzales", "gender": "male", "company": "Geekko" }
- ]
- };
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <div class="testGrid" ui-grid="gridOpts"></div>
- </div>
- </doc:source>
- <doc:scenario>
- // TODO: e2e specs?
-
- // TODO: post-resize a horizontal scroll event should be fired
- </doc:scenario>
- </doc:example>
- */
- module.directive('uiGridColumnResizer', ['$document', 'gridUtil', 'uiGridConstants', 'uiGridResizeColumnsService', function ($document, gridUtil, uiGridConstants, uiGridResizeColumnsService) {
- var resizeOverlay = angular.element('<div class="ui-grid-resize-overlay"></div>');
-
- var resizer = {
- priority: 0,
- scope: {
- col: '=',
- position: '@',
- renderIndex: '='
- },
- require: '?^uiGrid',
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var startX = 0,
- x = 0,
- gridLeft = 0,
- rtlMultiplier = 1;
-
- //when in RTL mode reverse the direction using the rtlMultiplier and change the position to left
- if (uiGridCtrl.grid.isRTL()) {
- $scope.position = 'left';
- rtlMultiplier = -1;
- }
-
- if ($scope.position === 'left') {
- $elm.addClass('left');
- }
- else if ($scope.position === 'right') {
- $elm.addClass('right');
- }
-
- // Refresh the grid canvas
- // takes an argument representing the diff along the X-axis that the resize had
- function refreshCanvas(xDiff) {
- // Then refresh the grid canvas, rebuilding the styles so that the scrollbar updates its size
- uiGridCtrl.grid.refreshCanvas(true).then( function() {
- uiGridCtrl.grid.queueGridRefresh();
- });
- }
-
- // Check that the requested width isn't wider than the maxWidth, or narrower than the minWidth
- // Returns the new recommended with, after constraints applied
- function constrainWidth(col, width){
- var newWidth = width;
-
- // If the new width would be less than the column's allowably minimum width, don't allow it
- if (col.minWidth && newWidth < col.minWidth) {
- newWidth = col.minWidth;
- }
- else if (col.maxWidth && newWidth > col.maxWidth) {
- newWidth = col.maxWidth;
- }
-
- return newWidth;
- }
-
-
- /*
- * Our approach to event handling aims to deal with both touch devices and mouse devices
- * We register down handlers on both touch and mouse. When a touchstart or mousedown event
- * occurs, we register the corresponding touchmove/touchend, or mousemove/mouseend events.
- *
- * This way we can listen for both without worrying about the fact many touch devices also emulate
- * mouse events - basically whichever one we hear first is what we'll go with.
- */
- function moveFunction(event, args) {
- if (event.originalEvent) { event = event.originalEvent; }
- event.preventDefault();
-
- x = (event.targetTouches ? event.targetTouches[0] : event).clientX - gridLeft;
-
- if (x < 0) { x = 0; }
- else if (x > uiGridCtrl.grid.gridWidth) { x = uiGridCtrl.grid.gridWidth; }
-
- var col = uiGridResizeColumnsService.findTargetCol($scope.col, $scope.position, rtlMultiplier);
-
- // Don't resize if it's disabled on this column
- if (col.colDef.enableColumnResizing === false) {
- return;
- }
-
- if (!uiGridCtrl.grid.element.hasClass('column-resizing')) {
- uiGridCtrl.grid.element.addClass('column-resizing');
- }
-
- // Get the diff along the X axis
- var xDiff = x - startX;
-
- // Get the width that this mouse would give the column
- var newWidth = parseInt(col.drawnWidth + xDiff * rtlMultiplier, 10);
-
- // check we're not outside the allowable bounds for this column
- x = x + ( constrainWidth(col, newWidth) - newWidth ) * rtlMultiplier;
-
- resizeOverlay.css({ left: x + 'px' });
-
- uiGridCtrl.fireEvent(uiGridConstants.events.ITEM_DRAGGING);
- }
-
-
- function upFunction(event, args) {
- if (event.originalEvent) { event = event.originalEvent; }
- event.preventDefault();
-
- uiGridCtrl.grid.element.removeClass('column-resizing');
-
- resizeOverlay.remove();
-
- // Resize the column
- x = (event.changedTouches ? event.changedTouches[0] : event).clientX - gridLeft;
- var xDiff = x - startX;
-
- if (xDiff === 0) {
- // no movement, so just reset event handlers, including turning back on both
- // down events - we turned one off when this event started
- offAllEvents();
- onDownEvents();
- return;
- }
-
- var col = uiGridResizeColumnsService.findTargetCol($scope.col, $scope.position, rtlMultiplier);
-
- // Don't resize if it's disabled on this column
- if (col.colDef.enableColumnResizing === false) {
- return;
- }
-
- // Get the new width
- var newWidth = parseInt(col.drawnWidth + xDiff * rtlMultiplier, 10);
-
- // check we're not outside the allowable bounds for this column
- col.width = constrainWidth(col, newWidth);
- col.hasCustomWidth = true;
-
- refreshCanvas(xDiff);
-
- uiGridResizeColumnsService.fireColumnSizeChanged(uiGridCtrl.grid, col.colDef, xDiff);
-
- // stop listening of up and move events - wait for next down
- // reset the down events - we will have turned one off when this event started
- offAllEvents();
- onDownEvents();
- }
-
-
- var downFunction = function(event, args) {
- if (event.originalEvent) { event = event.originalEvent; }
- event.stopPropagation();
-
- // Get the left offset of the grid
- // gridLeft = uiGridCtrl.grid.element[0].offsetLeft;
- gridLeft = uiGridCtrl.grid.element[0].getBoundingClientRect().left;
-
- // Get the starting X position, which is the X coordinate of the click minus the grid's offset
- startX = (event.targetTouches ? event.targetTouches[0] : event).clientX - gridLeft;
-
- // Append the resizer overlay
- uiGridCtrl.grid.element.append(resizeOverlay);
-
- // Place the resizer overlay at the start position
- resizeOverlay.css({ left: startX });
-
- // Add handlers for move and up events - if we were mousedown then we listen for mousemove and mouseup, if
- // we were touchdown then we listen for touchmove and touchup. Also remove the handler for the equivalent
- // down event - so if we're touchdown, then remove the mousedown handler until this event is over, if we're
- // mousedown then remove the touchdown handler until this event is over, this avoids processing duplicate events
- if ( event.type === 'touchstart' ){
- $document.on('touchend', upFunction);
- $document.on('touchmove', moveFunction);
- $elm.off('mousedown', downFunction);
- } else {
- $document.on('mouseup', upFunction);
- $document.on('mousemove', moveFunction);
- $elm.off('touchstart', downFunction);
- }
- };
-
- var onDownEvents = function() {
- $elm.on('mousedown', downFunction);
- $elm.on('touchstart', downFunction);
- };
-
- var offAllEvents = function() {
- $document.off('mouseup', upFunction);
- $document.off('touchend', upFunction);
- $document.off('mousemove', moveFunction);
- $document.off('touchmove', moveFunction);
- $elm.off('mousedown', downFunction);
- $elm.off('touchstart', downFunction);
- };
-
- onDownEvents();
-
-
- // On doubleclick, resize to fit all rendered cells
- var dblClickFn = function(event, args){
- event.stopPropagation();
-
- var col = uiGridResizeColumnsService.findTargetCol($scope.col, $scope.position, rtlMultiplier);
-
- // Don't resize if it's disabled on this column
- if (col.colDef.enableColumnResizing === false) {
- return;
- }
-
- // Go through the rendered rows and find out the max size for the data in this column
- var maxWidth = 0;
- var xDiff = 0;
-
- // Get the parent render container element
- var renderContainerElm = gridUtil.closestElm($elm, '.ui-grid-render-container');
-
- // Get the cell contents so we measure correctly. For the header cell we have to account for the sort icon and the menu buttons, if present
- var cells = renderContainerElm.querySelectorAll('.' + uiGridConstants.COL_CLASS_PREFIX + col.uid + ' .ui-grid-cell-contents');
- Array.prototype.forEach.call(cells, function (cell) {
- // Get the cell width
- // gridUtil.logDebug('width', gridUtil.elementWidth(cell));
-
- // Account for the menu button if it exists
- var menuButton;
- if (angular.element(cell).parent().hasClass('ui-grid-header-cell')) {
- menuButton = angular.element(cell).parent()[0].querySelectorAll('.ui-grid-column-menu-button');
- }
-
- gridUtil.fakeElement(cell, {}, function(newElm) {
- // Make the element float since it's a div and can expand to fill its container
- var e = angular.element(newElm);
- e.attr('style', 'float: left');
-
- var width = gridUtil.elementWidth(e);
-
- if (menuButton) {
- var menuButtonWidth = gridUtil.elementWidth(menuButton);
- width = width + menuButtonWidth;
- }
-
- if (width > maxWidth) {
- maxWidth = width;
- xDiff = maxWidth - width;
- }
- });
- });
-
- // check we're not outside the allowable bounds for this column
- col.width = constrainWidth(col, maxWidth);
- col.hasCustomWidth = true;
-
- refreshCanvas(xDiff);
-
- uiGridResizeColumnsService.fireColumnSizeChanged(uiGridCtrl.grid, col.colDef, xDiff); };
- $elm.on('dblclick', dblClickFn);
-
- $elm.on('$destroy', function() {
- $elm.off('dblclick', dblClickFn);
- offAllEvents();
- });
- }
- };
-
- return resizer;
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.rowEdit
- * @description
- *
- * # ui.grid.rowEdit
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module extends the edit feature to provide tracking and saving of rows
- * of data. The tutorial provides more information on how this feature is best
- * used {@link tutorial/205_row_editable here}.
- * <br/>
- * This feature depends on usage of the ui-grid-edit feature, and also benefits
- * from use of ui-grid-cellNav to provide the full spreadsheet-like editing
- * experience
- *
- */
-
- var module = angular.module('ui.grid.rowEdit', ['ui.grid', 'ui.grid.edit', 'ui.grid.cellNav']);
-
- /**
- * @ngdoc object
- * @name ui.grid.rowEdit.constant:uiGridRowEditConstants
- *
- * @description constants available in row edit module
- */
- module.constant('uiGridRowEditConstants', {
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.rowEdit.service:uiGridRowEditService
- *
- * @description Services for row editing features
- */
- module.service('uiGridRowEditService', ['$interval', '$q', 'uiGridConstants', 'uiGridRowEditConstants', 'gridUtil',
- function ($interval, $q, uiGridConstants, uiGridRowEditConstants, gridUtil) {
-
- var service = {
-
- initializeGrid: function (scope, grid) {
- /**
- * @ngdoc object
- * @name ui.grid.rowEdit.api:PublicApi
- *
- * @description Public Api for rowEdit feature
- */
-
- grid.rowEdit = {};
-
- var publicApi = {
- events: {
- rowEdit: {
- /**
- * @ngdoc event
- * @eventOf ui.grid.rowEdit.api:PublicApi
- * @name saveRow
- * @description raised when a row is ready for saving. Once your
- * row has saved you may need to use angular.extend to update the
- * data entity with any changed data from your save (for example,
- * lock version information if you're using optimistic locking,
- * or last update time/user information).
- *
- * Your method should call setSavePromise somewhere in the body before
- * returning control. The feature will then wait, with the gridRow greyed out
- * whilst this promise is being resolved.
- *
- * <pre>
- * gridApi.rowEdit.on.saveRow(scope,function(rowEntity){})
- * </pre>
- * and somewhere within the event handler:
- * <pre>
- * gridApi.rowEdit.setSavePromise( rowEntity, savePromise)
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @returns {promise} Your saveRow method should return a promise, the
- * promise should either be resolved (implying successful save), or
- * rejected (implying an error).
- */
- saveRow: function (rowEntity) {
- }
- }
- },
- methods: {
- rowEdit: {
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name setSavePromise
- * @description Sets the promise associated with the row save, mandatory that
- * the saveRow event handler calls this method somewhere before returning.
- * <pre>
- * gridApi.rowEdit.setSavePromise(rowEntity, savePromise)
- * </pre>
- * @param {object} rowEntity a data row from the grid for which a save has
- * been initiated
- * @param {promise} savePromise the promise that will be resolved when the
- * save is successful, or rejected if the save fails
- *
- */
- setSavePromise: function ( rowEntity, savePromise) {
- service.setSavePromise(grid, rowEntity, savePromise);
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name getDirtyRows
- * @description Returns all currently dirty rows
- * <pre>
- * gridApi.rowEdit.getDirtyRows(grid)
- * </pre>
- * @returns {array} An array of gridRows that are currently dirty
- *
- */
- getDirtyRows: function () {
- return grid.rowEdit.dirtyRows ? grid.rowEdit.dirtyRows : [];
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name getErrorRows
- * @description Returns all currently errored rows
- * <pre>
- * gridApi.rowEdit.getErrorRows(grid)
- * </pre>
- * @returns {array} An array of gridRows that are currently in error
- *
- */
- getErrorRows: function () {
- return grid.rowEdit.errorRows ? grid.rowEdit.errorRows : [];
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name flushDirtyRows
- * @description Triggers a save event for all currently dirty rows, could
- * be used where user presses a save button or navigates away from the page
- * <pre>
- * gridApi.rowEdit.flushDirtyRows(grid)
- * </pre>
- * @returns {promise} a promise that represents the aggregate of all
- * of the individual save promises - i.e. it will be resolved when all
- * the individual save promises have been resolved.
- *
- */
- flushDirtyRows: function () {
- return service.flushDirtyRows(grid);
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name setRowsDirty
- * @description Sets each of the rows passed in dataRows
- * to be dirty. note that if you have only just inserted the
- * rows into your data you will need to wait for a $digest cycle
- * before the gridRows are present - so often you would wrap this
- * call in a $interval or $timeout
- * <pre>
- * $interval( function() {
- * gridApi.rowEdit.setRowsDirty(myDataRows);
- * }, 0, 1);
- * </pre>
- * @param {array} dataRows the data entities for which the gridRows
- * should be set dirty.
- *
- */
- setRowsDirty: function ( dataRows) {
- service.setRowsDirty(grid, dataRows);
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name setRowsClean
- * @description Sets each of the rows passed in dataRows
- * to be clean, removing them from the dirty cache and the error cache,
- * and clearing the error flag and the dirty flag
- * <pre>
- * var gridRows = $scope.gridApi.rowEdit.getDirtyRows();
- * var dataRows = gridRows.map( function( gridRow ) { return gridRow.entity; });
- * $scope.gridApi.rowEdit.setRowsClean( dataRows );
- * </pre>
- * @param {array} dataRows the data entities for which the gridRows
- * should be set clean.
- *
- */
- setRowsClean: function ( dataRows) {
- service.setRowsClean(grid, dataRows);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- grid.api.core.on.renderingComplete( scope, function ( gridApi ) {
- grid.api.edit.on.afterCellEdit( scope, service.endEditCell );
- grid.api.edit.on.beginCellEdit( scope, service.beginEditCell );
- grid.api.edit.on.cancelCellEdit( scope, service.cancelEditCell );
-
- if ( grid.api.cellNav ) {
- grid.api.cellNav.on.navigate( scope, service.navigate );
- }
- });
-
- },
-
- defaultGridOptions: function (gridOptions) {
-
- /**
- * @ngdoc object
- * @name ui.grid.rowEdit.api:GridOptions
- *
- * @description Options for configuring the rowEdit feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name saveRow
- * @description Returns a function that saves the specified row from the grid,
- * and returns a promise
- * @param {object} grid the grid for which dirty rows should be flushed
- * @param {GridRow} gridRow the row that should be saved
- * @returns {function} the saveRow function returns a function. That function
- * in turn, when called, returns a promise relating to the save callback
- */
- saveRow: function ( grid, gridRow ) {
- var self = this;
-
- return function() {
- gridRow.isSaving = true;
-
- if ( gridRow.rowEditSavePromise ){
- // don't save the row again if it's already saving - that causes stale object exceptions
- return gridRow.rowEditSavePromise;
- }
-
- var promise = grid.api.rowEdit.raise.saveRow( gridRow.entity );
-
- if ( gridRow.rowEditSavePromise ){
- gridRow.rowEditSavePromise.then( self.processSuccessPromise( grid, gridRow ), self.processErrorPromise( grid, gridRow ));
- } else {
- gridUtil.logError( 'A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise' );
- }
- return promise;
- };
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name setSavePromise
- * @description Sets the promise associated with the row save, mandatory that
- * the saveRow event handler calls this method somewhere before returning.
- * <pre>
- * gridApi.rowEdit.setSavePromise(grid, rowEntity)
- * </pre>
- * @param {object} grid the grid for which dirty rows should be returned
- * @param {object} rowEntity a data row from the grid for which a save has
- * been initiated
- * @param {promise} savePromise the promise that will be resolved when the
- * save is successful, or rejected if the save fails
- *
- */
- setSavePromise: function (grid, rowEntity, savePromise) {
- var gridRow = grid.getRow( rowEntity );
- gridRow.rowEditSavePromise = savePromise;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name processSuccessPromise
- * @description Returns a function that processes the successful
- * resolution of a save promise
- * @param {object} grid the grid for which the promise should be processed
- * @param {GridRow} gridRow the row that has been saved
- * @returns {function} the success handling function
- */
- processSuccessPromise: function ( grid, gridRow ) {
- var self = this;
-
- return function() {
- delete gridRow.isSaving;
- delete gridRow.isDirty;
- delete gridRow.isError;
- delete gridRow.rowEditSaveTimer;
- delete gridRow.rowEditSavePromise;
- self.removeRow( grid.rowEdit.errorRows, gridRow );
- self.removeRow( grid.rowEdit.dirtyRows, gridRow );
- };
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name processErrorPromise
- * @description Returns a function that processes the failed
- * resolution of a save promise
- * @param {object} grid the grid for which the promise should be processed
- * @param {GridRow} gridRow the row that is now in error
- * @returns {function} the error handling function
- */
- processErrorPromise: function ( grid, gridRow ) {
- return function() {
- delete gridRow.isSaving;
- delete gridRow.rowEditSaveTimer;
- delete gridRow.rowEditSavePromise;
-
- gridRow.isError = true;
-
- if (!grid.rowEdit.errorRows){
- grid.rowEdit.errorRows = [];
- }
- if (!service.isRowPresent( grid.rowEdit.errorRows, gridRow ) ){
- grid.rowEdit.errorRows.push( gridRow );
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name removeRow
- * @description Removes a row from a cache of rows - either
- * grid.rowEdit.errorRows or grid.rowEdit.dirtyRows. If the row
- * is not present silently does nothing.
- * @param {array} rowArray the array from which to remove the row
- * @param {GridRow} gridRow the row that should be removed
- */
- removeRow: function( rowArray, removeGridRow ){
- if (typeof(rowArray) === 'undefined' || rowArray === null){
- return;
- }
-
- rowArray.forEach( function( gridRow, index ){
- if ( gridRow.uid === removeGridRow.uid ){
- rowArray.splice( index, 1);
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name isRowPresent
- * @description Checks whether a row is already present
- * in the given array
- * @param {array} rowArray the array in which to look for the row
- * @param {GridRow} gridRow the row that should be looked for
- */
- isRowPresent: function( rowArray, removeGridRow ){
- var present = false;
- rowArray.forEach( function( gridRow, index ){
- if ( gridRow.uid === removeGridRow.uid ){
- present = true;
- }
- });
- return present;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name flushDirtyRows
- * @description Triggers a save event for all currently dirty rows, could
- * be used where user presses a save button or navigates away from the page
- * <pre>
- * gridApi.rowEdit.flushDirtyRows(grid)
- * </pre>
- * @param {object} grid the grid for which dirty rows should be flushed
- * @returns {promise} a promise that represents the aggregate of all
- * of the individual save promises - i.e. it will be resolved when all
- * the individual save promises have been resolved.
- *
- */
- flushDirtyRows: function(grid){
- var promises = [];
- grid.api.rowEdit.getDirtyRows().forEach( function( gridRow ){
- service.saveRow( grid, gridRow )();
- promises.push( gridRow.rowEditSavePromise );
- });
-
- return $q.all( promises );
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name endEditCell
- * @description Receives an afterCellEdit event from the edit function,
- * and sets flags as appropriate. Only the rowEntity parameter
- * is processed, although other params are available. Grid
- * is automatically provided by the gridApi.
- * @param {object} rowEntity the data entity for which the cell
- * was edited
- */
- endEditCell: function( rowEntity, colDef, newValue, previousValue ){
- var grid = this.grid;
- var gridRow = grid.getRow( rowEntity );
- if ( !gridRow ){ gridUtil.logError( 'Unable to find rowEntity in grid data, dirty flag cannot be set' ); return; }
-
- if ( newValue !== previousValue || gridRow.isDirty ){
- if ( !grid.rowEdit.dirtyRows ){
- grid.rowEdit.dirtyRows = [];
- }
-
- if ( !gridRow.isDirty ){
- gridRow.isDirty = true;
- grid.rowEdit.dirtyRows.push( gridRow );
- }
-
- delete gridRow.isError;
-
- service.considerSetTimer( grid, gridRow );
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name beginEditCell
- * @description Receives a beginCellEdit event from the edit function,
- * and cancels any rowEditSaveTimers if present, as the user is still editing
- * this row. Only the rowEntity parameter
- * is processed, although other params are available. Grid
- * is automatically provided by the gridApi.
- * @param {object} rowEntity the data entity for which the cell
- * editing has commenced
- */
- beginEditCell: function( rowEntity, colDef ){
- var grid = this.grid;
- var gridRow = grid.getRow( rowEntity );
- if ( !gridRow ){ gridUtil.logError( 'Unable to find rowEntity in grid data, timer cannot be cancelled' ); return; }
-
- service.cancelTimer( grid, gridRow );
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name cancelEditCell
- * @description Receives a cancelCellEdit event from the edit function,
- * and if the row was already dirty, restarts the save timer. If the row
- * was not already dirty, then it's not dirty now either and does nothing.
- *
- * Only the rowEntity parameter
- * is processed, although other params are available. Grid
- * is automatically provided by the gridApi.
- *
- * @param {object} rowEntity the data entity for which the cell
- * editing was cancelled
- */
- cancelEditCell: function( rowEntity, colDef ){
- var grid = this.grid;
- var gridRow = grid.getRow( rowEntity );
- if ( !gridRow ){ gridUtil.logError( 'Unable to find rowEntity in grid data, timer cannot be set' ); return; }
-
- service.considerSetTimer( grid, gridRow );
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name navigate
- * @description cellNav tells us that the selected cell has changed. If
- * the new row had a timer running, then stop it similar to in a beginCellEdit
- * call. If the old row is dirty and not the same as the new row, then
- * start a timer on it.
- * @param {object} newRowCol the row and column that were selected
- * @param {object} oldRowCol the row and column that was left
- *
- */
- navigate: function( newRowCol, oldRowCol ){
- var grid = this.grid;
- if ( newRowCol.row.rowEditSaveTimer ){
- service.cancelTimer( grid, newRowCol.row );
- }
-
- if ( oldRowCol && oldRowCol.row && oldRowCol.row !== newRowCol.row ){
- service.considerSetTimer( grid, oldRowCol.row );
- }
- },
-
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.rowEdit.api:GridOptions
- * @name rowEditWaitInterval
- * @description How long the grid should wait for another change on this row
- * before triggering a save (in milliseconds). If set to -1, then saves are
- * never triggered by timer (implying that the user will call flushDirtyRows()
- * manually)
- *
- * @example
- * Setting the wait interval to 4 seconds
- * <pre>
- * $scope.gridOptions = { rowEditWaitInterval: 4000 }
- * </pre>
- *
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name considerSetTimer
- * @description Consider setting a timer on this row (if it is dirty). if there is a timer running
- * on the row and the row isn't currently saving, cancel it, using cancelTimer, then if the row is
- * dirty and not currently saving then set a new timer
- * @param {object} grid the grid for which we are processing
- * @param {GridRow} gridRow the row for which the timer should be adjusted
- *
- */
- considerSetTimer: function( grid, gridRow ){
- service.cancelTimer( grid, gridRow );
-
- if ( gridRow.isDirty && !gridRow.isSaving ){
- if ( grid.options.rowEditWaitInterval !== -1 ){
- var waitTime = grid.options.rowEditWaitInterval ? grid.options.rowEditWaitInterval : 2000;
- gridRow.rowEditSaveTimer = $interval( service.saveRow( grid, gridRow ), waitTime, 1);
- }
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name cancelTimer
- * @description cancel the $interval for any timer running on this row
- * then delete the timer itself
- * @param {object} grid the grid for which we are processing
- * @param {GridRow} gridRow the row for which the timer should be adjusted
- *
- */
- cancelTimer: function( grid, gridRow ){
- if ( gridRow.rowEditSaveTimer && !gridRow.isSaving ){
- $interval.cancel(gridRow.rowEditSaveTimer);
- delete gridRow.rowEditSaveTimer;
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name setRowsDirty
- * @description Sets each of the rows passed in dataRows
- * to be dirty. note that if you have only just inserted the
- * rows into your data you will need to wait for a $digest cycle
- * before the gridRows are present - so often you would wrap this
- * call in a $interval or $timeout
- * <pre>
- * $interval( function() {
- * gridApi.rowEdit.setRowsDirty( myDataRows);
- * }, 0, 1);
- * </pre>
- * @param {object} grid the grid for which rows should be set dirty
- * @param {array} dataRows the data entities for which the gridRows
- * should be set dirty.
- *
- */
- setRowsDirty: function( grid, myDataRows ) {
- var gridRow;
- myDataRows.forEach( function( value, index ){
- gridRow = grid.getRow( value );
- if ( gridRow ){
- if ( !grid.rowEdit.dirtyRows ){
- grid.rowEdit.dirtyRows = [];
- }
-
- if ( !gridRow.isDirty ){
- gridRow.isDirty = true;
- grid.rowEdit.dirtyRows.push( gridRow );
- }
-
- delete gridRow.isError;
-
- service.considerSetTimer( grid, gridRow );
- } else {
- gridUtil.logError( "requested row not found in rowEdit.setRowsDirty, row was: " + value );
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name setRowsClean
- * @description Sets each of the rows passed in dataRows
- * to be clean, clearing the dirty flag and the error flag, and removing
- * the rows from the dirty and error caches.
- * @param {object} grid the grid for which rows should be set clean
- * @param {array} dataRows the data entities for which the gridRows
- * should be set clean.
- *
- */
- setRowsClean: function( grid, myDataRows ) {
- var gridRow;
-
- myDataRows.forEach( function( value, index ){
- gridRow = grid.getRow( value );
- if ( gridRow ){
- delete gridRow.isDirty;
- service.removeRow( grid.rowEdit.dirtyRows, gridRow );
- service.cancelTimer( grid, gridRow );
-
- delete gridRow.isError;
- service.removeRow( grid.rowEdit.errorRows, gridRow );
- } else {
- gridUtil.logError( "requested row not found in rowEdit.setRowsClean, row was: " + value );
- }
- });
- }
-
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.rowEdit.directive:uiGridEdit
- * @element div
- * @restrict A
- *
- * @description Adds row editing features to the ui-grid-edit directive.
- *
- */
- module.directive('uiGridRowEdit', ['gridUtil', 'uiGridRowEditService', 'uiGridEditConstants',
- function (gridUtil, uiGridRowEditService, uiGridEditConstants) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridRowEditService.initializeGrid($scope, uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.rowEdit.directive:uiGridViewport
- * @element div
- *
- * @description Stacks on top of ui.grid.uiGridViewport to alter the attributes used
- * for the grid row to allow coloring of saving and error rows
- */
- module.directive('uiGridViewport',
- ['$compile', 'uiGridConstants', 'gridUtil', '$parse',
- function ($compile, uiGridConstants, gridUtil, $parse) {
- return {
- priority: -200, // run after default directive
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
-
- var existingNgClass = rowRepeatDiv.attr("ng-class");
- var newNgClass = '';
- if ( existingNgClass ) {
- newNgClass = existingNgClass.slice(0, -1) + ", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}";
- } else {
- newNgClass = "{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}";
- }
- rowRepeatDiv.attr("ng-class", newNgClass);
-
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.saveState
- * @description
- *
- * # ui.grid.saveState
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides the ability to save the grid state, and restore
- * it when the user returns to the page.
- *
- * No UI is provided, the caller should provide their own UI/buttons
- * as appropriate. Usually the navigate events would be used to save
- * the grid state and restore it.
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.save-state"></div>
- */
-
- var module = angular.module('ui.grid.saveState', ['ui.grid', 'ui.grid.selection', 'ui.grid.cellNav', 'ui.grid.grouping', 'ui.grid.pinning', 'ui.grid.treeView']);
-
- /**
- * @ngdoc object
- * @name ui.grid.saveState.constant:uiGridSaveStateConstants
- *
- * @description constants available in save state module
- */
-
- module.constant('uiGridSaveStateConstants', {
- featureName: 'saveState'
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.saveState.service:uiGridSaveStateService
- *
- * @description Services for saveState feature
- */
- module.service('uiGridSaveStateService', ['$q', 'uiGridSaveStateConstants', 'gridUtil', '$compile', '$interval', 'uiGridConstants',
- function ($q, uiGridSaveStateConstants, gridUtil, $compile, $interval, uiGridConstants ) {
-
- var service = {
-
- initializeGrid: function (grid) {
-
- //add feature namespace and any properties to grid for needed state
- grid.saveState = {};
- this.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.saveState.api:PublicApi
- *
- * @description Public Api for saveState feature
- */
- var publicApi = {
- events: {
- saveState: {
- }
- },
- methods: {
- saveState: {
- /**
- * @ngdoc function
- * @name save
- * @methodOf ui.grid.saveState.api:PublicApi
- * @description Packages the current state of the grid into
- * an object, and provides it to the user for saving
- * @returns {object} the state as a javascript object that can be saved
- */
- save: function () {
- return service.save(grid);
- },
- /**
- * @ngdoc function
- * @name restore
- * @methodOf ui.grid.saveState.api:PublicApi
- * @description Restores the provided state into the grid
- * @param {scope} $scope a scope that we can broadcast on
- * @param {object} state the state that should be restored into the grid
- */
- restore: function ( $scope, state) {
- service.restore(grid, $scope, state);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.saveState.api:GridOptions
- *
- * @description GridOptions for saveState feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- /**
- * @ngdoc object
- * @name saveWidths
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current column widths. Note that unless
- * you've provided the user with some way to resize their columns (say
- * the resize columns feature), then this makes little sense.
- * <br/>Defaults to true
- */
- gridOptions.saveWidths = gridOptions.saveWidths !== false;
- /**
- * @ngdoc object
- * @name saveOrder
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Restore the current column order. Note that unless
- * you've provided the user with some way to reorder their columns (for
- * example the move columns feature), this makes little sense.
- * <br/>Defaults to true
- */
- gridOptions.saveOrder = gridOptions.saveOrder !== false;
- /**
- * @ngdoc object
- * @name saveScroll
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current scroll position. Note that this
- * is saved as the percentage of the grid scrolled - so if your
- * user returns to a grid with a significantly different number of
- * rows (perhaps some data has been deleted) then the scroll won't
- * actually show the same rows as before. If you want to scroll to
- * a specific row then you should instead use the saveFocus option, which
- * is the default.
- *
- * Note that this element will only be saved if the cellNav feature is
- * enabled
- * <br/>Defaults to false
- */
- gridOptions.saveScroll = gridOptions.saveScroll === true;
- /**
- * @ngdoc object
- * @name saveFocus
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current focused cell. On returning
- * to this focused cell we'll also scroll. This option is
- * preferred to the saveScroll option, so is set to true by
- * default. If saveScroll is set to true then this option will
- * be disabled.
- *
- * By default this option saves the current row number and column
- * number, and returns to that row and column. However, if you define
- * a saveRowIdentity function, then it will return you to the currently
- * selected column within that row (in a business sense - so if some
- * rows have been deleted, it will still find the same data, presuming it
- * still exists in the list. If it isn't in the list then it will instead
- * return to the same row number - i.e. scroll percentage)
- *
- * Note that this option will do nothing if the cellNav
- * feature is not enabled.
- *
- * <br/>Defaults to true (unless saveScroll is true)
- */
- gridOptions.saveFocus = gridOptions.saveScroll !== true && gridOptions.saveFocus !== false;
- /**
- * @ngdoc object
- * @name saveRowIdentity
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description A function that can be called, passing in a rowEntity,
- * and that will return a unique id for that row. This might simply
- * return the `id` field from that row (if you have one), or it might
- * concatenate some fields within the row to make a unique value.
- *
- * This value will be used to find the same row again and set the focus
- * to it, if it exists when we return.
- *
- * <br/>Defaults to undefined
- */
- /**
- * @ngdoc object
- * @name saveVisible
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save whether or not columns are visible.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveVisible = gridOptions.saveVisible !== false;
- /**
- * @ngdoc object
- * @name saveSort
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current sort state for each column
- *
- * <br/>Defaults to true
- */
- gridOptions.saveSort = gridOptions.saveSort !== false;
- /**
- * @ngdoc object
- * @name saveFilter
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current filter state for each column
- *
- * <br/>Defaults to true
- */
- gridOptions.saveFilter = gridOptions.saveFilter !== false;
- /**
- * @ngdoc object
- * @name saveSelection
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the currently selected rows. If the `saveRowIdentity` callback
- * is defined, then it will save the id of the row and select that. If not, then
- * it will attempt to select the rows by row number, which will give the wrong results
- * if the data set has changed in the mean-time.
- *
- * Note that this option only does anything
- * if the selection feature is enabled.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveSelection = gridOptions.saveSelection !== false;
- /**
- * @ngdoc object
- * @name saveGrouping
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the grouping configuration. If set to true and the
- * grouping feature is not enabled then does nothing.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveGrouping = gridOptions.saveGrouping !== false;
- /**
- * @ngdoc object
- * @name saveGroupingExpandedStates
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the grouping row expanded states. If set to true and the
- * grouping feature is not enabled then does nothing.
- *
- * This can be quite a bit of data, in many cases you wouldn't want to save this
- * information.
- *
- * <br/>Defaults to false
- */
- gridOptions.saveGroupingExpandedStates = gridOptions.saveGroupingExpandedStates === true;
- /**
- * @ngdoc object
- * @name savePinning
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save pinning state for columns.
- *
- * <br/>Defaults to true
- */
- gridOptions.savePinning = gridOptions.savePinning !== false;
- /**
- * @ngdoc object
- * @name saveTreeView
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the treeView configuration. If set to true and the
- * treeView feature is not enabled then does nothing.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveTreeView = gridOptions.saveTreeView !== false;
- },
-
-
-
- /**
- * @ngdoc function
- * @name save
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the current grid state into an object, and
- * passes that object back to the caller
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the state ready to be saved
- */
- save: function (grid) {
- var savedState = {};
-
- savedState.columns = service.saveColumns( grid );
- savedState.scrollFocus = service.saveScrollFocus( grid );
- savedState.selection = service.saveSelection( grid );
- savedState.grouping = service.saveGrouping( grid );
- savedState.treeView = service.saveTreeView( grid );
- savedState.pagination = service.savePagination( grid );
-
- return savedState;
- },
-
-
- /**
- * @ngdoc function
- * @name restore
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Applies the provided state to the grid
- *
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {scope} $scope a scope that we can broadcast on
- * @param {object} state the state we'd like to restore
- */
- restore: function( grid, $scope, state ){
- if ( state.columns ) {
- service.restoreColumns( grid, state.columns );
- }
-
- if ( state.scrollFocus ){
- service.restoreScrollFocus( grid, $scope, state.scrollFocus );
- }
-
- if ( state.selection ){
- service.restoreSelection( grid, state.selection );
- }
-
- if ( state.grouping ){
- service.restoreGrouping( grid, state.grouping );
- }
-
- if ( state.treeView ){
- service.restoreTreeView( grid, state.treeView );
- }
-
- if ( state.pagination ){
- service.restorePagination( grid, state.pagination );
- }
-
- grid.refresh();
- },
-
-
- /**
- * @ngdoc function
- * @name saveColumns
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the column setup, including sort, filters, ordering,
- * pinning and column widths.
- *
- * Works through the current columns, storing them in order. Stores the
- * column name, then the visible flag, width, sort and filters for each column.
- *
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {array} the columns state ready to be saved
- */
- saveColumns: function( grid ) {
- var columns = [];
- grid.getOnlyDataColumns().forEach( function( column ) {
- var savedColumn = {};
- savedColumn.name = column.name;
-
- if ( grid.options.saveVisible ){
- savedColumn.visible = column.visible;
- }
-
- if ( grid.options.saveWidths ){
- savedColumn.width = column.width;
- }
-
- // these two must be copied, not just pointed too - otherwise our saved state is pointing to the same object as current state
- if ( grid.options.saveSort ){
- savedColumn.sort = angular.copy( column.sort );
- }
-
- if ( grid.options.saveFilter ){
- savedColumn.filters = [];
- column.filters.forEach( function( filter ){
- var copiedFilter = {};
- angular.forEach( filter, function( value, key) {
- if ( key !== 'condition' && key !== '$$hashKey' && key !== 'placeholder'){
- copiedFilter[key] = value;
- }
- });
- savedColumn.filters.push(copiedFilter);
- });
- }
-
- if ( !!grid.api.pinning && grid.options.savePinning ){
- savedColumn.pinned = column.renderContainer ? column.renderContainer : '';
- }
-
- columns.push( savedColumn );
- });
-
- return columns;
- },
-
-
- /**
- * @ngdoc function
- * @name saveScrollFocus
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the currently scroll or focus.
- *
- * If cellNav isn't present then does nothing - we can't return
- * to the scroll position without cellNav anyway.
- *
- * If the cellNav module is present, and saveFocus is true, then
- * it saves the currently focused cell. If rowIdentity is present
- * then saves using rowIdentity, otherwise saves visibleRowNum.
- *
- * If the cellNav module is not present, and saveScroll is true, then
- * it approximates the current scroll row and column, and saves that.
- *
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the selection state ready to be saved
- */
- saveScrollFocus: function( grid ){
- if ( !grid.api.cellNav ){
- return {};
- }
-
- var scrollFocus = {};
- if ( grid.options.saveFocus ){
- scrollFocus.focus = true;
- var rowCol = grid.api.cellNav.getFocusedCell();
- if ( rowCol !== null ) {
- if ( rowCol.col !== null ){
- scrollFocus.colName = rowCol.col.colDef.name;
- }
- if ( rowCol.row !== null ){
- scrollFocus.rowVal = service.getRowVal( grid, rowCol.row );
- }
- }
- }
-
- if ( grid.options.saveScroll || grid.options.saveFocus && !scrollFocus.colName && !scrollFocus.rowVal ) {
- scrollFocus.focus = false;
- if ( grid.renderContainers.body.prevRowScrollIndex ){
- scrollFocus.rowVal = service.getRowVal( grid, grid.renderContainers.body.visibleRowCache[ grid.renderContainers.body.prevRowScrollIndex ]);
- }
-
- if ( grid.renderContainers.body.prevColScrollIndex ){
- scrollFocus.colName = grid.renderContainers.body.visibleColumnCache[ grid.renderContainers.body.prevColScrollIndex ].name;
- }
- }
-
- return scrollFocus;
- },
-
-
- /**
- * @ngdoc function
- * @name saveSelection
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the currently selected rows, if the selection feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {array} the selection state ready to be saved
- */
- saveSelection: function( grid ){
- if ( !grid.api.selection || !grid.options.saveSelection ){
- return [];
- }
-
- var selection = grid.api.selection.getSelectedGridRows().map( function( gridRow ) {
- return service.getRowVal( grid, gridRow );
- });
-
- return selection;
- },
-
-
- /**
- * @ngdoc function
- * @name saveGrouping
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the grouping state, if the grouping feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the grouping state ready to be saved
- */
- saveGrouping: function( grid ){
- if ( !grid.api.grouping || !grid.options.saveGrouping ){
- return {};
- }
-
- return grid.api.grouping.getGrouping( grid.options.saveGroupingExpandedStates );
- },
-
-
- /**
- * @ngdoc function
- * @name savePagination
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the pagination state, if the pagination feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the pagination state ready to be saved
- */
- savePagination: function( grid ) {
- if ( !grid.api.pagination || !grid.options.paginationPageSize ){
- return {};
- }
-
- return {
- paginationCurrentPage: grid.options.paginationCurrentPage,
- paginationPageSize: grid.options.paginationPageSize
- };
- },
-
-
- /**
- * @ngdoc function
- * @name saveTreeView
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the tree view state, if the tree feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the tree view state ready to be saved
- */
- saveTreeView: function( grid ){
- if ( !grid.api.treeView || !grid.options.saveTreeView ){
- return {};
- }
-
- return grid.api.treeView.getTreeView();
- },
-
-
- /**
- * @ngdoc function
- * @name getRowVal
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Helper function that gets either the rowNum or
- * the saveRowIdentity, given a gridRow
- * @param {Grid} grid the grid the row is in
- * @param {GridRow} gridRow the row we want the rowNum for
- * @returns {object} an object containing { identity: true/false, row: rowNumber/rowIdentity }
- *
- */
- getRowVal: function( grid, gridRow ){
- if ( !gridRow ) {
- return null;
- }
-
- var rowVal = {};
- if ( grid.options.saveRowIdentity ){
- rowVal.identity = true;
- rowVal.row = grid.options.saveRowIdentity( gridRow.entity );
- } else {
- rowVal.identity = false;
- rowVal.row = grid.renderContainers.body.visibleRowCache.indexOf( gridRow );
- }
- return rowVal;
- },
-
-
- /**
- * @ngdoc function
- * @name restoreColumns
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the columns, including order, visible, width,
- * pinning, sort and filters.
- *
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} columnsState the list of columns we had before, with their state
- */
- restoreColumns: function( grid, columnsState ){
- var isSortChanged = false;
-
- columnsState.forEach( function( columnState, index ) {
- var currentCol = grid.getColumn( columnState.name );
-
- if ( currentCol && !grid.isRowHeaderColumn(currentCol) ){
- if ( grid.options.saveVisible &&
- ( currentCol.visible !== columnState.visible ||
- currentCol.colDef.visible !== columnState.visible ) ){
- currentCol.visible = columnState.visible;
- currentCol.colDef.visible = columnState.visible;
- grid.api.core.raise.columnVisibilityChanged(currentCol);
- }
-
- if ( grid.options.saveWidths && currentCol.width !== columnState.width){
- currentCol.width = columnState.width;
- currentCol.hasCustomWidth = true;
- }
-
- if ( grid.options.saveSort &&
- !angular.equals(currentCol.sort, columnState.sort) &&
- !( currentCol.sort === undefined && angular.isEmpty(columnState.sort) ) ){
- currentCol.sort = angular.copy( columnState.sort );
- isSortChanged = true;
- }
-
- if ( grid.options.saveFilter &&
- !angular.equals(currentCol.filters, columnState.filters ) ){
- columnState.filters.forEach( function( filter, index ){
- angular.extend( currentCol.filters[index], filter );
- if ( typeof(filter.term) === 'undefined' || filter.term === null ){
- delete currentCol.filters[index].term;
- }
- });
- grid.api.core.raise.filterChanged();
- }
-
- if ( !!grid.api.pinning && grid.options.savePinning && currentCol.renderContainer !== columnState.pinned ){
- grid.api.pinning.pinColumn(currentCol, columnState.pinned);
- }
-
- var currentIndex = grid.getOnlyDataColumns().indexOf( currentCol );
- if (currentIndex !== -1) {
- if (grid.options.saveOrder && currentIndex !== index) {
- var column = grid.columns.splice(currentIndex + grid.rowHeaderColumns.length, 1)[0];
- grid.columns.splice(index + grid.rowHeaderColumns.length, 0, column);
- }
- }
- }
- });
-
- if ( isSortChanged ) {
- grid.api.core.raise.sortChanged( grid, grid.getColumnSorting() );
- }
- },
-
-
- /**
- * @ngdoc function
- * @name restoreScrollFocus
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Scrolls to the position that was saved. If focus is true, then
- * sets focus to the specified row/col. If focus is false, then scrolls to the
- * specified row/col.
- *
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {scope} $scope a scope that we can broadcast on
- * @param {object} scrollFocusState the scroll/focus state ready to be restored
- */
- restoreScrollFocus: function( grid, $scope, scrollFocusState ){
- if ( !grid.api.cellNav ){
- return;
- }
-
- var colDef, row;
- if ( scrollFocusState.colName ){
- var colDefs = grid.options.columnDefs.filter( function( colDef ) { return colDef.name === scrollFocusState.colName; });
- if ( colDefs.length > 0 ){
- colDef = colDefs[0];
- }
- }
-
- if ( scrollFocusState.rowVal && scrollFocusState.rowVal.row ){
- if ( scrollFocusState.rowVal.identity ){
- row = service.findRowByIdentity( grid, scrollFocusState.rowVal );
- } else {
- row = grid.renderContainers.body.visibleRowCache[ scrollFocusState.rowVal.row ];
- }
- }
-
- var entity = row && row.entity ? row.entity : null ;
-
- if ( colDef || entity ) {
- if (scrollFocusState.focus ){
- grid.api.cellNav.scrollToFocus( entity, colDef );
- } else {
- grid.scrollTo( entity, colDef );
- }
- }
- },
-
-
- /**
- * @ngdoc function
- * @name restoreSelection
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Selects the rows that are provided in the selection
- * state. If you are using `saveRowIdentity` and more than one row matches the identity
- * function then only the first is selected.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} selectionState the selection state ready to be restored
- */
- restoreSelection: function( grid, selectionState ){
- if ( !grid.api.selection ){
- return;
- }
-
- grid.api.selection.clearSelectedRows();
-
- selectionState.forEach( function( rowVal ) {
- if ( rowVal.identity ){
- var foundRow = service.findRowByIdentity( grid, rowVal );
-
- if ( foundRow ){
- grid.api.selection.selectRow( foundRow.entity );
- }
-
- } else {
- grid.api.selection.selectRowByVisibleIndex( rowVal.row );
- }
- });
- },
-
-
- /**
- * @ngdoc function
- * @name restoreGrouping
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the grouping configuration, if the grouping feature
- * is enabled.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} groupingState the grouping state ready to be restored
- */
- restoreGrouping: function( grid, groupingState ){
- if ( !grid.api.grouping || typeof(groupingState) === 'undefined' || groupingState === null || angular.equals(groupingState, {}) ){
- return;
- }
-
- grid.api.grouping.setGrouping( groupingState );
- },
-
- /**
- * @ngdoc function
- * @name restoreTreeView
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the tree view configuration, if the tree view feature
- * is enabled.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} treeViewState the tree view state ready to be restored
- */
- restoreTreeView: function( grid, treeViewState ){
- if ( !grid.api.treeView || typeof(treeViewState) === 'undefined' || treeViewState === null || angular.equals(treeViewState, {}) ){
- return;
- }
-
- grid.api.treeView.setTreeView( treeViewState );
- },
-
- /**
- * @ngdoc function
- * @name restorePagination
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the pagination information, if pagination is enabled.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} pagination the pagination object to be restored
- * @param {number} pagination.paginationCurrentPage the page number to restore
- * @param {number} pagination.paginationPageSize the number of items displayed per page
- */
- restorePagination: function( grid, pagination ){
- if ( !grid.api.pagination || !grid.options.paginationPageSize ){
- return;
- }
-
- grid.options.paginationCurrentPage = pagination.paginationCurrentPage;
- grid.options.paginationPageSize = pagination.paginationPageSize;
- },
-
- /**
- * @ngdoc function
- * @name findRowByIdentity
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Finds a row given it's identity value, returns the first found row
- * if any are found, otherwise returns null if no rows are found.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} rowVal the row we'd like to find
- * @returns {gridRow} the found row, or null if none found
- */
- findRowByIdentity: function( grid, rowVal ){
- if ( !grid.options.saveRowIdentity ){
- return null;
- }
-
- var filteredRows = grid.rows.filter( function( gridRow ) {
- if ( grid.options.saveRowIdentity( gridRow.entity ) === rowVal.row ){
- return true;
- } else {
- return false;
- }
- });
-
- if ( filteredRows.length > 0 ){
- return filteredRows[0];
- } else {
- return null;
- }
- }
- };
-
- return service;
-
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.saveState.directive:uiGridSaveState
- * @element div
- * @restrict A
- *
- * @description Adds saveState features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.saveState']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.gridOptions = {
- columnDefs: [
- {name: 'name'},
- {name: 'title', enableCellEdit: true}
- ],
- data: $scope.data
- };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-save-state></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridSaveState', ['uiGridSaveStateConstants', 'uiGridSaveStateService', 'gridUtil', '$compile',
- function (uiGridSaveStateConstants, uiGridSaveStateService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridSaveStateService.initializeGrid(uiGridCtrl.grid);
- }
- };
- }
- ]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.selection
- * @description
- *
- * # ui.grid.selection
- * This module provides row selection
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * <div doc-module-components="ui.grid.selection"></div>
- */
-
- var module = angular.module('ui.grid.selection', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.selection.constant:uiGridSelectionConstants
- *
- * @description constants available in selection module
- */
- module.constant('uiGridSelectionConstants', {
- featureName: "selection",
- selectionRowHeaderColName: 'selectionRowHeaderCol'
- });
-
- //add methods to GridRow
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('GridRow', ['$delegate', function($delegate) {
-
- /**
- * @ngdoc object
- * @name ui.grid.selection.api:GridRow
- *
- * @description GridRow prototype functions added for selection
- */
-
- /**
- * @ngdoc object
- * @name enableSelection
- * @propertyOf ui.grid.selection.api:GridRow
- * @description Enable row selection for this row, only settable by internal code.
- *
- * The grouping feature, for example, might set group header rows to not be selectable.
- * <br/>Defaults to true
- */
-
- /**
- * @ngdoc object
- * @name isSelected
- * @propertyOf ui.grid.selection.api:GridRow
- * @description Selected state of row. Should be readonly. Make any changes to selected state using setSelected().
- * <br/>Defaults to false
- */
-
-
- /**
- * @ngdoc function
- * @name setSelected
- * @methodOf ui.grid.selection.api:GridRow
- * @description Sets the isSelected property and updates the selectedCount
- * Changes to isSelected state should only be made via this function
- * @param {bool} selected value to set
- */
- $delegate.prototype.setSelected = function(selected) {
- if (selected !== this.isSelected) {
- this.isSelected = selected;
- this.grid.selection.selectedCount += selected ? 1 : -1;
- }
- };
-
- return $delegate;
- }]);
- }]);
-
- /**
- * @ngdoc service
- * @name ui.grid.selection.service:uiGridSelectionService
- *
- * @description Services for selection features
- */
- module.service('uiGridSelectionService', ['$q', '$templateCache', 'uiGridSelectionConstants', 'gridUtil',
- function ($q, $templateCache, uiGridSelectionConstants, gridUtil) {
-
- var service = {
-
- initializeGrid: function (grid) {
-
- //add feature namespace and any properties to grid for needed
- /**
- * @ngdoc object
- * @name ui.grid.selection.grid:selection
- *
- * @description Grid properties and functions added for selection
- */
- grid.selection = {};
- grid.selection.lastSelectedRow = null;
- grid.selection.selectAll = false;
-
-
- /**
- * @ngdoc object
- * @name selectedCount
- * @propertyOf ui.grid.selection.grid:selection
- * @description Current count of selected rows
- * @example
- * var count = grid.selection.selectedCount
- */
- grid.selection.selectedCount = 0;
-
- service.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.selection.api:PublicApi
- *
- * @description Public Api for selection feature
- */
- var publicApi = {
- events: {
- selection: {
- /**
- * @ngdoc event
- * @name rowSelectionChanged
- * @eventOf ui.grid.selection.api:PublicApi
- * @description is raised after the row.isSelected state is changed
- * @param {GridRow} row the row that was selected/deselected
- * @param {Event} event object if raised from an event
- */
- rowSelectionChanged: function (scope, row, evt) {
- },
- /**
- * @ngdoc event
- * @name rowSelectionChangedBatch
- * @eventOf ui.grid.selection.api:PublicApi
- * @description is raised after the row.isSelected state is changed
- * in bulk, if the `enableSelectionBatchEvent` option is set to true
- * (which it is by default). This allows more efficient processing
- * of bulk events.
- * @param {array} rows the rows that were selected/deselected
- * @param {Event} event object if raised from an event
- */
- rowSelectionChangedBatch: function (scope, rows, evt) {
- }
- }
- },
- methods: {
- selection: {
- /**
- * @ngdoc function
- * @name toggleRowSelection
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Toggles data row as selected or unselected
- * @param {object} rowEntity gridOptions.data[] array instance
- * @param {Event} event object if raised from an event
- */
- toggleRowSelection: function (rowEntity, evt) {
- var row = grid.getRow(rowEntity);
- if (row !== null) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name selectRow
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Select the data row
- * @param {object} rowEntity gridOptions.data[] array instance
- * @param {Event} event object if raised from an event
- */
- selectRow: function (rowEntity, evt) {
- var row = grid.getRow(rowEntity);
- if (row !== null && !row.isSelected) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name selectRowByVisibleIndex
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Select the specified row by visible index (i.e. if you
- * specify row 0 you'll get the first visible row selected). In this context
- * visible means of those rows that are theoretically visible (i.e. not filtered),
- * rather than rows currently rendered on the screen.
- * @param {number} index index within the rowsVisible array
- * @param {Event} event object if raised from an event
- */
- selectRowByVisibleIndex: function ( rowNum, evt ) {
- var row = grid.renderContainers.body.visibleRowCache[rowNum];
- if (row !== null && typeof(row) !== 'undefined' && !row.isSelected) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name unSelectRow
- * @methodOf ui.grid.selection.api:PublicApi
- * @description UnSelect the data row
- * @param {object} rowEntity gridOptions.data[] array instance
- * @param {Event} event object if raised from an event
- */
- unSelectRow: function (rowEntity, evt) {
- var row = grid.getRow(rowEntity);
- if (row !== null && row.isSelected) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name selectAllRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Selects all rows. Does nothing if multiSelect = false
- * @param {Event} event object if raised from an event
- */
- selectAllRows: function (evt) {
- if (grid.options.multiSelect === false) {
- return;
- }
-
- var changedRows = [];
- grid.rows.forEach(function (row) {
- if ( !row.isSelected && row.enableSelection !== false ){
- row.setSelected(true);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- });
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- grid.selection.selectAll = true;
- },
- /**
- * @ngdoc function
- * @name selectAllVisibleRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Selects all visible rows. Does nothing if multiSelect = false
- * @param {Event} event object if raised from an event
- */
- selectAllVisibleRows: function (evt) {
- if (grid.options.multiSelect === false) {
- return;
- }
-
- var changedRows = [];
- grid.rows.forEach(function (row) {
- if (row.visible) {
- if (!row.isSelected && row.enableSelection !== false){
- row.setSelected(true);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- } else {
- if (row.isSelected){
- row.setSelected(false);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- }
- });
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- grid.selection.selectAll = true;
- },
- /**
- * @ngdoc function
- * @name clearSelectedRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Unselects all rows
- * @param {Event} event object if raised from an event
- */
- clearSelectedRows: function (evt) {
- service.clearSelectedRows(grid, evt);
- },
- /**
- * @ngdoc function
- * @name getSelectedRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description returns all selectedRow's entity references
- */
- getSelectedRows: function () {
- return service.getSelectedRows(grid).map(function (gridRow) {
- return gridRow.entity;
- });
- },
- /**
- * @ngdoc function
- * @name getSelectedGridRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description returns all selectedRow's as gridRows
- */
- getSelectedGridRows: function () {
- return service.getSelectedRows(grid);
- },
- /**
- * @ngdoc function
- * @name getSelectedCount
- * @methodOf ui.grid.selection.api:PublicApi
- * @description returns the number of rows selected
- */
- getSelectedCount: function () {
- return grid.selection.selectedCount;
- },
- /**
- * @ngdoc function
- * @name setMultiSelect
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Sets the current gridOption.multiSelect to true or false
- * @param {bool} multiSelect true to allow multiple rows
- */
- setMultiSelect: function (multiSelect) {
- grid.options.multiSelect = multiSelect;
- },
- /**
- * @ngdoc function
- * @name setModifierKeysToMultiSelect
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Sets the current gridOption.modifierKeysToMultiSelect to true or false
- * @param {bool} modifierKeysToMultiSelect true to only allow multiple rows when using ctrlKey or shiftKey is used
- */
- setModifierKeysToMultiSelect: function (modifierKeysToMultiSelect) {
- grid.options.modifierKeysToMultiSelect = modifierKeysToMultiSelect;
- },
- /**
- * @ngdoc function
- * @name getSelectAllState
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Returns whether or not the selectAll checkbox is currently ticked. The
- * grid doesn't automatically select rows when you add extra data - so when you add data
- * you need to explicitly check whether the selectAll is set, and then call setVisible rows
- * if it is
- */
- getSelectAllState: function () {
- return grid.selection.selectAll;
- }
-
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.selection.api:GridOptions
- *
- * @description GridOptions for selection feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableRowSelection
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable row selection for entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enableRowSelection = gridOptions.enableRowSelection !== false;
- /**
- * @ngdoc object
- * @name multiSelect
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable multiple row selection for entire grid
- * <br/>Defaults to true
- */
- gridOptions.multiSelect = gridOptions.multiSelect !== false;
- /**
- * @ngdoc object
- * @name noUnselect
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Prevent a row from being unselected. Works in conjunction
- * with `multiselect = false` and `gridApi.selection.selectRow()` to allow
- * you to create a single selection only grid - a row is always selected, you
- * can only select different rows, you can't unselect the row.
- * <br/>Defaults to false
- */
- gridOptions.noUnselect = gridOptions.noUnselect === true;
- /**
- * @ngdoc object
- * @name modifierKeysToMultiSelect
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable multiple row selection only when using the ctrlKey or shiftKey. Requires multiSelect to be true.
- * <br/>Defaults to false
- */
- gridOptions.modifierKeysToMultiSelect = gridOptions.modifierKeysToMultiSelect === true;
- /**
- * @ngdoc object
- * @name enableRowHeaderSelection
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable a row header to be used for selection
- * <br/>Defaults to true
- */
- gridOptions.enableRowHeaderSelection = gridOptions.enableRowHeaderSelection !== false;
- /**
- * @ngdoc object
- * @name enableFullRowSelection
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable selection by clicking anywhere on the row. Defaults to
- * false if `enableRowHeaderSelection` is true, otherwise defaults to false.
- */
- if ( typeof(gridOptions.enableFullRowSelection) === 'undefined' ){
- gridOptions.enableFullRowSelection = !gridOptions.enableRowHeaderSelection;
- }
- /**
- * @ngdoc object
- * @name enableSelectAll
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable the select all checkbox at the top of the selectionRowHeader
- * <br/>Defaults to true
- */
- gridOptions.enableSelectAll = gridOptions.enableSelectAll !== false;
- /**
- * @ngdoc object
- * @name enableSelectionBatchEvent
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description If selected rows are changed in bulk, either via the API or
- * via the selectAll checkbox, then a separate event is fired. Setting this
- * option to false will cause the rowSelectionChanged event to be called multiple times
- * instead
- * <br/>Defaults to true
- */
- gridOptions.enableSelectionBatchEvent = gridOptions.enableSelectionBatchEvent !== false;
- /**
- * @ngdoc object
- * @name selectionRowHeaderWidth
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description can be used to set a custom width for the row header selection column
- * <br/>Defaults to 30px
- */
- gridOptions.selectionRowHeaderWidth = angular.isDefined(gridOptions.selectionRowHeaderWidth) ? gridOptions.selectionRowHeaderWidth : 30;
-
- /**
- * @ngdoc object
- * @name enableFooterTotalSelected
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Shows the total number of selected items in footer if true.
- * <br/>Defaults to true.
- * <br/>GridOptions.showGridFooter must also be set to true.
- */
- gridOptions.enableFooterTotalSelected = gridOptions.enableFooterTotalSelected !== false;
-
- /**
- * @ngdoc object
- * @name isRowSelectable
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Makes it possible to specify a method that evaluates for each row and sets its "enableSelection" property.
- */
-
- gridOptions.isRowSelectable = angular.isDefined(gridOptions.isRowSelectable) ? gridOptions.isRowSelectable : angular.noop;
- },
-
- /**
- * @ngdoc function
- * @name toggleRowSelection
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Toggles row as selected or unselected
- * @param {Grid} grid grid object
- * @param {GridRow} row row to select or deselect
- * @param {Event} event object if resulting from event
- * @param {bool} multiSelect if false, only one row at time can be selected
- * @param {bool} noUnselect if true then rows cannot be unselected
- */
- toggleRowSelection: function (grid, row, evt, multiSelect, noUnselect) {
- var selected = row.isSelected;
-
- if ( row.enableSelection === false && !selected ){
- return;
- }
-
- var selectedRows;
- if (!multiSelect && !selected) {
- service.clearSelectedRows(grid, evt);
- } else if (!multiSelect && selected) {
- selectedRows = service.getSelectedRows(grid);
- if (selectedRows.length > 1) {
- selected = false; // Enable reselect of the row
- service.clearSelectedRows(grid, evt);
- }
- }
-
- if (selected && noUnselect){
- // don't deselect the row
- } else {
- row.setSelected(!selected);
- if (row.isSelected === true) {
- grid.selection.lastSelectedRow = row;
- }
-
- selectedRows = service.getSelectedRows(grid);
- grid.selection.selectAll = grid.rows.length === selectedRows.length;
-
- grid.api.selection.raise.rowSelectionChanged(row, evt);
- }
- },
- /**
- * @ngdoc function
- * @name shiftSelect
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description selects a group of rows from the last selected row using the shift key
- * @param {Grid} grid grid object
- * @param {GridRow} clicked row
- * @param {Event} event object if raised from an event
- * @param {bool} multiSelect if false, does nothing this is for multiSelect only
- */
- shiftSelect: function (grid, row, evt, multiSelect) {
- if (!multiSelect) {
- return;
- }
- var selectedRows = service.getSelectedRows(grid);
- var fromRow = selectedRows.length > 0 ? grid.renderContainers.body.visibleRowCache.indexOf(grid.selection.lastSelectedRow) : 0;
- var toRow = grid.renderContainers.body.visibleRowCache.indexOf(row);
- //reverse select direction
- if (fromRow > toRow) {
- var tmp = fromRow;
- fromRow = toRow;
- toRow = tmp;
- }
-
- var changedRows = [];
- for (var i = fromRow; i <= toRow; i++) {
- var rowToSelect = grid.renderContainers.body.visibleRowCache[i];
- if (rowToSelect) {
- if ( !rowToSelect.isSelected && rowToSelect.enableSelection !== false ){
- rowToSelect.setSelected(true);
- grid.selection.lastSelectedRow = rowToSelect;
- service.decideRaiseSelectionEvent( grid, rowToSelect, changedRows, evt );
- }
- }
- }
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- },
- /**
- * @ngdoc function
- * @name getSelectedRows
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Returns all the selected rows
- * @param {Grid} grid grid object
- */
- getSelectedRows: function (grid) {
- return grid.rows.filter(function (row) {
- return row.isSelected;
- });
- },
-
- /**
- * @ngdoc function
- * @name clearSelectedRows
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Clears all selected rows
- * @param {Grid} grid grid object
- * @param {Event} event object if raised from an event
- */
- clearSelectedRows: function (grid, evt) {
- var changedRows = [];
- service.getSelectedRows(grid).forEach(function (row) {
- if ( row.isSelected ){
- row.setSelected(false);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- });
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- grid.selection.selectAll = false;
- grid.selection.selectedCount = 0;
- },
-
- /**
- * @ngdoc function
- * @name decideRaiseSelectionEvent
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Decides whether to raise a single event or a batch event
- * @param {Grid} grid grid object
- * @param {GridRow} row row that has changed
- * @param {array} changedRows an array to which we can append the changed
- * @param {Event} event object if raised from an event
- * row if we're doing batch events
- */
- decideRaiseSelectionEvent: function( grid, row, changedRows, evt ){
- if ( !grid.options.enableSelectionBatchEvent ){
- grid.api.selection.raise.rowSelectionChanged(row, evt);
- } else {
- changedRows.push(row);
- }
- },
-
- /**
- * @ngdoc function
- * @name raiseSelectionEvent
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Decides whether we need to raise a batch event, and
- * raises it if we do.
- * @param {Grid} grid grid object
- * @param {array} changedRows an array of changed rows, only populated
- * @param {Event} event object if raised from an event
- * if we're doing batch events
- */
- decideRaiseSelectionBatchEvent: function( grid, changedRows, evt ){
- if ( changedRows.length > 0 ){
- grid.api.selection.raise.rowSelectionChangedBatch(changedRows, evt);
- }
- }
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.selection.directive:uiGridSelection
- * @element div
- * @restrict A
- *
- * @description Adds selection features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.selection']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-selection></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridSelection', ['uiGridSelectionConstants', 'uiGridSelectionService', '$templateCache', 'uiGridConstants',
- function (uiGridSelectionConstants, uiGridSelectionService, $templateCache, uiGridConstants) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridSelectionService.initializeGrid(uiGridCtrl.grid);
- if (uiGridCtrl.grid.options.enableRowHeaderSelection) {
- var selectionRowHeaderDef = {
- name: uiGridSelectionConstants.selectionRowHeaderColName,
- displayName: '',
- width: uiGridCtrl.grid.options.selectionRowHeaderWidth,
- minWidth: 10,
- cellTemplate: 'ui-grid/selectionRowHeader',
- headerCellTemplate: 'ui-grid/selectionHeaderCell',
- enableColumnResizing: false,
- enableColumnMenu: false,
- exporterSuppressExport: true,
- allowCellFocus: true
- };
-
- uiGridCtrl.grid.addRowHeaderColumn(selectionRowHeaderDef, 0);
- }
-
- var processorSet = false;
-
- var processSelectableRows = function( rows ){
- rows.forEach(function(row){
- row.enableSelection = uiGridCtrl.grid.options.isRowSelectable(row);
- });
- return rows;
- };
-
- var updateOptions = function(){
- if (uiGridCtrl.grid.options.isRowSelectable !== angular.noop && processorSet !== true) {
- uiGridCtrl.grid.registerRowsProcessor(processSelectableRows, 500);
- processorSet = true;
- }
- };
-
- updateOptions();
-
- var dataChangeDereg = uiGridCtrl.grid.registerDataChangeCallback( updateOptions, [uiGridConstants.dataChange.OPTIONS] );
-
- $scope.$on( '$destroy', dataChangeDereg);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- }
- };
- }
- };
- }]);
-
- module.directive('uiGridSelectionRowHeaderButtons', ['$templateCache', 'uiGridSelectionService', 'gridUtil',
- function ($templateCache, uiGridSelectionService, gridUtil) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/selectionRowHeaderButtons'),
- scope: true,
- require: '^uiGrid',
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = uiGridCtrl.grid;
- $scope.selectButtonClick = selectButtonClick;
-
- // On IE, prevent mousedowns on the select button from starting a selection.
- // If this is not done and you shift+click on another row, the browser will select a big chunk of text
- if (gridUtil.detectBrowser() === 'ie') {
- $elm.on('mousedown', selectButtonMouseDown);
- }
-
-
- function selectButtonClick(row, evt) {
- evt.stopPropagation();
-
- if (evt.shiftKey) {
- uiGridSelectionService.shiftSelect(self, row, evt, self.options.multiSelect);
- }
- else if (evt.ctrlKey || evt.metaKey) {
- uiGridSelectionService.toggleRowSelection(self, row, evt, self.options.multiSelect, self.options.noUnselect);
- }
- else {
- uiGridSelectionService.toggleRowSelection(self, row, evt, (self.options.multiSelect && !self.options.modifierKeysToMultiSelect), self.options.noUnselect);
- }
- }
-
- function selectButtonMouseDown(evt) {
- if (evt.ctrlKey || evt.shiftKey) {
- evt.target.onselectstart = function () { return false; };
- window.setTimeout(function () { evt.target.onselectstart = null; }, 0);
- }
- }
-
- $scope.$on('$destroy', function unbindEvents() {
- $elm.off();
- });
- }
- };
- }]);
-
- module.directive('uiGridSelectionSelectAllButtons', ['$templateCache', 'uiGridSelectionService',
- function ($templateCache, uiGridSelectionService) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/selectionSelectAllButtons'),
- scope: false,
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = $scope.col.grid;
-
- $scope.headerButtonClick = function(row, evt) {
- if ( self.selection.selectAll ){
- uiGridSelectionService.clearSelectedRows(self, evt);
- if ( self.options.noUnselect ){
- self.api.selection.selectRowByVisibleIndex(0, evt);
- }
- self.selection.selectAll = false;
- } else {
- if ( self.options.multiSelect ){
- self.api.selection.selectAllVisibleRows(evt);
- self.selection.selectAll = true;
- }
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.selection.directive:uiGridViewport
- * @element div
- *
- * @description Stacks on top of ui.grid.uiGridViewport to alter the attributes used
- * for the grid row
- */
- module.directive('uiGridViewport',
- ['$compile', 'uiGridConstants', 'uiGridSelectionConstants', 'gridUtil', '$parse', 'uiGridSelectionService',
- function ($compile, uiGridConstants, uiGridSelectionConstants, gridUtil, $parse, uiGridSelectionService) {
- return {
- priority: -200, // run after default directive
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
-
- var existingNgClass = rowRepeatDiv.attr("ng-class");
- var newNgClass = '';
- if ( existingNgClass ) {
- newNgClass = existingNgClass.slice(0, -1) + ",'ui-grid-row-selected': row.isSelected}";
- } else {
- newNgClass = "{'ui-grid-row-selected': row.isSelected}";
- }
- rowRepeatDiv.attr("ng-class", newNgClass);
-
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.selection.directive:uiGridCell
- * @element div
- * @restrict A
- *
- * @description Stacks on top of ui.grid.uiGridCell to provide selection feature
- */
- module.directive('uiGridCell',
- ['$compile', 'uiGridConstants', 'uiGridSelectionConstants', 'gridUtil', '$parse', 'uiGridSelectionService', '$timeout',
- function ($compile, uiGridConstants, uiGridSelectionConstants, gridUtil, $parse, uiGridSelectionService, $timeout) {
- return {
- priority: -200, // run after default uiGridCell directive
- restrict: 'A',
- require: '?^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- var touchStartTime = 0;
- var touchTimeout = 300;
-
- // Bind to keydown events in the render container
- if (uiGridCtrl.grid.api.cellNav) {
-
- uiGridCtrl.grid.api.cellNav.on.viewPortKeyDown($scope, function (evt, rowCol) {
- if (rowCol === null ||
- rowCol.row !== $scope.row ||
- rowCol.col !== $scope.col) {
- return;
- }
-
- if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
- uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
- $scope.$apply();
- }
-
- // uiGridCellNavService.scrollToIfNecessary(uiGridCtrl.grid, rowCol.row, rowCol.col);
- });
- }
-
- //$elm.bind('keydown', function (evt) {
- // if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
- // uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
- // $scope.$apply();
- // }
- //});
-
- var selectCells = function(evt){
- // if you click on expandable icon doesn't trigger selection
- if (evt.target.className === "ui-grid-icon-minus-squared" || evt.target.className === "ui-grid-icon-plus-squared") {
- return;
- }
-
- // if we get a click, then stop listening for touchend
- $elm.off('touchend', touchEnd);
-
- if (evt.shiftKey) {
- uiGridSelectionService.shiftSelect($scope.grid, $scope.row, evt, $scope.grid.options.multiSelect);
- }
- else if (evt.ctrlKey || evt.metaKey) {
- uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, $scope.grid.options.multiSelect, $scope.grid.options.noUnselect);
- }
- else {
- uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
- }
- $scope.$apply();
-
- // don't re-enable the touchend handler for a little while - some devices generate both, and it will
- // take a little while to move your hand from the mouse to the screen if you have both modes of input
- $timeout(function() {
- $elm.on('touchend', touchEnd);
- }, touchTimeout);
- };
-
- var touchStart = function(evt){
- touchStartTime = (new Date()).getTime();
-
- // if we get a touch event, then stop listening for click
- $elm.off('click', selectCells);
- };
-
- var touchEnd = function(evt) {
- var touchEndTime = (new Date()).getTime();
- var touchTime = touchEndTime - touchStartTime;
-
- if (touchTime < touchTimeout ) {
- // short touch
- selectCells(evt);
- }
-
- // don't re-enable the click handler for a little while - some devices generate both, and it will
- // take a little while to move your hand from the screen to the mouse if you have both modes of input
- $timeout(function() {
- $elm.on('click', selectCells);
- }, touchTimeout);
- };
-
- function registerRowSelectionEvents() {
- if ($scope.grid.options.enableRowSelection && $scope.grid.options.enableFullRowSelection) {
- $elm.addClass('ui-grid-disable-selection');
- $elm.on('touchstart', touchStart);
- $elm.on('touchend', touchEnd);
- $elm.on('click', selectCells);
-
- $scope.registered = true;
- }
- }
-
- function deregisterRowSelectionEvents() {
- if ($scope.registered){
- $elm.removeClass('ui-grid-disable-selection');
-
- $elm.off('touchstart', touchStart);
- $elm.off('touchend', touchEnd);
- $elm.off('click', selectCells);
-
- $scope.registered = false;
- }
- }
-
- registerRowSelectionEvents();
- // register a dataChange callback so that we can change the selection configuration dynamically
- // if the user changes the options
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( function() {
- if ( $scope.grid.options.enableRowSelection && $scope.grid.options.enableFullRowSelection &&
- !$scope.registered ){
- registerRowSelectionEvents();
- } else if ( ( !$scope.grid.options.enableRowSelection || !$scope.grid.options.enableFullRowSelection ) &&
- $scope.registered ){
- deregisterRowSelectionEvents();
- }
- }, [uiGridConstants.dataChange.OPTIONS] );
-
- $elm.on( '$destroy', dataChangeDereg);
- }
- };
- }]);
-
- module.directive('uiGridGridFooter', ['$compile', 'uiGridConstants', 'gridUtil', function ($compile, uiGridConstants, gridUtil) {
- return {
- restrict: 'EA',
- replace: true,
- priority: -1000,
- require: '^uiGrid',
- scope: true,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- if (!uiGridCtrl.grid.options.showGridFooter) {
- return;
- }
-
-
- gridUtil.getTemplate('ui-grid/gridFooterSelectedItems')
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
-
- angular.element($elm[0].getElementsByClassName('ui-grid-grid-footer')[0]).append(newElm);
- });
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
-
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.treeBase
- * @description
- *
- * # ui.grid.treeBase
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides base tree handling functions that are shared by other features, notably grouping
- * and treeView. It provides a tree view of the data, with nodes in that
- * tree and leaves.
- *
- * Design information:
- * -------------------
- *
- * The raw data that is provided must come with a $$treeLevel on any non-leaf node. Grouping will create
- * these on all the group header rows, treeView will expect these to be set in the raw data by the user.
- * TreeBase will run a rowsProcessor that:
- * - builds `treeBase.tree` out of the provided rows
- * - permits a recursive sort of the tree
- * - maintains the expand/collapse state of each node
- * - provides the expand/collapse all button and the expand/collapse buttons
- * - maintains the count of children for each node
- *
- * Each row is updated with a link to the tree node that represents it. Refer {@link ui.grid.treeBase.grid:treeBase.tree tree documentation}
- * for information.
- *
- * TreeBase adds information to the rows
- * - treeLevel: if present and > -1 tells us the level (level 0 is the top level)
- * - treeNode: pointer to the node in the grid.treeBase.tree that refers
- * to this row, allowing us to manipulate the state
- *
- * Since the logic is baked into the rowsProcessors, it should get triggered whenever
- * row order or filtering or anything like that is changed. We recall the expanded state
- * across invocations of the rowsProcessors by the reference to the treeNode on the individual
- * rows. We rebuild the tree itself quite frequently, when we do this we use the saved treeNodes to
- * get the state, but we overwrite the other data in that treeNode.
- *
- * By default rows are collapsed, which means all data rows have their visible property
- * set to false, and only level 0 group rows are set to visible.
- *
- * We rely on the rowsProcessors to do the actual expanding and collapsing, so we set the flags we want into
- * grid.treeBase.tree, then call refresh. This is because we can't easily change the visible
- * row cache without calling the processors, and once we've built the logic into the rowProcessors we may as
- * well use it all the time.
- *
- * Tree base provides sorting (on non-grouped columns).
- *
- * Sorting works in two passes. The standard sorting is performed for any columns that are important to building
- * the tree (for example, any grouped columns). Then after the tree is built, a recursive tree sort is performed
- * for the remaining sort columns (including the original sort) - these columns are sorted within each tree level
- * (so all the level 1 nodes are sorted, then all the level 2 nodes within each level 1 node etc).
- *
- * To achieve this we make use of the `ignoreSort` property on the sort configuration. The parent feature (treeView or grouping)
- * must provide a rowsProcessor that runs with very low priority (typically in the 60-65 range), and that sets
- * the `ignoreSort`on any sort that it wants to run on the tree. TreeBase will clear the ignoreSort on all sorts - so it
- * will turn on any sorts that haven't run. It will then call a recursive sort on the tree.
- *
- * Tree base provides treeAggregation. It checks the treeAggregation configuration on each column, and aggregates based on
- * the logic provided as it builds the tree. Footer aggregation from the uiGrid core should not be used with treeBase aggregation,
- * since it operates on all visible rows, as opposed to to leaf nodes only. Setting `showColumnFooter: true` will show the
- * treeAggregations in the column footer. Aggregation information will be collected in the format:
- *
- * ```
- * {
- * type: 'count',
- * value: 4,
- * label: 'count: ',
- * rendered: 'count: 4'
- * }
- * ```
- *
- * A callback is provided to format the value once it is finalised (aka a valueFilter).
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.treeBase"></div>
- */
-
- var module = angular.module('ui.grid.treeBase', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.constant:uiGridTreeBaseConstants
- *
- * @description constants available in treeBase module.
- *
- * These constants are manually copied into grouping and treeView,
- * as I haven't found a way to simply include them, and it's not worth
- * investing time in for something that changes very infrequently.
- *
- */
- module.constant('uiGridTreeBaseConstants', {
- featureName: "treeBase",
- rowHeaderColName: 'treeBaseRowHeaderCol',
- EXPANDED: 'expanded',
- COLLAPSED: 'collapsed',
- aggregation: {
- COUNT: 'count',
- SUM: 'sum',
- MAX: 'max',
- MIN: 'min',
- AVG: 'avg'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.treeBase.service:uiGridTreeBaseService
- *
- * @description Services for treeBase feature
- */
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.api:ColumnDef
- *
- * @description ColumnDef for tree feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- module.service('uiGridTreeBaseService', ['$q', 'uiGridTreeBaseConstants', 'gridUtil', 'GridRow', 'gridClassFactory', 'i18nService', 'uiGridConstants', 'rowSorter',
- function ($q, uiGridTreeBaseConstants, gridUtil, GridRow, gridClassFactory, i18nService, uiGridConstants, rowSorter) {
-
- var service = {
-
- initializeGrid: function (grid, $scope) {
-
- //add feature namespace and any properties to grid for needed
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.grid:treeBase
- *
- * @description Grid properties and functions added for treeBase
- */
- grid.treeBase = {};
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.treeBase.grid:treeBase
- * @name numberLevels
- *
- * @description Total number of tree levels currently used, calculated by the rowsProcessor by
- * retaining the highest tree level it sees
- */
- grid.treeBase.numberLevels = 0;
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.treeBase.grid:treeBase
- * @name expandAll
- *
- * @description Whether or not the expandAll box is selected
- */
- grid.treeBase.expandAll = false;
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.treeBase.grid:treeBase
- * @name tree
- *
- * @description Tree represented as a nested array that holds the state of each node, along with a
- * pointer to the row. The array order is material - we will display the children in the order
- * they are stored in the array
- *
- * Each node stores:
- *
- * - the state of this node
- * - an array of children of this node
- * - a pointer to the parent of this node (reverse pointer, allowing us to walk up the tree)
- * - the number of children of this node
- * - aggregation information calculated from the nodes
- *
- * ```
- * [{
- * state: 'expanded',
- * row: <reference to row>,
- * parentRow: null,
- * aggregations: [{
- * type: 'count',
- * col: <gridCol>,
- * value: 2,
- * label: 'count: ',
- * rendered: 'count: 2'
- * }],
- * children: [
- * {
- * state: 'expanded',
- * row: <reference to row>,
- * parentRow: <reference to row>,
- * aggregations: [{
- * type: 'count',
- * col: '<gridCol>,
- * value: 4,
- * label: 'count: ',
- * rendered: 'count: 4'
- * }],
- * children: [
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'collapsed', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'collapsed', row: <reference to row>, parentRow: <reference to row> }
- * ]
- * },
- * {
- * state: 'collapsed',
- * row: <reference to row>,
- * parentRow: <reference to row>,
- * aggregations: [{
- * type: 'count',
- * col: <gridCol>,
- * value: 3,
- * label: 'count: ',
- * rendered: 'count: 3'
- * }],
- * children: [
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'collapsed', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> }
- * ]
- * }
- * ]
- * }, {<another level 0 node maybe>} ]
- * ```
- * Missing state values are false - meaning they aren't expanded.
- *
- * This is used because the rowProcessors run every time the grid is refreshed, so
- * we'd lose the expanded state every time the grid was refreshed. This instead gives
- * us a reliable lookup that persists across rowProcessors.
- *
- * This tree is rebuilt every time we run the rowsProcessors. Since each row holds a pointer
- * to it's tree node we can persist expand/collapse state across calls to rowsProcessor, we discard
- * all transient information on the tree (children, childCount) and recalculate it
- *
- */
- grid.treeBase.tree = [];
-
- service.defaultGridOptions(grid.options);
-
- grid.registerRowsProcessor(service.treeRows, 410);
-
- grid.registerColumnBuilder( service.treeBaseColumnBuilder );
-
- service.createRowHeader( grid );
-
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.api:PublicApi
- *
- * @description Public Api for treeBase feature
- */
- var publicApi = {
- events: {
- treeBase: {
- /**
- * @ngdoc event
- * @eventOf ui.grid.treeBase.api:PublicApi
- * @name rowExpanded
- * @description raised whenever a row is expanded. If you are dynamically
- * rendering your tree you can listen to this event, and then retrieve
- * the children of this row and load them into the grid data.
- *
- * When the data is loaded the grid will automatically refresh to show these new rows
- *
- * <pre>
- * gridApi.treeBase.on.rowExpanded(scope,function(row){})
- * </pre>
- * @param {gridRow} row the row that was expanded. You can also
- * retrieve the grid from this row with row.grid
- */
- rowExpanded: {},
-
- /**
- * @ngdoc event
- * @eventOf ui.grid.treeBase.api:PublicApi
- * @name rowCollapsed
- * @description raised whenever a row is collapsed. Doesn't really have
- * a purpose at the moment, included for symmetry
- *
- * <pre>
- * gridApi.treeBase.on.rowCollapsed(scope,function(row){})
- * </pre>
- * @param {gridRow} row the row that was collapsed. You can also
- * retrieve the grid from this row with row.grid
- */
- rowCollapsed: {}
- }
- },
-
- methods: {
- treeBase: {
- /**
- * @ngdoc function
- * @name expandAllRows
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Expands all tree rows
- */
- expandAllRows: function () {
- service.expandAllRows(grid);
- },
-
- /**
- * @ngdoc function
- * @name collapseAllRows
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description collapse all tree rows
- */
- collapseAllRows: function () {
- service.collapseAllRows(grid);
- },
-
- /**
- * @ngdoc function
- * @name toggleRowTreeState
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description call expand if the row is collapsed, collapse if it is expanded
- * @param {gridRow} row the row you wish to toggle
- */
- toggleRowTreeState: function (row) {
- service.toggleRowTreeState(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name expandRow
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description expand the immediate children of the specified row
- * @param {gridRow} row the row you wish to expand
- */
- expandRow: function (row) {
- service.expandRow(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name expandRowChildren
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description expand all children of the specified row
- * @param {gridRow} row the row you wish to expand
- */
- expandRowChildren: function (row) {
- service.expandRowChildren(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name collapseRow
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description collapse the specified row. When
- * you expand the row again, all grandchildren will retain their state
- * @param {gridRow} row the row you wish to collapse
- */
- collapseRow: function ( row ) {
- service.collapseRow(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name collapseRowChildren
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description collapse all children of the specified row. When
- * you expand the row again, all grandchildren will be collapsed
- * @param {gridRow} row the row you wish to collapse children for
- */
- collapseRowChildren: function ( row ) {
- service.collapseRowChildren(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name getTreeState
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Get the tree state for this grid,
- * used by the saveState feature
- * Returned treeState as an object
- * `{ expandedState: { uid: 'expanded', uid: 'collapsed' } }`
- * where expandedState is a hash of row uid and the current expanded state
- *
- * @returns {object} tree state
- *
- * TODO - this needs work - we need an identifier that persists across instantiations,
- * not uid. This really means we need a row identity defined, but that won't work for
- * grouping. Perhaps this needs to be moved up to treeView and grouping, rather than
- * being in base.
- */
- getTreeExpandedState: function () {
- return { expandedState: service.getTreeState(grid) };
- },
-
- /**
- * @ngdoc function
- * @name setTreeState
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Set the expanded states of the tree
- * @param {object} config the config you want to apply, in the format
- * provided by getTreeState
- */
- setTreeState: function ( config ) {
- service.setTreeState( grid, config );
- },
-
- /**
- * @ngdoc function
- * @name getRowChildren
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Get the children of the specified row
- * @param {GridRow} row the row you want the children of
- * @returns {Array} array of children of this row, the children
- * are all gridRows
- */
- getRowChildren: function ( row ){
- return row.treeNode.children.map( function( childNode ){
- return childNode.row;
- });
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.api:GridOptions
- *
- * @description GridOptions for treeBase feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name treeRowHeaderBaseWidth
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Base width of the tree header, provides for a single level of tree. This
- * is incremented by `treeIndent` for each extra level
- * <br/>Defaults to 30
- */
- gridOptions.treeRowHeaderBaseWidth = gridOptions.treeRowHeaderBaseWidth || 30;
-
- /**
- * @ngdoc object
- * @name treeIndent
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Number of pixels of indent for the icon at each tree level, wider indents are visually more pleasing,
- * but will make the tree row header wider
- * <br/>Defaults to 10
- */
- gridOptions.treeIndent = gridOptions.treeIndent || 10;
-
- /**
- * @ngdoc object
- * @name showTreeRowHeader
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description If set to false, don't create the row header. You'll need to programmatically control the expand
- * states
- * <br/>Defaults to true
- */
- gridOptions.showTreeRowHeader = gridOptions.showTreeRowHeader !== false;
-
- /**
- * @ngdoc object
- * @name showTreeExpandNoChildren
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description If set to true, show the expand/collapse button even if there are no
- * children of a node. You'd use this if you're planning to dynamically load the children
- *
- * <br/>Defaults to true, grouping overrides to false
- */
- gridOptions.showTreeExpandNoChildren = gridOptions.showTreeExpandNoChildren !== false;
-
- /**
- * @ngdoc object
- * @name treeRowHeaderAlwaysVisible
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description If set to true, row header even if there are no tree nodes
- *
- * <br/>Defaults to true
- */
- gridOptions.treeRowHeaderAlwaysVisible = gridOptions.treeRowHeaderAlwaysVisible !== false;
-
- /**
- * @ngdoc object
- * @name treeCustomAggregations
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Define custom aggregation functions. The properties of this object will be
- * aggregation types available for use on columnDef with {@link ui.grid.treeBase.api:ColumnDef treeAggregationType} or through the column menu.
- * If a function defined here uses the same name as one of the native aggregations, this one will take precedence.
- * The object format is:
- *
- * <pre>
- * {
- * aggregationName: {
- * label: (optional) string,
- * aggregationFn: function( aggregation, fieldValue, numValue, row ){...},
- * finalizerFn: (optional) function( aggregation ){...}
- * },
- * mean: {
- * label: 'mean',
- * aggregationFn: function( aggregation, fieldValue, numValue ){
- * aggregation.count = (aggregation.count || 1) + 1;
- * aggregation.sum = (aggregation.sum || 0) + numValue;
- * },
- * finalizerFn: function( aggregation ){
- * aggregation.value = aggregation.sum / aggregation.count
- * }
- * }
- * }
- * </pre>
- *
- * <br/>The `finalizerFn` may be used to manipulate the value before rendering, or to
- * apply a custom rendered value. If `aggregation.rendered` is left undefined, the value will be
- * rendered. Note that the native aggregation functions use an `finalizerFn` to concatenate
- * the label and the value.
- *
- * <br/>Defaults to {}
- */
- gridOptions.treeCustomAggregations = gridOptions.treeCustomAggregations || {};
-
- /**
- * @ngdoc object
- * @name enableExpandAll
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Enable the expand all button at the top of the row header
- *
- * <br/>Defaults to true
- */
- gridOptions.enableExpandAll = gridOptions.enableExpandAll !== false;
- },
-
-
- /**
- * @ngdoc function
- * @name treeBaseColumnBuilder
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Sets the tree defaults based on the columnDefs
- *
- * @param {object} colDef columnDef we're basing on
- * @param {GridCol} col the column we're to update
- * @param {object} gridOptions the options we should use
- * @returns {promise} promise for the builder - actually we do it all inline so it's immediately resolved
- */
- treeBaseColumnBuilder: function (colDef, col, gridOptions) {
-
-
- /**
- * @ngdoc object
- * @name customTreeAggregationFn
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description A custom function that aggregates rows into some form of
- * total. Aggregations run row-by-row, the function needs to be capable of
- * creating a running total.
- *
- * The function will be provided the aggregation item (in which you can store running
- * totals), the row value that is to be aggregated, and that same row value converted to
- * a number (most aggregations work on numbers)
- * @example
- * <pre>
- * customTreeAggregationFn = function ( aggregation, fieldValue, numValue, row ){
- * // calculates the average of the squares of the values
- * if ( typeof(aggregation.count) === 'undefined' ){
- * aggregation.count = 0;
- * }
- * aggregation.count++;
- *
- * if ( !isNaN(numValue) ){
- * if ( typeof(aggregation.total) === 'undefined' ){
- * aggregation.total = 0;
- * }
- * aggregation.total = aggregation.total + numValue * numValue;
- * }
- *
- * aggregation.value = aggregation.total / aggregation.count;
- * }
- * </pre>
- * <br/>Defaults to undefined. May be overwritten by treeAggregationType, the two options should not be used together.
- */
- if ( typeof(colDef.customTreeAggregationFn) !== 'undefined' ){
- col.treeAggregationFn = colDef.customTreeAggregationFn;
- }
-
- /**
- * @ngdoc object
- * @name treeAggregationType
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description Use one of the native or grid-level aggregation methods for calculating aggregations on this column.
- * Native method are in the constants file and include: SUM, COUNT, MIN, MAX, AVG. This may also be the property the
- * name of an aggregation function defined with {@link ui.grid.treeBase.api:GridOptions treeCustomAggregations}.
- *
- * <pre>
- * treeAggregationType = uiGridTreeBaseConstants.aggregation.SUM,
- * }
- * </pre>
- *
- * If you are using aggregations you should either:
- *
- * - also use grouping, in which case the aggregations are displayed in the group header, OR
- * - use treeView, in which case you can set `treeAggregationUpdateEntity: true` in the colDef, and
- * treeBase will store the aggregation information in the entity, or you can set `treeAggregationUpdateEntity: false`
- * in the colDef, and you need to manual retrieve the calculated aggregations from the row.treeNode.aggregations
- *
- * <br/>Takes precendence over a treeAggregationFn, the two options should not be used together.
- * <br/>Defaults to undefined.
- */
- if ( typeof(colDef.treeAggregationType) !== 'undefined' ){
- col.treeAggregation = { type: colDef.treeAggregationType };
- if ( typeof(gridOptions.treeCustomAggregations[colDef.treeAggregationType]) !== 'undefined' ){
- col.treeAggregationFn = gridOptions.treeCustomAggregations[colDef.treeAggregationType].aggregationFn;
- col.treeAggregationFinalizerFn = gridOptions.treeCustomAggregations[colDef.treeAggregationType].finalizerFn;
- col.treeAggregation.label = gridOptions.treeCustomAggregations[colDef.treeAggregationType].label;
- } else if ( typeof(service.nativeAggregations()[colDef.treeAggregationType]) !== 'undefined' ){
- col.treeAggregationFn = service.nativeAggregations()[colDef.treeAggregationType].aggregationFn;
- col.treeAggregation.label = service.nativeAggregations()[colDef.treeAggregationType].label;
- }
- }
-
- /**
- * @ngdoc object
- * @name treeAggregationLabel
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description A custom label to use for this aggregation. If provided we don't use native i18n.
- */
- if ( typeof(colDef.treeAggregationLabel) !== 'undefined' ){
- if (typeof(col.treeAggregation) === 'undefined' ){
- col.treeAggregation = {};
- }
- col.treeAggregation.label = colDef.treeAggregationLabel;
- }
-
- /**
- * @ngdoc object
- * @name treeAggregationUpdateEntity
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description Store calculated aggregations into the entity, allowing them
- * to be displayed in the grid using a standard cellTemplate. This defaults to true,
- * if you are using grouping then you shouldn't set it to false, as then the aggregations won't
- * display.
- *
- * If you are using treeView in most cases you'll want to set this to true. This will result in
- * getCellValue returning the aggregation rather than whatever was stored in the cell attribute on
- * the entity. If you want to render the underlying entity value (and do something else with the aggregation)
- * then you could use a custom cellTemplate to display `row.entity.myAttribute`, rather than using getCellValue.
- *
- * <br/>Defaults to true
- *
- * @example
- * <pre>
- * gridOptions.columns = [{
- * name: 'myCol',
- * treeAggregation: { type: uiGridTreeBaseConstants.aggregation.SUM },
- * treeAggregationUpdateEntity: true
- * cellTemplate: '<div>{{row.entity.myCol + " " + row.treeNode.aggregations[0].rendered}}</div>'
- * }];
- * </pre>
- */
- col.treeAggregationUpdateEntity = colDef.treeAggregationUpdateEntity !== false;
-
- /**
- * @ngdoc object
- * @name customTreeAggregationFinalizerFn
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description A custom function that populates aggregation.rendered, this is called when
- * a particular aggregation has been fully calculated, and we want to render the value.
- *
- * With the native aggregation options we just concatenate `aggregation.label` and
- * `aggregation.value`, but if you wanted to apply a filter or otherwise manipulate the label
- * or the value, you can do so with this function. This function will be called after the
- * the default `finalizerFn`.
- *
- * @example
- * <pre>
- * customTreeAggregationFinalizerFn = function ( aggregation ){
- * aggregation.rendered = aggregation.label + aggregation.value / 100 + '%';
- * }
- * </pre>
- * <br/>Defaults to undefined.
- */
- if ( typeof(col.customTreeAggregationFinalizerFn) === 'undefined' ){
- col.customTreeAggregationFinalizerFn = colDef.customTreeAggregationFinalizerFn;
- }
-
- },
-
-
- /**
- * @ngdoc function
- * @name createRowHeader
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Create the rowHeader. If treeRowHeaderAlwaysVisible then
- * set it to visible, otherwise set it to invisible
- *
- * @param {Grid} grid grid object
- */
- createRowHeader: function( grid ){
- var rowHeaderColumnDef = {
- name: uiGridTreeBaseConstants.rowHeaderColName,
- displayName: '',
- width: grid.options.treeRowHeaderBaseWidth,
- minWidth: 10,
- cellTemplate: 'ui-grid/treeBaseRowHeader',
- headerCellTemplate: 'ui-grid/treeBaseHeaderCell',
- enableColumnResizing: false,
- enableColumnMenu: false,
- exporterSuppressExport: true,
- allowCellFocus: true
- };
-
- rowHeaderColumnDef.visible = grid.options.treeRowHeaderAlwaysVisible;
- grid.addRowHeaderColumn( rowHeaderColumnDef, -100 );
- },
-
-
- /**
- * @ngdoc function
- * @name expandAllRows
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Expands all nodes in the tree
- *
- * @param {Grid} grid grid object
- */
- expandAllRows: function (grid) {
- grid.treeBase.tree.forEach( function( node ) {
- service.setAllNodes( grid, node, uiGridTreeBaseConstants.EXPANDED);
- });
- grid.treeBase.expandAll = true;
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name collapseAllRows
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Collapses all nodes in the tree
- *
- * @param {Grid} grid grid object
- */
- collapseAllRows: function (grid) {
- grid.treeBase.tree.forEach( function( node ) {
- service.setAllNodes( grid, node, uiGridTreeBaseConstants.COLLAPSED);
- });
- grid.treeBase.expandAll = false;
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name setAllNodes
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Works through a subset of grid.treeBase.rowExpandedStates, setting
- * all child nodes (and their descendents) of the provided node to the given state.
- *
- * Calls itself recursively on all nodes so as to achieve this.
- *
- * @param {Grid} grid the grid we're operating on (so we can raise events)
- * @param {object} treeNode a node in the tree that we want to update
- * @param {string} targetState the state we want to set it to
- */
- setAllNodes: function (grid, treeNode, targetState) {
- if ( typeof(treeNode.state) !== 'undefined' && treeNode.state !== targetState ){
- treeNode.state = targetState;
-
- if ( targetState === uiGridTreeBaseConstants.EXPANDED ){
- grid.api.treeBase.raise.rowExpanded(treeNode.row);
- } else {
- grid.api.treeBase.raise.rowCollapsed(treeNode.row);
- }
- }
-
- // set all child nodes
- if ( treeNode.children ){
- treeNode.children.forEach(function( childNode ){
- service.setAllNodes(grid, childNode, targetState);
- });
- }
- },
-
-
- /**
- * @ngdoc function
- * @name toggleRowTreeState
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Toggles the expand or collapse state of this grouped row, if
- * it's a parent row
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to toggle
- */
- toggleRowTreeState: function ( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- if (row.treeNode.state === uiGridTreeBaseConstants.EXPANDED){
- service.collapseRow(grid, row);
- } else {
- service.expandRow(grid, row);
- }
-
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name expandRow
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Expands this specific row, showing only immediate children.
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to expand
- */
- expandRow: function ( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- if ( row.treeNode.state !== uiGridTreeBaseConstants.EXPANDED ){
- row.treeNode.state = uiGridTreeBaseConstants.EXPANDED;
- grid.api.treeBase.raise.rowExpanded(row);
- grid.treeBase.expandAll = service.allExpanded(grid.treeBase.tree);
- grid.queueGridRefresh();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name expandRowChildren
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Expands this specific row, showing all children.
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to expand
- */
- expandRowChildren: function ( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- service.setAllNodes(grid, row.treeNode, uiGridTreeBaseConstants.EXPANDED);
- grid.treeBase.expandAll = service.allExpanded(grid.treeBase.tree);
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name collapseRow
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Collapses this specific row
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to collapse
- */
- collapseRow: function( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- if ( row.treeNode.state !== uiGridTreeBaseConstants.COLLAPSED ){
- row.treeNode.state = uiGridTreeBaseConstants.COLLAPSED;
- grid.treeBase.expandAll = false;
- grid.api.treeBase.raise.rowCollapsed(row);
- grid.queueGridRefresh();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name collapseRowChildren
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Collapses this specific row and all children
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to collapse
- */
- collapseRowChildren: function( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- service.setAllNodes(grid, row.treeNode, uiGridTreeBaseConstants.COLLAPSED);
- grid.treeBase.expandAll = false;
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name allExpanded
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Returns true if all rows are expanded, false
- * if they're not. Walks the tree to determine this. Used
- * to set the expandAll state.
- *
- * If the node has no children, then return true (it's immaterial
- * whether it is expanded). If the node has children, then return
- * false if this node is collapsed, or if any child node is not all expanded
- *
- * @param {object} tree the grid to check
- * @returns {boolean} whether or not the tree is all expanded
- */
- allExpanded: function( tree ){
- var allExpanded = true;
- tree.forEach( function( node ){
- if ( !service.allExpandedInternal( node ) ){
- allExpanded = false;
- }
- });
- return allExpanded;
- },
-
- allExpandedInternal: function( treeNode ){
- if ( treeNode.children && treeNode.children.length > 0 ){
- if ( treeNode.state === uiGridTreeBaseConstants.COLLAPSED ){
- return false;
- }
- var allExpanded = true;
- treeNode.children.forEach( function( node ){
- if ( !service.allExpandedInternal( node ) ){
- allExpanded = false;
- }
- });
- return allExpanded;
- } else {
- return true;
- }
- },
-
-
- /**
- * @ngdoc function
- * @name treeRows
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description The rowProcessor that adds the nodes to the tree, and sets the visible
- * state of each row based on it's parent state
- *
- * Assumes it is always called after the sorting processor, and the grouping processor if there is one.
- * Performs any tree sorts itself after having built the tree
- *
- * Processes all the rows in order, setting the group level based on the $$treeLevel in the associated
- * entity, and setting the visible state based on the parent's state.
- *
- * Calculates the deepest level of tree whilst it goes, and updates that so that the header column can be correctly
- * sized.
- *
- * Aggregates if necessary along the way.
- *
- * @param {array} renderableRows the rows we want to process, usually the output from the previous rowProcessor
- * @returns {array} the updated rows
- */
- treeRows: function( renderableRows ) {
- if (renderableRows.length === 0){
- return renderableRows;
- }
-
- var grid = this;
- var currentLevel = 0;
- var currentState = uiGridTreeBaseConstants.EXPANDED;
- var parents = [];
-
- grid.treeBase.tree = service.createTree( grid, renderableRows );
- service.updateRowHeaderWidth( grid );
-
- service.sortTree( grid );
- service.fixFilter( grid );
-
- return service.renderTree( grid.treeBase.tree );
- },
-
-
- /**
- * @ngdoc function
- * @name createOrUpdateRowHeaderWidth
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Calculates the rowHeader width.
- *
- * If rowHeader is always present, updates the width.
- *
- * If rowHeader is only sometimes present (`treeRowHeaderAlwaysVisible: false`), determines whether there
- * should be one, then creates or removes it as appropriate, with the created rowHeader having the
- * right width.
- *
- * If there's never a rowHeader then never creates one: `showTreeRowHeader: false`
- *
- * @param {Grid} grid the grid we want to set the row header on
- */
- updateRowHeaderWidth: function( grid ){
- var rowHeader = grid.getColumn(uiGridTreeBaseConstants.rowHeaderColName);
-
- var newWidth = grid.options.treeRowHeaderBaseWidth + grid.options.treeIndent * Math.max(grid.treeBase.numberLevels - 1, 0);
- if ( rowHeader && newWidth !== rowHeader.width ){
- rowHeader.width = newWidth;
- grid.queueRefresh();
- }
-
- var newVisibility = true;
- if ( grid.options.showTreeRowHeader === false ){
- newVisibility = false;
- }
- if ( grid.options.treeRowHeaderAlwaysVisible === false && grid.treeBase.numberLevels <= 0 ){
- newVisibility = false;
- }
- if ( rowHeader.visible !== newVisibility ) {
- rowHeader.visible = newVisibility;
- rowHeader.colDef.visible = newVisibility;
- grid.queueGridRefresh();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name renderTree
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Creates an array of rows based on the tree, exporting only
- * the visible nodes and leaves
- *
- * @param {array} nodeList the list of nodes - can be grid.treeBase.tree, or can be node.children when
- * we're calling recursively
- * @returns {array} renderable rows
- */
- renderTree: function( nodeList ){
- var renderableRows = [];
-
- nodeList.forEach( function ( node ){
- if ( node.row.visible ){
- renderableRows.push( node.row );
- }
- if ( node.state === uiGridTreeBaseConstants.EXPANDED && node.children && node.children.length > 0 ){
- renderableRows = renderableRows.concat( service.renderTree( node.children ) );
- }
- });
- return renderableRows;
- },
-
-
- /**
- * @ngdoc function
- * @name createTree
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Creates a tree from the renderableRows
- *
- * @param {Grid} grid the grid
- * @param {array} renderableRows the rows we want to create a tree from
- * @returns {object} the tree we've build
- */
- createTree: function( grid, renderableRows ) {
- var currentLevel = -1;
- var parents = [];
- var currentState;
- grid.treeBase.tree = [];
- grid.treeBase.numberLevels = 0;
- var aggregations = service.getAggregations( grid );
-
- var createNode = function( row ){
- if ( typeof(row.entity.$$treeLevel) !== 'undefined' && row.treeLevel !== row.entity.$$treeLevel ){
- row.treeLevel = row.entity.$$treeLevel;
- }
-
- if ( row.treeLevel <= currentLevel ){
- // pop any levels that aren't parents of this level, formatting the aggregation at the same time
- while ( row.treeLevel <= currentLevel ){
- var lastParent = parents.pop();
- service.finaliseAggregations( lastParent );
- currentLevel--;
- }
-
- // reset our current state based on the new parent, set to expanded if this is a level 0 node
- if ( parents.length > 0 ){
- currentState = service.setCurrentState(parents);
- } else {
- currentState = uiGridTreeBaseConstants.EXPANDED;
- }
- }
-
- // aggregate if this is a leaf node
- if ( ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ) && row.visible ){
- service.aggregate( grid, row, parents );
- }
-
- // add this node to the tree
- service.addOrUseNode(grid, row, parents, aggregations);
-
- if ( typeof(row.treeLevel) !== 'undefined' && row.treeLevel !== null && row.treeLevel >= 0 ){
- parents.push(row);
- currentLevel++;
- currentState = service.setCurrentState(parents);
- }
-
- // update the tree number of levels, so we can set header width if we need to
- if ( grid.treeBase.numberLevels < row.treeLevel + 1){
- grid.treeBase.numberLevels = row.treeLevel + 1;
- }
- };
-
- renderableRows.forEach( createNode );
-
- // finalise remaining aggregations
- while ( parents.length > 0 ){
- var lastParent = parents.pop();
- service.finaliseAggregations( lastParent );
- }
-
- return grid.treeBase.tree;
- },
-
-
- /**
- * @ngdoc function
- * @name addOrUseNode
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Creates a tree node for this row. If this row already has a treeNode
- * recorded against it, preserves the state, but otherwise overwrites the data.
- *
- * @param {grid} grid the grid we're operating on
- * @param {gridRow} row the row we want to set
- * @param {array} parents an array of the parents this row should have
- * @param {array} aggregationBase empty aggregation information
- * @returns {undefined} updates the parents array, updates the row to have a treeNode, and updates the
- * grid.treeBase.tree
- */
- addOrUseNode: function( grid, row, parents, aggregationBase ){
- var newAggregations = [];
- aggregationBase.forEach( function(aggregation){
- newAggregations.push(service.buildAggregationObject(aggregation.col));
- });
-
- var newNode = { state: uiGridTreeBaseConstants.COLLAPSED, row: row, parentRow: null, aggregations: newAggregations, children: [] };
- if ( row.treeNode ){
- newNode.state = row.treeNode.state;
- }
- if ( parents.length > 0 ){
- newNode.parentRow = parents[parents.length - 1];
- }
- row.treeNode = newNode;
-
- if ( parents.length === 0 ){
- grid.treeBase.tree.push( newNode );
- } else {
- parents[parents.length - 1].treeNode.children.push( newNode );
- }
- },
-
-
- /**
- * @ngdoc function
- * @name setCurrentState
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Looks at the parents array to determine our current state.
- * If any node in the hierarchy is collapsed, then return collapsed, otherwise return
- * expanded.
- *
- * @param {array} parents an array of the parents this row should have
- * @returns {string} the state we should be setting to any nodes we see
- */
- setCurrentState: function( parents ){
- var currentState = uiGridTreeBaseConstants.EXPANDED;
- parents.forEach( function(parent){
- if ( parent.treeNode.state === uiGridTreeBaseConstants.COLLAPSED ){
- currentState = uiGridTreeBaseConstants.COLLAPSED;
- }
- });
- return currentState;
- },
-
-
- /**
- * @ngdoc function
- * @name sortTree
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Performs a recursive sort on the tree nodes, sorting the
- * children of each node and putting them back into the children array.
- *
- * Before doing this it turns back on all the sortIgnore - things that were previously
- * ignored we process now. Since we're sorting within the nodes, presumably anything
- * that was already sorted is how we derived the nodes, we can keep those sorts too.
- *
- * We only sort tree nodes that are expanded - no point in wasting effort sorting collapsed
- * nodes
- *
- * @param {Grid} grid the grid to get the aggregation information from
- * @returns {array} the aggregation information
- */
- sortTree: function( grid ){
- grid.columns.forEach( function( column ) {
- if ( column.sort && column.sort.ignoreSort ){
- delete column.sort.ignoreSort;
- }
- });
-
- grid.treeBase.tree = service.sortInternal( grid, grid.treeBase.tree );
- },
-
- sortInternal: function( grid, treeList ){
- var rows = treeList.map( function( node ){
- return node.row;
- });
-
- rows = rowSorter.sort( grid, rows, grid.columns );
-
- var treeNodes = rows.map( function( row ){
- return row.treeNode;
- });
-
- treeNodes.forEach( function( node ){
- if ( node.state === uiGridTreeBaseConstants.EXPANDED && node.children && node.children.length > 0 ){
- node.children = service.sortInternal( grid, node.children );
- }
- });
-
- return treeNodes;
- },
-
- /**
- * @ngdoc function
- * @name fixFilter
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description After filtering has run, we need to go back through the tree
- * and make sure the parent rows are always visible if any of the child rows
- * are visible (filtering may make a child visible, but the parent may not
- * match the filter criteria)
- *
- * This has a risk of being computationally expensive, we do it by walking
- * the tree and remembering whether there are any invisible nodes on the
- * way down.
- *
- * @param {Grid} grid the grid to fix filters on
- */
- fixFilter: function( grid ){
- var parentsVisible;
-
- grid.treeBase.tree.forEach( function( node ){
- if ( node.children && node.children.length > 0 ){
- parentsVisible = node.row.visible;
- service.fixFilterInternal( node.children, parentsVisible );
- }
- });
- },
-
- fixFilterInternal: function( nodes, parentsVisible) {
- nodes.forEach( function( node ){
- if ( node.row.visible && !parentsVisible ){
- service.setParentsVisible( node );
- parentsVisible = true;
- }
-
- if ( node.children && node.children.length > 0 ){
- if ( service.fixFilterInternal( node.children, ( parentsVisible && node.row.visible ) ) ) {
- parentsVisible = true;
- }
- }
- });
-
- return parentsVisible;
- },
-
- setParentsVisible: function( node ){
- while ( node.parentRow ){
- node.parentRow.visible = true;
- node = node.parentRow.treeNode;
- }
- },
-
- /**
- * @ngdoc function
- * @name buildAggregationObject
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Build the object which is stored on the column for holding meta-data about the aggregation.
- * This method should only be called with columns which have an aggregation.
- *
- * @param {Column} the column which this object relates to
- * @returns {object} {col: Column object, label: string, type: string (optional)}
- */
- buildAggregationObject: function( column ){
- var newAggregation = { col: column };
-
- if ( column.treeAggregation && column.treeAggregation.type ){
- newAggregation.type = column.treeAggregation.type;
- }
-
- if ( column.treeAggregation && column.treeAggregation.label ){
- newAggregation.label = column.treeAggregation.label;
- }
-
- return newAggregation;
- },
-
- /**
- * @ngdoc function
- * @name getAggregations
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Looks through the grid columns to find those with aggregations,
- * and collates the aggregation information into an array, returns that array
- *
- * @param {Grid} grid the grid to get the aggregation information from
- * @returns {array} the aggregation information
- */
- getAggregations: function( grid ){
- var aggregateArray = [];
-
- grid.columns.forEach( function(column){
- if ( typeof(column.treeAggregationFn) !== 'undefined' ){
- aggregateArray.push( service.buildAggregationObject(column) );
-
- if ( grid.options.showColumnFooter && typeof(column.colDef.aggregationType) === 'undefined' && column.treeAggregation ){
- // Add aggregation object for footer
- column.treeFooterAggregation = service.buildAggregationObject(column);
- column.aggregationType = service.treeFooterAggregationType;
- }
- }
- });
- return aggregateArray;
- },
-
-
- /**
- * @ngdoc function
- * @name aggregate
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Accumulate the data from this row onto the aggregations for each parent
- *
- * Iterate over the parents, then iterate over the aggregations for each of those parents,
- * and perform the aggregation for each individual aggregation
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to set grouping visibility on
- * @param {array} parents the parents that we would want to aggregate onto
- */
- aggregate: function( grid, row, parents ){
- if ( parents.length === 0 && row.treeNode && row.treeNode.aggregations ){
- row.treeNode.aggregations.forEach(function(aggregation){
- // Calculate aggregations for footer even if there are no grouped rows
- if ( typeof(aggregation.col.treeFooterAggregation) !== 'undefined' ) {
- var fieldValue = grid.getCellValue(row, aggregation.col);
- var numValue = Number(fieldValue);
- aggregation.col.treeAggregationFn(aggregation.col.treeFooterAggregation, fieldValue, numValue, row);
- }
- });
- }
-
- parents.forEach( function( parent, index ){
- if ( parent.treeNode.aggregations ){
- parent.treeNode.aggregations.forEach( function( aggregation ){
- var fieldValue = grid.getCellValue(row, aggregation.col);
- var numValue = Number(fieldValue);
- aggregation.col.treeAggregationFn(aggregation, fieldValue, numValue, row);
-
- if ( index === 0 && typeof(aggregation.col.treeFooterAggregation) !== 'undefined' ){
- aggregation.col.treeAggregationFn(aggregation.col.treeFooterAggregation, fieldValue, numValue, row);
- }
- });
- }
- });
- },
-
-
- // Aggregation routines - no doco needed as self evident
- nativeAggregations: function() {
- var nativeAggregations = {
- count: {
- label: i18nService.get().aggregation.count,
- menuTitle: i18nService.get().grouping.aggregate_count,
- aggregationFn: function (aggregation, fieldValue, numValue) {
- if (typeof(aggregation.value) === 'undefined') {
- aggregation.value = 1;
- } else {
- aggregation.value++;
- }
- }
- },
-
- sum: {
- label: i18nService.get().aggregation.sum,
- menuTitle: i18nService.get().grouping.aggregate_sum,
- aggregationFn: function( aggregation, fieldValue, numValue ) {
- if (!isNaN(numValue)) {
- if (typeof(aggregation.value) === 'undefined') {
- aggregation.value = numValue;
- } else {
- aggregation.value += numValue;
- }
- }
- }
- },
-
- min: {
- label: i18nService.get().aggregation.min,
- menuTitle: i18nService.get().grouping.aggregate_min,
- aggregationFn: function( aggregation, fieldValue, numValue ) {
- if (typeof(aggregation.value) === 'undefined') {
- aggregation.value = fieldValue;
- } else {
- if (typeof(fieldValue) !== 'undefined' && fieldValue !== null && (fieldValue < aggregation.value || aggregation.value === null)) {
- aggregation.value = fieldValue;
- }
- }
- }
- },
-
- max: {
- label: i18nService.get().aggregation.max,
- menuTitle: i18nService.get().grouping.aggregate_max,
- aggregationFn: function( aggregation, fieldValue, numValue ){
- if ( typeof(aggregation.value) === 'undefined' ){
- aggregation.value = fieldValue;
- } else {
- if ( typeof(fieldValue) !== 'undefined' && fieldValue !== null && (fieldValue > aggregation.value || aggregation.value === null)){
- aggregation.value = fieldValue;
- }
- }
- }
- },
-
- avg: {
- label: i18nService.get().aggregation.avg,
- menuTitle: i18nService.get().grouping.aggregate_avg,
- aggregationFn: function( aggregation, fieldValue, numValue ){
- if ( typeof(aggregation.count) === 'undefined' ){
- aggregation.count = 1;
- } else {
- aggregation.count++;
- }
-
- if ( isNaN(numValue) ){
- return;
- }
-
- if ( typeof(aggregation.value) === 'undefined' || typeof(aggregation.sum) === 'undefined' ){
- aggregation.value = numValue;
- aggregation.sum = numValue;
- } else {
- aggregation.sum += numValue;
- aggregation.value = aggregation.sum / aggregation.count;
- }
- }
- }
- };
- return nativeAggregations;
- },
-
- /**
- * @ngdoc function
- * @name finaliseAggregation
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Helper function used to finalize aggregation nodes and footer cells
- *
- * @param {gridRow} row the parent we're finalising
- * @param {aggregation} the aggregation object manipulated by the aggregationFn
- */
- finaliseAggregation: function(row, aggregation){
- if ( aggregation.col.treeAggregationUpdateEntity && typeof(row) !== 'undefined' && typeof(row.entity[ '$$' + aggregation.col.uid ]) !== 'undefined' ){
- angular.extend( aggregation, row.entity[ '$$' + aggregation.col.uid ]);
- }
-
- if ( typeof(aggregation.col.treeAggregationFinalizerFn) === 'function' ){
- aggregation.col.treeAggregationFinalizerFn( aggregation );
- }
- if ( typeof(aggregation.col.customTreeAggregationFinalizerFn) === 'function' ){
- aggregation.col.customTreeAggregationFinalizerFn( aggregation );
- }
- if ( typeof(aggregation.rendered) === 'undefined' ){
- aggregation.rendered = aggregation.label ? aggregation.label + aggregation.value : aggregation.value;
- }
- },
-
- /**
- * @ngdoc function
- * @name finaliseAggregations
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Format the data from the aggregation into the rendered text
- * e.g. if we had label: 'sum: ' and value: 25, we'd create 'sum: 25'.
- *
- * As part of this we call any formatting callback routines we've been provided.
- *
- * We write our aggregation out to the row.entity if treeAggregationUpdateEntity is
- * set on the column - we don't overwrite any information that's already there, we append
- * to it so that grouping can have set the groupVal beforehand without us overwriting it.
- *
- * We need to copy the data from the row.entity first before we finalise the aggregation,
- * we need that information for the finaliserFn
- *
- * @param {gridRow} row the parent we're finalising
- */
- finaliseAggregations: function( row ){
- if ( row == null || typeof(row.treeNode.aggregations) === 'undefined' ){
- return;
- }
-
- row.treeNode.aggregations.forEach( function( aggregation ) {
- service.finaliseAggregation(row, aggregation);
-
- if ( aggregation.col.treeAggregationUpdateEntity ){
- var aggregationCopy = {};
- angular.forEach( aggregation, function( value, key ){
- if ( aggregation.hasOwnProperty(key) && key !== 'col' ){
- aggregationCopy[key] = value;
- }
- });
-
- row.entity[ '$$' + aggregation.col.uid ] = aggregationCopy;
- }
- });
- },
-
- /**
- * @ngdoc function
- * @name treeFooterAggregationType
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Uses the tree aggregation functions and finalizers to set the
- * column footer aggregations.
- *
- * @param {rows} visible rows. not used, but accepted to match signature of GridColumn.aggregationType
- * @param {gridColumn} the column we are finalizing
- */
- treeFooterAggregationType: function( rows, column ) {
- service.finaliseAggregation(undefined, column.treeFooterAggregation);
- if ( typeof(column.treeFooterAggregation.value) === 'undefined' || column.treeFooterAggregation.rendered === null ){
- // The was apparently no aggregation performed (perhaps this is a grouped column
- return '';
- }
- return column.treeFooterAggregation.rendered;
- }
- };
-
- return service;
-
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeBase.directive:uiGridTreeRowHeaderButtons
- * @element div
- *
- * @description Provides the expand/collapse button on rows
- */
- module.directive('uiGridTreeBaseRowHeaderButtons', ['$templateCache', 'uiGridTreeBaseService',
- function ($templateCache, uiGridTreeBaseService) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/treeBaseRowHeaderButtons'),
- scope: true,
- require: '^uiGrid',
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = uiGridCtrl.grid;
- $scope.treeButtonClick = function(row, evt) {
- uiGridTreeBaseService.toggleRowTreeState(self, row, evt);
- };
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeBase.directive:uiGridTreeBaseExpandAllButtons
- * @element div
- *
- * @description Provides the expand/collapse all button
- */
- module.directive('uiGridTreeBaseExpandAllButtons', ['$templateCache', 'uiGridTreeBaseService',
- function ($templateCache, uiGridTreeBaseService) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/treeBaseExpandAllButtons'),
- scope: false,
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = $scope.col.grid;
-
- $scope.headerButtonClick = function(row, evt) {
- if ( self.treeBase.expandAll ){
- uiGridTreeBaseService.collapseAllRows(self, evt);
- } else {
- uiGridTreeBaseService.expandAllRows(self, evt);
- }
- };
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeBase.directive:uiGridViewport
- * @element div
- *
- * @description Stacks on top of ui.grid.uiGridViewport to set formatting on a tree header row
- */
- module.directive('uiGridViewport',
- ['$compile', 'uiGridConstants', 'gridUtil', '$parse',
- function ($compile, uiGridConstants, gridUtil, $parse) {
- return {
- priority: -200, // run after default directive
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
-
- var existingNgClass = rowRepeatDiv.attr("ng-class");
- var newNgClass = '';
- if ( existingNgClass ) {
- newNgClass = existingNgClass.slice(0, -1) + ",'ui-grid-tree-header-row': row.treeLevel > -1}";
- } else {
- newNgClass = "{'ui-grid-tree-header-row': row.treeLevel > -1}";
- }
- rowRepeatDiv.attr("ng-class", newNgClass);
-
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.treeView
- * @description
- *
- * # ui.grid.treeView
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides a tree view of the data that it is provided, with nodes in that
- * tree and leaves. Unlike grouping, the tree is an inherent property of the data and must
- * be provided with your data array.
- *
- * Design information:
- * -------------------
- *
- * TreeView uses treeBase for the underlying functionality, and is a very thin wrapper around
- * that logic. Most of the design information has now moved to treebase.
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.treeView"></div>
- */
-
- var module = angular.module('ui.grid.treeView', ['ui.grid', 'ui.grid.treeBase']);
-
- /**
- * @ngdoc object
- * @name ui.grid.treeView.constant:uiGridTreeViewConstants
- *
- * @description constants available in treeView module, this includes
- * all the constants declared in the treeBase module (these are manually copied
- * as there isn't an easy way to include constants in another constants file, and
- * we don't want to make users include treeBase)
- *
- */
- module.constant('uiGridTreeViewConstants', {
- featureName: "treeView",
- rowHeaderColName: 'treeBaseRowHeaderCol',
- EXPANDED: 'expanded',
- COLLAPSED: 'collapsed',
- aggregation: {
- COUNT: 'count',
- SUM: 'sum',
- MAX: 'max',
- MIN: 'min',
- AVG: 'avg'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.treeView.service:uiGridTreeViewService
- *
- * @description Services for treeView features
- */
- module.service('uiGridTreeViewService', ['$q', 'uiGridTreeViewConstants', 'uiGridTreeBaseConstants', 'uiGridTreeBaseService', 'gridUtil', 'GridRow', 'gridClassFactory', 'i18nService', 'uiGridConstants',
- function ($q, uiGridTreeViewConstants, uiGridTreeBaseConstants, uiGridTreeBaseService, gridUtil, GridRow, gridClassFactory, i18nService, uiGridConstants) {
-
- var service = {
-
- initializeGrid: function (grid, $scope) {
- uiGridTreeBaseService.initializeGrid( grid, $scope );
-
- /**
- * @ngdoc object
- * @name ui.grid.treeView.grid:treeView
- *
- * @description Grid properties and functions added for treeView
- */
- grid.treeView = {};
-
- grid.registerRowsProcessor(service.adjustSorting, 60);
-
- /**
- * @ngdoc object
- * @name ui.grid.treeView.api:PublicApi
- *
- * @description Public Api for treeView feature
- */
- var publicApi = {
- events: {
- treeView: {
- }
- },
- methods: {
- treeView: {
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.treeView.api:GridOptions
- *
- * @description GridOptions for treeView feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- *
- * Many tree options are set on treeBase, make sure to look at that feature in
- * conjunction with these options.
- */
-
- /**
- * @ngdoc object
- * @name enableTreeView
- * @propertyOf ui.grid.treeView.api:GridOptions
- * @description Enable row tree view for entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enableTreeView = gridOptions.enableTreeView !== false;
-
- },
-
-
- /**
- * @ngdoc function
- * @name adjustSorting
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Trees cannot be sorted the same as flat lists of rows -
- * trees are sorted recursively within each level - so the children of each
- * node are sorted, but not the full set of rows.
- *
- * To achieve this, we suppress the normal sorting by setting ignoreSort on
- * each of the sort columns. When the treeBase rowsProcessor runs it will then
- * unignore these, and will perform a recursive sort against the tree that it builds.
- *
- * @param {array} renderableRows the rows that we need to pass on through
- * @returns {array} renderableRows that we passed on through
- */
- adjustSorting: function( renderableRows ) {
- var grid = this;
-
- grid.columns.forEach( function( column ){
- if ( column.sort ){
- column.sort.ignoreSort = true;
- }
- });
-
- return renderableRows;
- }
-
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeView.directive:uiGridTreeView
- * @element div
- * @restrict A
- *
- * @description Adds treeView features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.treeView']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
-
- $scope.gridOptions = { columnDefs: $scope.columnDefs, data: $scope.data };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-tree-view></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridTreeView', ['uiGridTreeViewConstants', 'uiGridTreeViewService', '$templateCache',
- function (uiGridTreeViewConstants, uiGridTreeViewService, $templateCache) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- if (uiGridCtrl.grid.options.enableTreeView !== false){
- uiGridTreeViewService.initializeGrid(uiGridCtrl.grid, $scope);
- }
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- }
- };
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.validate
- * @description
- *
- * # ui.grid.validate
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides the ability to validate cells upon change.
- *
- * Design information:
- * -------------------
- *
- * Validation is not based on angularjs validation, since it would work only when editing the field.
- *
- * Instead it adds custom properties to any field considered as invalid.
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.expandable"></div>
- */
-
- var module = angular.module('ui.grid.validate', ['ui.grid']);
-
-
- /**
- * @ngdoc service
- * @name ui.grid.validate.service:uiGridValidateService
- *
- * @description Services for validation features
- */
- module.service('uiGridValidateService', ['$sce', '$q', '$http', 'i18nService', 'uiGridConstants', function ($sce, $q, $http, i18nService, uiGridConstants) {
-
- var service = {
-
- /**
- * @ngdoc object
- * @name validatorFactories
- * @propertyOf ui.grid.validate.service:uiGridValidateService
- * @description object containing all the factories used to validate data.<br/>
- * These factories will be in the form <br/>
- * ```
- * {
- * validatorFactory: function(argument) {
- * return function(newValue, oldValue, rowEntity, colDef) {
- * return true || false || promise
- * }
- * },
- * messageFunction: function(argument) {
- * return string
- * }
- * }
- * ```
- *
- * Promises should return true or false as result according to the result of validation.
- */
- validatorFactories: {},
-
-
- /**
- * @ngdoc service
- * @name setExternalFactoryFunction
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Adds a way to retrieve validators from an external service
- * <p>Validators from this external service have a higher priority than default
- * ones
- * @param {function} externalFactoryFunction a function that accepts name and argument to pass to a
- * validator factory and that returns an object with the same properties as
- * you can see in {@link ui.grid.validate.service:uiGridValidateService#properties_validatorFactories validatorFactories}
- */
- setExternalFactoryFunction: function(externalFactoryFunction) {
- service.externalFactoryFunction = externalFactoryFunction;
- },
-
- /**
- * @ngdoc service
- * @name clearExternalFactory
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Removes any link to external factory from this service
- */
- clearExternalFactory: function() {
- delete service.externalFactoryFunction;
- },
-
- /**
- * @ngdoc service
- * @name getValidatorFromExternalFactory
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Retrieves a validator by executing a validatorFactory
- * stored in an external service.
- * @param {string} name the name of the validator to retrieve
- * @param {object} argument an argument to pass to the validator factory
- */
- getValidatorFromExternalFactory: function(name, argument) {
- return service.externalFactoryFunction(name, argument).validatorFactory(argument);
- },
-
- /**
- * @ngdoc service
- * @name getMessageFromExternalFactory
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Retrieves a message stored in an external service.
- * @param {string} name the name of the validator
- * @param {object} argument an argument to pass to the message function
- */
- getMessageFromExternalFactory: function(name, argument) {
- return service.externalFactoryFunction(name, argument).messageFunction(argument);
- },
-
- /**
- * @ngdoc service
- * @name setValidator
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Adds a new validator to the service
- * @param {string} name the name of the validator, must be unique
- * @param {function} validatorFactory a factory that return a validatorFunction
- * @param {function} messageFunction a function that return the error message
- */
- setValidator: function(name, validatorFactory, messageFunction) {
- service.validatorFactories[name] = {
- validatorFactory: validatorFactory,
- messageFunction: messageFunction
- };
- },
-
- /**
- * @ngdoc service
- * @name getValidator
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Returns a validator registered to the service
- * or retrieved from the external factory
- * @param {string} name the name of the validator to retrieve
- * @param {object} argument an argument to pass to the validator factory
- * @returns {object} the validator function
- */
- getValidator: function(name, argument) {
- if (service.externalFactoryFunction) {
- var validator = service.getValidatorFromExternalFactory(name, argument);
- if (validator) {
- return validator;
- }
- }
- if (!service.validatorFactories[name]) {
- throw ("Invalid validator name: " + name);
- }
- return service.validatorFactories[name].validatorFactory(argument);
- },
-
- /**
- * @ngdoc service
- * @name getMessage
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Returns the error message related to the validator
- * @param {string} name the name of the validator
- * @param {object} argument an argument to pass to the message function
- * @returns {string} the error message related to the validator
- */
- getMessage: function(name, argument) {
- if (service.externalFactoryFunction) {
- var message = service.getMessageFromExternalFactory(name, argument);
- if (message) {
- return message;
- }
- }
- return service.validatorFactories[name].messageFunction(argument);
- },
-
- /**
- * @ngdoc service
- * @name isInvalid
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Returns true if the cell (identified by rowEntity, colDef) is invalid
- * @param {object} rowEntity the row entity of the cell
- * @param {object} colDef the colDef of the cell
- * @returns {boolean} true if the cell is invalid
- */
- isInvalid: function (rowEntity, colDef) {
- return rowEntity['$$invalid'+colDef.name];
- },
-
- /**
- * @ngdoc service
- * @name setInvalid
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Makes the cell invalid by adding the proper field to the entity
- * @param {object} rowEntity the row entity of the cell
- * @param {object} colDef the colDef of the cell
- */
- setInvalid: function (rowEntity, colDef) {
- rowEntity['$$invalid'+colDef.name] = true;
- },
-
- /**
- * @ngdoc service
- * @name setValid
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Makes the cell valid by removing the proper error field from the entity
- * @param {object} rowEntity the row entity of the cell
- * @param {object} colDef the colDef of the cell
- */
- setValid: function (rowEntity, colDef) {
- delete rowEntity['$$invalid'+colDef.name];
- },
-
- /**
- * @ngdoc service
- * @name setError
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Adds the proper error to the entity errors field
- * @param {object} rowEntity the row entity of the cell
- * @param {object} colDef the colDef of the cell
- * @param {string} validatorName the name of the validator that is failing
- */
- setError: function(rowEntity, colDef, validatorName) {
- if (!rowEntity['$$errors'+colDef.name]) {
- rowEntity['$$errors'+colDef.name] = {};
- }
- rowEntity['$$errors'+colDef.name][validatorName] = true;
- },
-
- /**
- * @ngdoc service
- * @name clearError
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Removes the proper error from the entity errors field
- * @param {object} rowEntity the row entity of the cell
- * @param {object} colDef the colDef of the cell
- * @param {string} validatorName the name of the validator that is failing
- */
- clearError: function(rowEntity, colDef, validatorName) {
- if (!rowEntity['$$errors'+colDef.name]) {
- return;
- }
- if (validatorName in rowEntity['$$errors'+colDef.name]) {
- delete rowEntity['$$errors'+colDef.name][validatorName];
- }
- },
-
- /**
- * @ngdoc function
- * @name getErrorMessages
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description returns an array of i18n-ed error messages.
- * @param {object} rowEntity gridOptions.data[] array instance whose errors we are looking for
- * @param {object} colDef the column whose errors we are looking for
- * @returns {array} An array of strings containing all the error messages for the cell
- */
- getErrorMessages: function(rowEntity, colDef) {
- var errors = [];
-
- if (!rowEntity['$$errors'+colDef.name] || Object.keys(rowEntity['$$errors'+colDef.name]).length === 0) {
- return errors;
- }
-
- Object.keys(rowEntity['$$errors'+colDef.name]).sort().forEach(function(validatorName) {
- errors.push(service.getMessage(validatorName, colDef.validators[validatorName]));
- });
-
- return errors;
- },
-
- /**
- * @ngdoc function
- * @name getFormattedErrors
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description returns the error i18n-ed and formatted in html to be shown inside the page.
- * @param {object} rowEntity gridOptions.data[] array instance whose errors we are looking for
- * @param {object} colDef the column whose errors we are looking for
- * @returns {object} An object that can be used in a template (like a cellTemplate) to display the
- * message inside the page (i.e. inside a div)
- */
- getFormattedErrors: function(rowEntity, colDef) {
-
- var msgString = "";
-
- var errors = service.getErrorMessages(rowEntity, colDef);
-
- if (!errors.length) {
- return;
- }
-
- errors.forEach(function(errorMsg) {
- msgString += errorMsg + "<br/>";
- });
-
- return $sce.trustAsHtml('<p><b>' + i18nService.getSafeText('validate.error') + '</b></p>' + msgString );
- },
-
- /**
- * @ngdoc function
- * @name getTitleFormattedErrors
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description returns the error i18n-ed and formatted in javaScript to be shown inside an html
- * title attribute.
- * @param {object} rowEntity gridOptions.data[] array instance whose errors we are looking for
- * @param {object} colDef the column whose errors we are looking for
- * @returns {object} An object that can be used in a template (like a cellTemplate) to display the
- * message inside an html title attribute
- */
- getTitleFormattedErrors: function(rowEntity, colDef) {
-
- var newLine = "\n";
-
- var msgString = "";
-
- var errors = service.getErrorMessages(rowEntity, colDef);
-
- if (!errors.length) {
- return;
- }
-
- errors.forEach(function(errorMsg) {
- msgString += errorMsg + newLine;
- });
-
- return $sce.trustAsHtml(i18nService.getSafeText('validate.error') + newLine + msgString);
- },
-
- /**
- * @ngdoc function
- * @name getTitleFormattedErrors
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description Executes all validators on a cell (identified by row entity and column definition) and sets or clears errors
- * @param {object} rowEntity the row entity of the cell we want to run the validators on
- * @param {object} colDef the column definition of the cell we want to run the validators on
- * @param {object} newValue the value the user just entered
- * @param {object} oldValue the value the field had before
- */
- runValidators: function(rowEntity, colDef, newValue, oldValue, grid) {
-
- if (newValue === oldValue) {
- // If the value has not changed we perform no validation
- return;
- }
-
- if (typeof(colDef.name) === 'undefined' || !colDef.name) {
- throw new Error('colDef.name is required to perform validation');
- }
-
- service.setValid(rowEntity, colDef);
-
- var validateClosureFactory = function(rowEntity, colDef, validatorName) {
- return function(value) {
- if (!value) {
- service.setInvalid(rowEntity, colDef);
- service.setError(rowEntity, colDef, validatorName);
- if (grid) {
- grid.api.validate.raise.validationFailed(rowEntity, colDef, newValue, oldValue);
- }
- }
- };
- };
-
- var promises = [];
-
- for (var validatorName in colDef.validators) {
- service.clearError(rowEntity, colDef, validatorName);
- var msg;
- var validatorFunction = service.getValidator(validatorName, colDef.validators[validatorName]);
- // We pass the arguments as oldValue, newValue so they are in the same order
- // as ng-model validators (modelValue, viewValue)
- var promise = $q
- .when(validatorFunction(oldValue, newValue, rowEntity, colDef))
- .then(validateClosureFactory(rowEntity, colDef, validatorName));
- promises.push(promise);
- }
-
- return $q.all(promises);
- },
-
- /**
- * @ngdoc function
- * @name createDefaultValidators
- * @methodOf ui.grid.validate.service:uiGridValidateService
- * @description adds the basic validators to the list of service validators
- */
- createDefaultValidators: function() {
- service.setValidator('minLength',
- function (argument) {
- return function (oldValue, newValue, rowEntity, colDef) {
- if (newValue === undefined || newValue === null || newValue === '') {
- return true;
- }
- return newValue.length >= argument;
- };
- },
- function(argument) {
- return i18nService.getSafeText('validate.minLength').replace('THRESHOLD', argument);
- });
-
- service.setValidator('maxLength',
- function (argument) {
- return function (oldValue, newValue, rowEntity, colDef) {
- if (newValue === undefined || newValue === null || newValue === '') {
- return true;
- }
- return newValue.length <= argument;
- };
- },
- function(threshold) {
- return i18nService.getSafeText('validate.maxLength').replace('THRESHOLD', threshold);
- });
-
- service.setValidator('required',
- function (argument) {
- return function (oldValue, newValue, rowEntity, colDef) {
- if (argument) {
- return !(newValue === undefined || newValue === null || newValue === '');
- }
- return true;
- };
- },
- function(argument) {
- return i18nService.getSafeText('validate.required');
- });
- },
-
- initializeGrid: function (scope, grid) {
- grid.validate = {
-
- isInvalid: service.isInvalid,
-
- getFormattedErrors: service.getFormattedErrors,
-
- getTitleFormattedErrors: service.getTitleFormattedErrors,
-
- runValidators: service.runValidators
- };
-
- /**
- * @ngdoc object
- * @name ui.grid.validate.api:PublicApi
- *
- * @description Public Api for validation feature
- */
- var publicApi = {
- events: {
- validate: {
- /**
- * @ngdoc event
- * @name validationFailed
- * @eventOf ui.grid.validate.api:PublicApi
- * @description raised when one or more failure happened during validation
- * <pre>
- * gridApi.validate.on.validationFailed(scope, function(rowEntity, colDef, newValue, oldValue){...})
- * </pre>
- * @param {object} rowEntity the options.data element whose validation failed
- * @param {object} colDef the column whose validation failed
- * @param {object} newValue new value
- * @param {object} oldValue old value
- */
- validationFailed: function (rowEntity, colDef, newValue, oldValue) {
- }
- }
- },
- methods: {
- validate: {
- /**
- * @ngdoc function
- * @name isInvalid
- * @methodOf ui.grid.validate.api:PublicApi
- * @description checks if a cell (identified by rowEntity, colDef) is invalid
- * @param {object} rowEntity gridOptions.data[] array instance we want to check
- * @param {object} colDef the column whose errors we want to check
- * @returns {boolean} true if the cell value is not valid
- */
- isInvalid: function(rowEntity, colDef) {
- return grid.validate.isInvalid(rowEntity, colDef);
- },
- /**
- * @ngdoc function
- * @name getErrorMessages
- * @methodOf ui.grid.validate.api:PublicApi
- * @description returns an array of i18n-ed error messages.
- * @param {object} rowEntity gridOptions.data[] array instance whose errors we are looking for
- * @param {object} colDef the column whose errors we are looking for
- * @returns {array} An array of strings containing all the error messages for the cell
- */
- getErrorMessages: function (rowEntity, colDef) {
- return grid.validate.getErrorMessages(rowEntity, colDef);
- },
- /**
- * @ngdoc function
- * @name getFormattedErrors
- * @methodOf ui.grid.validate.api:PublicApi
- * @description returns the error i18n-ed and formatted in html to be shown inside the page.
- * @param {object} rowEntity gridOptions.data[] array instance whose errors we are looking for
- * @param {object} colDef the column whose errors we are looking for
- * @returns {object} An object that can be used in a template (like a cellTemplate) to display the
- * message inside the page (i.e. inside a div)
- */
- getFormattedErrors: function (rowEntity, colDef) {
- return grid.validate.getFormattedErrors(rowEntity, colDef);
- },
- /**
- * @ngdoc function
- * @name getTitleFormattedErrors
- * @methodOf ui.grid.validate.api:PublicApi
- * @description returns the error i18n-ed and formatted in javaScript to be shown inside an html
- * title attribute.
- * @param {object} rowEntity gridOptions.data[] array instance whose errors we are looking for
- * @param {object} colDef the column whose errors we are looking for
- * @returns {object} An object that can be used in a template (like a cellTemplate) to display the
- * message inside an html title attribute
- */
- getTitleFormattedErrors: function (rowEntity, colDef) {
- return grid.validate.getTitleFormattedErrors(rowEntity, colDef);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- if (grid.edit) {
- grid.api.edit.on.afterCellEdit(scope, function(rowEntity, colDef, newValue, oldValue) {
- grid.validate.runValidators(rowEntity, colDef, newValue, oldValue, grid);
- });
- }
-
- service.createDefaultValidators();
- }
-
- };
-
- return service;
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.validate.directive:uiGridValidate
- * @element div
- * @restrict A
- * @description Adds validating features to the ui-grid directive.
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.edit', 'ui.grid.validate']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true, validators: {minLength: 3, maxLength: 9}, cellTemplate: 'ui-grid/cellTitleValidator'},
- {name: 'title', enableCellEdit: true, validators: {required: true}, cellTemplate: 'ui-grid/cellTitleValidator'}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-edit ui-grid-validate></div>
- </div>
- </file>
- </example>
- */
-
- module.directive('uiGridValidate', ['gridUtil', 'uiGridValidateService', function (gridUtil, uiGridValidateService) {
- return {
- priority: 0,
- replace: true,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridValidateService.initializeGrid($scope, uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-})();
-
-angular.module('ui.grid').run(['$templateCache', function($templateCache) {
- 'use strict';
-
- $templateCache.put('ui-grid/ui-grid-filter',
- "<div class=\"ui-grid-filter-container\" ng-style=\"col.extraStyle\" ng-repeat=\"colFilter in col.filters\" ng-class=\"{'ui-grid-filter-cancel-button-hidden' : colFilter.disableCancelFilterButton === true }\"><div ng-if=\"colFilter.type !== 'select'\"><input type=\"text\" class=\"ui-grid-filter-input ui-grid-filter-input-{{$index}}\" ng-model=\"colFilter.term\" ng-attr-placeholder=\"{{colFilter.placeholder || ''}}\" aria-label=\"{{colFilter.ariaLabel || aria.defaultFilterLabel}}\"><div role=\"button\" class=\"ui-grid-filter-button\" ng-click=\"removeFilter(colFilter, $index)\" ng-if=\"!colFilter.disableCancelFilterButton\" ng-disabled=\"colFilter.term === undefined || colFilter.term === null || colFilter.term === ''\" ng-show=\"colFilter.term !== undefined && colFilter.term !== null && colFilter.term !== ''\"><i class=\"ui-grid-icon-cancel\" ui-grid-one-bind-aria-label=\"aria.removeFilter\">&nbsp;</i></div></div><div ng-if=\"colFilter.type === 'select'\"><select class=\"ui-grid-filter-select ui-grid-filter-input-{{$index}}\" ng-model=\"colFilter.term\" ng-show=\"colFilter.selectOptions.length > 0\" ng-attr-placeholder=\"{{colFilter.placeholder || aria.defaultFilterLabel}}\" aria-label=\"{{colFilter.ariaLabel || ''}}\" ng-options=\"option.value as option.label for option in colFilter.selectOptions\"><option value=\"\"></option></select><div role=\"button\" class=\"ui-grid-filter-button-select\" ng-click=\"removeFilter(colFilter, $index)\" ng-if=\"!colFilter.disableCancelFilterButton\" ng-disabled=\"colFilter.term === undefined || colFilter.term === null || colFilter.term === ''\" ng-show=\"colFilter.term !== undefined && colFilter.term != null\"><i class=\"ui-grid-icon-cancel\" ui-grid-one-bind-aria-label=\"aria.removeFilter\">&nbsp;</i></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-footer',
- "<div class=\"ui-grid-footer-panel ui-grid-footer-aggregates-row\"><!-- tfooter --><div class=\"ui-grid-footer ui-grid-footer-viewport\"><div class=\"ui-grid-footer-canvas\"><div class=\"ui-grid-footer-cell-wrapper\" ng-style=\"colContainer.headerCellWrapperStyle()\"><div role=\"row\" class=\"ui-grid-footer-cell-row\"><div ui-grid-footer-cell role=\"gridcell\" ng-repeat=\"col in colContainer.renderedColumns track by col.uid\" col=\"col\" render-index=\"$index\" class=\"ui-grid-footer-cell ui-grid-clearfix\"></div></div></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-grid-footer',
- "<div class=\"ui-grid-footer-info ui-grid-grid-footer\"><span>{{'search.totalItems' | t}} {{grid.rows.length}}</span> <span ng-if=\"grid.renderContainers.body.visibleRowCache.length !== grid.rows.length\" class=\"ngLabel\">({{\"search.showingItems\" | t}} {{grid.renderContainers.body.visibleRowCache.length}})</span></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-group-panel',
- "<div class=\"ui-grid-group-panel\"><div ui-t=\"groupPanel.description\" class=\"description\" ng-show=\"groupings.length == 0\"></div><ul ng-show=\"groupings.length > 0\" class=\"ngGroupList\"><li class=\"ngGroupItem\" ng-repeat=\"group in configGroups\"><span class=\"ngGroupElement\"><span class=\"ngGroupName\">{{group.displayName}} <span ng-click=\"removeGroup($index)\" class=\"ngRemoveGroup\">x</span></span> <span ng-hide=\"$last\" class=\"ngGroupArrow\"></span></span></li></ul></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-header',
- "<div role=\"rowgroup\" class=\"ui-grid-header\"><!-- theader --><div class=\"ui-grid-top-panel\"><div class=\"ui-grid-header-viewport\"><div class=\"ui-grid-header-canvas\"><div class=\"ui-grid-header-cell-wrapper\" ng-style=\"colContainer.headerCellWrapperStyle()\"><div role=\"row\" class=\"ui-grid-header-cell-row\"><div class=\"ui-grid-header-cell ui-grid-clearfix\" ng-repeat=\"col in colContainer.renderedColumns track by col.uid\" ui-grid-header-cell col=\"col\" render-index=\"$index\"></div></div></div></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-menu-button',
- "<div class=\"ui-grid-menu-button\"><div role=\"button\" ui-grid-one-bind-id-grid=\"'grid-menu'\" class=\"ui-grid-icon-container\" ng-click=\"toggleMenu()\" aria-haspopup=\"true\"><i class=\"ui-grid-icon-menu\" ui-grid-one-bind-aria-label=\"i18n.aria.buttonLabel\">&nbsp;</i></div><div ui-grid-menu menu-items=\"menuItems\"></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-no-header',
- "<div class=\"ui-grid-top-panel\"></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-row',
- "<div ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid',
- "<div ui-i18n=\"en\" class=\"ui-grid\"><!-- TODO (c0bra): add \"scoped\" attr here, eventually? --><style ui-grid-style>.grid{{ grid.id }} {\n" +
- " /* Styles for the grid */\n" +
- " }\n" +
- "\n" +
- " .grid{{ grid.id }} .ui-grid-row, .grid{{ grid.id }} .ui-grid-cell, .grid{{ grid.id }} .ui-grid-cell .ui-grid-vertical-bar {\n" +
- " height: {{ grid.options.rowHeight }}px;\n" +
- " }\n" +
- "\n" +
- " .grid{{ grid.id }} .ui-grid-row:last-child .ui-grid-cell {\n" +
- " border-bottom-width: {{ ((grid.getTotalRowHeight() < grid.getViewportHeight()) && '1') || '0' }}px;\n" +
- " }\n" +
- "\n" +
- " {{ grid.verticalScrollbarStyles }}\n" +
- " {{ grid.horizontalScrollbarStyles }}\n" +
- "\n" +
- " /*\n" +
- " .ui-grid[dir=rtl] .ui-grid-viewport {\n" +
- " padding-left: {{ grid.verticalScrollbarWidth }}px;\n" +
- " }\n" +
- " */\n" +
- "\n" +
- " {{ grid.customStyles }}</style><div class=\"ui-grid-contents-wrapper\"><div ui-grid-menu-button ng-if=\"grid.options.enableGridMenu\"></div><div ng-if=\"grid.hasLeftContainer()\" style=\"width: 0\" ui-grid-pinned-container=\"'left'\"></div><div ui-grid-render-container container-id=\"'body'\" col-container-name=\"'body'\" row-container-name=\"'body'\" bind-scroll-horizontal=\"true\" bind-scroll-vertical=\"true\" enable-horizontal-scrollbar=\"grid.options.enableHorizontalScrollbar\" enable-vertical-scrollbar=\"grid.options.enableVerticalScrollbar\"></div><div ng-if=\"grid.hasRightContainer()\" style=\"width: 0\" ui-grid-pinned-container=\"'right'\"></div><div ui-grid-grid-footer ng-if=\"grid.options.showGridFooter\"></div><div ui-grid-column-menu ng-if=\"grid.options.enableColumnMenus\"></div><div ng-transclude></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridCell',
- "<div class=\"ui-grid-cell-contents\" title=\"TOOLTIP\">{{COL_FIELD CUSTOM_FILTERS}}</div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridColumnMenu',
- "<div class=\"ui-grid-column-menu\"><div ui-grid-menu menu-items=\"menuItems\"><!-- <div class=\"ui-grid-column-menu\">\n" +
- " <div class=\"inner\" ng-show=\"menuShown\">\n" +
- " <ul>\n" +
- " <div ng-show=\"grid.options.enableSorting\">\n" +
- " <li ng-click=\"sortColumn($event, asc)\" ng-class=\"{ 'selected' : col.sort.direction == asc }\"><i class=\"ui-grid-icon-sort-alt-up\"></i> Sort Ascending</li>\n" +
- " <li ng-click=\"sortColumn($event, desc)\" ng-class=\"{ 'selected' : col.sort.direction == desc }\"><i class=\"ui-grid-icon-sort-alt-down\"></i> Sort Descending</li>\n" +
- " <li ng-show=\"col.sort.direction\" ng-click=\"unsortColumn()\"><i class=\"ui-grid-icon-cancel\"></i> Remove Sort</li>\n" +
- " </div>\n" +
- " </ul>\n" +
- " </div>\n" +
- " </div> --></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridFooterCell',
- "<div class=\"ui-grid-cell-contents\" col-index=\"renderIndex\"><div>{{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}</div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridHeaderCell',
- "<div role=\"columnheader\" ng-class=\"{ 'sortable': sortable }\" ui-grid-one-bind-aria-labelledby-grid=\"col.uid + '-header-text ' + col.uid + '-sortdir-text'\" aria-sort=\"{{col.sort.direction == asc ? 'ascending' : ( col.sort.direction == desc ? 'descending' : (!col.sort.direction ? 'none' : 'other'))}}\"><div role=\"button\" tabindex=\"0\" class=\"ui-grid-cell-contents ui-grid-header-cell-primary-focus\" col-index=\"renderIndex\" title=\"TOOLTIP\"><span class=\"ui-grid-header-cell-label\" ui-grid-one-bind-id-grid=\"col.uid + '-header-text'\">{{ col.displayName CUSTOM_FILTERS }}</span> <span ui-grid-one-bind-id-grid=\"col.uid + '-sortdir-text'\" ui-grid-visible=\"col.sort.direction\" aria-label=\"{{getSortDirectionAriaLabel()}}\"><i ng-class=\"{ 'ui-grid-icon-up-dir': col.sort.direction == asc, 'ui-grid-icon-down-dir': col.sort.direction == desc, 'ui-grid-icon-blank': !col.sort.direction }\" title=\"{{isSortPriorityVisible() ? i18n.headerCell.priority + ' ' + ( col.sort.priority + 1 ) : null}}\" aria-hidden=\"true\"></i> <sub ui-grid-visible=\"isSortPriorityVisible()\" class=\"ui-grid-sort-priority-number\">{{col.sort.priority + 1}}</sub></span></div><div role=\"button\" tabindex=\"0\" ui-grid-one-bind-id-grid=\"col.uid + '-menu-button'\" class=\"ui-grid-column-menu-button\" ng-if=\"grid.options.enableColumnMenus && !col.isRowHeader && col.colDef.enableColumnMenu !== false\" ng-click=\"toggleMenu($event)\" ng-class=\"{'ui-grid-column-menu-button-last-col': isLastCol}\" ui-grid-one-bind-aria-label=\"i18n.headerCell.aria.columnMenuButtonLabel\" aria-haspopup=\"true\"><i class=\"ui-grid-icon-angle-down\" aria-hidden=\"true\">&nbsp;</i></div><div ui-grid-filter></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridMenu',
- "<div class=\"ui-grid-menu\" ng-if=\"shown\"><style ui-grid-style>{{dynamicStyles}}</style><div class=\"ui-grid-menu-mid\" ng-show=\"shownMid\"><div class=\"ui-grid-menu-inner\"><ul role=\"menu\" class=\"ui-grid-menu-items\"><li ng-repeat=\"item in menuItems\" role=\"menuitem\" ui-grid-menu-item ui-grid-one-bind-id=\"'menuitem-'+$index\" action=\"item.action\" name=\"item.title\" active=\"item.active\" icon=\"item.icon\" shown=\"item.shown\" context=\"item.context\" template-url=\"item.templateUrl\" leave-open=\"item.leaveOpen\" screen-reader-only=\"item.screenReaderOnly\"></li></ul></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridMenuItem',
- "<button type=\"button\" class=\"ui-grid-menu-item\" ng-click=\"itemAction($event, title)\" ng-show=\"itemShown()\" ng-class=\"{ 'ui-grid-menu-item-active': active(), 'ui-grid-sr-only': (!focus && screenReaderOnly) }\" aria-pressed=\"{{active()}}\" tabindex=\"0\" ng-focus=\"focus=true\" ng-blur=\"focus=false\"><i ng-class=\"icon\" aria-hidden=\"true\">&nbsp;</i> {{ name }}</button>"
- );
-
-
- $templateCache.put('ui-grid/uiGridRenderContainer',
- "<div role=\"grid\" ui-grid-one-bind-id-grid=\"'grid-container'\" class=\"ui-grid-render-container\" ng-style=\"{ 'margin-left': colContainer.getMargin('left') + 'px', 'margin-right': colContainer.getMargin('right') + 'px' }\"><!-- All of these dom elements are replaced in place --><div ui-grid-header></div><div ui-grid-viewport></div><div ng-if=\"colContainer.needsHScrollbarPlaceholder()\" class=\"ui-grid-scrollbar-placeholder\" ng-style=\"{height:colContainer.grid.scrollbarHeight + 'px'}\"></div><ui-grid-footer ng-if=\"grid.options.showColumnFooter\"></ui-grid-footer></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridViewport',
- "<div role=\"rowgroup\" class=\"ui-grid-viewport\" ng-style=\"colContainer.getViewportStyle()\"><!-- tbody --><div class=\"ui-grid-canvas\"><div ng-repeat=\"(rowRenderIndex, row) in rowContainer.renderedRows track by $index\" class=\"ui-grid-row\" ng-style=\"Viewport.rowStyle(rowRenderIndex)\"><div role=\"row\" ui-grid-row=\"row\" row-render-index=\"rowRenderIndex\"></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/cellEditor',
- "<div><form name=\"inputForm\"><input type=\"INPUT_TYPE\" ng-class=\"'colt' + col.uid\" ui-grid-editor ng-model=\"MODEL_COL_FIELD\"></form></div>"
- );
-
-
- $templateCache.put('ui-grid/dropdownEditor',
- "<div><form name=\"inputForm\"><select ng-class=\"'colt' + col.uid\" ui-grid-edit-dropdown ng-model=\"MODEL_COL_FIELD\" ng-options=\"field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray\"></select></form></div>"
- );
-
-
- $templateCache.put('ui-grid/fileChooserEditor',
- "<div><form name=\"inputForm\"><input ng-class=\"'colt' + col.uid\" ui-grid-edit-file-chooser type=\"file\" id=\"files\" name=\"files[]\" ng-model=\"MODEL_COL_FIELD\"></form></div>"
- );
-
-
- $templateCache.put('ui-grid/emptyBaseLayerContainer',
- "<div class=\"ui-grid-empty-base-layer-container ui-grid-canvas\"><div class=\"ui-grid-row\" ng-repeat=\"(rowRenderIndex, row) in grid.baseLayer.emptyRows track by $index\" ng-style=\"Viewport.rowStyle(rowRenderIndex)\"><div><div><div ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name\" class=\"ui-grid-cell {{ col.getColClass(false) }}\"></div></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableRow',
- "<div ui-grid-expandable-row ng-if=\"expandableRow.shouldRenderExpand()\" class=\"expandableRow\" style=\"float:left; margin-top: 1px; margin-bottom: 1px\" ng-style=\"{width: (grid.renderContainers.body.getCanvasWidth()) + 'px', height: row.expandedRowHeight + 'px'}\"></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableRowHeader',
- "<div class=\"ui-grid-row-header-cell ui-grid-expandable-buttons-cell\"><div class=\"ui-grid-cell-contents\"><i ng-if=\"!row.groupHeader==true\" ng-class=\"{ 'ui-grid-icon-plus-squared' : !row.isExpanded, 'ui-grid-icon-minus-squared' : row.isExpanded }\" ng-click=\"grid.api.expandable.toggleRowExpansion(row.entity)\"></i></div></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableScrollFiller',
- "<div ng-if=\"expandableRow.shouldRenderFiller()\" ng-class=\"{scrollFiller:true, scrollFillerClass:(colContainer.name === 'body')}\" ng-style=\"{ width: (grid.getViewportWidth()) + 'px', height: row.expandedRowHeight + 2 + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }\"><i class=\"ui-grid-icon-spin5 ui-grid-animate-spin\" ng-style=\"{'margin-top': ( row.expandedRowHeight/2 - 5) + 'px', 'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px'}\"></i></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableTopRowHeader',
- "<div class=\"ui-grid-row-header-cell ui-grid-expandable-buttons-cell\"><div class=\"ui-grid-cell-contents\"><i ng-class=\"{ 'ui-grid-icon-plus-squared' : !grid.expandable.expandedAll, 'ui-grid-icon-minus-squared' : grid.expandable.expandedAll }\" ng-click=\"grid.api.expandable.toggleAllRows()\"></i></div></div>"
- );
-
-
- $templateCache.put('ui-grid/csvLink',
- "<span class=\"ui-grid-exporter-csv-link-span\"><a href=\"data:text/csv;charset=UTF-8,CSV_CONTENT\" download=\"FILE_NAME\">LINK_LABEL</a></span>"
- );
-
-
- $templateCache.put('ui-grid/importerMenuItem',
- "<li class=\"ui-grid-menu-item\"><form><input class=\"ui-grid-importer-file-chooser\" type=\"file\" id=\"files\" name=\"files[]\"></form></li>"
- );
-
-
- $templateCache.put('ui-grid/importerMenuItemContainer',
- "<div ui-grid-importer-menu-item></div>"
- );
-
-
- $templateCache.put('ui-grid/pagination',
- "<div role=\"contentinfo\" class=\"ui-grid-pager-panel\" ui-grid-pager ng-show=\"grid.options.enablePaginationControls\"><div role=\"navigation\" class=\"ui-grid-pager-container\"><div role=\"menubar\" class=\"ui-grid-pager-control\"><button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-first\" ui-grid-one-bind-title=\"aria.pageToFirst\" ui-grid-one-bind-aria-label=\"aria.pageToFirst\" ng-click=\"pageFirstPageClick()\" ng-disabled=\"cantPageBackward()\"><div ng-class=\"grid.isRTL() ? 'last-triangle' : 'first-triangle'\"><div ng-class=\"grid.isRTL() ? 'last-bar-rtl' : 'first-bar'\"></div></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-previous\" ui-grid-one-bind-title=\"aria.pageBack\" ui-grid-one-bind-aria-label=\"aria.pageBack\" ng-click=\"pagePreviousPageClick()\" ng-disabled=\"cantPageBackward()\"><div ng-class=\"grid.isRTL() ? 'last-triangle prev-triangle' : 'first-triangle prev-triangle'\"></div></button> <input type=\"number\" ui-grid-one-bind-title=\"aria.pageSelected\" ui-grid-one-bind-aria-label=\"aria.pageSelected\" class=\"ui-grid-pager-control-input\" ng-model=\"grid.options.paginationCurrentPage\" min=\"1\" max=\"{{ paginationApi.getTotalPages() }}\" required> <span class=\"ui-grid-pager-max-pages-number\" ng-show=\"paginationApi.getTotalPages() > 0\"><abbr ui-grid-one-bind-title=\"paginationOf\">/</abbr> {{ paginationApi.getTotalPages() }}</span> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-next\" ui-grid-one-bind-title=\"aria.pageForward\" ui-grid-one-bind-aria-label=\"aria.pageForward\" ng-click=\"pageNextPageClick()\" ng-disabled=\"cantPageForward()\"><div ng-class=\"grid.isRTL() ? 'first-triangle next-triangle' : 'last-triangle next-triangle'\"></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-last\" ui-grid-one-bind-title=\"aria.pageToLast\" ui-grid-one-bind-aria-label=\"aria.pageToLast\" ng-click=\"pageLastPageClick()\" ng-disabled=\"cantPageToLast()\"><div ng-class=\"grid.isRTL() ? 'first-triangle' : 'last-triangle'\"><div ng-class=\"grid.isRTL() ? 'first-bar-rtl' : 'last-bar'\"></div></div></button></div><div class=\"ui-grid-pager-row-count-picker\" ng-if=\"grid.options.paginationPageSizes.length > 1 && !grid.options.useCustomPagination\"><select ui-grid-one-bind-aria-labelledby-grid=\"'items-per-page-label'\" ng-model=\"grid.options.paginationPageSize\" ng-options=\"o as o for o in grid.options.paginationPageSizes\"></select><span ui-grid-one-bind-id-grid=\"'items-per-page-label'\" class=\"ui-grid-pager-row-count-label\">&nbsp;{{sizesLabel}}</span></div><span ng-if=\"grid.options.paginationPageSizes.length <= 1\" class=\"ui-grid-pager-row-count-label\">{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}</span></div><div class=\"ui-grid-pager-count-container\"><div class=\"ui-grid-pager-count\"><span ng-show=\"grid.options.totalItems > 0\">{{ 1 + paginationApi.getFirstRowIndex() }} <abbr ui-grid-one-bind-title=\"paginationThrough\">-</abbr> {{ 1 + paginationApi.getLastRowIndex() }} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/columnResizer',
- "<div ui-grid-column-resizer ng-if=\"grid.options.enableColumnResizing\" class=\"ui-grid-column-resizer\" col=\"col\" position=\"right\" render-index=\"renderIndex\" unselectable=\"on\"></div>"
- );
-
-
- $templateCache.put('ui-grid/gridFooterSelectedItems',
- "<span ng-if=\"grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected\">({{\"search.selectedItems\" | t}} {{grid.selection.selectedCount}})</span>"
- );
-
-
- $templateCache.put('ui-grid/selectionHeaderCell',
- "<div><!-- <div class=\"ui-grid-vertical-bar\">&nbsp;</div> --><div class=\"ui-grid-cell-contents\" col-index=\"renderIndex\"><ui-grid-selection-select-all-buttons ng-if=\"grid.options.enableSelectAll\"></ui-grid-selection-select-all-buttons></div></div>"
- );
-
-
- $templateCache.put('ui-grid/selectionRowHeader',
- "<div class=\"ui-grid-disable-selection\"><div class=\"ui-grid-cell-contents\"><ui-grid-selection-row-header-buttons></ui-grid-selection-row-header-buttons></div></div>"
- );
-
-
- $templateCache.put('ui-grid/selectionRowHeaderButtons',
- "<div class=\"ui-grid-selection-row-header-buttons ui-grid-icon-ok\" ng-class=\"{'ui-grid-row-selected': row.isSelected}\" ng-click=\"selectButtonClick(row, $event)\">&nbsp;</div>"
- );
-
-
- $templateCache.put('ui-grid/selectionSelectAllButtons',
- "<div class=\"ui-grid-selection-row-header-buttons ui-grid-icon-ok\" ng-class=\"{'ui-grid-all-selected': grid.selection.selectAll}\" ng-click=\"headerButtonClick($event)\"></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseExpandAllButtons',
- "<div class=\"ui-grid-tree-base-row-header-buttons\" ng-class=\"{'ui-grid-icon-minus-squared': grid.treeBase.numberLevels > 0 && grid.treeBase.expandAll, 'ui-grid-icon-plus-squared': grid.treeBase.numberLevels > 0 && !grid.treeBase.expandAll}\" ng-click=\"headerButtonClick($event)\"></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseHeaderCell',
- "<div><div class=\"ui-grid-cell-contents\" col-index=\"renderIndex\"><ui-grid-tree-base-expand-all-buttons ng-if=\"grid.options.enableExpandAll\"></ui-grid-tree-base-expand-all-buttons></div></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseRowHeader',
- "<div class=\"ui-grid-cell-contents\"><ui-grid-tree-base-row-header-buttons></ui-grid-tree-base-row-header-buttons></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseRowHeaderButtons',
- "<div class=\"ui-grid-tree-base-row-header-buttons\" ng-class=\"{'ui-grid-tree-base-header': row.treeLevel > -1 }\" ng-click=\"treeButtonClick(row, $event)\"><i ng-class=\"{'ui-grid-icon-minus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\"></i> &nbsp;</div>"
- );
-
-
- $templateCache.put('ui-grid/cellTitleValidator',
- "<div class=\"ui-grid-cell-contents\" ng-class=\"{invalid:grid.validate.isInvalid(row.entity,col.colDef)}\" title=\"{{grid.validate.getTitleFormattedErrors(row.entity,col.colDef)}}\">{{COL_FIELD CUSTOM_FILTERS}}</div>"
- );
-
-
- $templateCache.put('ui-grid/cellTooltipValidator',
- "<div class=\"ui-grid-cell-contents\" ng-class=\"{invalid:grid.validate.isInvalid(row.entity,col.colDef)}\" tooltip-html-unsafe=\"{{grid.validate.getFormattedErrors(row.entity,col.colDef)}}\" tooltip-enable=\"grid.validate.isInvalid(row.entity,col.colDef)\" tooltip-append-to-body=\"true\" tooltip-placement=\"top\" title=\"TOOLTIP\">{{COL_FIELD CUSTOM_FILTERS}}</div>"
- );
-
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.css b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.css
deleted file mode 100644
index 110aefc4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.css
+++ /dev/null
@@ -1,4 +0,0 @@
-/*!
- * ui-grid - v4.0.2 - 2016-12-30
- * Copyright (c) 2016 ; License: MIT
- */#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:before,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after{content:" ";display:table}#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after{clear:both}.ui-grid{border:1px solid #d4d4d4;box-sizing:content-box;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-o-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0)}.ui-grid-vertical-bar{position:absolute;right:0;width:0}.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{width:1px}.ui-grid-scrollbar-placeholder{background-color:transparent}.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#d4d4d4}.ui-grid-clearfix:before,.ui-grid-clearfix:after{content:"";display:table}.ui-grid-clearfix:after{clear:both}.ui-grid-invisible{visibility:hidden}.ui-grid-contents-wrapper{position:relative;height:100%;width:100%}.ui-grid-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.ui-grid-top-panel-background{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0)}.ui-grid-header{border-bottom:1px solid #d4d4d4;box-sizing:border-box}.ui-grid-top-panel{position:relative;overflow:hidden;font-weight:bold;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-header-viewport{overflow:hidden}.ui-grid-header-canvas:before,.ui-grid-header-canvas:after{content:"";display:table;line-height:0}.ui-grid-header-canvas:after{clear:both}.ui-grid-header-cell-wrapper{position:relative;display:table;box-sizing:border-box;height:100%}.ui-grid-header-cell-row{display:table-row;position:relative}.ui-grid-header-cell{position:relative;box-sizing:border-box;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;display:table-cell;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:0}.ui-grid-header-cell:last-child{border-right:0}.ui-grid-header-cell .sortable{cursor:pointer}.ui-grid-header-cell .ui-grid-sort-priority-number{margin-left:-8px}.ui-grid-header .ui-grid-vertical-bar{top:0;bottom:0}.ui-grid-column-menu-button{position:absolute;right:1px;top:0}.ui-grid-column-menu-button .ui-grid-icon-angle-down{vertical-align:sub}.ui-grid-column-menu-button-last-col{margin-right:25px}.ui-grid-column-menu{position:absolute}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all .05s linear;-moz-transition:all .05s linear;-o-transition:all .05s linear;transition:all .05s linear;display:block !important}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transition:all .05s linear;-moz-transition:all .05s linear;-o-transition:all .05s linear;transition:all .05s linear;display:block !important}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove{-webkit-transform:translateY(-100%);-moz-transform:translateY(-100%);-o-transform:translateY(-100%);-ms-transform:translateY(-100%);transform:translateY(-100%)}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active{-webkit-transform:translateY(0);-moz-transform:translateY(0);-o-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}.ui-grid-filter-container{padding:4px 10px;position:relative}.ui-grid-filter-container .ui-grid-filter-button{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:10px;opacity:.66}.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]:hover{opacity:1}.ui-grid-filter-container .ui-grid-filter-button-select{position:absolute;top:0;bottom:0;right:0}.ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"]{position:absolute;top:50%;line-height:32px;margin-top:-16px;right:0;opacity:.66}.ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"]:hover{opacity:1}input[type="text"].ui-grid-filter-input{padding:0;margin:0;border:0;width:100%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}input[type="text"].ui-grid-filter-input:hover{border:1px solid #d4d4d4}select.ui-grid-filter-select{padding:0;margin:0;border:0;width:90%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}select.ui-grid-filter-select:hover{border:1px solid #d4d4d4}.ui-grid-filter-cancel-button-hidden select.ui-grid-filter-select{width:100%}.ui-grid-render-container{position:inherit;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-render-container:focus{outline:none}.ui-grid-viewport{min-height:20px;position:relative;overflow-y:scroll;-webkit-overflow-scrolling:touch}.ui-grid-viewport:focus{outline:none !important}.ui-grid-canvas{position:relative;padding-top:1px}.ui-grid-row{clear:both}.ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fdfdfd}.ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f3f3f3}.ui-grid-row:last-child .ui-grid-cell{border-bottom-color:#d4d4d4;border-bottom-style:solid}.ui-grid-no-row-overlay{position:absolute;top:0;bottom:0;left:0;right:0;margin:10%;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #d4d4d4;font-size:2em;text-align:center}.ui-grid-no-row-overlay>*{position:absolute;display:table;margin:auto 0;width:100%;top:0;bottom:0;left:0;right:0;opacity:.66}.ui-grid-cell{overflow:hidden;float:left;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;box-sizing:border-box}.ui-grid-cell:last-child{border-right:0}.ui-grid-cell-contents{padding:5px;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;white-space:nowrap;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;height:100%}.ui-grid-cell-contents-hidden{visibility:hidden;width:0;height:0;display:none}.ui-grid-row .ui-grid-cell.ui-grid-row-header-cell{background-color:#f0f0ee;border-bottom:solid 1px #d4d4d4}.ui-grid-footer-panel-background{background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0)}.ui-grid-footer-panel{position:relative;border-bottom:1px solid #d4d4d4;border-top:1px solid #d4d4d4;overflow:hidden;font-weight:bold;background:#f3f3f3;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #eee), color-stop(1, #fff));background:-ms-linear-gradient(bottom, #eee, #fff);background:-moz-linear-gradient(center bottom, #eee 0, #fff 100%);background:-o-linear-gradient(#fff, #eee);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);-webkit-border-top-right-radius:-1px;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:-1px;-moz-border-radius-topright:-1px;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:-1px;border-top-right-radius:-1px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:-1px;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}.ui-grid-grid-footer{float:left;width:100%}.ui-grid-footer-viewport{overflow:hidden}.ui-grid-footer-canvas{position:relative}.ui-grid-footer-canvas:before,.ui-grid-footer-canvas:after{content:"";display:table;line-height:0}.ui-grid-footer-canvas:after{clear:both}.ui-grid-footer-cell-wrapper{position:relative;display:table;box-sizing:border-box;height:100%}.ui-grid-footer-cell-row{display:table-row}.ui-grid-footer-cell{overflow:hidden;background-color:inherit;border-right:1px solid;border-color:#d4d4d4;box-sizing:border-box;display:table-cell}.ui-grid-footer-cell:last-child{border-right:0}input[type="text"].ui-grid-filter-input{padding:0;margin:0;border:0;width:100%;border:1px solid #d4d4d4;-webkit-border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-webkit-border-bottom-left-radius:0;-webkit-border-top-left-radius:0;-moz-border-radius-topright:0;-moz-border-radius-bottomright:0;-moz-border-radius-bottomleft:0;-moz-border-radius-topleft:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:0;-moz-background-clip:padding-box;-webkit-background-clip:padding-box;background-clip:padding-box}input[type="text"].ui-grid-filter-input:hover{border:1px solid #d4d4d4}.ui-grid-menu-button{z-index:2;position:absolute;right:0;top:0;background:#f3f3f3;border:1px solid #d4d4d4;cursor:pointer;height:31px;font-weight:normal}.ui-grid-menu-button .ui-grid-icon-container{margin-top:3px}.ui-grid-menu-button .ui-grid-menu{right:0}.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid{overflow:scroll;border:1px solid #d4d4d4}.ui-grid-menu{z-index:2;position:absolute;padding:0 10px 20px 10px;cursor:pointer;box-sizing:border-box}.ui-grid-menu .ui-grid-menu-inner{background:#f3f3f3;border:1px solid #d4d4d4;position:relative;white-space:nowrap;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);box-shadow:0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{position:absolute;right:0;top:0;display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:1px 1px;font-size:10px;line-height:1;border-radius:2px;color:transparent;background-color:transparent;border-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus{color:#333;text-decoration:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled],fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,fieldset[disabled] a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{pointer-events:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus{color:transparent;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover{color:transparent;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{color:transparent;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:hover,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus{color:transparent;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,.open>.dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button{background-image:none}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:hover,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:focus,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled.focus,.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].focus,fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus{background-color:transparent;border-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button .badge{color:transparent;background-color:transparent}.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button>i{opacity:.75;color:black}.ui-grid-menu .ui-grid-menu-inner ul{margin:0;padding:0;list-style-type:none}.ui-grid-menu .ui-grid-menu-inner ul li{padding:0}.ui-grid-menu .ui-grid-menu-inner ul li button{min-width:100%;padding:8px;text-align:left;background:transparent;border:none}.ui-grid-menu .ui-grid-menu-inner ul li button:hover,.ui-grid-menu .ui-grid-menu-inner ul li button:focus{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.ui-grid-menu .ui-grid-menu-inner ul li button.ui-grid-menu-item-active{-webkit-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);-moz-box-shadow:inset 0 0 14px rgba(0,0,0,0.2);box-shadow:inset 0 0 14px rgba(0,0,0,0.2);background-color:#cecece}.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child)>button{border-bottom:1px solid #d4d4d4}.ui-grid-sortarrow{right:5px;position:absolute;width:20px;top:0;bottom:0;background-position:center}.ui-grid-sortarrow.down{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-o-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}@font-face{font-family:'ui-grid';src:url('ui-grid.eot');src:url('ui-grid.eot#iefix') format('embedded-opentype'),url('ui-grid.woff') format('woff'),url('ui-grid.ttf') format('truetype'),url('ui-grid.svg?#ui-grid') format('svg');font-weight:normal;font-style:normal}[class^="ui-grid-icon"]:before,[class*=" ui-grid-icon"]:before{font-family:"ui-grid";font-style:normal;font-weight:normal;speak:none;display:inline-block;text-decoration:inherit;width:1em;margin-right:.2em;text-align:center;font-variant:normal;text-transform:none;line-height:1em;margin-left:.2em}.ui-grid-icon-blank::before{width:1em;content:' '}.ui-grid-icon-plus-squared:before{content:'\c350'}.ui-grid-icon-minus-squared:before{content:'\c351'}.ui-grid-icon-search:before{content:'\c352'}.ui-grid-icon-cancel:before{content:'\c353'}.ui-grid-icon-info-circled:before{content:'\c354'}.ui-grid-icon-lock:before{content:'\c355'}.ui-grid-icon-lock-open:before{content:'\c356'}.ui-grid-icon-pencil:before{content:'\c357'}.ui-grid-icon-down-dir:before{content:'\c358'}.ui-grid-icon-up-dir:before{content:'\c359'}.ui-grid-icon-left-dir:before{content:'\c35a'}.ui-grid-icon-right-dir:before{content:'\c35b'}.ui-grid-icon-left-open:before{content:'\c35c'}.ui-grid-icon-right-open:before{content:'\c35d'}.ui-grid-icon-angle-down:before{content:'\c35e'}.ui-grid-icon-filter:before{content:'\c35f'}.ui-grid-icon-sort-alt-up:before{content:'\c360'}.ui-grid-icon-sort-alt-down:before{content:'\c361'}.ui-grid-icon-ok:before{content:'\c362'}.ui-grid-icon-menu:before{content:'\c363'}.ui-grid-icon-indent-left:before{content:'\e800'}.ui-grid-icon-indent-right:before{content:'\e801'}.ui-grid-icon-spin5:before{content:'\ea61'}.ui-grid[dir=rtl] .ui-grid-header-cell,.ui-grid[dir=rtl] .ui-grid-footer-cell,.ui-grid[dir=rtl] .ui-grid-cell{float:right !important}.ui-grid[dir=rtl] .ui-grid-column-menu-button{position:absolute;left:1px;top:0;right:inherit}.ui-grid[dir=rtl] .ui-grid-cell:first-child,.ui-grid[dir=rtl] .ui-grid-header-cell:first-child,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child{border-right:0}.ui-grid[dir=rtl] .ui-grid-cell:last-child,.ui-grid[dir=rtl] .ui-grid-header-cell:last-child{border-right:1px solid #d4d4d4;border-left:0}.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar{width:0}.ui-grid[dir=rtl] .ui-grid-menu-button{z-index:2;position:absolute;left:0;right:auto;background:#f3f3f3;border:1px solid #d4d4d4;cursor:pointer;min-height:27px;font-weight:normal}.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu{left:0;right:auto}.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button{right:initial;left:0}.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]{right:initial;left:10px}.ui-grid-animate-spin{-moz-animation:ui-grid-spin 2s infinite linear;-o-animation:ui-grid-spin 2s infinite linear;-webkit-animation:ui-grid-spin 2s infinite linear;animation:ui-grid-spin 2s infinite linear;display:inline-block}@-moz-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-o-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-ms-keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes ui-grid-spin{0%{-moz-transform:rotate(0deg);-o-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-moz-transform:rotate(359deg);-o-transform:rotate(359deg);-webkit-transform:rotate(359deg);transform:rotate(359deg)}}#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:before,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after{content:" ";display:table}#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after{clear:both}.ui-grid-cell-focus{outline:0;background-color:#b3c4c7}.ui-grid-focuser{position:absolute;left:0;top:0;z-index:-1;width:100%;height:100%}.ui-grid-focuser:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6)}.ui-grid-offscreen{display:block;position:absolute;left:-10000px;top:-10000px;clip:rect(0, 0, 0, 0)}div.ui-grid-cell input{border-radius:inherit;padding:0;width:100%;color:inherit;height:auto;font:inherit;outline:none}div.ui-grid-cell input:focus{color:inherit;outline:none}div.ui-grid-cell input[type="checkbox"]{margin:9px 0 0 6px;width:auto}div.ui-grid-cell input.ng-invalid{border:1px solid #fc8f8f}div.ui-grid-cell input.ng-valid{border:1px solid #d4d4d4}.ui-grid-viewport .ui-grid-empty-base-layer-container{position:absolute;overflow:hidden;pointer-events:none;z-index:-1}.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell{background-color:#fdfdfd}.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell{background-color:#f3f3f3}.ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell{pointer-events:none}.ui-grid-expandable-buttons-cell i{pointer-events:all}.scrollFiller{float:left;border:1px solid #d4d4d4}.ui-grid-tree-header-row{font-weight:bold !important}.movingColumn{position:absolute;top:0;border:1px solid #d4d4d4;box-shadow:inset 0 0 14px rgba(0,0,0,0.2)}.movingColumn .ui-grid-icon-angle-down{display:none}#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:before,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after{content:" ";display:table}#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,#ui-grid-twbs #ui-grid-twbs .btn-group-vertical>.btn-group:after{clear:both}.ui-grid-pager-panel{position:absolute;left:0;bottom:0;width:100%;padding-top:3px;padding-bottom:3px;box-sizing:content-box}.ui-grid-pager-container{float:left}.ui-grid-pager-control{margin-right:10px;margin-left:10px;min-width:135px;float:left}.ui-grid-pager-control button{height:25px;min-width:26px;display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;color:#eee;background-color:#f3f3f3;border-color:#ccc}.ui-grid-pager-control button:focus,.ui-grid-pager-control button:active:focus,.ui-grid-pager-control button.active:focus,.ui-grid-pager-control button.focus,.ui-grid-pager-control button:active.focus,.ui-grid-pager-control button.active.focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.ui-grid-pager-control button:hover,.ui-grid-pager-control button:focus,.ui-grid-pager-control button.focus{color:#333;text-decoration:none}.ui-grid-pager-control button:active,.ui-grid-pager-control button.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.ui-grid-pager-control button.disabled,.ui-grid-pager-control button[disabled],fieldset[disabled] .ui-grid-pager-control button{cursor:not-allowed;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.ui-grid-pager-control button.disabled,fieldset[disabled] a.ui-grid-pager-control button{pointer-events:none}.ui-grid-pager-control button:focus,.ui-grid-pager-control button.focus{color:#eee;background-color:#dadada;border-color:#8c8c8c}.ui-grid-pager-control button:hover{color:#eee;background-color:#dadada;border-color:#adadad}.ui-grid-pager-control button:active,.ui-grid-pager-control button.active,.open>.dropdown-toggle.ui-grid-pager-control button{color:#eee;background-color:#dadada;border-color:#adadad}.ui-grid-pager-control button:active:hover,.ui-grid-pager-control button.active:hover,.open>.dropdown-toggle.ui-grid-pager-control button:hover,.ui-grid-pager-control button:active:focus,.ui-grid-pager-control button.active:focus,.open>.dropdown-toggle.ui-grid-pager-control button:focus,.ui-grid-pager-control button:active.focus,.ui-grid-pager-control button.active.focus,.open>.dropdown-toggle.ui-grid-pager-control button.focus{color:#eee;background-color:#c8c8c8;border-color:#8c8c8c}.ui-grid-pager-control button:active,.ui-grid-pager-control button.active,.open>.dropdown-toggle.ui-grid-pager-control button{background-image:none}.ui-grid-pager-control button.disabled:hover,.ui-grid-pager-control button[disabled]:hover,fieldset[disabled] .ui-grid-pager-control button:hover,.ui-grid-pager-control button.disabled:focus,.ui-grid-pager-control button[disabled]:focus,fieldset[disabled] .ui-grid-pager-control button:focus,.ui-grid-pager-control button.disabled.focus,.ui-grid-pager-control button[disabled].focus,fieldset[disabled] .ui-grid-pager-control button.focus{background-color:#f3f3f3;border-color:#ccc}.ui-grid-pager-control button .badge{color:#f3f3f3;background-color:#eee}.ui-grid-pager-control input{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px;display:inline;height:26px;width:50px;vertical-align:top}.ui-grid-pager-control input:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6)}.ui-grid-pager-control input::-moz-placeholder{color:#999;opacity:1}.ui-grid-pager-control input:-ms-input-placeholder{color:#999}.ui-grid-pager-control input::-webkit-input-placeholder{color:#999}.ui-grid-pager-control input::-ms-expand{border:0;background-color:transparent}.ui-grid-pager-control input[disabled],.ui-grid-pager-control input[readonly],fieldset[disabled] .ui-grid-pager-control input{background-color:#eee;opacity:1}.ui-grid-pager-control input[disabled],fieldset[disabled] .ui-grid-pager-control input{cursor:not-allowed}textarea.ui-grid-pager-control input{height:auto}select.ui-grid-pager-control input{height:30px;line-height:30px}textarea.ui-grid-pager-control input,select[multiple].ui-grid-pager-control input{height:auto}.ui-grid-pager-control .ui-grid-pager-max-pages-number{vertical-align:bottom}.ui-grid-pager-control .ui-grid-pager-max-pages-number>*{vertical-align:middle}.ui-grid-pager-control .first-bar{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-left:-3px}.ui-grid-pager-control .first-bar-rtl{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-right:-7px}.ui-grid-pager-control .first-triangle{width:0;height:0;border-style:solid;border-width:5px 8.7px 5px 0;border-color:transparent #4d4d4d transparent transparent;margin-left:2px}.ui-grid-pager-control .next-triangle{margin-left:1px}.ui-grid-pager-control .prev-triangle{margin-left:0}.ui-grid-pager-control .last-triangle{width:0;height:0;border-style:solid;border-width:5px 0 5px 8.7px;border-color:transparent transparent transparent #4d4d4d;margin-left:-1px}.ui-grid-pager-control .last-bar{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-left:1px}.ui-grid-pager-control .last-bar-rtl{width:10px;border-left:2px solid #4d4d4d;margin-top:-6px;height:12px;margin-right:-11px}.ui-grid-pager-row-count-picker{float:left}.ui-grid-pager-row-count-picker select{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px;height:26px;width:67px;display:inline}.ui-grid-pager-row-count-picker select:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6)}.ui-grid-pager-row-count-picker select::-moz-placeholder{color:#999;opacity:1}.ui-grid-pager-row-count-picker select:-ms-input-placeholder{color:#999}.ui-grid-pager-row-count-picker select::-webkit-input-placeholder{color:#999}.ui-grid-pager-row-count-picker select::-ms-expand{border:0;background-color:transparent}.ui-grid-pager-row-count-picker select[disabled],.ui-grid-pager-row-count-picker select[readonly],fieldset[disabled] .ui-grid-pager-row-count-picker select{background-color:#eee;opacity:1}.ui-grid-pager-row-count-picker select[disabled],fieldset[disabled] .ui-grid-pager-row-count-picker select{cursor:not-allowed}textarea.ui-grid-pager-row-count-picker select{height:auto}select.ui-grid-pager-row-count-picker select{height:30px;line-height:30px}textarea.ui-grid-pager-row-count-picker select,select[multiple].ui-grid-pager-row-count-picker select{height:auto}.ui-grid-pager-row-count-picker .ui-grid-pager-row-count-label{margin-top:3px}.ui-grid-pager-count-container{float:right;margin-top:4px;min-width:50px}.ui-grid-pager-count-container .ui-grid-pager-count{margin-right:10px;margin-left:10px;float:right}.ui-grid-pinned-container{position:absolute;display:inline;top:0}.ui-grid-pinned-container.ui-grid-pinned-container-left{float:left;left:0}.ui-grid-pinned-container.ui-grid-pinned-container-right{float:right;right:0}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child{box-sizing:border-box;border-right:1px solid;border-width:1px;border-right-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child{box-sizing:border-box;border-right:1px solid;border-width:1px;border-right-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{width:1px}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar{right:-1px;width:1px;background-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:first-child{box-sizing:border-box;border-left:1px solid;border-width:1px;border-left-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-cell:first-child{box-sizing:border-box;border-left:1px solid;border-width:1px;border-left-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:not(:first-child) .ui-grid-vertical-bar,.ui-grid-pinned-container .ui-grid-cell:not(:first-child) .ui-grid-vertical-bar{width:1px}.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:not(:first-child) .ui-grid-vertical-bar{background-color:#d4d4d4}.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar{background-color:#aeaeae}.ui-grid-pinned-container.ui-grid-pinned-container-first .ui-grid-header-cell:first-child .ui-grid-vertical-bar{left:-1px;width:1px;background-color:#aeaeae}.ui-grid-column-resizer{top:0;bottom:0;width:5px;position:absolute;cursor:col-resize}.ui-grid-column-resizer.left{left:0}.ui-grid-column-resizer.right{right:0}.ui-grid-header-cell:last-child .ui-grid-column-resizer.right{border-right:1px solid #d4d4d4}.ui-grid[dir=rtl] .ui-grid-header-cell:last-child .ui-grid-column-resizer.right{border-right:0}.ui-grid[dir=rtl] .ui-grid-header-cell:last-child .ui-grid-column-resizer.left{border-left:1px solid #d4d4d4}.ui-grid.column-resizing{cursor:col-resize}.ui-grid.column-resizing .ui-grid-resize-overlay{position:absolute;top:0;height:100%;width:1px;background-color:#aeaeae}.ui-grid-row-saving .ui-grid-cell{color:#848484 !important}.ui-grid-row-dirty .ui-grid-cell{color:#610b38}.ui-grid-row-error .ui-grid-cell{color:#f00 !important}.ui-grid-row.ui-grid-row-selected>[ui-grid-row]>.ui-grid-cell{background-color:#c9dde1}.ui-grid-disable-selection{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.ui-grid-selection-row-header-buttons{cursor:pointer;opacity:.1}.ui-grid-selection-row-header-buttons.ui-grid-row-selected{opacity:1}.ui-grid-selection-row-header-buttons.ui-grid-all-selected{opacity:1}.ui-grid-tree-row-header-buttons.ui-grid-tree-header{cursor:pointer;opacity:1}.ui-grid-tree-header-row{font-weight:bold !important}.ui-grid-tree-header-row .ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell{pointer-events:all}div.ui-grid-cell-contents.invalid{border:1px solid #fc8f8f} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.js
deleted file mode 100644
index 8d9e7ed8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.min.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*!
- * ui-grid - v4.0.2 - 2016-12-30
- * Copyright (c) 2016 ; License: MIT
- */
-
-!function(){"use strict";angular.module("ui.grid.i18n",[]),angular.module("ui.grid",["ui.grid.i18n"])}(),function(){"use strict";angular.module("ui.grid").constant("uiGridConstants",{LOG_DEBUG_MESSAGES:!0,LOG_WARN_MESSAGES:!0,LOG_ERROR_MESSAGES:!0,CUSTOM_FILTERS:/CUSTOM_FILTERS/g,COL_FIELD:/COL_FIELD/g,MODEL_COL_FIELD:/MODEL_COL_FIELD/g,TOOLTIP:/title=\"TOOLTIP\"/g,DISPLAY_CELL_TEMPLATE:/DISPLAY_CELL_TEMPLATE/g,TEMPLATE_REGEXP:/<.+>/,FUNC_REGEXP:/(\([^)]*\))?$/,DOT_REGEXP:/\./g,APOS_REGEXP:/'/g,BRACKET_REGEXP:/^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,COL_CLASS_PREFIX:"ui-grid-col",ENTITY_BINDING:"$$this",events:{GRID_SCROLL:"uiGridScroll",COLUMN_MENU_SHOWN:"uiGridColMenuShown",ITEM_DRAGGING:"uiGridItemDragStart",COLUMN_HEADER_CLICK:"uiGridColumnHeaderClick"},keymap:{TAB:9,STRG:17,CAPSLOCK:20,CTRL:17,CTRLRIGHT:18,CTRLR:18,SHIFT:16,RETURN:13,ENTER:13,BACKSPACE:8,BCKSP:8,ALT:18,ALTR:17,ALTRIGHT:17,SPACE:32,WIN:91,MAC:91,FN:null,PG_UP:33,PG_DOWN:34,UP:38,DOWN:40,LEFT:37,RIGHT:39,ESC:27,DEL:46,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123},ASC:"asc",DESC:"desc",filter:{STARTS_WITH:2,ENDS_WITH:4,EXACT:8,CONTAINS:16,GREATER_THAN:32,GREATER_THAN_OR_EQUAL:64,LESS_THAN:128,LESS_THAN_OR_EQUAL:256,NOT_EQUAL:512,SELECT:"select",INPUT:"input"},aggregationTypes:{sum:2,count:4,avg:8,min:16,max:32},CURRENCY_SYMBOLS:["¤","Ø‹","Ar","Ƀ","฿","B/.","Br","Bs.","Bs.F.","GH₵","¢","c","Ch.","â‚¡","C$","D","ден","دج",".د.ب","د.ع","JD","د.Ùƒ","Ù„.د","дин","د.ت","د.Ù….","د.Ø¥","Db","$","â‚«","Esc","€","Æ’","Ft","FBu","FCFA","CFA","Fr","FRw","G","gr","₲","h","â‚´","â‚­","KÄ","kr","kn","MK","ZK","Kz","K","L","Le","лв","E","lp","M","KM","MT","â‚¥","Nfk","₦","Nu.","UM","T$","MOP$","₱","Pt.","£","ج.Ù….","LL","LS","P","Q","q","R","R$","ر.ع.","ر.Ù‚","ر.س","៛","RM","p","Rf.","₹","₨","SRe","Rp","₪","Ksh","Sh.So.","USh","S/","SDR","Ñом","৳ ","WS$","â‚®","VT","â‚©","Â¥","zÅ‚"],scrollDirection:{UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",NONE:"none"},dataChange:{ALL:"all",EDIT:"edit",ROW:"row",COLUMN:"column",OPTIONS:"options"},scrollbars:{NEVER:0,ALWAYS:1}})}(),angular.module("ui.grid").directive("uiGridCell",["$compile","$parse","gridUtil","uiGridConstants",function(a,b,c,d){var e={priority:0,scope:!1,require:"?^uiGrid",compile:function(){return{pre:function(b,e,f,g){function h(){var a=b.col.compiledElementFn;a(b,function(a,b){e.append(a)})}if(g&&b.col.compiledElementFn)h();else if(g&&!b.col.compiledElementFn)b.col.getCompiledElementFn().then(function(a){a(b,function(a,b){e.append(a)})});else{var i=b.col.cellTemplate.replace(d.MODEL_COL_FIELD,"row.entity."+c.preEval(b.col.field)).replace(d.COL_FIELD,"grid.getCellValue(row, col)"),j=a(i)(b);e.append(j)}},post:function(a,b,c,e){var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.cellClass)?a.col.cellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.cellClass,d.addClass(g)};a.col.cellClass&&h();var i=a.grid.registerDataChangeCallback(h,[d.dataChange.COLUMN,d.dataChange.EDIT]),j=function(c,d){if(c!==d){(g||a.col.cellClass)&&h();var e=a.col.getColClass(!1);e!==f&&(b.removeClass(f),b.addClass(e),f=e)}},k=a.$watch("row",j),l=function(){i(),k()};a.$on("$destroy",l),b.on("$destroy",l)}}}};return e}]),function(){angular.module("ui.grid").service("uiGridColumnMenuService",["i18nService","uiGridConstants","gridUtil",function(a,b,c){var d={initialize:function(a,b){a.grid=b.grid,b.columnMenuScope=a,a.menuShown=!1},setColMenuItemWatch:function(a){var b=a.$watch("col.menuItems",function(b){"undefined"!=typeof b&&b&&angular.isArray(b)?(b.forEach(function(b){"undefined"!=typeof b.context&&b.context||(b.context={}),b.context.col=a.col}),a.menuItems=a.defaultMenuItems.concat(b)):a.menuItems=a.defaultMenuItems});a.$on("$destroy",b)},sortable:function(a){return a.grid.options.enableSorting&&"undefined"!=typeof a.col&&a.col&&a.col.enableSorting?!0:!1},isActiveSort:function(a,b){return"undefined"!=typeof a.col&&"undefined"!=typeof a.col.sort&&"undefined"!=typeof a.col.sort.direction&&a.col.sort.direction===b},suppressRemoveSort:function(a){return a.col&&a.col.suppressRemoveSort?!0:!1},hideable:function(a){return"undefined"!=typeof a.col&&a.col&&a.col.colDef&&a.col.colDef.enableHiding===!1?!1:!0},getDefaultMenuItems:function(c){return[{title:a.getSafeText("sort.ascending"),icon:"ui-grid-icon-sort-alt-up",action:function(a){a.stopPropagation(),c.sortColumn(a,b.ASC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.ASC)}},{title:a.getSafeText("sort.descending"),icon:"ui-grid-icon-sort-alt-down",action:function(a){a.stopPropagation(),c.sortColumn(a,b.DESC)},shown:function(){return d.sortable(c)},active:function(){return d.isActiveSort(c,b.DESC)}},{title:a.getSafeText("sort.remove"),icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),c.unsortColumn()},shown:function(){return d.sortable(c)&&"undefined"!=typeof c.col&&"undefined"!=typeof c.col.sort&&"undefined"!=typeof c.col.sort.direction&&null!==c.col.sort.direction&&!d.suppressRemoveSort(c)}},{title:a.getSafeText("column.hide"),icon:"ui-grid-icon-cancel",shown:function(){return d.hideable(c)},action:function(a){a.stopPropagation(),c.hideColumn()}}]},getColumnElementPosition:function(a,b,d){var e={};return e.left=d[0].offsetLeft,e.top=d[0].offsetTop,e.parentLeft=d[0].offsetParent.offsetLeft,e.offset=0,b.grid.options.offsetLeft&&(e.offset=b.grid.options.offsetLeft),e.height=c.elementHeight(d,!0),e.width=c.elementWidth(d,!0),e},repositionMenu:function(a,b,d,e,f){var g=e[0].querySelectorAll(".ui-grid-menu"),h=c.closestElm(f,".ui-grid-render-container"),i=h.getBoundingClientRect().left-a.grid.element[0].getBoundingClientRect().left,j=h.querySelectorAll(".ui-grid-viewport")[0].scrollLeft,k=b.lastMenuWidth?b.lastMenuWidth:a.lastMenuWidth?a.lastMenuWidth:170,l=b.lastMenuPaddingRight?b.lastMenuPaddingRight:a.lastMenuPaddingRight?a.lastMenuPaddingRight:10;if(0!==g.length){var m=g[0].querySelectorAll(".ui-grid-menu-mid");0===m.length||angular.element(m).hasClass("ng-hide")||(k=c.elementWidth(g,!0),a.lastMenuWidth=k,b.lastMenuWidth=k,l=parseInt(c.getStyles(angular.element(g)[0]).paddingRight,10),a.lastMenuPaddingRight=l,b.lastMenuPaddingRight=l)}var n=d.left+i-j+d.parentLeft+d.width-k+l;n<d.offset&&(n=d.offset),e.css("left",n+"px"),e.css("top",d.top+d.height+"px")}};return d}]).directive("uiGridColumnMenu",["$timeout","gridUtil","uiGridConstants","uiGridColumnMenuService","$document",function(a,b,c,d,e){var f={priority:0,scope:!0,require:"^uiGrid",templateUrl:"ui-grid/uiGridColumnMenu",replace:!0,link:function(f,g,h,i){d.initialize(f,i),f.defaultMenuItems=d.getDefaultMenuItems(f),f.menuItems=f.defaultMenuItems,d.setColMenuItemWatch(f),f.showMenu=function(a,b,c){f.col=a;var e=d.getColumnElementPosition(f,a,b);f.menuShown?(f.colElement=b,f.colElementPosition=e,f.hideThenShow=!0,f.$broadcast("hide-menu",{originalEvent:c})):(f.menuShown=!0,d.repositionMenu(f,a,e,g,b),f.colElement=b,f.colElementPosition=e,f.$broadcast("show-menu",{originalEvent:c}))},f.hideMenu=function(a){f.menuShown=!1,a||f.$broadcast("hide-menu")},f.$on("menu-hidden",function(){f.hideThenShow?(delete f.hideThenShow,d.repositionMenu(f,f.col,f.colElementPosition,g,f.colElement),f.$broadcast("show-menu"),f.menuShown=!0):(f.hideMenu(!0),f.col&&b.focus.bySelector(e,".ui-grid-header-cell."+f.col.getColClass()+" .ui-grid-column-menu-button",f.col.grid,!1))}),f.$on("menu-shown",function(){a(function(){d.repositionMenu(f,f.col,f.colElementPosition,g,f.colElement),b.focus.bySelector(e,".ui-grid-menu-items .ui-grid-menu-item",!0),delete f.colElementPosition,delete f.columnElement},200)}),f.sortColumn=function(a,b){a.stopPropagation(),f.grid.sortColumn(f.col,b,!0).then(function(){f.grid.refresh(),f.hideMenu()})},f.unsortColumn=function(){f.col.unsort(),f.grid.refresh(),f.hideMenu()};var j=function(){a(function(){var a,c=function(){return b.focus.byId("grid-menu",f.grid)};f.grid.columns.some(function(b,c){return angular.equals(b,f.col)?(a=c,!0):void 0});var d;if(f.grid.columns.some(function(b,c){if(!b.visible)return!1;if(a>c)d=b;else{if(c>a&&!d)return d=b,!0;if(c>a&&d)return!0}}),d){var g=d.getColClass();b.focus.bySelector(e,".ui-grid-header-cell."+g+" .ui-grid-header-cell-primary-focus",!0).then(angular.noop,function(a){return"canceled"!==a?c():void 0})}else c()})};f.hideColumn=function(){f.col.colDef.visible=!1,f.col.visible=!1,f.grid.queueGridRefresh(),f.hideMenu(),f.grid.api.core.notifyDataChange(c.dataChange.COLUMN),f.grid.api.core.raise.columnVisibilityChanged(f.col),j()}},controller:["$scope",function(a){var b=this;a.$watch("menuItems",function(a){b.menuItems=a})}]};return f}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFilter",["$compile","$templateCache","i18nService","gridUtil",function(a,b,c,d){return{compile:function(){return{pre:function(b,c,d,e){b.col.updateFilters=function(d){if(c.children().remove(),d){var e=b.col.filterHeaderTemplate;c.append(a(e)(b))}},b.$on("$destroy",function(){delete b.col.updateFilters})},post:function(a,b,e,f){a.aria=c.getSafeText("headerCell.aria"),a.removeFilter=function(a,c){a.term=null,d.focus.bySelector(b,".ui-grid-filter-input-"+c)}}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooterCell",["$timeout","gridUtil","uiGridConstants","$compile",function(a,b,c,d){var e={priority:0,scope:{col:"=",row:"=",renderIndex:"="},replace:!0,require:"^uiGrid",compile:function(a,b,e){return{pre:function(a,b,c,e){var f=d(a.col.footerCellTemplate)(a);b.append(f)},post:function(a,b,d,e){a.grid=e.grid;var f=a.col.getColClass(!1);b.addClass(f);var g,h=function(c){var d=b;g&&(d.removeClass(g),g=null),g=angular.isFunction(a.col.footerCellClass)?a.col.footerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.footerCellClass,d.addClass(g)};a.col.footerCellClass&&h(),a.col.updateAggregationValue();var i=a.grid.registerDataChangeCallback(h,[c.dataChange.COLUMN]);a.grid.api.core.on.rowsRendered(a,a.col.updateAggregationValue),a.grid.api.core.on.rowsRendered(a,h),a.$on("$destroy",i)}}}};return e}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){var g=f[0],h=f[1];a.grid=g.grid,a.colContainer=h.colContainer,h.footer=c;var i=a.grid.options.footerTemplate;d.getTemplate(i).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.append(f),h){var g=c[0].getElementsByClassName("ui-grid-footer-viewport")[0];g&&(h.footerViewport=g)}})},post:function(a,b,c,e){var f=e[0],g=e[1];f.grid;d.disableAnimations(b),g.footer=b;var h=b[0].getElementsByClassName("ui-grid-footer-viewport")[0];h&&(g.footerViewport=h)}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGridFooter",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout",function(a,b,c,d,e){return{restrict:"EA",replace:!0,require:"^uiGrid",scope:!0,compile:function(a,c){return{pre:function(a,c,e,f){a.grid=f.grid;var g=a.grid.options.gridFooterTemplate;d.getTemplate(g).then(function(d){var e=angular.element(d),f=b(e)(a);c.append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridGroupPanel",["$compile","uiGridConstants","gridUtil",function(a,b,c){var d="ui-grid/ui-grid-group-panel";return{restrict:"EA",replace:!0,require:"?^uiGrid",scope:!1,compile:function(b,e){return{pre:function(b,e,f,g){var h=b.grid.options.groupPanelTemplate||d;c.getTemplate(h).then(function(c){var d=angular.element(c),f=a(d)(b);e.append(f)})},post:function(a,b,c,d){b.bind("$destroy",function(){})}}}}}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeaderCell",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","ScrollEvent","i18nService",function(a,b,c,d,e,f,g,h){var i=500,j=500,k={priority:0,scope:{col:"=",row:"=",renderIndex:"="},require:["^uiGrid","^uiGridRenderContainer"],replace:!0,compile:function(){return{pre:function(b,c,d){var e=a(b.col.headerCellTemplate)(b);c.append(e)},post:function(a,c,e,g){var k=g[0],l=g[1];a.i18n={headerCell:h.getSafeText("headerCell"),sort:h.getSafeText("sort")},a.isSortPriorityVisible=function(){return angular.isNumber(a.col.sort.priority)&&a.grid.columns.some(function(b,c){return angular.isNumber(b.sort.priority)&&b!==a.col})},a.getSortDirectionAriaLabel=function(){var b=a.col,c=b.sort.direction===f.ASC?a.i18n.sort.ascending:b.sort.direction===f.DESC?a.i18n.sort.descending:a.i18n.sort.none,d=c;return a.isSortPriorityVisible()&&(d=d+". "+a.i18n.headerCell.priority+" "+b.sort.priority),d},a.grid=k.grid,a.renderContainer=k.grid.renderContainers[l.containerId];var m=a.col.getColClass(!1);c.addClass(m),a.menuShown=!1,a.asc=f.ASC,a.desc=f.DESC;var n,o,p=(angular.element(c[0].querySelectorAll(".ui-grid-header-cell-menu")),angular.element(c[0].querySelectorAll(".ui-grid-cell-contents"))),q=[];a.downFn=function(e){e.stopPropagation(),"undefined"!=typeof e.originalEvent&&void 0!==e.originalEvent&&(e=e.originalEvent),e.button&&0!==e.button||(o=e.pageX,a.mousedownStartTime=(new Date).getTime(),a.mousedownTimeout=b(function(){},i),a.mousedownTimeout.then(function(){a.colMenu&&k.columnMenuScope.showMenu(a.col,c,e)}),k.fireEvent(f.events.COLUMN_HEADER_CLICK,{event:e,columnName:a.col.colDef.name}),a.offAllEvents(),"touchstart"===e.type?(d.on("touchend",a.upFn),d.on("touchmove",a.moveFn)):"mousedown"===e.type&&(d.on("mouseup",a.upFn),d.on("mousemove",a.moveFn)))},a.upFn=function(c){c.stopPropagation(),b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type);var d=(new Date).getTime(),e=d-a.mousedownStartTime;e>i||a.sortable&&a.handleClick(c)},a.moveFn=function(c){var d=c.pageX-o;0!==d&&(b.cancel(a.mousedownTimeout),a.offAllEvents(),a.onDownEvents(c.type))},a.clickFn=function(b){b.stopPropagation(),p.off("click",a.clickFn)},a.offAllEvents=function(){p.off("touchstart",a.downFn),p.off("mousedown",a.downFn),d.off("touchend",a.upFn),d.off("mouseup",a.upFn),d.off("touchmove",a.moveFn),d.off("mousemove",a.moveFn),p.off("click",a.clickFn)},a.onDownEvents=function(c){switch(c){case"touchmove":case"touchend":p.on("click",a.clickFn),p.on("touchstart",a.downFn),b(function(){p.on("mousedown",a.downFn)},j);break;case"mousemove":case"mouseup":p.on("click",a.clickFn),p.on("mousedown",a.downFn),b(function(){p.on("touchstart",a.downFn)},j);break;default:p.on("click",a.clickFn),p.on("touchstart",a.downFn),p.on("mousedown",a.downFn)}};var r=function(d){var e=c;n&&(e.removeClass(n),n=null),n=angular.isFunction(a.col.headerCellClass)?a.col.headerCellClass(a.grid,a.row,a.col,a.rowRenderIndex,a.colRenderIndex):a.col.headerCellClass,e.addClass(n),b(function(){var b=a.grid.renderContainers.right?a.grid.renderContainers.right:a.grid.renderContainers.body;a.isLastCol=a.col===b.visibleColumnCache[b.visibleColumnCache.length-1]}),a.col.enableSorting?a.sortable=!0:a.sortable=!1;var g=a.filterable;k.grid.options.enableFiltering&&a.col.enableFiltering?a.filterable=!0:a.filterable=!1,g!==a.filterable&&("undefined"!=typeof a.col.updateFilters&&a.col.updateFilters(a.filterable),a.filterable?(a.col.filters.forEach(function(b,c){q.push(a.$watch("col.filters["+c+"].term",function(a,b){a!==b&&(k.grid.api.core.raise.filterChanged(),k.grid.api.core.notifyDataChange(f.dataChange.COLUMN),k.grid.queueGridRefresh())}))}),a.$on("$destroy",function(){q.forEach(function(a){a()})})):q.forEach(function(a){a()})),a.col.grid.options&&a.col.grid.options.enableColumnMenus!==!1&&a.col.colDef&&a.col.colDef.enableColumnMenu!==!1?a.colMenu=!0:a.colMenu=!1,a.offAllEvents(),(a.sortable||a.colMenu)&&(a.onDownEvents(),a.$on("$destroy",function(){a.offAllEvents()}))};r();var s=a.grid.registerDataChangeCallback(r,[f.dataChange.COLUMN]);a.$on("$destroy",s),a.handleClick=function(b){var c=!1;b.shiftKey&&(c=!0),k.grid.sortColumn(a.col,c).then(function(){k.columnMenuScope&&k.columnMenuScope.hideMenu(),k.grid.refresh()})},a.toggleMenu=function(b){b.stopPropagation(),k.columnMenuScope.menuShown&&k.columnMenuScope.col===a.col?k.columnMenuScope.hideMenu():k.columnMenuScope.showMenu(a.col,c)}}}}};return k}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridHeader",["$templateCache","$compile","uiGridConstants","gridUtil","$timeout","ScrollEvent",function(a,b,c,d,e,f){var g="ui-grid/ui-grid-header",h="ui-grid/ui-grid-no-header";return{restrict:"EA",replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:!0,compile:function(a,c){return{pre:function(a,c,e,i){function j(){m.header=m.colContainer.header=c;var a=c[0].getElementsByClassName("ui-grid-header-canvas");a.length>0?m.headerCanvas=m.colContainer.headerCanvas=a[0]:m.headerCanvas=null}function k(a){if(!l.grid.isScrollingHorizontally){var b=d.normalizeScrollLeft(m.headerViewport,l.grid),c=m.colContainer.scrollHorizontal(b),e=new f(l.grid,null,m.colContainer,f.Sources.ViewPortScroll);e.newScrollLeft=b,c>-1&&(e.x={percentage:c}),l.grid.scrollContainers(null,e)}}var l=i[0],m=i[1];a.grid=l.grid,a.colContainer=m.colContainer,j();var n;n=a.grid.options.showHeader?a.grid.options.headerTemplate?a.grid.options.headerTemplate:g:h,d.getTemplate(n).then(function(d){var e=angular.element(d),f=b(e)(a);if(c.replaceWith(f),c=f,j(),m){var g=c[0].getElementsByClassName("ui-grid-header-viewport")[0];g&&(m.headerViewport=g,angular.element(g).on("scroll",k),a.$on("$destroy",function(){angular.element(g).off("scroll",k)}))}a.grid.queueRefresh()})},post:function(a,b,c,e){function f(){var a=h.colContainer.visibleColumnCache,b="",c=0;return a.forEach(function(a){b+=a.getColClassDefinition(),c+=a.drawnWidth}),h.colContainer.canvasWidth=c,b}var g=e[0],h=e[1];g.grid;d.disableAnimations(b),h.header=b;var i=b[0].getElementsByClassName("ui-grid-header-viewport")[0];i&&(h.headerViewport=i),g&&g.grid.registerStyleComputation({priority:15,func:f})}}}}}])}(),function(){angular.module("ui.grid").service("uiGridGridMenuService",["gridUtil","i18nService","uiGridConstants",function(a,b,c){var d={initialize:function(a,b){b.gridMenuScope=a,a.grid=b,a.registeredMenuItems=[],a.$on("$destroy",function(){a.grid&&a.grid.gridMenuScope&&(a.grid.gridMenuScope=null),a.grid&&(a.grid=null),a.registeredMenuItems&&(a.registeredMenuItems=null)}),a.registeredMenuItems=[],b.api.registerMethod("core","addToGridMenu",d.addToGridMenu),b.api.registerMethod("core","removeFromGridMenu",d.removeFromGridMenu)},addToGridMenu:function(b,c){angular.isArray(c)?b.gridMenuScope?(b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems?b.gridMenuScope.registeredMenuItems:[],b.gridMenuScope.registeredMenuItems=b.gridMenuScope.registeredMenuItems.concat(c)):a.logError("Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid"):a.logError("addToGridMenu: menuItems must be an array, and is not, not adding any items")},removeFromGridMenu:function(b,c){var d=-1;b&&b.gridMenuScope&&b.gridMenuScope.registeredMenuItems.forEach(function(b,e){b.id===c&&(d>-1?a.logError("removeFromGridMenu: found multiple items with the same id, removing only the last"):d=e)}),d>-1&&b.gridMenuScope.registeredMenuItems.splice(d,1)},getMenuItems:function(c){var e=[];c.grid.options.gridMenuCustomItems&&(angular.isArray(c.grid.options.gridMenuCustomItems)?e=e.concat(c.grid.options.gridMenuCustomItems):a.logError("gridOptions.gridMenuCustomItems must be an array, and is not"));var f=[{title:b.getSafeText("gridMenu.clearAllFilters"),action:function(a){c.grid.clearAllFilters()},shown:function(){return c.grid.options.enableFiltering},order:100}];return e=e.concat(f),e=e.concat(c.registeredMenuItems),c.grid.options.gridMenuShowHideColumns!==!1&&(e=e.concat(d.showHideColumns(c))),e.sort(function(a,b){return a.order-b.order}),e},showHideColumns:function(a){var c=[];return a.grid.options.columnDefs&&0!==a.grid.options.columnDefs.length&&0!==a.grid.columns.length?(c.push({title:b.getSafeText("gridMenu.columns"),order:300}),a.grid.options.gridMenuTitleFilter=a.grid.options.gridMenuTitleFilter?a.grid.options.gridMenuTitleFilter:function(a){return a},a.grid.options.columnDefs.forEach(function(b,e){if(b.enableHiding!==!1){var f={icon:"ui-grid-icon-ok",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e};d.setMenuItemTitle(f,b,a.grid),c.push(f),f={icon:"ui-grid-icon-cancel",action:function(a){a.stopPropagation(),d.toggleColumnVisibility(this.context.gridCol)},shown:function(){return!(this.context.gridCol.colDef.visible===!0||void 0===this.context.gridCol.colDef.visible)},context:{gridCol:a.grid.getColumn(b.name||b.field)},leaveOpen:!0,order:301+2*e+1},d.setMenuItemTitle(f,b,a.grid),c.push(f)}}),c):c},setMenuItemTitle:function(b,c,d){var e=d.options.gridMenuTitleFilter(c.displayName||a.readableColumnName(c.name)||c.field);"string"==typeof e?b.title=e:e.then?(b.title="",e.then(function(a){b.title=a},function(a){b.title=a})):(a.logError("Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config"),b.title="badconfig")},toggleColumnVisibility:function(a){a.colDef.visible=!(a.colDef.visible===!0||void 0===a.colDef.visible),a.grid.refresh(),a.grid.api.core.notifyDataChange(c.dataChange.COLUMN),a.grid.api.core.raise.columnVisibilityChanged(a)}};return d}]).directive("uiGridMenuButton",["gridUtil","uiGridConstants","uiGridGridMenuService","i18nService",function(a,b,c,d){return{priority:0,scope:!0,require:["^uiGrid"],templateUrl:"ui-grid/ui-grid-menu-button",replace:!0,link:function(b,e,f,g){var h=g[0];b.i18n={aria:d.getSafeText("gridMenu.aria")},c.initialize(b,h.grid),b.shown=!1,b.toggleMenu=function(){b.shown?(b.$broadcast("hide-menu"),b.shown=!1):(b.menuItems=c.getMenuItems(b),b.$broadcast("show-menu"),b.shown=!0)},b.$on("menu-hidden",function(){b.shown=!1,a.focus.bySelector(e,".ui-grid-icon-container")})}}}])}(),function(){angular.module("ui.grid").directive("uiGridMenu",["$compile","$timeout","$window","$document","gridUtil","uiGridConstants","i18nService",function(a,b,c,d,e,f,g){var h={priority:0,scope:{menuItems:"=",autoHide:"=?"},require:"?^uiGrid",templateUrl:"ui-grid/uiGridMenu",replace:!1,link:function(d,h,i,j){if(d.dynamicStyles="",j&&j.grid&&j.grid.options&&j.grid.options.gridMenuTemplate){var k=j.grid.options.gridMenuTemplate;e.getTemplate(k).then(function(b){var c=angular.element(b),e=a(c)(d);h.replaceWith(e)})}var l=function(a){var b=a-j.grid.headerHeight-20;d.dynamicStyles=[".grid"+j.grid.id+" .ui-grid-menu-mid {","max-height: "+b+"px;","}"].join(" ")};j&&(l(j.grid.gridHeight),j.grid.api.core.on.gridDimensionChanged(d,function(a,b,c,d){l(c)})),d.i18n={close:g.getSafeText("columnMenu.close")},d.showMenu=function(a,c){d.shown?d.shownMid||(d.shownMid=!0,d.$emit("menu-shown")):(d.shown=!0,b(function(){d.shownMid=!0,d.$emit("menu-shown")}));var f="click";c&&c.originalEvent&&c.originalEvent.type&&"touchstart"===c.originalEvent.type&&(f=c.originalEvent.type),angular.element(document).off("click touchstart",m),h.off("keyup",n),h.off("keydown",o),b(function(){angular.element(document).on(f,m),h.on("keyup",n),h.on("keydown",o)}),e.focus.bySelector(h,"button[type=button]",!0)},d.hideMenu=function(a){d.shown&&(d.shownMid=!1,b(function(){d.shownMid||(d.shown=!1,d.$emit("menu-hidden"))},200)),angular.element(document).off("click touchstart",m),h.off("keyup",n),h.off("keydown",o)},d.$on("hide-menu",function(a,b){d.hideMenu(a,b)}),d.$on("show-menu",function(a,b){d.showMenu(a,b)});var m=function(){d.shown&&d.$apply(function(){d.hideMenu()})},n=function(a){27===a.keyCode&&d.hideMenu()},o=function(a){var b=function(b){return b.focus(),a.preventDefault(),!1};if(9===a.keyCode){var c,d,e=h[0].querySelectorAll("button:not(.ng-hide)");e.length>0&&(c=e[0],d=e[e.length-1],a.target!==d||a.shiftKey?a.target===c&&a.shiftKey&&b(d):b(c))}};("undefined"==typeof d.autoHide||void 0===d.autoHide)&&(d.autoHide=!0),d.autoHide&&angular.element(c).on("resize",m),d.$on("$destroy",function(){angular.element(c).off("resize",m),angular.element(document).off("click touchstart",m),h.off("keyup",n),h.off("keydown",o)}),j&&d.$on("$destroy",j.grid.api.core.on.scrollBegin(d,m)),d.$on("$destroy",d.$on(f.events.ITEM_DRAGGING,m))}};return h}]).directive("uiGridMenuItem",["gridUtil","$compile","i18nService",function(a,b,c){var d={priority:0,scope:{name:"=",active:"=",action:"=",icon:"=",shown:"=",context:"=",templateUrl:"=",leaveOpen:"=",screenReaderOnly:"="},require:["?^uiGrid"],templateUrl:"ui-grid/uiGridMenuItem",replace:!1,compile:function(){return{pre:function(c,d){c.templateUrl&&a.getTemplate(c.templateUrl).then(function(a){var e=angular.element(a),f=b(e)(c);d.replaceWith(f)})},post:function(b,d,e,f){var g=f[0];("undefined"==typeof b.shown||null===b.shown)&&(b.shown=function(){return!0}),b.itemShown=function(){var a={};return b.context&&(a.context=b.context),"undefined"!=typeof g&&g&&(a.grid=g.grid),b.shown.call(a)},b.itemAction=function(c,e){if(c.stopPropagation(),"function"==typeof b.action){var f={};b.context&&(f.context=b.context),"undefined"!=typeof g&&g&&(f.grid=g.grid),b.action.call(f,c,e),b.leaveOpen?a.focus.bySelector(angular.element(a.closestElm(d,".ui-grid-menu-items")),"button[type=button]",!0):b.$emit("hide-menu")}},b.i18n=c.get()}}}};return d}])}(),function(){"use strict";var a=angular.module("ui.grid");angular.forEach([{tag:"Src",method:"attr"},{tag:"Text",method:"text"},{tag:"Href",method:"attr"},{tag:"Class",method:"addClass"},{tag:"Html",method:"html"},{tag:"Alt",method:"attr"},{tag:"Style",method:"css"},{tag:"Value",method:"attr"},{tag:"Id",method:"attr"},{tag:"Id",directiveName:"IdGrid",method:"attr",appendGridId:!0},{tag:"Title",method:"attr"},{tag:"Label",method:"attr",aria:!0},{tag:"Labelledby",method:"attr",aria:!0},{tag:"Labelledby",directiveName:"LabelledbyGrid",appendGridId:!0,method:"attr",aria:!0},{tag:"Describedby",method:"attr",aria:!0},{tag:"Describedby",directiveName:"DescribedbyGrid",appendGridId:!0,method:"attr",aria:!0}],function(b){var c="uiGridOneBind",d=(b.aria?c+"Aria":c)+(b.directiveName?b.directiveName:b.tag);a.directive(d,["gridUtil",function(a){return{restrict:"A",require:["?uiGrid","?^uiGrid"],link:function(c,e,f,g){var h=function(b){var e;if(c.grid)e=c.grid;else if(c.col&&c.col.grid)e=c.col.grid;else if(!g.some(function(a){return a&&a.grid?(e=a.grid,!0):void 0}))throw a.logError("["+d+"] A valid grid could not be found to bind id. Are you using this directive within the correct scope? Trying to generate id: [gridID]-"+b),new Error("No valid grid could be found");if(e){var f=new RegExp(e.id.toString());f.test(b)||(b=e.id.toString()+"-"+b)}return b},i=c.$watch(f[d],function(a){if(a){if(b.appendGridId){var c=null;angular.forEach(a.split(" "),function(a){c=(c?c+" ":"")+h(a)}),a=c}switch(b.method){case"attr":b.aria?e[b.method]("aria-"+b.tag.toLowerCase(),a):e[b.method](b.tag.toLowerCase(),a);break;case"addClass":if(angular.isObject(a)&&!angular.isArray(a)){var d=[],f=!1;if(angular.forEach(a,function(a,b){null!==a&&"undefined"!=typeof a&&(f=!0,a&&d.push(b))}),!f)return;a=d}if(!a)return;e.addClass(angular.isArray(a)?a.join(" "):a);break;default:e[b.method](a)}i()}},!0)}}}])})}(),function(){"use strict";var a=angular.module("ui.grid");a.directive("uiGridRenderContainer",["$timeout","$document","uiGridConstants","gridUtil","ScrollEvent",function(a,b,c,d,e){return{replace:!0,transclude:!0,templateUrl:"ui-grid/uiGridRenderContainer",require:["^uiGrid","uiGridRenderContainer"],scope:{containerId:"=",rowContainerName:"=",colContainerName:"=",bindScrollHorizontal:"=",bindScrollVertical:"=",enableVerticalScrollbar:"=",enableHorizontalScrollbar:"="},controller:"uiGridRenderContainer as RenderContainer",compile:function(){return{pre:function(a,b,c,d){var e=d[0],f=d[1],g=a.grid=e.grid;if(!a.rowContainerName)throw"No row render container name specified";if(!a.colContainerName)throw"No column render container name specified";if(!g.renderContainers[a.rowContainerName])throw"Row render container '"+a.rowContainerName+"' is not registered.";if(!g.renderContainers[a.colContainerName])throw"Column render container '"+a.colContainerName+"' is not registered.";var h=a.rowContainer=g.renderContainers[a.rowContainerName],i=a.colContainer=g.renderContainers[a.colContainerName];f.containerId=a.containerId,f.rowContainer=h,f.colContainer=i},post:function(a,b,c,f){function g(){var b="",c=l.canvasWidth,d=l.getViewportWidth(),e=k.getCanvasHeight(),f=k.getViewportHeight();l.needsHScrollbarPlaceholder()&&(f-=j.scrollbarHeight);var g,i;return g=i=l.getHeaderViewportWidth(),b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-canvas { width: "+c+"px; height: "+e+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+=o.explicitHeaderCanvasHeight?"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: "+o.explicitHeaderCanvasHeight+"px; }":"\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-canvas { height: inherit; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-viewport { width: "+d+"px; height: "+f+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-header-viewport { width: "+g+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-canvas { width: "+(c+j.scrollbarWidth)+"px; }",b+="\n .grid"+h.grid.id+" .ui-grid-render-container-"+a.containerId+" .ui-grid-footer-viewport { width: "+i+"px; }"}var h=f[0],i=f[1],j=h.grid,k=i.rowContainer,l=i.colContainer,m=null,n=null,o=j.renderContainers[a.containerId];b.addClass("ui-grid-render-container-"+a.containerId),d.on.mousewheel(b,function(a){var b=new e(j,k,l,e.Sources.RenderContainerMouseWheel);if(0!==a.deltaY){var c=-1*a.deltaY*a.deltaFactor;m=i.viewport[0].scrollTop,b.verticalScrollLength=k.getVerticalScrollLength();var f=(m+c)/b.verticalScrollLength;f>=1&&m<b.verticalScrollLength&&(i.viewport[0].scrollTop=b.verticalScrollLength),0>f?f=0:f>1&&(f=1),b.y={percentage:f,pixels:c}}if(0!==a.deltaX){var g=a.deltaX*a.deltaFactor;n=d.normalizeScrollLeft(i.viewport,j),b.horizontalScrollLength=l.getCanvasWidth()-l.getViewportWidth();var h=(n+g)/b.horizontalScrollLength;0>h?h=0:h>1&&(h=1),b.x={percentage:h,pixels:g}}0!==a.deltaY&&(b.atTop(m)||b.atBottom(m))||0!==a.deltaX&&(b.atLeft(n)||b.atRight(n))||(a.preventDefault(),a.stopPropagation(),b.fireThrottledScrollingEvent("",b))}),b.bind("$destroy",function(){b.unbind("keydown"),["touchstart","touchmove","touchend","keydown","wheel","mousewheel","DomMouseScroll","MozMousePixelScroll"].forEach(function(a){b.unbind(a)})}),h.grid.registerStyleComputation({priority:6,func:g})}}}}}]),a.controller("uiGridRenderContainer",["$scope","gridUtil",function(a,b){}])}(),function(){"use strict";angular.module("ui.grid").directive("uiGridRow",["gridUtil",function(a){return{replace:!0,require:["^uiGrid","^uiGridRenderContainer"],scope:{row:"=uiGridRow",rowRenderIndex:"="},compile:function(){return{pre:function(a,b,c,d){function e(){a.row.getRowTemplateFn.then(function(c){var d=a.$new();c(d,function(a,c){h&&(h.remove(),i.$destroy()),b.empty().append(a),h=a,i=d})})}var f=d[0],g=d[1];f.grid;a.grid=f.grid,a.colContainer=g.colContainer;var h,i;e(),a.$watch("row.getRowTemplateFn",function(a,b){a!==b&&e()})},post:function(a,b,c,d){}}}}}])}(),function(){angular.module("ui.grid").directive("uiGridStyle",["gridUtil","$interpolate",function(a,b){return{link:function(a,c,d,e){var f=b(c.text(),!0);f&&a.$watch(f,function(a){c.text(a)})}}}])}(),
-function(){"use strict";angular.module("ui.grid").directive("uiGridViewport",["gridUtil","ScrollEvent","uiGridConstants","$log",function(a,b,c,d){return{replace:!0,scope:{},controllerAs:"Viewport",templateUrl:"ui-grid/uiGridViewport",require:["^uiGrid","^uiGridRenderContainer"],link:function(c,d,e,f){function g(e){var f=d[0].scrollTop,g=a.normalizeScrollLeft(d,p),h=n.scrollVertical(f),i=o.scrollHorizontal(g),j=new b(p,n,o,b.Sources.ViewPortScroll);j.newScrollLeft=g,j.newScrollTop=f,i>-1&&(j.x={percentage:i}),h>-1&&(j.y={percentage:h}),p.scrollContainers(c.$parent.containerId,j)}function h(a){m.prevScrollArgs=a;var b=a.getNewScrollTop(n,m.viewport);d[0].scrollTop=b}function i(b){m.prevScrollArgs=b;var c=b.getNewScrollLeft(o,m.viewport);d[0].scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p)}function j(b){var c=b.getNewScrollLeft(o,m.viewport);m.headerViewport&&(m.headerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}function k(b){var c=b.getNewScrollLeft(o,m.viewport);m.footerViewport&&(m.footerViewport.scrollLeft=a.denormalizeScrollLeft(m.viewport,c,p))}var l=f[0],m=f[1];c.containerCtrl=m;var n=m.rowContainer,o=m.colContainer,p=l.grid;c.grid=l.grid,c.rowContainer=m.rowContainer,c.colContainer=m.colContainer,m.viewport=d,p&&p.options&&p.options.customScroller?p.options.customScroller(d,g):d.on("scroll",g);c.$parent.bindScrollVertical&&p.addVerticalScrollSync(c.$parent.containerId,h),c.$parent.bindScrollHorizontal&&(p.addHorizontalScrollSync(c.$parent.containerId,i),p.addHorizontalScrollSync(c.$parent.containerId+"header",j),p.addHorizontalScrollSync(c.$parent.containerId+"footer",k)),c.$on("$destroy",function(){d.off()})},controller:["$scope",function(a){this.rowStyle=function(b){var c=a.rowContainer,d=a.colContainer,e={};if(0!==c.currentTopRow){var f="translateY("+c.currentTopRow*c.grid.options.rowHeight+"px)";e.transform=f,e["-webkit-transform"]=f,e["-ms-transform"]=f}return 0!==d.currentFirstColumn&&(d.grid.isRTL()?e["margin-right"]=d.columnOffset+"px":e["margin-left"]=d.columnOffset+"px"),e}}]}}])}(),function(){angular.module("ui.grid").directive("uiGridVisible",function(){return function(a,b,c){a.$watch(c.uiGridVisible,function(a){b[a?"removeClass":"addClass"]("ui-grid-invisible")})}})}(),function(){"use strict";function a(a,b,c,d,e,f){return{templateUrl:"ui-grid/ui-grid",scope:{uiGrid:"="},replace:!0,transclude:!0,controller:"uiGridController",compile:function(){return{post:function(a,b,g,h){function i(){b[0].offsetWidth<=0&&p>q?(setTimeout(i,o),q++):c(k)}function j(){angular.element(d).on("resize",m),b.on("$destroy",function(){angular.element(d).off("resize",m)}),a.$watch(function(){return n.hasLeftContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)}),a.$watch(function(){return n.hasRightContainer()},function(a,b){a!==b&&n.refreshCanvas(!0)})}function k(){n.gridWidth=a.gridWidth=e.elementWidth(b),n.canvasWidth=h.grid.gridWidth,n.gridHeight=a.gridHeight=e.elementHeight(b),n.gridHeight<=n.options.rowHeight&&n.options.enableMinHeightCheck&&l(),n.refreshCanvas(!0)}function l(){var c=n.options.minRowsToShow*n.options.rowHeight,d=n.options.showHeader?n.options.headerRowHeight:0,g=n.calcFooterHeight(),h=0;n.options.enableHorizontalScrollbar===f.scrollbars.ALWAYS&&(h=e.getScrollbarWidth());var i=0;if(angular.forEach(n.options.columnDefs,function(a){a.hasOwnProperty("filter")?1>i&&(i=1):a.hasOwnProperty("filters")&&i<a.filters.length&&(i=a.filters.length)}),n.options.enableFiltering&&!i){var j=n.options.columnDefs.length&&n.options.columnDefs.every(function(a){return a.enableFiltering===!1});j||(i=1)}var k=i*d,l=d+c+g+h+k;b.css("height",l+"px"),n.gridHeight=a.gridHeight=e.elementHeight(b)}function m(c){n.gridWidth=a.gridWidth=e.elementWidth(b),n.gridHeight=a.gridHeight=e.elementHeight(b),n.refreshCanvas(!0)}var n=h.grid;h.scrollbars=[],n.element=b;var o=100,p=20,q=0;j(),k(),n.renderingComplete(),i()}}}}}angular.module("ui.grid").controller("uiGridController",["$scope","$element","$attrs","gridUtil","$q","uiGridConstants","$templateCache","gridClassFactory","$timeout","$parse","$compile",function(a,b,c,d,e,f,g,h,i,j,k){function l(b,c){b&&b!==c&&(n.grid.options.columnDefs=a.uiGrid.columnDefs,n.grid.buildColumns({orderByColumnDefs:!0}).then(function(){n.grid.preCompileCellTemplates(),n.grid.callDataChangeCallbacks(f.dataChange.COLUMN)}))}function m(b){var d=[];if(n.grid.options.fastWatch&&(b=angular.isString(a.uiGrid.data)?n.grid.appScope[a.uiGrid.data]:a.uiGrid.data),p=b,b){var g=n.grid.columns.length>(n.grid.rowHeaderColumns?n.grid.rowHeaderColumns.length:0);!g&&!c.uiGridColumns&&0===n.grid.options.columnDefs.length&&b.length>0&&n.grid.buildColumnDefsFromData(b),!g&&(n.grid.options.columnDefs.length>0||b.length>0)&&d.push(n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates()})),e.all(d).then(function(){n.grid.modifyRows(p).then(function(){n.grid.redrawInPlace(!0),a.$evalAsync(function(){n.grid.refreshCanvas(!0),n.grid.callDataChangeCallbacks(f.dataChange.ROW)})})})}}var n=this;n.grid=h.createGrid(a.uiGrid),n.grid.appScope=n.grid.appScope||a.$parent,b.addClass("grid"+n.grid.id),n.grid.rtl="rtl"===d.getStyles(b[0]).direction,a.grid=n.grid,c.uiGridColumns&&c.$observe("uiGridColumns",function(a){n.grid.options.columnDefs=a,n.grid.buildColumns().then(function(){n.grid.preCompileCellTemplates(),n.grid.refreshCanvas(!0)})});var o=[];n.grid.options.fastWatch?(n.uiGrid=a.uiGrid,angular.isString(a.uiGrid.data)?(o.push(a.$parent.$watch(a.uiGrid.data,m)),o.push(a.$parent.$watch(function(){return n.grid.appScope[a.uiGrid.data]?n.grid.appScope[a.uiGrid.data].length:void 0},m))):(o.push(a.$parent.$watch(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watch(function(){return a.uiGrid.data.length},function(){m(a.uiGrid.data)}))),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs},l)),o.push(a.$parent.$watch(function(){return a.uiGrid.columnDefs.length},function(){l(a.uiGrid.columnDefs)}))):(angular.isString(a.uiGrid.data)?o.push(a.$parent.$watchCollection(a.uiGrid.data,m)):o.push(a.$parent.$watchCollection(function(){return a.uiGrid.data},m)),o.push(a.$parent.$watchCollection(function(){return a.uiGrid.columnDefs},l)));var p,q=a.$watch(function(){return n.grid.styleComputations},function(){n.grid.refreshCanvas(!0)});a.$on("$destroy",function(){o.forEach(function(a){a()}),q()}),n.fireEvent=function(b,c){("undefined"==typeof c||void 0===c)&&(c={}),("undefined"==typeof c.grid||void 0===c.grid)&&(c.grid=n.grid),a.$broadcast(b,c)},n.innerCompile=function(b){k(b)(a)}}]),angular.module("ui.grid").directive("uiGrid",a),a.$inject=["$compile","$templateCache","$timeout","$window","gridUtil","uiGridConstants"]}(),function(){"use strict";angular.module("ui.grid").directive("uiGridPinnedContainer",["gridUtil",function(a){return{restrict:"EA",replace:!0,template:'<div class="ui-grid-pinned-container"><div ui-grid-render-container container-id="side" row-container-name="\'body\'" col-container-name="side" bind-scroll-vertical="true" class="{{ side }} ui-grid-render-container-{{ side }}"></div></div>',scope:{side:"=uiGridPinnedContainer"},require:"^uiGrid",compile:function(){return{post:function(a,b,c,d){function e(){var a=this,b=0;a.visibleColumnCache.forEach(function(a){b+=a.drawnWidth});var c=a.getViewportAdjustment();return b+=c.width}function f(){if("left"===a.side||"right"===a.side){for(var b=h.renderContainers[a.side].visibleColumnCache,c=0,d=0;d<b.length;d++){var e=b[d];c+=e.drawnWidth||e.width||0}return c}}function g(){var c="";return("left"===a.side||"right"===a.side)&&(i=f(),b.attr("style",null),c+=".grid"+h.id+" .ui-grid-pinned-container-"+a.side+", .grid"+h.id+" .ui-grid-pinned-container-"+a.side+" .ui-grid-render-container-"+a.side+" .ui-grid-viewport { width: "+i+"px; } "),c}var h=d.grid,i=0;b.addClass("ui-grid-pinned-container-"+a.side),("left"===a.side||"right"===a.side)&&(h.renderContainers[a.side].getViewportWidth=e),h.renderContainers.body.registerViewportAdjuster(function(b){return i=f(),b.width-=i,b.side=a.side,b}),h.registerStyleComputation({priority:15,func:g})}}}}}])}(),function(){angular.module("ui.grid").factory("Grid",["$q","$compile","$parse","gridUtil","uiGridConstants","GridOptions","GridColumn","GridRow","GridApi","rowSorter","rowSearcher","GridRenderContainer","$timeout","ScrollEvent",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n){function o(){}var p=function(a){function b(a){g.isScrollingVertically=!1,g.api.core.raise.scrollEnd(a),g.scrollDirection=e.scrollDirection.NONE}function c(a){g.isScrollingHorizontally=!1,g.api.core.raise.scrollEnd(a),g.scrollDirection=e.scrollDirection.NONE}var g=this;if(void 0===a||"undefined"==typeof a.id||!a.id)throw new Error("No ID provided. An ID must be given when creating a grid.");if(!/^[_a-zA-Z0-9-]+$/.test(a.id))throw new Error("Grid id '"+a.id+'" is invalid. It must follow CSS selector syntax rules.');g.id=a.id,delete a.id,g.options=f.initialize(a),g.appScope=g.options.appScopeProvider,g.headerHeight=g.options.headerRowHeight,g.footerHeight=g.calcFooterHeight(),g.columnFooterHeight=g.calcColumnFooterHeight(),g.rtl=!1,g.gridHeight=0,g.gridWidth=0,g.columnBuilders=[],g.rowBuilders=[],g.rowsProcessors=[],g.columnsProcessors=[],g.styleComputations=[],g.viewportAdjusters=[],g.rowHeaderColumns=[],g.dataChangeCallbacks={},g.verticalScrollSyncCallBackFns={},g.horizontalScrollSyncCallBackFns={},g.renderContainers={},g.renderContainers.body=new l("body",g),g.cellValueGetterCache={},g.getRowTemplateFn=null,g.rows=[],g.columns=[],g.isScrollingVertically=!1,g.isScrollingHorizontally=!1,g.scrollDirection=e.scrollDirection.NONE,g.disableScrolling=!1;var h=d.debounce(b,g.options.scrollDebounce),k=d.debounce(b,0),m=d.debounce(c,g.options.scrollDebounce),n=d.debounce(c,0);g.flagScrollingVertically=function(a){g.isScrollingVertically||g.isScrollingHorizontally||g.api.core.raise.scrollBegin(a),g.isScrollingVertically=!0,0!==g.options.scrollDebounce&&a.withDelay?h(a):k(a)},g.flagScrollingHorizontally=function(a){g.isScrollingVertically||g.isScrollingHorizontally||g.api.core.raise.scrollBegin(a),g.isScrollingHorizontally=!0,0!==g.options.scrollDebounce&&a.withDelay?m(a):n(a)},g.scrollbarHeight=0,g.scrollbarWidth=0,g.options.enableHorizontalScrollbar===e.scrollbars.ALWAYS&&(g.scrollbarHeight=d.getScrollbarWidth()),g.options.enableVerticalScrollbar===e.scrollbars.ALWAYS&&(g.scrollbarWidth=d.getScrollbarWidth()),g.api=new i(g),g.api.registerMethod("core","refresh",this.refresh),g.api.registerMethod("core","queueGridRefresh",this.queueGridRefresh),g.api.registerMethod("core","refreshRows",this.refreshRows),g.api.registerMethod("core","queueRefresh",this.queueRefresh),g.api.registerMethod("core","handleWindowResize",this.handleWindowResize),g.api.registerMethod("core","addRowHeaderColumn",this.addRowHeaderColumn),g.api.registerMethod("core","scrollToIfNecessary",function(a,b){return g.scrollToIfNecessary(a,b)}),g.api.registerMethod("core","scrollTo",function(a,b){return g.scrollTo(a,b)}),g.api.registerMethod("core","registerRowsProcessor",this.registerRowsProcessor),g.api.registerMethod("core","registerColumnsProcessor",this.registerColumnsProcessor),g.api.registerMethod("core","sortHandleNulls",j.handleNulls),g.api.registerEvent("core","sortChanged"),g.api.registerEvent("core","columnVisibilityChanged"),g.api.registerMethod("core","notifyDataChange",this.notifyDataChange),g.api.registerMethod("core","clearAllFilters",this.clearAllFilters),g.registerDataChangeCallback(g.columnRefreshCallback,[e.dataChange.COLUMN]),g.registerDataChangeCallback(g.processRowsCallback,[e.dataChange.EDIT]),g.registerDataChangeCallback(g.updateFooterHeightCallback,[e.dataChange.OPTIONS]),g.registerStyleComputation({priority:10,func:g.getFooterStyles})};p.prototype.calcFooterHeight=function(){if(!this.hasFooter())return 0;var a=0;return this.options.showGridFooter&&(a+=this.options.gridFooterHeight),a+=this.calcColumnFooterHeight()},p.prototype.calcColumnFooterHeight=function(){var a=0;return this.options.showColumnFooter&&(a+=this.options.columnFooterHeight),a},p.prototype.getFooterStyles=function(){var a=".grid"+this.id+" .ui-grid-footer-aggregates-row { height: "+this.options.columnFooterHeight+"px; }";return a+=" .grid"+this.id+" .ui-grid-footer-info { height: "+this.options.gridFooterHeight+"px; }"},p.prototype.hasFooter=function(){return this.options.showGridFooter||this.options.showColumnFooter},p.prototype.isRTL=function(){return this.rtl},p.prototype.registerColumnBuilder=function(a){this.columnBuilders.push(a)},p.prototype.buildColumnDefsFromData=function(a){this.options.columnDefs=d.getColumnsFromData(a,this.options.excludeProperties)},p.prototype.registerRowBuilder=function(a){this.rowBuilders.push(a)},p.prototype.registerDataChangeCallback=function(a,b,c){var f=d.nextUid();b||(b=[e.dataChange.ALL]),Array.isArray(b)||d.logError("Expected types to be an array or null in registerDataChangeCallback, value passed was: "+b),this.dataChangeCallbacks[f]={callback:a,types:b,_this:c};var g=this,h=function(){delete g.dataChangeCallbacks[f]};return h},p.prototype.callDataChangeCallbacks=function(a,b){angular.forEach(this.dataChangeCallbacks,function(b,c){(-1!==b.types.indexOf(e.dataChange.ALL)||-1!==b.types.indexOf(a)||a===e.dataChange.ALL)&&(b._this?b.callback.apply(b._this,this):b.callback(this))},this)},p.prototype.notifyDataChange=function(a){var b=e.dataChange;a===b.ALL||a===b.COLUMN||a===b.EDIT||a===b.ROW||a===b.OPTIONS?this.callDataChangeCallbacks(a):d.logError("Notified of a data change, but the type was not recognised, so no action taken, type was: "+a)},p.prototype.columnRefreshCallback=function(a){a.buildColumns(),a.queueGridRefresh()},p.prototype.processRowsCallback=function(a){a.queueGridRefresh()},p.prototype.updateFooterHeightCallback=function(a){a.footerHeight=a.calcFooterHeight(),a.columnFooterHeight=a.calcColumnFooterHeight()},p.prototype.getColumn=function(a){var b=this.columns.filter(function(b){return b.colDef.name===a});return b.length>0?b[0]:null},p.prototype.getColDef=function(a){var b=this.options.columnDefs.filter(function(b){return b.name===a});return b.length>0?b[0]:null},p.prototype.assignTypes=function(){var a=this;a.options.columnDefs.forEach(function(b,c){if(!b.type){var e=new g(b,c,a),f=a.rows.length>0?a.rows[0]:null;f?b.type=d.guessType(a.getCellValue(f,e)):b.type="string"}})},p.prototype.isRowHeaderColumn=function(a){return-1!==this.rowHeaderColumns.indexOf(a)},p.prototype.addRowHeaderColumn=function(a,b){var c=this;void 0===b&&(b=0);var e=new g(a,d.nextUid(),c);e.isRowHeader=!0,c.isRTL()?(c.createRightContainer(),e.renderContainer="right"):(c.createLeftContainer(),e.renderContainer="left"),c.columnBuilders[0](a,e,c.options).then(function(){e.enableFiltering=!1,e.enableSorting=!1,e.enableHiding=!1,e.headerPriority=b,c.rowHeaderColumns.push(e),c.rowHeaderColumns=c.rowHeaderColumns.sort(function(a,b){return a.headerPriority-b.headerPriority}),c.buildColumns().then(function(){c.preCompileCellTemplates(),c.queueGridRefresh()})})},p.prototype.getOnlyDataColumns=function(){var a=this,b=[];return a.columns.forEach(function(c){-1===a.rowHeaderColumns.indexOf(c)&&b.push(c)}),b},p.prototype.buildColumns=function(b){var c={orderByColumnDefs:!1};angular.extend(c,b);var e,f=this,h=[],i=f.rowHeaderColumns.length;for(e=0;e<f.columns.length;e++)f.getColDef(f.columns[e].name)||(f.columns.splice(e,1),e--);for(var j=f.rowHeaderColumns.length-1;j>=0;j--)f.columns.unshift(f.rowHeaderColumns[j]);if(f.options.columnDefs.forEach(function(a,b){f.preprocessColDef(a);var c=f.getColumn(a.name);c?c.updateColumnDef(a,!1):(c=new g(a,d.nextUid(),f),f.columns.splice(b+i,0,c)),f.columnBuilders.forEach(function(b){h.push(b.call(f,a,c,f.options))})}),c.orderByColumnDefs){var k=f.columns.slice(0),l=Math.min(f.options.columnDefs.length,f.columns.length);for(e=0;l>e;e++)f.columns[e+i].name!==f.options.columnDefs[e].name?k[e+i]=f.getColumn(f.options.columnDefs[e].name):k[e+i]=f.columns[e+i];f.columns.length=0,Array.prototype.splice.apply(f.columns,[0,0].concat(k))}return a.all(h).then(function(){f.rows.length>0&&f.assignTypes()})},p.prototype.preCompileCellTemplate=function(a){var c=this,d=a.cellTemplate.replace(e.MODEL_COL_FIELD,c.getQualifiedColField(a));d=d.replace(e.COL_FIELD,"grid.getCellValue(row, col)");var f=b(d);a.compiledElementFn=f,a.compiledElementFnDefer&&a.compiledElementFnDefer.resolve(a.compiledElementFn)},p.prototype.preCompileCellTemplates=function(){var a=this;a.columns.forEach(function(b){b.cellTemplate?a.preCompileCellTemplate(b):b.cellTemplatePromise&&b.cellTemplatePromise.then(function(){a.preCompileCellTemplate(b)})})},p.prototype.getQualifiedColField=function(a){var b="row.entity";return a.field===e.ENTITY_BINDING?b:d.preEval(b+"."+a.field)},p.prototype.createLeftContainer=function(){this.hasLeftContainer()||(this.renderContainers.left=new l("left",this,{disableColumnOffset:!0}))},p.prototype.createRightContainer=function(){this.hasRightContainer()||(this.renderContainers.right=new l("right",this,{disableColumnOffset:!0}))},p.prototype.hasLeftContainer=function(){return void 0!==this.renderContainers.left},p.prototype.hasRightContainer=function(){return void 0!==this.renderContainers.right},p.prototype.preprocessColDef=function(a){var b=this;if(!a.field&&!a.name)throw new Error("colDef.name or colDef.field property is required");if(void 0===a.name&&void 0!==a.field){for(var c=a.field,d=2;b.getColumn(c);)c=a.field+d.toString(),d++;a.name=c}},p.prototype.newInN=function(a,b,c,d){for(var e=this,f=[],g=0;g<b.length;g++){for(var h=d?b[g][d]:b[g],i=!1,j=0;j<a.length;j++){var k=c?a[j][c]:a[j];if(e.options.rowEquality(h,k)){i=!0;break}}i||f.push(h)}return f},p.prototype.getRow=function(a,b){var c=this;b="undefined"==typeof b?c.rows:b;var d=b.filter(function(b){return c.options.rowEquality(b.entity,a)});return d.length>0?d[0]:null},p.prototype.modifyRows=function(b){var c=this,d=c.rows.slice(0),e=c.rowHashMap||c.createRowHashMap();c.rowHashMap=c.createRowHashMap(),c.rows.length=0,b.forEach(function(a,b){var f,g;g=c.options.enableRowHashing?e.get(a):c.getRow(a,d),g&&(f=g,f.entity=a),f||(f=c.processRowBuilders(new h(a,b,c))),c.rows.push(f),c.rowHashMap.put(a,f)}),c.assignTypes();var f=a.when(c.processRowsProcessors(c.rows)).then(function(a){return c.setVisibleRows(a)}),g=a.when(c.processColumnsProcessors(c.columns)).then(function(a){return c.setVisibleColumns(a)});return a.all([f,g])},p.prototype.addRows=function(a){for(var b=this,c=b.rows.length,d=0;d<a.length;d++){var e=b.processRowBuilders(new h(a[d],d+c,b));if(b.options.enableRowHashing){var f=b.rowHashMap.get(e.entity);f&&(f.row=e)}b.rows.push(e)}},p.prototype.processRowBuilders=function(a){var b=this;return b.rowBuilders.forEach(function(c){c.call(b,a,b.options)}),a},p.prototype.registerStyleComputation=function(a){this.styleComputations.push(a)},p.prototype.registerRowsProcessor=function(a,b){if(!angular.isFunction(a))throw"Attempt to register non-function rows processor: "+a;this.rowsProcessors.push({processor:a,priority:b}),this.rowsProcessors.sort(function(a,b){return a.priority-b.priority})},p.prototype.removeRowsProcessor=function(a){var b=-1;this.rowsProcessors.forEach(function(c,d){c.processor===a&&(b=d)}),-1!==b&&this.rowsProcessors.splice(b,1)},p.prototype.processRowsProcessors=function(b){function c(b,e){var g=d.rowsProcessors[b].processor;return a.when(g.call(d,e,d.columns)).then(function(a){if(!a)throw"Processor at index "+b+" did not return a set of renderable rows";if(!angular.isArray(a))throw"Processor at index "+b+" did not return an array";return b++,b<=d.rowsProcessors.length-1?c(b,a):void f.resolve(a)})}var d=this,e=b.slice(0);if(0===d.rowsProcessors.length)return a.when(e);var f=a.defer();return c(0,e),f.promise},p.prototype.setVisibleRows=function(a){var b=this;for(var c in b.renderContainers){var d=b.renderContainers[c];d.canvasHeightShouldUpdate=!0,"undefined"==typeof d.visibleRowCache?d.visibleRowCache=[]:d.visibleRowCache.length=0}for(var e=0;e<a.length;e++){var f=a[e],g="undefined"!=typeof f.renderContainer&&f.renderContainer?f.renderContainer:"body";f.visible&&b.renderContainers[g].visibleRowCache.push(f)}b.api.core.raise.rowsVisibleChanged(this.api),b.api.core.raise.rowsRendered(this.api)},p.prototype.registerColumnsProcessor=function(a,b){if(!angular.isFunction(a))throw"Attempt to register non-function rows processor: "+a;this.columnsProcessors.push({processor:a,priority:b}),this.columnsProcessors.sort(function(a,b){return a.priority-b.priority})},p.prototype.removeColumnsProcessor=function(a){var b=this.columnsProcessors.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.columnsProcessors.splice(b,1)},p.prototype.processColumnsProcessors=function(b){function c(b,g){var h=d.columnsProcessors[b].processor;return a.when(h.call(d,g,d.rows)).then(function(a){if(!a)throw"Processor at index "+b+" did not return a set of renderable rows";if(!angular.isArray(a))throw"Processor at index "+b+" did not return an array";return b++,b<=d.columnsProcessors.length-1?c(b,e):void f.resolve(e)})}var d=this,e=b.slice(0);if(0===d.columnsProcessors.length)return a.when(e);var f=a.defer();return c(0,e),f.promise},p.prototype.setVisibleColumns=function(a){var b=this;for(var c in b.renderContainers){var d=b.renderContainers[c];d.visibleColumnCache.length=0}for(var e=0;e<a.length;e++){var f=a[e];f.visible&&("undefined"!=typeof f.renderContainer&&f.renderContainer?b.renderContainers[f.renderContainer].visibleColumnCache.push(f):b.renderContainers.body.visibleColumnCache.push(f))}},p.prototype.handleWindowResize=function(a){var b=this;return b.gridWidth=d.elementWidth(b.element),b.gridHeight=d.elementHeight(b.element),b.queueRefresh()},p.prototype.queueRefresh=function(){var a=this;return a.refreshCanceller&&m.cancel(a.refreshCanceller),a.refreshCanceller=m(function(){a.refreshCanvas(!0)}),a.refreshCanceller.then(function(){a.refreshCanceller=null}),a.refreshCanceller},p.prototype.queueGridRefresh=function(){var a=this;return a.gridRefreshCanceller&&m.cancel(a.gridRefreshCanceller),a.gridRefreshCanceller=m(function(){a.refresh(!0)}),a.gridRefreshCanceller.then(function(){a.gridRefreshCanceller=null}),a.gridRefreshCanceller},p.prototype.updateCanvasHeight=function(){var a=this;for(var b in a.renderContainers)if(a.renderContainers.hasOwnProperty(b)){var c=a.renderContainers[b];c.canvasHeightShouldUpdate=!0}},p.prototype.buildStyles=function(){var a=this;a.customStyles="",a.styleComputations.sort(function(a,b){return null===a.priority?1:null===b.priority?-1:null===a.priority&&null===b.priority?0:a.priority-b.priority}).forEach(function(b){var c=b.func.call(a);angular.isString(c)&&(a.customStyles+="\n"+c)})},p.prototype.minColumnsToRender=function(){var a=this,b=this.getViewportWidth(),c=0,d=0;return a.columns.forEach(function(e,f){if(b>d)d+=e.drawnWidth,c++;else{for(var g=0,h=f;h>=f-c;h--)g+=a.columns[h].drawnWidth;b>g&&c++}}),c},p.prototype.getBodyHeight=function(){var a=this.getViewportHeight();return a},p.prototype.getViewportHeight=function(){var a=this,b=this.gridHeight-this.headerHeight-this.footerHeight,c=a.getViewportAdjustment();return b+=c.height},p.prototype.getViewportWidth=function(){var a=this,b=this.gridWidth,c=a.getViewportAdjustment();return b+=c.width},p.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},p.prototype.addVerticalScrollSync=function(a,b){this.verticalScrollSyncCallBackFns[a]=b},p.prototype.addHorizontalScrollSync=function(a,b){this.horizontalScrollSyncCallBackFns[a]=b},p.prototype.scrollContainers=function(a,b){if(b.y){var c=["body","left","right"];this.flagScrollingVertically(b),"body"===a?c=["left","right"]:"left"===a?c=["body","right"]:"right"===a&&(c=["body","left"]);for(var d=0;d<c.length;d++){var e=c[d];this.verticalScrollSyncCallBackFns[e]&&this.verticalScrollSyncCallBackFns[e](b)}}if(b.x){var f=["body","bodyheader","bodyfooter"];this.flagScrollingHorizontally(b),"body"===a&&(f=["bodyheader","bodyfooter"]);for(var g=0;g<f.length;g++){var h=f[g];this.horizontalScrollSyncCallBackFns[h]&&this.horizontalScrollSyncCallBackFns[h](b)}}},p.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},p.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);"undefined"!=typeof b&&void 0!==b&&this.viewportAdjusters.splice(b,1)},p.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},p.prototype.getVisibleRowCount=function(){return this.renderContainers.body.visibleRowCache.length},p.prototype.getVisibleRows=function(){return this.renderContainers.body.visibleRowCache},p.prototype.getVisibleColumnCount=function(){return this.renderContainers.body.visibleColumnCache.length},p.prototype.searchRows=function(a){return k.search(this,a,this.columns)},p.prototype.sortByColumn=function(a){return j.sort(this,a,this.columns)},p.prototype.getCellValue=function(a,b){return"undefined"!=typeof a.entity["$$"+b.uid]?a.entity["$$"+b.uid].rendered:this.options.flatEntityAccess&&"undefined"!=typeof b.field?a.entity[b.field]:(b.cellValueGetterCache||(b.cellValueGetterCache=c(a.getEntityQualifiedColField(b))),b.cellValueGetterCache(a))},p.prototype.getCellDisplayValue=function(a,b){if(!b.cellDisplayGetterCache){var d=b.cellFilter?" | "+b.cellFilter:"";"undefined"!=typeof a.entity["$$"+b.uid]?b.cellDisplayGetterCache=c(a.entity["$$"+b.uid].rendered+d):this.options.flatEntityAccess&&"undefined"!=typeof b.field?b.cellDisplayGetterCache=c(a.entity[b.field]+d):b.cellDisplayGetterCache=c(a.getEntityQualifiedColField(b)+d)}return b.cellDisplayGetterCache(a)},p.prototype.getNextColumnSortPriority=function(){var a=this,b=0;return a.columns.forEach(function(a){a.sort&&void 0!==a.sort.priority&&a.sort.priority>=b&&(b=a.sort.priority+1)}),b},p.prototype.resetColumnSorting=function(a){var b=this;b.columns.forEach(function(b){b===a||b.suppressRemoveSort||(b.sort={})})},p.prototype.getColumnSorting=function(){var a,b=this,c=[];return a=b.columns.slice(0),a.sort(j.prioritySort).forEach(function(a){a.sort&&"undefined"!=typeof a.sort.direction&&a.sort.direction&&(a.sort.direction===e.ASC||a.sort.direction===e.DESC)&&c.push(a)}),c},p.prototype.sortColumn=function(b,c,d){var e=this,f=null;if("undefined"==typeof b||!b)throw new Error("No column parameter provided");if("boolean"==typeof c?d=c:f=c,d?void 0===b.sort.priority&&(b.sort.priority=e.getNextColumnSortPriority()):(e.resetColumnSorting(b),b.sort.priority=void 0,b.sort.priority=e.getNextColumnSortPriority()),f)b.sort.direction=f;else{var g=b.sortDirectionCycle.indexOf(b.sort.direction?b.sort.direction:null);g=(g+1)%b.sortDirectionCycle.length,b.colDef&&b.suppressRemoveSort&&!b.sortDirectionCycle[g]&&(g=(g+1)%b.sortDirectionCycle.length),b.sortDirectionCycle[g]?b.sort.direction=b.sortDirectionCycle[g]:q(b,e)}return e.api.core.raise.sortChanged(e,e.getColumnSorting()),a.when(b)};var q=function(a,b){b.columns.forEach(function(b){b.sort&&void 0!==b.sort.priority&&b.sort.priority>a.sort.priority&&(b.sort.priority-=1)}),a.sort={}};return p.prototype.renderingComplete=function(){angular.isFunction(this.options.onRegisterApi)&&this.options.onRegisterApi(this.api),this.api.core.raise.renderingComplete(this.api)},p.prototype.createRowHashMap=function(){var a=this,b=new o;return b.grid=a,b},p.prototype.refresh=function(b){var c=this,d=c.processRowsProcessors(c.rows).then(function(a){c.setVisibleRows(a)}),e=c.processColumnsProcessors(c.columns).then(function(a){c.setVisibleColumns(a)});return a.all([d,e]).then(function(){c.redrawInPlace(b),c.refreshCanvas(!0)})},p.prototype.refreshRows=function(){var a=this;return a.processRowsProcessors(a.rows).then(function(b){a.setVisibleRows(b),a.redrawInPlace(),a.refreshCanvas(!0)})},p.prototype.refreshCanvas=function(b){var c=this;b&&c.buildStyles();var e=a.defer(),f=[];for(var g in c.renderContainers)if(c.renderContainers.hasOwnProperty(g)){var h=c.renderContainers[g];if(null===h.canvasWidth||isNaN(h.canvasWidth))continue;(h.header||h.headerCanvas)&&(h.explicitHeaderHeight=h.explicitHeaderHeight||null,h.explicitHeaderCanvasHeight=h.explicitHeaderCanvasHeight||null,f.push(h))}return f.length>0?(b&&c.buildStyles(),m(function(){var a,g,h=!1,i=0,j=0,k=function(a,b){return a!==b&&(h=!0),b};for(a=0;a<f.length;a++)if(g=f[a],null!==g.canvasWidth&&!isNaN(g.canvasWidth)){if(g.header){var l=g.headerHeight=k(g.headerHeight,parseInt(d.outerElementHeight(g.header),10)),m=d.getBorderSize(g.header,"top"),n=d.getBorderSize(g.header,"bottom"),o=parseInt(l-m-n,10);o=0>o?0:o,g.innerHeaderHeight=o,!g.explicitHeaderHeight&&o>i&&(i=o)}if(g.headerCanvas){var p=g.headerCanvasHeight=k(g.headerCanvasHeight,parseInt(d.outerElementHeight(g.headerCanvas),10));!g.explicitHeaderCanvasHeight&&p>j&&(j=p)}}for(a=0;a<f.length;a++)g=f[a],i>0&&"undefined"!=typeof g.headerHeight&&null!==g.headerHeight&&(g.explicitHeaderHeight||g.headerHeight<i)&&(g.explicitHeaderHeight=k(g.explicitHeaderHeight,i)),j>0&&"undefined"!=typeof g.headerCanvasHeight&&null!==g.headerCanvasHeight&&(g.explicitHeaderCanvasHeight||g.headerCanvasHeight<j)&&(g.explicitHeaderCanvasHeight=k(g.explicitHeaderCanvasHeight,j));b&&h&&c.buildStyles(),e.resolve()})):m(function(){e.resolve()}),e.promise},p.prototype.redrawInPlace=function(a){var b=this;for(var c in b.renderContainers){var d=b.renderContainers[c];a?(d.adjustRows(d.prevScrollTop,null),d.adjustColumns(d.prevScrollLeft,null)):(d.adjustRows(null,d.prevScrolltopPercentage),d.adjustColumns(null,d.prevScrollleftPercentage))}},p.prototype.hasLeftContainerColumns=function(){return this.hasLeftContainer()&&this.renderContainers.left.renderedColumns.length>0},p.prototype.hasRightContainerColumns=function(){return this.hasRightContainer()&&this.renderContainers.right.renderedColumns.length>0},p.prototype.scrollToIfNecessary=function(b,c){var d=this,e=new n(d,"uiGrid.scrollToIfNecessary"),f=d.renderContainers.body.visibleRowCache,g=d.renderContainers.body.visibleColumnCache,h=d.renderContainers.body.prevScrollTop+d.headerHeight;h=0>h?0:h;var i=d.renderContainers.body.prevScrollLeft,j=d.renderContainers.body.prevScrollTop+d.gridHeight-d.renderContainers.body.headerHeight-d.footerHeight-d.scrollbarWidth,k=d.renderContainers.body.prevScrollLeft+Math.ceil(d.renderContainers.body.getViewportWidth());if(null!==b){var l=f.indexOf(b),m=d.renderContainers.body.getCanvasHeight()-d.renderContainers.body.getViewportHeight(),o=l*d.options.rowHeight+d.headerHeight;o=0>o?0:o;var p,q;h>o?(p=d.renderContainers.body.prevScrollTop-(h-o),q=p/m,e.y={percentage:q}):o>j&&(p=o-j+d.renderContainers.body.prevScrollTop,q=p/m,e.y={percentage:q})}if(null!==c){for(var r=g.indexOf(c),s=d.renderContainers.body.getCanvasWidth()-d.renderContainers.body.getViewportWidth(),t=0,u=0;r>u;u++){var v=g[u];t+=v.drawnWidth}t=0>t?0:t;var w=t+c.drawnWidth;w=0>w?0:w;var x,y;i>t?(x=d.renderContainers.body.prevScrollLeft-(i-t),y=x/s,y=y>1?1:y,e.x={percentage:y}):w>k&&(x=w-k+d.renderContainers.body.prevScrollLeft,y=x/s,y=y>1?1:y,e.x={percentage:y})}var z=a.defer();if(e.y||e.x){e.withDelay=!1,d.scrollContainers("",e);var A=d.api.core.on.scrollEnd(null,function(){z.resolve(e),A()})}else z.resolve();return z.promise},p.prototype.scrollTo=function(a,b){var c=null,d=null;return null!==a&&"undefined"!=typeof a&&(c=this.getRow(a)),null!==b&&"undefined"!=typeof b&&(d=this.getColumn(b.name?b.name:b.field)),this.scrollToIfNecessary(c,d)},p.prototype.clearAllFilters=function(a,b,c){return void 0===a&&(a=!0),void 0===b&&(b=!1),void 0===c&&(c=!1),this.columns.forEach(function(a){a.filters.forEach(function(a){a.term=void 0,b&&(a.condition=void 0),c&&(a.flags=void 0)})}),a?this.refreshRows():void 0},o.prototype={put:function(a,b){this[this.grid.options.rowIdentity(a)]=b},get:function(a){return this[this.grid.options.rowIdentity(a)]},remove:function(a){var b=this[a=this.grid.options.rowIdentity(a)];return delete this[a],b}},p}])}(),function(){angular.module("ui.grid").factory("GridApi",["$q","$rootScope","gridUtil","uiGridConstants","GridRow","uiGridGridMenuService",function(a,b,c,d,e,f){
-function g(a,c,d,e){return b.$on(a,function(a){var b=Array.prototype.slice.call(arguments);b.splice(0,1),c.apply(e?e:d.api,b)})}var h=function(a){this.grid=a,this.listeners=[],this.registerEvent("core","renderingComplete"),this.registerEvent("core","filterChanged"),this.registerMethod("core","setRowInvisible",e.prototype.setRowInvisible),this.registerMethod("core","clearRowInvisible",e.prototype.clearRowInvisible),this.registerMethod("core","getVisibleRows",this.grid.getVisibleRows),this.registerEvent("core","rowsVisibleChanged"),this.registerEvent("core","rowsRendered"),this.registerEvent("core","scrollBegin"),this.registerEvent("core","scrollEnd"),this.registerEvent("core","canvasHeightChanged"),this.registerEvent("core","gridDimensionChanged")};return h.prototype.suppressEvents=function(a,b){var c=this,d=angular.isArray(a)?a:[a],e=c.listeners.filter(function(a){return d.some(function(b){return a.handler===b})});e.forEach(function(a){a.dereg()}),b(),e.forEach(function(a){a.dereg=g(a.eventId,a.handler,c.grid,a._this)})},h.prototype.registerEvent=function(a,d){var e=this;e[a]||(e[a]={});var f=e[a];f.on||(f.on={},f.raise={});var h=e.grid.id+a+d;f.raise[d]=function(){b.$emit.apply(b,[h].concat(Array.prototype.slice.call(arguments)))},f.on[d]=function(b,f,i){if(null!==b&&"undefined"==typeof b.$on)return void c.logError("asked to listen on "+a+".on."+d+" but scope wasn't passed in the input parameters. It is legitimate to pass null, but you've passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering");var j=g(h,f,e.grid,i),k={handler:f,dereg:j,eventId:h,scope:b,_this:i};e.listeners.push(k);var l=function(){k.dereg();var a=e.listeners.indexOf(k);e.listeners.splice(a,1)};return b&&b.$on("$destroy",function(){l()}),l}},h.prototype.registerEventsFromObject=function(a){var b=this,c=[];angular.forEach(a,function(a,b){var d={name:b,events:[]};angular.forEach(a,function(a,b){d.events.push(b)}),c.push(d)}),c.forEach(function(a){a.events.forEach(function(c){b.registerEvent(a.name,c)})})},h.prototype.registerMethod=function(a,b,d,e){this[a]||(this[a]={});var f=this[a];f[b]=c.createBoundedWrapper(e||this.grid,d)},h.prototype.registerMethodsFromObject=function(a,b){var c=this,d=[];angular.forEach(a,function(a,b){var c={name:b,methods:[]};angular.forEach(a,function(a,b){c.methods.push({name:b,fn:a})}),d.push(c)}),d.forEach(function(a){a.methods.forEach(function(d){c.registerMethod(a.name,d.name,d.fn,b)})})},h}])}(),function(){angular.module("ui.grid").factory("GridColumn",["gridUtil","uiGridConstants","i18nService",function(a,b,c){function d(a,c,d){var e=this;e.grid=d,e.uid=c,e.updateColumnDef(a,!0),e.aggregationValue=void 0,e.updateAggregationValue=function(){if(!e.aggregationType)return void(e.aggregationValue=void 0);var a=0,c=e.grid.getVisibleRows(),d=function(){var a=[];return c.forEach(function(b){var c=e.grid.getCellValue(b,e),d=Number(c);isNaN(d)||a.push(d)}),a};angular.isFunction(e.aggregationType)?e.aggregationValue=e.aggregationType(c,e):e.aggregationType===b.aggregationTypes.count?e.aggregationValue=e.grid.getVisibleRowCount():e.aggregationType===b.aggregationTypes.sum?(d().forEach(function(b){a+=b}),e.aggregationValue=a):e.aggregationType===b.aggregationTypes.avg?(d().forEach(function(b){a+=b}),a/=d().length,e.aggregationValue=a):e.aggregationType===b.aggregationTypes.min?e.aggregationValue=Math.min.apply(null,d()):e.aggregationType===b.aggregationTypes.max?e.aggregationValue=Math.max.apply(null,d()):e.aggregationValue=" "},this.getAggregationValue=function(){return e.aggregationValue}}return d.prototype.hideColumn=function(){this.colDef.visible=!1},d.prototype.setPropertyOrDefault=function(a,b,c){var d=this;"undefined"!=typeof a[b]&&a[b]?d[b]=a[b]:"undefined"!=typeof d[b]?d[b]=d[b]:d[b]=c?c:{}},d.prototype.updateColumnDef=function(c,d){var e=this;if(e.colDef=c,void 0===c.name)throw new Error("colDef.name is required for column at index "+e.grid.options.columnDefs.indexOf(c));if(e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,!angular.isNumber(e.width)||!e.hasCustomWidth||c.allowCustomWidthOverride){var f=c.width,g="Cannot parse column width '"+f+"' for column named '"+c.name+"'";if(e.hasCustomWidth=!1,angular.isString(f)||angular.isNumber(f))if(angular.isString(f))if(a.endsWith(f,"%")){var h=f.replace(/%/g,""),i=parseInt(h,10);if(isNaN(i))throw new Error(g);e.width=f}else if(f.match(/^(\d+)$/))e.width=parseInt(f.match(/^(\d+)$/)[1],10);else{if(!f.match(/^\*+$/))throw new Error(g);e.width=f}else e.width=f;else e.width="*"}["minWidth","maxWidth"].forEach(function(a){var b=c[a],d="Cannot parse column "+a+" '"+b+"' for column named '"+c.name+"'";if(angular.isString(b)||angular.isNumber(b))if(angular.isString(b)){if(!b.match(/^(\d+)$/))throw new Error(d);e[a]=parseInt(b.match(/^(\d+)$/)[1],10)}else e[a]=b;else e[a]="minWidth"===a?30:9e3}),e.field=void 0===c.field?c.name:c.field,"string"!=typeof e.field&&a.logError("Field is not a string, this is likely to break the code, Field is: "+e.field),e.name=c.name,e.displayName=void 0===c.displayName?a.readableColumnName(c.name):c.displayName,e.aggregationType=angular.isDefined(c.aggregationType)?c.aggregationType:null,e.footerCellTemplate=angular.isDefined(c.footerCellTemplate)?c.footerCellTemplate:null,"undefined"==typeof c.cellTooltip||c.cellTooltip===!1?e.cellTooltip=!1:c.cellTooltip===!0?e.cellTooltip=function(a,b){return e.grid.getCellValue(a,b)}:"function"==typeof c.cellTooltip?e.cellTooltip=c.cellTooltip:e.cellTooltip=function(a,b){return b.colDef.cellTooltip},"undefined"==typeof c.headerTooltip||c.headerTooltip===!1?e.headerTooltip=!1:c.headerTooltip===!0?e.headerTooltip=function(a){return a.displayName}:"function"==typeof c.headerTooltip?e.headerTooltip=c.headerTooltip:e.headerTooltip=function(a){return a.colDef.headerTooltip},e.footerCellClass=c.footerCellClass,e.cellClass=c.cellClass,e.headerCellClass=c.headerCellClass,e.cellFilter=c.cellFilter?c.cellFilter:"",e.sortCellFiltered=c.sortCellFiltered?!0:!1,e.filterCellFiltered=c.filterCellFiltered?!0:!1,e.headerCellFilter=c.headerCellFilter?c.headerCellFilter:"",e.footerCellFilter=c.footerCellFilter?c.footerCellFilter:"",e.visible=a.isNullOrUndefined(c.visible)||c.visible,e.headerClass=c.headerClass,e.enableSorting="undefined"!=typeof c.enableSorting?c.enableSorting:e.grid.options.enableSorting,e.sortingAlgorithm=c.sortingAlgorithm,e.sortDirectionCycle="undefined"!=typeof c.sortDirectionCycle?c.sortDirectionCycle:[null,b.ASC,b.DESC],"undefined"==typeof e.suppressRemoveSort&&(e.suppressRemoveSort="undefined"!=typeof c.suppressRemoveSort?c.suppressRemoveSort:!1),e.enableFiltering="undefined"!=typeof c.enableFiltering?c.enableFiltering:!0,e.setPropertyOrDefault(c,"menuItems",[]),d&&e.setPropertyOrDefault(c,"sort");var j=[];c.filter?j.push(c.filter):c.filters?j=c.filters:j.push({}),d?(e.setPropertyOrDefault(c,"filter"),e.setPropertyOrDefault(c,"extraStyle"),e.setPropertyOrDefault(c,"filters",j)):e.filters.length===j.length&&e.filters.forEach(function(a,b){"undefined"!=typeof j[b].placeholder&&(a.placeholder=j[b].placeholder),"undefined"!=typeof j[b].ariaLabel&&(a.ariaLabel=j[b].ariaLabel),"undefined"!=typeof j[b].flags&&(a.flags=j[b].flags),"undefined"!=typeof j[b].type&&(a.type=j[b].type),"undefined"!=typeof j[b].selectOptions&&(a.selectOptions=j[b].selectOptions)})},d.prototype.unsort=function(){this.sort={},this.grid.api.core.raise.sortChanged(this.grid,this.grid.getColumnSorting())},d.prototype.getColClass=function(a){var c=b.COL_CLASS_PREFIX+this.uid;return a?"."+c:c},d.prototype.isPinnedLeft=function(){return"left"===this.renderContainer},d.prototype.isPinnedRight=function(){return"right"===this.renderContainer},d.prototype.getColClassDefinition=function(){return" .grid"+this.grid.id+" "+this.getColClass(!0)+" { min-width: "+this.drawnWidth+"px; max-width: "+this.drawnWidth+"px; }"},d.prototype.getRenderContainer=function(){var a=this,b=a.renderContainer;return(null===b||""===b||void 0===b)&&(b="body"),a.grid.renderContainers[b]},d.prototype.showColumn=function(){this.colDef.visible=!0},d.prototype.getAggregationText=function(){var a=this;if(a.colDef.aggregationHideLabel)return"";if(a.colDef.aggregationLabel)return a.colDef.aggregationLabel;switch(a.colDef.aggregationType){case b.aggregationTypes.count:return c.getSafeText("aggregation.count");case b.aggregationTypes.sum:return c.getSafeText("aggregation.sum");case b.aggregationTypes.avg:return c.getSafeText("aggregation.avg");case b.aggregationTypes.min:return c.getSafeText("aggregation.min");case b.aggregationTypes.max:return c.getSafeText("aggregation.max");default:return""}},d.prototype.getCellTemplate=function(){var a=this;return a.cellTemplatePromise},d.prototype.getCompiledElementFn=function(){var a=this;return a.compiledElementFnDefer.promise},d}])}(),function(){angular.module("ui.grid").factory("GridOptions",["gridUtil","uiGridConstants",function(a,b){return{initialize:function(c){return c.onRegisterApi=c.onRegisterApi||angular.noop(),c.data=c.data||[],c.columnDefs=c.columnDefs||[],c.excludeProperties=c.excludeProperties||["$$hashKey"],c.enableRowHashing=c.enableRowHashing!==!1,c.rowIdentity=c.rowIdentity||function(b){return a.hashKey(b)},c.getRowIdentity=c.getRowIdentity||function(a){return a.$$hashKey},c.flatEntityAccess=c.flatEntityAccess===!0,c.showHeader="undefined"!=typeof c.showHeader?c.showHeader:!0,c.showHeader?c.headerRowHeight="undefined"!=typeof c.headerRowHeight?c.headerRowHeight:30:c.headerRowHeight=0,"string"==typeof c.rowHeight?c.rowHeight=parseInt(c.rowHeight)||30:c.rowHeight=c.rowHeight||30,c.minRowsToShow="undefined"!=typeof c.minRowsToShow?c.minRowsToShow:10,c.showGridFooter=c.showGridFooter===!0,c.showColumnFooter=c.showColumnFooter===!0,c.columnFooterHeight="undefined"!=typeof c.columnFooterHeight?c.columnFooterHeight:30,c.gridFooterHeight="undefined"!=typeof c.gridFooterHeight?c.gridFooterHeight:30,c.columnWidth="undefined"!=typeof c.columnWidth?c.columnWidth:50,c.maxVisibleColumnCount="undefined"!=typeof c.maxVisibleColumnCount?c.maxVisibleColumnCount:200,c.virtualizationThreshold="undefined"!=typeof c.virtualizationThreshold?c.virtualizationThreshold:20,c.columnVirtualizationThreshold="undefined"!=typeof c.columnVirtualizationThreshold?c.columnVirtualizationThreshold:10,c.excessRows="undefined"!=typeof c.excessRows?c.excessRows:4,c.scrollThreshold="undefined"!=typeof c.scrollThreshold?c.scrollThreshold:4,c.excessColumns="undefined"!=typeof c.excessColumns?c.excessColumns:4,c.horizontalScrollThreshold="undefined"!=typeof c.horizontalScrollThreshold?c.horizontalScrollThreshold:2,c.aggregationCalcThrottle="undefined"!=typeof c.aggregationCalcThrottle?c.aggregationCalcThrottle:500,c.wheelScrollThrottle="undefined"!=typeof c.wheelScrollThrottle?c.wheelScrollThrottle:70,c.scrollDebounce="undefined"!=typeof c.scrollDebounce?c.scrollDebounce:300,c.enableSorting=c.enableSorting!==!1,c.enableFiltering=c.enableFiltering===!0,c.enableColumnMenus=c.enableColumnMenus!==!1,c.enableVerticalScrollbar="undefined"!=typeof c.enableVerticalScrollbar?c.enableVerticalScrollbar:b.scrollbars.ALWAYS,c.enableHorizontalScrollbar="undefined"!=typeof c.enableHorizontalScrollbar?c.enableHorizontalScrollbar:b.scrollbars.ALWAYS,c.enableMinHeightCheck=c.enableMinHeightCheck!==!1,c.minimumColumnSize="undefined"!=typeof c.minimumColumnSize?c.minimumColumnSize:10,c.rowEquality=c.rowEquality||function(a,b){return a===b},c.headerTemplate=c.headerTemplate||null,c.footerTemplate=c.footerTemplate||"ui-grid/ui-grid-footer",c.gridFooterTemplate=c.gridFooterTemplate||"ui-grid/ui-grid-grid-footer",c.rowTemplate=c.rowTemplate||"ui-grid/ui-grid-row",c.gridMenuTemplate=c.gridMenuTemplate||"ui-grid/uiGridMenu",c.appScopeProvider=c.appScopeProvider||null,c}}}])}(),function(){angular.module("ui.grid").factory("GridRenderContainer",["gridUtil","uiGridConstants",function(a,b){function c(a,b,c){var d=this;d.name=a,d.grid=b,d.visibleRowCache=[],d.visibleColumnCache=[],d.renderedRows=[],d.renderedColumns=[],d.prevScrollTop=0,d.prevScrolltopPercentage=0,d.prevRowScrollIndex=0,d.prevScrollLeft=0,d.prevScrollleftPercentage=0,d.prevColumnScrollIndex=0,d.columnStyles="",d.viewportAdjusters=[],d.hasHScrollbar=!1,d.hasVScrollbar=!1,d.canvasHeightShouldUpdate=!0,d.$$canvasHeight=0,c&&angular.isObject(c)&&angular.extend(d,c),b.registerStyleComputation({priority:5,func:function(){return d.updateColumnWidths(),d.columnStyles}})}return c.prototype.reset=function(){this.visibleColumnCache.length=0,this.visibleRowCache.length=0,this.renderedRows.length=0,this.renderedColumns.length=0},c.prototype.containsColumn=function(a){return-1!==this.visibleColumnCache.indexOf(a)},c.prototype.minRowsToRender=function(){for(var a=this,b=0,c=0,d=a.getViewportHeight(),e=a.visibleRowCache.length-1;d>c&&e>=0;e--)c+=a.visibleRowCache[e].height,b++;return b},c.prototype.minColumnsToRender=function(){for(var a=this,b=this.getViewportWidth(),c=0,d=0,e=0;e<a.visibleColumnCache.length;e++){var f=a.visibleColumnCache[e];if(b>d)d+=f.drawnWidth?f.drawnWidth:0,c++;else{for(var g=0,h=e;h>=e-c;h--)g+=a.visibleColumnCache[h].drawnWidth?a.visibleColumnCache[h].drawnWidth:0;b>g&&c++}}return c},c.prototype.getVisibleRowCount=function(){return this.visibleRowCache.length},c.prototype.registerViewportAdjuster=function(a){this.viewportAdjusters.push(a)},c.prototype.removeViewportAdjuster=function(a){var b=this.viewportAdjusters.indexOf(a);b>-1&&this.viewportAdjusters.splice(b,1)},c.prototype.getViewportAdjustment=function(){var a=this,b={height:0,width:0};return a.viewportAdjusters.forEach(function(a){b=a.call(this,b)}),b},c.prototype.getMargin=function(a){var b=this,c=0;return b.viewportAdjusters.forEach(function(b){var d=b.call(this,{height:0,width:0});d.side&&d.side===a&&(c+=-1*d.width)}),c},c.prototype.getViewportHeight=function(){var a=this,b=a.headerHeight?a.headerHeight:a.grid.headerHeight,c=a.grid.gridHeight-b-a.grid.footerHeight,d=a.getViewportAdjustment();return c+=d.height},c.prototype.getViewportWidth=function(){var a=this,b=a.grid.gridWidth,c=a.getViewportAdjustment();return b+=c.width},c.prototype.getHeaderViewportWidth=function(){var a=this.getViewportWidth();return a},c.prototype.getCanvasHeight=function(){var a=this;if(!a.canvasHeightShouldUpdate)return a.$$canvasHeight;var b=a.$$canvasHeight;return a.$$canvasHeight=0,a.visibleRowCache.forEach(function(b){a.$$canvasHeight+=b.height}),a.canvasHeightShouldUpdate=!1,a.grid.api.core.raise.canvasHeightChanged(b,a.$$canvasHeight),a.$$canvasHeight},c.prototype.getVerticalScrollLength=function(){return this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight!==0?this.getCanvasHeight()-this.getViewportHeight()+this.grid.scrollbarHeight:-1},c.prototype.getHorizontalScrollLength=function(){return this.getCanvasWidth()-this.getViewportWidth()+this.grid.scrollbarWidth!==0?this.getCanvasWidth()-this.getViewportWidth()+this.grid.scrollbarWidth:-1},c.prototype.getCanvasWidth=function(){var a=this,b=a.canvasWidth;return b},c.prototype.setRenderedRows=function(a){this.renderedRows.length=a.length;for(var b=0;b<a.length;b++)this.renderedRows[b]=a[b]},c.prototype.setRenderedColumns=function(a){this.renderedColumns.length=a.length;for(var b=0;b<a.length;b++)this.renderedColumns[b]=a[b];this.updateColumnOffset()},c.prototype.updateColumnOffset=function(){for(var a=0,b=0;b<this.currentFirstColumn;b++)a+=this.visibleColumnCache[b].drawnWidth;this.columnOffset=a},c.prototype.scrollVertical=function(a){var c=-1;if(a!==this.prevScrollTop){var d=a-this.prevScrollTop;d>0&&(this.grid.scrollDirection=b.scrollDirection.DOWN),0>d&&(this.grid.scrollDirection=b.scrollDirection.UP);var e=this.getVerticalScrollLength();return c=a/e,c>1&&(c=1),0>c&&(c=0),this.adjustScrollVertical(a,c),c}},c.prototype.scrollHorizontal=function(a){var c=-1;if(a!==this.prevScrollLeft){var d=a-this.prevScrollLeft;d>0&&(this.grid.scrollDirection=b.scrollDirection.RIGHT),0>d&&(this.grid.scrollDirection=b.scrollDirection.LEFT);var e=this.getHorizontalScrollLength();return c=0!==e?a/e:0,this.adjustScrollHorizontal(a,c),c}},c.prototype.adjustScrollVertical=function(a,b,c){(this.prevScrollTop!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasHeight()-this.getViewportHeight())*b),this.adjustRows(a,b,!1),this.prevScrollTop=a,this.prevScrolltopPercentage=b,this.grid.queueRefresh())},c.prototype.adjustScrollHorizontal=function(a,b,c){(this.prevScrollLeft!==a||c)&&(("undefined"==typeof a||void 0===a||null===a)&&(a=(this.getCanvasWidth()-this.getViewportWidth())*b),this.adjustColumns(a,b),this.prevScrollLeft=a,this.prevScrollleftPercentage=b,this.grid.queueRefresh())},c.prototype.adjustRows=function(a,b,c){var d=this,e=d.minRowsToRender(),f=d.visibleRowCache,g=f.length-e;"undefined"!=typeof b&&null!==b||!a||(b=a/d.getVerticalScrollLength());var h=Math.ceil(Math.min(g,g*b));h>g&&(h=g);var i=[];if(f.length>d.grid.options.virtualizationThreshold){if("undefined"!=typeof a&&null!==a){if(!d.grid.suppressParentScrollDown&&d.prevScrollTop<a&&h<d.prevRowScrollIndex+d.grid.options.scrollThreshold&&g>h)return;if(!d.grid.suppressParentScrollUp&&d.prevScrollTop>a&&h>d.prevRowScrollIndex-d.grid.options.scrollThreshold&&g>h)return}var j={},k={};j=Math.max(0,h-d.grid.options.excessRows),k=Math.min(f.length,h+e+d.grid.options.excessRows),i=[j,k]}else{var l=d.visibleRowCache.length;i=[0,Math.max(l,e+d.grid.options.excessRows)]}d.updateViewableRowRange(i),d.prevRowScrollIndex=h},c.prototype.adjustColumns=function(a,b){var c=this,d=c.minColumnsToRender(),e=c.visibleColumnCache,f=e.length-d;"undefined"!=typeof b&&null!==b||!a||(b=a/c.getHorizontalScrollLength());var g=Math.ceil(Math.min(f,f*b));g>f&&(g=f);var h=[];if(e.length>c.grid.options.columnVirtualizationThreshold&&c.getCanvasWidth()>c.getViewportWidth()){var i=Math.max(0,g-c.grid.options.excessColumns),j=Math.min(e.length,g+d+c.grid.options.excessColumns);h=[i,j]}else{var k=c.visibleColumnCache.length;h=[0,Math.max(k,d+c.grid.options.excessColumns)]}c.updateViewableColumnRange(h),c.prevColumnScrollIndex=g},c.prototype.updateViewableRowRange=function(a){var b=this.visibleRowCache.slice(a[0],a[1]);this.currentTopRow=a[0],this.setRenderedRows(b)},c.prototype.updateViewableColumnRange=function(a){var b=this.visibleColumnCache.slice(a[0],a[1]);this.currentFirstColumn=a[0],this.setRenderedColumns(b)},c.prototype.headerCellWrapperStyle=function(){var a=this;if(0!==a.currentFirstColumn){var b=a.columnOffset;return a.grid.isRTL()?{"margin-right":b+"px"}:{"margin-left":b+"px"}}return null},c.prototype.updateColumnWidths=function(){var b=this,c=[],d=0,e=0,f="",g=b.grid.getViewportWidth()-b.grid.scrollbarWidth,h=[];angular.forEach(b.grid.renderContainers,function(a,b){h=h.concat(a.visibleColumnCache)}),h.forEach(function(b,f){var h=0;b.visible&&(angular.isNumber(b.width)?(h=parseInt(b.width,10),e+=h,b.drawnWidth=h):a.endsWith(b.width,"%")?(h=parseFloat(parseInt(b.width.replace(/%/g,""),10)/100*g),h>b.maxWidth&&(h=b.maxWidth),h<b.minWidth&&(h=b.minWidth),e+=h,b.drawnWidth=h):angular.isString(b.width)&&-1!==b.width.indexOf("*")&&(d+=b.width.length,c.push(b)))});var i=g-e;if(c.length>0){var j=i/d;c.forEach(function(a){var b=parseInt(a.width.length*j,10);b>a.maxWidth&&(b=a.maxWidth),b<a.minWidth&&(b=a.minWidth),e+=b,a.drawnWidth=b})}for(var k=function(a){a.drawnWidth<a.maxWidth&&l>0&&(a.drawnWidth++,e++,l--,m=!0)},l=g-e,m=!0;l>0&&m;)m=!1,c.forEach(k);var n=function(a){a.drawnWidth>a.minWidth&&o>0&&(a.drawnWidth--,e--,o--,m=!0)},o=e-g;for(m=!0;o>0&&m;)m=!1,c.forEach(n);var p=0;b.visibleColumnCache.forEach(function(a){a.visible&&(p+=a.drawnWidth)}),h.forEach(function(a){f+=a.getColClassDefinition()}),b.canvasWidth=p,this.columnStyles=f},c.prototype.needsHScrollbarPlaceholder=function(){return this.grid.options.enableHorizontalScrollbar&&!this.hasHScrollbar&&!this.grid.disableScrolling},c.prototype.getViewportStyle=function(){var a=this,c={};return a.hasHScrollbar=!1,a.hasVScrollbar=!1,a.grid.disableScrolling?(c["overflow-x"]="hidden",c["overflow-y"]="hidden",c):("body"===a.name?(a.hasHScrollbar=a.grid.options.enableHorizontalScrollbar!==b.scrollbars.NEVER,a.grid.isRTL()?a.grid.hasLeftContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER):a.grid.hasRightContainerColumns()||(a.hasVScrollbar=a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER)):"left"===a.name?a.hasVScrollbar=a.grid.isRTL()?a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER:!1:a.hasVScrollbar=a.grid.isRTL()?!1:a.grid.options.enableVerticalScrollbar!==b.scrollbars.NEVER,c["overflow-x"]=a.hasHScrollbar?"scroll":"hidden",c["overflow-y"]=a.hasVScrollbar?"scroll":"hidden",c)},c}])}(),function(){angular.module("ui.grid").factory("GridRow",["gridUtil","uiGridConstants",function(a,b){function c(b,c,d){this.grid=d,this.entity=b,this.uid=a.nextUid(),this.visible=!0,this.$$height=d.options.rowHeight}return Object.defineProperty(c.prototype,"height",{get:function(){return this.$$height},set:function(a){a!==this.$$height&&(this.grid.updateCanvasHeight(),this.$$height=a)}}),c.prototype.getQualifiedColField=function(a){return"row."+this.getEntityQualifiedColField(a)},c.prototype.getEntityQualifiedColField=function(c){var d="entity";return c.field===b.ENTITY_BINDING?d:a.preEval(d+"."+c.field)},c.prototype.setRowInvisible=function(a){a&&a.setThisRowInvisible&&a.setThisRowInvisible("user")},c.prototype.clearRowInvisible=function(a){a&&a.clearThisRowInvisible&&a.clearThisRowInvisible("user")},c.prototype.setThisRowInvisible=function(a,b){this.invisibleReason||(this.invisibleReason={}),this.invisibleReason[a]=!0,this.evaluateRowVisibility(b)},c.prototype.clearThisRowInvisible=function(a,b){"undefined"!=typeof this.invisibleReason&&delete this.invisibleReason[a],this.evaluateRowVisibility(b)},c.prototype.evaluateRowVisibility=function(a){var b=!0;"undefined"!=typeof this.invisibleReason&&angular.forEach(this.invisibleReason,function(a,c){a&&(b=!1)}),("undefined"==typeof this.visible||this.visible!==b)&&(this.visible=b,a||(this.grid.queueGridRefresh(),this.grid.api.core.raise.rowsVisibleChanged(this)))},c}])}(),function(){"use strict";angular.module("ui.grid").factory("GridRowColumn",["$parse","$filter",function(a,b){var c=function d(a,b){if(!(this instanceof d))throw"Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";this.row=a,this.col=b};return c.prototype.getIntersectionValueRaw=function(){var b=a(this.row.getEntityQualifiedColField(this.col)),c=this.row;return b(c)},c}])}(),function(){angular.module("ui.grid").factory("ScrollEvent",["gridUtil",function(a){function b(b,c,d,e){var f=this;if(!b)throw new Error("grid argument is required");f.grid=b,f.source=e,f.withDelay=!0,f.sourceRowContainer=c,f.sourceColContainer=d,f.newScrollLeft=null,f.newScrollTop=null,f.x=null,f.y=null,f.verticalScrollLength=-9999999,f.horizontalScrollLength=-999999,f.fireThrottledScrollingEvent=a.throttle(function(a){f.grid.scrollContainers(a,f)},f.grid.options.wheelScrollThrottle,{trailing:!0})}return b.prototype.getNewScrollLeft=function(b,c){var d=this;if(!d.newScrollLeft){var e,f=b.getCanvasWidth()-b.getViewportWidth(),g=a.normalizeScrollLeft(c,d.grid);if("undefined"!=typeof d.x.percentage&&void 0!==d.x.percentage)e=d.x.percentage;else{if("undefined"==typeof d.x.pixels||void 0===d.x.pixels)throw new Error("No percentage or pixel value provided for scroll event X axis");e=d.x.percentage=(g+d.x.pixels)/f}return Math.max(0,e*f)}return d.newScrollLeft},b.prototype.getNewScrollTop=function(a,b){var c=this;if(!c.newScrollTop){var d,e=a.getVerticalScrollLength(),f=b[0].scrollTop;if("undefined"!=typeof c.y.percentage&&void 0!==c.y.percentage)d=c.y.percentage;else{if("undefined"==typeof c.y.pixels||void 0===c.y.pixels)throw new Error("No percentage or pixel value provided for scroll event Y axis");d=c.y.percentage=(f+c.y.pixels)/e}return Math.max(0,d*e)}return c.newScrollTop},b.prototype.atTop=function(a){return this.y&&(0===this.y.percentage||this.verticalScrollLength<0)&&0===a},b.prototype.atBottom=function(a){return this.y&&(1===this.y.percentage||0===this.verticalScrollLength)&&a>0},b.prototype.atLeft=function(a){return this.x&&(0===this.x.percentage||this.horizontalScrollLength<0)&&0===a},b.prototype.atRight=function(a){return this.x&&(1===this.x.percentage||0===this.horizontalScrollLength)&&a>0},b.Sources={ViewPortScroll:"ViewPortScroll",RenderContainerMouseWheel:"RenderContainerMouseWheel",RenderContainerTouchMove:"RenderContainerTouchMove",Other:99},b}])}(),function(){"use strict";angular.module("ui.grid").service("gridClassFactory",["gridUtil","$q","$compile","$templateCache","uiGridConstants","Grid","GridColumn","GridRow",function(a,b,c,d,e,f,g,h){var i={createGrid:function(d){d="undefined"!=typeof d?d:{},d.id=a.newId();var e=new f(d);if(e.options.rowTemplate){var g=b.defer();e.getRowTemplateFn=g.promise,a.getTemplate(e.options.rowTemplate).then(function(a){var b=c(a);g.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+e.options.rowTemplate+"'")})}return e.registerColumnBuilder(i.defaultColumnBuilder),e.registerRowBuilder(i.rowTemplateAssigner),e.registerRowsProcessor(function(a){return a.forEach(function(a){a.evaluateRowVisibility(!0)},50),a}),e.registerColumnsProcessor(function(a){return a.forEach(function(a){a.visible=angular.isDefined(a.colDef.visible)?a.colDef.visible:!0}),a},50),e.registerRowsProcessor(e.searchRows,100),e.options.externalSort&&angular.isFunction(e.options.externalSort)?e.registerRowsProcessor(e.options.externalSort,200):e.registerRowsProcessor(e.sortByColumn,200),e},defaultColumnBuilder:function(c,d,f){var g=[],h=function(b,f,h,i,j){c[b]?d[f]=c[b]:d[f]=h,g.push(a.getTemplate(d[f]).then(function(a){angular.isFunction(a)&&(a=a());var c="cellTooltip"===j?"col.cellTooltip(row,col)":"col.headerTooltip(col)";j&&d[j]===!1?a=a.replace(e.TOOLTIP,""):j&&d[j]&&(a=a.replace(e.TOOLTIP,'title="{{'+c+' CUSTOM_FILTERS }}"')),i?d[b]=a.replace(e.CUSTOM_FILTERS,function(){return d[i]?"|"+d[i]:""}):d[b]=a},function(a){throw new Error("Couldn't fetch/use colDef."+b+" '"+c[b]+"'")}))};return h("cellTemplate","providedCellTemplate","ui-grid/uiGridCell","cellFilter","cellTooltip"),d.cellTemplatePromise=g[0],h("headerCellTemplate","providedHeaderCellTemplate","ui-grid/uiGridHeaderCell","headerCellFilter","headerTooltip"),h("footerCellTemplate","providedFooterCellTemplate","ui-grid/uiGridFooterCell","footerCellFilter"),h("filterHeaderTemplate","providedFilterHeaderTemplate","ui-grid/ui-grid-filter"),d.compiledElementFnDefer=b.defer(),b.all(g)},rowTemplateAssigner:function(d){var e=this;if(d.rowTemplate){var f=b.defer();d.getRowTemplateFn=f.promise,a.getTemplate(d.rowTemplate).then(function(a){var b=c(a);f.resolve(b)},function(a){throw new Error("Couldn't fetch/use row template '"+d.rowTemplate+"'")})}else d.rowTemplate=e.options.rowTemplate,d.getRowTemplateFn=e.getRowTemplateFn;return d.getRowTemplateFn}};return i}])}(),function(){function a(a){return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var b=angular.module("ui.grid");b.service("rowSearcher",["gridUtil","uiGridConstants",function(b,c){var d=c.filter.CONTAINS,e={};return e.getTerm=function(a){if("undefined"==typeof a.term)return a.term;var b=a.term;return"string"==typeof b&&(b=b.trim()),b},e.stripTerm=function(b){var c=e.getTerm(b);return"string"==typeof c?a(c.replace(/(^\*|\*$)/g,"")):c},e.guessCondition=function(a){if("undefined"==typeof a.term||!a.term)return d;var b=e.getTerm(a);if(/\*/.test(b)){var c="";a.flags&&a.flags.caseSensitive||(c+="i");var f=b.replace(/(\\)?\*/g,function(a,b){return b?a:"[\\s\\S]*?"});return new RegExp("^"+f+"$",c)}return d},e.setupFilters=function(a){for(var d=[],f=a.length,g=0;f>g;g++){var h=a[g];if(h.noTerm||!b.isNullOrUndefined(h.term)){var i={},j="";h.flags&&h.flags.caseSensitive||(j+="i"),b.isNullOrUndefined(h.term)||(h.rawTerm?i.term=h.term:i.term=e.stripTerm(h)),i.noTerm=h.noTerm,h.condition?i.condition=h.condition:i.condition=e.guessCondition(h),i.flags=angular.extend({caseSensitive:!1,date:!1},h.flags),i.condition===c.filter.STARTS_WITH&&(i.startswithRE=new RegExp("^"+i.term,j)),i.condition===c.filter.ENDS_WITH&&(i.endswithRE=new RegExp(i.term+"$",j)),i.condition===c.filter.CONTAINS&&(i.containsRE=new RegExp(i.term,j)),i.condition===c.filter.EXACT&&(i.exactRE=new RegExp("^"+i.term+"$",j)),d.push(i)}}return d},e.runColumnFilter=function(a,b,d,e){var f,g=typeof e.condition,h=e.term;if(f=d.filterCellFiltered?a.getCellDisplayValue(b,d):a.getCellValue(b,d),e.condition instanceof RegExp)return e.condition.test(f);if("function"===g)return e.condition(h,f,b,d);if(e.startswithRE)return e.startswithRE.test(f);if(e.endswithRE)return e.endswithRE.test(f);if(e.containsRE)return e.containsRE.test(f);if(e.exactRE)return e.exactRE.test(f);if(e.condition===c.filter.NOT_EQUAL){var i=new RegExp("^"+h+"$");return!i.exec(f)}if("number"==typeof f&&"string"==typeof h){var j=parseFloat(h.replace(/\\\./,".").replace(/\\\-/,"-"));isNaN(j)||(h=j)}return e.flags.date===!0&&(f=new Date(f),h=new Date(h.replace(/\\/g,""))),e.condition===c.filter.GREATER_THAN?f>h:e.condition===c.filter.GREATER_THAN_OR_EQUAL?f>=h:e.condition===c.filter.LESS_THAN?h>f:e.condition===c.filter.LESS_THAN_OR_EQUAL?h>=f:!0},e.searchColumn=function(a,c,d,f){if(a.options.useExternalFiltering)return!0;for(var g=f.length,h=0;g>h;h++){var i=f[h];if(!b.isNullOrUndefined(i.term)&&""!==i.term||i.noTerm){var j=e.runColumnFilter(a,c,d,i);if(!j)return!1}}return!0},e.search=function(a,c,d){if(c){if(!a.options.enableFiltering)return c;for(var f=[],g=d.length,h=function(a){var c=!1;return a.forEach(function(a){(!b.isNullOrUndefined(a.term)&&""!==a.term||a.noTerm)&&(c=!0)}),c},i=0;g>i;i++){var j=d[i];"undefined"!=typeof j.filters&&h(j.filters)&&f.push({col:j,filters:e.setupFilters(j.filters)})}if(f.length>0){for(var k=function(a,b,c,d){b.visible&&!e.searchColumn(a,b,c,d)&&(b.visible=!1)},l=function(a,b){for(var d=c.length,e=0;d>e;e++)k(a,c[e],b.col,b.filters)},m=f.length,n=0;m>n;n++)l(a,f[n]);a.api.core.raise.rowsVisibleChanged&&a.api.core.raise.rowsVisibleChanged()}return c}},e}])}(),function(){var a=angular.module("ui.grid");a.service("rowSorter",["$parse","uiGridConstants",function(a,b){var c="("+b.CURRENCY_SYMBOLS.map(function(a){return"\\"+a}).join("|")+")?",d=(new RegExp("^[-+]?"+c+"[\\d,.]+"+c+"%?$"),{colSortFnCache:{}});return d.guessSortFn=function(a){switch(a){case"number":return d.sortNumber;case"numberStr":return d.sortNumberStr;case"boolean":return d.sortBool;case"string":return d.sortAlpha;case"date":return d.sortDate;case"object":return d.basicSort;default:throw new Error("No sorting function found for type:"+a)}},d.handleNulls=function(a,b){if(!a&&0!==a&&a!==!1||!b&&0!==b&&b!==!1){if(!a&&0!==a&&a!==!1&&!b&&0!==b&&b!==!1)return 0;if(!a&&0!==a&&a!==!1)return 1;if(!b&&0!==b&&b!==!1)return-1}return null},d.basicSort=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a===b?0:b>a?-1:1},d.sortNumber=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a-b},d.sortNumberStr=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e,f,g=!1,h=!1;return e=parseFloat(a.replace(/[^0-9.-]/g,"")),isNaN(e)&&(g=!0),f=parseFloat(b.replace(/[^0-9.-]/g,"")),isNaN(f)&&(h=!0),g&&h?0:g?1:h?-1:e-f},d.sortAlpha=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;var e=a.toString().toLowerCase(),f=b.toString().toLowerCase();return e===f?0:e.localeCompare(f)},d.sortDate=function(a,b){var c=d.handleNulls(a,b);if(null!==c)return c;a instanceof Date||(a=new Date(a)),b instanceof Date||(b=new Date(b));var e=a.getTime(),f=b.getTime();return e===f?0:f>e?-1:1},d.sortBool=function(a,b){var c=d.handleNulls(a,b);return null!==c?c:a&&b?0:a||b?a?1:-1:0},d.getSortFn=function(a,b,c){var e;return d.colSortFnCache[b.colDef.name]?e=d.colSortFnCache[b.colDef.name]:void 0!==b.sortingAlgorithm?(e=b.sortingAlgorithm,d.colSortFnCache[b.colDef.name]=b.sortingAlgorithm):b.sortCellFiltered&&b.cellFilter?(e=d.sortAlpha,
-d.colSortFnCache[b.colDef.name]=e):(e=d.guessSortFn(b.colDef.type),e?d.colSortFnCache[b.colDef.name]=e:e=d.sortAlpha),e},d.prioritySort=function(a,b){return void 0!==a.sort.priority&&void 0!==b.sort.priority?a.sort.priority<b.sort.priority?-1:a.sort.priority===b.sort.priority?0:1:void 0!==a.sort.priority?-1:void 0!==b.sort.priority?1:0},d.sort=function(a,c,e){if(c){if(a.options.useExternalSorting)return c;var f=[];if(e.forEach(function(a){!a.sort||a.sort.ignoreSort||!a.sort.direction||a.sort.direction!==b.ASC&&a.sort.direction!==b.DESC||f.push(a)}),f=f.sort(d.prioritySort),0===f.length)return c;var g,h,i=function(a,b){a.entity.$$uiGridIndex=b};c.forEach(i);var j=c.slice(0),k=function(c,e){for(var i,k=0,l=0;0===k&&l<f.length;){g=f[l],h=f[l].sort.direction,i=d.getSortFn(a,g,j);var m,n;g.sortCellFiltered?(m=a.getCellDisplayValue(c,g),n=a.getCellDisplayValue(e,g)):(m=a.getCellValue(c,g),n=a.getCellValue(e,g)),k=i(m,n,c,e,h,g),l++}return 0===k?c.entity.$$uiGridIndex-e.entity.$$uiGridIndex:h===b.ASC?k:0-k},l=c.sort(k),m=function(a,b){delete a.entity.$$uiGridIndex};return c.forEach(m),l}},d}])}(),function(){function a(a){var b=a;return"undefined"!=typeof b.length&&b.length&&(b=a[0]),b.ownerDocument.defaultView.getComputedStyle(b,null)}function b(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0,h=["Top","Right","Bottom","Left"];4>f;f+=2){var i=h[f];if("margin"===c){var j=parseFloat(e[c+i]);isNaN(j)||(g+=j)}if(d){if("content"===c){var k=parseFloat(e["padding"+i]);isNaN(k)||(g-=k)}if("margin"!==c){var l=parseFloat(e["border"+i+"Width"]);isNaN(l)||(g-=l)}}else{var m=parseFloat(e["padding"+i]);if(isNaN(m)||(g+=m),"padding"!==c){var n=parseFloat(e["border"+i+"Width"]);isNaN(n)||(g+=n)}}}return g}function c(c,d,e){var f,h=!0,i=a(c),j="border-box"===i.boxSizing;if(0>=f||null==f){if(f=i[d],(0>f||null==f)&&(f=c.style[d]),g.test(f))return f;h=j&&!0,f=parseFloat(f)||0}var k=f+b(c,d,e||(j?"border":"content"),h,i);return k}function d(b){b=angular.element(b)[0];var c=b.parentElement;return c||(c=document.getElementsByTagName("body")[0]),parseInt(a(c).fontSize)||parseInt(a(b).fontSize)||16}var e,f=angular.module("ui.grid");"function"!=typeof Function.prototype.bind&&(e=function(){var a=Array.prototype.slice;return function(b){var c=this,d=a.call(arguments,1);return d.length?function(){return arguments.length?c.apply(b,d.concat(a.call(arguments))):c.apply(b,d)}:function(){return arguments.length?c.apply(b,arguments):c.call(b)}}});var g=new RegExp("^("+/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source+")(?!px)[a-z%]+$","i"),h=/^(block|none|table(?!-c[ea]).+)/,i={position:"absolute",visibility:"hidden",display:"block"},j=["0","0","0","0"],k="uiGrid-";f.service("gridUtil",["$log","$window","$document","$http","$templateCache","$timeout","$interval","$injector","$q","$interpolate","uiGridConstants",function(f,g,l,m,n,o,p,q,r,s,t){function u(a,b){var c=angular.element(this),d=0,e=0,f=0,g=0;if(b.originalEvent&&(b=b.originalEvent),"detail"in b&&(f=-1*b.detail),"wheelDelta"in b&&(f=b.wheelDelta),"wheelDeltaY"in b&&(f=b.wheelDeltaY),"wheelDeltaX"in b&&(e=-1*b.wheelDeltaX),"axis"in b&&b.axis===b.HORIZONTAL_AXIS&&(e=-1*f,f=0),d=0===f?e:f,"deltaY"in b&&(f=-1*b.deltaY,d=f),"deltaX"in b&&(e=b.deltaX,0===f&&(d=-1*e)),0!==f||0!==e){if(1===b.deltaMode){var h=c.data("mousewheel-line-height");d*=h,f*=h,e*=h}else if(2===b.deltaMode){var i=c.data("mousewheel-page-height");d*=i,f*=i,e*=i}g=Math.max(Math.abs(f),Math.abs(e)),(!z||z>g)&&(z=g,w(b,g)&&(z/=40)),d=Math[d>=1?"floor":"ceil"](d/z),e=Math[e>=1?"floor":"ceil"](e/z),f=Math[f>=1?"floor":"ceil"](f/z);var j={originalEvent:b,deltaX:e,deltaY:f,deltaFactor:z,preventDefault:function(){b.preventDefault()},stopPropagation:function(){b.stopPropagation()}};y&&clearTimeout(y),y=setTimeout(v,200),a.call(c[0],j)}}function v(){z=null}function w(a,b){return"mousewheel"===a.type&&b%120===0}var x={augmentWidthOrHeight:b,getStyles:a,createBoundedWrapper:function(a,b){return function(){return b.apply(a,arguments)}},readableColumnName:function(a){return"undefined"==typeof a||void 0===a||null===a?a:("string"!=typeof a&&(a=String(a)),a.replace(/_+/g," ").replace(/^[A-Z]+$/,function(a){return angular.lowercase(angular.uppercase(a.charAt(0))+a.slice(1))}).replace(/([\w\u00C0-\u017F]+)/g,function(a){return angular.uppercase(a.charAt(0))+a.slice(1)}).replace(/(\w+?(?=[A-Z]))/g,"$1 "))},getColumnsFromData:function(a,b){var c=[];if(!a||"undefined"==typeof a[0]||void 0===a[0])return[];angular.isUndefined(b)&&(b=[]);var d=a[0];return angular.forEach(d,function(a,d){-1===b.indexOf(d)&&c.push({name:d})}),c},newId:function(){var a=(new Date).getTime();return function(){return a+=1}}(),getTemplate:function(a){if(n.get(a))return x.postProcessTemplate(n.get(a));if(angular.isFunction(a.then))return a.then(x.postProcessTemplate);try{if(angular.element(a).length>0)return r.when(a).then(x.postProcessTemplate)}catch(b){}return x.logDebug("fetching url",a),m({method:"GET",url:a}).then(function(b){var c=b.data.trim();return n.put(a,c),c},function(b){throw new Error("Could not get template "+a+": "+b)}).then(x.postProcessTemplate)},postProcessTemplate:function(a){var b=s.startSymbol(),c=s.endSymbol();return("{{"!==b||"}}"!==c)&&(a=a.replace(/\{\{/g,b),a=a.replace(/\}\}/g,c)),r.when(a)},guessType:function(a){var b=typeof a;switch(b){case"number":case"boolean":case"string":return b;default:return angular.isDate(a)?"date":"object"}},elementWidth:function(a){},elementHeight:function(a){},getScrollbarWidth:function(){var a=document.createElement("div");a.style.visibility="hidden",a.style.width="100px",a.style.msOverflowStyle="scrollbar",document.body.appendChild(a);var b=a.offsetWidth;a.style.overflow="scroll";var c=document.createElement("div");c.style.width="100%",a.appendChild(c);var d=c.offsetWidth;return a.parentNode.removeChild(a),b-d},swap:function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},fakeElement:function(a,b,c,d){var e,f,g=angular.element(a).clone()[0];for(f in b)g.style[f]=b[f];return angular.element(document.body).append(g),e=c.call(g,g),angular.element(g).remove(),e},normalizeWheelEvent:function(a){var b,c,d,e=a||window.event,f=([].slice.call(arguments,1),0),g=0,h=0,i=0,j=0;return e.originalEvent&&(e=e.originalEvent),e.wheelDelta&&(f=e.wheelDelta),e.detail&&(f=-1*e.detail),h=f,void 0!==e.axis&&e.axis===e.HORIZONTAL_AXIS&&(h=0,g=-1*f),e.deltaY&&(h=-1*e.deltaY,f=h),e.deltaX&&(g=e.deltaX,f=-1*g),void 0!==e.wheelDeltaY&&(h=e.wheelDeltaY),void 0!==e.wheelDeltaX&&(g=e.wheelDeltaX),i=Math.abs(f),(!b||b>i)&&(b=i),j=Math.max(Math.abs(h),Math.abs(g)),(!c||c>j)&&(c=j),d=f>0?"floor":"ceil",f=Math[d](f/b),g=Math[d](g/c),h=Math[d](h/c),{delta:f,deltaX:g,deltaY:h}},isTouchEnabled:function(){var a;return("ontouchstart"in g||g.DocumentTouch&&l instanceof DocumentTouch)&&(a=!0),a},isNullOrUndefined:function(a){return void 0===a||null===a?!0:!1},endsWith:function(a,b){return a&&b&&"string"==typeof a?-1!==a.indexOf(b,a.length-b.length):!1},arrayContainsObjectWithProperty:function(a,b,c){var d=!1;return angular.forEach(a,function(a){a[b]===c&&(d=!0)}),d},numericAndNullSort:function(a,b){return null===a?1:null===b?-1:null===a&&null===b?0:a-b},disableAnimations:function(a){var b;try{b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!1):b.enabled(!1,a)}catch(c){}},enableAnimations:function(a){var b;try{return b=q.get("$animate"),angular.version.major>1||1===angular.version.major&&angular.version.minor>=4?b.enabled(a,!0):b.enabled(!0,a),b}catch(c){}},nextUid:function(){for(var a,b=j.length;b;){if(b--,a=j[b].charCodeAt(0),57===a)return j[b]="A",k+j.join("");if(90!==a)return j[b]=String.fromCharCode(a+1),k+j.join("");j[b]="0"}return j.unshift("0"),k+j.join("")},hashKey:function(a){var b,c=typeof a;return"object"===c&&null!==a?"function"==typeof(b=a.$$hashKey)?b=a.$$hashKey():"undefined"!=typeof a.$$hashKey&&a.$$hashKey?b=a.$$hashKey:void 0===b&&(b=a.$$hashKey=x.nextUid()):b=a,c+":"+b},resetUids:function(){j=["0","0","0"]},logError:function(a){t.LOG_ERROR_MESSAGES&&f.error(a)},logWarn:function(a){t.LOG_WARN_MESSAGES&&f.warn(a)},logDebug:function(){t.LOG_DEBUG_MESSAGES&&f.debug.apply(f,arguments)}};x.focus={queue:[],byId:function(a,b){this._purgeQueue();var c=o(function(){var c=(b&&b.id?b.id+"-":"")+a,d=g.document.getElementById(c);d?d.focus():x.logWarn("[focus.byId] Element id "+c+" was not found.")});return this.queue.push(c),c},byElement:function(a){if(!angular.isElement(a))return x.logWarn("Trying to focus on an element that isn't an element."),r.reject("not-element");a=angular.element(a),this._purgeQueue();var b=o(function(){a&&a[0].focus()});return this.queue.push(b),b},bySelector:function(a,b,c){var d=this;if(!angular.isElement(a))throw new Error("The parent element is not an element.");a=angular.element(a);var e=function(){var c=a[0].querySelector(b);return d.byElement(c)};if(this._purgeQueue(),c){var f=o(e);return this.queue.push(o(e)),f}return e()},_purgeQueue:function(){this.queue.forEach(function(a){o.cancel(a)}),this.queue=[]}},["width","height"].forEach(function(b){var d=angular.uppercase(b.charAt(0))+b.substr(1);x["element"+d]=function(d,e){var f=d;if(f&&"undefined"!=typeof f.length&&f.length&&(f=d[0]),f&&null!==f){var g=a(f);return 0===f.offsetWidth&&h.test(g.display)?x.swap(f,i,function(){return c(f,b,e)}):c(f,b,e)}return null},x["outerElement"+d]=function(a,b){return a?x["element"+d].call(this,a,b?"margin":"border"):null}}),x.closestElm=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c;["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].some(function(a){return"function"==typeof document.body[a]?(c=a,!0):!1});for(var d;null!==a;){if(d=a.parentElement,null!==d&&d[c](b))return d;a=d}return null},x.type=function(a){var b=Function.prototype.toString.call(a.constructor);return b.match(/function (.*?)\(/)[1]},x.getBorderSize=function(b,c){"undefined"!=typeof b.length&&b.length&&(b=b[0]);var d=a(b);c=c?"border"+c.charAt(0).toUpperCase()+c.slice(1):"border",c+="Width";var e=parseInt(d[c],10);return isNaN(e)?0:e},x.detectBrowser=function(){var a=g.navigator.userAgent,b={chrome:/chrome/i,safari:/safari/i,firefox:/firefox/i,ie:/internet explorer|trident\//i};for(var c in b)if(b[c].test(a))return c;return"unknown"},x.rtlScrollType=function B(){if(B.type)return B.type;var a=angular.element('<div dir="rtl" style="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll">A</div>')[0],b="reverse";return document.body.appendChild(a),a.scrollLeft>0?b="default":(a.scrollLeft=1,0===a.scrollLeft&&(b="negative")),angular.element(a).remove(),B.type=b,b},x.normalizeScrollLeft=function(a,b){"undefined"!=typeof a.length&&a.length&&(a=a[0]);var c=a.scrollLeft;if(b.isRTL())switch(x.rtlScrollType()){case"default":return a.scrollWidth-c-a.clientWidth;case"negative":return Math.abs(c);case"reverse":return c}return c},x.denormalizeScrollLeft=function(a,b,c){if("undefined"!=typeof a.length&&a.length&&(a=a[0]),c.isRTL())switch(x.rtlScrollType()){case"default":var d=a.scrollWidth-a.clientWidth;return d-b;case"negative":return-1*b;case"reverse":return b}return b},x.preEval=function(a){var b=t.BRACKET_REGEXP.exec(a);if(b)return(b[1]?x.preEval(b[1]):b[1])+b[2]+(b[3]?x.preEval(b[3]):b[3]);a=a.replace(t.APOS_REGEXP,"\\'");var c=a.split(t.DOT_REGEXP),d=[c.shift()];return angular.forEach(c,function(a){d.push(a.replace(t.FUNC_REGEXP,"']$1"))}),d.join("['")},x.debounce=function(a,b,c){function d(){g=this,f=arguments;var d=function(){e=null,c||(h=a.apply(g,f))},i=c&&!e;return e&&o.cancel(e),e=o(d,b,!1),i&&(h=a.apply(g,f)),h}var e,f,g,h;return d.cancel=function(){o.cancel(e),e=null},d},x.throttle=function(a,b,c){function d(b){g=+new Date,a.apply(e,f),p(function(){h=null},0,1,!1)}c=c||{};var e,f,g=0,h=null;return function(){if(e=this,f=arguments,null===h){var a=+new Date-g;a>b?d():c.trailing&&(h=p(d,b-a,1,!1))}}},x.on={},x.off={},x._events={},x.addOff=function(a){x.off[a]=function(b,c){var d=x._events[a].indexOf(c);d>0&&x._events[a].removeAt(d)}};var y,z,A="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"];return x.on.mousewheel=function(a,b){if(a&&b){var c=angular.element(a);c.data("mousewheel-line-height",d(c)),c.data("mousewheel-page-height",x.elementHeight(c)),c.data("mousewheel-callbacks")||c.data("mousewheel-callbacks",{});var f=c.data("mousewheel-callbacks");f[b]=(Function.prototype.bind||e).call(u,c[0],b);for(var g=A.length;g;)c.on(A[--g],f[b]);c.on("$destroy",function(){for(var a=A.length;a;)c.off(A[--a],f[b])})}},x.off.mousewheel=function(a,b){var c=angular.element(a),d=c.data("mousewheel-callbacks"),e=d[b];if(e)for(var f=A.length;f;)c.off(A[--f],e);delete d[b],0===Object.keys(d).length&&(c.removeData("mousewheel-line-height"),c.removeData("mousewheel-page-height"),c.removeData("mousewheel-callbacks"))},x}]),f.filter("px",function(){return function(a){return a.match(/^[\d\.]+$/)?a+"px":a}})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){var b={aggregate:{label:"položky"},groupPanel:{description:"PÅ™esuňte záhlaví zde pro vytvoÅ™ení skupiny dle sloupce."},search:{placeholder:"Hledat...",showingItems:"Zobrazuji položky:",selectedItems:"Vybrané položky:",totalItems:"Celkem položek:",size:"Velikost strany:",first:"První strana",next:"Další strana",previous:"PÅ™edchozí strana",last:"Poslední strana"},menu:{text:"Vyberte sloupec:"},sort:{ascending:"SeÅ™adit od A-Z",descending:"SeÅ™adit od Z-A",remove:"Odebrat seÅ™azení"},column:{hide:"Schovat sloupec"},aggregation:{count:"celkem řádků: ",sum:"celkem: ",avg:"avg: ",min:"min.: ",max:"max.: "},pinning:{pinLeft:"Zamknout vlevo",pinRight:"Zamknout vpravo",unpin:"Odemknout"},gridMenu:{columns:"Sloupce:",importerTitle:"Importovat soubor",exporterAllAsCsv:"Exportovat vÅ¡echna data do csv",exporterVisibleAsCsv:"Exportovat viditelná data do csv",exporterSelectedAsCsv:"Exportovat vybraná data do csv",exporterAllAsPdf:"Exportovat vÅ¡echna data do pdf",exporterVisibleAsPdf:"Exportovat viditelná data do pdf",exporterSelectedAsPdf:"Exportovat vybraná data do pdf",clearAllFilters:"Odstranit vÅ¡echny filtry"},importer:{noHeaders:"Názvy sloupců se nepodaÅ™ilo získat, obsahuje soubor záhlaví?",noObjects:"Data se nepodaÅ™ilo zpracovat, obsahuje soubor řádky mimo záhlaví?",invalidCsv:"Soubor nelze zpracovat, jedná se o CSV?",invalidJson:"Soubor nelze zpracovat, je to JSON?",jsonNotArray:"Soubor musí obsahovat json. UkonÄuji.."},pagination:{sizes:"položek na stránku",totalItems:"položek"},grouping:{group:"Seskupit",ungroup:"Odebrat seskupení",aggregate_count:"Agregace: Count",aggregate_sum:"Agregace: Sum",aggregate_max:"Agregace: Max",aggregate_min:"Agregace: Min",aggregate_avg:"Agregace: Avg",aggregate_remove:"Agregace: Odebrat"}};return a.add("cs",b),a.add("cz",b),a.add("cs-cz",b),a.add("cs-CZ",b),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("da",{aggregate:{label:"artikler"},groupPanel:{description:"Grupér rækker udfra en kolonne ved at trække dens overskift hertil."},search:{placeholder:"Søg...",showingItems:"Viste rækker:",selectedItems:"Valgte rækker:",totalItems:"Rækker totalt:",size:"Side størrelse:",first:"Første side",next:"Næste side",previous:"Forrige side",last:"Sidste side"},menu:{text:"Vælg kolonner:"},sort:{ascending:"Sorter stigende",descending:"Sorter faldende",none:"Sorter ingen",remove:"Fjern sortering"},column:{hide:"Skjul kolonne"},aggregation:{count:"antal rækker: ",sum:"sum: ",avg:"gns: ",min:"min: ",max:"max: "},gridMenu:{columns:"Kolonner:",importerTitle:"Importer fil",exporterAllAsCsv:"Eksporter alle data som csv",exporterVisibleAsCsv:"Eksporter synlige data som csv",exporterSelectedAsCsv:"Eksporter markerede data som csv",exporterAllAsPdf:"Eksporter alle data som pdf",exporterVisibleAsPdf:"Eksporter synlige data som pdf",exporterSelectedAsPdf:"Eksporter markerede data som pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"GÃ¥ til første",pageBack:"GÃ¥ tilbage",pageSelected:"Valgte side",pageForward:"GÃ¥ frem",pageToLast:"GÃ¥ til sidste"},sizes:"genstande per side",totalItems:"genstande",through:"gennem",of:"af"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("de",{headerCell:{aria:{defaultFilterLabel:"Filter für Spalte",removeFilter:"Filter löschen",columnMenuButtonLabel:"Spaltenmenü"},priority:"Priorität:",filterLabel:"Filter für Spalte: "},aggregate:{label:"Eintrag"},groupPanel:{description:"Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren."},search:{placeholder:"Suche...",showingItems:"Zeige Einträge:",selectedItems:"Ausgewählte Einträge:",totalItems:"Einträge gesamt:",size:"Einträge pro Seite:",first:"Erste Seite",next:"Nächste Seite",previous:"Vorherige Seite",last:"Letzte Seite"},menu:{text:"Spalten auswählen:"},sort:{ascending:"aufsteigend sortieren",descending:"absteigend sortieren",none:"keine Sortierung",remove:"Sortierung zurücksetzen"},column:{hide:"Spalte ausblenden"},aggregation:{count:"Zeilen insgesamt: ",sum:"gesamt: ",avg:"Durchschnitt: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Links anheften",pinRight:"Rechts anheften",unpin:"Lösen"},columnMenu:{close:"Schließen"},gridMenu:{aria:{buttonLabel:"Tabellenmenü"},columns:"Spalten:",importerTitle:"Datei importieren",exporterAllAsCsv:"Alle Daten als CSV exportieren",exporterVisibleAsCsv:"sichtbare Daten als CSV exportieren",exporterSelectedAsCsv:"markierte Daten als CSV exportieren",exporterAllAsPdf:"Alle Daten als PDF exportieren",exporterVisibleAsPdf:"sichtbare Daten als PDF exportieren",exporterSelectedAsPdf:"markierte Daten als PDF exportieren",clearAllFilters:"Alle Filter zurücksetzen"},importer:{noHeaders:"Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?",noObjects:"Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?",invalidCsv:"Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?",invalidJson:"Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?",jsonNotArray:"Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab."},pagination:{aria:{pageToFirst:"Zum Anfang",pageBack:"Seite zurück",pageSelected:"Ausgwählte Seite",pageForward:"Seite vor",pageToLast:"Zum Ende"},sizes:"Einträge pro Seite",totalItems:"Einträge",through:"bis",of:"von"},grouping:{group:"Gruppieren",ungroup:"Gruppierung aufheben",aggregate_count:"Agg: Anzahl",aggregate_sum:"Agg: Summe",aggregate_max:"Agg: Maximum",aggregate_min:"Agg: Minimum",aggregate_avg:"Agg: Mittelwert",aggregate_remove:"Aggregation entfernen"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("en",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"},validate:{error:"Error:",minLength:"Value should be at least THRESHOLD characters long.",maxLength:"Value should be at most THRESHOLD characters long.",required:"A value is needed."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("es",{aggregate:{label:"Artículos"},groupPanel:{description:"Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna."},search:{placeholder:"Buscar...",showingItems:"Artículos Mostrados:",selectedItems:"Artículos Seleccionados:",totalItems:"Artículos Totales:",size:"Tamaño de Página:",first:"Primera Página",next:"Página Siguiente",previous:"Página Anterior",last:"Última Página"},menu:{text:"Elegir columnas:"},sort:{ascending:"Orden Ascendente",descending:"Orden Descendente",remove:"Sin Ordenar"},column:{hide:"Ocultar la columna"},aggregation:{count:"filas totales: ",sum:"total: ",avg:"media: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fijar a la Izquierda",pinRight:"Fijar a la Derecha",unpin:"Quitar Fijación"},gridMenu:{columns:"Columnas:",importerTitle:"Importar archivo",exporterAllAsCsv:"Exportar todo como csv",exporterVisibleAsCsv:"Exportar vista como csv",exporterSelectedAsCsv:"Exportar selección como csv",exporterAllAsPdf:"Exportar todo como pdf",exporterVisibleAsPdf:"Exportar vista como pdf",exporterSelectedAsPdf:"Exportar selección como pdf",clearAllFilters:"Limpiar todos los filtros"},importer:{noHeaders:"No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?",noObjects:"No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?",invalidCsv:"No fue posible procesar el archivo, ¿es un CSV válido?",invalidJson:"No fue posible procesar el archivo, ¿es un Json válido?",jsonNotArray:"El archivo json importado debe contener un array, abortando."},pagination:{sizes:"registros por página",totalItems:"registros",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Cont",aggregate_sum:"Agr: Sum",aggregate_max:"Agr: Máx",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Prom",aggregate_remove:"Agr: Quitar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fa",{aggregate:{label:"قلم"},groupPanel:{description:"عنوان یک ستون را بگیر Ùˆ به گروهی از آن ستون رها Ú©Ù†."},search:{placeholder:"جستجو...",showingItems:"نمایش اقلام:",selectedItems:"قلم‌های انتخاب شده:",totalItems:"مجموع اقلام:",size:"اندازه‌ی صÙحه:",first:"اولین صÙحه",next:"صÙحه‌ی‌بعدی",previous:"صÙحه‌ی‌ قبلی",last:"آخرین صÙحه"},menu:{text:"ستون‌های انتخابی:"},sort:{ascending:"ترتیب صعودی",descending:"ترتیب نزولی",remove:"حذ٠مرتب کردن"},column:{hide:"پنهان‌کردن ستون"},aggregation:{count:"تعداد: ",sum:"مجموع: ",avg:"میانگین: ",min:"کمترین: ",max:"بیشترین: "},pinning:{pinLeft:"پین کردن سمت Ú†Ù¾",pinRight:"پین کردن سمت راست",unpin:"حذ٠پین"},gridMenu:{columns:"ستون‌ها:",importerTitle:"وارد کردن Ùایل",exporterAllAsCsv:"خروجی تمام داده‌ها در Ùایل csv",exporterVisibleAsCsv:"خروجی داده‌های قابل مشاهده در Ùایل csv",exporterSelectedAsCsv:"خروجی داده‌های انتخاب‌شده در Ùایل csv",exporterAllAsPdf:"خروجی تمام داده‌ها در Ùایل pdf",exporterVisibleAsPdf:"خروجی داده‌های قابل مشاهده در Ùایل pdf",exporterSelectedAsPdf:"خروجی داده‌های انتخاب‌شده در Ùایل pdf",clearAllFilters:"پاک کردن تمام Ùیلتر"},importer:{noHeaders:"نام ستون قابل استخراج نیست. آیا Ùایل عنوان دارد؟",noObjects:"اشیا قابل استخراج نیستند. آیا به جز عنوان‌ها در Ùایل داده وجود دارد؟",invalidCsv:"Ùایل قابل پردازش نیست. آیا Ùرمت csv معتبر است؟",invalidJson:"Ùایل قابل پردازش نیست. آیا Ùرمت json معتبر است؟",jsonNotArray:"Ùایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد."},pagination:{sizes:"اقلام در هر صÙحه",totalItems:"اقلام",of:"از"},grouping:{group:"گروه‌بندی",ungroup:"حذ٠گروه‌بندی",aggregate_count:"Agg: تعداد",aggregate_sum:"Agg: جمع",aggregate_max:"Agg: بیشینه",aggregate_min:"Agg: کمینه",aggregate_avg:"Agg: میانگین",aggregate_remove:"Agg: حذÙ"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fi",{aggregate:{label:"rivit"},groupPanel:{description:"Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan."},search:{placeholder:"Hae...",showingItems:"Näytetään rivejä:",selectedItems:"Valitut rivit:",totalItems:"Rivejä yht.:",size:"Näytä:",first:"Ensimmäinen sivu",next:"Seuraava sivu",previous:"Edellinen sivu",last:"Viimeinen sivu"},menu:{text:"Valitse sarakkeet:"},sort:{ascending:"Järjestä nouseva",descending:"Järjestä laskeva",remove:"Poista järjestys"},column:{hide:"Piilota sarake"},aggregation:{count:"Rivejä yht.: ",sum:"Summa: ",avg:"K.a.: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Lukitse vasemmalle",pinRight:"Lukitse oikealle",unpin:"Poista lukitus"},gridMenu:{columns:"Sarakkeet:",importerTitle:"Tuo tiedosto",exporterAllAsCsv:"Vie tiedot csv-muodossa",exporterVisibleAsCsv:"Vie näkyvä tieto csv-muodossa",exporterSelectedAsCsv:"Vie valittu tieto csv-muodossa",exporterAllAsPdf:"Vie tiedot pdf-muodossa",exporterVisibleAsPdf:"Vie näkyvä tieto pdf-muodossa",exporterSelectedAsPdf:"Vie valittu tieto pdf-muodossa",clearAllFilters:"Puhdista kaikki suodattimet"},importer:{noHeaders:"Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?",noObjects:"Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?",invalidCsv:"Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?",invalidJson:"Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?",jsonNotArray:"Tiedosto ei sisältänyt taulukkoa, lopetetaan."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("fr",{headerCell:{aria:{defaultFilterLabel:"Filtre de la colonne",removeFilter:"Supprimer le filtre",columnMenuButtonLabel:"Menu de la colonne"},priority:"Priorité:",filterLabel:"Filtre de la colonne: "},aggregate:{label:"éléments"},groupPanel:{description:"Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes."},search:{placeholder:"Recherche...",showingItems:"Affichage des éléments :",selectedItems:"Éléments sélectionnés :",totalItems:"Nombre total d'éléments:",size:"Taille de page:",first:"Première page",next:"Page Suivante",previous:"Page précédente",last:"Dernière page"},menu:{text:"Choisir des colonnes :"},sort:{ascending:"Trier par ordre croissant",descending:"Trier par ordre décroissant",none:"Aucun tri",remove:"Enlever le tri"},column:{hide:"Cacher la colonne"},aggregation:{count:"lignes totales: ",sum:"total: ",avg:"moy: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Épingler à gauche",pinRight:"Épingler à droite",unpin:"Détacher"},columnMenu:{close:"Fermer"},gridMenu:{aria:{buttonLabel:"Menu du tableau"},columns:"Colonnes:",importerTitle:"Importer un fichier",exporterAllAsCsv:"Exporter toutes les données en CSV",exporterVisibleAsCsv:"Exporter les données visibles en CSV",exporterSelectedAsCsv:"Exporter les données sélectionnées en CSV",exporterAllAsPdf:"Exporter toutes les données en PDF",exporterVisibleAsPdf:"Exporter les données visibles en PDF",exporterSelectedAsPdf:"Exporter les données sélectionnées en PDF",clearAllFilters:"Nettoyez tous les filtres"},importer:{noHeaders:"Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?",noObjects:"Aucun objet trouvé, le fichier possède-t-il des données autres que l'en-tête ?",invalidCsv:"Le fichier n'a pas pu être traité, le CSV est-il valide ?",invalidJson:"Le fichier n'a pas pu être traité, le JSON est-il valide ?",jsonNotArray:"Le fichier JSON importé doit contenir un tableau, abandon."},pagination:{aria:{pageToFirst:"Aller à la première page",pageBack:"Page précédente",pageSelected:"Page sélectionnée",pageForward:"Page suivante",pageToLast:"Aller à la dernière page"},sizes:"éléments par page",totalItems:"éléments",through:"à",of:"sur"},grouping:{group:"Grouper",ungroup:"Dégrouper",aggregate_count:"Agg: Compter",aggregate_sum:"Agg: Somme",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Moy",aggregate_remove:"Agg: Retirer"},validate:{error:"Erreur:",minLength:"La valeur doit être supérieure ou égale à THRESHOLD caractères.",maxLength:"La valeur doit être inférieure ou égale à THRESHOLD caractères.",required:"Une valeur est nécéssaire."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("he",{aggregate:{label:"items"},groupPanel:{description:"גרור עמודה לכ×ן ושחרר בכדי לקבץ עמודה זו."},search:{placeholder:"חפש...",showingItems:"מציג:",selectedItems:'סה"×› נבחרו:',totalItems:'סה"×› רשומות:',size:"תוצ×ות בדף:",first:"דף ר×שון",next:"דף הב×",previous:"דף קוד×",last:"דף ×חרון"},menu:{text:"בחר עמודות:"},sort:{ascending:"סדר עולה",descending:"סדר יורד",remove:"בטל"},column:{hide:"טור הסתר"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clean all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("hy",{aggregate:{label:"Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€"},groupPanel:{description:"Ô¸Õ½Õ¿ Õ½ÕµÕ¡Õ¶ Õ­Õ´Õ¢Õ¡Õ¾Õ¸Ö€Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€ Ö„Õ¡Õ·Õ¥Ö„ Ö‡ Õ£ÖÕ¥Ö„ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Õ«Ö€Õ¶ Õ¡ÕµÕ½Õ¿Õ¥Õ²Ö‰"},search:{placeholder:"Õ“Õ¶Õ¿Ö€Õ¸Ö‚Õ´...",showingItems:"Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ",selectedItems:"Ô¸Õ¶Õ¿Ö€Õ¾Õ¡Õ®:",totalItems:"Ô¸Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨Õ",size:"ÕÕ¸Õ²Õ¥Ö€Õ« Ö„Õ¡Õ¶Õ¡Õ¯Õ¨ Õ§Õ»Õ¸Ö‚Õ´Õ",first:"Ô±Õ¼Õ¡Õ»Õ«Õ¶ Õ§Õ»",next:"Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ§Õ»",previous:"Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ§Õ»",last:"ÕŽÕ¥Ö€Õ»Õ«Õ¶ Õ§Õ»"},menu:{text:"Ô¸Õ¶Õ¿Ö€Õ¥Õ¬ Õ½ÕµÕ¸Ö‚Õ¶Õ¥Ö€Õ¨:"},sort:{ascending:"Ô±Õ³Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¸Õ¾",descending:"Õ†Õ¾Õ¡Õ¦Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¸Õ¾",remove:"Õ€Õ¡Õ¶Õ¥Õ¬ "},column:{hide:"Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ½ÕµÕ¸Ö‚Õ¶Õ¨"},aggregation:{count:"Õ¨Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨ Õ¿Õ¸Õ²Õ ",
-sum:"Õ¨Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨Õ ",avg:"Õ´Õ«Õ»Õ«Õ¶Õ ",min:"Õ´Õ«Õ¶Õ ",max:"Õ´Õ¡Ö„Õ½Õ "},pinning:{pinLeft:"Ô¿ÕºÖÕ¶Õ¥Õ¬ Õ±Õ¡Õ­ Õ¯Õ¸Õ²Õ´Õ¸Ö‚Õ´",pinRight:"Ô¿ÕºÖÕ¶Õ¥Õ¬ Õ¡Õ» Õ¯Õ¸Õ²Õ´Õ¸Ö‚Õ´",unpin:"Ô±Ö€Õ±Õ¡Õ¯Õ¥Õ¬"},gridMenu:{columns:"ÕÕµÕ¸Ö‚Õ¶Õ¥Ö€:",importerTitle:"Õ†Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬",exporterAllAsCsv:"Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¨ CSV",exporterVisibleAsCsv:"Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¥Ö€Ö‡Õ¡ÖÕ¸Õ² Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ CSV",exporterSelectedAsCsv:"Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ CSV",exporterAllAsPdf:"Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ PDF",exporterVisibleAsPdf:"Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¥Ö€Ö‡Õ¡ÖÕ¸Õ² Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ PDF",exporterSelectedAsPdf:"Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ PDF",clearAllFilters:"Õ„Õ¡Ö„Ö€Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€ Ö†Õ«Õ¬Õ¿Ö€Õ¥Ö€Õ¨"},importer:{noHeaders:"Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ¸Ö€Õ¸Õ·Õ¥Õ¬ Õ½ÕµÕ¡Õ¶ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ¥Ö€Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Ö†Õ¡ÕµÕ¬Õ¨ Õ¸Ö‚Õ¶Õ« Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ¥Ö€Ö‰",noObjects:"Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ¯Õ¡Ö€Õ¤Õ¡Õ¬ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Ö†Õ¡ÕµÕ¬Õ¸Ö‚Õ´ Õ¯Õ¡Õ¶ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Ö‰",invalidCsv:"Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ´Õ·Õ¡Õ¯Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Õ¡ÕµÕ¶ Õ¾Õ¡Õ¾Õ¥Ö€ CSV Õ§Ö‰",invalidJson:"Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ´Õ·Õ¡Õ¯Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Õ¡ÕµÕ¶ Õ¾Õ¡Õ¾Õ¥Ö€ Json Õ§Ö‰",jsonNotArray:"Õ†Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¾Õ¡Õ® json Ö†Õ¡ÕµÕ¬Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« Õ¦Õ¡Õ¶Õ£Õ¾Õ¡Õ®, Õ¯Õ¡Õ½Õ¥ÖÕ¾Õ¸Ö‚Õ´ Õ§Ö‰"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("it",{aggregate:{label:"elementi"},groupPanel:{description:"Trascina un'intestazione all'interno del gruppo della colonna."},search:{placeholder:"Ricerca...",showingItems:"Mostra:",selectedItems:"Selezionati:",totalItems:"Totali:",size:"Tot Pagine:",first:"Prima",next:"Prossima",previous:"Precedente",last:"Ultima"},menu:{text:"Scegli le colonne:"},sort:{ascending:"Asc.",descending:"Desc.",remove:"Annulla ordinamento"},column:{hide:"Nascondi"},aggregation:{count:"righe totali: ",sum:"tot: ",avg:"media: ",min:"minimo: ",max:"massimo: "},pinning:{pinLeft:"Blocca a sx",pinRight:"Blocca a dx",unpin:"Blocca in alto"},gridMenu:{columns:"Colonne:",importerTitle:"Importa",exporterAllAsCsv:"Esporta tutti i dati in CSV",exporterVisibleAsCsv:"Esporta i dati visibili in CSV",exporterSelectedAsCsv:"Esporta i dati selezionati in CSV",exporterAllAsPdf:"Esporta tutti i dati in PDF",exporterVisibleAsPdf:"Esporta i dati visibili in PDF",exporterSelectedAsPdf:"Esporta i dati selezionati in PDF",clearAllFilters:"Pulire tutti i filtri"},importer:{noHeaders:"Impossibile reperire i nomi delle colonne, sicuro che siano indicati all'interno del file?",noObjects:"Impossibile reperire gli oggetti, sicuro che siano indicati all'interno del file?",invalidCsv:"Impossibile elaborare il file, sicuro che sia un CSV?",invalidJson:"Impossibile elaborare il file, sicuro che sia un JSON valido?",jsonNotArray:"Errore! Il file JSON da importare deve contenere un array."},pagination:{aria:{pageToFirst:"Prima",pageBack:"Indietro",pageSelected:"Pagina selezionata",pageForward:"Avanti",pageToLast:"Ultima"},sizes:"elementi per pagina",totalItems:"elementi",through:"a",of:"di"},grouping:{group:"Raggruppa",ungroup:"Separa",aggregate_count:"Agg: N. Elem.",aggregate_sum:"Agg: Somma",aggregate_max:"Agg: Massimo",aggregate_min:"Agg: Minimo",aggregate_avg:"Agg: Media",aggregate_remove:"Agg: Rimuovi"},validate:{error:"Errore:",minLength:"Lunghezza minima pari a THRESHOLD caratteri.",maxLength:"Lunghezza massima pari a THRESHOLD caratteri.",required:"Necessario inserire un valore."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ja",{aggregate:{label:"é …ç›®"},groupPanel:{description:"ã“ã“ã«åˆ—ヘッダをドラッグアンドドロップã—ã¦ã€ãã®åˆ—ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚"},search:{placeholder:"検索...",showingItems:"表示中ã®é …ç›®:",selectedItems:"é¸æŠžã—ãŸé …ç›®:",totalItems:"é …ç›®ã®ç·æ•°:",size:"ページサイズ:",first:"最åˆã®ãƒšãƒ¼ã‚¸",next:"次ã®ãƒšãƒ¼ã‚¸",previous:"å‰ã®ãƒšãƒ¼ã‚¸",last:"å‰ã®ãƒšãƒ¼ã‚¸"},menu:{text:"列ã®é¸æŠž:"},sort:{ascending:"昇順ã«ä¸¦ã¹æ›¿ãˆ",descending:"é™é †ã«ä¸¦ã¹æ›¿ãˆ",remove:"並ã¹æ›¿ãˆã®è§£é™¤"},column:{hide:"列ã®éžè¡¨ç¤º"},aggregation:{count:"åˆè¨ˆè¡Œæ•°: ",sum:"åˆè¨ˆ: ",avg:"å¹³å‡: ",min:"最å°: ",max:"最大: "},pinning:{pinLeft:"å·¦ã«å›ºå®š",pinRight:"å³ã«å›ºå®š",unpin:"固定解除"},gridMenu:{columns:"列:",importerTitle:"ファイルã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ",exporterAllAsCsv:"ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ",exporterVisibleAsCsv:"表示中ã®ãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ",exporterSelectedAsCsv:"é¸æŠžã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ",exporterAllAsPdf:"ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ",exporterVisibleAsPdf:"表示中ã®ãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ",exporterSelectedAsPdf:"é¸æŠžã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ",clearAllFilters:"ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’清掃ã—ã¦ãã ã•ã„"},importer:{noHeaders:"列åã‚’å–å¾—ã§ãã¾ã›ã‚“。ファイルã«ãƒ˜ãƒƒãƒ€ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。",noObjects:"オブジェクトをå–å¾—ã§ãã¾ã›ã‚“。ファイルã«ãƒ˜ãƒƒãƒ€ä»¥å¤–ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。",invalidCsv:"ファイルを処ç†ã§ãã¾ã›ã‚“。ファイルãŒæœ‰åŠ¹ãªCSVå½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。",invalidJson:"ファイルを処ç†ã§ãã¾ã›ã‚“。ファイルãŒæœ‰åŠ¹ãªJSONå½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。",jsonNotArray:"インãƒãƒ¼ãƒˆã—ãŸJSONファイルã«ã¯é…列ãŒå«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚処ç†ã‚’中止ã—ã¾ã™ã€‚"},pagination:{aria:{pageToFirst:"最åˆã®ãƒšãƒ¼ã‚¸",pageBack:"å‰ã®ãƒšãƒ¼ã‚¸",pageSelected:"ç¾åœ¨ã®ãƒšãƒ¼ã‚¸",pageForward:"次ã®ãƒšãƒ¼ã‚¸",pageToLast:"最後ã®ãƒšãƒ¼ã‚¸"},sizes:"é …ç›®/ページ",totalItems:"é …ç›®",through:"ã‹ã‚‰",of:"é …ç›®/å…¨"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ko",{aggregate:{label:"ì•„ì´í…œ"},groupPanel:{description:"컬럼으로 그룹핑하기 위해서는 컬럼 í—¤ë”를 ëŒì–´ 떨어뜨려 주세요."},search:{placeholder:"검색...",showingItems:"항목 보여주기:",selectedItems:"ì„ íƒ í•­ëª©:",totalItems:"ì „ì²´ 항목:",size:"페ì´ì§€ í¬ê¸°:",first:"첫번째 페ì´ì§€",next:"ë‹¤ìŒ íŽ˜ì´ì§€",previous:"ì´ì „ 페ì´ì§€",last:"마지막 페ì´ì§€"},menu:{text:"ì»¬ëŸ¼ì„ ì„ íƒí•˜ì„¸ìš”:"},sort:{ascending:"오름차순 ì •ë ¬",descending:"내림차순 ì •ë ¬",remove:"소팅 제거"},column:{hide:"컬럼 제거"},aggregation:{count:"ì „ì²´ 갯수: ",sum:"ì „ì²´: ",avg:"í‰ê· : ",min:"최소: ",max:"최대: "},pinning:{pinLeft:"왼쪽 í•€",pinRight:"오른쪽 í•€",unpin:"í•€ 제거"},gridMenu:{columns:"컬럼:",importerTitle:"íŒŒì¼ ê°€ì ¸ì˜¤ê¸°",exporterAllAsCsv:"csvë¡œ 모든 ë°ì´í„° 내보내기",exporterVisibleAsCsv:"csvë¡œ ë³´ì´ëŠ” ë°ì´í„° 내보내기",exporterSelectedAsCsv:"csvë¡œ ì„ íƒëœ ë°ì´í„° 내보내기",exporterAllAsPdf:"pdfë¡œ 모든 ë°ì´í„° 내보내기",exporterVisibleAsPdf:"pdfë¡œ ë³´ì´ëŠ” ë°ì´í„° 내보내기",exporterSelectedAsPdf:"pdfë¡œ ì„ íƒ ë°ì´í„° 내보내기",clearAllFilters:"모든 필터를 청소"},importer:{noHeaders:"ì»¬ëŸ¼ëª…ì´ ì§€ì •ë˜ì–´ 있지 않습니다. 파ì¼ì— í—¤ë”ê°€ 명시ë˜ì–´ 있는지 확ì¸í•´ 주세요.",noObjects:"ë°ì´í„°ê°€ 지정ë˜ì–´ 있지 않습니다. ë°ì´í„°ê°€ 파ì¼ì— 있는지 확ì¸í•´ 주세요.",invalidCsv:"파ì¼ì„ 처리할 수 없습니다. 올바른 csvì¸ì§€ 확ì¸í•´ 주세요.",invalidJson:"파ì¼ì„ 처리할 수 없습니다. 올바른 jsonì¸ì§€ 확ì¸í•´ 주세요.",jsonNotArray:"json 파ì¼ì€ ë°°ì—´ì„ í¬í•¨í•´ì•¼ 합니다."},pagination:{sizes:"페ì´ì§€ë‹¹ 항목",totalItems:"ì „ì²´ 항목"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("nl",{aggregate:{label:"items"},groupPanel:{description:"Sleep hier een kolomnaam heen om op te groeperen."},search:{placeholder:"Zoeken...",showingItems:"Getoonde items:",selectedItems:"Geselecteerde items:",totalItems:"Totaal aantal items:",size:"Items per pagina:",first:"Eerste pagina",next:"Volgende pagina",previous:"Vorige pagina",last:"Laatste pagina"},menu:{text:"Kies kolommen:"},sort:{ascending:"Sorteer oplopend",descending:"Sorteer aflopend",remove:"Verwijder sortering"},column:{hide:"Verberg kolom"},aggregation:{count:"Aantal rijen: ",sum:"Som: ",avg:"Gemiddelde: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Zet links vast",pinRight:"Zet rechts vast",unpin:"Maak los"},gridMenu:{columns:"Kolommen:",importerTitle:"Importeer bestand",exporterAllAsCsv:"Exporteer alle data als csv",exporterVisibleAsCsv:"Exporteer zichtbare data als csv",exporterSelectedAsCsv:"Exporteer geselecteerde data als csv",exporterAllAsPdf:"Exporteer alle data als pdf",exporterVisibleAsPdf:"Exporteer zichtbare data als pdf",exporterSelectedAsPdf:"Exporteer geselecteerde data als pdf",clearAllFilters:"Reinig alle filters"},importer:{noHeaders:"Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?",noObjects:"Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?",invalidCsv:"Het bestand kan niet verwerkt worden. Is het een valide csv bestand?",invalidJson:"Het bestand kan niet verwerkt worden. Is het valide json?",jsonNotArray:"Het json bestand moet een array bevatten. De actie wordt geannuleerd."},pagination:{sizes:"items per pagina",totalItems:"items",of:"van de"},grouping:{group:"Groepeer",ungroup:"Groepering opheffen",aggregate_count:"Agg: Aantal",aggregate_sum:"Agg: Som",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Gem",aggregate_remove:"Agg: Verwijder"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("no",{headerCell:{aria:{defaultFilterLabel:"Filter for column",removeFilter:"Remove Filter",columnMenuButtonLabel:"Column Menu"},priority:"Priority:",filterLabel:"Filter for column: "},aggregate:{label:"items"},groupPanel:{description:"Drag a column header here and drop it to group by that column."},search:{placeholder:"Search...",showingItems:"Showing Items:",selectedItems:"Selected Items:",totalItems:"Total Items:",size:"Page Size:",first:"First Page",next:"Next Page",previous:"Previous Page",last:"Last Page"},menu:{text:"Choose Columns:"},sort:{ascending:"Sort Ascending",descending:"Sort Descending",none:"Sort None",remove:"Remove Sort"},column:{hide:"Hide Column"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin Left",pinRight:"Pin Right",unpin:"Unpin"},columnMenu:{close:"Close"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Kolonner:",importerTitle:"Importer fil",exporterAllAsCsv:"Eksporter alle data som csv",exporterVisibleAsCsv:"Eksporter synlige data som csv",exporterSelectedAsCsv:"Eksporter utvalgte data som csv",exporterAllAsPdf:"Eksporter alle data som pdf",exporterVisibleAsPdf:"Eksporter synlige data som pdf",exporterSelectedAsPdf:"Eksporter utvalgte data som pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."},pagination:{aria:{pageToFirst:"Page to first",pageBack:"Page back",pageSelected:"Selected page",pageForward:"Page forward",pageToLast:"Page to last"},sizes:"items per page",totalItems:"items",through:"through",of:"of"},grouping:{group:"Group",ungroup:"Ungroup",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pl",{headerCell:{aria:{defaultFilterLabel:"Filtr dla kolumny",removeFilter:"UsuÅ„ filtr",columnMenuButtonLabel:"Menu kolumny"},priority:"Prioritet:",filterLabel:"Filtr dla kolumny: "},aggregate:{label:"pozycji"},groupPanel:{description:"PrzeciÄ…gnij nagłówek kolumny tutaj, aby pogrupować wedÅ‚ug niej."},search:{placeholder:"Szukaj...",showingItems:"Widoczne pozycje:",selectedItems:"Zaznaczone pozycje:",totalItems:"Wszystkich pozycji:",size:"Rozmiar strony:",first:"Pierwsza strona",next:"NastÄ™pna strona",previous:"Poprzednia strona",last:"Ostatnia strona"},menu:{text:"Wybierz kolumny:"},sort:{ascending:"Sortuj rosnÄ…co",descending:"Sortuj malejÄ…co",none:"Brak sortowania",remove:"WyÅ‚Ä…cz sortowanie"},column:{hide:"Ukryj kolumne"},aggregation:{count:"Razem pozycji: ",sum:"Razem: ",avg:"Åšrednia: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Przypnij do lewej",pinRight:"Przypnij do prawej",unpin:"Odepnij"},columnMenu:{close:"Zamknij"},gridMenu:{aria:{buttonLabel:"Menu Grida"},columns:"Kolumny:",importerTitle:"Importuj plik",exporterAllAsCsv:"Eksportuj wszystkie dane do csv",exporterVisibleAsCsv:"Eksportuj widoczne dane do csv",exporterSelectedAsCsv:"Eksportuj zaznaczone dane do csv",exporterAllAsPdf:"Eksportuj wszystkie dane do pdf",exporterVisibleAsPdf:"Eksportuj widoczne dane do pdf",exporterSelectedAsPdf:"Eksportuj zaznaczone dane do pdf",clearAllFilters:"Wyczyść filtry"},importer:{noHeaders:"Nie udaÅ‚o siÄ™ wczytać nazw kolumn. Czy plik posiada nagłówek?",noObjects:"Nie udalo siÄ™ wczytać pozycji. Czy plik zawiera dane??",invalidCsv:"Nie udaÅ‚o siÄ™ przetworzyć pliku, jest to prawidlowy plik CSV??",invalidJson:"Nie udaÅ‚o siÄ™ przetworzyć pliku, jest to prawidlowy plik Json?",jsonNotArray:"Importowany plik json musi zawierać tablicÄ™, importowanie przerwane."},pagination:{aria:{pageToFirst:"Pierwsza strona",pageBack:"Poprzednia strona",pageSelected:"Wybrana strona",pageForward:"NastÄ™pna strona",pageToLast:"Ostatnia strona"},sizes:"pozycji na stronÄ™",totalItems:"pozycji",through:"do",of:"z"},grouping:{group:"Grupuj",ungroup:"Rozgrupuj",aggregate_count:"Zbiorczo: Razem",aggregate_sum:"Zbiorczo: Suma",aggregate_max:"Zbiorczo: Max",aggregate_min:"Zbiorczo: Min",aggregate_avg:"Zbiorczo: Åšrednia",aggregate_remove:"Zbiorczo: UsuÅ„"},validate:{error:"BÅ‚Ä…d:",minLength:"Wartość powinna skÅ‚adać siÄ™ z co najmniej THRESHOLD znaków.",maxLength:"Wartość powinna skÅ‚adać siÄ™ z przynajmniej THRESHOLD znaków.",required:"Wartość jest wymagana."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt-br",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Items Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar arquivo",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?",invalidCsv:"Arquivo não pode ser processado. É um CSV válido?",invalidJson:"Arquivo não pode ser processado. É um Json válido?",jsonNotArray:"Arquivo json importado tem que conter um array. Abortando."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Proxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("pt",{headerCell:{aria:{defaultFilterLabel:"Filtro por coluna",removeFilter:"Remover filtro",columnMenuButtonLabel:"Menu coluna"},priority:"Prioridade:",filterLabel:"Filtro por coluna: "},aggregate:{label:"itens"},groupPanel:{description:"Arraste e solte uma coluna aqui para agrupar por essa coluna"},search:{placeholder:"Procurar...",showingItems:"Mostrando os Itens:",selectedItems:"Itens Selecionados:",totalItems:"Total de Itens:",size:"Tamanho da Página:",first:"Primeira Página",next:"Próxima Página",previous:"Página Anterior",last:"Última Página"},menu:{text:"Selecione as colunas:"},sort:{ascending:"Ordenar Ascendente",descending:"Ordenar Descendente",none:"Nenhuma Ordem",remove:"Remover Ordenação"},column:{hide:"Esconder coluna"},aggregation:{count:"total de linhas: ",sum:"total: ",avg:"med: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Fixar Esquerda",pinRight:"Fixar Direita",unpin:"Desprender"},columnMenu:{close:"Fechar"},gridMenu:{aria:{buttonLabel:"Menu Grid"},columns:"Colunas:",importerTitle:"Importar ficheiro",exporterAllAsCsv:"Exportar todos os dados como csv",exporterVisibleAsCsv:"Exportar dados visíveis como csv",exporterSelectedAsCsv:"Exportar dados selecionados como csv",exporterAllAsPdf:"Exportar todos os dados como pdf",exporterVisibleAsPdf:"Exportar dados visíveis como pdf",exporterSelectedAsPdf:"Exportar dados selecionados como pdf",clearAllFilters:"Limpar todos os filtros"},importer:{noHeaders:"Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?",noObjects:"Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?",invalidCsv:"Ficheiro não pode ser processado. É um CSV válido?",invalidJson:"Ficheiro não pode ser processado. É um Json válido?",jsonNotArray:"Ficheiro json importado tem que conter um array. Interrompendo."},pagination:{aria:{pageToFirst:"Primeira página",pageBack:"Página anterior",pageSelected:"Página Selecionada",pageForward:"Próxima",pageToLast:"Anterior"},sizes:"itens por página",totalItems:"itens",through:"através dos",of:"de"},grouping:{group:"Agrupar",ungroup:"Desagrupar",aggregate_count:"Agr: Contar",aggregate_sum:"Agr: Soma",aggregate_max:"Agr: Max",aggregate_min:"Agr: Min",aggregate_avg:"Agr: Med",aggregate_remove:"Agr: Remover"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ro",{headerCell:{aria:{defaultFilterLabel:"Filtru pentru coloana",removeFilter:"Sterge filtru",columnMenuButtonLabel:"Column Menu"},priority:"Prioritate:",filterLabel:"Filtru pentru coloana:"},aggregate:{label:"Elemente"},groupPanel:{description:"Trage un cap de coloana aici pentru a grupa elementele dupa coloana respectiva"},search:{placeholder:"Cauta...",showingItems:"Arata elementele:",selectedItems:"Elementele selectate:",totalItems:"Total elemente:",size:"Marime pagina:",first:"Prima pagina",next:"Pagina urmatoare",previous:"Pagina anterioara",last:"Ultima pagina"},menu:{text:"Alege coloane:"},sort:{ascending:"Ordoneaza crescator",descending:"Ordoneaza descrescator",none:"Fara ordonare",remove:"Sterge ordonarea"},column:{hide:"Ascunde coloana"},aggregation:{count:"total linii: ",sum:"total: ",avg:"medie: ",min:"min: ",max:"max: "},pinning:{pinLeft:"Pin la stanga",pinRight:"Pin la dreapta",unpin:"Sterge pinul"},columnMenu:{close:"Inchide"},gridMenu:{aria:{buttonLabel:"Grid Menu"},columns:"Coloane:",importerTitle:"Incarca fisier",exporterAllAsCsv:"Exporta toate datele ca csv",exporterVisibleAsCsv:"Exporta datele vizibile ca csv",exporterSelectedAsCsv:"Exporta datele selectate ca csv",exporterAllAsPdf:"Exporta toate datele ca pdf",exporterVisibleAsPdf:"Exporta datele vizibile ca pdf",exporterSelectedAsPdf:"Exporta datele selectate ca csv pdf",clearAllFilters:"Sterge toate filtrele"},importer:{noHeaders:"Numele coloanelor nu a putut fi incarcat, acest fisier are un header?",noObjects:"Datele nu au putut fi incarcate, exista date in fisier in afara numelor de coloane?",invalidCsv:"Fisierul nu a putut fi procesat, ati incarcat un CSV valid ?",invalidJson:"Fisierul nu a putut fi procesat, ati incarcat un Json valid?",jsonNotArray:"Json-ul incarcat trebuie sa contina un array, inchidere."},pagination:{aria:{pageToFirst:"Prima pagina",pageBack:"O pagina inapoi",pageSelected:"Pagina selectata",pageForward:"O pagina inainte",pageToLast:"Ultima pagina"},sizes:"Elemente per pagina",totalItems:"elemente",through:"prin",of:"of"},grouping:{group:"Grupeaza",ungroup:"Opreste gruparea",aggregate_count:"Agg: Count",aggregate_sum:"Agg: Sum",aggregate_max:"Agg: Max",aggregate_min:"Agg: Min",aggregate_avg:"Agg: Avg",aggregate_remove:"Agg: Remove"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ru",{headerCell:{aria:{defaultFilterLabel:"Фильтр Ñтолбца",removeFilter:"Удалить фильтр",columnMenuButtonLabel:"Меню Ñтолбца"},priority:"Приоритет:",filterLabel:"Фильтр Ñтолбца: "},aggregate:{label:"Ñлементы"},groupPanel:{description:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð¸Ñ€Ð¾Ð²ÐºÐ¸ по Ñтолбцу перетащите Ñюда его название."},search:{placeholder:"ПоиÑк...",showingItems:"Показать Ñлементы:",selectedItems:"Выбранные Ñлементы:",totalItems:"Ð’Ñего Ñлементов:",size:"Размер Ñтраницы:",first:"ÐŸÐµÑ€Ð²Ð°Ñ Ñтраница",next:"Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница",previous:"ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница",last:"ПоÑледнÑÑ Ñтраница"},menu:{text:"Выбрать Ñтолбцы:"},sort:{ascending:"По возраÑтанию",descending:"По убыванию",none:"Без Ñортировки",remove:"Убрать Ñортировку"},column:{hide:"СпрÑтать Ñтолбец"},aggregation:{count:"вÑего Ñтрок: ",sum:"итого: ",avg:"Ñреднее: ",min:"мин: ",max:"макÑ: "},pinning:{pinLeft:"Закрепить Ñлева",pinRight:"Закрепить Ñправа",unpin:"Открепить"},columnMenu:{close:"Закрыть"},gridMenu:{aria:{buttonLabel:"Меню"},columns:"Столбцы:",importerTitle:"Импортировать файл",exporterAllAsCsv:"ЭкÑпортировать вÑÑ‘ в CSV",exporterVisibleAsCsv:"ЭкÑпортировать видимые данные в CSV",exporterSelectedAsCsv:"ЭкÑпортировать выбранные данные в CSV",exporterAllAsPdf:"ЭкÑпортировать вÑÑ‘ в PDF",exporterVisibleAsPdf:"ЭкÑпортировать видимые данные в PDF",exporterSelectedAsPdf:"ЭкÑпортировать выбранные данные в PDF",clearAllFilters:"ОчиÑтите вÑе фильтры"},importer:{noHeaders:"Ðе удалоÑÑŒ получить Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñтолбцов, еÑÑ‚ÑŒ ли в файле заголовок?",noObjects:"Ðе удалоÑÑŒ получить данные, еÑÑ‚ÑŒ ли в файле Ñтроки кроме заголовка?",invalidCsv:"Ðе удалоÑÑŒ обработать файл, Ñто правильный CSV-файл?",invalidJson:"Ðе удалоÑÑŒ обработать файл, Ñто правильный JSON?",jsonNotArray:"Импортируемый JSON-файл должен Ñодержать маÑÑив, Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¾Ñ‚Ð¼ÐµÐ½ÐµÐ½Ð°."},pagination:{aria:{pageToFirst:"ÐŸÐµÑ€Ð²Ð°Ñ Ñтраница",pageBack:"ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница",pageSelected:"Ð’Ñ‹Ð±Ñ€Ð°Ð½Ð½Ð°Ñ Ñтраница",pageForward:"Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница",pageToLast:"ПоÑледнÑÑ Ñтраница"},sizes:"Ñтрок на Ñтраницу",totalItems:"Ñтрок",through:"по",of:"из"},grouping:{group:"Группировать",ungroup:"Разгруппировать",aggregate_count:"Группировать: Count",aggregate_sum:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: Сумма",aggregate_max:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: МакÑимум",aggregate_min:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: Минимум",aggregate_avg:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: Среднее",aggregate_remove:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ñ‹: ПуÑто"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sk",{aggregate:{label:"items"},groupPanel:{description:"Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca."},search:{placeholder:"Hľadaj...",showingItems:"Zobrazujem položky:",selectedItems:"Vybraté položky:",totalItems:"PoÄet položiek:",size:"PoÄet:",first:"Prvá strana",next:"ÄŽalÅ¡ia strana",previous:"Predchádzajúca strana",last:"Posledná strana"},menu:{text:"Vyberte stĺpce:"},sort:{ascending:"ZotriediÅ¥ vzostupne",descending:"ZotriediÅ¥ zostupne",remove:"VymazaÅ¥ triedenie"},aggregation:{count:"total rows: ",sum:"total: ",avg:"avg: ",min:"min: ",max:"max: "},gridMenu:{columns:"Columns:",importerTitle:"Import file",exporterAllAsCsv:"Export all data as csv",exporterVisibleAsCsv:"Export visible data as csv",exporterSelectedAsCsv:"Export selected data as csv",exporterAllAsPdf:"Export all data as pdf",exporterVisibleAsPdf:"Export visible data as pdf",exporterSelectedAsPdf:"Export selected data as pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"Column names were unable to be derived, does the file have a header?",noObjects:"Objects were not able to be derived, was there data in the file other than headers?",invalidCsv:"File was unable to be processed, is it valid CSV?",invalidJson:"File was unable to be processed, is it valid Json?",jsonNotArray:"Imported json file must contain an array, aborting."}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("sv",{aggregate:{label:"Artiklar"},groupPanel:{description:"Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen."},search:{placeholder:"Sök...",showingItems:"Visar artiklar:",selectedItems:"Valda artiklar:",totalItems:"Antal artiklar:",size:"Sidstorlek:",first:"Första sidan",next:"Nästa sida",previous:"FöregÃ¥ende sida",last:"Sista sidan"},menu:{text:"Välj kolumner:"},sort:{ascending:"Sortera stigande",descending:"Sortera fallande",remove:"Inaktivera sortering"},column:{hide:"Göm kolumn"},aggregation:{count:"Antal rader: ",sum:"Summa: ",avg:"Genomsnitt: ",min:"Min: ",max:"Max: "},pinning:{pinLeft:"Fäst vänster",pinRight:"Fäst höger",unpin:"Lösgör"},gridMenu:{columns:"Kolumner:",importerTitle:"Importera fil",exporterAllAsCsv:"Exportera all data som CSV",exporterVisibleAsCsv:"Exportera synlig data som CSV",exporterSelectedAsCsv:"Exportera markerad data som CSV",exporterAllAsPdf:"Exportera all data som PDF",exporterVisibleAsPdf:"Exportera synlig data som PDF",exporterSelectedAsPdf:"Exportera markerad data som PDF",clearAllFilters:"Rengör alla filter"},importer:{noHeaders:"Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?",noObjects:"Objekt kunde inte härledas. Har filen data undantaget sidhuvud?",invalidCsv:"Filen kunde inte behandlas, är den en giltig CSV?",invalidJson:"Filen kunde inte behandlas, är den en giltig JSON?",jsonNotArray:"Importerad JSON-fil mÃ¥ste innehÃ¥lla ett fält. Import avbruten."},pagination:{sizes:"Artiklar per sida",totalItems:"Artiklar"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ta",{aggregate:{label:"உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯"},groupPanel:{description:"ஒர௠பதà¯à®¤à®¿à®¯à¯ˆ கà¯à®´à¯à®µà®¾à®• அமைகà¯à®• அபà¯à®ªà®¤à¯à®¤à®¿à®¯à®¿à®©à¯ தலைபà¯à®ªà¯ˆ இஙà¯à®•à¯‡ இழà¯à®¤à¯à®¤à¯ வரவà¯à®®à¯ "},search:{placeholder:"தேடல௠...",showingItems:"உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ˆ காணà¯à®ªà®¿à®¤à¯à®¤à®²à¯:",selectedItems:"தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿ உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯:",totalItems:"மொதà¯à®¤ உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯:",size:"பகà¯à®• அளவà¯: ",first:"à®®à¯à®¤à®²à¯ பகà¯à®•à®®à¯",next:"அடà¯à®¤à¯à®¤ பகà¯à®•à®®à¯",previous:"à®®à¯à®¨à¯à®¤à¯ˆà®¯ பகà¯à®•à®®à¯ ",last:"இறà¯à®¤à®¿ பகà¯à®•à®®à¯"},menu:{text:"பதà¯à®¤à®¿à®•à®³à¯ˆ தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯:"},sort:{ascending:"மேலிரà¯à®¨à¯à®¤à¯ கீழாக",descending:"கீழிரà¯à®¨à¯à®¤à¯ மேலாக",remove:"வரிசையை நீகà¯à®•à¯"},column:{hide:"பதà¯à®¤à®¿à®¯à¯ˆ மறைதà¯à®¤à¯ வை "},aggregation:{count:"மொதà¯à®¤ வரிகளà¯:",sum:"மொதà¯à®¤à®®à¯: ",avg:"சராசரி: ",min:"கà¯à®±à¯ˆà®¨à¯à®¤à®ªà®Ÿà¯à®š: ",max:"அதிகபடà¯à®š: "},pinning:{pinLeft:"இடதà¯à®ªà¯à®±à®®à®¾à®• தைகà¯à®• ",pinRight:"வலதà¯à®ªà¯à®±à®®à®¾à®• தைகà¯à®•",unpin:"பிரி"},gridMenu:{columns:"பதà¯à®¤à®¿à®•à®³à¯:",importerTitle:"கோபà¯à®ªà¯ : படிதà¯à®¤à®²à¯",exporterAllAsCsv:"எலà¯à®²à®¾ தரவà¯à®•à®³à¯ˆà®¯à¯à®®à¯ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv",exporterVisibleAsCsv:"இரà¯à®•à¯à®•à¯à®®à¯ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv",exporterSelectedAsCsv:"தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®¤à¯à®¤ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv",exporterAllAsPdf:"எலà¯à®²à®¾ தரவà¯à®•à®³à¯ˆà®¯à¯à®®à¯ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf",exporterVisibleAsPdf:"இரà¯à®•à¯à®•à¯à®®à¯ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf",exporterSelectedAsPdf:"தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®¤à¯à®¤ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf",clearAllFilters:"Clear all filters"},importer:{noHeaders:"பதà¯à®¤à®¿à®¯à®¿à®©à¯ தலைபà¯à®ªà¯à®•à®³à¯ˆ பெற இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà®¿à®±à¯à®•à¯ தலைபà¯à®ªà¯ உளà¯à®³à®¤à®¾?",noObjects:"இலகà¯à®•à¯à®•à®³à¯ˆ உரà¯à®µà®¾à®•à¯à®• à®®à¯à®Ÿà®¿à®¯à®µà®¿à®²à¯à®²à¯ˆ, கோபà¯à®ªà®¿à®²à¯ தலைபà¯à®ªà¯à®•à®³à¯ˆ தவிர தரவ௠à®à®¤à¯‡à®©à¯à®®à¯ உளà¯à®³à®¤à®¾? ",invalidCsv:"சரிவர நடைமà¯à®±à¯ˆ படà¯à®¤à¯à®¤ இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà¯ சரிதானா? - csv",invalidJson:"சரிவர நடைமà¯à®±à¯ˆ படà¯à®¤à¯à®¤ இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà¯ சரிதானா? - json",jsonNotArray:"படிதà¯à®¤ கோபà¯à®ªà®¿à®²à¯ வரிசைகள௠உளà¯à®³à®¤à¯, நடைமà¯à®±à¯ˆ ரதà¯à®¤à¯ செய௠: json"},pagination:{sizes:"உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ / பகà¯à®•à®®à¯",totalItems:"உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ "},grouping:{group:"கà¯à®´à¯",ungroup:"பிரி",aggregate_count:"மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : எணà¯à®£à¯",aggregate_sum:"மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : கூடà¯à®Ÿà®²à¯",aggregate_max:"மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : அதிகபடà¯à®šà®®à¯",aggregate_min:"மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : கà¯à®±à¯ˆà®¨à¯à®¤à®ªà®Ÿà¯à®šà®®à¯",aggregate_avg:"மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : சராசரி",aggregate_remove:"மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : நீகà¯à®•à¯"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("tr",{headerCell:{aria:{defaultFilterLabel:"Sütun için filtre",removeFilter:"Filtreyi Kaldır",columnMenuButtonLabel:"Sütun Menüsü"},priority:"Öncelik:",filterLabel:"Sütun için filtre: "},aggregate:{label:"kayıtlar"},groupPanel:{description:"Sütuna göre gruplamak için sütun baÅŸlığını buraya sürükleyin ve bırakın."},search:{placeholder:"Arama...",showingItems:"Gösterilen Kayıt:",selectedItems:"Seçili Kayıt:",totalItems:"Toplam Kayıt:",size:"Sayfa Boyutu:",first:"Ä°lk Sayfa",next:"Sonraki Sayfa",previous:"Önceki Sayfa",last:"Son Sayfa"},menu:{text:"Sütunları Seç:"},sort:{ascending:"Artan Sırada Sırala",descending:"Azalan Sırada Sırala",none:"Sıralama Yapma",remove:"Sıralamayı Kaldır"},column:{hide:"Sütunu Gizle"},aggregation:{count:"toplam satır: ",sum:"toplam: ",avg:"ort: ",min:"min: ",max:"maks: "},pinning:{pinLeft:"Sola Sabitle",pinRight:"SaÄŸa Sabitle",unpin:"Sabitlemeyi Kaldır"},columnMenu:{close:"Kapat"},gridMenu:{aria:{buttonLabel:"Tablo Menü"},columns:"Sütunlar:",importerTitle:"Dosya içeri aktar",exporterAllAsCsv:"Bütün veriyi CSV olarak dışarı aktar",exporterVisibleAsCsv:"Görünen veriyi CSV olarak dışarı aktar",exporterSelectedAsCsv:"Seçili veriyi CSV olarak dışarı aktar",exporterAllAsPdf:"Bütün veriyi PDF olarak dışarı aktar",exporterVisibleAsPdf:"Görünen veriyi PDF olarak dışarı aktar",exporterSelectedAsPdf:"Seçili veriyi PDF olarak dışarı aktar",clearAllFilters:"Bütün filtreleri kaldır"},importer:{noHeaders:"Sütun isimleri üretilemiyor, dosyanın bir baÅŸlığı var mı?",noObjects:"Nesneler üretilemiyor, dosyada baÅŸlıktan baÅŸka bir veri var mı?",invalidCsv:"Dosya iÅŸlenemedi, geçerli bir CSV dosyası mı?",invalidJson:"Dosya iÅŸlenemedi, geçerli bir Json dosyası mı?",jsonNotArray:"Alınan Json dosyasında bir dizi bulunmalıdır, iÅŸlem iptal ediliyor."},pagination:{aria:{pageToFirst:"Ä°lk sayfaya",pageBack:"Geri git",pageSelected:"Seçili sayfa",pageForward:"Ä°leri git",pageToLast:"Sona git"},sizes:"Sayfadaki nesne sayısı",totalItems:"kayıtlar",through:"",of:""},grouping:{group:"Grupla",ungroup:"Gruplama",aggregate_count:"Yekun: Sayı",aggregate_sum:"Yekun: Toplam",aggregate_max:"Yekun: Maks",aggregate_min:"Yekun: Min",aggregate_avg:"Yekun: Ort",aggregate_remove:"Yekun: Sil"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("ua",{headerCell:{aria:{defaultFilterLabel:"Фільтр Ñтовпчика",removeFilter:"Видалити фільтр",columnMenuButtonLabel:"Меню Ñтвпчика"},priority:"Пріоритет:",filterLabel:"Фільтр Ñтовпчика: "},aggregate:{label:"елементи"},groupPanel:{description:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿ÑƒÐ²Ð°Ð½Ð½Ñ Ð·Ð° Ñтовпчиком перетÑгніть Ñюди його назву."},search:{placeholder:"Пошук...",showingItems:"Показати елементи:",selectedItems:"Обрані елементи:",totalItems:"УÑього елементів:",size:"Розмір Ñторінки:",first:"Перша Ñторінка",next:"ÐаÑтупна Ñторінка",previous:"ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñторінка",last:"ОÑÑ‚Ð°Ð½Ð½Ñ Ñторінка"},menu:{text:"Обрати Ñтвпчики:"},sort:{ascending:"За зроÑтаннÑм",descending:"За ÑпаданнÑм",none:"Без ÑортуваннÑ",remove:"Прибрати ÑортуваннÑ"},column:{hide:"Приховати Ñтовпчик"},aggregation:{count:"уÑього Ñ€Ñдків: ",sum:"ітого: ",avg:"Ñереднє: ",min:"мін: ",max:"макÑ: "},pinning:{pinLeft:"Закріпити ліворуч",pinRight:"Закріпити праворуч",unpin:"Відкріпити"},columnMenu:{close:"Закрити"},gridMenu:{aria:{buttonLabel:"Меню"},columns:"Стовпчики:",importerTitle:"Імпортувати файл",exporterAllAsCsv:"ЕкÑпортувати вÑе в CSV",exporterVisibleAsCsv:"ЕкÑпортувати видимі дані в CSV",exporterSelectedAsCsv:"ЕкÑпортувати обрані дані в CSV",exporterAllAsPdf:"ЕкÑпортувати вÑе в PDF",exporterVisibleAsPdf:"ЕкÑпортувати видимі дані в PDF",exporterSelectedAsPdf:"ЕкÑпортувати обрані дані в PDF",clearAllFilters:"ОчиÑтити вÑÑ– фільтри"},importer:{noHeaders:"Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ назви Ñтовпчиків, чи Ñ” в файлі заголовок?",noObjects:"Ðе вдалоÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ дані, чи Ñ” в файлі Ñ€Ñдки окрім заголовка?",invalidCsv:"Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ файл, чи це коректний CSV-файл?",invalidJson:"Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ файл, чи це коректний JSON?",jsonNotArray:"JSON-файл що імпортуєтьÑÑ Ð¿Ð¾Ð²Ð¸Ð½ÐµÐ½ міÑтити маÑив, операцію ÑкаÑовано."},pagination:{aria:{pageToFirst:"Перша Ñторінка",pageBack:"ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñторінка",pageSelected:"Обрана Ñторінка",pageForward:"ÐаÑтупна Ñторінка",pageToLast:"ОÑÑ‚Ð°Ð½Ð½Ñ Ñторінка"},sizes:"Ñ€Ñдків на Ñторінку",totalItems:"Ñ€Ñдків",through:"по",of:"з"},grouping:{
-group:"Групувати",ungroup:"Розгрупувати",aggregate_count:"Групувати: КількіÑÑ‚ÑŒ",aggregate_sum:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: Сума",aggregate_max:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: МакÑимум",aggregate_min:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: Мінімум",aggregate_avg:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: Серднє",aggregate_remove:"Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¸: ПуÑто"}}),a}])}])}(),function(){var a=["uiT","uiTranslate"],b=["t","uiTranslate"],c=angular.module("ui.grid.i18n");c.constant("i18nConstants",{MISSING:"[MISSING]",UPDATE_EVENT:"$uiI18n",LOCALE_DIRECTIVE_ALIAS:"uiI18n",DEFAULT_LANG:"en"}),c.service("i18nService",["$log","i18nConstants","$rootScope",function(a,b,c){var d={_langs:{},current:null,get:function(a){return this._langs[a.toLowerCase()]},add:function(a,b){var c=a.toLowerCase();this._langs[c]||(this._langs[c]={}),angular.extend(this._langs[c],b)},getAllLangs:function(){var a=[];if(!this._langs)return a;for(var b in this._langs)a.push(b);return a},setCurrent:function(a){this.current=a.toLowerCase()},getCurrentLang:function(){return this.current}},e={add:function(a,b){"object"==typeof a?angular.forEach(a,function(a){a&&d.add(a,b)}):d.add(a,b)},getAllLangs:function(){return d.getAllLangs()},get:function(a){var b=a?a:e.getCurrentLang();return d.get(b)},getSafeText:function(a,c){var f=c?c:e.getCurrentLang(),g=d.get(f);if(!g)return b.MISSING;for(var h=a.split("."),i=g,j=0;j<h.length;++j){if(void 0===i[h[j]]||null===i[h[j]])return b.MISSING;i=i[h[j]]}return i},setCurrentLang:function(a){a&&(d.setCurrent(a),c.$broadcast(b.UPDATE_EVENT))},getCurrentLang:function(){var a=d.getCurrentLang();return a||(a=b.DEFAULT_LANG,d.setCurrent(a)),a}};return e}]);var d=function(a,b){return{compile:function(){return{pre:function(c,d,e){var f=b.LOCALE_DIRECTIVE_ALIAS,g=c.$eval(e[f]);g?c.$watch(e[f],function(){a.setCurrentLang(g)}):e.$$observers&&e.$observe(f,function(){a.setCurrentLang(e[f]||b.DEFAULT_LANG)})}}}}};c.directive("uiI18n",["i18nService","i18nConstants",d]);var e=function(b,c,d){return{restrict:"EA",compile:function(){return{pre:function(e,f,g){var h,i=a[0],j=a[1],k=g[i]||g[j]||f.html(),l=d.MISSING+k;if(g.$$observers){var m=g[i]?i:j;h=g.$observe(m,function(a){a&&f.html(b(a)(c.getCurrentLang())||l)})}var n=b(k),o=e.$on(d.UPDATE_EVENT,function(a){h?h(g[i]||g[j]):f.html(n(c.get())||l)});e.$on("$destroy",o),f.html(n(c.get())||l)}}}}};angular.forEach(a,function(a){c.directive(a,["$parse","i18nService","i18nConstants",e])});var f=function(a,b,c){return function(d){var e=a(d);return e(b.get())||c.MISSING+d}};angular.forEach(b,function(a){c.filter(a,["$parse","i18nService","i18nConstants",f])})}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("zh-cn",{headerCell:{aria:{defaultFilterLabel:"列过滤器",removeFilter:"移除过滤器",columnMenuButtonLabel:"列èœå•"},priority:"优先级:",filterLabel:"列过滤器: "},aggregate:{label:"è¡Œ"},groupPanel:{description:"拖曳表头到此处进行分组"},search:{placeholder:"查找",showingItems:"已显示行数:",selectedItems:"已选择行数:",totalItems:"总行数:",size:"æ¯é¡µæ˜¾ç¤ºè¡Œæ•°ï¼š",first:"首页",next:"下一页",previous:"上一页",last:"末页"},menu:{text:"选择列:"},sort:{ascending:"å‡åº",descending:"é™åº",none:"æ— åº",remove:"å–消排åº"},column:{hide:"éšè—列"},aggregation:{count:"计数:",sum:"求和:",avg:"å‡å€¼ï¼š",min:"最å°å€¼ï¼š",max:"最大值:"},pinning:{pinLeft:"左侧固定",pinRight:"å³ä¾§å›ºå®š",unpin:"å–消固定"},columnMenu:{close:"关闭"},gridMenu:{aria:{buttonLabel:"表格èœå•"},columns:"列:",importerTitle:"导入文件",exporterAllAsCsv:"导出全部数æ®åˆ°CSV",exporterVisibleAsCsv:"导出å¯è§æ•°æ®åˆ°CSV",exporterSelectedAsCsv:"导出已选数æ®åˆ°CSV",exporterAllAsPdf:"导出全部数æ®åˆ°PDF",exporterVisibleAsPdf:"导出å¯è§æ•°æ®åˆ°PDF",exporterSelectedAsPdf:"导出已选数æ®åˆ°PDF",clearAllFilters:"清除所有过滤器"},importer:{noHeaders:"无法获å–列å,确定文件包å«è¡¨å¤´ï¼Ÿ",noObjects:"无法获å–æ•°æ®ï¼Œç¡®å®šæ–‡ä»¶åŒ…å«æ•°æ®ï¼Ÿ",invalidCsv:"无法处ç†æ–‡ä»¶ï¼Œç¡®å®šæ˜¯åˆæ³•çš„CSV文件?",invalidJson:"无法处ç†æ–‡ä»¶ï¼Œç¡®å®šæ˜¯åˆæ³•çš„JSON文件?",jsonNotArray:"导入的文件ä¸æ˜¯JSON数组ï¼"},pagination:{aria:{pageToFirst:"第一页",pageBack:"上一页",pageSelected:"当å‰é¡µ",pageForward:"下一页",pageToLast:"最åŽä¸€é¡µ"},sizes:"è¡Œæ¯é¡µ",totalItems:"è¡Œ",through:"至",of:"å…±"},grouping:{group:"分组",ungroup:"å–消分组",aggregate_count:"åˆè®¡: 计数",aggregate_sum:"åˆè®¡: 求和",aggregate_max:"åˆè®¡: 最大",aggregate_min:"åˆè®¡: 最å°",aggregate_avg:"åˆè®¡: å¹³å‡",aggregate_remove:"åˆè®¡: 移除"}}),a}])}])}(),function(){angular.module("ui.grid").config(["$provide",function(a){a.decorator("i18nService",["$delegate",function(a){return a.add("zh-tw",{aggregate:{label:"è¡Œ"},groupPanel:{description:"拖曳表頭到此處進行分組"},search:{placeholder:"查找",showingItems:"已顯示行數:",selectedItems:"å·²é¸æ“‡è¡Œæ•¸ï¼š",totalItems:"總行數:",size:"æ¯é é¡¯ç¤ºè¡Œæ•¸ï¼š",first:"首é ",next:"下壹é ",previous:"上壹é ",last:"末é "},menu:{text:"é¸æ“‡åˆ—:"},sort:{ascending:"å‡åº",descending:"é™åº",remove:"å–消排åº"},column:{hide:"éš±è—列"},aggregation:{count:"計數:",sum:"求和:",avg:"å‡å€¼ï¼š",min:"最å°å€¼ï¼š",max:"最大值:"},pinning:{pinLeft:"å·¦å´å›ºå®š",pinRight:"å³å´å›ºå®š",unpin:"å–消固定"},gridMenu:{columns:"列:",importerTitle:"導入文件",exporterAllAsCsv:"導出全部數據到CSV",exporterVisibleAsCsv:"導出å¯è¦‹æ•¸æ“šåˆ°CSV",exporterSelectedAsCsv:"導出已é¸æ•¸æ“šåˆ°CSV",exporterAllAsPdf:"導出全部數據到PDF",exporterVisibleAsPdf:"導出å¯è¦‹æ•¸æ“šåˆ°PDF",exporterSelectedAsPdf:"導出已é¸æ•¸æ“šåˆ°PDF",clearAllFilters:"清除所有过滤器"},importer:{noHeaders:"無法ç²å–列å,確定文件包å«è¡¨é ­ï¼Ÿ",noObjects:"無法ç²å–數據,確定文件包å«æ•¸æ“šï¼Ÿ",invalidCsv:"無法處ç†æ–‡ä»¶ï¼Œç¢ºå®šæ˜¯åˆæ³•çš„CSV文件?",invalidJson:"無法處ç†æ–‡ä»¶ï¼Œç¢ºå®šæ˜¯åˆæ³•çš„JSON文件?",jsonNotArray:"導入的文件ä¸æ˜¯JSON數組ï¼"},pagination:{sizes:"è¡Œæ¯é ",totalItems:"è¡Œ"}}),a}])}])}(),function(){"use strict";var a=angular.module("ui.grid.autoResize",["ui.grid"]);a.directive("uiGridAutoResize",["$timeout","gridUtil",function(a,b){return{require:"uiGrid",scope:!1,link:function(a,c,d,e){function f(){i=b.elementHeight(c),h=b.elementWidth(c)}function g(){clearTimeout(j),j=setTimeout(function(){var d=b.elementHeight(c),j=b.elementWidth(c);d!==i||j!==h?(e.grid.gridHeight=d,e.grid.gridWidth=j,e.grid.api.core.raise.gridDimensionChanged(i,h,d,j),a.$apply(function(){e.grid.refresh().then(function(){f(),g()})})):g()},250)}var h,i;f();var j;g(),a.$on("$destroy",function(){clearTimeout(j)})}}}])}(),function(){"use strict";var a=angular.module("ui.grid.cellNav",["ui.grid"]);a.constant("uiGridCellNavConstants",{FEATURE_NAME:"gridCellNav",CELL_NAV_EVENT:"cellNav",direction:{LEFT:0,RIGHT:1,UP:2,DOWN:3,PG_UP:4,PG_DOWN:5},EVENT_TYPE:{KEYDOWN:0,CLICK:1,CLEAR:2}}),a.factory("uiGridCellNavFactory",["gridUtil","uiGridConstants","uiGridCellNavConstants","GridRowColumn","$q",function(a,b,c,d,e){var f=function(a,b,c,d){this.rows=a.visibleRowCache,this.columns=b.visibleColumnCache,this.leftColumns=c?c.visibleColumnCache:[],this.rightColumns=d?d.visibleColumnCache:[],this.bodyContainer=a};return f.prototype.getFocusableCols=function(){var a=this.leftColumns.concat(this.columns,this.rightColumns);return a.filter(function(a){return a.colDef.allowCellFocus})},f.prototype.getFocusableRows=function(){return this.rows.filter(function(a){return a.allowCellFocus!==!1})},f.prototype.getNextRowCol=function(a,b,d){switch(a){case c.direction.LEFT:return this.getRowColLeft(b,d);case c.direction.RIGHT:return this.getRowColRight(b,d);case c.direction.UP:return this.getRowColUp(b,d);case c.direction.DOWN:return this.getRowColDown(b,d);case c.direction.PG_UP:return this.getRowColPageUp(b,d);case c.direction.PG_DOWN:return this.getRowColPageDown(b,d)}},f.prototype.initializeSelection=function(){var a=this.getFocusableCols(),b=this.getFocusableRows();if(0===a.length||0===b.length)return null;return new d(b[0],a[0])},f.prototype.getRowColLeft=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=1);var h=0===f?c.length-1:f-1;return h>=f?0===g?new d(a,c[h]):new d(e[g-1],c[h]):new d(a,c[h])},f.prototype.getRowColRight=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=f===c.length-1?0:f+1;return f>=h?g===e.length-1?new d(a,c[h]):new d(e[g+1],c[h]):new d(a,c[h])},f.prototype.getRowColDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),g===e.length-1?new d(a,c[f]):new d(e[g+1],c[f])},f.prototype.getRowColPageDown=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return g>=e.length-h?new d(e[e.length-1],c[f]):new d(e[g+h],c[f])},f.prototype.getRowColUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);return-1===f&&(f=0),0===g?new d(a,c[f]):new d(e[g-1],c[f])},f.prototype.getRowColPageUp=function(a,b){var c=this.getFocusableCols(),e=this.getFocusableRows(),f=c.indexOf(b),g=e.indexOf(a);-1===f&&(f=0);var h=this.bodyContainer.minRowsToRender();return 0>g-h?new d(e[0],c[f]):new d(e[g-h],c[f])},f}]),a.service("uiGridCellNavService",["gridUtil","uiGridConstants","uiGridCellNavConstants","$q","uiGridCellNavFactory","GridRowColumn","ScrollEvent",function(a,b,c,d,e,f,g){var h={initializeGrid:function(a){a.registerColumnBuilder(h.cellNavColumnBuilder),a.cellNav={},a.cellNav.lastRowCol=null,a.cellNav.focusedCells=[],h.defaultGridOptions(a.options);var b={events:{cellNav:{navigate:function(a,b){},viewPortKeyDown:function(a,b){},viewPortKeyPress:function(a,b){}}},methods:{cellNav:{scrollToFocus:function(b,c){return h.scrollToFocus(a,b,c)},getFocusedCell:function(){return a.cellNav.lastRowCol},getCurrentSelection:function(){return a.cellNav.focusedCells},rowColSelectIndex:function(b){for(var c=-1,d=0;d<a.cellNav.focusedCells.length;d++)if(a.cellNav.focusedCells[d].col.uid===b.col.uid&&a.cellNav.focusedCells[d].row.uid===b.row.uid){c=d;break}return c}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.modifierKeysToMultiSelectCells=a.modifierKeysToMultiSelectCells===!0,a.keyDownOverrides=a.keyDownOverrides||[]},decorateRenderContainers:function(a){var b=a.hasRightContainer()?a.renderContainers.right:null,c=a.hasLeftContainer()?a.renderContainers.left:null;null!==c&&(a.renderContainers.left.cellNav=new e(a.renderContainers.body,c,b,a.renderContainers.body)),null!==b&&(a.renderContainers.right.cellNav=new e(a.renderContainers.body,b,a.renderContainers.body,c)),a.renderContainers.body.cellNav=new e(a.renderContainers.body,a.renderContainers.body,c,b)},getDirection:function(a){return a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey?c.direction.LEFT:a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB?c.direction.RIGHT:a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey?c.direction.UP:a.keyCode===b.keymap.PG_UP?c.direction.PG_UP:a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER&&!a.ctrlKey&&!a.altKey?c.direction.DOWN:a.keyCode===b.keymap.PG_DOWN?c.direction.PG_DOWN:null},cellNavColumnBuilder:function(a,b,c){var e=[];return a.allowCellFocus=void 0===a.allowCellFocus?!0:a.allowCellFocus,d.all(e)},scrollToFocus:function(a,b,c){var d=null,e=null;return"undefined"!=typeof b&&null!==b&&(d=a.getRow(b)),"undefined"!=typeof c&&null!==c&&(e=a.getColumn(c.name?c.name:c.field)),a.api.core.scrollToIfNecessary(d,e).then(function(){var b={row:d,col:e};null!==d&&null!==e&&a.cellNav.broadcastCellNav(b)})},getLeftWidth:function(a,b){var c=0;if(!b)return c;var d=a.renderContainers.body.visibleColumnCache.indexOf(b);a.renderContainers.body.visibleColumnCache.forEach(function(a,b){d>b&&(c+=a.drawnWidth)});var e=0===d?0:(d+1)/a.renderContainers.body.visibleColumnCache.length;return c+=b.drawnWidth*e}};return h}]),a.directive("uiGridCellnav",["gridUtil","uiGridCellNavService","uiGridCellNavConstants","uiGridConstants","GridRowColumn","$timeout","$compile",function(a,b,c,d,e,f,g){return{replace:!0,priority:-150,require:"^uiGrid",scope:!1,controller:function(){},compile:function(){return{pre:function(a,f,g,h){var i=a,j=h.grid;b.initializeGrid(j),h.cellNav={},h.cellNav.makeRowCol=function(a){return a instanceof e||(a=new e(a.row,a.col)),a},h.cellNav.getActiveCell=function(){var a=f[0].getElementsByClassName("ui-grid-cell-focus");return a.length>0?a[0]:void 0},h.cellNav.broadcastCellNav=j.cellNav.broadcastCellNav=function(a,b,d){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a),h.cellNav.broadcastFocus(a,b,d),i.$broadcast(c.CELL_NAV_EVENT,a,b,d)},h.cellNav.clearFocus=j.cellNav.clearFocus=function(){j.cellNav.focusedCells=[],i.$broadcast(c.CELL_NAV_EVENT)},h.cellNav.broadcastFocus=function(a,b,c){b=!(void 0===b||!b),a=h.cellNav.makeRowCol(a);var d=a.row,f=a.col,g=h.grid.api.cellNav.rowColSelectIndex(a);if(null===j.cellNav.lastRowCol||-1===g){var i=new e(d,f);(null===j.cellNav.lastRowCol||j.cellNav.lastRowCol.row!==i.row||j.cellNav.lastRowCol.col!==i.col)&&(j.api.cellNav.raise.navigate(i,j.cellNav.lastRowCol,c),j.cellNav.lastRowCol=i),h.grid.options.modifierKeysToMultiSelectCells&&b?j.cellNav.focusedCells.push(a):j.cellNav.focusedCells=[a]}else j.options.modifierKeysToMultiSelectCells&&b&&g>=0&&j.cellNav.focusedCells.splice(g,1)},h.cellNav.handleKeyDown=function(a){var e=b.getDirection(a);if(null===e)return null;var f="body";a.uiGridTargetRenderContainerId&&(f=a.uiGridTargetRenderContainerId);var g=h.grid.api.cellNav.getFocusedCell();if(g){var i=h.grid.renderContainers[f].cellNav.getNextRowCol(e,g.row,g.col),k=h.grid.renderContainers[f].cellNav.getFocusableCols(),l=h.grid.api.cellNav.rowColSelectIndex(i);return e===c.direction.LEFT&&i.col===k[k.length-1]&&i.row===g.row&&a.keyCode===d.keymap.TAB&&a.shiftKey?(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0):e!==c.direction.RIGHT||i.col!==k[0]||i.row!==g.row||a.keyCode!==d.keymap.TAB||a.shiftKey?(j.scrollToIfNecessary(i.row,i.col).then(function(){h.cellNav.broadcastCellNav(i,null,a)}),a.stopPropagation(),a.preventDefault(),!1):(j.cellNav.focusedCells.splice(l,1),h.cellNav.clearFocus(),!0)}}},post:function(a,b,d,e){function f(){var d='<div id="'+h.id+'-aria-speakable" class="ui-grid-a11y-ariascreenreader-speakable ui-grid-offscreen" aria-live="assertive" role="region" aria-atomic="true" aria-hidden="false" aria-relevant="additions" >&nbsp;</div>',e=g(d)(a);b.prepend(e),a.$on(c.CELL_NAV_EVENT,function(a,b,c,d){function f(a){a!==e.text()&&(e[0].style.clip="rect(0px,0px,0px,0px)",e[0].innerHTML="",e[0].style.visibility="hidden",e[0].style.visibility="visible",""!==a&&(e[0].style.clip="auto",e[0].appendChild(document.createTextNode(a+" ")),e[0].style.visibility="hidden",e[0].style.visibility="visible"))}if(!d||"focus"!==d.type){for(var g=[],i=h.api.cellNav.getCurrentSelection(),j=0;j<i.length;j++)g.push(h.getCellDisplayValue(i[j].row,i[j].col));var k=g.toString();f(k)}})}var h=e.grid;f()}}}}}]),a.directive("uiGridRenderContainer",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","$compile","uiGridCellNavConstants",function(a,b,c,d,e,f,g){return{replace:!0,priority:-99999,require:["^uiGrid","uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{post:function(b,d,h,i){var j=i[0],k=i[1],l=i[2];if(j.grid.api.cellNav){var m=k.containerId,n=j.grid;if(e.decorateRenderContainers(n),"body"===m){j.grid.options.modifierKeysToMultiSelectCells?d.attr("aria-multiselectable",!0):d.attr("aria-multiselectable",!1);var o=f('<div class="ui-grid-focuser" role="region" aria-live="assertive" aria-atomic="false" tabindex="0" aria-controls="'+n.id+"-aria-speakable "+n.id+'-grid-container" aria-owns="'+n.id+'-grid-container"></div>')(b);d.append(o),o.on("focus",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell();null===b&&(b=j.grid.renderContainers[m].cellNav.getNextRowCol(g.direction.DOWN,null,null),b.row&&b.col&&j.cellNav.broadcastCellNav(b))}),l.setAriaActivedescendant=function(a){d.attr("aria-activedescendant",a)},l.removeAriaActivedescendant=function(a){d.attr("aria-activedescendant")===a&&d.attr("aria-activedescendant","")},j.focus=function(){c.focus.byElement(o[0])};var p=null;o.on("keydown",function(a){a.uiGridTargetRenderContainerId=m;var b=j.grid.api.cellNav.getFocusedCell(),c=j.grid.options.keyDownOverrides.some(function(b){return Object.keys(b).every(function(c){return b[c]===a[c]})}),d=c?null:j.cellNav.handleKeyDown(a);null===d&&(j.grid.api.cellNav.raise.viewPortKeyDown(a,b),p=b)}),o.on("keypress",function(b){p&&(a(function(){j.grid.api.cellNav.raise.viewPortKeyPress(b,p)},4),p=null)}),b.$on("$destroy",function(){o.off()})}}}}}}}]),a.directive("uiGridViewport",["$timeout","$document","gridUtil","uiGridConstants","uiGridCellNavService","uiGridCellNavConstants","$log","$compile",function(a,b,c,d,e,f,g,h){return{replace:!0,priority:-99999,require:["^uiGrid","^uiGridRenderContainer","?^uiGridCellnav"],scope:!1,compile:function(){return{pre:function(a,b,c,d){},post:function(a,b,c,d){var e=d[0],f=d[1];if(e.grid.api.cellNav){var g=f.containerId;if("body"===g){var h=e.grid;h.api.core.on.scrollBegin(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.clearFocus()}),h.api.core.on.scrollEnd(a,function(a){var b=e.grid.api.cellNav.getFocusedCell();null!==b&&f.colContainer.containsColumn(b.col)&&e.cellNav.broadcastCellNav(b)}),h.api.cellNav.on.navigate(a,function(){e.focus()})}}}}}}}]),a.directive("uiGridCell",["$timeout","$document","uiGridCellNavService","gridUtil","uiGridCellNavConstants","uiGridConstants","GridRowColumn",function(a,b,c,d,e,f,g){return{priority:-150,restrict:"A",require:["^uiGrid","?^uiGridCellnav"],scope:!1,link:function(b,c,d,h){function i(a){a.preventDefault()}function j(){var a=o.cellNav.focusedCells.some(function(a,c){return a.row===b.row&&a.col===b.col});a?k():l()}function k(){if(!b.focused){var a=c.find("div");a.addClass("ui-grid-cell-focus"),c.attr("aria-selected",!0),n.setAriaActivedescendant(c.attr("id")),b.focused=!0}}function l(){if(b.focused){var a=c.find("div");a.removeClass("ui-grid-cell-focus"),c.attr("aria-selected",!1),n.removeAriaActivedescendant(c.attr("id")),b.focused=!1}}var m=h[0],n=h[1];if(m.grid.api.cellNav&&b.col.colDef.allowCellFocus){var o=m.grid;b.focused=!1,c.attr("tabindex",-1),c.find("div").on("click",function(a){m.cellNav.broadcastCellNav(new g(b.row,b.col),a.ctrlKey||a.metaKey,a),a.stopPropagation(),b.$apply()}),c.on("mousedown",i),m.grid.api.edit&&(m.grid.api.edit.on.beginCellEdit(b,function(){c.off("mousedown",i)}),m.grid.api.edit.on.afterCellEdit(b,function(){c.on("mousedown",i)}),m.grid.api.edit.on.cancelCellEdit(b,function(){c.on("mousedown",i)})),j(),c.on("focus",function(a){m.cellNav.broadcastCellNav(new g(b.row,b.col),!1,a),a.stopPropagation(),b.$apply()}),b.$on(e.CELL_NAV_EVENT,j);var p=m.grid.registerDataChangeCallback(function(b){l(),a(j)},[f.dataChange.ROW]);b.$on("$destroy",function(){p(),c.find("div").off(),c.off()})}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.edit",["ui.grid"]);a.constant("uiGridEditConstants",{EDITABLE_CELL_TEMPLATE:/EDITABLE_CELL_TEMPLATE/g,EDITABLE_CELL_DIRECTIVE:/editable_cell_directive/g,events:{BEGIN_CELL_EDIT:"uiGridEventBeginCellEdit",END_CELL_EDIT:"uiGridEventEndCellEdit",CANCEL_CELL_EDIT:"uiGridEventCancelCellEdit"}}),a.service("uiGridEditService",["$q","uiGridConstants","gridUtil",function(a,b,c){var d={initializeGrid:function(a){d.defaultGridOptions(a.options),a.registerColumnBuilder(d.editColumnBuilder),a.edit={};var b={events:{edit:{afterCellEdit:function(a,b,c,d){},beginCellEdit:function(a,b,c){},cancelCellEdit:function(a,b){}}},methods:{edit:{}}};a.api.registerEventsFromObject(b.events)},defaultGridOptions:function(a){a.cellEditableCondition=void 0===a.cellEditableCondition?!0:a.cellEditableCondition,a.enableCellEditOnFocus=void 0===a.enableCellEditOnFocus?!1:a.enableCellEditOnFocus},editColumnBuilder:function(b,d,e){var f=[];return b.enableCellEdit=void 0===b.enableCellEdit?void 0===e.enableCellEdit?"object"!==b.type:e.enableCellEdit:b.enableCellEdit,b.cellEditableCondition=void 0===b.cellEditableCondition?e.cellEditableCondition:b.cellEditableCondition,b.enableCellEdit&&(b.editableCellTemplate=b.editableCellTemplate||e.editableCellTemplate||"ui-grid/cellEditor",f.push(c.getTemplate(b.editableCellTemplate).then(function(a){d.editableCellTemplate=a},function(a){throw new Error("Couldn't fetch/use colDef.editableCellTemplate '"+b.editableCellTemplate+"'")}))),b.enableCellEditOnFocus=void 0===b.enableCellEditOnFocus?e.enableCellEditOnFocus:b.enableCellEditOnFocus,a.all(f)},isStartEditKey:function(a){return a.metaKey||a.keyCode===b.keymap.ESC||a.keyCode===b.keymap.SHIFT||a.keyCode===b.keymap.CTRL||a.keyCode===b.keymap.ALT||a.keyCode===b.keymap.WIN||a.keyCode===b.keymap.CAPSLOCK||a.keyCode===b.keymap.LEFT||a.keyCode===b.keymap.TAB&&a.shiftKey||a.keyCode===b.keymap.RIGHT||a.keyCode===b.keymap.TAB||a.keyCode===b.keymap.UP||a.keyCode===b.keymap.ENTER&&a.shiftKey||a.keyCode===b.keymap.DOWN||a.keyCode===b.keymap.ENTER?!1:!0}};return d}]),a.directive("uiGridEdit",["gridUtil","uiGridEditService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["uiGridEditConstants",function(a){return{replace:!0,priority:-99998,require:["^uiGrid","^uiGridRenderContainer"],scope:!1,compile:function(){return{post:function(b,c,d,e){var f=e[0];if(f.grid.api.edit&&f.grid.api.cellNav){var g=e[1].containerId;"body"===g&&(b.$on(a.events.CANCEL_CELL_EDIT,function(){f.focus()}),b.$on(a.events.END_CELL_EDIT,function(){f.focus()}))}}}}}}]),a.directive("uiGridCell",["$compile","$injector","$timeout","uiGridConstants","uiGridEditConstants","gridUtil","$parse","uiGridEditService","$rootScope","$q",function(a,b,c,d,e,f,g,h,i,j){var k=500;if(b.has("uiGridCellNavService")){b.get("uiGridCellNavService")}return{priority:-100,restrict:"A",scope:!1,require:"?^uiGrid",link:function(b,l,m,n){function o(){l.on("dblclick",u),l.on("touchstart",p),n&&n.grid.api.cellNav&&(G=n.grid.api.cellNav.on.viewPortKeyDown(b,function(a,c){null!==c&&(c.row!==b.row||c.col!==b.col||b.col.colDef.enableCellEditOnFocus||s(a))}),F=n.grid.api.cellNav.on.navigate(b,function(a,d,e){b.col.colDef.enableCellEditOnFocus&&(d&&a.row===d.row&&a.col===d.col||a.row!==b.row||a.col!==b.col||c(function(){u(e)}))})),b.beginEditEventsWired=!0}function p(a){"undefined"!=typeof a.originalEvent&&void 0!==a.originalEvent&&(a=a.originalEvent),l.on("touchend",q),C=c(function(){},k),C.then(function(){setTimeout(u,0),l.off("touchend",q)})}function q(a){c.cancel(C),l.off("touchend",q)}function r(){l.off("dblclick",u),l.off("keydown",s),l.off("touchstart",p),F(),G(),b.beginEditEventsWired=!1}function s(a){h.isStartEditKey(a)&&u(a)}function t(a,c){return!c.isSaving&&(angular.isFunction(a.colDef.cellEditableCondition)?a.colDef.cellEditableCondition(b):a.colDef.cellEditableCondition)}function u(a){b.grid.api.core.scrollToIfNecessary(b.row,b.col).then(function(){v(a)})}function v(h){if(!E&&t(b.col,b.row)){var k=b.row.getQualifiedColField(b.col);b.col.colDef.editModelField&&(k=f.preEval("row.entity."+b.col.colDef.editModelField)),B=g(k),A=B(b),z=b.col.editableCellTemplate,z=z.replace(d.MODEL_COL_FIELD,k),z=z.replace(d.COL_FIELD,"grid.getCellValue(row, col)");var m=b.col.colDef.editDropdownFilter?"|"+b.col.colDef.editDropdownFilter:"";z=z.replace(d.CUSTOM_FILTERS,m);var n="text";switch(b.col.colDef.type){case"boolean":n="checkbox";break;case"number":n="number";break;case"date":n="date"}z=z.replace("INPUT_TYPE",n);var o=b.col.colDef.editDropdownOptionsFunction;if(o)j.when(o(b.row.entity,b.col.colDef)).then(function(a){b.editDropdownOptionsArray=a});else{var p=b.col.colDef.editDropdownRowEntityOptionsArrayPath;p?b.editDropdownOptionsArray=y(b.row.entity,p):b.editDropdownOptionsArray=b.col.colDef.editDropdownOptionsArray}b.editDropdownIdLabel=b.col.colDef.editDropdownIdLabel?b.col.colDef.editDropdownIdLabel:"id",b.editDropdownValueLabel=b.col.colDef.editDropdownValueLabel?b.col.colDef.editDropdownValueLabel:"value";var q=function(){E=!0,r();var c=angular.element(z);l.append(c),D=b.$new(),a(c)(D);var d=angular.element(l.children()[0]);d.addClass("ui-grid-cell-contents-hidden")};i.$$phase?q():b.$apply(q);var s=b.col.grid.api.core.on.scrollBegin(b,function(){b.grid.disableScrolling||(w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),s(),u(),v())}),u=b.$on(e.events.END_CELL_EDIT,function(){w(),b.grid.api.edit.raise.afterCellEdit(b.row.entity,b.col.colDef,B(b),A),u(),s(),v()}),v=b.$on(e.events.CANCEL_CELL_EDIT,function(){x(),v(),s(),u()});b.$broadcast(e.events.BEGIN_CELL_EDIT,h),c(function(){b.grid.api.edit.raise.beginCellEdit(b.row.entity,b.col.colDef,h)})}}function w(){if(b.grid.disableScrolling=!1,E){n&&n.grid.api.cellNav&&n.focus();var a=angular.element(l.children()[0]);D.$destroy();for(var c=l.children(),e=1;e<c.length;e++)angular.element(c[e]).remove();a.removeClass("ui-grid-cell-contents-hidden"),E=!1,o(),b.grid.api.core.notifyDataChange(d.dataChange.EDIT)}}function x(){b.grid.disableScrolling=!1,E&&(B.assign(b,A),b.$apply(),b.grid.api.edit.raise.cancelCellEdit(b.row.entity,b.col.colDef),w())}function y(a,b){b=b.replace(/\[(\w+)\]/g,".$1"),b=b.replace(/^\./,"");for(var c=b.split(".");c.length;){var d=c.shift();if(!(d in a))return;a=a[d]}return a}var z,A,B,C,D,E=!1;if(b.col.colDef.enableCellEdit){var F=function(){},G=function(){},H=function(){b.col.colDef.enableCellEdit&&b.row.enableCellEdit!==!1?b.beginEditEventsWired||o():b.beginEditEventsWired&&r()};H();var I=b.$watch("row",function(a,b){a!==b&&H()});b.$on("$destroy",function(){I(),l.off()})}}}}]),a.directive("uiGridEditor",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout","uiGridEditService",function(a,b,c,d,e){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer","ngModel"],compile:function(){return{pre:function(a,b,c){},post:function(a,f,g,h){var i,j,k;h[0]&&(i=h[0]),h[1]&&(j=h[1]),h[2]&&(k=h[2]),a.$on(c.events.BEGIN_CELL_EDIT,function(b,c){if(d(function(){if(f[0].focus(),!f[0].select||!a.col.colDef.enableCellEditOnFocus&&i&&i.grid.api.cellNav)try{f[0].setSelectionRange(f[0].value.length,f[0].value.length)}catch(b){}else f[0].select()}),i&&i.grid.api.cellNav)var g=i.grid.api.cellNav.on.viewPortKeyPress(a,function(a,b){e.isStartEditKey(a)&&(k.$setViewValue(String.fromCharCode("number"==typeof a.which?a.which:a.keyCode),a),k.$render()),g()});f.on("mousedown",function(b){"checkbox"===f[0].type&&(f.off("blur",a.stopEdit),d(function(){f.focus(),f.on("blur",a.stopEdit)}))}),f.on("blur",a.stopEdit)}),a.deepEdit=!1,a.stopEdit=function(b){a.inputForm&&!a.inputForm.$valid?(b.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)):a.$emit(c.events.END_CELL_EDIT),a.deepEdit=!1},f.on("click",function(b){"checkbox"!==f[0].type&&(a.deepEdit=!0,d(function(){a.grid.disableScrolling=!0}))}),f.on("keydown",function(d){switch(d.keyCode){case b.keymap.ESC:d.stopPropagation(),a.$emit(c.events.CANCEL_CELL_EDIT)}if(!a.deepEdit||d.keyCode!==b.keymap.LEFT&&d.keyCode!==b.keymap.RIGHT&&d.keyCode!==b.keymap.UP&&d.keyCode!==b.keymap.DOWN)if(i&&i.grid.api.cellNav)d.uiGridTargetRenderContainerId=j.containerId,null!==i.cellNav.handleKeyDown(d)&&a.stopEdit(d);else switch(d.keyCode){case b.keymap.ENTER:case b.keymap.TAB:d.stopPropagation(),d.preventDefault(),a.stopEdit(d)}else d.stopPropagation();return!0}),a.$on("$destroy",function(){f.off()})}}}}}]),a.directive("uiGridEditor",["$filter",function(a){function b(a){if("undefined"==typeof a||""===a)return null;var b=a.split("-");if(3!==b.length)return null;var c=parseInt(b[0],10),d=parseInt(b[1],10),e=parseInt(b[2],10);return 1>d||1>c||1>e?null:new Date(c,d-1,e)}return{priority:-100,require:"?ngModel",link:function(c,d,e,f){2===angular.version.minor&&e.type&&"date"===e.type&&f&&(f.$formatters.push(function(b){return f.$setValidity(null,!b||!isNaN(b.getTime())),a("date")(b,"yyyy-MM-dd")}),f.$parsers.push(function(a){if(a&&a.length>0){var c=b(a);return f.$setValidity(null,c&&!isNaN(c.getTime())),c}return f.$setValidity(null,!0),null}))}}}]),a.directive("uiGridEditDropdown",["uiGridConstants","uiGridEditConstants","$timeout",function(a,b,c){return{require:["?^uiGrid","?^uiGridRenderContainer"],scope:!0,compile:function(){return{pre:function(a,b,c){},post:function(d,e,f,g){var h=g[0],i=g[1];d.$on(b.events.BEGIN_CELL_EDIT,function(){c(function(){e[0].focus()}),e[0].style.width=e[0].parentElement.offsetWidth-1+"px",e.on("blur",function(a){d.stopEdit(a)})}),d.stopEdit=function(a){d.$emit(b.events.END_CELL_EDIT)},e.on("keydown",function(c){switch(c.keyCode){case a.keymap.ESC:c.stopPropagation(),d.$emit(b.events.CANCEL_CELL_EDIT)}if(h&&h.grid.api.cellNav)c.uiGridTargetRenderContainerId=i.containerId,null!==h.cellNav.handleKeyDown(c)&&d.stopEdit(c);else switch(c.keyCode){case a.keymap.ENTER:case a.keymap.TAB:c.stopPropagation(),c.preventDefault(),d.stopEdit(c)}return!0}),d.$on("$destroy",function(){e.off()})}}}}}]),a.directive("uiGridEditFileChooser",["gridUtil","uiGridConstants","uiGridEditConstants","$timeout",function(a,b,c,d){return{scope:!0,require:["?^uiGrid","?^uiGridRenderContainer"],compile:function(){return{pre:function(a,b,c){},post:function(b,d,e,f){var g,h;f[0]&&(g=f[0]),f[1]&&(h=f[1]);var i=(g.grid,function(d){var e=d.srcElement||d.target;e&&e.files&&e.files.length>0?("function"==typeof b.col.colDef.editFileChooserCallback?b.col.colDef.editFileChooserCallback(b.row,b.col,e.files):a.logError("You need to set colDef.editFileChooserCallback to use the file chooser"),e.form.reset(),b.$emit(c.events.END_CELL_EDIT)):b.$emit(c.events.CANCEL_CELL_EDIT)});d[0].addEventListener("change",i,!1),b.$on(c.events.BEGIN_CELL_EDIT,function(){d[0].focus(),d[0].select(),d.on("blur",function(a){b.$emit(c.events.END_CELL_EDIT)})}),b.$on("$destroy",function(){d.off(),d[0].removeEventListener("change",i,!1)})}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.emptyBaseLayer",["ui.grid"]);a.service("uiGridBaseLayerService",["gridUtil","$compile",function(a,b){var c={initializeGrid:function(a,b){a.baseLayer={emptyRows:[]},a.options.enableEmptyGridBaseLayer!==!1&&(a.options.enableEmptyGridBaseLayer=!b)},setNumberOfEmptyRows:function(a,b){var c=b.options.rowHeight,d=Math.ceil(a/c);if(d>0){b.baseLayer.emptyRows=[];for(var e=0;d>e;e++)b.baseLayer.emptyRows.push({})}}};return c}]),a.directive("uiGridEmptyBaseLayer",["gridUtil","uiGridBaseLayerService","$parse",function(a,b,c){return{require:"^uiGrid",scope:!1,compile:function(a,d){return{pre:function(a,d,e,f){var g=c(e.uiGridEmptyBaseLayer)(a)===!1;b.initializeGrid(f.grid,g)},post:function(a,c,d,e){function f(){var a=h.getViewportHeight();return a!==i?(i=a,!0):!1}function g(a){return".grid"+e.grid.id+" .ui-grid-render-container .ui-grid-empty-base-layer-container.ui-grid-canvas { height: "+a+"px; }"}if(e.grid.options.enableEmptyGridBaseLayer){var h=e.grid.renderContainers.body,i=h.getViewportHeight();e.grid.registerStyleComputation({func:function(){return f()&&b.setNumberOfEmptyRows(i,e.grid),g(i)}})}}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){var d=c.get("ui-grid/emptyBaseLayerContainer");return a.prepend(d),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.expandable",["ui.grid"]);a.service("uiGridExpandableService",["gridUtil","$compile",function(a,b){var c={initializeGrid:function(b){b.expandable={},b.expandable.expandedAll=!1,b.options.enableExpandable=b.options.enableExpandable!==!1,b.options.expandableRowHeight=b.options.expandableRowHeight||150,b.options.expandableRowHeaderWidth=b.options.expandableRowHeaderWidth||40,b.options.enableExpandable&&!b.options.expandableRowTemplate&&(a.logError("You have not set the expandableRowTemplate, disabling expandable module"),b.options.enableExpandable=!1);var d={events:{expandable:{rowExpandedBeforeStateChanged:function(a,b){},rowExpandedStateChanged:function(a,b){}}},methods:{expandable:{toggleRowExpansion:function(a){var d=b.getRow(a);null!==d&&c.toggleRowExpansion(b,d)},expandAllRows:function(){c.expandAllRows(b)},collapseAllRows:function(){c.collapseAllRows(b)},toggleAllRows:function(){c.toggleAllRows(b)},expandRow:function(a){var d=b.getRow(a);null===d||d.isExpanded||c.toggleRowExpansion(b,d)},collapseRow:function(a){var d=b.getRow(a);null!==d&&d.isExpanded&&c.toggleRowExpansion(b,d)},getExpandedRows:function(){
-return c.getExpandedRows(b).map(function(a){return a.entity})}}}};b.api.registerEventsFromObject(d.events),b.api.registerMethodsFromObject(d.methods)},toggleRowExpansion:function(a,b){a.api.expandable.raise.rowExpandedBeforeStateChanged(b),b.isExpanded=!b.isExpanded,angular.isUndefined(b.expandedRowHeight)&&(b.expandedRowHeight=a.options.expandableRowHeight),b.isExpanded?b.height=b.grid.options.rowHeight+b.expandedRowHeight:(b.height=b.grid.options.rowHeight,a.expandable.expandedAll=!1),a.api.expandable.raise.rowExpandedStateChanged(b)},expandAllRows:function(a,b){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded||c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.renderContainers.body.visibleRowCache.forEach(function(b){b.isExpanded&&c.toggleRowExpansion(a,b)}),a.expandable.expandedAll=!1,a.queueGridRefresh()},toggleAllRows:function(a){a.expandable.expandedAll?c.collapseAllRows(a):c.expandAllRows(a)},getExpandedRows:function(a){return a.rows.filter(function(a){return a.isExpanded})}};return c}]),a.directive("uiGridExpandable",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,d,e,f){if(a.initializeGrid(f.grid),f.grid.options.enableExpandable&&f.grid.options.enableExpandableRowHeader!==!1){var g={name:"expandableButtons",displayName:"",exporterSuppressExport:!0,enableColumnResizing:!1,enableColumnMenu:!1,width:f.grid.options.expandableRowHeaderWidth||40};g.cellTemplate=b.get("ui-grid/expandableRowHeader"),g.headerCellTemplate=b.get("ui-grid/expandableTopRowHeader"),f.grid.addRowHeaderColumn(g,-90)}},post:function(a,b,c,d){}}}}}]),a.directive("uiGrid",["uiGridExpandableService","$templateCache",function(a,b){return{replace:!0,priority:599,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,b,c,d){d.grid.api.core.on.renderingComplete(a,function(){a.row&&a.row.grid&&a.row.grid.options&&a.row.grid.options.enableExpandable&&(d.grid.parentRow=a.row)})},post:function(a,b,c,d){}}}}}]),a.directive("uiGridExpandableRow",["uiGridExpandableService","$timeout","$compile","uiGridConstants","gridUtil","$interval","$log",function(a,b,c,d,e,f,g){return{replace:!1,priority:0,scope:!1,compile:function(){return{pre:function(a,b,d,f){e.getTemplate(a.grid.options.expandableRowTemplate).then(function(d){if(a.grid.options.expandableRowScope){var e=a.grid.options.expandableRowScope;for(var f in e)e.hasOwnProperty(f)&&(a[f]=e[f])}var g=angular.element(d);b.append(g),g=c(g)(a),a.row.expandedRendered=!0})},post:function(a,b,c,d){a.$on("$destroy",function(){a.row.expandedRendered=!1})}}}}}]),a.directive("uiGridRow",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){return{pre:function(a,b,c,d){a.grid.options.enableExpandable&&(a.expandableRow={},a.expandableRow.shouldRenderExpand=function(){var b="body"===a.colContainer.name&&a.grid.options.enableExpandable!==!1&&a.row.isExpanded&&(!a.grid.isScrollingVertically||a.row.expandedRendered);return b},a.expandableRow.shouldRenderFiller=function(){var b=a.row.isExpanded&&("body"!==a.colContainer.name||a.grid.isScrollingVertically&&!a.row.expandedRendered);return b})},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","gridUtil","$templateCache",function(a,b,c){return{priority:-200,scope:!1,compile:function(a,b){var d=angular.element(a.children().children()[0]),e=c.get("ui-grid/expandableScrollFiller"),f=c.get("ui-grid/expandableRow");return d.append(f),d.append(e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.exporter",["ui.grid"]);a.constant("uiGridExporterConstants",{featureName:"exporter",ALL:"all",VISIBLE:"visible",SELECTED:"selected",CSV_CONTENT:"CSV_CONTENT",BUTTON_LABEL:"BUTTON_LABEL",FILE_NAME:"FILE_NAME"}),a.service("uiGridExporterService",["$q","uiGridExporterConstants","gridUtil","$compile","$interval","i18nService",function(a,b,c,d,e,f){var g={delay:100,initializeGrid:function(a){a.exporter={},this.defaultGridOptions(a.options);var b={events:{exporter:{}},methods:{exporter:{csvExport:function(b,c){g.csvExport(a,b,c)},pdfExport:function(b,c){g.pdfExport(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods),a.api.core.addToGridMenu?g.addToMenu(a):e(function(){a.api.core.addToGridMenu&&g.addToMenu(a)},this.delay,1)},defaultGridOptions:function(a){a.exporterSuppressMenu=a.exporterSuppressMenu===!0,a.exporterMenuLabel=a.exporterMenuLabel?a.exporterMenuLabel:"Export",a.exporterSuppressColumns=a.exporterSuppressColumns?a.exporterSuppressColumns:[],a.exporterCsvColumnSeparator=a.exporterCsvColumnSeparator?a.exporterCsvColumnSeparator:",",a.exporterCsvFilename=a.exporterCsvFilename?a.exporterCsvFilename:"download.csv",a.exporterPdfFilename=a.exporterPdfFilename?a.exporterPdfFilename:"download.pdf",a.exporterOlderExcelCompatibility=a.exporterOlderExcelCompatibility===!0,a.exporterIsExcelCompatible=a.exporterIsExcelCompatible===!0,a.exporterMenuItemOrder=a.exporterMenuItemOrder?a.exporterMenuItemOrder:200,a.exporterPdfDefaultStyle=a.exporterPdfDefaultStyle?a.exporterPdfDefaultStyle:{fontSize:11},a.exporterPdfTableStyle=a.exporterPdfTableStyle?a.exporterPdfTableStyle:{margin:[0,5,0,15]},a.exporterPdfTableHeaderStyle=a.exporterPdfTableHeaderStyle?a.exporterPdfTableHeaderStyle:{bold:!0,fontSize:12,color:"black"},a.exporterPdfHeader=a.exporterPdfHeader?a.exporterPdfHeader:null,a.exporterPdfFooter=a.exporterPdfFooter?a.exporterPdfFooter:null,a.exporterPdfOrientation=a.exporterPdfOrientation?a.exporterPdfOrientation:"landscape",a.exporterPdfPageSize=a.exporterPdfPageSize?a.exporterPdfPageSize:"A4",a.exporterPdfMaxGridWidth=a.exporterPdfMaxGridWidth?a.exporterPdfMaxGridWidth:720,a.exporterMenuAllData=void 0!==a.exporterMenuAllData?a.exporterMenuAllData:!0,a.exporterMenuVisibleData=void 0!==a.exporterMenuVisibleData?a.exporterMenuVisibleData:!0,a.exporterMenuSelectedData=void 0!==a.exporterMenuSelectedData?a.exporterMenuSelectedData:!0,a.exporterMenuCsv=void 0!==a.exporterMenuCsv?a.exporterMenuCsv:!0,a.exporterMenuPdf=void 0!==a.exporterMenuPdf?a.exporterMenuPdf:!0,a.exporterPdfCustomFormatter=a.exporterPdfCustomFormatter&&"function"==typeof a.exporterPdfCustomFormatter?a.exporterPdfCustomFormatter:function(a){return a},a.exporterHeaderFilterUseName=a.exporterHeaderFilterUseName===!0,a.exporterFieldCallback=a.exporterFieldCallback?a.exporterFieldCallback:function(a,b,c,d){return d},a.exporterAllDataFn=a.exporterAllDataFn?a.exporterAllDataFn:null,null==a.exporterAllDataFn&&a.exporterAllDataPromise&&(a.exporterAllDataFn=a.exporterAllDataPromise)},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:f.getSafeText("gridMenu.exporterAllAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuAllData},order:a.options.exporterMenuItemOrder},{title:f.getSafeText("gridMenu.exporterVisibleAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuVisibleData},order:a.options.exporterMenuItemOrder+1},{title:f.getSafeText("gridMenu.exporterSelectedAsCsv"),action:function(a){this.grid.api.exporter.csvExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuCsv&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:a.options.exporterMenuItemOrder+2},{title:f.getSafeText("gridMenu.exporterAllAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.ALL,b.ALL)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuAllData},order:a.options.exporterMenuItemOrder+3},{title:f.getSafeText("gridMenu.exporterVisibleAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.VISIBLE,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuVisibleData},order:a.options.exporterMenuItemOrder+4},{title:f.getSafeText("gridMenu.exporterSelectedAsPdf"),action:function(a){this.grid.api.exporter.pdfExport(b.SELECTED,b.VISIBLE)},shown:function(){return this.grid.options.exporterMenuPdf&&this.grid.options.exporterMenuSelectedData&&this.grid.api.selection&&this.grid.api.selection.getSelectedRows().length>0},order:a.options.exporterMenuItemOrder+5}])},csvExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=a.options.showHeader?d.getColumnHeaders(a,c):[],f=d.getData(a,b,c),g=d.formatAsCsv(e,f,a.options.exporterCsvColumnSeparator);d.downloadFile(a.options.exporterCsvFilename,g,a.options.exporterCsvColumnSeparator,a.options.exporterOlderExcelCompatibility,a.options.exporterIsExcelCompatible)})},loadAllDataIfNeeded:function(c,d,e){if(d===b.ALL&&c.rows.length!==c.options.totalItems&&c.options.exporterAllDataFn)return c.options.exporterAllDataFn().then(function(){c.modifyRows(c.options.data)});var f=a.defer();return f.resolve(),f.promise},getColumnHeaders:function(a,c){var d,e=[];if(c===b.ALL)d=a.columns;else{var f=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],g=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],h=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];d=f.concat(g,h)}return d.forEach(function(b,c){b.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(b.name)&&e.push({name:b.field,displayName:a.options.exporterHeaderFilter?a.options.exporterHeaderFilterUseName?a.options.exporterHeaderFilter(b.name):a.options.exporterHeaderFilter(b.displayName):b.displayName,width:b.drawnWidth?b.drawnWidth:b.width,align:"number"===b.colDef.type?"right":"left"})}),e},getData:function(a,d,e,f){var g,h,i=[];switch(d){case b.ALL:g=a.rows;break;case b.VISIBLE:g=a.getVisibleRows();break;case b.SELECTED:a.api.selection?g=a.api.selection.getSelectedGridRows():c.logError("selection feature must be enabled to allow selected rows to be exported")}if(e===b.ALL)h=a.columns;else{var j=a.renderContainers.left?a.renderContainers.left.visibleColumnCache.filter(function(a){return a.visible}):[],k=a.renderContainers.body?a.renderContainers.body.visibleColumnCache.filter(function(a){return a.visible}):[],l=a.renderContainers.right?a.renderContainers.right.visibleColumnCache.filter(function(a){return a.visible}):[];h=j.concat(k,l)}return g.forEach(function(c,d){if(c.exporterEnableExporting!==!1){var g=[];h.forEach(function(d,h){if((d.visible||e===b.ALL)&&d.colDef.exporterSuppressExport!==!0&&-1===a.options.exporterSuppressColumns.indexOf(d.name)){var i=f?a.getCellDisplayValue(c,d):a.getCellValue(c,d),j={value:a.options.exporterFieldCallback(a,c,d,i)};d.colDef.exporterPdfAlign&&(j.alignment=d.colDef.exporterPdfAlign),g.push(j)}}),i.push(g)}}),i},formatAsCsv:function(a,b,c){var d=this,e=a.map(function(a){return{value:a.displayName}}),f=e.length>0?d.formatRowAsCsv(this,c)(e)+"\n":"";return f+=b.map(this.formatRowAsCsv(this,c)).join("\n")},formatRowAsCsv:function(a,b){return function(c){return c.map(a.formatFieldAsCsv).join(b)}},formatFieldAsCsv:function(a){return null==a.value?"":"number"==typeof a.value?a.value:"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?'"'+a.value.replace(/"/g,'""')+'"':JSON.stringify(a.value)},isIE:function(){var a=navigator.userAgent.search(/(?:Edge|MSIE|Trident\/.*; rv:)/),b=!1;return-1!==a&&(b=!0),b},downloadFile:function(a,b,c,d,e){var f,g=document,h=g.createElement("a"),i="application/octet-stream;charset=utf-8",j=this.isIE();if(e&&(b="sep="+c+"\r\n"+b),navigator.msSaveBlob)return navigator.msSaveOrOpenBlob(new Blob([d?"\ufeff":"",b],{type:i}),a);if(j){var k=g.createElement("iframe");return document.body.appendChild(k),k.contentWindow.document.open("text/html","replace"),k.contentWindow.document.write(b),k.contentWindow.document.close(),k.contentWindow.focus(),k.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(k),!0}if("download"in h){var l=new Blob([d?"\ufeff":"",b],{type:i});f=URL.createObjectURL(l),h.setAttribute("download",a)}else f="data:"+i+","+encodeURIComponent(b),h.setAttribute("target","_blank");h.href=f,h.setAttribute("style","display:none;"),g.body.appendChild(h),setTimeout(function(){if(h.click)h.click();else if(document.createEvent){var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),h.dispatchEvent(a)}g.body.removeChild(h)},this.delay)},pdfExport:function(a,b,c){var d=this;this.loadAllDataIfNeeded(a,b,c).then(function(){var e=d.getColumnHeaders(a,c),f=d.getData(a,b,c),g=d.prepareAsPdf(a,e,f);d.isIE()||-1!==navigator.appVersion.indexOf("Edge")?d.downloadPDF(a.options.exporterPdfFilename,g):pdfMake.createPdf(g).open()})},downloadPDF:function(a,b){var c,d=document;d.createElement("a");c=this.isIE();var e,f=pdfMake.createPdf(b);f.getBuffer(function(b){if(e=new Blob([b]),navigator.msSaveBlob)return navigator.msSaveBlob(e,a);if(c){var f=d.createElement("iframe");return document.body.appendChild(f),f.contentWindow.document.open("text/html","replace"),f.contentWindow.document.write(e),f.contentWindow.document.close(),f.contentWindow.focus(),f.contentWindow.document.execCommand("SaveAs",!0,a),document.body.removeChild(f),!0}})},prepareAsPdf:function(a,b,c){var d=this.calculatePdfHeaderWidths(a,b),e=b.map(function(a){return{text:a.displayName,style:"tableHeader"}}),f=c.map(this.formatRowAsPdf(this)),g=[e].concat(f),h={pageOrientation:a.options.exporterPdfOrientation,pageSize:a.options.exporterPdfPageSize,content:[{style:"tableStyle",table:{headerRows:1,widths:d,body:g}}],styles:{tableStyle:a.options.exporterPdfTableStyle,tableHeader:a.options.exporterPdfTableHeaderStyle},defaultStyle:a.options.exporterPdfDefaultStyle};return a.options.exporterPdfLayout&&(h.layout=a.options.exporterPdfLayout),a.options.exporterPdfHeader&&(h.header=a.options.exporterPdfHeader),a.options.exporterPdfFooter&&(h.footer=a.options.exporterPdfFooter),a.options.exporterPdfCustomFormatter&&(h=a.options.exporterPdfCustomFormatter(h)),h},calculatePdfHeaderWidths:function(a,b){var c=0;b.forEach(function(a){"number"==typeof a.width&&(c+=a.width)});var d=0;b.forEach(function(a){if("*"===a.width&&(d+=100),"string"==typeof a.width&&a.width.match(/(\d)*%/)){var b=parseInt(a.width.match(/(\d)*%/)[0]);a.width=c*b/100,d+=a.width}});var e=c+d;return b.map(function(b){return"*"===b.width?b.width:b.width*a.options.exporterPdfMaxGridWidth/e})},formatRowAsPdf:function(a){return function(b){return b.map(a.formatFieldAsPdfString)}},formatFieldAsPdfString:function(a){var b;return b=null==a.value?"":"number"==typeof a.value?a.value.toString():"boolean"==typeof a.value?a.value?"TRUE":"FALSE":"string"==typeof a.value?a.value.replace(/"/g,'""'):JSON.stringify(a.value).replace(/^"/,"").replace(/"$/,""),a.alignment&&"string"==typeof a.alignment&&(b={text:b,alignment:a.alignment}),b}};return g}]),a.directive("uiGridExporter",["uiGridExporterConstants","uiGridExporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid),e.grid.exporter.$scope=a}}}])}(),function(){"use strict";var a=angular.module("ui.grid.grouping",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridGroupingConstants",{featureName:"grouping",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridGroupingService",["$q","uiGridGroupingConstants","gridUtil","rowSorter","GridRow","gridClassFactory","i18nService","uiGridConstants","uiGridTreeBaseService",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){i.initializeGrid(a,b),a.grouping={},a.grouping.groupHeaderCache={},j.defaultGridOptions(a.options),a.registerRowsProcessor(j.groupRows,400),a.registerColumnBuilder(j.groupingColumnBuilder),a.registerColumnsProcessor(j.groupingColumnProcessor,400);var c={events:{grouping:{aggregationChanged:{},groupingChanged:{}}},methods:{grouping:{getGrouping:function(b){var c=j.getGrouping(a);return c.grouping.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations.forEach(function(a){a.colName=a.col.name,delete a.col}),c.aggregations=c.aggregations.filter(function(a){return!a.aggregation.source||"grouping"!==a.aggregation.source}),b&&(c.rowExpandedStates=j.getRowExpandedStates(a.grouping.groupingHeaderCache)),c},setGrouping:function(b){j.setGrouping(a,b)},groupColumn:function(b){var c=a.getColumn(b);j.groupColumn(a,c)},ungroupColumn:function(b){var c=a.getColumn(b);j.ungroupColumn(a,c)},clearGrouping:function(){j.clearGrouping(a)},aggregateColumn:function(b,c,d){var e=a.getColumn(b);j.aggregateColumn(a,e,c,d)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods),a.api.core.on.sortChanged(b,j.tidyPriorities)},defaultGridOptions:function(a){a.enableGrouping=a.enableGrouping!==!1,a.groupingShowCounts=a.groupingShowCounts!==!1,a.groupingNullLabel="undefined"==typeof a.groupingNullLabel?"Null":a.groupingNullLabel,a.enableGroupHeaderSelection=a.enableGroupHeaderSelection===!0},groupingColumnBuilder:function(a,d,e){if(a.enableGrouping!==!1){"undefined"==typeof d.grouping&&"undefined"!=typeof a.grouping?(d.grouping=angular.copy(a.grouping),"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>-1&&(d.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,d.treeAggregationFinalizerFn=j.groupedFinalizerFn)):"undefined"==typeof d.grouping&&(d.grouping={}),"undefined"!=typeof d.grouping&&"undefined"!=typeof d.grouping.groupPriority&&d.grouping.groupPriority>=0&&(d.suppressRemoveSort=!0);var f={name:"ui.grid.grouping.group",title:g.get().grouping.group,icon:"ui-grid-icon-indent-right",shown:function(){return"undefined"==typeof this.context.col.grouping||"undefined"==typeof this.context.col.grouping.groupPriority||this.context.col.grouping.groupPriority<0},action:function(){j.groupColumn(this.context.col.grid,this.context.col)}},h={name:"ui.grid.grouping.ungroup",title:g.get().grouping.ungroup,icon:"ui-grid-icon-indent-left",shown:function(){return"undefined"!=typeof this.context.col.grouping&&"undefined"!=typeof this.context.col.grouping.groupPriority&&this.context.col.grouping.groupPriority>=0},action:function(){j.ungroupColumn(this.context.col.grid,this.context.col)}},k={name:"ui.grid.grouping.aggregateRemove",title:g.get().grouping.aggregate_remove,shown:function(){return"undefined"!=typeof this.context.col.treeAggregationFn},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,null)}},l=function(a,b){b=b||g.get().grouping["aggregate_"+a]||a;var e={name:"ui.grid.grouping.aggregate"+a,title:b,shown:function(){return"undefined"==typeof this.context.col.treeAggregation||"undefined"==typeof this.context.col.treeAggregation.type||this.context.col.treeAggregation.type!==a},action:function(){j.aggregateColumn(this.context.col.grid,this.context.col,a)}};c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregate"+a)||d.menuItems.push(e)};d.colDef.groupingShowGroupingMenu!==!1&&(c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.group")||d.menuItems.push(f),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.ungroup")||d.menuItems.push(h)),d.colDef.groupingShowAggregationMenu!==!1&&(angular.forEach(i.nativeAggregations(),function(a,b){l(b)}),angular.forEach(e.treeCustomAggregations,function(a,b){l(b,a.menuTitle)}),c.arrayContainsObjectWithProperty(d.menuItems,"name","ui.grid.grouping.aggregateRemove")||d.menuItems.push(k))}},groupingColumnProcessor:function(a,b){return a=j.moveGroupColumns(this,a,b)},groupedFinalizerFn:function(a){var b=this;"undefined"!=typeof a.groupVal?(a.rendered=a.groupVal,b.grid.options.groupingShowCounts&&"date"!==b.colDef.type&&"object"!==b.colDef.type&&(a.rendered+=" ("+a.value+")")):a.rendered=null},moveGroupColumns:function(a,b,c){return a.options.moveGroupColumns===!1?b:(b.forEach(function(a,b){a.groupingPosition=b}),b.sort(function(a,b){var c,d;return c=a.isRowHeader?a.headerPriority:"undefined"==typeof a.grouping||"undefined"==typeof a.grouping.groupPriority||a.grouping.groupPriority<0?null:a.grouping.groupPriority,d=b.isRowHeader?b.headerPriority:"undefined"==typeof b.grouping||"undefined"==typeof b.grouping.groupPriority||b.grouping.groupPriority<0?null:b.grouping.groupPriority,null!==c&&null===d?-1:null!==d&&null===c?1:null!==c&&null!==d?c-d:a.groupingPosition-b.groupingPosition}),b.forEach(function(a,b){delete a.groupingPosition}),b)},groupColumn:function(a,c){"undefined"==typeof c.grouping&&(c.grouping={});var d=j.getGrouping(a);c.grouping.groupPriority=d.grouping.length,c.previousSort=angular.copy(c.sort),c.sort?("undefined"==typeof c.sort.direction||null===c.sort.direction)&&(c.sort.direction=h.ASC):c.sort={direction:h.ASC},c.treeAggregation={type:b.aggregation.COUNT,source:"grouping"},c.treeAggregationFn=i.nativeAggregations()[b.aggregation.COUNT].aggregationFn,c.treeAggregationFinalizerFn=j.groupedFinalizerFn,a.api.grouping.raise.groupingChanged(c),a.api.core.raise.sortChanged(a,a.getColumnSorting()),a.queueGridRefresh()},ungroupColumn:function(a,b){"undefined"!=typeof b.grouping&&(delete b.grouping.groupPriority,delete b.treeAggregation,delete b.customTreeAggregationFinalizer,b.previousSort&&(b.sort=b.previousSort,delete b.previousSort),j.tidyPriorities(a),a.api.grouping.raise.groupingChanged(b),a.api.core.raise.sortChanged(a,a.getColumnSorting()),a.queueGridRefresh())},aggregateColumn:function(a,b,c){"undefined"!=typeof b.grouping&&"undefined"!=typeof b.grouping.groupPriority&&b.grouping.groupPriority>=0&&j.ungroupColumn(a,b);var d={};"undefined"!=typeof a.options.treeCustomAggregations[c]?d=a.options.treeCustomAggregations[c]:"undefined"!=typeof i.nativeAggregations()[c]&&(d=i.nativeAggregations()[c]),b.treeAggregation={type:c,label:g.get().aggregation[d.label]||d.label},b.treeAggregationFn=d.aggregationFn,b.treeAggregationFinalizerFn=d.finalizerFn,a.api.grouping.raise.aggregationChanged(b),a.queueGridRefresh()},setGrouping:function(a,b){"undefined"!=typeof b&&(j.clearGrouping(a),b.grouping&&b.grouping.length&&b.grouping.length>0&&b.grouping.forEach(function(b){var c=a.getColumn(b.colName);c&&j.groupColumn(a,c)}),b.aggregations&&b.aggregations.length&&b.aggregations.forEach(function(b){var c=a.getColumn(b.colName);c&&j.aggregateColumn(a,c,b.aggregation.type)}),b.rowExpandedStates&&j.applyRowExpandedStates(a.grouping.groupingHeaderCache,b.rowExpandedStates))},clearGrouping:function(a){var b=j.getGrouping(a);b.grouping.length>0&&b.grouping.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.ungroupColumn(a,b.col)}),b.aggregations.length>0&&b.aggregations.forEach(function(b){b.col||(b.col=a.getColumn(b.colName)),j.aggregateColumn(a,b.col,null)})},tidyPriorities:function(a){"undefined"!=typeof a&&"undefined"==typeof a.grid||"undefined"==typeof this.grid||(a=this.grid);var b=[],c=[];a.columns.forEach(function(a,d){"undefined"!=typeof a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0?b.push(a):"undefined"!=typeof a.sort&&"undefined"!=typeof a.sort.priority&&a.sort.priority>=0&&c.push(a)}),b.sort(function(a,b){return a.grouping.groupPriority-b.grouping.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.suppressRemoveSort=!0,"undefined"==typeof a.sort&&(a.sort={}),a.sort.priority=b});var d=b.length;c.sort(function(a,b){return a.sort.priority-b.sort.priority}),c.forEach(function(a,b){a.sort.priority=d,a.suppressRemoveSort=a.colDef.suppressRemoveSort,d++})},groupRows:function(a){if(0===a.length)return a;var b=this;b.grouping.oldGroupingHeaderCache=b.grouping.groupingHeaderCache||{},b.grouping.groupingHeaderCache={};for(var c=j.initialiseProcessingState(b),e=function(e,h){var i=b.getCellValue(g,e.col);e.initialised&&0===d.getSortFn(b,e.col,a)(i,e.currentValue)||(j.insertGroupHeader(b,a,f,c,h),f++)},f=0;f<a.length;f++){var g=a[f];g.visible&&c.forEach(e)}return delete b.grouping.oldGroupingHeaderCache,a},initialiseProcessingState:function(a){var b=[],c=j.getGrouping(a);return c.grouping.forEach(function(a,c){b.push({fieldName:a.field,col:a.col,initialised:!1,currentValue:null,currentRow:null})}),b},getGrouping:function(a){var b=[],c=[];return a.columns.forEach(function(a,d){a.grouping&&"undefined"!=typeof a.grouping.groupPriority&&a.grouping.groupPriority>=0&&b.push({field:a.field,col:a,groupPriority:a.grouping.groupPriority,grouping:a.grouping}),a.treeAggregation&&a.treeAggregation.type&&c.push({field:a.field,col:a,aggregation:a.treeAggregation})}),b.sort(function(a,b){return a.groupPriority-b.groupPriority}),b.forEach(function(a,b){a.grouping.groupPriority=b,a.groupPriority=b,delete a.grouping}),{grouping:b,aggregations:c}},insertGroupHeader:function(a,b,c,d,g){var h=(d[g].fieldName,d[g].col),i=a.getCellValue(b[c],h),k=i;("undefined"==typeof i||null===i)&&(k=a.options.groupingNullLabel);for(var l=function(a){return angular.isObject(a)?JSON.stringify(a):a},m=a.grouping.oldGroupingHeaderCache,n=0;g>n;n++)m&&m[l(d[n].currentValue)]&&(m=m[l(d[n].currentValue)].children);var o;for(m&&m[l(i)]?(o=m[l(i)].row,o.entity={}):(o=new e({},null,a),f.rowTemplateAssigner.call(a,o)),o.entity["$$"+d[g].col.uid]={groupVal:k},o.treeLevel=g,o.groupHeader=!0,o.internalRow=!0,o.enableCellEdit=!1,o.enableSelection=a.options.enableGroupHeaderSelection,d[g].initialised=!0,d[g].currentValue=i,d[g].currentRow=o,j.finaliseProcessingState(d,g+1),b.splice(c,0,o),m=a.grouping.groupingHeaderCache,n=0;g>n;n++)m=m[l(d[n].currentValue)].children;m[l(i)]={row:o,children:{}}},finaliseProcessingState:function(a,b){for(var c=b;c<a.length;c++)a[c].initialised=!1,a[c].currentRow=null,a[c].currentValue=null},getRowExpandedStates:function(a){if("undefined"==typeof a)return{};var b={};return angular.forEach(a,function(a,c){b[c]={state:a.row.treeNode.state},a.children?b[c].children=j.getRowExpandedStates(a.children):b[c].children={}}),b},applyRowExpandedStates:function(a,b){"undefined"!=typeof b&&angular.forEach(b,function(b,c){a[c]&&(a[c].row.treeNode.state=b.state,b.children&&a[c].children&&j.applyRowExpandedStates(a[c].children,b.children))})}};return j}]),a.directive("uiGridGrouping",["uiGridGroupingConstants","uiGridGroupingService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){e.grid.options.enableGrouping!==!1&&b.initializeGrid(e.grid,a)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.importer",["ui.grid"]);a.constant("uiGridImporterConstants",{featureName:"importer"}),a.service("uiGridImporterService",["$q","uiGridConstants","uiGridImporterConstants","gridUtil","$compile","$interval","i18nService","$window",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){b.importer={$scope:a},this.defaultGridOptions(b.options);var c={events:{importer:{}},methods:{importer:{importFile:function(a){i.importThisFile(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.options.enableImporter&&b.options.importerShowMenu&&(b.api.core.addToGridMenu?i.addToMenu(b):f(function(){b.api.core.addToGridMenu&&i.addToMenu(b)},100,1))},defaultGridOptions:function(a){a.enableImporter||void 0===a.enableImporter?h.hasOwnProperty("File")&&h.hasOwnProperty("FileReader")&&h.hasOwnProperty("FileList")&&h.hasOwnProperty("Blob")?a.enableImporter=!0:(d.logError("The File APIs are not fully supported in this browser, grid importer cannot be used."),a.enableImporter=!1):a.enableImporter=!1,a.importerProcessHeaders=a.importerProcessHeaders||i.processHeaders,a.importerHeaderFilter=a.importerHeaderFilter||function(a){return a},a.importerErrorCallback&&"function"==typeof a.importerErrorCallback||delete a.importerErrorCallback,a.enableImporter!==!0||a.importerDataAddCallback||(d.logError("You have not set an importerDataAddCallback, importer is disabled"),a.enableImporter=!1),a.importerShowMenu=a.importerShowMenu!==!1,a.importerObjectCallback=a.importerObjectCallback||function(a,b){return b}},addToMenu:function(a){a.api.core.addToGridMenu(a,[{title:g.getSafeText("gridMenu.importerTitle"),order:150},{templateUrl:"ui-grid/importerMenuItemContainer",action:function(b){this.grid.api.importer.importAFile(a)},order:151}])},importThisFile:function(a,b){if(!b)return void d.logError("No file object provided to importThisFile, should be impossible, aborting");var c=new FileReader;switch(b.type){case"application/json":c.onload=i.importJsonClosure(a);break;default:c.onload=i.importCsvClosure(a)}c.readAsText(b)},importJsonClosure:function(a){return function(b){var c,d=[],e=i.parseJson(a,b);null!==e&&(e.forEach(function(b,e){c=i.newObject(a),angular.extend(c,b),c=a.options.importerObjectCallback(a,c),d.push(c)}),i.addObjects(a,d))}},parseJson:function(a,b){var c;try{c=JSON.parse(b.target.result)}catch(d){return void i.alertError(a,"importer.invalidJson","File could not be processed, is it valid json? Content was: ",b.target.result)}return Array.isArray(c)?c:(i.alertError(a,"importer.jsonNotarray","Import failed, file is not an array, file was: ",b.target.result),[])},importCsvClosure:function(a){return function(b){var c=i.parseCsv(b);if(!c||c.length<1)return void i.alertError(a,"importer.invalidCsv","File could not be processed, is it valid csv? Content was: ",b.target.result);var d=i.createCsvObjects(a,c);return d&&0!==d.length?void i.addObjects(a,d):void i.alertError(a,"importer.noObjects","Objects were not able to be derived, content was: ",b.target.result)}},parseCsv:function(a){var b=a.target.result;return CSV.parse(b)},createCsvObjects:function(a,b){var c=a.options.importerProcessHeaders(a,b.shift());if(!c||0===c.length)return i.alertError(a,"importer.noHeaders","Column names could not be derived, content was: ",b),[];var d,e=[];return b.forEach(function(b,f){d=i.newObject(a),null!==b&&b.forEach(function(a,b){null!==c[b]&&(d[c[b]]=a)}),d=a.options.importerObjectCallback(a,d),e.push(d)}),e},processHeaders:function(a,b){var c=[];if(a.options.columnDefs&&0!==a.options.columnDefs.length){var d=i.flattenColumnDefs(a,a.options.columnDefs);return b.forEach(function(a,b){d[a]?c.push(d[a]):d[a.toLowerCase()]?c.push(d[a.toLowerCase()]):c.push(null)}),c}return b.forEach(function(a,b){c.push(a.replace(/[^0-9a-zA-Z\-_]/g,"_"))}),c},flattenColumnDefs:function(a,b){var c={};return b.forEach(function(b,d){b.name&&(c[b.name]=b.field||b.name,c[b.name.toLowerCase()]=b.field||b.name),b.field&&(c[b.field]=b.field||b.name,c[b.field.toLowerCase()]=b.field||b.name),b.displayName&&(c[b.displayName]=b.field||b.name,c[b.displayName.toLowerCase()]=b.field||b.name),b.displayName&&a.options.importerHeaderFilter&&(c[a.options.importerHeaderFilter(b.displayName)]=b.field||b.name,c[a.options.importerHeaderFilter(b.displayName).toLowerCase()]=b.field||b.name)}),c},addObjects:function(a,c,d){if(a.api.rowEdit){var e=a.registerDataChangeCallback(function(){a.api.rowEdit.setRowsDirty(c),e()},[b.dataChange.ROW]);a.importer.$scope.$on("$destroy",e)}a.importer.$scope.$apply(a.options.importerDataAddCallback(a,c))},newObject:function(a){return"undefined"!=typeof a.options&&"undefined"!=typeof a.options.importerNewObject?new a.options.importerNewObject:{}},alertError:function(a,b,c,e){a.options.importerErrorCallback?a.options.importerErrorCallback(a,b,c,e):(h.alert(g.getSafeText(b)),d.logError(c+e))}};return i}]),a.directive("uiGridImporter",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(a,e.grid);
-}}}]),a.directive("uiGridImporterMenuItem",["uiGridImporterConstants","uiGridImporterService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,templateUrl:"ui-grid/importerMenuItem",link:function(a,d,e,f){var g=function(a){var c=a.srcElement||a.target;if(c&&c.files&&1===c.files.length){var d=c.files[0];b.importThisFile(i,d),c.form.reset()}},h=d[0].querySelectorAll(".ui-grid-importer-file-chooser"),i=f.grid;1!==h.length?c.logError("Found > 1 or < 1 file choosers within the menu item, error, cannot continue"):h[0].addEventListener("change",g,!1)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.infiniteScroll",["ui.grid"]);a.service("uiGridInfiniteScrollService",["gridUtil","$compile","$timeout","uiGridConstants","ScrollEvent","$q",function(a,b,c,d,e,f){var g={initializeGrid:function(a,b){if(g.defaultGridOptions(a.options),a.options.enableInfiniteScroll){a.infiniteScroll={dataLoading:!1},g.setScrollDirections(a,a.options.infiniteScrollUp,a.options.infiniteScrollDown),a.api.core.on.scrollEnd(b,g.handleScroll);var c={events:{infiniteScroll:{needLoadMoreData:function(a,b){},needLoadMoreDataTop:function(a,b){}}},methods:{infiniteScroll:{dataLoaded:function(b,c){g.setScrollDirections(a,b,c);var d=g.adjustScroll(a).then(function(){a.infiniteScroll.dataLoading=!1});return d},resetScroll:function(b,c){g.setScrollDirections(a,b,c),g.adjustInfiniteScrollPosition(a,0)},saveScrollPercentage:function(){a.infiniteScroll.prevScrollTop=a.renderContainers.body.prevScrollTop,a.infiniteScroll.previousVisibleRows=a.getVisibleRowCount()},dataRemovedTop:function(b,c){g.dataRemovedTop(a,b,c)},dataRemovedBottom:function(b,c){g.dataRemovedBottom(a,b,c)},setScrollDirections:function(b,c){g.setScrollDirections(a,b,c)}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)}},defaultGridOptions:function(a){a.enableInfiniteScroll=a.enableInfiniteScroll!==!1,a.infiniteScrollRowsFromEnd=a.infiniteScrollRowsFromEnd||20,a.infiniteScrollUp=a.infiniteScrollUp===!0,a.infiniteScrollDown=a.infiniteScrollDown!==!1},setScrollDirections:function(a,b,c){a.infiniteScroll.scrollUp=b===!0,a.suppressParentScrollUp=b===!0,a.infiniteScroll.scrollDown=c!==!1,a.suppressParentScrollDown=c!==!1},handleScroll:function(a){if(!(a.grid.infiniteScroll&&a.grid.infiniteScroll.dataLoading||"ui.grid.adjustInfiniteScrollPosition"===a.source)&&a.y)if(0===a.y.percentage)a.grid.scrollDirection=d.scrollDirection.UP,g.loadData(a.grid);else if(1===a.y.percentage)a.grid.scrollDirection=d.scrollDirection.DOWN,g.loadData(a.grid);else{var b,c=a.grid.options.infiniteScrollRowsFromEnd/a.grid.renderContainers.body.visibleRowCache.length;a.grid.scrollDirection===d.scrollDirection.UP?(b=a.y.percentage,c>=b&&g.loadData(a.grid)):a.grid.scrollDirection===d.scrollDirection.DOWN&&(b=1-a.y.percentage,c>=b&&g.loadData(a.grid))}},loadData:function(a){a.infiniteScroll.previousVisibleRows=a.renderContainers.body.visibleRowCache.length,a.infiniteScroll.direction=a.scrollDirection,delete a.infiniteScroll.prevScrollTop,a.scrollDirection===d.scrollDirection.UP&&a.infiniteScroll.scrollUp?(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreDataTop()):a.scrollDirection===d.scrollDirection.DOWN&&a.infiniteScroll.scrollDown&&(a.infiniteScroll.dataLoading=!0,a.api.infiniteScroll.raise.needLoadMoreData())},adjustScroll:function(a){var b=f.defer();return c(function(){var e,f,h,i,j;e=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,f=a.options.rowHeight,void 0===a.infiniteScroll.direction&&g.adjustInfiniteScrollPosition(a,0),h=a.getVisibleRowCount();var k=f*h;a.infiniteScroll.scrollDown&&e>k&&a.api.infiniteScroll.raise.needLoadMoreData(),a.infiniteScroll.direction===d.scrollDirection.UP&&(i=a.infiniteScroll.prevScrollTop||0,j=i+(h-a.infiniteScroll.previousVisibleRows)*f,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()})),a.infiniteScroll.direction===d.scrollDirection.DOWN&&(j=a.infiniteScroll.prevScrollTop||a.infiniteScroll.previousVisibleRows*f-e,g.adjustInfiniteScrollPosition(a,j),c(function(){b.resolve()}))},0),b.promise},adjustInfiniteScrollPosition:function(a,b){var c=new e(a,null,null,"ui.grid.adjustInfiniteScrollPosition"),d=a.getVisibleRowCount(),f=a.getViewportHeight()+a.headerHeight-a.renderContainers.body.headerHeight-a.scrollbarHeight,g=a.options.rowHeight,h=d*g-f;0===b&&a.infiniteScroll.scrollUp?c.y={percentage:1/h}:c.y={percentage:b/h},a.scrollContainers("",c)},dataRemovedTop:function(a,b,c){var d,e,f,h;g.setScrollDirections(a,b,c),d=a.renderContainers.body.visibleRowCache.length,e=a.infiniteScroll.prevScrollTop,h=a.options.rowHeight,f=e-(a.infiniteScroll.previousVisibleRows-d)*h,g.adjustInfiniteScrollPosition(a,f)},dataRemovedBottom:function(a,b,c){var d;g.setScrollDirections(a,b,c),d=a.infiniteScroll.prevScrollTop,g.adjustInfiniteScrollPosition(a,d)}};return g}]),a.directive("uiGridInfiniteScroll",["uiGridInfiniteScrollService",function(a){return{priority:-200,scope:!1,require:"^uiGrid",compile:function(b,c,d){return{pre:function(b,c,d,e){a.initializeGrid(e.grid,b)},post:function(a,b,c){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.moveColumns",["ui.grid"]);a.service("uiGridMoveColumnService",["$q","$timeout","$log","ScrollEvent","uiGridConstants","gridUtil",function(a,b,c,d,e,f){var g={initializeGrid:function(a){var b=this;this.registerPublicApi(a),this.defaultGridOptions(a.options),a.moveColumns={orderCache:[]},a.registerColumnBuilder(b.movableColumnBuilder),a.registerDataChangeCallback(b.verifyColumnOrder,[e.dataChange.COLUMN])},registerPublicApi:function(a){var b=this,c={events:{colMovable:{columnPositionChanged:function(a,b,c){}}},methods:{colMovable:{moveColumn:function(c,d){var e=a.columns;if(!angular.isNumber(c)||!angular.isNumber(d))return void f.logError("MoveColumn: Please provide valid values for originalPosition and finalPosition");for(var g=0,h=0;h<e.length;h++)(angular.isDefined(e[h].colDef.visible)&&e[h].colDef.visible===!1||e[h].isRowHeader===!0)&&g++;if(c>=e.length-g||d>=e.length-g)return void f.logError("MoveColumn: Invalid values for originalPosition, finalPosition");var i=function(a){for(var b=a,c=0;b>=c;c++)angular.isDefined(e[c])&&(angular.isDefined(e[c].colDef.visible)&&e[c].colDef.visible===!1||e[c].isRowHeader===!0)&&b++;return b};b.redrawColumnAtPosition(a,i(c),i(d))}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableColumnMoving=a.enableColumnMoving!==!1},movableColumnBuilder:function(b,c,d){var e=[];return b.enableColumnMoving=void 0===b.enableColumnMoving?d.enableColumnMoving:b.enableColumnMoving,a.all(e)},updateColumnCache:function(a){a.moveColumns.orderCache=a.getOnlyDataColumns()},verifyColumnOrder:function(a){var b,c=a.rowHeaderColumns.length;angular.forEach(a.moveColumns.orderCache,function(d,e){if(b=a.columns.indexOf(d),-1!==b&&b-c!==e){var f=a.columns.splice(b,1)[0];a.columns.splice(e+c,0,f)}})},redrawColumnAtPosition:function(a,c,d){var f=a.columns;if(c!==d){var h=d>c?c+1:c-1,i=Math.min(h,d);for(i;i<=Math.max(h,d)&&!f[i].visible;i++);if(!(i>Math.max(h,d))){var j=f[c];if(j.colDef.enableColumnMoving){if(c>d)for(var k=c;k>d;k--)f[k]=f[k-1];else if(d>c)for(var l=c;d>l;l++)f[l]=f[l+1];f[d]=j,g.updateColumnCache(a),a.queueGridRefresh(),b(function(){a.api.core.notifyDataChange(e.dataChange.COLUMN),a.api.colMovable.raise.columnPositionChanged(j.colDef,c,d)})}}}}};return g}]),a.directive("uiGridMoveColumns",["uiGridMoveColumnService",function(a){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(b,c,d,e){a.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["$q","gridUtil","uiGridMoveColumnService","$document","$log","uiGridConstants","ScrollEvent",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,b,e,f){if(a.col.colDef.enableColumnMoving){var h,i,j,k,l,m,n=angular.element(b[0].querySelectorAll(".ui-grid-cell-contents")),o=!1,p=!1,q=function(b){h=a.grid.element[0].getBoundingClientRect().left,a.grid.hasLeftContainer()&&(h+=a.grid.renderContainers.left.header[0].getBoundingClientRect().width),i=b.pageX||(b.originalEvent?b.originalEvent.pageX:0),j=0,k=h+a.grid.getViewportWidth(),"mousedown"===b.type?(d.on("mousemove",r),d.on("mouseup",s)):"touchstart"===b.type&&(d.on("touchmove",r),d.on("touchend",s))},r=function(a){var b=a.pageX||(a.originalEvent?a.originalEvent.pageX:0),c=b-i;0!==c&&(document.onselectstart=function(){return!1},p=!0,o?o&&(w(c),i=b):v())},s=function(b){if(document.onselectstart=null,l&&(l.remove(),o=!1),u(),t(),p){for(var d=a.grid.columns,e=0,f=0;f<d.length&&d[f].colDef.name!==a.col.colDef.name;f++)e++;var g;if(0>j){var h,i=0;if(a.grid.isRTL()){for(h=e+1;h<d.length;h++)if((angular.isUndefined(d[h].colDef.visible)||d[h].colDef.visible===!0)&&(i+=d[h].drawnWidth||d[h].width||d[h].colDef.width,i>Math.abs(j))){c.redrawColumnAtPosition(a.grid,e,h-1);break}}else for(h=e-1;h>=0;h--)if((angular.isUndefined(d[h].colDef.visible)||d[h].colDef.visible===!0)&&(i+=d[h].drawnWidth||d[h].width||d[h].colDef.width,i>Math.abs(j))){c.redrawColumnAtPosition(a.grid,e,h+1);break}i<Math.abs(j)&&(g=0,a.grid.isRTL()&&(g=d.length-1),c.redrawColumnAtPosition(a.grid,e,g))}else if(j>0){var k,m=0;if(a.grid.isRTL()){for(k=e-1;k>0;k--)if((angular.isUndefined(d[k].colDef.visible)||d[k].colDef.visible===!0)&&(m+=d[k].drawnWidth||d[k].width||d[k].colDef.width,m>j)){c.redrawColumnAtPosition(a.grid,e,k);break}}else for(k=e+1;k<d.length;k++)if((angular.isUndefined(d[k].colDef.visible)||d[k].colDef.visible===!0)&&(m+=d[k].drawnWidth||d[k].width||d[k].colDef.width,m>j)){c.redrawColumnAtPosition(a.grid,e,k-1);break}j>m&&(g=d.length-1,a.grid.isRTL()&&(g=0),c.redrawColumnAtPosition(a.grid,e,g))}}},t=function(){n.on("touchstart",q),n.on("mousedown",q)},u=function(){n.off("touchstart",q),n.off("mousedown",q),d.off("mousemove",r),d.off("touchmove",r),d.off("mouseup",s),d.off("touchend",s)};t();var v=function(){o=!0,l=b.clone(),b.parent().append(l),l.addClass("movingColumn");var c={};c.left=b[0].offsetLeft+"px";var d=a.grid.element[0].getBoundingClientRect().right,e=b[0].getBoundingClientRect().right;e>d&&(m=a.col.drawnWidth+(d-e),c.width=m+"px"),l.css(c)},w=function(b){for(var c=a.grid.columns,d=0,e=0;e<c.length;e++)(angular.isUndefined(c[e].colDef.visible)||c[e].colDef.visible===!0)&&(d+=c[e].drawnWidth||c[e].width||c[e].colDef.width);var i,n=l[0].getBoundingClientRect().left-1,o=l[0].getBoundingClientRect().right;if(i=n-h+b,i=k>i?i:k,(n>=h||b>0)&&(k>=o||0>b))l.css({visibility:"visible",left:l[0].offsetLeft+(k>i?b:k-n)+"px"});else if(d>Math.ceil(f.grid.gridWidth)){b*=8;var p=new g(a.col.grid,null,null,"uiGridHeaderCell.moveElement");p.x={pixels:b},p.grid.scrollContainers("",p)}for(var q=0,r=0;r<c.length;r++)if(angular.isUndefined(c[r].colDef.visible)||c[r].colDef.visible===!0){if(c[r].colDef.name===a.col.colDef.name)break;q+=c[r].drawnWidth||c[r].width||c[r].colDef.width}void 0===a.newScrollLeft?j+=b:j=a.newScrollLeft+i-q,m<a.col.drawnWidth&&(m+=Math.abs(b),l.css({width:m+"px"}))};a.$on("$destroy",u)}}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pagination",["ng","ui.grid"]);a.service("uiGridPaginationService",["gridUtil",function(a){var b={initializeGrid:function(a){b.defaultGridOptions(a.options);var c={events:{pagination:{paginationChanged:function(a,b){}}},methods:{pagination:{getPage:function(){return a.options.enablePagination?a.options.paginationCurrentPage:null},getFirstRowIndex:function(){return a.options.useCustomPagination?a.options.paginationPageSizes.reduce(function(b,c,d){return d<a.options.paginationCurrentPage-1?b+c:b},0):(a.options.paginationCurrentPage-1)*a.options.paginationPageSize},getLastRowIndex:function(){return a.options.useCustomPagination?c.methods.pagination.getFirstRowIndex()+a.options.paginationPageSizes[a.options.paginationCurrentPage-1]:Math.min(a.options.paginationCurrentPage*a.options.paginationPageSize,a.options.totalItems)},getTotalPages:function(){return a.options.enablePagination?a.options.useCustomPagination?a.options.paginationPageSizes.length:0===a.options.totalItems?1:Math.ceil(a.options.totalItems/a.options.paginationPageSize):null},nextPage:function(){a.options.enablePagination&&(a.options.totalItems>0?a.options.paginationCurrentPage=Math.min(a.options.paginationCurrentPage+1,c.methods.pagination.getTotalPages()):a.options.paginationCurrentPage++)},previousPage:function(){a.options.enablePagination&&(a.options.paginationCurrentPage=Math.max(a.options.paginationCurrentPage-1,1))},seek:function(b){if(a.options.enablePagination){if(!angular.isNumber(b)||1>b)throw"Invalid page number: "+b;a.options.paginationCurrentPage=Math.min(b,c.methods.pagination.getTotalPages())}}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods);var d=function(b){if(a.options.useExternalPagination||!a.options.enablePagination)return b;var d=parseInt(a.options.paginationPageSize,10),e=parseInt(a.options.paginationCurrentPage,10),f=b.filter(function(a){return a.visible});a.options.totalItems=f.length;var g=c.methods.pagination.getFirstRowIndex(),h=c.methods.pagination.getLastRowIndex();return g>f.length&&(e=a.options.paginationCurrentPage=1,g=(e-1)*d),f.slice(g,h)};a.registerRowsProcessor(d,900)},defaultGridOptions:function(b){b.enablePagination=b.enablePagination!==!1,b.enablePaginationControls=b.enablePaginationControls!==!1,b.useExternalPagination=b.useExternalPagination===!0,b.useCustomPagination=b.useCustomPagination===!0,a.isNullOrUndefined(b.totalItems)&&(b.totalItems=0),a.isNullOrUndefined(b.paginationPageSizes)&&(b.paginationPageSizes=[250,500,1e3]),a.isNullOrUndefined(b.paginationPageSize)&&(b.paginationPageSizes.length>0?b.paginationPageSize=b.paginationPageSizes[0]:b.paginationPageSize=0),a.isNullOrUndefined(b.paginationCurrentPage)&&(b.paginationCurrentPage=1),a.isNullOrUndefined(b.paginationTemplate)&&(b.paginationTemplate="ui-grid/pagination")},onPaginationChanged:function(a,b,c){a.api.pagination.raise.paginationChanged(b,c),a.options.useExternalPagination||a.queueGridRefresh()}};return b}]),a.directive("uiGridPagination",["gridUtil","uiGridPaginationService",function(a,b){return{priority:-200,scope:!1,require:"uiGrid",link:{pre:function(c,d,e,f){b.initializeGrid(f.grid),a.getTemplate(f.grid.options.paginationTemplate).then(function(a){var b=angular.element(a);d.append(b),f.innerCompile(b)})}}}}]),a.directive("uiGridPager",["uiGridPaginationService","uiGridConstants","gridUtil","i18nService",function(a,b,c,d){return{priority:-200,scope:!0,require:"^uiGrid",link:function(e,f,g,h){var i=".ui-grid-pager-control-input";e.aria=d.getSafeText("pagination.aria"),e.paginationApi=h.grid.api.pagination,e.sizesLabel=d.getSafeText("pagination.sizes"),e.totalItemsLabel=d.getSafeText("pagination.totalItems"),e.paginationOf=d.getSafeText("pagination.of"),e.paginationThrough=d.getSafeText("pagination.through");var j=h.grid.options;h.grid.renderContainers.body.registerViewportAdjuster(function(a){return a.height=a.height-c.elementHeight(f,"padding"),a});var k=h.grid.registerDataChangeCallback(function(a){a.options.useExternalPagination||(a.options.totalItems=a.rows.length)},[b.dataChange.ROW]);e.$on("$destroy",k);var l=e.$watch("grid.options.paginationCurrentPage + grid.options.paginationPageSize",function(b,c){return b!==c&&void 0!==c?!angular.isNumber(j.paginationCurrentPage)||j.paginationCurrentPage<1?void(j.paginationCurrentPage=1):j.totalItems>0&&j.paginationCurrentPage>e.paginationApi.getTotalPages()?void(j.paginationCurrentPage=e.paginationApi.getTotalPages()):void a.onPaginationChanged(e.grid,j.paginationCurrentPage,j.paginationPageSize):void 0});e.$on("$destroy",function(){l()}),e.cantPageForward=function(){return e.paginationApi.getTotalPages()?e.cantPageToLast():j.data.length<1},e.cantPageToLast=function(){var a=e.paginationApi.getTotalPages();return!a||j.paginationCurrentPage>=a},e.cantPageBackward=function(){return j.paginationCurrentPage<=1};var m=function(a){a&&c.focus.bySelector(f,i)};e.pageFirstPageClick=function(){e.paginationApi.seek(1),m(e.cantPageBackward())},e.pagePreviousPageClick=function(){e.paginationApi.previousPage(),m(e.cantPageBackward())},e.pageNextPageClick=function(){e.paginationApi.nextPage(),m(e.cantPageForward())},e.pageLastPageClick=function(){e.paginationApi.seek(e.paginationApi.getTotalPages()),m(e.cantPageToLast())}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.pinning",["ui.grid"]);a.constant("uiGridPinningConstants",{container:{LEFT:"left",RIGHT:"right",NONE:""}}),a.service("uiGridPinningService",["gridUtil","GridRenderContainer","i18nService","uiGridPinningConstants",function(a,b,c,d){var e={initializeGrid:function(a){e.defaultGridOptions(a.options),a.registerColumnBuilder(e.pinningColumnBuilder);var b={events:{pinning:{columnPinned:function(a,b){}}},methods:{pinning:{pinColumn:function(b,c){e.pinColumn(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enablePinning=a.enablePinning!==!1},pinningColumnBuilder:function(b,f,g){if(b.enablePinning=void 0===b.enablePinning?g.enablePinning:b.enablePinning,b.pinnedLeft?(f.renderContainer="left",f.grid.createLeftContainer()):b.pinnedRight&&(f.renderContainer="right",f.grid.createRightContainer()),b.enablePinning){var h={name:"ui.grid.pinning.pinLeft",title:c.get().pinning.pinLeft,icon:"ui-grid-icon-left-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"left"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.LEFT)}},i={name:"ui.grid.pinning.pinRight",title:c.get().pinning.pinRight,icon:"ui-grid-icon-right-open",shown:function(){return"undefined"==typeof this.context.col.renderContainer||!this.context.col.renderContainer||"right"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.RIGHT)}},j={name:"ui.grid.pinning.unpin",title:c.get().pinning.unpin,icon:"ui-grid-icon-cancel",shown:function(){return"undefined"!=typeof this.context.col.renderContainer&&null!==this.context.col.renderContainer&&"body"!==this.context.col.renderContainer},action:function(){e.pinColumn(this.context.col.grid,this.context.col,d.container.NONE)}};a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinLeft")||f.menuItems.push(h),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.pinRight")||f.menuItems.push(i),a.arrayContainsObjectWithProperty(f.menuItems,"name","ui.grid.pinning.unpin")||f.menuItems.push(j)}},pinColumn:function(a,b,c){c===d.container.NONE?(b.renderContainer=null,b.colDef.pinnedLeft=b.colDef.pinnedRight=!1):(b.renderContainer=c,c===d.container.LEFT?a.createLeftContainer():c===d.container.RIGHT&&a.createRightContainer()),a.refresh().then(function(){a.api.pinning.raise.columnPinned(b.colDef,c)})}};return e}]),a.directive("uiGridPinning",["gridUtil","uiGridPinningService",function(a,b){return{require:"uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(e.grid)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.resizeColumns",["ui.grid"]);a.service("uiGridResizeColumnsService",["gridUtil","$q","$timeout",function(a,b,c){var d={defaultGridOptions:function(a){a.enableColumnResizing=a.enableColumnResizing!==!1,a.enableColumnResize===!1&&(a.enableColumnResizing=!1)},colResizerColumnBuilder:function(a,c,d){var e=[];return a.enableColumnResizing=void 0===a.enableColumnResizing?d.enableColumnResizing:a.enableColumnResizing,a.enableColumnResize===!1&&(a.enableColumnResizing=!1),b.all(e)},registerPublicApi:function(a){var b={events:{colResizable:{columnSizeChanged:function(a,b){}}}};a.api.registerEventsFromObject(b.events)},fireColumnSizeChanged:function(b,d,e){c(function(){b.api.colResizable?b.api.colResizable.raise.columnSizeChanged(d,e):a.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.")})},findTargetCol:function(a,b,c){var d=a.getRenderContainer();if("left"===b){var e=d.visibleColumnCache.indexOf(a);return d.visibleColumnCache[e-1*c]}return a}};return d}]),a.directive("uiGridResizeColumns",["gridUtil","uiGridResizeColumnsService",function(a,b){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.defaultGridOptions(e.grid.options),e.grid.registerColumnBuilder(b.colResizerColumnBuilder),b.registerPublicApi(e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridHeaderCell",["gridUtil","$templateCache","$compile","$q","uiGridResizeColumnsService","uiGridConstants","$timeout",function(a,b,c,d,e,f,g){return{priority:-10,require:"^uiGrid",compile:function(){return{post:function(a,d,h,i){var j=i.grid;if(j.options.enableColumnResizing){var k=b.get("ui-grid/columnResizer"),l=1;j.isRTL()&&(a.position="left",l=-1);var m=function(){for(var b=d[0].getElementsByClassName("ui-grid-column-resizer"),f=0;f<b.length;f++)angular.element(b[f]).remove();var g=e.findTargetCol(a.col,"left",l),h=a.col.getRenderContainer();if(g&&0!==h.visibleColumnCache.indexOf(a.col)&&g.colDef.enableColumnResizing!==!1){var i=angular.element(k).clone();i.attr("position","left"),d.prepend(i),c(i)(a)}if(a.col.colDef.enableColumnResizing!==!1){var j=angular.element(k).clone();j.attr("position","right"),d.append(j),c(j)(a)}};m();var n=function(){g(m)},o=j.registerDataChangeCallback(n,[f.dataChange.COLUMN]);a.$on("$destroy",o)}}}}}}]),a.directive("uiGridColumnResizer",["$document","gridUtil","uiGridConstants","uiGridResizeColumnsService",function(a,b,c,d){var e=angular.element('<div class="ui-grid-resize-overlay"></div>'),f={priority:0,scope:{col:"=",position:"@",renderIndex:"="},require:"?^uiGrid",link:function(f,g,h,i){function j(a){i.grid.refreshCanvas(!0).then(function(){i.grid.queueGridRefresh()})}function k(a,b){var c=b;return a.minWidth&&c<a.minWidth?c=a.minWidth:a.maxWidth&&c>a.maxWidth&&(c=a.maxWidth),c}function l(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),o=(a.targetTouches?a.targetTouches[0]:a).clientX-p,0>o?o=0:o>i.grid.gridWidth&&(o=i.grid.gridWidth);var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){i.grid.element.hasClass("column-resizing")||i.grid.element.addClass("column-resizing");var h=o-n,j=parseInt(g.drawnWidth+h*q,10);o+=(k(g,j)-j)*q,e.css({left:o+"px"}),i.fireEvent(c.events.ITEM_DRAGGING)}}function m(a,b){a.originalEvent&&(a=a.originalEvent),a.preventDefault(),i.grid.element.removeClass("column-resizing"),e.remove(),o=(a.changedTouches?a.changedTouches[0]:a).clientX-p;var c=o-n;if(0===c)return t(),void s();var g=d.findTargetCol(f.col,f.position,q);if(g.colDef.enableColumnResizing!==!1){var h=parseInt(g.drawnWidth+c*q,10);g.width=k(g,h),g.hasCustomWidth=!0,j(c),d.fireColumnSizeChanged(i.grid,g.colDef,c),t(),s()}}var n=0,o=0,p=0,q=1;i.grid.isRTL()&&(f.position="left",q=-1),"left"===f.position?g.addClass("left"):"right"===f.position&&g.addClass("right");var r=function(b,c){b.originalEvent&&(b=b.originalEvent),b.stopPropagation(),p=i.grid.element[0].getBoundingClientRect().left,n=(b.targetTouches?b.targetTouches[0]:b).clientX-p,i.grid.element.append(e),e.css({left:n}),"touchstart"===b.type?(a.on("touchend",m),a.on("touchmove",l),g.off("mousedown",r)):(a.on("mouseup",m),a.on("mousemove",l),g.off("touchstart",r))},s=function(){g.on("mousedown",r),g.on("touchstart",r)},t=function(){a.off("mouseup",m),a.off("touchend",m),a.off("mousemove",l),a.off("touchmove",l),g.off("mousedown",r),g.off("touchstart",r)};s();var u=function(a,e){a.stopPropagation();var h=d.findTargetCol(f.col,f.position,q);if(h.colDef.enableColumnResizing!==!1){var l=0,m=0,n=b.closestElm(g,".ui-grid-render-container"),o=n.querySelectorAll("."+c.COL_CLASS_PREFIX+h.uid+" .ui-grid-cell-contents");Array.prototype.forEach.call(o,function(a){var c;angular.element(a).parent().hasClass("ui-grid-header-cell")&&(c=angular.element(a).parent()[0].querySelectorAll(".ui-grid-column-menu-button")),b.fakeElement(a,{},function(a){var d=angular.element(a);d.attr("style","float: left");var e=b.elementWidth(d);if(c){var f=b.elementWidth(c);e+=f}e>l&&(l=e,m=l-e)})}),h.width=k(h,l),h.hasCustomWidth=!0,j(m),d.fireColumnSizeChanged(i.grid,h.colDef,m)}};g.on("dblclick",u),g.on("$destroy",function(){g.off("dblclick",u),t()})}};return f}])}(),function(){"use strict";var a=angular.module("ui.grid.rowEdit",["ui.grid","ui.grid.edit","ui.grid.cellNav"]);a.constant("uiGridRowEditConstants",{}),a.service("uiGridRowEditService",["$interval","$q","uiGridConstants","uiGridRowEditConstants","gridUtil",function(a,b,c,d,e){var f={initializeGrid:function(a,b){b.rowEdit={};var c={events:{rowEdit:{saveRow:function(a){}}},methods:{rowEdit:{setSavePromise:function(a,c){f.setSavePromise(b,a,c)},getDirtyRows:function(){return b.rowEdit.dirtyRows?b.rowEdit.dirtyRows:[]},getErrorRows:function(){return b.rowEdit.errorRows?b.rowEdit.errorRows:[]},flushDirtyRows:function(){return f.flushDirtyRows(b)},setRowsDirty:function(a){f.setRowsDirty(b,a)},setRowsClean:function(a){f.setRowsClean(b,a)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.api.core.on.renderingComplete(a,function(c){b.api.edit.on.afterCellEdit(a,f.endEditCell),b.api.edit.on.beginCellEdit(a,f.beginEditCell),b.api.edit.on.cancelCellEdit(a,f.cancelEditCell),b.api.cellNav&&b.api.cellNav.on.navigate(a,f.navigate)})},defaultGridOptions:function(a){},saveRow:function(a,b){var c=this;return function(){if(b.isSaving=!0,b.rowEditSavePromise)return b.rowEditSavePromise;var d=a.api.rowEdit.raise.saveRow(b.entity);return b.rowEditSavePromise?b.rowEditSavePromise.then(c.processSuccessPromise(a,b),c.processErrorPromise(a,b)):e.logError("A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise"),d}},setSavePromise:function(a,b,c){var d=a.getRow(b);d.rowEditSavePromise=c},processSuccessPromise:function(a,b){var c=this;return function(){delete b.isSaving,delete b.isDirty,delete b.isError,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,c.removeRow(a.rowEdit.errorRows,b),c.removeRow(a.rowEdit.dirtyRows,b)}},processErrorPromise:function(a,b){return function(){delete b.isSaving,delete b.rowEditSaveTimer,delete b.rowEditSavePromise,b.isError=!0,a.rowEdit.errorRows||(a.rowEdit.errorRows=[]),f.isRowPresent(a.rowEdit.errorRows,b)||a.rowEdit.errorRows.push(b)}},removeRow:function(a,b){"undefined"!=typeof a&&null!==a&&a.forEach(function(c,d){c.uid===b.uid&&a.splice(d,1)})},isRowPresent:function(a,b){var c=!1;return a.forEach(function(a,d){a.uid===b.uid&&(c=!0)}),c},flushDirtyRows:function(a){var c=[];return a.api.rowEdit.getDirtyRows().forEach(function(b){f.saveRow(a,b)(),c.push(b.rowEditSavePromise)}),b.all(c)},endEditCell:function(a,b,c,d){var g=this.grid,h=g.getRow(a);return h?void((c!==d||h.isDirty)&&(g.rowEdit.dirtyRows||(g.rowEdit.dirtyRows=[]),h.isDirty||(h.isDirty=!0,g.rowEdit.dirtyRows.push(h)),delete h.isError,f.considerSetTimer(g,h))):void e.logError("Unable to find rowEntity in grid data, dirty flag cannot be set")},beginEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.cancelTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be cancelled")},cancelEditCell:function(a,b){var c=this.grid,d=c.getRow(a);return d?void f.considerSetTimer(c,d):void e.logError("Unable to find rowEntity in grid data, timer cannot be set")},navigate:function(a,b){var c=this.grid;a.row.rowEditSaveTimer&&f.cancelTimer(c,a.row),b&&b.row&&b.row!==a.row&&f.considerSetTimer(c,b.row)},considerSetTimer:function(b,c){if(f.cancelTimer(b,c),c.isDirty&&!c.isSaving&&-1!==b.options.rowEditWaitInterval){var d=b.options.rowEditWaitInterval?b.options.rowEditWaitInterval:2e3;c.rowEditSaveTimer=a(f.saveRow(b,c),d,1)}},cancelTimer:function(b,c){c.rowEditSaveTimer&&!c.isSaving&&(a.cancel(c.rowEditSaveTimer),delete c.rowEditSaveTimer)},setRowsDirty:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(a.rowEdit.dirtyRows||(a.rowEdit.dirtyRows=[]),c.isDirty||(c.isDirty=!0,a.rowEdit.dirtyRows.push(c)),delete c.isError,f.considerSetTimer(a,c)):e.logError("requested row not found in rowEdit.setRowsDirty, row was: "+b)})},setRowsClean:function(a,b){var c;b.forEach(function(b,d){c=a.getRow(b),c?(delete c.isDirty,f.removeRow(a.rowEdit.dirtyRows,c),f.cancelTimer(a,c),delete c.isError,f.removeRow(a.rowEdit.errorRows,c)):e.logError("requested row not found in rowEdit.setRowsClean, row was: "+b)})}};return f}]),a.directive("uiGridRowEdit",["gridUtil","uiGridRowEditService","uiGridEditConstants",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}":"{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.saveState",["ui.grid","ui.grid.selection","ui.grid.cellNav","ui.grid.grouping","ui.grid.pinning","ui.grid.treeView"]);a.constant("uiGridSaveStateConstants",{featureName:"saveState"}),a.service("uiGridSaveStateService",["$q","uiGridSaveStateConstants","gridUtil","$compile","$interval","uiGridConstants",function(a,b,c,d,e,f){var g={initializeGrid:function(a){a.saveState={},this.defaultGridOptions(a.options);var b={events:{saveState:{}},methods:{saveState:{save:function(){return g.save(a)},restore:function(b,c){g.restore(a,b,c)}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.saveWidths=a.saveWidths!==!1,a.saveOrder=a.saveOrder!==!1,a.saveScroll=a.saveScroll===!0,a.saveFocus=a.saveScroll!==!0&&a.saveFocus!==!1,a.saveVisible=a.saveVisible!==!1,a.saveSort=a.saveSort!==!1,a.saveFilter=a.saveFilter!==!1,a.saveSelection=a.saveSelection!==!1,a.saveGrouping=a.saveGrouping!==!1,a.saveGroupingExpandedStates=a.saveGroupingExpandedStates===!0,a.savePinning=a.savePinning!==!1,a.saveTreeView=a.saveTreeView!==!1},save:function(a){var b={};return b.columns=g.saveColumns(a),b.scrollFocus=g.saveScrollFocus(a),b.selection=g.saveSelection(a),b.grouping=g.saveGrouping(a),b.treeView=g.saveTreeView(a),b.pagination=g.savePagination(a),b},restore:function(a,b,c){c.columns&&g.restoreColumns(a,c.columns),c.scrollFocus&&g.restoreScrollFocus(a,b,c.scrollFocus),c.selection&&g.restoreSelection(a,c.selection),c.grouping&&g.restoreGrouping(a,c.grouping),c.treeView&&g.restoreTreeView(a,c.treeView),c.pagination&&g.restorePagination(a,c.pagination),a.refresh()},saveColumns:function(a){var b=[];return a.getOnlyDataColumns().forEach(function(c){var d={};d.name=c.name,a.options.saveVisible&&(d.visible=c.visible),a.options.saveWidths&&(d.width=c.width),a.options.saveSort&&(d.sort=angular.copy(c.sort)),a.options.saveFilter&&(d.filters=[],c.filters.forEach(function(a){var b={};angular.forEach(a,function(a,c){"condition"!==c&&"$$hashKey"!==c&&"placeholder"!==c&&(b[c]=a)}),d.filters.push(b)})),a.api.pinning&&a.options.savePinning&&(d.pinned=c.renderContainer?c.renderContainer:""),b.push(d)}),b},saveScrollFocus:function(a){if(!a.api.cellNav)return{};var b={};if(a.options.saveFocus){
-b.focus=!0;var c=a.api.cellNav.getFocusedCell();null!==c&&(null!==c.col&&(b.colName=c.col.colDef.name),null!==c.row&&(b.rowVal=g.getRowVal(a,c.row)))}return(a.options.saveScroll||a.options.saveFocus&&!b.colName&&!b.rowVal)&&(b.focus=!1,a.renderContainers.body.prevRowScrollIndex&&(b.rowVal=g.getRowVal(a,a.renderContainers.body.visibleRowCache[a.renderContainers.body.prevRowScrollIndex])),a.renderContainers.body.prevColScrollIndex&&(b.colName=a.renderContainers.body.visibleColumnCache[a.renderContainers.body.prevColScrollIndex].name)),b},saveSelection:function(a){if(!a.api.selection||!a.options.saveSelection)return[];var b=a.api.selection.getSelectedGridRows().map(function(b){return g.getRowVal(a,b)});return b},saveGrouping:function(a){return a.api.grouping&&a.options.saveGrouping?a.api.grouping.getGrouping(a.options.saveGroupingExpandedStates):{}},savePagination:function(a){return a.api.pagination&&a.options.paginationPageSize?{paginationCurrentPage:a.options.paginationCurrentPage,paginationPageSize:a.options.paginationPageSize}:{}},saveTreeView:function(a){return a.api.treeView&&a.options.saveTreeView?a.api.treeView.getTreeView():{}},getRowVal:function(a,b){if(!b)return null;var c={};return a.options.saveRowIdentity?(c.identity=!0,c.row=a.options.saveRowIdentity(b.entity)):(c.identity=!1,c.row=a.renderContainers.body.visibleRowCache.indexOf(b)),c},restoreColumns:function(a,b){var c=!1;b.forEach(function(b,d){var e=a.getColumn(b.name);if(e&&!a.isRowHeaderColumn(e)){!a.options.saveVisible||e.visible===b.visible&&e.colDef.visible===b.visible||(e.visible=b.visible,e.colDef.visible=b.visible,a.api.core.raise.columnVisibilityChanged(e)),a.options.saveWidths&&e.width!==b.width&&(e.width=b.width,e.hasCustomWidth=!0),!a.options.saveSort||angular.equals(e.sort,b.sort)||void 0===e.sort&&angular.isEmpty(b.sort)||(e.sort=angular.copy(b.sort),c=!0),a.options.saveFilter&&!angular.equals(e.filters,b.filters)&&(b.filters.forEach(function(a,b){angular.extend(e.filters[b],a),("undefined"==typeof a.term||null===a.term)&&delete e.filters[b].term}),a.api.core.raise.filterChanged()),a.api.pinning&&a.options.savePinning&&e.renderContainer!==b.pinned&&a.api.pinning.pinColumn(e,b.pinned);var f=a.getOnlyDataColumns().indexOf(e);if(-1!==f&&a.options.saveOrder&&f!==d){var g=a.columns.splice(f+a.rowHeaderColumns.length,1)[0];a.columns.splice(d+a.rowHeaderColumns.length,0,g)}}}),c&&a.api.core.raise.sortChanged(a,a.getColumnSorting())},restoreScrollFocus:function(a,b,c){if(a.api.cellNav){var d,e;if(c.colName){var f=a.options.columnDefs.filter(function(a){return a.name===c.colName});f.length>0&&(d=f[0])}c.rowVal&&c.rowVal.row&&(e=c.rowVal.identity?g.findRowByIdentity(a,c.rowVal):a.renderContainers.body.visibleRowCache[c.rowVal.row]);var h=e&&e.entity?e.entity:null;(d||h)&&(c.focus?a.api.cellNav.scrollToFocus(h,d):a.scrollTo(h,d))}},restoreSelection:function(a,b){a.api.selection&&(a.api.selection.clearSelectedRows(),b.forEach(function(b){if(b.identity){var c=g.findRowByIdentity(a,b);c&&a.api.selection.selectRow(c.entity)}else a.api.selection.selectRowByVisibleIndex(b.row)}))},restoreGrouping:function(a,b){a.api.grouping&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.grouping.setGrouping(b)},restoreTreeView:function(a,b){a.api.treeView&&"undefined"!=typeof b&&null!==b&&!angular.equals(b,{})&&a.api.treeView.setTreeView(b)},restorePagination:function(a,b){a.api.pagination&&a.options.paginationPageSize&&(a.options.paginationCurrentPage=b.paginationCurrentPage,a.options.paginationPageSize=b.paginationPageSize)},findRowByIdentity:function(a,b){if(!a.options.saveRowIdentity)return null;var c=a.rows.filter(function(c){return a.options.saveRowIdentity(c.entity)===b.row?!0:!1});return c.length>0?c[0]:null}};return g}]),a.directive("uiGridSaveState",["uiGridSaveStateConstants","uiGridSaveStateService","gridUtil","$compile",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,link:function(a,c,d,e){b.initializeGrid(e.grid)}}}])}(),function(){"use strict";var a=angular.module("ui.grid.selection",["ui.grid"]);a.constant("uiGridSelectionConstants",{featureName:"selection",selectionRowHeaderColName:"selectionRowHeaderCol"}),angular.module("ui.grid").config(["$provide",function(a){a.decorator("GridRow",["$delegate",function(a){return a.prototype.setSelected=function(a){a!==this.isSelected&&(this.isSelected=a,this.grid.selection.selectedCount+=a?1:-1)},a}])}]),a.service("uiGridSelectionService",["$q","$templateCache","uiGridSelectionConstants","gridUtil",function(a,b,c,d){var e={initializeGrid:function(a){a.selection={},a.selection.lastSelectedRow=null,a.selection.selectAll=!1,a.selection.selectedCount=0,e.defaultGridOptions(a.options);var b={events:{selection:{rowSelectionChanged:function(a,b,c){},rowSelectionChangedBatch:function(a,b,c){}}},methods:{selection:{toggleRowSelection:function(b,c){var d=a.getRow(b);null!==d&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRow:function(b,c){var d=a.getRow(b);null===d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectRowByVisibleIndex:function(b,c){var d=a.renderContainers.body.visibleRowCache[b];null===d||"undefined"==typeof d||d.isSelected||e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},unSelectRow:function(b,c){var d=a.getRow(b);null!==d&&d.isSelected&&e.toggleRowSelection(a,d,c,a.options.multiSelect,a.options.noUnselect)},selectAllRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},selectAllVisibleRows:function(b){if(a.options.multiSelect!==!1){var c=[];a.rows.forEach(function(d){d.visible?d.isSelected||d.enableSelection===!1||(d.setSelected(!0),e.decideRaiseSelectionEvent(a,d,c,b)):d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!0}},clearSelectedRows:function(b){e.clearSelectedRows(a,b)},getSelectedRows:function(){return e.getSelectedRows(a).map(function(a){return a.entity})},getSelectedGridRows:function(){return e.getSelectedRows(a)},getSelectedCount:function(){return a.selection.selectedCount},setMultiSelect:function(b){a.options.multiSelect=b},setModifierKeysToMultiSelect:function(b){a.options.modifierKeysToMultiSelect=b},getSelectAllState:function(){return a.selection.selectAll}}}};a.api.registerEventsFromObject(b.events),a.api.registerMethodsFromObject(b.methods)},defaultGridOptions:function(a){a.enableRowSelection=a.enableRowSelection!==!1,a.multiSelect=a.multiSelect!==!1,a.noUnselect=a.noUnselect===!0,a.modifierKeysToMultiSelect=a.modifierKeysToMultiSelect===!0,a.enableRowHeaderSelection=a.enableRowHeaderSelection!==!1,"undefined"==typeof a.enableFullRowSelection&&(a.enableFullRowSelection=!a.enableRowHeaderSelection),a.enableSelectAll=a.enableSelectAll!==!1,a.enableSelectionBatchEvent=a.enableSelectionBatchEvent!==!1,a.selectionRowHeaderWidth=angular.isDefined(a.selectionRowHeaderWidth)?a.selectionRowHeaderWidth:30,a.enableFooterTotalSelected=a.enableFooterTotalSelected!==!1,a.isRowSelectable=angular.isDefined(a.isRowSelectable)?a.isRowSelectable:angular.noop},toggleRowSelection:function(a,b,c,d,f){var g=b.isSelected;if(b.enableSelection!==!1||g){var h;d||g?!d&&g&&(h=e.getSelectedRows(a),h.length>1&&(g=!1,e.clearSelectedRows(a,c))):e.clearSelectedRows(a,c),g&&f||(b.setSelected(!g),b.isSelected===!0&&(a.selection.lastSelectedRow=b),h=e.getSelectedRows(a),a.selection.selectAll=a.rows.length===h.length,a.api.selection.raise.rowSelectionChanged(b,c))}},shiftSelect:function(a,b,c,d){if(d){var f=e.getSelectedRows(a),g=f.length>0?a.renderContainers.body.visibleRowCache.indexOf(a.selection.lastSelectedRow):0,h=a.renderContainers.body.visibleRowCache.indexOf(b);if(g>h){var i=g;g=h,h=i}for(var j=[],k=g;h>=k;k++){var l=a.renderContainers.body.visibleRowCache[k];l&&(l.isSelected||l.enableSelection===!1||(l.setSelected(!0),a.selection.lastSelectedRow=l,e.decideRaiseSelectionEvent(a,l,j,c)))}e.decideRaiseSelectionBatchEvent(a,j,c)}},getSelectedRows:function(a){return a.rows.filter(function(a){return a.isSelected})},clearSelectedRows:function(a,b){var c=[];e.getSelectedRows(a).forEach(function(d){d.isSelected&&(d.setSelected(!1),e.decideRaiseSelectionEvent(a,d,c,b))}),e.decideRaiseSelectionBatchEvent(a,c,b),a.selection.selectAll=!1,a.selection.selectedCount=0},decideRaiseSelectionEvent:function(a,b,c,d){a.options.enableSelectionBatchEvent?c.push(b):a.api.selection.raise.rowSelectionChanged(b,d)},decideRaiseSelectionBatchEvent:function(a,b,c){b.length>0&&a.api.selection.raise.rowSelectionChangedBatch(b,c)}};return e}]),a.directive("uiGridSelection",["uiGridSelectionConstants","uiGridSelectionService","$templateCache","uiGridConstants",function(a,b,c,d){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(c,e,f,g){if(b.initializeGrid(g.grid),g.grid.options.enableRowHeaderSelection){var h={name:a.selectionRowHeaderColName,displayName:"",width:g.grid.options.selectionRowHeaderWidth,minWidth:10,cellTemplate:"ui-grid/selectionRowHeader",headerCellTemplate:"ui-grid/selectionHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};g.grid.addRowHeaderColumn(h,0)}var i=!1,j=function(a){return a.forEach(function(a){a.enableSelection=g.grid.options.isRowSelectable(a)}),a},k=function(){g.grid.options.isRowSelectable!==angular.noop&&i!==!0&&(g.grid.registerRowsProcessor(j,500),i=!0)};k();var l=g.grid.registerDataChangeCallback(k,[d.dataChange.OPTIONS]);c.$on("$destroy",l)},post:function(a,b,c,d){}}}}}]),a.directive("uiGridSelectionRowHeaderButtons",["$templateCache","uiGridSelectionService","gridUtil",function(a,b,c){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,d,e,f){function g(a,c){c.stopPropagation(),c.shiftKey?b.shiftSelect(i,a,c,i.options.multiSelect):c.ctrlKey||c.metaKey?b.toggleRowSelection(i,a,c,i.options.multiSelect,i.options.noUnselect):b.toggleRowSelection(i,a,c,i.options.multiSelect&&!i.options.modifierKeysToMultiSelect,i.options.noUnselect)}function h(a){(a.ctrlKey||a.shiftKey)&&(a.target.onselectstart=function(){return!1},window.setTimeout(function(){a.target.onselectstart=null},0))}var i=f.grid;a.selectButtonClick=g,"ie"===c.detectBrowser()&&d.on("mousedown",h),a.$on("$destroy",function(){d.off()})}}}]),a.directive("uiGridSelectionSelectAllButtons",["$templateCache","uiGridSelectionService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/selectionSelectAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.selection.selectAll?(b.clearSelectedRows(f,c),f.options.noUnselect&&f.api.selection.selectRowByVisibleIndex(0,c),f.selection.selectAll=!1):f.options.multiSelect&&(f.api.selection.selectAllVisibleRows(c),f.selection.selectAll=!0)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService",function(a,b,c,d,e,f){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-row-selected': row.isSelected}":"{'ui-grid-row-selected': row.isSelected}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}]),a.directive("uiGridCell",["$compile","uiGridConstants","uiGridSelectionConstants","gridUtil","$parse","uiGridSelectionService","$timeout",function(a,b,c,d,e,f,g){return{priority:-200,restrict:"A",require:"?^uiGrid",scope:!1,link:function(a,c,d,e){function h(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&(c.addClass("ui-grid-disable-selection"),c.on("touchstart",m),c.on("touchend",n),c.on("click",l),a.registered=!0)}function i(){a.registered&&(c.removeClass("ui-grid-disable-selection"),c.off("touchstart",m),c.off("touchend",n),c.off("click",l),a.registered=!1)}var j=0,k=300;e.grid.api.cellNav&&e.grid.api.cellNav.on.viewPortKeyDown(a,function(b,c){null!==c&&c.row===a.row&&c.col===a.col&&32===b.keyCode&&"selectionRowHeaderCol"===a.col.colDef.name&&(f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply())});var l=function(b){"ui-grid-icon-minus-squared"!==b.target.className&&"ui-grid-icon-plus-squared"!==b.target.className&&(c.off("touchend",n),b.shiftKey?f.shiftSelect(a.grid,a.row,b,a.grid.options.multiSelect):b.ctrlKey||b.metaKey?f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect,a.grid.options.noUnselect):f.toggleRowSelection(a.grid,a.row,b,a.grid.options.multiSelect&&!a.grid.options.modifierKeysToMultiSelect,a.grid.options.noUnselect),a.$apply(),g(function(){c.on("touchend",n)},k))},m=function(a){j=(new Date).getTime(),c.off("click",l)},n=function(a){var b=(new Date).getTime(),d=b-j;k>d&&l(a),g(function(){c.on("click",l)},k)};h();var o=a.grid.registerDataChangeCallback(function(){a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection&&!a.registered?h():a.grid.options.enableRowSelection&&a.grid.options.enableFullRowSelection||!a.registered||i()},[b.dataChange.OPTIONS]);c.on("$destroy",o)}}}]),a.directive("uiGridGridFooter",["$compile","uiGridConstants","gridUtil",function(a,b,c){return{restrict:"EA",replace:!0,priority:-1e3,require:"^uiGrid",scope:!0,compile:function(b,d){return{pre:function(b,d,e,f){f.grid.options.showGridFooter&&c.getTemplate("ui-grid/gridFooterSelectedItems").then(function(c){var e=angular.element(c),f=a(e)(b);angular.element(d[0].getElementsByClassName("ui-grid-grid-footer")[0]).append(f)})},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeBase",["ui.grid"]);a.constant("uiGridTreeBaseConstants",{featureName:"treeBase",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeBaseService",["$q","uiGridTreeBaseConstants","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants","rowSorter",function(a,b,c,d,e,f,g,h){var i={initializeGrid:function(a,b){a.treeBase={},a.treeBase.numberLevels=0,a.treeBase.expandAll=!1,a.treeBase.tree=[],i.defaultGridOptions(a.options),a.registerRowsProcessor(i.treeRows,410),a.registerColumnBuilder(i.treeBaseColumnBuilder),i.createRowHeader(a);var c={events:{treeBase:{rowExpanded:{},rowCollapsed:{}}},methods:{treeBase:{expandAllRows:function(){i.expandAllRows(a)},collapseAllRows:function(){i.collapseAllRows(a)},toggleRowTreeState:function(b){i.toggleRowTreeState(a,b)},expandRow:function(b){i.expandRow(a,b)},expandRowChildren:function(b){i.expandRowChildren(a,b)},collapseRow:function(b){i.collapseRow(a,b)},collapseRowChildren:function(b){i.collapseRowChildren(a,b)},getTreeExpandedState:function(){return{expandedState:i.getTreeState(a)}},setTreeState:function(b){i.setTreeState(a,b)},getRowChildren:function(a){return a.treeNode.children.map(function(a){return a.row})}}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.treeRowHeaderBaseWidth=a.treeRowHeaderBaseWidth||30,a.treeIndent=a.treeIndent||10,a.showTreeRowHeader=a.showTreeRowHeader!==!1,a.showTreeExpandNoChildren=a.showTreeExpandNoChildren!==!1,a.treeRowHeaderAlwaysVisible=a.treeRowHeaderAlwaysVisible!==!1,a.treeCustomAggregations=a.treeCustomAggregations||{},a.enableExpandAll=a.enableExpandAll!==!1},treeBaseColumnBuilder:function(a,b,c){"undefined"!=typeof a.customTreeAggregationFn&&(b.treeAggregationFn=a.customTreeAggregationFn),"undefined"!=typeof a.treeAggregationType&&(b.treeAggregation={type:a.treeAggregationType},"undefined"!=typeof c.treeCustomAggregations[a.treeAggregationType]?(b.treeAggregationFn=c.treeCustomAggregations[a.treeAggregationType].aggregationFn,b.treeAggregationFinalizerFn=c.treeCustomAggregations[a.treeAggregationType].finalizerFn,b.treeAggregation.label=c.treeCustomAggregations[a.treeAggregationType].label):"undefined"!=typeof i.nativeAggregations()[a.treeAggregationType]&&(b.treeAggregationFn=i.nativeAggregations()[a.treeAggregationType].aggregationFn,b.treeAggregation.label=i.nativeAggregations()[a.treeAggregationType].label)),"undefined"!=typeof a.treeAggregationLabel&&("undefined"==typeof b.treeAggregation&&(b.treeAggregation={}),b.treeAggregation.label=a.treeAggregationLabel),b.treeAggregationUpdateEntity=a.treeAggregationUpdateEntity!==!1,"undefined"==typeof b.customTreeAggregationFinalizerFn&&(b.customTreeAggregationFinalizerFn=a.customTreeAggregationFinalizerFn)},createRowHeader:function(a){var c={name:b.rowHeaderColName,displayName:"",width:a.options.treeRowHeaderBaseWidth,minWidth:10,cellTemplate:"ui-grid/treeBaseRowHeader",headerCellTemplate:"ui-grid/treeBaseHeaderCell",enableColumnResizing:!1,enableColumnMenu:!1,exporterSuppressExport:!0,allowCellFocus:!0};c.visible=a.options.treeRowHeaderAlwaysVisible,a.addRowHeaderColumn(c,-100)},expandAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.EXPANDED)}),a.treeBase.expandAll=!0,a.queueGridRefresh()},collapseAllRows:function(a){a.treeBase.tree.forEach(function(c){i.setAllNodes(a,c,b.COLLAPSED)}),a.treeBase.expandAll=!1,a.queueGridRefresh()},setAllNodes:function(a,c,d){"undefined"!=typeof c.state&&c.state!==d&&(c.state=d,d===b.EXPANDED?a.api.treeBase.raise.rowExpanded(c.row):a.api.treeBase.raise.rowCollapsed(c.row)),c.children&&c.children.forEach(function(b){i.setAllNodes(a,b,d)})},toggleRowTreeState:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(c.treeNode.state===b.EXPANDED?i.collapseRow(a,c):i.expandRow(a,c),a.queueGridRefresh())},expandRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.EXPANDED&&(c.treeNode.state=b.EXPANDED,a.api.treeBase.raise.rowExpanded(c),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},expandRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.EXPANDED),a.treeBase.expandAll=i.allExpanded(a.treeBase.tree),a.queueGridRefresh())},collapseRow:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||c.treeNode.state!==b.COLLAPSED&&(c.treeNode.state=b.COLLAPSED,a.treeBase.expandAll=!1,a.api.treeBase.raise.rowCollapsed(c),a.queueGridRefresh())},collapseRowChildren:function(a,c){"undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0||(i.setAllNodes(a,c.treeNode,b.COLLAPSED),a.treeBase.expandAll=!1,a.queueGridRefresh())},allExpanded:function(a){var b=!0;return a.forEach(function(a){i.allExpandedInternal(a)||(b=!1)}),b},allExpandedInternal:function(a){if(a.children&&a.children.length>0){if(a.state===b.COLLAPSED)return!1;var c=!0;return a.children.forEach(function(a){i.allExpandedInternal(a)||(c=!1)}),c}return!0},treeRows:function(a){if(0===a.length)return a;var c=this;b.EXPANDED;return c.treeBase.tree=i.createTree(c,a),i.updateRowHeaderWidth(c),i.sortTree(c),i.fixFilter(c),i.renderTree(c.treeBase.tree)},updateRowHeaderWidth:function(a){var c=a.getColumn(b.rowHeaderColName),d=a.options.treeRowHeaderBaseWidth+a.options.treeIndent*Math.max(a.treeBase.numberLevels-1,0);c&&d!==c.width&&(c.width=d,a.queueRefresh());var e=!0;a.options.showTreeRowHeader===!1&&(e=!1),a.options.treeRowHeaderAlwaysVisible===!1&&a.treeBase.numberLevels<=0&&(e=!1),c.visible!==e&&(c.visible=e,c.colDef.visible=e,a.queueGridRefresh())},renderTree:function(a){var c=[];return a.forEach(function(a){a.row.visible&&c.push(a.row),a.state===b.EXPANDED&&a.children&&a.children.length>0&&(c=c.concat(i.renderTree(a.children)))}),c},createTree:function(a,c){var d,e=-1,f=[];a.treeBase.tree=[],a.treeBase.numberLevels=0;var g=i.getAggregations(a),h=function(c){if("undefined"!=typeof c.entity.$$treeLevel&&c.treeLevel!==c.entity.$$treeLevel&&(c.treeLevel=c.entity.$$treeLevel),c.treeLevel<=e){for(;c.treeLevel<=e;){var h=f.pop();i.finaliseAggregations(h),e--}d=f.length>0?i.setCurrentState(f):b.EXPANDED}("undefined"==typeof c.treeLevel||null===c.treeLevel||c.treeLevel<0)&&c.visible&&i.aggregate(a,c,f),i.addOrUseNode(a,c,f,g),"undefined"!=typeof c.treeLevel&&null!==c.treeLevel&&c.treeLevel>=0&&(f.push(c),e++,d=i.setCurrentState(f)),a.treeBase.numberLevels<c.treeLevel+1&&(a.treeBase.numberLevels=c.treeLevel+1)};for(c.forEach(h);f.length>0;){var j=f.pop();i.finaliseAggregations(j)}return a.treeBase.tree},addOrUseNode:function(a,c,d,e){var f=[];e.forEach(function(a){f.push(i.buildAggregationObject(a.col))});var g={state:b.COLLAPSED,row:c,parentRow:null,aggregations:f,children:[]};c.treeNode&&(g.state=c.treeNode.state),d.length>0&&(g.parentRow=d[d.length-1]),c.treeNode=g,0===d.length?a.treeBase.tree.push(g):d[d.length-1].treeNode.children.push(g)},setCurrentState:function(a){var c=b.EXPANDED;return a.forEach(function(a){a.treeNode.state===b.COLLAPSED&&(c=b.COLLAPSED)}),c},sortTree:function(a){a.columns.forEach(function(a){a.sort&&a.sort.ignoreSort&&delete a.sort.ignoreSort}),a.treeBase.tree=i.sortInternal(a,a.treeBase.tree)},sortInternal:function(a,c){var d=c.map(function(a){return a.row});d=h.sort(a,d,a.columns);var e=d.map(function(a){return a.treeNode});return e.forEach(function(c){c.state===b.EXPANDED&&c.children&&c.children.length>0&&(c.children=i.sortInternal(a,c.children))}),e},fixFilter:function(a){var b;a.treeBase.tree.forEach(function(a){a.children&&a.children.length>0&&(b=a.row.visible,i.fixFilterInternal(a.children,b))})},fixFilterInternal:function(a,b){return a.forEach(function(a){a.row.visible&&!b&&(i.setParentsVisible(a),b=!0),a.children&&a.children.length>0&&i.fixFilterInternal(a.children,b&&a.row.visible)&&(b=!0)}),b},setParentsVisible:function(a){for(;a.parentRow;)a.parentRow.visible=!0,a=a.parentRow.treeNode},buildAggregationObject:function(a){var b={col:a};return a.treeAggregation&&a.treeAggregation.type&&(b.type=a.treeAggregation.type),a.treeAggregation&&a.treeAggregation.label&&(b.label=a.treeAggregation.label),b},getAggregations:function(a){var b=[];return a.columns.forEach(function(c){"undefined"!=typeof c.treeAggregationFn&&(b.push(i.buildAggregationObject(c)),a.options.showColumnFooter&&"undefined"==typeof c.colDef.aggregationType&&c.treeAggregation&&(c.treeFooterAggregation=i.buildAggregationObject(c),c.aggregationType=i.treeFooterAggregationType))}),b},aggregate:function(a,b,c){0===c.length&&b.treeNode&&b.treeNode.aggregations&&b.treeNode.aggregations.forEach(function(c){if("undefined"!=typeof c.col.treeFooterAggregation){var d=a.getCellValue(b,c.col),e=Number(d);c.col.treeAggregationFn(c.col.treeFooterAggregation,d,e,b)}}),c.forEach(function(c,d){c.treeNode.aggregations&&c.treeNode.aggregations.forEach(function(c){var e=a.getCellValue(b,c.col),f=Number(e);c.col.treeAggregationFn(c,e,f,b),0===d&&"undefined"!=typeof c.col.treeFooterAggregation&&c.col.treeAggregationFn(c.col.treeFooterAggregation,e,f,b)})})},nativeAggregations:function(){var a={count:{label:f.get().aggregation.count,menuTitle:f.get().grouping.aggregate_count,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=1:a.value++}},sum:{label:f.get().aggregation.sum,menuTitle:f.get().grouping.aggregate_sum,aggregationFn:function(a,b,c){isNaN(c)||("undefined"==typeof a.value?a.value=c:a.value+=c)}},min:{label:f.get().aggregation.min,menuTitle:f.get().grouping.aggregate_min,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=b:"undefined"!=typeof b&&null!==b&&(b<a.value||null===a.value)&&(a.value=b)}},max:{label:f.get().aggregation.max,menuTitle:f.get().grouping.aggregate_max,aggregationFn:function(a,b,c){"undefined"==typeof a.value?a.value=b:"undefined"!=typeof b&&null!==b&&(b>a.value||null===a.value)&&(a.value=b)}},avg:{label:f.get().aggregation.avg,menuTitle:f.get().grouping.aggregate_avg,aggregationFn:function(a,b,c){"undefined"==typeof a.count?a.count=1:a.count++,isNaN(c)||("undefined"==typeof a.value||"undefined"==typeof a.sum?(a.value=c,a.sum=c):(a.sum+=c,a.value=a.sum/a.count))}}};return a},finaliseAggregation:function(a,b){b.col.treeAggregationUpdateEntity&&"undefined"!=typeof a&&"undefined"!=typeof a.entity["$$"+b.col.uid]&&angular.extend(b,a.entity["$$"+b.col.uid]),"function"==typeof b.col.treeAggregationFinalizerFn&&b.col.treeAggregationFinalizerFn(b),"function"==typeof b.col.customTreeAggregationFinalizerFn&&b.col.customTreeAggregationFinalizerFn(b),"undefined"==typeof b.rendered&&(b.rendered=b.label?b.label+b.value:b.value)},finaliseAggregations:function(a){null!=a&&"undefined"!=typeof a.treeNode.aggregations&&a.treeNode.aggregations.forEach(function(b){if(i.finaliseAggregation(a,b),b.col.treeAggregationUpdateEntity){var c={};angular.forEach(b,function(a,d){b.hasOwnProperty(d)&&"col"!==d&&(c[d]=a)}),a.entity["$$"+b.col.uid]=c}})},treeFooterAggregationType:function(a,b){return i.finaliseAggregation(void 0,b.treeFooterAggregation),"undefined"==typeof b.treeFooterAggregation.value||null===b.treeFooterAggregation.rendered?"":b.treeFooterAggregation.rendered}};return i}]),a.directive("uiGridTreeBaseRowHeaderButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseRowHeaderButtons"),scope:!0,require:"^uiGrid",link:function(a,c,d,e){var f=e.grid;a.treeButtonClick=function(a,c){b.toggleRowTreeState(f,a,c)}}}}]),a.directive("uiGridTreeBaseExpandAllButtons",["$templateCache","uiGridTreeBaseService",function(a,b){return{replace:!0,restrict:"E",template:a.get("ui-grid/treeBaseExpandAllButtons"),scope:!1,link:function(a,c,d,e){var f=a.col.grid;a.headerButtonClick=function(a,c){f.treeBase.expandAll?b.collapseAllRows(f,c):b.expandAllRows(f,c)}}}}]),a.directive("uiGridViewport",["$compile","uiGridConstants","gridUtil","$parse",function(a,b,c,d){return{priority:-200,scope:!1,compile:function(a,b){var c=angular.element(a.children().children()[0]),d=c.attr("ng-class"),e="";return e=d?d.slice(0,-1)+",'ui-grid-tree-header-row': row.treeLevel > -1}":"{'ui-grid-tree-header-row': row.treeLevel > -1}",c.attr("ng-class",e),{pre:function(a,b,c,d){},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.treeView",["ui.grid","ui.grid.treeBase"]);a.constant("uiGridTreeViewConstants",{featureName:"treeView",rowHeaderColName:"treeBaseRowHeaderCol",EXPANDED:"expanded",COLLAPSED:"collapsed",aggregation:{COUNT:"count",SUM:"sum",MAX:"max",MIN:"min",AVG:"avg"}}),a.service("uiGridTreeViewService",["$q","uiGridTreeViewConstants","uiGridTreeBaseConstants","uiGridTreeBaseService","gridUtil","GridRow","gridClassFactory","i18nService","uiGridConstants",function(a,b,c,d,e,f,g,h,i){var j={initializeGrid:function(a,b){d.initializeGrid(a,b),a.treeView={},a.registerRowsProcessor(j.adjustSorting,60);var c={events:{treeView:{}},methods:{treeView:{}}};a.api.registerEventsFromObject(c.events),a.api.registerMethodsFromObject(c.methods)},defaultGridOptions:function(a){a.enableTreeView=a.enableTreeView!==!1},adjustSorting:function(a){var b=this;return b.columns.forEach(function(a){a.sort&&(a.sort.ignoreSort=!0)}),a}};return j}]),a.directive("uiGridTreeView",["uiGridTreeViewConstants","uiGridTreeViewService","$templateCache",function(a,b,c){return{replace:!0,priority:0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){e.grid.options.enableTreeView!==!1&&b.initializeGrid(e.grid,a)},post:function(a,b,c,d){}}}}}])}(),function(){"use strict";var a=angular.module("ui.grid.validate",["ui.grid"]);a.service("uiGridValidateService",["$sce","$q","$http","i18nService","uiGridConstants",function(a,b,c,d,e){var f={validatorFactories:{},setExternalFactoryFunction:function(a){f.externalFactoryFunction=a},clearExternalFactory:function(){delete f.externalFactoryFunction},getValidatorFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).validatorFactory(b)},getMessageFromExternalFactory:function(a,b){return f.externalFactoryFunction(a,b).messageFunction(b)},setValidator:function(a,b,c){f.validatorFactories[a]={validatorFactory:b,messageFunction:c}},getValidator:function(a,b){if(f.externalFactoryFunction){var c=f.getValidatorFromExternalFactory(a,b);if(c)return c}if(!f.validatorFactories[a])throw"Invalid validator name: "+a;return f.validatorFactories[a].validatorFactory(b)},getMessage:function(a,b){if(f.externalFactoryFunction){var c=f.getMessageFromExternalFactory(a,b);if(c)return c}return f.validatorFactories[a].messageFunction(b)},isInvalid:function(a,b){return a["$$invalid"+b.name]},setInvalid:function(a,b){a["$$invalid"+b.name]=!0},setValid:function(a,b){delete a["$$invalid"+b.name]},setError:function(a,b,c){a["$$errors"+b.name]||(a["$$errors"+b.name]={}),a["$$errors"+b.name][c]=!0},clearError:function(a,b,c){a["$$errors"+b.name]&&c in a["$$errors"+b.name]&&delete a["$$errors"+b.name][c]},getErrorMessages:function(a,b){var c=[];return a["$$errors"+b.name]&&0!==Object.keys(a["$$errors"+b.name]).length?(Object.keys(a["$$errors"+b.name]).sort().forEach(function(a){c.push(f.getMessage(a,b.validators[a]))}),c):c},getFormattedErrors:function(b,c){var e="",g=f.getErrorMessages(b,c);return g.length?(g.forEach(function(a){e+=a+"<br/>"}),a.trustAsHtml("<p><b>"+d.getSafeText("validate.error")+"</b></p>"+e)):void 0},getTitleFormattedErrors:function(b,c){var e="\n",g="",h=f.getErrorMessages(b,c);return h.length?(h.forEach(function(a){g+=a+e}),a.trustAsHtml(d.getSafeText("validate.error")+e+g)):void 0},runValidators:function(a,c,d,e,g){if(d!==e){if("undefined"==typeof c.name||!c.name)throw new Error("colDef.name is required to perform validation");f.setValid(a,c);var h=function(a,b,c){return function(h){h||(f.setInvalid(a,b),f.setError(a,b,c),g&&g.api.validate.raise.validationFailed(a,b,d,e))}},i=[];for(var j in c.validators){f.clearError(a,c,j);var k=f.getValidator(j,c.validators[j]),l=b.when(k(e,d,a,c)).then(h(a,c,j));i.push(l)}return b.all(i)}},createDefaultValidators:function(){f.setValidator("minLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length>=a}},function(a){return d.getSafeText("validate.minLength").replace("THRESHOLD",a)}),f.setValidator("maxLength",function(a){return function(b,c,d,e){return void 0===c||null===c||""===c?!0:c.length<=a}},function(a){return d.getSafeText("validate.maxLength").replace("THRESHOLD",a)}),f.setValidator("required",function(a){return function(b,c,d,e){return a?!(void 0===c||null===c||""===c):!0}},function(a){return d.getSafeText("validate.required")})},initializeGrid:function(a,b){b.validate={isInvalid:f.isInvalid,getFormattedErrors:f.getFormattedErrors,getTitleFormattedErrors:f.getTitleFormattedErrors,runValidators:f.runValidators};var c={events:{validate:{validationFailed:function(a,b,c,d){}}},methods:{validate:{isInvalid:function(a,c){return b.validate.isInvalid(a,c)},getErrorMessages:function(a,c){return b.validate.getErrorMessages(a,c)},getFormattedErrors:function(a,c){return b.validate.getFormattedErrors(a,c)},getTitleFormattedErrors:function(a,c){return b.validate.getTitleFormattedErrors(a,c)}}}};b.api.registerEventsFromObject(c.events),b.api.registerMethodsFromObject(c.methods),b.edit&&b.api.edit.on.afterCellEdit(a,function(a,c,d,e){b.validate.runValidators(a,c,d,e,b)}),f.createDefaultValidators()}};return f}]),a.directive("uiGridValidate",["gridUtil","uiGridValidateService",function(a,b){return{priority:0,replace:!0,require:"^uiGrid",scope:!1,compile:function(){return{pre:function(a,c,d,e){b.initializeGrid(a,e.grid)},post:function(a,b,c,d){}}}}}])}(),angular.module("ui.grid").run(["$templateCache",function(a){"use strict";a.put("ui-grid/ui-grid-filter",'<div class="ui-grid-filter-container" ng-style="col.extraStyle" ng-repeat="colFilter in col.filters" ng-class="{\'ui-grid-filter-cancel-button-hidden\' : colFilter.disableCancelFilterButton === true }"><div ng-if="colFilter.type !== \'select\'"><input type="text" class="ui-grid-filter-input ui-grid-filter-input-{{$index}}" ng-model="colFilter.term" ng-attr-placeholder="{{colFilter.placeholder || \'\'}}" aria-label="{{colFilter.ariaLabel || aria.defaultFilterLabel}}"><div role="button" class="ui-grid-filter-button" ng-click="removeFilter(colFilter, $index)" ng-if="!colFilter.disableCancelFilterButton" ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" ng-show="colFilter.term !== undefined && colFilter.term !== null && colFilter.term !== \'\'"><i class="ui-grid-icon-cancel" ui-grid-one-bind-aria-label="aria.removeFilter">&nbsp;</i></div></div><div ng-if="colFilter.type === \'select\'"><select class="ui-grid-filter-select ui-grid-filter-input-{{$index}}" ng-model="colFilter.term" ng-show="colFilter.selectOptions.length > 0" ng-attr-placeholder="{{colFilter.placeholder || aria.defaultFilterLabel}}" aria-label="{{colFilter.ariaLabel || \'\'}}" ng-options="option.value as option.label for option in colFilter.selectOptions"><option value=""></option></select><div role="button" class="ui-grid-filter-button-select" ng-click="removeFilter(colFilter, $index)" ng-if="!colFilter.disableCancelFilterButton" ng-disabled="colFilter.term === undefined || colFilter.term === null || colFilter.term === \'\'" ng-show="colFilter.term !== undefined && colFilter.term != null"><i class="ui-grid-icon-cancel" ui-grid-one-bind-aria-label="aria.removeFilter">&nbsp;</i></div></div></div>'),
-a.put("ui-grid/ui-grid-footer",'<div class="ui-grid-footer-panel ui-grid-footer-aggregates-row"><!-- tfooter --><div class="ui-grid-footer ui-grid-footer-viewport"><div class="ui-grid-footer-canvas"><div class="ui-grid-footer-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"><div role="row" class="ui-grid-footer-cell-row"><div ui-grid-footer-cell role="gridcell" ng-repeat="col in colContainer.renderedColumns track by col.uid" col="col" render-index="$index" class="ui-grid-footer-cell ui-grid-clearfix"></div></div></div></div></div></div>'),a.put("ui-grid/ui-grid-grid-footer",'<div class="ui-grid-footer-info ui-grid-grid-footer"><span>{{\'search.totalItems\' | t}} {{grid.rows.length}}</span> <span ng-if="grid.renderContainers.body.visibleRowCache.length !== grid.rows.length" class="ngLabel">({{"search.showingItems" | t}} {{grid.renderContainers.body.visibleRowCache.length}})</span></div>'),a.put("ui-grid/ui-grid-group-panel",'<div class="ui-grid-group-panel"><div ui-t="groupPanel.description" class="description" ng-show="groupings.length == 0"></div><ul ng-show="groupings.length > 0" class="ngGroupList"><li class="ngGroupItem" ng-repeat="group in configGroups"><span class="ngGroupElement"><span class="ngGroupName">{{group.displayName}} <span ng-click="removeGroup($index)" class="ngRemoveGroup">x</span></span> <span ng-hide="$last" class="ngGroupArrow"></span></span></li></ul></div>'),a.put("ui-grid/ui-grid-header",'<div role="rowgroup" class="ui-grid-header"><!-- theader --><div class="ui-grid-top-panel"><div class="ui-grid-header-viewport"><div class="ui-grid-header-canvas"><div class="ui-grid-header-cell-wrapper" ng-style="colContainer.headerCellWrapperStyle()"><div role="row" class="ui-grid-header-cell-row"><div class="ui-grid-header-cell ui-grid-clearfix" ng-repeat="col in colContainer.renderedColumns track by col.uid" ui-grid-header-cell col="col" render-index="$index"></div></div></div></div></div></div></div>'),a.put("ui-grid/ui-grid-menu-button",'<div class="ui-grid-menu-button"><div role="button" ui-grid-one-bind-id-grid="\'grid-menu\'" class="ui-grid-icon-container" ng-click="toggleMenu()" aria-haspopup="true"><i class="ui-grid-icon-menu" ui-grid-one-bind-aria-label="i18n.aria.buttonLabel">&nbsp;</i></div><div ui-grid-menu menu-items="menuItems"></div></div>'),a.put("ui-grid/ui-grid-no-header",'<div class="ui-grid-top-panel"></div>'),a.put("ui-grid/ui-grid-row","<div ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>"),a.put("ui-grid/ui-grid",'<div ui-i18n="en" class="ui-grid"><!-- TODO (c0bra): add "scoped" attr here, eventually? --><style ui-grid-style>.grid{{ grid.id }} {\n /* Styles for the grid */\n }\n\n .grid{{ grid.id }} .ui-grid-row, .grid{{ grid.id }} .ui-grid-cell, .grid{{ grid.id }} .ui-grid-cell .ui-grid-vertical-bar {\n height: {{ grid.options.rowHeight }}px;\n }\n\n .grid{{ grid.id }} .ui-grid-row:last-child .ui-grid-cell {\n border-bottom-width: {{ ((grid.getTotalRowHeight() < grid.getViewportHeight()) && \'1\') || \'0\' }}px;\n }\n\n {{ grid.verticalScrollbarStyles }}\n {{ grid.horizontalScrollbarStyles }}\n\n /*\n .ui-grid[dir=rtl] .ui-grid-viewport {\n padding-left: {{ grid.verticalScrollbarWidth }}px;\n }\n */\n\n {{ grid.customStyles }}</style><div class="ui-grid-contents-wrapper"><div ui-grid-menu-button ng-if="grid.options.enableGridMenu"></div><div ng-if="grid.hasLeftContainer()" style="width: 0" ui-grid-pinned-container="\'left\'"></div><div ui-grid-render-container container-id="\'body\'" col-container-name="\'body\'" row-container-name="\'body\'" bind-scroll-horizontal="true" bind-scroll-vertical="true" enable-horizontal-scrollbar="grid.options.enableHorizontalScrollbar" enable-vertical-scrollbar="grid.options.enableVerticalScrollbar"></div><div ng-if="grid.hasRightContainer()" style="width: 0" ui-grid-pinned-container="\'right\'"></div><div ui-grid-grid-footer ng-if="grid.options.showGridFooter"></div><div ui-grid-column-menu ng-if="grid.options.enableColumnMenus"></div><div ng-transclude></div></div></div>'),a.put("ui-grid/uiGridCell",'<div class="ui-grid-cell-contents" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div>'),a.put("ui-grid/uiGridColumnMenu",'<div class="ui-grid-column-menu"><div ui-grid-menu menu-items="menuItems"><!-- <div class="ui-grid-column-menu">\n <div class="inner" ng-show="menuShown">\n <ul>\n <div ng-show="grid.options.enableSorting">\n <li ng-click="sortColumn($event, asc)" ng-class="{ \'selected\' : col.sort.direction == asc }"><i class="ui-grid-icon-sort-alt-up"></i> Sort Ascending</li>\n <li ng-click="sortColumn($event, desc)" ng-class="{ \'selected\' : col.sort.direction == desc }"><i class="ui-grid-icon-sort-alt-down"></i> Sort Descending</li>\n <li ng-show="col.sort.direction" ng-click="unsortColumn()"><i class="ui-grid-icon-cancel"></i> Remove Sort</li>\n </div>\n </ul>\n </div>\n </div> --></div></div>'),a.put("ui-grid/uiGridFooterCell",'<div class="ui-grid-cell-contents" col-index="renderIndex"><div>{{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}</div></div>'),a.put("ui-grid/uiGridHeaderCell",'<div role="columnheader" ng-class="{ \'sortable\': sortable }" ui-grid-one-bind-aria-labelledby-grid="col.uid + \'-header-text \' + col.uid + \'-sortdir-text\'" aria-sort="{{col.sort.direction == asc ? \'ascending\' : ( col.sort.direction == desc ? \'descending\' : (!col.sort.direction ? \'none\' : \'other\'))}}"><div role="button" tabindex="0" class="ui-grid-cell-contents ui-grid-header-cell-primary-focus" col-index="renderIndex" title="TOOLTIP"><span class="ui-grid-header-cell-label" ui-grid-one-bind-id-grid="col.uid + \'-header-text\'">{{ col.displayName CUSTOM_FILTERS }}</span> <span ui-grid-one-bind-id-grid="col.uid + \'-sortdir-text\'" ui-grid-visible="col.sort.direction" aria-label="{{getSortDirectionAriaLabel()}}"><i ng-class="{ \'ui-grid-icon-up-dir\': col.sort.direction == asc, \'ui-grid-icon-down-dir\': col.sort.direction == desc, \'ui-grid-icon-blank\': !col.sort.direction }" title="{{isSortPriorityVisible() ? i18n.headerCell.priority + \' \' + ( col.sort.priority + 1 ) : null}}" aria-hidden="true"></i> <sub ui-grid-visible="isSortPriorityVisible()" class="ui-grid-sort-priority-number">{{col.sort.priority + 1}}</sub></span></div><div role="button" tabindex="0" ui-grid-one-bind-id-grid="col.uid + \'-menu-button\'" class="ui-grid-column-menu-button" ng-if="grid.options.enableColumnMenus && !col.isRowHeader && col.colDef.enableColumnMenu !== false" ng-click="toggleMenu($event)" ng-class="{\'ui-grid-column-menu-button-last-col\': isLastCol}" ui-grid-one-bind-aria-label="i18n.headerCell.aria.columnMenuButtonLabel" aria-haspopup="true"><i class="ui-grid-icon-angle-down" aria-hidden="true">&nbsp;</i></div><div ui-grid-filter></div></div>'),a.put("ui-grid/uiGridMenu",'<div class="ui-grid-menu" ng-if="shown"><style ui-grid-style>{{dynamicStyles}}</style><div class="ui-grid-menu-mid" ng-show="shownMid"><div class="ui-grid-menu-inner"><ul role="menu" class="ui-grid-menu-items"><li ng-repeat="item in menuItems" role="menuitem" ui-grid-menu-item ui-grid-one-bind-id="\'menuitem-\'+$index" action="item.action" name="item.title" active="item.active" icon="item.icon" shown="item.shown" context="item.context" template-url="item.templateUrl" leave-open="item.leaveOpen" screen-reader-only="item.screenReaderOnly"></li></ul></div></div></div>'),a.put("ui-grid/uiGridMenuItem",'<button type="button" class="ui-grid-menu-item" ng-click="itemAction($event, title)" ng-show="itemShown()" ng-class="{ \'ui-grid-menu-item-active\': active(), \'ui-grid-sr-only\': (!focus && screenReaderOnly) }" aria-pressed="{{active()}}" tabindex="0" ng-focus="focus=true" ng-blur="focus=false"><i ng-class="icon" aria-hidden="true">&nbsp;</i> {{ name }}</button>'),a.put("ui-grid/uiGridRenderContainer","<div role=\"grid\" ui-grid-one-bind-id-grid=\"'grid-container'\" class=\"ui-grid-render-container\" ng-style=\"{ 'margin-left': colContainer.getMargin('left') + 'px', 'margin-right': colContainer.getMargin('right') + 'px' }\"><!-- All of these dom elements are replaced in place --><div ui-grid-header></div><div ui-grid-viewport></div><div ng-if=\"colContainer.needsHScrollbarPlaceholder()\" class=\"ui-grid-scrollbar-placeholder\" ng-style=\"{height:colContainer.grid.scrollbarHeight + 'px'}\"></div><ui-grid-footer ng-if=\"grid.options.showColumnFooter\"></ui-grid-footer></div>"),a.put("ui-grid/uiGridViewport",'<div role="rowgroup" class="ui-grid-viewport" ng-style="colContainer.getViewportStyle()"><!-- tbody --><div class="ui-grid-canvas"><div ng-repeat="(rowRenderIndex, row) in rowContainer.renderedRows track by $index" class="ui-grid-row" ng-style="Viewport.rowStyle(rowRenderIndex)"><div role="row" ui-grid-row="row" row-render-index="rowRenderIndex"></div></div></div></div>'),a.put("ui-grid/cellEditor",'<div><form name="inputForm"><input type="INPUT_TYPE" ng-class="\'colt\' + col.uid" ui-grid-editor ng-model="MODEL_COL_FIELD"></form></div>'),a.put("ui-grid/dropdownEditor",'<div><form name="inputForm"><select ng-class="\'colt\' + col.uid" ui-grid-edit-dropdown ng-model="MODEL_COL_FIELD" ng-options="field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray"></select></form></div>'),a.put("ui-grid/fileChooserEditor",'<div><form name="inputForm"><input ng-class="\'colt\' + col.uid" ui-grid-edit-file-chooser type="file" id="files" name="files[]" ng-model="MODEL_COL_FIELD"></form></div>'),a.put("ui-grid/emptyBaseLayerContainer",'<div class="ui-grid-empty-base-layer-container ui-grid-canvas"><div class="ui-grid-row" ng-repeat="(rowRenderIndex, row) in grid.baseLayer.emptyRows track by $index" ng-style="Viewport.rowStyle(rowRenderIndex)"><div><div><div ng-repeat="(colRenderIndex, col) in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell {{ col.getColClass(false) }}"></div></div></div></div></div>'),a.put("ui-grid/expandableRow",'<div ui-grid-expandable-row ng-if="expandableRow.shouldRenderExpand()" class="expandableRow" style="float:left; margin-top: 1px; margin-bottom: 1px" ng-style="{width: (grid.renderContainers.body.getCanvasWidth()) + \'px\', height: row.expandedRowHeight + \'px\'}"></div>'),a.put("ui-grid/expandableRowHeader",'<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell"><div class="ui-grid-cell-contents"><i ng-if="!row.groupHeader==true" ng-class="{ \'ui-grid-icon-plus-squared\' : !row.isExpanded, \'ui-grid-icon-minus-squared\' : row.isExpanded }" ng-click="grid.api.expandable.toggleRowExpansion(row.entity)"></i></div></div>'),a.put("ui-grid/expandableScrollFiller","<div ng-if=\"expandableRow.shouldRenderFiller()\" ng-class=\"{scrollFiller:true, scrollFillerClass:(colContainer.name === 'body')}\" ng-style=\"{ width: (grid.getViewportWidth()) + 'px', height: row.expandedRowHeight + 2 + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }\"><i class=\"ui-grid-icon-spin5 ui-grid-animate-spin\" ng-style=\"{'margin-top': ( row.expandedRowHeight/2 - 5) + 'px', 'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px'}\"></i></div>"),a.put("ui-grid/expandableTopRowHeader",'<div class="ui-grid-row-header-cell ui-grid-expandable-buttons-cell"><div class="ui-grid-cell-contents"><i ng-class="{ \'ui-grid-icon-plus-squared\' : !grid.expandable.expandedAll, \'ui-grid-icon-minus-squared\' : grid.expandable.expandedAll }" ng-click="grid.api.expandable.toggleAllRows()"></i></div></div>'),a.put("ui-grid/csvLink",'<span class="ui-grid-exporter-csv-link-span"><a href="data:text/csv;charset=UTF-8,CSV_CONTENT" download="FILE_NAME">LINK_LABEL</a></span>'),a.put("ui-grid/importerMenuItem",'<li class="ui-grid-menu-item"><form><input class="ui-grid-importer-file-chooser" type="file" id="files" name="files[]"></form></li>'),a.put("ui-grid/importerMenuItemContainer","<div ui-grid-importer-menu-item></div>"),a.put("ui-grid/pagination",'<div role="contentinfo" class="ui-grid-pager-panel" ui-grid-pager ng-show="grid.options.enablePaginationControls"><div role="navigation" class="ui-grid-pager-container"><div role="menubar" class="ui-grid-pager-control"><button type="button" role="menuitem" class="ui-grid-pager-first" ui-grid-one-bind-title="aria.pageToFirst" ui-grid-one-bind-aria-label="aria.pageToFirst" ng-click="pageFirstPageClick()" ng-disabled="cantPageBackward()"><div ng-class="grid.isRTL() ? \'last-triangle\' : \'first-triangle\'"><div ng-class="grid.isRTL() ? \'last-bar-rtl\' : \'first-bar\'"></div></div></button> <button type="button" role="menuitem" class="ui-grid-pager-previous" ui-grid-one-bind-title="aria.pageBack" ui-grid-one-bind-aria-label="aria.pageBack" ng-click="pagePreviousPageClick()" ng-disabled="cantPageBackward()"><div ng-class="grid.isRTL() ? \'last-triangle prev-triangle\' : \'first-triangle prev-triangle\'"></div></button> <input type="number" ui-grid-one-bind-title="aria.pageSelected" ui-grid-one-bind-aria-label="aria.pageSelected" class="ui-grid-pager-control-input" ng-model="grid.options.paginationCurrentPage" min="1" max="{{ paginationApi.getTotalPages() }}" required> <span class="ui-grid-pager-max-pages-number" ng-show="paginationApi.getTotalPages() > 0"><abbr ui-grid-one-bind-title="paginationOf">/</abbr> {{ paginationApi.getTotalPages() }}</span> <button type="button" role="menuitem" class="ui-grid-pager-next" ui-grid-one-bind-title="aria.pageForward" ui-grid-one-bind-aria-label="aria.pageForward" ng-click="pageNextPageClick()" ng-disabled="cantPageForward()"><div ng-class="grid.isRTL() ? \'first-triangle next-triangle\' : \'last-triangle next-triangle\'"></div></button> <button type="button" role="menuitem" class="ui-grid-pager-last" ui-grid-one-bind-title="aria.pageToLast" ui-grid-one-bind-aria-label="aria.pageToLast" ng-click="pageLastPageClick()" ng-disabled="cantPageToLast()"><div ng-class="grid.isRTL() ? \'first-triangle\' : \'last-triangle\'"><div ng-class="grid.isRTL() ? \'first-bar-rtl\' : \'last-bar\'"></div></div></button></div><div class="ui-grid-pager-row-count-picker" ng-if="grid.options.paginationPageSizes.length > 1 && !grid.options.useCustomPagination"><select ui-grid-one-bind-aria-labelledby-grid="\'items-per-page-label\'" ng-model="grid.options.paginationPageSize" ng-options="o as o for o in grid.options.paginationPageSizes"></select><span ui-grid-one-bind-id-grid="\'items-per-page-label\'" class="ui-grid-pager-row-count-label">&nbsp;{{sizesLabel}}</span></div><span ng-if="grid.options.paginationPageSizes.length <= 1" class="ui-grid-pager-row-count-label">{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}</span></div><div class="ui-grid-pager-count-container"><div class="ui-grid-pager-count"><span ng-show="grid.options.totalItems > 0">{{ 1 + paginationApi.getFirstRowIndex() }} <abbr ui-grid-one-bind-title="paginationThrough">-</abbr> {{ 1 + paginationApi.getLastRowIndex() }} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>'),a.put("ui-grid/columnResizer",'<div ui-grid-column-resizer ng-if="grid.options.enableColumnResizing" class="ui-grid-column-resizer" col="col" position="right" render-index="renderIndex" unselectable="on"></div>'),a.put("ui-grid/gridFooterSelectedItems",'<span ng-if="grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected">({{"search.selectedItems" | t}} {{grid.selection.selectedCount}})</span>'),a.put("ui-grid/selectionHeaderCell",'<div><!-- <div class="ui-grid-vertical-bar">&nbsp;</div> --><div class="ui-grid-cell-contents" col-index="renderIndex"><ui-grid-selection-select-all-buttons ng-if="grid.options.enableSelectAll"></ui-grid-selection-select-all-buttons></div></div>'),a.put("ui-grid/selectionRowHeader",'<div class="ui-grid-disable-selection"><div class="ui-grid-cell-contents"><ui-grid-selection-row-header-buttons></ui-grid-selection-row-header-buttons></div></div>'),a.put("ui-grid/selectionRowHeaderButtons",'<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{\'ui-grid-row-selected\': row.isSelected}" ng-click="selectButtonClick(row, $event)">&nbsp;</div>'),a.put("ui-grid/selectionSelectAllButtons",'<div class="ui-grid-selection-row-header-buttons ui-grid-icon-ok" ng-class="{\'ui-grid-all-selected\': grid.selection.selectAll}" ng-click="headerButtonClick($event)"></div>'),a.put("ui-grid/treeBaseExpandAllButtons",'<div class="ui-grid-tree-base-row-header-buttons" ng-class="{\'ui-grid-icon-minus-squared\': grid.treeBase.numberLevels > 0 && grid.treeBase.expandAll, \'ui-grid-icon-plus-squared\': grid.treeBase.numberLevels > 0 && !grid.treeBase.expandAll}" ng-click="headerButtonClick($event)"></div>'),a.put("ui-grid/treeBaseHeaderCell",'<div><div class="ui-grid-cell-contents" col-index="renderIndex"><ui-grid-tree-base-expand-all-buttons ng-if="grid.options.enableExpandAll"></ui-grid-tree-base-expand-all-buttons></div></div>'),a.put("ui-grid/treeBaseRowHeader",'<div class="ui-grid-cell-contents"><ui-grid-tree-base-row-header-buttons></ui-grid-tree-base-row-header-buttons></div>'),a.put("ui-grid/treeBaseRowHeaderButtons","<div class=\"ui-grid-tree-base-row-header-buttons\" ng-class=\"{'ui-grid-tree-base-header': row.treeLevel > -1 }\" ng-click=\"treeButtonClick(row, $event)\"><i ng-class=\"{'ui-grid-icon-minus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\"></i> &nbsp;</div>"),a.put("ui-grid/cellTitleValidator",'<div class="ui-grid-cell-contents" ng-class="{invalid:grid.validate.isInvalid(row.entity,col.colDef)}" title="{{grid.validate.getTitleFormattedErrors(row.entity,col.colDef)}}">{{COL_FIELD CUSTOM_FILTERS}}</div>'),a.put("ui-grid/cellTooltipValidator",'<div class="ui-grid-cell-contents" ng-class="{invalid:grid.validate.isInvalid(row.entity,col.colDef)}" tooltip-html-unsafe="{{grid.validate.getFormattedErrors(row.entity,col.colDef)}}" tooltip-enable="grid.validate.isInvalid(row.entity,col.colDef)" tooltip-append-to-body="true" tooltip-placement="top" title="TOOLTIP">{{COL_FIELD CUSTOM_FILTERS}}</div>')}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.svg b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.svg
deleted file mode 100644
index 9d2e03c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.svg
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata>Copyright (C) 2016 by original authors @ fontello.com</metadata>
-<defs>
-<font id="ui-grid" horiz-adv-x="1000" >
-<font-face font-family="ui-grid" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
-<missing-glyph horiz-adv-x="1000" />
-<glyph glyph-name="plus-squared" unicode="&#xc350;" d="M714 314v72q0 14-10 25t-25 10h-179v179q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-179h-178q-15 0-25-10t-11-25v-72q0-14 11-25t25-10h178v-179q0-14 11-25t25-11h71q15 0 25 11t11 25v179h179q14 0 25 10t10 25z m143 304v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
-
-<glyph glyph-name="minus-squared" unicode="&#xc351;" d="M714 314v72q0 14-10 25t-25 10h-500q-15 0-25-10t-11-25v-72q0-14 11-25t25-10h500q14 0 25 10t10 25z m143 304v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
-
-<glyph glyph-name="search" unicode="&#xc352;" d="M643 386q0 103-73 176t-177 74-177-74-73-176 73-177 177-73 177 73 73 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 153-31 125-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
-
-<glyph glyph-name="cancel" unicode="&#xc353;" d="M724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
-
-<glyph glyph-name="info-circled" unicode="&#xc354;" d="M571 82v89q0 8-5 13t-12 5h-54v286q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h53v-179h-53q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h250q7 0 12 5t5 13z m-71 500v89q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h107q8 0 13 5t5 13z m357-232q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
-
-<glyph glyph-name="lock" unicode="&#xc355;" d="M179 421h285v108q0 59-42 101t-101 41-101-41-41-101v-108z m464-53v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h17v108q0 102 74 176t176 74 177-74 73-176v-108h18q23 0 38-15t16-38z" horiz-adv-x="642.9" />
-
-<glyph glyph-name="lock-open" unicode="&#xc356;" d="M929 529v-143q0-15-11-25t-25-11h-36q-14 0-25 11t-11 25v143q0 59-41 101t-101 41-101-41-42-101v-108h53q23 0 38-15t16-38v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h375v108q0 103 73 176t177 74 176-74 74-176z" horiz-adv-x="928.6" />
-
-<glyph glyph-name="pencil" unicode="&#xc357;" d="M203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
-
-<glyph glyph-name="down-dir" unicode="&#xc358;" d="M571 457q0-14-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
-
-<glyph glyph-name="up-dir" unicode="&#xc359;" d="M571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25 11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" />
-
-<glyph glyph-name="left-dir" unicode="&#xc35a;" d="M357 600v-500q0-14-10-25t-26-11-25 11l-250 250q-10 11-10 25t10 25l250 250q11 11 25 11t26-11 10-25z" horiz-adv-x="357.1" />
-
-<glyph glyph-name="right-dir" unicode="&#xc35b;" d="M321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11-11 25v500q0 15 11 25t25 11 25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
-
-<glyph glyph-name="left-open" unicode="&#xc35c;" d="M654 682l-297-296 297-297q10-10 10-25t-10-25l-93-93q-11-10-25-10t-25 10l-414 415q-11 10-11 25t11 25l414 414q10 11 25 11t25-11l93-93q10-10 10-25t-10-25z" horiz-adv-x="714.3" />
-
-<glyph glyph-name="right-open" unicode="&#xc35d;" d="M618 361l-414-415q-11-10-25-10t-25 10l-93 93q-11 11-11 25t11 25l296 297-296 296q-11 11-11 25t11 25l93 93q10 11 25 11t25-11l414-414q10-11 10-25t-10-25z" horiz-adv-x="714.3" />
-
-<glyph glyph-name="angle-down" unicode="&#xc35e;" d="M600 439q0-7-6-12l-260-261q-5-5-13-5t-12 5l-260 261q-6 5-6 12t6 13l28 28q5 6 12 6t13-6l219-219 220 219q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="642.9" />
-
-<glyph glyph-name="filter" unicode="&#xc35f;" d="M783 685q9-22-8-39l-275-275v-414q0-23-22-33-7-3-14-3-15 0-25 11l-143 143q-10 11-10 25v271l-275 275q-18 17-8 39 9 22 33 22h714q23 0 33-22z" horiz-adv-x="785.7" />
-
-<glyph glyph-name="sort-alt-up" unicode="&#xc360;" d="M411 46q0-6-6-13l-178-178q-5-5-13-5-6 0-12 5l-179 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m589-71v-107q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v107q0 8 5 13t13 5h464q8 0 13-5t5-13z m-107 286v-107q0-8-5-13t-13-5h-357q-8 0-13 5t-5 13v107q0 8 5 13t13 5h357q8 0 13-5t5-13z m-107 285v-107q0-7-5-12t-13-6h-250q-8 0-13 6t-5 12v107q0 8 5 13t13 5h250q8 0 13-5t5-13z m-107 286v-107q0-8-5-13t-13-5h-143q-8 0-13 5t-5 13v107q0 8 5 13t13 5h143q8 0 13-5t5-13z" horiz-adv-x="1000" />
-
-<glyph glyph-name="sort-alt-down" unicode="&#xc361;" d="M679-25v-107q0-8-5-13t-13-5h-143q-8 0-13 5t-5 13v107q0 8 5 13t13 5h143q8 0 13-5t5-13z m-268 71q0-6-6-13l-178-178q-5-5-13-5-6 0-12 5l-179 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m375 215v-107q0-8-5-13t-13-5h-250q-8 0-13 5t-5 13v107q0 8 5 13t13 5h250q8 0 13-5t5-13z m107 285v-107q0-7-5-12t-13-6h-357q-8 0-13 6t-5 12v107q0 8 5 13t13 5h357q8 0 13-5t5-13z m107 286v-107q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v107q0 8 5 13t13 5h464q8 0 13-5t5-13z" horiz-adv-x="1000" />
-
-<glyph glyph-name="ok" unicode="&#xc362;" d="M933 534q0-22-16-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q16-15 16-38z" horiz-adv-x="1000" />
-
-<glyph glyph-name="menu" unicode="&#xc363;" d="M857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-14-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
-
-<glyph glyph-name="indent-left" unicode="&#xe800;" d="M214 546v-321q0-7-5-13t-13-5q-7 0-12 5l-161 161q-5 5-5 13t5 13l161 160q5 5 12 5 8 0 13-5t5-13z m786-428v-107q0-7-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-607q-7 0-13 5t-5 13v107q0 7 5 13t13 5h607q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-607q-7 0-13 6t-5 12v107q0 8 5 13t13 5h607q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z" horiz-adv-x="1000" />
-
-<glyph glyph-name="indent-right" unicode="&#xe801;" d="M196 386q0-8-5-13l-160-161q-5-5-13-5-7 0-13 5t-5 13v321q0 8 5 13t13 5q8 0 13-5l160-160q5-5 5-13z m804-268v-107q0-7-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-607q-7 0-13 5t-5 13v107q0 7 5 13t13 5h607q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-607q-7 0-13 6t-5 12v107q0 8 5 13t13 5h607q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z" horiz-adv-x="1000" />
-
-<glyph glyph-name="spin5" unicode="&#xea61;" d="M462 850c-6 0-11-5-11-11l0-183 0 0c0-6 5-11 11-11l69 0c1 0 1 0 1 0 7 0 12 5 12 11l0 183 0 0c0 6-5 11-12 11l-69 0c0 0 0 0-1 0z m250-47c-4 1-8-2-10-5l-91-158 0 0c-4-6-2-13 4-16l60-34c0-1 0-1 0-1 6-3 13-1 16 4l91 158c3 6 2 13-4 16l-61 35c-1 1-3 1-5 1z m-428-2c-2 0-4-1-6-2l-61-35c-5-3-7-10-4-16l91-157c0 0 0 0 0 0 3-6 10-8 16-5l61 35c5 4 7 11 4 16l-91 157c0 1 0 1 0 1-2 4-6 6-10 6z m620-163c-2 0-4 0-6-1l-157-91c0 0 0 0 0 0-6-3-8-10-5-16l35-61c4-5 11-7 16-4l157 91c1 0 1 0 1 0 6 3 7 11 4 16l-35 61c-2 4-6 6-10 5z m-810-4c-5 0-9-2-11-6l-35-61c-3-5-1-12 4-15l158-91 0 0c6-4 13-2 16 4l35 60c0 0 0 0 0 0 3 6 1 13-4 16l-158 91c-2 1-4 2-5 2z m712-235l0 0c-6 0-11-5-11-11l0-69c0-1 0-1 0-1 0-7 5-12 11-12l183 0 0 0c6 0 11 5 11 12l0 69c0 0 0 0 0 1 0 6-5 11-11 11l-183 0z m-794-5l0 0c-7 0-12-5-12-12l0-69c0 0 0 0 0-1 0-6 5-11 12-11l182 0 0 0c6 0 11 5 11 11l0 69c0 1 0 1 0 1 0 7-5 12-11 12l-182 0z m772-153c-4 0-8-2-10-6l-34-60c-1 0-1 0-1 0-3-6-1-13 4-16l158-91c6-3 13-1 16 4l35 61c3 5 1 12-4 15l-158 92 0 0c-2 1-4 1-6 1z m-566-5c-1 0-3 0-5-1l-157-91c0 0-1 0-1 0-5-3-7-10-4-16l35-61c3-5 10-7 16-4l157 91c0 0 0 0 0 0 6 3 8 10 5 16l-35 61c-3 3-7 6-11 5z m468-121c-2 0-4 0-6-1l-61-35c-5-4-7-11-4-16l91-157c0-1 0-1 0-1 3-6 11-7 16-4l61 35c5 3 7 10 4 16l-91 157c0 0 0 0 0 0-2 4-6 6-10 6z m-367-2c-4 0-8-2-10-6l-91-158c-3-6-1-13 4-16l61-35c5-3 12-1 15 4l92 158 0 0c3 6 1 13-5 16l-60 35c0 0 0 0 0 0-2 1-4 1-6 2z m149-58c-7 0-12-5-12-11l0-183 0 0c0-6 5-11 12-11l69 0c0 0 0 0 1 0 6 0 11 5 11 11l0 183 0 0c0 6-5 11-11 11l-69 0c-1 0-1 0-1 0z" horiz-adv-x="1000" />
-</font>
-</defs>
-</svg> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.ttf b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.ttf
deleted file mode 100644
index f33fd255..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.ttf
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.woff b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.woff
deleted file mode 100644
index 426c6115..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui-grid/ui-grid.woff
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js
deleted file mode 100644
index b09fe5b7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * angular-ui-bootstrap
- * http://angular-ui.github.io/bootstrap/
-
- * Version: 1.1.2 - 2016-02-01
- * License: MIT
- */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){a&&(b.find("span").html(""),b.find("span").append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":null)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;s.length;)s.shift()}function g(a){if(angular.isUndefined(p[a].index))return p[a];for(var b=0,c=p.length;c>b;++b)if(p[b].index===a)return p[b]}function h(c,d,g){t||(angular.extend(c,{direction:g,active:!0}),angular.extend(o.currentSlide||{},{direction:g,active:!1}),e.enabled(b)&&!a.$currentTransition&&c.$element&&o.slides.length>1&&(c.$element.data(q,c.direction),o.currentSlide&&o.currentSlide.$element&&o.currentSlide.$element.data(q,c.direction),a.$currentTransition=!0,e.on("addClass",c.$element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),s.length)){var d=s.pop(),g=a.indexOfSlide(d),i=g>o.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})),o.currentSlide=c,r=d,k())}function i(){m&&(c.cancel(m),m=null)}function j(b){b.length||(a.$currentTransition=null,f())}function k(){i();var b=+a.interval;!isNaN(b)&&b>0&&(m=c(l,b))}function l(){var b=+a.interval;n&&!isNaN(b)&&b>0&&p.length?a.next():a.pause()}var m,n,o=this,p=o.slides=a.slides=[],q="uib-slideDirection",r=-1,s=[];o.currentSlide=null;var t=!1;o.addSlide=function(b,c){b.$element=c,p.push(b),1===p.length||b.active?(a.$currentTransition&&(a.$currentTransition=null),o.select(p[p.length-1]),1===p.length&&a.play()):b.active=!1},o.getCurrentIndex=function(){return o.currentSlide&&angular.isDefined(o.currentSlide.index)?+o.currentSlide.index:r},o.next=a.next=function(){var b=(o.getCurrentIndex()+1)%p.length;return 0===b&&a.noWrap()?void a.pause():o.select(g(b),"next")},o.prev=a.prev=function(){var b=o.getCurrentIndex()-1<0?p.length-1:o.getCurrentIndex()-1;return a.noWrap()&&b===p.length-1?void a.pause():o.select(g(b),"prev")},o.removeSlide=function(a){angular.isDefined(a.index)&&p.sort(function(a,b){return+a.index>+b.index});var b=s.indexOf(a);-1!==b&&s.splice(b,1);var c=p.indexOf(a);p.splice(c,1),d(function(){p.length>0&&a.active?c>=p.length?o.select(p[c-1]):o.select(p[c]):r>c&&r--}),0===p.length&&(o.currentSlide=null,f())},o.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>o.getCurrentIndex()?"next":"prev"),b&&b!==o.currentSlide&&!a.$currentTransition?h(b,d,c):b&&b!==o.currentSlide&&a.$currentTransition&&(s.push(b),b.active=!1)},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:p.indexOf(a)},a.isActive=function(a){return o.currentSlide===a},a.pause=function(){a.noPause||(n=!1,i())},a.play=function(){n||(n=!0,k())},a.$on("$destroy",function(){t=!0,i()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",k),a.$watchCollection("slides",j)}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h<a.length;h++)g?("'"===a[h]&&(h+1<a.length&&"'"===a[h+1]?(a[h+1]="$",e[h+1]=""):(e[h]="",g=!1)),a[h]="$"):"'"===a[h]&&(a[h]="$",e[h]="",g=!0);a=a.join("")}return angular.forEach(n,function(d){var f=a.indexOf(d.key);if(f>-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));return e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,"")),c.apply?b+c.apply.call(null,a):b},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('<div style="position: absolute; top: -9999px; width: 50px; height: 50px; overflow: scroll;"></div>');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css({top:"",bottom:"",right:"",left:"",margin:""});var h="border-"+c[0]+"-width",i=b.getComputedStyle(g)[h],j="border-";j+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],j+="-radius";var k=b.getComputedStyle(f?d:a)[j],l={top:"auto",bottom:"auto",left:"auto",right:"auto",margin:0};switch(c[0]){case"top":l.bottom=f?"0":"-"+i;break;case"bottom":l.top=f?"0":"-"+i;break;case"left":l.right=f?"0":"-"+i;break;case"right":l.left=f?"0":"-"+i}l[c[1]]=k,angular.element(g).css(l)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDateParser",function(a,b,c,d,e,f,g,h,i,j){var k=this,l={$setViewValue:angular.noop},m={},n=[];this.modes=["day","month","year"],b.datepickerOptions?angular.forEach(["formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"],function(b){switch(b){case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":k[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":k[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?k.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?k[b]=j.fromTimezone(new Date(a),m.timezone):k[b]=new Date(g(a,"medium")):k[b]=null,k.refreshView()}):k[b]=h[b]?j.fromTimezone(new Date(h[b]),m.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){k[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&k.modes.indexOf(a.datepickerMode)<k.modes.indexOf(k[b])||"maxMode"===b&&k.modes.indexOf(a.datepickerMode)>k.modes.indexOf(k[b]))&&(a.datepickerMode=k[b])}):k[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(this.activeDate=j.fromTimezone(a.datepickerOptions.initDate,m.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())})):this.activeDate=new Date}}):(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){k[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c]}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){k[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c]}),angular.isDefined(b.startingDay)?k.startingDay=a.$parent.$eval(b.startingDay):angular.isNumber(h.startingDay)?k.startingDay=h.startingDay:k.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?k[c]=j.fromTimezone(new Date(a),m.timezone):k[c]=new Date(g(a,"medium")):k[c]=null,k.refreshView()})):k[c]=h[c]?j.fromTimezone(new Date(h[c]),m.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?n.push(a.$parent.$watch(b[c],function(d){k[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&k.modes.indexOf(a.datepickerMode)<k.modes.indexOf(k[c])||"maxMode"===c&&k.modes.indexOf(a.datepickerMode)>k.modes.indexOf(k[c]))&&(a.datepickerMode=k[c])})):k[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)?(this.activeDate=j.fromTimezone(a.$parent.$eval(b.initDate),m.timezone)||new Date,n.push(a.$parent.$watch(b.initDate,function(a){a&&(l.$isEmpty(l.$modelValue)||l.$invalid)&&(k.activeDate=j.fromTimezone(a,m.timezone),k.refreshView())}))):this.activeDate=new Date),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&n.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,k.refreshView()})),a.isActive=function(b){return 0===k.compare(b.date,k.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){l=a,m=a.$options||h.ngModelOptions,l.$modelValue&&(this.activeDate=l.$modelValue),l.$render=function(){k.render()}},this.render=function(){if(l.$viewValue){var a=new Date(l.$viewValue),b=!isNaN(a);b?this.activeDate=j.fromTimezone(a,m.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=l.$viewValue?new Date(l.$viewValue):null;b=j.fromTimezone(b,m.timezone),l.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=l.$viewValue?new Date(l.$viewValue):null;d=j.fromTimezone(d,m.timezone);var e={date:b,label:j.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),current:0===this.compare(b,new Date),customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=e),k.activeDate&&0===this.compare(e.date,k.activeDate)&&(a.activeDt=e),e},this.isDisabled=function(c){return a.disabled||this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===k.minMode){var c=l.$viewValue?j.fromTimezone(new Date(l.$viewValue),m.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=j.toTimezone(c,m.timezone),l.$setViewValue(c),l.$render()}else k.activeDate=b,a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=k.activeDate.getFullYear()+a*(k.step.years||0),c=k.activeDate.getMonth()+a*(k.step.months||0);k.activeDate.setFullYear(b,c,1),k.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===k.maxMode&&1===b||a.datepickerMode===k.minMode&&-1===b||(a.datepickerMode=k.modes[k.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var o=function(){k.element[0].focus()};a.$on("uib:datepicker.focus",o),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),k.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(k.isDisabled(k.activeDate))return;a.select(k.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(k.handleKeyDown(c,b),k.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;n.length;)n.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d;
-},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$parse","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function o(b){var c=j.parse(b,t,a.date);if(isNaN(c))for(var d=0;d<E.length;d++)if(c=j.parse(b,E[d],a.date),!isNaN(c))return c;return c}function p(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=o(a);if(!isNaN(b))return j.toTimezone(b,C.timezone)}return B.$options&&B.$options.allowInvalid?a:void 0}function q(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(o(b)):!1:!0):!0}function r(c){if(a.isOpen||!a.disabled){var d=D[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function s(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}var t,u,v,w,x,y,z,A,B,C,D,E,F={},G=!1,H=[];a.watchData={},this.init=function(h){if(B=h,C=h.$options||m.ngModelOptions,u=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):k.closeOnDateSelection,v=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):k.appendToBody,w=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):k.onOpenFocus,x=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:k.datepickerPopupTemplateUrl,y=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:k.datepickerTemplateUrl,E=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):k.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):k.showButtonBar,k.html5Types[c.type]?(t=k.html5Types[c.type],G=!0):(t=c.uibDatepickerPopup||k.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||k.datepickerPopup;if(c!==t&&(t=c,B.$modelValue=null,!t))throw new Error("uibDatepickerPopup must have a date format specified.")})),!t)throw new Error("uibDatepickerPopup must have a date format specified.");if(G&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");z=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),a.ngModelOptions=angular.copy(C),a.ngModelOptions.timezone=null,z.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":x}),A=angular.element(z.children()[0]),A.attr("template-url",y),G&&"month"===c.type&&(A.attr("datepicker-mode",'"month"'),A.attr("min-mode","month")),a.datepickerOptions&&angular.forEach(a.datepickerOptions,function(a,b){-1===["minDate","maxDate","minMode","maxMode","initDate","datepickerMode"].indexOf(b)?A.attr(n(b),a):A.attr(n(b),"datepickerOptions."+b)}),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]),f={get:function(){return d(a.$parent)}};if(A.attr(n(b),"watchData."+b),"datepickerMode"===b){var g=d.assign;f.set=function(b){g(a.$parent,b)}}Object.defineProperty(a.watchData,b,f)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){var d=e(c[b]);H.push(a.$parent.$watch(d,function(c){"minDate"===b||"maxDate"===b?(null===c?F[b]=null:angular.isDate(c)?F[b]=j.fromTimezone(new Date(c),C.timezone):F[b]=new Date(i(c,"medium")),a.watchData[b]=null===c?null:F[b]):a.watchData[b]=j.fromTimezone(new Date(c),C.timezone)})),A.attr(n(b),"watchData."+b)}}),c.dateDisabled&&A.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&A.attr(n(a),c[a])}),c.customClass&&A.attr("custom-class","customClass({ date: date, mode: mode })"),G?B.$formatters.push(function(b){return a.date=j.fromTimezone(b,C.timezone),b}):(B.$$parserName="date",B.$validators.date=q,B.$parsers.unshift(p),B.$formatters.push(function(b){return B.$isEmpty(b)?(a.date=b,b):(a.date=j.fromTimezone(b,C.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),j.filter(a.date,t))})),B.$viewChangeListeners.push(function(){a.date=o(B.$viewValue)}),b.on("keydown",s),D=d(z)(a),z.remove(),v?f.find("body").append(D):b.after(D),a.$on("$destroy",function(){for(a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),D.remove(),b.off("keydown",s),f.off("click",r);H.length;)H.shift()()})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,F.minDate)<0||a.watchData.maxDate&&a.compare(b,F.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?j.filter(a.date,t):null;b.val(d),B.$setViewValue(d),u&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&H.push(a.$parent.$watch(e(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(c){c?a.disabled?a.isOpen=!1:(a.position=v?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){w&&a.$broadcast("uib:datepicker.focus"),f.on("click",r)},0,!1)):f.off("click",r)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b;if(g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var x=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(x),n.dropdownMenu=x}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animateCss","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a(d,{addClass:e.modalInClass}).start(),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a(d,{removeClass:e.modalInClass}).start().then(g):g()}))}return{replace:!0,templateUrl:"uib/template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animate","$animateCss","$document",function(a,b,c,d,e){return{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(f,g,h){g.addClass(h.windowClass||""),g.addClass(h.windowTopClass||""),f.size=h.size,f.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},g.on("click",f.close),f.$isRendered=!0;var i=b.defer();h.$observe("modalRender",function(a){"true"===a&&i.resolve()}),i.promise.then(function(){var i=null;h.modalInClass&&(i=d(g,{addClass:h.modalInClass}).start(),f.$on(a.NOW_CLOSING_EVENT,function(a,b){var e=b();d?d(g,{removeClass:h.modalInClass}).start().then(e):c.removeClass(g,h.modalInClass).then(e)})),b.when(i).then(function(){if(!e[0].activeElement||!g[0].contains(e[0].activeElement)){var a=g[0].querySelector("[autofocus]");a?a.focus():g[0].focus()}});var j=a.getTop();j&&a.modalRendered(j.key)})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap",function(a,b,c,d,e,f,g,h){function i(){for(var a=-1,b=t.keys(),c=0;c<b.length;c++)t.get(b[c]).value.backdrop&&(a=c);return a}function j(a,b){var c=t.get(a).value,d=c.appendTo;t.remove(a),m(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||s;u.remove(b,a),d.toggleClass(b,u.hasKey(b)),k(!0)},c.closedDeferred),l(),b&&b.focus?b.focus():d.focus&&d.focus()}function k(a){var b;t.length()>0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(a,c,d,e){function g(){g.done||(g.done=!0,b(a,{event:"leave"}).start().then(function(){a.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('<div uib-modal-window="modal-window"></div>');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i={};e.controller&&(i.$scope=d,i.$uibModalInstance=p,angular.forEach(a[1],function(a,b){i[b]=a}),g=f(e.controller,i),e.controllerAs&&(e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),d[e.controllerAs]=g)),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(e,f){b.ngModelCtrl=e,b.config=f,e.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(a(d.itemsPerPage),function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=f.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var m=f(h,h,h===a);c.push(m)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var n=f(d-1,"...",!1);c.unshift(n)}if(l){if(3===d){var o=f(2,"2",!1);c.unshift(o)}var p=f(1,"1",!1);c.unshift(p)}}if(b>e){if(!l||b-2>e){var q=f(e+1,"...",!1);c.push(q)}if(l){if(e===b-2){var r=f(b-1,b-1,!1);c.push(r)}var s=f(b,b,!1);c.push(s)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var m=this.render;this.render=function(){m(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen"origin-scope="origScope" style="visibility: hidden; display: block; top: -9999px; left: -9999px;"></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){M.isOpen?q():m()}function m(){(!L||a.$eval(d[k+"Enable"]))&&(u(),x(),M.popupDelay?G||(G=g(r,M.popupDelay,!1)):r())}function q(){s(),M.popupCloseDelay?H||(H=g(t,M.popupCloseDelay,!1)):t()}function r(){return s(),u(),M.content?(v(),void M.$evalAsync(function(){M.isOpen=!0,y(!0),R()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){M&&M.$evalAsync(function(){M&&(M.isOpen=!1,y(!1),M.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=M.$new(),D=c(E,function(a){J?h.find("body").append(a):b.after(a);
-}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){M.title=d[k+"Title"],P?M.content=P(a):M.content=d[e],M.popupClass=d[k+"Class"],M.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);M.popupDelay=isNaN(b)?n.popupDelay:b,M.popupCloseDelay=isNaN(c)?n.popupCloseDelay:c}function y(b){O&&angular.isFunction(O.assign)&&O.assign(a,b)}function z(){Q.length=0,P?(Q.push(a.$watch(P,function(a){M.content=a,!a&&M.isOpen&&t()})),Q.push(E.$watch(function(){N||(N=!0,E.$$postDigest(function(){N=!1,M&&M.isOpen&&R()}))}))):Q.push(d.$observe(e,function(a){M.content=a,!a&&M.isOpen?t():R()})),Q.push(d.$observe(k+"Title",function(a){M.title=a,M.isOpen&&R()})),Q.push(d.$observe(k+"Placement",function(a){M.placement=a?a:n.placement,M.isOpen&&R()}))}function A(){Q.length&&(angular.forEach(Q,function(a){a()}),Q.length=0)}function B(a){M&&M.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];S(),K=p(a),"none"!==K.show&&K.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===K.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(K.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J=angular.isDefined(n.appendToBody)?n.appendToBody:!1,K=p(void 0),L=angular.isDefined(d[k+"Enable"]),M=a.$new(!0),N=!1,O=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,P=n.useContentExp?l(d[e]):!1,Q=[],R=function(){D&&D.html()&&(I||(I=g(function(){D.css({top:0,left:0});var a=i.positionElements(b,D,M.placement,J);D.css({top:a.top+"px",left:a.left+"px",visibility:"visible"}),n.placementClassPrefix&&D.removeClass("top bottom left right"),D.removeClass(n.placementClassPrefix+"top "+n.placementClassPrefix+"top-left "+n.placementClassPrefix+"top-right "+n.placementClassPrefix+"bottom "+n.placementClassPrefix+"bottom-left "+n.placementClassPrefix+"bottom-right "+n.placementClassPrefix+"left "+n.placementClassPrefix+"left-top "+n.placementClassPrefix+"left-bottom "+n.placementClassPrefix+"right "+n.placementClassPrefix+"right-top "+n.placementClassPrefix+"right-bottom");var c=a.placement.split("-");D.addClass(c[0]+" "+n.placementClassPrefix+a.placement),i.positionArrow(D,a.placement),I=null},0,!1)))};M.origScope=a,M.isOpen=!1,o.add(M,{close:t}),M.contentExp=function(){return M.content},d.$observe("disabled",function(a){a&&s(),a&&M.isOpen&&t()}),O&&a.$watch(O,function(a){M&&!a===M.isOpen&&j()});var S=function(){K.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),K.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var T=a.$eval(d[k+"Animation"]);M.animation=angular.isDefined(T)?!!T:n.animation;var U,V=k+"AppendToBody";U=V in d&&void 0===d[V]?!0:a.$eval(d[V]),J=angular.isDefined(U)?U:J,a.$on("$destroy",function(){S(),w(),o.remove(M),M=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}else c.addClass("top");b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect(),a.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e===c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on("$destroy",function(){d=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"uib/template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:"uib/template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)<x};var A=g.secondStep;c.secondStep&&s.push(a.$parent.$watch(d(c.secondStep),function(a){A=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&s.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&s.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,t.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(r.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1);var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("<div></div>"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("<div uib-typeahead-popup></div>");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h<f.length;h++)e[M.itemName]=f[h],N.matches.push({id:V(h),label:M.viewMapper(N,e),model:f[h]});if(N.query=c,o(),b.attr("aria-expanded",!0),G&&1===N.matches.length&&W(c,0)&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(0,d)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(0,d)),I){var i=N.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(a){if(0!==N.matches.length&&-1!==r.indexOf(a.which)){if(-1===N.activeIdx&&(9===a.which||13===a.which))return U(),void N.$digest();a.preventDefault();var b;switch(a.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,a)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,a)});break;case 27:a.stopPropagation(),U(),N.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),b=S.find("li")[N.activeIdx],b.parentNode.scrollTop=b.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(a){b[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(U(),j.$$phase||N.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div class="panel" ng-class="panelClass || \'panel-default\'">\n <div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div class="uib-datepicker" ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table class="uib-daypicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n');
-}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table class="uib-monthpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'<div>\n <ul class="uib-datepicker-popup dropdown-menu" dropdown-nested ng-if="isOpen" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\')" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close()">{{ getText(\'close\') }}</button>\n </li>\n </ul>\n</div>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table class="uib-yearpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'<div class="modal-backdrop"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog {{size ? \'modal-\' + size : \'\'}}"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}" aria-valuetext="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="{active: active, disabled: disabled}" class="uib-tab">\n <a href ng-click="select()" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane" \n ng-repeat="tab in tabs" \n ng-class="{active: tab.active}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input style="width:50px;" type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input style="width:50px;" type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input style="width:50px;" type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>')}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-datepicker-popup.dropdown-menu{display:block;}.uib-button-bar{padding:10px 9px 2px;}</style>')}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>')}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>')}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.2.4.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.2.4.min.js
deleted file mode 100644
index 0eab2963..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-bootstrap-tpls-1.2.4.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * angular-ui-bootstrap
- * http://angular-ui.github.io/bootstrap/
-
- * Version: 1.2.4 - 2016-03-06
- * License: MIT
- */angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.debounce","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/popup.html","uib/template/datepicker/year.html","uib/template/modal/backdrop.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(a,b,c,d){var e=d.has("$animateCss")?d.get("$animateCss"):null;return{link:function(d,f,g){function h(){f.hasClass("collapse")&&f.hasClass("in")||b.resolve(l(d)).then(function(){f.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),e?e(f,{addClass:"in",easing:"ease",to:{height:f[0].scrollHeight+"px"}}).start()["finally"](i):a.addClass(f,"in",{to:{height:f[0].scrollHeight+"px"}}).then(i)})}function i(){f.removeClass("collapsing").addClass("collapse").css({height:"auto"}),m(d)}function j(){return f.hasClass("collapse")||f.hasClass("in")?void b.resolve(n(d)).then(function(){f.css({height:f[0].scrollHeight+"px"}).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),e?e(f,{removeClass:"in",to:{height:"0"}}).start()["finally"](k):a.removeClass(f,"in",{to:{height:"0"}}).then(k)}):k()}function k(){f.css({height:"0"}),f.removeClass("collapsing").addClass("collapse"),o(d)}var l=c(g.expanding),m=c(g.expanded),n=c(g.collapsing),o=c(g.collapsed);d.$eval(g.uibCollapse)||f.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css({height:"auto"}),d.$watch(g.uibCollapse,function(a){a?j():h()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(c){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.openClass=c.openClass||"panel-open",a.panelClass=c.panelClass||"panel-default",a.$watch("isOpen",function(c){b.toggleClass(a.openClass,!!c),c&&d.closeOthers(a)}),a.toggleOpen=function(b){a.isDisabled||b&&32!==b.which||(a.isOpen=!a.isOpen)};var e="accordiongroup-"+a.$id+"-"+Math.floor(1e4*Math.random());a.headingId=e+"-tab",a.panelId=e+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.uibAccordionTransclude]},function(a){if(a){var c=angular.element(b[0].querySelector("[uib-accordion-header]"));c.html(""),c.append(a)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$attrs","$interpolate","$timeout",function(a,b,c,d){a.closeable=!!b.close;var e=angular.isDefined(b.dismissOnTimeout)?c(b.dismissOnTimeout)(a.$parent):null;e&&d(function(){a.close()},parseInt(e,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",templateUrl:function(a,b){return b.templateUrl||"uib/template/alert/alert.html"},transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(a){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(b,c,d,e){var f=e[0],g=e[1],h=a(d.uibUncheckable);c.find("input").css({display:"none"}),g.$render=function(){c.toggleClass(f.activeClass,angular.equals(g.$modelValue,b.$eval(d.uibBtnRadio)))},c.on(f.toggleEvent,function(){if(!d.disabled){var a=c.hasClass(f.activeClass);(!a||angular.isDefined(d.uncheckable))&&b.$apply(function(){g.$setViewValue(a?null:b.$eval(d.uibBtnRadio)),g.$render()})}}),d.uibUncheckable&&b.$watch(h,function(a){d.$set("uncheckable",a?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){return angular.isDefined(b)?a.$eval(b):c}var h=d[0],i=d[1];b.find("input").css({display:"none"}),i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.on(h.toggleEvent,function(){c.disabled||a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(a,b,c,d,e){function f(){for(;t.length;)t.shift()}function g(a){for(var b=0;b<q.length;b++)q[b].slide.active=b===a}function h(c,d,i){if(!u){if(angular.extend(c,{direction:i}),angular.extend(q[s].slide||{},{direction:i}),e.enabled(b)&&!a.$currentTransition&&q[d].element&&p.slides.length>1){q[d].element.data(r,c.direction);var j=p.getCurrentIndex();angular.isNumber(j)&&q[j].element&&q[j].element.data(r,c.direction),a.$currentTransition=!0,e.on("addClass",q[d].element,function(b,c){if("close"===c&&(a.$currentTransition=null,e.off("addClass",b),t.length)){var d=t.pop().slide,g=d.index,i=g>p.getCurrentIndex()?"next":"prev";f(),h(d,g,i)}})}a.active=c.index,s=c.index,g(d),l()}}function i(a){for(var b=0;b<q.length;b++)if(q[b].slide===a)return b}function j(){n&&(c.cancel(n),n=null)}function k(b){b.length||(a.$currentTransition=null,f())}function l(){j();var b=+a.interval;!isNaN(b)&&b>0&&(n=c(m,b))}function m(){var b=+a.interval;o&&!isNaN(b)&&b>0&&q.length?a.next():a.pause()}var n,o,p=this,q=p.slides=a.slides=[],r="uib-slideDirection",s=a.active,t=[],u=!1;p.addSlide=function(b,c){q.push({slide:b,element:c}),q.sort(function(a,b){return+a.slide.index>+b.slide.index}),(b.index===a.active||1===q.length&&!angular.isNumber(a.active))&&(a.$currentTransition&&(a.$currentTransition=null),s=b.index,a.active=b.index,g(s),p.select(q[i(b)]),1===q.length&&a.play())},p.getCurrentIndex=function(){for(var a=0;a<q.length;a++)if(q[a].slide.index===s)return a},p.next=a.next=function(){var b=(p.getCurrentIndex()+1)%q.length;return 0===b&&a.noWrap()?void a.pause():p.select(q[b],"next")},p.prev=a.prev=function(){var b=p.getCurrentIndex()-1<0?q.length-1:p.getCurrentIndex()-1;return a.noWrap()&&b===q.length-1?void a.pause():p.select(q[b],"prev")},p.removeSlide=function(b){var c=i(b),d=t.indexOf(q[c]);-1!==d&&t.splice(d,1),q.splice(c,1),q.length>0&&s===c?c>=q.length?(s=q.length-1,a.active=s,g(s),p.select(q[q.length-1])):(s=c,a.active=s,g(s),p.select(q[c])):s>c&&(s--,a.active=s),0===q.length&&(s=null,a.active=null,f())},p.select=a.select=function(b,c){var d=i(b.slide);void 0===c&&(c=d>p.getCurrentIndex()?"next":"prev"),b.slide.index===s||a.$currentTransition?b&&b.slide.index!==s&&a.$currentTransition&&t.push(q[d]):h(b.slide,d,c)},a.indexOfSlide=function(a){return+a.slide.index},a.isActive=function(b){return a.active===b.slide.index},a.pause=function(){a.noPause||(o=!1,j())},a.play=function(){o||(o=!0,l())},a.$on("$destroy",function(){u=!0,j()}),a.$watch("noTransition",function(a){e.enabled(b,!a)}),a.$watch("interval",l),a.$watchCollection("slides",k),a.$watch("active",function(a){if(angular.isNumber(a)&&s!==a){for(var b=0;b<q.length;b++)if(q[b].slide.index===a){a=b;break}var c=q[a];c&&(s=a,g(a),p.select(q[a]))}})}]).directive("uibCarousel",function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",function(){return{require:"^uibCarousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)})}}}).animation(".item",["$animateCss",function(a){function b(a,b,c){a.removeClass(b),c&&c()}var c="uib-slideDirection";return{beforeAddClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i+" "+h,f);return d.addClass(h),a(d,{addClass:i}).start().done(j),function(){g=!0}}f()},beforeRemoveClass:function(d,e,f){if("active"===e){var g=!1,h=d.data(c),i="next"===h?"left":"right",j=b.bind(this,d,i,f);return a(d,{addClass:i}).start().done(j),function(){g=!0}}f()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter",function(a,b,c,d){function e(a,b){var c=[],e=a.split(""),f=a.indexOf("'");if(f>-1){var g=!1;a=a.split("");for(var h=f;h<a.length;h++)g?("'"===a[h]&&(h+1<a.length&&"'"===a[h+1]?(a[h+1]="$",e[h+1]=""):(e[h]="",g=!1)),a[h]="$"):"'"===a[h]&&(a[h]="$",e[h]="",g=!0);a=a.join("")}return angular.forEach(n,function(d){var f=a.indexOf(d.key);if(f>-1){a=a.split(""),e[f]="("+d.regex+")",a[f]="$";for(var g=f+1,h=f+d.key.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,key:d.key,apply:d[b],matcher:d.regex})}}),{regex:new RegExp("^"+e.join("")+"$"),map:d(c,"index")}}function f(a,b,c){return 1>c?!1:1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}function g(a){return parseInt(a,10)}function h(a,b){return a&&b?l(a,b):a}function i(a,b){return a&&b?l(a,b,!0):a}function j(a,b){var c=Date.parse("Jan 01, 1970 00:00:00 "+a)/6e4;return isNaN(c)?b:c}function k(a,b){return a=new Date(a.getTime()),a.setMinutes(a.getMinutes()+b),a}function l(a,b,c){c=c?-1:1;var d=j(b,a.getTimezoneOffset());return k(a,c*(d-a.getTimezoneOffset()))}var m,n,o=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){m=b.id,this.parsers={},this.formatters={},n=[{key:"yyyy",regex:"\\d{4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(a){this.year=+a+2e3},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(a){this.year=+a},formatter:function(a){var b=new Date;return b.setFullYear(Math.abs(a.getFullYear())),c(b,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){var b=a.getMonth();return/^[0-9]$/.test(b)?c(a,"MM"):c(a,"M")}},{key:"MMMM",regex:b.DATETIME_FORMATS.MONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)},formatter:function(a){return c(a,"MMMM")}},{key:"MMM",regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)},formatter:function(a){return c(a,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1},formatter:function(a){return c(a,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){var b=a.getDate();return/^[1-9]$/.test(b)?c(a,"dd"):c(a,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a},formatter:function(a){return c(a,"d")}},{key:"EEEE",regex:b.DATETIME_FORMATS.DAY.join("|"),formatter:function(a){return c(a,"EEEE")}},{key:"EEE",regex:b.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(a){return c(a,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a},formatter:function(a){return c(a,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a},formatter:function(a){return c(a,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a},formatter:function(a){return c(a,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a},formatter:function(a){return c(a,"s")}},{key:"a",regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)},formatter:function(a){return c(a,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(a){var b=a.match(/([+-])(\d{2})(\d{2})/),c=b[1],d=b[2],e=b[3];this.hours+=g(c+d),this.minutes+=g(c+e)},formatter:function(a){return c(a,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(a){return c(a,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(a){return c(a,"w")}},{key:"GGGG",regex:b.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(a){return c(a,"GGGG")}},{key:"GGG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GGG")}},{key:"GG",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"GG")}},{key:"G",regex:b.DATETIME_FORMATS.ERAS.join("|"),formatter:function(a){return c(a,"G")}}]},this.init(),this.filter=function(a,c){if(!angular.isDate(a)||isNaN(a)||!c)return"";c=b.DATETIME_FORMATS[c]||c,b.id!==m&&this.init(),this.formatters[c]||(this.formatters[c]=e(c,"formatter"));var d=this.formatters[c],f=d.map,g=c;return f.reduce(function(b,c,d){var e=g.match(new RegExp("(.*)"+c.key));e&&angular.isString(e[1])&&(b+=e[1],g=g.replace(e[1]+c.key,""));var h=d===f.length-1?g:"";return c.apply?b+c.apply.call(null,a)+h:b+h},"")},this.parse=function(c,d,g){if(!angular.isString(c)||!d)return c;d=b.DATETIME_FORMATS[d]||d,d=d.replace(o,"\\$&"),b.id!==m&&this.init(),this.parsers[d]||(this.parsers[d]=e(d,"apply"));var h=this.parsers[d],i=h.regex,j=h.map,k=c.match(i),l=!1;if(k&&k.length){var n,p;angular.isDate(g)&&!isNaN(g.getTime())?n={year:g.getFullYear(),month:g.getMonth(),date:g.getDate(),hours:g.getHours(),minutes:g.getMinutes(),seconds:g.getSeconds(),milliseconds:g.getMilliseconds()}:(g&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var q=1,r=k.length;r>q;q++){var s=j[q-1];"Z"===s.matcher&&(l=!0),s.apply&&s.apply.call(n,k[q])}var t=l?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,u=l?Date.prototype.setUTCHours:Date.prototype.setHours;return f(n.year,n.month,n.date)&&(!angular.isDate(g)||isNaN(g.getTime())||l?(p=new Date(0),t.call(p,n.year,n.month,n.date),u.call(p,n.hours||0,n.minutes||0,n.seconds||0,n.milliseconds||0)):(p=new Date(g),t.call(p,n.year,n.month,n.date),u.call(p,n.hours,n.minutes,n.seconds,n.milliseconds))),p}},this.toTimezone=h,this.fromTimezone=i,this.timezoneToOffset=j,this.addDateMinutes=k,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(a){var b=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,c=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(d,e){function f(a,b,c){i.push(a),j.push({scope:a,element:b}),o.forEach(function(b,c){g(b,a)}),a.$on("$destroy",h)}function g(b,d){var e=b.match(c),f=d.$eval(e[1]),g=e[2],h=k[b];if(!h){var i=function(b){var c=null;j.some(function(a){var d=a.scope.$eval(m);return d===b?(c=a,!0):void 0}),h.lastActivated!==c&&(h.lastActivated&&a.removeClass(h.lastActivated.element,f),c&&a.addClass(c.element,f),h.lastActivated=c)};k[b]=h={lastActivated:null,scope:d,watchFn:i,compareWithExp:g,watcher:d.$watch(g,i)}}h.watchFn(d.$eval(g))}function h(a){var b=a.targetScope,c=i.indexOf(b);if(i.splice(c,1),j.splice(c,1),i.length){var d=i[0];angular.forEach(k,function(a){a.scope===b&&(a.watcher=d.$watch(a.compareWithExp,a.watchFn),a.scope=d)})}else k={}}var i=[],j=[],k={},l=e.uibIsClass.match(b),m=l[2],n=l[1],o=n.split(",");return f}}}]),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(a,b){var c,d={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},e={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/};return{getRawNode:function(a){return a.nodeName?a:a[0]||a},parseStyle:function(a){return a=parseFloat(a),isFinite(a)?a:0},offsetParent:function(c){function d(a){return"static"===(b.getComputedStyle(a).position||"static")}c=this.getRawNode(c);for(var e=c.offsetParent||a[0].documentElement;e&&e!==a[0].documentElement&&d(e);)e=e.offsetParent;return e||a[0].documentElement},scrollbarWidth:function(){if(angular.isUndefined(c)){var b=angular.element('<div class="uib-position-scrollbar-measure"></div>');a.find("body").append(b),c=b[0].offsetWidth-b[0].clientWidth,c=isFinite(c)?c:0,b.remove()}return c},isScrollable:function(a,c){a=this.getRawNode(a);var e=c?d.hidden:d.normal,f=b.getComputedStyle(a);return e.test(f.overflow+f.overflowY+f.overflowX)},scrollParent:function(c,e){c=this.getRawNode(c);var f=e?d.hidden:d.normal,g=a[0].documentElement,h=b.getComputedStyle(c),i="absolute"===h.position,j=c.parentElement||g;if(j===g||"fixed"===h.position)return g;for(;j.parentElement&&j!==g;){var k=b.getComputedStyle(j);if(i&&"static"!==k.position&&(i=!1),!i&&f.test(k.overflow+k.overflowY+k.overflowX))break;j=j.parentElement}return j},position:function(c,d){c=this.getRawNode(c);var e=this.offset(c);if(d){var f=b.getComputedStyle(c);e.top-=this.parseStyle(f.marginTop),e.left-=this.parseStyle(f.marginLeft)}var g=this.offsetParent(c),h={top:0,left:0};return g!==a[0].documentElement&&(h=this.offset(g),h.top+=g.clientTop-g.scrollTop,h.left+=g.clientLeft-g.scrollLeft),{width:Math.round(angular.isNumber(e.width)?e.width:c.offsetWidth),height:Math.round(angular.isNumber(e.height)?e.height:c.offsetHeight),top:Math.round(e.top-h.top),left:Math.round(e.left-h.left)}},offset:function(c){c=this.getRawNode(c);var d=c.getBoundingClientRect();return{width:Math.round(angular.isNumber(d.width)?d.width:c.offsetWidth),height:Math.round(angular.isNumber(d.height)?d.height:c.offsetHeight),top:Math.round(d.top+(b.pageYOffset||a[0].documentElement.scrollTop)),left:Math.round(d.left+(b.pageXOffset||a[0].documentElement.scrollLeft))}},viewportOffset:function(c,d,e){c=this.getRawNode(c),e=e!==!1?!0:!1;var f=c.getBoundingClientRect(),g={top:0,left:0,bottom:0,right:0},h=d?a[0].documentElement:this.scrollParent(c),i=h.getBoundingClientRect();if(g.top=i.top+h.clientTop,g.left=i.left+h.clientLeft,h===a[0].documentElement&&(g.top+=b.pageYOffset,g.left+=b.pageXOffset),g.bottom=g.top+h.clientHeight,g.right=g.left+h.clientWidth,e){var j=b.getComputedStyle(h);g.top+=this.parseStyle(j.paddingTop),g.bottom-=this.parseStyle(j.paddingBottom),g.left+=this.parseStyle(j.paddingLeft),g.right-=this.parseStyle(j.paddingRight)}return{top:Math.round(f.top-g.top),bottom:Math.round(g.bottom-f.bottom),left:Math.round(f.left-g.left),right:Math.round(g.right-f.right)}},parsePlacement:function(a){var b=e.auto.test(a);return b&&(a=a.replace(e.auto,"")),a=a.split("-"),a[0]=a[0]||"top",e.primary.test(a[0])||(a[0]="top"),a[1]=a[1]||"center",e.secondary.test(a[1])||(a[1]="center"),b?a[2]=!0:a[2]=!1,a},positionElements:function(a,c,d,f){a=this.getRawNode(a),c=this.getRawNode(c);var g=angular.isDefined(c.offsetWidth)?c.offsetWidth:c.prop("offsetWidth"),h=angular.isDefined(c.offsetHeight)?c.offsetHeight:c.prop("offsetHeight");d=this.parsePlacement(d);var i=f?this.offset(a):this.position(a),j={top:0,left:0,placement:""};if(d[2]){var k=this.viewportOffset(a,f),l=b.getComputedStyle(c),m={width:g+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),height:h+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)))};if(d[0]="top"===d[0]&&m.height>k.top&&m.height<=k.bottom?"bottom":"bottom"===d[0]&&m.height>k.bottom&&m.height<=k.top?"top":"left"===d[0]&&m.width>k.left&&m.width<=k.right?"right":"right"===d[0]&&m.width>k.right&&m.width<=k.left?"left":d[0],d[1]="top"===d[1]&&m.height-i.height>k.bottom&&m.height-i.height<=k.top?"bottom":"bottom"===d[1]&&m.height-i.height>k.top&&m.height-i.height<=k.bottom?"top":"left"===d[1]&&m.width-i.width>k.right&&m.width-i.width<=k.left?"right":"right"===d[1]&&m.width-i.width>k.left&&m.width-i.width<=k.right?"left":d[1],"center"===d[1])if(e.vertical.test(d[0])){var n=i.width/2-g/2;k.left+n<0&&m.width-i.width<=k.right?d[1]="left":k.right+n<0&&m.width-i.width<=k.left&&(d[1]="right")}else{var o=i.height/2-m.height/2;k.top+o<0&&m.height-i.height<=k.bottom?d[1]="top":k.bottom+o<0&&m.height-i.height<=k.top&&(d[1]="bottom")}}switch(d[0]){case"top":j.top=i.top-h;break;case"bottom":j.top=i.top+i.height;break;case"left":j.left=i.left-g;break;case"right":j.left=i.left+i.width}switch(d[1]){case"top":j.top=i.top;break;case"bottom":j.top=i.top+i.height-h;break;case"left":j.left=i.left;break;case"right":j.left=i.left+i.width-g;break;case"center":e.vertical.test(d[0])?j.left=i.left+i.width/2-g/2:j.top=i.top+i.height/2-h/2}return j.top=Math.round(j.top),j.left=Math.round(j.left),j.placement="center"===d[1]?d[0]:d[0]+"-"+d[1],j},positionArrow:function(a,c){a=this.getRawNode(a);var d=a.querySelector(".tooltip-inner, .popover-inner");if(d){var f=angular.element(d).hasClass("tooltip-inner"),g=f?a.querySelector(".tooltip-arrow"):a.querySelector(".arrow");if(g){var h={top:"",bottom:"",left:"",right:""};if(c=this.parsePlacement(c),"center"===c[1])return void angular.element(g).css(h);var i="border-"+c[0]+"-width",j=b.getComputedStyle(g)[i],k="border-";k+=e.vertical.test(c[0])?c[0]+"-"+c[1]:c[1]+"-"+c[0],k+="-radius";var l=b.getComputedStyle(f?d:a)[k];switch(c[0]){case"top":h.bottom=f?"0":"-"+j;break;case"bottom":h.top=f?"0":"-"+j;break;case"left":h.right=f?"0":"-"+j;break;case"right":h.left=f?"0":"-"+j}h[c[1]]=l,angular.element(g).css(h)}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.position"]).value("$datepickerSuppressError",!1).value("uibDatepickerAttributeWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","uibDatepickerAttributeWarning","uibDateParser",function(a,b,c,d,e,f,g,h,i,j,k){function l(b){a.datepickerMode=b,q&&(a.datepickerOptions.datepickerMode=b)}var m=this,n={$setViewValue:angular.noop},o={},p=[],q=!!b.datepickerOptions;if(this.modes=["day","month","year"],q)["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","initDate","maxDate","maxMode","minDate","minMode","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(b){switch(b){case"customClass":case"dateDisabled":a[b]=a.datepickerOptions[b]||angular.noop;break;case"datepickerMode":a.datepickerMode=angular.isDefined(a.datepickerOptions.datepickerMode)?a.datepickerOptions.datepickerMode:h.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":m[b]=angular.isDefined(a.datepickerOptions[b])?d(a.datepickerOptions[b])(a.$parent):h[b];break;case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":m[b]=angular.isDefined(a.datepickerOptions[b])?a.datepickerOptions[b]:h[b];break;case"startingDay":angular.isDefined(a.datepickerOptions.startingDay)?m.startingDay=a.datepickerOptions.startingDay:angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(a){a?angular.isDate(a)?m[b]=k.fromTimezone(new Date(a),o.timezone):m[b]=new Date(g(a,"medium")):m[b]=null,m.refreshView()}):m[b]=h[b]?k.fromTimezone(new Date(h[b]),o.timezone):null;break;case"maxMode":case"minMode":a.datepickerOptions[b]?a.$watch(function(){return a.datepickerOptions[b]},function(c){m[b]=a[b]=angular.isDefined(c)?c:datepickerOptions[b],("minMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)<m.modes.indexOf(m[b])||"maxMode"===b&&m.modes.indexOf(a.datepickerOptions.datepickerMode)>m.modes.indexOf(m[b]))&&(a.datepickerMode=m[b],a.datepickerOptions.datepickerMode=m[b])}):m[b]=a[b]=h[b]||null;break;case"initDate":a.datepickerOptions.initDate?(m.activeDate=k.fromTimezone(a.datepickerOptions.initDate,o.timezone)||new Date,a.$watch(function(){return a.datepickerOptions.initDate},function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(m.activeDate=k.fromTimezone(a,o.timezone),m.refreshView())})):m.activeDate=new Date}});else{if(angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle"],function(c){m[c]=angular.isDefined(b[c])?d(b[c])(a.$parent):h[c],angular.isDefined(b[c])&&j&&f.warn("uib-datepicker "+c+" attribute usage is deprecated, use datepicker-options attribute instead")}),angular.forEach(["showWeeks","yearRows","yearColumns","shortcutPropagation"],function(c){m[c]=angular.isDefined(b[c])?a.$parent.$eval(b[c]):h[c],angular.isDefined(b[c])&&j&&f.warn("uib-datepicker "+c+" attribute usage is deprecated, use datepicker-options attribute instead")}),angular.forEach(["dateDisabled","customClass"],function(a){angular.isDefined(b[a])&&j&&f.warn("uib-datepicker "+a+" attribute usage is deprecated, use datepicker-options attribute instead")}),angular.isDefined(b.startingDay)?(j&&f.warn("uib-datepicker startingDay attribute usage is deprecated, use datepicker-options attribute instead"),m.startingDay=a.$parent.$eval(b.startingDay)):angular.isNumber(h.startingDay)?m.startingDay=h.startingDay:m.startingDay=(e.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7,angular.forEach(["minDate","maxDate"],function(c){b[c]?(j&&f.warn("uib-datepicker "+c+" attribute usage is deprecated, use datepicker-options attribute instead"),p.push(a.$parent.$watch(b[c],function(a){a?angular.isDate(a)?m[c]=k.fromTimezone(new Date(a),o.timezone):m[c]=new Date(g(a,"medium")):m[c]=null,m.refreshView()}))):m[c]=h[c]?k.fromTimezone(new Date(h[c]),o.timezone):null}),angular.forEach(["minMode","maxMode"],function(c){b[c]?(j&&f.warn("uib-datepicker "+c+" attribute usage is deprecated, use datepicker-options attribute instead"),p.push(a.$parent.$watch(b[c],function(d){m[c]=a[c]=angular.isDefined(d)?d:b[c],("minMode"===c&&m.modes.indexOf(a.datepickerMode)<m.modes.indexOf(m[c])||"maxMode"===c&&m.modes.indexOf(a.datepickerMode)>m.modes.indexOf(m[c]))&&(a.datepickerMode=m[c])}))):m[c]=a[c]=h[c]||null}),angular.isDefined(b.initDate)){j&&f.warn("uib-datepicker initDate attribute usage is deprecated, use datepicker-options attribute instead");var r=k.fromTimezone(a.$parent.$eval(b.initDate),o.timezone);this.activeDate=isNaN(r)?new Date:r,p.push(a.$parent.$watch(b.initDate,function(a){a&&(n.$isEmpty(n.$modelValue)||n.$invalid)&&(a=k.fromTimezone(a,o.timezone),m.activeDate=isNaN(a)?new Date:a,m.refreshView())}))}else this.activeDate=new Date;b.datepickerMode&&j&&f.warn("uib-datepicker datepickerMode attribute usage is deprecated, use datepicker-options attribute instead"),a.datepickerMode=a.datepickerMode||h.datepickerMode}a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),a.disabled=angular.isDefined(b.disabled)||!1,angular.isDefined(b.ngDisabled)&&p.push(a.$parent.$watch(b.ngDisabled,function(b){a.disabled=b,m.refreshView()})),a.isActive=function(b){return 0===m.compare(b.date,m.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){n=a,o=a.$options||h.ngModelOptions,this.activeDate=n.$modelValue||new Date,n.$render=function(){m.render()}},this.render=function(){if(n.$viewValue){var a=new Date(n.$viewValue),b=!isNaN(a);b?this.activeDate=k.fromTimezone(a,o.timezone):i||f.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){a.selectedDt=null,this._refreshView(),a.activeDt&&(a.activeDateId=a.activeDt.uid);var b=n.$viewValue?new Date(n.$viewValue):null;b=k.fromTimezone(b,o.timezone),n.$setValidity("dateDisabled",!b||this.element&&!this.isDisabled(b))}},this.createDateObject=function(b,c){var d=n.$viewValue?new Date(n.$viewValue):null;d=k.fromTimezone(d,o.timezone);var e=new Date;e=k.fromTimezone(e,o.timezone);var f=this.compare(b,e),g={date:b,label:k.filter(b,c),selected:d&&0===this.compare(b,d),disabled:this.isDisabled(b),past:0>f,current:0===f,future:f>0,customClass:this.customClass(b)||null};return d&&0===this.compare(b,d)&&(a.selectedDt=g),m.activeDate&&0===this.compare(g.date,m.activeDate)&&(a.activeDt=g),g},this.isDisabled=function(b){return a.disabled||this.minDate&&this.compare(b,this.minDate)<0||this.maxDate&&this.compare(b,this.maxDate)>0||a.dateDisabled&&a.dateDisabled({date:b,mode:a.datepickerMode})},this.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c;
-},a.select=function(b){if(a.datepickerMode===m.minMode){var c=n.$viewValue?k.fromTimezone(new Date(n.$viewValue),o.timezone):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),c=k.toTimezone(c,o.timezone),n.$setViewValue(c),n.$render()}else m.activeDate=b,l(m.modes[m.modes.indexOf(a.datepickerMode)-1]),a.$emit("uib:datepicker.mode")},a.move=function(a){var b=m.activeDate.getFullYear()+a*(m.step.years||0),c=m.activeDate.getMonth()+a*(m.step.months||0);m.activeDate.setFullYear(b,c,1),m.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===m.maxMode&&1===b||a.datepickerMode===m.minMode&&-1===b||(l(m.modes[m.modes.indexOf(a.datepickerMode)+b]),a.$emit("uib:datepicker.mode"))},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var s=function(){m.element[0].focus()};a.$on("uib:datepicker.focus",s),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey&&!a.disabled)if(b.preventDefault(),m.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(m.isDisabled(m.activeDate))return;a.select(m.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(m.handleKeyDown(c,b),m.refreshView()):a.toggleMode("up"===c?1:-1)},a.$on("$destroy",function(){for(;p.length;)p.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;b>f;)c=new Date(e),d[f++]=c,e.setDate(e.getDate()+1);return d},this._refreshView=function(){var b=this.activeDate.getFullYear(),d=this.activeDate.getMonth(),f=new Date(this.activeDate);f.setFullYear(b,d,1);var g=this.startingDay-f.getDay(),h=g>0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;42>k;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;7>l;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;n>o;o++)a.weekNumbers.push(e(a.rows[o][m].date))}},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth(),a.getDate()),d=new Date(b.getFullYear(),b.getMonth(),b.getDate());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getDate();if("left"===a)c-=1;else if("up"===a)c-=7;else if("right"===a)c+=1;else if("down"===a)c+=7;else if("pageup"===a||"pagedown"===a){var e=this.activeDate.getMonth()+("pageup"===a?-1:1);this.activeDate.setMonth(e,1),c=Math.min(d(this.activeDate.getFullYear(),this.activeDate.getMonth()),c)}else"home"===a?c=1:"end"===a&&(c=d(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(c)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(a,b,c){this.step={years:1},this.element=b,this.init=function(a){angular.extend(a,this),a.refreshView()},this._refreshView=function(){for(var b,d=new Array(12),e=this.activeDate.getFullYear(),f=0;12>f;f++)b=new Date(this.activeDate),b.setFullYear(e,f,1),d[f]=angular.extend(this.createDateObject(b,this.formatMonth),{uid:a.uniqueId+"-"+f});a.title=c(this.activeDate,this.formatMonthTitle),a.rows=this.split(d,3)},this.compare=function(a,b){var c=new Date(a.getFullYear(),a.getMonth()),d=new Date(b.getFullYear(),b.getMonth());return c.setFullYear(a.getFullYear()),d.setFullYear(b.getFullYear()),c-d},this.handleKeyDown=function(a,b){var c=this.activeDate.getMonth();if("left"===a)c-=1;else if("up"===a)c-=3;else if("right"===a)c+=1;else if("down"===a)c+=3;else if("pageup"===a||"pagedown"===a){var d=this.activeDate.getFullYear()+("pageup"===a?-1:1);this.activeDate.setFullYear(d)}else"home"===a?c=0:"end"===a&&(c=11);this.activeDate.setMonth(c)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a){return parseInt((a-1)/f,10)*f+1}var e,f;this.element=b,this.yearpickerInit=function(){e=this.yearColumns,f=this.yearRows*e,this.step={years:f}},this._refreshView=function(){for(var b,c=new Array(f),g=0,h=d(this.activeDate.getFullYear());f>g;g++)b=new Date(this.activeDate),b.setFullYear(h+g,0,1),c[g]=angular.extend(this.createDateObject(b,this.formatYear),{uid:a.uniqueId+"-"+g});a.title=[c[0].label,c[f-1].label].join(" - "),a.rows=this.split(c,e),a.columns=e},this.compare=function(a,b){return a.getFullYear()-b.getFullYear()},this.handleKeyDown=function(a,b){var c=this.activeDate.getFullYear();"left"===a?c-=1:"up"===a?c-=e:"right"===a?c+=1:"down"===a?c+=e:"pageup"===a||"pagedown"===a?c+=("pageup"===a?-1:1)*f:"home"===a?c=d(this.activeDate.getFullYear()):"end"===a&&(c=d(this.activeDate.getFullYear())+f-1),this.activeDate.setFullYear(c)}}]).directive("uibDatepicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",datepickerOptions:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["uibDatepicker","^ngModel"],controller:"UibDatepickerController",controllerAs:"datepicker",link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}).directive("uibDaypicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],controller:"UibDaypickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibMonthpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],controller:"UibMonthpickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibYearpicker",function(){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],controller:"UibYearpickerController",link:function(a,b,c,d){var e=d[0];angular.extend(e,d[1]),e.yearpickerInit(),e.refreshView()}}}).value("uibDatepickerPopupAttributeWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepicker/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","uibDatepickerPopupAttributeWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){function q(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function r(b){var c=l.parse(b,x,a.date);if(isNaN(c))for(var d=0;d<J.length;d++)if(c=l.parse(b,J[d],a.date),!isNaN(c))return c;return c}function s(a){if(angular.isNumber(a)&&(a=new Date(a)),!a)return null;if(angular.isDate(a)&&!isNaN(a))return a;if(angular.isString(a)){var b=r(a);if(!isNaN(b))return l.toTimezone(b,H.timezone)}return G.$options&&G.$options.allowInvalid?a:void 0}function t(a,b){var d=a||b;return c.ngRequired||d?(angular.isNumber(d)&&(d=new Date(d)),d?angular.isDate(d)&&!isNaN(d)?!0:angular.isString(d)?!isNaN(r(b)):!1:!0):!0}function u(c){if(a.isOpen||!a.disabled){var d=I[0],e=b[0].contains(c.target),f=void 0!==d.contains&&d.contains(c.target);!a.isOpen||e||f||a.$apply(function(){a.isOpen=!1})}}function v(c){27===c.which&&a.isOpen?(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!1}),b[0].focus()):40!==c.which||a.isOpen||(c.preventDefault(),c.stopPropagation(),a.$apply(function(){a.isOpen=!0}))}function w(){if(a.isOpen){var d=angular.element(I[0].querySelector(".uib-datepicker-popup")),e=c.popupPlacement?c.popupPlacement:m.placement,f=j.positionElements(b,d,e,z);d.css({top:f.top+"px",left:f.left+"px"}),d.hasClass("uib-position-measure")&&d.removeClass("uib-position-measure")}}var x,y,z,A,B,C,D,E,F,G,H,I,J,K={},L=!1,M=[];a.watchData={},this.init=function(j){if(G=j,H=j.$options||o.ngModelOptions,y=angular.isDefined(c.closeOnDateSelection)?a.$parent.$eval(c.closeOnDateSelection):m.closeOnDateSelection,z=angular.isDefined(c.datepickerAppendToBody)?a.$parent.$eval(c.datepickerAppendToBody):m.appendToBody,A=angular.isDefined(c.onOpenFocus)?a.$parent.$eval(c.onOpenFocus):m.onOpenFocus,B=angular.isDefined(c.datepickerPopupTemplateUrl)?c.datepickerPopupTemplateUrl:m.datepickerPopupTemplateUrl,C=angular.isDefined(c.datepickerTemplateUrl)?c.datepickerTemplateUrl:m.datepickerTemplateUrl,J=angular.isDefined(c.altInputFormats)?a.$parent.$eval(c.altInputFormats):m.altInputFormats,a.showButtonBar=angular.isDefined(c.showButtonBar)?a.$parent.$eval(c.showButtonBar):m.showButtonBar,m.html5Types[c.type]?(x=m.html5Types[c.type],L=!0):(x=c.uibDatepickerPopup||m.datepickerPopup,c.$observe("uibDatepickerPopup",function(a,b){var c=a||m.datepickerPopup;if(c!==x&&(x=c,G.$modelValue=null,!x))throw new Error("uibDatepickerPopup must have a date format specified.")})),!x)throw new Error("uibDatepickerPopup must have a date format specified.");if(L&&c.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");D=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>"),a.ngModelOptions=angular.copy(H),a.ngModelOptions.timezone=null,a.ngModelOptions.updateOnDefault===!0&&(a.ngModelOptions.updateOn=a.ngModelOptions.updateOn?a.ngModelOptions.updateOn+" default":"default"),D.attr({"ng-model":"date","ng-model-options":"ngModelOptions","ng-change":"dateSelection(date)","template-url":B}),E=angular.element(D.children()[0]),E.attr("template-url",C),L&&"month"===c.type&&(E.attr("datepicker-mode",'"month"'),E.attr("min-mode","month")),a.datepickerOptions&&E.attr("datepicker-options","datepickerOptions"),angular.forEach(["minMode","maxMode","datepickerMode","shortcutPropagation"],function(b){if(c[b]){p&&e.warn("uib-datepicker settings via uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead");var d=f(c[b]),g={get:function(){return d(a.$parent)}};if(E.attr(q(b),"watchData."+b),"datepickerMode"===b){var h=d.assign;g.set=function(b){h(a.$parent,b)}}Object.defineProperty(a.watchData,b,g)}}),angular.forEach(["minDate","maxDate","initDate"],function(b){if(c[b]){p&&e.warn("uib-datepicker settings via uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead");var d=f(c[b]);M.push(a.$parent.$watch(d,function(c){if("minDate"===b||"maxDate"===b)null===c?K[b]=null:angular.isDate(c)?K[b]=l.fromTimezone(new Date(c),H.timezone):K[b]=new Date(k(c,"medium")),a.watchData[b]=null===c?null:K[b];else{var d=c?new Date(c):new Date;a.watchData[b]=l.fromTimezone(d,H.timezone)}})),E.attr(q(b),"watchData."+b)}}),c.dateDisabled&&(p&&e.warn("uib-datepicker settings via uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead"),E.attr("date-disabled","dateDisabled({ date: date, mode: mode })")),angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRows","yearColumns"],function(a){angular.isDefined(c[a])&&(p&&e.warn("uib-datepicker settings via uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead"),E.attr(q(a),c[a]))}),c.customClass&&(p&&e.warn("uib-datepicker settings via uib-datepicker-popup attributes are deprecated and will be removed in UI Bootstrap 1.3, use datepicker-options attribute instead"),E.attr("custom-class","customClass({ date: date, mode: mode })")),L?G.$formatters.push(function(b){return a.date=l.fromTimezone(b,H.timezone),b}):(G.$$parserName="date",G.$validators.date=t,G.$parsers.unshift(s),G.$formatters.push(function(b){return G.$isEmpty(b)?(a.date=b,b):(a.date=l.fromTimezone(b,H.timezone),angular.isNumber(a.date)&&(a.date=new Date(a.date)),l.filter(a.date,x))})),G.$viewChangeListeners.push(function(){a.date=r(G.$viewValue)}),b.on("keydown",v),I=d(D)(a),D.remove(),z?h.find("body").append(I):b.after(I),a.$on("$destroy",function(){for(a.isOpen===!0&&(i.$$phase||a.$apply(function(){a.isOpen=!1})),I.remove(),b.off("keydown",v),h.off("click",u),F&&F.off("scroll",w),angular.element(g).off("resize",w);M.length;)M.shift()()})},a.getText=function(b){return a[b+"Text"]||m[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,K.minDate)<0||a.watchData.maxDate&&a.compare(b,K.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?l.filter(a.date,x):null;b.val(d),G.$setViewValue(d),y&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(c.stopPropagation(),a.isOpen=!1,b[0].focus())},a.select=function(b,c){if(c.stopPropagation(),"today"===b){var d=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(d.getFullYear(),d.getMonth(),d.getDate())):b=new Date(d.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(c){c.stopPropagation(),a.isOpen=!1,b[0].focus()},a.disabled=angular.isDefined(c.disabled)||!1,c.ngDisabled&&M.push(a.$parent.$watch(f(c.ngDisabled),function(b){a.disabled=b})),a.$watch("isOpen",function(d){d?a.disabled?a.isOpen=!1:n(function(){w(),A&&a.$broadcast("uib:datepicker.focus"),h.on("click",u);var d=c.popupPlacement?c.popupPlacement:m.placement;z||j.parsePlacement(d)[2]?(F=F||angular.element(j.scrollParent(b)),F&&F.on("scroll",w)):F=null,angular.element(g).on("resize",w)},0,!1):(h.off("click",u),F&&F.off("scroll",w),angular.element(g).off("resize",w))}),a.$on("uib:datepicker.mode",function(){n(w,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(b,c){var d;return function(){var e=this,f=Array.prototype.slice.call(arguments);d&&a.cancel(d),d=a(function(){b.apply(e,f)},c)}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.on("click",d),a.on("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.off("click",d),a.off("keydown",e))};var d=function(a){if(c&&!(a&&"disabled"===c.getAutoClose()||a&&3===a.which)){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&-1!==[38,40].indexOf(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.appendToOpenClass,q=e.openClass,r=angular.noop,s=c.onToggle?d(c.onToggle):angular.noop,t=!1,u=null,v=!1,w=i.find("body");b.addClass("dropdown"),this.init=function(){if(c.isOpen&&(m=d(c.isOpen),r=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),angular.isDefined(c.dropdownAppendTo)){var e=d(c.dropdownAppendTo)(o);e&&(u=angular.element(e))}t=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.keyboardNav),t&&!u&&(u=w),u&&n.dropdownMenu&&(u.append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen,angular.isFunction(r)&&r(o,o.isOpen),o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return v},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):b.find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(u&&n.dropdownMenu){var e,i,m=h.positionElements(b,n.dropdownMenu,"bottom-left",!0);if(e={top:m.top+"px",display:c?"block":"none"},i=n.dropdownMenu.hasClass("dropdown-menu-right"),i?(e.left="auto",e.right=window.innerWidth-(m.left+b.prop("offsetWidth"))+"px"):(e.left=m.left+"px",e.right="auto"),!t){var v=h.offset(u);e.top=m.top-v.top+"px",i?e.right=window.innerWidth-(m.left-v.left+b.prop("offsetWidth"))+"px":e.left=m.left-v.left+"px"}n.dropdownMenu.css(e)}var w=u?u:b,x=w.hasClass(u?p:q);if(x===!c&&g[c?"addClass":"removeClass"](w,u?p:q).then(function(){angular.isDefined(c)&&c!==d&&s(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var y=angular.element('<ul class="dropdown-menu"></ul>');n.dropdownMenu.replaceWith(y),n.dropdownMenu=y}f.close(o),n.selectedOption=null}angular.isFunction(r)&&r(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b===a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b===a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.stackedMap"]).factory("$$multiMap",function(){return{createNew:function(){var a={};return{entries:function(){return Object.keys(a).map(function(b){return{key:b,value:a[b]}})},get:function(b){return a[b]},hasKey:function(b){return!!a[b]},keys:function(){return Object.keys(a)},put:function(b,c){a[b]||(a[b]=[]),a[b].push(c)},remove:function(b,c){var d=a[b];if(d){var e=d.indexOf(c);-1!==e&&d.splice(e,1),d.length||delete a[b]}}}}}}).provider("$uibResolve",function(){var a=this;this.resolver=null,this.setResolver=function(a){this.resolver=a},this.$get=["$injector","$q",function(b,c){var d=a.resolver?b.get(a.resolver):null;return{resolve:function(a,e,f,g){if(d)return d.resolve(a,e,f,g);var h=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?h.push(c.resolve(b.invoke(a))):angular.isString(a)?h.push(c.resolve(b.get(a))):h.push(c.resolve(a))}),c.all(h).then(function(b){var c={},d=0;return angular.forEach(a,function(a,e){c[e]=b[d++]}),c})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(a,b,c){function d(b,d,e){e.modalInClass&&(a.addClass(d,e.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(c,f){var g=f();b.modalOptions.animation?a.removeClass(d,e.modalInClass).then(g):g()}))}return{replace:!0,templateUrl:"uib/template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),d}}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(a,b,c,d){return{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/modal/window.html"},link:function(e,f,g){f.addClass(g.windowClass||""),f.addClass(g.windowTopClass||""),e.size=g.size,e.close=function(b){var c=a.getTop();c&&c.value.backdrop&&"static"!==c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,"backdrop click"))},f.on("click",e.close),e.$isRendered=!0;var h=b.defer();g.$observe("modalRender",function(a){"true"===a&&h.resolve()}),h.promise.then(function(){var h=null;g.modalInClass&&(h=c(f,{addClass:g.modalInClass}).start(),e.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();c(f,{removeClass:g.modalInClass}).start().then(d)})),b.when(h).then(function(){var b=a.getTop();if(b&&a.modalRendered(b.key),!d[0].activeElement||!f[0].contains(d[0].activeElement)){var c=f[0].querySelector("[autofocus]");c?c.focus():f[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(a,b){b.modalAnimation&&a.addClass(b.uibModalAnimationClass)}}}).directive("uibModalTransclude",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap",function(a,b,c,d,e,f,g,h){function i(){for(var a=-1,b=t.keys(),c=0;c<b.length;c++)t.get(b[c]).value.backdrop&&(a=c);return a}function j(a,b){var c=t.get(a).value,d=c.appendTo;t.remove(a),m(c.modalDomEl,c.modalScope,function(){var b=c.openedClass||s;u.remove(b,a),d.toggleClass(b,u.hasKey(b)),k(!0)},c.closedDeferred),l(),b&&b.focus?b.focus():d.focus&&d.focus()}function k(a){var b;t.length()>0&&(b=t.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function l(){if(p&&-1===i()){var a=q;m(p,q,function(){a=null}),p=void 0,q=void 0}}function m(b,c,d,e){function g(){g.done||(g.done=!0,a.leave(b).then(function(){b.remove(),e&&e.resolve()}),c.$destroy(),d&&d())}var h,i=null,j=function(){return h||(h=f.defer(),i=h.promise),function(){h.resolve()}};return c.$broadcast(v.NOW_CLOSING_EVENT,j),f.when(i).then(g)}function n(a){if(a.isDefaultPrevented())return a;var b=t.top();if(b)switch(a.which){case 27:b.value.keyboard&&(a.preventDefault(),e.$apply(function(){v.dismiss(b.key,"escape key press")}));break;case 9:v.loadFocusElementList(b);var c=!1;a.shiftKey?(v.isFocusInFirstItem(a)||v.isModalFocused(a,b))&&(c=v.focusLastFocusableElement()):v.isFocusInLastItem(a)&&(c=v.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p,q,r,s="modal-open",t=h.createNew(),u=g.createNew(),v={NOW_CLOSING_EVENT:"modal.stack.now-closing"},w=0,x="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(i,function(a){q&&(q.index=a)}),c.on("keydown",n),e.$on("$destroy",function(){c.off("keydown",n)}),v.open=function(b,f){var g=c[0].activeElement,h=f.openedClass||s;k(!1),t.add(b,{deferred:f.deferred,renderDeferred:f.renderDeferred,closedDeferred:f.closedDeferred,modalScope:f.scope,backdrop:f.backdrop,keyboard:f.keyboard,openedClass:f.openedClass,windowTopClass:f.windowTopClass,animation:f.animation,appendTo:f.appendTo}),u.put(h,b);var j=f.appendTo,l=i();if(!j.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");l>=0&&!p&&(q=e.$new(!0),q.modalOptions=f,q.index=l,p=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>'),p.attr("backdrop-class",f.backdropClass),f.animation&&p.attr("modal-animation","true"),d(p)(q),a.enter(p,j));var m=angular.element('<div uib-modal-window="modal-window"></div>');m.attr({"template-url":f.windowTemplateUrl,"window-class":f.windowClass,"window-top-class":f.windowTopClass,size:f.size,index:t.length()-1,animate:"animate"}).html(f.content),f.animation&&m.attr("modal-animation","true"),a.enter(d(m)(f.scope),j).then(function(){f.scope.$$uibDestructionScheduled||a.addClass(j,h)}),t.top().value.modalDomEl=m,t.top().value.modalOpener=g,v.clearFocusListCache()},v.close=function(a,b){var c=t.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),j(a,c.value.modalOpener),!0):!c},v.dismiss=function(a,b){var c=t.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),j(a,c.value.modalOpener),!0):!c},v.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},v.getTop=function(){return t.top()},v.modalRendered=function(a){var b=t.get(a);b&&b.value.renderDeferred.resolve()},v.focusFirstFocusableElement=function(){return r.length>0?(r[0].focus(),!0):!1},v.focusLastFocusableElement=function(){return r.length>0?(r[r.length-1].focus(),!0):!1},v.isModalFocused=function(a,b){if(a&&b){var c=b.value.modalDomEl;if(c&&c.length)return(a.target||a.srcElement)===c[0]}return!1},v.isFocusInFirstItem=function(a){return r.length>0?(a.target||a.srcElement)===r[0]:!1},v.isFocusInLastItem=function(a){return r.length>0?(a.target||a.srcElement)===r[r.length-1]:!1},v.clearFocusListCache=function(){r=[],w=0},v.loadFocusElementList=function(a){if((void 0===r||!r.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(r=b[0].querySelectorAll(x))}},v}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?c.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}var j={},k=null;return j.getPromiseChain=function(){return k},j.open=function(e){function j(){return r}var l=c.defer(),m=c.defer(),n=c.defer(),o=c.defer(),p={result:l.promise,opened:m.promise,closed:n.promise,rendered:o.promise,close:function(a){return h.close(p,a)},dismiss:function(a){return h.dismiss(p,a)}};if(e=angular.extend({},a.options,e),e.resolve=e.resolve||{},e.appendTo=e.appendTo||d.find("body").eq(0),!e.template&&!e.templateUrl)throw new Error("One of template or templateUrl options is required.");var q,r=c.all([i(e),g.resolve(e.resolve,{},null,null)]);return q=k=c.all([k]).then(j,j).then(function(a){var c=e.scope||b,d=c.$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var g,i,j={};e.controller&&(j.$scope=d,j.$uibModalInstance=p,angular.forEach(a[1],function(a,b){j[b]=a}),i=f(e.controller,j,!0),e.controllerAs?(g=i.instance,e.bindToController&&(g.$close=d.$close,g.$dismiss=d.$dismiss,angular.extend(g,c)),g=i(),d[e.controllerAs]=g):g=i(),angular.isFunction(g.$onInit)&&g.$onInit()),h.open(p,{scope:d,deferred:l,renderDeferred:o,closedDeferred:n,content:a[0],animation:e.animation,backdrop:e.backdrop,keyboard:e.keyboard,backdropClass:e.backdropClass,windowTopClass:e.windowTopClass,windowClass:e.windowClass,windowTemplateUrl:e.windowTemplateUrl,size:e.size,openedClass:e.openedClass,appendTo:e.appendTo}),m.resolve(!0)},function(a){m.reject(a),l.reject(a)})["finally"](function(){k===q&&(k=null)}),p},j}]};return a}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(a){return{create:function(b,c,d){b.setNumPages=d.numPages?a(d.numPages).assign:angular.noop,b.ngModelCtrl={$setViewValue:angular.noop},b._watchers=[],b.init=function(a,e){b.ngModelCtrl=a,b.config=e,a.$render=function(){b.render()},d.itemsPerPage?b._watchers.push(c.$parent.$watch(d.itemsPerPage,function(a){b.itemsPerPage=parseInt(a,10),c.totalPages=b.calculateTotalPages(),b.updatePage()})):b.itemsPerPage=e.itemsPerPage,c.$watch("totalItems",function(a,d){(angular.isDefined(a)||a!==d)&&(c.totalPages=b.calculateTotalPages(),b.updatePage())})},b.calculateTotalPages=function(){var a=b.itemsPerPage<1?1:Math.ceil(c.totalItems/b.itemsPerPage);return Math.max(a||0,1)},b.render=function(){c.page=parseInt(b.ngModelCtrl.$viewValue,10)||1},c.selectPage=function(a,d){d&&d.preventDefault();var e=!c.ngDisabled||!d;e&&c.page!==a&&a>0&&a<=c.totalPages&&(d&&d.target&&d.target.blur(),b.ngModelCtrl.$setViewValue(a),b.ngModelCtrl.$render())},c.getText=function(a){return c[a+"Text"]||b.config[a+"Text"]},c.noPrevious=function(){return 1===c.page},c.noNext=function(){return c.page===c.totalPages},b.updatePage=function(){b.setNumPages(c.$parent,c.totalPages),c.page>c.totalPages?c.selectPage(c.totalPages):b.ngModelCtrl.$render()},c.$on("$destroy",function(){for(;b._watchers.length;)b._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(a,b,c,d){a.align=angular.isDefined(b.align)?a.$parent.$eval(b.align):d.align,c.create(this,a,b)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPagerController",controllerAs:"pager",templateUrl:function(a,b){return b.templateUrl||"uib/template/pager/pager.html"},replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&f.init(g,a)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(a,b,c,d,e){function f(a,b,c){return{number:a,text:b,active:c}}function g(a,b){var c=[],d=1,e=b,g=angular.isDefined(i)&&b>i;g&&(j?(d=Math.max(a-Math.floor(i/2),1),e=d+i-1,e>b&&(e=b,d=e-i+1)):(d=(Math.ceil(a/i)-1)*i+1,e=Math.min(d+i-1,b)));for(var h=d;e>=h;h++){var n=f(h,m(h),h===a);c.push(n)}if(g&&i>0&&(!j||k||l)){if(d>1){if(!l||d>3){var o=f(d-1,"...",!1);c.unshift(o)}if(l){if(3===d){var p=f(2,"2",!1);c.unshift(p)}var q=f(1,"1",!1);
-c.unshift(q)}}if(b>e){if(!l||b-2>e){var r=f(e+1,"...",!1);c.push(r)}if(l){if(e===b-2){var s=f(b-1,b-1,!1);c.push(s)}var t=f(b,b,!1);c.push(t)}}}return c}var h=this,i=angular.isDefined(b.maxSize)?a.$parent.$eval(b.maxSize):e.maxSize,j=angular.isDefined(b.rotate)?a.$parent.$eval(b.rotate):e.rotate,k=angular.isDefined(b.forceEllipses)?a.$parent.$eval(b.forceEllipses):e.forceEllipses,l=angular.isDefined(b.boundaryLinkNumbers)?a.$parent.$eval(b.boundaryLinkNumbers):e.boundaryLinkNumbers,m=angular.isDefined(b.pageLabel)?function(c){return a.$parent.$eval(b.pageLabel,{$page:c})}:angular.identity;a.boundaryLinks=angular.isDefined(b.boundaryLinks)?a.$parent.$eval(b.boundaryLinks):e.boundaryLinks,a.directionLinks=angular.isDefined(b.directionLinks)?a.$parent.$eval(b.directionLinks):e.directionLinks,d.create(this,a,b),b.maxSize&&h._watchers.push(a.$parent.$watch(c(b.maxSize),function(a){i=parseInt(a,10),h.render()}));var n=this.render;this.render=function(){n(),a.page>0&&a.page<=a.totalPages&&(a.pages=g(a.page,a.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"uib/template/pagination/pagination.html"},replace:!0,link:function(a,c,d,e){var f=e[0],g=e[1];g&&f.init(g,b)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){function n(a){if(27===a.which){var b=o.top();b&&(b.value.close(),o.removeTop(),b=null)}}var o=m.createNew();return h.on("keypress",n),k.$on("$destroy",function(){h.off("keypress",n)}),function(e,k,m,n){function p(a){var b=(a||n.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}n=angular.extend({},b,d,n);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="<div "+q+'-popup title="'+r+"title"+s+'" '+(n.useContentExp?'content-exp="contentExp()" ':'content="'+r+"content"+s+'" ')+'placement="'+r+"placement"+s+'" popup-class="'+r+"popupClass"+s+'" animation="animation" is-open="isOpen"origin-scope="origScope" class="uib-position-measure"></div>';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){N.isOpen?q():m()}function m(){(!M||a.$eval(d[k+"Enable"]))&&(u(),x(),N.popupDelay?G||(G=g(r,N.popupDelay,!1)):r())}function q(){s(),N.popupCloseDelay?H||(H=g(t,N.popupCloseDelay,!1)):t()}function r(){return s(),u(),N.content?(v(),void N.$evalAsync(function(){N.isOpen=!0,y(!0),S()})):angular.noop}function s(){G&&(g.cancel(G),G=null),I&&(g.cancel(I),I=null)}function t(){N&&N.$evalAsync(function(){N&&(N.isOpen=!1,y(!1),N.animation?F||(F=g(w,150,!1)):w())})}function u(){H&&(g.cancel(H),H=null),F&&(g.cancel(F),F=null)}function v(){D||(E=N.$new(),D=c(E,function(a){K?h.find("body").append(a):b.after(a)}),z())}function w(){s(),u(),A(),D&&(D.remove(),D=null),E&&(E.$destroy(),E=null)}function x(){N.title=d[k+"Title"],Q?N.content=Q(a):N.content=d[e],N.popupClass=d[k+"Class"],N.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0];var c=parseInt(d[k+"PopupDelay"],10),f=parseInt(d[k+"PopupCloseDelay"],10);N.popupDelay=isNaN(c)?n.popupDelay:c,N.popupCloseDelay=isNaN(f)?n.popupCloseDelay:f}function y(b){P&&angular.isFunction(P.assign)&&P.assign(a,b)}function z(){R.length=0,Q?(R.push(a.$watch(Q,function(a){N.content=a,!a&&N.isOpen&&t()})),R.push(E.$watch(function(){O||(O=!0,E.$$postDigest(function(){O=!1,N&&N.isOpen&&S()}))}))):R.push(d.$observe(e,function(a){N.content=a,!a&&N.isOpen?t():S()})),R.push(d.$observe(k+"Title",function(a){N.title=a,N.isOpen&&S()})),R.push(d.$observe(k+"Placement",function(a){N.placement=a?a:n.placement;var b=i.parsePlacement(N.placement);J=b[1]?b[0]+"-"+b[1]:b[0],N.isOpen&&S()}))}function A(){R.length&&(angular.forEach(R,function(a){a()}),R.length=0)}function B(a){N&&N.isOpen&&D&&(b[0].contains(a.target)||D[0].contains(a.target)||q())}function C(){var a=d[k+"Trigger"];T(),L=p(a),"none"!==L.show&&L.show.forEach(function(a,c){"outsideClick"===a?(b.on("click",j),h.on("click",B)):a===L.hide[c]?b.on(a,j):a&&(b.on(a,m),b.on(L.hide[c],q)),b.on("keypress",function(a){27===a.which&&q()})})}var D,E,F,G,H,I,J,K=angular.isDefined(n.appendToBody)?n.appendToBody:!1,L=p(void 0),M=angular.isDefined(d[k+"Enable"]),N=a.$new(!0),O=!1,P=angular.isDefined(d[k+"IsOpen"])?l(d[k+"IsOpen"]):!1,Q=n.useContentExp?l(d[e]):!1,R=[],S=function(){D&&D.html()&&(I||(I=g(function(){var a=i.positionElements(b,D,N.placement,K);D.css({top:a.top+"px",left:a.left+"px"}),D.hasClass(a.placement.split("-")[0])||(D.removeClass(J.split("-")[0]),D.addClass(a.placement.split("-")[0])),D.hasClass(n.placementClassPrefix+a.placement)||(D.removeClass(n.placementClassPrefix+J),D.addClass(n.placementClassPrefix+a.placement)),D.hasClass("uib-position-measure")?(i.positionArrow(D,a.placement),D.removeClass("uib-position-measure")):J!==a.placement&&i.positionArrow(D,a.placement),J=a.placement,I=null},0,!1)))};N.origScope=a,N.isOpen=!1,o.add(N,{close:t}),N.contentExp=function(){return N.content},d.$observe("disabled",function(a){a&&s(),a&&N.isOpen&&t()}),P&&a.$watch(P,function(a){N&&!a===N.isOpen&&j()});var T=function(){L.show.forEach(function(a){"outsideClick"===a?b.off("click",j):(b.off(a,m),b.off(a,j))}),L.hide.forEach(function(a){"outsideClick"===a?h.off("click",B):b.off(a,q)})};C();var U=a.$eval(d[k+"Animation"]);N.animation=angular.isDefined(U)?!!U:n.animation;var V,W=k+"AppendToBody";V=W in d&&void 0===d[W]?!0:a.$eval(d[W]),K=angular.isDefined(V)?V:K,a.$on("$destroy",function(){T(),w(),o.remove(N),N=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",["$uibPosition",function(a){return{restrict:"A",link:function(b,c,d){if(b.placement){var e=a.parsePlacement(b.placement);c.addClass(e[0])}b.popupClass&&c.addClass(b.popupClass),b.animation()&&c.addClass(d.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(a,b,c){function d(){return angular.isDefined(a.maxParam)?a.maxParam:c.max}var e=this,f=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=d(),this.addBar=function(a,b,c){f||b.css({transition:"none"}),this.bars.push(a),a.max=d(),a.title=c&&angular.isDefined(c.title)?c.title:"progressbar",a.$watch("value",function(b){a.recalculatePercentage()}),a.recalculatePercentage=function(){var b=e.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);b>100&&(a.percent-=b-100)},a.$on("$destroy",function(){b=null,e.removeBar(a)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("maxParam",function(a){e.bars.forEach(function(a){a.max=d(),a.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop},e=this;this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(b)},a[b]);return a},this.getTitle=function(a){return a>=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0:b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue,a.title=e.getTitle(a.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(a){function b(a){for(var b=0;b<d.tabs.length;b++)if(d.tabs[b].index===a)return b}var c,d=this;d.tabs=[],d.select=function(a){if(!e){var f=b(c),g=d.tabs[f];g&&(g.tab.onDeselect(),g.tab.active=!1);var h=d.tabs[a];h?(h.tab.onSelect(),h.tab.active=!0,d.active=h.index,c=h.index):!h&&angular.isNumber(c)&&(d.active=null,c=null)}},d.addTab=function(a){if(d.tabs.push({tab:a,index:a.index}),d.tabs.sort(function(a,b){return a.index>b.index?1:a.index<b.index?-1:0}),a.index===d.active||!angular.isNumber(d.active)&&1===d.tabs.length){var c=b(a.index);d.select(c)}},d.removeTab=function(a){var c=b(a.index);if(a.index===d.active){var e=c===d.tabs.length-1?c-1:c+1%d.tabs.length;d.select(e)}d.tabs.splice(c,1)},a.$watch("tabset.active",function(a){angular.isNumber(a)&&a!==c&&d.select(b(a))});var e;a.$on("$destroy",function(){e=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tabset.html"},link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1,angular.isUndefined(c.active)&&(a.active=0)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(a,b){return b.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(b,c,d,e,f){b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),angular.isUndefined(d.index)&&(e.tabs&&e.tabs.length?b.index=Math.max.apply(null,e.tabs.map(function(a){return a.index}))+1:b.index=0),angular.isUndefined(d.classes)&&(b.classes=""),b.select=function(){if(!b.disabled){for(var a,c=0;c<e.tabs.length;c++)if(e.tabs[c].tab===b){a=c;break}e.select(a)}},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase()||"uib:tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^uibTabset",link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude).tab;e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=+a.hours,c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===u[1]&&(b+=12)),b):void 0}function i(){var b=+a.minutes;return b>=0&&60>b?b:void 0}function j(){var b=+a.seconds;return b>=0&&60>b?b:void 0}function k(a){return null===a?"":angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function l(a){m(),t.$setViewValue(new Date(r)),n(a)}function m(){t.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function n(b){if(t.$modelValue){var c=r.getHours(),d=r.getMinutes(),e=r.getSeconds();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:k(c),"m"!==b&&(a.minutes=k(d)),a.meridian=r.getHours()<12?u[0]:u[1],"s"!==b&&(a.seconds=k(e)),a.meridian=r.getHours()<12?u[0]:u[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=u[0]}function o(a){r=q(r,a),l()}function p(a,b){return q(a,60*b)}function q(a,b){var c=new Date(a.getTime()+1e3*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes(),c.getSeconds()),d}var r=new Date,s=[],t={$setViewValue:angular.noop},u=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){t=b,t.$render=this.render,t.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=d.eq(2),i=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;i&&this.setupMousewheelEvents(e,f,h);var j=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;j&&this.setupArrowkeyEvents(e,f,h),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f,h)};var v=g.hourStep;c.hourStep&&s.push(a.$parent.$watch(d(c.hourStep),function(a){v=+a}));var w=g.minuteStep;c.minuteStep&&s.push(a.$parent.$watch(d(c.minuteStep),function(a){w=+a}));var x;s.push(a.$parent.$watch(d(c.min),function(a){var b=new Date(a);x=isNaN(b)?void 0:b}));var y;s.push(a.$parent.$watch(d(c.max),function(a){var b=new Date(a);y=isNaN(b)?void 0:b}));var z=!1;c.ngDisabled&&s.push(a.$parent.$watch(d(c.ngDisabled),function(a){z=a})),a.noIncrementHours=function(){var a=p(r,60*v);return z||a>y||r>a&&x>a},a.noDecrementHours=function(){var a=p(r,60*-v);return z||x>a||a>r&&a>y},a.noIncrementMinutes=function(){var a=p(r,w);return z||a>y||r>a&&x>a},a.noDecrementMinutes=function(){var a=p(r,-w);return z||x>a||a>r&&a>y},a.noIncrementSeconds=function(){var a=q(r,A);return z||a>y||r>a&&x>a},a.noDecrementSeconds=function(){var a=q(r,-A);return z||x>a||a>r&&a>y},a.noToggleMeridian=function(){return r.getHours()<12?z||p(r,720)>y:z||p(r,-720)<x};var A=g.secondStep;c.secondStep&&s.push(a.$parent.$watch(d(c.secondStep),function(a){A=+a})),a.showSeconds=g.showSeconds,c.showSeconds&&s.push(a.$parent.$watch(d(c.showSeconds),function(b){a.showSeconds=!!b})),a.showMeridian=g.showMeridian,c.showMeridian&&s.push(a.$parent.$watch(d(c.showMeridian),function(b){if(a.showMeridian=!!b,t.$error.time){var c=h(),d=i();angular.isDefined(c)&&angular.isDefined(d)&&(r.setHours(c),l())}else n()})),this.setupMousewheelEvents=function(b,c,d){var e=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()}),d.bind("mousewheel wheel",function(b){z||a.$apply(e(b)?a.incrementSeconds():a.decrementSeconds()),b.preventDefault()})},this.setupArrowkeyEvents=function(b,c,d){b.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply()))}),c.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply()))}),d.bind("keydown",function(b){z||(38===b.which?(b.preventDefault(),a.incrementSeconds(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(b,c,d){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var e=function(b,c,d){t.$setViewValue(null),t.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c),angular.isDefined(d)&&(a.invalidSeconds=d)};a.updateHours=function(){var a=h(),b=i();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(a),r.setMinutes(b),x>r||r>y?e(!0):l("h")):e(!0)},b.bind("blur",function(b){t.$setTouched(),null===a.hours||""===a.hours?e(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=k(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();t.$setDirty(),angular.isDefined(a)&&angular.isDefined(b)?(r.setHours(b),r.setMinutes(a),x>r||r>y?e(void 0,!0):l("m")):e(void 0,!0)},c.bind("blur",function(b){t.$setTouched(),null===a.minutes?e(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=k(a.minutes)})}),a.updateSeconds=function(){var a=j();t.$setDirty(),angular.isDefined(a)?(r.setSeconds(a),l("s")):e(void 0,void 0,!0)},d.bind("blur",function(b){!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=k(a.seconds)})})},this.render=function(){var b=t.$viewValue;isNaN(b)?(t.$setValidity("time",!1),e.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(b&&(r=b),x>r||r>y?(t.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):m(),n())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*v*60)},a.decrementHours=function(){a.noDecrementHours()||o(60*-v*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(60*w)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(60*-w)},a.incrementSeconds=function(){a.noIncrementSeconds()||o(A)},a.decrementSeconds=function(){a.noDecrementSeconds()||o(-A)},a.toggleMeridian=function(){var b=i(),c=h();a.noToggleMeridian()||(angular.isDefined(b)&&angular.isDefined(c)?o(720*(r.getHours()<12?60:-60)):a.meridian=a.meridian===u[0]?u[1]:u[0])},a.blur=function(){t.$setTouched()},a.$on("$destroy",function(){for(;s.length;)s.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(a){return{require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(b,c){return c.templateUrl||a.templateUrl},link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(a){var b=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l,m){function n(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),Y()}function o(){N.position=D?l.offset(b):l.position(b),N.position.top+=b.prop("offsetHeight")}var p,q,r=[9,13,27,38,40],s=200,t=a.$eval(c.typeaheadMinLength);t||0===t||(t=1),a.$watch(c.typeaheadMinLength,function(a){t=a||0===a?a:1});var u=a.$eval(c.typeaheadWaitMs)||0,v=a.$eval(c.typeaheadEditable)!==!1;a.$watch(c.typeaheadEditable,function(a){v=a!==!1});var w,x,y=e(c.typeaheadLoading).assign||angular.noop,z=e(c.typeaheadOnSelect),A=angular.isDefined(c.typeaheadSelectOnBlur)?a.$eval(c.typeaheadSelectOnBlur):!1,B=e(c.typeaheadNoResults).assign||angular.noop,C=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,D=c.typeaheadAppendToBody?a.$eval(c.typeaheadAppendToBody):!1,E=c.typeaheadAppendTo?a.$eval(c.typeaheadAppendTo):null,F=a.$eval(c.typeaheadFocusFirst)!==!1,G=c.typeaheadSelectOnExact?a.$eval(c.typeaheadSelectOnExact):!1,H=e(c.typeaheadIsOpen).assign||angular.noop,I=a.$eval(c.typeaheadShowHint)||!1,J=e(c.ngModel),K=e(c.ngModel+"($$$p)"),L=function(b,c){return angular.isFunction(J(a))&&q&&q.$options&&q.$options.getterSetter?K(b,{$$$p:c}):J.assign(b,c)},M=m.parse(c.uibTypeahead),N=a.$new(),O=a.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q,R;I&&(Q=angular.element("<div></div>"),Q.css("position","relative"),b.after(Q),R=b.clone(),R.attr("placeholder",""),R.attr("tabindex","-1"),R.val(""),R.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),b.css({position:"relative","vertical-align":"top","background-color":"transparent"}),Q.append(R),R.after(b));var S=angular.element("<div uib-typeahead-popup></div>");S.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(c.typeaheadTemplateUrl)&&S.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&S.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var T=function(){I&&R.val("")},U=function(){N.matches=[],N.activeIdx=-1,b.attr("aria-expanded",!1),T()},V=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){0>a?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",V(a))});var W=function(a,b){return N.matches.length>b&&a?a.toUpperCase()===N.matches[b].label.toUpperCase():!1},X=function(c,d){var e={$viewValue:c};y(a,!0),B(a,!1),f.when(M.source(a,e)).then(function(f){var g=c===p.$viewValue;if(g&&w)if(f&&f.length>0){N.activeIdx=F?0:-1,B(a,!1),N.matches.length=0;for(var h=0;h<f.length;h++)e[M.itemName]=f[h],N.matches.push({id:V(h),label:M.viewMapper(N,e),model:f[h]});if(N.query=c,o(),b.attr("aria-expanded",!0),G&&1===N.matches.length&&W(c,0)&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(0,d)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(0,d)),I){var i=N.matches[0].label;angular.isString(c)&&c.length>0&&i.slice(0,c.length).toUpperCase()===c.toUpperCase()?R.val(c+i.slice(c.length)):R.val("")}}else U(),B(a,!0);g&&y(a,!1)},function(){U(),y(a,!1),B(a,!0)})};D&&(angular.element(i).on("resize",n),h.find("body").on("scroll",n));var Y=k(function(){N.matches.length&&o(),N.moveInProgress=!1},s);N.moveInProgress=!1,N.query=void 0;var Z,$=function(a){Z=g(function(){X(a)},u)},_=function(){Z&&g.cancel(Z)};U(),N.assignIsOpen=function(b){H(a,b)},N.select=function(d,e){var f,h,i={};x=!0,i[M.itemName]=h=N.matches[d].model,f=M.modelMapper(a,i),L(a,f),p.$setValidity("editable",!0),p.$setValidity("parse",!0),z(a,{$item:h,$model:f,$label:M.viewMapper(a,i),$event:e}),U(),N.$eval(c.typeaheadFocusOnSelect)!==!1&&g(function(){b[0].focus()},0,!1)},b.on("keydown",function(b){if(0!==N.matches.length&&-1!==r.indexOf(b.which)){if(-1===N.activeIdx&&(9===b.which||13===b.which)||9===b.which&&b.shiftKey)return U(),void N.$digest();b.preventDefault();var c;switch(b.which){case 9:case 13:N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?k(function(){N.select(N.activeIdx,b)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate["default"]):N.select(N.activeIdx,b)});break;case 27:b.stopPropagation(),U(),a.$digest();break;case 38:N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),c=S.find("li")[N.activeIdx],c.parentNode.scrollTop=c.offsetTop}}}),b.bind("focus",function(a){w=!0,0!==t||p.$viewValue||g(function(){X(p.$viewValue,a)},0)}),b.bind("blur",function(a){A&&N.matches.length&&-1!==N.activeIdx&&!x&&(x=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?k(function(){N.select(N.activeIdx,a)},N.debounceUpdate.blur):N.select(N.activeIdx,a)})),!v&&p.$error.editable&&(p.$viewValue="",b.val("")),w=!1,x=!1});var aa=function(c){b[0]!==c.target&&3!==c.which&&0!==N.matches.length&&(U(),j.$$phase||a.$digest())};h.on("click",aa),a.$on("$destroy",function(){h.off("click",aa),(D||E)&&ba.remove(),D&&(angular.element(i).off("resize",n),h.find("body").off("scroll",n)),S.remove(),I&&Q.remove()});var ba=d(S)(N);D?h.find("body").append(ba):E?angular.element(E).eq(0).append(ba):b.after(ba),this.init=function(b,c){p=b,q=c,N.debounceUpdate=p.$options&&e(p.$options.debounce)(a),p.$parsers.unshift(function(b){return w=!0,0===t||b&&b.length>=t?u>0?(_(),$(b)):X(b):(y(a,!1),_(),U()),v?b:b?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),null)}),p.$formatters.push(function(b){var c,d,e={};return v||p.$setValidity("editable",!0),C?(e.$model=b,C(a,e)):(e[M.itemName]=b,c=M.viewMapper(a,e),e[M.itemName]=void 0,d=M.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",["$$debounce",function(a){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(b,c,d){b.templateUrl=d.templateUrl,b.isOpen=function(){var a=b.matches.length>0;return b.assignIsOpen({isOpen:a}),a},b.isActive=function(a){return b.active===a},b.selectActive=function(a){b.active=a},b.selectMatch=function(c,d){var e=b.debounce();angular.isNumber(e)||angular.isObject(e)?a(function(){b.select({activeIdx:c,evt:d})},angular.isNumber(e)?e:e["default"]):b.select({activeIdx:c,evt:d})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"uib/template/typeahead/typeahead-match.html";a(g).then(function(a){var c=angular.element(a.trim());e.replaceWith(c),b(c)(d)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"<strong>$&</strong>"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion-group.html",'<div class="panel" ng-class="panelClass || \'panel-default\'">\n <div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading"><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n </div>\n <div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n </div>\n</div>\n');
-}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("uib/template/alert/alert.html",'<div class="alert" ng-class="[\'alert-\' + (type || \'warning\'), closeable ? \'alert-dismissible\' : null]" role="alert">\n <button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n </button>\n <div ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/carousel.html",'<div ng-mouseenter="pause()" ng-mouseleave="play()" class="carousel" ng-swipe-right="prev()" ng-swipe-left="next()">\n <div class="carousel-inner" ng-transclude></div>\n <a role="button" href class="left carousel-control" ng-click="prev()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n </a>\n <a role="button" href class="right carousel-control" ng-click="next()" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n </a>\n <ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n </ol>\n</div>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("uib/template/carousel/slide.html",'<div ng-class="{\n \'active\': active\n }" class="item text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/datepicker.html",'<div class="uib-datepicker" ng-switch="datepickerMode" role="application" ng-keydown="keydown($event)">\n <uib-daypicker ng-switch-when="day" tabindex="0"></uib-daypicker>\n <uib-monthpicker ng-switch-when="month" tabindex="0"></uib-monthpicker>\n <uib-yearpicker ng-switch-when="year" tabindex="0"></uib-yearpicker>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/day.html",'<table class="uib-daypicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/month.html",'<table class="uib-monthpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/popup.html",'<div>\n <ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n </ul>\n</div>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("uib/template/datepicker/year.html",'<table class="uib-yearpicker" role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/backdrop.html",'<div class="modal-backdrop"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(a){a.put("uib/template/modal/window.html",'<div modal-render="{{$isRendered}}" tabindex="-1" role="dialog" class="modal"\n uib-modal-animation-class="fade"\n modal-in-class="in"\n ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}">\n <div class="modal-dialog {{size ? \'modal-\' + size : \'\'}}"><div class="modal-content" uib-modal-transclude></div></div>\n</div>\n')}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pager/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pager.html",'<ul class="pager">\n <li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("uib/template/pagination/pagination.html",'<ul class="pagination">\n <li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText(\'first\')}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)">{{::getText(\'previous\')}}</a></li>\n <li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)">{{page.text}}</a></li>\n <li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)">{{::getText(\'next\')}}</a></li>\n <li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)">{{::getText(\'last\')}}</a></li>\n</ul>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="tooltip-arrow"></div>\n <div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-html.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover-template.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("uib/template/popover/popover.html",'<div class="popover"\n tooltip-animation-class="fade"\n uib-tooltip-classes\n ng-class="{ in: isOpen() }">\n <div class="arrow"></div>\n\n <div class="popover-inner">\n <h3 class="popover-title" ng-bind="title" ng-if="title"></h3>\n <div class="popover-content" ng-bind="content"></div>\n </div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select()" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("uib/template/tabs/tabset.html",'<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input style="width:50px;" type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input style="width:50px;" type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input style="width:50px;" type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="{{::tabindex}}"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-match.html",'<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-sortable/v0.13.4/sortable.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-sortable/v0.13.4/sortable.min.js
deleted file mode 100644
index af538bcf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/angular-ui/ui-sortable/v0.13.4/sortable.min.js
+++ /dev/null
@@ -1,8 +0,0 @@
-/**
- * angular-ui-sortable - This directive allows you to jQueryUI Sortable.
- * @version v0.13.4 - 2015-06-07
- * @link http://angular-ui.github.com
- * @license MIT
- */
-
-!function(a,b,c){"use strict";b.module("ui.sortable",[]).value("uiSortableConfig",{}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(a,d,e){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(f,g,h,i){function j(a,b){return b&&"function"==typeof b?function(){a.apply(this,arguments),b.apply(this,arguments)}:a}function k(a){var b=a.data("ui-sortable");return b&&"object"==typeof b&&"ui-sortable"===b.widgetFullName?b:null}function l(a,b){var c=a.sortable("option","helper");return"clone"===c||"function"==typeof c&&b.item.sortable.isCustomHelperUsed()}function m(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))}function n(a,b){for(var c=null,d=0;d<a.length;d++){var e=a[d];if(e.element[0]===b[0]){c=e.scope;break}}return c}function o(a,b){b.item.sortable._destroy()}var p,q={},r={"ui-floating":c},s={receive:null,remove:null,start:null,stop:null,update:null},t={helper:null};return b.extend(q,r,a,f.uiSortable),b.element.fn&&b.element.fn.jquery?(i?(f.$watch("ngModel.length",function(){d(function(){k(g)&&g.sortable("refresh")},0,!1)}),s.start=function(a,d){if("auto"===q["ui-floating"]){var e=d.item.siblings(),f=k(b.element(a.target));f.floating=m(e)}d.item.sortable={model:i.$modelValue[d.item.index()],index:d.item.index(),source:d.item.parent(),sourceModel:i.$modelValue,cancel:function(){d.item.sortable._isCanceled=!0},isCanceled:function(){return d.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!d.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:d.item.sortable._isCustomHelperUsed,_destroy:function(){b.forEach(d.item.sortable,function(a,b){d.item.sortable[b]=c})}}},s.activate=function(a,c){p=g.contents();var d=g.sortable("option","placeholder");if(d&&d.element&&"function"==typeof d.element){var e=d.element();e=b.element(e);var h=g.find('[class="'+e.attr("class")+'"]:not([ng-repeat], [data-ng-repeat])');p=p.not(h)}var i=c.item.sortable._connectedSortables||[];i.push({element:g,scope:f}),c.item.sortable._connectedSortables=i},s.update=function(a,b){if(!b.item.sortable.received){b.item.sortable.dropindex=b.item.index();var c=b.item.parent();b.item.sortable.droptarget=c;var d=n(b.item.sortable._connectedSortables,c);b.item.sortable.droptargetModel=d.ngModel,g.sortable("cancel")}l(g,b)&&!b.item.sortable.received&&"parent"===g.sortable("option","appendTo")&&(p=p.not(p.last())),p.appendTo(g),b.item.sortable.received&&(p=null),b.item.sortable.received&&!b.item.sortable.isCanceled()&&f.$apply(function(){i.$modelValue.splice(b.item.sortable.dropindex,0,b.item.sortable.moved)})},s.stop=function(a,b){!b.item.sortable.received&&"dropindex"in b.item.sortable&&!b.item.sortable.isCanceled()?f.$apply(function(){i.$modelValue.splice(b.item.sortable.dropindex,0,i.$modelValue.splice(b.item.sortable.index,1)[0])}):"dropindex"in b.item.sortable&&!b.item.sortable.isCanceled()||l(g,b)||p.appendTo(g),p=null},s.receive=function(a,b){b.item.sortable.received=!0},s.remove=function(a,b){"dropindex"in b.item.sortable||(g.sortable("cancel"),b.item.sortable.cancel()),b.item.sortable.isCanceled()||f.$apply(function(){b.item.sortable.moved=i.$modelValue.splice(b.item.sortable.index,1)[0]})},t.helper=function(a){return a&&"function"==typeof a?function(b,c){var d=a.apply(this,arguments);return c.sortable._isCustomHelperUsed=c!==d,d}:a},f.$watch("uiSortable",function(a){var c=k(g);c&&b.forEach(a,function(a,b){return b in r?("ui-floating"!==b||a!==!1&&a!==!0||(c.floating=a),void(q[b]=a)):(s[b]?("stop"===b&&(a=j(a,function(){f.$apply()}),a=j(a,o)),a=j(s[b],a)):t[b]&&(a=t[b](a)),q[b]=a,void g.sortable("option",b,a))})},!0),b.forEach(s,function(a,b){q[b]=j(a,q[b]),"stop"===b&&(q[b]=j(q[b],o))})):e.info("ui.sortable: ngModel not provided!",g),void g.sortable(q)):void e.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/README.md b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/README.md
deleted file mode 100644
index c65c68df..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/README.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# B2B Library Area
-
-## Overview
-
-This is a README document to track changes made by ECOMP Portal team to the b2b library.
-
-## Release Notes
-
-All of the release notes in the b2b area apply here.
-
---
-
-9 Mar 2017
-Modified b2b-library.min.js for ECOMP left menu feature, toggle menu icon, hide plus sign if there is no child menus:
-
-- scope.toggleNav = function (val) {
-- if(val == 0){ /*ECOMP portal change assuming the first item is home page.*/
-- location.href = "welcome.htm";
-- }else{
-+ scope.toggleNav = function (val,link) {
-+ /**Added for ECOMP: make parent menu a link if no child menus.**/
-+ if(link!=null && link!=''){
-+ location.href = link;
-+ return;
-+ }
-+ /**Ended**/
-
-30 May 2017 : Changed b2b sort icons
-+
-"<i ng-class=\"{'icon-controls-upPRIMARY active': sortPattern === 'ascending', 'icon-controls-down active down': sortPattern === 'descending'}\"></i>\n"
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/b2b-angular.css b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/b2b-angular.css
deleted file mode 100644
index 6ee85307..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/b2b-angular.css
+++ /dev/null
@@ -1,11923 +0,0 @@
-/*! b2b-angular-library - v1.0.5 - Last updated: 2017-05-24. Copyright (c) 2016 AT&T Services, Inc. */
-.b2b-horizontal-table ::-webkit-scrollbar {
- height: 10px; }
-
-.b2b-horizontal-table ::-webkit-scrollbar-thumb {
- background: #666666;
- border-radius: 5px; }
-
-.b2b-horizontal-table .b2b-frozen-col {
- font-size: 12px;
- font-weight: normal;
- font-style: italic; }
-
-.b2b-horizontal-table .b2b-horizontal-table-inner-container {
- overflow-x: scroll; }
-
-.b2b-horizontal-table .b2b-horizontal-table-column-info {
- text-align: center; }
-
-.b2b-horizontal-table .b2b-horizontal-table-legend div[b2b-flyout-toggler] {
- color: #0568ae;
- cursor: pointer; }
-
-.b2b-horizontal-table .b2b-horizontal-table-legend .b2b-frozen-cell {
- width: 16px;
- height: 16px;
- background-color: #F2F2F2;
- display: inline-block;
- margin-right: 10px; }
-
-.b2b-horizontal-table .b2b-horizontal-table-arrows {
- margin-bottom: 20px; }
- .b2b-horizontal-table .b2b-horizontal-table-arrows .b2b-disabled-text {
- color: #767676; }
- .b2b-horizontal-table .b2b-horizontal-table-arrows .b2b-next-link {
- padding-right: 15px; }
- .b2b-horizontal-table .b2b-horizontal-table-arrows .b2b-prev-link {
- padding-left: 15px; }
-
-@-moz-document url-prefix() {
- .b2b-horizontal-table td:first-child {
- border-top: none; } }
-* {
- box-sizing: border-box; }
-
-:root {
- -ms-overflow-style: -ms-autohiding-scrollbar;
- overflow-y: scroll;
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
- box-sizing: border-box;
- font: 0.625pc/1.5 sans-serif;
- text-rendering: optimizeLegibility; }
-
-html {
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
- height: 100%;
- position: relative; }
-
-h1,
-h2,
-h3,
-h4,
-h5,
-p,
-blockquote,
-figure,
-ol,
-ul {
- margin: 0;
- padding: 0; }
-
-/* a:focus {
- outline: thin dotted #191919;
-} */
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: top; }
-
-sup {
- top: .75em;
- display: inline-block; }
-
-sub {
- bottom: -0.25em; }
-
-img {
- max-width: 100%;
- height: auto;
- vertical-align: middle;
- border: 0;
- -ms-interpolation-mode: bicubic; }
-
-.img-no-rwd {
- max-width: inherit !important; }
-
-svg {
- display: inline-block; }
-
-.responsive-img {
- width: 100%;
- height: auto; }
-
-button,
-input,
-select,
-textarea {
- margin: 0;
- font-size: 100%;
- vertical-align: middle; }
-
-::-moz-focus-inner {
- padding: 0;
- border: 0; }
-
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
- appearance: button;
- cursor: pointer; }
-
-label,
-select,
-button,
-input[type="button"],
-input[type="reset"],
-input[type="submit"],
-input[type="radio"],
-input[type="checkbox"] {
- cursor: pointer; }
-
-input[type=search] {
- -webkit-appearance: textfield; }
-
-input[type=search]:-webkit-search-cancel-button,
-input[type=search]:-webkit-search-decoration {
- -webkit-appearance: none; }
-
-textarea {
- overflow: auto;
- vertical-align: top;
- resize: none; }
-
-select {
- -moz-appearance: none;
- -webkit-appearance: none; }
-
-[aria-busy=true] {
- cursor: progress; }
-
-[aria-controls] {
- cursor: pointer; }
-
-body {
- background-color: #ffffff;
- color: #191919;
- font-family: "Omnes-ECOMP-W02", Arial;
-/* font-size: 1.6rem;
- line-height: 2rem;*/
- margin: 0;
- position: relative;
- width: 100%;
- -moz-osx-font-smoothing: grayscale;
- -webkit-font-smoothing: antialiased; }
-
-small {
- font-size: 1.6rem; }
-
-.container {
- margin: 0 auto;
- padding: 0; }
-
-.tooltip {
- display: inline-block;
- height: 20px;
- margin: 1px 0 0 7px;
- vertical-align: middle; }
-
-.tooltip-wrapper {
- display: none; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02";
- src: url("../b2b-angular/fonts/Omnes_ATTW02.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Medium";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Medium.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Medium.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Medium.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Medium.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Italic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Italic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Italic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Italic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Light";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Light.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Light.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Light.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Light.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Bold";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Bold.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Bold.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Bold.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Bold.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02Bold.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Light-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Medium-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Bold-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-/* TODO: Build a reference page for these classes */
-.font-regular {
- font-family: "Omnes-ECOMP-W02", Arial !important; }
-
-.font-light {
- font-family: "Omnes-ECOMP-W02-Light", Arial !important; }
-
-.font-italic {
- font-family: "Omnes-ECOMP-W02-Italic", Arial !important; }
-
-.font-light-italic {
- font-family: "Omnes-ECOMP-W02-Light-Italic", Arial !important; }
-
-.font-medium {
- font-family: "Omnes-ECOMP-W02-Medium", Arial !important; }
-
-.font-medium-italic {
- font-family: "Omnes-ECOMP-W02-Medium-Italic",Arial !important; }
-
-.font-reset {
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
- text-transform: none; }
-
-.visible-phone {
- display: none !important; }
-
-.visible-tablet {
- display: none !important; }
-
-.hidden-desktop {
- display: none !important; }
-
-.visible-desktop {
- display: inherit !important; }
-
-.row,
-.row-nowrap {
- margin-left: 0; }
-
-.row:before,
-.row-nowrap:before,
-.row:after,
-.row-nowrap:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.row:after,
-.row-nowrap:after {
- clear: both; }
-
-.row:before,
-.row-nowrap:before,
-.row:after,
-.row-nowrap:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.row:after,
-.row-nowrap:after {
- clear: both; }
-
-.row,
-.row-nowrap {
- display: flex; }
-
-.row > [class*="span"],
-.row-nowrap > [class*="span"] {
- float: left;
- margin-right: 14px;
- margin-right: 1.40845%\9; }
-
-.row > [class*="span"]:last-child,
-.row-nowrap > [class*="span"]:last-child {
- margin-right: 0; }
-
-.row > [class*="span"].centered,
-.row-nowrap > [class*="span"].centered {
- margin-left: auto !important;
- margin-right: auto !important; }
-
-.row.no-flex,
-.row-nowrap.no-flex {
- display: block; }
-
-.row.no-flex > [class*="span"],
-.row-nowrap.no-flex > [class*="span"] {
- margin-right: 1.408450704225352%; }
-
-.row.no-flex > [class*="span"]:last-child,
-.row-nowrap.no-flex > [class*="span"]:last-child {
- margin-right: 0; }
-
-.row.flex-justify,
-.row-nowrap.flex-justify {
- justify-content: space-between; }
-
-.row.flex-justify > [class*="span"],
-.row-nowrap.flex-justify > [class*="span"] {
- flex: 1 1 0; }
-
-.row.flex-justify > .flex-col,
-.row-nowrap.flex-justify > .flex-col {
- margin-right: 14px;
- margin-right: 1.40845%\9; }
-
-.row.flex-wrap,
-.row-nowrap.flex-wrap {
- flex-wrap: wrap; }
-
-.align-items-top {
- align-items: flex-start; }
-
-.align-items-center {
- align-items: center; }
-
-.align-items-bottom {
- align-items: flex-end; }
-
-.align-self-top {
- align-self: flex-start; }
-
-.align-self-center {
- align-self: center; }
-
-.align-self-bottom {
- align-self: flex-end; }
-
-.row .fixed-230 {
- flex: 0;
- display: block;
- width: 230px;
- vertical-align: top;
- min-width: 230px;
- background-color: #efefef; }
-
-.row .fluid-space {
- flex: 1 1 0;
- display: block;
- vertical-align: top;
- padding-left: 0;
- padding-right: 20px;
- width: 100%; }
-
-.row .fixed-230 + .fluid-space {
- padding-left: 20px;
- padding-right: 20px; }
-
-.row .fluid-space:last-child {
- padding-right: 0; }
-
-.span1 {
- width: 7.042253521126761%; }
-
-.span2 {
- width: 15.49295774647887%; }
-
-.span3 {
- width: 23.94366197183099%; }
-
-.span4 {
- width: 32.3943661971831%; }
-
-.span5 {
- width: 40.84507042253521%; }
-
-.span6 {
- width: 49.29577464788733%; }
-
-.span7 {
- width: 57.74647887323944%; }
-
-.span8 {
- width: 66.19718309859155%; }
-
-.span9 {
- width: 74.64788732394367%; }
-
-.span10 {
- width: 83.09859154929578%; }
-
-.span11 {
- width: 91.54929577464789%; }
-
-.span12 {
- width: 100%; }
-
-.offset1 {
- margin-left: 8.450704225352113%; }
-
-.offset2 {
- margin-left: 16.90140845070423%; }
-
-.offset3 {
- margin-left: 25.35211267605634%; }
-
-.offset4 {
- margin-left: 33.8028169%; }
-
-.offset5 {
- margin-left: 42.25352113%; }
-
-.offset6 {
- margin-left: 50.70422535%; }
-
-.offset7 {
- margin-left: 59.15492958%; }
-
-.offset8 {
- margin-left: 67.6056338%; }
-
-.offset9 {
- margin-left: 76.05633803%; }
-
-.offset10 {
- margin-left: 84.50704225%; }
-
-.offset11 {
- margin-left: 92.95774648%; }
-
-.align-center {
- margin: 0 auto;
- text-align: center; }
-
-[class*="span"].align-center {
- margin: 0 auto !important;
- float: none; }
-
-.align-left .container {
- padding-left: 0 !important;
- margin: 0 !important; }
-
-/* BEGIN RESPONSIVE-4.LESS ************** */
-@media (min-width: 1025px) {
- .row > [class*="span"],
- .row-nowrap > [class*="span"] {
- margin-right: 20px;
- margin-right: 1.487301587301587%\9; }
- .container {
- padding-left: 20px;
- padding-right: 20px;
- max-width: 1260px; }
- /* 1col = 6.878306878306879 */
- /* 1colgutter = 1.587301587301587 */
- .span0 {
- display: none; }
- .span1 {
- width: 6.878306878306879%; }
- .span2 {
- width: 15.34391534391534%; }
- .span3 {
- width: 23.80952380952381%; }
- .span4 {
- width: 32.27513227513228%; }
- .span5 {
- width: 40.74074074074074%; }
- .span6 {
- width: 49.20634920634921%; }
- .span7 {
- width: 57.67195767195767%; }
- .span8 {
- width: 66.13756613756614%; }
- .span9 {
- width: 74.60317460317461%; }
- .span10 {
- width: 83.06878306878308%; }
- .span11 {
- width: 91.53439153439154%; }
- .span12 {
- width: 100%; }
- .offset1 {
- margin-left: 8.465608465608466%; }
- .offset2 {
- margin-left: 16.93121693121693%; }
- .offset3 {
- margin-left: 25.3968253968254%; }
- .offset4 {
- margin-left: 33.86243386%; }
- .offset5 {
- margin-left: 42.32804233%; }
- .offset6 {
- margin-left: 50.79365079%; }
- .offset7 {
- margin-left: 59.25925926%; }
- .offset8 {
- margin-left: 67.72486772%; }
- .offset9 {
- margin-left: 76.19047619%; }
- .offset10 {
- margin-left: 84.65608466%; }
- .offset11 {
- margin-left: 93.12169312%; }
- .tooltip-size-control {
- position: relative;
- width: 400px; }
- .thumbnails > li {
- margin-left: 1.40845070422535%; }
- .row .thumbnails {
- margin-left: 0; } }
-
-/* END RESPONSIVE-4.LESS ****************** */
-/* BEGIN RESPONSIVE-3.LESS ******************* */
-@media (min-width: 768px) and (max-width: 1024px) {
- .hidden-desktop {
- display: inherit !important; }
- .visible-desktop {
- display: none !important; }
- .visible-tablet {
- display: inherit !important; }
- .hidden-tablet {
- display: none !important; }
- .container {
- width: 100%;
- margin: 0 auto;
- padding-left: 20px;
- padding-right: 20px; }
- .span0-md {
- display: none; }
- .span1-md {
- width: 7.042253521126761%; }
- .span2-md {
- width: 15.49295774647887%; }
- .span3-md {
- width: 23.94366197183099%; }
- .span4-md {
- width: 32.3943661971831%; }
- .span5-md {
- width: 40.84507042253521%; }
- .span6-md {
- width: 49.29577464788733%; }
- .span7-md {
- width: 57.74647887323944%; }
- .span8-md {
- width: 66.19718309859155%; }
- .span9-md {
- width: 74.64788732394367%; }
- .span10-md {
- width: 83.09859154929578%; }
- .span11-md {
- width: 91.54929577464789%; }
- .span12-md {
- width: 100%; }
- .offset1-md {
- margin-left: 8.450704225352113%; }
- .offset2-md {
- margin-left: 16.90140845070423%; }
- .offset3-md {
- margin-left: 25.35211267605634%; }
- .offset4-md {
- margin-left: 33.8028169%; }
- .offset5-md {
- margin-left: 42.25352113%; }
- .offset6-md {
- margin-left: 50.70422535%; }
- .offset7-md {
- margin-left: 59.15492958%; }
- .offset8-md {
- margin-left: 67.6056338%; }
- .offset9-md {
- margin-left: 76.05633803%; }
- .offset10-md {
- margin-left: 84.50704225%; }
- .offset11-md {
- margin-left: 92.95774648%; }
- .tooltip-size-control {
- position: relative;
- width: 300px; } }
-
-/* END RESPONSIVE-3.LESS ******************* */
-/* BEGIN RESPONSIVE-2.LESS *************** */
-@media (max-width: 767px) {
- .hidden-desktop {
- display: inherit !important; }
- .visible-desktop {
- display: none !important; }
- .visible-phone {
- display: inherit !important; }
- .visible-tablet {
- display: inherit !important; }
- .hidden-phone {
- display: none !important; }
- .hidden-tablet {
- display: none !important; }
- .container {
- width: auto;
- padding-left: 15px;
- padding-right: 15px; }
- /*.row{ display:block; }*/
- .row > [class*="span"] {
- float: none;
- margin-left: 0;
- margin-right: 0;
- width: 100%; }
- .row {
- display: block; }
- .row.flex > .flex-col,
- .row-nowrap.flex > .flex-col {
- margin-right: 0; }
- .row .fixed-230 {
- display: block;
- width: 100%; }
- .row .fluid-space {
- display: block;
- padding-left: 0;
- padding-right: 0;
- width: auto; }
- .row .fluid-space + .fixed-230 {
- padding-left: 0; }
- .row .fluid-space:last-child {
- padding-right: 0; }
- .span0-sm {
- display: none; }
- .span1-sm {
- width: 7.042253521126761%; }
- .span2-sm {
- width: 15.49295774647887%; }
- .span3-sm {
- width: 23.94366197183099%; }
- .span4-sm {
- width: 32.3943661971831%; }
- .span5-sm {
- width: 40.84507042253521%; }
- .span6-sm {
- width: 49.29577464788733%; }
- .span7-sm {
- width: 57.74647887323944%; }
- .span8-sm {
- width: 66.19718309859155%; }
- .span9-sm {
- width: 74.64788732394367%; }
- .span10-sm {
- width: 83.09859154929578%; }
- .span11-sm {
- width: 91.54929577464789%; }
- .span12-sm {
- width: 100%; }
- .offset1-sm {
- margin-left: 8.450704225352113%; }
- .offset2-sm {
- margin-left: 16.90140845070423%; }
- .offset3-sm {
- margin-left: 25.35211267605634%; }
- .offset4-sm {
- margin-left: 33.8028169%; }
- .offset5-sm {
- margin-left: 42.25352113%; }
- .offset6-sm {
- margin-left: 50.70422535%; }
- .offset7-sm {
- margin-left: 59.15492958%; }
- .offset8-sm {
- margin-left: 67.6056338%; }
- .offset9-sm {
- margin-left: 76.05633803%; }
- .offset10-sm {
- margin-left: 84.50704225%; }
- .offset11-sm {
- margin-left: 92.95774648%; }
- input {
- padding: 8px 15px 8px 15px; }
- .field-group input.input-emphasized[type="search"] + .reset-field:after {
- top: 14px; }
- .field-group input.input-emphasized[type="search"] + .reset-field {
- height: 46px;
- top: 1px; }
- .marquee {
- margin-bottom: 30px; }
- .marquee .blur-overlay {
- border-radius: 0;
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- margin: 0;
- padding: 34px 15px 30px; }
- .marquee + div {
- margin-top: 30px; }
- .marquee h1 {
- font-size: 1.8rem;
- letter-spacing: -0.035px; }
- .marquee .lead {
- font-size: 3.0rem;
- line-height: 3.6rem;
- margin-bottom: 0; }
- .marquee p:not(.lead) {
- font-family: "Omnes-ECOMP-W02-Light", Arial;
- font-size: 1.8rem;
- margin-bottom: 0; }
- .marquee .btn-fullwidth {
- margin-top: 10px;
- width: 100%;
- float: none; }
- .tooltip-size-control {
- width: 100%; }
- .table-wrapper,
- .accordion-table-layout {
- margin-left: -15px;
- margin-right: -15px; }
- .table-wrapper caption {
- padding-left: 15px; } }
-
-@media (max-width: 480px) {
- .span1-xsm {
- width: 7.042253521126761%; }
- .span2-xsm {
- width: 15.49295774647887%; }
- .span3-xsm {
- width: 23.94366197183099%; }
- .span4-xsm {
- width: 32.3943661971831%; }
- .span5-xsm {
- width: 40.84507042253521%; }
- .span6-xsm {
- width: 49.29577464788733%; }
- .span7-xsm {
- width: 57.74647887323944%; }
- .span8-xsm {
- width: 66.19718309859155%; }
- .span9-xsm {
- width: 74.64788732394367%; }
- .span10-xsm {
- width: 83.09859154929578%; }
- .span11-xsm {
- width: 91.54929577464789%; }
- .span12-xsm {
- width: 100%; }
- .offset1-xsm {
- margin-left: 8.450704225352113%; }
- .offset2-xsm {
- margin-left: 16.90140845070423%; }
- .offset3-xsm {
- margin-left: 25.35211267605634%; }
- .offset4-xsm {
- margin-left: 33.8028169%; }
- .offset5-xsm {
- margin-left: 42.25352113%; }
- .offset6-xsm {
- margin-left: 50.70422535%; }
- .offset7-xsm {
- margin-left: 59.15492958%; }
- .offset8-xsm {
- margin-left: 67.6056338%; }
- .offset9-xsm {
- margin-left: 76.05633803%; }
- .offset10-xsm {
- margin-left: 84.50704225%; }
- .offset11-xsm {
- margin-left: 92.95774648%; } }
-
-/* END RESPONSIVE-2.LESS ******************* */
-/* BEGIN RESPONSIVE-1.LESS ************** */
-.xxxxxxxx-begin-responsive-480px.less {
- /* placeholder */ }
-
-@media (max-width: 480px) {
- .hidden-desktop {
- display: inherit !important; }
- .hidden-tablet {
- display: inherit !important; }
- .hidden-phone {
- display: none !important; }
- .visible-desktop {
- display: none !important; }
- .visible-tablet {
- display: none !important; }
- .visible-phone {
- display: inherit !important; }
- .container {
- width: auto;
- padding-left: 15px;
- padding-right: 15px; } }
-
-@font-face {
- font-family: 'icoPrimary';
- src: url("../b2b-angular/fonts/icons/icoPrimary.eot?timestamp=@@timestamp");
- src: url("../b2b-angular/fonts/icons/icoPrimary.eot?timestamp=@@timestamp#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/icons/icoPrimary.ttf?timestamp=@@timestamp") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-[class*="icon-primary-"],
-.nav-links a:after,
-.bellyband-link a:after,
-.breadcrumb > li:after,
-.checkbox input:checked + .skin:after,
-.checkbox input.indeterminate + .skin:after,
-.checkbox input:indeterminate + .skin:after,
-.selectWrap.large:before,
-.form-row.error .error-msg:before,
-.close:before,
-.reset-field:before,
-.cssIcon-globe:before,
-.selectWrap:after {
- color: #0568ae;
- display: inline-block;
- font-family: 'icoPrimary';
- font-style: normal;
- font-size: 20px;
- font-weight: normal;
- font-variant: normal;
- height: 1em;
- margin-right: 7px;
- text-transform: none;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- position: relative;
- speak: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- vertical-align: middle;
- width: 1em; }
-
-[class*="icoWeather-"], [class*="icoTrans-"], [class*="icoBubble-"], [class*="icoRetail-"], [class*="icoPeople-"], [class*="icoNumslets-"], [class*="icoLocation-"], [class*="icoHealthcare-"], [class*="icoDocuments-"], [class*="icoDevices-"], [class*="icoDatanetwork-"], [class*="icoControls-"], [class*="icoBuilding-"], [class*="icoArrows-"] {
- color: #0568ae;
- display: inline-block;
- font-style: normal;
- font-size: 20px;
- font-weight: normal;
- font-variant: normal;
- font-style: normal;
- width: 20px;
- text-transform: none;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- position: relative;
- speak: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- vertical-align: middle; }
-
-[class*="icon-primary-"]:before,
-[class*="icon-primary-"]:after {
- box-sizing: border-box;
- display: inline-block;
- font-size: 1em;
- height: 1em;
- position: relative;
- top: 0;
- left: 0;
- vertical-align: middle;
- width: 1em; }
-
-.icon-primary-att-globe:before,
-.cssIcon-globe:before {
- content: "\e900";
- color: #44c7f5; }
-
-.icon-primary-hamburger:before {
- content: "\e903"; }
-
-.icon-primary-secure:before {
- content: "\e918"; }
-
-.icon-primary-secureL:before {
- content: "\e919"; }
-
-.icon-primary-padlockopen:before {
- content: "\e916"; }
-
-.icon-primary-padlockopenL:before {
- content: "\e917"; }
-
-.icon-primary-shoppingcart:before {
- content: "\e914"; }
-
-.icon-primary-shoppingcartL:before {
- content: "\e915"; }
-
-.icon-primary-print:before {
- content: "\e921"; }
-
-.icon-primary-printL:before {
- content: "\e922"; }
-
-.icon-primary-mobilesmartphone:before {
- content: "\e908"; }
-
-.icon-primary-mobilesmartphoneL:before {
- content: "\e90c"; }
-
-.icon-primary-tablet:before {
- content: "\e904"; }
-
-.icon-primary-tabletL:before {
- content: "\e905"; }
-
-.icon-primary-tv:before {
- content: "\e906"; }
-
-.icon-primary-tvL:before {
- content: "\e907"; }
-
-.icon-primary-calendar {
- width: 100% !important; }
-
-.icon-primary-calendar:before {
- content: "\e91a";
- z-index: 1; }
-
-.icon-primary-calendarL:before {
- content: "\e91b"; }
-
-.icon-primary-star:before {
- content: "\e96c"; }
-
-.icon-primary-close:before,
-.close:before,
-.reset-field:before {
- content: "\e910"; }
-
-.icon-primary-down:before {
- content: "\ea3c"; }
-
-.checkbox input.indeterminate + .skin:after,
-.icon-primary-subtractminimize:before {
- content: "\e920"; }
-
-.icon-primary-add-maximize:before {
- content: "\e91f"; }
-
-.icon-primary-check:before,
-.checkbox input:checked + .skin:after {
- content: "\e912"; }
-
-.icon-primary-questionmark:before {
- content: "\e90f"; }
-
-.icon-primary-badgealert:before,
-.form-row.error .error-msg:before {
- content: "\e90e"; }
-
-.icon-primary-approval:before {
- content: "\e925"; }
-
-.icon-primary-flat-info:before {
- content: "\e927"; }
-
-.icon-primary-alert:before {
- content: "\e913"; }
-
-.icon-primary-tooltip:before,
-.icon-primary-flat-faq:before {
- content: "\e90d"; }
-
-.icon-primary-tooltip {
- font-size: 20px; }
-
-.nav-links a:after,
-.bellyband-link a:after,
-.breadcrumb > li:after,
-.icon-primary-right:before {
- content: "\ea3c";
- transform: rotate(-90deg); }
-
-.icon-primary-left:before {
- content: "\ea3c";
- transform: rotate(90deg); }
-
-.icon-primary-accordion-plus:after,
-.icon-primary-collapsed:after,
-.icon-primary-accordion-minus:after,
-.icon-primary-expanded:after {
- content: "";
- position: absolute;
- top: 0;
- z-index: 1; }
-
-.icon-primary-accordion-minus,
-.icon-primary-expanded,
-.icon-primary-accordion-plus,
-.icon-primary-collapsed {
- font-size: 20px !important; }
-
-:not(.ds2-no-colors) .icon-primary-accordion-minus:before,
-:not(.ds2-no-colors) .icon-primary-expanded:before {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M15.1%2011.3H5.9c-.4%200-.8-.3-.8-.8s.3-.8.8-.8h9.3c.4%200%20.8.3.8.8s-.4.8-.9.8z%22%2F%3E%3Cpath%20fill%3D%22%23d2d2d2%22%20d%3D%22M10.5%2021C4.7%2021%200%2016.3%200%2010.5S4.7%200%2010.5%200%2021%204.7%2021%2010.5%2016.3%2021%2010.5%2021zm0-20C5.3%201%201%205.3%201%2010.5S5.3%2020%2010.5%2020s9.5-4.3%209.5-9.5S15.7%201%2010.5%201z%22%2F%3E%3C%2Fsvg%3E");
- content: ""; }
-
-:not(.ds2-no-colors) .icon-primary-accordion-plus:before,
-:not(.ds2-no-colors) .icon-primary-collapsed:before {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2021%2021%22%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M10.5%2015.9c-.4%200-.8-.3-.8-.8V5.9c0-.4.3-.8.8-.8s.8.3.8.8v9.3c0%20.4-.4.7-.8.7z%22%2F%3E%3Cpath%20fill%3D%22%230568ae%22%20d%3D%22M15.1%2011.3H5.9c-.4%200-.8-.3-.8-.8s.3-.8.8-.8h9.3c.4%200%20.8.3.8.8s-.4.8-.9.8z%22%2F%3E%3Cpath%20fill%3D%22%23d2d2d2%22%20d%3D%22M10.5%2021C4.7%2021%200%2016.3%200%2010.5S4.7%200%2010.5%200%2021%204.7%2021%2010.5%2016.3%2021%2010.5%2021zm0-20C5.3%201%201%205.3%201%2010.5S5.3%2020%2010.5%2020s9.5-4.3%209.5-9.5S15.7%201%2010.5%201z%22%2F%3E%3C%2Fsvg%3E");
- content: ""; }
-
-.ds2-no-colors .icon-primary-accordion-minus:before,
-.ds2-no-colors .icon-primary-expanded:before {
- background-image: none;
- content: "\e901"; }
-
-.ds2-no-colors .icon-primary-accordion-minus:after,
-.ds2-no-colors .icon-primary-expanded:after {
- content: "\e902"; }
-
-.ds2-no-colors .icon-primary-accordion-plus:before,
-.ds2-no-colors .icon-primary-collapsed:before {
- background-image: none;
- content: "\e90b"; }
-
-.ds2-no-colors .icon-primary-accordion-plus:after,
-.ds2-no-colors .icon-primary-collapsed:after {
- content: "\e911"; }
-
-.icon-primary-circle-arrow {
- outline: 1px solid transparent;
- border-radius: 50%;
- font-size: 20px !important;
- background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
- margin-right: 7px; }
-
-.icon-primary-circle-arrow:after {
- background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2036%2036%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20baseProfile%3D%22tiny%22%3E%3Ccircle%20r%3D%2217%22%20cy%3D%2218%22%20cx%3D%2218%22%20stroke-width%3D%221%22%20fill%3D%22transparent%22%20stroke%3D%22%23ccc%22%2F%3E%3C%2Fsvg%3E");
- content: "";
- position: absolute;
- top: 0;
- z-index: 2; }
-
-.icon-primary-circle-arrow:before {
- border-radius: 50%;
- content: "\ea3c";
- font-size: 12px;
- top: 0;
- position: absolute;
- transform: rotate(-90deg);
- width: 20px;
- z-index: 1; }
-
-[class*="icon-primary-"] [class*="icon-primary-"] {
- display: inline-block;
- float: left;
- font-size: 1em;
- margin-left: -1em;
- position: absolute; }
-
-[class*="icon-primary-"].white, [class^="ico"][class*="-"].white {
- color: #fff; }
-
-[class*="icon-primary-"].black, [class^="ico"][class*="-"].black {
- color: #000; }
-
-[class*="icon-primary-"].blue, [class^="ico"][class*="-"].blue {
- color: #0568ae; }
-
-[class*="icon-primary-"].green, [class^="ico"][class*="-"].green {
- color: #007a3e; }
-
-@-webkit-viewport {
- width: device-width; }
-
-@-moz-viewport {
- width: device-width; }
-
-@-ms-viewport {
- width: device-width; }
-
-@-o-viewport {
- width: device-width; }
-
-@viewport {
- width: device-width; }
-
-.clearfix:before,
-.clearfix:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.clearfix:after {
- clear: both; }
-
-.pull-right {
- float: right !important; }
-
-.pull-left {
- float: left !important; }
-
-.float-children-left:before,
-.float-children-left:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.float-children-left:after {
- clear: both; }
-
-.float-children-left > div {
- float: left;
- white-space: nowrap; }
-
-.block {
- display: block !important; }
-
-.inline {
- display: inline !important; }
-
-.inline-block {
- display: inline-block !important; }
-
-.table-cell {
- display: table-cell !important;
- width: 1%;
- vertical-align: middle; }
-
-@media (max-width: 767px) {
- .full-bleed {
- width: auto;
- margin-left: -15px;
- margin-right: -15px;
- padding: 15px; } }
-
-@media (min-width: 768px) {
- .full-bleed {
- width: auto;
- margin-left: -20px;
- margin-right: -20px;
- padding: 20px; } }
-
-@media (max-width: 480px) {
- .full-bleed {
- width: auto;
- margin-left: -15px;
- margin-right: -15px;
- padding: 0 15px; } }
-
-.fade {
- opacity: 0;
- filter: alpha(opacity=0);
- transition: opacity .15s linear; }
-
-.fade.in {
- opacity: 1;
- filter: alpha(opacity=100); }
-
-.b2bCollapse {
- display: none; }
-
-.collapse.in {
- height: auto; }
-
-.nowrap {
- white-space: nowrap; }
-
-.pre {
- white-space: pre; }
-
-.hidden-spoken {
- border: 0 none !important;
- clip: rect(0px, 0px, 0px, 0px) !important;
- height: 1px !important;
- letter-spacing: 0;
- line-height: 0;
- overflow: hidden !important;
- margin-top: -1px;
- padding: 0 !important;
- position: absolute !important;
- width: 1px !important; }
-
-[data-sr-text].hidden-spoken:before {
- border: 0 none !important;
- content: attr(data-sr-text);
- clip: rect(0px, 0px, 0px, 0px) !important;
- height: 1px !important;
- letter-spacing: 0;
- line-height: 0;
- overflow: hidden !important;
- padding: 0 !important;
- position: absolute !important;
- width: 100% !important;
- z-index: -1; }
-
-[data-sr-text].hidden-spoken {
- position: relative !important;
- width: auto !important; }
-
-[data-show-between] {
- display: none;
- visibility: hidden; }
-
-.noscroll-y {
- overflow-y: hidden !important; }
-
-.invisible {
- visibility: hidden !important;
- opacity: 0 !important; }
-
-.transparent {
- background-color: rgba(255, 255, 255, 0) !important; }
-
-.hide {
- display: none !important; }
-
-.show {
- display: block !important; }
-
-.rel {
- position: relative !important; }
-
-.legend-pad {
- padding: 0 15px; }
-
-.border-top {
- border-top-width: 1px !important; }
-
-.border-left {
- border-left-width: 1px !important; }
-
-.border-right {
- border-right-width: 1px !important; }
-
-.border-bottom {
- border-bottom-width: 1px !important; }
-
-.border-dark {
- border-color: #000; }
-
-.border-light {
- border-color: #fff; }
-
-.no-border-top {
- border-top-width: 0 !important; }
-
-.no-border-left {
- border-left-width: 0 !important; }
-
-.no-border-right {
- border-right-width: 0 !important; }
-
-.no-border-bottom {
- border-bottom-width: 0 !important; }
-
-.align-middle {
- margin: 0 auto !important; }
-
-.align-top {
- position: absolute;
- top: 0; }
-
-.align-bottom {
- position: absolute;
- bottom: 0; }
-
-.valign-top {
- vertical-align: top !important; }
-
-.valign-middle {
- vertical-align: middle !important; }
-
-.valign-bottom {
- vertical-align: bottom !important; }
-
-.align-children-middle > * {
- margin: 0 auto; }
-
-[class*="valign-children-"] {
- display: table; }
-
-[class*="valign-children-"] > * {
- display: table-cell; }
-
-.valign-children-top > * {
- vertical-align: top; }
-
-.valign-children-middle > * {
- vertical-align: middle; }
-
-.valign-children-bottom > * {
- vertical-align: bottom; }
-
-.no-pad {
- padding: 0 !important; }
-
-.top-space {
- margin-top: 60px !important; }
-
-.bottom-space {
- margin-bottom: 60px !important; }
-
-.top-pad {
- padding-top: 60px !important; }
-
-.bottom-pad {
- padding-bottom: 60px !important; }
-
-@media (max-width: 767px) {
- .top-space {
- margin-top: 30px !important; }
- .bottom-space {
- margin-bottom: 30px !important; }
- .top-pad {
- padding-top: 30px !important; }
- .bottom-pad {
- padding-bottom: 30px !important; } }
-
-.affix {
- position: fixed; }
-
-.img-landscape,
-.img-portrait {
- position: relative; }
-
-@media (orientation: landscape) {
- .img-landscape {
- display: block; }
- .img-portrait {
- display: none !important; } }
-
-@media (orientation: portrait) {
- .img-landscape {
- display: none !important; }
- .img-portrait {
- display: block; } }
-
-.dark-bg {
- background-color: #222222; }
-
-/* ... JAVASCRIPT HOOKS .................
- ... used by javascript ............... */
-.autoSize,
-.autoSize-this {
- position: relative; }
-
-.truncate {
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis; }
-
-.placeholdersjs {
- color: #5a5a5a !important; }
-
-.jshook-return-focus-here {
- display: block; }
-
-.visible-print {
- display: none !important; }
-
-.hidden-print {
- display: inherit !important; }
-
-@media print {
- .visible-print {
- display: inherit !important; }
- .hidden-print {
- display: none !important; }
- * {
- color: #000 !important;
- background: transparent !important;
- box-shadow: none !important; }
- a,
- a:visited {
- text-decoration: underline; }
- pre,
- blockquote {
- border: 1px solid #000;
- page-break-inside: avoid; }
- thead {
- display: table-header-group; }
- tr,
- img {
- page-break-inside: avoid; }
- img {
- max-width: 100% !important; }
- @page {
- margin: 0.5cm; }
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3; }
- h2,
- h3 {
- page-break-after: avoid; } }
-
-.mar-top-0 {
- margin-top: 0px; }
-
-.mar-top-30 {
- margin-top: 30px; }
-
-a:focus {
- outline: thin dotted #191919; }
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
- font-weight: normal;
- text-rendering: optimizeLegibility;
- margin: 0;
- line-height: 1; }
-
-.heading-page {
- font-size: 3.8rem !important;
- font-family: "Omnes-ECOMP-W02-Light", Arial;
- margin-bottom: 40px; }
-
-.heading-major-section {
- font-size: 3rem !important;
- font-family: "Omnes-ECOMP-W02-Light", Arial;
- margin-bottom: 40px !important; }
-
-.heading-sub-section {
- font-size: 2.4rem !important;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 40px; }
-
-.heading-group {
- font-size: 2rem !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- color: #ea7400;
- margin-bottom: 20px !important; }
-
-.heading-medium {
- font-size: 2rem !important;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px; }
-
-.heading-medium-emphasis {
- font-size: 2rem !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- margin-bottom: 20px; }
-
-.heading-small {
- font-size: 1.8rem !important;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px; }
-
-.heading-small-emphasis {
- font-size: 1.8rem !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- margin-bottom: 20px; }
-
-.heading-micro {
- font-size: 1.3rem !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- text-transform: uppercase;
- color: #da0081;
- margin-bottom: 10px; }
-
-* + .heading-major-section {
- margin-top: 60px; }
-
-* + .heading-sub-section {
- margin-top: 60px; }
-
-* + .heading-group {
- margin-top: 40px !important; }
-
-* + .heading-medium {
- margin-top: 40px; }
-
-* + .heading-medium-emphasis {
- margin-top: 40px; }
-
-* + .heading-small {
- margin-top: 40px; }
-
-* + .heading-small-emphasis {
- margin-top: 40px; }
-
-* + .heading-micro {
- margin-top: 20px; }
-
-.lead {
- color: #666;
- font-family: "Omnes-ECOMP-W02-Light-Italic", Arial;
- font-size: 2.4rem;
- line-height: 2.8rem;
- margin-top: 10px;
- letter-spacing: -0.024rem; }
-
-.eyebrow {
- text-transform: uppercase;
- line-height: .65 !important; }
-
-.eyebrow,
-.subheading {
- font-size: 1.4rem !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- color: #666; }
-
-.eyebrow + .heading-major-section,
-.eyebrow + .heading-sub-section {
- margin-top: 4px; }
-
-.subheading {
- margin-top: 10px; }
-
-@media (max-width: 767px) {
- h1,
- h2,
- h3,
- h4,
- h5,
- h6,
- .heading-page {
- font-size: 2rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 30px; }
- .heading-major-section {
- font-size: 2rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 30px; }
- .heading-sub-section {
- font-size: 2rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px; }
- .heading-medium {
- font-size: 2rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px; }
- .heading-medium-emphasis {
- font-size: 2rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px; }
- .heading-small {
- font-size: 1.6rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 10px; }
- .heading-small-emphasis {
- font-size: 1.6rem;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- margin-bottom: 5px; }
- * + .heading-major-section {
- margin-top: 30px; }
- * + .heading-sub-section {
- margin-top: 30px; }
- * + .heading-group {
- margin-top: 20px; }
- * + .heading-medium {
- margin-top: 20px; }
- * + .heading-medium-emphasis {
- margin-top: 20px; }
- * + .heading-small {
- margin-top: 20px; }
- * + .heading-small-emphasis {
- margin-top: 20px; }
- * + .heading-micro {
- margin-top: 10px; } }
-
-/* Standard Type styles */
-.zeromargin {
- margin: 0 !important; }
-
-a {
- color: #0568ae;
- text-decoration: none; }
-
-a:hover,
-a:focus {
- text-decoration: underline; }
-
-a:active {
- color: #0568ae; }
-
-.a-min {
- font-size: 12px; }
-
-.a-small {
- font-size: 14px; }
-
-.a-max {
- font-size: 18px; }
-
-a.show-qualifier {
- margin-right: 25px;
- position: relative; }
-
-a.show-qualifier:after {
- color: #333333;
- display: inline-block;
- white-space: pre !important; }
-
-a[href$="pdf"].show-qualifier:after,
-a.show-qualifier.pdf:after {
- content: " (PDF)"; }
-
-a[href$="psd"].show-qualifier:after,
-a.show-qualifier.psd:after {
- content: " (PSD)"; }
-
-.standalone-link {
- display: flex; }
-
-/* 20px for the icon, 10px left of icon */
-.standalone-link.small {
- font-size: 1.4rem; }
-
-.standalone-link.small i[class*="icon-primary-"] {
- font-size: 16px;
- top: 2px; }
-
-.standalone-link.large {
- font-size: 1.8rem; }
-
-.standalone-link.large i[class*="icon-primary-"] {
- font-size: 24px;
- top: -1px; }
-
-p {
- margin: 0 0 12px 0;
- line-height: 2rem; }
-
-.p-small {
- font-size: 1.4rem;
- line-height: 1.8rem; }
-
-p + .p-small {
- margin: 10px 0 0; }
-
-.p-micro {
- font-size: 1.2rem;
- line-height: 1.5rem; }
-
-p + .p-micro {
- margin: 10px 0 0; }
-
-.p-max {
- font-size: 1.8rem; }
-
-p + .p-max {
- margin: 10px 0 0; }
-
-b,
-strong {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-weight: normal; }
-
-i,
-em {
- font-family: "Omnes-ECOMP-W02-Italic", Arial;
- font-style: normal; }
-
-.strike {
- text-decoration: line-through; }
-
-sup {
- display: inline-block;
- font-style: normal;
- height: 1em;
- position: relative;
- vertical-align: text-top;
- width: auto; }
-
-.text-legal {
- color: #5a5a5a;
- font-size: 1.1rem;
- line-height: 1.5rem;
- margin: 0 0 10px; }
-
-.text-legal.legal-module {
- line-height: 1.3rem;
- margin: 0 0 12px; }
-
-.text-legal b,
-.text-legal strong {
- font-weight: bold; }
-
-.text-legal a {
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.text-left {
- text-align: left !important; }
-
-.text-right {
- text-align: right !important; }
-
-.text-center {
- text-align: center !important; }
-
-.text-justified {
- text-align: justify !important; }
-
-ul {
- padding: 0;
- margin: 0;
- list-style: none; }
-
-ul.bullet,
-ul.no-bullet,
-ul.lower-alpha,
-ul.lower-roman,
-ol {
- padding: 0;
- margin: 12px 0 0 20px; }
-
-ul.bullet li,
-ul.no-bullet li,
-ul.lower-alpha li,
-ul.lower-roman li,
-ol li {
- padding-left: 15px;
- line-height: 20px;
- position: relative; }
-
-ul.bullet li + li,
-ul.no-bullet li + li,
-ul.lower-alpha li + li,
-ul.lower-roman li + li,
-ol li + li {
- margin-top: 12px; }
-
-ul.bullet > li:before,
-ul.no-bullet > li:before,
-ul.lower-alpha > li:before,
-ul.lower-roman > li:before,
-ol > li:before {
- background-color: #333333;
- border: 2px solid #333333;
- border-radius: 100%;
- content: " ";
- display: block;
- height: 1px;
- left: 0;
- position: absolute;
- top: 8px;
- width: 1px; }
-
-ul.bullet ul,
-ul.no-bullet ul,
-ul.lower-alpha ul,
-ul.lower-roman ul,
-ol ul,
-ul.bullet ol,
-ul.no-bullet ol,
-ul.lower-alpha ol,
-ul.lower-roman ol,
-ol ol {
- margin-top: 12px; }
-
-ul + *,
-ol + * {
- margin-top: 20px; }
-
-ul.no-bullet,
-ul.lower-alpha,
-ul.lower-roman {
- margin: 0; }
-
-ul.no-bullet > li,
-ul.lower-alpha > li,
-ul.lower-roman > li {
- padding-left: 0; }
-
-ul.no-bullet > li:before,
-ul.lower-alpha > li:before,
-ul.lower-roman > li:before {
- display: none !important; }
-
-ol {
- margin: 20px 0 0 32px; }
-
-ol li {
- padding-left: 3px; }
-
-ol li:before {
- display: none; }
-
-ol ol {
- margin-left: 25px; }
-
-ol ul {
- margin-left: -5px; }
-
-ul ul,
-ul ol,
-ol ol,
-ol ul {
- margin-top: 0; }
-
-ul.lower-roman {
- list-style-type: lower-roman;
- margin-top: 12px;
- margin-left: 35px;
- margin-bottom: 0; }
-
-ul.lower-alpha {
- list-style-type: lower-alpha;
- margin-top: 12px;
- margin-left: 35px;
- margin-bottom: 0; }
-
-dl {
- display: table;
- margin: 0 0 20px;
- width: 100%; }
-
-dt,
-dd {
- display: table-cell; }
-
-.btn {
- background-color: transparent;
- background-clip: padding-box;
- border: 1px solid transparent;
- border-radius: 8px;
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
- cursor: pointer;
- display: inline-block;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 1.9rem;
- font-weight: normal;
- line-height: 1;
- margin: 0 7px 10px 0;
- max-width: 470px;
- min-width: 70px;
- padding: 14px 19px 11px 18px;
- position: relative;
- text-align: center;
- vertical-align: middle;
- white-space: nowrap;
- overflow: hidden; }
- .btn:focus {
- outline: 1px dotted #000;
- outline-offset: -5px; }
- .btn:last-child {
- margin-right: 0; }
- .btn::-moz-focus-inner {
- padding: 0;
- border: 0; }
- .btn i[class*="icon-primary-"].icon-primary-small {
- font-size: 24px;
- top: -2px; }
- .btn i[class*="icon-primary-"].icon-primary-medium {
- font-size: 30px;
- top: -2px; }
- .btn i[class*="icon-primary-"].icon-primary-large {
- font-size: 36px;
- top: -2px; }
-
-a.btn {
- vertical-align: middle; }
- a.btn:hover {
- text-decoration: none; }
-
-.field-group + .btn {
- margin-left: 20px; }
-
-.btn-primary {
- border-color: #ea7400 transparent #d16500;
- background-color: #ea7400 transparent #d16500;
- background: linear-gradient(to bottom, #ea7400 0%, #d16500 100%);
- color: #ffffff;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-weight: bold; }
- .btn-primary:hover {
- text-decoration: none;
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
- .btn-primary:focus {
- text-decoration: none;
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
- .btn-primary:active {
- text-decoration: none;
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
-
-.btn-arrow {
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.6rem;
- font-weight: normal;
- background-color: transparent;
- border: none;
- padding: 5px 0 0;
- top: -4px;
- color: #333333;
- position: relative; }
- .btn-arrow:hover {
- text-decoration: underline; }
- .btn-arrow:hover .btn-primary {
- text-decoration: none;
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
- .btn-arrow:hover .btn-secondary {
- color: #0568ae;
- outline-color: #000000 !important;
- background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
- .btn-arrow:hover .btn-alt {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }
- .btn-arrow:hover .btn-specialty {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
- .btn-arrow:focus {
- text-decoration: underline;
- outline: 1px dotted #666; }
- .btn-arrow:focus .btn-primary {
- text-decoration: none;
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
- .btn-arrow:focus .btn-secondary {
- color: #0568ae;
- outline-color: #000000 !important;
- background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
- .btn-arrow:focus .btn-alt {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }
- .btn-arrow:focus .btn-specialty {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
- .btn-arrow:active .btn-primary {
- text-decoration: none;
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #d16500 0%, #ea7400 100%); }
- .btn-arrow:active .btn-secondary {
- color: #0568ae;
- outline-color: #000000 !important;
- background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
- .btn-arrow:active .btn-alt {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%); }
- .btn-arrow:active .btn-specialty {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
- .btn-arrow .btn-alt {
- border-color: #087ac2 transparent #0568ae;
- background-color: #0568ae;
- background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);
- color: #ffffff; }
- .btn-arrow .btn-alt:hover {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
- .btn-arrow .btn-alt:focus {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
- .btn-arrow .btn-alt:active {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
- .btn-arrow::-moz-focus-inner {
- padding: 0;
- border: 0; }
- .btn-arrow .btn {
- border: 1px solid transparent;
- border-radius: 100%;
- height: 36px;
- margin-bottom: 0;
- margin-right: 7px;
- max-width: 36px;
- min-width: 20px;
- padding: 0;
- margin-top: -4px;
- vertical-align: middle;
- width: 36px; }
- .btn-arrow .btn .icon-primary-left {
- bottom: 0;
- display: block;
- height: 100%;
- left: 0;
- line-height: 0;
- position: absolute;
- right: 0;
- text-indent: 0;
- top: 0; }
- .btn-arrow .btn .icon-primary-left:before {
- position: absolute;
- font-size: 1.6rem;
- left: 1px;
- top: 9px; }
- .btn-arrow .btn .icon-primary-right {
- bottom: 0;
- display: block;
- height: 100%;
- left: 0;
- line-height: 0;
- position: absolute;
- right: 0;
- text-indent: 0;
- top: 0;
- color: #ffffff; }
- .btn-arrow .btn .icon-primary-right:before {
- position: absolute;
- font-size: 1.6rem;
- left: 17px;
- top: 9px; }
- .btn-arrow .btn.btn-primary .icon-primary-left {
- color: #fff; }
- .btn-arrow .btn.btn-primary .icon-primary-right {
- color: #fff; }
- .btn-arrow .btn.btn-alt .icon-primary-left {
- color: #fff; }
- .btn-arrow .btn.btn-alt .icon-primary-right {
- color: #fff; }
- .btn-arrow .btn.btn-secondary {
- border: 1px solid #d2d2d2; }
- .btn-arrow .btn.btn-secondary .icon-primary-left {
- color: #0568ae; }
- .btn-arrow .btn.btn-secondary .icon-primary-right {
- color: #0568ae; }
- .btn-arrow .btn.btn-small {
- height: 20px;
- max-width: 20px;
- min-width: 20px;
- width: 20px;
- top: -1px; }
- .btn-arrow .btn.btn-small .icon-primary-left:before {
- font-size: 10px;
- top: 4px;
- left: 0; }
- .btn-arrow .btn.btn-small .icon-primary-right:before {
- font-size: 10px;
- top: 4px;
- left: 10px; }
- .btn-arrow .btn.btn-large .icon-primary-left:before {
- font-size: 112%;
- top: 12px;
- left: 23px; }
- .btn-arrow .btn.btn-large .icon-primary-right:before {
- font-size: 112%;
- top: 12px;
- left: 23px; }
-
-.btn-secondary {
- border: 1px solid #d2d2d2;
- background-color: #f2f2f2;
- background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
- color: #0568ae;
- box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);
- padding: 14px 18px 11px 17px; }
- .btn-secondary:hover {
- color: #0568ae;
- outline-color: #000000 !important;
- background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
- .btn-secondary:focus {
- color: #0568ae;
- outline-color: #000000 !important;
- background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
- .btn-secondary:active {
- color: #0568ae;
- outline-color: #000000 !important;
- background: linear-gradient(to bottom, #f2f2f2 0%, #fcfcfc 100%); }
-
-.btn-alt {
- border-color: #087ac2 transparent #0568ae;
- background-color: #0568ae;
- background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);
- color: #ffffff; }
- .btn-alt:hover {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
- .btn-alt:focus {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
- .btn-alt:active {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #0568ae 0%, #087ac2 100%); }
-
-.btn-specialty {
- border-color: #008744 transparent #007a3e;
- background-color: #007a3e;
- background: linear-gradient(to bottom, #008744 0%, #007a3e 100%);
- color: #ffffff; }
- .btn-specialty:hover {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
- .btn-specialty:focus {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
- .btn-specialty:active {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: linear-gradient(to bottom, #007a3e 0%, #008744 100%); }
-
-.btn-clear {
- background: transparent !important;
- border-color: transparent !important;
- font-weight: normal;
- font-family: "Omnes-ECOMP-W02", Arial;
- box-shadow: none;
- text-decoration: none;
- color: #0568ae; }
- .btn-clear:focus {
- text-decoration: underline; }
- .btn-clear:hover {
- text-decoration: underline; }
-
-.isIE .btn:focus {
- outline: none !important;
- text-decoration: none !important; }
- .isIE .btn:focus:after {
- display: block;
- content: "";
- position: absolute;
- top: 4px;
- left: 4px;
- right: 4px;
- bottom: 4px;
- border: 1px dotted #000; }
-
-.isIE .btn:active {
- outline: none !important;
- text-decoration: none !important; }
- .isIE .btn:active:after {
- display: block;
- content: "";
- position: absolute;
- top: 4px;
- left: 4px;
- right: 4px;
- bottom: 4px;
- border: 1px dotted #000; }
-
-.isIE .btn.active {
- outline: none !important;
- text-decoration: none !important; }
- .isIE .btn.active:not(:focus):after {
- border: 1px solid #000; }
- .isIE .btn.active:after {
- display: block;
- content: "";
- position: absolute;
- top: 4px;
- left: 4px;
- right: 4px;
- bottom: 4px;
- border: 1px dotted #000; }
-
-.isIE .btn.btn-primary:focus:after {
- border: 2px dashed #fff; }
-
-.isIE .btn.btn-specialty:focus:after {
- border: 2px dashed #fff; }
-
-.isIE .btn.btn-alt:focus:after {
- border: 2px dashed #fff; }
-
-.btn.disabled {
- background-image: none;
- background-color: #767676;
- box-shadow: none;
- cursor: not-allowed;
- color: #ffffff;
- border-color: transparent;
- outline: 0 !important; }
- .btn.disabled:hover {
- color: #f2f2f2;
- outline: none !important; }
- .btn.disabled:focus {
- color: #f2f2f2;
- outline: none !important; }
-
-.btn[disabled] {
- background-image: none;
- background-color: #767676;
- box-shadow: none;
- cursor: not-allowed;
- color: #ffffff;
- border-color: transparent;
- outline: 0 !important; }
- .btn[disabled]:hover {
- color: #f2f2f2;
- outline: none !important; }
- .btn[disabled]:focus {
- color: #f2f2f2;
- outline: none !important; }
-
-.btn[disabled="disabled"] {
- background-image: none;
- background-color: #767676;
- box-shadow: none;
- cursor: not-allowed;
- color: #ffffff;
- border-color: transparent;
- outline: 0 !important; }
- .btn[disabled="disabled"]:hover {
- color: #f2f2f2;
- outline: none !important; }
- .btn[disabled="disabled"]:focus {
- color: #f2f2f2;
- outline: none !important; }
-
-.btn-arrow[disabled] .btn {
- background-image: none;
- background-color: #767676;
- box-shadow: none;
- cursor: not-allowed;
- color: #ffffff;
- border-color: transparent;
- outline: 0 !important; }
- .btn-arrow[disabled] .btn:hover {
- color: #f2f2f2;
- outline: none !important; }
- .btn-arrow[disabled] .btn:focus {
- color: #f2f2f2;
- outline: none !important; }
-
-.btn-arrow[disabled] .icon-primary-left {
- color: #fff !important; }
-
-.btn-arrow[disabled] .icon-primary-right {
- color: #fff !important; }
-
-.btn-arrow.disabled .btn {
- background-image: none;
- background-color: #767676;
- box-shadow: none;
- cursor: not-allowed;
- color: #ffffff;
- border-color: transparent;
- outline: 0 !important; }
- .btn-arrow.disabled .btn:hover {
- color: #f2f2f2;
- outline: none !important; }
- .btn-arrow.disabled .btn:focus {
- color: #f2f2f2;
- outline: none !important; }
-
-.btn-arrow.disabled .icon-primary-left {
- color: #fff !important; }
-
-.btn-arrow.disabled .icon-primary-right {
- color: #fff !important; }
-
-.btn-medium {
- padding: 12px 19px 11px 18px;
- font-size: 1.7rem; }
-
-.btn-small {
- padding: 10px 19px 9px 18px;
- font-size: 1.5rem;
- border-radius: 8px; }
-
-.btn-fullwidth {
- width: 100%; }
-
-*:not(.btn-arrow) > .btn > i[class*="icon-primary-"] {
- margin-top: -20px;
- margin-bottom: -20px; }
-
-.enhanced-cta-group {
- display: -ms-flexbox;
- display: flex;
- -ms-flex-direction: row-reverse;
- flex-direction: row-reverse;
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3A%23959595%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;
- background-position: 0 -1px;
- background-repeat: repeat-x; }
- .enhanced-cta-group > .cta-button-group {
- border-top: 0;
- background-image: none !important; }
- .enhanced-cta-group > .cta-button-group + .cta-button-group a {
- font-size: 1.4rem;
- line-height: 1em; }
- .enhanced-cta-group > .cta-button-group + .cta-button-group a a {
- margin-right: 0; }
- .enhanced-cta-group > .cta-button-group hr {
- min-height: 14px; }
- .enhanced-cta-group > .cta-button-group + .cta-button-group {
- -ms-flex-align: center;
- -ms-grid-row-align: center;
- align-items: center;
- -ms-flex-direction: row;
- flex-direction: row;
- padding: 10px 0; }
-
-.cta-button-group {
- text-align: right;
- -ms-flex-align: baseline;
- align-items: baseline;
- padding: 20px 0 10px;
- width: 100%; }
- .cta-button-group.nodots {
- background-image: none !important; }
- .cta-button-group .hidden-phone {
- margin-right: 14px; }
- .cta-button-group .btn + .btn {
- margin-right: 20px !important; }
- .cta-button-group .btn:not(.hidden-phone):not(.visible-phone) {
- margin-right: 0; }
-
-.isMobile .btn-arrow .btn.btn-small .icon-primary-left:before {
- left: -1px; }
-
-.isMobile .btn-arrow .btn.btn-large .icon-primary-left:before {
- left: 24px; }
-
-.isMobile .btn-arrow .btn.btn-large .icon-primary-right:before {
- left: 24px; }
-
-@media (max-width: 1024px) {
- .field-group + .btn {
- margin-left: 15px; } }
-
-@media (max-width: 767px) {
- .cta-button-group {
- text-align: center; }
- .cta-button-group > .btn {
- display: block;
- float: none;
- width: 100%;
- margin-left: auto !important;
- margin-right: auto !important; } }
-
-.btn-group {
- border-radius: 8px;
- box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);
- display: -ms-flexbox;
- display: flex;
- -ms-flex-pack: justify;
- justify-content: space-between;
- margin-bottom: 10px;
- max-width: 470px;
- min-width: 290px;
- position: relative;
- vertical-align: middle;
- width: 100%; }
- .btn-group > .btn {
- box-shadow: none;
- -ms-flex: 1;
- flex: 1;
- position: relative;
- float: left;
- margin-right: -1px;
- margin-bottom: 0;
- padding-left: 0;
- padding-right: 0;
- text-align: center; }
- .btn-group:not([data-select-color]) .btn.active:not(:first-child) {
- margin-right: -1px;
- border-left: 1px solid #d2d2d2 !important; }
- .btn-group:not([data-select-color]) .btn[disabled]:not(:first-child) {
- border-left: 1px solid #d2d2d2 !important; }
- .btn-group:not([data-select-color]) .btn[disabled] + .btn[disabled] {
- border-left: 1px solid #ebebeb !important; }
- .btn-group:not([data-select-color]) > .btn.active {
- border-color: #087ac2 transparent #0568ae;
- background-color: #0568ae;
- background: linear-gradient(to bottom, #087ac2 0%, #0568ae 100%);
- color: #ffffff; }
- .btn-group:not([data-select-color]) > .btn.active:hover {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: #0563a6;
- border-color: #0563a6; }
- .btn-group:not([data-select-color]) > .btn.active:focus {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: #0563a6;
- border-color: #0563a6; }
- .btn-group:not([data-select-color]) > .btn.active:active {
- color: #ffffff;
- outline-color: #ffffff !important;
- background: #0563a6;
- border-color: #0563a6; }
- .btn-group:not([data-select-color]) > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
- border-radius: 0; }
- .btn-group:not([data-select-color]) > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0; }
- .btn-group:not([data-select-color]) > .btn:last-child:not(:first-child) {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0; }
- .btn-group:not([data-select-color]) > .dropdown-toggle:not(:first-child) {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0; }
- .btn-group > .active {
- text-decoration: none;
- outline: 1px dotted transparent; }
- .btn-group > .active:focus {
- outline: 1px dotted #ffffff; }
-
-.btn-group.btn-fullwidth > .btn {
- -ms-flex: 1;
- flex: 1; }
-
-.btn-group[data-select-color] {
- margin-top: 5px;
- box-shadow: none;
- -ms-flex-pack: start;
- justify-content: flex-start;
- -ms-flex-wrap: wrap;
- flex-wrap: wrap; }
- .btn-group[data-select-color] .btn {
- border: 1px solid #959595;
- border-radius: 4px;
- box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.15);
- margin-right: 10px;
- margin-bottom: 10px;
- height: 40px;
- font-size: 16px;
- color: #333333;
- max-width: 60px;
- min-width: 60px;
- -ms-flex: 0;
- flex: 0; }
- .btn-group[data-select-color] > .btn.active:focus {
- outline: 1px dotted #191919;
- outline-offset: 4px; }
-
-button .btn-fill {
- background-clip: padding-box;
- border: 0;
- border-radius: 4px;
- bottom: 0;
- display: block;
- height: auto;
- left: 0;
- margin: 5px;
- position: absolute;
- right: 0;
- top: 0;
- width: auto; }
-
-button .btn-fill[style*="#fff"] {
- border: 1px solid #d2d2d2; }
-
-[data-select-color] .btn.active {
- background: none !important;
- outline: 0;
- margin-right: 10px;
- border-width: 3px;
- color: #333333;
- line-height: 12px; }
- [data-select-color] .btn.active > .btn-fill {
- margin: 3px; }
- [data-select-color] .btn.active:hover {
- color: #333333; }
-
-[data-select-color] .btn:active {
- background: none !important;
- outline: 0;
- margin-right: 10px;
- border-width: 3px;
- color: #333333;
- line-height: 12px; }
- [data-select-color] .btn:active > .btn-fill {
- margin: 3px; }
- [data-select-color] .btn:active:hover {
- color: #333333; }
-
-.btn-group[data-select-color="orange"] > .btn.active {
- border-color: #ea7400; }
-
-.btn-group[data-select-color="blue"] > .btn.active {
- border-color: #0568ae; }
-
-.btn-group[data-select-color="green"] > .btn.active {
- border-color: #007a3e; }
-
-.btn-spinbutton-toggle.btn-group {
- display: block !important;
- height: 40px !important;
- margin-top: 5px;
- max-width: 138px;
- min-width: 138px;
- white-space: nowrap; }
-
-.btn-spinbutton-toggle .btn {
- border-radius: 6px;
- font-weight: normal;
- -ms-flex: unset;
- flex: unset;
- height: 40px;
- letter-spacing: normal;
- min-width: auto;
- padding: 3px 0 0;
- text-align: center;
- min-width: 46px;
- width: 46px; }
-
-.btn-spinbutton-toggle .btn[data-max-value] {
- border-bottom: 1px solid #d2d2d2;
- border-top: 1px solid #d2d2d2;
- box-shadow: 0 3px 2px -2px rgba(0, 0, 0, 0.08) inset;
- background-color: #fff;
- cursor: text;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 2rem;
- font-weight: normal;
- padding: 4px 0 0;
- text-align: center;
- min-width: 46px !important;
- width: 46px; }
- .btn-spinbutton-toggle .btn[data-max-value]:focus {
- border-color: #0568ae;
- outline: none; }
- .btn-spinbutton-toggle .btn[data-max-value]:focus + .btn {
- border-left: 1px solid #0568ae;
- transition: border 0.3s linear 0s; }
-
-.btn-spinbutton-toggle .icon-primary-subtractminimize {
- font-size: 30px !important;
- color: #0568ae !important; }
-
-.btn-spinbutton-toggle .icon-primary-add-maximize {
- font-size: 30px !important;
- color: #0568ae !important; }
-
-.btn-spinbutton-toggle .btn[disabled].icon-primary-subtractminimize {
- background-color: #d2d2d2;
- color: #767676 !important; }
-
-.btn-spinbutton-toggle .btn[disabled].icon-primary-add-maximize {
- background-color: #d2d2d2;
- color: #767676 !important; }
-
-.btn-spinbutton-toggle input.btn[disabled] {
- background-color: #d2d2d2;
- color: #5a5a5a;
- cursor: not-allowed; }
-
-.btn-group.btn-spinbutton-toggle .btn[disabled] + .btn[disabled] {
- border-left: 1px solid #f0f0f0 !important; }
-
-.btn-group.btn-spinbutton-toggle .btn[data-max-value]:focus + .btn:not(:first-child) {
- border-left: 1px solid #0568ae !important; }
-
-@media (max-width: 480px) {
- .btn-group:not([data-select-color]) > .btn {
- font-size: 1.3rem;
- min-width: auto; } }
-
-.reset-field,
-.close {
- float: right;
- background: none;
- width: 34px;
- height: 34px;
- padding: 0;
- overflow: hidden;
- display: inline-block; }
-
-.reset-field {
- display: none; }
-
-.reset-field:before {
- font-size: 22px;
- color: #5a5a5a; }
-
-.input-emphasized + .reset-field:before {
- font-size: 29px;
- color: #5a5a5a; }
-
-.reset-field:active,
-.reset-field:hover,
-.reset-field:focus {
- display: block !important; }
-
-button.close {
- border: 0;
- appearance: none; }
-
-.corner-button {
- box-shadow: 0 -50px 0 0 #f2f2f2 inset;
- height: 69px;
- /*overflow: hidden;*/
- position: absolute;
- right: -35px;
- top: -35px;
- transform: rotate(45deg);
- width: 69px; }
-
-.corner-button .close:before {
- bottom: -7px;
- color: #0568ae;
- display: block;
- font-size: 20px;
- height: 50px;
- left: -11px;
- position: absolute;
- width: 50px; }
-
-.corner-button .close {
- float: none;
- height: 45px;
- margin: 0;
- position: absolute;
- right: 12px;
- top: 45px;
- transform: rotate(45deg);
- width: 45px; }
-
-.corner-button .close:focus {
- outline: 1px dotted black; }
-
-.ds2-no-colors .corner-button .close {
- border: 1px solid black; }
-
-.field-group input + .reset-field {
- background: none;
- height: 36px;
- width: 45px;
- display: none;
- padding: 0;
- position: absolute;
- right: 0;
- top: 0;
- box-shadow: none;
- border: none;
- content: " "; }
-
-.field-group input[type="search"] + .reset-field,
-.field-group input[type="search"] + .btn-search + .reset-field,
-.tooltip-onclick input + .reset-field,
-.tooltip-onclick input + .icon-primary-tooltip + .reset-field,
-.tooltip-onclick textarea + .reset-field,
-.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field {
- right: 45px; }
-
-.field-group input[type="search"] + .reset-field:after,
-.field-group input[type="search"] + .btn-search + .reset-field:after,
-.tooltip-onclick input + .reset-field:after,
-.tooltip-onclick input + .icon-primary-tooltip + .reset-field:after,
-.tooltip-onclick textarea + .reset-field:after,
-.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field:after {
- background-color: #d2d2d2;
- content: "";
- display: block;
- height: 20px;
- position: absolute;
- right: 0;
- top: 8px;
- width: 1px; }
-
-.tooltip-onclick input + .reset-field,
-.tooltip-onclick input + .icon-primary-tooltip + .reset-field {
- right: 50px !important; }
-
-.tooltip-onclick textarea + .reset-field,
-.tooltip-onclick textarea + .icon-primary-tooltip + .reset-field {
- right: 45px !important;
- width: 40px; }
-
-.field-group input.input-emphasized + .reset-field {
- width: 45px;
- height: 46px;
- right: 6px; }
-
-.field-group input.input-emphasized + .reset-field:after {
- top: 14px; }
-
-.field-group [disabled] + .reset-field {
- display: none; }
-
-.ds2_touchevents .field-group input + .reset-field:focus,
-.ds2_touchevents .field-group input:focus + .reset-field,
-.ds2_touchevents textarea:focus + .reset-field,
-.ds2_touchevents textarea + .reset-field:focus {
- display: block;
- position: absolute;
- right: 0px;
- top: 0;
- border: none; }
-
-.ds2_touchevents .field-group input {
- padding: 8px 55px 8px 15px;
- -webkit-appearance: none; }
-
-.ds2_touchevents textarea:focus {
- padding: 15px 55px 15px 15px; }
-
-.ds2_touchevents textarea:focus + .reset-field {
- border: none;
- position: absolute;
- right: 6px;
- top: 5px; }
-
-.ds2_touchevents textarea.hasScrollbar:focus {
- padding: 15px 35px 15px 15px; }
-
-.ds2_touchevents textarea.hasScrollbar:focus + .reset-field {
- right: 22px; }
-
-.ds2-no-colors .b2b-tmpl-card-corner-button {
- border: none !important; }
-
-.ds2-no-colors .b2b-tmpl-card-corner-button .close {
- border: 1px solid black;
- top: 0px !important;
- right: 0px !important; }
-
-.form-row.error .error-msg {
- display: block;
- font-size: 14px;
- line-height: 14px;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- position: relative;
- padding-left: 18px; }
-
-.form-row.error .error-msg:before {
- color: #cf2a2a;
- font-size: 14px;
- left: 0;
- line-height: 14px;
- position: absolute;
- vertical-align: middle; }
-
-.form-row.error label,
-.form-row.error .error-msg,
-.form-row.error button.awd-select,
-.form-row.error select.awd-select + span,
-.form-row.error .checkbox,
-.form-row.error .radio,
-.form-row.error legend.error,
-.form-row.error input {
- color: #cf2a2a; }
-
-.form-row.error .btn-group > .btn,
-.form-row.error button.awd-select,
-.form-row.error .awd-select-list,
-.form-row.error select.awd-select + span,
-.form-row.error textarea,
-.form-row.error input,
-.form-row.error .checkbox .skin,
-.form-row.error .radio .skin {
- border-color: #cf2a2a !important; }
-
-.form-row.error .checkbox input:checked:not(:disabled) + .skin {
- background-color: #cf2a2a; }
-
-.form-row.error .radio input:checked + .skin:after {
- background-color: #cf2a2a; }
-
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg {
- margin-top: -11px;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0; }
-
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext {
- margin: 0 0 10px; }
-
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext:before,
-.error .tooltip-onclick .icon-primary-tooltip.active + .error-msg + .helpertext:after {
- display: none; }
-
-.error .helpertext {
- border-color: #cf2a2a;
- /*border-radius:0;*/ }
-
-.error .helpertext:before {
- border-top-color: #cf2a2a; }
-
-.error .tooltip-onfocus .helpertext {
- margin: 14px 0 10px 0; }
-
-.error [class*="price"],
-.error [class*="pricing-"] {
- color: #cf2a2a; }
-
-input:-ms-clear {
- display: none; }
-
-input[type]::-webkit-inner-spin-button,
-input[type]::-webkit-outer-spin-button {
- -webkit-appearance: none; }
-
-input[type] {
- -moz-appearance: textfield; }
-
-form {
- margin: 0; }
-
-fieldset {
- padding: 0;
- margin: 0;
- border: 0; }
-
-label,
-legend {
- display: inline-block;
- font-size: 1.4rem;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-legend {
- display: block; }
-
-.error-msg {
- display: none; }
-
-select,
-textarea,
-input {
- border-radius: 6px;
- color: #5a5a5a;
- display: inline-block;
- font-size: 1.6rem;
- margin: 0px;
- padding: 0 15px 0 15px;
- vertical-align: middle;
- line-height: normal; }
-
-select::-webkit-input-placeholder,
-textarea::-webkit-input-placeholder,
-input::-webkit-input-placeholder {
- color: #5a5a5a;
- font-family: "Omnes-ECOMP-W02-Italic", Arial;
- font-style: normal;
- opacity: 1; }
-
-select:-moz-placeholder,
-textarea:-moz-placeholder,
-input:-moz-placeholder {
- color: #5a5a5a;
- font-family: "Omnes-ECOMP-W02-Italic", Arial;
- font-style: normal;
- opacity: 1; }
-
-select::-moz-placeholder,
-textarea::-moz-placeholder,
-input::-moz-placeholder {
- color: #5a5a5a;
- font-family: "Omnes-ECOMP-W02-Italic", Arial;
- font-style: normal;
- opacity: 1; }
-
-select:-ms-input-placeholder,
-textarea:-ms-input-placeholder,
-input:-ms-input-placeholder {
- color: #5a5a5a;
- font-family: "Omnes-ECOMP-W02-Italic", Arial;
- transition: none;
- opacity: 1; }
-
-select:placeholder,
-textarea:placeholder,
-input:placeholder {
- color: #5a5a5a;
- font-family: "Omnes-ECOMP-W02-Italic", Arial;
- font-style: normal;
- opacity: 1; }
-
-select:last-child,
-textarea:last-child,
-input:last-child {
- margin-right: 0; }
-
-input:not([type="button"]) {
- height: 36px; }
-
-input.input-emphasized {
- font-size: 1.8rem;
- height: 48px;
- padding: 13px 20px 13px; }
-
-input[type="search"]:focus {
- padding-right: 88px; }
-
-input[type="search"] {
- padding-right: 40px;
- -webkit-appearance: none !important; }
-
-input[type="search"].input-emphasized {
- padding-right: 45px; }
-
-.btn-search[class*="btn"] {
- background-color: transparent;
- background-position: 50% 50%;
- background-size: 20px;
- background-repeat: no-repeat;
- border: none;
- height: 100%;
- margin-left: 0;
- margin-top: 0;
- min-width: 45px !important;
- outline-offset: 0;
- padding: 0 !important;
- position: absolute;
- right: 0;
- top: 0;
- border-radius: 0 5px 5px 0;
- min-width: 44px;
- width: 44px; }
-
-.input-emphasized + .btn-search[class*="btn"],
-.input-emphasized + .reset-field + .btn-search[class*="btn"] {
- background-size: 26px;
- height: 46px;
- top: 1px;
- outline-offset: -3px;
- margin-bottom: 0;
- border-radius: 0 5px 5px 0; }
-
-input[type="search"].input-emphasized + .reset-field {
- right: 45px !important; }
-
-.search-suggestion-wrapper {
- position: relative;
- margin-bottom: 15px; }
-
-/*styles from dropdown*/
-.search-suggestion-list {
- box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
- border-radius: 0 0 6px 6px;
- position: relative;
- border: 1px solid #0568ae;
- border-top: 0;
- padding: 15px 0;
- background-color: #f2f2f2;
- z-index: 1000;
- width: 100%;
- max-height: 400px;
- overflow-y: auto; }
-
-.search-suggestion-list:empty {
- display: none; }
-
-.search-suggestion-item {
- position: relative;
- z-index: -1;
- padding: 0 15px;
- line-height: 4.0rem;
- color: #5a5a5a; }
-
-.search-suggestion-item a {
- text-decoration: none;
- color: #5a5a5a; }
-
-.search-suggestion-item:hover,
-.search-suggestion-item:focus {
- cursor: pointer;
- background-color: #d2d2d2; }
-
-input[data-provide="datepicker"],
-[data-provide="datepicker"]:-moz-placeholder,
-[data-provide="datepicker"]:-ms-input-placeholder,
-[data-provide="datepicker"]:-webkit-input-placeholder {
- color: #0568ae !important;
- opacity: 1;
- filter: alpha(opacity=100); }
-
-input[disabled],
-input[readonly],
-select[disabled],
-select[readonly],
-textarea[disabled],
-textarea[readonly],
-i.icon-primary-calendar.disabled,
-span.icon-primary-calendar.readonly {
- cursor: not-allowed;
- background-color: #f2f2f2;
- box-shadow: none; }
-
-i.icon-primary-calendar.disabled input,
-span.icon-primary-calendar.readonly input {
- color: #959595 !important; }
-
-textarea {
- display: block;
- width: 100%;
- max-width: 100%;
- padding: 15px; }
-
-textarea.small {
- line-height: 20px; }
-
-textarea + .reset-field {
- display: none; }
-
-textarea::-webkit-input-placeholder {
- line-height: .99; }
-
-textarea:-moz-placeholder {
- line-height: .99; }
-
-textarea::-moz-placeholder {
- line-height: .99; }
-
-textarea:-ms-input-placeholder {
- line-height: .99; }
-
-textarea:placeholder {
- line-height: .99; }
-
-textarea,
-input {
- background-color: #ffffff;
- border: 1px solid #d2d2d2;
- -webkit-appearance: none;
- box-shadow: 2px 3px 2px -2px rgba(0, 0, 0, 0.08) inset;
- transition: border .3s linear 0s;
- font-family: "Omnes-ECOMP-W02", Arial; }
-
-textarea:focus,
-input:focus {
- outline: 0;
- border-color: #0568ae; }
-
-.input-append {
- display: table; }
-
-.input-append > div {
- display: table-cell;
- width: 1%; }
-
-.input-append > .field-group {
- width: 100%; }
-
-.row .field-group input[class*="span"] {
- float: none; }
-
-.field-group {
- position: relative;
- display: inline-block; }
-
-label + .field-group,
-label + .input-append,
-label + .row,
-label + .row-nowrap,
-label + .form-row {
- margin-top: 5px; }
-
-.field-group {
- position: relative;
- display: block; }
-
-.field-group input:not([type="button"])[disabled] {
- padding-right: 15px; }
-
-input:invalid,
-textarea:invalid,
-select:invalid {
- outline: none !important; }
-
-.form-row {
- margin-top: 20px; }
-
-.form-row.nomar {
- margin: 0; }
-
-.row-nowrap.no-flex.form-row > label + br {
- margin-bottom: 5px; }
-
-span.form-row {
- display: inline-block; }
-
-legend + .form-row {
- margin-top: 20px; }
-
-.tooltip-onclick input {
- padding-right: 45px; }
-
-.ds2_touchevents .tooltip-onclick input:focus {
- padding-right: 95px; }
-
-.btn-calendar-icon {
- position: absolute;
- background-color: transparent !important;
- top: 8px;
- border: 0 !important;
- width: 30px;
- right: 15px; }
-
-.btn-calendar-icon .icon-primary-calendar:before {
- position: absolute;
- color: #0568ae; }
-
-.btn-calendar-icon .icon-primary-calendar.disabled {
- background-color: #f2f2f2; }
-
-.btn-calendar-icon .icon-primary-calendar.disabled:before {
- color: #959595; }
-
-span.icon-primary-calendar input {
- padding-left: 35px;
- color: #0568ae;
- transition: border-color 0.3s linear 0s;
- box-shadow: 2px 3px 2px -2px rgba(0, 0, 0, 0.08) inset;
- position: absolute;
- top: 0;
- left: 0; }
-
-.faux-input + input.datepicker-input:not([disabled]) {
- cursor: pointer;
- margin-left: 0;
- background-color: #fff;
- position: absolute;
- left: 0;
- top: 0;
- z-index: 0; }
-
-.faux-input {
- background-color: transparent !important;
- border: 1px solid transparent;
- border-radius: 4px;
- font-size: 1.6rem;
- height: 35px;
- left: 0;
- line-height: 35px;
- margin-bottom: 10px;
- margin-right: 6px;
- padding: 0 0 0 35px;
- position: relative;
- text-align: left;
- top: 0;
- vertical-align: middle;
- width: 100%;
- z-index: 1; }
-
-.faux-input:disabled {
- cursor: not-allowed; }
-
-.faux-input:focus + .datepicker-input,
-[data-calendar-state="opened"] + .datepicker-input {
- border-color: #0568ae;
- box-shadow: 2px 3px 2px -2px rgba(5, 116, 172, 0.35) inset;
- outline: 0 none; }
-
-.form-row.error .error-msg {
- display: block;
- font-size: 14px;
- line-height: 14px;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- position: relative;
- padding-left: 18px;
- margin-top: 10px; }
-
-.form-row.error .error-msg > .icon-primary-badgealert {
- height: 14px;
- width: 14px;
- position: absolute;
- left: 0;
- margin-right: 0; }
-
-.form-row.error .error-msg > .icon-primary-badgealert:before {
- color: #cf2a2a;
- font-size: 14px;
- left: 0;
- line-height: 14px;
- position: absolute;
- vertical-align: middle; }
-
-.form-row.error label,
-.form-row.error .error-msg,
-.form-row.error button.awd-select,
-.form-row.error select.awd-select + span,
-.form-row.error .checkbox,
-.form-row.error .radio,
-.form-row.error legend.error,
-.form-row.error input,
-.form-row.error textarea {
- color: #cf2a2a; }
-
-.form-row.error .btn-group > .btn,
-.form-row.error button.awd-select,
-.form-row.error .awd-select-list,
-.form-row.error select.awd-select + span,
-.form-row.error textarea,
-.form-row.error input,
-.form-row.error .checkbox .skin,
-.form-row.error .radio .skin {
- border-color: #cf2a2a !important; }
-
-.form-row.error .checkbox input:checked:not(:disabled) + .skin {
- background-color: #cf2a2a; }
-
-.form-row.error .radio input:checked + .skin:after {
- background-color: #cf2a2a; }
-
-.error [class*="price"],
-.error [class*="pricing-"] {
- color: #cf2a2a; }
-
-hr,
-.hr-or {
- display: block;
- height: 1px;
- margin: 15px 0;
- border: none;
- background-repeat: repeat-x;
- background-color: #959595;
- position: relative; }
-
-hr.dark {
- background-color: #959595; }
-
-hr.lite {
- background-color: #d2d2d2; }
-
-.hr-or:before {
- background-color: #fff;
- color: #666;
- content: " OR ";
- display: block;
- font-size: 1.4rem;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- height: 16px;
- left: 50%;
- line-height: 1.6rem;
- margin-left: -15px;
- margin-top: -8px;
- position: absolute;
- text-align: center;
- top: 50%;
- width: 30px;
- z-index: 1111; }
-
-hr.hr-dotted.dark {
- background-color: transparent;
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E");
- background-position: bottom;
- background-repeat: repeat-x;
- background-size: 4px 1px;
- width: 100%; }
-
-hr.hr-dotted.lite {
- background-color: transparent;
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }
-
-hr.is-vertical.dark,
-hr.hr-or.dark,
-hr.is-vertical.lite,
-hr.hr-or.lite {
- display: inline-block;
- height: auto;
- margin: 0 15px;
- min-height: 20px;
- width: 1px; }
-
-hr.is-vertical.dark,
-hr.hr-or.dark {
- background-color: #959595; }
-
-hr.is-vertical.lite,
-hr.hr-or.lite {
- background-color: #d2d2d2; }
-
-.hr-dotted.is-vertical.dark,
-.hr-dotted.is-vertical.lite {
- background-color: transparent;
- background-repeat: repeat-y;
- background-size: 1px 4px;
- height: auto;
- min-height: 20px;
- width: 1px; }
-
-.hr-dotted.is-vertical.dark {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A1px%3B%20height%3A100%25%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%22100%25%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%221%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }
-
-.hr-dotted.is-vertical.lite {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A1px%3B%20height%3A100%25%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%22100%25%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%221%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E"); }
-
-.row-nowrap > .span + hr.is-vertical,
-.row > .span + hr.is-vertical {
- margin: 0 0 0 -20px; }
-
-@media (max-width: 767px) {
- hr,
- .hr-or {
- margin: 30px 0; }
- hr.full {
- margin-left: -15px;
- margin-right: -15px; }
- .hr-or.is-vertical {
- min-height: 1px;
- height: 1px;
- width: 100%; }
- .row-nowrap > .span + hr.is-vertical {
- margin: 0 0 0 -15px; }
- .row > .span + hr.is-vertical {
- min-height: 1px;
- height: 1px;
- width: 100%;
- margin: 0;
- display: block; }
- .row > .span + hr.is-vertical.lite {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(204%2C204%2C204%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;
- background-size: 4px 1px;
- background-repeat: repeat-x; }
- .row > .span + hr.is-vertical.dark {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important;
- background-size: 4px 1px;
- background-repeat: repeat-x; } }
-
-hr.bottom-space-only {
- margin-top: 0; }
-
-.hr-nomargin {
- margin: 0; }
-
-.radio {
- position: relative;
- min-height: 24px;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.6rem;
- margin-bottom: 5px; }
- .radio input {
- -webkit-tap-highlight-color: transparent;
- height: 10px;
- margin: 6px;
- opacity: 0;
- outline: none;
- position: absolute;
- left: 1px;
- top: 1px;
- width: 10px; }
- .radio input:focus + .skin {
- border-color: #0568ae; }
- .radio input:focus + .skin:before {
- content: "";
- height: 34px;
- left: -6px;
- top: -6px;
- outline: 1px dotted #000000;
- position: absolute;
- width: 34px; }
- .radio input + .skin {
- border-radius: 100%; }
- .radio input:checked + .skin:after {
- background-color: #0568ae;
- border-radius: 100%;
- border: 3px solid #FFFFFF;
- content: "";
- display: block;
- height: 16px;
- position: absolute;
- width: 16px; }
- .radio input:disabled + .skin {
- cursor: not-allowed;
- background-color: #d2d2d2;
- border-color: #d2d2d2;
- color: #666666; }
- .radio input:disabled + .skin + span {
- cursor: not-allowed;
- color: #666666; }
- .radio input:disabled:checked + .skin:after {
- background-color: #666666; }
- .radio input:invalid + .skin {
- border: solid 1px #cf2a2a; }
- .radio .skin {
- background-color: #FFFFFF;
- border: 1px solid #d2d2d2;
- border-radius: 3px;
- display: inline-block;
- height: 24px;
- left: 0;
- position: absolute;
- top: 0;
- width: 24px; }
- .radio span {
- display: inline-block;
- margin-left: 34px;
- margin-top: 0;
- position: relative;
- top: 3px; }
- .radio label {
- font-size: 1.6rem;
- font-family: "Omnes-ECOMP-W02", Arial; }
-
-.radio.inline {
- display: inline-block;
- margin-bottom: 10px;
- vertical-align: middle;
- margin-right: 10px; }
- .radio.inline:last-child {
- margin-right: 0; }
-
-.radio-box {
- border: 1px solid #d2d2d2;
- border-radius: 8px; }
- .radio-box > [role="radio"] label {
- padding: 15px 15px 20px 15px;
- display: block;
- width: 100%; }
- .radio-box > [role="radio"] label .skin + span {
- top: 2px; }
- .radio-box > [role="radio"] + div {
- padding: 0 15px 15px 47px; }
- .radio-box > [aria-checked="false"] label > input {
- top: 15px;
- left: 15px; }
- .radio-box > [aria-checked="false"] label .skin {
- top: 15px;
- left: 15px; }
- .radio-box > [aria-checked="true"] label > input {
- top: 13px;
- left: 13px; }
- .radio-box > [aria-checked="true"] label .skin {
- top: 13px;
- left: 13px; }
-
-.radio-box.active {
- border: 3px solid #0568ae; }
- .radio-box.active > [role="radio"] label {
- padding: 13px 14px 19px 13px; }
-
-.checkbox {
- position: relative;
- min-height: 24px;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.6rem;
- margin-bottom: 5px; }
- .checkbox input {
- -webkit-tap-highlight-color: transparent;
- height: 10px;
- margin: 6px;
- opacity: 0;
- outline: none;
- position: absolute;
- left: 1px;
- top: 1px;
- width: 10px; }
- .checkbox input:focus + .skin {
- border-color: #0568ae; }
- .checkbox input:focus + .skin:before {
- content: "";
- height: 34px;
- left: -6px;
- top: -6px;
- outline: 1px dotted #000000;
- position: absolute;
- width: 34px; }
- .checkbox input:checked:not(:disabled) + .skin {
- background-color: #0568ae;
- border-color: #0568ae; }
- .checkbox input:checked:disabled + .skin:after {
- color: #5A5A5A; }
- .checkbox input:checked + .skin:after {
- height: 24px;
- width: 24px;
- background-color: transparent;
- font-size: 23.4px;
- color: #FFFFFF;
- line-height: 21px; }
- .checkbox input:disabled + .skin {
- cursor: not-allowed;
- background-color: #d2d2d2;
- border-color: #d2d2d2;
- color: #666666; }
- .checkbox input:disabled + .skin + span {
- cursor: not-allowed;
- color: #666666; }
- .checkbox input:invalid + .skin {
- border: solid 1px #cf2a2a; }
- .checkbox input:indeterminate + .skin:after {
- background-color: transparent;
- font-size: 25px;
- color: #0574ac;
- content: "\e920"; }
- .checkbox .skin {
- background-color: #fff;
- border: 1px solid #d2d2d2;
- border-radius: 3px;
- display: inline-block;
- height: 24px;
- width: 24px;
- position: absolute;
- left: 0;
- top: 0; }
- .checkbox span {
- display: inline-block;
- margin-left: 34px;
- margin-top: 0;
- position: relative;
- top: 3px; }
- .checkbox label {
- font-size: 1.6rem;
- font-family: "Omnes-ECOMP-W02", Arial; }
- .checkbox input {
- z-index: 9999; }
- .checkbox input.indeterminate + .skin:after {
- font-size: 22px;
- color: #0568ae; }
-
-.checkbox.inline {
- display: inline-block;
- margin-bottom: 10px;
- vertical-align: middle;
- margin-right: 10px; }
- .checkbox.inline:last-child {
- margin-right: 0; }
-
-.checkbox.checkbox-selectall {
- margin: 20px 0 0 24px; }
-
-.terms-after-checkbox {
- margin-top: 15px; }
-
-.indeterminate-margin {
- padding-left: 24px; }
-
-.tiny-accordion {
- border-bottom: 1px solid #d2d2d2; }
-
-.toggle-header,
-.inactive-toggle-header {
- border-color: #fff;
- color: #0568ae;
- cursor: pointer;
- display: block;
- font-size: 2.0rem;
- line-height: 2.2rem;
- min-height: 41px;
- position: relative;
- padding: 16px 55px 16px 15px; }
-
-.toggle-header.opened {
- color: #333333; }
-
-.tiny-accordion .toggle-header,
-.tiny-accordion .inactive-toggle-header {
- padding: 16px 55px 16px 15px;
- border-top: 1px solid #d2d2d2; }
-
-.tiny-accordion .toggle-header:focus {
- text-decoration: underline; }
-
-.tiny-accordion.iconleft .toggle-header,
-.tiny-accordion.iconleft .inactive-toggle-header {
- padding: 15px 15px 15px 50px; }
-
-.accordion-content {
- font-size: 1.4rem; }
-
-.accordion-content .toggle-header:first-child {
- margin-top: 16px; }
-
-.tiny-accordion .toggle-header + .accordion-content {
- padding: 0 50px 15px 15px; }
-
-.tiny-accordion.iconleft .toggle-header + .accordion-content {
- padding: 0 15px 15px 50px; }
-
-.toggle-header .icon-primary-accordion-plus,
-.toggle-header .icon-primary-accordion-minus {
- display: inline-block;
- font-size: 20px;
- margin: 0;
- padding: 0;
- position: absolute;
- right: 15px;
- vertical-align: middle;
- top: 16px;
- font-weight: bold; }
-
-.tiny-accordion.iconleft .toggle-header .icon-primary-accordion-plus,
-.tiny-accordion.iconleft .toggle-header .icon-primary-accordion-minus {
- left: 15px; }
-
-.inactive-toggle-header:hover {
- cursor: inherit; }
-
-.tiny-accordion-to-tabs,
-.tiny-tabs {
- position: relative;
- width: 100%;
- margin: 0px;
- padding: 0px; }
-
-.tiny-tabs [class*="icon-primary-accordion-"] {
- display: none !important; }
-
-.tiny-accordion-to-tabs:before,
-.tiny-accordion-to-tabs:after,
-.tiny-tabs:before,
-.tiny-tabs:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.tiny-accordion-to-tabs:after,
-.tiny-tabs:after {
- clear: both; }
-
-.tiny-accordion-to-tabs:before,
-.tiny-accordion-to-tabs:after,
-.tiny-tabs:before,
-.tiny-tabs:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.tiny-accordion-to-tabs:after,
-.tiny-tabs:after {
- clear: both; }
-
-.tiny-tabs > .toggle-header {
- display: inline-block;
- float: left;
- border-top: none;
- overflow: hidden;
- height: 70px;
- text-align: center;
- background-color: #fff;
- border-radius: 0px;
- padding: 26px 20px 25px 20px !important;
- border-top: 1px solid #fff;
- -webkit-filter: none;
- filter: none;
- background-clip: padding-box;
- border-bottom: 1px solid #d2d2d2;
- font-weight: normal;
- border-right: 1px solid #d2d2d2;
- white-space: nowrap; }
-
-.tiny-tabs .toggle-header + div {
- left: 0px;
- position: absolute;
- top: 69px;
- border-top: 1px solid #d2d2d2;
- padding: 0;
- display: block;
- border-bottom: none;
- width: 100%; }
-
-.accordion-pad {
- padding-top: 30px;
- padding-bottom: 30px; }
-
-.tiny-tabs .opened {
- color: #333333;
- border-top: 5px solid #0568ae !important;
- padding-top: 22px !important;
- border-bottom: none;
- background-color: #fff;
- -webkit-filter: none;
- filter: none;
- cursor: default;
- z-index: 999; }
-
-.tiny-tabs .toggle-header:focus {
- text-decoration: underline;
- outline: thin dotted #666;
- outline-offset: 0; }
-
-.tiny-tabs .toggle-header:first-child {
- border-left: none;
- margin-left: 0; }
-
-.tiny-tabs .toggle-header:first-child {
- border-left: 1px solid #fff; }
-
-.tiny-tabs .opened:first-child {
- border-left: 1px solid #d2d2d2; }
-
-.tiny-tabs .toggle-header:nth-last-of-type(2) {
- border-right-color: #fff; }
-
-.tiny-tabs .opened:nth-last-of-type(2) {
- border-right: 1px solid #d2d2d2; }
-
-@media (max-width: 767px) {
- .tiny-accordion,
- .tiny-accordion-to-tabs {
- margin-left: -15px;
- margin-right: -15px;
- width: auto; }
- .tiny-accordion-to-tabs {
- display: block;
- border-bottom: 1px solid #d2d2d2; }
- .tiny-accordion-to-tabs .toggle-header {
- display: block;
- min-height: 41px;
- padding: 16px 50px 16px 15px;
- border-top: 1px solid #d2d2d2; }
- .tiny-accordion-to-tabs .toggle-header:focus {
- text-decoration: underline; }
- .tiny-accordion-to-tabs .toggle-header + .accordion-content {
- padding: 0 50px 15px 15px; } }
-
-@media (min-width: 768px) {
- .tiny-accordion-to-tabs [class*="icon-primary-accordion-"] {
- display: none !important; }
- .tiny-accordion-to-tabs > .toggle-header {
- display: inline-block;
- float: left;
- border-top: none;
- /*overflow: hidden;*/
- height: 70px;
- text-align: center;
- background-color: #fff;
- border-radius: 0px;
- padding: 26px 20px 25px 20px !important;
- border-top: 1px solid #fff;
- -webkit-filter: none;
- filter: none;
- background-clip: padding-box;
- border-bottom: 1px solid #d2d2d2;
- font-weight: normal;
- border-right: 1px solid #d2d2d2;
- white-space: nowrap; }
- .tiny-accordion-to-tabs .toggle-header + div {
- left: 0px;
- position: absolute;
- top: 69px;
- border-top: 1px solid #d2d2d2;
- padding-top: 30px;
- padding-left: 20px;
- display: block;
- border-bottom: none;
- width: 100%; }
- .tiny-accordion-to-tabs .opened {
- color: #333333;
- border-top: 5px solid #0568ae !important;
- padding-top: 22px !important;
- border-bottom: none;
- background-color: #fff;
- -webkit-filter: none;
- filter: none;
- cursor: default;
- text-decoration: none;
- z-index: 999; }
- .tiny-accordion-to-tabs .toggle-header:focus {
- text-decoration: underline;
- outline: thin dotted #666;
- outline-offset: 0px; }
- .tiny-accordion-to-tabs .toggle-header:nth-last-of-type(2) {
- border-right: none; }
- .tiny-accordion-to-tabs .toggle-header:first-child {
- border-left: none;
- margin-left: 0; }
- .tiny-accordion-to-tabs .toggle-header:first-child {
- border-left: 1px solid #fff; }
- .tiny-accordion-to-tabs .opened:first-child {
- border-left: 1px solid #d2d2d2; }
- .tiny-accordion-to-tabs .opened:nth-last-of-type(2) {
- border-right: 1px solid #d2d2d2; } }
-
-.toggle-header .tooltip .icon-primary-tooltip {
- margin-top: -5px; }
-
-.accordion-content {
- transition: all 0.8s linear; }
-
-.opaque-content {
- opacity: 0; }
-
-.tiny-tabs .toggle-header {
- display: inline-block;
- float: left;
- border-top: none;
- overflow: hidden;
- height: 70px;
- text-align: center;
- background-color: #fff;
- border-radius: 0px;
- padding: 22px 20px 25px 20px !important;
- border-top: 5px solid #fff;
- -webkit-filter: none;
- filter: none;
- background-clip: padding-box;
- border-bottom: 1px solid #ccc;
- font-weight: normal;
- border-right: 1px solid #ccc;
- white-space: nowrap; }
-
-.tiny-tabs .toggle-header:first-child {
- margin-left: 0; }
-
-.tiny-tabs div:first-child .toggle-header {
- margin-left: 30px; }
-
-.tiny-tabs > div .toggle-header.opened {
- border-bottom: 0 !important; }
-
-.tiny-accordion-to-tabs > div > div.toggle-header {
- background-clip: padding-box;
- background-color: #fff;
- border-bottom: 1px solid #ccc;
- border-radius: 0;
- border-top: 5px solid #fff;
- display: inline-block;
- filter: none;
- float: left;
- font-weight: normal;
- overflow: hidden;
- padding: 22px 20px 21px !important;
- text-align: center;
- white-space: nowrap; }
-
-.tiny-accordion-to-tabs .toggle-header:first-child {
- margin-left: 0; }
-
-.tiny-accordion-to-tabs div:first-child .toggle-header {
- margin-left: 30px;
- border-bottom: 0 !important; }
-
-.tiny-accordion-to-tabs > div .toggle-header.opened {
- border-bottom: 0 !important; }
-
-@media (max-width: 767px) {
- .tiny-accordion-to-tabs {
- display: block !important;
- border-bottom: 1px solid #ccc !important; }
- .tiny-accordion-to-tabs > div > div.toggle-header {
- display: block !important;
- float: none;
- text-align: left;
- min-height: 41px !important;
- padding: 15px 50px 15px 15px !important;
- border-top: 1px solid #ccc; }
- .tiny-accordion-to-tabs > div > div.toggle-header:first-child {
- margin-left: 0 !important; }
- .tiny-accordion-to-tabs > div > div.toggle-header + .accordion-content {
- padding: 0 50px 15px 15px; }
- .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-plus {
- background-position: 0 0;
- background-size: 20px 40px; }
- .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-minus {
- background-position: 0 -20px;
- background-size: 20px 40px; }
- .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-plus,
- .tiny-accordion-to-tabs > div > div.toggle-header .icon-primary-accordion-minus {
- display: inline-block;
- height: 20px;
- margin: 0;
- padding: 0;
- position: absolute;
- right: 15px;
- vertical-align: middle;
- width: 20px; } }
-
-.alert {
- background-color: #5a5a5a;
- border-radius: 8px;
- color: #fff;
- margin-top: 15px;
- padding: 0;
- position: relative;
- border: 0; }
-
-.alert h3,
-.alert h4 {
- color: #fff;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 1.6rem;
- margin: 0 20px 5px 0; }
-
-.alert div {
- padding: 15px 20px; }
-
-.alert div:first-child {
- border-radius: 8px 0 0 8px;
- width: 1%; }
-
-.alert div:first-child + div {
- border: 1px solid transparent;
- border-left: none;
- border-radius: 0 8px 8px 0; }
-
-.alert-error {
- background-color: #cf2a2a;
- border: 1px solid #cf2a2a; }
-
-.alert-info {
- background-color: #44c8f5;
- border: 1px solid #44c8f5; }
-
-.alert-success {
- background-color: #c5d63d;
- border: 1px solid #c5d63d; }
-
-.alert [class*="icon-primary-"] {
- color: #fff;
- font-size: 30px;
- margin-right: 0; }
-
-.alert .close {
- height: 30px;
- position: absolute;
- right: 1px;
- top: 1px;
- width: 30px; }
-
-.alert .close:before {
- color: #fff;
- margin-right: 0;
- position: absolute;
- right: 9px;
- top: 9px; }
-
-.alert a {
- color: #fff;
- text-decoration: underline; }
-
-.alert .close:focus {
- outline: 1px dotted #666; }
-
-.alert p {
- font-size: 1.4rem; }
-
-.alert p:last-child {
- margin-bottom: 0; }
-
-.alert .standalone-link i[class*="icon-primary-"] {
- font-size: 20px;
- margin-right: 5px; }
-
-@media (max-width: 767px) {
- .alert {
- border-radius: 0;
- margin: 0 -15px; }
- .alert + .alert {
- margin-top: 4px; }
- .alert div {
- padding: 15px 10px; }
- .alert div:first-child {
- border-radius: 0;
- padding: 15px; }
- .alert h3,
- .alert h4 {
- font-size: 1.4rem; }
- .alert p {
- font-size: 1.2rem; }
- .alert .close {
- right: 5px;
- top: 5px; }
- .alert .standalone-link i[class*="icon-primary-"] {
- font-size: 16px; } }
-
-.alert h3 {
- margin: 0;
- font-size: 16px; }
-
-.alert p {
- font-size: 14px; }
-
-.alert p a {
- color: #FFFFFF;
- text-decoration: underline; }
-
-.alert div:first-child + div {
- padding-right: 25px; }
-
-.alert div:last-child {
- padding-right: 20px !important; }
-
-.alert p [class*="icon-primary-"] {
- color: #fff;
- font-size: 20px;
- margin-right: 0; }
-
-@media (max-width: 767px) {
- .alert h3 {
- font-size: 14px; }
- .alert div:first-child + div {
- padding-right: 20px; }
- .alert div:last-child {
- padding-right: 15px !important; }
- .alert div:first-child {
- padding: 15px; }
- .alert p {
- font-size: 12px; }
- .alert p [class*="icon-primary-"] {
- font-size: 16px; } }
-
-.b2b-audio {
- width: auto;
- margin: 10px auto;
- height: 35px; }
- .b2b-audio .controls-wrapper {
- display: inline-block;
- font-size: 25px;
- cursor: pointer; }
- .b2b-audio .controls-wrapper i {
- font-size: 25px;
- margin-right: 0px;
- color: #444; }
- .b2b-audio .controls-wrapper i:hover {
- color: #0574AC; }
- .b2b-audio .seek-bar-container-wrapper {
- display: inline-block;
- outline: 0;
- min-width: 180px;
- margin-right: 10px;
- margin-left: 10px;
- height: 14px;
- padding-top: 5px; }
- .b2b-audio .seek-bar-container-wrapper .timing-container {
- padding-top: 13px;
- color: #333;
- font-size: 12px; }
- .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-left {
- float: left;
- line-height: 100%; }
- .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-right {
- float: right;
- line-height: 100%; }
- .b2b-audio .seek-bar-container-wrapper .timing-container .timing-container-spacer {
- clear: both; }
- .b2b-audio .seek-bar-tooltip {
- text-align: center;
- min-width: 76px; }
-
-.b2b-audio-popover {
- width: 22px; }
- .b2b-audio-popover .volume-popover {
- height: 100px !important;
- width: 6px !important;
- margin: 7px auto; }
- .b2b-audio-popover .min-label {
- margin-top: 5px; }
-
-.b2b-audio-native {
- width: auto;
- height: auto; }
-
-.b2b-audio-recorder {
- border: 1px solid #ccc;
- box-shadow: 0px 1px 2px 0 rgba(0, 0, 0, 0.15);
- height: 63px;
- min-height: 63px;
- min-width: 347px; }
- .b2b-audio-recorder .b2b-elapsed-time {
- margin: 23px 0 24px 15px;
- font-size: 16px;
- font-style: italic;
- color: #767676; }
- .b2b-audio-recorder .b2b-controls {
- width: 68px;
- cursor: pointer; }
- .b2b-audio-recorder .b2b-controls i.icoControls-record {
- font-size: 64px;
- color: black;
- float: right;
- margin-right: 10px; }
- .b2b-audio-recorder .b2b-controls i.icoControls-record:focus, .b2b-audio-recorder .b2b-controls i.icoControls-record:hover {
- color: #0568ae; }
- .b2b-audio-recorder .b2b-controls i.icoControls-stop {
- font-size: 36px;
- color: black;
- float: right;
- margin-right: 20px;
- margin-top: 12px; }
- .b2b-audio-recorder .b2b-controls i.icoControls-stop:focus, .b2b-audio-recorder .b2b-controls i.icoControls-stop:hover {
- color: #0568ae; }
-
-.b2b-top-btn {
- height: 36px;
- width: 36px;
- border-radius: 7px; }
-
-.b2b-top-btn > i {
- position: absolute;
- top: 13px;
- left: 9px;
- width: 11px;
- height: 18px; }
-
-.b2b-badge {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- background-color: #5A5A5A;
- border-radius: 12px;
- color: #FFFFFF;
- display: inline-block;
- font-size: 1.5rem;
- font-weight: normal;
- height: 20px;
- line-height: 0;
- margin-top: 0;
- min-width: 20px;
- padding: 0 5px;
- text-align: center;
- vertical-align: baseline; }
- .b2b-badge:empty {
- display: none; }
-
-* + .b2b-heading-micro {
- margin-top: 20px !important; }
-
-.b2b-heading-micro {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-weight: normal;
- text-rendering: optimizeLegibility;
- font-size: 1.2rem !important;
- text-transform: uppercase !important;
- margin-bottom: 20px !important;
- line-height: 1.2 !important; }
-
-.b2b-no-colors .b2b-badge {
- border: 1px solid transparent; }
-
-.btn > .b2b-badge {
- margin-right: 5px; }
-
-a > .b2b-badge {
- margin-right: 6px;
- padding-top: 10px; }
-
-.b2b-badge-urgent {
- background-color: #cf2a2a; }
-
-.bellyband-container {
- margin: 0 -15px; }
-
-.bellyband-group {
- width: auto; }
-
-.bellyband-link {
- border-top: 1px solid #d2d2d2; }
-
-.bellyband-link a {
- display: block;
- height: 40px;
- line-height: 40px;
- padding: 0 15px;
- position: relative;
- text-decoration: none; }
-
-.bellyband-link a:hover > div span,
-.bellyband-link a:focus > div span {
- text-decoration: underline; }
-
-.bellyband-link a:after {
- color: #666;
- font-size: 2.3rem;
- height: 20px;
- position: absolute;
- right: 5px;
- top: 12px;
- width: 18px; }
-
-.dark-bg .bellyband-link a:after {
- color: white; }
-
-.bellyband-link img[src$="svg"].hidden-desktop,
-.bellyband-link [class*="icon-primary-"].hidden-desktop {
- display: inline-block !important;
- float: left;
- font-size: 24px;
- height: 24px;
- margin-right: 5px;
- margin-top: 8px;
- width: 24px; }
-
-.dark-bg .bellyband-link [class*="icon-primary-"].hidden-desktop,
-.dark-bg .bellyband-link [class*="icon-primary-"].visible-desktop {
- color: #fff; }
-
-.bellyband-link img[src$="svg"].visible-desktop {
- display: none !important; }
-
-.bellyband-link p {
- margin-top: -10px;
- margin-left: 29px;
- font-size: 1.4rem;
- color: #666; }
-
-@media (min-width: 481px) and (max-width: 767px) {
- .bellyband-container {
- display: flex;
- margin: 0; }
- .bellyband-group {
- align-content: flex-start;
- align-items: stretch;
- display: inline-flex;
- flex-direction: column;
- flex-wrap: wrap;
- margin-top: 1px;
- width: 100%; }
- .bellyband-group .row {
- display: flex !important; }
- .bellyband-link {
- padding-top: 0;
- position: relative;
- border-top: none;
- margin-bottom: 20px;
- width: 50%; }
- .bellyband-link a {
- height: inherit;
- line-height: inherit;
- display: flex;
- padding: 0; }
- .bellyband-link a:after {
- display: none; }
- .bellyband-link a span {
- display: block;
- padding-top: 10px; }
- .bellyband-link p {
- display: block;
- padding: 0 15px 0 0;
- margin-bottom: 0;
- margin-left: 0;
- margin-top: 0; }
- .bellyband-link a:focus p {
- text-decoration: none; } }
-
-@media (min-width: 768px) {
- .bellyband-group {
- margin: 0;
- max-width: 100%;
- display: flex;
- flex-wrap: wrap;
- justify-content: center; }
- .bellyband-group .row {
- display: block; }
- .bellyband-group .row .span {
- float: none;
- margin-right: 0;
- margin-bottom: 30px;
- display: flex;
- justify-content: space-between; }
- .bellyband-link {
- border-top: none;
- flex: 0 0 auto;
- margin-right: 0;
- margin-bottom: 30px; }
- .bellyband-link:last-child {
- margin-right: 0; }
- .bellyband-link a {
- height: auto;
- line-height: 1;
- text-align: center; }
- .bellyband-link a:after {
- display: none; }
- .bellyband-link img[src$="svg"].hidden-desktop,
- .bellyband-link [class*="icon-primary-"].hidden-desktop {
- display: none !important; }
- .bellyband-link img[src$="svg"].visible-desktop,
- .bellyband-link [class*="icon-primary-"].visible-desktop {
- display: block !important;
- font-size: 50px;
- height: 50px;
- margin-right: 0;
- margin-top: 0;
- margin-left: auto;
- margin-right: auto;
- width: auto; }
- .bellyband-link a span {
- display: block;
- margin-top: 12px;
- line-height: 2rem; }
- .bellyband-link p {
- display: block;
- text-align: center;
- margin-top: 6px;
- margin-left: 0;
- padding-left: 0 !important;
- color: #666;
- line-height: 1.8rem; } }
-
-@media (max-width: 480px) {
- .bellyband-link-tall a {
- height: auto;
- padding: 0 40px 10px 15px; }
- .bellyband-link-tall p {
- line-height: 1.8rem;
- margin-bottom: 0; }
- .bellyband-link-tall > a:after {
- margin-top: -8px;
- top: 50%; } }
-
-.b2b-boardstrip {
- display: inline-block;
- width: 100%;
- border-bottom: 1px solid #9d9d9d;
- position: relative;
- padding-top: 15px; }
- .b2b-boardstrip .boardstrip-reel {
- margin-bottom: 15px; }
- .b2b-boardstrip .boardstrip-item--add {
- border: 1px dashed #ccc;
- background: #FFFFFF;
- color: #0574ac;
- width: 140px;
- height: 80px;
- font-size: 14px;
- font-family: "Omnes-ECOMP-W02", Arial;
- -webkit-border-radius: 3px;
- -moz-border-radius: 3px;
- border-radius: 3px;
- position: absolute;
- left: 29px;
- top: 15px; }
- .b2b-boardstrip .boardstrip-item--add:hover, .b2b-boardstrip .boardstrip-item--add:focus {
- border: 2px solid #007A3E;
- cursor: pointer; }
- .b2b-boardstrip .boardstrip-item--add i {
- font-size: 14px;
- margin-left: auto;
- margin-right: auto;
- text-align: initial; }
- .b2b-boardstrip .boardstrip-item--add .centered {
- margin-left: auto;
- margin-right: auto;
- margin-top: 27px;
- margin-bottom: 35px;
- display: block; }
- .b2b-boardstrip .board-viewport {
- float: left;
- margin-left: 210px;
- max-height: 95px;
- position: relative;
- height: 95px;
- overflow: hidden;
- width: 0px; }
- .b2b-boardstrip .board-viewport .boardstrip-container {
- width: 0px;
- margin-left: 0;
- left: 0px;
- position: absolute;
- list-style: none;
- -webkit-transition: left 1000ms;
- transition: left 1000ms; }
- .b2b-boardstrip .board-viewport .board-item {
- width: 140px;
- height: 80px;
- border: 1px solid #ccc;
- margin: 0 15px 15px 0;
- background-color: #FFFFFF;
- border-radius: 3px;
- float: left;
- overflow: hidden; }
- .b2b-boardstrip .board-viewport .board-item:hover, .b2b-boardstrip .board-viewport .board-item:focus {
- border: 2px solid #007A3E;
- background-color: white;
- cursor: pointer; }
- .b2b-boardstrip .board-viewport .board-item .board-img {
- width: 61px;
- height: 40px;
- margin: 0 auto; }
- .b2b-boardstrip .board-viewport .board-item .board-img img {
- max-width: 100%; }
- .b2b-boardstrip .board-viewport .board-item .title {
- text-align: center;
- line-height: 16px;
- color: #666;
- font-size: 14px;
- font-family: "Omnes-ECOMP-W02", Arial;
- padding: 10px 0; }
- .b2b-boardstrip .board-viewport .board-item.selected {
- background-color: #FFFFFF;
- border: 2px solid #0574ac; }
- .b2b-boardstrip .board-viewport .board-item .board-caret {
- cursor: default;
- outline: 0;
- position: absolute;
- bottom: 7px; }
- .b2b-boardstrip .board-viewport .board-item .board-caret .board-caret-indicator {
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- border-bottom: 8px solid #999;
- width: 0px;
- height: 0px;
- position: absolute;
- left: 61px;
- bottom: -7px; }
- .b2b-boardstrip .board-viewport .board-item .board-caret .board-caret-arrow-up {
- width: 0px;
- height: 0px;
- border-style: solid;
- border-width: 0 8px 8px 8px;
- border-color: transparent transparent #FFFFFF transparent;
- left: 61px;
- position: absolute; }
- .b2b-boardstrip .arrow {
- font-size: 14px;
- cursor: pointer;
- color: #0574ac; }
- .b2b-boardstrip .arrow:hover {
- color: #0574ac; }
- .b2b-boardstrip .arrow.disabled {
- color: #767676 !important;
- cursor: not-allowed; }
- .b2b-boardstrip .prev-items {
- display: inline-block;
- margin-top: auto;
- margin-bottom: auto;
- margin-right: 15px;
- position: absolute;
- left: 0;
- top: 45px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- -o-user-select: none;
- user-select: none; }
- .b2b-boardstrip .next-items {
- display: inline-block;
- margin-top: 30px;
- margin-bottom: auto;
- margin-left: 10px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- -o-user-select: none;
- user-select: none; }
- .b2b-boardstrip .centered {
- display: table-cell;
- text-align: center;
- vertical-align: middle; }
-
-.breadcrumb {
- padding: 10px 15px;
- height: 40px;
- list-style: none;
- border-bottom: 1px solid #d2d2d2;
- font-size: 1.2rem;
- width: 100%;
- z-index: 1000; }
-
-.breadcrumb > li {
- position: relative;
- display: inline-block;
- margin-right: 15px; }
-
-.breadcrumb > li:after {
- font-size: 8px;
- margin-right: 0;
- right: -8px;
- color: #333333; }
-
-.breadcrumb > li:last-child {
- color: #333333; }
-
-.breadcrumb > li:last-child:after {
- content: ""; }
-
-.breadcrumb li > * {
- float: none !important;
- margin: 0; }
-
-.breadcrumb {
- padding: 10px 15px !important; }
-
-/* ARROW */
-/* spanish */
-.datepicker {
- background-color: #FFFFFF;
- padding: 0;
- border-radius: 5px;
- direction: ltr; }
- .datepicker > div {
- display: none; }
- .datepicker table {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- margin: 0 0 0 0; }
- .datepicker td {
- text-align: center;
- display: block;
- width: 30px;
- height: 30px;
- border: none; }
- .datepicker td span {
- display: block;
- width: 23%;
- height: 54px;
- line-height: 54px;
- float: left;
- margin: 1%;
- cursor: pointer;
- border-radius: 4px; }
- .datepicker td span:hover {
- background: #eeeeee; }
- .datepicker td span.disabled {
- background: none;
- color: #5A5A5A;
- cursor: default; }
- .datepicker td span.disabled:hover {
- background: none;
- color: #5A5A5A;
- cursor: default; }
- .datepicker td span.active {
- color: #FFFFFF;
- background-color: #0568ae;
- border-color: #357ebd; }
- .datepicker td span.active:hover {
- color: #FFFFFF;
- background-color: #0568ae;
- border-color: #357ebd; }
- .datepicker td span.active.disabled {
- color: #FFFFFF;
- background-color: #0568ae;
- border-color: #357ebd; }
- .datepicker th {
- text-align: center;
- display: block;
- width: 30px;
- height: 30px;
- border: none; }
- .datepicker tbody:focus {
- outline: none; }
- .datepicker td.day {
- background-color: transparent;
- color: #0568ae;
- cursor: pointer;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 16px;
- height: 34px;
- line-height: 30rem;
- margin: -2px -1px 0 0;
- overflow: hidden;
- text-align: center;
- width: 42px; }
- .datepicker:focus {
- outline: 1px dotted #191919;
- outline-offset: -2px; }
- .datepicker th[tabindex]:focus {
- outline-offset: -15px; }
- .datepicker td.day.focused {
- background: #ededed;
- cursor: pointer; }
- .datepicker td.day.focused.active {
- background-color: #ededed;
- color: #0568ae; }
- .datepicker td.disabled {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5A5A5A;
- cursor: default; }
- .datepicker td.disabled:hover {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5A5A5A;
- cursor: default; }
- .datepicker td.disabled:hover .show-date {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5A5A5A; }
- .datepicker td.disabled .show-date {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5A5A5A; }
- .datepicker td.today {
- color: #FFFFFF;
- background-color: #0568ae; }
- .datepicker td.today:hover {
- color: #FFFFFF;
- background-color: #0568ae;
- color: #FFFFFF;
- background-color: #0568ae; }
- .datepicker td.today:active {
- color: #FFFFFF;
- background-color: #0568ae; }
- .datepicker td.today:focus {
- color: #FFFFFF;
- background-color: #0568ae; }
- .datepicker td.today.disabled {
- color: #FFFFFF;
- background-color: #0568ae; }
- .datepicker td.today.active {
- color: #FFFFFF;
- background-color: #0568ae; }
- .datepicker td.today.active:hover {
- color: #FFFFFF; }
- .datepicker td.selected {
- color: #FFFFFF;
- background-color: #959595; }
- .datepicker td.selected:hover {
- color: #FFFFFF;
- background-color: #959595; }
- .datepicker td.selected.disabled {
- color: #FFFFFF;
- background-color: #959595; }
- .datepicker td.active:not(.new) {
- color: #FFFFFF;
- border-color: #357ebd; }
- .datepicker td.active:not(.new) .show-date {
- color: #0568ae;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
- .datepicker td.active:hover:not(.new) {
- color: #FFFFFF;
- border-color: #357ebd; }
- .datepicker td.active:hover:not(.new) .show-date {
- color: #0568ae;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
- .datepicker .start-date .show-date {
- background-color: #0568ae;
- color: #FFFFFF !important;
- border-radius: 5px 0 0 5px;
- z-index: 1; }
- .datepicker .start-date .show-date:before {
- background-color: #0568ae;
- content: "";
- display: block;
- height: 26px;
- left: 20px;
- position: absolute;
- width: 100%;
- z-index: -1; }
- .datepicker .between-date .show-date {
- background-color: #0568ae;
- color: #FFFFFF !important; }
- .datepicker .between-date .show-date:before {
- background-color: #0568ae;
- content: "";
- display: block;
- height: 26px;
- left: 0;
- position: absolute;
- width: 100%;
- z-index: -1; }
- .datepicker .between-date:first-child .show-date:before {
- background-color: #FFFFFF;
- content: "";
- height: 26px;
- position: absolute;
- left: 0;
- width: 8px; }
- .datepicker .end-date .show-date {
- background-color: #0568ae;
- color: #FFFFFF !important;
- border-radius: 0 5px 5px 0; }
- .datepicker .end-date .show-date:before {
- background-color: #0568ae;
- content: "";
- display: block;
- height: 26px;
- left: -20px;
- position: absolute;
- width: 100%;
- z-index: -1; }
- .datepicker .end-date:first-child .show-date:after {
- background-color: #FFFFFF;
- content: "";
- height: 26px;
- position: absolute;
- left: 0;
- width: 8px; }
- .datepicker .end-date:first-child .show-date::before {
- background-color: #FFFFFF; }
- .datepicker tr td.start-date:last-child .show-date:after {
- background-color: #FFFFFF;
- content: "";
- height: 26px;
- position: absolute;
- right: 0;
- width: 8px; }
- .datepicker tr td.start-date:last-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
- .datepicker tr td.start-date:first-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
- .datepicker tr td.between-date:last-child .show-date:after {
- background-color: #FFFFFF;
- content: "";
- height: 26px;
- position: absolute;
- right: 0;
- width: 8px; }
- .datepicker tr td.between-date:last-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
- .datepicker tr td.between-date:first-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
- .datepicker tr td.end-date:last-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
- .datepicker tr td.end-date:first-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
- .datepicker th.datepicker-switch {
- width: 198px;
- font-size: 20px;
- font-weight: normal;
- cursor: default !important; }
- .datepicker thead tr:first-child th {
- cursor: pointer;
- height: 60px;
- line-height: 60px; }
- .datepicker thead tr:first-child th.cw {
- cursor: default;
- background-color: transparent; }
- .datepicker tfoot tr th {
- cursor: pointer;
- height: 60px;
- line-height: 60px;
- height: auto;
- line-height: normal; }
- .datepicker tfoot tr th li {
- margin-bottom: 5px; }
- .datepicker .prev {
- color: transparent;
- font-size: 0;
- margin: 0 -1px -1px 0;
- width: 46px; }
- .datepicker .prev i {
- color: #0568ae;
- position: absolute;
- font-size: 27px;
- margin: 0;
- top: 15px;
- left: 8px; }
- .datepicker .next {
- color: transparent;
- font-size: 0;
- margin: 0 -1px -1px 0;
- width: 46px; }
- .datepicker .next i {
- color: #0568ae;
- position: absolute;
- font-size: 27px;
- margin: 0;
- top: 15px;
- right: 8px; }
- .datepicker .cw {
- font-size: 10px;
- width: 12px;
- padding: 0 2px 0 5px;
- vertical-align: middle; }
- .datepicker .due-date .show-date {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- background-color: #cf2a2a;
- border-radius: 5px;
- color: #FFFFFF !important; }
- .datepicker .day.active .show-date:after {
- border: 2px solid #0568ae;
- border-radius: 7px;
- content: "";
- display: block;
- height: 30px;
- left: 4px;
- position: absolute;
- top: 0;
- width: 30px; }
- .datepicker .day:focus .show-date:after {
- border: 2px solid #0568ae;
- border-radius: 7px;
- content: "";
- display: block;
- height: 30px;
- left: 4px;
- position: absolute;
- top: 0;
- width: 30px;
- height: 30px;
- left: 4px;
- top: 0;
- width: 30px; }
- .datepicker .due-date.disabled .show-date:after {
- border: 2px solid #0568ae;
- border-radius: 7px;
- content: "";
- display: block;
- height: 30px;
- left: 4px;
- position: absolute;
- top: 0;
- width: 30px; }
- .datepicker .day.due-date:focus .show-date:after {
- height: 30px;
- left: 4px;
- top: 0;
- width: 30px; }
- .datepicker .due-date.old:after {
- visibility: hidden; }
- .datepicker .due-date.new:after {
- visibility: hidden; }
- .datepicker .due-date.active:after {
- border-color: #FFFFFF; }
- .datepicker .due-date.active.focused {
- color: #0568ae !important; }
- .datepicker .due-date.active.focused:after {
- border-color: #cf2a2a !important; }
- .datepicker .dow {
- height: 24px;
- width: 42px;
- font-weight: normal;
- position: relative;
- overflow: hidden;
- color: transparent;
- letter-spacing: -6px;
- margin: 0 -1px -1px 0; }
- .datepicker .dow span[aria-hidden="true"] {
- bottom: 0;
- color: #5A5A5A;
- display: block;
- left: 1px;
- letter-spacing: 0;
- line-height: .9;
- margin: 0 auto;
- padding: 0;
- position: relative;
- width: 22px; }
- .datepicker .calendar-legend {
- margin-top: 3px;
- margin-bottom: 20px; }
- .datepicker .calendar-legend li {
- font-size: 1.4rem;
- font-weight: normal;
- margin-bottom: 5px;
- padding-left: 10px;
- padding-top: 5px;
- position: relative; }
- .datepicker i.legend-due-date {
- background-color: #cf2a2a;
- border-radius: 5px;
- height: 18px;
- width: 18px;
- margin-right: 8px;
- vertical-align: middle;
- display: inline-block; }
- .datepicker i.legend-selected-date {
- background-color: #FFFFFF;
- border: 2px solid #0568ae;
- border-radius: 5px;
- height: 18px;
- width: 18px;
- margin-right: 8px;
- vertical-align: middle;
- display: inline-block; }
- .datepicker i.legend-selectedisdue {
- background-color: #FFFFFF;
- border: 2px solid #0568ae;
- border-radius: 5px;
- display: inline-block;
- height: 18px;
- margin-right: 8px;
- position: relative;
- vertical-align: middle;
- width: 18px; }
- .datepicker i.legend-selectedisdue:after {
- background-color: #cf2a2a;
- border-radius: 3px;
- content: "";
- display: block;
- height: 10px;
- left: 2px;
- position: absolute;
- top: 2px;
- width: 10px; }
- .datepicker .text-left {
- width: 100%; }
- .datepicker .active.old {
- background-color: #ededed !important;
- color: #ededed !important; }
-
-.datepicker-inline {
- width: 220px; }
-
-.datepicker.datepicker-rtl {
- direction: rtl; }
- .datepicker.datepicker-rtl td span {
- float: right; }
-
-.datepicker-dropdown {
- top: 0;
- left: 0; }
- .datepicker-dropdown:before {
- content: " ";
- display: inline-block;
- border-left: 10px solid transparent;
- border-right: 10px solid transparent;
- border-bottom: 10px solid #d2d2d2;
- border-top: 0;
- border-bottom-color: rgba(0, 0, 0, 0.2);
- position: absolute; }
- .datepicker-dropdown:after {
- content: " ";
- display: inline-block;
- border-left: 10px solid transparent;
- border-right: 10px solid transparent;
- border-bottom: 10px solid #fff;
- border-top: 0;
- position: absolute; }
-
-.datepicker-dropdown.datepicker-orient-left:before {
- left: 16px; }
-
-.datepicker-dropdown.datepicker-orient-left:after {
- left: 16px; }
-
-.datepicker-dropdown.datepicker-orient-right:before {
- right: 16px; }
-
-.datepicker-dropdown.datepicker-orient-right:after {
- right: 16px; }
-
-.datepicker-dropdown.datepicker-orient-top:before {
- top: -10px; }
-
-.datepicker-dropdown.datepicker-orient-top:after {
- top: -9px; }
-
-.datepicker-dropdown.datepicker-orient-bottom:before {
- bottom: -7px;
- border-bottom: 0;
- border-top: 7px solid #959595; }
-
-.datepicker-dropdown.datepicker-orient-bottom:after {
- bottom: -6px;
- border-bottom: 0;
- border-top: 6px solid #fff; }
-
-.datepicker.days div.datepicker-days {
- display: block; }
-
-.datepicker.months div.datepicker-months {
- display: block; }
-
-.datepicker.years div.datepicker-years {
- display: block; }
-
-.show-date {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- color: #0568ae;
- height: 26px;
- line-height: 26px;
- margin: 4px auto 0;
- width: 26px; }
-
-.input-group.date .input-group-addon i {
- cursor: pointer;
- width: 16px;
- height: 16px; }
-
-.datepicker.dropdown-menu {
- box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.7);
- position: absolute;
- top: 100%;
- left: 0;
- float: left;
- display: none;
- margin-top: 13px;
- width: 290px;
- list-style: none;
- background-color: #FFFFFF;
- border: 1px solid #d2d2d2;
- border: 1px solid rgba(0, 0, 0, 0.2);
- border-radius: 5px;
- color: #333333;
- font-size: 13px;
- line-height: 1.428571429;
- z-index: 1050; }
- .datepicker.dropdown-menu th {
- display: block;
- float: left;
- padding: 0;
- position: relative; }
- .datepicker.dropdown-menu td {
- display: block;
- float: left;
- padding: 0;
- position: relative; }
-
-.s {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: -62px 0; }
-
-.m {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: -5px 0; }
-
-.t {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: -19px 0; }
-
-.w {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: -34px 0; }
-
-.f {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: -49px 0; }
-
-.d {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: 0 0; }
-
-.l {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: 0 0; }
-
-.v {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: 0 0; }
-
-.j {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: #FFFFFF;
- background-repeat: no-repeat;
- background-position: 0 0; }
-
-.b2b-coachmark-label {
- z-index: 1060;
- opacity: 1;
- cursor: not-allowed;
- position: relative; }
-
-.b2b-coachmark-highlight {
- border: 1px solid #d3d3d3;
- cursor: default;
- z-index: 1045;
- opacity: 1;
- background-color: #ffffff;
- border-radius: 10px;
- position: relative;
- box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.25);
- padding: 10px;
- position: absolute; }
-
-.b2b-coachmark-highlight-mask {
- z-index: 1100;
- opacity: .1; }
-
-.b2b-coachmark-container {
- border: 1px solid #cccccc;
- width: 316px;
- pointer-events: auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- font-size: 16px;
- -webkit-transition: opacity .2s ease-out;
- -moz-transition: opacity .2s ease-out;
- transition: opacity .2s ease-out;
- background: #fff;
- border-radius: 20px;
- box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.15);
- color: #333;
- line-height: 20px;
- position: absolute;
- top: 50px;
- left: -97px;
- display: block;
- background-color: #ffffff;
- z-index: 1050;
- opacity: 1; }
- .b2b-coachmark-container i.b2b-coachmark-caret {
- position: absolute;
- top: -12px;
- left: 47%;
- opacity: 1;
- z-index: 1050; }
- .b2b-coachmark-container i.b2b-coachmark-caret:before {
- content: "";
- border-left: 12px solid transparent;
- border-right: 12px solid transparent;
- border-bottom: 12px solid #d3d3d3;
- position: absolute;
- top: -1px; }
- .b2b-coachmark-container i.b2b-coachmark-caret:after {
- content: "";
- border-left: 12px solid transparent;
- border-right: 12px solid transparent;
- border-bottom: 12px solid #fff;
- position: absolute; }
- .b2b-coachmark-container .b2b-coachmark-header {
- position: relative;
- height: 47px;
- overflow: hidden; }
- .b2b-coachmark-container .b2b-coachmark-header .corner-button {
- box-shadow: 0 -24px 0 0 #f2f2f2 inset;
- height: 69px;
- position: absolute;
- right: -33px;
- top: -38px;
- transform: rotate(45deg);
- width: 69px; }
- .b2b-coachmark-container .b2b-coachmark-countlabel {
- font-size: 12px;
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #333333;
- margin-left: 20px;
- margin-top: 20px; }
- .b2b-coachmark-container .b2b-coachmark-content {
- padding: 0px 20px 20px 20px;
- float: left; }
- .b2b-coachmark-container .b2b-coachmark-content .icon-misc-dimmer {
- font-size: 32px;
- float: left;
- margin-right: 10px;
- width: 32px; }
- .b2b-coachmark-container .b2b-coachmark-content .offscreen-text {
- position: absolute;
- left: -10000px;
- top: auto;
- width: 1px;
- height: 1px;
- overflow: hidden; }
- .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-content-header {
- font-size: 16px;
- color: #333333;
- line-height: 18px;
- float: left;
- width: 220px; }
- .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-description {
- font-size: 14px;
- line-height: 18px;
- color: #333333;
- width: 100%;
- float: left;
- margin-top: 15px; }
- .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group {
- margin-top: 20px;
- float: left;
- text-align: right;
- width: 100%; }
- .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group .b2b-coachmark-link {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 15px;
- color: #0574ac;
- line-height: 18px;
- margin-right: 20px; }
- .b2b-coachmark-container .b2b-coachmark-content .b2b-coachmark-btn-group button {
- font-size: 15px;
- margin: 0px; }
-
-.datepicker {
- background-color: #fff;
- padding: 0;
- border-radius: 5px;
- direction: ltr; }
-
-.datepicker-inline {
- width: 220px; }
-
-.datepicker.datepicker-rtl {
- direction: rtl; }
-
-.datepicker.datepicker-rtl td span {
- float: right; }
-
-.datepicker-dropdown {
- top: 0;
- left: 0; }
-
-/* ARROW */
-.datepicker-dropdown:before {
- content: " ";
- display: inline-block;
- border-left: 10px solid transparent;
- border-right: 10px solid transparent;
- border-bottom: 10px solid #d2d2d2;
- border-top: 0;
- border-bottom-color: rgba(0, 0, 0, 0.2);
- position: absolute; }
-
-.datepicker-dropdown:after {
- content: " ";
- display: inline-block;
- border-left: 10px solid transparent;
- border-right: 10px solid transparent;
- border-bottom: 10px solid #fff;
- border-top: 0;
- position: absolute; }
-
-.datepicker-dropdown.datepicker-orient-left:before,
-.datepicker-dropdown.datepicker-orient-left:after {
- left: 255px; }
-
-.datepicker-dropdown.datepicker-orient-right:before,
-.datepicker-dropdown.datepicker-orient-right:after {
- right: 16px; }
-
-.datepicker-dropdown.datepicker-orient-top:before {
- top: -10px; }
-
-.datepicker-dropdown.datepicker-orient-top:after {
- top: -9px; }
-
-.datepicker-dropdown.datepicker-orient-bottom:before {
- bottom: -7px;
- border-bottom: 0;
- border-top: 7px solid #959595; }
-
-.datepicker-dropdown.datepicker-orient-bottom:after {
- bottom: -6px;
- border-bottom: 0;
- border-top: 6px solid #fff; }
-
-.datepicker > div {
- display: none; }
-
-.datepicker.days div.datepicker-days {
- display: block; }
-
-.datepicker.months div.datepicker-months {
- display: block; }
-
-.datepicker.years div.datepicker-years {
- display: block; }
-
-.datepicker table {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- margin: 0 0 0 0; }
-
-.datepicker td,
-.datepicker th {
- text-align: center;
- display: block;
- width: 30px;
- height: 30px;
- border: none; }
-
-.datepicker tbody :focus {
- outline: none; }
-
-.datepicker td.day {
- background-color: transparent;
- color: #0568ae;
- cursor: pointer;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 16px;
- height: 34px;
- line-height: 30rem;
- margin: -2px -1px 0 0;
- overflow: hidden;
- text-align: center;
- width: 42px; }
-
-.datepicker :focus {
- outline: 1px dotted #000;
- outline-offset: -2px; }
-
-.datepicker td.day.focused {
- background: #ededed;
- cursor: pointer; }
-
-.datepicker td.day.focused.active {
- background-color: #ededed;
- color: #0568ae; }
-
-.datepicker td.disabled,
-.datepicker td.disabled:hover {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5a5a5a;
- cursor: default; }
-
-.datepicker td.today,
-.datepicker td.today:hover,
-.datepicker td.today.disabled {
- color: #fff;
- background-color: #0568ae; }
-
-.datepicker td.today.active,
-.datepicker td.today:active,
-.datepicker td.today:hover,
-.datepicker td.today:focus {
- color: #fff;
- background-color: #0568ae; }
-
-.datepicker td.today.active:hover {
- color: #fff; }
-
-.datepicker td.selected,
-.datepicker td.selected:hover,
-.datepicker td.selected.disabled {
- color: #ffffff;
- background-color: #959595; }
-
-.datepicker td.active:not(.new),
-.datepicker td.active:hover:not(.new) {
- color: #ffffff;
- border-color: #357ebd; }
-
-.show-date {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- color: #0568ae;
- height: 26px;
- line-height: 26px;
- margin: 4px auto 0;
- width: 26px; }
-
-.datepicker .start-date .show-date,
-.datepicker .between-date .show-date,
-.datepicker .end-date .show-date {
- background-color: #0568ae;
- color: #fff !important; }
-
-.datepicker .start-date .show-date {
- border-radius: 5px 0 0 5px;
- z-index: 1; }
-
-.datepicker .start-date .show-date:before {
- background-color: #0568ae;
- content: "";
- display: block;
- height: 26px;
- left: 20px;
- position: absolute;
- width: 100%;
- z-index: -1; }
-
-.datepicker .between-date .show-date:before {
- background-color: #0568ae;
- content: "";
- display: block;
- height: 26px;
- left: 0;
- position: absolute;
- width: 100%;
- z-index: -1; }
-
-.datepicker .end-date .show-date {
- border-radius: 0 5px 5px 0; }
-
-.datepicker .end-date .show-date:before {
- background-color: #0568ae;
- content: "";
- display: block;
- height: 26px;
- left: -20px;
- position: absolute;
- width: 100%;
- z-index: -1; }
-
-.datepicker .between-date:first-child .show-date:before {
- background-color: #fff;
- content: "";
- height: 26px;
- position: absolute;
- left: 0;
- width: 8px; }
-
-.datepicker .end-date:first-child .show-date:after {
- background-color: #fff;
- content: "";
- height: 26px;
- position: absolute;
- left: 0;
- width: 8px; }
-
-.datepicker .end-date:first-child .show-date::before {
- background-color: #fff; }
-
-.datepicker tr td.start-date:last-child .show-date:after,
-.datepicker tr td.between-date:last-child .show-date:after {
- background-color: #fff;
- content: "";
- height: 26px;
- position: absolute;
- right: 0;
- width: 8px; }
-
-.datepicker tr td.start-date:last-child:focus .show-date:after,
-.datepicker tr td.end-date:last-child:focus .show-date:after,
-.datepicker tr td.between-date:last-child:focus .show-date:after,
-.datepicker tr td.start-date:first-child:focus .show-date:after,
-.datepicker tr td.end-date:first-child:focus .show-date:after,
-.datepicker tr td.between-date:first-child:focus .show-date:after {
- height: 30px;
- width: 30px;
- background-color: transparent; }
-
-.datepicker td.active:not(.new) .show-date,
-.datepicker td.active:hover:not(.new) .show-date {
- color: #0568ae;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.datepicker td.disabled .show-date,
-.datepicker td.disabled:hover .show-date {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5a5a5a; }
-
-.datepicker td span {
- display: block;
- width: 23%;
- height: 54px;
- line-height: 54px;
- float: left;
- margin: 1%;
- cursor: pointer;
- border-radius: 4px; }
-
-.datepicker td span:hover {
- background: #eeeeee; }
-
-.datepicker td span.disabled,
-.datepicker td span.disabled:hover {
- background: none;
- color: #5a5a5a;
- cursor: default; }
-
-.datepicker td span.active,
-.datepicker td span.active:hover,
-.datepicker td span.active.disabled {
- color: #ffffff;
- background-color: #0568ae;
- border-color: #357ebd; }
-
-.datepicker th.datepicker-switch {
- width: 198px;
- font-size: 20px;
- font-weight: normal;
- cursor: default !important; }
-
-.datepicker thead tr:first-child th,
-.datepicker tfoot tr th {
- cursor: pointer;
- height: 60px;
- line-height: 60px; }
-
-.datepicker tfoot tr th {
- height: auto;
- line-height: normal; }
-
-.datepicker tfoot tr th li {
- margin-bottom: 5px; }
-
-.datepicker .prev,
-.datepicker .next {
- color: transparent;
- font-size: 0;
- margin: 0 -1px -1px 0;
- width: 46px; }
-
-.datepicker .prev i,
-.datepicker .next i {
- color: #0568ae;
- position: absolute;
- font-size: 27px;
- margin: 0;
- top: 15px; }
-
-.datepicker .prev i {
- left: 8px; }
-
-.datepicker .next i {
- right: 8px; }
-
-.datepicker .cw {
- font-size: 10px;
- width: 12px;
- padding: 0 2px 0 5px;
- vertical-align: middle; }
-
-.datepicker thead tr:first-child th.cw {
- cursor: default;
- background-color: transparent; }
-
-.input-group.date .input-group-addon i {
- cursor: pointer;
- width: 16px;
- height: 16px; }
-
-.datepicker.dropdown-menu {
- box-shadow: 0 10px 15px -10px rgba(0, 0, 0, 0.7);
- position: absolute;
- top: 100%;
- left: 0;
- float: left;
- display: none;
- margin-top: 13px;
- width: 290px;
- list-style: none;
- background-color: #ffffff;
- border: 1px solid #d2d2d2;
- border: 1px solid rgba(0, 0, 0, 0.2);
- border-radius: 5px;
- color: #333333;
- font-size: 13px;
- line-height: 1.428571429;
- z-index: 1050; }
-
-.datepicker.dropdown-menu th,
-.datepicker.dropdown-menu td {
- display: block;
- float: left;
- padding: 0;
- position: relative; }
-
-.datepicker .due-date .show-date {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- background-color: #cf2a2a;
- border-radius: 5px;
- color: #fff !important; }
-
-.datepicker .day.active .show-date:after,
-.datepicker .day:focus .show-date:after,
-.datepicker .due-date.disabled .show-date:after {
- border: 2px solid #0568ae;
- border-radius: 7px;
- content: "";
- display: block;
- height: 30px;
- left: 4px;
- position: absolute;
- top: 0;
- width: 30px; }
-
-.datepicker .day:focus .show-date:after {
- height: 30px;
- left: 4px;
- top: 0;
- width: 30px; }
-
-.datepicker .day.due-date:focus .show-date:after {
- height: 30px;
- left: 4px;
- top: 0;
- width: 30px; }
-
-.datepicker .due-date.old:after,
-.datepicker .due-date.new:after {
- visibility: hidden; }
-
-.datepicker .due-date.active:after {
- border-color: #fff; }
-
-.datepicker .due-date.active.focused {
- color: #0568ae !important; }
-
-.datepicker .due-date.active.focused:after {
- border-color: #cf2a2a !important; }
-
-.datepicker .dow {
- height: 24px;
- width: 42px;
- font-weight: normal;
- position: relative;
- overflow: hidden;
- color: transparent;
- letter-spacing: -6px;
- margin: 0 -1px -1px 0; }
-
-.datepicker .dow span[aria-hidden="true"] {
- bottom: 0;
- color: #5a5a5a;
- display: block;
- left: 1px;
- letter-spacing: 0;
- line-height: .9;
- margin: 0 auto;
- padding: 0;
- position: relative;
- width: 22px; }
-
-.datepicker .calendar-legend {
- margin-top: 3px;
- margin-bottom: 20px; }
-
-.datepicker .calendar-legend li {
- font-size: 1.4rem;
- font-weight: normal;
- margin-bottom: 5px;
- padding-left: 10px;
- padding-top: 5px;
- position: relative; }
-
-.datepicker i.legend-due-date {
- background-color: #cf2a2a;
- border-radius: 5px;
- height: 18px;
- width: 18px;
- margin-right: 8px;
- vertical-align: middle;
- display: inline-block; }
-
-.datepicker i.legend-selected-date {
- background-color: #fff;
- border: 2px solid #0568ae;
- border-radius: 5px;
- height: 18px;
- width: 18px;
- margin-right: 8px;
- vertical-align: middle;
- display: inline-block; }
-
-.datepicker i.legend-selectedisdue {
- background-color: #fff;
- border: 2px solid #0568ae;
- border-radius: 5px;
- display: inline-block;
- height: 18px;
- margin-right: 8px;
- position: relative;
- vertical-align: middle;
- width: 18px; }
-
-.datepicker i.legend-selectedisdue:after {
- background-color: #cf2a2a;
- border-radius: 3px;
- content: "";
- display: block;
- height: 10px;
- left: 2px;
- position: absolute;
- top: 2px;
- width: 10px; }
-
-.datepicker .text-left {
- width: 100%; }
-
-.datepicker .active.old {
- background-color: #ededed !important;
- color: #ededed !important; }
-
-.s,
-.m,
-.t,
-.w,
-.f,
-.d,
-.l,
-.v,
-.j {
- display: block;
- height: 20px;
- width: 12px;
- margin: 0 auto;
- background-color: white;
- background-repeat: no-repeat; }
-
-.s {
- background-position: -62px 0; }
-
-.m {
- background-position: -5px 0; }
-
-.t {
- background-position: -19px 0; }
-
-.w {
- background-position: -34px 0; }
-
-.f {
- background-position: -49px 0; }
-
-/* spanish */
-.d {
- background-position: 0 0; }
-
-.l {
- background-position: 0 0; }
-
-.v {
- background-position: 0 0; }
-
-.j {
- background-position: 0 0; }
-
-.datepicker-container {
- position: relative; }
-
-.btn-calendar-icon:focus .icon-primary-calendar {
- outline: 1px dotted #191919; }
-
-.btn-calendar-icon:focus {
- outline: none; }
-
-/* remove focus outline when dropdown is opened */
-/*resolve blue focus outline over dropdown with error*/
-select {
- margin-right: -1;
- max-width: 100%;
- height: 36px;
- line-height: 25px;
- width: auto;
- background-color: #FFFFFF; }
-
-.selectWrap.disabled .icon-primary-down {
- color: #767676; }
-
-.selectWrap.disabled input.awd-select {
- z-index: 0;
- padding: 10px 45px 10px 15px;
- text-indent: 0; }
-
-.selectWrap.disabled button.awd-select {
- z-index: 0;
- text-indent: 15px; }
-
-.selectWrap.disabled:after {
- color: #5A5A5A;
- cursor: not-allowed; }
-
-input.awd-select {
- background-color: transparent;
- border: 1px solid #d2d2d2;
- border-radius: 6px;
- box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);
- color: #333333;
- display: block;
- font-family: "Omnes-ECOMP-W02", Arial;
- /*font-size: 1.6rem;*/
- height: 36px;
- line-height: 0;
- margin-bottom: 0;
- position: relative;
- text-align: left;
- top: 0;
- width: 100%;
- z-index: 10;
- padding: 12px 45px 8px 15px;
- user-select: none; }
- input.awd-select:focus {
- border-color: #0568ae !important;
- text-overflow: ellipsis;
- padding-right: 45px; }
-
-button.awd-select {
- background-color: transparent;
- border: 1px solid #d2d2d2;
- border-radius: 6px;
- box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);
- color: #333333;
- display: block;
- font-family: "Omnes-ECOMP-W02", Arial;
- /*font-size: 1.6rem;*/
- height: 36px;
- line-height: 36px;
- margin-bottom: 0;
- position: relative;
- text-align: left;
- top: 0;
- width: 100%;
- z-index: 10; }
- button.awd-select:not(.large) {
- text-indent: 15px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: clip;
- text-overflow: ellipsis; }
- button.awd-select img {
- height: 26px;
- margin-right: 7px;
- margin-top: -10px;
- position: relative;
- top: 2px;
- vertical-align: text-bottom; }
- button.awd-select:focus {
- border-color: #0568ae !important; }
- button.awd-select i {
- font-size: 23px;
- position: absolute;
- right: 33px;
- top: 5px;
- z-index: 1000; }
-
-button.awd-select.large {
- align-items: center;
- display: flex;
- height: 60px;
- line-height: 20px;
- overflow: hidden;
- padding-left: 70px;
- vertical-align: middle; }
- button.awd-select.large img {
- height: 40px;
- left: 20px;
- position: absolute;
- top: 20px;
- width: 40px; }
-
-.selectWrap.large {
- height: 60px; }
- .selectWrap.large .awd-select-list-item {
- align-items: center;
- display: flex;
- height: 60px;
- line-height: 20px;
- overflow: hidden;
- padding-left: 70px;
- vertical-align: middle; }
- .selectWrap.large .awd-select-list-item img {
- height: 40px;
- left: 20px;
- position: absolute;
- top: 20px;
- width: 40px;
- top: 10px; }
-
-button.awd-select.active {
- border-radius: 6px 6px 0 0; }
- button.awd-select.active:focus {
- border-color: #d2d2d2 !important; }
-
-input.awd-select.active {
- border-radius: 6px 6px 0 0; }
- input.awd-select.active:focus {
- border-color: #d2d2d2 !important; }
-
-.selectWrapper {
- position: relative; }
-
-span.selectWrap input[readonly]:focus {
- color: transparent;
- text-shadow: 0 0 0 #000; }
-
-.isIE.ds2-no-colors .awd-select:focus {
- outline: 1px dashed transparent; }
-
-.awd-select-list {
- box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
- border-radius: 0 0 6px 6px;
- position: absolute;
- border: 1px solid #d2d2d2;
- border-top: 0;
- padding: 0;
- background-color: #f2f2f2;
- z-index: 1000;
- width: 100%;
- max-height: 320px;
- overflow-y: auto; }
-
-.awd-select-list-item {
- cursor: pointer;
- height: 100%;
- min-height: 36px;
- line-height: 20px;
- overflow: hidden;
- padding: 8px 15px;
- position: relative;
- z-index: 1000; }
- .awd-select-list-item:hover {
- cursor: pointer;
- background-color: #d2d2d2;
- outline: 1px dashed transparent; }
- .awd-select-list-item:focus {
- cursor: pointer;
- background-color: #d2d2d2;
- outline: 1px dashed transparent; }
- .awd-select-list-item img {
- margin-top: 0;
- margin-right: 7px;
- height: 26px;
- width: 26px; }
-
-.selectWrap {
- border-radius: 6px;
- position: relative;
- height: 36px;
- line-height: 28px;
- display: block;
- margin: 0;
- background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
- background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0); }
- .selectWrap:not(.large) .awd-select-list-item:first-child {
- margin-top: 15px; }
- .selectWrap:not(.large) .awd-select-list-item:last-child {
- margin-bottom: 15px; }
- .selectWrap .icon-primary-down {
- font-size: 23px;
- margin-top: -11px;
- position: absolute;
- right: 4px;
- top: 50%; }
- .selectWrap + [aria-expanded="true"] {
- padding-bottom: 9px;
- padding-top: 20px; }
-
-.awd-select-list-item[data-hover="true"] {
- background-color: #d2d2d2; }
-
-span input.awd-select {
- width: 100%;
- cursor: pointer;
- text-overflow: ellipsis;
- padding-right: 45px; }
-
-li.optgroup-wrapper {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- cursor: default !important;
- padding: 0px 15px; }
- li.optgroup-wrapper:first-child {
- padding-top: 10px; }
- li.optgroup-wrapper:hover {
- background-color: #f2f2f2; }
-
-ul.optgroup {
- font-family: "Omnes-ECOMP-W02", Arial;
- cursor: pointer !important;
- margin: 0 -15px; }
- ul.optgroup li {
- padding: 0 0 0 33px; }
-
-label + .selectWrap {
- margin-top: 4px; }
-
-.selectorModule {
- border-radius: 6px;
- position: relative;
- height: 36px;
- line-height: 28px;
- display: block;
- margin: 0;
- background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
- background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0); }
-
-.group .selectWrap {
- margin: 0 0 10px 0; }
-
-select.awd-select {
- position: relative;
- top: 0;
- left: 0;
- font-size: 16px;
- z-index: 1010;
- height: 33px;
- min-width: 100%;
- opacity: 0.01; }
- select.awd-select > optgroup {
- padding-left: 8px;
- font-style: normal;
- margin-top: 10px; }
- select.awd-select > optgroup:first-child {
- margin-top: 0; }
- select.awd-select > optgroup > option {
- padding-left: 8px; }
- select.awd-select > option {
- padding-left: 8px; }
- select.awd-select + span {
- background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
- background: -webkit-linear-gradient(top, #fcfcfc 0%, #f2f2f2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="@att-gray-highlight", endColorstr="@att-functional-bg-gray", GradientType=0);
- position: absolute;
- top: 0;
- left: 0;
- z-index: 0;
- display: block;
- border: 1px solid #d2d2d2;
- border-radius: 6px;
- height: 35px;
- line-height: 0;
- padding: 18px 45px 15px 15px;
- width: 100%;
- font-size: 1.6rem;
- padding-right: 45px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis; }
- select.awd-select + span > i {
- font-size: 23px;
- position: absolute;
- right: 33px;
- top: 5px;
- z-index: 1000; }
- select.awd-select + span > i:before {
- left: 1px;
- position: absolute;
- top: -1px; }
- select.awd-select:focus + span {
- border-color: #0568ae; }
-
-.isIE select.awd-select + span {
- line-height: 1; }
-
-[data-default-option="true"] {
- color: #767676 !important;
- font-family: "Omnes-ECOMP-W02-Italic", Arial; }
-
-.placeholdercolor {
- color: #767676 !important;
- font-family: "Omnes-ECOMP-W02-Italic", Arial; }
-
-.filterTank button.awd-select {
- border-color: #d2d2d2;
- background-color: #333333;
- color: #FFFFFF;
- color: #333333; }
- .filterTank button.awd-select:after {
- background-color: #FFFFFF !important;
- border-color: #d2d2d2; }
-
-.utility-bg button.awd-select {
- border-color: #d2d2d2;
- background-color: #333333;
- color: #FFFFFF;
- color: #333333; }
- .utility-bg button.awd-select:after {
- background-color: #FFFFFF !important;
- border-color: #d2d2d2; }
-
-.utility-bg select.awd-select + span {
- border-color: #d2d2d2;
- border-color: #d2d2d2;
- background-color: #333333;
- background-color: #333333;
- color: #FFFFFF;
- color: #FFFFFF; }
- .utility-bg select.awd-select + span:after {
- background-color: #FFFFFF !important;
- background-color: #FFFFFF !important;
- border-color: #d2d2d2;
- border-color: #d2d2d2; }
-
-.utility-bg select.awd-select:focus + span {
- border-color: #d2d2d2;
- border-color: #d2d2d2;
- background-color: #333333;
- background-color: #333333;
- color: #FFFFFF;
- color: #FFFFFF; }
- .utility-bg select.awd-select:focus + span:after {
- background-color: #FFFFFF !important;
- background-color: #FFFFFF !important;
- border-color: #d2d2d2;
- border-color: #d2d2d2; }
-
-.utility-bg select.awd-select:hover + span {
- border-color: #d2d2d2;
- border-color: #d2d2d2;
- background-color: #333333;
- background-color: #333333;
- color: #FFFFFF;
- color: #FFFFFF; }
- .utility-bg select.awd-select:hover + span:after {
- background-color: #FFFFFF !important;
- background-color: #FFFFFF !important;
- border-color: #d2d2d2;
- border-color: #d2d2d2; }
-
-input.awd-select[disabled] {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- input.awd-select[disabled] + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
-
-button.awd-select[disabled] {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- button.awd-select[disabled]:after {
- background-color: #d2d2d2 !important;
- border-color: #d2d2d2; }
-
-select.awd-select[disabled] + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- select.awd-select[disabled] + span:after {
- background-color: #d2d2d2 !important;
- border-color: #d2d2d2; }
-
-select.awd-select[disabled]:focus + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
-
-select.awd-select[disabled]:hover + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
-
-input.awd-select[disabled="disabled"] {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- input.awd-select[disabled="disabled"] + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
-
-select.awd-select[disabled="disabled"] + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- select.awd-select[disabled="disabled"] + span:after {
- background-color: #d2d2d2 !important;
- border-color: #d2d2d2; }
-
-select.awd-select[disabled="disabled"]:focus + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- select.awd-select[disabled="disabled"]:focus + span:after {
- background-color: #d2d2d2 !important;
- border-color: #d2d2d2; }
-
-select.awd-select[disabled="disabled"]:hover + span {
- cursor: not-allowed;
- border-color: #d2d2d2;
- background-color: #d2d2d2;
- background-image: none;
- color: #5A5A5A; }
- select.awd-select[disabled="disabled"]:hover + span:after {
- background-color: #d2d2d2 !important;
- border-color: #d2d2d2; }
-
-.ddexpand-wrapper > h2 {
- margin-bottom: 11px; }
- .ddexpand-wrapper > h2 + p {
- margin-bottom: 4px; }
-
-.ddexpand-wrapper .selectWrap + [aria-expanded="true"] .form-row {
- margin-top: 11px; }
-
-.ddexpand-wrapper .selectWrap + [aria-expanded="true"] .row + .row .form-row {
- margin-top: 14px; }
-
-.modal .awd-select-list {
- z-index: 1060 !important; }
-
-.form-row.error button.awd-select.active:focus {
- border-color: #cf2a2a !important; }
-
-.form-row.error input.awd-select.active:focus {
- border-color: #cf2a2a !important; }
-
-.awd-module-list .module-list-item[aria-selected="true"] {
- background-color: #f2f2f2; }
-
-li.module-list-item[aria-selected="true"]:before {
- color: #0568ae;
- display: inline-block;
- font-family: "icoControls" !important;
- font-style: normal;
- font-size: 20px;
- font-weight: normal;
- font-variant: normal;
- height: 1em;
- margin-right: 7px;
- text-transform: none;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- position: relative;
- speak: none;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- vertical-align: middle;
- width: 1em;
- content: "\e907";
- box-sizing: border-box;
- display: inline-block;
- font-size: 2em;
- height: 1em;
- position: absolute;
- top: 20px;
- right: 0px;
- vertical-align: middle;
- width: 1em;
- color: #007a3e; }
-
-@media (min-width: 768px) {
- span[class*="large"] {
- max-width: 370px; }
- .large {
- max-width: 370px; } }
-
-@media (max-width: 767px) {
- .selectWrap.large:after {
- right: 5px; }
- .selectWrap.large .awd-select-list-item {
- padding-right: 41px; }
- .selectWrap + div > h4 {
- margin-bottom: 0;
- font-size: 16px; } }
-
-/**********************Dropdown Chrome scrolling fix start ********************/
-input.awd-select {
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- user-select: text; }
-
-/**********************Dropdown Chrome scrolling fix end ********************/
-.mpc-expanders {
- border-bottom: 1px solid #e4e4e4;
- border-top: 1px solid #e4e4e4; }
-
-.mpc-expanders + .mpc-expanders {
- border-top: 0px; }
-
-.mpc-expanders .heading-medium {
- margin-bottom: 10px; }
-
-.mpc-expanders .p-small {
- margin-top: 5px; }
-
-.mpc-expander-body {
- border-top: 1px solid #e4e4e4; }
-
-.mpc-expander-body .mpc-expanders {
- border-bottom: 1px solid #e4e4e4;
- border-top: 0; }
-
-.mpc-expander-body .mpc-expanders:last-child {
- border-bottom: 0px; }
-
-.ddh-blue {
- color: #0574ac; }
-
-.b2b-dragdrop {
- border: 1px dashed #bbb;
- border-radius: 5px;
- padding: 0;
- text-align: center;
- color: #bbb;
- position: relative; }
-
-.b2b-dragdrop-over {
- background: #0091d9;
- color: #006496; }
- .b2b-dragdrop-over:after {
- content: "Drop the file";
- color: #fff;
- width: 80px;
- height: 20px;
- overflow: hidden;
- margin: auto;
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- right: 0; }
-
-.b2b-file-container {
- position: relative;
- overflow: hidden;
- display: inline-table;
- font-weight: 400; }
- .b2b-file-container [type=file] {
- position: absolute;
- cursor: inherit;
- display: block;
- font-size: 0;
- opacity: 0;
- height: 0;
- width: 0;
- left: 0;
- top: 0;
- -ms-filter: "alpha(Opacity=0)"; }
-
-.b2b-upload-link {
- color: #0568ae; }
-
-.b2b-flyout {
- position: relative;
- display: inline-block;
- cursor: default; }
-
-.b2b-flyout-icon {
- cursor: pointer; }
- .b2b-flyout-icon:focus {
- outline: thin dotted #666;
- outline-offset: -1px; }
-
-.b2b-flyout .b2b-flyout-container {
- border: 1px solid #d3d3d3;
- width: 300px;
- padding: 20px;
- pointer-events: auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- font-size: 16px;
- -webkit-transition: opacity .2s ease-out;
- -moz-transition: opacity .2s ease-out;
- transition: opacity .2s ease-out;
- background: #fff;
- border-radius: 6px;
- box-shadow: 0 5px 6px 0 rgba(0, 0, 0, 0.25);
- color: #333;
- line-height: 20px;
- position: absolute;
- top: 35px;
- opacity: 0;
- z-index: 1010;
- display: none; }
- .b2b-flyout .b2b-flyout-container.open-flyout {
- opacity: 1;
- display: block; }
-
-.b2b-flyout i.b2b-flyout-caret {
- position: absolute;
- top: -8px;
- left: 50%;
- opacity: 0;
- z-index: 1011;
- display: none; }
- .b2b-flyout i.b2b-flyout-caret.open-flyout {
- opacity: 1;
- display: block; }
- .b2b-flyout i.b2b-flyout-caret:before {
- content: "";
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- border-bottom: 8px solid #d3d3d3;
- position: absolute;
- top: -1px; }
- .b2b-flyout i.b2b-flyout-caret:after {
- content: "";
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- border-bottom: 8px solid #fff;
- position: absolute; }
-
-.b2b-flyout .b2b-flyout-container.b2b-flyout-left i.b2b-flyout-caret {
- left: 16px !important; }
-
-.b2b-flyout .b2b-flyout-container.b2b-flyout-right i.b2b-flyout-caret {
- left: inherit !important;
- right: 30px !important; }
-
-.b2b-flyout .b2b-flyout-container.b2b-flyout-above {
- box-shadow: 0 -5px 6px 0 rgba(0, 0, 0, 0.25); }
- .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret {
- top: auto;
- bottom: 0px; }
- .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret:before {
- top: auto;
- bottom: -9px;
- border-top: 8px solid #d3d3d3;
- border-bottom: none; }
- .b2b-flyout .b2b-flyout-container.b2b-flyout-above i.b2b-flyout-caret:after {
- border-top: 8px solid #fff;
- border-bottom: none; }
-
-.b2b-flyout .b2b-flyout-container.b2b-flyout-centerLeft i.b2b-flyout-caret {
- left: inherit !important;
- right: -7px !important;
- top: 8px;
- transform: rotate(90deg); }
-
-.b2b-flyout .b2b-flyout-container.b2b-flyout-centerRight i.b2b-flyout-caret {
- left: -8px !important;
- top: 296px;
- transform: rotate(-90deg); }
-
-.b2b-flyout .buttons-group {
- margin-top: 20px; }
- .b2b-flyout .buttons-group .cta-button-group {
- width: 100%;
- border-top: 1px solid #ccc;
- padding: 20px 0 0; }
- .b2b-flyout .buttons-group .cta-button-group button {
- margin-bottom: 0; }
-
-.b2b-flyout .heading {
- font-size: 20px;
- margin-bottom: 10px; }
-
-.b2b-flyout .body-text {
- font-size: 14px;
- margin-bottom: 30px; }
-
-.b2b-footer-wrapper {
- width: 100%;
- background-color: #222; }
-
-.b2b-footer-container {
- width: 980px;
- margin: 0 auto;
- padding-top: 15px; }
- .b2b-footer-container .footer-columns {
- display: inline-block;
- text-align: left;
- vertical-align: top; }
- .b2b-footer-container .footer-columns.three-column, .b2b-footer-container .footer-columns.four-column, .b2b-footer-container .footer-columns.five-column {
- padding-top: 30px; }
- .b2b-footer-container .footer-columns.three-column {
- width: 33.3%;
- padding-left: 75px; }
- .b2b-footer-container .footer-columns.four-column {
- width: 25%;
- padding-left: 75px; }
- .b2b-footer-container .footer-columns.five-column {
- width: 20%; }
- .b2b-footer-container .footer-columns .b2b-footer-header {
- color: #009fdb;
- font-size: 18px;
- font-style: normal;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- line-height: 23.9px;
- margin: 0; }
- .b2b-footer-container .footer-columns li {
- padding: 7.5px 0; }
- .b2b-footer-container .footer-columns ul li:first-child {
- padding-top: 15px; }
- .b2b-footer-container .footer-columns li a {
- color: #fff;
- font-size: 16px;
- font-family: "Omnes-ECOMP-W02", Arial; }
- .b2b-footer-container .footer-nav-content {
- padding-bottom: 10px; }
- .b2b-footer-container .footer-nav-content li {
- display: inline;
- font-size: 14px;
- color: #fff;
- vertical-align: middle; }
- .b2b-footer-container .footer-nav-content li a {
- color: #fff;
- font-size: 14px;
- vertical-align: middle;
- margin-right: 5px;
- font-family: "Omnes-ECOMP-W02", Arial; }
-
-.b2b-footer-wrapper .b2b-footer-container hr {
- background: #d2d2d2;
- margin-top: 50px; }
-
-.b2b-footer-wrapper .divider-bottom-footer {
- padding: 45px 0 50px 0; }
-
-.b2b-footer-wrapper .footerLogo {
- margin: 10px 0 0 0px;
- vertical-align: top; }
- .b2b-footer-wrapper .footerLogo div {
- display: inline-block; }
- .b2b-footer-wrapper .footerLogo .icon-primary-att-globe {
- font-size: 40px; }
- .b2b-footer-wrapper .footerLogo .logo-title {
- color: #fff;
- margin-left: 10px;
- display: inline-block;
- font-size: 26px;
- margin-top: 0px; }
-
-.b2b-footer-wrapper .copyright-text {
- color: #fff;
- font-size: 11px;
- text-align: left;
- font-family: "Omnes-ECOMP-W02", Arial; }
- .b2b-footer-wrapper .copyright-text a {
- color: #fff;
- text-decoration: underline;
- display: inline-block; }
- .b2b-footer-wrapper .copyright-text a:hover {
- text-decoration: none; }
-
-@media (max-width: 768px) {
- .b2b-footer-wrapper {
- padding: 0 15px; }
- .b2b-footer-container {
- width: 100%; }
- .b2b-footer-container .footer-columns.three-column, .b2b-footer-container .footer-columns.four-column, .b2b-footer-container .footer-columns.five-column {
- width: 50%; }
- .b2b-footer-wrapper .divider-bottom-footer {
- padding-top: 15px; }
- .b2b-footer-wrapper .divider-bottom-footer .footer-links {
- width: 100%; }
- .b2b-footer-wrapper .footerLogo {
- margin: 30px 0 0 0; }
- .b2b-footer-wrapper .footerLogo .footer-logo {
- margin: 0;
- padding-left: 10px; } }
-
-.b2b-header-tabs {
- background-color: #222;
- width: 100%;
- position: relative;
- height: 45px; }
- .b2b-header-tabs .icon-primary-att-globe {
- color: #0568ae; }
- .b2b-header-tabs a:focus {
- border: 1px solid white; }
- .b2b-header-tabs .header__items {
- width: 980px;
- margin: 0 auto;
- display: block;
- list-style: none;
- padding: 6px 0px 0px 0px;
- border-spacing: 30px 0; }
- .b2b-header-tabs .header__item {
- display: inline-block;
- text-align: left;
- width: auto;
- font-size: 16px;
- font-family: "Omnes-ECOMP-W02", Arial;
- cursor: pointer;
- padding: 5px 15px;
- color: #fff; }
- .b2b-header-tabs .header__item.b2b-headermenu {
- padding: 0; }
- .b2b-header-tabs .header__item.b2b-headermenu:last-child {
- background: none; }
- .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
- color: #fff;
- text-decoration: none;
- display: inline-block;
- padding: 5px 15px; }
- .b2b-header-tabs .header__item.active {
- background-color: #fff;
- border-radius: 2px;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0; }
- .b2b-header-tabs .header__item.active a.menu__item {
- color: #0578ae; }
- .b2b-header-tabs li:focus {
- outline: 2px solid #0578ae; }
- .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {
- background-color: #fff;
- position: absolute;
- width: 100%;
- left: 0;
- top: 42px;
- border-bottom: solid 1px #ccc;
- -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
- -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
- box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
- display: none;
- z-index: 111; }
- .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {
- background-color: #fff;
- width: 980px;
- margin: 0 auto; }
- .b2b-header-tabs .header__item.active .header-secondary-wrapper {
- display: block; }
- .b2b-header-tabs .header-secondary .header-subitem {
- display: inline-block;
- width: auto;
- margin: 0 15px; }
- .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper {
- display: block; }
- .b2b-header-tabs .header-secondary .header-subitem a.menu__item {
- display: inline-block;
- padding: 15px 0;
- color: #333; }
- .b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus {
- color: #0578ae; }
-
-/** Secondary Menu **/
-.b2b-labelhide {
- position: absolute;
- clip: rect(1px, 1px, 1px, 1px); }
-
-/** Tertiary Level Menu **/
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
- position: absolute;
- z-index: 111;
- top: 25px; }
- .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after, .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
- content: '';
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- position: absolute;
- -webkit-transition: left .2s ease-out;
- -moz-transition: left .2s ease-out;
- transition: left .2s ease-out; }
- .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after {
- border-bottom: 8px solid #fff;
- top: 10px; }
- .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
- border-bottom: 8px solid #ccc;
- top: 9px; }
-
-.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {
- border-top: solid 1px #ccc; }
-
-.b2b-header-tabs .header-tertiary:after {
- content: '';
- clear: both;
- display: block; }
-
-.b2b-header-tabs .header-tertiary li {
- display: inline-block;
- padding: 0;
- float: left; }
- .b2b-header-tabs .header-tertiary li a {
- color: #333;
- display: block;
- padding: 10px 15px; }
- .b2b-header-tabs .header-tertiary li label {
- text-align: left;
- display: block;
- font-size: 16px;
- font-weight: bold;
- color: #857B7B;
- padding: 15px 0 0 15px; }
-
-.b2b-header-tabs .header__item.skip {
- padding: 0;
- display: inline-block;
- cursor: default !important; }
- .b2b-header-tabs .header__item.skip a {
- color: transparent;
- font-size: 12px;
- line-height: 15px;
- text-decoration: none; }
- .b2b-header-tabs .header__item.skip a:focus {
- color: #fff;
- outline: 2px solid #0578ae; }
-
-.b2b-header-tabs .selectWrap {
- min-width: 150px; }
- .b2b-header-tabs .selectWrap button.awd-select {
- height: 30px;
- line-height: 31px;
- font-size: 1rem;
- display: inline-block; }
- .b2b-header-tabs .selectWrap .awd-select-list {
- background-color: #fff;
- color: #333;
- -webkit-transition: opacity .2s ease-out;
- -moz-transition: opacity .2s ease-out;
- transition: opacity .2s ease-out;
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); }
-
-@media (max-width: 768px) {
- .b2b-header-tabs {
- padding: 0 15px; }
- .b2b-header-tabs .header__items, .b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {
- width: 100%; }
- .b2b-header-tabs .header__item {
- padding: 5px 0; }
- .b2b-header-tabs .globe-text {
- display: none; }
- .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
- padding: 5px 7px 9px 7px; }
- .b2b-header-tabs .header__item .header-tertiary-wrapper {
- top: 30px; }
- .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
- top: 14px; }
- .b2b-header-tabs .header__item .header-secondary-wrapper {
- top: 45px; }
- .b2b-header-tabs .header__item.profile {
- padding-left: 15px;
- float: none; } }
-
-/************* Header - Start *************/
-.b2b-header-tabs {
- background-color: #222;
- width: 100%;
- position: relative;
- height: 45px; }
-
-.b2b-header-tabs .icon-primary-primary-att-globe {
- color: #0568ae;
- font-size: 34px;
- bottom: 1px; }
-
-/*
- *TODO: delete below .icon-primary-att-globel will not be used
- *instead the one above, icon-primary-primary-att-globe not available here
- */
-.b2b-header-tabs .icon-primary-att-globe {
- color: #0568ae;
- font-size: 34px; }
-
-.b2b-header-tabs .globe-text {
- margin-left: 20px;
- font-size: 2rem; }
-
-.b2b-header-tabs .header__items {
- width: 980px;
- margin: 0 auto;
- display: block;
- list-style: none;
- border-spacing: 30px 0;
- padding: 3px 0px 0px 0px; }
-
-.b2b-header-tabs .header__item {
- display: inline-block;
- text-align: left;
- width: auto;
- font-size: 14px;
- font-family: "Omnes-ECOMP-W02", Arial;
- cursor: pointer;
- padding: 0 15px 4px 15px;
- /*margin-top:-3px;*/
- color: #fff; }
-
-.b2b-header-tabs .header__item.b2b-headermenu {
- padding: 0; }
-
-.b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
- color: #fff;
- text-decoration: none;
- display: inline-block;
- padding: 8px 15px 12px 15px;
- font-size: 16px; }
-
-.b2b-header-tabs .header__item.active {
- background-color: #fff;
- border-radius: 2px;
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0; }
-
-.b2b-header-tabs .header__item.active a.menu__item {
- color: #0578ae; }
-
-.b2b-header-tabs li:focus {
- outline: 2px solid #0578ae; }
-
-/** profile pop Over **/
-.b2b-header-tabs .header__item.profile {
- position: relative;
- float: right; }
-
-/** Secondary Menu **/
-.b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {
- background-color: #fff;
- position: absolute;
- width: 100%;
- left: 0;
- top: 42px;
- border-bottom: solid 1px #ccc;
- -webkit-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
- -moz-box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
- box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.16);
- display: none;
- z-index: 111; }
-
-.b2b-header-tabs .header-secondary, .b2b-header-tabs .header-tertiary {
- background-color: #fff;
- width: 980px;
- margin: 0 auto; }
-
-.b2b-header-tabs .header__item.active .header-secondary-wrapper,
-.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary-wrapper {
- display: block; }
-
-.b2b-header-tabs .header-secondary .header-subitem {
- display: inline-block;
- width: auto;
- margin: 0 15px; }
-
-.b2b-header-tabs .header-secondary .header-subitem a.menu__item {
- display: inline-block;
- padding: 15px 0;
- color: #333;
- font-size: 14px; }
-
-.b2b-header-tabs .header-secondary .header-subitem a.menu__item:hover, .b2b-header-tabs .header-secondary .header-subitem a.menu__item:focus {
- color: #0578ae; }
-
-.b2b-label-hide {
- position: absolute;
- clip: rect(1px, 1px, 1px, 1px); }
-
-/** Tertiary Level Menu **/
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after,
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
- content: '';
- border-left: 8px solid transparent;
- border-right: 8px solid transparent;
- position: absolute;
- -webkit-transition: left .2s ease-out;
- -moz-transition: left .2s ease-out;
- transition: left .2s ease-out; }
-
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
- position: absolute;
- z-index: 111;
- top: 25px; }
-
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:after {
- border-bottom: 8px solid #fff;
- top: 10px; }
-
-.b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret:before {
- border-bottom: 8px solid #ccc;
- top: 9px; }
-
-/** Tertiary Level Menu **/
-.b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {
- border-top: solid 1px #ccc; }
-
-.b2b-header-tabs .header-tertiary:after {
- content: '';
- clear: both;
- display: block; }
-
-.b2b-header-tabs .header-tertiary li {
- display: inline-block;
- padding: 0;
- float: left; }
-
-.b2b-header-tabs .header-tertiary li a {
- color: #333;
- display: block;
- padding: 7px 15px;
- max-width: 228px; }
-
-.b2b-header-tabs .header-tertiary li label {
- text-align: left;
- display: block;
- font-size: 14px !important;
- font-weight: bold;
- color: #857B7B;
- padding: 15px 0 0 15px; }
-
-/** Quarternary Level Menu **/
-.b2b-header-tabs .header-quarternary {
- width: 100%;
- float: left; }
-
-.b2b-header-tabs .header-quarternary li {
- padding-left: 15px;
- font-family: "Omnes-ECOMP-W02", Arial;
- display: none; }
-
-.b2b-header-tabs .header-quarternary li.active {
- display: block; }
-
-.b2b-header-tabs .header-quarternary li a {
- color: #666666;
- font-size: 14px;
- padding: 0px 10px 10px 10px; }
-
-/** Skip Navigation**/
-.b2b-header-tabs .header__item.skip {
- padding: 0;
- display: inline-block;
- cursor: default !important; }
-
-.b2b-header-tabs .header__item.skip a {
- color: transparent;
- font-size: 12px;
- line-height: 15px;
- text-decoration: none; }
-
-.b2b-header-tabs .header__item.skip a:focus {
- color: #fff;
- outline: 2px solid #0578ae; }
-
-/** Dropdown css inside Header ****/
-.b2b-header-tabs .selectWrap {
- min-width: 150px; }
-
-.b2b-header-tabs .selectWrap button.awd-select, .b2b-header-tabs .selectWrap input.awd-select {
- height: 36px;
- line-height: 31px;
- font-size: 1rem;
- display: inline-block; }
-
-.b2b-header-tabs .selectWrap .awd-select-list {
- background-color: #fff;
- color: #333;
- -webkit-transition: opacity .2s ease-out;
- -moz-transition: opacity .2s ease-out;
- transition: opacity .2s ease-out;
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176); }
-
-/*
- * responsive header media queries
- */
-@media screen and (max-width: 1100px) {
- .b2b-header-tabs .globe-text {
- display: none; }
- .b2b-header-tabs .header__item.profile {
- padding-left: 15px;
- float: none; }
- .b2b-header-tabs .header__items {
- padding-top: 0px; } }
-
-@media screen and (max-width: 950px) {
- .header__item.profile {
- top: 20px; }
- .b2b-header-tabs {
- height: 90px; }
- .header__item .selectWrap {
- bottom: 15px; }
- .b2b-header-tabs .header__items {
- padding-top: 25px; }
- .b2b-header-tabs .header__item .header-secondary-wrapper, .b2b-header-tabs .header__item .header-tertiary-wrapper {
- top: 80px; }
- .b2b-header-tabs .header-secondary .header-subitem.active i.menuCaret {
- top: 35px; }
- .b2b-header-tabs .header__item.b2b-headermenu a.menu__item {
- padding-bottom: 30px; }
- .b2b-header-tabs .header-secondary .header-subitem.active .header-tertiary {
- margin-top: -28px; } }
-
-/*************** Header - END ******************/
-.hp-container {
- display: block;
- max-width: 408px; }
- .hp-container i:focus {
- outline: thin dotted #666; }
- .hp-container .icon-misc-pen {
- cursor: pointer; }
- .hp-container .icon-misc-trash {
- cursor: pointer; }
-
-.hp-selected {
- border-bottom: 1px solid #ccc;
- border-bottom: 1px solid #ccc;
- margin-bottom: 16px;
- padding-bottom: 16px; }
- .hp-selected .selected-days {
- padding-bottom: 16px; }
- .hp-selected .selected-days .day {
- padding-top: 10px;
- float: left; }
-
-.hp-checkbox {
- padding-top: 20px;
- margin: 16px auto 0 auto; }
- .hp-checkbox label {
- position: relative;
- width: 20px;
- margin-right: 34px; }
- .hp-checkbox label span {
- position: absolute;
- top: -20px;
- left: 0px;
- margin-left: 0px; }
-
-.hp-dropdowns {
- margin-top: 15px;
- display: flex;
- display: -webkit-flex;
- display: -ms-flexbox; }
-
-.hp-buttons {
- margin-top: 20px;
- display: flex;
- display: -webkit-flex;
- display: -ms-flexbox; }
-
-.hp-dropdowns .radio-buttons {
- margin-top: 30px; }
- .hp-dropdowns .radio-buttons .radio {
- margin-right: 15px; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02";
- src: url("../b2b-angular/fonts/Omnes_ATTW02.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Medium";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Medium.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Medium.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Medium.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Medium.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Italic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Italic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Italic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Italic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Light";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Light.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Light.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Light.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Light.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Bold";
- src: url("../b2b-angular/fonts/Omnes_ATTW02Bold.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02Bold.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02Bold.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02Bold.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02Bold.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Light-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02LightItalic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Medium-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02MediumItalic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-@font-face {
- font-family: "Omnes-ECOMP-W02-Bold-Italic";
- src: url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.eot");
- src: url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.eot?#iefix") format("embedded-opentype"), url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.woff") format("woff"), url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.woff2") format("woff2"), url("../b2b-angular/fonts/Omnes_ATTW02BoldItalic.ttf") format("truetype");
- font-weight: normal;
- font-style: normal; }
-
-/* TODO: Build a reference page for these classes */
-.font-regular {
- font-family: "Omnes-ECOMP-W02", Arial !important; }
-
-.font-light {
- font-family: "Omnes-ECOMP-W02-Light", Arial !important; }
-
-.font-italic {
- font-family: "Omnes-ECOMP-W02-Italic", Arial !important; }
-
-.font-light-italic {
- font-family: "Omnes-ECOMP-W02-Light-Italic", Arial !important; }
-
-.font-medium {
- font-family: "Omnes-ECOMP-W02-Medium", Arial !important; }
-
-.font-medium-italic {
- font-family: "Omnes-ECOMP-W02-Medium-Italic",Arial !important; }
-
-.font-reset {
- font-style: normal;
- font-variant: normal;
- font-weight: normal;
- text-transform: none; }
-
-.b2b-nav-menu {
- background-color: #efefef;
- border: 1px solid #efefef;
- width: 230px;
- font-size: 1.4rem; }
-
-.b2b-subnav-container > ul {
- padding: 0px; }
-
-.b2b-subnav-content {
- margin: 0;
- margin-bottom: 10px; }
-
-.b2b-subnav-content > li {
- border-bottom: 1px solid #999999;
- position: relative;
- cursor: pointer; }
-
-.b2b-subnav-content > li > a {
- text-decoration: none;
- line-height: 18px;
- display: block;
- padding: 10px; }
-
-.b2b-subnav-content > li > a.expand {
- color: #333; }
-
-.b2b-subnav-content > li ul {
- overflow: hidden;
- max-height: 0;
- transition-duration: 0.5s;
- transition-timing-function: cubic-bezier(0, 1, 0.5, 1); }
-
-.b2b-subnav-content > li ul.expand {
- transition-duration: 0.7s;
- transition-timing-function: ease-in-out;
- max-height: 1000px;
- overflow: hidden; }
-
-.b2b-subnav-content > li > a:focus, .b2b-subnav-content > li ul > li > a:focus {
- outline: thin dotted #666; }
-
-.b2b-subnav-content > li ul > li > a {
- line-height: 18px;
- padding: 8px 0;
- display: block;
- outline-offset: -4px;
- padding-left: 10px; }
-
-.b2b-icon-primary-plus-minus {
- display: inline-block;
- height: 20px;
- margin-right: 10px;
- padding: 0;
- position: absolute;
- right: 0px;
- top: 10px;
- vertical-align: middle;
- width: 20px; }
-
-@media (min-width: 320px) and (max-width: 767px) {
- .b2b-nav-menu {
- background-color: #fff;
- border: 1px solid white;
- width: 100%; }
- .b2b-subnav-content > li {
- padding-left: 10px; }
- .b2b-subnav-container > ul:first-child {
- border-top: 1px solid #999; }
- .b2b-icon-primary-plus-minus {
- right: 10px; }
- .b2b-subnav-content > li li > a.active {
- color: #0574ac;
- text-decoration: none;
- font-family: "Omnes-ECOMP-W02", Arial; } }
-
-.b2b-list-box-item {
- white-space: nowrap;
- margin: 1px;
- border: 1px solid transparent;
- outline: none;
- visibility: inherit;
- display: inherit;
- text-align: left;
- overflow: hidden;
- cursor: pointer;
- padding: 5px 0 5px;
- padding-left: 15px;
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none; }
- .b2b-list-box-item:focus {
- border: 2px solid #5e8cb3; }
-
-.b2b-list-box-item--selected {
- background-color: #cfdde9; }
-
-.btn.disabled[ddh-load-button] {
- line-height: 46px;
- padding: 0 19px 0 18px; }
-
-.btn.disabled[ddh-load-button] {
- color: #666666; }
-
-.icon-primary-spinner-ddh.large {
- height: 50px;
- width: 50px; }
-
-.icon-primary-spinner-ddh.small {
- height: 30px;
- width: 30px; }
-
-.icon-primary-spinner-ddh {
- -webkit-animation: 1s linear infinite spinner;
- animation: 1s linear infinite spinner;
- background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNiAzNiIgaWQ9InN2Zy1zcGlubmVyIiB4PSIwcHgiIHk9IjBweCIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+CiAgIDxwYXRoIGZpbGw9IiNGNUY1RjUiIGQ9Ik0xOCAzNkM4LjEgMzYgMCAyNy45IDAgMThTOC4xIDAgMTggMHMxOCA4LjEgMTggMTgtOC4xIDE4LTE4IDE4em0wLTMxLjVjLTcuNSAwLTEzLjUgNi0xMy41IDEzLjVTMTAuNiAzMS41IDE4IDMxLjVjNy41IDAgMTMuNS02LjEgMTMuNS0xMy41IDAtNy41LTYtMTMuNS0xMy41LTEzLjV6Ii8+CiAgIDxwYXRoIGZpbGw9IiMwNTY4QUUiIGlkPSJzcGlubmVyIiBkPSJNMzAuNyA1LjNsLTMuMSAzLjJjMi40IDIuNCAzLjkgNS44IDMuOSA5LjUgMCA3LjQtNi4xIDEzLjUtMTMuNSAxMy41UzQuNSAyNS40IDQuNSAxOCAxMC42IDQuNSAxOCA0LjVWMEM4LjEgMCAwIDguMSAwIDE4czguMSAxOCAxOCAxOCAxOC04LjEgMTgtMThjMC01LTItOS41LTUuMy0xMi43eiIgdHJhbnNmb3JtPSIiPiAgICAgIAogICA8L3BhdGg+Cjwvc3ZnPg==); }
-
-.btn-small .icon-primary-spinner-ddh {
- height: 30px !important;
- width: 30px !important; }
-
-.btn-small .icon-primary-spinner {
- height: 30px;
- width: 30px; }
-
-.load-backdrop {
- position: absolute;
- top: 50%;
- left: 50%; }
-
-.small-modal-loader {
- width: 420px !important;
- height: 212px !important;
- text-align: center; }
-
-.small-modal-loader .icon-primary-spinner {
- margin-bottom: 5px; }
-
-.body.styled-by-modal {
- position: fixed; }
-
-.b2b-modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: -1; }
-
-.b2b-modal-backdrop.fade {
- background-color: #000;
- opacity: 0;
- filter: alpha(opacity=0);
- transition: all 0.3s linear 0s; }
-
-.b2b-modal-backdrop.fade.in {
- z-index: 1040;
- opacity: 0.7;
- filter: alpha(opacity=70);
- background-color: #000;
- transition: opacity 0.3s linear 0s; }
-
-.modalwrapper {
- height: 100%;
- width: 100%;
- left: 0;
- overflow-y: hidden;
- position: absolute;
- right: 0;
- padding: 20px;
- top: 0;
- z-index: -1; }
-
-.modalwrapper.active {
- z-index: 1050;
- overflow-y: auto; }
-
-.modal {
- background-clip: padding-box;
- background-color: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 8px;
- box-shadow: 0 3px 5px 1px rgba(0, 0, 0, 0.4);
- margin: 0 auto;
- /*margin-bottom:10%;*/
- outline: medium none;
- /*position: absolute;*/
- height: 0;
- min-height: 150px;
- overflow: hidden;
- /*top: 10%;*/
- width: 100%;
- z-index: -1; }
-
-.modalwrapper.modal-docked .modal {
- max-height: 80%;
- height: 80%;
- overflow: hidden;
- top: 0; }
-
-.modal.fade.in {
- position: relative;
- height: auto;
- overflow: auto;
- top: 10%;
- z-index: 1060;
- transition: opacity .5s linear 0s; }
-
-.modal.fade.in.modal-landscape {
- overflow-y: auto; }
-
-.modal.fade {
- transition: opacity .5s linear 0s; }
-
-.fade.in {
- opacity: 1; }
-
-.fade {
- opacity: 0; }
-
-.b2b-modal-header {
- align-items: center;
- border-radius: 8px 8px 0 0;
- display: flex;
- min-height: 60px;
- overflow: hidden;
- padding: 30px 46px 30px 30px;
- position: relative; }
-
-.b2b-modal-header > h2 {
- line-height: 1;
- margin: 0;
- padding: 0; }
-
-.modal-header-portrait {
- -webkit-overflow-scrolling: auto; }
-
-.modal-header-landscape {
- -webkit-overflow-scrolling: auto; }
-
-.b2b-modal-body {
- -webkit-overflow-scrolling: touch;
- padding: 0 30px 20px;
- position: relative;
- width: auto; }
-
-.b2b-modal-body:focus {
- outline: 1px dotted #333333; }
-
-.modal-form {
- margin-bottom: 0; }
-
-.b2b-modal-footer {
- background-color: #fff;
- width: 100%;
- padding: 0 30px;
- border-radius: 0;
- position: absolute;
- bottom: 0; }
-
-:not(.modal-docked) .b2b-modal-footer {
- position: relative; }
-
-.modal-landscape .b2b-modal-footer {
- position: relative; }
-
-.b2b-modal-footer .cta-button-group {
- display: flex;
- justify-content: flex-end;
- padding: 20px 0 5px;
- width: 100%;
- border-top: 1px solid #d2d2d2; }
-
-.b2b-modal-footer .cta-button-group .btn {
- margin-left: auto;
- margin-right: auto;
- float: right;
- margin-left: 10px; }
-
-.b2b-modal-footer .cta-button-group .marginLeft0 {
- margin-left: 0px; }
-
-.b2b-modal-footer .cta-button-group .btn-footer-left {
- margin-right: auto; }
-
-.b2b-modal-footer .cta-button-group .btn + .btn {
- margin-right: 0 !important; }
-
-[class*="modal-"] {
- width: 100%; }
-
-.modal-small {
- max-width: 420px; }
-
-.modal-medium {
- max-width: 620px; }
-
-.modal-large {
- max-width: 720px; }
-
-.modal-xlarge {
- max-width: 860px; }
-
-.modal-jumbo {
- max-width: 1000px; }
-
-.modalwrapper.modal-docked {
- height: 100%;
- display: flex;
- align-items: center; }
-
-.modalwrapper.modal-docked .b2b-modal-body {
- height: 80%;
- overflow-y: scroll;
- padding-bottom: 60px; }
-
-.modalwrapper.modal-docked .modal {
- max-height: 80%;
- height: 80%;
- overflow: hidden;
- top: 0; }
-
-.modalwrapper.modal-docked .b2b-modal-body > *:last-child {
- margin-bottom: 60px; }
-
-@media (max-width: 767px) {
- .modalwrapper {
- padding: 15px;
- overflow-x: hidden; }
- .modal.fade.in {
- top: 0;
- right: 0;
- left: 0;
- margin-bottom: 15px;
- border: none; }
- .b2b-modal-header {
- padding: 20px 46px 20px 15px; }
- .b2b-modal-body {
- width: 100%;
- padding: 0 15px 15px; }
- .modalwrapper.modal-docked {
- position: absolute;
- height: 100%;
- padding: 0; }
- .modalwrapper.modal-docked .modal.fade.in {
- margin-bottom: 0;
- width: 100% !important;
- max-height: 100%;
- height: 100%;
- border-radius: 0; }
- .modalwrapper.modal-docked .b2b-modal-body {
- overflow-y: scroll;
- height: 100%; }
- .modalwrapper.modal-docked.modal-landscape {
- overflow-y: hidden;
- position: fixed; }
- .modalwrapper.modal-docked.modal-landscape .modal {
- overflow-y: scroll;
- max-width: 100%; }
- .modalwrapper.modal-docked.modal-landscape .b2b-modal-body {
- height: auto;
- overflow-y: hidden; }
- .b2b-modal-footer {
- padding: 0 15px; }
- .b2b-modal-footer .cta-button-group {
- display: block;
- padding: 15px 0; }
- .b2b-modal-footer .cta-button-group .btn {
- float: none; }
- .b2b-modal-footer .cta-button-group .btn + .btn {
- margin-bottom: 0; }
- .b2b-modal-footer .cta-button-group a.visible-phone {
- align-items: center;
- display: flex !important;
- height: 42px;
- justify-content: center; } }
-
-.b2b-modal-footer > .cta-button-group {
- line-height: 40px; }
-
-.ajaxed,
-.modal.fade.in .b2b-modal-header,
-.modal.fade.in .b2b-modal-body,
-.modal.fade.in .b2b-modal-footer {
- animation-duration: 0.01s;
- -o-animation-duration: 0.01s;
- -ms-animation-duration: 0.01s;
- -moz-animation-duration: 0.01s;
- -webkit-animation-duration: 0.01s;
- animation-name: DOMinsertion;
- -o-animation-name: DOMinsertion;
- -ms-animation-name: DOMinsertion;
- -moz-animation-name: DOMinsertion;
- -webkit-animation-name: DOMinsertion; }
-
-.monthselector thead tr th {
- min-width: 46px; }
-
-.monthselector thead tr:after {
- content: "";
- position: absolute;
- left: 20px;
- top: 52px;
- height: 1px;
- width: 85%;
- border-bottom: 1px solid #ccc; }
-
-.monthselector tbody tr:last-child {
- height: 50px; }
-
-.monthselector td.day {
- margin: 1px 4px !important;
- width: 64px !important; }
-
-.monthselector .datepicker-switch {
- width: 195px !important; }
-
-.monthselector .show-date {
- width: 30px !important; }
-
-.monthselector button.faux-input {
- width: 100%; }
- .monthselector button.faux-input:focus {
- border: 1px solid #0574ac; }
- .monthselector button.faux-input:disabled {
- cursor: not-allowed; }
-
-.monthselector .cta-button-group {
- padding: 0 20px; }
- .monthselector .cta-button-group a {
- margin-right: 20px; }
-
-.monthselector .day.active .show-date:after, .monthselector .day:focus .show-date:after, .monthselector .due-date.disabled .show-date:after {
- height: 30px;
- left: 9px !important;
- top: 0;
- width: 42px !important; }
-
-.monthselector .disabled.day:focus .show-date:after {
- border: none; }
-
-.monthselector .icon-primary-calendar {
- display: block; }
-
-.b2b-ml-nav {
- padding: 0 10px 0 10px;
- width: 320px; }
-
-.b2b-ml-nav ul {
- list-style: none;
- list-style-type: none; }
-
-.b2b-ml-nav a {
- display: block;
- padding: 0 0 5px 30px;
- line-height: 22px;
- margin-left: -10px;
- color: #0568ae;
- font-size: 1.4rem; }
-
-.b2b-ml-nav a:focus {
- outline-offset: 1px; }
-
-.b2b-ml-nav li:focus {
- outline: none; }
-
-.b2b-ml-nav li:focus > a {
- outline: thin dotted #666;
- outline-offset: 1px; }
-
-.b2b-ml-nav ul li {
- border-left: 1px solid #ccc; }
-
-.b2b-ml-nav ul ul {
- padding: 0 0 0 20px; }
-
-.b2b-ml-nav ul > li {
- position: relative;
- line-height: 18px; }
-
-.b2b-ml-nav a > span {
- background-color: #FFF;
- display: inline;
- margin: 0;
- padding: 0;
- position: absolute;
- left: -11px;
- top: 0; }
-
-.b2b-ml-nav a > span > i {
- font-size: 20px; }
-
-.b2b-ml-nav a:only-child > span {
- left: -6px;
- border-radius: 50%;
- line-height: 7px;
- top: 5px; }
-
-.b2b-ml-nav a:only-child > span > i {
- background-color: inherit;
- background: #fff;
- font-size: 10px; }
-
-.b2b-ml-nav ul li:first-child > a:only-child > span {
- left: -6px;
- border-radius: 50%;
- line-height: 12px;
- top: 0px; }
-
-.b2b-ml-nav li a + ul {
- display: none; }
-
-.b2b-ml-nav li a.active + ul {
- display: block; }
-
-.b2b-ml-nav .selected {
- color: #333; }
-
-/*to overide ng-doc inline property for library demo - TODO: Move to docs.css*/
-.b2b-ml-nav a [class^="icon-primary-"], a [class*=" icon-primary-"], a [class^="icon-primary-"]:before, a [class*=" icon-primary-"]:before {
- display: inline-block; }
-
-.b2b-alerts-messages {
- background-color: #fff;
- border-radius: 8px;
- height: auto; }
- .b2b-alerts-messages h3 {
- color: #333 !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- margin-bottom: 0 !important;
- margin: 1em 0 5px;
- line-height: 27px;
- font-size: 18px; }
- .b2b-alerts-messages h4 {
- color: #333 !important;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- margin-bottom: 0 !important; }
- .b2b-alerts-messages .alert-info {
- background-color: #0574ac;
- border: 0; }
- .b2b-alerts-messages .alert-error {
- background-color: #cf2a2a;
- border: 0; }
- .b2b-alerts-messages .alert-success {
- background-color: #1b7e28;
- border: 0; }
- .b2b-alerts-messages div:nth-child(2) {
- padding: 0 0 15px 10px;
- vertical-align: baseline; }
- .b2b-alerts-messages .close:before {
- color: #767676; }
- .b2b-alerts-messages p {
- font-size: 14px;
- color: #333;
- font-family: "Omnes-ECOMP-W02", Arial; }
- .b2b-alerts-messages p a {
- color: #333; }
- .b2b-alerts-messages .btn-small {
- margin-bottom: 0px; }
-
-.b2b-alerts-success {
- border: 1px solid #1b7e28; }
-
-.b2b-alerts-error {
- border: 1px solid #cf2a2a; }
-
-.b2b-alerts-info {
- border: 1px solid #0574ac; }
-
-/* TODO: Rearange this and move to patches if needed */
-.b2b-breadcrumb-css-override > li {
- margin-right: 24px; }
-
-.b2b-breadcrumb-css-override li > * {
- float: left !important; }
-
-.b2b-css-override ul.nav-tabs {
- margin-bottom: 0; }
-
-.b2b-css-override div.tab-content {
- margin-top: 0;
- border-top: none; }
-
-.b2b-css-override .tab-content .prettyprint, .b2b-css-override .usage .prettyprint {
- max-height: 500px;
- overflow-y: auto; }
-
-.b2b-top-nav-buttons-css-override {
- margin-bottom: 0;
- margin-top: 2px; }
-
-.b2b-auto-width {
- width: auto !important; }
-
-.b2b-toggle-header-active {
- color: #0568ae; }
-
-.b2b-toggle-header-inactive {
- color: #333333; }
-
-.b2b-toggle-header-icon {
- cursor: pointer; }
-
-.tab-content > .tab-pane {
- display: none; }
-
-.tab-content > .active {
- display: block; }
-
-.icon-primary-circle:before {
- background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");
- content: "";
- position: absolute;
- top: 0;
- z-index: 1; }
-
-.ds2-no-colors .icon-primary-circle:before {
- background-image: none;
- content: "\e902"; }
-
-i:focus {
- outline: thin dotted #666; }
-
-.p-col-md-12 {
- width: 50%; }
-
-.pager__item {
- border-radius: 0;
- cursor: default;
- display: inline-block;
- margin: 5px;
- width: 22px;
- height: 23px;
- vertical-align: baseline; }
-
-.pager {
- padding-top: 10px;
- padding-bottom: 20px;
- text-align: center;
- margin: 0 auto; }
-
-.pager__item--input {
- color: #067ab4;
- max-height: 32px;
- max-width: 40px;
- padding-left: 0;
- padding-right: 0;
- text-align: center;
- margin-left: 10px; }
-
-.row.section-row {
- margin-bottom: 20px; }
-
-.pager__item--active {
- border-bottom: 2px solid #0574ac;
- border-radius: 0;
- color: #333333; }
-
-.pager a.pager__item--active:hover {
- cursor: default; }
-
-.pager a:hover, .pager a:focus {
- text-decoration: none;
- color: #333333;
- cursor: pointer; }
-
-.pager a.disabled:hover, .pager a.disabled:focus {
- cursor: not-allowed; }
-
-.row.section-row.b2b-page {
- display: block; }
-
-a.pager__item--next:focus, a.pager__item--prev:focus {
- text-decoration: none;
- border: 0; }
-
-.pager__item--next, .pager__item--prev {
- margin: 5px;
- padding: 1.5px 6px 1.5px 6px; }
-
-.pager .disabled i {
- pointer-events: none;
- cursor: default;
- color: #c4c4c4; }
-
-.fieldLabel {
- color: #666666; }
-
-.fieldLabel input {
- color: #666666; }
-
-.pSelect {
- float: right;
- width: 150px; }
-
-.numericResult {
- margin-bottom: 20px;
- font-size: 1.6rem;
- margin-top: 20px;
- display: inline-block;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.mobile-view > .pager__item {
- margin: 5px 10px;
- width: 24px;
- height: 34px;
- vertical-align: middle;
- line-height: 34px; }
-
-.fade1, .fadel {
- opacity: 0.4; }
-
-.fade2, .fadesl {
- opacity: 0.6; }
-
-h4#pagination-truncated {
- margin-top: 50px; }
-
-h4#pagination-large-count {
- margin-top: 50px; }
-
-.p-col-md-12 input {
- margin-left: 20px; }
-
-.pager a .icon-primary-right:before {
- display: inline-block; }
-
-.pager a .icon-primary-left:before {
- display: inline-block; }
-
-.page-heading {
- background: white none repeat scroll 0 0;
- margin-bottom: -12px;
- padding-left: 10px;
- padding-right: 10px;
- position: relative; }
-
-.numericResult:focus {
- outline: 1px dotted #0574ac; }
-
-.page-heading-group {
- color: #ef6f00;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.pager > div > span.fieldLabel {
- margin-left: 18px; }
-
-.pager .fieldLabel .btn-arrow {
- top: 0;
- left: 10px;
- margin-left: -5px; }
-
-.b2b-p-col-md-12 {
- width: 50%; }
- .b2b-p-col-md-12 input {
- margin-left: 20px; }
-
-.b2b-pager__item {
- border-radius: 0;
- cursor: default;
- display: inline-block;
- margin: 0px 5px 0 5px;
- height: 23px;
- vertical-align: baseline; }
-
-.b2b-pager__item--noclick {
- pointer-events: none !important;
- cursor: default !important; }
-
-.b2b-pager__item--droppable {
- pointer-events: all !important; }
-
-.b2b-pager {
- padding-top: 10px;
- padding-bottom: 20px;
- text-align: center;
- margin: 0 auto; }
- .b2b-pager a:hover {
- text-decoration: none;
- color: #333333;
- cursor: pointer; }
- .b2b-pager a:focus {
- text-decoration: none;
- color: #333333;
- cursor: pointer; }
- .b2b-pager a .icon-primary-right:before {
- display: inline-block; }
- .b2b-pager a .icon-primary-left:before {
- display: inline-block; }
- .b2b-pager .disabled i {
- pointer-events: none;
- cursor: default;
- color: #c4c4c4; }
-
-.b2b-pager__item--input {
- color: #067ab4;
- max-height: 32px;
- max-width: 60px;
- padding-left: 0;
- padding-right: 0;
- text-align: center;
- margin-left: 5px; }
-
-.row.section-row {
- margin-bottom: 20px; }
-
-.b2b-pager__item--active {
- border-bottom: 2px solid #0574ac;
- border-radius: 0;
- color: #333333; }
-
-.row.section-row.b2b-page {
- display: block; }
-
-a.b2b-pager__item--next:focus {
- text-decoration: none;
- border: 0; }
-
-a.b2b-pager__item--next-disabled {
- outline: 0; }
-
-a.b2b-pager__item--next-disabled > [class^="icon-primary-"] {
- color: #cccccc;
- cursor: not-allowed;
- outline: 0; }
-
-a.b2b-pager__item--prev:focus {
- text-decoration: none;
- border: 0; }
-
-a.b2b-pager__item--prev-disabled {
- outline: 0; }
-
-a.b2b-pager__item--prev-disabled > [class^="icon-primary-"] {
- color: #cccccc;
- cursor: not-allowed; }
-
-.b2b-pager__item--next {
- padding: 1.5px 0px 1.5px 0px; }
-
-.b2b-pager__item--prev {
- padding: 1.5px 0px 1.5px 0px; }
-
-.fieldLabel {
- color: #666666; }
- .fieldLabel input {
- color: #666666; }
- .fieldLabel .btn-arrow {
- top: 0;
- left: 10px; }
-
-.b2b-pSelect {
- float: right;
- width: 150px; }
-
-.b2b-numericResult {
- margin-bottom: 20px;
- font-size: 1.6rem;
- margin-top: 20px; }
-
-.b2b-mobile-view > .b2b-pager__item {
- margin: 5px 10px;
- min-width: 23px;
- height: 34px;
- vertical-align: middle;
- line-height: 34px; }
-
-.b2b-fade1 {
- opacity: 0.4; }
-
-.b2b-fade2 {
- opacity: 0.6; }
-
-.b2b-fadesl {
- opacity: 0.6; }
-
-h4#b2b-pagination-truncated {
- margin-top: 50px; }
-
-h4#b2b-pagination-large-count {
- margin-top: 50px; }
-
-.b2b-page-heading {
- background: white none repeat scroll 0 0;
- margin-bottom: -12px;
- padding-left: 10px;
- padding-right: 10px;
- position: relative; }
-
-.b2b-numericResult:focus {
- outline: 1px dotted #0574ac; }
-
-.b2b-page-heading-group {
- color: #ef6f00;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.b2b-pager > div > span.fieldLabel {
- margin-left: 18px; }
-
-.b2b-go-to-page {
- margin-top: 14px; }
-
-.b2b-go-to-page-inline {
- display: inline-block; }
-
-input.b2b-phone-mask-input {
- padding-right: 15px; }
- input.b2b-phone-mask-input:hover, input.b2b-phone-mask-input:focus {
- padding-right: 15px; }
-
-/************************** Start - Should be removed after the styling in global is fixed *******************/
-input::-ms-clear {
- display: none; }
-
-/************************** End - Should be removed after the styling in global is fixed *******************/
-@media (max-width: 767px) {
- input::-ms-clear {
- display: block; } }
-
-.pivot-link-group {
- background-color: #5a5a5a;
- border-top: 1px solid #959595; }
-
-.pivot-links > li {
- border-bottom: 1px solid #959595; }
-
-.pivot-links > li > a {
- color: #fff;
- display: block;
- padding: 12px 15px 10px;
- line-height: normal; }
-
-.b2b-profile-block-container {
- min-height: 200px;
- height: auto;
- background-color: #fff;
- border-radius: 8px;
- border: 1px solid #ccc;
- box-shadow: 0px 1px 1px 1px #ccc;
- display: inline-table;
- margin: 15px 15px; }
-
-.b2b-profile-block-details p, .b2b-profile-block-details div {
- padding: 2px 7px;
- font-size: 1.4rem; }
-
-.b2b-profile-block-details .radio-label, .b2b-profile-block-details a {
- font-size: 1.4rem; }
-
-.b2b-profile-block-details p label, .b2b-profile-block-details p span {
- padding-left: 10px; }
-
-.b2b-profile-block-footer {
- margin-bottom: 12px;
- margin-top: 5px;
- height: 35px; }
-
-.b2b-profile-block-details p {
- word-wrap: break-word;
- height: 61px; }
- .b2b-profile-block-details p:first-child {
- margin-top: 10px; }
- .b2b-profile-block-details p:after {
- content: ' ';
- display: block;
- border: 0.2px solid #ccc;
- margin-top: 12px; }
-
-.b2b-profile-block-details .radio {
- margin-left: 15px;
- height: 30px; }
-
-.b2b-approval-icon {
- color: #1b7e28;
- float: right;
- position: relative;
- left: 10px; }
- .b2b-approval-icon i {
- color: #1b7e28;
- float: right; }
-
-.b2b-profile-link {
- float: right;
- position: relative;
- left: -4px; }
-
-a.link-profile {
- position: relative;
- left: -5px;
- float: right;
- margin-bottom: 16px; }
-
-.b2b-profile-block-radio {
- position: relative;
- top: -5px; }
-
-.b2b-profile-card {
- min-width: 229px;
- min-height: 354px;
- margin: 10px;
- border: solid 1px #CCC;
- font-family: "Omnes-ECOMP-W02", Arial;
- display: inline-block;
- vertical-align: top; }
- .b2b-profile-card .top-block {
- padding: 15px 20px;
- background-color: #e4e4e4;
- max-height: 153px; }
- .b2b-profile-card .bottom-block {
- padding: 15px 20px 15px 20px;
- background-color: #fff; }
- .b2b-profile-card .profile-image {
- background: #e4e4e4;
- margin-bottom: 15px;
- text-align: center; }
- .b2b-profile-card .profile-image .default-img {
- display: inline-block;
- width: 60px;
- height: 60px;
- margin-bottom: 10px;
- border: 6px solid #fff;
- border-radius: 99em;
- -webkit-border-radius: 99em;
- -moz-border-radius: 99em;
- /* background-color: #eee; */ }
-
-.profile-image img {
- display: inline-block;
- width: 60px;
- height: 60px;
- margin-bottom: 10px;
- border: 6px solid #fff;
- border-radius: 99em;
- -webkit-border-radius: 99em;
- -moz-border-radius: 99em;
- /* background-color: #eee; */ }
-
-.b2b-profile-card .profile-image .default-img {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #333;
- background-color: #fff;
- font-size: 32px;
- line-height: 22px;
- padding: 5px;
- padding-top: 13px;
- width: 60px;
- height: 60px;
- text-transform: uppercase; }
-
-.b2b-profile-card .profile-image .name {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 16px;
- color: #333;
- text-align: center;
- margin-bottom: 5px;
- margin-top: 5px;
- overflow: hidden;
- word-break: break-word;
- white-space: normal;
- text-transform: capitalize; }
-
-.b2b-profile-card .profile-image .status-icon {
- border-radius: 10px;
- border: 1px solid #fff;
- margin: 0 3px 0 0;
- width: 10px;
- height: 10px;
- display: inline-block;
- vertical-align: middle; }
-
-.b2b-profile-card .profile-image .status {
- font-size: 12px;
- line-height: 15px;
- text-align: center;
- margin: 0 15px 0 0;
- color: #444; }
-
-.b2b-profile-card .status .circle {
- width: 10px;
- height: 10px;
- border-radius: 50%;
- margin: 30px 6px 0px 20px;
- text-align: center;
- background-color: #444; }
-
-.b2b-profile-card .profile-image .status-green {
- background-color: #0c0; }
-
-.b2b-profile-card .profile-image .status-red {
- background-color: red; }
-
-.b2b-profile-card .profile-image .status-blue {
- background-color: #00f; }
-
-.b2b-profile-card .profile-image .status-yellow {
- background-color: #ff0; }
-
-.b2b-profile-card .profile-image .status .status-badge {
- margin-left: 5px;
- border: dotted 1px #444;
- background-color: transparent;
- font-weight: 400;
- color: #444;
- height: 17px;
- padding: 0 5px;
- font-size: 11px;
- padding-left: 5px;
- padding-right: 5px; }
-
-.b2b-profile-card .profile-details {
- background: #fff; }
- .b2b-profile-card .profile-details label {
- display: block;
- cursor: text;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-weight: bolder;
- font-size: 14px;
- color: #333;
- padding: 0;
- margin: 0; }
- .b2b-profile-card .profile-details div {
- margin: 0;
- font-size: 14px;
- color: #333;
- padding-bottom: 6.5px; }
-
-.b2b-profile-card .b2b-add-user {
- background: white;
- border-style: dotted;
- font-size: 16px;
- color: #333;
- position: relative; }
- .b2b-profile-card .b2b-add-user i {
- font-size: 30px;
- padding-bottom: 15px; }
-
-.b2b-profile-card .atcenter {
- cursor: pointer;
- margin-top: 60%;
- vertical-align: middle;
- text-align: center; }
-
-.b2b-profile-card .tooltip {
- cursor: pointer; }
- .b2b-profile-card .tooltip .helpertext {
- position: relative;
- color: white; }
-
-.b2b-profile-card .tooltip-wrapper {
- position: relative; }
-
-/* Overrides for tooltip absolute positioning */
-@media (min-width: 1025px) {
- .b2b-profile-card .tooltip-size-control {
- width: 100% !important; } }
-
-@-webkit-keyframes progress-bar-stripes {
- from {
- background-position: 0 0; }
- to {
- background-position: 80px 0; } }
-
-@keyframes progress-bar-stripes {
- from {
- background-position: 0 0; }
- to {
- background-position: 80px 0; } }
-
-.progress {
- background-color: #e4e4e4;
- border-radius: 4px;
- height: 14px;
- margin-bottom: 20px;
- min-width: 250px;
- overflow: hidden;
- padding: 0;
- position: relative; }
-
-a .progress {
- margin-bottom: 0; }
-
-.progress .bar {
- background-color: #666;
- border-radius: 4px;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- height: 100%;
- width: 0; }
-
-.progress-arrow {
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-align-items: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-justify-content: flex-end;
- -ms-flex-pack: end;
- justify-content: flex-end; }
-
-.progress-link + .usage-bar {
- margin-top: 5px; }
-
-.progress-success .bar, .progress .bar-success {
- background-color: #1b7e28; }
-
-.progress-warning .bar, .progress .bar-warning {
- background-color: #ef6f00; }
-
-.progress-danger .bar, .progress .bar-danger {
- background-color: #cf2a2a; }
-
-.progress.increment {
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex; }
-
-.progress.increment .bar:first-child:not(:last-child) {
- border-right: none;
- border-radius: 4px 0 0 4px; }
-
-.progress.increment .bar:last-child:not(:first-child) {
- border-left: none;
- border-radius: 0 4px 4px 0; }
-
-.progress.increment .bar + .bar:not(:last-child) {
- border-left: none;
- border-right: none;
- border-radius: 0; }
-
-.progress.increment .bar:not(:first-child) {
- border-left: 1px solid white !important; }
-
-.usage-bar {
- display: table;
- float: none;
- width: 100%;
- margin-bottom: 1px; }
-
-.usage-bar > .usage-text {
- display: table-cell;
- width: 1%; }
-
-.progress + .usage-bar {
- margin-top: -15px; }
-
-.usage-bar .usage-text {
- font-size: 1.4rem; }
-
-.usage-bar .usage-text:first-child {
- white-space: nowrap; }
-
-.usage-bar .usage-text.text-right {
- vertical-align: top;
- font-size: 1.4rem;
- width: auto !important; }
-
-.usage-bar .usage-text.text-right:before {
- content: "";
- display: table;
- height: .1em; }
-
-.usage-bar.billing-cycle .usage-text {
- font-size: 1.4rem; }
-
-.usage-bar.billing-cycle .usage-text.text-right {
- vertical-align: bottom; }
-
-.progress.autocolor [data-percentage="1"], .progress.autocolor [data-percentage="2"], .progress.autocolor [data-percentage="3"], .progress.autocolor [data-percentage="4"], .progress.autocolor [data-percentage="5"], .progress.autocolor [data-percentage="6"], .progress.autocolor [data-percentage="7"], .progress.autocolor [data-percentage="8"], .progress.autocolor [data-percentage="9"], .progress.autocolor [data-percentage="10"] .progress.autocolor [data-percentage^="2"], .progress.autocolor [data-percentage^="3"], .progress.autocolor [data-percentage^="4"], .progress.autocolor [data-percentage^="5"], .progress.autocolor [data-percentage="60"], .progress.autocolor [data-percentage="61"], .progress.autocolor [data-percentage="62"], .progress.autocolor [data-percentage="63"], .progress.autocolor [data-percentage="64"] {
- background-color: #1b7e28; }
-
-.progress.autocolor [data-percentage="65"], .progress.autocolor [data-percentage="66"], .progress.autocolor [data-percentage="67"], .progress.autocolor [data-percentage="68"], .progress.autocolor [data-percentage="69"], .progress.autocolor [data-percentage^="7"], .progress.autocolor [data-percentage^="8"] {
- background-color: #ef6f00; }
-
-.progress.autocolor [data-percentage^="9"], .progress.autocolor [data-percentage="100"] {
- background-color: #cf2a2a; }
-
-.b2b-seek-bar-container {
- position: relative; }
- .b2b-seek-bar-container div {
- position: absolute; }
- .b2b-seek-bar-container .b2b-seek-bar-track-container {
- width: 100%; }
- .b2b-seek-bar-container .b2b-seek-bar-track {
- width: 100%;
- height: 6px;
- background-color: #cccccc;
- border-radius: 10px; }
- .b2b-seek-bar-container .b2b-seek-bar-track-fill {
- width: 100%;
- height: 6px;
- background-color: #cccccc;
- border-radius: 10px;
- width: 0;
- background-color: #157BB2;
- transition: width 0s linear; }
-
-.seek-bar-container .seek-bar-knob-container {
- transition: left 0s linear; }
-
-.b2b-seek-bar-container .b2b-seek-bar-knob {
- width: 14px;
- height: 14px;
- border-radius: 10px;
- top: -4px;
- left: -8px;
- border: 1px solid #cccccc;
- background: white;
- cursor: pointer; }
-
-.b2b-seek-bar-container .b2b-seek-bar-knob:focus {
- outline: thin dotted #666; }
-
-.b2b-seek-bar-container.vertical {
- width: 100%;
- height: 100%;
- margin: 0 auto;
- position: relative;
- border-radius: 10px; }
- .b2b-seek-bar-container.vertical .b2b-seek-bar-track-container {
- position: relative;
- height: 100%; }
- .b2b-seek-bar-container.vertical .b2b-seek-bar-track {
- position: absolute;
- height: 100%; }
- .b2b-seek-bar-container.vertical .b2b-seek-bar-track-fill {
- position: absolute;
- bottom: 0;
- height: 0;
- width: 100%; }
- .b2b-seek-bar-container.vertical .b2b-seek-bar-knob-container {
- transition: bottom .01s linear;
- position: relative;
- bottom: 0; }
- .b2b-seek-bar-container.vertical .b2b-seek-bar-knob {
- position: absolute;
- border-radius: 10px;
- top: -7px;
- left: -4px; }
-
-.form-search .search-query {
- width: 100% !important; }
-
-.form-search .well {
- margin-top: 0; }
-
-.form-search > ul.nav > li.section {
- min-height: 20px !important; }
-
-input.b2b-search-input-field {
- margin-bottom: 0px; }
-
-.search-suggestion-list {
- background-color: #FFFFFF;
- border: 1px solid #ccc;
- border-radius: 0 0 6px 6px;
- box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
- margin-top: -5px;
- max-height: 400px;
- overflow-x: hidden;
- overflow-y: auto;
- padding: 15px 0;
- position: absolute;
- width: 100%;
- z-index: 1000; }
- .search-suggestion-list > li.active {
- background-color: #cccccc; }
- .search-suggestion-list:empty {
- display: none; }
-
-.b2b-search-hightlight {
- font-weight: bold; }
-
-input[type="text"]::-moz-placeholder {
- color: #767676;
- font-family: "Omnes-ECOMP-W02-Italic", Arial; }
-
-input[type="text"]:focus {
- z-index: 1000; }
-
-input[type="text"] + .reset-field {
- background-color: #FFFFFF;
- height: 90%;
- top: 5%; }
-
-.btn-search:focus {
- outline: 1px dotted #0574ac; }
-
-.field-group input:not([type="button"])[disabled] ~ .btn-search {
- background-color: #eee; }
-
-.btn-search[class*="btn"] {
- background-color: #FFFFFF;
- background-size: 20px 20px;
- border-radius: 0 1.5rem 1.5rem 0;
- height: 3rem;
- min-width: 4.4rem !important;
- right: 0.15rem;
- top: 0.15rem;
- width: 4.4rem; }
-
-.search-suggestion-wrapper {
- margin-bottom: 15px;
- position: relative; }
- .search-suggestion-wrapper .no-result {
- padding: 0px 15px; }
-
-.search-suggestion-item {
- color: #333333;
- line-height: 4rem;
- padding: 0 15px;
- position: relative;
- z-index: 1000; }
- .search-suggestion-item:hover {
- background-color: #e4e4e4;
- cursor: pointer; }
- .search-suggestion-item:focus {
- background-color: #e4e4e4;
- cursor: pointer; }
- .search-suggestion-item a {
- color: #333333;
- text-decoration: none; }
-
-.btn-search i {
- color: #767676; }
-
-input.b2b-search-input-field:focus ~ .btn-search > i, .btn-search:focus > i {
- color: #0568ae; }
-
-button.btn-search[disabled] {
- cursor: not-allowed; }
- button.btn-search[disabled] i {
- color: #767676; }
-
-.innershadow {
- -webkit-background-blend-mode: mutilply;
- box-shadow: 0 3px 0 2px rgba(0, 0, 0, 0.08); }
-
-.linkSelectorModule {
- position: relative;
- height: 32px;
- line-height: 20px;
- border: 0px;
- width: auto;
- display: block; }
- .linkSelectorModule .icon-primary-down {
- font-size: 23px;
- margin-top: -10px;
- position: absolute;
- top: 50%;
- margin-left: -30px; }
- .linkSelectorModule .selectModule {
- background-color: transparent;
- border: none;
- color: #0568ae;
- cursor: pointer;
- border: 1px solid transparent;
- box-shadow: none;
- padding-right: 35px;
- position: relative;
- user-select: none;
- font-size: 1.6rem; }
- .linkSelectorModule .selectModule:focus {
- border: 1px dotted #ccc;
- box-shadow: none;
- -moz-user-select: none; }
- .linkSelectorModule .selectModule:hover {
- text-decoration: underline; }
- .linkSelectorModule .active + .moduleWrapper:before {
- background-color: #FFFFFF;
- border-color: #d2d2d2;
- border-style: solid;
- border-width: 1px 1px 0 0;
- content: "";
- display: block;
- height: 15px;
- right: 122px;
- margin: 0;
- position: absolute;
- top: -8px;
- -webkit-transform: rotate(-45deg);
- transform: rotate(-45deg);
- width: 15px; }
- .linkSelectorModule .moduleWrapper {
- top: 40px; }
- .linkSelectorModule ul.awd-module-list {
- border-radius: 6px 6px 0px 0px; }
-
-.selectorModule .icon-primary-down {
- font-size: 23px;
- margin-top: -11px;
- position: absolute;
- right: 4px;
- top: 50%; }
-
-.selectorModule .selectModule {
- border: 1px solid #d2d2d2;
- border-radius: 6px;
- box-shadow: 1px 5px 2px -5px rgba(0, 0, 0, 0.15);
- display: block;
- width: 100%;
- padding-left: 15px;
- background-color: transparent;
- cursor: pointer; }
- .selectorModule .selectModule:focus {
- border: 1px solid #0568ae;
- -moz-user-select: none; }
- .selectorModule .selectModule span.module-data {
- position: absolute;
- bottom: 6px;
- line-height: 20px; }
- .selectorModule .selectModule img + span.module-data {
- padding-left: 45px; }
-
-.selectorModule .selectModule.active {
- border-bottom-right-radius: 0px;
- border-bottom-left-radius: 0px; }
-
-.selectorModule .moduleWrapper {
- position: absolute;
- width: 100% !important;
- border-top: none; }
-
-.selectorModule ul.awd-module-list {
- border-radius: 0px 0px 6px 6px; }
-
-.selectorModule .large > img {
- height: 30px;
- position: absolute;
- width: 30px;
- top: 20px;
- left: 15px; }
-
-.selectModule {
- background-color: transparent;
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #333333;
- font-size: 1.6rem;
- height: 36px;
- line-height: 35px;
- margin-bottom: 0;
- position: relative;
- text-align: left;
- top: 0;
- z-index: 10;
- padding: 0px;
- margin: 0px;
- cursor: pointer; }
-
-.moduleWrapper {
- background-color: #FFFFFF;
- position: absolute;
- color: #191919;
- z-index: 9999;
- box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.15);
- border-radius: 0px 0px 6px 6px; }
- .moduleWrapper .module-list-item img {
- height: 30px;
- position: absolute;
- width: 30px;
- top: 30px;
- left: 15px;
- align-self: center; }
- .moduleWrapper span {
- display: block;
- white-space: nowrap;
- font-size: 1.5rem; }
-
-.awd-module-list {
- overflow-y: auto;
- z-index: 9999;
- max-height: 360px;
- border: 1px solid #d2d2d2; }
- .awd-module-list .module-list-item > .module-data {
- overflow: ellipsis;
- white-space: nowrap;
- line-height: 20px;
- font-size: 1.6rem;
- border-bottom: 1px dotted #959595;
- margin: 0px 15px 0px 15px;
- padding-right: 50px;
- padding-bottom: 14px;
- padding-top: 14px;
- align-self: center;
- width: 100%; }
- .awd-module-list .module-list-item:hover {
- background-color: #f2f2f2; }
- .awd-module-list .module-list-item:active {
- background-color: #f2f2f2; }
- .awd-module-list .module-list-item[aria-selected="true"] {
- background-color: #f2f2f2; }
-
-.module-list-item {
- cursor: pointer;
- overflow: hidden;
- position: relative;
- overflow: ellipsis;
- white-space: nowrap;
- z-index: 1000;
- color: #191919;
- display: flex; }
- .module-list-item:last-of-type .module-data {
- border-bottom: none; }
- .module-list-item img + span.module-data {
- padding-left: 45px; }
-
-.module-groups:first-of-type .module-list-item:last-of-type .module-data {
- border-bottom: 1px solid #959595; }
-
-.module-groupitem {
- padding-bottom: 4px; }
-
-.selectorModule.large {
- height: 72px;
- vertical-align: middle;
- text-align: left; }
- .selectorModule.large .moduleWrapper {
- top: 71px; }
- .selectorModule.large input {
- height: 72px;
- vertical-align: middle;
- text-align: left; }
- .selectorModule.large button {
- height: 72px;
- vertical-align: middle;
- text-align: left; }
- .selectorModule.large .selectModule img {
- left: 15px;
- top: 21px; }
-
-ul.module-groupitem li {
- margin: 0 -15px 0 -15px; }
-
-span.module-data span {
- display: block;
- line-height: 20px;
- font-size: 1.5rem; }
-
-li.module-groups {
- cursor: default !important;
- padding: 18px 15px 0px 15px; }
-
-li.module-list-item[selected]:before {
- box-sizing: border-box;
- display: inline-block;
- font-size: 2em;
- height: 1em;
- position: absolute;
- top: 20px;
- right: 0px;
- vertical-align: middle;
- width: 1em;
- color: #007a3e; }
-
-ul.module-optinalcta {
- position: relative;
- height: 44px;
- margin-top: 0px;
- border-bottom: 1px solid #d2d2d2;
- border-left: 1px solid #d2d2d2;
- border-right: 1px solid #d2d2d2;
- border-radius: 0px 0px 6px 6px; }
- ul.module-optinalcta li {
- position: absolute;
- bottom: 10px; }
- ul.module-optinalcta a {
- text-indent: 15px;
- padding: 15px; }
-
-.b2b-slider-container {
- position: relative; }
- .b2b-slider-container.slider-disabled {
- cursor: not-allowed !important; }
- .b2b-slider-container div {
- position: absolute; }
- .b2b-slider-container .slider-track-container {
- width: 100%;
- cursor: pointer; }
- .b2b-slider-container .slider-track {
- width: 100%;
- height: 6px;
- background-color: #cccccc;
- border-radius: 10px;
- border: 1px solid #cccccc; }
- .b2b-slider-container .slider-track-fill {
- width: 100%;
- height: 6px;
- background-color: #cccccc;
- border-radius: 10px;
- width: 0;
- background-color: #157BB2;
- transition: width 0s linear;
- border: 1px solid #cccccc; }
- .b2b-slider-container .slider-knob-container {
- transition: left 0s linear; }
- .b2b-slider-container .slider-knob-container.slider-knob-hidden {
- display: none !important; }
- .b2b-slider-container .slider-knob {
- width: 14px;
- height: 14px;
- border-radius: 10px;
- top: -4px;
- left: -8px;
- border: 1px solid #cccccc;
- background: white;
- cursor: pointer; }
- .b2b-slider-container .slider-knob:focus {
- outline: thin dotted #666; }
-
-.b2b-slider-endpoints-container {
- margin-top: 13px;
- color: #333;
- font-size: 12px; }
- .b2b-slider-endpoints-container .b2b-slider-endpoints-left {
- float: left;
- line-height: 100%; }
- .b2b-slider-endpoints-container .b2b-slider-endpoints-right {
- float: right;
- line-height: 100%; }
- .b2b-slider-endpoints-container::after {
- clear: both;
- content: "";
- display: block; }
-
-.b2b-slider-container.vertical {
- width: 100%;
- height: 100%;
- margin: 0 auto;
- position: relative;
- border-radius: 10px; }
- .b2b-slider-container.vertical .slider-track-container {
- position: relative;
- height: 100%; }
- .b2b-slider-container.vertical .slider-track {
- position: absolute;
- height: 100%; }
- .b2b-slider-container.vertical .slider-track-fill {
- position: absolute;
- bottom: 0;
- height: 0;
- width: 100%; }
- .b2b-slider-container.vertical .slider-knob-container {
- transition: bottom 0s linear;
- position: relative;
- bottom: 0; }
- .b2b-slider-container.vertical .slider-knob-container.slider-knob-hidden {
- display: none !important; }
- .b2b-slider-container.vertical .slider-knob {
- position: absolute;
- border-radius: 10px;
- top: -7px;
- left: -4px; }
-
-.icon-primary-spinner {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20id%3D%22svg-spinner%22%20x%3D%220px%22%20y%3D%220px%22%20xml%3Aspace%3D%22preserve%22%3E%0A%20%20%20%3Cpath%20fill%3D%22%23F5F5F5%22%20d%3D%22M18%2036C8.1%2036%200%2027.9%200%2018S8.1%200%2018%200s18%208.1%2018%2018-8.1%2018-18%2018zm0-31.5c-7.5%200-13.5%206-13.5%2013.5S10.6%2031.5%2018%2031.5c7.5%200%2013.5-6.1%2013.5-13.5%200-7.5-6-13.5-13.5-13.5z%22%2F%3E%0A%20%20%20%3Cpath%20fill%3D%22%230568AE%22%20id%3D%22spinner%22%20d%3D%22M30.7%205.3l-3.1%203.2c2.4%202.4%203.9%205.8%203.9%209.5%200%207.4-6.1%2013.5-13.5%2013.5S4.5%2025.4%204.5%2018%2010.6%204.5%2018%204.5V0C8.1%200%200%208.1%200%2018s8.1%2018%2018%2018%2018-8.1%2018-18c0-5-2-9.5-5.3-12.7z%22%3E%0A%20%20%20%20%20%20%3CanimateTransform%20%0A%20%20%20%20%20%20%20%20%20attributeType%3D%22xml%22%0A%20%20%20%20%20%20%20%20%20attributeName%3D%22transform%22%0A%20%20%20%20%20%20%20%20%20type%3D%22rotate%22%0A%20%20%20%20%20%20%20%20%20from%3D%220%2018%2018%22%0A%20%20%20%20%20%20%20%20%20to%3D%22360%2018%2018%22%0A%20%20%20%20%20%20%20%20%20dur%3D%221.0s%22%0A%20%20%20%20%20%20%20%20%20repeatCount%3D%22indefinite%22%0A%20%20%20%20%20%20%2F%3E%0A%20%20%20%3C%2Fpath%3E%0A%3C%2Fsvg%3E");
- height: 50px;
- width: 50px; }
-
-.icon-primary-spinner.small {
- margin-right: 5px;
- height: 30px !important;
- width: 30px !important; }
-
-.isIE .icon-primary-spinner,
-.isIE .icon-primary-spinner.small {
- animation: spinner 1s linear infinite; }
-
-.ds2-no-colors .icon-primary-spinner {
- animation: spinner 1s linear infinite;
- border: 5px dotted transparent;
- border-radius: 50%; }
-
-@keyframes spinner {
- 0% {
- transform: rotate(0deg); }
- 100% {
- transform: rotate(359deg); } }
-
-.b2b-status-tracker > .btn-arrow:nth-of-type(1) {
- margin-right: 10px; }
-
-.b2b-status-tracker > .btn-arrow:nth-of-type(2) {
- margin-left: 20px; }
-
-.b2b-status-tracker > .btn-arrow {
- height: 20px;
- margin-top: 25px;
- overflow: visible; }
- .b2b-status-tracker > .btn-arrow > .btn-secondary > .icon-primary-left {
- margin-right: 5px;
- color: #0574ac; }
- .b2b-status-tracker > .btn-arrow > .btn-secondary > .icon-primary-right {
- color: #0574ac; }
-
-.b2b-status-tracker > .b2b-status-tracker-step {
- padding: 0;
- position: relative; }
-
-.b2b-status-tracker-step {
- margin-left: 5px; }
-
-.b2b-status-tracker > .b2b-status-tracker-step .b2b-status-tracker-heading {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 14px;
- color: #191919;
- margin-bottom: 10px; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.complete > .progress > .progress-bar {
- width: 100%;
- background-color: #1b7e28; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.complete .icoControls-approval {
- color: #1b7e28; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.current > .progress > .progress-bar {
- width: 100%;
- background-color: #333333; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.current .icon-misc-time {
- color: #333333; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.pending > .progress > .progress-bar {
- width: 100%;
- background-color: #ffb81c; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.pending .icoControls-statusokay {
- color: #ffb81c; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.actionRequired > .progress > .progress-bar {
- width: 100%;
- background-color: #cf2a2a; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.actionRequired .icoSecurityalerts-alert {
- color: #cf2a2a; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.notAvailable > .progress > .progress-bar {
- width: 100%;
- background-color: #767676; }
-
-.b2b-status-tracker > .b2b-status-tracker-step.notAvailable .icoControls-restricted {
- color: #767676; }
-
-.b2b-status-tracker > .b2b-status-tracker-step > .progress {
- position: relative;
- border-radius: 1.5px;
- height: 3px;
- margin-bottom: 10px;
- background-color: #c5c5c5; }
- .b2b-status-tracker > .b2b-status-tracker-step > .progress > .progress-bar {
- width: 0;
- height: 3px; }
-
-.b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-estimate {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 14px;
- color: #191919;
- margin-bottom: 10px; }
-
-.b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-description {
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 12px;
- color: #767676;
- padding-right: 15px; }
- .b2b-status-tracker > .b2b-status-tracker-step > .b2b-status-tracker-description a {
- cursor: pointer; }
-
-.step-indicator {
- height: auto;
- padding: 40px 0; }
-
-.step-heading {
- color: #333333;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 3.8rem;
- line-height: 0.8; }
-
-.steps {
- display: flex;
- height: 5px;
- margin-top: 60px;
- position: relative; }
-
-.steps li {
- color: #5a5a5a;
- flex: 1;
- margin-right: 5px;
- background-color: #c4c4c4;
- outline: 1px solid transparent; }
-
-.steps li:first-child {
- border-radius: 4px 0 0 4px; }
-
-.steps li:last-child {
- margin-right: 0;
- border-radius: 0 4px 4px 0; }
-
-.steps li.step-on,
-.steps li.step-done {
- background-color: #007a3e;
- color: #007a3e;
- border: 1px solid transparent; }
-
-.step-text {
- bottom: 29px;
- display: inline-block;
- font-size: 1.8rem;
- margin-top: 0;
- position: relative;
- white-space: nowrap; }
-
-.step-on .step-text {
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.steps li .step-text[data-large-text]:before {
- content: attr(data-large-text) " "; }
-
-.step-confirmation {
- color: #007a3e;
- margin-bottom: 30px; }
-
-.step-confirmation > div {
- display: flex; }
-
-.step-confirmation > div i {
- color: #007a3e;
- font-size: 50px;
- margin-right: 10px; }
-
-.step-confirmation.centered > div i {
- margin-left: -60px; }
-
-.step-confirmation > div h3 {
- font-size: 2.4rem;
- margin: 26px 0 20px; }
-
-.step-confirmation > p {
- margin: 0; }
-
-@media (max-width: 1024px) {
- .step-indicator {
- padding: 25px 0; }
- .steps {
- margin-top: 0; }
- .step-heading {
- font-size: 2.4rem;
- margin-bottom: 11px; }
- .step-text {
- display: none; }
- .step-on .step-text {
- bottom: 6px;
- display: block;
- font-size: 1.2rem;
- left: 0;
- line-height: 1;
- margin-top: 10px;
- position: absolute;
- top: 4px; }
- .steps li .step-text[data-sm-text]:before {
- content: attr(data-sm-text) " ";
- color: #333333; }
- .step-confirmation {
- margin-top: 30px !important; } }
-
-@media (max-width: 767px) {
- .step-confirmation.centered > div i {
- margin-left: 0; }
- .step-confirmation.centered > p {
- margin-left: 40px; }
- .step-confirmation > div h3 {
- font-size: 1.8rem;
- margin: 13px 0 10px; }
- .step-confirmation > div i {
- font-size: 30px;
- margin-right: 10px; } }
-
-.step-indicator.vertical {
- height: auto; }
-
-.vertical .step-heading {
- font-size: 24px; }
-
-.vertical .steps {
- display: block;
- height: inherit;
- width: 100%; }
-
-.vertical .steps li {
- align-items: center;
- background-color: transparent;
- display: flex;
- height: 60px;
- margin: 0 0 4px;
- padding: 0 0 0 20px;
- position: relative; }
-
-.vertical .steps li .step-text {
- align-self: center;
- color: #0568ae;
- display: block;
- margin: 0;
- position: relative;
- font-size: 14px;
- top: 0; }
-
-.vertical .steps li .step-text[data-large-text]:before {
- content: attr(data-large-text) " "; }
-
-.vertical .steps li:after {
- background-color: transparent;
- border-left: 4px solid #d2d2d2;
- content: "";
- height: 60px;
- left: 0;
- margin: 0;
- padding: 0;
- position: absolute;
- top: 0;
- width: 4px; }
-
-.vertical .steps li.step-on:after,
-.vertical .steps li.step-done:after {
- border-color: #0568ae; }
-
-.b2b-step-tracker {
- height: auto;
- padding: 0px 0px 0px 0px; }
- .b2b-step-tracker .btn.btn-left {
- margin-right: 10px; }
- .b2b-step-tracker .btn.btn-right {
- margin-left: 5px; }
- .b2b-step-tracker .b2b-left-arrow {
- float: left;
- margin-top: -5px; }
- .b2b-step-tracker .b2b-right-arrow {
- float: right;
- margin-top: -5px; }
- .b2b-step-tracker .b2b-steps {
- display: flex;
- height: 5px;
- margin-top: 30px;
- position: relative; }
- .b2b-step-tracker .b2b-steps li {
- color: #767676;
- flex: 1;
- margin-right: 5px;
- background-color: #767676;
- outline: 1px solid transparent;
- height: 3px; }
- .b2b-step-tracker .b2b-steps li.b2b-step-done {
- background-color: #1b7e28;
- color: #007a3e;
- height: 3px; }
- .b2b-step-tracker .b2b-steps li.b2b-step-on {
- background-color: #333333;
- color: #333333;
- height: 3px;
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
- .b2b-step-tracker .b2b-steps li .b2b-step-text {
- bottom: 29px;
- display: inline-block;
- font-size: 14px;
- margin-top: 0;
- position: relative;
- white-space: nowrap; }
- .b2b-step-tracker .b2b-steps li .b2b-step-text[data-large-text]:before {
- content: attr(data-large-text) " "; }
- .b2b-step-tracker .b2b-steps li:first-child {
- border-radius: 2px 0 0 2px; }
- .b2b-step-tracker .b2b-steps li:last-child {
- margin-right: 0;
- border-radius: 0 2px 2px 0; }
-
-@media (max-width: 1024px) {
- .b2b-step-tracker {
- padding: 25px 0; }
- .b2b-step-tracker .b2b-steps {
- margin-top: 0; }
- .b2b-step-tracker .b2b-steps li .b2b-step-text {
- display: none; }
- .b2b-step-tracker .b2b-steps li .b2b-step-text[data-sm-text]:before {
- content: attr(data-sm-text) " ";
- color: #333333; }
- .b2b-step-tracker .b2b-steps li.b2b-step-on .b2b-step-text {
- bottom: 6px;
- display: block;
- font-size: 10px;
- left: 0;
- line-height: 1;
- margin-top: 10px;
- position: absolute;
- top: 4px; } }
-
-.strength-meter-container {
- height: 26px;
- max-width: 450px; }
-
-.strength-meter-gauge {
- border-radius: 2px;
- background-color: #d2d2d2;
- height: 5px;
- display: block;
- position: relative;
- outline: 1px solid transparent; }
-
-.strength-meter-gauge-fill {
- height: 100%;
- display: block;
- border-radius: 2px;
- text-indent: -9999px;
- width: 0%;
- border: 2px solid transparent; }
-
-.strength-meter-gauge-fill.strength-meter-animate {
- transition: width 0.5s linear, background-color 0.5s linear; }
-
-.strength-meter-animate[style*="20"] {
- background-color: #cf2a2a; }
-
-.strength-meter-animate[style*="20"] + .strength-meter-divider + .strength-meter-content:after {
- content: "Unacceptable"; }
-
-.strength-meter-animate[style*="40"] {
- background-color: #ea7400; }
-
-.strength-meter-animate[style*="40"] + .strength-meter-divider + .strength-meter-content:after {
- content: "Weak"; }
-
-.strength-meter-animate[style*="60"] {
- background-color: #ea7400; }
-
-.strength-meter-animate[style*="60"] + .strength-meter-divider + .strength-meter-content:after {
- content: "Fair"; }
-
-.strength-meter-animate[style*="80"] {
- background-color: #007a3e; }
-
-.strength-meter-animate[style*="80"] + .strength-meter-divider + .strength-meter-content:after {
- content: "Good"; }
-
-.strength-meter-animate[style*="100"] {
- background-color: #007a3e; }
-
-.strength-meter-animate[style*="100"] + .strength-meter-divider + .strength-meter-content:after {
- content: "Excellent"; }
-
-.strength-meter-divider {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex;
- overflow: hidden; }
-
-.strength-meter-divider span {
- background: transparent;
- display: block;
- flex-grow: 1;
- border-right: solid 1px #fff; }
-
-.strength-meter-divider span:first-child {
- border-radius: 2px 0 0 2px; }
-
-.strength-meter-divider span + .strength-meter-divider span {
- border-radius: 0; }
-
-.strength-meter-divider span:last-child {
- border-radius: 0 2px 2px 0;
- border-right: 0; }
-
-.strength-meter-content {
- font-size: 14px;
- line-height: 1;
- padding-top: 7px;
- position: absolute; }
-
-.strength-meter-content:before {
- font-family: "Omnes-ECOMP-W02", Arial;
- content: "Password strength: "; }
-
-.strength-meter-content:after {
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.strength-meter-container {
- height: 26px;
- min-width: 290px;
- max-width: 450px; }
-
-.strength-meter-container .strength-meter-gauge {
- border-radius: 2px;
- background-color: #cccccc;
- box-shadow: 0 1px 1px -1px #333 inset;
- height: 5px;
- display: block;
- overflow: hidden;
- position: relative; }
-
-.strength-meter-container > .strength-meter-gauge > .strength-meter-gauge-fill {
- height: 100%;
- box-shadow: 0 1px 1px -1px #999 inset;
- display: block;
- text-indent: -9999px;
- width: 0%; }
-
-.strength-meter-container > .strength-meter-gauge > .strength-meter-gauge-fill.strength-meter-animate {
- transition: width 0ms ease-out, background-color 0ms ease-in; }
-
-.strength-meter-container > .strength-meter-gauge > .strength-meter-divider {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- display: flex; }
-
-.strength-meter-container > .strength-meter-gauge > .strength-meter-divider span {
- background: transparent;
- display: block;
- flex-grow: 1;
- border-right: solid 1px #fff; }
-
-.strength-meter-container > .strength-meter-gauge > .strength-meter-divider span:last-child {
- border-right: 0; }
-
-.strength-meter-container > .strength-meter-content {
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 14px;
- line-height: 1;
- padding-top: 7px; }
-
-.strength-meter-container > .strength-meter-content:before {
- content: none; }
-
-.strength-meter-container > .strength-meter-content > .strength-meter-content-state {
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.btn-switch-label {
- display: flex;
- align-items: center; }
- .btn-switch-label:focus .btn-switch {
- outline: 1px dotted #666;
- outline-offset: 5px; }
- .btn-switch-label input:focus .btn-switch {
- outline: 1px dotted #666;
- outline-offset: 5px; }
- .btn-switch-label > span {
- flex: 1; }
-
-.btn-switch {
- background-color: #fff;
- border: 1px solid #d2d2d2;
- border-radius: 16px;
- box-shadow: 0 4px 5px -5px rgba(0, 0, 0, 0.15) inset, 0 5px 5px -5px rgba(0, 0, 0, 0.15);
- height: 32px;
- overflow: hidden;
- position: relative;
- width: 80px;
- user-select: none; }
- .btn-switch input[type="checkbox"] {
- left: 0;
- margin: 0;
- opacity: 0;
- position: absolute;
- top: 0;
- transition: none; }
- .btn-switch input[type="checkbox"] + .switch-overlay .btn-slider-on .activo {
- font: 0px/0 "Omnes-ECOMP-W02", Arial; }
- .btn-switch input[type="checkbox"] + .switch-overlay .btn-slider-on + .btn + .btn-slider-off .inactivo {
- font: 0px/0 "Omnes-ECOMP-W02", Arial; }
- .btn-switch input:checked + .switch-overlay {
- left: 0;
- transition: all .3s linear .0s; }
- .btn-switch input:checked + .switch-overlay .switch-handle {
- background-color: #007a3e;
- background: linear-gradient(to bottom, #008744 0%, #007a3e 100%);
- transition: background-color 0.3s linear 0s;
- border: 1px solid transparent; }
- .btn-switch input + .switch-overlay {
- left: -48px;
- transition: all .3s linear .0s; }
- .btn-switch input + .switch-overlay .switch-handle {
- background-color: #f2f2f2;
- background: linear-gradient(to bottom, #fcfcfc 0%, #f2f2f2 100%);
- transition: background-color 0.3s linear 0s;
- border: 1px solid #d2d2d2; }
- .btn-switch input[disabled] + .switch-overlay {
- left: 0;
- width: 100% !important;
- background-color: #d2d2d2;
- color: #959595;
- cursor: not-allowed !important; }
- .btn-switch input[disabled] + .switch-overlay .btn-slider-on {
- display: none; }
- .btn-switch input[disabled] + .switch-overlay .activo {
- display: none; }
- .btn-switch input[disabled] + .switch-overlay .switch-handle {
- display: none; }
- .btn-switch input[disabled] + .switch-overlay .btn-slider-off {
- left: 0;
- text-align: center;
- padding: 0; }
- .btn-switch input[disabled]:checked + .switch-overlay {
- left: 0;
- width: 100% !important;
- background-color: #fff; }
- .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-off {
- display: none; }
- .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-off + .inactivo {
- display: none; }
- .btn-switch input[disabled]:checked + .switch-overlay .switch-handle {
- display: none; }
- .btn-switch input[disabled]:checked + .switch-overlay .btn-slider-on {
- display: block;
- text-align: center;
- padding: 0;
- color: #007a3e !important;
- font-weight: bold; }
- .btn-switch input[disabled]:checked + .switch-overlay .activo {
- display: block;
- text-align: center;
- padding: 0;
- color: #007a3e !important;
- font-weight: bold; }
- .btn-switch input[disabled]:checked + .btn-slider-on {
- display: block; }
- .btn-switch input[disabled] + .btn-slider-on + .switch-handle {
- width: 100%;
- margin: 0; }
- .btn-switch input[disabled] + .btn-slider-on + .switch-handle + .btn-slider-off {
- display: block; }
- .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on {
- display: none; }
- .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on .activo {
- border: medium none;
- color: #666;
- font: 16px/32px "Omnes-ECOMP-W02", Arial;
- height: auto;
- margin: 0 auto;
- width: auto; }
- .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on .activo:before {
- display: none; }
- .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off {
- display: block;
- padding: 0;
- text-align: center;
- color: #333333; }
- .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off .inactivo {
- border: medium none;
- color: #666;
- font: 16px/32px "Omnes-ECOMP-W02", Arial;
- height: auto;
- margin: 0 auto;
- width: auto; }
- .btn-switch input[type="checkbox"][disabled] + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off .inactivo:before {
- display: none; }
- .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .btn-slider-on {
- display: block;
- padding: 0;
- text-align: center;
- color: #007a3e; }
- .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .btn-slider-on + .switch-handle + .btn-slider-off {
- display: none; }
- .btn-switch input[type="checkbox"][disabled]:checked + .switch-overlay .activo {
- color: #007a3e;
- font-weight: bold; }
-
-.switch-overlay {
- border-radius: 16px;
- color: black !important;
- font-size: 1.6rem;
- height: 32px;
- left: 0;
- position: absolute;
- top: -1px;
- width: 126px;
- overflow: hidden; }
-
-.btn-slider-on {
- left: -1px;
- text-align: left;
- padding-left: 12px;
- display: inline-block;
- font-family: "Omnes-ECOMP-W02", Arial;
- height: 32px;
- line-height: 32px;
- position: absolute;
- top: 1px;
- width: 80px; }
-
-.btn-slider-off {
- display: inline-block;
- font-family: "Omnes-ECOMP-W02", Arial;
- height: 32px;
- line-height: 32px;
- position: absolute;
- top: 1px;
- width: 80px;
- right: 1px;
- text-align: right;
- padding-right: 11px; }
-
-.switch-handle {
- border-radius: 50%;
- display: inline-block;
- height: 26px;
- left: 50px;
- position: absolute;
- top: 3px;
- width: 26px; }
-
-.activo {
- display: block;
- font-size: 0.1px;
- line-height: 40px;
- overflow: hidden; }
- .activo:before {
- background-image: none;
- border-left: 3px solid #007a3e;
- content: " ";
- height: 18px;
- left: 22px;
- margin: 2px auto;
- position: absolute;
- top: 5px;
- width: 0; }
-
-.inactivo {
- font-size: 0.1px;
- line-height: 40px; }
- .inactivo:before {
- background-image: none;
- border: 3px solid #959595;
- border-radius: 100%;
- content: " ";
- display: block;
- position: absolute;
- top: 4px;
- right: 3px;
- height: 16px;
- width: 16px; }
-
-.btn-switch.focused {
- outline: 1px dotted #000;
- outline-offset: 5px; }
-
-table {
- max-width: 100%;
- background-color: transparent;
- border-collapse: collapse;
- border-spacing: 0;
- width: 100%;
- margin-bottom: 20px; }
-
-table caption {
- text-align: left; }
-
-table thead th {
- vertical-align: bottom; }
-
-table th,
-table td {
- padding: 19px 20px;
- line-height: 1;
- font-size: 1.4rem;
- text-align: left;
- vertical-align: top;
- word-wrap: break-word; }
-
-table th {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 1.6rem;
- font-weight: normal;
- color: #333333;
- padding: 13px 20px; }
-
-table tbody td {
- border-left: 1px solid #d2d2d2;
- border-top: 1px solid #d2d2d2; }
-
-table tbody td:first-child {
- border-left: none; }
-
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header,
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header + .accordion-content,
-.tiny-accordion.iconleft.accordion-table-layout .inactive-toggle-header {
- padding: 0 0 0 50px; }
-
-.faux-table-cell,
-.inactive-toggle-header .faux-table-cell {
- display: table-cell;
- width: 100%;
- padding: 13px 0 10px 0;
- font-size: 16px;
- color: #333333; }
-
-.accordion-content .faux-table-cell {
- display: table-cell;
- width: 100%;
- padding: 0 0 10px 0; }
-
-.faux-table-cell:last-child {
- text-align: right;
- min-width: 100px;
- max-width: 150px;
- width: 1%;
- background-color: #f2f2f2;
- color: #333333;
- font-size: 14px;
- border-left: 1px solid #d2d2d2;
- padding: 0 20px 0 10px; }
-
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header.opened .hide-when-expanded {
- opacity: 1; }
-
-.tiny-accordion.iconleft.accordion-table-layout .toggle-header.opened .hide-when-expanded {
- opacity: 0;
- transition: opacity .3s linear .2s; }
-
-@media (max-width: 767px) {
- table th,
- table td {
- padding: 19px 10px; }
- table th:first-child,
- table td:first-child {
- padding: 19px 15px; } }
-
-.data-row-list ul > li {
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20version%3D%221.1%22%20viewport%3D%220%200%201%201%22%20style%3D%22width%3A100%25%3B%20height%3A1px%3B%22%3E%3Cstyle%3Eline%7Bstroke%3Argba(153%2C153%2C153%2C1)%3Bstroke-width%3A2%3B%7D%3C%2Fstyle%3E%3Cline%20y2%3D%221%22%20y1%3D%221%22%20x1%3D%221%22%20x2%3D%22100%25%22%20stroke-dasharray%3D%221%2C%203%22%2F%3E%3C%2Fsvg%3E") !important; }
-
-table {
- border-bottom: 1px solid #d2d2d2; }
-
-table th,
-table td {
- padding: 15px 15px 10px; }
-
-.data-row .col-1 {
- white-space: nowrap;
- padding: 15px 15px 0 15px;
- position: relative;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.4rem;
- border-top: 1px solid #d2d2d2; }
-
-.data-row.has-button .col-1 {
- padding: 0; }
-
-.complex-table .data-row .col-1 {
- color: #0568ae;
- cursor: pointer; }
-
-.data-row.opened {
- box-shadow: 0 -2px 0 0 #d2d2d2; }
-
-.data-row.opened td,
-.data-row.opened th {
- border-left: 1px solid transparent;
- border-bottom: 1px solid transparent; }
-
-.data-row.opened + .data-row-list {
- box-shadow: 0 1px 0 0 #d2d2d2; }
-
-.data-row.opened + .data-row-list > td {
- padding-top: 0; }
-
-.data-row.opened + .data-row-list + .data-row.opened {
- box-shadow: 0 -1px 0 0 #d2d2d2; }
-
-.data-row button {
- background-color: transparent;
- border: medium none;
- border-radius: 0;
- color: #0568ae;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.4rem;
- left: 0;
- margin: 0;
- padding: 12px 15px 7px;
- position: relative;
- text-align: left;
- top: 0;
- vertical-align: middle; }
-
-.data-row button:focus {
- outline: 1px dotted black; }
-
-.data-row .col-1 i {
- top: -1px;
- margin-right: 10px;
- display: inline-block !important; }
-
-.data-row-list th:first-child {
- background-color: inherit !important;
- border-top: none;
- padding: 0 15px 15px;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.4rem; }
-
-.data-row-list ul {
- margin: 0 0 0 30px; }
-
-.data-row-list ul > li:before {
- display: none; }
-
-.data-row-list ul > li {
- /* background-image in tables.less */
- background-position: left 13px;
- background-repeat: repeat-x;
- background-size: 4px 1px;
- display: table;
- padding-left: 0;
- width: 100%; }
-
-.data-row-list li div {
- display: table-cell;
- background-color: white;
- float: left;
- text-align: left;
- padding-left: 0;
- padding-right: 7px; }
-
-.data-row-list li div + div {
- float: right;
- text-align: right;
- padding-right: 0;
- padding-left: 7px; }
-
-.complex-table td:nth-child(1),
-.complex-table td:nth-child(2),
-.complex-table td:nth-child(3),
-.complex-table td:nth-child(4),
-.complex-table td:nth-child(5),
-.complex-table td:nth-child(6),
-.complex-table td:nth-child(7),
-.complex-table td:nth-child(8),
-.complex-table td:nth-child(9) {
- white-space: nowrap; }
-
-th:nth-child(8) {
- word-wrap: break-word;
- word-spacing: 0; }
-
-.align-col-right {
- text-align: right; }
-
-.complex-table th:not(:first-child),
-.complex-table td:not(:first-child) {
- text-align: right; }
-
-.striped tbody > tr td {
- background-color: transparent !important; }
-
-.striped tbody > tr.data-row.odd,
-.striped tbody > tr.data-row.odd + .data-row-list,
-.striped tbody > tr.data-row.odd + .data-row-list li div {
- background-color: #f2f2f2 !important; }
-
-.striped tbody > tr:not('.data-row'):nth-child(even) {
- background-color: #f2f2f2; }
-
-.b2b-table-div .selectWrap {
- width: 290px;
- position: relative;
- display: inline-table;
- margin-bottom: 0px; }
-
-.b2b-external-sort-div {
- float: right;
- padding-bottom: 25px; }
-
-.b2b-external-sort-div .sortButton {
- font-size: 36px;
- border: 1px solid #ccc;
- background: #FFF;
- border-radius: 6px;
- text-align: center;
- background: linear-gradient(#fcfcfc, #f2f2f2);
- background-blend-mode: multiply;
- width: 1em; }
-
-.b2b-external-sort-label {
- padding-bottom: 10px; }
-
-.b2b-external-sort-div a:hover {
- cursor: pointer; }
-
-.b2b-external-sort-div a:hover, .b2b-external-sort-div a:focus {
- text-decoration: none; }
-
-.b2b-external-sort-label label {
- position: relative; }
-
-.b2b-external-sort-margin {
- margin-right: 13px !important; }
-
-.b2b-table-sorter-icon [class*="icoArrows-"]:before {
- font-size: 20px; }
-
-@media screen and (max-width: 950px) {
- .b2b-external-sort-margin .selectWrap {
- bottom: 0px !important; } }
-
-.tablesorter-default .tablesorter-header.sorter-false .tablesorter-header-inner {
- background: 0 0;
- cursor: default; }
-
-.tablesorter-default .tablesorter-header .tablesorter-header-inner {
- /* background-image: url(images/tables/upanddown.png);*/
- background-position: center right;
- background-repeat: no-repeat;
- cursor: pointer;
- white-space: normal;
- display: inline-block;
- vertical-align: baseline;
- zoom: 1;
- *display: inline;
- *vertical-align: auto;
- /* padding: 0 24px 0 0;*/ }
-
-.tablesorter-default .tablesorter-header.sorter-false .tablesorter-header-inner {
- padding: 0; }
-
-.tablesorter-default .tablesorter-header.tablesort-sortable .tablesorter-header-inner span {
- margin-right: 24px;
- display: inline-block; }
-
-/*
-.tablesorter-default thead .headerSortUp .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner {
- background-image: url(images/tables/up.png);
-}
-
-.tablesorter-default thead .headerSortDown .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner,.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner {
- background-image: url(images/tables/down.png);
-}
-*/
-.tablesorter-default thead .headerSortUp .tablesorter-header-inner,
-.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner,
-.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner,
-.tablesorter-default thead .headerSortDown .tablesorter-header-inner,
-.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner,
-.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner {
- padding-right: 0;
- line-height: 16px; }
-
-.tablesorter-default thead .headerSortUp .tablesorter-header-inner:after,
-.tablesorter-default thead .tablesorter-headerAsc .tablesorter-header-inner:after,
-.tablesorter-default thead .tablesorter-headerSortUp .tablesorter-header-inner:after {
- font-family: 'icoPrimary' !important;
- speak: none;
- font-style: normal;
- font-size: 24px;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
- line-height: 14px;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- content: "\ea3c";
- /* position: relative;*/
- position: absolute;
- text-decoration: inherit;
- display: inline-block;
- transform: rotate(180deg);
- margin-left: -22px;
- margin-top: 2px; }
-
-.tablesorter-default thead .headerSortDown .tablesorter-header-inner:after,
-.tablesorter-default thead .tablesorter-headerDesc .tablesorter-header-inner:after,
-.tablesorter-default thead .tablesorter-headerSortDown .tablesorter-header-inner:after {
- font-family: 'icoPrimary' !important;
- speak: none;
- font-style: normal;
- font-size: 24px;
- font-weight: normal;
- font-variant: normal;
- text-transform: none;
- line-height: 14px;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- content: "\ea3c";
- /* position: relative;*/
- position: absolute;
- text-decoration: inherit;
- display: inline-block;
- margin-left: -22px;
- margin-top: 2px; }
-
-.tablesorter-search-highlight {
- font-weight: 700; }
-
-.tablesorter-headerRow th:focus {
- outline: thin dotted #666;
- outline-offset: -1px; }
-
-.b2b-table-message {
- font-family: "Omnes-ECOMP-W02", Arial; }
- .b2b-table-message .b2b-magnify-glass {
- background-image: url("data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%20enable-background%3D%22new%200%200%2036%2036%22%3E%3Cpath%20d%3D%22M27.847%208.26c-1.805-1.803-4.202-2.795-6.751-2.795-2.548%200-4.945.993-6.749%202.796-1.803%201.803-2.796%204.2-2.796%206.75%200%201.879.543%203.681%201.576%205.242l-7.059%207.059c-.357.356-.554.831-.554%201.336-.001.505.196.98.554%201.337.357.356.832.552%201.336.552.503%200%20.977-.196%201.336-.553l7.047-7.048c1.576%201.062%203.402%201.622%205.309%201.622%202.55%200%204.948-.993%206.751-2.796%201.803-1.804%202.796-4.201%202.796-6.751%200-2.549-.993-4.947-2.796-6.751zm-6.761.96c3.186%200%205.778%202.592%205.778%205.778%200%203.186-2.592%205.778-5.778%205.778-3.186%200-5.778-2.592-5.778-5.778%200-3.185%202.592-5.778%205.778-5.778z%22%20fill%3D%22%23767676%22%2F%3E%3C%2Fsvg%3E");
- background-repeat: no-repeat;
- background-position: center;
- height: 50px; }
- .b2b-table-message .b2b-alert {
- font-size: 50px; }
- .b2b-table-message .b2b-loading-dots {
- font-size: 50px;
- margin-bottom: 20px; }
- .b2b-table-message .b2b-message {
- text-align: center;
- padding-bottom: 45px;
- padding-top: 40px;
- border-style: solid;
- border-width: 1px;
- border-top: none;
- padding-bottom: 45px;
- border-color: #d2d2d2;
- width: 100%;
- min-height: 220px; }
- .b2b-table-message .b2b-error-title {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #444444;
- line-height: 26px;
- margin-top: 10px; }
- .b2b-table-message .b2b-message-title {
- color: #444;
- font-family: "Omnes-ECOMP-W02", Arial; }
-
-.b2b-table-scrollbar {
- border: 1px solid;
- width: 651px;
- position: relative; }
- .b2b-table-scrollbar .b2b-table-inner-container {
- width: 650px;
- padding-left: 150px;
- overflow-x: scroll; }
- .b2b-table-scrollbar th:first-child {
- background-color: #FFFFFF; }
- .b2b-table-scrollbar td:first-child {
- background-color: #FFFFFF;
- border-top: 1px solid #cccccc;
- border-right: 1px solid #cccccc;
- margin-top: -0.5px; }
- .b2b-table-scrollbar tr {
- th: nth-child(2), td; }
- .b2b-table-scrollbar tr :nth-child(2) {
- border-left: none; }
- .b2b-table-scrollbar tr:last-child > td:first-child {
- border-bottom: 1px solid #cccccc; }
-
-.b2b-scrollbar-arrow-left {
- float: left;
- margin: 10px; }
-
-.b2b-scrollbar-arrow-right {
- float: right;
- clear: right;
- margin: 10px; }
- .b2b-scrollbar-arrow-right.btn-arrow .btn {
- margin-right: 0; }
-
-.b2b-table-scrollbar ::-webkit-scrollbar {
- height: 10px; }
-
-.b2b-table-scrollbar ::-webkit-scrollbar-thumb {
- background: #666666;
- border-radius: 5px; }
-
-.tabs {
- margin-left: 0;
- margin-bottom: 20px;
- list-style: none; }
-
-.tabs > li > a {
- display: block; }
-
-.tabs > li > a:hover,
-.tabs > li > a:focus {
- text-decoration: none;
- background-color: #d2d2d2; }
-
-.tabs > .pull-right {
- float: right; }
-
-.tabs:before,
-.tabs:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.tabs:after {
- clear: both; }
-
-.tabs > li {
- float: left; }
-
-.tabs > li > a {
- padding-right: 20px;
- padding-left: 20px;
- margin-right: 3px;
- line-height: 16px; }
-
-.tabs {
- margin: 0; }
-
-.tabs > li {
- margin-bottom: -1px; }
-
-.tabs > li:first-child {
- margin-left: 20px; }
-
-.tabs > li > a {
- padding: 12px 20px;
- border: 1px solid #d2d2d2;
- border-radius: 6px 6px 0 0;
- background-color: #f2f2f2;
- color: #5a5a5a;
- border-color: #d2d2d2; }
-
-.tabs > li > a {
- margin-right: 6px; }
-
-.tabs > li > a,
-.tabs > li > a:hover,
-.tabs > li > a:focus {
- background-image: none;
- background-color: #ffffff;
- color: #5a5a5a;
- border-color: #d2d2d2;
- border-bottom: 1px solid transparent;
- cursor: pointer; }
-
-.tabs.tabs-justified,
-.tabs.promo-tabs {
- width: 100%;
- border-bottom: 0;
- margin-bottom: -1px; }
-
-.tabs.tabs-justified > li,
-.tabs.promo-tabs > li {
- display: table-cell;
- float: none;
- width: 1%;
- border-left: 1px solid #d2d2d2; }
-
-.tabs.tabs-justified > li.active,
-.tabs.promo-tabs > li.active {
- position: relative;
- z-index: 1000; }
-
-.tabs.tabs-justified > li > a {
- padding-right: 5px;
- padding-left: 5px; }
-
-.tabs.tabs-justified > li > a,
-.tabs.promo-tabs > li > a {
- text-align: center; }
-
-.tabs.promo-tabs > li > a {
- padding: 0;
- margin: 0;
- border-radius: 0;
- border: none;
- color: #0568ae;
- font-size: 1.2rem;
- text-align: center;
- padding: 6px 10px 10px;
- border-top: 4px solid #e6e6e6;
- filter: none;
- border-bottom: 1px solid #d2d2d2;
- background-color: #f9f9f9; }
-
-.tabs > li:last-child > a {
- margin-right: 0; }
-
-.tabs.promo-tabs > li.active > a {
- color: #333333;
- border-top: 4px solid #ea7400;
- border-bottom-color: white;
- background-color: #fff !important;
- filter: none;
- cursor: default; }
-
-.tabs.promo-tabs > li:first-child {
- border-left: none; }
-
-.tabs.promo-tabs > li > a img {
- max-width: inherit;
- max-height: 39px;
- margin: 0 auto 5px auto;
- display: block; }
-
-.tabbable:before,
-.tabbable:after {
- display: table;
- content: "";
- line-height: 0; }
-
-.tabbable:after {
- clear: both; }
-
-.tab-content {
- overflow: auto;
- border: 1px solid #e6e6e6; }
-
-.tabs.promo-tabs + .tab-content {
- border: none;
- border-bottom: 1px solid #e6e6e6; }
-
-.tab-content > .tab-pane {
- padding: 10px 15px; }
-
-.tab-content.noborder {
- border: none; }
-
-.tab-content.noborder > .tab-pane {
- padding: 0; }
-
-.tab-content > .tab-pane {
- display: none; }
-
-.tab-content > .active {
- display: block; }
-
-.tabs.promo-tabs > li > a {
- font-size: 2.0rem;
- height: 70px;
- padding: 20px 20px 24px;
- background-color: #FFFFFF;
- border-top: 5px solid #FFFFFF;
- white-space: nowrap; }
-
-.tabs.promo-tabs > li.active > a {
- border-top: 5px solid #0574ac; }
-
-.tabs.promo-tabs > li > a:hover {
- color: #333333; }
-
-.tabs.promo-tabs > li {
- width: auto; }
-
-.tabs > li[disabled="disabled"] > a:hover {
- cursor: not-allowed; }
-
-.b2b-tags {
- background-color: #f2f2f2;
- -webkit-transition: all .3s ease-out;
- -moz-transition: all .3s ease-out;
- transition: all .3s ease-out;
- margin: 3px 5px 3px 0;
- padding: 2px 15px;
- border-radius: 6px;
- border: 1px solid #c9c9c9;
- display: inline-block; }
- .b2b-tags .tags__item {
- font-size: 14px;
- vertical-align: baseline;
- zoom: 1;
- color: #333; }
- .b2b-tags .tags__item i {
- color: #0574ac;
- font-size: 14px;
- font-weight: bold;
- margin-left: 10px; }
- .b2b-tags .tags__item i:hover {
- cursor: pointer; }
- .b2b-tags .tags__item i:focus {
- outline: thin dotted #666; }
- .b2b-tags .tags__item:last-child {
- margin-right: 0; }
- .b2b-tags .tags__item:hover {
- text-decoration: none; }
- .b2b-tags .tags__item:focus {
- outline: 1px dotted #666; }
-
-.tooltip-size-control {
- display: block; }
-
-.tooltip {
- display: inline-block;
- height: 20px;
- vertical-align: middle;
- margin: 1px 0 0 7px; }
-
-p .tooltip {
- margin: -3px 7px 0 0; }
-
-label .tooltip {
- margin: 1px 0 0 7px; }
-
-.tooltip .icon-primary-tooltip {
- background: none;
- border: none;
- display: inline-block;
- font-size: 20px;
- height: 20px;
- margin: 0;
- position: relative;
- width: 20px; }
-
-.tooltip .icon-primary-tooltip:before {
- top: 0; }
-
-.tooltip .icon-primary-tooltip:focus {
- text-decoration: none;
- outline: 1px dotted black; }
-
-.tooltip.active .icon-primary-tooltip:focus {
- outline: none; }
-
-.tooltip .arrow {
- display: none;
- border-color: transparent;
- border-style: solid;
- background-color: #0568ae;
- height: 20px;
- width: 20px;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- opacity: 0;
- transform: rotate(45deg);
- z-index: 20; }
-
-.tooltip.active .icon-primary-tooltip[data-placement="top"] .arrow {
- display: block;
- bottom: 32px;
- top: auto;
- border-width: 0 1px 1px 0; }
-
-.tooltip.active .icon-primary-tooltip[data-placement="bottom"] .arrow {
- border-width: 1px 0 0 1px;
- display: block;
- bottom: -33px;
- top: auto; }
-
-.tooltip.active .arrow {
- opacity: 1; }
-
-.tooltip .closingtooltip {
- display: block; }
-
-.tooltip.active .closingtooltip {
- display: none; }
-
-.tooltip-wrapper {
- position: absolute;
- margin-top: 20px;
- left: 15px;
- right: 15px;
- display: none;
- opacity: 0;
- z-index: 1010;
- text-align: left; }
-
-.helpertext {
- background-color: #0568ae;
- border: 1px solid transparent;
- border-radius: 6px;
- color: #fff;
- display: none;
- margin: 0;
- padding: 25px;
- position: relative;
- text-align: left;
- width: 100%;
- top: 0;
- z-index: 1009; }
-
-.tooltip .helpertext {
- position: absolute; }
-
-.tooltip.active .icon-primary-tooltip[data-placement="bottom"] + .tooltip-wrapper .helpertext {
- bottom: inherit;
- top: 19px; }
-
-.tooltip.active .icon-primary-tooltip[data-placement="top"] + .tooltip-wrapper .helpertext {
- top: inherit;
- bottom: 38px; }
-
-.tooltip.active .tooltip-wrapper {
- opacity: 1;
- display: block;
- margin-top: 0; }
-
-.tooltip.active .tooltip-wrapper .helpertext {
- display: block; }
-
-.tooltip-onclick .btn.icon-primary-tooltip {
- border: medium none;
- box-shadow: none;
- color: #0568ae;
- font-size: 20px;
- height: 34px;
- line-height: 36px;
- margin: 0;
- min-width: 50px;
- padding: 0;
- position: absolute;
- right: 0;
- top: 0; }
-
-.tooltip-onclick .icon-primary-tooltip:before {
- display: inline;
- position: relative; }
-
-.tooltip-onclick textarea + .reset-field + .icon-primary-tooltip {
- top: 4px;
- right: 5px;
- min-width: 40px; }
-
-.tooltip-onclick.active .helpertext:before,
-.tooltip-onfocus.active .helpertext:before {
- background-color: #0568ae;
- border-color: transparent;
- border-style: solid;
- border-width: 1px 1px 0 0;
- content: "";
- display: block;
- height: 15px;
- left: 17px;
- margin: 0;
- position: absolute;
- top: -7px;
- transform: rotate(-45deg);
- width: 15px; }
-
-.tooltip-onclick.active .helpertext {
- display: block;
- opacity: 1;
- margin: 14px 0 0; }
-
-.tooltip-onclick.active .helpertext:before {
- left: inherit;
- right: 18px; }
-
-.tooltip-onclick .reset-field {
- right: 37px; }
-
-.tooltip-onclick .reset-field:before {
- position: relative;
- top: -1px; }
-
-.tooltip-onfocus.active .helpertext {
- display: block;
- margin: 14px 0 10px 0; }
-
-.popover-title {
- display: block;
- font-size: 14px;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-weight: bold;
- margin-bottom: 8px;
- white-space: normal; }
-
-.popover-content {
- display: block;
- font-size: 12px;
- font-family: "Omnes-ECOMP-W02", Arial;
- line-height: 1.5rem;
- white-space: normal; }
-
-.popover-content span,
-.popover-content p {
- line-height: 1.5rem; }
-
-.popover-content p:last-child {
- margin-bottom: 0; }
-
-.tooltip .tooltip-element {
- position: relative; }
-
-.tooltip .icon-primary-tooltip:hover {
- text-decoration: none; }
-
-.tooltip.active .tooltip-element[data-placement="top"] .arrow {
- display: block;
- bottom: 32px;
- top: auto; }
-
-.tooltip.active .tooltip-element[data-placement="bottom"] .arrow {
- display: block;
- border-color: transparent transparent #0574ac;
- bottom: -33px;
- top: auto; }
-
-.tooltip.active .tooltip-element[data-placement="bottom"] + .tooltip-wrapper .helpertext {
- bottom: inherit;
- top: 19px; }
-
-.tooltip.active .tooltip-element[data-placement="top"] + .tooltip-wrapper .helpertext {
- top: inherit;
- bottom: 38px; }
-
-.b2b-tree {
- padding: 0 10px 0 10px;
- width: 320px; }
- .b2b-tree ul {
- list-style: none;
- list-style-type: none; }
- .b2b-tree a {
- display: block;
- padding: 0 0 5px 30px;
- line-height: 22px;
- margin-left: -10px;
- font-size: 1.4rem;
- outline-offset: -1px; }
- .b2b-tree li:focus {
- outline: none; }
- .b2b-tree li:focus > a {
- outline: thin dotted #666;
- outline-offset: -1px; }
- .b2b-tree ul li {
- border-left: 1px solid #ccc; }
- .b2b-tree ul li.bg > a {
- color: #333;
- background-image: url("./style/images/treebg.png"); }
- .b2b-tree ul li .b2b-tree-tooltip {
- display: none;
- position: absolute;
- top: -25px;
- left: 100%;
- white-space: nowrap;
- margin-left: 10px;
- z-index: 1010;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 12px; }
- .b2b-tree ul li .b2b-tree-tooltip-content {
- background-color: #0568ae;
- margin-left: 9px;
- border-radius: 6px;
- color: #fff;
- padding: 25px; }
- .b2b-tree ul li .b2b-tree-arrow-left {
- width: 0;
- height: 0;
- border-top: 10px solid transparent;
- border-bottom: 10px solid transparent;
- border-right: 10px solid #0568ae;
- position: absolute;
- top: 25px; }
- .b2b-tree ul li.activeTooltip > a .b2b-tree-tooltip {
- display: block; }
- .b2b-tree ul ul {
- padding: 0 0 0 20px; }
- .b2b-tree ul > li {
- position: relative;
- line-height: 18px; }
- .b2b-tree a > span.b2b-tree-node-icon {
- background-color: #FFF;
- display: inline;
- margin: 0;
- padding: 0;
- position: absolute;
- left: -11px;
- top: 0;
- line-height: 14px;
- width: 11px; }
- .b2b-tree a > span.b2b-tree-node-icon > i {
- font-size: 20px; }
- .b2b-tree a:only-child {
- color: #0574ac; }
- .b2b-tree a:only-child > span.b2b-tree-node-icon {
- left: -11px;
- border-radius: 50%;
- line-height: 7px;
- top: 0; }
- .b2b-tree a:only-child > span.b2b-tree-node-icon > i {
- background-color: inherit;
- background: #fff; }
- .b2b-tree a > span.b2b-tree-node-icon > i.icon-primary-circle {
- background-color: inherit;
- background: #fff;
- font-size: 10px; }
- .b2b-tree a.b2b-locked-node:after {
- content: "\ec58";
- float: right;
- font-family: 'icoSecurityalerts' !important; }
- .b2b-tree a:hover .b2b-locked-node:after {
- text-decoration: none; }
- .b2b-tree ul li:first-child > a:only-child > span.b2b-tree-node-icon {
- left: -11px;
- border-radius: 50%;
- line-height: 12px; }
- .b2b-tree ul li:last-child > a:only-child > span.b2b-tree-node-icon {
- height: 27px;
- background-color: #fff; }
- .b2b-tree li a + ul {
- height: 0;
- overflow: hidden; }
- .b2b-tree li a.active + ul {
- height: auto;
- overflow: visible; }
- .b2b-tree li a.grp {
- font-family: "Omnes-ECOMP-W02-Italic", Arial; }
- .b2b-tree li a.grp.active {
- color: #333; }
- .b2b-tree span.end {
- left: -6px !important;
- top: 5px !important; }
- .b2b-tree span.first-link {
- width: 3px !important;
- height: 15px !important;
- top: 0px !important;
- left: -2px !important;
- background: #fff; }
-
-.b2b-tree-checkbox {
- padding: 0 10px 0 10px;
- width: 320px; }
- .b2b-tree-checkbox ul {
- list-style: none;
- list-style-type: none; }
- .b2b-tree-checkbox a {
- display: block;
- padding: 0 0 5px 30px;
- line-height: 22px;
- margin-left: -10px;
- font-size: 14px;
- outline-offset: -1px; }
- .b2b-tree-checkbox li:focus {
- outline: none; }
- .b2b-tree-checkbox li:focus > a {
- outline: thin dotted #666;
- outline-offset: -1px; }
- .b2b-tree-checkbox ul li {
- border-left: 1px solid #ccc; }
- .b2b-tree-checkbox ul ul {
- padding: 0 0 0 20px; }
- .b2b-tree-checkbox ul > li {
- position: relative;
- line-height: 18px; }
- .b2b-tree-checkbox a > span.nodeIcon {
- background-color: #FFF;
- display: inline;
- margin: 0;
- padding: 0;
- position: absolute;
- left: -11px;
- top: 0;
- line-height: 14px;
- width: 11px; }
- .b2b-tree-checkbox a > span.nodeIcon > i {
- font-size: 20px; }
- .b2b-tree-checkbox a > span.nodeIcon.end {
- margin-top: 10px; }
- .b2b-tree-checkbox a:only-child {
- color: #0574ac; }
- .b2b-tree-checkbox a:only-child > span.nodeIcon {
- left: -11px;
- border-radius: 50%;
- line-height: 7px;
- top: 0; }
- .b2b-tree-checkbox a:only-child > span.nodeIcon > i {
- background-color: inherit;
- background: #fff; }
- .b2b-tree-checkbox a > span.nodeIcon > i.icon-primary-circle {
- background-color: inherit;
- background: #fff;
- font-size: 10px; }
- .b2b-tree-checkbox ul li:first-child > a:only-child > span {
- left: -11px;
- border-radius: 50%;
- line-height: 12px;
- top: 0px; }
- .b2b-tree-checkbox ul li:first-child > a:only-child > span.end {
- margin-top: 0px; }
- .b2b-tree-checkbox ul li:first-child > a:only-child > span i.icon-primary-circle {
- top: 8px; }
- .b2b-tree-checkbox ul li:last-child > a:only-child > span {
- height: 34px;
- background-color: #fff; }
- .b2b-tree-checkbox li a + ul {
- height: 0;
- overflow: hidden; }
- .b2b-tree-checkbox li a.active + ul {
- height: auto; }
- .b2b-tree-checkbox li a.grp {
- font-family: "Omnes-ECOMP-W02-Italic", Arial; }
- .b2b-tree-checkbox span.end {
- left: -6px !important; }
- .b2b-tree-checkbox .checkbox {
- margin-bottom: 0px;
- margin-top: 2px;
- font-size: 14px; }
- .b2b-tree-checkbox .checkbox input:indeterminate + .skin:after {
- content: "\2014";
- padding-left: 2px;
- font-family: inherit !important;
- line-height: inherit !important; }
- .b2b-tree-checkbox span.first-link {
- width: 3px !important;
- height: 15px !important;
- top: 0px !important;
- left: -2px !important;
- background: #fff; }
-
-.b2b-widget-window {
- width: 147px;
- right: 5px;
- top: 60px;
- position: absolute;
- border: 1px solid #ccc;
- background-color: #fff;
- border-radius: 8px;
- z-index: 1000; }
- .b2b-widget-window li {
- margin: 15px; }
-
-.b2b-widget-container {
- background-color: #fff;
- border-radius: 8px;
- border: 1px solid #ccc;
- position: relative; }
- .b2b-widget-container .b2b-widget-header {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #333;
- height: 55px;
- padding-left: 15px;
- padding-top: 19px; }
- .b2b-widget-container .b2b-widget-header .header {
- font-size: 18px; }
- .b2b-widget-container .b2b-widget-header-icons {
- font-size: 16px;
- color: #0574ac; }
-
-.b2b-widget-header-icons button {
- border: none;
- background: transparent;
- color: #0574ac; }
- .b2b-widget-header-icons button:focus {
- outline-style: solid;
- outline-width: 1px;
- outline-color: #0574ac; }
- .b2b-widget-header-icons button:first-child {
- margin-right: 0px; }
-
-.b2b-widget-container .b2b-widget-content {
- height: 325px;
- margin: 0;
- padding: 20px;
- position: relative;
- border-top: 1px solid #ccc; }
-
-.b2b-widget-content .form-row:first-child {
- margin-top: 0; }
-
-.b2b-widget-header-icons button.icoControls-gear:focus, .b2b-widget-header-icons button.icon-primary-close:focus {
- outline: thin dotted #666; }
-
-.b2b-widget-header .icon-primary-close:before {
- content: '-';
- display: inline-block;
- margin: 0;
- padding: 0;
- outline: none; }
-
-.b2b-widget-window .arrow_box {
- background: #fff;
- border: 1px solid #ccc; }
-
-.b2b-widget-window.arrow_box:after, .b2b-widget-window.arrow_box:before {
- bottom: 100%;
- left: 75%;
- border: solid transparent;
- content: " ";
- height: 0;
- width: 0;
- position: absolute;
- pointer-events: none; }
-
-.b2b-widget-window.arrow_box:after {
- border-color: rgba(255, 255, 255, 0);
- border-bottom-color: #fff;
- border-width: 10px;
- margin-left: 1px; }
-
-.b2b-widget-window.arrow_box:before {
- border-color: rgba(204, 204, 204, 0);
- border-bottom-color: #ccc;
- border-width: 11px;
- margin-left: 0px; }
-
-/************************** Overrides for Filters ***************************/
-.filter-container .filter-header h2 {
- line-height: 1 !important;
- margin: 0 !important; }
-
-.filter-container .icon-primary-spinner:before {
- content: none; }
-
-.filter-container .fixed-230-subnav {
- margin: 10px !important;
- width: inherit !important; }
-
-.filter-container .unlinked:focus {
- outline: thin dotted #666 !important; }
-
-.filter-container .unlinked.active {
- color: inherit !important; }
-
-.filter-container .fixed-230-subnav a > i {
- background: none; }
-
-.filter-container .fixed-230-subnav ul {
- margin: 0 0 10px 10px; }
-
-/************************** Overrides for Filters ***************************/
-.row .filter-container {
- background-color: #fff; }
-
-.filter-header {
- overflow: hidden;
- padding: 20px 0;
- position: relative; }
-
-.filter-header h2 {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 2.4rem;
- margin-bottom: 0; }
-
-.filter-selected {
- border-top: 1px solid #ccc;
- padding-top: 20px; }
-
-.filter-selected > span {
- font-size: 1.3rem;
- text-transform: uppercase; }
-
-.filter-selected > a.clear-all-filters {
- float: right;
- font-size: 1.4rem; }
-
-.filter-selected > span,
-.filter-selected > a.clear-all-filters {
- font-family: "Omnes-ECOMP-W02-Medium", Arial; }
-
-.filter-selected-group {
- padding-top: 15px; }
-
-.filter-selected-badge {
- background-color: #f2f2f2;
- border-radius: 15px;
- display: inline-block;
- font-size: 1.4rem;
- margin-bottom: 10px;
- padding: 0 0 0 12px; }
-
-.filter-selected-badge .icoControls-optionsoff {
- background: transparent none repeat scroll 0 0;
- border: medium none;
- font-size: 2.5em;
- margin: 0;
- padding: 0; }
-
-.filters .fixed-230-subnav > ng-transclude > div:first-child {
- border-top: 1px solid #ccc; }
-
-.filters .fixed-230-subnav > ng-transclude > div {
- border-bottom: 1px solid #ccc; }
-
-.filter-results {
- align-items: center;
- border-bottom: 1px solid #ccc;
- display: flex;
- flex-wrap: wrap;
- height: 50px;
- -webkit-justify-content: space-between;
- -ms-flex-pack: justify;
- justify-content: space-between; }
-
-.filter-results-sortby > span {
- text-transform: uppercase; }
-
-.filter-results-view .icon-primary-content-gridguide {
- font-size: 2em;
- margin-right: 0; }
-
-.filter-container .fixed-230-subnav > ng-transclude > div > a {
- font-size: 1.8rem;
- margin: 0;
- padding: 15px 20px 15px 0;
- color: #0574ac !important;
- cursor: pointer !important;
- font-family: "Omnes-ECOMP-W02", Arial !important;
- outline-offset: inherit !important;
- position: relative;
- height: auto;
- width: auto; }
-
-.filter-container .fixed-230-subnav a > i {
- right: 0;
- top: 15px; }
-
-.filter-container .fixed-230-subnav .icon-primary-collapsed:before, .filter-container .fixed-230-subnav .icon-primary-expanded:before {
- float: right; }
-
-.filter-container .fixed-230-subnav ul.collapse {
- position: inherit;
- transition: height 0.5s ease;
- height: 0;
- overflow: hidden; }
-
-.filter-container .checkbox .icon-primary-spinner {
- height: 24px;
- position: absolute;
- width: 24px; }
-
-.fixed-230-subnav.affix {
- margin: -28px 0 0; }
-
-#nav-menu .b2b-menu,
-#nav-menu .fixed-230-subnav {
- margin: 0; }
-
-.b2b-menu > li,
-.fixed-230-subnav > div {
- border-bottom: 1px solid #ccc;
- line-height: 4.0rem; }
-
-.b2b-menu > li:first-child,
-.fixed-230-subnav > li:first-child {
- border-top: 1px solid #ccc; }
-
-.b2b-menu div > a,
-.fixed-230-subnav div > a {
- color: #0574ac;
- cursor: pointer;
- display: block;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 1.4rem;
- margin: 0;
- outline-offset: -1px;
- padding: 0 10px;
- position: relative; }
-
-.fixed-230-subnav div > a.live {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- color: #666; }
-
-.fixed-230-subnav > ng-transclude > div li > a {
- display: block;
- font-size: 1.4rem;
- line-height: 20px; }
-
-.fixed-230-subnav > ng-transclude > div li > a.active {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- text-decoration: none;
- color: #666; }
-
-#nav-menu .fixed-230-subnav a > i {
- top: 10px; }
-
-.fixed-230-subnav > li > a.active > i:after {
- display: none; }
-
-.b2b-menu ul,
-.fixed-230-subnav ul {
- margin: 0 0 10px 0; }
-
-.b2b-menu ul div a,
-.fixed-230-subnav ul div a {
- padding: 0 10px; }
-
-.unlinked {
- outline: medium none !important;
- text-decoration: none !important; }
-
-@media (max-width: 1024px) {
- .filter-container .fixed-230-subnav {
- margin: 0 20px;
- width: auto; }
- .filter-container .fixed-230-subnav > li {
- margin: 0; }
- .row .filter-container {
- display: none;
- height: 100%;
- left: 0;
- position: fixed;
- overflow: auto;
- top: 0;
- transition: all 0.5s ease 0s;
- width: 285px;
- z-index: 9999; }
- .filter-header {
- padding-left: 20px; }
- .filter-selected {
- margin: 0 20px 10px; } }
-
-.b2b-pane-selector-wrapper {
- width: 100%;
- display: block;
- border-top: solid 1px #ccc;
- border-bottom: solid 1px #ccc; }
- .b2b-pane-selector-wrapper .side-nav {
- width: 20% !important;
- display: inline-block;
- float: left; }
- .b2b-pane-selector-wrapper .pane-container {
- width: 80%;
- vertical-align: top;
- margin: 0;
- padding-top: 30px;
- border-left: solid 1px #ccc;
- font-family: "Omnes-ECOMP-W02", Arial;
- display: none; }
- .b2b-pane-selector-wrapper .pane-container.active {
- display: inline-block; }
- .b2b-pane-selector-wrapper .pane-container .pane-container-top {
- padding-left: 15px; }
- .b2b-pane-selector-wrapper .pane-container .panes {
- display: -webkit-flex;
- display: flex;
- border-top: solid 1px #ccc;
- margin-top: 30px; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block {
- height: inherit;
- overflow-y: auto;
- border-right: solid 1px #ccc;
- position: relative;
- flex: 1;
- -webkit-flex: 1;
- /* Safari 6.1+ */
- -ms-flex: 1;
- /* IE 10 */ }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block:focus {
- outline: dotted 1px #333333; }
- .b2b-pane-selector-wrapper .pane-container .search-block {
- position: relative;
- float: right; }
- .b2b-pane-selector-wrapper .pane-container .search-block input[type="search"]:focus {
- padding-right: 40px; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row p {
- margin-top: 15px; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block div {
- border-bottom: solid 1px #ccc; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row {
- display: block;
- padding: 19px 14px 19px 14px;
- margin-top: 0px;
- border: dotted 1px transparent;
- border-bottom: solid 1px #ccc; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row:focus {
- border: dotted 1px #333333 !important; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row:last-child {
- border-bottom: none; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block > .no-content {
- text-align: center;
- border-bottom: none;
- display: block;
- position: absolute;
- top: 45%;
- left: 0;
- right: 0; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block div:last-child {
- border-bottom: none; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row span.margin-chk {
- margin: 15px 15px 0px 15px;
- float: left; }
- .b2b-pane-selector-wrapper .pane-container .panes div.pane-block .form-row .checkbox-selectall {
- margin: 0px 0 0 24px !important; }
- .b2b-pane-selector-wrapper .side-nav li {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- border: none;
- border-top: solid 1px #ccc;
- display: block !important;
- width: auto !important;
- margin-left: 0px !important; }
- .b2b-pane-selector-wrapper .side-nav li.active {
- background-color: #f6f6f6;
- position: inherit !important; }
- .b2b-pane-selector-wrapper .side-nav li.active > a {
- font-size: 16px;
- color: #333;
- text-decoration: none;
- border: none;
- background-color: transparent;
- padding: 20px 15px;
- display: block;
- height: auto;
- border-left: 4px solid #0574ac; }
- .b2b-pane-selector-wrapper .side-nav li > a {
- font-size: 16px;
- color: #333;
- text-decoration: none;
- border: none;
- background-color: transparent;
- padding: 20px 15px;
- display: block;
- height: auto;
- text-align: left; }
- .b2b-pane-selector-wrapper .side-nav li > a:focus {
- border-right: dotted 1px #333333; }
- .b2b-pane-selector-wrapper .side-nav li:first-child {
- border-top: none;
- margin-left: none !important; }
-/********************* Utility CSS Starts **********************/
-.offscreen-text {
- position: absolute;
- left: -10000px;
- top: auto;
- width: 1px;
- height: 1px;
- overflow: hidden; }
-
-/********************* Utility CSS Ends **********************/
-/* Fix for alignment issue on Cancel link inside modal */
-.modal-footer > .cta-button-group {
- line-height: 40px; }
-
-/* .att-dark-green { // Not used
- color: #007a3e;
-} */
-.colors-off-msg {
- display: none; }
-
-button .colors-off-msg {
- position: relative; }
-
-.ds2-no-colors .colors-off-msg {
- display: block; }
-
-.ds2-no-colors [data-colordatatext] button .colors-off-msg {
- font-size: 1.1rem;
- line-height: normal;
- padding: 5px 0;
- position: absolute;
- top: 0;
- white-space: normal;
- width: 60px; }
-
-/* Not used
-.make-all-white * {
- color: #fff;
-}
-.make-all-white a {
- text-decoration: underline;
-} */
-.loader > span {
- display: block;
- padding-top: 20px; }
-
-.modal > .loader {
- left: 50%;
- margin-left: -25px;
- margin-top: -25px;
- position: absolute;
- top: 50%; }
-
-#pageLevelLoader.modal {
- background-color: transparent;
- border: none;
- box-shadow: none;
- top: 40%; }
-
-.modal.fade .loader {
- display: none; }
-
-.modal.fade.in .loader {
- display: block; }
-
-.btn.disabled[data-loading-text] {
- padding: 0 19px 0 18px;
- line-height: 46px; }
-
-.btn.disabled[data-loading-text] img {
- position: relative;
- top: 2px; }
-
-/* Seems to already be in docs.css
-.fixed-230.leftnav {
- position: relative;
-}
-.fixed-230-subnav {
- margin: 10px;
-}
-.fixed-230-subnav > li:first-child {
- border-top: none;
-}
-.fixed-230-subnav > li {
- border-bottom: 1px solid #d2d2d2;
-}
-.fixed-230-subnav > li > a {
- display: block;
- font-size: 1.4rem;
- line-height: normal;
- margin: 0 -9px;
- padding: 11px 35px 12px 9px;
- outline-offset: 0;
- position: relative;
-}
-.fixed-230-subnav > li > a.live {
- color: #333333;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
-}
-.fixed-230-subnav a > i {
- right: 10px;
- margin: 0;
- position: absolute;
- top: 10px;
-}
-.fixed-230-subnav a > i:after {
- display: none;
-}
-.fixed-230-subnav > li li > a {
- display: block;
- font-size: 1.4rem;
- line-height: 18px;
-}
-.fixed-230-subnav > li li > a.active {
- color: #333333;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- text-decoration: none;
-}
-.fixed-230-subnav ul {
- margin: 0 0 10px;
-} */
-.unlinked {
- color: #0568ae !important;
- font-family: "Omnes-ECOMP-W02", Arial !important; }
-
-.unlinked.active {
- color: inherit !important; }
-
-/* @media (max-width: 767px) {
- .row.has-leftnav {
- flex-wrap: wrap;
- }
- .row.has-leftnav .fluid-space {
- padding-right: 0;
- }
- .row .fixed-230 {
- background-color: #fff;
- width: auto;
- }
- .row .leftnav {
- background-color: #fff !important;
- display: block !important;
- }
- .fixed-230-subnav {
- margin: 10px 0 0;
- width: 100%;
- }
- .fixed-230-subnav > li {
- margin-left: -15px;
- margin-right: -15px;
- }
- .fixed-230-subnav > li:first-child {
- border-top: 1px solid #d2d2d2;
- }
- .fixed-230-subnav > li > a {
- margin: 0;
- }
- .fixed-230-subnav a:hover,
- .fixed-230-subnav a:focus {
- text-decoration: none !important;
- }
- .fixed-230-subnav > li li > a {
- padding: 5px 10px;
- }
- .fixed-230-subnav > li li > a.active {
- color: inherit;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- }
-} */
-@keyframes DOMinsertion {
- from {
- outline-color: transparent; }
- to {
- outline-color: transparent; } }
-
-@-moz-keyframes DOMinsertion {
- from {
- outline-color: transparent; }
- to {
- outline-color: transparent; } }
-
-@-webkit-keyframes DOMinsertion {
- from {
- outline-color: transparent; }
- to {
- outline-color: transparent; } }
-
-@-ms-keyframes DOMinsertion {
- from {
- outline-color: transparent; }
- to {
- outline-color: transparent; } }
-
-@-o-keyframes DOMinsertion {
- from {
- outline-color: transparent; }
- to {
- outline-color: transparent; } }
-
-.ajaxed,
-.modal.fade.in .modal-header,
-.modal.fade.in .modal-body,
-.modal.fade.in .modal-footer {
- animation-duration: 0.01s;
- -o-animation-duration: 0.01s;
- -ms-animation-duration: 0.01s;
- -moz-animation-duration: 0.01s;
- -webkit-animation-duration: 0.01s;
- animation-name: DOMinsertion;
- -o-animation-name: DOMinsertion;
- -ms-animation-name: DOMinsertion;
- -moz-animation-name: DOMinsertion;
- -webkit-animation-name: DOMinsertion; }
-
-.dda-css-override ul.nav-tabs {
- margin-bottom: 0; }
-
-.dda-css-override div.tab-content {
- margin-top: 0;
- border-top: none; }
-
-.dda-css-override .tab-content .prettyprint, .dda-css-override .usage .prettyprint {
- max-height: 500px;
- overflow-y: auto; }
-
-.formsWithinProcessButton {
- margin-right: 0px; }
-
-.heading-sub-section-form {
- font-size: 2.4rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px;
- margin-top: 10px; }
-
-.heading-small-form {
- font-size: 1.6rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-top: 0px; }
-
-.icon-primary-form-sizeL {
- font-size: 50px; }
-
-.icon-primary-form-size {
- font-size: 30px; }
-
-.spanformfix {
- margin-right: 15px !important; }
-
-@media (max-width: 767px) {
- .heading-sub-section-form {
- font-size: 1.8rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-bottom: 20px;
- padding-top: 10px;
- margin-top: 30px; }
- .heading-small-form {
- font-size: 1.4rem;
- font-family: "Omnes-ECOMP-W02", Arial;
- margin-top: 0px; } }
-
-@media (max-width: 479px) {
- .icon-primary-form-resizeL {
- display: none; }
- .icon-primary-form-resize {
- display: none; }
- .heading-center-form {
- margin-left: 20px; } }
-
-@media (min-width: 480px) {
- .icon-primary-form-resizeL {
- display: none; }
- .icon-primary-form-resize {
- display: inherit; }
- .icon-primary-center-min {
- margin-top: 30px; } }
-
-@media (min-width: 768px) {
- .icon-primary-form-resizeL {
- display: inherit;
- margin-top: 30px; }
- .icon-primary-form-resize {
- display: none; }
- .center-form-align {
- margin-top: 35px; } }
-
-@media (min-width: 1024px) {
- .icon-primary-form-resizeL {
- display: inherit;
- margin-top: 0px; }
- .icon-primary-form-resize {
- display: none; }
- .center-form-align {
- margin-top: 5px; } }
-
-.data-row.has-button td.col-1 {
- padding: 0; }
-
-.tab-content > .tab-pane {
- display: none; }
-
-.tab-content > .active {
- display: block; }
-
-.icon-primary-circle:before {
- background-image: url("data:image/svg+xml,%3Csvg%20baseProfile%3D%22tiny%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%3Ccircle%20fill%3D%22transparent%22%20stroke%3D%22%23666%22%20stroke-miterlimit%3D%2210%22%20cx%3D%2218%22%20cy%3D%2218%22%20r%3D%2216%22%2F%3E%3C%2Fsvg%3E");
- content: "";
- position: absolute;
- top: 0;
- z-index: 1; }
-
-.b2b-drag-handle {
- cursor: move;
- -ms-interpolation-mode: bicubic;
- margin-bottom: 40px;
- height: 23px;
- padding-right: 10px;
- float: left; }
-
-.b2b-drag-over {
- background-color: #d1d1d1; }
-
-.b2-drag-element {
- background-color: #e8e8e8; }
-
-[draggable] {
- -moz-user-select: none;
- -khtml-user-select: none;
- -webkit-user-select: none;
- user-select: none; }
-/* Flyout inputs color is not aligned */
-textarea, input {
- color: #333; }
-
-.isIE .btn-primary.btn:focus::after,
-.isIE .btn-specialty.btn:focus::after,
-.isIE .btn-alt.btn:focus::after {
- border: 1px dashed #fff !important; }
-.b2b-config-section-container {
- height: auto;
- min-height: 330px;
- width: 815px;
- background-color: #fff;
- border: 1px solid #ccc;
- display: inline-table;
- border-radius: 6px; }
-
-.b2b-config-section-first-div {
- border-right: 1px solid #ccc;
- height: auto;
- min-height: 330px; }
-
-.b2b-config-section-icon-primary-font {
- font-size: 50px;
- height: 31px;
- line-height: 31px; }
-
-.b2b-config-section-padding {
- padding: 20px 20px 15px 15px;
- height: auto; }
-
-.b2b-config-sec-flyout {
- position: relative;
- left: 10px;
- float: right;
- color: #0574ac;
- font-size: 16px;
- font-family: "Omnes-ECOMP-W02", Arial; }
-
-.b2b-config-sec-divider {
- border-bottom: 1px solid #ccc; }
-
-.b2b-confi-sec-span-border {
- border-right: 1px solid;
- height: auto; }
-
-.b2b-config-sec-speed-div {
- text-align: center;
- margin-top: 20px; }
-
-.b2b-config-sec-label-font {
- font-size: 16px; }
-
-.b2b-config-sec-expander-main {
- padding: 0 5px 0px 15px; }
-
-.b2b-config-sec-expander-body .b2b-config-vlan-padding {
- padding: 5px 15px 10px 0px; }
-
-.b2b-conif-sec-row-height {
- height: 110px; }
-
-.b2b-config-sec-expander-body {
- font-size: 14px; }
- .b2b-config-sec-expander-body .b2b-config-vlan-data {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- padding-left: 15px; }
-
-.b2b-config-sec-expander-body-first-div {
- border-top: 1px solid #ccc; }
-
-.b2b-config-sec-expander-body .tooltip {
- position: static;
- opacity: 1; }
-
-.b2b-config-section-container .row > [class*="span"] {
- margin-right: 0px; }
-
-.b2b-config-vlan-icons {
- font-size: 16px;
- float: right;
- margin-right: 0px; }
-
-.b2b-config-section-container .span6 {
- width: 50%; }
-
-.b2b-config-sec-data-link-style {
- position: relative;
- left: 95%;
- top: 30px;
- border-radius: 50%;
- width: 23px;
- height: 23px;
- background: #fff;
- border: 1px solid #ccc;
- color: #666666; }
-
-.b2b-config-sec-text-align {
- text-align: center;
- margin-top: 15px;
- margin-bottom: 35px;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 14px;
- color: #333333; }
-
-.b2b-config-port-text-align {
- text-align: center;
- margin-top: 15px;
- margin-bottom: 8px;
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 14px;
- color: #333333; }
-
-.b2b-config-port-text-label {
- margin-top: 6px;
- margin-bottom: 8px;
- font-size: 14px;
- text-align: center; }
-
-.b2b-confi-sec-last-div p {
- font-size: 14px;
- padding: 10px 15px 0 15px; }
-
-.b2b-confi-sec-router-label {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 16px;
- color: #333333;
- float: left;
- width: 100%;
- margin-bottom: 7px; }
-
-.b2b-config-vlan-label {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 14px;
- color: #333333;
- margin-top: 1px;
- margin-bottom: 9px; }
-
-.b2b-config-vlan-info {
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 14px;
- color: #333333;
- margin-bottom: 1px; }
- .b2b-config-vlan-info .icon-misc-pen {
- padding-left: 7px; }
-
-.b2b-confi-sec-model-label {
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 14px;
- color: #333333; }
-
-.b2b-confi-sec-router-info {
- float: left;
- width: 62%; }
-
-.b2b-config-sec-speed-sec {
- border-right: 1px solid #ccc; }
-
-.b2b-config-sec-speed-label {
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 20px;
- color: #333333;
- text-align: center; }
- .b2b-config-sec-speed-label i {
- margin-left: 15px;
- font-size: 16px; }
-
-.b2b-config-sec-yellow-flag-div {
- width: 1.6%;
- background-color: #ffb18c; }
-
-.b2b-config-sec-expander-icons {
- margin-top: 6px; }
- .b2b-config-sec-expander-icons .icon-misc-trash {
- margin-right: 10px; }
-
-.b2b-config-sec-yellow-flag .b2b-config-sec-expander-icons {
- left: 40px; }
-
-.b2b-config-sec-expander-body-icons .icon-misc-pen {
- position: relative;
- left: 18px; }
-.b2b-directory-listing .center {
- display: block;
- margin: 2em auto; }
-
-.b2b-directory-listing .listBox {
- height: 310px;
- width: 450px;
- padding-left: 1px;
- padding-right: 1px;
- font-family: "Omnes-ECOMP-W02", Arial; }
-
-.b2b-directory-listing .listBox:focus {
- outline: thin dotted #666; }
-
-.b2b-directory-listing .b2b-directory-listing-no-results {
- font-weight: bold; }
-
-.b2b-directory-listing .b2b-directory-listing-list {
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #5a5a5a;
- overflow-x: hidden;
- position: relative;
- height: 300px;
- border: 1px solid #333;
- border-radius: 6px;
- margin-bottom: 10px; }
-
-.b2b-directory-listing .b2b-directory-listing-item {
- margin: 1px;
- border: 1px solid transparent;
- outline: none;
- text-align: left;
- overflow: hidden;
- cursor: pointer;
- padding-top: 13px;
- padding-bottom: 7px;
- padding-left: 15px;
- -moz-user-select: none;
- -webkit-user-select: none;
- -ms-user-select: none;
- word-wrap: break-word; }
- .b2b-directory-listing .b2b-directory-listing-item:focus {
- border: 1px #3399FF solid; }
-
-.b2b-directory-listing .b2b-directory-listing-item-selected {
- color: #fff;
- background-color: #3399FF; }
-
-.b2b-directory-listing input[type="text"] {
- padding-right: 30px; }
- .b2b-directory-listing input[type="text"]:focus, .b2b-directory-listing input[type="text"]:hover {
- padding-right: 30px; }
-
-.b2b-directory-listing .row .btns {
- margin-right: 90px;
- margin-left: -115px;
- margin-top: 100px; }
-
-.b2b-directory-listing .btn-remove {
- margin-right: auto !important;
- margin-bottom: 15px; }
- .b2b-directory-listing .btn-remove i {
- margin-right: 0;
- color: #fff;
- top: -1px; }
-
-.b2b-directory-listing .btn-remove-all {
- margin-top: 0;
- margin-bottom: 61px !important;
- /* need to be removed */
- margin-right: auto !important; }
- .b2b-directory-listing .btn-remove-all i {
- margin-right: 0;
- color: #fff;
- top: -1px; }
-
-.b2b-directory-listing .btn-add {
- margin-bottom: 15px !important; }
- .b2b-directory-listing .btn-add i {
- margin-right: 0;
- color: #fff;
- top: -1px; }
-
-.b2b-directory-listing .btn-add-all {
- margin-top: 0;
- margin-bottom: 61px !important; }
- .b2b-directory-listing .btn-add-all i {
- margin-right: 0;
- color: #fff;
- top: -1px; }
-
-.b2b-directory-listing .btn-search[class*="btn"] {
- right: 0.09rem; }
-
-.b2b-directory-listing .btn {
- width: 130px; }
-
-.b2b-directory-listing-disabled {
- cursor: not-allowed; }
-
-.b2b-directory-listing-label-heading {
- margin-top: 24px;
- padding-bottom: 5px; }
-
-.b2b-dl-list-box option {
- padding-top: 13px;
- padding-bottom: 7px;
- padding-left: 15px; }
-
-.b2b-dl-modal-button-div {
- padding-top: 110px;
- text-align: center; }
-.b2b-tmpl-notification-card {
- border-radius: 6px;
- height: auto;
- width: 420px;
- background-color: #ffffff;
- border: 1px solid rgba(0, 0, 0, 0.1);
- border-radius: 8px;
- overflow: hidden; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-header {
- padding-left: 30px;
- font-family: "Omnes-ECOMP-W02", Arial;
- color: #333333;
- font-size: 24px;
- margin-top: 2px;
- display: inline-block;
- min-height: 60px;
- position: relative; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-body {
- padding: 0 30px 20px;
- position: relative; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-header-title {
- margin-top: 10px; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button {
- box-shadow: 0 -50px 0 0 #f2f2f2 inset;
- height: 69px;
- position: absolute;
- border-color: #f2f2f2 #f2f2f2 transparent transparent;
- border-style: solid;
- border-width: 35px;
- height: 0;
- right: -295px;
- top: -4px;
- width: 69px;
- /*Old properties */
- box-shadow: none;
- transform: none; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close {
- height: 48px;
- right: -40px;
- top: -40px;
- width: 48px;
- position: relative;
- /*Old properties */
- transform: none; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close:before {
- color: #0568ae;
- display: block;
- font-size: 20px;
- height: auto;
- right: -4px;
- top: 4px;
- width: auto;
- /*Old properties */
- left: auto;
- height: auto;
- bottom: auto; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-corner-button .close:focus {
- outline: 1px dotted black; }
- .b2b-tmpl-notification-card button.close {
- -webkit-appearance: none;
- moz-appearance: none;
- appearance: none; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-icon-primary-cirlce {
- width: 30px;
- height: 30px;
- border-radius: 50%; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-outer-cirlce {
- background: #f0f5f5;
- border-radius: 50%;
- height: 16px;
- width: 16px;
- vertical-align: middle; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-inner-cirlce {
- background: #fff;
- width: 22px;
- height: 22px;
- position: relative;
- border-radius: 50%;
- display: block;
- left: 4px;
- top: 4px;
- border: 1px solid #767676; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-row {
- padding-top: 10px; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-sub-header {
- margin-top: 0px; }
- .b2b-tmpl-notification-card .b2b-tmpl-favourite-view-item {
- background-color: #fff;
- margin-top: 25px;
- border-top: 1px solid #ccc; }
- .b2b-tmpl-notification-card .b2b-tmpl-favourite-view-item .cta-button-group {
- line-height: 40px;
- padding-top: 20px; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-edit-section .cta-button-group {
- line-height: 40px;
- padding-top: 15px; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-add-item-container {
- padding-top: 30px; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-link-active {
- pointer-events: none;
- cursor: default;
- color: #ccc; }
- .b2b-tmpl-notification-card .b2b-tmpl-card-cursor:hover {
- cursor: pointer; }
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-icon {
- text-align: center;
- margin-top: 91px; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-icon i {
- font-size: 99px;
- color: #1b7e28; }
-
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-heading {
- color: #333333;
- text-align: center;
- margin-top: 20px; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-heading h1 {
- font-size: 38px; }
-
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-sub-heading {
- color: #333333;
- text-align: center; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-sub-heading h5 {
- font-size: 18px; }
-
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info {
- padding-left: 18%;
- font-size: 16px;
- margin-top: 20px; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info ul {
- list-style-type: disc;
- list-style-position: inside; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-info li {
- padding-top: 5px; }
-
-.b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section {
- font-size: 15px;
- color: #0574ac;
- margin-top: 20px;
- text-align: center;
- margin-bottom: 55px; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section .b2b-tmpl-order-confirmation-link {
- margin-right: 8%; }
- .b2b-tmpl-order-confirmation .b2b-tmpl-order-confirmation-link-section a {
- cursor: pointer; }
-.b2b-tmpl-profile-block-container {
- min-height: 200px;
- height: auto;
- background-color: #fff;
- border-radius: 8px;
- border: 1px solid #ccc;
- box-shadow: 0px 1px 1px 1px #ccc;
- display: inline-table;
- margin: 15px 15px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-title {
- font-weight: bold; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-footer {
- margin-bottom: 12px;
- margin-top: 5px;
- height: 35px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p {
- word-wrap: break-word;
- height: 61px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p:first-child {
- margin-top: 10px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p:after {
- content: ' ';
- display: block;
- border: 0.2px solid #ccc;
- margin-top: 12px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details .radio {
- margin-left: 15px;
- height: 30px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details div {
- padding: 2px 7px;
- font-size: 14px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details .radio-label, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details a {
- font-size: 14px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p label, .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-details p span {
- padding-left: 10px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-approval-icon {
- color: #1b7e28;
- float: right;
- position: relative;
- left: 10px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-approval-icon i {
- color: #1b7e28;
- float: right; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-link {
- float: right;
- position: relative;
- left: -4px; }
- .b2b-tmpl-profile-block-container a.link-profile {
- position: relative;
- left: -5px;
- float: right;
- margin-bottom: 16px; }
- .b2b-tmpl-profile-block-container .b2b-tmpl-profile-block-radio {
- position: relative;
- top: -5px; }
-.b2b-static-route-container {
- padding-left: 32px;
- display: inline-block; }
-
-.b2b-static-route-label-heading {
- font-family: "Omnes-ECOMP-W02-Medium", Arial;
- font-size: 16px !important;
- color: #333333;
- font-style: normal;
- text-align: left; }
-
-label.b2b-static-route-label-heading {
- margin-bottom: 12px;
- margin-top: 15px;
- display: block; }
-
-#b2b-static-route-input {
- margin: 5px 0 5px; }
-
-.b2b-static-route-list {
- margin-bottom: 30px;
- width: 216px;
- float: left;
- margin-right: 20px;
- max-height: 540px;
- overflow-y: auto; }
- .b2b-static-route-list .status-text {
- flex: 1;
- display: flex;
- align-items: center;
- outline: 0; }
-
-.b2b-static-route-list-item {
- border: 1px #cccccc solid;
- font-family: "Omnes-ECOMP-W02", Arial;
- font-size: 14px;
- display: flex;
- cursor: pointer; }
- .b2b-static-route-list-item > .status-bar {
- padding: 20px 0 20px;
- background-color: #ea7400;
- border-radius: 0;
- width: 10px;
- display: inline-block;
- margin-right: 20px;
- height: 100%;
- float: left; }
- .b2b-static-route-list-item > .status-bar:after {
- content: '.';
- visibility: hidden; }
- .b2b-static-route-list-item > .status-bar-unedited {
- padding: 20px 0 20px;
- background-color: #ffb81c;
- border-radius: 0;
- width: 10px;
- display: inline-block;
- margin-right: 20px;
- height: 100%;
- float: left;
- background-color: transparent; }
- .b2b-static-route-list-item > .status-bar-unedited:after {
- content: '.';
- visibility: hidden; }
-
-.b2b-static-route-list-item:focus {
- outline: 1px dashed #00f; }
-
-.b2b-static-route-list-item--selected {
- background: #f2f2f2; }
-
-.b2b-static-route-content {
- display: inline-block; }
-
- .selectWrap::after {
- align-items: center;
- background-position: 7px 7px;
- background-repeat: no-repeat;
- background-size: auto 23px;
- border-left: 1px solid transparent;
- color: #0568ae;
- display: flex;
- font-size: 23px;
- height: 36px;
- margin-right: 0;
- overflow: hidden;
- position: absolute;
- right: 0;
- text-indent: 7px;
- top: 0;
- user-select: none;
- width: 41px;
- z-index: 0;
- position: absolute !important;
- display: flex !important;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/horse_shoe.jpg b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/horse_shoe.jpg
deleted file mode 100644
index a53eb4ea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/horse_shoe.jpg
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/icon-flyout.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/icon-flyout.png
deleted file mode 100644
index 88e10332..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/icon-flyout.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/treebg.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/treebg.png
deleted file mode 100644
index 32ed1b7c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/treebg.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/widget-thumbnail.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/widget-thumbnail.png
deleted file mode 100644
index 5fbf93c2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/css/b2b-angular/style/images/widget-thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/horse_shoe.jpg b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/horse_shoe.jpg
deleted file mode 100644
index a53eb4ea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/horse_shoe.jpg
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/icon-flyout.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/icon-flyout.png
deleted file mode 100644
index 88e10332..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/icon-flyout.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/treebg.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/treebg.png
deleted file mode 100644
index 32ed1b7c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/treebg.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/widget-thumbnail.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/widget-thumbnail.png
deleted file mode 100644
index 5fbf93c2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/style/images/widget-thumbnail.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/styles/images/icon-flyout.png b/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/styles/images/icon-flyout.png
deleted file mode 100644
index 88e10332..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/b2b/js/b2b-angular/styles/images/icon-flyout.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css
deleted file mode 100644
index 31d88826..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css
+++ /dev/null
@@ -1,587 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-.btn-default,
-.btn-primary,
-.btn-success,
-.btn-info,
-.btn-warning,
-.btn-danger {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .2);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 1px rgba(0, 0, 0, .075);
-}
-.btn-default:active,
-.btn-primary:active,
-.btn-success:active,
-.btn-info:active,
-.btn-warning:active,
-.btn-danger:active,
-.btn-default.active,
-.btn-primary.active,
-.btn-success.active,
-.btn-info.active,
-.btn-warning.active,
-.btn-danger.active {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn-default.disabled,
-.btn-primary.disabled,
-.btn-success.disabled,
-.btn-info.disabled,
-.btn-warning.disabled,
-.btn-danger.disabled,
-.btn-default[disabled],
-.btn-primary[disabled],
-.btn-success[disabled],
-.btn-info[disabled],
-.btn-warning[disabled],
-.btn-danger[disabled],
-fieldset[disabled] .btn-default,
-fieldset[disabled] .btn-primary,
-fieldset[disabled] .btn-success,
-fieldset[disabled] .btn-info,
-fieldset[disabled] .btn-warning,
-fieldset[disabled] .btn-danger {
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn-default .badge,
-.btn-primary .badge,
-.btn-success .badge,
-.btn-info .badge,
-.btn-warning .badge,
-.btn-danger .badge {
- text-shadow: none;
-}
-.btn:active,
-.btn.active {
- background-image: none;
-}
-.btn-default {
- text-shadow: 0 1px 0 #fff;
- background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);
- background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#e0e0e0));
- background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #dbdbdb;
- border-color: #ccc;
-}
-.btn-default:hover,
-.btn-default:focus {
- background-color: #e0e0e0;
- background-position: 0 -15px;
-}
-.btn-default:active,
-.btn-default.active {
- background-color: #e0e0e0;
- border-color: #dbdbdb;
-}
-.btn-default.disabled,
-.btn-default[disabled],
-fieldset[disabled] .btn-default,
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus,
-.btn-default.disabled:active,
-.btn-default[disabled]:active,
-fieldset[disabled] .btn-default:active,
-.btn-default.disabled.active,
-.btn-default[disabled].active,
-fieldset[disabled] .btn-default.active {
- background-color: #e0e0e0;
- background-image: none;
-}
-.btn-primary {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#265a88));
- background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #245580;
-}
-.btn-primary:hover,
-.btn-primary:focus {
- background-color: #265a88;
- background-position: 0 -15px;
-}
-.btn-primary:active,
-.btn-primary.active {
- background-color: #265a88;
- border-color: #245580;
-}
-.btn-primary.disabled,
-.btn-primary[disabled],
-fieldset[disabled] .btn-primary,
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus,
-.btn-primary.disabled:active,
-.btn-primary[disabled]:active,
-fieldset[disabled] .btn-primary:active,
-.btn-primary.disabled.active,
-.btn-primary[disabled].active,
-fieldset[disabled] .btn-primary.active {
- background-color: #265a88;
- background-image: none;
-}
-.btn-success {
- background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);
- background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#419641));
- background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #3e8f3e;
-}
-.btn-success:hover,
-.btn-success:focus {
- background-color: #419641;
- background-position: 0 -15px;
-}
-.btn-success:active,
-.btn-success.active {
- background-color: #419641;
- border-color: #3e8f3e;
-}
-.btn-success.disabled,
-.btn-success[disabled],
-fieldset[disabled] .btn-success,
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus,
-.btn-success.disabled:active,
-.btn-success[disabled]:active,
-fieldset[disabled] .btn-success:active,
-.btn-success.disabled.active,
-.btn-success[disabled].active,
-fieldset[disabled] .btn-success.active {
- background-color: #419641;
- background-image: none;
-}
-.btn-info {
- background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
- background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#2aabd2));
- background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #28a4c9;
-}
-.btn-info:hover,
-.btn-info:focus {
- background-color: #2aabd2;
- background-position: 0 -15px;
-}
-.btn-info:active,
-.btn-info.active {
- background-color: #2aabd2;
- border-color: #28a4c9;
-}
-.btn-info.disabled,
-.btn-info[disabled],
-fieldset[disabled] .btn-info,
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus,
-.btn-info.disabled:active,
-.btn-info[disabled]:active,
-fieldset[disabled] .btn-info:active,
-.btn-info.disabled.active,
-.btn-info[disabled].active,
-fieldset[disabled] .btn-info.active {
- background-color: #2aabd2;
- background-image: none;
-}
-.btn-warning {
- background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
- background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#eb9316));
- background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #e38d13;
-}
-.btn-warning:hover,
-.btn-warning:focus {
- background-color: #eb9316;
- background-position: 0 -15px;
-}
-.btn-warning:active,
-.btn-warning.active {
- background-color: #eb9316;
- border-color: #e38d13;
-}
-.btn-warning.disabled,
-.btn-warning[disabled],
-fieldset[disabled] .btn-warning,
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus,
-.btn-warning.disabled:active,
-.btn-warning[disabled]:active,
-fieldset[disabled] .btn-warning:active,
-.btn-warning.disabled.active,
-.btn-warning[disabled].active,
-fieldset[disabled] .btn-warning.active {
- background-color: #eb9316;
- background-image: none;
-}
-.btn-danger {
- background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
- background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c12e2a));
- background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-color: #b92c28;
-}
-.btn-danger:hover,
-.btn-danger:focus {
- background-color: #c12e2a;
- background-position: 0 -15px;
-}
-.btn-danger:active,
-.btn-danger.active {
- background-color: #c12e2a;
- border-color: #b92c28;
-}
-.btn-danger.disabled,
-.btn-danger[disabled],
-fieldset[disabled] .btn-danger,
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus,
-.btn-danger.disabled:active,
-.btn-danger[disabled]:active,
-fieldset[disabled] .btn-danger:active,
-.btn-danger.disabled.active,
-.btn-danger[disabled].active,
-fieldset[disabled] .btn-danger.active {
- background-color: #c12e2a;
- background-image: none;
-}
-.thumbnail,
-.img-thumbnail {
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- background-color: #e8e8e8;
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
- background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
- background-repeat: repeat-x;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- background-color: #2e6da4;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
-}
-.navbar-default {
- background-image: -webkit-linear-gradient(top, #fff 0%, #f8f8f8 100%);
- background-image: -o-linear-gradient(top, #fff 0%, #f8f8f8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f8f8f8));
- background-image: linear-gradient(to bottom, #fff 0%, #f8f8f8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 1px 5px rgba(0, 0, 0, .075);
-}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .active > a {
- background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
- background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dbdbdb), to(#e2e2e2));
- background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);
- background-repeat: repeat-x;
- -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
- box-shadow: inset 0 3px 9px rgba(0, 0, 0, .075);
-}
-.navbar-brand,
-.navbar-nav > li > a {
- text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
-}
-.navbar-inverse {
- background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);
- background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#3c3c3c), to(#222));
- background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- background-repeat: repeat-x;
- border-radius: 4px;
-}
-.navbar-inverse .navbar-nav > .open > a,
-.navbar-inverse .navbar-nav > .active > a {
- background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);
- background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#080808), to(#0f0f0f));
- background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);
- background-repeat: repeat-x;
- -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
- box-shadow: inset 0 3px 9px rgba(0, 0, 0, .25);
-}
-.navbar-inverse .navbar-brand,
-.navbar-inverse .navbar-nav > li > a {
- text-shadow: 0 -1px 0 rgba(0, 0, 0, .25);
-}
-.navbar-static-top,
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- border-radius: 0;
-}
-@media (max-width: 767px) {
- .navbar .navbar-nav .open .dropdown-menu > .active > a,
- .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #fff;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
- }
-}
-.alert {
- text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
-}
-.alert-success {
- background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
- background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#c8e5bc));
- background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);
- background-repeat: repeat-x;
- border-color: #b2dba1;
-}
-.alert-info {
- background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
- background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#b9def0));
- background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);
- background-repeat: repeat-x;
- border-color: #9acfea;
-}
-.alert-warning {
- background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
- background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#f8efc0));
- background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);
- background-repeat: repeat-x;
- border-color: #f5e79e;
-}
-.alert-danger {
- background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
- background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#e7c3c3));
- background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);
- background-repeat: repeat-x;
- border-color: #dca7a7;
-}
-.progress {
- background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
- background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#ebebeb), to(#f5f5f5));
- background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#286090));
- background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-success {
- background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);
- background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5cb85c), to(#449d44));
- background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-info {
- background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
- background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#5bc0de), to(#31b0d5));
- background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-warning {
- background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
- background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f0ad4e), to(#ec971f));
- background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-danger {
- background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);
- background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9534f), to(#c9302c));
- background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);
- background-repeat: repeat-x;
-}
-.progress-bar-striped {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.list-group {
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .075);
-}
-.list-group-item.active,
-.list-group-item.active:hover,
-.list-group-item.active:focus {
- text-shadow: 0 -1px 0 #286090;
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2b669a));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);
- background-repeat: repeat-x;
- border-color: #2b669a;
-}
-.list-group-item.active .badge,
-.list-group-item.active:hover .badge,
-.list-group-item.active:focus .badge {
- text-shadow: none;
-}
-.panel {
- -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
- box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
-}
-.panel-default > .panel-heading {
- background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f5f5f5), to(#e8e8e8));
- background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-primary > .panel-heading {
- background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#337ab7), to(#2e6da4));
- background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-success > .panel-heading {
- background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
- background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#dff0d8), to(#d0e9c6));
- background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-info > .panel-heading {
- background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
- background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#d9edf7), to(#c4e3f3));
- background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-warning > .panel-heading {
- background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
- background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#fcf8e3), to(#faf2cc));
- background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);
- background-repeat: repeat-x;
-}
-.panel-danger > .panel-heading {
- background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
- background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#f2dede), to(#ebcccc));
- background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);
- background-repeat: repeat-x;
-}
-.well {
- background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
- background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);
- background-image: -webkit-gradient(linear, left top, left bottom, from(#e8e8e8), to(#f5f5f5));
- background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);
- background-repeat: repeat-x;
- border-color: #dcdcdc;
- -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
-}
-/*# sourceMappingURL=bootstrap-theme.css.map */
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css.map b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css.map
deleted file mode 100644
index d876f60f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["bootstrap-theme.css","less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"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","file":"bootstrap-theme.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.btn-default:active,\n.btn-primary:active,\n.btn-success:active,\n.btn-info:active,\n.btn-warning:active,\n.btn-danger:active,\n.btn-default.active,\n.btn-primary.active,\n.btn-success.active,\n.btn-info.active,\n.btn-warning.active,\n.btn-danger.active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-default.disabled,\n.btn-primary.disabled,\n.btn-success.disabled,\n.btn-info.disabled,\n.btn-warning.disabled,\n.btn-danger.disabled,\n.btn-default[disabled],\n.btn-primary[disabled],\n.btn-success[disabled],\n.btn-info[disabled],\n.btn-warning[disabled],\n.btn-danger[disabled],\nfieldset[disabled] .btn-default,\nfieldset[disabled] .btn-primary,\nfieldset[disabled] .btn-success,\nfieldset[disabled] .btn-info,\nfieldset[disabled] .btn-warning,\nfieldset[disabled] .btn-danger {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-default .badge,\n.btn-primary .badge,\n.btn-success .badge,\n.btn-info .badge,\n.btn-warning .badge,\n.btn-danger .badge {\n text-shadow: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n}\n.btn-default {\n background-image: -webkit-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: -o-linear-gradient(top, #fff 0%, #e0e0e0 100%);\n background-image: linear-gradient(to bottom, #fff 0%, #e0e0e0 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #dbdbdb;\n text-shadow: 0 1px 0 #fff;\n border-color: #ccc;\n}\n.btn-default:hover,\n.btn-default:focus {\n background-color: #e0e0e0;\n background-position: 0 -15px;\n}\n.btn-default:active,\n.btn-default.active {\n background-color: #e0e0e0;\n border-color: #dbdbdb;\n}\n.btn-default.disabled,\n.btn-default[disabled],\nfieldset[disabled] .btn-default,\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus,\n.btn-default.disabled:active,\n.btn-default[disabled]:active,\nfieldset[disabled] .btn-default:active,\n.btn-default.disabled.active,\n.btn-default[disabled].active,\nfieldset[disabled] .btn-default.active {\n background-color: #e0e0e0;\n background-image: none;\n}\n.btn-primary {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #265a88 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #265a88 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #245580;\n}\n.btn-primary:hover,\n.btn-primary:focus {\n background-color: #265a88;\n background-position: 0 -15px;\n}\n.btn-primary:active,\n.btn-primary.active {\n background-color: #265a88;\n border-color: #245580;\n}\n.btn-primary.disabled,\n.btn-primary[disabled],\nfieldset[disabled] .btn-primary,\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus,\n.btn-primary.disabled:active,\n.btn-primary[disabled]:active,\nfieldset[disabled] .btn-primary:active,\n.btn-primary.disabled.active,\n.btn-primary[disabled].active,\nfieldset[disabled] .btn-primary.active {\n background-color: #265a88;\n background-image: none;\n}\n.btn-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #419641 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #419641 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #3e8f3e;\n}\n.btn-success:hover,\n.btn-success:focus {\n background-color: #419641;\n background-position: 0 -15px;\n}\n.btn-success:active,\n.btn-success.active {\n background-color: #419641;\n border-color: #3e8f3e;\n}\n.btn-success.disabled,\n.btn-success[disabled],\nfieldset[disabled] .btn-success,\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus,\n.btn-success.disabled:active,\n.btn-success[disabled]:active,\nfieldset[disabled] .btn-success:active,\n.btn-success.disabled.active,\n.btn-success[disabled].active,\nfieldset[disabled] .btn-success.active {\n background-color: #419641;\n background-image: none;\n}\n.btn-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #2aabd2 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #2aabd2 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #28a4c9;\n}\n.btn-info:hover,\n.btn-info:focus {\n background-color: #2aabd2;\n background-position: 0 -15px;\n}\n.btn-info:active,\n.btn-info.active {\n background-color: #2aabd2;\n border-color: #28a4c9;\n}\n.btn-info.disabled,\n.btn-info[disabled],\nfieldset[disabled] .btn-info,\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus,\n.btn-info.disabled:active,\n.btn-info[disabled]:active,\nfieldset[disabled] .btn-info:active,\n.btn-info.disabled.active,\n.btn-info[disabled].active,\nfieldset[disabled] .btn-info.active {\n background-color: #2aabd2;\n background-image: none;\n}\n.btn-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #eb9316 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #eb9316 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #e38d13;\n}\n.btn-warning:hover,\n.btn-warning:focus {\n background-color: #eb9316;\n background-position: 0 -15px;\n}\n.btn-warning:active,\n.btn-warning.active {\n background-color: #eb9316;\n border-color: #e38d13;\n}\n.btn-warning.disabled,\n.btn-warning[disabled],\nfieldset[disabled] .btn-warning,\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus,\n.btn-warning.disabled:active,\n.btn-warning[disabled]:active,\nfieldset[disabled] .btn-warning:active,\n.btn-warning.disabled.active,\n.btn-warning[disabled].active,\nfieldset[disabled] .btn-warning.active {\n background-color: #eb9316;\n background-image: none;\n}\n.btn-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c12e2a 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c12e2a 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n background-repeat: repeat-x;\n border-color: #b92c28;\n}\n.btn-danger:hover,\n.btn-danger:focus {\n background-color: #c12e2a;\n background-position: 0 -15px;\n}\n.btn-danger:active,\n.btn-danger.active {\n background-color: #c12e2a;\n border-color: #b92c28;\n}\n.btn-danger.disabled,\n.btn-danger[disabled],\nfieldset[disabled] .btn-danger,\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus,\n.btn-danger.disabled:active,\n.btn-danger[disabled]:active,\nfieldset[disabled] .btn-danger:active,\n.btn-danger.disabled.active,\n.btn-danger[disabled].active,\nfieldset[disabled] .btn-danger.active {\n background-color: #c12e2a;\n background-image: none;\n}\n.thumbnail,\n.img-thumbnail {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n background-color: #e8e8e8;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n background-color: #2e6da4;\n}\n.navbar-default {\n background-image: -webkit-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: -o-linear-gradient(top, #ffffff 0%, #f8f8f8 100%);\n background-image: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 5px rgba(0, 0, 0, 0.075);\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: -o-linear-gradient(top, #dbdbdb 0%, #e2e2e2 100%);\n background-image: linear-gradient(to bottom, #dbdbdb 0%, #e2e2e2 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.075);\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n.navbar-inverse {\n background-image: -webkit-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: -o-linear-gradient(top, #3c3c3c 0%, #222 100%);\n background-image: linear-gradient(to bottom, #3c3c3c 0%, #222 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n border-radius: 4px;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .active > a {\n background-image: -webkit-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: -o-linear-gradient(top, #080808 0%, #0f0f0f 100%);\n background-image: linear-gradient(to bottom, #080808 0%, #0f0f0f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);\n -webkit-box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.25);\n}\n.navbar-inverse .navbar-brand,\n.navbar-inverse .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n@media (max-width: 767px) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n }\n}\n.alert {\n text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.alert-success {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #c8e5bc 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #c8e5bc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);\n border-color: #b2dba1;\n}\n.alert-info {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #b9def0 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #b9def0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);\n border-color: #9acfea;\n}\n.alert-warning {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #f8efc0 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #f8efc0 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);\n border-color: #f5e79e;\n}\n.alert-danger {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #e7c3c3 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #e7c3c3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);\n border-color: #dca7a7;\n}\n.progress {\n background-image: -webkit-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #ebebeb 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #ebebeb 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);\n}\n.progress-bar {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #286090 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #286090 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);\n}\n.progress-bar-success {\n background-image: -webkit-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: -o-linear-gradient(top, #5cb85c 0%, #449d44 100%);\n background-image: linear-gradient(to bottom, #5cb85c 0%, #449d44 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);\n}\n.progress-bar-info {\n background-image: -webkit-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: -o-linear-gradient(top, #5bc0de 0%, #31b0d5 100%);\n background-image: linear-gradient(to bottom, #5bc0de 0%, #31b0d5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);\n}\n.progress-bar-warning {\n background-image: -webkit-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: -o-linear-gradient(top, #f0ad4e 0%, #ec971f 100%);\n background-image: linear-gradient(to bottom, #f0ad4e 0%, #ec971f 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);\n}\n.progress-bar-danger {\n background-image: -webkit-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: -o-linear-gradient(top, #d9534f 0%, #c9302c 100%);\n background-image: linear-gradient(to bottom, #d9534f 0%, #c9302c 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);\n}\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.list-group {\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075);\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 #286090;\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2b669a 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2b669a 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);\n border-color: #2b669a;\n}\n.list-group-item.active .badge,\n.list-group-item.active:hover .badge,\n.list-group-item.active:focus .badge {\n text-shadow: none;\n}\n.panel {\n -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.panel-default > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #e8e8e8 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);\n}\n.panel-primary > .panel-heading {\n background-image: -webkit-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: -o-linear-gradient(top, #337ab7 0%, #2e6da4 100%);\n background-image: linear-gradient(to bottom, #337ab7 0%, #2e6da4 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);\n}\n.panel-success > .panel-heading {\n background-image: -webkit-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: -o-linear-gradient(top, #dff0d8 0%, #d0e9c6 100%);\n background-image: linear-gradient(to bottom, #dff0d8 0%, #d0e9c6 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);\n}\n.panel-info > .panel-heading {\n background-image: -webkit-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: -o-linear-gradient(top, #d9edf7 0%, #c4e3f3 100%);\n background-image: linear-gradient(to bottom, #d9edf7 0%, #c4e3f3 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);\n}\n.panel-warning > .panel-heading {\n background-image: -webkit-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: -o-linear-gradient(top, #fcf8e3 0%, #faf2cc 100%);\n background-image: linear-gradient(to bottom, #fcf8e3 0%, #faf2cc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);\n}\n.panel-danger > .panel-heading {\n background-image: -webkit-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: -o-linear-gradient(top, #f2dede 0%, #ebcccc 100%);\n background-image: linear-gradient(to bottom, #f2dede 0%, #ebcccc 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);\n}\n.well {\n background-image: -webkit-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #e8e8e8 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #e8e8e8 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);\n border-color: #dcdcdc;\n -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 0 rgba(255, 255, 255, 0.1);\n}\n/*# sourceMappingURL=bootstrap-theme.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css
deleted file mode 100644
index 5e394019..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger.disabled,.btn-danger[disabled],.btn-default.disabled,.btn-default[disabled],.btn-info.disabled,.btn-info[disabled],.btn-primary.disabled,.btn-primary[disabled],.btn-success.disabled,.btn-success[disabled],.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-danger,fieldset[disabled] .btn-default,fieldset[disabled] .btn-info,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-success,fieldset[disabled] .btn-warning{-webkit-box-shadow:none;box-shadow:none}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default.disabled.active,.btn-default.disabled.focus,.btn-default.disabled:active,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled],.btn-default[disabled].active,.btn-default[disabled].focus,.btn-default[disabled]:active,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default.active,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary.disabled.active,.btn-primary.disabled.focus,.btn-primary.disabled:active,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled],.btn-primary[disabled].active,.btn-primary[disabled].focus,.btn-primary[disabled]:active,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary,fieldset[disabled] .btn-primary.active,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:active,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success.disabled.active,.btn-success.disabled.focus,.btn-success.disabled:active,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled],.btn-success[disabled].active,.btn-success[disabled].focus,.btn-success[disabled]:active,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success,fieldset[disabled] .btn-success.active,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:active,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info.disabled.active,.btn-info.disabled.focus,.btn-info.disabled:active,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled],.btn-info[disabled].active,.btn-info[disabled].focus,.btn-info[disabled]:active,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info,fieldset[disabled] .btn-info.active,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:active,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning.disabled.active,.btn-warning.disabled.focus,.btn-warning.disabled:active,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled],.btn-warning[disabled].active,.btn-warning[disabled].focus,.btn-warning[disabled]:active,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning,fieldset[disabled] .btn-warning.active,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:active,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger.disabled.active,.btn-danger.disabled.focus,.btn-danger.disabled:active,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled],.btn-danger[disabled].active,.btn-danger[disabled].focus,.btn-danger[disabled]:active,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger,fieldset[disabled] .btn-danger.active,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:active,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)}
-/*# sourceMappingURL=bootstrap-theme.min.css.map */ \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css.map b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css.map
deleted file mode 100644
index 94813e90..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap-theme.min.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["less/theme.less","less/mixins/vendor-prefixes.less","less/mixins/gradients.less","less/mixins/reset-filter.less"],"names":[],"mappings":"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","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\n//\n// Load core variables and mixins\n// --------------------------------------------------\n\n@import \"variables.less\";\n@import \"mixins.less\";\n\n\n//\n// Buttons\n// --------------------------------------------------\n\n// Common styles\n.btn-default,\n.btn-primary,\n.btn-success,\n.btn-info,\n.btn-warning,\n.btn-danger {\n text-shadow: 0 -1px 0 rgba(0,0,0,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 1px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n // Reset the shadow\n &:active,\n &.active {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n .box-shadow(none);\n }\n\n .badge {\n text-shadow: none;\n }\n}\n\n// Mixin for generating new styles\n.btn-styles(@btn-color: #555) {\n #gradient > .vertical(@start-color: @btn-color; @end-color: darken(@btn-color, 12%));\n .reset-filter(); // Disable gradients for IE9 because filter bleeds through rounded corners; see https://github.com/twbs/bootstrap/issues/10620\n background-repeat: repeat-x;\n border-color: darken(@btn-color, 14%);\n\n &:hover,\n &:focus {\n background-color: darken(@btn-color, 12%);\n background-position: 0 -15px;\n }\n\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n border-color: darken(@btn-color, 14%);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &,\n &:hover,\n &:focus,\n &.focus,\n &:active,\n &.active {\n background-color: darken(@btn-color, 12%);\n background-image: none;\n }\n }\n}\n\n// Common styles\n.btn {\n // Remove the gradient for the pressed/active state\n &:active,\n &.active {\n background-image: none;\n }\n}\n\n// Apply the mixin to the buttons\n.btn-default { .btn-styles(@btn-default-bg); text-shadow: 0 1px 0 #fff; border-color: #ccc; }\n.btn-primary { .btn-styles(@btn-primary-bg); }\n.btn-success { .btn-styles(@btn-success-bg); }\n.btn-info { .btn-styles(@btn-info-bg); }\n.btn-warning { .btn-styles(@btn-warning-bg); }\n.btn-danger { .btn-styles(@btn-danger-bg); }\n\n\n//\n// Images\n// --------------------------------------------------\n\n.thumbnail,\n.img-thumbnail {\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n\n\n//\n// Dropdowns\n// --------------------------------------------------\n\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-hover-bg; @end-color: darken(@dropdown-link-hover-bg, 5%));\n background-color: darken(@dropdown-link-hover-bg, 5%);\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n background-color: darken(@dropdown-link-active-bg, 5%);\n}\n\n\n//\n// Navbar\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n #gradient > .vertical(@start-color: lighten(@navbar-default-bg, 10%); @end-color: @navbar-default-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered\n border-radius: @navbar-border-radius;\n @shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 1px 5px rgba(0,0,0,.075);\n .box-shadow(@shadow);\n\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: darken(@navbar-default-link-active-bg, 5%); @end-color: darken(@navbar-default-link-active-bg, 2%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.075));\n }\n}\n.navbar-brand,\n.navbar-nav > li > a {\n text-shadow: 0 1px 0 rgba(255,255,255,.25);\n}\n\n// Inverted navbar\n.navbar-inverse {\n #gradient > .vertical(@start-color: lighten(@navbar-inverse-bg, 10%); @end-color: @navbar-inverse-bg);\n .reset-filter(); // Remove gradient in IE<10 to fix bug where dropdowns don't get triggered; see https://github.com/twbs/bootstrap/issues/10257\n border-radius: @navbar-border-radius;\n .navbar-nav > .open > a,\n .navbar-nav > .active > a {\n #gradient > .vertical(@start-color: @navbar-inverse-link-active-bg; @end-color: lighten(@navbar-inverse-link-active-bg, 2.5%));\n .box-shadow(inset 0 3px 9px rgba(0,0,0,.25));\n }\n\n .navbar-brand,\n .navbar-nav > li > a {\n text-shadow: 0 -1px 0 rgba(0,0,0,.25);\n }\n}\n\n// Undo rounded corners in static and fixed navbars\n.navbar-static-top,\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n border-radius: 0;\n}\n\n// Fix active state of dropdown items in collapsed mode\n@media (max-width: @grid-float-breakpoint-max) {\n .navbar .navbar-nav .open .dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: #fff;\n #gradient > .vertical(@start-color: @dropdown-link-active-bg; @end-color: darken(@dropdown-link-active-bg, 5%));\n }\n }\n}\n\n\n//\n// Alerts\n// --------------------------------------------------\n\n// Common styles\n.alert {\n text-shadow: 0 1px 0 rgba(255,255,255,.2);\n @shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 1px 2px rgba(0,0,0,.05);\n .box-shadow(@shadow);\n}\n\n// Mixin for generating new styles\n.alert-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 7.5%));\n border-color: darken(@color, 15%);\n}\n\n// Apply the mixin to the alerts\n.alert-success { .alert-styles(@alert-success-bg); }\n.alert-info { .alert-styles(@alert-info-bg); }\n.alert-warning { .alert-styles(@alert-warning-bg); }\n.alert-danger { .alert-styles(@alert-danger-bg); }\n\n\n//\n// Progress bars\n// --------------------------------------------------\n\n// Give the progress background some depth\n.progress {\n #gradient > .vertical(@start-color: darken(@progress-bg, 4%); @end-color: @progress-bg)\n}\n\n// Mixin for generating new styles\n.progress-bar-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 10%));\n}\n\n// Apply the mixin to the progress bars\n.progress-bar { .progress-bar-styles(@progress-bar-bg); }\n.progress-bar-success { .progress-bar-styles(@progress-bar-success-bg); }\n.progress-bar-info { .progress-bar-styles(@progress-bar-info-bg); }\n.progress-bar-warning { .progress-bar-styles(@progress-bar-warning-bg); }\n.progress-bar-danger { .progress-bar-styles(@progress-bar-danger-bg); }\n\n// Reset the striped class because our mixins don't do multiple gradients and\n// the above custom styles override the new `.progress-bar-striped` in v3.2.0.\n.progress-bar-striped {\n #gradient > .striped();\n}\n\n\n//\n// List groups\n// --------------------------------------------------\n\n.list-group {\n border-radius: @border-radius-base;\n .box-shadow(0 1px 2px rgba(0,0,0,.075));\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n text-shadow: 0 -1px 0 darken(@list-group-active-bg, 10%);\n #gradient > .vertical(@start-color: @list-group-active-bg; @end-color: darken(@list-group-active-bg, 7.5%));\n border-color: darken(@list-group-active-border, 7.5%);\n\n .badge {\n text-shadow: none;\n }\n}\n\n\n//\n// Panels\n// --------------------------------------------------\n\n// Common styles\n.panel {\n .box-shadow(0 1px 2px rgba(0,0,0,.05));\n}\n\n// Mixin for generating new styles\n.panel-heading-styles(@color) {\n #gradient > .vertical(@start-color: @color; @end-color: darken(@color, 5%));\n}\n\n// Apply the mixin to the panel headings only\n.panel-default > .panel-heading { .panel-heading-styles(@panel-default-heading-bg); }\n.panel-primary > .panel-heading { .panel-heading-styles(@panel-primary-heading-bg); }\n.panel-success > .panel-heading { .panel-heading-styles(@panel-success-heading-bg); }\n.panel-info > .panel-heading { .panel-heading-styles(@panel-info-heading-bg); }\n.panel-warning > .panel-heading { .panel-heading-styles(@panel-warning-heading-bg); }\n.panel-danger > .panel-heading { .panel-heading-styles(@panel-danger-heading-bg); }\n\n\n//\n// Wells\n// --------------------------------------------------\n\n.well {\n #gradient > .vertical(@start-color: darken(@well-bg, 5%); @end-color: @well-bg);\n border-color: darken(@well-bg, 10%);\n @shadow: inset 0 1px 3px rgba(0,0,0,.05), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n"]} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css
deleted file mode 100644
index 6167622c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css
+++ /dev/null
@@ -1,6757 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
-html {
- font-family: sans-serif;
- -webkit-text-size-adjust: 100%;
- -ms-text-size-adjust: 100%;
-}
-body {
- margin: 0;
-}
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-menu,
-nav,
-section,
-summary {
- display: block;
-}
-audio,
-canvas,
-progress,
-video {
- display: inline-block;
- vertical-align: baseline;
-}
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-[hidden],
-template {
- display: none;
-}
-a {
- background-color: transparent;
-}
-a:active,
-a:hover {
- outline: 0;
-}
-abbr[title] {
- border-bottom: 1px dotted;
-}
-b,
-strong {
- font-weight: bold;
-}
-dfn {
- font-style: italic;
-}
-h1 {
- margin: .67em 0;
- font-size: 2em;
-}
-mark {
- color: #000;
- background: #ff0;
-}
-small {
- font-size: 80%;
-}
-sub,
-sup {
- position: relative;
- font-size: 75%;
- line-height: 0;
- vertical-align: baseline;
-}
-sup {
- top: -.5em;
-}
-sub {
- bottom: -.25em;
-}
-img {
- border: 0;
-}
-svg:not(:root) {
- overflow: hidden;
-}
-figure {
- margin: 1em 40px;
-}
-hr {
- height: 0;
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-}
-pre {
- overflow: auto;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, monospace;
- font-size: 1em;
-}
-button,
-input,
-optgroup,
-select,
-textarea {
- margin: 0;
- font: inherit;
- color: inherit;
-}
-button {
- overflow: visible;
-}
-button,
-select {
- text-transform: none;
-}
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button;
- cursor: pointer;
-}
-button[disabled],
-html input[disabled] {
- cursor: default;
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- padding: 0;
- border: 0;
-}
-input {
- line-height: normal;
-}
-input[type="checkbox"],
-input[type="radio"] {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- padding: 0;
-}
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
- height: auto;
-}
-input[type="search"] {
- -webkit-box-sizing: content-box;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
- -webkit-appearance: textfield;
-}
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-fieldset {
- padding: .35em .625em .75em;
- margin: 0 2px;
- border: 1px solid #c0c0c0;
-}
-legend {
- padding: 0;
- border: 0;
-}
-textarea {
- overflow: auto;
-}
-optgroup {
- font-weight: bold;
-}
-table {
- border-spacing: 0;
- border-collapse: collapse;
-}
-td,
-th {
- padding: 0;
-}
-/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
-@media print {
- *,
- *:before,
- *:after {
- color: #000 !important;
- text-shadow: none !important;
- background: transparent !important;
- -webkit-box-shadow: none !important;
- box-shadow: none !important;
- }
- a,
- a:visited {
- text-decoration: underline;
- }
- a[href]:after {
- content: " (" attr(href) ")";
- }
- abbr[title]:after {
- content: " (" attr(title) ")";
- }
- a[href^="#"]:after,
- a[href^="javascript:"]:after {
- content: "";
- }
- pre,
- blockquote {
- border: 1px solid #999;
-
- page-break-inside: avoid;
- }
- thead {
- display: table-header-group;
- }
- tr,
- img {
- page-break-inside: avoid;
- }
- img {
- max-width: 100% !important;
- }
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3;
- }
- h2,
- h3 {
- page-break-after: avoid;
- }
- .navbar {
- display: none;
- }
- .btn > .caret,
- .dropup > .btn > .caret {
- border-top-color: #000 !important;
- }
- .label {
- border: 1px solid #000;
- }
- .table {
- border-collapse: collapse !important;
- }
- .table td,
- .table th {
- background-color: #fff !important;
- }
- .table-bordered th,
- .table-bordered td {
- border: 1px solid #ddd !important;
- }
-}
-@font-face {
- font-family: 'Glyphicons Halflings';
-
- src: url('../fonts/glyphicons-halflings-regular.eot');
- src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
-}
-.glyphicon {
- position: relative;
- top: 1px;
- display: inline-block;
- font-family: 'Glyphicons Halflings';
- font-style: normal;
- font-weight: normal;
- line-height: 1;
-
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-.glyphicon-asterisk:before {
- content: "\002a";
-}
-.glyphicon-plus:before {
- content: "\002b";
-}
-.glyphicon-euro:before,
-.glyphicon-eur:before {
- content: "\20ac";
-}
-.glyphicon-minus:before {
- content: "\2212";
-}
-.glyphicon-cloud:before {
- content: "\2601";
-}
-.glyphicon-envelope:before {
- content: "\2709";
-}
-.glyphicon-pencil:before {
- content: "\270f";
-}
-.glyphicon-glass:before {
- content: "\e001";
-}
-.glyphicon-music:before {
- content: "\e002";
-}
-.glyphicon-search:before {
- content: "\e003";
-}
-.glyphicon-heart:before {
- content: "\e005";
-}
-.glyphicon-star:before {
- content: "\e006";
-}
-.glyphicon-star-empty:before {
- content: "\e007";
-}
-.glyphicon-user:before {
- content: "\e008";
-}
-.glyphicon-film:before {
- content: "\e009";
-}
-.glyphicon-th-large:before {
- content: "\e010";
-}
-.glyphicon-th:before {
- content: "\e011";
-}
-.glyphicon-th-list:before {
- content: "\e012";
-}
-.glyphicon-ok:before {
- content: "\e013";
-}
-.glyphicon-remove:before {
- content: "\e014";
-}
-.glyphicon-zoom-in:before {
- content: "\e015";
-}
-.glyphicon-zoom-out:before {
- content: "\e016";
-}
-.glyphicon-off:before {
- content: "\e017";
-}
-.glyphicon-signal:before {
- content: "\e018";
-}
-.glyphicon-cog:before {
- content: "\e019";
-}
-.glyphicon-trash:before {
- content: "\e020";
-}
-.glyphicon-home:before {
- content: "\e021";
-}
-.glyphicon-file:before {
- content: "\e022";
-}
-.glyphicon-time:before {
- content: "\e023";
-}
-.glyphicon-road:before {
- content: "\e024";
-}
-.glyphicon-download-alt:before {
- content: "\e025";
-}
-.glyphicon-download:before {
- content: "\e026";
-}
-.glyphicon-upload:before {
- content: "\e027";
-}
-.glyphicon-inbox:before {
- content: "\e028";
-}
-.glyphicon-play-circle:before {
- content: "\e029";
-}
-.glyphicon-repeat:before {
- content: "\e030";
-}
-.glyphicon-refresh:before {
- content: "\e031";
-}
-.glyphicon-list-alt:before {
- content: "\e032";
-}
-.glyphicon-lock:before {
- content: "\e033";
-}
-.glyphicon-flag:before {
- content: "\e034";
-}
-.glyphicon-headphones:before {
- content: "\e035";
-}
-.glyphicon-volume-off:before {
- content: "\e036";
-}
-.glyphicon-volume-down:before {
- content: "\e037";
-}
-.glyphicon-volume-up:before {
- content: "\e038";
-}
-.glyphicon-qrcode:before {
- content: "\e039";
-}
-.glyphicon-barcode:before {
- content: "\e040";
-}
-.glyphicon-tag:before {
- content: "\e041";
-}
-.glyphicon-tags:before {
- content: "\e042";
-}
-.glyphicon-book:before {
- content: "\e043";
-}
-.glyphicon-bookmark:before {
- content: "\e044";
-}
-.glyphicon-print:before {
- content: "\e045";
-}
-.glyphicon-camera:before {
- content: "\e046";
-}
-.glyphicon-font:before {
- content: "\e047";
-}
-.glyphicon-bold:before {
- content: "\e048";
-}
-.glyphicon-italic:before {
- content: "\e049";
-}
-.glyphicon-text-height:before {
- content: "\e050";
-}
-.glyphicon-text-width:before {
- content: "\e051";
-}
-.glyphicon-align-left:before {
- content: "\e052";
-}
-.glyphicon-align-center:before {
- content: "\e053";
-}
-.glyphicon-align-right:before {
- content: "\e054";
-}
-.glyphicon-align-justify:before {
- content: "\e055";
-}
-.glyphicon-list:before {
- content: "\e056";
-}
-.glyphicon-indent-left:before {
- content: "\e057";
-}
-.glyphicon-indent-right:before {
- content: "\e058";
-}
-.glyphicon-facetime-video:before {
- content: "\e059";
-}
-.glyphicon-picture:before {
- content: "\e060";
-}
-.glyphicon-map-marker:before {
- content: "\e062";
-}
-.glyphicon-adjust:before {
- content: "\e063";
-}
-.glyphicon-tint:before {
- content: "\e064";
-}
-.glyphicon-edit:before {
- content: "\e065";
-}
-.glyphicon-share:before {
- content: "\e066";
-}
-.glyphicon-check:before {
- content: "\e067";
-}
-.glyphicon-move:before {
- content: "\e068";
-}
-.glyphicon-step-backward:before {
- content: "\e069";
-}
-.glyphicon-fast-backward:before {
- content: "\e070";
-}
-.glyphicon-backward:before {
- content: "\e071";
-}
-.glyphicon-play:before {
- content: "\e072";
-}
-.glyphicon-pause:before {
- content: "\e073";
-}
-.glyphicon-stop:before {
- content: "\e074";
-}
-.glyphicon-forward:before {
- content: "\e075";
-}
-.glyphicon-fast-forward:before {
- content: "\e076";
-}
-.glyphicon-step-forward:before {
- content: "\e077";
-}
-.glyphicon-eject:before {
- content: "\e078";
-}
-.glyphicon-chevron-left:before {
- content: "\e079";
-}
-.glyphicon-chevron-right:before {
- content: "\e080";
-}
-.glyphicon-plus-sign:before {
- content: "\e081";
-}
-.glyphicon-minus-sign:before {
- content: "\e082";
-}
-.glyphicon-remove-sign:before {
- content: "\e083";
-}
-.glyphicon-ok-sign:before {
- content: "\e084";
-}
-.glyphicon-question-sign:before {
- content: "\e085";
-}
-.glyphicon-info-sign:before {
- content: "\e086";
-}
-.glyphicon-screenshot:before {
- content: "\e087";
-}
-.glyphicon-remove-circle:before {
- content: "\e088";
-}
-.glyphicon-ok-circle:before {
- content: "\e089";
-}
-.glyphicon-ban-circle:before {
- content: "\e090";
-}
-.glyphicon-arrow-left:before {
- content: "\e091";
-}
-.glyphicon-arrow-right:before {
- content: "\e092";
-}
-.glyphicon-arrow-up:before {
- content: "\e093";
-}
-.glyphicon-arrow-down:before {
- content: "\e094";
-}
-.glyphicon-share-alt:before {
- content: "\e095";
-}
-.glyphicon-resize-full:before {
- content: "\e096";
-}
-.glyphicon-resize-small:before {
- content: "\e097";
-}
-.glyphicon-exclamation-sign:before {
- content: "\e101";
-}
-.glyphicon-gift:before {
- content: "\e102";
-}
-.glyphicon-leaf:before {
- content: "\e103";
-}
-.glyphicon-fire:before {
- content: "\e104";
-}
-.glyphicon-eye-open:before {
- content: "\e105";
-}
-.glyphicon-eye-close:before {
- content: "\e106";
-}
-.glyphicon-warning-sign:before {
- content: "\e107";
-}
-.glyphicon-plane:before {
- content: "\e108";
-}
-.glyphicon-calendar:before {
- content: "\e109";
-}
-.glyphicon-random:before {
- content: "\e110";
-}
-.glyphicon-comment:before {
- content: "\e111";
-}
-.glyphicon-magnet:before {
- content: "\e112";
-}
-.glyphicon-chevron-up:before {
- content: "\e113";
-}
-.glyphicon-chevron-down:before {
- content: "\e114";
-}
-.glyphicon-retweet:before {
- content: "\e115";
-}
-.glyphicon-shopping-cart:before {
- content: "\e116";
-}
-.glyphicon-folder-close:before {
- content: "\e117";
-}
-.glyphicon-folder-open:before {
- content: "\e118";
-}
-.glyphicon-resize-vertical:before {
- content: "\e119";
-}
-.glyphicon-resize-horizontal:before {
- content: "\e120";
-}
-.glyphicon-hdd:before {
- content: "\e121";
-}
-.glyphicon-bullhorn:before {
- content: "\e122";
-}
-.glyphicon-bell:before {
- content: "\e123";
-}
-.glyphicon-certificate:before {
- content: "\e124";
-}
-.glyphicon-thumbs-up:before {
- content: "\e125";
-}
-.glyphicon-thumbs-down:before {
- content: "\e126";
-}
-.glyphicon-hand-right:before {
- content: "\e127";
-}
-.glyphicon-hand-left:before {
- content: "\e128";
-}
-.glyphicon-hand-up:before {
- content: "\e129";
-}
-.glyphicon-hand-down:before {
- content: "\e130";
-}
-.glyphicon-circle-arrow-right:before {
- content: "\e131";
-}
-.glyphicon-circle-arrow-left:before {
- content: "\e132";
-}
-.glyphicon-circle-arrow-up:before {
- content: "\e133";
-}
-.glyphicon-circle-arrow-down:before {
- content: "\e134";
-}
-.glyphicon-globe:before {
- content: "\e135";
-}
-.glyphicon-wrench:before {
- content: "\e136";
-}
-.glyphicon-tasks:before {
- content: "\e137";
-}
-.glyphicon-filter:before {
- content: "\e138";
-}
-.glyphicon-briefcase:before {
- content: "\e139";
-}
-.glyphicon-fullscreen:before {
- content: "\e140";
-}
-.glyphicon-dashboard:before {
- content: "\e141";
-}
-.glyphicon-paperclip:before {
- content: "\e142";
-}
-.glyphicon-heart-empty:before {
- content: "\e143";
-}
-.glyphicon-link:before {
- content: "\e144";
-}
-.glyphicon-phone:before {
- content: "\e145";
-}
-.glyphicon-pushpin:before {
- content: "\e146";
-}
-.glyphicon-usd:before {
- content: "\e148";
-}
-.glyphicon-gbp:before {
- content: "\e149";
-}
-.glyphicon-sort:before {
- content: "\e150";
-}
-.glyphicon-sort-by-alphabet:before {
- content: "\e151";
-}
-.glyphicon-sort-by-alphabet-alt:before {
- content: "\e152";
-}
-.glyphicon-sort-by-order:before {
- content: "\e153";
-}
-.glyphicon-sort-by-order-alt:before {
- content: "\e154";
-}
-.glyphicon-sort-by-attributes:before {
- content: "\e155";
-}
-.glyphicon-sort-by-attributes-alt:before {
- content: "\e156";
-}
-.glyphicon-unchecked:before {
- content: "\e157";
-}
-.glyphicon-expand:before {
- content: "\e158";
-}
-.glyphicon-collapse-down:before {
- content: "\e159";
-}
-.glyphicon-collapse-up:before {
- content: "\e160";
-}
-.glyphicon-log-in:before {
- content: "\e161";
-}
-.glyphicon-flash:before {
- content: "\e162";
-}
-.glyphicon-log-out:before {
- content: "\e163";
-}
-.glyphicon-new-window:before {
- content: "\e164";
-}
-.glyphicon-record:before {
- content: "\e165";
-}
-.glyphicon-save:before {
- content: "\e166";
-}
-.glyphicon-open:before {
- content: "\e167";
-}
-.glyphicon-saved:before {
- content: "\e168";
-}
-.glyphicon-import:before {
- content: "\e169";
-}
-.glyphicon-export:before {
- content: "\e170";
-}
-.glyphicon-send:before {
- content: "\e171";
-}
-.glyphicon-floppy-disk:before {
- content: "\e172";
-}
-.glyphicon-floppy-saved:before {
- content: "\e173";
-}
-.glyphicon-floppy-remove:before {
- content: "\e174";
-}
-.glyphicon-floppy-save:before {
- content: "\e175";
-}
-.glyphicon-floppy-open:before {
- content: "\e176";
-}
-.glyphicon-credit-card:before {
- content: "\e177";
-}
-.glyphicon-transfer:before {
- content: "\e178";
-}
-.glyphicon-cutlery:before {
- content: "\e179";
-}
-.glyphicon-header:before {
- content: "\e180";
-}
-.glyphicon-compressed:before {
- content: "\e181";
-}
-.glyphicon-earphone:before {
- content: "\e182";
-}
-.glyphicon-phone-alt:before {
- content: "\e183";
-}
-.glyphicon-tower:before {
- content: "\e184";
-}
-.glyphicon-stats:before {
- content: "\e185";
-}
-.glyphicon-sd-video:before {
- content: "\e186";
-}
-.glyphicon-hd-video:before {
- content: "\e187";
-}
-.glyphicon-subtitles:before {
- content: "\e188";
-}
-.glyphicon-sound-stereo:before {
- content: "\e189";
-}
-.glyphicon-sound-dolby:before {
- content: "\e190";
-}
-.glyphicon-sound-5-1:before {
- content: "\e191";
-}
-.glyphicon-sound-6-1:before {
- content: "\e192";
-}
-.glyphicon-sound-7-1:before {
- content: "\e193";
-}
-.glyphicon-copyright-mark:before {
- content: "\e194";
-}
-.glyphicon-registration-mark:before {
- content: "\e195";
-}
-.glyphicon-cloud-download:before {
- content: "\e197";
-}
-.glyphicon-cloud-upload:before {
- content: "\e198";
-}
-.glyphicon-tree-conifer:before {
- content: "\e199";
-}
-.glyphicon-tree-deciduous:before {
- content: "\e200";
-}
-.glyphicon-cd:before {
- content: "\e201";
-}
-.glyphicon-save-file:before {
- content: "\e202";
-}
-.glyphicon-open-file:before {
- content: "\e203";
-}
-.glyphicon-level-up:before {
- content: "\e204";
-}
-.glyphicon-copy:before {
- content: "\e205";
-}
-.glyphicon-paste:before {
- content: "\e206";
-}
-.glyphicon-alert:before {
- content: "\e209";
-}
-.glyphicon-equalizer:before {
- content: "\e210";
-}
-.glyphicon-king:before {
- content: "\e211";
-}
-.glyphicon-queen:before {
- content: "\e212";
-}
-.glyphicon-pawn:before {
- content: "\e213";
-}
-.glyphicon-bishop:before {
- content: "\e214";
-}
-.glyphicon-knight:before {
- content: "\e215";
-}
-.glyphicon-baby-formula:before {
- content: "\e216";
-}
-.glyphicon-tent:before {
- content: "\26fa";
-}
-.glyphicon-blackboard:before {
- content: "\e218";
-}
-.glyphicon-bed:before {
- content: "\e219";
-}
-.glyphicon-apple:before {
- content: "\f8ff";
-}
-.glyphicon-erase:before {
- content: "\e221";
-}
-.glyphicon-hourglass:before {
- content: "\231b";
-}
-.glyphicon-lamp:before {
- content: "\e223";
-}
-.glyphicon-duplicate:before {
- content: "\e224";
-}
-.glyphicon-piggy-bank:before {
- content: "\e225";
-}
-.glyphicon-scissors:before {
- content: "\e226";
-}
-.glyphicon-bitcoin:before {
- content: "\e227";
-}
-.glyphicon-btc:before {
- content: "\e227";
-}
-.glyphicon-xbt:before {
- content: "\e227";
-}
-.glyphicon-yen:before {
- content: "\00a5";
-}
-.glyphicon-jpy:before {
- content: "\00a5";
-}
-.glyphicon-ruble:before {
- content: "\20bd";
-}
-.glyphicon-rub:before {
- content: "\20bd";
-}
-.glyphicon-scale:before {
- content: "\e230";
-}
-.glyphicon-ice-lolly:before {
- content: "\e231";
-}
-.glyphicon-ice-lolly-tasted:before {
- content: "\e232";
-}
-.glyphicon-education:before {
- content: "\e233";
-}
-.glyphicon-option-horizontal:before {
- content: "\e234";
-}
-.glyphicon-option-vertical:before {
- content: "\e235";
-}
-.glyphicon-menu-hamburger:before {
- content: "\e236";
-}
-.glyphicon-modal-window:before {
- content: "\e237";
-}
-.glyphicon-oil:before {
- content: "\e238";
-}
-.glyphicon-grain:before {
- content: "\e239";
-}
-.glyphicon-sunglasses:before {
- content: "\e240";
-}
-.glyphicon-text-size:before {
- content: "\e241";
-}
-.glyphicon-text-color:before {
- content: "\e242";
-}
-.glyphicon-text-background:before {
- content: "\e243";
-}
-.glyphicon-object-align-top:before {
- content: "\e244";
-}
-.glyphicon-object-align-bottom:before {
- content: "\e245";
-}
-.glyphicon-object-align-horizontal:before {
- content: "\e246";
-}
-.glyphicon-object-align-left:before {
- content: "\e247";
-}
-.glyphicon-object-align-vertical:before {
- content: "\e248";
-}
-.glyphicon-object-align-right:before {
- content: "\e249";
-}
-.glyphicon-triangle-right:before {
- content: "\e250";
-}
-.glyphicon-triangle-left:before {
- content: "\e251";
-}
-.glyphicon-triangle-bottom:before {
- content: "\e252";
-}
-.glyphicon-triangle-top:before {
- content: "\e253";
-}
-.glyphicon-console:before {
- content: "\e254";
-}
-.glyphicon-superscript:before {
- content: "\e255";
-}
-.glyphicon-subscript:before {
- content: "\e256";
-}
-.glyphicon-menu-left:before {
- content: "\e257";
-}
-.glyphicon-menu-right:before {
- content: "\e258";
-}
-.glyphicon-menu-down:before {
- content: "\e259";
-}
-.glyphicon-menu-up:before {
- content: "\e260";
-}
-* {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-*:before,
-*:after {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-html {
- font-size: 10px;
-
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-body {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- line-height: 1.42857143;
- color: #333;
- background-color: #fff;
-}
-input,
-button,
-select,
-textarea {
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
-}
-a {
- color: #337ab7;
- text-decoration: none;
-}
-a:hover,
-a:focus {
- color: #23527c;
- text-decoration: underline;
-}
-a:focus {
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-figure {
- margin: 0;
-}
-img {
- vertical-align: middle;
-}
-.img-responsive,
-.thumbnail > img,
-.thumbnail a > img,
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
- display: block;
- max-width: 100%;
- height: auto;
-}
-.img-rounded {
- border-radius: 6px;
-}
-.img-thumbnail {
- display: inline-block;
- max-width: 100%;
- height: auto;
- padding: 4px;
- line-height: 1.42857143;
- background-color: #fff;
- border: 1px solid #ddd;
- border-radius: 4px;
- -webkit-transition: all .2s ease-in-out;
- -o-transition: all .2s ease-in-out;
- transition: all .2s ease-in-out;
-}
-.img-circle {
- border-radius: 50%;
-}
-hr {
- margin-top: 20px;
- margin-bottom: 20px;
- border: 0;
- border-top: 1px solid #eee;
-}
-.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- padding: 0;
- margin: -1px;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
-}
-.sr-only-focusable:active,
-.sr-only-focusable:focus {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip: auto;
-}
-[role="button"] {
- cursor: pointer;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6 {
- font-family: inherit;
- font-weight: 500;
- line-height: 1.1;
- color: inherit;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small,
-.h1 small,
-.h2 small,
-.h3 small,
-.h4 small,
-.h5 small,
-.h6 small,
-h1 .small,
-h2 .small,
-h3 .small,
-h4 .small,
-h5 .small,
-h6 .small,
-.h1 .small,
-.h2 .small,
-.h3 .small,
-.h4 .small,
-.h5 .small,
-.h6 .small {
- font-weight: normal;
- line-height: 1;
- color: #777;
-}
-h1,
-.h1,
-h2,
-.h2,
-h3,
-.h3 {
- margin-top: 20px;
- margin-bottom: 10px;
-}
-h1 small,
-.h1 small,
-h2 small,
-.h2 small,
-h3 small,
-.h3 small,
-h1 .small,
-.h1 .small,
-h2 .small,
-.h2 .small,
-h3 .small,
-.h3 .small {
- font-size: 65%;
-}
-h4,
-.h4,
-h5,
-.h5,
-h6,
-.h6 {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-h4 small,
-.h4 small,
-h5 small,
-.h5 small,
-h6 small,
-.h6 small,
-h4 .small,
-.h4 .small,
-h5 .small,
-.h5 .small,
-h6 .small,
-.h6 .small {
- font-size: 75%;
-}
-h1,
-.h1 {
- font-size: 36px;
-}
-h2,
-.h2 {
- font-size: 30px;
-}
-h3,
-.h3 {
- font-size: 24px;
-}
-h4,
-.h4 {
- font-size: 18px;
-}
-h5,
-.h5 {
- font-size: 14px;
-}
-h6,
-.h6 {
- font-size: 12px;
-}
-p {
- margin: 0 0 10px;
-}
-.lead {
- margin-bottom: 20px;
- font-size: 16px;
- font-weight: 300;
- line-height: 1.4;
-}
-@media (min-width: 768px) {
- .lead {
- font-size: 21px;
- }
-}
-small,
-.small {
- font-size: 85%;
-}
-mark,
-.mark {
- padding: .2em;
- background-color: #fcf8e3;
-}
-.text-left {
- text-align: left;
-}
-.text-right {
- text-align: right;
-}
-.text-center {
- text-align: center;
-}
-.text-justify {
- text-align: justify;
-}
-.text-nowrap {
- white-space: nowrap;
-}
-.text-lowercase {
- text-transform: lowercase;
-}
-.text-uppercase {
- text-transform: uppercase;
-}
-.text-capitalize {
- text-transform: capitalize;
-}
-.text-muted {
- color: #777;
-}
-.text-primary {
- color: #337ab7;
-}
-a.text-primary:hover,
-a.text-primary:focus {
- color: #286090;
-}
-.text-success {
- color: #3c763d;
-}
-a.text-success:hover,
-a.text-success:focus {
- color: #2b542c;
-}
-.text-info {
- color: #31708f;
-}
-a.text-info:hover,
-a.text-info:focus {
- color: #245269;
-}
-.text-warning {
- color: #8a6d3b;
-}
-a.text-warning:hover,
-a.text-warning:focus {
- color: #66512c;
-}
-.text-danger {
- color: #a94442;
-}
-a.text-danger:hover,
-a.text-danger:focus {
- color: #843534;
-}
-.bg-primary {
- color: #fff;
- background-color: #337ab7;
-}
-a.bg-primary:hover,
-a.bg-primary:focus {
- background-color: #286090;
-}
-.bg-success {
- background-color: #dff0d8;
-}
-a.bg-success:hover,
-a.bg-success:focus {
- background-color: #c1e2b3;
-}
-.bg-info {
- background-color: #d9edf7;
-}
-a.bg-info:hover,
-a.bg-info:focus {
- background-color: #afd9ee;
-}
-.bg-warning {
- background-color: #fcf8e3;
-}
-a.bg-warning:hover,
-a.bg-warning:focus {
- background-color: #f7ecb5;
-}
-.bg-danger {
- background-color: #f2dede;
-}
-a.bg-danger:hover,
-a.bg-danger:focus {
- background-color: #e4b9b9;
-}
-.page-header {
- padding-bottom: 9px;
- margin: 40px 0 20px;
- border-bottom: 1px solid #eee;
-}
-ul,
-ol {
- margin-top: 0;
- margin-bottom: 10px;
-}
-ul ul,
-ol ul,
-ul ol,
-ol ol {
- margin-bottom: 0;
-}
-.list-unstyled {
- padding-left: 0;
- list-style: none;
-}
-.list-inline {
- padding-left: 0;
- margin-left: -5px;
- list-style: none;
-}
-.list-inline > li {
- display: inline-block;
- padding-right: 5px;
- padding-left: 5px;
-}
-dl {
- margin-top: 0;
- margin-bottom: 20px;
-}
-dt,
-dd {
- line-height: 1.42857143;
-}
-dt {
- font-weight: bold;
-}
-dd {
- margin-left: 0;
-}
-@media (min-width: 768px) {
- .dl-horizontal dt {
- float: left;
- width: 160px;
- overflow: hidden;
- clear: left;
- text-align: right;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .dl-horizontal dd {
- margin-left: 180px;
- }
-}
-abbr[title],
-abbr[data-original-title] {
- cursor: help;
- border-bottom: 1px dotted #777;
-}
-.initialism {
- font-size: 90%;
- text-transform: uppercase;
-}
-blockquote {
- padding: 10px 20px;
- margin: 0 0 20px;
- font-size: 17.5px;
- border-left: 5px solid #eee;
-}
-blockquote p:last-child,
-blockquote ul:last-child,
-blockquote ol:last-child {
- margin-bottom: 0;
-}
-blockquote footer,
-blockquote small,
-blockquote .small {
- display: block;
- font-size: 80%;
- line-height: 1.42857143;
- color: #777;
-}
-blockquote footer:before,
-blockquote small:before,
-blockquote .small:before {
- content: '\2014 \00A0';
-}
-.blockquote-reverse,
-blockquote.pull-right {
- padding-right: 15px;
- padding-left: 0;
- text-align: right;
- border-right: 5px solid #eee;
- border-left: 0;
-}
-.blockquote-reverse footer:before,
-blockquote.pull-right footer:before,
-.blockquote-reverse small:before,
-blockquote.pull-right small:before,
-.blockquote-reverse .small:before,
-blockquote.pull-right .small:before {
- content: '';
-}
-.blockquote-reverse footer:after,
-blockquote.pull-right footer:after,
-.blockquote-reverse small:after,
-blockquote.pull-right small:after,
-.blockquote-reverse .small:after,
-blockquote.pull-right .small:after {
- content: '\00A0 \2014';
-}
-address {
- margin-bottom: 20px;
- font-style: normal;
- line-height: 1.42857143;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
-}
-code {
- padding: 2px 4px;
- font-size: 90%;
- color: #c7254e;
- background-color: #f9f2f4;
- border-radius: 4px;
-}
-kbd {
- padding: 2px 4px;
- font-size: 90%;
- color: #fff;
- background-color: #333;
- border-radius: 3px;
- -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
-}
-kbd kbd {
- padding: 0;
- font-size: 100%;
- font-weight: bold;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-pre {
- display: block;
- padding: 9.5px;
- margin: 0 0 10px;
- font-size: 13px;
- line-height: 1.42857143;
- color: #333;
- word-break: break-all;
- word-wrap: break-word;
- background-color: #f5f5f5;
- border: 1px solid #ccc;
- border-radius: 4px;
-}
-pre code {
- padding: 0;
- font-size: inherit;
- color: inherit;
- white-space: pre-wrap;
- background-color: transparent;
- border-radius: 0;
-}
-.pre-scrollable {
- max-height: 340px;
- overflow-y: scroll;
-}
-.container {
- padding-right: 15px;
- padding-left: 15px;
- margin-right: auto;
- margin-left: auto;
-}
-@media (min-width: 768px) {
- .container {
- width: 750px;
- }
-}
-@media (min-width: 992px) {
- .container {
- width: 970px;
- }
-}
-@media (min-width: 1200px) {
- .container {
- width: 1170px;
- }
-}
-.container-fluid {
- padding-right: 15px;
- padding-left: 15px;
- margin-right: auto;
- margin-left: auto;
-}
-.row {
- margin-right: -15px;
- margin-left: -15px;
-}
-.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
- position: relative;
- min-height: 1px;
- padding-right: 15px;
- padding-left: 15px;
-}
-.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
- float: left;
-}
-.col-xs-12 {
- width: 100%;
-}
-.col-xs-11 {
- width: 91.66666667%;
-}
-.col-xs-10 {
- width: 83.33333333%;
-}
-.col-xs-9 {
- width: 75%;
-}
-.col-xs-8 {
- width: 66.66666667%;
-}
-.col-xs-7 {
- width: 58.33333333%;
-}
-.col-xs-6 {
- width: 50%;
-}
-.col-xs-5 {
- width: 41.66666667%;
-}
-.col-xs-4 {
- width: 33.33333333%;
-}
-.col-xs-3 {
- width: 25%;
-}
-.col-xs-2 {
- width: 16.66666667%;
-}
-.col-xs-1 {
- width: 8.33333333%;
-}
-.col-xs-pull-12 {
- right: 100%;
-}
-.col-xs-pull-11 {
- right: 91.66666667%;
-}
-.col-xs-pull-10 {
- right: 83.33333333%;
-}
-.col-xs-pull-9 {
- right: 75%;
-}
-.col-xs-pull-8 {
- right: 66.66666667%;
-}
-.col-xs-pull-7 {
- right: 58.33333333%;
-}
-.col-xs-pull-6 {
- right: 50%;
-}
-.col-xs-pull-5 {
- right: 41.66666667%;
-}
-.col-xs-pull-4 {
- right: 33.33333333%;
-}
-.col-xs-pull-3 {
- right: 25%;
-}
-.col-xs-pull-2 {
- right: 16.66666667%;
-}
-.col-xs-pull-1 {
- right: 8.33333333%;
-}
-.col-xs-pull-0 {
- right: auto;
-}
-.col-xs-push-12 {
- left: 100%;
-}
-.col-xs-push-11 {
- left: 91.66666667%;
-}
-.col-xs-push-10 {
- left: 83.33333333%;
-}
-.col-xs-push-9 {
- left: 75%;
-}
-.col-xs-push-8 {
- left: 66.66666667%;
-}
-.col-xs-push-7 {
- left: 58.33333333%;
-}
-.col-xs-push-6 {
- left: 50%;
-}
-.col-xs-push-5 {
- left: 41.66666667%;
-}
-.col-xs-push-4 {
- left: 33.33333333%;
-}
-.col-xs-push-3 {
- left: 25%;
-}
-.col-xs-push-2 {
- left: 16.66666667%;
-}
-.col-xs-push-1 {
- left: 8.33333333%;
-}
-.col-xs-push-0 {
- left: auto;
-}
-.col-xs-offset-12 {
- margin-left: 100%;
-}
-.col-xs-offset-11 {
- margin-left: 91.66666667%;
-}
-.col-xs-offset-10 {
- margin-left: 83.33333333%;
-}
-.col-xs-offset-9 {
- margin-left: 75%;
-}
-.col-xs-offset-8 {
- margin-left: 66.66666667%;
-}
-.col-xs-offset-7 {
- margin-left: 58.33333333%;
-}
-.col-xs-offset-6 {
- margin-left: 50%;
-}
-.col-xs-offset-5 {
- margin-left: 41.66666667%;
-}
-.col-xs-offset-4 {
- margin-left: 33.33333333%;
-}
-.col-xs-offset-3 {
- margin-left: 25%;
-}
-.col-xs-offset-2 {
- margin-left: 16.66666667%;
-}
-.col-xs-offset-1 {
- margin-left: 8.33333333%;
-}
-.col-xs-offset-0 {
- margin-left: 0;
-}
-@media (min-width: 768px) {
- .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
- float: left;
- }
- .col-sm-12 {
- width: 100%;
- }
- .col-sm-11 {
- width: 91.66666667%;
- }
- .col-sm-10 {
- width: 83.33333333%;
- }
- .col-sm-9 {
- width: 75%;
- }
- .col-sm-8 {
- width: 66.66666667%;
- }
- .col-sm-7 {
- width: 58.33333333%;
- }
- .col-sm-6 {
- width: 50%;
- }
- .col-sm-5 {
- width: 41.66666667%;
- }
- .col-sm-4 {
- width: 33.33333333%;
- }
- .col-sm-3 {
- width: 25%;
- }
- .col-sm-2 {
- width: 16.66666667%;
- }
- .col-sm-1 {
- width: 8.33333333%;
- }
- .col-sm-pull-12 {
- right: 100%;
- }
- .col-sm-pull-11 {
- right: 91.66666667%;
- }
- .col-sm-pull-10 {
- right: 83.33333333%;
- }
- .col-sm-pull-9 {
- right: 75%;
- }
- .col-sm-pull-8 {
- right: 66.66666667%;
- }
- .col-sm-pull-7 {
- right: 58.33333333%;
- }
- .col-sm-pull-6 {
- right: 50%;
- }
- .col-sm-pull-5 {
- right: 41.66666667%;
- }
- .col-sm-pull-4 {
- right: 33.33333333%;
- }
- .col-sm-pull-3 {
- right: 25%;
- }
- .col-sm-pull-2 {
- right: 16.66666667%;
- }
- .col-sm-pull-1 {
- right: 8.33333333%;
- }
- .col-sm-pull-0 {
- right: auto;
- }
- .col-sm-push-12 {
- left: 100%;
- }
- .col-sm-push-11 {
- left: 91.66666667%;
- }
- .col-sm-push-10 {
- left: 83.33333333%;
- }
- .col-sm-push-9 {
- left: 75%;
- }
- .col-sm-push-8 {
- left: 66.66666667%;
- }
- .col-sm-push-7 {
- left: 58.33333333%;
- }
- .col-sm-push-6 {
- left: 50%;
- }
- .col-sm-push-5 {
- left: 41.66666667%;
- }
- .col-sm-push-4 {
- left: 33.33333333%;
- }
- .col-sm-push-3 {
- left: 25%;
- }
- .col-sm-push-2 {
- left: 16.66666667%;
- }
- .col-sm-push-1 {
- left: 8.33333333%;
- }
- .col-sm-push-0 {
- left: auto;
- }
- .col-sm-offset-12 {
- margin-left: 100%;
- }
- .col-sm-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-sm-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-sm-offset-9 {
- margin-left: 75%;
- }
- .col-sm-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-sm-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-sm-offset-6 {
- margin-left: 50%;
- }
- .col-sm-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-sm-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-sm-offset-3 {
- margin-left: 25%;
- }
- .col-sm-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-sm-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-sm-offset-0 {
- margin-left: 0;
- }
-}
-@media (min-width: 992px) {
- .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
- float: left;
- }
- .col-md-12 {
- width: 100%;
- }
- .col-md-11 {
- width: 91.66666667%;
- }
- .col-md-10 {
- width: 83.33333333%;
- }
- .col-md-9 {
- width: 75%;
- }
- .col-md-8 {
- width: 66.66666667%;
- }
- .col-md-7 {
- width: 58.33333333%;
- }
- .col-md-6 {
- width: 50%;
- }
- .col-md-5 {
- width: 41.66666667%;
- }
- .col-md-4 {
- width: 33.33333333%;
- }
- .col-md-3 {
- width: 25%;
- }
- .col-md-2 {
- width: 16.66666667%;
- }
- .col-md-1 {
- width: 8.33333333%;
- }
- .col-md-pull-12 {
- right: 100%;
- }
- .col-md-pull-11 {
- right: 91.66666667%;
- }
- .col-md-pull-10 {
- right: 83.33333333%;
- }
- .col-md-pull-9 {
- right: 75%;
- }
- .col-md-pull-8 {
- right: 66.66666667%;
- }
- .col-md-pull-7 {
- right: 58.33333333%;
- }
- .col-md-pull-6 {
- right: 50%;
- }
- .col-md-pull-5 {
- right: 41.66666667%;
- }
- .col-md-pull-4 {
- right: 33.33333333%;
- }
- .col-md-pull-3 {
- right: 25%;
- }
- .col-md-pull-2 {
- right: 16.66666667%;
- }
- .col-md-pull-1 {
- right: 8.33333333%;
- }
- .col-md-pull-0 {
- right: auto;
- }
- .col-md-push-12 {
- left: 100%;
- }
- .col-md-push-11 {
- left: 91.66666667%;
- }
- .col-md-push-10 {
- left: 83.33333333%;
- }
- .col-md-push-9 {
- left: 75%;
- }
- .col-md-push-8 {
- left: 66.66666667%;
- }
- .col-md-push-7 {
- left: 58.33333333%;
- }
- .col-md-push-6 {
- left: 50%;
- }
- .col-md-push-5 {
- left: 41.66666667%;
- }
- .col-md-push-4 {
- left: 33.33333333%;
- }
- .col-md-push-3 {
- left: 25%;
- }
- .col-md-push-2 {
- left: 16.66666667%;
- }
- .col-md-push-1 {
- left: 8.33333333%;
- }
- .col-md-push-0 {
- left: auto;
- }
- .col-md-offset-12 {
- margin-left: 100%;
- }
- .col-md-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-md-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-md-offset-9 {
- margin-left: 75%;
- }
- .col-md-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-md-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-md-offset-6 {
- margin-left: 50%;
- }
- .col-md-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-md-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-md-offset-3 {
- margin-left: 25%;
- }
- .col-md-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-md-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-md-offset-0 {
- margin-left: 0;
- }
-}
-@media (min-width: 1200px) {
- .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
- float: left;
- }
- .col-lg-12 {
- width: 100%;
- }
- .col-lg-11 {
- width: 91.66666667%;
- }
- .col-lg-10 {
- width: 83.33333333%;
- }
- .col-lg-9 {
- width: 75%;
- }
- .col-lg-8 {
- width: 66.66666667%;
- }
- .col-lg-7 {
- width: 58.33333333%;
- }
- .col-lg-6 {
- width: 50%;
- }
- .col-lg-5 {
- width: 41.66666667%;
- }
- .col-lg-4 {
- width: 33.33333333%;
- }
- .col-lg-3 {
- width: 25%;
- }
- .col-lg-2 {
- width: 16.66666667%;
- }
- .col-lg-1 {
- width: 8.33333333%;
- }
- .col-lg-pull-12 {
- right: 100%;
- }
- .col-lg-pull-11 {
- right: 91.66666667%;
- }
- .col-lg-pull-10 {
- right: 83.33333333%;
- }
- .col-lg-pull-9 {
- right: 75%;
- }
- .col-lg-pull-8 {
- right: 66.66666667%;
- }
- .col-lg-pull-7 {
- right: 58.33333333%;
- }
- .col-lg-pull-6 {
- right: 50%;
- }
- .col-lg-pull-5 {
- right: 41.66666667%;
- }
- .col-lg-pull-4 {
- right: 33.33333333%;
- }
- .col-lg-pull-3 {
- right: 25%;
- }
- .col-lg-pull-2 {
- right: 16.66666667%;
- }
- .col-lg-pull-1 {
- right: 8.33333333%;
- }
- .col-lg-pull-0 {
- right: auto;
- }
- .col-lg-push-12 {
- left: 100%;
- }
- .col-lg-push-11 {
- left: 91.66666667%;
- }
- .col-lg-push-10 {
- left: 83.33333333%;
- }
- .col-lg-push-9 {
- left: 75%;
- }
- .col-lg-push-8 {
- left: 66.66666667%;
- }
- .col-lg-push-7 {
- left: 58.33333333%;
- }
- .col-lg-push-6 {
- left: 50%;
- }
- .col-lg-push-5 {
- left: 41.66666667%;
- }
- .col-lg-push-4 {
- left: 33.33333333%;
- }
- .col-lg-push-3 {
- left: 25%;
- }
- .col-lg-push-2 {
- left: 16.66666667%;
- }
- .col-lg-push-1 {
- left: 8.33333333%;
- }
- .col-lg-push-0 {
- left: auto;
- }
- .col-lg-offset-12 {
- margin-left: 100%;
- }
- .col-lg-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-lg-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-lg-offset-9 {
- margin-left: 75%;
- }
- .col-lg-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-lg-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-lg-offset-6 {
- margin-left: 50%;
- }
- .col-lg-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-lg-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-lg-offset-3 {
- margin-left: 25%;
- }
- .col-lg-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-lg-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-lg-offset-0 {
- margin-left: 0;
- }
-}
-table {
- background-color: transparent;
-}
-caption {
- padding-top: 8px;
- padding-bottom: 8px;
- color: #777;
- text-align: left;
-}
-th {
- text-align: left;
-}
-.table {
- width: 100%;
- max-width: 100%;
- margin-bottom: 20px;
-}
-.table > thead > tr > th,
-.table > tbody > tr > th,
-.table > tfoot > tr > th,
-.table > thead > tr > td,
-.table > tbody > tr > td,
-.table > tfoot > tr > td {
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: top;
- border-top: 1px solid #ddd;
-}
-.table > thead > tr > th {
- vertical-align: bottom;
- border-bottom: 2px solid #ddd;
-}
-.table > caption + thead > tr:first-child > th,
-.table > colgroup + thead > tr:first-child > th,
-.table > thead:first-child > tr:first-child > th,
-.table > caption + thead > tr:first-child > td,
-.table > colgroup + thead > tr:first-child > td,
-.table > thead:first-child > tr:first-child > td {
- border-top: 0;
-}
-.table > tbody + tbody {
- border-top: 2px solid #ddd;
-}
-.table .table {
- background-color: #fff;
-}
-.table-condensed > thead > tr > th,
-.table-condensed > tbody > tr > th,
-.table-condensed > tfoot > tr > th,
-.table-condensed > thead > tr > td,
-.table-condensed > tbody > tr > td,
-.table-condensed > tfoot > tr > td {
- padding: 5px;
-}
-.table-bordered {
- border: 1px solid #ddd;
-}
-.table-bordered > thead > tr > th,
-.table-bordered > tbody > tr > th,
-.table-bordered > tfoot > tr > th,
-.table-bordered > thead > tr > td,
-.table-bordered > tbody > tr > td,
-.table-bordered > tfoot > tr > td {
- border: 1px solid #ddd;
-}
-.table-bordered > thead > tr > th,
-.table-bordered > thead > tr > td {
- border-bottom-width: 2px;
-}
-.table-striped > tbody > tr:nth-of-type(odd) {
- background-color: #f9f9f9;
-}
-.table-hover > tbody > tr:hover {
- background-color: #f5f5f5;
-}
-table col[class*="col-"] {
- position: static;
- display: table-column;
- float: none;
-}
-table td[class*="col-"],
-table th[class*="col-"] {
- position: static;
- display: table-cell;
- float: none;
-}
-.table > thead > tr > td.active,
-.table > tbody > tr > td.active,
-.table > tfoot > tr > td.active,
-.table > thead > tr > th.active,
-.table > tbody > tr > th.active,
-.table > tfoot > tr > th.active,
-.table > thead > tr.active > td,
-.table > tbody > tr.active > td,
-.table > tfoot > tr.active > td,
-.table > thead > tr.active > th,
-.table > tbody > tr.active > th,
-.table > tfoot > tr.active > th {
- background-color: #f5f5f5;
-}
-.table-hover > tbody > tr > td.active:hover,
-.table-hover > tbody > tr > th.active:hover,
-.table-hover > tbody > tr.active:hover > td,
-.table-hover > tbody > tr:hover > .active,
-.table-hover > tbody > tr.active:hover > th {
- background-color: #e8e8e8;
-}
-.table > thead > tr > td.success,
-.table > tbody > tr > td.success,
-.table > tfoot > tr > td.success,
-.table > thead > tr > th.success,
-.table > tbody > tr > th.success,
-.table > tfoot > tr > th.success,
-.table > thead > tr.success > td,
-.table > tbody > tr.success > td,
-.table > tfoot > tr.success > td,
-.table > thead > tr.success > th,
-.table > tbody > tr.success > th,
-.table > tfoot > tr.success > th {
- background-color: #dff0d8;
-}
-.table-hover > tbody > tr > td.success:hover,
-.table-hover > tbody > tr > th.success:hover,
-.table-hover > tbody > tr.success:hover > td,
-.table-hover > tbody > tr:hover > .success,
-.table-hover > tbody > tr.success:hover > th {
- background-color: #d0e9c6;
-}
-.table > thead > tr > td.info,
-.table > tbody > tr > td.info,
-.table > tfoot > tr > td.info,
-.table > thead > tr > th.info,
-.table > tbody > tr > th.info,
-.table > tfoot > tr > th.info,
-.table > thead > tr.info > td,
-.table > tbody > tr.info > td,
-.table > tfoot > tr.info > td,
-.table > thead > tr.info > th,
-.table > tbody > tr.info > th,
-.table > tfoot > tr.info > th {
- background-color: #d9edf7;
-}
-.table-hover > tbody > tr > td.info:hover,
-.table-hover > tbody > tr > th.info:hover,
-.table-hover > tbody > tr.info:hover > td,
-.table-hover > tbody > tr:hover > .info,
-.table-hover > tbody > tr.info:hover > th {
- background-color: #c4e3f3;
-}
-.table > thead > tr > td.warning,
-.table > tbody > tr > td.warning,
-.table > tfoot > tr > td.warning,
-.table > thead > tr > th.warning,
-.table > tbody > tr > th.warning,
-.table > tfoot > tr > th.warning,
-.table > thead > tr.warning > td,
-.table > tbody > tr.warning > td,
-.table > tfoot > tr.warning > td,
-.table > thead > tr.warning > th,
-.table > tbody > tr.warning > th,
-.table > tfoot > tr.warning > th {
- background-color: #fcf8e3;
-}
-.table-hover > tbody > tr > td.warning:hover,
-.table-hover > tbody > tr > th.warning:hover,
-.table-hover > tbody > tr.warning:hover > td,
-.table-hover > tbody > tr:hover > .warning,
-.table-hover > tbody > tr.warning:hover > th {
- background-color: #faf2cc;
-}
-.table > thead > tr > td.danger,
-.table > tbody > tr > td.danger,
-.table > tfoot > tr > td.danger,
-.table > thead > tr > th.danger,
-.table > tbody > tr > th.danger,
-.table > tfoot > tr > th.danger,
-.table > thead > tr.danger > td,
-.table > tbody > tr.danger > td,
-.table > tfoot > tr.danger > td,
-.table > thead > tr.danger > th,
-.table > tbody > tr.danger > th,
-.table > tfoot > tr.danger > th {
- background-color: #f2dede;
-}
-.table-hover > tbody > tr > td.danger:hover,
-.table-hover > tbody > tr > th.danger:hover,
-.table-hover > tbody > tr.danger:hover > td,
-.table-hover > tbody > tr:hover > .danger,
-.table-hover > tbody > tr.danger:hover > th {
- background-color: #ebcccc;
-}
-.table-responsive {
- min-height: .01%;
- overflow-x: auto;
-}
-@media screen and (max-width: 767px) {
- .table-responsive {
- width: 100%;
- margin-bottom: 15px;
- overflow-y: hidden;
- -ms-overflow-style: -ms-autohiding-scrollbar;
- border: 1px solid #ddd;
- }
- .table-responsive > .table {
- margin-bottom: 0;
- }
- .table-responsive > .table > thead > tr > th,
- .table-responsive > .table > tbody > tr > th,
- .table-responsive > .table > tfoot > tr > th,
- .table-responsive > .table > thead > tr > td,
- .table-responsive > .table > tbody > tr > td,
- .table-responsive > .table > tfoot > tr > td {
- white-space: nowrap;
- }
- .table-responsive > .table-bordered {
- border: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:first-child,
- .table-responsive > .table-bordered > tbody > tr > th:first-child,
- .table-responsive > .table-bordered > tfoot > tr > th:first-child,
- .table-responsive > .table-bordered > thead > tr > td:first-child,
- .table-responsive > .table-bordered > tbody > tr > td:first-child,
- .table-responsive > .table-bordered > tfoot > tr > td:first-child {
- border-left: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:last-child,
- .table-responsive > .table-bordered > tbody > tr > th:last-child,
- .table-responsive > .table-bordered > tfoot > tr > th:last-child,
- .table-responsive > .table-bordered > thead > tr > td:last-child,
- .table-responsive > .table-bordered > tbody > tr > td:last-child,
- .table-responsive > .table-bordered > tfoot > tr > td:last-child {
- border-right: 0;
- }
- .table-responsive > .table-bordered > tbody > tr:last-child > th,
- .table-responsive > .table-bordered > tfoot > tr:last-child > th,
- .table-responsive > .table-bordered > tbody > tr:last-child > td,
- .table-responsive > .table-bordered > tfoot > tr:last-child > td {
- border-bottom: 0;
- }
-}
-fieldset {
- min-width: 0;
- padding: 0;
- margin: 0;
- border: 0;
-}
-legend {
- display: block;
- width: 100%;
- padding: 0;
- margin-bottom: 20px;
- font-size: 21px;
- line-height: inherit;
- color: #333;
- border: 0;
- border-bottom: 1px solid #e5e5e5;
-}
-label {
- display: inline-block;
- max-width: 100%;
- margin-bottom: 5px;
- font-weight: bold;
-}
-input[type="search"] {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
-}
-input[type="radio"],
-input[type="checkbox"] {
- margin: 4px 0 0;
- margin-top: 1px \9;
- line-height: normal;
-}
-input[type="file"] {
- display: block;
-}
-input[type="range"] {
- display: block;
- width: 100%;
-}
-select[multiple],
-select[size] {
- height: auto;
-}
-input[type="file"]:focus,
-input[type="radio"]:focus,
-input[type="checkbox"]:focus {
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-output {
- display: block;
- padding-top: 7px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
-}
-.form-control {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-}
-.form-control:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
-}
-.form-control::-moz-placeholder {
- color: #999;
- opacity: 1;
-}
-.form-control:-ms-input-placeholder {
- color: #999;
-}
-.form-control::-webkit-input-placeholder {
- color: #999;
-}
-.form-control::-ms-expand {
- background-color: transparent;
- border: 0;
-}
-.form-control[disabled],
-.form-control[readonly],
-fieldset[disabled] .form-control {
- background-color: #eee;
- opacity: 1;
-}
-.form-control[disabled],
-fieldset[disabled] .form-control {
- cursor: not-allowed;
-}
-textarea.form-control {
- height: auto;
-}
-input[type="search"] {
- -webkit-appearance: none;
-}
-@media screen and (-webkit-min-device-pixel-ratio: 0) {
- input[type="date"].form-control,
- input[type="time"].form-control,
- input[type="datetime-local"].form-control,
- input[type="month"].form-control {
- line-height: 34px;
- }
- input[type="date"].input-sm,
- input[type="time"].input-sm,
- input[type="datetime-local"].input-sm,
- input[type="month"].input-sm,
- .input-group-sm input[type="date"],
- .input-group-sm input[type="time"],
- .input-group-sm input[type="datetime-local"],
- .input-group-sm input[type="month"] {
- line-height: 30px;
- }
- input[type="date"].input-lg,
- input[type="time"].input-lg,
- input[type="datetime-local"].input-lg,
- input[type="month"].input-lg,
- .input-group-lg input[type="date"],
- .input-group-lg input[type="time"],
- .input-group-lg input[type="datetime-local"],
- .input-group-lg input[type="month"] {
- line-height: 46px;
- }
-}
-.form-group {
- margin-bottom: 15px;
-}
-.radio,
-.checkbox {
- position: relative;
- display: block;
- margin-top: 10px;
- margin-bottom: 10px;
-}
-.radio label,
-.checkbox label {
- min-height: 20px;
- padding-left: 20px;
- margin-bottom: 0;
- font-weight: normal;
- cursor: pointer;
-}
-.radio input[type="radio"],
-.radio-inline input[type="radio"],
-.checkbox input[type="checkbox"],
-.checkbox-inline input[type="checkbox"] {
- position: absolute;
- margin-top: 4px \9;
- margin-left: -20px;
-}
-.radio + .radio,
-.checkbox + .checkbox {
- margin-top: -5px;
-}
-.radio-inline,
-.checkbox-inline {
- position: relative;
- display: inline-block;
- padding-left: 20px;
- margin-bottom: 0;
- font-weight: normal;
- vertical-align: middle;
- cursor: pointer;
-}
-.radio-inline + .radio-inline,
-.checkbox-inline + .checkbox-inline {
- margin-top: 0;
- margin-left: 10px;
-}
-input[type="radio"][disabled],
-input[type="checkbox"][disabled],
-input[type="radio"].disabled,
-input[type="checkbox"].disabled,
-fieldset[disabled] input[type="radio"],
-fieldset[disabled] input[type="checkbox"] {
- cursor: not-allowed;
-}
-.radio-inline.disabled,
-.checkbox-inline.disabled,
-fieldset[disabled] .radio-inline,
-fieldset[disabled] .checkbox-inline {
- cursor: not-allowed;
-}
-.radio.disabled label,
-.checkbox.disabled label,
-fieldset[disabled] .radio label,
-fieldset[disabled] .checkbox label {
- cursor: not-allowed;
-}
-.form-control-static {
- min-height: 34px;
- padding-top: 7px;
- padding-bottom: 7px;
- margin-bottom: 0;
-}
-.form-control-static.input-lg,
-.form-control-static.input-sm {
- padding-right: 0;
- padding-left: 0;
-}
-.input-sm {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-select.input-sm {
- height: 30px;
- line-height: 30px;
-}
-textarea.input-sm,
-select[multiple].input-sm {
- height: auto;
-}
-.form-group-sm .form-control {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.form-group-sm select.form-control {
- height: 30px;
- line-height: 30px;
-}
-.form-group-sm textarea.form-control,
-.form-group-sm select[multiple].form-control {
- height: auto;
-}
-.form-group-sm .form-control-static {
- height: 30px;
- min-height: 32px;
- padding: 6px 10px;
- font-size: 12px;
- line-height: 1.5;
-}
-.input-lg {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-select.input-lg {
- height: 46px;
- line-height: 46px;
-}
-textarea.input-lg,
-select[multiple].input-lg {
- height: auto;
-}
-.form-group-lg .form-control {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-.form-group-lg select.form-control {
- height: 46px;
- line-height: 46px;
-}
-.form-group-lg textarea.form-control,
-.form-group-lg select[multiple].form-control {
- height: auto;
-}
-.form-group-lg .form-control-static {
- height: 46px;
- min-height: 38px;
- padding: 11px 16px;
- font-size: 18px;
- line-height: 1.3333333;
-}
-.has-feedback {
- position: relative;
-}
-.has-feedback .form-control {
- padding-right: 42.5px;
-}
-.form-control-feedback {
- position: absolute;
- top: 0;
- right: 0;
- z-index: 2;
- display: block;
- width: 34px;
- height: 34px;
- line-height: 34px;
- text-align: center;
- pointer-events: none;
-}
-.input-lg + .form-control-feedback,
-.input-group-lg + .form-control-feedback,
-.form-group-lg .form-control + .form-control-feedback {
- width: 46px;
- height: 46px;
- line-height: 46px;
-}
-.input-sm + .form-control-feedback,
-.input-group-sm + .form-control-feedback,
-.form-group-sm .form-control + .form-control-feedback {
- width: 30px;
- height: 30px;
- line-height: 30px;
-}
-.has-success .help-block,
-.has-success .control-label,
-.has-success .radio,
-.has-success .checkbox,
-.has-success .radio-inline,
-.has-success .checkbox-inline,
-.has-success.radio label,
-.has-success.checkbox label,
-.has-success.radio-inline label,
-.has-success.checkbox-inline label {
- color: #3c763d;
-}
-.has-success .form-control {
- border-color: #3c763d;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-}
-.has-success .form-control:focus {
- border-color: #2b542c;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
-}
-.has-success .input-group-addon {
- color: #3c763d;
- background-color: #dff0d8;
- border-color: #3c763d;
-}
-.has-success .form-control-feedback {
- color: #3c763d;
-}
-.has-warning .help-block,
-.has-warning .control-label,
-.has-warning .radio,
-.has-warning .checkbox,
-.has-warning .radio-inline,
-.has-warning .checkbox-inline,
-.has-warning.radio label,
-.has-warning.checkbox label,
-.has-warning.radio-inline label,
-.has-warning.checkbox-inline label {
- color: #8a6d3b;
-}
-.has-warning .form-control {
- border-color: #8a6d3b;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-}
-.has-warning .form-control:focus {
- border-color: #66512c;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
-}
-.has-warning .input-group-addon {
- color: #8a6d3b;
- background-color: #fcf8e3;
- border-color: #8a6d3b;
-}
-.has-warning .form-control-feedback {
- color: #8a6d3b;
-}
-.has-error .help-block,
-.has-error .control-label,
-.has-error .radio,
-.has-error .checkbox,
-.has-error .radio-inline,
-.has-error .checkbox-inline,
-.has-error.radio label,
-.has-error.checkbox label,
-.has-error.radio-inline label,
-.has-error.checkbox-inline label {
- color: #a94442;
-}
-.has-error .form-control {
- border-color: #a94442;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-}
-.has-error .form-control:focus {
- border-color: #843534;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
-}
-.has-error .input-group-addon {
- color: #a94442;
- background-color: #f2dede;
- border-color: #a94442;
-}
-.has-error .form-control-feedback {
- color: #a94442;
-}
-.has-feedback label ~ .form-control-feedback {
- top: 25px;
-}
-.has-feedback label.sr-only ~ .form-control-feedback {
- top: 0;
-}
-.help-block {
- display: block;
- margin-top: 5px;
- margin-bottom: 10px;
- color: #737373;
-}
-@media (min-width: 768px) {
- .form-inline .form-group {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .form-control {
- display: inline-block;
- width: auto;
- vertical-align: middle;
- }
- .form-inline .form-control-static {
- display: inline-block;
- }
- .form-inline .input-group {
- display: inline-table;
- vertical-align: middle;
- }
- .form-inline .input-group .input-group-addon,
- .form-inline .input-group .input-group-btn,
- .form-inline .input-group .form-control {
- width: auto;
- }
- .form-inline .input-group > .form-control {
- width: 100%;
- }
- .form-inline .control-label {
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .radio,
- .form-inline .checkbox {
- display: inline-block;
- margin-top: 0;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .radio label,
- .form-inline .checkbox label {
- padding-left: 0;
- }
- .form-inline .radio input[type="radio"],
- .form-inline .checkbox input[type="checkbox"] {
- position: relative;
- margin-left: 0;
- }
- .form-inline .has-feedback .form-control-feedback {
- top: 0;
- }
-}
-.form-horizontal .radio,
-.form-horizontal .checkbox,
-.form-horizontal .radio-inline,
-.form-horizontal .checkbox-inline {
- padding-top: 7px;
- margin-top: 0;
- margin-bottom: 0;
-}
-.form-horizontal .radio,
-.form-horizontal .checkbox {
- min-height: 27px;
-}
-.form-horizontal .form-group {
- margin-right: -15px;
- margin-left: -15px;
-}
-@media (min-width: 768px) {
- .form-horizontal .control-label {
- padding-top: 7px;
- margin-bottom: 0;
- text-align: right;
- }
-}
-.form-horizontal .has-feedback .form-control-feedback {
- right: 15px;
-}
-@media (min-width: 768px) {
- .form-horizontal .form-group-lg .control-label {
- padding-top: 11px;
- font-size: 18px;
- }
-}
-@media (min-width: 768px) {
- .form-horizontal .form-group-sm .control-label {
- padding-top: 6px;
- font-size: 12px;
- }
-}
-.btn {
- display: inline-block;
- padding: 6px 12px;
- margin-bottom: 0;
- font-size: 14px;
- font-weight: normal;
- line-height: 1.42857143;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- -ms-touch-action: manipulation;
- touch-action: manipulation;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.btn:focus,
-.btn:active:focus,
-.btn.active:focus,
-.btn.focus,
-.btn:active.focus,
-.btn.active.focus {
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.btn:hover,
-.btn:focus,
-.btn.focus {
- color: #333;
- text-decoration: none;
-}
-.btn:active,
-.btn.active {
- background-image: none;
- outline: 0;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn.disabled,
-.btn[disabled],
-fieldset[disabled] .btn {
- cursor: not-allowed;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
- opacity: .65;
-}
-a.btn.disabled,
-fieldset[disabled] a.btn {
- pointer-events: none;
-}
-.btn-default {
- color: #333;
- background-color: #fff;
- border-color: #ccc;
-}
-.btn-default:focus,
-.btn-default.focus {
- color: #333;
- background-color: #e6e6e6;
- border-color: #8c8c8c;
-}
-.btn-default:hover {
- color: #333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- color: #333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active:hover,
-.btn-default.active:hover,
-.open > .dropdown-toggle.btn-default:hover,
-.btn-default:active:focus,
-.btn-default.active:focus,
-.open > .dropdown-toggle.btn-default:focus,
-.btn-default:active.focus,
-.btn-default.active.focus,
-.open > .dropdown-toggle.btn-default.focus {
- color: #333;
- background-color: #d4d4d4;
- border-color: #8c8c8c;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- background-image: none;
-}
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus {
- background-color: #fff;
- border-color: #ccc;
-}
-.btn-default .badge {
- color: #fff;
- background-color: #333;
-}
-.btn-primary {
- color: #fff;
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary:focus,
-.btn-primary.focus {
- color: #fff;
- background-color: #286090;
- border-color: #122b40;
-}
-.btn-primary:hover {
- color: #fff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- color: #fff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active:hover,
-.btn-primary.active:hover,
-.open > .dropdown-toggle.btn-primary:hover,
-.btn-primary:active:focus,
-.btn-primary.active:focus,
-.open > .dropdown-toggle.btn-primary:focus,
-.btn-primary:active.focus,
-.btn-primary.active.focus,
-.open > .dropdown-toggle.btn-primary.focus {
- color: #fff;
- background-color: #204d74;
- border-color: #122b40;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- background-image: none;
-}
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus {
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary .badge {
- color: #337ab7;
- background-color: #fff;
-}
-.btn-success {
- color: #fff;
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success:focus,
-.btn-success.focus {
- color: #fff;
- background-color: #449d44;
- border-color: #255625;
-}
-.btn-success:hover {
- color: #fff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- color: #fff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active:hover,
-.btn-success.active:hover,
-.open > .dropdown-toggle.btn-success:hover,
-.btn-success:active:focus,
-.btn-success.active:focus,
-.open > .dropdown-toggle.btn-success:focus,
-.btn-success:active.focus,
-.btn-success.active.focus,
-.open > .dropdown-toggle.btn-success.focus {
- color: #fff;
- background-color: #398439;
- border-color: #255625;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- background-image: none;
-}
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus {
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success .badge {
- color: #5cb85c;
- background-color: #fff;
-}
-.btn-info {
- color: #fff;
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info:focus,
-.btn-info.focus {
- color: #fff;
- background-color: #31b0d5;
- border-color: #1b6d85;
-}
-.btn-info:hover {
- color: #fff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- color: #fff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active:hover,
-.btn-info.active:hover,
-.open > .dropdown-toggle.btn-info:hover,
-.btn-info:active:focus,
-.btn-info.active:focus,
-.open > .dropdown-toggle.btn-info:focus,
-.btn-info:active.focus,
-.btn-info.active.focus,
-.open > .dropdown-toggle.btn-info.focus {
- color: #fff;
- background-color: #269abc;
- border-color: #1b6d85;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- background-image: none;
-}
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus {
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info .badge {
- color: #5bc0de;
- background-color: #fff;
-}
-.btn-warning {
- color: #fff;
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning:focus,
-.btn-warning.focus {
- color: #fff;
- background-color: #ec971f;
- border-color: #985f0d;
-}
-.btn-warning:hover {
- color: #fff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- color: #fff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active:hover,
-.btn-warning.active:hover,
-.open > .dropdown-toggle.btn-warning:hover,
-.btn-warning:active:focus,
-.btn-warning.active:focus,
-.open > .dropdown-toggle.btn-warning:focus,
-.btn-warning:active.focus,
-.btn-warning.active.focus,
-.open > .dropdown-toggle.btn-warning.focus {
- color: #fff;
- background-color: #d58512;
- border-color: #985f0d;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- background-image: none;
-}
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus {
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning .badge {
- color: #f0ad4e;
- background-color: #fff;
-}
-.btn-danger {
- color: #fff;
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger:focus,
-.btn-danger.focus {
- color: #fff;
- background-color: #c9302c;
- border-color: #761c19;
-}
-.btn-danger:hover {
- color: #fff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- color: #fff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active:hover,
-.btn-danger.active:hover,
-.open > .dropdown-toggle.btn-danger:hover,
-.btn-danger:active:focus,
-.btn-danger.active:focus,
-.open > .dropdown-toggle.btn-danger:focus,
-.btn-danger:active.focus,
-.btn-danger.active.focus,
-.open > .dropdown-toggle.btn-danger.focus {
- color: #fff;
- background-color: #ac2925;
- border-color: #761c19;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- background-image: none;
-}
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus {
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger .badge {
- color: #d9534f;
- background-color: #fff;
-}
-.btn-link {
- font-weight: normal;
- color: #337ab7;
- border-radius: 0;
-}
-.btn-link,
-.btn-link:active,
-.btn-link.active,
-.btn-link[disabled],
-fieldset[disabled] .btn-link {
- background-color: transparent;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn-link,
-.btn-link:hover,
-.btn-link:focus,
-.btn-link:active {
- border-color: transparent;
-}
-.btn-link:hover,
-.btn-link:focus {
- color: #23527c;
- text-decoration: underline;
- background-color: transparent;
-}
-.btn-link[disabled]:hover,
-fieldset[disabled] .btn-link:hover,
-.btn-link[disabled]:focus,
-fieldset[disabled] .btn-link:focus {
- color: #777;
- text-decoration: none;
-}
-.btn-lg,
-.btn-group-lg > .btn {
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-.btn-sm,
-.btn-group-sm > .btn {
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-xs,
-.btn-group-xs > .btn {
- padding: 1px 5px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-block {
- display: block;
- width: 100%;
-}
-.btn-block + .btn-block {
- margin-top: 5px;
-}
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
- width: 100%;
-}
-.fade {
- opacity: 0;
- -webkit-transition: opacity .15s linear;
- -o-transition: opacity .15s linear;
- transition: opacity .15s linear;
-}
-.fade.in {
- opacity: 1;
-}
-.collapse {
- display: none;
-}
-.collapse.in {
- display: block;
-}
-tr.collapse.in {
- display: table-row;
-}
-tbody.collapse.in {
- display: table-row-group;
-}
-.collapsing {
- position: relative;
- height: 0;
- overflow: hidden;
- -webkit-transition-timing-function: ease;
- -o-transition-timing-function: ease;
- transition-timing-function: ease;
- -webkit-transition-duration: .35s;
- -o-transition-duration: .35s;
- transition-duration: .35s;
- -webkit-transition-property: height, visibility;
- -o-transition-property: height, visibility;
- transition-property: height, visibility;
-}
-.caret {
- display: inline-block;
- width: 0;
- height: 0;
- margin-left: 2px;
- vertical-align: middle;
- border-top: 4px dashed;
- border-top: 4px solid \9;
- border-right: 4px solid transparent;
- border-left: 4px solid transparent;
-}
-.dropup,
-.dropdown {
- position: relative;
-}
-.dropdown-toggle:focus {
- outline: 0;
-}
-.dropdown-menu {
- position: absolute;
- top: 100%;
- left: 0;
- z-index: 1000;
- display: none;
- float: left;
- min-width: 160px;
- padding: 5px 0;
- margin: 2px 0 0;
- font-size: 14px;
- text-align: left;
- list-style: none;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, .15);
- border-radius: 4px;
- -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
- box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
-}
-.dropdown-menu.pull-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu .divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.dropdown-menu > li > a {
- display: block;
- padding: 3px 20px;
- clear: both;
- font-weight: normal;
- line-height: 1.42857143;
- color: #333;
- white-space: nowrap;
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- color: #262626;
- text-decoration: none;
- background-color: #f5f5f5;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- color: #fff;
- text-decoration: none;
- background-color: #337ab7;
- outline: 0;
-}
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- color: #777;
-}
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- text-decoration: none;
- cursor: not-allowed;
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-}
-.open > .dropdown-menu {
- display: block;
-}
-.open > a {
- outline: 0;
-}
-.dropdown-menu-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu-left {
- right: auto;
- left: 0;
-}
-.dropdown-header {
- display: block;
- padding: 3px 20px;
- font-size: 12px;
- line-height: 1.42857143;
- color: #777;
- white-space: nowrap;
-}
-.dropdown-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 990;
-}
-.pull-right > .dropdown-menu {
- right: 0;
- left: auto;
-}
-.dropup .caret,
-.navbar-fixed-bottom .dropdown .caret {
- content: "";
- border-top: 0;
- border-bottom: 4px dashed;
- border-bottom: 4px solid \9;
-}
-.dropup .dropdown-menu,
-.navbar-fixed-bottom .dropdown .dropdown-menu {
- top: auto;
- bottom: 100%;
- margin-bottom: 2px;
-}
-@media (min-width: 768px) {
- .navbar-right .dropdown-menu {
- right: 0;
- left: auto;
- }
- .navbar-right .dropdown-menu-left {
- right: auto;
- left: 0;
- }
-}
-.btn-group,
-.btn-group-vertical {
- position: relative;
- display: inline-block;
- vertical-align: middle;
-}
-.btn-group > .btn,
-.btn-group-vertical > .btn {
- position: relative;
- float: left;
-}
-.btn-group > .btn:hover,
-.btn-group-vertical > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group-vertical > .btn:focus,
-.btn-group > .btn:active,
-.btn-group-vertical > .btn:active,
-.btn-group > .btn.active,
-.btn-group-vertical > .btn.active {
- z-index: 2;
-}
-.btn-group .btn + .btn,
-.btn-group .btn + .btn-group,
-.btn-group .btn-group + .btn,
-.btn-group .btn-group + .btn-group {
- margin-left: -1px;
-}
-.btn-toolbar {
- margin-left: -5px;
-}
-.btn-toolbar .btn,
-.btn-toolbar .btn-group,
-.btn-toolbar .input-group {
- float: left;
-}
-.btn-toolbar > .btn,
-.btn-toolbar > .btn-group,
-.btn-toolbar > .input-group {
- margin-left: 5px;
-}
-.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
- border-radius: 0;
-}
-.btn-group > .btn:first-child {
- margin-left: 0;
-}
-.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-.btn-group > .btn:last-child:not(:first-child),
-.btn-group > .dropdown-toggle:not(:first-child) {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group > .btn-group {
- float: left;
-}
-.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
- border-radius: 0;
-}
-.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
-.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group .dropdown-toggle:active,
-.btn-group.open .dropdown-toggle {
- outline: 0;
-}
-.btn-group > .btn + .dropdown-toggle {
- padding-right: 8px;
- padding-left: 8px;
-}
-.btn-group > .btn-lg + .dropdown-toggle {
- padding-right: 12px;
- padding-left: 12px;
-}
-.btn-group.open .dropdown-toggle {
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn-group.open .dropdown-toggle.btn-link {
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn .caret {
- margin-left: 0;
-}
-.btn-lg .caret {
- border-width: 5px 5px 0;
- border-bottom-width: 0;
-}
-.dropup .btn-lg .caret {
- border-width: 0 5px 5px;
-}
-.btn-group-vertical > .btn,
-.btn-group-vertical > .btn-group,
-.btn-group-vertical > .btn-group > .btn {
- display: block;
- float: none;
- width: 100%;
- max-width: 100%;
-}
-.btn-group-vertical > .btn-group > .btn {
- float: none;
-}
-.btn-group-vertical > .btn + .btn,
-.btn-group-vertical > .btn + .btn-group,
-.btn-group-vertical > .btn-group + .btn,
-.btn-group-vertical > .btn-group + .btn-group {
- margin-top: -1px;
- margin-left: 0;
-}
-.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
- border-radius: 0;
-}
-.btn-group-vertical > .btn:first-child:not(:last-child) {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn:last-child:not(:first-child) {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 4px;
-}
-.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
- border-radius: 0;
-}
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.btn-group-justified {
- display: table;
- width: 100%;
- table-layout: fixed;
- border-collapse: separate;
-}
-.btn-group-justified > .btn,
-.btn-group-justified > .btn-group {
- display: table-cell;
- float: none;
- width: 1%;
-}
-.btn-group-justified > .btn-group .btn {
- width: 100%;
-}
-.btn-group-justified > .btn-group .dropdown-menu {
- left: auto;
-}
-[data-toggle="buttons"] > .btn input[type="radio"],
-[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
-[data-toggle="buttons"] > .btn input[type="checkbox"],
-[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
- position: absolute;
- clip: rect(0, 0, 0, 0);
- pointer-events: none;
-}
-.input-group {
- position: relative;
- display: table;
- border-collapse: separate;
-}
-.input-group[class*="col-"] {
- float: none;
- padding-right: 0;
- padding-left: 0;
-}
-.input-group .form-control {
- position: relative;
- z-index: 2;
- float: left;
- width: 100%;
- margin-bottom: 0;
-}
-.input-group .form-control:focus {
- z-index: 3;
-}
-.input-group-lg > .form-control,
-.input-group-lg > .input-group-addon,
-.input-group-lg > .input-group-btn > .btn {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-select.input-group-lg > .form-control,
-select.input-group-lg > .input-group-addon,
-select.input-group-lg > .input-group-btn > .btn {
- height: 46px;
- line-height: 46px;
-}
-textarea.input-group-lg > .form-control,
-textarea.input-group-lg > .input-group-addon,
-textarea.input-group-lg > .input-group-btn > .btn,
-select[multiple].input-group-lg > .form-control,
-select[multiple].input-group-lg > .input-group-addon,
-select[multiple].input-group-lg > .input-group-btn > .btn {
- height: auto;
-}
-.input-group-sm > .form-control,
-.input-group-sm > .input-group-addon,
-.input-group-sm > .input-group-btn > .btn {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-select.input-group-sm > .form-control,
-select.input-group-sm > .input-group-addon,
-select.input-group-sm > .input-group-btn > .btn {
- height: 30px;
- line-height: 30px;
-}
-textarea.input-group-sm > .form-control,
-textarea.input-group-sm > .input-group-addon,
-textarea.input-group-sm > .input-group-btn > .btn,
-select[multiple].input-group-sm > .form-control,
-select[multiple].input-group-sm > .input-group-addon,
-select[multiple].input-group-sm > .input-group-btn > .btn {
- height: auto;
-}
-.input-group-addon,
-.input-group-btn,
-.input-group .form-control {
- display: table-cell;
-}
-.input-group-addon:not(:first-child):not(:last-child),
-.input-group-btn:not(:first-child):not(:last-child),
-.input-group .form-control:not(:first-child):not(:last-child) {
- border-radius: 0;
-}
-.input-group-addon,
-.input-group-btn {
- width: 1%;
- white-space: nowrap;
- vertical-align: middle;
-}
-.input-group-addon {
- padding: 6px 12px;
- font-size: 14px;
- font-weight: normal;
- line-height: 1;
- color: #555;
- text-align: center;
- background-color: #eee;
- border: 1px solid #ccc;
- border-radius: 4px;
-}
-.input-group-addon.input-sm {
- padding: 5px 10px;
- font-size: 12px;
- border-radius: 3px;
-}
-.input-group-addon.input-lg {
- padding: 10px 16px;
- font-size: 18px;
- border-radius: 6px;
-}
-.input-group-addon input[type="radio"],
-.input-group-addon input[type="checkbox"] {
- margin-top: 0;
-}
-.input-group .form-control:first-child,
-.input-group-addon:first-child,
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group > .btn,
-.input-group-btn:first-child > .dropdown-toggle,
-.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
-.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
-}
-.input-group-addon:first-child {
- border-right: 0;
-}
-.input-group .form-control:last-child,
-.input-group-addon:last-child,
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group > .btn,
-.input-group-btn:last-child > .dropdown-toggle,
-.input-group-btn:first-child > .btn:not(:first-child),
-.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
- border-top-left-radius: 0;
- border-bottom-left-radius: 0;
-}
-.input-group-addon:last-child {
- border-left: 0;
-}
-.input-group-btn {
- position: relative;
- font-size: 0;
- white-space: nowrap;
-}
-.input-group-btn > .btn {
- position: relative;
-}
-.input-group-btn > .btn + .btn {
- margin-left: -1px;
-}
-.input-group-btn > .btn:hover,
-.input-group-btn > .btn:focus,
-.input-group-btn > .btn:active {
- z-index: 2;
-}
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group {
- margin-right: -1px;
-}
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group {
- z-index: 2;
- margin-left: -1px;
-}
-.nav {
- padding-left: 0;
- margin-bottom: 0;
- list-style: none;
-}
-.nav > li {
- position: relative;
- display: block;
-}
-.nav > li > a {
- position: relative;
- display: block;
- padding: 10px 15px;
-}
-.nav > li > a:hover,
-.nav > li > a:focus {
- text-decoration: none;
- background-color: #eee;
-}
-.nav > li.disabled > a {
- color: #777;
-}
-.nav > li.disabled > a:hover,
-.nav > li.disabled > a:focus {
- color: #777;
- text-decoration: none;
- cursor: not-allowed;
- background-color: transparent;
-}
-.nav .open > a,
-.nav .open > a:hover,
-.nav .open > a:focus {
- background-color: #eee;
- border-color: #337ab7;
-}
-.nav .nav-divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.nav > li > a > img {
- max-width: none;
-}
-.nav-tabs {
- border-bottom: 1px solid #ddd;
-}
-.nav-tabs > li {
- float: left;
- margin-bottom: -1px;
-}
-.nav-tabs > li > a {
- margin-right: 2px;
- line-height: 1.42857143;
- border: 1px solid transparent;
- border-radius: 4px 4px 0 0;
-}
-.nav-tabs > li > a:hover {
- border-color: #eee #eee #ddd;
-}
-.nav-tabs > li.active > a,
-.nav-tabs > li.active > a:hover,
-.nav-tabs > li.active > a:focus {
- color: #555;
- cursor: default;
- background-color: #fff;
- border: 1px solid #ddd;
- border-bottom-color: transparent;
-}
-.nav-tabs.nav-justified {
- width: 100%;
- border-bottom: 0;
-}
-.nav-tabs.nav-justified > li {
- float: none;
-}
-.nav-tabs.nav-justified > li > a {
- margin-bottom: 5px;
- text-align: center;
-}
-.nav-tabs.nav-justified > .dropdown .dropdown-menu {
- top: auto;
- left: auto;
-}
-@media (min-width: 768px) {
- .nav-tabs.nav-justified > li {
- display: table-cell;
- width: 1%;
- }
- .nav-tabs.nav-justified > li > a {
- margin-bottom: 0;
- }
-}
-.nav-tabs.nav-justified > li > a {
- margin-right: 0;
- border-radius: 4px;
-}
-.nav-tabs.nav-justified > .active > a,
-.nav-tabs.nav-justified > .active > a:hover,
-.nav-tabs.nav-justified > .active > a:focus {
- border: 1px solid #ddd;
-}
-@media (min-width: 768px) {
- .nav-tabs.nav-justified > li > a {
- border-bottom: 1px solid #ddd;
- border-radius: 4px 4px 0 0;
- }
- .nav-tabs.nav-justified > .active > a,
- .nav-tabs.nav-justified > .active > a:hover,
- .nav-tabs.nav-justified > .active > a:focus {
- border-bottom-color: #fff;
- }
-}
-.nav-pills > li {
- float: left;
-}
-.nav-pills > li > a {
- border-radius: 4px;
-}
-.nav-pills > li + li {
- margin-left: 2px;
-}
-.nav-pills > li.active > a,
-.nav-pills > li.active > a:hover,
-.nav-pills > li.active > a:focus {
- color: #fff;
- background-color: #337ab7;
-}
-.nav-stacked > li {
- float: none;
-}
-.nav-stacked > li + li {
- margin-top: 2px;
- margin-left: 0;
-}
-.nav-justified {
- width: 100%;
-}
-.nav-justified > li {
- float: none;
-}
-.nav-justified > li > a {
- margin-bottom: 5px;
- text-align: center;
-}
-.nav-justified > .dropdown .dropdown-menu {
- top: auto;
- left: auto;
-}
-@media (min-width: 768px) {
- .nav-justified > li {
- display: table-cell;
- width: 1%;
- }
- .nav-justified > li > a {
- margin-bottom: 0;
- }
-}
-.nav-tabs-justified {
- border-bottom: 0;
-}
-.nav-tabs-justified > li > a {
- margin-right: 0;
- border-radius: 4px;
-}
-.nav-tabs-justified > .active > a,
-.nav-tabs-justified > .active > a:hover,
-.nav-tabs-justified > .active > a:focus {
- border: 1px solid #ddd;
-}
-@media (min-width: 768px) {
- .nav-tabs-justified > li > a {
- border-bottom: 1px solid #ddd;
- border-radius: 4px 4px 0 0;
- }
- .nav-tabs-justified > .active > a,
- .nav-tabs-justified > .active > a:hover,
- .nav-tabs-justified > .active > a:focus {
- border-bottom-color: #fff;
- }
-}
-.tab-content > .tab-pane {
- display: none;
-}
-.tab-content > .active {
- display: block;
-}
-.nav-tabs .dropdown-menu {
- margin-top: -1px;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.navbar {
- position: relative;
- min-height: 50px;
- margin-bottom: 20px;
- border: 1px solid transparent;
-}
-@media (min-width: 768px) {
- .navbar {
- border-radius: 4px;
- }
-}
-@media (min-width: 768px) {
- .navbar-header {
- float: left;
- }
-}
-.navbar-collapse {
- padding-right: 15px;
- padding-left: 15px;
- overflow-x: visible;
- -webkit-overflow-scrolling: touch;
- border-top: 1px solid transparent;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
-}
-.navbar-collapse.in {
- overflow-y: auto;
-}
-@media (min-width: 768px) {
- .navbar-collapse {
- width: auto;
- border-top: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- .navbar-collapse.collapse {
- display: block !important;
- height: auto !important;
- padding-bottom: 0;
- overflow: visible !important;
- }
- .navbar-collapse.in {
- overflow-y: visible;
- }
- .navbar-fixed-top .navbar-collapse,
- .navbar-static-top .navbar-collapse,
- .navbar-fixed-bottom .navbar-collapse {
- padding-right: 0;
- padding-left: 0;
- }
-}
-.navbar-fixed-top .navbar-collapse,
-.navbar-fixed-bottom .navbar-collapse {
- max-height: 340px;
-}
-@media (max-device-width: 480px) and (orientation: landscape) {
- .navbar-fixed-top .navbar-collapse,
- .navbar-fixed-bottom .navbar-collapse {
- max-height: 200px;
- }
-}
-.container > .navbar-header,
-.container-fluid > .navbar-header,
-.container > .navbar-collapse,
-.container-fluid > .navbar-collapse {
- margin-right: -15px;
- margin-left: -15px;
-}
-@media (min-width: 768px) {
- .container > .navbar-header,
- .container-fluid > .navbar-header,
- .container > .navbar-collapse,
- .container-fluid > .navbar-collapse {
- margin-right: 0;
- margin-left: 0;
- }
-}
-.navbar-static-top {
- z-index: 1000;
- border-width: 0 0 1px;
-}
-@media (min-width: 768px) {
- .navbar-static-top {
- border-radius: 0;
- }
-}
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- position: fixed;
- right: 0;
- left: 0;
- z-index: 1030;
-}
-@media (min-width: 768px) {
- .navbar-fixed-top,
- .navbar-fixed-bottom {
- border-radius: 0;
- }
-}
-.navbar-fixed-top {
- top: 0;
- border-width: 0 0 1px;
-}
-.navbar-fixed-bottom {
- bottom: 0;
- margin-bottom: 0;
- border-width: 1px 0 0;
-}
-.navbar-brand {
- float: left;
- height: 50px;
- padding: 15px 15px;
- font-size: 18px;
- line-height: 20px;
-}
-.navbar-brand:hover,
-.navbar-brand:focus {
- text-decoration: none;
-}
-.navbar-brand > img {
- display: block;
-}
-@media (min-width: 768px) {
- .navbar > .container .navbar-brand,
- .navbar > .container-fluid .navbar-brand {
- margin-left: -15px;
- }
-}
-.navbar-toggle {
- position: relative;
- float: right;
- padding: 9px 10px;
- margin-top: 8px;
- margin-right: 15px;
- margin-bottom: 8px;
- background-color: transparent;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.navbar-toggle:focus {
- outline: 0;
-}
-.navbar-toggle .icon-bar {
- display: block;
- width: 22px;
- height: 2px;
- border-radius: 1px;
-}
-.navbar-toggle .icon-bar + .icon-bar {
- margin-top: 4px;
-}
-@media (min-width: 768px) {
- .navbar-toggle {
- display: none;
- }
-}
-.navbar-nav {
- margin: 7.5px -15px;
-}
-.navbar-nav > li > a {
- padding-top: 10px;
- padding-bottom: 10px;
- line-height: 20px;
-}
-@media (max-width: 767px) {
- .navbar-nav .open .dropdown-menu {
- position: static;
- float: none;
- width: auto;
- margin-top: 0;
- background-color: transparent;
- border: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
- .navbar-nav .open .dropdown-menu > li > a,
- .navbar-nav .open .dropdown-menu .dropdown-header {
- padding: 5px 15px 5px 25px;
- }
- .navbar-nav .open .dropdown-menu > li > a {
- line-height: 20px;
- }
- .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-nav .open .dropdown-menu > li > a:focus {
- background-image: none;
- }
-}
-@media (min-width: 768px) {
- .navbar-nav {
- float: left;
- margin: 0;
- }
- .navbar-nav > li {
- float: left;
- }
- .navbar-nav > li > a {
- padding-top: 15px;
- padding-bottom: 15px;
- }
-}
-.navbar-form {
- padding: 10px 15px;
- margin-top: 8px;
- margin-right: -15px;
- margin-bottom: 8px;
- margin-left: -15px;
- border-top: 1px solid transparent;
- border-bottom: 1px solid transparent;
- -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
-}
-@media (min-width: 768px) {
- .navbar-form .form-group {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .form-control {
- display: inline-block;
- width: auto;
- vertical-align: middle;
- }
- .navbar-form .form-control-static {
- display: inline-block;
- }
- .navbar-form .input-group {
- display: inline-table;
- vertical-align: middle;
- }
- .navbar-form .input-group .input-group-addon,
- .navbar-form .input-group .input-group-btn,
- .navbar-form .input-group .form-control {
- width: auto;
- }
- .navbar-form .input-group > .form-control {
- width: 100%;
- }
- .navbar-form .control-label {
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .radio,
- .navbar-form .checkbox {
- display: inline-block;
- margin-top: 0;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .radio label,
- .navbar-form .checkbox label {
- padding-left: 0;
- }
- .navbar-form .radio input[type="radio"],
- .navbar-form .checkbox input[type="checkbox"] {
- position: relative;
- margin-left: 0;
- }
- .navbar-form .has-feedback .form-control-feedback {
- top: 0;
- }
-}
-@media (max-width: 767px) {
- .navbar-form .form-group {
- margin-bottom: 5px;
- }
- .navbar-form .form-group:last-child {
- margin-bottom: 0;
- }
-}
-@media (min-width: 768px) {
- .navbar-form {
- width: auto;
- padding-top: 0;
- padding-bottom: 0;
- margin-right: 0;
- margin-left: 0;
- border: 0;
- -webkit-box-shadow: none;
- box-shadow: none;
- }
-}
-.navbar-nav > li > .dropdown-menu {
- margin-top: 0;
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
- margin-bottom: 0;
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.navbar-btn {
- margin-top: 8px;
- margin-bottom: 8px;
-}
-.navbar-btn.btn-sm {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-.navbar-btn.btn-xs {
- margin-top: 14px;
- margin-bottom: 14px;
-}
-.navbar-text {
- margin-top: 15px;
- margin-bottom: 15px;
-}
-@media (min-width: 768px) {
- .navbar-text {
- float: left;
- margin-right: 15px;
- margin-left: 15px;
- }
-}
-@media (min-width: 768px) {
- .navbar-left {
- float: left !important;
- }
- .navbar-right {
- float: right !important;
- margin-right: -15px;
- }
- .navbar-right ~ .navbar-right {
- margin-right: 0;
- }
-}
-.navbar-default {
- background-color: #f8f8f8;
- border-color: #e7e7e7;
-}
-.navbar-default .navbar-brand {
- color: #777;
-}
-.navbar-default .navbar-brand:hover,
-.navbar-default .navbar-brand:focus {
- color: #5e5e5e;
- background-color: transparent;
-}
-.navbar-default .navbar-text {
- color: #777;
-}
-.navbar-default .navbar-nav > li > a {
- color: #777;
-}
-.navbar-default .navbar-nav > li > a:hover,
-.navbar-default .navbar-nav > li > a:focus {
- color: #333;
- background-color: transparent;
-}
-.navbar-default .navbar-nav > .active > a,
-.navbar-default .navbar-nav > .active > a:hover,
-.navbar-default .navbar-nav > .active > a:focus {
- color: #555;
- background-color: #e7e7e7;
-}
-.navbar-default .navbar-nav > .disabled > a,
-.navbar-default .navbar-nav > .disabled > a:hover,
-.navbar-default .navbar-nav > .disabled > a:focus {
- color: #ccc;
- background-color: transparent;
-}
-.navbar-default .navbar-toggle {
- border-color: #ddd;
-}
-.navbar-default .navbar-toggle:hover,
-.navbar-default .navbar-toggle:focus {
- background-color: #ddd;
-}
-.navbar-default .navbar-toggle .icon-bar {
- background-color: #888;
-}
-.navbar-default .navbar-collapse,
-.navbar-default .navbar-form {
- border-color: #e7e7e7;
-}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .open > a:hover,
-.navbar-default .navbar-nav > .open > a:focus {
- color: #555;
- background-color: #e7e7e7;
-}
-@media (max-width: 767px) {
- .navbar-default .navbar-nav .open .dropdown-menu > li > a {
- color: #777;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
- color: #333;
- background-color: transparent;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #555;
- background-color: #e7e7e7;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
- color: #ccc;
- background-color: transparent;
- }
-}
-.navbar-default .navbar-link {
- color: #777;
-}
-.navbar-default .navbar-link:hover {
- color: #333;
-}
-.navbar-default .btn-link {
- color: #777;
-}
-.navbar-default .btn-link:hover,
-.navbar-default .btn-link:focus {
- color: #333;
-}
-.navbar-default .btn-link[disabled]:hover,
-fieldset[disabled] .navbar-default .btn-link:hover,
-.navbar-default .btn-link[disabled]:focus,
-fieldset[disabled] .navbar-default .btn-link:focus {
- color: #ccc;
-}
-.navbar-inverse {
- background-color: #222;
- border-color: #080808;
-}
-.navbar-inverse .navbar-brand {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-brand:hover,
-.navbar-inverse .navbar-brand:focus {
- color: #fff;
- background-color: transparent;
-}
-.navbar-inverse .navbar-text {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-nav > li > a {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-nav > li > a:hover,
-.navbar-inverse .navbar-nav > li > a:focus {
- color: #fff;
- background-color: transparent;
-}
-.navbar-inverse .navbar-nav > .active > a,
-.navbar-inverse .navbar-nav > .active > a:hover,
-.navbar-inverse .navbar-nav > .active > a:focus {
- color: #fff;
- background-color: #080808;
-}
-.navbar-inverse .navbar-nav > .disabled > a,
-.navbar-inverse .navbar-nav > .disabled > a:hover,
-.navbar-inverse .navbar-nav > .disabled > a:focus {
- color: #444;
- background-color: transparent;
-}
-.navbar-inverse .navbar-toggle {
- border-color: #333;
-}
-.navbar-inverse .navbar-toggle:hover,
-.navbar-inverse .navbar-toggle:focus {
- background-color: #333;
-}
-.navbar-inverse .navbar-toggle .icon-bar {
- background-color: #fff;
-}
-.navbar-inverse .navbar-collapse,
-.navbar-inverse .navbar-form {
- border-color: #101010;
-}
-.navbar-inverse .navbar-nav > .open > a,
-.navbar-inverse .navbar-nav > .open > a:hover,
-.navbar-inverse .navbar-nav > .open > a:focus {
- color: #fff;
- background-color: #080808;
-}
-@media (max-width: 767px) {
- .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
- border-color: #080808;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
- background-color: #080808;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
- color: #9d9d9d;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
- color: #fff;
- background-color: transparent;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #fff;
- background-color: #080808;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
- color: #444;
- background-color: transparent;
- }
-}
-.navbar-inverse .navbar-link {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-link:hover {
- color: #fff;
-}
-.navbar-inverse .btn-link {
- color: #9d9d9d;
-}
-.navbar-inverse .btn-link:hover,
-.navbar-inverse .btn-link:focus {
- color: #fff;
-}
-.navbar-inverse .btn-link[disabled]:hover,
-fieldset[disabled] .navbar-inverse .btn-link:hover,
-.navbar-inverse .btn-link[disabled]:focus,
-fieldset[disabled] .navbar-inverse .btn-link:focus {
- color: #444;
-}
-.breadcrumb {
- padding: 8px 15px;
- margin-bottom: 20px;
- list-style: none;
- background-color: #f5f5f5;
- border-radius: 4px;
-}
-.breadcrumb > li {
- display: inline-block;
-}
-.breadcrumb > li + li:before {
- padding: 0 5px;
- color: #ccc;
- content: "/\00a0";
-}
-.breadcrumb > .active {
- color: #777;
-}
-.pagination {
- display: inline-block;
- padding-left: 0;
- margin: 20px 0;
- border-radius: 4px;
-}
-.pagination > li {
- display: inline;
-}
-.pagination > li > a,
-.pagination > li > span {
- position: relative;
- float: left;
- padding: 6px 12px;
- margin-left: -1px;
- line-height: 1.42857143;
- color: #337ab7;
- text-decoration: none;
- background-color: #fff;
- border: 1px solid #ddd;
-}
-.pagination > li:first-child > a,
-.pagination > li:first-child > span {
- margin-left: 0;
- border-top-left-radius: 4px;
- border-bottom-left-radius: 4px;
-}
-.pagination > li:last-child > a,
-.pagination > li:last-child > span {
- border-top-right-radius: 4px;
- border-bottom-right-radius: 4px;
-}
-.pagination > li > a:hover,
-.pagination > li > span:hover,
-.pagination > li > a:focus,
-.pagination > li > span:focus {
- z-index: 2;
- color: #23527c;
- background-color: #eee;
- border-color: #ddd;
-}
-.pagination > .active > a,
-.pagination > .active > span,
-.pagination > .active > a:hover,
-.pagination > .active > span:hover,
-.pagination > .active > a:focus,
-.pagination > .active > span:focus {
- z-index: 3;
- color: #fff;
- cursor: default;
- background-color: #337ab7;
- border-color: #337ab7;
-}
-.pagination > .disabled > span,
-.pagination > .disabled > span:hover,
-.pagination > .disabled > span:focus,
-.pagination > .disabled > a,
-.pagination > .disabled > a:hover,
-.pagination > .disabled > a:focus {
- color: #777;
- cursor: not-allowed;
- background-color: #fff;
- border-color: #ddd;
-}
-.pagination-lg > li > a,
-.pagination-lg > li > span {
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
-}
-.pagination-lg > li:first-child > a,
-.pagination-lg > li:first-child > span {
- border-top-left-radius: 6px;
- border-bottom-left-radius: 6px;
-}
-.pagination-lg > li:last-child > a,
-.pagination-lg > li:last-child > span {
- border-top-right-radius: 6px;
- border-bottom-right-radius: 6px;
-}
-.pagination-sm > li > a,
-.pagination-sm > li > span {
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
-}
-.pagination-sm > li:first-child > a,
-.pagination-sm > li:first-child > span {
- border-top-left-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.pagination-sm > li:last-child > a,
-.pagination-sm > li:last-child > span {
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
-}
-.pager {
- padding-left: 0;
- margin: 20px 0;
- text-align: center;
- list-style: none;
-}
-.pager li {
- display: inline;
-}
-.pager li > a,
-.pager li > span {
- display: inline-block;
- padding: 5px 14px;
- background-color: #fff;
- border: 1px solid #ddd;
- border-radius: 15px;
-}
-.pager li > a:hover,
-.pager li > a:focus {
- text-decoration: none;
- background-color: #eee;
-}
-.pager .next > a,
-.pager .next > span {
- float: right;
-}
-.pager .previous > a,
-.pager .previous > span {
- float: left;
-}
-.pager .disabled > a,
-.pager .disabled > a:hover,
-.pager .disabled > a:focus,
-.pager .disabled > span {
- color: #777;
- cursor: not-allowed;
- background-color: #fff;
-}
-.label {
- display: inline;
- padding: .2em .6em .3em;
- font-size: 75%;
- font-weight: bold;
- line-height: 1;
- color: #fff;
- text-align: center;
- white-space: nowrap;
- vertical-align: baseline;
- border-radius: .25em;
-}
-a.label:hover,
-a.label:focus {
- color: #fff;
- text-decoration: none;
- cursor: pointer;
-}
-.label:empty {
- display: none;
-}
-.btn .label {
- position: relative;
- top: -1px;
-}
-.label-default {
- background-color: #777;
-}
-.label-default[href]:hover,
-.label-default[href]:focus {
- background-color: #5e5e5e;
-}
-.label-primary {
- background-color: #337ab7;
-}
-.label-primary[href]:hover,
-.label-primary[href]:focus {
- background-color: #286090;
-}
-.label-success {
- background-color: #5cb85c;
-}
-.label-success[href]:hover,
-.label-success[href]:focus {
- background-color: #449d44;
-}
-.label-info {
- background-color: #5bc0de;
-}
-.label-info[href]:hover,
-.label-info[href]:focus {
- background-color: #31b0d5;
-}
-.label-warning {
- background-color: #f0ad4e;
-}
-.label-warning[href]:hover,
-.label-warning[href]:focus {
- background-color: #ec971f;
-}
-.label-danger {
- background-color: #d9534f;
-}
-.label-danger[href]:hover,
-.label-danger[href]:focus {
- background-color: #c9302c;
-}
-.badge {
- display: inline-block;
- min-width: 10px;
- padding: 3px 7px;
- font-size: 12px;
- font-weight: bold;
- line-height: 1;
- color: #fff;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- background-color: #777;
- border-radius: 10px;
-}
-.badge:empty {
- display: none;
-}
-.btn .badge {
- position: relative;
- top: -1px;
-}
-.btn-xs .badge,
-.btn-group-xs > .btn .badge {
- top: 0;
- padding: 1px 5px;
-}
-a.badge:hover,
-a.badge:focus {
- color: #fff;
- text-decoration: none;
- cursor: pointer;
-}
-.list-group-item.active > .badge,
-.nav-pills > .active > a > .badge {
- color: #337ab7;
- background-color: #fff;
-}
-.list-group-item > .badge {
- float: right;
-}
-.list-group-item > .badge + .badge {
- margin-right: 5px;
-}
-.nav-pills > li > a > .badge {
- margin-left: 3px;
-}
-.jumbotron {
- padding-top: 30px;
- padding-bottom: 30px;
- margin-bottom: 30px;
- color: inherit;
- background-color: #eee;
-}
-.jumbotron h1,
-.jumbotron .h1 {
- color: inherit;
-}
-.jumbotron p {
- margin-bottom: 15px;
- font-size: 21px;
- font-weight: 200;
-}
-.jumbotron > hr {
- border-top-color: #d5d5d5;
-}
-.container .jumbotron,
-.container-fluid .jumbotron {
- padding-right: 15px;
- padding-left: 15px;
- border-radius: 6px;
-}
-.jumbotron .container {
- max-width: 100%;
-}
-@media screen and (min-width: 768px) {
- .jumbotron {
- padding-top: 48px;
- padding-bottom: 48px;
- }
- .container .jumbotron,
- .container-fluid .jumbotron {
- padding-right: 60px;
- padding-left: 60px;
- }
- .jumbotron h1,
- .jumbotron .h1 {
- font-size: 63px;
- }
-}
-.thumbnail {
- display: block;
- padding: 4px;
- margin-bottom: 20px;
- line-height: 1.42857143;
- background-color: #fff;
- border: 1px solid #ddd;
- border-radius: 4px;
- -webkit-transition: border .2s ease-in-out;
- -o-transition: border .2s ease-in-out;
- transition: border .2s ease-in-out;
-}
-.thumbnail > img,
-.thumbnail a > img {
- margin-right: auto;
- margin-left: auto;
-}
-a.thumbnail:hover,
-a.thumbnail:focus,
-a.thumbnail.active {
- border-color: #337ab7;
-}
-.thumbnail .caption {
- padding: 9px;
- color: #333;
-}
-.alert {
- padding: 15px;
- margin-bottom: 20px;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.alert h4 {
- margin-top: 0;
- color: inherit;
-}
-.alert .alert-link {
- font-weight: bold;
-}
-.alert > p,
-.alert > ul {
- margin-bottom: 0;
-}
-.alert > p + p {
- margin-top: 5px;
-}
-.alert-dismissable,
-.alert-dismissible {
- padding-right: 35px;
-}
-.alert-dismissable .close,
-.alert-dismissible .close {
- position: relative;
- top: -2px;
- right: -21px;
- color: inherit;
-}
-.alert-success {
- color: #3c763d;
- background-color: #dff0d8;
- border-color: #d6e9c6;
-}
-.alert-success hr {
- border-top-color: #c9e2b3;
-}
-.alert-success .alert-link {
- color: #2b542c;
-}
-.alert-info {
- color: #31708f;
- background-color: #d9edf7;
- border-color: #bce8f1;
-}
-.alert-info hr {
- border-top-color: #a6e1ec;
-}
-.alert-info .alert-link {
- color: #245269;
-}
-.alert-warning {
- color: #8a6d3b;
- background-color: #fcf8e3;
- border-color: #faebcc;
-}
-.alert-warning hr {
- border-top-color: #f7e1b5;
-}
-.alert-warning .alert-link {
- color: #66512c;
-}
-.alert-danger {
- color: #a94442;
- background-color: #f2dede;
- border-color: #ebccd1;
-}
-.alert-danger hr {
- border-top-color: #e4b9c0;
-}
-.alert-danger .alert-link {
- color: #843534;
-}
-@-webkit-keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-@-o-keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-@keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-.progress {
- height: 20px;
- margin-bottom: 20px;
- overflow: hidden;
- background-color: #f5f5f5;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
-}
-.progress-bar {
- float: left;
- width: 0;
- height: 100%;
- font-size: 12px;
- line-height: 20px;
- color: #fff;
- text-align: center;
- background-color: #337ab7;
- -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
- -webkit-transition: width .6s ease;
- -o-transition: width .6s ease;
- transition: width .6s ease;
-}
-.progress-striped .progress-bar,
-.progress-bar-striped {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- -webkit-background-size: 40px 40px;
- background-size: 40px 40px;
-}
-.progress.active .progress-bar,
-.progress-bar.active {
- -webkit-animation: progress-bar-stripes 2s linear infinite;
- -o-animation: progress-bar-stripes 2s linear infinite;
- animation: progress-bar-stripes 2s linear infinite;
-}
-.progress-bar-success {
- background-color: #5cb85c;
-}
-.progress-striped .progress-bar-success {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.progress-bar-info {
- background-color: #5bc0de;
-}
-.progress-striped .progress-bar-info {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.progress-bar-warning {
- background-color: #f0ad4e;
-}
-.progress-striped .progress-bar-warning {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.progress-bar-danger {
- background-color: #d9534f;
-}
-.progress-striped .progress-bar-danger {
- background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
- background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
-}
-.media {
- margin-top: 15px;
-}
-.media:first-child {
- margin-top: 0;
-}
-.media,
-.media-body {
- overflow: hidden;
- zoom: 1;
-}
-.media-body {
- width: 10000px;
-}
-.media-object {
- display: block;
-}
-.media-object.img-thumbnail {
- max-width: none;
-}
-.media-right,
-.media > .pull-right {
- padding-left: 10px;
-}
-.media-left,
-.media > .pull-left {
- padding-right: 10px;
-}
-.media-left,
-.media-right,
-.media-body {
- display: table-cell;
- vertical-align: top;
-}
-.media-middle {
- vertical-align: middle;
-}
-.media-bottom {
- vertical-align: bottom;
-}
-.media-heading {
- margin-top: 0;
- margin-bottom: 5px;
-}
-.media-list {
- padding-left: 0;
- list-style: none;
-}
-.list-group {
- padding-left: 0;
- margin-bottom: 20px;
-}
-.list-group-item {
- position: relative;
- display: block;
- padding: 10px 15px;
- margin-bottom: -1px;
- background-color: #fff;
- border: 1px solid #ddd;
-}
-.list-group-item:first-child {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
-}
-.list-group-item:last-child {
- margin-bottom: 0;
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 4px;
-}
-a.list-group-item,
-button.list-group-item {
- color: #555;
-}
-a.list-group-item .list-group-item-heading,
-button.list-group-item .list-group-item-heading {
- color: #333;
-}
-a.list-group-item:hover,
-button.list-group-item:hover,
-a.list-group-item:focus,
-button.list-group-item:focus {
- color: #555;
- text-decoration: none;
- background-color: #f5f5f5;
-}
-button.list-group-item {
- width: 100%;
- text-align: left;
-}
-.list-group-item.disabled,
-.list-group-item.disabled:hover,
-.list-group-item.disabled:focus {
- color: #777;
- cursor: not-allowed;
- background-color: #eee;
-}
-.list-group-item.disabled .list-group-item-heading,
-.list-group-item.disabled:hover .list-group-item-heading,
-.list-group-item.disabled:focus .list-group-item-heading {
- color: inherit;
-}
-.list-group-item.disabled .list-group-item-text,
-.list-group-item.disabled:hover .list-group-item-text,
-.list-group-item.disabled:focus .list-group-item-text {
- color: #777;
-}
-.list-group-item.active,
-.list-group-item.active:hover,
-.list-group-item.active:focus {
- z-index: 2;
- color: #fff;
- background-color: #337ab7;
- border-color: #337ab7;
-}
-.list-group-item.active .list-group-item-heading,
-.list-group-item.active:hover .list-group-item-heading,
-.list-group-item.active:focus .list-group-item-heading,
-.list-group-item.active .list-group-item-heading > small,
-.list-group-item.active:hover .list-group-item-heading > small,
-.list-group-item.active:focus .list-group-item-heading > small,
-.list-group-item.active .list-group-item-heading > .small,
-.list-group-item.active:hover .list-group-item-heading > .small,
-.list-group-item.active:focus .list-group-item-heading > .small {
- color: inherit;
-}
-.list-group-item.active .list-group-item-text,
-.list-group-item.active:hover .list-group-item-text,
-.list-group-item.active:focus .list-group-item-text {
- color: #c7ddef;
-}
-.list-group-item-success {
- color: #3c763d;
- background-color: #dff0d8;
-}
-a.list-group-item-success,
-button.list-group-item-success {
- color: #3c763d;
-}
-a.list-group-item-success .list-group-item-heading,
-button.list-group-item-success .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-success:hover,
-button.list-group-item-success:hover,
-a.list-group-item-success:focus,
-button.list-group-item-success:focus {
- color: #3c763d;
- background-color: #d0e9c6;
-}
-a.list-group-item-success.active,
-button.list-group-item-success.active,
-a.list-group-item-success.active:hover,
-button.list-group-item-success.active:hover,
-a.list-group-item-success.active:focus,
-button.list-group-item-success.active:focus {
- color: #fff;
- background-color: #3c763d;
- border-color: #3c763d;
-}
-.list-group-item-info {
- color: #31708f;
- background-color: #d9edf7;
-}
-a.list-group-item-info,
-button.list-group-item-info {
- color: #31708f;
-}
-a.list-group-item-info .list-group-item-heading,
-button.list-group-item-info .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-info:hover,
-button.list-group-item-info:hover,
-a.list-group-item-info:focus,
-button.list-group-item-info:focus {
- color: #31708f;
- background-color: #c4e3f3;
-}
-a.list-group-item-info.active,
-button.list-group-item-info.active,
-a.list-group-item-info.active:hover,
-button.list-group-item-info.active:hover,
-a.list-group-item-info.active:focus,
-button.list-group-item-info.active:focus {
- color: #fff;
- background-color: #31708f;
- border-color: #31708f;
-}
-.list-group-item-warning {
- color: #8a6d3b;
- background-color: #fcf8e3;
-}
-a.list-group-item-warning,
-button.list-group-item-warning {
- color: #8a6d3b;
-}
-a.list-group-item-warning .list-group-item-heading,
-button.list-group-item-warning .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-warning:hover,
-button.list-group-item-warning:hover,
-a.list-group-item-warning:focus,
-button.list-group-item-warning:focus {
- color: #8a6d3b;
- background-color: #faf2cc;
-}
-a.list-group-item-warning.active,
-button.list-group-item-warning.active,
-a.list-group-item-warning.active:hover,
-button.list-group-item-warning.active:hover,
-a.list-group-item-warning.active:focus,
-button.list-group-item-warning.active:focus {
- color: #fff;
- background-color: #8a6d3b;
- border-color: #8a6d3b;
-}
-.list-group-item-danger {
- color: #a94442;
- background-color: #f2dede;
-}
-a.list-group-item-danger,
-button.list-group-item-danger {
- color: #a94442;
-}
-a.list-group-item-danger .list-group-item-heading,
-button.list-group-item-danger .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-danger:hover,
-button.list-group-item-danger:hover,
-a.list-group-item-danger:focus,
-button.list-group-item-danger:focus {
- color: #a94442;
- background-color: #ebcccc;
-}
-a.list-group-item-danger.active,
-button.list-group-item-danger.active,
-a.list-group-item-danger.active:hover,
-button.list-group-item-danger.active:hover,
-a.list-group-item-danger.active:focus,
-button.list-group-item-danger.active:focus {
- color: #fff;
- background-color: #a94442;
- border-color: #a94442;
-}
-.list-group-item-heading {
- margin-top: 0;
- margin-bottom: 5px;
-}
-.list-group-item-text {
- margin-bottom: 0;
- line-height: 1.3;
-}
-.panel {
- margin-bottom: 20px;
- background-color: #fff;
- border: 1px solid transparent;
- border-radius: 4px;
- -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
- box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
-}
-.panel-body {
- padding: 15px;
-}
-.panel-heading {
- padding: 10px 15px;
- border-bottom: 1px solid transparent;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
-}
-.panel-heading > .dropdown .dropdown-toggle {
- color: inherit;
-}
-.panel-title {
- margin-top: 0;
- margin-bottom: 0;
- font-size: 16px;
- color: inherit;
-}
-.panel-title > a,
-.panel-title > small,
-.panel-title > .small,
-.panel-title > small > a,
-.panel-title > .small > a {
- color: inherit;
-}
-.panel-footer {
- padding: 10px 15px;
- background-color: #f5f5f5;
- border-top: 1px solid #ddd;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .list-group,
-.panel > .panel-collapse > .list-group {
- margin-bottom: 0;
-}
-.panel > .list-group .list-group-item,
-.panel > .panel-collapse > .list-group .list-group-item {
- border-width: 1px 0;
- border-radius: 0;
-}
-.panel > .list-group:first-child .list-group-item:first-child,
-.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
- border-top: 0;
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
-}
-.panel > .list-group:last-child .list-group-item:last-child,
-.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
- border-bottom: 0;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
- border-top-left-radius: 0;
- border-top-right-radius: 0;
-}
-.panel-heading + .list-group .list-group-item:first-child {
- border-top-width: 0;
-}
-.list-group + .panel-footer {
- border-top-width: 0;
-}
-.panel > .table,
-.panel > .table-responsive > .table,
-.panel > .panel-collapse > .table {
- margin-bottom: 0;
-}
-.panel > .table caption,
-.panel > .table-responsive > .table caption,
-.panel > .panel-collapse > .table caption {
- padding-right: 15px;
- padding-left: 15px;
-}
-.panel > .table:first-child,
-.panel > .table-responsive:first-child > .table:first-child {
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
-}
-.panel > .table:first-child > thead:first-child > tr:first-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
-}
-.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
-.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
- border-top-left-radius: 3px;
-}
-.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
-.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
- border-top-right-radius: 3px;
-}
-.panel > .table:last-child,
-.panel > .table-responsive:last-child > .table:last-child {
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .table:last-child > tbody:last-child > tr:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
-.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
- border-bottom-left-radius: 3px;
-}
-.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
-.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
- border-bottom-right-radius: 3px;
-}
-.panel > .panel-body + .table,
-.panel > .panel-body + .table-responsive,
-.panel > .table + .panel-body,
-.panel > .table-responsive + .panel-body {
- border-top: 1px solid #ddd;
-}
-.panel > .table > tbody:first-child > tr:first-child th,
-.panel > .table > tbody:first-child > tr:first-child td {
- border-top: 0;
-}
-.panel > .table-bordered,
-.panel > .table-responsive > .table-bordered {
- border: 0;
-}
-.panel > .table-bordered > thead > tr > th:first-child,
-.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
-.panel > .table-bordered > tbody > tr > th:first-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
-.panel > .table-bordered > tfoot > tr > th:first-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
-.panel > .table-bordered > thead > tr > td:first-child,
-.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
-.panel > .table-bordered > tbody > tr > td:first-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
-.panel > .table-bordered > tfoot > tr > td:first-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
- border-left: 0;
-}
-.panel > .table-bordered > thead > tr > th:last-child,
-.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
-.panel > .table-bordered > tbody > tr > th:last-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
-.panel > .table-bordered > tfoot > tr > th:last-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
-.panel > .table-bordered > thead > tr > td:last-child,
-.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
-.panel > .table-bordered > tbody > tr > td:last-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
-.panel > .table-bordered > tfoot > tr > td:last-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
- border-right: 0;
-}
-.panel > .table-bordered > thead > tr:first-child > td,
-.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
-.panel > .table-bordered > tbody > tr:first-child > td,
-.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
-.panel > .table-bordered > thead > tr:first-child > th,
-.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
-.panel > .table-bordered > tbody > tr:first-child > th,
-.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
- border-bottom: 0;
-}
-.panel > .table-bordered > tbody > tr:last-child > td,
-.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
-.panel > .table-bordered > tfoot > tr:last-child > td,
-.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
-.panel > .table-bordered > tbody > tr:last-child > th,
-.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
-.panel > .table-bordered > tfoot > tr:last-child > th,
-.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
- border-bottom: 0;
-}
-.panel > .table-responsive {
- margin-bottom: 0;
- border: 0;
-}
-.panel-group {
- margin-bottom: 20px;
-}
-.panel-group .panel {
- margin-bottom: 0;
- border-radius: 4px;
-}
-.panel-group .panel + .panel {
- margin-top: 5px;
-}
-.panel-group .panel-heading {
- border-bottom: 0;
-}
-.panel-group .panel-heading + .panel-collapse > .panel-body,
-.panel-group .panel-heading + .panel-collapse > .list-group {
- border-top: 1px solid #ddd;
-}
-.panel-group .panel-footer {
- border-top: 0;
-}
-.panel-group .panel-footer + .panel-collapse .panel-body {
- border-bottom: 1px solid #ddd;
-}
-.panel-default {
- border-color: #ddd;
-}
-.panel-default > .panel-heading {
- color: #333;
- background-color: #f5f5f5;
- border-color: #ddd;
-}
-.panel-default > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #ddd;
-}
-.panel-default > .panel-heading .badge {
- color: #f5f5f5;
- background-color: #333;
-}
-.panel-default > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #ddd;
-}
-.panel-primary {
- border-color: #337ab7;
-}
-.panel-primary > .panel-heading {
- color: #fff;
- background-color: #337ab7;
- border-color: #337ab7;
-}
-.panel-primary > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #337ab7;
-}
-.panel-primary > .panel-heading .badge {
- color: #337ab7;
- background-color: #fff;
-}
-.panel-primary > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #337ab7;
-}
-.panel-success {
- border-color: #d6e9c6;
-}
-.panel-success > .panel-heading {
- color: #3c763d;
- background-color: #dff0d8;
- border-color: #d6e9c6;
-}
-.panel-success > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #d6e9c6;
-}
-.panel-success > .panel-heading .badge {
- color: #dff0d8;
- background-color: #3c763d;
-}
-.panel-success > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #d6e9c6;
-}
-.panel-info {
- border-color: #bce8f1;
-}
-.panel-info > .panel-heading {
- color: #31708f;
- background-color: #d9edf7;
- border-color: #bce8f1;
-}
-.panel-info > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #bce8f1;
-}
-.panel-info > .panel-heading .badge {
- color: #d9edf7;
- background-color: #31708f;
-}
-.panel-info > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #bce8f1;
-}
-.panel-warning {
- border-color: #faebcc;
-}
-.panel-warning > .panel-heading {
- color: #8a6d3b;
- background-color: #fcf8e3;
- border-color: #faebcc;
-}
-.panel-warning > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #faebcc;
-}
-.panel-warning > .panel-heading .badge {
- color: #fcf8e3;
- background-color: #8a6d3b;
-}
-.panel-warning > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #faebcc;
-}
-.panel-danger {
- border-color: #ebccd1;
-}
-.panel-danger > .panel-heading {
- color: #a94442;
- background-color: #f2dede;
- border-color: #ebccd1;
-}
-.panel-danger > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #ebccd1;
-}
-.panel-danger > .panel-heading .badge {
- color: #f2dede;
- background-color: #a94442;
-}
-.panel-danger > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #ebccd1;
-}
-.embed-responsive {
- position: relative;
- display: block;
- height: 0;
- padding: 0;
- overflow: hidden;
-}
-.embed-responsive .embed-responsive-item,
-.embed-responsive iframe,
-.embed-responsive embed,
-.embed-responsive object,
-.embed-responsive video {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 100%;
- border: 0;
-}
-.embed-responsive-16by9 {
- padding-bottom: 56.25%;
-}
-.embed-responsive-4by3 {
- padding-bottom: 75%;
-}
-.well {
- min-height: 20px;
- padding: 19px;
- margin-bottom: 20px;
- background-color: #f5f5f5;
- border: 1px solid #e3e3e3;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
-}
-.well blockquote {
- border-color: #ddd;
- border-color: rgba(0, 0, 0, .15);
-}
-.well-lg {
- padding: 24px;
- border-radius: 6px;
-}
-.well-sm {
- padding: 9px;
- border-radius: 3px;
-}
-.close {
- float: right;
- font-size: 21px;
- font-weight: bold;
- line-height: 1;
- color: #000;
- text-shadow: 0 1px 0 #fff;
- filter: alpha(opacity=20);
- opacity: .2;
-}
-.close:hover,
-.close:focus {
- color: #000;
- text-decoration: none;
- cursor: pointer;
- filter: alpha(opacity=50);
- opacity: .5;
-}
-button.close {
- -webkit-appearance: none;
- padding: 0;
- cursor: pointer;
- background: transparent;
- border: 0;
-}
-.modal-open {
- overflow: hidden;
-}
-.modal {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1050;
- display: none;
- overflow: hidden;
- -webkit-overflow-scrolling: touch;
- outline: 0;
-}
-.modal.fade .modal-dialog {
- -webkit-transition: -webkit-transform .3s ease-out;
- -o-transition: -o-transform .3s ease-out;
- transition: transform .3s ease-out;
- -webkit-transform: translate(0, -25%);
- -ms-transform: translate(0, -25%);
- -o-transform: translate(0, -25%);
- transform: translate(0, -25%);
-}
-.modal.in .modal-dialog {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
-}
-.modal-open .modal {
- overflow-x: hidden;
- overflow-y: auto;
-}
-.modal-dialog {
- position: relative;
- width: auto;
- margin: 10px;
-}
-.modal-content {
- position: relative;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, .2);
- border-radius: 6px;
- outline: 0;
- -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
- box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
-}
-.modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1040;
- background-color: #000;
-}
-.modal-backdrop.fade {
- filter: alpha(opacity=0);
- opacity: 0;
-}
-.modal-backdrop.in {
- filter: alpha(opacity=50);
- opacity: .5;
-}
-.modal-header {
- padding: 15px;
- border-bottom: 1px solid #e5e5e5;
-}
-.modal-header .close {
- margin-top: -2px;
-}
-.modal-title {
- margin: 0;
- line-height: 1.42857143;
-}
-.modal-body {
- position: relative;
- padding: 15px;
-}
-.modal-footer {
- padding: 15px;
- text-align: right;
- border-top: 1px solid #e5e5e5;
-}
-.modal-footer .btn + .btn {
- margin-bottom: 0;
- margin-left: 5px;
-}
-.modal-footer .btn-group .btn + .btn {
- margin-left: -1px;
-}
-.modal-footer .btn-block + .btn-block {
- margin-left: 0;
-}
-.modal-scrollbar-measure {
- position: absolute;
- top: -9999px;
- width: 50px;
- height: 50px;
- overflow: scroll;
-}
-@media (min-width: 768px) {
- .modal-dialog {
- width: 600px;
- margin: 30px auto;
- }
- .modal-content {
- -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
- box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
- }
- .modal-sm {
- width: 300px;
- }
-}
-@media (min-width: 992px) {
- .modal-lg {
- width: 900px;
- }
-}
-.tooltip {
- position: absolute;
- z-index: 1070;
- display: block;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 12px;
- font-style: normal;
- font-weight: normal;
- line-height: 1.42857143;
- text-align: left;
- text-align: start;
- text-decoration: none;
- text-shadow: none;
- text-transform: none;
- letter-spacing: normal;
- word-break: normal;
- word-spacing: normal;
- word-wrap: normal;
- white-space: normal;
- filter: alpha(opacity=0);
- opacity: 0;
-
- line-break: auto;
-}
-.tooltip.in {
- filter: alpha(opacity=90);
- opacity: .9;
-}
-.tooltip.top {
- padding: 5px 0;
- margin-top: -3px;
-}
-.tooltip.right {
- padding: 0 5px;
- margin-left: 3px;
-}
-.tooltip.bottom {
- padding: 5px 0;
- margin-top: 3px;
-}
-.tooltip.left {
- padding: 0 5px;
- margin-left: -3px;
-}
-.tooltip-inner {
- max-width: 200px;
- padding: 3px 8px;
- color: #fff;
- text-align: center;
- background-color: #000;
- border-radius: 4px;
-}
-.tooltip-arrow {
- position: absolute;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-.tooltip.top .tooltip-arrow {
- bottom: 0;
- left: 50%;
- margin-left: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000;
-}
-.tooltip.top-left .tooltip-arrow {
- right: 5px;
- bottom: 0;
- margin-bottom: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000;
-}
-.tooltip.top-right .tooltip-arrow {
- bottom: 0;
- left: 5px;
- margin-bottom: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000;
-}
-.tooltip.right .tooltip-arrow {
- top: 50%;
- left: 0;
- margin-top: -5px;
- border-width: 5px 5px 5px 0;
- border-right-color: #000;
-}
-.tooltip.left .tooltip-arrow {
- top: 50%;
- right: 0;
- margin-top: -5px;
- border-width: 5px 0 5px 5px;
- border-left-color: #000;
-}
-.tooltip.bottom .tooltip-arrow {
- top: 0;
- left: 50%;
- margin-left: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000;
-}
-.tooltip.bottom-left .tooltip-arrow {
- top: 0;
- right: 5px;
- margin-top: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000;
-}
-.tooltip.bottom-right .tooltip-arrow {
- top: 0;
- left: 5px;
- margin-top: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000;
-}
-.popover {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 1060;
- display: none;
- max-width: 276px;
- padding: 1px;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- font-style: normal;
- font-weight: normal;
- line-height: 1.42857143;
- text-align: left;
- text-align: start;
- text-decoration: none;
- text-shadow: none;
- text-transform: none;
- letter-spacing: normal;
- word-break: normal;
- word-spacing: normal;
- word-wrap: normal;
- white-space: normal;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, .2);
- border-radius: 6px;
- -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
- box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
-
- line-break: auto;
-}
-.popover.top {
- margin-top: -10px;
-}
-.popover.right {
- margin-left: 10px;
-}
-.popover.bottom {
- margin-top: 10px;
-}
-.popover.left {
- margin-left: -10px;
-}
-.popover-title {
- padding: 8px 14px;
- margin: 0;
- font-size: 14px;
- background-color: #f7f7f7;
- border-bottom: 1px solid #ebebeb;
- border-radius: 5px 5px 0 0;
-}
-.popover-content {
- padding: 9px 14px;
-}
-.popover > .arrow,
-.popover > .arrow:after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-.popover > .arrow {
- border-width: 11px;
-}
-.popover > .arrow:after {
- content: "";
- border-width: 10px;
-}
-.popover.top > .arrow {
- bottom: -11px;
- left: 50%;
- margin-left: -11px;
- border-top-color: #999;
- border-top-color: rgba(0, 0, 0, .25);
- border-bottom-width: 0;
-}
-.popover.top > .arrow:after {
- bottom: 1px;
- margin-left: -10px;
- content: " ";
- border-top-color: #fff;
- border-bottom-width: 0;
-}
-.popover.right > .arrow {
- top: 50%;
- left: -11px;
- margin-top: -11px;
- border-right-color: #999;
- border-right-color: rgba(0, 0, 0, .25);
- border-left-width: 0;
-}
-.popover.right > .arrow:after {
- bottom: -10px;
- left: 1px;
- content: " ";
- border-right-color: #fff;
- border-left-width: 0;
-}
-.popover.bottom > .arrow {
- top: -11px;
- left: 50%;
- margin-left: -11px;
- border-top-width: 0;
- border-bottom-color: #999;
- border-bottom-color: rgba(0, 0, 0, .25);
-}
-.popover.bottom > .arrow:after {
- top: 1px;
- margin-left: -10px;
- content: " ";
- border-top-width: 0;
- border-bottom-color: #fff;
-}
-.popover.left > .arrow {
- top: 50%;
- right: -11px;
- margin-top: -11px;
- border-right-width: 0;
- border-left-color: #999;
- border-left-color: rgba(0, 0, 0, .25);
-}
-.popover.left > .arrow:after {
- right: 1px;
- bottom: -10px;
- content: " ";
- border-right-width: 0;
- border-left-color: #fff;
-}
-.carousel {
- position: relative;
-}
-.carousel-inner {
- position: relative;
- width: 100%;
- overflow: hidden;
-}
-.carousel-inner > .item {
- position: relative;
- display: none;
- -webkit-transition: .6s ease-in-out left;
- -o-transition: .6s ease-in-out left;
- transition: .6s ease-in-out left;
-}
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
- line-height: 1;
-}
-@media all and (transform-3d), (-webkit-transform-3d) {
- .carousel-inner > .item {
- -webkit-transition: -webkit-transform .6s ease-in-out;
- -o-transition: -o-transform .6s ease-in-out;
- transition: transform .6s ease-in-out;
-
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
- -webkit-perspective: 1000px;
- perspective: 1000px;
- }
- .carousel-inner > .item.next,
- .carousel-inner > .item.active.right {
- left: 0;
- -webkit-transform: translate3d(100%, 0, 0);
- transform: translate3d(100%, 0, 0);
- }
- .carousel-inner > .item.prev,
- .carousel-inner > .item.active.left {
- left: 0;
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- }
- .carousel-inner > .item.next.left,
- .carousel-inner > .item.prev.right,
- .carousel-inner > .item.active {
- left: 0;
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- }
-}
-.carousel-inner > .active,
-.carousel-inner > .next,
-.carousel-inner > .prev {
- display: block;
-}
-.carousel-inner > .active {
- left: 0;
-}
-.carousel-inner > .next,
-.carousel-inner > .prev {
- position: absolute;
- top: 0;
- width: 100%;
-}
-.carousel-inner > .next {
- left: 100%;
-}
-.carousel-inner > .prev {
- left: -100%;
-}
-.carousel-inner > .next.left,
-.carousel-inner > .prev.right {
- left: 0;
-}
-.carousel-inner > .active.left {
- left: -100%;
-}
-.carousel-inner > .active.right {
- left: 100%;
-}
-.carousel-control {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- width: 15%;
- font-size: 20px;
- color: #fff;
- text-align: center;
- text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
- background-color: rgba(0, 0, 0, 0);
- filter: alpha(opacity=50);
- opacity: .5;
-}
-.carousel-control.left {
- background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
- background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
- background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
- background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
- background-repeat: repeat-x;
-}
-.carousel-control.right {
- right: 0;
- left: auto;
- background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
- background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
- background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
- background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
- background-repeat: repeat-x;
-}
-.carousel-control:hover,
-.carousel-control:focus {
- color: #fff;
- text-decoration: none;
- filter: alpha(opacity=90);
- outline: 0;
- opacity: .9;
-}
-.carousel-control .icon-prev,
-.carousel-control .icon-next,
-.carousel-control .glyphicon-chevron-left,
-.carousel-control .glyphicon-chevron-right {
- position: absolute;
- top: 50%;
- z-index: 5;
- display: inline-block;
- margin-top: -10px;
-}
-.carousel-control .icon-prev,
-.carousel-control .glyphicon-chevron-left {
- left: 50%;
- margin-left: -10px;
-}
-.carousel-control .icon-next,
-.carousel-control .glyphicon-chevron-right {
- right: 50%;
- margin-right: -10px;
-}
-.carousel-control .icon-prev,
-.carousel-control .icon-next {
- width: 20px;
- height: 20px;
- font-family: serif;
- line-height: 1;
-}
-.carousel-control .icon-prev:before {
- content: '\2039';
-}
-.carousel-control .icon-next:before {
- content: '\203a';
-}
-.carousel-indicators {
- position: absolute;
- bottom: 10px;
- left: 50%;
- z-index: 15;
- width: 60%;
- padding-left: 0;
- margin-left: -30%;
- text-align: center;
- list-style: none;
-}
-.carousel-indicators li {
- display: inline-block;
- width: 10px;
- height: 10px;
- margin: 1px;
- text-indent: -999px;
- cursor: pointer;
- background-color: #000 \9;
- background-color: rgba(0, 0, 0, 0);
- border: 1px solid #fff;
- border-radius: 10px;
-}
-.carousel-indicators .active {
- width: 12px;
- height: 12px;
- margin: 0;
- background-color: #fff;
-}
-.carousel-caption {
- position: absolute;
- right: 15%;
- bottom: 20px;
- left: 15%;
- z-index: 10;
- padding-top: 20px;
- padding-bottom: 20px;
- color: #fff;
- text-align: center;
- text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
-}
-.carousel-caption .btn {
- text-shadow: none;
-}
-@media screen and (min-width: 768px) {
- .carousel-control .glyphicon-chevron-left,
- .carousel-control .glyphicon-chevron-right,
- .carousel-control .icon-prev,
- .carousel-control .icon-next {
- width: 30px;
- height: 30px;
- margin-top: -10px;
- font-size: 30px;
- }
- .carousel-control .glyphicon-chevron-left,
- .carousel-control .icon-prev {
- margin-left: -10px;
- }
- .carousel-control .glyphicon-chevron-right,
- .carousel-control .icon-next {
- margin-right: -10px;
- }
- .carousel-caption {
- right: 20%;
- left: 20%;
- padding-bottom: 30px;
- }
- .carousel-indicators {
- bottom: 20px;
- }
-}
-.clearfix:before,
-.clearfix:after,
-.dl-horizontal dd:before,
-.dl-horizontal dd:after,
-.container:before,
-.container:after,
-.container-fluid:before,
-.container-fluid:after,
-.row:before,
-.row:after,
-.form-horizontal .form-group:before,
-.form-horizontal .form-group:after,
-.btn-toolbar:before,
-.btn-toolbar:after,
-.btn-group-vertical > .btn-group:before,
-.btn-group-vertical > .btn-group:after,
-.nav:before,
-.nav:after,
-.navbar:before,
-.navbar:after,
-.navbar-header:before,
-.navbar-header:after,
-.navbar-collapse:before,
-.navbar-collapse:after,
-.pager:before,
-.pager:after,
-.panel-body:before,
-.panel-body:after,
-.modal-header:before,
-.modal-header:after,
-.modal-footer:before,
-.modal-footer:after {
- display: table;
- content: " ";
-}
-.clearfix:after,
-.dl-horizontal dd:after,
-.container:after,
-.container-fluid:after,
-.row:after,
-.form-horizontal .form-group:after,
-.btn-toolbar:after,
-.btn-group-vertical > .btn-group:after,
-.nav:after,
-.navbar:after,
-.navbar-header:after,
-.navbar-collapse:after,
-.pager:after,
-.panel-body:after,
-.modal-header:after,
-.modal-footer:after {
- clear: both;
-}
-.center-block {
- display: block;
- margin-right: auto;
- margin-left: auto;
-}
-.pull-right {
- float: right !important;
-}
-.pull-left {
- float: left !important;
-}
-.hide {
- display: none !important;
-}
-.show {
- display: block !important;
-}
-.invisible {
- visibility: hidden;
-}
-.text-hide {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.hidden {
- display: none !important;
-}
-.affix {
- position: fixed;
-}
-@-ms-viewport {
- width: device-width;
-}
-.visible-xs,
-.visible-sm,
-.visible-md,
-.visible-lg {
- display: none !important;
-}
-.visible-xs-block,
-.visible-xs-inline,
-.visible-xs-inline-block,
-.visible-sm-block,
-.visible-sm-inline,
-.visible-sm-inline-block,
-.visible-md-block,
-.visible-md-inline,
-.visible-md-inline-block,
-.visible-lg-block,
-.visible-lg-inline,
-.visible-lg-inline-block {
- display: none !important;
-}
-@media (max-width: 767px) {
- .visible-xs {
- display: block !important;
- }
- table.visible-xs {
- display: table !important;
- }
- tr.visible-xs {
- display: table-row !important;
- }
- th.visible-xs,
- td.visible-xs {
- display: table-cell !important;
- }
-}
-@media (max-width: 767px) {
- .visible-xs-block {
- display: block !important;
- }
-}
-@media (max-width: 767px) {
- .visible-xs-inline {
- display: inline !important;
- }
-}
-@media (max-width: 767px) {
- .visible-xs-inline-block {
- display: inline-block !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm {
- display: block !important;
- }
- table.visible-sm {
- display: table !important;
- }
- tr.visible-sm {
- display: table-row !important;
- }
- th.visible-sm,
- td.visible-sm {
- display: table-cell !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-block {
- display: block !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-inline {
- display: inline !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-inline-block {
- display: inline-block !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md {
- display: block !important;
- }
- table.visible-md {
- display: table !important;
- }
- tr.visible-md {
- display: table-row !important;
- }
- th.visible-md,
- td.visible-md {
- display: table-cell !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-block {
- display: block !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-inline {
- display: inline !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-inline-block {
- display: inline-block !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg {
- display: block !important;
- }
- table.visible-lg {
- display: table !important;
- }
- tr.visible-lg {
- display: table-row !important;
- }
- th.visible-lg,
- td.visible-lg {
- display: table-cell !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg-block {
- display: block !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg-inline {
- display: inline !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg-inline-block {
- display: inline-block !important;
- }
-}
-@media (max-width: 767px) {
- .hidden-xs {
- display: none !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .hidden-sm {
- display: none !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .hidden-md {
- display: none !important;
- }
-}
-@media (min-width: 1200px) {
- .hidden-lg {
- display: none !important;
- }
-}
-.visible-print {
- display: none !important;
-}
-@media print {
- .visible-print {
- display: block !important;
- }
- table.visible-print {
- display: table !important;
- }
- tr.visible-print {
- display: table-row !important;
- }
- th.visible-print,
- td.visible-print {
- display: table-cell !important;
- }
-}
-.visible-print-block {
- display: none !important;
-}
-@media print {
- .visible-print-block {
- display: block !important;
- }
-}
-.visible-print-inline {
- display: none !important;
-}
-@media print {
- .visible-print-inline {
- display: inline !important;
- }
-}
-.visible-print-inline-block {
- display: none !important;
-}
-@media print {
- .visible-print-inline-block {
- display: inline-block !important;
- }
-}
-@media print {
- .hidden-print {
- display: none !important;
- }
-}
-/*# sourceMappingURL=bootstrap.css.map */
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css.map b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css.map
deleted file mode 100644
index f010c82d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["bootstrap.css","less/normalize.less","less/print.less","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"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AW,iBAAA;CHsR9C;AGrRmC;EAAW,iBAAA;CHwR9C;AGvRmC;EAAW,iBAAA;CH0R9C;AGzRmC;EAAW,iBAAA;CH4R9C;AG3RmC;EAAW,iBAAA;CH8R9C;AG7RmC;EAAW,iBAAA;CHgS9C;AG/RmC;EAAW,iBAAA;CHkS9C;AGjSmC;EAAW,iBAAA;CHoS9C;AGnSmC;EAAW,iBAAA;CHsS9C;AGrSmC;EAAW,iBAAA;CHwS9C;AGvSmC;EAAW,iBAAA;CH0S9C;AGzSmC;EAAW,iBAAA;CH4S9C;AG3SmC;EAAW,iBAAA;CH8S9C;AG7SmC;EAAW,iBAAA;CHgT9C;AG/SmC;EAAW,iBAAA;CHkT9C;AGjTmC;EAAW,iBAAA;CHoT9C;AGnTmC;EAAW,iBAAA;CHsT9C;AGrTmC;EAAW,iBAAA;CHwT9C;AGvTmC;EAAW,iBAAA;CH0T9C;AGzTmC;EAAW,iBAAA;CH4T9C;AG3TmC;EAAW,iBAAA;CH8T9C;AG7TmC;EAAW,iBAAA;CHgU9C;AG/TmC;EAAW,iBAAA;CHkU9C;AGjUmC;EAAW,iBAAA;CHoU9C;AGnUmC;EAAW,iBAAA;CHsU9C;AGrUmC;EAAW,iBAAA;CHwU9C;AGvUmC;EAAW,iBAAA;CH0U9C;AGzUmC;EAAW,iBAAA;CH4U9C;AG3UmC;EAAW,iBAAA;CH8U9C;AG7UmC;EAAW,iBAAA;CHgV9C;AG/UmC;EAAW,iBAAA;CHkV9C;AGjVmC;EAAW,iBAAA;CHoV9C;AGnVmC;EAAW,iBAAA;CHsV9C;AGrVmC;EAAW,iBAAA;CHwV9C;AGvVmC;EAAW,iBAAA;CH0V9C;AGzVmC;EAAW,iBAAA;CH4V9C;AG3VmC;EAAW,iBAAA;CH8V9C;AG7VmC;EAAW,iBAAA;CHgW9C;AG/VmC;EAAW,iBAAA;CHkW9C;AGjWmC;EAAW,iBAAA;CHoW9C;AGnWmC;EAAW,iBAAA;CHsW9C;AGrWmC;EAAW,iBAAA;CHwW9C;AGvWmC;EAAW,iBAAA;CH0W9C;AGzWmC;EAAW,iBAAA;CH4W9C;AG3WmC;EAAW,iBAAA;CH8W9C;AG7WmC;EAAW,iBAAA;CHgX9C;AG/WmC;EAAW,iBAAA;CHkX9C;AGjXmC;EAAW,iBAAA;CHoX9C;AGnXmC;EAAW,iBAAA;CHsX9C;AGrXmC;EAAW,iBAAA;CHwX9C;AGvXmC;EAAW,iBAAA;CH0X9C;AGzXmC;EAAW,iBAAA;CH4X9C;AG3XmC;EAAW,iBAAA;CH8X9C;AG7XmC;EAAW,iBAAA;CHgY9C;AG/XmC;EAAW,iBAAA;CHkY9C;AGjYmC;EAAW,iBAAA;CHoY9C;AGnYmC;EAAW,iBAAA;CHsY9C;AGrYmC;EAAW,iBAAA;CHwY9C;AGvYmC;EAAW,iBAAA;CH0Y9C;AGzYmC;EAAW,iBAAA;CH4Y9C;AG3YmC;EAAW,iBAAA;CH8Y9C;AG7YmC;EAAW,iBAAA;CHgZ9C;AG/YmC;EAAW,iBAAA;CHkZ9C;AGjZmC;EAAW,iBAAA;CHoZ9C;AGnZmC;EAAW,iBAAA;CHsZ9C;AGrZmC;EAAW,iBAAA;CHwZ9C;AGvZmC;EAAW,iBAAA;CH0Z9C;AGzZmC;EAAW,iBAAA;CH4Z9C;AG3ZmC;EAAW,iBAAA;CH8Z9C;AG7ZmC;EAAW,iBAAA;CHga9C;AG/ZmC;EAAW,iBAAA;CHka9C;AGjamC;EAAW,iBAAA;CHoa9C;AGnamC;EAAW,iBAAA;CHsa9C;AGramC;EAAW,iBAAA;CHwa9C;AGvamC;EAAW,iBAAA;CH0a9C;AGzamC;EAAW,iBAAA;CH4a9C;AG3amC;EAAW,iBAAA;CH8a9C;AG7amC;EAAW,iBAAA;CHgb9C;AG/amC;EAAW,iBAAA;CHkb9C;AGjbmC;EAAW,iBAAA;CHob9C;AGnbmC;EAAW,iBAAA;CHsb9C;AGrbmC;EAAW,iBAAA;CHwb9C;AGvbmC;EAAW,iBAAA;CH0b9C;AGzbmC;EAAW,iBAAA;CH4b9C;AG3bmC;EAAW,iBAAA;CH8b9C;AG7bmC;EAAW,iBAAA;CHgc9C;AG/bmC;EAAW,iBAAA;CHkc9C;AGjcmC;EAAW,iBAAA;CHoc9C;AGncmC;EAAW,iBAAA;CHsc9C;AGrcmC;EAAW,iBAAA;CHwc9C;AGvcmC;EAAW,iBAAA;CH0c9C;AGzcmC;EAAW,iBAAA;CH4c9C;AG3cmC;EAAW,iBAAA;CH8c9C;AG7cmC;EAAW,iBAAA;CHgd9C;AG/cmC;EAAW,iBAAA;CHkd9C;AGjdmC;EAAW,iBAAA;CHod9C;AGndmC;EAAW,iBAAA;CHsd9C;AGrdmC;EAAW,iBAAA;CHwd9C;AGvdmC;EAAW,iBAAA;CH0d9C;AGzdmC;EAAW,iBAAA;CH4d9C;AG3dmC;EAAW,iBAAA;CH8d9C;AG7dmC;EAAW,iBAAA;CHge9C;AG/dmC;EAAW,iBAAA;CHke9C;AGjemC;EAAW,iBAAA;CHoe9C;AGnemC;EAAW,iBAAA;CHse9C;AGremC;EAAW,iBAAA;CHwe9C;AGvemC;EAAW,iBAAA;CH0e9C;AGzemC;EAAW,iBAAA;CH4e9C;AG3emC;EAAW,iBAAA;CH8e9C;AG7emC;EAAW,iBAAA;CHgf9C;AG/emC;EAAW,iBAAA;CHkf9C;AGjfmC;EAAW,iBAAA;CHof9C;AGnfmC;EAAW,iBAAA;CHsf9C;AGrfmC;EAAW,iBAAA;CHwf9C;AGvfmC;EAAW,iBAAA;CH0f9C;AGzfmC;EAAW,iBAAA;CH4f9C;AG3fmC;EAAW,iBAAA;CH8f9C;AG7fmC;EAAW,iBAAA;CHggB9C;AG/fmC;EAAW,iBAAA;CHkgB9C;AGjgBmC;EAAW,iBAAA;CHogB9C;AGngBmC;EAAW,iBAAA;CHsgB9C;AGrgBmC;EAAW,iBAAA;CHwgB9C;AGvgBmC;EAAW,iBAAA;CH0gB9C;AGzgBmC;EAAW,iBAAA;CH4gB9C;AG3gBmC;EAAW,iBAAA;CH8gB9C;AG7gBmC;EAAW,iBAAA;CHghB9C;AG/gBmC;EAAW,iBAAA;CHkhB9C;AGjhBmC;EAAW,iBAAA;CHohB9C;AGnhBmC;EAAW,iBAAA;CHshB9C;AGrhBmC;EAAW,iBAAA;CHwhB9C;AGvhBmC;EAAW,iBAAA;CH0hB9C;AGzhBmC;EAAW,iBAAA;CH4hB9C;AG3hBmC;EAAW,iBAAA;CH8hB9C;AG7hBmC;EAAW,iBAAA;CHgiB9C;AG/hBmC;EAAW,iBAAA;CHkiB9C;AGjiBmC;EAAW,iBAAA;CHoiB9C;AGniBmC;EAAW,iBAAA;CHsiB9C;AGriBmC;EAAW,iBAAA;CHwiB9C;AGviBmC;EAAW,iBAAA;CH0iB9C;AGziBmC;EAAW,iBAAA;CH4iB9C;AG3iBmC;EAAW,iBAAA;CH8iB9C;AG7iBmC;EAAW,iBAAA;CHgjB9C;AG/iBmC;EAAW,iBAAA;CHkjB9C;AGjjBmC;EAAW,iBAAA;CHojB9C;AGnjBmC;EAAW,iBAAA;CHsjB9C;AGrjBmC;EAAW,iBAAA;CHwjB9C;AGvjBmC;EAAW,iBAAA;CH0jB9C;AGzjBmC;EAAW,iBAAA;CH4jB9C;AG3jBmC;EAAW,iBAAA;CH8jB9C;AG7jBmC;EAAW,iBAAA;CHgkB9C;AG/jBmC;EAAW,iBAAA;CHkkB9C;AGjkBmC;EAAW,iBAAA;CHokB9C;AGnkBmC;EAAW,iBAAA;CHskB9C;AGrkBmC;EAAW,iBAAA;CHwkB9C;AGvkBmC;EAAW,iBAAA;CH0kB9C;AGzkBmC;EAAW,iBAAA;CH4kB9C;AG3kBmC;EAAW,iBAAA;CH8kB9C;AG7kBmC;EAAW,iBAAA;CHglB9C;AG/kBmC;EAAW,iBAAA;CHklB9C;AGjlBmC;EAAW,iBAAA;CHolB9C;AGnlBmC;EAAW,iBAAA;CHslB9C;AGrlBmC;EAAW,iBAAA;CHwlB9C;AGvlBmC;EAAW,iBAAA;CH0lB9C;AGzlBmC;EAAW,iBAAA;CH4lB9C;AG3lBmC;EAAW,iBAAA;CH8lB9C;AG7lBmC;EAAW,iBAAA;CHgmB9C;AG/lBmC;EAAW,iBAAA;CHkmB9C;AGjmBmC;EAAW,iBAAA;CHomB9C;AGnmBmC;EAAW,iBAAA;CHsmB9C;AGrmBmC;EAAW,iBAAA;CHwmB9C;AGvmBmC;EAAW,iBAAA;CH0mB9C;AGzmBmC;EAAW,iBAAA;CH4mB9C;AG3mBmC;EAAW,iBAAA;CH8mB9C;AG7mBmC;EAAW,iBAAA;CHgnB9C;AG/mBmC;EAAW,iBAAA;CHknB9C;AGjnBmC;EAAW,iBAAA;CHonB9C;AGnnBmC;EAAW,iBAAA;CHsnB9C;AGrnBmC;EAAW,iBAAA;CHwnB9C;AGvnBmC;EAAW,iBAAA;CH0nB9C;AGznBmC;EAAW,iBAAA;CH4nB9C;AG3nBmC;EAAW,iBAAA;CH8nB9C;AG7nBmC;EAAW,iBAAA;CHgoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AG/nBmC;EAAW,iBAAA;CHkoB9C;AGjoBmC;EAAW,iBAAA;CHooB9C;AGnoBmC;EAAW,iBAAA;CHsoB9C;AGroBmC;EAAW,iBAAA;CHwoB9C;AGvoBmC;EAAW,iBAAA;CH0oB9C;AGzoBmC;EAAW,iBAAA;CH4oB9C;AG3oBmC;EAAW,iBAAA;CH8oB9C;AG7oBmC;EAAW,iBAAA;CHgpB9C;AG/oBmC;EAAW,iBAAA;CHkpB9C;AGjpBmC;EAAW,iBAAA;CHopB9C;AGnpBmC;EAAW,iBAAA;CHspB9C;AGrpBmC;EAAW,iBAAA;CHwpB9C;AGvpBmC;EAAW,iBAAA;CH0pB9C;AGzpBmC;EAAW,iBAAA;CH4pB9C;AG3pBmC;EAAW,iBAAA;CH8pB9C;AG7pBmC;EAAW,iBAAA;CHgqB9C;AG/pBmC;EAAW,iBAAA;CHkqB9C;AGjqBmC;EAAW,iBAAA;CHoqB9C;AGnqBmC;EAAW,iBAAA;CHsqB9C;AGrqBmC;EAAW,iBAAA;CHwqB9C;AGvqBmC;EAAW,iBAAA;CH0qB9C;AGzqBmC;EAAW,iBAAA;CH4qB9C;AG3qBmC;EAAW,iBAAA;CH8qB9C;AG7qBmC;EAAW,iBAAA;CHgrB9C;AG/qBmC;EAAW,iBAAA;CHkrB9C;AGjrBmC;EAAW,iBAAA;CHorB9C;AGnrBmC;EAAW,iBAAA;CHsrB9C;AGrrBmC;EAAW,iBAAA;CHwrB9C;AGvrBmC;EAAW,iBAAA;CH0rB9C;AGzrBmC;EAAW,iBAAA;CH4rB9C;AG3rBmC;EAAW,iBAAA;CH8rB9C;AG7rBmC;EAAW,iBAAA;CHgsB9C;AG/rBmC;EAAW,iBAAA;CHksB9C;AGjsBmC;EAAW,iBAAA;CHosB9C;AGnsBmC;EAAW,iBAAA;CHssB9C;AGrsBmC;EAAW,iBAAA;CHwsB9C;AGvsBmC;EAAW,iBAAA;CH0sB9C;AGzsBmC;EAAW,iBAAA;CH4sB9C;AG3sBmC;EAAW,iBAAA;CH8sB9C;AG7sBmC;EAAW,iBAAA;CHgtB9C;AG/sBmC;EAAW,iBAAA;CHktB9C;AGjtBmC;EAAW,iBAAA;CHotB9C;AGntBmC;EAAW,iBAAA;CHstB9C;AGrtBmC;EAAW,iBAAA;CHwtB9C;AGvtBmC;EAAW,iBAAA;CH0tB9C;AGztBmC;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ukDH;AexkDC;EACE,oBAAA;Cf0kDH;Ae3kDC;EACE,WAAA;Cf6kDH;Ae9kDC;EACE,oBAAA;CfglDH;AejlDC;EACE,mBAAA;CfmlDH;Ae/kDC;EACE,YAAA;CfilDH;AejmDC;EACE,WAAA;CfmmDH;AepmDC;EACE,mBAAA;CfsmDH;AevmDC;EACE,mBAAA;CfymDH;Ae1mDC;EACE,UAAA;Cf4mDH;Ae7mDC;EACE,mBAAA;Cf+mDH;AehnDC;EACE,mBAAA;CfknDH;AennDC;EACE,UAAA;CfqnDH;AetnDC;EACE,mBAAA;CfwnDH;AeznDC;EACE,mBAAA;Cf2nDH;Ae5nDC;EACE,UAAA;Cf8nDH;Ae/nDC;EACE,mBAAA;CfioDH;AeloDC;EACE,kBAAA;CfooDH;AehoDC;EACE,WAAA;CfkoDH;AepnDC;EACE,kBAAA;CfsnDH;AevnDC;EACE,0BAAA;CfynDH;Ae1nDC;EACE,0BAAA;Cf4nDH;Ae7nDC;EACE,iBAAA;Cf+nDH;AehoDC;EACE,0BAAA;CfkoDH;AenoDC;EACE,0BAAA;CfqoDH;AetoDC;EACE,iBAAA;CfwoDH;AezoDC;EACE,0BAAA;Cf2oDH;Ae5oDC;EACE,0BAAA;Cf8oDH;Ae/oDC;EACE,iBAAA;CfipDH;AelpDC;EACE,0BAAA;CfopDH;AerpDC;EACE,yBAAA;CfupDH;AexpDC;EACE,gBAAA;Cf0pDH;Aa1pDD;EElCI;IACE,YAAA;Gf+rDH;EexrDD;IACE,YAAA;Gf0rDD;Ee3rDD;IACE,oBAAA;Gf6rDD;Ee9rDD;IACE,oBAAA;GfgsDD;EejsDD;IACE,WAAA;GfmsDD;EepsDD;IACE,oBAAA;GfssDD;EevsDD;IACE,oBAAA;GfysDD;Ee1sDD;IACE,WAAA;Gf4sDD;Ee7sDD;IACE,oBAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,WAAA;GfqtDD;EettDD;IACE,oBAAA;GfwtDD;EeztDD;IACE,mBAAA;Gf2tDD;Ee7sDD;IACE,YAAA;Gf+sDD;EehtDD;IACE,oBAAA;GfktDD;EentDD;IACE,oBAAA;GfqtDD;EettDD;IACE,WAAA;GfwtDD;EeztDD;IACE,oBAAA;Gf2tDD;Ee5tDD;IACE,oBAAA;Gf8tDD;Ee/tDD;IACE,WAAA;GfiuDD;EeluDD;IACE,oBAAA;GfouDD;EeruDD;IACE,oBAAA;GfuuDD;EexuDD;IACE,WAAA;Gf0uDD;Ee3uDD;IACE,oBAAA;Gf6uDD;Ee9uDD;IACE,mBAAA;GfgvDD;Ee5uDD;IACE,YAAA;Gf8uDD;Ee9vDD;IACE,WAAA;GfgwDD;EejwDD;IACE,mBAAA;GfmwDD;EepwDD;IACE,mBAAA;GfswDD;EevwDD;IACE,UAAA;GfywDD;Ee1wDD;IACE,mBAAA;Gf4wDD;Ee7wDD;IACE,mBAAA;Gf+wDD;EehxDD;IACE,UAAA;GfkxDD;EenxDD;IACE,mBAAA;GfqxDD;EetxDD;IACE,mBAAA;GfwxDD;EezxDD;IACE,UAAA;Gf2xDD;Ee5xDD;IACE,mBAAA;Gf8xDD;Ee/xDD;IACE,kBAAA;GfiyDD;Ee7xDD;IACE,WAAA;Gf+xDD;EejxDD;IACE,kBAAA;GfmxDD;EepxDD;IACE,0BAAA;GfsxDD;EevxDD;IACE,0BAAA;GfyxDD;Ee1xDD;IACE,iBAAA;Gf4xDD;Ee7xDD;IACE,0BAAA;Gf+xDD;EehyDD;IACE,0BAAA;GfkyDD;EenyDD;IACE,iBAAA;GfqyDD;EetyDD;IACE,0BAAA;GfwyDD;EezyDD;IACE,0BAAA;Gf2yDD;Ee5yDD;IACE,iBAAA;Gf8yDD;Ee/yDD;IACE,0BAAA;GfizDD;EelzDD;IACE,yBAAA;GfozDD;EerzDD;IACE,gBAAA;GfuzDD;CACF;Aa/yDD;EE3CI;IACE,YAAA;Gf61DH;Eet1DD;IACE,YAAA;Gfw1DD;Eez1DD;IACE,oBAAA;Gf21DD;Ee51DD;IACE,oBAAA;Gf81DD;Ee/1DD;IACE,WAAA;Gfi2DD;Eel2DD;IACE,oBAAA;Gfo2DD;Eer2DD;IACE,oBAAA;Gfu2DD;Eex2DD;IACE,WAAA;Gf02DD;Ee32DD;IACE,oBAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,WAAA;Gfm3DD;Eep3DD;IACE,oBAAA;Gfs3DD;Eev3DD;IACE,mBAAA;Gfy3DD;Ee32DD;IACE,YAAA;Gf62DD;Ee92DD;IACE,oBAAA;Gfg3DD;Eej3DD;IACE,oBAAA;Gfm3DD;Eep3DD;IACE,WAAA;Gfs3DD;Eev3DD;IACE,oBAAA;Gfy3DD;Ee13DD;IACE,oBAAA;Gf43DD;Ee73DD;IACE,WAAA;Gf+3DD;Eeh4DD;IACE,oBAAA;Gfk4DD;Een4DD;IACE,oBAAA;Gfq4DD;Eet4DD;IACE,WAAA;Gfw4DD;Eez4DD;IACE,oBAAA;Gf24DD;Ee54DD;IACE,mBAAA;Gf84DD;Ee14DD;IACE,YAAA;Gf44DD;Ee55DD;IACE,WAAA;Gf85DD;Ee/5DD;IACE,mBAAA;Gfi6DD;Eel6DD;IACE,mBAAA;Gfo6DD;Eer6DD;IACE,UAAA;Gfu6DD;Eex6DD;IACE,mBAAA;Gf06DD;Ee36DD;IACE,mBAAA;Gf66DD;Ee96DD;IACE,UAAA;Gfg7DD;Eej7DD;IACE,mBAAA;Gfm7DD;Eep7DD;IACE,mBAAA;Gfs7DD;Eev7DD;IACE,UAAA;Gfy7DD;Ee17DD;IACE,mBAAA;Gf47DD;Ee77DD;IACE,kBAAA;Gf+7DD;Ee37DD;IACE,WAAA;Gf67DD;Ee/6DD;IACE,kBAAA;Gfi7DD;Eel7DD;IACE,0BAAA;Gfo7DD;Eer7DD;IACE,0BAAA;Gfu7DD;Eex7DD;IACE,iBAAA;Gf07DD;Ee37DD;IACE,0BAAA;Gf67DD;Ee97DD;IACE,0BAAA;Gfg8DD;Eej8DD;IACE,iBAAA;Gfm8DD;Eep8DD;IACE,0BAAA;Gfs8DD;Eev8DD;IACE,0BAAA;Gfy8DD;Ee18DD;IACE,iBAAA;Gf48DD;Ee78DD;IACE,0BAAA;Gf+8DD;Eeh9DD;IACE,yBAAA;Gfk9DD;Een9DD;IACE,gBAAA;Gfq9DD;CACF;Aa18DD;EE9CI;IACE,YAAA;Gf2/DH;Eep/DD;IACE,YAAA;Gfs/DD;Eev/DD;IACE,oBAAA;Gfy/DD;Ee1/DD;IACE,oBAAA;Gf4/DD;Ee7/DD;IACE,WAAA;Gf+/DD;EehgED;IACE,oBAAA;GfkgED;EengED;IACE,oBAAA;GfqgED;EetgED;IACE,WAAA;GfwgED;EezgED;IACE,oBAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,WAAA;GfihED;EelhED;IACE,oBAAA;GfohED;EerhED;IACE,mBAAA;GfuhED;EezgED;IACE,YAAA;Gf2gED;Ee5gED;IACE,oBAAA;Gf8gED;Ee/gED;IACE,oBAAA;GfihED;EelhED;IACE,WAAA;GfohED;EerhED;IACE,oBAAA;GfuhED;EexhED;IACE,oBAAA;Gf0hED;Ee3hED;IACE,WAAA;Gf6hED;Ee9hED;IACE,oBAAA;GfgiED;EejiED;IACE,oBAAA;GfmiED;EepiED;IACE,WAAA;GfsiED;EeviED;IACE,oBAAA;GfyiED;Ee1iED;IACE,mBAAA;Gf4iED;EexiED;IACE,YAAA;Gf0iED;Ee1jED;IACE,WAAA;Gf4jED;Ee7jED;IACE,mBAAA;Gf+jED;EehkED;IACE,mBAAA;GfkkED;EenkED;IACE,UAAA;GfqkED;EetkED;IACE,mBAAA;GfwkED;EezkED;IACE,mBAAA;Gf2kED;Ee5kED;IACE,UAAA;Gf8kED;Ee/kED;IACE,mBAAA;GfilED;EellED;IACE,mBAAA;GfolED;EerlED;IACE,UAAA;GfulED;EexlED;IACE,mBAAA;Gf0lED;Ee3lED;IACE,kBAAA;Gf6lED;EezlED;IACE,WAAA;Gf2lED;Ee7kED;IACE,kBAAA;Gf+kED;EehlED;IACE,0BAAA;GfklED;EenlED;IACE,0BAAA;GfqlED;EetlED;IACE,iBAAA;GfwlED;EezlED;IACE,0BAAA;Gf2lED;Ee5lED;IACE,0BAAA;Gf8lED;Ee/lED;IACE,iBAAA;GfimED;EelmED;IACE,0BAAA;GfomED;EermED;IACE,0BAAA;GfumED;EexmED;IACE,iBAAA;Gf0mED;Ee3mED;IACE,0BAAA;Gf6mED;Ee9mED;IACE,yBAAA;GfgnED;EejnED;IACE,gBAAA;GfmnED;CACF;AgBvrED;EACE,8BAAA;ChByrED;AgBvrED;EACE,iBAAA;EACA,oBAAA;EACA,eAAA;EACA,iBAAA;ChByrED;AgBvrED;EACE,iBAAA;ChByrED;AgBnrED;EACE,YAAA;EACA,gBA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","file":"bootstrap.css","sourcesContent":["/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n// without disabling user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\002a\"; } }\n.glyphicon-plus { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // WebKit-specific. Other browsers will keep their default outline style.\n // (Initially tried to also force default via `outline: initial`,\n // but that seems to erroneously remove the outline in Firefox altogether.)\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @dl-horizontal-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover,\n a&:focus {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover,\n a&:focus {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: floor((@gutter / 2));\n padding-right: ceil((@gutter / 2));\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: ceil((@gutter / -2));\n margin-right: floor((@gutter / -2));\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: ceil((@grid-gutter-width / 2));\n padding-right: floor((@grid-gutter-width / 2));\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Unstyle the caret on `<select>`s in IE10+.\n &::-ms-expand {\n border: 0;\n background-color: transparent;\n }\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655\n }\n\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848\n//\n// Note that as of 9.3, iOS doesn't support `week`.\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n &.form-control {\n line-height: @input-height-base;\n }\n\n &.input-sm,\n .input-group-sm & {\n line-height: @input-height-small;\n }\n\n &.input-lg,\n .input-group-lg & {\n line-height: @input-height-large;\n }\n }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: @form-group-margin-bottom;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n\n label {\n min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because <label>s don't inherit their parent's `cursor`.\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n &[disabled],\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used directly on <label>s\n.radio-inline,\n.checkbox-inline {\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used on elements with <label> descendants\n.radio,\n.checkbox {\n &.disabled,\n fieldset[disabled] & {\n label {\n cursor: @cursor-disabled;\n }\n }\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n // Size it appropriately next to real form controls\n padding-top: (@padding-base-vertical + 1);\n padding-bottom: (@padding-base-vertical + 1);\n // Remove default margin from `p`\n margin-bottom: 0;\n min-height: (@line-height-computed + @font-size-base);\n\n &.input-lg,\n &.input-sm {\n padding-left: 0;\n padding-right: 0;\n }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n//\n// The `.form-group-* form-control` variations are sadly duplicated to avoid the\n// issue documented in https://github.com/twbs/bootstrap/issues/15074.\n\n.input-sm {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n}\n.form-group-sm {\n .form-control {\n height: @input-height-small;\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n border-radius: @input-border-radius-small;\n }\n select.form-control {\n height: @input-height-small;\n line-height: @input-height-small;\n }\n textarea.form-control,\n select[multiple].form-control {\n height: auto;\n }\n .form-control-static {\n height: @input-height-small;\n min-height: (@line-height-computed + @font-size-small);\n padding: (@padding-small-vertical + 1) @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n }\n}\n\n.input-lg {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n}\n.form-group-lg {\n .form-control {\n height: @input-height-large;\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n border-radius: @input-border-radius-large;\n }\n select.form-control {\n height: @input-height-large;\n line-height: @input-height-large;\n }\n textarea.form-control,\n select[multiple].form-control {\n height: auto;\n }\n .form-control-static {\n height: @input-height-large;\n min-height: (@line-height-computed + @font-size-large);\n padding: (@padding-large-vertical + 1) @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n }\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n // Enable absolute positioning\n position: relative;\n\n // Ensure icons don't overlap text\n .form-control {\n padding-right: (@input-height-base * 1.25);\n }\n}\n// Feedback icon (requires .glyphicon classes)\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2; // Ensure icon is above input groups\n display: block;\n width: @input-height-base;\n height: @input-height-base;\n line-height: @input-height-base;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: @input-height-large;\n height: @input-height-large;\n line-height: @input-height-large;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: @input-height-small;\n height: @input-height-small;\n line-height: @input-height-small;\n}\n\n// Feedback states\n.has-success {\n .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n// Reposition feedback icon if input has visible label above\n.has-feedback label {\n\n & ~ .form-control-feedback {\n top: (@line-height-computed + 5); // Height of the `label` and its margin\n }\n &.sr-only ~ .form-control-feedback {\n top: 0;\n }\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n display: block; // account for any element using help-block\n margin-top: 5px;\n margin-bottom: 10px;\n color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n // Kick in the inline\n @media (min-width: @screen-sm-min) {\n // Inline-block all the things for \"inline\"\n .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // In navbar-form, allow folks to *not* use `.form-group`\n .form-control {\n display: inline-block;\n width: auto; // Prevent labels from stacking above inputs in `.form-group`\n vertical-align: middle;\n }\n\n // Make static controls behave like regular ones\n .form-control-static {\n display: inline-block;\n }\n\n .input-group {\n display: inline-table;\n vertical-align: middle;\n\n .input-group-addon,\n .input-group-btn,\n .form-control {\n width: auto;\n }\n }\n\n // Input groups need that 100% width though\n .input-group > .form-control {\n width: 100%;\n }\n\n .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // Remove default margin on radios/checkboxes that were used for stacking, and\n // then undo the floating of radios and checkboxes to match.\n .radio,\n .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n\n label {\n padding-left: 0;\n }\n }\n .radio input[type=\"radio\"],\n .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n\n // Re-override the feedback icon.\n .has-feedback .form-control-feedback {\n top: 0;\n }\n }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n // Consistent vertical alignment of radios and checkboxes\n //\n // Labels also get some reset styles, but that is scoped to a media query below.\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n // Account for padding we're adding to ensure the alignment and of help text\n // and other content below items\n .radio,\n .checkbox {\n min-height: (@line-height-computed + (@padding-base-vertical + 1));\n }\n\n // Make form groups behave like rows\n .form-group {\n .make-row();\n }\n\n // Reset spacing and right align labels, but scope to media queries so that\n // labels on narrow viewports stack the same as a default form example.\n @media (min-width: @screen-sm-min) {\n .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n right: floor((@grid-gutter-width / 2));\n }\n\n // Form group sizes\n //\n // Quick utility class for applying `.input-lg` and `.input-sm` styles to the\n // inputs and labels within a `.form-group`.\n .form-group-lg {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-large-vertical + 1);\n font-size: @font-size-large;\n }\n }\n }\n .form-group-sm {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-small-vertical + 1);\n font-size: @font-size-small;\n }\n }\n }\n}\n","// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline,\n &.radio label,\n &.checkbox label,\n &.radio-inline label,\n &.checkbox-inline label {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-border-focus` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n .opacity(.65);\n .box-shadow(none);\n }\n\n a& {\n &.disabled,\n fieldset[disabled] & {\n pointer-events: none; // Future-proof disabling of clicks on `<a>` elements\n }\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 25%);\n }\n &:hover {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n\n &:hover,\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 17%);\n border-color: darken(@border, 25%);\n }\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus,\n &.focus {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-top: @caret-width-base solid ~\"\\9\"; // IE8\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base dashed;\n border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn,\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n .border-top-radius(@btn-border-radius-base);\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n .border-top-radius(0);\n .border-bottom-radius(@btn-border-radius-base);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n\n &:focus {\n z-index: 3;\n }\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @input-border-radius;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @input-border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @input-border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n z-index: 2;\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 3;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding-top: @jumbotron-padding;\n padding-bottom: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: @jumbotron-heading-font-size;\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n\n // Fix collapse in webkit from max-width: 100% and display: table-cell.\n &.img-thumbnail {\n max-width: none;\n }\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n cursor: @cursor-disabled;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a&,\n button& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a,\n > small,\n > .small,\n > small > a,\n > .small > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group,\n > .panel-collapse > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n > .panel-heading + .panel-collapse > .list-group {\n .list-group-item:first-child {\n .border-top-radius(0);\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n\n caption {\n padding-left: @panel-body-padding;\n padding-right: @panel-body-padding;\n }\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n border-top-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n border-bottom-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive,\n > .table + .panel-body,\n > .table-responsive + .panel-body {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsible panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n\n + .panel-collapse > .panel-body,\n + .panel-collapse > .list-group {\n border-top: 1px solid @panel-inner-border;\n }\n }\n\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object,\n video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-small;\n\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n",".reset-text() {\n font-family: @font-family-base;\n // We deliberately do NOT reset font-size.\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: @line-height-base;\n text-align: left; // Fallback for where `start` is not supported\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-base;\n\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n\n // WebKit CSS3 transforms for supported devices\n @media all and (transform-3d), (-webkit-transform-3d) {\n .transition-transform(~'0.6s ease-in-out');\n .backface-visibility(~'hidden');\n .perspective(1000px);\n\n &.next,\n &.active.right {\n .translate3d(100%, 0, 0);\n left: 0;\n }\n &.prev,\n &.active.left {\n .translate3d(-100%, 0, 0);\n left: 0;\n }\n &.next.left,\n &.prev.right,\n &.active {\n .translate3d(0, 0, 0);\n left: 0;\n }\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: (@carousel-control-font-size * 1.5);\n height: (@carousel-control-font-size * 1.5);\n margin-top: (@carousel-control-font-size / -2);\n font-size: (@carousel-control-font-size * 1.5);\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: (@carousel-control-font-size / -2);\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: (@carousel-control-font-size / -2);\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table !important; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css
deleted file mode 100644
index ed3905e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}
-/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css.map b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css.map
deleted file mode 100644
index 6c7fa40b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["less/normalize.less","less/print.less","bootstrap.css","dist/css/bootstrap.css","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":"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kDG,edokDH,MAAA,acpkDG,edukDH,MAAA,IcvkDG,ed0kDH,MAAA,ac1kDG,ed6kDH,MAAA,ac7kDG,edglDH,MAAA,IchlDG,edmlDH,MAAA,ac9kDG,edilDH,MAAA,YchmDG,edmmDH,MAAA,KcnmDG,gBdsmDH,KAAA,KctmDG,gBdymDH,KAAA,aczmDG,gBd4mDH,KAAA,ac5mDG,ed+mDH,KAAA,Ic/mDG,edknDH,KAAA,aclnDG,edqnDH,KAAA,acrnDG,edwnDH,KAAA,IcxnDG,ed2nDH,KAAA,ac3nDG,ed8nDH,KAAA,ac9nDG,edioDH,KAAA,IcjoDG,edooDH,KAAA,ac/nDG,edkoDH,KAAA,YcnnDG,edsnDH,KAAA,KctnDG,kBdynDH,YAAA,KcznDG,kBd4nDH,YAAA,ac5nDG,kBd+nDH,YAAA,ac/nDG,iBdkoDH,YAAA,IcloDG,iBdqoDH,YAAA,acroDG,iBdwoDH,YAAA,acxoDG,iBd2oDH,YAAA,Ic3oDG,iBd8oDH,YAAA,ac9oDG,iBdipDH,YAAA,acjpDG,iBdopDH,YAAA,IcppDG,iBdupDH,YAAA,acvpDG,iBd0pDH,YAAA,Yc5rDG,iBACE,YAAA,EAOJ,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud0rDD,MAAA,Kc1rDC,Wd6rDD,MAAA,Kc7rDC,WdgsDD,MAAA,achsDC,WdmsDD,MAAA,acnsDC,UdssDD,MAAA,IctsDC,UdysDD,MAAA,aczsDC,Ud4sDD,MAAA,ac5sDC,Ud+sDD,MAAA,Ic/sDC,UdktDD,MAAA,acltDC,UdqtDD,MAAA,acrtDC,UdwtDD,MAAA,IcxtDC,Ud2tDD,MAAA,ac5sDC,Ud+sDD,MAAA,Yc/sDC,gBdktDD,MAAA,KcltDC,gBdqtDD,MAAA,acrtDC,gBdwtDD,MAAA,acxtDC,ed2tDD,MAAA,Ic3tDC,ed8tDD,MAAA,ac9tDC,ediuDD,MAAA,acjuDC,edouDD,MAAA,IcpuDC,eduuDD,MAAA,acvuDC,ed0uDD,MAAA,ac1uDC,ed6uDD,MAAA,Ic7uDC,edgvDD,MAAA,ac3uDC,ed8uDD,MAAA,Yc7vDC,edgwDD,MAAA,KchwDC,gBdmwDD,KAAA,KcnwDC,gBdswDD,KAAA,actwDC,gBdywDD,KAAA,aczwDC,ed4wDD,KAAA,Ic5wDC,ed+wDD,KAAA,ac/wDC,edkxDD,KAAA,aclxDC,edqxDD,KAAA,IcrxDC,edwxDD,KAAA,acxxDC,ed2xDD,KAAA,ac3xDC,ed8xDD,KAAA,Ic9xDC,ediyDD,KAAA,ac5xDC,ed+xDD,KAAA,YchxDC,edmxDD,KAAA,KcnxDC,kBdsxDD,YAAA,KctxDC,kBdyxDD,YAAA,aczxDC,kBd4xDD,YAAA,ac5xDC,iBd+xDD,YAAA,Ic/xDC,iBdkyDD,YAAA,aclyDC,iBdqyDD,YAAA,acryDC,iBdwyDD,YAAA,IcxyDC,iBd2yDD,YAAA,ac3yDC,iBd8yDD,YAAA,ac9yDC,iBdizDD,YAAA,IcjzDC,iBdozDD,YAAA,acpzDC,iBduzDD,YAAA,YY9yDD,iBE3CE,YAAA,GAQF,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Udw1DD,MAAA,Kcx1DC,Wd21DD,MAAA,Kc31DC,Wd81DD,MAAA,ac91DC,Wdi2DD,MAAA,acj2DC,Udo2DD,MAAA,Icp2DC,Udu2DD,MAAA,acv2DC,Ud02DD,MAAA,ac12DC,Ud62DD,MAAA,Ic72DC,Udg3DD,MAAA,ach3DC,Udm3DD,MAAA,acn3DC,Uds3DD,MAAA,Ict3DC,Udy3DD,MAAA,ac12DC,Ud62DD,MAAA,Yc72DC,gBdg3DD,MAAA,Kch3DC,gBdm3DD,MAAA,acn3DC,gBds3DD,MAAA,act3DC,edy3DD,MAAA,Icz3DC,ed43DD,MAAA,ac53DC,ed+3DD,MAAA,ac/3DC,edk4DD,MAAA,Icl4DC,edq4DD,MAAA,acr4DC,edw4DD,MAAA,acx4DC,ed24DD,MAAA,Ic34DC,ed84DD,MAAA,acz4DC,ed44DD,MAAA,Yc35DC,ed85DD,MAAA,Kc95DC,gBdi6DD,KAAA,Kcj6DC,gBdo6DD,KAAA,acp6DC,gBdu6DD,KAAA,acv6DC,ed06DD,KAAA,Ic16DC,ed66DD,KAAA,ac76DC,edg7DD,KAAA,ach7DC,edm7DD,KAAA,Icn7DC,eds7DD,KAAA,act7DC,edy7DD,KAAA,acz7DC,ed47DD,KAAA,Ic57DC,ed+7DD,KAAA,ac17DC,ed67DD,KAAA,Yc96DC,edi7DD,KAAA,Kcj7DC,kBdo7DD,YAAA,Kcp7DC,kBdu7DD,YAAA,acv7DC,kBd07DD,YAAA,ac17DC,iBd67DD,YAAA,Ic77DC,iBdg8DD,YAAA,ach8DC,iBdm8DD,YAAA,acn8DC,iBds8DD,YAAA,Ict8DC,iBdy8DD,YAAA,acz8DC,iBd48DD,YAAA,ac58DC,iBd+8DD,YAAA,Ic/8DC,iBdk9DD,YAAA,acl9DC,iBdq9DD,YAAA,YYz8DD,iBE9CE,YAAA,GAQF,0BACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Uds/DD,MAAA,Kct/DC,Wdy/DD,MAAA,Kcz/DC,Wd4/DD,MAAA,ac5/DC,Wd+/DD,MAAA,ac//DC,UdkgED,MAAA,IclgEC,UdqgED,MAAA,acrgEC,UdwgED,MAAA,acxgEC,Ud2gED,MAAA,Ic3gEC,Ud8gED,MAAA,ac9gEC,UdihED,MAAA,acjhEC,UdohED,MAAA,IcphEC,UduhED,MAAA,acxgEC,Ud2gED,MAAA,Yc3gEC,gBd8gED,MAAA,Kc9gEC,gBdihED,MAAA,acjhEC,gBdohED,MAAA,acphEC,eduhED,MAAA,IcvhEC,ed0hED,MAAA,ac1hEC,ed6hED,MAAA,ac7hEC,edgiED,MAAA,IchiEC,edmiED,MAAA,acniEC,edsiED,MAAA,actiEC,edyiED,MAAA,IcziEC,ed4iED,MAAA,acviEC,ed0iED,MAAA,YczjEC,ed4jED,MAAA,Kc5jEC,gBd+jED,KAAA,Kc/jEC,gBdkkED,KAAA,aclkEC,gBdqkED,KAAA,acrkEC,edwkED,KAAA,IcxkEC,ed2kED,KAAA,ac3kEC,ed8kED,KAAA,ac9kEC,edilED,KAAA,IcjlEC,edolED,KAAA,acplEC,edulED,KAAA,acvlEC,ed0lED,KAAA,Ic1lEC,ed6lED,KAAA,acxlEC,ed2lED,KAAA,Yc5kEC,ed+kED,KAAA,Kc/kEC,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A,KlBq7FM,WAAY,KkBn7FhB,QAAA,IASN,eC3DE,yBACA,eAAA,KpBi+FD,aoB99FC,MAAA,KnB0+FA,iBAAkB,KmBx+FhB,aAAA,KpBk+FH,mBoBh+FO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBi+FH,mBoB99FC,MAAA,KnB0+FA,iBAAkB,QAClB,aAAc,QmBt+FR,oBADJ,oBpBi+FH,mCoB99FG,MAAA,KnB0+FF,iBAAkB,QAClB,aAAc,QmBt+FN,0BnB4+FV,0BAHA,0BmB1+FM,0BnB4+FN,0BAHA,0BDFC,yCoBx+FK,yCnB4+FN,yCmBv+FE,MAAA,KnB++FA,iBAAkB,QAClB,aAAc,QmBx+FZ,oBpBg+FH,oBoBh+FG,mCnB6+FF,iBAAkB,KmBz+FV,4BnB8+FV,4BAHA,4BDHC,6BCOD,6BAHA,6BkB39FA,sCClBM,sCnB8+FN,sCmBx+FI,iBAAA,KACA,aAAA,KDcJ,oBC9DE,MAAA,KACA,iBAAA,KpB0hGD,aoBvhGC,MAAA,KnBmiGA,iBAAkB,QmBjiGhB,aAAA,QpB2hGH,mBoBzhGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB0hGH,mBoBvhGC,MAAA,KnBmiGA,iBAAkB,QAClB,aAAc,QmB/hGR,oBADJ,oBpB0hGH,mCoBvhGG,MAAA,KnBmiGF,iBAAkB,QAClB,aAAc,QmB/hGN,0BnBqiGV,0BAHA,0BmBniGM,0BnBqiGN,0BAHA,0BDFC,yCoBjiGK,yCnBqiGN,yCmBhiGE,MAAA,KnBwiGA,iBAAkB,QAClB,aAAc,QmBjiGZ,oBpByhGH,oBoBzhGG,mCnBsiGF,iBAAkB,KmBliGV,4BnBuiGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBjhGA,sCCrBM,sCnBuiGN,sCmBjiGI,iBAAA,QACA,aAAA,QDkBJ,oBClEE,MAAA,QACA,iBAAA,KpBmlGD,aoBhlGC,MAAA,KnB4lGA,iBAAkB,QmB1lGhB,aAAA,QpBolGH,mBoBllGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBmlGH,mBoBhlGC,MAAA,KnB4lGA,iBAAkB,QAClB,aAAc,QmBxlGR,oBADJ,oBpBmlGH,mCoBhlGG,MAAA,KnB4lGF,iBAAkB,QAClB,aAAc,QmBxlGN,0BnB8lGV,0BAHA,0BmB5lGM,0BnB8lGN,0BAHA,0BDFC,yCoB1lGK,yCnB8lGN,yCmBzlGE,MAAA,KnBimGA,iBAAkB,QAClB,aAAc,QmB1lGZ,oBpBklGH,oBoBllGG,mCnB+lGF,iBAAkB,KmB3lGV,4BnBgmGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBtkGA,sCCzBM,sCnBgmGN,sCmB1lGI,iBAAA,QACA,aAAA,QDsBJ,oBCtEE,MAAA,QACA,iBAAA,KpB4oGD,UoBzoGC,MAAA,KnBqpGA,iBAAkB,QmBnpGhB,aAAA,QpB6oGH,gBoB3oGO,gBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB4oGH,gBoBzoGC,MAAA,KnBqpGA,iBAAkB,QAClB,aAAc,QmBjpGR,iBADJ,iBpB4oGH,gCoBzoGG,MAAA,KnBqpGF,iBAAkB,QAClB,aAAc,QmBjpGN,uBnBupGV,uBAHA,uBmBrpGM,uBnBupGN,uBAHA,uBDFC,sCoBnpGK,sCnBupGN,sCmBlpGE,MAAA,KnB0pGA,iBAAkB,QAClB,aAAc,QmBnpGZ,iBpB2oGH,iBoB3oGG,gCnBwpGF,iBAAkB,KmBppGV,yBnBypGV,yBAHA,yBDHC,0BCOD,0BAHA,0BkB3nGA,mCC7BM,mCnBypGN,mCmBnpGI,iBAAA,QACA,aAAA,QD0BJ,iBC1EE,MAAA,QACA,iBAAA,KpBqsGD,aoBlsGC,MAAA,KnB8sGA,iBAAkB,QmB5sGhB,aAAA,QpBssGH,mBoBpsGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBqsGH,mBoBlsGC,MAAA,KnB8sGA,iBAAkB,QAClB,aAAc,QmB1sGR,oBADJ,oBpBqsGH,mCoBlsGG,MAAA,KnB8sGF,iBAAkB,QAClB,aAAc,QmB1sGN,0BnBgtGV,0BAHA,0BmB9sGM,0BnBgtGN,0BAHA,0BDFC,yCoB5sGK,yCnBgtGN,yCmB3sGE,MAAA,KnBmtGA,iBAAkB,QAClB,aAAc,QmB5sGZ,oBpBosGH,oBoBpsGG,mCnBitGF,iBAAkB,KmB7sGV,4BnBktGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBhrGA,sCCjC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A,QkDrxKC,WAAY,IAAI,MAAM,KjDizKtB,2BAA4B,IiD9yK1B,0BAAA,IAHJ,mBAAA,mCAMM,cAAA,ElDwxKL,oCkDnxKG,oDjD+yKF,aAAc,IAAI,EiD7yKZ,cAAA,EvBtEL,4D3B61KF,4EkDjxKG,WAAA,EjD6yKF,uBAAwB,IiD3yKlB,wBAAA,IvBtEL,0D3B21KF,0EkD1yKC,cAAe,EvB1Df,2BAAA,IACC,0BAAA,IuB0FH,+EAEI,uBAAA,ElD8wKH,wBAAA,EkD1wKC,wDlD6wKD,iBAAA,EC4BD,0BACE,iBAAkB,EiDlyKpB,8BlD0wKC,ckD1wKD,gCjDuyKE,cAAe,EiDvyKjB,sCAQM,sBlDwwKL,wCC4BC,cAAe,K0Br5Kf,aAAA,KuByGF,wDlDqxKC,0BC4BC,uBAAwB,IACxB,wBAAyB,IiDlzK3B,yFAoBQ,yFlDwwKP,2DkDzwKO,2DjDqyKN,uBAAwB,IACxB,wBAAyB,IAK3B,wGiD9zKA,wGjD4zKA,wGDtBC,wGCuBD,0EiD7zKA,0EjD2zKA,0EiDnyKU,0EjD2yKR,uBAAwB,IAK1B,uGiDx0KA,uGjDs0KA,uGDtBC,uGCuBD,yEiDv0KA,yEjDq0KA,yEiDzyKU,yEvB7HR,wBAAA,IuBiGF,sDlDqzKC,yBC4BC,2BAA4B,IAC5B,0BAA2B,IiDxyKrB,qFA1CR,qFAyCQ,wDlDmxKP,wDC4BC,2BAA4B,IAC5B,0BAA2B,IAG7B,oGDtBC,oGCwBD,oGiD91KA,oGjD21KA,uEiD7yKU,uEjD+yKV,uEiD71KA,uEjDm2KE,0BAA2B,IAG7B,mGDtBC,mGCwBD,mGiDx2KA,mGjDq2KA,sEiDnzKU,sEjDqzKV,sEiDv2KA,sEjD62KE,2BAA4B,IiDlzK1B,0BlD2xKH,qCkDt1KD,0BAAA,qCA+DI,WAAA,IAAA,MAAA,KA/DJ,kDAAA,kDAmEI,WAAA,EAnEJ,uBAAA,yCjD23KE,OAAQ,EiDjzKA,+CjDqzKV,+CiD/3KA,+CjDi4KA,+CAEA,+CANA,+CDjBC,iECoBD,iEiDh4KA,iEjDk4KA,iEAEA,iEANA,iEAWE,YAAa,EiD3zKL,8CjD+zKV,8CiD74KA,8CjD+4KA,8CAEA,8CANA,8CDjBC,gECo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Dk2MD,kBACF,QAAA,iB+D91MG,yB/Dk2MD,mBACF,QAAA,kBgEh6MC,yBhEo6MC,yBgEn6MD,QAAA,wBACA,+CAAU,YhEw6MT,QAAA,gBC4BD,iB+Dl8MU,QAAA,gBhE26MX,c+Dr2MG,QAAS,oB/Dy2MV,c+D32MC,c/D42MH,QAAA,sB+Dv2MG,+C/D22MD,kBACF,QAAA,iB+Dv2MG,+C/D22MD,mBACF,QAAA,kBgE97MC,+ChEk8MC,yBgEj8MD,QAAA,wBACA,gDAAU,YhEs8MT,QAAA,gBC4BD,iB+Dh+MU,QAAA,gBhEy8MX,c+D92MG,QAAS,oB/Dk3MV,c+Dp3MC,c/Dq3MH,QAAA,sB+Dh3MG,gD/Do3MD,kBACF,QAAA,iB+Dh3MG,gD/Do3MD,mBACF,QAAA,kBgE59MC,gDhEg+MC,yBgE/9MD,QAAA,wBACA,0BAAU,YhEo+MT,QAAA,gBC4BD,iB+D9/MU,QAAA,gBhEu+MX,c+Dv3MG,QAAS,oB/D23MV,c+D73MC,c/D83MH,QAAA,sB+Dz3MG,0B/D63MD,kBACF,QAAA,iB+Dz3MG,0B/D63MD,mBACF,QAAA,kBgEl/MC,0BhEs/MC,yBACF,QAAA,wBgEv/MC,yBhE2/MC,WACF,QAAA,gBgE5/MC,+ChEggNC,WACF,QAAA,gBgEjgNC,gDhEqgNC,WACF,QAAA,gBAGA,0B+Dh3MC,WA4BE,QAAS,gBC5LX,eAAU,QAAA,eACV,aAAU,ehEyhNT,QAAA,gBC4BD,oB+DnjNU,QAAA,gBhE4hNX,iB+D93MG,QAAS,oBAMX,iB/D23MD,iB+Dt2MG,QAAS,sB/D22MZ,qB+D/3MC,QAAS,e/Dk4MV,a+D53MC,qBAcE,QAAS,iB/Dm3MZ,sB+Dh4MC,QAAS,e/Dm4MV,a+D73MC,sBAOE,QAAS,kB/D23MZ,4B+D53MC,QAAS,eCpLT,ahEojNC,4BACF,QAAA,wBC6BD,aACE,cACE,QAAS","sourcesContent":["/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\n\n//\n// 1. Set default font family to sans-serif.\n// 2. Prevent iOS and IE text size adjust after device orientation change,\n// without disabling user zoom.\n//\n\nhtml {\n font-family: sans-serif; // 1\n -ms-text-size-adjust: 100%; // 2\n -webkit-text-size-adjust: 100%; // 2\n}\n\n//\n// Remove default margin.\n//\n\nbody {\n margin: 0;\n}\n\n// HTML5 display definitions\n// ==========================================================================\n\n//\n// Correct `block` display not defined for any HTML5 element in IE 8/9.\n// Correct `block` display not defined for `details` or `summary` in IE 10/11\n// and Firefox.\n// Correct `block` display not defined for `main` in IE 11.\n//\n\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\n\n//\n// 1. Correct `inline-block` display not defined in IE 8/9.\n// 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.\n//\n\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block; // 1\n vertical-align: baseline; // 2\n}\n\n//\n// Prevent modern browsers from displaying `audio` without controls.\n// Remove excess height in iOS 5 devices.\n//\n\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n\n//\n// Address `[hidden]` styling not present in IE 8/9/10.\n// Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.\n//\n\n[hidden],\ntemplate {\n display: none;\n}\n\n// Links\n// ==========================================================================\n\n//\n// Remove the gray background color from active links in IE 10.\n//\n\na {\n background-color: transparent;\n}\n\n//\n// Improve readability of focused elements when they are also in an\n// active/hover state.\n//\n\na:active,\na:hover {\n outline: 0;\n}\n\n// Text-level semantics\n// ==========================================================================\n\n//\n// Address styling not present in IE 8/9/10/11, Safari, and Chrome.\n//\n\nabbr[title] {\n border-bottom: 1px dotted;\n}\n\n//\n// Address style set to `bolder` in Firefox 4+, Safari, and Chrome.\n//\n\nb,\nstrong {\n font-weight: bold;\n}\n\n//\n// Address styling not present in Safari and Chrome.\n//\n\ndfn {\n font-style: italic;\n}\n\n//\n// Address variable `h1` font-size and margin within `section` and `article`\n// contexts in Firefox 4+, Safari, and Chrome.\n//\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n//\n// Address styling not present in IE 8/9.\n//\n\nmark {\n background: #ff0;\n color: #000;\n}\n\n//\n// Address inconsistent and variable font size in all browsers.\n//\n\nsmall {\n font-size: 80%;\n}\n\n//\n// Prevent `sub` and `sup` affecting `line-height` in all browsers.\n//\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsup {\n top: -0.5em;\n}\n\nsub {\n bottom: -0.25em;\n}\n\n// Embedded content\n// ==========================================================================\n\n//\n// Remove border when inside `a` element in IE 8/9/10.\n//\n\nimg {\n border: 0;\n}\n\n//\n// Correct overflow not hidden in IE 9/10/11.\n//\n\nsvg:not(:root) {\n overflow: hidden;\n}\n\n// Grouping content\n// ==========================================================================\n\n//\n// Address margin not present in IE 8/9 and Safari.\n//\n\nfigure {\n margin: 1em 40px;\n}\n\n//\n// Address differences between Firefox and other browsers.\n//\n\nhr {\n box-sizing: content-box;\n height: 0;\n}\n\n//\n// Contain overflow in all browsers.\n//\n\npre {\n overflow: auto;\n}\n\n//\n// Address odd `em`-unit font size rendering in all browsers.\n//\n\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\n\n// Forms\n// ==========================================================================\n\n//\n// Known limitation: by default, Chrome and Safari on OS X allow very limited\n// styling of `select`, unless a `border` property is set.\n//\n\n//\n// 1. Correct color not being inherited.\n// Known issue: affects color of disabled elements.\n// 2. Correct font properties not being inherited.\n// 3. Address margins set differently in Firefox 4+, Safari, and Chrome.\n//\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit; // 1\n font: inherit; // 2\n margin: 0; // 3\n}\n\n//\n// Address `overflow` set to `hidden` in IE 8/9/10/11.\n//\n\nbutton {\n overflow: visible;\n}\n\n//\n// Address inconsistent `text-transform` inheritance for `button` and `select`.\n// All other form control elements do not inherit `text-transform` values.\n// Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.\n// Correct `select` style inheritance in Firefox.\n//\n\nbutton,\nselect {\n text-transform: none;\n}\n\n//\n// 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\n// and `video` controls.\n// 2. Correct inability to style clickable `input` types in iOS.\n// 3. Improve usability and consistency of cursor style between image-type\n// `input` and others.\n//\n\nbutton,\nhtml input[type=\"button\"], // 1\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button; // 2\n cursor: pointer; // 3\n}\n\n//\n// Re-set default cursor for disabled elements.\n//\n\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\n\n//\n// Remove inner padding and border in Firefox 4+.\n//\n\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\n\n//\n// Address Firefox 4+ setting `line-height` on `input` using `!important` in\n// the UA stylesheet.\n//\n\ninput {\n line-height: normal;\n}\n\n//\n// It's recommended that you don't attempt to style these elements.\n// Firefox's implementation doesn't respect box-sizing, padding, or width.\n//\n// 1. Address box sizing set to `content-box` in IE 8/9/10.\n// 2. Remove excess padding in IE 8/9/10.\n//\n\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box; // 1\n padding: 0; // 2\n}\n\n//\n// Fix the cursor style for Chrome's increment/decrement buttons. For certain\n// `font-size` values of the `input`, it causes the cursor style of the\n// decrement button to change from `default` to `text`.\n//\n\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n//\n// 1. Address `appearance` set to `searchfield` in Safari and Chrome.\n// 2. Address `box-sizing` set to `border-box` in Safari and Chrome.\n//\n\ninput[type=\"search\"] {\n -webkit-appearance: textfield; // 1\n box-sizing: content-box; //2\n}\n\n//\n// Remove inner padding and search cancel button in Safari and Chrome on OS X.\n// Safari (but not Chrome) clips the cancel button when the search input has\n// padding (and `textfield` appearance).\n//\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n//\n// Define consistent border, margin, and padding.\n//\n\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\n\n//\n// 1. Correct `color` not being inherited in IE 8/9/10/11.\n// 2. Remove padding so people aren't caught out if they zero out fieldsets.\n//\n\nlegend {\n border: 0; // 1\n padding: 0; // 2\n}\n\n//\n// Remove default vertical scrollbar in IE 8/9/10/11.\n//\n\ntextarea {\n overflow: auto;\n}\n\n//\n// Don't inherit the `font-weight` (applied by a rule above).\n// NOTE: the default cannot safely be changed in Chrome and Safari on OS X.\n//\n\noptgroup {\n font-weight: bold;\n}\n\n// Tables\n// ==========================================================================\n\n//\n// Remove most spacing between table cells.\n//\n\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\ntd,\nth {\n padding: 0;\n}\n","/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n\n// ==========================================================================\n// Print styles.\n// Inlined to avoid the additional HTTP request: h5bp.com/r\n// ==========================================================================\n\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important; // Black prints faster: h5bp.com/s\n box-shadow: none !important;\n text-shadow: none !important;\n }\n\n a,\n a:visited {\n text-decoration: underline;\n }\n\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n\n // Don't show links that are fragment identifiers,\n // or use the `javascript:` pseudo protocol\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n\n thead {\n display: table-header-group; // h5bp.com/t\n }\n\n tr,\n img {\n page-break-inside: avoid;\n }\n\n img {\n max-width: 100% !important;\n }\n\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n\n h2,\n h3 {\n page-break-after: avoid;\n }\n\n // Bootstrap specific changes start\n\n // Bootstrap components\n .navbar {\n display: none;\n }\n .btn,\n .dropup > .btn {\n > .caret {\n border-top-color: #000 !important;\n }\n }\n .label {\n border: 1px solid #000;\n }\n\n .table {\n border-collapse: collapse !important;\n\n td,\n th {\n background-color: #fff !important;\n }\n }\n .table-bordered {\n th,\n td {\n border: 1px solid #ddd !important;\n }\n }\n\n // Bootstrap specific changes end\n}\n","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\nmark {\n background: #ff0;\n color: #000;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsup {\n top: -0.5em;\n}\nsub {\n bottom: -0.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n box-sizing: content-box;\n height: 0;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n color: inherit;\n font: inherit;\n margin: 0;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n border: 0;\n padding: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: textfield;\n box-sizing: content-box;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n border: 1px solid #c0c0c0;\n margin: 0 2px;\n padding: 0.35em 0.625em 0.75em;\n}\nlegend {\n border: 0;\n padding: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-collapse: collapse;\n border-spacing: 0;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n background: transparent !important;\n color: #000 !important;\n box-shadow: none !important;\n text-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all 0.2s ease-in-out;\n -o-transition: all 0.2s ease-in-out;\n transition: all 0.2s ease-in-out;\n display: inline-block;\n max-width: 100%;\n height: auto;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eeeeee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n background-color: #fcf8e3;\n padding: .2em;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eeeeee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n list-style: none;\n margin-left: -5px;\n}\n.list-inline > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n clear: left;\n text-align: right;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eeeeee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid #eeeeee;\n border-left: 0;\n text-align: right;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333333;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n.row {\n margin-left: -15px;\n margin-right: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0%;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0%;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0%;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-column;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n float: none;\n display: table-cell;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n min-width: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n border: 0;\n background-color: transparent;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eeeeee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n min-height: 34px;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-left: 0;\n padding-right: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n border-color: #3c763d;\n background-color: #dff0d8;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n border-color: #8a6d3b;\n background-color: #fcf8e3;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n border-color: #a94442;\n background-color: #f2dede;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: 7px;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-left: -15px;\n margin-right: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: 7px;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n margin-bottom: 0;\n font-weight: normal;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid transparent;\n white-space: nowrap;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n border-radius: 4px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n outline: 0;\n background-image: none;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n opacity: 0.65;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n color: #337ab7;\n font-weight: normal;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity 0.15s linear;\n -o-transition: opacity 0.15s linear;\n transition: opacity 0.15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-property: height, visibility;\n transition-property: height, visibility;\n -webkit-transition-duration: 0.35s;\n transition-duration: 0.35s;\n -webkit-transition-timing-function: ease;\n transition-timing-function: ease;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n list-style: none;\n font-size: 14px;\n text-align: left;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);\n background-clip: padding-box;\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n text-decoration: none;\n color: #262626;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n outline: 0;\n background-color: #337ab7;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n cursor: not-allowed;\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n left: auto;\n right: 0;\n}\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n content: \"\";\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n left: auto;\n right: 0;\n }\n .navbar-right .dropdown-menu-left {\n left: 0;\n right: auto;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555555;\n text-align: center;\n background-color: #eeeeee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n margin-bottom: 0;\n padding-left: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.nav > li.disabled > a {\n color: #777777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777777;\n text-decoration: none;\n background-color: transparent;\n cursor: not-allowed;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eeeeee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eeeeee #eeeeee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555555;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n cursor: default;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n text-align: center;\n margin-bottom: 5px;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n overflow-x: visible;\n padding-right: 15px;\n padding-left: 15px;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);\n -webkit-overflow-scrolling: touch;\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-left: 0;\n padding-right: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n height: 50px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: 15px;\n padding: 9px 10px;\n margin-top: 8px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n margin-left: -15px;\n margin-right: -15px;\n padding: 10px 15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);\n margin-top: 8px;\n margin-bottom: 8px;\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-left: 15px;\n margin-right: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n background-color: #e7e7e7;\n color: #555;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n background-color: #080808;\n color: #fff;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n content: \"/\\00a0\";\n padding: 0 5px;\n color: #ccc;\n}\n.breadcrumb > .active {\n color: #777777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n line-height: 1.42857143;\n text-decoration: none;\n color: #337ab7;\n background-color: #fff;\n border: 1px solid #ddd;\n margin-left: -1px;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eeeeee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n cursor: default;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777777;\n background-color: #fff;\n border-color: #ddd;\n cursor: not-allowed;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-bottom-left-radius: 6px;\n border-top-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-bottom-right-radius: 6px;\n border-top-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-bottom-left-radius: 3px;\n border-top-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-bottom-right-radius: 3px;\n border-top-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n list-style: none;\n text-align: center;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eeeeee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777777;\n background-color: #fff;\n cursor: not-allowed;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n color: #fff;\n line-height: 1;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: #777777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eeeeee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n border-radius: 6px;\n padding-left: 15px;\n padding-right: 15px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-left: 60px;\n padding-right: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border 0.2s ease-in-out;\n -o-transition: border 0.2s ease-in-out;\n transition: border 0.2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-left: auto;\n margin-right: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n background-color: #dff0d8;\n border-color: #d6e9c6;\n color: #3c763d;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n background-color: #d9edf7;\n border-color: #bce8f1;\n color: #31708f;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n background-color: #fcf8e3;\n border-color: #faebcc;\n color: #8a6d3b;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n background-color: #f2dede;\n border-color: #ebccd1;\n color: #a94442;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n overflow: hidden;\n height: 20px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n}\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-transition: width 0.6s ease;\n -o-transition: width 0.6s ease;\n transition: width 0.6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n margin-bottom: 20px;\n padding-left: 0;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-right-radius: 4px;\n border-top-left-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n text-decoration: none;\n color: #555;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n background-color: #eeeeee;\n color: #777777;\n cursor: not-allowed;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-left: 15px;\n padding-right: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-left-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n border: 0;\n margin-bottom: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, 0.15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n -webkit-transition: -webkit-transform 0.3s ease-out;\n -moz-transition: -moz-transform 0.3s ease-out;\n -o-transition: -o-transform 0.3s ease-out;\n transition: transform 0.3s ease-out;\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);\n background-clip: padding-box;\n outline: 0;\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.modal-backdrop.in {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 12px;\n opacity: 0;\n filter: alpha(opacity=0);\n}\n.tooltip.in {\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.tooltip.top {\n margin-top: -3px;\n padding: 5px 0;\n}\n.tooltip.right {\n margin-left: 3px;\n padding: 0 5px;\n}\n.tooltip.bottom {\n margin-top: 3px;\n padding: 5px 0;\n}\n.tooltip.left {\n margin-left: -3px;\n padding: 0 5px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n bottom: 0;\n right: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n font-size: 14px;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n margin: 0;\n padding: 8px 14px;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n border-width: 10px;\n content: \"\";\n}\n.popover.top > .arrow {\n left: 50%;\n margin-left: -11px;\n border-bottom-width: 0;\n border-top-color: #999999;\n border-top-color: rgba(0, 0, 0, 0.25);\n bottom: -11px;\n}\n.popover.top > .arrow:after {\n content: \" \";\n bottom: 1px;\n margin-left: -10px;\n border-bottom-width: 0;\n border-top-color: #fff;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-left-width: 0;\n border-right-color: #999999;\n border-right-color: rgba(0, 0, 0, 0.25);\n}\n.popover.right > .arrow:after {\n content: \" \";\n left: 1px;\n bottom: -10px;\n border-left-width: 0;\n border-right-color: #fff;\n}\n.popover.bottom > .arrow {\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999999;\n border-bottom-color: rgba(0, 0, 0, 0.25);\n top: -11px;\n}\n.popover.bottom > .arrow:after {\n content: \" \";\n top: 1px;\n margin-left: -10px;\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999999;\n border-left-color: rgba(0, 0, 0, 0.25);\n}\n.popover.left > .arrow:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: #fff;\n bottom: -10px;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.carousel-inner > .item {\n display: none;\n position: relative;\n -webkit-transition: 0.6s ease-in-out left;\n -o-transition: 0.6s ease-in-out left;\n transition: 0.6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform 0.6s ease-in-out;\n -moz-transition: -moz-transform 0.6s ease-in-out;\n -o-transition: -o-transform 0.6s ease-in-out;\n transition: transform 0.6s ease-in-out;\n -webkit-backface-visibility: hidden;\n -moz-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n -moz-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n left: 0;\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n left: 0;\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 15%;\n opacity: 0.5;\n filter: alpha(opacity=50);\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n}\n.carousel-control.right {\n left: auto;\n right: 0;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n}\n.carousel-control:hover,\n.carousel-control:focus {\n outline: 0;\n color: #fff;\n text-decoration: none;\n opacity: 0.9;\n filter: alpha(opacity=90);\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid #fff;\n border-radius: 10px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n}\n.carousel-indicators .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n content: \" \";\n display: table;\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */","/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */\nhtml {\n font-family: sans-serif;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n}\nbody {\n margin: 0;\n}\narticle,\naside,\ndetails,\nfigcaption,\nfigure,\nfooter,\nheader,\nhgroup,\nmain,\nmenu,\nnav,\nsection,\nsummary {\n display: block;\n}\naudio,\ncanvas,\nprogress,\nvideo {\n display: inline-block;\n vertical-align: baseline;\n}\naudio:not([controls]) {\n display: none;\n height: 0;\n}\n[hidden],\ntemplate {\n display: none;\n}\na {\n background-color: transparent;\n}\na:active,\na:hover {\n outline: 0;\n}\nabbr[title] {\n border-bottom: 1px dotted;\n}\nb,\nstrong {\n font-weight: bold;\n}\ndfn {\n font-style: italic;\n}\nh1 {\n margin: .67em 0;\n font-size: 2em;\n}\nmark {\n color: #000;\n background: #ff0;\n}\nsmall {\n font-size: 80%;\n}\nsub,\nsup {\n position: relative;\n font-size: 75%;\n line-height: 0;\n vertical-align: baseline;\n}\nsup {\n top: -.5em;\n}\nsub {\n bottom: -.25em;\n}\nimg {\n border: 0;\n}\nsvg:not(:root) {\n overflow: hidden;\n}\nfigure {\n margin: 1em 40px;\n}\nhr {\n height: 0;\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\npre {\n overflow: auto;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: monospace, monospace;\n font-size: 1em;\n}\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n margin: 0;\n font: inherit;\n color: inherit;\n}\nbutton {\n overflow: visible;\n}\nbutton,\nselect {\n text-transform: none;\n}\nbutton,\nhtml input[type=\"button\"],\ninput[type=\"reset\"],\ninput[type=\"submit\"] {\n -webkit-appearance: button;\n cursor: pointer;\n}\nbutton[disabled],\nhtml input[disabled] {\n cursor: default;\n}\nbutton::-moz-focus-inner,\ninput::-moz-focus-inner {\n padding: 0;\n border: 0;\n}\ninput {\n line-height: normal;\n}\ninput[type=\"checkbox\"],\ninput[type=\"radio\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n}\ninput[type=\"number\"]::-webkit-inner-spin-button,\ninput[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n -webkit-appearance: textfield;\n}\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\nfieldset {\n padding: .35em .625em .75em;\n margin: 0 2px;\n border: 1px solid #c0c0c0;\n}\nlegend {\n padding: 0;\n border: 0;\n}\ntextarea {\n overflow: auto;\n}\noptgroup {\n font-weight: bold;\n}\ntable {\n border-spacing: 0;\n border-collapse: collapse;\n}\ntd,\nth {\n padding: 0;\n}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */\n@media print {\n *,\n *:before,\n *:after {\n color: #000 !important;\n text-shadow: none !important;\n background: transparent !important;\n -webkit-box-shadow: none !important;\n box-shadow: none !important;\n }\n a,\n a:visited {\n text-decoration: underline;\n }\n a[href]:after {\n content: \" (\" attr(href) \")\";\n }\n abbr[title]:after {\n content: \" (\" attr(title) \")\";\n }\n a[href^=\"#\"]:after,\n a[href^=\"javascript:\"]:after {\n content: \"\";\n }\n pre,\n blockquote {\n border: 1px solid #999;\n\n page-break-inside: avoid;\n }\n thead {\n display: table-header-group;\n }\n tr,\n img {\n page-break-inside: avoid;\n }\n img {\n max-width: 100% !important;\n }\n p,\n h2,\n h3 {\n orphans: 3;\n widows: 3;\n }\n h2,\n h3 {\n page-break-after: avoid;\n }\n .navbar {\n display: none;\n }\n .btn > .caret,\n .dropup > .btn > .caret {\n border-top-color: #000 !important;\n }\n .label {\n border: 1px solid #000;\n }\n .table {\n border-collapse: collapse !important;\n }\n .table td,\n .table th {\n background-color: #fff !important;\n }\n .table-bordered th,\n .table-bordered td {\n border: 1px solid #ddd !important;\n }\n}\n@font-face {\n font-family: 'Glyphicons Halflings';\n\n src: url('../fonts/glyphicons-halflings-regular.eot');\n src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');\n}\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n.glyphicon-asterisk:before {\n content: \"\\002a\";\n}\n.glyphicon-plus:before {\n content: \"\\002b\";\n}\n.glyphicon-euro:before,\n.glyphicon-eur:before {\n content: \"\\20ac\";\n}\n.glyphicon-minus:before {\n content: \"\\2212\";\n}\n.glyphicon-cloud:before {\n content: \"\\2601\";\n}\n.glyphicon-envelope:before {\n content: \"\\2709\";\n}\n.glyphicon-pencil:before {\n content: \"\\270f\";\n}\n.glyphicon-glass:before {\n content: \"\\e001\";\n}\n.glyphicon-music:before {\n content: \"\\e002\";\n}\n.glyphicon-search:before {\n content: \"\\e003\";\n}\n.glyphicon-heart:before {\n content: \"\\e005\";\n}\n.glyphicon-star:before {\n content: \"\\e006\";\n}\n.glyphicon-star-empty:before {\n content: \"\\e007\";\n}\n.glyphicon-user:before {\n content: \"\\e008\";\n}\n.glyphicon-film:before {\n content: \"\\e009\";\n}\n.glyphicon-th-large:before {\n content: \"\\e010\";\n}\n.glyphicon-th:before {\n content: \"\\e011\";\n}\n.glyphicon-th-list:before {\n content: \"\\e012\";\n}\n.glyphicon-ok:before {\n content: \"\\e013\";\n}\n.glyphicon-remove:before {\n content: \"\\e014\";\n}\n.glyphicon-zoom-in:before {\n content: \"\\e015\";\n}\n.glyphicon-zoom-out:before {\n content: \"\\e016\";\n}\n.glyphicon-off:before {\n content: \"\\e017\";\n}\n.glyphicon-signal:before {\n content: \"\\e018\";\n}\n.glyphicon-cog:before {\n content: \"\\e019\";\n}\n.glyphicon-trash:before {\n content: \"\\e020\";\n}\n.glyphicon-home:before {\n content: \"\\e021\";\n}\n.glyphicon-file:before {\n content: \"\\e022\";\n}\n.glyphicon-time:before {\n content: \"\\e023\";\n}\n.glyphicon-road:before {\n content: \"\\e024\";\n}\n.glyphicon-download-alt:before {\n content: \"\\e025\";\n}\n.glyphicon-download:before {\n content: \"\\e026\";\n}\n.glyphicon-upload:before {\n content: \"\\e027\";\n}\n.glyphicon-inbox:before {\n content: \"\\e028\";\n}\n.glyphicon-play-circle:before {\n content: \"\\e029\";\n}\n.glyphicon-repeat:before {\n content: \"\\e030\";\n}\n.glyphicon-refresh:before {\n content: \"\\e031\";\n}\n.glyphicon-list-alt:before {\n content: \"\\e032\";\n}\n.glyphicon-lock:before {\n content: \"\\e033\";\n}\n.glyphicon-flag:before {\n content: \"\\e034\";\n}\n.glyphicon-headphones:before {\n content: \"\\e035\";\n}\n.glyphicon-volume-off:before {\n content: \"\\e036\";\n}\n.glyphicon-volume-down:before {\n content: \"\\e037\";\n}\n.glyphicon-volume-up:before {\n content: \"\\e038\";\n}\n.glyphicon-qrcode:before {\n content: \"\\e039\";\n}\n.glyphicon-barcode:before {\n content: \"\\e040\";\n}\n.glyphicon-tag:before {\n content: \"\\e041\";\n}\n.glyphicon-tags:before {\n content: \"\\e042\";\n}\n.glyphicon-book:before {\n content: \"\\e043\";\n}\n.glyphicon-bookmark:before {\n content: \"\\e044\";\n}\n.glyphicon-print:before {\n content: \"\\e045\";\n}\n.glyphicon-camera:before {\n content: \"\\e046\";\n}\n.glyphicon-font:before {\n content: \"\\e047\";\n}\n.glyphicon-bold:before {\n content: \"\\e048\";\n}\n.glyphicon-italic:before {\n content: \"\\e049\";\n}\n.glyphicon-text-height:before {\n content: \"\\e050\";\n}\n.glyphicon-text-width:before {\n content: \"\\e051\";\n}\n.glyphicon-align-left:before {\n content: \"\\e052\";\n}\n.glyphicon-align-center:before {\n content: \"\\e053\";\n}\n.glyphicon-align-right:before {\n content: \"\\e054\";\n}\n.glyphicon-align-justify:before {\n content: \"\\e055\";\n}\n.glyphicon-list:before {\n content: \"\\e056\";\n}\n.glyphicon-indent-left:before {\n content: \"\\e057\";\n}\n.glyphicon-indent-right:before {\n content: \"\\e058\";\n}\n.glyphicon-facetime-video:before {\n content: \"\\e059\";\n}\n.glyphicon-picture:before {\n content: \"\\e060\";\n}\n.glyphicon-map-marker:before {\n content: \"\\e062\";\n}\n.glyphicon-adjust:before {\n content: \"\\e063\";\n}\n.glyphicon-tint:before {\n content: \"\\e064\";\n}\n.glyphicon-edit:before {\n content: \"\\e065\";\n}\n.glyphicon-share:before {\n content: \"\\e066\";\n}\n.glyphicon-check:before {\n content: \"\\e067\";\n}\n.glyphicon-move:before {\n content: \"\\e068\";\n}\n.glyphicon-step-backward:before {\n content: \"\\e069\";\n}\n.glyphicon-fast-backward:before {\n content: \"\\e070\";\n}\n.glyphicon-backward:before {\n content: \"\\e071\";\n}\n.glyphicon-play:before {\n content: \"\\e072\";\n}\n.glyphicon-pause:before {\n content: \"\\e073\";\n}\n.glyphicon-stop:before {\n content: \"\\e074\";\n}\n.glyphicon-forward:before {\n content: \"\\e075\";\n}\n.glyphicon-fast-forward:before {\n content: \"\\e076\";\n}\n.glyphicon-step-forward:before {\n content: \"\\e077\";\n}\n.glyphicon-eject:before {\n content: \"\\e078\";\n}\n.glyphicon-chevron-left:before {\n content: \"\\e079\";\n}\n.glyphicon-chevron-right:before {\n content: \"\\e080\";\n}\n.glyphicon-plus-sign:before {\n content: \"\\e081\";\n}\n.glyphicon-minus-sign:before {\n content: \"\\e082\";\n}\n.glyphicon-remove-sign:before {\n content: \"\\e083\";\n}\n.glyphicon-ok-sign:before {\n content: \"\\e084\";\n}\n.glyphicon-question-sign:before {\n content: \"\\e085\";\n}\n.glyphicon-info-sign:before {\n content: \"\\e086\";\n}\n.glyphicon-screenshot:before {\n content: \"\\e087\";\n}\n.glyphicon-remove-circle:before {\n content: \"\\e088\";\n}\n.glyphicon-ok-circle:before {\n content: \"\\e089\";\n}\n.glyphicon-ban-circle:before {\n content: \"\\e090\";\n}\n.glyphicon-arrow-left:before {\n content: \"\\e091\";\n}\n.glyphicon-arrow-right:before {\n content: \"\\e092\";\n}\n.glyphicon-arrow-up:before {\n content: \"\\e093\";\n}\n.glyphicon-arrow-down:before {\n content: \"\\e094\";\n}\n.glyphicon-share-alt:before {\n content: \"\\e095\";\n}\n.glyphicon-resize-full:before {\n content: \"\\e096\";\n}\n.glyphicon-resize-small:before {\n content: \"\\e097\";\n}\n.glyphicon-exclamation-sign:before {\n content: \"\\e101\";\n}\n.glyphicon-gift:before {\n content: \"\\e102\";\n}\n.glyphicon-leaf:before {\n content: \"\\e103\";\n}\n.glyphicon-fire:before {\n content: \"\\e104\";\n}\n.glyphicon-eye-open:before {\n content: \"\\e105\";\n}\n.glyphicon-eye-close:before {\n content: \"\\e106\";\n}\n.glyphicon-warning-sign:before {\n content: \"\\e107\";\n}\n.glyphicon-plane:before {\n content: \"\\e108\";\n}\n.glyphicon-calendar:before {\n content: \"\\e109\";\n}\n.glyphicon-random:before {\n content: \"\\e110\";\n}\n.glyphicon-comment:before {\n content: \"\\e111\";\n}\n.glyphicon-magnet:before {\n content: \"\\e112\";\n}\n.glyphicon-chevron-up:before {\n content: \"\\e113\";\n}\n.glyphicon-chevron-down:before {\n content: \"\\e114\";\n}\n.glyphicon-retweet:before {\n content: \"\\e115\";\n}\n.glyphicon-shopping-cart:before {\n content: \"\\e116\";\n}\n.glyphicon-folder-close:before {\n content: \"\\e117\";\n}\n.glyphicon-folder-open:before {\n content: \"\\e118\";\n}\n.glyphicon-resize-vertical:before {\n content: \"\\e119\";\n}\n.glyphicon-resize-horizontal:before {\n content: \"\\e120\";\n}\n.glyphicon-hdd:before {\n content: \"\\e121\";\n}\n.glyphicon-bullhorn:before {\n content: \"\\e122\";\n}\n.glyphicon-bell:before {\n content: \"\\e123\";\n}\n.glyphicon-certificate:before {\n content: \"\\e124\";\n}\n.glyphicon-thumbs-up:before {\n content: \"\\e125\";\n}\n.glyphicon-thumbs-down:before {\n content: \"\\e126\";\n}\n.glyphicon-hand-right:before {\n content: \"\\e127\";\n}\n.glyphicon-hand-left:before {\n content: \"\\e128\";\n}\n.glyphicon-hand-up:before {\n content: \"\\e129\";\n}\n.glyphicon-hand-down:before {\n content: \"\\e130\";\n}\n.glyphicon-circle-arrow-right:before {\n content: \"\\e131\";\n}\n.glyphicon-circle-arrow-left:before {\n content: \"\\e132\";\n}\n.glyphicon-circle-arrow-up:before {\n content: \"\\e133\";\n}\n.glyphicon-circle-arrow-down:before {\n content: \"\\e134\";\n}\n.glyphicon-globe:before {\n content: \"\\e135\";\n}\n.glyphicon-wrench:before {\n content: \"\\e136\";\n}\n.glyphicon-tasks:before {\n content: \"\\e137\";\n}\n.glyphicon-filter:before {\n content: \"\\e138\";\n}\n.glyphicon-briefcase:before {\n content: \"\\e139\";\n}\n.glyphicon-fullscreen:before {\n content: \"\\e140\";\n}\n.glyphicon-dashboard:before {\n content: \"\\e141\";\n}\n.glyphicon-paperclip:before {\n content: \"\\e142\";\n}\n.glyphicon-heart-empty:before {\n content: \"\\e143\";\n}\n.glyphicon-link:before {\n content: \"\\e144\";\n}\n.glyphicon-phone:before {\n content: \"\\e145\";\n}\n.glyphicon-pushpin:before {\n content: \"\\e146\";\n}\n.glyphicon-usd:before {\n content: \"\\e148\";\n}\n.glyphicon-gbp:before {\n content: \"\\e149\";\n}\n.glyphicon-sort:before {\n content: \"\\e150\";\n}\n.glyphicon-sort-by-alphabet:before {\n content: \"\\e151\";\n}\n.glyphicon-sort-by-alphabet-alt:before {\n content: \"\\e152\";\n}\n.glyphicon-sort-by-order:before {\n content: \"\\e153\";\n}\n.glyphicon-sort-by-order-alt:before {\n content: \"\\e154\";\n}\n.glyphicon-sort-by-attributes:before {\n content: \"\\e155\";\n}\n.glyphicon-sort-by-attributes-alt:before {\n content: \"\\e156\";\n}\n.glyphicon-unchecked:before {\n content: \"\\e157\";\n}\n.glyphicon-expand:before {\n content: \"\\e158\";\n}\n.glyphicon-collapse-down:before {\n content: \"\\e159\";\n}\n.glyphicon-collapse-up:before {\n content: \"\\e160\";\n}\n.glyphicon-log-in:before {\n content: \"\\e161\";\n}\n.glyphicon-flash:before {\n content: \"\\e162\";\n}\n.glyphicon-log-out:before {\n content: \"\\e163\";\n}\n.glyphicon-new-window:before {\n content: \"\\e164\";\n}\n.glyphicon-record:before {\n content: \"\\e165\";\n}\n.glyphicon-save:before {\n content: \"\\e166\";\n}\n.glyphicon-open:before {\n content: \"\\e167\";\n}\n.glyphicon-saved:before {\n content: \"\\e168\";\n}\n.glyphicon-import:before {\n content: \"\\e169\";\n}\n.glyphicon-export:before {\n content: \"\\e170\";\n}\n.glyphicon-send:before {\n content: \"\\e171\";\n}\n.glyphicon-floppy-disk:before {\n content: \"\\e172\";\n}\n.glyphicon-floppy-saved:before {\n content: \"\\e173\";\n}\n.glyphicon-floppy-remove:before {\n content: \"\\e174\";\n}\n.glyphicon-floppy-save:before {\n content: \"\\e175\";\n}\n.glyphicon-floppy-open:before {\n content: \"\\e176\";\n}\n.glyphicon-credit-card:before {\n content: \"\\e177\";\n}\n.glyphicon-transfer:before {\n content: \"\\e178\";\n}\n.glyphicon-cutlery:before {\n content: \"\\e179\";\n}\n.glyphicon-header:before {\n content: \"\\e180\";\n}\n.glyphicon-compressed:before {\n content: \"\\e181\";\n}\n.glyphicon-earphone:before {\n content: \"\\e182\";\n}\n.glyphicon-phone-alt:before {\n content: \"\\e183\";\n}\n.glyphicon-tower:before {\n content: \"\\e184\";\n}\n.glyphicon-stats:before {\n content: \"\\e185\";\n}\n.glyphicon-sd-video:before {\n content: \"\\e186\";\n}\n.glyphicon-hd-video:before {\n content: \"\\e187\";\n}\n.glyphicon-subtitles:before {\n content: \"\\e188\";\n}\n.glyphicon-sound-stereo:before {\n content: \"\\e189\";\n}\n.glyphicon-sound-dolby:before {\n content: \"\\e190\";\n}\n.glyphicon-sound-5-1:before {\n content: \"\\e191\";\n}\n.glyphicon-sound-6-1:before {\n content: \"\\e192\";\n}\n.glyphicon-sound-7-1:before {\n content: \"\\e193\";\n}\n.glyphicon-copyright-mark:before {\n content: \"\\e194\";\n}\n.glyphicon-registration-mark:before {\n content: \"\\e195\";\n}\n.glyphicon-cloud-download:before {\n content: \"\\e197\";\n}\n.glyphicon-cloud-upload:before {\n content: \"\\e198\";\n}\n.glyphicon-tree-conifer:before {\n content: \"\\e199\";\n}\n.glyphicon-tree-deciduous:before {\n content: \"\\e200\";\n}\n.glyphicon-cd:before {\n content: \"\\e201\";\n}\n.glyphicon-save-file:before {\n content: \"\\e202\";\n}\n.glyphicon-open-file:before {\n content: \"\\e203\";\n}\n.glyphicon-level-up:before {\n content: \"\\e204\";\n}\n.glyphicon-copy:before {\n content: \"\\e205\";\n}\n.glyphicon-paste:before {\n content: \"\\e206\";\n}\n.glyphicon-alert:before {\n content: \"\\e209\";\n}\n.glyphicon-equalizer:before {\n content: \"\\e210\";\n}\n.glyphicon-king:before {\n content: \"\\e211\";\n}\n.glyphicon-queen:before {\n content: \"\\e212\";\n}\n.glyphicon-pawn:before {\n content: \"\\e213\";\n}\n.glyphicon-bishop:before {\n content: \"\\e214\";\n}\n.glyphicon-knight:before {\n content: \"\\e215\";\n}\n.glyphicon-baby-formula:before {\n content: \"\\e216\";\n}\n.glyphicon-tent:before {\n content: \"\\26fa\";\n}\n.glyphicon-blackboard:before {\n content: \"\\e218\";\n}\n.glyphicon-bed:before {\n content: \"\\e219\";\n}\n.glyphicon-apple:before {\n content: \"\\f8ff\";\n}\n.glyphicon-erase:before {\n content: \"\\e221\";\n}\n.glyphicon-hourglass:before {\n content: \"\\231b\";\n}\n.glyphicon-lamp:before {\n content: \"\\e223\";\n}\n.glyphicon-duplicate:before {\n content: \"\\e224\";\n}\n.glyphicon-piggy-bank:before {\n content: \"\\e225\";\n}\n.glyphicon-scissors:before {\n content: \"\\e226\";\n}\n.glyphicon-bitcoin:before {\n content: \"\\e227\";\n}\n.glyphicon-btc:before {\n content: \"\\e227\";\n}\n.glyphicon-xbt:before {\n content: \"\\e227\";\n}\n.glyphicon-yen:before {\n content: \"\\00a5\";\n}\n.glyphicon-jpy:before {\n content: \"\\00a5\";\n}\n.glyphicon-ruble:before {\n content: \"\\20bd\";\n}\n.glyphicon-rub:before {\n content: \"\\20bd\";\n}\n.glyphicon-scale:before {\n content: \"\\e230\";\n}\n.glyphicon-ice-lolly:before {\n content: \"\\e231\";\n}\n.glyphicon-ice-lolly-tasted:before {\n content: \"\\e232\";\n}\n.glyphicon-education:before {\n content: \"\\e233\";\n}\n.glyphicon-option-horizontal:before {\n content: \"\\e234\";\n}\n.glyphicon-option-vertical:before {\n content: \"\\e235\";\n}\n.glyphicon-menu-hamburger:before {\n content: \"\\e236\";\n}\n.glyphicon-modal-window:before {\n content: \"\\e237\";\n}\n.glyphicon-oil:before {\n content: \"\\e238\";\n}\n.glyphicon-grain:before {\n content: \"\\e239\";\n}\n.glyphicon-sunglasses:before {\n content: \"\\e240\";\n}\n.glyphicon-text-size:before {\n content: \"\\e241\";\n}\n.glyphicon-text-color:before {\n content: \"\\e242\";\n}\n.glyphicon-text-background:before {\n content: \"\\e243\";\n}\n.glyphicon-object-align-top:before {\n content: \"\\e244\";\n}\n.glyphicon-object-align-bottom:before {\n content: \"\\e245\";\n}\n.glyphicon-object-align-horizontal:before {\n content: \"\\e246\";\n}\n.glyphicon-object-align-left:before {\n content: \"\\e247\";\n}\n.glyphicon-object-align-vertical:before {\n content: \"\\e248\";\n}\n.glyphicon-object-align-right:before {\n content: \"\\e249\";\n}\n.glyphicon-triangle-right:before {\n content: \"\\e250\";\n}\n.glyphicon-triangle-left:before {\n content: \"\\e251\";\n}\n.glyphicon-triangle-bottom:before {\n content: \"\\e252\";\n}\n.glyphicon-triangle-top:before {\n content: \"\\e253\";\n}\n.glyphicon-console:before {\n content: \"\\e254\";\n}\n.glyphicon-superscript:before {\n content: \"\\e255\";\n}\n.glyphicon-subscript:before {\n content: \"\\e256\";\n}\n.glyphicon-menu-left:before {\n content: \"\\e257\";\n}\n.glyphicon-menu-right:before {\n content: \"\\e258\";\n}\n.glyphicon-menu-down:before {\n content: \"\\e259\";\n}\n.glyphicon-menu-up:before {\n content: \"\\e260\";\n}\n* {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\n*:before,\n*:after {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\nhtml {\n font-size: 10px;\n\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\nbody {\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n line-height: 1.42857143;\n color: #333;\n background-color: #fff;\n}\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\na {\n color: #337ab7;\n text-decoration: none;\n}\na:hover,\na:focus {\n color: #23527c;\n text-decoration: underline;\n}\na:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\nfigure {\n margin: 0;\n}\nimg {\n vertical-align: middle;\n}\n.img-responsive,\n.thumbnail > img,\n.thumbnail a > img,\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n display: block;\n max-width: 100%;\n height: auto;\n}\n.img-rounded {\n border-radius: 6px;\n}\n.img-thumbnail {\n display: inline-block;\n max-width: 100%;\n height: auto;\n padding: 4px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: all .2s ease-in-out;\n -o-transition: all .2s ease-in-out;\n transition: all .2s ease-in-out;\n}\n.img-circle {\n border-radius: 50%;\n}\nhr {\n margin-top: 20px;\n margin-bottom: 20px;\n border: 0;\n border-top: 1px solid #eee;\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n.sr-only-focusable:active,\n.sr-only-focusable:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n}\n[role=\"button\"] {\n cursor: pointer;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: inherit;\n font-weight: 500;\n line-height: 1.1;\n color: inherit;\n}\nh1 small,\nh2 small,\nh3 small,\nh4 small,\nh5 small,\nh6 small,\n.h1 small,\n.h2 small,\n.h3 small,\n.h4 small,\n.h5 small,\n.h6 small,\nh1 .small,\nh2 .small,\nh3 .small,\nh4 .small,\nh5 .small,\nh6 .small,\n.h1 .small,\n.h2 .small,\n.h3 .small,\n.h4 .small,\n.h5 .small,\n.h6 .small {\n font-weight: normal;\n line-height: 1;\n color: #777;\n}\nh1,\n.h1,\nh2,\n.h2,\nh3,\n.h3 {\n margin-top: 20px;\n margin-bottom: 10px;\n}\nh1 small,\n.h1 small,\nh2 small,\n.h2 small,\nh3 small,\n.h3 small,\nh1 .small,\n.h1 .small,\nh2 .small,\n.h2 .small,\nh3 .small,\n.h3 .small {\n font-size: 65%;\n}\nh4,\n.h4,\nh5,\n.h5,\nh6,\n.h6 {\n margin-top: 10px;\n margin-bottom: 10px;\n}\nh4 small,\n.h4 small,\nh5 small,\n.h5 small,\nh6 small,\n.h6 small,\nh4 .small,\n.h4 .small,\nh5 .small,\n.h5 .small,\nh6 .small,\n.h6 .small {\n font-size: 75%;\n}\nh1,\n.h1 {\n font-size: 36px;\n}\nh2,\n.h2 {\n font-size: 30px;\n}\nh3,\n.h3 {\n font-size: 24px;\n}\nh4,\n.h4 {\n font-size: 18px;\n}\nh5,\n.h5 {\n font-size: 14px;\n}\nh6,\n.h6 {\n font-size: 12px;\n}\np {\n margin: 0 0 10px;\n}\n.lead {\n margin-bottom: 20px;\n font-size: 16px;\n font-weight: 300;\n line-height: 1.4;\n}\n@media (min-width: 768px) {\n .lead {\n font-size: 21px;\n }\n}\nsmall,\n.small {\n font-size: 85%;\n}\nmark,\n.mark {\n padding: .2em;\n background-color: #fcf8e3;\n}\n.text-left {\n text-align: left;\n}\n.text-right {\n text-align: right;\n}\n.text-center {\n text-align: center;\n}\n.text-justify {\n text-align: justify;\n}\n.text-nowrap {\n white-space: nowrap;\n}\n.text-lowercase {\n text-transform: lowercase;\n}\n.text-uppercase {\n text-transform: uppercase;\n}\n.text-capitalize {\n text-transform: capitalize;\n}\n.text-muted {\n color: #777;\n}\n.text-primary {\n color: #337ab7;\n}\na.text-primary:hover,\na.text-primary:focus {\n color: #286090;\n}\n.text-success {\n color: #3c763d;\n}\na.text-success:hover,\na.text-success:focus {\n color: #2b542c;\n}\n.text-info {\n color: #31708f;\n}\na.text-info:hover,\na.text-info:focus {\n color: #245269;\n}\n.text-warning {\n color: #8a6d3b;\n}\na.text-warning:hover,\na.text-warning:focus {\n color: #66512c;\n}\n.text-danger {\n color: #a94442;\n}\na.text-danger:hover,\na.text-danger:focus {\n color: #843534;\n}\n.bg-primary {\n color: #fff;\n background-color: #337ab7;\n}\na.bg-primary:hover,\na.bg-primary:focus {\n background-color: #286090;\n}\n.bg-success {\n background-color: #dff0d8;\n}\na.bg-success:hover,\na.bg-success:focus {\n background-color: #c1e2b3;\n}\n.bg-info {\n background-color: #d9edf7;\n}\na.bg-info:hover,\na.bg-info:focus {\n background-color: #afd9ee;\n}\n.bg-warning {\n background-color: #fcf8e3;\n}\na.bg-warning:hover,\na.bg-warning:focus {\n background-color: #f7ecb5;\n}\n.bg-danger {\n background-color: #f2dede;\n}\na.bg-danger:hover,\na.bg-danger:focus {\n background-color: #e4b9b9;\n}\n.page-header {\n padding-bottom: 9px;\n margin: 40px 0 20px;\n border-bottom: 1px solid #eee;\n}\nul,\nol {\n margin-top: 0;\n margin-bottom: 10px;\n}\nul ul,\nol ul,\nul ol,\nol ol {\n margin-bottom: 0;\n}\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n.list-inline {\n padding-left: 0;\n margin-left: -5px;\n list-style: none;\n}\n.list-inline > li {\n display: inline-block;\n padding-right: 5px;\n padding-left: 5px;\n}\ndl {\n margin-top: 0;\n margin-bottom: 20px;\n}\ndt,\ndd {\n line-height: 1.42857143;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .dl-horizontal dt {\n float: left;\n width: 160px;\n overflow: hidden;\n clear: left;\n text-align: right;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .dl-horizontal dd {\n margin-left: 180px;\n }\n}\nabbr[title],\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted #777;\n}\n.initialism {\n font-size: 90%;\n text-transform: uppercase;\n}\nblockquote {\n padding: 10px 20px;\n margin: 0 0 20px;\n font-size: 17.5px;\n border-left: 5px solid #eee;\n}\nblockquote p:last-child,\nblockquote ul:last-child,\nblockquote ol:last-child {\n margin-bottom: 0;\n}\nblockquote footer,\nblockquote small,\nblockquote .small {\n display: block;\n font-size: 80%;\n line-height: 1.42857143;\n color: #777;\n}\nblockquote footer:before,\nblockquote small:before,\nblockquote .small:before {\n content: '\\2014 \\00A0';\n}\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n text-align: right;\n border-right: 5px solid #eee;\n border-left: 0;\n}\n.blockquote-reverse footer:before,\nblockquote.pull-right footer:before,\n.blockquote-reverse small:before,\nblockquote.pull-right small:before,\n.blockquote-reverse .small:before,\nblockquote.pull-right .small:before {\n content: '';\n}\n.blockquote-reverse footer:after,\nblockquote.pull-right footer:after,\n.blockquote-reverse small:after,\nblockquote.pull-right small:after,\n.blockquote-reverse .small:after,\nblockquote.pull-right .small:after {\n content: '\\00A0 \\2014';\n}\naddress {\n margin-bottom: 20px;\n font-style: normal;\n line-height: 1.42857143;\n}\ncode,\nkbd,\npre,\nsamp {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n}\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: #c7254e;\n background-color: #f9f2f4;\n border-radius: 4px;\n}\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: #fff;\n background-color: #333;\n border-radius: 3px;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);\n}\nkbd kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\npre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n color: #333;\n word-break: break-all;\n word-wrap: break-word;\n background-color: #f5f5f5;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\npre code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n}\n.pre-scrollable {\n max-height: 340px;\n overflow-y: scroll;\n}\n.container {\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n}\n@media (min-width: 768px) {\n .container {\n width: 750px;\n }\n}\n@media (min-width: 992px) {\n .container {\n width: 970px;\n }\n}\n@media (min-width: 1200px) {\n .container {\n width: 1170px;\n }\n}\n.container-fluid {\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n}\n.row {\n margin-right: -15px;\n margin-left: -15px;\n}\n.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {\n position: relative;\n min-height: 1px;\n padding-right: 15px;\n padding-left: 15px;\n}\n.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {\n float: left;\n}\n.col-xs-12 {\n width: 100%;\n}\n.col-xs-11 {\n width: 91.66666667%;\n}\n.col-xs-10 {\n width: 83.33333333%;\n}\n.col-xs-9 {\n width: 75%;\n}\n.col-xs-8 {\n width: 66.66666667%;\n}\n.col-xs-7 {\n width: 58.33333333%;\n}\n.col-xs-6 {\n width: 50%;\n}\n.col-xs-5 {\n width: 41.66666667%;\n}\n.col-xs-4 {\n width: 33.33333333%;\n}\n.col-xs-3 {\n width: 25%;\n}\n.col-xs-2 {\n width: 16.66666667%;\n}\n.col-xs-1 {\n width: 8.33333333%;\n}\n.col-xs-pull-12 {\n right: 100%;\n}\n.col-xs-pull-11 {\n right: 91.66666667%;\n}\n.col-xs-pull-10 {\n right: 83.33333333%;\n}\n.col-xs-pull-9 {\n right: 75%;\n}\n.col-xs-pull-8 {\n right: 66.66666667%;\n}\n.col-xs-pull-7 {\n right: 58.33333333%;\n}\n.col-xs-pull-6 {\n right: 50%;\n}\n.col-xs-pull-5 {\n right: 41.66666667%;\n}\n.col-xs-pull-4 {\n right: 33.33333333%;\n}\n.col-xs-pull-3 {\n right: 25%;\n}\n.col-xs-pull-2 {\n right: 16.66666667%;\n}\n.col-xs-pull-1 {\n right: 8.33333333%;\n}\n.col-xs-pull-0 {\n right: auto;\n}\n.col-xs-push-12 {\n left: 100%;\n}\n.col-xs-push-11 {\n left: 91.66666667%;\n}\n.col-xs-push-10 {\n left: 83.33333333%;\n}\n.col-xs-push-9 {\n left: 75%;\n}\n.col-xs-push-8 {\n left: 66.66666667%;\n}\n.col-xs-push-7 {\n left: 58.33333333%;\n}\n.col-xs-push-6 {\n left: 50%;\n}\n.col-xs-push-5 {\n left: 41.66666667%;\n}\n.col-xs-push-4 {\n left: 33.33333333%;\n}\n.col-xs-push-3 {\n left: 25%;\n}\n.col-xs-push-2 {\n left: 16.66666667%;\n}\n.col-xs-push-1 {\n left: 8.33333333%;\n}\n.col-xs-push-0 {\n left: auto;\n}\n.col-xs-offset-12 {\n margin-left: 100%;\n}\n.col-xs-offset-11 {\n margin-left: 91.66666667%;\n}\n.col-xs-offset-10 {\n margin-left: 83.33333333%;\n}\n.col-xs-offset-9 {\n margin-left: 75%;\n}\n.col-xs-offset-8 {\n margin-left: 66.66666667%;\n}\n.col-xs-offset-7 {\n margin-left: 58.33333333%;\n}\n.col-xs-offset-6 {\n margin-left: 50%;\n}\n.col-xs-offset-5 {\n margin-left: 41.66666667%;\n}\n.col-xs-offset-4 {\n margin-left: 33.33333333%;\n}\n.col-xs-offset-3 {\n margin-left: 25%;\n}\n.col-xs-offset-2 {\n margin-left: 16.66666667%;\n}\n.col-xs-offset-1 {\n margin-left: 8.33333333%;\n}\n.col-xs-offset-0 {\n margin-left: 0;\n}\n@media (min-width: 768px) {\n .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {\n float: left;\n }\n .col-sm-12 {\n width: 100%;\n }\n .col-sm-11 {\n width: 91.66666667%;\n }\n .col-sm-10 {\n width: 83.33333333%;\n }\n .col-sm-9 {\n width: 75%;\n }\n .col-sm-8 {\n width: 66.66666667%;\n }\n .col-sm-7 {\n width: 58.33333333%;\n }\n .col-sm-6 {\n width: 50%;\n }\n .col-sm-5 {\n width: 41.66666667%;\n }\n .col-sm-4 {\n width: 33.33333333%;\n }\n .col-sm-3 {\n width: 25%;\n }\n .col-sm-2 {\n width: 16.66666667%;\n }\n .col-sm-1 {\n width: 8.33333333%;\n }\n .col-sm-pull-12 {\n right: 100%;\n }\n .col-sm-pull-11 {\n right: 91.66666667%;\n }\n .col-sm-pull-10 {\n right: 83.33333333%;\n }\n .col-sm-pull-9 {\n right: 75%;\n }\n .col-sm-pull-8 {\n right: 66.66666667%;\n }\n .col-sm-pull-7 {\n right: 58.33333333%;\n }\n .col-sm-pull-6 {\n right: 50%;\n }\n .col-sm-pull-5 {\n right: 41.66666667%;\n }\n .col-sm-pull-4 {\n right: 33.33333333%;\n }\n .col-sm-pull-3 {\n right: 25%;\n }\n .col-sm-pull-2 {\n right: 16.66666667%;\n }\n .col-sm-pull-1 {\n right: 8.33333333%;\n }\n .col-sm-pull-0 {\n right: auto;\n }\n .col-sm-push-12 {\n left: 100%;\n }\n .col-sm-push-11 {\n left: 91.66666667%;\n }\n .col-sm-push-10 {\n left: 83.33333333%;\n }\n .col-sm-push-9 {\n left: 75%;\n }\n .col-sm-push-8 {\n left: 66.66666667%;\n }\n .col-sm-push-7 {\n left: 58.33333333%;\n }\n .col-sm-push-6 {\n left: 50%;\n }\n .col-sm-push-5 {\n left: 41.66666667%;\n }\n .col-sm-push-4 {\n left: 33.33333333%;\n }\n .col-sm-push-3 {\n left: 25%;\n }\n .col-sm-push-2 {\n left: 16.66666667%;\n }\n .col-sm-push-1 {\n left: 8.33333333%;\n }\n .col-sm-push-0 {\n left: auto;\n }\n .col-sm-offset-12 {\n margin-left: 100%;\n }\n .col-sm-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-sm-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-sm-offset-9 {\n margin-left: 75%;\n }\n .col-sm-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-sm-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-sm-offset-6 {\n margin-left: 50%;\n }\n .col-sm-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-sm-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-sm-offset-3 {\n margin-left: 25%;\n }\n .col-sm-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-sm-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-sm-offset-0 {\n margin-left: 0;\n }\n}\n@media (min-width: 992px) {\n .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {\n float: left;\n }\n .col-md-12 {\n width: 100%;\n }\n .col-md-11 {\n width: 91.66666667%;\n }\n .col-md-10 {\n width: 83.33333333%;\n }\n .col-md-9 {\n width: 75%;\n }\n .col-md-8 {\n width: 66.66666667%;\n }\n .col-md-7 {\n width: 58.33333333%;\n }\n .col-md-6 {\n width: 50%;\n }\n .col-md-5 {\n width: 41.66666667%;\n }\n .col-md-4 {\n width: 33.33333333%;\n }\n .col-md-3 {\n width: 25%;\n }\n .col-md-2 {\n width: 16.66666667%;\n }\n .col-md-1 {\n width: 8.33333333%;\n }\n .col-md-pull-12 {\n right: 100%;\n }\n .col-md-pull-11 {\n right: 91.66666667%;\n }\n .col-md-pull-10 {\n right: 83.33333333%;\n }\n .col-md-pull-9 {\n right: 75%;\n }\n .col-md-pull-8 {\n right: 66.66666667%;\n }\n .col-md-pull-7 {\n right: 58.33333333%;\n }\n .col-md-pull-6 {\n right: 50%;\n }\n .col-md-pull-5 {\n right: 41.66666667%;\n }\n .col-md-pull-4 {\n right: 33.33333333%;\n }\n .col-md-pull-3 {\n right: 25%;\n }\n .col-md-pull-2 {\n right: 16.66666667%;\n }\n .col-md-pull-1 {\n right: 8.33333333%;\n }\n .col-md-pull-0 {\n right: auto;\n }\n .col-md-push-12 {\n left: 100%;\n }\n .col-md-push-11 {\n left: 91.66666667%;\n }\n .col-md-push-10 {\n left: 83.33333333%;\n }\n .col-md-push-9 {\n left: 75%;\n }\n .col-md-push-8 {\n left: 66.66666667%;\n }\n .col-md-push-7 {\n left: 58.33333333%;\n }\n .col-md-push-6 {\n left: 50%;\n }\n .col-md-push-5 {\n left: 41.66666667%;\n }\n .col-md-push-4 {\n left: 33.33333333%;\n }\n .col-md-push-3 {\n left: 25%;\n }\n .col-md-push-2 {\n left: 16.66666667%;\n }\n .col-md-push-1 {\n left: 8.33333333%;\n }\n .col-md-push-0 {\n left: auto;\n }\n .col-md-offset-12 {\n margin-left: 100%;\n }\n .col-md-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-md-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-md-offset-9 {\n margin-left: 75%;\n }\n .col-md-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-md-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-md-offset-6 {\n margin-left: 50%;\n }\n .col-md-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-md-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-md-offset-3 {\n margin-left: 25%;\n }\n .col-md-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-md-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-md-offset-0 {\n margin-left: 0;\n }\n}\n@media (min-width: 1200px) {\n .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {\n float: left;\n }\n .col-lg-12 {\n width: 100%;\n }\n .col-lg-11 {\n width: 91.66666667%;\n }\n .col-lg-10 {\n width: 83.33333333%;\n }\n .col-lg-9 {\n width: 75%;\n }\n .col-lg-8 {\n width: 66.66666667%;\n }\n .col-lg-7 {\n width: 58.33333333%;\n }\n .col-lg-6 {\n width: 50%;\n }\n .col-lg-5 {\n width: 41.66666667%;\n }\n .col-lg-4 {\n width: 33.33333333%;\n }\n .col-lg-3 {\n width: 25%;\n }\n .col-lg-2 {\n width: 16.66666667%;\n }\n .col-lg-1 {\n width: 8.33333333%;\n }\n .col-lg-pull-12 {\n right: 100%;\n }\n .col-lg-pull-11 {\n right: 91.66666667%;\n }\n .col-lg-pull-10 {\n right: 83.33333333%;\n }\n .col-lg-pull-9 {\n right: 75%;\n }\n .col-lg-pull-8 {\n right: 66.66666667%;\n }\n .col-lg-pull-7 {\n right: 58.33333333%;\n }\n .col-lg-pull-6 {\n right: 50%;\n }\n .col-lg-pull-5 {\n right: 41.66666667%;\n }\n .col-lg-pull-4 {\n right: 33.33333333%;\n }\n .col-lg-pull-3 {\n right: 25%;\n }\n .col-lg-pull-2 {\n right: 16.66666667%;\n }\n .col-lg-pull-1 {\n right: 8.33333333%;\n }\n .col-lg-pull-0 {\n right: auto;\n }\n .col-lg-push-12 {\n left: 100%;\n }\n .col-lg-push-11 {\n left: 91.66666667%;\n }\n .col-lg-push-10 {\n left: 83.33333333%;\n }\n .col-lg-push-9 {\n left: 75%;\n }\n .col-lg-push-8 {\n left: 66.66666667%;\n }\n .col-lg-push-7 {\n left: 58.33333333%;\n }\n .col-lg-push-6 {\n left: 50%;\n }\n .col-lg-push-5 {\n left: 41.66666667%;\n }\n .col-lg-push-4 {\n left: 33.33333333%;\n }\n .col-lg-push-3 {\n left: 25%;\n }\n .col-lg-push-2 {\n left: 16.66666667%;\n }\n .col-lg-push-1 {\n left: 8.33333333%;\n }\n .col-lg-push-0 {\n left: auto;\n }\n .col-lg-offset-12 {\n margin-left: 100%;\n }\n .col-lg-offset-11 {\n margin-left: 91.66666667%;\n }\n .col-lg-offset-10 {\n margin-left: 83.33333333%;\n }\n .col-lg-offset-9 {\n margin-left: 75%;\n }\n .col-lg-offset-8 {\n margin-left: 66.66666667%;\n }\n .col-lg-offset-7 {\n margin-left: 58.33333333%;\n }\n .col-lg-offset-6 {\n margin-left: 50%;\n }\n .col-lg-offset-5 {\n margin-left: 41.66666667%;\n }\n .col-lg-offset-4 {\n margin-left: 33.33333333%;\n }\n .col-lg-offset-3 {\n margin-left: 25%;\n }\n .col-lg-offset-2 {\n margin-left: 16.66666667%;\n }\n .col-lg-offset-1 {\n margin-left: 8.33333333%;\n }\n .col-lg-offset-0 {\n margin-left: 0;\n }\n}\ntable {\n background-color: transparent;\n}\ncaption {\n padding-top: 8px;\n padding-bottom: 8px;\n color: #777;\n text-align: left;\n}\nth {\n text-align: left;\n}\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: 20px;\n}\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n padding: 8px;\n line-height: 1.42857143;\n vertical-align: top;\n border-top: 1px solid #ddd;\n}\n.table > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid #ddd;\n}\n.table > caption + thead > tr:first-child > th,\n.table > colgroup + thead > tr:first-child > th,\n.table > thead:first-child > tr:first-child > th,\n.table > caption + thead > tr:first-child > td,\n.table > colgroup + thead > tr:first-child > td,\n.table > thead:first-child > tr:first-child > td {\n border-top: 0;\n}\n.table > tbody + tbody {\n border-top: 2px solid #ddd;\n}\n.table .table {\n background-color: #fff;\n}\n.table-condensed > thead > tr > th,\n.table-condensed > tbody > tr > th,\n.table-condensed > tfoot > tr > th,\n.table-condensed > thead > tr > td,\n.table-condensed > tbody > tr > td,\n.table-condensed > tfoot > tr > td {\n padding: 5px;\n}\n.table-bordered {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #ddd;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table-striped > tbody > tr:nth-of-type(odd) {\n background-color: #f9f9f9;\n}\n.table-hover > tbody > tr:hover {\n background-color: #f5f5f5;\n}\ntable col[class*=\"col-\"] {\n position: static;\n display: table-column;\n float: none;\n}\ntable td[class*=\"col-\"],\ntable th[class*=\"col-\"] {\n position: static;\n display: table-cell;\n float: none;\n}\n.table > thead > tr > td.active,\n.table > tbody > tr > td.active,\n.table > tfoot > tr > td.active,\n.table > thead > tr > th.active,\n.table > tbody > tr > th.active,\n.table > tfoot > tr > th.active,\n.table > thead > tr.active > td,\n.table > tbody > tr.active > td,\n.table > tfoot > tr.active > td,\n.table > thead > tr.active > th,\n.table > tbody > tr.active > th,\n.table > tfoot > tr.active > th {\n background-color: #f5f5f5;\n}\n.table-hover > tbody > tr > td.active:hover,\n.table-hover > tbody > tr > th.active:hover,\n.table-hover > tbody > tr.active:hover > td,\n.table-hover > tbody > tr:hover > .active,\n.table-hover > tbody > tr.active:hover > th {\n background-color: #e8e8e8;\n}\n.table > thead > tr > td.success,\n.table > tbody > tr > td.success,\n.table > tfoot > tr > td.success,\n.table > thead > tr > th.success,\n.table > tbody > tr > th.success,\n.table > tfoot > tr > th.success,\n.table > thead > tr.success > td,\n.table > tbody > tr.success > td,\n.table > tfoot > tr.success > td,\n.table > thead > tr.success > th,\n.table > tbody > tr.success > th,\n.table > tfoot > tr.success > th {\n background-color: #dff0d8;\n}\n.table-hover > tbody > tr > td.success:hover,\n.table-hover > tbody > tr > th.success:hover,\n.table-hover > tbody > tr.success:hover > td,\n.table-hover > tbody > tr:hover > .success,\n.table-hover > tbody > tr.success:hover > th {\n background-color: #d0e9c6;\n}\n.table > thead > tr > td.info,\n.table > tbody > tr > td.info,\n.table > tfoot > tr > td.info,\n.table > thead > tr > th.info,\n.table > tbody > tr > th.info,\n.table > tfoot > tr > th.info,\n.table > thead > tr.info > td,\n.table > tbody > tr.info > td,\n.table > tfoot > tr.info > td,\n.table > thead > tr.info > th,\n.table > tbody > tr.info > th,\n.table > tfoot > tr.info > th {\n background-color: #d9edf7;\n}\n.table-hover > tbody > tr > td.info:hover,\n.table-hover > tbody > tr > th.info:hover,\n.table-hover > tbody > tr.info:hover > td,\n.table-hover > tbody > tr:hover > .info,\n.table-hover > tbody > tr.info:hover > th {\n background-color: #c4e3f3;\n}\n.table > thead > tr > td.warning,\n.table > tbody > tr > td.warning,\n.table > tfoot > tr > td.warning,\n.table > thead > tr > th.warning,\n.table > tbody > tr > th.warning,\n.table > tfoot > tr > th.warning,\n.table > thead > tr.warning > td,\n.table > tbody > tr.warning > td,\n.table > tfoot > tr.warning > td,\n.table > thead > tr.warning > th,\n.table > tbody > tr.warning > th,\n.table > tfoot > tr.warning > th {\n background-color: #fcf8e3;\n}\n.table-hover > tbody > tr > td.warning:hover,\n.table-hover > tbody > tr > th.warning:hover,\n.table-hover > tbody > tr.warning:hover > td,\n.table-hover > tbody > tr:hover > .warning,\n.table-hover > tbody > tr.warning:hover > th {\n background-color: #faf2cc;\n}\n.table > thead > tr > td.danger,\n.table > tbody > tr > td.danger,\n.table > tfoot > tr > td.danger,\n.table > thead > tr > th.danger,\n.table > tbody > tr > th.danger,\n.table > tfoot > tr > th.danger,\n.table > thead > tr.danger > td,\n.table > tbody > tr.danger > td,\n.table > tfoot > tr.danger > td,\n.table > thead > tr.danger > th,\n.table > tbody > tr.danger > th,\n.table > tfoot > tr.danger > th {\n background-color: #f2dede;\n}\n.table-hover > tbody > tr > td.danger:hover,\n.table-hover > tbody > tr > th.danger:hover,\n.table-hover > tbody > tr.danger:hover > td,\n.table-hover > tbody > tr:hover > .danger,\n.table-hover > tbody > tr.danger:hover > th {\n background-color: #ebcccc;\n}\n.table-responsive {\n min-height: .01%;\n overflow-x: auto;\n}\n@media screen and (max-width: 767px) {\n .table-responsive {\n width: 100%;\n margin-bottom: 15px;\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid #ddd;\n }\n .table-responsive > .table {\n margin-bottom: 0;\n }\n .table-responsive > .table > thead > tr > th,\n .table-responsive > .table > tbody > tr > th,\n .table-responsive > .table > tfoot > tr > th,\n .table-responsive > .table > thead > tr > td,\n .table-responsive > .table > tbody > tr > td,\n .table-responsive > .table > tfoot > tr > td {\n white-space: nowrap;\n }\n .table-responsive > .table-bordered {\n border: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:first-child,\n .table-responsive > .table-bordered > tbody > tr > th:first-child,\n .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n .table-responsive > .table-bordered > thead > tr > td:first-child,\n .table-responsive > .table-bordered > tbody > tr > td:first-child,\n .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n }\n .table-responsive > .table-bordered > thead > tr > th:last-child,\n .table-responsive > .table-bordered > tbody > tr > th:last-child,\n .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n .table-responsive > .table-bordered > thead > tr > td:last-child,\n .table-responsive > .table-bordered > tbody > tr > td:last-child,\n .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n }\n .table-responsive > .table-bordered > tbody > tr:last-child > th,\n .table-responsive > .table-bordered > tfoot > tr:last-child > th,\n .table-responsive > .table-bordered > tbody > tr:last-child > td,\n .table-responsive > .table-bordered > tfoot > tr:last-child > td {\n border-bottom: 0;\n }\n}\nfieldset {\n min-width: 0;\n padding: 0;\n margin: 0;\n border: 0;\n}\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: 20px;\n font-size: 21px;\n line-height: inherit;\n color: #333;\n border: 0;\n border-bottom: 1px solid #e5e5e5;\n}\nlabel {\n display: inline-block;\n max-width: 100%;\n margin-bottom: 5px;\n font-weight: bold;\n}\ninput[type=\"search\"] {\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n}\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9;\n line-height: normal;\n}\ninput[type=\"file\"] {\n display: block;\n}\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\nselect[multiple],\nselect[size] {\n height: auto;\n}\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\noutput {\n display: block;\n padding-top: 7px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n}\n.form-control {\n display: block;\n width: 100%;\n height: 34px;\n padding: 6px 12px;\n font-size: 14px;\n line-height: 1.42857143;\n color: #555;\n background-color: #fff;\n background-image: none;\n border: 1px solid #ccc;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;\n -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;\n}\n.form-control:focus {\n border-color: #66afe9;\n outline: 0;\n -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);\n}\n.form-control::-moz-placeholder {\n color: #999;\n opacity: 1;\n}\n.form-control:-ms-input-placeholder {\n color: #999;\n}\n.form-control::-webkit-input-placeholder {\n color: #999;\n}\n.form-control::-ms-expand {\n background-color: transparent;\n border: 0;\n}\n.form-control[disabled],\n.form-control[readonly],\nfieldset[disabled] .form-control {\n background-color: #eee;\n opacity: 1;\n}\n.form-control[disabled],\nfieldset[disabled] .form-control {\n cursor: not-allowed;\n}\ntextarea.form-control {\n height: auto;\n}\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"].form-control,\n input[type=\"time\"].form-control,\n input[type=\"datetime-local\"].form-control,\n input[type=\"month\"].form-control {\n line-height: 34px;\n }\n input[type=\"date\"].input-sm,\n input[type=\"time\"].input-sm,\n input[type=\"datetime-local\"].input-sm,\n input[type=\"month\"].input-sm,\n .input-group-sm input[type=\"date\"],\n .input-group-sm input[type=\"time\"],\n .input-group-sm input[type=\"datetime-local\"],\n .input-group-sm input[type=\"month\"] {\n line-height: 30px;\n }\n input[type=\"date\"].input-lg,\n input[type=\"time\"].input-lg,\n input[type=\"datetime-local\"].input-lg,\n input[type=\"month\"].input-lg,\n .input-group-lg input[type=\"date\"],\n .input-group-lg input[type=\"time\"],\n .input-group-lg input[type=\"datetime-local\"],\n .input-group-lg input[type=\"month\"] {\n line-height: 46px;\n }\n}\n.form-group {\n margin-bottom: 15px;\n}\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.radio label,\n.checkbox label {\n min-height: 20px;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-top: 4px \\9;\n margin-left: -20px;\n}\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px;\n}\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n vertical-align: middle;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px;\n}\ninput[type=\"radio\"][disabled],\ninput[type=\"checkbox\"][disabled],\ninput[type=\"radio\"].disabled,\ninput[type=\"checkbox\"].disabled,\nfieldset[disabled] input[type=\"radio\"],\nfieldset[disabled] input[type=\"checkbox\"] {\n cursor: not-allowed;\n}\n.radio-inline.disabled,\n.checkbox-inline.disabled,\nfieldset[disabled] .radio-inline,\nfieldset[disabled] .checkbox-inline {\n cursor: not-allowed;\n}\n.radio.disabled label,\n.checkbox.disabled label,\nfieldset[disabled] .radio label,\nfieldset[disabled] .checkbox label {\n cursor: not-allowed;\n}\n.form-control-static {\n min-height: 34px;\n padding-top: 7px;\n padding-bottom: 7px;\n margin-bottom: 0;\n}\n.form-control-static.input-lg,\n.form-control-static.input-sm {\n padding-right: 0;\n padding-left: 0;\n}\n.input-sm {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-sm {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-sm,\nselect[multiple].input-sm {\n height: auto;\n}\n.form-group-sm .form-control {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.form-group-sm select.form-control {\n height: 30px;\n line-height: 30px;\n}\n.form-group-sm textarea.form-control,\n.form-group-sm select[multiple].form-control {\n height: auto;\n}\n.form-group-sm .form-control-static {\n height: 30px;\n min-height: 32px;\n padding: 6px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.input-lg {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-lg {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-lg,\nselect[multiple].input-lg {\n height: auto;\n}\n.form-group-lg .form-control {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.form-group-lg select.form-control {\n height: 46px;\n line-height: 46px;\n}\n.form-group-lg textarea.form-control,\n.form-group-lg select[multiple].form-control {\n height: auto;\n}\n.form-group-lg .form-control-static {\n height: 46px;\n min-height: 38px;\n padding: 11px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.has-feedback {\n position: relative;\n}\n.has-feedback .form-control {\n padding-right: 42.5px;\n}\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2;\n display: block;\n width: 34px;\n height: 34px;\n line-height: 34px;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: 46px;\n height: 46px;\n line-height: 46px;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: 30px;\n height: 30px;\n line-height: 30px;\n}\n.has-success .help-block,\n.has-success .control-label,\n.has-success .radio,\n.has-success .checkbox,\n.has-success .radio-inline,\n.has-success .checkbox-inline,\n.has-success.radio label,\n.has-success.checkbox label,\n.has-success.radio-inline label,\n.has-success.checkbox-inline label {\n color: #3c763d;\n}\n.has-success .form-control {\n border-color: #3c763d;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-success .form-control:focus {\n border-color: #2b542c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;\n}\n.has-success .input-group-addon {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #3c763d;\n}\n.has-success .form-control-feedback {\n color: #3c763d;\n}\n.has-warning .help-block,\n.has-warning .control-label,\n.has-warning .radio,\n.has-warning .checkbox,\n.has-warning .radio-inline,\n.has-warning .checkbox-inline,\n.has-warning.radio label,\n.has-warning.checkbox label,\n.has-warning.radio-inline label,\n.has-warning.checkbox-inline label {\n color: #8a6d3b;\n}\n.has-warning .form-control {\n border-color: #8a6d3b;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-warning .form-control:focus {\n border-color: #66512c;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;\n}\n.has-warning .input-group-addon {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #8a6d3b;\n}\n.has-warning .form-control-feedback {\n color: #8a6d3b;\n}\n.has-error .help-block,\n.has-error .control-label,\n.has-error .radio,\n.has-error .checkbox,\n.has-error .radio-inline,\n.has-error .checkbox-inline,\n.has-error.radio label,\n.has-error.checkbox label,\n.has-error.radio-inline label,\n.has-error.checkbox-inline label {\n color: #a94442;\n}\n.has-error .form-control {\n border-color: #a94442;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);\n}\n.has-error .form-control:focus {\n border-color: #843534;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;\n}\n.has-error .input-group-addon {\n color: #a94442;\n background-color: #f2dede;\n border-color: #a94442;\n}\n.has-error .form-control-feedback {\n color: #a94442;\n}\n.has-feedback label ~ .form-control-feedback {\n top: 25px;\n}\n.has-feedback label.sr-only ~ .form-control-feedback {\n top: 0;\n}\n.help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n}\n@media (min-width: 768px) {\n .form-inline .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .form-inline .form-control-static {\n display: inline-block;\n }\n .form-inline .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .form-inline .input-group .input-group-addon,\n .form-inline .input-group .input-group-btn,\n .form-inline .input-group .form-control {\n width: auto;\n }\n .form-inline .input-group > .form-control {\n width: 100%;\n }\n .form-inline .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio,\n .form-inline .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .form-inline .radio label,\n .form-inline .checkbox label {\n padding-left: 0;\n }\n .form-inline .radio input[type=\"radio\"],\n .form-inline .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .form-inline .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox,\n.form-horizontal .radio-inline,\n.form-horizontal .checkbox-inline {\n padding-top: 7px;\n margin-top: 0;\n margin-bottom: 0;\n}\n.form-horizontal .radio,\n.form-horizontal .checkbox {\n min-height: 27px;\n}\n.form-horizontal .form-group {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .control-label {\n padding-top: 7px;\n margin-bottom: 0;\n text-align: right;\n }\n}\n.form-horizontal .has-feedback .form-control-feedback {\n right: 15px;\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-lg .control-label {\n padding-top: 11px;\n font-size: 18px;\n }\n}\n@media (min-width: 768px) {\n .form-horizontal .form-group-sm .control-label {\n padding-top: 6px;\n font-size: 12px;\n }\n}\n.btn {\n display: inline-block;\n padding: 6px 12px;\n margin-bottom: 0;\n font-size: 14px;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n -ms-touch-action: manipulation;\n touch-action: manipulation;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.btn:focus,\n.btn:active:focus,\n.btn.active:focus,\n.btn.focus,\n.btn:active.focus,\n.btn.active.focus {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n.btn:hover,\n.btn:focus,\n.btn.focus {\n color: #333;\n text-decoration: none;\n}\n.btn:active,\n.btn.active {\n background-image: none;\n outline: 0;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn.disabled,\n.btn[disabled],\nfieldset[disabled] .btn {\n cursor: not-allowed;\n filter: alpha(opacity=65);\n -webkit-box-shadow: none;\n box-shadow: none;\n opacity: .65;\n}\na.btn.disabled,\nfieldset[disabled] a.btn {\n pointer-events: none;\n}\n.btn-default {\n color: #333;\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default:focus,\n.btn-default.focus {\n color: #333;\n background-color: #e6e6e6;\n border-color: #8c8c8c;\n}\n.btn-default:hover {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n color: #333;\n background-color: #e6e6e6;\n border-color: #adadad;\n}\n.btn-default:active:hover,\n.btn-default.active:hover,\n.open > .dropdown-toggle.btn-default:hover,\n.btn-default:active:focus,\n.btn-default.active:focus,\n.open > .dropdown-toggle.btn-default:focus,\n.btn-default:active.focus,\n.btn-default.active.focus,\n.open > .dropdown-toggle.btn-default.focus {\n color: #333;\n background-color: #d4d4d4;\n border-color: #8c8c8c;\n}\n.btn-default:active,\n.btn-default.active,\n.open > .dropdown-toggle.btn-default {\n background-image: none;\n}\n.btn-default.disabled:hover,\n.btn-default[disabled]:hover,\nfieldset[disabled] .btn-default:hover,\n.btn-default.disabled:focus,\n.btn-default[disabled]:focus,\nfieldset[disabled] .btn-default:focus,\n.btn-default.disabled.focus,\n.btn-default[disabled].focus,\nfieldset[disabled] .btn-default.focus {\n background-color: #fff;\n border-color: #ccc;\n}\n.btn-default .badge {\n color: #fff;\n background-color: #333;\n}\n.btn-primary {\n color: #fff;\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary:focus,\n.btn-primary.focus {\n color: #fff;\n background-color: #286090;\n border-color: #122b40;\n}\n.btn-primary:hover {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n color: #fff;\n background-color: #286090;\n border-color: #204d74;\n}\n.btn-primary:active:hover,\n.btn-primary.active:hover,\n.open > .dropdown-toggle.btn-primary:hover,\n.btn-primary:active:focus,\n.btn-primary.active:focus,\n.open > .dropdown-toggle.btn-primary:focus,\n.btn-primary:active.focus,\n.btn-primary.active.focus,\n.open > .dropdown-toggle.btn-primary.focus {\n color: #fff;\n background-color: #204d74;\n border-color: #122b40;\n}\n.btn-primary:active,\n.btn-primary.active,\n.open > .dropdown-toggle.btn-primary {\n background-image: none;\n}\n.btn-primary.disabled:hover,\n.btn-primary[disabled]:hover,\nfieldset[disabled] .btn-primary:hover,\n.btn-primary.disabled:focus,\n.btn-primary[disabled]:focus,\nfieldset[disabled] .btn-primary:focus,\n.btn-primary.disabled.focus,\n.btn-primary[disabled].focus,\nfieldset[disabled] .btn-primary.focus {\n background-color: #337ab7;\n border-color: #2e6da4;\n}\n.btn-primary .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.btn-success {\n color: #fff;\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success:focus,\n.btn-success.focus {\n color: #fff;\n background-color: #449d44;\n border-color: #255625;\n}\n.btn-success:hover {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n color: #fff;\n background-color: #449d44;\n border-color: #398439;\n}\n.btn-success:active:hover,\n.btn-success.active:hover,\n.open > .dropdown-toggle.btn-success:hover,\n.btn-success:active:focus,\n.btn-success.active:focus,\n.open > .dropdown-toggle.btn-success:focus,\n.btn-success:active.focus,\n.btn-success.active.focus,\n.open > .dropdown-toggle.btn-success.focus {\n color: #fff;\n background-color: #398439;\n border-color: #255625;\n}\n.btn-success:active,\n.btn-success.active,\n.open > .dropdown-toggle.btn-success {\n background-image: none;\n}\n.btn-success.disabled:hover,\n.btn-success[disabled]:hover,\nfieldset[disabled] .btn-success:hover,\n.btn-success.disabled:focus,\n.btn-success[disabled]:focus,\nfieldset[disabled] .btn-success:focus,\n.btn-success.disabled.focus,\n.btn-success[disabled].focus,\nfieldset[disabled] .btn-success.focus {\n background-color: #5cb85c;\n border-color: #4cae4c;\n}\n.btn-success .badge {\n color: #5cb85c;\n background-color: #fff;\n}\n.btn-info {\n color: #fff;\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info:focus,\n.btn-info.focus {\n color: #fff;\n background-color: #31b0d5;\n border-color: #1b6d85;\n}\n.btn-info:hover {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n color: #fff;\n background-color: #31b0d5;\n border-color: #269abc;\n}\n.btn-info:active:hover,\n.btn-info.active:hover,\n.open > .dropdown-toggle.btn-info:hover,\n.btn-info:active:focus,\n.btn-info.active:focus,\n.open > .dropdown-toggle.btn-info:focus,\n.btn-info:active.focus,\n.btn-info.active.focus,\n.open > .dropdown-toggle.btn-info.focus {\n color: #fff;\n background-color: #269abc;\n border-color: #1b6d85;\n}\n.btn-info:active,\n.btn-info.active,\n.open > .dropdown-toggle.btn-info {\n background-image: none;\n}\n.btn-info.disabled:hover,\n.btn-info[disabled]:hover,\nfieldset[disabled] .btn-info:hover,\n.btn-info.disabled:focus,\n.btn-info[disabled]:focus,\nfieldset[disabled] .btn-info:focus,\n.btn-info.disabled.focus,\n.btn-info[disabled].focus,\nfieldset[disabled] .btn-info.focus {\n background-color: #5bc0de;\n border-color: #46b8da;\n}\n.btn-info .badge {\n color: #5bc0de;\n background-color: #fff;\n}\n.btn-warning {\n color: #fff;\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning:focus,\n.btn-warning.focus {\n color: #fff;\n background-color: #ec971f;\n border-color: #985f0d;\n}\n.btn-warning:hover {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n color: #fff;\n background-color: #ec971f;\n border-color: #d58512;\n}\n.btn-warning:active:hover,\n.btn-warning.active:hover,\n.open > .dropdown-toggle.btn-warning:hover,\n.btn-warning:active:focus,\n.btn-warning.active:focus,\n.open > .dropdown-toggle.btn-warning:focus,\n.btn-warning:active.focus,\n.btn-warning.active.focus,\n.open > .dropdown-toggle.btn-warning.focus {\n color: #fff;\n background-color: #d58512;\n border-color: #985f0d;\n}\n.btn-warning:active,\n.btn-warning.active,\n.open > .dropdown-toggle.btn-warning {\n background-image: none;\n}\n.btn-warning.disabled:hover,\n.btn-warning[disabled]:hover,\nfieldset[disabled] .btn-warning:hover,\n.btn-warning.disabled:focus,\n.btn-warning[disabled]:focus,\nfieldset[disabled] .btn-warning:focus,\n.btn-warning.disabled.focus,\n.btn-warning[disabled].focus,\nfieldset[disabled] .btn-warning.focus {\n background-color: #f0ad4e;\n border-color: #eea236;\n}\n.btn-warning .badge {\n color: #f0ad4e;\n background-color: #fff;\n}\n.btn-danger {\n color: #fff;\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger:focus,\n.btn-danger.focus {\n color: #fff;\n background-color: #c9302c;\n border-color: #761c19;\n}\n.btn-danger:hover {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n color: #fff;\n background-color: #c9302c;\n border-color: #ac2925;\n}\n.btn-danger:active:hover,\n.btn-danger.active:hover,\n.open > .dropdown-toggle.btn-danger:hover,\n.btn-danger:active:focus,\n.btn-danger.active:focus,\n.open > .dropdown-toggle.btn-danger:focus,\n.btn-danger:active.focus,\n.btn-danger.active.focus,\n.open > .dropdown-toggle.btn-danger.focus {\n color: #fff;\n background-color: #ac2925;\n border-color: #761c19;\n}\n.btn-danger:active,\n.btn-danger.active,\n.open > .dropdown-toggle.btn-danger {\n background-image: none;\n}\n.btn-danger.disabled:hover,\n.btn-danger[disabled]:hover,\nfieldset[disabled] .btn-danger:hover,\n.btn-danger.disabled:focus,\n.btn-danger[disabled]:focus,\nfieldset[disabled] .btn-danger:focus,\n.btn-danger.disabled.focus,\n.btn-danger[disabled].focus,\nfieldset[disabled] .btn-danger.focus {\n background-color: #d9534f;\n border-color: #d43f3a;\n}\n.btn-danger .badge {\n color: #d9534f;\n background-color: #fff;\n}\n.btn-link {\n font-weight: normal;\n color: #337ab7;\n border-radius: 0;\n}\n.btn-link,\n.btn-link:active,\n.btn-link.active,\n.btn-link[disabled],\nfieldset[disabled] .btn-link {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn-link,\n.btn-link:hover,\n.btn-link:focus,\n.btn-link:active {\n border-color: transparent;\n}\n.btn-link:hover,\n.btn-link:focus {\n color: #23527c;\n text-decoration: underline;\n background-color: transparent;\n}\n.btn-link[disabled]:hover,\nfieldset[disabled] .btn-link:hover,\n.btn-link[disabled]:focus,\nfieldset[disabled] .btn-link:focus {\n color: #777;\n text-decoration: none;\n}\n.btn-lg,\n.btn-group-lg > .btn {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\n.btn-sm,\n.btn-group-sm > .btn {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-xs,\n.btn-group-xs > .btn {\n padding: 1px 5px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\n.btn-block {\n display: block;\n width: 100%;\n}\n.btn-block + .btn-block {\n margin-top: 5px;\n}\ninput[type=\"submit\"].btn-block,\ninput[type=\"reset\"].btn-block,\ninput[type=\"button\"].btn-block {\n width: 100%;\n}\n.fade {\n opacity: 0;\n -webkit-transition: opacity .15s linear;\n -o-transition: opacity .15s linear;\n transition: opacity .15s linear;\n}\n.fade.in {\n opacity: 1;\n}\n.collapse {\n display: none;\n}\n.collapse.in {\n display: block;\n}\ntr.collapse.in {\n display: table-row;\n}\ntbody.collapse.in {\n display: table-row-group;\n}\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n -webkit-transition-timing-function: ease;\n -o-transition-timing-function: ease;\n transition-timing-function: ease;\n -webkit-transition-duration: .35s;\n -o-transition-duration: .35s;\n transition-duration: .35s;\n -webkit-transition-property: height, visibility;\n -o-transition-property: height, visibility;\n transition-property: height, visibility;\n}\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: 4px dashed;\n border-top: 4px solid \\9;\n border-right: 4px solid transparent;\n border-left: 4px solid transparent;\n}\n.dropup,\n.dropdown {\n position: relative;\n}\n.dropdown-toggle:focus {\n outline: 0;\n}\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: 1000;\n display: none;\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0;\n font-size: 14px;\n text-align: left;\n list-style: none;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, .15);\n border-radius: 4px;\n -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n box-shadow: 0 6px 12px rgba(0, 0, 0, .175);\n}\n.dropdown-menu.pull-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu .divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.dropdown-menu > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: 1.42857143;\n color: #333;\n white-space: nowrap;\n}\n.dropdown-menu > li > a:hover,\n.dropdown-menu > li > a:focus {\n color: #262626;\n text-decoration: none;\n background-color: #f5f5f5;\n}\n.dropdown-menu > .active > a,\n.dropdown-menu > .active > a:hover,\n.dropdown-menu > .active > a:focus {\n color: #fff;\n text-decoration: none;\n background-color: #337ab7;\n outline: 0;\n}\n.dropdown-menu > .disabled > a,\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n color: #777;\n}\n.dropdown-menu > .disabled > a:hover,\n.dropdown-menu > .disabled > a:focus {\n text-decoration: none;\n cursor: not-allowed;\n background-color: transparent;\n background-image: none;\n filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);\n}\n.open > .dropdown-menu {\n display: block;\n}\n.open > a {\n outline: 0;\n}\n.dropdown-menu-right {\n right: 0;\n left: auto;\n}\n.dropdown-menu-left {\n right: auto;\n left: 0;\n}\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: 12px;\n line-height: 1.42857143;\n color: #777;\n white-space: nowrap;\n}\n.dropdown-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 990;\n}\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n.dropup .caret,\n.navbar-fixed-bottom .dropdown .caret {\n content: \"\";\n border-top: 0;\n border-bottom: 4px dashed;\n border-bottom: 4px solid \\9;\n}\n.dropup .dropdown-menu,\n.navbar-fixed-bottom .dropdown .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n}\n@media (min-width: 768px) {\n .navbar-right .dropdown-menu {\n right: 0;\n left: auto;\n }\n .navbar-right .dropdown-menu-left {\n right: auto;\n left: 0;\n }\n}\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle;\n}\n.btn-group > .btn,\n.btn-group-vertical > .btn {\n position: relative;\n float: left;\n}\n.btn-group > .btn:hover,\n.btn-group-vertical > .btn:hover,\n.btn-group > .btn:focus,\n.btn-group-vertical > .btn:focus,\n.btn-group > .btn:active,\n.btn-group-vertical > .btn:active,\n.btn-group > .btn.active,\n.btn-group-vertical > .btn.active {\n z-index: 2;\n}\n.btn-group .btn + .btn,\n.btn-group .btn + .btn-group,\n.btn-group .btn-group + .btn,\n.btn-group .btn-group + .btn-group {\n margin-left: -1px;\n}\n.btn-toolbar {\n margin-left: -5px;\n}\n.btn-toolbar .btn,\n.btn-toolbar .btn-group,\n.btn-toolbar .input-group {\n float: left;\n}\n.btn-toolbar > .btn,\n.btn-toolbar > .btn-group,\n.btn-toolbar > .input-group {\n margin-left: 5px;\n}\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n.btn-group > .btn:first-child {\n margin-left: 0;\n}\n.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n.btn-group > .btn + .dropdown-toggle {\n padding-right: 8px;\n padding-left: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-right: 12px;\n padding-left: 12px;\n}\n.btn-group.open .dropdown-toggle {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n}\n.btn-group.open .dropdown-toggle.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn .caret {\n margin-left: 0;\n}\n.btn-lg .caret {\n border-width: 5px 5px 0;\n border-bottom-width: 0;\n}\n.dropup .btn-lg .caret {\n border-width: 0 5px 5px;\n}\n.btn-group-vertical > .btn,\n.btn-group-vertical > .btn-group,\n.btn-group-vertical > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n}\n.btn-group-vertical > .btn-group > .btn {\n float: none;\n}\n.btn-group-vertical > .btn + .btn,\n.btn-group-vertical > .btn + .btn-group,\n.btn-group-vertical > .btn-group + .btn,\n.btn-group-vertical > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n}\n.btn-group-vertical > .btn:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.btn-group-vertical > .btn:first-child:not(:last-child) {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn:last-child:not(:first-child) {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,\n.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n}\n.btn-group-justified > .btn,\n.btn-group-justified > .btn-group {\n display: table-cell;\n float: none;\n width: 1%;\n}\n.btn-group-justified > .btn-group .btn {\n width: 100%;\n}\n.btn-group-justified > .btn-group .dropdown-menu {\n left: auto;\n}\n[data-toggle=\"buttons\"] > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"radio\"],\n[data-toggle=\"buttons\"] > .btn input[type=\"checkbox\"],\n[data-toggle=\"buttons\"] > .btn-group > .btn input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n pointer-events: none;\n}\n.input-group {\n position: relative;\n display: table;\n border-collapse: separate;\n}\n.input-group[class*=\"col-\"] {\n float: none;\n padding-right: 0;\n padding-left: 0;\n}\n.input-group .form-control {\n position: relative;\n z-index: 2;\n float: left;\n width: 100%;\n margin-bottom: 0;\n}\n.input-group .form-control:focus {\n z-index: 3;\n}\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n border-radius: 6px;\n}\nselect.input-group-lg > .form-control,\nselect.input-group-lg > .input-group-addon,\nselect.input-group-lg > .input-group-btn > .btn {\n height: 46px;\n line-height: 46px;\n}\ntextarea.input-group-lg > .form-control,\ntextarea.input-group-lg > .input-group-addon,\ntextarea.input-group-lg > .input-group-btn > .btn,\nselect[multiple].input-group-lg > .form-control,\nselect[multiple].input-group-lg > .input-group-addon,\nselect[multiple].input-group-lg > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n border-radius: 3px;\n}\nselect.input-group-sm > .form-control,\nselect.input-group-sm > .input-group-addon,\nselect.input-group-sm > .input-group-btn > .btn {\n height: 30px;\n line-height: 30px;\n}\ntextarea.input-group-sm > .form-control,\ntextarea.input-group-sm > .input-group-addon,\ntextarea.input-group-sm > .input-group-btn > .btn,\nselect[multiple].input-group-sm > .form-control,\nselect[multiple].input-group-sm > .input-group-addon,\nselect[multiple].input-group-sm > .input-group-btn > .btn {\n height: auto;\n}\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n}\n.input-group-addon:not(:first-child):not(:last-child),\n.input-group-btn:not(:first-child):not(:last-child),\n.input-group .form-control:not(:first-child):not(:last-child) {\n border-radius: 0;\n}\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle;\n}\n.input-group-addon {\n padding: 6px 12px;\n font-size: 14px;\n font-weight: normal;\n line-height: 1;\n color: #555;\n text-align: center;\n background-color: #eee;\n border: 1px solid #ccc;\n border-radius: 4px;\n}\n.input-group-addon.input-sm {\n padding: 5px 10px;\n font-size: 12px;\n border-radius: 3px;\n}\n.input-group-addon.input-lg {\n padding: 10px 16px;\n font-size: 18px;\n border-radius: 6px;\n}\n.input-group-addon input[type=\"radio\"],\n.input-group-addon input[type=\"checkbox\"] {\n margin-top: 0;\n}\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n.input-group-btn {\n position: relative;\n font-size: 0;\n white-space: nowrap;\n}\n.input-group-btn > .btn {\n position: relative;\n}\n.input-group-btn > .btn + .btn {\n margin-left: -1px;\n}\n.input-group-btn > .btn:hover,\n.input-group-btn > .btn:focus,\n.input-group-btn > .btn:active {\n z-index: 2;\n}\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group {\n margin-right: -1px;\n}\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group {\n z-index: 2;\n margin-left: -1px;\n}\n.nav {\n padding-left: 0;\n margin-bottom: 0;\n list-style: none;\n}\n.nav > li {\n position: relative;\n display: block;\n}\n.nav > li > a {\n position: relative;\n display: block;\n padding: 10px 15px;\n}\n.nav > li > a:hover,\n.nav > li > a:focus {\n text-decoration: none;\n background-color: #eee;\n}\n.nav > li.disabled > a {\n color: #777;\n}\n.nav > li.disabled > a:hover,\n.nav > li.disabled > a:focus {\n color: #777;\n text-decoration: none;\n cursor: not-allowed;\n background-color: transparent;\n}\n.nav .open > a,\n.nav .open > a:hover,\n.nav .open > a:focus {\n background-color: #eee;\n border-color: #337ab7;\n}\n.nav .nav-divider {\n height: 1px;\n margin: 9px 0;\n overflow: hidden;\n background-color: #e5e5e5;\n}\n.nav > li > a > img {\n max-width: none;\n}\n.nav-tabs {\n border-bottom: 1px solid #ddd;\n}\n.nav-tabs > li {\n float: left;\n margin-bottom: -1px;\n}\n.nav-tabs > li > a {\n margin-right: 2px;\n line-height: 1.42857143;\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0;\n}\n.nav-tabs > li > a:hover {\n border-color: #eee #eee #ddd;\n}\n.nav-tabs > li.active > a,\n.nav-tabs > li.active > a:hover,\n.nav-tabs > li.active > a:focus {\n color: #555;\n cursor: default;\n background-color: #fff;\n border: 1px solid #ddd;\n border-bottom-color: transparent;\n}\n.nav-tabs.nav-justified {\n width: 100%;\n border-bottom: 0;\n}\n.nav-tabs.nav-justified > li {\n float: none;\n}\n.nav-tabs.nav-justified > li > a {\n margin-bottom: 5px;\n text-align: center;\n}\n.nav-tabs.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-tabs.nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs.nav-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs.nav-justified > .active > a,\n.nav-tabs.nav-justified > .active > a:hover,\n.nav-tabs.nav-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs.nav-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs.nav-justified > .active > a,\n .nav-tabs.nav-justified > .active > a:hover,\n .nav-tabs.nav-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.nav-pills > li {\n float: left;\n}\n.nav-pills > li > a {\n border-radius: 4px;\n}\n.nav-pills > li + li {\n margin-left: 2px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n color: #fff;\n background-color: #337ab7;\n}\n.nav-stacked > li {\n float: none;\n}\n.nav-stacked > li + li {\n margin-top: 2px;\n margin-left: 0;\n}\n.nav-justified {\n width: 100%;\n}\n.nav-justified > li {\n float: none;\n}\n.nav-justified > li > a {\n margin-bottom: 5px;\n text-align: center;\n}\n.nav-justified > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n}\n@media (min-width: 768px) {\n .nav-justified > li {\n display: table-cell;\n width: 1%;\n }\n .nav-justified > li > a {\n margin-bottom: 0;\n }\n}\n.nav-tabs-justified {\n border-bottom: 0;\n}\n.nav-tabs-justified > li > a {\n margin-right: 0;\n border-radius: 4px;\n}\n.nav-tabs-justified > .active > a,\n.nav-tabs-justified > .active > a:hover,\n.nav-tabs-justified > .active > a:focus {\n border: 1px solid #ddd;\n}\n@media (min-width: 768px) {\n .nav-tabs-justified > li > a {\n border-bottom: 1px solid #ddd;\n border-radius: 4px 4px 0 0;\n }\n .nav-tabs-justified > .active > a,\n .nav-tabs-justified > .active > a:hover,\n .nav-tabs-justified > .active > a:focus {\n border-bottom-color: #fff;\n }\n}\n.tab-content > .tab-pane {\n display: none;\n}\n.tab-content > .active {\n display: block;\n}\n.nav-tabs .dropdown-menu {\n margin-top: -1px;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.navbar {\n position: relative;\n min-height: 50px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n}\n@media (min-width: 768px) {\n .navbar {\n border-radius: 4px;\n }\n}\n@media (min-width: 768px) {\n .navbar-header {\n float: left;\n }\n}\n.navbar-collapse {\n padding-right: 15px;\n padding-left: 15px;\n overflow-x: visible;\n -webkit-overflow-scrolling: touch;\n border-top: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);\n}\n.navbar-collapse.in {\n overflow-y: auto;\n}\n@media (min-width: 768px) {\n .navbar-collapse {\n width: auto;\n border-top: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n .navbar-collapse.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0;\n overflow: visible !important;\n }\n .navbar-collapse.in {\n overflow-y: visible;\n }\n .navbar-fixed-top .navbar-collapse,\n .navbar-static-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n padding-right: 0;\n padding-left: 0;\n }\n}\n.navbar-fixed-top .navbar-collapse,\n.navbar-fixed-bottom .navbar-collapse {\n max-height: 340px;\n}\n@media (max-device-width: 480px) and (orientation: landscape) {\n .navbar-fixed-top .navbar-collapse,\n .navbar-fixed-bottom .navbar-collapse {\n max-height: 200px;\n }\n}\n.container > .navbar-header,\n.container-fluid > .navbar-header,\n.container > .navbar-collapse,\n.container-fluid > .navbar-collapse {\n margin-right: -15px;\n margin-left: -15px;\n}\n@media (min-width: 768px) {\n .container > .navbar-header,\n .container-fluid > .navbar-header,\n .container > .navbar-collapse,\n .container-fluid > .navbar-collapse {\n margin-right: 0;\n margin-left: 0;\n }\n}\n.navbar-static-top {\n z-index: 1000;\n border-width: 0 0 1px;\n}\n@media (min-width: 768px) {\n .navbar-static-top {\n border-radius: 0;\n }\n}\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: 1030;\n}\n@media (min-width: 768px) {\n .navbar-fixed-top,\n .navbar-fixed-bottom {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0;\n border-width: 1px 0 0;\n}\n.navbar-brand {\n float: left;\n height: 50px;\n padding: 15px 15px;\n font-size: 18px;\n line-height: 20px;\n}\n.navbar-brand:hover,\n.navbar-brand:focus {\n text-decoration: none;\n}\n.navbar-brand > img {\n display: block;\n}\n@media (min-width: 768px) {\n .navbar > .container .navbar-brand,\n .navbar > .container-fluid .navbar-brand {\n margin-left: -15px;\n }\n}\n.navbar-toggle {\n position: relative;\n float: right;\n padding: 9px 10px;\n margin-top: 8px;\n margin-right: 15px;\n margin-bottom: 8px;\n background-color: transparent;\n background-image: none;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.navbar-toggle:focus {\n outline: 0;\n}\n.navbar-toggle .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n}\n.navbar-toggle .icon-bar + .icon-bar {\n margin-top: 4px;\n}\n@media (min-width: 768px) {\n .navbar-toggle {\n display: none;\n }\n}\n.navbar-nav {\n margin: 7.5px -15px;\n}\n.navbar-nav > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: 20px;\n}\n@media (max-width: 767px) {\n .navbar-nav .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n .navbar-nav .open .dropdown-menu > li > a,\n .navbar-nav .open .dropdown-menu .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n .navbar-nav .open .dropdown-menu > li > a {\n line-height: 20px;\n }\n .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-nav .open .dropdown-menu > li > a:focus {\n background-image: none;\n }\n}\n@media (min-width: 768px) {\n .navbar-nav {\n float: left;\n margin: 0;\n }\n .navbar-nav > li {\n float: left;\n }\n .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n }\n}\n.navbar-form {\n padding: 10px 15px;\n margin-top: 8px;\n margin-right: -15px;\n margin-bottom: 8px;\n margin-left: -15px;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);\n}\n@media (min-width: 768px) {\n .navbar-form .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .form-control {\n display: inline-block;\n width: auto;\n vertical-align: middle;\n }\n .navbar-form .form-control-static {\n display: inline-block;\n }\n .navbar-form .input-group {\n display: inline-table;\n vertical-align: middle;\n }\n .navbar-form .input-group .input-group-addon,\n .navbar-form .input-group .input-group-btn,\n .navbar-form .input-group .form-control {\n width: auto;\n }\n .navbar-form .input-group > .form-control {\n width: 100%;\n }\n .navbar-form .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio,\n .navbar-form .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n }\n .navbar-form .radio label,\n .navbar-form .checkbox label {\n padding-left: 0;\n }\n .navbar-form .radio input[type=\"radio\"],\n .navbar-form .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n .navbar-form .has-feedback .form-control-feedback {\n top: 0;\n }\n}\n@media (max-width: 767px) {\n .navbar-form .form-group {\n margin-bottom: 5px;\n }\n .navbar-form .form-group:last-child {\n margin-bottom: 0;\n }\n}\n@media (min-width: 768px) {\n .navbar-form {\n width: auto;\n padding-top: 0;\n padding-bottom: 0;\n margin-right: 0;\n margin-left: 0;\n border: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n}\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n}\n.navbar-btn {\n margin-top: 8px;\n margin-bottom: 8px;\n}\n.navbar-btn.btn-sm {\n margin-top: 10px;\n margin-bottom: 10px;\n}\n.navbar-btn.btn-xs {\n margin-top: 14px;\n margin-bottom: 14px;\n}\n.navbar-text {\n margin-top: 15px;\n margin-bottom: 15px;\n}\n@media (min-width: 768px) {\n .navbar-text {\n float: left;\n margin-right: 15px;\n margin-left: 15px;\n }\n}\n@media (min-width: 768px) {\n .navbar-left {\n float: left !important;\n }\n .navbar-right {\n float: right !important;\n margin-right: -15px;\n }\n .navbar-right ~ .navbar-right {\n margin-right: 0;\n }\n}\n.navbar-default {\n background-color: #f8f8f8;\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-brand {\n color: #777;\n}\n.navbar-default .navbar-brand:hover,\n.navbar-default .navbar-brand:focus {\n color: #5e5e5e;\n background-color: transparent;\n}\n.navbar-default .navbar-text {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a {\n color: #777;\n}\n.navbar-default .navbar-nav > li > a:hover,\n.navbar-default .navbar-nav > li > a:focus {\n color: #333;\n background-color: transparent;\n}\n.navbar-default .navbar-nav > .active > a,\n.navbar-default .navbar-nav > .active > a:hover,\n.navbar-default .navbar-nav > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .disabled > a,\n.navbar-default .navbar-nav > .disabled > a:hover,\n.navbar-default .navbar-nav > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n}\n.navbar-default .navbar-toggle {\n border-color: #ddd;\n}\n.navbar-default .navbar-toggle:hover,\n.navbar-default .navbar-toggle:focus {\n background-color: #ddd;\n}\n.navbar-default .navbar-toggle .icon-bar {\n background-color: #888;\n}\n.navbar-default .navbar-collapse,\n.navbar-default .navbar-form {\n border-color: #e7e7e7;\n}\n.navbar-default .navbar-nav > .open > a,\n.navbar-default .navbar-nav > .open > a:hover,\n.navbar-default .navbar-nav > .open > a:focus {\n color: #555;\n background-color: #e7e7e7;\n}\n@media (max-width: 767px) {\n .navbar-default .navbar-nav .open .dropdown-menu > li > a {\n color: #777;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #333;\n background-color: transparent;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #555;\n background-color: #e7e7e7;\n }\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #ccc;\n background-color: transparent;\n }\n}\n.navbar-default .navbar-link {\n color: #777;\n}\n.navbar-default .navbar-link:hover {\n color: #333;\n}\n.navbar-default .btn-link {\n color: #777;\n}\n.navbar-default .btn-link:hover,\n.navbar-default .btn-link:focus {\n color: #333;\n}\n.navbar-default .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-default .btn-link:hover,\n.navbar-default .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-default .btn-link:focus {\n color: #ccc;\n}\n.navbar-inverse {\n background-color: #222;\n border-color: #080808;\n}\n.navbar-inverse .navbar-brand {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-brand:hover,\n.navbar-inverse .navbar-brand:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-text {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-nav > li > a:hover,\n.navbar-inverse .navbar-nav > li > a:focus {\n color: #fff;\n background-color: transparent;\n}\n.navbar-inverse .navbar-nav > .active > a,\n.navbar-inverse .navbar-nav > .active > a:hover,\n.navbar-inverse .navbar-nav > .active > a:focus {\n color: #fff;\n background-color: #080808;\n}\n.navbar-inverse .navbar-nav > .disabled > a,\n.navbar-inverse .navbar-nav > .disabled > a:hover,\n.navbar-inverse .navbar-nav > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n}\n.navbar-inverse .navbar-toggle {\n border-color: #333;\n}\n.navbar-inverse .navbar-toggle:hover,\n.navbar-inverse .navbar-toggle:focus {\n background-color: #333;\n}\n.navbar-inverse .navbar-toggle .icon-bar {\n background-color: #fff;\n}\n.navbar-inverse .navbar-collapse,\n.navbar-inverse .navbar-form {\n border-color: #101010;\n}\n.navbar-inverse .navbar-nav > .open > a,\n.navbar-inverse .navbar-nav > .open > a:hover,\n.navbar-inverse .navbar-nav > .open > a:focus {\n color: #fff;\n background-color: #080808;\n}\n@media (max-width: 767px) {\n .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {\n border-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu .divider {\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {\n color: #9d9d9d;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {\n color: #fff;\n background-color: transparent;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {\n color: #fff;\n background-color: #080808;\n }\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,\n .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {\n color: #444;\n background-color: transparent;\n }\n}\n.navbar-inverse .navbar-link {\n color: #9d9d9d;\n}\n.navbar-inverse .navbar-link:hover {\n color: #fff;\n}\n.navbar-inverse .btn-link {\n color: #9d9d9d;\n}\n.navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link:focus {\n color: #fff;\n}\n.navbar-inverse .btn-link[disabled]:hover,\nfieldset[disabled] .navbar-inverse .btn-link:hover,\n.navbar-inverse .btn-link[disabled]:focus,\nfieldset[disabled] .navbar-inverse .btn-link:focus {\n color: #444;\n}\n.breadcrumb {\n padding: 8px 15px;\n margin-bottom: 20px;\n list-style: none;\n background-color: #f5f5f5;\n border-radius: 4px;\n}\n.breadcrumb > li {\n display: inline-block;\n}\n.breadcrumb > li + li:before {\n padding: 0 5px;\n color: #ccc;\n content: \"/\\00a0\";\n}\n.breadcrumb > .active {\n color: #777;\n}\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: 20px 0;\n border-radius: 4px;\n}\n.pagination > li {\n display: inline;\n}\n.pagination > li > a,\n.pagination > li > span {\n position: relative;\n float: left;\n padding: 6px 12px;\n margin-left: -1px;\n line-height: 1.42857143;\n color: #337ab7;\n text-decoration: none;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.pagination > li:first-child > a,\n.pagination > li:first-child > span {\n margin-left: 0;\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.pagination > li:last-child > a,\n.pagination > li:last-child > span {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n}\n.pagination > li > a:hover,\n.pagination > li > span:hover,\n.pagination > li > a:focus,\n.pagination > li > span:focus {\n z-index: 2;\n color: #23527c;\n background-color: #eee;\n border-color: #ddd;\n}\n.pagination > .active > a,\n.pagination > .active > span,\n.pagination > .active > a:hover,\n.pagination > .active > span:hover,\n.pagination > .active > a:focus,\n.pagination > .active > span:focus {\n z-index: 3;\n color: #fff;\n cursor: default;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.pagination > .disabled > span,\n.pagination > .disabled > span:hover,\n.pagination > .disabled > span:focus,\n.pagination > .disabled > a,\n.pagination > .disabled > a:hover,\n.pagination > .disabled > a:focus {\n color: #777;\n cursor: not-allowed;\n background-color: #fff;\n border-color: #ddd;\n}\n.pagination-lg > li > a,\n.pagination-lg > li > span {\n padding: 10px 16px;\n font-size: 18px;\n line-height: 1.3333333;\n}\n.pagination-lg > li:first-child > a,\n.pagination-lg > li:first-child > span {\n border-top-left-radius: 6px;\n border-bottom-left-radius: 6px;\n}\n.pagination-lg > li:last-child > a,\n.pagination-lg > li:last-child > span {\n border-top-right-radius: 6px;\n border-bottom-right-radius: 6px;\n}\n.pagination-sm > li > a,\n.pagination-sm > li > span {\n padding: 5px 10px;\n font-size: 12px;\n line-height: 1.5;\n}\n.pagination-sm > li:first-child > a,\n.pagination-sm > li:first-child > span {\n border-top-left-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.pagination-sm > li:last-child > a,\n.pagination-sm > li:last-child > span {\n border-top-right-radius: 3px;\n border-bottom-right-radius: 3px;\n}\n.pager {\n padding-left: 0;\n margin: 20px 0;\n text-align: center;\n list-style: none;\n}\n.pager li {\n display: inline;\n}\n.pager li > a,\n.pager li > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 15px;\n}\n.pager li > a:hover,\n.pager li > a:focus {\n text-decoration: none;\n background-color: #eee;\n}\n.pager .next > a,\n.pager .next > span {\n float: right;\n}\n.pager .previous > a,\n.pager .previous > span {\n float: left;\n}\n.pager .disabled > a,\n.pager .disabled > a:hover,\n.pager .disabled > a:focus,\n.pager .disabled > span {\n color: #777;\n cursor: not-allowed;\n background-color: #fff;\n}\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n}\na.label:hover,\na.label:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.label:empty {\n display: none;\n}\n.btn .label {\n position: relative;\n top: -1px;\n}\n.label-default {\n background-color: #777;\n}\n.label-default[href]:hover,\n.label-default[href]:focus {\n background-color: #5e5e5e;\n}\n.label-primary {\n background-color: #337ab7;\n}\n.label-primary[href]:hover,\n.label-primary[href]:focus {\n background-color: #286090;\n}\n.label-success {\n background-color: #5cb85c;\n}\n.label-success[href]:hover,\n.label-success[href]:focus {\n background-color: #449d44;\n}\n.label-info {\n background-color: #5bc0de;\n}\n.label-info[href]:hover,\n.label-info[href]:focus {\n background-color: #31b0d5;\n}\n.label-warning {\n background-color: #f0ad4e;\n}\n.label-warning[href]:hover,\n.label-warning[href]:focus {\n background-color: #ec971f;\n}\n.label-danger {\n background-color: #d9534f;\n}\n.label-danger[href]:hover,\n.label-danger[href]:focus {\n background-color: #c9302c;\n}\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: 12px;\n font-weight: bold;\n line-height: 1;\n color: #fff;\n text-align: center;\n white-space: nowrap;\n vertical-align: middle;\n background-color: #777;\n border-radius: 10px;\n}\n.badge:empty {\n display: none;\n}\n.btn .badge {\n position: relative;\n top: -1px;\n}\n.btn-xs .badge,\n.btn-group-xs > .btn .badge {\n top: 0;\n padding: 1px 5px;\n}\na.badge:hover,\na.badge:focus {\n color: #fff;\n text-decoration: none;\n cursor: pointer;\n}\n.list-group-item.active > .badge,\n.nav-pills > .active > a > .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.list-group-item > .badge {\n float: right;\n}\n.list-group-item > .badge + .badge {\n margin-right: 5px;\n}\n.nav-pills > li > a > .badge {\n margin-left: 3px;\n}\n.jumbotron {\n padding-top: 30px;\n padding-bottom: 30px;\n margin-bottom: 30px;\n color: inherit;\n background-color: #eee;\n}\n.jumbotron h1,\n.jumbotron .h1 {\n color: inherit;\n}\n.jumbotron p {\n margin-bottom: 15px;\n font-size: 21px;\n font-weight: 200;\n}\n.jumbotron > hr {\n border-top-color: #d5d5d5;\n}\n.container .jumbotron,\n.container-fluid .jumbotron {\n padding-right: 15px;\n padding-left: 15px;\n border-radius: 6px;\n}\n.jumbotron .container {\n max-width: 100%;\n}\n@media screen and (min-width: 768px) {\n .jumbotron {\n padding-top: 48px;\n padding-bottom: 48px;\n }\n .container .jumbotron,\n .container-fluid .jumbotron {\n padding-right: 60px;\n padding-left: 60px;\n }\n .jumbotron h1,\n .jumbotron .h1 {\n font-size: 63px;\n }\n}\n.thumbnail {\n display: block;\n padding: 4px;\n margin-bottom: 20px;\n line-height: 1.42857143;\n background-color: #fff;\n border: 1px solid #ddd;\n border-radius: 4px;\n -webkit-transition: border .2s ease-in-out;\n -o-transition: border .2s ease-in-out;\n transition: border .2s ease-in-out;\n}\n.thumbnail > img,\n.thumbnail a > img {\n margin-right: auto;\n margin-left: auto;\n}\na.thumbnail:hover,\na.thumbnail:focus,\na.thumbnail.active {\n border-color: #337ab7;\n}\n.thumbnail .caption {\n padding: 9px;\n color: #333;\n}\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert h4 {\n margin-top: 0;\n color: inherit;\n}\n.alert .alert-link {\n font-weight: bold;\n}\n.alert > p,\n.alert > ul {\n margin-bottom: 0;\n}\n.alert > p + p {\n margin-top: 5px;\n}\n.alert-dismissable,\n.alert-dismissible {\n padding-right: 35px;\n}\n.alert-dismissable .close,\n.alert-dismissible .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n}\n.alert-success {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.alert-success hr {\n border-top-color: #c9e2b3;\n}\n.alert-success .alert-link {\n color: #2b542c;\n}\n.alert-info {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.alert-info hr {\n border-top-color: #a6e1ec;\n}\n.alert-info .alert-link {\n color: #245269;\n}\n.alert-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.alert-warning hr {\n border-top-color: #f7e1b5;\n}\n.alert-warning .alert-link {\n color: #66512c;\n}\n.alert-danger {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.alert-danger hr {\n border-top-color: #e4b9c0;\n}\n.alert-danger .alert-link {\n color: #843534;\n}\n@-webkit-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@-o-keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n@keyframes progress-bar-stripes {\n from {\n background-position: 40px 0;\n }\n to {\n background-position: 0 0;\n }\n}\n.progress {\n height: 20px;\n margin-bottom: 20px;\n overflow: hidden;\n background-color: #f5f5f5;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);\n}\n.progress-bar {\n float: left;\n width: 0;\n height: 100%;\n font-size: 12px;\n line-height: 20px;\n color: #fff;\n text-align: center;\n background-color: #337ab7;\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);\n -webkit-transition: width .6s ease;\n -o-transition: width .6s ease;\n transition: width .6s ease;\n}\n.progress-striped .progress-bar,\n.progress-bar-striped {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n -webkit-background-size: 40px 40px;\n background-size: 40px 40px;\n}\n.progress.active .progress-bar,\n.progress-bar.active {\n -webkit-animation: progress-bar-stripes 2s linear infinite;\n -o-animation: progress-bar-stripes 2s linear infinite;\n animation: progress-bar-stripes 2s linear infinite;\n}\n.progress-bar-success {\n background-color: #5cb85c;\n}\n.progress-striped .progress-bar-success {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-info {\n background-color: #5bc0de;\n}\n.progress-striped .progress-bar-info {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-warning {\n background-color: #f0ad4e;\n}\n.progress-striped .progress-bar-warning {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.progress-bar-danger {\n background-color: #d9534f;\n}\n.progress-striped .progress-bar-danger {\n background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);\n}\n.media {\n margin-top: 15px;\n}\n.media:first-child {\n margin-top: 0;\n}\n.media,\n.media-body {\n overflow: hidden;\n zoom: 1;\n}\n.media-body {\n width: 10000px;\n}\n.media-object {\n display: block;\n}\n.media-object.img-thumbnail {\n max-width: none;\n}\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n.media-middle {\n vertical-align: middle;\n}\n.media-bottom {\n vertical-align: bottom;\n}\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n.list-group {\n padding-left: 0;\n margin-bottom: 20px;\n}\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n margin-bottom: -1px;\n background-color: #fff;\n border: 1px solid #ddd;\n}\n.list-group-item:first-child {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n}\n.list-group-item:last-child {\n margin-bottom: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\na.list-group-item,\nbutton.list-group-item {\n color: #555;\n}\na.list-group-item .list-group-item-heading,\nbutton.list-group-item .list-group-item-heading {\n color: #333;\n}\na.list-group-item:hover,\nbutton.list-group-item:hover,\na.list-group-item:focus,\nbutton.list-group-item:focus {\n color: #555;\n text-decoration: none;\n background-color: #f5f5f5;\n}\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n.list-group-item.disabled,\n.list-group-item.disabled:hover,\n.list-group-item.disabled:focus {\n color: #777;\n cursor: not-allowed;\n background-color: #eee;\n}\n.list-group-item.disabled .list-group-item-heading,\n.list-group-item.disabled:hover .list-group-item-heading,\n.list-group-item.disabled:focus .list-group-item-heading {\n color: inherit;\n}\n.list-group-item.disabled .list-group-item-text,\n.list-group-item.disabled:hover .list-group-item-text,\n.list-group-item.disabled:focus .list-group-item-text {\n color: #777;\n}\n.list-group-item.active,\n.list-group-item.active:hover,\n.list-group-item.active:focus {\n z-index: 2;\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.list-group-item.active .list-group-item-heading,\n.list-group-item.active:hover .list-group-item-heading,\n.list-group-item.active:focus .list-group-item-heading,\n.list-group-item.active .list-group-item-heading > small,\n.list-group-item.active:hover .list-group-item-heading > small,\n.list-group-item.active:focus .list-group-item-heading > small,\n.list-group-item.active .list-group-item-heading > .small,\n.list-group-item.active:hover .list-group-item-heading > .small,\n.list-group-item.active:focus .list-group-item-heading > .small {\n color: inherit;\n}\n.list-group-item.active .list-group-item-text,\n.list-group-item.active:hover .list-group-item-text,\n.list-group-item.active:focus .list-group-item-text {\n color: #c7ddef;\n}\n.list-group-item-success {\n color: #3c763d;\n background-color: #dff0d8;\n}\na.list-group-item-success,\nbutton.list-group-item-success {\n color: #3c763d;\n}\na.list-group-item-success .list-group-item-heading,\nbutton.list-group-item-success .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-success:hover,\nbutton.list-group-item-success:hover,\na.list-group-item-success:focus,\nbutton.list-group-item-success:focus {\n color: #3c763d;\n background-color: #d0e9c6;\n}\na.list-group-item-success.active,\nbutton.list-group-item-success.active,\na.list-group-item-success.active:hover,\nbutton.list-group-item-success.active:hover,\na.list-group-item-success.active:focus,\nbutton.list-group-item-success.active:focus {\n color: #fff;\n background-color: #3c763d;\n border-color: #3c763d;\n}\n.list-group-item-info {\n color: #31708f;\n background-color: #d9edf7;\n}\na.list-group-item-info,\nbutton.list-group-item-info {\n color: #31708f;\n}\na.list-group-item-info .list-group-item-heading,\nbutton.list-group-item-info .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-info:hover,\nbutton.list-group-item-info:hover,\na.list-group-item-info:focus,\nbutton.list-group-item-info:focus {\n color: #31708f;\n background-color: #c4e3f3;\n}\na.list-group-item-info.active,\nbutton.list-group-item-info.active,\na.list-group-item-info.active:hover,\nbutton.list-group-item-info.active:hover,\na.list-group-item-info.active:focus,\nbutton.list-group-item-info.active:focus {\n color: #fff;\n background-color: #31708f;\n border-color: #31708f;\n}\n.list-group-item-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n}\na.list-group-item-warning,\nbutton.list-group-item-warning {\n color: #8a6d3b;\n}\na.list-group-item-warning .list-group-item-heading,\nbutton.list-group-item-warning .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-warning:hover,\nbutton.list-group-item-warning:hover,\na.list-group-item-warning:focus,\nbutton.list-group-item-warning:focus {\n color: #8a6d3b;\n background-color: #faf2cc;\n}\na.list-group-item-warning.active,\nbutton.list-group-item-warning.active,\na.list-group-item-warning.active:hover,\nbutton.list-group-item-warning.active:hover,\na.list-group-item-warning.active:focus,\nbutton.list-group-item-warning.active:focus {\n color: #fff;\n background-color: #8a6d3b;\n border-color: #8a6d3b;\n}\n.list-group-item-danger {\n color: #a94442;\n background-color: #f2dede;\n}\na.list-group-item-danger,\nbutton.list-group-item-danger {\n color: #a94442;\n}\na.list-group-item-danger .list-group-item-heading,\nbutton.list-group-item-danger .list-group-item-heading {\n color: inherit;\n}\na.list-group-item-danger:hover,\nbutton.list-group-item-danger:hover,\na.list-group-item-danger:focus,\nbutton.list-group-item-danger:focus {\n color: #a94442;\n background-color: #ebcccc;\n}\na.list-group-item-danger.active,\nbutton.list-group-item-danger.active,\na.list-group-item-danger.active:hover,\nbutton.list-group-item-danger.active:hover,\na.list-group-item-danger.active:focus,\nbutton.list-group-item-danger.active:focus {\n color: #fff;\n background-color: #a94442;\n border-color: #a94442;\n}\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n.panel {\n margin-bottom: 20px;\n background-color: #fff;\n border: 1px solid transparent;\n border-radius: 4px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n box-shadow: 0 1px 1px rgba(0, 0, 0, .05);\n}\n.panel-body {\n padding: 15px;\n}\n.panel-heading {\n padding: 10px 15px;\n border-bottom: 1px solid transparent;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel-heading > .dropdown .dropdown-toggle {\n color: inherit;\n}\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: 16px;\n color: inherit;\n}\n.panel-title > a,\n.panel-title > small,\n.panel-title > .small,\n.panel-title > small > a,\n.panel-title > .small > a {\n color: inherit;\n}\n.panel-footer {\n padding: 10px 15px;\n background-color: #f5f5f5;\n border-top: 1px solid #ddd;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .list-group,\n.panel > .panel-collapse > .list-group {\n margin-bottom: 0;\n}\n.panel > .list-group .list-group-item,\n.panel > .panel-collapse > .list-group .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n}\n.panel > .list-group:first-child .list-group-item:first-child,\n.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {\n border-top: 0;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .list-group:last-child .list-group-item:last-child,\n.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {\n border-bottom: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n}\n.panel-heading + .list-group .list-group-item:first-child {\n border-top-width: 0;\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n.panel > .table,\n.panel > .table-responsive > .table,\n.panel > .panel-collapse > .table {\n margin-bottom: 0;\n}\n.panel > .table caption,\n.panel > .table-responsive > .table caption,\n.panel > .panel-collapse > .table caption {\n padding-right: 15px;\n padding-left: 15px;\n}\n.panel > .table:first-child,\n.panel > .table-responsive:first-child > .table:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {\n border-top-left-radius: 3px;\n}\n.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,\n.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,\n.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,\n.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {\n border-top-right-radius: 3px;\n}\n.panel > .table:last-child,\n.panel > .table-responsive:last-child > .table:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {\n border-bottom-left-radius: 3px;\n}\n.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,\n.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,\n.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,\n.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {\n border-bottom-right-radius: 3px;\n}\n.panel > .panel-body + .table,\n.panel > .panel-body + .table-responsive,\n.panel > .table + .panel-body,\n.panel > .table-responsive + .panel-body {\n border-top: 1px solid #ddd;\n}\n.panel > .table > tbody:first-child > tr:first-child th,\n.panel > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n}\n.panel > .table-bordered,\n.panel > .table-responsive > .table-bordered {\n border: 0;\n}\n.panel > .table-bordered > thead > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,\n.panel > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,\n.panel > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,\n.panel > .table-bordered > thead > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,\n.panel > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,\n.panel > .table-bordered > tfoot > tr > td:first-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {\n border-left: 0;\n}\n.panel > .table-bordered > thead > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,\n.panel > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,\n.panel > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,\n.panel > .table-bordered > thead > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,\n.panel > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,\n.panel > .table-bordered > tfoot > tr > td:last-child,\n.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {\n border-right: 0;\n}\n.panel > .table-bordered > thead > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,\n.panel > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,\n.panel > .table-bordered > thead > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,\n.panel > .table-bordered > tbody > tr:first-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {\n border-bottom: 0;\n}\n.panel > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,\n.panel > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,\n.panel > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,\n.panel > .table-bordered > tfoot > tr:last-child > th,\n.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {\n border-bottom: 0;\n}\n.panel > .table-responsive {\n margin-bottom: 0;\n border: 0;\n}\n.panel-group {\n margin-bottom: 20px;\n}\n.panel-group .panel {\n margin-bottom: 0;\n border-radius: 4px;\n}\n.panel-group .panel + .panel {\n margin-top: 5px;\n}\n.panel-group .panel-heading {\n border-bottom: 0;\n}\n.panel-group .panel-heading + .panel-collapse > .panel-body,\n.panel-group .panel-heading + .panel-collapse > .list-group {\n border-top: 1px solid #ddd;\n}\n.panel-group .panel-footer {\n border-top: 0;\n}\n.panel-group .panel-footer + .panel-collapse .panel-body {\n border-bottom: 1px solid #ddd;\n}\n.panel-default {\n border-color: #ddd;\n}\n.panel-default > .panel-heading {\n color: #333;\n background-color: #f5f5f5;\n border-color: #ddd;\n}\n.panel-default > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ddd;\n}\n.panel-default > .panel-heading .badge {\n color: #f5f5f5;\n background-color: #333;\n}\n.panel-default > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ddd;\n}\n.panel-primary {\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading {\n color: #fff;\n background-color: #337ab7;\n border-color: #337ab7;\n}\n.panel-primary > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #337ab7;\n}\n.panel-primary > .panel-heading .badge {\n color: #337ab7;\n background-color: #fff;\n}\n.panel-primary > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #337ab7;\n}\n.panel-success {\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading {\n color: #3c763d;\n background-color: #dff0d8;\n border-color: #d6e9c6;\n}\n.panel-success > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #d6e9c6;\n}\n.panel-success > .panel-heading .badge {\n color: #dff0d8;\n background-color: #3c763d;\n}\n.panel-success > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #d6e9c6;\n}\n.panel-info {\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.panel-info > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #bce8f1;\n}\n.panel-info > .panel-heading .badge {\n color: #d9edf7;\n background-color: #31708f;\n}\n.panel-info > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #bce8f1;\n}\n.panel-warning {\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.panel-warning > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #faebcc;\n}\n.panel-warning > .panel-heading .badge {\n color: #fcf8e3;\n background-color: #8a6d3b;\n}\n.panel-warning > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #faebcc;\n}\n.panel-danger {\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.panel-danger > .panel-heading + .panel-collapse > .panel-body {\n border-top-color: #ebccd1;\n}\n.panel-danger > .panel-heading .badge {\n color: #f2dede;\n background-color: #a94442;\n}\n.panel-danger > .panel-footer + .panel-collapse > .panel-body {\n border-bottom-color: #ebccd1;\n}\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n}\n.embed-responsive .embed-responsive-item,\n.embed-responsive iframe,\n.embed-responsive embed,\n.embed-responsive object,\n.embed-responsive video {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n}\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: #f5f5f5;\n border: 1px solid #e3e3e3;\n border-radius: 4px;\n -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);\n}\n.well blockquote {\n border-color: #ddd;\n border-color: rgba(0, 0, 0, .15);\n}\n.well-lg {\n padding: 24px;\n border-radius: 6px;\n}\n.well-sm {\n padding: 9px;\n border-radius: 3px;\n}\n.close {\n float: right;\n font-size: 21px;\n font-weight: bold;\n line-height: 1;\n color: #000;\n text-shadow: 0 1px 0 #fff;\n filter: alpha(opacity=20);\n opacity: .2;\n}\n.close:hover,\n.close:focus {\n color: #000;\n text-decoration: none;\n cursor: pointer;\n filter: alpha(opacity=50);\n opacity: .5;\n}\nbutton.close {\n -webkit-appearance: none;\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n}\n.modal-open {\n overflow: hidden;\n}\n.modal {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1050;\n display: none;\n overflow: hidden;\n -webkit-overflow-scrolling: touch;\n outline: 0;\n}\n.modal.fade .modal-dialog {\n -webkit-transition: -webkit-transform .3s ease-out;\n -o-transition: -o-transform .3s ease-out;\n transition: transform .3s ease-out;\n -webkit-transform: translate(0, -25%);\n -ms-transform: translate(0, -25%);\n -o-transform: translate(0, -25%);\n transform: translate(0, -25%);\n}\n.modal.in .modal-dialog {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n.modal-content {\n position: relative;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 1px solid #999;\n border: 1px solid rgba(0, 0, 0, .2);\n border-radius: 6px;\n outline: 0;\n -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n box-shadow: 0 3px 9px rgba(0, 0, 0, .5);\n}\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1040;\n background-color: #000;\n}\n.modal-backdrop.fade {\n filter: alpha(opacity=0);\n opacity: 0;\n}\n.modal-backdrop.in {\n filter: alpha(opacity=50);\n opacity: .5;\n}\n.modal-header {\n padding: 15px;\n border-bottom: 1px solid #e5e5e5;\n}\n.modal-header .close {\n margin-top: -2px;\n}\n.modal-title {\n margin: 0;\n line-height: 1.42857143;\n}\n.modal-body {\n position: relative;\n padding: 15px;\n}\n.modal-footer {\n padding: 15px;\n text-align: right;\n border-top: 1px solid #e5e5e5;\n}\n.modal-footer .btn + .btn {\n margin-bottom: 0;\n margin-left: 5px;\n}\n.modal-footer .btn-group .btn + .btn {\n margin-left: -1px;\n}\n.modal-footer .btn-block + .btn-block {\n margin-left: 0;\n}\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n@media (min-width: 768px) {\n .modal-dialog {\n width: 600px;\n margin: 30px auto;\n }\n .modal-content {\n -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n box-shadow: 0 5px 15px rgba(0, 0, 0, .5);\n }\n .modal-sm {\n width: 300px;\n }\n}\n@media (min-width: 992px) {\n .modal-lg {\n width: 900px;\n }\n}\n.tooltip {\n position: absolute;\n z-index: 1070;\n display: block;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 12px;\n font-style: normal;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n white-space: normal;\n filter: alpha(opacity=0);\n opacity: 0;\n\n line-break: auto;\n}\n.tooltip.in {\n filter: alpha(opacity=90);\n opacity: .9;\n}\n.tooltip.top {\n padding: 5px 0;\n margin-top: -3px;\n}\n.tooltip.right {\n padding: 0 5px;\n margin-left: 3px;\n}\n.tooltip.bottom {\n padding: 5px 0;\n margin-top: 3px;\n}\n.tooltip.left {\n padding: 0 5px;\n margin-left: -3px;\n}\n.tooltip-inner {\n max-width: 200px;\n padding: 3px 8px;\n color: #fff;\n text-align: center;\n background-color: #000;\n border-radius: 4px;\n}\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.tooltip.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-left .tooltip-arrow {\n right: 5px;\n bottom: 0;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.top-right .tooltip-arrow {\n bottom: 0;\n left: 5px;\n margin-bottom: -5px;\n border-width: 5px 5px 0;\n border-top-color: #000;\n}\n.tooltip.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -5px;\n border-width: 5px 5px 5px 0;\n border-right-color: #000;\n}\n.tooltip.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -5px;\n border-width: 5px 0 5px 5px;\n border-left-color: #000;\n}\n.tooltip.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-left .tooltip-arrow {\n top: 0;\n right: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.tooltip.bottom-right .tooltip-arrow {\n top: 0;\n left: 5px;\n margin-top: -5px;\n border-width: 0 5px 5px;\n border-bottom-color: #000;\n}\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1060;\n display: none;\n max-width: 276px;\n padding: 1px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n font-size: 14px;\n font-style: normal;\n font-weight: normal;\n line-height: 1.42857143;\n text-align: left;\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n letter-spacing: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n white-space: normal;\n background-color: #fff;\n -webkit-background-clip: padding-box;\n background-clip: padding-box;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, .2);\n border-radius: 6px;\n -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n box-shadow: 0 5px 10px rgba(0, 0, 0, .2);\n\n line-break: auto;\n}\n.popover.top {\n margin-top: -10px;\n}\n.popover.right {\n margin-left: 10px;\n}\n.popover.bottom {\n margin-top: 10px;\n}\n.popover.left {\n margin-left: -10px;\n}\n.popover-title {\n padding: 8px 14px;\n margin: 0;\n font-size: 14px;\n background-color: #f7f7f7;\n border-bottom: 1px solid #ebebeb;\n border-radius: 5px 5px 0 0;\n}\n.popover-content {\n padding: 9px 14px;\n}\n.popover > .arrow,\n.popover > .arrow:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.popover > .arrow {\n border-width: 11px;\n}\n.popover > .arrow:after {\n content: \"\";\n border-width: 10px;\n}\n.popover.top > .arrow {\n bottom: -11px;\n left: 50%;\n margin-left: -11px;\n border-top-color: #999;\n border-top-color: rgba(0, 0, 0, .25);\n border-bottom-width: 0;\n}\n.popover.top > .arrow:after {\n bottom: 1px;\n margin-left: -10px;\n content: \" \";\n border-top-color: #fff;\n border-bottom-width: 0;\n}\n.popover.right > .arrow {\n top: 50%;\n left: -11px;\n margin-top: -11px;\n border-right-color: #999;\n border-right-color: rgba(0, 0, 0, .25);\n border-left-width: 0;\n}\n.popover.right > .arrow:after {\n bottom: -10px;\n left: 1px;\n content: \" \";\n border-right-color: #fff;\n border-left-width: 0;\n}\n.popover.bottom > .arrow {\n top: -11px;\n left: 50%;\n margin-left: -11px;\n border-top-width: 0;\n border-bottom-color: #999;\n border-bottom-color: rgba(0, 0, 0, .25);\n}\n.popover.bottom > .arrow:after {\n top: 1px;\n margin-left: -10px;\n content: \" \";\n border-top-width: 0;\n border-bottom-color: #fff;\n}\n.popover.left > .arrow {\n top: 50%;\n right: -11px;\n margin-top: -11px;\n border-right-width: 0;\n border-left-color: #999;\n border-left-color: rgba(0, 0, 0, .25);\n}\n.popover.left > .arrow:after {\n right: 1px;\n bottom: -10px;\n content: \" \";\n border-right-width: 0;\n border-left-color: #fff;\n}\n.carousel {\n position: relative;\n}\n.carousel-inner {\n position: relative;\n width: 100%;\n overflow: hidden;\n}\n.carousel-inner > .item {\n position: relative;\n display: none;\n -webkit-transition: .6s ease-in-out left;\n -o-transition: .6s ease-in-out left;\n transition: .6s ease-in-out left;\n}\n.carousel-inner > .item > img,\n.carousel-inner > .item > a > img {\n line-height: 1;\n}\n@media all and (transform-3d), (-webkit-transform-3d) {\n .carousel-inner > .item {\n -webkit-transition: -webkit-transform .6s ease-in-out;\n -o-transition: -o-transform .6s ease-in-out;\n transition: transform .6s ease-in-out;\n\n -webkit-backface-visibility: hidden;\n backface-visibility: hidden;\n -webkit-perspective: 1000px;\n perspective: 1000px;\n }\n .carousel-inner > .item.next,\n .carousel-inner > .item.active.right {\n left: 0;\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0);\n }\n .carousel-inner > .item.prev,\n .carousel-inner > .item.active.left {\n left: 0;\n -webkit-transform: translate3d(-100%, 0, 0);\n transform: translate3d(-100%, 0, 0);\n }\n .carousel-inner > .item.next.left,\n .carousel-inner > .item.prev.right,\n .carousel-inner > .item.active {\n left: 0;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n}\n.carousel-inner > .active,\n.carousel-inner > .next,\n.carousel-inner > .prev {\n display: block;\n}\n.carousel-inner > .active {\n left: 0;\n}\n.carousel-inner > .next,\n.carousel-inner > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n}\n.carousel-inner > .next {\n left: 100%;\n}\n.carousel-inner > .prev {\n left: -100%;\n}\n.carousel-inner > .next.left,\n.carousel-inner > .prev.right {\n left: 0;\n}\n.carousel-inner > .active.left {\n left: -100%;\n}\n.carousel-inner > .active.right {\n left: 100%;\n}\n.carousel-control {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 15%;\n font-size: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n background-color: rgba(0, 0, 0, 0);\n filter: alpha(opacity=50);\n opacity: .5;\n}\n.carousel-control.left {\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));\n background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);\n background-repeat: repeat-x;\n}\n.carousel-control.right {\n right: 0;\n left: auto;\n background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));\n background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);\n background-repeat: repeat-x;\n}\n.carousel-control:hover,\n.carousel-control:focus {\n color: #fff;\n text-decoration: none;\n filter: alpha(opacity=90);\n outline: 0;\n opacity: .9;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-left,\n.carousel-control .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n margin-top: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n}\n.carousel-control .icon-next,\n.carousel-control .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n}\n.carousel-control .icon-prev,\n.carousel-control .icon-next {\n width: 20px;\n height: 20px;\n font-family: serif;\n line-height: 1;\n}\n.carousel-control .icon-prev:before {\n content: '\\2039';\n}\n.carousel-control .icon-next:before {\n content: '\\203a';\n}\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n padding-left: 0;\n margin-left: -30%;\n text-align: center;\n list-style: none;\n}\n.carousel-indicators li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n cursor: pointer;\n background-color: #000 \\9;\n background-color: rgba(0, 0, 0, 0);\n border: 1px solid #fff;\n border-radius: 10px;\n}\n.carousel-indicators .active {\n width: 12px;\n height: 12px;\n margin: 0;\n background-color: #fff;\n}\n.carousel-caption {\n position: absolute;\n right: 15%;\n bottom: 20px;\n left: 15%;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: #fff;\n text-align: center;\n text-shadow: 0 1px 2px rgba(0, 0, 0, .6);\n}\n.carousel-caption .btn {\n text-shadow: none;\n}\n@media screen and (min-width: 768px) {\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-prev,\n .carousel-control .icon-next {\n width: 30px;\n height: 30px;\n margin-top: -10px;\n font-size: 30px;\n }\n .carousel-control .glyphicon-chevron-left,\n .carousel-control .icon-prev {\n margin-left: -10px;\n }\n .carousel-control .glyphicon-chevron-right,\n .carousel-control .icon-next {\n margin-right: -10px;\n }\n .carousel-caption {\n right: 20%;\n left: 20%;\n padding-bottom: 30px;\n }\n .carousel-indicators {\n bottom: 20px;\n }\n}\n.clearfix:before,\n.clearfix:after,\n.dl-horizontal dd:before,\n.dl-horizontal dd:after,\n.container:before,\n.container:after,\n.container-fluid:before,\n.container-fluid:after,\n.row:before,\n.row:after,\n.form-horizontal .form-group:before,\n.form-horizontal .form-group:after,\n.btn-toolbar:before,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:before,\n.btn-group-vertical > .btn-group:after,\n.nav:before,\n.nav:after,\n.navbar:before,\n.navbar:after,\n.navbar-header:before,\n.navbar-header:after,\n.navbar-collapse:before,\n.navbar-collapse:after,\n.pager:before,\n.pager:after,\n.panel-body:before,\n.panel-body:after,\n.modal-header:before,\n.modal-header:after,\n.modal-footer:before,\n.modal-footer:after {\n display: table;\n content: \" \";\n}\n.clearfix:after,\n.dl-horizontal dd:after,\n.container:after,\n.container-fluid:after,\n.row:after,\n.form-horizontal .form-group:after,\n.btn-toolbar:after,\n.btn-group-vertical > .btn-group:after,\n.nav:after,\n.navbar:after,\n.navbar-header:after,\n.navbar-collapse:after,\n.pager:after,\n.panel-body:after,\n.modal-header:after,\n.modal-footer:after {\n clear: both;\n}\n.center-block {\n display: block;\n margin-right: auto;\n margin-left: auto;\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n font: 0/0 a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n.hidden {\n display: none !important;\n}\n.affix {\n position: fixed;\n}\n@-ms-viewport {\n width: device-width;\n}\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n display: none !important;\n}\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n@media (max-width: 767px) {\n .visible-xs {\n display: block !important;\n }\n table.visible-xs {\n display: table !important;\n }\n tr.visible-xs {\n display: table-row !important;\n }\n th.visible-xs,\n td.visible-xs {\n display: table-cell !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-block {\n display: block !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline {\n display: inline !important;\n }\n}\n@media (max-width: 767px) {\n .visible-xs-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm {\n display: block !important;\n }\n table.visible-sm {\n display: table !important;\n }\n tr.visible-sm {\n display: table-row !important;\n }\n th.visible-sm,\n td.visible-sm {\n display: table-cell !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-block {\n display: block !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline {\n display: inline !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .visible-sm-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md {\n display: block !important;\n }\n table.visible-md {\n display: table !important;\n }\n tr.visible-md {\n display: table-row !important;\n }\n th.visible-md,\n td.visible-md {\n display: table-cell !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-block {\n display: block !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline {\n display: inline !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .visible-md-inline-block {\n display: inline-block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg {\n display: block !important;\n }\n table.visible-lg {\n display: table !important;\n }\n tr.visible-lg {\n display: table-row !important;\n }\n th.visible-lg,\n td.visible-lg {\n display: table-cell !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-block {\n display: block !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline {\n display: inline !important;\n }\n}\n@media (min-width: 1200px) {\n .visible-lg-inline-block {\n display: inline-block !important;\n }\n}\n@media (max-width: 767px) {\n .hidden-xs {\n display: none !important;\n }\n}\n@media (min-width: 768px) and (max-width: 991px) {\n .hidden-sm {\n display: none !important;\n }\n}\n@media (min-width: 992px) and (max-width: 1199px) {\n .hidden-md {\n display: none !important;\n }\n}\n@media (min-width: 1200px) {\n .hidden-lg {\n display: none !important;\n }\n}\n.visible-print {\n display: none !important;\n}\n@media print {\n .visible-print {\n display: block !important;\n }\n table.visible-print {\n display: table !important;\n }\n tr.visible-print {\n display: table-row !important;\n }\n th.visible-print,\n td.visible-print {\n display: table-cell !important;\n }\n}\n.visible-print-block {\n display: none !important;\n}\n@media print {\n .visible-print-block {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n}\n@media print {\n .visible-print-inline {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n}\n@media print {\n .visible-print-inline-block {\n display: inline-block !important;\n }\n}\n@media print {\n .hidden-print {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap.css.map */\n","//\n// Glyphicons for Bootstrap\n//\n// Since icons are fonts, they can be placed anywhere text is placed and are\n// thus automatically sized to match the surrounding child. To use, create an\n// inline element with the appropriate classes, like so:\n//\n// <a href=\"#\"><span class=\"glyphicon glyphicon-star\"></span> Star</a>\n\n// Import the fonts\n@font-face {\n font-family: 'Glyphicons Halflings';\n src: url('@{icon-font-path}@{icon-font-name}.eot');\n src: url('@{icon-font-path}@{icon-font-name}.eot?#iefix') format('embedded-opentype'),\n url('@{icon-font-path}@{icon-font-name}.woff2') format('woff2'),\n url('@{icon-font-path}@{icon-font-name}.woff') format('woff'),\n url('@{icon-font-path}@{icon-font-name}.ttf') format('truetype'),\n url('@{icon-font-path}@{icon-font-name}.svg#@{icon-font-svg-id}') format('svg');\n}\n\n// Catchall baseclass\n.glyphicon {\n position: relative;\n top: 1px;\n display: inline-block;\n font-family: 'Glyphicons Halflings';\n font-style: normal;\n font-weight: normal;\n line-height: 1;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n// Individual icons\n.glyphicon-asterisk { &:before { content: \"\\002a\"; } }\n.glyphicon-plus { &:before { content: \"\\002b\"; } }\n.glyphicon-euro,\n.glyphicon-eur { &:before { content: \"\\20ac\"; } }\n.glyphicon-minus { &:before { content: \"\\2212\"; } }\n.glyphicon-cloud { &:before { content: \"\\2601\"; } }\n.glyphicon-envelope { &:before { content: \"\\2709\"; } }\n.glyphicon-pencil { &:before { content: \"\\270f\"; } }\n.glyphicon-glass { &:before { content: \"\\e001\"; } }\n.glyphicon-music { &:before { content: \"\\e002\"; } }\n.glyphicon-search { &:before { content: \"\\e003\"; } }\n.glyphicon-heart { &:before { content: \"\\e005\"; } }\n.glyphicon-star { &:before { content: \"\\e006\"; } }\n.glyphicon-star-empty { &:before { content: \"\\e007\"; } }\n.glyphicon-user { &:before { content: \"\\e008\"; } }\n.glyphicon-film { &:before { content: \"\\e009\"; } }\n.glyphicon-th-large { &:before { content: \"\\e010\"; } }\n.glyphicon-th { &:before { content: \"\\e011\"; } }\n.glyphicon-th-list { &:before { content: \"\\e012\"; } }\n.glyphicon-ok { &:before { content: \"\\e013\"; } }\n.glyphicon-remove { &:before { content: \"\\e014\"; } }\n.glyphicon-zoom-in { &:before { content: \"\\e015\"; } }\n.glyphicon-zoom-out { &:before { content: \"\\e016\"; } }\n.glyphicon-off { &:before { content: \"\\e017\"; } }\n.glyphicon-signal { &:before { content: \"\\e018\"; } }\n.glyphicon-cog { &:before { content: \"\\e019\"; } }\n.glyphicon-trash { &:before { content: \"\\e020\"; } }\n.glyphicon-home { &:before { content: \"\\e021\"; } }\n.glyphicon-file { &:before { content: \"\\e022\"; } }\n.glyphicon-time { &:before { content: \"\\e023\"; } }\n.glyphicon-road { &:before { content: \"\\e024\"; } }\n.glyphicon-download-alt { &:before { content: \"\\e025\"; } }\n.glyphicon-download { &:before { content: \"\\e026\"; } }\n.glyphicon-upload { &:before { content: \"\\e027\"; } }\n.glyphicon-inbox { &:before { content: \"\\e028\"; } }\n.glyphicon-play-circle { &:before { content: \"\\e029\"; } }\n.glyphicon-repeat { &:before { content: \"\\e030\"; } }\n.glyphicon-refresh { &:before { content: \"\\e031\"; } }\n.glyphicon-list-alt { &:before { content: \"\\e032\"; } }\n.glyphicon-lock { &:before { content: \"\\e033\"; } }\n.glyphicon-flag { &:before { content: \"\\e034\"; } }\n.glyphicon-headphones { &:before { content: \"\\e035\"; } }\n.glyphicon-volume-off { &:before { content: \"\\e036\"; } }\n.glyphicon-volume-down { &:before { content: \"\\e037\"; } }\n.glyphicon-volume-up { &:before { content: \"\\e038\"; } }\n.glyphicon-qrcode { &:before { content: \"\\e039\"; } }\n.glyphicon-barcode { &:before { content: \"\\e040\"; } }\n.glyphicon-tag { &:before { content: \"\\e041\"; } }\n.glyphicon-tags { &:before { content: \"\\e042\"; } }\n.glyphicon-book { &:before { content: \"\\e043\"; } }\n.glyphicon-bookmark { &:before { content: \"\\e044\"; } }\n.glyphicon-print { &:before { content: \"\\e045\"; } }\n.glyphicon-camera { &:before { content: \"\\e046\"; } }\n.glyphicon-font { &:before { content: \"\\e047\"; } }\n.glyphicon-bold { &:before { content: \"\\e048\"; } }\n.glyphicon-italic { &:before { content: \"\\e049\"; } }\n.glyphicon-text-height { &:before { content: \"\\e050\"; } }\n.glyphicon-text-width { &:before { content: \"\\e051\"; } }\n.glyphicon-align-left { &:before { content: \"\\e052\"; } }\n.glyphicon-align-center { &:before { content: \"\\e053\"; } }\n.glyphicon-align-right { &:before { content: \"\\e054\"; } }\n.glyphicon-align-justify { &:before { content: \"\\e055\"; } }\n.glyphicon-list { &:before { content: \"\\e056\"; } }\n.glyphicon-indent-left { &:before { content: \"\\e057\"; } }\n.glyphicon-indent-right { &:before { content: \"\\e058\"; } }\n.glyphicon-facetime-video { &:before { content: \"\\e059\"; } }\n.glyphicon-picture { &:before { content: \"\\e060\"; } }\n.glyphicon-map-marker { &:before { content: \"\\e062\"; } }\n.glyphicon-adjust { &:before { content: \"\\e063\"; } }\n.glyphicon-tint { &:before { content: \"\\e064\"; } }\n.glyphicon-edit { &:before { content: \"\\e065\"; } }\n.glyphicon-share { &:before { content: \"\\e066\"; } }\n.glyphicon-check { &:before { content: \"\\e067\"; } }\n.glyphicon-move { &:before { content: \"\\e068\"; } }\n.glyphicon-step-backward { &:before { content: \"\\e069\"; } }\n.glyphicon-fast-backward { &:before { content: \"\\e070\"; } }\n.glyphicon-backward { &:before { content: \"\\e071\"; } }\n.glyphicon-play { &:before { content: \"\\e072\"; } }\n.glyphicon-pause { &:before { content: \"\\e073\"; } }\n.glyphicon-stop { &:before { content: \"\\e074\"; } }\n.glyphicon-forward { &:before { content: \"\\e075\"; } }\n.glyphicon-fast-forward { &:before { content: \"\\e076\"; } }\n.glyphicon-step-forward { &:before { content: \"\\e077\"; } }\n.glyphicon-eject { &:before { content: \"\\e078\"; } }\n.glyphicon-chevron-left { &:before { content: \"\\e079\"; } }\n.glyphicon-chevron-right { &:before { content: \"\\e080\"; } }\n.glyphicon-plus-sign { &:before { content: \"\\e081\"; } }\n.glyphicon-minus-sign { &:before { content: \"\\e082\"; } }\n.glyphicon-remove-sign { &:before { content: \"\\e083\"; } }\n.glyphicon-ok-sign { &:before { content: \"\\e084\"; } }\n.glyphicon-question-sign { &:before { content: \"\\e085\"; } }\n.glyphicon-info-sign { &:before { content: \"\\e086\"; } }\n.glyphicon-screenshot { &:before { content: \"\\e087\"; } }\n.glyphicon-remove-circle { &:before { content: \"\\e088\"; } }\n.glyphicon-ok-circle { &:before { content: \"\\e089\"; } }\n.glyphicon-ban-circle { &:before { content: \"\\e090\"; } }\n.glyphicon-arrow-left { &:before { content: \"\\e091\"; } }\n.glyphicon-arrow-right { &:before { content: \"\\e092\"; } }\n.glyphicon-arrow-up { &:before { content: \"\\e093\"; } }\n.glyphicon-arrow-down { &:before { content: \"\\e094\"; } }\n.glyphicon-share-alt { &:before { content: \"\\e095\"; } }\n.glyphicon-resize-full { &:before { content: \"\\e096\"; } }\n.glyphicon-resize-small { &:before { content: \"\\e097\"; } }\n.glyphicon-exclamation-sign { &:before { content: \"\\e101\"; } }\n.glyphicon-gift { &:before { content: \"\\e102\"; } }\n.glyphicon-leaf { &:before { content: \"\\e103\"; } }\n.glyphicon-fire { &:before { content: \"\\e104\"; } }\n.glyphicon-eye-open { &:before { content: \"\\e105\"; } }\n.glyphicon-eye-close { &:before { content: \"\\e106\"; } }\n.glyphicon-warning-sign { &:before { content: \"\\e107\"; } }\n.glyphicon-plane { &:before { content: \"\\e108\"; } }\n.glyphicon-calendar { &:before { content: \"\\e109\"; } }\n.glyphicon-random { &:before { content: \"\\e110\"; } }\n.glyphicon-comment { &:before { content: \"\\e111\"; } }\n.glyphicon-magnet { &:before { content: \"\\e112\"; } }\n.glyphicon-chevron-up { &:before { content: \"\\e113\"; } }\n.glyphicon-chevron-down { &:before { content: \"\\e114\"; } }\n.glyphicon-retweet { &:before { content: \"\\e115\"; } }\n.glyphicon-shopping-cart { &:before { content: \"\\e116\"; } }\n.glyphicon-folder-close { &:before { content: \"\\e117\"; } }\n.glyphicon-folder-open { &:before { content: \"\\e118\"; } }\n.glyphicon-resize-vertical { &:before { content: \"\\e119\"; } }\n.glyphicon-resize-horizontal { &:before { content: \"\\e120\"; } }\n.glyphicon-hdd { &:before { content: \"\\e121\"; } }\n.glyphicon-bullhorn { &:before { content: \"\\e122\"; } }\n.glyphicon-bell { &:before { content: \"\\e123\"; } }\n.glyphicon-certificate { &:before { content: \"\\e124\"; } }\n.glyphicon-thumbs-up { &:before { content: \"\\e125\"; } }\n.glyphicon-thumbs-down { &:before { content: \"\\e126\"; } }\n.glyphicon-hand-right { &:before { content: \"\\e127\"; } }\n.glyphicon-hand-left { &:before { content: \"\\e128\"; } }\n.glyphicon-hand-up { &:before { content: \"\\e129\"; } }\n.glyphicon-hand-down { &:before { content: \"\\e130\"; } }\n.glyphicon-circle-arrow-right { &:before { content: \"\\e131\"; } }\n.glyphicon-circle-arrow-left { &:before { content: \"\\e132\"; } }\n.glyphicon-circle-arrow-up { &:before { content: \"\\e133\"; } }\n.glyphicon-circle-arrow-down { &:before { content: \"\\e134\"; } }\n.glyphicon-globe { &:before { content: \"\\e135\"; } }\n.glyphicon-wrench { &:before { content: \"\\e136\"; } }\n.glyphicon-tasks { &:before { content: \"\\e137\"; } }\n.glyphicon-filter { &:before { content: \"\\e138\"; } }\n.glyphicon-briefcase { &:before { content: \"\\e139\"; } }\n.glyphicon-fullscreen { &:before { content: \"\\e140\"; } }\n.glyphicon-dashboard { &:before { content: \"\\e141\"; } }\n.glyphicon-paperclip { &:before { content: \"\\e142\"; } }\n.glyphicon-heart-empty { &:before { content: \"\\e143\"; } }\n.glyphicon-link { &:before { content: \"\\e144\"; } }\n.glyphicon-phone { &:before { content: \"\\e145\"; } }\n.glyphicon-pushpin { &:before { content: \"\\e146\"; } }\n.glyphicon-usd { &:before { content: \"\\e148\"; } }\n.glyphicon-gbp { &:before { content: \"\\e149\"; } }\n.glyphicon-sort { &:before { content: \"\\e150\"; } }\n.glyphicon-sort-by-alphabet { &:before { content: \"\\e151\"; } }\n.glyphicon-sort-by-alphabet-alt { &:before { content: \"\\e152\"; } }\n.glyphicon-sort-by-order { &:before { content: \"\\e153\"; } }\n.glyphicon-sort-by-order-alt { &:before { content: \"\\e154\"; } }\n.glyphicon-sort-by-attributes { &:before { content: \"\\e155\"; } }\n.glyphicon-sort-by-attributes-alt { &:before { content: \"\\e156\"; } }\n.glyphicon-unchecked { &:before { content: \"\\e157\"; } }\n.glyphicon-expand { &:before { content: \"\\e158\"; } }\n.glyphicon-collapse-down { &:before { content: \"\\e159\"; } }\n.glyphicon-collapse-up { &:before { content: \"\\e160\"; } }\n.glyphicon-log-in { &:before { content: \"\\e161\"; } }\n.glyphicon-flash { &:before { content: \"\\e162\"; } }\n.glyphicon-log-out { &:before { content: \"\\e163\"; } }\n.glyphicon-new-window { &:before { content: \"\\e164\"; } }\n.glyphicon-record { &:before { content: \"\\e165\"; } }\n.glyphicon-save { &:before { content: \"\\e166\"; } }\n.glyphicon-open { &:before { content: \"\\e167\"; } }\n.glyphicon-saved { &:before { content: \"\\e168\"; } }\n.glyphicon-import { &:before { content: \"\\e169\"; } }\n.glyphicon-export { &:before { content: \"\\e170\"; } }\n.glyphicon-send { &:before { content: \"\\e171\"; } }\n.glyphicon-floppy-disk { &:before { content: \"\\e172\"; } }\n.glyphicon-floppy-saved { &:before { content: \"\\e173\"; } }\n.glyphicon-floppy-remove { &:before { content: \"\\e174\"; } }\n.glyphicon-floppy-save { &:before { content: \"\\e175\"; } }\n.glyphicon-floppy-open { &:before { content: \"\\e176\"; } }\n.glyphicon-credit-card { &:before { content: \"\\e177\"; } }\n.glyphicon-transfer { &:before { content: \"\\e178\"; } }\n.glyphicon-cutlery { &:before { content: \"\\e179\"; } }\n.glyphicon-header { &:before { content: \"\\e180\"; } }\n.glyphicon-compressed { &:before { content: \"\\e181\"; } }\n.glyphicon-earphone { &:before { content: \"\\e182\"; } }\n.glyphicon-phone-alt { &:before { content: \"\\e183\"; } }\n.glyphicon-tower { &:before { content: \"\\e184\"; } }\n.glyphicon-stats { &:before { content: \"\\e185\"; } }\n.glyphicon-sd-video { &:before { content: \"\\e186\"; } }\n.glyphicon-hd-video { &:before { content: \"\\e187\"; } }\n.glyphicon-subtitles { &:before { content: \"\\e188\"; } }\n.glyphicon-sound-stereo { &:before { content: \"\\e189\"; } }\n.glyphicon-sound-dolby { &:before { content: \"\\e190\"; } }\n.glyphicon-sound-5-1 { &:before { content: \"\\e191\"; } }\n.glyphicon-sound-6-1 { &:before { content: \"\\e192\"; } }\n.glyphicon-sound-7-1 { &:before { content: \"\\e193\"; } }\n.glyphicon-copyright-mark { &:before { content: \"\\e194\"; } }\n.glyphicon-registration-mark { &:before { content: \"\\e195\"; } }\n.glyphicon-cloud-download { &:before { content: \"\\e197\"; } }\n.glyphicon-cloud-upload { &:before { content: \"\\e198\"; } }\n.glyphicon-tree-conifer { &:before { content: \"\\e199\"; } }\n.glyphicon-tree-deciduous { &:before { content: \"\\e200\"; } }\n.glyphicon-cd { &:before { content: \"\\e201\"; } }\n.glyphicon-save-file { &:before { content: \"\\e202\"; } }\n.glyphicon-open-file { &:before { content: \"\\e203\"; } }\n.glyphicon-level-up { &:before { content: \"\\e204\"; } }\n.glyphicon-copy { &:before { content: \"\\e205\"; } }\n.glyphicon-paste { &:before { content: \"\\e206\"; } }\n// The following 2 Glyphicons are omitted for the time being because\n// they currently use Unicode codepoints that are outside the\n// Basic Multilingual Plane (BMP). Older buggy versions of WebKit can't handle\n// non-BMP codepoints in CSS string escapes, and thus can't display these two icons.\n// Notably, the bug affects some older versions of the Android Browser.\n// More info: https://github.com/twbs/bootstrap/issues/10106\n// .glyphicon-door { &:before { content: \"\\1f6aa\"; } }\n// .glyphicon-key { &:before { content: \"\\1f511\"; } }\n.glyphicon-alert { &:before { content: \"\\e209\"; } }\n.glyphicon-equalizer { &:before { content: \"\\e210\"; } }\n.glyphicon-king { &:before { content: \"\\e211\"; } }\n.glyphicon-queen { &:before { content: \"\\e212\"; } }\n.glyphicon-pawn { &:before { content: \"\\e213\"; } }\n.glyphicon-bishop { &:before { content: \"\\e214\"; } }\n.glyphicon-knight { &:before { content: \"\\e215\"; } }\n.glyphicon-baby-formula { &:before { content: \"\\e216\"; } }\n.glyphicon-tent { &:before { content: \"\\26fa\"; } }\n.glyphicon-blackboard { &:before { content: \"\\e218\"; } }\n.glyphicon-bed { &:before { content: \"\\e219\"; } }\n.glyphicon-apple { &:before { content: \"\\f8ff\"; } }\n.glyphicon-erase { &:before { content: \"\\e221\"; } }\n.glyphicon-hourglass { &:before { content: \"\\231b\"; } }\n.glyphicon-lamp { &:before { content: \"\\e223\"; } }\n.glyphicon-duplicate { &:before { content: \"\\e224\"; } }\n.glyphicon-piggy-bank { &:before { content: \"\\e225\"; } }\n.glyphicon-scissors { &:before { content: \"\\e226\"; } }\n.glyphicon-bitcoin { &:before { content: \"\\e227\"; } }\n.glyphicon-btc { &:before { content: \"\\e227\"; } }\n.glyphicon-xbt { &:before { content: \"\\e227\"; } }\n.glyphicon-yen { &:before { content: \"\\00a5\"; } }\n.glyphicon-jpy { &:before { content: \"\\00a5\"; } }\n.glyphicon-ruble { &:before { content: \"\\20bd\"; } }\n.glyphicon-rub { &:before { content: \"\\20bd\"; } }\n.glyphicon-scale { &:before { content: \"\\e230\"; } }\n.glyphicon-ice-lolly { &:before { content: \"\\e231\"; } }\n.glyphicon-ice-lolly-tasted { &:before { content: \"\\e232\"; } }\n.glyphicon-education { &:before { content: \"\\e233\"; } }\n.glyphicon-option-horizontal { &:before { content: \"\\e234\"; } }\n.glyphicon-option-vertical { &:before { content: \"\\e235\"; } }\n.glyphicon-menu-hamburger { &:before { content: \"\\e236\"; } }\n.glyphicon-modal-window { &:before { content: \"\\e237\"; } }\n.glyphicon-oil { &:before { content: \"\\e238\"; } }\n.glyphicon-grain { &:before { content: \"\\e239\"; } }\n.glyphicon-sunglasses { &:before { content: \"\\e240\"; } }\n.glyphicon-text-size { &:before { content: \"\\e241\"; } }\n.glyphicon-text-color { &:before { content: \"\\e242\"; } }\n.glyphicon-text-background { &:before { content: \"\\e243\"; } }\n.glyphicon-object-align-top { &:before { content: \"\\e244\"; } }\n.glyphicon-object-align-bottom { &:before { content: \"\\e245\"; } }\n.glyphicon-object-align-horizontal{ &:before { content: \"\\e246\"; } }\n.glyphicon-object-align-left { &:before { content: \"\\e247\"; } }\n.glyphicon-object-align-vertical { &:before { content: \"\\e248\"; } }\n.glyphicon-object-align-right { &:before { content: \"\\e249\"; } }\n.glyphicon-triangle-right { &:before { content: \"\\e250\"; } }\n.glyphicon-triangle-left { &:before { content: \"\\e251\"; } }\n.glyphicon-triangle-bottom { &:before { content: \"\\e252\"; } }\n.glyphicon-triangle-top { &:before { content: \"\\e253\"; } }\n.glyphicon-console { &:before { content: \"\\e254\"; } }\n.glyphicon-superscript { &:before { content: \"\\e255\"; } }\n.glyphicon-subscript { &:before { content: \"\\e256\"; } }\n.glyphicon-menu-left { &:before { content: \"\\e257\"; } }\n.glyphicon-menu-right { &:before { content: \"\\e258\"; } }\n.glyphicon-menu-down { &:before { content: \"\\e259\"; } }\n.glyphicon-menu-up { &:before { content: \"\\e260\"; } }\n","//\n// Scaffolding\n// --------------------------------------------------\n\n\n// Reset the box-sizing\n//\n// Heads up! This reset may cause conflicts with some third-party widgets.\n// For recommendations on resolving such conflicts, see\n// http://getbootstrap.com/getting-started/#third-box-sizing\n* {\n .box-sizing(border-box);\n}\n*:before,\n*:after {\n .box-sizing(border-box);\n}\n\n\n// Body reset\n\nhtml {\n font-size: 10px;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n}\n\nbody {\n font-family: @font-family-base;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @text-color;\n background-color: @body-bg;\n}\n\n// Reset fonts for relevant elements\ninput,\nbutton,\nselect,\ntextarea {\n font-family: inherit;\n font-size: inherit;\n line-height: inherit;\n}\n\n\n// Links\n\na {\n color: @link-color;\n text-decoration: none;\n\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n }\n\n &:focus {\n .tab-focus();\n }\n}\n\n\n// Figures\n//\n// We reset this here because previously Normalize had no `figure` margins. This\n// ensures we don't break anyone's use of the element.\n\nfigure {\n margin: 0;\n}\n\n\n// Images\n\nimg {\n vertical-align: middle;\n}\n\n// Responsive images (ensure images don't scale beyond their parents)\n.img-responsive {\n .img-responsive();\n}\n\n// Rounded corners\n.img-rounded {\n border-radius: @border-radius-large;\n}\n\n// Image thumbnails\n//\n// Heads up! This is mixin-ed into thumbnails.less for `.thumbnail`.\n.img-thumbnail {\n padding: @thumbnail-padding;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(all .2s ease-in-out);\n\n // Keep them at most 100% wide\n .img-responsive(inline-block);\n}\n\n// Perfect circle\n.img-circle {\n border-radius: 50%; // set radius in percents\n}\n\n\n// Horizontal rules\n\nhr {\n margin-top: @line-height-computed;\n margin-bottom: @line-height-computed;\n border: 0;\n border-top: 1px solid @hr-border;\n}\n\n\n// Only display content to screen readers\n//\n// See: http://a11yproject.com/posts/how-to-hide-content\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0,0,0,0);\n border: 0;\n}\n\n// Use in conjunction with .sr-only to only display content when it's focused.\n// Useful for \"Skip to main content\" links; see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1\n// Credit: HTML5 Boilerplate\n\n.sr-only-focusable {\n &:active,\n &:focus {\n position: static;\n width: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n clip: auto;\n }\n}\n\n\n// iOS \"clickable elements\" fix for role=\"button\"\n//\n// Fixes \"clickability\" issue (and more generally, the firing of events such as focus as well)\n// for traditionally non-focusable elements with role=\"button\"\n// see https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n\n[role=\"button\"] {\n cursor: pointer;\n}\n","// Vendor Prefixes\n//\n// All vendor mixins are deprecated as of v3.2.0 due to the introduction of\n// Autoprefixer in our Gruntfile. They have been removed in v4.\n\n// - Animations\n// - Backface visibility\n// - Box shadow\n// - Box sizing\n// - Content columns\n// - Hyphens\n// - Placeholder text\n// - Transformations\n// - Transitions\n// - User Select\n\n\n// Animations\n.animation(@animation) {\n -webkit-animation: @animation;\n -o-animation: @animation;\n animation: @animation;\n}\n.animation-name(@name) {\n -webkit-animation-name: @name;\n animation-name: @name;\n}\n.animation-duration(@duration) {\n -webkit-animation-duration: @duration;\n animation-duration: @duration;\n}\n.animation-timing-function(@timing-function) {\n -webkit-animation-timing-function: @timing-function;\n animation-timing-function: @timing-function;\n}\n.animation-delay(@delay) {\n -webkit-animation-delay: @delay;\n animation-delay: @delay;\n}\n.animation-iteration-count(@iteration-count) {\n -webkit-animation-iteration-count: @iteration-count;\n animation-iteration-count: @iteration-count;\n}\n.animation-direction(@direction) {\n -webkit-animation-direction: @direction;\n animation-direction: @direction;\n}\n.animation-fill-mode(@fill-mode) {\n -webkit-animation-fill-mode: @fill-mode;\n animation-fill-mode: @fill-mode;\n}\n\n// Backface visibility\n// Prevent browsers from flickering when using CSS 3D transforms.\n// Default value is `visible`, but can be changed to `hidden`\n\n.backface-visibility(@visibility) {\n -webkit-backface-visibility: @visibility;\n -moz-backface-visibility: @visibility;\n backface-visibility: @visibility;\n}\n\n// Drop shadows\n//\n// Note: Deprecated `.box-shadow()` as of v3.1.0 since all of Bootstrap's\n// supported browsers that have box shadow capabilities now support it.\n\n.box-shadow(@shadow) {\n -webkit-box-shadow: @shadow; // iOS <4.3 & Android <4.1\n box-shadow: @shadow;\n}\n\n// Box sizing\n.box-sizing(@boxmodel) {\n -webkit-box-sizing: @boxmodel;\n -moz-box-sizing: @boxmodel;\n box-sizing: @boxmodel;\n}\n\n// CSS3 Content Columns\n.content-columns(@column-count; @column-gap: @grid-gutter-width) {\n -webkit-column-count: @column-count;\n -moz-column-count: @column-count;\n column-count: @column-count;\n -webkit-column-gap: @column-gap;\n -moz-column-gap: @column-gap;\n column-gap: @column-gap;\n}\n\n// Optional hyphenation\n.hyphens(@mode: auto) {\n word-wrap: break-word;\n -webkit-hyphens: @mode;\n -moz-hyphens: @mode;\n -ms-hyphens: @mode; // IE10+\n -o-hyphens: @mode;\n hyphens: @mode;\n}\n\n// Placeholder text\n.placeholder(@color: @input-color-placeholder) {\n // Firefox\n &::-moz-placeholder {\n color: @color;\n opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526\n }\n &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+\n &::-webkit-input-placeholder { color: @color; } // Safari and Chrome\n}\n\n// Transformations\n.scale(@ratio) {\n -webkit-transform: scale(@ratio);\n -ms-transform: scale(@ratio); // IE9 only\n -o-transform: scale(@ratio);\n transform: scale(@ratio);\n}\n.scale(@ratioX; @ratioY) {\n -webkit-transform: scale(@ratioX, @ratioY);\n -ms-transform: scale(@ratioX, @ratioY); // IE9 only\n -o-transform: scale(@ratioX, @ratioY);\n transform: scale(@ratioX, @ratioY);\n}\n.scaleX(@ratio) {\n -webkit-transform: scaleX(@ratio);\n -ms-transform: scaleX(@ratio); // IE9 only\n -o-transform: scaleX(@ratio);\n transform: scaleX(@ratio);\n}\n.scaleY(@ratio) {\n -webkit-transform: scaleY(@ratio);\n -ms-transform: scaleY(@ratio); // IE9 only\n -o-transform: scaleY(@ratio);\n transform: scaleY(@ratio);\n}\n.skew(@x; @y) {\n -webkit-transform: skewX(@x) skewY(@y);\n -ms-transform: skewX(@x) skewY(@y); // See https://github.com/twbs/bootstrap/issues/4885; IE9+\n -o-transform: skewX(@x) skewY(@y);\n transform: skewX(@x) skewY(@y);\n}\n.translate(@x; @y) {\n -webkit-transform: translate(@x, @y);\n -ms-transform: translate(@x, @y); // IE9 only\n -o-transform: translate(@x, @y);\n transform: translate(@x, @y);\n}\n.translate3d(@x; @y; @z) {\n -webkit-transform: translate3d(@x, @y, @z);\n transform: translate3d(@x, @y, @z);\n}\n.rotate(@degrees) {\n -webkit-transform: rotate(@degrees);\n -ms-transform: rotate(@degrees); // IE9 only\n -o-transform: rotate(@degrees);\n transform: rotate(@degrees);\n}\n.rotateX(@degrees) {\n -webkit-transform: rotateX(@degrees);\n -ms-transform: rotateX(@degrees); // IE9 only\n -o-transform: rotateX(@degrees);\n transform: rotateX(@degrees);\n}\n.rotateY(@degrees) {\n -webkit-transform: rotateY(@degrees);\n -ms-transform: rotateY(@degrees); // IE9 only\n -o-transform: rotateY(@degrees);\n transform: rotateY(@degrees);\n}\n.perspective(@perspective) {\n -webkit-perspective: @perspective;\n -moz-perspective: @perspective;\n perspective: @perspective;\n}\n.perspective-origin(@perspective) {\n -webkit-perspective-origin: @perspective;\n -moz-perspective-origin: @perspective;\n perspective-origin: @perspective;\n}\n.transform-origin(@origin) {\n -webkit-transform-origin: @origin;\n -moz-transform-origin: @origin;\n -ms-transform-origin: @origin; // IE9 only\n transform-origin: @origin;\n}\n\n\n// Transitions\n\n.transition(@transition) {\n -webkit-transition: @transition;\n -o-transition: @transition;\n transition: @transition;\n}\n.transition-property(@transition-property) {\n -webkit-transition-property: @transition-property;\n transition-property: @transition-property;\n}\n.transition-delay(@transition-delay) {\n -webkit-transition-delay: @transition-delay;\n transition-delay: @transition-delay;\n}\n.transition-duration(@transition-duration) {\n -webkit-transition-duration: @transition-duration;\n transition-duration: @transition-duration;\n}\n.transition-timing-function(@timing-function) {\n -webkit-transition-timing-function: @timing-function;\n transition-timing-function: @timing-function;\n}\n.transition-transform(@transition) {\n -webkit-transition: -webkit-transform @transition;\n -moz-transition: -moz-transform @transition;\n -o-transition: -o-transform @transition;\n transition: transform @transition;\n}\n\n\n// User select\n// For selecting text on the page\n\n.user-select(@select) {\n -webkit-user-select: @select;\n -moz-user-select: @select;\n -ms-user-select: @select; // IE10+\n user-select: @select;\n}\n","// WebKit-style focus\n\n.tab-focus() {\n // WebKit-specific. Other browsers will keep their default outline style.\n // (Initially tried to also force default via `outline: initial`,\n // but that seems to erroneously remove the outline in Firefox altogether.)\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: -2px;\n}\n","// Image Mixins\n// - Responsive image\n// - Retina image\n\n\n// Responsive image\n//\n// Keep images from scaling beyond the width of their parents.\n.img-responsive(@display: block) {\n display: @display;\n max-width: 100%; // Part 1: Set a maximum relative to the parent\n height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching\n}\n\n\n// Retina image\n//\n// Short retina mixin for setting background-image and -size. Note that the\n// spelling of `min--moz-device-pixel-ratio` is intentional.\n.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {\n background-image: url(\"@{file-1x}\");\n\n @media\n only screen and (-webkit-min-device-pixel-ratio: 2),\n only screen and ( min--moz-device-pixel-ratio: 2),\n only screen and ( -o-min-device-pixel-ratio: 2/1),\n only screen and ( min-device-pixel-ratio: 2),\n only screen and ( min-resolution: 192dpi),\n only screen and ( min-resolution: 2dppx) {\n background-image: url(\"@{file-2x}\");\n background-size: @width-1x @height-1x;\n }\n}\n","//\n// Typography\n// --------------------------------------------------\n\n\n// Headings\n// -------------------------\n\nh1, h2, h3, h4, h5, h6,\n.h1, .h2, .h3, .h4, .h5, .h6 {\n font-family: @headings-font-family;\n font-weight: @headings-font-weight;\n line-height: @headings-line-height;\n color: @headings-color;\n\n small,\n .small {\n font-weight: normal;\n line-height: 1;\n color: @headings-small-color;\n }\n}\n\nh1, .h1,\nh2, .h2,\nh3, .h3 {\n margin-top: @line-height-computed;\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 65%;\n }\n}\nh4, .h4,\nh5, .h5,\nh6, .h6 {\n margin-top: (@line-height-computed / 2);\n margin-bottom: (@line-height-computed / 2);\n\n small,\n .small {\n font-size: 75%;\n }\n}\n\nh1, .h1 { font-size: @font-size-h1; }\nh2, .h2 { font-size: @font-size-h2; }\nh3, .h3 { font-size: @font-size-h3; }\nh4, .h4 { font-size: @font-size-h4; }\nh5, .h5 { font-size: @font-size-h5; }\nh6, .h6 { font-size: @font-size-h6; }\n\n\n// Body text\n// -------------------------\n\np {\n margin: 0 0 (@line-height-computed / 2);\n}\n\n.lead {\n margin-bottom: @line-height-computed;\n font-size: floor((@font-size-base * 1.15));\n font-weight: 300;\n line-height: 1.4;\n\n @media (min-width: @screen-sm-min) {\n font-size: (@font-size-base * 1.5);\n }\n}\n\n\n// Emphasis & misc\n// -------------------------\n\n// Ex: (12px small font / 14px base font) * 100% = about 85%\nsmall,\n.small {\n font-size: floor((100% * @font-size-small / @font-size-base));\n}\n\nmark,\n.mark {\n background-color: @state-warning-bg;\n padding: .2em;\n}\n\n// Alignment\n.text-left { text-align: left; }\n.text-right { text-align: right; }\n.text-center { text-align: center; }\n.text-justify { text-align: justify; }\n.text-nowrap { white-space: nowrap; }\n\n// Transformation\n.text-lowercase { text-transform: lowercase; }\n.text-uppercase { text-transform: uppercase; }\n.text-capitalize { text-transform: capitalize; }\n\n// Contextual colors\n.text-muted {\n color: @text-muted;\n}\n.text-primary {\n .text-emphasis-variant(@brand-primary);\n}\n.text-success {\n .text-emphasis-variant(@state-success-text);\n}\n.text-info {\n .text-emphasis-variant(@state-info-text);\n}\n.text-warning {\n .text-emphasis-variant(@state-warning-text);\n}\n.text-danger {\n .text-emphasis-variant(@state-danger-text);\n}\n\n// Contextual backgrounds\n// For now we'll leave these alongside the text classes until v4 when we can\n// safely shift things around (per SemVer rules).\n.bg-primary {\n // Given the contrast here, this is the only class to have its color inverted\n // automatically.\n color: #fff;\n .bg-variant(@brand-primary);\n}\n.bg-success {\n .bg-variant(@state-success-bg);\n}\n.bg-info {\n .bg-variant(@state-info-bg);\n}\n.bg-warning {\n .bg-variant(@state-warning-bg);\n}\n.bg-danger {\n .bg-variant(@state-danger-bg);\n}\n\n\n// Page header\n// -------------------------\n\n.page-header {\n padding-bottom: ((@line-height-computed / 2) - 1);\n margin: (@line-height-computed * 2) 0 @line-height-computed;\n border-bottom: 1px solid @page-header-border-color;\n}\n\n\n// Lists\n// -------------------------\n\n// Unordered and Ordered lists\nul,\nol {\n margin-top: 0;\n margin-bottom: (@line-height-computed / 2);\n ul,\n ol {\n margin-bottom: 0;\n }\n}\n\n// List options\n\n// Unstyled keeps list items block level, just removes default browser padding and list-style\n.list-unstyled {\n padding-left: 0;\n list-style: none;\n}\n\n// Inline turns list items into inline-block\n.list-inline {\n .list-unstyled();\n margin-left: -5px;\n\n > li {\n display: inline-block;\n padding-left: 5px;\n padding-right: 5px;\n }\n}\n\n// Description Lists\ndl {\n margin-top: 0; // Remove browser default\n margin-bottom: @line-height-computed;\n}\ndt,\ndd {\n line-height: @line-height-base;\n}\ndt {\n font-weight: bold;\n}\ndd {\n margin-left: 0; // Undo browser default\n}\n\n// Horizontal description lists\n//\n// Defaults to being stacked without any of the below styles applied, until the\n// grid breakpoint is reached (default of ~768px).\n\n.dl-horizontal {\n dd {\n &:extend(.clearfix all); // Clear the floated `dt` if an empty `dd` is present\n }\n\n @media (min-width: @dl-horizontal-breakpoint) {\n dt {\n float: left;\n width: (@dl-horizontal-offset - 20);\n clear: left;\n text-align: right;\n .text-overflow();\n }\n dd {\n margin-left: @dl-horizontal-offset;\n }\n }\n}\n\n\n// Misc\n// -------------------------\n\n// Abbreviations and acronyms\nabbr[title],\n// Add data-* attribute to help out our tooltip plugin, per https://github.com/twbs/bootstrap/issues/5257\nabbr[data-original-title] {\n cursor: help;\n border-bottom: 1px dotted @abbr-border-color;\n}\n.initialism {\n font-size: 90%;\n .text-uppercase();\n}\n\n// Blockquotes\nblockquote {\n padding: (@line-height-computed / 2) @line-height-computed;\n margin: 0 0 @line-height-computed;\n font-size: @blockquote-font-size;\n border-left: 5px solid @blockquote-border-color;\n\n p,\n ul,\n ol {\n &:last-child {\n margin-bottom: 0;\n }\n }\n\n // Note: Deprecated small and .small as of v3.1.0\n // Context: https://github.com/twbs/bootstrap/issues/11660\n footer,\n small,\n .small {\n display: block;\n font-size: 80%; // back to default font-size\n line-height: @line-height-base;\n color: @blockquote-small-color;\n\n &:before {\n content: '\\2014 \\00A0'; // em dash, nbsp\n }\n }\n}\n\n// Opposite alignment of blockquote\n//\n// Heads up: `blockquote.pull-right` has been deprecated as of v3.1.0.\n.blockquote-reverse,\nblockquote.pull-right {\n padding-right: 15px;\n padding-left: 0;\n border-right: 5px solid @blockquote-border-color;\n border-left: 0;\n text-align: right;\n\n // Account for citation\n footer,\n small,\n .small {\n &:before { content: ''; }\n &:after {\n content: '\\00A0 \\2014'; // nbsp, em dash\n }\n }\n}\n\n// Addresses\naddress {\n margin-bottom: @line-height-computed;\n font-style: normal;\n line-height: @line-height-base;\n}\n","// Typography\n\n.text-emphasis-variant(@color) {\n color: @color;\n a&:hover,\n a&:focus {\n color: darken(@color, 10%);\n }\n}\n","// Contextual backgrounds\n\n.bg-variant(@color) {\n background-color: @color;\n a&:hover,\n a&:focus {\n background-color: darken(@color, 10%);\n }\n}\n","// Text overflow\n// Requires inline-block or block for proper styling\n\n.text-overflow() {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n","//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: @font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: @code-color;\n background-color: @code-bg;\n border-radius: @border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: @kbd-color;\n background-color: @kbd-bg;\n border-radius: @border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: ((@line-height-computed - 1) / 2);\n margin: 0 0 (@line-height-computed / 2);\n font-size: (@font-size-base - 1); // 14px to 13px\n line-height: @line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: @pre-color;\n background-color: @pre-bg;\n border: 1px solid @pre-border-color;\n border-radius: @border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: @pre-scrollable-max-height;\n overflow-y: scroll;\n}\n","//\n// Grid system\n// --------------------------------------------------\n\n\n// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n.container {\n .container-fixed();\n\n @media (min-width: @screen-sm-min) {\n width: @container-sm;\n }\n @media (min-width: @screen-md-min) {\n width: @container-md;\n }\n @media (min-width: @screen-lg-min) {\n width: @container-lg;\n }\n}\n\n\n// Fluid container\n//\n// Utilizes the mixin meant for fixed width containers, but without any defined\n// width for fluid, full width layouts.\n\n.container-fluid {\n .container-fixed();\n}\n\n\n// Row\n//\n// Rows contain and clear the floats of your columns.\n\n.row {\n .make-row();\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n.make-grid-columns();\n\n\n// Extra small grid\n//\n// Columns, offsets, pushes, and pulls for extra small devices like\n// smartphones.\n\n.make-grid(xs);\n\n\n// Small grid\n//\n// Columns, offsets, pushes, and pulls for the small device range, from phones\n// to tablets.\n\n@media (min-width: @screen-sm-min) {\n .make-grid(sm);\n}\n\n\n// Medium grid\n//\n// Columns, offsets, pushes, and pulls for the desktop device range.\n\n@media (min-width: @screen-md-min) {\n .make-grid(md);\n}\n\n\n// Large grid\n//\n// Columns, offsets, pushes, and pulls for the large desktop device range.\n\n@media (min-width: @screen-lg-min) {\n .make-grid(lg);\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n// Centered container element\n.container-fixed(@gutter: @grid-gutter-width) {\n margin-right: auto;\n margin-left: auto;\n padding-left: floor((@gutter / 2));\n padding-right: ceil((@gutter / 2));\n &:extend(.clearfix all);\n}\n\n// Creates a wrapper for a series of columns\n.make-row(@gutter: @grid-gutter-width) {\n margin-left: ceil((@gutter / -2));\n margin-right: floor((@gutter / -2));\n &:extend(.clearfix all);\n}\n\n// Generate the extra small columns\n.make-xs-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n float: left;\n width: percentage((@columns / @grid-columns));\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n}\n.make-xs-column-offset(@columns) {\n margin-left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-push(@columns) {\n left: percentage((@columns / @grid-columns));\n}\n.make-xs-column-pull(@columns) {\n right: percentage((@columns / @grid-columns));\n}\n\n// Generate the small columns\n.make-sm-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-sm-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-offset(@columns) {\n @media (min-width: @screen-sm-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-push(@columns) {\n @media (min-width: @screen-sm-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-sm-column-pull(@columns) {\n @media (min-width: @screen-sm-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the medium columns\n.make-md-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-md-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-offset(@columns) {\n @media (min-width: @screen-md-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-push(@columns) {\n @media (min-width: @screen-md-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-md-column-pull(@columns) {\n @media (min-width: @screen-md-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n\n// Generate the large columns\n.make-lg-column(@columns; @gutter: @grid-gutter-width) {\n position: relative;\n min-height: 1px;\n padding-left: (@gutter / 2);\n padding-right: (@gutter / 2);\n\n @media (min-width: @screen-lg-min) {\n float: left;\n width: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-offset(@columns) {\n @media (min-width: @screen-lg-min) {\n margin-left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-push(@columns) {\n @media (min-width: @screen-lg-min) {\n left: percentage((@columns / @grid-columns));\n }\n}\n.make-lg-column-pull(@columns) {\n @media (min-width: @screen-lg-min) {\n right: percentage((@columns / @grid-columns));\n }\n}\n","// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `@grid-columns`.\n\n.make-grid-columns() {\n // Common styles for all sizes of grid columns, widths 1-12\n .col(@index) { // initial\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general; \"=<\" isn't a typo\n @item: ~\".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n position: relative;\n // Prevent columns from collapsing when empty\n min-height: 1px;\n // Inner gutter via padding\n padding-left: ceil((@grid-gutter-width / 2));\n padding-right: floor((@grid-gutter-width / 2));\n }\n }\n .col(1); // kickstart it\n}\n\n.float-grid-columns(@class) {\n .col(@index) { // initial\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), @item);\n }\n .col(@index, @list) when (@index =< @grid-columns) { // general\n @item: ~\".col-@{class}-@{index}\";\n .col((@index + 1), ~\"@{list}, @{item}\");\n }\n .col(@index, @list) when (@index > @grid-columns) { // terminal\n @{list} {\n float: left;\n }\n }\n .col(1); // kickstart it\n}\n\n.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {\n .col-@{class}-@{index} {\n width: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {\n .col-@{class}-push-@{index} {\n left: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {\n .col-@{class}-push-0 {\n left: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {\n .col-@{class}-pull-@{index} {\n right: percentage((@index / @grid-columns));\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {\n .col-@{class}-pull-0 {\n right: auto;\n }\n}\n.calc-grid-column(@index, @class, @type) when (@type = offset) {\n .col-@{class}-offset-@{index} {\n margin-left: percentage((@index / @grid-columns));\n }\n}\n\n// Basic looping in LESS\n.loop-grid-columns(@index, @class, @type) when (@index >= 0) {\n .calc-grid-column(@index, @class, @type);\n // next iteration\n .loop-grid-columns((@index - 1), @class, @type);\n}\n\n// Create grid for specific class\n.make-grid(@class) {\n .float-grid-columns(@class);\n .loop-grid-columns(@grid-columns, @class, width);\n .loop-grid-columns(@grid-columns, @class, pull);\n .loop-grid-columns(@grid-columns, @class, push);\n .loop-grid-columns(@grid-columns, @class, offset);\n}\n","//\n// Tables\n// --------------------------------------------------\n\n\ntable {\n background-color: @table-bg;\n}\ncaption {\n padding-top: @table-cell-padding;\n padding-bottom: @table-cell-padding;\n color: @text-muted;\n text-align: left;\n}\nth {\n text-align: left;\n}\n\n\n// Baseline styles\n\n.table {\n width: 100%;\n max-width: 100%;\n margin-bottom: @line-height-computed;\n // Cells\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-cell-padding;\n line-height: @line-height-base;\n vertical-align: top;\n border-top: 1px solid @table-border-color;\n }\n }\n }\n // Bottom align for column headings\n > thead > tr > th {\n vertical-align: bottom;\n border-bottom: 2px solid @table-border-color;\n }\n // Remove top border from thead by default\n > caption + thead,\n > colgroup + thead,\n > thead:first-child {\n > tr:first-child {\n > th,\n > td {\n border-top: 0;\n }\n }\n }\n // Account for multiple tbody instances\n > tbody + tbody {\n border-top: 2px solid @table-border-color;\n }\n\n // Nesting\n .table {\n background-color: @body-bg;\n }\n}\n\n\n// Condensed table w/ half padding\n\n.table-condensed {\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n padding: @table-condensed-cell-padding;\n }\n }\n }\n}\n\n\n// Bordered version\n//\n// Add borders all around the table and between all the columns.\n\n.table-bordered {\n border: 1px solid @table-border-color;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n border: 1px solid @table-border-color;\n }\n }\n }\n > thead > tr {\n > th,\n > td {\n border-bottom-width: 2px;\n }\n }\n}\n\n\n// Zebra-striping\n//\n// Default zebra-stripe styles (alternating gray and transparent backgrounds)\n\n.table-striped {\n > tbody > tr:nth-of-type(odd) {\n background-color: @table-bg-accent;\n }\n}\n\n\n// Hover effect\n//\n// Placed here since it has to come after the potential zebra striping\n\n.table-hover {\n > tbody > tr:hover {\n background-color: @table-bg-hover;\n }\n}\n\n\n// Table cell sizing\n//\n// Reset default table behavior\n\ntable col[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-column;\n}\ntable {\n td,\n th {\n &[class*=\"col-\"] {\n position: static; // Prevent border hiding in Firefox and IE9-11 (see https://github.com/twbs/bootstrap/issues/11623)\n float: none;\n display: table-cell;\n }\n }\n}\n\n\n// Table backgrounds\n//\n// Exact selectors below required to override `.table-striped` and prevent\n// inheritance to nested tables.\n\n// Generate the contextual variants\n.table-row-variant(active; @table-bg-active);\n.table-row-variant(success; @state-success-bg);\n.table-row-variant(info; @state-info-bg);\n.table-row-variant(warning; @state-warning-bg);\n.table-row-variant(danger; @state-danger-bg);\n\n\n// Responsive tables\n//\n// Wrap your tables in `.table-responsive` and we'll make them mobile friendly\n// by enabling horizontal scrolling. Only applies <768px. Everything above that\n// will display normally.\n\n.table-responsive {\n overflow-x: auto;\n min-height: 0.01%; // Workaround for IE9 bug (see https://github.com/twbs/bootstrap/issues/14837)\n\n @media screen and (max-width: @screen-xs-max) {\n width: 100%;\n margin-bottom: (@line-height-computed * 0.75);\n overflow-y: hidden;\n -ms-overflow-style: -ms-autohiding-scrollbar;\n border: 1px solid @table-border-color;\n\n // Tighten up spacing\n > .table {\n margin-bottom: 0;\n\n // Ensure the content doesn't wrap\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th,\n > td {\n white-space: nowrap;\n }\n }\n }\n }\n\n // Special overrides for the bordered tables\n > .table-bordered {\n border: 0;\n\n // Nuke the appropriate borders so that the parent can handle them\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n\n // Only nuke the last row's bottom-border in `tbody` and `tfoot` since\n // chances are there will be only one `tr` in a `thead` and that would\n // remove the border altogether.\n > tbody,\n > tfoot {\n > tr:last-child {\n > th,\n > td {\n border-bottom: 0;\n }\n }\n }\n\n }\n }\n}\n","// Tables\n\n.table-row-variant(@state; @background) {\n // Exact selectors below required to override `.table-striped` and prevent\n // inheritance to nested tables.\n .table > thead > tr,\n .table > tbody > tr,\n .table > tfoot > tr {\n > td.@{state},\n > th.@{state},\n &.@{state} > td,\n &.@{state} > th {\n background-color: @background;\n }\n }\n\n // Hover states for `.table-hover`\n // Note: this is not available for cells or rows within `thead` or `tfoot`.\n .table-hover > tbody > tr {\n > td.@{state}:hover,\n > th.@{state}:hover,\n &.@{state}:hover > td,\n &:hover > .@{state},\n &.@{state}:hover > th {\n background-color: darken(@background, 5%);\n }\n }\n}\n","//\n// Forms\n// --------------------------------------------------\n\n\n// Normalize non-controls\n//\n// Restyle and baseline non-control form elements.\n\nfieldset {\n padding: 0;\n margin: 0;\n border: 0;\n // Chrome and Firefox set a `min-width: min-content;` on fieldsets,\n // so we reset that to ensure it behaves more like a standard block element.\n // See https://github.com/twbs/bootstrap/issues/12359.\n min-width: 0;\n}\n\nlegend {\n display: block;\n width: 100%;\n padding: 0;\n margin-bottom: @line-height-computed;\n font-size: (@font-size-base * 1.5);\n line-height: inherit;\n color: @legend-color;\n border: 0;\n border-bottom: 1px solid @legend-border-color;\n}\n\nlabel {\n display: inline-block;\n max-width: 100%; // Force IE8 to wrap long content (see https://github.com/twbs/bootstrap/issues/13141)\n margin-bottom: 5px;\n font-weight: bold;\n}\n\n\n// Normalize form controls\n//\n// While most of our form styles require extra classes, some basic normalization\n// is required to ensure optimum display with or without those classes to better\n// address browser inconsistencies.\n\n// Override content-box in Normalize (* isn't specific enough)\ninput[type=\"search\"] {\n .box-sizing(border-box);\n}\n\n// Position radios and checkboxes better\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n margin: 4px 0 0;\n margin-top: 1px \\9; // IE8-9\n line-height: normal;\n}\n\ninput[type=\"file\"] {\n display: block;\n}\n\n// Make range inputs behave like textual form controls\ninput[type=\"range\"] {\n display: block;\n width: 100%;\n}\n\n// Make multiple select elements height not fixed\nselect[multiple],\nselect[size] {\n height: auto;\n}\n\n// Focus for file, radio, and checkbox\ninput[type=\"file\"]:focus,\ninput[type=\"radio\"]:focus,\ninput[type=\"checkbox\"]:focus {\n .tab-focus();\n}\n\n// Adjust output element\noutput {\n display: block;\n padding-top: (@padding-base-vertical + 1);\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n}\n\n\n// Common form controls\n//\n// Shared size and type resets for form controls. Apply `.form-control` to any\n// of the following form controls:\n//\n// select\n// textarea\n// input[type=\"text\"]\n// input[type=\"password\"]\n// input[type=\"datetime\"]\n// input[type=\"datetime-local\"]\n// input[type=\"date\"]\n// input[type=\"month\"]\n// input[type=\"time\"]\n// input[type=\"week\"]\n// input[type=\"number\"]\n// input[type=\"email\"]\n// input[type=\"url\"]\n// input[type=\"search\"]\n// input[type=\"tel\"]\n// input[type=\"color\"]\n\n.form-control {\n display: block;\n width: 100%;\n height: @input-height-base; // Make inputs at least the height of their button counterpart (base line-height + padding + border)\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n line-height: @line-height-base;\n color: @input-color;\n background-color: @input-bg;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid @input-border;\n border-radius: @input-border-radius; // Note: This has no effect on <select>s in some browsers, due to the limited stylability of <select>s in CSS.\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));\n .transition(~\"border-color ease-in-out .15s, box-shadow ease-in-out .15s\");\n\n // Customize the `:focus` state to imitate native WebKit styles.\n .form-control-focus();\n\n // Placeholder\n .placeholder();\n\n // Unstyle the caret on `<select>`s in IE10+.\n &::-ms-expand {\n border: 0;\n background-color: transparent;\n }\n\n // Disabled and read-only inputs\n //\n // HTML5 says that controls under a fieldset > legend:first-child won't be\n // disabled if the fieldset is disabled. Due to implementation difficulty, we\n // don't honor that edge case; we style them as disabled anyway.\n &[disabled],\n &[readonly],\n fieldset[disabled] & {\n background-color: @input-bg-disabled;\n opacity: 1; // iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655\n }\n\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n\n // Reset height for `textarea`s\n textarea& {\n height: auto;\n }\n}\n\n\n// Search inputs in iOS\n//\n// This overrides the extra rounded corners on search inputs in iOS so that our\n// `.form-control` class can properly style them. Note that this cannot simply\n// be added to `.form-control` as it's not specific enough. For details, see\n// https://github.com/twbs/bootstrap/issues/11586.\n\ninput[type=\"search\"] {\n -webkit-appearance: none;\n}\n\n\n// Special styles for iOS temporal inputs\n//\n// In Mobile Safari, setting `display: block` on temporal inputs causes the\n// text within the input to become vertically misaligned. As a workaround, we\n// set a pixel line-height that matches the given height of the input, but only\n// for Safari. See https://bugs.webkit.org/show_bug.cgi?id=139848\n//\n// Note that as of 9.3, iOS doesn't support `week`.\n\n@media screen and (-webkit-min-device-pixel-ratio: 0) {\n input[type=\"date\"],\n input[type=\"time\"],\n input[type=\"datetime-local\"],\n input[type=\"month\"] {\n &.form-control {\n line-height: @input-height-base;\n }\n\n &.input-sm,\n .input-group-sm & {\n line-height: @input-height-small;\n }\n\n &.input-lg,\n .input-group-lg & {\n line-height: @input-height-large;\n }\n }\n}\n\n\n// Form groups\n//\n// Designed to help with the organization and spacing of vertical forms. For\n// horizontal forms, use the predefined grid classes.\n\n.form-group {\n margin-bottom: @form-group-margin-bottom;\n}\n\n\n// Checkboxes and radios\n//\n// Indent the labels to position radios/checkboxes as hanging controls.\n\n.radio,\n.checkbox {\n position: relative;\n display: block;\n margin-top: 10px;\n margin-bottom: 10px;\n\n label {\n min-height: @line-height-computed; // Ensure the input doesn't jump when there is no text\n padding-left: 20px;\n margin-bottom: 0;\n font-weight: normal;\n cursor: pointer;\n }\n}\n.radio input[type=\"radio\"],\n.radio-inline input[type=\"radio\"],\n.checkbox input[type=\"checkbox\"],\n.checkbox-inline input[type=\"checkbox\"] {\n position: absolute;\n margin-left: -20px;\n margin-top: 4px \\9;\n}\n\n.radio + .radio,\n.checkbox + .checkbox {\n margin-top: -5px; // Move up sibling radios or checkboxes for tighter spacing\n}\n\n// Radios and checkboxes on same line\n.radio-inline,\n.checkbox-inline {\n position: relative;\n display: inline-block;\n padding-left: 20px;\n margin-bottom: 0;\n vertical-align: middle;\n font-weight: normal;\n cursor: pointer;\n}\n.radio-inline + .radio-inline,\n.checkbox-inline + .checkbox-inline {\n margin-top: 0;\n margin-left: 10px; // space out consecutive inline controls\n}\n\n// Apply same disabled cursor tweak as for inputs\n// Some special care is needed because <label>s don't inherit their parent's `cursor`.\n//\n// Note: Neither radios nor checkboxes can be readonly.\ninput[type=\"radio\"],\ninput[type=\"checkbox\"] {\n &[disabled],\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used directly on <label>s\n.radio-inline,\n.checkbox-inline {\n &.disabled,\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n }\n}\n// These classes are used on elements with <label> descendants\n.radio,\n.checkbox {\n &.disabled,\n fieldset[disabled] & {\n label {\n cursor: @cursor-disabled;\n }\n }\n}\n\n\n// Static form control text\n//\n// Apply class to a `p` element to make any string of text align with labels in\n// a horizontal form layout.\n\n.form-control-static {\n // Size it appropriately next to real form controls\n padding-top: (@padding-base-vertical + 1);\n padding-bottom: (@padding-base-vertical + 1);\n // Remove default margin from `p`\n margin-bottom: 0;\n min-height: (@line-height-computed + @font-size-base);\n\n &.input-lg,\n &.input-sm {\n padding-left: 0;\n padding-right: 0;\n }\n}\n\n\n// Form control sizing\n//\n// Build on `.form-control` with modifier classes to decrease or increase the\n// height and font-size of form controls.\n//\n// The `.form-group-* form-control` variations are sadly duplicated to avoid the\n// issue documented in https://github.com/twbs/bootstrap/issues/15074.\n\n.input-sm {\n .input-size(@input-height-small; @padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @input-border-radius-small);\n}\n.form-group-sm {\n .form-control {\n height: @input-height-small;\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n border-radius: @input-border-radius-small;\n }\n select.form-control {\n height: @input-height-small;\n line-height: @input-height-small;\n }\n textarea.form-control,\n select[multiple].form-control {\n height: auto;\n }\n .form-control-static {\n height: @input-height-small;\n min-height: (@line-height-computed + @font-size-small);\n padding: (@padding-small-vertical + 1) @padding-small-horizontal;\n font-size: @font-size-small;\n line-height: @line-height-small;\n }\n}\n\n.input-lg {\n .input-size(@input-height-large; @padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @input-border-radius-large);\n}\n.form-group-lg {\n .form-control {\n height: @input-height-large;\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n border-radius: @input-border-radius-large;\n }\n select.form-control {\n height: @input-height-large;\n line-height: @input-height-large;\n }\n textarea.form-control,\n select[multiple].form-control {\n height: auto;\n }\n .form-control-static {\n height: @input-height-large;\n min-height: (@line-height-computed + @font-size-large);\n padding: (@padding-large-vertical + 1) @padding-large-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-large;\n }\n}\n\n\n// Form control feedback states\n//\n// Apply contextual and semantic states to individual form controls.\n\n.has-feedback {\n // Enable absolute positioning\n position: relative;\n\n // Ensure icons don't overlap text\n .form-control {\n padding-right: (@input-height-base * 1.25);\n }\n}\n// Feedback icon (requires .glyphicon classes)\n.form-control-feedback {\n position: absolute;\n top: 0;\n right: 0;\n z-index: 2; // Ensure icon is above input groups\n display: block;\n width: @input-height-base;\n height: @input-height-base;\n line-height: @input-height-base;\n text-align: center;\n pointer-events: none;\n}\n.input-lg + .form-control-feedback,\n.input-group-lg + .form-control-feedback,\n.form-group-lg .form-control + .form-control-feedback {\n width: @input-height-large;\n height: @input-height-large;\n line-height: @input-height-large;\n}\n.input-sm + .form-control-feedback,\n.input-group-sm + .form-control-feedback,\n.form-group-sm .form-control + .form-control-feedback {\n width: @input-height-small;\n height: @input-height-small;\n line-height: @input-height-small;\n}\n\n// Feedback states\n.has-success {\n .form-control-validation(@state-success-text; @state-success-text; @state-success-bg);\n}\n.has-warning {\n .form-control-validation(@state-warning-text; @state-warning-text; @state-warning-bg);\n}\n.has-error {\n .form-control-validation(@state-danger-text; @state-danger-text; @state-danger-bg);\n}\n\n// Reposition feedback icon if input has visible label above\n.has-feedback label {\n\n & ~ .form-control-feedback {\n top: (@line-height-computed + 5); // Height of the `label` and its margin\n }\n &.sr-only ~ .form-control-feedback {\n top: 0;\n }\n}\n\n\n// Help text\n//\n// Apply to any element you wish to create light text for placement immediately\n// below a form control. Use for general help, formatting, or instructional text.\n\n.help-block {\n display: block; // account for any element using help-block\n margin-top: 5px;\n margin-bottom: 10px;\n color: lighten(@text-color, 25%); // lighten the text some for contrast\n}\n\n\n// Inline forms\n//\n// Make forms appear inline(-block) by adding the `.form-inline` class. Inline\n// forms begin stacked on extra small (mobile) devices and then go inline when\n// viewports reach <768px.\n//\n// Requires wrapping inputs and labels with `.form-group` for proper display of\n// default HTML form controls and our custom form controls (e.g., input groups).\n//\n// Heads up! This is mixin-ed into `.navbar-form` in navbars.less.\n\n.form-inline {\n\n // Kick in the inline\n @media (min-width: @screen-sm-min) {\n // Inline-block all the things for \"inline\"\n .form-group {\n display: inline-block;\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // In navbar-form, allow folks to *not* use `.form-group`\n .form-control {\n display: inline-block;\n width: auto; // Prevent labels from stacking above inputs in `.form-group`\n vertical-align: middle;\n }\n\n // Make static controls behave like regular ones\n .form-control-static {\n display: inline-block;\n }\n\n .input-group {\n display: inline-table;\n vertical-align: middle;\n\n .input-group-addon,\n .input-group-btn,\n .form-control {\n width: auto;\n }\n }\n\n // Input groups need that 100% width though\n .input-group > .form-control {\n width: 100%;\n }\n\n .control-label {\n margin-bottom: 0;\n vertical-align: middle;\n }\n\n // Remove default margin on radios/checkboxes that were used for stacking, and\n // then undo the floating of radios and checkboxes to match.\n .radio,\n .checkbox {\n display: inline-block;\n margin-top: 0;\n margin-bottom: 0;\n vertical-align: middle;\n\n label {\n padding-left: 0;\n }\n }\n .radio input[type=\"radio\"],\n .checkbox input[type=\"checkbox\"] {\n position: relative;\n margin-left: 0;\n }\n\n // Re-override the feedback icon.\n .has-feedback .form-control-feedback {\n top: 0;\n }\n }\n}\n\n\n// Horizontal forms\n//\n// Horizontal forms are built on grid classes and allow you to create forms with\n// labels on the left and inputs on the right.\n\n.form-horizontal {\n\n // Consistent vertical alignment of radios and checkboxes\n //\n // Labels also get some reset styles, but that is scoped to a media query below.\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline {\n margin-top: 0;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n // Account for padding we're adding to ensure the alignment and of help text\n // and other content below items\n .radio,\n .checkbox {\n min-height: (@line-height-computed + (@padding-base-vertical + 1));\n }\n\n // Make form groups behave like rows\n .form-group {\n .make-row();\n }\n\n // Reset spacing and right align labels, but scope to media queries so that\n // labels on narrow viewports stack the same as a default form example.\n @media (min-width: @screen-sm-min) {\n .control-label {\n text-align: right;\n margin-bottom: 0;\n padding-top: (@padding-base-vertical + 1); // Default padding plus a border\n }\n }\n\n // Validation states\n //\n // Reposition the icon because it's now within a grid column and columns have\n // `position: relative;` on them. Also accounts for the grid gutter padding.\n .has-feedback .form-control-feedback {\n right: floor((@grid-gutter-width / 2));\n }\n\n // Form group sizes\n //\n // Quick utility class for applying `.input-lg` and `.input-sm` styles to the\n // inputs and labels within a `.form-group`.\n .form-group-lg {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-large-vertical + 1);\n font-size: @font-size-large;\n }\n }\n }\n .form-group-sm {\n @media (min-width: @screen-sm-min) {\n .control-label {\n padding-top: (@padding-small-vertical + 1);\n font-size: @font-size-small;\n }\n }\n }\n}\n","// Form validation states\n//\n// Used in forms.less to generate the form validation CSS for warnings, errors,\n// and successes.\n\n.form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) {\n // Color the label and help text\n .help-block,\n .control-label,\n .radio,\n .checkbox,\n .radio-inline,\n .checkbox-inline,\n &.radio label,\n &.checkbox label,\n &.radio-inline label,\n &.checkbox-inline label {\n color: @text-color;\n }\n // Set the border and box shadow on specific inputs to match\n .form-control {\n border-color: @border-color;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work\n &:focus {\n border-color: darken(@border-color, 10%);\n @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%);\n .box-shadow(@shadow);\n }\n }\n // Set validation states also for addons\n .input-group-addon {\n color: @text-color;\n border-color: @border-color;\n background-color: @background-color;\n }\n // Optional feedback icon\n .form-control-feedback {\n color: @text-color;\n }\n}\n\n\n// Form control focus state\n//\n// Generate a customized focus state and for any input with the specified color,\n// which defaults to the `@input-border-focus` variable.\n//\n// We highly encourage you to not customize the default value, but instead use\n// this to tweak colors on an as-needed basis. This aesthetic change is based on\n// WebKit's default styles, but applicable to a wider range of browsers. Its\n// usability and accessibility should be taken into account with any change.\n//\n// Example usage: change the default blue border and shadow to white for better\n// contrast against a dark gray background.\n.form-control-focus(@color: @input-border-focus) {\n @color-rgba: rgba(red(@color), green(@color), blue(@color), .6);\n &:focus {\n border-color: @color;\n outline: 0;\n .box-shadow(~\"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}\");\n }\n}\n\n// Form control sizing\n//\n// Relative text size, padding, and border-radii changes for form controls. For\n// horizontal sizing, wrap controls in the predefined grid classes. `<select>`\n// element gets special love because it's special, and that's a fact!\n.input-size(@input-height; @padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n height: @input-height;\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n\n select& {\n height: @input-height;\n line-height: @input-height;\n }\n\n textarea&,\n select[multiple]& {\n height: auto;\n }\n}\n","//\n// Buttons\n// --------------------------------------------------\n\n\n// Base styles\n// --------------------------------------------------\n\n.btn {\n display: inline-block;\n margin-bottom: 0; // For input.btn\n font-weight: @btn-font-weight;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n white-space: nowrap;\n .button-size(@padding-base-vertical; @padding-base-horizontal; @font-size-base; @line-height-base; @btn-border-radius-base);\n .user-select(none);\n\n &,\n &:active,\n &.active {\n &:focus,\n &.focus {\n .tab-focus();\n }\n }\n\n &:hover,\n &:focus,\n &.focus {\n color: @btn-default-color;\n text-decoration: none;\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: @cursor-disabled;\n .opacity(.65);\n .box-shadow(none);\n }\n\n a& {\n &.disabled,\n fieldset[disabled] & {\n pointer-events: none; // Future-proof disabling of clicks on `<a>` elements\n }\n }\n}\n\n\n// Alternate buttons\n// --------------------------------------------------\n\n.btn-default {\n .button-variant(@btn-default-color; @btn-default-bg; @btn-default-border);\n}\n.btn-primary {\n .button-variant(@btn-primary-color; @btn-primary-bg; @btn-primary-border);\n}\n// Success appears as green\n.btn-success {\n .button-variant(@btn-success-color; @btn-success-bg; @btn-success-border);\n}\n// Info appears as blue-green\n.btn-info {\n .button-variant(@btn-info-color; @btn-info-bg; @btn-info-border);\n}\n// Warning appears as orange\n.btn-warning {\n .button-variant(@btn-warning-color; @btn-warning-bg; @btn-warning-border);\n}\n// Danger and error appear as red\n.btn-danger {\n .button-variant(@btn-danger-color; @btn-danger-bg; @btn-danger-border);\n}\n\n\n// Link buttons\n// -------------------------\n\n// Make a button look and behave like a link\n.btn-link {\n color: @link-color;\n font-weight: normal;\n border-radius: 0;\n\n &,\n &:active,\n &.active,\n &[disabled],\n fieldset[disabled] & {\n background-color: transparent;\n .box-shadow(none);\n }\n &,\n &:hover,\n &:focus,\n &:active {\n border-color: transparent;\n }\n &:hover,\n &:focus {\n color: @link-hover-color;\n text-decoration: @link-hover-decoration;\n background-color: transparent;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @btn-link-disabled-color;\n text-decoration: none;\n }\n }\n}\n\n\n// Button Sizes\n// --------------------------------------------------\n\n.btn-lg {\n // line-height: ensure even-numbered height of button next to large input\n .button-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @btn-border-radius-large);\n}\n.btn-sm {\n // line-height: ensure proper height of button next to small input\n .button-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n.btn-xs {\n .button-size(@padding-xs-vertical; @padding-xs-horizontal; @font-size-small; @line-height-small; @btn-border-radius-small);\n}\n\n\n// Block button\n// --------------------------------------------------\n\n.btn-block {\n display: block;\n width: 100%;\n}\n\n// Vertically space out multiple block buttons\n.btn-block + .btn-block {\n margin-top: 5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.btn-block {\n width: 100%;\n }\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n.button-variant(@color; @background; @border) {\n color: @color;\n background-color: @background;\n border-color: @border;\n\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 25%);\n }\n &:hover {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n color: @color;\n background-color: darken(@background, 10%);\n border-color: darken(@border, 12%);\n\n &:hover,\n &:focus,\n &.focus {\n color: @color;\n background-color: darken(@background, 17%);\n border-color: darken(@border, 25%);\n }\n }\n &:active,\n &.active,\n .open > .dropdown-toggle& {\n background-image: none;\n }\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus,\n &.focus {\n background-color: @background;\n border-color: @border;\n }\n }\n\n .badge {\n color: @background;\n background-color: @color;\n }\n}\n\n// Button sizes\n.button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n border-radius: @border-radius;\n}\n","// Opacity\n\n.opacity(@opacity) {\n opacity: @opacity;\n // IE8 filter\n @opacity-ie: (@opacity * 100);\n filter: ~\"alpha(opacity=@{opacity-ie})\";\n}\n","//\n// Component animations\n// --------------------------------------------------\n\n// Heads up!\n//\n// We don't use the `.opacity()` mixin here since it causes a bug with text\n// fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552.\n\n.fade {\n opacity: 0;\n .transition(opacity .15s linear);\n &.in {\n opacity: 1;\n }\n}\n\n.collapse {\n display: none;\n\n &.in { display: block; }\n tr&.in { display: table-row; }\n tbody&.in { display: table-row-group; }\n}\n\n.collapsing {\n position: relative;\n height: 0;\n overflow: hidden;\n .transition-property(~\"height, visibility\");\n .transition-duration(.35s);\n .transition-timing-function(ease);\n}\n","//\n// Dropdown menus\n// --------------------------------------------------\n\n\n// Dropdown arrow/caret\n.caret {\n display: inline-block;\n width: 0;\n height: 0;\n margin-left: 2px;\n vertical-align: middle;\n border-top: @caret-width-base dashed;\n border-top: @caret-width-base solid ~\"\\9\"; // IE8\n border-right: @caret-width-base solid transparent;\n border-left: @caret-width-base solid transparent;\n}\n\n// The dropdown wrapper (div)\n.dropup,\n.dropdown {\n position: relative;\n}\n\n// Prevent the focus on the dropdown toggle when closing dropdowns\n.dropdown-toggle:focus {\n outline: 0;\n}\n\n// The dropdown menu (ul)\n.dropdown-menu {\n position: absolute;\n top: 100%;\n left: 0;\n z-index: @zindex-dropdown;\n display: none; // none by default, but block on \"open\" of the menu\n float: left;\n min-width: 160px;\n padding: 5px 0;\n margin: 2px 0 0; // override default ul\n list-style: none;\n font-size: @font-size-base;\n text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)\n background-color: @dropdown-bg;\n border: 1px solid @dropdown-fallback-border; // IE8 fallback\n border: 1px solid @dropdown-border;\n border-radius: @border-radius-base;\n .box-shadow(0 6px 12px rgba(0,0,0,.175));\n background-clip: padding-box;\n\n // Aligns the dropdown menu to right\n //\n // Deprecated as of 3.1.0 in favor of `.dropdown-menu-[dir]`\n &.pull-right {\n right: 0;\n left: auto;\n }\n\n // Dividers (basically an hr) within the dropdown\n .divider {\n .nav-divider(@dropdown-divider-bg);\n }\n\n // Links within the dropdown menu\n > li > a {\n display: block;\n padding: 3px 20px;\n clear: both;\n font-weight: normal;\n line-height: @line-height-base;\n color: @dropdown-link-color;\n white-space: nowrap; // prevent links from randomly breaking onto new lines\n }\n}\n\n// Hover/Focus state\n.dropdown-menu > li > a {\n &:hover,\n &:focus {\n text-decoration: none;\n color: @dropdown-link-hover-color;\n background-color: @dropdown-link-hover-bg;\n }\n}\n\n// Active state\n.dropdown-menu > .active > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-active-color;\n text-decoration: none;\n outline: 0;\n background-color: @dropdown-link-active-bg;\n }\n}\n\n// Disabled state\n//\n// Gray out text and ensure the hover/focus state remains gray\n\n.dropdown-menu > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @dropdown-link-disabled-color;\n }\n\n // Nuke hover/focus effects\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: transparent;\n background-image: none; // Remove CSS gradient\n .reset-filter();\n cursor: @cursor-disabled;\n }\n}\n\n// Open state for the dropdown\n.open {\n // Show the menu\n > .dropdown-menu {\n display: block;\n }\n\n // Remove the outline when :focus is triggered\n > a {\n outline: 0;\n }\n}\n\n// Menu positioning\n//\n// Add extra class to `.dropdown-menu` to flip the alignment of the dropdown\n// menu with the parent.\n.dropdown-menu-right {\n left: auto; // Reset the default from `.dropdown-menu`\n right: 0;\n}\n// With v3, we enabled auto-flipping if you have a dropdown within a right\n// aligned nav component. To enable the undoing of that, we provide an override\n// to restore the default dropdown menu alignment.\n//\n// This is only for left-aligning a dropdown menu within a `.navbar-right` or\n// `.pull-right` nav component.\n.dropdown-menu-left {\n left: 0;\n right: auto;\n}\n\n// Dropdown section headers\n.dropdown-header {\n display: block;\n padding: 3px 20px;\n font-size: @font-size-small;\n line-height: @line-height-base;\n color: @dropdown-header-color;\n white-space: nowrap; // as with > li > a\n}\n\n// Backdrop to catch body clicks on mobile, etc.\n.dropdown-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: (@zindex-dropdown - 10);\n}\n\n// Right aligned dropdowns\n.pull-right > .dropdown-menu {\n right: 0;\n left: auto;\n}\n\n// Allow for dropdowns to go bottom up (aka, dropup-menu)\n//\n// Just add .dropup after the standard .dropdown class and you're set, bro.\n// TODO: abstract this so that the navbar fixed styles are not placed here?\n\n.dropup,\n.navbar-fixed-bottom .dropdown {\n // Reverse the caret\n .caret {\n border-top: 0;\n border-bottom: @caret-width-base dashed;\n border-bottom: @caret-width-base solid ~\"\\9\"; // IE8\n content: \"\";\n }\n // Different positioning for bottom up menu\n .dropdown-menu {\n top: auto;\n bottom: 100%;\n margin-bottom: 2px;\n }\n}\n\n\n// Component alignment\n//\n// Reiterate per navbar.less and the modified component alignment there.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-right {\n .dropdown-menu {\n .dropdown-menu-right();\n }\n // Necessary for overrides of the default right aligned menu.\n // Will remove come v4 in all likelihood.\n .dropdown-menu-left {\n .dropdown-menu-left();\n }\n }\n}\n","// Horizontal dividers\n//\n// Dividers (basically an hr) within dropdowns and nav lists\n\n.nav-divider(@color: #e5e5e5) {\n height: 1px;\n margin: ((@line-height-computed / 2) - 1) 0;\n overflow: hidden;\n background-color: @color;\n}\n","// Reset filters for IE\n//\n// When you need to remove a gradient background, do not forget to use this to reset\n// the IE filter for IE9 and below.\n\n.reset-filter() {\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(enabled = false)\"));\n}\n","//\n// Button groups\n// --------------------------------------------------\n\n// Make the div behave like a button\n.btn-group,\n.btn-group-vertical {\n position: relative;\n display: inline-block;\n vertical-align: middle; // match .btn alignment given font-size hack above\n > .btn {\n position: relative;\n float: left;\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active,\n &.active {\n z-index: 2;\n }\n }\n}\n\n// Prevent double borders when buttons are next to each other\n.btn-group {\n .btn + .btn,\n .btn + .btn-group,\n .btn-group + .btn,\n .btn-group + .btn-group {\n margin-left: -1px;\n }\n}\n\n// Optional: Group multiple button groups together for a toolbar\n.btn-toolbar {\n margin-left: -5px; // Offset the first child's margin\n &:extend(.clearfix all);\n\n .btn,\n .btn-group,\n .input-group {\n float: left;\n }\n > .btn,\n > .btn-group,\n > .input-group {\n margin-left: 5px;\n }\n}\n\n.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {\n border-radius: 0;\n}\n\n// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match\n.btn-group > .btn:first-child {\n margin-left: 0;\n &:not(:last-child):not(.dropdown-toggle) {\n .border-right-radius(0);\n }\n}\n// Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it\n.btn-group > .btn:last-child:not(:first-child),\n.btn-group > .dropdown-toggle:not(:first-child) {\n .border-left-radius(0);\n}\n\n// Custom edits for including btn-groups within btn-groups (useful for including dropdown buttons within a btn-group)\n.btn-group > .btn-group {\n float: left;\n}\n.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-right-radius(0);\n }\n}\n.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-left-radius(0);\n}\n\n// On active and open, don't show outline\n.btn-group .dropdown-toggle:active,\n.btn-group.open .dropdown-toggle {\n outline: 0;\n}\n\n\n// Sizing\n//\n// Remix the default button sizing classes into new ones for easier manipulation.\n\n.btn-group-xs > .btn { &:extend(.btn-xs); }\n.btn-group-sm > .btn { &:extend(.btn-sm); }\n.btn-group-lg > .btn { &:extend(.btn-lg); }\n\n\n// Split button dropdowns\n// ----------------------\n\n// Give the line between buttons some depth\n.btn-group > .btn + .dropdown-toggle {\n padding-left: 8px;\n padding-right: 8px;\n}\n.btn-group > .btn-lg + .dropdown-toggle {\n padding-left: 12px;\n padding-right: 12px;\n}\n\n// The clickable button for toggling the menu\n// Remove the gradient and set the same inset shadow as the :active state\n.btn-group.open .dropdown-toggle {\n .box-shadow(inset 0 3px 5px rgba(0,0,0,.125));\n\n // Show no shadow for `.btn-link` since it has no other button styles.\n &.btn-link {\n .box-shadow(none);\n }\n}\n\n\n// Reposition the caret\n.btn .caret {\n margin-left: 0;\n}\n// Carets in other button sizes\n.btn-lg .caret {\n border-width: @caret-width-large @caret-width-large 0;\n border-bottom-width: 0;\n}\n// Upside down carets for .dropup\n.dropup .btn-lg .caret {\n border-width: 0 @caret-width-large @caret-width-large;\n}\n\n\n// Vertical button groups\n// ----------------------\n\n.btn-group-vertical {\n > .btn,\n > .btn-group,\n > .btn-group > .btn {\n display: block;\n float: none;\n width: 100%;\n max-width: 100%;\n }\n\n // Clear floats so dropdown menus can be properly placed\n > .btn-group {\n &:extend(.clearfix all);\n > .btn {\n float: none;\n }\n }\n\n > .btn + .btn,\n > .btn + .btn-group,\n > .btn-group + .btn,\n > .btn-group + .btn-group {\n margin-top: -1px;\n margin-left: 0;\n }\n}\n\n.btn-group-vertical > .btn {\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n &:first-child:not(:last-child) {\n .border-top-radius(@btn-border-radius-base);\n .border-bottom-radius(0);\n }\n &:last-child:not(:first-child) {\n .border-top-radius(0);\n .border-bottom-radius(@btn-border-radius-base);\n }\n}\n.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {\n border-radius: 0;\n}\n.btn-group-vertical > .btn-group:first-child:not(:last-child) {\n > .btn:last-child,\n > .dropdown-toggle {\n .border-bottom-radius(0);\n }\n}\n.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {\n .border-top-radius(0);\n}\n\n\n// Justified button groups\n// ----------------------\n\n.btn-group-justified {\n display: table;\n width: 100%;\n table-layout: fixed;\n border-collapse: separate;\n > .btn,\n > .btn-group {\n float: none;\n display: table-cell;\n width: 1%;\n }\n > .btn-group .btn {\n width: 100%;\n }\n\n > .btn-group .dropdown-menu {\n left: auto;\n }\n}\n\n\n// Checkbox and radio options\n//\n// In order to support the browser's form validation feedback, powered by the\n// `required` attribute, we have to \"hide\" the inputs via `clip`. We cannot use\n// `display: none;` or `visibility: hidden;` as that also hides the popover.\n// Simply visually hiding the inputs via `opacity` would leave them clickable in\n// certain cases which is prevented by using `clip` and `pointer-events`.\n// This way, we ensure a DOM element is visible to position the popover from.\n//\n// See https://github.com/twbs/bootstrap/pull/12794 and\n// https://github.com/twbs/bootstrap/pull/14559 for more information.\n\n[data-toggle=\"buttons\"] {\n > .btn,\n > .btn-group > .btn {\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n position: absolute;\n clip: rect(0,0,0,0);\n pointer-events: none;\n }\n }\n}\n","// Single side border-radius\n\n.border-top-radius(@radius) {\n border-top-right-radius: @radius;\n border-top-left-radius: @radius;\n}\n.border-right-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-top-right-radius: @radius;\n}\n.border-bottom-radius(@radius) {\n border-bottom-right-radius: @radius;\n border-bottom-left-radius: @radius;\n}\n.border-left-radius(@radius) {\n border-bottom-left-radius: @radius;\n border-top-left-radius: @radius;\n}\n","//\n// Input groups\n// --------------------------------------------------\n\n// Base styles\n// -------------------------\n.input-group {\n position: relative; // For dropdowns\n display: table;\n border-collapse: separate; // prevent input groups from inheriting border styles from table cells when placed within a table\n\n // Undo padding and float of grid classes\n &[class*=\"col-\"] {\n float: none;\n padding-left: 0;\n padding-right: 0;\n }\n\n .form-control {\n // Ensure that the input is always above the *appended* addon button for\n // proper border colors.\n position: relative;\n z-index: 2;\n\n // IE9 fubars the placeholder attribute in text inputs and the arrows on\n // select elements in input groups. To fix it, we float the input. Details:\n // https://github.com/twbs/bootstrap/issues/11561#issuecomment-28936855\n float: left;\n\n width: 100%;\n margin-bottom: 0;\n\n &:focus {\n z-index: 3;\n }\n }\n}\n\n// Sizing options\n//\n// Remix the default form control sizing classes into new ones for easier\n// manipulation.\n\n.input-group-lg > .form-control,\n.input-group-lg > .input-group-addon,\n.input-group-lg > .input-group-btn > .btn {\n .input-lg();\n}\n.input-group-sm > .form-control,\n.input-group-sm > .input-group-addon,\n.input-group-sm > .input-group-btn > .btn {\n .input-sm();\n}\n\n\n// Display as table-cell\n// -------------------------\n.input-group-addon,\n.input-group-btn,\n.input-group .form-control {\n display: table-cell;\n\n &:not(:first-child):not(:last-child) {\n border-radius: 0;\n }\n}\n// Addon and addon wrapper for buttons\n.input-group-addon,\n.input-group-btn {\n width: 1%;\n white-space: nowrap;\n vertical-align: middle; // Match the inputs\n}\n\n// Text input groups\n// -------------------------\n.input-group-addon {\n padding: @padding-base-vertical @padding-base-horizontal;\n font-size: @font-size-base;\n font-weight: normal;\n line-height: 1;\n color: @input-color;\n text-align: center;\n background-color: @input-group-addon-bg;\n border: 1px solid @input-group-addon-border-color;\n border-radius: @input-border-radius;\n\n // Sizing\n &.input-sm {\n padding: @padding-small-vertical @padding-small-horizontal;\n font-size: @font-size-small;\n border-radius: @input-border-radius-small;\n }\n &.input-lg {\n padding: @padding-large-vertical @padding-large-horizontal;\n font-size: @font-size-large;\n border-radius: @input-border-radius-large;\n }\n\n // Nuke default margins from checkboxes and radios to vertically center within.\n input[type=\"radio\"],\n input[type=\"checkbox\"] {\n margin-top: 0;\n }\n}\n\n// Reset rounded corners\n.input-group .form-control:first-child,\n.input-group-addon:first-child,\n.input-group-btn:first-child > .btn,\n.input-group-btn:first-child > .btn-group > .btn,\n.input-group-btn:first-child > .dropdown-toggle,\n.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),\n.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {\n .border-right-radius(0);\n}\n.input-group-addon:first-child {\n border-right: 0;\n}\n.input-group .form-control:last-child,\n.input-group-addon:last-child,\n.input-group-btn:last-child > .btn,\n.input-group-btn:last-child > .btn-group > .btn,\n.input-group-btn:last-child > .dropdown-toggle,\n.input-group-btn:first-child > .btn:not(:first-child),\n.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {\n .border-left-radius(0);\n}\n.input-group-addon:last-child {\n border-left: 0;\n}\n\n// Button input groups\n// -------------------------\n.input-group-btn {\n position: relative;\n // Jankily prevent input button groups from wrapping with `white-space` and\n // `font-size` in combination with `inline-block` on buttons.\n font-size: 0;\n white-space: nowrap;\n\n // Negative margin for spacing, position for bringing hovered/focused/actived\n // element above the siblings.\n > .btn {\n position: relative;\n + .btn {\n margin-left: -1px;\n }\n // Bring the \"active\" button to the front\n &:hover,\n &:focus,\n &:active {\n z-index: 2;\n }\n }\n\n // Negative margin to only have a 1px border between the two\n &:first-child {\n > .btn,\n > .btn-group {\n margin-right: -1px;\n }\n }\n &:last-child {\n > .btn,\n > .btn-group {\n z-index: 2;\n margin-left: -1px;\n }\n }\n}\n","//\n// Navs\n// --------------------------------------------------\n\n\n// Base class\n// --------------------------------------------------\n\n.nav {\n margin-bottom: 0;\n padding-left: 0; // Override default ul/ol\n list-style: none;\n &:extend(.clearfix all);\n\n > li {\n position: relative;\n display: block;\n\n > a {\n position: relative;\n display: block;\n padding: @nav-link-padding;\n &:hover,\n &:focus {\n text-decoration: none;\n background-color: @nav-link-hover-bg;\n }\n }\n\n // Disabled state sets text to gray and nukes hover/tab effects\n &.disabled > a {\n color: @nav-disabled-link-color;\n\n &:hover,\n &:focus {\n color: @nav-disabled-link-hover-color;\n text-decoration: none;\n background-color: transparent;\n cursor: @cursor-disabled;\n }\n }\n }\n\n // Open dropdowns\n .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @nav-link-hover-bg;\n border-color: @link-color;\n }\n }\n\n // Nav dividers (deprecated with v3.0.1)\n //\n // This should have been removed in v3 with the dropping of `.nav-list`, but\n // we missed it. We don't currently support this anywhere, but in the interest\n // of maintaining backward compatibility in case you use it, it's deprecated.\n .nav-divider {\n .nav-divider();\n }\n\n // Prevent IE8 from misplacing imgs\n //\n // See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989\n > li > a > img {\n max-width: none;\n }\n}\n\n\n// Tabs\n// -------------------------\n\n// Give the tabs something to sit on\n.nav-tabs {\n border-bottom: 1px solid @nav-tabs-border-color;\n > li {\n float: left;\n // Make the list-items overlay the bottom border\n margin-bottom: -1px;\n\n // Actual tabs (as links)\n > a {\n margin-right: 2px;\n line-height: @line-height-base;\n border: 1px solid transparent;\n border-radius: @border-radius-base @border-radius-base 0 0;\n &:hover {\n border-color: @nav-tabs-link-hover-border-color @nav-tabs-link-hover-border-color @nav-tabs-border-color;\n }\n }\n\n // Active state, and its :hover to override normal :hover\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-tabs-active-link-hover-color;\n background-color: @nav-tabs-active-link-hover-bg;\n border: 1px solid @nav-tabs-active-link-hover-border-color;\n border-bottom-color: transparent;\n cursor: default;\n }\n }\n }\n // pulling this in mainly for less shorthand\n &.nav-justified {\n .nav-justified();\n .nav-tabs-justified();\n }\n}\n\n\n// Pills\n// -------------------------\n.nav-pills {\n > li {\n float: left;\n\n // Links rendered as pills\n > a {\n border-radius: @nav-pills-border-radius;\n }\n + li {\n margin-left: 2px;\n }\n\n // Active state\n &.active > a {\n &,\n &:hover,\n &:focus {\n color: @nav-pills-active-link-hover-color;\n background-color: @nav-pills-active-link-hover-bg;\n }\n }\n }\n}\n\n\n// Stacked pills\n.nav-stacked {\n > li {\n float: none;\n + li {\n margin-top: 2px;\n margin-left: 0; // no need for this gap between nav items\n }\n }\n}\n\n\n// Nav variations\n// --------------------------------------------------\n\n// Justified nav links\n// -------------------------\n\n.nav-justified {\n width: 100%;\n\n > li {\n float: none;\n > a {\n text-align: center;\n margin-bottom: 5px;\n }\n }\n\n > .dropdown .dropdown-menu {\n top: auto;\n left: auto;\n }\n\n @media (min-width: @screen-sm-min) {\n > li {\n display: table-cell;\n width: 1%;\n > a {\n margin-bottom: 0;\n }\n }\n }\n}\n\n// Move borders to anchors instead of bottom of list\n//\n// Mixin for adding on top the shared `.nav-justified` styles for our tabs\n.nav-tabs-justified {\n border-bottom: 0;\n\n > li > a {\n // Override margin from .nav-tabs\n margin-right: 0;\n border-radius: @border-radius-base;\n }\n\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border: 1px solid @nav-tabs-justified-link-border-color;\n }\n\n @media (min-width: @screen-sm-min) {\n > li > a {\n border-bottom: 1px solid @nav-tabs-justified-link-border-color;\n border-radius: @border-radius-base @border-radius-base 0 0;\n }\n > .active > a,\n > .active > a:hover,\n > .active > a:focus {\n border-bottom-color: @nav-tabs-justified-active-link-border-color;\n }\n }\n}\n\n\n// Tabbable tabs\n// -------------------------\n\n// Hide tabbable panes to start, show them when `.active`\n.tab-content {\n > .tab-pane {\n display: none;\n }\n > .active {\n display: block;\n }\n}\n\n\n// Dropdowns\n// -------------------------\n\n// Specific dropdowns\n.nav-tabs .dropdown-menu {\n // make dropdown border overlap tab border\n margin-top: -1px;\n // Remove the top rounded corners here since there is a hard edge above the menu\n .border-top-radius(0);\n}\n","//\n// Navbars\n// --------------------------------------------------\n\n\n// Wrapper and base class\n//\n// Provide a static navbar from which we expand to create full-width, fixed, and\n// other navbar variations.\n\n.navbar {\n position: relative;\n min-height: @navbar-height; // Ensure a navbar always shows (e.g., without a .navbar-brand in collapsed mode)\n margin-bottom: @navbar-margin-bottom;\n border: 1px solid transparent;\n\n // Prevent floats from breaking the navbar\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: @navbar-border-radius;\n }\n}\n\n\n// Navbar heading\n//\n// Groups `.navbar-brand` and `.navbar-toggle` into a single component for easy\n// styling of responsive aspects.\n\n.navbar-header {\n &:extend(.clearfix all);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n }\n}\n\n\n// Navbar collapse (body)\n//\n// Group your navbar content into this for easy collapsing and expanding across\n// various device sizes. By default, this content is collapsed when <768px, but\n// will expand past that for a horizontal display.\n//\n// To start (on mobile devices) the navbar links, forms, and buttons are stacked\n// vertically and include a `max-height` to overflow in case you have too much\n// content for the user's viewport.\n\n.navbar-collapse {\n overflow-x: visible;\n padding-right: @navbar-padding-horizontal;\n padding-left: @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n box-shadow: inset 0 1px 0 rgba(255,255,255,.1);\n &:extend(.clearfix all);\n -webkit-overflow-scrolling: touch;\n\n &.in {\n overflow-y: auto;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border-top: 0;\n box-shadow: none;\n\n &.collapse {\n display: block !important;\n height: auto !important;\n padding-bottom: 0; // Override default setting\n overflow: visible !important;\n }\n\n &.in {\n overflow-y: visible;\n }\n\n // Undo the collapse side padding for navbars with containers to ensure\n // alignment of right-aligned contents.\n .navbar-fixed-top &,\n .navbar-static-top &,\n .navbar-fixed-bottom & {\n padding-left: 0;\n padding-right: 0;\n }\n }\n}\n\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n .navbar-collapse {\n max-height: @navbar-collapse-max-height;\n\n @media (max-device-width: @screen-xs-min) and (orientation: landscape) {\n max-height: 200px;\n }\n }\n}\n\n\n// Both navbar header and collapse\n//\n// When a container is present, change the behavior of the header and collapse.\n\n.container,\n.container-fluid {\n > .navbar-header,\n > .navbar-collapse {\n margin-right: -@navbar-padding-horizontal;\n margin-left: -@navbar-padding-horizontal;\n\n @media (min-width: @grid-float-breakpoint) {\n margin-right: 0;\n margin-left: 0;\n }\n }\n}\n\n\n//\n// Navbar alignment options\n//\n// Display the navbar across the entirety of the page or fixed it to the top or\n// bottom of the page.\n\n// Static top (unfixed, but 100% wide) navbar\n.navbar-static-top {\n z-index: @zindex-navbar;\n border-width: 0 0 1px;\n\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n\n// Fix the top/bottom navbars when screen real estate supports it\n.navbar-fixed-top,\n.navbar-fixed-bottom {\n position: fixed;\n right: 0;\n left: 0;\n z-index: @zindex-navbar-fixed;\n\n // Undo the rounded corners\n @media (min-width: @grid-float-breakpoint) {\n border-radius: 0;\n }\n}\n.navbar-fixed-top {\n top: 0;\n border-width: 0 0 1px;\n}\n.navbar-fixed-bottom {\n bottom: 0;\n margin-bottom: 0; // override .navbar defaults\n border-width: 1px 0 0;\n}\n\n\n// Brand/project name\n\n.navbar-brand {\n float: left;\n padding: @navbar-padding-vertical @navbar-padding-horizontal;\n font-size: @font-size-large;\n line-height: @line-height-computed;\n height: @navbar-height;\n\n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > img {\n display: block;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n .navbar > .container &,\n .navbar > .container-fluid & {\n margin-left: -@navbar-padding-horizontal;\n }\n }\n}\n\n\n// Navbar toggle\n//\n// Custom button for toggling the `.navbar-collapse`, powered by the collapse\n// JavaScript plugin.\n\n.navbar-toggle {\n position: relative;\n float: right;\n margin-right: @navbar-padding-horizontal;\n padding: 9px 10px;\n .navbar-vertical-align(34px);\n background-color: transparent;\n background-image: none; // Reset unusual Firefox-on-Android default style; see https://github.com/necolas/normalize.css/issues/214\n border: 1px solid transparent;\n border-radius: @border-radius-base;\n\n // We remove the `outline` here, but later compensate by attaching `:hover`\n // styles to `:focus`.\n &:focus {\n outline: 0;\n }\n\n // Bars\n .icon-bar {\n display: block;\n width: 22px;\n height: 2px;\n border-radius: 1px;\n }\n .icon-bar + .icon-bar {\n margin-top: 4px;\n }\n\n @media (min-width: @grid-float-breakpoint) {\n display: none;\n }\n}\n\n\n// Navbar nav links\n//\n// Builds on top of the `.nav` components with its own modifier class to make\n// the nav the full height of the horizontal nav (above 768px).\n\n.navbar-nav {\n margin: (@navbar-padding-vertical / 2) -@navbar-padding-horizontal;\n\n > li > a {\n padding-top: 10px;\n padding-bottom: 10px;\n line-height: @line-height-computed;\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n position: static;\n float: none;\n width: auto;\n margin-top: 0;\n background-color: transparent;\n border: 0;\n box-shadow: none;\n > li > a,\n .dropdown-header {\n padding: 5px 15px 5px 25px;\n }\n > li > a {\n line-height: @line-height-computed;\n &:hover,\n &:focus {\n background-image: none;\n }\n }\n }\n }\n\n // Uncollapse the nav\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin: 0;\n\n > li {\n float: left;\n > a {\n padding-top: @navbar-padding-vertical;\n padding-bottom: @navbar-padding-vertical;\n }\n }\n }\n}\n\n\n// Navbar form\n//\n// Extension of the `.form-inline` with some extra flavor for optimum display in\n// our navbars.\n\n.navbar-form {\n margin-left: -@navbar-padding-horizontal;\n margin-right: -@navbar-padding-horizontal;\n padding: 10px @navbar-padding-horizontal;\n border-top: 1px solid transparent;\n border-bottom: 1px solid transparent;\n @shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);\n .box-shadow(@shadow);\n\n // Mixin behavior for optimum display\n .form-inline();\n\n .form-group {\n @media (max-width: @grid-float-breakpoint-max) {\n margin-bottom: 5px;\n\n &:last-child {\n margin-bottom: 0;\n }\n }\n }\n\n // Vertically center in expanded, horizontal navbar\n .navbar-vertical-align(@input-height-base);\n\n // Undo 100% width for pull classes\n @media (min-width: @grid-float-breakpoint) {\n width: auto;\n border: 0;\n margin-left: 0;\n margin-right: 0;\n padding-top: 0;\n padding-bottom: 0;\n .box-shadow(none);\n }\n}\n\n\n// Dropdown menus\n\n// Menu position and menu carets\n.navbar-nav > li > .dropdown-menu {\n margin-top: 0;\n .border-top-radius(0);\n}\n// Menu position and menu caret support for dropups via extra dropup class\n.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {\n margin-bottom: 0;\n .border-top-radius(@navbar-border-radius);\n .border-bottom-radius(0);\n}\n\n\n// Buttons in navbars\n//\n// Vertically center a button within a navbar (when *not* in a form).\n\n.navbar-btn {\n .navbar-vertical-align(@input-height-base);\n\n &.btn-sm {\n .navbar-vertical-align(@input-height-small);\n }\n &.btn-xs {\n .navbar-vertical-align(22);\n }\n}\n\n\n// Text in navbars\n//\n// Add a class to make any element properly align itself vertically within the navbars.\n\n.navbar-text {\n .navbar-vertical-align(@line-height-computed);\n\n @media (min-width: @grid-float-breakpoint) {\n float: left;\n margin-left: @navbar-padding-horizontal;\n margin-right: @navbar-padding-horizontal;\n }\n}\n\n\n// Component alignment\n//\n// Repurpose the pull utilities as their own navbar utilities to avoid specificity\n// issues with parents and chaining. Only do this when the navbar is uncollapsed\n// though so that navbar contents properly stack and align in mobile.\n//\n// Declared after the navbar components to ensure more specificity on the margins.\n\n@media (min-width: @grid-float-breakpoint) {\n .navbar-left { .pull-left(); }\n .navbar-right {\n .pull-right();\n margin-right: -@navbar-padding-horizontal;\n\n ~ .navbar-right {\n margin-right: 0;\n }\n }\n}\n\n\n// Alternate navbars\n// --------------------------------------------------\n\n// Default navbar\n.navbar-default {\n background-color: @navbar-default-bg;\n border-color: @navbar-default-border;\n\n .navbar-brand {\n color: @navbar-default-brand-color;\n &:hover,\n &:focus {\n color: @navbar-default-brand-hover-color;\n background-color: @navbar-default-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-default-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-default-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n\n .navbar-toggle {\n border-color: @navbar-default-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-default-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-default-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: @navbar-default-border;\n }\n\n // Dropdown menu items\n .navbar-nav {\n // Remove background color from open dropdown\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-default-link-active-bg;\n color: @navbar-default-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display when collapsed\n .open .dropdown-menu {\n > li > a {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n background-color: @navbar-default-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-active-color;\n background-color: @navbar-default-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n background-color: @navbar-default-link-disabled-bg;\n }\n }\n }\n }\n }\n\n\n // Links in navbars\n //\n // Add a class to ensure links outside the navbar nav are colored correctly.\n\n .navbar-link {\n color: @navbar-default-link-color;\n &:hover {\n color: @navbar-default-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-default-link-color;\n &:hover,\n &:focus {\n color: @navbar-default-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-default-link-disabled-color;\n }\n }\n }\n}\n\n// Inverse navbar\n\n.navbar-inverse {\n background-color: @navbar-inverse-bg;\n border-color: @navbar-inverse-border;\n\n .navbar-brand {\n color: @navbar-inverse-brand-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-brand-hover-color;\n background-color: @navbar-inverse-brand-hover-bg;\n }\n }\n\n .navbar-text {\n color: @navbar-inverse-color;\n }\n\n .navbar-nav {\n > li > a {\n color: @navbar-inverse-link-color;\n\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n\n // Darken the responsive nav toggle\n .navbar-toggle {\n border-color: @navbar-inverse-toggle-border-color;\n &:hover,\n &:focus {\n background-color: @navbar-inverse-toggle-hover-bg;\n }\n .icon-bar {\n background-color: @navbar-inverse-toggle-icon-bar-bg;\n }\n }\n\n .navbar-collapse,\n .navbar-form {\n border-color: darken(@navbar-inverse-bg, 7%);\n }\n\n // Dropdowns\n .navbar-nav {\n > .open > a {\n &,\n &:hover,\n &:focus {\n background-color: @navbar-inverse-link-active-bg;\n color: @navbar-inverse-link-active-color;\n }\n }\n\n @media (max-width: @grid-float-breakpoint-max) {\n // Dropdowns get custom display\n .open .dropdown-menu {\n > .dropdown-header {\n border-color: @navbar-inverse-border;\n }\n .divider {\n background-color: @navbar-inverse-border;\n }\n > li > a {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n background-color: @navbar-inverse-link-hover-bg;\n }\n }\n > .active > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-active-color;\n background-color: @navbar-inverse-link-active-bg;\n }\n }\n > .disabled > a {\n &,\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n background-color: @navbar-inverse-link-disabled-bg;\n }\n }\n }\n }\n }\n\n .navbar-link {\n color: @navbar-inverse-link-color;\n &:hover {\n color: @navbar-inverse-link-hover-color;\n }\n }\n\n .btn-link {\n color: @navbar-inverse-link-color;\n &:hover,\n &:focus {\n color: @navbar-inverse-link-hover-color;\n }\n &[disabled],\n fieldset[disabled] & {\n &:hover,\n &:focus {\n color: @navbar-inverse-link-disabled-color;\n }\n }\n }\n}\n","// Navbar vertical align\n//\n// Vertically center elements in the navbar.\n// Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin.\n\n.navbar-vertical-align(@element-height) {\n margin-top: ((@navbar-height - @element-height) / 2);\n margin-bottom: ((@navbar-height - @element-height) / 2);\n}\n","//\n// Utility classes\n// --------------------------------------------------\n\n\n// Floats\n// -------------------------\n\n.clearfix {\n .clearfix();\n}\n.center-block {\n .center-block();\n}\n.pull-right {\n float: right !important;\n}\n.pull-left {\n float: left !important;\n}\n\n\n// Toggling content\n// -------------------------\n\n// Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1\n.hide {\n display: none !important;\n}\n.show {\n display: block !important;\n}\n.invisible {\n visibility: hidden;\n}\n.text-hide {\n .text-hide();\n}\n\n\n// Hide from screenreaders and browsers\n//\n// Credit: HTML5 Boilerplate\n\n.hidden {\n display: none !important;\n}\n\n\n// For Affix plugin\n// -------------------------\n\n.affix {\n position: fixed;\n}\n","//\n// Breadcrumbs\n// --------------------------------------------------\n\n\n.breadcrumb {\n padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal;\n margin-bottom: @line-height-computed;\n list-style: none;\n background-color: @breadcrumb-bg;\n border-radius: @border-radius-base;\n\n > li {\n display: inline-block;\n\n + li:before {\n content: \"@{breadcrumb-separator}\\00a0\"; // Unicode space added since inline-block means non-collapsing white-space\n padding: 0 5px;\n color: @breadcrumb-color;\n }\n }\n\n > .active {\n color: @breadcrumb-active-color;\n }\n}\n","//\n// Pagination (multiple pages)\n// --------------------------------------------------\n.pagination {\n display: inline-block;\n padding-left: 0;\n margin: @line-height-computed 0;\n border-radius: @border-radius-base;\n\n > li {\n display: inline; // Remove list-style and block-level defaults\n > a,\n > span {\n position: relative;\n float: left; // Collapse white-space\n padding: @padding-base-vertical @padding-base-horizontal;\n line-height: @line-height-base;\n text-decoration: none;\n color: @pagination-color;\n background-color: @pagination-bg;\n border: 1px solid @pagination-border;\n margin-left: -1px;\n }\n &:first-child {\n > a,\n > span {\n margin-left: 0;\n .border-left-radius(@border-radius-base);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius-base);\n }\n }\n }\n\n > li > a,\n > li > span {\n &:hover,\n &:focus {\n z-index: 2;\n color: @pagination-hover-color;\n background-color: @pagination-hover-bg;\n border-color: @pagination-hover-border;\n }\n }\n\n > .active > a,\n > .active > span {\n &,\n &:hover,\n &:focus {\n z-index: 3;\n color: @pagination-active-color;\n background-color: @pagination-active-bg;\n border-color: @pagination-active-border;\n cursor: default;\n }\n }\n\n > .disabled {\n > span,\n > span:hover,\n > span:focus,\n > a,\n > a:hover,\n > a:focus {\n color: @pagination-disabled-color;\n background-color: @pagination-disabled-bg;\n border-color: @pagination-disabled-border;\n cursor: @cursor-disabled;\n }\n }\n}\n\n// Sizing\n// --------------------------------------------------\n\n// Large\n.pagination-lg {\n .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @line-height-large; @border-radius-large);\n}\n\n// Small\n.pagination-sm {\n .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @line-height-small; @border-radius-small);\n}\n","// Pagination\n\n.pagination-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) {\n > li {\n > a,\n > span {\n padding: @padding-vertical @padding-horizontal;\n font-size: @font-size;\n line-height: @line-height;\n }\n &:first-child {\n > a,\n > span {\n .border-left-radius(@border-radius);\n }\n }\n &:last-child {\n > a,\n > span {\n .border-right-radius(@border-radius);\n }\n }\n }\n}\n","//\n// Pager pagination\n// --------------------------------------------------\n\n\n.pager {\n padding-left: 0;\n margin: @line-height-computed 0;\n list-style: none;\n text-align: center;\n &:extend(.clearfix all);\n li {\n display: inline;\n > a,\n > span {\n display: inline-block;\n padding: 5px 14px;\n background-color: @pager-bg;\n border: 1px solid @pager-border;\n border-radius: @pager-border-radius;\n }\n\n > a:hover,\n > a:focus {\n text-decoration: none;\n background-color: @pager-hover-bg;\n }\n }\n\n .next {\n > a,\n > span {\n float: right;\n }\n }\n\n .previous {\n > a,\n > span {\n float: left;\n }\n }\n\n .disabled {\n > a,\n > a:hover,\n > a:focus,\n > span {\n color: @pager-disabled-color;\n background-color: @pager-bg;\n cursor: @cursor-disabled;\n }\n }\n}\n","//\n// Labels\n// --------------------------------------------------\n\n.label {\n display: inline;\n padding: .2em .6em .3em;\n font-size: 75%;\n font-weight: bold;\n line-height: 1;\n color: @label-color;\n text-align: center;\n white-space: nowrap;\n vertical-align: baseline;\n border-radius: .25em;\n\n // Add hover effects, but only for links\n a& {\n &:hover,\n &:focus {\n color: @label-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Empty labels collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for labels in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n}\n\n// Colors\n// Contextual variations (linked labels get darker on :hover)\n\n.label-default {\n .label-variant(@label-default-bg);\n}\n\n.label-primary {\n .label-variant(@label-primary-bg);\n}\n\n.label-success {\n .label-variant(@label-success-bg);\n}\n\n.label-info {\n .label-variant(@label-info-bg);\n}\n\n.label-warning {\n .label-variant(@label-warning-bg);\n}\n\n.label-danger {\n .label-variant(@label-danger-bg);\n}\n","// Labels\n\n.label-variant(@color) {\n background-color: @color;\n\n &[href] {\n &:hover,\n &:focus {\n background-color: darken(@color, 10%);\n }\n }\n}\n","//\n// Badges\n// --------------------------------------------------\n\n\n// Base class\n.badge {\n display: inline-block;\n min-width: 10px;\n padding: 3px 7px;\n font-size: @font-size-small;\n font-weight: @badge-font-weight;\n color: @badge-color;\n line-height: @badge-line-height;\n vertical-align: middle;\n white-space: nowrap;\n text-align: center;\n background-color: @badge-bg;\n border-radius: @badge-border-radius;\n\n // Empty badges collapse automatically (not available in IE8)\n &:empty {\n display: none;\n }\n\n // Quick fix for badges in buttons\n .btn & {\n position: relative;\n top: -1px;\n }\n\n .btn-xs &,\n .btn-group-xs > .btn & {\n top: 0;\n padding: 1px 5px;\n }\n\n // Hover state, but only for links\n a& {\n &:hover,\n &:focus {\n color: @badge-link-hover-color;\n text-decoration: none;\n cursor: pointer;\n }\n }\n\n // Account for badges in navs\n .list-group-item.active > &,\n .nav-pills > .active > a > & {\n color: @badge-active-color;\n background-color: @badge-active-bg;\n }\n\n .list-group-item > & {\n float: right;\n }\n\n .list-group-item > & + & {\n margin-right: 5px;\n }\n\n .nav-pills > li > a > & {\n margin-left: 3px;\n }\n}\n","//\n// Jumbotron\n// --------------------------------------------------\n\n\n.jumbotron {\n padding-top: @jumbotron-padding;\n padding-bottom: @jumbotron-padding;\n margin-bottom: @jumbotron-padding;\n color: @jumbotron-color;\n background-color: @jumbotron-bg;\n\n h1,\n .h1 {\n color: @jumbotron-heading-color;\n }\n\n p {\n margin-bottom: (@jumbotron-padding / 2);\n font-size: @jumbotron-font-size;\n font-weight: 200;\n }\n\n > hr {\n border-top-color: darken(@jumbotron-bg, 10%);\n }\n\n .container &,\n .container-fluid & {\n border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container\n padding-left: (@grid-gutter-width / 2);\n padding-right: (@grid-gutter-width / 2);\n }\n\n .container {\n max-width: 100%;\n }\n\n @media screen and (min-width: @screen-sm-min) {\n padding-top: (@jumbotron-padding * 1.6);\n padding-bottom: (@jumbotron-padding * 1.6);\n\n .container &,\n .container-fluid & {\n padding-left: (@jumbotron-padding * 2);\n padding-right: (@jumbotron-padding * 2);\n }\n\n h1,\n .h1 {\n font-size: @jumbotron-heading-font-size;\n }\n }\n}\n","//\n// Thumbnails\n// --------------------------------------------------\n\n\n// Mixin and adjust the regular image class\n.thumbnail {\n display: block;\n padding: @thumbnail-padding;\n margin-bottom: @line-height-computed;\n line-height: @line-height-base;\n background-color: @thumbnail-bg;\n border: 1px solid @thumbnail-border;\n border-radius: @thumbnail-border-radius;\n .transition(border .2s ease-in-out);\n\n > img,\n a > img {\n &:extend(.img-responsive);\n margin-left: auto;\n margin-right: auto;\n }\n\n // Add a hover state for linked versions only\n a&:hover,\n a&:focus,\n a&.active {\n border-color: @link-color;\n }\n\n // Image captions\n .caption {\n padding: @thumbnail-caption-padding;\n color: @thumbnail-caption-color;\n }\n}\n","//\n// Alerts\n// --------------------------------------------------\n\n\n// Base styles\n// -------------------------\n\n.alert {\n padding: @alert-padding;\n margin-bottom: @line-height-computed;\n border: 1px solid transparent;\n border-radius: @alert-border-radius;\n\n // Headings for larger alerts\n h4 {\n margin-top: 0;\n // Specified for the h4 to prevent conflicts of changing @headings-color\n color: inherit;\n }\n\n // Provide class for links that match alerts\n .alert-link {\n font-weight: @alert-link-font-weight;\n }\n\n // Improve alignment and spacing of inner content\n > p,\n > ul {\n margin-bottom: 0;\n }\n\n > p + p {\n margin-top: 5px;\n }\n}\n\n// Dismissible alerts\n//\n// Expand the right padding and account for the close button's positioning.\n\n.alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0.\n.alert-dismissible {\n padding-right: (@alert-padding + 20);\n\n // Adjust close link position\n .close {\n position: relative;\n top: -2px;\n right: -21px;\n color: inherit;\n }\n}\n\n// Alternate styles\n//\n// Generate contextual modifier classes for colorizing the alert.\n\n.alert-success {\n .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text);\n}\n\n.alert-info {\n .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text);\n}\n\n.alert-warning {\n .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text);\n}\n\n.alert-danger {\n .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text);\n}\n","// Alerts\n\n.alert-variant(@background; @border; @text-color) {\n background-color: @background;\n border-color: @border;\n color: @text-color;\n\n hr {\n border-top-color: darken(@border, 5%);\n }\n .alert-link {\n color: darken(@text-color, 10%);\n }\n}\n","//\n// Progress bars\n// --------------------------------------------------\n\n\n// Bar animations\n// -------------------------\n\n// WebKit\n@-webkit-keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n// Spec and IE10+\n@keyframes progress-bar-stripes {\n from { background-position: 40px 0; }\n to { background-position: 0 0; }\n}\n\n\n// Bar itself\n// -------------------------\n\n// Outer container\n.progress {\n overflow: hidden;\n height: @line-height-computed;\n margin-bottom: @line-height-computed;\n background-color: @progress-bg;\n border-radius: @progress-border-radius;\n .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));\n}\n\n// Bar of progress\n.progress-bar {\n float: left;\n width: 0%;\n height: 100%;\n font-size: @font-size-small;\n line-height: @line-height-computed;\n color: @progress-bar-color;\n text-align: center;\n background-color: @progress-bar-bg;\n .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15));\n .transition(width .6s ease);\n}\n\n// Striped bars\n//\n// `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar-striped` class, which you just add to an existing\n// `.progress-bar`.\n.progress-striped .progress-bar,\n.progress-bar-striped {\n #gradient > .striped();\n background-size: 40px 40px;\n}\n\n// Call animation for the active one\n//\n// `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the\n// `.progress-bar.active` approach.\n.progress.active .progress-bar,\n.progress-bar.active {\n .animation(progress-bar-stripes 2s linear infinite);\n}\n\n\n// Variations\n// -------------------------\n\n.progress-bar-success {\n .progress-bar-variant(@progress-bar-success-bg);\n}\n\n.progress-bar-info {\n .progress-bar-variant(@progress-bar-info-bg);\n}\n\n.progress-bar-warning {\n .progress-bar-variant(@progress-bar-warning-bg);\n}\n\n.progress-bar-danger {\n .progress-bar-variant(@progress-bar-danger-bg);\n}\n","// Gradients\n\n#gradient {\n\n // Horizontal gradient, from left to right\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .horizontal(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(left, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to right, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n // Vertical gradient, from top to bottom\n //\n // Creates two color stops, start and end, by specifying a color and position for each color stop.\n // Color stops are not available in IE9 and below.\n .vertical(@start-color: #555; @end-color: #333; @start-percent: 0%; @end-percent: 100%) {\n background-image: -webkit-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(top, @start-color @start-percent, @end-color @end-percent); // Opera 12\n background-image: linear-gradient(to bottom, @start-color @start-percent, @end-color @end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n background-repeat: repeat-x;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down\n }\n\n .directional(@start-color: #555; @end-color: #333; @deg: 45deg) {\n background-repeat: repeat-x;\n background-image: -webkit-linear-gradient(@deg, @start-color, @end-color); // Safari 5.1-6, Chrome 10+\n background-image: -o-linear-gradient(@deg, @start-color, @end-color); // Opera 12\n background-image: linear-gradient(@deg, @start-color, @end-color); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+\n }\n .horizontal-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(left, @start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(to right, @start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .vertical-three-colors(@start-color: #00b3ee; @mid-color: #7a43b6; @color-stop: 50%; @end-color: #c3325f) {\n background-image: -webkit-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: -o-linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-image: linear-gradient(@start-color, @mid-color @color-stop, @end-color);\n background-repeat: no-repeat;\n filter: e(%(\"progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)\",argb(@start-color),argb(@end-color))); // IE9 and down, gets no color-stop at all for proper fallback\n }\n .radial(@inner-color: #555; @outer-color: #333) {\n background-image: -webkit-radial-gradient(circle, @inner-color, @outer-color);\n background-image: radial-gradient(circle, @inner-color, @outer-color);\n background-repeat: no-repeat;\n }\n .striped(@color: rgba(255,255,255,.15); @angle: 45deg) {\n background-image: -webkit-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: -o-linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n background-image: linear-gradient(@angle, @color 25%, transparent 25%, transparent 50%, @color 50%, @color 75%, transparent 75%, transparent);\n }\n}\n","// Progress bars\n\n.progress-bar-variant(@color) {\n background-color: @color;\n\n // Deprecated parent class requirement as of v3.2.0\n .progress-striped & {\n #gradient > .striped();\n }\n}\n",".media {\n // Proper spacing between instances of .media\n margin-top: 15px;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n.media,\n.media-body {\n zoom: 1;\n overflow: hidden;\n}\n\n.media-body {\n width: 10000px;\n}\n\n.media-object {\n display: block;\n\n // Fix collapse in webkit from max-width: 100% and display: table-cell.\n &.img-thumbnail {\n max-width: none;\n }\n}\n\n.media-right,\n.media > .pull-right {\n padding-left: 10px;\n}\n\n.media-left,\n.media > .pull-left {\n padding-right: 10px;\n}\n\n.media-left,\n.media-right,\n.media-body {\n display: table-cell;\n vertical-align: top;\n}\n\n.media-middle {\n vertical-align: middle;\n}\n\n.media-bottom {\n vertical-align: bottom;\n}\n\n// Reset margins on headings for tighter default spacing\n.media-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n\n// Media list variation\n//\n// Undo default ul/ol styles\n.media-list {\n padding-left: 0;\n list-style: none;\n}\n","//\n// List groups\n// --------------------------------------------------\n\n\n// Base class\n//\n// Easily usable on <ul>, <ol>, or <div>.\n\n.list-group {\n // No need to set list-style: none; since .list-group-item is block level\n margin-bottom: 20px;\n padding-left: 0; // reset padding because ul and ol\n}\n\n\n// Individual list items\n//\n// Use on `li`s or `div`s within the `.list-group` parent.\n\n.list-group-item {\n position: relative;\n display: block;\n padding: 10px 15px;\n // Place the border on the list items and negative margin up for better styling\n margin-bottom: -1px;\n background-color: @list-group-bg;\n border: 1px solid @list-group-border;\n\n // Round the first and last items\n &:first-child {\n .border-top-radius(@list-group-border-radius);\n }\n &:last-child {\n margin-bottom: 0;\n .border-bottom-radius(@list-group-border-radius);\n }\n}\n\n\n// Interactive list items\n//\n// Use anchor or button elements instead of `li`s or `div`s to create interactive items.\n// Includes an extra `.active` modifier class for showing selected items.\n\na.list-group-item,\nbutton.list-group-item {\n color: @list-group-link-color;\n\n .list-group-item-heading {\n color: @list-group-link-heading-color;\n }\n\n // Hover state\n &:hover,\n &:focus {\n text-decoration: none;\n color: @list-group-link-hover-color;\n background-color: @list-group-hover-bg;\n }\n}\n\nbutton.list-group-item {\n width: 100%;\n text-align: left;\n}\n\n.list-group-item {\n // Disabled state\n &.disabled,\n &.disabled:hover,\n &.disabled:focus {\n background-color: @list-group-disabled-bg;\n color: @list-group-disabled-color;\n cursor: @cursor-disabled;\n\n // Force color to inherit for custom content\n .list-group-item-heading {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-disabled-text-color;\n }\n }\n\n // Active class on item itself, not parent\n &.active,\n &.active:hover,\n &.active:focus {\n z-index: 2; // Place active items above their siblings for proper border styling\n color: @list-group-active-color;\n background-color: @list-group-active-bg;\n border-color: @list-group-active-border;\n\n // Force color to inherit for custom content\n .list-group-item-heading,\n .list-group-item-heading > small,\n .list-group-item-heading > .small {\n color: inherit;\n }\n .list-group-item-text {\n color: @list-group-active-text-color;\n }\n }\n}\n\n\n// Contextual variants\n//\n// Add modifier classes to change text and background color on individual items.\n// Organizationally, this must come after the `:hover` states.\n\n.list-group-item-variant(success; @state-success-bg; @state-success-text);\n.list-group-item-variant(info; @state-info-bg; @state-info-text);\n.list-group-item-variant(warning; @state-warning-bg; @state-warning-text);\n.list-group-item-variant(danger; @state-danger-bg; @state-danger-text);\n\n\n// Custom content options\n//\n// Extra classes for creating well-formatted content within `.list-group-item`s.\n\n.list-group-item-heading {\n margin-top: 0;\n margin-bottom: 5px;\n}\n.list-group-item-text {\n margin-bottom: 0;\n line-height: 1.3;\n}\n","// List Groups\n\n.list-group-item-variant(@state; @background; @color) {\n .list-group-item-@{state} {\n color: @color;\n background-color: @background;\n\n a&,\n button& {\n color: @color;\n\n .list-group-item-heading {\n color: inherit;\n }\n\n &:hover,\n &:focus {\n color: @color;\n background-color: darken(@background, 5%);\n }\n &.active,\n &.active:hover,\n &.active:focus {\n color: #fff;\n background-color: @color;\n border-color: @color;\n }\n }\n }\n}\n","//\n// Panels\n// --------------------------------------------------\n\n\n// Base class\n.panel {\n margin-bottom: @line-height-computed;\n background-color: @panel-bg;\n border: 1px solid transparent;\n border-radius: @panel-border-radius;\n .box-shadow(0 1px 1px rgba(0,0,0,.05));\n}\n\n// Panel contents\n.panel-body {\n padding: @panel-body-padding;\n &:extend(.clearfix all);\n}\n\n// Optional heading\n.panel-heading {\n padding: @panel-heading-padding;\n border-bottom: 1px solid transparent;\n .border-top-radius((@panel-border-radius - 1));\n\n > .dropdown .dropdown-toggle {\n color: inherit;\n }\n}\n\n// Within heading, strip any `h*` tag of its default margins for spacing.\n.panel-title {\n margin-top: 0;\n margin-bottom: 0;\n font-size: ceil((@font-size-base * 1.125));\n color: inherit;\n\n > a,\n > small,\n > .small,\n > small > a,\n > .small > a {\n color: inherit;\n }\n}\n\n// Optional footer (stays gray in every modifier class)\n.panel-footer {\n padding: @panel-footer-padding;\n background-color: @panel-footer-bg;\n border-top: 1px solid @panel-inner-border;\n .border-bottom-radius((@panel-border-radius - 1));\n}\n\n\n// List groups in panels\n//\n// By default, space out list group content from panel headings to account for\n// any kind of custom content between the two.\n\n.panel {\n > .list-group,\n > .panel-collapse > .list-group {\n margin-bottom: 0;\n\n .list-group-item {\n border-width: 1px 0;\n border-radius: 0;\n }\n\n // Add border top radius for first one\n &:first-child {\n .list-group-item:first-child {\n border-top: 0;\n .border-top-radius((@panel-border-radius - 1));\n }\n }\n\n // Add border bottom radius for last one\n &:last-child {\n .list-group-item:last-child {\n border-bottom: 0;\n .border-bottom-radius((@panel-border-radius - 1));\n }\n }\n }\n > .panel-heading + .panel-collapse > .list-group {\n .list-group-item:first-child {\n .border-top-radius(0);\n }\n }\n}\n// Collapse space between when there's no additional content.\n.panel-heading + .list-group {\n .list-group-item:first-child {\n border-top-width: 0;\n }\n}\n.list-group + .panel-footer {\n border-top-width: 0;\n}\n\n// Tables in panels\n//\n// Place a non-bordered `.table` within a panel (not within a `.panel-body`) and\n// watch it go full width.\n\n.panel {\n > .table,\n > .table-responsive > .table,\n > .panel-collapse > .table {\n margin-bottom: 0;\n\n caption {\n padding-left: @panel-body-padding;\n padding-right: @panel-body-padding;\n }\n }\n // Add border top radius for first one\n > .table:first-child,\n > .table-responsive:first-child > .table:first-child {\n .border-top-radius((@panel-border-radius - 1));\n\n > thead:first-child,\n > tbody:first-child {\n > tr:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n border-top-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-top-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-top-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n // Add border bottom radius for last one\n > .table:last-child,\n > .table-responsive:last-child > .table:last-child {\n .border-bottom-radius((@panel-border-radius - 1));\n\n > tbody:last-child,\n > tfoot:last-child {\n > tr:last-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n border-bottom-right-radius: (@panel-border-radius - 1);\n\n td:first-child,\n th:first-child {\n border-bottom-left-radius: (@panel-border-radius - 1);\n }\n td:last-child,\n th:last-child {\n border-bottom-right-radius: (@panel-border-radius - 1);\n }\n }\n }\n }\n > .panel-body + .table,\n > .panel-body + .table-responsive,\n > .table + .panel-body,\n > .table-responsive + .panel-body {\n border-top: 1px solid @table-border-color;\n }\n > .table > tbody:first-child > tr:first-child th,\n > .table > tbody:first-child > tr:first-child td {\n border-top: 0;\n }\n > .table-bordered,\n > .table-responsive > .table-bordered {\n border: 0;\n > thead,\n > tbody,\n > tfoot {\n > tr {\n > th:first-child,\n > td:first-child {\n border-left: 0;\n }\n > th:last-child,\n > td:last-child {\n border-right: 0;\n }\n }\n }\n > thead,\n > tbody {\n > tr:first-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n > tbody,\n > tfoot {\n > tr:last-child {\n > td,\n > th {\n border-bottom: 0;\n }\n }\n }\n }\n > .table-responsive {\n border: 0;\n margin-bottom: 0;\n }\n}\n\n\n// Collapsible panels (aka, accordion)\n//\n// Wrap a series of panels in `.panel-group` to turn them into an accordion with\n// the help of our collapse JavaScript plugin.\n\n.panel-group {\n margin-bottom: @line-height-computed;\n\n // Tighten up margin so it's only between panels\n .panel {\n margin-bottom: 0;\n border-radius: @panel-border-radius;\n\n + .panel {\n margin-top: 5px;\n }\n }\n\n .panel-heading {\n border-bottom: 0;\n\n + .panel-collapse > .panel-body,\n + .panel-collapse > .list-group {\n border-top: 1px solid @panel-inner-border;\n }\n }\n\n .panel-footer {\n border-top: 0;\n + .panel-collapse .panel-body {\n border-bottom: 1px solid @panel-inner-border;\n }\n }\n}\n\n\n// Contextual variations\n.panel-default {\n .panel-variant(@panel-default-border; @panel-default-text; @panel-default-heading-bg; @panel-default-border);\n}\n.panel-primary {\n .panel-variant(@panel-primary-border; @panel-primary-text; @panel-primary-heading-bg; @panel-primary-border);\n}\n.panel-success {\n .panel-variant(@panel-success-border; @panel-success-text; @panel-success-heading-bg; @panel-success-border);\n}\n.panel-info {\n .panel-variant(@panel-info-border; @panel-info-text; @panel-info-heading-bg; @panel-info-border);\n}\n.panel-warning {\n .panel-variant(@panel-warning-border; @panel-warning-text; @panel-warning-heading-bg; @panel-warning-border);\n}\n.panel-danger {\n .panel-variant(@panel-danger-border; @panel-danger-text; @panel-danger-heading-bg; @panel-danger-border);\n}\n","// Panels\n\n.panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) {\n border-color: @border;\n\n & > .panel-heading {\n color: @heading-text-color;\n background-color: @heading-bg-color;\n border-color: @heading-border;\n\n + .panel-collapse > .panel-body {\n border-top-color: @border;\n }\n .badge {\n color: @heading-bg-color;\n background-color: @heading-text-color;\n }\n }\n & > .panel-footer {\n + .panel-collapse > .panel-body {\n border-bottom-color: @border;\n }\n }\n}\n","// Embeds responsive\n//\n// Credit: Nicolas Gallagher and SUIT CSS.\n\n.embed-responsive {\n position: relative;\n display: block;\n height: 0;\n padding: 0;\n overflow: hidden;\n\n .embed-responsive-item,\n iframe,\n embed,\n object,\n video {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n height: 100%;\n width: 100%;\n border: 0;\n }\n}\n\n// Modifier class for 16:9 aspect ratio\n.embed-responsive-16by9 {\n padding-bottom: 56.25%;\n}\n\n// Modifier class for 4:3 aspect ratio\n.embed-responsive-4by3 {\n padding-bottom: 75%;\n}\n","//\n// Wells\n// --------------------------------------------------\n\n\n// Base class\n.well {\n min-height: 20px;\n padding: 19px;\n margin-bottom: 20px;\n background-color: @well-bg;\n border: 1px solid @well-border;\n border-radius: @border-radius-base;\n .box-shadow(inset 0 1px 1px rgba(0,0,0,.05));\n blockquote {\n border-color: #ddd;\n border-color: rgba(0,0,0,.15);\n }\n}\n\n// Sizes\n.well-lg {\n padding: 24px;\n border-radius: @border-radius-large;\n}\n.well-sm {\n padding: 9px;\n border-radius: @border-radius-small;\n}\n","//\n// Close icons\n// --------------------------------------------------\n\n\n.close {\n float: right;\n font-size: (@font-size-base * 1.5);\n font-weight: @close-font-weight;\n line-height: 1;\n color: @close-color;\n text-shadow: @close-text-shadow;\n .opacity(.2);\n\n &:hover,\n &:focus {\n color: @close-color;\n text-decoration: none;\n cursor: pointer;\n .opacity(.5);\n }\n\n // Additional properties for button version\n // iOS requires the button element instead of an anchor tag.\n // If you want the anchor version, it requires `href=\"#\"`.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile\n button& {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n }\n}\n","//\n// Modals\n// --------------------------------------------------\n\n// .modal-open - body class for killing the scroll\n// .modal - container to scroll within\n// .modal-dialog - positioning shell for the actual modal\n// .modal-content - actual modal w/ bg and corners and shit\n\n// Kill the scroll on the body\n.modal-open {\n overflow: hidden;\n}\n\n// Container that the modal scrolls within\n.modal {\n display: none;\n overflow: hidden;\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal;\n -webkit-overflow-scrolling: touch;\n\n // Prevent Chrome on Windows from adding a focus outline. For details, see\n // https://github.com/twbs/bootstrap/pull/10951.\n outline: 0;\n\n // When fading in the modal, animate it to slide down\n &.fade .modal-dialog {\n .translate(0, -25%);\n .transition-transform(~\"0.3s ease-out\");\n }\n &.in .modal-dialog { .translate(0, 0) }\n}\n.modal-open .modal {\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n// Shell div to position the modal with bottom padding\n.modal-dialog {\n position: relative;\n width: auto;\n margin: 10px;\n}\n\n// Actual modal\n.modal-content {\n position: relative;\n background-color: @modal-content-bg;\n border: 1px solid @modal-content-fallback-border-color; //old browsers fallback (ie8 etc)\n border: 1px solid @modal-content-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 3px 9px rgba(0,0,0,.5));\n background-clip: padding-box;\n // Remove focus outline from opened modal\n outline: 0;\n}\n\n// Modal background\n.modal-backdrop {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: @zindex-modal-background;\n background-color: @modal-backdrop-bg;\n // Fade for backdrop\n &.fade { .opacity(0); }\n &.in { .opacity(@modal-backdrop-opacity); }\n}\n\n// Modal header\n// Top section of the modal w/ title and dismiss\n.modal-header {\n padding: @modal-title-padding;\n border-bottom: 1px solid @modal-header-border-color;\n &:extend(.clearfix all);\n}\n// Close icon\n.modal-header .close {\n margin-top: -2px;\n}\n\n// Title text within header\n.modal-title {\n margin: 0;\n line-height: @modal-title-line-height;\n}\n\n// Modal body\n// Where all modal content resides (sibling of .modal-header and .modal-footer)\n.modal-body {\n position: relative;\n padding: @modal-inner-padding;\n}\n\n// Footer (for actions)\n.modal-footer {\n padding: @modal-inner-padding;\n text-align: right; // right align buttons\n border-top: 1px solid @modal-footer-border-color;\n &:extend(.clearfix all); // clear it in case folks use .pull-* classes on buttons\n\n // Properly space out buttons\n .btn + .btn {\n margin-left: 5px;\n margin-bottom: 0; // account for input[type=\"submit\"] which gets the bottom margin like all other inputs\n }\n // but override that for button groups\n .btn-group .btn + .btn {\n margin-left: -1px;\n }\n // and override it for block buttons as well\n .btn-block + .btn-block {\n margin-left: 0;\n }\n}\n\n// Measure scrollbar width for padding body during modal show/hide\n.modal-scrollbar-measure {\n position: absolute;\n top: -9999px;\n width: 50px;\n height: 50px;\n overflow: scroll;\n}\n\n// Scale up the modal\n@media (min-width: @screen-sm-min) {\n // Automatically set modal's width for larger viewports\n .modal-dialog {\n width: @modal-md;\n margin: 30px auto;\n }\n .modal-content {\n .box-shadow(0 5px 15px rgba(0,0,0,.5));\n }\n\n // Modal sizes\n .modal-sm { width: @modal-sm; }\n}\n\n@media (min-width: @screen-md-min) {\n .modal-lg { width: @modal-lg; }\n}\n","//\n// Tooltips\n// --------------------------------------------------\n\n\n// Base class\n.tooltip {\n position: absolute;\n z-index: @zindex-tooltip;\n display: block;\n // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-small;\n\n .opacity(0);\n\n &.in { .opacity(@tooltip-opacity); }\n &.top { margin-top: -3px; padding: @tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 @tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: @tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 @tooltip-arrow-width; }\n}\n\n// Wrapper for the tooltip content\n.tooltip-inner {\n max-width: @tooltip-max-width;\n padding: 3px 8px;\n color: @tooltip-color;\n text-align: center;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n}\n\n// Arrows\n.tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n// Note: Deprecated .top-left, .top-right, .bottom-left, and .bottom-right as of v3.3.1\n.tooltip {\n &.top .tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-left .tooltip-arrow {\n bottom: 0;\n right: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.top-right .tooltip-arrow {\n bottom: 0;\n left: @tooltip-arrow-width;\n margin-bottom: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n &.right .tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;\n border-right-color: @tooltip-arrow-color;\n }\n &.left .tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-left-color: @tooltip-arrow-color;\n }\n &.bottom .tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-left .tooltip-arrow {\n top: 0;\n right: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n &.bottom-right .tooltip-arrow {\n top: 0;\n left: @tooltip-arrow-width;\n margin-top: -@tooltip-arrow-width;\n border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;\n border-bottom-color: @tooltip-arrow-color;\n }\n}\n",".reset-text() {\n font-family: @font-family-base;\n // We deliberately do NOT reset font-size.\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n line-break: auto;\n line-height: @line-height-base;\n text-align: left; // Fallback for where `start` is not supported\n text-align: start;\n text-decoration: none;\n text-shadow: none;\n text-transform: none;\n white-space: normal;\n word-break: normal;\n word-spacing: normal;\n word-wrap: normal;\n}\n","//\n// Popovers\n// --------------------------------------------------\n\n\n.popover {\n position: absolute;\n top: 0;\n left: 0;\n z-index: @zindex-popover;\n display: none;\n max-width: @popover-max-width;\n padding: 1px;\n // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n .reset-text();\n font-size: @font-size-base;\n\n background-color: @popover-bg;\n background-clip: padding-box;\n border: 1px solid @popover-fallback-border-color;\n border: 1px solid @popover-border-color;\n border-radius: @border-radius-large;\n .box-shadow(0 5px 10px rgba(0,0,0,.2));\n\n // Offset the popover to account for the popover arrow\n &.top { margin-top: -@popover-arrow-width; }\n &.right { margin-left: @popover-arrow-width; }\n &.bottom { margin-top: @popover-arrow-width; }\n &.left { margin-left: -@popover-arrow-width; }\n}\n\n.popover-title {\n margin: 0; // reset heading margin\n padding: 8px 14px;\n font-size: @font-size-base;\n background-color: @popover-title-bg;\n border-bottom: 1px solid darken(@popover-title-bg, 5%);\n border-radius: (@border-radius-large - 1) (@border-radius-large - 1) 0 0;\n}\n\n.popover-content {\n padding: 9px 14px;\n}\n\n// Arrows\n//\n// .arrow is outer, .arrow:after is inner\n\n.popover > .arrow {\n &,\n &:after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n}\n.popover > .arrow {\n border-width: @popover-arrow-outer-width;\n}\n.popover > .arrow:after {\n border-width: @popover-arrow-width;\n content: \"\";\n}\n\n.popover {\n &.top > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-top-color: @popover-arrow-outer-color;\n bottom: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n bottom: 1px;\n margin-left: -@popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: @popover-arrow-color;\n }\n }\n &.right > .arrow {\n top: 50%;\n left: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-right-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n left: 1px;\n bottom: -@popover-arrow-width;\n border-left-width: 0;\n border-right-color: @popover-arrow-color;\n }\n }\n &.bottom > .arrow {\n left: 50%;\n margin-left: -@popover-arrow-outer-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-bottom-color: @popover-arrow-outer-color;\n top: -@popover-arrow-outer-width;\n &:after {\n content: \" \";\n top: 1px;\n margin-left: -@popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: @popover-arrow-color;\n }\n }\n\n &.left > .arrow {\n top: 50%;\n right: -@popover-arrow-outer-width;\n margin-top: -@popover-arrow-outer-width;\n border-right-width: 0;\n border-left-color: @popover-arrow-outer-fallback-color; // IE8 fallback\n border-left-color: @popover-arrow-outer-color;\n &:after {\n content: \" \";\n right: 1px;\n border-right-width: 0;\n border-left-color: @popover-arrow-color;\n bottom: -@popover-arrow-width;\n }\n }\n}\n","//\n// Carousel\n// --------------------------------------------------\n\n\n// Wrapper for the slide container and indicators\n.carousel {\n position: relative;\n}\n\n.carousel-inner {\n position: relative;\n overflow: hidden;\n width: 100%;\n\n > .item {\n display: none;\n position: relative;\n .transition(.6s ease-in-out left);\n\n // Account for jankitude on images\n > img,\n > a > img {\n &:extend(.img-responsive);\n line-height: 1;\n }\n\n // WebKit CSS3 transforms for supported devices\n @media all and (transform-3d), (-webkit-transform-3d) {\n .transition-transform(~'0.6s ease-in-out');\n .backface-visibility(~'hidden');\n .perspective(1000px);\n\n &.next,\n &.active.right {\n .translate3d(100%, 0, 0);\n left: 0;\n }\n &.prev,\n &.active.left {\n .translate3d(-100%, 0, 0);\n left: 0;\n }\n &.next.left,\n &.prev.right,\n &.active {\n .translate3d(0, 0, 0);\n left: 0;\n }\n }\n }\n\n > .active,\n > .next,\n > .prev {\n display: block;\n }\n\n > .active {\n left: 0;\n }\n\n > .next,\n > .prev {\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n > .next {\n left: 100%;\n }\n > .prev {\n left: -100%;\n }\n > .next.left,\n > .prev.right {\n left: 0;\n }\n\n > .active.left {\n left: -100%;\n }\n > .active.right {\n left: 100%;\n }\n\n}\n\n// Left/right controls for nav\n// ---------------------------\n\n.carousel-control {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: @carousel-control-width;\n .opacity(@carousel-control-opacity);\n font-size: @carousel-control-font-size;\n color: @carousel-control-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n background-color: rgba(0, 0, 0, 0); // Fix IE9 click-thru bug\n // We can't have this transition here because WebKit cancels the carousel\n // animation if you trip this while in the middle of another animation.\n\n // Set gradients for backgrounds\n &.left {\n #gradient > .horizontal(@start-color: rgba(0,0,0,.5); @end-color: rgba(0,0,0,.0001));\n }\n &.right {\n left: auto;\n right: 0;\n #gradient > .horizontal(@start-color: rgba(0,0,0,.0001); @end-color: rgba(0,0,0,.5));\n }\n\n // Hover/focus state\n &:hover,\n &:focus {\n outline: 0;\n color: @carousel-control-color;\n text-decoration: none;\n .opacity(.9);\n }\n\n // Toggles\n .icon-prev,\n .icon-next,\n .glyphicon-chevron-left,\n .glyphicon-chevron-right {\n position: absolute;\n top: 50%;\n margin-top: -10px;\n z-index: 5;\n display: inline-block;\n }\n .icon-prev,\n .glyphicon-chevron-left {\n left: 50%;\n margin-left: -10px;\n }\n .icon-next,\n .glyphicon-chevron-right {\n right: 50%;\n margin-right: -10px;\n }\n .icon-prev,\n .icon-next {\n width: 20px;\n height: 20px;\n line-height: 1;\n font-family: serif;\n }\n\n\n .icon-prev {\n &:before {\n content: '\\2039';// SINGLE LEFT-POINTING ANGLE QUOTATION MARK (U+2039)\n }\n }\n .icon-next {\n &:before {\n content: '\\203a';// SINGLE RIGHT-POINTING ANGLE QUOTATION MARK (U+203A)\n }\n }\n}\n\n// Optional indicator pips\n//\n// Add an unordered list with the following class and add a list item for each\n// slide your carousel holds.\n\n.carousel-indicators {\n position: absolute;\n bottom: 10px;\n left: 50%;\n z-index: 15;\n width: 60%;\n margin-left: -30%;\n padding-left: 0;\n list-style: none;\n text-align: center;\n\n li {\n display: inline-block;\n width: 10px;\n height: 10px;\n margin: 1px;\n text-indent: -999px;\n border: 1px solid @carousel-indicator-border-color;\n border-radius: 10px;\n cursor: pointer;\n\n // IE8-9 hack for event handling\n //\n // Internet Explorer 8-9 does not support clicks on elements without a set\n // `background-color`. We cannot use `filter` since that's not viewed as a\n // background color by the browser. Thus, a hack is needed.\n // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Internet_Explorer\n //\n // For IE8, we set solid black as it doesn't support `rgba()`. For IE9, we\n // set alpha transparency for the best results possible.\n background-color: #000 \\9; // IE8\n background-color: rgba(0,0,0,0); // IE9\n }\n .active {\n margin: 0;\n width: 12px;\n height: 12px;\n background-color: @carousel-indicator-active-bg;\n }\n}\n\n// Optional captions\n// -----------------------------\n// Hidden by default for smaller viewports\n.carousel-caption {\n position: absolute;\n left: 15%;\n right: 15%;\n bottom: 20px;\n z-index: 10;\n padding-top: 20px;\n padding-bottom: 20px;\n color: @carousel-caption-color;\n text-align: center;\n text-shadow: @carousel-text-shadow;\n & .btn {\n text-shadow: none; // No shadow for button elements in carousel-caption\n }\n}\n\n\n// Scale up controls for tablets and up\n@media screen and (min-width: @screen-sm-min) {\n\n // Scale up the controls a smidge\n .carousel-control {\n .glyphicon-chevron-left,\n .glyphicon-chevron-right,\n .icon-prev,\n .icon-next {\n width: (@carousel-control-font-size * 1.5);\n height: (@carousel-control-font-size * 1.5);\n margin-top: (@carousel-control-font-size / -2);\n font-size: (@carousel-control-font-size * 1.5);\n }\n .glyphicon-chevron-left,\n .icon-prev {\n margin-left: (@carousel-control-font-size / -2);\n }\n .glyphicon-chevron-right,\n .icon-next {\n margin-right: (@carousel-control-font-size / -2);\n }\n }\n\n // Show and left align the captions\n .carousel-caption {\n left: 20%;\n right: 20%;\n padding-bottom: 30px;\n }\n\n // Move up the indicators\n .carousel-indicators {\n bottom: 20px;\n }\n}\n","// Clearfix\n//\n// For modern browsers\n// 1. The space content is one way to avoid an Opera bug when the\n// contenteditable attribute is included anywhere else in the document.\n// Otherwise it causes space to appear at the top and bottom of elements\n// that are clearfixed.\n// 2. The use of `table` rather than `block` is only necessary if using\n// `:before` to contain the top-margins of child elements.\n//\n// Source: http://nicolasgallagher.com/micro-clearfix-hack/\n\n.clearfix() {\n &:before,\n &:after {\n content: \" \"; // 1\n display: table; // 2\n }\n &:after {\n clear: both;\n }\n}\n","// Center-align a block level element\n\n.center-block() {\n display: block;\n margin-left: auto;\n margin-right: auto;\n}\n","// CSS image replacement\n//\n// Heads up! v3 launched with only `.hide-text()`, but per our pattern for\n// mixins being reused as classes with the same name, this doesn't hold up. As\n// of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`.\n//\n// Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757\n\n// Deprecated as of v3.0.1 (has been removed in v4)\n.hide-text() {\n font: ~\"0/0\" a;\n color: transparent;\n text-shadow: none;\n background-color: transparent;\n border: 0;\n}\n\n// New mixin to use as of v3.0.1\n.text-hide() {\n .hide-text();\n}\n","//\n// Responsive: Utility classes\n// --------------------------------------------------\n\n\n// IE10 in Windows (Phone) 8\n//\n// Support for responsive views via media queries is kind of borked in IE10, for\n// Surface/desktop in split view and for Windows Phone 8. This particular fix\n// must be accompanied by a snippet of JavaScript to sniff the user agent and\n// apply some conditional CSS to *only* the Surface/desktop Windows 8. Look at\n// our Getting Started page for more information on this bug.\n//\n// For more information, see the following:\n//\n// Issue: https://github.com/twbs/bootstrap/issues/10497\n// Docs: http://getbootstrap.com/getting-started/#support-ie10-width\n// Source: http://timkadlec.com/2013/01/windows-phone-8-and-device-width/\n// Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/\n\n@-ms-viewport {\n width: device-width;\n}\n\n\n// Visibility utilities\n// Note: Deprecated .visible-xs, .visible-sm, .visible-md, and .visible-lg as of v3.2.0\n.visible-xs,\n.visible-sm,\n.visible-md,\n.visible-lg {\n .responsive-invisibility();\n}\n\n.visible-xs-block,\n.visible-xs-inline,\n.visible-xs-inline-block,\n.visible-sm-block,\n.visible-sm-inline,\n.visible-sm-inline-block,\n.visible-md-block,\n.visible-md-inline,\n.visible-md-inline-block,\n.visible-lg-block,\n.visible-lg-inline,\n.visible-lg-inline-block {\n display: none !important;\n}\n\n.visible-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-visibility();\n }\n}\n.visible-xs-block {\n @media (max-width: @screen-xs-max) {\n display: block !important;\n }\n}\n.visible-xs-inline {\n @media (max-width: @screen-xs-max) {\n display: inline !important;\n }\n}\n.visible-xs-inline-block {\n @media (max-width: @screen-xs-max) {\n display: inline-block !important;\n }\n}\n\n.visible-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-visibility();\n }\n}\n.visible-sm-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: block !important;\n }\n}\n.visible-sm-inline {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline !important;\n }\n}\n.visible-sm-inline-block {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n display: inline-block !important;\n }\n}\n\n.visible-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-visibility();\n }\n}\n.visible-md-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: block !important;\n }\n}\n.visible-md-inline {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline !important;\n }\n}\n.visible-md-inline-block {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n display: inline-block !important;\n }\n}\n\n.visible-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-visibility();\n }\n}\n.visible-lg-block {\n @media (min-width: @screen-lg-min) {\n display: block !important;\n }\n}\n.visible-lg-inline {\n @media (min-width: @screen-lg-min) {\n display: inline !important;\n }\n}\n.visible-lg-inline-block {\n @media (min-width: @screen-lg-min) {\n display: inline-block !important;\n }\n}\n\n.hidden-xs {\n @media (max-width: @screen-xs-max) {\n .responsive-invisibility();\n }\n}\n.hidden-sm {\n @media (min-width: @screen-sm-min) and (max-width: @screen-sm-max) {\n .responsive-invisibility();\n }\n}\n.hidden-md {\n @media (min-width: @screen-md-min) and (max-width: @screen-md-max) {\n .responsive-invisibility();\n }\n}\n.hidden-lg {\n @media (min-width: @screen-lg-min) {\n .responsive-invisibility();\n }\n}\n\n\n// Print utilities\n//\n// Media queries are placed on the inside to be mixin-friendly.\n\n// Note: Deprecated .visible-print as of v3.2.0\n.visible-print {\n .responsive-invisibility();\n\n @media print {\n .responsive-visibility();\n }\n}\n.visible-print-block {\n display: none !important;\n\n @media print {\n display: block !important;\n }\n}\n.visible-print-inline {\n display: none !important;\n\n @media print {\n display: inline !important;\n }\n}\n.visible-print-inline-block {\n display: none !important;\n\n @media print {\n display: inline-block !important;\n }\n}\n\n.hidden-print {\n @media print {\n .responsive-invisibility();\n }\n}\n","// Responsive utilities\n\n//\n// More easily include all the states for responsive-utilities.less.\n.responsive-visibility() {\n display: block !important;\n table& { display: table !important; }\n tr& { display: table-row !important; }\n th&,\n td& { display: table-cell !important; }\n}\n\n.responsive-invisibility() {\n display: none !important;\n}\n"]} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot
deleted file mode 100644
index b93a4953..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.eot
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg
deleted file mode 100644
index 94fb5490..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.svg
+++ /dev/null
@@ -1,288 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="glyphicons_halflingsregular" horiz-adv-x="1200" >
-<font-face units-per-em="1200" ascent="960" descent="-240" />
-<missing-glyph horiz-adv-x="500" />
-<glyph horiz-adv-x="0" />
-<glyph horiz-adv-x="400" />
-<glyph unicode=" " />
-<glyph unicode="*" d="M600 1100q15 0 34 -1.5t30 -3.5l11 -1q10 -2 17.5 -10.5t7.5 -18.5v-224l158 158q7 7 18 8t19 -6l106 -106q7 -8 6 -19t-8 -18l-158 -158h224q10 0 18.5 -7.5t10.5 -17.5q6 -41 6 -75q0 -15 -1.5 -34t-3.5 -30l-1 -11q-2 -10 -10.5 -17.5t-18.5 -7.5h-224l158 -158 q7 -7 8 -18t-6 -19l-106 -106q-8 -7 -19 -6t-18 8l-158 158v-224q0 -10 -7.5 -18.5t-17.5 -10.5q-41 -6 -75 -6q-15 0 -34 1.5t-30 3.5l-11 1q-10 2 -17.5 10.5t-7.5 18.5v224l-158 -158q-7 -7 -18 -8t-19 6l-106 106q-7 8 -6 19t8 18l158 158h-224q-10 0 -18.5 7.5 t-10.5 17.5q-6 41 -6 75q0 15 1.5 34t3.5 30l1 11q2 10 10.5 17.5t18.5 7.5h224l-158 158q-7 7 -8 18t6 19l106 106q8 7 19 6t18 -8l158 -158v224q0 10 7.5 18.5t17.5 10.5q41 6 75 6z" />
-<glyph unicode="+" d="M450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-350h350q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-350v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v350h-350q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5 h350v350q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xa0;" />
-<glyph unicode="&#xa5;" d="M825 1100h250q10 0 12.5 -5t-5.5 -13l-364 -364q-6 -6 -11 -18h268q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-100h275q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-125v-174q0 -11 -7.5 -18.5t-18.5 -7.5h-148q-11 0 -18.5 7.5t-7.5 18.5v174 h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h125v100h-275q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h118q-5 12 -11 18l-364 364q-8 8 -5.5 13t12.5 5h250q25 0 43 -18l164 -164q8 -8 18 -8t18 8l164 164q18 18 43 18z" />
-<glyph unicode="&#x2000;" horiz-adv-x="650" />
-<glyph unicode="&#x2001;" horiz-adv-x="1300" />
-<glyph unicode="&#x2002;" horiz-adv-x="650" />
-<glyph unicode="&#x2003;" horiz-adv-x="1300" />
-<glyph unicode="&#x2004;" horiz-adv-x="433" />
-<glyph unicode="&#x2005;" horiz-adv-x="325" />
-<glyph unicode="&#x2006;" horiz-adv-x="216" />
-<glyph unicode="&#x2007;" horiz-adv-x="216" />
-<glyph unicode="&#x2008;" horiz-adv-x="162" />
-<glyph unicode="&#x2009;" horiz-adv-x="260" />
-<glyph unicode="&#x200a;" horiz-adv-x="72" />
-<glyph unicode="&#x202f;" horiz-adv-x="260" />
-<glyph unicode="&#x205f;" horiz-adv-x="325" />
-<glyph unicode="&#x20ac;" d="M744 1198q242 0 354 -189q60 -104 66 -209h-181q0 45 -17.5 82.5t-43.5 61.5t-58 40.5t-60.5 24t-51.5 7.5q-19 0 -40.5 -5.5t-49.5 -20.5t-53 -38t-49 -62.5t-39 -89.5h379l-100 -100h-300q-6 -50 -6 -100h406l-100 -100h-300q9 -74 33 -132t52.5 -91t61.5 -54.5t59 -29 t47 -7.5q22 0 50.5 7.5t60.5 24.5t58 41t43.5 61t17.5 80h174q-30 -171 -128 -278q-107 -117 -274 -117q-206 0 -324 158q-36 48 -69 133t-45 204h-217l100 100h112q1 47 6 100h-218l100 100h134q20 87 51 153.5t62 103.5q117 141 297 141z" />
-<glyph unicode="&#x20bd;" d="M428 1200h350q67 0 120 -13t86 -31t57 -49.5t35 -56.5t17 -64.5t6.5 -60.5t0.5 -57v-16.5v-16.5q0 -36 -0.5 -57t-6.5 -61t-17 -65t-35 -57t-57 -50.5t-86 -31.5t-120 -13h-178l-2 -100h288q10 0 13 -6t-3 -14l-120 -160q-6 -8 -18 -14t-22 -6h-138v-175q0 -11 -5.5 -18 t-15.5 -7h-149q-10 0 -17.5 7.5t-7.5 17.5v175h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v100h-267q-10 0 -13 6t3 14l120 160q6 8 18 14t22 6h117v475q0 10 7.5 17.5t17.5 7.5zM600 1000v-300h203q64 0 86.5 33t22.5 119q0 84 -22.5 116t-86.5 32h-203z" />
-<glyph unicode="&#x2212;" d="M250 700h800q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#x231b;" d="M1000 1200v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-50v-100q0 -91 -49.5 -165.5t-130.5 -109.5q81 -35 130.5 -109.5t49.5 -165.5v-150h50q21 0 35.5 -14.5t14.5 -35.5v-150h-800v150q0 21 14.5 35.5t35.5 14.5h50v150q0 91 49.5 165.5t130.5 109.5q-81 35 -130.5 109.5 t-49.5 165.5v100h-50q-21 0 -35.5 14.5t-14.5 35.5v150h800zM400 1000v-100q0 -60 32.5 -109.5t87.5 -73.5q28 -12 44 -37t16 -55t-16 -55t-44 -37q-55 -24 -87.5 -73.5t-32.5 -109.5v-150h400v150q0 60 -32.5 109.5t-87.5 73.5q-28 12 -44 37t-16 55t16 55t44 37 q55 24 87.5 73.5t32.5 109.5v100h-400z" />
-<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
-<glyph unicode="&#x2601;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -206.5q0 -121 -85 -207.5t-205 -86.5h-750q-79 0 -135.5 57t-56.5 137q0 69 42.5 122.5t108.5 67.5q-2 12 -2 37q0 153 108 260.5t260 107.5z" />
-<glyph unicode="&#x26fa;" d="M774 1193.5q16 -9.5 20.5 -27t-5.5 -33.5l-136 -187l467 -746h30q20 0 35 -18.5t15 -39.5v-42h-1200v42q0 21 15 39.5t35 18.5h30l468 746l-135 183q-10 16 -5.5 34t20.5 28t34 5.5t28 -20.5l111 -148l112 150q9 16 27 20.5t34 -5zM600 200h377l-182 112l-195 534v-646z " />
-<glyph unicode="&#x2709;" d="M25 1100h1150q10 0 12.5 -5t-5.5 -13l-564 -567q-8 -8 -18 -8t-18 8l-564 567q-8 8 -5.5 13t12.5 5zM18 882l264 -264q8 -8 8 -18t-8 -18l-264 -264q-8 -8 -13 -5.5t-5 12.5v550q0 10 5 12.5t13 -5.5zM918 618l264 264q8 8 13 5.5t5 -12.5v-550q0 -10 -5 -12.5t-13 5.5 l-264 264q-8 8 -8 18t8 18zM818 482l364 -364q8 -8 5.5 -13t-12.5 -5h-1150q-10 0 -12.5 5t5.5 13l364 364q8 8 18 8t18 -8l164 -164q8 -8 18 -8t18 8l164 164q8 8 18 8t18 -8z" />
-<glyph unicode="&#x270f;" d="M1011 1210q19 0 33 -13l153 -153q13 -14 13 -33t-13 -33l-99 -92l-214 214l95 96q13 14 32 14zM1013 800l-615 -614l-214 214l614 614zM317 96l-333 -112l110 335z" />
-<glyph unicode="&#xe001;" d="M700 650v-550h250q21 0 35.5 -14.5t14.5 -35.5v-50h-800v50q0 21 14.5 35.5t35.5 14.5h250v550l-500 550h1200z" />
-<glyph unicode="&#xe002;" d="M368 1017l645 163q39 15 63 0t24 -49v-831q0 -55 -41.5 -95.5t-111.5 -63.5q-79 -25 -147 -4.5t-86 75t25.5 111.5t122.5 82q72 24 138 8v521l-600 -155v-606q0 -42 -44 -90t-109 -69q-79 -26 -147 -5.5t-86 75.5t25.5 111.5t122.5 82.5q72 24 138 7v639q0 38 14.5 59 t53.5 34z" />
-<glyph unicode="&#xe003;" d="M500 1191q100 0 191 -39t156.5 -104.5t104.5 -156.5t39 -191l-1 -2l1 -5q0 -141 -78 -262l275 -274q23 -26 22.5 -44.5t-22.5 -42.5l-59 -58q-26 -20 -46.5 -20t-39.5 20l-275 274q-119 -77 -261 -77l-5 1l-2 -1q-100 0 -191 39t-156.5 104.5t-104.5 156.5t-39 191 t39 191t104.5 156.5t156.5 104.5t191 39zM500 1022q-88 0 -162 -43t-117 -117t-43 -162t43 -162t117 -117t162 -43t162 43t117 117t43 162t-43 162t-117 117t-162 43z" />
-<glyph unicode="&#xe005;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104z" />
-<glyph unicode="&#xe006;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429z" />
-<glyph unicode="&#xe007;" d="M407 800l131 353q7 19 17.5 19t17.5 -19l129 -353h421q21 0 24 -8.5t-14 -20.5l-342 -249l130 -401q7 -20 -0.5 -25.5t-24.5 6.5l-343 246l-342 -247q-17 -12 -24.5 -6.5t-0.5 25.5l130 400l-347 251q-17 12 -14 20.5t23 8.5h429zM477 700h-240l197 -142l-74 -226 l193 139l195 -140l-74 229l192 140h-234l-78 211z" />
-<glyph unicode="&#xe008;" d="M600 1200q124 0 212 -88t88 -212v-250q0 -46 -31 -98t-69 -52v-75q0 -10 6 -21.5t15 -17.5l358 -230q9 -5 15 -16.5t6 -21.5v-93q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v93q0 10 6 21.5t15 16.5l358 230q9 6 15 17.5t6 21.5v75q-38 0 -69 52 t-31 98v250q0 124 88 212t212 88z" />
-<glyph unicode="&#xe009;" d="M25 1100h1150q10 0 17.5 -7.5t7.5 -17.5v-1050q0 -10 -7.5 -17.5t-17.5 -7.5h-1150q-10 0 -17.5 7.5t-7.5 17.5v1050q0 10 7.5 17.5t17.5 7.5zM100 1000v-100h100v100h-100zM875 1000h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5t17.5 -7.5h550 q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM1000 1000v-100h100v100h-100zM100 800v-100h100v100h-100zM1000 800v-100h100v100h-100zM100 600v-100h100v100h-100zM1000 600v-100h100v100h-100zM875 500h-550q-10 0 -17.5 -7.5t-7.5 -17.5v-350q0 -10 7.5 -17.5 t17.5 -7.5h550q10 0 17.5 7.5t7.5 17.5v350q0 10 -7.5 17.5t-17.5 7.5zM100 400v-100h100v100h-100zM1000 400v-100h100v100h-100zM100 200v-100h100v100h-100zM1000 200v-100h100v100h-100z" />
-<glyph unicode="&#xe010;" d="M50 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM50 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM650 500h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe011;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM850 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 700h200q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h200 q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM850 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5 t35.5 14.5z" />
-<glyph unicode="&#xe012;" d="M50 1100h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 1100h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200 q0 21 14.5 35.5t35.5 14.5zM50 700h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 700h700q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-700 q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM50 300h200q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5zM450 300h700q21 0 35.5 -14.5t14.5 -35.5v-200 q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe013;" d="M465 477l571 571q8 8 18 8t17 -8l177 -177q8 -7 8 -17t-8 -18l-783 -784q-7 -8 -17.5 -8t-17.5 8l-384 384q-8 8 -8 18t8 17l177 177q7 8 17 8t18 -8l171 -171q7 -7 18 -7t18 7z" />
-<glyph unicode="&#xe014;" d="M904 1083l178 -179q8 -8 8 -18.5t-8 -17.5l-267 -268l267 -268q8 -7 8 -17.5t-8 -18.5l-178 -178q-8 -8 -18.5 -8t-17.5 8l-268 267l-268 -267q-7 -8 -17.5 -8t-18.5 8l-178 178q-8 8 -8 18.5t8 17.5l267 268l-267 268q-8 7 -8 17.5t8 18.5l178 178q8 8 18.5 8t17.5 -8 l268 -267l268 268q7 7 17.5 7t18.5 -7z" />
-<glyph unicode="&#xe015;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM425 900h150q10 0 17.5 -7.5t7.5 -17.5v-75h75q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5 t-17.5 -7.5h-75v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-75q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v75q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe016;" d="M507 1177q98 0 187.5 -38.5t154.5 -103.5t103.5 -154.5t38.5 -187.5q0 -141 -78 -262l300 -299q8 -8 8 -18.5t-8 -18.5l-109 -108q-7 -8 -17.5 -8t-18.5 8l-300 299q-119 -77 -261 -77q-98 0 -188 38.5t-154.5 103t-103 154.5t-38.5 188t38.5 187.5t103 154.5 t154.5 103.5t188 38.5zM506.5 1023q-89.5 0 -165.5 -44t-120 -120.5t-44 -166t44 -165.5t120 -120t165.5 -44t166 44t120.5 120t44 165.5t-44 166t-120.5 120.5t-166 44zM325 800h350q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-350q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe017;" d="M550 1200h100q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM800 975v166q167 -62 272 -209.5t105 -331.5q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5 t-184.5 123t-123 184.5t-45.5 224q0 184 105 331.5t272 209.5v-166q-103 -55 -165 -155t-62 -220q0 -116 57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5q0 120 -62 220t-165 155z" />
-<glyph unicode="&#xe018;" d="M1025 1200h150q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM725 800h150q10 0 17.5 -7.5t7.5 -17.5v-750q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v750 q0 10 7.5 17.5t17.5 7.5zM425 500h150q10 0 17.5 -7.5t7.5 -17.5v-450q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v450q0 10 7.5 17.5t17.5 7.5zM125 300h150q10 0 17.5 -7.5t7.5 -17.5v-250q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5 v250q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe019;" d="M600 1174q33 0 74 -5l38 -152l5 -1q49 -14 94 -39l5 -2l134 80q61 -48 104 -105l-80 -134l3 -5q25 -44 39 -93l1 -6l152 -38q5 -43 5 -73q0 -34 -5 -74l-152 -38l-1 -6q-15 -49 -39 -93l-3 -5l80 -134q-48 -61 -104 -105l-134 81l-5 -3q-44 -25 -94 -39l-5 -2l-38 -151 q-43 -5 -74 -5q-33 0 -74 5l-38 151l-5 2q-49 14 -94 39l-5 3l-134 -81q-60 48 -104 105l80 134l-3 5q-25 45 -38 93l-2 6l-151 38q-6 42 -6 74q0 33 6 73l151 38l2 6q13 48 38 93l3 5l-80 134q47 61 105 105l133 -80l5 2q45 25 94 39l5 1l38 152q43 5 74 5zM600 815 q-89 0 -152 -63t-63 -151.5t63 -151.5t152 -63t152 63t63 151.5t-63 151.5t-152 63z" />
-<glyph unicode="&#xe020;" d="M500 1300h300q41 0 70.5 -29.5t29.5 -70.5v-100h275q10 0 17.5 -7.5t7.5 -17.5v-75h-1100v75q0 10 7.5 17.5t17.5 7.5h275v100q0 41 29.5 70.5t70.5 29.5zM500 1200v-100h300v100h-300zM1100 900v-800q0 -41 -29.5 -70.5t-70.5 -29.5h-700q-41 0 -70.5 29.5t-29.5 70.5 v800h900zM300 800v-700h100v700h-100zM500 800v-700h100v700h-100zM700 800v-700h100v700h-100zM900 800v-700h100v700h-100z" />
-<glyph unicode="&#xe021;" d="M18 618l620 608q8 7 18.5 7t17.5 -7l608 -608q8 -8 5.5 -13t-12.5 -5h-175v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v375h-300v-375q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v575h-175q-10 0 -12.5 5t5.5 13z" />
-<glyph unicode="&#xe022;" d="M600 1200v-400q0 -41 29.5 -70.5t70.5 -29.5h300v-650q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5h450zM1000 800h-250q-21 0 -35.5 14.5t-14.5 35.5v250z" />
-<glyph unicode="&#xe023;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h50q10 0 17.5 -7.5t7.5 -17.5v-275h175q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe024;" d="M1300 0h-538l-41 400h-242l-41 -400h-538l431 1200h209l-21 -300h162l-20 300h208zM515 800l-27 -300h224l-27 300h-170z" />
-<glyph unicode="&#xe025;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-450h191q20 0 25.5 -11.5t-7.5 -27.5l-327 -400q-13 -16 -32 -16t-32 16l-327 400q-13 16 -7.5 27.5t25.5 11.5h191v450q0 21 14.5 35.5t35.5 14.5zM1125 400h50q10 0 17.5 -7.5t7.5 -17.5v-350q0 -10 -7.5 -17.5t-17.5 -7.5 h-1050q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h50q10 0 17.5 -7.5t7.5 -17.5v-175h900v175q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe026;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM525 900h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -275q-13 -16 -32 -16t-32 16l-223 275q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z " />
-<glyph unicode="&#xe027;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM632 914l223 -275q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5l223 275q13 16 32 16 t32 -16z" />
-<glyph unicode="&#xe028;" d="M225 1200h750q10 0 19.5 -7t12.5 -17l186 -652q7 -24 7 -49v-425q0 -12 -4 -27t-9 -17q-12 -6 -37 -6h-1100q-12 0 -27 4t-17 8q-6 13 -6 38l1 425q0 25 7 49l185 652q3 10 12.5 17t19.5 7zM878 1000h-556q-10 0 -19 -7t-11 -18l-87 -450q-2 -11 4 -18t16 -7h150 q10 0 19.5 -7t11.5 -17l38 -152q2 -10 11.5 -17t19.5 -7h250q10 0 19.5 7t11.5 17l38 152q2 10 11.5 17t19.5 7h150q10 0 16 7t4 18l-87 450q-2 11 -11 18t-19 7z" />
-<glyph unicode="&#xe029;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM540 820l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
-<glyph unicode="&#xe030;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-362q0 -10 -7.5 -17.5t-17.5 -7.5h-362q-11 0 -13 5.5t5 12.5l133 133q-109 76 -238 76q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5h150q0 -117 -45.5 -224 t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117z" />
-<glyph unicode="&#xe031;" d="M947 1060l135 135q7 7 12.5 5t5.5 -13v-361q0 -11 -7.5 -18.5t-18.5 -7.5h-361q-11 0 -13 5.5t5 12.5l134 134q-110 75 -239 75q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5h-150q0 117 45.5 224t123 184.5t184.5 123t224 45.5q192 0 347 -117zM1027 600h150 q0 -117 -45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5q-192 0 -348 118l-134 -134q-7 -8 -12.5 -5.5t-5.5 12.5v360q0 11 7.5 18.5t18.5 7.5h360q10 0 12.5 -5.5t-5.5 -12.5l-133 -133q110 -76 240 -76q116 0 214.5 57t155.5 155.5t57 214.5z" />
-<glyph unicode="&#xe032;" d="M125 1200h1050q10 0 17.5 -7.5t7.5 -17.5v-1150q0 -10 -7.5 -17.5t-17.5 -7.5h-1050q-10 0 -17.5 7.5t-7.5 17.5v1150q0 10 7.5 17.5t17.5 7.5zM1075 1000h-850q-10 0 -17.5 -7.5t-7.5 -17.5v-850q0 -10 7.5 -17.5t17.5 -7.5h850q10 0 17.5 7.5t7.5 17.5v850 q0 10 -7.5 17.5t-17.5 7.5zM325 900h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 900h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 700h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 700h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 500h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 500h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5zM325 300h50q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM525 300h450q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-450q-10 0 -17.5 7.5t-7.5 17.5v50 q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe033;" d="M900 800v200q0 83 -58.5 141.5t-141.5 58.5h-300q-82 0 -141 -59t-59 -141v-200h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h900q41 0 70.5 29.5t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5h-100zM400 800v150q0 21 15 35.5t35 14.5h200 q20 0 35 -14.5t15 -35.5v-150h-300z" />
-<glyph unicode="&#xe034;" d="M125 1100h50q10 0 17.5 -7.5t7.5 -17.5v-1075h-100v1075q0 10 7.5 17.5t17.5 7.5zM1075 1052q4 0 9 -2q16 -6 16 -23v-421q0 -6 -3 -12q-33 -59 -66.5 -99t-65.5 -58t-56.5 -24.5t-52.5 -6.5q-26 0 -57.5 6.5t-52.5 13.5t-60 21q-41 15 -63 22.5t-57.5 15t-65.5 7.5 q-85 0 -160 -57q-7 -5 -15 -5q-6 0 -11 3q-14 7 -14 22v438q22 55 82 98.5t119 46.5q23 2 43 0.5t43 -7t32.5 -8.5t38 -13t32.5 -11q41 -14 63.5 -21t57 -14t63.5 -7q103 0 183 87q7 8 18 8z" />
-<glyph unicode="&#xe035;" d="M600 1175q116 0 227 -49.5t192.5 -131t131 -192.5t49.5 -227v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v300q0 127 -70.5 231.5t-184.5 161.5t-245 57t-245 -57t-184.5 -161.5t-70.5 -231.5v-300q0 -10 -7.5 -17.5t-17.5 -7.5h-50 q-10 0 -17.5 7.5t-7.5 17.5v300q0 116 49.5 227t131 192.5t192.5 131t227 49.5zM220 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460q0 8 6 14t14 6zM820 500h160q8 0 14 -6t6 -14v-460q0 -8 -6 -14t-14 -6h-160q-8 0 -14 6t-6 14v460 q0 8 6 14t14 6z" />
-<glyph unicode="&#xe036;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM900 668l120 120q7 7 17 7t17 -7l34 -34q7 -7 7 -17t-7 -17l-120 -120l120 -120q7 -7 7 -17 t-7 -17l-34 -34q-7 -7 -17 -7t-17 7l-120 119l-120 -119q-7 -7 -17 -7t-17 7l-34 34q-7 7 -7 17t7 17l119 120l-119 120q-7 7 -7 17t7 17l34 34q7 8 17 8t17 -8z" />
-<glyph unicode="&#xe037;" d="M321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6 l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238q-6 8 -4.5 18t9.5 17l29 22q7 5 15 5z" />
-<glyph unicode="&#xe038;" d="M967 1004h3q11 -1 17 -10q135 -179 135 -396q0 -105 -34 -206.5t-98 -185.5q-7 -9 -17 -10h-3q-9 0 -16 6l-42 34q-8 6 -9 16t5 18q111 150 111 328q0 90 -29.5 176t-84.5 157q-6 9 -5 19t10 16l42 33q7 5 15 5zM321 814l258 172q9 6 15 2.5t6 -13.5v-750q0 -10 -6 -13.5 t-15 2.5l-258 172q-21 14 -46 14h-250q-10 0 -17.5 7.5t-7.5 17.5v350q0 10 7.5 17.5t17.5 7.5h250q25 0 46 14zM766 900h4q10 -1 16 -10q96 -129 96 -290q0 -154 -90 -281q-6 -9 -17 -10l-3 -1q-9 0 -16 6l-29 23q-7 7 -8.5 16.5t4.5 17.5q72 103 72 229q0 132 -78 238 q-6 8 -4.5 18.5t9.5 16.5l29 22q7 5 15 5z" />
-<glyph unicode="&#xe039;" d="M500 900h100v-100h-100v-100h-400v-100h-100v600h500v-300zM1200 700h-200v-100h200v-200h-300v300h-200v300h-100v200h600v-500zM100 1100v-300h300v300h-300zM800 1100v-300h300v300h-300zM300 900h-100v100h100v-100zM1000 900h-100v100h100v-100zM300 500h200v-500 h-500v500h200v100h100v-100zM800 300h200v-100h-100v-100h-200v100h-100v100h100v200h-200v100h300v-300zM100 400v-300h300v300h-300zM300 200h-100v100h100v-100zM1200 200h-100v100h100v-100zM700 0h-100v100h100v-100zM1200 0h-300v100h300v-100z" />
-<glyph unicode="&#xe040;" d="M100 200h-100v1000h100v-1000zM300 200h-100v1000h100v-1000zM700 200h-200v1000h200v-1000zM900 200h-100v1000h100v-1000zM1200 200h-200v1000h200v-1000zM400 0h-300v100h300v-100zM600 0h-100v91h100v-91zM800 0h-100v91h100v-91zM1100 0h-200v91h200v-91z" />
-<glyph unicode="&#xe041;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
-<glyph unicode="&#xe042;" d="M500 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-682 682l1 475q0 10 7.5 17.5t17.5 7.5h474zM800 1200l682 -682q8 -8 8 -18t-8 -18l-464 -464q-8 -8 -18 -8t-18 8l-56 56l424 426l-700 700h150zM319.5 1024.5q-29.5 29.5 -71 29.5t-71 -29.5 t-29.5 -71.5t29.5 -71.5t71 -29.5t71 29.5t29.5 71.5t-29.5 71.5z" />
-<glyph unicode="&#xe043;" d="M300 1200h825q75 0 75 -75v-900q0 -25 -18 -43l-64 -64q-8 -8 -13 -5.5t-5 12.5v950q0 10 -7.5 17.5t-17.5 7.5h-700q-25 0 -43 -18l-64 -64q-8 -8 -5.5 -13t12.5 -5h700q10 0 17.5 -7.5t7.5 -17.5v-950q0 -10 -7.5 -17.5t-17.5 -7.5h-850q-10 0 -17.5 7.5t-7.5 17.5v975 q0 25 18 43l139 139q18 18 43 18z" />
-<glyph unicode="&#xe044;" d="M250 1200h800q21 0 35.5 -14.5t14.5 -35.5v-1150l-450 444l-450 -445v1151q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe045;" d="M822 1200h-444q-11 0 -19 -7.5t-9 -17.5l-78 -301q-7 -24 7 -45l57 -108q6 -9 17.5 -15t21.5 -6h450q10 0 21.5 6t17.5 15l62 108q14 21 7 45l-83 301q-1 10 -9 17.5t-19 7.5zM1175 800h-150q-10 0 -21 -6.5t-15 -15.5l-78 -156q-4 -9 -15 -15.5t-21 -6.5h-550 q-10 0 -21 6.5t-15 15.5l-78 156q-4 9 -15 15.5t-21 6.5h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-650q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h750q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5 t7.5 17.5v650q0 10 -7.5 17.5t-17.5 7.5zM850 200h-500q-10 0 -19.5 -7t-11.5 -17l-38 -152q-2 -10 3.5 -17t15.5 -7h600q10 0 15.5 7t3.5 17l-38 152q-2 10 -11.5 17t-19.5 7z" />
-<glyph unicode="&#xe046;" d="M500 1100h200q56 0 102.5 -20.5t72.5 -50t44 -59t25 -50.5l6 -20h150q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5h150q2 8 6.5 21.5t24 48t45 61t72 48t102.5 21.5zM900 800v-100 h100v100h-100zM600 730q-95 0 -162.5 -67.5t-67.5 -162.5t67.5 -162.5t162.5 -67.5t162.5 67.5t67.5 162.5t-67.5 162.5t-162.5 67.5zM600 603q43 0 73 -30t30 -73t-30 -73t-73 -30t-73 30t-30 73t30 73t73 30z" />
-<glyph unicode="&#xe047;" d="M681 1199l385 -998q20 -50 60 -92q18 -19 36.5 -29.5t27.5 -11.5l10 -2v-66h-417v66q53 0 75 43.5t5 88.5l-82 222h-391q-58 -145 -92 -234q-11 -34 -6.5 -57t25.5 -37t46 -20t55 -6v-66h-365v66q56 24 84 52q12 12 25 30.5t20 31.5l7 13l399 1006h93zM416 521h340 l-162 457z" />
-<glyph unicode="&#xe048;" d="M753 641q5 -1 14.5 -4.5t36 -15.5t50.5 -26.5t53.5 -40t50.5 -54.5t35.5 -70t14.5 -87q0 -67 -27.5 -125.5t-71.5 -97.5t-98.5 -66.5t-108.5 -40.5t-102 -13h-500v89q41 7 70.5 32.5t29.5 65.5v827q0 24 -0.5 34t-3.5 24t-8.5 19.5t-17 13.5t-28 12.5t-42.5 11.5v71 l471 -1q57 0 115.5 -20.5t108 -57t80.5 -94t31 -124.5q0 -51 -15.5 -96.5t-38 -74.5t-45 -50.5t-38.5 -30.5zM400 700h139q78 0 130.5 48.5t52.5 122.5q0 41 -8.5 70.5t-29.5 55.5t-62.5 39.5t-103.5 13.5h-118v-350zM400 200h216q80 0 121 50.5t41 130.5q0 90 -62.5 154.5 t-156.5 64.5h-159v-400z" />
-<glyph unicode="&#xe049;" d="M877 1200l2 -57q-83 -19 -116 -45.5t-40 -66.5l-132 -839q-9 -49 13 -69t96 -26v-97h-500v97q186 16 200 98l173 832q3 17 3 30t-1.5 22.5t-9 17.5t-13.5 12.5t-21.5 10t-26 8.5t-33.5 10q-13 3 -19 5v57h425z" />
-<glyph unicode="&#xe050;" d="M1300 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM175 1000h-75v-800h75l-125 -167l-125 167h75v800h-75l125 167z" />
-<glyph unicode="&#xe051;" d="M1100 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-650q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v650h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM1167 50l-167 -125v75h-800v-75l-167 125l167 125v-75h800v75z" />
-<glyph unicode="&#xe052;" d="M50 1100h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe053;" d="M250 1100h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM250 500h700q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-700q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe054;" d="M500 950v100q0 21 14.5 35.5t35.5 14.5h600q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5zM100 650v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000 q-21 0 -35.5 14.5t-14.5 35.5zM300 350v100q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5zM0 50v100q0 21 14.5 35.5t35.5 14.5h1100q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5z" />
-<glyph unicode="&#xe055;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 800h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 500h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h1100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe056;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 1100h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 800h800q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 500h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 500h800q21 0 35.5 -14.5t14.5 -35.5v-100 q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM350 200h800 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe057;" d="M400 0h-100v1100h100v-1100zM550 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM267 550l-167 -125v75h-200v100h200v75zM550 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM550 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe058;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM900 0h-100v1100h100v-1100zM50 800h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM1100 600h200v-100h-200v-75l-167 125l167 125v-75zM50 500h300q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5zM50 200h600 q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-600q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe059;" d="M75 1000h750q31 0 53 -22t22 -53v-650q0 -31 -22 -53t-53 -22h-750q-31 0 -53 22t-22 53v650q0 31 22 53t53 22zM1200 300l-300 300l300 300v-600z" />
-<glyph unicode="&#xe060;" d="M44 1100h1112q18 0 31 -13t13 -31v-1012q0 -18 -13 -31t-31 -13h-1112q-18 0 -31 13t-13 31v1012q0 18 13 31t31 13zM100 1000v-737l247 182l298 -131l-74 156l293 318l236 -288v500h-1000zM342 884q56 0 95 -39t39 -94.5t-39 -95t-95 -39.5t-95 39.5t-39 95t39 94.5 t95 39z" />
-<glyph unicode="&#xe062;" d="M648 1169q117 0 216 -60t156.5 -161t57.5 -218q0 -115 -70 -258q-69 -109 -158 -225.5t-143 -179.5l-54 -62q-9 8 -25.5 24.5t-63.5 67.5t-91 103t-98.5 128t-95.5 148q-60 132 -60 249q0 88 34 169.5t91.5 142t137 96.5t166.5 36zM652.5 974q-91.5 0 -156.5 -65 t-65 -157t65 -156.5t156.5 -64.5t156.5 64.5t65 156.5t-65 157t-156.5 65z" />
-<glyph unicode="&#xe063;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 173v854q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57z" />
-<glyph unicode="&#xe064;" d="M554 1295q21 -72 57.5 -143.5t76 -130t83 -118t82.5 -117t70 -116t49.5 -126t18.5 -136.5q0 -71 -25.5 -135t-68.5 -111t-99 -82t-118.5 -54t-125.5 -23q-84 5 -161.5 34t-139.5 78.5t-99 125t-37 164.5q0 69 18 136.5t49.5 126.5t69.5 116.5t81.5 117.5t83.5 119 t76.5 131t58.5 143zM344 710q-23 -33 -43.5 -70.5t-40.5 -102.5t-17 -123q1 -37 14.5 -69.5t30 -52t41 -37t38.5 -24.5t33 -15q21 -7 32 -1t13 22l6 34q2 10 -2.5 22t-13.5 19q-5 4 -14 12t-29.5 40.5t-32.5 73.5q-26 89 6 271q2 11 -6 11q-8 1 -15 -10z" />
-<glyph unicode="&#xe065;" d="M1000 1013l108 115q2 1 5 2t13 2t20.5 -1t25 -9.5t28.5 -21.5q22 -22 27 -43t0 -32l-6 -10l-108 -115zM350 1100h400q50 0 105 -13l-187 -187h-368q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v182l200 200v-332 q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM1009 803l-362 -362l-161 -50l55 170l355 355z" />
-<glyph unicode="&#xe066;" d="M350 1100h361q-164 -146 -216 -200h-195q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5l200 153v-103q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M824 1073l339 -301q8 -7 8 -17.5t-8 -17.5l-340 -306q-7 -6 -12.5 -4t-6.5 11v203q-26 1 -54.5 0t-78.5 -7.5t-92 -17.5t-86 -35t-70 -57q10 59 33 108t51.5 81.5t65 58.5t68.5 40.5t67 24.5t56 13.5t40 4.5v210q1 10 6.5 12.5t13.5 -4.5z" />
-<glyph unicode="&#xe067;" d="M350 1100h350q60 0 127 -23l-178 -177h-349q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v69l200 200v-219q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5z M643 639l395 395q7 7 17.5 7t17.5 -7l101 -101q7 -7 7 -17.5t-7 -17.5l-531 -532q-7 -7 -17.5 -7t-17.5 7l-248 248q-7 7 -7 17.5t7 17.5l101 101q7 7 17.5 7t17.5 -7l111 -111q8 -7 18 -7t18 7z" />
-<glyph unicode="&#xe068;" d="M318 918l264 264q8 8 18 8t18 -8l260 -264q7 -8 4.5 -13t-12.5 -5h-170v-200h200v173q0 10 5 12t13 -5l264 -260q8 -7 8 -17.5t-8 -17.5l-264 -265q-8 -7 -13 -5t-5 12v173h-200v-200h170q10 0 12.5 -5t-4.5 -13l-260 -264q-8 -8 -18 -8t-18 8l-264 264q-8 8 -5.5 13 t12.5 5h175v200h-200v-173q0 -10 -5 -12t-13 5l-264 265q-8 7 -8 17.5t8 17.5l264 260q8 7 13 5t5 -12v-173h200v200h-175q-10 0 -12.5 5t5.5 13z" />
-<glyph unicode="&#xe069;" d="M250 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe070;" d="M50 1100h100q21 0 35.5 -14.5t14.5 -35.5v-438l464 453q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5 t-14.5 35.5v1000q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe071;" d="M1200 1050v-1000q0 -21 -10.5 -25t-25.5 10l-464 453v-438q0 -21 -10.5 -25t-25.5 10l-492 480q-15 14 -15 35t15 35l492 480q15 14 25.5 10t10.5 -25v-438l464 453q15 14 25.5 10t10.5 -25z" />
-<glyph unicode="&#xe072;" d="M243 1074l814 -498q18 -11 18 -26t-18 -26l-814 -498q-18 -11 -30.5 -4t-12.5 28v1000q0 21 12.5 28t30.5 -4z" />
-<glyph unicode="&#xe073;" d="M250 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM650 1000h200q21 0 35.5 -14.5t14.5 -35.5v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v800 q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe074;" d="M1100 950v-800q0 -21 -14.5 -35.5t-35.5 -14.5h-800q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5h800q21 0 35.5 -14.5t14.5 -35.5z" />
-<glyph unicode="&#xe075;" d="M500 612v438q0 21 10.5 25t25.5 -10l492 -480q15 -14 15 -35t-15 -35l-492 -480q-15 -14 -25.5 -10t-10.5 25v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10z" />
-<glyph unicode="&#xe076;" d="M1048 1102l100 1q20 0 35 -14.5t15 -35.5l5 -1000q0 -21 -14.5 -35.5t-35.5 -14.5l-100 -1q-21 0 -35.5 14.5t-14.5 35.5l-2 437l-463 -454q-14 -15 -24.5 -10.5t-10.5 25.5l-2 437l-462 -455q-15 -14 -25.5 -9.5t-10.5 24.5l-5 1000q0 21 10.5 25.5t25.5 -10.5l466 -450 l-2 438q0 20 10.5 24.5t25.5 -9.5l466 -451l-2 438q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe077;" d="M850 1100h100q21 0 35.5 -14.5t14.5 -35.5v-1000q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v438l-464 -453q-15 -14 -25.5 -10t-10.5 25v1000q0 21 10.5 25t25.5 -10l464 -453v438q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe078;" d="M686 1081l501 -540q15 -15 10.5 -26t-26.5 -11h-1042q-22 0 -26.5 11t10.5 26l501 540q15 15 36 15t36 -15zM150 400h1000q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe079;" d="M885 900l-352 -353l352 -353l-197 -198l-552 552l552 550z" />
-<glyph unicode="&#xe080;" d="M1064 547l-551 -551l-198 198l353 353l-353 353l198 198z" />
-<glyph unicode="&#xe081;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM650 900h-100q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-150 q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5h150v-150q0 -21 14.5 -35.5t35.5 -14.5h100q21 0 35.5 14.5t14.5 35.5v150h150q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-150v150q0 21 -14.5 35.5t-35.5 14.5z" />
-<glyph unicode="&#xe082;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM850 700h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5 t35.5 -14.5h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5z" />
-<glyph unicode="&#xe083;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM741.5 913q-12.5 0 -21.5 -9l-120 -120l-120 120q-9 9 -21.5 9 t-21.5 -9l-141 -141q-9 -9 -9 -21.5t9 -21.5l120 -120l-120 -120q-9 -9 -9 -21.5t9 -21.5l141 -141q9 -9 21.5 -9t21.5 9l120 120l120 -120q9 -9 21.5 -9t21.5 9l141 141q9 9 9 21.5t-9 21.5l-120 120l120 120q9 9 9 21.5t-9 21.5l-141 141q-9 9 -21.5 9z" />
-<glyph unicode="&#xe084;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM546 623l-84 85q-7 7 -17.5 7t-18.5 -7l-139 -139q-7 -8 -7 -18t7 -18 l242 -241q7 -8 17.5 -8t17.5 8l375 375q7 7 7 17.5t-7 18.5l-139 139q-7 7 -17.5 7t-17.5 -7z" />
-<glyph unicode="&#xe085;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM588 941q-29 0 -59 -5.5t-63 -20.5t-58 -38.5t-41.5 -63t-16.5 -89.5 q0 -25 20 -25h131q30 -5 35 11q6 20 20.5 28t45.5 8q20 0 31.5 -10.5t11.5 -28.5q0 -23 -7 -34t-26 -18q-1 0 -13.5 -4t-19.5 -7.5t-20 -10.5t-22 -17t-18.5 -24t-15.5 -35t-8 -46q-1 -8 5.5 -16.5t20.5 -8.5h173q7 0 22 8t35 28t37.5 48t29.5 74t12 100q0 47 -17 83 t-42.5 57t-59.5 34.5t-64 18t-59 4.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
-<glyph unicode="&#xe086;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM675 1000h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5 t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5zM675 700h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h75v-200h-75q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h350q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5 t-17.5 7.5h-75v275q0 10 -7.5 17.5t-17.5 7.5z" />
-<glyph unicode="&#xe087;" d="M525 1200h150q10 0 17.5 -7.5t7.5 -17.5v-194q103 -27 178.5 -102.5t102.5 -178.5h194q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-194q-27 -103 -102.5 -178.5t-178.5 -102.5v-194q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v194 q-103 27 -178.5 102.5t-102.5 178.5h-194q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h194q27 103 102.5 178.5t178.5 102.5v194q0 10 7.5 17.5t17.5 7.5zM700 893v-168q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v168q-68 -23 -119 -74 t-74 -119h168q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-168q23 -68 74 -119t119 -74v168q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-168q68 23 119 74t74 119h-168q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h168 q-23 68 -74 119t-119 74z" />
-<glyph unicode="&#xe088;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM759 823l64 -64q7 -7 7 -17.5t-7 -17.5l-124 -124l124 -124q7 -7 7 -17.5t-7 -17.5l-64 -64q-7 -7 -17.5 -7t-17.5 7l-124 124l-124 -124q-7 -7 -17.5 -7t-17.5 7l-64 64 q-7 7 -7 17.5t7 17.5l124 124l-124 124q-7 7 -7 17.5t7 17.5l64 64q7 7 17.5 7t17.5 -7l124 -124l124 124q7 7 17.5 7t17.5 -7z" />
-<glyph unicode="&#xe089;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5t57 -214.5 t155.5 -155.5t214.5 -57t214.5 57t155.5 155.5t57 214.5t-57 214.5t-155.5 155.5t-214.5 57zM782 788l106 -106q7 -7 7 -17.5t-7 -17.5l-320 -321q-8 -7 -18 -7t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l197 197q7 7 17.5 7t17.5 -7z" />
-<glyph unicode="&#xe090;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM600 1027q-116 0 -214.5 -57t-155.5 -155.5t-57 -214.5q0 -120 65 -225 l587 587q-105 65 -225 65zM965 819l-584 -584q104 -62 219 -62q116 0 214.5 57t155.5 155.5t57 214.5q0 115 -62 219z" />
-<glyph unicode="&#xe091;" d="M39 582l522 427q16 13 27.5 8t11.5 -26v-291h550q21 0 35.5 -14.5t14.5 -35.5v-200q0 -21 -14.5 -35.5t-35.5 -14.5h-550v-291q0 -21 -11.5 -26t-27.5 8l-522 427q-16 13 -16 32t16 32z" />
-<glyph unicode="&#xe092;" d="M639 1009l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291h-550q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h550v291q0 21 11.5 26t27.5 -8z" />
-<glyph unicode="&#xe093;" d="M682 1161l427 -522q13 -16 8 -27.5t-26 -11.5h-291v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v550h-291q-21 0 -26 11.5t8 27.5l427 522q13 16 32 16t32 -16z" />
-<glyph unicode="&#xe094;" d="M550 1200h200q21 0 35.5 -14.5t14.5 -35.5v-550h291q21 0 26 -11.5t-8 -27.5l-427 -522q-13 -16 -32 -16t-32 16l-427 522q-13 16 -8 27.5t26 11.5h291v550q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe095;" d="M639 1109l522 -427q16 -13 16 -32t-16 -32l-522 -427q-16 -13 -27.5 -8t-11.5 26v291q-94 -2 -182 -20t-170.5 -52t-147 -92.5t-100.5 -135.5q5 105 27 193.5t67.5 167t113 135t167 91.5t225.5 42v262q0 21 11.5 26t27.5 -8z" />
-<glyph unicode="&#xe096;" d="M850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5zM350 0h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249 q8 7 18 7t18 -7l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5z" />
-<glyph unicode="&#xe097;" d="M1014 1120l106 -106q7 -8 7 -18t-7 -18l-249 -249l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l249 249q8 7 18 7t18 -7zM250 600h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-249 -249q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l249 249l-94 94q-14 14 -10 24.5t25 10.5z" />
-<glyph unicode="&#xe101;" d="M600 1177q117 0 224 -45.5t184.5 -123t123 -184.5t45.5 -224t-45.5 -224t-123 -184.5t-184.5 -123t-224 -45.5t-224 45.5t-184.5 123t-123 184.5t-45.5 224t45.5 224t123 184.5t184.5 123t224 45.5zM704 900h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5 t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM675 400h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5z" />
-<glyph unicode="&#xe102;" d="M260 1200q9 0 19 -2t15 -4l5 -2q22 -10 44 -23l196 -118q21 -13 36 -24q29 -21 37 -12q11 13 49 35l196 118q22 13 45 23q17 7 38 7q23 0 47 -16.5t37 -33.5l13 -16q14 -21 18 -45l25 -123l8 -44q1 -9 8.5 -14.5t17.5 -5.5h61q10 0 17.5 -7.5t7.5 -17.5v-50 q0 -10 -7.5 -17.5t-17.5 -7.5h-50q-10 0 -17.5 -7.5t-7.5 -17.5v-175h-400v300h-200v-300h-400v175q0 10 -7.5 17.5t-17.5 7.5h-50q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5h61q11 0 18 3t7 8q0 4 9 52l25 128q5 25 19 45q2 3 5 7t13.5 15t21.5 19.5t26.5 15.5 t29.5 7zM915 1079l-166 -162q-7 -7 -5 -12t12 -5h219q10 0 15 7t2 17l-51 149q-3 10 -11 12t-15 -6zM463 917l-177 157q-8 7 -16 5t-11 -12l-51 -143q-3 -10 2 -17t15 -7h231q11 0 12.5 5t-5.5 12zM500 0h-375q-10 0 -17.5 7.5t-7.5 17.5v375h400v-400zM1100 400v-375 q0 -10 -7.5 -17.5t-17.5 -7.5h-375v400h400z" />
-<glyph unicode="&#xe103;" d="M1165 1190q8 3 21 -6.5t13 -17.5q-2 -178 -24.5 -323.5t-55.5 -245.5t-87 -174.5t-102.5 -118.5t-118 -68.5t-118.5 -33t-120 -4.5t-105 9.5t-90 16.5q-61 12 -78 11q-4 1 -12.5 0t-34 -14.5t-52.5 -40.5l-153 -153q-26 -24 -37 -14.5t-11 43.5q0 64 42 102q8 8 50.5 45 t66.5 58q19 17 35 47t13 61q-9 55 -10 102.5t7 111t37 130t78 129.5q39 51 80 88t89.5 63.5t94.5 45t113.5 36t129 31t157.5 37t182 47.5zM1116 1098q-8 9 -22.5 -3t-45.5 -50q-38 -47 -119 -103.5t-142 -89.5l-62 -33q-56 -30 -102 -57t-104 -68t-102.5 -80.5t-85.5 -91 t-64 -104.5q-24 -56 -31 -86t2 -32t31.5 17.5t55.5 59.5q25 30 94 75.5t125.5 77.5t147.5 81q70 37 118.5 69t102 79.5t99 111t86.5 148.5q22 50 24 60t-6 19z" />
-<glyph unicode="&#xe104;" d="M653 1231q-39 -67 -54.5 -131t-10.5 -114.5t24.5 -96.5t47.5 -80t63.5 -62.5t68.5 -46.5t65 -30q-4 7 -17.5 35t-18.5 39.5t-17 39.5t-17 43t-13 42t-9.5 44.5t-2 42t4 43t13.5 39t23 38.5q96 -42 165 -107.5t105 -138t52 -156t13 -159t-19 -149.5q-13 -55 -44 -106.5 t-68 -87t-78.5 -64.5t-72.5 -45t-53 -22q-72 -22 -127 -11q-31 6 -13 19q6 3 17 7q13 5 32.5 21t41 44t38.5 63.5t21.5 81.5t-6.5 94.5t-50 107t-104 115.5q10 -104 -0.5 -189t-37 -140.5t-65 -93t-84 -52t-93.5 -11t-95 24.5q-80 36 -131.5 114t-53.5 171q-2 23 0 49.5 t4.5 52.5t13.5 56t27.5 60t46 64.5t69.5 68.5q-8 -53 -5 -102.5t17.5 -90t34 -68.5t44.5 -39t49 -2q31 13 38.5 36t-4.5 55t-29 64.5t-36 75t-26 75.5q-15 85 2 161.5t53.5 128.5t85.5 92.5t93.5 61t81.5 25.5z" />
-<glyph unicode="&#xe105;" d="M600 1094q82 0 160.5 -22.5t140 -59t116.5 -82.5t94.5 -95t68 -95t42.5 -82.5t14 -57.5t-14 -57.5t-43 -82.5t-68.5 -95t-94.5 -95t-116.5 -82.5t-140 -59t-159.5 -22.5t-159.5 22.5t-140 59t-116.5 82.5t-94.5 95t-68.5 95t-43 82.5t-14 57.5t14 57.5t42.5 82.5t68 95 t94.5 95t116.5 82.5t140 59t160.5 22.5zM888 829q-15 15 -18 12t5 -22q25 -57 25 -119q0 -124 -88 -212t-212 -88t-212 88t-88 212q0 59 23 114q8 19 4.5 22t-17.5 -12q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q22 -36 47 -71t70 -82t92.5 -81t113 -58.5t133.5 -24.5 t133.5 24t113 58.5t92.5 81.5t70 81.5t47 70.5q11 18 9 42.5t-14 41.5q-90 117 -163 189zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l35 34q14 15 12.5 33.5t-16.5 33.5q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
-<glyph unicode="&#xe106;" d="M592 0h-148l31 120q-91 20 -175.5 68.5t-143.5 106.5t-103.5 119t-66.5 110t-22 76q0 21 14 57.5t42.5 82.5t68 95t94.5 95t116.5 82.5t140 59t160.5 22.5q61 0 126 -15l32 121h148zM944 770l47 181q108 -85 176.5 -192t68.5 -159q0 -26 -19.5 -71t-59.5 -102t-93 -112 t-129 -104.5t-158 -75.5l46 173q77 49 136 117t97 131q11 18 9 42.5t-14 41.5q-54 70 -107 130zM310 824q-70 -69 -160 -184q-13 -16 -15 -40.5t9 -42.5q18 -30 39 -60t57 -70.5t74 -73t90 -61t105 -41.5l41 154q-107 18 -178.5 101.5t-71.5 193.5q0 59 23 114q8 19 4.5 22 t-17.5 -12zM448 727l-35 -36q-15 -15 -19.5 -38.5t4.5 -41.5q37 -68 93 -116q16 -13 38.5 -11t36.5 17l12 11l22 86l-3 4q-44 44 -89 117q-11 18 -28 20t-32 -12z" />
-<glyph unicode="&#xe107;" d="M-90 100l642 1066q20 31 48 28.5t48 -35.5l642 -1056q21 -32 7.5 -67.5t-50.5 -35.5h-1294q-37 0 -50.5 34t7.5 66zM155 200h345v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h345l-445 723zM496 700h208q20 0 32 -14.5t8 -34.5l-58 -252 q-4 -20 -21.5 -34.5t-37.5 -14.5h-54q-20 0 -37.5 14.5t-21.5 34.5l-58 252q-4 20 8 34.5t32 14.5z" />
-<glyph unicode="&#xe108;" d="M650 1200q62 0 106 -44t44 -106v-339l363 -325q15 -14 26 -38.5t11 -44.5v-41q0 -20 -12 -26.5t-29 5.5l-359 249v-263q100 -93 100 -113v-64q0 -21 -13 -29t-32 1l-205 128l-205 -128q-19 -9 -32 -1t-13 29v64q0 20 100 113v263l-359 -249q-17 -12 -29 -5.5t-12 26.5v41 q0 20 11 44.5t26 38.5l363 325v339q0 62 44 106t106 44z" />
-<glyph unicode="&#xe109;" d="M850 1200h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-150h-1100v150q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5h100q21 0 35.5 -14.5t14.5 -35.5v-50h500v50q0 21 14.5 35.5t35.5 14.5zM1100 800v-750q0 -21 -14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v750h1100zM100 600v-100h100v100h-100zM300 600v-100h100v100h-100zM500 600v-100h100v100h-100zM700 600v-100h100v100h-100zM900 600v-100h100v100h-100zM100 400v-100h100v100h-100zM300 400v-100h100v100h-100zM500 400 v-100h100v100h-100zM700 400v-100h100v100h-100zM900 400v-100h100v100h-100zM100 200v-100h100v100h-100zM300 200v-100h100v100h-100zM500 200v-100h100v100h-100zM700 200v-100h100v100h-100zM900 200v-100h100v100h-100z" />
-<glyph unicode="&#xe110;" d="M1135 1165l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-159l-600 -600h-291q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h209l600 600h241v150q0 21 10.5 25t24.5 -10zM522 819l-141 -141l-122 122h-209q-21 0 -35.5 14.5 t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h291zM1135 565l249 -230q15 -14 15 -35t-15 -35l-249 -230q-14 -14 -24.5 -10t-10.5 25v150h-241l-181 181l141 141l122 -122h159v150q0 21 10.5 25t24.5 -10z" />
-<glyph unicode="&#xe111;" d="M100 1100h1000q41 0 70.5 -29.5t29.5 -70.5v-600q0 -41 -29.5 -70.5t-70.5 -29.5h-596l-304 -300v300h-100q-41 0 -70.5 29.5t-29.5 70.5v600q0 41 29.5 70.5t70.5 29.5z" />
-<glyph unicode="&#xe112;" d="M150 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM850 1200h200q21 0 35.5 -14.5t14.5 -35.5v-250h-300v250q0 21 14.5 35.5t35.5 14.5zM1100 800v-300q0 -41 -3 -77.5t-15 -89.5t-32 -96t-58 -89t-89 -77t-129 -51t-174 -20t-174 20 t-129 51t-89 77t-58 89t-32 96t-15 89.5t-3 77.5v300h300v-250v-27v-42.5t1.5 -41t5 -38t10 -35t16.5 -30t25.5 -24.5t35 -19t46.5 -12t60 -4t60 4.5t46.5 12.5t35 19.5t25 25.5t17 30.5t10 35t5 38t2 40.5t-0.5 42v25v250h300z" />
-<glyph unicode="&#xe113;" d="M1100 411l-198 -199l-353 353l-353 -353l-197 199l551 551z" />
-<glyph unicode="&#xe114;" d="M1101 789l-550 -551l-551 551l198 199l353 -353l353 353z" />
-<glyph unicode="&#xe115;" d="M404 1000h746q21 0 35.5 -14.5t14.5 -35.5v-551h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v401h-381zM135 984l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-400h385l215 -200h-750q-21 0 -35.5 14.5 t-14.5 35.5v550h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
-<glyph unicode="&#xe116;" d="M56 1200h94q17 0 31 -11t18 -27l38 -162h896q24 0 39 -18.5t10 -42.5l-100 -475q-5 -21 -27 -42.5t-55 -21.5h-633l48 -200h535q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-50q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-300v-50 q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v50h-31q-18 0 -32.5 10t-20.5 19l-5 10l-201 961h-54q-20 0 -35 14.5t-15 35.5t15 35.5t35 14.5z" />
-<glyph unicode="&#xe117;" d="M1200 1000v-100h-1200v100h200q0 41 29.5 70.5t70.5 29.5h300q41 0 70.5 -29.5t29.5 -70.5h500zM0 800h1200v-800h-1200v800z" />
-<glyph unicode="&#xe118;" d="M200 800l-200 -400v600h200q0 41 29.5 70.5t70.5 29.5h300q42 0 71 -29.5t29 -70.5h500v-200h-1000zM1500 700l-300 -700h-1200l300 700h1200z" />
-<glyph unicode="&#xe119;" d="M635 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-601h150q21 0 25 -10.5t-10 -24.5l-230 -249q-14 -15 -35 -15t-35 15l-230 249q-14 14 -10 24.5t25 10.5h150v601h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
-<glyph unicode="&#xe120;" d="M936 864l249 -229q14 -15 14 -35.5t-14 -35.5l-249 -229q-15 -15 -25.5 -10.5t-10.5 24.5v151h-600v-151q0 -20 -10.5 -24.5t-25.5 10.5l-249 229q-14 15 -14 35.5t14 35.5l249 229q15 15 25.5 10.5t10.5 -25.5v-149h600v149q0 21 10.5 25.5t25.5 -10.5z" />
-<glyph unicode="&#xe121;" d="M1169 400l-172 732q-5 23 -23 45.5t-38 22.5h-672q-20 0 -38 -20t-23 -41l-172 -739h1138zM1100 300h-1000q-41 0 -70.5 -29.5t-29.5 -70.5v-100q0 -41 29.5 -70.5t70.5 -29.5h1000q41 0 70.5 29.5t29.5 70.5v100q0 41 -29.5 70.5t-70.5 29.5zM800 100v100h100v-100h-100 zM1000 100v100h100v-100h-100z" />
-<glyph unicode="&#xe122;" d="M1150 1100q21 0 35.5 -14.5t14.5 -35.5v-850q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v850q0 21 14.5 35.5t35.5 14.5zM1000 200l-675 200h-38l47 -276q3 -16 -5.5 -20t-29.5 -4h-7h-84q-20 0 -34.5 14t-18.5 35q-55 337 -55 351v250v6q0 16 1 23.5t6.5 14 t17.5 6.5h200l675 250v-850zM0 750v-250q-4 0 -11 0.5t-24 6t-30 15t-24 30t-11 48.5v50q0 26 10.5 46t25 30t29 16t25.5 7z" />
-<glyph unicode="&#xe123;" d="M553 1200h94q20 0 29 -10.5t3 -29.5l-18 -37q83 -19 144 -82.5t76 -140.5l63 -327l118 -173h17q19 0 33 -14.5t14 -35t-13 -40.5t-31 -27q-8 -4 -23 -9.5t-65 -19.5t-103 -25t-132.5 -20t-158.5 -9q-57 0 -115 5t-104 12t-88.5 15.5t-73.5 17.5t-54.5 16t-35.5 12l-11 4 q-18 8 -31 28t-13 40.5t14 35t33 14.5h17l118 173l63 327q15 77 76 140t144 83l-18 32q-6 19 3.5 32t28.5 13zM498 110q50 -6 102 -6q53 0 102 6q-12 -49 -39.5 -79.5t-62.5 -30.5t-63 30.5t-39 79.5z" />
-<glyph unicode="&#xe124;" d="M800 946l224 78l-78 -224l234 -45l-180 -155l180 -155l-234 -45l78 -224l-224 78l-45 -234l-155 180l-155 -180l-45 234l-224 -78l78 224l-234 45l180 155l-180 155l234 45l-78 224l224 -78l45 234l155 -180l155 180z" />
-<glyph unicode="&#xe125;" d="M650 1200h50q40 0 70 -40.5t30 -84.5v-150l-28 -125h328q40 0 70 -40.5t30 -84.5v-100q0 -45 -29 -74l-238 -344q-16 -24 -38 -40.5t-45 -16.5h-250q-7 0 -42 25t-66 50l-31 25h-61q-45 0 -72.5 18t-27.5 57v400q0 36 20 63l145 196l96 198q13 28 37.5 48t51.5 20z M650 1100l-100 -212l-150 -213v-375h100l136 -100h214l250 375v125h-450l50 225v175h-50zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe126;" d="M600 1100h250q23 0 45 -16.5t38 -40.5l238 -344q29 -29 29 -74v-100q0 -44 -30 -84.5t-70 -40.5h-328q28 -118 28 -125v-150q0 -44 -30 -84.5t-70 -40.5h-50q-27 0 -51.5 20t-37.5 48l-96 198l-145 196q-20 27 -20 63v400q0 39 27.5 57t72.5 18h61q124 100 139 100z M50 1000h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM636 1000l-136 -100h-100v-375l150 -213l100 -212h50v175l-50 225h450v125l-250 375h-214z" />
-<glyph unicode="&#xe127;" d="M356 873l363 230q31 16 53 -6l110 -112q13 -13 13.5 -32t-11.5 -34l-84 -121h302q84 0 138 -38t54 -110t-55 -111t-139 -39h-106l-131 -339q-6 -21 -19.5 -41t-28.5 -20h-342q-7 0 -90 81t-83 94v525q0 17 14 35.5t28 28.5zM400 792v-503l100 -89h293l131 339 q6 21 19.5 41t28.5 20h203q21 0 30.5 25t0.5 50t-31 25h-456h-7h-6h-5.5t-6 0.5t-5 1.5t-5 2t-4 2.5t-4 4t-2.5 4.5q-12 25 5 47l146 183l-86 83zM50 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v500 q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe128;" d="M475 1103l366 -230q2 -1 6 -3.5t14 -10.5t18 -16.5t14.5 -20t6.5 -22.5v-525q0 -13 -86 -94t-93 -81h-342q-15 0 -28.5 20t-19.5 41l-131 339h-106q-85 0 -139.5 39t-54.5 111t54 110t138 38h302l-85 121q-11 15 -10.5 34t13.5 32l110 112q22 22 53 6zM370 945l146 -183 q17 -22 5 -47q-2 -2 -3.5 -4.5t-4 -4t-4 -2.5t-5 -2t-5 -1.5t-6 -0.5h-6h-6.5h-6h-475v-100h221q15 0 29 -20t20 -41l130 -339h294l106 89v503l-342 236zM1050 800h100q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5 v500q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe129;" d="M550 1294q72 0 111 -55t39 -139v-106l339 -131q21 -6 41 -19.5t20 -28.5v-342q0 -7 -81 -90t-94 -83h-525q-17 0 -35.5 14t-28.5 28l-9 14l-230 363q-16 31 6 53l112 110q13 13 32 13.5t34 -11.5l121 -84v302q0 84 38 138t110 54zM600 972v203q0 21 -25 30.5t-50 0.5 t-25 -31v-456v-7v-6v-5.5t-0.5 -6t-1.5 -5t-2 -5t-2.5 -4t-4 -4t-4.5 -2.5q-25 -12 -47 5l-183 146l-83 -86l236 -339h503l89 100v293l-339 131q-21 6 -41 19.5t-20 28.5zM450 200h500q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-500 q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe130;" d="M350 1100h500q21 0 35.5 14.5t14.5 35.5v100q0 21 -14.5 35.5t-35.5 14.5h-500q-21 0 -35.5 -14.5t-14.5 -35.5v-100q0 -21 14.5 -35.5t35.5 -14.5zM600 306v-106q0 -84 -39 -139t-111 -55t-110 54t-38 138v302l-121 -84q-15 -12 -34 -11.5t-32 13.5l-112 110 q-22 22 -6 53l230 363q1 2 3.5 6t10.5 13.5t16.5 17t20 13.5t22.5 6h525q13 0 94 -83t81 -90v-342q0 -15 -20 -28.5t-41 -19.5zM308 900l-236 -339l83 -86l183 146q22 17 47 5q2 -1 4.5 -2.5t4 -4t2.5 -4t2 -5t1.5 -5t0.5 -6v-5.5v-6v-7v-456q0 -22 25 -31t50 0.5t25 30.5 v203q0 15 20 28.5t41 19.5l339 131v293l-89 100h-503z" />
-<glyph unicode="&#xe131;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM914 632l-275 223q-16 13 -27.5 8t-11.5 -26v-137h-275 q-10 0 -17.5 -7.5t-7.5 -17.5v-150q0 -10 7.5 -17.5t17.5 -7.5h275v-137q0 -21 11.5 -26t27.5 8l275 223q16 13 16 32t-16 32z" />
-<glyph unicode="&#xe132;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM561 855l-275 -223q-16 -13 -16 -32t16 -32l275 -223q16 -13 27.5 -8 t11.5 26v137h275q10 0 17.5 7.5t7.5 17.5v150q0 10 -7.5 17.5t-17.5 7.5h-275v137q0 21 -11.5 26t-27.5 -8z" />
-<glyph unicode="&#xe133;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM855 639l-223 275q-13 16 -32 16t-32 -16l-223 -275q-13 -16 -8 -27.5 t26 -11.5h137v-275q0 -10 7.5 -17.5t17.5 -7.5h150q10 0 17.5 7.5t7.5 17.5v275h137q21 0 26 11.5t-8 27.5z" />
-<glyph unicode="&#xe134;" d="M600 1178q118 0 225 -45.5t184.5 -123t123 -184.5t45.5 -225t-45.5 -225t-123 -184.5t-184.5 -123t-225 -45.5t-225 45.5t-184.5 123t-123 184.5t-45.5 225t45.5 225t123 184.5t184.5 123t225 45.5zM675 900h-150q-10 0 -17.5 -7.5t-7.5 -17.5v-275h-137q-21 0 -26 -11.5 t8 -27.5l223 -275q13 -16 32 -16t32 16l223 275q13 16 8 27.5t-26 11.5h-137v275q0 10 -7.5 17.5t-17.5 7.5z" />
-<glyph unicode="&#xe135;" d="M600 1176q116 0 222.5 -46t184 -123.5t123.5 -184t46 -222.5t-46 -222.5t-123.5 -184t-184 -123.5t-222.5 -46t-222.5 46t-184 123.5t-123.5 184t-46 222.5t46 222.5t123.5 184t184 123.5t222.5 46zM627 1101q-15 -12 -36.5 -20.5t-35.5 -12t-43 -8t-39 -6.5 q-15 -3 -45.5 0t-45.5 -2q-20 -7 -51.5 -26.5t-34.5 -34.5q-3 -11 6.5 -22.5t8.5 -18.5q-3 -34 -27.5 -91t-29.5 -79q-9 -34 5 -93t8 -87q0 -9 17 -44.5t16 -59.5q12 0 23 -5t23.5 -15t19.5 -14q16 -8 33 -15t40.5 -15t34.5 -12q21 -9 52.5 -32t60 -38t57.5 -11 q7 -15 -3 -34t-22.5 -40t-9.5 -38q13 -21 23 -34.5t27.5 -27.5t36.5 -18q0 -7 -3.5 -16t-3.5 -14t5 -17q104 -2 221 112q30 29 46.5 47t34.5 49t21 63q-13 8 -37 8.5t-36 7.5q-15 7 -49.5 15t-51.5 19q-18 0 -41 -0.5t-43 -1.5t-42 -6.5t-38 -16.5q-51 -35 -66 -12 q-4 1 -3.5 25.5t0.5 25.5q-6 13 -26.5 17.5t-24.5 6.5q1 15 -0.5 30.5t-7 28t-18.5 11.5t-31 -21q-23 -25 -42 4q-19 28 -8 58q6 16 22 22q6 -1 26 -1.5t33.5 -4t19.5 -13.5q7 -12 18 -24t21.5 -20.5t20 -15t15.5 -10.5l5 -3q2 12 7.5 30.5t8 34.5t-0.5 32q-3 18 3.5 29 t18 22.5t15.5 24.5q6 14 10.5 35t8 31t15.5 22.5t34 22.5q-6 18 10 36q8 0 24 -1.5t24.5 -1.5t20 4.5t20.5 15.5q-10 23 -31 42.5t-37.5 29.5t-49 27t-43.5 23q0 1 2 8t3 11.5t1.5 10.5t-1 9.5t-4.5 4.5q31 -13 58.5 -14.5t38.5 2.5l12 5q5 28 -9.5 46t-36.5 24t-50 15 t-41 20q-18 -4 -37 0zM613 994q0 -17 8 -42t17 -45t9 -23q-8 1 -39.5 5.5t-52.5 10t-37 16.5q3 11 16 29.5t16 25.5q10 -10 19 -10t14 6t13.5 14.5t16.5 12.5z" />
-<glyph unicode="&#xe136;" d="M756 1157q164 92 306 -9l-259 -138l145 -232l251 126q6 -89 -34 -156.5t-117 -110.5q-60 -34 -127 -39.5t-126 16.5l-596 -596q-15 -16 -36.5 -16t-36.5 16l-111 110q-15 15 -15 36.5t15 37.5l600 599q-34 101 5.5 201.5t135.5 154.5z" />
-<glyph unicode="&#xe137;" horiz-adv-x="1220" d="M100 1196h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 1096h-200v-100h200v100zM100 796h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 696h-500v-100h500v100zM100 396h1000q41 0 70.5 -29.5t29.5 -70.5v-100q0 -41 -29.5 -70.5t-70.5 -29.5h-1000q-41 0 -70.5 29.5t-29.5 70.5v100q0 41 29.5 70.5t70.5 29.5zM1100 296h-300v-100h300v100z " />
-<glyph unicode="&#xe138;" d="M150 1200h900q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM700 500v-300l-200 -200v500l-350 500h900z" />
-<glyph unicode="&#xe139;" d="M500 1200h200q41 0 70.5 -29.5t29.5 -70.5v-100h300q41 0 70.5 -29.5t29.5 -70.5v-400h-500v100h-200v-100h-500v400q0 41 29.5 70.5t70.5 29.5h300v100q0 41 29.5 70.5t70.5 29.5zM500 1100v-100h200v100h-200zM1200 400v-200q0 -41 -29.5 -70.5t-70.5 -29.5h-1000 q-41 0 -70.5 29.5t-29.5 70.5v200h1200z" />
-<glyph unicode="&#xe140;" d="M50 1200h300q21 0 25 -10.5t-10 -24.5l-94 -94l199 -199q7 -8 7 -18t-7 -18l-106 -106q-8 -7 -18 -7t-18 7l-199 199l-94 -94q-14 -14 -24.5 -10t-10.5 25v300q0 21 14.5 35.5t35.5 14.5zM850 1200h300q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -10.5 -25t-24.5 10l-94 94 l-199 -199q-8 -7 -18 -7t-18 7l-106 106q-7 8 -7 18t7 18l199 199l-94 94q-14 14 -10 24.5t25 10.5zM364 470l106 -106q7 -8 7 -18t-7 -18l-199 -199l94 -94q14 -14 10 -24.5t-25 -10.5h-300q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 10.5 25t24.5 -10l94 -94l199 199 q8 7 18 7t18 -7zM1071 271l94 94q14 14 24.5 10t10.5 -25v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -25 10.5t10 24.5l94 94l-199 199q-7 8 -7 18t7 18l106 106q8 7 18 7t18 -7z" />
-<glyph unicode="&#xe141;" d="M596 1192q121 0 231.5 -47.5t190 -127t127 -190t47.5 -231.5t-47.5 -231.5t-127 -190.5t-190 -127t-231.5 -47t-231.5 47t-190.5 127t-127 190.5t-47 231.5t47 231.5t127 190t190.5 127t231.5 47.5zM596 1010q-112 0 -207.5 -55.5t-151 -151t-55.5 -207.5t55.5 -207.5 t151 -151t207.5 -55.5t207.5 55.5t151 151t55.5 207.5t-55.5 207.5t-151 151t-207.5 55.5zM454.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38.5 -16.5t-38.5 16.5t-16 39t16 38.5t38.5 16zM754.5 905q22.5 0 38.5 -16t16 -38.5t-16 -39t-38 -16.5q-14 0 -29 10l-55 -145 q17 -23 17 -51q0 -36 -25.5 -61.5t-61.5 -25.5t-61.5 25.5t-25.5 61.5q0 32 20.5 56.5t51.5 29.5l122 126l1 1q-9 14 -9 28q0 23 16 39t38.5 16zM345.5 709q22.5 0 38.5 -16t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16zM854.5 709q22.5 0 38.5 -16 t16 -38.5t-16 -38.5t-38.5 -16t-38.5 16t-16 38.5t16 38.5t38.5 16z" />
-<glyph unicode="&#xe142;" d="M546 173l469 470q91 91 99 192q7 98 -52 175.5t-154 94.5q-22 4 -47 4q-34 0 -66.5 -10t-56.5 -23t-55.5 -38t-48 -41.5t-48.5 -47.5q-376 -375 -391 -390q-30 -27 -45 -41.5t-37.5 -41t-32 -46.5t-16 -47.5t-1.5 -56.5q9 -62 53.5 -95t99.5 -33q74 0 125 51l548 548 q36 36 20 75q-7 16 -21.5 26t-32.5 10q-26 0 -50 -23q-13 -12 -39 -38l-341 -338q-15 -15 -35.5 -15.5t-34.5 13.5t-14 34.5t14 34.5q327 333 361 367q35 35 67.5 51.5t78.5 16.5q14 0 29 -1q44 -8 74.5 -35.5t43.5 -68.5q14 -47 2 -96.5t-47 -84.5q-12 -11 -32 -32 t-79.5 -81t-114.5 -115t-124.5 -123.5t-123 -119.5t-96.5 -89t-57 -45q-56 -27 -120 -27q-70 0 -129 32t-93 89q-48 78 -35 173t81 163l511 511q71 72 111 96q91 55 198 55q80 0 152 -33q78 -36 129.5 -103t66.5 -154q17 -93 -11 -183.5t-94 -156.5l-482 -476 q-15 -15 -36 -16t-37 14t-17.5 34t14.5 35z" />
-<glyph unicode="&#xe143;" d="M649 949q48 68 109.5 104t121.5 38.5t118.5 -20t102.5 -64t71 -100.5t27 -123q0 -57 -33.5 -117.5t-94 -124.5t-126.5 -127.5t-150 -152.5t-146 -174q-62 85 -145.5 174t-150 152.5t-126.5 127.5t-93.5 124.5t-33.5 117.5q0 64 28 123t73 100.5t104 64t119 20 t120.5 -38.5t104.5 -104zM896 972q-33 0 -64.5 -19t-56.5 -46t-47.5 -53.5t-43.5 -45.5t-37.5 -19t-36 19t-40 45.5t-43 53.5t-54 46t-65.5 19q-67 0 -122.5 -55.5t-55.5 -132.5q0 -23 13.5 -51t46 -65t57.5 -63t76 -75l22 -22q15 -14 44 -44t50.5 -51t46 -44t41 -35t23 -12 t23.5 12t42.5 36t46 44t52.5 52t44 43q4 4 12 13q43 41 63.5 62t52 55t46 55t26 46t11.5 44q0 79 -53 133.5t-120 54.5z" />
-<glyph unicode="&#xe144;" d="M776.5 1214q93.5 0 159.5 -66l141 -141q66 -66 66 -160q0 -42 -28 -95.5t-62 -87.5l-29 -29q-31 53 -77 99l-18 18l95 95l-247 248l-389 -389l212 -212l-105 -106l-19 18l-141 141q-66 66 -66 159t66 159l283 283q65 66 158.5 66zM600 706l105 105q10 -8 19 -17l141 -141 q66 -66 66 -159t-66 -159l-283 -283q-66 -66 -159 -66t-159 66l-141 141q-66 66 -66 159.5t66 159.5l55 55q29 -55 75 -102l18 -17l-95 -95l247 -248l389 389z" />
-<glyph unicode="&#xe145;" d="M603 1200q85 0 162 -15t127 -38t79 -48t29 -46v-953q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-41 0 -70.5 29.5t-29.5 70.5v953q0 21 30 46.5t81 48t129 37.5t163 15zM300 1000v-700h600v700h-600zM600 254q-43 0 -73.5 -30.5t-30.5 -73.5t30.5 -73.5t73.5 -30.5t73.5 30.5 t30.5 73.5t-30.5 73.5t-73.5 30.5z" />
-<glyph unicode="&#xe146;" d="M902 1185l283 -282q15 -15 15 -36t-14.5 -35.5t-35.5 -14.5t-35 15l-36 35l-279 -267v-300l-212 210l-308 -307l-280 -203l203 280l307 308l-210 212h300l267 279l-35 36q-15 14 -15 35t14.5 35.5t35.5 14.5t35 -15z" />
-<glyph unicode="&#xe148;" d="M700 1248v-78q38 -5 72.5 -14.5t75.5 -31.5t71 -53.5t52 -84t24 -118.5h-159q-4 36 -10.5 59t-21 45t-40 35.5t-64.5 20.5v-307l64 -13q34 -7 64 -16.5t70 -32t67.5 -52.5t47.5 -80t20 -112q0 -139 -89 -224t-244 -97v-77h-100v79q-150 16 -237 103q-40 40 -52.5 93.5 t-15.5 139.5h139q5 -77 48.5 -126t117.5 -65v335l-27 8q-46 14 -79 26.5t-72 36t-63 52t-40 72.5t-16 98q0 70 25 126t67.5 92t94.5 57t110 27v77h100zM600 754v274q-29 -4 -50 -11t-42 -21.5t-31.5 -41.5t-10.5 -65q0 -29 7 -50.5t16.5 -34t28.5 -22.5t31.5 -14t37.5 -10 q9 -3 13 -4zM700 547v-310q22 2 42.5 6.5t45 15.5t41.5 27t29 42t12 59.5t-12.5 59.5t-38 44.5t-53 31t-66.5 24.5z" />
-<glyph unicode="&#xe149;" d="M561 1197q84 0 160.5 -40t123.5 -109.5t47 -147.5h-153q0 40 -19.5 71.5t-49.5 48.5t-59.5 26t-55.5 9q-37 0 -79 -14.5t-62 -35.5q-41 -44 -41 -101q0 -26 13.5 -63t26.5 -61t37 -66q6 -9 9 -14h241v-100h-197q8 -50 -2.5 -115t-31.5 -95q-45 -62 -99 -112 q34 10 83 17.5t71 7.5q32 1 102 -16t104 -17q83 0 136 30l50 -147q-31 -19 -58 -30.5t-55 -15.5t-42 -4.5t-46 -0.5q-23 0 -76 17t-111 32.5t-96 11.5q-39 -3 -82 -16t-67 -25l-23 -11l-55 145q4 3 16 11t15.5 10.5t13 9t15.5 12t14.5 14t17.5 18.5q48 55 54 126.5 t-30 142.5h-221v100h166q-23 47 -44 104q-7 20 -12 41.5t-6 55.5t6 66.5t29.5 70.5t58.5 71q97 88 263 88z" />
-<glyph unicode="&#xe150;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM935 1184l230 -249q14 -14 10 -24.5t-25 -10.5h-150v-900h-200v900h-150q-21 0 -25 10.5t10 24.5l230 249q14 15 35 15t35 -15z" />
-<glyph unicode="&#xe151;" d="M1000 700h-100v100h-100v-100h-100v500h300v-500zM400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM801 1100v-200h100v200h-100zM1000 350l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150z " />
-<glyph unicode="&#xe152;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 1050l-200 -250h200v-100h-300v150l200 250h-200v100h300v-150zM1000 0h-100v100h-100v-100h-100v500h300v-500zM801 400v-200h100v200h-100z " />
-<glyph unicode="&#xe153;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1000 700h-100v400h-100v100h200v-500zM1100 0h-100v100h-200v400h300v-500zM901 400v-200h100v200h-100z" />
-<glyph unicode="&#xe154;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1100 700h-100v100h-200v400h300v-500zM901 1100v-200h100v200h-100zM1000 0h-100v400h-100v100h200v-500z" />
-<glyph unicode="&#xe155;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM900 1000h-200v200h200v-200zM1000 700h-300v200h300v-200zM1100 400h-400v200h400v-200zM1200 100h-500v200h500v-200z" />
-<glyph unicode="&#xe156;" d="M400 300h150q21 0 25 -11t-10 -25l-230 -250q-14 -15 -35 -15t-35 15l-230 250q-14 14 -10 25t25 11h150v900h200v-900zM1200 1000h-500v200h500v-200zM1100 700h-400v200h400v-200zM1000 400h-300v200h300v-200zM900 100h-200v200h200v-200z" />
-<glyph unicode="&#xe157;" d="M350 1100h400q162 0 256 -93.5t94 -256.5v-400q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5z" />
-<glyph unicode="&#xe158;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-163 0 -256.5 92.5t-93.5 257.5v400q0 163 94 256.5t256 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM440 770l253 -190q17 -12 17 -30t-17 -30l-253 -190q-16 -12 -28 -6.5t-12 26.5v400q0 21 12 26.5t28 -6.5z" />
-<glyph unicode="&#xe159;" d="M350 1100h400q163 0 256.5 -94t93.5 -256v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 163 92.5 256.5t257.5 93.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM350 700h400q21 0 26.5 -12t-6.5 -28l-190 -253q-12 -17 -30 -17t-30 17l-190 253q-12 16 -6.5 28t26.5 12z" />
-<glyph unicode="&#xe160;" d="M350 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -163 -92.5 -256.5t-257.5 -93.5h-400q-163 0 -256.5 94t-93.5 256v400q0 165 92.5 257.5t257.5 92.5zM800 900h-500q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5 v500q0 41 -29.5 70.5t-70.5 29.5zM580 693l190 -253q12 -16 6.5 -28t-26.5 -12h-400q-21 0 -26.5 12t6.5 28l190 253q12 17 30 17t30 -17z" />
-<glyph unicode="&#xe161;" d="M550 1100h400q165 0 257.5 -92.5t92.5 -257.5v-400q0 -165 -92.5 -257.5t-257.5 -92.5h-400q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h450q41 0 70.5 29.5t29.5 70.5v500q0 41 -29.5 70.5t-70.5 29.5h-450q-21 0 -35.5 14.5t-14.5 35.5v100 q0 21 14.5 35.5t35.5 14.5zM338 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
-<glyph unicode="&#xe162;" d="M793 1182l9 -9q8 -10 5 -27q-3 -11 -79 -225.5t-78 -221.5l300 1q24 0 32.5 -17.5t-5.5 -35.5q-1 0 -133.5 -155t-267 -312.5t-138.5 -162.5q-12 -15 -26 -15h-9l-9 8q-9 11 -4 32q2 9 42 123.5t79 224.5l39 110h-302q-23 0 -31 19q-10 21 6 41q75 86 209.5 237.5 t228 257t98.5 111.5q9 16 25 16h9z" />
-<glyph unicode="&#xe163;" d="M350 1100h400q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-450q-41 0 -70.5 -29.5t-29.5 -70.5v-500q0 -41 29.5 -70.5t70.5 -29.5h450q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400 q0 165 92.5 257.5t257.5 92.5zM938 867l324 -284q16 -14 16 -33t-16 -33l-324 -284q-16 -14 -27 -9t-11 26v150h-250q-21 0 -35.5 14.5t-14.5 35.5v200q0 21 14.5 35.5t35.5 14.5h250v150q0 21 11 26t27 -9z" />
-<glyph unicode="&#xe164;" d="M750 1200h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -10.5 -25t-24.5 10l-109 109l-312 -312q-15 -15 -35.5 -15t-35.5 15l-141 141q-15 15 -15 35.5t15 35.5l312 312l-109 109q-14 14 -10 24.5t25 10.5zM456 900h-156q-41 0 -70.5 -29.5t-29.5 -70.5v-500 q0 -41 29.5 -70.5t70.5 -29.5h500q41 0 70.5 29.5t29.5 70.5v148l200 200v-298q0 -165 -93.5 -257.5t-256.5 -92.5h-400q-165 0 -257.5 92.5t-92.5 257.5v400q0 165 92.5 257.5t257.5 92.5h300z" />
-<glyph unicode="&#xe165;" d="M600 1186q119 0 227.5 -46.5t187 -125t125 -187t46.5 -227.5t-46.5 -227.5t-125 -187t-187 -125t-227.5 -46.5t-227.5 46.5t-187 125t-125 187t-46.5 227.5t46.5 227.5t125 187t187 125t227.5 46.5zM600 1022q-115 0 -212 -56.5t-153.5 -153.5t-56.5 -212t56.5 -212 t153.5 -153.5t212 -56.5t212 56.5t153.5 153.5t56.5 212t-56.5 212t-153.5 153.5t-212 56.5zM600 794q80 0 137 -57t57 -137t-57 -137t-137 -57t-137 57t-57 137t57 137t137 57z" />
-<glyph unicode="&#xe166;" d="M450 1200h200q21 0 35.5 -14.5t14.5 -35.5v-350h245q20 0 25 -11t-9 -26l-383 -426q-14 -15 -33.5 -15t-32.5 15l-379 426q-13 15 -8.5 26t25.5 11h250v350q0 21 14.5 35.5t35.5 14.5zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
-<glyph unicode="&#xe167;" d="M583 1182l378 -435q14 -15 9 -31t-26 -16h-244v-250q0 -20 -17 -35t-39 -15h-200q-20 0 -32 14.5t-12 35.5v250h-250q-20 0 -25.5 16.5t8.5 31.5l383 431q14 16 33.5 17t33.5 -14zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5z M900 200v-50h100v50h-100z" />
-<glyph unicode="&#xe168;" d="M396 723l369 369q7 7 17.5 7t17.5 -7l139 -139q7 -8 7 -18.5t-7 -17.5l-525 -525q-7 -8 -17.5 -8t-17.5 8l-292 291q-7 8 -7 18t7 18l139 139q8 7 18.5 7t17.5 -7zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50 h-100z" />
-<glyph unicode="&#xe169;" d="M135 1023l142 142q14 14 35 14t35 -14l77 -77l-212 -212l-77 76q-14 15 -14 36t14 35zM655 855l210 210q14 14 24.5 10t10.5 -25l-2 -599q-1 -20 -15.5 -35t-35.5 -15l-597 -1q-21 0 -25 10.5t10 24.5l208 208l-154 155l212 212zM50 300h1000q21 0 35.5 -14.5t14.5 -35.5 v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
-<glyph unicode="&#xe170;" d="M350 1200l599 -2q20 -1 35 -15.5t15 -35.5l1 -597q0 -21 -10.5 -25t-24.5 10l-208 208l-155 -154l-212 212l155 154l-210 210q-14 14 -10 24.5t25 10.5zM524 512l-76 -77q-15 -14 -36 -14t-35 14l-142 142q-14 14 -14 35t14 35l77 77zM50 300h1000q21 0 35.5 -14.5 t14.5 -35.5v-250h-1100v250q0 21 14.5 35.5t35.5 14.5zM900 200v-50h100v50h-100z" />
-<glyph unicode="&#xe171;" d="M1200 103l-483 276l-314 -399v423h-399l1196 796v-1096zM483 424v-230l683 953z" />
-<glyph unicode="&#xe172;" d="M1100 1000v-850q0 -21 -14.5 -35.5t-35.5 -14.5h-150v400h-700v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200z" />
-<glyph unicode="&#xe173;" d="M1100 1000l-2 -149l-299 -299l-95 95q-9 9 -21.5 9t-21.5 -9l-149 -147h-312v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1132 638l106 -106q7 -7 7 -17.5t-7 -17.5l-420 -421q-8 -7 -18 -7 t-18 7l-202 203q-8 7 -8 17.5t8 17.5l106 106q7 8 17.5 8t17.5 -8l79 -79l297 297q7 7 17.5 7t17.5 -7z" />
-<glyph unicode="&#xe174;" d="M1100 1000v-269l-103 -103l-134 134q-15 15 -33.5 16.5t-34.5 -12.5l-266 -266h-329v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM1202 572l70 -70q15 -15 15 -35.5t-15 -35.5l-131 -131 l131 -131q15 -15 15 -35.5t-15 -35.5l-70 -70q-15 -15 -35.5 -15t-35.5 15l-131 131l-131 -131q-15 -15 -35.5 -15t-35.5 15l-70 70q-15 15 -15 35.5t15 35.5l131 131l-131 131q-15 15 -15 35.5t15 35.5l70 70q15 15 35.5 15t35.5 -15l131 -131l131 131q15 15 35.5 15 t35.5 -15z" />
-<glyph unicode="&#xe175;" d="M1100 1000v-300h-350q-21 0 -35.5 -14.5t-14.5 -35.5v-150h-500v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM850 600h100q21 0 35.5 -14.5t14.5 -35.5v-250h150q21 0 25 -10.5t-10 -24.5 l-230 -230q-14 -14 -35 -14t-35 14l-230 230q-14 14 -10 24.5t25 10.5h150v250q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe176;" d="M1100 1000v-400l-165 165q-14 15 -35 15t-35 -15l-263 -265h-402v-400h-150q-21 0 -35.5 14.5t-14.5 35.5v1000q0 20 14.5 35t35.5 15h250v-300h500v300h100zM700 1000h-100v200h100v-200zM935 565l230 -229q14 -15 10 -25.5t-25 -10.5h-150v-250q0 -20 -14.5 -35 t-35.5 -15h-100q-21 0 -35.5 15t-14.5 35v250h-150q-21 0 -25 10.5t10 25.5l230 229q14 15 35 15t35 -15z" />
-<glyph unicode="&#xe177;" d="M50 1100h1100q21 0 35.5 -14.5t14.5 -35.5v-150h-1200v150q0 21 14.5 35.5t35.5 14.5zM1200 800v-550q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v550h1200zM100 500v-200h400v200h-400z" />
-<glyph unicode="&#xe178;" d="M935 1165l248 -230q14 -14 14 -35t-14 -35l-248 -230q-14 -14 -24.5 -10t-10.5 25v150h-400v200h400v150q0 21 10.5 25t24.5 -10zM200 800h-50q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v-200zM400 800h-100v200h100v-200zM18 435l247 230 q14 14 24.5 10t10.5 -25v-150h400v-200h-400v-150q0 -21 -10.5 -25t-24.5 10l-247 230q-15 14 -15 35t15 35zM900 300h-100v200h100v-200zM1000 500h51q20 0 34.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-34.5 -14.5h-51v200z" />
-<glyph unicode="&#xe179;" d="M862 1073l276 116q25 18 43.5 8t18.5 -41v-1106q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v397q-4 1 -11 5t-24 17.5t-30 29t-24 42t-11 56.5v359q0 31 18.5 65t43.5 52zM550 1200q22 0 34.5 -12.5t14.5 -24.5l1 -13v-450q0 -28 -10.5 -59.5 t-25 -56t-29 -45t-25.5 -31.5l-10 -11v-447q0 -21 -14.5 -35.5t-35.5 -14.5h-200q-21 0 -35.5 14.5t-14.5 35.5v447q-4 4 -11 11.5t-24 30.5t-30 46t-24 55t-11 60v450q0 2 0.5 5.5t4 12t8.5 15t14.5 12t22.5 5.5q20 0 32.5 -12.5t14.5 -24.5l3 -13v-350h100v350v5.5t2.5 12 t7 15t15 12t25.5 5.5q23 0 35.5 -12.5t13.5 -24.5l1 -13v-350h100v350q0 2 0.5 5.5t3 12t7 15t15 12t24.5 5.5z" />
-<glyph unicode="&#xe180;" d="M1200 1100v-56q-4 0 -11 -0.5t-24 -3t-30 -7.5t-24 -15t-11 -24v-888q0 -22 25 -34.5t50 -13.5l25 -2v-56h-400v56q75 0 87.5 6.5t12.5 43.5v394h-500v-394q0 -37 12.5 -43.5t87.5 -6.5v-56h-400v56q4 0 11 0.5t24 3t30 7.5t24 15t11 24v888q0 22 -25 34.5t-50 13.5 l-25 2v56h400v-56q-75 0 -87.5 -6.5t-12.5 -43.5v-394h500v394q0 37 -12.5 43.5t-87.5 6.5v56h400z" />
-<glyph unicode="&#xe181;" d="M675 1000h375q21 0 35.5 -14.5t14.5 -35.5v-150h-105l-295 -98v98l-200 200h-400l100 100h375zM100 900h300q41 0 70.5 -29.5t29.5 -70.5v-500q0 -41 -29.5 -70.5t-70.5 -29.5h-300q-41 0 -70.5 29.5t-29.5 70.5v500q0 41 29.5 70.5t70.5 29.5zM100 800v-200h300v200 h-300zM1100 535l-400 -133v163l400 133v-163zM100 500v-200h300v200h-300zM1100 398v-248q0 -21 -14.5 -35.5t-35.5 -14.5h-375l-100 -100h-375l-100 100h400l200 200h105z" />
-<glyph unicode="&#xe182;" d="M17 1007l162 162q17 17 40 14t37 -22l139 -194q14 -20 11 -44.5t-20 -41.5l-119 -118q102 -142 228 -268t267 -227l119 118q17 17 42.5 19t44.5 -12l192 -136q19 -14 22.5 -37.5t-13.5 -40.5l-163 -162q-3 -1 -9.5 -1t-29.5 2t-47.5 6t-62.5 14.5t-77.5 26.5t-90 42.5 t-101.5 60t-111 83t-119 108.5q-74 74 -133.5 150.5t-94.5 138.5t-60 119.5t-34.5 100t-15 74.5t-4.5 48z" />
-<glyph unicode="&#xe183;" d="M600 1100q92 0 175 -10.5t141.5 -27t108.5 -36.5t81.5 -40t53.5 -37t31 -27l9 -10v-200q0 -21 -14.5 -33t-34.5 -9l-202 34q-20 3 -34.5 20t-14.5 38v146q-141 24 -300 24t-300 -24v-146q0 -21 -14.5 -38t-34.5 -20l-202 -34q-20 -3 -34.5 9t-14.5 33v200q3 4 9.5 10.5 t31 26t54 37.5t80.5 39.5t109 37.5t141 26.5t175 10.5zM600 795q56 0 97 -9.5t60 -23.5t30 -28t12 -24l1 -10v-50l365 -303q14 -15 24.5 -40t10.5 -45v-212q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v212q0 20 10.5 45t24.5 40l365 303v50 q0 4 1 10.5t12 23t30 29t60 22.5t97 10z" />
-<glyph unicode="&#xe184;" d="M1100 700l-200 -200h-600l-200 200v500h200v-200h200v200h200v-200h200v200h200v-500zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5 t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe185;" d="M700 1100h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-1000h300v1000q0 41 -29.5 70.5t-70.5 29.5zM1100 800h-100q-41 0 -70.5 -29.5t-29.5 -70.5v-700h300v700q0 41 -29.5 70.5t-70.5 29.5zM400 0h-300v400q0 41 29.5 70.5t70.5 29.5h100q41 0 70.5 -29.5t29.5 -70.5v-400z " />
-<glyph unicode="&#xe186;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
-<glyph unicode="&#xe187;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 300h-100v200h-100v-200h-100v500h100v-200h100v200h100v-500zM900 700v-300l-100 -100h-200v500h200z M700 700v-300h100v300h-100z" />
-<glyph unicode="&#xe188;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-300h200v-100h-300v500h300v-100zM900 700h-200v-300h200v-100h-300v500h300v-100z" />
-<glyph unicode="&#xe189;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 400l-300 150l300 150v-300zM900 550l-300 -150v300z" />
-<glyph unicode="&#xe190;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM900 300h-700v500h700v-500zM800 700h-130q-38 0 -66.5 -43t-28.5 -108t27 -107t68 -42h130v300zM300 700v-300 h130q41 0 68 42t27 107t-28.5 108t-66.5 43h-130z" />
-<glyph unicode="&#xe191;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 700h-200v-100h200v-300h-300v100h200v100h-200v300h300v-100zM900 300h-100v400h-100v100h200v-500z M700 300h-100v100h100v-100z" />
-<glyph unicode="&#xe192;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM300 700h200v-400h-300v500h100v-100zM900 300h-100v400h-100v100h200v-500zM300 600v-200h100v200h-100z M700 300h-100v100h100v-100z" />
-<glyph unicode="&#xe193;" d="M200 1100h700q124 0 212 -88t88 -212v-500q0 -124 -88 -212t-212 -88h-700q-124 0 -212 88t-88 212v500q0 124 88 212t212 88zM100 900v-700h900v700h-900zM500 500l-199 -200h-100v50l199 200v150h-200v100h300v-300zM900 300h-100v400h-100v100h200v-500zM701 300h-100 v100h100v-100z" />
-<glyph unicode="&#xe194;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700h-300v-200h300v-100h-300l-100 100v200l100 100h300v-100z" />
-<glyph unicode="&#xe195;" d="M600 1191q120 0 229.5 -47t188.5 -126t126 -188.5t47 -229.5t-47 -229.5t-126 -188.5t-188.5 -126t-229.5 -47t-229.5 47t-188.5 126t-126 188.5t-47 229.5t47 229.5t126 188.5t188.5 126t229.5 47zM600 1021q-114 0 -211 -56.5t-153.5 -153.5t-56.5 -211t56.5 -211 t153.5 -153.5t211 -56.5t211 56.5t153.5 153.5t56.5 211t-56.5 211t-153.5 153.5t-211 56.5zM800 700v-100l-50 -50l100 -100v-50h-100l-100 100h-150v-100h-100v400h300zM500 700v-100h200v100h-200z" />
-<glyph unicode="&#xe197;" d="M503 1089q110 0 200.5 -59.5t134.5 -156.5q44 14 90 14q120 0 205 -86.5t85 -207t-85 -207t-205 -86.5h-128v250q0 21 -14.5 35.5t-35.5 14.5h-300q-21 0 -35.5 -14.5t-14.5 -35.5v-250h-222q-80 0 -136 57.5t-56 136.5q0 69 43 122.5t108 67.5q-2 19 -2 37q0 100 49 185 t134 134t185 49zM525 500h150q10 0 17.5 -7.5t7.5 -17.5v-275h137q21 0 26 -11.5t-8 -27.5l-223 -244q-13 -16 -32 -16t-32 16l-223 244q-13 16 -8 27.5t26 11.5h137v275q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe198;" d="M502 1089q110 0 201 -59.5t135 -156.5q43 15 89 15q121 0 206 -86.5t86 -206.5q0 -99 -60 -181t-150 -110l-378 360q-13 16 -31.5 16t-31.5 -16l-381 -365h-9q-79 0 -135.5 57.5t-56.5 136.5q0 69 43 122.5t108 67.5q-2 19 -2 38q0 100 49 184.5t133.5 134t184.5 49.5z M632 467l223 -228q13 -16 8 -27.5t-26 -11.5h-137v-275q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v275h-137q-21 0 -26 11.5t8 27.5q199 204 223 228q19 19 31.5 19t32.5 -19z" />
-<glyph unicode="&#xe199;" d="M700 100v100h400l-270 300h170l-270 300h170l-300 333l-300 -333h170l-270 -300h170l-270 -300h400v-100h-50q-21 0 -35.5 -14.5t-14.5 -35.5v-50h400v50q0 21 -14.5 35.5t-35.5 14.5h-50z" />
-<glyph unicode="&#xe200;" d="M600 1179q94 0 167.5 -56.5t99.5 -145.5q89 -6 150.5 -71.5t61.5 -155.5q0 -61 -29.5 -112.5t-79.5 -82.5q9 -29 9 -55q0 -74 -52.5 -126.5t-126.5 -52.5q-55 0 -100 30v-251q21 0 35.5 -14.5t14.5 -35.5v-50h-300v50q0 21 14.5 35.5t35.5 14.5v251q-45 -30 -100 -30 q-74 0 -126.5 52.5t-52.5 126.5q0 18 4 38q-47 21 -75.5 65t-28.5 97q0 74 52.5 126.5t126.5 52.5q5 0 23 -2q0 2 -1 10t-1 13q0 116 81.5 197.5t197.5 81.5z" />
-<glyph unicode="&#xe201;" d="M1010 1010q111 -111 150.5 -260.5t0 -299t-150.5 -260.5q-83 -83 -191.5 -126.5t-218.5 -43.5t-218.5 43.5t-191.5 126.5q-111 111 -150.5 260.5t0 299t150.5 260.5q83 83 191.5 126.5t218.5 43.5t218.5 -43.5t191.5 -126.5zM476 1065q-4 0 -8 -1q-121 -34 -209.5 -122.5 t-122.5 -209.5q-4 -12 2.5 -23t18.5 -14l36 -9q3 -1 7 -1q23 0 29 22q27 96 98 166q70 71 166 98q11 3 17.5 13.5t3.5 22.5l-9 35q-3 13 -14 19q-7 4 -15 4zM512 920q-4 0 -9 -2q-80 -24 -138.5 -82.5t-82.5 -138.5q-4 -13 2 -24t19 -14l34 -9q4 -1 8 -1q22 0 28 21 q18 58 58.5 98.5t97.5 58.5q12 3 18 13.5t3 21.5l-9 35q-3 12 -14 19q-7 4 -15 4zM719.5 719.5q-49.5 49.5 -119.5 49.5t-119.5 -49.5t-49.5 -119.5t49.5 -119.5t119.5 -49.5t119.5 49.5t49.5 119.5t-49.5 119.5zM855 551q-22 0 -28 -21q-18 -58 -58.5 -98.5t-98.5 -57.5 q-11 -4 -17 -14.5t-3 -21.5l9 -35q3 -12 14 -19q7 -4 15 -4q4 0 9 2q80 24 138.5 82.5t82.5 138.5q4 13 -2.5 24t-18.5 14l-34 9q-4 1 -8 1zM1000 515q-23 0 -29 -22q-27 -96 -98 -166q-70 -71 -166 -98q-11 -3 -17.5 -13.5t-3.5 -22.5l9 -35q3 -13 14 -19q7 -4 15 -4 q4 0 8 1q121 34 209.5 122.5t122.5 209.5q4 12 -2.5 23t-18.5 14l-36 9q-3 1 -7 1z" />
-<glyph unicode="&#xe202;" d="M700 800h300v-380h-180v200h-340v-200h-380v755q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM700 300h162l-212 -212l-212 212h162v200h100v-200zM520 0h-395q-10 0 -17.5 7.5t-7.5 17.5v395zM1000 220v-195q0 -10 -7.5 -17.5t-17.5 -7.5h-195z" />
-<glyph unicode="&#xe203;" d="M700 800h300v-520l-350 350l-550 -550v1095q0 10 7.5 17.5t17.5 7.5h575v-400zM1000 900h-200v200zM862 200h-162v-200h-100v200h-162l212 212zM480 0h-355q-10 0 -17.5 7.5t-7.5 17.5v55h380v-80zM1000 80v-55q0 -10 -7.5 -17.5t-17.5 -7.5h-155v80h180z" />
-<glyph unicode="&#xe204;" d="M1162 800h-162v-200h100l100 -100h-300v300h-162l212 212zM200 800h200q27 0 40 -2t29.5 -10.5t23.5 -30t7 -57.5h300v-100h-600l-200 -350v450h100q0 36 7 57.5t23.5 30t29.5 10.5t40 2zM800 400h240l-240 -400h-800l300 500h500v-100z" />
-<glyph unicode="&#xe205;" d="M650 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM1000 850v150q41 0 70.5 -29.5t29.5 -70.5v-800 q0 -41 -29.5 -70.5t-70.5 -29.5h-600q-1 0 -20 4l246 246l-326 326v324q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM412 250l-212 -212v162h-200v100h200v162z" />
-<glyph unicode="&#xe206;" d="M450 1100h100q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-300q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h50v50q0 21 14.5 35.5t35.5 14.5zM800 850v150q41 0 70.5 -29.5t29.5 -70.5v-500 h-200v-300h200q0 -36 -7 -57.5t-23.5 -30t-29.5 -10.5t-40 -2h-600q-41 0 -70.5 29.5t-29.5 70.5v800q0 41 29.5 70.5t70.5 29.5v-150q0 -62 44 -106t106 -44h300q62 0 106 44t44 106zM1212 250l-212 -212v162h-200v100h200v162z" />
-<glyph unicode="&#xe209;" d="M658 1197l637 -1104q23 -38 7 -65.5t-60 -27.5h-1276q-44 0 -60 27.5t7 65.5l637 1104q22 39 54 39t54 -39zM704 800h-208q-20 0 -32 -14.5t-8 -34.5l58 -302q4 -20 21.5 -34.5t37.5 -14.5h54q20 0 37.5 14.5t21.5 34.5l58 302q4 20 -8 34.5t-32 14.5zM500 300v-100h200 v100h-200z" />
-<glyph unicode="&#xe210;" d="M425 1100h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM825 800h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM25 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5zM425 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 500h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5 v150q0 10 7.5 17.5t17.5 7.5zM25 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM425 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5 t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM825 200h250q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-250q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe211;" d="M700 1200h100v-200h-100v-100h350q62 0 86.5 -39.5t-3.5 -94.5l-66 -132q-41 -83 -81 -134h-772q-40 51 -81 134l-66 132q-28 55 -3.5 94.5t86.5 39.5h350v100h-100v200h100v100h200v-100zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-12l137 -100 h-950l138 100h-13q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe212;" d="M600 1300q40 0 68.5 -29.5t28.5 -70.5h-194q0 41 28.5 70.5t68.5 29.5zM443 1100h314q18 -37 18 -75q0 -8 -3 -25h328q41 0 44.5 -16.5t-30.5 -38.5l-175 -145h-678l-178 145q-34 22 -29 38.5t46 16.5h328q-3 17 -3 25q0 38 18 75zM250 700h700q21 0 35.5 -14.5 t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-150v-200l275 -200h-950l275 200v200h-150q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe213;" d="M600 1181q75 0 128 -53t53 -128t-53 -128t-128 -53t-128 53t-53 128t53 128t128 53zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13 l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe214;" d="M600 1300q47 0 92.5 -53.5t71 -123t25.5 -123.5q0 -78 -55.5 -133.5t-133.5 -55.5t-133.5 55.5t-55.5 133.5q0 62 34 143l144 -143l111 111l-163 163q34 26 63 26zM602 798h46q34 0 55.5 -28.5t21.5 -86.5q0 -76 39 -183h-324q39 107 39 183q0 58 21.5 86.5t56.5 28.5h45 zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe215;" d="M600 1200l300 -161v-139h-300q0 -57 18.5 -108t50 -91.5t63 -72t70 -67.5t57.5 -61h-530q-60 83 -90.5 177.5t-30.5 178.5t33 164.5t87.5 139.5t126 96.5t145.5 41.5v-98zM250 400h700q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-13l138 -100h-950l137 100 h-12q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5zM50 100h1100q21 0 35.5 -14.5t14.5 -35.5v-50h-1200v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe216;" d="M600 1300q41 0 70.5 -29.5t29.5 -70.5v-78q46 -26 73 -72t27 -100v-50h-400v50q0 54 27 100t73 72v78q0 41 29.5 70.5t70.5 29.5zM400 800h400q54 0 100 -27t72 -73h-172v-100h200v-100h-200v-100h200v-100h-200v-100h200q0 -83 -58.5 -141.5t-141.5 -58.5h-400 q-83 0 -141.5 58.5t-58.5 141.5v400q0 83 58.5 141.5t141.5 58.5z" />
-<glyph unicode="&#xe218;" d="M150 1100h900q21 0 35.5 -14.5t14.5 -35.5v-500q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v500q0 21 14.5 35.5t35.5 14.5zM125 400h950q10 0 17.5 -7.5t7.5 -17.5v-50q0 -10 -7.5 -17.5t-17.5 -7.5h-283l224 -224q13 -13 13 -31.5t-13 -32 t-31.5 -13.5t-31.5 13l-88 88h-524l-87 -88q-13 -13 -32 -13t-32 13.5t-13 32t13 31.5l224 224h-289q-10 0 -17.5 7.5t-7.5 17.5v50q0 10 7.5 17.5t17.5 7.5zM541 300l-100 -100h324l-100 100h-124z" />
-<glyph unicode="&#xe219;" d="M200 1100h800q83 0 141.5 -58.5t58.5 -141.5v-200h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100q0 41 -29.5 70.5t-70.5 29.5h-250q-41 0 -70.5 -29.5t-29.5 -70.5h-100v200q0 83 58.5 141.5t141.5 58.5zM100 600h1000q41 0 70.5 -29.5 t29.5 -70.5v-300h-1200v300q0 41 29.5 70.5t70.5 29.5zM300 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200zM1100 100v-50q0 -21 -14.5 -35.5t-35.5 -14.5h-100q-21 0 -35.5 14.5t-14.5 35.5v50h200z" />
-<glyph unicode="&#xe221;" d="M480 1165l682 -683q31 -31 31 -75.5t-31 -75.5l-131 -131h-481l-517 518q-32 31 -32 75.5t32 75.5l295 296q31 31 75.5 31t76.5 -31zM108 794l342 -342l303 304l-341 341zM250 100h800q21 0 35.5 -14.5t14.5 -35.5v-50h-900v50q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe223;" d="M1057 647l-189 506q-8 19 -27.5 33t-40.5 14h-400q-21 0 -40.5 -14t-27.5 -33l-189 -506q-8 -19 1.5 -33t30.5 -14h625v-150q0 -21 14.5 -35.5t35.5 -14.5t35.5 14.5t14.5 35.5v150h125q21 0 30.5 14t1.5 33zM897 0h-595v50q0 21 14.5 35.5t35.5 14.5h50v50 q0 21 14.5 35.5t35.5 14.5h48v300h200v-300h47q21 0 35.5 -14.5t14.5 -35.5v-50h50q21 0 35.5 -14.5t14.5 -35.5v-50z" />
-<glyph unicode="&#xe224;" d="M900 800h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-375v591l-300 300v84q0 10 7.5 17.5t17.5 7.5h375v-400zM1200 900h-200v200zM400 600h300v-575q0 -10 -7.5 -17.5t-17.5 -7.5h-650q-10 0 -17.5 7.5t-7.5 17.5v950q0 10 7.5 17.5t17.5 7.5h375v-400zM700 700h-200v200z " />
-<glyph unicode="&#xe225;" d="M484 1095h195q75 0 146 -32.5t124 -86t89.5 -122.5t48.5 -142q18 -14 35 -20q31 -10 64.5 6.5t43.5 48.5q10 34 -15 71q-19 27 -9 43q5 8 12.5 11t19 -1t23.5 -16q41 -44 39 -105q-3 -63 -46 -106.5t-104 -43.5h-62q-7 -55 -35 -117t-56 -100l-39 -234q-3 -20 -20 -34.5 t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l12 70q-49 -14 -91 -14h-195q-24 0 -65 8l-11 -64q-3 -20 -20 -34.5t-38 -14.5h-100q-21 0 -33 14.5t-9 34.5l26 157q-84 74 -128 175l-159 53q-19 7 -33 26t-14 40v50q0 21 14.5 35.5t35.5 14.5h124q11 87 56 166l-111 95 q-16 14 -12.5 23.5t24.5 9.5h203q116 101 250 101zM675 1000h-250q-10 0 -17.5 -7.5t-7.5 -17.5v-50q0 -10 7.5 -17.5t17.5 -7.5h250q10 0 17.5 7.5t7.5 17.5v50q0 10 -7.5 17.5t-17.5 7.5z" />
-<glyph unicode="&#xe226;" d="M641 900l423 247q19 8 42 2.5t37 -21.5l32 -38q14 -15 12.5 -36t-17.5 -34l-139 -120h-390zM50 1100h106q67 0 103 -17t66 -71l102 -212h823q21 0 35.5 -14.5t14.5 -35.5v-50q0 -21 -14 -40t-33 -26l-737 -132q-23 -4 -40 6t-26 25q-42 67 -100 67h-300q-62 0 -106 44 t-44 106v200q0 62 44 106t106 44zM173 928h-80q-19 0 -28 -14t-9 -35v-56q0 -51 42 -51h134q16 0 21.5 8t5.5 24q0 11 -16 45t-27 51q-18 28 -43 28zM550 727q-32 0 -54.5 -22.5t-22.5 -54.5t22.5 -54.5t54.5 -22.5t54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5zM130 389 l152 130q18 19 34 24t31 -3.5t24.5 -17.5t25.5 -28q28 -35 50.5 -51t48.5 -13l63 5l48 -179q13 -61 -3.5 -97.5t-67.5 -79.5l-80 -69q-47 -40 -109 -35.5t-103 51.5l-130 151q-40 47 -35.5 109.5t51.5 102.5zM380 377l-102 -88q-31 -27 2 -65l37 -43q13 -15 27.5 -19.5 t31.5 6.5l61 53q19 16 14 49q-2 20 -12 56t-17 45q-11 12 -19 14t-23 -8z" />
-<glyph unicode="&#xe227;" d="M625 1200h150q10 0 17.5 -7.5t7.5 -17.5v-109q79 -33 131 -87.5t53 -128.5q1 -46 -15 -84.5t-39 -61t-46 -38t-39 -21.5l-17 -6q6 0 15 -1.5t35 -9t50 -17.5t53 -30t50 -45t35.5 -64t14.5 -84q0 -59 -11.5 -105.5t-28.5 -76.5t-44 -51t-49.5 -31.5t-54.5 -16t-49.5 -6.5 t-43.5 -1v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-100v-75q0 -10 -7.5 -17.5t-17.5 -7.5h-150q-10 0 -17.5 7.5t-7.5 17.5v75h-175q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5h75v600h-75q-10 0 -17.5 7.5t-7.5 17.5v150 q0 10 7.5 17.5t17.5 7.5h175v75q0 10 7.5 17.5t17.5 7.5h150q10 0 17.5 -7.5t7.5 -17.5v-75h100v75q0 10 7.5 17.5t17.5 7.5zM400 900v-200h263q28 0 48.5 10.5t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-263zM400 500v-200h363q28 0 48.5 10.5 t30 25t15 29t5.5 25.5l1 10q0 4 -0.5 11t-6 24t-15 30t-30 24t-48.5 11h-363z" />
-<glyph unicode="&#xe230;" d="M212 1198h780q86 0 147 -61t61 -147v-416q0 -51 -18 -142.5t-36 -157.5l-18 -66q-29 -87 -93.5 -146.5t-146.5 -59.5h-572q-82 0 -147 59t-93 147q-8 28 -20 73t-32 143.5t-20 149.5v416q0 86 61 147t147 61zM600 1045q-70 0 -132.5 -11.5t-105.5 -30.5t-78.5 -41.5 t-57 -45t-36 -41t-20.5 -30.5l-6 -12l156 -243h560l156 243q-2 5 -6 12.5t-20 29.5t-36.5 42t-57 44.5t-79 42t-105 29.5t-132.5 12zM762 703h-157l195 261z" />
-<glyph unicode="&#xe231;" d="M475 1300h150q103 0 189 -86t86 -189v-500q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
-<glyph unicode="&#xe232;" d="M475 1300h96q0 -150 89.5 -239.5t239.5 -89.5v-446q0 -41 -42 -83t-83 -42h-450q-41 0 -83 42t-42 83v500q0 103 86 189t189 86zM700 300v-225q0 -21 -27 -48t-48 -27h-150q-21 0 -48 27t-27 48v225h300z" />
-<glyph unicode="&#xe233;" d="M1294 767l-638 -283l-378 170l-78 -60v-224l100 -150v-199l-150 148l-150 -149v200l100 150v250q0 4 -0.5 10.5t0 9.5t1 8t3 8t6.5 6l47 40l-147 65l642 283zM1000 380l-350 -166l-350 166v147l350 -165l350 165v-147z" />
-<glyph unicode="&#xe234;" d="M250 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM650 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM1050 800q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
-<glyph unicode="&#xe235;" d="M550 1100q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 700q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44zM550 300q62 0 106 -44t44 -106t-44 -106t-106 -44t-106 44t-44 106t44 106t106 44z" />
-<glyph unicode="&#xe236;" d="M125 1100h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5zM125 700h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5 t17.5 7.5zM125 300h950q10 0 17.5 -7.5t7.5 -17.5v-150q0 -10 -7.5 -17.5t-17.5 -7.5h-950q-10 0 -17.5 7.5t-7.5 17.5v150q0 10 7.5 17.5t17.5 7.5z" />
-<glyph unicode="&#xe237;" d="M350 1200h500q162 0 256 -93.5t94 -256.5v-500q0 -165 -93.5 -257.5t-256.5 -92.5h-500q-165 0 -257.5 92.5t-92.5 257.5v500q0 165 92.5 257.5t257.5 92.5zM900 1000h-600q-41 0 -70.5 -29.5t-29.5 -70.5v-600q0 -41 29.5 -70.5t70.5 -29.5h600q41 0 70.5 29.5 t29.5 70.5v600q0 41 -29.5 70.5t-70.5 29.5zM350 900h500q21 0 35.5 -14.5t14.5 -35.5v-300q0 -21 -14.5 -35.5t-35.5 -14.5h-500q-21 0 -35.5 14.5t-14.5 35.5v300q0 21 14.5 35.5t35.5 14.5zM400 800v-200h400v200h-400z" />
-<glyph unicode="&#xe238;" d="M150 1100h1000q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5t-35.5 -14.5h-50v-200h50q21 0 35.5 -14.5t14.5 -35.5t-14.5 -35.5 t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5h50v200h-50q-21 0 -35.5 14.5t-14.5 35.5t14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe239;" d="M650 1187q87 -67 118.5 -156t0 -178t-118.5 -155q-87 66 -118.5 155t0 178t118.5 156zM300 800q124 0 212 -88t88 -212q-124 0 -212 88t-88 212zM1000 800q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM300 500q124 0 212 -88t88 -212q-124 0 -212 88t-88 212z M1000 500q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM700 199v-144q0 -21 -14.5 -35.5t-35.5 -14.5t-35.5 14.5t-14.5 35.5v142q40 -4 43 -4q17 0 57 6z" />
-<glyph unicode="&#xe240;" d="M745 878l69 19q25 6 45 -12l298 -295q11 -11 15 -26.5t-2 -30.5q-5 -14 -18 -23.5t-28 -9.5h-8q1 0 1 -13q0 -29 -2 -56t-8.5 -62t-20 -63t-33 -53t-51 -39t-72.5 -14h-146q-184 0 -184 288q0 24 10 47q-20 4 -62 4t-63 -4q11 -24 11 -47q0 -288 -184 -288h-142 q-48 0 -84.5 21t-56 51t-32 71.5t-16 75t-3.5 68.5q0 13 2 13h-7q-15 0 -27.5 9.5t-18.5 23.5q-6 15 -2 30.5t15 25.5l298 296q20 18 46 11l76 -19q20 -5 30.5 -22.5t5.5 -37.5t-22.5 -31t-37.5 -5l-51 12l-182 -193h891l-182 193l-44 -12q-20 -5 -37.5 6t-22.5 31t6 37.5 t31 22.5z" />
-<glyph unicode="&#xe241;" d="M1200 900h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-200v-850q0 -22 25 -34.5t50 -13.5l25 -2v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v850h-200q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h1000v-300zM500 450h-25q0 15 -4 24.5t-9 14.5t-17 7.5t-20 3t-25 0.5h-100v-425q0 -11 12.5 -17.5t25.5 -7.5h12v-50h-200v50q50 0 50 25v425h-100q-17 0 -25 -0.5t-20 -3t-17 -7.5t-9 -14.5t-4 -24.5h-25v150h500v-150z" />
-<glyph unicode="&#xe242;" d="M1000 300v50q-25 0 -55 32q-14 14 -25 31t-16 27l-4 11l-289 747h-69l-300 -754q-18 -35 -39 -56q-9 -9 -24.5 -18.5t-26.5 -14.5l-11 -5v-50h273v50q-49 0 -78.5 21.5t-11.5 67.5l69 176h293l61 -166q13 -34 -3.5 -66.5t-55.5 -32.5v-50h312zM412 691l134 342l121 -342 h-255zM1100 150v-100q0 -21 -14.5 -35.5t-35.5 -14.5h-1000q-21 0 -35.5 14.5t-14.5 35.5v100q0 21 14.5 35.5t35.5 14.5h1000q21 0 35.5 -14.5t14.5 -35.5z" />
-<glyph unicode="&#xe243;" d="M50 1200h1100q21 0 35.5 -14.5t14.5 -35.5v-1100q0 -21 -14.5 -35.5t-35.5 -14.5h-1100q-21 0 -35.5 14.5t-14.5 35.5v1100q0 21 14.5 35.5t35.5 14.5zM611 1118h-70q-13 0 -18 -12l-299 -753q-17 -32 -35 -51q-18 -18 -56 -34q-12 -5 -12 -18v-50q0 -8 5.5 -14t14.5 -6 h273q8 0 14 6t6 14v50q0 8 -6 14t-14 6q-55 0 -71 23q-10 14 0 39l63 163h266l57 -153q11 -31 -6 -55q-12 -17 -36 -17q-8 0 -14 -6t-6 -14v-50q0 -8 6 -14t14 -6h313q8 0 14 6t6 14v50q0 7 -5.5 13t-13.5 7q-17 0 -42 25q-25 27 -40 63h-1l-288 748q-5 12 -19 12zM639 611 h-197l103 264z" />
-<glyph unicode="&#xe244;" d="M1200 1100h-1200v100h1200v-100zM50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 1000h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM700 900v-300h300v300h-300z" />
-<glyph unicode="&#xe245;" d="M50 1200h400q21 0 35.5 -14.5t14.5 -35.5v-900q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v900q0 21 14.5 35.5t35.5 14.5zM650 700h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400 q0 21 14.5 35.5t35.5 14.5zM700 600v-300h300v300h-300zM1200 0h-1200v100h1200v-100z" />
-<glyph unicode="&#xe246;" d="M50 1000h400q21 0 35.5 -14.5t14.5 -35.5v-350h100v150q0 21 14.5 35.5t35.5 14.5h400q21 0 35.5 -14.5t14.5 -35.5v-150h100v-100h-100v-150q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v150h-100v-350q0 -21 -14.5 -35.5t-35.5 -14.5h-400 q-21 0 -35.5 14.5t-14.5 35.5v800q0 21 14.5 35.5t35.5 14.5zM700 700v-300h300v300h-300z" />
-<glyph unicode="&#xe247;" d="M100 0h-100v1200h100v-1200zM250 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM300 1000v-300h300v300h-300zM250 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe248;" d="M600 1100h150q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-100h450q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h350v100h-150q-21 0 -35.5 14.5 t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5h150v100h100v-100zM400 1000v-300h300v300h-300z" />
-<glyph unicode="&#xe249;" d="M1200 0h-100v1200h100v-1200zM550 1100h400q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-400q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM600 1000v-300h300v300h-300zM50 500h900q21 0 35.5 -14.5t14.5 -35.5v-400 q0 -21 -14.5 -35.5t-35.5 -14.5h-900q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5z" />
-<glyph unicode="&#xe250;" d="M865 565l-494 -494q-23 -23 -41 -23q-14 0 -22 13.5t-8 38.5v1000q0 25 8 38.5t22 13.5q18 0 41 -23l494 -494q14 -14 14 -35t-14 -35z" />
-<glyph unicode="&#xe251;" d="M335 635l494 494q29 29 50 20.5t21 -49.5v-1000q0 -41 -21 -49.5t-50 20.5l-494 494q-14 14 -14 35t14 35z" />
-<glyph unicode="&#xe252;" d="M100 900h1000q41 0 49.5 -21t-20.5 -50l-494 -494q-14 -14 -35 -14t-35 14l-494 494q-29 29 -20.5 50t49.5 21z" />
-<glyph unicode="&#xe253;" d="M635 865l494 -494q29 -29 20.5 -50t-49.5 -21h-1000q-41 0 -49.5 21t20.5 50l494 494q14 14 35 14t35 -14z" />
-<glyph unicode="&#xe254;" d="M700 741v-182l-692 -323v221l413 193l-413 193v221zM1200 0h-800v200h800v-200z" />
-<glyph unicode="&#xe255;" d="M1200 900h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300zM0 700h50q0 21 4 37t9.5 26.5t18 17.5t22 11t28.5 5.5t31 2t37 0.5h100v-550q0 -22 -25 -34.5t-50 -13.5l-25 -2v-100h400v100q-4 0 -11 0.5t-24 3t-30 7t-24 15t-11 24.5v550h100q25 0 37 -0.5t31 -2 t28.5 -5.5t22 -11t18 -17.5t9.5 -26.5t4 -37h50v300h-800v-300z" />
-<glyph unicode="&#xe256;" d="M800 700h-50q0 21 -4 37t-9.5 26.5t-18 17.5t-22 11t-28.5 5.5t-31 2t-37 0.5h-100v-550q0 -22 25 -34.5t50 -14.5l25 -1v-100h-400v100q4 0 11 0.5t24 3t30 7t24 15t11 24.5v550h-100q-25 0 -37 -0.5t-31 -2t-28.5 -5.5t-22 -11t-18 -17.5t-9.5 -26.5t-4 -37h-50v300 h800v-300zM1100 200h-200v-100h200v-100h-300v300h200v100h-200v100h300v-300z" />
-<glyph unicode="&#xe257;" d="M701 1098h160q16 0 21 -11t-7 -23l-464 -464l464 -464q12 -12 7 -23t-21 -11h-160q-13 0 -23 9l-471 471q-7 8 -7 18t7 18l471 471q10 9 23 9z" />
-<glyph unicode="&#xe258;" d="M339 1098h160q13 0 23 -9l471 -471q7 -8 7 -18t-7 -18l-471 -471q-10 -9 -23 -9h-160q-16 0 -21 11t7 23l464 464l-464 464q-12 12 -7 23t21 11z" />
-<glyph unicode="&#xe259;" d="M1087 882q11 -5 11 -21v-160q0 -13 -9 -23l-471 -471q-8 -7 -18 -7t-18 7l-471 471q-9 10 -9 23v160q0 16 11 21t23 -7l464 -464l464 464q12 12 23 7z" />
-<glyph unicode="&#xe260;" d="M618 993l471 -471q9 -10 9 -23v-160q0 -16 -11 -21t-23 7l-464 464l-464 -464q-12 -12 -23 -7t-11 21v160q0 13 9 23l471 471q8 7 18 7t18 -7z" />
-<glyph unicode="&#xf8ff;" d="M1000 1200q0 -124 -88 -212t-212 -88q0 124 88 212t212 88zM450 1000h100q21 0 40 -14t26 -33l79 -194q5 1 16 3q34 6 54 9.5t60 7t65.5 1t61 -10t56.5 -23t42.5 -42t29 -64t5 -92t-19.5 -121.5q-1 -7 -3 -19.5t-11 -50t-20.5 -73t-32.5 -81.5t-46.5 -83t-64 -70 t-82.5 -50q-13 -5 -42 -5t-65.5 2.5t-47.5 2.5q-14 0 -49.5 -3.5t-63 -3.5t-43.5 7q-57 25 -104.5 78.5t-75 111.5t-46.5 112t-26 90l-7 35q-15 63 -18 115t4.5 88.5t26 64t39.5 43.5t52 25.5t58.5 13t62.5 2t59.5 -4.5t55.5 -8l-147 192q-12 18 -5.5 30t27.5 12z" />
-<glyph unicode="&#x1f511;" d="M250 1200h600q21 0 35.5 -14.5t14.5 -35.5v-400q0 -21 -14.5 -35.5t-35.5 -14.5h-150v-500l-255 -178q-19 -9 -32 -1t-13 29v650h-150q-21 0 -35.5 14.5t-14.5 35.5v400q0 21 14.5 35.5t35.5 14.5zM400 1100v-100h300v100h-300z" />
-<glyph unicode="&#x1f6aa;" d="M250 1200h750q39 0 69.5 -40.5t30.5 -84.5v-933l-700 -117v950l600 125h-700v-1000h-100v1025q0 23 15.5 49t34.5 26zM500 525v-100l100 20v100z" />
-</font>
-</defs></svg> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf
deleted file mode 100644
index 1413fc60..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.ttf
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff
deleted file mode 100644
index 9e612858..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2 b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2
deleted file mode 100644
index 64539b54..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/fonts/glyphicons-halflings-regular.woff2
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.js b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.js
deleted file mode 100644
index 8a2e99a5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.js
+++ /dev/null
@@ -1,2377 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under the MIT license
- */
-
-if (typeof jQuery === 'undefined') {
- throw new Error('Bootstrap\'s JavaScript requires jQuery')
-}
-
-+function ($) {
- 'use strict';
- var version = $.fn.jquery.split(' ')[0].split('.')
- if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
- throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
- }
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: transition.js v3.3.7
- * http://getbootstrap.com/javascript/#transitions
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
- // ============================================================
-
- function transitionEnd() {
- var el = document.createElement('bootstrap')
-
- var transEndEventNames = {
- WebkitTransition : 'webkitTransitionEnd',
- MozTransition : 'transitionend',
- OTransition : 'oTransitionEnd otransitionend',
- transition : 'transitionend'
- }
-
- for (var name in transEndEventNames) {
- if (el.style[name] !== undefined) {
- return { end: transEndEventNames[name] }
- }
- }
-
- return false // explicit for ie8 ( ._.)
- }
-
- // http://blog.alexmaccaw.com/css-transitions
- $.fn.emulateTransitionEnd = function (duration) {
- var called = false
- var $el = this
- $(this).one('bsTransitionEnd', function () { called = true })
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
- setTimeout(callback, duration)
- return this
- }
-
- $(function () {
- $.support.transition = transitionEnd()
-
- if (!$.support.transition) return
-
- $.event.special.bsTransitionEnd = {
- bindType: $.support.transition.end,
- delegateType: $.support.transition.end,
- handle: function (e) {
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
- }
- }
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: alert.js v3.3.7
- * http://getbootstrap.com/javascript/#alerts
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // ALERT CLASS DEFINITION
- // ======================
-
- var dismiss = '[data-dismiss="alert"]'
- var Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.VERSION = '3.3.7'
-
- Alert.TRANSITION_DURATION = 150
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = $(selector === '#' ? [] : selector)
-
- if (e) e.preventDefault()
-
- if (!$parent.length) {
- $parent = $this.closest('.alert')
- }
-
- $parent.trigger(e = $.Event('close.bs.alert'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- // detach from parent, fire event then clean up data
- $parent.detach().trigger('closed.bs.alert').remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent
- .one('bsTransitionEnd', removeElement)
- .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
- removeElement()
- }
-
-
- // ALERT PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.alert')
-
- if (!data) $this.data('bs.alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.alert
-
- $.fn.alert = Plugin
- $.fn.alert.Constructor = Alert
-
-
- // ALERT NO CONFLICT
- // =================
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- // ALERT DATA-API
- // ==============
-
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: button.js v3.3.7
- * http://getbootstrap.com/javascript/#buttons
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // BUTTON PUBLIC CLASS DEFINITION
- // ==============================
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Button.DEFAULTS, options)
- this.isLoading = false
- }
-
- Button.VERSION = '3.3.7'
-
- Button.DEFAULTS = {
- loadingText: 'loading...'
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- var $el = this.$element
- var val = $el.is('input') ? 'val' : 'html'
- var data = $el.data()
-
- state += 'Text'
-
- if (data.resetText == null) $el.data('resetText', $el[val]())
-
- // push to event loop to allow forms to submit
- setTimeout($.proxy(function () {
- $el[val](data[state] == null ? this.options[state] : data[state])
-
- if (state == 'loadingText') {
- this.isLoading = true
- $el.addClass(d).attr(d, d).prop(d, true)
- } else if (this.isLoading) {
- this.isLoading = false
- $el.removeClass(d).removeAttr(d).prop(d, false)
- }
- }, this), 0)
- }
-
- Button.prototype.toggle = function () {
- var changed = true
- var $parent = this.$element.closest('[data-toggle="buttons"]')
-
- if ($parent.length) {
- var $input = this.$element.find('input')
- if ($input.prop('type') == 'radio') {
- if ($input.prop('checked')) changed = false
- $parent.find('.active').removeClass('active')
- this.$element.addClass('active')
- } else if ($input.prop('type') == 'checkbox') {
- if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
- this.$element.toggleClass('active')
- }
- $input.prop('checked', this.$element.hasClass('active'))
- if (changed) $input.trigger('change')
- } else {
- this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
- this.$element.toggleClass('active')
- }
- }
-
-
- // BUTTON PLUGIN DEFINITION
- // ========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.button')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.button', (data = new Button(this, options)))
-
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- var old = $.fn.button
-
- $.fn.button = Plugin
- $.fn.button.Constructor = Button
-
-
- // BUTTON NO CONFLICT
- // ==================
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- // BUTTON DATA-API
- // ===============
-
- $(document)
- .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- var $btn = $(e.target).closest('.btn')
- Plugin.call($btn, 'toggle')
- if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
- // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
- e.preventDefault()
- // The target component still receive the focus
- if ($btn.is('input,button')) $btn.trigger('focus')
- else $btn.find('input:visible,button:visible').first().trigger('focus')
- }
- })
- .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: carousel.js v3.3.7
- * http://getbootstrap.com/javascript/#carousel
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CAROUSEL CLASS DEFINITION
- // =========================
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.paused = null
- this.sliding = null
- this.interval = null
- this.$active = null
- this.$items = null
-
- this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
-
- this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
- .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
- .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
- }
-
- Carousel.VERSION = '3.3.7'
-
- Carousel.TRANSITION_DURATION = 600
-
- Carousel.DEFAULTS = {
- interval: 5000,
- pause: 'hover',
- wrap: true,
- keyboard: true
- }
-
- Carousel.prototype.keydown = function (e) {
- if (/input|textarea/i.test(e.target.tagName)) return
- switch (e.which) {
- case 37: this.prev(); break
- case 39: this.next(); break
- default: return
- }
-
- e.preventDefault()
- }
-
- Carousel.prototype.cycle = function (e) {
- e || (this.paused = false)
-
- this.interval && clearInterval(this.interval)
-
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
-
- return this
- }
-
- Carousel.prototype.getItemIndex = function (item) {
- this.$items = item.parent().children('.item')
- return this.$items.index(item || this.$active)
- }
-
- Carousel.prototype.getItemForDirection = function (direction, active) {
- var activeIndex = this.getItemIndex(active)
- var willWrap = (direction == 'prev' && activeIndex === 0)
- || (direction == 'next' && activeIndex == (this.$items.length - 1))
- if (willWrap && !this.options.wrap) return active
- var delta = direction == 'prev' ? -1 : 1
- var itemIndex = (activeIndex + delta) % this.$items.length
- return this.$items.eq(itemIndex)
- }
-
- Carousel.prototype.to = function (pos) {
- var that = this
- var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
- if (activeIndex == pos) return this.pause().cycle()
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
- }
-
- Carousel.prototype.pause = function (e) {
- e || (this.paused = true)
-
- if (this.$element.find('.next, .prev').length && $.support.transition) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
-
- this.interval = clearInterval(this.interval)
-
- return this
- }
-
- Carousel.prototype.next = function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- Carousel.prototype.prev = function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- Carousel.prototype.slide = function (type, next) {
- var $active = this.$element.find('.item.active')
- var $next = next || this.getItemForDirection(type, $active)
- var isCycling = this.interval
- var direction = type == 'next' ? 'left' : 'right'
- var that = this
-
- if ($next.hasClass('active')) return (this.sliding = false)
-
- var relatedTarget = $next[0]
- var slideEvent = $.Event('slide.bs.carousel', {
- relatedTarget: relatedTarget,
- direction: direction
- })
- this.$element.trigger(slideEvent)
- if (slideEvent.isDefaultPrevented()) return
-
- this.sliding = true
-
- isCycling && this.pause()
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
- $nextIndicator && $nextIndicator.addClass('active')
- }
-
- var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
- if ($.support.transition && this.$element.hasClass('slide')) {
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- $active
- .one('bsTransitionEnd', function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () {
- that.$element.trigger(slidEvent)
- }, 0)
- })
- .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
- } else {
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger(slidEvent)
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
-
- // CAROUSEL PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.carousel')
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
- var action = typeof option == 'string' ? option : options.slide
-
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- var old = $.fn.carousel
-
- $.fn.carousel = Plugin
- $.fn.carousel.Constructor = Carousel
-
-
- // CAROUSEL NO CONFLICT
- // ====================
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
-
- // CAROUSEL DATA-API
- // =================
-
- var clickHandler = function (e) {
- var href
- var $this = $(this)
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
- if (!$target.hasClass('carousel')) return
- var options = $.extend({}, $target.data(), $this.data())
- var slideIndex = $this.attr('data-slide-to')
- if (slideIndex) options.interval = false
-
- Plugin.call($target, options)
-
- if (slideIndex) {
- $target.data('bs.carousel').to(slideIndex)
- }
-
- e.preventDefault()
- }
-
- $(document)
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
-
- $(window).on('load', function () {
- $('[data-ride="carousel"]').each(function () {
- var $carousel = $(this)
- Plugin.call($carousel, $carousel.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: collapse.js v3.3.7
- * http://getbootstrap.com/javascript/#collapse
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-/* jshint latedef: false */
-
-+function ($) {
- 'use strict';
-
- // COLLAPSE PUBLIC CLASS DEFINITION
- // ================================
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Collapse.DEFAULTS, options)
- this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
- '[data-toggle="collapse"][data-target="#' + element.id + '"]')
- this.transitioning = null
-
- if (this.options.parent) {
- this.$parent = this.getParent()
- } else {
- this.addAriaAndCollapsedClass(this.$element, this.$trigger)
- }
-
- if (this.options.toggle) this.toggle()
- }
-
- Collapse.VERSION = '3.3.7'
-
- Collapse.TRANSITION_DURATION = 350
-
- Collapse.DEFAULTS = {
- toggle: true
- }
-
- Collapse.prototype.dimension = function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- Collapse.prototype.show = function () {
- if (this.transitioning || this.$element.hasClass('in')) return
-
- var activesData
- var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
-
- if (actives && actives.length) {
- activesData = actives.data('bs.collapse')
- if (activesData && activesData.transitioning) return
- }
-
- var startEvent = $.Event('show.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- if (actives && actives.length) {
- Plugin.call(actives, 'hide')
- activesData || actives.data('bs.collapse', null)
- }
-
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- .addClass('collapsing')[dimension](0)
- .attr('aria-expanded', true)
-
- this.$trigger
- .removeClass('collapsed')
- .attr('aria-expanded', true)
-
- this.transitioning = 1
-
- var complete = function () {
- this.$element
- .removeClass('collapsing')
- .addClass('collapse in')[dimension]('')
- this.transitioning = 0
- this.$element
- .trigger('shown.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- var scrollSize = $.camelCase(['scroll', dimension].join('-'))
-
- this.$element
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
- }
-
- Collapse.prototype.hide = function () {
- if (this.transitioning || !this.$element.hasClass('in')) return
-
- var startEvent = $.Event('hide.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- var dimension = this.dimension()
-
- this.$element[dimension](this.$element[dimension]())[0].offsetHeight
-
- this.$element
- .addClass('collapsing')
- .removeClass('collapse in')
- .attr('aria-expanded', false)
-
- this.$trigger
- .addClass('collapsed')
- .attr('aria-expanded', false)
-
- this.transitioning = 1
-
- var complete = function () {
- this.transitioning = 0
- this.$element
- .removeClass('collapsing')
- .addClass('collapse')
- .trigger('hidden.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- this.$element
- [dimension](0)
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
- }
-
- Collapse.prototype.toggle = function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- Collapse.prototype.getParent = function () {
- return $(this.options.parent)
- .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
- .each($.proxy(function (i, element) {
- var $element = $(element)
- this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
- }, this))
- .end()
- }
-
- Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
- var isOpen = $element.hasClass('in')
-
- $element.attr('aria-expanded', isOpen)
- $trigger
- .toggleClass('collapsed', !isOpen)
- .attr('aria-expanded', isOpen)
- }
-
- function getTargetFromTrigger($trigger) {
- var href
- var target = $trigger.attr('data-target')
- || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
-
- return $(target)
- }
-
-
- // COLLAPSE PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.collapse')
- var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
- if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.collapse
-
- $.fn.collapse = Plugin
- $.fn.collapse.Constructor = Collapse
-
-
- // COLLAPSE NO CONFLICT
- // ====================
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- // COLLAPSE DATA-API
- // =================
-
- $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
- var $this = $(this)
-
- if (!$this.attr('data-target')) e.preventDefault()
-
- var $target = getTargetFromTrigger($this)
- var data = $target.data('bs.collapse')
- var option = data ? 'toggle' : $this.data()
-
- Plugin.call($target, option)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: dropdown.js v3.3.7
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // DROPDOWN CLASS DEFINITION
- // =========================
-
- var backdrop = '.dropdown-backdrop'
- var toggle = '[data-toggle="dropdown"]'
- var Dropdown = function (element) {
- $(element).on('click.bs.dropdown', this.toggle)
- }
-
- Dropdown.VERSION = '3.3.7'
-
- function getParent($this) {
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = selector && $(selector)
-
- return $parent && $parent.length ? $parent : $this.parent()
- }
-
- function clearMenus(e) {
- if (e && e.which === 3) return
- $(backdrop).remove()
- $(toggle).each(function () {
- var $this = $(this)
- var $parent = getParent($this)
- var relatedTarget = { relatedTarget: this }
-
- if (!$parent.hasClass('open')) return
-
- if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
-
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this.attr('aria-expanded', 'false')
- $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
- })
- }
-
- Dropdown.prototype.toggle = function (e) {
- var $this = $(this)
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we use a backdrop because click events don't delegate
- $(document.createElement('div'))
- .addClass('dropdown-backdrop')
- .insertAfter($(this))
- .on('click', clearMenus)
- }
-
- var relatedTarget = { relatedTarget: this }
- $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this
- .trigger('focus')
- .attr('aria-expanded', 'true')
-
- $parent
- .toggleClass('open')
- .trigger($.Event('shown.bs.dropdown', relatedTarget))
- }
-
- return false
- }
-
- Dropdown.prototype.keydown = function (e) {
- if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
-
- var $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- if (!isActive && e.which != 27 || isActive && e.which == 27) {
- if (e.which == 27) $parent.find(toggle).trigger('focus')
- return $this.trigger('click')
- }
-
- var desc = ' li:not(.disabled):visible a'
- var $items = $parent.find('.dropdown-menu' + desc)
-
- if (!$items.length) return
-
- var index = $items.index(e.target)
-
- if (e.which == 38 && index > 0) index-- // up
- if (e.which == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items.eq(index).trigger('focus')
- }
-
-
- // DROPDOWN PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.dropdown')
-
- if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = Plugin
- $.fn.dropdown.Constructor = Dropdown
-
-
- // DROPDOWN NO CONFLICT
- // ====================
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- // APPLY TO STANDARD DROPDOWN ELEMENTS
- // ===================================
-
- $(document)
- .on('click.bs.dropdown.data-api', clearMenus)
- .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: modal.js v3.3.7
- * http://getbootstrap.com/javascript/#modals
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // MODAL CLASS DEFINITION
- // ======================
-
- var Modal = function (element, options) {
- this.options = options
- this.$body = $(document.body)
- this.$element = $(element)
- this.$dialog = this.$element.find('.modal-dialog')
- this.$backdrop = null
- this.isShown = null
- this.originalBodyPad = null
- this.scrollbarWidth = 0
- this.ignoreBackdropClick = false
-
- if (this.options.remote) {
- this.$element
- .find('.modal-content')
- .load(this.options.remote, $.proxy(function () {
- this.$element.trigger('loaded.bs.modal')
- }, this))
- }
- }
-
- Modal.VERSION = '3.3.7'
-
- Modal.TRANSITION_DURATION = 300
- Modal.BACKDROP_TRANSITION_DURATION = 150
-
- Modal.DEFAULTS = {
- backdrop: true,
- keyboard: true,
- show: true
- }
-
- Modal.prototype.toggle = function (_relatedTarget) {
- return this.isShown ? this.hide() : this.show(_relatedTarget)
- }
-
- Modal.prototype.show = function (_relatedTarget) {
- var that = this
- var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.checkScrollbar()
- this.setScrollbar()
- this.$body.addClass('modal-open')
-
- this.escape()
- this.resize()
-
- this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
-
- this.$dialog.on('mousedown.dismiss.bs.modal', function () {
- that.$element.one('mouseup.dismiss.bs.modal', function (e) {
- if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
- })
- })
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(that.$body) // don't move modals dom position
- }
-
- that.$element
- .show()
- .scrollTop(0)
-
- that.adjustDialog()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element.addClass('in')
-
- that.enforceFocus()
-
- var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
-
- transition ?
- that.$dialog // wait for modal to slide in
- .one('bsTransitionEnd', function () {
- that.$element.trigger('focus').trigger(e)
- })
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- that.$element.trigger('focus').trigger(e)
- })
- }
-
- Modal.prototype.hide = function (e) {
- if (e) e.preventDefault()
-
- e = $.Event('hide.bs.modal')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
- this.resize()
-
- $(document).off('focusin.bs.modal')
-
- this.$element
- .removeClass('in')
- .off('click.dismiss.bs.modal')
- .off('mouseup.dismiss.bs.modal')
-
- this.$dialog.off('mousedown.dismiss.bs.modal')
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.$element
- .one('bsTransitionEnd', $.proxy(this.hideModal, this))
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- this.hideModal()
- }
-
- Modal.prototype.enforceFocus = function () {
- $(document)
- .off('focusin.bs.modal') // guard against infinite focus loop
- .on('focusin.bs.modal', $.proxy(function (e) {
- if (document !== e.target &&
- this.$element[0] !== e.target &&
- !this.$element.has(e.target).length) {
- this.$element.trigger('focus')
- }
- }, this))
- }
-
- Modal.prototype.escape = function () {
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
- e.which == 27 && this.hide()
- }, this))
- } else if (!this.isShown) {
- this.$element.off('keydown.dismiss.bs.modal')
- }
- }
-
- Modal.prototype.resize = function () {
- if (this.isShown) {
- $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
- } else {
- $(window).off('resize.bs.modal')
- }
- }
-
- Modal.prototype.hideModal = function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.$body.removeClass('modal-open')
- that.resetAdjustments()
- that.resetScrollbar()
- that.$element.trigger('hidden.bs.modal')
- })
- }
-
- Modal.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- Modal.prototype.backdrop = function (callback) {
- var that = this
- var animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $(document.createElement('div'))
- .addClass('modal-backdrop ' + animate)
- .appendTo(this.$body)
-
- this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
- if (this.ignoreBackdropClick) {
- this.ignoreBackdropClick = false
- return
- }
- if (e.target !== e.currentTarget) return
- this.options.backdrop == 'static'
- ? this.$element[0].focus()
- : this.hide()
- }, this))
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop
- .one('bsTransitionEnd', callback)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- var callbackRemove = function () {
- that.removeBackdrop()
- callback && callback()
- }
- $.support.transition && this.$element.hasClass('fade') ?
- this.$backdrop
- .one('bsTransitionEnd', callbackRemove)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callbackRemove()
-
- } else if (callback) {
- callback()
- }
- }
-
- // these following methods are used to handle overflowing modals
-
- Modal.prototype.handleUpdate = function () {
- this.adjustDialog()
- }
-
- Modal.prototype.adjustDialog = function () {
- var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
-
- this.$element.css({
- paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
- paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
- })
- }
-
- Modal.prototype.resetAdjustments = function () {
- this.$element.css({
- paddingLeft: '',
- paddingRight: ''
- })
- }
-
- Modal.prototype.checkScrollbar = function () {
- var fullWindowWidth = window.innerWidth
- if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
- var documentElementRect = document.documentElement.getBoundingClientRect()
- fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
- }
- this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
- this.scrollbarWidth = this.measureScrollbar()
- }
-
- Modal.prototype.setScrollbar = function () {
- var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
- this.originalBodyPad = document.body.style.paddingRight || ''
- if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
- }
-
- Modal.prototype.resetScrollbar = function () {
- this.$body.css('padding-right', this.originalBodyPad)
- }
-
- Modal.prototype.measureScrollbar = function () { // thx walsh
- var scrollDiv = document.createElement('div')
- scrollDiv.className = 'modal-scrollbar-measure'
- this.$body.append(scrollDiv)
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
- this.$body[0].removeChild(scrollDiv)
- return scrollbarWidth
- }
-
-
- // MODAL PLUGIN DEFINITION
- // =======================
-
- function Plugin(option, _relatedTarget) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.modal')
- var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option](_relatedTarget)
- else if (options.show) data.show(_relatedTarget)
- })
- }
-
- var old = $.fn.modal
-
- $.fn.modal = Plugin
- $.fn.modal.Constructor = Modal
-
-
- // MODAL NO CONFLICT
- // =================
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- // MODAL DATA-API
- // ==============
-
- $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- var href = $this.attr('href')
- var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
- var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
- if ($this.is('a')) e.preventDefault()
-
- $target.one('show.bs.modal', function (showEvent) {
- if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
- $target.one('hidden.bs.modal', function () {
- $this.is(':visible') && $this.trigger('focus')
- })
- })
- Plugin.call($target, option, this)
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tooltip.js v3.3.7
- * http://getbootstrap.com/javascript/#tooltip
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TOOLTIP PUBLIC CLASS DEFINITION
- // ===============================
-
- var Tooltip = function (element, options) {
- this.type = null
- this.options = null
- this.enabled = null
- this.timeout = null
- this.hoverState = null
- this.$element = null
- this.inState = null
-
- this.init('tooltip', element, options)
- }
-
- Tooltip.VERSION = '3.3.7'
-
- Tooltip.TRANSITION_DURATION = 150
-
- Tooltip.DEFAULTS = {
- animation: true,
- placement: 'top',
- selector: false,
- template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
- trigger: 'hover focus',
- title: '',
- delay: 0,
- html: false,
- container: false,
- viewport: {
- selector: 'body',
- padding: 0
- }
- }
-
- Tooltip.prototype.init = function (type, element, options) {
- this.enabled = true
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
- this.inState = { click: false, hover: false, focus: false }
-
- if (this.$element[0] instanceof document.constructor && !this.options.selector) {
- throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
- }
-
- var triggers = this.options.trigger.split(' ')
-
- for (var i = triggers.length; i--;) {
- var trigger = triggers[i]
-
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
-
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- Tooltip.prototype.getDefaults = function () {
- return Tooltip.DEFAULTS
- }
-
- Tooltip.prototype.getOptions = function (options) {
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay,
- hide: options.delay
- }
- }
-
- return options
- }
-
- Tooltip.prototype.getDelegateOptions = function () {
- var options = {}
- var defaults = this.getDefaults()
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- })
-
- return options
- }
-
- Tooltip.prototype.enter = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- if (obj instanceof $.Event) {
- self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
- }
-
- if (self.tip().hasClass('in') || self.hoverState == 'in') {
- self.hoverState = 'in'
- return
- }
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'in'
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- Tooltip.prototype.isInStateTrue = function () {
- for (var key in this.inState) {
- if (this.inState[key]) return true
- }
-
- return false
- }
-
- Tooltip.prototype.leave = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- if (obj instanceof $.Event) {
- self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
- }
-
- if (self.isInStateTrue()) return
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'out'
-
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.' + this.type)
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
-
- var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
- if (e.isDefaultPrevented() || !inDom) return
- var that = this
-
- var $tip = this.tip()
-
- var tipId = this.getUID(this.type)
-
- this.setContent()
- $tip.attr('id', tipId)
- this.$element.attr('aria-describedby', tipId)
-
- if (this.options.animation) $tip.addClass('fade')
-
- var placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- var autoToken = /\s?auto?\s?/i
- var autoPlace = autoToken.test(placement)
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
- .addClass(placement)
- .data('bs.' + this.type, this)
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
- this.$element.trigger('inserted.bs.' + this.type)
-
- var pos = this.getPosition()
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (autoPlace) {
- var orgPlacement = placement
- var viewportDim = this.getPosition(this.$viewport)
-
- placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
- placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
- placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
- placement
-
- $tip
- .removeClass(orgPlacement)
- .addClass(placement)
- }
-
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
-
- this.applyPlacement(calculatedOffset, placement)
-
- var complete = function () {
- var prevHoverState = that.hoverState
- that.$element.trigger('shown.bs.' + that.type)
- that.hoverState = null
-
- if (prevHoverState == 'out') that.leave(that)
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
- }
- }
-
- Tooltip.prototype.applyPlacement = function (offset, placement) {
- var $tip = this.tip()
- var width = $tip[0].offsetWidth
- var height = $tip[0].offsetHeight
-
- // manually read margins because getBoundingClientRect includes difference
- var marginTop = parseInt($tip.css('margin-top'), 10)
- var marginLeft = parseInt($tip.css('margin-left'), 10)
-
- // we must check for NaN for ie 8/9
- if (isNaN(marginTop)) marginTop = 0
- if (isNaN(marginLeft)) marginLeft = 0
-
- offset.top += marginTop
- offset.left += marginLeft
-
- // $.fn.offset doesn't round pixel values
- // so we use setOffset directly with our own function B-0
- $.offset.setOffset($tip[0], $.extend({
- using: function (props) {
- $tip.css({
- top: Math.round(props.top),
- left: Math.round(props.left)
- })
- }
- }, offset), 0)
-
- $tip.addClass('in')
-
- // check to see if placing tip in new offset caused the tip to resize itself
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- }
-
- var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
-
- if (delta.left) offset.left += delta.left
- else offset.top += delta.top
-
- var isVertical = /top|bottom/.test(placement)
- var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
- var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
-
- $tip.offset(offset)
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
- }
-
- Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
- this.arrow()
- .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
- .css(isVertical ? 'top' : 'left', '')
- }
-
- Tooltip.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- Tooltip.prototype.hide = function (callback) {
- var that = this
- var $tip = $(this.$tip)
- var e = $.Event('hide.bs.' + this.type)
-
- function complete() {
- if (that.hoverState != 'in') $tip.detach()
- if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
- that.$element
- .removeAttr('aria-describedby')
- .trigger('hidden.bs.' + that.type)
- }
- callback && callback()
- }
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- $.support.transition && $tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
-
- this.hoverState = null
-
- return this
- }
-
- Tooltip.prototype.fixTitle = function () {
- var $e = this.$element
- if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- Tooltip.prototype.hasContent = function () {
- return this.getTitle()
- }
-
- Tooltip.prototype.getPosition = function ($element) {
- $element = $element || this.$element
-
- var el = $element[0]
- var isBody = el.tagName == 'BODY'
-
- var elRect = el.getBoundingClientRect()
- if (elRect.width == null) {
- // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
- elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
- }
- var isSvg = window.SVGElement && el instanceof window.SVGElement
- // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
- // See https://github.com/twbs/bootstrap/issues/20280
- var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
- var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
- var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
-
- return $.extend({}, elRect, scroll, outerDims, elOffset)
- }
-
- Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
-
- }
-
- Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
- var delta = { top: 0, left: 0 }
- if (!this.$viewport) return delta
-
- var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
- var viewportDimensions = this.getPosition(this.$viewport)
-
- if (/right|left/.test(placement)) {
- var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
- var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
- if (topEdgeOffset < viewportDimensions.top) { // top overflow
- delta.top = viewportDimensions.top - topEdgeOffset
- } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
- delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
- }
- } else {
- var leftEdgeOffset = pos.left - viewportPadding
- var rightEdgeOffset = pos.left + viewportPadding + actualWidth
- if (leftEdgeOffset < viewportDimensions.left) { // left overflow
- delta.left = viewportDimensions.left - leftEdgeOffset
- } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
- delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
- }
- }
-
- return delta
- }
-
- Tooltip.prototype.getTitle = function () {
- var title
- var $e = this.$element
- var o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- Tooltip.prototype.getUID = function (prefix) {
- do prefix += ~~(Math.random() * 1000000)
- while (document.getElementById(prefix))
- return prefix
- }
-
- Tooltip.prototype.tip = function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- if (this.$tip.length != 1) {
- throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
- }
- }
- return this.$tip
- }
-
- Tooltip.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
- }
-
- Tooltip.prototype.enable = function () {
- this.enabled = true
- }
-
- Tooltip.prototype.disable = function () {
- this.enabled = false
- }
-
- Tooltip.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled
- }
-
- Tooltip.prototype.toggle = function (e) {
- var self = this
- if (e) {
- self = $(e.currentTarget).data('bs.' + this.type)
- if (!self) {
- self = new this.constructor(e.currentTarget, this.getDelegateOptions())
- $(e.currentTarget).data('bs.' + this.type, self)
- }
- }
-
- if (e) {
- self.inState.click = !self.inState.click
- if (self.isInStateTrue()) self.enter(self)
- else self.leave(self)
- } else {
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
- }
- }
-
- Tooltip.prototype.destroy = function () {
- var that = this
- clearTimeout(this.timeout)
- this.hide(function () {
- that.$element.off('.' + that.type).removeData('bs.' + that.type)
- if (that.$tip) {
- that.$tip.detach()
- }
- that.$tip = null
- that.$arrow = null
- that.$viewport = null
- that.$element = null
- })
- }
-
-
- // TOOLTIP PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tooltip')
- var options = typeof option == 'object' && option
-
- if (!data && /destroy|hide/.test(option)) return
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = Plugin
- $.fn.tooltip.Constructor = Tooltip
-
-
- // TOOLTIP NO CONFLICT
- // ===================
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: popover.js v3.3.7
- * http://getbootstrap.com/javascript/#popovers
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // POPOVER PUBLIC CLASS DEFINITION
- // ===============================
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
- if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
-
- Popover.VERSION = '3.3.7'
-
- Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
- })
-
-
- // NOTE: POPOVER EXTENDS tooltip.js
- // ================================
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
-
- Popover.prototype.constructor = Popover
-
- Popover.prototype.getDefaults = function () {
- return Popover.DEFAULTS
- }
-
- Popover.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
- var content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
- this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
- ](content)
-
- $tip.removeClass('fade top bottom left right in')
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
- }
-
- Popover.prototype.hasContent = function () {
- return this.getTitle() || this.getContent()
- }
-
- Popover.prototype.getContent = function () {
- var $e = this.$element
- var o = this.options
-
- return $e.attr('data-content')
- || (typeof o.content == 'function' ?
- o.content.call($e[0]) :
- o.content)
- }
-
- Popover.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
- }
-
-
- // POPOVER PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.popover')
- var options = typeof option == 'object' && option
-
- if (!data && /destroy|hide/.test(option)) return
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.popover
-
- $.fn.popover = Plugin
- $.fn.popover.Constructor = Popover
-
-
- // POPOVER NO CONFLICT
- // ===================
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: scrollspy.js v3.3.7
- * http://getbootstrap.com/javascript/#scrollspy
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // SCROLLSPY CLASS DEFINITION
- // ==========================
-
- function ScrollSpy(element, options) {
- this.$body = $(document.body)
- this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
- this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
- this.selector = (this.options.target || '') + ' .nav li > a'
- this.offsets = []
- this.targets = []
- this.activeTarget = null
- this.scrollHeight = 0
-
- this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
- this.refresh()
- this.process()
- }
-
- ScrollSpy.VERSION = '3.3.7'
-
- ScrollSpy.DEFAULTS = {
- offset: 10
- }
-
- ScrollSpy.prototype.getScrollHeight = function () {
- return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
- }
-
- ScrollSpy.prototype.refresh = function () {
- var that = this
- var offsetMethod = 'offset'
- var offsetBase = 0
-
- this.offsets = []
- this.targets = []
- this.scrollHeight = this.getScrollHeight()
-
- if (!$.isWindow(this.$scrollElement[0])) {
- offsetMethod = 'position'
- offsetBase = this.$scrollElement.scrollTop()
- }
-
- this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- var href = $el.data('target') || $el.attr('href')
- var $href = /^#./.test(href) && $(href)
-
- return ($href
- && $href.length
- && $href.is(':visible')
- && [[$href[offsetMethod]().top + offsetBase, href]]) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- that.offsets.push(this[0])
- that.targets.push(this[1])
- })
- }
-
- ScrollSpy.prototype.process = function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- var scrollHeight = this.getScrollHeight()
- var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
- var offsets = this.offsets
- var targets = this.targets
- var activeTarget = this.activeTarget
- var i
-
- if (this.scrollHeight != scrollHeight) {
- this.refresh()
- }
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
- }
-
- if (activeTarget && scrollTop < offsets[0]) {
- this.activeTarget = null
- return this.clear()
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
- && this.activate(targets[i])
- }
- }
-
- ScrollSpy.prototype.activate = function (target) {
- this.activeTarget = target
-
- this.clear()
-
- var selector = this.selector +
- '[data-target="' + target + '"],' +
- this.selector + '[href="' + target + '"]'
-
- var active = $(selector)
- .parents('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active
- .closest('li.dropdown')
- .addClass('active')
- }
-
- active.trigger('activate.bs.scrollspy')
- }
-
- ScrollSpy.prototype.clear = function () {
- $(this.selector)
- .parentsUntil(this.options.target, '.active')
- .removeClass('active')
- }
-
-
- // SCROLLSPY PLUGIN DEFINITION
- // ===========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.scrollspy')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = Plugin
- $.fn.scrollspy.Constructor = ScrollSpy
-
-
- // SCROLLSPY NO CONFLICT
- // =====================
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- // SCROLLSPY DATA-API
- // ==================
-
- $(window).on('load.bs.scrollspy.data-api', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- Plugin.call($spy, $spy.data())
- })
- })
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: tab.js v3.3.7
- * http://getbootstrap.com/javascript/#tabs
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TAB CLASS DEFINITION
- // ====================
-
- var Tab = function (element) {
- // jscs:disable requireDollarBeforejQueryAssignment
- this.element = $(element)
- // jscs:enable requireDollarBeforejQueryAssignment
- }
-
- Tab.VERSION = '3.3.7'
-
- Tab.TRANSITION_DURATION = 150
-
- Tab.prototype.show = function () {
- var $this = this.element
- var $ul = $this.closest('ul:not(.dropdown-menu)')
- var selector = $this.data('target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- if ($this.parent('li').hasClass('active')) return
-
- var $previous = $ul.find('.active:last a')
- var hideEvent = $.Event('hide.bs.tab', {
- relatedTarget: $this[0]
- })
- var showEvent = $.Event('show.bs.tab', {
- relatedTarget: $previous[0]
- })
-
- $previous.trigger(hideEvent)
- $this.trigger(showEvent)
-
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
-
- var $target = $(selector)
-
- this.activate($this.closest('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $previous.trigger({
- type: 'hidden.bs.tab',
- relatedTarget: $this[0]
- })
- $this.trigger({
- type: 'shown.bs.tab',
- relatedTarget: $previous[0]
- })
- })
- }
-
- Tab.prototype.activate = function (element, container, callback) {
- var $active = container.find('> .active')
- var transition = callback
- && $.support.transition
- && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', false)
-
- element
- .addClass('active')
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if (element.parent('.dropdown-menu').length) {
- element
- .closest('li.dropdown')
- .addClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
- }
-
- callback && callback()
- }
-
- $active.length && transition ?
- $active
- .one('bsTransitionEnd', next)
- .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
- next()
-
- $active.removeClass('in')
- }
-
-
- // TAB PLUGIN DEFINITION
- // =====================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tab')
-
- if (!data) $this.data('bs.tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tab
-
- $.fn.tab = Plugin
- $.fn.tab.Constructor = Tab
-
-
- // TAB NO CONFLICT
- // ===============
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- // TAB DATA-API
- // ============
-
- var clickHandler = function (e) {
- e.preventDefault()
- Plugin.call($(this), 'show')
- }
-
- $(document)
- .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
- .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
-
-}(jQuery);
-
-/* ========================================================================
- * Bootstrap: affix.js v3.3.7
- * http://getbootstrap.com/javascript/#affix
- * ========================================================================
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // AFFIX CLASS DEFINITION
- // ======================
-
- var Affix = function (element, options) {
- this.options = $.extend({}, Affix.DEFAULTS, options)
-
- this.$target = $(this.options.target)
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
-
- this.$element = $(element)
- this.affixed = null
- this.unpin = null
- this.pinnedOffset = null
-
- this.checkPosition()
- }
-
- Affix.VERSION = '3.3.7'
-
- Affix.RESET = 'affix affix-top affix-bottom'
-
- Affix.DEFAULTS = {
- offset: 0,
- target: window
- }
-
- Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- var targetHeight = this.$target.height()
-
- if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
-
- if (this.affixed == 'bottom') {
- if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
- return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
- }
-
- var initializing = this.affixed == null
- var colliderTop = initializing ? scrollTop : position.top
- var colliderHeight = initializing ? targetHeight : height
-
- if (offsetTop != null && scrollTop <= offsetTop) return 'top'
- if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
-
- return false
- }
-
- Affix.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset
- this.$element.removeClass(Affix.RESET).addClass('affix')
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- return (this.pinnedOffset = position.top - scrollTop)
- }
-
- Affix.prototype.checkPositionWithEventLoop = function () {
- setTimeout($.proxy(this.checkPosition, this), 1)
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var height = this.$element.height()
- var offset = this.options.offset
- var offsetTop = offset.top
- var offsetBottom = offset.bottom
- var scrollHeight = Math.max($(document).height(), $(document.body).height())
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
-
- var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
-
- if (this.affixed != affix) {
- if (this.unpin != null) this.$element.css('top', '')
-
- var affixType = 'affix' + (affix ? '-' + affix : '')
- var e = $.Event(affixType + '.bs.affix')
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
-
- this.$element
- .removeClass(Affix.RESET)
- .addClass(affixType)
- .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
- }
-
- if (affix == 'bottom') {
- this.$element.offset({
- top: scrollHeight - height - offsetBottom
- })
- }
- }
-
-
- // AFFIX PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.affix')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.affix
-
- $.fn.affix = Plugin
- $.fn.affix.Constructor = Affix
-
-
- // AFFIX NO CONFLICT
- // =================
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- // AFFIX DATA-API
- // ==============
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- var data = $spy.data()
-
- data.offset = data.offset || {}
-
- if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
- if (data.offsetTop != null) data.offset.top = data.offsetTop
-
- Plugin.call($spy, data)
- })
- })
-
-}(jQuery);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.min.js
deleted file mode 100644
index 9bcd2fcc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under the MIT license
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){
-this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/npm.js b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/npm.js
deleted file mode 100644
index bf6aa806..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap-3.3.7/js/npm.js
+++ /dev/null
@@ -1,13 +0,0 @@
-// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
-require('../../js/transition.js')
-require('../../js/alert.js')
-require('../../js/button.js')
-require('../../js/carousel.js')
-require('../../js/collapse.js')
-require('../../js/dropdown.js')
-require('../../js/modal.js')
-require('../../js/tooltip.js')
-require('../../js/popover.js')
-require('../../js/scrollspy.js')
-require('../../js/tab.js')
-require('../../js/affix.js') \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap/bs.css b/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap/bs.css
deleted file mode 100644
index f62911f2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/bootstrap/bs.css
+++ /dev/null
@@ -1,678 +0,0 @@
-.fade {
- opacity: 0;
- -webkit-transition: opacity .15s linear;
- -o-transition: opacity .15s linear;
- transition: opacity .15s linear;
-}
-.fade.in {
- opacity: 1;
-}
-.modal-open {
- overflow: hidden;
-}
-.modal {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 99999;
- display: none;
- overflow: hidden;
- -webkit-overflow-scrolling: touch;
- outline: 0;
-}
-.modal.fade .modal-dialog {
- -webkit-transition: -webkit-transform .3s ease-out;
- -o-transition: -o-transform .3s ease-out;
- transition: transform .3s ease-out;
- -webkit-transform: translate(0, -25%);
- -ms-transform: translate(0, -25%);
- -o-transform: translate(0, -25%);
- transform: translate(0, -25%);
-}
-.modal.in .modal-dialog {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
-}
-.modal-open .modal {
- overflow-x: hidden;
- overflow-y: auto;
-}
-.modal-dialog {
- position: relative;
- width: auto;
- margin: 10px;
-}
-.modal-content {
- position: relative;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, .2);
- border-radius: 6px;
- outline: 0;
- -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
- box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
-}
-.modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 9997;
- background-color: #000;
-}
-.modal-backdrop.fade {
- filter: alpha(opacity=0);
- opacity: 0;
-}
-.modal-backdrop.in {
- filter: alpha(opacity=50);
- opacity: .5;
-}
-.modal-header {
- min-height: 16.42857143px;
- padding: 15px;
- border-bottom: 1px solid #e5e5e5;
-}
-.modal-header .close {
- margin-top: -2px;
-}
-.modal-title {
- margin: 0;
- line-height: 1.42857143;
-}
-.modal-body {
- position: relative;
- padding: 15px;
-}
-.modal-footer {
- padding: 15px;
- text-align: right;
- border-top: 1px solid #e5e5e5;
-}
-.modal-footer .btn + .btn {
- margin-bottom: 0;
- margin-left: 5px;
-}
-.modal-footer .btn-group .btn + .btn {
- margin-left: -1px;
-}
-.modal-footer .btn-block + .btn-block {
- margin-left: 0;
-}
-.modal-scrollbar-measure {
- position: absolute;
- top: -9999px;
- width: 50px;
- height: 50px;
- overflow: scroll;
-}
-@media (min-width: 768px) {
- .modal-dialog {
- width: 600px;
- margin: 30px auto;
- }
- .modal-content {
- -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
- box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
- }
- .modal-sm {
- width: 300px;
- }
-}
-@media (min-width: 992px) {
- .modal-lg {
- width: 1100px;
-/* width: 900px; */
- }
-}
-.btn {
- display: inline-block;
- padding: 6px 12px;
- margin-bottom: 0;
- font-size: 14px;
- font-weight: normal;
- line-height: 1.42857143;
- text-align: center;
- white-space: nowrap;
- vertical-align: middle;
- -ms-touch-action: manipulation;
- touch-action: manipulation;
- cursor: pointer;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.btn:focus,
-.btn:active:focus,
-.btn.active:focus,
-.btn.focus,
-.btn:active.focus,
-.btn.active.focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.btn:hover,
-.btn:focus,
-.btn.focus {
- color: #333;
- text-decoration: none;
-}
-.btn:active,
-.btn.active {
- background-image: none;
- outline: 0;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
-}
-.btn.disabled,
-.btn[disabled],
-fieldset[disabled] .btn {
- cursor: not-allowed;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
- opacity: .65;
-}
-a.btn.disabled,
-fieldset[disabled] a.btn {
- pointer-events: none;
-}
-.btn-default {
- color: #333;
- background-color: #fff;
- border-color: #ccc;
-}
-.btn-default:focus,
-.btn-default.focus {
- color: #333;
- background-color: #e6e6e6;
- border-color: #8c8c8c;
-}
-.btn-default:hover {
- color: #333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- color: #333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active:hover,
-.btn-default.active:hover,
-.open > .dropdown-toggle.btn-default:hover,
-.btn-default:active:focus,
-.btn-default.active:focus,
-.open > .dropdown-toggle.btn-default:focus,
-.btn-default:active.focus,
-.btn-default.active.focus,
-.open > .dropdown-toggle.btn-default.focus {
- color: #333;
- background-color: #d4d4d4;
- border-color: #8c8c8c;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- background-image: none;
-}
-.btn-default.disabled,
-.btn-default[disabled],
-fieldset[disabled] .btn-default,
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus,
-.btn-default.disabled:active,
-.btn-default[disabled]:active,
-fieldset[disabled] .btn-default:active,
-.btn-default.disabled.active,
-.btn-default[disabled].active,
-fieldset[disabled] .btn-default.active {
- background-color: #fff;
- border-color: #ccc;
-}
-.btn-default .badge {
- color: #fff;
- background-color: #333;
-}
-.btn-primary {
- color: #fff;
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary:focus,
-.btn-primary.focus {
- color: #fff;
- background-color: #286090;
- border-color: #122b40;
-}
-.btn-primary:hover {
- color: #fff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- color: #fff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active:hover,
-.btn-primary.active:hover,
-.open > .dropdown-toggle.btn-primary:hover,
-.btn-primary:active:focus,
-.btn-primary.active:focus,
-.open > .dropdown-toggle.btn-primary:focus,
-.btn-primary:active.focus,
-.btn-primary.active.focus,
-.open > .dropdown-toggle.btn-primary.focus {
- color: #fff;
- background-color: #204d74;
- border-color: #122b40;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- background-image: none;
-}
-.btn-primary.disabled,
-.btn-primary[disabled],
-fieldset[disabled] .btn-primary,
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus,
-.btn-primary.disabled:active,
-.btn-primary[disabled]:active,
-fieldset[disabled] .btn-primary:active,
-.btn-primary.disabled.active,
-.btn-primary[disabled].active,
-fieldset[disabled] .btn-primary.active {
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary .badge {
- color: #337ab7;
- background-color: #fff;
-}
-.btn-success {
- color: #fff;
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success:focus,
-.btn-success.focus {
- color: #fff;
- background-color: #449d44;
- border-color: #255625;
-}
-.btn-success:hover {
- color: #fff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- color: #fff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active:hover,
-.btn-success.active:hover,
-.open > .dropdown-toggle.btn-success:hover,
-.btn-success:active:focus,
-.btn-success.active:focus,
-.open > .dropdown-toggle.btn-success:focus,
-.btn-success:active.focus,
-.btn-success.active.focus,
-.open > .dropdown-toggle.btn-success.focus {
- color: #fff;
- background-color: #398439;
- border-color: #255625;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- background-image: none;
-}
-.btn-success.disabled,
-.btn-success[disabled],
-fieldset[disabled] .btn-success,
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus,
-.btn-success.disabled:active,
-.btn-success[disabled]:active,
-fieldset[disabled] .btn-success:active,
-.btn-success.disabled.active,
-.btn-success[disabled].active,
-fieldset[disabled] .btn-success.active {
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success .badge {
- color: #5cb85c;
- background-color: #fff;
-}
-.btn-info {
- color: #fff;
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info:focus,
-.btn-info.focus {
- color: #fff;
- background-color: #31b0d5;
- border-color: #1b6d85;
-}
-.btn-info:hover {
- color: #fff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- color: #fff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active:hover,
-.btn-info.active:hover,
-.open > .dropdown-toggle.btn-info:hover,
-.btn-info:active:focus,
-.btn-info.active:focus,
-.open > .dropdown-toggle.btn-info:focus,
-.btn-info:active.focus,
-.btn-info.active.focus,
-.open > .dropdown-toggle.btn-info.focus {
- color: #fff;
- background-color: #269abc;
- border-color: #1b6d85;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- background-image: none;
-}
-.btn-info.disabled,
-.btn-info[disabled],
-fieldset[disabled] .btn-info,
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus,
-.btn-info.disabled:active,
-.btn-info[disabled]:active,
-fieldset[disabled] .btn-info:active,
-.btn-info.disabled.active,
-.btn-info[disabled].active,
-fieldset[disabled] .btn-info.active {
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info .badge {
- color: #5bc0de;
- background-color: #fff;
-}
-.btn-warning {
- color: #fff;
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning:focus,
-.btn-warning.focus {
- color: #fff;
- background-color: #ec971f;
- border-color: #985f0d;
-}
-.btn-warning:hover {
- color: #fff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- color: #fff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active:hover,
-.btn-warning.active:hover,
-.open > .dropdown-toggle.btn-warning:hover,
-.btn-warning:active:focus,
-.btn-warning.active:focus,
-.open > .dropdown-toggle.btn-warning:focus,
-.btn-warning:active.focus,
-.btn-warning.active.focus,
-.open > .dropdown-toggle.btn-warning.focus {
- color: #fff;
- background-color: #d58512;
- border-color: #985f0d;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- background-image: none;
-}
-.btn-warning.disabled,
-.btn-warning[disabled],
-fieldset[disabled] .btn-warning,
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus,
-.btn-warning.disabled:active,
-.btn-warning[disabled]:active,
-fieldset[disabled] .btn-warning:active,
-.btn-warning.disabled.active,
-.btn-warning[disabled].active,
-fieldset[disabled] .btn-warning.active {
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning .badge {
- color: #f0ad4e;
- background-color: #fff;
-}
-.btn-danger {
- color: #fff;
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger:focus,
-.btn-danger.focus {
- color: #fff;
- background-color: #c9302c;
- border-color: #761c19;
-}
-.btn-danger:hover {
- color: #fff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- color: #fff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active:hover,
-.btn-danger.active:hover,
-.open > .dropdown-toggle.btn-danger:hover,
-.btn-danger:active:focus,
-.btn-danger.active:focus,
-.open > .dropdown-toggle.btn-danger:focus,
-.btn-danger:active.focus,
-.btn-danger.active.focus,
-.open > .dropdown-toggle.btn-danger.focus {
- color: #fff;
- background-color: #ac2925;
- border-color: #761c19;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- background-image: none;
-}
-.btn-danger.disabled,
-.btn-danger[disabled],
-fieldset[disabled] .btn-danger,
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus,
-.btn-danger.disabled:active,
-.btn-danger[disabled]:active,
-fieldset[disabled] .btn-danger:active,
-.btn-danger.disabled.active,
-.btn-danger[disabled].active,
-fieldset[disabled] .btn-danger.active {
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger .badge {
- color: #d9534f;
- background-color: #fff;
-}
-.btn-link {
- font-weight: normal;
- color: #337ab7;
- border-radius: 0;
-}
-.btn-link,
-.btn-link:active,
-.btn-link.active,
-.btn-link[disabled],
-fieldset[disabled] .btn-link {
- background-color: transparent;
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-.btn-link,
-.btn-link:hover,
-.btn-link:focus,
-.btn-link:active {
- border-color: transparent;
-}
-.btn-link:hover,
-.btn-link:focus {
- color: #23527c;
- text-decoration: underline;
- background-color: transparent;
-}
-.btn-link[disabled]:hover,
-fieldset[disabled] .btn-link:hover,
-.btn-link[disabled]:focus,
-fieldset[disabled] .btn-link:focus {
- color: #777;
- text-decoration: none;
-}
-.btn-lg,
-.btn-group-lg > .btn {
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-.btn-sm,
-.btn-group-sm > .btn {
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-xs,
-.btn-group-xs > .btn {
- padding: 1px 5px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-block {
- display: block;
- width: 100%;
-}
-.btn-block + .btn-block {
- margin-top: 5px;
-}
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
- width: 100%;
-}
-.close {
- float: right;
- font-size: 21px;
- font-weight: bold;
- line-height: 1;
- color: #000;
- text-shadow: 0 1px 0 #fff;
- filter: alpha(opacity=20);
- opacity: .2;
-}
-.close:hover,
-.close:focus {
- color: #000;
- text-decoration: none;
- cursor: pointer;
- filter: alpha(opacity=50);
- opacity: .5;
-}
-button.close {
- -webkit-appearance: none;
- padding: 0;
- cursor: pointer;
- background: transparent;
- border: 0;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/css/nv.d3.css b/usecaseui-common/src/main/webapp/app/fusion/external/d3/css/nv.d3.css
deleted file mode 100644
index 28ccd053..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/css/nv.d3.css
+++ /dev/null
@@ -1,656 +0,0 @@
-
-/********************
- * HTML CSS
- */
-
-
-.chartWrap {
- margin: 0;
- padding: 0;
- overflow: hidden;
-}
-
-
-/********************
- * TOOLTIP CSS
- */
-
-.nvtooltip {
- position: absolute;
- background-color: rgba(255,255,255,1);
- padding: 10px;
- border: 1px solid #ddd;
- z-index: 10000;
-
- font-family: Arial;
- font-size: 13px;
-
- transition: opacity 500ms linear;
- -moz-transition: opacity 500ms linear;
- -webkit-transition: opacity 500ms linear;
-
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
-
- -moz-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- -webkit-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- box-shadow: 4px 4px 8px rgba(0,0,0,.5);
-
- -moz-border-radius: 10px;
- border-radius: 10px;
-
- pointer-events: none;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.nvtooltip h3 {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip p {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip span {
- display: inline-block;
- margin: 2px 0;
-}
-
-.nvtooltip-pending-removal {
- position: absolute;
- pointer-events: none;
-}
-
-
-/********************
- * SVG CSS
- */
-
-
-svg {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* Trying to get SVG to act like a greedy block in all browsers */
- display: block;
- width:100%;
- height:100%;
-}
-
-
-svg text {
- font: normal 12px Arial;
-}
-
-svg .title {
- font: bold 14px Arial;
-}
-
-.nvd3 .nv-background {
- fill: white;
- fill-opacity: 0;
- /*
- pointer-events: none;
- */
-}
-
-.nvd3.nv-noData {
- font-size: 18px;
- font-weight: bolf;
-}
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .extent {
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-
-
-/**********
-* Legend
-*/
-
-.nvd3 .nv-legend .nv-series {
- cursor: pointer;
-}
-
-.nvd3 .nv-legend .disabled circle {
- fill-opacity: 0;
-}
-
-
-
-/**********
-* Axes
-*/
-
-.nvd3 .nv-axis path {
- fill: none;
- stroke: #000;
- stroke-opacity: .75;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis path.domain {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis.nv-x path.domain {
- stroke-opacity: 0;
-}
-
-.nvd3 .nv-axis line {
- fill: none;
- stroke: #000;
- stroke-opacity: .25;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis line.zero {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis .nv-axisMaxMin text {
- font-weight: bold;
-}
-
-.nvd3 .x .nv-axis .nv-axisMaxMin text,
-.nvd3 .x2 .nv-axis .nv-axisMaxMin text,
-.nvd3 .x3 .nv-axis .nv-axisMaxMin text {
- text-anchor: middle
-}
-
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .resize path {
- fill: #eee;
- stroke: #666;
-}
-
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-bars .negative rect {
- zfill: brown;
-}
-
-.nvd3 .nv-bars rect {
- zfill: steelblue;
- fill-opacity: .75;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-bars rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-bars .hover rect {
- fill: lightblue;
-}
-
-.nvd3 .nv-bars text {
- fill: rgba(0,0,0,0);
-}
-
-.nvd3 .nv-bars .hover text {
- fill: rgba(0,0,0,1);
-}
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-multibar .nv-groups rect,
-.nvd3 .nv-multibarHorizontal .nv-groups rect,
-.nvd3 .nv-discretebar .nv-groups rect {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-multibar .nv-groups rect:hover,
-.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,
-.nvd3 .nv-discretebar .nv-groups rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-discretebar .nv-groups text,
-.nvd3 .nv-multibarHorizontal .nv-groups text {
- font-weight: bold;
- fill: rgba(0,0,0,1);
- stroke: rgba(0,0,0,0);
-}
-
-/***********
-* Pie Chart
-*/
-
-.nvd3.nv-pie path {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
-
-}
-
-.nvd3.nv-pie .nv-slice text {
- stroke: #000;
- stroke-width: 0;
-}
-
-.nvd3.nv-pie path {
- stroke: #fff;
- stroke-width: 1px;
- stroke-opacity: 1;
-}
-
-.nvd3.nv-pie .hover path {
- fill-opacity: .7;
-/*
- stroke-width: 6px;
- stroke-opacity: 1;
-*/
-}
-
-.nvd3.nv-pie .nv-label rect {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-/**********
-* Lines
-*/
-
-.nvd3 .nv-groups path.nv-line {
- fill: none;
- stroke-width: 2.5px;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-groups path.nv-area {
- stroke: none;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- stroke-width: 2.5px;
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-line.hover path {
- stroke-width: 6px;
-}
-
-/*
-.nvd3.scatter .groups .point {
- fill-opacity: 0.1;
- stroke-opacity: 0.1;
-}
- */
-
-.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-groups .nv-point {
- transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
-}
-
-.nvd3.nv-scatter .nv-groups .nv-point.hover,
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-point-paths path {
- stroke: #aaa;
- stroke-opacity: 0;
- fill: #eee;
- fill-opacity: 0;
-}
-
-
-
-.nvd3 .nv-indexLine {
- cursor: ew-resize;
-}
-
-
-/**********
-* Distribution
-*/
-
-.nvd3 .nv-distribution {
- pointer-events: none;
-}
-
-
-
-/**********
-* Scatter
-*/
-
-/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere
-.nvd3 .nv-groups .nv-point {
- pointer-events: none;
-}
-*/
-
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .5;
-}
-
-.nvd3 .nv-scatter .nv-point.hover {
- fill-opacity: 1;
-}
-
-/*
-.nv-group.hover .nv-point {
- fill-opacity: 1;
-}
-*/
-
-
-/**********
-* Stacked Area
-*/
-
-.nvd3.nv-stackedarea path.nv-area {
- fill-opacity: .7;
- /*
- stroke-opacity: .65;
- fill-opacity: 1;
- */
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
-
- /*
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
- */
-
-}
-
-.nvd3.nv-stackedarea path.nv-area.hover {
- fill-opacity: .9;
- /*
- stroke-opacity: .85;
- */
-}
-/*
-.d3stackedarea .groups path {
- stroke-opacity: 0;
-}
- */
-
-
-
-.nvd3.nv-stackedarea .nv-groups .nv-point {
- stroke-opacity: 0;
- fill-opacity: 0;
-}
-
-.nvd3.nv-stackedarea .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .75;
- fill-opacity: 1;
-}
-
-
-
-/**********
-* Line Plus Bar
-*/
-
-.nvd3.nv-linePlusBar .nv-bar rect {
- fill-opacity: .75;
-}
-
-.nvd3.nv-linePlusBar .nv-bar rect:hover {
- fill-opacity: 1;
-}
-
-
-/**********
-* Bullet
-*/
-
-.nvd3.nv-bullet { font: 10px sans-serif; }
-.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
-.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
-.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
-.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; }
-.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
-.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
-.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
-.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
-.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
-.nvd3.nv-bullet .nv-subtitle { fill: #999; }
-
-
-.nvd3.nv-bullet .nv-range {
- fill: #999;
- fill-opacity: .4;
-}
-.nvd3.nv-bullet .nv-range:hover {
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Sparkline
-*/
-
-.nvd3.nv-sparkline path {
- fill: none;
-}
-
-.nvd3.nv-sparklineplus g.nv-hoverValue {
- pointer-events: none;
-}
-
-.nvd3.nv-sparklineplus .nv-hoverValue line {
- stroke: #333;
- stroke-width: 1.5px;
- }
-
-.nvd3.nv-sparklineplus,
-.nvd3.nv-sparklineplus g {
- pointer-events: all;
-}
-
-.nvd3 .nv-hoverArea {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-sparklineplus .nv-xValue,
-.nvd3.nv-sparklineplus .nv-yValue {
- /*
- stroke: #666;
- */
- stroke-width: 0;
- font-size: .9em;
- font-weight: normal;
-}
-
-.nvd3.nv-sparklineplus .nv-yValue {
- stroke: #f66;
-}
-
-.nvd3.nv-sparklineplus .nv-maxValue {
- stroke: #2ca02c;
- fill: #2ca02c;
-}
-
-.nvd3.nv-sparklineplus .nv-minValue {
- stroke: #d62728;
- fill: #d62728;
-}
-
-.nvd3.nv-sparklineplus .nv-currentValue {
- /*
- stroke: #444;
- fill: #000;
- */
- font-weight: bold;
- font-size: 1.1em;
-}
-
-/**********
-* historical stock
-*/
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick {
- stroke-width: 2px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover {
- stroke-width: 4px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive {
- stroke: #2ca02c;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative {
- stroke: #d62728;
-}
-
-.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel {
- font-weight: bold;
-}
-
-.nvd3.nv-historicalStockChart .nv-dragTarget {
- fill-opacity: 0;
- stroke: none;
- cursor: move;
-}
-
-.nvd3 .nv-brush .extent {
- /*
- cursor: ew-resize !important;
- */
- fill-opacity: 0 !important;
-}
-
-.nvd3 .nv-brushBackground rect {
- stroke: #000;
- stroke-width: .4;
- fill: #fff;
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Indented Tree
-*/
-
-
-/**
- * TODO: the following 3 selectors are based on classes used in the example. I should either make them standard and leave them here, or move to a CSS file not included in the library
- */
-.nvd3.nv-indentedtree .name {
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .clickable {
- color: #08C;
- cursor: pointer;
-}
-
-.nvd3.nv-indentedtree span.clickable:hover {
- color: #005580;
- text-decoration: underline;
-}
-
-
-.nvd3.nv-indentedtree .nv-childrenCount {
- display: inline-block;
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .nv-treeicon {
- cursor: pointer;
- /*
- cursor: n-resize;
- */
-}
-
-.nvd3.nv-indentedtree .nv-treeicon.nv-folded {
- cursor: pointer;
- /*
- cursor: s-resize;
- */
-}
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/cie.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/cie.js
deleted file mode 100644
index 45f01329..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/cie.js
+++ /dev/null
@@ -1,155 +0,0 @@
-(function(d3) {
- var cie = d3.cie = {};
-
- cie.lab = function(l, a, b) {
- return arguments.length === 1
- ? (l instanceof Lab ? lab(l.l, l.a, l.b)
- : (l instanceof Lch ? lch_lab(l.l, l.c, l.h)
- : rgb_lab((l = d3.rgb(l)).r, l.g, l.b)))
- : lab(+l, +a, +b);
- };
-
- cie.lch = function(l, c, h) {
- return arguments.length === 1
- ? (l instanceof Lch ? lch(l.l, l.c, l.h)
- : (l instanceof Lab ? lab_lch(l.l, l.a, l.b)
- : lab_lch((l = rgb_lab((l = d3.rgb(l)).r, l.g, l.b)).l, l.a, l.b)))
- : lch(+l, +c, +h);
- };
-
- cie.interpolateLab = function(a, b) {
- a = cie.lab(a);
- b = cie.lab(b);
- var al = a.l,
- aa = a.a,
- ab = a.b,
- bl = b.l - al,
- ba = b.a - aa,
- bb = b.b - ab;
- return function(t) {
- return lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
-
- cie.interpolateLch = function(a, b) {
- a = cie.lch(a);
- b = cie.lch(b);
- var al = a.l,
- ac = a.c,
- ah = a.h,
- bl = b.l - al,
- bc = b.c - ac,
- bh = b.h - ah;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; // shortest path
- return function(t) {
- return lch_lab(al + bl * t, ac + bc * t, ah + bh * t) + "";
- };
- };
-
- function lab(l, a, b) {
- return new Lab(l, a, b);
- }
-
- function Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
-
- Lab.prototype.brighter = function(k) {
- return lab(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.darker = function(k) {
- return lab(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.rgb = function() {
- return lab_rgb(this.l, this.a, this.b);
- };
-
- Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- function lch(l, c, h) {
- return new Lch(l, c, h);
- }
-
- function Lch(l, c, h) {
- this.l = l;
- this.c = c;
- this.h = h;
- }
-
- Lch.prototype.brighter = function(k) {
- return lch(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.darker = function(k) {
- return lch(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.rgb = function() {
- return lch_lab(this.l, this.c, this.h).rgb();
- };
-
- Lch.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- // Corresponds roughly to RGB brighter/darker
- var K = 18;
-
- // D65 standard referent
- var X = 0.950470, Y = 1, Z = 1.088830;
-
- function lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = lab_xyz(x) * X;
- y = lab_xyz(y) * Y;
- z = lab_xyz(z) * Z;
- return d3.rgb(
- xyz_rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z),
- xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
- xyz_rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)
- );
- }
-
- function rgb_lab(r, g, b) {
- r = rgb_xyz(r);
- g = rgb_xyz(g);
- b = rgb_xyz(b);
- var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / X),
- y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Y),
- z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Z);
- return lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
-
- function lab_lch(l, a, b) {
- var c = Math.sqrt(a * a + b * b),
- h = Math.atan2(b, a) / Math.PI * 180;
- return lch(l, c, h);
- }
-
- function lch_lab(l, c, h) {
- h = h * Math.PI / 180;
- return lab(l, Math.cos(h) * c, Math.sin(h) * c);
- }
-
- function lab_xyz(x) {
- return x > 0.206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
-
- function xyz_lab(x) {
- return x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
-
- function xyz_rgb(r) {
- return Math.round(255 * (r <= 0.00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055));
- }
-
- function rgb_xyz(r) {
- return (r /= 255) <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
- }
-})(d3);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/colorbrewer.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/colorbrewer.js
deleted file mode 100644
index 2295527b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/colorbrewer.js
+++ /dev/null
@@ -1,302 +0,0 @@
-// This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
-var colorbrewer = {YlGn: {
-3: ["#f7fcb9","#addd8e","#31a354"],
-4: ["#ffffcc","#c2e699","#78c679","#238443"],
-5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
-6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
-7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
-},YlGnBu: {
-3: ["#edf8b1","#7fcdbb","#2c7fb8"],
-4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"],
-5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],
-6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],
-7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]
-},GnBu: {
-3: ["#e0f3db","#a8ddb5","#43a2ca"],
-4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],
-5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],
-6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],
-7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]
-},BuGn: {
-3: ["#e5f5f9","#99d8c9","#2ca25f"],
-4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"],
-5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],
-6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],
-7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]
-},PuBuGn: {
-3: ["#ece2f0","#a6bddb","#1c9099"],
-4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"],
-5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],
-6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],
-7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]
-},PuBu: {
-3: ["#ece7f2","#a6bddb","#2b8cbe"],
-4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],
-5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],
-6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],
-7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]
-},BuPu: {
-3: ["#e0ecf4","#9ebcda","#8856a7"],
-4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"],
-5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],
-6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],
-7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]
-},RdPu: {
-3: ["#fde0dd","#fa9fb5","#c51b8a"],
-4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"],
-5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],
-6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],
-7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]
-},PuRd: {
-3: ["#e7e1ef","#c994c7","#dd1c77"],
-4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"],
-5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],
-6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],
-7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]
-},OrRd: {
-3: ["#fee8c8","#fdbb84","#e34a33"],
-4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],
-5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],
-6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],
-7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]
-},YlOrRd: {
-3: ["#ffeda0","#feb24c","#f03b20"],
-4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],
-5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],
-6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],
-7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]
-},YlOrBr: {
-3: ["#fff7bc","#fec44f","#d95f0e"],
-4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"],
-5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],
-6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],
-7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]
-},Purples: {
-3: ["#efedf5","#bcbddc","#756bb1"],
-4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],
-5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],
-6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],
-7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]
-},Blues: {
-3: ["#deebf7","#9ecae1","#3182bd"],
-4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"],
-5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],
-6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],
-7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]
-},Greens: {
-3: ["#e5f5e0","#a1d99b","#31a354"],
-4: ["#edf8e9","#bae4b3","#74c476","#238b45"],
-5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],
-6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],
-7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]
-},Oranges: {
-3: ["#fee6ce","#fdae6b","#e6550d"],
-4: ["#feedde","#fdbe85","#fd8d3c","#d94701"],
-5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],
-6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],
-7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]
-},Reds: {
-3: ["#fee0d2","#fc9272","#de2d26"],
-4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"],
-5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],
-6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],
-7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]
-},Greys: {
-3: ["#f0f0f0","#bdbdbd","#636363"],
-4: ["#f7f7f7","#cccccc","#969696","#525252"],
-5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"],
-6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],
-7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]
-},PuOr: {
-3: ["#f1a340","#f7f7f7","#998ec3"],
-4: ["#e66101","#fdb863","#b2abd2","#5e3c99"],
-5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],
-6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],
-7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],
-8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],
-9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],
-10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],
-11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]
-},BrBG: {
-3: ["#d8b365","#f5f5f5","#5ab4ac"],
-4: ["#a6611a","#dfc27d","#80cdc1","#018571"],
-5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],
-6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],
-7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],
-8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],
-9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],
-10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],
-11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]
-},PRGn: {
-3: ["#af8dc3","#f7f7f7","#7fbf7b"],
-4: ["#7b3294","#c2a5cf","#a6dba0","#008837"],
-5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],
-6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],
-7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],
-8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],
-11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]
-},PiYG: {
-3: ["#e9a3c9","#f7f7f7","#a1d76a"],
-4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"],
-5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],
-6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],
-7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],
-8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],
-11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]
-},RdBu: {
-3: ["#ef8a62","#f7f7f7","#67a9cf"],
-4: ["#ca0020","#f4a582","#92c5de","#0571b0"],
-5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],
-6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],
-7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]
-},RdGy: {
-3: ["#ef8a62","#ffffff","#999999"],
-4: ["#ca0020","#f4a582","#bababa","#404040"],
-5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"],
-6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],
-7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]
-},RdYlBu: {
-3: ["#fc8d59","#ffffbf","#91bfdb"],
-4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"],
-5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],
-6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],
-7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],
-8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]
-},Spectral: {
-3: ["#fc8d59","#ffffbf","#99d594"],
-4: ["#d7191c","#fdae61","#abdda4","#2b83ba"],
-5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],
-6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],
-7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],
-8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],
-9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],
-10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],
-11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]
-},RdYlGn: {
-3: ["#fc8d59","#ffffbf","#91cf60"],
-4: ["#d7191c","#fdae61","#a6d96a","#1a9641"],
-5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],
-6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],
-7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],
-8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]
-},Accent: {
-3: ["#7fc97f","#beaed4","#fdc086"],
-4: ["#7fc97f","#beaed4","#fdc086","#ffff99"],
-5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],
-6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],
-7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],
-8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]
-},Dark2: {
-3: ["#1b9e77","#d95f02","#7570b3"],
-4: ["#1b9e77","#d95f02","#7570b3","#e7298a"],
-5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],
-6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],
-7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],
-8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]
-},Paired: {
-3: ["#a6cee3","#1f78b4","#b2df8a"],
-4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"],
-5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],
-6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],
-7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],
-8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],
-9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],
-10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],
-11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],
-12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]
-},Pastel1: {
-3: ["#fbb4ae","#b3cde3","#ccebc5"],
-4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],
-5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],
-6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],
-7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],
-8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],
-9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]
-},Pastel2: {
-3: ["#b3e2cd","#fdcdac","#cbd5e8"],
-4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],
-5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],
-6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],
-7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],
-8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]
-},Set1: {
-3: ["#e41a1c","#377eb8","#4daf4a"],
-4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"],
-5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],
-6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],
-7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],
-8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],
-9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]
-},Set2: {
-3: ["#66c2a5","#fc8d62","#8da0cb"],
-4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],
-5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],
-6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],
-7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],
-8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]
-},Set3: {
-3: ["#8dd3c7","#ffffb3","#bebada"],
-4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"],
-5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],
-6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],
-7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],
-8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],
-9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],
-10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],
-11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],
-12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]
-}};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/core.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/core.js
deleted file mode 100644
index 912de8d8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/core.js
+++ /dev/null
@@ -1,122 +0,0 @@
-
-var nv = window.nv || {};
-
-
-nv.version = '1.1.13b';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = nv.utils || {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-// Note: in IE8 console.log is an object not a function, and if modernizr is used
-// then calling Function.prototype.bind with with anything other than a function
-// causes a TypeError to be thrown.
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && typeof console.log == "function" && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.js
deleted file mode 100644
index 1aaabca2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.js
+++ /dev/null
@@ -1,1180 +0,0 @@
-(function(exports){
-crossfilter.version = "1.0.3";
-function crossfilter_identity(d) {
- return d;
-}
-crossfilter.permute = permute;
-
-function permute(array, index) {
- for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {
- copy[i] = array[index[i]];
- }
- return copy;
-}
-var bisect = crossfilter.bisect = bisect_by(crossfilter_identity);
-
-bisect.by = bisect_by;
-
-function bisect_by(f) {
-
- // Locate the insertion point for x in a to maintain sorted order. The
- // arguments lo and hi may be used to specify a subset of the array which
- // should be considered; by default the entire array is used. If x is already
- // present in a, the insertion point will be before (to the left of) any
- // existing entries. The return value is suitable for use as the first
- // argument to `array.splice` assuming that a is already sorted.
- //
- // The returned insertion point i partitions the array a into two halves so
- // that all v < x for v in a[lo:i] for the left side and all v >= x for v in
- // a[i:hi] for the right side.
- function bisectLeft(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (f(a[mid]) < x) lo = mid + 1;
- else hi = mid;
- }
- return lo;
- }
-
- // Similar to bisectLeft, but returns an insertion point which comes after (to
- // the right of) any existing entries of x in a.
- //
- // The returned insertion point i partitions the array into two halves so that
- // all v <= x for v in a[lo:i] for the left side and all v > x for v in
- // a[i:hi] for the right side.
- function bisectRight(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (x < f(a[mid])) hi = mid;
- else lo = mid + 1;
- }
- return lo;
- }
-
- bisectRight.right = bisectRight;
- bisectRight.left = bisectLeft;
- return bisectRight;
-}
-var heap = crossfilter.heap = heap_by(crossfilter_identity);
-
-heap.by = heap_by;
-
-function heap_by(f) {
-
- // Builds a binary heap within the specified array a[lo:hi]. The heap has the
- // property such that the parent a[lo+i] is always less than or equal to its
- // two children: a[lo+2*i+1] and a[lo+2*i+2].
- function heap(a, lo, hi) {
- var n = hi - lo,
- i = (n >>> 1) + 1;
- while (--i > 0) sift(a, i, n, lo);
- return a;
- }
-
- // Sorts the specified array a[lo:hi] in descending order, assuming it is
- // already a heap.
- function sort(a, lo, hi) {
- var n = hi - lo,
- t;
- while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);
- return a;
- }
-
- // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous
- // slice of array a[lo:lo+n]. This method can also be used to update the heap
- // incrementally, without incurring the full cost of reconstructing the heap.
- function sift(a, i, n, lo) {
- var d = a[--lo + i],
- x = f(d),
- child;
- while ((child = i << 1) <= n) {
- if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;
- if (x <= f(a[lo + child])) break;
- a[lo + i] = a[lo + child];
- i = child;
- }
- a[lo + i] = d;
- }
-
- heap.sort = sort;
- return heap;
-}
-var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity);
-
-heapselect.by = heapselect_by;
-
-function heapselect_by(f) {
- var heap = heap_by(f);
-
- // Returns a new array containing the top k elements in the array a[lo:hi].
- // The returned array is not sorted, but maintains the heap property. If k is
- // greater than hi - lo, then fewer than k elements will be returned. The
- // order of elements in a is unchanged by this operation.
- function heapselect(a, lo, hi, k) {
- var queue = new Array(k = Math.min(hi - lo, k)),
- min,
- i,
- x,
- d;
-
- for (i = 0; i < k; ++i) queue[i] = a[lo++];
- heap(queue, 0, k);
-
- if (lo < hi) {
- min = f(queue[0]);
- do {
- if (x = f(d = a[lo]) > min) {
- queue[0] = d;
- min = f(heap(queue, 0, k)[0]);
- }
- } while (++lo < hi);
- }
-
- return queue;
- }
-
- return heapselect;
-}
-var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity);
-
-insertionsort.by = insertionsort_by;
-
-function insertionsort_by(f) {
-
- function insertionsort(a, lo, hi) {
- for (var i = lo + 1; i < hi; ++i) {
- for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) {
- a[j] = a[j - 1];
- }
- a[j] = t;
- }
- return a;
- }
-
- return insertionsort;
-}
-// Algorithm designed by Vladimir Yaroslavskiy.
-// Implementation based on the Dart project; see lib/dart/LICENSE for details.
-
-var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity);
-
-quicksort.by = quicksort_by;
-
-function quicksort_by(f) {
- var insertionsort = insertionsort_by(f);
-
- function sort(a, lo, hi) {
- return (hi - lo < quicksort_sizeThreshold
- ? insertionsort
- : quicksort)(a, lo, hi);
- }
-
- function quicksort(a, lo, hi) {
-
- // Compute the two pivots by looking at 5 elements.
- var sixth = (hi - lo) / 6 | 0,
- i1 = lo + sixth,
- i5 = hi - 1 - sixth,
- i3 = lo + hi - 1 >> 1, // The midpoint.
- i2 = i3 - sixth,
- i4 = i3 + sixth;
-
- var e1 = a[i1], x1 = f(e1),
- e2 = a[i2], x2 = f(e2),
- e3 = a[i3], x3 = f(e3),
- e4 = a[i4], x4 = f(e4),
- e5 = a[i5], x5 = f(e5);
-
- var t;
-
- // Sort the selected 5 elements using a sorting network.
- if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
- if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t;
- if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t;
- if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
-
- var pivot1 = e2, pivotValue1 = x2,
- pivot2 = e4, pivotValue2 = x4;
-
- // e2 and e4 have been saved in the pivot variables. They will be written
- // back, once the partitioning is finished.
- a[i1] = e1;
- a[i2] = a[lo];
- a[i3] = e3;
- a[i4] = a[hi - 1];
- a[i5] = e5;
-
- var less = lo + 1, // First element in the middle partition.
- great = hi - 2; // Last element in the middle partition.
-
- // Note that for value comparison, <, <=, >= and > coerce to a primitive via
- // Object.prototype.valueOf; == and === do not, so in order to be consistent
- // with natural order (such as for Date objects), we must do two compares.
- var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2;
- if (pivotsEqual) {
-
- // Degenerated case where the partitioning becomes a dutch national flag
- // problem.
- //
- // [ | < pivot | == pivot | unpartitioned | > pivot | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1) for x in ]left, less[ : x < pivot.
- // 2) for x in [less, k[ : x == pivot.
- // 3) for x in ]great, right[ : x > pivot.
- for (var k = less; k <= great; ++k) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else if (xk > pivotValue1) {
-
- // Find the first element <= pivot in the range [k - 1, great] and
- // put [:ek:] there. We know that such an element must exist:
- // When k == less, then el3 (which is equal to pivot) lies in the
- // interval. Otherwise a[k - 1] == pivot and the search stops at k-1.
- // Note that in the latter case invariant 2 will be violated for a
- // short amount of time. The invariant will be restored when the
- // pivots are put into their final positions.
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue1) {
- great--;
- // This is the only location in the while-loop where a new
- // iteration is started.
- continue;
- } else if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- break;
- } else {
- a[k] = a[great];
- a[great--] = ek;
- // Note: if great < k then we will exit the outer loop and fix
- // invariant 2 (which we just violated).
- break;
- }
- }
- }
- }
- } else {
-
- // We partition the list into three parts:
- // 1. < pivot1
- // 2. >= pivot1 && <= pivot2
- // 3. > pivot2
- //
- // During the loop we have:
- // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1. for x in ]left, less[ : x < pivot1
- // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2
- // 3. for x in ]great, right[ : x > pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else {
- if (xk > pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] <= pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] >= pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // Move pivots into their final positions.
- // We shrunk the list from both sides (a[left] and a[right] have
- // meaningless values in them) and now we move elements from the first
- // and third partition into these locations so that we can store the
- // pivots.
- a[lo] = a[less - 1];
- a[less - 1] = pivot1;
- a[hi - 1] = a[great + 1];
- a[great + 1] = pivot2;
-
- // The list is now partitioned into three partitions:
- // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ]
- // ^ ^ ^ ^
- // left less great right
-
- // Recursive descent. (Don't include the pivot values.)
- sort(a, lo, less - 1);
- sort(a, great + 2, hi);
-
- if (pivotsEqual) {
- // All elements in the second partition are equal to the pivot. No
- // need to sort them.
- return a;
- }
-
- // In theory it should be enough to call _doSort recursively on the second
- // partition.
- // The Android source however removes the pivot elements from the recursive
- // call if the second partition is too large (more than 2/3 of the list).
- if (less < i1 && great > i5) {
- var lessValue, greatValue;
- while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less;
- while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great;
-
- // Copy paste of the previous 3-way partitioning with adaptions.
- //
- // We partition the list into three parts:
- // 1. == pivot1
- // 2. > pivot1 && < pivot2
- // 3. == pivot2
- //
- // During the loop we have:
- // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ]
- // ^ ^ ^
- // less k great
- //
- // Invariants:
- // 1. for x in [ *, less[ : x == pivot1
- // 2. for x in [less, k[ : pivot1 < x && x < pivot2
- // 3. for x in ]great, * ] : x == pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk <= pivotValue1 && xk >= pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- less++;
- } else {
- if (xk <= pivotValue2 && xk >= pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue <= pivotValue2 && greatValue >= pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] < pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] == pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // The second partition has now been cleared of pivot elements and looks
- // as follows:
- // [ * | > pivot1 && < pivot2 | * ]
- // ^ ^
- // less great
- // Sort the second partition using recursive descent.
-
- // The second partition looks as follows:
- // [ * | >= pivot1 && <= pivot2 | * ]
- // ^ ^
- // less great
- // Simply sort it by recursive descent.
-
- return sort(a, less, great + 1);
- }
-
- return sort;
-}
-
-var quicksort_sizeThreshold = 32;
-var crossfilter_array8 = crossfilter_arrayUntyped,
- crossfilter_array16 = crossfilter_arrayUntyped,
- crossfilter_array32 = crossfilter_arrayUntyped,
- crossfilter_arrayLengthen = crossfilter_identity,
- crossfilter_arrayWiden = crossfilter_identity;
-
-if (typeof Uint8Array !== "undefined") {
- crossfilter_array8 = function(n) { return new Uint8Array(n); };
- crossfilter_array16 = function(n) { return new Uint16Array(n); };
- crossfilter_array32 = function(n) { return new Uint32Array(n); };
-
- crossfilter_arrayLengthen = function(array, length) {
- var copy = new array.constructor(length);
- copy.set(array);
- return copy;
- };
-
- crossfilter_arrayWiden = function(array, width) {
- var copy;
- switch (width) {
- case 16: copy = crossfilter_array16(array.length); break;
- case 32: copy = crossfilter_array32(array.length); break;
- default: throw new Error("invalid array width!");
- }
- copy.set(array);
- return copy;
- };
-}
-
-function crossfilter_arrayUntyped(n) {
- return new Array(n);
-}
-function crossfilter_filterExact(bisect, value) {
- return function(values) {
- var n = values.length;
- return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];
- };
-}
-
-function crossfilter_filterRange(bisect, range) {
- var min = range[0],
- max = range[1];
- return function(values) {
- var n = values.length;
- return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];
- };
-}
-
-function crossfilter_filterAll(values) {
- return [0, values.length];
-}
-function crossfilter_null() {
- return null;
-}
-function crossfilter_zero() {
- return 0;
-}
-function crossfilter_reduceIncrement(p) {
- return p + 1;
-}
-
-function crossfilter_reduceDecrement(p) {
- return p - 1;
-}
-
-function crossfilter_reduceAdd(f) {
- return function(p, v) {
- return p + +f(v);
- };
-}
-
-function crossfilter_reduceSubtract(f) {
- return function(p, v) {
- return p - f(v);
- };
-}
-exports.crossfilter = crossfilter;
-
-function crossfilter() {
- var crossfilter = {
- add: add,
- dimension: dimension,
- groupAll: groupAll,
- size: size
- };
-
- var data = [], // the records
- n = 0, // the number of records; data.length
- m = 0, // number of dimensions in use
- M = 8, // number of dimensions that can fit in `filters`
- filters = crossfilter_array8(0), // M bits per record; 1 is filtered out
- filterListeners = [], // when the filters change
- dataListeners = []; // when data is added
-
- // Adds the specified new records to this crossfilter.
- function add(newData) {
- var n0 = n,
- n1 = newData.length;
-
- // If there's actually new data to add…
- // Merge the new data into the existing data.
- // Lengthen the filter bitset to handle the new records.
- // Notify listeners (dimensions and groups) that new data is available.
- if (n1) {
- data = data.concat(newData);
- filters = crossfilter_arrayLengthen(filters, n += n1);
- dataListeners.forEach(function(l) { l(newData, n0, n1); });
- }
-
- return crossfilter;
- }
-
- // Adds a new dimension with the specified value accessor function.
- function dimension(value) {
- var dimension = {
- filter: filter,
- filterExact: filterExact,
- filterRange: filterRange,
- filterAll: filterAll,
- top: top,
- group: group,
- groupAll: groupAll
- };
-
- var one = 1 << m++, // bit mask, e.g., 00001000
- zero = ~one, // inverted one, e.g., 11110111
- values, // sorted, cached array
- index, // value rank ↦ object id
- newValues, // temporary array storing newly-added values
- newIndex, // temporary array storing newly-added index
- sort = quicksort_by(function(i) { return newValues[i]; }),
- refilter = crossfilter_filterAll, // for recomputing filter
- indexListeners = [], // when data is added
- lo0 = 0,
- hi0 = 0;
-
- // Updating a dimension is a two-stage process. First, we must update the
- // associated filters for the newly-added records. Once all dimensions have
- // updated their filters, the groups are notified to update.
- dataListeners.unshift(preAdd);
- dataListeners.push(postAdd);
-
- // Incorporate any existing data into this dimension, and make sure that the
- // filter bitset is wide enough to handle the new dimension.
- if (m > M) filters = crossfilter_arrayWiden(filters, M <<= 1);
- preAdd(data, 0, n);
- postAdd(data, 0, n);
-
- // Incorporates the specified new records into this dimension.
- // This function is responsible for updating filters, values, and index.
- function preAdd(newData, n0, n1) {
-
- // Permute new values into natural order using a sorted index.
- newValues = newData.map(value);
- newIndex = sort(crossfilter_range(n1), 0, n1);
- newValues = permute(newValues, newIndex);
-
- // Bisect newValues to determine which new records are selected.
- var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;
- for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;
- for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;
-
- // If this dimension previously had no data, then we don't need to do the
- // more expensive merge operation; use the new values and index as-is.
- if (!n0) {
- values = newValues;
- index = newIndex;
- lo0 = lo1;
- hi0 = hi1;
- return;
- }
-
- var oldValues = values,
- oldIndex = index,
- i0 = 0,
- i1 = 0;
-
- // Otherwise, create new arrays into which to merge new and old.
- values = new Array(n);
- index = crossfilter_index(n, n);
-
- // Merge the old and new sorted values, and old and new index.
- for (i = 0; i0 < n0 && i1 < n1; ++i) {
- if (oldValues[i0] < newValues[i1]) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0++];
- } else {
- values[i] = newValues[i1];
- index[i] = newIndex[i1++] + n0;
- }
- }
-
- // Add any remaining old values.
- for (; i0 < n0; ++i0, ++i) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0];
- }
-
- // Add any remaining new values.
- for (; i1 < n1; ++i1, ++i) {
- values[i] = newValues[i1];
- index[i] = newIndex[i1] + n0;
- }
-
- // Bisect again to recompute lo0 and hi0.
- bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];
- }
-
- // When all filters have updated, notify index listeners of the new values.
- function postAdd(newData, n0, n1) {
- indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });
- newValues = newIndex = null;
- }
-
- // Updates the selected values based on the specified bounds [lo, hi].
- // This implementation is used by all the public filter methods.
- function filterIndex(bounds) {
- var i,
- j,
- k,
- lo1 = bounds[0],
- hi1 = bounds[1],
- added = [],
- removed = [];
-
- // Fast incremental update based on previous lo index.
- if (lo1 < lo0) {
- for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (lo1 > lo0) {
- for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- // Fast incremental update based on previous hi index.
- if (hi1 > hi0) {
- for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (hi1 < hi0) {
- for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- lo0 = lo1;
- hi0 = hi1;
- filterListeners.forEach(function(l) { l(one, added, removed); });
- return dimension;
- }
-
- // Filters this dimension using the specified range, value, or null.
- // If the range is null, this is equivalent to filterAll.
- // If the range is an array, this is equivalent to filterRange.
- // Otherwise, this is equivalent to filterExact.
- function filter(range) {
- return range == null
- ? filterAll() : Array.isArray(range)
- ? filterRange(range)
- : filterExact(range);
- }
-
- // Filters this dimension to select the exact value.
- function filterExact(value) {
- return filterIndex((refilter = crossfilter_filterExact(bisect, value))(values));
- }
-
- // Filters this dimension to select the specified range [lo, hi].
- // The lower bound is inclusive, and the upper bound is exclusive.
- function filterRange(range) {
- return filterIndex((refilter = crossfilter_filterRange(bisect, range))(values));
- }
-
- // Clears any filters on this dimension.
- function filterAll() {
- return filterIndex((refilter = crossfilter_filterAll)(values));
- }
-
- // Returns the top K selected records, based on this dimension's order.
- // Note: observes this dimension's filter, unlike group and groupAll.
- function top(k) {
- var array = [],
- i = hi0,
- j;
-
- while (--i >= lo0 && k > 0) {
- if (!filters[j = index[i]]) {
- array.push(data[j]);
- --k;
- }
- }
-
- return array;
- }
-
- // Adds a new group to this dimension, using the specified key function.
- function group(key) {
- var group = {
- top: top,
- all: all,
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- order: order,
- orderNatural: orderNatural,
- size: size
- };
-
- var groups, // array of {key, value}
- groupIndex, // object id ↦ group id
- groupWidth = 8,
- groupCapacity = crossfilter_capacity(groupWidth),
- k = 0, // cardinality
- select,
- heap,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- update = crossfilter_null,
- reset = crossfilter_null,
- resetNeeded = true;
-
- if (arguments.length < 1) key = crossfilter_identity;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the associated reduce values. It must also listen to
- // the parent dimension for when data is added, and compute new keys.
- filterListeners.push(update);
- indexListeners.push(add);
-
- // Incorporate any existing data into the grouping.
- add(values, index, 0, n);
-
- // Incorporates the specified new values into this group.
- // This function is responsible for updating groups and groupIndex.
- function add(newValues, newIndex, n0, n1) {
- var oldGroups = groups,
- reIndex = crossfilter_index(k, groupCapacity),
- add = reduceAdd,
- initial = reduceInitial,
- k0 = k, // old cardinality
- i0 = 0, // index of old group
- i1 = 0, // index of new record
- j, // object id
- g0, // old group
- x0, // old key
- x1, // new key
- g, // group to add
- x; // key of group to add
-
- // If a reset is needed, we don't need to update the reduce values.
- if (resetNeeded) add = initial = crossfilter_null;
-
- // Reset the new groups (k is a lower bound).
- // Also, make sure that groupIndex exists and is long enough.
- groups = new Array(k), k = 0;
- groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);
-
- // Get the first old key (x0 of g0), if it exists.
- if (k0) x0 = (g0 = oldGroups[0]).key;
-
- // Find the first new key (x1), skipping NaN keys.
- while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;
-
- // While new keys remain…
- while (i1 < n1) {
-
- // Determine the lesser of the two current keys; new and old.
- // If there are no old keys remaining, then always add the new key.
- if (g0 && x0 <= x1) {
- g = g0, x = x0;
-
- // Record the new index of the old group.
- reIndex[i0] = k;
-
- // Retrieve the next old key.
- if (g0 = oldGroups[++i0]) x0 = g0.key;
- } else {
- g = {key: x1, value: initial()}, x = x1;
- }
-
- // Add the lesser group.
- groups[k] = g;
-
- // Add any selected records belonging to the added group, while
- // advancing the new key and populating the associated group index.
- while (!(x1 > x)) {
- groupIndex[j = newIndex[i1] + n0] = k;
- if (!(filters[j] & zero)) g.value = add(g.value, data[j]);
- if (++i1 >= n1) break;
- x1 = key(newValues[i1]);
- }
-
- groupIncrement();
- }
-
- // Add any remaining old groups that were greater than all new keys.
- // No incremental reduce is needed; these groups have no new records.
- // Also record the new index of the old group.
- while (i0 < k0) {
- groups[reIndex[i0] = k] = oldGroups[i0++];
- groupIncrement();
- }
-
- // If we added any new groups before any old groups,
- // update the group index of all the old records.
- if (k > i0) for (i0 = 0; i0 < n0; ++i0) {
- groupIndex[i0] = reIndex[groupIndex[i0]];
- }
-
- // Modify the update and reset behavior based on the cardinality.
- // If the cardinality is less than or equal to one, then the groupIndex
- // is not needed. If the cardinality is zero, then there are no records
- // and therefore no groups to update or reset. Note that we also must
- // change the registered listener to point to the new method.
- j = filterListeners.indexOf(update);
- if (k > 1) {
- update = updateMany;
- reset = resetMany;
- } else {
- if (k === 1) {
- update = updateOne;
- reset = resetOne;
- } else {
- update = crossfilter_null;
- reset = crossfilter_null;
- }
- groupIndex = null;
- }
- filterListeners[j] = update;
-
- // Count the number of added groups,
- // and widen the group index as needed.
- function groupIncrement() {
- if (++k === groupCapacity) {
- reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);
- groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);
- groupCapacity = crossfilter_capacity(groupWidth);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is greater than 1.
- function updateMany(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g = groups[groupIndex[k]];
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g = groups[groupIndex[k]];
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is 1.
- function updateOne(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g = groups[0];
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is greater than 1.
- function resetMany() {
- var i,
- g;
-
- // Reset all group values.
- for (i = 0; i < k; ++i) {
- groups[i].value = reduceInitial();
- }
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g = groups[groupIndex[i]];
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is 1.
- function resetOne() {
- var i,
- g = groups[0];
-
- // Reset the singleton group values.
- g.value = reduceInitial();
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Returns the array of group values, in the dimension's natural order.
- function all() {
- if (resetNeeded) reset(), resetNeeded = false;
- return groups;
- }
-
- // Returns a new array containing the top K group values, in reduce order.
- function top(k) {
- var top = select(all(), 0, groups.length, k);
- return heap.sort(top, 0, top.length);
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce values, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Sets the reduce order, using the specified accessor.
- function order(value) {
- select = heapselect_by(valueOf);
- heap = heap_by(valueOf);
- function valueOf(d) { return value(d.value); }
- return group;
- }
-
- // A convenience method for natural ordering by reduce value.
- function orderNatural() {
- return order(crossfilter_identity);
- }
-
- // Returns the cardinality of this group, irrespective of any filters.
- function size() {
- return k;
- }
-
- return reduceCount().orderNatural();
- }
-
- // A convenience function for generating a singleton group.
- function groupAll() {
- var g = group(crossfilter_null), all = g.all;
- delete g.all;
- delete g.top;
- delete g.order;
- delete g.orderNatural;
- delete g.size;
- g.value = function() { return all()[0].value; };
- return g;
- }
-
- return dimension;
- }
-
- // A convenience method for groupAll on a dummy dimension.
- // This implementation can be optimized since it is always cardinality 1.
- function groupAll() {
- var group = {
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- value: value
- };
-
- var reduceValue,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- resetNeeded = true;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the reduce value. It must also listen to the parent
- // dimension for when data is added.
- filterListeners.push(update);
- dataListeners.push(add);
-
- // For consistency; actually a no-op since resetNeeded is true.
- add(data, 0, n);
-
- // Incorporates the specified new values into this group.
- function add(newData, n0, n1) {
- var i;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = n0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- function update(filterOne, added, removed) {
- var i,
- k,
- n;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!filters[k = added[i]]) {
- reduceValue = reduceAdd(reduceValue, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if (filters[k = removed[i]] === filterOne) {
- reduceValue = reduceRemove(reduceValue, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce value from scratch.
- function reset() {
- var i;
-
- reduceValue = reduceInitial();
-
- for (i = 0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce value, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Returns the computed reduce value.
- function value() {
- if (resetNeeded) reset(), resetNeeded = false;
- return reduceValue;
- }
-
- return reduceCount();
- }
-
- // Returns the number of records in this crossfilter, irrespective of any filters.
- function size() {
- return n;
- }
-
- return arguments.length
- ? add(arguments[0])
- : crossfilter;
-}
-
-// Returns an array of size n, big enough to store ids up to m.
-function crossfilter_index(n, m) {
- return (m < 0x101
- ? crossfilter_array8 : m < 0x10001
- ? crossfilter_array16
- : crossfilter_array32)(n);
-}
-
-// Constructs a new array of size n, with sequential values from 0 to n - 1.
-function crossfilter_range(n) {
- var range = crossfilter_index(n, n);
- for (var i = -1; ++i < n;) range[i] = i;
- return range;
-}
-
-function crossfilter_capacity(w) {
- return w === 8
- ? 0x100 : w === 16
- ? 0x10000
- : 0x100000000;
-}
-})(this);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.min.js
deleted file mode 100644
index 981f0d64..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/crossfilter.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){function b(a){return a}function c(a,b){for(var c=0,d=b.length,e=new Array(d);c<d;++c)e[c]=a[b[c]];return e}function e(a){function b(b,c,d,e){while(d<e){var f=d+e>>1;a(b[f])<c?d=f+1:e=f}return d}function c(b,c,d,e){while(d<e){var f=d+e>>1;c<a(b[f])?e=f:d=f+1}return d}return c.right=c,c.left=b,c}function g(a){function b(a,b,c){var e=c-b,f=(e>>>1)+1;while(--f>0)d(a,f,e,b);return a}function c(a,b,c){var e=c-b,f;while(--e>0)f=a[b],a[b]=a[b+e],a[b+e]=f,d(a,1,e,b);return a}function d(b,c,d,e){var f=b[--e+c],g=a(f),h;while((h=c<<1)<=d){h<d&&a(b[e+h])>a(b[e+h+1])&&h++;if(g<=a(b[e+h]))break;b[e+c]=b[e+h],c=h}b[e+c]=f}return b.sort=c,b}function i(a){function c(c,d,e,f){var g=new Array(f=Math.min(e-d,f)),h,i,j,k;for(i=0;i<f;++i)g[i]=c[d++];b(g,0,f);if(d<e){h=a(g[0]);do if(j=a(k=c[d])>h)g[0]=k,h=a(b(g,0,f)[0]);while(++d<e)}return g}var b=g(a);return c}function k(a){function b(b,c,d){for(var e=c+1;e<d;++e){for(var f=e,g=b[e],h=a(g);f>c&&a(b[f-1])>h;--f)b[f]=b[f-1];b[f]=g}return b}return b}function m(a){function c(a,c,e){return(e-c<n?b:d)(a,c,e)}function d(b,d,e){var f=(e-d)/6|0,g=d+f,h=e-1-f,i=d+e-1>>1,j=i-f,k=i+f,l=b[g],m=a(l),n=b[j],o=a(n),p=b[i],q=a(p),r=b[k],s=a(r),t=b[h],u=a(t),v;m>o&&(v=l,l=n,n=v,v=m,m=o,o=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v),m>q&&(v=l,l=p,p=v,v=m,m=q,q=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),m>s&&(v=l,l=r,r=v,v=m,m=s,s=v),q>s&&(v=p,p=r,r=v,v=q,q=s,s=v),o>u&&(v=n,n=t,t=v,v=o,o=u,u=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v);var w=n,x=o,y=r,z=s;b[g]=l,b[j]=b[d],b[i]=p,b[k]=b[e-1],b[h]=t;var A=d+1,B=e-2,C=x<=z&&x>=z;if(C)for(var D=A;D<=B;++D){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>x)for(;;){var G=a(b[B]);if(G>x){B--;continue}if(G<x){b[D]=b[A],b[A++]=b[B],b[B--]=E;break}b[D]=b[B],b[B--]=E;break}}else for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>z)for(;;){var G=a(b[B]);if(G>z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}b[d]=b[A-1],b[A-1]=w,b[e-1]=b[B+1],b[B+1]=y,c(b,d,A-1),c(b,B+2,e);if(C)return b;if(A<g&&B>h){var H,G;while((H=a(b[A]))<=x&&H>=x)++A;while((G=a(b[B]))<=z&&G>=z)--B;for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<=x&&F>=x)D!==A&&(b[D]=b[A],b[A]=E),A++;else if(F<=z&&F>=z)for(;;){var G=a(b[B]);if(G<=z&&G>=z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}}return c(b,A,B+1)}var b=k(a);return c}function t(a){return new Array(a)}function u(a,b){return function(c){var d=c.length;return[a.left(c,b,0,d),a.right(c,b,0,d)]}}function v(a,b){var c=b[0],d=b[1];return function(b){var e=b.length;return[a.left(b,c,0,e),a.left(b,d,0,e)]}}function w(a){return[0,a.length]}function x(){return null}function y(){return 0}function z(a){return a+1}function A(a){return a-1}function B(a){return function(b,c){return b+ +a(c)}}function C(a){return function(b,c){return b-a(c)}}function D(){function p(b){var c=f,d=b.length;return d&&(e=e.concat(b),k=r(k,f+=d),n.forEach(function(a){a(b,c,d)})),a}function q(a){function P(b,d,e){H=b.map(a),I=J(F(e),0,e),H=c(H,I);var g=K(H),h=g[0],i=g[1],j;for(j=0;j<h;++j)k[I[j]+d]|=p;for(j=i;j<e;++j)k[I[j]+d]|=p;if(!d){t=H,D=I,N=h,O=i;return}var l=t,m=D,n=0,o=0;t=new Array(f),D=E(f,f);for(j=0;n<d&&o<e;++j)l[n]<H[o]?(t[j]=l[n],D[j]=m[n++]):(t[j]=H[o],D[j]=I[o++]+d);for(;n<d;++n,++j)t[j]=l[n],D[j]=m[n];for(;o<e;++o,++j)t[j]=H[o],D[j]=I[o]+d;g=K(t),N=g[0],O=g[1]}function Q(a,b,c){L.forEach(function(a){a(H,I,b,c)}),H=I=null}function R(a){var b,c,d,e=a[0],f=a[1],g=[],h=[];if(e<N)for(b=e,c=Math.min(N,f);b<c;++b)k[d=D[b]]^=p,g.push(d);else if(e>N)for(b=N,c=Math.min(e,O);b<c;++b)k[d=D[b]]^=p,h.push(d);if(f>O)for(b=Math.max(e,O),c=f;b<c;++b)k[d=D[b]]^=p,g.push(d);else if(f<O)for(b=Math.max(N,f),c=O;b<c;++b)k[d=D[b]]^=p,h.push(d);return N=e,O=f,l.forEach(function(a){a(p,g,h)}),o}function S(a){return a==null?V():Array.isArray(a)?U(a):T(a)}function T(a){return R((K=u(d,a))(t))}function U(a){return R((K=v(d,a))(t))}function V(){return R((K=w)(t))}function W(a){var b=[],c=O,d;while(--c>=N&&a>0)k[d=D[c]]||(b.push(e[d]),--a);return b}function X(a){function K(b,c,g,i){function Q(){++n===m&&(p=s(p,j<<=1),h=s(h,j),m=G(j))}var o=d,p=E(n,m),t=v,u=F,w=n,y=0,z=0,A,B,C,D,K,L;J&&(t=u=x),d=new Array(n),n=0,h=w>1?r(h,f):E(f,m),w&&(C=(B=o[0]).key);while(z<i&&!((D=a(b[z]))>=D))++z;while(z<i){if(B&&C<=D){K=B,L=C,p[y]=n;if(B=o[++y])C=B.key}else K={key:D,value:u()},L=D;d[n]=K;while(!(D>L)){h[A=c[z]+g]=n,k[A]&q||(K.value=t(K.value,e[A]));if(++z>=i)break;D=a(b[z])}Q()}while(y<w)d[p[y]=n]=o[y++],Q();if(n>y)for(y=0;y<g;++y)h[y]=p[h[y]];A=l.indexOf(H),n>1?(H=M,I=O):(n===1?(H=N,I=P):(H=x,I=x),h=null),l[A]=H}function M(a,b,c){if(a===p||J)return;var f,g,i,j;for(f=0,i=b.length;f<i;++f)k[g=b[f]]&q||(j=d[h[g]],j.value=v(j.value,e[g]));for(f=0,i=c.length;f<i;++f)(k[g=c[f]]&q)===a&&(j=d[h[g]],j.value=w(j.value,e[g]))}function N(a,b,c){if(a===p||J)return;var f,g,h,i=d[0];for(f=0,h=b.length;f<h;++f)k[g=b[f]]&q||(i.value=v(i.value,e[g]));for(f=0,h=c.length;f<h;++f)(k[g=c[f]]&q)===a&&(i.value=w(i.value,e[g]))}function O(){var a,b;for(a=0;a<n;++a)d[a].value=F();for(a=0;a<f;++a)k[a]&q||(b=d[h[a]],b.value=v(b.value,e[a]))}function P(){var a,b=d[0];b.value=F();for(a=0;a<f;++a)k[a]&q||(b.value=v(b.value,e[a]))}function Q(){return J&&(I(),J=!1),d}function R(a){var b=o(Q(),0,d.length,a);return u.sort(b,0,b.length)}function S(a,b,d){return v=a,w=b,F=d,J=!0,c}function T(){return S(z,A,y)}function U(a){return S(B(a),C(a),y)}function V(a){function b(b){return a(b.value)}return o=i(b),u=g(b),c}function W(){return V(b)}function X(){return n}var c={top:R,all:Q,reduce:S,reduceCount:T,reduceSum:U,order:V,orderNatural:W,size:X},d,h,j=8,m=G(j),n=0,o,u,v,w,F,H=x,I=x,J=!0;return arguments.length<1&&(a=b),l.push(H),L.push(K),K(t,D,0,f),T().orderNatural()}function Y(){var a=X(x),b=a.all;return delete a.all,delete a.top,delete a.order,delete a.orderNatural,delete a.size,a.value=function(){return b()[0].value},a}var o={filter:S,filterExact:T,filterRange:U,filterAll:V,top:W,group:X,groupAll:Y},p=1<<h++,q=~p,t,D,H,I,J=m(function(a){return H[a]}),K=w,L=[],N=0,O=0;return n.unshift(P),n.push(Q),h>j&&(k=s(k,j<<=1)),P(e,0,f),Q(e,0,f),o}function t(){function i(a,d,g){var i;if(h)return;for(i=d;i<f;++i)k[i]||(b=c(b,e[i]))}function j(a,f,g){var i,j,l;if(h)return;for(i=0,l=f.length;i<l;++i)k[j=f[i]]||(b=c(b,e[j]));for(i=0,l=g.length;i<l;++i)k[j=g[i]]===a&&(b=d(b,e[j]))}function m(){var a;b=g();for(a=0;a<f;++a)k[a]||(b=c(b,e[a]))}function o(b,e,f){return c=b,d=e,g=f,h=!0,a}function p(){return o(z,A,y)}function q(a){return o(B(a),C(a),y)}function r(){return h&&(m(),h=!1),b}var a={reduce:o,reduceCount:p,reduceSum:q,value:r},b,c,d,g,h=!0;return l.push(j),n.push(i),i(e,0,f),p()}function D(){return f}var a={add:p,dimension:q,groupAll:t,size:D},e=[],f=0,h=0,j=8,k=o(0),l=[],n=[];return arguments.length?p(arguments[0]):a}function E(a,b){return(b<257?o:b<65537?p:q)(a)}function F(a){var b=E(a,a);for(var c=-1;++c<a;)b[c]=c;return b}function G(a){return a===8?256:a===16?65536:4294967296}D.version="1.0.3",D.permute=c;var d=D.bisect=e(b);d.by=e;var f=D.heap=g(b);f.by=g;var h=D.heapselect=i(b);h.by=i;var j=D.insertionsort=k(b);j.by=k;var l=D.quicksort=m(b);l.by=m;var n=32,o=t,p=t,q=t,r=b,s=b;typeof Uint8Array!="undefined"&&(o=function(a){return new Uint8Array(a)},p=function(a){return new Uint16Array(a)},q=function(a){return new Uint32Array(a)},r=function(a,b){var c=new a.constructor(b);return c.set(a),c},s=function(a,b){var c;switch(b){case 16:c=p(a.length);break;case 32:c=q(a.length);break;default:throw new Error("invalid array width!")}return c.set(a),c}),a.crossfilter=D})(this); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.js
deleted file mode 100644
index 7655eb78..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.js
+++ /dev/null
@@ -1,5 +0,0 @@
-!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n){var t=n.__transition__;t&&++t.active}function Z(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=V;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=X),a?t?u:r:t?y:i}function V(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function X(n,t){var e=V(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function $(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function B(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function W(){return ta.event.changedTouches[0].identifier}function J(){return ta.event.target}function G(){return oa}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?Da:Math.acos(n)}function tt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Ja,r=pt(r)*Ga,i=pt(i)*Ka,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,255&n>>8,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=vt((.2126729*n+.7151522*t+.072175*e)/Ga),i=vt((.0193339*n+.119192*t+.9503041*e)/Ka);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Nt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ct(t,e,n,r)}}function Ct(n,t,e,r){function u(){var n,t=c.status;if(!t&&qt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(zt(r))}function zt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Lt(){var n=Tt(),t=Rt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(Lt,t)),uc=0):(uc=1,ac(Lt))}function Tt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Rt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Dt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Pt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Ut(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:At;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||jt;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function jt(n){return n+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=Ft;var r=new Ft;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ot(n);return c.floor=c,c.round=Ot(r),c.ceil=Ot(u),c.offset=Ot(i),c.range=a,n}function Ot(n){return function(t,e){try{hc=Ft;var r=new Ft;return r._=t,n(r,e)._}finally{hc=Date}}}function Yt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==Ft,o=new(i?Ft:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=Ft;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=Ft;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ce;var M=ta.map(),x=Zt(v),b=Vt(v),_=Zt(d),w=Vt(d),S=Zt(m),k=Vt(m),E=Zt(y),A=Vt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+fc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:oe,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:ne,e:ne,H:ee,I:ee,j:te,L:ie,m:Qt,M:re,p:s,S:ue,U:$t,w:Xt,W:Bt,x:c,X:l,y:Jt,Y:Wt,Z:Gt,"%":ae};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Zt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Vt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Kt(+r[0]),e+r[0].length):-1}function Gt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kt(n){return n+(n>68?1900:2e3)}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ie(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function oe(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function ae(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ce(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function le(){}function se(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function fe(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function he(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)he(n[e],t,1);t.polygonEnd()}function pe(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function ve(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function de(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function me(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ye(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Me(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function be(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function _e(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function we(n,t){n*=Fa;var e=Math.cos(t*=Fa);Se(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Se(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function ke(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),Se(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,Se(t,e,r)}}function Ee(){Dc.point=we}function Ae(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),Se(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),Se(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=Ee,Dc.point=we}}function Ne(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ce(){return!0}function ze(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_e(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Le(e,n,null,!0),l=new Le(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Le(r,n,null,!1),l=new Le(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),qe(i),qe(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qe(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Le(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Te(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Re))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=He(m,p);g.length?(b||(i.polygonStart(),b=!0),ze(g,Pe,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=De(),x=t(M),b=!1;return y}}function Re(n){return n.length>1}function De(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pe(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Ue(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=je(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function je(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Fe(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function He(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=me(ve(f),ve(n));xe(E);var A=me(u,E);xe(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function Oe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(_e(e,g)||_e(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&_e(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=ve(n),u=ve(t),o=[1,0,0],a=me(r,u),c=de(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=me(o,a),p=Me(o,f),v=Me(a,h);ye(p,v);var d=g,m=de(p,d),y=de(d,d),M=m*m-y*(de(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=Me(d,(-m-x)/y);if(ye(b,p),b=be(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=Me(d,(-m+x)/y);return ye(z,p),[b,be(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=pr(n,6*Fa);return Te(t,e,c,o?[0,-n]:[-Da,n-Da])}function Ye(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=De(),N=Ye(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ze(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ze(n){var t=0,e=Da/3,r=or(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ve(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Xe(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function $e(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function Be(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=We(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=We(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function We(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Je(n,t){Ec+=n,Ac+=t,++Nc}function Ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,Je(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,Je(t=r,e=u)}}function Ke(){Xc.point=Je}function Qe(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,Je(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,Je(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function nr(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function tr(n){function t(n){return(a?r:e)(n)}function e(t){return ur(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=ve([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;
-(L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=tr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return ar(t(n))}}function rr(n){this.stream=n}function ur(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ir(n){return or(function(){return n})()}function or(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ne(o=sr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=tr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=At,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=ar(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):Oe((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function ar(n){return ur(n,function(t,e){n.point(t*Fa,e*Fa)})}function cr(n,t){return[n,t]}function lr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function sr(n,t,e){return n?t||e?Ne(hr(n),gr(t,e)):hr(n):t||e?gr(t,e):lr}function fr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function hr(n){var t=fr(n);return t.invert=fr(-n),t}function gr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function pr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=vr(e,u),i=vr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=be([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function vr(n,t){var e=ve(t);e[0]-=n,xe(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function mr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function yr(n){return n.source}function Mr(n){return n.target}function xr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function br(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function _r(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function wr(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):kr}function Sr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?cr:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function kr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function Er(n){var t,e=ir(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ar(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Nr(n){return n[0]}function Cr(n){return n[1]}function zr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qr(n,t){return n[0]-t[0]||n[1]-t[1]}function Lr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Tr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Rr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Dr(){eu(this),this.edge=this.site=this.circle=null}function Pr(n){var t=ol.pop()||new Dr;return t.site=n,t}function Ur(n){$r(n),rl.remove(n),ol.push(n),eu(n)}function jr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ur(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Ur(c),c=i;a.unshift(c),$r(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Ur(l),l=o;a.push(l),$r(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Qr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Gr(c.site,l.site,null,u),Xr(c),Xr(l)}function Fr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Hr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Or(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pr(n);if(rl.insert(t,c),t||e){if(t===e)return $r(t),e=Pr(t.site),rl.insert(c,e),c.edge=e.edge=Gr(t.site,c.site),Xr(t),Xr(e),void 0;if(!e)return c.edge=Gr(t.site,c.site),void 0;$r(t),$r(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Qr(e.edge,l,p,x),c.edge=Gr(l,n,null,x),e.edge=Gr(n,p,null,x),Xr(t),Xr(e)}}function Hr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Or(n,t){var e=n.N;if(e)return Hr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Yr(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new nu(Kr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Zr(n,t){return t.angle-n.angle}function Vr(){eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Vr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function $r(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),eu(t),n.circle=null)}function Br(n){for(var t,e=tl,r=Ye(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Wr(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Wr(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Gr(n,t,e,r){var u=new Jr(n,t);return tl.push(u),e&&Qr(u,n,t,e),r&&Qr(u,t,n,r),el[n.i].edges.push(new nu(u,n,t)),el[t.i].edges.push(new nu(u,t,n)),u}function Kr(n,t,e){var r=new Jr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Qr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function nu(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function tu(){this._=null}function eu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function uu(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function iu(n){for(;n.L;)n=n.L;return n}function ou(n,t){var e,r,u,i=n.sort(au).pop();for(tl=[],el=new Array(n.length),rl=new tu,il=new tu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Yr(i),Fr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;jr(u.arc)}t&&(Br(t),Ir(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function au(n,t){return t.y-n.y||t.x-n.x}function cu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lu(n){return n.x}function su(n){return n.y}function fu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&hu(n,c[0],e,r,o,a),c[1]&&hu(n,c[1],o,r,u,a),c[2]&&hu(n,c[2],e,a,o,i),c[3]&&hu(n,c[3],o,a,u,i)}}function gu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function pu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function vu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=yu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function du(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mu(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:du(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function yu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function Mu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(yu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function xu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function bu(n){return function(t){return 1-n(1-t)}}function _u(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wu(n){return n*n}function Su(n){return n*n*n}function ku(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Eu(n){return function(t){return Math.pow(t,n)}}function Au(n){return 1-Math.cos(n*ja)}function Nu(n){return Math.pow(2,10*(n-1))}function Cu(n){return 1-Math.sqrt(1-n*n)}function zu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function qu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Pu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Uu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fu(t),u=ju(t,e),i=Fu(Hu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function ju(n,t){return n[0]*t[0]+n[1]*t[1]}function Fu(n){var t=Math.sqrt(ju(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ou(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:du(a[0],c[0])},{i:3,x:du(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:du(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:du(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:du(g[0],p[0])},{i:e-2,x:du(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Zu(n){for(var t=n.source,e=n.target,r=Xu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Vu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Xu(n,t){if(n===t)return n;for(var e=Vu(n),r=Vu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function $u(n){n.fixed|=2}function Bu(n){n.fixed&=-7}function Wu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Ju(n){n.fixed&=-5}function Gu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Gu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Ku(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ui,n}function Qu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ti(n){return n.children}function ei(n){return n.value}function ri(n,t){return t.value-n.value}function ui(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ii(n){return n.x}function oi(n){return n.y}function ai(n,t,e){n.y0=t,n.y=e}function ci(n){return ta.range(n.length)}function li(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function si(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function fi(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function gi(n,t){return pi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function pi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function vi(n){return[ta.min(n),ta.max(n)]}function di(n,t){return n.value-t.value}function mi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function yi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function xi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],Si(r,u,i),t(i),mi(r,i),r._pack_prev=i,mi(i,u),u=r._pack_next,o=3;l>o;o++){Si(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Mi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?yi(r,u=a):yi(r=c,u),o--):(mi(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)wi(u[i],t,e,r)}function Si(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function ki(n,t){return n.parent==t.parent?1:2}function Ei(n){var t=n.children;return t.length?t[0]:n.t}function Ai(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ni(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ci(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+ta.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Hi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Yi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Yi:Fi,c=r?Iu:Yu;return o=u(n,t,c,e),a=u(t,n,c,yu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Pu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return $i(n,t)},i.tickFormat=function(t,e){return Bi(n,t,e)},i.nice=function(t){return Vi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Zi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function $i(n,t){return ta.range.apply(ta,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Wi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Ji(u[8],r)),e=u.join("")}else e=",."+Wi(r[2])+"f";return ta.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in _l?Math.abs(e-Wi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Hi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(u(t))}var u=Qi(t),i=Qi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(u=Qi(t=o),i=Qi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function no(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ui(t.a[0])},e.copy=function(){return no(n,t)},e.domain(n)}function to(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return to(r,u)},i()}function eo(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return eo(n,t,e)},u()}function ro(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ro(n,t)},e}function uo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return uo(n)},t}function io(){return 0}function oo(n){return n.innerRadius}function ao(n){return n.outerRadius}function co(n){return n.startAngle}function lo(n){return n.endAngle}function so(n){return n&&n.padAngle}function fo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function ho(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function go(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Nr,r=Cr,u=Ce,i=po,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||po).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function po(n){return n.join("L")}function vo(n){return po(n)+"Z"}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function xo(n,t){return n.length<4?po(n):n[1]+wo(n.slice(1,-1),So(n,t))}function bo(n,t){return n.length<3?po(n):n[0]+wo((n.push(n[0]),n),So([n[n.length-2]].concat(n,[n[1]]),t))}function _o(n,t){return n.length<3?po(n):n[0]+wo(n,So(n,t))}function wo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return po(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function So(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function ko(n){if(n.length<3)return po(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",Co(Tl,o),",",Co(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),zo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function Eo(n){if(n.length<4)return po(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(Co(Tl,i)+","+Co(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),zo(e,i,o);return e.join("")}function Ao(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[Co(Tl,o),",",Co(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),zo(t,o,a);return t.join("")}function No(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return ko(n)}function Co(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function zo(n,t,e){n.push("C",Co(ql,t),",",Co(ql,e),",",Co(Ll,t),",",Co(Ll,e),",",Co(Tl,t),",",Co(Tl,e))}function qo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Lo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=qo(u,i);++t<e;)r[t]=(o+(o=qo(u=i,i=n[t+1])))/2;return r[t]=o,r}function To(n){for(var t,e,r,u,i=[],o=Lo(n),a=-1,c=n.length-1;++a<c;)t=qo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Ro(n){return n.length<3?po(n):n[0]+wo(n,To(n))}function Do(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Po(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Nr,r=Nr,u=0,i=Cr,o=Ce,a=po,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||po).key,l=a.reverse||a,s=a.closed?"M":"L",t):c
-},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Uo(n){return n.radius}function jo(n){return[n.x,n.y]}function Fo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Oo(){return"circle"}function Yo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n,t,e){return xa(n,Fl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,ease:u.ease,delay:u.delay,duration:u.duration},u=null,++i.count,ta.timer(function(u){function a(e){return i.active>r?s(!1):(i.active=r,o.event&&o.event.start.call(n,f,t),o.tween.forEach(function(e,r){(r=r.call(n,f,t))&&d.push(r)}),ta.timer(function(){return v.c=l(e||1)?Ce:l,1},0,c),void 0)}function l(t){if(i.active!==r)return s(!1);for(var e=t/p,u=h(e),o=d.length;o>0;)d[--o].call(n,u);return e>=1?s(!0):void 0}function s(u){return o.event&&o.event[u?"end":"interrupt"].call(n,f,t),--i.count?delete i[r]:delete n[e],1}var f=n.__data__,h=o.ease,g=o.delay,p=o.duration,v=oc,d=[];return v.t=g+c,u>=g?a(u-g):(v.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Bl,u);return i==Bl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Bl[i-1]<Bl[i]/u?i-1:i]:[Gl,Xi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Ui(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Hi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Zi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.0pre"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ka.transition=function(n){for(var t,e,r=Dl||++Hl,u=Xo(n),i=[],o=Pl||{time:Date.now(),ease:ku,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){var t=Xo(n);return this.each(function(){var n=this[t];n&&++n.active})},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(Z(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Z(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return B(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return B(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=$(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,G,"mousemove","mouseup"),i=t(W,ta.touch,J,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=B(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(Ya*h)*(e*ut(Oa*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(C,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(L,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),ta.select(t).transition().duration(350).call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){N++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--N||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(z,null).on(q,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=T.of(r,arguments),s=0,f=ta.select(oa).on(z,n).on(q,e),h=t(ta.mouse(r)),g=$();I(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);I(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(C,s).on(L,f),E(),l(v)}var g,p=this,v=T.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=$();e(),a(v),S.on(C,null).on(L,e)}function h(){var n=T.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),I(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=0,C="mousedown.zoom",z="mousemove.zoom",q="mouseup.zoom",L="touchstart.zoom",T=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=T.of(this,arguments),t=k;Dl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,T,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var $a=at.prototype=new ot;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},$a.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Ba=lt.prototype=new ot;Ba.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=ft.prototype=new ot;Qa.brighter=function(n){return new ft(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new ft(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var nc=mt.prototype=new ot;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return _t(this.r,this.g,this.b)},nc.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,yt(t))}),ta.functor=Et,ta.xhr=Nt(At),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Ct(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(Lt))},ta.timer.flush=function(){Tt(),Rt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Pt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Dt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Dt(n,t))).toFixed(Math.max(0,Math.min(20,Dt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;Ft.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ht(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ht(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ht(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Ut(n),timeFormat:Yt(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=mc.numberFormat,ta.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,yc),se(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new le;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):fe(n,t)};var Mc={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)fe(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){he(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ge(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)fe(e[r],t)
-}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new le,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=pe},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=ve([t*Fa,e*Fa]);if(m){var u=me(m,r),i=[u[1],-u[0],0],o=me(i,u);xe(o),o=be(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,tt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:we,lineStart:ke,lineEnd:Ee,polygonStart:function(){Dc.lineStart=Ae},polygonEnd:function(){Dc.lineStart=ke}},Pc=Te(Ce,Ue,Fe,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ze(Ve)}).raw=Ve,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Xe},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:$e,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:Je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){Xc.lineStart=Qe},polygonEnd:function(){Xc.point=Je,Xc.lineStart=Ge,Xc.lineEnd=Ke}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||er(n):At,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Be:new nr(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new rr(t);for(var r in n)e[r]=n[r];return e}}},rr.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ir,ta.geo.projectionMutator=or,(ta.geo.equirectangular=function(){return ir(cr)}).raw=cr.invert=cr,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=sr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},lr.invert=cr,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=sr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=pr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=pr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=dr(a,o,90),f=mr(r,e,y),h=dr(l,c,90),g=mr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=yr,u=Mr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return xr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:br,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=_r(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ir(Wc)}).raw=Wc;var Jc=_r(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(ta.geo.azimuthalEquidistant=function(){return ir(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ze(wr)}).raw=wr,(ta.geo.conicEquidistant=function(){return Ze(Sr)}).raw=Sr;var Gc=_r(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ir(Gc)}).raw=Gc,kr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return Er(kr)}).raw=kr;var Kc=_r(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ir(Kc)}).raw=Kc;var Qc=_r(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ir(Qc)}).raw=Qc,Ar.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=Er(Ar),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ar,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(qr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=zr(a),s=zr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Nr,r=Cr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Lr(o,s,u)?(Lr(i,s,u)||n.push(Tr(i,o,s,u)),n.push(o)):Lr(i,s,u)&&n.push(Tr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Yr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Zr),t.length},nu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=iu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,uu(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(uu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?iu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,uu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,uu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,uu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return ou(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Nr,u=Cr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return ou(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ou(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Zr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&cu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=fu()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=fu();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){hu(n,k,v,d,m,y)},k.find=function(n){return gu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Nr,c=Cr;return(o=arguments.length)?(a=lu,c=su,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=pu,ta.interpolateObject=vu,ta.interpolateNumber=du,ta.interpolateString=mu;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=yu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?pu:mu:t instanceof ot?pu:Array.isArray(t)?Mu:"object"===e&&isNaN(t)?vu:du)(n,t)}],ta.interpolateArray=Mu;var fl=function(){return At},hl=ta.map({linear:fl,poly:Eu,quad:function(){return wu},cubic:function(){return Su},sin:function(){return Au},exp:function(){return Nu},circle:function(){return Cu},elastic:zu,back:qu,bounce:function(){return Lu}}),gl=ta.map({"in":At,out:bu,"in-out":_u,"out-in":function(n){return _u(bu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||At,xu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Tu,ta.interpolateHsl=Ru,ta.interpolateLab=Du,ta.interpolateRound=Pu,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Uu(e?e.matrix:pl)})(n)},Uu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Ou,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Zu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Gu(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(At).on("dragstart.force",$u).on("drag.force",t).on("dragend.force",Bu)),arguments.length?(this.on("mouseover.force",Wu).on("mouseout.force",Ju).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ni(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qu(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Ku(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=At,e=ci,r=li,u=ai,i=ii,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||li,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(si),i=n.map(fi),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ci}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:li});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=vi,u=gi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return pi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+s(n.value)}),ni(a,xi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=f}),ni(a,xi),ni(a,function(n){n.r-=f})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(di),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Ku(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(ni(h,e),h.parent.m=-h.z,Qu(h,r),l)Qu(f,i);else{var g=f,p=f,v=f;Qu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Qu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ai(o),u=Ei(u),o&&u;)c=Ei(c),i=Ai(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ni(zi(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ai(i)&&(i.t=o,i.m+=f-s),u&&!Ei(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Ku(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Ti(c),f=Ri(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return ni(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Ku(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Di,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Di(t):Pi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Pi(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Di:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Ku(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)
-}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:At,ceil:At};ta.scale.linear=function(){return Ii([0,1],[0,1],yu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Gi(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Ki(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return no([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return to([],[])},ta.scale.quantize=function(){return eo(0,1,[0,1])},ta.scale.threshold=function(){return ro([.5],[0,1])},ta.scale.identity=function(){return uo([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&fo(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&fo(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Tr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=ho(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=ho([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^fo(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=ho([y,M],[S,k],n,-I,g),V=ho([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^fo(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=oo,r=ao,u=io,i=Cl,o=co,a=lo,c=so;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return go(At)};var zl=ta.map({linear:po,"linear-closed":vo,step:mo,"step-before":yo,"step-after":Mo,basis:ko,"basis-open":Eo,"basis-closed":Ao,bundle:No,cardinal:_o,"cardinal-open":xo,"cardinal-closed":bo,monotone:Ro});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=go(Do);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yo.reverse=Mo,Mo.reverse=yo,ta.svg.area=function(){return Po(At)},ta.svg.area.radial=function(){var n=Po(Do);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=yr,o=Mr,a=Uo,c=co,l=lo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=yr,e=Mr,r=jo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=jo,e=n.projection;return n.projection=function(n){return arguments.length?e(Fo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Yo)(e.call(this,n,r))}var t=Oo,e=Ho;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var Rl=ta.map({circle:Yo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*jl)),e=t*jl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl,Pl,Ul=Math.sqrt(3),jl=Math.tan(30*Fa),Fl=[],Hl=0;Fl.call=ka.call,Fl.empty=ka.empty,Fl.node=ka.node,Fl.size=ka.size,ta.transition=function(n){return arguments.length?Dl?n.transition():n:Na.transition()},ta.transition.prototype=Fl,Fl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Fl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Fl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Fl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Fl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ou:yu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Fl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Fl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=yu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Fl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Fl.text=function(n){return Zo(this,"text",n,Vo)},Fl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Fl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Fl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Fl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Pl,i=Dl;Dl=e,H(this,function(t,u,i){Pl=t[r][e],n.call(t,t.__data__,u,i)}),Pl=u,Dl=i}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Fl.transition=function(){for(var n,t,e,r,u=this.id,i=++Hl,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=ji(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Ol,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Ol,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ol="bottom",Yl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Il[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=ji(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=ji(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=ji(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=$(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Zl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Dl?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mu(s,t.x),r=Mu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Zl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Zl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Il={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fc.format=mc.timeFormat,Xl=Vl.utc,$l=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:$l,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=$l.toString,fc.second=Ht(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ht(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ht(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Bl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Wl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Jl=Vl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ce]]),Gl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:At,ceil:At};Wl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Wl,Jl)};var Kl=Wl.map(function(n){return[n[0].utc,n[1]]}),Ql=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ce]]);Kl.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Kl,Ql)},ta.text=Nt(function(n){return n.responseText}),ta.json=function(n,t){return Ct(n,"application/json",Qo,t)},ta.html=function(n,t){return Ct(n,"text/html",na,t)},ta.xml=Nt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.cloud.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.cloud.js
deleted file mode 100644
index 44c4f7de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.cloud.js
+++ /dev/null
@@ -1,433 +0,0 @@
-// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
-// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
-(function() {
- function cloud() {
- var size = [256, 256],
- text = cloudText,
- font = cloudFont,
- fontSize = cloudFontSize,
- fontStyle = cloudFontNormal,
- fontWeight = cloudFontNormal,
- rotate = cloudRotate,
- padding = cloudPadding,
- spiral = archimedeanSpiral,
- words = [],
- timeInterval = Infinity,
- event = d3.dispatch("word", "end"),
- timer = null,
- cloud = {};
-
- cloud.start = function() {
- var board = zeroArray((size[0] >> 5) * size[1]),
- bounds = null,
- n = words.length,
- i = -1,
- tags = [],
- data = words.map(function(d, i) {
- d.text = text.call(this, d, i);
- d.font = font.call(this, d, i);
- d.style = fontStyle.call(this, d, i);
- d.weight = fontWeight.call(this, d, i);
- d.rotate = rotate.call(this, d, i);
- d.size = ~~fontSize.call(this, d, i);
- d.padding = padding.call(this, d, i);
- return d;
- }).sort(function(a, b) { return b.size - a.size; });
-// createMask();
-/* var bd = 3000;
- while (bd < 4000) {
- board[bd] = -1;
- bd++
- }
- */
- function createMask()
- {
- d3.select("body").append("canvas").attr("id", "maskCanvas")
- maskCanvas = document.getElementById('maskCanvas'),
- maskCanvas.width = 85;
- maskCanvas.height = 85;
- maskContext = maskCanvas.getContext('2d');
- maskImage = new Image();
- maskImage.src = 'mask.png';
- maskImage.onload = function(){
- maskContext.drawImage(maskImage,0,0,85,85 * maskImage.height / maskImage.width);
- maskData = maskContext.getImageData(0,0,85,85).data;
-/*
- var hh = 0;
- while (hh < maskData.length) {
- if (hh%4 == 0) {
- if (maskData[hh] == 0) {
- board[~~(hh/4)] = -1;
- }
- }
- hh++;
- }
- */
-
- }
- }
- if (timer) clearInterval(timer);
- timer = setInterval(step, 0);
- step();
-
- return cloud;
-
- function step() {
- var start = +new Date,
- d;
- while (+new Date - start < timeInterval && ++i < n && timer) {
- d = data[i];
- d.x = (size[0] * (Math.random() + .5)) >> 1;
- d.y = (size[1] * (Math.random() + .5)) >> 1;
- cloudSprite(d, data, i);
- if (d.hasText && place(board, d, bounds)) {
- tags.push(d);
- event.word(d);
- if (bounds) cloudBounds(bounds, d);
- else bounds = [{x: d.x + d.x0, y: d.y + d.y0}, {x: d.x + d.x1, y: d.y + d.y1}];
- // Temporary hack
- d.x -= size[0] >> 1;
- d.y -= size[1] >> 1;
- }
- }
- if (i >= n) {
- cloud.stop();
- event.end(tags, bounds);
- }
- }
- }
-
- cloud.stop = function() {
- if (timer) {
- clearInterval(timer);
- timer = null;
- }
- return cloud;
- };
-
- cloud.timeInterval = function(x) {
- if (!arguments.length) return timeInterval;
- timeInterval = x == null ? Infinity : x;
- return cloud;
- };
-
- function place(board, tag, bounds) {
- var perimeter = [{x: 0, y: 0}, {x: size[0], y: size[1]}],
- startX = tag.x,
- startY = tag.y,
- maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),
- s = spiral(size),
- dt = Math.random() < .5 ? 1 : -1,
- t = -dt,
- dxdy,
- dx,
- dy;
-
- while (dxdy = s(t += dt)) {
- dx = ~~dxdy[0];
- dy = ~~dxdy[1];
-
- if (Math.min(dx, dy) > maxDelta) break;
-
- tag.x = startX + dx;
- tag.y = startY + dy;
-
- if (tag.x + tag.x0 < 0 || tag.y + tag.y0 < 0 ||
- tag.x + tag.x1 > size[0] || tag.y + tag.y1 > size[1]) continue;
- // TODO only check for collisions within current bounds.
- if (!bounds || !cloudCollide(tag, board, size[0])) {
- if (!bounds || collideRects(tag, bounds)) {
- var sprite = tag.sprite,
- w = tag.width >> 5,
- sw = size[0] >> 5,
- lx = tag.x - (w << 4),
- sx = lx & 0x7f,
- msx = 32 - sx,
- h = tag.y1 - tag.y0,
- x = (tag.y + tag.y0) * sw + (lx >> 5),
- last;
- for (var j = 0; j < h; j++) {
- last = 0;
- for (var i = 0; i <= w; i++) {
- board[x + i] |= (last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);
- }
- x += sw;
- }
- delete tag.sprite;
- return true;
- }
- }
- }
- return false;
- }
-
- cloud.words = function(x) {
- if (!arguments.length) return words;
- words = x;
- return cloud;
- };
-
- cloud.size = function(x) {
- if (!arguments.length) return size;
- size = [+x[0], +x[1]];
- return cloud;
- };
-
- cloud.font = function(x) {
- if (!arguments.length) return font;
- font = d3.functor(x);
- return cloud;
- };
-
- cloud.fontStyle = function(x) {
- if (!arguments.length) return fontStyle;
- fontStyle = d3.functor(x);
- return cloud;
- };
-
- cloud.fontWeight = function(x) {
- if (!arguments.length) return fontWeight;
- fontWeight = d3.functor(x);
- return cloud;
- };
-
- cloud.rotate = function(x) {
- if (!arguments.length) return rotate;
- rotate = d3.functor(x);
- return cloud;
- };
-
- cloud.text = function(x) {
- if (!arguments.length) return text;
- text = d3.functor(x);
- return cloud;
- };
-
- cloud.spiral = function(x) {
- if (!arguments.length) return spiral;
- spiral = spirals[x + ""] || x;
- return cloud;
- };
-
- cloud.fontSize = function(x) {
- if (!arguments.length) return fontSize;
- fontSize = d3.functor(x);
- return cloud;
- };
-
- cloud.padding = function(x) {
- if (!arguments.length) return padding;
- padding = d3.functor(x);
- return cloud;
- };
-
- return d3.rebind(cloud, event, "on");
- }
-
- function cloudText(d) {
- return d.text;
- }
-
- function cloudFont() {
- return "serif";
- }
-
- function cloudFontNormal() {
- return "normal";
- }
-
- function cloudFontSize(d) {
- return Math.sqrt(d.value);
- }
-
- function cloudRotate() {
- return (~~(Math.random() * 6) - 3) * 30;
- }
-
- function cloudPadding() {
- return 1;
- }
-
- // Fetches a monochrome sprite bitmap for the specified text.
- // Load in batches for speed.
- function cloudSprite(d, data, di) {
- if (d.sprite) return;
- c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);
- var x = 0,
- y = 0,
- maxh = 0,
- n = data.length;
- --di;
- while (++di < n) {
- d = data[di];
- c.save();
- c.font = d.style + " " + d.weight + " " + ~~((d.size + 1) / ratio) + "px " + d.font;
- var w = c.measureText(d.text + "m").width * ratio,
- h = d.size << 1;
- if (d.rotate) {
- var sr = Math.sin(d.rotate * cloudRadians),
- cr = Math.cos(d.rotate * cloudRadians),
- wcr = w * cr,
- wsr = w * sr,
- hcr = h * cr,
- hsr = h * sr;
- w = (Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f) >> 5 << 5;
- h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));
- } else {
- w = (w + 0x1f) >> 5 << 5;
- }
- if (h > maxh) maxh = h;
- if (x + w >= (cw << 5)) {
- x = 0;
- y += maxh;
- maxh = 0;
- }
- if (y + h >= ch) break;
- c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);
- if (d.rotate) c.rotate(d.rotate * cloudRadians);
- c.fillText(d.text, 0, 0);
- if (d.padding) c.lineWidth = 2 * d.padding, c.strokeText(d.text, 0, 0);
- c.restore();
- d.width = w;
- d.height = h;
- d.xoff = x;
- d.yoff = y;
- d.x1 = w >> 1;
- d.y1 = h >> 1;
- d.x0 = -d.x1;
- d.y0 = -d.y1;
- d.hasText = true;
- x += w;
- }
- var pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,
- sprite = [];
- while (--di >= 0) {
- d = data[di];
- if (!d.hasText) continue;
- var w = d.width,
- w32 = w >> 5,
- h = d.y1 - d.y0;
- // Zero the buffer
- for (var i = 0; i < h * w32; i++) sprite[i] = 0;
- x = d.xoff;
- if (x == null) return;
- y = d.yoff;
- var seen = 0,
- seenRow = -1;
- for (var j = 0; j < h; j++) {
- for (var i = 0; i < w; i++) {
- var k = w32 * j + (i >> 5),
- m = pixels[((y + j) * (cw << 5) + (x + i)) << 2] ? 1 << (31 - (i % 32)) : 0;
- sprite[k] |= m;
- seen |= m;
- }
- if (seen) seenRow = j;
- else {
- d.y0++;
- h--;
- j--;
- y++;
- }
- }
- d.y1 = d.y0 + seenRow;
- d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);
- }
- }
-
- // Use mask-based collision detection.
- function cloudCollide(tag, board, sw) {
- sw >>= 5;
- var sprite = tag.sprite,
- w = tag.width >> 5,
- lx = tag.x - (w << 4),
- sx = lx & 0x7f,
- msx = 32 - sx,
- h = tag.y1 - tag.y0,
- x = (tag.y + tag.y0) * sw + (lx >> 5),
- last;
- for (var j = 0; j < h; j++) {
- last = 0;
- for (var i = 0; i <= w; i++) {
- if (((last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0))
- & board[x + i]) return true;
- }
- x += sw;
- }
- return false;
- }
-
- function cloudBounds(bounds, d) {
- var b0 = bounds[0],
- b1 = bounds[1];
- if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;
- if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;
- if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;
- if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;
- }
-
- function collideRects(a, b) {
- return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;
- }
-
- function archimedeanSpiral(size) {
- var e = size[0] / size[1];
- return function(t) {
- return [e * (t *= .1) * Math.cos(t), t * Math.sin(t)];
- };
- }
-
- function rectangularSpiral(size) {
- var dy = 4,
- dx = dy * size[0] / size[1],
- x = 0,
- y = 0;
- return function(t) {
- var sign = t < 0 ? -1 : 1;
- // See triangular numbers: T_n = n * (n + 1) / 2.
- switch ((Math.sqrt(1 + 4 * sign * t) - sign) & 3) {
- case 0: x += dx; break;
- case 1: y += dy; break;
- case 2: x -= dx; break;
- default: y -= dy; break;
- }
- return [x, y];
- };
- }
-
- // TODO reuse arrays?
- function zeroArray(n) {
- var a = [],
- i = -1;
- while (++i < n) a[i] = 0;
- return a;
- }
-
- var cloudRadians = Math.PI / 180,
- cw = 1 << 11 >> 5,
- ch = 1 << 11,
- canvas,
- ratio = 1;
-
- if (typeof document !== "undefined") {
- canvas = document.createElement("canvas");
- canvas.width = 1;
- canvas.height = 1;
- ratio = Math.sqrt(canvas.getContext("2d").getImageData(0, 0, 1, 1).data.length >> 2);
- canvas.width = (cw << 5) / ratio;
- canvas.height = ch / ratio;
- } else {
- // Attempt to use node-canvas.
- canvas = new Canvas(cw << 5, ch);
- }
-
- var c = canvas.getContext("2d"),
- spirals = {
- archimedean: archimedeanSpiral,
- rectangular: rectangularSpiral
- };
- c.fillStyle = c.strokeStyle = "red";
- c.textAlign = "center";
-
- if (typeof module === "object" && module.exports) module.exports = cloud;
- else (d3.layout || (d3.layout = {})).cloud = cloud;
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.js
deleted file mode 100644
index abc5ebef..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.layout.js
+++ /dev/null
@@ -1,908 +0,0 @@
-(function(){d3.layout = {};
-d3.layout.chord = function() {
- var chord = {},
- chords,
- groups,
- matrix,
- n,
- padding = 0,
- sortGroups,
- sortSubgroups,
- sortChords;
-
- function relayout() {
- var subgroups = {},
- groupSums = [],
- groupIndex = d3.range(n),
- subgroupIndex = [],
- k,
- x,
- x0,
- i,
- j;
-
- chords = [];
- groups = [];
-
- // Compute the sum.
- k = 0, i = -1; while (++i < n) {
- x = 0, j = -1; while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
-
- // Sort groups…
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
-
- // Sort subgroups…
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
-
- // Convert the sum to scaling factor for [0, 2pi].
- // TODO Allow start and end angle to be specified.
- // TODO Allow padding to be specified as percentage?
- k = (2 * Math.PI - padding * n) / k;
-
- // Compute the start and end angle for each group and subgroup.
- x = 0, i = -1; while (++i < n) {
- x0 = x, j = -1; while (++j < n) {
- var di = groupIndex[i],
- dj = subgroupIndex[i][j],
- v = matrix[di][dj];
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: x,
- endAngle: x += v * k,
- value: v
- };
- }
- groups.push({
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- });
- x += padding;
- }
-
- // Generate chords for each (non-empty) subgroup-subgroup link.
- i = -1; while (++i < n) {
- j = i - 1; while (++j < n) {
- var source = subgroups[i + "-" + j],
- target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push({
- source: source,
- target: target
- })
- }
- }
- }
-
- if (sortChords) resort();
- }
-
- function resort() {
- chords.sort(function(a, b) {
- a = Math.min(a.source.value, a.target.value);
- b = Math.min(b.source.value, b.target.value);
- return sortChords(a, b);
- });
- }
-
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
-
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
-
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
-
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
-
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
-
- return chord;
-};
-// A rudimentary force layout using Gauss-Seidel.
-d3.layout.force = function() {
- var force = {},
- event = d3.dispatch("tick"),
- size = [1, 1],
- alpha = .5,
- distance = 30,
- interval,
- nodes,
- links,
- distances;
-
- function tick() {
- var n = distances.length,
- i, // current index
- o, // current link
- s, // current source
- t, // current target
- l, // current distance
- x, // x-distance
- y; // y-distance
-
- // gauss-seidel relaxation
- for (i = 0; i < n; ++i) {
- o = distances[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = Math.sqrt(x * x + y * y)) {
- l = alpha / (o.distance * o.distance) * (l - distance * o.distance) / l;
- x *= l;
- y *= l;
- if (!t.fixed) {
- t.x -= x;
- t.y -= y;
- }
- if (!s.fixed) {
- s.x += x;
- s.y += y;
- }
- }
- }
-
- event.tick.dispatch({type: "tick"});
-
- // simulated annealing, basically
- return (alpha *= .99) < .005;
- }
-
- force.on = function(type, listener) {
- event[type].add(listener);
- return force;
- };
-
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
-
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
-
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
-
- force.distance = function(d) {
- if (!arguments.length) return distance;
- distance = d;
- return force;
- };
-
- force.start = function() {
- var i,
- j,
- k,
- n = nodes.length,
- m = links.length,
- w = size[0],
- h = size[1],
- o;
-
- var paths = [];
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- o.x = o.x || Math.random() * w;
- o.y = o.y || Math.random() * h;
- o.fixed = 0;
- paths[i] = [];
- for (j = 0; j < n; ++j) {
- paths[i][j] = Infinity;
- }
- paths[i][i] = 0;
- }
-
- for (i = 0; i < m; ++i) {
- o = links[i];
- paths[o.source][o.target] = 1;
- paths[o.target][o.source] = 1;
- o.source = nodes[o.source];
- o.target = nodes[o.target];
- }
-
- // Floyd-Warshall
- for (k = 0; k < n; ++k) {
- for (i = 0; i < n; ++i) {
- for (j = 0; j < n; ++j) {
- paths[i][j] = Math.min(paths[i][j], paths[i][k] + paths[k][j]);
- }
- }
- }
-
- distances = [];
- for (i = 0; i < n; ++i) {
- for (j = i + 1; j < n; ++j) {
- distances.push({
- source: nodes[i],
- target: nodes[j],
- distance: paths[i][j] * paths[i][j]
- });
- }
- }
-
- distances.sort(function(a, b) {
- return a.distance - b.distance;
- });
-
- d3.timer(tick);
- return force;
- };
-
- force.resume = function() {
- alpha = .1;
- d3.timer(tick);
- return force;
- };
-
- force.stop = function() {
- alpha = 0;
- return force;
- };
-
- // use `node.call(force.drag)` to make nodes draggable
- force.drag = function() {
- var node, element;
-
- this
- .on("mouseover", function(d) { d.fixed = true; })
- .on("mouseout", function(d) { if (d != node) d.fixed = false; })
- .on("mousedown", mousedown);
-
- d3.select(window)
- .on("mousemove", mousemove)
- .on("mouseup", mouseup);
-
- function mousedown(d) {
- (node = d).fixed = true;
- element = this;
- d3.event.preventDefault();
- }
-
- function mousemove() {
- if (!node) return;
- var m = d3.svg.mouse(element);
- node.x = m[0];
- node.y = m[1];
- force.resume(); // restart annealing
- }
-
- function mouseup() {
- if (!node) return;
- mousemove();
- node.fixed = false;
- node = element = null;
- }
-
- return force;
- };
-
- return force;
-};
-d3.layout.partition = function() {
- var hierarchy = d3.layout.hierarchy(),
- size = [1, 1]; // width, height
-
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children) {
- var i = -1,
- n = children.length,
- c,
- d;
- dx /= node.value;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
-
- function depth(node) {
- var children = node.children,
- d = 0;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
-
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
-
- partition.sort = d3.rebind(partition, hierarchy.sort);
- partition.children = d3.rebind(partition, hierarchy.children);
- partition.value = d3.rebind(partition, hierarchy.value);
-
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
-
- return partition;
-};
-d3.layout.pie = function() {
- var value = Number,
- sort = null,
- startAngle = 0,
- endAngle = 2 * Math.PI;
-
- function pie(data, i) {
-
- // Compute the start angle.
- var a = +(typeof startAngle == "function"
- ? startAngle.apply(this, arguments)
- : startAngle);
-
- // Compute the angular range (end - start).
- var k = (typeof endAngle == "function"
- ? endAngle.apply(this, arguments)
- : endAngle) - startAngle;
-
- // Optionally sort the data.
- var index = d3.range(data.length);
- if (sort != null) index.sort(function(i, j) {
- return sort(data[i], data[j]);
- });
-
- // Compute the numeric values for each data element.
- var values = data.map(value);
-
- // Convert k into a scale factor from value to angle, using the sum.
- k /= values.reduce(function(p, d) { return p + d; }, 0);
-
- // Compute the arcs!
- var arcs = index.map(function(i) {
- return {
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
-
- // Return the arcs in the original data's order.
- return data.map(function(d, i) {
- return arcs[index[i]];
- });
- }
-
- /**
- * Specifies the value function *x*, which returns a nonnegative numeric value
- * for each datum. The default value function is `Number`. The value function
- * is passed two arguments: the current datum and the current index.
- */
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
-
- /**
- * Specifies a sort comparison operator *x*. The comparator is passed two data
- * elements from the data array, a and b; it returns a negative value if a is
- * less than b, a positive value if a is greater than b, and zero if a equals
- * b.
- */
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
-
- /**
- * Specifies the overall start angle of the pie chart. Defaults to 0. The
- * start angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
-
- /**
- * Specifies the overall end angle of the pie chart. Defaults to 2Ï€. The
- * end angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
-
- return pie;
-};
-// data is two-dimensional array of x,y; we populate y0
-// TODO perhaps make the `x`, `y` and `y0` structure customizable
-d3.layout.stack = function() {
- var order = "default",
- offset = "zero";
-
- function stack(data) {
- var n = data.length,
- m = data[0].length,
- i,
- j,
- y0;
-
- // compute the order of series
- var index = d3_layout_stackOrders[order](data);
-
- // set y0 on the baseline
- d3_layout_stackOffsets[offset](data, index);
-
- // propagate offset to other series
- for (j = 0; j < m; ++j) {
- for (i = 1, y0 = data[index[0]][j].y0; i < n; ++i) {
- data[index[i]][j].y0 = y0 += data[index[i - 1]][j].y;
- }
- }
-
- return data;
- }
-
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = x;
- return stack;
- };
-
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = x;
- return stack;
- };
-
- return stack;
-}
-
-var d3_layout_stackOrders = {
-
- "inside-out": function(data) {
- var n = data.length,
- i,
- j,
- max = data.map(d3_layout_stackMaxIndex),
- sums = data.map(d3_layout_stackReduceSum),
- index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),
- top = 0,
- bottom = 0,
- tops = [],
- bottoms = [];
- for (i = 0; i < n; i++) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
-
- "reverse": function(data) {
- return d3.range(data.length).reverse();
- },
-
- "default": function(data) {
- return d3.range(data.length);
- }
-
-};
-
-var d3_layout_stackOffsets = {
-
- "silhouette": function(data, index) {
- var n = data.length,
- m = data[0].length,
- sums = [],
- max = 0,
- i,
- j,
- o;
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j].y;
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0, i = index[0]; j < m; ++j) {
- data[i][j].y0 = (max - sums[j]) / 2;
- }
- },
-
- "wiggle": function(data, index) {
- var n = data.length,
- x = data[0],
- m = x.length,
- max = 0,
- i,
- j,
- k,
- ii,
- ik,
- i0 = index[0],
- s1,
- s2,
- s3,
- dx,
- o,
- o0;
- data[i0][0].y0 = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j].y;
- for (i = 0, s2 = 0, dx = x[j].x - x[j - 1].x; i < n; ++i) {
- for (k = 0, ii = index[i], s3 = (data[ii][j].y - data[ii][j - 1].y) / (2 * dx); k < i; ++k) {
- s3 += (data[ik = index[k]][j].y - data[ik][j - 1].y) / dx;
- }
- s2 += s3 * data[ii][j].y;
- }
- data[i0][j].y0 = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) data[i0][j].y0 -= o0;
- },
-
- "zero": function(data, index) {
- var j = 0,
- m = data[0].length,
- i0 = index[0];
- for (; j < m; ++j) data[i0][j].y0 = 0;
- }
-
-};
-
-function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
-}
-
-function d3_layout_stackMaxIndex(array) {
- var i = 1,
- j = 0,
- v = array[0].y,
- k,
- n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i].y) > v) {
- j = i;
- v = k;
- }
- }
- return j;
-}
-
-function d3_layout_stackSum(p, d) {
- return p + d.y;
-}
-d3.layout.hierarchy = function() {
- var sort = d3_layout_hierarchySort,
- children = d3_layout_hierarchyChildren,
- value = d3_layout_hierarchyValue;
-
- // Recursively compute the node depth and value.
- // Also converts the data representation into a standard hierarchy structure.
- function recurse(data, depth, nodes) {
- var datas = children.call(hierarchy, data, depth),
- node = {depth: depth, data: data};
- nodes.push(node);
- if (datas) {
- var i = -1,
- n = datas.length,
- c = node.children = [],
- v = 0,
- j = depth + 1;
- while (++i < n) {
- d = recurse(datas[i], j, nodes);
- if (d.value > 0) { // ignore NaN, negative, etc.
- c.push(d);
- v += d.value;
- d.parent = node;
- }
- }
- if (sort) c.sort(sort);
- node.value = v;
- } else {
- node.value = value.call(hierarchy, data, depth);
- }
- return node;
- }
-
- // Recursively re-evaluates the node value.
- function revalue(node, depth) {
- var children = node.children,
- v = 0;
- if (children) {
- var i = -1,
- n = children.length,
- j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else {
- v = value.call(hierarchy, node.data, depth);
- }
- return node.value = v;
- }
-
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
-
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
-
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
-
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
-
- // Re-evaluates the `value` property for the specified hierarchy.
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
-
- return hierarchy;
-}
-
-function d3_layout_hierarchyChildren(d) {
- return d.children;
-}
-
-function d3_layout_hierarchyValue(d) {
- return d.value;
-}
-
-function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
-}
-// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
-d3.layout.treemap = function() {
- var hierarchy = d3.layout.hierarchy(),
- round = Math.round,
- size = [1, 1], // width, height
- sticky = false,
- stickies;
-
- // Recursively compute the node area based on value & scale.
- function scale(node, k) {
- var children = node.children;
- node.area = node.value * k;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) scale(children[i], k);
- }
- }
-
- // Recursively arranges the specified node's children into squarified rows.
- function squarify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- row = [],
- children = node.children.slice(), // copy-on-write
- child,
- best = Infinity, // the best row score so far
- score, // the current row score
- u = Math.min(rect.dx, rect.dy), // initial orientation
- n;
- row.area = 0;
- while ((n = children.length) > 0) {
- row.push(child = children[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) { // continue with this orientation
- children.pop();
- best = score;
- } else { // abort, and try a different orientation
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- node.children.forEach(squarify);
- }
-
- // Recursively resizes the specified node's children into existing rows.
- // Preserves the existing layout!
- function stickify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- children = node.children.slice(), // copy-on-write
- child,
- row = [];
- row.area = 0;
- while (child = children.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !children.length);
- row.length = row.area = 0;
- }
- }
- node.children.forEach(stickify);
- }
-
- // Computes the score for the specified row, as the worst aspect ratio.
- function worst(row, u) {
- var s = row.area,
- r,
- rmax = 0,
- rmin = Infinity,
- i = -1,
- n = row.length;
- while (++i < n) {
- r = row[i].area;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return Math.max((u * rmax) / s, s / (u * rmin));
- }
-
- // Positions the specified row of nodes. Modifies `rect`.
- function position(row, u, rect, flush) {
- var i = -1,
- n = row.length,
- x = rect.x,
- y = rect.y,
- v = u ? round(row.area / u) : 0,
- o;
- if (u == rect.dx) { // horizontal subdivision
- if (flush || v > rect.dy) v = rect.dy; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = round(o.area / v);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x; // rounding error
- rect.y += v;
- rect.dy -= v;
- } else { // vertical subdivision
- if (flush || v > rect.dx) v = rect.dx; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = round(o.area / v);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y; // rounding error
- rect.x += v;
- rect.dx -= v;
- }
- }
-
- function treemap(d) {
- var nodes = stickies || hierarchy(d),
- root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale(root, size[0] * size[1] / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
-
- treemap.sort = d3.rebind(treemap, hierarchy.sort);
- treemap.children = d3.rebind(treemap, hierarchy.children);
- treemap.value = d3.rebind(treemap, hierarchy.value);
-
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
-
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
-
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
-
- return treemap;
-};
-})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.js
deleted file mode 100644
index 78c4dbca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.js
+++ /dev/null
@@ -1,7037 +0,0 @@
-(function() {
- function d3_class(ctor, properties) {
- try {
- for (var key in properties) {
- Object.defineProperty(ctor.prototype, key, {
- value: properties[key],
- enumerable: false
- });
- }
- } catch (e) {
- ctor.prototype = properties;
- }
- }
- function d3_arrayCopy(pseudoarray) {
- var i = -1, n = pseudoarray.length, array = [];
- while (++i < n) array.push(pseudoarray[i]);
- return array;
- }
- function d3_arraySlice(pseudoarray) {
- return Array.prototype.slice.call(pseudoarray);
- }
- function d3_Map() {}
- function d3_identity(d) {
- return d;
- }
- function d3_this() {
- return this;
- }
- function d3_true() {
- return true;
- }
- function d3_functor(v) {
- return typeof v === "function" ? v : function() {
- return v;
- };
- }
- function d3_rebind(target, source, method) {
- return function() {
- var value = method.apply(source, arguments);
- return arguments.length ? target : value;
- };
- }
- function d3_number(x) {
- return x != null && !isNaN(x);
- }
- function d3_zipLength(d) {
- return d.length;
- }
- function d3_splitter(d) {
- return d == null;
- }
- function d3_collapse(s) {
- return s.trim().replace(/\s+/g, " ");
- }
- function d3_range_integerScale(x) {
- var k = 1;
- while (x * k % 1) k *= 10;
- return k;
- }
- function d3_dispatch() {}
- function d3_dispatch_event(dispatch) {
- function event() {
- var z = listeners, i = -1, n = z.length, l;
- while (++i < n) if (l = z[i].on) l.apply(this, arguments);
- return dispatch;
- }
- var listeners = [], listenerByName = new d3_Map;
- event.on = function(name, listener) {
- var l = listenerByName.get(name), i;
- if (arguments.length < 2) return l && l.on;
- if (l) {
- l.on = null;
- listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
- listenerByName.remove(name);
- }
- if (listener) listeners.push(listenerByName.set(name, {
- on: listener
- }));
- return dispatch;
- };
- return event;
- }
- function d3_format_precision(x, p) {
- return p - (x ? 1 + Math.floor(Math.log(x + Math.pow(10, 1 + Math.floor(Math.log(x) / Math.LN10) - p)) / Math.LN10) : 1);
- }
- function d3_format_typeDefault(x) {
- return x + "";
- }
- function d3_format_group(value) {
- var i = value.lastIndexOf("."), f = i >= 0 ? value.substring(i) : (i = value.length, ""), t = [];
- while (i > 0) t.push(value.substring(i -= 3, i + 3));
- return t.reverse().join(",") + f;
- }
- function d3_formatPrefix(d, i) {
- var k = Math.pow(10, Math.abs(8 - i) * 3);
- return {
- scale: i > 8 ? function(d) {
- return d / k;
- } : function(d) {
- return d * k;
- },
- symbol: d
- };
- }
- function d3_ease_clamp(f) {
- return function(t) {
- return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
- };
- }
- function d3_ease_reverse(f) {
- return function(t) {
- return 1 - f(1 - t);
- };
- }
- function d3_ease_reflect(f) {
- return function(t) {
- return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
- };
- }
- function d3_ease_identity(t) {
- return t;
- }
- function d3_ease_poly(e) {
- return function(t) {
- return Math.pow(t, e);
- };
- }
- function d3_ease_sin(t) {
- return 1 - Math.cos(t * Math.PI / 2);
- }
- function d3_ease_exp(t) {
- return Math.pow(2, 10 * (t - 1));
- }
- function d3_ease_circle(t) {
- return 1 - Math.sqrt(1 - t * t);
- }
- function d3_ease_elastic(a, p) {
- var s;
- if (arguments.length < 2) p = .45;
- if (arguments.length < 1) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return function(t) {
- return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
- };
- }
- function d3_ease_back(s) {
- if (!s) s = 1.70158;
- return function(t) {
- return t * t * ((s + 1) * t - s);
- };
- }
- function d3_ease_bounce(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
- }
- function d3_eventCancel() {
- d3.event.stopPropagation();
- d3.event.preventDefault();
- }
- function d3_eventSource() {
- var e = d3.event, s;
- while (s = e.sourceEvent) e = s;
- return e;
- }
- function d3_eventDispatch(target) {
- var dispatch = new d3_dispatch, i = 0, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- dispatch.of = function(thiz, argumentz) {
- return function(e1) {
- try {
- var e0 = e1.sourceEvent = d3.event;
- e1.target = target;
- d3.event = e1;
- dispatch[e1.type].apply(thiz, argumentz);
- } finally {
- d3.event = e0;
- }
- };
- };
- return dispatch;
- }
- function d3_transform(m) {
- var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
- if (r0[0] * r1[1] < r1[0] * r0[1]) {
- r0[0] *= -1;
- r0[1] *= -1;
- kx *= -1;
- kz *= -1;
- }
- this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_transformDegrees;
- this.translate = [ m.e, m.f ];
- this.scale = [ kx, ky ];
- this.skew = ky ? Math.atan2(kz, ky) * d3_transformDegrees : 0;
- }
- function d3_transformDot(a, b) {
- return a[0] * b[0] + a[1] * b[1];
- }
- function d3_transformNormalize(a) {
- var k = Math.sqrt(d3_transformDot(a, a));
- if (k) {
- a[0] /= k;
- a[1] /= k;
- }
- return k;
- }
- function d3_transformCombine(a, b, k) {
- a[0] += k * b[0];
- a[1] += k * b[1];
- return a;
- }
- function d3_interpolateByName(name) {
- return name == "transform" ? d3.interpolateTransform : d3.interpolate;
- }
- function d3_uninterpolateNumber(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return (x - a) * b;
- };
- }
- function d3_uninterpolateClamp(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return Math.max(0, Math.min(1, (x - a) * b));
- };
- }
- function d3_rgb(r, g, b) {
- return new d3_Rgb(r, g, b);
- }
- function d3_Rgb(r, g, b) {
- this.r = r;
- this.g = g;
- this.b = b;
- }
- function d3_rgb_hex(v) {
- return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
- }
- function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, g = 0, b = 0, m1, m2, name;
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl":
- {
- return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
- }
- case "rgb":
- {
- return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
- }
- }
- }
- if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);
- if (format != null && format.charAt(0) === "#") {
- if (format.length === 4) {
- r = format.charAt(1);
- r += r;
- g = format.charAt(2);
- g += g;
- b = format.charAt(3);
- b += b;
- } else if (format.length === 7) {
- r = format.substring(1, 3);
- g = format.substring(3, 5);
- b = format.substring(5, 7);
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- }
- return rgb(r, g, b);
- }
- function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
- h *= 60;
- } else {
- s = h = 0;
- }
- return d3_hsl(h, s, l);
- }
- function d3_rgb_lab(r, g, b) {
- r = d3_rgb_xyz(r);
- g = d3_rgb_xyz(g);
- b = d3_rgb_xyz(b);
- var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
- return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
- function d3_rgb_xyz(r) {
- return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
- }
- function d3_rgb_parseNumber(c) {
- var f = parseFloat(c);
- return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
- }
- function d3_hsl(h, s, l) {
- return new d3_Hsl(h, s, l);
- }
- function d3_Hsl(h, s, l) {
- this.h = h;
- this.s = s;
- this.l = l;
- }
- function d3_hsl_rgb(h, s, l) {
- function v(h) {
- if (h > 360) h -= 360; else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
- function vv(h) {
- return Math.round(v(h) * 255);
- }
- var m1, m2;
- h = h % 360;
- if (h < 0) h += 360;
- s = s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
- return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
- }
- function d3_hcl(h, c, l) {
- return new d3_Hcl(h, c, l);
- }
- function d3_Hcl(h, c, l) {
- this.h = h;
- this.c = c;
- this.l = l;
- }
- function d3_hcl_lab(h, c, l) {
- return d3_lab(l, Math.cos(h *= Math.PI / 180) * c, Math.sin(h) * c);
- }
- function d3_lab(l, a, b) {
- return new d3_Lab(l, a, b);
- }
- function d3_Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
- function d3_lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = d3_lab_xyz(x) * d3_lab_X;
- y = d3_lab_xyz(y) * d3_lab_Y;
- z = d3_lab_xyz(z) * d3_lab_Z;
- return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
- }
- function d3_lab_hcl(l, a, b) {
- return d3_hcl(Math.atan2(b, a) / Math.PI * 180, Math.sqrt(a * a + b * b), l);
- }
- function d3_lab_xyz(x) {
- return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
- function d3_xyz_lab(x) {
- return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
- function d3_xyz_rgb(r) {
- return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
- }
- function d3_selection(groups) {
- d3_arraySubclass(groups, d3_selectionPrototype);
- return groups;
- }
- function d3_selection_selector(selector) {
- return function() {
- return d3_select(selector, this);
- };
- }
- function d3_selection_selectorAll(selector) {
- return function() {
- return d3_selectAll(selector, this);
- };
- }
- function d3_selection_attr(name, value) {
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- function attrConstant() {
- this.setAttribute(name, value);
- }
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
- }
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
- }
- name = d3.ns.qualify(name);
- return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
- }
- function d3_selection_classedRe(name) {
- return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
- }
- function d3_selection_classed(name, value) {
- function classedConstant() {
- var i = -1;
- while (++i < n) name[i](this, value);
- }
- function classedFunction() {
- var i = -1, x = value.apply(this, arguments);
- while (++i < n) name[i](this, x);
- }
- name = name.trim().split(/\s+/).map(d3_selection_classedName);
- var n = name.length;
- return typeof value === "function" ? classedFunction : classedConstant;
- }
- function d3_selection_classedName(name) {
- var re = d3_selection_classedRe(name);
- return function(node, value) {
- if (c = node.classList) return value ? c.add(name) : c.remove(name);
- var c = node.className, cb = c.baseVal != null, cv = cb ? c.baseVal : c;
- if (value) {
- re.lastIndex = 0;
- if (!re.test(cv)) {
- cv = d3_collapse(cv + " " + name);
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- } else if (cv) {
- cv = d3_collapse(cv.replace(re, " "));
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- };
- }
- function d3_selection_style(name, value, priority) {
- function styleNull() {
- this.style.removeProperty(name);
- }
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
- }
- return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
- }
- function d3_selection_property(name, value) {
- function propertyNull() {
- delete this[name];
- }
- function propertyConstant() {
- this[name] = value;
- }
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name]; else this[name] = x;
- }
- return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
- }
- function d3_selection_dataNode(data) {
- return {
- __data__: data
- };
- }
- function d3_selection_filter(selector) {
- return function() {
- return d3_selectMatches(this, selector);
- };
- }
- function d3_selection_sortComparator(comparator) {
- if (!arguments.length) comparator = d3.ascending;
- return function(a, b) {
- return comparator(a && a.__data__, b && b.__data__);
- };
- }
- function d3_selection_on(type, listener, capture) {
- function onRemove() {
- var wrapper = this[name];
- if (wrapper) {
- this.removeEventListener(type, wrapper, wrapper.$);
- delete this[name];
- }
- }
- function onAdd() {
- function wrapper(e) {
- var o = d3.event;
- d3.event = e;
- args[0] = node.__data__;
- try {
- listener.apply(node, args);
- } finally {
- d3.event = o;
- }
- }
- var node = this, args = arguments;
- onRemove.call(this);
- this.addEventListener(type, this[name] = wrapper, wrapper.$ = capture);
- wrapper._ = listener;
- }
- var name = "__on" + type, i = type.indexOf(".");
- if (i > 0) type = type.substring(0, i);
- return listener ? onAdd : onRemove;
- }
- function d3_selection_each(groups, callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
- if (node = group[i]) callback(node, i, j);
- }
- }
- return groups;
- }
- function d3_selection_enter(selection) {
- d3_arraySubclass(selection, d3_selection_enterPrototype);
- return selection;
- }
- function d3_transition(groups, id, time) {
- d3_arraySubclass(groups, d3_transitionPrototype);
- var tweens = new d3_Map, event = d3.dispatch("start", "end"), ease = d3_transitionEase;
- groups.id = id;
- groups.time = time;
- groups.tween = function(name, tween) {
- if (arguments.length < 2) return tweens.get(name);
- if (tween == null) tweens.remove(name); else tweens.set(name, tween);
- return groups;
- };
- groups.ease = function(value) {
- if (!arguments.length) return ease;
- ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments);
- return groups;
- };
- groups.each = function(type, listener) {
- if (arguments.length < 2) return d3_transition_each.call(groups, type);
- event.on(type, listener);
- return groups;
- };
- d3.timer(function(elapsed) {
- return d3_selection_each(groups, function(node, i, j) {
- function start(elapsed) {
- if (lock.active > id) return stop();
- lock.active = id;
- tweens.forEach(function(key, value) {
- if (value = value.call(node, d, i)) {
- tweened.push(value);
- }
- });
- event.start.call(node, d, i);
- if (!tick(elapsed)) d3.timer(tick, 0, time);
- return 1;
- }
- function tick(elapsed) {
- if (lock.active !== id) return stop();
- var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
- while (n > 0) {
- tweened[--n].call(node, e);
- }
- if (t >= 1) {
- stop();
- d3_transitionId = id;
- event.end.call(node, d, i);
- d3_transitionId = 0;
- return 1;
- }
- }
- function stop() {
- if (!--lock.count) delete node.__transition__;
- return 1;
- }
- var tweened = [], delay = node.delay, duration = node.duration, lock = (node = node.node).__transition__ || (node.__transition__ = {
- active: 0,
- count: 0
- }), d = node.__data__;
- ++lock.count;
- delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time);
- });
- }, 0, time);
- return groups;
- }
- function d3_transition_each(callback) {
- var id = d3_transitionId, ease = d3_transitionEase, delay = d3_transitionDelay, duration = d3_transitionDuration;
- d3_transitionId = this.id;
- d3_transitionEase = this.ease();
- d3_selection_each(this, function(node, i, j) {
- d3_transitionDelay = node.delay;
- d3_transitionDuration = node.duration;
- callback.call(node = node.node, node.__data__, i, j);
- });
- d3_transitionId = id;
- d3_transitionEase = ease;
- d3_transitionDelay = delay;
- d3_transitionDuration = duration;
- return this;
- }
- function d3_tweenNull(d, i, a) {
- return a != "" && d3_tweenRemove;
- }
- function d3_tweenByName(b, name) {
- return d3.tween(b, d3_interpolateByName(name));
- }
- function d3_timer_step() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- var delay = d3_timer_flush() - now;
- if (delay > 24) {
- if (isFinite(delay)) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_step, delay);
- }
- d3_timer_interval = 0;
- } else {
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- }
- function d3_timer_flush() {
- var t0 = null, t1 = d3_timer_queue, then = Infinity;
- while (t1) {
- if (t1.flush) {
- t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
- } else {
- then = Math.min(then, t1.then + t1.delay);
- t1 = (t0 = t1).next;
- }
- }
- return then;
- }
- function d3_mousePoint(container, e) {
- var svg = container.ownerSVGElement || container;
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- if (d3_mouse_bug44083 < 0 && (window.scrollX || window.scrollY)) {
- svg = d3.select(document.body).append("svg").style("position", "absolute").style("top", 0).style("left", 0);
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- if (d3_mouse_bug44083) {
- point.x = e.pageX;
- point.y = e.pageY;
- } else {
- point.x = e.clientX;
- point.y = e.clientY;
- }
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [ point.x, point.y ];
- }
- var rect = container.getBoundingClientRect();
- return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
- }
- function d3_noop() {}
- function d3_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_scaleRange(scale) {
- return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
- }
- function d3_scale_nice(domain, nice) {
- var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
- if (x1 < x0) {
- dx = i0, i0 = i1, i1 = dx;
- dx = x0, x0 = x1, x1 = dx;
- }
- if (nice = nice(x1 - x0)) {
- domain[i0] = nice.floor(x0);
- domain[i1] = nice.ceil(x1);
- }
- return domain;
- }
- function d3_scale_niceDefault() {
- return Math;
- }
- function d3_scale_linear(domain, range, interpolate, clamp) {
- function rescale() {
- var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
- output = linear(domain, range, uninterpolate, interpolate);
- input = linear(range, domain, uninterpolate, d3.interpolate);
- return scale;
- }
- function scale(x) {
- return output(x);
- }
- var output, input;
- scale.invert = function(y) {
- return input(y);
- };
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(Number);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.rangeRound = function(x) {
- return scale.range(x).interpolate(d3.interpolateRound);
- };
- scale.clamp = function(x) {
- if (!arguments.length) return clamp;
- clamp = x;
- return rescale();
- };
- scale.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x;
- return rescale();
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- scale.nice = function() {
- d3_scale_nice(domain, d3_scale_linearNice);
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_linear(domain, range, interpolate, clamp);
- };
- return rescale();
- }
- function d3_scale_linearRebind(scale, linear) {
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_scale_linearNice(dx) {
- dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
- return dx && {
- floor: function(x) {
- return Math.floor(x / dx) * dx;
- },
- ceil: function(x) {
- return Math.ceil(x / dx) * dx;
- }
- };
- }
- function d3_scale_linearTickRange(domain, m) {
- var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
- if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
- extent[0] = Math.ceil(extent[0] / step) * step;
- extent[1] = Math.floor(extent[1] / step) * step + step * .5;
- extent[2] = step;
- return extent;
- }
- function d3_scale_linearTicks(domain, m) {
- return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
- }
- function d3_scale_linearTickFormat(domain, m) {
- return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f");
- }
- function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
- var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
- return function(x) {
- return i(u(x));
- };
- }
- function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
- var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
- if (domain[k] < domain[0]) {
- domain = domain.slice().reverse();
- range = range.slice().reverse();
- }
- while (++j <= k) {
- u.push(uninterpolate(domain[j - 1], domain[j]));
- i.push(interpolate(range[j - 1], range[j]));
- }
- return function(x) {
- var j = d3.bisect(domain, x, 1, k) - 1;
- return i[j](u[j](x));
- };
- }
- function d3_scale_log(linear, log) {
- function scale(x) {
- return linear(log(x));
- }
- var pow = log.pow;
- scale.invert = function(x) {
- return pow(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(pow);
- log = x[0] < 0 ? d3_scale_logn : d3_scale_logp;
- pow = log.pow;
- linear.domain(x.map(log));
- return scale;
- };
- scale.nice = function() {
- linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));
- return scale;
- };
- scale.ticks = function() {
- var extent = d3_scaleExtent(linear.domain()), ticks = [];
- if (extent.every(isFinite)) {
- var i = Math.floor(extent[0]), j = Math.ceil(extent[1]), u = pow(extent[0]), v = pow(extent[1]);
- if (log === d3_scale_logn) {
- ticks.push(pow(i));
- for (; i++ < j; ) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
- } else {
- for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
- ticks.push(pow(i));
- }
- for (i = 0; ticks[i] < u; i++) {}
- for (j = ticks.length; ticks[j - 1] > v; j--) {}
- ticks = ticks.slice(i, j);
- }
- return ticks;
- };
- scale.tickFormat = function(n, format) {
- if (arguments.length < 2) format = d3_scale_logFormat;
- if (arguments.length < 1) return format;
- var k = Math.max(.1, n / scale.ticks().length), f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil), e;
- return function(d) {
- return d / pow(f(log(d) + e)) <= k ? format(d) : "";
- };
- };
- scale.copy = function() {
- return d3_scale_log(linear.copy(), log);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_logp(x) {
- return Math.log(x < 0 ? 0 : x) / Math.LN10;
- }
- function d3_scale_logn(x) {
- return -Math.log(x > 0 ? 0 : -x) / Math.LN10;
- }
- function d3_scale_pow(linear, exponent) {
- function scale(x) {
- return linear(powp(x));
- }
- var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
- scale.invert = function(x) {
- return powb(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(powb);
- linear.domain(x.map(powp));
- return scale;
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(scale.domain(), m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(scale.domain(), m);
- };
- scale.nice = function() {
- return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
- };
- scale.exponent = function(x) {
- if (!arguments.length) return exponent;
- var domain = scale.domain();
- powp = d3_scale_powPow(exponent = x);
- powb = d3_scale_powPow(1 / exponent);
- return scale.domain(domain);
- };
- scale.copy = function() {
- return d3_scale_pow(linear.copy(), exponent);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_powPow(e) {
- return function(x) {
- return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
- };
- }
- function d3_scale_ordinal(domain, ranger) {
- function scale(x) {
- return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
- }
- function steps(start, step) {
- return d3.range(domain.length).map(function(i) {
- return start + step * i;
- });
- }
- var index, range, rangeBand;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = [];
- index = new d3_Map;
- var i = -1, n = x.length, xi;
- while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
- return scale[ranger.t].apply(scale, ranger.a);
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- rangeBand = 0;
- ranger = {
- t: "range",
- a: arguments
- };
- return scale;
- };
- scale.rangePoints = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding);
- range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);
- rangeBand = 0;
- ranger = {
- t: "rangePoints",
- a: arguments
- };
- return scale;
- };
- scale.rangeBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
- range = steps(start + step * outerPadding, step);
- if (reverse) range.reverse();
- rangeBand = step * (1 - padding);
- ranger = {
- t: "rangeBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeRoundBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step;
- range = steps(start + Math.round(error / 2), step);
- if (reverse) range.reverse();
- rangeBand = Math.round(step * (1 - padding));
- ranger = {
- t: "rangeRoundBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeBand = function() {
- return rangeBand;
- };
- scale.rangeExtent = function() {
- return d3_scaleExtent(ranger.a[0]);
- };
- scale.copy = function() {
- return d3_scale_ordinal(domain, ranger);
- };
- return scale.domain(domain);
- }
- function d3_scale_quantile(domain, range) {
- function rescale() {
- var k = 0, n = domain.length, q = range.length;
- thresholds = [];
- while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
- return scale;
- }
- function scale(x) {
- if (isNaN(x = +x)) return NaN;
- return range[d3.bisect(thresholds, x)];
- }
- var thresholds;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.filter(function(d) {
- return !isNaN(d);
- }).sort(d3.ascending);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.quantiles = function() {
- return thresholds;
- };
- scale.copy = function() {
- return d3_scale_quantile(domain, range);
- };
- return rescale();
- }
- function d3_scale_quantize(x0, x1, range) {
- function scale(x) {
- return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
- }
- function rescale() {
- kx = range.length / (x1 - x0);
- i = range.length - 1;
- return scale;
- }
- var kx, i;
- scale.domain = function(x) {
- if (!arguments.length) return [ x0, x1 ];
- x0 = +x[0];
- x1 = +x[x.length - 1];
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_quantize(x0, x1, range);
- };
- return rescale();
- }
- function d3_scale_threshold(domain, range) {
- function scale(x) {
- return range[d3.bisect(domain, x)];
- }
- scale.domain = function(_) {
- if (!arguments.length) return domain;
- domain = _;
- return scale;
- };
- scale.range = function(_) {
- if (!arguments.length) return range;
- range = _;
- return scale;
- };
- scale.copy = function() {
- return d3_scale_threshold(domain, range);
- };
- return scale;
- }
- function d3_scale_identity(domain) {
- function identity(x) {
- return +x;
- }
- identity.invert = identity;
- identity.domain = identity.range = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(identity);
- return identity;
- };
- identity.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- identity.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- identity.copy = function() {
- return d3_scale_identity(domain);
- };
- return identity;
- }
- function d3_svg_arcInnerRadius(d) {
- return d.innerRadius;
- }
- function d3_svg_arcOuterRadius(d) {
- return d.outerRadius;
- }
- function d3_svg_arcStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_arcEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_line(projection) {
- function line(data) {
- function segment() {
- segments.push("M", interpolate(projection(points), tension));
- }
- var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
- } else if (points.length) {
- segment();
- points = [];
- }
- }
- if (points.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
- line.x = function(_) {
- if (!arguments.length) return x;
- x = _;
- return line;
- };
- line.y = function(_) {
- if (!arguments.length) return y;
- y = _;
- return line;
- };
- line.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return line;
- };
- line.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- return line;
- };
- line.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return line;
- };
- return line;
- }
- function d3_svg_lineX(d) {
- return d[0];
- }
- function d3_svg_lineY(d) {
- return d[1];
- }
- function d3_svg_lineLinear(points) {
- return points.join("L");
- }
- function d3_svg_lineLinearClosed(points) {
- return d3_svg_lineLinear(points) + "Z";
- }
- function d3_svg_lineStepBefore(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
- return path.join("");
- }
- function d3_svg_lineStepAfter(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
- return path.join("");
- }
- function d3_svg_lineCardinalOpen(points, tension) {
- return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineCardinalClosed(points, tension) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
- }
- function d3_svg_lineCardinal(points, tension, closed) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineHermite(points, tangents) {
- if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
- return d3_svg_lineLinear(points);
- }
- var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
- if (quad) {
- path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
- p0 = points[1];
- pi = 2;
- }
- if (tangents.length > 1) {
- t = tangents[1];
- p = points[pi];
- pi++;
- path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- for (var i = 2; i < tangents.length; i++, pi++) {
- p = points[pi];
- t = tangents[i];
- path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- }
- }
- if (quad) {
- var lp = points[pi];
- path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
- }
- return path;
- }
- function d3_svg_lineCardinalTangents(points, tension) {
- var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
- while (++i < n) {
- p0 = p1;
- p1 = p2;
- p2 = points[i];
- tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
- }
- return tangents;
- }
- function d3_svg_lineBasis(points) {
- if (points.length < 3) return d3_svg_lineLinear(points);
- var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0 ];
- d3_svg_lineBasisBezier(path, px, py);
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- i = -1;
- while (++i < 2) {
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisOpen(points) {
- if (points.length < 4) return d3_svg_lineLinear(points);
- var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
- while (++i < 3) {
- pi = points[i];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
- --i;
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisClosed(points) {
- var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
- while (++i < 4) {
- pi = points[i % n];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
- --i;
- while (++i < m) {
- pi = points[i % n];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBundle(points, tension) {
- var n = points.length - 1;
- if (n) {
- var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
- while (++i <= n) {
- p = points[i];
- t = i / n;
- p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
- p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
- }
- }
- return d3_svg_lineBasis(points);
- }
- function d3_svg_lineDot4(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- }
- function d3_svg_lineBasisBezier(path, x, y) {
- path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
- }
- function d3_svg_lineSlope(p0, p1) {
- return (p1[1] - p0[1]) / (p1[0] - p0[0]);
- }
- function d3_svg_lineFiniteDifferences(points) {
- var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
- while (++i < j) {
- m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
- }
- m[i] = d;
- return m;
- }
- function d3_svg_lineMonotoneTangents(points) {
- var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
- while (++i < j) {
- d = d3_svg_lineSlope(points[i], points[i + 1]);
- if (Math.abs(d) < 1e-6) {
- m[i] = m[i + 1] = 0;
- } else {
- a = m[i] / d;
- b = m[i + 1] / d;
- s = a * a + b * b;
- if (s > 9) {
- s = d * 3 / Math.sqrt(s);
- m[i] = s * a;
- m[i + 1] = s * b;
- }
- }
- }
- i = -1;
- while (++i <= j) {
- s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
- tangents.push([ s || 0, m[i] * s || 0 ]);
- }
- return tangents;
- }
- function d3_svg_lineMonotone(points) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
- }
- function d3_svg_lineRadial(points) {
- var point, i = -1, n = points.length, r, a;
- while (++i < n) {
- point = points[i];
- r = point[0];
- a = point[1] + d3_svg_arcOffset;
- point[0] = r * Math.cos(a);
- point[1] = r * Math.sin(a);
- }
- return points;
- }
- function d3_svg_area(projection) {
- function area(data) {
- function segment() {
- segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
- }
- var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
- return x;
- } : d3_functor(x1), fy1 = y0 === y1 ? function() {
- return y;
- } : d3_functor(y1), x, y;
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
- points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
- } else if (points0.length) {
- segment();
- points0 = [];
- points1 = [];
- }
- }
- if (points0.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
- area.x = function(_) {
- if (!arguments.length) return x1;
- x0 = x1 = _;
- return area;
- };
- area.x0 = function(_) {
- if (!arguments.length) return x0;
- x0 = _;
- return area;
- };
- area.x1 = function(_) {
- if (!arguments.length) return x1;
- x1 = _;
- return area;
- };
- area.y = function(_) {
- if (!arguments.length) return y1;
- y0 = y1 = _;
- return area;
- };
- area.y0 = function(_) {
- if (!arguments.length) return y0;
- y0 = _;
- return area;
- };
- area.y1 = function(_) {
- if (!arguments.length) return y1;
- y1 = _;
- return area;
- };
- area.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return area;
- };
- area.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- interpolateReverse = interpolate.reverse || interpolate;
- L = interpolate.closed ? "M" : "L";
- return area;
- };
- area.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return area;
- };
- return area;
- }
- function d3_svg_chordSource(d) {
- return d.source;
- }
- function d3_svg_chordTarget(d) {
- return d.target;
- }
- function d3_svg_chordRadius(d) {
- return d.radius;
- }
- function d3_svg_chordStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_chordEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_diagonalProjection(d) {
- return [ d.x, d.y ];
- }
- function d3_svg_diagonalRadialProjection(projection) {
- return function() {
- var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset;
- return [ r * Math.cos(a), r * Math.sin(a) ];
- };
- }
- function d3_svg_symbolSize() {
- return 64;
- }
- function d3_svg_symbolType() {
- return "circle";
- }
- function d3_svg_symbolCircle(size) {
- var r = Math.sqrt(size / Math.PI);
- return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
- }
- function d3_svg_axisX(selection, x) {
- selection.attr("transform", function(d) {
- return "translate(" + x(d) + ",0)";
- });
- }
- function d3_svg_axisY(selection, y) {
- selection.attr("transform", function(d) {
- return "translate(0," + y(d) + ")";
- });
- }
- function d3_svg_axisSubdivide(scale, ticks, m) {
- subticks = [];
- if (m && ticks.length > 1) {
- var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v;
- while (++i < n) {
- for (j = m; --j > 0; ) {
- if ((v = +ticks[i] - j * d) >= extent[0]) {
- subticks.push(v);
- }
- }
- }
- for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) {
- subticks.push(v);
- }
- }
- return subticks;
- }
- function d3_behavior_zoomDelta() {
- if (!d3_behavior_zoomDiv) {
- d3_behavior_zoomDiv = d3.select("body").append("div").style("visibility", "hidden").style("top", 0).style("height", 0).style("width", 0).style("overflow-y", "scroll").append("div").style("height", "2000px").node().parentNode;
- }
- var e = d3.event, delta;
- try {
- d3_behavior_zoomDiv.scrollTop = 1e3;
- d3_behavior_zoomDiv.dispatchEvent(e);
- delta = 1e3 - d3_behavior_zoomDiv.scrollTop;
- } catch (error) {
- delta = e.wheelDelta || -e.detail * 5;
- }
- return delta;
- }
- function d3_layout_bundlePath(link) {
- var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
- while (start !== lca) {
- start = start.parent;
- points.push(start);
- }
- var k = points.length;
- while (end !== lca) {
- points.splice(k, 0, end);
- end = end.parent;
- }
- return points;
- }
- function d3_layout_bundleAncestors(node) {
- var ancestors = [], parent = node.parent;
- while (parent != null) {
- ancestors.push(node);
- node = parent;
- parent = parent.parent;
- }
- ancestors.push(node);
- return ancestors;
- }
- function d3_layout_bundleLeastCommonAncestor(a, b) {
- if (a === b) return a;
- var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
- while (aNode === bNode) {
- sharedNode = aNode;
- aNode = aNodes.pop();
- bNode = bNodes.pop();
- }
- return sharedNode;
- }
- function d3_layout_forceDragstart(d) {
- d.fixed |= 2;
- }
- function d3_layout_forceDragend(d) {
- d.fixed &= 1;
- }
- function d3_layout_forceMouseover(d) {
- d.fixed |= 4;
- }
- function d3_layout_forceMouseout(d) {
- d.fixed &= 3;
- }
- function d3_layout_forceAccumulate(quad, alpha, charges) {
- var cx = 0, cy = 0;
- quad.charge = 0;
- if (!quad.leaf) {
- var nodes = quad.nodes, n = nodes.length, i = -1, c;
- while (++i < n) {
- c = nodes[i];
- if (c == null) continue;
- d3_layout_forceAccumulate(c, alpha, charges);
- quad.charge += c.charge;
- cx += c.charge * c.cx;
- cy += c.charge * c.cy;
- }
- }
- if (quad.point) {
- if (!quad.leaf) {
- quad.point.x += Math.random() - .5;
- quad.point.y += Math.random() - .5;
- }
- var k = alpha * charges[quad.point.index];
- quad.charge += quad.pointCharge = k;
- cx += k * quad.point.x;
- cy += k * quad.point.y;
- }
- quad.cx = cx / quad.charge;
- quad.cy = cy / quad.charge;
- }
- function d3_layout_forceLinkDistance(link) {
- return 20;
- }
- function d3_layout_forceLinkStrength(link) {
- return 1;
- }
- function d3_layout_stackX(d) {
- return d.x;
- }
- function d3_layout_stackY(d) {
- return d.y;
- }
- function d3_layout_stackOut(d, y0, y) {
- d.y0 = y0;
- d.y = y;
- }
- function d3_layout_stackOrderDefault(data) {
- return d3.range(data.length);
- }
- function d3_layout_stackOffsetZero(data) {
- var j = -1, m = data[0].length, y0 = [];
- while (++j < m) y0[j] = 0;
- return y0;
- }
- function d3_layout_stackMaxIndex(array) {
- var i = 1, j = 0, v = array[0][1], k, n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i][1]) > v) {
- j = i;
- v = k;
- }
- }
- return j;
- }
- function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
- }
- function d3_layout_stackSum(p, d) {
- return p + d[1];
- }
- function d3_layout_histogramBinSturges(range, values) {
- return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
- }
- function d3_layout_histogramBinFixed(range, n) {
- var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
- while (++x <= n) f[x] = m * x + b;
- return f;
- }
- function d3_layout_histogramRange(values) {
- return [ d3.min(values), d3.max(values) ];
- }
- function d3_layout_hierarchyRebind(object, hierarchy) {
- d3.rebind(object, hierarchy, "sort", "children", "value");
- object.links = d3_layout_hierarchyLinks;
- object.nodes = function(d) {
- d3_layout_hierarchyInline = true;
- return (object.nodes = object)(d);
- };
- return object;
- }
- function d3_layout_hierarchyChildren(d) {
- return d.children;
- }
- function d3_layout_hierarchyValue(d) {
- return d.value;
- }
- function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
- }
- function d3_layout_hierarchyLinks(nodes) {
- return d3.merge(nodes.map(function(parent) {
- return (parent.children || []).map(function(child) {
- return {
- source: parent,
- target: child
- };
- });
- }));
- }
- function d3_layout_packSort(a, b) {
- return a.value - b.value;
- }
- function d3_layout_packInsert(a, b) {
- var c = a._pack_next;
- a._pack_next = b;
- b._pack_prev = a;
- b._pack_next = c;
- c._pack_prev = b;
- }
- function d3_layout_packSplice(a, b) {
- a._pack_next = b;
- b._pack_prev = a;
- }
- function d3_layout_packIntersects(a, b) {
- var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
- return dr * dr - dx * dx - dy * dy > .001;
- }
- function d3_layout_packSiblings(node) {
- function bound(node) {
- xMin = Math.min(node.x - node.r, xMin);
- xMax = Math.max(node.x + node.r, xMax);
- yMin = Math.min(node.y - node.r, yMin);
- yMax = Math.max(node.y + node.r, yMax);
- }
- if (!(nodes = node.children) || !(n = nodes.length)) return;
- var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
- nodes.forEach(d3_layout_packLink);
- a = nodes[0];
- a.x = -a.r;
- a.y = 0;
- bound(a);
- if (n > 1) {
- b = nodes[1];
- b.x = b.r;
- b.y = 0;
- bound(b);
- if (n > 2) {
- c = nodes[2];
- d3_layout_packPlace(a, b, c);
- bound(c);
- d3_layout_packInsert(a, c);
- a._pack_prev = c;
- d3_layout_packInsert(c, b);
- b = a._pack_next;
- for (i = 3; i < n; i++) {
- d3_layout_packPlace(a, b, c = nodes[i]);
- var isect = 0, s1 = 1, s2 = 1;
- for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
- if (d3_layout_packIntersects(j, c)) {
- isect = 1;
- break;
- }
- }
- if (isect == 1) {
- for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
- if (d3_layout_packIntersects(k, c)) {
- break;
- }
- }
- }
- if (isect) {
- if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
- i--;
- } else {
- d3_layout_packInsert(a, c);
- b = c;
- bound(c);
- }
- }
- }
- }
- var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
- for (i = 0; i < n; i++) {
- c = nodes[i];
- c.x -= cx;
- c.y -= cy;
- cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
- }
- node.r = cr;
- nodes.forEach(d3_layout_packUnlink);
- }
- function d3_layout_packLink(node) {
- node._pack_next = node._pack_prev = node;
- }
- function d3_layout_packUnlink(node) {
- delete node._pack_next;
- delete node._pack_prev;
- }
- function d3_layout_packTransform(node, x, y, k) {
- var children = node.children;
- node.x = x += k * node.x;
- node.y = y += k * node.y;
- node.r *= k;
- if (children) {
- var i = -1, n = children.length;
- while (++i < n) d3_layout_packTransform(children[i], x, y, k);
- }
- }
- function d3_layout_packPlace(a, b, c) {
- var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
- if (db && (dx || dy)) {
- var da = b.r + c.r, dc = dx * dx + dy * dy;
- da *= da;
- db *= db;
- var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
- c.x = a.x + x * dx + y * dy;
- c.y = a.y + x * dy - y * dx;
- } else {
- c.x = a.x + db;
- c.y = a.y;
- }
- }
- function d3_layout_clusterY(children) {
- return 1 + d3.max(children, function(child) {
- return child.y;
- });
- }
- function d3_layout_clusterX(children) {
- return children.reduce(function(x, child) {
- return x + child.x;
- }, 0) / children.length;
- }
- function d3_layout_clusterLeft(node) {
- var children = node.children;
- return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
- }
- function d3_layout_clusterRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
- }
- function d3_layout_treeSeparation(a, b) {
- return a.parent == b.parent ? 1 : 2;
- }
- function d3_layout_treeLeft(node) {
- var children = node.children;
- return children && children.length ? children[0] : node._tree.thread;
- }
- function d3_layout_treeRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? children[n - 1] : node._tree.thread;
- }
- function d3_layout_treeSearch(node, compare) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, n, i = -1;
- while (++i < n) {
- if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
- node = child;
- }
- }
- }
- return node;
- }
- function d3_layout_treeRightmost(a, b) {
- return a.x - b.x;
- }
- function d3_layout_treeLeftmost(a, b) {
- return b.x - a.x;
- }
- function d3_layout_treeDeepest(a, b) {
- return a.depth - b.depth;
- }
- function d3_layout_treeVisitAfter(node, callback) {
- function visit(node, previousSibling) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, previousChild = null, i = -1, n;
- while (++i < n) {
- child = children[i];
- visit(child, previousChild);
- previousChild = child;
- }
- }
- callback(node, previousSibling);
- }
- visit(node, null);
- }
- function d3_layout_treeShift(node) {
- var shift = 0, change = 0, children = node.children, i = children.length, child;
- while (--i >= 0) {
- child = children[i]._tree;
- child.prelim += shift;
- child.mod += shift;
- shift += child.shift + (change += child.change);
- }
- }
- function d3_layout_treeMove(ancestor, node, shift) {
- ancestor = ancestor._tree;
- node = node._tree;
- var change = shift / (node.number - ancestor.number);
- ancestor.change += change;
- node.change -= change;
- node.shift += shift;
- node.prelim += shift;
- node.mod += shift;
- }
- function d3_layout_treeAncestor(vim, node, ancestor) {
- return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
- }
- function d3_layout_treemapPadNull(node) {
- return {
- x: node.x,
- y: node.y,
- dx: node.dx,
- dy: node.dy
- };
- }
- function d3_layout_treemapPad(node, padding) {
- var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
- if (dx < 0) {
- x += dx / 2;
- dx = 0;
- }
- if (dy < 0) {
- y += dy / 2;
- dy = 0;
- }
- return {
- x: x,
- y: y,
- dx: dx,
- dy: dy
- };
- }
- function d3_dsv(delimiter, mimeType) {
- function dsv(url, callback) {
- d3.text(url, mimeType, function(text) {
- callback(text && dsv.parse(text));
- });
- }
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
- function formatValue(text) {
- return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
- }
- var reParse = new RegExp("\r\n|[" + delimiter + "\r\n]", "g"), reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
- dsv.parse = function(text) {
- var header;
- return dsv.parseRows(text, function(row, i) {
- if (i) {
- var o = {}, j = -1, m = header.length;
- while (++j < m) o[header[j]] = row[j];
- return o;
- } else {
- header = row;
- return null;
- }
- });
- };
- dsv.parseRows = function(text, f) {
- function token() {
- if (reParse.lastIndex >= text.length) return EOF;
- if (eol) {
- eol = false;
- return EOL;
- }
- var j = reParse.lastIndex;
- if (text.charCodeAt(j) === 34) {
- var i = j;
- while (i++ < text.length) {
- if (text.charCodeAt(i) === 34) {
- if (text.charCodeAt(i + 1) !== 34) break;
- i++;
- }
- }
- reParse.lastIndex = i + 2;
- var c = text.charCodeAt(i + 1);
- if (c === 13) {
- eol = true;
- if (text.charCodeAt(i + 2) === 10) reParse.lastIndex++;
- } else if (c === 10) {
- eol = true;
- }
- return text.substring(j + 1, i).replace(/""/g, '"');
- }
- var m = reParse.exec(text);
- if (m) {
- eol = m[0].charCodeAt(0) !== delimiterCode;
- return text.substring(j, m.index);
- }
- reParse.lastIndex = text.length;
- return text.substring(j);
- }
- var EOL = {}, EOF = {}, rows = [], n = 0, t, eol;
- reParse.lastIndex = 0;
- while ((t = token()) !== EOF) {
- var a = [];
- while (t !== EOL && t !== EOF) {
- a.push(t);
- t = token();
- }
- if (f && !(a = f(a, n++))) continue;
- rows.push(a);
- }
- return rows;
- };
- dsv.format = function(rows) {
- return rows.map(formatRow).join("\n");
- };
- return dsv;
- }
- function d3_geo_type(types, defaultValue) {
- return function(object) {
- return object && types.hasOwnProperty(object.type) ? types[object.type](object) : defaultValue;
- };
- }
- function d3_path_circle(radius) {
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + +2 * radius + "z";
- }
- function d3_geo_bounds(o, f) {
- if (d3_geo_boundsTypes.hasOwnProperty(o.type)) d3_geo_boundsTypes[o.type](o, f);
- }
- function d3_geo_boundsFeature(o, f) {
- d3_geo_bounds(o.geometry, f);
- }
- function d3_geo_boundsFeatureCollection(o, f) {
- for (var a = o.features, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i].geometry, f);
- }
- }
- function d3_geo_boundsGeometryCollection(o, f) {
- for (var a = o.geometries, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i], f);
- }
- }
- function d3_geo_boundsLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_boundsMultiLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsMultiPolygon(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsPoint(o, f) {
- f.apply(null, o.coordinates);
- }
- function d3_geo_boundsPolygon(o, f) {
- for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_greatArcSource(d) {
- return d.source;
- }
- function d3_geo_greatArcTarget(d) {
- return d.target;
- }
- function d3_geo_greatArcInterpolator() {
- function interpolate(t) {
- var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
- return [ Math.atan2(y, x) / d3_geo_radians, Math.atan2(z, Math.sqrt(x * x + y * y)) / d3_geo_radians ];
- }
- var x0, y0, cy0, sy0, kx0, ky0, x1, y1, cy1, sy1, kx1, ky1, d, k;
- interpolate.distance = function() {
- if (d == null) k = 1 / Math.sin(d = Math.acos(Math.max(-1, Math.min(1, sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)))));
- return d;
- };
- interpolate.source = function(_) {
- var cx0 = Math.cos(x0 = _[0] * d3_geo_radians), sx0 = Math.sin(x0);
- cy0 = Math.cos(y0 = _[1] * d3_geo_radians);
- sy0 = Math.sin(y0);
- kx0 = cy0 * cx0;
- ky0 = cy0 * sx0;
- d = null;
- return interpolate;
- };
- interpolate.target = function(_) {
- var cx1 = Math.cos(x1 = _[0] * d3_geo_radians), sx1 = Math.sin(x1);
- cy1 = Math.cos(y1 = _[1] * d3_geo_radians);
- sy1 = Math.sin(y1);
- kx1 = cy1 * cx1;
- ky1 = cy1 * sx1;
- d = null;
- return interpolate;
- };
- return interpolate;
- }
- function d3_geo_greatArcInterpolate(a, b) {
- var i = d3_geo_greatArcInterpolator().source(a).target(b);
- i.distance();
- return i;
- }
- function d3_geom_contourStart(grid) {
- var x = 0, y = 0;
- while (true) {
- if (grid(x, y)) {
- return [ x, y ];
- }
- if (x === 0) {
- x = y + 1;
- y = 0;
- } else {
- x = x - 1;
- y = y + 1;
- }
- }
- }
- function d3_geom_hullCCW(i1, i2, i3, v) {
- var t, a, b, c, d, e, f;
- t = v[i1];
- a = t[0];
- b = t[1];
- t = v[i2];
- c = t[0];
- d = t[1];
- t = v[i3];
- e = t[0];
- f = t[1];
- return (f - b) * (c - a) - (d - b) * (e - a) > 0;
- }
- function d3_geom_polygonInside(p, a, b) {
- return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
- }
- function d3_geom_polygonIntersect(c, d, a, b) {
- var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0], y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1], x13 = x1 - x3, x21 = x2 - x1, x43 = x4 - x3, y13 = y1 - y3, y21 = y2 - y1, y43 = y4 - y3, ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
- return [ x1 + ua * x21, y1 + ua * y21 ];
- }
- function d3_voronoi_tessellate(vertices, callback) {
- var Sites = {
- list: vertices.map(function(v, i) {
- return {
- index: i,
- x: v[0],
- y: v[1]
- };
- }).sort(function(a, b) {
- return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0;
- }),
- bottomSite: null
- };
- var EdgeList = {
- list: [],
- leftEnd: null,
- rightEnd: null,
- init: function() {
- EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.leftEnd.r = EdgeList.rightEnd;
- EdgeList.rightEnd.l = EdgeList.leftEnd;
- EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
- },
- createHalfEdge: function(edge, side) {
- return {
- edge: edge,
- side: side,
- vertex: null,
- l: null,
- r: null
- };
- },
- insert: function(lb, he) {
- he.l = lb;
- he.r = lb.r;
- lb.r.l = he;
- lb.r = he;
- },
- leftBound: function(p) {
- var he = EdgeList.leftEnd;
- do {
- he = he.r;
- } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
- he = he.l;
- return he;
- },
- del: function(he) {
- he.l.r = he.r;
- he.r.l = he.l;
- he.edge = null;
- },
- right: function(he) {
- return he.r;
- },
- left: function(he) {
- return he.l;
- },
- leftRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[he.side];
- },
- rightRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[d3_voronoi_opposite[he.side]];
- }
- };
- var Geom = {
- bisect: function(s1, s2) {
- var newEdge = {
- region: {
- l: s1,
- r: s2
- },
- ep: {
- l: null,
- r: null
- }
- };
- var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy;
- newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5;
- if (adx > ady) {
- newEdge.a = 1;
- newEdge.b = dy / dx;
- newEdge.c /= dx;
- } else {
- newEdge.b = 1;
- newEdge.a = dx / dy;
- newEdge.c /= dy;
- }
- return newEdge;
- },
- intersect: function(el1, el2) {
- var e1 = el1.edge, e2 = el2.edge;
- if (!e1 || !e2 || e1.region.r == e2.region.r) {
- return null;
- }
- var d = e1.a * e2.b - e1.b * e2.a;
- if (Math.abs(d) < 1e-10) {
- return null;
- }
- var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e;
- if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) {
- el = el1;
- e = e1;
- } else {
- el = el2;
- e = e2;
- }
- var rightOfSite = xint >= e.region.r.x;
- if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") {
- return null;
- }
- return {
- x: xint,
- y: yint
- };
- },
- rightOf: function(he, p) {
- var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
- if (rightOfSite && he.side === "l") {
- return 1;
- }
- if (!rightOfSite && he.side === "r") {
- return 0;
- }
- if (e.a === 1) {
- var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0;
- if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) {
- above = fast = dyp >= e.b * dxp;
- } else {
- above = p.x + p.y * e.b > e.c;
- if (e.b < 0) {
- above = !above;
- }
- if (!above) {
- fast = 1;
- }
- }
- if (!fast) {
- var dxs = topsite.x - e.region.l.x;
- above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b);
- if (e.b < 0) {
- above = !above;
- }
- }
- } else {
- var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y;
- above = t1 * t1 > t2 * t2 + t3 * t3;
- }
- return he.side === "l" ? above : !above;
- },
- endPoint: function(edge, side, site) {
- edge.ep[side] = site;
- if (!edge.ep[d3_voronoi_opposite[side]]) return;
- callback(edge);
- },
- distance: function(s, t) {
- var dx = s.x - t.x, dy = s.y - t.y;
- return Math.sqrt(dx * dx + dy * dy);
- }
- };
- var EventQueue = {
- list: [],
- insert: function(he, site, offset) {
- he.vertex = site;
- he.ystar = site.y + offset;
- for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) {
- var next = list[i];
- if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) {
- continue;
- } else {
- break;
- }
- }
- list.splice(i, 0, he);
- },
- del: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {}
- ls.splice(i, 1);
- },
- empty: function() {
- return EventQueue.list.length === 0;
- },
- nextEvent: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) {
- if (ls[i] == he) return ls[i + 1];
- }
- return null;
- },
- min: function() {
- var elem = EventQueue.list[0];
- return {
- x: elem.vertex.x,
- y: elem.ystar
- };
- },
- extractMin: function() {
- return EventQueue.list.shift();
- }
- };
- EdgeList.init();
- Sites.bottomSite = Sites.list.shift();
- var newSite = Sites.list.shift(), newIntStar;
- var lbnd, rbnd, llbnd, rrbnd, bisector;
- var bot, top, temp, p, v;
- var e, pm;
- while (true) {
- if (!EventQueue.empty()) {
- newIntStar = EventQueue.min();
- }
- if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) {
- lbnd = EdgeList.leftBound(newSite);
- rbnd = EdgeList.right(lbnd);
- bot = EdgeList.rightRegion(lbnd);
- e = Geom.bisect(bot, newSite);
- bisector = EdgeList.createHalfEdge(e, "l");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(lbnd, bisector);
- if (p) {
- EventQueue.del(lbnd);
- EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
- }
- lbnd = bisector;
- bisector = EdgeList.createHalfEdge(e, "r");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(bisector, rbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, newSite));
- }
- newSite = Sites.list.shift();
- } else if (!EventQueue.empty()) {
- lbnd = EventQueue.extractMin();
- llbnd = EdgeList.left(lbnd);
- rbnd = EdgeList.right(lbnd);
- rrbnd = EdgeList.right(rbnd);
- bot = EdgeList.leftRegion(lbnd);
- top = EdgeList.rightRegion(rbnd);
- v = lbnd.vertex;
- Geom.endPoint(lbnd.edge, lbnd.side, v);
- Geom.endPoint(rbnd.edge, rbnd.side, v);
- EdgeList.del(lbnd);
- EventQueue.del(rbnd);
- EdgeList.del(rbnd);
- pm = "l";
- if (bot.y > top.y) {
- temp = bot;
- bot = top;
- top = temp;
- pm = "r";
- }
- e = Geom.bisect(bot, top);
- bisector = EdgeList.createHalfEdge(e, pm);
- EdgeList.insert(llbnd, bisector);
- Geom.endPoint(e, d3_voronoi_opposite[pm], v);
- p = Geom.intersect(llbnd, bisector);
- if (p) {
- EventQueue.del(llbnd);
- EventQueue.insert(llbnd, p, Geom.distance(p, bot));
- }
- p = Geom.intersect(bisector, rrbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, bot));
- }
- } else {
- break;
- }
- }
- for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) {
- callback(lbnd.edge);
- }
- }
- function d3_geom_quadtreeNode() {
- return {
- leaf: true,
- nodes: [],
- point: null
- };
- }
- function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
- if (!f(node, x1, y1, x2, y2)) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
- if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
- if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
- if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
- if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
- }
- }
- function d3_geom_quadtreePoint(p) {
- return {
- x: p[0],
- y: p[1]
- };
- }
- function d3_time_utc() {
- this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
- }
- function d3_time_formatAbbreviate(name) {
- return name.substring(0, 3);
- }
- function d3_time_parse(date, template, string, j) {
- var c, p, i = 0, n = template.length, m = string.length;
- while (i < n) {
- if (j >= m) return -1;
- c = template.charCodeAt(i++);
- if (c == 37) {
- p = d3_time_parsers[template.charAt(i++)];
- if (!p || (j = p(date, string, j)) < 0) return -1;
- } else if (c != string.charCodeAt(j++)) {
- return -1;
- }
- }
- return j;
- }
- function d3_time_formatRe(names) {
- return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
- }
- function d3_time_formatLookup(names) {
- var map = new d3_Map, i = -1, n = names.length;
- while (++i < n) map.set(names[i].toLowerCase(), i);
- return map;
- }
- function d3_time_parseWeekdayAbbrev(date, string, i) {
- d3_time_dayAbbrevRe.lastIndex = 0;
- var n = d3_time_dayAbbrevRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseWeekday(date, string, i) {
- d3_time_dayRe.lastIndex = 0;
- var n = d3_time_dayRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseMonthAbbrev(date, string, i) {
- d3_time_monthAbbrevRe.lastIndex = 0;
- var n = d3_time_monthAbbrevRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseMonth(date, string, i) {
- d3_time_monthRe.lastIndex = 0;
- var n = d3_time_monthRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseLocaleFull(date, string, i) {
- return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
- }
- function d3_time_parseLocaleDate(date, string, i) {
- return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
- }
- function d3_time_parseLocaleTime(date, string, i) {
- return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
- }
- function d3_time_parseFullYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 4));
- return n ? (date.y = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.y = d3_time_expandYear(+n[0]), i += n[0].length) : -1;
- }
- function d3_time_expandYear(d) {
- return d + (d > 68 ? 1900 : 2e3);
- }
- function d3_time_parseMonthNumber(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.m = n[0] - 1, i += n[0].length) : -1;
- }
- function d3_time_parseDay(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.d = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseHour24(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.H = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMinutes(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.M = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseSeconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.S = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMilliseconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 3));
- return n ? (date.L = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseAmPm(date, string, i) {
- var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());
- return n == null ? -1 : (date.p = n, i);
- }
- function d3_time_zone(d) {
- var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60;
- return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
- }
- function d3_time_formatIsoNative(date) {
- return date.toISOString();
- }
- function d3_time_interval(local, step, number) {
- function round(date) {
- var d0 = local(date), d1 = offset(d0, 1);
- return date - d0 < d1 - date ? d0 : d1;
- }
- function ceil(date) {
- step(date = local(new d3_time(date - 1)), 1);
- return date;
- }
- function offset(date, k) {
- step(date = new d3_time(+date), k);
- return date;
- }
- function range(t0, t1, dt) {
- var time = ceil(t0), times = [];
- if (dt > 1) {
- while (time < t1) {
- if (!(number(time) % dt)) times.push(new Date(+time));
- step(time, 1);
- }
- } else {
- while (time < t1) times.push(new Date(+time)), step(time, 1);
- }
- return times;
- }
- function range_utc(t0, t1, dt) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = t0;
- return range(utc, t1, dt);
- } finally {
- d3_time = Date;
- }
- }
- local.floor = local;
- local.round = round;
- local.ceil = ceil;
- local.offset = offset;
- local.range = range;
- var utc = local.utc = d3_time_interval_utc(local);
- utc.floor = utc;
- utc.round = d3_time_interval_utc(round);
- utc.ceil = d3_time_interval_utc(ceil);
- utc.offset = d3_time_interval_utc(offset);
- utc.range = range_utc;
- return local;
- }
- function d3_time_interval_utc(method) {
- return function(date, k) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = date;
- return method(utc, k)._;
- } finally {
- d3_time = Date;
- }
- };
- }
- function d3_time_scale(linear, methods, format) {
- function scale(x) {
- return linear(x);
- }
- scale.invert = function(x) {
- return d3_time_scaleDate(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
- linear.domain(x);
- return scale;
- };
- scale.nice = function(m) {
- return scale.domain(d3_scale_nice(scale.domain(), function() {
- return m;
- }));
- };
- scale.ticks = function(m, k) {
- var extent = d3_time_scaleExtent(scale.domain());
- if (typeof m !== "function") {
- var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
- if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
- if (!i) return linear.ticks(m).map(d3_time_scaleDate);
- if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
- m = methods[i];
- k = m[1];
- m = m[0].range;
- }
- return m(extent[0], new Date(+extent[1] + 1), k);
- };
- scale.tickFormat = function() {
- return format;
- };
- scale.copy = function() {
- return d3_time_scale(linear.copy(), methods, format);
- };
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_time_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_time_scaleDate(t) {
- return new Date(t);
- }
- function d3_time_scaleFormat(formats) {
- return function(date) {
- var i = formats.length - 1, f = formats[i];
- while (!f[1](date)) f = formats[--i];
- return f[0](date);
- };
- }
- function d3_time_scaleSetYear(y) {
- var d = new Date(y, 0, 1);
- d.setFullYear(y);
- return d;
- }
- function d3_time_scaleGetYear(d) {
- var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- function d3_time_scaleUTCSetYear(y) {
- var d = new Date(Date.UTC(y, 0, 1));
- d.setUTCFullYear(y);
- return d;
- }
- function d3_time_scaleUTCGetYear(d) {
- var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- if (!Date.now) Date.now = function() {
- return +(new Date);
- };
- try {
- document.createElement("div").style.setProperty("opacity", 0, "");
- } catch (error) {
- var d3_style_prototype = CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
- d3_style_prototype.setProperty = function(name, value, priority) {
- d3_style_setProperty.call(this, name, value + "", priority);
- };
- }
- d3 = {
- version: "2.10.2"
- };
- var d3_array = d3_arraySlice;
- try {
- d3_array(document.documentElement.childNodes)[0].nodeType;
- } catch (e) {
- d3_array = d3_arrayCopy;
- }
- var d3_arraySubclass = [].__proto__ ? function(array, prototype) {
- array.__proto__ = prototype;
- } : function(array, prototype) {
- for (var property in prototype) array[property] = prototype[property];
- };
- d3.map = function(object) {
- var map = new d3_Map;
- for (var key in object) map.set(key, object[key]);
- return map;
- };
- d3_class(d3_Map, {
- has: function(key) {
- return d3_map_prefix + key in this;
- },
- get: function(key) {
- return this[d3_map_prefix + key];
- },
- set: function(key, value) {
- return this[d3_map_prefix + key] = value;
- },
- remove: function(key) {
- key = d3_map_prefix + key;
- return key in this && delete this[key];
- },
- keys: function() {
- var keys = [];
- this.forEach(function(key) {
- keys.push(key);
- });
- return keys;
- },
- values: function() {
- var values = [];
- this.forEach(function(key, value) {
- values.push(value);
- });
- return values;
- },
- entries: function() {
- var entries = [];
- this.forEach(function(key, value) {
- entries.push({
- key: key,
- value: value
- });
- });
- return entries;
- },
- forEach: function(f) {
- for (var key in this) {
- if (key.charCodeAt(0) === d3_map_prefixCode) {
- f.call(this, key.substring(1), this[key]);
- }
- }
- }
- });
- var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
- d3.functor = d3_functor;
- d3.rebind = function(target, source) {
- var i = 1, n = arguments.length, method;
- while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
- return target;
- };
- d3.ascending = function(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- };
- d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
- };
- d3.mean = function(array, f) {
- var n = array.length, a, m = 0, i = -1, j = 0;
- if (arguments.length === 1) {
- while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;
- } else {
- while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;
- }
- return j ? m : undefined;
- };
- d3.median = function(array, f) {
- if (arguments.length > 1) array = array.map(f);
- array = array.filter(d3_number);
- return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;
- };
- d3.min = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && a > b) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
- }
- return a;
- };
- d3.max = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && b > a) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
- }
- return a;
- };
- d3.extent = function(array, f) {
- var i = -1, n = array.length, a, b, c;
- if (arguments.length === 1) {
- while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;
- while (++i < n) if ((b = array[i]) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- } else {
- while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- }
- return [ a, c ];
- };
- d3.random = {
- normal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- return function() {
- var x, y, r;
- do {
- x = Math.random() * 2 - 1;
- y = Math.random() * 2 - 1;
- r = x * x + y * y;
- } while (!r || r > 1);
- return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
- };
- },
- logNormal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- var random = d3.random.normal();
- return function() {
- return Math.exp(µ + σ * random());
- };
- },
- irwinHall: function(m) {
- return function() {
- for (var s = 0, j = 0; j < m; j++) s += Math.random();
- return s / m;
- };
- }
- };
- d3.sum = function(array, f) {
- var s = 0, n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (!isNaN(a = +array[i])) s += a;
- } else {
- while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
- }
- return s;
- };
- d3.quantile = function(values, p) {
- var H = (values.length - 1) * p + 1, h = Math.floor(H), v = values[h - 1], e = H - h;
- return e ? v + e * (values[h] - v) : v;
- };
- d3.transpose = function(matrix) {
- return d3.zip.apply(d3, matrix);
- };
- d3.zip = function() {
- if (!(n = arguments.length)) return [];
- for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
- for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
- zip[j] = arguments[j][i];
- }
- }
- return zips;
- };
- d3.bisector = function(f) {
- return {
- left: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1;
- }
- return lo;
- }
- };
- };
- var d3_bisector = d3.bisector(function(d) {
- return d;
- });
- d3.bisectLeft = d3_bisector.left;
- d3.bisect = d3.bisectRight = d3_bisector.right;
- d3.first = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) > 0) {
- a = b;
- }
- }
- return a;
- };
- d3.last = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) <= 0) {
- a = b;
- }
- }
- return a;
- };
- d3.nest = function() {
- function map(array, depth) {
- if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
- var i = -1, n = array.length, key = keys[depth++], keyValue, object, valuesByKey = new d3_Map, values, o = {};
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
- values.push(object);
- } else {
- valuesByKey.set(keyValue, [ object ]);
- }
- }
- valuesByKey.forEach(function(keyValue, values) {
- o[keyValue] = map(values, depth);
- });
- return o;
- }
- function entries(map, depth) {
- if (depth >= keys.length) return map;
- var a = [], sortKey = sortKeys[depth++], key;
- for (key in map) {
- a.push({
- key: key,
- values: entries(map[key], depth)
- });
- }
- if (sortKey) a.sort(function(a, b) {
- return sortKey(a.key, b.key);
- });
- return a;
- }
- var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
- nest.map = function(array) {
- return map(array, 0);
- };
- nest.entries = function(array) {
- return entries(map(array, 0), 0);
- };
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
- return nest;
- };
- d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
- };
- d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
- };
- d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({
- key: key,
- value: map[key]
- });
- return entries;
- };
- d3.permute = function(array, indexes) {
- var permutes = [], i = -1, n = indexes.length;
- while (++i < n) permutes[i] = array[indexes[i]];
- return permutes;
- };
- d3.merge = function(arrays) {
- return Array.prototype.concat.apply([], arrays);
- };
- d3.split = function(array, f) {
- var arrays = [], values = [], value, i = -1, n = array.length;
- if (arguments.length < 2) f = d3_splitter;
- while (++i < n) {
- if (f.call(values, value = array[i], i)) {
- values = [];
- } else {
- if (!values.length) arrays.push(values);
- values.push(value);
- }
- }
- return arrays;
- };
- d3.range = function(start, stop, step) {
- if (arguments.length < 3) {
- step = 1;
- if (arguments.length < 2) {
- stop = start;
- start = 0;
- }
- }
- if ((stop - start) / step === Infinity) throw new Error("infinite range");
- var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j;
- start *= k, stop *= k, step *= k;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
- return range;
- };
- d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
- };
- var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
- d3.round = function(x, n) {
- return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
- };
- d3.xhr = function(url, mime, callback) {
- var req = new XMLHttpRequest;
- if (arguments.length < 3) callback = mime, mime = null; else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
- req.open("GET", url, true);
- if (mime) req.setRequestHeader("Accept", mime);
- req.onreadystatechange = function() {
- if (req.readyState === 4) {
- var s = req.status;
- callback(!s && req.response || s >= 200 && s < 300 || s === 304 ? req : null);
- }
- };
- req.send(null);
- };
- d3.text = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseText);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- d3.json = function(url, callback) {
- d3.text(url, "application/json", function(text) {
- callback(text ? JSON.parse(text) : null);
- });
- };
- d3.html = function(url, callback) {
- d3.text(url, "text/html", function(text) {
- if (text != null) {
- var range = document.createRange();
- range.selectNode(document.body);
- text = range.createContextualFragment(text);
- }
- callback(text);
- });
- };
- d3.xml = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseXML);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- var d3_nsPrefix = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- };
- d3.ns = {
- prefix: d3_nsPrefix,
- qualify: function(name) {
- var i = name.indexOf(":"), prefix = name;
- if (i >= 0) {
- prefix = name.substring(0, i);
- name = name.substring(i + 1);
- }
- return d3_nsPrefix.hasOwnProperty(prefix) ? {
- space: d3_nsPrefix[prefix],
- local: name
- } : name;
- }
- };
- d3.dispatch = function() {
- var dispatch = new d3_dispatch, i = -1, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- return dispatch;
- };
- d3_dispatch.prototype.on = function(type, listener) {
- var i = type.indexOf("."), name = "";
- if (i > 0) {
- name = type.substring(i + 1);
- type = type.substring(0, i);
- }
- return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
- };
- d3.format = function(specifier) {
- var match = d3_format_re.exec(specifier), fill = match[1] || " ", sign = match[3] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
- if (precision) precision = +precision.substring(1);
- if (zfill) {
- fill = "0";
- if (comma) width -= Math.floor((width - 1) / 4);
- }
- switch (type) {
- case "n":
- comma = true;
- type = "g";
- break;
- case "%":
- scale = 100;
- suffix = "%";
- type = "f";
- break;
- case "p":
- scale = 100;
- suffix = "%";
- type = "r";
- break;
- case "d":
- integer = true;
- precision = 0;
- break;
- case "s":
- scale = -1;
- type = "r";
- break;
- }
- if (type == "r" && !precision) type = "g";
- type = d3_format_types.get(type) || d3_format_typeDefault;
- return function(value) {
- if (integer && value % 1) return "";
- var negative = value < 0 && (value = -value) ? "-" : sign;
- if (scale < 0) {
- var prefix = d3.formatPrefix(value, precision);
- value = prefix.scale(value);
- suffix = prefix.symbol;
- } else {
- value *= scale;
- }
- value = type(value, precision);
- if (zfill) {
- var length = value.length + negative.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- if (comma) value = d3_format_group(value);
- value = negative + value;
- } else {
- if (comma) value = d3_format_group(value);
- value = negative + value;
- var length = value.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- }
- return value + suffix;
- };
- };
- var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
- var d3_format_types = d3.map({
- g: function(x, p) {
- return x.toPrecision(p);
- },
- e: function(x, p) {
- return x.toExponential(p);
- },
- f: function(x, p) {
- return x.toFixed(p);
- },
- r: function(x, p) {
- return d3.round(x, p = d3_format_precision(x, p)).toFixed(Math.max(0, Math.min(20, p)));
- }
- });
- var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "μ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
- d3.formatPrefix = function(value, precision) {
- var i = 0;
- if (value) {
- if (value < 0) value *= -1;
- if (precision) value = d3.round(value, d3_format_precision(value, precision));
- i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
- i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));
- }
- return d3_formatPrefixes[8 + i / 3];
- };
- var d3_ease_quad = d3_ease_poly(2), d3_ease_cubic = d3_ease_poly(3), d3_ease_default = function() {
- return d3_ease_identity;
- };
- var d3_ease = d3.map({
- linear: d3_ease_default,
- poly: d3_ease_poly,
- quad: function() {
- return d3_ease_quad;
- },
- cubic: function() {
- return d3_ease_cubic;
- },
- sin: function() {
- return d3_ease_sin;
- },
- exp: function() {
- return d3_ease_exp;
- },
- circle: function() {
- return d3_ease_circle;
- },
- elastic: d3_ease_elastic,
- back: d3_ease_back,
- bounce: function() {
- return d3_ease_bounce;
- }
- });
- var d3_ease_mode = d3.map({
- "in": d3_ease_identity,
- out: d3_ease_reverse,
- "in-out": d3_ease_reflect,
- "out-in": function(f) {
- return d3_ease_reflect(d3_ease_reverse(f));
- }
- });
- d3.ease = function(name) {
- var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in";
- t = d3_ease.get(t) || d3_ease_default;
- m = d3_ease_mode.get(m) || d3_ease_identity;
- return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));
- };
- d3.event = null;
- d3.transform = function(string) {
- var g = document.createElementNS(d3.ns.prefix.svg, "g");
- return (d3.transform = function(string) {
- g.setAttribute("transform", string);
- var t = g.transform.baseVal.consolidate();
- return new d3_transform(t ? t.matrix : d3_transformIdentity);
- })(string);
- };
- d3_transform.prototype.toString = function() {
- return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
- };
- var d3_transformDegrees = 180 / Math.PI, d3_transformIdentity = {
- a: 1,
- b: 0,
- c: 0,
- d: 1,
- e: 0,
- f: 0
- };
- d3.interpolate = function(a, b) {
- var i = d3.interpolators.length, f;
- while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
- return f;
- };
- d3.interpolateNumber = function(a, b) {
- b -= a;
- return function(t) {
- return a + b * t;
- };
- };
- d3.interpolateRound = function(a, b) {
- b -= a;
- return function(t) {
- return Math.round(a + b * t);
- };
- };
- d3.interpolateString = function(a, b) {
- var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
- d3_interpolate_number.lastIndex = 0;
- for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
- if (m.index) s.push(b.substring(s0, s1 = m.index));
- q.push({
- i: s.length,
- x: m[0]
- });
- s.push(null);
- s0 = d3_interpolate_number.lastIndex;
- }
- if (s0 < b.length) s.push(b.substring(s0));
- for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
- o = q[i];
- if (o.x == m[0]) {
- if (o.i) {
- if (s[o.i + 1] == null) {
- s[o.i - 1] += o.x;
- s.splice(o.i, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- } else {
- s[o.i - 1] += o.x + s[o.i + 1];
- s.splice(o.i, 2);
- for (j = i + 1; j < n; ++j) q[j].i -= 2;
- }
- } else {
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- }
- }
- q.splice(i, 1);
- n--;
- i--;
- } else {
- o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
- }
- }
- while (i < n) {
- o = q.pop();
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- }
- n--;
- }
- if (s.length === 1) {
- return s[0] == null ? q[0].x : function() {
- return b;
- };
- }
- return function(t) {
- for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateTransform = function(a, b) {
- var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
- if (ta[0] != tb[0] || ta[1] != tb[1]) {
- s.push("translate(", null, ",", null, ")");
- q.push({
- i: 1,
- x: d3.interpolateNumber(ta[0], tb[0])
- }, {
- i: 3,
- x: d3.interpolateNumber(ta[1], tb[1])
- });
- } else if (tb[0] || tb[1]) {
- s.push("translate(" + tb + ")");
- } else {
- s.push("");
- }
- if (ra != rb) {
- if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
- q.push({
- i: s.push(s.pop() + "rotate(", null, ")") - 2,
- x: d3.interpolateNumber(ra, rb)
- });
- } else if (rb) {
- s.push(s.pop() + "rotate(" + rb + ")");
- }
- if (wa != wb) {
- q.push({
- i: s.push(s.pop() + "skewX(", null, ")") - 2,
- x: d3.interpolateNumber(wa, wb)
- });
- } else if (wb) {
- s.push(s.pop() + "skewX(" + wb + ")");
- }
- if (ka[0] != kb[0] || ka[1] != kb[1]) {
- n = s.push(s.pop() + "scale(", null, ",", null, ")");
- q.push({
- i: n - 4,
- x: d3.interpolateNumber(ka[0], kb[0])
- }, {
- i: n - 2,
- x: d3.interpolateNumber(ka[1], kb[1])
- });
- } else if (kb[0] != 1 || kb[1] != 1) {
- s.push(s.pop() + "scale(" + kb + ")");
- }
- n = q.length;
- return function(t) {
- var i = -1, o;
- while (++i < n) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateRgb = function(a, b) {
- a = d3.rgb(a);
- b = d3.rgb(b);
- var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
- return function(t) {
- return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
- };
- };
- d3.interpolateHsl = function(a, b) {
- a = d3.hsl(a);
- b = d3.hsl(b);
- var h0 = a.h, s0 = a.s, l0 = a.l, h1 = b.h - h0, s1 = b.s - s0, l1 = b.l - l0;
- if (h1 > 180) h1 -= 360; else if (h1 < -180) h1 += 360;
- return function(t) {
- return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t) + "";
- };
- };
- d3.interpolateLab = function(a, b) {
- a = d3.lab(a);
- b = d3.lab(b);
- var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
- return function(t) {
- return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
- d3.interpolateHcl = function(a, b) {
- a = d3.hcl(a);
- b = d3.hcl(b);
- var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
- return function(t) {
- return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
- };
- };
- d3.interpolateArray = function(a, b) {
- var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
- for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
- for (; i < na; ++i) c[i] = a[i];
- for (; i < nb; ++i) c[i] = b[i];
- return function(t) {
- for (i = 0; i < n0; ++i) c[i] = x[i](t);
- return c;
- };
- };
- d3.interpolateObject = function(a, b) {
- var i = {}, c = {}, k;
- for (k in a) {
- if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
- } else {
- c[k] = a[k];
- }
- }
- for (k in b) {
- if (!(k in a)) {
- c[k] = b[k];
- }
- }
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
- };
- var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
- d3.interpolators = [ d3.interpolateObject, function(a, b) {
- return b instanceof Array && d3.interpolateArray(a, b);
- }, function(a, b) {
- return (typeof a === "string" || typeof b === "string") && d3.interpolateString(a + "", b + "");
- }, function(a, b) {
- return (typeof b === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b);
- }, function(a, b) {
- return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b);
- } ];
- d3.rgb = function(r, g, b) {
- return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b);
- };
- d3_Rgb.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- var r = this.r, g = this.g, b = this.b, i = 30;
- if (!r && !g && !b) return d3_rgb(i, i, i);
- if (r && r < i) r = i;
- if (g && g < i) g = i;
- if (b && b < i) b = i;
- return d3_rgb(Math.min(255, Math.floor(r / k)), Math.min(255, Math.floor(g / k)), Math.min(255, Math.floor(b / k)));
- };
- d3_Rgb.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_rgb(Math.floor(k * this.r), Math.floor(k * this.g), Math.floor(k * this.b));
- };
- d3_Rgb.prototype.hsl = function() {
- return d3_rgb_hsl(this.r, this.g, this.b);
- };
- d3_Rgb.prototype.toString = function() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
- };
- var d3_rgb_names = d3.map({
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- });
- d3_rgb_names.forEach(function(key, value) {
- d3_rgb_names.set(key, d3_rgb_parse(value, d3_rgb, d3_hsl_rgb));
- });
- d3.hsl = function(h, s, l) {
- return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l);
- };
- d3_Hsl.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, this.l / k);
- };
- d3_Hsl.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, k * this.l);
- };
- d3_Hsl.prototype.rgb = function() {
- return d3_hsl_rgb(this.h, this.s, this.l);
- };
- d3_Hsl.prototype.toString = function() {
- return this.rgb().toString();
- };
- d3.hcl = function(h, c, l) {
- return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l);
- };
- d3_Hcl.prototype.brighter = function(k) {
- return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.darker = function(k) {
- return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.rgb = function() {
- return d3_hcl_lab(this.h, this.c, this.l).rgb();
- };
- d3_Hcl.prototype.toString = function() {
- return this.rgb() + "";
- };
- d3.lab = function(l, a, b) {
- return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b);
- };
- var d3_lab_K = 18;
- var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
- d3_Lab.prototype.brighter = function(k) {
- return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.darker = function(k) {
- return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.rgb = function() {
- return d3_lab_rgb(this.l, this.a, this.b);
- };
- d3_Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
- var d3_select = function(s, n) {
- return n.querySelector(s);
- }, d3_selectAll = function(s, n) {
- return n.querySelectorAll(s);
- }, d3_selectRoot = document.documentElement, d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector, d3_selectMatches = function(n, s) {
- return d3_selectMatcher.call(n, s);
- };
- if (typeof Sizzle === "function") {
- d3_select = function(s, n) {
- return Sizzle(s, n)[0] || null;
- };
- d3_selectAll = function(s, n) {
- return Sizzle.uniqueSort(Sizzle(s, n));
- };
- d3_selectMatches = Sizzle.matchesSelector;
- }
- var d3_selectionPrototype = [];
- d3.selection = function() {
- return d3_selectionRoot;
- };
- d3.selection.prototype = d3_selectionPrototype;
- d3_selectionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, group, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(subnode = selector.call(node, node.__data__, i));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));
- subgroup.parentNode = node;
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node();
- name = d3.ns.qualify(name);
- return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
- }
- for (value in name) this.each(d3_selection_attr(value, name[value]));
- return this;
- }
- return this.each(d3_selection_attr(name, value));
- };
- d3_selectionPrototype.classed = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1;
- if (value = node.classList) {
- while (++i < n) if (!value.contains(name[i])) return false;
- } else {
- value = node.className;
- if (value.baseVal != null) value = value.baseVal;
- while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
- }
- return true;
- }
- for (value in name) this.each(d3_selection_classed(value, name[value]));
- return this;
- }
- return this.each(d3_selection_classed(name, value));
- };
- d3_selectionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
- return this;
- }
- if (n < 2) return window.getComputedStyle(this.node(), null).getPropertyValue(name);
- priority = "";
- }
- return this.each(d3_selection_style(name, value, priority));
- };
- d3_selectionPrototype.property = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") return this.node()[name];
- for (value in name) this.each(d3_selection_property(value, name[value]));
- return this;
- }
- return this.each(d3_selection_property(name, value));
- };
- d3_selectionPrototype.text = function(value) {
- return arguments.length < 1 ? this.node().textContent : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- } : value == null ? function() {
- this.textContent = "";
- } : function() {
- this.textContent = value;
- });
- };
- d3_selectionPrototype.html = function(value) {
- return arguments.length < 1 ? this.node().innerHTML : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- } : value == null ? function() {
- this.innerHTML = "";
- } : function() {
- this.innerHTML = value;
- });
- };
- d3_selectionPrototype.append = function(name) {
- function append() {
- return this.appendChild(document.createElementNS(this.namespaceURI, name));
- }
- function appendNS() {
- return this.appendChild(document.createElementNS(name.space, name.local));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? appendNS : append);
- };
- d3_selectionPrototype.insert = function(name, before) {
- function insert() {
- return this.insertBefore(document.createElementNS(this.namespaceURI, name), d3_select(before, this));
- }
- function insertNS() {
- return this.insertBefore(document.createElementNS(name.space, name.local), d3_select(before, this));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? insertNS : insert);
- };
- d3_selectionPrototype.remove = function() {
- return this.each(function() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
- });
- };
- d3_selectionPrototype.data = function(value, key) {
- function bind(group, groupData) {
- var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), n1 = Math.max(n, m), updateNodes = [], enterNodes = [], exitNodes = [], node, nodeData;
- if (key) {
- var nodeByKeyValue = new d3_Map, keyValues = [], keyValue, j = groupData.length;
- for (i = -1; ++i < n; ) {
- keyValue = key.call(node = group[i], node.__data__, i);
- if (nodeByKeyValue.has(keyValue)) {
- exitNodes[j++] = node;
- } else {
- nodeByKeyValue.set(keyValue, node);
- }
- keyValues.push(keyValue);
- }
- for (i = -1; ++i < m; ) {
- keyValue = key.call(groupData, nodeData = groupData[i], i);
- if (nodeByKeyValue.has(keyValue)) {
- updateNodes[i] = node = nodeByKeyValue.get(keyValue);
- node.__data__ = nodeData;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- nodeByKeyValue.remove(keyValue);
- }
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.has(keyValues[i])) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (i = -1; ++i < n0; ) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- }
- for (; i < m; ++i) {
- enterNodes[i] = d3_selection_dataNode(groupData[i]);
- updateNodes[i] = exitNodes[i] = null;
- }
- for (; i < n1; ++i) {
- exitNodes[i] = group[i];
- enterNodes[i] = updateNodes[i] = null;
- }
- }
- enterNodes.update = updateNodes;
- enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
- var i = -1, n = this.length, group, node;
- if (!arguments.length) {
- value = new Array(n = (group = this[0]).length);
- while (++i < n) {
- if (node = group[i]) {
- value[i] = node.__data__;
- }
- }
- return value;
- }
- var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
- if (typeof value === "function") {
- while (++i < n) {
- bind(group = this[i], value.call(group, group.parentNode.__data__, i));
- }
- } else {
- while (++i < n) {
- bind(group = this[i], value);
- }
- }
- update.enter = function() {
- return enter;
- };
- update.exit = function() {
- return exit;
- };
- return update;
- };
- d3_selectionPrototype.datum = d3_selectionPrototype.map = function(value) {
- return arguments.length < 1 ? this.property("__data__") : this.property("__data__", value);
- };
- d3_selectionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.order = function() {
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
- return this;
- };
- d3_selectionPrototype.sort = function(comparator) {
- comparator = d3_selection_sortComparator.apply(this, arguments);
- for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
- return this.order();
- };
- d3_selectionPrototype.on = function(type, listener, capture) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof type !== "string") {
- if (n < 2) listener = false;
- for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
- return this;
- }
- if (n < 2) return (n = this.node()["__on" + type]) && n._;
- capture = false;
- }
- return this.each(d3_selection_on(type, listener, capture));
- };
- d3_selectionPrototype.each = function(callback) {
- return d3_selection_each(this, function(node, i, j) {
- callback.call(node, node.__data__, i, j);
- });
- };
- d3_selectionPrototype.call = function(callback) {
- callback.apply(this, (arguments[0] = this, arguments));
- return this;
- };
- d3_selectionPrototype.empty = function() {
- return !this.node();
- };
- d3_selectionPrototype.node = function(callback) {
- for (var j = 0, m = this.length; j < m; j++) {
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return node;
- }
- }
- return null;
- };
- d3_selectionPrototype.transition = function() {
- var subgroups = [], subgroup, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- subgroup.push((node = group[i]) ? {
- node: node,
- delay: d3_transitionDelay,
- duration: d3_transitionDuration
- } : null);
- }
- }
- return d3_transition(subgroups, d3_transitionId || ++d3_transitionNextId, Date.now());
- };
- var d3_selectionRoot = d3_selection([ [ document ] ]);
- d3_selectionRoot[0].parentNode = d3_selectRoot;
- d3.select = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.select(selector) : d3_selection([ [ selector ] ]);
- };
- d3.selectAll = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.selectAll(selector) : d3_selection([ d3_array(selector) ]);
- };
- var d3_selection_enterPrototype = [];
- d3.selection.enter = d3_selection_enter;
- d3.selection.enter.prototype = d3_selection_enterPrototype;
- d3_selection_enterPrototype.append = d3_selectionPrototype.append;
- d3_selection_enterPrototype.insert = d3_selectionPrototype.insert;
- d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
- d3_selection_enterPrototype.node = d3_selectionPrototype.node;
- d3_selection_enterPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, upgroup, group, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- upgroup = (group = this[j]).update;
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- var d3_transitionPrototype = [], d3_transitionNextId = 0, d3_transitionId = 0, d3_transitionDefaultDelay = 0, d3_transitionDefaultDuration = 250, d3_transitionDefaultEase = d3.ease("cubic-in-out"), d3_transitionDelay = d3_transitionDefaultDelay, d3_transitionDuration = d3_transitionDefaultDuration, d3_transitionEase = d3_transitionDefaultEase;
- d3_transitionPrototype.call = d3_selectionPrototype.call;
- d3.transition = function(selection) {
- return arguments.length ? d3_transitionId ? selection.transition() : selection : d3_selectionRoot.transition();
- };
- d3.transition.prototype = d3_transitionPrototype;
- d3_transitionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {
- if ("__data__" in node.node) subnode.__data__ = node.node.__data__;
- subgroup.push({
- node: subnode,
- delay: node.delay,
- duration: node.duration
- });
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, subnodes, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subnodes = selector.call(node.node, node.node.__data__, i);
- subgroups.push(subgroup = []);
- for (var k = -1, o = subnodes.length; ++k < o; ) {
- subgroup.push({
- node: subnodes[k],
- delay: node.delay,
- duration: node.duration
- });
- }
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node.node, node.node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- for (value in name) this.attrTween(value, d3_tweenByName(name[value], value));
- return this;
- }
- return this.attrTween(name, d3_tweenByName(value, name));
- };
- d3_transitionPrototype.attrTween = function(nameNS, tween) {
- function attrTween(d, i) {
- var f = tween.call(this, d, i, this.getAttribute(name));
- return f === d3_tweenRemove ? (this.removeAttribute(name), null) : f && function(t) {
- this.setAttribute(name, f(t));
- };
- }
- function attrTweenNS(d, i) {
- var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
- return f === d3_tweenRemove ? (this.removeAttributeNS(name.space, name.local), null) : f && function(t) {
- this.setAttributeNS(name.space, name.local, f(t));
- };
- }
- var name = d3.ns.qualify(nameNS);
- return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
- };
- d3_transitionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.styleTween(priority, d3_tweenByName(name[priority], priority), value);
- return this;
- }
- priority = "";
- }
- return this.styleTween(name, d3_tweenByName(value, name), priority);
- };
- d3_transitionPrototype.styleTween = function(name, tween, priority) {
- if (arguments.length < 3) priority = "";
- return this.tween("style." + name, function(d, i) {
- var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
- return f === d3_tweenRemove ? (this.style.removeProperty(name), null) : f && function(t) {
- this.style.setProperty(name, f(t), priority);
- };
- });
- };
- d3_transitionPrototype.text = function(value) {
- return this.tween("text", function(d, i) {
- this.textContent = typeof value === "function" ? value.call(this, d, i) : value;
- });
- };
- d3_transitionPrototype.remove = function() {
- return this.each("end.transition", function() {
- var p;
- if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);
- });
- };
- d3_transitionPrototype.delay = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.delay = value.call(node = node.node, node.__data__, i, j) | 0;
- } : (value = value | 0, function(node) {
- node.delay = value;
- }));
- };
- d3_transitionPrototype.duration = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.duration = Math.max(1, value.call(node = node.node, node.__data__, i, j) | 0);
- } : (value = Math.max(1, value | 0), function(node) {
- node.duration = value;
- }));
- };
- d3_transitionPrototype.transition = function() {
- return this.select(d3_this);
- };
- d3.tween = function(b, interpolate) {
- function tweenFunction(d, i, a) {
- var v = b.call(this, d, i);
- return v == null ? a != "" && d3_tweenRemove : a != v && interpolate(a, v);
- }
- function tweenString(d, i, a) {
- return a != b && interpolate(a, b);
- }
- return typeof b === "function" ? tweenFunction : b == null ? d3_tweenNull : (b += "", tweenString);
- };
- var d3_tweenRemove = {};
- var d3_timer_queue = null, d3_timer_interval, d3_timer_timeout;
- d3.timer = function(callback, delay, then) {
- var found = false, t0, t1 = d3_timer_queue;
- if (arguments.length < 3) {
- if (arguments.length < 2) delay = 0; else if (!isFinite(delay)) return;
- then = Date.now();
- }
- while (t1) {
- if (t1.callback === callback) {
- t1.then = then;
- t1.delay = delay;
- found = true;
- break;
- }
- t0 = t1;
- t1 = t1.next;
- }
- if (!found) d3_timer_queue = {
- callback: callback,
- then: then,
- delay: delay,
- next: d3_timer_queue
- };
- if (!d3_timer_interval) {
- d3_timer_timeout = clearTimeout(d3_timer_timeout);
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- };
- d3.timer.flush = function() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (!t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- d3_timer_flush();
- };
- var d3_timer_frame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) {
- setTimeout(callback, 17);
- };
- d3.mouse = function(container) {
- return d3_mousePoint(container, d3_eventSource());
- };
- var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
- d3.touches = function(container, touches) {
- if (arguments.length < 2) touches = d3_eventSource().touches;
- return touches ? d3_array(touches).map(function(touch) {
- var point = d3_mousePoint(container, touch);
- point.identifier = touch.identifier;
- return point;
- }) : [];
- };
- d3.scale = {};
- d3.scale.linear = function() {
- return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3.interpolate, false);
- };
- d3.scale.log = function() {
- return d3_scale_log(d3.scale.linear(), d3_scale_logp);
- };
- var d3_scale_logFormat = d3.format(".0e");
- d3_scale_logp.pow = function(x) {
- return Math.pow(10, x);
- };
- d3_scale_logn.pow = function(x) {
- return -Math.pow(10, -x);
- };
- d3.scale.pow = function() {
- return d3_scale_pow(d3.scale.linear(), 1);
- };
- d3.scale.sqrt = function() {
- return d3.scale.pow().exponent(.5);
- };
- d3.scale.ordinal = function() {
- return d3_scale_ordinal([], {
- t: "range",
- a: [ [] ]
- });
- };
- d3.scale.category10 = function() {
- return d3.scale.ordinal().range(d3_category10);
- };
- d3.scale.category20 = function() {
- return d3.scale.ordinal().range(d3_category20);
- };
- d3.scale.category20b = function() {
- return d3.scale.ordinal().range(d3_category20b);
- };
- d3.scale.category20c = function() {
- return d3.scale.ordinal().range(d3_category20c);
- };
- d3.scale.category50 = function() {
- return d3.scale.ordinal().range(d3_category50);
- };
- var d3_category10 = [ "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" ];
- var d3_category20 = [ "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5" ];
- var d3_category20b = [ "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", "#843c39", "#ad494a", "#d6616b", "#e7969c", "#7b4173", "#a55194", "#ce6dbd", "#de9ed6" ];
- var d3_category20c = [ "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", "#31a354", "#74c476", "#a1d99b", "#c7e9c0", "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", "#636363", "#969696", "#bdbdbd", "#d9d9d9" ];
- var d3_category50 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#8c864b", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6", "#9edae5", "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#aec7e8", "#e7ba52", "#ffbb78", "#e7cb94", "#98df8a", "#843c39", "#ff9896", "#ad494a", "#c5b0d5", "#d6616b", "#c49c94", "#e7969c", "#f7b6d2", "#fd8d3c", "#c7c7c7", "#7b4173", "#dbdb8d", "#a55194", ];
- d3.scale.quantile = function() {
- return d3_scale_quantile([], []);
- };
- d3.scale.quantize = function() {
- return d3_scale_quantize(0, 1, [ 0, 1 ]);
- };
- d3.scale.threshold = function() {
- return d3_scale_threshold([ .5 ], [ 0, 1 ]);
- };
- d3.scale.identity = function() {
- return d3_scale_identity([ 0, 1 ]);
- };
- d3.svg = {};
- d3.svg.arc = function() {
- function arc() {
- var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0), df = da < Math.PI ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
- return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
- }
- var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- arc.innerRadius = function(v) {
- if (!arguments.length) return innerRadius;
- innerRadius = d3_functor(v);
- return arc;
- };
- arc.outerRadius = function(v) {
- if (!arguments.length) return outerRadius;
- outerRadius = d3_functor(v);
- return arc;
- };
- arc.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return arc;
- };
- arc.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return arc;
- };
- arc.centroid = function() {
- var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
- return [ Math.cos(a) * r, Math.sin(a) * r ];
- };
- return arc;
- };
- var d3_svg_arcOffset = -Math.PI / 2, d3_svg_arcMax = 2 * Math.PI - 1e-6;
- d3.svg.line = function() {
- return d3_svg_line(d3_identity);
- };
- var d3_svg_lineInterpolators = d3.map({
- linear: d3_svg_lineLinear,
- "linear-closed": d3_svg_lineLinearClosed,
- "step-before": d3_svg_lineStepBefore,
- "step-after": d3_svg_lineStepAfter,
- basis: d3_svg_lineBasis,
- "basis-open": d3_svg_lineBasisOpen,
- "basis-closed": d3_svg_lineBasisClosed,
- bundle: d3_svg_lineBundle,
- cardinal: d3_svg_lineCardinal,
- "cardinal-open": d3_svg_lineCardinalOpen,
- "cardinal-closed": d3_svg_lineCardinalClosed,
- monotone: d3_svg_lineMonotone
- });
- d3_svg_lineInterpolators.forEach(function(key, value) {
- value.key = key;
- value.closed = /-closed$/.test(key);
- });
- var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
- d3.svg.line.radial = function() {
- var line = d3_svg_line(d3_svg_lineRadial);
- line.radius = line.x, delete line.x;
- line.angle = line.y, delete line.y;
- return line;
- };
- d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
- d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
- d3.svg.area = function() {
- return d3_svg_area(d3_identity);
- };
- d3.svg.area.radial = function() {
- var area = d3_svg_area(d3_svg_lineRadial);
- area.radius = area.x, delete area.x;
- area.innerRadius = area.x0, delete area.x0;
- area.outerRadius = area.x1, delete area.x1;
- area.angle = area.y, delete area.y;
- area.startAngle = area.y0, delete area.y0;
- area.endAngle = area.y1, delete area.y1;
- return area;
- };
- d3.svg.chord = function() {
- function chord(d, i) {
- var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
- return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
- }
- function subgroup(self, f, d, i) {
- var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
- return {
- r: r,
- a0: a0,
- a1: a1,
- p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
- p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
- };
- }
- function equals(a, b) {
- return a.a0 == b.a0 && a.a1 == b.a1;
- }
- function arc(r, p, a) {
- return "A" + r + "," + r + " 0 " + +(a > Math.PI) + ",1 " + p;
- }
- function curve(r0, p0, r1, p1) {
- return "Q 0,0 " + p1;
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- chord.radius = function(v) {
- if (!arguments.length) return radius;
- radius = d3_functor(v);
- return chord;
- };
- chord.source = function(v) {
- if (!arguments.length) return source;
- source = d3_functor(v);
- return chord;
- };
- chord.target = function(v) {
- if (!arguments.length) return target;
- target = d3_functor(v);
- return chord;
- };
- chord.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return chord;
- };
- chord.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return chord;
- };
- return chord;
- };
- d3.svg.diagonal = function() {
- function diagonal(d, i) {
- var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
- x: p0.x,
- y: m
- }, {
- x: p3.x,
- y: m
- }, p3 ];
- p = p.map(projection);
- return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, projection = d3_svg_diagonalProjection;
- diagonal.source = function(x) {
- if (!arguments.length) return source;
- source = d3_functor(x);
- return diagonal;
- };
- diagonal.target = function(x) {
- if (!arguments.length) return target;
- target = d3_functor(x);
- return diagonal;
- };
- diagonal.projection = function(x) {
- if (!arguments.length) return projection;
- projection = x;
- return diagonal;
- };
- return diagonal;
- };
- d3.svg.diagonal.radial = function() {
- var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
- diagonal.projection = function(x) {
- return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
- };
- return diagonal;
- };
- d3.svg.mouse = d3.mouse;
- d3.svg.touches = d3.touches;
- d3.svg.symbol = function() {
- function symbol(d, i) {
- return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
- }
- var type = d3_svg_symbolType, size = d3_svg_symbolSize;
- symbol.type = function(x) {
- if (!arguments.length) return type;
- type = d3_functor(x);
- return symbol;
- };
- symbol.size = function(x) {
- if (!arguments.length) return size;
- size = d3_functor(x);
- return symbol;
- };
- return symbol;
- };
- var d3_svg_symbols = d3.map({
- circle: d3_svg_symbolCircle,
- cross: function(size) {
- var r = Math.sqrt(size / 5) / 2;
- return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
- },
- diamond: function(size) {
- var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
- return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
- },
- square: function(size) {
- var r = Math.sqrt(size) / 2;
- return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
- },
- "triangle-down": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
- },
- "triangle-up": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
- }
- });
- d3.svg.symbolTypes = d3_svg_symbols.keys();
- var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
- d3.svg.axis = function() {
- function axis(g) {
- g.each(function() {
- var g = d3.select(this);
- var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
- var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
- var tick = g.selectAll("g").data(ticks, String), tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
- var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathEnter = path.enter().append("path").attr("class", "domain"), pathUpdate = d3.transition(path);
- var scale1 = scale.copy(), scale0 = this.__chart__ || scale1;
- this.__chart__ = scale1;
- tickEnter.append("line").attr("class", "tick");
- tickEnter.append("text");
- var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text");
- switch (orient) {
- case "bottom":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize);
- lineEnter.attr("y2", tickMajorSize);
- textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", 0).attr("y2", tickMajorSize);
- textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- text.attr("dy", ".71em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
- break;
- }
- case "top":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", -tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize);
- lineEnter.attr("y2", -tickMajorSize);
- textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize);
- textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- text.attr("dy", "0em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
- break;
- }
- case "left":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", -tickMinorSize);
- subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", -tickMajorSize);
- textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "end");
- pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
- break;
- }
- case "right":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", tickMinorSize);
- subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", tickMajorSize);
- textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "start");
- pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
- break;
- }
- }
- if (scale.ticks) {
- tickEnter.call(tickTransform, scale0);
- tickUpdate.call(tickTransform, scale1);
- tickExit.call(tickTransform, scale1);
- subtickEnter.call(tickTransform, scale0);
- subtickUpdate.call(tickTransform, scale1);
- subtickExit.call(tickTransform, scale1);
- } else {
- var dx = scale1.rangeBand() / 2, x = function(d) {
- return scale1(d) + dx;
- };
- tickEnter.call(tickTransform, x);
- tickUpdate.call(tickTransform, x);
- }
- });
- }
- var scale = d3.scale.linear(), orient = "bottom", tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
- axis.scale = function(x) {
- if (!arguments.length) return scale;
- scale = x;
- return axis;
- };
- axis.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- return axis;
- };
- axis.ticks = function() {
- if (!arguments.length) return tickArguments_;
- tickArguments_ = arguments;
- return axis;
- };
- axis.tickValues = function(x) {
- if (!arguments.length) return tickValues;
- tickValues = x;
- return axis;
- };
- axis.tickFormat = function(x) {
- if (!arguments.length) return tickFormat_;
- tickFormat_ = x;
- return axis;
- };
- axis.tickSize = function(x, y, z) {
- if (!arguments.length) return tickMajorSize;
- var n = arguments.length - 1;
- tickMajorSize = +x;
- tickMinorSize = n > 1 ? +y : tickMajorSize;
- tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;
- return axis;
- };
- axis.tickPadding = function(x) {
- if (!arguments.length) return tickPadding;
- tickPadding = +x;
- return axis;
- };
- axis.tickSubdivide = function(x) {
- if (!arguments.length) return tickSubdivide;
- tickSubdivide = +x;
- return axis;
- };
- return axis;
- };
- d3.svg.brush = function() {
- function brush(g) {
- g.each(function() {
- var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
- g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
- bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
- fg.enter().append("rect").attr("class", "extent").style("cursor", "move");
- tz.enter().append("g").attr("class", function(d) {
- return "resize " + d;
- }).style("cursor", function(d) {
- return d3_svg_brushCursor[d];
- }).append("rect").attr("x", function(d) {
- return /[ew]$/.test(d) ? -3 : null;
- }).attr("y", function(d) {
- return /^[ns]/.test(d) ? -3 : null;
- }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
- tz.style("display", brush.empty() ? "none" : null);
- tz.exit().remove();
- if (x) {
- e = d3_scaleRange(x);
- bg.attr("x", e[0]).attr("width", e[1] - e[0]);
- redrawX(g);
- }
- if (y) {
- e = d3_scaleRange(y);
- bg.attr("y", e[0]).attr("height", e[1] - e[0]);
- redrawY(g);
- }
- redraw(g);
- });
- }
- function redraw(g) {
- g.selectAll(".resize").attr("transform", function(d) {
- return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")";
- });
- }
- function redrawX(g) {
- g.select(".extent").attr("x", extent[0][0]);
- g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]);
- }
- function redrawY(g) {
- g.select(".extent").attr("y", extent[0][1]);
- g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]);
- }
- function brushstart() {
- function mouse() {
- var touches = d3.event.changedTouches;
- return touches ? d3.touches(target, touches)[0] : d3.mouse(target);
- }
- function keydown() {
- if (d3.event.keyCode == 32) {
- if (!dragging) {
- center = null;
- origin[0] -= extent[1][0];
- origin[1] -= extent[1][1];
- dragging = 2;
- }
- d3_eventCancel();
- }
- }
- function keyup() {
- if (d3.event.keyCode == 32 && dragging == 2) {
- origin[0] += extent[1][0];
- origin[1] += extent[1][1];
- dragging = 0;
- d3_eventCancel();
- }
- }
- function brushmove() {
- var point = mouse(), moved = false;
- if (offset) {
- point[0] += offset[0];
- point[1] += offset[1];
- }
- if (!dragging) {
- if (d3.event.altKey) {
- if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ];
- origin[0] = extent[+(point[0] < center[0])][0];
- origin[1] = extent[+(point[1] < center[1])][1];
- } else center = null;
- }
- if (resizingX && move1(point, x, 0)) {
- redrawX(g);
- moved = true;
- }
- if (resizingY && move1(point, y, 1)) {
- redrawY(g);
- moved = true;
- }
- if (moved) {
- redraw(g);
- event_({
- type: "brush",
- mode: dragging ? "move" : "resize"
- });
- }
- }
- function move1(point, scale, i) {
- var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max;
- if (dragging) {
- r0 -= position;
- r1 -= size + position;
- }
- min = Math.max(r0, Math.min(r1, point[i]));
- if (dragging) {
- max = (min += position) + size;
- } else {
- if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
- if (position < min) {
- max = min;
- min = position;
- } else {
- max = position;
- }
- }
- if (extent[0][i] !== min || extent[1][i] !== max) {
- extentDomain = null;
- extent[0][i] = min;
- extent[1][i] = max;
- return true;
- }
- }
- function brushend() {
- brushmove();
- g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
- d3.select("body").style("cursor", null);
- w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
- event_({
- type: "brushend"
- });
- d3_eventCancel();
- }
- var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), center, origin = mouse(), offset;
- var w = d3.select(window).on("mousemove.brush", brushmove).on("mouseup.brush", brushend).on("touchmove.brush", brushmove).on("touchend.brush", brushend).on("keydown.brush", keydown).on("keyup.brush", keyup);
- if (dragging) {
- origin[0] = extent[0][0] - origin[0];
- origin[1] = extent[0][1] - origin[1];
- } else if (resizing) {
- var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
- offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ];
- origin[0] = extent[ex][0];
- origin[1] = extent[ey][1];
- } else if (d3.event.altKey) center = origin.slice();
- g.style("pointer-events", "none").selectAll(".resize").style("display", null);
- d3.select("body").style("cursor", eventTarget.style("cursor"));
- event_({
- type: "brushstart"
- });
- brushmove();
- d3_eventCancel();
- }
- var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], extentDomain;
- brush.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.extent = function(z) {
- var x0, x1, y0, y1, t;
- if (!arguments.length) {
- z = extentDomain || extent;
- if (x) {
- x0 = z[0][0], x1 = z[1][0];
- if (!extentDomain) {
- x0 = extent[0][0], x1 = extent[1][0];
- if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- }
- }
- if (y) {
- y0 = z[0][1], y1 = z[1][1];
- if (!extentDomain) {
- y0 = extent[0][1], y1 = extent[1][1];
- if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- }
- }
- return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
- }
- extentDomain = [ [ 0, 0 ], [ 0, 0 ] ];
- if (x) {
- x0 = z[0], x1 = z[1];
- if (y) x0 = x0[0], x1 = x1[0];
- extentDomain[0][0] = x0, extentDomain[1][0] = x1;
- if (x.invert) x0 = x(x0), x1 = x(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;
- }
- if (y) {
- y0 = z[0], y1 = z[1];
- if (x) y0 = y0[1], y1 = y1[1];
- extentDomain[0][1] = y0, extentDomain[1][1] = y1;
- if (y.invert) y0 = y(y0), y1 = y(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;
- }
- return brush;
- };
- brush.clear = function() {
- extentDomain = null;
- extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0;
- return brush;
- };
- brush.empty = function() {
- return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1];
- };
- return d3.rebind(brush, event, "on");
- };
- var d3_svg_brushCursor = {
- n: "ns-resize",
- e: "ew-resize",
- s: "ns-resize",
- w: "ew-resize",
- nw: "nwse-resize",
- ne: "nesw-resize",
- se: "nwse-resize",
- sw: "nesw-resize"
- };
- var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
- d3.behavior = {};
- d3.behavior.drag = function() {
- function drag() {
- this.on("mousedown.drag", mousedown).on("touchstart.drag", mousedown);
- }
- function mousedown() {
- function point() {
- var p = target.parentNode;
- return touchId ? d3.touches(p).filter(function(p) {
- return p.identifier === touchId;
- })[0] : d3.mouse(p);
- }
- function dragmove() {
- if (!target.parentNode) return dragend();
- var p = point(), dx = p[0] - origin_[0], dy = p[1] - origin_[1];
- moved |= dx | dy;
- origin_ = p;
- d3_eventCancel();
- event_({
- type: "drag",
- x: p[0] + offset[0],
- y: p[1] + offset[1],
- dx: dx,
- dy: dy
- });
- }
- function dragend() {
- event_({
- type: "dragend"
- });
- if (moved) {
- d3_eventCancel();
- if (d3.event.target === eventTarget) w.on("click.drag", click, true);
- }
- w.on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", null).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", null);
- }
- function click() {
- d3_eventCancel();
- w.on("click.drag", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, touchId = d3.event.touches && d3.event.changedTouches[0].identifier, offset, origin_ = point(), moved = 0;
- var w = d3.select(window).on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", dragmove).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", dragend, true);
- if (origin) {
- offset = origin.apply(target, arguments);
- offset = [ offset.x - origin_[0], offset.y - origin_[1] ];
- } else {
- offset = [ 0, 0 ];
- }
- if (!touchId) d3_eventCancel();
- event_({
- type: "dragstart"
- });
- }
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null;
- drag.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return drag;
- };
- return d3.rebind(drag, event, "on");
- };
- d3.behavior.zoom = function() {
- function zoom() {
- this.on("mousedown.zoom", mousedown).on("mousewheel.zoom", mousewheel).on("mousemove.zoom", mousemove).on("DOMMouseScroll.zoom", mousewheel).on("dblclick.zoom", dblclick).on("touchstart.zoom", touchstart).on("touchmove.zoom", touchmove).on("touchend.zoom", touchstart);
- }
- function location(p) {
- return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ];
- }
- function point(l) {
- return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ];
- }
- function scaleTo(s) {
- scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
- }
- function translateTo(p, l) {
- l = point(l);
- translate[0] += p[0] - l[0];
- translate[1] += p[1] - l[1];
- }
- function dispatch(event) {
- if (x1) x1.domain(x0.range().map(function(x) {
- return (x - translate[0]) / scale;
- }).map(x0.invert));
- if (y1) y1.domain(y0.range().map(function(y) {
- return (y - translate[1]) / scale;
- }).map(y0.invert));
- d3.event.preventDefault();
- event({
- type: "zoom",
- scale: scale,
- translate: translate
- });
- }
- function mousedown() {
- function mousemove() {
- moved = 1;
- translateTo(d3.mouse(target), l);
- dispatch(event_);
- }
- function mouseup() {
- if (moved) d3_eventCancel();
- w.on("mousemove.zoom", null).on("mouseup.zoom", null);
- if (moved && d3.event.target === eventTarget) w.on("click.zoom", click, true);
- }
- function click() {
- d3_eventCancel();
- w.on("click.zoom", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, moved = 0, w = d3.select(window).on("mousemove.zoom", mousemove).on("mouseup.zoom", mouseup), l = location(d3.mouse(target));
- window.focus();
- d3_eventCancel();
- }
- function mousewheel() {
- if (!translate0) translate0 = location(d3.mouse(this));
- scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);
- translateTo(d3.mouse(this), translate0);
- dispatch(event.of(this, arguments));
- }
- function mousemove() {
- translate0 = null;
- }
- function dblclick() {
- var p = d3.mouse(this), l = location(p);
- scaleTo(d3.event.shiftKey ? scale / 2 : scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- function touchstart() {
- var touches = d3.touches(this), now = Date.now();
- scale0 = scale;
- translate0 = {};
- touches.forEach(function(t) {
- translate0[t.identifier] = location(t);
- });
- d3_eventCancel();
- if (touches.length === 1) {
- if (now - touchtime < 500) {
- var p = touches[0], l = location(touches[0]);
- scaleTo(scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- touchtime = now;
- }
- }
- function touchmove() {
- var touches = d3.touches(this), p0 = touches[0], l0 = translate0[p0.identifier];
- if (p1 = touches[1]) {
- var p1, l1 = translate0[p1.identifier];
- p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
- l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
- scaleTo(d3.event.scale * scale0);
- }
- translateTo(p0, l0);
- touchtime = null;
- dispatch(event.of(this, arguments));
- }
- var translate = [ 0, 0 ], translate0, scale = 1, scale0, scaleExtent = d3_behavior_zoomInfinity, event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
- zoom.translate = function(x) {
- if (!arguments.length) return translate;
- translate = x.map(Number);
- return zoom;
- };
- zoom.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return zoom;
- };
- zoom.scaleExtent = function(x) {
- if (!arguments.length) return scaleExtent;
- scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);
- return zoom;
- };
- zoom.x = function(z) {
- if (!arguments.length) return x1;
- x1 = z;
- x0 = z.copy();
- return zoom;
- };
- zoom.y = function(z) {
- if (!arguments.length) return y1;
- y1 = z;
- y0 = z.copy();
- return zoom;
- };
- return d3.rebind(zoom, event, "on");
- };
- var d3_behavior_zoomDiv, d3_behavior_zoomInfinity = [ 0, Infinity ];
- d3.layout = {};
- d3.layout.bundle = function() {
- return function(links) {
- var paths = [], i = -1, n = links.length;
- while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
- return paths;
- };
- };
- d3.layout.chord = function() {
- function relayout() {
- var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
- chords = [];
- groups = [];
- k = 0, i = -1;
- while (++i < n) {
- x = 0, j = -1;
- while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
- k = (2 * Math.PI - padding * n) / k;
- x = 0, i = -1;
- while (++i < n) {
- x0 = x, j = -1;
- while (++j < n) {
- var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: a0,
- endAngle: a1,
- value: v
- };
- }
- groups[di] = {
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- };
- x += padding;
- }
- i = -1;
- while (++i < n) {
- j = i - 1;
- while (++j < n) {
- var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push(source.value < target.value ? {
- source: target,
- target: source
- } : {
- source: source,
- target: target
- });
- }
- }
- }
- if (sortChords) resort();
- }
- function resort() {
- chords.sort(function(a, b) {
- return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
- });
- }
- var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
- return chord;
- };
- d3.layout.force = function() {
- function repulse(node) {
- return function(quad, x1, y1, x2, y2) {
- if (quad.point !== node) {
- var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
- if ((x2 - x1) * dn < theta) {
- var k = quad.charge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- return true;
- }
- if (quad.point && isFinite(dn)) {
- var k = quad.pointCharge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- }
- }
- return !quad.charge;
- };
- }
- function dragmove(d) {
- d.px = d3.event.x;
- d.py = d3.event.y;
- force.resume();
- }
- var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, interval, nodes = [], links = [], distances, strengths, charges;
- force.tick = function() {
- if ((alpha *= .99) < .005) {
- event.end({
- type: "end",
- alpha: alpha = 0
- });
- return true;
- }
- var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
- for (i = 0; i < m; ++i) {
- o = links[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = x * x + y * y) {
- l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
- x *= l;
- y *= l;
- t.x -= x * (k = s.weight / (t.weight + s.weight));
- t.y -= y * k;
- s.x += x * (k = 1 - k);
- s.y += y * k;
- }
- }
- if (k = alpha * gravity) {
- x = size[0] / 2;
- y = size[1] / 2;
- i = -1;
- if (k) while (++i < n) {
- o = nodes[i];
- o.x += (x - o.x) * k;
- o.y += (y - o.y) * k;
- }
- }
- if (charge) {
- d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
- i = -1;
- while (++i < n) {
- if (!(o = nodes[i]).fixed) {
- q.visit(repulse(o));
- }
- }
- }
- i = -1;
- while (++i < n) {
- o = nodes[i];
- if (o.fixed) {
- o.x = o.px;
- o.y = o.py;
- } else {
- o.x -= (o.px - (o.px = o.x)) * friction;
- o.y -= (o.py - (o.py = o.y)) * friction;
- }
- }
- event.tick({
- type: "tick",
- alpha: alpha
- });
- };
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
- force.linkDistance = function(x) {
- if (!arguments.length) return linkDistance;
- linkDistance = d3_functor(x);
- return force;
- };
- force.distance = force.linkDistance;
- force.linkStrength = function(x) {
- if (!arguments.length) return linkStrength;
- linkStrength = d3_functor(x);
- return force;
- };
- force.friction = function(x) {
- if (!arguments.length) return friction;
- friction = x;
- return force;
- };
- force.charge = function(x) {
- if (!arguments.length) return charge;
- charge = typeof x === "function" ? x : +x;
- return force;
- };
- force.gravity = function(x) {
- if (!arguments.length) return gravity;
- gravity = x;
- return force;
- };
- force.theta = function(x) {
- if (!arguments.length) return theta;
- theta = x;
- return force;
- };
- force.alpha = function(x) {
- if (!arguments.length) return alpha;
- if (alpha) {
- if (x > 0) alpha = x; else alpha = 0;
- } else if (x > 0) {
- event.start({
- type: "start",
- alpha: alpha = x
- });
- d3.timer(force.tick);
- }
- return force;
- };
- force.start = function() {
- function position(dimension, size) {
- var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
- while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
- return Math.random() * size;
- }
- function neighbor() {
- if (!neighbors) {
- neighbors = [];
- for (j = 0; j < n; ++j) {
- neighbors[j] = [];
- }
- for (j = 0; j < m; ++j) {
- var o = links[j];
- neighbors[o.source.index].push(o.target);
- neighbors[o.target.index].push(o.source);
- }
- }
- return neighbors[i];
- }
- var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
- for (i = 0; i < n; ++i) {
- (o = nodes[i]).index = i;
- o.weight = 0;
- }
- distances = [];
- strengths = [];
- for (i = 0; i < m; ++i) {
- o = links[i];
- if (typeof o.source == "number") o.source = nodes[o.source];
- if (typeof o.target == "number") o.target = nodes[o.target];
- distances[i] = linkDistance.call(this, o, i);
- strengths[i] = linkStrength.call(this, o, i);
- ++o.source.weight;
- ++o.target.weight;
- }
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- if (isNaN(o.x)) o.x = position("x", w);
- if (isNaN(o.y)) o.y = position("y", h);
- if (isNaN(o.px)) o.px = o.x;
- if (isNaN(o.py)) o.py = o.y;
- }
- charges = [];
- if (typeof charge === "function") {
- for (i = 0; i < n; ++i) {
- charges[i] = +charge.call(this, nodes[i], i);
- }
- } else {
- for (i = 0; i < n; ++i) {
- charges[i] = charge;
- }
- }
- return force.resume();
- };
- force.resume = function() {
- return force.alpha(.1);
- };
- force.stop = function() {
- return force.alpha(0);
- };
- force.drag = function() {
- if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart", d3_layout_forceDragstart).on("drag", dragmove).on("dragend", d3_layout_forceDragend);
- this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
- };
- return d3.rebind(force, event, "on");
- };
- d3.layout.partition = function() {
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children && (n = children.length)) {
- var i = -1, n, c, d;
- dx = node.value ? dx / node.value : 0;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
- function depth(node) {
- var children = node.children, d = 0;
- if (children && (n = children.length)) {
- var i = -1, n;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
- return d3_layout_hierarchyRebind(partition, hierarchy);
- };
- d3.layout.pie = function() {
- function pie(data, i) {
- var values = data.map(function(d, i) {
- return +value.call(pie, d, i);
- });
- var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle);
- var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - startAngle) / d3.sum(values);
- var index = d3.range(data.length);
- if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
- return values[j] - values[i];
- } : function(i, j) {
- return sort(data[i], data[j]);
- });
- var arcs = [];
- index.forEach(function(i) {
- var d;
- arcs[i] = {
- data: data[i],
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
- return arcs;
- }
- var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * Math.PI;
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
- return pie;
- };
- var d3_layout_pieSortByValue = {};
- d3.layout.stack = function() {
- function stack(data, index) {
- var series = data.map(function(d, i) {
- return values.call(stack, d, i);
- });
- var points = series.map(function(d, i) {
- return d.map(function(v, i) {
- return [ x.call(stack, v, i), y.call(stack, v, i) ];
- });
- });
- var orders = order.call(stack, points, index);
- series = d3.permute(series, orders);
- points = d3.permute(points, orders);
- var offsets = offset.call(stack, points, index);
- var n = series.length, m = series[0].length, i, j, o;
- for (j = 0; j < m; ++j) {
- out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
- for (i = 1; i < n; ++i) {
- out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
- }
- }
- return data;
- }
- var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
- stack.values = function(x) {
- if (!arguments.length) return values;
- values = x;
- return stack;
- };
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
- return stack;
- };
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
- return stack;
- };
- stack.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return stack;
- };
- stack.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return stack;
- };
- stack.out = function(z) {
- if (!arguments.length) return out;
- out = z;
- return stack;
- };
- return stack;
- };
- var d3_layout_stackOrders = d3.map({
- "inside-out": function(data) {
- var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
- return max[a] - max[b];
- }), top = 0, bottom = 0, tops = [], bottoms = [];
- for (i = 0; i < n; ++i) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
- reverse: function(data) {
- return d3.range(data.length).reverse();
- },
- "default": d3_layout_stackOrderDefault
- });
- var d3_layout_stackOffsets = d3.map({
- silhouette: function(data) {
- var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0; j < m; ++j) {
- y0[j] = (max - sums[j]) / 2;
- }
- return y0;
- },
- wiggle: function(data) {
- var n = data.length, x = data[0], m = x.length, max = 0, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
- y0[0] = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
- for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
- for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
- s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
- }
- s2 += s3 * data[i][j][1];
- }
- y0[j] = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) y0[j] -= o0;
- return y0;
- },
- expand: function(data) {
- var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- },
- zero: d3_layout_stackOffsetZero
- });
- d3.layout.histogram = function() {
- function histogram(data, i) {
- var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
- while (++i < m) {
- bin = bins[i] = [];
- bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
- bin.y = 0;
- }
- if (m > 0) {
- i = -1;
- while (++i < n) {
- x = values[i];
- if (x >= range[0] && x <= range[1]) {
- bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
- bin.y += k;
- bin.push(data[i]);
- }
- }
- }
- return bins;
- }
- var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
- histogram.value = function(x) {
- if (!arguments.length) return valuer;
- valuer = x;
- return histogram;
- };
- histogram.range = function(x) {
- if (!arguments.length) return ranger;
- ranger = d3_functor(x);
- return histogram;
- };
- histogram.bins = function(x) {
- if (!arguments.length) return binner;
- binner = typeof x === "number" ? function(range) {
- return d3_layout_histogramBinFixed(range, x);
- } : d3_functor(x);
- return histogram;
- };
- histogram.frequency = function(x) {
- if (!arguments.length) return frequency;
- frequency = !!x;
- return histogram;
- };
- return histogram;
- };
- d3.layout.hierarchy = function() {
- function recurse(data, depth, nodes) {
- var childs = children.call(hierarchy, data, depth), node = d3_layout_hierarchyInline ? data : {
- data: data
- };
- node.depth = depth;
- nodes.push(node);
- if (childs && (n = childs.length)) {
- var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d;
- while (++i < n) {
- d = recurse(childs[i], j, nodes);
- d.parent = node;
- c.push(d);
- v += d.value;
- }
- if (sort) c.sort(sort);
- if (value) node.value = v;
- } else if (value) {
- node.value = +value.call(hierarchy, data, depth) || 0;
- }
- return node;
- }
- function revalue(node, depth) {
- var children = node.children, v = 0;
- if (children && (n = children.length)) {
- var i = -1, n, j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else if (value) {
- v = +value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth) || 0;
- }
- if (value) node.value = v;
- return v;
- }
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
- var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
- return hierarchy;
- };
- var d3_layout_hierarchyInline = false;
- d3.layout.pack = function() {
- function pack(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- root.x = 0;
- root.y = 0;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r = Math.sqrt(d.value);
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- var w = size[0], h = size[1], k = Math.max(2 * root.r / w, 2 * root.r / h);
- if (padding > 0) {
- var dr = padding * k / 2;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r += dr;
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- d3_layout_treeVisitAfter(root, function(d) {
- d.r -= dr;
- });
- k = Math.max(2 * root.r / w, 2 * root.r / h);
- }
- d3_layout_packTransform(root, w / 2, h / 2, 1 / k);
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ];
- pack.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return pack;
- };
- pack.padding = function(_) {
- if (!arguments.length) return padding;
- padding = +_;
- return pack;
- };
- return d3_layout_hierarchyRebind(pack, hierarchy);
- };
- d3.layout.cluster = function() {
- function cluster(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0, kx, ky;
- d3_layout_treeVisitAfter(root, function(node) {
- var children = node.children;
- if (children && children.length) {
- node.x = d3_layout_clusterX(children);
- node.y = d3_layout_clusterY(children);
- } else {
- node.x = previousNode ? x += separation(node, previousNode) : 0;
- node.y = 0;
- previousNode = node;
- }
- });
- var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- cluster.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return cluster;
- };
- cluster.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return cluster;
- };
- return d3_layout_hierarchyRebind(cluster, hierarchy);
- };
- d3.layout.tree = function() {
- function tree(d, i) {
- function firstWalk(node, previousSibling) {
- var children = node.children, layout = node._tree;
- if (children && (n = children.length)) {
- var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
- while (++i < n) {
- child = children[i];
- firstWalk(child, previousChild);
- ancestor = apportion(child, previousChild, ancestor);
- previousChild = child;
- }
- d3_layout_treeShift(node);
- var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- layout.mod = layout.prelim - midpoint;
- } else {
- layout.prelim = midpoint;
- }
- } else {
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- }
- }
- }
- function secondWalk(node, x) {
- node.x = node._tree.prelim + x;
- var children = node.children;
- if (children && (n = children.length)) {
- var i = -1, n;
- x += node._tree.mod;
- while (++i < n) {
- secondWalk(children[i], x);
- }
- }
- }
- function apportion(node, previousSibling, ancestor) {
- if (previousSibling) {
- var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
- while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
- vom = d3_layout_treeLeft(vom);
- vop = d3_layout_treeRight(vop);
- vop._tree.ancestor = node;
- shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
- if (shift > 0) {
- d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
- sip += shift;
- sop += shift;
- }
- sim += vim._tree.mod;
- sip += vip._tree.mod;
- som += vom._tree.mod;
- sop += vop._tree.mod;
- }
- if (vim && !d3_layout_treeRight(vop)) {
- vop._tree.thread = vim;
- vop._tree.mod += sim - sop;
- }
- if (vip && !d3_layout_treeLeft(vom)) {
- vom._tree.thread = vip;
- vom._tree.mod += sip - som;
- ancestor = node;
- }
- }
- return ancestor;
- }
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- d3_layout_treeVisitAfter(root, function(node, previousSibling) {
- node._tree = {
- ancestor: node,
- prelim: 0,
- mod: 0,
- change: 0,
- shift: 0,
- number: previousSibling ? previousSibling._tree.number + 1 : 0
- };
- });
- firstWalk(root);
- secondWalk(root, -root._tree.prelim);
- var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = node.depth / y1 * size[1];
- delete node._tree;
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- tree.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return tree;
- };
- tree.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return tree;
- };
- return d3_layout_hierarchyRebind(tree, hierarchy);
- };
- d3.layout.treemap = function() {
- function scale(children, k) {
- var i = -1, n = children.length, child, area;
- while (++i < n) {
- area = (child = children[i]).value * (k < 0 ? 0 : k);
- child.area = isNaN(area) || area <= 0 ? 0 : area;
- }
- }
- function squarify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = Math.min(rect.dx, rect.dy), n;
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while ((n = remaining.length) > 0) {
- row.push(child = remaining[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) {
- remaining.pop();
- best = score;
- } else {
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- children.forEach(squarify);
- }
- }
- function stickify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), remaining = children.slice(), child, row = [];
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while (child = remaining.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
- row.length = row.area = 0;
- }
- }
- children.forEach(stickify);
- }
- }
- function worst(row, u) {
- var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
- while (++i < n) {
- if (!(r = row[i].area)) continue;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
- }
- function position(row, u, rect, flush) {
- var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
- if (u == rect.dx) {
- if (flush || v > rect.dy) v = rect.dy;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x;
- rect.y += v;
- rect.dy -= v;
- } else {
- if (flush || v > rect.dx) v = rect.dx;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y;
- rect.x += v;
- rect.dx -= v;
- }
- }
- function treemap(d) {
- var nodes = stickies || hierarchy(d), root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale([ root ], root.dx * root.dy / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, ratio = .5 * (1 + Math.sqrt(5));
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
- treemap.padding = function(x) {
- function padFunction(node) {
- var p = x.call(treemap, node, node.depth);
- return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
- }
- function padConstant(node) {
- return d3_layout_treemapPad(node, x);
- }
- if (!arguments.length) return padding;
- var type;
- pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], padConstant) : padConstant;
- return treemap;
- };
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
- treemap.ratio = function(x) {
- if (!arguments.length) return ratio;
- ratio = x;
- return treemap;
- };
- return d3_layout_hierarchyRebind(treemap, hierarchy);
- };
- d3.csv = d3_dsv(",", "text/csv");
- d3.tsv = d3_dsv(" ", "text/tab-separated-values");
- d3.geo = {};
- var d3_geo_radians = Math.PI / 180;
- d3.geo.azimuthal = function() {
- function azimuthal(coordinates) {
- var x1 = coordinates[0] * d3_geo_radians - x0, y1 = coordinates[1] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1), cy1 = Math.cos(y1), sy1 = Math.sin(y1), cc = mode !== "orthographic" ? sy0 * sy1 + cy0 * cy1 * cx1 : null, c, k = mode === "stereographic" ? 1 / (1 + cc) : mode === "gnomonic" ? 1 / cc : mode === "equidistant" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0) : mode === "equalarea" ? Math.sqrt(2 / (1 + cc)) : 1, x = k * cy1 * sx1, y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var mode = "orthographic", origin, scale = 200, translate = [ 480, 250 ], x0, y0, cy0, sy0;
- azimuthal.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p = Math.sqrt(x * x + y * y), c = mode === "stereographic" ? 2 * Math.atan(p) : mode === "gnomonic" ? Math.atan(p) : mode === "equidistant" ? p : mode === "equalarea" ? 2 * Math.asin(.5 * p) : Math.asin(p), sc = Math.sin(c), cc = Math.cos(c);
- return [ (x0 + Math.atan2(x * sc, p * cy0 * cc + y * sy0 * sc)) / d3_geo_radians, Math.asin(cc * sy0 - (p ? y * sc * cy0 / p : 0)) / d3_geo_radians ];
- };
- azimuthal.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return azimuthal;
- };
- azimuthal.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- x0 = origin[0] * d3_geo_radians;
- y0 = origin[1] * d3_geo_radians;
- cy0 = Math.cos(y0);
- sy0 = Math.sin(y0);
- return azimuthal;
- };
- azimuthal.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return azimuthal;
- };
- azimuthal.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return azimuthal;
- };
- return azimuthal.origin([ 0, 0 ]);
- };
- d3.geo.albers = function() {
- function albers(coordinates) {
- var t = n * (d3_geo_radians * coordinates[0] - lng0), p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;
- return [ scale * p * Math.sin(t) + translate[0], scale * (p * Math.cos(t) - p0) + translate[1] ];
- }
- function reload() {
- var phi1 = d3_geo_radians * parallels[0], phi2 = d3_geo_radians * parallels[1], lat0 = d3_geo_radians * origin[1], s = Math.sin(phi1), c = Math.cos(phi1);
- lng0 = d3_geo_radians * origin[0];
- n = .5 * (s + Math.sin(phi2));
- C = c * c + 2 * n * s;
- p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;
- return albers;
- }
- var origin = [ -98, 38 ], parallels = [ 29.5, 45.5 ], scale = 1e3, translate = [ 480, 250 ], lng0, n, C, p0;
- albers.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p0y = p0 + y, t = Math.atan2(x, p0y), p = Math.sqrt(x * x + p0y * p0y);
- return [ (lng0 + t / n) / d3_geo_radians, Math.asin((C - p * p * n * n) / (2 * n)) / d3_geo_radians ];
- };
- albers.origin = function(x) {
- if (!arguments.length) return origin;
- origin = [ +x[0], +x[1] ];
- return reload();
- };
- albers.parallels = function(x) {
- if (!arguments.length) return parallels;
- parallels = [ +x[0], +x[1] ];
- return reload();
- };
- albers.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return albers;
- };
- albers.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return albers;
- };
- return reload();
- };
- d3.geo.albersUsa = function() {
- function albersUsa(coordinates) {
- var lon = coordinates[0], lat = coordinates[1];
- return (lat > 50 ? alaska : lon < -140 ? hawaii : lat < 21 ? puertoRico : lower48)(coordinates);
- }
- var lower48 = d3.geo.albers();
- var alaska = d3.geo.albers().origin([ -160, 60 ]).parallels([ 55, 65 ]);
- var hawaii = d3.geo.albers().origin([ -160, 20 ]).parallels([ 8, 18 ]);
- var puertoRico = d3.geo.albers().origin([ -60, 10 ]).parallels([ 8, 18 ]);
- albersUsa.scale = function(x) {
- if (!arguments.length) return lower48.scale();
- lower48.scale(x);
- alaska.scale(x * .6);
- hawaii.scale(x);
- puertoRico.scale(x * 1.5);
- return albersUsa.translate(lower48.translate());
- };
- albersUsa.translate = function(x) {
- if (!arguments.length) return lower48.translate();
- var dz = lower48.scale() / 1e3, dx = x[0], dy = x[1];
- lower48.translate(x);
- alaska.translate([ dx - 400 * dz, dy + 170 * dz ]);
- hawaii.translate([ dx - 190 * dz, dy + 200 * dz ]);
- puertoRico.translate([ dx + 580 * dz, dy + 430 * dz ]);
- return albersUsa;
- };
- return albersUsa.scale(lower48.scale());
- };
- d3.geo.bonne = function() {
- function bonne(coordinates) {
- var x = coordinates[0] * d3_geo_radians - x0, y = coordinates[1] * d3_geo_radians - y0;
- if (y1) {
- var p = c1 + y1 - y, E = x * Math.cos(y) / p;
- x = p * Math.sin(E);
- y = p * Math.cos(E) - c1;
- } else {
- x *= Math.cos(y);
- y *= -1;
- }
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 200, translate = [ 480, 250 ], x0, y0, y1, c1;
- bonne.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- if (y1) {
- var c = c1 + y, p = Math.sqrt(x * x + c * c);
- y = c1 + y1 - p;
- x = x0 + p * Math.atan2(x, c) / Math.cos(y);
- } else {
- y *= -1;
- x /= Math.cos(y);
- }
- return [ x / d3_geo_radians, y / d3_geo_radians ];
- };
- bonne.parallel = function(x) {
- if (!arguments.length) return y1 / d3_geo_radians;
- c1 = 1 / Math.tan(y1 = x * d3_geo_radians);
- return bonne;
- };
- bonne.origin = function(x) {
- if (!arguments.length) return [ x0 / d3_geo_radians, y0 / d3_geo_radians ];
- x0 = x[0] * d3_geo_radians;
- y0 = x[1] * d3_geo_radians;
- return bonne;
- };
- bonne.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return bonne;
- };
- bonne.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return bonne;
- };
- return bonne.origin([ 0, 0 ]).parallel(45);
- };
- d3.geo.equirectangular = function() {
- function equirectangular(coordinates) {
- var x = coordinates[0] / 360, y = -coordinates[1] / 360;
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- equirectangular.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, -360 * y ];
- };
- equirectangular.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return equirectangular;
- };
- equirectangular.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return equirectangular;
- };
- return equirectangular;
- };
- d3.geo.mercator = function() {
- function mercator(coordinates) {
- var x = coordinates[0] / 360, y = -(Math.log(Math.tan(Math.PI / 4 + coordinates[1] * d3_geo_radians / 2)) / d3_geo_radians) / 360;
- return [ scale * x + translate[0], scale * Math.max(-.5, Math.min(.5, y)) + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- mercator.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, 2 * Math.atan(Math.exp(-360 * y * d3_geo_radians)) / d3_geo_radians - 90 ];
- };
- mercator.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return mercator;
- };
- mercator.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return mercator;
- };
- return mercator;
- };
- d3.geo.path = function() {
- function path(d, i) {
- if (typeof pointRadius === "function") pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
- pathType(d);
- var result = buffer.length ? buffer.join("") : null;
- buffer = [];
- return result;
- }
- function project(coordinates) {
- return projection(coordinates).join(",");
- }
- function polygonArea(coordinates) {
- var sum = area(coordinates[0]), i = 0, n = coordinates.length;
- while (++i < n) sum -= area(coordinates[i]);
- return sum;
- }
- function polygonCentroid(coordinates) {
- var polygon = d3.geom.polygon(coordinates[0].map(projection)), area = polygon.area(), centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1), x = centroid[0], y = centroid[1], z = area, i = 0, n = coordinates.length;
- while (++i < n) {
- polygon = d3.geom.polygon(coordinates[i].map(projection));
- area = polygon.area();
- centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1);
- x -= centroid[0];
- y -= centroid[1];
- z -= area;
- }
- return [ x, y, 6 * z ];
- }
- function area(coordinates) {
- return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());
- }
- var pointRadius = 4.5, pointCircle = d3_path_circle(pointRadius), projection = d3.geo.albersUsa(), buffer = [];
- var pathType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features, i = -1, n = features.length;
- while (++i < n) buffer.push(pathType(features[i].geometry));
- },
- Feature: function(o) {
- pathType(o.geometry);
- },
- Point: function(o) {
- buffer.push("M", project(o.coordinates), pointCircle);
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) buffer.push("M", project(coordinates[i]), pointCircle);
- },
- LineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- buffer.push("M");
- while (++i < n) buffer.push(project(coordinates[i]), "L");
- buffer.pop();
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer.pop();
- }
- },
- Polygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- if ((m = subcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m, subsubcoordinates, k, p;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- while (++j < m) {
- subsubcoordinates = subcoordinates[j];
- k = -1;
- if ((p = subsubcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++k < p) buffer.push(project(subsubcoordinates[k]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- }
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) buffer.push(pathType(geometries[i]));
- }
- });
- var areaType = path.area = d3_geo_type({
- FeatureCollection: function(o) {
- var area = 0, features = o.features, i = -1, n = features.length;
- while (++i < n) area += areaType(features[i]);
- return area;
- },
- Feature: function(o) {
- return areaType(o.geometry);
- },
- Polygon: function(o) {
- return polygonArea(o.coordinates);
- },
- MultiPolygon: function(o) {
- var sum = 0, coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) sum += polygonArea(coordinates[i]);
- return sum;
- },
- GeometryCollection: function(o) {
- var sum = 0, geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) sum += areaType(geometries[i]);
- return sum;
- }
- }, 0);
- var centroidType = path.centroid = d3_geo_type({
- Feature: function(o) {
- return centroidType(o.geometry);
- },
- Polygon: function(o) {
- var centroid = polygonCentroid(o.coordinates);
- return [ centroid[0] / centroid[2], centroid[1] / centroid[2] ];
- },
- MultiPolygon: function(o) {
- var area = 0, coordinates = o.coordinates, centroid, x = 0, y = 0, z = 0, i = -1, n = coordinates.length;
- while (++i < n) {
- centroid = polygonCentroid(coordinates[i]);
- x += centroid[0];
- y += centroid[1];
- z += centroid[2];
- }
- return [ x / z, y / z ];
- }
- });
- path.projection = function(x) {
- projection = x;
- return path;
- };
- path.pointRadius = function(x) {
- if (typeof x === "function") pointRadius = x; else {
- pointRadius = +x;
- pointCircle = d3_path_circle(pointRadius);
- }
- return path;
- };
- return path;
- };
- d3.geo.bounds = function(feature) {
- var left = Infinity, bottom = Infinity, right = -Infinity, top = -Infinity;
- d3_geo_bounds(feature, function(x, y) {
- if (x < left) left = x;
- if (x > right) right = x;
- if (y < bottom) bottom = y;
- if (y > top) top = y;
- });
- return [ [ left, bottom ], [ right, top ] ];
- };
- var d3_geo_boundsTypes = {
- Feature: d3_geo_boundsFeature,
- FeatureCollection: d3_geo_boundsFeatureCollection,
- GeometryCollection: d3_geo_boundsGeometryCollection,
- LineString: d3_geo_boundsLineString,
- MultiLineString: d3_geo_boundsMultiLineString,
- MultiPoint: d3_geo_boundsLineString,
- MultiPolygon: d3_geo_boundsMultiPolygon,
- Point: d3_geo_boundsPoint,
- Polygon: d3_geo_boundsPolygon
- };
- d3.geo.circle = function() {
- function circle() {}
- function visible(point) {
- return arc.distance(point) < radians;
- }
- function clip(coordinates) {
- var i = -1, n = coordinates.length, clipped = [], p0, p1, p2, d0, d1;
- while (++i < n) {
- d1 = arc.distance(p2 = coordinates[i]);
- if (d1 < radians) {
- if (p1) clipped.push(d3_geo_greatArcInterpolate(p1, p2)((d0 - radians) / (d0 - d1)));
- clipped.push(p2);
- p0 = p1 = null;
- } else {
- p1 = p2;
- if (!p0 && clipped.length) {
- clipped.push(d3_geo_greatArcInterpolate(clipped[clipped.length - 1], p1)((radians - d0) / (d1 - d0)));
- p0 = p1;
- }
- }
- d0 = d1;
- }
- p0 = coordinates[0];
- p1 = clipped[0];
- if (p1 && p2[0] === p0[0] && p2[1] === p0[1] && !(p2[0] === p1[0] && p2[1] === p1[1])) {
- clipped.push(p1);
- }
- return resample(clipped);
- }
- function resample(coordinates) {
- var i = 0, n = coordinates.length, j, m, resampled = n ? [ coordinates[0] ] : coordinates, resamples, origin = arc.source();
- while (++i < n) {
- resamples = arc.source(coordinates[i - 1])(coordinates[i]).coordinates;
- for (j = 0, m = resamples.length; ++j < m; ) resampled.push(resamples[j]);
- }
- arc.source(origin);
- return resampled;
- }
- var origin = [ 0, 0 ], degrees = 90 - .01, radians = degrees * d3_geo_radians, arc = d3.geo.greatArc().source(origin).target(d3_identity);
- circle.clip = function(d) {
- if (typeof origin === "function") arc.source(origin.apply(this, arguments));
- return clipType(d) || null;
- };
- var clipType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features.map(clipType).filter(d3_identity);
- return features && (o = Object.create(o), o.features = features, o);
- },
- Feature: function(o) {
- var geometry = clipType(o.geometry);
- return geometry && (o = Object.create(o), o.geometry = geometry, o);
- },
- Point: function(o) {
- return visible(o.coordinates) && o;
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates.filter(visible);
- return coordinates.length && {
- type: o.type,
- coordinates: coordinates
- };
- },
- LineString: function(o) {
- var coordinates = clip(o.coordinates);
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates.map(clip).filter(function(d) {
- return d.length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- Polygon: function(o) {
- var coordinates = o.coordinates.map(clip);
- return coordinates[0].length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates.map(function(d) {
- return d.map(clip);
- }).filter(function(d) {
- return d[0].length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries.map(clipType).filter(d3_identity);
- return geometries.length && (o = Object.create(o), o.geometries = geometries, o);
- }
- });
- circle.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- if (typeof origin !== "function") arc.source(origin);
- return circle;
- };
- circle.angle = function(x) {
- if (!arguments.length) return degrees;
- radians = (degrees = +x) * d3_geo_radians;
- return circle;
- };
- return d3.rebind(circle, arc, "precision");
- };
- d3.geo.greatArc = function() {
- function greatArc() {
- var d = greatArc.distance.apply(this, arguments), t = 0, dt = precision / d, coordinates = [ p0 ];
- while ((t += dt) < 1) coordinates.push(interpolate(t));
- coordinates.push(p1);
- return {
- type: "LineString",
- coordinates: coordinates
- };
- }
- var source = d3_geo_greatArcSource, p0, target = d3_geo_greatArcTarget, p1, precision = 6 * d3_geo_radians, interpolate = d3_geo_greatArcInterpolator();
- greatArc.distance = function() {
- if (typeof source === "function") interpolate.source(p0 = source.apply(this, arguments));
- if (typeof target === "function") interpolate.target(p1 = target.apply(this, arguments));
- return interpolate.distance();
- };
- greatArc.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- if (typeof source !== "function") interpolate.source(p0 = source);
- return greatArc;
- };
- greatArc.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- if (typeof target !== "function") interpolate.target(p1 = target);
- return greatArc;
- };
- greatArc.precision = function(_) {
- if (!arguments.length) return precision / d3_geo_radians;
- precision = _ * d3_geo_radians;
- return greatArc;
- };
- return greatArc;
- };
- d3.geo.greatCircle = d3.geo.circle;
- d3.geom = {};
- d3.geom.contour = function(grid, start) {
- var s = start || d3_geom_contourStart(grid), c = [], x = s[0], y = s[1], dx = 0, dy = 0, pdx = NaN, pdy = NaN, i = 0;
- do {
- i = 0;
- if (grid(x - 1, y - 1)) i += 1;
- if (grid(x, y - 1)) i += 2;
- if (grid(x - 1, y)) i += 4;
- if (grid(x, y)) i += 8;
- if (i === 6) {
- dx = pdy === -1 ? -1 : 1;
- dy = 0;
- } else if (i === 9) {
- dx = 0;
- dy = pdx === 1 ? -1 : 1;
- } else {
- dx = d3_geom_contourDx[i];
- dy = d3_geom_contourDy[i];
- }
- if (dx != pdx && dy != pdy) {
- c.push([ x, y ]);
- pdx = dx;
- pdy = dy;
- }
- x += dx;
- y += dy;
- } while (s[0] != x || s[1] != y);
- return c;
- };
- var d3_geom_contourDx = [ 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 0, 0, -1, 0, -1, NaN ], d3_geom_contourDy = [ 0, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 1, 0, -1, 0, NaN ];
- d3.geom.hull = function(vertices) {
- if (vertices.length < 3) return [];
- var len = vertices.length, plen = len - 1, points = [], stack = [], i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
- for (i = 1; i < len; ++i) {
- if (vertices[i][1] < vertices[h][1]) {
- h = i;
- } else if (vertices[i][1] == vertices[h][1]) {
- h = vertices[i][0] < vertices[h][0] ? i : h;
- }
- }
- for (i = 0; i < len; ++i) {
- if (i === h) continue;
- y1 = vertices[i][1] - vertices[h][1];
- x1 = vertices[i][0] - vertices[h][0];
- points.push({
- angle: Math.atan2(y1, x1),
- index: i
- });
- }
- points.sort(function(a, b) {
- return a.angle - b.angle;
- });
- a = points[0].angle;
- v = points[0].index;
- u = 0;
- for (i = 1; i < plen; ++i) {
- j = points[i].index;
- if (a == points[i].angle) {
- x1 = vertices[v][0] - vertices[h][0];
- y1 = vertices[v][1] - vertices[h][1];
- x2 = vertices[j][0] - vertices[h][0];
- y2 = vertices[j][1] - vertices[h][1];
- if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
- points[i].index = -1;
- } else {
- points[u].index = -1;
- a = points[i].angle;
- u = i;
- v = j;
- }
- } else {
- a = points[i].angle;
- u = i;
- v = j;
- }
- }
- stack.push(h);
- for (i = 0, j = 0; i < 2; ++j) {
- if (points[j].index !== -1) {
- stack.push(points[j].index);
- i++;
- }
- }
- sp = stack.length;
- for (; j < plen; ++j) {
- if (points[j].index === -1) continue;
- while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
- --sp;
- }
- stack[sp++] = points[j].index;
- }
- var poly = [];
- for (i = 0; i < sp; ++i) {
- poly.push(vertices[stack[i]]);
- }
- return poly;
- };
- d3.geom.polygon = function(coordinates) {
- coordinates.area = function() {
- var i = 0, n = coordinates.length, a = coordinates[n - 1][0] * coordinates[0][1], b = coordinates[n - 1][1] * coordinates[0][0];
- while (++i < n) {
- a += coordinates[i - 1][0] * coordinates[i][1];
- b += coordinates[i - 1][1] * coordinates[i][0];
- }
- return (b - a) * .5;
- };
- coordinates.centroid = function(k) {
- var i = -1, n = coordinates.length, x = 0, y = 0, a, b = coordinates[n - 1], c;
- if (!arguments.length) k = -1 / (6 * coordinates.area());
- while (++i < n) {
- a = b;
- b = coordinates[i];
- c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
- return [ x * k, y * k ];
- };
- coordinates.clip = function(subject) {
- var input, i = -1, n = coordinates.length, j, m, a = coordinates[n - 1], b, c, d;
- while (++i < n) {
- input = subject.slice();
- subject.length = 0;
- b = coordinates[i];
- c = input[(m = input.length) - 1];
- j = -1;
- while (++j < m) {
- d = input[j];
- if (d3_geom_polygonInside(d, a, b)) {
- if (!d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- subject.push(d);
- } else if (d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- c = d;
- }
- a = b;
- }
- return subject;
- };
- return coordinates;
- };
- d3.geom.voronoi = function(vertices) {
- var polygons = vertices.map(function() {
- return [];
- });
- d3_voronoi_tessellate(vertices, function(e) {
- var s1, s2, x1, x2, y1, y2;
- if (e.a === 1 && e.b >= 0) {
- s1 = e.ep.r;
- s2 = e.ep.l;
- } else {
- s1 = e.ep.l;
- s2 = e.ep.r;
- }
- if (e.a === 1) {
- y1 = s1 ? s1.y : -1e6;
- x1 = e.c - e.b * y1;
- y2 = s2 ? s2.y : 1e6;
- x2 = e.c - e.b * y2;
- } else {
- x1 = s1 ? s1.x : -1e6;
- y1 = e.c - e.a * x1;
- x2 = s2 ? s2.x : 1e6;
- y2 = e.c - e.a * x2;
- }
- var v1 = [ x1, y1 ], v2 = [ x2, y2 ];
- polygons[e.region.l.index].push(v1, v2);
- polygons[e.region.r.index].push(v1, v2);
- });
- return polygons.map(function(polygon, i) {
- var cx = vertices[i][0], cy = vertices[i][1];
- polygon.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- return polygon.sort(function(a, b) {
- return a.angle - b.angle;
- }).filter(function(d, i) {
- return !i || d.angle - polygon[i - 1].angle > 1e-10;
- });
- });
- };
- var d3_voronoi_opposite = {
- l: "r",
- r: "l"
- };
- d3.geom.delaunay = function(vertices) {
- var edges = vertices.map(function() {
- return [];
- }), triangles = [];
- d3_voronoi_tessellate(vertices, function(e) {
- edges[e.region.l.index].push(vertices[e.region.r.index]);
- });
- edges.forEach(function(edge, i) {
- var v = vertices[i], cx = v[0], cy = v[1];
- edge.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- edge.sort(function(a, b) {
- return a.angle - b.angle;
- });
- for (var j = 0, m = edge.length - 1; j < m; j++) {
- triangles.push([ v, edge[j], edge[j + 1] ]);
- }
- });
- return triangles;
- };
- d3.geom.quadtree = function(points, x1, y1, x2, y2) {
- function insert(n, p, x1, y1, x2, y2) {
- if (isNaN(p.x) || isNaN(p.y)) return;
- if (n.leaf) {
- var v = n.point;
- if (v) {
- if (Math.abs(v.x - p.x) + Math.abs(v.y - p.y) < .01) {
- insertChild(n, p, x1, y1, x2, y2);
- } else {
- n.point = null;
- insertChild(n, v, x1, y1, x2, y2);
- insertChild(n, p, x1, y1, x2, y2);
- }
- } else {
- n.point = p;
- }
- } else {
- insertChild(n, p, x1, y1, x2, y2);
- }
- }
- function insertChild(n, p, x1, y1, x2, y2) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = p.x >= sx, bottom = p.y >= sy, i = (bottom << 1) + right;
- n.leaf = false;
- n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
- if (right) x1 = sx; else x2 = sx;
- if (bottom) y1 = sy; else y2 = sy;
- insert(n, p, x1, y1, x2, y2);
- }
- var p, i = -1, n = points.length;
- if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);
- if (arguments.length < 5) {
- if (arguments.length === 3) {
- y2 = x2 = y1;
- y1 = x1;
- } else {
- x1 = y1 = Infinity;
- x2 = y2 = -Infinity;
- while (++i < n) {
- p = points[i];
- if (p.x < x1) x1 = p.x;
- if (p.y < y1) y1 = p.y;
- if (p.x > x2) x2 = p.x;
- if (p.y > y2) y2 = p.y;
- }
- var dx = x2 - x1, dy = y2 - y1;
- if (dx > dy) y2 = y1 + dx; else x2 = x1 + dy;
- }
- }
- var root = d3_geom_quadtreeNode();
- root.add = function(p) {
- insert(root, p, x1, y1, x2, y2);
- };
- root.visit = function(f) {
- d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
- };
- points.forEach(root.add);
- return root;
- };
- d3.time = {};
- var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
- d3_time_utc.prototype = {
- getDate: function() {
- return this._.getUTCDate();
- },
- getDay: function() {
- return this._.getUTCDay();
- },
- getFullYear: function() {
- return this._.getUTCFullYear();
- },
- getHours: function() {
- return this._.getUTCHours();
- },
- getMilliseconds: function() {
- return this._.getUTCMilliseconds();
- },
- getMinutes: function() {
- return this._.getUTCMinutes();
- },
- getMonth: function() {
- return this._.getUTCMonth();
- },
- getSeconds: function() {
- return this._.getUTCSeconds();
- },
- getTime: function() {
- return this._.getTime();
- },
- getTimezoneOffset: function() {
- return 0;
- },
- valueOf: function() {
- return this._.valueOf();
- },
- setDate: function() {
- d3_time_prototype.setUTCDate.apply(this._, arguments);
- },
- setDay: function() {
- d3_time_prototype.setUTCDay.apply(this._, arguments);
- },
- setFullYear: function() {
- d3_time_prototype.setUTCFullYear.apply(this._, arguments);
- },
- setHours: function() {
- d3_time_prototype.setUTCHours.apply(this._, arguments);
- },
- setMilliseconds: function() {
- d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
- },
- setMinutes: function() {
- d3_time_prototype.setUTCMinutes.apply(this._, arguments);
- },
- setMonth: function() {
- d3_time_prototype.setUTCMonth.apply(this._, arguments);
- },
- setSeconds: function() {
- d3_time_prototype.setUTCSeconds.apply(this._, arguments);
- },
- setTime: function() {
- d3_time_prototype.setTime.apply(this._, arguments);
- }
- };
- var d3_time_prototype = Date.prototype;
- var d3_time_formatDateTime = "%a %b %e %H:%M:%S %Y", d3_time_formatDate = "%m/%d/%y", d3_time_formatTime = "%H:%M:%S";
- var d3_time_days = d3_time_daySymbols, d3_time_dayAbbreviations = d3_time_days.map(d3_time_formatAbbreviate), d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = d3_time_months.map(d3_time_formatAbbreviate);
- d3.time.format = function(template) {
- function format(date) {
- var string = [], i = -1, j = 0, c, f;
- while (++i < n) {
- if (template.charCodeAt(i) == 37) {
- string.push(template.substring(j, i), (f = d3_time_formats[c = template.charAt(++i)]) ? f(date) : c);
- j = i + 1;
- }
- }
- string.push(template.substring(j, i));
- return string.join("");
- }
- var n = template.length;
- format.parse = function(string) {
- var d = {
- y: 1900,
- m: 0,
- d: 1,
- H: 0,
- M: 0,
- S: 0,
- L: 0
- }, i = d3_time_parse(d, template, string, 0);
- if (i != string.length) return null;
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
- var date = new d3_time;
- date.setFullYear(d.y, d.m, d.d);
- date.setHours(d.H, d.M, d.S, d.L);
- return date;
- };
- format.toString = function() {
- return template;
- };
- return format;
- };
- var d3_time_zfill2 = d3.format("02d"), d3_time_zfill3 = d3.format("03d"), d3_time_zfill4 = d3.format("04d"), d3_time_sfill2 = d3.format("2d");
- var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations);
- var d3_time_formats = {
- a: function(d) {
- return d3_time_dayAbbreviations[d.getDay()];
- },
- A: function(d) {
- return d3_time_days[d.getDay()];
- },
- b: function(d) {
- return d3_time_monthAbbreviations[d.getMonth()];
- },
- B: function(d) {
- return d3_time_months[d.getMonth()];
- },
- c: d3.time.format(d3_time_formatDateTime),
- d: function(d) {
- return d3_time_zfill2(d.getDate());
- },
- e: function(d) {
- return d3_time_sfill2(d.getDate());
- },
- H: function(d) {
- return d3_time_zfill2(d.getHours());
- },
- I: function(d) {
- return d3_time_zfill2(d.getHours() % 12 || 12);
- },
- j: function(d) {
- return d3_time_zfill3(1 + d3.time.dayOfYear(d));
- },
- L: function(d) {
- return d3_time_zfill3(d.getMilliseconds());
- },
- m: function(d) {
- return d3_time_zfill2(d.getMonth() + 1);
- },
- M: function(d) {
- return d3_time_zfill2(d.getMinutes());
- },
- p: function(d) {
- return d.getHours() >= 12 ? "PM" : "AM";
- },
- S: function(d) {
- return d3_time_zfill2(d.getSeconds());
- },
- U: function(d) {
- return d3_time_zfill2(d3.time.sundayOfYear(d));
- },
- w: function(d) {
- return d.getDay();
- },
- W: function(d) {
- return d3_time_zfill2(d3.time.mondayOfYear(d));
- },
- x: d3.time.format(d3_time_formatDate),
- X: d3.time.format(d3_time_formatTime),
- y: function(d) {
- return d3_time_zfill2(d.getFullYear() % 100);
- },
- Y: function(d) {
- return d3_time_zfill4(d.getFullYear() % 1e4);
- },
- Z: d3_time_zone,
- "%": function(d) {
- return "%";
- }
- };
- var d3_time_parsers = {
- a: d3_time_parseWeekdayAbbrev,
- A: d3_time_parseWeekday,
- b: d3_time_parseMonthAbbrev,
- B: d3_time_parseMonth,
- c: d3_time_parseLocaleFull,
- d: d3_time_parseDay,
- e: d3_time_parseDay,
- H: d3_time_parseHour24,
- I: d3_time_parseHour24,
- L: d3_time_parseMilliseconds,
- m: d3_time_parseMonthNumber,
- M: d3_time_parseMinutes,
- p: d3_time_parseAmPm,
- S: d3_time_parseSeconds,
- x: d3_time_parseLocaleDate,
- X: d3_time_parseLocaleTime,
- y: d3_time_parseYear,
- Y: d3_time_parseFullYear
- };
- var d3_time_numberRe = /^\s*\d+/;
- var d3_time_amPmLookup = d3.map({
- am: 0,
- pm: 1
- });
- d3.time.format.utc = function(template) {
- function format(date) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time;
- utc._ = date;
- return local(utc);
- } finally {
- d3_time = Date;
- }
- }
- var local = d3.time.format(template);
- format.parse = function(string) {
- try {
- d3_time = d3_time_utc;
- var date = local.parse(string);
- return date && date._;
- } finally {
- d3_time = Date;
- }
- };
- format.toString = local.toString;
- return format;
- };
- var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
- d3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;
- d3_time_formatIsoNative.parse = function(string) {
- var date = new Date(string);
- return isNaN(date) ? null : date;
- };
- d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
- d3.time.second = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 1e3) * 1e3);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 1e3);
- }, function(date) {
- return date.getSeconds();
- });
- d3.time.seconds = d3.time.second.range;
- d3.time.seconds.utc = d3.time.second.utc.range;
- d3.time.minute = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 6e4) * 6e4);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 6e4);
- }, function(date) {
- return date.getMinutes();
- });
- d3.time.minutes = d3.time.minute.range;
- d3.time.minutes.utc = d3.time.minute.utc.range;
- d3.time.hour = d3_time_interval(function(date) {
- var timezone = date.getTimezoneOffset() / 60;
- return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 36e5);
- }, function(date) {
- return date.getHours();
- });
- d3.time.hours = d3.time.hour.range;
- d3.time.hours.utc = d3.time.hour.utc.range;
- d3.time.day = d3_time_interval(function(date) {
- var day = new d3_time(1970, 0);
- day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- return day;
- }, function(date, offset) {
- date.setDate(date.getDate() + offset);
- }, function(date) {
- return date.getDate() - 1;
- });
- d3.time.days = d3.time.day.range;
- d3.time.days.utc = d3.time.day.utc.range;
- d3.time.dayOfYear = function(date) {
- var year = d3.time.year(date);
- return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
- };
- d3_time_daySymbols.forEach(function(day, i) {
- day = day.toLowerCase();
- i = 7 - i;
- var interval = d3.time[day] = d3_time_interval(function(date) {
- (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
- return date;
- }, function(date, offset) {
- date.setDate(date.getDate() + Math.floor(offset) * 7);
- }, function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
- });
- d3.time[day + "s"] = interval.range;
- d3.time[day + "s"].utc = interval.utc.range;
- d3.time[day + "OfYear"] = function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);
- };
- });
- d3.time.week = d3.time.sunday;
- d3.time.weeks = d3.time.sunday.range;
- d3.time.weeks.utc = d3.time.sunday.utc.range;
- d3.time.weekOfYear = d3.time.sundayOfYear;
- d3.time.month = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setDate(1);
- return date;
- }, function(date, offset) {
- date.setMonth(date.getMonth() + offset);
- }, function(date) {
- return date.getMonth();
- });
- d3.time.months = d3.time.month.range;
- d3.time.months.utc = d3.time.month.utc.range;
- d3.time.year = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setMonth(0, 1);
- return date;
- }, function(date, offset) {
- date.setFullYear(date.getFullYear() + offset);
- }, function(date) {
- return date.getFullYear();
- });
- d3.time.years = d3.time.year.range;
- d3.time.years.utc = d3.time.year.utc.range;
- var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
- var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ];
- var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), function(d) {
- return true;
- } ], [ d3.time.format("%B"), function(d) {
- return d.getMonth();
- } ], [ d3.time.format("%b %d"), function(d) {
- return d.getDate() != 1;
- } ], [ d3.time.format("%a %d"), function(d) {
- return d.getDay() && d.getDate() != 1;
- } ], [ d3.time.format("%I %p"), function(d) {
- return d.getHours();
- } ], [ d3.time.format("%I:%M"), function(d) {
- return d.getMinutes();
- } ], [ d3.time.format(":%S"), function(d) {
- return d.getSeconds();
- } ], [ d3.time.format(".%L"), function(d) {
- return d.getMilliseconds();
- } ] ];
- var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
- d3_time_scaleLocalMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
- };
- d3.time.scale = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
- };
- var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
- return [ m[0].utc, m[1] ];
- });
- var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), function(d) {
- return true;
- } ], [ d3.time.format.utc("%B"), function(d) {
- return d.getUTCMonth();
- } ], [ d3.time.format.utc("%b %d"), function(d) {
- return d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%a %d"), function(d) {
- return d.getUTCDay() && d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%I %p"), function(d) {
- return d.getUTCHours();
- } ], [ d3.time.format.utc("%I:%M"), function(d) {
- return d.getUTCMinutes();
- } ], [ d3.time.format.utc(":%S"), function(d) {
- return d.getUTCSeconds();
- } ], [ d3.time.format.utc(".%L"), function(d) {
- return d.getUTCMilliseconds();
- } ] ];
- var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
- d3_time_scaleUTCMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);
- };
- d3.time.scale.utc = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
- };
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.min.js
deleted file mode 100644
index cc47f1ea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){function e(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function t(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function n(e){return Array.prototype.slice.call(e)}function r(){}function i(e){return e}function s(){return this}function o(){return!0}function u(e){return typeof e=="function"?e:function(){return e}}function a(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function f(e){return e!=null&&!isNaN(e)}function l(e){return e.length}function c(e){return e==null}function h(e){return e.trim().replace(/\s+/g," ")}function p(e){var t=1;while(e*t%1)t*=10;return t}function d(){}function v(e){function t(){var t=n,r=-1,i=t.length,s;while(++r<i)(s=t[r].on)&&s.apply(this,arguments);return e}var n=[],i=new r;return t.on=function(t,r){var s=i.get(t),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)},t}function m(e,t){return t-(e?1+Math.floor(Math.log(e+Math.pow(10,1+Math.floor(Math.log(e)/Math.LN10)-t))/Math.LN10):1)}function g(e){return e+""}function y(e){var t=e.lastIndexOf("."),n=t>=0?e.substring(t):(t=e.length,""),r=[];while(t>0)r.push(e.substring(t-=3,t+3));return r.reverse().join(",")+n}function b(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function w(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function E(e){return function(t){return 1-e(1-t)}}function S(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function x(e){return e}function T(e){return function(t){return Math.pow(t,e)}}function N(e){return 1-Math.cos(e*Math.PI/2)}function C(e){return Math.pow(2,10*(e-1))}function k(e){return 1-Math.sqrt(1-e*e)}function L(e,t){var n;return arguments.length<2&&(t=.45),arguments.length<1?(e=1,n=t/4):n=t/(2*Math.PI)*Math.asin(1/e),function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*Math.PI/t)}}function A(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function O(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function M(){d3.event.stopPropagation(),d3.event.preventDefault()}function _(){var e=d3.event,t;while(t=e.sourceEvent)e=t;return e}function D(e){var t=new d,n=0,r=arguments.length;while(++n<r)t[arguments[n]]=v(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=d3.event;i.target=e,d3.event=i,t[i.type].apply(n,r)}finally{d3.event=s}}},t}function P(e){var t=[e.a,e.b],n=[e.c,e.d],r=B(t),i=H(t,n),s=B(j(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*fs,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*fs:0}function H(e,t){return e[0]*t[0]+e[1]*t[1]}function B(e){var t=Math.sqrt(H(e,e));return t&&(e[0]/=t,e[1]/=t),t}function j(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function F(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function I(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function q(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function R(e,t,n){return new U(e,t,n)}function U(e,t,n){this.r=e,this.g=t,this.b=n}function z(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function W(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(J(u[0]),J(u[1]),J(u[2]))}}return(a=hs.get(e))?t(a.r,a.g,a.b):(e!=null&&e.charAt(0)==="#"&&(e.length===4?(r=e.charAt(1),r+=r,i=e.charAt(2),i+=i,s=e.charAt(3),s+=s):e.length===7&&(r=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7)),r=parseInt(r,16),i=parseInt(i,16),s=parseInt(s,16)),t(r,i,s))}function X(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;return s?(u=a<.5?s/(i+r):s/(2-i-r),e==i?o=(t-n)/s+(t<n?6:0):t==i?o=(n-e)/s+2:o=(e-t)/s+4,o*=60):u=o=0,K(o,u,a)}function V(e,t,n){e=$(e),t=$(t),n=$(n);var r=ot((.4124564*e+.3575761*t+.1804375*n)/ds),i=ot((.2126729*e+.7151522*t+.072175*n)/vs),s=ot((.0193339*e+.119192*t+.9503041*n)/ms);return tt(116*i-16,500*(r-i),200*(i-s))}function $(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function J(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function K(e,t,n){return new Q(e,t,n)}function Q(e,t,n){this.h=e,this.s=t,this.l=n}function G(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?s+(o-s)*e/60:e<180?o:e<240?s+(o-s)*(240-e)/60:s}function i(e){return Math.round(r(e)*255)}var s,o;return e%=360,e<0&&(e+=360),t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o,R(i(e+120),i(e),i(e-120))}function Y(e,t,n){return new Z(e,t,n)}function Z(e,t,n){this.h=e,this.c=t,this.l=n}function et(e,t,n){return tt(n,Math.cos(e*=Math.PI/180)*t,Math.sin(e)*t)}function tt(e,t,n){return new nt(e,t,n)}function nt(e,t,n){this.l=e,this.a=t,this.b=n}function rt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=st(i)*ds,r=st(r)*vs,s=st(s)*ms,R(ut(3.2404542*i-1.5371385*r-.4985314*s),ut(-0.969266*i+1.8760108*r+.041556*s),ut(.0556434*i-.2040259*r+1.0572252*s))}function it(e,t,n){return Y(Math.atan2(n,t)/Math.PI*180,Math.sqrt(t*t+n*n),e)}function st(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ut(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e){return Ki(e,Ss),e}function ft(e){return function(){return gs(e,this)}}function lt(e){return function(){return ys(e,this)}}function ct(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=d3.ns.qualify(e),t==null?e.local?r:n:typeof t=="function"?e.local?u:o:e.local?s:i}function ht(e){return new RegExp("(?:^|\\s+)"+d3.requote(e)+"(?:\\s+|$)","g")}function pt(e,t){function n(){var n=-1;while(++n<i)e[n](this,t)}function r(){var n=-1,r=t.apply(this,arguments);while(++n<i)e[n](this,r)}e=e.trim().split(/\s+/).map(dt);var i=e.length;return typeof t=="function"?r:n}function dt(e){var t=ht(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.className,s=i.baseVal!=null,o=s?i.baseVal:i;r?(t.lastIndex=0,t.test(o)||(o=h(o+" "+e),s?i.baseVal=o:n.className=o)):o&&(o=h(o.replace(t," ")),s?i.baseVal=o:n.className=o)}}function vt(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return t==null?r:typeof t=="function"?s:i}function mt(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}return t==null?n:typeof t=="function"?i:r}function gt(e){return{__data__:e}}function yt(e){return function(){return Es(this,e)}}function bt(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function wt(e,t,n){function r(){var t=this[s];t&&(this.removeEventListener(e,t,t.$),delete this[s])}function i(){function i(e){var n=d3.event;d3.event=e,u[0]=o.__data__;try{t.apply(o,u)}finally{d3.event=n}}var o=this,u=arguments;r.call(this),this.addEventListener(e,this[s]=i,i.$=n),i._=t}var s="__on"+e,o=e.indexOf(".");return o>0&&(e=e.substring(0,o)),t?i:r}function Et(e,t){for(var n=0,r=e.length;n<r;n++)for(var i=e[n],s=0,o=i.length,u;s<o;s++)(u=i[s])&&t(u,s,n);return e}function St(e){return Ki(e,Ts),e}function xt(e,t,n){Ki(e,Ns);var i=new r,s=d3.dispatch("start","end"),o=Ds;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?i.get(t):(n==null?i.remove(t):i.set(t,n),e)},e.ease=function(t){return arguments.length?(o=typeof t=="function"?t:d3.ease.apply(d3,arguments),e):o},e.each=function(t,n){return arguments.length<2?Tt.call(e,t):(s.on(t,n),e)},d3.timer(function(r){return Et(e,function(e,u,a){function f(r){return v.active>t?c():(v.active=t,i.forEach(function(t,n){(n=n.call(e,m,u))&&h.push(n)}),s.start.call(e,m,u),l(r)||d3.timer(l,0,n),1)}function l(n){if(v.active!==t)return c();var r=(n-p)/d,i=o(r),a=h.length;while(a>0)h[--a].call(e,i);if(r>=1)return c(),ks=t,s.end.call(e,m,u),ks=0,1}function c(){return--v.count||delete e.__transition__,1}var h=[],p=e.delay,d=e.duration,v=(e=e.node).__transition__||(e.__transition__={active:0,count:0}),m=e.__data__;++v.count,p<=r?f(r):d3.timer(f,p,n)})},0,n),e}function Tt(e){var t=ks,n=Ds,r=Ms,i=_s;return ks=this.id,Ds=this.ease(),Et(this,function(t,n,r){Ms=t.delay,_s=t.duration,e.call(t=t.node,t.__data__,n,r)}),ks=t,Ds=n,Ms=r,_s=i,this}function Nt(e,t,n){return n!=""&&Ps}function Ct(e,t){return d3.tween(e,F(t))}function kt(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,e>=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=Lt()-t;r>24?(isFinite(r)&&(clearTimeout(js),js=setTimeout(kt,r)),Bs=0):(Bs=1,Fs(kt))}function Lt(){var e=null,t=Hs,n=Infinity;while(t)t.flush?t=e?e.next=t.next:Hs=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function At(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Is<0&&(window.scrollX||window.scrollY)){n=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=n[0][0].getScreenCTM();Is=!i.f&&!i.e,n.remove()}return Is?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Ot(){}function Mt(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function _t(e){return e.rangeExtent?e.rangeExtent():Mt(e.range())}function Dt(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;s<i&&(o=n,n=r,r=o,o=i,i=s,s=o);if(t=t(s-i))e[n]=t.floor(i),e[r]=t.ceil(s);return e}function Pt(){return Math}function Ht(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Ut:Rt,a=r?q:I;return o=i(e,t,a,n),u=i(t,e,a,d3.interpolate),s}function s(e){return o(e)}var o,u;return s.invert=function(e){return u(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},s.range=function(e){return arguments.length?(t=e,i()):t},s.rangeRound=function(e){return s.range(e).interpolate(d3.interpolateRound)},s.clamp=function(e){return arguments.length?(r=e,i()):r},s.interpolate=function(e){return arguments.length?(n=e,i()):n},s.ticks=function(t){return It(e,t)},s.tickFormat=function(t){return qt(e,t)},s.nice=function(){return Dt(e,jt),i()},s.copy=function(){return Ht(e,t,n,r)},i()}function Bt(e,t){return d3.rebind(e,t,"range","rangeRound","interpolate","clamp")}function jt(e){return e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1),e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Ft(e,t){var n=Mt(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function It(e,t){return d3.range.apply(d3,Ft(e,t))}function qt(e,t){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Ft(e,t)[2])/Math.LN10+.01))+"f")}function Rt(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Ut(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());while(++o<=u)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=d3.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function zt(e,t){function n(n){return e(t(n))}var r=t.pow;return n.invert=function(t){return r(e.invert(t))},n.domain=function(i){return arguments.length?(t=i[0]<0?Xt:Wt,r=t.pow,e.domain(i.map(t)),n):e.domain().map(r)},n.nice=function(){return e.domain(Dt(e.domain(),Pt)),n},n.ticks=function(){var n=Mt(e.domain()),i=[];if(n.every(isFinite)){var s=Math.floor(n[0]),o=Math.ceil(n[1]),u=r(n[0]),a=r(n[1]);if(t===Xt){i.push(r(s));for(;s++<o;)for(var f=9;f>0;f--)i.push(r(s)*f)}else{for(;s<o;s++)for(var f=1;f<10;f++)i.push(r(s)*f);i.push(r(s))}for(s=0;i[s]<u;s++);for(o=i.length;i[o-1]>a;o--);i=i.slice(s,o)}return i},n.tickFormat=function(e,i){arguments.length<2&&(i=qs);if(arguments.length<1)return i;var s=Math.max(.1,e/n.ticks().length),o=t===Xt?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil),u;return function(e){return e/r(o(t(e)+u))<=s?i(e):""}},n.copy=function(){return zt(e.copy(),t)},Bt(n,e)}function Wt(e){return Math.log(e<0?0:e)/Math.LN10}function Xt(e){return-Math.log(e>0?0:-e)/Math.LN10}function Vt(e,t){function n(t){return e(r(t))}var r=$t(t),i=$t(1/t);return n.invert=function(t){return i(e.invert(t))},n.domain=function(t){return arguments.length?(e.domain(t.map(r)),n):e.domain().map(i)},n.ticks=function(e){return It(n.domain(),e)},n.tickFormat=function(e){return qt(n.domain(),e)},n.nice=function(){return n.domain(Dt(n.domain(),jt))},n.exponent=function(e){if(!arguments.length)return t;var s=n.domain();return r=$t(t=e),i=$t(1/t),n.domain(s)},n.copy=function(){return Vt(e.copy(),t)},Bt(n,e)}function $t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Jt(e,t){function n(t){return o[((s.get(t)||s.set(t,e.push(t)))-1)%o.length]}function i(t,n){return d3.range(e.length).map(function(e){return t+n*e})}var s,o,u;return n.domain=function(i){if(!arguments.length)return e;e=[],s=new r;var o=-1,u=i.length,a;while(++o<u)s.has(a=i[o])||s.set(a,e.push(a));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,u=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var a=r[0],f=r[1],l=(f-a)/(Math.max(1,e.length-1)+s);return o=i(e.length<2?(a+f)/2:a+l*s/2,l),u=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=(c-l)/(e.length-s+2*a);return o=i(l+h*a,h),f&&o.reverse(),u=h*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=Math.floor((c-l)/(e.length-s+2*a)),p=c-l-(e.length-s)*h;return o=i(l+Math.round(p/2),h),f&&o.reverse(),u=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return u},n.rangeExtent=function(){return Mt(t.a[0])},n.copy=function(){return Jt(e,t)},n.domain(e)}function Kt(e,t){function n(){var n=0,s=e.length,o=t.length;i=[];while(++n<o)i[n-1]=d3.quantile(e,n/o);return r}function r(e){return isNaN(e=+e)?NaN:t[d3.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(d3.ascending),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.copy=function(){return Kt(e,t)},n()}function Qt(e,t,n){function r(t){return n[Math.max(0,Math.min(o,Math.floor(s*(t-e))))]}function i(){return s=n.length/(t-e),o=n.length-1,r}var s,o;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.copy=function(){return Qt(e,t,n)},i()}function Gt(e,t){function n(n){return t[d3.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Gt(e,t)},n}function Yt(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return It(e,t)},t.tickFormat=function(t){return qt(e,t)},t.copy=function(){return Yt(e)},t}function Zt(e){return e.innerRadius}function en(e){return e.outerRadius}function tn(e){return e.startAngle}function nn(e){return e.endAngle}function rn(e){function t(t){function o(){a.push("M",s(e(l),f))}var a=[],l=[],c=-1,h=t.length,p,d=u(n),v=u(r);while(++c<h)i.call(this,p=t[c],c)?l.push([+d.call(this,p,c),+v.call(this,p,c)]):l.length&&(o(),l=[]);return l.length&&o(),a.length?a.join(""):null}var n=sn,r=on,i=o,s=un,a=s.key,f=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(typeof e=="function"?a=s=e:a=(s=$s.get(e)||un).key,t):a},t.tension=function(e){return arguments.length?(f=e,t):f},t}function sn(e){return e[0]}function on(e){return e[1]}function un(e){return e.join("L")}function an(e){return un(e)+"Z"}function fn(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ln(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function cn(e,t){return e.length<4?un(e):e[1]+dn(e.slice(1,e.length-1),vn(e,t))}function hn(e,t){return e.length<3?un(e):e[0]+dn((e.push(e[0]),e),vn([e[e.length-2]].concat(e,[e[1]]),t))}function pn(e,t,n){return e.length<3?un(e):e[0]+dn(e,vn(e,t))}function dn(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return un(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;n&&(r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1],i=e[1],a=2);if(t.length>1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function vn(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a)i=s,s=o,o=e[u],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function mn(e){if(e.length<3)return un(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];En(a,o,u);while(++t<n)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);t=-1;while(++t<2)o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);return a.join("")}function gn(e){if(e.length<4)return un(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3)i=e[n],s.push(i[0]),o.push(i[1]);t.push(wn(Qs,s)+","+wn(Qs,o)),--n;while(++n<r)i=e[n],s.shift(),s.push(i[0]),o.shift(),o.push(i[1]),En(t,s,o);return t.join("")}function yn(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4)s=e[n%r],o.push(s[0]),u.push(s[1]);t=[wn(Qs,o),",",wn(Qs,u)],--n;while(++n<i)s=e[n%r],o.shift(),o.push(s[0]),u.shift(),u.push(s[1]),En(t,o,u);return t.join("")}function bn(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n)a=e[u],f=u/n,a[0]=t*a[0]+(1-t)*(r+f*s),a[1]=t*a[1]+(1-t)*(i+f*o)}return mn(e)}function wn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function En(e,t,n){e.push("C",wn(Js,t),",",wn(Js,n),",",wn(Ks,t),",",wn(Ks,n),",",wn(Qs,t),",",wn(Qs,n))}function Sn(e,t){return(t[1]-e[1])/(t[0]-e[0])}function xn(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Sn(i,s);while(++t<n)r[t]=(o+(o=Sn(i=s,s=e[t+1])))/2;return r[t]=o,r}function Tn(e){var t=[],n,r,i,s,o=xn(e),u=-1,a=e.length-1;while(++u<a)n=Sn(e[u],e[u+1]),Math.abs(n)<1e-6?o[u]=o[u+1]=0:(r=o[u]/n,i=o[u+1]/n,s=r*r+i*i,s>9&&(s=n*3/Math.sqrt(s),o[u]=s*r,o[u+1]=s*i));u=-1;while(++u<=a)s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),t.push([s||0,o[u]*s||0]);return t}function Nn(e){return e.length<3?un(e):e[0]+dn(e,Tn(e))}function Cn(e){var t,n=-1,r=e.length,i,s;while(++n<r)t=e[n],i=t[0],s=t[1]+Xs,t[0]=i*Math.cos(s),t[1]=i*Math.sin(s);return e}function kn(e){function t(t){function o(){l.push("M",f(e(v),p),h,c(e(d.reverse()),p),"Z")}var l=[],d=[],v=[],m=-1,g=t.length,y,b=u(n),w=u(i),E=n===r?function(){return x}:u(r),S=i===s?function(){return T}:u(s),x,T;while(++m<g)a.call(this,y=t[m],m)?(d.push([x=+b.call(this,y,m),T=+w.call(this,y,m)]),v.push([+E.call(this,y,m),+S.call(this,y,m)])):d.length&&(o(),d=[],v=[]);return d.length&&o(),l.length?l.join(""):null}var n=sn,r=sn,i=0,s=on,a=o,f=un,l=f.key,c=f,h="L",p=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=s=e,t):s},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(s=e,t):s},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(typeof e=="function"?l=f=e:l=(f=$s.get(e)||un).key,c=f.reverse||f,h=f.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(p=e,t):p},t}function Ln(e){return e.source}function An(e){return e.target}function On(e){return e.radius}function Mn(e){return e.startAngle}function _n(e){return e.endAngle}function Dn(e){return[e.x,e.y]}function Pn(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Xs;return[n*Math.cos(r),n*Math.sin(r)]}}function Hn(){return 64}function Bn(){return"circle"}function jn(e){var t=Math.sqrt(e/Math.PI);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Fn(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function In(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function qn(e,t,n){i=[];if(n&&t.length>1){var r=Mt(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o)for(a=n;--a>0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];)i.push(f)}return i}function Rn(){no||(no=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var e=d3.event,t;try{no.scrollTop=1e3,no.dispatchEvent(e),t=1e3-no.scrollTop}catch(n){t=e.wheelDelta||-e.detail*5}return t}function Un(e){var t=e.source,n=e.target,r=Wn(t,n),i=[t];while(t!==r)t=t.parent,i.push(t);var s=i.length;while(n!==r)i.splice(s,0,n),n=n.parent;return i}function zn(e){var t=[],n=e.parent;while(n!=null)t.push(e),e=n,n=n.parent;return t.push(e),t}function Wn(e,t){if(e===t)return e;var n=zn(e),r=zn(t),i=n.pop(),s=r.pop(),o=null;while(i===s)o=i,i=n.pop(),s=r.pop();return o}function Xn(e){e.fixed|=2}function Vn(e){e.fixed&=1}function $n(e){e.fixed|=4}function Jn(e){e.fixed&=3}function Kn(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Kn(a,t,n),e.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy}}if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Qn(e){return 20}function Gn(e){return 1}function Yn(e){return e.x}function Zn(e){return e.y}function er(e,t,n){e.y0=t,e.y=n}function tr(e){return d3.range(e.length)}function nr(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function rr(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t)(i=e[t][1])>r&&(n=t,r=i);return n}function ir(e){return e.reduce(sr,0)}function sr(e,t){return e+t[1]}function or(e,t){return ur(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ur(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function ar(e){return[d3.min(e),d3.max(e)]}function fr(e,t){return d3.rebind(e,t,"sort","children","value"),e.links=pr,e.nodes=function(t){return uo=!0,(e.nodes=e)(t)},e}function lr(e){return e.children}function cr(e){return e.value}function hr(e,t){return t.value-e.value}function pr(e){return d3.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function dr(e,t){return e.value-t.value}function vr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function mr(e,t){e._pack_next=t,t._pack_prev=e}function gr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function yr(e){function t(e){r=Math.min(e.x-e.r,r),i=Math.max(e.x+e.r,i),s=Math.min(e.y-e.r,s),o=Math.max(e.y+e.r,o)}if(!(n=e.children)||!(p=n.length))return;var n,r=Infinity,i=-Infinity,s=Infinity,o=-Infinity,u,a,f,l,c,h,p;n.forEach(br),u=n[0],u.x=-u.r,u.y=0,t(u);if(p>1){a=n[1],a.x=a.r,a.y=0,t(a);if(p>2){f=n[2],Sr(u,a,f),t(f),vr(u,f),u._pack_prev=f,vr(f,a),a=u._pack_next;for(l=3;l<p;l++){Sr(u,a,f=n[l]);var d=0,v=1,m=1;for(c=a._pack_next;c!==a;c=c._pack_next,v++)if(gr(c,f)){d=1;break}if(d==1)for(h=u._pack_prev;h!==c._pack_prev;h=h._pack_prev,m++)if(gr(h,f))break;d?(v<m||v==m&&a.r<u.r?mr(u,a=c):mr(u=h,a),l--):(vr(u,f),a=f,t(f))}}}var g=(r+i)/2,y=(s+o)/2,b=0;for(l=0;l<p;l++)f=n[l],f.x-=g,f.y-=y,b=Math.max(b,f.r+Math.sqrt(f.x*f.x+f.y*f.y));e.r=b,n.forEach(wr)}function br(e){e._pack_next=e._pack_prev=e}function wr(e){delete e._pack_next,delete e._pack_prev}function Er(e,t,n,r){var i=e.children;e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)Er(i[s],t,n,r)}}function Sr(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function xr(e){return 1+d3.max(e,function(e){return e.y})}function Tr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Nr(e){var t=e.children;return t&&t.length?Nr(t[0]):e}function Cr(e){var t=e.children,n;return t&&(n=t.length)?Cr(t[n-1]):e}function kr(e,t){return e.parent==t.parent?1:2}function Lr(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ar(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Or(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i)t(r=Or(n[s],t),e)>0&&(e=r)}return e}function Mr(e,t){return e.x-t.x}function _r(e,t){return t.x-e.x}function Dr(e,t){return e.depth-t.depth}function Pr(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a)s=i[u],n(s,o),o=s}t(e,r)}n(e,null)}function Hr(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0)s=r[i]._tree,s.prelim+=t,s.mod+=t,t+=s.shift+(n+=s.change)}function Br(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function jr(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function Fr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Ir(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function qr(e,t){function n(e,r){d3.text(e,t,function(e){r(e&&n.parse(e))})}function r(t){return t.map(i).join(e)}function i(e){return o.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp("\r\n|["+e+"\r\n]","g"),o=new RegExp('["'+e+"\n]"),u=e.charCodeAt(0);return n.parse=function(e){var t;return n.parseRows(e,function(e,n){if(n){var r={},i=-1,s=t.length;while(++i<s)r[t[i]]=e[i];return r}return t=e,null})},n.parseRows=function(e,t){function n(){if(s.lastIndex>=e.length)return i;if(l)return l=!1,r;var t=s.lastIndex;if(e.charCodeAt(t)===34){var n=t;while(n++<e.length)if(e.charCodeAt(n)===34){if(e.charCodeAt(n+1)!==34)break;n++}s.lastIndex=n+2;var o=e.charCodeAt(n+1);return o===13?(l=!0,e.charCodeAt(n+2)===10&&s.lastIndex++):o===10&&(l=!0),e.substring(t+1,n).replace(/""/g,'"')}var a=s.exec(e);return a?(l=a[0].charCodeAt(0)!==u,e.substring(t,a.index)):(s.lastIndex=e.length,e.substring(t))}var r={},i={},o=[],a=0,f,l;s.lastIndex=0;while((f=n())!==i){var c=[];while(f!==r&&f!==i)c.push(f),f=n();if(t&&!(c=t(c,a++)))continue;o.push(c)}return o},n.format=function(e){return e.map(r).join("\n")},n}function Rr(e,t){return function(n){return n&&e.hasOwnProperty(n.type)?e[n.type](n):t}}function Ur(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function zr(e,t){fo.hasOwnProperty(e.type)&&fo[e.type](e,t)}function Wr(e,t){zr(e.geometry,t)}function Xr(e,t){for(var n=e.features,r=0,i=n.length;r<i;r++)zr(n[r].geometry,t)}function Vr(e,t){for(var n=e.geometries,r=0,i=n.length;r<i;r++)zr(n[r],t)}function $r(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Jr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Kr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r][0],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Qr(e,t){t.apply(null,e.coordinates)}function Gr(e,t){for(var n=e.coordinates[0],r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Yr(e){return e.source}function Zr(e){return e.target}function ei(){function e(e){var t=Math.sin(e*=p)*d,n=Math.sin(p-e)*d,r=n*s+t*c,u=n*o+t*h,a=n*i+t*l;return[Math.atan2(u,r)/ao,Math.atan2(a,Math.sqrt(r*r+u*u))/ao]}var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return e.distance=function(){return p==null&&(d=1/Math.sin(p=Math.acos(Math.max(-1,Math.min(1,i*l+r*f*Math.cos(u-t)))))),p},e.source=function(u){var a=Math.cos(t=u[0]*ao),f=Math.sin(t);return r=Math.cos(n=u[1]*ao),i=Math.sin(n),s=r*a,o=r*f,p=null,e},e.target=function(t){var n=Math.cos(u=t[0]*ao),r=Math.sin(u);return f=Math.cos(a=t[1]*ao),l=Math.sin(a),c=f*n,h=f*r,p=null,e},e}function ti(e,t){var n=ei().source(e).target(t);return n.distance(),n}function ni(e){var t=0,n=0;for(;;){if(e(t,n))return[t,n];t===0?(t=n+1,n=0):(t-=1,n+=1)}}function ri(e,t,n,r){var i,s,o,u,a,f,l;return i=r[e],s=i[0],o=i[1],i=r[t],u=i[0],a=i[1],i=r[n],f=i[0],l=i[1],(l-o)*(u-s)-(a-o)*(f-s)>0}function ii(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function si(e,t,n,r){var i=e[0],s=t[0],o=n[0],u=r[0],a=e[1],f=t[1],l=n[1],c=r[1],h=i-o,p=s-i,d=u-o,v=a-l,m=f-a,g=c-l,y=(d*v-g*h)/(g*p-d*m);return[i+y*p,a+y*m]}function oi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=r.leftEnd;do t=t.r;while(t!=r.rightEnd&&i.rightOf(t,e));return t=t.l,t},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[ho[e.side]]}},i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;return n.c=e.x*r+e.y*i+(r*r+i*i)*.5,s>o?(n.a=1,n.b=i/r,n.c/=r):(n.b=1,n.a=r/i,n.c/=i),n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r)return null;var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10)return null;var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;u.y<a.y||u.y==a.y&&u.x<a.x?(f=e,l=n):(f=t,l=r);var c=s>=l.region.r.x;return c&&f.side==="l"||!c&&f.side==="r"?null:{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l")return 1;if(!i&&e.side==="r")return 0;if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;!i&&n.b<0||i&&n.b>=0?a=u=s>=n.b*o:(a=t.x+t.y*n.b>n.c,n.b<0&&(a=!a),a||(u=1));if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b),n.b<0&&(a=!a)}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[ho[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}},s={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x)continue;break}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init(),n.bottomSite=n.list.shift();var o=n.list.shift(),u,a,f,l,c,h,p,d,v,m,g,y,b;for(;;){s.empty()||(u=s.min());if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x))a=r.leftBound(o),f=r.right(a),p=r.rightRegion(a),y=i.bisect(p,o),h=r.createHalfEdge(y,"l"),r.insert(a,h),m=i.intersect(a,h),m&&(s.del(a),s.insert(a,m,i.distance(m,o))),a=h,h=r.createHalfEdge(y,"r"
-),r.insert(a,h),m=i.intersect(h,f),m&&s.insert(h,m,i.distance(m,o)),o=n.list.shift();else{if(!!s.empty())break;a=s.extractMin(),l=r.left(a),f=r.right(a),c=r.right(f),p=r.leftRegion(a),d=r.rightRegion(f),g=a.vertex,i.endPoint(a.edge,a.side,g),i.endPoint(f.edge,f.side,g),r.del(a),s.del(f),r.del(f),b="l",p.y>d.y&&(v=p,p=d,d=v,b="r"),y=i.bisect(p,d),h=r.createHalfEdge(y,b),r.insert(l,h),i.endPoint(y,ho[b],g),m=i.intersect(l,h),m&&(s.del(l),s.insert(l,m,i.distance(m,p))),m=i.intersect(h,c),m&&s.insert(h,m,i.distance(m,p))}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a))t(a.edge)}function ui(){return{leaf:!0,nodes:[],point:null}}function ai(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;a[0]&&ai(e,a[0],n,r,o,u),a[1]&&ai(e,a[1],o,r,i,u),a[2]&&ai(e,a[2],n,u,o,s),a[3]&&ai(e,a[3],o,u,i,s)}}function fi(e){return{x:e[0],y:e[1]}}function li(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ci(e){return e.substring(0,3)}function hi(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i==37){s=Ho[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function pi(e){return new RegExp("^(?:"+e.map(d3.requote).join("|")+")","i")}function di(e){var t=new r,n=-1,i=e.length;while(++n<i)t.set(e[n].toLowerCase(),n);return t}function vi(e,t,n){Ao.lastIndex=0;var r=Ao.exec(t.substring(n));return r?n+=r[0].length:-1}function mi(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n));return r?n+=r[0].length:-1}function gi(e,t,n){_o.lastIndex=0;var r=_o.exec(t.substring(n));return r?(e.m=Do.get(r[0].toLowerCase()),n+=r[0].length):-1}function yi(e,t,n){Oo.lastIndex=0;var r=Oo.exec(t.substring(n));return r?(e.m=Mo.get(r[0].toLowerCase()),n+=r[0].length):-1}function bi(e,t,n){return hi(e,Po.c.toString(),t,n)}function wi(e,t,n){return hi(e,Po.x.toString(),t,n)}function Ei(e,t,n){return hi(e,Po.X.toString(),t,n)}function Si(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function xi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.y=Ti(+r[0]),n+=r[0].length):-1}function Ti(e){return e+(e>68?1900:2e3)}function Ni(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function Ci(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function ki(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function Li(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function Ai(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function Oi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function Mi(e,t,n){var r=jo.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function _i(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+To(r)+To(i)}function Di(e){return e.toISOString()}function Pi(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new po(n-1)),1),n}function s(e,n){return t(e=new po(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)while(o<r)n(o)%s||u.push(new Date(+o)),t(o,1);else while(o<r)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{po=li;var r=new li;return r._=e,o(r,t,n)}finally{po=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Hi(e);return a.floor=a,a.round=Hi(r),a.ceil=Hi(i),a.offset=Hi(s),a.range=u,e}function Hi(e){return function(t,n){try{po=li;var r=new li;return r._=t,e(r,n)._}finally{po=Date}}}function Bi(e,t,n){function r(t){return e(t)}return r.invert=function(t){return Fi(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Fi)},r.nice=function(e){return r.domain(Dt(r.domain(),function(){return e}))},r.ticks=function(n,i){var s=ji(r.domain());if(typeof n!="function"){var o=s[1]-s[0],u=o/n,a=d3.bisect(Io,u);if(a==Io.length)return t.year(s,n);if(!a)return e.ticks(n).map(Fi);Math.log(u/Io[a-1])<Math.log(Io[a]/u)&&--a,n=t[a],i=n[1],n=n[0].range}return n(s[0],new Date(+s[1]+1),i)},r.tickFormat=function(){return n},r.copy=function(){return Bi(e.copy(),t,n)},d3.rebind(r,e,"range","rangeRound","interpolate","clamp")}function ji(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Fi(e){return new Date(e)}function Ii(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function qi(e){var t=new Date(e,0,1);return t.setFullYear(e),t}function Ri(e){var t=e.getFullYear(),n=qi(t),r=qi(t+1);return t+(e-n)/(r-n)}function Ui(e){var t=new Date(Date.UTC(e,0,1));return t.setUTCFullYear(e),t}function zi(e){var t=e.getUTCFullYear(),n=Ui(t),r=Ui(t+1);return t+(e-n)/(r-n)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Wi){var Xi=CSSStyleDeclaration.prototype,Vi=Xi.setProperty;Xi.setProperty=function(e,t,n){Vi.call(this,e,t+"",n)}}d3={version:"2.10.2"};var $i=n;try{$i(document.documentElement.childNodes)[0].nodeType}catch(Ji){$i=t}var Ki=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};d3.map=function(e){var t=new r;for(var n in e)t.set(n,e[n]);return t},e(r,{has:function(e){return Qi+e in this},get:function(e){return this[Qi+e]},set:function(e,t){return this[Qi+e]=t},remove:function(e){return e=Qi+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===Gi&&e.call(this,t.substring(1),this[t])}});var Qi="\0",Gi=Qi.charCodeAt(0);d3.functor=u,d3.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=a(e,t,t[i]);return e},d3.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},d3.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},d3.mean=function(e,t){var n=e.length,r,i=0,s=-1,o=0;if(arguments.length===1)while(++s<n)f(r=e[s])&&(i+=(r-i)/++o);else while(++s<n)f(r=t.call(e,e[s],s))&&(i+=(r-i)/++o);return o?i:undefined},d3.median=function(e,t){return arguments.length>1&&(e=e.map(t)),e=e.filter(f),e.length?d3.quantile(e.sort(d3.ascending),.5):undefined},d3.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&i>s&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&i>s&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&s>i&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&s>i&&(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)(s=e[n])!=null&&(i>s&&(i=s),o<s&&(o=s))}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&(i>s&&(i=s),o<s&&(o=s))}return[i,o]},d3.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=Math.random()*2-1,r=Math.random()*2-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(e,t){var n=arguments.length;n<2&&(t=1),n<1&&(e=0);var r=d3.random.normal();return function(){return Math.exp(e+t*r())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s<r)isNaN(i=+e[s])||(n+=i);else while(++s<r)isNaN(i=+t.call(e,e[s],s))||(n+=i);return n},d3.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=e[r-1],s=n-r;return s?i+s*(e[r]-i):i},d3.transpose=function(e){return d3.zip.apply(d3,e)},d3.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=d3.min(arguments,l),n=new Array(t);++e<t;)for(var r=-1,i,s=n[e]=new Array(i);++r<i;)s[r]=arguments[r][e];return n},d3.bisector=function(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var Yi=d3.bisector(function(e){return e});d3.bisectLeft=Yi.left,d3.bisect=d3.bisectRight=Yi.right,d3.first=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])>0&&(i=s);return i},d3.last=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])<=0&&(i=s);return i},d3.nest=function(){function e(t,s){if(s>=i.length)return u?u.call(n,t):o?t.sort(o):t;var a=-1,f=t.length,l=i[s++],c,h,p=new r,d,v={};while(++a<f)(d=p.get(c=l(h=t[a])))?d.push(h):p.set(c,[h]);return p.forEach(function(t,n){v[t]=e(n,s)}),v}function t(e,n){if(n>=i.length)return e;var r=[],o=s[n++],u;for(u in e)r.push({key:u,values:t(e[u],n)});return o&&r.sort(function(e,t){return o(e.key,t.key)}),r}var n={},i=[],s=[],o,u;return n.map=function(t){return e(t,0)},n.entries=function(n){return t(e(n,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return s[i.length-1]=e,n},n.sortValues=function(e){return o=e,n},n.rollup=function(e){return u=e,n},n},d3.keys=function(e){var t=[];for(var n in e)t.push(n);return t},d3.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d3.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},d3.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n},d3.merge=function(e){return Array.prototype.concat.apply([],e)},d3.split=function(e,t){var n=[],r=[],i,s=-1,o=e.length;arguments.length<2&&(t=c);while(++s<o)t.call(r,i=e[s],s)?r=[]:(r.length||n.push(r),r.push(i));return n},d3.range=function(e,t,n){arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0));if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=p(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r},d3.requote=function(e){return e.replace(Zi,"\\$&")};var Zi=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},d3.xhr=function(e,t,n){var r=new XMLHttpRequest;arguments.length<3?(n=t,t=null):t&&r.overrideMimeType&&r.overrideMimeType(t),r.open("GET",e,!0),t&&r.setRequestHeader("Accept",t),r.onreadystatechange=function(){if(r.readyState===4){var e=r.status;n(!e&&r.response||e>=200&&e<300||e===304?r:null)}},r.send(null)},d3.text=function(e,t,n){function r(e){n(e&&e.responseText)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)},d3.json=function(e,t){d3.text(e,"application/json",function(e){t(e?JSON.parse(e):null)})},d3.html=function(e,t){d3.text(e,"text/html",function(e){if(e!=null){var n=document.createRange();n.selectNode(document.body),e=n.createContextualFragment(e)}t(e)})},d3.xml=function(e,t,n){function r(e){n(e&&e.responseXML)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)};var es={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:es,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),es.hasOwnProperty(n)?{space:es[n],local:e}:e}},d3.dispatch=function(){var e=new d,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=v(e);return e},d.prototype.on=function(e,t){var n=e.indexOf("."),r="";return n>0&&(r=e.substring(n+1),e=e.substring(0,n)),arguments.length<2?this[e].on(r):this[e].on(r,t)},d3.format=function(e){var t=ts.exec(e),n=t[1]||" ",r=t[3]||"",i=t[5],s=+t[6],o=t[7],u=t[8],a=t[9],f=1,l="",c=!1;u&&(u=+u.substring(1)),i&&(n="0",o&&(s-=Math.floor((s-1)/4)));switch(a){case"n":o=!0,a="g";break;case"%":f=100,l="%",a="f";break;case"p":f=100,l="%",a="r";break;case"d":c=!0,u=0;break;case"s":f=-1,a="r"}return a=="r"&&!u&&(a="g"),a=ns.get(a)||g,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"-":r;if(f<0){var h=d3.formatPrefix(e,u);e=h.scale(e),l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p<s&&(e=(new Array(s-p+1)).join(n)+e),o&&(e=y(e)),e=t+e}else{o&&(e=y(e)),e=t+e;var p=e.length;p<s&&(e=(new Array(s-p+1)).join(n)+e)}return e+l}};var ts=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,ns=d3.map({g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return d3.round(e,t=m(e,t)).toFixed(Math.max(0,Math.min(20,t)))}}),rs=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(b);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,m(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n<=0?n+1:n-1)/3)*3))),rs[8+n/3]};var is=T(2),ss=T(3),os=function(){return x},us=d3.map({linear:os,poly:T,quad:function(){return is},cubic:function(){return ss},sin:function(){return N},exp:function(){return C},circle:function(){return k},elastic:L,back:A,bounce:function(){return O}}),as=d3.map({"in":x,out:E,"in-out":S,"out-in":function(e){return S(E(e))}});d3.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=us.get(n)||os,r=as.get(r)||x,w(r(n.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(e){var t=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate();return new P(n?n.matrix:ls)})(e)},P.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var fs=180/Math.PI,ls={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(e,t){var n=d3.interpolators.length,r;while(--n>=0&&!(r=d3.interpolators[n](e,t)));return r},d3.interpolateNumber=function(e,t){return t-=e,function(n){return e+t*n}},d3.interpolateRound=function(e,t){return t-=e,function(n){return Math.round(e+t*n)}},d3.interpolateString=function(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;cs.lastIndex=0;for(r=0;n=cs.exec(t);++r)n.index&&u.push(t.substring(s,o=n.index)),a.push({i:u.length,x:n[0]}),u.push(null),s=cs.lastIndex;s<t.length&&u.push(t.substring(s));for(r=0,f=a.length;(n=cs.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i)if(u[l.i+1]==null){u[l.i-1]+=l.x,u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1],u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}else if(u[l.i+1]==null)u[l.i]=l.x;else{u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}a.splice(r,1),f--,r--}else l.x=d3.interpolateNumber(parseFloat(n[0]),parseFloat(l.x))}while(r<f)l=a.pop(),u[l.i+1]==null?u[l.i]=l.x:(u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1)),f--;return u.length===1?u[0]==null?a[0].x:function(){return t}:function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}},d3.interpolateTransform=function(e,t){var n=[],r=[],i,s=d3.transform(e),o=d3.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:d3.interpolateNumber(u[0],a[0])},{i:3,x:d3.interpolateNumber(u[1],a[1])})):a[0]||a[1]?n.push("translate("+a+")"):n.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(f,l)})):l&&n.push(n.pop()+"rotate("+l+")"),c!=h?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(c,h)}):h&&n.push(n.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:d3.interpolateNumber(p[0],d[0])},{i:i-2,x:d3.interpolateNumber(p[1],d[1])})):(d[0]!=1||d[1]!=1)&&n.push(n.pop()+"scale("+d+")"),i=r.length,function(e){var t=-1,s;while(++t<i)n[(s=r[t]).i]=s.x(e);return n.join("")}},d3.interpolateRgb=function(e,t){e=d3.rgb(e),t=d3.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+z(Math.round(n+s*e))+z(Math.round(r+o*e))+z(Math.round(i+u*e))}},d3.interpolateHsl=function(e,t){e=d3.hsl(e),t=d3.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return G(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateLab=function(e,t){e=d3.lab(e),t=d3.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return rt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateHcl=function(e,t){e=d3.hcl(e),t=d3.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return et(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateArray=function(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(d3.interpolate(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}},d3.interpolateObject=function(e,t){var n={},r={},i;for(i in e)i in t?n[i]=F(i)(e[i],t[i]):r[i]=e[i];for(i in t)i in e||(r[i]=t[i]);return function(e){for(i in n)r[i]=n[i](e);return r}};var cs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(e,t){return t instanceof Array&&d3.interpolateArray(e,t)},function(e,t){return(typeof e=="string"||typeof t=="string")&&d3.interpolateString(e+"",t+"")},function(e,t){return(typeof t=="string"?hs.has(t)||/^(#|rgb\(|hsl\()/.test(t):t instanceof U||t instanceof Q)&&d3.interpolateRgb(e,t)},function(e,t){return!isNaN(e=+e)&&!isNaN(t=+t)&&d3.interpolateNumber(e,t)}],d3.rgb=function(e,t,n){return arguments.length===1?e instanceof U?R(e.r,e.g,e.b):W(""+e,R,G):R(~~e,~~t,~~n)},U.prototype.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?R(i,i,i):(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),R(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e))))},U.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),R(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))},U.prototype.hsl=function(){return X(this.r,this.g,this.b)},U.prototype.toString=function(){return"#"+z(this.r)+z(this.g)+z(this.b)};var hs=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});hs.forEach(function(e,t){hs.set(e,W(t,R,G))}),d3.hsl=function(e,t,n){return arguments.length===1?e instanceof Q?K(e.h,e.s,e.l):W(""+e,X,K):K(+e,+t,+n)},Q.prototype.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,this.l/e)},Q.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,e*this.l)},Q.prototype.rgb=function(){return G(this.h,this.s,this.l)},Q.prototype.toString=function(){return this.rgb().toString()},d3.hcl=function(e,t,n){return arguments.length===1?e instanceof Z?Y(e.h,e.c,e.l):e instanceof nt?it(e.l,e.a,e.b):it((e=V((e=d3.rgb(e)).r,e.g,e.b)).l,e.a,e.b):Y(+e,+t,+n)},Z.prototype.brighter=function(e){return Y(this.h,this.c,Math.min(100,this.l+ps*(arguments.length?e:1)))},Z.prototype.darker=function(e){return Y(this.h,this.c,Math.max(0,this.l-ps*(arguments.length?e:1)))},Z.prototype.rgb=function(){return et(this.h,this.c,this.l).rgb()},Z.prototype.toString=function(){return this.rgb()+""},d3.lab=function(e,t,n){return arguments.length===1?e instanceof nt?tt(e.l,e.a,e.b):e instanceof Z?et(e.l,e.c,e.h):V((e=d3.rgb(e)).r,e.g,e.b):tt(+e,+t,+n)};var ps=18,ds=.95047,vs=1,ms=1.08883;nt.prototype.brighter=function(e){return tt(Math.min(100,this.l+ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.darker=function(e){return tt(Math.max(0,this.l-ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.rgb=function(){return rt(this.l,this.a,this.b)},nt.prototype.toString=function(){return this.rgb()+""};var gs=function(e,t){return t.querySelector(e)},ys=function(e,t){return t.querySelectorAll(e)},bs=document.documentElement,ws=bs.matchesSelector||bs.webkitMatchesSelector||bs.mozMatchesSelector||bs.msMatchesSelector||bs.oMatchesSelector,Es=function(e,t){return ws.call(e,t)};typeof Sizzle=="function"&&(gs=function(e,t){return Sizzle(e,t)[0]||null},ys=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},Es=Sizzle.matchesSelector);var Ss=[];d3.selection=function(){return xs},d3.selection.prototype=Ss,Ss.select=function(e){var t=[],n,r,i,s;typeof e!="function"&&(e=ft(e));for(var o=-1,u=this.length;++o<u;){t.push(n=[]),n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;)(s=i[a])?(n.push(r=e.call(s,s.__data__,a)),r&&"__data__"in s&&(r.__data__=s.__data__)):n.push(null)}return at(t)},Ss.selectAll=function(e){var t=[],n,r;typeof e!="function"&&(e=lt(e));for(var i=-1,s=this.length;++i<s;)for(var o=this[i],u=-1,a=o.length;++u<a;)if(r=o[u])t.push(n=$i(e.call(r,r.__data__,u))),n.parentNode=r;return at(t)},Ss.attr=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node();return e=d3.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ct(t,e[t]));return this}return this.each(ct(e,t))},Ss.classed=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return!1}else{t=n.className,t.baseVal!=null&&(t=t.baseVal);while(++i<r)if(!ht(e[i]).test(t))return!1}return!0}for(t in e)this.each(pt(t,e[t]));return this}return this.each(pt(e,t))},Ss.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.each(vt(n,e[n],t));return this}if(r<2)return window.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(vt(e,t,n))},Ss.property=function(e,t){if(arguments.length<2){if(typeof e=="string")return this.node()[e];for(t in e)this.each(mt(t,e[t]));return this}return this.each(mt(e,t))},Ss.text=function(e){return arguments.length<1?this.node().textContent:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e})},Ss.html=function(e){return arguments.length<1?this.node().innerHTML:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e})},Ss.append=function(e){function t(){return this.appendChild(document.createElementNS(this.namespaceURI,e))}function n(){return this.appendChild(document.createElementNS(e.space,e.local))}return e=d3.ns.qualify(e),this.select(e.local?n:t)},Ss.insert=function(e,t){function n(){return this.insertBefore(document.createElementNS(this.namespaceURI,e),gs(t,this))}function r(){return this.insertBefore(document.createElementNS(e.space,e.local),gs(t,this))}return e=d3.ns.qualify(e),this.select(e.local?r:n)},Ss.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},Ss.data=function(e,t){function n(e,n){var i,s=e.length,o=n.length,u=Math.min(s,o),c=Math.max(s,o),h=[],p=[],d=[],v,m;if(t){var g=new r,y=[],b,w=n.length;for(i=-1;++i<s;)b=t.call(v=e[i],v.__data__,i),g.has(b)?d[w++]=v:g.set(b,v),y.push(b);for(i=-1;++i<o;)b=t.call(n,m=n[i],i),g.has(b)?(h[i]=v=g.get(b),v.__data__=m,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null),g.remove(b);for(i=-1;++i<s;)g.has(y[i])&&(d[i]=e[i])}else{for(i=-1;++i<u;)v=e[i],m=n[i],v?(v.__data__=m,h[i]=v,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null);for(;i<o;++i)p[i]=gt(n[i]),h[i]=d[i]=null;for(;i<c;++i)d[i]=e[i],p[i]=h[i]=null}p.update=h,p.parentNode=h.parentNode=d.parentNode=e.parentNode,a.push(p),f.push(h),l.push(d)}var i=-1,s=this.length,o,u;if(!arguments.length){e=new Array(s=(o=this[0]).length);while(++i<s)if(u=o[i])e[i]=u.__data__;return e}var a=St([]),f=at([]),l=at([]);if(typeof e=="function")while(++i<s)n(o=this[i],e.call(o,o.parentNode.__data__,i));else while(++i<s)n(o=this[i],e);return f.enter=function(){return a},f.exit=function(){return l},f},Ss.datum=Ss.map=function(e){return arguments.length<1?this.property("__data__"):this.property("__data__",e)},Ss.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]),n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i,i.__data__,u)&&n.push(i)}return at(t)},Ss.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;)if(s=n[r])i&&i!==s.nextSibling&&i.parentNode.insertBefore(s,i),i=s;return this},Ss.sort=function(e){e=bt.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ss.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t=!1);for(n in e)this.each(wt(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(wt(e,t,n))},Ss.each=function(e){return Et(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Ss.call=function(e){return e.apply(this,(arguments[0]=this,arguments)),this},Ss.empty=function(){return!this.node()},Ss.node=function(e){for(var t=0,n=this.length;t<n;t++)for(var r=this[t],i=0,s=r.length;i<s;i++){var o=r[i];if(o)return o}return null},Ss.transition=function(){var e=[],t,n;for(var r=-1,i=this.length;++r<i;){e.push(t=[]);for(var s=this[r],o=-1,u=s.length;++o<u;)t.push((n=s[o])?{node:n,delay:Ms,duration:_s}:null)}return xt(e,ks||++Cs,Date.now())};var xs=at([[document]]);xs[0].parentNode=bs,d3.select=function(e){return typeof e=="string"?xs.select(e):at([[e]])},d3.selectAll=function(e){return typeof e=="string"?xs.selectAll(e):at([$i(e)])};var Ts=[];d3.selection.enter=St,d3.selection.enter.prototype=Ts,Ts.append=Ss.append,Ts.insert=Ss.insert,Ts.empty=Ss.empty,Ts.node=Ss.node,Ts.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update,t.push(n=[]),n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;)(o=s[f])?(n.push(i[f]=r=e.call(s.parentNode,o.__data__,f)),r.__data__=o.__data__):n.push(null)}return at(t)};var Ns=[],Cs=0,ks=0,Ls=0,As=250,Os=d3.ease("cubic-in-out"),Ms=Ls,_s=As,Ds=Os;Ns.call=Ss.call,d3.transition=function(e){return arguments.length?ks?e.transition():e:xs.transition()},d3.transition.prototype=Ns,Ns.select=function(e){var t=[],n,r,i;typeof e!="function"&&(e=ft(e));for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(i=u[a])&&(r=e.call(i.node,i.node.__data__,a))?("__data__"in i.node&&(r.__data__=i.node.__data__),n.push({node:r,delay:i.delay,duration:i.duration})):n.push(null)}return xt(t,this.id,this.time).ease(this.ease())},Ns.selectAll=function(e){var t=[],n,r,i;typeof e!="function"&&(e=lt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(i=u[a]){r=e.call(i.node,i.node.__data__,a),t.push(n=[]);for(var l=-1,c=r.length;++l<c;)n.push({node:r[l],delay:i.delay,duration:i.duration})}return xt(t,this.id,this.time).ease(this.ease())},Ns.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i.node,i.node.__data__,u)&&n.push(i)}return xt(t,this.id,this.time).ease(this.ease())},Ns.attr=function(e,t){if(arguments.length<2){for(t in e)this.attrTween(t,Ct(e[t],t));return this}return this.attrTween(e,Ct(t,e))},Ns.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r===Ps?(this.removeAttribute(i),null):r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r===Ps?(this.removeAttributeNS(i.space,i.local),null):r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=d3.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Ns.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.styleTween(n,Ct(e[n],n),t);return this}n=""}return this.styleTween(e,Ct(t,e),n)},Ns.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,i){var s=t.call(this,r,i,window.getComputedStyle(this,null).getPropertyValue(e));return s===Ps?(this.style.removeProperty(e),null):s&&function(t){this.style.setProperty(e,s(t),n)}})},Ns.text=function(e){return this.tween("text",function(t,n){this.textContent=typeof e=="function"?e.call(this,t,n):e})},Ns.remove=function(){return this.each("end.transition",function(){var e;!this.__transition__&&(e=this.parentNode)&&e.removeChild(this)})},Ns.delay=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.delay=e.call(t=t.node,t.__data__,n,r)|0}:(e|=0,function(t){t.delay=e}))},Ns.duration=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.duration=Math.max(1,e.call(t=t.node,t.__data__,n,r)|0)}:(e=Math.max(1,e|0),function(t){t.duration=e}))},Ns.transition=function(){return this.select(s)},d3.tween=function(e,t){function n(n,r,i){var s=e.call(this,n,r);return s==null?i!=""&&Ps:i!=s&&t(i,s)}function r(n,r,i){return i!=e&&t(i,e)}return typeof e=="function"?n:e==null?Nt:(e+="",r)};var Ps={},Hs=null,Bs,js;d3.timer=function(e,t,n){var r=!1,i,s=Hs;if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}while(s){if(s.callback===e){s.then=n,s.delay=t,r=!0;break}i=s,s=s.next}r||(Hs={callback:e,then:n,delay:t,next:Hs}),Bs||(js=clearTimeout(js),Bs=1,Fs(kt))},d3.timer.flush=function(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,n.delay||(n.flush=n.callback(e)),n=n.next;Lt()};var Fs=window.requestAnimationFrame||window.webkitRequestAnimationFrame||
-window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,17)};d3.mouse=function(e){return At(e,_())};var Is=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(e,t){return arguments.length<2&&(t=_().touches),t?$i(t).map(function(t){var n=At(e,t);return n.identifier=t.identifier,n}):[]},d3.scale={},d3.scale.linear=function(){return Ht([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return zt(d3.scale.linear(),Wt)};var qs=d3.format(".0e");Wt.pow=function(e){return Math.pow(10,e)},Xt.pow=function(e){return-Math.pow(10,-e)},d3.scale.pow=function(){return Vt(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Jt([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Rs)},d3.scale.category20=function(){return d3.scale.ordinal().range(Us)},d3.scale.category20b=function(){return d3.scale.ordinal().range(zs)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Ws)};var Rs=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Us=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],zs=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Ws=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Kt([],[])},d3.scale.quantize=function(){return Qt(0,1,[0,1])},d3.scale.threshold=function(){return Gt([.5],[0,1])},d3.scale.identity=function(){return Yt([0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=t.apply(this,arguments),s=n.apply(this,arguments),o=r.apply(this,arguments)+Xs,u=i.apply(this,arguments)+Xs,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<Math.PI?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=Vs?e?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":e?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+e*h+","+e*p+"A"+e+","+e+" 0 "+f+",0 "+e*l+","+e*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var t=Zt,n=en,r=tn,i=nn;return e.innerRadius=function(n){return arguments.length?(t=u(n),e):t},e.outerRadius=function(t){return arguments.length?(n=u(t),e):n},e.startAngle=function(t){return arguments.length?(r=u(t),e):r},e.endAngle=function(t){return arguments.length?(i=u(t),e):i},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,s=(r.apply(this,arguments)+i.apply(this,arguments))/2+Xs;return[Math.cos(s)*e,Math.sin(s)*e]},e};var Xs=-Math.PI/2,Vs=2*Math.PI-1e-6;d3.svg.line=function(){return rn(i)};var $s=d3.map({linear:un,"linear-closed":an,"step-before":fn,"step-after":ln,basis:mn,"basis-open":gn,"basis-closed":yn,bundle:bn,cardinal:pn,"cardinal-open":cn,"cardinal-closed":hn,monotone:Nn});$s.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Js=[0,2/3,1/3,0],Ks=[0,1/3,2/3,0],Qs=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=rn(Cn);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},fn.reverse=ln,ln.reverse=fn,d3.svg.area=function(){return kn(i)},d3.svg.area.radial=function(){var e=kn(Cn);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},d3.svg.chord=function(){function e(e,u){var a=t(this,s,e,u),f=t(this,o,e,u);return"M"+a.p0+r(a.r,a.p1,a.a1-a.a0)+(n(a,f)?i(a.r,a.p1,a.r,a.p0):i(a.r,a.p1,f.r,f.p0)+r(f.r,f.p1,f.a1-f.a0)+i(f.r,f.p1,a.r,a.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),s=a.call(e,i,r),o=f.call(e,i,r)+Xs,u=l.call(e,i,r)+Xs;return{r:s,a0:o,a1:u,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(u),s*Math.sin(u)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Math.PI)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var s=Ln,o=An,a=On,f=tn,l=nn;return e.radius=function(t){return arguments.length?(a=u(t),e):a},e.source=function(t){return arguments.length?(s=u(t),e):s},e.target=function(t){return arguments.length?(o=u(t),e):o},e.startAngle=function(t){return arguments.length?(f=u(t),e):f},e.endAngle=function(t){return arguments.length?(l=u(t),e):l},e},d3.svg.diagonal=function(){function e(e,i){var s=t.call(this,e,i),o=n.call(this,e,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(r),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var t=Ln,n=An,r=Dn;return e.source=function(n){return arguments.length?(t=u(n),e):t},e.target=function(t){return arguments.length?(n=u(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},d3.svg.diagonal.radial=function(){var e=d3.svg.diagonal(),t=Dn,n=e.projection;return e.projection=function(e){return arguments.length?n(Pn(t=e)):t},e},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function e(e,r){return(Gs.get(t.call(this,e,r))||jn)(n.call(this,e,r))}var t=Bn,n=Hn;return e.type=function(n){return arguments.length?(t=u(n),e):t},e.size=function(t){return arguments.length?(n=u(t),e):n},e};var Gs=d3.map({circle:jn,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Zs)),n=t*Zs;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});d3.svg.symbolTypes=Gs.keys();var Ys=Math.sqrt(3),Zs=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function e(e){e.each(function(){var e=d3.select(this),c=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,h=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f,p=qn(t,c,l),d=e.selectAll(".minor").data(p,String),v=d.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),m=d3.transition(d.exit()).style("opacity",1e-6).remove(),g=d3.transition(d).style("opacity",1),y=e.selectAll("g").data(c,String),b=y.enter().insert("g","path").style("opacity",1e-6),w=d3.transition(y.exit()).style("opacity",1e-6).remove(),E=d3.transition(y).style("opacity",1),S,x=_t(t),T=e.selectAll(".domain").data([0]),N=T.enter().append("path").attr("class","domain"),C=d3.transition(T),k=t.copy(),L=this.__chart__||k;this.__chart__=k,b.append("line").attr("class","tick"),b.append("text");var A=b.select("line"),O=E.select("line"),M=y.select("text").text(h),_=b.select("text"),D=E.select("text");switch(n){case"bottom":S=Fn,v.attr("y2",i),g.attr("x2",0).attr("y2",i),A.attr("y2",r),_.attr("y",Math.max(r,0)+o),O.attr("x2",0).attr("y2",r),D.attr("x",0).attr("y",Math.max(r,0)+o),M.attr("dy",".71em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+s+"V0H"+x[1]+"V"+s);break;case"top":S=Fn,v.attr("y2",-i),g.attr("x2",0).attr("y2",-i),A.attr("y2",-r),_.attr("y",-(Math.max(r,0)+o)),O.attr("x2",0).attr("y2",-r),D.attr("x",0).attr("y",-(Math.max(r,0)+o)),M.attr("dy","0em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+ -s+"V0H"+x[1]+"V"+ -s);break;case"left":S=In,v.attr("x2",-i),g.attr("x2",-i).attr("y2",0),A.attr("x2",-r),_.attr("x",-(Math.max(r,0)+o)),O.attr("x2",-r).attr("y2",0),D.attr("x",-(Math.max(r,0)+o)).attr("y",0),M.attr("dy",".32em").attr("text-anchor","end"),C.attr("d","M"+ -s+","+x[0]+"H0V"+x[1]+"H"+ -s);break;case"right":S=In,v.attr("x2",i),g.attr("x2",i).attr("y2",0),A.attr("x2",r),_.attr("x",Math.max(r,0)+o),O.attr("x2",r).attr("y2",0),D.attr("x",Math.max(r,0)+o).attr("y",0),M.attr("dy",".32em").attr("text-anchor","start"),C.attr("d","M"+s+","+x[0]+"H0V"+x[1]+"H"+s)}if(t.ticks)b.call(S,L),E.call(S,k),w.call(S,k),v.call(S,L),g.call(S,k),m.call(S,k);else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};b.call(S,H),E.call(S,H)}})}var t=d3.scale.linear(),n="bottom",r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;return e.scale=function(n){return arguments.length?(t=n,e):t},e.orient=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return arguments.length?(u=arguments,e):u},e.tickValues=function(t){return arguments.length?(a=t,e):a},e.tickFormat=function(t){return arguments.length?(f=t,e):f},e.tickSize=function(t,n,o){if(!arguments.length)return r;var u=arguments.length-1;return r=+t,i=u>1?+n:r,s=u>0?+arguments[u]:r,e},e.tickPadding=function(t){return arguments.length?(o=+t,e):o},e.tickSubdivide=function(t){return arguments.length?(l=+t,e):l},e},d3.svg.brush=function(){function e(s){s.each(function(){var s=d3.select(this),f=s.selectAll(".background").data([0]),l=s.selectAll(".extent").data([0]),c=s.selectAll(".resize").data(a,String),h;s.style("pointer-events","all").on("mousedown.brush",i).on("touchstart.brush",i),f.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),c.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return eo[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),c.style("display",e.empty()?"none":null),c.exit().remove(),o&&(h=_t(o),f.attr("x",h[0]).attr("width",h[1]-h[0]),n(s)),u&&(h=_t(u),f.attr("y",h[0]).attr("height",h[1]-h[0]),r(s)),t(s)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+f[+/e$/.test(e)][0]+","+f[+/^s/.test(e)][1]+")"})}function n(e){e.select(".extent").attr("x",f[0][0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1][0]-f[0][0])}function r(e){e.select(".extent").attr("y",f[0][1]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1][1]-f[0][1])}function i(){function i(){var e=d3.event.changedTouches;return e?d3.touches(v,e)[0]:d3.mouse(v)}function a(){d3.event.keyCode==32&&(S||(x=null,T[0]-=f[1][0],T[1]-=f[1][1],S=2),M())}function c(){d3.event.keyCode==32&&S==2&&(T[0]+=f[1][0],T[1]+=f[1][1],S=0,M())}function h(){var e=i(),s=!1;N&&(e[0]+=N[0],e[1]+=N[1]),S||(d3.event.altKey?(x||(x=[(f[0][0]+f[1][0])/2,(f[0][1]+f[1][1])/2]),T[0]=f[+(e[0]<x[0])][0],T[1]=f[+(e[1]<x[1])][1]):x=null),w&&p(e,o,0)&&(n(y),s=!0),E&&p(e,u,1)&&(r(y),s=!0),s&&(t(y),g({type:"brush",mode:S?"move":"resize"}))}function p(e,t,n){var r=_t(t),i=r[0],s=r[1],o=T[n],u=f[1][n]-f[0][n],a,c;S&&(i-=o,s-=u+o),a=Math.max(i,Math.min(s,e[n])),S?c=(a+=o)+u:(x&&(o=Math.max(i,Math.min(s,2*x[n]-a))),o<a?(c=a,a=o):c=o);if(f[0][n]!==a||f[1][n]!==c)return l=null,f[0][n]=a,f[1][n]=c,!0}function d(){h(),y.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),d3.select("body").style("cursor",null),C.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),g({type:"brushend"}),M()}var v=this,m=d3.select(d3.event.target),g=s.of(v,arguments),y=d3.select(v),b=m.datum(),w=!/^(n|s)$/.test(b)&&o,E=!/^(e|w)$/.test(b)&&u,S=m.classed("extent"),x,T=i(),N,C=d3.select(window).on("mousemove.brush",h).on("mouseup.brush",d).on("touchmove.brush",h).on("touchend.brush",d).on("keydown.brush",a).on("keyup.brush",c);if(S)T[0]=f[0][0]-T[0],T[1]=f[0][1]-T[1];else if(b){var k=+/w$/.test(b),L=+/^n/.test(b);N=[f[1-k][0]-T[0],f[1-L][1]-T[1]],T[0]=f[k][0],T[1]=f[L][1]}else d3.event.altKey&&(x=T.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",m.style("cursor")),g({type:"brushstart"}),h(),M()}var s=D(e,"brushstart","brush","brushend"),o=null,u=null,a=to[0],f=[[0,0],[0,0]],l;return e.x=function(t){return arguments.length?(o=t,a=to[!o<<1|!u],e):o},e.y=function(t){return arguments.length?(u=t,a=to[!o<<1|!u],e):u},e.extent=function(t){var n,r,i,s,a;return arguments.length?(l=[[0,0],[0,0]],o&&(n=t[0],r=t[1],u&&(n=n[0],r=r[0]),l[0][0]=n,l[1][0]=r,o.invert&&(n=o(n),r=o(r)),r<n&&(a=n,n=r,r=a),f[0][0]=n|0,f[1][0]=r|0),u&&(i=t[0],s=t[1],o&&(i=i[1],s=s[1]),l[0][1]=i,l[1][1]=s,u.invert&&(i=u(i),s=u(s)),s<i&&(a=i,i=s,s=a),f[0][1]=i|0,f[1][1]=s|0),e):(t=l||f,o&&(n=t[0][0],r=t[1][0],l||(n=f[0][0],r=f[1][0],o.invert&&(n=o.invert(n),r=o.invert(r)),r<n&&(a=n,n=r,r=a))),u&&(i=t[0][1],s=t[1][1],l||(i=f[0][1],s=f[1][1],u.invert&&(i=u.invert(i),s=u.invert(s)),s<i&&(a=i,i=s,s=a))),o&&u?[[n,i],[r,s]]:o?[n,r]:u&&[i,s])},e.clear=function(){return l=null,f[0][0]=f[0][1]=f[1][0]=f[1][1]=0,e},e.empty=function(){return o&&f[0][0]===f[1][0]||u&&f[0][1]===f[1][1]},d3.rebind(e,s,"on")};var eo={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},to=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function e(){this.on("mousedown.drag",t).on("touchstart.drag",t)}function t(){function e(){var e=o.parentNode;return f?d3.touches(e).filter(function(e){return e.identifier===f})[0]:d3.mouse(e)}function t(){if(!o.parentNode)return i();var t=e(),n=t[0]-c[0],r=t[1]-c[1];h|=n|r,c=t,M(),u({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:r})}function i(){u({type:"dragend"}),h&&(M(),d3.event.target===a&&p.on("click.drag",s,!0)),p.on(f?"touchmove.drag-"+f:"mousemove.drag",null).on(f?"touchend.drag-"+f:"mouseup.drag",null)}function s(){M(),p.on("click.drag",null)}var o=this,u=n.of(o,arguments),a=d3.event.target,f=d3.event.touches&&d3.event.changedTouches[0].identifier,l,c=e(),h=0,p=d3.select(window).on(f?"touchmove.drag-"+f:"mousemove.drag",t).on(f?"touchend.drag-"+f:"mouseup.drag",i,!0);r?(l=r.apply(o,arguments),l=[l.x-c[0],l.y-c[1]]):l=[0,0],f||M(),u({type:"dragstart"})}var n=D(e,"drag","dragstart","dragend"),r=null;return e.origin=function(t){return arguments.length?(r=t,e):r},d3.rebind(e,n,"on")},d3.behavior.zoom=function(){function e(){this.on("mousedown.zoom",o).on("mousewheel.zoom",u).on("mousemove.zoom",a).on("DOMMouseScroll.zoom",u).on("dblclick.zoom",f).on("touchstart.zoom",l).on("touchmove.zoom",c).on("touchend.zoom",l)}function t(e){return[(e[0]-h[0])/d,(e[1]-h[1])/d]}function n(e){return[e[0]*d+h[0],e[1]*d+h[1]]}function r(e){d=Math.max(m[0],Math.min(m[1],e))}function i(e,t){t=n(t),h[0]+=e[0]-t[0],h[1]+=e[1]-t[1]}function s(e){b&&b.domain(y.range().map(function(e){return(e-h[0])/d}).map(y.invert)),E&&E.domain(w.range().map(function(e){return(e-h[1])/d}).map(w.invert)),d3.event.preventDefault(),e({type:"zoom",scale:d,translate:h})}function o(){function e(){f=1,i(d3.mouse(o),c),s(u)}function n(){f&&M(),l.on("mousemove.zoom",null).on("mouseup.zoom",null),f&&d3.event.target===a&&l.on("click.zoom",r,!0)}function r(){M(),l.on("click.zoom",null)}var o=this,u=g.of(o,arguments),a=d3.event.target,f=0,l=d3.select(window).on("mousemove.zoom",e).on("mouseup.zoom",n),c=t(d3.mouse(o));window.focus(),M()}function u(){p||(p=t(d3.mouse(this))),r(Math.pow(2,Rn()*.002)*d),i(d3.mouse(this),p),s(g.of(this,arguments))}function a(){p=null}function f(){var e=d3.mouse(this),n=t(e);r(d3.event.shiftKey?d/2:d*2),i(e,n),s(g.of(this,arguments))}function l(){var e=d3.touches(this),n=Date.now();v=d,p={},e.forEach(function(e){p[e.identifier]=t(e)}),M();if(e.length===1){if(n-S<500){var o=e[0],u=t(e[0]);r(d*2),i(o,u),s(g.of(this,arguments))}S=n}}function c(){var e=d3.touches(this),t=e[0],n=p[t.identifier];if(o=e[1]){var o,u=p[o.identifier];t=[(t[0]+o[0])/2,(t[1]+o[1])/2],n=[(n[0]+u[0])/2,(n[1]+u[1])/2],r(d3.event.scale*v)}i(t,n),S=null,s(g.of(this,arguments))}var h=[0,0],p,d=1,v,m=ro,g=D(e,"zoom"),y,b,w,E,S;return e.translate=function(t){return arguments.length?(h=t.map(Number),e):h},e.scale=function(t){return arguments.length?(d=+t,e):d},e.scaleExtent=function(t){return arguments.length?(m=t==null?ro:t.map(Number),e):m},e.x=function(t){return arguments.length?(b=t,y=t.copy(),e):b},e.y=function(t){return arguments.length?(E=t,w=t.copy(),e):E},d3.rebind(e,g,"on")};var no,ro=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Un(e[n]));return t}},d3.layout.chord=function(){function e(){var e={},n=[],c=d3.range(o),h=[],p,d,v,m,g;r=[],i=[],p=0,m=-1;while(++m<o){d=0,g=-1;while(++g<o)d+=s[m][g];n.push(d),h.push(d3.range(o)),p+=d}a&&c.sort(function(e,t){return a(n[e],n[t])}),f&&h.forEach(function(e,t){e.sort(function(e,n){return f(s[t][e],s[t][n])})}),p=(2*Math.PI-u*o)/p,d=0,m=-1;while(++m<o){v=d,g=-1;while(++g<o){var y=c[m],b=h[y][g],w=s[y][b],E=d,S=d+=w*p;e[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}i[y]={index:y,startAngle:v,endAngle:d,value:(d-v)/p},d+=u}m=-1;while(++m<o){g=m-1;while(++g<o){var x=e[m+"-"+g],T=e[g+"-"+m];(x.value||T.value)&&r.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}}l&&t()}function t(){r.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n={},r,i,s,o,u=0,a,f,l;return n.matrix=function(e){return arguments.length?(o=(s=e)&&s.length,r=i=null,n):s},n.padding=function(e){return arguments.length?(u=e,r=i=null,n):u},n.sortGroups=function(e){return arguments.length?(a=e,r=i=null,n):a},n.sortSubgroups=function(e){return arguments.length?(f=e,r=null,n):f},n.sortChords=function(e){return arguments.length?(l=e,r&&t(),n):l},n.chords=function(){return r||e(),r},n.groups=function(){return i||e(),i},n},d3.layout.force=function(){function e(e){return function(t,n,r,i,s){if(t.point!==e){var o=t.cx-e.x,u=t.cy-e.y,a=1/Math.sqrt(o*o+u*u);if((i-n)*a<d){var f=t.charge*a*a;return e.px-=o*f,e.py-=u*f,!0}if(t.point&&isFinite(a)){var f=t.pointCharge*a*a;e.px-=o*f,e.py-=u*f}}return!t.charge}}function t(e){e.px=d3.event.x,e.py=d3.event.y,n.resume()}var n={},r=d3.dispatch("start","tick","end"),s=[1,1],o,a,f=.9,l=Qn,c=Gn,h=-30,p=.1,d=.8,v,m=[],g=[],y,b,w;return n.tick=function(){if((a*=.99)<.005)return r.end({type:"end",alpha:a=0}),!0;var t=m.length,n=g.length,i,o,u,l,c,d,v,E,S;for(o=0;o<n;++o){u=g[o],l=u.source,c=u.target,E=c.x-l.x,S=c.y-l.y;if(d=E*E+S*S)d=a*b[o]*((d=Math.sqrt(d))-y[o])/d,E*=d,S*=d,c.x-=E*(v=l.weight/(c.weight+l.weight)),c.y-=S*v,l.x+=E*(v=1-v),l.y+=S*v}if(v=a*p){E=s[0]/2,S=s[1]/2,o=-1;if(v)while(++o<t)u=m[o],u.x+=(E-u.x)*v,u.y+=(S-u.y)*v}if(h){Kn(i=d3.geom.quadtree(m),a,w),o=-1;while(++o<t)(u=m[o]).fixed||i.visit(e(u))}o=-1;while(++o<t)u=m[o],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*f,u.y-=(u.py-(u.py=u.y))*f);r.tick({type:"tick",alpha:a})},n.nodes=function(e){return arguments.length?(m=e,n):m},n.links=function(e){return arguments.length?(g=e,n):g},n.size=function(e){return arguments.length?(s=e,n):s},n.linkDistance=function(e){return arguments.length?(l=u(e),n):l},n.distance=n.linkDistance,n.linkStrength=function(e){return arguments.length?(c=u(e),n):c},n.friction=function(e){return arguments.length?(f=e,n):f},n.charge=function(e){return arguments.length?(h=typeof e=="function"?e:+e,n):h},n.gravity=function(e){return arguments.length?(p=e,n):p},n.theta=function(e){return arguments.length?(d=e,n):d},n.alpha=function(e){return arguments.length?(a?e>0?a=e:a=0:e>0&&(r.start({type:"start",alpha:a=e}),d3.timer(n.tick)),n):a},n.start=function(){function e(e,n){var i=t(r),s=-1,o=i.length,u;while(++s<o)if(!isNaN(u=i[s][e]))return u;return Math.random()*n}function t(){if(!p){p=[];for(i=0;i<o;++i)p[i]=[];for(i=0;i<u;++i){var e=g[i];p[e.source.index].push(e.target),p[e.target.index].push(e.source)}}return p[r]}var r,i,o=m.length,u=g.length,a=s[0],f=s[1],p,d;for(r=0;r<o;++r)(d=m[r]).index=r,d.weight=0;y=[],b=[];for(r=0;r<u;++r)d=g[r],typeof d.source=="number"&&(d.source=m[d.source]),typeof d.target=="number"&&(d.target=m[d.target]),y[r]=l.call(this,d,r),b[r]=c.call(this,d,r),++d.source.weight,++d.target.weight;for(r=0;r<o;++r)d=m[r],isNaN(d.x)&&(d.x=e("x",a)),isNaN(d.y)&&(d.y=e("y",f)),isNaN(d.px)&&(d.px=d.x),isNaN(d.py)&&(d.py=d.y);w=[];if(typeof h=="function")for(r=0;r<o;++r)w[r]=+h.call(this,m[r],r);else for(r=0;r<o;++r)w[r]=h;return n.resume()},n.resume=function(){return n.alpha(.1)},n.stop=function(){return n.alpha(0)},n.drag=function(){o||(o=d3.behavior.drag().origin(i).on("dragstart",Xn).on("drag",t).on("dragend",Vn)),this.on("mouseover.force",$n).on("mouseout.force",Jn).call(o)},d3.rebind(n,r,"on")},d3.layout.partition=function(){function e(t,n,r,i){var s=t.children;t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;r=t.value?r/t.value:0;while(++o<u)e(a=s[o],n,f=a.value*r,i),n+=f}}function t(e){var n=e.children,r=0;if(n&&(s=n.length)){var i=-1,s;while(++i<s)r=Math.max(r,t(n[i]))}return 1+r}function n(n,s){var o=r.call(this,n,s);return e(o[0],0,i[0],i[1]/t(o[0])),o}var r=d3.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},fr(n,r)},d3.layout.pie=function(){function e(s,o){var u=s.map(function(n,r){return+t.call(e,n,r)}),a=+(typeof r=="function"?r.apply(this,arguments):r),f=((typeof i=="function"?i.apply(this,arguments):i)-r)/d3.sum(u),l=d3.range(s.length);n!=null&&l.sort(n===io?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])});var c=[];return l.forEach(function(e){var t;c[e]={data:s[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}}),c}var t=Number,n=io,r=0,i=2*Math.PI;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e};var io={};d3.layout.stack=function(){function e(i,a){var f=i.map(function(n,r){return t.call(e,n,r)}),l=f.map(function(t,n){return t.map(function(t,n){return[o.call(e,t,n),u.call(e,t,n)]})}),c=n.call(e,l,a);f=d3.permute(f,c),l=d3.permute(l,c);var h=r.call(e,l,a),p=f.length,d=f[0].length,v,m,g;for(m=0;m<d;++m){s.call(e,f[0][m],g=h[m],l[0][m][1]);for(v=1;v<p;++v)s.call(e,f[v][m],g+=l[v-1][m][1],l[v][m][1])}return i}var t=i,n=tr,r=nr,s=er,o=Yn,u=Zn;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n=typeof t=="function"?t:so.get(t)||tr,e):n},e.offset=function(t){return arguments.length?(r=typeof t=="function"?t:oo.get(t)||nr,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(u=t,e):u},e.out=function(t){return arguments.length?(s=t,e):s},e};var so=d3.map({"inside-out":function(e){var t=e.length,n,r,i=e.map(rr),s=e.map(ir),o=d3.range(t).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(n=0;n<t;++n)r=o[n],u<a?(u+=s[r],f.push(r)):(a+=s[r],l.push(r));return l.reverse().concat(f)},reverse:function(e){return d3.range(e.length).reverse()},"default":tr}),oo=d3.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];u>i&&(i=u),r.push(u)}for(o=0;o<n;++o)a[o]=(i-r[o])/2;return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i=0,s,o,u,a,f,l,c,h,p,d=[];d[0]=h=p=0;for(o=1;o<r;++o){for(s=0,a=0;s<t;++s)a+=e[s][o][1];for(s=0,f=0,c=n[o][0]-n[o-1][0];s<t;++s){for(u=0,l=(e[s][o][1]-e[s][o-1][1])/(2*c);u<s;++u)l+=(e[u][o][1]-e[u][o-1][1])/c;f+=l*e[s][o][1]}d[o]=h-=a?f/a*c:0,h<p&&(p=h)}for(o=0;o<r;++o)d[o]-=p;return d},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:nr});d3.layout.histogram=function(){function e(e,s){var o=[],u=e.map(n,this),a=r.call(this,u,s),f=i.call(this,a,u,s),l,s=-1,c=u.length,h=f.length-1,p=t?1:1/c,d;while(++s<h)l=o[s]=[],l.dx=f[s+1]-(l.x=f[s]),l.y=0;if(h>0){s=-1;while(++s<c)d=u[s],d>=a[0]&&d<=a[1]&&(l=o[d3.bisect(f,d,1,h)-1],l.y+=p,l.push(e[s]))}return o}var t=!0,n=Number,r=ar,i=or;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=u(t),e):r},e.bins=function(t){return arguments.length?(i=typeof t=="number"?function(e){return ur(e,t)}:u(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},d3.layout.hierarchy=function(){function e(t,o,u){var a=i.call(n,t,o),f=uo?t:{data:t};f.depth=o,u.push(f);if(a&&(c=a.length)){var l=-1,c,h=f.children=[],p=0,d=o+1,v;while(++l<c)v=e(a[l],d,u),v.parent=f,h.push(v),p+=v.value;r&&h.sort(r),s&&(f.value=p)}else s&&(f.value=+s.call(n,t,o)||0);return f}function t(e,r){var i=e.children,o=0;if(i&&(a=i.length)){var u=-1,a,f=r+1;while(++u<a)o+=t(i[u],f)}else s&&(o=+s.call(n,uo?e:e.data,r)||0);return s&&(e.value=o),o}function n(t){var n=[];return e(t,0,n),n}var r=hr,i=lr,s=cr;return n.sort=function(e){return arguments.length?(r=e,n):r},n.children=function(e){return arguments.length?(i=e,n):i},n.value=function(e){return arguments.length?(s=e,n):s},n.revalue=function(e){return t(e,0),e},n};var uo=!1;d3.layout.pack=function(){function e(e,i){var s=t.call(this,e,i),o=s[0];o.x=0,o.y=0,Pr(o,function(e){e.r=Math.sqrt(e.value)}),Pr(o,yr);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;Pr(o,function(e){e.r+=l}),Pr(o,yr),Pr(o,function(e){e.r-=l}),f=Math.max(2*o.r/u,2*o.r/a)}return Er(o,u/2,a/2,1/f),s}var t=d3.layout.hierarchy().sort(dr),n=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.padding=function(t){return arguments.length?(n=+t,e):n},fr(e,t)},d3.layout.cluster=function(){function e(e,i){var s=t.call(this,e,i),o=s[0],u,a=0,f,l;Pr(o,function(e){var t=e.children;t&&t.length?(e.x=Tr(t),e.y=xr(t)):(e.x=u?a+=n(e,u):0,e.y=0,u=e)});var c=Nr(o),h=Cr(o),p=c.x-n(c,h)/2,d=h.x+n(h,c)/2;return Pr(o,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=(1-(o.y?e.y/o.y:1))*r[1]}),s}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.tree=function(){function e(e,i){function s(e,t){var r=e.children,i=e._tree;if(r&&(o=r.length)){var o,a=r[0],f,l=a,c,h=-1;while(++h<o)c=r[h],s(c,f),l=u(c,f,l),f=c;Hr(e);var p=.5*(a._tree.prelim+c._tree.prelim);t?(i.prelim=t._tree.prelim+n(e,t),i.mod=i.prelim-p):i.prelim=p}else t&&(i.prelim=t._tree.prelim+n(e,t))}function o(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i)o(n[r],t)}}function u(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ar(o),i=Lr(i),o&&i)u=Lr(u),s=Ar(s),s._tree.ancestor=e,h=o._tree.prelim+l-i._tree.prelim-a+n(o,i),h>0&&(Br(jr(o,e,r),e,h),a+=h,f+=h),l+=o._tree.mod,a+=i._tree.mod,c+=u._tree.mod,f+=s._tree.mod;o&&!Ar(s)&&(s._tree.thread=o,s._tree.mod+=l-f),i&&!Lr(u)&&(u._tree.thread=i,u._tree.mod+=a-c,r=e)}return r}var a=t.call(this,e,i),f=a[0];Pr(f,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),s(f),o(f,-f._tree.prelim);var l=Or(f,_r),c=Or(f,Mr),h=Or(f,Dr),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;return Pr(f,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=e.depth/v*r[1],delete e._tree}),a}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.treemap=function(){function e(e,t){var n=-1,r=e.length,i,s;while(++n<r)s=(i=e[n]).value*(t<0?0:t),i.area=isNaN(s)||s<=0?0:s}function t(n){var s=n.children;if(s&&s.length){var o=l(n),u=[],a=s.slice(),f,c=Infinity,h,p=Math.min(o.dx,o.dy),d;e(a,o.dx*o.dy/n.value),u.area=0;while((d=a.length)>0)u.push(f=a[d-1]),u.area+=f.area,(h=r(u,p))<=c?(a.pop(),c=h):(u.area-=u.pop().area,i(u,p,o,!1),p=Math.min(o.dx,o.dy),u.length=u.area=0,c=Infinity);u.length&&(i(u,p,o,!0),u.length=u.area=0),s.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var s=l(t),o=r.slice(),u,a=[];e(o,s.dx*s.dy/t.value),a.area=0;while(u=o.pop())a.push(u),a.area+=u.area,u.z!=null&&(i(a,u.z?s.dx:s.dy,s,!o.length),a.length=a.area=0);r.forEach(n)}}function r(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;r<s&&(s=r),r>i&&(i=r)}return n*=n,t*=t,n?Math.max(t*i*p/n,n/(t*s*p)):Infinity}function i(e,t,n,r){var i=-1,s=e.length,o=n.x,a=n.y,f=t?u(e.area/t):0,l;if(t==n.dx){if(r||f>n.dy)f=n.dy;while(++i<s)l=e[i],l.x=o,l.y=a,l.dy=f,o+=l.dx=Math.min(n.x+n.dx-o,f?u(l.area/f):0);l.z=!0,l.dx+=n.x+n.dx-o,n.y+=f,n.dy-=f}else{if(r||f>n.dx)f=n.dx;while(++i<s)l=e[i],l.x=o,l.y=a,l.dx=f,a+=l.dy=Math.min(n.y+n.dy-a,f?u(l.area/f):0);l.z=!1,l.dy+=n.y+n.dy-a,n.x+=f,n.dx-=f}}function s(r){var i=h||o(r),s=i[0];return s.x=0,s.y=0,s.dx=a[0],s.dy=a[1],h&&o.revalue(s),e([s],s.dx*s.dy/s.value),(h?n:t)(s),c&&(h=i),i}var o=d3.layout.hierarchy(),u=Math.round,a=[1,1],f=null,l=Fr,c=!1,h,p=.5*(1+Math.sqrt(5));return s.size=function(e){return arguments.length?(a=e,s):a},s.padding=function(e){function t(t){var n=e.call(s,t,t.depth);return n==null?Fr(t):Ir(t,typeof n=="number"?[n,n,n,n]:n)}function n(t){return Ir(t,e)}if(!arguments.length)return f;var r;return l=(f=e)==null?Fr:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n,s},s.round=function(e){return arguments.length?(u=e?Math.round:Number,s):u!=Number},s.sticky=function(e){return arguments.length?(c=e,h=null,s):c},s.ratio=function(e){return arguments.length?(p=e,s):p},fr(s,o)},d3.csv=qr(",","text/csv"),d3.tsv=qr(" ","text/tab-separated-values"),d3.geo={};var ao=Math.PI/180;d3.geo.azimuthal=function(){function e(e){var n=e[0]*ao-s,o=e[1]*ao,f=Math.cos(n),l=Math.sin(n),c=Math.cos(o),h=Math.sin(o),p=t!=="orthographic"?a*h+u*c*f:null,d,v=t==="stereographic"?1/(1+p):t==="gnomonic"?1/p:t==="equidistant"?(d=Math.acos(p),d?d/Math.sin(d):0):t==="equalarea"?Math.sqrt(2/(1+p)):1,m=v*c*l,g=v*(a*c*f-u*h);return[r*m+i[0],r*g+i[1]]}var t="orthographic",n,r=200,i=[480,250],s,o,u,a;return e.invert=function(e){var n=(e[0]-i[0])/r,o=(e[1]-i[1])/r,f=Math.sqrt(n*n+o*o),l=t==="stereographic"?2*Math.atan(f):t==="gnomonic"?Math.atan(f):t==="equidistant"?f:t==="equalarea"?2*Math.asin(.5*f):Math.asin(f),c=Math.sin(l),h=Math.cos(l);return[(s+Math.atan2(n*c,f*u*h+o*a*c))/ao,Math.asin(h*a-(f?o*c*u/f:0))/ao]},e.mode=function(n){return arguments.length?(t=n+"",e):t},e.origin=function(t){return arguments.length?(n=t,s=n[0]*ao,o=n[1]*ao,u=Math.cos(o),a=Math.sin(o),e):n},e.scale=function(t){return arguments.length?(r=+t,e):r},e.translate=function(t){return arguments.length?(i=[+t[0],+t[1]],e):i},e.origin([0,0])},d3.geo.albers=function(){function e(e){var t=u*(ao*e[0]-o),n=Math.sqrt(a-2*u*Math.sin(ao*e[1]))/u;return[i*n*Math.sin(t)+s[0],i*(n*Math.cos(t)-f)+s[1]]}function t(){var t=ao*r[0],i=ao*r[1],s=ao*n[1],l=Math.sin(t),c=Math.cos(t);return o=ao*n[0],u=.5*(l+Math.sin(i)),a=c*c+2*u*l,f=Math.sqrt(a-2*u*Math.sin(s))/u,e}var n=[-98,38],r=[29.5,45.5],i=1e3,s=[480,250],o,u,a,f;return e.invert=function(e){var t=(e[0]-s[0])/i,n=(e[1]-s[1])/i,r=f+n,l=Math.atan2(t,r),c=Math.sqrt(t*t+r*r);return[(o+l/u)/ao,Math.asin((a-c*c*u*u)/(2*u))/ao]},e.origin=function(e){return arguments.length?(n=[+e[0],+e[1]],t()):n},e.parallels=function(e){return arguments.length?(r=[+e[0],+e[1]],t()):r},e.scale=function(t){return arguments.length?(i=+t,e):i},e.translate=function(t){return arguments.length?(s=[+t[0],+t[1]],e):s},t()},d3.geo.albersUsa=function(){function e(e){var s=e[0],o=e[1];return(o>50?n:s<-140?r:o<21?i:t)(e)}var t=d3.geo.albers(),n=d3.geo.albers().origin([-160,60]).parallels([55,65]),r=d3.geo.albers().origin([-160,20]).parallels([8,18]),i=d3.geo.albers().origin([-60,10]).parallels([8,18]);return e.scale=function(s){return arguments.length?(t.scale(s),n.scale(s*.6),r.scale(s),i.scale(s*1.5),e.translate(t.translate())):t.scale()},e.translate=function(s){if(!arguments.length)return t.translate();var o=t.scale()/1e3,u=s[0],a=s[1];return t.translate(s),n.translate([u-400*o,a+170*o]),r.translate([u-190*o,a+200*o]),i.translate([u+580*o,a+430*o]),e},e.scale(t.scale())},d3.geo.bonne=function(){function e(e){var u=e[0]*ao-r,a=e[1]*ao-i;if(s){var f=o+s-a,l=u*Math.cos(a)/f;u=f*Math.sin(l),a=f*Math.cos(l)-o}else u*=Math.cos(a),a*=-1;return[t*u+n[0],t*a+n[1]]}var t=200,n=[480,250],r,i,s,o;return e.invert=function(e){var i=(e[0]-n[0])/t,u=(e[1]-n[1])/t;if(s){var a=o+u,f=Math.sqrt(i*i+a*a);u=o+s-f,i=r+f*Math.atan2(i,a)/Math.cos(u)}else u*=-1,i/=Math.cos(u);return[i/ao,u/ao]},e.parallel=function(t){return arguments.length?(o=1/Math.tan
-(s=t*ao),e):s/ao},e.origin=function(t){return arguments.length?(r=t[0]*ao,i=t[1]*ao,e):[r/ao,i/ao]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function e(e){var r=e[0]/360,i=-e[1]/360;return[t*r+n[0],t*i+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,-360*i]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.mercator=function(){function e(e){var r=e[0]/360,i=-(Math.log(Math.tan(Math.PI/4+e[1]*ao/2))/ao)/360;return[t*r+n[0],t*Math.max(-0.5,Math.min(.5,i))+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,2*Math.atan(Math.exp(-360*i*ao))/ao-90]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.path=function(){function e(e,t){typeof s=="function"&&(o=Ur(s.apply(this,arguments))),f(e);var n=a.length?a.join(""):null;return a=[],n}function t(e){return u(e).join(",")}function n(e){var t=i(e[0]),n=0,r=e.length;while(++n<r)t-=i(e[n]);return t}function r(e){var t=d3.geom.polygon(e[0].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i=r[0],s=r[1],o=n,a=0,f=e.length;while(++a<f)t=d3.geom.polygon(e[a].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i-=r[0],s-=r[1],o-=n;return[i,s,6*o]}function i(e){return Math.abs(d3.geom.polygon(e.map(u)).area())}var s=4.5,o=Ur(s),u=d3.geo.albersUsa(),a=[],f=Rr({FeatureCollection:function(e){var t=e.features,n=-1,r=t.length;while(++n<r)a.push(f(t[n].geometry))},Feature:function(e){f(e.geometry)},Point:function(e){a.push("M",t(e.coordinates),o)},MultiPoint:function(e){var n=e.coordinates,r=-1,i=n.length;while(++r<i)a.push("M",t(n[r]),o)},LineString:function(e){var n=e.coordinates,r=-1,i=n.length;a.push("M");while(++r<i)a.push(t(n[r]),"L");a.pop()},MultiLineString:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1,u=s.length,a.push("M");while(++o<u)a.push(t(s[o]),"L");a.pop()}},Polygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1;if((u=s.length-1)>0){a.push("M");while(++o<u)a.push(t(s[o]),"L");a[a.length-1]="Z"}}},MultiPolygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u,f,l,c;while(++r<i){s=n[r],o=-1,u=s.length;while(++o<u){f=s[o],l=-1;if((c=f.length-1)>0){a.push("M");while(++l<c)a.push(t(f[l]),"L");a[a.length-1]="Z"}}}},GeometryCollection:function(e){var t=e.geometries,n=-1,r=t.length;while(++n<r)a.push(f(t[n]))}}),l=e.area=Rr({FeatureCollection:function(e){var t=0,n=e.features,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t},Feature:function(e){return l(e.geometry)},Polygon:function(e){return n(e.coordinates)},MultiPolygon:function(e){var t=0,r=e.coordinates,i=-1,s=r.length;while(++i<s)t+=n(r[i]);return t},GeometryCollection:function(e){var t=0,n=e.geometries,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t}},0),c=e.centroid=Rr({Feature:function(e){return c(e.geometry)},Polygon:function(e){var t=r(e.coordinates);return[t[0]/t[2],t[1]/t[2]]},MultiPolygon:function(e){var t=0,n=e.coordinates,i,s=0,o=0,u=0,a=-1,f=n.length;while(++a<f)i=r(n[a]),s+=i[0],o+=i[1],u+=i[2];return[s/u,o/u]}});return e.projection=function(t){return u=t,e},e.pointRadius=function(t){return typeof t=="function"?s=t:(s=+t,o=Ur(s)),e},e},d3.geo.bounds=function(e){var t=Infinity,n=Infinity,r=-Infinity,i=-Infinity;return zr(e,function(e,s){e<t&&(t=e),e>r&&(r=e),s<n&&(n=s),s>i&&(i=s)}),[[t,n],[r,i]]};var fo={Feature:Wr,FeatureCollection:Xr,GeometryCollection:Vr,LineString:$r,MultiLineString:Jr,MultiPoint:$r,MultiPolygon:Kr,Point:Qr,Polygon:Gr};d3.geo.circle=function(){function e(){}function t(e){return a.distance(e)<u}function n(e){var t=-1,n=e.length,i=[],s,o,f,l,c;while(++t<n)c=a.distance(f=e[t]),c<u?(o&&i.push(ti(o,f)((l-u)/(l-c))),i.push(f),s=o=null):(o=f,!s&&i.length&&(i.push(ti(i[i.length-1],o)((u-l)/(c-l))),s=o)),l=c;return s=e[0],o=i[0],o&&f[0]===s[0]&&f[1]===s[1]&&(f[0]!==o[0]||f[1]!==o[1])&&i.push(o),r(i)}function r(e){var t=0,n=e.length,r,i,s=n?[e[0]]:e,o,u=a.source();while(++t<n){o=a.source(e[t-1])(e[t]).coordinates;for(r=0,i=o.length;++r<i;)s.push(o[r])}return a.source(u),s}var s=[0,0],o=89.99,u=o*ao,a=d3.geo.greatArc().source(s).target(i);e.clip=function(e){return typeof s=="function"&&a.source(s.apply(this,arguments)),f(e)||null};var f=Rr({FeatureCollection:function(e){var t=e.features.map(f).filter(i);return t&&(e=Object.create(e),e.features=t,e)},Feature:function(e){var t=f(e.geometry);return t&&(e=Object.create(e),e.geometry=t,e)},Point:function(e){return t(e.coordinates)&&e},MultiPoint:function(e){var n=e.coordinates.filter(t);return n.length&&{type:e.type,coordinates:n}},LineString:function(e){var t=n(e.coordinates);return t.length&&(e=Object.create(e),e.coordinates=t,e)},MultiLineString:function(e){var t=e.coordinates.map(n).filter(function(e){return e.length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},Polygon:function(e){var t=e.coordinates.map(n);return t[0].length&&(e=Object.create(e),e.coordinates=t,e)},MultiPolygon:function(e){var t=e.coordinates.map(function(e){return e.map(n)}).filter(function(e){return e[0].length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},GeometryCollection:function(e){var t=e.geometries.map(f).filter(i);return t.length&&(e=Object.create(e),e.geometries=t,e)}});return e.origin=function(t){return arguments.length?(s=t,typeof s!="function"&&a.source(s),e):s},e.angle=function(t){return arguments.length?(u=(o=+t)*ao,e):o},d3.rebind(e,a,"precision")},d3.geo.greatArc=function(){function e(){var t=e.distance.apply(this,arguments),r=0,u=s/t,a=[n];while((r+=u)<1)a.push(o(r));return a.push(i),{type:"LineString",coordinates:a}}var t=Yr,n,r=Zr,i,s=6*ao,o=ei();return e.distance=function(){return typeof t=="function"&&o.source(n=t.apply(this,arguments)),typeof r=="function"&&o.target(i=r.apply(this,arguments)),o.distance()},e.source=function(r){return arguments.length?(t=r,typeof t!="function"&&o.source(n=t),e):t},e.target=function(t){return arguments.length?(r=t,typeof r!="function"&&o.target(i=r),e):r},e.precision=function(t){return arguments.length?(s=t*ao,e):s/ao},e},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(e,t){var n=t||ni(e),r=[],i=n[0],s=n[1],o=0,u=0,a=NaN,f=NaN,l=0;do l=0,e(i-1,s-1)&&(l+=1),e(i,s-1)&&(l+=2),e(i-1,s)&&(l+=4),e(i,s)&&(l+=8),l===6?(o=f===-1?-1:1,u=0):l===9?(o=0,u=a===1?-1:1):(o=lo[l],u=co[l]),o!=a&&u!=f&&(r.push([i,s]),a=o,f=u),i+=o,s+=u;while(n[0]!=i||n[1]!=s);return r};var lo=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],co=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(e){if(e.length<3)return[];var t=e.length,n=t-1,r=[],i=[],s,o,u=0,a,f,l,c,h,p,d,v;for(s=1;s<t;++s)e[s][1]<e[u][1]?u=s:e[s][1]==e[u][1]&&(u=e[s][0]<e[u][0]?s:u);for(s=0;s<t;++s){if(s===u)continue;f=e[s][1]-e[u][1],a=e[s][0]-e[u][0],r.push({angle:Math.atan2(f,a),index:s})}r.sort(function(e,t){return e.angle-t.angle}),d=r[0].angle,p=r[0].index,h=0;for(s=1;s<n;++s)o=r[s].index,d==r[s].angle?(a=e[p][0]-e[u][0],f=e[p][1]-e[u][1],l=e[o][0]-e[u][0],c=e[o][1]-e[u][1],a*a+f*f>=l*l+c*c?r[s].index=-1:(r[h].index=-1,d=r[s].angle,h=s,p=o)):(d=r[s].angle,h=s,p=o);i.push(u);for(s=0,o=0;s<2;++o)r[o].index!==-1&&(i.push(r[o].index),s++);v=i.length;for(;o<n;++o){if(r[o].index===-1)continue;while(!ri(i[v-2],i[v-1],r[o].index,e))--v;i[v++]=r[o].index}var m=[];for(s=0;s<v;++s)m.push(e[i[s]]);return m},d3.geom.polygon=function(e){return e.area=function(){var t=0,n=e.length,r=e[n-1][0]*e[0][1],i=e[n-1][1]*e[0][0];while(++t<n)r+=e[t-1][0]*e[t][1],i+=e[t-1][1]*e[t][0];return(i-r)*.5},e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;arguments.length||(t=-1/(6*e.area()));while(++n<r)o=u,u=e[n],a=o[0]*u[1]-u[0]*o[1],i+=(o[0]+u[0])*a,s+=(o[1]+u[1])*a;return[i*t,s*t]},e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice(),t.length=0,a=e[r],f=n[(o=n.length)-1],s=-1;while(++s<o)l=n[s],ii(l,u,a)?(ii(f,u,a)||t.push(si(f,l,u,a)),t.push(l)):ii(f,u,a)&&t.push(si(f,l,u,a)),f=l;u=a}return t},e},d3.geom.voronoi=function(e){var t=e.map(function(){return[]});return oi(e,function(e){var n,r,i,s,o,u;e.a===1&&e.b>=0?(n=e.ep.r,r=e.ep.l):(n=e.ep.l,r=e.ep.r),e.a===1?(o=n?n.y:-1e6,i=e.c-e.b*o,u=r?r.y:1e6,s=e.c-e.b*u):(i=n?n.x:-1e6,o=e.c-e.a*i,s=r?r.x:1e6,u=e.c-e.a*s);var a=[i,o],f=[s,u];t[e.region.l.index].push(a,f),t[e.region.r.index].push(a,f)}),t.map(function(t,n){var r=e[n][0],i=e[n][1];return t.forEach(function(e){e.angle=Math.atan2(e[0]-r,e[1]-i)}),t.sort(function(e,t){return e.angle-t.angle}).filter(function(e,n){return!n||e.angle-t[n-1].angle>1e-10})})};var ho={l:"r",r:"l"};d3.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return oi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++)n.push([i,t[u],t[u+1]])}),n},d3.geom.quadtree=function(e,t,n,r,i){function s(e,t,n,r,i,s){if(isNaN(t.x)||isNaN(t.y))return;if(e.leaf){var u=e.point;u?Math.abs(u.x-t.x)+Math.abs(u.y-t.y)<.01?o(e,t,n,r,i,s):(e.point=null,o(e,u,n,r,i,s),o(e,t,n,r,i,s)):e.point=t}else o(e,t,n,r,i,s)}function o(e,t,n,r,i,o){var u=(n+i)*.5,a=(r+o)*.5,f=t.x>=u,l=t.y>=a,c=(l<<1)+f;e.leaf=!1,e=e.nodes[c]||(e.nodes[c]=ui()),f?n=u:i=u,l?r=a:o=a,s(e,t,n,r,i,o)}var u,a=-1,f=e.length;f&&isNaN(e[0].x)&&(e=e.map(fi));if(arguments.length<5)if(arguments.length===3)i=r=n,n=t;else{t=n=Infinity,r=i=-Infinity;while(++a<f)u=e[a],u.x<t&&(t=u.x),u.y<n&&(n=u.y),u.x>r&&(r=u.x),u.y>i&&(i=u.y);var l=r-t,c=i-n;l>c?i=n+l:r=t+c}var h=ui();return h.add=function(e){s(h,e,t,n,r,i)},h.visit=function(e){ai(e,h,t,n,r,i)},e.forEach(h.add),h},d3.time={};var po=Date,vo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];li.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){mo.setUTCDate.apply(this._,arguments)},setDay:function(){mo.setUTCDay.apply(this._,arguments)},setFullYear:function(){mo.setUTCFullYear.apply(this._,arguments)},setHours:function(){mo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){mo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){mo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){mo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){mo.setUTCSeconds.apply(this._,arguments)},setTime:function(){mo.setTime.apply(this._,arguments)}};var mo=Date.prototype,go="%a %b %e %H:%M:%S %Y",yo="%m/%d/%y",bo="%H:%M:%S",wo=vo,Eo=wo.map(ci),So=["January","February","March","April","May","June","July","August","September","October","November","December"],xo=So.map(ci);d3.time.format=function(e){function t(t){var r=[],i=-1,s=0,o,u;while(++i<n)e.charCodeAt(i)==37&&(r.push(e.substring(s,i),(u=Po[o=e.charAt(++i)])?u(t):o),s=i+1);return r.push(e.substring(s,i)),r.join("")}var n=e.length;return t.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=hi(n,e,t,0);if(r!=t.length)return null;"p"in n&&(n.H=n.H%12+n.p*12);var i=new po;return i.setFullYear(n.y,n.m,n.d),i.setHours(n.H,n.M,n.S,n.L),i},t.toString=function(){return e},t};var To=d3.format("02d"),No=d3.format("03d"),Co=d3.format("04d"),ko=d3.format("2d"),Lo=pi(wo),Ao=pi(Eo),Oo=pi(So),Mo=di(So),_o=pi(xo),Do=di(xo),Po={a:function(e){return Eo[e.getDay()]},A:function(e){return wo[e.getDay()]},b:function(e){return xo[e.getMonth()]},B:function(e){return So[e.getMonth()]},c:d3.time.format(go),d:function(e){return To(e.getDate())},e:function(e){return ko(e.getDate())},H:function(e){return To(e.getHours())},I:function(e){return To(e.getHours()%12||12)},j:function(e){return No(1+d3.time.dayOfYear(e))},L:function(e){return No(e.getMilliseconds())},m:function(e){return To(e.getMonth()+1)},M:function(e){return To(e.getMinutes())},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e){return To(e.getSeconds())},U:function(e){return To(d3.time.sundayOfYear(e))},w:function(e){return e.getDay()},W:function(e){return To(d3.time.mondayOfYear(e))},x:d3.time.format(yo),X:d3.time.format(bo),y:function(e){return To(e.getFullYear()%100)},Y:function(e){return Co(e.getFullYear()%1e4)},Z:_i,"%":function(e){return"%"}},Ho={a:vi,A:mi,b:gi,B:yi,c:bi,d:Ci,e:Ci,H:ki,I:ki,L:Oi,m:Ni,M:Li,p:Mi,S:Ai,x:wi,X:Ei,y:xi,Y:Si},Bo=/^\s*\d+/,jo=d3.map({am:0,pm:1});d3.time.format.utc=function(e){function t(e){try{po=li;var t=new po;return t._=e,n(t)}finally{po=Date}}var n=d3.time.format(e);return t.parse=function(e){try{po=li;var t=n.parse(e);return t&&t._}finally{po=Date}},t.toString=n.toString,t};var Fo=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Di:Fo,Di.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Di.toString=Fo.toString,d3.time.second=Pi(function(e){return new po(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Pi(function(e){return new po(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Pi(function(e){var t=e.getTimezoneOffset()/60;return new po((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Pi(function(e){var t=new po(1970,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(e){var t=d3.time.year(e);return Math.floor((e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5)},vo.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=d3.time[e]=Pi(function(e){return(e=d3.time.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});d3.time[e+"s"]=n.range,d3.time[e+"s"].utc=n.utc.range,d3.time[e+"OfYear"]=function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Pi(function(e){return e=d3.time.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Pi(function(e){return e=d3.time.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Io=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],qo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Ro=[[d3.time.format("%Y"),function(e){return!0}],[d3.time.format("%B"),function(e){return e.getMonth()}],[d3.time.format("%b %d"),function(e){return e.getDate()!=1}],[d3.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[d3.time.format("%I %p"),function(e){return e.getHours()}],[d3.time.format("%I:%M"),function(e){return e.getMinutes()}],[d3.time.format(":%S"),function(e){return e.getSeconds()}],[d3.time.format(".%L"),function(e){return e.getMilliseconds()}]],Uo=d3.scale.linear(),zo=Ii(Ro);qo.year=function(e,t){return Uo.domain(e.map(Ri)).ticks(t).map(qi)},d3.time.scale=function(){return Bi(d3.scale.linear(),qo,zo)};var Wo=qo.map(function(e){return[e[0].utc,e[1]]}),Xo=[[d3.time.format.utc("%Y"),function(e){return!0}],[d3.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]],Vo=Ii(Xo);Wo.year=function(e,t){return Uo.domain(e.map(zi)).ticks(t).map(Ui)},d3.time.scale.utc=function(){return Bi(d3.scale.linear(),Wo,Vo)}})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v3.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v3.min.js
deleted file mode 100644
index 7975878f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/d3.v3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-d3=function(){function o(e){return e!=null&&!isNaN(e)}function a(e){return e.length}function f(e){var t=1;while(e*t%1)t*=10;return t}function l(e,t){try{for(var n in t){Object.defineProperty(e.prototype,n,{value:t[n],enumerable:false})}}catch(r){e.prototype=t}}function c(){}function d(){}function v(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function m(){}function g(e){function r(){var n=t,r=-1,i=n.length,s;while(++r<i)if(s=n[r].on)s.apply(this,arguments);return e}var t=[],n=new c;r.on=function(r,i){var s=n.get(r),o;if(arguments.length<2)return s&&s.on;if(s){s.on=null;t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1));n.remove(r)}if(i)t.push(n.set(r,{on:i}));return e};return r}function y(){e.event.stopPropagation();e.event.preventDefault()}function w(){var t=e.event,n;while(n=t.sourceEvent)t=n;return t}function E(e,t){function n(){e.on(t,null)}e.on(t,function(){y();n()},true);setTimeout(n,0)}function S(t){var n=new m,r=0,i=arguments.length;while(++r<i)n[arguments[r]]=g(n);n.of=function(r,i){return function(s){try{var o=s.sourceEvent=e.event;s.target=t;e.event=s;n[s.type].apply(r,i)}finally{e.event=o}}};return n}function T(r,i){var s=r.ownerSVGElement||r;if(s.createSVGPoint){var o=s.createSVGPoint();if(x<0&&(n.scrollX||n.scrollY)){s=e.select(t.body).append("svg").style("position","absolute").style("top",0).style("left",0);var u=s[0][0].getScreenCTM();x=!(u.f||u.e);s.remove()}if(x){o.x=i.pageX;o.y=i.pageY}else{o.x=i.clientX;o.y=i.clientY}o=o.matrixTransform(r.getScreenCTM().inverse());return[o.x,o.y]}var a=r.getBoundingClientRect();return[i.clientX-a.left-r.clientLeft,i.clientY-a.top-r.clientTop]}function C(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function k(e){return Array.prototype.slice.call(e)}function O(e){A(e,B);return e}function j(e){return function(){return M(e,this)}}function F(e){return function(){return _(e,this)}}function q(t,n){function r(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function s(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function u(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}function a(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}t=e.ns.qualify(t);return n==null?t.local?i:r:typeof n==="function"?t.local?a:u:t.local?o:s}function R(e){return e.trim().replace(/\s+/g," ")}function z(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function W(e,t){function r(){var r=-1;while(++r<n)e[r](this,t)}function i(){var r=-1,i=t.apply(this,arguments);while(++r<n)e[r](this,i)}e=e.trim().split(/\s+/).map(X);var n=e.length;return typeof t==="function"?i:r}function X(e){var t=z(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";if(r){t.lastIndex=0;if(!t.test(i))n.setAttribute("class",R(i+" "+e))}else{n.setAttribute("class",R(i.replace(t," ")))}}}function V(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);if(r==null)this.style.removeProperty(e);else this.style.setProperty(e,r,n)}return t==null?r:typeof t==="function"?s:i}function $(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);if(n==null)delete this[e];else this[e]=n}return t==null?n:typeof t==="function"?i:r}function J(e){return{__data__:e}}function K(e){return function(){return H(this,e)}}function Q(t){if(!arguments.length)t=e.ascending;return function(e,n){return!e-!n||t(e.__data__,n.__data__)}}function G(){}function Y(t,n,r){function a(){var e=this[i];if(e){this.removeEventListener(t,e,e.$);delete this[i]}}function f(){var e=o(n,N(arguments));a.call(this);this.addEventListener(t,this[i]=e,e.$=r);e._=n}function l(){var n=new RegExp("^__on([^.]+)"+e.requote(t)+"$"),r;for(var i in this){if(r=i.match(n)){var s=this[i];this.removeEventListener(r[1],s,s.$);delete this[i]}}}var i="__on"+t,s=t.indexOf("."),o=et;if(s>0)t=t.substring(0,s);var u=Z.get(t);if(u)t=u,o=tt;return s?n?f:a:n?G:l}function et(t,n){return function(r){var i=e.event;e.event=r;n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=i}}}function tt(e,t){var n=et(e,t);return function(e){var t=this,r=e.relatedTarget;if(!r||r!==t&&!(r.compareDocumentPosition(t)&8)){n.call(t,e)}}}function nt(e,t){for(var n=0,r=e.length;n<r;n++){for(var i=e[n],s=0,o=i.length,u;s<o;s++){if(u=i[s])t(u,s,n)}}return e}function rt(e){A(e,it);return e}function ft(){}function lt(e,t,n){return new ct(e,t,n)}function ct(e,t,n){this.h=e;this.s=t;this.l=n}function pt(e,t,n){function s(e){if(e>360)e-=360;else if(e<0)e+=360;if(e<60)return r+(i-r)*e/60;if(e<180)return i;if(e<240)return r+(i-r)*(240-e)/60;return r}function o(e){return Math.round(s(e)*255)}var r,i;e=e%360;if(e<0)e+=360;t=t<0?0:t>1?1:t;n=n<0?0:n>1?1:n;i=n<=.5?n*(1+t):n+t-n*t;r=2*n-i;return qt(o(e+120),o(e),o(e-120))}function yt(e){return e>0?1:e<0?-1:0}function bt(e){return Math.acos(Math.max(-1,Math.min(1,e)))}function wt(e){return e>1?dt/2:e<-1?-dt/2:Math.asin(e)}function Et(e){return(Math.exp(e)-Math.exp(-e))/2}function St(e){return(Math.exp(e)+Math.exp(-e))/2}function xt(e){return(e=Math.sin(e/2))*e}function Tt(e,t,n){return new Nt(e,t,n)}function Nt(e,t,n){this.h=e;this.c=t;this.l=n}function kt(e,t,n){return Lt(n,Math.cos(e*=mt)*t,Math.sin(e)*t)}function Lt(e,t,n){return new At(e,t,n)}function At(e,t,n){this.l=e;this.a=t;this.b=n}function Ht(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;i=jt(i)*Mt;r=jt(r)*_t;s=jt(s)*Dt;return qt(It(3.2404542*i-1.5371385*r-.4985314*s),It(-.969266*i+1.8760108*r+.041556*s),It(.0556434*i-.2040259*r+1.0572252*s))}function Bt(e,t,n){return Tt(Math.atan2(n,t)*gt,Math.sqrt(t*t+n*n),e)}function jt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ft(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function It(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function qt(e,t,n){return new Rt(e,t,n)}function Rt(e,t,n){this.r=e;this.g=t;this.b=n}function zt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Wt(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":{return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100)};case"rgb":{return t(Jt(u[0]),Jt(u[1]),Jt(u[2]))}}}if(a=Kt.get(e))return t(a.r,a.g,a.b);if(e!=null&&e.charAt(0)==="#"){if(e.length===4){r=e.charAt(1);r+=r;i=e.charAt(2);i+=i;s=e.charAt(3);s+=s}else if(e.length===7){r=e.substring(1,3);i=e.substring(3,5);s=e.substring(5,7)}r=parseInt(r,16);i=parseInt(i,16);s=parseInt(s,16)}return t(r,i,s)}function Xt(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;if(s){u=a<.5?s/(i+r):s/(2-i-r);if(e==i)o=(t-n)/s+(t<n?6:0);else if(t==i)o=(n-e)/s+2;else o=(e-t)/s+4;o*=60}else{u=o=0}return lt(o,u,a)}function Vt(e,t,n){e=$t(e);t=$t(t);n=$t(n);var r=Ft((.4124564*e+.3575761*t+.1804375*n)/Mt),i=Ft((.2126729*e+.7151522*t+.072175*n)/_t),s=Ft((.0193339*e+.119192*t+.9503041*n)/Dt);return Lt(116*i-16,500*(r-i),200*(i-s))}function $t(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jt(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function Qt(e){return typeof e==="function"?e:function(){return e}}function Gt(e){return e}function Yt(e){return e.length===1?function(t,n){e(t==null?n:null)}:e}function Zt(t,n){function s(t,r,i){if(arguments.length<3)i=r,r=null;var s=e.xhr(t,n,i);s.row=function(e){return arguments.length?s.response((r=e)==null?o:u(e)):r};return s.row(r)}function o(e){return s.parse(e.responseText)}function u(e){return function(t){return s.parse(t.responseText,e)}}function a(e){return e.map(f).join(t)}function f(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var r=new RegExp('["'+t+"\n]"),i=t.charCodeAt(0);s.parse=function(e,t){var n;return s.parseRows(e,function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i})};s.parseRows=function(e,t){function c(){if(u>=o)return r;if(l)return l=false,n;var t=u;if(e.charCodeAt(t)===34){var s=t;while(s++<o){if(e.charCodeAt(s)===34){if(e.charCodeAt(s+1)!==34)break;++s}}u=s+2;var a=e.charCodeAt(s+1);if(a===13){l=true;if(e.charCodeAt(s+2)===10)++u}else if(a===10){l=true}return e.substring(t+1,s).replace(/""/g,'"')}while(u<o){var a=e.charCodeAt(u++),f=1;if(a===10)l=true;else if(a===13){l=true;if(e.charCodeAt(u)===10)++u,++f}else if(a!==i)continue;return e.substring(t,u-f)}return e.substring(t)}var n={},r={},s=[],o=e.length,u=0,a=0,f,l;while((f=c())!==r){var h=[];while(f!==n&&f!==r){h.push(f);f=c()}if(t&&!(h=t(h,a++)))continue;s.push(h)}return s};s.format=function(e){if(Array.isArray(e[0]))return s.formatRows(e);var n=new d,r=[];e.forEach(function(e){for(var t in e){if(!n.has(t)){r.push(n.add(t))}}});return[r.map(f).join(t)].concat(e.map(function(e){return r.map(function(t){return f(e[t])}).join(t)})).join("\n")};s.formatRows=function(e){return e.map(a).join("\n")};return s}function on(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(e>=n.delay)n.flush=n.callback(e);n=n.next}var r=un()-t;if(r>24){if(isFinite(r)){clearTimeout(sn);sn=setTimeout(on,r)}rn=0}else{rn=1;an(on)}}function un(){var e=null,t=nn,n=Infinity;while(t){if(t.flush){delete tn[t.callback.id];t=e?e.next=t.next:nn=t.next}else{n=Math.min(n,t.then+t.delay);t=(e=t).next}}return n}function pn(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function mn(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function gn(e){return e+""}function wn(e,t){if(e&&Sn.hasOwnProperty(e.type)){Sn[e.type](e,t)}}function xn(e,t,n){var r=-1,i=e.length-n,s;t.lineStart();while(++r<i)s=e[r],t.point(s[0],s[1]);t.lineEnd()}function Tn(e,t){var n=-1,r=e.length;t.polygonStart();while(++n<r)xn(e[n],t,1);t.polygonEnd()}function An(){function s(e,t){e*=mt;t=t*mt/2+dt/4;var s=e-n,o=Math.cos(t),u=Math.sin(t),a=i*u,f=Cn,l=kn,c=r*o+a*Math.cos(s),h=a*Math.sin(s);Cn=f*c-l*h;kn=l*c+f*h;n=e,r=o,i=u}var e,t,n,r,i;Ln.point=function(o,u){Ln.point=s;n=(e=o)*mt,r=Math.cos(u=(t=u)*mt/2+dt/4),i=Math.sin(u)};Ln.lineEnd=function(){s(e,t)}}function On(t){function u(e,t){if(e<n)n=e;if(e>i)i=e;if(t<r)r=t;if(t>s)s=t}function a(){o.point=o.lineEnd=G}var n,r,i,s;var o={point:u,lineStart:G,lineEnd:G,polygonStart:function(){o.lineEnd=a},polygonEnd:function(){o.point=u}};return function(u){s=i=-(n=r=Infinity);e.geo.stream(u,t(o));return[[n,r],[i,s]]}}function jn(e,t){if(Mn)return;++_n;e*=mt;var n=Math.cos(t*=mt);Dn+=(n*Math.cos(e)-Dn)/_n;Pn+=(n*Math.sin(e)-Pn)/_n;Hn+=(Math.sin(t)-Hn)/_n}function Fn(){var e,t;Mn=1;In();Mn=2;var n=Bn.point;Bn.point=function(r,i){n(e=r,t=i)};Bn.lineEnd=function(){Bn.point(e,t);qn();Bn.lineEnd=qn}}function In(){function r(r,i){r*=mt;var s=Math.cos(i*=mt),o=s*Math.cos(r),u=s*Math.sin(r),a=Math.sin(i),f=Math.atan2(Math.sqrt((f=t*a-n*u)*f+(f=n*o-e*a)*f+(f=e*u-t*o)*f),e*o+t*u+n*a);_n+=f;Dn+=f*(e+(e=o));Pn+=f*(t+(t=u));Hn+=f*(n+(n=a))}var e,t,n;if(Mn>1)return;if(Mn<1){Mn=1;_n=Dn=Pn=Hn=0}Bn.point=function(i,s){i*=mt;var o=Math.cos(s*=mt);e=o*Math.cos(i);t=o*Math.sin(i);n=Math.sin(s);Bn.point=r}}function qn(){Bn.point=jn}function Rn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function zn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wn(e,t){e[0]+=t[0];e[1]+=t[1];e[2]+=t[2]}function Xn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Vn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t;e[1]/=t;e[2]/=t}function $n(){return true}function Jn(e){return[Math.atan2(e[1],e[0]),Math.asin(Math.max(-1,Math.min(1,e[2])))]}function Kn(e,t){return Math.abs(e[0]-t[0])<vt&&Math.abs(e[1]-t[1])<vt}function Qn(e,t,n,r,i){var s=[],o=[];e.forEach(function(e){if((t=e.length-1)<=0)return;var t,n=e[0],r=e[t];if(Kn(n,r)){i.lineStart();for(var u=0;u<t;++u)i.point((n=e[u])[0],n[1]);i.lineEnd();return}var a={point:n,points:e,other:null,visited:false,entry:true,subject:true},f={point:n,points:[n],other:a,visited:false,entry:false,subject:false};a.other=f;s.push(a);o.push(f);a={point:r,points:[r],other:null,visited:false,entry:false,subject:true};f={point:r,points:[r],other:a,visited:false,entry:true,subject:false};a.other=f;s.push(a);o.push(f)});o.sort(t);Gn(s);Gn(o);if(!s.length)return;if(n)for(var u=1,a=!n(o[0].point),f=o.length;u<f;++u){o[u].entry=a=!a}var l=s[0],c,h,p;while(1){c=l;while(c.visited)if((c=c.next)===l)return;h=c.points;i.lineStart();do{c.visited=c.other.visited=true;if(c.entry){if(c.subject){for(var u=0;u<h.length;u++)i.point((p=h[u])[0],p[1])}else{r(c.point,c.next.point,1,i)}c=c.next}else{if(c.subject){h=c.prev.points;for(var u=h.length;--u>=0;)i.point((p=h[u])[0],p[1])}else{r(c.point,c.prev.point,-1,i)}c=c.prev}c=c.other;h=c.points}while(!c.visited);i.lineEnd()}}function Gn(e){if(!(t=e.length))return;var t,n=0,r=e[0],i;while(++n<t){r.next=i=e[n];i.prev=r;r=i}r.next=i=e[0];i.prev=r}function Yn(t,n,r){return function(i){function u(e,n){if(t(e,n))i.point(e,n)}function a(e,t){s.point(e,t)}function f(){o.point=a;s.lineStart()}function l(){o.point=u;s.lineEnd()}function y(e,t){m.point(e,t);g.push([e,t])}function b(){m.lineStart();g=[]}function w(){y(g[0][0],g[0][1]);m.lineEnd();var e=m.clean(),t=v.buffer(),n,r=t.length;if(!r){d=true;p+=tr(g,-1);g=null;return}g=null;if(e&1){n=t[0];h+=tr(n,1);var r=n.length-1,s=-1,o;i.lineStart();while(++s<r)i.point((o=n[s])[0],o[1]);i.lineEnd();return}if(r>1&&e&2)t.push(t.pop().concat(t.shift()));c.push(t.filter(Zn))}var s=n(i);var o={point:u,lineStart:f,lineEnd:l,polygonStart:function(){o.point=y;o.lineStart=b;o.lineEnd=w;d=false;p=h=0;c=[];i.polygonStart()},polygonEnd:function(){o.point=u;o.lineStart=f;o.lineEnd=l;c=e.merge(c);if(c.length){Qn(c,nr,null,r,i)}else if(h<-vt||d&&p<-vt){i.lineStart();r(null,null,1,i);i.lineEnd()}i.polygonEnd();c=null},sphere:function(){i.polygonStart();i.lineStart();r(null,null,1,i);i.lineEnd();i.polygonEnd()}};var c,h,p,d;var v=er(),m=n(v),g;return o}}function Zn(e){return e.length>1}function er(){var e=[],t;return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:G,buffer:function(){var n=e;e=[];t=null;return n},rejoin:function(){if(e.length>1)e.push(e.pop().concat(e.shift()))}}}function tr(e,t){if(!(n=e.length))return 0;var n,r=0,i=0,s=e[0],o=s[0],u=s[1],a=Math.cos(u),f=Math.atan2(t*Math.sin(o)*a,Math.sin(u)),l=1-t*Math.cos(o)*a,c=f,h,p;while(++r<n){s=e[r];a=Math.cos(u=s[1]);h=Math.atan2(t*Math.sin(o=s[0])*a,Math.sin(u));p=1-t*Math.cos(o)*a;if(Math.abs(l-2)<vt&&Math.abs(p-2)<vt)continue;if(Math.abs(p)<vt||Math.abs(l)<vt){}else if(Math.abs(Math.abs(h-f)-dt)<vt){if(p+l>2)i+=4*(h-f)}else if(Math.abs(l-2)<vt)i+=4*(h-c);else i+=((3*dt+h-f)%(2*dt)-dt)*(l+p);c=f,f=h,l=p}return i}function nr(e,t){return((e=e.point)[0]<0?e[1]-dt/2-vt:dt/2-e[1])-((t=t.point)[0]<0?t[1]-dt/2-vt:dt/2-t[1])}function ir(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart();i=1},point:function(s,o){var u=s>0?dt:-dt,a=Math.abs(s-t);if(Math.abs(a-dt)<vt){e.point(t,n=(n+o)/2>0?dt/2:-dt/2);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);e.point(s,n);i=0}else if(r!==u&&a>=dt){if(Math.abs(t-r)<vt)t-=r*vt;if(Math.abs(s-u)<vt)s-=u*vt;n=sr(t,n,s,o);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);i=0}e.point(t=s,n=o);r=u},lineEnd:function(){e.lineEnd();t=n=NaN},clean:function(){return 2-i}}}function sr(e,t,n,r){var i,s,o=Math.sin(e-n);return Math.abs(o)>vt?Math.atan((Math.sin(t)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*s*o)):(t+r)/2}function or(e,t,n,r){var i;if(e==null){i=n*dt/2;r.point(-dt,i);r.point(0,i);r.point(dt,i);r.point(dt,0);r.point(dt,-i);r.point(0,-i);r.point(-dt,-i);r.point(-dt,0);r.point(-dt,i)}else if(Math.abs(e[0]-t[0])>vt){var s=(e[0]<t[0]?1:-1)*dt;i=n*s/2;r.point(-s,i);r.point(0,i);r.point(s,i)}else{r.point(t[0],t[1])}}function ur(e){function s(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e){var t,i,o,f,l;return{lineStart:function(){f=o=false;l=1},point:function(c,h){var p=[c,h],d,v=s(c,h),m=n?v?0:a(c,h):v?a(c+(c<0?dt:-dt),h):0;if(!t&&(f=o=v))e.lineStart();if(v!==o){d=u(t,p);if(Kn(t,d)||Kn(p,d)){p[0]+=vt;p[1]+=vt;v=s(p[0],p[1])}}if(v!==o){l=0;if(v){e.lineStart();d=u(p,t);e.point(d[0],d[1])}else{d=u(t,p);e.point(d[0],d[1]);e.lineEnd()}t=d}else if(r&&t&&n^v){var g;if(!(m&i)&&(g=u(p,t,true))){l=0;if(n){e.lineStart();e.point(g[0][0],g[0][1]);e.point(g[1][0],g[1][1]);e.lineEnd()}else{e.point(g[1][0],g[1][1]);e.lineEnd();e.lineStart();e.point(g[0][0],g[0][1])}}}if(v&&(!t||!Kn(t,p))){e.point(p[0],p[1])}t=p,o=v,i=m},lineEnd:function(){if(o)e.lineEnd();t=null},clean:function(){return l|(f&&o)<<1}}}function u(e,n,r){var i=Rn(e),s=Rn(n);var o=[1,0,0],u=zn(i,s),a=Un(u,u),f=u[0],l=a-f*f;if(!l)return!r&&e;var c=t*a/l,h=-t*f/l,p=zn(o,u),d=Xn(o,c),v=Xn(u,h);Wn(d,v);var m=p,g=Un(d,m),y=Un(m,m),b=g*g-y*(Un(d,d)-1);if(b<0)return;var w=Math.sqrt(b),E=Xn(m,(-g-w)/y);Wn(E,d);E=Jn(E);if(!r)return E;var S=e[0],x=n[0],T=e[1],N=n[1],C;if(x<S)C=S,S=x,x=C;var k=x-S,L=Math.abs(k-dt)<vt,A=L||k<vt;if(!L&&N<T)C=T,T=N,N=C;if(A?L?T+N>0^E[1]<(Math.abs(E[0]-S)<vt?T:N):T<=E[1]&&E[1]<=N:k>dt^(S<=E[0]&&E[0]<=x)){var O=Xn(m,(-g+w)/y);Wn(O,d);return[E,Jn(O)]}}function a(t,r){var i=n?e:dt-e,s=0;if(t<-i)s|=1;else if(t>i)s|=2;if(r<-i)s|=4;else if(r>i)s|=8;return s}var t=Math.cos(e),n=t>0,r=Math.abs(t)>vt,i=Er(e,6*mt);return Yn(s,o,i)}function fr(t,n,r,i){function s(e,i){return Math.abs(e[0]-t)<vt?i>0?0:3:Math.abs(e[0]-r)<vt?i>0?2:1:Math.abs(e[1]-n)<vt?i>0?1:0:i>0?3:2}function o(e,t){return u(e.point,t.point)}function u(e,t){var n=s(e,1),r=s(t,1);return n!==r?n-r:n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]}function a(e,s){var o=s[0]-e[0],u=s[1]-e[1],a=[0,1];if(Math.abs(o)<vt&&Math.abs(u)<vt)return t<=e[0]&&e[0]<=r&&n<=e[1]&&e[1]<=i;if(lr(t-e[0],o,a)&&lr(e[0]-r,-o,a)&&lr(n-e[1],u,a)&&lr(e[1]-i,-u,a)){if(a[1]<1){s[0]=e[0]+a[1]*o;s[1]=e[1]+a[1]*u}if(a[0]>0){e[0]+=a[0]*o;e[1]+=a[0]*u}return true}return false}return function(f){function m(e){var o=s(e,-1),u=g([o===0||o===3?t:r,o>1?i:n]);return u}function g(e){var t=0,n=p.length,r=e[1];for(var i=0;i<n;++i){for(var s=1,o=p[i],u=o.length,a=o[0];s<u;++s){b=o[s];if(a[1]<=r){if(b[1]>r&&y(a,b,e)>0)++t}else{if(b[1]<=r&&y(a,b,e)<0)--t}a=b}}return t!==0}function y(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}function w(e,o,a,f){var l=0,c=0;if(e==null||(l=s(e,a))!==(c=s(o,a))||u(e,o)<0^a>0){do{f.point(l===0||l===3?t:r,l>1?i:n)}while((l=(l+a+4)%4)!==c)}else{f.point(o[0],o[1])}}function E(e,s){return t<=e&&e<=r&&n<=s&&s<=i}function S(e,t){if(E(e,t))f.point(e,t)}function O(){v.point=_;if(p)p.push(d=[]);A=true;L=false;C=k=NaN}function M(){if(h){_(x,T);if(N&&L)c.rejoin();h.push(c.buffer())}v.point=S;if(L)f.lineEnd()}function _(e,t){e=Math.max(-ar,Math.min(ar,e));t=Math.max(-ar,Math.min(ar,t));var n=E(e,t);if(p)d.push([e,t]);if(A){x=e,T=t,N=n;A=false;if(n){f.lineStart();f.point(e,t)}}else{if(n&&L)f.point(e,t);else{var r=[C,k],i=[e,t];if(a(r,i)){if(!L){f.lineStart();f.point(r[0],r[1])}f.point(i[0],i[1]);if(!n)f.lineEnd()}else{f.lineStart();f.point(e,t)}}}C=e,k=t,L=n}var l=f,c=er(),h,p,d;var v={point:S,lineStart:O,lineEnd:M,polygonStart:function(){f=c;h=[];p=[]},polygonEnd:function(){f=l;if((h=e.merge(h)).length){f.polygonStart();Qn(h,o,m,w,f);f.polygonEnd()}else if(g([t,n])){f.polygonStart(),f.lineStart();w(null,null,1,f);f.lineEnd(),f.polygonEnd()}h=p=d=null}};var x,T,N,C,k,L,A;return v}}function lr(e,t,n){if(Math.abs(t)<vt)return e<=0;var r=e/t;if(t>0){if(r>n[1])return false;if(r>n[0])n[0]=r}else{if(r<n[0])return false;if(r<n[1])n[1]=r}return true}function cr(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}if(e.invert&&t.invert)n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])};return n}function hr(e){function r(t){function c(n,r){n=e(n,r);t.point(n[0],n[1])}function h(){s=NaN;l.point=p;t.lineStart()}function p(l,c){var h=Rn([l,c]),p=e(l,c);i(s,o,r,u,a,f,s=p[0],o=p[1],r=l,u=h[0],a=h[1],f=h[2],n,t);t.point(s,o)}function d(){l.point=c;t.lineEnd()}function v(){var e,c,v,m,g,y,b;h();l.point=function(t,n){p(e=t,c=n),v=s,m=o,g=u,y=a,b=f;l.point=p};l.lineEnd=function(){i(s,o,r,u,a,f,v,m,e,g,y,b,n,t);l.lineEnd=d;d()}}var r,s,o,u,a,f;var l={point:c,lineStart:h,lineEnd:d,polygonStart:function(){t.polygonStart();l.lineStart=v},polygonEnd:function(){t.polygonEnd();l.lineStart=h}};return l}function i(n,r,s,o,u,a,f,l,c,h,p,d,v,m){var g=f-n,y=l-r,b=g*g+y*y;if(b>4*t&&v--){var w=o+h,E=u+p,S=a+d,x=Math.sqrt(w*w+E*E+S*S),T=Math.asin(S/=x),N=Math.abs(Math.abs(S)-1)<vt?(s+c)/2:Math.atan2(E,w),C=e(N,T),k=C[0],L=C[1],A=k-n,O=L-r,M=y*A-g*O;if(M*M/b>t||Math.abs((g*A+y*O)/b-.5)>.3){i(n,r,s,o,u,a,k,L,N,w/=x,E/=x,S,v,m);m.point(k,L);i(k,L,N,w,E,S,f,l,c,h,p,d,v,m)}}}var t=.5,n=16;r.precision=function(e){if(!arguments.length)return Math.sqrt(t);n=(t=e*e)>0&&16;return r};return r}function pr(e){return dr(function(){return e})()}function dr(t){function w(e){e=i(e[0]*mt,e[1]*mt);return[e[0]*o+d,v-e[1]*o]}function E(e){e=i.invert((e[0]-d)/o,(v-e[1])/o);return e&&[e[0]*gt,e[1]*gt]}function S(){i=cr(r=gr(c,h,p),n);var e=n(f,l);d=u-e[0]*o;v=a+e[1]*o;return w}var n,r,i,s=hr(function(e,t){e=n(e,t);return[e[0]*o+d,v-e[1]*o]}),o=150,u=480,a=250,f=0,l=0,c=0,h=0,p=0,d,v,m=rr,g=Gt,y=null,b=null;w.stream=function(e){return vr(r,m(s(g(e))))};w.clipAngle=function(e){if(!arguments.length)return y;m=e==null?(y=e,rr):ur((y=+e)*mt);return w};w.clipExtent=function(e){if(!arguments.length)return b;b=e;g=e==null?Gt:fr(e[0][0],e[0][1],e[1][0],e[1][1]);return w};w.scale=function(e){if(!arguments.length)return o;o=+e;return S()};w.translate=function(e){if(!arguments.length)return[u,a];u=+e[0];a=+e[1];return S()};w.center=function(e){if(!arguments.length)return[f*gt,l*gt];f=e[0]%360*mt;l=e[1]%360*mt;return S()};w.rotate=function(e){if(!arguments.length)return[c*gt,h*gt,p*gt];c=e[0]%360*mt;h=e[1]%360*mt;p=e.length>2?e[2]%360*mt:0;return S()};e.rebind(w,s,"precision");return function(){n=t.apply(this,arguments);w.invert=n.invert&&E;return S()}}function vr(e,t){return{point:function(n,r){r=e(n*mt,r*mt),n=r[0];t.point(n>dt?n-2*dt:n<-dt?n+2*dt:n,r[1])},sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function mr(e,t){return[e,t]}function gr(e,t,n){return e?t||n?cr(br(e),wr(t,n)):br(e):t||n?wr(t,n):mr}function yr(e){return function(t,n){return t+=e,[t>dt?t-2*dt:t<-dt?t+2*dt:t,n]}}function br(e){var t=yr(e);t.invert=yr(-e);return t}function wr(e,t){function o(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*n+u*r;return[Math.atan2(a*i-l*s,u*n-f*r),Math.asin(Math.max(-1,Math.min(1,l*i+a*s)))]}var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),s=Math.sin(t);o.invert=function(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*i-a*s;return[Math.atan2(a*i+f*s,u*n+l*r),Math.asin(Math.max(-1,Math.min(1,l*n-u*r)))]};return o}function Er(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,s,o,u){if(i!=null){i=Sr(n,i);s=Sr(n,s);if(o>0?i<s:i>s)i+=o*2*dt}else{i=e+o*2*dt;s=e}var a;for(var f=o*t,l=i;o>0?l>s:l<s;l-=f){u.point((a=Jn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],a[1])}}}function Sr(e,t){var n=Rn(t);n[0]-=e;Vn(n);var r=bt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-vt)%(2*Math.PI)}function xr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[e,t]})}}function Tr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[t,e]})}}function Nr(e){return e.source}function Cr(e){return e.target}function kr(e,t,n,r){var i=Math.cos(t),s=Math.sin(t),o=Math.cos(r),u=Math.sin(r),a=i*Math.cos(e),f=i*Math.sin(e),l=o*Math.cos(n),c=o*Math.sin(n),h=2*Math.asin(Math.sqrt(xt(r-t)+i*o*xt(n-e))),p=1/Math.sin(h);var d=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,r=n*a+t*l,i=n*f+t*c,o=n*s+t*u;return[Math.atan2(i,r)*gt,Math.atan2(o,Math.sqrt(r*r+i*i))*gt]}:function(){return[e*gt,t*gt]};d.distance=h;return d}function Or(){function r(r,i){var s=Math.sin(i*=mt),o=Math.cos(i),u=Math.abs((r*=mt)-e),a=Math.cos(u);Lr+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=n*s-t*o*a)*u),t*s+n*o*a);e=r,t=s,n=o}var e,t,n;Ar.point=function(i,s){e=i*mt,t=Math.sin(s*=mt),n=Math.cos(s);Ar.point=r};Ar.lineEnd=function(){Ar.point=Ar.lineEnd=G}}function Mr(e){var t=0,n=dt/3,r=dr(e),i=r(t,n);i.parallels=function(e){if(!arguments.length)return[t/dt*180,n/dt*180];return r(t=e[0]*dt/180,n=e[1]*dt/180)};return i}function _r(e,t){function o(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),s-n*Math.cos(e)]}var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),s=Math.sqrt(i)/r;o.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/r,Math.asin((i-(e*e+n*n)*r*r)/(2*r))]};return o}function Dr(e,t){var n=e(t[0]),r=e([.5*(t[0][0]+t[1][0]),t[0][1]]),i=e([t[1][0],t[0][1]]),s=e(t[1]);var o=r[1]-n[1],u=r[0]-n[0],a=i[1]-r[1],f=i[0]-r[0];var l=o/u,c=a/f;var h=.5*(l*c*(n[1]-i[1])+c*(n[0]+r[0])-l*(r[0]+i[0]))/(c-l),p=(.5*(n[0]+r[0])-h)/l+.5*(n[1]+r[1]);var d=s[0]-h,v=s[1]-p,m=n[0]-h,g=n[1]-p,y=d*d+v*v,b=m*m+g*g;var w=Math.atan2(v,d),E=Math.atan2(g,m);return function(t){var n=t[0]-h,r=t[1]-p,i=n*n+r*r,s=Math.atan2(r,n);if(y<i&&i<b&&w<s&&s<E)return e.invert(t)}}function jr(){function i(e,t){Hr+=r*e-n*t;n=e,r=t}var e,t,n,r;Br.point=function(s,o){Br.point=i;e=n=s,t=r=o};Br.lineEnd=function(){i(e,t)}}function Fr(){function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r);n.point=s}function s(e,n){t.push("L",e,",",n)}function o(){n.point=r}function u(){t.push("Z")}var e=Xr(4.5),t=[];var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(t){e=Xr(t);return n},result:function(){if(t.length){var e=t.join("");t=[];return e}}};return n}function qr(e,t){if(Mn)return;Dn+=e;Pn+=t;++Hn}function Rr(){function n(n,r){var i=n-e,s=r-t,o=Math.sqrt(i*i+s*s);Dn+=o*(e+n)/2;Pn+=o*(t+r)/2;Hn+=o;e=n,t=r}var e,t;if(Mn!==1){if(Mn<1){Mn=1;Dn=Pn=Hn=0}else return}Ir.point=function(r,i){Ir.point=n;e=r,t=i}}function Ur(){Ir.point=qr}function zr(){function i(e,t){var i=r*e-n*t;Dn+=i*(n+e);Pn+=i*(r+t);Hn+=i*3;n=e,r=t}var e,t,n,r;if(Mn<2){Mn=2;Dn=Pn=Hn=0}Ir.point=function(s,o){Ir.point=i;e=n=s,t=r=o};Ir.lineEnd=function(){i(e,t)}}function Wr(e){function r(n,r){e.moveTo(n,r);e.arc(n,r,t,0,2*dt)}function i(t,r){e.moveTo(t,r);n.point=s}function s(t,n){e.lineTo(t,n)}function o(){n.point=r}function u(){e.closePath()}var t=4.5;var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(e){t=e;return n},result:G};return n}function Xr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+ +2*e+"z"}function Vr(e){var t=hr(function(t,n){return e([t*gt,n*gt])});return function(e){e=t(e);return{point:function(t,n){e.point(t*mt,n*mt)},sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}}function $r(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),s=e(r*i);return[s*i*Math.sin(t),s*Math.sin(n)]}n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(e*s,r*o),Math.asin(r&&n*s/r)]};return n}function Qr(e,t){function o(e,t){var n=Math.abs(Math.abs(t)-dt/2)<vt?0:s/Math.pow(r(t),i);return[n*Math.sin(i*e),s-n*Math.cos(i*e)]}var n=Math.cos(e),r=function(e){return Math.tan(dt/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),s=n*Math.pow(r(e),i)/i;if(!i)return Zr;o.invert=function(e,t){var n=s-t,r=yt(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(s/r,1/i))-dt/2]};return o}function Gr(e,t){function s(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(Math.abs(r)<vt)return mr;s.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-yt(r)*Math.sqrt(e*e+n*n)]};return s}function Zr(e,t){return[e,Math.log(Math.tan(dt/4+t/2))]}function ei(e){var t=pr(e),n=t.scale,r=t.translate,i=t.clipExtent,s;t.scale=function(){var e=n.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.translate=function(){var e=r.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.clipExtent=function(e){var o=i.apply(t,arguments);if(o===t){if(s=e==null){var u=dt*n(),a=r();i([[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]])}}else if(s){o=null}return o};return t.clipExtent(null)}function ri(e,t){var n=Math.cos(t)*Math.sin(e);return[Math.log((1+n)/(1-n))/2,Math.atan2(Math.tan(t),Math.cos(e))]}function ii(e){function u(s){function d(){u.push("M",i(e(a),o))}var u=[],a=[],f=-1,l=s.length,c,h=Qt(t),p=Qt(n);while(++f<l){if(r.call(this,c=s[f],f)){a.push([+h.call(this,c,f),+p.call(this,c,f)])}else if(a.length){d();a=[]}}if(a.length)d();return u.length?u.join(""):null}var t=si,n=oi,r=$n,i=ai,s=i.key,o=.7;u.x=function(e){if(!arguments.length)return t;t=e;return u};u.y=function(e){if(!arguments.length)return n;n=e;return u};u.defined=function(e){if(!arguments.length)return r;r=e;return u};u.interpolate=function(e){if(!arguments.length)return s;if(typeof e==="function")s=i=e;else s=(i=ui.get(e)||ai).key;return u};u.tension=function(e){if(!arguments.length)return o;o=e;return u};return u}function si(e){return e[0]}function oi(e){return e[1]}function ai(e){return e.join("L")}function fi(e){return ai(e)+"Z"}function li(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ci(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function hi(e,t){return e.length<4?ai(e):e[1]+vi(e.slice(1,e.length-1),mi(e,t))}function pi(e,t){return e.length<3?ai(e):e[0]+vi((e.push(e[0]),e),mi([e[e.length-2]].concat(e,[e[1]]),t))}function di(e,t){return e.length<3?ai(e):e[0]+vi(e,mi(e,t))}function vi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2){return ai(e)}var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;if(n){r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1];i=e[1];a=2}if(t.length>1){u=t[1];s=e[a];a++;r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++){s=e[a];u=t[f];r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function mi(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a){i=s;s=o;o=e[u];n.push([r*(o[0]-i[0]),r*(o[1]-i[1])])}return n}function gi(e){if(e.length<3)return ai(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];Ni(a,o,u);while(++t<n){r=e[t];o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}t=-1;while(++t<2){o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}return a.join("")}function yi(e){if(e.length<4)return ai(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3){i=e[n];s.push(i[0]);o.push(i[1])}t.push(Ei(Ti,s)+","+Ei(Ti,o));--n;while(++n<r){i=e[n];s.shift();s.push(i[0]);o.shift();o.push(i[1]);Ni(t,s,o)}return t.join("")}function bi(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4){s=e[n%r];o.push(s[0]);u.push(s[1])}t=[Ei(Ti,o),",",Ei(Ti,u)];--n;while(++n<i){s=e[n%r];o.shift();o.push(s[0]);u.shift();u.push(s[1]);Ni(t,o,u)}return t.join("")}function wi(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n){a=e[u];f=u/n;a[0]=t*a[0]+(1-t)*(r+f*s);a[1]=t*a[1]+(1-t)*(i+f*o)}}return gi(e)}function Ei(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Ni(e,t,n){e.push("C",Ei(Si,t),",",Ei(Si,n),",",Ei(xi,t),",",Ei(xi,n),",",Ei(Ti,t),",",Ei(Ti,n))}function Ci(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ki(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Ci(i,s);while(++t<n){r[t]=(o+(o=Ci(i=s,s=e[t+1])))/2}r[t]=o;return r}function Li(e){var t=[],n,r,i,s,o=ki(e),u=-1,a=e.length-1;while(++u<a){n=Ci(e[u],e[u+1]);if(Math.abs(n)<1e-6){o[u]=o[u+1]=0}else{r=o[u]/n;i=o[u+1]/n;s=r*r+i*i;if(s>9){s=n*3/Math.sqrt(s);o[u]=s*r;o[u+1]=s*i}}}u=-1;while(++u<=a){s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u]));t.push([s||0,o[u]*s||0])}return t}function Ai(e){return e.length<3?ai(e):e[0]+vi(e,Li(e))}function Oi(e,t,n,r){var i,s,o,u,a,f,l;i=r[e];s=i[0];o=i[1];i=r[t];u=i[0];a=i[1];i=r[n];f=i[0];l=i[1];return(l-o)*(u-s)-(a-o)*(f-s)>0}function Mi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function _i(e,t,n,r){var i=e[0],s=n[0],o=t[0]-i,u=r[0]-s,a=e[1],f=n[1],l=t[1]-a,c=r[1]-f,h=(u*(a-f)-c*(i-s))/(c*o-u*l);return[i+h*o,a+h*l]}function Pi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null};var r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l");r.rightEnd=r.createHalfEdge(null,"l");r.leftEnd.r=r.rightEnd;r.rightEnd.l=r.leftEnd;r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e;t.r=e.r;e.r.l=t;e.r=t},leftBound:function(e){var t=r.leftEnd;do{t=t.r}while(t!=r.rightEnd&&i.rightOf(t,e));t=t.l;return t},del:function(e){e.l.r=e.r;e.r.l=e.l;e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[Di[e.side]]}};var i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}};var r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;n.c=e.x*r+e.y*i+(r*r+i*i)*.5;if(s>o){n.a=1;n.b=i/r;n.c/=r}else{n.b=1;n.a=r/i;n.c/=i}return n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r){return null}var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10){return null}var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;if(u.y<a.y||u.y==a.y&&u.x<a.x){f=e;l=n}else{f=t;l=r}var c=s>=l.region.r.x;if(c&&f.side==="l"||!c&&f.side==="r"){return null}return{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l"){return 1}if(!i&&e.side==="r"){return 0}if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;if(!i&&n.b<0||i&&n.b>=0){a=u=s>=n.b*o}else{a=t.x+t.y*n.b>n.c;if(n.b<0){a=!a}if(!a){u=1}}if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b);if(n.b<0){a=!a}}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[Di[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}};var s={list:[],insert:function(e,t,n){e.vertex=t;e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x){continue}else{break}}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t){}n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t){if(n[t]==e)return n[t+1]}return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init();n.bottomSite=n.list.shift();var o=n.list.shift(),u;var a,f,l,c,h;var p,d,v,m,g;var y,b;while(true){if(!s.empty()){u=s.min()}if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x)){a=r.leftBound(o);f=r.right(a);p=r.rightRegion(a);y=i.bisect(p,o);h=r.createHalfEdge(y,"l");r.insert(a,h);m=i.intersect(a,h);if(m){s.del(a);s.insert(a,m,i.distance(m,o))}a=h;h=r.createHalfEdge(y,"r");r.insert(a,h);m=i.intersect(h,f);if(m){s.insert(h,m,i.distance(m,o))}o=n.list.shift()}else if(!s.empty()){a=s.extractMin();l=r.left(a);f=r.right(a);c=r.right(f);p=r.leftRegion(a);d=r.rightRegion(f);g=a.vertex;i.endPoint(a.edge,a.side,g);i.endPoint(f.edge,f.side,g);r.del(a);s.del(f);r.del(f);b="l";if(p.y>d.y){v=p;p=d;d=v;b="r"}y=i.bisect(p,d);h=r.createHalfEdge(y,b);r.insert(l,h);i.endPoint(y,Di[b],g);m=i.intersect(l,h);if(m){s.del(l);s.insert(l,m,i.distance(m,p))}m=i.intersect(h,c);if(m){s.insert(h,m,i.distance(m,p))}}else{break}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a)){t(a.edge)}}function Hi(e){return e.x}function Bi(e){return e.y}function ji(){return{leaf:true,nodes:[],point:null,x:null,y:null}}function Fi(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;if(a[0])Fi(e,a[0],n,r,o,u);if(a[1])Fi(e,a[1],o,r,i,u);if(a[2])Fi(e,a[2],n,u,o,s);if(a[3])Fi(e,a[3],o,u,i,s)}}function Ii(t,n){t=e.rgb(t);n=e.rgb(n);var r=t.r,i=t.g,s=t.b,o=n.r-r,u=n.g-i,a=n.b-s;return function(e){return"#"+zt(Math.round(r+o*e))+zt(Math.round(i+u*e))+zt(Math.round(s+a*e))}}function qi(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ui(t),i=Ri(t,n),s=Ui(zi(n,t,-i))||0;if(t[0]*n[1]<n[0]*t[1]){t[0]*=-1;t[1]*=-1;r*=-1;i*=-1}this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*gt;this.translate=[e.e,e.f];this.scale=[r,s];this.skew=s?Math.atan2(i,s)*gt:0}function Ri(e,t){return e[0]*t[0]+e[1]*t[1]}function Ui(e){var t=Math.sqrt(Ri(e,e));if(t){e[0]/=t;e[1]/=t}return t}function zi(e,t,n){e[0]+=n*t[0];e[1]+=n*t[1];return e}function Xi(e,t){t-=e=+e;return function(n){return e+t*n}}function Vi(t,n){var r=[],i=[],s,o=e.transform(t),u=e.transform(n),a=o.translate,f=u.translate,l=o.rotate,c=u.rotate,h=o.skew,p=u.skew,d=o.scale,v=u.scale;if(a[0]!=f[0]||a[1]!=f[1]){r.push("translate(",null,",",null,")");i.push({i:1,x:Xi(a[0],f[0])},{i:3,x:Xi(a[1],f[1])})}else if(f[0]||f[1]){r.push("translate("+f+")")}else{r.push("")}if(l!=c){if(l-c>180)c+=360;else if(c-l>180)l+=360;i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:Xi(l,c)})}else if(c){r.push(r.pop()+"rotate("+c+")")}if(h!=p){i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:Xi(h,p)})}else if(p){r.push(r.pop()+"skewX("+p+")")}if(d[0]!=v[0]||d[1]!=v[1]){s=r.push(r.pop()+"scale(",null,",",null,")");i.push({i:s-4,x:Xi(d[0],v[0])},{i:s-2,x:Xi(d[1],v[1])})}else if(v[0]!=1||v[1]!=1){r.push(r.pop()+"scale("+v+")")}s=i.length;return function(e){var t=-1,n;while(++t<s)r[(n=i[t]).i]=n.x(e);return r.join("")}}function $i(e,t){var n={},r={},i;for(i in e){if(i in t){n[i]=Gi(i)(e[i],t[i])}else{r[i]=e[i]}}for(i in t){if(!(i in e)){r[i]=t[i]}}return function(e){for(i in n)r[i]=n[i](e);return r}}function Ji(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;e=e+"",t=t+"";Ki.lastIndex=0;for(r=0;n=Ki.exec(t);++r){if(n.index)u.push(t.substring(s,o=n.index));a.push({i:u.length,x:n[0]});u.push(null);s=Ki.lastIndex}if(s<t.length)u.push(t.substring(s));for(r=0,f=a.length;(n=Ki.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i){if(u[l.i+1]==null){u[l.i-1]+=l.x;u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1];u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}}else{if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}}a.splice(r,1);f--;r--}else{l.x=Xi(parseFloat(n[0]),parseFloat(l.x))}}while(r<f){l=a.pop();if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1)}f--}if(u.length===1){return u[0]==null?a[0].x:function(){return t}}return function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}}function Qi(t,n){var r=e.interpolators.length,i;while(--r>=0&&!(i=e.interpolators[r](t,n)));return i}function Gi(e){return e=="transform"?Vi:Qi}function Yi(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(Qi(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}}function ns(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function rs(e){return function(t){return 1-e(1-t)}}function is(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function ss(e){return e*e}function os(e){return e*e*e}function us(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function as(e){return function(t){return Math.pow(t,e)}}function fs(e){return 1-Math.cos(e*dt/2)}function ls(e){return Math.pow(2,10*(e-1))}function cs(e){return 1-Math.sqrt(1-e*e)}function hs(e,t){var n;if(arguments.length<2)t=.45;if(arguments.length)n=t/(2*dt)*Math.asin(1/e);else e=1,n=t/4;return function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*dt/t)}}function ps(e){if(!e)e=1.70158;return function(t){return t*t*((e+1)*t-e)}}function ds(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function vs(t,n){t=e.hcl(t);n=e.hcl(n);var r=t.h,i=t.c,s=t.l,o=n.h-r,u=n.c-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return kt(r+o*e,i+u*e,s+a*e)+""}}function ms(t,n){t=e.hsl(t);n=e.hsl(n);var r=t.h,i=t.s,s=t.l,o=n.h-r,u=n.s-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return pt(r+o*e,i+u*e,s+a*e)+""}}function gs(t,n){t=e.lab(t);n=e.lab(n);var r=t.l,i=t.a,s=t.b,o=n.l-r,u=n.a-i,a=n.b-s;return function(e){return Ht(r+o*e,i+u*e,s+a*e)+""}}function ys(e,t){t-=e;return function(n){return Math.round(e+t*n)}}function bs(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return(n-e)*t}}function ws(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Es(e){var t=e.source,n=e.target,r=xs(t,n),i=[t];while(t!==r){t=t.parent;i.push(t)}var s=i.length;while(n!==r){i.splice(s,0,n);n=n.parent}return i}function Ss(e){var t=[],n=e.parent;while(n!=null){t.push(e);e=n;n=n.parent}t.push(e);return t}function xs(e,t){if(e===t)return e;var n=Ss(e),r=Ss(t),i=n.pop(),s=r.pop(),o=null;while(i===s){o=i;i=n.pop();s=r.pop()}return o}function Ts(e){e.fixed|=2}function Ns(e){e.fixed&=~6}function Cs(e){e.fixed|=4;e.px=e.x,e.py=e.y}function ks(e){e.fixed&=~4}function Ls(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Ls(a,t,n);e.charge+=a.charge;r+=a.charge*a.cx;i+=a.charge*a.cy}}if(e.point){if(!e.leaf){e.point.x+=Math.random()-.5;e.point.y+=Math.random()-.5}var f=t*n[e.point.index];e.charge+=e.pointCharge=f;r+=f*e.point.x;i+=f*e.point.y}e.cx=r/e.charge;e.cy=i/e.charge}function Ms(t,n){e.rebind(t,n,"sort","children","value");t.nodes=t;t.links=Hs;return t}function _s(e){return e.children}function Ds(e){return e.value}function Ps(e,t){return t.value-e.value}function Hs(t){return e.merge(t.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function js(e){return e.x}function Fs(e){return e.y}function Is(e,t,n){e.y0=t;e.y=n}function Us(t){return e.range(t.length)}function zs(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function Ws(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t){if((i=e[t][1])>r){n=t;r=i}}return n}function Xs(e){return e.reduce(Vs,0)}function Vs(e,t){return e+t[1]}function $s(e,t){return Js(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Js(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function Ks(t){return[e.min(t),e.max(t)]}function Qs(e,t){return e.parent==t.parent?1:2}function Gs(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ys(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Zs(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i){if(t(r=Zs(n[s],t),e)>0){e=r}}}return e}function eo(e,t){return e.x-t.x}function to(e,t){return t.x-e.x}function no(e,t){return e.depth-t.depth}function ro(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a){s=i[u];n(s,o);o=s}}t(e,r)}n(e,null)}function io(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0){s=r[i]._tree;s.prelim+=t;s.mod+=t;t+=s.shift+(n+=s.change)}}function so(e,t,n){e=e._tree;t=t._tree;var r=n/(t.number-e.number);e.change+=r;t.change-=r;t.shift+=n;t.prelim+=n;t.mod+=n}function oo(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function uo(e,t){return e.value-t.value}function ao(e,t){var n=e._pack_next;e._pack_next=t;t._pack_prev=e;t._pack_next=n;n._pack_prev=t}function fo(e,t){e._pack_next=t;t._pack_prev=e}function lo(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function co(e){function p(e){n=Math.min(e.x-e.r,n);r=Math.max(e.x+e.r,r);i=Math.min(e.y-e.r,i);s=Math.max(e.y+e.r,s)}if(!(t=e.children)||!(h=t.length))return;var t,n=Infinity,r=-Infinity,i=Infinity,s=-Infinity,o,u,a,f,l,c,h;t.forEach(ho);o=t[0];o.x=-o.r;o.y=0;p(o);if(h>1){u=t[1];u.x=u.r;u.y=0;p(u);if(h>2){a=t[2];mo(o,u,a);p(a);ao(o,a);o._pack_prev=a;ao(a,u);u=o._pack_next;for(f=3;f<h;f++){mo(o,u,a=t[f]);var d=0,v=1,m=1;for(l=u._pack_next;l!==u;l=l._pack_next,v++){if(lo(l,a)){d=1;break}}if(d==1){for(c=o._pack_prev;c!==l._pack_prev;c=c._pack_prev,m++){if(lo(c,a)){break}}}if(d){if(v<m||v==m&&u.r<o.r)fo(o,u=l);else fo(o=c,u);f--}else{ao(o,a);u=a;p(a)}}}}var g=(n+r)/2,y=(i+s)/2,b=0;for(f=0;f<h;f++){a=t[f];a.x-=g;a.y-=y;b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y))}e.r=b;t.forEach(po)}function ho(e){e._pack_next=e._pack_prev=e}function po(e){delete e._pack_next;delete e._pack_prev}function vo(e,t,n,r){var i=e.children;e.x=t+=r*e.x;e.y=n+=r*e.y;e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)vo(i[s],t,n,r)}}function mo(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o;r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s;n.y=e.y+a*s-f*i}else{n.x=e.x+r;n.y=e.y}}function go(t){return 1+e.max(t,function(e){return e.y})}function yo(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function bo(e){var t=e.children;return t&&t.length?bo(t[0]):e}function wo(e){var t=e.children,n;return t&&(n=t.length)?wo(t[n-1]):e}function Eo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function So(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];if(i<0){n+=i/2;i=0}if(s<0){r+=s/2;s=0}return{x:n,y:r,dx:i,dy:s}}function xo(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function To(e){return e.rangeExtent?e.rangeExtent():xo(e.range())}function No(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Co(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;if(s<i){o=n,n=r,r=o;o=i,i=s,s=o}if(t=t(s-i)){e[n]=t.floor(i);e[r]=t.ceil(s)}return e}function ko(t,n,r,i){var s=[],o=[],u=0,a=Math.min(t.length,n.length)-1;if(t[a]<t[0]){t=t.slice().reverse();n=n.slice().reverse()}while(++u<=a){s.push(r(t[u-1],t[u]));o.push(i(n[u-1],n[u]))}return function(n){var r=e.bisect(t,n,1,a)-1;return o[r](s[r](n))}}function Lo(e,t,n,r){function o(){var o=Math.min(e.length,t.length)>2?ko:No,a=r?ws:bs;i=o(e,t,a,n);s=o(t,e,a,Qi);return u}function u(e){return i(e)}var i,s;u.invert=function(e){return s(e)};u.domain=function(t){if(!arguments.length)return e;e=t.map(Number);return o()};u.range=function(e){if(!arguments.length)return t;t=e;return o()};u.rangeRound=function(e){return u.range(e).interpolate(ys)};u.clamp=function(e){if(!arguments.length)return r;r=e;return o()};u.interpolate=function(e){if(!arguments.length)return n;n=e;return o()};u.ticks=function(t){return _o(e,t)};u.tickFormat=function(t,n){return Do(e,t,n)};u.nice=function(){Co(e,Oo);return o()};u.copy=function(){return Lo(e,t,n,r)};return o()}function Ao(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Oo(e){e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1);return e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Mo(e,t){var n=xo(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;if(s<=.15)i*=10;else if(s<=.35)i*=5;else if(s<=.75)i*=2;n[0]=Math.ceil(n[0]/i)*i;n[1]=Math.floor(n[1]/i)*i+i*.5;n[2]=i;return n}function _o(t,n){return e.range.apply(e,Mo(t,n))}function Do(t,n,r){var i=-Math.floor(Math.log(Mo(t,n)[2])/Math.LN10+.01);return e.format(r?r.replace(dn,function(e,t,n,r,s,o,u,a,f,l){return[t,n,r,s,o,u,a,f||"."+(i-(l==="%")*2),l].join("")}):",."+i+"f")}function Po(e,t,n,r){function i(t){return e(n(t))}i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);if(t[0]<0)n=Fo,r=Io;else n=Bo,r=jo;e.domain(t.map(n));return i};i.base=function(e){if(!arguments.length)return t;t=+e;return i};i.nice=function(){e.domain(Co(e.domain(),qo(t)));return i};i.ticks=function(){var i=xo(e.domain()),s=[];if(i.every(isFinite)){var o=Math.log(t),u=Math.floor(i[0]/o),a=Math.ceil(i[1]/o),f=r(i[0]),l=r(i[1]),c=t%1?2:t;if(n===Fo){s.push(-Math.pow(t,-u));for(;u++<a;)for(var h=c-1;h>0;h--)s.push(-Math.pow(t,-u)*h)}else{for(;u<a;u++)for(var h=1;h<c;h++)s.push(Math.pow(t,u)*h);s.push(Math.pow(t,u))}for(u=0;s[u]<f;u++){}for(a=s.length;s[a-1]>l;a--){}s=s.slice(u,a)}return s};i.tickFormat=function(e,s){if(arguments.length<2)s=Ho;if(!arguments.length)return s;var o=Math.log(t),u=Math.max(.1,e/i.ticks().length),a=n===Fo?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil),f;return function(e){return e/r(o*a(n(e)/o+f))<=u?s(e):""}};i.copy=function(){return Po(e.copy(),t,n,r)};return Ao(i,e)}function Bo(e){return Math.log(e<0?0:e)}function jo(e){return Math.exp(e)}function Fo(e){return-Math.log(e>0?0:-e)}function Io(e){return-Math.exp(-e)}function qo(e){e=Math.log(e);var t={floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}};return function(){return t}}function Ro(e,t){function i(t){return e(n(t))}var n=Uo(t),r=Uo(1/t);i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);e.domain(t.map(n));return i};i.ticks=function(e){return _o(i.domain(),e)};i.tickFormat=function(e,t){return Do(i.domain(),e,t)};i.nice=function(){return i.domain(Co(i.domain(),Oo))};i.exponent=function(e){if(!arguments.length)return t;var s=i.domain();n=Uo(t=e);r=Uo(1/t);return i.domain(s)};i.copy=function(){return Ro(e.copy(),t)};return Ao(i,e)}function Uo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function zo(t,n){function o(e){return i[((r.get(e)||r.set(e,t.push(e)))-1)%i.length]}function u(n,r){return e.range(t.length).map(function(e){return n+r*e})}var r,i,s;o.domain=function(e){if(!arguments.length)return t;t=[];r=new c;var i=-1,s=e.length,u;while(++i<s)if(!r.has(u=e[i]))r.set(u,t.push(u));return o[n.t].apply(o,n.a)};o.range=function(e){if(!arguments.length)return i;i=e;s=0;n={t:"range",a:arguments};return o};o.rangePoints=function(e,r){if(arguments.length<2)r=0;var a=e[0],f=e[1],l=(f-a)/(Math.max(1,t.length-1)+r);i=u(t.length<2?(a+f)/2:a+l*r/2,l);s=0;n={t:"rangePoints",a:arguments};return o};o.rangeBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=(c-l)/(t.length-r+2*a);i=u(l+h*a,h);if(f)i.reverse();s=h*(1-r);n={t:"rangeBands",a:arguments};return o};o.rangeRoundBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=Math.floor((c-l)/(t.length-r+2*a)),p=c-l-(t.length-r)*h;i=u(l+Math.round(p/2),h);if(f)i.reverse();s=Math.round(h*(1-r));n={t:"rangeRoundBands",a:arguments};return o};o.rangeBand=function(){if(s<=50)return s;else return 50};o.rangeExtent=function(){return xo(n.a[0])};o.copy=function(){return zo(t,n)};return o.domain(t)}function Ko(t,n){function i(){var i=0,o=n.length;r=[];while(++i<o)r[i-1]=e.quantile(t,i/o);return s}function s(t){if(isNaN(t=+t))return NaN;return n[e.bisect(r,t)]}var r;s.domain=function(n){if(!arguments.length)return t;t=n.filter(function(e){return!isNaN(e)}).sort(e.ascending);return i()};s.range=function(e){if(!arguments.length)return n;n=e;return i()};s.quantiles=function(){return r};s.copy=function(){return Ko(t,n)};return i()}function Qo(e,t,n){function s(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function o(){r=n.length/(t-e);i=n.length-1;return s}var r,i;s.domain=function(n){if(!arguments.length)return[e,t];e=+n[0];t=+n[n.length-1];return o()};s.range=function(e){if(!arguments.length)return n;n=e;return o()};s.copy=function(){return Qo(e,t,n)};return o()}function Go(t,n){function r(r){return n[e.bisect(t,r)]}r.domain=function(e){if(!arguments.length)return t;t=e;return r};r.range=function(e){if(!arguments.length)return n;n=e;return r};r.copy=function(){return Go(t,n)};return r}function Yo(e){function t(e){return+e}t.invert=t;t.domain=t.range=function(n){if(!arguments.length)return e;e=n.map(t);return t};t.ticks=function(t){return _o(e,t)};t.tickFormat=function(t,n){return Do(e,t,n)};t.copy=function(){return Yo(e)};return t}function tu(e){return e.innerRadius}function nu(e){return e.outerRadius}function ru(e){return e.startAngle}function iu(e){return e.endAngle}function su(e){var t,n=-1,r=e.length,i,s;while(++n<r){t=e[n];i=t[0];s=t[1]+Zo;t[0]=i*Math.cos(s);t[1]=i*Math.sin(s)}return e}function ou(e){function c(u){function x(){c.push("M",o(e(p),l),f,a(e(h.reverse()),l),"Z")}var c=[],h=[],p=[],d=-1,v=u.length,m,g=Qt(t),y=Qt(r),b=t===n?function(){return E}:Qt(n),w=r===i?function(){return S}:Qt(i),E,S;while(++d<v){if(s.call(this,m=u[d],d)){h.push([E=+g.call(this,m,d),S=+y.call(this,m,d)]);p.push([+b.call(this,m,d),+w.call(this,m,d)])}else if(h.length){x();h=[];p=[]}}if(h.length)x();return c.length?c.join(""):null}var t=si,n=si,r=0,i=oi,s=$n,o=ai,u=o.key,a=o,f="L",l=.7;c.x=function(e){if(!arguments.length)return n;t=n=e;return c};c.x0=function(e){if(!arguments.length)return t;t=e;return c};c.x1=function(e){if(!arguments.length)return n;n=e;return c};c.y=function(e){if(!arguments.length)return i;r=i=e;return c};c.y0=function(e){if(!arguments.length)return r;r=e;return c};c.y1=function(e){if(!arguments.length)return i;i=e;return c};c.defined=function(e){if(!arguments.length)return s;s=e;return c};c.interpolate=function(e){if(!arguments.length)return u;if(typeof e==="function")u=o=e;else u=(o=ui.get(e)||ai).key;a=o.reverse||o;f=o.closed?"M":"L";return c};c.tension=function(e){if(!arguments.length)return l;l=e;return c};return c}function uu(e){return e.radius}function au(e){return[e.x,e.y]}function fu(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Zo;return[n*Math.cos(r),n*Math.sin(r)]}}function lu(){return 64}function cu(){return"circle"}function hu(e){var t=Math.sqrt(e/dt);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function mu(e,t){A(e,gu);e.id=t;return e}function Eu(e,t,n,r){var i=e.id;return nt(e,typeof n==="function"?function(e,s,o){e.__transition__[i].tween.set(t,r(n.call(e,e.__data__,s,o)))}:(n=r(n),function(e){e.__transition__[i].tween.set(t,n)}))}function Su(e){if(e==null)e="";return function(){this.textContent=e}}function xu(t,n,r,i){var s=t.__transition__||(t.__transition__={active:0,count:0}),o=s[r];if(!o){var u=i.time;o=s[r]={tween:new c,event:e.dispatch("start","end"),time:u,ease:i.ease,delay:i.delay,duration:i.duration};++s.count;e.timer(function(i){function d(i){if(s.active>r)return m();s.active=r;l.start.call(t,a,n);o.tween.forEach(function(e,r){if(r=r.call(t,a,n)){p.push(r)}});if(!v(i))e.timer(v,0,u);return 1}function v(e){if(s.active!==r)return m();var i=(e-c)/h,o=f(i),u=p.length;while(u>0){p[--u].call(t,o)}if(i>=1){m();l.end.call(t,a,n);return 1}}function m(){if(--s.count)delete s[r];else delete t.__transition__;return 1}var a=t.__data__,f=o.ease,l=o.event,c=o.delay,h=o.duration,p=[];return c<=i?d(i):e.timer(d,c,u),1},0,u);return o}}function Cu(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function ku(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Lu(e,t,n){i=[];if(n&&t.length>1){var r=xo(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o){for(a=n;--a>0;){if((f=+t[s]-a*u)>=r[0]){i.push(f)}}}for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];){i.push(f)}}return i}function Du(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Uu(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){t(n=e(new Mu(n-1)),1);return n}function s(e,n){t(e=new Mu(+e),n);return e}function o(e,r,s){var o=i(e),u=[];if(s>1){while(o<r){if(!(n(o)%s))u.push(new Date(+o));t(o,1)}}else{while(o<r)u.push(new Date(+o)),t(o,1)}return u}function u(e,t,n){try{Mu=Du;var r=new Du;r._=e;return o(r,t,n)}finally{Mu=Date}}e.floor=e;e.round=r;e.ceil=i;e.offset=s;e.range=o;var a=e.utc=zu(e);a.floor=a;a.round=zu(r);a.ceil=zu(i);a.offset=zu(s);a.range=u;return e}function zu(e){return function(t,n){try{Mu=Du;var r=new Du;r._=t;return e(r,n)._}finally{Mu=Date}}}function Wu(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i===37){s=na[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++)){return-1}}return r}function Xu(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Vu(e){var t=new c,n=-1,r=e.length;while(++n<r)t.set(e[n].toLowerCase(),n);return t}function $u(e,t,n){e+="";var r=e.length;return r<n?(new Array(n-r+1)).join(t)+e:e}function ra(e,t,n){Ku.lastIndex=0;var r=Ku.exec(t.substring(n));return r?n+=r[0].length:-1}function ia(e,t,n){Ju.lastIndex=0;var r=Ju.exec(t.substring(n));return r?n+=r[0].length:-1}function sa(e,t,n){Yu.lastIndex=0;var r=Yu.exec(t.substring(n));return r?(e.m=Zu.get(r[0].toLowerCase()),n+=r[0].length):-1}function oa(e,t,n){Qu.lastIndex=0;var r=Qu.exec(t.substring(n));return r?(e.m=Gu.get(r[0].toLowerCase()),n+=r[0].length):-1}function ua(e,t,n){return Wu(e,ta.c.toString(),t,n)}function aa(e,t,n){return Wu(e,ta.x.toString(),t,n)}function fa(e,t,n){return Wu(e,ta.X.toString(),t,n)}function la(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function ca(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.y=ha(+r[0]),n+=r[0].length):-1}function ha(e){return e+(e>68?1900:2e3)}function pa(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function da(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function va(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function ma(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function ga(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function ya(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function wa(e,t,n){var r=Ea.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function Sa(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+$u(r,"0",2)+$u(i,"0",2)}function Ta(e){return e.toISOString()}function Na(t,n,r){function i(e){return t(e)}i.invert=function(e){return ka(t.invert(e))};i.domain=function(e){if(!arguments.length)return t.domain().map(ka);t.domain(e);return i};i.nice=function(e){return i.domain(Co(i.domain(),function(){return e}))};i.ticks=function(r,s){var o=Ca(i.domain());if(typeof r!=="function"){var u=o[1]-o[0],a=u/r,f=e.bisect(Ma,a);if(f==Ma.length)return n.year(o,r);if(!f)return t.ticks(r).map(ka);if(Math.log(a/Ma[f-1])<Math.log(Ma[f]/a))--f;r=n[f];s=r[1];r=r[0].range}return r(o[0],new Date(+o[1]+1),s)};i.tickFormat=function(){return r};i.copy=function(){return Na(t.copy(),n,r)};return e.rebind(i,t,"range","rangeRound","interpolate","clamp")}function Ca(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function ka(e){return new Date(e)}function La(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function Aa(e){var t=new Date(e,0,1);t.setFullYear(e);return t}function Oa(e){var t=e.getFullYear(),n=Aa(t),r=Aa(t+1);return t+(e-n)/(r-n)}function Ia(e){var t=new Date(Date.UTC(e,0,1));t.setUTCFullYear(e);return t}function qa(e){var t=e.getUTCFullYear(),n=Ia(t),r=Ia(t+1);return t+(e-n)/(r-n)}function Ra(e){return e.responseText}function Ua(e){return JSON.parse(e.responseText)}function za(e){var n=t.createRange();n.selectNode(t.body);return n.createContextualFragment(e.responseText)}function Wa(e){return e.responseXML}var e={version:"3.1.5"};if(!Date.now)Date.now=function(){return+(new Date)};var t=document,n=window;try{t.createElement("div").style.setProperty("opacity",0,"")}catch(r){var i=n.CSSStyleDeclaration.prototype,s=i.setProperty;i.setProperty=function(e,t,n){s.call(this,e,t+"",n)}}e.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN};e.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&i>s)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&i>s)i=s}return i};e.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&s>i)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&s>i)i=s}return i};e.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)if((s=e[n])!=null){if(i>s)i=s;if(o<s)o=s}}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null){if(i>s)i=s;if(o<s)o=s}}return[i,o]};e.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1){while(++s<r)if(!isNaN(i=+e[s]))n+=i}else{while(++s<r)if(!isNaN(i=+t.call(e,e[s],s)))n+=i}return n};e.mean=function(e,t){var n=e.length,r,i=0,s=-1,u=0;if(arguments.length===1){while(++s<n)if(o(r=e[s]))i+=(r-i)/++u}else{while(++s<n)if(o(r=t.call(e,e[s],s)))i+=(r-i)/++u}return u?i:undefined};e.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],s=n-r;return s?i+s*(e[r]-i):i};e.median=function(t,n){if(arguments.length>1)t=t.map(n);t=t.filter(o);return t.length?e.quantile(t.sort(e.ascending),.5):undefined};e.bisector=function(e){return{left:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(e.call(t,t[s],s)<n)r=s+1;else i=s}return r},right:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(n<e.call(t,t[s],s))i=s;else r=s+1}return r}}};var u=e.bisector(function(e){return e});e.bisectLeft=u.left;e.bisect=e.bisectRight=u.right;e.shuffle=function(e){var t=e.length,n,r;while(t){r=Math.random()*t--|0;n=e[t],e[t]=e[r],e[r]=n}return e};e.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n};e.zip=function(){if(!(s=arguments.length))return[];for(var t=-1,n=e.min(arguments,a),r=new Array(n);++t<n;){for(var i=-1,s,o=r[t]=new Array(s);++i<s;){o[i]=arguments[i][t]}}return r};e.transpose=function(t){return e.zip.apply(e,t)};e.keys=function(e){var t=[];for(var n in e)t.push(n);return t};e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t};e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};e.merge=function(e){return Array.prototype.concat.apply([],e)};e.range=function(e,t,n){if(arguments.length<3){n=1;if(arguments.length<2){t=e;e=0}}if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=f(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r};e.map=function(e){var t=new c;for(var n in e)t.set(n,e[n]);return t};l(c,{has:function(e){return h+e in this},get:function(e){return this[h+e]},set:function(e,t){return this[h+e]=t},remove:function(e){e=h+e;return e in this&&delete this[e]},keys:function(){var e=[];this.forEach(function(t){e.push(t)});return e},values:function(){var e=[];this.forEach(function(t,n){e.push(n)});return e},entries:function(){var e=[];this.forEach(function(t,n){e.push({key:t,value:n})});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1),this[t])}}}});var h="\0",p=h.charCodeAt(0);e.nest=function(){function o(e,r,u){if(u>=n.length)return s?s.call(t,r):i?r.sort(i):r;var a=-1,f=r.length,l=n[u++],h,p,d,v=new c,m;while(++a<f){if(m=v.get(h=l(p=r[a]))){m.push(p)}else{v.set(h,[p])}}if(e){p=e();d=function(t,n){p.set(t,o(e,n,u))}}else{p={};d=function(t,n){p[t]=o(e,n,u)}}v.forEach(d);return p}function u(e,t){if(t>=n.length)return e;var i=[],s=r[t++];e.forEach(function(e,n){i.push({key:e,values:u(n,t)})});return s?i.sort(function(e,t){return s(e.key,t.key)}):i}var t={},n=[],r=[],i,s;t.map=function(e,t){return o(t,e,0)};t.entries=function(t){return u(o(e.map,t,0),0)};t.key=function(e){n.push(e);return t};t.sortKeys=function(e){r[n.length-1]=e;return t};t.sortValues=function(e){i=e;return t};t.rollup=function(e){s=e;return t};return t};e.set=function(e){var t=new d;if(e)for(var n=0;n<e.length;n++)t.add(e[n]);return t};l(d,{has:function(e){return h+e in this},add:function(e){this[h+e]=true;return e},remove:function(e){e=h+e;return e in this&&delete this[e]},values:function(){var e=[];this.forEach(function(t){e.push(t)});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1))}}}});e.behavior={};e.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=v(e,t,t[i]);return e};e.dispatch=function(){var e=new m,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=g(e);return e};m.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0){r=e.substring(n+1);e=e.substring(0,n)}if(e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(arguments.length===2){if(t==null)for(e in this){if(this.hasOwnProperty(e))this[e].on(r,null)}return this}};e.event=null;e.mouse=function(e){return T(e,w())};var x=/WebKit/.test(n.navigator.userAgent)?-1:0;var N=k;try{N(t.documentElement.childNodes)[0].nodeType}catch(L){N=C}var A=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};e.touches=function(e,t){if(arguments.length<2)t=w().touches;return t?N(t).map(function(t){var n=T(e,t);n.identifier=t.identifier;return n}):[]};e.behavior.drag=function(){function i(){this.on("mousedown.drag",s).on("touchstart.drag",s)}function s(){function h(){var t=i.parentNode;return u!=null?e.touches(t).filter(function(e){return e.identifier===u})[0]:e.mouse(t)}function p(){if(!i.parentNode)return d();var e=h(),t=e[0]-f[0],n=e[1]-f[1];l|=t|n;f=e;y();s({type:"drag",x:e[0]+a[0],y:e[1]+a[1],dx:t,dy:n})}function d(){s({type:"dragend"});if(l){y();if(e.event.target===o)E(c,"click")}c.on(u!=null?"touchmove.drag-"+u:"mousemove.drag",null).on(u!=null?"touchend.drag-"+u:"mouseup.drag",null)}var i=this,s=t.of(i,arguments),o=e.event.target,u=e.event.touches?e.event.changedTouches[0].identifier:null,a,f=h(),l=0;var c=e.select(n).on(u!=null?"touchmove.drag-"+u:"mousemove.drag",p).on(u!=null?"touchend.drag-"+u:"mouseup.drag",d,true);if(r){a=r.apply(i,arguments);a=[a.x-f[0],a.y-f[1]]}else{a=[0,0]}if(u==null)y();s({type:"dragstart"})}var t=S(i,"drag","dragstart","dragend"),r=null;i.origin=function(e){if(!arguments.length)return r;r=e;return i};return e.rebind(i,t,"on")};var M=function(e,t){return t.querySelector(e)},_=function(e,t){return t.querySelectorAll(e)},D=t.documentElement,P=D.matchesSelector||D.webkitMatchesSelector||D.mozMatchesSelector||D.msMatchesSelector||D.oMatchesSelector,H=function(e,t){return P.call(e,t)};if(typeof Sizzle==="function"){M=function(e,t){return Sizzle(e,t)[0]||null};_=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))};H=Sizzle.matchesSelector}var B=[];e.selection=function(){return st};e.selection.prototype=B;B.select=function(e){var t=[],n,r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){t.push(n=[]);n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;){if(s=i[a]){n.push(r=e.call(s,s.__data__,a));if(r&&"__data__"in s)r.__data__=s.__data__}else{n.push(null)}}}return O(t)};B.selectAll=function(e){var t=[],n,r;if(typeof e!=="function")e=F(e);for(var i=-1,s=this.length;++i<s;){for(var o=this[i],u=-1,a=o.length;++u<a;){if(r=o[u]){t.push(n=N(e.call(r,r.__data__,u)));n.parentNode=r}}}return O(t)};var I={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:I,qualify:function(e){var t=e.indexOf(":"),n=e;if(t>=0){n=e.substring(0,t);e=e.substring(t+1)}return I.hasOwnProperty(n)?{space:I[n],local:e}:e}};B.attr=function(t,n){if(arguments.length<2){if(typeof t==="string"){var r=this.node();t=e.ns.qualify(t);return t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each(q(n,t[n]));return this}return this.each(q(t,n))};e.requote=function(e){return e.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;B.classed=function(e,t){if(arguments.length<2){if(typeof e==="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return false}else{t=n.getAttribute("class");while(++i<r)if(!z(e[i]).test(t))return false}return true}for(t in e)this.each(W(t,e[t]));return this}return this.each(W(e,t))};B.style=function(e,t,r){var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.each(V(r,e[r],t));return this}if(i<2)return n.getComputedStyle(this.node(),null).getPropertyValue(e);r=""}return this.each(V(e,t,r))};B.property=function(e,t){if(arguments.length<2){if(typeof e==="string")return this.node()[e];for(t in e)this.each($(t,e[t]));return this}return this.each($(e,t))};B.text=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent};B.html=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML};B.append=function(n){function r(){return this.appendChild(t.createElementNS(this.namespaceURI,n))}function i(){return this.appendChild(t.createElementNS(n.space,n.local))}n=e.ns.qualify(n);return this.select(n.local?i:r)};B.insert=function(n,r){function i(e,i){return this.insertBefore(t.createElementNS(this.namespaceURI,n),r.call(this,e,i))}function s(e,i){return this.insertBefore(t.createElementNS(n.space,n.local),r.call(this,e,i))}n=e.ns.qualify(n);if(typeof r!=="function")r=j(r);return this.select(n.local?s:i)};B.remove=function(){return this.each(function(){var e=this.parentNode;if(e)e.removeChild(this)})};B.data=function(e,t){function o(e,n){var r,i=e.length,s=n.length,o=Math.min(i,s),l=new Array(s),h=new Array(s),p=new Array(i),d,v;if(t){var m=new c,g=new c,y=[],b;for(r=-1;++r<i;){b=t.call(d=e[r],d.__data__,r);if(m.has(b)){p[r]=d}else{m.set(b,d)}y.push(b)}for(r=-1;++r<s;){b=t.call(n,v=n[r],r);if(d=m.get(b)){l[r]=d;d.__data__=v}else if(!g.has(b)){h[r]=J(v)}g.set(b,v);m.remove(b)}for(r=-1;++r<i;){if(m.has(y[r])){p[r]=e[r]}}}else{for(r=-1;++r<o;){d=e[r];v=n[r];if(d){d.__data__=v;l[r]=d}else{h[r]=J(v)}}for(;r<s;++r){h[r]=J(n[r])}for(;r<i;++r){p[r]=e[r]}}h.update=l;h.parentNode=l.parentNode=p.parentNode=e.parentNode;u.push(h);a.push(l);f.push(p)}var n=-1,r=this.length,i,s;if(!arguments.length){e=new Array(r=(i=this[0]).length);while(++n<r){if(s=i[n]){e[n]=s.__data__}}return e}var u=rt([]),a=O([]),f=O([]);if(typeof e==="function"){while(++n<r){o(i=this[n],e.call(i,i.parentNode.__data__,n))}}else{while(++n<r){o(i=this[n],e)}}a.enter=function(){return u};a.exit=function(){return f};return a};B.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")};B.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return O(t)};B.order=function(){for(var e=-1,t=this.length;++e<t;){for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;){if(s=n[r]){if(i&&i!==s.nextSibling)i.parentNode.insertBefore(s,i);i=s}}}return this};B.sort=function(e){e=Q.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()};B.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!=="string"){if(r<2)t=false;for(n in e)this.each(Y(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=false}return this.each(Y(e,t,n))};var Z=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});Z.forEach(function(e){if("on"+e in t)Z.remove(e)});B.each=function(e){return nt(this,function(t,n,r){e.call(t,t.__data__,n,r)})};B.call=function(e){var t=N(arguments);e.apply(t[0]=this,t);return this};B.empty=function(){return!this.node()};B.node=function(){for(var e=0,t=this.length;e<t;e++){for(var n=this[e],r=0,i=n.length;r<i;r++){var s=n[r];if(s)return s}}return null};var it=[];e.selection.enter=rt;e.selection.enter.prototype=it;it.append=B.append;it.insert=B.insert;it.empty=B.empty;it.node=B.node;it.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update;t.push(n=[]);n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;){if(o=s[f]){n.push(i[f]=r=e.call(s.parentNode,o.__data__,f));r.__data__=o.__data__}else{n.push(null)}}}return O(t)};B.transition=function(){var e=bu||++yu,t=[],n,r,i=Object.create(wu);i.time=Date.now();for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;){if(r=u[a])xu(r,a,e,i);n.push(r)}}return mu(t,e)};var st=O([[t]]);st[0].parentNode=D;e.select=function(e){return typeof e==="string"?st.select(e):O([[e]])};e.selectAll=function(e){return typeof e==="string"?st.selectAll(e):O([N(e)])};e.behavior.zoom=function(){function p(){this.on("mousedown.zoom",x).on("mousemove.zoom",N).on(at+".zoom",T).on("dblclick.zoom",C).on("touchstart.zoom",k).on("touchmove.zoom",L).on("touchend.zoom",k)}function d(e){return[(e[0]-t[0])/i,(e[1]-t[1])/i]}function v(e){return[e[0]*i+t[0],e[1]*i+t[1]]}function m(e){i=Math.max(o[0],Math.min(o[1],e))}function g(e,n){n=v(n);t[0]+=e[0]-n[0];t[1]+=e[1]-n[1]}function b(){if(f)f.domain(a.range().map(function(e){return(e-t[0])/i}).map(a.invert));if(c)c.domain(l.range().map(function(e){return(e-t[1])/i}).map(l.invert))}function w(n){b();e.event.preventDefault();n({type:"zoom",scale:i,translate:t})}function x(){function f(){s=1;g(e.mouse(t),a);w(r)}function l(){if(s)y();o.on("mousemove.zoom",null).on("mouseup.zoom",null);if(s&&e.event.target===i)E(o,"click.zoom")}var t=this,r=u.of(t,arguments),i=e.event.target,s=0,o=e.select(n).on("mousemove.zoom",f).on("mouseup.zoom",l),a=d(e.mouse(t));n.focus();y()}function T(){if(!r)r=d(e.mouse(this));m(Math.pow(2,ut()*.002)*i);g(e.mouse(this),r);w(u.of(this,arguments))}function N(){r=null}function C(){var t=e.mouse(this),n=d(t),r=Math.log(i)/Math.LN2;m(Math.pow(2,e.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1));g(t,n);w(u.of(this,arguments))}function k(){var t=e.touches(this),n=Date.now();s=i;r={};t.forEach(function(e){r[e.identifier]=d(e)});y();if(t.length===1){if(n-h<500){var o=t[0],a=d(t[0]);m(i*2);g(o,a);w(u.of(this,arguments))}h=n}}function L(){var t=e.touches(this),n=t[0],i=r[n.identifier];if(o=t[1]){var o,a=r[o.identifier];n=[(n[0]+o[0])/2,(n[1]+o[1])/2];i=[(i[0]+a[0])/2,(i[1]+a[1])/2];m(e.event.scale*s)}g(n,i);h=null;w(u.of(this,arguments))}var t=[0,0],r,i=1,s,o=ot,u=S(p,"zoom"),a,f,l,c,h;p.translate=function(e){if(!arguments.length)return t;t=e.map(Number);b();return p};p.scale=function(e){if(!arguments.length)return i;i=+e;b();return p};p.scaleExtent=function(e){if(!arguments.length)return o;o=e==null?ot:e.map(Number);return p};p.x=function(e){if(!arguments.length)return f;f=e;a=e.copy();t=[0,0];i=1;return p};p.y=function(e){if(!arguments.length)return c;c=e;l=e.copy();t=[0,0];i=1;return p};return e.rebind(p,u,"on")};var ot=[0,Infinity];var ut,at="onwheel"in t?(ut=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in t?(ut=function(){return e.event.wheelDelta},"mousewheel"):(ut=function(){return-e.event.detail},"MozMousePixelScroll");ft.prototype.toString=function(){return this.rgb()+""};e.hsl=function(e,t,n){return arguments.length===1?e instanceof ct?lt(e.h,e.s,e.l):Wt(""+e,Xt,lt):lt(+e,+t,+n)};var ht=ct.prototype=new ft;ht.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,this.l/e)};ht.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,e*this.l)};ht.rgb=function(){return pt(this.h,this.s,this.l)};var dt=Math.PI,vt=1e-6,mt=dt/180,gt=180/dt;e.hcl=function(t,n,r){return arguments.length===1?t instanceof Nt?Tt(t.h,t.c,t.l):t instanceof At?Bt(t.l,t.a,t.b):Bt((t=Vt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):Tt(+t,+n,+r)};var Ct=Nt.prototype=new ft;Ct.brighter=function(e){return Tt(this.h,this.c,Math.min(100,this.l+Ot*(arguments.length?e:1)))};Ct.darker=function(e){return Tt(this.h,this.c,Math.max(0,this.l-Ot*(arguments.length?e:1)))};Ct.rgb=function(){return kt(this.h,this.c,this.l).rgb()};e.lab=function(t,n,r){return arguments.length===1?t instanceof At?Lt(t.l,t.a,t.b):t instanceof Nt?kt(t.l,t.c,t.h):Vt((t=e.rgb(t)).r,t.g,t.b):Lt(+t,+n,+r)};var Ot=18;var Mt=.95047,_t=1,Dt=1.08883;var Pt=At.prototype=new ft;Pt.brighter=function(e){return Lt(Math.min(100,this.l+Ot*(arguments.length?e:1)),this.a,this.b)};Pt.darker=function(e){return Lt(Math.max(0,this.l-Ot*(arguments.length?e:1)),this.a,this.b)};Pt.rgb=function(){return Ht(this.l,this.a,this.b)};e.rgb=function(e,t,n){return arguments.length===1?e instanceof Rt?qt(e.r,e.g,e.b):Wt(""+e,qt,pt):qt(~~e,~~t,~~n)};var Ut=Rt.prototype=new ft;Ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;if(!t&&!n&&!r)return qt(i,i,i);if(t&&t<i)t=i;if(n&&n<i)n=i;if(r&&r<i)r=i;return qt(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e)))};Ut.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return qt(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))};Ut.hsl=function(){return Xt(this.r,this.g,this.b)};Ut.toString=function(){return"#"+zt(this.r)+zt(this.g)+zt(this.b)};var Kt=e.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});Kt.forEach(function(e,t){Kt.set(e,Wt(t,qt,pt))});e.functor=Qt;e.xhr=function(t,r,i){function l(){var e=f.status;!e&&f.responseText||e>=200&&e<300||e===304?o.load.call(s,a.call(s,f)):o.error.call(s,f)}var s={},o=e.dispatch("progress","load","error"),u={},a=Gt,f=new(n.XDomainRequest&&/^(http(s)?:)?\/\//.test(t)?XDomainRequest:XMLHttpRequest);"onload"in f?f.onload=f.onerror=l:f.onreadystatechange=function(){f.readyState>3&&l()};f.onprogress=function(t){var n=e.event;e.event=t;try{o.progress.call(s,f)}finally{e.event=n}};s.header=function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return u[e];if(t==null)delete u[e];else u[e]=t+"";return s};s.mimeType=function(e){if(!arguments.length)return r;r=e==null?null:e+"";return s};s.response=function(e){a=e;return s};["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(N(arguments)))}});s.send=function(e,n,i){if(arguments.length===2&&typeof n==="function")i=n,n=null;f.open(e,t,true);if(r!=null&&!("accept"in u))u["accept"]=r+",*/*";if(f.setRequestHeader)for(var o in u)f.setRequestHeader(o,u[o]);if(r!=null&&f.overrideMimeType)f.overrideMimeType(r);if(i!=null)s.on("error",i).on("load",function(e){i(null,e)});f.send(n==null?null:n);return s};s.abort=function(){f.abort();return s};e.rebind(s,o,"on");if(arguments.length===2&&typeof r==="function")i=r,r=null;return i==null?s:s.get(Yt(i))};e.csv=Zt(",","text/csv");e.tsv=Zt(" ","text/tab-separated-values");var en=0,tn={},nn=null,rn,sn;e.timer=function(e,t,n){if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}var r=tn[e.id];if(r&&r.callback===e){r.then=n;r.delay=t}else tn[e.id=++en]=nn={callback:e,then:n,delay:t,next:nn};if(!rn){sn=clearTimeout(sn);rn=1;an(on)}};e.timer.flush=function(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(!n.delay)n.flush=n.callback(e);n=n.next}un()};var an=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(e){setTimeout(e,17)};var fn=".",ln=",",cn=[3,3];var hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(pn);e.formatPrefix=function(t,n){var r=0;if(t){if(t<0)t*=-1;if(n)t=e.round(t,mn(t,n));r=1+Math.floor(1e-12+Math.log(t)/Math.LN10);r=Math.max(-24,Math.min(24,Math.floor((r<=0?r+1:r-1)/3)*3))}return hn[8+r/3]};e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};e.format=function(t){var n=dn.exec(t),r=n[1]||" ",i=n[2]||">",s=n[3]||"",o=n[4]||"",u=n[5],a=+n[6],f=n[7],l=n[8],c=n[9],h=1,p="",d=false;if(l)l=+l.substring(1);if(u||r==="0"&&i==="="){u=r="0";i="=";if(f)a-=Math.floor((a-1)/4)}switch(c){case"n":f=true;c="g";break;case"%":h=100;p="%";c="f";break;case"p":h=100;p="%";c="r";break;case"b":case"o":case"x":case"X":if(o)o="0"+c.toLowerCase();case"c":case"d":d=true;l=0;break;case"s":h=-1;c="r";break}if(o==="#")o="";if(c=="r"&&!l)c="g";if(l!=null){if(c=="g")l=Math.max(1,Math.min(21,l));else if(c=="e"||c=="f")l=Math.max(0,Math.min(20,l))}c=vn.get(c)||gn;var v=u&&f;return function(t){if(d&&t%1)return"";var n=t<0||t===0&&1/t<0?(t=-t,"-"):s;if(h<0){var m=e.formatPrefix(t,l);t=m.scale(t);p=m.symbol}else{t*=h}t=c(t,l);if(!u&&f)t=yn(t);var g=o.length+t.length+(v?0:n.length),y=g<a?(new Array(g=a-g+1)).join(r):"";if(v)t=yn(y+t);if(fn)t.replace(".",fn);n+=o;return(i==="<"?n+t+y:i===">"?y+n+t:i==="^"?y.substring(0,g>>=1)+n+t+y.substring(g):n+(v?t:y+t))+p}};var dn=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;var vn=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,n){return(t=e.round(t,mn(t,n))).toFixed(Math.max(0,Math.min(20,mn(t*(1+1e-15),n))))}});var yn=Gt;if(cn){var bn=cn.length;yn=function(e){var t=e.lastIndexOf("."),n=t>=0?"."+e.substring(t+1):(t=e.length,""),r=[],i=0,s=cn[0];while(t>0&&s>0){r.push(e.substring(t-=s,t+s));s=cn[i=(i+1)%bn]}return r.reverse().join(ln||"")+n}}e.geo={};e.geo.stream=function(e,t){if(e&&En.hasOwnProperty(e.type)){En[e.type](e,t)}else{wn(e,t)}};var En={Feature:function(e,t){wn(e.geometry,t)},FeatureCollection:function(e,t){var n=e.features,r=-1,i=n.length;while(++r<i)wn(n[r].geometry,t)}};var Sn={Sphere:function(e,t){t.sphere()},Point:function(e,t){var n=e.coordinates;t.point(n[0],n[1])},MultiPoint:function(e,t){var n=e.coordinates,r=-1,i=n.length,s;while(++r<i)s=n[r],t.point(s[0],s[1])},LineString:function(e,t){xn(e.coordinates,t,0)},MultiLineString:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)xn(n[r],t,0)},Polygon:function(e,t){Tn(e.coordinates,t)},MultiPolygon:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)Tn(n[r],t)},GeometryCollection:function(e,t){var n=e.geometries,r=-1,i=n.length;while(++r<i)wn(n[r],t)}};e.geo.area=function(t){Nn=0;e.geo.stream(t,Ln);return Nn};var Nn,Cn,kn;var Ln={sphere:function(){Nn+=4*dt},point:G,lineStart:G,lineEnd:G,polygonStart:function(){Cn=1,kn=0;Ln.lineStart=An},polygonEnd:function(){var e=2*Math.atan2(kn,Cn);Nn+=e<0?4*dt+e:e;Ln.lineStart=Ln.lineEnd=Ln.point=G}};e.geo.bounds=On(Gt);e.geo.centroid=function(t){Mn=_n=Dn=Pn=Hn=0;e.geo.stream(t,Bn);var n;if(_n&&Math.abs(n=Math.sqrt(Dn*Dn+Pn*Pn+Hn*Hn))>vt){return[Math.atan2(Pn,Dn)*gt,Math.asin(Math.max(-1,Math.min(1,Hn/n)))*gt]}};var Mn,_n,Dn,Pn,Hn;var Bn={sphere:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}},point:jn,lineStart:In,lineEnd:qn,polygonStart:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}Bn.lineStart=Fn},polygonEnd:function(){Bn.lineStart=In}};var rr=Yn($n,ir,or);var ar=1e9;e.geo.projection=pr;e.geo.projectionMutator=dr;(e.geo.equirectangular=function(){return pr(mr)}).raw=mr.invert=mr;e.geo.rotation=function(e){function t(t){t=e(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t}e=gr(e[0]%360*mt,e[1]*mt,e.length>2?e[2]*mt:0);t.invert=function(t){t=e.invert(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t};return t};e.geo.circle=function(){function i(){var t=typeof e==="function"?e.apply(this,arguments):e,n=gr(-t[0]*mt,-t[1]*mt,0).invert,i=[];r(null,null,1,{point:function(e,t){i.push(e=n(e,t));e[0]*=gt,e[1]*=gt}});return{type:"Polygon",coordinates:[i]}}var e=[0,0],t,n=6,r;i.origin=function(t){if(!arguments.length)return e;e=t;return i};i.angle=function(e){if(!arguments.length)return t;r=Er((t=+e)*mt,n*mt);return i};i.precision=function(e){if(!arguments.length)return n;r=Er(t*mt,(n=+e)*mt);return i};return i.angle(90)};e.geo.distance=function(e,t){var n=(t[0]-e[0])*mt,r=e[1]*mt,i=t[1]*mt,s=Math.sin(n),o=Math.cos(n),u=Math.sin(r),a=Math.cos(r),f=Math.sin(i),l=Math.cos(i),c;return Math.atan2(Math.sqrt((c=l*s)*c+(c=a*f-u*l*o)*c),u*f+a*l*o)};e.geo.graticule=function(){function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(i/c)*c,r,c).map(v).concat(e.range(Math.ceil(a/h)*h,u,h).map(m)).concat(e.range(Math.ceil(n/f)*f,t,f).filter(function(e){return Math.abs(e%c)>vt}).map(p)).concat(e.range(Math.ceil(o/l)*l,s,l).filter(function(e){return Math.abs(e%h)>vt}).map(d))}var t,n,r,i,s,o,u,a,f=10,l=f,c=90,h=360,p,d,v,m,g=2.5;y.lines=function(){return b().map(function(e){return{type:"LineString",coordinates:e}})};y.outline=function(){return{type:"Polygon",coordinates:[v(i).concat(m(u).slice(1),v(r).reverse().slice(1),m(a).reverse().slice(1))]}};y.extent=function(e){if(!arguments.length)return y.minorExtent();return y.majorExtent(e).minorExtent(e)};y.majorExtent=function(e){if(!arguments.length)return[[i,a],[r,u]];i=+e[0][0],r=+e[1][0];a=+e[0][1],u=+e[1][1];if(i>r)e=i,i=r,r=e;if(a>u)e=a,a=u,u=e;return y.precision(g)};y.minorExtent=function(e){if(!arguments.length)return[[n,o],[t,s]];n=+e[0][0],t=+e[1][0];o=+e[0][1],s=+e[1][1];if(n>t)e=n,n=t,t=e;if(o>s)e=o,o=s,s=e;return y.precision(g)};y.step=function(e){if(!arguments.length)return y.minorStep();return y.majorStep(e).minorStep(e)};y.majorStep=function(e){if(!arguments.length)return[c,h];c=+e[0],h=+e[1];return y};y.minorStep=function(e){if(!arguments.length)return[f,l];f=+e[0],l=+e[1];return y};y.precision=function(e){if(!arguments.length)return g;g=+e;p=xr(o,s,90);d=Tr(n,t,g);v=xr(a,u,90);m=Tr(i,r,g);return y};return y.majorExtent([[-180,-90+vt],[180,90-vt]]).minorExtent([[-180,-80-vt],[180,80+vt]])};e.geo.greatArc=function(){function s(){return{type:"LineString",coordinates:[n||t.apply(this,arguments),i||r.apply(this,arguments)]}}var t=Nr,n,r=Cr,i;s.distance=function(){return e.geo.distance(n||t.apply(this,arguments),i||r.apply(this,arguments))};s.source=function(e){if(!arguments.length)return t;t=e,n=typeof e==="function"?null:e;return s};s.target=function(e){if(!arguments.length)return r;r=e,i=typeof e==="function"?null:e;return s};s.precision=function(){return arguments.length?s:0};return s};e.geo.interpolate=function(e,t){return kr(e[0]*mt,e[1]*mt,t[0]*mt,t[1]*mt)};e.geo.length=function(t){Lr=0;e.geo.stream(t,Ar);return Lr};var Lr;var Ar={sphere:G,point:G,lineStart:Or,lineEnd:G,polygonStart:G,polygonEnd:G};(e.geo.conicEqualArea=function(){return Mr(_r)}).raw=_r;e.geo.albersUsa=function(){function a(e){return f(e)(e)}function f(e){var s=e[0],o=e[1];return o>50?n:s<-140?r:o<21?i:t}var t=e.geo.conicEqualArea().rotate([98,0]).center([0,38]).parallels([29.5,45.5]);var n=e.geo.conicEqualArea().rotate([160,0]).center([0,60]).parallels([55,65]);var r=e.geo.conicEqualArea().rotate([160,0]).center([0,20]).parallels([8,18]);var i=e.geo.conicEqualArea().rotate([60,0]).center([0,10]).parallels([8,18]);var s,o,u;a.invert=function(e){return s(e)||o(e)||u(e)||t.invert(e)};a.scale=function(e){if(!arguments.length)return t.scale();t.scale(e);n.scale(e*.6);r.scale(e);i.scale(e*1.5);return a.translate(t.translate())};a.translate=function(e){if(!arguments.length)return t.translate();var f=t.scale(),l=e[0],c=e[1];t.translate(e);n.translate([l-.4*f,c+.17*f]);r.translate([l-.19*f,c+.2*f]);i.translate([l+.58*f,c+.43*f]);s=Dr(n,[[-180,50],[-130,72]]);o=Dr(r,[[-164,18],[-154,24]]);u=Dr(i,[[-67.5,17.5],[-65,19]]);return a};return a.scale(1e3)};var Pr,Hr,Br={point:G,lineStart:G,lineEnd:G,polygonStart:function(){Hr=0;Br.lineStart=jr},polygonEnd:function(){Br.lineStart=Br.lineEnd=Br.point=G;Pr+=Math.abs(Hr/2)}};var Ir={point:qr,lineStart:Rr,lineEnd:Ur,polygonStart:function(){Ir.lineStart=zr},polygonEnd:function(){Ir.point=qr;Ir.lineStart=Rr;Ir.lineEnd=Ur}};e.geo.path=function(){function o(n){if(n)e.geo.stream(n,i(s.pointRadius(typeof t==="function"?+t.apply(this,arguments):t)));return s.result()}var t=4.5,n,r,i,s;o.area=function(t){Pr=0;e.geo.stream(t,i(Br));return Pr};o.centroid=function(t){Mn=Dn=Pn=Hn=0;e.geo.stream(t,i(Ir));return Hn?[Dn/Hn,Pn/Hn]:undefined};o.bounds=function(e){return On(i)(e)};o.projection=function(e){if(!arguments.length)return n;i=(n=e)?e.stream||Vr(e):Gt;return o};o.context=function(e){if(!arguments.length)return r;s=(r=e)==null?new Fr:new Wr(e);return o};o.pointRadius=function(e){if(!arguments.length)return t;t=typeof e==="function"?e:+e;return o};return o.projection(e.geo.albersUsa()).context(null)};e.geo.albers=function(){return e.geo.conicEqualArea().parallels([29.5,45.5]).rotate([98,0]).center([0,38]).scale(1e3)};var Jr=$r(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(e.geo.azimuthalEqualArea=function(){return pr(Jr)}).raw=Jr;var Kr=$r(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},Gt);(e.geo.azimuthalEquidistant=function(){return pr(Kr)}).raw=Kr;(e.geo.conicConformal=function(){return Mr(Qr)}).raw=Qr;(e.geo.conicEquidistant=function(){return Mr(Gr)}).raw=Gr;var Yr=$r(function(e){return 1/e},Math.atan);(e.geo.gnomonic=function(){return pr(Yr)}).raw=Yr;Zr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-dt/2]};(e.geo.mercator=function(){return ei(Zr)}).raw=Zr;var ti=$r(function(){return 1},Math.asin);(e.geo.orthographic=function(){return pr(ti)}).raw=ti;var ni=$r(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(e.geo.stereographic=function(){return pr(ni)}).raw=ni;ri.invert=function(e,t){return[Math.atan2(Et(e),Math.cos(t)),wt(Math.sin(t)/St(e))]};(e.geo.transverseMercator=function(){return ei(ri)}).raw=ri;e.geom={};e.svg={};e.svg.line=function(){return ii(Gt)};var ui=e.map({linear:ai,"linear-closed":fi,"step-before":li,"step-after":ci,basis:gi,"basis-open":yi,"basis-closed":bi,bundle:wi,cardinal:di,"cardinal-open":hi,"cardinal-closed":pi,monotone:Ai});ui.forEach(function(e,t){t.key=e;t.closed=/-closed$/.test(e)});var Si=[0,2/3,1/3,0],xi=[0,1/3,2/3,0],Ti=[0,1/6,2/3,1/6];e.geom.hull=function(e){function r(e){if(e.length<3)return[];var r=Qt(t),i=Qt(n),s=e.length,o,u=s-1,a=[],f=[],l,c,h,p=0,d,v,m,g,y,b,w,E;if(r===si&&n===oi)o=e;else for(c=0,o=[];c<s;++c){o.push([+r.call(this,l=e[c],c),+i.call(this,l,c)])}for(c=1;c<s;++c){if(o[c][1]<o[p][1]){p=c}else if(o[c][1]==o[p][1]){p=o[c][0]<o[p][0]?c:p}}for(c=0;c<s;++c){if(c===p)continue;v=o[c][1]-o[p][1];d=o[c][0]-o[p][0];a.push({angle:Math.atan2(v,d),index:c})}a.sort(function(e,t){return e.angle-t.angle});w=a[0].angle;b=a[0].index;y=0;for(c=1;c<u;++c){h=a[c].index;if(w==a[c].angle){d=o[b][0]-o[p][0];v=o[b][1]-o[p][1];m=o[h][0]-o[p][0];g=o[h][1]-o[p][1];if(d*d+v*v>=m*m+g*g){a[c].index=-1}else{a[y].index=-1;w=a[c].angle;y=c;b=h}}else{w=a[c].angle;y=c;b=h}}f.push(p);for(c=0,h=0;c<2;++h){if(a[h].index!==-1){f.push(a[h].index);c++}}E=f.length;for(;h<u;++h){if(a[h].index===-1)continue;while(!Oi(f[E-2],f[E-1],a[h].index,o)){--E}f[E++]=a[h].index}var S=[];for(c=0;c<E;++c){S.push(e[f[c]])}return S}var t=si,n=oi;if(arguments.length)return r(e);r.x=function(e){return arguments.length?(t=e,r):t};r.y=function(e){return arguments.length?(n=e,r):n};return r};e.geom.polygon=function(e){e.area=function(){var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];while(++t<n){r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1]}return r*.5};e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;if(!arguments.length)t=-1/(6*e.area());while(++n<r){o=u;u=e[n];a=o[0]*u[1]-u[0]*o[1];i+=(o[0]+u[0])*a;s+=(o[1]+u[1])*a}return[i*t,s*t]};e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice();t.length=0;a=e[r];f=n[(o=n.length)-1];s=-1;while(++s<o){l=n[s];if(Mi(l,u,a)){if(!Mi(f,u,a)){t.push(_i(f,l,u,a))}t.push(l)}else if(Mi(f,u,a)){t.push(_i(f,l,u,a))}f=l}u=a}return t};return e};e.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];Pi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])});t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)});t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++){n.push([i,t[u],t[u+1]])}});return n};e.geom.voronoi=function(t){function o(t){var n,o=t.map(function(){return[]}),u=Qt(r),a=Qt(i),f,l,c=t.length,h=1e6;if(u===si&&a===oi)n=t;else for(n=[],l=0;l<c;++l){n.push([+u.call(this,f=t[l],l),+a.call(this,f,l)])}Pi(n,function(e){var t,n,r,i,s,u;if(e.a===1&&e.b>=0){t=e.ep.r;n=e.ep.l}else{t=e.ep.l;n=e.ep.r}if(e.a===1){s=t?t.y:-h;r=e.c-e.b*s;u=n?n.y:h;i=e.c-e.b*u}else{r=t?t.x:-h;s=e.c-e.a*r;i=n?n.x:h;u=e.c-e.a*i}var a=[r,s],f=[i,u];o[e.region.l.index].push(a,f);o[e.region.r.index].push(a,f)});o=o.map(function(t,r){var i=n[r][0],s=n[r][1],o=t.map(function(e){return Math.atan2(e[0]-i,e[1]-s)}),u=e.range(t.length).sort(function(e,t){return o[e]-o[t]});return u.filter(function(e,t){return!t||o[e]-o[u[t-1]]>vt}).map(function(e){return t[e]})});o.forEach(function(e,t){var r=e.length;if(!r)return e.push([-h,-h],[-h,h],[h,h],[h,-h]);if(r>2)return;var i=n[t],s=e[0],o=e[1],u=i[0],a=i[1],f=s[0],l=s[1],c=o[0],p=o[1],d=Math.abs(c-f),v=p-l;if(Math.abs(v)<vt){var m=a<l?-h:h;e.push([-h,m],[h,m])}else if(d<vt){var g=u<f?-h:h;e.push([g,-h],[g,h])}else{var m=(c-f)*(l-a)<(f-u)*(p-l)?h:-h,y=Math.abs(v)-d;if(Math.abs(y)<vt){e.push([v<0?m:-m,m])}else{if(y>0)m*=-1;e.push([-h,m],[h,m])}}});if(s)for(l=0;l<c;++l)s(o[l]);for(l=0;l<c;++l)o[l].point=t[l];return o}var n=null,r=si,i=oi,s;if(arguments.length)return o(t);o.x=function(e){return arguments.length?(r=e,o):r};o.y=function(e){return arguments.length?(i=e,o):i};o.size=function(t){if(!arguments.length)return n;if(t==null){s=null}else{n=[+t[0],+t[1]];s=e.geom.polygon([[0,0],[0,n[1]],n,[n[0],0]]).clip}return o};o.links=function(e){var t,n=e.map(function(){return[]}),s=[],o=Qt(r),u=Qt(i),a,f,l=e.length;if(o===si&&u===oi)t=e;else for(f=0;f<l;++f){t.push([+o.call(this,a=e[f],f),+u.call(this,a,f)])}Pi(t,function(t){var r=t.region.l.index,i=t.region.r.index;if(n[r][i])return;n[r][i]=n[i][r]=true;s.push({source:e[r],target:e[i]})});return s};o.triangles=function(t){if(r===si&&i===oi)return e.geom.delaunay(t);var n,s,o=Qt(r),u=Qt(i),a,f,l;for(f=0,n=[],l=t.length;f<l;++f){s=[+o.call(this,a=t[f],f),+u.call(this,a,f)];s.data=a;n.push(s)}return e.geom.delaunay(n).map(function(e){return e.map(function(e){return e.data})})};return o};var Di={l:"r",r:"l"};e.geom.quadtree=function(e,t,n,r,i){function a(e){function x(e,t,n,r,i,s,o,u){if(isNaN(n)||isNaN(r))return;if(e.leaf){var a=e.x,f=e.y;if(a!=null){if(Math.abs(a-n)+Math.abs(f-r)<.01){T(e,t,n,r,i,s,o,u)}else{var l=e.point;e.x=e.y=e.point=null;T(e,l,a,f,i,s,o,u);T(e,t,n,r,i,s,o,u)}}else{e.x=n,e.y=r,e.point=t}}else{T(e,t,n,r,i,s,o,u)}}function T(e,t,n,r,i,s,o,u){var a=(i+o)*.5,f=(s+u)*.5,l=n>=a,c=r>=f,h=(c<<1)+l;e.leaf=false;e=e.nodes[h]||(e.nodes[h]=ji());if(l)i=a;else o=a;if(c)s=f;else u=f;x(e,t,n,r,i,s,o,u)}var a,f=Qt(s),l=Qt(o),c,h,p,d,v,m,g,y;if(t!=null){v=t,m=n,g=r,y=i}else{g=y=-(v=m=Infinity);c=[],h=[];d=e.length;if(u)for(p=0;p<d;++p){a=e[p];if(a.x<v)v=a.x;if(a.y<m)m=a.y;if(a.x>g)g=a.x;if(a.y>y)y=a.y;c.push(a.x);h.push(a.y)}else for(p=0;p<d;++p){var b=+f(a=e[p],p),w=+l(a,p);if(b<v)v=b;if(w<m)m=w;if(b>g)g=b;if(w>y)y=w;c.push(b);h.push(w)}}var E=g-v,S=y-m;if(E>S)y=m+E;else g=v+S;var N=ji();N.add=function(e){x(N,e,+f(e,++p),+l(e,p),v,m,g,y)};N.visit=function(e){Fi(e,N,v,m,g,y)};p=-1;if(t==null){while(++p<d){x(N,e[p],c[p],h[p],v,m,g,y)}--p}else e.forEach(N.add);c=h=e=a=null;return N}var s=si,o=oi,u;if(u=arguments.length){s=Hi;o=Bi;if(u===3){i=n;r=t;n=t=0}return a(e)}a.x=function(e){return arguments.length?(s=e,a):s};a.y=function(e){return arguments.length?(o=e,a):o};a.size=function(e){if(!arguments.length)return t==null?null:[r,i];if(e==null){t=n=r=i=null}else{t=n=0;r=+e[0],i=+e[1]}return a};return a};e.interpolateRgb=Ii;e.transform=function(n){var r=t.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate();return new qi(t?t.matrix:Wi)})(n)};qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Wi={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateNumber=Xi;e.interpolateTransform=Vi;e.interpolateObject=$i;e.interpolateString=Ji;var Ki=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;e.interpolate=Qi;e.interpolators=[function(e,t){var n=typeof t;return(n==="string"||n!==typeof e?Kt.has(t)||/^(#|rgb\(|hsl\()/.test(t)?Ii:Ji:t instanceof ft?Ii:n==="object"?Array.isArray(t)?Yi:$i:Xi)(e,t)}];e.interpolateArray=Yi;var Zi=function(){return Gt};var es=e.map({linear:Zi,poly:as,quad:function(){return ss},cubic:function(){return os},sin:function(){return fs},exp:function(){return ls},circle:function(){return cs},elastic:hs,back:ps,bounce:function(){return ds}});var ts=e.map({"in":Gt,out:rs,"in-out":is,"out-in":function(e){return is(rs(e))}});e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";n=es.get(n)||Zi;r=ts.get(r)||Gt;return ns(r(n.apply(null,Array.prototype.slice.call(arguments,1))))};e.interpolateHcl=vs;e.interpolateHsl=ms;e.interpolateLab=gs;e.interpolateRound=ys;e.layout={};e.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Es(e[n]));return t}};e.layout.chord=function(){function l(){var t={},l=[],h=e.range(s),p=[],d,v,m,g,y;n=[];r=[];d=0,g=-1;while(++g<s){v=0,y=-1;while(++y<s){v+=i[g][y]}l.push(v);p.push(e.range(s));d+=v}if(u){h.sort(function(e,t){return u(l[e],l[t])})}if(a){p.forEach(function(e,t){e.sort(function(e,n){return a(i[t][e],i[t][n])})})}d=(2*dt-o*s)/d;v=0,g=-1;while(++g<s){m=v,y=-1;while(++y<s){var b=h[g],w=p[b][y],E=i[b][w],S=v,x=v+=E*d;t[b+"-"+w]={index:b,subindex:w,startAngle:S,endAngle:x,value:E}}r[b]={index:b,startAngle:m,endAngle:v,value:(v-m)/d};v+=o}g=-1;while(++g<s){y=g-1;while(++y<s){var T=t[g+"-"+y],N=t[y+"-"+g];if(T.value||N.value){n.push(T.value<N.value?{source:N,target:T}:{source:T,target:N})}}}if(f)c()}function c(){n.sort(function(e,t){return f((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var t={},n,r,i,s,o=0,u,a,f;t.matrix=function(e){if(!arguments.length)return i;s=(i=e)&&i.length;n=r=null;return t};t.padding=function(e){if(!arguments.length)return o;o=e;n=r=null;return t};t.sortGroups=function(e){if(!arguments.length)return u;u=e;n=r=null;return t};t.sortSubgroups=function(e){if(!arguments.length)return a;a=e;n=null;return t};t.sortChords=function(e){if(!arguments.length)return f;f=e;if(n)c();return t};t.chords=function(){if(!n)l();return n};t.groups=function(){if(!r)l();return r};return t};e.layout.force=function(){function g(e){return function(t,n,r,i){if(t.point!==e){var s=t.cx-e.x,o=t.cy-e.y,u=1/Math.sqrt(s*s+o*o);if((i-n)*u<c){var a=t.charge*u*u;e.px-=s*a;e.py-=o*a;return true}if(t.point&&isFinite(u)){var a=t.pointCharge*u*u;e.px-=s*a;e.py-=o*a}}return!t.charge}}function y(n){n.px=e.event.x,n.py=e.event.y;t.resume()}var t={},n=e.dispatch("start","tick","end"),r=[1,1],i,s,o=.9,u=As,a=Os,f=-30,l=.1,c=.8,h=[],p=[],d,v,m;t.tick=function(){if((s*=.99)<.005){n.end({type:"end",alpha:s=0});return true}var t=h.length,i=p.length,u,a,c,y,b,w,E,S,x;for(a=0;a<i;++a){c=p[a];y=c.source;b=c.target;S=b.x-y.x;x=b.y-y.y;if(w=S*S+x*x){w=s*v[a]*((w=Math.sqrt(w))-d[a])/w;S*=w;x*=w;b.x-=S*(E=y.weight/(b.weight+y.weight));b.y-=x*E;y.x+=S*(E=1-E);y.y+=x*E}}if(E=s*l){S=r[0]/2;x=r[1]/2;a=-1;if(E)while(++a<t){c=h[a];c.x+=(S-c.x)*E;c.y+=(x-c.y)*E}}if(f){Ls(u=e.geom.quadtree(h),s,m);a=-1;while(++a<t){if(!(c=h[a]).fixed){u.visit(g(c))}}}a=-1;while(++a<t){c=h[a];if(c.fixed){c.x=c.px;c.y=c.py}else{c.x-=(c.px-(c.px=c.x))*o;c.y-=(c.py-(c.py=c.y))*o}}n.tick({type:"tick",alpha:s})};t.nodes=function(e){if(!arguments.length)return h;h=e;return t};t.links=function(e){if(!arguments.length)return p;p=e;return t};t.size=function(e){if(!arguments.length)return r;r=e;return t};t.linkDistance=function(e){if(!arguments.length)return u;u=typeof e==="function"?e:+e;return t};t.distance=t.linkDistance;t.linkStrength=function(e){if(!arguments.length)return a;a=typeof e==="function"?e:+e;return t};t.friction=function(e){if(!arguments.length)return o;o=+e;return t};t.charge=function(e){if(!arguments.length)return f;f=typeof e==="function"?e:+e;return t};t.gravity=function(e){if(!arguments.length)return l;l=+e;return t};t.theta=function(e){if(!arguments.length)return c;c=+e;return t};t.alpha=function(r){if(!arguments.length)return s;r=+r;if(s){if(r>0)s=r;else s=0}else if(r>0){n.start({type:"start",alpha:s=r});e.timer(t.tick)}return t};t.start=function(){function y(t,n){var r=b(e),i=-1,s=r.length,o;while(++i<s)if(!isNaN(o=r[i][t]))return o;return Math.random()*n}function b(){if(!c){c=[];for(n=0;n<i;++n){c[n]=[]}for(n=0;n<s;++n){var t=p[n];c[t.source.index].push(t.target);c[t.target.index].push(t.source)}}return c[e]}var e,n,i=h.length,s=p.length,o=r[0],l=r[1],c,g;for(e=0;e<i;++e){(g=h[e]).index=e;g.weight=0}for(e=0;e<s;++e){g=p[e];if(typeof g.source=="number")g.source=h[g.source];if(typeof g.target=="number")g.target=h[g.target];++g.source.weight;++g.target.weight}for(e=0;e<i;++e){g=h[e];if(isNaN(g.x))g.x=y("x",o);if(isNaN(g.y))g.y=y("y",l);if(isNaN(g.px))g.px=g.x;if(isNaN(g.py))g.py=g.y}d=[];if(typeof u==="function")for(e=0;e<s;++e)d[e]=+u.call(this,p[e],e);else for(e=0;e<s;++e)d[e]=u;v=[];if(typeof a==="function")for(e=0;e<s;++e)v[e]=+a.call(this,p[e],e);else for(e=0;e<s;++e)v[e]=a;m=[];if(typeof f==="function")for(e=0;e<i;++e)m[e]=+f.call(this,h[e],e);else for(e=0;e<i;++e)m[e]=f;return t.resume()};t.resume=function(){return t.alpha(.1)};t.stop=function(){return t.alpha(0)};t.drag=function(){if(!i)i=e.behavior.drag().origin(Gt).on("dragstart.force",Ts).on("drag.force",y).on("dragend.force",Ns);if(!arguments.length)return i;this.on("mouseover.force",Cs).on("mouseout.force",ks).call(i)};return e.rebind(t,n,"on")};var As=20,Os=1;e.layout.hierarchy=function(){function r(i,o,u){var a=t.call(s,i,o);i.depth=o;u.push(i);if(a&&(l=a.length)){var f=-1,l,c=i.children=[],h=0,p=o+1,d;while(++f<l){d=r(a[f],p,u);d.parent=i;c.push(d);h+=d.value}if(e)c.sort(e);if(n)i.value=h}else if(n){i.value=+n.call(s,i,o)||0}return i}function i(e,t){var r=e.children,o=0;if(r&&(a=r.length)){var u=-1,a,f=t+1;while(++u<a)o+=i(r[u],f)}else if(n){o=+n.call(s,e,t)||0}if(n)e.value=o;return o}function s(e){var t=[];r(e,0,t);return t}var e=Ps,t=_s,n=Ds;s.sort=function(t){if(!arguments.length)return e;e=t;return s};s.children=function(e){if(!arguments.length)return t;t=e;return s};s.value=function(e){if(!arguments.length)return n;n=e;return s};s.revalue=function(e){i(e,0);return e};return s};e.layout.partition=function(){function r(e,t,n,i){var s=e.children;e.x=t;e.y=e.depth*i;e.dx=n;e.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;n=e.value?n/e.value:0;while(++o<u){r(a=s[o],t,f=a.value*n,i);t+=f}}}function i(e){var t=e.children,n=0;if(t&&(s=t.length)){var r=-1,s;while(++r<s)n=Math.max(n,i(t[r]))}return 1+n}function s(e,s){var o=t.call(this,e,s);r(o[0],0,n[0],n[1]/i(o[0]));return o}var t=e.layout.hierarchy(),n=[1,1];s.size=function(e){if(!arguments.length)return n;n=e;return s};return Ms(s,t)};e.layout.pie=function(){function s(o){var u=o.map(function(e,n){return+t.call(s,e,n)});var a=+(typeof r==="function"?r.apply(this,arguments):r);var f=((typeof i==="function"?i.apply(this,arguments):i)-a)/e.sum(u);var l=e.range(o.length);if(n!=null)l.sort(n===Bs?function(e,t){return u[t]-u[e]}:function(e,t){return n(o[e],o[t])});var c=[];l.forEach(function(e){var t;c[e]={data:o[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}});return c}var t=Number,n=Bs,r=0,i=2*dt;s.value=function(e){if(!arguments.length)return t;t=e;return s};s.sort=function(e){if(!arguments.length)return n;n=e;return s};s.startAngle=function(e){if(!arguments.length)return r;r=e;return s};s.endAngle=function(e){if(!arguments.length)return i;i=e;return s};return s};var Bs={};e.layout.stack=function(){function u(a,f){var l=a.map(function(e,n){return t.call(u,e,n)});var c=l.map(function(e){return e.map(function(e,t){return[s.call(u,e,t),o.call(u,e,t)]})});var h=n.call(u,c,f);l=e.permute(l,h);c=e.permute(c,h);var p=r.call(u,c,f);var d=l.length,v=l[0].length,m,g,y;for(g=0;g<v;++g){i.call(u,l[0][g],y=p[g],c[0][g][1]);for(m=1;m<d;++m){i.call(u,l[m][g],y+=c[m-1][g][1],c[m][g][1])}}return a}var t=Gt,n=Us,r=zs,i=Is,s=js,o=Fs;u.values=function(e){if(!arguments.length)return t;t=e;return u};u.order=function(e){if(!arguments.length)return n;n=typeof e==="function"?e:qs.get(e)||Us;return u};u.offset=function(e){if(!arguments.length)return r;r=typeof e==="function"?e:Rs.get(e)||zs;return u};u.x=function(e){if(!arguments.length)return s;s=e;return u};u.y=function(e){if(!arguments.length)return o;o=e;return u};u.out=function(e){if(!arguments.length)return i;i=e;return u};return u};var qs=e.map({"inside-out":function(t){var n=t.length,r,i,s=t.map(Ws),o=t.map(Xs),u=e.range(n).sort(function(e,t){return s[e]-s[t]}),a=0,f=0,l=[],c=[];for(r=0;r<n;++r){i=u[r];if(a<f){a+=o[i];l.push(i)}else{f+=o[i];c.push(i)}}return c.reverse().concat(l)},reverse:function(t){return e.range(t.length).reverse()},"default":Us});var Rs=e.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];if(u>i)i=u;r.push(u)}for(o=0;o<n;++o){a[o]=(i-r[o])/2}return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i,s,o,u,a,f,l,c,h,p=[];p[0]=c=h=0;for(s=1;s<r;++s){for(i=0,u=0;i<t;++i)u+=e[i][s][1];for(i=0,a=0,l=n[s][0]-n[s-1][0];i<t;++i){for(o=0,f=(e[i][s][1]-e[i][s-1][1])/(2*l);o<i;++o){f+=(e[o][s][1]-e[o][s-1][1])/l}a+=f*e[i][s][1]}p[s]=c-=u?a/u*l:0;if(c<h)h=c}for(s=0;s<r;++s)p[s]-=h;return p},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:zs});e.layout.histogram=function(){function s(s,o){var u=[],a=s.map(n,this),f=r.call(this,a,o),l=i.call(this,f,a,o),c,o=-1,h=a.length,p=l.length-1,d=t?1:1/h,v;while(++o<p){c=u[o]=[];c.dx=l[o+1]-(c.x=l[o]);c.y=0}if(p>0){o=-1;while(++o<h){v=a[o];if(v>=f[0]&&v<=f[1]){c=u[e.bisect(l,v,1,p)-1];c.y+=d;c.push(s[o])}}}return u}var t=true,n=Number,r=Ks,i=$s;s.value=function(e){if(!arguments.length)return n;n=e;return s};s.range=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.bins=function(e){if(!arguments.length)return i;i=typeof e==="number"?function(t){return Js(t,e)}:Qt(e);return s};s.frequency=function(e){if(!arguments.length)return t;t=!!e;return s};return s};e.layout.tree=function(){function i(e,i){function u(e,t){var r=e.children,i=e._tree;if(r&&(s=r.length)){var s,o=r[0],a,l=o,c,h=-1;while(++h<s){c=r[h];u(c,a);l=f(c,a,l);a=c}io(e);var p=.5*(o._tree.prelim+c._tree.prelim);if(t){i.prelim=t._tree.prelim+n(e,t);i.mod=i.prelim-p}else{i.prelim=p}}else{if(t){i.prelim=t._tree.prelim+n(e,t)}}}function a(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i){a(n[r],t)}}}function f(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ys(o),i=Gs(i),o&&i){u=Gs(u);s=Ys(s);s._tree.ancestor=e;h=o._tree.prelim+l-i._tree.prelim-a+n(o,i);if(h>0){so(oo(o,e,r),e,h);a+=h;f+=h}l+=o._tree.mod;a+=i._tree.mod;c+=u._tree.mod;f+=s._tree.mod}if(o&&!Ys(s)){s._tree.thread=o;s._tree.mod+=l-f}if(i&&!Gs(u)){u._tree.thread=i;u._tree.mod+=a-c;r=e}}return r}var s=t.call(this,e,i),o=s[0];ro(o,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}});u(o);a(o,-o._tree.prelim);var l=Zs(o,to),c=Zs(o,eo),h=Zs(o,no),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;ro(o,function(e){e.x=(e.x-p)/(d-p)*r[0];e.y=e.depth/v*r[1];delete e._tree});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.pack=function(){function i(e,i){var s=t.call(this,e,i),o=s[0];o.x=0;o.y=0;ro(o,function(e){e.r=Math.sqrt(e.value)});ro(o,co);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;ro(o,function(e){e.r+=l});ro(o,co);ro(o,function(e){e.r-=l});f=Math.max(2*o.r/u,2*o.r/a)}vo(o,u/2,a/2,1/f);return s}var t=e.layout.hierarchy().sort(uo),n=0,r=[1,1];i.size=function(e){if(!arguments.length)return r;r=e;return i};i.padding=function(e){if(!arguments.length)return n;n=+e;return i};return Ms(i,t)};e.layout.cluster=function(){function i(e,i){var s=t.call(this,e,i),o=s[0],u,a=0;ro(o,function(e){var t=e.children;if(t&&t.length){e.x=yo(t);e.y=go(t)}else{e.x=u?a+=n(e,u):0;e.y=0;u=e}});var f=bo(o),l=wo(o),c=f.x-n(f,l)/2,h=l.x+n(l,f)/2;ro(o,function(e){e.x=(e.x-c)/(h-c)*r[0];e.y=(1-(o.y?e.y/o.y:1))*r[1]});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.treemap=function(){function l(e,t){var n=-1,r=e.length,i,s;while(++n<r){s=(i=e[n]).value*(t<0?0:t);i.area=isNaN(s)||s<=0?0:s}}function c(e){var t=e.children;if(t&&t.length){var n=s(e),r=[],i=t.slice(),o,u=Infinity,f,h=a==="slice"?n.dx:a==="dice"?n.dy:a==="slice-dice"?e.depth&1?n.dy:n.dx:Math.min(n.dx,n.dy),v;l(i,n.dx*n.dy/e.value);r.area=0;while((v=i.length)>0){r.push(o=i[v-1]);r.area+=o.area;if(a!=="squarify"||(f=p(r,h))<=u){i.pop();u=f}else{r.area-=r.pop().area;d(r,h,n,false);h=Math.min(n.dx,n.dy);r.length=r.area=0;u=Infinity}}if(r.length){d(r,h,n,true);r.length=r.area=0}t.forEach(c)}}function h(e){var t=e.children;if(t&&t.length){var n=s(e),r=t.slice(),i,o=[];l(r,n.dx*n.dy/e.value);o.area=0;while(i=r.pop()){o.push(i);o.area+=i.area;if(i.z!=null){d(o,i.z?n.dx:n.dy,n,!r.length);o.length=o.area=0}}t.forEach(h)}}function p(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;if(r<s)s=r;if(r>i)i=r}n*=n;t*=t;return n?Math.max(t*i*f/n,n/(t*s*f)):Infinity}function d(e,t,r,i){var s=-1,o=e.length,u=r.x,a=r.y,f=t?n(e.area/t):0,l;if(t==r.dx){if(i||f>r.dy)f=r.dy;while(++s<o){l=e[s];l.x=u;l.y=a;l.dy=f;u+=l.dx=Math.min(r.x+r.dx-u,f?n(l.area/f):0)}l.z=true;l.dx+=r.x+r.dx-u;r.y+=f;r.dy-=f}else{if(i||f>r.dx)f=r.dx;while(++s<o){l=e[s];l.x=u;l.y=a;l.dx=f;a+=l.dy=Math.min(r.y+r.dy-a,f?n(l.area/f):0)}l.z=false;l.dy+=r.y+r.dy-a;r.x+=f;r.dx-=f}}function v(e){var n=u||t(e),i=n[0];i.x=0;i.y=0;i.dx=r[0];i.dy=r[1];if(u)t.revalue(i);l([i],i.dx*i.dy/i.value);(u?h:c)(i);if(o)u=n;return n}var t=e.layout.hierarchy(),n=Math.round,r=[1,1],i=null,s=Eo,o=false,u,a="squarify",f=.5*(1+Math.sqrt(5));v.size=function(e){if(!arguments.length)return r;r=e;return v};v.padding=function(e){function t(t){var n=e.call(v,t,t.depth);return n==null?Eo(t):So(t,typeof n==="number"?[n,n,n,n]:n)}function n(t){return So(t,e)}if(!arguments.length)return i;var r;s=(i=e)==null?Eo:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n;return v};v.round=function(e){if(!arguments.length)return n!=Number;n=e?Math.round:Number;return v};v.sticky=function(e){if(!arguments.length)return o;o=e;u=null;return v};v.ratio=function(e){if(!arguments.length)return f;f=e;return v};v.mode=function(e){if(!arguments.length)return a;a=e+"";return v};return Ms(v,t)};e.random={normal:function(e,t){var n=arguments.length;if(n<2)t=1;if(n<1)e=0;return function(){var n,r,i;do{n=Math.random()*2-1;r=Math.random()*2-1;i=n*n+r*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}};e.scale={};e.scale.linear=function(){return Lo([0,1],[0,1],Qi,false)};e.scale.log=function(){return Po(e.scale.linear().domain([0,Math.LN10]),10,Bo,jo)};var Ho=e.format(".0e");e.scale.pow=function(){return Ro(e.scale.linear(),1)};e.scale.sqrt=function(){return e.scale.pow().exponent(.5)};e.scale.ordinal=function(){return zo([],{t:"range",a:[[]]})};e.scale.category10=function(){return e.scale.ordinal().range(Wo)};e.scale.category20=function(){return e.scale.ordinal().range(Xo)};e.scale.category20b=function(){return e.scale.ordinal().range(Vo)};e.scale.category20c=function(){return e.scale.ordinal().range($o)};e.scale.category50=function(){return e.scale.ordinal().range(Jo)};var Wo=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Xo=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];var Vo=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"];var $o=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];var Jo=["#1f77b4","#ff7f0e","#2ca02c","#8c864b","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6","#9edae5","#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#aec7e8","#e7ba52","#ffbb78","#e7cb94","#98df8a","#843c39","#ff9896","#ad494a","#c5b0d5","#d6616b","#c49c94","#e7969c","#f7b6d2","#fd8d3c","#c7c7c7","#7b4173","#dbdb8d","#a55194"];e.scale.quantile=function(){return Ko([],[])};e.scale.quantize=function(){return Qo(0,1,[0,1])};e.scale.threshold=function(){return Go([.5],[0,1])};e.scale.identity=function(){return Yo([0,1])};e.svg.arc=function(){function i(){var i=e.apply(this,arguments),s=t.apply(this,arguments),o=n.apply(this,arguments)+Zo,u=r.apply(this,arguments)+Zo,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<dt?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=eu?i?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+i+"A"+i+","+i+" 0 1,0 0,"+ -i+"A"+i+","+i+" 0 1,0 0,"+i+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":i?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+i*h+","+i*p+"A"+i+","+i+" 0 "+f+",0 "+i*l+","+i*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var e=tu,t=nu,n=ru,r=iu;i.innerRadius=function(t){if(!arguments.length)return e;e=Qt(t);return i};i.outerRadius=function(e){if(!arguments.length)return t;t=Qt(e);return i};i.startAngle=function(e){if(!arguments.length)return n;n=Qt(e);return i};i.endAngle=function(e){if(!arguments.length)return r;r=Qt(e);return i};i.centroid=function(){var i=(e.apply(this,arguments)+t.apply(this,arguments))/2,s=(n.apply(this,arguments)+r.apply(this,arguments))/2+Zo;return[Math.cos(s)*i,Math.sin(s)*i]};return i};var Zo=-dt/2,eu=2*dt-1e-6;e.svg.line.radial=function(){var e=ii(su);e.radius=e.x,delete e.x;e.angle=e.y,delete e.y;return e};li.reverse=ci;ci.reverse=li;e.svg.area=function(){return ou(Gt)};e.svg.area.radial=function(){var e=ou(su);e.radius=e.x,delete e.x;e.innerRadius=e.x0,delete e.x0;e.outerRadius=e.x1,delete e.x1;e.angle=e.y,delete e.y;e.startAngle=e.y0,delete e.y0;e.endAngle=e.y1,delete e.y1;return e};e.svg.chord=function(){function s(n,r){var i=o(this,e,n,r),s=o(this,t,n,r);return"M"+i.p0+a(i.r,i.p1,i.a1-i.a0)+(u(i,s)?f(i.r,i.p1,i.r,i.p0):f(i.r,i.p1,s.r,s.p0)+a(s.r,s.p1,s.a1-s.a0)+f(s.r,s.p1,i.r,i.p0))+"Z"}function o(e,t,s,o){var u=t.call(e,s,o),a=n.call(e,u,o),f=r.call(e,u,o)+Zo,l=i.call(e,u,o)+Zo;return{r:a,a0:f,a1:l,p0:[a*Math.cos(f),a*Math.sin(f)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function u(e,t){return e.a0==t.a0&&e.a1==t.a1}function a(e,t,n){return"A"+e+","+e+" 0 "+ +(n>dt)+",1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Nr,t=Cr,n=uu,r=ru,i=iu;s.radius=function(e){if(!arguments.length)return n;n=Qt(e);return s};s.source=function(t){if(!arguments.length)return e;e=Qt(t);return s};s.target=function(e){if(!arguments.length)return t;t=Qt(e);return s};s.startAngle=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.endAngle=function(e){if(!arguments.length)return i;i=Qt(e);return s};return s};e.svg.diagonal=function(){function r(r,i){var s=e.call(this,r,i),o=t.call(this,r,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];a=a.map(n);return"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var e=Nr,t=Cr,n=au;r.source=function(t){if(!arguments.length)return e;e=Qt(t);return r};r.target=function(e){if(!arguments.length)return t;t=Qt(e);return r};r.projection=function(e){if(!arguments.length)return n;n=e;return r};return r};e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=au,r=t.projection;t.projection=function(e){return arguments.length?r(fu(n=e)):n};return t};e.svg.symbol=function(){function n(n,r){return(pu.get(e.call(this,n,r))||hu)(t.call(this,n,r))}var e=cu,t=lu;n.type=function(t){if(!arguments.length)return e;e=Qt(t);return n};n.size=function(e){if(!arguments.length)return t;t=Qt(e);return n};return n};var pu=e.map({circle:hu,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*vu)),n=t*vu;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});e.svg.symbolTypes=pu.keys();var du=Math.sqrt(3),vu=Math.tan(30*mt);var gu=[],yu=0,bu,wu={ease:us,delay:0,duration:250};gu.call=B.call;gu.empty=B.empty;gu.node=B.node;e.transition=function(e){return arguments.length?bu?e.transition():e:st.transition()};e.transition.prototype=gu;gu.select=function(e){var t=this.id,n=[],r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){n.push(r=[]);for(var a=this[o],f=-1,l=a.length;++f<l;){if((s=a[f])&&(i=e.call(s,s.__data__,f))){if("__data__"in s)i.__data__=s.__data__;xu(i,f,t,s.__transition__[t]);r.push(i)}else{r.push(null)}}}return mu(n,t)};gu.selectAll=function(e){var t=this.id,n=[],r,i,s,o,u;if(typeof e!=="function")e=F(e);for(var a=-1,f=this.length;++a<f;){for(var l=this[a],c=-1,h=l.length;++c<h;){if(s=l[c]){u=s.__transition__[t];i=e.call(s,s.__data__,c);n.push(r=[]);for(var p=-1,d=i.length;++p<d;){xu(o=i[p],p,t,u);r.push(o)}}}}return mu(n,t)};gu.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return mu(t,this.id,this.time).ease(this.ease())};gu.tween=function(e,t){var n=this.id;if(arguments.length<2)return this.node().__transition__[n].tween.get(e);return nt(this,t==null?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})};gu.attr=function(t,n){function s(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var r=Gi(t),i=e.ns.qualify(t);return Eu(this,"attr."+t,n,function(e){function t(){var t=this.getAttribute(i),n;return t!==e&&(n=r(t,e),function(e){this.setAttribute(i,n(e))})}function n(){var t=this.getAttributeNS(i.space,i.local),n;return t!==e&&(n=r(t,e),function(e){this.setAttributeNS(i.space,i.local,n(e))})}return e==null?i.local?o:s:(e+="",i.local?n:t)})};gu.attrTween=function(t,n){function i(e,t){var i=n.call(this,e,t,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function s(e,t){var i=n.call(this,e,t,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=e.ns.qualify(t);return this.tween("attr."+t,r.local?s:i)};gu.style=function(e,t,r){function o(){this.style.removeProperty(e)}var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.style(r,e[r],t);return this}r=""}var s=Gi(e);return Eu(this,"style."+e,t,function(t){function i(){var i=n.getComputedStyle(this,null).getPropertyValue(e),o;return i!==t&&(o=s(i,t),function(t){this.style.setProperty(e,o(t),r)})}return t==null?o:(t+="",i)})};gu.styleTween=function(e,t,r){if(arguments.length<3)r="";return this.tween("style."+e,function(i,s){var o=t.call(this,i,s,n.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),r)}})};gu.text=function(e){return Eu(this,"text",e,Su)};gu.remove=function(){return this.each("end.transition",function(){var e;if(!this.__transition__&&(e=this.parentNode))e.removeChild(this)})};gu.ease=function(t){var n=this.id;if(arguments.length<1)return this.node().__transition__[n].ease;if(typeof t!=="function")t=e.ease.apply(e,arguments);return nt(this,function(e){e.__transition__[n].ease=t})};gu.delay=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].delay=e.call(n,n.__data__,r,i)|0}:(e|=0,function(n){n.__transition__[t].delay=e}))};gu.duration=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,i)|0)}:(e=Math.max(1,e|0),function(n){n.__transition__[t].duration=e}))};gu.each=function(e,t){var n=this.id;if(arguments.length<2){var r=wu,i=bu;bu=n;nt(this,function(t,r,i){wu=t.__transition__[n];e.call(t,t.__data__,r,i)});wu=r;bu=i}else{nt(this,function(r){r.__transition__[n].event.on(e,t)})}return this};gu.transition=function(){var e=this.id,t=++yu,n=[],r,i,s,o;for(var u=0,a=this.length;u<a;u++){n.push(r=[]);for(var i=this[u],f=0,l=i.length;f<l;f++){if(s=i[f]){o=Object.create(s.__transition__[e]);o.delay+=o.duration;xu(s,f,t,o)}r.push(s)}}return mu(n,t)};e.svg.axis=function(){function c(c){c.each(function(){var c=e.select(this);var h=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,p=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f;var d=Lu(t,h,l),v=c.selectAll(".tick.minor").data(d,String),m=v.enter().insert("line",".tick").attr("class","tick minor").style("opacity",1e-6),g=e.transition(v.exit()).style("opacity",1e-6).remove(),y=e.transition(v).style("opacity",1);var b=c.selectAll(".tick.major").data(h,String),w=b.enter().insert("g","path").attr("class","tick major").style("opacity",1e-6),E=e.transition(b.exit()).style("opacity",1e-6).remove(),S=e.transition(b).style("opacity",1),x;var T=To(t),N=c.selectAll(".domain").data([0]),C=(N.enter().append("path").attr("class","domain"),e.transition(N));var k=t.copy(),L=this.__chart__||k;this.__chart__=k;w.append("line");w.append("text");var A=w.select("line"),O=S.select("line"),M=b.select("text").text(p),_=w.select("text"),D=S.select("text");switch(n){case"bottom":{x=Cu;m.attr("y2",i);y.attr("x2",0).attr("y2",i);A.attr("y2",r);_.attr("y",Math.max(r,0)+o);O.attr("x2",0).attr("y2",r);D.attr("x",0).attr("y",Math.max(r,0)+o);M.attr("dy",".71em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+s+"V0H"+T[1]+"V"+s);break};case"top":{x=Cu;m.attr("y2",-i);y.attr("x2",0).attr("y2",-i);A.attr("y2",-r);_.attr("y",-(Math.max(r,0)+o));O.attr("x2",0).attr("y2",-r);D.attr("x",0).attr("y",-(Math.max(r,0)+o));M.attr("dy","0em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+ -s+"V0H"+T[1]+"V"+ -s);break};case"left":{x=ku;m.attr("x2",-i);y.attr("x2",-i).attr("y2",0);A.attr("x2",-r);_.attr("x",-(Math.max(r,0)+o));O.attr("x2",-r).attr("y2",0);D.attr("x",-(Math.max(r,0)+o)).attr("y",0);M.attr("dy",".32em").style("text-anchor","end");C.attr("d","M"+ -s+","+T[0]+"H0V"+T[1]+"H"+ -s);break};case"right":{x=ku;m.attr("x2",i);y.attr("x2",i).attr("y2",0);A.attr("x2",r);_.attr("x",Math.max(r,0)+o);O.attr("x2",r).attr("y2",0);D.attr("x",Math.max(r,0)+o).attr("y",0);M.attr("dy",".32em").style("text-anchor","start");C.attr("d","M"+s+","+T[0]+"H0V"+T[1]+"H"+s);break}}if(t.ticks){w.call(x,L);S.call(x,k);E.call(x,k);m.call(x,L);y.call(x,k);g.call(x,k)}else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};w.call(x,H);S.call(x,H)}})}var t=e.scale.linear(),n=Tu,r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;c.scale=function(e){if(!arguments.length)return t;t=e;return c};c.orient=function(e){if(!arguments.length)return n;n=e in Nu?e+"":Tu;return c};c.ticks=function(){if(!arguments.length)return u;u=arguments;return c};c.tickValues=function(e){if(!arguments.length)return a;a=e;return c};c.tickFormat=function(e){if(!arguments.length)return f;f=e;return c};c.tickSize=function(e,t){if(!arguments.length)return r;var n=arguments.length-1;r=+e;i=n>1?+t:r;s=n>0?+arguments[n]:r;return c};c.tickPadding=function(e){if(!arguments.length)return o;o=+e;return c};c.tickSubdivide=function(e){if(!arguments.length)return l;l=+e;return c};return c};var Tu="bottom",Nu={top:1,right:1,bottom:1,left:1};e.svg.brush=function(){function a(t){t.each(function(){var t=e.select(this),n=t.selectAll(".background").data([0]),o=t.selectAll(".extent").data([0]),u=t.selectAll(".resize").data(s,String),p;t.style("pointer-events","all").on("mousedown.brush",h).on("touchstart.brush",h);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair");o.enter().append("rect").attr("class","extent").style("cursor","move");u.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Au[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden");u.style("display",a.empty()?"none":null);u.exit().remove();if(r){p=To(r);n.attr("x",p[0]).attr("width",p[1]-p[0]);l(t)}if(i){p=To(i);n.attr("y",p[0]).attr("height",p[1]-p[0]);c(t)}f(t)})}function f(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+o[+/e$/.test(e)][0]+","+o[+/^s/.test(e)][1]+")"})}function l(e){e.select(".extent").attr("x",o[0][0]);e.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1][0]-o[0][0])}function c(e){e.select(".extent").attr("y",o[0][1]);e.selectAll(".extent,.e>rect,.w>rect").attr("height",o[1][1]-o[0][1])}function h(){function C(){var t=e.event.changedTouches;return t?e.touches(s,t)[0]:e.mouse(s)}function k(){if(e.event.keyCode==32){if(!b){w=null;E[0]-=o[1][0];E[1]-=o[1][1];b=2}y()}}function L(){if(e.event.keyCode==32&&b==2){E[0]+=o[1][0];E[1]+=o[1][1];b=0;y()}}function A(){var t=C(),n=false;if(S){t[0]+=S[0];t[1]+=S[1]}if(!b){if(e.event.altKey){if(!w)w=[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2];E[0]=o[+(t[0]<w[0])][0];E[1]=o[+(t[1]<w[1])][1]}else w=null}if(m&&O(t,r,0)){l(d);n=true}if(g&&O(t,i,1)){c(d);n=true}if(n){f(d);p({type:"brush",mode:b?"move":"resize"})}}function O(e,t,n){var r=To(t),i=r[0],s=r[1],a=E[n],f=o[1][n]-o[0][n],l,c;if(b){i-=a;s-=f+a}l=Math.max(i,Math.min(s,e[n]));if(b){c=(l+=a)+f}else{if(w)a=Math.max(i,Math.min(s,2*w[n]-l));if(a<l){c=l;l=a}else{c=a}}if(o[0][n]!==l||o[1][n]!==c){u=null;o[0][n]=l;o[1][n]=c;return true}}function M(){A();d.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null);e.select("body").style("cursor",null);x.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null);p({type:"brushend"});y()}var s=this,h=e.select(e.event.target),p=t.of(s,arguments),d=e.select(s),v=h.datum(),m=!/^(n|s)$/.test(v)&&r,g=!/^(e|w)$/.test(v)&&i,b=h.classed("extent"),w,E=C(),S;var x=e.select(n).on("mousemove.brush",A).on("mouseup.brush",M).on("touchmove.brush",A).on("touchend.brush",M).on("keydown.brush",k).on("keyup.brush",L);if(b){E[0]=o[0][0]-E[0];E[1]=o[0][1]-E[1]}else if(v){var T=+/w$/.test(v),N=+/^n/.test(v);S=[o[1-T][0]-E[0],o[1-N][1]-E[1]];E[0]=o[T][0];E[1]=o[N][1]}else if(e.event.altKey)w=E.slice();d.style("pointer-events","none").selectAll(".resize").style("display",null);e.select("body").style("cursor",h.style("cursor"));p({type:"brushstart"});A();y()}var t=S(a,"brushstart","brush","brushend"),r=null,i=null,s=Ou[0],o=[[0,0],[0,0]],u;a.x=function(e){if(!arguments.length)return r;r=e;s=Ou[!r<<1|!i];return a};a.y=function(e){if(!arguments.length)return i;i=e;s=Ou[!r<<1|!i];return a};a.extent=function(e){var t,n,s,f,l;if(!arguments.length){e=u||o;if(r){t=e[0][0],n=e[1][0];if(!u){t=o[0][0],n=o[1][0];if(r.invert)t=r.invert(t),n=r.invert(n);if(n<t)l=t,t=n,n=l}}if(i){s=e[0][1],f=e[1][1];if(!u){s=o[0][1],f=o[1][1];if(i.invert)s=i.invert(s),f=i.invert(f);if(f<s)l=s,s=f,f=l}}return r&&i?[[t,s],[n,f]]:r?[t,n]:i&&[s,f]}u=[[0,0],[0,0]];if(r){t=e[0],n=e[1];if(i)t=t[0],n=n[0];u[0][0]=t,u[1][0]=n;if(r.invert)t=r(t),n=r(n);if(n<t)l=t,t=n,n=l;o[0][0]=t|0,o[1][0]=n|0}if(i){s=e[0],f=e[1];if(r)s=s[1],f=f[1];u[0][1]=s,u[1][1]=f;if(i.invert)s=i(s),f=i(f);if(f<s)l=s,s=f,f=l;o[0][1]=s|0,o[1][1]=f|0}return a};a.clear=function(){u=null;o[0][0]=o[0][1]=o[1][0]=o[1][1]=0;return a};a.empty=function(){return r&&o[0][0]===o[1][0]||i&&o[0][1]===o[1][1]};return e.rebind(a,t,"on")};var Au={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"};var Ou=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.time={};var Mu=Date,_u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Du.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Pu.setUTCDate.apply(this._,arguments)},setDay:function(){Pu.setUTCDay.apply(this._,arguments)},setFullYear:function(){Pu.setUTCFullYear.apply(this._,arguments)},setHours:function(){Pu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Pu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Pu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Pu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Pu.setUTCSeconds.apply(this._,arguments)},setTime:function(){Pu.setTime.apply(this._,arguments)}};var Pu=Date.prototype;var Hu="%a %b %e %X %Y",Bu="%m/%d/%Y",ju="%H:%M:%S";var Fu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Iu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ru=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.time.year=Uu(function(t){t=e.time.day(t);t.setMonth(0,1);return t},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()});e.time.years=e.time.year.range;e.time.years.utc=e.time.year.utc.range;e.time.day=Uu(function(e){var t=new Mu(1970,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1});e.time.days=e.time.day.range;e.time.days.utc=e.time.day.utc.range;e.time.dayOfYear=function(t){var n=e.time.year(t);return Math.floor((t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*6e4)/864e5)};_u.forEach(function(t,n){t=t.toLowerCase();n=7-n;var r=e.time[t]=Uu(function(t){(t=e.time.day(t)).setDate(t.getDate()-(t.getDay()+n)%7);return t},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)-(r!==n)});e.time[t+"s"]=r.range;e.time[t+"s"].utc=r.utc.range;e.time[t+"OfYear"]=function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)}});e.time.week=e.time.sunday;e.time.weeks=e.time.sunday.range;e.time.weeks.utc=e.time.sunday.utc.range;e.time.weekOfYear=e.time.sundayOfYear;e.time.format=function(e){function n(n){var r=[],i=-1,s=0,o,u,a;while(++i<t){if(e.charCodeAt(i)===37){r.push(e.substring(s,i));if((u=ea[o=e.charAt(++i)])!=null)o=e.charAt(++i);if(a=ta[o])o=a(n,u==null?o==="e"?" ":"0":u);r.push(o);s=i+1}}r.push(e.substring(s,i));return r.join("")}var t=e.length;n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Wu(n,e,t,0);if(r!=t.length)return null;if("p"in n)n.H=n.H%12+n.p*12;var i=new Mu;i.setFullYear(n.y,n.m,n.d);i.setHours(n.H,n.M,n.S,n.L);return i};n.toString=function(){return e};return n};var Ju=Xu(Fu),Ku=Xu(Iu),Qu=Xu(qu),Gu=Vu(qu),Yu=Xu(Ru),Zu=Vu(Ru);var ea={"-":"",_:" ",0:"0"};var ta={a:function(e){return Iu[e.getDay()]},A:function(e){return Fu[e.getDay()]},b:function(e){return Ru[e.getMonth()]},B:function(e){return qu[e.getMonth()]},c:e.time.format(Hu),d:function(e,t){return $u(e.getDate(),t,2)},e:function(e,t){return $u(e.getDate(),t,2)},H:function(e,t){return $u(e.getHours(),t,2)},I:function(e,t){return $u(e.getHours()%12||12,t,2)},j:function(t,n){return $u(1+e.time.dayOfYear(t),n,3)},L:function(e,t){return $u(e.getMilliseconds(),t,3)},m:function(e,t){return $u(e.getMonth()+1,t,2)},M:function(e,t){return $u(e.getMinutes(),t,2)},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e,t){return $u(e.getSeconds(),t,2)},U:function(t,n){return $u(e.time.sundayOfYear(t),n,2)},w:function(e){return e.getDay()},W:function(t,n){return $u(e.time.mondayOfYear(t),n,2)},x:e.time.format(Bu),X:e.time.format(ju),y:function(e,t){return $u(e.getFullYear()%100,t,2)},Y:function(e,t){return $u(e.getFullYear()%1e4,t,4)},Z:Sa,"%":function(){return"%"}};var na={a:ra,A:ia,b:sa,B:oa,c:ua,d:da,e:da,H:va,I:va,L:ya,m:pa,M:ma,p:wa,S:ga,x:aa,X:fa,y:ca,Y:la};var ba=/^\s*\d+/;var Ea=e.map({am:0,pm:1});e.time.format.utc=function(t){function r(e){try{Mu=Du;var t=new Mu;t._=e;return n(t)}finally{Mu=Date}}var n=e.time.format(t);r.parse=function(e){try{Mu=Du;var t=n.parse(e);return t&&t._}finally{Mu=Date}};r.toString=n.toString;return r};var xa=e.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");e.time.format.iso=Date.prototype.toISOString&&+(new Date("2000-01-01T00:00:00.000Z"))?Ta:xa;Ta.parse=function(e){var t=new Date(e);return isNaN(t)?null:t};Ta.toString=xa.toString;e.time.second=Uu(function(e){return new Mu(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()});e.time.seconds=e.time.second.range;e.time.seconds.utc=e.time.second.utc.range;e.time.minute=Uu(function(e){return new Mu(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()});e.time.minutes=e.time.minute.range;e.time.minutes.utc=e.time.minute.utc.range;e.time.hour=Uu(function(e){var t=e.getTimezoneOffset()/60;return new Mu((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()});e.time.hours=e.time.hour.range;e.time.hours.utc=e.time.hour.utc.range;e.time.month=Uu(function(t){t=e.time.day(t);t.setDate(1);return t},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()});e.time.months=e.time.month.range;e.time.months.utc=e.time.month.utc.range;var Ma=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6];var _a=[[e.time.second,1],[e.time.second,5],[e.time.second,15],[e.time.second,30],[e.time.minute,1],[e.time.minute,5],[e.time.minute,15],[e.time.minute,30],[e.time.hour,1],[e.time.hour,3],[e.time.hour,6],[e.time.hour,12],[e.time.day,1],[e.time.day,2],[e.time.week,1],[e.time.month,1],[e.time.month,3],[e.time.year,1]];var Da=[[e.time.format("%Y"),$n],[e.time.format("%B"),function(e){return e.getMonth()}],[e.time.format("%b %d"),function(e){return e.getDate()!=1}],[e.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[e.time.format("%I %p"),function(e){return e.getHours()}],[e.time.format("%I:%M"),function(e){return e.getMinutes()}],[e.time.format(":%S"),function(e){return e.getSeconds()}],[e.time.format(".%L"),function(e){return e.getMilliseconds()}]];var Pa=e.scale.linear(),Ha=La(Da);_a.year=function(e,t){return Pa.domain(e.map(Oa)).ticks(t).map(Aa)};e.time.scale=function(){return Na(e.scale.linear(),_a,Ha)};var Ba=_a.map(function(e){return[e[0].utc,e[1]]});var ja=[[e.time.format.utc("%Y"),$n],[e.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[e.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[e.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[e.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[e.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[e.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[e.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]];var Fa=La(ja);Ba.year=function(e,t){return Pa.domain(e.map(qa)).ticks(t).map(Ia)};e.time.scale.utc=function(){return Na(e.scale.linear(),Ba,Fa)};e.text=function(){return e.xhr.apply(e,arguments).response(Ra)};e.json=function(t,n){return e.xhr(t,"application/json",n).response(Ua)};e.html=function(t,n){return e.xhr(t,"text/html",n).response(za)};e.xml=function(){return e.xhr.apply(e,arguments).response(Wa)};return e}() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/fisheye.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/fisheye.js
deleted file mode 100644
index e1addd7b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/fisheye.js
+++ /dev/null
@@ -1,86 +0,0 @@
-(function() {
- d3.fisheye = {
- scale: function(scaleType) {
- return d3_fisheye_scale(scaleType(), 3, 0);
- },
- circular: function() {
- var radius = 200,
- distortion = 2,
- k0,
- k1,
- focus = [0, 0];
-
- function fisheye(d) {
- var dx = d.x - focus[0],
- dy = d.y - focus[1],
- dd = Math.sqrt(dx * dx + dy * dy);
- if (!dd || dd >= radius) return {x: d.x, y: d.y, z: 1};
- var k = k0 * (1 - Math.exp(-dd * k1)) / dd * .75 + .25;
- return {x: focus[0] + dx * k, y: focus[1] + dy * k, z: Math.min(k, 10)};
- }
-
- function rescale() {
- k0 = Math.exp(distortion);
- k0 = k0 / (k0 - 1) * radius;
- k1 = distortion / radius;
- return fisheye;
- }
-
- fisheye.radius = function(_) {
- if (!arguments.length) return radius;
- radius = +_;
- return rescale();
- };
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return distortion;
- distortion = +_;
- return rescale();
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return focus;
- focus = _;
- return fisheye;
- };
-
- return rescale();
- }
- };
-
- function d3_fisheye_scale(scale, d, a) {
-
- function fisheye(_) {
- var x = scale(_),
- left = x < a,
- v,
- range = d3.extent(scale.range()),
- min = range[0],
- max = range[1],
- m = left ? a - min : max - a;
- if (m == 0) m = max - min;
- return (left ? -1 : 1) * m * (d + 1) / (d + (m / Math.abs(x - a))) + a;
- }
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return d;
- d = +_;
- return fisheye;
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return a;
- a = +_;
- return fisheye;
- };
-
- fisheye.copy = function() {
- return d3_fisheye_scale(scale.copy(), d, a);
- };
-
- fisheye.nice = scale.nice;
- fisheye.ticks = scale.ticks;
- fisheye.tickFormat = scale.tickFormat;
- return d3.rebind(fisheye, scale, "domain", "range");
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/hive.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/hive.js
deleted file mode 100644
index 06e53aed..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/hive.js
+++ /dev/null
@@ -1,80 +0,0 @@
-d3.hive = {};
-
-d3.hive.link = function() {
- var source = function(d) { return d.source; },
- target = function(d) { return d.target; },
- angle = function(d) { return d.angle; },
- startRadius = function(d) { return d.radius; },
- endRadius = startRadius,
- arcOffset = -Math.PI / 2;
-
- function link(d, i) {
- var s = node(source, this, d, i),
- t = node(target, this, d, i),
- x;
- if (t.a < s.a) x = t, t = s, s = x;
- if (t.a - s.a > Math.PI) s.a += 2 * Math.PI;
- var a1 = s.a + (t.a - s.a) / 3,
- a2 = t.a - (t.a - s.a) / 3;
- return s.r0 - s.r1 || t.r0 - t.r1
- ? "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "L" + Math.cos(s.a) * s.r1 + "," + Math.sin(s.a) * s.r1
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1
- + "L" + Math.cos(t.a) * t.r0 + "," + Math.sin(t.a) * t.r0
- + "C" + Math.cos(a2) * t.r0 + "," + Math.sin(a2) * t.r0
- + " " + Math.cos(a1) * s.r0 + "," + Math.sin(a1) * s.r0
- + " " + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- : "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1;
- }
-
- function node(method, thiz, d, i) {
- var node = method.call(thiz, d, i),
- a = +(typeof angle === "function" ? angle.call(thiz, node, i) : angle) + arcOffset,
- r0 = +(typeof startRadius === "function" ? startRadius.call(thiz, node, i) : startRadius),
- r1 = (startRadius === endRadius ? r0 : +(typeof endRadius === "function" ? endRadius.call(thiz, node, i) : endRadius));
- return {r0: r0, r1: r1, a: a};
- }
-
- link.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- return link;
- };
-
- link.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- return link;
- };
-
- link.angle = function(_) {
- if (!arguments.length) return angle;
- angle = _;
- return link;
- };
-
- link.radius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = endRadius = _;
- return link;
- };
-
- link.startRadius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = _;
- return link;
- };
-
- link.endRadius = function(_) {
- if (!arguments.length) return endRadius;
- endRadius = _;
- return link;
- };
-
- return link;
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/horizon.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/horizon.js
deleted file mode 100644
index d84c6567..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/horizon.js
+++ /dev/null
@@ -1,192 +0,0 @@
-(function() {
- d3.horizon = function() {
- var bands = 1, // between 1 and 5, typically
- mode = "offset", // or mirror
- interpolate = "linear", // or basis, monotone, step-before, etc.
- x = d3_horizonX,
- y = d3_horizonY,
- w = 960,
- h = 40,
- duration = 0;
-
- var color = d3.scale.linear()
- .domain([-1, 0, 1])
- .range(["#d62728", "#fff", "#1f77b4"]);
-
- // For each small multiple…
- function horizon(g) {
- g.each(function(d, i) {
- var g = d3.select(this),
- n = 2 * bands + 1,
- xMin = Infinity,
- xMax = -Infinity,
- yMax = -Infinity,
- x0, // old x-scale
- y0, // old y-scale
- id; // unique id for paths
-
- // Compute x- and y-values along with extents.
- var data = d.map(function(d, i) {
- var xv = x.call(this, d, i),
- yv = y.call(this, d, i);
- if (xv < xMin) xMin = xv;
- if (xv > xMax) xMax = xv;
- if (-yv > yMax) yMax = -yv;
- if (yv > yMax) yMax = yv;
- return [xv, yv];
- });
-
- // Compute the new x- and y-scales, and transform.
- var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]),
- y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]),
- t1 = d3_horizonTransform(bands, h, mode);
-
- // Retrieve the old scales, if this is an update.
- if (this.__chart__) {
- x0 = this.__chart__.x;
- y0 = this.__chart__.y;
- t0 = this.__chart__.t;
- id = this.__chart__.id;
- } else {
- x0 = x1.copy();
- y0 = y1.copy();
- t0 = t1;
- id = ++d3_horizonId;
- }
-
- // We'll use a defs to store the area path and the clip path.
- var defs = g.selectAll("defs")
- .data([null]);
-
- // The clip path is a simple rect.
- defs.enter().append("defs").append("clipPath")
- .attr("id", "d3_horizon_clip" + id)
- .append("rect")
- .attr("width", w)
- .attr("height", h);
-
- defs.select("rect").transition()
- .duration(duration)
- .attr("width", w)
- .attr("height", h);
-
- // We'll use a container to clip all horizon layers at once.
- g.selectAll("g")
- .data([null])
- .enter().append("g")
- .attr("clip-path", "url(#d3_horizon_clip" + id + ")");
-
- // Instantiate each copy of the path with different transforms.
- var path = g.select("g").selectAll("path")
- .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number);
-
- var d0 = d3_horizonArea
- .interpolate(interpolate)
- .x(function(d) { return x0(d[0]); })
- .y0(h * bands)
- .y1(function(d) { return h * bands - y0(d[1]); })
- (data);
-
- var d1 = d3_horizonArea
- .x(function(d) { return x1(d[0]); })
- .y1(function(d) { return h * bands - y1(d[1]); })
- (data);
-
- path.enter().append("path")
- .style("fill", color)
- .attr("transform", t0)
- .attr("d", d0);
-
- path.transition()
- .duration(duration)
- .style("fill", color)
- .attr("transform", t1)
- .attr("d", d1);
-
- path.exit().transition()
- .duration(duration)
- .attr("transform", t1)
- .attr("d", d1)
- .remove();
-
- // Stash the new scales.
- this.__chart__ = {x: x1, y: y1, t: t1, id: id};
- });
- d3.timer.flush();
- }
-
- horizon.duration = function(x) {
- if (!arguments.length) return duration;
- duration = +x;
- return horizon;
- };
-
- horizon.bands = function(x) {
- if (!arguments.length) return bands;
- bands = +x;
- color.domain([-bands, 0, bands]);
- return horizon;
- };
-
- horizon.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return horizon;
- };
-
- horizon.colors = function(x) {
- if (!arguments.length) return color.range();
- color.range(x);
- return horizon;
- };
-
- horizon.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x + "";
- return horizon;
- };
-
- horizon.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return horizon;
- };
-
- horizon.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return horizon;
- };
-
- horizon.width = function(x) {
- if (!arguments.length) return w;
- w = +x;
- return horizon;
- };
-
- horizon.height = function(x) {
- if (!arguments.length) return h;
- h = +x;
- return horizon;
- };
-
- return horizon;
- };
-
- var d3_horizonArea = d3.svg.area(),
- d3_horizonId = 0;
-
- function d3_horizonX(d) {
- return d[0];
- }
-
- function d3_horizonY(d) {
- return d[1];
- }
-
- function d3_horizonTransform(bands, h, mode) {
- return mode == "offset"
- ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; }
- : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; };
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/interactiveLayer.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/interactiveLayer.js
deleted file mode 100644
index 4dfb68dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/interactiveLayer.js
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Utility class to handle creation of an interactive layer.
-This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
-containing the X-coordinate. It can also render a vertical line where the mouse is located.
-
-dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
-the rectangle. The dispatch is given one object which contains the mouseX/Y location.
-It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
-*/
-nv.interactiveGuideline = function() {
- "use strict";
- var tooltip = nv.models.tooltip();
- //Public settings
- var width = null
- , height = null
- //Please pass in the bounding chart's top and left margins
- //This is important for calculating the correct mouseX/Y positions.
- , margin = {left: 0, top: 0}
- , xScale = d3.scale.linear()
- , yScale = d3.scale.linear()
- , dispatch = d3.dispatch('elementMousemove', 'elementMouseout','elementDblclick')
- , showGuideLine = true
- , svgContainer = null
- //Must pass in the bounding chart's <svg> container.
- //The mousemove event is attached to this container.
- ;
-
- //Private variables
- var isMSIE = navigator.userAgent.indexOf("MSIE") !== -1 //Check user-agent for Microsoft Internet Explorer.
- ;
-
-
- function layer(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || 960), availableHeight = (height || 400);
-
- var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([data]);
- var wrapEnter = wrap.enter()
- .append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
-
-
- wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
-
- if (!svgContainer) {
- return;
- }
-
- function mouseHandler() {
- var d3mouse = d3.mouse(this);
- var mouseX = d3mouse[0];
- var mouseY = d3mouse[1];
- var subtractMargin = true;
- var mouseOutAnyReason = false;
- if (isMSIE) {
- /*
- D3.js (or maybe SVG.getScreenCTM) has a nasty bug in Internet Explorer 10.
- d3.mouse() returns incorrect X,Y mouse coordinates when mouse moving
- over a rect in IE 10.
- However, d3.event.offsetX/Y also returns the mouse coordinates
- relative to the triggering <rect>. So we use offsetX/Y on IE.
- */
- mouseX = d3.event.offsetX;
- mouseY = d3.event.offsetY;
-
- /*
- On IE, if you attach a mouse event listener to the <svg> container,
- it will actually trigger it for all the child elements (like <path>, <circle>, etc).
- When this happens on IE, the offsetX/Y is set to where ever the child element
- is located.
- As a result, we do NOT need to subtract margins to figure out the mouse X/Y
- position under this scenario. Removing the line below *will* cause
- the interactive layer to not work right on IE.
- */
- if(d3.event.target.tagName !== "svg")
- subtractMargin = false;
-
- if (d3.event.target.className.baseVal.match("nv-legend"))
- mouseOutAnyReason = true;
-
- }
-
- if(subtractMargin) {
- mouseX -= margin.left;
- mouseY -= margin.top;
- }
-
- /* If mouseX/Y is outside of the chart's bounds,
- trigger a mouseOut event.
- */
- if (mouseX < 0 || mouseY < 0
- || mouseX > availableWidth || mouseY > availableHeight
- || (d3.event.relatedTarget && d3.event.relatedTarget.ownerSVGElement === undefined)
- || mouseOutAnyReason
- )
- {
- if (isMSIE) {
- if (d3.event.relatedTarget
- && d3.event.relatedTarget.ownerSVGElement === undefined
- && d3.event.relatedTarget.className.match(tooltip.nvPointerEventsClass)) {
- return;
- }
- }
- dispatch.elementMouseout({
- mouseX: mouseX,
- mouseY: mouseY
- });
- layer.renderGuideLine(null); //hide the guideline
- return;
- }
-
- var pointXValue = xScale.invert(mouseX);
- dispatch.elementMousemove({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
-
- //If user double clicks the layer, fire a elementDblclick dispatch.
- if (d3.event.type === "dblclick") {
- dispatch.elementDblclick({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
- }
- }
-
- svgContainer
- .on("mousemove",mouseHandler, true)
- .on("mouseout" ,mouseHandler,true)
- .on("dblclick" ,mouseHandler)
- ;
-
- //Draws a vertical guideline at the given X postion.
- layer.renderGuideLine = function(x) {
- if (!showGuideLine) return;
- var line = wrap.select(".nv-interactiveGuideLine")
- .selectAll("line")
- .data((x != null) ? [nv.utils.NaNtoZero(x)] : [], String);
-
- line.enter()
- .append("line")
- .attr("class", "nv-guideline")
- .attr("x1", function(d) { return d;})
- .attr("x2", function(d) { return d;})
- .attr("y1", availableHeight)
- .attr("y2",0)
- ;
- line.exit().remove();
-
- }
- });
- }
-
- layer.dispatch = dispatch;
- layer.tooltip = tooltip;
-
- layer.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return layer;
- };
-
- layer.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return layer;
- };
-
- layer.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return layer;
- };
-
- layer.xScale = function(_) {
- if (!arguments.length) return xScale;
- xScale = _;
- return layer;
- };
-
- layer.showGuideLine = function(_) {
- if (!arguments.length) return showGuideLine;
- showGuideLine = _;
- return layer;
- };
-
- layer.svgContainer = function(_) {
- if (!arguments.length) return svgContainer;
- svgContainer = _;
- return layer;
- };
-
-
- return layer;
-};
-
-/* Utility class that uses d3.bisect to find the index in a given array, where a search value can be inserted.
-This is different from normal bisectLeft; this function finds the nearest index to insert the search value.
-
-For instance, lets say your array is [1,2,3,5,10,30], and you search for 28.
-Normal d3.bisectLeft will return 4, because 28 is inserted after the number 10. But interactiveBisect will return 5
-because 28 is closer to 30 than 10.
-
-Unit tests can be found in: interactiveBisectTest.html
-
-Has the following known issues:
- * Will not work if the data points move backwards (ie, 10,9,8,7, etc) or if the data points are in random order.
- * Won't work if there are duplicate x coordinate values.
-*/
-nv.interactiveBisect = function (values, searchVal, xAccessor) {
- "use strict";
- if (! values instanceof Array) return null;
- if (typeof xAccessor !== 'function') xAccessor = function(d,i) { return d.x;}
-
- var bisect = d3.bisector(xAccessor).left;
- var index = d3.max([0, bisect(values,searchVal) - 1]);
- var currentValue = xAccessor(values[index], index);
- if (typeof currentValue === 'undefined') currentValue = index;
-
- if (currentValue === searchVal) return index; //found exact match
-
- var nextIndex = d3.min([index+1, values.length - 1]);
- var nextValue = xAccessor(values[nextIndex], nextIndex);
- if (typeof nextValue === 'undefined') nextValue = nextIndex;
-
- if (Math.abs(nextValue - searchVal) >= Math.abs(currentValue - searchVal))
- return index;
- else
- return nextIndex
-};
-
-/*
-Returns the index in the array "values" that is closest to searchVal.
-Only returns an index if searchVal is within some "threshold".
-Otherwise, returns null.
-*/
-nv.nearestValueIndex = function (values, searchVal, threshold) {
- "use strict";
- var yDistMax = Infinity, indexToHighlight = null;
- values.forEach(function(d,i) {
- var delta = Math.abs(searchVal - d);
- if ( delta <= yDistMax && delta < threshold) {
- yDistMax = delta;
- indexToHighlight = i;
- }
- });
- return indexToHighlight;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/intro.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/intro.js
deleted file mode 100644
index 180e46f7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/intro.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(function(){
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis-min.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis-min.js
deleted file mode 100644
index 1101dde5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis-min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){function o(d){return d.each(function(d){var o=d3.select(this),p=o.selectAll("g.nv-wrap.nv-axis").data([d]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");q.append("g");var s=p.select("g");null!==m?a.ticks(m):("top"==a.orient()||"bottom"==a.orient())&&a.ticks(Math.abs(e.range()[1]-e.range()[0])/100),d3.transition(s).call(a),n=n||a.scale();var t=a.tickFormat();null==t&&(t=n.tickFormat());var u=s.selectAll("text.nv-axislabel").data([f||null]);switch(u.exit().remove(),a.orient()){case"top":u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",0);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+e(a)+",0)"}).select("text").attr("dy","0em").attr("y",-a.tickPadding()).attr("text-anchor","middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate("+e.range()[b]+",0)"})}break;case"bottom":var x=36,y=30,z=s.selectAll("g").select("text");if(i%360){z.each(function(){var c=this.getBBox().width;c>y&&(y=c)});var A=Math.abs(Math.sin(i*Math.PI/180)),x=(A?A*y:y)+30;z.attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i%360>0?"start":"end")}u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",x);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data([e.domain()[0],e.domain()[e.domain().length-1]]);w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",a.tickPadding()).attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i?i%360>0?"start":"end":"middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"})}k&&z.attr("transform",function(a,b){return"translate(0,"+(0==b%2?"0":"12")+")"});break;case"right":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(90)":"").attr("y",j?-Math.max(b.right,c)+30:-10),u.attr("x",j?e.range()[0]/2:a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(-90)":"").attr("y",j?-Math.max(b.left,c)+0:-10),u.attr("x",j?-e.range()[0]/2:-a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}}if(u.text(function(a){return a}),!g||"left"!==a.orient()&&"right"!==a.orient()||(s.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(e(a)<e.range()[1]+10||e(a)>e.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),e.domain()[0]==e.domain()[1]&&0==e.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),g&&("top"===a.orient()||"bottom"===a.orient())){var B=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?B.push(e(a)-this.getBBox().width-4):B.push(e(a)+this.getBBox().width+4)}catch(c){b?B.push(e(a)-4):B.push(e(a)+4)}}),s.selectAll("g").each(function(a){(e(a)<B[0]||e(a)>B[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}h&&s.selectAll("line.tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)}).classed("zero",!0),n=e.copy()}),o}var a=d3.svg.axis(),b={top:0,right:0,bottom:0,left:0},c=75,d=60,e=d3.scale.linear(),f=null,g=!1,h=!0,i=0,j=!0,k=!1,l=!1,m=null;a.scale(e).orient("bottom").tickFormat(function(a){return a});var n;return o.axis=a,d3.rebind(o,a,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o.margin=function(a){return arguments.length?(b.top=a.top!==void 0?a.top:b.top,b.right=a.right!==void 0?a.right:b.right,b.bottom=a.bottom!==void 0?a.bottom:b.bottom,b.left=a.left!==void 0?a.left:b.left,o):b},o.width=function(a){return arguments.length?(c=a,o):c},o.ticks=function(a){return arguments.length?(m=a,o):m},o.height=function(a){return arguments.length?(d=a,o):d},o.axisLabel=function(a){return arguments.length?(f=a,o):f},o.showMaxMin=function(a){return arguments.length?(g=a,o):g},o.highlightZero=function(a){return arguments.length?(h=a,o):h},o.scale=function(b){return arguments.length?(e=b,a.scale(e),l="function"==typeof e.rangeBands,d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o):e},o.rotateYLabel=function(a){return arguments.length?(j=a,o):j},o.rotateLabels=function(a){return arguments.length?(i=a,o):i},o.staggerLabels=function(a){return arguments.length?(k=a,o):k},o}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.js
deleted file mode 100644
index 9895c3f0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.js
+++ /dev/null
@@ -1,470 +0,0 @@
-nv.models.axis = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale = false
- , axisLabelDistance = 12 //The larger this number is, the closer the axis label is to the axis.
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- g.transition().call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .style('text-anchor', 'start')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + axisLabelDistance) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else {
- v = fmt(d);
- }
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- //v = fmt(v);
- //fmt = d3.format(',.2f');
- v = fmt(v);
- } else {
- v = fmt(d);
- }
- //alert(v);
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
-
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.axisLabelDistance = function(_) {
- if (!arguments.length) return axisLabelDistance;
- axisLabelDistance = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.min.js
deleted file mode 100644
index 6c8ad6ab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/axis.min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){"use strict";function m(r){r.each(function(r){var m=d3.select(this);var g=m.selectAll("g.nv-wrap.nv-axis").data([r]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(h!==null)e.ticks(h);else if(e.orient()=="top"||e.orient()=="bottom")e.ticks(Math.abs(i.range()[1]-i.range()[0])/100);w.transition().call(e);v=v||e.scale();var E=e.tickFormat();if(E==null){E=v.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([s||null]);S.exit().remove();switch(e.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+i(e)+",0)"}).select("text").attr("dy","0em").attr("y",-e.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+i.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(a%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(a*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",e.tickPadding()).attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a?a%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"})}if(l)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"begin").attr("transform",f?"rotate(90)":"").attr("y",f?-Math.max(t.right,n)+12:-10).attr("x",f?i.range()[0]/2:e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+i(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",e.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"end").attr("transform",f?"rotate(-90)":"").attr("y",f?-Math.max(t.left,n)+d:-10).attr("x",f?-i.range()[0]/2:-e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+v(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-e.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(o&&(e.orient()==="left"||e.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<i.range()[1]+10||i(e)>i.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(i.domain()[0]==i.domain()[1]&&i.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(o&&(e.orient()==="top"||e.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(i(e)-this.getBBox().width-4);else A.push(i(e)+this.getBBox().width+4)}catch(n){if(t)A.push(i(e)-4);else A.push(i(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<A[0]||i(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(u)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);v=i.copy()});return m}var e=d3.svg.axis();var t={top:0,right:0,bottom:0,left:0},n=75,r=60,i=d3.scale.linear(),s=null,o=true,u=true,a=0,f=true,l=false,c=false,h=null,p=false,d=12;e.scale(i).orient("bottom").tickFormat(function(e){return e});var v;m.axis=e;d3.rebind(m,e,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(m,i,"domain","range","rangeBand","rangeBands");m.options=nv.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.width=function(e){if(!arguments.length)return n;n=e;return m};m.ticks=function(e){if(!arguments.length)return h;h=e;return m};m.height=function(e){if(!arguments.length)return r;r=e;return m};m.axisLabel=function(e){if(!arguments.length)return s;s=e;return m};m.showMaxMin=function(e){if(!arguments.length)return o;o=e;return m};m.logScale=function(e){if(!arguments.length)return p;p=e;return m};m.highlightZero=function(e){if(!arguments.length)return u;u=e;return m};m.scale=function(t){if(!arguments.length)return i;i=t;e.scale(i);c=typeof i.rangeBands==="function";d3.rebind(m,i,"domain","range","rangeBand","rangeBands");return m};m.rotateYLabel=function(e){if(!arguments.length)return f;f=e;return m};m.rotateLabels=function(e){if(!arguments.length)return a;a=e;return m};m.staggerLabels=function(e){if(!arguments.length)return l;l=e;return m};m.axisLabelDistance=function(e){if(!arguments.length)return d;d=e;return m};return m} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bullet.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bullet.js
deleted file mode 100644
index 86ebeb0f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bullet.js
+++ /dev/null
@@ -1,250 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this),
- mainGroup = nv.log(this.parentNode.parentNode).getAttribute('transform'),
- heightFromTop = nv.log(parseInt(mainGroup.replace(/.*,(\d+)\)/,"$1"))); //TODO: There should be a smarter way to get this value
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var MaxX = Math.max(rangez[0] ? rangez[0]:0 , markerz[0] ? markerz[0] : 0 , measurez[0] ? measurez[0] : 0)
- var x1 = d3.scale.linear()
- .domain([0, MaxX]).nice() // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bulletChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bulletChart.js
deleted file mode 100644
index a2a0f077..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/backup/bulletChart.js
+++ /dev/null
@@ -1,349 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + e.label + '</h3>' +
- '<p>' + e.value + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, parentElement) {
- var offsetElement = parentElement.parentNode.parentNode,
- left = e.pos[0] + offsetElement.offsetLeft + margin.left,
- top = e.pos[1] + offsetElement.offsetTop + margin.top;
-
- var content = '<h3>' + e.label + '</h3>' +
- '<p>' + e.value + '</p>';
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement.parentNode);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- /*
- // Disabled until I figure out a better way to check for no data with the bullet chart
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
- */
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + ( margin.top + i*height )+ ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var MaxX = Math.max(rangez[0] ? rangez[0]:0 , markerz[0] ? markerz[0] : 0 , measurez[0] ? measurez[0] : 0)
- var x1 = d3.scale.linear()
- .domain([0, MaxX]).nice() // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append("g")
- .attr("text-anchor", "end")
- .attr("transform", "translate(-6," + (height - margin.top - margin.bottom) / 2 + ")");
- title.append("text")
- .attr("class", "nv-title")
- .text(function(d) { return d.title; });
-
- title.append("text")
- .attr("class", "nv-subtitle")
- .attr("dy", "1em")
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat(8);
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks(8), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
- // Transition the entering ticks to the new scale, x1.
- d3.transition(tickEnter)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/boilerplate.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/boilerplate.js
deleted file mode 100644
index 3d2360a6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/boilerplate.js
+++ /dev/null
@@ -1,104 +0,0 @@
-
-nv.models.chartName = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , dispatch = d3.dispatch('stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-chartName').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-chartName');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-mainWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bullet.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bullet.js
deleted file mode 100644
index 9b9bf4d1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bullet.js
+++ /dev/null
@@ -1,385 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , rangeLabels = function(d) { return d.rangeLabels ? d.rangeLabels : [] }
- , markerLabels = function(d) { return d.markerLabels ? d.markerLabels : [] }
- , measureLabels = function(d) { return d.measureLabels ? d.measureLabels : [] }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending),
- rangeLabelz = rangeLabels.call(this, d, i).slice(),
- markerLabelz = markerLabels.call(this, d, i).slice(),
- measureLabelz = measureLabels.call(this, d, i).slice();
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: measureLabelz[0] || 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: measureLabelz[0] || 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bulletChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bulletChart.js
deleted file mode 100644
index fa5bd596..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/bulletChart.js
+++ /dev/null
@@ -1,343 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/cumulativeLineChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/cumulativeLineChart.js
deleted file mode 100644
index 00f193cf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/cumulativeLineChart.js
+++ /dev/null
@@ -1,782 +0,0 @@
-
-nv.models.cumulativeLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , showControls = true
- , useInteractiveGuideline = false
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
- controls.updateState(false);
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
- var interactivePointerEvents = (useInteractiveGuideline) ? "none" : "all";
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-interactive');
- gEnter.append('g').attr('class', 'nv-x nv-axis').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap').style("pointer-events",interactivePointerEvents);
- gEnter.append('g').attr('class', 'nv-avgLinesWrap').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left,top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- var getAvgLineY = function(d) {
- //If average lines go off the svg element, clamp them to the svg bounds.
- var yVal = y(average(d));
- if (yVal < 0) return 0;
- if (yVal > availableHeight) return availableHeight;
- return yVal;
- };
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines
- .style('stroke-opacity',function(d){
- //If average lines go offscreen, make them transparent
- var yVal = y(average(d));
- if (yVal < 0 || yVal > availableHeight) return 0;
- return 1;
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .style("pointer-events","all")
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- //When dragging the index line, turn off line transitions.
- // Then turn them back on when done dragging.
- var oldDuration = chart.transitionDuration();
- chart.transitionDuration(0);
- chart.update();
- chart.transitionDuration(oldDuration);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
-
-
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
-
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex), pointIndex);
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'xScale','yScale', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi','useVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBar.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBar.js
deleted file mode 100644
index a20f5829..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBar.js
+++ /dev/null
@@ -1,349 +0,0 @@
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range(yRange || [availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range(yRange || [availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- ;
-
- bars.select('text')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- .transition()
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
-
- ;
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .transition()
- .attr('width', x.rangeBand() * .9 / data.length);
- bars.transition()
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y((yDomain && yDomain[0]) || 0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBarChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBarChart.js
deleted file mode 100644
index 48a48164..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/discreteBarChart.js
+++ /dev/null
@@ -1,333 +0,0 @@
-
-nv.models.discreteBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() {
- dispatch.beforeUpdate();
- container.transition().duration(transitionDuration).call(chart);
- };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale().clamp(true);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/distribution.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/distribution.js
deleted file mode 100644
index 62a74655..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/distribution.js
+++ /dev/null
@@ -1,148 +0,0 @@
-
-nv.models.distribution = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- distWrap.exit().selectAll('line.nv-dist' + axis)
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- dist
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBar.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBar.js
deleted file mode 100644
index 2a6c644d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBar.js
+++ /dev/null
@@ -1,331 +0,0 @@
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , interactive = true
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
-
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBar-' + id).data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBar-' + id);
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d }, function(d,i) {return getX(d,i)});
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return nv.utils.NaNtoZero(y(Math.max(0, getY(d,i)))) })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.abs(y(getY(d,i)) - y(0))) })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- .on('mouseover', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- if (!interactive) return;
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- if (!interactive) return;
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 );
-
-
- bars.transition()
- .attr('y', function(d,i) {
- var rval = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i));
- return nv.utils.NaNtoZero(rval);
- })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.max(Math.abs(y(getY(d,i)) - y(0)),1)) });
-
- });
-
- return chart;
- }
-
- //Create methods to allow outside functions to highlight a specific bar.
- chart.highlightPoint = function(pointIndex, isHoverOver) {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar-0-" + pointIndex)
- .classed("hover", isHoverOver)
- ;
- };
-
- chart.clearHighlights = function() {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar.hover")
- .classed("hover", false)
- ;
- };
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if(!arguments.length) return interactive;
- interactive = false;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBarChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBarChart.js
deleted file mode 100644
index a5b4a097..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/historicalBarChart.js
+++ /dev/null
@@ -1,419 +0,0 @@
-
-nv.models.historicalBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBarChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBarChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale',
- 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate','highlightPoint','clearHighlights', 'interactive');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/indentedTree.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/indentedTree.js
deleted file mode 100644
index 18c2700f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/indentedTree.js
+++ /dev/null
@@ -1,337 +0,0 @@
-nv.models.indentedTree = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- , getUrl = function(d) { return d.url }
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.each(function(d) {
- if (!index && getUrl(d))
- d3.select(this)
- .append('a')
- .attr('href',getUrl)
- .attr('class', d3.functor(column.classes))
- .append('span')
- else
- d3.select(this)
- .append('span')
-
- d3.select(this).select('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
- });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- // if (column.click)
- // nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- chart.getUrl = function(_){
- if (!arguments.length) return getUrl;
- getUrl = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/legend.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/legend.js
deleted file mode 100644
index 21f9f9a4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/legend.js
+++ /dev/null
@@ -1,270 +0,0 @@
-nv.models.legend = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , rightAlign = true
- , updateState = true //If true, legend will update data.disabled and trigger a 'stateChange' dispatch.
- , radioButtonMode = false //If true, clicking legend items will cause it to behave like a radio button. (only one can be selected at a time)
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout', 'stateChange')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- if (updateState) {
- if (radioButtonMode) {
- //Radio button mode: set every series to disabled,
- // and enable the clicked series.
- data.forEach(function(series) { series.disabled = true});
- d.disabled = false;
- }
- else {
- d.disabled = !d.disabled;
- if (data.every(function(series) { return series.disabled})) {
- //the default behavior of NVD3 legends is, if every single series
- // is disabled, turn all series' back on.
- data.forEach(function(series) { series.disabled = false});
- }
- }
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- if (updateState) {
- //the default behavior of NVD3 legends, when double clicking one,
- // is to set all other series' to false, and make the double clicked series enabled.
- data.forEach(function(series) {
- series.disabled = true;
- });
- d.disabled = false;
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('class','nv-legend-symbol')
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('class','nv-legend-text')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var nodeTextLength;
- try {
- nodeTextLength = legendText.node().getComputedTextLength();
- }
- catch(e) {
- nodeTextLength = nv.utils.calcApproxTextWidth(legendText);
- }
-
- seriesWidths.push(nodeTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
- if (seriesPerRow === 0) seriesPerRow = 1; //minimum of one series per row
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (var k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- if (rightAlign) {
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
- }
- else {
- g.attr('transform', 'translate(0' + ',' + margin.top + ')');
- }
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- chart.rightAlign = function(_) {
- if (!arguments.length) return rightAlign;
- rightAlign = _;
- return chart;
- };
-
- chart.updateState = function(_) {
- if (!arguments.length) return updateState;
- updateState = _;
- return chart;
- };
-
- chart.radioButtonMode = function(_) {
- if (!arguments.length) return radioButtonMode;
- radioButtonMode = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/line.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/line.js
deleted file mode 100644
index 855cc541..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/line.js
+++ /dev/null
@@ -1,284 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- scatterWrap.transition().call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- groups.exit().selectAll('path.nv-area')
- .remove();
-
- areaPaths
- .transition()
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- );
- groups.exit().selectAll('path.nv-line')
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
- linePaths
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi', 'clipRadius', 'padData','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineChart.js
deleted file mode 100644
index a4ffcf6a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineChart.js
+++ /dev/null
@@ -1,465 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left, top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- linesWrap.transition().call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange'
- , 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'useVoronoi','id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarChart.js
deleted file mode 100644
index 77fcbab7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarChart.js
+++ /dev/null
@@ -1,433 +0,0 @@
-
-nv.models.linePlusBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarWithFocusChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarWithFocusChart.js
deleted file mode 100644
index 2ef31137..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/linePlusBarWithFocusChart.js
+++ /dev/null
@@ -1,658 +0,0 @@
-
-nv.models.linePlusBarWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 0
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- bars2Wrap.transition().call(bars2);
- lines2Wrap.transition().call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- g.select('.nv-context .nv-x.nv-axis').transition()
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- g.select('.nv-context .nv-y1.nv-axis').transition()
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- g.select('.nv-context .nv-y2.nv-axis').transition()
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- g.select('.nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- focusBarsWrap.transition().duration(transitionDuration).call(bars);
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- g.select('.nv-focus .nv-y1.nv-axis').transition().duration(transitionDuration)
- .call(y1Axis);
- g.select('.nv-focus .nv-y2.nv-axis').transition().duration(transitionDuration)
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheye.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheye.js
deleted file mode 100644
index 2b411672..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheye.js
+++ /dev/null
@@ -1,200 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //Default Settings
- var margin = {top: 0, right: 0, bottom: 0, left: 0},
- width = 960,
- height = 500,
- color = nv.utils.defaultColor(), // function that returns colors
- id = Math.floor(Math.random() * 10000), //Create semi-unique ID incase user doesn't select one
- getX = function(d) { return d.x }, // accessor to get the x value from a data point
- getY = function(d) { return d.y }, // accessor to get the y value from a data point
- clipEdge = false, // if true, masks lines within x and y scale
- interpolate = "linear"; // controls the line interpolation
-
-
- var scatter = nv.models.scatter()
- .id(id)
- .size(16) // default size
- .sizeDomain([16,256]), //set to speed up calculation, needs to be unset if there is a custom size accessor
- //x = scatter.xScale(),
- //y = scatter.yScale(),
- x, y,
- x0, y0, timeoutID;
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom;
-
- //get the scales inscase scatter scale was set manually
- x = x || scatter.xScale();
- y = y || scatter.yScale();
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y;
-
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- wrapEnter.append('g').attr('class', 'nv-scatterWrap');
- var scatterWrap = wrap.select('.nv-scatterWrap').datum(data);
-
- gEnter.append('g').attr('class', 'nv-groups');
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- d3.transition(scatterWrap).call(scatter);
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) })
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5)
-
-
- var paths = groups.selectAll('path')
- .data(function(d, i) { return [d.values] });
- paths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path'))
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- )
- .remove(); // redundant? line is already being removed
- d3.transition(paths)
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- //store old scales for use in transitions on update, to animate from old to new positions
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = scatter.dispatch;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheyeChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheyeChart.js
deleted file mode 100644
index ad894190..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFisheyeChart.js
+++ /dev/null
@@ -1,297 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = nv.utils.defaultColor(),
- width = null,
- height = null,
- showLegend = true,
- showControls = true,
- fisheye = 0,
- pauseFisheye = false,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- noData = "No Data Available."
- ;
-
-
- var x = d3.fisheye.scale(d3.scale.linear).distortion(0);
-
- var lines = nv.models.line().xScale(x),
- //x = lines.xScale(),
- y = lines.yScale(),
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis = nv.models.axis().scale(y).orient('left'),
- legend = nv.models.legend().height(30),
- controls = nv.models.legend().height(30).updateState(false),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this; // I need a reference to the container in order to have outside code check if the chart is visible or not
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- container.append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('x', availableWidth / 2)
- .attr('y', availableHeight / 2)
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle')
- .text(noData);
- return chart;
- } else {
- container.select('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
-
-
- gEnter.append('rect')
- .attr('class', 'nvd3 nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- var g = wrap.select('g');
-
-
-
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
-
-
- xAxis
- //.scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- //.scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
-
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye; });
- //g.select('.point-paths').on('mousemove', updateFisheye);
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- //g.select('.background') .style('pointer-events', 'none');
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-background') .style('pointer-events', 'all');
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- x.distortion(fisheye).focus(mouse[0]);
- }
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- //scatter.interactive(d.disabled);
- //tooltips = d.disabled;
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
-
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
- if (tooltips) dispatch.on('tooltipShow', function(e) { showTooltip(e, that.parentNode) } ); // TODO: maybe merge with above?
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- if (tooltips) dispatch.on('tooltipHide', nv.tooltip.cleanup);
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFocusChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFocusChart.js
deleted file mode 100644
index 0afd28bd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/lineWithFocusChart.js
+++ /dev/null
@@ -1,574 +0,0 @@
-nv.models.lineWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 250
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', function() {
- //When brushing, turn off transitions because chart needs to change immediately.
- var oldTransition = chart.transitionDuration();
- chart.transitionDuration(0);
- onBrush();
- chart.transitionDuration(oldTransition);
- });
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- var extent = brush.empty() ? x2.domain() : brush.extent();
-
- //The brush extent cannot be less than one. If it is, don't update the line chart.
- if (Math.abs(extent[0] - extent[1]) <= 1) {
- return;
- }
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
-
- // Update Main (Focus) Axes
- g.select('.nv-focus .nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- g.select('.nv-focus .nv-y.nv-axis').transition().duration(transitionDuration)
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBar.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBar.js
deleted file mode 100644
index 1085919b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBar.js
+++ /dev/null
@@ -1,461 +0,0 @@
-
-nv.models.multiBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , stackOffset = 'zero' // options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , groupSpacing = 0.1
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset(stackOffset)
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], groupSpacing);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .selectAll('rect.nv-bar')
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) )
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- ;
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
- .delay(function(d,i) {
-
- return i * delay / data[0].values.length;
- })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- else
- bars.transition()
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.stackOffset = function(_) {
- if (!arguments.length) return stackOffset;
- stackOffset = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.groupSpacing = function(_) {
- if (!arguments.length) return groupSpacing;
- groupSpacing = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarChart.js
deleted file mode 100644
index 0323063f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarChart.js
+++ /dev/null
@@ -1,524 +0,0 @@
-
-nv.models.multiBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('.tick text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .style('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge',
- 'id', 'stacked', 'stackOffset', 'delay', 'barColor','groupSpacing');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontal.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontal.js
deleted file mode 100644
index d16d4605..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontal.js
+++ /dev/null
@@ -1,424 +0,0 @@
-
-nv.models.multiBarHorizontal = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range(yRange || [(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range(yRange || [0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit().transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups.transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- bars.transition()
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- bars.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- bars.transition()
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontalChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontalChart.js
deleted file mode 100644
index 02aa6fa4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarHorizontalChart.js
+++ /dev/null
@@ -1,434 +0,0 @@
-
-nv.models.multiBarHorizontalChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeries.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeries.js
deleted file mode 100644
index abc062c3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeries.js
+++ /dev/null
@@ -1,384 +0,0 @@
-nv.models.multiBarTimeSeries = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.time.scale()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.x })))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- //.style('stroke-opacity', 1e-6)
- //.style('fill-opacity', 1e-6)
- .selectAll('rect.nv-bar')
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
- var maxElements = 0;
- for(var ei=0; ei<seriesData.length; ei+=1) {
- maxElements = Math.max(seriesData[ei].length, maxElements);
- }
-
- var bandWidth = (availableWidth / maxElements)-0.1;
- var barWidth = bandWidth / data.length;
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', stacked ? bandWidth : barWidth );
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- if (stacked)
- d3.transition(bars)
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
- return y(getY(d,i) + (stacked ? d.y0 : 0));
- })
- .attr('height', function(d,i) {
- return Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0)))
- })
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('x', function(d,i) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('width', stacked ? bandWidth : barWidth );
- })
- else
- d3.transition(bars)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * barWidth
- })
- .attr('width', barWidth)
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(getY(d,i))
- })
- .attr('height', function(d,i) {
- return Math.abs(y(getY(d,i)) - y(0))
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeriesChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeriesChart.js
deleted file mode 100644
index 5aebafa7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiBarTimeSeriesChart.js
+++ /dev/null
@@ -1,405 +0,0 @@
-nv.models.multiBarTimeSeriesChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarTimeSeries()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , reduceXTicks = true // if false a tick will show for every data point
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- .showMaxMin(false)
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { selection.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth / 2);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(180).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks(availableWidth / 100)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'rotate('+rotateLabels+' 0,0)' })
- .attr('text-transform', rotateLabels > 0 ? 'start' : 'end');
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- selection.transition().call(chart);
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- selection.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiChart.js
deleted file mode 100644
index e3e2c5e8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/multiChart.js
+++ /dev/null
@@ -1,452 +0,0 @@
-nv.models.multiChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x,
- y,
- yDomain1,
- yDomain2
- ; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(yDomain1 || d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(yDomain2 || d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.yDomain1 = function(_) {
- if (!arguments.length) return yDomain1;
- yDomain1 = _;
- return chart;
- };
-
- chart.yDomain2 = function(_) {
- if (!arguments.length) return yDomain2;
- yDomain2 = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/ohlcBar.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/ohlcBar.js
deleted file mode 100644
index 46f2b60c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/ohlcBar.js
+++ /dev/null
@@ -1,380 +0,0 @@
-
-nv.models.ohlcBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/parallelCoordinates.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/parallelCoordinates.js
deleted file mode 100644
index 107154f7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/parallelCoordinates.js
+++ /dev/null
@@ -1,239 +0,0 @@
-
-//Code adapted from Jason Davies' "Parallel Coordinates"
-// http://bl.ocks.org/jasondavies/1341281
-
-nv.models.parallelCoordinates = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = {}
- , dimensions = []
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , axisLabel = function(d) { return d; }
- , filters = []
- , active = []
- , dispatch = d3.dispatch('brush')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- active = data; //set all active before first brush call
-
- chart.update = function() { }; //This is a placeholder until this chart is made resizeable
-
- //------------------------------------------------------------
- // Setup Scales
-
- x
- .rangePoints([0, availableWidth], 1)
- .domain(dimensions);
-
- // Extract the list of dimensions and create a scale for each.
- dimensions.forEach(function(d) {
- y[d] = d3.scale.linear()
- .domain(d3.extent(data, function(p) { return +p[d]; }))
- .range([availableHeight, 0]);
-
- y[d].brush = d3.svg.brush().y(y[d]).on('brush', brush);
-
- return d != 'name';
- })
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-parallelCoordinates').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-parallelCoordinates');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-parallelCoordinatesWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var line = d3.svg.line(),
- axis = d3.svg.axis().orient('left'),
- background,
- foreground;
-
-
- // Add grey background lines for context.
- background = gEnter.append('g')
- .attr('class', 'background')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add blue foreground lines for focus.
- foreground = gEnter.append('g')
- .attr('class', 'foreground')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add a group element for each dimension.
- var dimension = g.selectAll('.dimension')
- .data(dimensions)
- .enter().append('g')
- .attr('class', 'dimension')
- .attr('transform', function(d) { return 'translate(' + x(d) + ',0)'; });
-
- // Add an axis and title.
- dimension.append('g')
- .attr('class', 'axis')
- .each(function(d) { d3.select(this).call(axis.scale(y[d])); })
- .append('text')
- .attr('text-anchor', 'middle')
- .attr('y', -9)
- .text(String);
-
- // Add and store a brush for each axis.
- dimension.append('g')
- .attr('class', 'brush')
- .each(function(d) { d3.select(this).call(y[d].brush); })
- .selectAll('rect')
- .attr('x', -8)
- .attr('width', 16);
-
-
- // Returns the path for a given data point.
- function path(d) {
- return line(dimensions.map(function(p) { return [x(p), y[p](d[p])]; }));
- }
-
- // Handles a brush event, toggling the display of foreground lines.
- function brush() {
- var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
- extents = actives.map(function(p) { return y[p].brush.extent(); });
-
- filters = []; //erase current filters
- actives.forEach(function(d,i) {
- filters[i] = {
- dimension: d,
- extent: extents[i]
- }
- });
-
- active = []; //erase current active list
- foreground.style('display', function(d) {
- var isActive = actives.every(function(p, i) {
- return extents[i][0] <= d[p] && d[p] <= extents[i][1];
- });
- if (isActive) active.push(d);
- return isActive ? null : 'none';
- });
-
- dispatch.brush({
- filters: filters,
- active: active
- });
-
- }
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.dimensions = function(_) {
- if (!arguments.length) return dimensions;
- dimensions = _;
- return chart;
- };
-
- chart.filters = function() {
- return filters;
- };
-
- chart.active = function() {
- return active;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pie.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pie.js
deleted file mode 100644
index 2099c8f3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pie.js
+++ /dev/null
@@ -1,400 +0,0 @@
-nv.models.pie = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelType = "key"
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data(data);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc);
- //.attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return Math.round(percent*1001/10)+"%";
- /*var labelTypes = {
- "key" : getX(d.data),
- "value": getY(d.data),
- "percent": d3.format('%')(percent)
- };
- return (d.value && percent > labelThreshold) ? labelTypes[labelType] : '';
- */
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- nv.log("pie.values() is no longer supported.");
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.labelType = function(_) {
- if (!arguments.length) return labelType;
- labelType = _;
- labelType = labelType || "key";
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pieChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pieChart.js
deleted file mode 100644
index b4303fd6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/pieChart.js
+++ /dev/null
@@ -1,292 +0,0 @@
-nv.models.pieChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = false
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum([data]);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- /*legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });*/
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'labelType', 'donut', 'donutRatio', 'labelThreshold');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatter.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatter.js
deleted file mode 100644
index 16cbee65..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatter.js
+++ /dev/null
@@ -1,674 +0,0 @@
-
-nv.models.scatter = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , xRange = null // Override x range
- , yRange = null // Override y range
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range(xRange || [(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] - y.domain()[0] * 0.01, y.domain()[1] + y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex);
- var pY = getY(point,pointIndex);
-
- return [x(pX)+ Math.random() * 1e-7,
- y(pY)+ Math.random() * 1e-7,
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- var mouseEventCallback = function(d,mDispatch) {
- if (needsUpdate) return 0;
- var series = data[d.series];
- if (typeof series === 'undefined') return;
-
- var point = series.values[d.point];
-
- mDispatch({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- };
-
- pointPaths
- .on('click', function(d) {
- mouseEventCallback(d, dispatch.elementClick);
- })
- .on('mouseover', function(d) {
- mouseEventCallback(d, dispatch.elementMouseover);
- })
- .on('mouseout', function(d, i) {
- mouseEventCallback(d, dispatch.elementMouseout);
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- groups.exit().selectAll('path.nv-point')
- .transition()
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
- chart.clearHighlights = function() {
- //Remove the 'hover' class from all highlighted points.
- d3.selectAll(".nv-chart-" + id + " .nv-point.hover").classed("hover",false);
- };
-
- chart.highlightPoint = function(seriesIndex,pointIndex,isHoverOver) {
- d3.select(".nv-chart-" + id + " .nv-series-" + seriesIndex + " .nv-point-" + pointIndex)
- .classed("hover",isHoverOver);
- };
-
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterChart.js
deleted file mode 100644
index 65b6e387..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterChart.js
+++ /dev/null
@@ -1,628 +0,0 @@
-nv.models.scatterChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth / 2 : availableWidth;
- legend.width(legendWidth);
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth - legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
- if (xPadding !== 0)
- scatter.xDomain(null);
-
- if (yPadding !== 0)
- scatter.yDomain(null);
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //Adjust for x and y padding
- if (xPadding !== 0) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding !== 0) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- //Only need to update the scatter again if x/yPadding changed the domain.
- if (yPadding !== 0 || xPadding !== 0) {
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform',
- 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterPlusLineChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterPlusLineChart.js
deleted file mode 100644
index 23c87853..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/scatterPlusLineChart.js
+++ /dev/null
@@ -1,620 +0,0 @@
-
-nv.models.scatterPlusLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background').style("pointer-events","none");
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) {return d });
-
- regWrap.enter().append('g').attr('class', 'nv-regLines');
-
- var regLine = regWrap.selectAll('.nv-regLine').data(function(d){return [d]});
- var regLineEnter = regLine.enter()
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- regLine
- .transition()
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) {return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight)
- ;
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparkline.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparkline.js
deleted file mode 100644
index e4c2e87b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparkline.js
+++ /dev/null
@@ -1,194 +0,0 @@
-
-nv.models.sparkline = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- , xRange
- , yRange
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range(yRange || [availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparklinePlus.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparklinePlus.js
deleted file mode 100644
index 1535f8af..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/sparklinePlus.js
+++ /dev/null
@@ -1,295 +0,0 @@
-
-nv.models.sparklinePlus = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedArea.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedArea.js
deleted file mode 100644
index eefeb8fb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedArea.js
+++ /dev/null
@@ -1,368 +0,0 @@
-
-nv.models.stackedArea = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
- var dataRaw = data;
- // Injecting point index into each point because d3.layout.stack().out does not give index
- data.forEach(function(aseries, i) {
- aseries.seriesIndex = i;
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.seriesIndex = i;
- return d;
- });
- });
-
- var dataFiltered = data.filter(function(series) {
- return !series.disabled;
- });
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(getY)
- .out(function(d, y0, y) {
- var yHeight = (getY(d) === 0) ? 0 : y;
- d.display = {
- y: yHeight,
- y0: y0
- };
- })
- (dataFiltered);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, d.seriesIndex);
- }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data);
-
- scatterWrap.call(scatter);
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) {
- return y(d.display.y0)
- })
- .y1(function(d) {
- return y(d.display.y + d.display.y0)
- })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
-
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .attr('d', function(d,i){
- return zeroArea(d.values, d.seriesIndex);
- })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- path.exit().transition()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){
- return d.color || color(d, d.seriesIndex)
- })
- .style('stroke', function(d,i){ return d.color || color(d, d.seriesIndex) });
- path.transition()
- .attr('d', function(d,i) {
- return area(d.values,i)
- });
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
- //Special offset functions
- chart.d3_stackedOffset_stackPercent = function(stackData) {
- var n = stackData.length, //How many series
- m = stackData[0].length, //how many points per series
- k = 1 / n,
- i,
- j,
- o,
- y0 = [];
-
- for (j = 0; j < m; ++j) { //Looping through all points
- for (i = 0, o = 0; i < dataRaw.length; i++) //looping through series'
- o += getY(dataRaw[i].values[j]) //total value of all points at a certian point in time.
-
- if (o) for (i = 0; i < n; i++)
- stackData[i][j][1] /= o;
- else
- for (i = 0; i < n; i++)
- stackData[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- };
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi','clipRadius','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- case 'stack_percent':
- chart.offset(chart.d3_stackedOffset_stackPercent);
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedAreaChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedAreaChart.js
deleted file mode 100644
index a036b8b0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/models/stackedAreaChart.js
+++ /dev/null
@@ -1,629 +0,0 @@
-
-nv.models.stackedAreaChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- , cData = ['Stacked','Stream','Expanded']
- , controlLabels = {}
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth - controlWidth : availableWidth;
- legend
- .width(legendWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth-legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- {
- key: controlLabels.stacked || 'Stacked',
- metaKey: 'Stacked',
- disabled: stacked.style() != 'stack',
- style: 'stack'
- },
- {
- key: controlLabels.stream || 'Stream',
- metaKey: 'Stream',
- disabled: stacked.style() != 'stream',
- style: 'stream'
- },
- {
- key: controlLabels.expanded || 'Expanded',
- metaKey: 'Expanded',
- disabled: stacked.style() != 'expand',
- style: 'expand'
- },
- {
- key: controlLabels.stack_percent || 'Stack %',
- metaKey: 'Stack_Percent',
- disabled: stacked.style() != 'stack_percent',
- style: 'stack_percent'
- }
- ];
-
- controlWidth = (cData.length/3) * 260;
-
- controlsData = controlsData.filter(function(d) {
- return cData.indexOf(d.metaKey) !== -1;
- })
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left: margin.left, top: margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
-
- stackedWrap.transition().call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
-
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat( (stacked.style() == 'expand' || stacked.style() == 'stack_percent')
- ? d3.format('%') : yAxisTickFormat);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data.forEach(function(d) {
- d.disabled = false;
- });
- else
- data.forEach(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- stacked.style(d.style);
-
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- stacked.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- stacked.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
-
- //If we are in 'expand' mode, use the stacked percent value instead of raw value.
- var tooltipValue = (stacked.style() == 'expand') ? point.display.y : chart.y()(point,pointIndex);
- allData.push({
- key: series.key,
- value: tooltipValue,
- color: color(series,series.seriesIndex),
- stackedValue: point.display
- });
- });
-
- allData.reverse();
-
- //Highlight the tooltip entry based on which stack the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var yDistMax = Infinity, indexToHighlight = null;
- allData.forEach(function(series,i) {
- if ( yValue >= series.stackedValue.y0 && yValue <= (series.stackedValue.y0 + series.stackedValue.y))
- {
- indexToHighlight = i;
- return;
- }
- });
- if (indexToHighlight != null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
-
- //If we are in 'expand' mode, force the format to be a percentage.
- var valueFormatter = (stacked.style() == 'expand') ?
- function(d,i) {return d3.format(".1%")(d);} :
- function(d,i) {return yAxis.tickFormat()(d); };
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(valueFormatter)
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- stacked.clearHighlights();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'interactive', 'useVoronoi', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- chart.controlsData = function(_) {
- if (!arguments.length) return cData;
- cData = _;
- return chart;
- };
-
- chart.controlLabels = function(_) {
- if (!arguments.length) return controlLabels;
- if (typeof _ !== 'object') return controlLabels;
- controlLabels = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
-
- //============================================================
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.js
deleted file mode 100644
index 78586667..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.js
+++ /dev/null
@@ -1,13097 +0,0 @@
-(function(){
-
-var nv = window.nv || {};
-
-nv.version = '0.0.1a';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && console.log && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
-
-/*****
- * A no-frills tooltip implementation.
- *****/
-
-
-(function() {
-
- var nvtooltip = window.nv.tooltip = {};
-
- nvtooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.innerHTML = content;
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
-
- body.appendChild(container);
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.scrollY,
- scrollLeft = window.scrollX,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- var tooltipTop = function ( Elem ) {
- var offsetTop = top;
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- }
-
- var tooltipLeft = function ( Elem ) {
- var offsetLeft = left;
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- }
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop - height - 5;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute'; //fix scroll bar issue
- container.style.pointerEvents = 'none'; //fix scroll bar issue
-
- return container;
- };
-
- nvtooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-
-})();
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-nv.models.axis = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale=false
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- d3.transition(g)
- .call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .attr('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .attr('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .attr('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .attr('text-anchor', 'start')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .attr('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = !i ? "Maximum" : i == 1 ? "Mean" : "Minimum";
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = !i ? "Maximum" : i == 1 ? "Mean" : "Minimum";
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
-
-nv.models.cumulativeLineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , tooltips = true
- , showControls = true
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient('left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
-
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-avgLinesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', function(d) { return y(average(d)); })
- .attr('y2', function(d) { return y(average(d)); });
-
- avgLines
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', function(d) { return y(average(d)); })
- .attr('y2', function(d) { return y(average(d)); });
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- container.call(chart);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- //
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _
- return rescaleY;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range([availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range([availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- bars.select('text')
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
- .text(function(d,i) { return valueFormat(getY(d,i)) });
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .attr('width', x.rangeBand() * .9 / data.length);
- d3.transition(bars)
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- }
- //============================================================
-
-
- return chart;
-}
-
-nv.models.discreteBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { dispatch.beforeUpdate(); container.transition().call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition().duration(0)
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.distribution = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- d3.transition(distWrap.exit().selectAll('line.nv-dist' + axis))
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- d3.transition(dist)
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- .attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; }) //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- d3.transition(bars)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i))
- })
- .attr('height', function(d,i) { return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.historicalBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.indentedTree = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.append('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- if (column.click)
- nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-};nv.models.legend = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var svgComputedTextLength = legendText.node().getComputedTextLength()
- || nv.utils.calcApproxTextWidth(legendText);
- seriesWidths.push(svgComputedTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- //nv.log('Series Widths: ', JSON.stringify(seriesWidths));
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
- //console.log(columnWidths, legendWidth, seriesPerRow);
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.line = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- d3.transition(scatterWrap).call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y0(function(d,i) { return y0(getY(d,i)) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- d3.transition(groups.exit().selectAll('path.nv-area'))
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d,i) { return y(getY(d,i)) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- d3.transition(areaPaths)
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d,i) { return y(getY(d,i)) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path.nv-line'))
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
- d3.transition(linePaths)
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'padData');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.lineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-//set margin.right to 23 to fit dates on the x-axis within the chart
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- // container.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.linePlusBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.lineWithFocusChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- container.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- d3.transition(focusLinesWrap).call(lines);
-
-
- // Update Main (Focus) Axes
- d3.transition(g.select('.nv-focus .nv-x.nv-axis'))
- .call(xAxis);
- d3.transition(g.select('.nv-focus .nv-y.nv-axis'))
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.linePlusBarWithFocusChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- d3.transition(bars2Wrap).call(bars2);
- d3.transition(lines2Wrap).call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- d3.transition(g.select('.nv-context .nv-y1.nv-axis'))
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-context .nv-y2.nv-axis'))
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- d3.transition(focusBarsWrap).call(bars);
- d3.transition(focusLinesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-focus .nv-y1.nv-axis'))
- .call(y1Axis);
- d3.transition(g.select('.nv-focus .nv-y2.nv-axis'))
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , drawTime = 500
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableWidth], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
-
-
- groups.exit()
- .selectAll('rect.nv-bar')
- .transition()
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- //.style('fill', barColor)
- //.style('stroke', barColor)
- //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
-
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- if(d.y == null) return 0;
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .each('end', function() {
- d3.select(this).transition().duration(drawTime)
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- })
- else
- d3.transition(bars).duration(drawTime)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .each('end', function() {
- d3.select(this).transition().duration(drawTime)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- if(d.y == null) return 0;
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.drawTime = function(_) {
- if (!arguments.length) return drawTime;
- drawTime = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , logScale = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph, logScale) {
- //alert(y+ " " + logScale);
- if(logScale) {
- var fmt = d3.format(',.2f');
- return '<h3>' + key + '</h3>' +
- '<p>' + fmt(Math.pow(10,y)) + ' on ' + x + '</p>'
- } else {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
-
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- ;
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart, logScale);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .attr('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay', 'barColor');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarHorizontal = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range([(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range([0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- //bars.selectAll('text').remove();
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- //.style('fill', barColor)
- //.style('stroke', barColor)
- //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('transform', function(d,i) {
- //return 'translate(' + y(d.y0) + ',0)'
- //return 'translate(' + y(d.y0) + ',' + x(getX(d,i)) + ')'
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarHorizontalChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , logScale = false
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph, logScale) {
- //alert(y+ " " + logScale + " " + Math.pow(10,y) + " " + Math.pow(10,y).toFixed(0));
- if(logScale) {
- //var fmt = d3.format(',.2f');
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + yAxis.tickFormat()(Math.pow(10,y)) + '</p>'
- } else {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
-
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- //var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- //alert(offsetElement.offsetLeft + " " + e.pos[0]);
- var leftPos = 0;
- if(e.pos[0] >=200) leftPos = 200;
- else leftPos = e.pos[0];
- if(logScale)
- y = multibar.y()(e.point, e.pointIndex);
- else
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex))
- var left = leftPos + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart, logScale);
- //alert("from tooltip " + multibar.y()(e.point, e.pointIndex));
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.multiChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x, y; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- if (series2.length <= 0) {
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.series').classed('disabled', false);
- return d;
- });
- }
- chart.update();
- }
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
-
-nv.models.ohlcBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.pie = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getValues = function(d) { return d.values }
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data([getValues(data[0])]);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc)
- .attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return (d.value && percent > labelThreshold) ? getX(d.data) : '';
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- if (!arguments.length) return getValues;
- getValues = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
-nv.models.pieChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = true
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data[0].map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data[0] || !data[0].length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(pie.values()(data[0]))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum(data);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!pie.values()(data[0]).filter(function(d) { return !d.disabled }).length) {
- pie.values()(data[0]).map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data[0].map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data[0].forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'donut', 'donutRatio', 'labelThreshold');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatter = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range([(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range([availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex) + Math.random() * 1e-7;
- var pY = getY(point,pointIndex) + Math.random() * 1e-7;
-
- return [x(pX),
- y(pY),
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- pointPaths
- .on('click', function(d) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- })
- .on('mouseover', function(d) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- })
- .on('mouseout', function(d, i) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: d.point
- });
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- d3.transition(groups)
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .attr('cx', function(d,i) { return x0(getX(d,i)) })
- .attr('cy', function(d,i) { return y0(getY(d,i)) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return x(getX(d,i)) })
- .attr('cy', function(d,i) { return y(getY(d,i)) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true);
- });
- points.transition()
- .attr('cx', function(d,i) { return x(getX(d,i)) })
- .attr('cy', function(d,i) { return y(getY(d,i)) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- d3.transition(groups.exit().selectAll('path.nv-point'))
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true);
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive)
- d3.select('.nv-chart-' + id + ' .nv-series-' + d.seriesIndex + ' .nv-point-' + d.pointIndex)
- .classed('hover', true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive)
- d3.select('.nv-chart-' + id + ' .nv-series-' + d.seriesIndex + ' .nv-point-' + d.pointIndex)
- .classed('hover', false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatterChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- //, tooltip = function(key, x, y) { return '<h3>' + key + '</h3>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient('left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
- .xDomain(null)
- .yDomain(null)
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
-
- //Adjust for x and y padding
- if (xPadding) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(-' + distY.size() + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- /*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- chart(selection);
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- chart(selection);
- });
- */
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatterPlusLineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- //, tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient('left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background')
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) { return d });
-
- var reglines = regWrap.enter()
- .append('g').attr('class', 'nv-regLines')
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- //d3.transition(regWrap.selectAll('.nv-regLines line'))
- regWrap.selectAll('.nv-regLines line')
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) { return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(-' + distY.size() + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- /*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- chart(selection);
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- chart(selection);
- });
- */
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.sparkline = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range([availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.sparklinePlus = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.stackedArea = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTooltipFormat = d3.format(',.3f')
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
-
- // Injecting point index into each point because d3.layout.stack().out does not give index
- // ***Also storing getY(d,i) as stackedY so that it can be set to 0 if series is disabled
- data = data.map(function(aseries, i) {
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.stackedY = aseries.disabled ? 0 : getY(d,j);
- return d;
- })
- return aseries;
- });
-
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(function(d) { return d.stackedY })
- .out(function(d, y0, y) {
- d.display = {
- y: y,
- y0: y0
- };
- })
- (data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- //d3.transition(scatterWrap).call(scatter);
- scatterWrap.call(scatter);
-
-
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y + d.display.y0) })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
- //.data(function(d) { return d }, function(d) { return d.key });
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- //d3.transition(path.exit())
- path.exit()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){ return d.color || color(d, i) })
- .style('stroke', function(d,i){ return d.color || color(d, i) });
- //d3.transition(path)
- path
- .attr('d', function(d,i) { return area(d.values,i) })
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return interpolate;
-
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.stackedAreaChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , yAxisTooltipFormat = d3.format(',.3f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient('left')
- ;
- stacked.scatter
- .pointActive(function(d) {
- //console.log(stacked.y()(d), !!Math.round(stacked.y()(d) * 100));
- return !!Math.round(stacked.y()(d) * 100);
- })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- //y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- y = yAxisTooltipFormat(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth - controlWidth );
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Stacked', disabled: stacked.offset() != 'zero' },
- { key: 'Stream', disabled: stacked.offset() != 'wiggle' },
- { key: 'Expanded', disabled: stacked.offset() != 'expand' }
- ];
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
- //d3.transition(stackedWrap).call(stacked);
- stackedWrap.call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
-
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat(stacked.offset() == 'expand' ? d3.format('%') : yAxisTickFormat);
-
- //d3.transition(g.select('.nv-y.nv-axis'))
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data = data.map(function(d) {
- d.disabled = false;
- return d
- });
- else
- data = data.map(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- return d
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Stacked':
- stacked.style('stack');
- break;
- case 'Stream':
- stacked.style('stream');
- break;
- case 'Expanded':
- stacked.style('expand');
- break;
- }
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'sizeDomain', 'interactive', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return getWidth;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return getHeight;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.yAxisTooltipFormat = function(_) {
- if (!arguments.length) return yAxisTooltipFormat;
- yAxisTooltipFormat = _;
- return chart;
- };
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
- //============================================================
-
- return chart;
-}
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.min.js
deleted file mode 100644
index 892379c4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/nv.d3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){function t(e,t){return(new Date(t,e+1,0)).getDate()}function n(e,t,n){return function(r,i,s){var o=e(r),u=[];if(o<r)t(o);if(s>1){while(o<i){var a=new Date(+o);if(n(a)%s===0)u.push(a);t(o)}}else{while(o<i){u.push(new Date(+o));t(o)}}return u}}var e=window.nv||{};e.version="1.1.13b";e.dev=true;window.nv=e;e.tooltip={};e.utils=e.utils||{};e.models={};e.charts={};e.graphs=[];e.logs={};e.dispatch=d3.dispatch("render_start","render_end");if(e.dev){e.dispatch.on("render_start",function(t){e.logs.startTime=+(new Date)});e.dispatch.on("render_end",function(t){e.logs.endTime=+(new Date);e.logs.totalTime=e.logs.endTime-e.logs.startTime;e.log("total",e.logs.totalTime)})}e.log=function(){if(e.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(e.dev&&typeof console.log=="function"&&Function.prototype.bind){var t=Function.prototype.bind.call(console.log,console);t.apply(console,arguments)}return arguments[arguments.length-1]};e.render=function(n){n=n||1;e.render.active=true;e.dispatch.render_start();setTimeout(function(){var t,r;for(var i=0;i<n&&(r=e.render.queue[i]);i++){t=r.generate();if(typeof r.callback==typeof Function)r.callback(t);e.graphs.push(t)}e.render.queue.splice(0,i);if(e.render.queue.length)setTimeout(arguments.callee,0);else{e.render.active=false;e.dispatch.render_end()}},0)};e.render.active=false;e.render.queue=[];e.addGraph=function(t){if(typeof arguments[0]===typeof Function)t={generate:arguments[0],callback:arguments[1]};e.render.queue.push(t);if(!e.render.active)e.render()};e.identity=function(e){return e};e.strip=function(e){return e.replace(/(\s|&)/g,"")};d3.time.monthEnd=function(e){return new Date(e.getFullYear(),e.getMonth(),0)};d3.time.monthEnds=n(d3.time.monthEnd,function(e){e.setUTCDate(e.getUTCDate()+1);e.setDate(t(e.getMonth()+1,e.getFullYear()))},function(e){return e.getMonth()});e.interactiveGuideline=function(){"use strict";function c(o){o.each(function(o){function g(){var e=d3.mouse(this);var n=e[0];var r=e[1];var o=true;var a=false;if(l){n=d3.event.offsetX;r=d3.event.offsetY;if(d3.event.target.tagName!=="svg")o=false;if(d3.event.target.className.baseVal.match("nv-legend"))a=true}if(o){n-=i.left;r-=i.top}if(n<0||r<0||n>p||r>d||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||a){if(l){if(d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(t.nvPointerEventsClass)){return}}u.elementMouseout({mouseX:n,mouseY:r});c.renderGuideLine(null);return}var f=s.invert(n);u.elementMousemove({mouseX:n,mouseY:r,pointXValue:f});if(d3.event.type==="dblclick"){u.elementDblclick({mouseX:n,mouseY:r,pointXValue:f})}}var h=d3.select(this);var p=n||960,d=r||400;var v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([o]);var m=v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");m.append("g").attr("class","nv-interactiveGuideLine");if(!f){return}f.on("mousemove",g,true).on("mouseout",g,true).on("dblclick",g);c.renderGuideLine=function(t){if(!a)return;var n=v.select(".nv-interactiveGuideLine").selectAll("line").data(t!=null?[e.utils.NaNtoZero(t)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",function(e){return e}).attr("x2",function(e){return e}).attr("y1",d).attr("y2",0);n.exit().remove()}})}var t=e.models.tooltip();var n=null,r=null,i={left:0,top:0},s=d3.scale.linear(),o=d3.scale.linear(),u=d3.dispatch("elementMousemove","elementMouseout","elementDblclick"),a=true,f=null;var l=navigator.userAgent.indexOf("MSIE")!==-1;c.dispatch=u;c.tooltip=t;c.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.left=typeof e.left!="undefined"?e.left:i.left;return c};c.width=function(e){if(!arguments.length)return n;n=e;return c};c.height=function(e){if(!arguments.length)return r;r=e;return c};c.xScale=function(e){if(!arguments.length)return s;s=e;return c};c.showGuideLine=function(e){if(!arguments.length)return a;a=e;return c};c.svgContainer=function(e){if(!arguments.length)return f;f=e;return c};return c};e.interactiveBisect=function(e,t,n){"use strict";if(!e instanceof Array)return null;if(typeof n!=="function")n=function(e,t){return e.x};var r=d3.bisector(n).left;var i=d3.max([0,r(e,t)-1]);var s=n(e[i],i);if(typeof s==="undefined")s=i;if(s===t)return i;var o=d3.min([i+1,e.length-1]);var u=n(e[o],o);if(typeof u==="undefined")u=o;if(Math.abs(u-t)>=Math.abs(s-t))return i;else return o};e.nearestValueIndex=function(e,t,n){"use strict";var r=Infinity,i=null;e.forEach(function(e,s){var o=Math.abs(t-e);if(o<=r&&o<n){r=o;i=s}});return i};(function(){"use strict";window.nv.tooltip={};window.nv.models.tooltip=function(){function y(){if(a){var e=d3.select(a);if(e.node().tagName!=="svg"){e=e.select("svg")}var t=e.node()?e.attr("viewBox"):null;if(t){t=t.split(" ");var n=parseInt(e.style("width"))/t[2];l.left=l.left*n;l.top=l.top*n}}}function b(e){var t;if(a)t=d3.select(a);else t=d3.select("body");var n=t.select(".nvtooltip");if(n.node()===null){n=t.append("div").attr("class","nvtooltip "+(u?u:"xy-tooltip")).attr("id",h)}n.node().innerHTML=e;n.style("top",0).style("left",0).style("opacity",0);n.selectAll("div, table, td, tr").classed(p,true);n.classed(p,true);return n.node()}function w(){if(!c)return;if(!g(n))return;y();var t=l.left;var u=o!=null?o:l.top;var h=b(m(n));f=h;if(a){var p=a.getElementsByTagName("svg")[0];var d=p?p.getBoundingClientRect():a.getBoundingClientRect();var v={left:0,top:0};if(p){var E=p.getBoundingClientRect();var S=a.getBoundingClientRect();var x=E.top;if(x<0){var T=a.getBoundingClientRect();x=Math.abs(x)>T.height?0:x}v.top=Math.abs(x-S.top);v.left=Math.abs(E.left-S.left)}t+=a.offsetLeft+v.left-2*a.scrollLeft;u+=a.offsetTop+v.top-2*a.scrollTop}if(s&&s>0){u=Math.floor(u/s)*s}e.tooltip.calcTooltipPosition([t,u],r,i,h);return w}var t=null,n=null,r="w",i=50,s=25,o=null,u=null,a=null,f=null,l={left:null,top:null},c=true,h="nvtooltip-"+Math.floor(Math.random()*1e5);var p="nv-pointer-events-none";var d=function(e,t){return e};var v=function(e){return e};var m=function(e){if(t!=null)return t;if(e==null)return"";var n=d3.select(document.createElement("table"));var r=n.selectAll("thead").data([e]).enter().append("thead");r.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",true).html(v(e.value));var i=n.selectAll("tbody").data([e]).enter().append("tbody");var s=i.selectAll("tr").data(function(e){return e.series}).enter().append("tr").classed("highlight",function(e){return e.highlight});s.append("td").classed("legend-color-guide",true).append("div").style("background-color",function(e){return e.color});s.append("td").classed("key",true).html(function(e){return e.key});s.append("td").classed("value",true).html(function(e,t){return d(e.value,t)});s.selectAll("td").each(function(e){if(e.highlight){var t=d3.scale.linear().domain([0,1]).range(["#fff",e.color]);var n=.6;d3.select(this).style("border-bottom-color",t(n)).style("border-top-color",t(n))}});var o=n.node().outerHTML;if(e.footer!==undefined)o+="<div class='footer'>"+e.footer+"</div>";return o};var g=function(e){if(e&&e.series&&e.series.length>0)return true;return false};w.nvPointerEventsClass=p;w.content=function(e){if(!arguments.length)return t;t=e;return w};w.tooltipElem=function(){return f};w.contentGenerator=function(e){if(!arguments.length)return m;if(typeof e==="function"){m=e}return w};w.data=function(e){if(!arguments.length)return n;n=e;return w};w.gravity=function(e){if(!arguments.length)return r;r=e;return w};w.distance=function(e){if(!arguments.length)return i;i=e;return w};w.snapDistance=function(e){if(!arguments.length)return s;s=e;return w};w.classes=function(e){if(!arguments.length)return u;u=e;return w};w.chartContainer=function(e){if(!arguments.length)return a;a=e;return w};w.position=function(e){if(!arguments.length)return l;l.left=typeof e.left!=="undefined"?e.left:l.left;l.top=typeof e.top!=="undefined"?e.top:l.top;return w};w.fixedTop=function(e){if(!arguments.length)return o;o=e;return w};w.enabled=function(e){if(!arguments.length)return c;c=e;return w};w.valueFormatter=function(e){if(!arguments.length)return d;if(typeof e==="function"){d=e}return w};w.headerFormatter=function(e){if(!arguments.length)return v;if(typeof e==="function"){v=e}return w};w.id=function(){return h};return w};e.tooltip.show=function(t,n,r,i,s,o){var u=document.createElement("div");u.className="nvtooltip "+(o?o:"xy-tooltip");var a=s;if(!s||s.tagName.match(/g|svg/i)){a=document.getElementsByTagName("body")[0]}u.style.left=0;u.style.top=0;u.style.opacity=0;u.innerHTML=n;a.appendChild(u);if(s){t[0]=t[0]-s.scrollLeft;t[1]=t[1]-s.scrollTop}e.tooltip.calcTooltipPosition(t,r,i,u)};e.tooltip.findFirstNonSVGParent=function(e){while(e.tagName.match(/^g|svg$/i)!==null){e=e.parentNode}return e};e.tooltip.findTotalOffsetTop=function(e,t){var n=t;do{if(!isNaN(e.offsetTop)){n+=e.offsetTop}}while(e=e.offsetParent);return n};e.tooltip.findTotalOffsetLeft=function(e,t){var n=t;do{if(!isNaN(e.offsetLeft)){n+=e.offsetLeft}}while(e=e.offsetParent);return n};e.tooltip.calcTooltipPosition=function(t,n,r,i){var s=parseInt(i.offsetHeight),o=parseInt(i.offsetWidth),u=e.utils.windowSize().width,a=e.utils.windowSize().height,f=window.pageYOffset,l=window.pageXOffset,c,h;a=window.innerWidth>=document.body.scrollWidth?a:a-16;u=window.innerHeight>=document.body.scrollHeight?u:u-16;n=n||"s";r=r||20;var p=function(t){return e.tooltip.findTotalOffsetTop(t,h)};var d=function(t){return e.tooltip.findTotalOffsetLeft(t,c)};switch(n){case"e":c=t[0]-o-r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v<l)c=t[0]+r>l?t[0]+r:l-v+c;if(m<f)h=f-m+h;if(m+s>f+a)h=f+a-m+h-s;break;case"w":c=t[0]+r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v+o>u)c=t[0]-o-r;if(m<f)h=f+5;if(m+s>f+a)h=f+a-m+h-s;break;case"n":c=t[0]-o/2-5;h=t[1]+r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(m+s>f+a)h=f+a-m+h-s;break;case"s":c=t[0]-o/2;h=t[1]-s-r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(f>m)h=f;break;case"none":c=t[0];h=t[1]-r;var v=d(i);var m=p(i);break}i.style.left=c+"px";i.style.top=h+"px";i.style.opacity=1;i.style.position="absolute";return i};e.tooltip.cleanup=function(){var e=document.getElementsByClassName("nvtooltip");var t=[];while(e.length){t.push(e[0]);e[0].style.transitionDelay="0 !important";e[0].style.opacity=0;e[0].className="nvtooltip-pending-removal"}setTimeout(function(){while(t.length){var e=t.pop();e.parentNode.removeChild(e)}},500)}})();e.utils.windowSize=function(){var e={width:640,height:480};if(document.body&&document.body.offsetWidth){e.width=document.body.offsetWidth;e.height=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){e.width=document.documentElement.offsetWidth;e.height=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){e.width=window.innerWidth;e.height=window.innerHeight}return e};e.utils.windowResize=function(e){if(e===undefined)return;var t=window.onresize;window.onresize=function(n){if(typeof t=="function")t(n);e(n)}};e.utils.getColor=function(t){if(!arguments.length)return e.utils.defaultColor();if(Object.prototype.toString.call(t)==="[object Array]")return function(e,n){return e.color||t[n%t.length]};else return t};e.utils.defaultColor=function(){var e=d3.scale.category20().range();return function(t,n){return t.color||e[n%e.length]}};e.utils.customTheme=function(e,t,n){t=t||function(e){return e.key};n=n||d3.scale.category20().range();var r=n.length;return function(i,s){var o=t(i);if(!r)r=n.length;if(typeof e[o]!=="undefined")return typeof e[o]==="function"?e[o]():e[o];else return n[--r]}};e.utils.pjax=function(t,n){function r(r){d3.html(r,function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i);e.utils.pjax(t,n)})}d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href);r(this.href);d3.event.preventDefault()});d3.select(window).on("popstate",function(){if(d3.event.state)r(d3.event.state)})};e.utils.calcApproxTextWidth=function(e){if(e instanceof d3.selection){var t=parseInt(e.style("font-size").replace("px",""));var n=e.text().length;return n*t*.5}return 0};e.utils.NaNtoZero=function(e){if(typeof e!=="number"||isNaN(e)||e===null||e===Infinity)return 0;return e};e.utils.optionsFunc=function(e){if(e){d3.map(e).forEach(function(e,t){if(typeof this[e]==="function"){this[e](t)}}.bind(this))}return this};e.models.axis=function(){"use strict";function g(e){e.each(function(e){var i=d3.select(this);var g=i.selectAll("g.nv-wrap.nv-axis").data([e]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(p!==null)t.ticks(p);else if(t.orient()=="top"||t.orient()=="bottom")t.ticks(Math.abs(s.range()[1]-s.range()[0])/100);w.transition().call(t);m=m||t.scale();var E=t.tickFormat();if(E==null){E=m.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([o||null]);S.exit().remove();switch(t.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+s(e)+",0)"}).select("text").attr("dy","0em").attr("y",-t.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+s.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(f%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(f*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data([s.domain()[0],s.domain()[s.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",t.tickPadding()).attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f?f%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"})}if(c)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(n.right,r)+12:-10).attr("x",l?s.range()[0]/2:t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+s(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",t.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(n.left,r)+v:-10).attr("x",l?-s.range()[0]/2:-t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+m(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-t.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(u&&(t.orient()==="left"||t.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<s.range()[1]+10||s(e)>s.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(s.domain()[0]==s.domain()[1]&&s.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(u&&(t.orient()==="top"||t.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(s(e)-this.getBBox().width-4);else A.push(s(e)+this.getBBox().width+4)}catch(n){if(t)A.push(s(e)-4);else A.push(s(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<A[0]||s(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(a)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);m=s.copy()});return g}var t=d3.svg.axis();var n={top:0,right:0,bottom:0,left:0},r=75,i=60,s=d3.scale.linear(),o=null,u=true,a=true,f=0,l=true,c=false,h=false,p=null,d=false,v=12;t.scale(s).orient("bottom").tickFormat(function(e){return e});var m;g.axis=t;d3.rebind(g,t,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(g,s,"domain","range","rangeBand","rangeBands");g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return g};g.width=function(e){if(!arguments.length)return r;r=e;return g};g.ticks=function(e){if(!arguments.length)return p;p=e;return g};g.height=function(e){if(!arguments.length)return i;i=e;return g};g.axisLabel=function(e){if(!arguments.length)return o;o=e;return g};g.showMaxMin=function(e){if(!arguments.length)return u;u=e;return g};g.logScale=function(e){if(!arguments.length)return d;d=e;return g};g.highlightZero=function(e){if(!arguments.length)return a;a=e;return g};g.scale=function(e){if(!arguments.length)return s;s=e;t.scale(s);h=typeof s.rangeBands==="function";d3.rebind(g,s,"domain","range","rangeBand","rangeBands");return g};g.rotateYLabel=function(e){if(!arguments.length)return l;l=e;return g};g.rotateLabels=function(e){if(!arguments.length)return f;f=e;return g};g.staggerLabels=function(e){if(!arguments.length)return c;c=e;return g};g.axisLabelDistance=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.bullet=function(){"use strict";function m(e){e.each(function(e,n){var p=c-t.left-t.right,m=h-t.top-t.bottom,g=d3.select(this);var y=i.call(this,e,n).slice().sort(d3.descending),b=s.call(this,e,n).slice().sort(d3.descending),w=o.call(this,e,n).slice().sort(d3.descending),E=u.call(this,e,n).slice(),S=a.call(this,e,n).slice(),x=f.call(this,e,n).slice();var T=d3.scale.linear().domain(d3.extent(d3.merge([l,y]))).range(r?[p,0]:[0,p]);var N=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(T.range());this.__chart__=T;var C=d3.min(y),k=d3.max(y),L=y[1];var A=g.selectAll("g.nv-wrap.nv-bullet").data([e]);var O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet");var M=O.append("g");var _=A.select("g");M.append("rect").attr("class","nv-range nv-rangeMax");M.append("rect").attr("class","nv-range nv-rangeAvg");M.append("rect").attr("class","nv-range nv-rangeMin");M.append("rect").attr("class","nv-measure");M.append("path").attr("class","nv-markerTriangle");A.attr("transform","translate("+t.left+","+t.top+")");var D=function(e){return Math.abs(N(e)-N(0))},P=function(e){return Math.abs(T(e)-T(0))};var H=function(e){return e<0?N(e):N(0)},B=function(e){return e<0?T(e):T(0)};_.select("rect.nv-rangeMax").attr("height",m).attr("width",P(k>0?k:C)).attr("x",B(k>0?k:C)).datum(k>0?k:C);_.select("rect.nv-rangeAvg").attr("height",m).attr("width",P(L)).attr("x",B(L)).datum(L);_.select("rect.nv-rangeMin").attr("height",m).attr("width",P(k)).attr("x",B(k)).attr("width",P(k>0?C:k)).attr("x",B(k>0?C:k)).datum(k>0?C:k);_.select("rect.nv-measure").style("fill",d).attr("height",m/3).attr("y",m/3).attr("width",w<0?T(0)-T(w[0]):T(w[0])-T(0)).attr("x",B(w)).on("mouseover",function(){v.elementMouseover({value:w[0],label:x[0]||"Current",pos:[T(w[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:w[0],label:x[0]||"Current"})});var j=m/6;if(b[0]){_.selectAll("path.nv-markerTriangle").attr("transform",function(e){return"translate("+T(b[0])+","+m/2+")"}).attr("d","M0,"+j+"L"+j+","+ -j+" "+ -j+","+ -j+"Z").on("mouseover",function(){v.elementMouseover({value:b[0],label:S[0]||"Previous",pos:[T(b[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:b[0],label:S[0]||"Previous"})})}else{_.selectAll("path.nv-markerTriangle").remove()}A.selectAll(".nv-range").on("mouseover",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseover({value:e,label:n,pos:[T(e),m/2]})}).on("mouseout",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseout({value:e,label:n})})});return m}var t={top:0,right:0,bottom:0,left:0},n="left",r=false,i=function(e){return e.ranges},s=function(e){return e.markers},o=function(e){return e.measures},u=function(e){return e.rangeLabels?e.rangeLabels:[]},a=function(e){return e.markerLabels?e.markerLabels:[]},f=function(e){return e.measureLabels?e.measureLabels:[]},l=[0],c=380,h=30,p=null,d=e.utils.getColor(["#1f77b4"]),v=d3.dispatch("elementMouseover","elementMouseout");m.dispatch=v;m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return i;i=e;return m};m.markers=function(e){if(!arguments.length)return s;s=e;return m};m.measures=function(e){if(!arguments.length)return o;o=e;return m};m.forceX=function(e){if(!arguments.length)return l;l=e;return m};m.width=function(e){if(!arguments.length)return c;c=e;return m};m.height=function(e){if(!arguments.length)return h;h=e;return m};m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.tickFormat=function(e){if(!arguments.length)return p;p=e;return m};m.color=function(t){if(!arguments.length)return d;d=e.utils.getColor(t);return m};return m};e.models.bulletChart=function(){"use strict";function m(e){e.each(function(n,h){var g=d3.select(this);var y=(a||parseInt(g.style("width"))||960)-i.left-i.right,b=f-i.top-i.bottom,w=this;m.update=function(){m(e)};m.container=this;if(!n||!s.call(this,n,h)){var E=g.selectAll(".nv-noData").data([p]);E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");E.attr("x",i.left+y/2).attr("y",18+i.top+b/2).text(function(e){return e});return m}else{g.selectAll(".nv-noData").remove()}var S=s.call(this,n,h).slice().sort(d3.descending),x=o.call(this,n,h).slice().sort(d3.descending),T=u.call(this,n,h).slice().sort(d3.descending);var N=g.selectAll("g.nv-wrap.nv-bulletChart").data([n]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-bulletWrap");k.append("g").attr("class","nv-titles");N.attr("transform","translate("+i.left+","+i.top+")");var A=d3.scale.linear().domain([0,Math.max(S[0],x[0],T[0])]).range(r?[y,0]:[0,y]);var O=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(A.range());this.__chart__=A;var M=function(e){return Math.abs(O(e)-O(0))},_=function(e){return Math.abs(A(e)-A(0))};var D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-i.top-i.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(e){return e.title});D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(e){return e.subtitle});t.width(y).height(b);var P=L.select(".nv-bulletWrap");d3.transition(P).call(t);var H=l||A.tickFormat(y/100);var B=L.selectAll("g.nv-tick").data(A.ticks(y/50),function(e){return this.textContent||H(e)});var j=B.enter().append("g").attr("class","nv-tick").attr("transform",function(e){return"translate("+O(e)+",0)"}).style("opacity",1e-6);j.append("line").attr("y1",b).attr("y2",b*7/6);j.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",b*7/6).text(H);var F=d3.transition(B).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1);F.select("line").attr("y1",b).attr("y2",b*7/6);F.select("text").attr("y",b*7/6);d3.transition(B.exit()).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1e-6).remove();d.on("tooltipShow",function(e){e.key=n.title;if(c)v(e,w.parentNode)})});d3.timer.flush();return m}var t=e.models.bullet();var n="left",r=false,i={top:5,right:40,bottom:20,left:120},s=function(e){return e.ranges},o=function(e){return e.markers},u=function(e){return e.measures},a=null,f=55,l=null,c=true,h=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},p="No Data Available.",d=d3.dispatch("tooltipShow","tooltipHide");var v=function(t,n){var r=t.pos[0]+(n.offsetLeft||0)+i.left,s=t.pos[1]+(n.offsetTop||0)+i.top,o=h(t.key,t.label,t.value,t,m);e.tooltip.show([r,s],o,t.value<0?"e":"w",null,n)};t.dispatch.on("elementMouseover.tooltip",function(e){d.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){d.tooltipHide(e)});d.on("tooltipHide",function(){if(c)e.tooltip.cleanup()});m.dispatch=d;m.bullet=t;d3.rebind(m,t,"color");m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return s;s=e;return m};m.markers=function(e){if(!arguments.length)return o;o=e;return m};m.measures=function(e){if(!arguments.length)return u;u=e;return m};m.width=function(e){if(!arguments.length)return a;a=e;return m};m.height=function(e){if(!arguments.length)return f;f=e;return m};m.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return m};m.tickFormat=function(e){if(!arguments.length)return l;l=e;return m};m.tooltips=function(e){if(!arguments.length)return c;c=e;return m};m.tooltipContent=function(e){if(!arguments.length)return h;h=e;return m};m.noData=function(e){if(!arguments.length)return p;p=e;return m};return m};e.models.cumulativeLineChart=function(){"use strict";function _(b){b.each(function(b){function q(e,t){d3.select(_.container).style("cursor","ew-resize")}function R(e,t){O.x=d3.event.x;O.i=Math.round(A.invert(O.x));rt()}function U(e,t){d3.select(_.container).style("cursor","auto");x.index=O.i;k.stateChange(x)}function rt(){nt.data([O]);var e=_.transitionDuration();_.transitionDuration(0);_.update();_.transitionDuration(e)}var P=d3.select(this).classed("nv-chart-"+S,true),H=this;var B=(f||parseInt(P.style("width"))||960)-u.left-u.right,j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom;_.update=function(){P.transition().duration(L).call(_)};_.container=this;x.disabled=b.map(function(e){return!!e.disabled});if(!T){var F;T={};for(F in x){if(x[F]instanceof Array)T[F]=x[F].slice(0);else T[F]=x[F]}}var I=d3.behavior.drag().on("dragstart",q).on("drag",R).on("dragend",U);if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var z=P.selectAll(".nv-noData").data([N]);z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");z.attr("x",u.left+B/2).attr("y",u.top+j/2).text(function(e){return e});return _}else{P.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();if(!y){var W=b.filter(function(e){return!e.disabled}).map(function(e,n){var r=d3.extent(e.values,t.y());if(r[0]<-.95)r[0]=-.95;return[(r[0]-r[1])/(1+r[1]),(r[1]-r[0])/(1+r[0])]});var X=[d3.min(W,function(e){return e[0]}),d3.max(W,function(e){return e[1]})];t.yDomain(X)}else{t.yDomain(null)}A.domain([0,b[0].values.length-1]).range([0,B]).clamp(true);var b=D(O.i,b);var V=g?"none":"all";var $=P.selectAll("g.nv-wrap.nv-cumulativeLine").data([b]);var J=$.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g");var K=$.select("g");J.append("g").attr("class","nv-interactive");J.append("g").attr("class","nv-x nv-axis").style("pointer-events","none");J.append("g").attr("class","nv-y nv-axis");J.append("g").attr("class","nv-background");J.append("g").attr("class","nv-linesWrap").style("pointer-events",V);J.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none");J.append("g").attr("class","nv-legendWrap");J.append("g").attr("class","nv-controlsWrap");if(c){i.width(B);K.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom}K.select(".nv-legendWrap").attr("transform","translate(0,"+ -u.top+")")}if(m){var Q=[{key:"Re-scale y-axis",disabled:!y}];s.width(140).color(["#444","#444","#444"]);K.select(".nv-controlsWrap").datum(Q).attr("transform","translate(0,"+ -u.top+")").call(s)}$.attr("transform","translate("+u.left+","+u.top+")");if(d){K.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)")}var G=b.filter(function(e){return e.tempDisabled});$.select(".tempDisabled").remove();if(G.length){$.append("text").attr("class","tempDisabled").attr("x",B/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(e){return e.key}).join(", ")+" values cannot be calculated for this time period.")}if(g){o.width(B).height(j).margin({left:u.left,top:u.top}).svgContainer(P).xScale(w);$.select(".nv-interactive").call(o)}J.select(".nv-background").append("rect");K.select(".nv-background rect").attr("width",B).attr("height",j);t.y(function(e){return e.display.y}).width(B).height(j).color(b.map(function(e,t){return e.color||a(e,t)}).filter(function(e,t){return!b[t].disabled&&!b[t].tempDisabled}));var Y=K.select(".nv-linesWrap").datum(b.filter(function(e){return!e.disabled&&!e.tempDisabled}));Y.call(t);b.forEach(function(e,t){e.seriesIndex=t});var Z=b.filter(function(e){return!e.disabled&&!!C(e)});var et=K.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(e){return e.key});var tt=function(e){var t=E(C(e));if(t<0)return 0;if(t>j)return j;return t};et.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(e,n){return t.color()(e,e.seriesIndex)}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.style("stroke-opacity",function(e){var t=E(C(e));if(t<0||t>j)return 0;return 1}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.exit().remove();var nt=Y.selectAll(".nv-indexLine").data([O]);nt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(I);nt.attr("transform",function(e){return"translate("+A(e.i)+",0)"}).attr("height",j);if(h){n.scale(w).ticks(Math.min(b[0].values.length,B/70)).tickSize(-j,0);K.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")");d3.transition(K.select(".nv-x.nv-axis")).call(n)}if(p){r.scale(E).ticks(j/36).tickSize(-B,0);d3.transition(K.select(".nv-y.nv-axis")).call(r)}K.select(".nv-background rect").on("click",function(){O.x=d3.mouse(this)[0];O.i=Math.round(A.invert(O.x));x.index=O.i;k.stateChange(x);rt()});t.dispatch.on("elementClick",function(e){O.i=e.pointIndex;O.x=A(O.i);x.index=O.i;k.stateChange(x);rt()});s.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled;y=!e.disabled;x.rescaleY=y;k.stateChange(x);_.update()});i.dispatch.on("stateChange",function(e){x.disabled=e.disabled;k.stateChange(x);_.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,f,l,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,_.x());t.highlightPoint(r,f,true);var o=n.values[f];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof l==="undefined")l=_.xScale()(_.x()(o,f));c.push({key:n.key,value:_.y()(o,f),color:a(n,n.seriesIndex)})});if(c.length>2){var h=_.yScale().invert(i.mouseY);var p=Math.abs(_.yScale().domain()[0]-_.yScale().domain()[1]);var d=.03*p;var m=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(m!==null)c[m].highlight=true}var g=n.tickFormat()(_.x()(s,f),f);o.tooltip.position({left:l+u.left,top:i.mouseY+u.top}).chartContainer(H.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:g,series:c})();o.renderGuideLine(l)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(v)M(e,H.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});x.disabled=e.disabled}if(typeof e.index!=="undefined"){O.i=e.index;O.x=A(O.i);x.index=e.index;nt.data([O])}if(typeof e.rescaleY!=="undefined"){y=e.rescaleY}_.update()})});return _}function D(e,n){return n.map(function(n,r){if(!n.values){return n}var i=t.y()(n.values[e],e);if(i<-.95){n.tempDisabled=true;return n}n.tempDisabled=false;n.values=n.values.map(function(e,n){e.display={y:(t.y()(e,n)-i)/(1+i)};return e});return n})}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:30,bottom:50,left:60},a=e.utils.defaultColor(),f=null,l=null,c=true,h=true,p=true,d=false,v=true,m=true,g=false,y=true,b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},w,E,S=t.id(),x={index:0,rescaleY:y},T=null,N="No Data Available.",C=function(e){return e.average},k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250;n.orient("bottom").tickPadding(7);r.orient(d?"right":"left");s.updateState(false);var A=d3.scale.linear(),O={i:0,x:0};var M=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,_);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});_.dispatch=k;_.lines=t;_.legend=i;_.xAxis=n;_.yAxis=r;_.interactiveLayer=o;d3.rebind(_,t,"defined","isArea","x","y","xScale","yScale","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id");_.options=e.utils.optionsFunc.bind(_);_.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return _};_.width=function(e){if(!arguments.length)return f;f=e;return _};_.height=function(e){if(!arguments.length)return l;l=e;return _};_.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);i.color(a);return _};_.rescaleY=function(e){if(!arguments.length)return y;y=e;return _};_.showControls=function(e){if(!arguments.length)return m;m=e;return _};_.useInteractiveGuideline=function(e){if(!arguments.length)return g;g=e;if(e===true){_.interactive(false);_.useVoronoi(false)}return _};_.showLegend=function(e){if(!arguments.length)return c;c=e;return _};_.showXAxis=function(e){if(!arguments.length)return h;h=e;return _};_.showYAxis=function(e){if(!arguments.length)return p;p=e;return _};_.rightAlignYAxis=function(e){if(!arguments.length)return d;d=e;r.orient(e?"right":"left");return _};_.tooltips=function(e){if(!arguments.length)return v;v=e;return _};_.tooltipContent=function(e){if(!arguments.length)return b;b=e;return _};_.state=function(e){if(!arguments.length)return x;x=e;return _};_.defaultState=function(e){if(!arguments.length)return T;T=e;return _};_.noData=function(e){if(!arguments.length)return N;N=e;return _};_.average=function(e){if(!arguments.length)return C;C=e;return _};_.transitionDuration=function(e){if(!arguments.length)return L;L=e;return _};return _};e.models.discreteBar=function(){"use strict";function E(e){e.each(function(e){var i=n-t.left-t.right,E=r-t.top-t.bottom,S=d3.select(this);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});var T=p&&d?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0}})});s.domain(p||d3.merge(T).map(function(e){return e.x})).rangeBands(v||[0,i],.1);o.domain(d||d3.extent(d3.merge(T).map(function(e){return e.y}).concat(f)));if(c)o.range(m||[E-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]);else o.range(m||[E,0]);b=b||s;w=w||o.copy().range([o(0),o(0)]);var N=S.selectAll("g.nv-wrap.nv-discretebar").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-groups");N.attr("transform","translate("+t.left+","+t.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();A.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});A.transition().style("stroke-opacity",1).style("fill-opacity",.75);var O=A.selectAll("g.nv-bar").data(function(e){return e.values});O.exit().remove();var M=O.enter().append("g").attr("transform",function(e,t,n){return"translate("+(s(u(e,t))+s.rangeBand()*.05)+", "+o(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);g.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);g.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){g.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){g.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});M.append("rect").attr("height",0).attr("width",s.rangeBand()*.9/e.length);if(c){M.append("text").attr("text-anchor","middle");O.select("text").text(function(e,t){return h(a(e,t))}).transition().attr("x",s.rangeBand()*.9/2).attr("y",function(e,t){return a(e,t)<0?o(a(e,t))-o(0)+12:-4})}else{O.selectAll("text").remove()}O.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(e,t){return e.color||l(e,t)}).style("stroke",function(e,t){return e.color||l(e,t)}).select("rect").attr("class",y).transition().attr("width",s.rangeBand()*.9/e.length);O.transition().attr("transform",function(e,t){var n=s(u(e,t))+s.rangeBand()*.05,r=a(e,t)<0?o(0):o(0)-o(a(e,t))<1?o(0)-1:o(a(e,t));return"translate("+n+", "+r+")"}).select("rect").attr("height",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(d&&d[0]||0))||1)});b=s.copy();w=o.copy()});return E}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=false,h=d3.format(",.2f"),p,d,v,m,g=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),y="discreteBar";var b,w;E.dispatch=g;E.options=e.utils.optionsFunc.bind(E);E.x=function(e){if(!arguments.length)return u;u=e;return E};E.y=function(e){if(!arguments.length)return a;a=e;return E};E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.xScale=function(e){if(!arguments.length)return s;s=e;return E};E.yScale=function(e){if(!arguments.length)return o;o=e;return E};E.xDomain=function(e){if(!arguments.length)return p;p=e;return E};E.yDomain=function(e){if(!arguments.length)return d;d=e;return E};E.xRange=function(e){if(!arguments.length)return v;v=e;return E};E.yRange=function(e){if(!arguments.length)return m;m=e;return E};E.forceY=function(e){if(!arguments.length)return f;f=e;return E};E.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return E};E.id=function(e){if(!arguments.length)return i;i=e;return E};E.showValues=function(e){if(!arguments.length)return c;c=e;return E};E.valueFormat=function(e){if(!arguments.length)return h;h=e;return E};E.rectClass=function(e){if(!arguments.length)return y;y=e;return E};return E};e.models.discreteBarChart=function(){"use strict";function w(e){e.each(function(e){var u=d3.select(this),p=this;var E=(s||parseInt(u.style("width"))||960)-i.left-i.right,S=(o||parseInt(u.style("height"))||400)-i.top-i.bottom;w.update=function(){g.beforeUpdate();u.transition().duration(y).call(w)};w.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var T=u.selectAll(".nv-noData").data([m]);T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");T.attr("x",i.left+E/2).attr("y",i.top+S/2).text(function(e){return e});return w}else{u.selectAll(".nv-noData").remove()}d=t.xScale();v=t.yScale().clamp(true);var N=u.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g");var k=C.append("defs");var L=N.select("g");C.append("g").attr("class","nv-x nv-axis");C.append("g").attr("class","nv-y nv-axis");C.append("g").attr("class","nv-barsWrap");L.attr("transform","translate("+i.left+","+i.top+")");if(l){L.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)")}t.width(E).height(S);var A=L.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));A.transition().call(t);k.append("clipPath").attr("id","nv-x-label-clip-"+t.id()).append("rect");L.select("#nv-x-label-clip-"+t.id()+" rect").attr("width",d.rangeBand()*(c?2:1)).attr("height",16).attr("x",-d.rangeBand()/(c?1:2));if(a){n.scale(d).ticks(E/100).tickSize(-S,0);L.select(".nv-x.nv-axis").attr("transform","translate(0,"+(v.range()[0]+(t.showValues()&&v.domain()[0]<0?16:0))+")");L.select(".nv-x.nv-axis").transition().call(n);var O=L.select(".nv-x.nv-axis").selectAll("g");if(c){O.selectAll("text").attr("transform",function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})}}if(f){r.scale(v).ticks(S/36).tickSize(-E,0);L.select(".nv-y.nv-axis").transition().call(r)}g.on("tooltipShow",function(e){if(h)b(e,p.parentNode)})});return w}var t=e.models.discreteBar(),n=e.models.axis(),r=e.models.axis();var i={top:15,right:10,bottom:50,left:60},s=null,o=null,u=e.utils.getColor(),a=true,f=true,l=false,c=false,h=true,p=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},d,v,m="No Data Available.",g=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate"),y=250;n.orient("bottom").highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient(l?"right":"left").tickFormat(d3.format(",.1f"));var b=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=p(i.series.key,a,f,i,w);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+i.left,e.pos[1]+i.top];g.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});g.on("tooltipHide",function(){if(h)e.tooltip.cleanup()});w.dispatch=g;w.discretebar=t;w.xAxis=n;w.yAxis=r;d3.rebind(w,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","id","showValues","valueFormat");w.options=e.utils.optionsFunc.bind(w);w.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return w};w.width=function(e){if(!arguments.length)return s;s=e;return w};w.height=function(e){if(!arguments.length)return o;o=e;return w};w.color=function(n){if(!arguments.length)return u;u=e.utils.getColor(n);t.color(u);return w};w.showXAxis=function(e){if(!arguments.length)return a;a=e;return w};w.showYAxis=function(e){if(!arguments.length)return f;f=e;return w};w.rightAlignYAxis=function(e){if(!arguments.length)return l;l=e;r.orient(e?"right":"left");return w};w.staggerLabels=function(e){if(!arguments.length)return c;c=e;return w};w.tooltips=function(e){if(!arguments.length)return h;h=e;return w};w.tooltipContent=function(e){if(!arguments.length)return p;p=e;return w};w.noData=function(e){if(!arguments.length)return m;m=e;return w};w.transitionDuration=function(e){if(!arguments.length)return y;y=e;return w};return w};e.models.distribution=function(){"use strict";function l(e){e.each(function(e){var a=n-(i==="x"?t.left+t.right:t.top+t.bottom),l=i=="x"?"y":"x",c=d3.select(this);f=f||u;var h=c.selectAll("g.nv-distribution").data([e]);var p=h.enter().append("g").attr("class","nvd3 nv-distribution");var d=p.append("g");var v=h.select("g");h.attr("transform","translate("+t.left+","+t.top+")");var m=v.selectAll("g.nv-dist").data(function(e){return e},function(e){return e.key});m.enter().append("g");m.attr("class",function(e,t){return"nv-dist nv-series-"+t}).style("stroke",function(e,t){return o(e,t)});var g=m.selectAll("line.nv-dist"+i).data(function(e){return e.values});g.enter().append("line").attr(i+"1",function(e,t){return f(s(e,t))}).attr(i+"2",function(e,t){return f(s(e,t))});m.exit().selectAll("line.nv-dist"+i).transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}).style("stroke-opacity",0).remove();g.attr("class",function(e,t){return"nv-dist"+i+" nv-dist"+i+"-"+t}).attr(l+"1",0).attr(l+"2",r);g.transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))});f=u.copy()});return l}var t={top:0,right:0,bottom:0,left:0},n=400,r=8,i="x",s=function(e){return e[i]},o=e.utils.defaultColor(),u=d3.scale.linear(),a;var f;l.options=e.utils.optionsFunc.bind(l);l.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return l};l.width=function(e){if(!arguments.length)return n;n=e;return l};l.axis=function(e){if(!arguments.length)return i;i=e;return l};l.size=function(e){if(!arguments.length)return r;r=e;return l};l.getData=function(e){if(!arguments.length)return s;s=d3.functor(e);return l};l.scale=function(e){if(!arguments.length)return u;u=e;return l};l.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);return l};return l};e.models.historicalBar=function(){"use strict";function w(E){E.each(function(w){var E=n-t.left-t.right,S=r-t.top-t.bottom,T=d3.select(this);s.domain(d||d3.extent(w[0].values.map(u).concat(f)));if(c)s.range(m||[E*.5/w[0].values.length,E*(w[0].values.length-.5)/w[0].values.length]);else s.range(m||[0,E]);o.domain(v||d3.extent(w[0].values.map(a).concat(l))).range(g||[S,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=T.selectAll("g.nv-wrap.nv-historicalBar-"+i).data([w[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+i);var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-bars");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){y.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",E).attr("height",S);A.attr("clip-path",h?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-bars").selectAll(".nv-bar").data(function(e){return e},function(e,t){return u(e,t)});O.exit().remove();var M=O.enter().append("rect").attr("x",0).attr("y",function(t,n){return e.utils.NaNtoZero(o(Math.max(0,a(t,n))))}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.abs(o(a(t,n))-o(0)))}).attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).on("mouseover",function(e,t){if(!b)return;d3.select(this).classed("hover",true);y.elementMouseover({point:e,series:w[0],pos:[s(u(e,t)),o(a(e,t))],pointIndex:t,seriesIndex:0,e:d3.event})}).on("mouseout",function(e,t){if(!b)return;d3.select(this).classed("hover",false);y.elementMouseout({point:e,series:w[0],pointIndex:t,seriesIndex:0,e:d3.event})}).on("click",function(e,t){if(!b)return;y.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){if(!b)return;y.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("fill",function(e,t){return p(e,t)}).attr("class",function(e,t,n){return(a(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t}).transition().attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).attr("width",E/w[0].values.length*.9);O.transition().attr("y",function(t,n){var r=a(t,n)<0?o(0):o(0)-o(a(t,n))<1?o(0)-1:o(a(t,n));return e.utils.NaNtoZero(r)}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.max(Math.abs(o(a(t,n))-o(0)),1))})});return w}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[],l=[0],c=false,h=true,p=e.utils.defaultColor(),d,v,m,g,y=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),b=true;w.highlightPoint=function(e,t){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar-0-"+e).classed("hover",t)};w.clearHighlights=function(){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar.hover").classed("hover",false)};w.dispatch=y;w.options=e.utils.optionsFunc.bind(w);w.x=function(e){if(!arguments.length)return u;u=e;return w};w.y=function(e){if(!arguments.length)return a;a=e;return w};w.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return w};w.width=function(e){if(!arguments.length)return n;n=e;return w};w.height=function(e){if(!arguments.length)return r;r=e;return w};w.xScale=function(e){if(!arguments.length)return s;s=e;return w};w.yScale=function(e){if(!arguments.length)return o;o=e;return w};w.xDomain=function(e){if(!arguments.length)return d;d=e;return w};w.yDomain=function(e){if(!arguments.length)return v;v=e;return w};w.xRange=function(e){if(!arguments.length)return m;m=e;return w};w.yRange=function(e){if(!arguments.length)return g;g=e;return w};w.forceX=function(e){if(!arguments.length)return f;f=e;return w};w.forceY=function(e){if(!arguments.length)return l;l=e;return w};w.padData=function(e){if(!arguments.length)return c;c=e;return w};w.clipEdge=function(e){if(!arguments.length)return h;h=e;return w};w.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return w};w.id=function(e){if(!arguments.length)return i;i=e;return w};w.interactive=function(e){if(!arguments.length)return b;b=false;return w};return w};e.models.historicalBarChart=function(){"use strict";function x(e){e.each(function(d){var T=d3.select(this),N=this;var C=(u||parseInt(T.style("width"))||960)-s.left-s.right,k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom;x.update=function(){T.transition().duration(E).call(x)};x.container=this;g.disabled=d.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g){if(g[L]instanceof Array)y[L]=g[L].slice(0);else y[L]=g[L]}}if(!d||!d.length||!d.filter(function(e){return e.values.length}).length){var A=T.selectAll(".nv-noData").data([b]);A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");A.attr("x",s.left+C/2).attr("y",s.top+k/2).text(function(e){return e});return x}else{T.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();var O=T.selectAll("g.nv-wrap.nv-historicalBarChart").data([d]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-legendWrap");if(f){i.width(C);_.select(".nv-legendWrap").datum(d).call(i);if(s.top!=i.height()){s.top=i.height();k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom}O.select(".nv-legendWrap").attr("transform","translate(0,"+ -s.top+")")}O.attr("transform","translate("+s.left+","+s.top+")");if(h){_.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}t.width(C).height(k).color(d.map(function(e,t){return e.color||o(e,t)}).filter(function(e,t){return!d[t].disabled}));var D=_.select(".nv-barsWrap").datum(d.filter(function(e){return!e.disabled}));D.transition().call(t);if(l){n.scale(v).tickSize(-k,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+m.range()[0]+")");_.select(".nv-x.nv-axis").transition().call(n)}if(c){r.scale(m).ticks(k/36).tickSize(-C,0);_.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled;if(!d.filter(function(e){return!e.disabled}).length){d.map(function(e){e.disabled=false;O.selectAll(".nv-series").classed("disabled",false);return e})}g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);e.transition().call(x)});i.dispatch.on("legendDblclick",function(e){d.forEach(function(e){e.disabled=true});e.disabled=false;g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);x.update()});w.on("tooltipShow",function(e){if(p)S(e,N.parentNode)});w.on("changeState",function(t){if(typeof t.disabled!=="undefined"){d.forEach(function(e,n){e.disabled=t.disabled[n]});g.disabled=t.disabled}e.call(x)})});return x}var t=e.models.historicalBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend();var s={top:30,right:90,bottom:50,left:90},o=e.utils.defaultColor(),u=null,a=null,f=false,l=true,c=true,h=false,p=true,d=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},v,m,g={},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=250;n.orient("bottom").tickPadding(7);r.orient(h?"right":"left");var S=function(i,s){if(s){var o=d3.select(s).select("svg");var u=o.node()?o.attr("viewBox"):null;if(u){u=u.split(" ");var a=parseInt(o.style("width"))/u[2];i.pos[0]=i.pos[0]*a;i.pos[1]=i.pos[1]*a}}var f=i.pos[0]+(s.offsetLeft||0),l=i.pos[1]+(s.offsetTop||0),c=n.tickFormat()(t.x()(i.point,i.pointIndex)),h=r.tickFormat()(t.y()(i.point,i.pointIndex)),p=d(i.series.key,c,h,i,x);e.tooltip.show([f,l],p,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+s.left,e.pos[1]+s.top];w.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)});w.on("tooltipHide",function(){if(p)e.tooltip.cleanup()});x.dispatch=w;x.bars=t;x.legend=i;x.xAxis=n;x.yAxis=r;d3.rebind(x,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate","highlightPoint","clearHighlights","interactive");x.options=e.utils.optionsFunc.bind(x);x.margin=function(e){if(!arguments.length)return s;s.top=typeof e.top!="undefined"?e.top:s.top;s.right=typeof e.right!="undefined"?e.right:s.right;s.bottom=typeof e.bottom!="undefined"?e.bottom:s.bottom;s.left=typeof e.left!="undefined"?e.left:s.left;return x};x.width=function(e){if(!arguments.length)return u;u=e;return x};x.height=function(e){if(!arguments.length)return a;a=e;return x};x.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);i.color(o);return x};x.showLegend=function(e){if(!arguments.length)return f;f=e;return x};x.showXAxis=function(e){if(!arguments.length)return l;l=e;return x};x.showYAxis=function(e){if(!arguments.length)return c;c=e;return x};x.rightAlignYAxis=function(e){if(!arguments.length)return h;h=e;r.orient(e?"right":"left");return x};x.tooltips=function(e){if(!arguments.length)return p;p=e;return x};x.tooltipContent=function(e){if(!arguments.length)return d;d=e;return x};x.state=function(e){if(!arguments.length)return g;g=e;return x};x.defaultState=function(e){if(!arguments.length)return y;y=e;return x};x.noData=function(e){if(!arguments.length)return b;b=e;return x};x.transitionDuration=function(e){if(!arguments.length)return E;E=e;return x};return x};e.models.indentedTree=function(){"use strict";function g(e){e.each(function(e){function k(e,t,n){d3.event.stopPropagation();if(d3.event.shiftKey&&!n){d3.event.shiftKey=false;e.values&&e.values.forEach(function(e){if(e.values||e._values){k(e,0,true)}});return true}if(!O(e)){return true}if(e.values){e._values=e.values;e.values=null}else{e.values=e._values;e._values=null}g.update()}function L(e){return e._values&&e._values.length?h:e.values&&e.values.length?p:""}function A(e){return e._values&&e._values.length}function O(e){var t=e.values||e._values;return t&&t.length}var t=1,n=d3.select(this);var i=d3.layout.tree().children(function(e){return e.values}).size([r,f]);g.update=function(){n.transition().duration(600).call(g)};if(!e[0])e[0]={key:a};var s=i.nodes(e[0]);var y=d3.select(this).selectAll("div").data([[s]]);var b=y.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree");var w=b.append("table");var E=y.select("table").attr("width","100%").attr("class",c);if(o){var S=w.append("thead");var x=S.append("tr");l.forEach(function(e){x.append("th").attr("width",e.width?e.width:"10%").style("text-align",e.type=="numeric"?"right":"left").append("span").text(e.label)})}var T=E.selectAll("tbody").data(function(e){return e});T.enter().append("tbody");t=d3.max(s,function(e){return e.depth});i.size([r,t*f]);var N=T.selectAll("tr").data(function(e){return e.filter(function(e){return u&&!e.children?u(e):true})},function(e,t){return e.id||e.id||++m});N.exit().remove();N.select("img.nv-treeicon").attr("src",L).classed("folded",A);var C=N.enter().append("tr");l.forEach(function(e,t){var n=C.append("td").style("padding-left",function(e){return(t?0:e.depth*f+12+(L(e)?0:16))+"px"},"important").style("text-align",e.type=="numeric"?"right":"left");if(t==0){n.append("img").classed("nv-treeicon",true).classed("nv-folded",A).attr("src",L).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(e){return L(e)?"inline-block":"none"}).on("click",k)}n.each(function(n){if(!t&&v(n))d3.select(this).append("a").attr("href",v).attr("class",d3.functor(e.classes)).append("span");else d3.select(this).append("span");d3.select(this).select("span").attr("class",d3.functor(e.classes)).text(function(t){return e.format?e.format(t):t[e.key]||"-"})});if(e.showCount){n.append("span").attr("class","nv-childrenCount");N.selectAll("span.nv-childrenCount").text(function(e){return e.values&&e.values.length||e._values&&e._values.length?"("+(e.values&&e.values.filter(function(e){return u?u(e):true}).length||e._values&&e._values.filter(function(e){return u?u(e):true}).length||0)+")":""})}});N.order().on("click",function(e){d.elementClick({row:this,data:e,pos:[e.x,e.y]})}).on("dblclick",function(e){d.elementDblclick({row:this,data:e,pos:[e.x,e.y]})}).on("mouseover",function(e){d.elementMouseover({row:this,data:e,pos:[e.x,e.y]})}).on("mouseout",function(e){d.elementMouseout({row:this,data:e,pos:[e.x,e.y]})})});return g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e4),o=true,u=false,a="No Data Available.",f=20,l=[{key:"key",label:"Name",type:"text"}],c=null,h="images/grey-plus.png",p="images/grey-minus.png",d=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),v=function(e){return e.url};var m=0;g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return g};g.width=function(e){if(!arguments.length)return n;n=e;return g};g.height=function(e){if(!arguments.length)return r;r=e;return g};g.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);scatter.color(i);return g};g.id=function(e){if(!arguments.length)return s;s=e;return g};g.header=function(e){if(!arguments.length)return o;o=e;return g};g.noData=function(e){if(!arguments.length)return a;a=e;return g};g.filterZero=function(e){if(!arguments.length)return u;u=e;return g};g.columns=function(e){if(!arguments.length)return l;l=e;return g};g.tableClass=function(e){if(!arguments.length)return c;c=e;return g};g.iconOpen=function(e){if(!arguments.length)return h;h=e;return g};g.iconClose=function(e){if(!arguments.length)return p;p=e;return g};g.getUrl=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.legend=function(){"use strict";function h(p){p.each(function(h){var p=n-t.left-t.right,d=d3.select(this);var v=d.selectAll("g.nv-legend").data([h]);var m=v.enter().append("g").attr("class","nvd3 nv-legend").append("g");var g=v.select("g");v.attr("transform","translate("+t.left+","+t.top+")");var y=g.selectAll(".nv-series").data(function(e){return e});var b=y.enter().append("g").attr("class","nv-series").on("mouseover",function(e,t){l.legendMouseover(e,t)}).on("mouseout",function(e,t){l.legendMouseout(e,t)}).on("click",function(e,t){if(!c){l.legendClick(e,t);if(a){if(f){h.forEach(function(e){e.disabled=true});e.disabled=false}else{e.disabled=!e.disabled;if(h.every(function(e){return e.disabled})){h.forEach(function(e){e.disabled=false})}}l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}}).on("dblclick",function(e,t){if(!c){l.legendDblclick(e,t);if(a){h.forEach(function(e){e.disabled=true});e.disabled=false;l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}});b.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5);b.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");y.classed("disabled",function(e){return e.disabled});y.exit().remove();y.select("circle").style("fill",function(e,t){return e.color||s(e,t)}).style("stroke",function(e,t){return e.color||s(e,t)});y.select("text").text(i);if(o){var w=[];y.each(function(t,n){var r=d3.select(this).select("text");var i=r.node().getComputedTextLength()||e.utils.calcApproxTextWidth(r);w.push(i+28)});var E=0;var S=0;var x=[];while(S<p&&E<w.length){x[E]=w[E];S+=w[E++]}if(E===0)E=1;while(S>p&&E>1){x=[];E--;for(var T=0;T<w.length;T++){if(w[T]>(x[T%E]||0))x[T%E]=w[T]}S=x.reduce(function(e,t,n,r){return e+t})}var N=[];for(var C=0,k=0;C<E;C++){N[C]=k;k+=x[C]}y.attr("transform",function(e,t){return"translate("+N[t%E]+","+(5+Math.floor(t/E)*20)+")"});if(u){g.attr("transform","translate("+(n-t.right-S)+","+t.top+")")}else{g.attr("transform","translate(0"+","+t.top+")")}r=t.top+t.bottom+Math.ceil(w.length/E)*20}else{var L=5,A=5,O=0,M;y.attr("transform",function(e,r){var i=d3.select(this).select("text").node().getComputedTextLength()+28;M=A;if(n<t.left+t.right+M+i){A=M=5;L+=20}A+=i;if(A>O)O=A;return"translate("+M+","+L+")"});g.attr("transform","translate("+(n-t.right-O)+","+t.top+")");r=t.top+t.bottom+L+15}});return h}var t={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},s=e.utils.defaultColor(),o=true,u=true,a=true,f=false,l=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),c=false;h.dispatch=l;h.options=e.utils.optionsFunc.bind(h);h.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return h};h.width=function(e){if(!arguments.length)return n;n=e;return h};h.height=function(e){if(!arguments.length)return r;r=e;return h};h.key=function(e){if(!arguments.length)return i;i=e;return h};h.color=function(t){if(!arguments.length)return s;s=e.utils.getColor(t);return h};h.align=function(e){if(!arguments.length)return o;o=e;return h};h.rightAlign=function(e){if(!arguments.length)return u;u=e;return h};h.dualaxis=function(e){if(!arguments.length)return c;c=e;return h};h.updateState=function(e){if(!arguments.length)return a;a=e;return h};h.radioButtonMode=function(e){if(!arguments.length)return f;f=e;return h};return h};e.models.line=function(){"use strict";function m(g){g.each(function(m){var g=r-n.left-n.right,b=i-n.top-n.bottom,w=d3.select(this);c=t.xScale();h=t.yScale();d=d||c;v=v||h;var E=w.selectAll("g.nv-wrap.nv-line").data([m]);var S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line");var T=S.append("defs");var N=S.append("g");var C=E.select("g");N.append("g").attr("class","nv-groups");N.append("g").attr("class","nv-scatterWrap");E.attr("transform","translate("+n.left+","+n.top+")");t.width(g).height(b);var k=E.select(".nv-scatterWrap");k.transition().call(t);T.append("clipPath").attr("id","nv-edge-clip-"+t.id()).append("rect");E.select("#nv-edge-clip-"+t.id()+" rect").attr("width",g).attr("height",b);C.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");k.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);L.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();L.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return s(e,t)}).style("stroke",function(e,t){return s(e,t)});L.transition().style("stroke-opacity",1).style("fill-opacity",.5);var A=L.selectAll("path.nv-area").data(function(e){return f(e)?[e]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}).y1(function(e,t){return v(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});L.exit().selectAll("path.nv-area").remove();A.transition().attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}).y1(function(e,t){return h(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});var O=L.selectAll("path.nv-line").data(function(e){return[e.values]});O.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}));L.exit().selectAll("path.nv-line").transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));O.transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));d=c.copy();v=h.copy()});return m}var t=e.models.scatter();var n={top:0,right:0,bottom:0,left:0},r=960,i=500,s=e.utils.defaultColor(),o=function(e){return e.x},u=function(e){return e.y},a=function(e,t){return!isNaN(u(e,t))&&u(e,t)!==null},f=function(e){return e.area},l=false,c,h,p="linear";t.size(16).sizeDomain([16,256]);var d,v;m.dispatch=t.dispatch;m.scatter=t;d3.rebind(m,t,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","padData","highlightPoint","clearHighlights");m.options=e.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return m};m.width=function(e){if(!arguments.length)return r;r=e;return m};m.height=function(e){if(!arguments.length)return i;i=e;return m};m.x=function(e){if(!arguments.length)return o;o=e;t.x(e);return m};m.y=function(e){if(!arguments.length)return u;u=e;t.y(e);return m};m.clipEdge=function(e){if(!arguments.length)return l;l=e;return m};m.color=function(n){if(!arguments.length)return s;s=e.utils.getColor(n);t.color(s);return m};m.interpolate=function(e){if(!arguments.length)return p;p=e;return m};m.defined=function(e){if(!arguments.length)return a;a=e;return m};m.isArea=function(e){if(!arguments.length)return f;f=d3.functor(e);return m};return m};e.models.lineChart=function(){"use strict";function N(m){m.each(function(m){var C=d3.select(this),k=this;var L=(a||parseInt(C.style("width"))||960)-o.left-o.right,A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom;N.update=function(){C.transition().duration(x).call(N)};N.container=this;b.disabled=m.map(function(e){return!!e.disabled});if(!w){var O;w={};for(O in b){if(b[O]instanceof Array)w[O]=b[O].slice(0);else w[O]=b[O]}}if(!m||!m.length||!m.filter(function(e){return e.values.length}).length){var M=C.selectAll(".nv-noData").data([E]);M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");M.attr("x",o.left+L/2).attr("y",o.top+A/2).text(function(e){return e});return N}else{C.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var _=C.selectAll("g.nv-wrap.nv-lineChart").data([m]);var D=_.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g");var P=_.select("g");D.append("rect").style("opacity",0);D.append("g").attr("class","nv-x nv-axis");D.append("g").attr("class","nv-y nv-axis");D.append("g").attr("class","nv-linesWrap");D.append("g").attr("class","nv-legendWrap");D.append("g").attr("class","nv-interactive");P.select("rect").attr("width",L).attr("height",A);if(l){i.width(L);P.select(".nv-legendWrap").datum(m).call(i);if(o.top!=i.height()){o.top=i.height();A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom}_.select(".nv-legendWrap").attr("transform","translate(0,"+ -o.top+")")}_.attr("transform","translate("+o.left+","+o.top+")");if(p){P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}if(d){s.width(L).height(A).margin({left:o.left,top:o.top}).svgContainer(C).xScale(g);_.select(".nv-interactive").call(s)}t.width(L).height(A).color(m.map(function(e,t){return e.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));var H=P.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));H.transition().call(t);if(c){n.scale(g).ticks(L/100).tickSize(-A,0);P.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");P.select(".nv-x.nv-axis").transition().call(n)}if(h){r.scale(y).ticks(A/36).tickSize(-L,0);P.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);N.update()});s.dispatch.on("elementMousemove",function(i){t.clearHighlights();var a,f,l,c=[];m.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,N.x());t.highlightPoint(r,f,true);var s=n.values[f];if(typeof s==="undefined")return;if(typeof a==="undefined")a=s;if(typeof l==="undefined")l=N.xScale()(N.x()(s,f));c.push({key:n.key,value:N.y()(s,f),color:u(n,n.seriesIndex)})});if(c.length>2){var h=N.yScale().invert(i.mouseY);var p=Math.abs(N.yScale().domain()[0]-N.yScale().domain()[1]);var d=.03*p;var g=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(g!==null)c[g].highlight=true}var y=n.tickFormat()(N.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(k.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:y,series:c})();s.renderGuideLine(l)});s.dispatch.on("elementMouseout",function(e){S.tooltipHide();t.clearHighlights()});S.on("tooltipShow",function(e){if(v)T(e,k.parentNode)});S.on("changeState",function(e){if(typeof e.disabled!=="undefined"){m.forEach(function(t,n){t.disabled=e.disabled[n]});b.disabled=e.disabled}N.update()})});return N}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline();var o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=true,c=true,h=true,p=false,d=false,v=true,m=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=250;n.orient("bottom").tickPadding(7);r.orient(p?"right":"left");var T=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,N);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});N.dispatch=S;N.lines=t;N.legend=i;N.xAxis=n;N.yAxis=r;N.interactiveLayer=s;d3.rebind(N,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id","interpolate");N.options=e.utils.optionsFunc.bind(N);N.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return N};N.width=function(e){if(!arguments.length)return a;a=e;return N};N.height=function(e){if(!arguments.length)return f;f=e;return N};N.color=function(t){if(!arguments.length)return u;u=e.utils.getColor(t);i.color(u);return N};N.showLegend=function(e){if(!arguments.length)return l;l=e;return N};N.showXAxis=function(e){if(!arguments.length)return c;c=e;return N};N.showYAxis=function(e){if(!arguments.length)return h;h=e;return N};N.rightAlignYAxis=function(e){if(!arguments.length)return p;p=e;r.orient(e?"right":"left");return N};N.useInteractiveGuideline=function(e){if(!arguments.length)return d;d=e;if(e===true){N.interactive(false);N.useVoronoi(false)}return N};N.tooltips=function(e){if(!arguments.length)return v;v=e;return N};N.tooltipContent=function(e){if(!arguments.length)return m;m=e;return N};N.state=function(e){if(!arguments.length)return b;b=e;return N};N.defaultState=function(e){if(!arguments.length)return w;w=e;return N};N.noData=function(e){if(!arguments.length)return E;E=e;return N};N.transitionDuration=function(e){if(!arguments.length)return x;x=e;return N};return N};e.models.linePlusBarChart=function(){"use strict";function T(e){e.each(function(e){var l=d3.select(this),c=this;var v=(a||parseInt(l.style("width"))||960)-u.left-u.right,N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom;T.update=function(){l.transition().call(T)};b.disabled=e.map(function(e){return!!e.disabled});if(!w){var C;w={};for(C in b){if(b[C]instanceof Array)w[C]=b[C].slice(0);else w[C]=b[C]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var k=l.selectAll(".nv-noData").data([E]);k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");k.attr("x",u.left+v/2).attr("y",u.top+N/2).text(function(e){return e});return T}else{l.selectAll(".nv-noData").remove()}var L=e.filter(function(e){return!e.disabled&&e.bar});var A=e.filter(function(e){return!e.bar});m=A.filter(function(e){return!e.disabled}).length&&A.filter(function(e){return!e.disabled})[0].values.length?t.xScale():n.xScale();g=n.yScale();y=t.yScale();var O=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y1 nv-axis");M.append("g").attr("class","nv-y2 nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-linesWrap");M.append("g").attr("class","nv-legendWrap");if(p){o.width(v/2);_.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(o);if(u.top!=o.height()){u.top=o.height();N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom}_.select(".nv-legendWrap").attr("transform","translate("+v/2+","+ -u.top+")")}O.attr("transform","translate("+u.left+","+u.top+")");t.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));n.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));var D=_.select(".nv-barsWrap").datum(L.length?L:[{values:[]}]);var P=_.select(".nv-linesWrap").datum(A[0]&&!A[0].disabled?A:[{values:[]}]);d3.transition(D).call(n);d3.transition(P).call(t);r.scale(m).ticks(v/100).tickSize(-N,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")");d3.transition(_.select(".nv-x.nv-axis")).call(r);i.scale(g).ticks(N/36).tickSize(-v,0);d3.transition(_.select(".nv-y1.nv-axis")).style("opacity",L.length?1:0).call(i);s.scale(y).ticks(N/36).tickSize(L.length?0:-v,0);_.select(".nv-y2.nv-axis").style("opacity",A.length?1:0).attr("transform","translate("+v+",0)");d3.transition(_.select(".nv-y2.nv-axis")).call(s);o.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);T.update()});S.on("tooltipShow",function(e){if(d)x(e,c.parentNode)});S.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});b.disabled=t.disabled}T.update()})});return T}var t=e.models.line(),n=e.models.historicalBar(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.legend();var u={top:30,right:60,bottom:50,left:60},a=null,f=null,l=function(e){return e.x},c=function(e){return e.y},h=e.utils.defaultColor(),p=true,d=true,v=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},m,g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.padData(true);t.clipEdge(false).padData(true);r.orient("bottom").tickPadding(7).highlightZero(false);i.orient("left");s.orient("right");var x=function(n,o){var u=n.pos[0]+(o.offsetLeft||0),a=n.pos[1]+(o.offsetTop||0),f=r.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?i:s).tickFormat()(t.y()(n.point,n.pointIndex)),c=v(n.series.key,f,l,n,T);e.tooltip.show([u,a],c,n.value<0?"n":"s",null,o)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});n.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});n.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});T.dispatch=S;T.legend=o;T.lines=t;T.bars=n;T.xAxis=r;T.y1Axis=i;T.y2Axis=s;d3.rebind(T,t,"defined","size","clipVoronoi","interpolate");T.options=e.utils.optionsFunc.bind(T);T.x=function(e){if(!arguments.length)return l;l=e;t.x(e);n.x(e);return T};T.y=function(e){if(!arguments.length)return c;c=e;t.y(e);n.y(e);return T};T.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return T};T.width=function(e){if(!arguments.length)return a;a=e;return T};T.height=function(e){if(!arguments.length)return f;f=e;return T};T.color=function(t){if(!arguments.length)return h;h=e.utils.getColor(t);o.color(h);return T};T.showLegend=function(e){if(!arguments.length)return p;p=e;return T};T.tooltips=function(e){if(!arguments.length)return d;d=e;return T};T.tooltipContent=function(e){if(!arguments.length)return v;v=e;return T};T.state=function(e){if(!arguments.length)return b;b=e;return T};T.defaultState=function(e){if(!arguments.length)return w;w=e;return T};T.noData=function(e){if(!arguments.length)return E;E=e;return T};return T};e.models.lineWithFocusChart=function(){"use strict";function k(e){e.each(function(e){function U(e){var t=+(e=="e"),n=t?1:-1,r=M/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function z(){if(!a.empty())a.extent(w);I.data([a.empty()?g.domain():w]).each(function(e,t){var n=g(e[0])-v.range()[0],r=v.range()[1]-g(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",g(e[1])).attr("width",r<0?0:r)})}function W(){w=a.empty()?null:a.extent();var n=a.empty()?g.domain():a.extent();if(Math.abs(n[0]-n[1])<=1){return}T.brush({extent:n,brush:a});z();var s=H.select(".nv-focus .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}).map(function(e,r){return{key:e.key,values:e.values.filter(function(e,r){return t.x()(e,r)>=n[0]&&t.x()(e,r)<=n[1]})}}));s.transition().duration(N).call(t);H.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(r);H.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(i)}var S=d3.select(this),L=this;var A=(h||parseInt(S.style("width"))||960)-f.left-f.right,O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d,M=d-l.top-l.bottom;k.update=function(){S.transition().duration(N).call(k)};k.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var _=S.selectAll(".nv-noData").data([x]);_.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");_.attr("x",f.left+A/2).attr("y",f.top+O/2).text(function(e){return e});return k}else{S.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();g=n.xScale();y=n.yScale();var D=S.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([e]);var P=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g");var H=D.select("g");P.append("g").attr("class","nv-legendWrap");var B=P.append("g").attr("class","nv-focus");B.append("g").attr("class","nv-x nv-axis");B.append("g").attr("class","nv-y nv-axis");B.append("g").attr("class","nv-linesWrap");var j=P.append("g").attr("class","nv-context");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-linesWrap");j.append("g").attr("class","nv-brushBackground");j.append("g").attr("class","nv-x nv-brush");if(b){u.width(A);H.select(".nv-legendWrap").datum(e).call(u);if(f.top!=u.height()){f.top=u.height();O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d}H.select(".nv-legendWrap").attr("transform","translate(0,"+ -f.top+")")}D.attr("transform","translate("+f.left+","+f.top+")");t.width(A).height(O).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));n.defined(t.defined()).width(A).height(M).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));H.select(".nv-context").attr("transform","translate(0,"+(O+f.bottom+l.top)+")");var F=H.select(".nv-context .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(n);r.scale(v).ticks(A/100).tickSize(-O,0);i.scale(m).ticks(O/36).tickSize(-A,0);H.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+O+")");a.x(g).on("brush",function(){var e=k.transitionDuration();k.transitionDuration(0);W();k.transitionDuration(e)});if(w)a.extent(w);var I=H.select(".nv-brushBackground").selectAll("g").data([w||a.extent()]);var q=I.enter().append("g");q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M);q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var R=H.select(".nv-x.nv-brush").call(a);R.selectAll("rect").attr("height",M);R.selectAll(".resize").append("path").attr("d",U);W();s.scale(g).ticks(A/100).tickSize(-M,0);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");d3.transition(H.select(".nv-context .nv-x.nv-axis")).call(s);o.scale(y).ticks(M/36).tickSize(-A,0);d3.transition(H.select(".nv-context .nv-y.nv-axis")).call(o);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");u.dispatch.on("stateChange",function(e){k.update()});T.on("tooltipShow",function(e){if(E)C(e,L.parentNode)})});return k}var t=e.models.line(),n=e.models.line(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.axis(),u=e.models.legend(),a=d3.svg.brush();var f={top:30,right:30,bottom:30,left:60},l={top:0,right:30,bottom:20,left:60},c=e.utils.defaultColor(),h=null,p=null,d=100,v,m,g,y,b=true,w=null,E=true,S=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},x="No Data Available.",T=d3.dispatch("tooltipShow","tooltipHide","brush"),N=250;t.clipEdge(true);n.interactive(false);r.orient("bottom").tickPadding(5);i.orient("left");s.orient("bottom").tickPadding(5);o.orient("left");var C=function(n,s){var o=n.pos[0]+(s.offsetLeft||0),u=n.pos[1]+(s.offsetTop||0),a=r.tickFormat()(t.x()(n.point,n.pointIndex)),f=i.tickFormat()(t.y()(n.point,n.pointIndex)),l=S(n.series.key,a,f,n,k);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+f.left,e.pos[1]+f.top];T.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)});T.on("tooltipHide",function(){if(E)e.tooltip.cleanup()});k.dispatch=T;k.legend=u;k.lines=t;k.lines2=n;k.xAxis=r;k.yAxis=i;k.x2Axis=s;k.y2Axis=o;d3.rebind(k,t,"defined","isArea","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id");k.options=e.utils.optionsFunc.bind(k);k.x=function(e){if(!arguments.length)return t.x;t.x(e);n.x(e);return k};k.y=function(e){if(!arguments.length)return t.y;t.y(e);n.y(e);return k};k.margin=function(e){if(!arguments.length)return f;f.top=typeof e.top!="undefined"?e.top:f.top;f.right=typeof e.right!="undefined"?e.right:f.right;f.bottom=typeof e.bottom!="undefined"?e.bottom:f.bottom;f.left=typeof e.left!="undefined"?e.left:f.left;return k};k.margin2=function(e){if(!arguments.length)return l;l=e;return k};k.width=function(e){if(!arguments.length)return h;h=e;return k};k.height=function(e){if(!arguments.length)return p;p=e;return k};k.height2=function(e){if(!arguments.length)return d;d=e;return k};k.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);u.color(c);return k};k.showLegend=function(e){if(!arguments.length)return b;b=e;return k};k.tooltips=function(e){if(!arguments.length)return E;E=e;return k};k.tooltipContent=function(e){if(!arguments.length)return S;S=e;return k};k.interpolate=function(e){if(!arguments.length)return t.interpolate();t.interpolate(e);n.interpolate(e);return k};k.noData=function(e){if(!arguments.length)return x;x=e;return k};k.xTickFormat=function(e){if(!arguments.length)return r.tickFormat();r.tickFormat(e);s.tickFormat(e);return k};k.yTickFormat=function(e){if(!arguments.length)return i.tickFormat();i.tickFormat(e);o.tickFormat(e);return k};k.brushExtent=function(e){if(!arguments.length)return w;w=e;return k};k.transitionDuration=function(e){if(!arguments.length)return N;N=e;return k};return k};e.models.linePlusBarWithFocusChart=function(){"use strict";function B(e){e.each(function(e){function nt(e){var t=+(e=="e"),n=t?1:-1,r=q/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function rt(){if(!h.empty())h.extent(x);Z.data([h.empty()?k.domain():x]).each(function(e,t){var n=k(e[0])-k.range()[0],r=k.range()[1]-k(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",k(e[1])).attr("width",r<0?0:r)})}function it(){x=h.empty()?null:h.extent();S=h.empty()?k.domain():h.extent();D.brush({extent:S,brush:h});rt();r.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));t.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var n=J.select(".nv-focus .nv-barsWrap").datum(!U.length?[{values:[]}]:U.map(function(e,t){return{key:e.key,values:e.values.filter(function(e,t){return r.x()(e,t)>=S[0]&&r.x()(e,t)<=S[1]})}}));var i=J.select(".nv-focus .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z.map(function(e,n){return{key:e.key,values:e.values.filter(function(e,n){return t.x()(e,n)>=S[0]&&t.x()(e,n)<=S[1]})}}));if(U.length){C=r.xScale()}else{C=t.xScale()}s.scale(C).ticks(F/100).tickSize(-I,0);s.domain([Math.ceil(S[0]),Math.floor(S[1])]);J.select(".nv-x.nv-axis").transition().duration(P).call(s);n.transition().duration(P).call(r);i.transition().duration(P).call(t);J.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L.range()[0]+")");u.scale(L).ticks(I/36).tickSize(-F,0);J.select(".nv-focus .nv-y1.nv-axis").style("opacity",U.length?1:0);a.scale(A).ticks(I/36).tickSize(U.length?0:-F,0);J.select(".nv-focus .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+C.range()[1]+",0)");J.select(".nv-focus .nv-y1.nv-axis").transition().duration(P).call(u);J.select(".nv-focus .nv-y2.nv-axis").transition().duration(P).call(a)}var N=d3.select(this),j=this;var F=(v||parseInt(N.style("width"))||960)-p.left-p.right,I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g,q=g-d.top-d.bottom;B.update=function(){N.transition().duration(P).call(B)};B.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=N.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",p.left+F/2).attr("y",p.top+I/2).text(function(e){return e});return B}else{N.selectAll(".nv-noData").remove()}var U=e.filter(function(e){return!e.disabled&&e.bar});var z=e.filter(function(e){return!e.bar});C=r.xScale();k=o.scale();L=r.yScale();A=t.yScale();O=i.yScale();M=n.yScale();var W=e.filter(function(e){return!e.disabled&&e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});var X=e.filter(function(e){return!e.disabled&&!e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});C.range([0,F]);k.domain(d3.extent(d3.merge(W.concat(X)),function(e){return e.x})).range([0,F]);var V=N.selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var $=V.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var J=V.select("g");$.append("g").attr("class","nv-legendWrap");var K=$.append("g").attr("class","nv-focus");K.append("g").attr("class","nv-x nv-axis");K.append("g").attr("class","nv-y1 nv-axis");K.append("g").attr("class","nv-y2 nv-axis");K.append("g").attr("class","nv-barsWrap");K.append("g").attr("class","nv-linesWrap");var Q=$.append("g").attr("class","nv-context");Q.append("g").attr("class","nv-x nv-axis");Q.append("g").attr("class","nv-y1 nv-axis");Q.append("g").attr("class","nv-y2 nv-axis");Q.append("g").attr("class","nv-barsWrap");Q.append("g").attr("class","nv-linesWrap");Q.append("g").attr("class","nv-brushBackground");Q.append("g").attr("class","nv-x nv-brush");if(E){c.width(F/2);J.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(c);if(p.top!=c.height()){p.top=c.height();I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g}J.select(".nv-legendWrap").attr("transform","translate("+F/2+","+ -p.top+")")}V.attr("transform","translate("+p.left+","+p.top+")");i.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));n.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var G=J.select(".nv-context .nv-barsWrap").datum(U.length?U:[{values:[]}]);var Y=J.select(".nv-context .nv-linesWrap").datum(!z[0].disabled?z:[{values:[]}]);J.select(".nv-context").attr("transform","translate(0,"+(I+p.bottom+d.top)+")");G.transition().call(i);Y.transition().call(n);h.x(k).on("brush",it);if(x)h.extent(x);var Z=J.select(".nv-brushBackground").selectAll("g").data([x||h.extent()]);var et=Z.enter().append("g");et.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",q);et.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",q);var tt=J.select(".nv-x.nv-brush").call(h);tt.selectAll("rect").attr("height",q);tt.selectAll(".resize").append("path").attr("d",nt);o.ticks(F/100).tickSize(-q,0);J.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+O.range()[0]+")");J.select(".nv-context .nv-x.nv-axis").transition().call(o);f.scale(O).ticks(q/36).tickSize(-F,0);J.select(".nv-context .nv-y1.nv-axis").style("opacity",U.length?1:0).attr("transform","translate(0,"+k.range()[0]+")");J.select(".nv-context .nv-y1.nv-axis").transition().call(f);l.scale(M).ticks(q/36).tickSize(U.length?0:-F,0);J.select(".nv-context .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+k.range()[1]+",0)");J.select(".nv-context .nv-y2.nv-axis").transition().call(l);c.dispatch.on("stateChange",function(e){B.update()});D.on("tooltipShow",function(e){if(T)H(e,j.parentNode)});it()});return B}var t=e.models.line(),n=e.models.line(),r=e.models.historicalBar(),i=e.models.historicalBar(),s=e.models.axis(),o=e.models.axis(),u=e.models.axis(),a=e.models.axis(),f=e.models.axis(),l=e.models.axis(),c=e.models.legend(),h=d3.svg.brush();var p={top:30,right:30,bottom:30,left:60},d={top:0,right:30,bottom:20,left:60},v=null,m=null,g=100,y=function(e){return e.x},b=function(e){return e.y},w=e.utils.defaultColor(),E=true,S,x=null,T=true,N=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},C,k,L,A,O,M,_="No Data Available.",D=d3.dispatch("tooltipShow","tooltipHide","brush"),P=0;t.clipEdge(true);n.interactive(false);s.orient("bottom").tickPadding(5);u.orient("left");a.orient("right");o.orient("bottom").tickPadding(5);f.orient("left");l.orient("right");var H=function(n,r){if(S){n.pointIndex+=Math.ceil(S[0])}var i=n.pos[0]+(r.offsetLeft||0),o=n.pos[1]+(r.offsetTop||0),f=s.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?u:a).tickFormat()(t.y()(n.point,n.pointIndex)),c=N(n.series.key,f,l,n,B);e.tooltip.show([i,o],c,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});r.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});r.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});D.on("tooltipHide",function(){if(T)e.tooltip.cleanup()});B.dispatch=D;B.legend=c;B.lines=t;B.lines2=n;B.bars=r;B.bars2=i;B.xAxis=s;B.x2Axis=o;B.y1Axis=u;B.y2Axis=a;B.y3Axis=f;B.y4Axis=l;d3.rebind(B,t,"defined","size","clipVoronoi","interpolate");B.options=e.utils.optionsFunc.bind(B);B.x=function(e){if(!arguments.length)return y;y=e;t.x(e);r.x(e);return B};B.y=function(e){if(!arguments.length)return b;b=e;t.y(e);r.y(e);return B};B.margin=function(e){if(!arguments.length)return p;p.top=typeof e.top!="undefined"?e.top:p.top;p.right=typeof e.right!="undefined"?e.right:p.right;p.bottom=typeof e.bottom!="undefined"?e.bottom:p.bottom;p.left=typeof e.left!="undefined"?e.left:p.left;return B};B.width=function(e){if(!arguments.length)return v;v=e;return B};B.height=function(e){if(!arguments.length)return m;m=e;return B};B.color=function(t){if(!arguments.length)return w;w=e.utils.getColor(t);c.color(w);return B};B.showLegend=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipContent=function(e){if(!arguments.length)return N;N=e;return B};B.noData=function(e){if(!arguments.length)return _;_=e;return B};B.brushExtent=function(e){if(!arguments.length)return x;x=e;return B};return B};e.models.multiBar=function(){"use strict";function C(e){e.each(function(e){var C=n-t.left-t.right,k=r-t.top-t.bottom,L=d3.select(this);if(d&&e.length)d=[{values:e[0].values.map(function(e){return{x:e.x,y:0,series:e.series,size:.01}})}];if(c)e=d3.layout.stack().offset(h).values(function(e){return e.values}).y(a)(!e.length&&d?d:e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(c)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i;i=i-t.size}else{t.y1=t.size+r;r=r+t.size}})});var A=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});i.domain(y||d3.merge(A).map(function(e){return e.x})).rangeBands(w||[0,C],S);s.domain(b||d3.extent(d3.merge(A).map(function(e){return c?e.y>0?e.y1:e.y1+e.y:e.y}).concat(f))).range(E||[k,0]);if(i.domain()[0]===i.domain()[1])i.domain()[0]?i.domain([i.domain()[0]-i.domain()[0]*.01,i.domain()[1]+i.domain()[1]*.01]):i.domain([-1,1]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]+s.domain()[0]*.01,s.domain()[1]-s.domain()[1]*.01]):s.domain([-1,1]);T=T||i;N=N||s;var O=L.selectAll("g.nv-wrap.nv-multibar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar");var _=M.append("defs");var D=M.append("g");var P=O.select("g");D.append("g").attr("class","nv-groups");O.attr("transform","translate("+t.left+","+t.top+")");_.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect");O.select("#nv-edge-clip-"+o+" rect").attr("width",C).attr("height",k);P.attr("clip-path",l?"url(#nv-edge-clip-"+o+")":"");var H=O.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);H.exit().transition().selectAll("rect.nv-bar").delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e){return c?N(e.y0):N(0)}).attr("height",0).remove();H.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return p(e,t)}).style("stroke",function(e,t){return p(e,t)});H.transition().style("stroke-opacity",1).style("fill-opacity",.75);var B=H.selectAll("rect.nv-bar").data(function(t){return d&&!e.length?d.values:t.values});B.exit().remove();var j=B.enter().append("rect").attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,r){return c?0:r*i.rangeBand()/e.length}).attr("y",function(e){return N(c?e.y0:0)}).attr("height",0).attr("width",i.rangeBand()/(c?1:e.length)).attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});B.style("fill",function(e,t,n){return p(e,n,t)}).style("stroke",function(e,t,n){return p(e,n,t)}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);x.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);x.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){x.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){x.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});B.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).transition().attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});if(v){if(!m)m=e.map(function(){return true});B.style("fill",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()})}if(c)B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e,t){return s(c?e.y1:0)}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(e.y+(c?e.y0:0))-s(c?e.y0:0)),1)}).attr("x",function(t,n){return c?0:t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/(c?1:e.length));else B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("x",function(t,n){return t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/e.length).attr("y",function(e,t){return a(e,t)<0?s(0):s(0)-s(a(e,t))<1?s(0)-1:s(a(e,t))||0}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(a(e,t))-s(0)),1)||0});T=i.copy();N=s.copy()});return C}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=d3.scale.ordinal(),s=d3.scale.linear(),o=Math.floor(Math.random()*1e4),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=true,c=false,h="zero",p=e.utils.defaultColor(),d=false,v=null,m,g=1200,y,b,w,E,S=.1,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var T,N;C.dispatch=x;C.options=e.utils.optionsFunc.bind(C);C.x=function(e){if(!arguments.length)return u;u=e;return C};C.y=function(e){if(!arguments.length)return a;a=e;return C};C.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return C};C.width=function(e){if(!arguments.length)return n;n=e;return C};C.height=function(e){if(!arguments.length)return r;r=e;return C};C.xScale=function(e){if(!arguments.length)return i;i=e;return C};C.yScale=function(e){if(!arguments.length)return s;s=e;return C};C.xDomain=function(e){if(!arguments.length)return y;y=e;return C};C.yDomain=function(e){if(!arguments.length)return b;b=e;return C};C.xRange=function(e){if(!arguments.length)return w;w=e;return C};C.yRange=function(e){if(!arguments.length)return E;E=e;return C};C.forceY=function(e){if(!arguments.length)return f;f=e;return C};C.stacked=function(e){if(!arguments.length)return c;c=e;return C};C.stackOffset=function(e){if(!arguments.length)return h;h=e;return C};C.clipEdge=function(e){if(!arguments.length)return l;l=e;return C};C.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return C};C.barColor=function(t){if(!arguments.length)return v;v=e.utils.getColor(t);return C};C.disabled=function(e){if(!arguments.length)return m;m=e;return C};C.id=function(e){if(!arguments.length)return o;o=e;return C};C.hideable=function(e){if(!arguments.length)return d;d=e;return C};C.delay=function(e){if(!arguments.length)return g;g=e;return C};C.groupSpacing=function(e){if(!arguments.length)return S;S=e;return C};return C};e.models.multiBarChart=function(){"use strict";function M(e){e.each(function(e){var h=d3.select(this),E=this;var _=(u||parseInt(h.style("width"))||960)-o.left-o.right,D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom;M.update=function(){h.transition().duration(A).call(M)};M.container=this;if(w=="right")_=_-250;T.disabled=e.map(function(e){return!!e.disabled});if(!N){var P;N={};for(P in T){if(T[P]instanceof Array)N[P]=T[P].slice(0);else N[P]=T[P]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var H=h.selectAll(".nv-noData").data([C]);H.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");H.attr("x",o.left+_/2).attr("y",o.top+D/2).text(function(e){return e});return M}else{h.selectAll(".nv-noData").remove()}S=t.xScale();x=t.yScale();var B=h.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]);var j=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g");var F=B.select("g");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-barsWrap");j.append("g").attr("class","nv-legendWrap");j.append("g").attr("class","nv-controlsWrap");if(c){i.width(_-L());if(t.barColor())e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});F.select(".nv-legendWrap").datum(e).call(i);if(o.top!=i.height()){o.top=i.height();D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom}if(w=="right"){F.select(".nv-legendWrap").attr("transform","translate("+_+","+(-o.top+20+30)+")")}else{F.select(".nv-legendWrap").attr("transform","translate("+L()+","+ -o.top+")")}}if(l){var I=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(L()).color(["#444","#444","#444"]);F.select(".nv-controlsWrap").datum(I).call(s);if(w=="right"){F.select(".nv-controlsWrap").attr("transform","translate("+_+","+(-o.top+20)+")")}else{F.select(".nv-controlsWrap").attr("transform","translate("+0+","+ -o.top+")")}}B.attr("transform","translate("+o.left+","+o.top+")");if(v){F.select(".nv-y.nv-axis").attr("transform","translate("+_+",0)")}t.disabled(e.map(function(e){return e.disabled})).width(_).height(D).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var q=F.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));q.transition().call(t);if(p){n.scale(S).ticks(_/100).tickSize(-D,0);F.select(".nv-x.nv-axis").attr("transform","translate(0,"+x.range()[0]+")");F.select(".nv-x.nv-axis").transition().call(n);var R=F.select(".nv-x.nv-axis > g").selectAll("g");R.selectAll("line, text").style("opacity",1);if(g){var U=function(e,t){return"translate("+e+","+t+")"};var z=5,W=17;R.selectAll("text").attr("transform",function(e,t,n){return U(0,n%2==0?z:W)});var X=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;F.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){return U(0,t===0||X%2!==0?W:z)})}if(m)R.filter(function(t,n){return n%Math.ceil(e[0].values.length/(_/100))!==0}).selectAll("text, line").style("opacity",0);if(y)R.selectAll(".tick text").attr("transform","rotate("+y+" 0,0)").style("text-anchor",y>0?"start":"end");F.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}if(d){r.scale(x).ticks(D/36).tickSize(-_,0);F.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){T=e;k.stateChange(T);M.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;I=I.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}T.stacked=t.stacked();k.stateChange(T);M.update()});k.on("tooltipShow",function(e){if(b)O(e,E.parentNode)});k.on("changeState",function(n){if(typeof n.disabled!=="undefined"){e.forEach(function(e,t){e.disabled=n.disabled[t]});T.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);T.stacked=n.stacked}M.update()})});return M}var t=e.models.multiBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend();var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=true,d=true,v=false,m=true,g=false,y=0,b=true,w="top",E=function(e,t,n,r,i,s){if(s){var o=d3.format(",.2f");return"<h3>"+e+"</h3>"+"<p>"+o(Math.pow(10,n))+" on "+t+"</p>"}else{return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"}},S,x,T={stacked:false},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=function(){return l?180:0},A=250;t.stacked(false);n.orient("bottom").tickPadding(7).highlightZero(true).showMaxMin(false).tickFormat(function(e){return e});r.orient(v?"right":"left").tickFormat(d3.format(",.1f"));s.updateState(false);var O=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=E(i.series.key,a,f,i,M,h);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(b)e.tooltip.cleanup()});M.dispatch=k;M.multibar=t;M.legend=i;M.xAxis=n;M.yAxis=r;d3.rebind(M,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","stacked","stackOffset","delay","barColor","groupSpacing");M.options=e.utils.optionsFunc.bind(M);M.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return M};M.width=function(e){if(!arguments.length)return u;u=e;return M};M.height=function(e){if(!arguments.length)return a;a=e;return M};M.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return M};M.showControls=function(e){if(!arguments.length)return l;l=e;return M};M.showLegend=function(e){if(!arguments.length)return c;c=e;return M};M.logScale=function(e){if(!arguments.length)return h;h=e;return M};M.showXAxis=function(e){if(!arguments.length)return p;p=e;return M};M.showYAxis=function(e){if(!arguments.length)return d;d=e;return M};M.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return M};M.reduceXTicks=function(e){if(!arguments.length)return m;m=e;return M};M.rotateLabels=function(e){if(!arguments.length)return y;y=e;return M};M.staggerLabels=function(e){if(!arguments.length)return g;g=e;return M};M.tooltip=function(e){if(!arguments.length)return E;E=e;return M};M.tooltips=function(e){if(!arguments.length)return b;b=e;return M};M.legendPos=function(e){if(!arguments.length)return w;w=e;return M};M.tooltipContent=function(e){if(!arguments.length)return E;E=e;return M};M.state=function(e){if(!arguments.length)return T;T=e;return M};M.defaultState=function(e){if(!arguments.length)return N;N=e;return M};M.noData=function(e){if(!arguments.length)return C;C=e;return M};M.transitionDuration=function(e){if(!arguments.length)return A;A=e;return M};return M};e.models.multiBarHorizontal=function(){"use strict";function N(e){e.each(function(e){var i=n-t.left-t.right,g=r-t.top-t.bottom,N=d3.select(this);if(p)e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(p)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i-t.size;i=i-t.size}else{t.y1=r;r=r+t.size}})});var C=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});s.domain(y||d3.merge(C).map(function(e){return e.x})).rangeBands(w||[0,g],.1);o.domain(b||d3.extent(d3.merge(C).map(function(e){return p?e.y>0?e.y1+e.y:e.y1:e.y}).concat(f)));if(d&&!p)o.range(E||[o.domain()[0]<0?v:0,i-(o.domain()[1]>0?v:0)]);else o.range(E||[0,i]);x=x||s;T=T||d3.scale.linear().domain(o.domain()).range([o(0),o(0)]);var k=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]);var L=k.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");var A=L.append("defs");var O=L.append("g");var M=k.select("g");O.append("g").attr("class","nv-groups");k.attr("transform","translate("+t.left+","+t.top+")");var _=k.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});_.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);_.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();_.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return l(e,t)}).style("stroke",function(e,t){return l(e,t)});_.transition().style("stroke-opacity",1).style("fill-opacity",.75);var D=_.selectAll("g.nv-bar").data(function(e){return e.values});D.exit().remove();var P=D.enter().append("g").attr("transform",function(t,n,r){return"translate("+T(p?t.y0:0)+","+(p?0:r*s.rangeBand()/e.length+s(u(t,n)))+")"});P.append("rect").attr("width",0).attr("height",s.rangeBand()/(p?1:e.length));D.on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[o(a(t,n)+(p?t.y0:0)),s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){S.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){S.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});P.append("text");if(d&&!p){D.select("text").attr("text-anchor",function(e,t){return a(e,t)<0?"end":"start"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return m(a(e,t))});D.transition().select("text").attr("x",function(e,t){return a(e,t)<0?-4:o(a(e,t))-o(0)+4})}else{D.selectAll("text").text("")}D.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"});if(c){if(!h)h=e.map(function(){return true});D.style("fill",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()})}if(p)D.transition().attr("transform",function(e,t){return"translate("+o(e.y1)+","+s(u(e,t))+")"}).select("rect").attr("width",function(e,t){return Math.abs(o(a(e,t)+e.y0)-o(e.y0))}).attr("height",s.rangeBand());else D.transition().attr("transform",function(t,n){return"translate("+(a(t,n)<0?o(a(t,n)):o(0))+","+(t.series*s.rangeBand()/e.length+s(u(t,n)))+")"}).select("rect").attr("height",s.rangeBand()/e.length).attr("width",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(0)),1)});x=s.copy();T=o.copy()});return N}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=null,h,p=false,d=false,v=60,m=d3.format(",.2f"),g=1200,y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var x,T;N.dispatch=S;N.options=e.utils.optionsFunc.bind(N);N.x=function(e){if(!arguments.length)return u;u=e;return N};N.y=function(e){if(!arguments.length)return a;a=e;return N};N.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return N};N.width=function(e){if(!arguments.length)return n;n=e;return N};N.height=function(e){if(!arguments.length)return r;r=e;return N};N.xScale=function(e){if(!arguments.length)return s;s=e;return N};N.yScale=function(e){if(!arguments.length)return o;o=e;return N};N.xDomain=function(e){if(!arguments.length)return y;y=e;return N};N.yDomain=function(e){if(!arguments.length)return b;b=e;return N};N.xRange=function(e){if(!arguments.length)return w;w=e;return N};N.yRange=function(e){if(!arguments.length)return E;E=e;return N};N.forceY=function(e){if(!arguments.length)return f;f=e;return N};N.stacked=function(e){if(!arguments.length)return p;p=e;return N};N.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return N};N.barColor=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);return N};N.disabled=function(e){if(!arguments.length)return h;h=e;return N};N.id=function(e){if(!arguments.length)return i;i=e;return N};N.delay=function(e){if(!arguments.length)return g;g=e;return N};N.showValues=function(e){if(!arguments.length)return d;d=e;return N};N.valueFormat=function(e){if(!arguments.length)return m;m=e;return N};N.valuePadding=function(e){if(!arguments.length)return v;v=e;return N};return N};e.models.multiBarHorizontalChart=function(){"use strict";function C(e){e.each(function(h){var p=d3.select(this),m=this;var k=(u||parseInt(p.style("width"))||960)-o.left-o.right,L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom;C.update=function(){p.transition().duration(T).call(C)};C.container=this;if(v=="right")k=k-250;b.disabled=h.map(function(e){return!!e.disabled});if(!w){var A;w={};for(A in b){if(b[A]instanceof Array)w[A]=b[A].slice(0);else w[A]=b[A]}}if(!h||!h.length||!h.filter(function(e){return e.values.length}).length){var O=p.selectAll(".nv-noData").data([E]);O.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");O.attr("x",o.left+k/2).attr("y",o.top+L/2).text(function(e){return e});return C}else{p.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var M=p.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([h]);var _=M.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g");var D=M.select("g");_.append("g").attr("class","nv-x nv-axis");_.append("g").attr("class","nv-y nv-axis");_.append("g").attr("class","nv-barsWrap");_.append("g").attr("class","nv-legendWrap");_.append("g").attr("class","nv-controlsWrap");if(c){i.width(k-x());if(t.barColor())h.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});D.select(".nv-legendWrap").datum(h).call(i);if(o.top!=i.height()){o.top=i.height();L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom}if(v=="right"){D.select(".nv-legendWrap").attr("transform","translate("+x()+","+20+")")}else{D.select(".nv-legendWrap").attr("transform","translate("+x()+","+ -o.top+")")}}if(l){var P=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(x()).color(["#444","#444","#444"]);D.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+ -o.top+")").call(s)}M.attr("transform","translate("+o.left+","+o.top+")");t.disabled(h.map(function(e){return e.disabled})).width(k).height(L).color(h.map(function(e,t){return e.color||f(e,t)}).filter(function(e,t){return!h[t].disabled}));var H=D.select(".nv-barsWrap").datum(h.filter(function(e){return!e.disabled}));H.transition().call(t);n.scale(g).ticks(L/24).tickSize(-k,0);D.select(".nv-x.nv-axis").transition().call(n);var B=D.select(".nv-x.nv-axis").selectAll("g");B.selectAll("line, text").style("opacity",1);r.scale(y).ticks(k/100).tickSize(-L,0);D.select(".nv-y.nv-axis").attr("transform","translate(0,"+L+")");D.select(".nv-y.nv-axis").transition().call(r);i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);C.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;P=P.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}b.stacked=t.stacked();S.stateChange(b);C.update()});S.on("tooltipShow",function(e){if(d)N(e,m.parentNode)});S.on("changeState",function(n){if(typeof n.disabled!=="undefined"){h.forEach(function(e,t){e.disabled=n.disabled[t]});b.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);b.stacked=n.stacked}e.call(C)})});return C}var t=e.models.multiBarHorizontal(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend().height(30),s=e.models.legend().height(30);var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=false,d=true,v="top",m=function(e,t,n,i,s,o){if(o){return"<h3>"+e+" - "+t+"</h3>"+"<p>"+r.tickFormat()(Math.pow(10,n))+"</p>"}else{return"<h3>"+e+" - "+t+"</h3>"+"<p>"+n+"</p>"}},g,y,b={stacked:p},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=function(){return l?180:0},T=250;t.stacked(p);n.orient("left").tickPadding(5).highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient("bottom").tickFormat(d3.format(",.1f"));s.updateState(false);var N=function(i,s){var o=0;if(i.pos[0]>=200)o=200;else o=i.pos[0];if(h)l=t.y()(i.point,i.pointIndex);else l=r.tickFormat()(t.y()(i.point,i.pointIndex));var u=o+(s.offsetLeft||0),a=i.pos[1]+(s.offsetTop||0),f=n.tickFormat()(t.x()(i.point,i.pointIndex)),l=r.tickFormat()(t.y()(i.point,i.pointIndex)),c=m(i.series.key,f,l,i,C,h);e.tooltip.show([u,a],c,i.value<0?"e":"w",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});C.dispatch=S;C.multibar=t;C.legend=i;C.xAxis=n;C.yAxis=r;d3.rebind(C,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor");C.options=e.utils.optionsFunc.bind(C);C.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return C};C.width=function(e){if(!arguments.length)return u;u=e;return C};C.height=function(e){if(!arguments.length)return a;a=e;return C};C.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return C};C.showControls=function(e){if(!arguments.length)return l;l=e;return C};C.showLegend=function(e){if(!arguments.length)return c;c=e;return C};C.logScale=function(e){if(!arguments.length)return h;h=e;return C};C.tooltip=function(e){if(!arguments.length)return m;m=e;return C};C.tooltips=function(e){if(!arguments.length)return d;d=e;return C};C.legendPos=function(e){if(!arguments.length)return v;v=e;return C};C.tooltipContent=function(e){if(!arguments.length)return m;m=e;return C};C.state=function(e){if(!arguments.length)return b;b=e;return C};C.defaultState=function(e){if(!arguments.length)return w;w=e;return C};C.noData=function(e){if(!arguments.length)return E;E=e;return C};C.transitionDuration=function(e){if(!arguments.length)return T;T=e;return C};return C};e.models.multiChart=function(){"use strict";function L(e){e.each(function(e){var f=d3.select(this),c=this;L.update=function(){f.transition().call(L)};L.container=this;var h=(r||parseInt(f.style("width"))||960)-t.left-t.right,p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom;if(a=="right")h=h-250;var A=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==1});var O=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==2});var M=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==1});var _=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==2});var D=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==1});var P=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==2});var H=e.filter(function(e){return!e.disabled&&e.yAxis==1}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});var B=e.filter(function(e){return!e.disabled&&e.yAxis==2}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});l.domain(d3.extent(d3.merge(H.concat(B)),function(e){return e.x})).range([0,h]);var j=f.selectAll("g.wrap.multiChart").data([e]);var F=j.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");F.append("g").attr("class","x axis");F.append("g").attr("class","y1 axis");F.append("g").attr("class","y2 axis");F.append("g").attr("class","lines1Wrap");F.append("g").attr("class","lines2Wrap");F.append("g").attr("class","bars1Wrap");F.append("g").attr("class","bars2Wrap");F.append("g").attr("class","stack1Wrap");F.append("g").attr("class","stack2Wrap");F.append("g").attr("class","legendWrap");var I=j.select("g");if(s){N.width(h/2);I.select(".legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.yAxis==1?"":" (right axis)");return e})).call(N);if(t.top!=N.height()){t.top=N.height();p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom}if(a=="right"){I.select(".legendWrap").attr("transform","translate("+h+","+20+")")}else{I.select(".legendWrap").attr("transform","translate("+h/2+","+ -t.top+")")}}m.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="line"}));g.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="line"}));y.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="bar"}));b.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="bar"}));w.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="area"}));E.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="area"}));if(a=="right"){I.attr("transform","translate("+t.left+","+"20"+")")}else{I.attr("transform","translate("+t.left+","+t.top+")")}var q=I.select(".lines1Wrap").datum(A);var R=I.select(".bars1Wrap").datum(M);var U=I.select(".stack1Wrap").datum(D);var z=I.select(".lines2Wrap").datum(O);var W=I.select(".bars2Wrap").datum(_);var X=I.select(".stack2Wrap").datum(P);var V=D.length?D.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];var $=P.length?P.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];d.domain(d3.extent(d3.extent(d3.merge(H).concat(V),function(e){return e.y}).concat(m.forceY()))).range([0,p]);v.domain(d3.extent(d3.extent(d3.merge(B).concat($),function(e){return e.y}).concat(g.forceY()))).range([0,p]);m.yDomain(d.domain());y.yDomain(d.domain());w.yDomain(d.domain());g.yDomain(v.domain());b.yDomain(v.domain());E.yDomain(v.domain());if(D.length){d3.transition(U).call(w)}if(P.length){d3.transition(X).call(E)}if(M.length){d3.transition(R).call(y)}if(_.length){d3.transition(W).call(b)}if(A.length){d3.transition(q).call(m)}if(O.length){d3.transition(z).call(g)}S.ticks(h/100).tickSize(-p,0);I.select(".x.axis").attr("transform","translate(0,"+p+")");d3.transition(I.select(".x.axis")).call(S);x.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y1.axis")).call(x);T.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y2.axis")).call(T);I.select(".y2.axis").style("opacity",B.length?1:0).attr("transform","translate("+l.range()[1]+",0)");N.dispatch.on("stateChange",function(e){L.update()});if(u){N.dualaxis(true)}else{N.dualaxis(false)}C.on("tooltipShow",function(e){if(o)k(e,c.parentNode)})});return L}var t={top:30,right:20,bottom:50,left:60},n=d3.scale.category20().range(),r=null,i=null,s=true,o=true,u=false,a="top",f=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},l,c,h,p;var l=d3.scale.linear(),d=d3.scale.linear(),v=d3.scale.linear(),m=e.models.line().yScale(d),g=e.models.line().yScale(v),y=e.models.multiBar().stacked(false).yScale(d),b=e.models.multiBar().stacked(false).yScale(v),w=e.models.stackedArea().yScale(d),E=e.models.stackedArea().yScale(v),S=e.models.axis().scale(l).orient("bottom").tickPadding(5),x=e.models.axis().scale(d).orient("left"),T=e.models.axis().scale(v).orient("right"),N=e.models.legend().height(30),C=d3.dispatch("tooltipShow","tooltipHide");var k=function(t,n){var r=t.pos[0]+(n.offsetLeft||0),i=t.pos[1]+(n.offsetTop||0),s=S.tickFormat()(m.x()(t.point,t.pointIndex)),o=(t.series.yAxis==2?T:x).tickFormat()(m.y()(t.point,t.pointIndex)),u=f(t.series.key,s,o,t,L);e.tooltip.show([r,i],u,undefined,undefined,n.offsetParent)};m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});y.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});y.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});b.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});b.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});w.dispatch.on("tooltipShow",function(e){if(!Math.round(w.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});w.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});E.dispatch.on("tooltipShow",function(e){if(!Math.round(E.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});E.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});C.on("tooltipHide",function(){if(o)e.tooltip.cleanup()});L.dispatch=C;L.lines1=m;L.lines2=g;L.bars1=y;L.bars2=b;L.stack1=w;L.stack2=E;L.xAxis=S;L.yAxis1=x;L.yAxis2=T;L.options=e.utils.optionsFunc.bind(L);L.x=function(e){if(!arguments.length)return getX;getX=e;m.x(e);y.x(e);return L};L.y=function(e){if(!arguments.length)return getY;getY=e;m.y(e);y.y(e);return L};L.yDomain1=function(e){if(!arguments.length)return h;h=e;return L};L.yDomain2=function(e){if(!arguments.length)return p;p=e;return L};L.margin=function(e){if(!arguments.length)return t;t=e;return L};L.width=function(e){if(!arguments.length)return r;r=e;return L};L.height=function(e){if(!arguments.length)return i;i=e;return L};L.color=function(e){if(!arguments.length)return n;n=e;N.color(e);return L};L.showLegend=function(e){if(!arguments.length)return s;s=e;return L};L.tooltips=function(e){if(!arguments.length)return o;o=e;return L};L.dualaxis=function(e){if(!arguments.length)return u;u=e;return L};L.legendPos=function(e){if(!arguments.length)return a;a=e;return L};L.tooltipContent=function(e){if(!arguments.length)return f;f=e;return L};return L};e.models.ohlcBar=function(){"use strict";function x(e){e.each(function(e){var g=n-t.left-t.right,x=r-t.top-t.bottom,T=d3.select(this);s.domain(y||d3.extent(e[0].values.map(u).concat(p)));if(v)s.range(w||[g*.5/e[0].values.length,g*(e[0].values.length-.5)/e[0].values.length]);else s.range(w||[0,g]);o.domain(b||[d3.min(e[0].values.map(h).concat(d)),d3.max(e[0].values.map(c).concat(d))]).range(E||[x,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar");var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-ticks");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",g).attr("height",x);A.attr("clip-path",m?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-ticks").selectAll(".nv-tick").data(function(e){return e});O.exit().remove();var M=O.enter().append("path").attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"}).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({point:t,series:e[0],pos:[s(u(t,n)),o(a(t,n))],pointIndex:n,seriesIndex:0,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({point:t,series:e[0],pointIndex:n,seriesIndex:0,e:d3.event})}).on("click",function(e,t){S.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){S.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t});d3.transition(O).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"})});return x}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=function(e){return e.open},l=function(e){return e.close},c=function(e){return e.high},h=function(e){return e.low},p=[],d=[],v=false,m=true,g=e.utils.defaultColor(),y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");x.dispatch=S;x.options=e.utils.optionsFunc.bind(x);x.x=function(e){if(!arguments.length)return u;u=e;return x};x.y=function(e){if(!arguments.length)return a;a=e;return x};x.open=function(e){if(!arguments.length)return f;f=e;return x};x.close=function(e){if(!arguments.length)return l;l=e;return x};x.high=function(e){if(!arguments.length)return c;c=e;return x};x.low=function(e){if(!arguments.length)return h;h=e;return x};x.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return x};x.width=function(e){if(!arguments.length)return n;n=e;return x};x.height=function(e){if(!arguments.length)return r;r=e;return x};x.xScale=function(e){if(!arguments.length)return s;s=e;return x};x.yScale=function(e){if(!arguments.length)return o;o=e;return x};x.xDomain=function(e){if(!arguments.length)return y;y=e;return x};x.yDomain=function(e){if(!arguments.length)return b;b=e;return x};x.xRange=function(e){if(!arguments.length)return w;w=e;return x};x.yRange=function(e){if(!arguments.length)return E;E=e;return x};x.forceX=function(e){if(!arguments.length)return p;p=e;return x};x.forceY=function(e){if(!arguments.length)return d;d=e;return x};x.padData=function(e){if(!arguments.length)return v;v=e;return x};x.clipEdge=function(e){if(!arguments.length)return m;m=e;return x};x.color=function(t){if(!arguments.length)return g;g=e.utils.getColor(t);return x};x.id=function(e){if(!arguments.length)return i;i=e;return x};return x};e.models.pie=function(){"use strict";function E(e){e.each(function(e){function P(e){var t=(e.startAngle+e.endAngle)*90/Math.PI-90;return t>90?t-180:t}function H(e){e.endAngle=isNaN(e.endAngle)?0:e.endAngle;e.startAngle=isNaN(e.startAngle)?0:e.startAngle;if(!v)e.innerRadius=0;var t=d3.interpolate(this._current,e);this._current=t(0);return function(e){return L(t(e))}}function B(e){e.innerRadius=0;var t=d3.interpolate({startAngle:0,endAngle:0},e);return function(e){return L(t(e))}}var o=n-t.left-t.right,f=r-t.top-t.bottom,E=Math.min(o,f)/2,S=E-E/5,x=d3.select(this);var T=x.selectAll(".nv-wrap.nv-pie").data(e);var N=T.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u);var C=N.append("g");var k=T.select("g");C.append("g").attr("class","nv-pie");T.attr("transform","translate("+t.left+","+t.top+")");k.select(".nv-pie").attr("transform","translate("+o/2+","+f/2+")");x.on("click",function(e,t){w.chartClick({data:e,index:t,pos:d3.event,id:u})});var L=d3.svg.arc().outerRadius(S);if(g)L.startAngle(g);if(y)L.endAngle(y);if(v)L.innerRadius(E*b);var A=d3.layout.pie().sort(null).value(function(e){return e.disabled?0:s(e)});var O=T.select(".nv-pie").selectAll(".nv-slice").data(A);O.exit().remove();var M=O.enter().append("g").attr("class","nv-slice").on("mouseover",function(e,t){d3.select(this).classed("hover",true);w.elementMouseover({label:i(e.data),value:s(e.data),point:e.data,pointIndex:t,pos:[d3.event.pageX,d3.event.pageY],id:u})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);w.elementMouseout({label:i(e.data),value:s(e.data),point:e.data,index:t,id:u})}).on("click",function(e,t){w.elementClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()}).on("dblclick",function(e,t){w.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()});O.attr("fill",function(e,t){return a(e,t)}).attr("stroke",function(e,t){return a(e,t)});var _=M.append("path").each(function(e){this._current=e});d3.transition(O.select("path")).attr("d",L).attrTween("d",H);if(l){var D=d3.svg.arc().innerRadius(0);if(c){D=L}if(h){D=d3.svg.arc().outerRadius(L.outerRadius())}M.append("g").classed("nv-label",true).each(function(e,t){var n=d3.select(this);n.attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3);n.append("text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});O.select(".nv-label").transition().attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});O.each(function(e,t){var n=d3.select(this);n.select(".nv-label text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").text(function(e,t){var n=(e.endAngle-e.startAngle)/(2*Math.PI);var r={key:i(e.data),value:s(e.data),percent:d3.format("%")(n)};return e.value&&n>d?r[p]:""});var r=n.select("text").node().getBBox();n.select(".nv-label rect").attr("width",r.width+10).attr("height",r.height+10).attr("transform",function(){return"translate("+[r.x-5,r.y-5]+")"})})}});return E}var t={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},s=function(e){return e.y},o=function(e){return e.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=true,c=true,h=false,p="key",d=.02,v=false,m=false,g=false,y=false,b=.5,w=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");E.dispatch=w;E.options=e.utils.optionsFunc.bind(E);E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.values=function(t){e.log("pie.values() is no longer supported.");return E};E.x=function(e){if(!arguments.length)return i;i=e;return E};E.y=function(e){if(!arguments.length)return s;s=d3.functor(e);return E};E.description=function(e){if(!arguments.length)return o;o=e;return E};E.showLabels=function(e){if(!arguments.length)return l;l=e;return E};E.labelSunbeamLayout=function(e){if(!arguments.length)return m;m=e;return E};E.donutLabelsOutside=function(e){if(!arguments.length)return h;h=e;return E};E.pieLabelsOutside=function(e){if(!arguments.length)return c;c=e;return E};E.labelType=function(e){if(!arguments.length)return p;p=e;p=p||"key";return E};E.donut=function(e){if(!arguments.length)return v;v=e;return E};E.donutRatio=function(e){if(!arguments.length)return b;b=e;return E};E.startAngle=function(e){if(!arguments.length)return g;g=e;return E};E.endAngle=function(e){if(!arguments.length)return y;y=e;return E};E.id=function(e){if(!arguments.length)return u;u=e;return E};E.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);return E};E.valueFormat=function(e){if(!arguments.length)return f;f=e;return E};E.labelThreshold=function(e){if(!arguments.length)return d;d=e;return E};return E};e.models.pieChart=function(){"use strict";function v(e){e.each(function(e){var u=d3.select(this),a=this;var f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)};v.container=this;l.disabled=e.map(function(e){return!!e.disabled});if(!c){var m;c={};for(m in l){if(l[m]instanceof Array)c[m]=l[m].slice(0);else c[m]=l[m]}}if(!e||!e.length){var g=u.selectAll(".nv-noData").data([h]);g.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");g.attr("x",r.left+f/2).attr("y",r.top+d/2).text(function(e){return e});return v}else{u.selectAll(".nv-noData").remove()}var y=u.selectAll("g.nv-wrap.nv-pieChart").data([e]);var b=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g");var w=y.select("g");b.append("g").attr("class","nv-pieWrap");b.append("g").attr("class","nv-legendWrap");if(o){n.width(f).key(t.x());y.select(".nv-legendWrap").datum(e).call(n);if(r.top!=n.height()){r.top=n.height();d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom}y.select(".nv-legendWrap").attr("transform","translate(0,"+ -r.top+")")}y.attr("transform","translate("+r.left+","+r.top+")");t.width(f).height(d);var E=w.select(".nv-pieWrap").datum([e]);d3.transition(E).call(t);n.dispatch.on("stateChange",function(e){l=e;p.stateChange(l);v.update()});t.dispatch.on("elementMouseout.tooltip",function(e){p.tooltipHide(e)});p.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});l.disabled=t.disabled}v.update()})});return v}var t=e.models.pie(),n=e.models.legend();var r={top:30,right:20,bottom:20,left:20},i=null,s=null,o=true,u=e.utils.defaultColor(),a=true,f=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+t+"</p>"},l={},c=null,h="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");var d=function(n,r){var i=t.description()(n.point)||t.x()(n.point);var s=n.pos[0]+(r&&r.offsetLeft||0),o=n.pos[1]+(r&&r.offsetTop||0),u=t.valueFormat()(t.y()(n.point)),a=f(i,u,n,v);e.tooltip.show([s,o],a,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+r.left,e.pos[1]+r.top];p.tooltipShow(e)});p.on("tooltipShow",function(e){if(a)d(e)});p.on("tooltipHide",function(){if(a)e.tooltip.cleanup()});v.legend=n;v.dispatch=p;v.pie=t;d3.rebind(v,t,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","labelType","donut","donutRatio","labelThreshold");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return r;r.top=typeof e.top!="undefined"?e.top:r.top;r.right=typeof e.right!="undefined"?e.right:r.right;r.bottom=typeof e.bottom!="undefined"?e.bottom:r.bottom;r.left=typeof e.left!="undefined"?e.left:r.left;return v};v.width=function(e){if(!arguments.length)return i;i=e;return v};v.height=function(e){if(!arguments.length)return s;s=e;return v};v.color=function(r){if(!arguments.length)return u;u=e.utils.getColor(r);n.color(u);t.color(u);return v};v.showLegend=function(e){if(!arguments.length)return o;o=e;return v};v.tooltips=function(e){if(!arguments.length)return a;a=e;return v};v.tooltipContent=function(e){if(!arguments.length)return f;f=e;return v};v.state=function(e){if(!arguments.length)return l;l=e;return v};v.defaultState=function(e){if(!arguments.length)return c;c=e;return v};v.noData=function(e){if(!arguments.length)return h;h=e;return v};return v};e.models.scatter=function(){"use strict";function I(q){q.each(function(I){function Q(){if(!g)return false;var e;var i=d3.merge(I.map(function(e,t){return e.values.map(function(e,n){var r=f(e,n);var i=l(e,n);return[o(r)+Math.random()*1e-7,u(i)+Math.random()*1e-7,t,n,e]}).filter(function(e,t){return b(e[4],t)})}));if(D===true){if(x){var a=X.select("defs").selectAll(".nv-point-clips").data([s]).enter();a.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+s);var c=X.select("#nv-points-clip-"+s).selectAll("circle").data(i);c.enter().append("circle").attr("r",T);c.exit().remove();c.attr("cx",function(e){return e[0]}).attr("cy",function(e){return e[1]});X.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+s+")")}if(i.length){i.push([o.range()[0]-20,u.range()[0]-20,null,null]);i.push([o.range()[1]+20,u.range()[1]+20,null,null]);i.push([o.range()[0]-20,u.range()[0]+20,null,null]);i.push([o.range()[1]+20,u.range()[1]-20,null,null])}var h=d3.geom.polygon([[-10,-10],[-10,r+10],[n+10,r+10],[n+10,-10]]);var p=d3.geom.voronoi(i).map(function(e,t){return{data:h.clip(e),series:i[t][2],point:i[t][3]}});var d=X.select(".nv-point-paths").selectAll("path").data(p);d.enter().append("path").attr("class",function(e,t){return"nv-path-"+t});d.exit().remove();d.attr("d",function(e){if(e.data.length===0)return"M 0 0";else return"M"+e.data.join("L")+"Z"});var v=function(e,n){if(F)return 0;var r=I[e.series];if(typeof r==="undefined")return;var i=r.values[e.point];n({point:i,series:r,pos:[o(f(i,e.point))+t.left,u(l(i,e.point))+t.top],seriesIndex:e.series,pointIndex:e.point})};d.on("click",function(e){v(e,_.elementClick)}).on("mouseover",function(e){v(e,_.elementMouseover)}).on("mouseout",function(e,t){v(e,_.elementMouseout)})}else{X.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementClick({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseover",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementMouseover({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseout",function(e,t){if(F||!I[e.series])return 0;var n=I[e.series],r=n.values[t];_.elementMouseout({point:r,series:n,seriesIndex:e.series,pointIndex:t})})}F=false}var q=n-t.left-t.right,R=r-t.top-t.bottom,U=d3.select(this);I.forEach(function(e,t){e.values.forEach(function(e){e.series=t})});var W=N&&C&&A?[]:d3.merge(I.map(function(e){return e.values.map(function(e,t){return{x:f(e,t),y:l(e,t),size:c(e,t)}})}));o.domain(N||d3.extent(W.map(function(e){return e.x}).concat(d)));if(w&&I[0])o.range(k||[(q*E+q)/(2*I[0].values.length),q-q*(1+E)/(2*I[0].values.length)]);else o.range(k||[0,q]);u.domain(C||d3.extent(W.map(function(e){return e.y}).concat(v))).range(L||[R,0]);a.domain(A||d3.extent(W.map(function(e){return e.size}).concat(m))).range(O||[16,256]);if(o.domain()[0]===o.domain()[1]||u.domain()[0]===u.domain()[1])M=true;if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]-o.domain()[0]*.01,o.domain()[1]+o.domain()[1]*.01]):o.domain([-1,1]);if(u.domain()[0]===u.domain()[1])u.domain()[0]?u.domain([u.domain()[0]-u.domain()[0]*.01,u.domain()[1]+u.domain()[1]*.01]):u.domain([-1,1]);if(isNaN(o.domain()[0])){o.domain([-1,1])}if(isNaN(u.domain()[0])){u.domain([-1,1])}P=P||o;H=H||u;B=B||a;var X=U.selectAll("g.nv-wrap.nv-scatter").data([I]);var V=X.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+s+(M?" nv-single-point":""));var $=V.append("defs");var J=V.append("g");var K=X.select("g");J.append("g").attr("class","nv-groups");J.append("g").attr("class","nv-point-paths");X.attr("transform","translate("+t.left+","+t.top+")");$.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");X.select("#nv-edge-clip-"+s+" rect").attr("width",q).attr("height",R);K.attr("clip-path",S?"url(#nv-edge-clip-"+s+")":"");F=true;var G=X.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);G.exit().remove();G.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});G.transition().style("fill",function(e,t){return i(e,t)}).style("stroke",function(e,t){return i(e,t)}).style("stroke-opacity",1).style("fill-opacity",.5);if(p){var Y=G.selectAll("circle.nv-point").data(function(e){return e.values},y);Y.enter().append("circle").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("cx",function(t,n){return e.utils.NaNtoZero(P(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(H(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)});Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)})}else{var Y=G.selectAll("path.nv-point").data(function(e){return e.values});Y.enter().append("path").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("transform",function(e,t){return"translate("+P(f(e,t))+","+H(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}));Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}))}clearTimeout(j);j=setTimeout(Q,300);P=o.copy();H=u.copy();B=a.copy()});return I}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=d3.scale.linear(),u=d3.scale.linear(),a=d3.scale.linear(),f=function(e){return e.x},l=function(e){return e.y},c=function(e){return e.size||1},h=function(e){return e.shape||"circle"},p=true,d=[],v=[],m=[],g=true,y=null,b=function(e){return!e.notActive},w=false,E=.1,S=false,x=true,T=function(){return 25},N=null,C=null,k=null,L=null,A=null,O=null,M=false,_=d3.dispatch("elementClick","elementMouseover","elementMouseout"),D=true;var P,H,B,j,F=false;I.clearHighlights=function(){d3.selectAll(".nv-chart-"+s+" .nv-point.hover").classed("hover",false)};I.highlightPoint=function(e,t,n){d3.select(".nv-chart-"+s+" .nv-series-"+e+" .nv-point-"+t).classed("hover",n)};_.on("elementMouseover.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,true)});_.on("elementMouseout.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,false)});I.dispatch=_;I.options=e.utils.optionsFunc.bind(I);I.x=function(e){if(!arguments.length)return f;f=d3.functor(e);return I};I.y=function(e){if(!arguments.length)return l;l=d3.functor(e);return I};I.size=function(e){if(!arguments.length)return c;c=d3.functor(e);return I};I.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return I};I.width=function(e){if(!arguments.length)return n;n=e;return I};I.height=function(e){if(!arguments.length)return r;r=e;return I};I.xScale=function(e){if(!arguments.length)return o;o=e;return I};I.yScale=function(e){if(!arguments.length)return u;u=e;return I};I.zScale=function(e){if(!arguments.length)return a;a=e;return I};I.xDomain=function(e){if(!arguments.length)return N;N=e;return I};I.yDomain=function(e){if(!arguments.length)return C;C=e;return I};I.sizeDomain=function(e){if(!arguments.length)return A;A=e;return I};I.xRange=function(e){if(!arguments.length)return k;k=e;return I};I.yRange=function(e){if(!arguments.length)return L;L=e;return I};I.sizeRange=function(e){if(!arguments.length)return O;O=e;return I};I.forceX=function(e){if(!arguments.length)return d;d=e;return I};I.forceY=function(e){if(!arguments.length)return v;v=e;return I};I.forceSize=function(e){if(!arguments.length)return m;m=e;return I};I.interactive=function(e){if(!arguments.length)return g;g=e;return I};I.pointKey=function(e){if(!arguments.length)return y;y=e;return I};I.pointActive=function(e){if(!arguments.length)return b;b=e;return I};I.padData=function(e){if(!arguments.length)return w;w=e;return I};I.padDataOuter=function(e){if(!arguments.length)return E;E=e;return I};I.clipEdge=function(e){if(!arguments.length)return S;S=e;return I};I.clipVoronoi=function(e){if(!arguments.length)return x;x=e;return I};I.useVoronoi=function(e){if(!arguments.length)return D;D=e;if(D===false){x=false}return I};I.clipRadius=function(e){if(!arguments.length)return T;T=e;return I};I.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return I};I.shape=function(e){if(!arguments.length)return h;h=e;return I};I.onlyCircles=function(e){if(!arguments.length)return p;p=e;return I};I.id=function(e){if(!arguments.length)return s;s=e;return I};I.singlePoint=function(e){if(!arguments.length)return M;M=e;return I};return I};e.models.scatterChart=function(){"use strict";function F(e){e.each(function(e){function K(){if(T){X.select(".nv-point-paths").style("pointer-events","all");return false}X.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(x).focus(i[0]);p.distortion(x).focus(i[1]);X.select(".nv-scatterWrap").call(t);if(b)X.select(".nv-x.nv-axis").call(n);if(w)X.select(".nv-y.nv-axis").call(r);X.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);X.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var C=d3.select(this),k=this;var L=(f||parseInt(C.style("width"))||960)-a.left-a.right,I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom;F.update=function(){C.transition().duration(D).call(F)};F.container=this;A.disabled=e.map(function(e){return!!e.disabled});if(!O){var q;O={};for(q in A){if(A[q]instanceof Array)O[q]=A[q].slice(0);else O[q]=A[q]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=C.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",a.left+L/2).attr("y",a.top+I/2).text(function(e){return e});return F}else{C.selectAll(".nv-noData").remove()}P=P||h;H=H||p;var U=C.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var z=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var W=z.append("g");var X=U.select("g");W.append("rect").attr("class","nvd3 nv-background");W.append("g").attr("class","nv-x nv-axis");W.append("g").attr("class","nv-y nv-axis");W.append("g").attr("class","nv-scatterWrap");W.append("g").attr("class","nv-distWrap");W.append("g").attr("class","nv-legendWrap");W.append("g").attr("class","nv-controlsWrap");if(y){var V=S?L/2:L;i.width(V);U.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom}U.select(".nv-legendWrap").attr("transform","translate("+(L-V)+","+ -a.top+")")}if(S){s.width(180).color(["#444"]);X.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+ -a.top+")").call(s)}U.attr("transform","translate("+a.left+","+a.top+")");if(E){X.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}t.width(L).height(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));if(d!==0)t.xDomain(null);if(v!==0)t.yDomain(null);U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(d!==0){var $=h.domain()[1]-h.domain()[0];t.xDomain([h.domain()[0]-d*$,h.domain()[1]+d*$])}if(v!==0){var J=p.domain()[1]-p.domain()[0];t.yDomain([p.domain()[0]-v*J,p.domain()[1]+v*J])}if(v!==0||d!==0){U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t)}if(b){n.scale(h).ticks(n.ticks()&&n.ticks().length?n.ticks():L/100).tickSize(-I,0);X.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(w){r.scale(p).ticks(r.ticks()&&r.ticks().length?r.ticks():I/36).tickSize(-L,0);X.select(".nv-y.nv-axis").call(r)}if(m){o.getData(t.x()).scale(h).width(L).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionX");X.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(g){u.getData(t.y()).scale(p).width(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionY");X.select(".nv-distributionY").attr("transform","translate("+(E?L:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){X.select(".nv-background").attr("width",L).attr("height",I);X.select(".nv-background").on("mousemove",K);X.select(".nv-background").on("click",function(){T=!T});t.dispatch.on("elementClick.freezeFisheye",function(){T=!T})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;x=e.disabled?0:2.5;X.select(".nv-background").style("pointer-events",e.disabled?"none":"all");X.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(x).focus(0);p.distortion(x).focus(0);X.select(".nv-scatterWrap").call(t);X.select(".nv-x.nv-axis").call(n);X.select(".nv-y.nv-axis").call(r)}else{T=false}F.update()});i.dispatch.on("stateChange",function(e){A.disabled=e.disabled;M.stateChange(A);F.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",function(t,n){return e.pos[1]-I});d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];M.tooltipShow(e)});M.on("tooltipShow",function(e){if(N)B(e,k.parentNode)});M.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});A.disabled=t.disabled}F.update()});P=h.copy();H=p.copy()});return F}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=0,v=0,m=false,g=false,y=true,b=true,w=true,E=false,S=!!d3.fisheye,x=0,T=false,N=true,C=function(e,t,n){return"<strong>"+t+"</strong>"},k=function(e,t,n){return"<strong>"+n+"</strong>"},L=null,A={},O=null,M=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),_="No Data Available.",D=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(E?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var P,H;var B=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(C!=null)e.tooltip.show([f,l],C(i.series.key,v,m,i,F),"n",1,s,"x-nvtooltip");if(k!=null)e.tooltip.show([c,d],k(i.series.key,v,m,i,F),"e",1,s,"y-nvtooltip");if(L!=null)e.tooltip.show([o,u],L(i.series.key,v,m,i,F),i.value<0?"n":"s",null,s)};var j=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){M.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});M.on("tooltipHide",function(){if(N)e.tooltip.cleanup()});F.dispatch=M;F.scatter=t;F.legend=i;F.controls=s;F.xAxis=n;F.yAxis=r;F.distX=o;F.distY=u;d3.rebind(F,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");F.options=e.utils.optionsFunc.bind(F);F.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return F};F.width=function(e){if(!arguments.length)return f;f=e;return F};F.height=function(e){if(!arguments.length)return l;l=e;return F};F.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return F};F.showDistX=function(e){if(!arguments.length)return m;m=e;return F};F.showDistY=function(e){if(!arguments.length)return g;g=e;return F};F.showControls=function(e){if(!arguments.length)return S;S=e;return F};F.showLegend=function(e){if(!arguments.length)return y;y=e;return F};F.showXAxis=function(e){if(!arguments.length)return b;b=e;return F};F.showYAxis=function(e){if(!arguments.length)return w;w=e;return F};F.rightAlignYAxis=function(e){if(!arguments.length)return E;E=e;r.orient(e?"right":"left");return F};F.fisheye=function(e){if(!arguments.length)return x;x=e;return F};F.xPadding=function(e){if(!arguments.length)return d;d=e;return F};F.yPadding=function(e){if(!arguments.length)return v;v=e;return F};F.tooltips=function(e){if(!arguments.length)return N;N=e;return F};F.tooltipContent=function(e){if(!arguments.length)return L;L=e;return F};F.tooltipXContent=function(e){if(!arguments.length)return C;C=e;return F};F.tooltipYContent=function(e){if(!arguments.length)return k;k=e;return F};F.state=function(e){if(!arguments.length)return A;A=e;return F};F.defaultState=function(e){if(!arguments.length)return O;O=e;return F};F.noData=function(e){if(!arguments.length)return _;_=e;return F};F.transitionDuration=function(e){if(!arguments.length)return D;D=e;return F};return F};e.models.scatterPlusLineChart=function(){"use strict";function B(e){e.each(function(e){function $(){if(S){z.select(".nv-point-paths").style("pointer-events","all");return false}z.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(E).focus(i[0]);p.distortion(E).focus(i[1]);z.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(g)z.select(".nv-x.nv-axis").call(n);if(y)z.select(".nv-y.nv-axis").call(r);z.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);z.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var T=d3.select(this),N=this;var C=(f||parseInt(T.style("width"))||960)-a.left-a.right,j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom;B.update=function(){T.transition().duration(M).call(B)};B.container=this;k.disabled=e.map(function(e){return!!e.disabled});if(!L){var F;L={};for(F in k){if(k[F]instanceof Array)L[F]=k[F].slice(0);else L[F]=k[F]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var I=T.selectAll(".nv-noData").data([O]);I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");I.attr("x",a.left+C/2).attr("y",a.top+j/2).text(function(e){return e});return B}else{T.selectAll(".nv-noData").remove()}h=t.xScale();p=t.yScale();_=_||h;D=D||p;var q=T.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var R=q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var U=R.append("g");var z=q.select("g");U.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none");U.append("g").attr("class","nv-x nv-axis");U.append("g").attr("class","nv-y nv-axis");U.append("g").attr("class","nv-scatterWrap");U.append("g").attr("class","nv-regressionLinesWrap");U.append("g").attr("class","nv-distWrap");U.append("g").attr("class","nv-legendWrap");U.append("g").attr("class","nv-controlsWrap");q.attr("transform","translate("+a.left+","+a.top+")");if(b){z.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}if(m){i.width(C/2);q.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom}q.select(".nv-legendWrap").attr("transform","translate("+C/2+","+ -a.top+")")}if(w){s.width(180).color(["#444"]);z.select(".nv-controlsWrap").datum(H).attr("transform","translate(0,"+ -a.top+")").call(s)}t.width(C).height(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));q.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);q.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+t.id()+")");var W=q.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(e){return e});W.enter().append("g").attr("class","nv-regLines");var X=W.selectAll(".nv-regLine").data(function(e){return[e]});var V=X.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0);X.transition().attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",function(e,t){return p(h.domain()[0]*e.slope+e.intercept)}).attr("y2",function(e,t){return p(h.domain()[1]*e.slope+e.intercept)}).style("stroke",function(e,t,n){return c(e,n)}).style("stroke-opacity",function(e,t){return e.disabled||typeof e.slope==="undefined"||typeof e.intercept==="undefined"?0:1});if(g){n.scale(h).ticks(n.ticks()?n.ticks():C/100).tickSize(-j,0);z.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(y){r.scale(p).ticks(r.ticks()?r.ticks():j/36).tickSize(-C,0);z.select(".nv-y.nv-axis").call(r)}if(d){o.getData(t.x()).scale(h).width(C).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionX");z.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(v){u.getData(t.y()).scale(p).width(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionY");z.select(".nv-distributionY").attr("transform","translate("+(b?C:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){z.select(".nv-background").attr("width",C).attr("height",j);z.select(".nv-background").on("mousemove",$);z.select(".nv-background").on("click",function(){S=!S});t.dispatch.on("elementClick.freezeFisheye",function(){S=!S})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;E=e.disabled?0:2.5;z.select(".nv-background").style("pointer-events",e.disabled?"none":"all");z.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(E).focus(0);p.distortion(E).focus(0);z.select(".nv-scatterWrap").call(t);z.select(".nv-x.nv-axis").call(n);z.select(".nv-y.nv-axis").call(r)}else{S=false}B.update()});i.dispatch.on("stateChange",function(e){k=e;A.stateChange(k);B.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.pos[1]-j);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];A.tooltipShow(e)});A.on("tooltipShow",function(e){if(x)P(e,N.parentNode)});A.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});k.disabled=t.disabled}B.update()});_=h.copy();D=p.copy()});return B}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=false,v=false,m=true,g=true,y=true,b=false,w=!!d3.fisheye,E=0,S=false,x=true,T=function(e,t,n){return"<strong>"+t+"</strong>"},N=function(e,t,n){return"<strong>"+n+"</strong>"},C=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+r+"</p>"},k={},L=null,A=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),O="No Data Available.",M=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(b?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var _,D;var P=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(T!=null)e.tooltip.show([f,l],T(i.series.key,v,m,i,B),"n",1,s,"x-nvtooltip");if(N!=null)e.tooltip.show([c,d],N(i.series.key,v,m,i,B),"e",1,s,"y-nvtooltip");if(C!=null)e.tooltip.show([o,u],C(i.series.key,v,m,i.point.tooltip,i,B),i.value<0?"n":"s",null,s)};var H=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){A.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});A.on("tooltipHide",function(){if(x)e.tooltip.cleanup()});B.dispatch=A;B.scatter=t;B.legend=i;B.controls=s;B.xAxis=n;B.yAxis=r;B.distX=o;B.distY=u;d3.rebind(B,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");B.options=e.utils.optionsFunc.bind(B);B.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return B};B.width=function(e){if(!arguments.length)return f;f=e;return B};B.height=function(e){if(!arguments.length)return l;l=e;return B};B.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return B};B.showDistX=function(e){if(!arguments.length)return d;d=e;return B};B.showDistY=function(e){if(!arguments.length)return v;v=e;return B};B.showControls=function(e){if(!arguments.length)return w;w=e;return B};B.showLegend=function(e){if(!arguments.length)return m;m=e;return B};B.showXAxis=function(e){if(!arguments.length)return g;g=e;return B};B.showYAxis=function(e){if(!arguments.length)return y;y=e;return B};B.rightAlignYAxis=function(e){if(!arguments.length)return b;b=e;r.orient(e?"right":"left");return B};B.fisheye=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return x;x=e;return B};B.tooltipContent=function(e){if(!arguments.length)return C;C=e;return B};B.tooltipXContent=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipYContent=function(e){if(!arguments.length)return N;N=e;return B};B.state=function(e){if(!arguments.length)return k;k=e;return B};B.defaultState=function(e){if(!arguments.length)return L;L=e;return B};B.noData=function(e){if(!arguments.length)return O;O=e;return B};B.transitionDuration=function(e){if(!arguments.length)return M;M=e;return B};return B};e.models.sparkline=function(){"use strict";function d(e){e.each(function(e){var i=n-t.left-t.right,d=r-t.top-t.bottom,v=d3.select(this);s.domain(l||d3.extent(e,u)).range(h||[0,i]);o.domain(c||d3.extent(e,a)).range(p||[d,0]);var m=v.selectAll("g.nv-wrap.nv-sparkline").data([e]);var g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");var b=g.append("g");var w=m.select("g");m.attr("transform","translate("+t.left+","+t.top+")");var E=m.selectAll("path").data(function(e){return[e]});E.enter().append("path");E.exit().remove();E.style("stroke",function(e,t){return e.color||f(e,t)}).attr("d",d3.svg.line().x(function(e,t){return s(u(e,t))}).y(function(e,t){return o(a(e,t))}));var S=m.selectAll("circle.nv-point").data(function(e){function n(t){if(t!=-1){var n=e[t];n.pointIndex=t;return n}else{return null}}var t=e.map(function(e,t){return a(e,t)});var r=n(t.lastIndexOf(o.domain()[1])),i=n(t.indexOf(o.domain()[0])),s=n(t.length-1);return[i,r,s].filter(function(e){return e!=null})});S.enter().append("circle");S.exit().remove();S.attr("cx",function(e,t){return s(u(e,e.pointIndex))}).attr("cy",function(e,t){return o(a(e,e.pointIndex))}).attr("r",2).attr("class",function(e,t){return u(e,e.pointIndex)==s.domain()[1]?"nv-point nv-currentValue":a(e,e.pointIndex)==o.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})});return d}var t={top:2,right:0,bottom:2,left:0},n=400,r=32,i=true,s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=e.utils.getColor(["#000"]),l,c,h,p;d.options=e.utils.optionsFunc.bind(d);d.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return d};d.width=function(e){if(!arguments.length)return n;n=e;return d};d.height=function(e){if(!arguments.length)return r;r=e;return d};d.x=function(e){if(!arguments.length)return u;u=d3.functor(e);return d};d.y=function(e){if(!arguments.length)return a;a=d3.functor(e);return d};d.xScale=function(e){if(!arguments.length)return s;s=e;return d};d.yScale=function(e){if(!arguments.length)return o;o=e;return d};d.xDomain=function(e){if(!arguments.length)return l;l=e;return d};d.yDomain=function(e){if(!arguments.length)return c;c=e;return d};d.xRange=function(e){if(!arguments.length)return h;h=e;return d};d.yRange=function(e){if(!arguments.length)return p;p=e;return d};d.animate=function(e){if(!arguments.length)return i;i=e;return d};d.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);return d};return d};e.models.sparklinePlus=function(){"use strict";function v(e){e.each(function(c){function O(){if(a)return;var e=C.selectAll(".nv-hoverValue").data(u);var r=e.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);e.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove();e.attr("transform",function(e){return"translate("+s(t.x()(c[e],e))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!u.length)return;r.append("line").attr("x1",0).attr("y1",-n.top).attr("x2",0).attr("y2",b);r.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-n.top).attr("text-anchor","end").attr("dy",".9em");C.select(".nv-hoverValue .nv-xValue").text(f(t.x()(c[u[0]],u[0])));r.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-n.top).attr("text-anchor","start").attr("dy",".9em");C.select(".nv-hoverValue .nv-yValue").text(l(t.y()(c[u[0]],u[0])))}function M(){function r(e,n){var r=Math.abs(t.x()(e[0],0)-n);var i=0;for(var s=0;s<e.length;s++){if(Math.abs(t.x()(e[s],s)-n)<r){r=Math.abs(t.x()(e[s],s)-n);i=s}}return i}if(a)return;var e=d3.mouse(this)[0]-n.left;u=[r(c,Math.round(s.invert(e)))];O()}var m=d3.select(this);var g=(r||parseInt(m.style("width"))||960)-n.left-n.right,b=(i||parseInt(m.style("height"))||400)-n.top-n.bottom;v.update=function(){v(e)};v.container=this;if(!c||!c.length){var w=m.selectAll(".nv-noData").data([d]);w.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");w.attr("x",n.left+g/2).attr("y",n.top+b/2).text(function(e){return e});return v}else{m.selectAll(".nv-noData").remove()}var E=t.y()(c[c.length-1],c.length-1);s=t.xScale();o=t.yScale();var S=m.selectAll("g.nv-wrap.nv-sparklineplus").data([c]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus");var N=T.append("g");var C=S.select("g");N.append("g").attr("class","nv-sparklineWrap");N.append("g").attr("class","nv-valueWrap");N.append("g").attr("class","nv-hoverArea");S.attr("transform","translate("+n.left+","+n.top+")");var k=C.select(".nv-sparklineWrap");t.width(g).height(b);k.call(t);var L=C.select(".nv-valueWrap");var A=L.selectAll(".nv-currentValue").data([E]);A.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start");A.attr("x",g+(p?n.right:0)).attr("y",h?function(e){return o(e)}:0).style("fill",t.color()(c[c.length-1],c.length-1)).text(l(E));N.select(".nv-hoverArea").append("rect").on("mousemove",M).on("click",function(){a=!a}).on("mouseout",function(){u=[];O()});C.select(".nv-hoverArea rect").attr("transform",function(e){return"translate("+ -n.left+","+ -n.top+")"}).attr("width",g+n.left+n.right).attr("height",b+n.top)});return v}var t=e.models.sparkline();var n={top:15,right:100,bottom:10,left:50},r=null,i=null,s,o,u=[],a=false,f=d3.format(",r"),l=d3.format(",.2f"),c=true,h=true,p=false,d="No Data Available.";v.sparkline=t;d3.rebind(v,t,"x","y","xScale","yScale","color");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return v};v.width=function(e){if(!arguments.length)return r;r=e;return v};v.height=function(e){if(!arguments.length)return i;i=e;return v};v.xTickFormat=function(e){if(!arguments.length)return f;f=e;return v};v.yTickFormat=function(e){if(!arguments.length)return l;l=e;return v};v.showValue=function(e){if(!arguments.length)return c;c=e;return v};v.alignValue=function(e){if(!arguments.length)return h;h=e;return v};v.rightAlignValue=function(e){if(!arguments.length)return p;p=e;return v};v.noData=function(e){if(!arguments.length)return d;d=e;return v};return v};e.models.stackedArea=function(){"use strict";function y(e){e.each(function(e){var a=n-t.left-t.right,v=r-t.top-t.bottom,b=d3.select(this);p=m.xScale();d=m.yScale();var w=e;e=e.map(function(e,t){e.seriesIndex=t;e.values=e.values.map(function(e,n){e.index=n;e.seriesIndex=t;return e});return e});var E=e.filter(function(e){return!e.disabled});e=d3.layout.stack().order(l).offset(f).values(function(e){return e.values}).x(o).y(u).out(function(e,t,n){var r=u(e)===0?0:n;e.display={y:r,y0:t}})(E);var S=b.selectAll("g.nv-wrap.nv-stackedarea").data([e]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea");var N=T.append("defs");var C=T.append("g");var k=S.select("g");C.append("g").attr("class","nv-areaWrap");C.append("g").attr("class","nv-scatterWrap");S.attr("transform","translate("+t.left+","+t.top+")");m.width(a).height(v).x(o).y(function(e){return e.display.y+e.display.y0}).forceY([0]).color(e.map(function(e,t){return e.color||i(e,e.seriesIndex)}));var L=k.select(".nv-scatterWrap").datum(e);L.call(m);N.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");S.select("#nv-edge-clip-"+s+" rect").attr("width",a).attr("height",v);k.attr("clip-path",h?"url(#nv-edge-clip-"+s+")":"");var A=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y+e.display.y0)}).interpolate(c);var O=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y0)});var M=k.select(".nv-areaWrap").selectAll("path.nv-area").data(function(e){return e});M.enter().append("path").attr("class",function(e,t){return"nv-area nv-area-"+t}).attr("d",function(e,t){return O(e.values,e.seriesIndex)}).on("mouseover",function(e,t){d3.select(this).classed("hover",true);g.areaMouseover({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);g.areaMouseout({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("click",function(e,t){d3.select(this).classed("hover",false);g.areaClick({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})});M.exit().transition().attr("d",function(e,t){return O(e.values,t)}).remove();M.style("fill",function(e,t){return e.color||i(e,e.seriesIndex)}).style("stroke",function(e,t){return e.color||i(e,e.seriesIndex)});M.transition().attr("d",function(e,t){return A(e.values,t)});m.dispatch.on("elementMouseover.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",true)});m.dispatch.on("elementMouseout.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",false)});y.d3_stackedOffset_stackPercent=function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,a=[];for(s=0;s<n;++s){for(i=0,o=0;i<w.length;i++)o+=u(w[i].values[s]);if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)a[s]=0;return a}});return y}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=function(e){return e.x},u=function(e){return e.y},a="stack",f="zero",l="default",c="linear",h=false,p,d,v=d3.format(",.3f"),m=e.models.scatter(),g=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");m.size(2.2).sizeDomain([2.2,2.2]);m.dispatch.on("elementClick.area",function(e){g.areaClick(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],g.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});y.dispatch=g;y.scatter=m;d3.rebind(y,m,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","highlightPoint","clearHighlights");y.options=e.utils.optionsFunc.bind(y);y.x=function(e){if(!arguments.length)return o;o=d3.functor(e);return y};y.y=function(e){if(!arguments.length)return u;u=d3.functor(e);return y};y.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return y};y.width=function(e){if(!arguments.length)return n;n=e;return y};y.height=function(e){if(!arguments.length)return r;r=e;return y};y.clipEdge=function(e){if(!arguments.length)return h;h=e;return y};y.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return y};y.offset=function(e){if(!arguments.length)return f;f=e;return y};y.order=function(e){if(!arguments.length)return l;l=e;return y};y.style=function(e){if(!arguments.length)return a;a=e;switch(a){case"stack":y.offset("zero");y.order("default");break;case"stream":y.offset("wiggle");y.order("inside-out");break;case"stream-center":y.offset("silhouette");y.order("inside-out");break;case"expand":y.offset("expand");y.order("default");break;case"stack_percent":y.offset(y.d3_stackedOffset_stackPercent);y.order("default");break}return y};y.interpolate=function(e){if(!arguments.length)return c;c=e;return y};return y};e.models.stackedAreaChart=function(){"use strict";function D(b){b.each(function(b){var x=d3.select(this),P=this;var H=(a||parseInt(x.style("width"))||960)-u.left-u.right,B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom;D.update=function(){x.transition().duration(M).call(D)};D.container=this;if(y=="right")H=H-250;T.disabled=b.map(function(e){return!!e.disabled});if(!N){var j;N={};for(j in T){if(T[j]instanceof Array)N[j]=T[j].slice(0);else N[j]=T[j]}}if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var F=x.selectAll(".nv-noData").data([C]);F.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");F.attr("x",u.left+H/2).attr("y",u.top+B/2).text(function(e){return e});return D}else{x.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();var I=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([b]);var q=I.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g");var R=I.select("g");q.append("rect").style("opacity",0);q.append("g").attr("class","nv-x nv-axis");q.append("g").attr("class","nv-y nv-axis");q.append("g").attr("class","nv-stackedWrap");q.append("g").attr("class","nv-legendWrap");q.append("g").attr("class","nv-controlsWrap");q.append("g").attr("class","nv-interactive");R.select("rect").attr("width",H).attr("height",B);if(h){var U=c?H-L:H;i.width(U);R.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}if(y=="right"){R.select(".nv-legendWrap").attr("transform","translate("+H+","+20+")")}else{R.select(".nv-legendWrap").attr("transform","translate("+(H-U)+","+ -u.top+")")}}if(c){var z=[{key:O.stacked||"Stacked",metaKey:"Stacked",disabled:t.style()!="stack",style:"stack"},{key:O.stream||"Stream",metaKey:"Stream",disabled:t.style()!="stream",style:"stream"},{key:O.expanded||"Expanded",metaKey:"Expanded",disabled:t.style()!="expand",style:"expand"},{key:O.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:t.style()!="stack_percent",style:"stack_percent"}];L=A.length/3*260;z=z.filter(function(e){return A.indexOf(e.metaKey)!==-1});s.width(L).color(["#444","#444","#444"]);R.select(".nv-controlsWrap").datum(z).call(s);if(u.top!=Math.max(s.height(),i.height())){u.top=Math.max(s.height(),i.height());B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}R.select(".nv-controlsWrap").attr("transform","translate(0,"+ -u.top+")")}I.attr("transform","translate("+u.left+","+u.top+")");if(v){R.select(".nv-y.nv-axis").attr("transform","translate("+H+",0)")}if(m){o.width(H).height(B).margin({left:u.left,top:u.top}).svgContainer(x).xScale(w);I.select(".nv-interactive").call(o)}t.width(H).height(B);var W=R.select(".nv-stackedWrap").datum(b);W.transition().call(t);if(p){n.scale(w).ticks(H/100).tickSize(-B,0);R.select(".nv-x.nv-axis").attr("transform","translate(0,"+B+")");R.select(".nv-x.nv-axis").transition().duration(0).call(n)}if(d){r.scale(E).ticks(t.offset()=="wiggle"?0:B/36).tickSize(-H,0).setTickFormat(t.style()=="expand"||t.style()=="stack_percent"?d3.format("%"):S);R.select(".nv-y.nv-axis").transition().duration(0).call(r)}t.dispatch.on("areaClick.toggle",function(e){if(b.filter(function(e){return!e.disabled}).length===1)b=b.map(function(e){e.disabled=false;return e});else b=b.map(function(t,n){t.disabled=n!=e.seriesIndex;return t});T.disabled=b.map(function(e){return!!e.disabled});k.stateChange(T);D.update()});i.dispatch.on("stateChange",function(e){T.disabled=e.disabled;k.stateChange(T);D.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;z=z.map(function(e){e.disabled=true;return e});e.disabled=false;t.style(e.style);T.style=t.style();k.stateChange(T);D.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,a,f,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){a=e.interactiveBisect(n.values,i.pointXValue,D.x());t.highlightPoint(r,a,true);var o=n.values[a];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof f==="undefined")f=D.xScale()(D.x()(o,a));var u=t.style()=="expand"?o.display.y:D.y()(o,a);c.push({key:n.key,value:u,color:l(n,n.seriesIndex),stackedValue:o.display})});c.reverse();if(c.length>2){var h=D.yScale().invert(i.mouseY);var p=Infinity,d=null;c.forEach(function(e,t){if(h>=e.stackedValue.y0&&h<=e.stackedValue.y0+e.stackedValue.y){d=t;return}});if(d!=null)c[d].highlight=true}var v=n.tickFormat()(D.x()(s,a));var m=t.style()=="expand"?function(e,t){return d3.format(".1%")(e)}:function(e,t){return r.tickFormat()(e)};o.tooltip.position({left:f+u.left,top:i.mouseY+u.top}).chartContainer(P.parentNode).enabled(g).valueFormatter(m).data({value:v,series:c})();o.renderGuideLine(f)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(g)_(e,P.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});T.disabled=e.disabled}if(typeof e.style!=="undefined"){t.style(e.style)}D.update()})});return D}var t=e.models.stackedArea(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:25,bottom:50,left:60},a=null,f=null,l=e.utils.defaultColor(),c=true,h=true,p=true,d=true,v=false,m=false,g=true,y="top",b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"},w,E,S=d3.format(",.2f"),x=d3.format(",.3f"),T={style:t.style()},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250,A=["Stacked","Stream","Expanded"],O={},M=250;n.orient("bottom").tickPadding(7);r.orient(v?"right":"left");s.updateState(false);var _=function(r,i){var s=r.pos[0]+(i.offsetLeft||0),o=r.pos[1]+(i.offsetTop||0),u=n.tickFormat()(t.x()(r.point,r.pointIndex)),a=x(t.y()(r.point,r.pointIndex)),f=b(r.series.key,u,a,r,D);e.tooltip.show([s,o],f,r.value<0?"n":"s",null,i)};t.dispatch.on("tooltipShow",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],k.tooltipShow(e)});t.dispatch.on("tooltipHide",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(g)e.tooltip.cleanup()});D.dispatch=k;D.stacked=t;D.legend=i;D.controls=s;D.xAxis=n;D.yAxis=r;D.interactiveLayer=o;d3.rebind(D,t,"x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","sizeDomain","interactive","useVoronoi","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate");D.options=e.utils.optionsFunc.bind(D);D.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return D};D.width=function(e){if(!arguments.length)return a;a=e;return D};D.height=function(e){if(!arguments.length)return f;f=e;return D};D.color=function(n){if(!arguments.length)return l;l=e.utils.getColor(n);i.color(l);t.color(l);return D};D.showControls=function(e){if(!arguments.length)return c;c=e;return D};D.showLegend=function(e){if(!arguments.length)return h;h=e;return D};D.showXAxis=function(e){if(!arguments.length)return p;p=e;return D};D.showYAxis=function(e){if(!arguments.length)return d;d=e;return D};D.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return D};D.useInteractiveGuideline=function(e){if(!arguments.length)return m;m=e;if(e===true){D.interactive(false);D.useVoronoi(false)}return D};D.tooltip=function(e){if(!arguments.length)return b;b=e;return D};D.tooltips=function(e){if(!arguments.length)return g;g=e;return D};D.legendPos=function(e){if(!arguments.length)return y;y=e;return D};D.tooltipContent=function(e){if(!arguments.length)return b;b=e;return D};D.yAxisTooltipFormat=function(e){if(!arguments.length)return x;x=e;return D};D.state=function(e){if(!arguments.length)return T;T=e;return D};D.defaultState=function(e){if(!arguments.length)return N;N=e;return D};D.noData=function(e){if(!arguments.length)return C;C=e;return D};D.transitionDuration=function(e){if(!arguments.length)return M;M=e;return D};D.controlsData=function(e){if(!arguments.length)return A;A=e;return D};D.controlLabels=function(e){if(!arguments.length)return O;if(typeof e!=="object")return O;O=e;return D};r.setTickFormat=r.tickFormat;r.tickFormat=function(e){if(!arguments.length)return S;S=e;return r};return D}})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/outro.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/outro.js
deleted file mode 100644
index 158693a0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/outro.js
+++ /dev/null
@@ -1 +0,0 @@
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/sankey.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/sankey.js
deleted file mode 100644
index c3bc59fb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/sankey.js
+++ /dev/null
@@ -1,292 +0,0 @@
-d3.sankey = function() {
- var sankey = {},
- nodeWidth = 24,
- nodePadding = 8,
- size = [1, 1],
- nodes = [],
- links = [];
-
- sankey.nodeWidth = function(_) {
- if (!arguments.length) return nodeWidth;
- nodeWidth = +_;
- return sankey;
- };
-
- sankey.nodePadding = function(_) {
- if (!arguments.length) return nodePadding;
- nodePadding = +_;
- return sankey;
- };
-
- sankey.nodes = function(_) {
- if (!arguments.length) return nodes;
- nodes = _;
- return sankey;
- };
-
- sankey.links = function(_) {
- if (!arguments.length) return links;
- links = _;
- return sankey;
- };
-
- sankey.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return sankey;
- };
-
- sankey.layout = function(iterations) {
- computeNodeLinks();
- computeNodeValues();
- computeNodeBreadths();
- computeNodeDepths(iterations);
- computeLinkDepths();
- return sankey;
- };
-
- sankey.relayout = function() {
- computeLinkDepths();
- return sankey;
- };
-
- sankey.link = function() {
- var curvature = .5;
-
- function link(d) {
- var x0 = d.source.x + d.source.dx,
- x1 = d.target.x,
- xi = d3.interpolateNumber(x0, x1),
- x2 = xi(curvature),
- x3 = xi(1 - curvature),
- y0 = d.source.y + d.sy + d.dy / 2,
- y1 = d.target.y + d.ty + d.dy / 2;
- return "M" + x0 + "," + y0
- + "C" + x2 + "," + y0
- + " " + x3 + "," + y1
- + " " + x1 + "," + y1;
- }
-
- link.curvature = function(_) {
- if (!arguments.length) return curvature;
- curvature = +_;
- return link;
- };
-
- return link;
- };
-
- // Populate the sourceLinks and targetLinks for each node.
- // Also, if the source and target are not objects, assume they are indices.
- function computeNodeLinks() {
- nodes.forEach(function(node) {
- node.sourceLinks = [];
- node.targetLinks = [];
- });
- links.forEach(function(link) {
- var source = link.source,
- target = link.target;
- if (typeof source === "number") source = link.source = nodes[link.source];
- if (typeof target === "number") target = link.target = nodes[link.target];
- source.sourceLinks.push(link);
- target.targetLinks.push(link);
- });
- }
-
- // Compute the value (size) of each node by summing the associated links.
- function computeNodeValues() {
- nodes.forEach(function(node) {
- node.value = Math.max(
- d3.sum(node.sourceLinks, value),
- d3.sum(node.targetLinks, value)
- );
- });
- }
-
- // Iteratively assign the breadth (x-position) for each node.
- // Nodes are assigned the maximum breadth of incoming neighbors plus one;
- // nodes with no incoming links are assigned breadth zero, while
- // nodes with no outgoing links are assigned the maximum breadth.
- function computeNodeBreadths() {
- var remainingNodes = nodes,
- nextNodes,
- x = 0;
-
- while (remainingNodes.length) {
- nextNodes = [];
- remainingNodes.forEach(function(node) {
- node.x = x;
- node.dx = nodeWidth;
- node.sourceLinks.forEach(function(link) {
- nextNodes.push(link.target);
- });
- });
- remainingNodes = nextNodes;
- ++x;
- }
-
- //
- moveSinksRight(x);
- scaleNodeBreadths((size[0] - nodeWidth) / (x - 1));
- }
-
- function moveSourcesRight() {
- nodes.forEach(function(node) {
- if (!node.targetLinks.length) {
- node.x = d3.min(node.sourceLinks, function(d) { return d.target.x; }) - 1;
- }
- });
- }
-
- function moveSinksRight(x) {
- nodes.forEach(function(node) {
- if (!node.sourceLinks.length) {
- node.x = x - 1;
- }
- });
- }
-
- function scaleNodeBreadths(kx) {
- nodes.forEach(function(node) {
- node.x *= kx;
- });
- }
-
- function computeNodeDepths(iterations) {
- var nodesByBreadth = d3.nest()
- .key(function(d) { return d.x; })
- .sortKeys(d3.ascending)
- .entries(nodes)
- .map(function(d) { return d.values; });
-
- //
- initializeNodeDepth();
- resolveCollisions();
- for (var alpha = 1; iterations > 0; --iterations) {
- relaxRightToLeft(alpha *= .99);
- resolveCollisions();
- relaxLeftToRight(alpha);
- resolveCollisions();
- }
-
- function initializeNodeDepth() {
- var ky = d3.min(nodesByBreadth, function(nodes) {
- return (size[1] - (nodes.length - 1) * nodePadding) / d3.sum(nodes, value);
- });
-
- nodesByBreadth.forEach(function(nodes) {
- nodes.forEach(function(node, i) {
- node.y = i;
- node.dy = node.value * ky;
- });
- });
-
- links.forEach(function(link) {
- link.dy = link.value * ky;
- });
- }
-
- function relaxLeftToRight(alpha) {
- nodesByBreadth.forEach(function(nodes, breadth) {
- nodes.forEach(function(node) {
- if (node.targetLinks.length) {
- var y = d3.sum(node.targetLinks, weightedSource) / d3.sum(node.targetLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedSource(link) {
- return center(link.source) * link.value;
- }
- }
-
- function relaxRightToLeft(alpha) {
- nodesByBreadth.slice().reverse().forEach(function(nodes) {
- nodes.forEach(function(node) {
- if (node.sourceLinks.length) {
- var y = d3.sum(node.sourceLinks, weightedTarget) / d3.sum(node.sourceLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedTarget(link) {
- return center(link.target) * link.value;
- }
- }
-
- function resolveCollisions() {
- nodesByBreadth.forEach(function(nodes) {
- var node,
- dy,
- y0 = 0,
- n = nodes.length,
- i;
-
- // Push any overlapping nodes down.
- nodes.sort(ascendingDepth);
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- dy = y0 - node.y;
- if (dy > 0) node.y += dy;
- y0 = node.y + node.dy + nodePadding;
- }
-
- // If the bottommost node goes outside the bounds, push it back up.
- dy = y0 - nodePadding - size[1];
- if (dy > 0) {
- y0 = node.y -= dy;
-
- // Push any overlapping nodes back up.
- for (i = n - 2; i >= 0; --i) {
- node = nodes[i];
- dy = node.y + node.dy + nodePadding - y0;
- if (dy > 0) node.y -= dy;
- y0 = node.y;
- }
- }
- });
- }
-
- function ascendingDepth(a, b) {
- return a.y - b.y;
- }
- }
-
- function computeLinkDepths() {
- nodes.forEach(function(node) {
- node.sourceLinks.sort(ascendingTargetDepth);
- node.targetLinks.sort(ascendingSourceDepth);
- });
- nodes.forEach(function(node) {
- var sy = 0, ty = 0;
- node.sourceLinks.forEach(function(link) {
- link.sy = sy;
- sy += link.dy;
- });
- node.targetLinks.forEach(function(link) {
- link.ty = ty;
- ty += link.dy;
- });
- });
-
- function ascendingSourceDepth(a, b) {
- return a.source.y - b.source.y;
- }
-
- function ascendingTargetDepth(a, b) {
- return a.target.y - b.target.y;
- }
- }
-
- function center(node) {
- return node.y + node.dy / 2;
- }
-
- function value(link) {
- return link.value;
- }
-
- return sankey;
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/tooltip.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/tooltip.js
deleted file mode 100644
index 46e5a816..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/tooltip.js
+++ /dev/null
@@ -1,490 +0,0 @@
-/* Tooltip rendering model for nvd3 charts.
-window.nv.models.tooltip is the updated,new way to render tooltips.
-
-window.nv.tooltip.show is the old tooltip code.
-window.nv.tooltip.* also has various helper methods.
-*/
-(function() {
- "use strict";
- window.nv.tooltip = {};
-
- /* Model which can be instantiated to handle tooltip rendering.
- Example usage:
- var tip = nv.models.tooltip().gravity('w').distance(23)
- .data(myDataObject);
-
- tip(); //just invoke the returned function to render tooltip.
- */
- window.nv.models.tooltip = function() {
- var content = null //HTML contents of the tooltip. If null, the content is generated via the data variable.
- , data = null /* Tooltip data. If data is given in the proper format, a consistent tooltip is generated.
- Format of data:
- {
- key: "Date",
- value: "August 2009",
- series: [
- {
- key: "Series 1",
- value: "Value 1",
- color: "#000"
- },
- {
- key: "Series 2",
- value: "Value 2",
- color: "#00f"
- }
- ]
-
- }
-
- */
- , gravity = 'w' //Can be 'n','s','e','w'. Determines how tooltip is positioned.
- , distance = 50 //Distance to offset tooltip from the mouse location.
- , snapDistance = 25 //Tolerance allowed before tooltip is moved from its current position (creates 'snapping' effect)
- , fixedTop = null //If not null, this fixes the top position of the tooltip.
- , classes = null //Attaches additional CSS classes to the tooltip DIV that is created.
- , chartContainer = null //Parent DIV, of the SVG Container that holds the chart.
- , tooltipElem = null //actual DOM element representing the tooltip.
- , position = {left: null, top: null} //Relative position of the tooltip inside chartContainer.
- , enabled = true //True -> tooltips are rendered. False -> don't render tooltips.
- //Generates a unique id when you create a new tooltip() object
- , id = "nvtooltip-" + Math.floor(Math.random() * 100000)
- ;
-
- //CSS class to specify whether element should not have mouse events.
- var nvPointerEventsClass = "nv-pointer-events-none";
-
- //Format function for the tooltip values column
- var valueFormatter = function(d,i) {
- return d;
- };
-
- //Format function for the tooltip header value.
- var headerFormatter = function(d) {
- return d;
- };
-
- //By default, the tooltip model renders a beautiful table inside a DIV.
- //You can override this function if a custom tooltip is desired.
- var contentGenerator = function(d) {
- if (content != null) return content;
-
- if (d == null) return '';
-
- var table = d3.select(document.createElement("table"));
- var theadEnter = table.selectAll("thead")
- .data([d])
- .enter().append("thead");
- theadEnter.append("tr")
- .append("td")
- .attr("colspan",3)
- .append("strong")
- .classed("x-value",true)
- .html(headerFormatter(d.value));
-
- var tbodyEnter = table.selectAll("tbody")
- .data([d])
- .enter().append("tbody");
- var trowEnter = tbodyEnter.selectAll("tr")
- .data(function(p) { return p.series})
- .enter()
- .append("tr")
- .classed("highlight", function(p) { return p.highlight})
- ;
-
- trowEnter.append("td")
- .classed("legend-color-guide",true)
- .append("div")
- .style("background-color", function(p) { return p.color});
- trowEnter.append("td")
- .classed("key",true)
- .html(function(p) {return p.key});
- trowEnter.append("td")
- .classed("value",true)
- .html(function(p,i) { return valueFormatter(p.value,i) });
-
-
- trowEnter.selectAll("td").each(function(p) {
- if (p.highlight) {
- var opacityScale = d3.scale.linear().domain([0,1]).range(["#fff",p.color]);
- var opacity = 0.6;
- d3.select(this)
- .style("border-bottom-color", opacityScale(opacity))
- .style("border-top-color", opacityScale(opacity))
- ;
- }
- });
-
- var html = table.node().outerHTML;
- if (d.footer !== undefined)
- html += "<div class='footer'>" + d.footer + "</div>";
- return html;
-
- };
-
- var dataSeriesExists = function(d) {
- if (d && d.series && d.series.length > 0) return true;
-
- return false;
- };
-
- //In situations where the chart is in a 'viewBox', re-position the tooltip based on how far chart is zoomed.
- function convertViewBoxRatio() {
- if (chartContainer) {
- var svg = d3.select(chartContainer);
- if (svg.node().tagName !== "svg") {
- svg = svg.select("svg");
- }
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
-
- position.left = position.left * ratio;
- position.top = position.top * ratio;
- }
- }
- }
-
- //Creates new tooltip container, or uses existing one on DOM.
- function getTooltipContainer(newContent) {
- var body;
- if (chartContainer)
- body = d3.select(chartContainer);
- else
- body = d3.select("body");
-
- var container = body.select(".nvtooltip");
- if (container.node() === null) {
- //Create new tooltip div if it doesn't exist on DOM.
- container = body.append("div")
- .attr("class", "nvtooltip " + (classes? classes: "xy-tooltip"))
- .attr("id",id)
- ;
- }
-
-
- container.node().innerHTML = newContent;
- container.style("top",0).style("left",0).style("opacity",0);
- container.selectAll("div, table, td, tr").classed(nvPointerEventsClass,true)
- container.classed(nvPointerEventsClass,true);
- return container.node();
- }
-
-
-
- //Draw the tooltip onto the DOM.
- function nvtooltip() {
- if (!enabled) return;
- if (!dataSeriesExists(data)) return;
-
- convertViewBoxRatio();
-
- var left = position.left;
- var top = (fixedTop != null) ? fixedTop : position.top;
- var container = getTooltipContainer(contentGenerator(data));
- tooltipElem = container;
- if (chartContainer) {
- var svgComp = chartContainer.getElementsByTagName("svg")[0];
- var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();
- var svgOffset = {left:0,top:0};
- if (svgComp) {
- var svgBound = svgComp.getBoundingClientRect();
- var chartBound = chartContainer.getBoundingClientRect();
- var svgBoundTop = svgBound.top;
-
- //Defensive code. Sometimes, svgBoundTop can be a really negative
- // number, like -134254. That's a bug.
- // If such a number is found, use zero instead. FireFox bug only
- if (svgBoundTop < 0) {
- var containerBound = chartContainer.getBoundingClientRect();
- svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;
- }
- svgOffset.top = Math.abs(svgBoundTop - chartBound.top);
- svgOffset.left = Math.abs(svgBound.left - chartBound.left);
- }
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- //You need to also add any offset between the <svg> element and its containing <div>
- //Finally, add any offset of the containing <div> on the whole page.
- left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;
- top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;
- }
-
- if (snapDistance && snapDistance > 0) {
- top = Math.floor(top/snapDistance) * snapDistance;
- }
-
- nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);
- return nvtooltip;
- };
-
- nvtooltip.nvPointerEventsClass = nvPointerEventsClass;
-
- nvtooltip.content = function(_) {
- if (!arguments.length) return content;
- content = _;
- return nvtooltip;
- };
-
- //Returns tooltipElem...not able to set it.
- nvtooltip.tooltipElem = function() {
- return tooltipElem;
- };
-
- nvtooltip.contentGenerator = function(_) {
- if (!arguments.length) return contentGenerator;
- if (typeof _ === 'function') {
- contentGenerator = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.data = function(_) {
- if (!arguments.length) return data;
- data = _;
- return nvtooltip;
- };
-
- nvtooltip.gravity = function(_) {
- if (!arguments.length) return gravity;
- gravity = _;
- return nvtooltip;
- };
-
- nvtooltip.distance = function(_) {
- if (!arguments.length) return distance;
- distance = _;
- return nvtooltip;
- };
-
- nvtooltip.snapDistance = function(_) {
- if (!arguments.length) return snapDistance;
- snapDistance = _;
- return nvtooltip;
- };
-
- nvtooltip.classes = function(_) {
- if (!arguments.length) return classes;
- classes = _;
- return nvtooltip;
- };
-
- nvtooltip.chartContainer = function(_) {
- if (!arguments.length) return chartContainer;
- chartContainer = _;
- return nvtooltip;
- };
-
- nvtooltip.position = function(_) {
- if (!arguments.length) return position;
- position.left = (typeof _.left !== 'undefined') ? _.left : position.left;
- position.top = (typeof _.top !== 'undefined') ? _.top : position.top;
- return nvtooltip;
- };
-
- nvtooltip.fixedTop = function(_) {
- if (!arguments.length) return fixedTop;
- fixedTop = _;
- return nvtooltip;
- };
-
- nvtooltip.enabled = function(_) {
- if (!arguments.length) return enabled;
- enabled = _;
- return nvtooltip;
- };
-
- nvtooltip.valueFormatter = function(_) {
- if (!arguments.length) return valueFormatter;
- if (typeof _ === 'function') {
- valueFormatter = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.headerFormatter = function(_) {
- if (!arguments.length) return headerFormatter;
- if (typeof _ === 'function') {
- headerFormatter = _;
- }
- return nvtooltip;
- };
-
- //id() is a read-only function. You can't use it to set the id.
- nvtooltip.id = function() {
- return id;
- };
-
-
- return nvtooltip;
- };
-
-
- //Original tooltip.show function. Kept for backward compatibility.
- // pos = [left,top]
- nv.tooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- //Create new tooltip div if it doesn't exist on DOM.
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
- container.innerHTML = content;
- body.appendChild(container);
-
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- if (parentContainer) {
- pos[0] = pos[0] - parentContainer.scrollLeft;
- pos[1] = pos[1] - parentContainer.scrollTop;
- }
- nv.tooltip.calcTooltipPosition(pos, gravity, dist, container);
- };
-
- //Looks up the ancestry of a DOM element, and returns the first NON-svg node.
- nv.tooltip.findFirstNonSVGParent = function(Elem) {
- while(Elem.tagName.match(/^g|svg$/i) !== null) {
- Elem = Elem.parentNode;
- }
- return Elem;
- };
-
- //Finds the total offsetTop of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetTop = function ( Elem, initialTop ) {
- var offsetTop = initialTop;
-
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- };
-
- //Finds the total offsetLeft of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetLeft = function ( Elem, initialLeft) {
- var offsetLeft = initialLeft;
-
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- };
-
- //Global utility function to render a tooltip on the DOM.
- //pos = [left,top] coordinates of where to place the tooltip, relative to the SVG chart container.
- //gravity = how to orient the tooltip
- //dist = how far away from the mouse to place tooltip
- //container = tooltip DIV
- nv.tooltip.calcTooltipPosition = function(pos, gravity, dist, container) {
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.pageYOffset,
- scrollLeft = window.pageXOffset,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var tooltipTop = function ( Elem ) {
- return nv.tooltip.findTotalOffsetTop(Elem, top);
- };
-
- var tooltipLeft = function ( Elem ) {
- return nv.tooltip.findTotalOffsetLeft(Elem,left);
- };
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- case 'none':
- left = pos[0];
- top = pos[1] - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute';
-
- return container;
- };
-
- //Global utility function to remove tooltips from the DOM.
- nv.tooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-})();
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/utils.js b/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/utils.js
deleted file mode 100644
index 7b99e1da..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/d3/js/utils.js
+++ /dev/null
@@ -1,152 +0,0 @@
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- if (fun === undefined) return;
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-
-/* Numbers that are undefined, null or NaN, convert them to zeros.
-*/
-nv.utils.NaNtoZero = function(n) {
- if (typeof n !== 'number'
- || isNaN(n)
- || n === null
- || n === Infinity) return 0;
-
- return n;
-};
-
-/*
-Snippet of code you can insert into each nv.models.* to give you the ability to
-do things like:
-chart.options({
- showXAxis: true,
- tooltips: true
-});
-
-To enable in the chart:
-chart.options = nv.utils.optionsFunc.bind(chart);
-*/
-nv.utils.optionsFunc = function(args) {
- if (args) {
- d3.map(args).forEach((function(key,value) {
- if (typeof this[key] === "function") {
- this[key](value);
- }
- }).bind(this));
- }
- return this;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/ds2-bootstrap/b2b-bootstrap-common.css b/usecaseui-common/src/main/webapp/app/fusion/external/ds2-bootstrap/b2b-bootstrap-common.css
deleted file mode 100644
index 1ad1204b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/ds2-bootstrap/b2b-bootstrap-common.css
+++ /dev/null
@@ -1,34 +0,0 @@
-input[type=checkbox]{
- -webkit-appearance: checkbox;
- height:initial;
-}
-
-input[type=radio]{
- -webkit-appearance: radio;
- height:initial;
-}
-
-
- .checkbox input {
- -webkit-tap-highlight-color: initial;
- height: initial;
- margin: initial;
- opacity: initial;
- outline: initial;
- position: initial;
- left: initial;
- top: initial;
- width: initial;
-}
-
-.radio input {
- -webkit-tap-highlight-color: initial;
- height: initial;
- margin: initial;
- opacity: initial;
- outline: initial;
- position: initial;
- left: initial;
- top: initial;
- width: initial;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/ds2/js/appDS2.js b/usecaseui-common/src/main/webapp/app/fusion/external/ds2/js/appDS2.js
deleted file mode 100644
index 2847ade5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/ds2/js/appDS2.js
+++ /dev/null
@@ -1 +0,0 @@
-var appDS2=angular.module("abs", ["ngRoute", 'ngMessages','modalServices', 'ngCookies', 'b2b.att','gridster','ui.bootstrap','ui.bootstrap.modal']); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/ebz/copyrighted-material-removed.txt b/usecaseui-common/src/main/webapp/app/fusion/external/ebz/copyrighted-material-removed.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/ebz/copyrighted-material-removed.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/gis/js/local.js b/usecaseui-common/src/main/webapp/app/fusion/external/gis/js/local.js
deleted file mode 100644
index 5f4208a8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/gis/js/local.js
+++ /dev/null
@@ -1,178 +0,0 @@
-var pointLayer= null;
-var animateFlag = false;
-var frame = 0;
-var dates = [];
-var delay = 1000;
-var intervalId = null;
-$( document ).ready(function() {
- map(data2.map.lat,data2.map.lon,data2.map.zoom);
- pointLayer = new L.layerGroup().addTo(map);
- var point = getDates(data2.points);
- drawPoints(data2,point);
-
-
- $('#timeUp').bind('click',function(){
- delay += 500;
- if ( animateFlag ) {
- clearInterval(intervalId);
- intervalId = window.setInterval(function(){animate(data2);},delay);
- }
- });
- $('#timeDown').bind('click',function(){
- if ( delay === 500 ) { return false; }
- delay -= 500;
- if ( animateFlag ) {
- clearInterval(intervalId);
- intervalId = window.setInterval(function(){animate(data2);},delay);
- }
- });
-
-
- $('#date').bind('change',function(){
- drawPoints(data2,$('#date').val());
- });
- $('#animate').bind('click',function(){
- if ( animateFlag ) {
- animateFlag = false;
- $('#animate_color').html('Off');
- $('#animate_color').removeClass('animateOn');
- $('#animate_color').addClass('animateOff');
- clearInterval(intervalId);
- } else {
- animateFlag = true;
- $('#animate_color').html('On');
- $('#animate_color').removeClass('animateOff');
- $('#animate_color').addClass('animateOn');
- intervalId = window.setInterval(function(){animate(data2);},delay);
- }
- });
-
-
-});
-
-function abc() {
- var abc = 1;
- var xyz = "";
- return nul;
-
-}
-
-
-
-function animate(obj){
- var point = dates[frame];
- drawPoints(obj,point);
- frame++;
- if ( frame >= dates.length ) {
- frame = 0;
- }
- $('#currDate').val(point);
- $('#showDelay').html(delay);
-}
-
-function someFunction() {
-
- var self = this;
- var x = 1;
- var z = self + x;
-}
-
-
-/**
-* drawPoints - Draw the points provided by point(date)
-* obj JSON Object - Data for Map
-* p String - Key (date) from the JSON object.
-*/
-function drawPoints(obj,p){
- pointLayer.clearLayers();
- var lats = obj.points[p].lats;
- var lons = obj.points[p].lons;
- var txt = obj.points[p].text;
- var fills = obj.points[p].colors;
- points(lats, lons,txt,fills);
-}
-
-/**
-* Get dates from the list provided in pIn and put them in Select.
-* then return the fist date.
-*
-*/
-function getDates(pIn) {
- var html = "<option value='na'>--Select--</option>";
- var c = 0;
- var ret = 0;
- for (var d in pIn ) {
- var val = d.replace('"','');
- if ( c === 0 ) { ret = val;};
- html += "<option value='" + d + "'>" + d + "</option>";
- dates[c] = val;
- c++;
- }
- $('#date').html(html);
- return ret;
-}
-
-/**
-* Map - pass argumets to build map as specified Lat/Lon and zoom level
-* String lat - Latitude
-* String lon - Longitude
-* String zoom - Zoom Level (1-18)
-*
-*/
-function map(lat,lon,zoom){
- var map = L.map('map').setView([lat,lon],zoom);
- map.addControl(new L.control.scale());
- L.tileLayer('http://localhost/tiles-light/{z}/{x}/{y}.png', {maxZoom:18}).addTo(map);
- window.L=L;
- window.map=map;
-}
-
-/**
-* points - pass argumets to points specified Lat/Lon. Text and color for point is also passed.
-* Input is either all singe values or all arrays.
-* String[] lat - Latitude
-* String[] lon - Longitude
-* String[] text - Single/Array of Text for points
-* String[] fill - Single/Array of Fill colors.
-*/
-function points(lat,lon,text,fill){
- if(lat.length) {
- for(i=0;i<lat.length;i++) {
- pointLayer.addLayer(L.circleMarker([lat[i], lon[i]], {
- radius:"5",
- color: fill[i],
- fillColor: fill[i],
- fillOpacity: "0.5" }).bindPopup(text[i]));
-
- /*
- L.circleMarker([lat[i], lon[i]], {
- radius:"5",
- color: fill[i],
- fillColor: fill[i],
- fillOpacity: "0.5" }).addTo(map).bindPopup(text[i]);
-
- */
-
- }
-
- } else {
- L.circleMarker([lat, lon], {
- radius:"5",
- color:fill,
- fillColor:fill,
- fillOpacity: "0.5"
- }).addTo(map).bindPopup(text);
- }
-}
-
-/**
-* Get data from json file and creat return an object of data.
-* Returns json object.
-*
-**/
-function getData(){
- $.getJSON( "./data.json", function( data ) {
- return data;
- });
-
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/detect-element-resize.js b/usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/detect-element-resize.js
deleted file mode 100644
index cbb3c025..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/detect-element-resize.js
+++ /dev/null
@@ -1,147 +0,0 @@
-/**
-* Detect Element Resize
-*
-* https://github.com/sdecima/javascript-detect-element-resize
-* Sebastian Decima
-*
-* version: 0.5.3
-**/
-
-(function () {
- var attachEvent = document.attachEvent,
- stylesCreated = false;
-
- if (!attachEvent) {
- var requestFrame = (function(){
- var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||
- function(fn){ return window.setTimeout(fn, 20); };
- return function(fn){ return raf(fn); };
- })();
-
- var cancelFrame = (function(){
- var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame ||
- window.clearTimeout;
- return function(id){ return cancel(id); };
- })();
-
- function resetTriggers(element){
- var triggers = element.__resizeTriggers__,
- expand = triggers.firstElementChild,
- contract = triggers.lastElementChild,
- expandChild = expand.firstElementChild;
- contract.scrollLeft = contract.scrollWidth;
- contract.scrollTop = contract.scrollHeight;
- expandChild.style.width = expand.offsetWidth + 1 + 'px';
- expandChild.style.height = expand.offsetHeight + 1 + 'px';
- expand.scrollLeft = expand.scrollWidth;
- expand.scrollTop = expand.scrollHeight;
- };
-
- function checkTriggers(element){
- return element.offsetWidth != element.__resizeLast__.width ||
- element.offsetHeight != element.__resizeLast__.height;
- }
-
- function scrollListener(e){
- var element = this;
- resetTriggers(this);
- if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
- this.__resizeRAF__ = requestFrame(function(){
- if (checkTriggers(element)) {
- element.__resizeLast__.width = element.offsetWidth;
- element.__resizeLast__.height = element.offsetHeight;
- element.__resizeListeners__.forEach(function(fn){
- fn.call(element, e);
- });
- }
- });
- };
-
- /* Detect CSS Animations support to detect element display/re-attach */
- var animation = false,
- animationstring = 'animation',
- keyframeprefix = '',
- animationstartevent = 'animationstart',
- domPrefixes = 'Webkit Moz O ms'.split(' '),
- startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),
- pfx = '';
- {
- var elm = document.createElement('fakeelement');
- if( elm.style.animationName !== undefined ) { animation = true; }
-
- if( animation === false ) {
- for( var i = 0; i < domPrefixes.length; i++ ) {
- if( elm.style[ domPrefixes[i] + 'AnimationName' ] !== undefined ) {
- pfx = domPrefixes[ i ];
- animationstring = pfx + 'Animation';
- keyframeprefix = '-' + pfx.toLowerCase() + '-';
- animationstartevent = startEvents[ i ];
- animation = true;
- break;
- }
- }
- }
- }
-
- var animationName = 'resizeanim';
- var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
- var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
- }
-
- function createStyles() {
- if (!stylesCreated) {
- //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
- var css = (animationKeyframes ? animationKeyframes : '') +
- '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' +
- '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
- head = document.head || document.getElementsByTagName('head')[0],
- style = document.createElement('style');
-
- style.type = 'text/css';
- if (style.styleSheet) {
- style.styleSheet.cssText = css;
- } else {
- style.appendChild(document.createTextNode(css));
- }
-
- head.appendChild(style);
- stylesCreated = true;
- }
- }
-
- window.addResizeListener = function(element, fn){
- if (attachEvent) element.attachEvent('onresize', fn);
- else {
- if (!element.__resizeTriggers__) {
- if (getComputedStyle(element).position == 'static') element.style.position = 'relative';
- createStyles();
- element.__resizeLast__ = {};
- element.__resizeListeners__ = [];
- (element.__resizeTriggers__ = document.createElement('div')).className = 'resize-triggers';
- element.__resizeTriggers__.innerHTML = '<div class="expand-trigger"><div></div></div>' +
- '<div class="contract-trigger"></div>';
- element.appendChild(element.__resizeTriggers__);
- resetTriggers(element);
- element.addEventListener('scroll', scrollListener, true);
-
- /* Listen for a css animation to detect element display/re-attach */
- animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function(e) {
- if(e.animationName == animationName)
- resetTriggers(element);
- });
- }
- element.__resizeListeners__.push(fn);
- }
- };
-
- window.removeResizeListener = function(element, fn){
- if (attachEvent) element.detachEvent('onresize', fn);
- else {
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
- if (!element.__resizeListeners__.length) {
- element.removeEventListener('scroll', scrollListener);
- element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
- }
- }
- }
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/jquery.resize.js b/usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/jquery.resize.js
deleted file mode 100644
index ba42a800..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/javascript-detect-element-resize/jquery.resize.js
+++ /dev/null
@@ -1,164 +0,0 @@
-/**
-* Detect Element Resize Plugin for jQuery
-*
-* https://github.com/sdecima/javascript-detect-element-resize
-* Sebastian Decima
-*
-* version: 0.5.3
-**/
-
-(function ( $ ) {
- var attachEvent = document.attachEvent,
- stylesCreated = false;
-
- var jQuery_resize = $.fn.resize;
-
- $.fn.resize = function(callback) {
- return this.each(function() {
- if(this == window)
- jQuery_resize.call(jQuery(this), callback);
- else
- addResizeListener(this, callback);
- });
- }
-
- $.fn.removeResize = function(callback) {
- return this.each(function() {
- removeResizeListener(this, callback);
- });
- }
-
- if (!attachEvent) {
- var requestFrame = (function(){
- var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||
- function(fn){ return window.setTimeout(fn, 20); };
- return function(fn){ return raf(fn); };
- })();
-
- var cancelFrame = (function(){
- var cancel = window.cancelAnimationFrame || window.mozCancelAnimationFrame || window.webkitCancelAnimationFrame ||
- window.clearTimeout;
- return function(id){ return cancel(id); };
- })();
-
- function resetTriggers(element){
- var triggers = element.__resizeTriggers__,
- expand = triggers.firstElementChild,
- contract = triggers.lastElementChild,
- expandChild = expand.firstElementChild;
- contract.scrollLeft = contract.scrollWidth;
- contract.scrollTop = contract.scrollHeight;
- expandChild.style.width = expand.offsetWidth + 1 + 'px';
- expandChild.style.height = expand.offsetHeight + 1 + 'px';
- expand.scrollLeft = expand.scrollWidth;
- expand.scrollTop = expand.scrollHeight;
- };
-
- function checkTriggers(element){
- return element.offsetWidth != element.__resizeLast__.width ||
- element.offsetHeight != element.__resizeLast__.height;
- }
-
- function scrollListener(e){
- var element = this;
- resetTriggers(this);
- if (this.__resizeRAF__) cancelFrame(this.__resizeRAF__);
- this.__resizeRAF__ = requestFrame(function(){
- if (checkTriggers(element)) {
- element.__resizeLast__.width = element.offsetWidth;
- element.__resizeLast__.height = element.offsetHeight;
- element.__resizeListeners__.forEach(function(fn){
- fn.call(element, e);
- });
- }
- });
- };
-
- /* Detect CSS Animations support to detect element display/re-attach */
- var animation = false,
- animationstring = 'animation',
- keyframeprefix = '',
- animationstartevent = 'animationstart',
- domPrefixes = 'Webkit Moz O ms'.split(' '),
- startEvents = 'webkitAnimationStart animationstart oAnimationStart MSAnimationStart'.split(' '),
- pfx = '';
- {
- var elm = document.createElement('fakeelement');
- if( elm.style.animationName !== undefined ) { animation = true; }
-
- if( animation === false ) {
- for( var i = 0; i < domPrefixes.length; i++ ) {
- if( elm.style[ domPrefixes[i] + 'AnimationName' ] !== undefined ) {
- pfx = domPrefixes[ i ];
- animationstring = pfx + 'Animation';
- keyframeprefix = '-' + pfx.toLowerCase() + '-';
- animationstartevent = startEvents[ i ];
- animation = true;
- break;
- }
- }
- }
- }
-
- var animationName = 'resizeanim';
- var animationKeyframes = '@' + keyframeprefix + 'keyframes ' + animationName + ' { from { opacity: 0; } to { opacity: 0; } } ';
- var animationStyle = keyframeprefix + 'animation: 1ms ' + animationName + '; ';
- }
-
- function createStyles() {
- if (!stylesCreated) {
- //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360
- var css = (animationKeyframes ? animationKeyframes : '') +
- '.resize-triggers { ' + (animationStyle ? animationStyle : '') + 'visibility: hidden; opacity: 0; } ' +
- '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',
- head = document.head || document.getElementsByTagName('head')[0],
- style = document.createElement('style');
-
- style.type = 'text/css';
- if (style.styleSheet) {
- style.styleSheet.cssText = css;
- } else {
- style.appendChild(document.createTextNode(css));
- }
-
- head.appendChild(style);
- stylesCreated = true;
- }
- }
-
- window.addResizeListener = function(element, fn){
- if (attachEvent) element.attachEvent('onresize', fn);
- else {
- if (!element.__resizeTriggers__) {
- if (getComputedStyle(element).position == 'static') element.style.position = 'relative';
- createStyles();
- element.__resizeLast__ = {};
- element.__resizeListeners__ = [];
- (element.__resizeTriggers__ = document.createElement('div')).className = 'resize-triggers';
- element.__resizeTriggers__.innerHTML = '<div class="expand-trigger"><div></div></div>' +
- '<div class="contract-trigger"></div>';
- element.appendChild(element.__resizeTriggers__);
- resetTriggers(element);
- element.addEventListener('scroll', scrollListener, true);
-
- /* Listen for a css animation to detect element display/re-attach */
- animationstartevent && element.__resizeTriggers__.addEventListener(animationstartevent, function(e) {
- if(e.animationName == animationName)
- resetTriggers(element);
- });
- }
- element.__resizeListeners__.push(fn);
- }
- };
-
- window.removeResizeListener = function(element, fn){
- if (attachEvent) element.detachEvent('onresize', fn);
- else {
- element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
- if (!element.__resizeListeners__.length) {
- element.removeEventListener('scroll', scrollListener);
- element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);
- }
- }
- }
-}( jQuery )); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/.bower.json b/usecaseui-common/src/main/webapp/app/fusion/external/jquery/.bower.json
deleted file mode 100644
index 25f5cf87..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/.bower.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "name": "jquery",
- "main": "dist/jquery.js",
- "license": "MIT",
- "ignore": [
- "package.json"
- ],
- "keywords": [
- "jquery",
- "javascript",
- "browser",
- "library"
- ],
- "homepage": "https://github.com/jquery/jquery-dist",
- "version": "2.2.4",
- "_release": "2.2.4",
- "_resolution": {
- "type": "version",
- "tag": "2.2.4",
- "commit": "c0185ab7c75aab88762c5aae780b9d83b80eda72"
- },
- "_source": "https://github.com/jquery/jquery-dist.git",
- "_target": "~2.2.4",
- "_originalSource": "jquery"
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.js b/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.js
deleted file mode 100644
index 5c3c456a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.js
+++ /dev/null
@@ -1,9814 +0,0 @@
-/*!
- * jQuery JavaScript Library v2.2.4
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2016-05-20T17:23Z
- */
-
-(function( global, factory ) {
-
- if ( typeof module === "object" && typeof module.exports === "object" ) {
- // For CommonJS and CommonJS-like environments where a proper `window`
- // is present, execute the factory and get jQuery.
- // For environments that do not have a `window` with a `document`
- // (such as Node.js), expose a factory as module.exports.
- // This accentuates the need for the creation of a real `window`.
- // e.g. var jQuery = require("jquery")(window);
- // See ticket #14549 for more info.
- module.exports = global.document ?
- factory( global, true ) :
- function( w ) {
- if ( !w.document ) {
- throw new Error( "jQuery requires a window with a document" );
- }
- return factory( w );
- };
- } else {
- factory( global );
- }
-
-// Pass this if window is not defined yet
-}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) {
-
-// Support: Firefox 18+
-// Can't be in strict mode, several libs including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-//"use strict";
-var arr = [];
-
-var document = window.document;
-
-var slice = arr.slice;
-
-var concat = arr.concat;
-
-var push = arr.push;
-
-var indexOf = arr.indexOf;
-
-var class2type = {};
-
-var toString = class2type.toString;
-
-var hasOwn = class2type.hasOwnProperty;
-
-var support = {};
-
-
-
-var
- version = "2.2.4",
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
-
- // The jQuery object is actually just the init constructor 'enhanced'
- // Need init if jQuery is called (just allow error to be thrown if not included)
- return new jQuery.fn.init( selector, context );
- },
-
- // Support: Android<4.1
- // Make sure we trim BOM and NBSP
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- };
-
-jQuery.fn = jQuery.prototype = {
-
- // The current version of jQuery being used
- jquery: version,
-
- constructor: jQuery,
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num != null ?
-
- // Return just the one element from the set
- ( num < 0 ? this[ num + this.length ] : this[ num ] ) :
-
- // Return all the elements in a clean array
- slice.call( this );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- each: function( callback ) {
- return jQuery.each( this, callback );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map( this, function( elem, i ) {
- return callback.call( elem, i, elem );
- } ) );
- },
-
- slice: function() {
- return this.pushStack( slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
- },
-
- end: function() {
- return this.prevObject || this.constructor();
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: arr.sort,
- splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[ 0 ] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
-
- // Skip the boolean and the target
- target = arguments[ i ] || {};
- i++;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
- target = {};
- }
-
- // Extend jQuery itself if only one argument is passed
- if ( i === length ) {
- target = this;
- i--;
- }
-
- for ( ; i < length; i++ ) {
-
- // Only deal with non-null/undefined values
- if ( ( options = arguments[ i ] ) != null ) {
-
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
- ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
-
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray( src ) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject( src ) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend( {
-
- // Unique for each copy of jQuery on the page
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
- // Assume jQuery is ready without the ready module
- isReady: true,
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- noop: function() {},
-
- isFunction: function( obj ) {
- return jQuery.type( obj ) === "function";
- },
-
- isArray: Array.isArray,
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
-
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- // adding 1 corrects loss of precision from parseFloat (#15100)
- var realStringObj = obj && obj.toString();
- return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call( obj, "constructor" ) &&
- !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
-
- // Support: Android<4.0, iOS<6 (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call( obj ) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
-
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf( "use strict" ) === 1 ) {
- script = document.createElement( "script" );
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
-
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
-
- indirect( code );
- }
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Support: IE9-11+
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- each: function( obj, callback ) {
- var length, i = 0;
-
- if ( isArrayLike( obj ) ) {
- length = obj.length;
- for ( ; i < length; i++ ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- }
-
- return obj;
- },
-
- // Support: Android<4.1
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArrayLike( Object( arr ) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- return arr == null ? -1 : indexOf.call( arr, elem, i );
- },
-
- merge: function( first, second ) {
- var len = +second.length,
- j = 0,
- i = first.length;
-
- for ( ; j < len; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, invert ) {
- var callbackInverse,
- matches = [],
- i = 0,
- length = elems.length,
- callbackExpect = !invert;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- callbackInverse = !callback( elems[ i ], i );
- if ( callbackInverse !== callbackExpect ) {
- matches.push( elems[ i ] );
- }
- }
-
- return matches;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var length, value,
- i = 0,
- ret = [];
-
- // Go through the array, translating each of the items to their new values
- if ( isArrayLike( elems ) ) {
- length = elems.length;
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
- }
-
- // Flatten any nested arrays
- return concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
- // jQuery.support is not used in Core but other projects attach their
- // properties to it so it needs to exist.
- support: support
-} );
-
-// JSHint would error on this code due to the Symbol not being defined in ES5.
-// Defining this global in .jshintrc would create a danger of using the global
-// unguarded in another place, it seems safer to just disable JSHint for these
-// three lines.
-/* jshint ignore: start */
-if ( typeof Symbol === "function" ) {
- jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
-}
-/* jshint ignore: end */
-
-// Populate the class2type map
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-} );
-
-function isArrayLike( obj ) {
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // `in` check used to prevent JIT error (gh-2145)
- // hasOwn isn't used here due to false negatives
- // regarding Nodelist length in IE
- var length = !!obj && "length" in obj && obj.length,
- type = jQuery.type( obj );
-
- if ( type === "function" || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- return type === "array" || length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.2.1
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2015-10-17
- */
-(function( window ) {
-
-var i,
- support,
- Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
- outermostContext,
- sortInput,
- hasDuplicate,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + 1 * new Date(),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- }
- return 0;
- },
-
- // General-purpose constants
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf as it's faster than native
- // http://jsperf.com/thor-indexof-vs-for/5
- indexOf = function( list, elem ) {
- var i = 0,
- len = list.length;
- for ( ; i < len; i++ ) {
- if ( list[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
- // Operator (capture 2)
- "*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
-
- pseudos = ":(" + identifier + ")(?:\\((" +
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
- // 1. quoted (capture 3; capture 4 or capture 5)
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
- // 2. simple (capture 6)
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
- // 3. anything else (capture 2)
- ".*" +
- ")\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + identifier + ")" ),
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rsibling = /[+~]/,
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- high < 0 ?
- // BMP codepoint
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- },
-
- // Used for iframes
- // See setDocument()
- // Removing the function wrapper causes a "Permission Denied"
- // error in IE
- unloadHandler = function() {
- setDocument();
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var m, i, elem, nid, nidselect, match, groups, newSelector,
- newContext = context && context.ownerDocument,
-
- // nodeType defaults to 9, since context defaults to document
- nodeType = context ? context.nodeType : 9;
-
- results = results || [];
-
- // Return early from calls with invalid selector or context
- if ( typeof selector !== "string" || !selector ||
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
-
- return results;
- }
-
- // Try to shortcut find operations (as opposed to filters) in HTML documents
- if ( !seed ) {
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
- context = context || document;
-
- if ( documentIsHTML ) {
-
- // If the selector is sufficiently simple, try using a "get*By*" DOM method
- // (excepting DocumentFragment context, where the methods don't exist)
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
-
- // ID selector
- if ( (m = match[1]) ) {
-
- // Document context
- if ( nodeType === 9 ) {
- if ( (elem = context.getElementById( m )) ) {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
-
- // Element context
- } else {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( newContext && (elem = newContext.getElementById( m )) &&
- contains( context, elem ) &&
- elem.id === m ) {
-
- results.push( elem );
- return results;
- }
- }
-
- // Type selector
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Class selector
- } else if ( (m = match[3]) && support.getElementsByClassName &&
- context.getElementsByClassName ) {
-
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // Take advantage of querySelectorAll
- if ( support.qsa &&
- !compilerCache[ selector + " " ] &&
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
- if ( nodeType !== 1 ) {
- newContext = context;
- newSelector = selector;
-
- // qSA looks outside Element context, which is not what we want
- // Thanks to Andrew Dupont for this workaround technique
- // Support: IE <=8
- // Exclude object elements
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
-
- // Capture the context ID, setting it first if necessary
- if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", (nid = expando) );
- }
-
- // Prefix every selector in the list
- groups = tokenize( selector );
- i = groups.length;
- nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
- while ( i-- ) {
- groups[i] = nidselect + " " + toSelector( groups[i] );
- }
- newSelector = groups.join( "," );
-
- // Expand context for sibling selectors
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
- context;
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch ( qsaError ) {
- } finally {
- if ( nid === expando ) {
- context.removeAttribute( "id" );
- }
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {function(string, object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key + " " ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = arr.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Checks a node for validity as a Sizzle context
- * @param {Element|Object=} context
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
- */
-function testContext( context ) {
- return context && typeof context.getElementsByTagName !== "undefined" && context;
-}
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare, parent,
- doc = node ? node.ownerDocument || node : preferredDoc;
-
- // Return early if doc is invalid or already selected
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Update global variables
- document = doc;
- docElem = document.documentElement;
- documentIsHTML = !isXML( document );
-
- // Support: IE 9-11, Edge
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- if ( (parent = document.defaultView) && parent.top !== parent ) {
- // Support: IE 11
- if ( parent.addEventListener ) {
- parent.addEventListener( "unload", unloadHandler, false );
-
- // Support: IE 9 - 10 only
- } else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", unloadHandler );
- }
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties
- // (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( document.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Support: IE<9
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
- var m = context.getElementById( id );
- return m ? [ m ] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== "undefined" &&
- elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( tag );
-
- // DocumentFragment nodes don't have gEBTN
- } else if ( support.qsa ) {
- return context.querySelectorAll( tag );
- }
- } :
-
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- docElem.appendChild( div ).innerHTML = "<a id='" + expando + "'></a>" +
- "<select id='" + expando + "-\r\\' msallowcapture=''>" +
- "<option selected=''></option></select>";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( div.querySelectorAll("[msallowcapture^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
- if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push("~=");
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
-
- // Support: Safari 8+, iOS 8+
- // https://bugs.webkit.org/show_bug.cgi?id=136851
- // In-page `selector#id sibing-combinator selector` fails
- if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push(".#.+[+~]");
- }
- });
-
- assert(function( div ) {
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( div.querySelectorAll("[name=d]").length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully self-exclusive
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- // Sort on method existence if only one input has compareDocumentPosition
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- if ( compare ) {
- return compare;
- }
-
- // Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
- a.compareDocumentPosition( b ) :
-
- // Otherwise we know they are disconnected
- 1;
-
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
- return a === document ? -1 :
- b === document ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- !compilerCache[ expr + " " ] &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch (e) {}
- }
-
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- // Clear input after sorting to release objects
- // See https://github.com/jquery/sizzle/pull/225
- sortInput = null;
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[6] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType,
- diff = false;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) {
-
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
-
- // Seek `elem` from a previously-cached index
-
- // ...in a gzip-friendly way
- node = parent;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex && cache[ 2 ];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- } else {
- // Use previously-cached element index if available
- if ( useCache ) {
- // ...in a gzip-friendly way
- node = elem;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex;
- }
-
- // xml :nth-child(...)
- // or :nth-last-child(...) or :nth(-last)?-of-type(...)
- if ( diff === false ) {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) &&
- ++diff ) {
-
- // Cache the index of each encountered element
- if ( useCache ) {
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- uniqueCache[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- // Don't keep the element (issue #299)
- input[0] = null;
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- text = text.replace( runescape, funescape );
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
- // but not by others (comment: 8; processing instruction: 7; etc.)
- // nodeType < 6 works because attributes (2) do not appear as children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeType < 6 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
-
- // Support: IE<8
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( (tokens = []) );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var oldCache, uniqueCache, outerCache,
- newCache = [ dirruns, doneName ];
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
-
- if ( (oldCache = uniqueCache[ dir ]) &&
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
-
- // Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
- } else {
- // Reuse newcache so results back-propagate to previous elements
- uniqueCache[ dir ] = newCache;
-
- // A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- // Avoid hanging onto element (issue #299)
- checkContext = null;
- return ret;
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, outermost ) {
- var elem, j, matcher,
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- setMatched = [],
- contextBackup = outermostContext,
- // We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
- len = elems.length;
-
- if ( outermost ) {
- outermostContext = context === document || context || outermost;
- }
-
- // Add elements passing elementMatchers directly to results
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- if ( !context && elem.ownerDocument !== document ) {
- setDocument( elem );
- xml = !documentIsHTML;
- }
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context || document, xml) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // `i` is now the count of elements visited above, and adding it to `matchedCount`
- // makes the latter nonnegative.
- matchedCount += i;
-
- // Apply set filters to unmatched elements
- // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
- // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
- // no element matchers and no seed.
- // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
- // case, which will result in a "00" `matchedCount` that differs from `i` but is also
- // numerically zero.
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !match ) {
- match = tokenize( selector );
- }
- i = match.length;
- while ( i-- ) {
- cached = matcherFromTokens( match[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-
- // Save selector and tokenization
- cached.selector = selector;
- }
- return cached;
-};
-
-/**
- * A low-level selection function that works with Sizzle's compiled
- * selector functions
- * @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
- * @param {Element} context
- * @param {Array} [results]
- * @param {Array} [seed] A set of elements to match against
- */
-select = Sizzle.select = function( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
-
- results = results || [];
-
- // Try to minimize operations if there is only one selector in the list and no seed
- // (the latter of which guarantees us context)
- if ( match.length === 1 ) {
-
- // Reduce context if the leading compound selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
-
- // Precompiled matchers will still verify ancestry, so step up a level
- } else if ( compiled ) {
- context = context.parentNode;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
-
- // Compile and execute a filtering function if one is not provided
- // Provide `match` to avoid retokenization if we modified the selector above
- ( compiled || compile( selector, match ) )(
- seed,
- context,
- !documentIsHTML,
- results,
- !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
- );
- return results;
-};
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome 14-35+
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "<input/>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- null;
- }
- });
-}
-
-return Sizzle;
-
-})( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[ ":" ] = jQuery.expr.pseudos;
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-
-var dir = function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
-};
-
-
-var siblings = function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
-};
-
-
-var rneedsContext = jQuery.expr.match.needsContext;
-
-var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
-
-
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- } );
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- } );
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
- } );
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- } ) );
-};
-
-jQuery.fn.extend( {
- find: function( selector ) {
- var i,
- len = this.length,
- ret = [],
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter( function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- } ) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow( this, selector || [], false ) );
- },
- not: function( selector ) {
- return this.pushStack( winnow( this, selector || [], true ) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-} );
-
-
-// Initialize a jQuery object
-
-
-// A central reference to the root jQuery(document)
-var rootjQuery,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- init = jQuery.fn.init = function( selector, context, root ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Method init() accepts an alternate rootjQuery
- // so migrate can support jQuery.sub (gh-2101)
- root = root || rootjQuery;
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector[ 0 ] === "<" &&
- selector[ selector.length - 1 ] === ">" &&
- selector.length >= 3 ) {
-
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && ( match[ 1 ] || !context ) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[ 1 ] ) {
- context = context instanceof jQuery ? context[ 0 ] : context;
-
- // Option to run scripts is true for back-compat
- // Intentionally let the error be thrown if parseHTML is not present
- jQuery.merge( this, jQuery.parseHTML(
- match[ 1 ],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
-
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[ 2 ] );
-
- // Support: Blackberry 4.6
- // gEBID returns nodes no longer in the document (#6963)
- if ( elem && elem.parentNode ) {
-
- // Inject the element directly into the jQuery object
- this.length = 1;
- this[ 0 ] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || root ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[ 0 ] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return root.ready !== undefined ?
- root.ready( selector ) :
-
- // Execute immediately if ready is not present
- selector( jQuery );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- };
-
-// Give the init function the jQuery prototype for later instantiation
-init.prototype = jQuery.fn;
-
-// Initialize central reference
-rootjQuery = jQuery( document );
-
-
-var rparentsprev = /^(?:parents|prev(?:Until|All))/,
-
- // Methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend( {
- has: function( target ) {
- var targets = jQuery( target, this ),
- l = targets.length;
-
- return this.filter( function() {
- var i = 0;
- for ( ; i < l; i++ ) {
- if ( jQuery.contains( this, targets[ i ] ) ) {
- return true;
- }
- }
- } );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- matched = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
-
- // Always skip document fragments
- if ( cur.nodeType < 11 && ( pos ?
- pos.index( cur ) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector( cur, selectors ) ) ) {
-
- matched.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
- },
-
- // Determine the position of an element within the set
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // Index in selector
- if ( typeof elem === "string" ) {
- return indexOf.call( jQuery( elem ), this[ 0 ] );
- }
-
- // Locate the position of the desired element
- return indexOf.call( this,
-
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[ 0 ] : elem
- );
- },
-
- add: function( selector, context ) {
- return this.pushStack(
- jQuery.uniqueSort(
- jQuery.merge( this.get(), jQuery( selector, context ) )
- )
- );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- }
-} );
-
-function sibling( cur, dir ) {
- while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
- return cur;
-}
-
-jQuery.each( {
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return siblings( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return siblings( elem.firstChild );
- },
- contents: function( elem ) {
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var matched = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- matched = jQuery.filter( selector, matched );
- }
-
- if ( this.length > 1 ) {
-
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- jQuery.uniqueSort( matched );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- matched.reverse();
- }
- }
-
- return this.pushStack( matched );
- };
-} );
-var rnotwhite = ( /\S+/g );
-
-
-
-// Convert String-formatted options into Object-formatted ones
-function createOptions( options ) {
- var object = {};
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- } );
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- createOptions( options ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
-
- // Last fire value for non-forgettable lists
- memory,
-
- // Flag to know if list was already fired
- fired,
-
- // Flag to prevent firing
- locked,
-
- // Actual callback list
- list = [],
-
- // Queue of execution data for repeatable lists
- queue = [],
-
- // Index of currently firing callback (modified by add/remove as needed)
- firingIndex = -1,
-
- // Fire callbacks
- fire = function() {
-
- // Enforce single-firing
- locked = options.once;
-
- // Execute callbacks for all pending executions,
- // respecting firingIndex overrides and runtime changes
- fired = firing = true;
- for ( ; queue.length; firingIndex = -1 ) {
- memory = queue.shift();
- while ( ++firingIndex < list.length ) {
-
- // Run callback and check for early termination
- if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
- options.stopOnFalse ) {
-
- // Jump to end and forget the data so .add doesn't re-fire
- firingIndex = list.length;
- memory = false;
- }
- }
- }
-
- // Forget the data if we're done with it
- if ( !options.memory ) {
- memory = false;
- }
-
- firing = false;
-
- // Clean up if we're done firing for good
- if ( locked ) {
-
- // Keep an empty list if we have data for future add calls
- if ( memory ) {
- list = [];
-
- // Otherwise, this object is spent
- } else {
- list = "";
- }
- }
- },
-
- // Actual Callbacks object
- self = {
-
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
-
- // If we have memory from a past run, we should fire after adding
- if ( memory && !firing ) {
- firingIndex = list.length - 1;
- queue.push( memory );
- }
-
- ( function add( args ) {
- jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
-
- // Inspect recursively
- add( arg );
- }
- } );
- } )( arguments );
-
- if ( memory && !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Remove a callback from the list
- remove: function() {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
-
- // Handle firing indexes
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- } );
- return this;
- },
-
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ?
- jQuery.inArray( fn, list ) > -1 :
- list.length > 0;
- },
-
- // Remove all callbacks from the list
- empty: function() {
- if ( list ) {
- list = [];
- }
- return this;
- },
-
- // Disable .fire and .add
- // Abort any current/pending executions
- // Clear all callbacks and values
- disable: function() {
- locked = queue = [];
- list = memory = "";
- return this;
- },
- disabled: function() {
- return !list;
- },
-
- // Disable .fire
- // Also disable .add unless we have memory (since it would have no effect)
- // Abort any pending executions
- lock: function() {
- locked = queue = [];
- if ( !memory ) {
- list = memory = "";
- }
- return this;
- },
- locked: function() {
- return !!locked;
- },
-
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( !locked ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- queue.push( args );
- if ( !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
-
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-jQuery.extend( {
-
- Deferred: function( func ) {
- var tuples = [
-
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred( function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
-
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[ 1 ] ]( function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .progress( newDefer.notify )
- .done( newDefer.resolve )
- .fail( newDefer.reject );
- } else {
- newDefer[ tuple[ 0 ] + "With" ](
- this === promise ? newDefer.promise() : this,
- fn ? [ returned ] : arguments
- );
- }
- } );
- } );
- fns = null;
- } ).promise();
- },
-
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[ 1 ] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add( function() {
-
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[ 0 ] ] = function() {
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
- } );
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 ||
- ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred.
- // If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
- if ( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // Add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .progress( updateFunc( i, progressContexts, progressValues ) )
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject );
- } else {
- --remaining;
- }
- }
- }
-
- // If we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-} );
-
-
-// The deferred used on DOM ready
-var readyList;
-
-jQuery.fn.ready = function( fn ) {
-
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
-};
-
-jQuery.extend( {
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
- jQuery( document ).off( "ready" );
- }
- }
-} );
-
-/**
- * The ready event handler and self cleanup method
- */
-function completed() {
- document.removeEventListener( "DOMContentLoaded", completed );
- window.removeEventListener( "load", completed );
- jQuery.ready();
-}
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called
- // after the browser event has already occurred.
- // Support: IE9-10 only
- // Older IE sometimes signals "interactive" too soon
- if ( document.readyState === "complete" ||
- ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
-
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- window.setTimeout( jQuery.ready );
-
- } else {
-
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed );
- }
- }
- return readyList.promise( obj );
-};
-
-// Kick off the DOM ready check even if the user does not
-jQuery.ready.promise();
-
-
-
-
-// Multifunctional method to get and set values of a collection
-// The value/s can optionally be executed if it's a function
-var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- len = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- access( elems, fn, i, key[ i ], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
-
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < len; i++ ) {
- fn(
- elems[ i ], key, raw ?
- value :
- value.call( elems[ i ], i, fn( elems[ i ], key ) )
- );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- len ? fn( elems[ 0 ], key ) : emptyGet;
-};
-var acceptData = function( owner ) {
-
- // Accepts only:
- // - Node
- // - Node.ELEMENT_NODE
- // - Node.DOCUMENT_NODE
- // - Object
- // - Any
- /* jshint -W018 */
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
-};
-
-
-
-
-function Data() {
- this.expando = jQuery.expando + Data.uid++;
-}
-
-Data.uid = 1;
-
-Data.prototype = {
-
- register: function( owner, initial ) {
- var value = initial || {};
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable, non-writable property
- // configurability must be true to allow the property to be
- // deleted with the delete operator
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- writable: true,
- configurable: true
- } );
- }
- return owner[ this.expando ];
- },
- cache: function( owner ) {
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( !acceptData( owner ) ) {
- return {};
- }
-
- // Check if the owner object already has a cache
- var value = owner[ this.expando ];
-
- // If not, create one
- if ( !value ) {
- value = {};
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( acceptData( owner ) ) {
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable property
- // configurable must be true to allow the property to be
- // deleted when data is removed
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- configurable: true
- } );
- }
- }
- }
-
- return value;
- },
- set: function( owner, data, value ) {
- var prop,
- cache = this.cache( owner );
-
- // Handle: [ owner, key, value ] args
- if ( typeof data === "string" ) {
- cache[ data ] = value;
-
- // Handle: [ owner, { properties } ] args
- } else {
-
- // Copy the properties one-by-one to the cache object
- for ( prop in data ) {
- cache[ prop ] = data[ prop ];
- }
- }
- return cache;
- },
- get: function( owner, key ) {
- return key === undefined ?
- this.cache( owner ) :
- owner[ this.expando ] && owner[ this.expando ][ key ];
- },
- access: function( owner, key, value ) {
- var stored;
-
- // In cases where either:
- //
- // 1. No key was specified
- // 2. A string key was specified, but no value provided
- //
- // Take the "read" path and allow the get method to determine
- // which value to return, respectively either:
- //
- // 1. The entire cache object
- // 2. The data stored at the key
- //
- if ( key === undefined ||
- ( ( key && typeof key === "string" ) && value === undefined ) ) {
-
- stored = this.get( owner, key );
-
- return stored !== undefined ?
- stored : this.get( owner, jQuery.camelCase( key ) );
- }
-
- // When the key is not a string, or both a key and value
- // are specified, set or extend (existing objects) with either:
- //
- // 1. An object of properties
- // 2. A key and value
- //
- this.set( owner, key, value );
-
- // Since the "set" path can have two possible entry points
- // return the expected data based on which path was taken[*]
- return value !== undefined ? value : key;
- },
- remove: function( owner, key ) {
- var i, name, camel,
- cache = owner[ this.expando ];
-
- if ( cache === undefined ) {
- return;
- }
-
- if ( key === undefined ) {
- this.register( owner );
-
- } else {
-
- // Support array or space separated string of keys
- if ( jQuery.isArray( key ) ) {
-
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = key.concat( key.map( jQuery.camelCase ) );
- } else {
- camel = jQuery.camelCase( key );
-
- // Try the string as a key before any manipulation
- if ( key in cache ) {
- name = [ key, camel ];
- } else {
-
- // If a key with the spaces exists, use it.
- // Otherwise, create an array by matching non-whitespace
- name = camel;
- name = name in cache ?
- [ name ] : ( name.match( rnotwhite ) || [] );
- }
- }
-
- i = name.length;
-
- while ( i-- ) {
- delete cache[ name[ i ] ];
- }
- }
-
- // Remove the expando if there's no more data
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
-
- // Support: Chrome <= 35-45+
- // Webkit & Blink performance suffers when deleting properties
- // from DOM nodes, so set to undefined instead
- // https://code.google.com/p/chromium/issues/detail?id=378607
- if ( owner.nodeType ) {
- owner[ this.expando ] = undefined;
- } else {
- delete owner[ this.expando ];
- }
- }
- },
- hasData: function( owner ) {
- var cache = owner[ this.expando ];
- return cache !== undefined && !jQuery.isEmptyObject( cache );
- }
-};
-var dataPriv = new Data();
-
-var dataUser = new Data();
-
-
-
-// Implementation Summary
-//
-// 1. Enforce API surface and semantic compatibility with 1.9.x branch
-// 2. Improve the module's maintainability by reducing the storage
-// paths to a single mechanism.
-// 3. Use the same single mechanism to support "private" and "user" data.
-// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
-// 5. Avoid exposing implementation details on user objects (eg. expando properties)
-// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
-
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- rmultiDash = /[A-Z]/g;
-
-function dataAttr( elem, key, data ) {
- var name;
-
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
-
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch ( e ) {}
-
- // Make sure we set the data so it isn't changed later
- dataUser.set( elem, key, data );
- } else {
- data = undefined;
- }
- }
- return data;
-}
-
-jQuery.extend( {
- hasData: function( elem ) {
- return dataUser.hasData( elem ) || dataPriv.hasData( elem );
- },
-
- data: function( elem, name, data ) {
- return dataUser.access( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- dataUser.remove( elem, name );
- },
-
- // TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to dataPriv methods, these can be deprecated.
- _data: function( elem, name, data ) {
- return dataPriv.access( elem, name, data );
- },
-
- _removeData: function( elem, name ) {
- dataPriv.remove( elem, name );
- }
-} );
-
-jQuery.fn.extend( {
- data: function( key, value ) {
- var i, name, data,
- elem = this[ 0 ],
- attrs = elem && elem.attributes;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = dataUser.get( elem );
-
- if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
- i = attrs.length;
- while ( i-- ) {
-
- // Support: IE11+
- // The attrs elements can be null (#14894)
- if ( attrs[ i ] ) {
- name = attrs[ i ].name;
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice( 5 ) );
- dataAttr( elem, name, data[ name ] );
- }
- }
- }
- dataPriv.set( elem, "hasDataAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each( function() {
- dataUser.set( this, key );
- } );
- }
-
- return access( this, function( value ) {
- var data, camelKey;
-
- // The calling jQuery object (element matches) is not empty
- // (and therefore has an element appears at this[ 0 ]) and the
- // `value` parameter was not undefined. An empty jQuery object
- // will result in `undefined` for elem = this[ 0 ] which will
- // throw an exception if an attempt to read a data cache is made.
- if ( elem && value === undefined ) {
-
- // Attempt to get data from the cache
- // with the key as-is
- data = dataUser.get( elem, key ) ||
-
- // Try to find dashed key if it exists (gh-2779)
- // This is for 2.2.x only
- dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
-
- if ( data !== undefined ) {
- return data;
- }
-
- camelKey = jQuery.camelCase( key );
-
- // Attempt to get data from the cache
- // with the key camelized
- data = dataUser.get( elem, camelKey );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to "discover" the data in
- // HTML5 custom data-* attrs
- data = dataAttr( elem, camelKey, undefined );
- if ( data !== undefined ) {
- return data;
- }
-
- // We tried really hard, but the data doesn't exist.
- return;
- }
-
- // Set the data...
- camelKey = jQuery.camelCase( key );
- this.each( function() {
-
- // First, attempt to store a copy or reference of any
- // data that might've been store with a camelCased key.
- var data = dataUser.get( this, camelKey );
-
- // For HTML5 data-* attribute interop, we have to
- // store property names with dashes in a camelCase form.
- // This might not apply to all properties...*
- dataUser.set( this, camelKey, value );
-
- // *... In the case of properties that might _actually_
- // have dashes, we need to also store a copy of that
- // unchanged property.
- if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
- dataUser.set( this, key, value );
- }
- } );
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each( function() {
- dataUser.remove( this, key );
- } );
- }
-} );
-
-
-jQuery.extend( {
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = dataPriv.get( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray( data ) ) {
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // Clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // Not public - generate a queueHooks object, or return the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
- empty: jQuery.Callbacks( "once memory" ).add( function() {
- dataPriv.remove( elem, [ type + "queue", key ] );
- } )
- } );
- }
-} );
-
-jQuery.fn.extend( {
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[ 0 ], type );
- }
-
- return data === undefined ?
- this :
- this.each( function() {
- var queue = jQuery.queue( this, type, data );
-
- // Ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- dequeue: function( type ) {
- return this.each( function() {
- jQuery.dequeue( this, type );
- } );
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
-
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while ( i-- ) {
- tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-} );
-var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
-
-var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
-
-
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
-
-var isHidden = function( elem, el ) {
-
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" ||
- !jQuery.contains( elem.ownerDocument, elem );
- };
-
-
-
-function adjustCSS( elem, prop, valueParts, tween ) {
- var adjusted,
- scale = 1,
- maxIterations = 20,
- currentValue = tween ?
- function() { return tween.cur(); } :
- function() { return jQuery.css( elem, prop, "" ); },
- initial = currentValue(),
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
- rcssNum.exec( jQuery.css( elem, prop ) );
-
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
-
- // Trust units reported by jQuery.css
- unit = unit || initialInUnit[ 3 ];
-
- // Make sure we update the tween properties later on
- valueParts = valueParts || [];
-
- // Iteratively approximate from a nonzero starting point
- initialInUnit = +initial || 1;
-
- do {
-
- // If previous iteration zeroed out, double until we get *something*.
- // Use string for doubling so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- initialInUnit = initialInUnit / scale;
- jQuery.style( elem, prop, initialInUnit + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // Break the loop if scale is unchanged or perfect, or if we've just had enough.
- } while (
- scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
- );
- }
-
- if ( valueParts ) {
- initialInUnit = +initialInUnit || +initial || 0;
-
- // Apply relative offset (+=/-=) if specified
- adjusted = valueParts[ 1 ] ?
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
- +valueParts[ 2 ];
- if ( tween ) {
- tween.unit = unit;
- tween.start = initialInUnit;
- tween.end = adjusted;
- }
- }
- return adjusted;
-}
-var rcheckableType = ( /^(?:checkbox|radio)$/i );
-
-var rtagName = ( /<([\w:-]+)/ );
-
-var rscriptType = ( /^$|\/(?:java|ecma)script/i );
-
-
-
-// We have to close these tags to support XHTML (#13200)
-var wrapMap = {
-
- // Support: IE9
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
-
- // XHTML parsers do not magically insert elements in the
- // same way that tag soup parsers do. So we cannot shorten
- // this by omitting <tbody> or other required elements.
- thead: [ 1, "<table>", "</table>" ],
- col: [ 2, "<table><colgroup>", "</colgroup></table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- _default: [ 0, "", "" ]
-};
-
-// Support: IE9
-wrapMap.optgroup = wrapMap.option;
-
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function getAll( context, tag ) {
-
- // Support: IE9-11+
- // Use typeof to avoid zero-argument method invocation on host objects (#15151)
- var ret = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ?
- context.querySelectorAll( tag || "*" ) :
- [];
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}
-
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- dataPriv.set(
- elems[ i ],
- "globalEval",
- !refElements || dataPriv.get( refElements[ i ], "globalEval" )
- );
- }
-}
-
-
-var rhtml = /<|&#?\w+;/;
-
-function buildFragment( elems, context, scripts, selection, ignored ) {
- var elem, tmp, tag, wrap, contains, j,
- fragment = context.createDocumentFragment(),
- nodes = [],
- i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
-
- // Descend through wrappers to the right content
- j = wrap[ 0 ];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, tmp.childNodes );
-
- // Remember the top-level container
- tmp = fragment.firstChild;
-
- // Ensure the created nodes are orphaned (#12392)
- tmp.textContent = "";
- }
- }
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
-
- i = 0;
- while ( ( elem = nodes[ i++ ] ) ) {
-
- // Skip elements already in the context collection (trac-4087)
- if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
- if ( ignored ) {
- ignored.push( elem );
- }
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( fragment.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( ( elem = tmp[ j++ ] ) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- return fragment;
-}
-
-
-( function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // Support: Android 4.0-4.3, Safari<=5.1
- // Check state lost if the name is set (#11217)
- // Support: Windows Web Apps (WWA)
- // `name` and `type` must use .setAttribute for WWA (#14901)
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Safari<=5.1, Android<4.2
- // Older WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<=11+
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- div.innerHTML = "<textarea>x</textarea>";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-} )();
-
-
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-// Support: IE9
-// See #13393 for more info
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-function on( elem, types, selector, data, fn, one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
-
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
-
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- on( elem, type, selector, data, types[ type ], one );
- }
- return elem;
- }
-
- if ( data == null && fn == null ) {
-
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
-
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
-
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return elem;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
-
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
-
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return elem.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- } );
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.get( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !( events = elemData.events ) ) {
- events = elemData.events = {};
- }
- if ( !( eventHandle = elemData.handle ) ) {
- eventHandle = elemData.handle = function( e ) {
-
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
- jQuery.event.dispatch.apply( elem, arguments ) : undefined;
- };
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend( {
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join( "." )
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !( handlers = events[ type ] ) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener if the special events handler returns false
- if ( !special.setup ||
- special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
-
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
-
- if ( !elemData || !( events = elemData.events ) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[ 2 ] &&
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector ||
- selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown ||
- special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
-
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove data and the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- dataPriv.remove( elem, "handle events" );
- }
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = slice.call( arguments ),
- handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[ 0 ] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( ( handleObj = matched.handlers[ j++ ] ) &&
- !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or 2) have namespace(s)
- // a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
- handleObj.handler ).apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( ( event.result = ret ) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Support (at least): Chrome, IE9
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- //
- // Support: Firefox<=42+
- // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
- if ( delegateCount && cur.nodeType &&
- ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
-
- for ( ; cur !== this; cur = cur.parentNode || this ) {
-
- // Don't check non-elements (#13208)
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) > -1 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push( { elem: cur, handlers: matches } );
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
- }
-
- return handlerQueue;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
- "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split( " " ),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
- "screenX screenY toElement" ).split( " " ),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX +
- ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
- ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY +
- ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
- ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: Cordova 2.5 (WebKit) (#13255)
- // All events should have a target; Cordova deviceready doesn't
- if ( !event.target ) {
- event.target = document;
- }
-
- // Support: Safari 6.0+, Chrome<28
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- load: {
-
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
-
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- this.focus();
- return false;
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
-
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Support: Firefox 20+
- // Firefox doesn't alert if the returnValue field is not set.
- if ( event.result !== undefined && event.originalEvent ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- }
-};
-
-jQuery.removeEvent = function( elem, type, handle ) {
-
- // This "if" is needed for plain objects
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle );
- }
-};
-
-jQuery.Event = function( src, props ) {
-
- // Allow instantiation without the 'new' keyword
- if ( !( this instanceof jQuery.Event ) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = src.defaultPrevented ||
- src.defaultPrevented === undefined &&
-
- // Support: Android<4.0
- src.returnValue === false ?
- returnTrue :
- returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- constructor: jQuery.Event,
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
- isSimulated: false,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
-
- if ( e && !this.isSimulated ) {
- e.preventDefault();
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
-
- if ( e && !this.isSimulated ) {
- e.stopPropagation();
- }
- },
- stopImmediatePropagation: function() {
- var e = this.originalEvent;
-
- this.isImmediatePropagationStopped = returnTrue;
-
- if ( e && !this.isSimulated ) {
- e.stopImmediatePropagation();
- }
-
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-// so that event delegation works in jQuery.
-// Do the same for pointerenter/pointerleave and pointerover/pointerout
-//
-// Support: Safari 7 only
-// Safari sends mouseenter too often; see:
-// https://code.google.com/p/chromium/issues/detail?id=470258
-// for the description of the bug (it existed in older Chrome versions as well).
-jQuery.each( {
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mouseenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-} );
-
-jQuery.fn.extend( {
- on: function( types, selector, data, fn ) {
- return on( this, types, selector, data, fn );
- },
- one: function( types, selector, data, fn ) {
- return on( this, types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
-
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ?
- handleObj.origType + "." + handleObj.namespace :
- handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
-
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
-
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each( function() {
- jQuery.event.remove( this, types, fn, selector );
- } );
- }
-} );
-
-
-var
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
-
- // Support: IE 10-11, Edge 10240+
- // In IE/Edge using regex groups here causes severe slowdowns.
- // See https://connect.microsoft.com/IE/feedback/details/1736512/
- rnoInnerhtml = /<script|<style|<link/i,
-
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
-
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
- return jQuery.nodeName( elem, "table" ) &&
- jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
-
- elem.getElementsByTagName( "tbody" )[ 0 ] ||
- elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
- elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
-
- if ( match ) {
- elem.type = match[ 1 ];
- } else {
- elem.removeAttribute( "type" );
- }
-
- return elem;
-}
-
-function cloneCopyEvent( src, dest ) {
- var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;
-
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- // 1. Copy private data: events, handlers, etc.
- if ( dataPriv.hasData( src ) ) {
- pdataOld = dataPriv.access( src );
- pdataCur = dataPriv.set( dest, pdataOld );
- events = pdataOld.events;
-
- if ( events ) {
- delete pdataCur.handle;
- pdataCur.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
- }
-
- // 2. Copy user data
- if ( dataUser.hasData( src ) ) {
- udataOld = dataUser.access( src );
- udataCur = jQuery.extend( {}, udataOld );
-
- dataUser.set( dest, udataCur );
- }
-}
-
-// Fix IE bugs, see support tests
-function fixInput( src, dest ) {
- var nodeName = dest.nodeName.toLowerCase();
-
- // Fails to persist the checked state of a cloned checkbox or radio button.
- if ( nodeName === "input" && rcheckableType.test( src.type ) ) {
- dest.checked = src.checked;
-
- // Fails to return the selected option to the default selected state when cloning options
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-function domManip( collection, args, callback, ignored ) {
-
- // Flatten any nested arrays
- args = concat.apply( [], args );
-
- var fragment, first, scripts, hasScripts, node, doc,
- i = 0,
- l = collection.length,
- iNoClone = l - 1,
- value = args[ 0 ],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction ||
- ( l > 1 && typeof value === "string" &&
- !support.checkClone && rchecked.test( value ) ) ) {
- return collection.each( function( index ) {
- var self = collection.eq( index );
- if ( isFunction ) {
- args[ 0 ] = value.call( this, index, self.html() );
- }
- domManip( self, args, callback, ignored );
- } );
- }
-
- if ( l ) {
- fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- // Require either new content or an interest in ignored elements to invoke the callback
- if ( first || ignored ) {
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item
- // instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call( collection[ i ], node, i );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !dataPriv.access( node, "globalEval" ) &&
- jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
-
- // Optional AJAX dependency, but won't run scripts if not present
- if ( jQuery._evalUrl ) {
- jQuery._evalUrl( node.src );
- }
- } else {
- jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) );
- }
- }
- }
- }
- }
- }
-
- return collection;
-}
-
-function remove( elem, selector, keepData ) {
- var node,
- nodes = selector ? jQuery.filter( selector, elem ) : elem,
- i = 0;
-
- for ( ; ( node = nodes[ i ] ) != null; i++ ) {
- if ( !keepData && node.nodeType === 1 ) {
- jQuery.cleanData( getAll( node ) );
- }
-
- if ( node.parentNode ) {
- if ( keepData && jQuery.contains( node.ownerDocument, node ) ) {
- setGlobalEval( getAll( node, "script" ) );
- }
- node.parentNode.removeChild( node );
- }
- }
-
- return elem;
-}
-
-jQuery.extend( {
- htmlPrefilter: function( html ) {
- return html.replace( rxhtmlTag, "<$1></$2>" );
- },
-
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var i, l, srcElements, destElements,
- clone = elem.cloneNode( true ),
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- // Fix IE cloning issues
- if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&
- !jQuery.isXMLDoc( elem ) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- for ( i = 0, l = srcElements.length; i < l; i++ ) {
- fixInput( srcElements[ i ], destElements[ i ] );
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0, l = srcElements.length; i < l; i++ ) {
- cloneCopyEvent( srcElements[ i ], destElements[ i ] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- // Return the cloned set
- return clone;
- },
-
- cleanData: function( elems ) {
- var data, elem, type,
- special = jQuery.event.special,
- i = 0;
-
- for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) {
- if ( acceptData( elem ) ) {
- if ( ( data = elem[ dataPriv.expando ] ) ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Support: Chrome <= 35-45+
- // Assign undefined instead of using delete, see Data#remove
- elem[ dataPriv.expando ] = undefined;
- }
- if ( elem[ dataUser.expando ] ) {
-
- // Support: Chrome <= 35-45+
- // Assign undefined instead of using delete, see Data#remove
- elem[ dataUser.expando ] = undefined;
- }
- }
- }
- }
-} );
-
-jQuery.fn.extend( {
-
- // Keep domManip exposed until 3.0 (gh-2225)
- domManip: domManip,
-
- detach: function( selector ) {
- return remove( this, selector, true );
- },
-
- remove: function( selector ) {
- return remove( this, selector );
- },
-
- text: function( value ) {
- return access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().each( function() {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.textContent = value;
- }
- } );
- }, null, value, arguments.length );
- },
-
- append: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.appendChild( elem );
- }
- } );
- },
-
- prepend: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.insertBefore( elem, target.firstChild );
- }
- } );
- },
-
- before: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- } );
- },
-
- after: function() {
- return domManip( this, arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- } );
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; ( elem = this[ i ] ) != null; i++ ) {
- if ( elem.nodeType === 1 ) {
-
- // Prevent memory leaks
- jQuery.cleanData( getAll( elem, false ) );
-
- // Remove any remaining nodes
- elem.textContent = "";
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function() {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- } );
- },
-
- html: function( value ) {
- return access( this, function( value ) {
- var elem = this[ 0 ] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined && elem.nodeType === 1 ) {
- return elem.innerHTML;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) {
-
- value = jQuery.htmlPrefilter( value );
-
- try {
- for ( ; i < l; i++ ) {
- elem = this[ i ] || {};
-
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch ( e ) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function() {
- var ignored = [];
-
- // Make the changes, replacing each non-ignored context element with the new content
- return domManip( this, arguments, function( elem ) {
- var parent = this.parentNode;
-
- if ( jQuery.inArray( this, ignored ) < 0 ) {
- jQuery.cleanData( getAll( this ) );
- if ( parent ) {
- parent.replaceChild( elem, this );
- }
- }
-
- // Force callback invocation
- }, ignored );
- }
-} );
-
-jQuery.each( {
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1,
- i = 0;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone( true );
- jQuery( insert[ i ] )[ original ]( elems );
-
- // Support: QtWebKit
- // .get() because push.apply(_, arraylike) throws
- push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-} );
-
-
-var iframe,
- elemdisplay = {
-
- // Support: Firefox
- // We have to pre-define these values for FF (#10227)
- HTML: "block",
- BODY: "block"
- };
-
-/**
- * Retrieve the actual display of a element
- * @param {String} name nodeName of the element
- * @param {Object} doc Document object
- */
-
-// Called only from within defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
-
- display = jQuery.css( elem[ 0 ], "display" );
-
- // We don't have any data stored on the element,
- // so use "detach" method as fast way to get rid of the element
- elem.detach();
-
- return display;
-}
-
-/**
- * Try to determine the default display value of an element
- * @param {String} nodeName
- */
-function defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
-
- // Use the already-created iframe if possible
- iframe = ( iframe || jQuery( "<iframe frameborder='0' width='0' height='0'/>" ) )
- .appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = iframe[ 0 ].contentDocument;
-
- // Support: IE
- doc.write();
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-var rmargin = ( /^margin/ );
-
-var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" );
-
-var getStyles = function( elem ) {
-
- // Support: IE<=11+, Firefox<=30+ (#15098, #14150)
- // IE throws on elements created in popups
- // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
- var view = elem.ownerDocument.defaultView;
-
- if ( !view || !view.opener ) {
- view = window;
- }
-
- return view.getComputedStyle( elem );
- };
-
-var swap = function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
-};
-
-
-var documentElement = document.documentElement;
-
-
-
-( function() {
- var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal,
- container = document.createElement( "div" ),
- div = document.createElement( "div" );
-
- // Finish early in limited (non-browser) environments
- if ( !div.style ) {
- return;
- }
-
- // Support: IE9-11+
- // Style of cloned element affects source element cloned (#8908)
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" +
- "padding:0;margin-top:1px;position:absolute";
- container.appendChild( div );
-
- // Executing both pixelPosition & boxSizingReliable tests require only one layout
- // so they're executed at the same time to save the second computation.
- function computeStyleTests() {
- div.style.cssText =
-
- // Support: Firefox<29, Android 2.3
- // Vendor-prefix box-sizing
- "-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;" +
- "position:relative;display:block;" +
- "margin:auto;border:1px;padding:1px;" +
- "top:1%;width:50%";
- div.innerHTML = "";
- documentElement.appendChild( container );
-
- var divStyle = window.getComputedStyle( div );
- pixelPositionVal = divStyle.top !== "1%";
- reliableMarginLeftVal = divStyle.marginLeft === "2px";
- boxSizingReliableVal = divStyle.width === "4px";
-
- // Support: Android 4.0 - 4.3 only
- // Some styles come back with percentage values, even though they shouldn't
- div.style.marginRight = "50%";
- pixelMarginRightVal = divStyle.marginRight === "4px";
-
- documentElement.removeChild( container );
- }
-
- jQuery.extend( support, {
- pixelPosition: function() {
-
- // This test is executed only once but we still do memoizing
- // since we can use the boxSizingReliable pre-computing.
- // No need to check if the test was already performed, though.
- computeStyleTests();
- return pixelPositionVal;
- },
- boxSizingReliable: function() {
- if ( boxSizingReliableVal == null ) {
- computeStyleTests();
- }
- return boxSizingReliableVal;
- },
- pixelMarginRight: function() {
-
- // Support: Android 4.0-4.3
- // We're checking for boxSizingReliableVal here instead of pixelMarginRightVal
- // since that compresses better and they're computed together anyway.
- if ( boxSizingReliableVal == null ) {
- computeStyleTests();
- }
- return pixelMarginRightVal;
- },
- reliableMarginLeft: function() {
-
- // Support: IE <=8 only, Android 4.0 - 4.3 only, Firefox <=3 - 37
- if ( boxSizingReliableVal == null ) {
- computeStyleTests();
- }
- return reliableMarginLeftVal;
- },
- reliableMarginRight: function() {
-
- // Support: Android 2.3
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // This support function is only executed once so no memoizing is needed.
- var ret,
- marginDiv = div.appendChild( document.createElement( "div" ) );
-
- // Reset CSS: box-sizing; display; margin; border; padding
- marginDiv.style.cssText = div.style.cssText =
-
- // Support: Android 2.3
- // Vendor-prefix box-sizing
- "-webkit-box-sizing:content-box;box-sizing:content-box;" +
- "display:block;margin:0;border:0;padding:0";
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
- documentElement.appendChild( container );
-
- ret = !parseFloat( window.getComputedStyle( marginDiv ).marginRight );
-
- documentElement.removeChild( container );
- div.removeChild( marginDiv );
-
- return ret;
- }
- } );
-} )();
-
-
-function curCSS( elem, name, computed ) {
- var width, minWidth, maxWidth, ret,
- style = elem.style;
-
- computed = computed || getStyles( elem );
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
-
- // Support: Opera 12.1x only
- // Fall back to style even without computed
- // computed is undefined for elems on document fragments
- if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // Support: IE9
- // getPropertyValue is only needed for .css('filter') (#12537)
- if ( computed ) {
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Android Browser returns percentage for some values,
- // but width seems to be reliably pixels.
- // This is against the CSSOM draft spec:
- // http://dev.w3.org/csswg/cssom/#resolved-values
- if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret !== undefined ?
-
- // Support: IE9-11+
- // IE returns zIndex value as an integer.
- ret + "" :
- ret;
-}
-
-
-function addGetHookIf( conditionFn, hookFn ) {
-
- // Define the hook, we'll check on the first run if it's really needed.
- return {
- get: function() {
- if ( conditionFn() ) {
-
- // Hook not needed (or it's not possible to use it due
- // to missing dependency), remove it.
- delete this.get;
- return;
- }
-
- // Hook needed; redefine it so that the support test is not executed again.
- return ( this.get = hookFn ).apply( this, arguments );
- }
- };
-}
-
-
-var
-
- // Swappable if display is none or starts with table
- // except "table", "table-cell", or "table-caption"
- // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: "0",
- fontWeight: "400"
- },
-
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ],
- emptyStyle = document.createElement( "div" ).style;
-
-// Return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( name ) {
-
- // Shortcut for names that are not vendor prefixed
- if ( name in emptyStyle ) {
- return name;
- }
-
- // Check for vendor prefixed names
- var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in emptyStyle ) {
- return name;
- }
- }
-}
-
-function setPositiveNumber( elem, value, subtract ) {
-
- // Any relative (+/-) values have already been
- // normalized at this point
- var matches = rcssNum.exec( value );
- return matches ?
-
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
-
- // If we already have the right measurement, avoid augmentation
- 4 :
-
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
-
- // Both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
-
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // At this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
-
- // At this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // At this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // Some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
-
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test( val ) ) {
- return val;
- }
-
- // Check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox &&
- ( support.boxSizingReliable() || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // Use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-function showHide( elements, show ) {
- var display, elem, hidden,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- values[ index ] = dataPriv.get( elem, "olddisplay" );
- display = elem.style.display;
- if ( show ) {
-
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = dataPriv.access(
- elem,
- "olddisplay",
- defaultDisplay( elem.nodeName )
- );
- }
- } else {
- hidden = isHidden( elem );
-
- if ( display !== "none" || !hidden ) {
- dataPriv.set(
- elem,
- "olddisplay",
- hidden ? display : jQuery.css( elem, "display" )
- );
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.extend( {
-
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
-
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Don't automatically add "px" to these possibly-unitless properties
- cssNumber: {
- "animationIterationCount": true,
- "columnCount": true,
- "fillOpacity": true,
- "flexGrow": true,
- "flexShrink": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- "float": "cssFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
-
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] ||
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
-
- // Gets hook for the prefixed version, then unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // Convert "+=" or "-=" to relative numbers (#7345)
- if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
- value = adjustCSS( elem, name, ret );
-
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that null and NaN values aren't set (#7116)
- if ( value == null || value !== value ) {
- return;
- }
-
- // If a number was passed in, add the unit (except for certain CSS properties)
- if ( type === "number" ) {
- value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
- }
-
- // Support: IE9-11+
- // background-* props affect original clone's values
- if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !( "set" in hooks ) ||
- ( value = hooks.set( elem, value, extra ) ) !== undefined ) {
-
- style[ name ] = value;
- }
-
- } else {
-
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks &&
- ( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
-
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] ||
- ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
-
- // Try prefixed name followed by the unprefixed name
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- // Convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Make numeric if forced or a qualifier was provided and val looks numeric
- if ( extra === "" || extra ) {
- num = parseFloat( val );
- return extra === true || isFinite( num ) ? num || 0 : val;
- }
- return val;
- }
-} );
-
-jQuery.each( [ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
-
- // Certain elements can have dimension info if we invisibly show them
- // but it must have a current display style that would benefit
- return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
- elem.offsetWidth === 0 ?
- swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- } ) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var matches,
- styles = extra && getStyles( elem ),
- subtract = extra && augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- );
-
- // Convert to pixels if value adjustment is needed
- if ( subtract && ( matches = rcssNum.exec( value ) ) &&
- ( matches[ 3 ] || "px" ) !== "px" ) {
-
- elem.style[ name ] = value;
- value = jQuery.css( elem, name );
- }
-
- return setPositiveNumber( elem, value, subtract );
- }
- };
-} );
-
-jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
- function( elem, computed ) {
- if ( computed ) {
- return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
- elem.getBoundingClientRect().left -
- swap( elem, { marginLeft: 0 }, function() {
- return elem.getBoundingClientRect().left;
- } )
- ) + "px";
- }
- }
-);
-
-// Support: Android 2.3
-jQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,
- function( elem, computed ) {
- if ( computed ) {
- return swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
-);
-
-// These hooks are used by animate to expand properties
-jQuery.each( {
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // Assumes a single number if not a string
- parts = typeof value === "string" ? value.split( " " ) : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-} );
-
-jQuery.fn.extend( {
- css: function( name, value ) {
- return access( this, function( elem, name, value ) {
- var styles, len,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each( function() {
- if ( isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- } );
- }
-} );
-
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || jQuery.easing._default;
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- // Use a property on the element directly when it is not a DOM element,
- // or when there is no matching style property that exists.
- if ( tween.elem.nodeType !== 1 ||
- tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) {
- return tween.elem[ tween.prop ];
- }
-
- // Passing an empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails.
- // Simple values such as "10px" are parsed to Float;
- // complex values such as "rotate(1rad)" are returned as-is.
- result = jQuery.css( tween.elem, tween.prop, "" );
-
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
-
- // Use step hook for back compat.
- // Use cssHook if its there.
- // Use .style if available and use plain properties where available.
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.nodeType === 1 &&
- ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null ||
- jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Support: IE9
-// Panic based approach to setting things on disconnected nodes
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p * Math.PI ) / 2;
- },
- _default: "swing"
-};
-
-jQuery.fx = Tween.prototype.init;
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-
-
-
-var
- fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rrun = /queueHooks$/;
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- window.setTimeout( function() {
- fxNow = undefined;
- } );
- return ( fxNow = jQuery.now() );
-}
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- i = 0,
- attrs = { height: type };
-
- // If we include width, step value is 1 to do all cssExpand values,
- // otherwise step value is 2 to skip over Left and Right
- includeWidth = includeWidth ? 1 : 0;
- for ( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-function createTween( value, prop, animation ) {
- var tween,
- collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) {
-
- // We're done with this property
- return tween;
- }
- }
-}
-
-function defaultPrefilter( elem, props, opts ) {
- /* jshint validthis: true */
- var prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,
- anim = this,
- orig = {},
- style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
- dataShow = dataPriv.get( elem, "fxshow" );
-
- // Handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always( function() {
-
- // Ensure the complete handler is called before this completes
- anim.always( function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- } );
- } );
- }
-
- // Height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
-
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE9-10 do not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- display = jQuery.css( elem, "display" );
-
- // Test default display if display is currently "none"
- checkDisplay = display === "none" ?
- dataPriv.get( elem, "olddisplay" ) || defaultDisplay( elem.nodeName ) : display;
-
- if ( checkDisplay === "inline" && jQuery.css( elem, "float" ) === "none" ) {
- style.display = "inline-block";
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- anim.always( function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- } );
- }
-
- // show/hide pass
- for ( prop in props ) {
- value = props[ prop ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ prop ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
-
- // If there is dataShow left over from a stopped hide or show
- // and we are going to proceed with show, we should pretend to be hidden
- if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) {
- hidden = true;
- } else {
- continue;
- }
- }
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
-
- // Any non-fx value stops us from restoring the original display value
- } else {
- display = undefined;
- }
- }
-
- if ( !jQuery.isEmptyObject( orig ) ) {
- if ( dataShow ) {
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = dataPriv.access( elem, "fxshow", {} );
- }
-
- // Store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done( function() {
- jQuery( elem ).hide();
- } );
- }
- anim.done( function() {
- var prop;
-
- dataPriv.remove( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- } );
- for ( prop in orig ) {
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
-
- // If this is a noop like .hide().hide(), restore an overwritten display value
- } else if ( ( display === "none" ? defaultDisplay( elem.nodeName ) : display ) === "inline" ) {
- style.display = display;
- }
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // Not quite $.extend, this won't overwrite existing keys.
- // Reusing 'index' because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = Animation.prefilters.length,
- deferred = jQuery.Deferred().always( function() {
-
- // Don't match elem in the :animated selector
- delete tick.elem;
- } ),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
-
- // Support: Android 2.3
- // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ] );
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise( {
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, {
- specialEasing: {},
- easing: jQuery.easing._default
- }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
-
- // If we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // Resolve when we played the last frame; otherwise, reject
- if ( gotoEnd ) {
- deferred.notifyWith( elem, [ animation, 1, 0 ] );
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- } ),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- if ( jQuery.isFunction( result.stop ) ) {
- jQuery._queueHooks( animation.elem, animation.opts.queue ).stop =
- jQuery.proxy( result.stop, result );
- }
- return result;
- }
- }
-
- jQuery.map( props, createTween, animation );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- } )
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
- tweeners: {
- "*": [ function( prop, value ) {
- var tween = this.createTween( prop, value );
- adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween );
- return tween;
- } ]
- },
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.match( rnotwhite );
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || [];
- Animation.tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilters: [ defaultPrefilter ],
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- Animation.prefilters.unshift( callback );
- } else {
- Animation.prefilters.push( callback );
- }
- }
-} );
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ?
- opt.duration : opt.duration in jQuery.fx.speeds ?
- jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // Normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.fn.extend( {
- fadeTo: function( speed, to, easing, callback ) {
-
- // Show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // Animate to the value specified
- .end().animate( { opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
-
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations, or finishing resolves immediately
- if ( empty || dataPriv.get( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each( function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = dataPriv.get( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this &&
- ( type == null || timers[ index ].queue === type ) ) {
-
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // Start the next in the queue if the last step wasn't forced.
- // Timers currently will call their complete callbacks, which
- // will dequeue but only if they were gotoEnd.
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each( function() {
- var index,
- data = dataPriv.get( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // Enable finishing flag on private data
- data.finish = true;
-
- // Empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.stop ) {
- hooks.stop.call( this, true );
- }
-
- // Look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // Look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // Turn off finishing flag
- delete data.finish;
- } );
- }
-} );
-
-jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-} );
-
-// Generate shortcuts for custom animations
-jQuery.each( {
- slideDown: genFx( "show" ),
- slideUp: genFx( "hide" ),
- slideToggle: genFx( "toggle" ),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-} );
-
-jQuery.timers = [];
-jQuery.fx.tick = function() {
- var timer,
- i = 0,
- timers = jQuery.timers;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
-
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- jQuery.timers.push( timer );
- if ( timer() ) {
- jQuery.fx.start();
- } else {
- jQuery.timers.pop();
- }
-};
-
-jQuery.fx.interval = 13;
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = window.setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- window.clearInterval( timerId );
-
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
-
- // Default speed
- _default: 400
-};
-
-
-// Based off of the plugin by Clint Helfers, with permission.
-// http://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/
-jQuery.fn.delay = function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = window.setTimeout( next, time );
- hooks.stop = function() {
- window.clearTimeout( timeout );
- };
- } );
-};
-
-
-( function() {
- var input = document.createElement( "input" ),
- select = document.createElement( "select" ),
- opt = select.appendChild( document.createElement( "option" ) );
-
- input.type = "checkbox";
-
- // Support: iOS<=5.1, Android<=4.2+
- // Default value for a checkbox should be "on"
- support.checkOn = input.value !== "";
-
- // Support: IE<=11+
- // Must access selectedIndex to make default options select
- support.optSelected = opt.selected;
-
- // Support: Android<=2.3
- // Options inside disabled selects are incorrectly marked as disabled
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<=11+
- // An input loses its value after becoming a radio
- input = document.createElement( "input" );
- input.value = "t";
- input.type = "radio";
- support.radioValue = input.value === "t";
-} )();
-
-
-var boolHook,
- attrHandle = jQuery.expr.attrHandle;
-
-jQuery.fn.extend( {
- attr: function( name, value ) {
- return access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each( function() {
- jQuery.removeAttr( this, name );
- } );
- }
-} );
-
-jQuery.extend( {
- attr: function( elem, name, value ) {
- var ret, hooks,
- nType = elem.nodeType;
-
- // Don't get/set attributes on text, comment and attribute nodes
- if ( nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] ||
- ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
- }
-
- if ( value !== undefined ) {
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
- return;
- }
-
- if ( hooks && "set" in hooks &&
- ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
- return ret;
- }
-
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
- return ret;
- }
-
- ret = jQuery.find.attr( elem, name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ? undefined : ret;
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !support.radioValue && value === "radio" &&
- jQuery.nodeName( elem, "input" ) ) {
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( ( name = attrNames[ i++ ] ) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
-
- // Set corresponding property to false
- elem[ propName ] = false;
- }
-
- elem.removeAttribute( name );
- }
- }
- }
-} );
-
-// Hooks for boolean attributes
-boolHook = {
- set: function( elem, value, name ) {
- if ( value === false ) {
-
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else {
- elem.setAttribute( name, name );
- }
- return name;
- }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
- var getter = attrHandle[ name ] || jQuery.find.attr;
-
- attrHandle[ name ] = function( elem, name, isXML ) {
- var ret, handle;
- if ( !isXML ) {
-
- // Avoid an infinite loop by temporarily removing this function from the getter
- handle = attrHandle[ name ];
- attrHandle[ name ] = ret;
- ret = getter( elem, name, isXML ) != null ?
- name.toLowerCase() :
- null;
- attrHandle[ name ] = handle;
- }
- return ret;
- };
-} );
-
-
-
-
-var rfocusable = /^(?:input|select|textarea|button)$/i,
- rclickable = /^(?:a|area)$/i;
-
-jQuery.fn.extend( {
- prop: function( name, value ) {
- return access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- return this.each( function() {
- delete this[ jQuery.propFix[ name ] || name ];
- } );
- }
-} );
-
-jQuery.extend( {
- prop: function( elem, name, value ) {
- var ret, hooks,
- nType = elem.nodeType;
-
- // Don't get/set properties on text, comment and attribute nodes
- if ( nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
-
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks &&
- ( ret = hooks.set( elem, value, name ) ) !== undefined ) {
- return ret;
- }
-
- return ( elem[ name ] = value );
- }
-
- if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
- return ret;
- }
-
- return elem[ name ];
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
-
- // elem.tabIndex doesn't always return the
- // correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- // Use proper attribute retrieval(#12072)
- var tabindex = jQuery.find.attr( elem, "tabindex" );
-
- return tabindex ?
- parseInt( tabindex, 10 ) :
- rfocusable.test( elem.nodeName ) ||
- rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- -1;
- }
- }
- },
-
- propFix: {
- "for": "htmlFor",
- "class": "className"
- }
-} );
-
-// Support: IE <=11 only
-// Accessing the selectedIndex property
-// forces the browser to respect setting selected
-// on the option
-// The getter ensures a default option is selected
-// when in an optgroup
-if ( !support.optSelected ) {
- jQuery.propHooks.selected = {
- get: function( elem ) {
- var parent = elem.parentNode;
- if ( parent && parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- return null;
- },
- set: function( elem ) {
- var parent = elem.parentNode;
- if ( parent ) {
- parent.selectedIndex;
-
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- }
- };
-}
-
-jQuery.each( [
- "tabIndex",
- "readOnly",
- "maxLength",
- "cellSpacing",
- "cellPadding",
- "rowSpan",
- "colSpan",
- "useMap",
- "frameBorder",
- "contentEditable"
-], function() {
- jQuery.propFix[ this.toLowerCase() ] = this;
-} );
-
-
-
-
-var rclass = /[\t\r\n\f]/g;
-
-function getClass( elem ) {
- return elem.getAttribute && elem.getAttribute( "class" ) || "";
-}
-
-jQuery.fn.extend( {
- addClass: function( value ) {
- var classes, elem, cur, curValue, clazz, j, finalValue,
- i = 0;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each( function( j ) {
- jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
- } );
- }
-
- if ( typeof value === "string" && value ) {
- classes = value.match( rnotwhite ) || [];
-
- while ( ( elem = this[ i++ ] ) ) {
- curValue = getClass( elem );
- cur = elem.nodeType === 1 &&
- ( " " + curValue + " " ).replace( rclass, " " );
-
- if ( cur ) {
- j = 0;
- while ( ( clazz = classes[ j++ ] ) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
-
- // Only assign if different to avoid unneeded rendering.
- finalValue = jQuery.trim( cur );
- if ( curValue !== finalValue ) {
- elem.setAttribute( "class", finalValue );
- }
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, curValue, clazz, j, finalValue,
- i = 0;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each( function( j ) {
- jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
- } );
- }
-
- if ( !arguments.length ) {
- return this.attr( "class", "" );
- }
-
- if ( typeof value === "string" && value ) {
- classes = value.match( rnotwhite ) || [];
-
- while ( ( elem = this[ i++ ] ) ) {
- curValue = getClass( elem );
-
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 &&
- ( " " + curValue + " " ).replace( rclass, " " );
-
- if ( cur ) {
- j = 0;
- while ( ( clazz = classes[ j++ ] ) ) {
-
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
-
- // Only assign if different to avoid unneeded rendering.
- finalValue = jQuery.trim( cur );
- if ( curValue !== finalValue ) {
- elem.setAttribute( "class", finalValue );
- }
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value;
-
- if ( typeof stateVal === "boolean" && type === "string" ) {
- return stateVal ? this.addClass( value ) : this.removeClass( value );
- }
-
- if ( jQuery.isFunction( value ) ) {
- return this.each( function( i ) {
- jQuery( this ).toggleClass(
- value.call( this, i, getClass( this ), stateVal ),
- stateVal
- );
- } );
- }
-
- return this.each( function() {
- var className, i, self, classNames;
-
- if ( type === "string" ) {
-
- // Toggle individual class names
- i = 0;
- self = jQuery( this );
- classNames = value.match( rnotwhite ) || [];
-
- while ( ( className = classNames[ i++ ] ) ) {
-
- // Check each className given, space separated list
- if ( self.hasClass( className ) ) {
- self.removeClass( className );
- } else {
- self.addClass( className );
- }
- }
-
- // Toggle whole class name
- } else if ( value === undefined || type === "boolean" ) {
- className = getClass( this );
- if ( className ) {
-
- // Store className if set
- dataPriv.set( this, "__className__", className );
- }
-
- // If the element has a class name or if we're passed `false`,
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- if ( this.setAttribute ) {
- this.setAttribute( "class",
- className || value === false ?
- "" :
- dataPriv.get( this, "__className__" ) || ""
- );
- }
- }
- } );
- },
-
- hasClass: function( selector ) {
- var className, elem,
- i = 0;
-
- className = " " + selector + " ";
- while ( ( elem = this[ i++ ] ) ) {
- if ( elem.nodeType === 1 &&
- ( " " + getClass( elem ) + " " ).replace( rclass, " " )
- .indexOf( className ) > -1
- ) {
- return true;
- }
- }
-
- return false;
- }
-} );
-
-
-
-
-var rreturn = /\r/g,
- rspaces = /[\x20\t\r\n\f]+/g;
-
-jQuery.fn.extend( {
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[ 0 ];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] ||
- jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks &&
- "get" in hooks &&
- ( ret = hooks.get( elem, "value" ) ) !== undefined
- ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
-
- // Handle most common string cases
- ret.replace( rreturn, "" ) :
-
- // Handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each( function( i ) {
- var val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, jQuery( this ).val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
-
- } else if ( typeof val === "number" ) {
- val += "";
-
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map( val, function( value ) {
- return value == null ? "" : value + "";
- } );
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- } );
- }
-} );
-
-jQuery.extend( {
- valHooks: {
- option: {
- get: function( elem ) {
-
- var val = jQuery.find.attr( elem, "value" );
- return val != null ?
- val :
-
- // Support: IE10-11+
- // option.text throws exceptions (#14686, #14858)
- // Strip and collapse whitespace
- // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
- jQuery.trim( jQuery.text( elem ) ).replace( rspaces, " " );
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // IE8-9 doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
-
- // Don't return options that are disabled or in a disabled optgroup
- ( support.optDisabled ?
- !option.disabled : option.getAttribute( "disabled" ) === null ) &&
- ( !option.parentNode.disabled ||
- !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var optionSet, option,
- options = elem.options,
- values = jQuery.makeArray( value ),
- i = options.length;
-
- while ( i-- ) {
- option = options[ i ];
- if ( option.selected =
- jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
- ) {
- optionSet = true;
- }
- }
-
- // Force browsers to behave consistently when non-matching value is set
- if ( !optionSet ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- }
-} );
-
-// Radios and checkboxes getter/setter
-jQuery.each( [ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
- }
- }
- };
- if ( !support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- return elem.getAttribute( "value" ) === null ? "on" : elem.value;
- };
- }
-} );
-
-
-
-
-// Return jQuery for attributes-only inclusion
-
-
-var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/;
-
-jQuery.extend( jQuery.event, {
-
- trigger: function( event, data, elem, onlyHandlers ) {
-
- var i, cur, tmp, bubbleType, ontype, handle, special,
- eventPath = [ elem || document ],
- type = hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf( "." ) > -1 ) {
-
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split( "." );
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf( ":" ) < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
- event.isTrigger = onlyHandlers ? 2 : 3;
- event.namespace = namespaces.join( "." );
- event.rnamespace = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === ( elem.ownerDocument || document ) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] &&
- dataPriv.get( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && handle.apply && acceptData( cur ) ) {
- event.result = handle.apply( cur, data );
- if ( event.result === false ) {
- event.preventDefault();
- }
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( ( !special._default ||
- special._default.apply( eventPath.pop(), data ) === false ) &&
- acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- elem[ type ]();
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- // Piggyback on a donor event to simulate a different one
- // Used only for `focus(in | out)` events
- simulate: function( type, elem, event ) {
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- {
- type: type,
- isSimulated: true
- }
- );
-
- jQuery.event.trigger( e, null, elem );
- }
-
-} );
-
-jQuery.fn.extend( {
-
- trigger: function( type, data ) {
- return this.each( function() {
- jQuery.event.trigger( type, data, this );
- } );
- },
- triggerHandler: function( type, data ) {
- var elem = this[ 0 ];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- }
-} );
-
-
-jQuery.each( ( "blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu" ).split( " " ),
- function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-} );
-
-jQuery.fn.extend( {
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-} );
-
-
-
-
-support.focusin = "onfocusin" in window;
-
-
-// Support: Firefox
-// Firefox doesn't have focus(in | out) events
-// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
-//
-// Support: Chrome, Safari
-// focus(in | out) events fire after focus & blur events,
-// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
-// Related ticket - https://code.google.com/p/chromium/issues/detail?id=449857
-if ( !support.focusin ) {
- jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler on the document while someone wants focusin/focusout
- var handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- var doc = this.ownerDocument || this,
- attaches = dataPriv.access( doc, fix );
-
- if ( !attaches ) {
- doc.addEventListener( orig, handler, true );
- }
- dataPriv.access( doc, fix, ( attaches || 0 ) + 1 );
- },
- teardown: function() {
- var doc = this.ownerDocument || this,
- attaches = dataPriv.access( doc, fix ) - 1;
-
- if ( !attaches ) {
- doc.removeEventListener( orig, handler, true );
- dataPriv.remove( doc, fix );
-
- } else {
- dataPriv.access( doc, fix, attaches );
- }
- }
- };
- } );
-}
-var location = window.location;
-
-var nonce = jQuery.now();
-
-var rquery = ( /\?/ );
-
-
-
-// Support: Android 2.3
-// Workaround failure to string-cast null input
-jQuery.parseJSON = function( data ) {
- return JSON.parse( data + "" );
-};
-
-
-// Cross-browser xml parsing
-jQuery.parseXML = function( data ) {
- var xml;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
-
- // Support: IE9
- try {
- xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
- } catch ( e ) {
- xml = undefined;
- }
-
- if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
-};
-
-
-var
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
-
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat( "*" ),
-
- // Anchor tag for parsing the document origin
- originAnchor = document.createElement( "a" );
- originAnchor.href = location.href;
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
-
- // For each dataType in the dataTypeExpression
- while ( ( dataType = dataTypes[ i++ ] ) ) {
-
- // Prepend if requested
- if ( dataType[ 0 ] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
-
- // Otherwise append
- } else {
- ( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if ( typeof dataTypeOrTransport === "string" &&
- !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
-
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- } );
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes;
-
- // Remove auto dataType and get content-type in the process
- while ( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
-
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
-
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
- var conv2, current, conv, tmp, prev,
- converters = {},
-
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice();
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- current = dataTypes.shift();
-
- // Convert to each sequential dataType
- while ( current ) {
-
- if ( s.responseFields[ current ] ) {
- jqXHR[ s.responseFields[ current ] ] = response;
- }
-
- // Apply the dataFilter if provided
- if ( !prev && isSuccess && s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- prev = current;
- current = dataTypes.shift();
-
- if ( current ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current === "*" ) {
-
- current = prev;
-
- // Convert response if prev dataType is non-auto and differs from current
- } else if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split( " " );
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
-
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.unshift( tmp[ 1 ] );
- }
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s.throws ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return {
- state: "parsererror",
- error: conv ? e : "No conversion from " + prev + " to " + current
- };
- }
- }
- }
- }
- }
- }
-
- return { state: "success", data: response };
-}
-
-jQuery.extend( {
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: location.href,
- type: "GET",
- isLocal: rlocalProtocol.test( location.protocol ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /\bxml\b/,
- html: /\bhtml/,
- json: /\bjson\b/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var transport,
-
- // URL without anti-cache param
- cacheURL,
-
- // Response headers
- responseHeadersString,
- responseHeaders,
-
- // timeout handle
- timeoutTimer,
-
- // Url cleanup var
- urlAnchor,
-
- // To know if global events are to be dispatched
- fireGlobals,
-
- // Loop variable
- i,
-
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
-
- // Callbacks context
- callbackContext = s.context || s,
-
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context &&
- ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
-
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks( "once memory" ),
-
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
-
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
-
- // The jqXHR state
- state = 0,
-
- // Default abort message
- strAbort = "canceled",
-
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
-
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
-
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (prefilters might expect it)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || location.href ) + "" ).replace( rhash, "" )
- .replace( rprotocol, location.protocol + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( rnotwhite ) || [ "" ];
-
- // A cross-domain request is in order when the origin doesn't match the current origin.
- if ( s.crossDomain == null ) {
- urlAnchor = document.createElement( "a" );
-
- // Support: IE8-11+
- // IE throws exception if url is malformed, e.g. http://example.com:80x/
- try {
- urlAnchor.href = s.url;
-
- // Support: IE8-11+
- // Anchor's host property isn't correctly set when s.url is relative
- urlAnchor.href = urlAnchor.href;
- s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
- urlAnchor.protocol + "//" + urlAnchor.host;
- } catch ( e ) {
-
- // If there is an error parsing the URL, assume it is crossDomain,
- // it can be rejected by the transport if it is invalid
- s.crossDomain = true;
- }
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
- fireGlobals = jQuery.event && s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger( "ajaxStart" );
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
-
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
- s.accepts[ s.dataTypes[ 0 ] ] +
- ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend &&
- ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
-
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // Aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
-
- // If request was aborted inside ajaxSend, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = window.setTimeout( function() {
- jqXHR.abort( "timeout" );
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
-
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
-
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- window.clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Determine if successful
- isSuccess = status >= 200 && status < 300 || status === 304;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // Convert no matter what (that way responseXXX fields are always set)
- response = ajaxConvert( s, response, jqXHR, isSuccess );
-
- // If successful, handle type chaining
- if ( isSuccess ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader( "Last-Modified" );
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader( "etag" );
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // if no content
- if ( status === 204 || s.type === "HEAD" ) {
- statusText = "nocontent";
-
- // if not modified
- } else if ( status === 304 ) {
- statusText = "notmodified";
-
- // If we have data, let's convert it
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- isSuccess = !error;
- }
- } else {
-
- // Extract error from statusText and normalize for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
-
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger( "ajaxStop" );
- }
- }
- }
-
- return jqXHR;
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- }
-} );
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
-
- // Shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- // The url can be an options object (which then must have .url)
- return jQuery.ajax( jQuery.extend( {
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- }, jQuery.isPlainObject( url ) && url ) );
- };
-} );
-
-
-jQuery._evalUrl = function( url ) {
- return jQuery.ajax( {
- url: url,
-
- // Make this explicit, since user can override this through ajaxSetup (#11264)
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- } );
-};
-
-
-jQuery.fn.extend( {
- wrapAll: function( html ) {
- var wrap;
-
- if ( jQuery.isFunction( html ) ) {
- return this.each( function( i ) {
- jQuery( this ).wrapAll( html.call( this, i ) );
- } );
- }
-
- if ( this[ 0 ] ) {
-
- // The elements to wrap the target around
- wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );
-
- if ( this[ 0 ].parentNode ) {
- wrap.insertBefore( this[ 0 ] );
- }
-
- wrap.map( function() {
- var elem = this;
-
- while ( elem.firstElementChild ) {
- elem = elem.firstElementChild;
- }
-
- return elem;
- } ).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each( function( i ) {
- jQuery( this ).wrapInner( html.call( this, i ) );
- } );
- }
-
- return this.each( function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- } );
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each( function( i ) {
- jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html );
- } );
- },
-
- unwrap: function() {
- return this.parent().each( function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- } ).end();
- }
-} );
-
-
-jQuery.expr.filters.hidden = function( elem ) {
- return !jQuery.expr.filters.visible( elem );
-};
-jQuery.expr.filters.visible = function( elem ) {
-
- // Support: Opera <= 12.12
- // Opera reports offsetWidths and offsetHeights less than zero on some elements
- // Use OR instead of AND as the element is not visible if either is true
- // See tickets #10406 and #13132
- return elem.offsetWidth > 0 || elem.offsetHeight > 0 || elem.getClientRects().length > 0;
-};
-
-
-
-
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
-
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
-
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
-
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams(
- prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]",
- v,
- traditional,
- add
- );
- }
- } );
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
-
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
-
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-
-// Serialize an array of form elements or a set of
-// key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
-
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
-
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- } );
-
- } else {
-
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-jQuery.fn.extend( {
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map( function() {
-
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- } )
- .filter( function() {
- var type = this.type;
-
- // Use .is( ":disabled" ) so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !rcheckableType.test( type ) );
- } )
- .map( function( i, elem ) {
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ) {
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- } ) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- } ).get();
- }
-} );
-
-
-jQuery.ajaxSettings.xhr = function() {
- try {
- return new window.XMLHttpRequest();
- } catch ( e ) {}
-};
-
-var xhrSuccessStatus = {
-
- // File protocol always yields status code 0, assume 200
- 0: 200,
-
- // Support: IE9
- // #1450: sometimes IE returns 1223 when it should be 204
- 1223: 204
- },
- xhrSupported = jQuery.ajaxSettings.xhr();
-
-support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-support.ajax = xhrSupported = !!xhrSupported;
-
-jQuery.ajaxTransport( function( options ) {
- var callback, errorCallback;
-
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( support.cors || xhrSupported && !options.crossDomain ) {
- return {
- send: function( headers, complete ) {
- var i,
- xhr = options.xhr();
-
- xhr.open(
- options.type,
- options.url,
- options.async,
- options.username,
- options.password
- );
-
- // Apply custom fields if provided
- if ( options.xhrFields ) {
- for ( i in options.xhrFields ) {
- xhr[ i ] = options.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( options.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( options.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
- headers[ "X-Requested-With" ] = "XMLHttpRequest";
- }
-
- // Set headers
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
-
- // Callback
- callback = function( type ) {
- return function() {
- if ( callback ) {
- callback = errorCallback = xhr.onload =
- xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
-
- if ( type === "abort" ) {
- xhr.abort();
- } else if ( type === "error" ) {
-
- // Support: IE9
- // On a manual native abort, IE9 throws
- // errors on any property access that is not readyState
- if ( typeof xhr.status !== "number" ) {
- complete( 0, "error" );
- } else {
- complete(
-
- // File: protocol always yields status 0; see #8605, #14207
- xhr.status,
- xhr.statusText
- );
- }
- } else {
- complete(
- xhrSuccessStatus[ xhr.status ] || xhr.status,
- xhr.statusText,
-
- // Support: IE9 only
- // IE9 has no XHR2 but throws on binary (trac-11426)
- // For XHR2 non-text, let the caller handle it (gh-2498)
- ( xhr.responseType || "text" ) !== "text" ||
- typeof xhr.responseText !== "string" ?
- { binary: xhr.response } :
- { text: xhr.responseText },
- xhr.getAllResponseHeaders()
- );
- }
- }
- };
- };
-
- // Listen to events
- xhr.onload = callback();
- errorCallback = xhr.onerror = callback( "error" );
-
- // Support: IE9
- // Use onreadystatechange to replace onabort
- // to handle uncaught aborts
- if ( xhr.onabort !== undefined ) {
- xhr.onabort = errorCallback;
- } else {
- xhr.onreadystatechange = function() {
-
- // Check readyState before timeout as it changes
- if ( xhr.readyState === 4 ) {
-
- // Allow onerror to be called first,
- // but that will not handle a native abort
- // Also, save errorCallback to a variable
- // as xhr.onerror cannot be accessed
- window.setTimeout( function() {
- if ( callback ) {
- errorCallback();
- }
- } );
- }
- };
- }
-
- // Create the abort callback
- callback = callback( "abort" );
-
- try {
-
- // Do send the request (this may raise an exception)
- xhr.send( options.hasContent && options.data || null );
- } catch ( e ) {
-
- // #14683: Only rethrow if this hasn't been notified as an error yet
- if ( callback ) {
- throw e;
- }
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback();
- }
- }
- };
- }
-} );
-
-
-
-
-// Install script dataType
-jQuery.ajaxSetup( {
- accepts: {
- script: "text/javascript, application/javascript, " +
- "application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /\b(?:java|ecma)script\b/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-} );
-
-// Handle cache's special case and crossDomain
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- }
-} );
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function( s ) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
- var script, callback;
- return {
- send: function( _, complete ) {
- script = jQuery( "<script>" ).prop( {
- charset: s.scriptCharset,
- src: s.url
- } ).on(
- "load error",
- callback = function( evt ) {
- script.remove();
- callback = null;
- if ( evt ) {
- complete( evt.type === "error" ? 404 : 200, evt.type );
- }
- }
- );
-
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- document.head.appendChild( script[ 0 ] );
- },
- abort: function() {
- if ( callback ) {
- callback();
- }
- }
- };
- }
-} );
-
-
-
-
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup( {
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-} );
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" &&
- ( s.contentType || "" )
- .indexOf( "application/x-www-form-urlencoded" ) === 0 &&
- rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters[ "script json" ] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // Force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always( function() {
-
- // If previous value didn't exist - remove it
- if ( overwritten === undefined ) {
- jQuery( window ).removeProp( callbackName );
-
- // Otherwise restore preexisting value
- } else {
- window[ callbackName ] = overwritten;
- }
-
- // Save back as free
- if ( s[ callbackName ] ) {
-
- // Make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // Save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- } );
-
- // Delegate to script
- return "script";
- }
-} );
-
-
-
-
-// Argument "data" should be string of html
-// context (optional): If specified, the fragment will be created in this context,
-// defaults to document
-// keepScripts (optional): If true, will include scripts passed in the html string
-jQuery.parseHTML = function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[ 1 ] ) ];
- }
-
- parsed = buildFragment( [ data ], context, scripts );
-
- if ( scripts && scripts.length ) {
- jQuery( scripts ).remove();
- }
-
- return jQuery.merge( [], parsed.childNodes );
-};
-
-
-// Keep a copy of the old load method
-var _load = jQuery.fn.load;
-
-/**
- * Load a url into a page
- */
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf( " " );
-
- if ( off > -1 ) {
- selector = jQuery.trim( url.slice( off ) );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax( {
- url: url,
-
- // If "type" variable is undefined, then "GET" method will be used.
- // Make value of this field explicit since
- // user can override it through ajaxSetup method
- type: type || "GET",
- dataType: "html",
- data: params
- } ).done( function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- // If the request succeeds, this function gets "data", "status", "jqXHR"
- // but they are ignored because response was set above.
- // If it fails, this function gets "jqXHR", "status", "error"
- } ).always( callback && function( jqXHR, status ) {
- self.each( function() {
- callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
- } );
- } );
- }
-
- return this;
-};
-
-
-
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [
- "ajaxStart",
- "ajaxStop",
- "ajaxComplete",
- "ajaxError",
- "ajaxSuccess",
- "ajaxSend"
-], function( i, type ) {
- jQuery.fn[ type ] = function( fn ) {
- return this.on( type, fn );
- };
-} );
-
-
-
-
-jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep( jQuery.timers, function( fn ) {
- return elem === fn.elem;
- } ).length;
-};
-
-
-
-
-/**
- * Gets a window from an element
- */
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;
-}
-
-jQuery.offset = {
- setOffset: function( elem, options, i ) {
- var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,
- position = jQuery.css( elem, "position" ),
- curElem = jQuery( elem ),
- props = {};
-
- // Set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- curOffset = curElem.offset();
- curCSSTop = jQuery.css( elem, "top" );
- curCSSLeft = jQuery.css( elem, "left" );
- calculatePosition = ( position === "absolute" || position === "fixed" ) &&
- ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1;
-
- // Need to be able to calculate position if either
- // top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
-
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
-
- // Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
- options = options.call( elem, i, jQuery.extend( {}, curOffset ) );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
-
- } else {
- curElem.css( props );
- }
- }
-};
-
-jQuery.fn.extend( {
- offset: function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each( function( i ) {
- jQuery.offset.setOffset( this, options, i );
- } );
- }
-
- var docElem, win,
- elem = this[ 0 ],
- box = { top: 0, left: 0 },
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- box = elem.getBoundingClientRect();
- win = getWindow( doc );
- return {
- top: box.top + win.pageYOffset - docElem.clientTop,
- left: box.left + win.pageXOffset - docElem.clientLeft
- };
- },
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- elem = this[ 0 ],
- parentOffset = { top: 0, left: 0 };
-
- // Fixed elements are offset from window (parentOffset = {top:0, left: 0},
- // because it is its only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
-
- // Assume getBoundingClientRect is there when computed position is fixed
- offset = elem.getBoundingClientRect();
-
- } else {
-
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true )
- };
- },
-
- // This method will return documentElement in the following cases:
- // 1) For the element inside the iframe without offsetParent, this method will return
- // documentElement of the parent window
- // 2) For the hidden or detached element
- // 3) For body or html element, i.e. in case of the html node - it will return itself
- //
- // but those exceptions were never presented as a real life use-cases
- // and might be considered as more preferable results.
- //
- // This logic, however, is not guaranteed and can change at any point in the future
- offsetParent: function() {
- return this.map( function() {
- var offsetParent = this.offsetParent;
-
- while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) {
- offsetParent = offsetParent.offsetParent;
- }
-
- return offsetParent || documentElement;
- } );
- }
-} );
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) {
- var top = "pageYOffset" === prop;
-
- jQuery.fn[ method ] = function( val ) {
- return access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? win[ prop ] : elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : win.pageXOffset,
- top ? val : win.pageYOffset
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length );
- };
-} );
-
-// Support: Safari<7-8+, Chrome<37-44+
-// Add the top/left cssHooks using jQuery.fn.position
-// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
-// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280
-// getComputedStyle returns percent when specified for top/left/bottom/right;
-// rather than make the css module depend on the offset module, just check for it here
-jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,
- function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
-
- // If curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- );
-} );
-
-
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
- function( defaultExtra, funcName ) {
-
- // Margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
-
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
- // whichever is greatest
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
-
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- } );
-} );
-
-
-jQuery.fn.extend( {
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
-
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ?
- this.off( selector, "**" ) :
- this.off( types, selector || "**", fn );
- },
- size: function() {
- return this.length;
- }
-} );
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-
-
-
-// Register as a named AMD module, since jQuery can be concatenated with other
-// files that may use define, but not via a proper concatenation script that
-// understands anonymous AMD modules. A named AMD is safest and most robust
-// way to register. Lowercase jquery is used because AMD module names are
-// derived from file names, and jQuery is normally delivered in a lowercase
-// file name. Do this after creating the global so that if an AMD module wants
-// to call noConflict to hide this version of jQuery, it will work.
-
-// Note that for maximum portability, libraries that are not jQuery should
-// declare themselves as anonymous modules, and avoid setting a global if an
-// AMD loader is present. jQuery is a special case. For more information, see
-// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon
-
-if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function() {
- return jQuery;
- } );
-}
-
-
-
-var
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$;
-
-jQuery.noConflict = function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
-};
-
-// Expose jQuery and $ identifiers, even in AMD
-// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)
-// and CommonJS for browser emulators (#13566)
-if ( !noGlobal ) {
- window.jQuery = window.$ = jQuery;
-}
-
-return jQuery;
-}));
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.js
deleted file mode 100644
index 4024b662..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */
-!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
-}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ca(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Fa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ba.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Oa(a,b,c||(g?"border":"content"),d,f)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),
-void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b)}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.map b/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.map
deleted file mode 100644
index 49efa4b3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/jquery/dist/jquery.min.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","arr","slice","concat","push","indexOf","class2type","toString","hasOwn","hasOwnProperty","support","version","jQuery","selector","context","fn","init","rtrim","rmsPrefix","rdashAlpha","fcamelCase","all","letter","toUpperCase","prototype","jquery","constructor","length","toArray","call","get","num","pushStack","elems","ret","merge","prevObject","each","callback","map","elem","i","apply","arguments","first","eq","last","len","j","end","sort","splice","extend","options","name","src","copy","copyIsArray","clone","target","deep","isFunction","isPlainObject","isArray","undefined","expando","Math","random","replace","isReady","error","msg","noop","obj","type","Array","isWindow","isNumeric","realStringObj","parseFloat","key","nodeType","isEmptyObject","globalEval","code","script","indirect","eval","trim","createElement","text","head","appendChild","parentNode","removeChild","camelCase","string","nodeName","toLowerCase","isArrayLike","makeArray","results","Object","inArray","second","grep","invert","callbackInverse","matches","callbackExpect","arg","value","guid","proxy","tmp","args","now","Date","Symbol","iterator","split","Sizzle","Expr","getText","isXML","tokenize","compile","select","outermostContext","sortInput","hasDuplicate","setDocument","docElem","documentIsHTML","rbuggyQSA","rbuggyMatches","contains","preferredDoc","dirruns","done","classCache","createCache","tokenCache","compilerCache","sortOrder","a","b","MAX_NEGATIVE","pop","push_native","list","booleans","whitespace","identifier","attributes","pseudos","rwhitespace","RegExp","rcomma","rcombinators","rattributeQuotes","rpseudo","ridentifier","matchExpr","ID","CLASS","TAG","ATTR","PSEUDO","CHILD","bool","needsContext","rinputs","rheader","rnative","rquickExpr","rsibling","rescape","runescape","funescape","_","escaped","escapedWhitespace","high","String","fromCharCode","unloadHandler","childNodes","e","els","seed","m","nid","nidselect","match","groups","newSelector","newContext","ownerDocument","exec","getElementById","id","getElementsByTagName","getElementsByClassName","qsa","test","getAttribute","setAttribute","toSelector","join","testContext","querySelectorAll","qsaError","removeAttribute","keys","cache","cacheLength","shift","markFunction","assert","div","addHandle","attrs","handler","attrHandle","siblingCheck","cur","diff","sourceIndex","nextSibling","createInputPseudo","createButtonPseudo","createPositionalPseudo","argument","matchIndexes","documentElement","node","hasCompare","parent","doc","defaultView","top","addEventListener","attachEvent","className","createComment","getById","getElementsByName","find","filter","attrId","getAttributeNode","tag","innerHTML","input","matchesSelector","webkitMatchesSelector","mozMatchesSelector","oMatchesSelector","msMatchesSelector","disconnectedMatch","compareDocumentPosition","adown","bup","compare","sortDetached","aup","ap","bp","unshift","expr","elements","attr","val","specified","uniqueSort","duplicates","detectDuplicates","sortStable","textContent","firstChild","nodeValue","selectors","createPseudo","relative",">","dir"," ","+","~","preFilter","excess","unquoted","nodeNameSelector","pattern","operator","check","result","what","simple","forward","ofType","xml","uniqueCache","outerCache","nodeIndex","start","useCache","lastChild","uniqueID","pseudo","setFilters","idx","matched","not","matcher","unmatched","has","innerText","lang","elemLang","hash","location","root","focus","activeElement","hasFocus","href","tabIndex","enabled","disabled","checked","selected","selectedIndex","empty","header","button","even","odd","lt","gt","radio","checkbox","file","password","image","submit","reset","filters","parseOnly","tokens","soFar","preFilters","cached","addCombinator","combinator","base","checkNonElements","doneName","oldCache","newCache","elementMatcher","matchers","multipleContexts","contexts","condense","newUnmatched","mapped","setMatcher","postFilter","postFinder","postSelector","temp","preMap","postMap","preexisting","matcherIn","matcherOut","matcherFromTokens","checkContext","leadingRelative","implicitRelative","matchContext","matchAnyContext","matcherFromGroupMatchers","elementMatchers","setMatchers","bySet","byElement","superMatcher","outermost","matchedCount","setMatched","contextBackup","dirrunsUnique","token","compiled","div1","defaultValue","unique","isXMLDoc","until","truncate","is","siblings","n","rneedsContext","rsingleTag","risSimple","winnow","qualifier","self","rootjQuery","parseHTML","ready","rparentsprev","guaranteedUnique","children","contents","next","prev","targets","l","closest","pos","index","prevAll","add","addBack","sibling","parents","parentsUntil","nextAll","nextUntil","prevUntil","contentDocument","reverse","rnotwhite","createOptions","object","flag","Callbacks","firing","memory","fired","locked","queue","firingIndex","fire","once","stopOnFalse","remove","disable","lock","fireWith","Deferred","func","tuples","state","promise","always","deferred","fail","then","fns","newDefer","tuple","returned","progress","notify","resolve","reject","pipe","stateString","when","subordinate","resolveValues","remaining","updateFunc","values","progressValues","notifyWith","resolveWith","progressContexts","resolveContexts","readyList","readyWait","holdReady","hold","wait","triggerHandler","off","completed","removeEventListener","readyState","doScroll","setTimeout","access","chainable","emptyGet","raw","bulk","acceptData","owner","Data","uid","register","initial","defineProperty","writable","configurable","set","data","prop","stored","camel","hasData","dataPriv","dataUser","rbrace","rmultiDash","dataAttr","parseJSON","removeData","_data","_removeData","camelKey","dequeue","startLength","hooks","_queueHooks","stop","setter","clearQueue","count","defer","pnum","source","rcssNum","cssExpand","isHidden","el","css","adjustCSS","valueParts","tween","adjusted","scale","maxIterations","currentValue","unit","cssNumber","initialInUnit","style","rcheckableType","rtagName","rscriptType","wrapMap","option","thead","col","tr","td","_default","optgroup","tbody","tfoot","colgroup","caption","th","getAll","setGlobalEval","refElements","rhtml","buildFragment","scripts","selection","ignored","wrap","fragment","createDocumentFragment","nodes","htmlPrefilter","createTextNode","checkClone","cloneNode","noCloneChecked","rkeyEvent","rmouseEvent","rtypenamespace","returnTrue","returnFalse","safeActiveElement","err","on","types","one","origFn","event","handleObjIn","eventHandle","events","t","handleObj","special","handlers","namespaces","origType","elemData","handle","triggered","dispatch","delegateType","bindType","namespace","delegateCount","setup","mappedTypes","origCount","teardown","removeEvent","fix","handlerQueue","delegateTarget","preDispatch","isPropagationStopped","currentTarget","isImmediatePropagationStopped","rnamespace","preventDefault","stopPropagation","postDispatch","sel","isNaN","props","fixHooks","keyHooks","original","which","charCode","keyCode","mouseHooks","eventDoc","body","pageX","clientX","scrollLeft","clientLeft","pageY","clientY","scrollTop","clientTop","originalEvent","fixHook","Event","load","noBubble","trigger","blur","click","beforeunload","returnValue","isDefaultPrevented","defaultPrevented","timeStamp","isSimulated","stopImmediatePropagation","mouseenter","mouseleave","pointerenter","pointerleave","orig","related","relatedTarget","rxhtmlTag","rnoInnerhtml","rchecked","rscriptTypeMasked","rcleanScript","manipulationTarget","content","disableScript","restoreScript","cloneCopyEvent","dest","pdataOld","pdataCur","udataOld","udataCur","fixInput","domManip","collection","hasScripts","iNoClone","html","_evalUrl","keepData","cleanData","dataAndEvents","deepDataAndEvents","srcElements","destElements","inPage","detach","append","prepend","insertBefore","before","after","replaceWith","replaceChild","appendTo","prependTo","insertAfter","replaceAll","insert","iframe","elemdisplay","HTML","BODY","actualDisplay","display","defaultDisplay","write","close","rmargin","rnumnonpx","getStyles","view","opener","getComputedStyle","swap","old","pixelPositionVal","boxSizingReliableVal","pixelMarginRightVal","reliableMarginLeftVal","container","backgroundClip","clearCloneStyle","cssText","computeStyleTests","divStyle","marginLeft","width","marginRight","pixelPosition","boxSizingReliable","pixelMarginRight","reliableMarginLeft","reliableMarginRight","marginDiv","curCSS","computed","minWidth","maxWidth","getPropertyValue","addGetHookIf","conditionFn","hookFn","rdisplayswap","cssShow","position","visibility","cssNormalTransform","letterSpacing","fontWeight","cssPrefixes","emptyStyle","vendorPropName","capName","setPositiveNumber","subtract","max","augmentWidthOrHeight","extra","isBorderBox","styles","getWidthOrHeight","valueIsBorderBox","offsetWidth","offsetHeight","showHide","show","hidden","cssHooks","opacity","animationIterationCount","columnCount","fillOpacity","flexGrow","flexShrink","lineHeight","order","orphans","widows","zIndex","zoom","cssProps","float","origName","isFinite","getBoundingClientRect","left","margin","padding","border","prefix","suffix","expand","expanded","parts","hide","toggle","Tween","easing","propHooks","run","percent","eased","duration","step","fx","linear","p","swing","cos","PI","fxNow","timerId","rfxtypes","rrun","createFxNow","genFx","includeWidth","height","createTween","animation","Animation","tweeners","defaultPrefilter","opts","oldfire","checkDisplay","anim","dataShow","unqueued","overflow","overflowX","overflowY","propFilter","specialEasing","properties","stopped","prefilters","tick","currentTime","startTime","tweens","originalProperties","originalOptions","gotoEnd","rejectWith","timer","complete","*","tweener","prefilter","speed","opt","speeds","fadeTo","to","animate","optall","doAnimation","finish","stopQueue","timers","cssFn","slideDown","slideUp","slideToggle","fadeIn","fadeOut","fadeToggle","interval","setInterval","clearInterval","slow","fast","delay","time","timeout","clearTimeout","checkOn","optSelected","optDisabled","radioValue","boolHook","removeAttr","nType","attrHooks","propName","attrNames","propFix","getter","rfocusable","rclickable","removeProp","tabindex","parseInt","for","class","rclass","getClass","addClass","classes","curValue","clazz","finalValue","removeClass","toggleClass","stateVal","classNames","hasClass","rreturn","rspaces","valHooks","optionSet","rfocusMorph","onlyHandlers","bubbleType","ontype","eventPath","isTrigger","parentWindow","simulate","hover","fnOver","fnOut","focusin","attaches","nonce","rquery","JSON","parse","parseXML","DOMParser","parseFromString","rhash","rts","rheaders","rlocalProtocol","rnoContent","rprotocol","transports","allTypes","originAnchor","addToPrefiltersOrTransports","structure","dataTypeExpression","dataType","dataTypes","inspectPrefiltersOrTransports","jqXHR","inspected","seekingTransport","inspect","prefilterOrFactory","dataTypeOrTransport","ajaxExtend","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","ct","finalDataType","firstDataType","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","responseFields","dataFilter","active","lastModified","etag","url","isLocal","protocol","processData","async","contentType","accepts","json","* text","text html","text json","text xml","ajaxSetup","settings","ajaxPrefilter","ajaxTransport","ajax","transport","cacheURL","responseHeadersString","responseHeaders","timeoutTimer","urlAnchor","fireGlobals","callbackContext","globalEventContext","completeDeferred","statusCode","requestHeaders","requestHeadersNames","strAbort","getAllResponseHeaders","setRequestHeader","lname","overrideMimeType","status","abort","statusText","finalText","success","method","crossDomain","host","param","traditional","hasContent","ifModified","headers","beforeSend","send","nativeStatusText","modified","getJSON","getScript","throws","wrapAll","firstElementChild","wrapInner","unwrap","visible","getClientRects","r20","rbracket","rCRLF","rsubmitterTypes","rsubmittable","buildParams","v","encodeURIComponent","serialize","serializeArray","xhr","XMLHttpRequest","xhrSuccessStatus","0","1223","xhrSupported","cors","errorCallback","open","username","xhrFields","onload","onerror","onabort","onreadystatechange","responseType","responseText","binary","text script","charset","scriptCharset","evt","oldCallbacks","rjsonp","jsonp","jsonpCallback","originalSettings","callbackName","overwritten","responseContainer","jsonProp","keepScripts","parsed","_load","params","animated","getWindow","offset","setOffset","curPosition","curLeft","curCSSTop","curTop","curOffset","curCSSLeft","calculatePosition","curElem","using","win","box","pageYOffset","pageXOffset","offsetParent","parentOffset","scrollTo","Height","Width","","defaultExtra","funcName","bind","unbind","delegate","undelegate","size","andSelf","define","amd","_jQuery","_$","$","noConflict"],"mappings":"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","file":"jquery.min.js"} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.css b/usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.css
deleted file mode 100644
index 12325502..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.css
+++ /dev/null
@@ -1,478 +0,0 @@
-/* required styles */
-
-.leaflet-map-pane,
-.leaflet-tile,
-.leaflet-marker-icon,
-.leaflet-marker-shadow,
-.leaflet-tile-pane,
-.leaflet-tile-container,
-.leaflet-overlay-pane,
-.leaflet-shadow-pane,
-.leaflet-marker-pane,
-.leaflet-popup-pane,
-.leaflet-overlay-pane svg,
-.leaflet-zoom-box,
-.leaflet-image-layer,
-.leaflet-layer {
- position: absolute;
- left: 0;
- top: 0;
- }
-.leaflet-container {
- overflow: hidden;
- -ms-touch-action: none;
- }
-.leaflet-tile,
-.leaflet-marker-icon,
-.leaflet-marker-shadow {
- -webkit-user-select: none;
- -moz-user-select: none;
- user-select: none;
- -webkit-user-drag: none;
- }
-.leaflet-marker-icon,
-.leaflet-marker-shadow {
- display: block;
- }
-/* map is broken in FF if you have max-width: 100% on tiles */
-.leaflet-container img {
- max-width: none !important;
- }
-/* stupid Android 2 doesn't understand "max-width: none" properly */
-.leaflet-container img.leaflet-image-layer {
- max-width: 15000px !important;
- }
-.leaflet-tile {
- filter: inherit;
- visibility: hidden;
- }
-.leaflet-tile-loaded {
- visibility: inherit;
- }
-.leaflet-zoom-box {
- width: 0;
- height: 0;
- }
-/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
-.leaflet-overlay-pane svg {
- -moz-user-select: none;
- }
-
-.leaflet-tile-pane { z-index: 2; }
-.leaflet-objects-pane { z-index: 3; }
-.leaflet-overlay-pane { z-index: 4; }
-.leaflet-shadow-pane { z-index: 5; }
-.leaflet-marker-pane { z-index: 6; }
-.leaflet-popup-pane { z-index: 7; }
-
-.leaflet-vml-shape {
- width: 1px;
- height: 1px;
- }
-.lvml {
- behavior: url(#default#VML);
- display: inline-block;
- position: absolute;
- }
-
-
-/* control positioning */
-
-.leaflet-control {
- position: relative;
- z-index: 7;
- pointer-events: auto;
- }
-.leaflet-top,
-.leaflet-bottom {
- position: absolute;
- z-index: 1000;
- pointer-events: none;
- }
-.leaflet-top {
- top: 0;
- }
-.leaflet-right {
- right: 0;
- }
-.leaflet-bottom {
- bottom: 0;
- }
-.leaflet-left {
- left: 0;
- }
-.leaflet-control {
- float: left;
- clear: both;
- }
-.leaflet-right .leaflet-control {
- float: right;
- }
-.leaflet-top .leaflet-control {
- margin-top: 10px;
- }
-.leaflet-bottom .leaflet-control {
- margin-bottom: 10px;
- }
-.leaflet-left .leaflet-control {
- margin-left: 10px;
- }
-.leaflet-right .leaflet-control {
- margin-right: 10px;
- }
-
-
-/* zoom and fade animations */
-
-.leaflet-fade-anim .leaflet-tile,
-.leaflet-fade-anim .leaflet-popup {
- opacity: 0;
- -webkit-transition: opacity 0.2s linear;
- -moz-transition: opacity 0.2s linear;
- -o-transition: opacity 0.2s linear;
- transition: opacity 0.2s linear;
- }
-.leaflet-fade-anim .leaflet-tile-loaded,
-.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
- opacity: 1;
- }
-
-.leaflet-zoom-anim .leaflet-zoom-animated {
- -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
- -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
- -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
- transition: transform 0.25s cubic-bezier(0,0,0.25,1);
- }
-.leaflet-zoom-anim .leaflet-tile,
-.leaflet-pan-anim .leaflet-tile,
-.leaflet-touching .leaflet-zoom-animated {
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
- }
-
-.leaflet-zoom-anim .leaflet-zoom-hide {
- visibility: hidden;
- }
-
-
-/* cursors */
-
-.leaflet-clickable {
- cursor: pointer;
- }
-.leaflet-container {
- cursor: -webkit-grab;
- cursor: -moz-grab;
- }
-.leaflet-popup-pane,
-.leaflet-control {
- cursor: auto;
- }
-.leaflet-dragging .leaflet-container,
-.leaflet-dragging .leaflet-clickable {
- cursor: move;
- cursor: -webkit-grabbing;
- cursor: -moz-grabbing;
- }
-
-
-/* visual tweaks */
-
-.leaflet-container {
- background: #ddd;
- outline: 0;
- }
-.leaflet-container a {
- color: #0078A8;
- }
-.leaflet-container a.leaflet-active {
- outline: 2px solid orange;
- }
-.leaflet-zoom-box {
- border: 2px dotted #38f;
- background: rgba(255,255,255,0.5);
- }
-
-
-/* general typography */
-.leaflet-container {
- font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
- }
-
-
-/* general toolbar styles */
-
-.leaflet-bar {
- box-shadow: 0 1px 5px rgba(0,0,0,0.65);
- border-radius: 4px;
- }
-.leaflet-bar a,
-.leaflet-bar a:hover {
- background-color: #fff;
- border-bottom: 1px solid #ccc;
- width: 26px;
- height: 26px;
- line-height: 26px;
- display: block;
- text-align: center;
- text-decoration: none;
- color: black;
- }
-.leaflet-bar a,
-.leaflet-control-layers-toggle {
- background-position: 50% 50%;
- background-repeat: no-repeat;
- display: block;
- }
-.leaflet-bar a:hover {
- background-color: #f4f4f4;
- }
-.leaflet-bar a:first-child {
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- }
-.leaflet-bar a:last-child {
- border-bottom-left-radius: 4px;
- border-bottom-right-radius: 4px;
- border-bottom: none;
- }
-.leaflet-bar a.leaflet-disabled {
- cursor: default;
- background-color: #f4f4f4;
- color: #bbb;
- }
-
-.leaflet-touch .leaflet-bar a {
- width: 30px;
- height: 30px;
- line-height: 30px;
- }
-
-
-/* zoom control */
-
-.leaflet-control-zoom-in,
-.leaflet-control-zoom-out {
- font: bold 18px 'Lucida Console', Monaco, monospace;
- text-indent: 1px;
- }
-.leaflet-control-zoom-out {
- font-size: 20px;
- }
-
-.leaflet-touch .leaflet-control-zoom-in {
- font-size: 22px;
- }
-.leaflet-touch .leaflet-control-zoom-out {
- font-size: 24px;
- }
-
-
-/* layers control */
-
-.leaflet-control-layers {
- box-shadow: 0 1px 5px rgba(0,0,0,0.4);
- background: #fff;
- border-radius: 5px;
- }
-.leaflet-control-layers-toggle {
- background-image: url(images/layers.png);
- width: 36px;
- height: 36px;
- }
-.leaflet-retina .leaflet-control-layers-toggle {
- background-image: url(images/layers-2x.png);
- background-size: 26px 26px;
- }
-.leaflet-touch .leaflet-control-layers-toggle {
- width: 44px;
- height: 44px;
- }
-.leaflet-control-layers .leaflet-control-layers-list,
-.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
- display: none;
- }
-.leaflet-control-layers-expanded .leaflet-control-layers-list {
- display: block;
- position: relative;
- }
-.leaflet-control-layers-expanded {
- padding: 6px 10px 6px 6px;
- color: #333;
- background: #fff;
- }
-.leaflet-control-layers-selector {
- margin-top: 2px;
- position: relative;
- top: 1px;
- }
-.leaflet-control-layers label {
- display: block;
- }
-.leaflet-control-layers-separator {
- height: 0;
- border-top: 1px solid #ddd;
- margin: 5px -10px 5px -6px;
- }
-
-
-/* attribution and scale controls */
-
-.leaflet-container .leaflet-control-attribution {
- background: #fff;
- background: rgba(255, 255, 255, 0.7);
- margin: 0;
- }
-.leaflet-control-attribution,
-.leaflet-control-scale-line {
- padding: 0 5px;
- color: #333;
- }
-.leaflet-control-attribution a {
- text-decoration: none;
- }
-.leaflet-control-attribution a:hover {
- text-decoration: underline;
- }
-.leaflet-container .leaflet-control-attribution,
-.leaflet-container .leaflet-control-scale {
- font-size: 11px;
- }
-.leaflet-left .leaflet-control-scale {
- margin-left: 5px;
- }
-.leaflet-bottom .leaflet-control-scale {
- margin-bottom: 5px;
- }
-.leaflet-control-scale-line {
- border: 2px solid #777;
- border-top: none;
- line-height: 1.1;
- padding: 2px 5px 1px;
- font-size: 11px;
- white-space: nowrap;
- overflow: hidden;
- -moz-box-sizing: content-box;
- box-sizing: content-box;
-
- background: #fff;
- background: rgba(255, 255, 255, 0.5);
- }
-.leaflet-control-scale-line:not(:first-child) {
- border-top: 2px solid #777;
- border-bottom: none;
- margin-top: -2px;
- }
-.leaflet-control-scale-line:not(:first-child):not(:last-child) {
- border-bottom: 2px solid #777;
- }
-
-.leaflet-touch .leaflet-control-attribution,
-.leaflet-touch .leaflet-control-layers,
-.leaflet-touch .leaflet-bar {
- box-shadow: none;
- }
-.leaflet-touch .leaflet-control-layers,
-.leaflet-touch .leaflet-bar {
- border: 2px solid rgba(0,0,0,0.2);
- background-clip: padding-box;
- }
-
-
-/* popup */
-
-.leaflet-popup {
- position: absolute;
- text-align: center;
- }
-.leaflet-popup-content-wrapper {
- padding: 1px;
- text-align: left;
- border-radius: 12px;
- }
-.leaflet-popup-content {
- margin: 13px 19px;
- line-height: 1.4;
- }
-.leaflet-popup-content p {
- margin: 18px 0;
- }
-.leaflet-popup-tip-container {
- margin: 0 auto;
- width: 40px;
- height: 20px;
- position: relative;
- overflow: hidden;
- }
-.leaflet-popup-tip {
- width: 17px;
- height: 17px;
- padding: 1px;
-
- margin: -10px auto 0;
-
- -webkit-transform: rotate(45deg);
- -moz-transform: rotate(45deg);
- -ms-transform: rotate(45deg);
- -o-transform: rotate(45deg);
- transform: rotate(45deg);
- }
-.leaflet-popup-content-wrapper,
-.leaflet-popup-tip {
- background: white;
-
- box-shadow: 0 3px 14px rgba(0,0,0,0.4);
- }
-.leaflet-container a.leaflet-popup-close-button {
- position: absolute;
- top: 0;
- right: 0;
- padding: 4px 4px 0 0;
- text-align: center;
- width: 18px;
- height: 14px;
- font: 16px/14px Tahoma, Verdana, sans-serif;
- color: #c3c3c3;
- text-decoration: none;
- font-weight: bold;
- background: transparent;
- }
-.leaflet-container a.leaflet-popup-close-button:hover {
- color: #999;
- }
-.leaflet-popup-scrolled {
- overflow: auto;
- border-bottom: 1px solid #ddd;
- border-top: 1px solid #ddd;
- }
-
-.leaflet-oldie .leaflet-popup-content-wrapper {
- zoom: 1;
- }
-.leaflet-oldie .leaflet-popup-tip {
- width: 24px;
- margin: 0 auto;
-
- -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
- filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
- }
-.leaflet-oldie .leaflet-popup-tip-container {
- margin-top: -1px;
- }
-
-.leaflet-oldie .leaflet-control-zoom,
-.leaflet-oldie .leaflet-control-layers,
-.leaflet-oldie .leaflet-popup-content-wrapper,
-.leaflet-oldie .leaflet-popup-tip {
- border: 1px solid #999;
- }
-
-
-/* div icon */
-
-.leaflet-div-icon {
- background: #fff;
- border: 1px solid #666;
- }
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.js b/usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.js
deleted file mode 100644
index 03434b77..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/leaflet-0.7.3/leaflet.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com
- (c) 2010-2013, Vladimir Agafonkin
- (c) 2010-2011, CloudMade
-*/
-!function(t,e,i){var n=t.L,o={};o.version="0.7.3","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints&&!t.PointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled&&t.navigator.maxTouchPoints||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&function(){var t="ontouchstart";if(m||t in g)return!0;var i=e.createElement("div"),n=!1;return i.setAttribute?(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n):!1}();o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n)),a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return s=e&&e.maxZoom?Math.min(e.maxZoom,s):s,this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-1/0,o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;
-return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;i.width=i.height=e.detectRetina&&o.Browser.retina?2*n:n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i=o.point("shadow"===e?n.shadowAnchor||n.iconAnchor:n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return i.innerHTML=n.html!==!1?n.html:"",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="&#215;",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())
-},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!(t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(o.DomEvent.stopPropagation(t),o.Draggable._disabled||(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),this._moving)))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],s[a]="function"==typeof n?n.bind(h):n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0;
-break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a})},this)},_onZoomTransitionEnd:function(){this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/lodash/4.5.1/lodash.js b/usecaseui-common/src/main/webapp/app/fusion/external/lodash/4.5.1/lodash.js
deleted file mode 100644
index f1860f12..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/lodash/4.5.1/lodash.js
+++ /dev/null
@@ -1,14932 +0,0 @@
-/**
- * @license
- * lodash 4.5.1 <https://lodash.com/>
- * Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- * Available under MIT license <https://lodash.com/license>
- */
-;(function() {
-
- /** Used as a safe reference for `undefined` in pre-ES5 environments. */
- var undefined;
-
- /** Used as the semantic version number. */
- var VERSION = '4.5.1';
-
- /** Used to compose bitmasks for wrapper metadata. */
- var BIND_FLAG = 1,
- BIND_KEY_FLAG = 2,
- CURRY_BOUND_FLAG = 4,
- CURRY_FLAG = 8,
- CURRY_RIGHT_FLAG = 16,
- PARTIAL_FLAG = 32,
- PARTIAL_RIGHT_FLAG = 64,
- ARY_FLAG = 128,
- REARG_FLAG = 256,
- FLIP_FLAG = 512;
-
- /** Used to compose bitmasks for comparison styles. */
- var UNORDERED_COMPARE_FLAG = 1,
- PARTIAL_COMPARE_FLAG = 2;
-
- /** Used as default options for `_.truncate`. */
- var DEFAULT_TRUNC_LENGTH = 30,
- DEFAULT_TRUNC_OMISSION = '...';
-
- /** Used to detect hot functions by number of calls within a span of milliseconds. */
- var HOT_COUNT = 150,
- HOT_SPAN = 16;
-
- /** Used as the size to enable large array optimizations. */
- var LARGE_ARRAY_SIZE = 200;
-
- /** Used to indicate the type of lazy iteratees. */
- var LAZY_FILTER_FLAG = 1,
- LAZY_MAP_FLAG = 2,
- LAZY_WHILE_FLAG = 3;
-
- /** Used as the `TypeError` message for "Functions" methods. */
- var FUNC_ERROR_TEXT = 'Expected a function';
-
- /** Used to stand-in for `undefined` hash values. */
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
-
- /** Used as references for various `Number` constants. */
- var INFINITY = 1 / 0,
- MAX_SAFE_INTEGER = 9007199254740991,
- MAX_INTEGER = 1.7976931348623157e+308,
- NAN = 0 / 0;
-
- /** Used as references for the maximum length and index of an array. */
- var MAX_ARRAY_LENGTH = 4294967295,
- MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
- HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
-
- /** Used as the internal argument placeholder. */
- var PLACEHOLDER = '__lodash_placeholder__';
-
- /** `Object#toString` result references. */
- var argsTag = '[object Arguments]',
- arrayTag = '[object Array]',
- boolTag = '[object Boolean]',
- dateTag = '[object Date]',
- errorTag = '[object Error]',
- funcTag = '[object Function]',
- genTag = '[object GeneratorFunction]',
- mapTag = '[object Map]',
- numberTag = '[object Number]',
- objectTag = '[object Object]',
- regexpTag = '[object RegExp]',
- setTag = '[object Set]',
- stringTag = '[object String]',
- symbolTag = '[object Symbol]',
- weakMapTag = '[object WeakMap]',
- weakSetTag = '[object WeakSet]';
-
- var arrayBufferTag = '[object ArrayBuffer]',
- float32Tag = '[object Float32Array]',
- float64Tag = '[object Float64Array]',
- int8Tag = '[object Int8Array]',
- int16Tag = '[object Int16Array]',
- int32Tag = '[object Int32Array]',
- uint8Tag = '[object Uint8Array]',
- uint8ClampedTag = '[object Uint8ClampedArray]',
- uint16Tag = '[object Uint16Array]',
- uint32Tag = '[object Uint32Array]';
-
- /** Used to match empty string literals in compiled template source. */
- var reEmptyStringLeading = /\b__p \+= '';/g,
- reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
- reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
-
- /** Used to match HTML entities and HTML characters. */
- var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
- reUnescapedHtml = /[&<>"'`]/g,
- reHasEscapedHtml = RegExp(reEscapedHtml.source),
- reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
-
- /** Used to match template delimiters. */
- var reEscape = /<%-([\s\S]+?)%>/g,
- reEvaluate = /<%([\s\S]+?)%>/g,
- reInterpolate = /<%=([\s\S]+?)%>/g;
-
- /** Used to match property names within property paths. */
- var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
- reIsPlainProp = /^\w*$/,
- rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g;
-
- /** Used to match `RegExp` [syntax characters](http://ecma-international.org/ecma-262/6.0/#sec-patterns). */
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
- reHasRegExpChar = RegExp(reRegExpChar.source);
-
- /** Used to match leading and trailing whitespace. */
- var reTrim = /^\s+|\s+$/g,
- reTrimStart = /^\s+/,
- reTrimEnd = /\s+$/;
-
- /** Used to match backslashes in property paths. */
- var reEscapeChar = /\\(\\)?/g;
-
- /** Used to match [ES template delimiters](http://ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components). */
- var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
-
- /** Used to match `RegExp` flags from their coerced string values. */
- var reFlags = /\w*$/;
-
- /** Used to detect hexadecimal string values. */
- var reHasHexPrefix = /^0x/i;
-
- /** Used to detect bad signed hexadecimal string values. */
- var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
-
- /** Used to detect binary string values. */
- var reIsBinary = /^0b[01]+$/i;
-
- /** Used to detect host constructors (Safari > 5). */
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
-
- /** Used to detect octal string values. */
- var reIsOctal = /^0o[0-7]+$/i;
-
- /** Used to detect unsigned integer values. */
- var reIsUint = /^(?:0|[1-9]\d*)$/;
-
- /** Used to match latin-1 supplementary letters (excluding mathematical operators). */
- var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
-
- /** Used to ensure capturing order of template delimiters. */
- var reNoMatch = /($^)/;
-
- /** Used to match unescaped characters in compiled string literals. */
- var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
-
- /** Used to compose unicode character classes. */
- var rsAstralRange = '\\ud800-\\udfff',
- rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
- rsComboSymbolsRange = '\\u20d0-\\u20f0',
- rsDingbatRange = '\\u2700-\\u27bf',
- rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
- rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
- rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
- rsQuoteRange = '\\u2018\\u2019\\u201c\\u201d',
- rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
- rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
- rsVarRange = '\\ufe0e\\ufe0f',
- rsBreakRange = rsMathOpRange + rsNonCharRange + rsQuoteRange + rsSpaceRange;
-
- /** Used to compose unicode capture groups. */
- var rsAstral = '[' + rsAstralRange + ']',
- rsBreak = '[' + rsBreakRange + ']',
- rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
- rsDigits = '\\d+',
- rsDingbat = '[' + rsDingbatRange + ']',
- rsLower = '[' + rsLowerRange + ']',
- rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
- rsFitz = '\\ud83c[\\udffb-\\udfff]',
- rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
- rsNonAstral = '[^' + rsAstralRange + ']',
- rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
- rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
- rsUpper = '[' + rsUpperRange + ']',
- rsZWJ = '\\u200d';
-
- /** Used to compose unicode regexes. */
- var rsLowerMisc = '(?:' + rsLower + '|' + rsMisc + ')',
- rsUpperMisc = '(?:' + rsUpper + '|' + rsMisc + ')',
- reOptMod = rsModifier + '?',
- rsOptVar = '[' + rsVarRange + ']?',
- rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
- rsSeq = rsOptVar + reOptMod + rsOptJoin,
- rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
- rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
-
- /**
- * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
- * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
- */
- var reComboMark = RegExp(rsCombo, 'g');
-
- /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
- var reComplexSymbol = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
-
- /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
- var reHasComplexSymbol = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
-
- /** Used to match non-compound words composed of alphanumeric characters. */
- var reBasicWord = /[a-zA-Z0-9]+/g;
-
- /** Used to match complex or compound words. */
- var reComplexWord = RegExp([
- rsUpper + '?' + rsLower + '+(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
- rsUpperMisc + '+(?=' + [rsBreak, rsUpper + rsLowerMisc, '$'].join('|') + ')',
- rsUpper + '?' + rsLowerMisc + '+',
- rsUpper + '+',
- rsDigits,
- rsEmoji
- ].join('|'), 'g');
-
- /** Used to detect strings that need a more robust regexp to match words. */
- var reHasComplexWord = /[a-z][A-Z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
-
- /** Used to assign default `context` object properties. */
- var contextProps = [
- 'Array', 'Buffer', 'Date', 'Error', 'Float32Array', 'Float64Array',
- 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
- 'Reflect', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
- 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', '_',
- 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
- ];
-
- /** Used to make template sourceURLs easier to identify. */
- var templateCounter = -1;
-
- /** Used to identify `toStringTag` values of typed arrays. */
- var typedArrayTags = {};
- typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
- typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
- typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
- typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
- typedArrayTags[uint32Tag] = true;
- typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
- typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
- typedArrayTags[dateTag] = typedArrayTags[errorTag] =
- typedArrayTags[funcTag] = typedArrayTags[mapTag] =
- typedArrayTags[numberTag] = typedArrayTags[objectTag] =
- typedArrayTags[regexpTag] = typedArrayTags[setTag] =
- typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
-
- /** Used to identify `toStringTag` values supported by `_.clone`. */
- var cloneableTags = {};
- cloneableTags[argsTag] = cloneableTags[arrayTag] =
- cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
- cloneableTags[dateTag] = cloneableTags[float32Tag] =
- cloneableTags[float64Tag] = cloneableTags[int8Tag] =
- cloneableTags[int16Tag] = cloneableTags[int32Tag] =
- cloneableTags[mapTag] = cloneableTags[numberTag] =
- cloneableTags[objectTag] = cloneableTags[regexpTag] =
- cloneableTags[setTag] = cloneableTags[stringTag] =
- cloneableTags[symbolTag] = cloneableTags[uint8Tag] =
- cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] =
- cloneableTags[uint32Tag] = true;
- cloneableTags[errorTag] = cloneableTags[funcTag] =
- cloneableTags[weakMapTag] = false;
-
- /** Used to map latin-1 supplementary letters to basic latin letters. */
- var deburredLetters = {
- '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
- '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
- '\xc7': 'C', '\xe7': 'c',
- '\xd0': 'D', '\xf0': 'd',
- '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
- '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
- '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
- '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
- '\xd1': 'N', '\xf1': 'n',
- '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
- '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
- '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
- '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
- '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
- '\xc6': 'Ae', '\xe6': 'ae',
- '\xde': 'Th', '\xfe': 'th',
- '\xdf': 'ss'
- };
-
- /** Used to map characters to HTML entities. */
- var htmlEscapes = {
- '&': '&amp;',
- '<': '&lt;',
- '>': '&gt;',
- '"': '&quot;',
- "'": '&#39;',
- '`': '&#96;'
- };
-
- /** Used to map HTML entities to characters. */
- var htmlUnescapes = {
- '&amp;': '&',
- '&lt;': '<',
- '&gt;': '>',
- '&quot;': '"',
- '&#39;': "'",
- '&#96;': '`'
- };
-
- /** Used to determine if values are of the language type `Object`. */
- var objectTypes = {
- 'function': true,
- 'object': true
- };
-
- /** Used to escape characters for inclusion in compiled string literals. */
- var stringEscapes = {
- '\\': '\\',
- "'": "'",
- '\n': 'n',
- '\r': 'r',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
-
- /** Built-in method references without a dependency on `root`. */
- var freeParseFloat = parseFloat,
- freeParseInt = parseInt;
-
- /** Detect free variable `exports`. */
- var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType)
- ? exports
- : undefined;
-
- /** Detect free variable `module`. */
- var freeModule = (objectTypes[typeof module] && module && !module.nodeType)
- ? module
- : undefined;
-
- /** Detect the popular CommonJS extension `module.exports`. */
- var moduleExports = (freeModule && freeModule.exports === freeExports)
- ? freeExports
- : undefined;
-
- /** Detect free variable `global` from Node.js. */
- var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global);
-
- /** Detect free variable `self`. */
- var freeSelf = checkGlobal(objectTypes[typeof self] && self);
-
- /** Detect free variable `window`. */
- var freeWindow = checkGlobal(objectTypes[typeof window] && window);
-
- /** Detect `this` as the global object. */
- var thisGlobal = checkGlobal(objectTypes[typeof this] && this);
-
- /**
- * Used as a reference to the global object.
- *
- * The `this` value is used if it's the global object to avoid Greasemonkey's
- * restricted `window` object, otherwise the `window` object is used.
- */
- var root = freeGlobal ||
- ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) ||
- freeSelf || thisGlobal || Function('return this')();
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Adds the key-value `pair` to `map`.
- *
- * @private
- * @param {Object} map The map to modify.
- * @param {Array} pair The key-value pair to add.
- * @returns {Object} Returns `map`.
- */
- function addMapEntry(map, pair) {
- map.set(pair[0], pair[1]);
- return map;
- }
-
- /**
- * Adds `value` to `set`.
- *
- * @private
- * @param {Object} set The set to modify.
- * @param {*} value The value to add.
- * @returns {Object} Returns `set`.
- */
- function addSetEntry(set, value) {
- set.add(value);
- return set;
- }
-
- /**
- * A faster alternative to `Function#apply`, this function invokes `func`
- * with the `this` binding of `thisArg` and the arguments of `args`.
- *
- * @private
- * @param {Function} func The function to invoke.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} args The arguments to invoke `func` with.
- * @returns {*} Returns the result of `func`.
- */
- function apply(func, thisArg, args) {
- var length = args.length;
- switch (length) {
- case 0: return func.call(thisArg);
- case 1: return func.call(thisArg, args[0]);
- case 2: return func.call(thisArg, args[0], args[1]);
- case 3: return func.call(thisArg, args[0], args[1], args[2]);
- }
- return func.apply(thisArg, args);
- }
-
- /**
- * A specialized version of `baseAggregator` for arrays.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function arrayAggregator(array, setter, iteratee, accumulator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index];
- setter(accumulator, value, iteratee(value), array);
- }
- return accumulator;
- }
-
- /**
- * Creates a new array concatenating `array` with `other`.
- *
- * @private
- * @param {Array} array The first array to concatenate.
- * @param {Array} other The second array to concatenate.
- * @returns {Array} Returns the new concatenated array.
- */
- function arrayConcat(array, other) {
- var index = -1,
- length = array.length,
- othIndex = -1,
- othLength = other.length,
- result = Array(length + othLength);
-
- while (++index < length) {
- result[index] = array[index];
- }
- while (++othIndex < othLength) {
- result[index++] = other[othIndex];
- }
- return result;
- }
-
- /**
- * A specialized version of `_.forEach` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEach(array, iteratee) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (iteratee(array[index], index, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.forEachRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns `array`.
- */
- function arrayEachRight(array, iteratee) {
- var length = array.length;
-
- while (length--) {
- if (iteratee(array[length], length, array) === false) {
- break;
- }
- }
- return array;
- }
-
- /**
- * A specialized version of `_.every` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`.
- */
- function arrayEvery(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (!predicate(array[index], index, array)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * A specialized version of `_.filter` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function arrayFilter(array, predicate) {
- var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result[++resIndex] = value;
- }
- }
- return result;
- }
-
- /**
- * A specialized version of `_.includes` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} target The value to search for.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludes(array, value) {
- return !!array.length && baseIndexOf(array, value, 0) > -1;
- }
-
- /**
- * A specialized version of `_.includesWith` for arrays without support for
- * specifying an index to search from.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} target The value to search for.
- * @param {Function} comparator The comparator invoked per element.
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
- */
- function arrayIncludesWith(array, value, comparator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (comparator(value, array[index])) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * A specialized version of `_.map` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function arrayMap(array, iteratee) {
- var index = -1,
- length = array.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = iteratee(array[index], index, array);
- }
- return result;
- }
-
- /**
- * Appends the elements of `values` to `array`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to append.
- * @returns {Array} Returns `array`.
- */
- function arrayPush(array, values) {
- var index = -1,
- length = values.length,
- offset = array.length;
-
- while (++index < length) {
- array[offset + index] = values[index];
- }
- return array;
- }
-
- /**
- * A specialized version of `_.reduce` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the first element of `array` as the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduce(array, iteratee, accumulator, initAccum) {
- var index = -1,
- length = array.length;
-
- if (initAccum && length) {
- accumulator = array[++index];
- }
- while (++index < length) {
- accumulator = iteratee(accumulator, array[index], index, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.reduceRight` for arrays without support for
- * iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @param {boolean} [initAccum] Specify using the last element of `array` as the initial value.
- * @returns {*} Returns the accumulated value.
- */
- function arrayReduceRight(array, iteratee, accumulator, initAccum) {
- var length = array.length;
- if (initAccum && length) {
- accumulator = array[--length];
- }
- while (length--) {
- accumulator = iteratee(accumulator, array[length], length, array);
- }
- return accumulator;
- }
-
- /**
- * A specialized version of `_.some` for arrays without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.
- */
- function arraySome(array, predicate) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- if (predicate(array[index], index, array)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * The base implementation of methods like `_.max` and `_.min` which accepts a
- * `comparator` to determine the extremum value.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The iteratee invoked per iteration.
- * @param {Function} comparator The comparator used to compare values.
- * @returns {*} Returns the extremum value.
- */
- function baseExtremum(array, iteratee, comparator) {
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index],
- current = iteratee(value);
-
- if (current != null && (computed === undefined
- ? current === current
- : comparator(current, computed)
- )) {
- var computed = current,
- result = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of methods like `_.find` and `_.findKey`, without
- * support for iteratee shorthands, which iterates over `collection` using
- * `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @param {boolean} [retKey] Specify returning the key of the found element instead of the element itself.
- * @returns {*} Returns the found element or its key, else `undefined`.
- */
- function baseFind(collection, predicate, eachFunc, retKey) {
- var result;
- eachFunc(collection, function(value, key, collection) {
- if (predicate(value, key, collection)) {
- result = retKey ? key : value;
- return false;
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
- * support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseFindIndex(array, predicate, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length)) {
- if (predicate(array[index], index, array)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} fromIndex The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function baseIndexOf(array, value, fromIndex) {
- if (value !== value) {
- return indexOfNaN(array, fromIndex);
- }
- var index = fromIndex - 1,
- length = array.length;
-
- while (++index < length) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * The base implementation of `_.reduce` and `_.reduceRight`, without support
- * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {*} accumulator The initial value.
- * @param {boolean} initAccum Specify using the first or last element of `collection` as the initial value.
- * @param {Function} eachFunc The function to iterate over `collection`.
- * @returns {*} Returns the accumulated value.
- */
- function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
- eachFunc(collection, function(value, index, collection) {
- accumulator = initAccum
- ? (initAccum = false, value)
- : iteratee(accumulator, value, index, collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.sortBy` which uses `comparer` to define
- * the sort order of `array` and replaces criteria objects with their
- * corresponding values.
- *
- * @private
- * @param {Array} array The array to sort.
- * @param {Function} comparer The function to define sort order.
- * @returns {Array} Returns `array`.
- */
- function baseSortBy(array, comparer) {
- var length = array.length;
-
- array.sort(comparer);
- while (length--) {
- array[length] = array[length].value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.sum` without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {number} Returns the sum.
- */
- function baseSum(array, iteratee) {
- var result,
- index = -1,
- length = array.length;
-
- while (++index < length) {
- var current = iteratee(array[index]);
- if (current !== undefined) {
- result = result === undefined ? current : (result + current);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.times` without support for iteratee shorthands
- * or max array length checks.
- *
- * @private
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- */
- function baseTimes(n, iteratee) {
- var index = -1,
- result = Array(n);
-
- while (++index < n) {
- result[index] = iteratee(index);
- }
- return result;
- }
-
- /**
- * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
- * of key-value pairs for `object` corresponding to the property names of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the new array of key-value pairs.
- */
- function baseToPairs(object, props) {
- return arrayMap(props, function(key) {
- return [key, object[key]];
- });
- }
-
- /**
- * The base implementation of `_.unary` without support for storing wrapper metadata.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new function.
- */
- function baseUnary(func) {
- return function(value) {
- return func(value);
- };
- }
-
- /**
- * The base implementation of `_.values` and `_.valuesIn` which creates an
- * array of `object` property values corresponding to the property names
- * of `props`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} props The property names to get values for.
- * @returns {Object} Returns the array of property values.
- */
- function baseValues(object, props) {
- return arrayMap(props, function(key) {
- return object[key];
- });
- }
-
- /**
- * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the first unmatched string symbol.
- */
- function charsStartIndex(strSymbols, chrSymbols) {
- var index = -1,
- length = strSymbols.length;
-
- while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
-
- /**
- * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
- * that is not found in the character symbols.
- *
- * @private
- * @param {Array} strSymbols The string symbols to inspect.
- * @param {Array} chrSymbols The character symbols to find.
- * @returns {number} Returns the index of the last unmatched string symbol.
- */
- function charsEndIndex(strSymbols, chrSymbols) {
- var index = strSymbols.length;
-
- while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
- return index;
- }
-
- /**
- * Checks if `value` is a global object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {null|Object} Returns `value` if it's a global object, else `null`.
- */
- function checkGlobal(value) {
- return (value && value.Object === Object) ? value : null;
- }
-
- /**
- * Compares values to sort them in ascending order.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {number} Returns the sort order indicator for `value`.
- */
- function compareAscending(value, other) {
- if (value !== other) {
- var valIsNull = value === null,
- valIsUndef = value === undefined,
- valIsReflexive = value === value;
-
- var othIsNull = other === null,
- othIsUndef = other === undefined,
- othIsReflexive = other === other;
-
- if ((value > other && !othIsNull) || !valIsReflexive ||
- (valIsNull && !othIsUndef && othIsReflexive) ||
- (valIsUndef && othIsReflexive)) {
- return 1;
- }
- if ((value < other && !valIsNull) || !othIsReflexive ||
- (othIsNull && !valIsUndef && valIsReflexive) ||
- (othIsUndef && valIsReflexive)) {
- return -1;
- }
- }
- return 0;
- }
-
- /**
- * Used by `_.orderBy` to compare multiple properties of a value to another
- * and stable sort them.
- *
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
- * specify an order of "desc" for descending or "asc" for ascending sort order
- * of corresponding values.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {boolean[]|string[]} orders The order to sort by for each property.
- * @returns {number} Returns the sort order indicator for `object`.
- */
- function compareMultiple(object, other, orders) {
- var index = -1,
- objCriteria = object.criteria,
- othCriteria = other.criteria,
- length = objCriteria.length,
- ordersLength = orders.length;
-
- while (++index < length) {
- var result = compareAscending(objCriteria[index], othCriteria[index]);
- if (result) {
- if (index >= ordersLength) {
- return result;
- }
- var order = orders[index];
- return result * (order == 'desc' ? -1 : 1);
- }
- }
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
- // that causes it, under certain circumstances, to provide the same value for
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
- // for more details.
- //
- // This also ensures a stable sort in V8 and other engines.
- // See https://code.google.com/p/v8/issues/detail?id=90 for more details.
- return object.index - other.index;
- }
-
- /**
- * Gets the number of `placeholder` occurrences in `array`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {*} placeholder The placeholder to search for.
- * @returns {number} Returns the placeholder count.
- */
- function countHolders(array, placeholder) {
- var length = array.length,
- result = 0;
-
- while (length--) {
- if (array[length] === placeholder) {
- result++;
- }
- }
- return result;
- }
-
- /**
- * Used by `_.deburr` to convert latin-1 supplementary letters to basic latin letters.
- *
- * @private
- * @param {string} letter The matched letter to deburr.
- * @returns {string} Returns the deburred letter.
- */
- function deburrLetter(letter) {
- return deburredLetters[letter];
- }
-
- /**
- * Used by `_.escape` to convert characters to HTML entities.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeHtmlChar(chr) {
- return htmlEscapes[chr];
- }
-
- /**
- * Used by `_.template` to escape characters for inclusion in compiled string literals.
- *
- * @private
- * @param {string} chr The matched character to escape.
- * @returns {string} Returns the escaped character.
- */
- function escapeStringChar(chr) {
- return '\\' + stringEscapes[chr];
- }
-
- /**
- * Gets the index at which the first occurrence of `NaN` is found in `array`.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {number} fromIndex The index to search from.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {number} Returns the index of the matched `NaN`, else `-1`.
- */
- function indexOfNaN(array, fromIndex, fromRight) {
- var length = array.length,
- index = fromIndex + (fromRight ? 0 : -1);
-
- while ((fromRight ? index-- : ++index < length)) {
- var other = array[index];
- if (other !== other) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Checks if `value` is a host object in IE < 9.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
- */
- function isHostObject(value) {
- // Many host objects are `Object` objects that can coerce to strings
- // despite having improperly defined `toString` methods.
- var result = false;
- if (value != null && typeof value.toString != 'function') {
- try {
- result = !!(value + '');
- } catch (e) {}
- }
- return result;
- }
-
- /**
- * Checks if `value` is a valid array-like index.
- *
- * @private
- * @param {*} value The value to check.
- * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
- * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
- */
- function isIndex(value, length) {
- value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
- length = length == null ? MAX_SAFE_INTEGER : length;
- return value > -1 && value % 1 == 0 && value < length;
- }
-
- /**
- * Converts `iterator` to an array.
- *
- * @private
- * @param {Object} iterator The iterator to convert.
- * @returns {Array} Returns the converted array.
- */
- function iteratorToArray(iterator) {
- var data,
- result = [];
-
- while (!(data = iterator.next()).done) {
- result.push(data.value);
- }
- return result;
- }
-
- /**
- * Converts `map` to an array.
- *
- * @private
- * @param {Object} map The map to convert.
- * @returns {Array} Returns the converted array.
- */
- function mapToArray(map) {
- var index = -1,
- result = Array(map.size);
-
- map.forEach(function(value, key) {
- result[++index] = [key, value];
- });
- return result;
- }
-
- /**
- * Replaces all `placeholder` elements in `array` with an internal placeholder
- * and returns an array of their indexes.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {*} placeholder The placeholder to replace.
- * @returns {Array} Returns the new array of placeholder indexes.
- */
- function replaceHolders(array, placeholder) {
- var index = -1,
- length = array.length,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value === placeholder || value === PLACEHOLDER) {
- array[index] = PLACEHOLDER;
- result[++resIndex] = index;
- }
- }
- return result;
- }
-
- /**
- * Converts `set` to an array.
- *
- * @private
- * @param {Object} set The set to convert.
- * @returns {Array} Returns the converted array.
- */
- function setToArray(set) {
- var index = -1,
- result = Array(set.size);
-
- set.forEach(function(value) {
- result[++index] = value;
- });
- return result;
- }
-
- /**
- * Gets the number of symbols in `string`.
- *
- * @private
- * @param {string} string The string to inspect.
- * @returns {number} Returns the string size.
- */
- function stringSize(string) {
- if (!(string && reHasComplexSymbol.test(string))) {
- return string.length;
- }
- var result = reComplexSymbol.lastIndex = 0;
- while (reComplexSymbol.test(string)) {
- result++;
- }
- return result;
- }
-
- /**
- * Converts `string` to an array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the converted array.
- */
- function stringToArray(string) {
- return string.match(reComplexSymbol);
- }
-
- /**
- * Used by `_.unescape` to convert HTML entities to characters.
- *
- * @private
- * @param {string} chr The matched character to unescape.
- * @returns {string} Returns the unescaped character.
- */
- function unescapeHtmlChar(chr) {
- return htmlUnescapes[chr];
- }
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Create a new pristine `lodash` function using the `context` object.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} [context=root] The context object.
- * @returns {Function} Returns a new `lodash` function.
- * @example
- *
- * _.mixin({ 'foo': _.constant('foo') });
- *
- * var lodash = _.runInContext();
- * lodash.mixin({ 'bar': lodash.constant('bar') });
- *
- * _.isFunction(_.foo);
- * // => true
- * _.isFunction(_.bar);
- * // => false
- *
- * lodash.isFunction(lodash.foo);
- * // => false
- * lodash.isFunction(lodash.bar);
- * // => true
- *
- * // Use `context` to mock `Date#getTime` use in `_.now`.
- * var mock = _.runInContext({
- * 'Date': function() {
- * return { 'getTime': getTimeMock };
- * }
- * });
- *
- * // Create a suped-up `defer` in Node.js.
- * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
- */
- function runInContext(context) {
- context = context ? _.defaults({}, context, _.pick(root, contextProps)) : root;
-
- /** Built-in constructor references. */
- var Date = context.Date,
- Error = context.Error,
- Math = context.Math,
- RegExp = context.RegExp,
- TypeError = context.TypeError;
-
- /** Used for built-in method references. */
- var arrayProto = context.Array.prototype,
- objectProto = context.Object.prototype;
-
- /** Used to resolve the decompiled source of functions. */
- var funcToString = context.Function.prototype.toString;
-
- /** Used to check objects for own properties. */
- var hasOwnProperty = objectProto.hasOwnProperty;
-
- /** Used to generate unique IDs. */
- var idCounter = 0;
-
- /** Used to infer the `Object` constructor. */
- var objectCtorString = funcToString.call(Object);
-
- /**
- * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
- * of values.
- */
- var objectToString = objectProto.toString;
-
- /** Used to restore the original `_` reference in `_.noConflict`. */
- var oldDash = root._;
-
- /** Used to detect if a method is native. */
- var reIsNative = RegExp('^' +
- funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
- );
-
- /** Built-in value references. */
- var Buffer = moduleExports ? context.Buffer : undefined,
- Reflect = context.Reflect,
- Symbol = context.Symbol,
- Uint8Array = context.Uint8Array,
- clearTimeout = context.clearTimeout,
- enumerate = Reflect ? Reflect.enumerate : undefined,
- getPrototypeOf = Object.getPrototypeOf,
- getOwnPropertySymbols = Object.getOwnPropertySymbols,
- iteratorSymbol = typeof (iteratorSymbol = Symbol && Symbol.iterator) == 'symbol' ? iteratorSymbol : undefined,
- objectCreate = Object.create,
- propertyIsEnumerable = objectProto.propertyIsEnumerable,
- setTimeout = context.setTimeout,
- splice = arrayProto.splice;
-
- /* Built-in method references for those with the same name as other `lodash` methods. */
- var nativeCeil = Math.ceil,
- nativeFloor = Math.floor,
- nativeIsFinite = context.isFinite,
- nativeJoin = arrayProto.join,
- nativeKeys = Object.keys,
- nativeMax = Math.max,
- nativeMin = Math.min,
- nativeParseInt = context.parseInt,
- nativeRandom = Math.random,
- nativeReverse = arrayProto.reverse;
-
- /* Built-in method references that are verified to be native. */
- var Map = getNative(context, 'Map'),
- Set = getNative(context, 'Set'),
- WeakMap = getNative(context, 'WeakMap'),
- nativeCreate = getNative(Object, 'create');
-
- /** Used to store function metadata. */
- var metaMap = WeakMap && new WeakMap;
-
- /** Used to detect maps, sets, and weakmaps. */
- var mapCtorString = Map ? funcToString.call(Map) : '',
- setCtorString = Set ? funcToString.call(Set) : '',
- weakMapCtorString = WeakMap ? funcToString.call(WeakMap) : '';
-
- /** Used to convert symbols to primitives and strings. */
- var symbolProto = Symbol ? Symbol.prototype : undefined,
- symbolValueOf = Symbol ? symbolProto.valueOf : undefined,
- symbolToString = Symbol ? symbolProto.toString : undefined;
-
- /** Used to lookup unminified function names. */
- var realNames = {};
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object which wraps `value` to enable implicit method
- * chaining. Methods that operate on and return arrays, collections, and
- * functions can be chained together. Methods that retrieve a single value or
- * may return a primitive value will automatically end the chain sequence and
- * return the unwrapped value. Otherwise, the value must be unwrapped with
- * `_#value`.
- *
- * Explicit chaining, which must be unwrapped with `_#value` in all cases,
- * may be enabled using `_.chain`.
- *
- * The execution of chained methods is lazy, that is, it's deferred until
- * `_#value` is implicitly or explicitly called.
- *
- * Lazy evaluation allows several methods to support shortcut fusion. Shortcut
- * fusion is an optimization to merge iteratee calls; this avoids the creation
- * of intermediate arrays and can greatly reduce the number of iteratee executions.
- * Sections of a chain sequence qualify for shortcut fusion if the section is
- * applied to an array of at least two hundred elements and any iteratees
- * accept only one argument. The heuristic for whether a section qualifies
- * for shortcut fusion is subject to change.
- *
- * Chaining is supported in custom builds as long as the `_#value` method is
- * directly or indirectly included in the build.
- *
- * In addition to lodash methods, wrappers have `Array` and `String` methods.
- *
- * The wrapper `Array` methods are:
- * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
- *
- * The wrapper `String` methods are:
- * `replace` and `split`
- *
- * The wrapper methods that support shortcut fusion are:
- * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
- * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
- * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
- *
- * The chainable wrapper methods are:
- * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
- * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
- * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
- * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, `difference`,
- * `differenceBy`, `differenceWith`, `drop`, `dropRight`, `dropRightWhile`,
- * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flattenDepth`,
- * `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, `functionsIn`,
- * `groupBy`, `initial`, `intersection`, `intersectionBy`, `intersectionWith`,
- * `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, `keys`, `keysIn`,
- * `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, `memoize`,
- * `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, `nthArg`,
- * `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, `overEvery`,
- * `overSome`, `partial`, `partialRight`, `partition`, `pick`, `pickBy`, `plant`,
- * `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, `pullAt`, `push`,
- * `range`, `rangeRight`, `rearg`, `reject`, `remove`, `rest`, `reverse`,
- * `sampleSize`, `set`, `setWith`, `shuffle`, `slice`, `sort`, `sortBy`,
- * `splice`, `spread`, `tail`, `take`, `takeRight`, `takeRightWhile`,
- * `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, `toPairs`, `toPairsIn`,
- * `toPath`, `toPlainObject`, `transform`, `unary`, `union`, `unionBy`,
- * `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, `unshift`, `unzip`,
- * `unzipWith`, `values`, `valuesIn`, `without`, `wrap`, `xor`, `xorBy`,
- * `xorWith`, `zip`, `zipObject`, `zipObjectDeep`, and `zipWith`
- *
- * The wrapper methods that are **not** chainable by default are:
- * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
- * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `deburr`, `endsWith`, `eq`,
- * `escape`, `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
- * `findLastIndex`, `findLastKey`, `floor`, `forEach`, `forEachRight`, `forIn`,
- * `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, `hasIn`,
- * `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, `isArguments`,
- * `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, `isBoolean`,
- * `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, `isEqualWith`,
- * `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, `isMap`,
- * `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, `isNumber`,
- * `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, `isSafeInteger`,
- * `isSet`, `isString`, `isUndefined`, `isTypedArray`, `isWeakMap`, `isWeakSet`,
- * `join`, `kebabCase`, `last`, `lastIndexOf`, `lowerCase`, `lowerFirst`,
- * `lt`, `lte`, `max`, `maxBy`, `mean`, `min`, `minBy`, `noConflict`, `noop`,
- * `now`, `pad`, `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`,
- * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `sample`,
- * `shift`, `size`, `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`,
- * `sortedLastIndex`, `sortedLastIndexBy`, `startCase`, `startsWith`, `subtract`,
- * `sum`, `sumBy`, `template`, `times`, `toLower`, `toInteger`, `toLength`,
- * `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, `trimEnd`,
- * `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, `upperFirst`,
- * `value`, and `words`
- *
- * @name _
- * @constructor
- * @category Seq
- * @param {*} value The value to wrap in a `lodash` instance.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2, 3]);
- *
- * // Returns an unwrapped value.
- * wrapped.reduce(_.add);
- * // => 6
- *
- * // Returns a wrapped value.
- * var squares = wrapped.map(square);
- *
- * _.isArray(squares);
- * // => false
- *
- * _.isArray(squares.value());
- * // => true
- */
- function lodash(value) {
- if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
- if (value instanceof LodashWrapper) {
- return value;
- }
- if (hasOwnProperty.call(value, '__wrapped__')) {
- return wrapperClone(value);
- }
- }
- return new LodashWrapper(value);
- }
-
- /**
- * The function whose prototype all chaining wrappers inherit from.
- *
- * @private
- */
- function baseLodash() {
- // No operation performed.
- }
-
- /**
- * The base constructor for creating `lodash` wrapper objects.
- *
- * @private
- * @param {*} value The value to wrap.
- * @param {boolean} [chainAll] Enable chaining for all wrapper methods.
- */
- function LodashWrapper(value, chainAll) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__chain__ = !!chainAll;
- this.__index__ = 0;
- this.__values__ = undefined;
- }
-
- /**
- * By default, the template delimiters used by lodash are like those in
- * embedded Ruby (ERB). Change the following template settings to use
- * alternative delimiters.
- *
- * @static
- * @memberOf _
- * @type {Object}
- */
- lodash.templateSettings = {
-
- /**
- * Used to detect `data` property values to be HTML-escaped.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'escape': reEscape,
-
- /**
- * Used to detect code to be evaluated.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'evaluate': reEvaluate,
-
- /**
- * Used to detect `data` property values to inject.
- *
- * @memberOf _.templateSettings
- * @type {RegExp}
- */
- 'interpolate': reInterpolate,
-
- /**
- * Used to reference the data object in the template text.
- *
- * @memberOf _.templateSettings
- * @type {string}
- */
- 'variable': '',
-
- /**
- * Used to import variables into the compiled template.
- *
- * @memberOf _.templateSettings
- * @type {Object}
- */
- 'imports': {
-
- /**
- * A reference to the `lodash` function.
- *
- * @memberOf _.templateSettings.imports
- * @type {Function}
- */
- '_': lodash
- }
- };
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
- *
- * @private
- * @constructor
- * @param {*} value The value to wrap.
- */
- function LazyWrapper(value) {
- this.__wrapped__ = value;
- this.__actions__ = [];
- this.__dir__ = 1;
- this.__filtered__ = false;
- this.__iteratees__ = [];
- this.__takeCount__ = MAX_ARRAY_LENGTH;
- this.__views__ = [];
- }
-
- /**
- * Creates a clone of the lazy wrapper object.
- *
- * @private
- * @name clone
- * @memberOf LazyWrapper
- * @returns {Object} Returns the cloned `LazyWrapper` object.
- */
- function lazyClone() {
- var result = new LazyWrapper(this.__wrapped__);
- result.__actions__ = copyArray(this.__actions__);
- result.__dir__ = this.__dir__;
- result.__filtered__ = this.__filtered__;
- result.__iteratees__ = copyArray(this.__iteratees__);
- result.__takeCount__ = this.__takeCount__;
- result.__views__ = copyArray(this.__views__);
- return result;
- }
-
- /**
- * Reverses the direction of lazy iteration.
- *
- * @private
- * @name reverse
- * @memberOf LazyWrapper
- * @returns {Object} Returns the new reversed `LazyWrapper` object.
- */
- function lazyReverse() {
- if (this.__filtered__) {
- var result = new LazyWrapper(this);
- result.__dir__ = -1;
- result.__filtered__ = true;
- } else {
- result = this.clone();
- result.__dir__ *= -1;
- }
- return result;
- }
-
- /**
- * Extracts the unwrapped value from its lazy wrapper.
- *
- * @private
- * @name value
- * @memberOf LazyWrapper
- * @returns {*} Returns the unwrapped value.
- */
- function lazyValue() {
- var array = this.__wrapped__.value(),
- dir = this.__dir__,
- isArr = isArray(array),
- isRight = dir < 0,
- arrLength = isArr ? array.length : 0,
- view = getView(0, arrLength, this.__views__),
- start = view.start,
- end = view.end,
- length = end - start,
- index = isRight ? end : (start - 1),
- iteratees = this.__iteratees__,
- iterLength = iteratees.length,
- resIndex = 0,
- takeCount = nativeMin(length, this.__takeCount__);
-
- if (!isArr || arrLength < LARGE_ARRAY_SIZE ||
- (arrLength == length && takeCount == length)) {
- return baseWrapperValue(array, this.__actions__);
- }
- var result = [];
-
- outer:
- while (length-- && resIndex < takeCount) {
- index += dir;
-
- var iterIndex = -1,
- value = array[index];
-
- while (++iterIndex < iterLength) {
- var data = iteratees[iterIndex],
- iteratee = data.iteratee,
- type = data.type,
- computed = iteratee(value);
-
- if (type == LAZY_MAP_FLAG) {
- value = computed;
- } else if (!computed) {
- if (type == LAZY_FILTER_FLAG) {
- continue outer;
- } else {
- break outer;
- }
- }
- }
- result[resIndex++] = value;
- }
- return result;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an hash object.
- *
- * @private
- * @constructor
- * @returns {Object} Returns the new hash object.
- */
- function Hash() {}
-
- /**
- * Removes `key` and its value from the hash.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function hashDelete(hash, key) {
- return hashHas(hash, key) && delete hash[key];
- }
-
- /**
- * Gets the hash value for `key`.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function hashGet(hash, key) {
- if (nativeCreate) {
- var result = hash[key];
- return result === HASH_UNDEFINED ? undefined : result;
- }
- return hasOwnProperty.call(hash, key) ? hash[key] : undefined;
- }
-
- /**
- * Checks if a hash value for `key` exists.
- *
- * @private
- * @param {Object} hash The hash to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function hashHas(hash, key) {
- return nativeCreate ? hash[key] !== undefined : hasOwnProperty.call(hash, key);
- }
-
- /**
- * Sets the hash `key` to `value`.
- *
- * @private
- * @param {Object} hash The hash to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
- function hashSet(hash, key, value) {
- hash[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a map cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function MapCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.clear();
- while (++index < length) {
- var entry = values[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the map.
- *
- * @private
- * @name clear
- * @memberOf MapCache
- */
- function mapClear() {
- this.__data__ = {
- 'hash': new Hash,
- 'map': Map ? new Map : [],
- 'string': new Hash
- };
- }
-
- /**
- * Removes `key` and its value from the map.
- *
- * @private
- * @name delete
- * @memberOf MapCache
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function mapDelete(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashDelete(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map['delete'](key) : assocDelete(data.map, key);
- }
-
- /**
- * Gets the map value for `key`.
- *
- * @private
- * @name get
- * @memberOf MapCache
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function mapGet(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashGet(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.get(key) : assocGet(data.map, key);
- }
-
- /**
- * Checks if a map value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf MapCache
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function mapHas(key) {
- var data = this.__data__;
- if (isKeyable(key)) {
- return hashHas(typeof key == 'string' ? data.string : data.hash, key);
- }
- return Map ? data.map.has(key) : assocHas(data.map, key);
- }
-
- /**
- * Sets the map `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf MapCache
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the map cache object.
- */
- function mapSet(key, value) {
- var data = this.__data__;
- if (isKeyable(key)) {
- hashSet(typeof key == 'string' ? data.string : data.hash, key, value);
- } else if (Map) {
- data.map.set(key, value);
- } else {
- assocSet(data.map, key, value);
- }
- return this;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- *
- * Creates a set cache object to store unique values.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function SetCache(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.__data__ = new MapCache;
- while (++index < length) {
- this.push(values[index]);
- }
- }
-
- /**
- * Checks if `value` is in `cache`.
- *
- * @private
- * @param {Object} cache The set cache to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns `true` if `value` is found, else `false`.
- */
- function cacheHas(cache, value) {
- var map = cache.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
-
- return hash[value] === HASH_UNDEFINED;
- }
- return map.has(value);
- }
-
- /**
- * Adds `value` to the set cache.
- *
- * @private
- * @name push
- * @memberOf SetCache
- * @param {*} value The value to cache.
- */
- function cachePush(value) {
- var map = this.__data__;
- if (isKeyable(value)) {
- var data = map.__data__,
- hash = typeof value == 'string' ? data.string : data.hash;
-
- hash[value] = HASH_UNDEFINED;
- }
- else {
- map.set(value, HASH_UNDEFINED);
- }
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a stack cache object to store key-value pairs.
- *
- * @private
- * @constructor
- * @param {Array} [values] The values to cache.
- */
- function Stack(values) {
- var index = -1,
- length = values ? values.length : 0;
-
- this.clear();
- while (++index < length) {
- var entry = values[index];
- this.set(entry[0], entry[1]);
- }
- }
-
- /**
- * Removes all key-value entries from the stack.
- *
- * @private
- * @name clear
- * @memberOf Stack
- */
- function stackClear() {
- this.__data__ = { 'array': [], 'map': null };
- }
-
- /**
- * Removes `key` and its value from the stack.
- *
- * @private
- * @name delete
- * @memberOf Stack
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function stackDelete(key) {
- var data = this.__data__,
- array = data.array;
-
- return array ? assocDelete(array, key) : data.map['delete'](key);
- }
-
- /**
- * Gets the stack value for `key`.
- *
- * @private
- * @name get
- * @memberOf Stack
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function stackGet(key) {
- var data = this.__data__,
- array = data.array;
-
- return array ? assocGet(array, key) : data.map.get(key);
- }
-
- /**
- * Checks if a stack value for `key` exists.
- *
- * @private
- * @name has
- * @memberOf Stack
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function stackHas(key) {
- var data = this.__data__,
- array = data.array;
-
- return array ? assocHas(array, key) : data.map.has(key);
- }
-
- /**
- * Sets the stack `key` to `value`.
- *
- * @private
- * @name set
- * @memberOf Stack
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns the stack cache object.
- */
- function stackSet(key, value) {
- var data = this.__data__,
- array = data.array;
-
- if (array) {
- if (array.length < (LARGE_ARRAY_SIZE - 1)) {
- assocSet(array, key, value);
- } else {
- data.array = null;
- data.map = new MapCache(array);
- }
- }
- var map = data.map;
- if (map) {
- map.set(key, value);
- }
- return this;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Removes `key` and its value from the associative array.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to remove.
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
- */
- function assocDelete(array, key) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- return false;
- }
- var lastIndex = array.length - 1;
- if (index == lastIndex) {
- array.pop();
- } else {
- splice.call(array, index, 1);
- }
- return true;
- }
-
- /**
- * Gets the associative array value for `key`.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the value to get.
- * @returns {*} Returns the entry value.
- */
- function assocGet(array, key) {
- var index = assocIndexOf(array, key);
- return index < 0 ? undefined : array[index][1];
- }
-
- /**
- * Checks if an associative array value for `key` exists.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {string} key The key of the entry to check.
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
- */
- function assocHas(array, key) {
- return assocIndexOf(array, key) > -1;
- }
-
- /**
- * Gets the index at which the first occurrence of `key` is found in `array`
- * of key-value pairs.
- *
- * @private
- * @param {Array} array The array to search.
- * @param {*} key The key to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- */
- function assocIndexOf(array, key) {
- var length = array.length;
- while (length--) {
- if (eq(array[length][0], key)) {
- return length;
- }
- }
- return -1;
- }
-
- /**
- * Sets the associative array `key` to `value`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {string} key The key of the value to set.
- * @param {*} value The value to set.
- */
- function assocSet(array, key, value) {
- var index = assocIndexOf(array, key);
- if (index < 0) {
- array.push([key, value]);
- } else {
- array[index][1] = value;
- }
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Used by `_.defaults` to customize its `_.assignIn` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to assign.
- * @param {Object} object The parent object of `objValue`.
- * @returns {*} Returns the value to assign.
- */
- function assignInDefaults(objValue, srcValue, key, object) {
- if (objValue === undefined ||
- (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
- return srcValue;
- }
- return objValue;
- }
-
- /**
- * This function is like `assignValue` except that it doesn't assign `undefined` values.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignMergeValue(object, key, value) {
- if ((value !== undefined && !eq(object[key], value)) ||
- (typeof key == 'number' && value === undefined && !(key in object))) {
- object[key] = value;
- }
- }
-
- /**
- * Assigns `value` to `key` of `object` if the existing value is not equivalent
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {string} key The key of the property to assign.
- * @param {*} value The value to assign.
- */
- function assignValue(object, key, value) {
- var objValue = object[key];
- if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
- (value === undefined && !(key in object))) {
- object[key] = value;
- }
- }
-
- /**
- * Aggregates elements of `collection` on `accumulator` with keys transformed
- * by `iteratee` and values set by `setter`.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform keys.
- * @param {Object} accumulator The initial aggregated object.
- * @returns {Function} Returns `accumulator`.
- */
- function baseAggregator(collection, setter, iteratee, accumulator) {
- baseEach(collection, function(value, key, collection) {
- setter(accumulator, value, iteratee(value), collection);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.assign` without support for multiple sources
- * or `customizer` functions.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @returns {Object} Returns `object`.
- */
- function baseAssign(object, source) {
- return object && copyObject(source, keys(source), object);
- }
-
- /**
- * The base implementation of `_.at` without support for individual paths.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {string[]} paths The property paths of elements to pick.
- * @returns {Array} Returns the new array of picked elements.
- */
- function baseAt(object, paths) {
- var index = -1,
- isNil = object == null,
- length = paths.length,
- result = Array(length);
-
- while (++index < length) {
- result[index] = isNil ? undefined : get(object, paths[index]);
- }
- return result;
- }
-
- /**
- * Casts `value` to an empty array if it's not an array like object.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the array-like object.
- */
- function baseCastArrayLikeObject(value) {
- return isArrayLikeObject(value) ? value : [];
- }
-
- /**
- * Casts `value` to `identity` if it's not a function.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the array-like object.
- */
- function baseCastFunction(value) {
- return typeof value == 'function' ? value : identity;
- }
-
- /**
- * Casts `value` to a path array if it's not one.
- *
- * @private
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast property path array.
- */
- function baseCastPath(value) {
- return isArray(value) ? value : stringToPath(value);
- }
-
- /**
- * The base implementation of `_.clamp` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- */
- function baseClamp(number, lower, upper) {
- if (number === number) {
- if (upper !== undefined) {
- number = number <= upper ? number : upper;
- }
- if (lower !== undefined) {
- number = number >= lower ? number : lower;
- }
- }
- return number;
- }
-
- /**
- * The base implementation of `_.clone` and `_.cloneDeep` which tracks
- * traversed objects.
- *
- * @private
- * @param {*} value The value to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @param {string} [key] The key of `value`.
- * @param {Object} [object] The parent object of `value`.
- * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
- * @returns {*} Returns the cloned value.
- */
- function baseClone(value, isDeep, customizer, key, object, stack) {
- var result;
- if (customizer) {
- result = object ? customizer(value, key, object, stack) : customizer(value);
- }
- if (result !== undefined) {
- return result;
- }
- if (!isObject(value)) {
- return value;
- }
- var isArr = isArray(value);
- if (isArr) {
- result = initCloneArray(value);
- if (!isDeep) {
- return copyArray(value, result);
- }
- } else {
- var tag = getTag(value),
- isFunc = tag == funcTag || tag == genTag;
-
- if (isBuffer(value)) {
- return cloneBuffer(value, isDeep);
- }
- if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
- if (isHostObject(value)) {
- return object ? value : {};
- }
- result = initCloneObject(isFunc ? {} : value);
- if (!isDeep) {
- return copySymbols(value, baseAssign(result, value));
- }
- } else {
- if (!cloneableTags[tag]) {
- return object ? value : {};
- }
- result = initCloneByTag(value, tag, isDeep);
- }
- }
- // Check for circular references and return its corresponding clone.
- stack || (stack = new Stack);
- var stacked = stack.get(value);
- if (stacked) {
- return stacked;
- }
- stack.set(value, result);
-
- // Recursively populate clone (susceptible to call stack limits).
- (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
- assignValue(result, key, baseClone(subValue, isDeep, customizer, key, value, stack));
- });
- return isArr ? result : copySymbols(value, result);
- }
-
- /**
- * The base implementation of `_.conforms` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property predicates to conform to.
- * @returns {Function} Returns the new function.
- */
- function baseConforms(source) {
- var props = keys(source),
- length = props.length;
-
- return function(object) {
- if (object == null) {
- return !length;
- }
- var index = length;
- while (index--) {
- var key = props[index],
- predicate = source[key],
- value = object[key];
-
- if ((value === undefined && !(key in Object(object))) || !predicate(value)) {
- return false;
- }
- }
- return true;
- };
- }
-
- /**
- * The base implementation of `_.create` without support for assigning
- * properties to the created object.
- *
- * @private
- * @param {Object} prototype The object to inherit from.
- * @returns {Object} Returns the new object.
- */
- function baseCreate(proto) {
- return isObject(proto) ? objectCreate(proto) : {};
- }
-
- /**
- * The base implementation of `_.delay` and `_.defer` which accepts an array
- * of `func` arguments.
- *
- * @private
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {Object} args The arguments to provide to `func`.
- * @returns {number} Returns the timer id.
- */
- function baseDelay(func, wait, args) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return setTimeout(function() { func.apply(undefined, args); }, wait);
- }
-
- /**
- * The base implementation of methods like `_.difference` without support for
- * excluding multiple arrays or iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Array} values The values to exclude.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- */
- function baseDifference(array, values, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- isCommon = true,
- length = array.length,
- result = [],
- valuesLength = values.length;
-
- if (!length) {
- return result;
- }
- if (iteratee) {
- values = arrayMap(values, baseUnary(iteratee));
- }
- if (comparator) {
- includes = arrayIncludesWith;
- isCommon = false;
- }
- else if (values.length >= LARGE_ARRAY_SIZE) {
- includes = cacheHas;
- isCommon = false;
- values = new SetCache(values);
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- if (isCommon && computed === computed) {
- var valuesIndex = valuesLength;
- while (valuesIndex--) {
- if (values[valuesIndex] === computed) {
- continue outer;
- }
- }
- result.push(value);
- }
- else if (!includes(values, computed, comparator)) {
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.forEach` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEach = createBaseEach(baseForOwn);
-
- /**
- * The base implementation of `_.forEachRight` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- */
- var baseEachRight = createBaseEach(baseForOwnRight, true);
-
- /**
- * The base implementation of `_.every` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`
- */
- function baseEvery(collection, predicate) {
- var result = true;
- baseEach(collection, function(value, index, collection) {
- result = !!predicate(value, index, collection);
- return result;
- });
- return result;
- }
-
- /**
- * The base implementation of `_.fill` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- */
- function baseFill(array, value, start, end) {
- var length = array.length;
-
- start = toInteger(start);
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = (end === undefined || end > length) ? length : toInteger(end);
- if (end < 0) {
- end += length;
- }
- end = start > end ? 0 : toLength(end);
- while (start < end) {
- array[start++] = value;
- }
- return array;
- }
-
- /**
- * The base implementation of `_.filter` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- */
- function baseFilter(collection, predicate) {
- var result = [];
- baseEach(collection, function(value, index, collection) {
- if (predicate(value, index, collection)) {
- result.push(value);
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.flatten` with support for restricting flattening.
- *
- * @private
- * @param {Array} array The array to flatten.
- * @param {number} depth The maximum recursion depth.
- * @param {boolean} [isStrict] Restrict flattening to arrays-like objects.
- * @param {Array} [result=[]] The initial result value.
- * @returns {Array} Returns the new flattened array.
- */
- function baseFlatten(array, depth, isStrict, result) {
- result || (result = []);
-
- var index = -1,
- length = array.length;
-
- while (++index < length) {
- var value = array[index];
- if (depth > 0 && isArrayLikeObject(value) &&
- (isStrict || isArray(value) || isArguments(value))) {
- if (depth > 1) {
- // Recursively flatten arrays (susceptible to call stack limits).
- baseFlatten(value, depth - 1, isStrict, result);
- } else {
- arrayPush(result, value);
- }
- } else if (!isStrict) {
- result[result.length] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `baseForIn` and `baseForOwn` which iterates
- * over `object` properties returned by `keysFunc` invoking `iteratee` for
- * each property. Iteratee functions may exit iteration early by explicitly
- * returning `false`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseFor = createBaseFor();
-
- /**
- * This function is like `baseFor` except that it iterates over properties
- * in the opposite order.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @param {Function} keysFunc The function to get the keys of `object`.
- * @returns {Object} Returns `object`.
- */
- var baseForRight = createBaseFor(true);
-
- /**
- * The base implementation of `_.forIn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForIn(object, iteratee) {
- return object == null ? object : baseFor(object, iteratee, keysIn);
- }
-
- /**
- * The base implementation of `_.forOwn` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwn(object, iteratee) {
- return object && baseFor(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Object} Returns `object`.
- */
- function baseForOwnRight(object, iteratee) {
- return object && baseForRight(object, iteratee, keys);
- }
-
- /**
- * The base implementation of `_.functions` which creates an array of
- * `object` function property names filtered from `props`.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Array} props The property names to filter.
- * @returns {Array} Returns the new array of filtered property names.
- */
- function baseFunctions(object, props) {
- return arrayFilter(props, function(key) {
- return isFunction(object[key]);
- });
- }
-
- /**
- * The base implementation of `_.get` without support for default values.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @returns {*} Returns the resolved value.
- */
- function baseGet(object, path) {
- path = isKey(path, object) ? [path + ''] : baseCastPath(path);
-
- var index = 0,
- length = path.length;
-
- while (object != null && index < length) {
- object = object[path[index++]];
- }
- return (index && index == length) ? object : undefined;
- }
-
- /**
- * The base implementation of `_.has` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHas(object, key) {
- // Avoid a bug in IE 10-11 where objects with a [[Prototype]] of `null`,
- // that are composed entirely of index properties, return `false` for
- // `hasOwnProperty` checks of them.
- return hasOwnProperty.call(object, key) ||
- (typeof object == 'object' && key in object && getPrototypeOf(object) === null);
- }
-
- /**
- * The base implementation of `_.hasIn` without support for deep paths.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} key The key to check.
- * @returns {boolean} Returns `true` if `key` exists, else `false`.
- */
- function baseHasIn(object, key) {
- return key in Object(object);
- }
-
- /**
- * The base implementation of `_.inRange` which doesn't coerce arguments to numbers.
- *
- * @private
- * @param {number} number The number to check.
- * @param {number} start The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
- */
- function baseInRange(number, start, end) {
- return number >= nativeMin(start, end) && number < nativeMax(start, end);
- }
-
- /**
- * The base implementation of methods like `_.intersection`, without support
- * for iteratee shorthands, that accepts an array of arrays to inspect.
- *
- * @private
- * @param {Array} arrays The arrays to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of shared values.
- */
- function baseIntersection(arrays, iteratee, comparator) {
- var includes = comparator ? arrayIncludesWith : arrayIncludes,
- othLength = arrays.length,
- othIndex = othLength,
- caches = Array(othLength),
- result = [];
-
- while (othIndex--) {
- var array = arrays[othIndex];
- if (othIndex && iteratee) {
- array = arrayMap(array, baseUnary(iteratee));
- }
- caches[othIndex] = !comparator && (iteratee || array.length >= 120)
- ? new SetCache(othIndex && array)
- : undefined;
- }
- array = arrays[0];
-
- var index = -1,
- length = array.length,
- seen = caches[0];
-
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- if (!(seen
- ? cacheHas(seen, computed)
- : includes(result, computed, comparator)
- )) {
- var othIndex = othLength;
- while (--othIndex) {
- var cache = caches[othIndex];
- if (!(cache
- ? cacheHas(cache, computed)
- : includes(arrays[othIndex], computed, comparator))
- ) {
- continue outer;
- }
- }
- if (seen) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.invert` and `_.invertBy` which inverts
- * `object` with values transformed by `iteratee` and set by `setter`.
- *
- * @private
- * @param {Object} object The object to iterate over.
- * @param {Function} setter The function to set `accumulator` values.
- * @param {Function} iteratee The iteratee to transform values.
- * @param {Object} accumulator The initial inverted object.
- * @returns {Function} Returns `accumulator`.
- */
- function baseInverter(object, setter, iteratee, accumulator) {
- baseForOwn(object, function(value, key, object) {
- setter(accumulator, iteratee(value), key, object);
- });
- return accumulator;
- }
-
- /**
- * The base implementation of `_.invoke` without support for individual
- * method arguments.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {Array} args The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- */
- function baseInvoke(object, path, args) {
- if (!isKey(path, object)) {
- path = baseCastPath(path);
- object = parent(object, path);
- path = last(path);
- }
- var func = object == null ? object : object[path];
- return func == null ? undefined : apply(func, object, args);
- }
-
- /**
- * The base implementation of `_.isEqual` which supports partial comparisons
- * and tracks traversed objects.
- *
- * @private
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {boolean} [bitmask] The bitmask of comparison flags.
- * The bitmask may be composed of the following flags:
- * 1 - Unordered comparison
- * 2 - Partial comparison
- * @param {Object} [stack] Tracks traversed `value` and `other` objects.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- */
- function baseIsEqual(value, other, customizer, bitmask, stack) {
- if (value === other) {
- return true;
- }
- if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
- return value !== value && other !== other;
- }
- return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
- }
-
- /**
- * A specialized version of `baseIsEqual` for arrays and objects which performs
- * deep comparisons and tracks traversed objects enabling objects with circular
- * references to be compared.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
- var objIsArr = isArray(object),
- othIsArr = isArray(other),
- objTag = arrayTag,
- othTag = arrayTag;
-
- if (!objIsArr) {
- objTag = getTag(object);
- if (objTag == argsTag) {
- objTag = objectTag;
- } else if (objTag != objectTag) {
- objIsArr = isTypedArray(object);
- }
- }
- if (!othIsArr) {
- othTag = getTag(other);
- if (othTag == argsTag) {
- othTag = objectTag;
- } else if (othTag != objectTag) {
- othIsArr = isTypedArray(other);
- }
- }
- var objIsObj = objTag == objectTag && !isHostObject(object),
- othIsObj = othTag == objectTag && !isHostObject(other),
- isSameTag = objTag == othTag;
-
- if (isSameTag && !(objIsArr || objIsObj)) {
- return equalByTag(object, other, objTag, equalFunc, customizer, bitmask);
- }
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
- if (!isPartial) {
- var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
- othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
-
- if (objIsWrapped || othIsWrapped) {
- return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, bitmask, stack);
- }
- }
- if (!isSameTag) {
- return false;
- }
- stack || (stack = new Stack);
- return (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, bitmask, stack);
- }
-
- /**
- * The base implementation of `_.isMatch` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Array} matchData The property names, values, and compare flags to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- */
- function baseIsMatch(object, source, matchData, customizer) {
- var index = matchData.length,
- length = index,
- noCustomizer = !customizer;
-
- if (object == null) {
- return !length;
- }
- object = Object(object);
- while (index--) {
- var data = matchData[index];
- if ((noCustomizer && data[2])
- ? data[1] !== object[data[0]]
- : !(data[0] in object)
- ) {
- return false;
- }
- }
- while (++index < length) {
- data = matchData[index];
- var key = data[0],
- objValue = object[key],
- srcValue = data[1];
-
- if (noCustomizer && data[2]) {
- if (objValue === undefined && !(key in object)) {
- return false;
- }
- } else {
- var stack = new Stack,
- result = customizer ? customizer(objValue, srcValue, key, object, source, stack) : undefined;
-
- if (!(result === undefined
- ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
- : result
- )) {
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * The base implementation of `_.iteratee`.
- *
- * @private
- * @param {*} [value=_.identity] The value to convert to an iteratee.
- * @returns {Function} Returns the iteratee.
- */
- function baseIteratee(value) {
- var type = typeof value;
- if (type == 'function') {
- return value;
- }
- if (value == null) {
- return identity;
- }
- if (type == 'object') {
- return isArray(value)
- ? baseMatchesProperty(value[0], value[1])
- : baseMatches(value);
- }
- return property(value);
- }
-
- /**
- * The base implementation of `_.keys` which doesn't skip the constructor
- * property of prototypes or treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeys(object) {
- return nativeKeys(Object(object));
- }
-
- /**
- * The base implementation of `_.keysIn` which doesn't skip the constructor
- * property of prototypes or treat sparse arrays as dense.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- */
- function baseKeysIn(object) {
- object = object == null ? object : Object(object);
-
- var result = [];
- for (var key in object) {
- result.push(key);
- }
- return result;
- }
-
- // Fallback for IE < 9 with es6-shim.
- if (enumerate && !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf')) {
- baseKeysIn = function(object) {
- return iteratorToArray(enumerate(object));
- };
- }
-
- /**
- * The base implementation of `_.map` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} iteratee The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- */
- function baseMap(collection, iteratee) {
- var index = -1,
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value, key, collection) {
- result[++index] = iteratee(value, key, collection);
- });
- return result;
- }
-
- /**
- * The base implementation of `_.matches` which doesn't clone `source`.
- *
- * @private
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- */
- function baseMatches(source) {
- var matchData = getMatchData(source);
- if (matchData.length == 1 && matchData[0][2]) {
- var key = matchData[0][0],
- value = matchData[0][1];
-
- return function(object) {
- if (object == null) {
- return false;
- }
- return object[key] === value &&
- (value !== undefined || (key in Object(object)));
- };
- }
- return function(object) {
- return object === source || baseIsMatch(object, source, matchData);
- };
- }
-
- /**
- * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
- *
- * @private
- * @param {string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- */
- function baseMatchesProperty(path, srcValue) {
- return function(object) {
- var objValue = get(object, path);
- return (objValue === undefined && objValue === srcValue)
- ? hasIn(object, path)
- : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
- };
- }
-
- /**
- * The base implementation of `_.merge` without support for multiple sources.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} [customizer] The function to customize merged values.
- * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
- */
- function baseMerge(object, source, srcIndex, customizer, stack) {
- if (object === source) {
- return;
- }
- var props = (isArray(source) || isTypedArray(source))
- ? undefined
- : keysIn(source);
-
- arrayEach(props || source, function(srcValue, key) {
- if (props) {
- key = srcValue;
- srcValue = source[key];
- }
- if (isObject(srcValue)) {
- stack || (stack = new Stack);
- baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
- }
- else {
- var newValue = customizer
- ? customizer(object[key], srcValue, (key + ''), object, source, stack)
- : undefined;
-
- if (newValue === undefined) {
- newValue = srcValue;
- }
- assignMergeValue(object, key, newValue);
- }
- });
- }
-
- /**
- * A specialized version of `baseMerge` for arrays and objects which performs
- * deep merges and tracks traversed objects enabling objects with circular
- * references to be merged.
- *
- * @private
- * @param {Object} object The destination object.
- * @param {Object} source The source object.
- * @param {string} key The key of the value to merge.
- * @param {number} srcIndex The index of `source`.
- * @param {Function} mergeFunc The function to merge values.
- * @param {Function} [customizer] The function to customize assigned values.
- * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
- */
- function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
- var objValue = object[key],
- srcValue = source[key],
- stacked = stack.get(srcValue);
-
- if (stacked) {
- assignMergeValue(object, key, stacked);
- return;
- }
- var newValue = customizer
- ? customizer(objValue, srcValue, (key + ''), object, source, stack)
- : undefined;
-
- var isCommon = newValue === undefined;
-
- if (isCommon) {
- newValue = srcValue;
- if (isArray(srcValue) || isTypedArray(srcValue)) {
- if (isArray(objValue)) {
- newValue = objValue;
- }
- else if (isArrayLikeObject(objValue)) {
- newValue = copyArray(objValue);
- }
- else {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- }
- else if (isPlainObject(srcValue) || isArguments(srcValue)) {
- if (isArguments(objValue)) {
- newValue = toPlainObject(objValue);
- }
- else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {
- isCommon = false;
- newValue = baseClone(srcValue, true);
- }
- else {
- newValue = objValue;
- }
- }
- else {
- isCommon = false;
- }
- }
- stack.set(srcValue, newValue);
-
- if (isCommon) {
- // Recursively merge objects and arrays (susceptible to call stack limits).
- mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
- }
- assignMergeValue(object, key, newValue);
- }
-
- /**
- * The base implementation of `_.orderBy` without param guards.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
- * @param {string[]} orders The sort orders of `iteratees`.
- * @returns {Array} Returns the new sorted array.
- */
- function baseOrderBy(collection, iteratees, orders) {
- var index = -1,
- toIteratee = getIteratee();
-
- iteratees = arrayMap(iteratees.length ? iteratees : Array(1), function(iteratee) {
- return toIteratee(iteratee);
- });
-
- var result = baseMap(collection, function(value, key, collection) {
- var criteria = arrayMap(iteratees, function(iteratee) {
- return iteratee(value);
- });
- return { 'criteria': criteria, 'index': ++index, 'value': value };
- });
-
- return baseSortBy(result, function(object, other) {
- return compareMultiple(object, other, orders);
- });
- }
-
- /**
- * The base implementation of `_.pick` without support for individual
- * property names.
- *
- * @private
- * @param {Object} object The source object.
- * @param {string[]} props The property names to pick.
- * @returns {Object} Returns the new object.
- */
- function basePick(object, props) {
- object = Object(object);
- return arrayReduce(props, function(result, key) {
- if (key in object) {
- result[key] = object[key];
- }
- return result;
- }, {});
- }
-
- /**
- * The base implementation of `_.pickBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Object} object The source object.
- * @param {Function} predicate The function invoked per property.
- * @returns {Object} Returns the new object.
- */
- function basePickBy(object, predicate) {
- var result = {};
- baseForIn(object, function(value, key) {
- if (predicate(value, key)) {
- result[key] = value;
- }
- });
- return result;
- }
-
- /**
- * The base implementation of `_.property` without support for deep paths.
- *
- * @private
- * @param {string} key The key of the property to get.
- * @returns {Function} Returns the new function.
- */
- function baseProperty(key) {
- return function(object) {
- return object == null ? undefined : object[key];
- };
- }
-
- /**
- * A specialized version of `baseProperty` which supports deep paths.
- *
- * @private
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- */
- function basePropertyDeep(path) {
- return function(object) {
- return baseGet(object, path);
- };
- }
-
- /**
- * The base implementation of `_.pullAll`.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @returns {Array} Returns `array`.
- */
- function basePullAll(array, values) {
- return basePullAllBy(array, values);
- }
-
- /**
- * The base implementation of `_.pullAllBy` without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns `array`.
- */
- function basePullAllBy(array, values, iteratee) {
- var index = -1,
- length = values.length,
- seen = array;
-
- if (iteratee) {
- seen = arrayMap(array, function(value) { return iteratee(value); });
- }
- while (++index < length) {
- var fromIndex = 0,
- value = values[index],
- computed = iteratee ? iteratee(value) : value;
-
- while ((fromIndex = baseIndexOf(seen, computed, fromIndex)) > -1) {
- if (seen !== array) {
- splice.call(seen, fromIndex, 1);
- }
- splice.call(array, fromIndex, 1);
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.pullAt` without support for individual
- * indexes or capturing the removed elements.
- *
- * @private
- * @param {Array} array The array to modify.
- * @param {number[]} indexes The indexes of elements to remove.
- * @returns {Array} Returns `array`.
- */
- function basePullAt(array, indexes) {
- var length = array ? indexes.length : 0,
- lastIndex = length - 1;
-
- while (length--) {
- var index = indexes[length];
- if (lastIndex == length || index != previous) {
- var previous = index;
- if (isIndex(index)) {
- splice.call(array, index, 1);
- }
- else if (!isKey(index, array)) {
- var path = baseCastPath(index),
- object = parent(array, path);
-
- if (object != null) {
- delete object[last(path)];
- }
- }
- else {
- delete array[index];
- }
- }
- }
- return array;
- }
-
- /**
- * The base implementation of `_.random` without support for returning
- * floating-point numbers.
- *
- * @private
- * @param {number} lower The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the random number.
- */
- function baseRandom(lower, upper) {
- return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
- }
-
- /**
- * The base implementation of `_.range` and `_.rangeRight` which doesn't
- * coerce arguments to numbers.
- *
- * @private
- * @param {number} start The start of the range.
- * @param {number} end The end of the range.
- * @param {number} step The value to increment or decrement by.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the new array of numbers.
- */
- function baseRange(start, end, step, fromRight) {
- var index = -1,
- length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
- result = Array(length);
-
- while (length--) {
- result[fromRight ? length : ++index] = start;
- start += step;
- }
- return result;
- }
-
- /**
- * The base implementation of `_.set`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize path creation.
- * @returns {Object} Returns `object`.
- */
- function baseSet(object, path, value, customizer) {
- path = isKey(path, object) ? [path + ''] : baseCastPath(path);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- nested = object;
-
- while (nested != null && ++index < length) {
- var key = path[index];
- if (isObject(nested)) {
- var newValue = value;
- if (index != lastIndex) {
- var objValue = nested[key];
- newValue = customizer ? customizer(objValue, key, nested) : undefined;
- if (newValue === undefined) {
- newValue = objValue == null
- ? (isIndex(path[index + 1]) ? [] : {})
- : objValue;
- }
- }
- assignValue(nested, key, newValue);
- }
- nested = nested[key];
- }
- return object;
- }
-
- /**
- * The base implementation of `setData` without support for hot loop detection.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var baseSetData = !metaMap ? identity : function(func, data) {
- metaMap.set(func, data);
- return func;
- };
-
- /**
- * The base implementation of `_.slice` without an iteratee call guard.
- *
- * @private
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseSlice(array, start, end) {
- var index = -1,
- length = array.length;
-
- if (start < 0) {
- start = -start > length ? 0 : (length + start);
- }
- end = end > length ? length : end;
- if (end < 0) {
- end += length;
- }
- length = start > end ? 0 : ((end - start) >>> 0);
- start >>>= 0;
-
- var result = Array(length);
- while (++index < length) {
- result[index] = array[index + start];
- }
- return result;
- }
-
- /**
- * The base implementation of `_.some` without support for iteratee shorthands.
- *
- * @private
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} predicate The function invoked per iteration.
- * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.
- */
- function baseSome(collection, predicate) {
- var result;
-
- baseEach(collection, function(value, index, collection) {
- result = predicate(value, index, collection);
- return !result;
- });
- return !!result;
- }
-
- /**
- * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
- * performs a binary search of `array` to determine the index at which `value`
- * should be inserted into `array` in order to maintain its sort order.
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted
- * into `array`.
- */
- function baseSortedIndex(array, value, retHighest) {
- var low = 0,
- high = array ? array.length : low;
-
- if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
- while (low < high) {
- var mid = (low + high) >>> 1,
- computed = array[mid];
-
- if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return high;
- }
- return baseSortedIndexBy(array, value, identity, retHighest);
- }
-
- /**
- * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
- * which invokes `iteratee` for `value` and each element of `array` to compute
- * their sort ranking. The iteratee is invoked with one argument; (value).
- *
- * @private
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function} iteratee The iteratee invoked per element.
- * @param {boolean} [retHighest] Specify returning the highest qualified index.
- * @returns {number} Returns the index at which `value` should be inserted into `array`.
- */
- function baseSortedIndexBy(array, value, iteratee, retHighest) {
- value = iteratee(value);
-
- var low = 0,
- high = array ? array.length : 0,
- valIsNaN = value !== value,
- valIsNull = value === null,
- valIsUndef = value === undefined;
-
- while (low < high) {
- var mid = nativeFloor((low + high) / 2),
- computed = iteratee(array[mid]),
- isDef = computed !== undefined,
- isReflexive = computed === computed;
-
- if (valIsNaN) {
- var setLow = isReflexive || retHighest;
- } else if (valIsNull) {
- setLow = isReflexive && isDef && (retHighest || computed != null);
- } else if (valIsUndef) {
- setLow = isReflexive && (retHighest || isDef);
- } else if (computed == null) {
- setLow = false;
- } else {
- setLow = retHighest ? (computed <= value) : (computed < value);
- }
- if (setLow) {
- low = mid + 1;
- } else {
- high = mid;
- }
- }
- return nativeMin(high, MAX_ARRAY_INDEX);
- }
-
- /**
- * The base implementation of `_.sortedUniq`.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseSortedUniq(array) {
- return baseSortedUniqBy(array);
- }
-
- /**
- * The base implementation of `_.sortedUniqBy` without support for iteratee
- * shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseSortedUniqBy(array, iteratee) {
- var index = 0,
- length = array.length,
- value = array[0],
- computed = iteratee ? iteratee(value) : value,
- seen = computed,
- resIndex = 0,
- result = [value];
-
- while (++index < length) {
- value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- if (!eq(computed, seen)) {
- seen = computed;
- result[++resIndex] = value;
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- */
- function baseUniq(array, iteratee, comparator) {
- var index = -1,
- includes = arrayIncludes,
- length = array.length,
- isCommon = true,
- result = [],
- seen = result;
-
- if (comparator) {
- isCommon = false;
- includes = arrayIncludesWith;
- }
- else if (length >= LARGE_ARRAY_SIZE) {
- var set = iteratee ? null : createSet(array);
- if (set) {
- return setToArray(set);
- }
- isCommon = false;
- includes = cacheHas;
- seen = new SetCache;
- }
- else {
- seen = iteratee ? [] : result;
- }
- outer:
- while (++index < length) {
- var value = array[index],
- computed = iteratee ? iteratee(value) : value;
-
- if (isCommon && computed === computed) {
- var seenIndex = seen.length;
- while (seenIndex--) {
- if (seen[seenIndex] === computed) {
- continue outer;
- }
- }
- if (iteratee) {
- seen.push(computed);
- }
- result.push(value);
- }
- else if (!includes(seen, computed, comparator)) {
- if (seen !== result) {
- seen.push(computed);
- }
- result.push(value);
- }
- }
- return result;
- }
-
- /**
- * The base implementation of `_.unset`.
- *
- * @private
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- */
- function baseUnset(object, path) {
- path = isKey(path, object) ? [path + ''] : baseCastPath(path);
- object = parent(object, path);
- var key = last(path);
- return (object != null && has(object, key)) ? delete object[key] : true;
- }
-
- /**
- * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
- * without support for iteratee shorthands.
- *
- * @private
- * @param {Array} array The array to query.
- * @param {Function} predicate The function invoked per iteration.
- * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Array} Returns the slice of `array`.
- */
- function baseWhile(array, predicate, isDrop, fromRight) {
- var length = array.length,
- index = fromRight ? length : -1;
-
- while ((fromRight ? index-- : ++index < length) &&
- predicate(array[index], index, array)) {}
-
- return isDrop
- ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
- : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
- }
-
- /**
- * The base implementation of `wrapperValue` which returns the result of
- * performing a sequence of actions on the unwrapped `value`, where each
- * successive action is supplied the return value of the previous.
- *
- * @private
- * @param {*} value The unwrapped value.
- * @param {Array} actions Actions to perform to resolve the unwrapped value.
- * @returns {*} Returns the resolved value.
- */
- function baseWrapperValue(value, actions) {
- var result = value;
- if (result instanceof LazyWrapper) {
- result = result.value();
- }
- return arrayReduce(actions, function(result, action) {
- return action.func.apply(action.thisArg, arrayPush([result], action.args));
- }, result);
- }
-
- /**
- * The base implementation of methods like `_.xor`, without support for
- * iteratee shorthands, that accepts an array of arrays to inspect.
- *
- * @private
- * @param {Array} arrays The arrays to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of values.
- */
- function baseXor(arrays, iteratee, comparator) {
- var index = -1,
- length = arrays.length;
-
- while (++index < length) {
- var result = result
- ? arrayPush(
- baseDifference(result, arrays[index], iteratee, comparator),
- baseDifference(arrays[index], result, iteratee, comparator)
- )
- : arrays[index];
- }
- return (result && result.length) ? baseUniq(result, iteratee, comparator) : [];
- }
-
- /**
- * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
- *
- * @private
- * @param {Array} props The property names.
- * @param {Array} values The property values.
- * @param {Function} assignFunc The function to assign values.
- * @returns {Object} Returns the new object.
- */
- function baseZipObject(props, values, assignFunc) {
- var index = -1,
- length = props.length,
- valsLength = values.length,
- result = {};
-
- while (++index < length) {
- assignFunc(result, props[index], index < valsLength ? values[index] : undefined);
- }
- return result;
- }
-
- /**
- * Creates a clone of `buffer`.
- *
- * @private
- * @param {Buffer} buffer The buffer to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Buffer} Returns the cloned buffer.
- */
- function cloneBuffer(buffer, isDeep) {
- if (isDeep) {
- return buffer.slice();
- }
- var Ctor = buffer.constructor,
- result = new Ctor(buffer.length);
-
- buffer.copy(result);
- return result;
- }
-
- /**
- * Creates a clone of `arrayBuffer`.
- *
- * @private
- * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
- * @returns {ArrayBuffer} Returns the cloned array buffer.
- */
- function cloneArrayBuffer(arrayBuffer) {
- var Ctor = arrayBuffer.constructor,
- result = new Ctor(arrayBuffer.byteLength),
- view = new Uint8Array(result);
-
- view.set(new Uint8Array(arrayBuffer));
- return result;
- }
-
- /**
- * Creates a clone of `map`.
- *
- * @private
- * @param {Object} map The map to clone.
- * @returns {Object} Returns the cloned map.
- */
- function cloneMap(map) {
- var Ctor = map.constructor;
- return arrayReduce(mapToArray(map), addMapEntry, new Ctor);
- }
-
- /**
- * Creates a clone of `regexp`.
- *
- * @private
- * @param {Object} regexp The regexp to clone.
- * @returns {Object} Returns the cloned regexp.
- */
- function cloneRegExp(regexp) {
- var Ctor = regexp.constructor,
- result = new Ctor(regexp.source, reFlags.exec(regexp));
-
- result.lastIndex = regexp.lastIndex;
- return result;
- }
-
- /**
- * Creates a clone of `set`.
- *
- * @private
- * @param {Object} set The set to clone.
- * @returns {Object} Returns the cloned set.
- */
- function cloneSet(set) {
- var Ctor = set.constructor;
- return arrayReduce(setToArray(set), addSetEntry, new Ctor);
- }
-
- /**
- * Creates a clone of the `symbol` object.
- *
- * @private
- * @param {Object} symbol The symbol object to clone.
- * @returns {Object} Returns the cloned symbol object.
- */
- function cloneSymbol(symbol) {
- return Symbol ? Object(symbolValueOf.call(symbol)) : {};
- }
-
- /**
- * Creates a clone of `typedArray`.
- *
- * @private
- * @param {Object} typedArray The typed array to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the cloned typed array.
- */
- function cloneTypedArray(typedArray, isDeep) {
- var arrayBuffer = typedArray.buffer,
- buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
- Ctor = typedArray.constructor;
-
- return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
- }
-
- /**
- * Creates an array that is the composition of partially applied arguments,
- * placeholders, and provided arguments into a single array of arguments.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to prepend to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @params {boolean} [isCurried] Specify composing for a curried function.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgs(args, partials, holders, isCurried) {
- var argsIndex = -1,
- argsLength = args.length,
- holdersLength = holders.length,
- leftIndex = -1,
- leftLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(leftLength + rangeLength),
- isUncurried = !isCurried;
-
- while (++leftIndex < leftLength) {
- result[leftIndex] = partials[leftIndex];
- }
- while (++argsIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[holders[argsIndex]] = args[argsIndex];
- }
- }
- while (rangeLength--) {
- result[leftIndex++] = args[argsIndex++];
- }
- return result;
- }
-
- /**
- * This function is like `composeArgs` except that the arguments composition
- * is tailored for `_.partialRight`.
- *
- * @private
- * @param {Array|Object} args The provided arguments.
- * @param {Array} partials The arguments to append to those provided.
- * @param {Array} holders The `partials` placeholder indexes.
- * @params {boolean} [isCurried] Specify composing for a curried function.
- * @returns {Array} Returns the new array of composed arguments.
- */
- function composeArgsRight(args, partials, holders, isCurried) {
- var argsIndex = -1,
- argsLength = args.length,
- holdersIndex = -1,
- holdersLength = holders.length,
- rightIndex = -1,
- rightLength = partials.length,
- rangeLength = nativeMax(argsLength - holdersLength, 0),
- result = Array(rangeLength + rightLength),
- isUncurried = !isCurried;
-
- while (++argsIndex < rangeLength) {
- result[argsIndex] = args[argsIndex];
- }
- var offset = argsIndex;
- while (++rightIndex < rightLength) {
- result[offset + rightIndex] = partials[rightIndex];
- }
- while (++holdersIndex < holdersLength) {
- if (isUncurried || argsIndex < argsLength) {
- result[offset + holders[holdersIndex]] = args[argsIndex++];
- }
- }
- return result;
- }
-
- /**
- * Copies the values of `source` to `array`.
- *
- * @private
- * @param {Array} source The array to copy values from.
- * @param {Array} [array=[]] The array to copy values to.
- * @returns {Array} Returns `array`.
- */
- function copyArray(source, array) {
- var index = -1,
- length = source.length;
-
- array || (array = Array(length));
- while (++index < length) {
- array[index] = source[index];
- }
- return array;
- }
-
- /**
- * Copies properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @returns {Object} Returns `object`.
- */
- function copyObject(source, props, object) {
- return copyObjectWith(source, props, object);
- }
-
- /**
- * This function is like `copyObject` except that it accepts a function to
- * customize copied values.
- *
- * @private
- * @param {Object} source The object to copy properties from.
- * @param {Array} props The property names to copy.
- * @param {Object} [object={}] The object to copy properties to.
- * @param {Function} [customizer] The function to customize copied values.
- * @returns {Object} Returns `object`.
- */
- function copyObjectWith(source, props, object, customizer) {
- object || (object = {});
-
- var index = -1,
- length = props.length;
-
- while (++index < length) {
- var key = props[index];
-
- var newValue = customizer
- ? customizer(object[key], source[key], key, object, source)
- : source[key];
-
- assignValue(object, key, newValue);
- }
- return object;
- }
-
- /**
- * Copies own symbol properties of `source` to `object`.
- *
- * @private
- * @param {Object} source The object to copy symbols from.
- * @param {Object} [object={}] The object to copy symbols to.
- * @returns {Object} Returns `object`.
- */
- function copySymbols(source, object) {
- return copyObject(source, getSymbols(source), object);
- }
-
- /**
- * Creates a function like `_.groupBy`.
- *
- * @private
- * @param {Function} setter The function to set accumulator values.
- * @param {Function} [initializer] The accumulator object initializer.
- * @returns {Function} Returns the new aggregator function.
- */
- function createAggregator(setter, initializer) {
- return function(collection, iteratee) {
- var func = isArray(collection) ? arrayAggregator : baseAggregator,
- accumulator = initializer ? initializer() : {};
-
- return func(collection, setter, getIteratee(iteratee), accumulator);
- };
- }
-
- /**
- * Creates a function like `_.assign`.
- *
- * @private
- * @param {Function} assigner The function to assign values.
- * @returns {Function} Returns the new assigner function.
- */
- function createAssigner(assigner) {
- return rest(function(object, sources) {
- var index = -1,
- length = sources.length,
- customizer = length > 1 ? sources[length - 1] : undefined,
- guard = length > 2 ? sources[2] : undefined;
-
- customizer = typeof customizer == 'function'
- ? (length--, customizer)
- : undefined;
-
- if (guard && isIterateeCall(sources[0], sources[1], guard)) {
- customizer = length < 3 ? undefined : customizer;
- length = 1;
- }
- object = Object(object);
- while (++index < length) {
- var source = sources[index];
- if (source) {
- assigner(object, source, index, customizer);
- }
- }
- return object;
- });
- }
-
- /**
- * Creates a `baseEach` or `baseEachRight` function.
- *
- * @private
- * @param {Function} eachFunc The function to iterate over a collection.
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseEach(eachFunc, fromRight) {
- return function(collection, iteratee) {
- if (collection == null) {
- return collection;
- }
- if (!isArrayLike(collection)) {
- return eachFunc(collection, iteratee);
- }
- var length = collection.length,
- index = fromRight ? length : -1,
- iterable = Object(collection);
-
- while ((fromRight ? index-- : ++index < length)) {
- if (iteratee(iterable[index], index, iterable) === false) {
- break;
- }
- }
- return collection;
- };
- }
-
- /**
- * Creates a base function for methods like `_.forIn`.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new base function.
- */
- function createBaseFor(fromRight) {
- return function(object, iteratee, keysFunc) {
- var index = -1,
- iterable = Object(object),
- props = keysFunc(object),
- length = props.length;
-
- while (length--) {
- var key = props[fromRight ? length : ++index];
- if (iteratee(iterable[key], key, iterable) === false) {
- break;
- }
- }
- return object;
- };
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the optional `this`
- * binding of `thisArg`.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createBaseWrapper(func, bitmask, thisArg) {
- var isBind = bitmask & BIND_FLAG,
- Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return fn.apply(isBind ? thisArg : this, arguments);
- }
- return wrapper;
- }
-
- /**
- * Creates a function like `_.lowerFirst`.
- *
- * @private
- * @param {string} methodName The name of the `String` case method to use.
- * @returns {Function} Returns the new function.
- */
- function createCaseFirst(methodName) {
- return function(string) {
- string = toString(string);
-
- var strSymbols = reHasComplexSymbol.test(string)
- ? stringToArray(string)
- : undefined;
-
- var chr = strSymbols ? strSymbols[0] : string.charAt(0),
- trailing = strSymbols ? strSymbols.slice(1).join('') : string.slice(1);
-
- return chr[methodName]() + trailing;
- };
- }
-
- /**
- * Creates a function like `_.camelCase`.
- *
- * @private
- * @param {Function} callback The function to combine each word.
- * @returns {Function} Returns the new compounder function.
- */
- function createCompounder(callback) {
- return function(string) {
- return arrayReduce(words(deburr(string)), callback, '');
- };
- }
-
- /**
- * Creates a function that produces an instance of `Ctor` regardless of
- * whether it was invoked as part of a `new` expression or by `call` or `apply`.
- *
- * @private
- * @param {Function} Ctor The constructor to wrap.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCtorWrapper(Ctor) {
- return function() {
- // Use a `switch` statement to work with class constructors.
- // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
- // for more details.
- var args = arguments;
- switch (args.length) {
- case 0: return new Ctor;
- case 1: return new Ctor(args[0]);
- case 2: return new Ctor(args[0], args[1]);
- case 3: return new Ctor(args[0], args[1], args[2]);
- case 4: return new Ctor(args[0], args[1], args[2], args[3]);
- case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
- case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
- case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
- }
- var thisBinding = baseCreate(Ctor.prototype),
- result = Ctor.apply(thisBinding, args);
-
- // Mimic the constructor's `return` behavior.
- // See https://es5.github.io/#x13.2.2 for more details.
- return isObject(result) ? result : thisBinding;
- };
- }
-
- /**
- * Creates a function that wraps `func` to enable currying.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
- * @param {number} arity The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createCurryWrapper(func, bitmask, arity) {
- var Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var length = arguments.length,
- args = Array(length),
- index = length,
- placeholder = getPlaceholder(wrapper);
-
- while (index--) {
- args[index] = arguments[index];
- }
- var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
- ? []
- : replaceHolders(args, placeholder);
-
- length -= holders.length;
- if (length < arity) {
- return createRecurryWrapper(
- func, bitmask, createHybridWrapper, wrapper.placeholder, undefined,
- args, holders, undefined, undefined, arity - length);
- }
- var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
- return apply(fn, this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.flow` or `_.flowRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new flow function.
- */
- function createFlow(fromRight) {
- return rest(function(funcs) {
- funcs = baseFlatten(funcs, 1);
-
- var length = funcs.length,
- index = length,
- prereq = LodashWrapper.prototype.thru;
-
- if (fromRight) {
- funcs.reverse();
- }
- while (index--) {
- var func = funcs[index];
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
- var wrapper = new LodashWrapper([], true);
- }
- }
- index = wrapper ? index : length;
- while (++index < length) {
- func = funcs[index];
-
- var funcName = getFuncName(func),
- data = funcName == 'wrapper' ? getData(func) : undefined;
-
- if (data && isLaziable(data[0]) &&
- data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) &&
- !data[4].length && data[9] == 1
- ) {
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
- } else {
- wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
- }
- }
- return function() {
- var args = arguments,
- value = args[0];
-
- if (wrapper && args.length == 1 &&
- isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
- return wrapper.plant(value).value();
- }
- var index = 0,
- result = length ? funcs[index].apply(this, args) : value;
-
- while (++index < length) {
- result = funcs[index].call(this, result);
- }
- return result;
- };
- });
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with optional `this`
- * binding of `thisArg`, partial application, and currying.
- *
- * @private
- * @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [partialsRight] The arguments to append to those provided to the new function.
- * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
- var isAry = bitmask & ARY_FLAG,
- isBind = bitmask & BIND_FLAG,
- isBindKey = bitmask & BIND_KEY_FLAG,
- isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG),
- isFlip = bitmask & FLIP_FLAG,
- Ctor = isBindKey ? undefined : createCtorWrapper(func);
-
- function wrapper() {
- var length = arguments.length,
- index = length,
- args = Array(length);
-
- while (index--) {
- args[index] = arguments[index];
- }
- if (isCurried) {
- var placeholder = getPlaceholder(wrapper),
- holdersCount = countHolders(args, placeholder);
- }
- if (partials) {
- args = composeArgs(args, partials, holders, isCurried);
- }
- if (partialsRight) {
- args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
- }
- length -= holdersCount;
- if (isCurried && length < arity) {
- var newHolders = replaceHolders(args, placeholder);
- return createRecurryWrapper(
- func, bitmask, createHybridWrapper, wrapper.placeholder, thisArg,
- args, newHolders, argPos, ary, arity - length
- );
- }
- var thisBinding = isBind ? thisArg : this,
- fn = isBindKey ? thisBinding[func] : func;
-
- length = args.length;
- if (argPos) {
- args = reorder(args, argPos);
- } else if (isFlip && length > 1) {
- args.reverse();
- }
- if (isAry && ary < length) {
- args.length = ary;
- }
- if (this && this !== root && this instanceof wrapper) {
- fn = Ctor || createCtorWrapper(fn);
- }
- return fn.apply(thisBinding, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a function like `_.invertBy`.
- *
- * @private
- * @param {Function} setter The function to set accumulator values.
- * @param {Function} toIteratee The function to resolve iteratees.
- * @returns {Function} Returns the new inverter function.
- */
- function createInverter(setter, toIteratee) {
- return function(object, iteratee) {
- return baseInverter(object, setter, toIteratee(iteratee), {});
- };
- }
-
- /**
- * Creates a function like `_.over`.
- *
- * @private
- * @param {Function} arrayFunc The function to iterate over iteratees.
- * @returns {Function} Returns the new invoker function.
- */
- function createOver(arrayFunc) {
- return rest(function(iteratees) {
- iteratees = arrayMap(baseFlatten(iteratees, 1), getIteratee());
- return rest(function(args) {
- var thisArg = this;
- return arrayFunc(iteratees, function(iteratee) {
- return apply(iteratee, thisArg, args);
- });
- });
- });
- }
-
- /**
- * Creates the padding for `string` based on `length`. The `chars` string
- * is truncated if the number of characters exceeds `length`.
- *
- * @private
- * @param {string} string The string to create padding for.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padding for `string`.
- */
- function createPadding(string, length, chars) {
- length = toInteger(length);
-
- var strLength = stringSize(string);
- if (!length || strLength >= length) {
- return '';
- }
- var padLength = length - strLength;
- chars = chars === undefined ? ' ' : (chars + '');
-
- var result = repeat(chars, nativeCeil(padLength / stringSize(chars)));
- return reHasComplexSymbol.test(chars)
- ? stringToArray(result).slice(0, padLength).join('')
- : result.slice(0, padLength);
- }
-
- /**
- * Creates a function that wraps `func` to invoke it with the optional `this`
- * binding of `thisArg` and the `partials` prepended to those provided to
- * the wrapper.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {Array} partials The arguments to prepend to those provided to the new function.
- * @returns {Function} Returns the new wrapped function.
- */
- function createPartialWrapper(func, bitmask, thisArg, partials) {
- var isBind = bitmask & BIND_FLAG,
- Ctor = createCtorWrapper(func);
-
- function wrapper() {
- var argsIndex = -1,
- argsLength = arguments.length,
- leftIndex = -1,
- leftLength = partials.length,
- args = Array(leftLength + argsLength),
- fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
-
- while (++leftIndex < leftLength) {
- args[leftIndex] = partials[leftIndex];
- }
- while (argsLength--) {
- args[leftIndex++] = arguments[++argsIndex];
- }
- return apply(fn, isBind ? thisArg : this, args);
- }
- return wrapper;
- }
-
- /**
- * Creates a `_.range` or `_.rangeRight` function.
- *
- * @private
- * @param {boolean} [fromRight] Specify iterating from right to left.
- * @returns {Function} Returns the new range function.
- */
- function createRange(fromRight) {
- return function(start, end, step) {
- if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
- end = step = undefined;
- }
- // Ensure the sign of `-0` is preserved.
- start = toNumber(start);
- start = start === start ? start : 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = toNumber(end) || 0;
- }
- step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0);
- return baseRange(start, end, step, fromRight);
- };
- }
-
- /**
- * Creates a function that wraps `func` to continue currying.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details.
- * @param {Function} wrapFunc The function to create the `func` wrapper.
- * @param {*} placeholder The placeholder value.
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to prepend to those provided to the new function.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
- var isCurry = bitmask & CURRY_FLAG,
- newArgPos = argPos ? copyArray(argPos) : undefined,
- newHolders = isCurry ? holders : undefined,
- newHoldersRight = isCurry ? undefined : holders,
- newPartials = isCurry ? partials : undefined,
- newPartialsRight = isCurry ? undefined : partials;
-
- bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
- bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
-
- if (!(bitmask & CURRY_BOUND_FLAG)) {
- bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
- }
- var newData = [
- func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
- newHoldersRight, newArgPos, ary, arity
- ];
-
- var result = wrapFunc.apply(undefined, newData);
- if (isLaziable(func)) {
- setData(result, newData);
- }
- result.placeholder = placeholder;
- return result;
- }
-
- /**
- * Creates a function like `_.round`.
- *
- * @private
- * @param {string} methodName The name of the `Math` method to use when rounding.
- * @returns {Function} Returns the new round function.
- */
- function createRound(methodName) {
- var func = Math[methodName];
- return function(number, precision) {
- number = toNumber(number);
- precision = toInteger(precision);
- if (precision) {
- // Shift with exponential notation to avoid floating-point issues.
- // See [MDN](https://mdn.io/round#Examples) for more details.
- var pair = (toString(number) + 'e').split('e'),
- value = func(pair[0] + 'e' + (+pair[1] + precision));
-
- pair = (toString(value) + 'e').split('e');
- return +(pair[0] + 'e' + (+pair[1] - precision));
- }
- return func(number);
- };
- }
-
- /**
- * Creates a set of `values`.
- *
- * @private
- * @param {Array} values The values to add to the set.
- * @returns {Object} Returns the new set.
- */
- var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) {
- return new Set(values);
- };
-
- /**
- * Creates a function that either curries or invokes `func` with optional
- * `this` binding and partially applied arguments.
- *
- * @private
- * @param {Function|string} func The function or method name to wrap.
- * @param {number} bitmask The bitmask of wrapper flags.
- * The bitmask may be composed of the following flags:
- * 1 - `_.bind`
- * 2 - `_.bindKey`
- * 4 - `_.curry` or `_.curryRight` of a bound function
- * 8 - `_.curry`
- * 16 - `_.curryRight`
- * 32 - `_.partial`
- * 64 - `_.partialRight`
- * 128 - `_.rearg`
- * 256 - `_.ary`
- * @param {*} [thisArg] The `this` binding of `func`.
- * @param {Array} [partials] The arguments to be partially applied.
- * @param {Array} [holders] The `partials` placeholder indexes.
- * @param {Array} [argPos] The argument positions of the new function.
- * @param {number} [ary] The arity cap of `func`.
- * @param {number} [arity] The arity of `func`.
- * @returns {Function} Returns the new wrapped function.
- */
- function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
- var isBindKey = bitmask & BIND_KEY_FLAG;
- if (!isBindKey && typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var length = partials ? partials.length : 0;
- if (!length) {
- bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
- partials = holders = undefined;
- }
- ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
- arity = arity === undefined ? arity : toInteger(arity);
- length -= holders ? holders.length : 0;
-
- if (bitmask & PARTIAL_RIGHT_FLAG) {
- var partialsRight = partials,
- holdersRight = holders;
-
- partials = holders = undefined;
- }
- var data = isBindKey ? undefined : getData(func);
-
- var newData = [
- func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
- argPos, ary, arity
- ];
-
- if (data) {
- mergeData(newData, data);
- }
- func = newData[0];
- bitmask = newData[1];
- thisArg = newData[2];
- partials = newData[3];
- holders = newData[4];
- arity = newData[9] = newData[9] == null
- ? (isBindKey ? 0 : func.length)
- : nativeMax(newData[9] - length, 0);
-
- if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) {
- bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG);
- }
- if (!bitmask || bitmask == BIND_FLAG) {
- var result = createBaseWrapper(func, bitmask, thisArg);
- } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) {
- result = createCurryWrapper(func, bitmask, arity);
- } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) {
- result = createPartialWrapper(func, bitmask, thisArg, partials);
- } else {
- result = createHybridWrapper.apply(undefined, newData);
- }
- var setter = data ? baseSetData : setData;
- return setter(result, newData);
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for arrays with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Array} array The array to compare.
- * @param {Array} other The other array to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
- * @param {Object} [stack] Tracks traversed `array` and `other` objects.
- * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
- */
- function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
- var index = -1,
- isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- isUnordered = bitmask & UNORDERED_COMPARE_FLAG,
- arrLength = array.length,
- othLength = other.length;
-
- if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
- return false;
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(array);
- if (stacked) {
- return stacked == other;
- }
- var result = true;
- stack.set(array, other);
-
- // Ignore non-index properties.
- while (++index < arrLength) {
- var arrValue = array[index],
- othValue = other[index];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, arrValue, index, other, array, stack)
- : customizer(arrValue, othValue, index, array, other, stack);
- }
- if (compared !== undefined) {
- if (compared) {
- continue;
- }
- result = false;
- break;
- }
- // Recursively compare arrays (susceptible to call stack limits).
- if (isUnordered) {
- if (!arraySome(other, function(othValue) {
- return arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack);
- })) {
- result = false;
- break;
- }
- } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
- result = false;
- break;
- }
- }
- stack['delete'](array);
- return result;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for comparing objects of
- * the same `toStringTag`.
- *
- * **Note:** This function only supports comparing values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {string} tag The `toStringTag` of the objects to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalByTag(object, other, tag, equalFunc, customizer, bitmask) {
- switch (tag) {
- case arrayBufferTag:
- if ((object.byteLength != other.byteLength) ||
- !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
- return false;
- }
- return true;
-
- case boolTag:
- case dateTag:
- // Coerce dates and booleans to numbers, dates to milliseconds and booleans
- // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.
- return +object == +other;
-
- case errorTag:
- return object.name == other.name && object.message == other.message;
-
- case numberTag:
- // Treat `NaN` vs. `NaN` as equal.
- return (object != +object) ? other != +other : object == +other;
-
- case regexpTag:
- case stringTag:
- // Coerce regexes to strings and treat strings primitives and string
- // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.
- return object == (other + '');
-
- case mapTag:
- var convert = mapToArray;
-
- case setTag:
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
- convert || (convert = setToArray);
-
- // Recursively compare objects (susceptible to call stack limits).
- return (isPartial || object.size == other.size) &&
- equalFunc(convert(object), convert(other), customizer, bitmask | UNORDERED_COMPARE_FLAG);
-
- case symbolTag:
- return !!Symbol && (symbolValueOf.call(object) == symbolValueOf.call(other));
- }
- return false;
- }
-
- /**
- * A specialized version of `baseIsEqualDeep` for objects with support for
- * partial deep comparisons.
- *
- * @private
- * @param {Object} object The object to compare.
- * @param {Object} other The other object to compare.
- * @param {Function} equalFunc The function to determine equivalents of values.
- * @param {Function} [customizer] The function to customize comparisons.
- * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual` for more details.
- * @param {Object} [stack] Tracks traversed `object` and `other` objects.
- * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
- */
- function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
- var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
- objProps = keys(object),
- objLength = objProps.length,
- othProps = keys(other),
- othLength = othProps.length;
-
- if (objLength != othLength && !isPartial) {
- return false;
- }
- var index = objLength;
- while (index--) {
- var key = objProps[index];
- if (!(isPartial ? key in other : baseHas(other, key))) {
- return false;
- }
- }
- // Assume cyclic values are equal.
- var stacked = stack.get(object);
- if (stacked) {
- return stacked == other;
- }
- var result = true;
- stack.set(object, other);
-
- var skipCtor = isPartial;
- while (++index < objLength) {
- key = objProps[index];
- var objValue = object[key],
- othValue = other[key];
-
- if (customizer) {
- var compared = isPartial
- ? customizer(othValue, objValue, key, other, object, stack)
- : customizer(objValue, othValue, key, object, other, stack);
- }
- // Recursively compare objects (susceptible to call stack limits).
- if (!(compared === undefined
- ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
- : compared
- )) {
- result = false;
- break;
- }
- skipCtor || (skipCtor = key == 'constructor');
- }
- if (result && !skipCtor) {
- var objCtor = object.constructor,
- othCtor = other.constructor;
-
- // Non `Object` object instances with different constructors are not equal.
- if (objCtor != othCtor &&
- ('constructor' in object && 'constructor' in other) &&
- !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
- typeof othCtor == 'function' && othCtor instanceof othCtor)) {
- result = false;
- }
- }
- stack['delete'](object);
- return result;
- }
-
- /**
- * Gets metadata for `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {*} Returns the metadata for `func`.
- */
- var getData = !metaMap ? noop : function(func) {
- return metaMap.get(func);
- };
-
- /**
- * Gets the name of `func`.
- *
- * @private
- * @param {Function} func The function to query.
- * @returns {string} Returns the function name.
- */
- function getFuncName(func) {
- var result = (func.name + ''),
- array = realNames[result],
- length = hasOwnProperty.call(realNames, result) ? array.length : 0;
-
- while (length--) {
- var data = array[length],
- otherFunc = data.func;
- if (otherFunc == null || otherFunc == func) {
- return data.name;
- }
- }
- return result;
- }
-
- /**
- * Gets the appropriate "iteratee" function. If the `_.iteratee` method is
- * customized this function returns the custom method, otherwise it returns
- * `baseIteratee`. If arguments are provided the chosen function is invoked
- * with them and its result is returned.
- *
- * @private
- * @param {*} [value] The value to convert to an iteratee.
- * @param {number} [arity] The arity of the created iteratee.
- * @returns {Function} Returns the chosen function or its result.
- */
- function getIteratee() {
- var result = lodash.iteratee || iteratee;
- result = result === iteratee ? baseIteratee : result;
- return arguments.length ? result(arguments[0], arguments[1]) : result;
- }
-
- /**
- * Gets the "length" property value of `object`.
- *
- * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)
- * that affects Safari on at least iOS 8.1-8.3 ARM64.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {*} Returns the "length" value.
- */
- var getLength = baseProperty('length');
-
- /**
- * Gets the property names, values, and compare flags of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the match data of `object`.
- */
- function getMatchData(object) {
- var result = toPairs(object),
- length = result.length;
-
- while (length--) {
- result[length][2] = isStrictComparable(result[length][1]);
- }
- return result;
- }
-
- /**
- * Gets the native function at `key` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {string} key The key of the method to get.
- * @returns {*} Returns the function if it's native, else `undefined`.
- */
- function getNative(object, key) {
- var value = object == null ? undefined : object[key];
- return isNative(value) ? value : undefined;
- }
-
- /**
- * Gets the argument placeholder value for `func`.
- *
- * @private
- * @param {Function} func The function to inspect.
- * @returns {*} Returns the placeholder value.
- */
- function getPlaceholder(func) {
- var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
- return object.placeholder;
- }
-
- /**
- * Creates an array of the own symbol properties of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of symbols.
- */
- var getSymbols = getOwnPropertySymbols || function() {
- return [];
- };
-
- /**
- * Gets the `toStringTag` of `value`.
- *
- * @private
- * @param {*} value The value to query.
- * @returns {string} Returns the `toStringTag`.
- */
- function getTag(value) {
- return objectToString.call(value);
- }
-
- // Fallback for IE 11 providing `toStringTag` values for maps, sets, and weakmaps.
- if ((Map && getTag(new Map) != mapTag) ||
- (Set && getTag(new Set) != setTag) ||
- (WeakMap && getTag(new WeakMap) != weakMapTag)) {
- getTag = function(value) {
- var result = objectToString.call(value),
- Ctor = result == objectTag ? value.constructor : null,
- ctorString = typeof Ctor == 'function' ? funcToString.call(Ctor) : '';
-
- if (ctorString) {
- switch (ctorString) {
- case mapCtorString: return mapTag;
- case setCtorString: return setTag;
- case weakMapCtorString: return weakMapTag;
- }
- }
- return result;
- };
- }
-
- /**
- * Gets the view, applying any `transforms` to the `start` and `end` positions.
- *
- * @private
- * @param {number} start The start of the view.
- * @param {number} end The end of the view.
- * @param {Array} transforms The transformations to apply to the view.
- * @returns {Object} Returns an object containing the `start` and `end`
- * positions of the view.
- */
- function getView(start, end, transforms) {
- var index = -1,
- length = transforms.length;
-
- while (++index < length) {
- var data = transforms[index],
- size = data.size;
-
- switch (data.type) {
- case 'drop': start += size; break;
- case 'dropRight': end -= size; break;
- case 'take': end = nativeMin(end, start + size); break;
- case 'takeRight': start = nativeMax(start, end - size); break;
- }
- }
- return { 'start': start, 'end': end };
- }
-
- /**
- * Checks if `path` exists on `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @param {Function} hasFunc The function to check properties.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- */
- function hasPath(object, path, hasFunc) {
- if (object == null) {
- return false;
- }
- var result = hasFunc(object, path);
- if (!result && !isKey(path)) {
- path = baseCastPath(path);
- object = parent(object, path);
- if (object != null) {
- path = last(path);
- result = hasFunc(object, path);
- }
- }
- var length = object ? object.length : undefined;
- return result || (
- !!length && isLength(length) && isIndex(path, length) &&
- (isArray(object) || isString(object) || isArguments(object))
- );
- }
-
- /**
- * Initializes an array clone.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the initialized clone.
- */
- function initCloneArray(array) {
- var length = array.length,
- result = array.constructor(length);
-
- // Add properties assigned by `RegExp#exec`.
- if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
- result.index = array.index;
- result.input = array.input;
- }
- return result;
- }
-
- /**
- * Initializes an object clone.
- *
- * @private
- * @param {Object} object The object to clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneObject(object) {
- return (isFunction(object.constructor) && !isPrototype(object))
- ? baseCreate(getPrototypeOf(object))
- : {};
- }
-
- /**
- * Initializes an object clone based on its `toStringTag`.
- *
- * **Note:** This function only supports cloning values with tags of
- * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {string} tag The `toStringTag` of the object to clone.
- * @param {boolean} [isDeep] Specify a deep clone.
- * @returns {Object} Returns the initialized clone.
- */
- function initCloneByTag(object, tag, isDeep) {
- var Ctor = object.constructor;
- switch (tag) {
- case arrayBufferTag:
- return cloneArrayBuffer(object);
-
- case boolTag:
- case dateTag:
- return new Ctor(+object);
-
- case float32Tag: case float64Tag:
- case int8Tag: case int16Tag: case int32Tag:
- case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
- return cloneTypedArray(object, isDeep);
-
- case mapTag:
- return cloneMap(object);
-
- case numberTag:
- case stringTag:
- return new Ctor(object);
-
- case regexpTag:
- return cloneRegExp(object);
-
- case setTag:
- return cloneSet(object);
-
- case symbolTag:
- return cloneSymbol(object);
- }
- }
-
- /**
- * Creates an array of index keys for `object` values of arrays,
- * `arguments` objects, and strings, otherwise `null` is returned.
- *
- * @private
- * @param {Object} object The object to query.
- * @returns {Array|null} Returns index keys, else `null`.
- */
- function indexKeys(object) {
- var length = object ? object.length : undefined;
- if (isLength(length) &&
- (isArray(object) || isString(object) || isArguments(object))) {
- return baseTimes(length, String);
- }
- return null;
- }
-
- /**
- * Checks if the given arguments are from an iteratee call.
- *
- * @private
- * @param {*} value The potential iteratee value argument.
- * @param {*} index The potential iteratee index or key argument.
- * @param {*} object The potential iteratee object argument.
- * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.
- */
- function isIterateeCall(value, index, object) {
- if (!isObject(object)) {
- return false;
- }
- var type = typeof index;
- if (type == 'number'
- ? (isArrayLike(object) && isIndex(index, object.length))
- : (type == 'string' && index in object)) {
- return eq(object[index], value);
- }
- return false;
- }
-
- /**
- * Checks if `value` is a property name and not a property path.
- *
- * @private
- * @param {*} value The value to check.
- * @param {Object} [object] The object to query keys on.
- * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
- */
- function isKey(value, object) {
- if (typeof value == 'number') {
- return true;
- }
- return !isArray(value) &&
- (reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
- (object != null && value in Object(object)));
- }
-
- /**
- * Checks if `value` is suitable for use as unique object key.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
- */
- function isKeyable(value) {
- var type = typeof value;
- return type == 'number' || type == 'boolean' ||
- (type == 'string' && value != '__proto__') || value == null;
- }
-
- /**
- * Checks if `func` has a lazy counterpart.
- *
- * @private
- * @param {Function} func The function to check.
- * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.
- */
- function isLaziable(func) {
- var funcName = getFuncName(func),
- other = lodash[funcName];
-
- if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
- return false;
- }
- if (func === other) {
- return true;
- }
- var data = getData(other);
- return !!data && func === data[0];
- }
-
- /**
- * Checks if `value` is likely a prototype object.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
- */
- function isPrototype(value) {
- var Ctor = value && value.constructor,
- proto = (isFunction(Ctor) && Ctor.prototype) || objectProto;
-
- return value === proto;
- }
-
- /**
- * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
- *
- * @private
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` if suitable for strict
- * equality comparisons, else `false`.
- */
- function isStrictComparable(value) {
- return value === value && !isObject(value);
- }
-
- /**
- * Merges the function metadata of `source` into `data`.
- *
- * Merging metadata reduces the number of wrappers used to invoke a function.
- * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
- * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`
- * modify function arguments, making the order in which they are executed important,
- * preventing the merging of metadata. However, we make an exception for a safe
- * combined case where curried functions have `_.ary` and or `_.rearg` applied.
- *
- * @private
- * @param {Array} data The destination metadata.
- * @param {Array} source The source metadata.
- * @returns {Array} Returns `data`.
- */
- function mergeData(data, source) {
- var bitmask = data[1],
- srcBitmask = source[1],
- newBitmask = bitmask | srcBitmask,
- isCommon = newBitmask < (BIND_FLAG | BIND_KEY_FLAG | ARY_FLAG);
-
- var isCombo =
- ((srcBitmask == ARY_FLAG) && (bitmask == CURRY_FLAG)) ||
- ((srcBitmask == ARY_FLAG) && (bitmask == REARG_FLAG) && (data[7].length <= source[8])) ||
- ((srcBitmask == (ARY_FLAG | REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == CURRY_FLAG));
-
- // Exit early if metadata can't be merged.
- if (!(isCommon || isCombo)) {
- return data;
- }
- // Use source `thisArg` if available.
- if (srcBitmask & BIND_FLAG) {
- data[2] = source[2];
- // Set when currying a bound function.
- newBitmask |= bitmask & BIND_FLAG ? 0 : CURRY_BOUND_FLAG;
- }
- // Compose partial arguments.
- var value = source[3];
- if (value) {
- var partials = data[3];
- data[3] = partials ? composeArgs(partials, value, source[4]) : copyArray(value);
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : copyArray(source[4]);
- }
- // Compose partial right arguments.
- value = source[5];
- if (value) {
- partials = data[5];
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : copyArray(value);
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : copyArray(source[6]);
- }
- // Use source `argPos` if available.
- value = source[7];
- if (value) {
- data[7] = copyArray(value);
- }
- // Use source `ary` if it's smaller.
- if (srcBitmask & ARY_FLAG) {
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
- }
- // Use source `arity` if one is not provided.
- if (data[9] == null) {
- data[9] = source[9];
- }
- // Use source `func` and merge bitmasks.
- data[0] = source[0];
- data[1] = newBitmask;
-
- return data;
- }
-
- /**
- * Used by `_.defaultsDeep` to customize its `_.merge` use.
- *
- * @private
- * @param {*} objValue The destination value.
- * @param {*} srcValue The source value.
- * @param {string} key The key of the property to merge.
- * @param {Object} object The parent object of `objValue`.
- * @param {Object} source The parent object of `srcValue`.
- * @param {Object} [stack] Tracks traversed source values and their merged counterparts.
- * @returns {*} Returns the value to assign.
- */
- function mergeDefaults(objValue, srcValue, key, object, source, stack) {
- if (isObject(objValue) && isObject(srcValue)) {
- stack.set(srcValue, objValue);
- baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
- }
- return objValue;
- }
-
- /**
- * Gets the parent value at `path` of `object`.
- *
- * @private
- * @param {Object} object The object to query.
- * @param {Array} path The path to get the parent value of.
- * @returns {*} Returns the parent value.
- */
- function parent(object, path) {
- return path.length == 1 ? object : get(object, baseSlice(path, 0, -1));
- }
-
- /**
- * Reorder `array` according to the specified indexes where the element at
- * the first index is assigned as the first element, the element at
- * the second index is assigned as the second element, and so on.
- *
- * @private
- * @param {Array} array The array to reorder.
- * @param {Array} indexes The arranged array indexes.
- * @returns {Array} Returns `array`.
- */
- function reorder(array, indexes) {
- var arrLength = array.length,
- length = nativeMin(indexes.length, arrLength),
- oldArray = copyArray(array);
-
- while (length--) {
- var index = indexes[length];
- array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
- }
- return array;
- }
-
- /**
- * Sets metadata for `func`.
- *
- * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
- * period of time, it will trip its breaker and transition to an identity function
- * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)
- * for more details.
- *
- * @private
- * @param {Function} func The function to associate metadata with.
- * @param {*} data The metadata.
- * @returns {Function} Returns `func`.
- */
- var setData = (function() {
- var count = 0,
- lastCalled = 0;
-
- return function(key, value) {
- var stamp = now(),
- remaining = HOT_SPAN - (stamp - lastCalled);
-
- lastCalled = stamp;
- if (remaining > 0) {
- if (++count >= HOT_COUNT) {
- return key;
- }
- } else {
- count = 0;
- }
- return baseSetData(key, value);
- };
- }());
-
- /**
- * Converts `string` to a property path array.
- *
- * @private
- * @param {string} string The string to convert.
- * @returns {Array} Returns the property path array.
- */
- function stringToPath(string) {
- var result = [];
- toString(string).replace(rePropName, function(match, number, quote, string) {
- result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
- });
- return result;
- }
-
- /**
- * Creates a clone of `wrapper`.
- *
- * @private
- * @param {Object} wrapper The wrapper to clone.
- * @returns {Object} Returns the cloned wrapper.
- */
- function wrapperClone(wrapper) {
- if (wrapper instanceof LazyWrapper) {
- return wrapper.clone();
- }
- var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
- result.__actions__ = copyArray(wrapper.__actions__);
- result.__index__ = wrapper.__index__;
- result.__values__ = wrapper.__values__;
- return result;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an array of elements split into groups the length of `size`.
- * If `array` can't be split evenly, the final chunk will be the remaining
- * elements.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to process.
- * @param {number} [size=0] The length of each chunk.
- * @returns {Array} Returns the new array containing chunks.
- * @example
- *
- * _.chunk(['a', 'b', 'c', 'd'], 2);
- * // => [['a', 'b'], ['c', 'd']]
- *
- * _.chunk(['a', 'b', 'c', 'd'], 3);
- * // => [['a', 'b', 'c'], ['d']]
- */
- function chunk(array, size) {
- size = nativeMax(toInteger(size), 0);
-
- var length = array ? array.length : 0;
- if (!length || size < 1) {
- return [];
- }
- var index = 0,
- resIndex = -1,
- result = Array(nativeCeil(length / size));
-
- while (index < length) {
- result[++resIndex] = baseSlice(array, index, (index += size));
- }
- return result;
- }
-
- /**
- * Creates an array with all falsey values removed. The values `false`, `null`,
- * `0`, `""`, `undefined`, and `NaN` are falsey.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to compact.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.compact([0, 1, false, 2, '', 3]);
- * // => [1, 2, 3]
- */
- function compact(array) {
- var index = -1,
- length = array ? array.length : 0,
- resIndex = -1,
- result = [];
-
- while (++index < length) {
- var value = array[index];
- if (value) {
- result[++resIndex] = value;
- }
- }
- return result;
- }
-
- /**
- * Creates a new array concatenating `array` with any additional arrays
- * and/or values.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to concatenate.
- * @param {...*} [values] The values to concatenate.
- * @returns {Array} Returns the new concatenated array.
- * @example
- *
- * var array = [1];
- * var other = _.concat(array, 2, [3], [[4]]);
- *
- * console.log(other);
- * // => [1, 2, 3, [4]]
- *
- * console.log(array);
- * // => [1]
- */
- var concat = rest(function(array, values) {
- if (!isArray(array)) {
- array = array == null ? [] : [Object(array)];
- }
- values = baseFlatten(values, 1);
- return arrayConcat(array, values);
- });
-
- /**
- * Creates an array of unique `array` values not included in the other
- * given arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.difference([3, 2, 1], [4, 2]);
- * // => [3, 1]
- */
- var difference = rest(function(array, values) {
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, true))
- : [];
- });
-
- /**
- * This method is like `_.difference` except that it accepts `iteratee` which
- * is invoked for each element of `array` and `values` to generate the criterion
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.differenceBy([3.1, 2.2, 1.3], [4.4, 2.5], Math.floor);
- * // => [3.1, 1.3]
- *
- * // The `_.property` iteratee shorthand.
- * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
- * // => [{ 'x': 2 }]
- */
- var differenceBy = rest(function(array, values) {
- var iteratee = last(values);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, true), getIteratee(iteratee))
- : [];
- });
-
- /**
- * This method is like `_.difference` except that it accepts `comparator`
- * which is invoked to compare elements of `array` to `values`. The comparator
- * is invoked with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {...Array} [values] The values to exclude.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- *
- * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
- * // => [{ 'x': 2, 'y': 1 }]
- */
- var differenceWith = rest(function(array, values) {
- var comparator = last(values);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, true), undefined, comparator)
- : [];
- });
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.drop([1, 2, 3]);
- * // => [2, 3]
- *
- * _.drop([1, 2, 3], 2);
- * // => [3]
- *
- * _.drop([1, 2, 3], 5);
- * // => []
- *
- * _.drop([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function drop(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- return baseSlice(array, n < 0 ? 0 : n, length);
- }
-
- /**
- * Creates a slice of `array` with `n` elements dropped from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to drop.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.dropRight([1, 2, 3]);
- * // => [1, 2]
- *
- * _.dropRight([1, 2, 3], 2);
- * // => [1]
- *
- * _.dropRight([1, 2, 3], 5);
- * // => []
- *
- * _.dropRight([1, 2, 3], 0);
- * // => [1, 2, 3]
- */
- function dropRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- n = length - n;
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the end.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.dropRightWhile(users, function(o) { return !o.active; });
- * // => objects for ['barney']
- *
- * // The `_.matches` iteratee shorthand.
- * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
- * // => objects for ['barney', 'fred']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.dropRightWhile(users, ['active', false]);
- * // => objects for ['barney']
- *
- * // The `_.property` iteratee shorthand.
- * _.dropRightWhile(users, 'active');
- * // => objects for ['barney', 'fred', 'pebbles']
- */
- function dropRightWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), true, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` excluding elements dropped from the beginning.
- * Elements are dropped until `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.dropWhile(users, function(o) { return !o.active; });
- * // => objects for ['pebbles']
- *
- * // The `_.matches` iteratee shorthand.
- * _.dropWhile(users, { 'user': 'barney', 'active': false });
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.dropWhile(users, ['active', false]);
- * // => objects for ['pebbles']
- *
- * // The `_.property` iteratee shorthand.
- * _.dropWhile(users, 'active');
- * // => objects for ['barney', 'fred', 'pebbles']
- */
- function dropWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), true)
- : [];
- }
-
- /**
- * Fills elements of `array` with `value` from `start` up to, but not
- * including, `end`.
- *
- * **Note:** This method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to fill.
- * @param {*} value The value to fill `array` with.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.fill(array, 'a');
- * console.log(array);
- * // => ['a', 'a', 'a']
- *
- * _.fill(Array(3), 2);
- * // => [2, 2, 2]
- *
- * _.fill([4, 6, 8, 10], '*', 1, 3);
- * // => [4, '*', '*', 10]
- */
- function fill(array, value, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
- start = 0;
- end = length;
- }
- return baseFill(array, value, start, end);
- }
-
- /**
- * This method is like `_.find` except that it returns the index of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.findIndex(users, function(o) { return o.user == 'barney'; });
- * // => 0
- *
- * // The `_.matches` iteratee shorthand.
- * _.findIndex(users, { 'user': 'fred', 'active': false });
- * // => 1
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findIndex(users, ['active', false]);
- * // => 0
- *
- * // The `_.property` iteratee shorthand.
- * _.findIndex(users, 'active');
- * // => 2
- */
- function findIndex(array, predicate) {
- return (array && array.length)
- ? baseFindIndex(array, getIteratee(predicate, 3))
- : -1;
- }
-
- /**
- * This method is like `_.findIndex` except that it iterates over elements
- * of `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {number} Returns the index of the found element, else `-1`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
- * // => 2
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastIndex(users, { 'user': 'barney', 'active': true });
- * // => 0
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastIndex(users, ['active', false]);
- * // => 2
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastIndex(users, 'active');
- * // => 0
- */
- function findLastIndex(array, predicate) {
- return (array && array.length)
- ? baseFindIndex(array, getIteratee(predicate, 3), true)
- : -1;
- }
-
- /**
- * Flattens `array` a single level deep.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flatten([1, [2, [3, [4]], 5]]);
- * // => [1, 2, [3, [4]], 5]
- */
- function flatten(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, 1) : [];
- }
-
- /**
- * Recursively flattens `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to flatten.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * _.flattenDeep([1, [2, [3, [4]], 5]]);
- * // => [1, 2, 3, 4, 5]
- */
- function flattenDeep(array) {
- var length = array ? array.length : 0;
- return length ? baseFlatten(array, INFINITY) : [];
- }
-
- /**
- * Recursively flatten `array` up to `depth` times.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to flatten.
- * @param {number} [depth=1] The maximum recursion depth.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * var array = [1, [2, [3, [4]], 5]];
- *
- * _.flattenDepth(array, 1);
- * // => [1, 2, [3, [4]], 5]
- *
- * _.flattenDepth(array, 2);
- * // => [1, 2, 3, [4], 5]
- */
- function flattenDepth(array, depth) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- depth = depth === undefined ? 1 : toInteger(depth);
- return baseFlatten(array, depth);
- }
-
- /**
- * The inverse of `_.toPairs`; this method returns an object composed
- * from key-value `pairs`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} pairs The key-value pairs.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.fromPairs([['fred', 30], ['barney', 40]]);
- * // => { 'fred': 30, 'barney': 40 }
- */
- function fromPairs(pairs) {
- var index = -1,
- length = pairs ? pairs.length : 0,
- result = {};
-
- while (++index < length) {
- var pair = pairs[index];
- result[pair[0]] = pair[1];
- }
- return result;
- }
-
- /**
- * Gets the first element of `array`.
- *
- * @static
- * @memberOf _
- * @alias first
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the first element of `array`.
- * @example
- *
- * _.head([1, 2, 3]);
- * // => 1
- *
- * _.head([]);
- * // => undefined
- */
- function head(array) {
- return array ? array[0] : undefined;
- }
-
- /**
- * Gets the index at which the first occurrence of `value` is found in `array`
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons. If `fromIndex` is negative, it's used as the offset
- * from the end of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.indexOf([1, 2, 1, 2], 2);
- * // => 1
- *
- * // Search from the `fromIndex`.
- * _.indexOf([1, 2, 1, 2], 2, 2);
- * // => 3
- */
- function indexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- fromIndex = toInteger(fromIndex);
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
- }
- return baseIndexOf(array, value, fromIndex);
- }
-
- /**
- * Gets all but the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.initial([1, 2, 3]);
- * // => [1, 2]
- */
- function initial(array) {
- return dropRight(array, 1);
- }
-
- /**
- * Creates an array of unique values that are included in all given arrays
- * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of shared values.
- * @example
- *
- * _.intersection([2, 1], [4, 2], [1, 2]);
- * // => [2]
- */
- var intersection = rest(function(arrays) {
- var mapped = arrayMap(arrays, baseCastArrayLikeObject);
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped)
- : [];
- });
-
- /**
- * This method is like `_.intersection` except that it accepts `iteratee`
- * which is invoked for each element of each `arrays` to generate the criterion
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of shared values.
- * @example
- *
- * _.intersectionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
- * // => [2.1]
- *
- * // The `_.property` iteratee shorthand.
- * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }]
- */
- var intersectionBy = rest(function(arrays) {
- var iteratee = last(arrays),
- mapped = arrayMap(arrays, baseCastArrayLikeObject);
-
- if (iteratee === last(mapped)) {
- iteratee = undefined;
- } else {
- mapped.pop();
- }
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped, getIteratee(iteratee))
- : [];
- });
-
- /**
- * This method is like `_.intersection` except that it accepts `comparator`
- * which is invoked to compare elements of `arrays`. The comparator is invoked
- * with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of shared values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.intersectionWith(objects, others, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }]
- */
- var intersectionWith = rest(function(arrays) {
- var comparator = last(arrays),
- mapped = arrayMap(arrays, baseCastArrayLikeObject);
-
- if (comparator === last(mapped)) {
- comparator = undefined;
- } else {
- mapped.pop();
- }
- return (mapped.length && mapped[0] === arrays[0])
- ? baseIntersection(mapped, undefined, comparator)
- : [];
- });
-
- /**
- * Converts all elements in `array` into a string separated by `separator`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to convert.
- * @param {string} [separator=','] The element separator.
- * @returns {string} Returns the joined string.
- * @example
- *
- * _.join(['a', 'b', 'c'], '~');
- * // => 'a~b~c'
- */
- function join(array, separator) {
- return array ? nativeJoin.call(array, separator) : '';
- }
-
- /**
- * Gets the last element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {*} Returns the last element of `array`.
- * @example
- *
- * _.last([1, 2, 3]);
- * // => 3
- */
- function last(array) {
- var length = array ? array.length : 0;
- return length ? array[length - 1] : undefined;
- }
-
- /**
- * This method is like `_.indexOf` except that it iterates over elements of
- * `array` from right to left.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=array.length-1] The index to search from.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.lastIndexOf([1, 2, 1, 2], 2);
- * // => 3
- *
- * // Search from the `fromIndex`.
- * _.lastIndexOf([1, 2, 1, 2], 2, 2);
- * // => 1
- */
- function lastIndexOf(array, value, fromIndex) {
- var length = array ? array.length : 0;
- if (!length) {
- return -1;
- }
- var index = length;
- if (fromIndex !== undefined) {
- index = toInteger(fromIndex);
- index = (index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1)) + 1;
- }
- if (value !== value) {
- return indexOfNaN(array, index, true);
- }
- while (index--) {
- if (array[index] === value) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * Removes all given values from `array` using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
- * to remove elements from an array by predicate.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...*} [values] The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pull(array, 2, 3);
- * console.log(array);
- * // => [1, 1]
- */
- var pull = rest(pullAll);
-
- /**
- * This method is like `_.pull` except that it accepts an array of values to remove.
- *
- * **Note:** Unlike `_.difference`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3, 1, 2, 3];
- *
- * _.pullAll(array, [2, 3]);
- * console.log(array);
- * // => [1, 1]
- */
- function pullAll(array, values) {
- return (array && array.length && values && values.length)
- ? basePullAll(array, values)
- : array;
- }
-
- /**
- * This method is like `_.pullAll` except that it accepts `iteratee` which is
- * invoked for each element of `array` and `values` to generate the criterion
- * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Array} values The values to remove.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
- *
- * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
- * console.log(array);
- * // => [{ 'x': 2 }]
- */
- function pullAllBy(array, values, iteratee) {
- return (array && array.length && values && values.length)
- ? basePullAllBy(array, values, getIteratee(iteratee))
- : array;
- }
-
- /**
- * Removes elements from `array` corresponding to `indexes` and returns an
- * array of removed elements.
- *
- * **Note:** Unlike `_.at`, this method mutates `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {...(number|number[])} [indexes] The indexes of elements to remove,
- * specified individually or in arrays.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [5, 10, 15, 20];
- * var evens = _.pullAt(array, 1, 3);
- *
- * console.log(array);
- * // => [5, 15]
- *
- * console.log(evens);
- * // => [10, 20]
- */
- var pullAt = rest(function(array, indexes) {
- indexes = arrayMap(baseFlatten(indexes, 1), String);
-
- var result = baseAt(array, indexes);
- basePullAt(array, indexes.sort(compareAscending));
- return result;
- });
-
- /**
- * Removes all elements from `array` that `predicate` returns truthy for
- * and returns an array of the removed elements. The predicate is invoked
- * with three arguments: (value, index, array).
- *
- * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
- * to pull elements from an array by value.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to modify.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new array of removed elements.
- * @example
- *
- * var array = [1, 2, 3, 4];
- * var evens = _.remove(array, function(n) {
- * return n % 2 == 0;
- * });
- *
- * console.log(array);
- * // => [1, 3]
- *
- * console.log(evens);
- * // => [2, 4]
- */
- function remove(array, predicate) {
- var result = [];
- if (!(array && array.length)) {
- return result;
- }
- var index = -1,
- indexes = [],
- length = array.length;
-
- predicate = getIteratee(predicate, 3);
- while (++index < length) {
- var value = array[index];
- if (predicate(value, index, array)) {
- result.push(value);
- indexes.push(index);
- }
- }
- basePullAt(array, indexes);
- return result;
- }
-
- /**
- * Reverses `array` so that the first element becomes the last, the second
- * element becomes the second to last, and so on.
- *
- * **Note:** This method mutates `array` and is based on
- * [`Array#reverse`](https://mdn.io/Array/reverse).
- *
- * @static
- * @memberOf _
- * @category Array
- * @returns {Array} Returns `array`.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _.reverse(array);
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function reverse(array) {
- return array ? nativeReverse.call(array) : array;
- }
-
- /**
- * Creates a slice of `array` from `start` up to, but not including, `end`.
- *
- * **Note:** This method is used instead of [`Array#slice`](https://mdn.io/Array/slice)
- * to ensure dense arrays are returned.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to slice.
- * @param {number} [start=0] The start position.
- * @param {number} [end=array.length] The end position.
- * @returns {Array} Returns the slice of `array`.
- */
- function slice(array, start, end) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
- start = 0;
- end = length;
- }
- else {
- start = start == null ? 0 : toInteger(start);
- end = end === undefined ? length : toInteger(end);
- }
- return baseSlice(array, start, end);
- }
-
- /**
- * Uses a binary search to determine the lowest index at which `value` should
- * be inserted into `array` in order to maintain its sort order.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @returns {number} Returns the index at which `value` should be inserted into `array`.
- * @example
- *
- * _.sortedIndex([30, 50], 40);
- * // => 1
- *
- * _.sortedIndex([4, 5], 4);
- * // => 0
- */
- function sortedIndex(array, value) {
- return baseSortedIndex(array, value);
- }
-
- /**
- * This method is like `_.sortedIndex` except that it accepts `iteratee`
- * which is invoked for `value` and each element of `array` to compute their
- * sort ranking. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the index at which `value` should be inserted into `array`.
- * @example
- *
- * var dict = { 'thirty': 30, 'forty': 40, 'fifty': 50 };
- *
- * _.sortedIndexBy(['thirty', 'fifty'], 'forty', _.propertyOf(dict));
- * // => 1
- *
- * // The `_.property` iteratee shorthand.
- * _.sortedIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
- * // => 0
- */
- function sortedIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee));
- }
-
- /**
- * This method is like `_.indexOf` except that it performs a binary
- * search on a sorted `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.sortedIndexOf([1, 1, 2, 2], 2);
- * // => 2
- */
- function sortedIndexOf(array, value) {
- var length = array ? array.length : 0;
- if (length) {
- var index = baseSortedIndex(array, value);
- if (index < length && eq(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This method is like `_.sortedIndex` except that it returns the highest
- * index at which `value` should be inserted into `array` in order to
- * maintain its sort order.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @returns {number} Returns the index at which `value` should be inserted into `array`.
- * @example
- *
- * _.sortedLastIndex([4, 5], 4);
- * // => 1
- */
- function sortedLastIndex(array, value) {
- return baseSortedIndex(array, value, true);
- }
-
- /**
- * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
- * which is invoked for `value` and each element of `array` to compute their
- * sort ranking. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The sorted array to inspect.
- * @param {*} value The value to evaluate.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the index at which `value` should be inserted into `array`.
- * @example
- *
- * // The `_.property` iteratee shorthand.
- * _.sortedLastIndexBy([{ 'x': 4 }, { 'x': 5 }], { 'x': 4 }, 'x');
- * // => 1
- */
- function sortedLastIndexBy(array, value, iteratee) {
- return baseSortedIndexBy(array, value, getIteratee(iteratee), true);
- }
-
- /**
- * This method is like `_.lastIndexOf` except that it performs a binary
- * search on a sorted `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to search.
- * @param {*} value The value to search for.
- * @returns {number} Returns the index of the matched value, else `-1`.
- * @example
- *
- * _.sortedLastIndexOf([1, 1, 2, 2], 2);
- * // => 3
- */
- function sortedLastIndexOf(array, value) {
- var length = array ? array.length : 0;
- if (length) {
- var index = baseSortedIndex(array, value, true) - 1;
- if (eq(array[index], value)) {
- return index;
- }
- }
- return -1;
- }
-
- /**
- * This method is like `_.uniq` except that it's designed and optimized
- * for sorted arrays.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.sortedUniq([1, 1, 2]);
- * // => [1, 2]
- */
- function sortedUniq(array) {
- return (array && array.length)
- ? baseSortedUniq(array)
- : [];
- }
-
- /**
- * This method is like `_.uniqBy` except that it's designed and optimized
- * for sorted arrays.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [iteratee] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
- * // => [1.1, 2.3]
- */
- function sortedUniqBy(array, iteratee) {
- return (array && array.length)
- ? baseSortedUniqBy(array, getIteratee(iteratee))
- : [];
- }
-
- /**
- * Gets all but the first element of `array`.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.tail([1, 2, 3]);
- * // => [2, 3]
- */
- function tail(array) {
- return drop(array, 1);
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the beginning.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.take([1, 2, 3]);
- * // => [1]
- *
- * _.take([1, 2, 3], 2);
- * // => [1, 2]
- *
- * _.take([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.take([1, 2, 3], 0);
- * // => []
- */
- function take(array, n, guard) {
- if (!(array && array.length)) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- return baseSlice(array, 0, n < 0 ? 0 : n);
- }
-
- /**
- * Creates a slice of `array` with `n` elements taken from the end.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {number} [n=1] The number of elements to take.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * _.takeRight([1, 2, 3]);
- * // => [3]
- *
- * _.takeRight([1, 2, 3], 2);
- * // => [2, 3]
- *
- * _.takeRight([1, 2, 3], 5);
- * // => [1, 2, 3]
- *
- * _.takeRight([1, 2, 3], 0);
- * // => []
- */
- function takeRight(array, n, guard) {
- var length = array ? array.length : 0;
- if (!length) {
- return [];
- }
- n = (guard || n === undefined) ? 1 : toInteger(n);
- n = length - n;
- return baseSlice(array, n < 0 ? 0 : n, length);
- }
-
- /**
- * Creates a slice of `array` with elements taken from the end. Elements are
- * taken until `predicate` returns falsey. The predicate is invoked with three
- * arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false },
- * { 'user': 'pebbles', 'active': false }
- * ];
- *
- * _.takeRightWhile(users, function(o) { return !o.active; });
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.matches` iteratee shorthand.
- * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
- * // => objects for ['pebbles']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.takeRightWhile(users, ['active', false]);
- * // => objects for ['fred', 'pebbles']
- *
- * // The `_.property` iteratee shorthand.
- * _.takeRightWhile(users, 'active');
- * // => []
- */
- function takeRightWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3), false, true)
- : [];
- }
-
- /**
- * Creates a slice of `array` with elements taken from the beginning. Elements
- * are taken until `predicate` returns falsey. The predicate is invoked with
- * three arguments: (value, index, array).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to query.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the slice of `array`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false},
- * { 'user': 'pebbles', 'active': true }
- * ];
- *
- * _.takeWhile(users, function(o) { return !o.active; });
- * // => objects for ['barney', 'fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.takeWhile(users, { 'user': 'barney', 'active': false });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.takeWhile(users, ['active', false]);
- * // => objects for ['barney', 'fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.takeWhile(users, 'active');
- * // => []
- */
- function takeWhile(array, predicate) {
- return (array && array.length)
- ? baseWhile(array, getIteratee(predicate, 3))
- : [];
- }
-
- /**
- * Creates an array of unique values, in order, from all given arrays using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.union([2, 1], [4, 2], [1, 2]);
- * // => [2, 1, 4]
- */
- var union = rest(function(arrays) {
- return baseUniq(baseFlatten(arrays, 1, true));
- });
-
- /**
- * This method is like `_.union` except that it accepts `iteratee` which is
- * invoked for each element of each `arrays` to generate the criterion by which
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * _.unionBy([2.1, 1.2], [4.3, 2.4], Math.floor);
- * // => [2.1, 1.2, 4.3]
- *
- * // The `_.property` iteratee shorthand.
- * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- var unionBy = rest(function(arrays) {
- var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return baseUniq(baseFlatten(arrays, 1, true), getIteratee(iteratee));
- });
-
- /**
- * This method is like `_.union` except that it accepts `comparator` which
- * is invoked to compare elements of `arrays`. The comparator is invoked
- * with two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of combined values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.unionWith(objects, others, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
- */
- var unionWith = rest(function(arrays) {
- var comparator = last(arrays);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return baseUniq(baseFlatten(arrays, 1, true), undefined, comparator);
- });
-
- /**
- * Creates a duplicate-free version of an array, using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons, in which only the first occurrence of each element
- * is kept.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.uniq([2, 1, 2]);
- * // => [2, 1]
- */
- function uniq(array) {
- return (array && array.length)
- ? baseUniq(array)
- : [];
- }
-
- /**
- * This method is like `_.uniq` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
- * // => [2.1, 1.2]
- *
- * // The `_.property` iteratee shorthand.
- * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 1 }, { 'x': 2 }]
- */
- function uniqBy(array, iteratee) {
- return (array && array.length)
- ? baseUniq(array, getIteratee(iteratee))
- : [];
- }
-
- /**
- * This method is like `_.uniq` except that it accepts `comparator` which
- * is invoked to compare elements of `array`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new duplicate free array.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.uniqWith(objects, _.isEqual);
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
- */
- function uniqWith(array, comparator) {
- return (array && array.length)
- ? baseUniq(array, undefined, comparator)
- : [];
- }
-
- /**
- * This method is like `_.zip` except that it accepts an array of grouped
- * elements and creates an array regrouping the elements to their pre-zip
- * configuration.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- *
- * _.unzip(zipped);
- * // => [['fred', 'barney'], [30, 40], [true, false]]
- */
- function unzip(array) {
- if (!(array && array.length)) {
- return [];
- }
- var length = 0;
- array = arrayFilter(array, function(group) {
- if (isArrayLikeObject(group)) {
- length = nativeMax(group.length, length);
- return true;
- }
- });
- return baseTimes(length, function(index) {
- return arrayMap(array, baseProperty(index));
- });
- }
-
- /**
- * This method is like `_.unzip` except that it accepts `iteratee` to specify
- * how regrouped values should be combined. The iteratee is invoked with the
- * elements of each group: (...group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array of grouped elements to process.
- * @param {Function} [iteratee=_.identity] The function to combine regrouped values.
- * @returns {Array} Returns the new array of regrouped elements.
- * @example
- *
- * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
- * // => [[1, 10, 100], [2, 20, 200]]
- *
- * _.unzipWith(zipped, _.add);
- * // => [3, 30, 300]
- */
- function unzipWith(array, iteratee) {
- if (!(array && array.length)) {
- return [];
- }
- var result = unzip(array);
- if (iteratee == null) {
- return result;
- }
- return arrayMap(result, function(group) {
- return apply(iteratee, undefined, group);
- });
- }
-
- /**
- * Creates an array excluding all given values using
- * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * for equality comparisons.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} array The array to filter.
- * @param {...*} [values] The values to exclude.
- * @returns {Array} Returns the new array of filtered values.
- * @example
- *
- * _.without([1, 2, 1, 3], 1, 2);
- * // => [3]
- */
- var without = rest(function(array, values) {
- return isArrayLikeObject(array)
- ? baseDifference(array, values)
- : [];
- });
-
- /**
- * Creates an array of unique values that is the [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
- * of the given arrays.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * _.xor([2, 1], [4, 2]);
- * // => [1, 4]
- */
- var xor = rest(function(arrays) {
- return baseXor(arrayFilter(arrays, isArrayLikeObject));
- });
-
- /**
- * This method is like `_.xor` except that it accepts `iteratee` which is
- * invoked for each element of each `arrays` to generate the criterion by which
- * uniqueness is computed. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * _.xorBy([2.1, 1.2], [4.3, 2.4], Math.floor);
- * // => [1.2, 4.3]
- *
- * // The `_.property` iteratee shorthand.
- * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
- * // => [{ 'x': 2 }]
- */
- var xorBy = rest(function(arrays) {
- var iteratee = last(arrays);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee));
- });
-
- /**
- * This method is like `_.xor` except that it accepts `comparator` which is
- * invoked to compare elements of `arrays`. The comparator is invoked with
- * two arguments: (arrVal, othVal).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to inspect.
- * @param {Function} [comparator] The comparator invoked per element.
- * @returns {Array} Returns the new array of values.
- * @example
- *
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
- * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
- *
- * _.xorWith(objects, others, _.isEqual);
- * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
- */
- var xorWith = rest(function(arrays) {
- var comparator = last(arrays);
- if (isArrayLikeObject(comparator)) {
- comparator = undefined;
- }
- return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
- });
-
- /**
- * Creates an array of grouped elements, the first of which contains the first
- * elements of the given arrays, the second of which contains the second elements
- * of the given arrays, and so on.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zip(['fred', 'barney'], [30, 40], [true, false]);
- * // => [['fred', 30, true], ['barney', 40, false]]
- */
- var zip = rest(unzip);
-
- /**
- * This method is like `_.fromPairs` except that it accepts two arrays,
- * one of property names and one of corresponding values.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} [props=[]] The property names.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObject(['a', 'b'], [1, 2]);
- * // => { 'a': 1, 'b': 2 }
- */
- function zipObject(props, values) {
- return baseZipObject(props || [], values || [], assignValue);
- }
-
- /**
- * This method is like `_.zipObject` except that it supports property paths.
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {Array} [props=[]] The property names.
- * @param {Array} [values=[]] The property values.
- * @returns {Object} Returns the new object.
- * @example
- *
- * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
- * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
- */
- function zipObjectDeep(props, values) {
- return baseZipObject(props || [], values || [], baseSet);
- }
-
- /**
- * This method is like `_.zip` except that it accepts `iteratee` to specify
- * how grouped values should be combined. The iteratee is invoked with the
- * elements of each group: (...group).
- *
- * @static
- * @memberOf _
- * @category Array
- * @param {...Array} [arrays] The arrays to process.
- * @param {Function} [iteratee=_.identity] The function to combine grouped values.
- * @returns {Array} Returns the new array of grouped elements.
- * @example
- *
- * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
- * return a + b + c;
- * });
- * // => [111, 222]
- */
- var zipWith = rest(function(arrays) {
- var length = arrays.length,
- iteratee = length > 1 ? arrays[length - 1] : undefined;
-
- iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
- return unzipWith(arrays, iteratee);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates a `lodash` object that wraps `value` with explicit method chaining enabled.
- * The result of such method chaining must be unwrapped with `_#value`.
- *
- * @static
- * @memberOf _
- * @category Seq
- * @param {*} value The value to wrap.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 },
- * { 'user': 'pebbles', 'age': 1 }
- * ];
- *
- * var youngest = _
- * .chain(users)
- * .sortBy('age')
- * .map(function(o) {
- * return o.user + ' is ' + o.age;
- * })
- * .head()
- * .value();
- * // => 'pebbles is 1'
- */
- function chain(value) {
- var result = lodash(value);
- result.__chain__ = true;
- return result;
- }
-
- /**
- * This method invokes `interceptor` and returns `value`. The interceptor
- * is invoked with one argument; (value). The purpose of this method is to
- * "tap into" a method chain in order to modify intermediate results.
- *
- * @static
- * @memberOf _
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns `value`.
- * @example
- *
- * _([1, 2, 3])
- * .tap(function(array) {
- * // Mutate input array.
- * array.pop();
- * })
- * .reverse()
- * .value();
- * // => [2, 1]
- */
- function tap(value, interceptor) {
- interceptor(value);
- return value;
- }
-
- /**
- * This method is like `_.tap` except that it returns the result of `interceptor`.
- * The purpose of this method is to "pass thru" values replacing intermediate
- * results in a method chain.
- *
- * @static
- * @memberOf _
- * @category Seq
- * @param {*} value The value to provide to `interceptor`.
- * @param {Function} interceptor The function to invoke.
- * @returns {*} Returns the result of `interceptor`.
- * @example
- *
- * _(' abc ')
- * .chain()
- * .trim()
- * .thru(function(value) {
- * return [value];
- * })
- * .value();
- * // => ['abc']
- */
- function thru(value, interceptor) {
- return interceptor(value);
- }
-
- /**
- * This method is the wrapper version of `_.at`.
- *
- * @name at
- * @memberOf _
- * @category Seq
- * @param {...(string|string[])} [paths] The property paths of elements to pick,
- * specified individually or in arrays.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
- *
- * _(object).at(['a[0].b.c', 'a[1]']).value();
- * // => [3, 4]
- *
- * _(['a', 'b', 'c']).at(0, 2).value();
- * // => ['a', 'c']
- */
- var wrapperAt = rest(function(paths) {
- paths = baseFlatten(paths, 1);
- var length = paths.length,
- start = length ? paths[0] : 0,
- value = this.__wrapped__,
- interceptor = function(object) { return baseAt(object, paths); };
-
- if (length > 1 || this.__actions__.length ||
- !(value instanceof LazyWrapper) || !isIndex(start)) {
- return this.thru(interceptor);
- }
- value = value.slice(start, +start + (length ? 1 : 0));
- value.__actions__.push({
- 'func': thru,
- 'args': [interceptor],
- 'thisArg': undefined
- });
- return new LodashWrapper(value, this.__chain__).thru(function(array) {
- if (length && !array.length) {
- array.push(undefined);
- }
- return array;
- });
- });
-
- /**
- * Enables explicit method chaining on the wrapper object.
- *
- * @name chain
- * @memberOf _
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // A sequence without explicit chaining.
- * _(users).head();
- * // => { 'user': 'barney', 'age': 36 }
- *
- * // A sequence with explicit chaining.
- * _(users)
- * .chain()
- * .head()
- * .pick('user')
- * .value();
- * // => { 'user': 'barney' }
- */
- function wrapperChain() {
- return chain(this);
- }
-
- /**
- * Executes the chained sequence and returns the wrapped result.
- *
- * @name commit
- * @memberOf _
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2];
- * var wrapped = _(array).push(3);
- *
- * console.log(array);
- * // => [1, 2]
- *
- * wrapped = wrapped.commit();
- * console.log(array);
- * // => [1, 2, 3]
- *
- * wrapped.last();
- * // => 3
- *
- * console.log(array);
- * // => [1, 2, 3]
- */
- function wrapperCommit() {
- return new LodashWrapper(this.value(), this.__chain__);
- }
-
- /**
- * This method is the wrapper version of `_.flatMap`.
- *
- * @name flatMap
- * @memberOf _
- * @category Seq
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function duplicate(n) {
- * return [n, n];
- * }
- *
- * _([1, 2]).flatMap(duplicate).value();
- * // => [1, 1, 2, 2]
- */
- function wrapperFlatMap(iteratee) {
- return this.map(iteratee).flatten();
- }
-
- /**
- * Gets the next value on a wrapped object following the
- * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
- *
- * @name next
- * @memberOf _
- * @category Seq
- * @returns {Object} Returns the next iterator value.
- * @example
- *
- * var wrapped = _([1, 2]);
- *
- * wrapped.next();
- * // => { 'done': false, 'value': 1 }
- *
- * wrapped.next();
- * // => { 'done': false, 'value': 2 }
- *
- * wrapped.next();
- * // => { 'done': true, 'value': undefined }
- */
- function wrapperNext() {
- if (this.__values__ === undefined) {
- this.__values__ = toArray(this.value());
- }
- var done = this.__index__ >= this.__values__.length,
- value = done ? undefined : this.__values__[this.__index__++];
-
- return { 'done': done, 'value': value };
- }
-
- /**
- * Enables the wrapper to be iterable.
- *
- * @name Symbol.iterator
- * @memberOf _
- * @category Seq
- * @returns {Object} Returns the wrapper object.
- * @example
- *
- * var wrapped = _([1, 2]);
- *
- * wrapped[Symbol.iterator]() === wrapped;
- * // => true
- *
- * Array.from(wrapped);
- * // => [1, 2]
- */
- function wrapperToIterator() {
- return this;
- }
-
- /**
- * Creates a clone of the chained sequence planting `value` as the wrapped value.
- *
- * @name plant
- * @memberOf _
- * @category Seq
- * @param {*} value The value to plant.
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var wrapped = _([1, 2]).map(square);
- * var other = wrapped.plant([3, 4]);
- *
- * other.value();
- * // => [9, 16]
- *
- * wrapped.value();
- * // => [1, 4]
- */
- function wrapperPlant(value) {
- var result,
- parent = this;
-
- while (parent instanceof baseLodash) {
- var clone = wrapperClone(parent);
- clone.__index__ = 0;
- clone.__values__ = undefined;
- if (result) {
- previous.__wrapped__ = clone;
- } else {
- result = clone;
- }
- var previous = clone;
- parent = parent.__wrapped__;
- }
- previous.__wrapped__ = value;
- return result;
- }
-
- /**
- * This method is the wrapper version of `_.reverse`.
- *
- * **Note:** This method mutates the wrapped array.
- *
- * @name reverse
- * @memberOf _
- * @category Seq
- * @returns {Object} Returns the new `lodash` wrapper instance.
- * @example
- *
- * var array = [1, 2, 3];
- *
- * _(array).reverse().value()
- * // => [3, 2, 1]
- *
- * console.log(array);
- * // => [3, 2, 1]
- */
- function wrapperReverse() {
- var value = this.__wrapped__;
- if (value instanceof LazyWrapper) {
- var wrapped = value;
- if (this.__actions__.length) {
- wrapped = new LazyWrapper(this);
- }
- wrapped = wrapped.reverse();
- wrapped.__actions__.push({
- 'func': thru,
- 'args': [reverse],
- 'thisArg': undefined
- });
- return new LodashWrapper(wrapped, this.__chain__);
- }
- return this.thru(reverse);
- }
-
- /**
- * Executes the chained sequence to extract the unwrapped value.
- *
- * @name value
- * @memberOf _
- * @alias toJSON, valueOf
- * @category Seq
- * @returns {*} Returns the resolved unwrapped value.
- * @example
- *
- * _([1, 2, 3]).value();
- * // => [1, 2, 3]
- */
- function wrapperValue() {
- return baseWrapperValue(this.__wrapped__, this.__actions__);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the number of times the key was returned by `iteratee`.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.countBy([6.1, 4.2, 6.3], Math.floor);
- * // => { '4': 1, '6': 2 }
- *
- * _.countBy(['one', 'two', 'three'], 'length');
- * // => { '3': 2, '5': 1 }
- */
- var countBy = createAggregator(function(result, value, key) {
- hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
- });
-
- /**
- * Checks if `predicate` returns truthy for **all** elements of `collection`.
- * Iteration is stopped once `predicate` returns falsey. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`.
- * @example
- *
- * _.every([true, 1, null, 'yes'], Boolean);
- * // => false
- *
- * var users = [
- * { 'user': 'barney', 'active': false },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.every(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.every(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.every(users, 'active');
- * // => false
- */
- function every(collection, predicate, guard) {
- var func = isArray(collection) ? arrayEvery : baseEvery;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Iterates over elements of `collection`, returning an array of all elements
- * `predicate` returns truthy for. The predicate is invoked with three arguments:
- * (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.filter(users, { 'age': 36, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.filter(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.filter(users, 'active');
- * // => objects for ['barney']
- */
- function filter(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Iterates over elements of `collection`, returning the first element
- * `predicate` returns truthy for. The predicate is invoked with three arguments:
- * (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false },
- * { 'user': 'pebbles', 'age': 1, 'active': true }
- * ];
- *
- * _.find(users, function(o) { return o.age < 40; });
- * // => object for 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.find(users, { 'age': 1, 'active': true });
- * // => object for 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.find(users, ['active', false]);
- * // => object for 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.find(users, 'active');
- * // => object for 'barney'
- */
- function find(collection, predicate) {
- predicate = getIteratee(predicate, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, baseEach);
- }
-
- /**
- * This method is like `_.find` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {*} Returns the matched element, else `undefined`.
- * @example
- *
- * _.findLast([1, 2, 3, 4], function(n) {
- * return n % 2 == 1;
- * });
- * // => 3
- */
- function findLast(collection, predicate) {
- predicate = getIteratee(predicate, 3);
- if (isArray(collection)) {
- var index = baseFindIndex(collection, predicate, true);
- return index > -1 ? collection[index] : undefined;
- }
- return baseFind(collection, predicate, baseEachRight);
- }
-
- /**
- * Creates an array of flattened values by running each element in `collection`
- * through `iteratee` and concating its result to the other mapped values.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new flattened array.
- * @example
- *
- * function duplicate(n) {
- * return [n, n];
- * }
- *
- * _.flatMap([1, 2], duplicate);
- * // => [1, 1, 2, 2]
- */
- function flatMap(collection, iteratee) {
- return baseFlatten(map(collection, iteratee), 1);
- }
-
- /**
- * Iterates over elements of `collection` invoking `iteratee` for each element.
- * The iteratee is invoked with three arguments: (value, index|key, collection).
- * Iteratee functions may exit iteration early by explicitly returning `false`.
- *
- * **Note:** As with other "Collections" methods, objects with a "length" property
- * are iterated like arrays. To avoid this behavior use `_.forIn` or `_.forOwn`
- * for object iteration.
- *
- * @static
- * @memberOf _
- * @alias each
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @example
- *
- * _([1, 2]).forEach(function(value) {
- * console.log(value);
- * });
- * // => logs `1` then `2`
- *
- * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a' then 'b' (iteration order is not guaranteed)
- */
- function forEach(collection, iteratee) {
- return (typeof iteratee == 'function' && isArray(collection))
- ? arrayEach(collection, iteratee)
- : baseEach(collection, baseCastFunction(iteratee));
- }
-
- /**
- * This method is like `_.forEach` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @alias eachRight
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array|Object} Returns `collection`.
- * @example
- *
- * _.forEachRight([1, 2], function(value) {
- * console.log(value);
- * });
- * // => logs `2` then `1`
- */
- function forEachRight(collection, iteratee) {
- return (typeof iteratee == 'function' && isArray(collection))
- ? arrayEachRight(collection, iteratee)
- : baseEachRight(collection, baseCastFunction(iteratee));
- }
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is an array of elements responsible for generating the key.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * _.groupBy([6.1, 4.2, 6.3], Math.floor);
- * // => { '4': [4.2], '6': [6.1, 6.3] }
- *
- * // The `_.property` iteratee shorthand.
- * _.groupBy(['one', 'two', 'three'], 'length');
- * // => { '3': ['one', 'two'], '5': ['three'] }
- */
- var groupBy = createAggregator(function(result, value, key) {
- if (hasOwnProperty.call(result, key)) {
- result[key].push(value);
- } else {
- result[key] = [value];
- }
- });
-
- /**
- * Checks if `value` is in `collection`. If `collection` is a string it's checked
- * for a substring of `value`, otherwise [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * is used for equality comparisons. If `fromIndex` is negative, it's used as
- * the offset from the end of `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object|string} collection The collection to search.
- * @param {*} value The value to search for.
- * @param {number} [fromIndex=0] The index to search from.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.
- * @returns {boolean} Returns `true` if `value` is found, else `false`.
- * @example
- *
- * _.includes([1, 2, 3], 1);
- * // => true
- *
- * _.includes([1, 2, 3], 1, 2);
- * // => false
- *
- * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');
- * // => true
- *
- * _.includes('pebbles', 'eb');
- * // => true
- */
- function includes(collection, value, fromIndex, guard) {
- collection = isArrayLike(collection) ? collection : values(collection);
- fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
-
- var length = collection.length;
- if (fromIndex < 0) {
- fromIndex = nativeMax(length + fromIndex, 0);
- }
- return isString(collection)
- ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
- : (!!length && baseIndexOf(collection, value, fromIndex) > -1);
- }
-
- /**
- * Invokes the method at `path` of each element in `collection`, returning
- * an array of the results of each invoked method. Any additional arguments
- * are provided to each invoked method. If `methodName` is a function it's
- * invoked for, and `this` bound to, each element in `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Array|Function|string} path The path of the method to invoke or
- * the function invoked per iteration.
- * @param {...*} [args] The arguments to invoke each method with.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
- * // => [[1, 5, 7], [1, 2, 3]]
- *
- * _.invokeMap([123, 456], String.prototype.split, '');
- * // => [['1', '2', '3'], ['4', '5', '6']]
- */
- var invokeMap = rest(function(collection, path, args) {
- var index = -1,
- isFunc = typeof path == 'function',
- isProp = isKey(path),
- result = isArrayLike(collection) ? Array(collection.length) : [];
-
- baseEach(collection, function(value) {
- var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
- result[++index] = func ? apply(func, value, args) : baseInvoke(value, path, args);
- });
- return result;
- });
-
- /**
- * Creates an object composed of keys generated from the results of running
- * each element of `collection` through `iteratee`. The corresponding value
- * of each key is the last element responsible for generating the key. The
- * iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee to transform keys.
- * @returns {Object} Returns the composed aggregate object.
- * @example
- *
- * var array = [
- * { 'dir': 'left', 'code': 97 },
- * { 'dir': 'right', 'code': 100 }
- * ];
- *
- * _.keyBy(array, function(o) {
- * return String.fromCharCode(o.code);
- * });
- * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
- *
- * _.keyBy(array, 'dir');
- * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
- */
- var keyBy = createAggregator(function(result, value, key) {
- result[key] = value;
- });
-
- /**
- * Creates an array of values by running each element in `collection` through
- * `iteratee`. The iteratee is invoked with three arguments:
- * (value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
- *
- * The guarded methods are:
- * `ary`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, `fill`,
- * `invert`, `parseInt`, `random`, `range`, `rangeRight`, `slice`, `some`,
- * `sortBy`, `take`, `takeRight`, `template`, `trim`, `trimEnd`, `trimStart`,
- * and `words`
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new mapped array.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * _.map([4, 8], square);
- * // => [16, 64]
- *
- * _.map({ 'a': 4, 'b': 8 }, square);
- * // => [16, 64] (iteration order is not guaranteed)
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * // The `_.property` iteratee shorthand.
- * _.map(users, 'user');
- * // => ['barney', 'fred']
- */
- function map(collection, iteratee) {
- var func = isArray(collection) ? arrayMap : baseMap;
- return func(collection, getIteratee(iteratee, 3));
- }
-
- /**
- * This method is like `_.sortBy` except that it allows specifying the sort
- * orders of the iteratees to sort by. If `orders` is unspecified, all values
- * are sorted in ascending order. Otherwise, specify an order of "desc" for
- * descending or "asc" for ascending sort order of corresponding values.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function[]|Object[]|string[]} [iteratees=[_.identity]] The iteratees to sort by.
- * @param {string[]} [orders] The sort orders of `iteratees`.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.reduce`.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 34 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 36 }
- * ];
- *
- * // Sort by `user` in ascending order and by `age` in descending order.
- * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
- function orderBy(collection, iteratees, orders, guard) {
- if (collection == null) {
- return [];
- }
- if (!isArray(iteratees)) {
- iteratees = iteratees == null ? [] : [iteratees];
- }
- orders = guard ? undefined : orders;
- if (!isArray(orders)) {
- orders = orders == null ? [] : [orders];
- }
- return baseOrderBy(collection, iteratees, orders);
- }
-
- /**
- * Creates an array of elements split into two groups, the first of which
- * contains elements `predicate` returns truthy for, the second of which
- * contains elements `predicate` returns falsey for. The predicate is
- * invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the array of grouped elements.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true },
- * { 'user': 'pebbles', 'age': 1, 'active': false }
- * ];
- *
- * _.partition(users, function(o) { return o.active; });
- * // => objects for [['fred'], ['barney', 'pebbles']]
- *
- * // The `_.matches` iteratee shorthand.
- * _.partition(users, { 'age': 1, 'active': false });
- * // => objects for [['pebbles'], ['barney', 'fred']]
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.partition(users, ['active', false]);
- * // => objects for [['barney', 'pebbles'], ['fred']]
- *
- * // The `_.property` iteratee shorthand.
- * _.partition(users, 'active');
- * // => objects for [['fred'], ['barney', 'pebbles']]
- */
- var partition = createAggregator(function(result, value, key) {
- result[key ? 0 : 1].push(value);
- }, function() { return [[], []]; });
-
- /**
- * Reduces `collection` to a value which is the accumulated result of running
- * each element in `collection` through `iteratee`, where each successive
- * invocation is supplied the return value of the previous. If `accumulator`
- * is not given the first element of `collection` is used as the initial
- * value. The iteratee is invoked with four arguments:
- * (accumulator, value, index|key, collection).
- *
- * Many lodash methods are guarded to work as iteratees for methods like
- * `_.reduce`, `_.reduceRight`, and `_.transform`.
- *
- * The guarded methods are:
- * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
- * and `sortBy`
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.reduce([1, 2], function(sum, n) {
- * return sum + n;
- * }, 0);
- * // => 3
- *
- * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * return result;
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
- */
- function reduce(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduce : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
- }
-
- /**
- * This method is like `_.reduce` except that it iterates over elements of
- * `collection` from right to left.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The initial value.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * var array = [[0, 1], [2, 3], [4, 5]];
- *
- * _.reduceRight(array, function(flattened, other) {
- * return flattened.concat(other);
- * }, []);
- * // => [4, 5, 2, 3, 0, 1]
- */
- function reduceRight(collection, iteratee, accumulator) {
- var func = isArray(collection) ? arrayReduceRight : baseReduce,
- initAccum = arguments.length < 3;
-
- return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
- }
-
- /**
- * The opposite of `_.filter`; this method returns the elements of `collection`
- * that `predicate` does **not** return truthy for.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the new filtered array.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': false },
- * { 'user': 'fred', 'age': 40, 'active': true }
- * ];
- *
- * _.reject(users, function(o) { return !o.active; });
- * // => objects for ['fred']
- *
- * // The `_.matches` iteratee shorthand.
- * _.reject(users, { 'age': 40, 'active': true });
- * // => objects for ['barney']
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.reject(users, ['active', false]);
- * // => objects for ['fred']
- *
- * // The `_.property` iteratee shorthand.
- * _.reject(users, 'active');
- * // => objects for ['barney']
- */
- function reject(collection, predicate) {
- var func = isArray(collection) ? arrayFilter : baseFilter;
- predicate = getIteratee(predicate, 3);
- return func(collection, function(value, index, collection) {
- return !predicate(value, index, collection);
- });
- }
-
- /**
- * Gets a random element from `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to sample.
- * @returns {*} Returns the random element.
- * @example
- *
- * _.sample([1, 2, 3, 4]);
- * // => 2
- */
- function sample(collection) {
- var array = isArrayLike(collection) ? collection : values(collection),
- length = array.length;
-
- return length > 0 ? array[baseRandom(0, length - 1)] : undefined;
- }
-
- /**
- * Gets `n` random elements at unique keys from `collection` up to the
- * size of `collection`.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to sample.
- * @param {number} [n=0] The number of elements to sample.
- * @returns {Array} Returns the random elements.
- * @example
- *
- * _.sampleSize([1, 2, 3], 2);
- * // => [3, 1]
- *
- * _.sampleSize([1, 2, 3], 4);
- * // => [2, 3, 1]
- */
- function sampleSize(collection, n) {
- var index = -1,
- result = toArray(collection),
- length = result.length,
- lastIndex = length - 1;
-
- n = baseClamp(toInteger(n), 0, length);
- while (++index < n) {
- var rand = baseRandom(index, lastIndex),
- value = result[rand];
-
- result[rand] = result[index];
- result[index] = value;
- }
- result.length = n;
- return result;
- }
-
- /**
- * Creates an array of shuffled values, using a version of the
- * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to shuffle.
- * @returns {Array} Returns the new shuffled array.
- * @example
- *
- * _.shuffle([1, 2, 3, 4]);
- * // => [4, 1, 3, 2]
- */
- function shuffle(collection) {
- return sampleSize(collection, MAX_ARRAY_LENGTH);
- }
-
- /**
- * Gets the size of `collection` by returning its length for array-like
- * values or the number of own enumerable properties for objects.
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to inspect.
- * @returns {number} Returns the collection size.
- * @example
- *
- * _.size([1, 2, 3]);
- * // => 3
- *
- * _.size({ 'a': 1, 'b': 2 });
- * // => 2
- *
- * _.size('pebbles');
- * // => 7
- */
- function size(collection) {
- if (collection == null) {
- return 0;
- }
- if (isArrayLike(collection)) {
- var result = collection.length;
- return (result && isString(collection)) ? stringSize(collection) : result;
- }
- return keys(collection).length;
- }
-
- /**
- * Checks if `predicate` returns truthy for **any** element of `collection`.
- * Iteration is stopped once `predicate` returns truthy. The predicate is
- * invoked with three arguments: (value, index|key, collection).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {boolean} Returns `true` if any element passes the predicate check, else `false`.
- * @example
- *
- * _.some([null, 0, 'yes', false], Boolean);
- * // => true
- *
- * var users = [
- * { 'user': 'barney', 'active': true },
- * { 'user': 'fred', 'active': false }
- * ];
- *
- * // The `_.matches` iteratee shorthand.
- * _.some(users, { 'user': 'barney', 'active': false });
- * // => false
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.some(users, ['active', false]);
- * // => true
- *
- * // The `_.property` iteratee shorthand.
- * _.some(users, 'active');
- * // => true
- */
- function some(collection, predicate, guard) {
- var func = isArray(collection) ? arraySome : baseSome;
- if (guard && isIterateeCall(collection, predicate, guard)) {
- predicate = undefined;
- }
- return func(collection, getIteratee(predicate, 3));
- }
-
- /**
- * Creates an array of elements, sorted in ascending order by the results of
- * running each element in a collection through each iteratee. This method
- * performs a stable sort, that is, it preserves the original sort order of
- * equal elements. The iteratees are invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Collection
- * @param {Array|Object} collection The collection to iterate over.
- * @param {...(Function|Function[]|Object|Object[]|string|string[])} [iteratees=[_.identity]]
- * The iteratees to sort by, specified individually or in arrays.
- * @returns {Array} Returns the new sorted array.
- * @example
- *
- * var users = [
- * { 'user': 'fred', 'age': 48 },
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 42 },
- * { 'user': 'barney', 'age': 34 }
- * ];
- *
- * _.sortBy(users, function(o) { return o.user; });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- *
- * _.sortBy(users, ['user', 'age']);
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 42], ['fred', 48]]
- *
- * _.sortBy(users, 'user', function(o) {
- * return Math.floor(o.age / 10);
- * });
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 42]]
- */
- var sortBy = rest(function(collection, iteratees) {
- if (collection == null) {
- return [];
- }
- var length = iteratees.length;
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
- iteratees = [];
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
- iteratees.length = 1;
- }
- return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
- });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Gets the timestamp of the number of milliseconds that have elapsed since
- * the Unix epoch (1 January 1970 00:00:00 UTC).
- *
- * @static
- * @memberOf _
- * @type {Function}
- * @category Date
- * @returns {number} Returns the timestamp.
- * @example
- *
- * _.defer(function(stamp) {
- * console.log(_.now() - stamp);
- * }, _.now());
- * // => logs the number of milliseconds it took for the deferred function to be invoked
- */
- var now = Date.now;
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The opposite of `_.before`; this method creates a function that invokes
- * `func` once it's called `n` or more times.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls before `func` is invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var saves = ['profile', 'settings'];
- *
- * var done = _.after(saves.length, function() {
- * console.log('done saving!');
- * });
- *
- * _.forEach(saves, function(type) {
- * asyncSave({ 'type': type, 'complete': done });
- * });
- * // => logs 'done saving!' after the two async saves have completed
- */
- function after(n, func) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n < 1) {
- return func.apply(this, arguments);
- }
- };
- }
-
- /**
- * Creates a function that accepts up to `n` arguments, ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @param {number} [n=func.length] The arity cap.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.ary(parseInt, 1));
- * // => [6, 8, 10]
- */
- function ary(func, n, guard) {
- n = guard ? undefined : n;
- n = (func && n == null) ? func.length : n;
- return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
- }
-
- /**
- * Creates a function that invokes `func`, with the `this` binding and arguments
- * of the created function, while it's called less than `n` times. Subsequent
- * calls to the created function return the result of the last `func` invocation.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {number} n The number of calls at which `func` is no longer invoked.
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * jQuery(element).on('click', _.before(5, addContactToList));
- * // => allows adding up to 4 contacts to the list
- */
- function before(n, func) {
- var result;
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- n = toInteger(n);
- return function() {
- if (--n > 0) {
- result = func.apply(this, arguments);
- }
- if (n <= 1) {
- func = undefined;
- }
- return result;
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of `thisArg`
- * and prepends any additional `_.bind` arguments to those provided to the
- * bound function.
- *
- * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for partially applied arguments.
- *
- * **Note:** Unlike native `Function#bind` this method doesn't set the "length"
- * property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to bind.
- * @param {*} thisArg The `this` binding of `func`.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var greet = function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * };
- *
- * var object = { 'user': 'fred' };
- *
- * var bound = _.bind(greet, object, 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bind(greet, object, _, '!');
- * bound('hi');
- * // => 'hi fred!'
- */
- var bind = rest(function(func, thisArg, partials) {
- var bitmask = BIND_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, getPlaceholder(bind));
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(func, bitmask, thisArg, partials, holders);
- });
-
- /**
- * Creates a function that invokes the method at `object[key]` and prepends
- * any additional `_.bindKey` arguments to those provided to the bound function.
- *
- * This method differs from `_.bind` by allowing bound functions to reference
- * methods that may be redefined or don't yet exist.
- * See [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
- * for more details.
- *
- * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Object} object The object to invoke the method on.
- * @param {string} key The key of the method.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new bound function.
- * @example
- *
- * var object = {
- * 'user': 'fred',
- * 'greet': function(greeting, punctuation) {
- * return greeting + ' ' + this.user + punctuation;
- * }
- * };
- *
- * var bound = _.bindKey(object, 'greet', 'hi');
- * bound('!');
- * // => 'hi fred!'
- *
- * object.greet = function(greeting, punctuation) {
- * return greeting + 'ya ' + this.user + punctuation;
- * };
- *
- * bound('!');
- * // => 'hiya fred!'
- *
- * // Bound with placeholders.
- * var bound = _.bindKey(object, 'greet', _, '!');
- * bound('hi');
- * // => 'hiya fred!'
- */
- var bindKey = rest(function(object, key, partials) {
- var bitmask = BIND_FLAG | BIND_KEY_FLAG;
- if (partials.length) {
- var holders = replaceHolders(partials, getPlaceholder(bindKey));
- bitmask |= PARTIAL_FLAG;
- }
- return createWrapper(key, bitmask, object, partials, holders);
- });
-
- /**
- * Creates a function that accepts arguments of `func` and either invokes
- * `func` returning its result, if at least `arity` number of arguments have
- * been provided, or returns a function that accepts the remaining `func`
- * arguments, and so on. The arity of `func` may be specified if `func.length`
- * is not sufficient.
- *
- * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
- * may be used as a placeholder for provided arguments.
- *
- * **Note:** This method doesn't set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curry(abc);
- *
- * curried(1)(2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2)(3);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // Curried with placeholders.
- * curried(1)(_, 3)(2);
- * // => [1, 2, 3]
- */
- function curry(func, arity, guard) {
- arity = guard ? undefined : arity;
- var result = createWrapper(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curry.placeholder;
- return result;
- }
-
- /**
- * This method is like `_.curry` except that arguments are applied to `func`
- * in the manner of `_.partialRight` instead of `_.partial`.
- *
- * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for provided arguments.
- *
- * **Note:** This method doesn't set the "length" property of curried functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to curry.
- * @param {number} [arity=func.length] The arity of `func`.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Function} Returns the new curried function.
- * @example
- *
- * var abc = function(a, b, c) {
- * return [a, b, c];
- * };
- *
- * var curried = _.curryRight(abc);
- *
- * curried(3)(2)(1);
- * // => [1, 2, 3]
- *
- * curried(2, 3)(1);
- * // => [1, 2, 3]
- *
- * curried(1, 2, 3);
- * // => [1, 2, 3]
- *
- * // Curried with placeholders.
- * curried(3)(1, _)(2);
- * // => [1, 2, 3]
- */
- function curryRight(func, arity, guard) {
- arity = guard ? undefined : arity;
- var result = createWrapper(func, CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
- result.placeholder = curryRight.placeholder;
- return result;
- }
-
- /**
- * Creates a debounced function that delays invoking `func` until after `wait`
- * milliseconds have elapsed since the last time the debounced function was
- * invoked. The debounced function comes with a `cancel` method to cancel
- * delayed `func` invocations and a `flush` method to immediately invoke them.
- * Provide an options object to indicate whether `func` should be invoked on
- * the leading and/or trailing edge of the `wait` timeout. The `func` is invoked
- * with the last arguments provided to the debounced function. Subsequent calls
- * to the debounced function return the result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the debounced function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.debounce` and `_.throttle`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to debounce.
- * @param {number} [wait=0] The number of milliseconds to delay.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=false] Specify invoking on the leading
- * edge of the timeout.
- * @param {number} [options.maxWait] The maximum time `func` is allowed to be
- * delayed before it's invoked.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new debounced function.
- * @example
- *
- * // Avoid costly calculations while the window size is in flux.
- * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
- *
- * // Invoke `sendMail` when clicked, debouncing subsequent calls.
- * jQuery(element).on('click', _.debounce(sendMail, 300, {
- * 'leading': true,
- * 'trailing': false
- * }));
- *
- * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
- * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
- * var source = new EventSource('/stream');
- * jQuery(source).on('message', debounced);
- *
- * // Cancel the trailing debounced invocation.
- * jQuery(window).on('popstate', debounced.cancel);
- */
- function debounce(func, wait, options) {
- var args,
- maxTimeoutId,
- result,
- stamp,
- thisArg,
- timeoutId,
- trailingCall,
- lastCalled = 0,
- leading = false,
- maxWait = false,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- wait = toNumber(wait) || 0;
- if (isObject(options)) {
- leading = !!options.leading;
- maxWait = 'maxWait' in options && nativeMax(toNumber(options.maxWait) || 0, wait);
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
-
- function cancel() {
- if (timeoutId) {
- clearTimeout(timeoutId);
- }
- if (maxTimeoutId) {
- clearTimeout(maxTimeoutId);
- }
- lastCalled = 0;
- args = maxTimeoutId = thisArg = timeoutId = trailingCall = undefined;
- }
-
- function complete(isCalled, id) {
- if (id) {
- clearTimeout(id);
- }
- maxTimeoutId = timeoutId = trailingCall = undefined;
- if (isCalled) {
- lastCalled = now();
- result = func.apply(thisArg, args);
- if (!timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- }
- }
-
- function delayed() {
- var remaining = wait - (now() - stamp);
- if (remaining <= 0 || remaining > wait) {
- complete(trailingCall, maxTimeoutId);
- } else {
- timeoutId = setTimeout(delayed, remaining);
- }
- }
-
- function flush() {
- if ((timeoutId && trailingCall) || (maxTimeoutId && trailing)) {
- result = func.apply(thisArg, args);
- }
- cancel();
- return result;
- }
-
- function maxDelayed() {
- complete(trailing, timeoutId);
- }
-
- function debounced() {
- args = arguments;
- stamp = now();
- thisArg = this;
- trailingCall = trailing && (timeoutId || !leading);
-
- if (maxWait === false) {
- var leadingCall = leading && !timeoutId;
- } else {
- if (!lastCalled && !maxTimeoutId && !leading) {
- lastCalled = stamp;
- }
- var remaining = maxWait - (stamp - lastCalled);
-
- var isCalled = (remaining <= 0 || remaining > maxWait) &&
- (leading || maxTimeoutId);
-
- if (isCalled) {
- if (maxTimeoutId) {
- maxTimeoutId = clearTimeout(maxTimeoutId);
- }
- lastCalled = stamp;
- result = func.apply(thisArg, args);
- }
- else if (!maxTimeoutId) {
- maxTimeoutId = setTimeout(maxDelayed, remaining);
- }
- }
- if (isCalled && timeoutId) {
- timeoutId = clearTimeout(timeoutId);
- }
- else if (!timeoutId && wait !== maxWait) {
- timeoutId = setTimeout(delayed, wait);
- }
- if (leadingCall) {
- isCalled = true;
- result = func.apply(thisArg, args);
- }
- if (isCalled && !timeoutId && !maxTimeoutId) {
- args = thisArg = undefined;
- }
- return result;
- }
- debounced.cancel = cancel;
- debounced.flush = flush;
- return debounced;
- }
-
- /**
- * Defers invoking the `func` until the current call stack has cleared. Any
- * additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to defer.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.defer(function(text) {
- * console.log(text);
- * }, 'deferred');
- * // => logs 'deferred' after one or more milliseconds
- */
- var defer = rest(function(func, args) {
- return baseDelay(func, 1, args);
- });
-
- /**
- * Invokes `func` after `wait` milliseconds. Any additional arguments are
- * provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to delay.
- * @param {number} wait The number of milliseconds to delay invocation.
- * @param {...*} [args] The arguments to invoke `func` with.
- * @returns {number} Returns the timer id.
- * @example
- *
- * _.delay(function(text) {
- * console.log(text);
- * }, 1000, 'later');
- * // => logs 'later' after one second
- */
- var delay = rest(function(func, wait, args) {
- return baseDelay(func, toNumber(wait) || 0, args);
- });
-
- /**
- * Creates a function that invokes `func` with arguments reversed.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to flip arguments for.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var flipped = _.flip(function() {
- * return _.toArray(arguments);
- * });
- *
- * flipped('a', 'b', 'c', 'd');
- * // => ['d', 'c', 'b', 'a']
- */
- function flip(func) {
- return createWrapper(func, FLIP_FLAG);
- }
-
- /**
- * Creates a function that memoizes the result of `func`. If `resolver` is
- * provided it determines the cache key for storing the result based on the
- * arguments provided to the memoized function. By default, the first argument
- * provided to the memoized function is used as the map cache key. The `func`
- * is invoked with the `this` binding of the memoized function.
- *
- * **Note:** The cache is exposed as the `cache` property on the memoized
- * function. Its creation may be customized by replacing the `_.memoize.Cache`
- * constructor with one whose instances implement the [`Map`](http://ecma-international.org/ecma-262/6.0/#sec-properties-of-the-map-prototype-object)
- * method interface of `delete`, `get`, `has`, and `set`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to have its output memoized.
- * @param {Function} [resolver] The function to resolve the cache key.
- * @returns {Function} Returns the new memoizing function.
- * @example
- *
- * var object = { 'a': 1, 'b': 2 };
- * var other = { 'c': 3, 'd': 4 };
- *
- * var values = _.memoize(_.values);
- * values(object);
- * // => [1, 2]
- *
- * values(other);
- * // => [3, 4]
- *
- * object.a = 2;
- * values(object);
- * // => [1, 2]
- *
- * // Modify the result cache.
- * values.cache.set(object, ['a', 'b']);
- * values(object);
- * // => ['a', 'b']
- *
- * // Replace `_.memoize.Cache`.
- * _.memoize.Cache = WeakMap;
- */
- function memoize(func, resolver) {
- if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- var memoized = function() {
- var args = arguments,
- key = resolver ? resolver.apply(this, args) : args[0],
- cache = memoized.cache;
-
- if (cache.has(key)) {
- return cache.get(key);
- }
- var result = func.apply(this, args);
- memoized.cache = cache.set(key, result);
- return result;
- };
- memoized.cache = new memoize.Cache;
- return memoized;
- }
-
- /**
- * Creates a function that negates the result of the predicate `func`. The
- * `func` predicate is invoked with the `this` binding and arguments of the
- * created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} predicate The predicate to negate.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function isEven(n) {
- * return n % 2 == 0;
- * }
- *
- * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
- * // => [1, 3, 5]
- */
- function negate(predicate) {
- if (typeof predicate != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return function() {
- return !predicate.apply(this, arguments);
- };
- }
-
- /**
- * Creates a function that is restricted to invoking `func` once. Repeat calls
- * to the function return the value of the first invocation. The `func` is
- * invoked with the `this` binding and arguments of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to restrict.
- * @returns {Function} Returns the new restricted function.
- * @example
- *
- * var initialize = _.once(createApplication);
- * initialize();
- * initialize();
- * // `initialize` invokes `createApplication` once
- */
- function once(func) {
- return before(2, func);
- }
-
- /**
- * Creates a function that invokes `func` with arguments transformed by
- * corresponding `transforms`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to wrap.
- * @param {...(Function|Function[])} [transforms] The functions to transform
- * arguments, specified individually or in arrays.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function doubled(n) {
- * return n * 2;
- * }
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var func = _.overArgs(function(x, y) {
- * return [x, y];
- * }, square, doubled);
- *
- * func(9, 3);
- * // => [81, 6]
- *
- * func(10, 5);
- * // => [100, 10]
- */
- var overArgs = rest(function(func, transforms) {
- transforms = arrayMap(baseFlatten(transforms, 1), getIteratee());
-
- var funcsLength = transforms.length;
- return rest(function(args) {
- var index = -1,
- length = nativeMin(args.length, funcsLength);
-
- while (++index < length) {
- args[index] = transforms[index].call(this, args[index]);
- }
- return apply(func, this, args);
- });
- });
-
- /**
- * Creates a function that invokes `func` with `partial` arguments prepended
- * to those provided to the new function. This method is like `_.bind` except
- * it does **not** alter the `this` binding.
- *
- * The `_.partial.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method doesn't set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var sayHelloTo = _.partial(greet, 'hello');
- * sayHelloTo('fred');
- * // => 'hello fred'
- *
- * // Partially applied with placeholders.
- * var greetFred = _.partial(greet, _, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- */
- var partial = rest(function(func, partials) {
- var holders = replaceHolders(partials, getPlaceholder(partial));
- return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
- });
-
- /**
- * This method is like `_.partial` except that partially applied arguments
- * are appended to those provided to the new function.
- *
- * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
- * builds, may be used as a placeholder for partially applied arguments.
- *
- * **Note:** This method doesn't set the "length" property of partially
- * applied functions.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to partially apply arguments to.
- * @param {...*} [partials] The arguments to be partially applied.
- * @returns {Function} Returns the new partially applied function.
- * @example
- *
- * var greet = function(greeting, name) {
- * return greeting + ' ' + name;
- * };
- *
- * var greetFred = _.partialRight(greet, 'fred');
- * greetFred('hi');
- * // => 'hi fred'
- *
- * // Partially applied with placeholders.
- * var sayHelloTo = _.partialRight(greet, 'hello', _);
- * sayHelloTo('fred');
- * // => 'hello fred'
- */
- var partialRight = rest(function(func, partials) {
- var holders = replaceHolders(partials, getPlaceholder(partialRight));
- return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
- });
-
- /**
- * Creates a function that invokes `func` with arguments arranged according
- * to the specified indexes where the argument value at the first index is
- * provided as the first argument, the argument value at the second index is
- * provided as the second argument, and so on.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to rearrange arguments for.
- * @param {...(number|number[])} indexes The arranged argument indexes,
- * specified individually or in arrays.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var rearged = _.rearg(function(a, b, c) {
- * return [a, b, c];
- * }, 2, 0, 1);
- *
- * rearged('b', 'c', 'a')
- * // => ['a', 'b', 'c']
- */
- var rearg = rest(function(func, indexes) {
- return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes, 1));
- });
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the
- * created function and arguments from `start` and beyond provided as an array.
- *
- * **Note:** This method is based on the [rest parameter](https://mdn.io/rest_parameters).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to apply a rest parameter to.
- * @param {number} [start=func.length-1] The start position of the rest parameter.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.rest(function(what, names) {
- * return what + ' ' + _.initial(names).join(', ') +
- * (_.size(names) > 1 ? ', & ' : '') + _.last(names);
- * });
- *
- * say('hello', 'fred', 'barney', 'pebbles');
- * // => 'hello fred, barney, & pebbles'
- */
- function rest(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);
- return function() {
- var args = arguments,
- index = -1,
- length = nativeMax(args.length - start, 0),
- array = Array(length);
-
- while (++index < length) {
- array[index] = args[start + index];
- }
- switch (start) {
- case 0: return func.call(this, array);
- case 1: return func.call(this, args[0], array);
- case 2: return func.call(this, args[0], args[1], array);
- }
- var otherArgs = Array(start + 1);
- index = -1;
- while (++index < start) {
- otherArgs[index] = args[index];
- }
- otherArgs[start] = array;
- return apply(func, this, otherArgs);
- };
- }
-
- /**
- * Creates a function that invokes `func` with the `this` binding of the created
- * function and an array of arguments much like [`Function#apply`](https://es5.github.io/#x15.3.4.3).
- *
- * **Note:** This method is based on the [spread operator](https://mdn.io/spread_operator).
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to spread arguments over.
- * @param {number} [start=0] The start position of the spread.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var say = _.spread(function(who, what) {
- * return who + ' says ' + what;
- * });
- *
- * say(['fred', 'hello']);
- * // => 'fred says hello'
- *
- * var numbers = Promise.all([
- * Promise.resolve(40),
- * Promise.resolve(36)
- * ]);
- *
- * numbers.then(_.spread(function(x, y) {
- * return x + y;
- * }));
- * // => a Promise of 76
- */
- function spread(func, start) {
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- start = start === undefined ? 0 : nativeMax(toInteger(start), 0);
- return rest(function(args) {
- var array = args[start],
- otherArgs = args.slice(0, start);
-
- if (array) {
- arrayPush(otherArgs, array);
- }
- return apply(func, this, otherArgs);
- });
- }
-
- /**
- * Creates a throttled function that only invokes `func` at most once per
- * every `wait` milliseconds. The throttled function comes with a `cancel`
- * method to cancel delayed `func` invocations and a `flush` method to
- * immediately invoke them. Provide an options object to indicate whether
- * `func` should be invoked on the leading and/or trailing edge of the `wait`
- * timeout. The `func` is invoked with the last arguments provided to the
- * throttled function. Subsequent calls to the throttled function return the
- * result of the last `func` invocation.
- *
- * **Note:** If `leading` and `trailing` options are `true`, `func` is invoked
- * on the trailing edge of the timeout only if the throttled function is
- * invoked more than once during the `wait` timeout.
- *
- * See [David Corbacho's article](http://drupalmotion.com/article/debounce-and-throttle-visual-explanation)
- * for details over the differences between `_.throttle` and `_.debounce`.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to throttle.
- * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.leading=true] Specify invoking on the leading
- * edge of the timeout.
- * @param {boolean} [options.trailing=true] Specify invoking on the trailing
- * edge of the timeout.
- * @returns {Function} Returns the new throttled function.
- * @example
- *
- * // Avoid excessively updating the position while scrolling.
- * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
- *
- * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
- * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
- * jQuery(element).on('click', throttled);
- *
- * // Cancel the trailing throttled invocation.
- * jQuery(window).on('popstate', throttled.cancel);
- */
- function throttle(func, wait, options) {
- var leading = true,
- trailing = true;
-
- if (typeof func != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- if (isObject(options)) {
- leading = 'leading' in options ? !!options.leading : leading;
- trailing = 'trailing' in options ? !!options.trailing : trailing;
- }
- return debounce(func, wait, {
- 'leading': leading,
- 'maxWait': wait,
- 'trailing': trailing
- });
- }
-
- /**
- * Creates a function that accepts up to one argument, ignoring any
- * additional arguments.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {Function} func The function to cap arguments for.
- * @returns {Function} Returns the new function.
- * @example
- *
- * _.map(['6', '8', '10'], _.unary(parseInt));
- * // => [6, 8, 10]
- */
- function unary(func) {
- return ary(func, 1);
- }
-
- /**
- * Creates a function that provides `value` to the wrapper function as its
- * first argument. Any additional arguments provided to the function are
- * appended to those provided to the wrapper function. The wrapper is invoked
- * with the `this` binding of the created function.
- *
- * @static
- * @memberOf _
- * @category Function
- * @param {*} value The value to wrap.
- * @param {Function} [wrapper=identity] The wrapper function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var p = _.wrap(_.escape, function(func, text) {
- * return '<p>' + func(text) + '</p>';
- * });
- *
- * p('fred, barney, & pebbles');
- * // => '<p>fred, barney, &amp; pebbles</p>'
- */
- function wrap(value, wrapper) {
- wrapper = wrapper == null ? identity : wrapper;
- return partial(wrapper, value);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Casts `value` as an array if it's not one.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to inspect.
- * @returns {Array} Returns the cast array.
- * @example
- *
- * _.castArray(1);
- * // => [1]
- *
- * _.castArray({ 'a': 1 });
- * // => [{ 'a': 1 }]
- *
- * _.castArray('abc');
- * // => ['abc']
- *
- * _.castArray(null);
- * // => [null]
- *
- * _.castArray(undefined);
- * // => [undefined]
- *
- * _.castArray();
- * // => []
- *
- * var array = [1, 2, 3];
- * console.log(_.castArray(array) === array);
- * // => true
- */
- function castArray() {
- if (!arguments.length) {
- return [];
- }
- var value = arguments[0];
- return isArray(value) ? value : [value];
- }
-
- /**
- * Creates a shallow clone of `value`.
- *
- * **Note:** This method is loosely based on the
- * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
- * and supports cloning arrays, array buffers, booleans, date objects, maps,
- * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
- * arrays. The own enumerable properties of `arguments` objects are cloned
- * as plain objects. An empty object is returned for uncloneable values such
- * as error objects, functions, DOM nodes, and WeakMaps.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to clone.
- * @returns {*} Returns the cloned value.
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var shallow = _.clone(objects);
- * console.log(shallow[0] === objects[0]);
- * // => true
- */
- function clone(value) {
- return baseClone(value);
- }
-
- /**
- * This method is like `_.clone` except that it accepts `customizer` which
- * is invoked to produce the cloned value. If `customizer` returns `undefined`
- * cloning is handled by the method instead. The `customizer` is invoked with
- * up to four arguments; (value [, index|key, object, stack]).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @returns {*} Returns the cloned value.
- * @example
- *
- * function customizer(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(false);
- * }
- * }
- *
- * var el = _.cloneWith(document.body, customizer);
- *
- * console.log(el === document.body);
- * // => false
- * console.log(el.nodeName);
- * // => 'BODY'
- * console.log(el.childNodes.length);
- * // => 0
- */
- function cloneWith(value, customizer) {
- return baseClone(value, false, customizer);
- }
-
- /**
- * This method is like `_.clone` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @returns {*} Returns the deep cloned value.
- * @example
- *
- * var objects = [{ 'a': 1 }, { 'b': 2 }];
- *
- * var deep = _.cloneDeep(objects);
- * console.log(deep[0] === objects[0]);
- * // => false
- */
- function cloneDeep(value) {
- return baseClone(value, true);
- }
-
- /**
- * This method is like `_.cloneWith` except that it recursively clones `value`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to recursively clone.
- * @param {Function} [customizer] The function to customize cloning.
- * @returns {*} Returns the deep cloned value.
- * @example
- *
- * function customizer(value) {
- * if (_.isElement(value)) {
- * return value.cloneNode(true);
- * }
- * }
- *
- * var el = _.cloneDeepWith(document.body, customizer);
- *
- * console.log(el === document.body);
- * // => false
- * console.log(el.nodeName);
- * // => 'BODY'
- * console.log(el.childNodes.length);
- * // => 20
- */
- function cloneDeepWith(value, customizer) {
- return baseClone(value, true, customizer);
- }
-
- /**
- * Performs a [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
- * comparison between two values to determine if they are equivalent.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * _.eq(object, object);
- * // => true
- *
- * _.eq(object, other);
- * // => false
- *
- * _.eq('a', 'a');
- * // => true
- *
- * _.eq('a', Object('a'));
- * // => false
- *
- * _.eq(NaN, NaN);
- * // => true
- */
- function eq(value, other) {
- return value === other || (value !== value && other !== other);
- }
-
- /**
- * Checks if `value` is greater than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than `other`, else `false`.
- * @example
- *
- * _.gt(3, 1);
- * // => true
- *
- * _.gt(3, 3);
- * // => false
- *
- * _.gt(1, 3);
- * // => false
- */
- function gt(value, other) {
- return value > other;
- }
-
- /**
- * Checks if `value` is greater than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is greater than or equal to `other`, else `false`.
- * @example
- *
- * _.gte(3, 1);
- * // => true
- *
- * _.gte(3, 3);
- * // => true
- *
- * _.gte(1, 3);
- * // => false
- */
- function gte(value, other) {
- return value >= other;
- }
-
- /**
- * Checks if `value` is likely an `arguments` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArguments(function() { return arguments; }());
- * // => true
- *
- * _.isArguments([1, 2, 3]);
- * // => false
- */
- function isArguments(value) {
- // Safari 8.1 incorrectly makes `arguments.callee` enumerable in strict mode.
- return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
- (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
- }
-
- /**
- * Checks if `value` is classified as an `Array` object.
- *
- * @static
- * @memberOf _
- * @type {Function}
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArray([1, 2, 3]);
- * // => true
- *
- * _.isArray(document.body.children);
- * // => false
- *
- * _.isArray('abc');
- * // => false
- *
- * _.isArray(_.noop);
- * // => false
- */
- var isArray = Array.isArray;
-
- /**
- * Checks if `value` is classified as an `ArrayBuffer` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isArrayBuffer(new ArrayBuffer(2));
- * // => true
- *
- * _.isArrayBuffer(new Array(2));
- * // => false
- */
- function isArrayBuffer(value) {
- return isObjectLike(value) && objectToString.call(value) == arrayBufferTag;
- }
-
- /**
- * Checks if `value` is array-like. A value is considered array-like if it's
- * not a function and has a `value.length` that's an integer greater than or
- * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
- * @example
- *
- * _.isArrayLike([1, 2, 3]);
- * // => true
- *
- * _.isArrayLike(document.body.children);
- * // => true
- *
- * _.isArrayLike('abc');
- * // => true
- *
- * _.isArrayLike(_.noop);
- * // => false
- */
- function isArrayLike(value) {
- return value != null &&
- !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
- }
-
- /**
- * This method is like `_.isArrayLike` except that it also checks if `value`
- * is an object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an array-like object, else `false`.
- * @example
- *
- * _.isArrayLikeObject([1, 2, 3]);
- * // => true
- *
- * _.isArrayLikeObject(document.body.children);
- * // => true
- *
- * _.isArrayLikeObject('abc');
- * // => false
- *
- * _.isArrayLikeObject(_.noop);
- * // => false
- */
- function isArrayLikeObject(value) {
- return isObjectLike(value) && isArrayLike(value);
- }
-
- /**
- * Checks if `value` is classified as a boolean primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isBoolean(false);
- * // => true
- *
- * _.isBoolean(null);
- * // => false
- */
- function isBoolean(value) {
- return value === true || value === false ||
- (isObjectLike(value) && objectToString.call(value) == boolTag);
- }
-
- /**
- * Checks if `value` is a buffer.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
- * @example
- *
- * _.isBuffer(new Buffer(2));
- * // => true
- *
- * _.isBuffer(new Uint8Array(2));
- * // => false
- */
- var isBuffer = !Buffer ? constant(false) : function(value) {
- return value instanceof Buffer;
- };
-
- /**
- * Checks if `value` is classified as a `Date` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isDate(new Date);
- * // => true
- *
- * _.isDate('Mon April 23 2012');
- * // => false
- */
- function isDate(value) {
- return isObjectLike(value) && objectToString.call(value) == dateTag;
- }
-
- /**
- * Checks if `value` is likely a DOM element.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
- * @example
- *
- * _.isElement(document.body);
- * // => true
- *
- * _.isElement('<body>');
- * // => false
- */
- function isElement(value) {
- return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
- }
-
- /**
- * Checks if `value` is empty. A value is considered empty unless it's an
- * `arguments` object, array, string, or jQuery-like collection with a length
- * greater than `0` or an object with own enumerable properties.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Array|Object|string} value The value to inspect.
- * @returns {boolean} Returns `true` if `value` is empty, else `false`.
- * @example
- *
- * _.isEmpty(null);
- * // => true
- *
- * _.isEmpty(true);
- * // => true
- *
- * _.isEmpty(1);
- * // => true
- *
- * _.isEmpty([1, 2, 3]);
- * // => false
- *
- * _.isEmpty({ 'a': 1 });
- * // => false
- */
- function isEmpty(value) {
- if (isArrayLike(value) &&
- (isArray(value) || isString(value) ||
- isFunction(value.splice) || isArguments(value))) {
- return !value.length;
- }
- for (var key in value) {
- if (hasOwnProperty.call(value, key)) {
- return false;
- }
- }
- return true;
- }
-
- /**
- * Performs a deep comparison between two values to determine if they are
- * equivalent.
- *
- * **Note:** This method supports comparing arrays, array buffers, booleans,
- * date objects, error objects, maps, numbers, `Object` objects, regexes,
- * sets, strings, symbols, and typed arrays. `Object` objects are compared
- * by their own, not inherited, enumerable properties. Functions and DOM
- * nodes are **not** supported.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var other = { 'user': 'fred' };
- *
- * _.isEqual(object, other);
- * // => true
- *
- * object === other;
- * // => false
- */
- function isEqual(value, other) {
- return baseIsEqual(value, other);
- }
-
- /**
- * This method is like `_.isEqual` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined` comparisons
- * are handled by the method instead. The `customizer` is invoked with up to
- * six arguments: (objValue, othValue [, index|key, object, other, stack]).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, othValue) {
- * if (isGreeting(objValue) && isGreeting(othValue)) {
- * return true;
- * }
- * }
- *
- * var array = ['hello', 'goodbye'];
- * var other = ['hi', 'goodbye'];
- *
- * _.isEqualWith(array, other, customizer);
- * // => true
- */
- function isEqualWith(value, other, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- var result = customizer ? customizer(value, other) : undefined;
- return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
- }
-
- /**
- * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
- * `SyntaxError`, `TypeError`, or `URIError` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
- * @example
- *
- * _.isError(new Error);
- * // => true
- *
- * _.isError(Error);
- * // => false
- */
- function isError(value) {
- if (!isObjectLike(value)) {
- return false;
- }
- return (objectToString.call(value) == errorTag) ||
- (typeof value.message == 'string' && typeof value.name == 'string');
- }
-
- /**
- * Checks if `value` is a finite primitive number.
- *
- * **Note:** This method is based on [`Number.isFinite`](https://mdn.io/Number/isFinite).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
- * @example
- *
- * _.isFinite(3);
- * // => true
- *
- * _.isFinite(Number.MAX_VALUE);
- * // => true
- *
- * _.isFinite(3.14);
- * // => true
- *
- * _.isFinite(Infinity);
- * // => false
- */
- function isFinite(value) {
- return typeof value == 'number' && nativeIsFinite(value);
- }
-
- /**
- * Checks if `value` is classified as a `Function` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isFunction(_);
- * // => true
- *
- * _.isFunction(/abc/);
- * // => false
- */
- function isFunction(value) {
- // The use of `Object#toString` avoids issues with the `typeof` operator
- // in Safari 8 which returns 'object' for typed array constructors, and
- // PhantomJS 1.9 which returns 'function' for `NodeList` instances.
- var tag = isObject(value) ? objectToString.call(value) : '';
- return tag == funcTag || tag == genTag;
- }
-
- /**
- * Checks if `value` is an integer.
- *
- * **Note:** This method is based on [`Number.isInteger`](https://mdn.io/Number/isInteger).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
- * @example
- *
- * _.isInteger(3);
- * // => true
- *
- * _.isInteger(Number.MIN_VALUE);
- * // => false
- *
- * _.isInteger(Infinity);
- * // => false
- *
- * _.isInteger('3');
- * // => false
- */
- function isInteger(value) {
- return typeof value == 'number' && value == toInteger(value);
- }
-
- /**
- * Checks if `value` is a valid array-like length.
- *
- * **Note:** This function is loosely based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
- * @example
- *
- * _.isLength(3);
- * // => true
- *
- * _.isLength(Number.MIN_VALUE);
- * // => false
- *
- * _.isLength(Infinity);
- * // => false
- *
- * _.isLength('3');
- * // => false
- */
- function isLength(value) {
- return typeof value == 'number' &&
- value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
- * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
- * @example
- *
- * _.isObject({});
- * // => true
- *
- * _.isObject([1, 2, 3]);
- * // => true
- *
- * _.isObject(_.noop);
- * // => true
- *
- * _.isObject(null);
- * // => false
- */
- function isObject(value) {
- var type = typeof value;
- return !!value && (type == 'object' || type == 'function');
- }
-
- /**
- * Checks if `value` is object-like. A value is object-like if it's not `null`
- * and has a `typeof` result of "object".
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
- * @example
- *
- * _.isObjectLike({});
- * // => true
- *
- * _.isObjectLike([1, 2, 3]);
- * // => true
- *
- * _.isObjectLike(_.noop);
- * // => false
- *
- * _.isObjectLike(null);
- * // => false
- */
- function isObjectLike(value) {
- return !!value && typeof value == 'object';
- }
-
- /**
- * Checks if `value` is classified as a `Map` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isMap(new Map);
- * // => true
- *
- * _.isMap(new WeakMap);
- * // => false
- */
- function isMap(value) {
- return isObjectLike(value) && getTag(value) == mapTag;
- }
-
- /**
- * Performs a partial deep comparison between `object` and `source` to
- * determine if `object` contains equivalent property values. This method is
- * equivalent to a `_.matches` function when `source` is partially applied.
- *
- * **Note:** This method supports comparing the same values as `_.isEqual`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * var object = { 'user': 'fred', 'age': 40 };
- *
- * _.isMatch(object, { 'age': 40 });
- * // => true
- *
- * _.isMatch(object, { 'age': 36 });
- * // => false
- */
- function isMatch(object, source) {
- return object === source || baseIsMatch(object, source, getMatchData(source));
- }
-
- /**
- * This method is like `_.isMatch` except that it accepts `customizer` which
- * is invoked to compare values. If `customizer` returns `undefined` comparisons
- * are handled by the method instead. The `customizer` is invoked with five
- * arguments: (objValue, srcValue, index|key, object, source).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {Object} object The object to inspect.
- * @param {Object} source The object of property values to match.
- * @param {Function} [customizer] The function to customize comparisons.
- * @returns {boolean} Returns `true` if `object` is a match, else `false`.
- * @example
- *
- * function isGreeting(value) {
- * return /^h(?:i|ello)$/.test(value);
- * }
- *
- * function customizer(objValue, srcValue) {
- * if (isGreeting(objValue) && isGreeting(srcValue)) {
- * return true;
- * }
- * }
- *
- * var object = { 'greeting': 'hello' };
- * var source = { 'greeting': 'hi' };
- *
- * _.isMatchWith(object, source, customizer);
- * // => true
- */
- function isMatchWith(object, source, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return baseIsMatch(object, source, getMatchData(source), customizer);
- }
-
- /**
- * Checks if `value` is `NaN`.
- *
- * **Note:** This method is not the same as [`isNaN`](https://es5.github.io/#x15.1.2.4)
- * which returns `true` for `undefined` and other non-numeric values.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
- * @example
- *
- * _.isNaN(NaN);
- * // => true
- *
- * _.isNaN(new Number(NaN));
- * // => true
- *
- * isNaN(undefined);
- * // => true
- *
- * _.isNaN(undefined);
- * // => false
- */
- function isNaN(value) {
- // An `NaN` primitive is the only value that is not equal to itself.
- // Perform the `toStringTag` check first to avoid errors with some ActiveX objects in IE.
- return isNumber(value) && value != +value;
- }
-
- /**
- * Checks if `value` is a native function.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a native function, else `false`.
- * @example
- *
- * _.isNative(Array.prototype.push);
- * // => true
- *
- * _.isNative(_);
- * // => false
- */
- function isNative(value) {
- if (value == null) {
- return false;
- }
- if (isFunction(value)) {
- return reIsNative.test(funcToString.call(value));
- }
- return isObjectLike(value) &&
- (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);
- }
-
- /**
- * Checks if `value` is `null`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
- * @example
- *
- * _.isNull(null);
- * // => true
- *
- * _.isNull(void 0);
- * // => false
- */
- function isNull(value) {
- return value === null;
- }
-
- /**
- * Checks if `value` is `null` or `undefined`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
- * @example
- *
- * _.isNil(null);
- * // => true
- *
- * _.isNil(void 0);
- * // => true
- *
- * _.isNil(NaN);
- * // => false
- */
- function isNil(value) {
- return value == null;
- }
-
- /**
- * Checks if `value` is classified as a `Number` primitive or object.
- *
- * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are classified
- * as numbers, use the `_.isFinite` method.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isNumber(3);
- * // => true
- *
- * _.isNumber(Number.MIN_VALUE);
- * // => true
- *
- * _.isNumber(Infinity);
- * // => true
- *
- * _.isNumber('3');
- * // => false
- */
- function isNumber(value) {
- return typeof value == 'number' ||
- (isObjectLike(value) && objectToString.call(value) == numberTag);
- }
-
- /**
- * Checks if `value` is a plain object, that is, an object created by the
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * }
- *
- * _.isPlainObject(new Foo);
- * // => false
- *
- * _.isPlainObject([1, 2, 3]);
- * // => false
- *
- * _.isPlainObject({ 'x': 0, 'y': 0 });
- * // => true
- *
- * _.isPlainObject(Object.create(null));
- * // => true
- */
- function isPlainObject(value) {
- if (!isObjectLike(value) ||
- objectToString.call(value) != objectTag || isHostObject(value)) {
- return false;
- }
- var proto = getPrototypeOf(value);
- if (proto === null) {
- return true;
- }
- var Ctor = proto.constructor;
- return (typeof Ctor == 'function' &&
- Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
- }
-
- /**
- * Checks if `value` is classified as a `RegExp` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isRegExp(/abc/);
- * // => true
- *
- * _.isRegExp('/abc/');
- * // => false
- */
- function isRegExp(value) {
- return isObject(value) && objectToString.call(value) == regexpTag;
- }
-
- /**
- * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
- * double precision number which isn't the result of a rounded unsafe integer.
- *
- * **Note:** This method is based on [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
- * @example
- *
- * _.isSafeInteger(3);
- * // => true
- *
- * _.isSafeInteger(Number.MIN_VALUE);
- * // => false
- *
- * _.isSafeInteger(Infinity);
- * // => false
- *
- * _.isSafeInteger('3');
- * // => false
- */
- function isSafeInteger(value) {
- return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
- }
-
- /**
- * Checks if `value` is classified as a `Set` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isSet(new Set);
- * // => true
- *
- * _.isSet(new WeakSet);
- * // => false
- */
- function isSet(value) {
- return isObjectLike(value) && getTag(value) == setTag;
- }
-
- /**
- * Checks if `value` is classified as a `String` primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isString('abc');
- * // => true
- *
- * _.isString(1);
- * // => false
- */
- function isString(value) {
- return typeof value == 'string' ||
- (!isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag);
- }
-
- /**
- * Checks if `value` is classified as a `Symbol` primitive or object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isSymbol(Symbol.iterator);
- * // => true
- *
- * _.isSymbol('abc');
- * // => false
- */
- function isSymbol(value) {
- return typeof value == 'symbol' ||
- (isObjectLike(value) && objectToString.call(value) == symbolTag);
- }
-
- /**
- * Checks if `value` is classified as a typed array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isTypedArray(new Uint8Array);
- * // => true
- *
- * _.isTypedArray([]);
- * // => false
- */
- function isTypedArray(value) {
- return isObjectLike(value) &&
- isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
- }
-
- /**
- * Checks if `value` is `undefined`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
- * @example
- *
- * _.isUndefined(void 0);
- * // => true
- *
- * _.isUndefined(null);
- * // => false
- */
- function isUndefined(value) {
- return value === undefined;
- }
-
- /**
- * Checks if `value` is classified as a `WeakMap` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isWeakMap(new WeakMap);
- * // => true
- *
- * _.isWeakMap(new Map);
- * // => false
- */
- function isWeakMap(value) {
- return isObjectLike(value) && getTag(value) == weakMapTag;
- }
-
- /**
- * Checks if `value` is classified as a `WeakSet` object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to check.
- * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
- * @example
- *
- * _.isWeakSet(new WeakSet);
- * // => true
- *
- * _.isWeakSet(new Set);
- * // => false
- */
- function isWeakSet(value) {
- return isObjectLike(value) && objectToString.call(value) == weakSetTag;
- }
-
- /**
- * Checks if `value` is less than `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than `other`, else `false`.
- * @example
- *
- * _.lt(1, 3);
- * // => true
- *
- * _.lt(3, 3);
- * // => false
- *
- * _.lt(3, 1);
- * // => false
- */
- function lt(value, other) {
- return value < other;
- }
-
- /**
- * Checks if `value` is less than or equal to `other`.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to compare.
- * @param {*} other The other value to compare.
- * @returns {boolean} Returns `true` if `value` is less than or equal to `other`, else `false`.
- * @example
- *
- * _.lte(1, 3);
- * // => true
- *
- * _.lte(3, 3);
- * // => true
- *
- * _.lte(3, 1);
- * // => false
- */
- function lte(value, other) {
- return value <= other;
- }
-
- /**
- * Converts `value` to an array.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Array} Returns the converted array.
- * @example
- *
- * _.toArray({ 'a': 1, 'b': 2 });
- * // => [1, 2]
- *
- * _.toArray('abc');
- * // => ['a', 'b', 'c']
- *
- * _.toArray(1);
- * // => []
- *
- * _.toArray(null);
- * // => []
- */
- function toArray(value) {
- if (!value) {
- return [];
- }
- if (isArrayLike(value)) {
- return isString(value) ? stringToArray(value) : copyArray(value);
- }
- if (iteratorSymbol && value[iteratorSymbol]) {
- return iteratorToArray(value[iteratorSymbol]());
- }
- var tag = getTag(value),
- func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
-
- return func(value);
- }
-
- /**
- * Converts `value` to an integer.
- *
- * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toInteger(3);
- * // => 3
- *
- * _.toInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toInteger(Infinity);
- * // => 1.7976931348623157e+308
- *
- * _.toInteger('3');
- * // => 3
- */
- function toInteger(value) {
- if (!value) {
- return value === 0 ? value : 0;
- }
- value = toNumber(value);
- if (value === INFINITY || value === -INFINITY) {
- var sign = (value < 0 ? -1 : 1);
- return sign * MAX_INTEGER;
- }
- var remainder = value % 1;
- return value === value ? (remainder ? value - remainder : value) : 0;
- }
-
- /**
- * Converts `value` to an integer suitable for use as the length of an
- * array-like object.
- *
- * **Note:** This method is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toLength(3);
- * // => 3
- *
- * _.toLength(Number.MIN_VALUE);
- * // => 0
- *
- * _.toLength(Infinity);
- * // => 4294967295
- *
- * _.toLength('3');
- * // => 3
- */
- function toLength(value) {
- return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
- }
-
- /**
- * Converts `value` to a number.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to process.
- * @returns {number} Returns the number.
- * @example
- *
- * _.toNumber(3);
- * // => 3
- *
- * _.toNumber(Number.MIN_VALUE);
- * // => 5e-324
- *
- * _.toNumber(Infinity);
- * // => Infinity
- *
- * _.toNumber('3');
- * // => 3
- */
- function toNumber(value) {
- if (isObject(value)) {
- var other = isFunction(value.valueOf) ? value.valueOf() : value;
- value = isObject(other) ? (other + '') : other;
- }
- if (typeof value != 'string') {
- return value === 0 ? value : +value;
- }
- value = value.replace(reTrim, '');
- var isBinary = reIsBinary.test(value);
- return (isBinary || reIsOctal.test(value))
- ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
- : (reIsBadHex.test(value) ? NAN : +value);
- }
-
- /**
- * Converts `value` to a plain object flattening inherited enumerable
- * properties of `value` to own properties of the plain object.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {Object} Returns the converted plain object.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.assign({ 'a': 1 }, new Foo);
- * // => { 'a': 1, 'b': 2 }
- *
- * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
- * // => { 'a': 1, 'b': 2, 'c': 3 }
- */
- function toPlainObject(value) {
- return copyObject(value, keysIn(value));
- }
-
- /**
- * Converts `value` to a safe integer. A safe integer can be compared and
- * represented correctly.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to convert.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.toSafeInteger(3);
- * // => 3
- *
- * _.toSafeInteger(Number.MIN_VALUE);
- * // => 0
- *
- * _.toSafeInteger(Infinity);
- * // => 9007199254740991
- *
- * _.toSafeInteger('3');
- * // => 3
- */
- function toSafeInteger(value) {
- return baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER);
- }
-
- /**
- * Converts `value` to a string if it's not one. An empty string is returned
- * for `null` and `undefined` values. The sign of `-0` is preserved.
- *
- * @static
- * @memberOf _
- * @category Lang
- * @param {*} value The value to process.
- * @returns {string} Returns the string.
- * @example
- *
- * _.toString(null);
- * // => ''
- *
- * _.toString(-0);
- * // => '-0'
- *
- * _.toString([1, 2, 3]);
- * // => '1,2,3'
- */
- function toString(value) {
- // Exit early for strings to avoid a performance hit in some environments.
- if (typeof value == 'string') {
- return value;
- }
- if (value == null) {
- return '';
- }
- if (isSymbol(value)) {
- return Symbol ? symbolToString.call(value) : '';
- }
- var result = (value + '');
- return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Assigns own enumerable properties of source objects to the destination
- * object. Source objects are applied from left to right. Subsequent sources
- * overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object` and is loosely based on
- * [`Object.assign`](https://mdn.io/Object/assign).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.c = 3;
- * }
- *
- * function Bar() {
- * this.e = 5;
- * }
- *
- * Foo.prototype.d = 4;
- * Bar.prototype.f = 6;
- *
- * _.assign({ 'a': 1 }, new Foo, new Bar);
- * // => { 'a': 1, 'c': 3, 'e': 5 }
- */
- var assign = createAssigner(function(object, source) {
- copyObject(source, keys(source), object);
- });
-
- /**
- * This method is like `_.assign` except that it iterates over own and
- * inherited source properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @alias extend
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.b = 2;
- * }
- *
- * function Bar() {
- * this.d = 4;
- * }
- *
- * Foo.prototype.c = 3;
- * Bar.prototype.e = 5;
- *
- * _.assignIn({ 'a': 1 }, new Foo, new Bar);
- * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4, 'e': 5 }
- */
- var assignIn = createAssigner(function(object, source) {
- copyObject(source, keysIn(source), object);
- });
-
- /**
- * This method is like `_.assignIn` except that it accepts `customizer` which
- * is invoked to produce the assigned values. If `customizer` returns `undefined`
- * assignment is handled by the method instead. The `customizer` is invoked
- * with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @alias extendWith
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignInWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObjectWith(source, keysIn(source), object, customizer);
- });
-
- /**
- * This method is like `_.assign` except that it accepts `customizer` which
- * is invoked to produce the assigned values. If `customizer` returns `undefined`
- * assignment is handled by the method instead. The `customizer` is invoked
- * with five arguments: (objValue, srcValue, key, object, source).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * return _.isUndefined(objValue) ? srcValue : objValue;
- * }
- *
- * var defaults = _.partialRight(_.assignWith, customizer);
- *
- * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
- * // => { 'a': 1, 'b': 2 }
- */
- var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
- copyObjectWith(source, keys(source), object, customizer);
- });
-
- /**
- * Creates an array of values corresponding to `paths` of `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {...(string|string[])} [paths] The property paths of elements to pick,
- * specified individually or in arrays.
- * @returns {Array} Returns the new array of picked elements.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
- *
- * _.at(object, ['a[0].b.c', 'a[1]']);
- * // => [3, 4]
- *
- * _.at(['a', 'b', 'c'], 0, 2);
- * // => ['a', 'c']
- */
- var at = rest(function(object, paths) {
- return baseAt(object, baseFlatten(paths, 1));
- });
-
- /**
- * Creates an object that inherits from the `prototype` object. If a `properties`
- * object is given its own enumerable properties are assigned to the created object.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} prototype The object to inherit from.
- * @param {Object} [properties] The properties to assign to the object.
- * @returns {Object} Returns the new object.
- * @example
- *
- * function Shape() {
- * this.x = 0;
- * this.y = 0;
- * }
- *
- * function Circle() {
- * Shape.call(this);
- * }
- *
- * Circle.prototype = _.create(Shape.prototype, {
- * 'constructor': Circle
- * });
- *
- * var circle = new Circle;
- * circle instanceof Circle;
- * // => true
- *
- * circle instanceof Shape;
- * // => true
- */
- function create(prototype, properties) {
- var result = baseCreate(prototype);
- return properties ? baseAssign(result, properties) : result;
- }
-
- /**
- * Assigns own and inherited enumerable properties of source objects to the
- * destination object for all destination properties that resolve to `undefined`.
- * Source objects are applied from left to right. Once a property is set,
- * additional values of the same property are ignored.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' });
- * // => { 'user': 'barney', 'age': 36 }
- */
- var defaults = rest(function(args) {
- args.push(undefined, assignInDefaults);
- return apply(assignInWith, undefined, args);
- });
-
- /**
- * This method is like `_.defaults` except that it recursively assigns
- * default properties.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.defaultsDeep({ 'user': { 'name': 'barney' } }, { 'user': { 'name': 'fred', 'age': 36 } });
- * // => { 'user': { 'name': 'barney', 'age': 36 } }
- *
- */
- var defaultsDeep = rest(function(args) {
- args.push(undefined, mergeDefaults);
- return apply(mergeWith, undefined, args);
- });
-
- /**
- * This method is like `_.find` except that it returns the key of the first
- * element `predicate` returns truthy for instead of the element itself.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findKey(users, function(o) { return o.age < 40; });
- * // => 'barney' (iteration order is not guaranteed)
- *
- * // The `_.matches` iteratee shorthand.
- * _.findKey(users, { 'age': 1, 'active': true });
- * // => 'pebbles'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findKey(users, ['active', false]);
- * // => 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.findKey(users, 'active');
- * // => 'barney'
- */
- function findKey(object, predicate) {
- return baseFind(object, getIteratee(predicate, 3), baseForOwn, true);
- }
-
- /**
- * This method is like `_.findKey` except that it iterates over elements of
- * a collection in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to search.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per iteration.
- * @returns {string|undefined} Returns the key of the matched element, else `undefined`.
- * @example
- *
- * var users = {
- * 'barney': { 'age': 36, 'active': true },
- * 'fred': { 'age': 40, 'active': false },
- * 'pebbles': { 'age': 1, 'active': true }
- * };
- *
- * _.findLastKey(users, function(o) { return o.age < 40; });
- * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
- *
- * // The `_.matches` iteratee shorthand.
- * _.findLastKey(users, { 'age': 36, 'active': true });
- * // => 'barney'
- *
- * // The `_.matchesProperty` iteratee shorthand.
- * _.findLastKey(users, ['active', false]);
- * // => 'fred'
- *
- * // The `_.property` iteratee shorthand.
- * _.findLastKey(users, 'active');
- * // => 'pebbles'
- */
- function findLastKey(object, predicate) {
- return baseFind(object, getIteratee(predicate, 3), baseForOwnRight, true);
- }
-
- /**
- * Iterates over own and inherited enumerable properties of an object invoking
- * `iteratee` for each property. The iteratee is invoked with three arguments:
- * (value, key, object). Iteratee functions may exit iteration early by explicitly
- * returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forIn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a', 'b', then 'c' (iteration order is not guaranteed)
- */
- function forIn(object, iteratee) {
- return object == null
- ? object
- : baseFor(object, baseCastFunction(iteratee), keysIn);
- }
-
- /**
- * This method is like `_.forIn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forInRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'
- */
- function forInRight(object, iteratee) {
- return object == null
- ? object
- : baseForRight(object, baseCastFunction(iteratee), keysIn);
- }
-
- /**
- * Iterates over own enumerable properties of an object invoking `iteratee`
- * for each property. The iteratee is invoked with three arguments:
- * (value, key, object). Iteratee functions may exit iteration early by
- * explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwn(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'a' then 'b' (iteration order is not guaranteed)
- */
- function forOwn(object, iteratee) {
- return object && baseForOwn(object, baseCastFunction(iteratee));
- }
-
- /**
- * This method is like `_.forOwn` except that it iterates over properties of
- * `object` in the opposite order.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.forOwnRight(new Foo, function(value, key) {
- * console.log(key);
- * });
- * // => logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'
- */
- function forOwnRight(object, iteratee) {
- return object && baseForOwnRight(object, baseCastFunction(iteratee));
- }
-
- /**
- * Creates an array of function property names from own enumerable properties
- * of `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functions(new Foo);
- * // => ['a', 'b']
- */
- function functions(object) {
- return object == null ? [] : baseFunctions(object, keys(object));
- }
-
- /**
- * Creates an array of function property names from own and inherited
- * enumerable properties of `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to inspect.
- * @returns {Array} Returns the new array of property names.
- * @example
- *
- * function Foo() {
- * this.a = _.constant('a');
- * this.b = _.constant('b');
- * }
- *
- * Foo.prototype.c = _.constant('c');
- *
- * _.functionsIn(new Foo);
- * // => ['a', 'b', 'c']
- */
- function functionsIn(object) {
- return object == null ? [] : baseFunctions(object, keysIn(object));
- }
-
- /**
- * Gets the value at `path` of `object`. If the resolved value is
- * `undefined` the `defaultValue` is used in its place.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to get.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.get(object, 'a[0].b.c');
- * // => 3
- *
- * _.get(object, ['a', '0', 'b', 'c']);
- * // => 3
- *
- * _.get(object, 'a.b.c', 'default');
- * // => 'default'
- */
- function get(object, path, defaultValue) {
- var result = object == null ? undefined : baseGet(object, path);
- return result === undefined ? defaultValue : result;
- }
-
- /**
- * Checks if `path` is a direct property of `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = { 'a': { 'b': { 'c': 3 } } };
- * var other = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
- *
- * _.has(object, 'a');
- * // => true
- *
- * _.has(object, 'a.b.c');
- * // => true
- *
- * _.has(object, ['a', 'b', 'c']);
- * // => true
- *
- * _.has(other, 'a');
- * // => false
- */
- function has(object, path) {
- return hasPath(object, path, baseHas);
- }
-
- /**
- * Checks if `path` is a direct or inherited property of `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path to check.
- * @returns {boolean} Returns `true` if `path` exists, else `false`.
- * @example
- *
- * var object = _.create({ 'a': _.create({ 'b': _.create({ 'c': 3 }) }) });
- *
- * _.hasIn(object, 'a');
- * // => true
- *
- * _.hasIn(object, 'a.b.c');
- * // => true
- *
- * _.hasIn(object, ['a', 'b', 'c']);
- * // => true
- *
- * _.hasIn(object, 'b');
- * // => false
- */
- function hasIn(object, path) {
- return hasPath(object, path, baseHasIn);
- }
-
- /**
- * Creates an object composed of the inverted keys and values of `object`.
- * If `object` contains duplicate values, subsequent values overwrite property
- * assignments of previous values.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to invert.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invert(object);
- * // => { '1': 'c', '2': 'b' }
- */
- var invert = createInverter(function(result, value, key) {
- result[value] = key;
- }, constant(identity));
-
- /**
- * This method is like `_.invert` except that the inverted object is generated
- * from the results of running each element of `object` through `iteratee`.
- * The corresponding inverted value of each inverted key is an array of keys
- * responsible for generating the inverted value. The iteratee is invoked
- * with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to invert.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {Object} Returns the new inverted object.
- * @example
- *
- * var object = { 'a': 1, 'b': 2, 'c': 1 };
- *
- * _.invertBy(object);
- * // => { '1': ['a', 'c'], '2': ['b'] }
- *
- * _.invertBy(object, function(value) {
- * return 'group' + value;
- * });
- * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
- */
- var invertBy = createInverter(function(result, value, key) {
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- }, getIteratee);
-
- /**
- * Invokes the method at `path` of `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {*} Returns the result of the invoked method.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
- *
- * _.invoke(object, 'a[0].b.c.slice', 1, 3);
- * // => [2, 3]
- */
- var invoke = rest(baseInvoke);
-
- /**
- * Creates an array of the own enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects. See the
- * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)
- * for more details.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keys(new Foo);
- * // => ['a', 'b'] (iteration order is not guaranteed)
- *
- * _.keys('hi');
- * // => ['0', '1']
- */
- function keys(object) {
- var isProto = isPrototype(object);
- if (!(isProto || isArrayLike(object))) {
- return baseKeys(object);
- }
- var indexes = indexKeys(object),
- skipIndexes = !!indexes,
- result = indexes || [],
- length = result.length;
-
- for (var key in object) {
- if (baseHas(object, key) &&
- !(skipIndexes && (key == 'length' || isIndex(key, length))) &&
- !(isProto && key == 'constructor')) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * Creates an array of the own and inherited enumerable property names of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property names.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.keysIn(new Foo);
- * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
- */
- function keysIn(object) {
- var index = -1,
- isProto = isPrototype(object),
- props = baseKeysIn(object),
- propsLength = props.length,
- indexes = indexKeys(object),
- skipIndexes = !!indexes,
- result = indexes || [],
- length = result.length;
-
- while (++index < propsLength) {
- var key = props[index];
- if (!(skipIndexes && (key == 'length' || isIndex(key, length))) &&
- !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
- result.push(key);
- }
- }
- return result;
- }
-
- /**
- * The opposite of `_.mapValues`; this method creates an object with the
- * same values as `object` and keys generated by running each own enumerable
- * property of `object` through `iteratee`. The iteratee is invoked with
- * three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
- * return key + value;
- * });
- * // => { 'a1': 1, 'b2': 2 }
- */
- function mapKeys(object, iteratee) {
- var result = {};
- iteratee = getIteratee(iteratee, 3);
-
- baseForOwn(object, function(value, key, object) {
- result[iteratee(value, key, object)] = value;
- });
- return result;
- }
-
- /**
- * Creates an object with the same keys as `object` and values generated by
- * running each own enumerable property of `object` through `iteratee`. The
- * iteratee is invoked with three arguments: (value, key, object).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Object} Returns the new mapped object.
- * @example
- *
- * var users = {
- * 'fred': { 'user': 'fred', 'age': 40 },
- * 'pebbles': { 'user': 'pebbles', 'age': 1 }
- * };
- *
- * _.mapValues(users, function(o) { return o.age; });
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- *
- * // The `_.property` iteratee shorthand.
- * _.mapValues(users, 'age');
- * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
- */
- function mapValues(object, iteratee) {
- var result = {};
- iteratee = getIteratee(iteratee, 3);
-
- baseForOwn(object, function(value, key, object) {
- result[key] = iteratee(value, key, object);
- });
- return result;
- }
-
- /**
- * Recursively merges own and inherited enumerable properties of source objects
- * into the destination object. Source properties that resolve to `undefined`
- * are skipped if a destination value exists. Array and plain object properties
- * are merged recursively. Other objects and value types are overridden by
- * assignment. Source objects are applied from left to right. Subsequent
- * sources overwrite property assignments of previous sources.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} [sources] The source objects.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var users = {
- * 'data': [{ 'user': 'barney' }, { 'user': 'fred' }]
- * };
- *
- * var ages = {
- * 'data': [{ 'age': 36 }, { 'age': 40 }]
- * };
- *
- * _.merge(users, ages);
- * // => { 'data': [{ 'user': 'barney', 'age': 36 }, { 'user': 'fred', 'age': 40 }] }
- */
- var merge = createAssigner(function(object, source, srcIndex) {
- baseMerge(object, source, srcIndex);
- });
-
- /**
- * This method is like `_.merge` except that it accepts `customizer` which
- * is invoked to produce the merged values of the destination and source
- * properties. If `customizer` returns `undefined` merging is handled by the
- * method instead. The `customizer` is invoked with seven arguments:
- * (objValue, srcValue, key, object, source, stack).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The destination object.
- * @param {...Object} sources The source objects.
- * @param {Function} customizer The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * function customizer(objValue, srcValue) {
- * if (_.isArray(objValue)) {
- * return objValue.concat(srcValue);
- * }
- * }
- *
- * var object = {
- * 'fruits': ['apple'],
- * 'vegetables': ['beet']
- * };
- *
- * var other = {
- * 'fruits': ['banana'],
- * 'vegetables': ['carrot']
- * };
- *
- * _.mergeWith(object, other, customizer);
- * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot'] }
- */
- var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
- baseMerge(object, source, srcIndex, customizer);
- });
-
- /**
- * The opposite of `_.pick`; this method creates an object composed of the
- * own and inherited enumerable properties of `object` that are not omitted.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [props] The property names to omit, specified
- * individually or in arrays.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omit(object, ['a', 'c']);
- * // => { 'b': '2' }
- */
- var omit = rest(function(object, props) {
- if (object == null) {
- return {};
- }
- props = arrayMap(baseFlatten(props, 1), String);
- return basePick(object, baseDifference(keysIn(object), props));
- });
-
- /**
- * The opposite of `_.pickBy`; this method creates an object composed of
- * the own and inherited enumerable properties of `object` that `predicate`
- * doesn't return truthy for. The predicate is invoked with two arguments:
- * (value, key).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.omitBy(object, _.isNumber);
- * // => { 'b': '2' }
- */
- function omitBy(object, predicate) {
- predicate = getIteratee(predicate);
- return basePickBy(object, function(value, key) {
- return !predicate(value, key);
- });
- }
-
- /**
- * Creates an object composed of the picked `object` properties.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {...(string|string[])} [props] The property names to pick, specified
- * individually or in arrays.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pick(object, ['a', 'c']);
- * // => { 'a': 1, 'c': 3 }
- */
- var pick = rest(function(object, props) {
- return object == null ? {} : basePick(object, baseFlatten(props, 1));
- });
-
- /**
- * Creates an object composed of the `object` properties `predicate` returns
- * truthy for. The predicate is invoked with two arguments: (value, key).
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The source object.
- * @param {Function|Object|string} [predicate=_.identity] The function invoked per property.
- * @returns {Object} Returns the new object.
- * @example
- *
- * var object = { 'a': 1, 'b': '2', 'c': 3 };
- *
- * _.pickBy(object, _.isNumber);
- * // => { 'a': 1, 'c': 3 }
- */
- function pickBy(object, predicate) {
- return object == null ? {} : basePickBy(object, getIteratee(predicate));
- }
-
- /**
- * This method is like `_.get` except that if the resolved value is a function
- * it's invoked with the `this` binding of its parent object and its result
- * is returned.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @param {Array|string} path The path of the property to resolve.
- * @param {*} [defaultValue] The value returned if the resolved value is `undefined`.
- * @returns {*} Returns the resolved value.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
- *
- * _.result(object, 'a[0].b.c1');
- * // => 3
- *
- * _.result(object, 'a[0].b.c2');
- * // => 4
- *
- * _.result(object, 'a[0].b.c3', 'default');
- * // => 'default'
- *
- * _.result(object, 'a[0].b.c3', _.constant('default'));
- * // => 'default'
- */
- function result(object, path, defaultValue) {
- if (!isKey(path, object)) {
- path = baseCastPath(path);
- var result = get(object, path);
- object = parent(object, path);
- } else {
- result = object == null ? undefined : object[path];
- }
- if (result === undefined) {
- result = defaultValue;
- }
- return isFunction(result) ? result.call(object) : result;
- }
-
- /**
- * Sets the value at `path` of `object`. If a portion of `path` doesn't exist
- * it's created. Arrays are created for missing index properties while objects
- * are created for all other missing properties. Use `_.setWith` to customize
- * `path` creation.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 3 } }] };
- *
- * _.set(object, 'a[0].b.c', 4);
- * console.log(object.a[0].b.c);
- * // => 4
- *
- * _.set(object, 'x[0].y.z', 5);
- * console.log(object.x[0].y.z);
- * // => 5
- */
- function set(object, path, value) {
- return object == null ? object : baseSet(object, path, value);
- }
-
- /**
- * This method is like `_.set` except that it accepts `customizer` which is
- * invoked to produce the objects of `path`. If `customizer` returns `undefined`
- * path creation is handled by the method instead. The `customizer` is invoked
- * with three arguments: (nsValue, key, nsObject).
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to set.
- * @param {*} value The value to set.
- * @param {Function} [customizer] The function to customize assigned values.
- * @returns {Object} Returns `object`.
- * @example
- *
- * _.setWith({ '0': { 'length': 2 } }, '[0][1][2]', 3, Object);
- * // => { '0': { '1': { '2': 3 }, 'length': 2 } }
- */
- function setWith(object, path, value, customizer) {
- customizer = typeof customizer == 'function' ? customizer : undefined;
- return object == null ? object : baseSet(object, path, value, customizer);
- }
-
- /**
- * Creates an array of own enumerable key-value pairs for `object` which
- * can be consumed by `_.fromPairs`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.toPairs(new Foo);
- * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
- */
- function toPairs(object) {
- return baseToPairs(object, keys(object));
- }
-
- /**
- * Creates an array of own and inherited enumerable key-value pairs for
- * `object` which can be consumed by `_.fromPairs`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the new array of key-value pairs.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.toPairsIn(new Foo);
- * // => [['a', 1], ['b', 2], ['c', 1]] (iteration order is not guaranteed)
- */
- function toPairsIn(object) {
- return baseToPairs(object, keysIn(object));
- }
-
- /**
- * An alternative to `_.reduce`; this method transforms `object` to a new
- * `accumulator` object which is the result of running each of its own enumerable
- * properties through `iteratee`, with each invocation potentially mutating
- * the `accumulator` object. The iteratee is invoked with four arguments:
- * (accumulator, value, key, object). Iteratee functions may exit iteration
- * early by explicitly returning `false`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Array|Object} object The object to iterate over.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @param {*} [accumulator] The custom accumulator value.
- * @returns {*} Returns the accumulated value.
- * @example
- *
- * _.transform([2, 3, 4], function(result, n) {
- * result.push(n *= n);
- * return n % 2 == 0;
- * }, []);
- * // => [4, 9]
- *
- * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
- * (result[value] || (result[value] = [])).push(key);
- * }, {});
- * // => { '1': ['a', 'c'], '2': ['b'] }
- */
- function transform(object, iteratee, accumulator) {
- var isArr = isArray(object) || isTypedArray(object);
- iteratee = getIteratee(iteratee, 4);
-
- if (accumulator == null) {
- if (isArr || isObject(object)) {
- var Ctor = object.constructor;
- if (isArr) {
- accumulator = isArray(object) ? new Ctor : [];
- } else {
- accumulator = isFunction(Ctor) ? baseCreate(getPrototypeOf(object)) : {};
- }
- } else {
- accumulator = {};
- }
- }
- (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
- return iteratee(accumulator, value, index, object);
- });
- return accumulator;
- }
-
- /**
- * Removes the property at `path` of `object`.
- *
- * **Note:** This method mutates `object`.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to modify.
- * @param {Array|string} path The path of the property to unset.
- * @returns {boolean} Returns `true` if the property is deleted, else `false`.
- * @example
- *
- * var object = { 'a': [{ 'b': { 'c': 7 } }] };
- * _.unset(object, 'a[0].b.c');
- * // => true
- *
- * console.log(object);
- * // => { 'a': [{ 'b': {} }] };
- *
- * _.unset(object, 'a[0].b.c');
- * // => true
- *
- * console.log(object);
- * // => { 'a': [{ 'b': {} }] };
- */
- function unset(object, path) {
- return object == null ? true : baseUnset(object, path);
- }
-
- /**
- * Creates an array of the own enumerable property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.values(new Foo);
- * // => [1, 2] (iteration order is not guaranteed)
- *
- * _.values('hi');
- * // => ['h', 'i']
- */
- function values(object) {
- return object ? baseValues(object, keys(object)) : [];
- }
-
- /**
- * Creates an array of the own and inherited enumerable property values of `object`.
- *
- * **Note:** Non-object values are coerced to objects.
- *
- * @static
- * @memberOf _
- * @category Object
- * @param {Object} object The object to query.
- * @returns {Array} Returns the array of property values.
- * @example
- *
- * function Foo() {
- * this.a = 1;
- * this.b = 2;
- * }
- *
- * Foo.prototype.c = 3;
- *
- * _.valuesIn(new Foo);
- * // => [1, 2, 3] (iteration order is not guaranteed)
- */
- function valuesIn(object) {
- return object == null ? [] : baseValues(object, keysIn(object));
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Clamps `number` within the inclusive `lower` and `upper` bounds.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} number The number to clamp.
- * @param {number} [lower] The lower bound.
- * @param {number} upper The upper bound.
- * @returns {number} Returns the clamped number.
- * @example
- *
- * _.clamp(-10, -5, 5);
- * // => -5
- *
- * _.clamp(10, -5, 5);
- * // => 5
- */
- function clamp(number, lower, upper) {
- if (upper === undefined) {
- upper = lower;
- lower = undefined;
- }
- if (upper !== undefined) {
- upper = toNumber(upper);
- upper = upper === upper ? upper : 0;
- }
- if (lower !== undefined) {
- lower = toNumber(lower);
- lower = lower === lower ? lower : 0;
- }
- return baseClamp(toNumber(number), lower, upper);
- }
-
- /**
- * Checks if `n` is between `start` and up to but not including, `end`. If
- * `end` is not specified it's set to `start` with `start` then set to `0`.
- * If `start` is greater than `end` the params are swapped to support
- * negative ranges.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} number The number to check.
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
- * @example
- *
- * _.inRange(3, 2, 4);
- * // => true
- *
- * _.inRange(4, 8);
- * // => true
- *
- * _.inRange(4, 2);
- * // => false
- *
- * _.inRange(2, 2);
- * // => false
- *
- * _.inRange(1.2, 2);
- * // => true
- *
- * _.inRange(5.2, 4);
- * // => false
- *
- * _.inRange(-3, -2, -6);
- * // => true
- */
- function inRange(number, start, end) {
- start = toNumber(start) || 0;
- if (end === undefined) {
- end = start;
- start = 0;
- } else {
- end = toNumber(end) || 0;
- }
- number = toNumber(number);
- return baseInRange(number, start, end);
- }
-
- /**
- * Produces a random number between the inclusive `lower` and `upper` bounds.
- * If only one argument is provided a number between `0` and the given number
- * is returned. If `floating` is `true`, or either `lower` or `upper` are floats,
- * a floating-point number is returned instead of an integer.
- *
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
- * floating-point values which can produce unexpected results.
- *
- * @static
- * @memberOf _
- * @category Number
- * @param {number} [lower=0] The lower bound.
- * @param {number} [upper=1] The upper bound.
- * @param {boolean} [floating] Specify returning a floating-point number.
- * @returns {number} Returns the random number.
- * @example
- *
- * _.random(0, 5);
- * // => an integer between 0 and 5
- *
- * _.random(5);
- * // => also an integer between 0 and 5
- *
- * _.random(5, true);
- * // => a floating-point number between 0 and 5
- *
- * _.random(1.2, 5.2);
- * // => a floating-point number between 1.2 and 5.2
- */
- function random(lower, upper, floating) {
- if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
- upper = floating = undefined;
- }
- if (floating === undefined) {
- if (typeof upper == 'boolean') {
- floating = upper;
- upper = undefined;
- }
- else if (typeof lower == 'boolean') {
- floating = lower;
- lower = undefined;
- }
- }
- if (lower === undefined && upper === undefined) {
- lower = 0;
- upper = 1;
- }
- else {
- lower = toNumber(lower) || 0;
- if (upper === undefined) {
- upper = lower;
- lower = 0;
- } else {
- upper = toNumber(upper) || 0;
- }
- }
- if (lower > upper) {
- var temp = lower;
- lower = upper;
- upper = temp;
- }
- if (floating || lower % 1 || upper % 1) {
- var rand = nativeRandom();
- return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
- }
- return baseRandom(lower, upper);
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the camel cased string.
- * @example
- *
- * _.camelCase('Foo Bar');
- * // => 'fooBar'
- *
- * _.camelCase('--foo-bar');
- * // => 'fooBar'
- *
- * _.camelCase('__foo_bar__');
- * // => 'fooBar'
- */
- var camelCase = createCompounder(function(result, word, index) {
- word = word.toLowerCase();
- return result + (index ? capitalize(word) : word);
- });
-
- /**
- * Converts the first character of `string` to upper case and the remaining
- * to lower case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to capitalize.
- * @returns {string} Returns the capitalized string.
- * @example
- *
- * _.capitalize('FRED');
- * // => 'Fred'
- */
- function capitalize(string) {
- return upperFirst(toString(string).toLowerCase());
- }
-
- /**
- * Deburrs `string` by converting [latin-1 supplementary letters](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
- * to basic latin letters and removing [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to deburr.
- * @returns {string} Returns the deburred string.
- * @example
- *
- * _.deburr('déjà vu');
- * // => 'deja vu'
- */
- function deburr(string) {
- string = toString(string);
- return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
- }
-
- /**
- * Checks if `string` ends with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=string.length] The position to search from.
- * @returns {boolean} Returns `true` if `string` ends with `target`, else `false`.
- * @example
- *
- * _.endsWith('abc', 'c');
- * // => true
- *
- * _.endsWith('abc', 'b');
- * // => false
- *
- * _.endsWith('abc', 'b', 2);
- * // => true
- */
- function endsWith(string, target, position) {
- string = toString(string);
- target = typeof target == 'string' ? target : (target + '');
-
- var length = string.length;
- position = position === undefined
- ? length
- : baseClamp(toInteger(position), 0, length);
-
- position -= target.length;
- return position >= 0 && string.indexOf(target, position) == position;
- }
-
- /**
- * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to
- * their corresponding HTML entities.
- *
- * **Note:** No other characters are escaped. To escape additional
- * characters use a third-party library like [_he_](https://mths.be/he).
- *
- * Though the ">" character is escaped for symmetry, characters like
- * ">" and "/" don't need escaping in HTML and have no special meaning
- * unless they're part of a tag or unquoted attribute value.
- * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
- * (under "semi-related fun fact") for more details.
- *
- * Backticks are escaped because in IE < 9, they can break out of
- * attribute values or HTML comments. See [#59](https://html5sec.org/#59),
- * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and
- * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/)
- * for more details.
- *
- * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping)
- * to reduce XSS vectors.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escape('fred, barney, & pebbles');
- * // => 'fred, barney, &amp; pebbles'
- */
- function escape(string) {
- string = toString(string);
- return (string && reHasUnescapedHtml.test(string))
- ? string.replace(reUnescapedHtml, escapeHtmlChar)
- : string;
- }
-
- /**
- * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
- * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to escape.
- * @returns {string} Returns the escaped string.
- * @example
- *
- * _.escapeRegExp('[lodash](https://lodash.com/)');
- * // => '\[lodash\]\(https://lodash\.com/\)'
- */
- function escapeRegExp(string) {
- string = toString(string);
- return (string && reHasRegExpChar.test(string))
- ? string.replace(reRegExpChar, '\\$&')
- : string;
- }
-
- /**
- * Converts `string` to [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the kebab cased string.
- * @example
- *
- * _.kebabCase('Foo Bar');
- * // => 'foo-bar'
- *
- * _.kebabCase('fooBar');
- * // => 'foo-bar'
- *
- * _.kebabCase('__foo_bar__');
- * // => 'foo-bar'
- */
- var kebabCase = createCompounder(function(result, word, index) {
- return result + (index ? '-' : '') + word.toLowerCase();
- });
-
- /**
- * Converts `string`, as space separated words, to lower case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the lower cased string.
- * @example
- *
- * _.lowerCase('--Foo-Bar');
- * // => 'foo bar'
- *
- * _.lowerCase('fooBar');
- * // => 'foo bar'
- *
- * _.lowerCase('__FOO_BAR__');
- * // => 'foo bar'
- */
- var lowerCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + word.toLowerCase();
- });
-
- /**
- * Converts the first character of `string` to lower case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.lowerFirst('Fred');
- * // => 'fred'
- *
- * _.lowerFirst('FRED');
- * // => 'fRED'
- */
- var lowerFirst = createCaseFirst('toLowerCase');
-
- /**
- * Converts the first character of `string` to upper case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the converted string.
- * @example
- *
- * _.upperFirst('fred');
- * // => 'Fred'
- *
- * _.upperFirst('FRED');
- * // => 'FRED'
- */
- var upperFirst = createCaseFirst('toUpperCase');
-
- /**
- * Pads `string` on the left and right sides if it's shorter than `length`.
- * Padding characters are truncated if they can't be evenly divided by `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.pad('abc', 8);
- * // => ' abc '
- *
- * _.pad('abc', 8, '_-');
- * // => '_-abc_-_'
- *
- * _.pad('abc', 3);
- * // => 'abc'
- */
- function pad(string, length, chars) {
- string = toString(string);
- length = toInteger(length);
-
- var strLength = stringSize(string);
- if (!length || strLength >= length) {
- return string;
- }
- var mid = (length - strLength) / 2,
- leftLength = nativeFloor(mid),
- rightLength = nativeCeil(mid);
-
- return createPadding('', leftLength, chars) + string + createPadding('', rightLength, chars);
- }
-
- /**
- * Pads `string` on the right side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padEnd('abc', 6);
- * // => 'abc '
- *
- * _.padEnd('abc', 6, '_-');
- * // => 'abc_-_'
- *
- * _.padEnd('abc', 3);
- * // => 'abc'
- */
- function padEnd(string, length, chars) {
- string = toString(string);
- return string + createPadding(string, length, chars);
- }
-
- /**
- * Pads `string` on the left side if it's shorter than `length`. Padding
- * characters are truncated if they exceed `length`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to pad.
- * @param {number} [length=0] The padding length.
- * @param {string} [chars=' '] The string used as padding.
- * @returns {string} Returns the padded string.
- * @example
- *
- * _.padStart('abc', 6);
- * // => ' abc'
- *
- * _.padStart('abc', 6, '_-');
- * // => '_-_abc'
- *
- * _.padStart('abc', 3);
- * // => 'abc'
- */
- function padStart(string, length, chars) {
- string = toString(string);
- return createPadding(string, length, chars) + string;
- }
-
- /**
- * Converts `string` to an integer of the specified radix. If `radix` is
- * `undefined` or `0`, a `radix` of `10` is used unless `value` is a hexadecimal,
- * in which case a `radix` of `16` is used.
- *
- * **Note:** This method aligns with the [ES5 implementation](https://es5.github.io/#x15.1.2.2)
- * of `parseInt`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} string The string to convert.
- * @param {number} [radix=10] The radix to interpret `value` by.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {number} Returns the converted integer.
- * @example
- *
- * _.parseInt('08');
- * // => 8
- *
- * _.map(['6', '08', '10'], _.parseInt);
- * // => [6, 8, 10]
- */
- function parseInt(string, radix, guard) {
- // Chrome fails to trim leading <BOM> whitespace characters.
- // See https://code.google.com/p/v8/issues/detail?id=3109 for more details.
- if (guard || radix == null) {
- radix = 0;
- } else if (radix) {
- radix = +radix;
- }
- string = toString(string).replace(reTrim, '');
- return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
- }
-
- /**
- * Repeats the given string `n` times.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to repeat.
- * @param {number} [n=0] The number of times to repeat the string.
- * @returns {string} Returns the repeated string.
- * @example
- *
- * _.repeat('*', 3);
- * // => '***'
- *
- * _.repeat('abc', 2);
- * // => 'abcabc'
- *
- * _.repeat('abc', 0);
- * // => ''
- */
- function repeat(string, n) {
- string = toString(string);
- n = toInteger(n);
-
- var result = '';
- if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
- return result;
- }
- // Leverage the exponentiation by squaring algorithm for a faster repeat.
- // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
- do {
- if (n % 2) {
- result += string;
- }
- n = nativeFloor(n / 2);
- string += string;
- } while (n);
-
- return result;
- }
-
- /**
- * Replaces matches for `pattern` in `string` with `replacement`.
- *
- * **Note:** This method is based on [`String#replace`](https://mdn.io/String/replace).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to modify.
- * @param {RegExp|string} pattern The pattern to replace.
- * @param {Function|string} replacement The match replacement.
- * @returns {string} Returns the modified string.
- * @example
- *
- * _.replace('Hi Fred', 'Fred', 'Barney');
- * // => 'Hi Barney'
- */
- function replace() {
- var args = arguments,
- string = toString(args[0]);
-
- return args.length < 3 ? string : string.replace(args[1], args[2]);
- }
-
- /**
- * Converts `string` to [snake case](https://en.wikipedia.org/wiki/Snake_case).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the snake cased string.
- * @example
- *
- * _.snakeCase('Foo Bar');
- * // => 'foo_bar'
- *
- * _.snakeCase('fooBar');
- * // => 'foo_bar'
- *
- * _.snakeCase('--foo-bar');
- * // => 'foo_bar'
- */
- var snakeCase = createCompounder(function(result, word, index) {
- return result + (index ? '_' : '') + word.toLowerCase();
- });
-
- /**
- * Splits `string` by `separator`.
- *
- * **Note:** This method is based on [`String#split`](https://mdn.io/String/split).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to split.
- * @param {RegExp|string} separator The separator pattern to split by.
- * @param {number} [limit] The length to truncate results to.
- * @returns {Array} Returns the new array of string segments.
- * @example
- *
- * _.split('a-b-c', '-', 2);
- * // => ['a', 'b']
- */
- function split(string, separator, limit) {
- return toString(string).split(separator, limit);
- }
-
- /**
- * Converts `string` to [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the start cased string.
- * @example
- *
- * _.startCase('--foo-bar');
- * // => 'Foo Bar'
- *
- * _.startCase('fooBar');
- * // => 'Foo Bar'
- *
- * _.startCase('__foo_bar__');
- * // => 'Foo Bar'
- */
- var startCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + capitalize(word);
- });
-
- /**
- * Checks if `string` starts with the given target string.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to search.
- * @param {string} [target] The string to search for.
- * @param {number} [position=0] The position to search from.
- * @returns {boolean} Returns `true` if `string` starts with `target`, else `false`.
- * @example
- *
- * _.startsWith('abc', 'a');
- * // => true
- *
- * _.startsWith('abc', 'b');
- * // => false
- *
- * _.startsWith('abc', 'b', 1);
- * // => true
- */
- function startsWith(string, target, position) {
- string = toString(string);
- position = baseClamp(toInteger(position), 0, string.length);
- return string.lastIndexOf(target, position) == position;
- }
-
- /**
- * Creates a compiled template function that can interpolate data properties
- * in "interpolate" delimiters, HTML-escape interpolated data properties in
- * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
- * properties may be accessed as free variables in the template. If a setting
- * object is given it takes precedence over `_.templateSettings` values.
- *
- * **Note:** In the development build `_.template` utilizes
- * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
- * for easier debugging.
- *
- * For more information on precompiling templates see
- * [lodash's custom builds documentation](https://lodash.com/custom-builds).
- *
- * For more information on Chrome extension sandboxes see
- * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The template string.
- * @param {Object} [options] The options object.
- * @param {RegExp} [options.escape] The HTML "escape" delimiter.
- * @param {RegExp} [options.evaluate] The "evaluate" delimiter.
- * @param {Object} [options.imports] An object to import into the template as free variables.
- * @param {RegExp} [options.interpolate] The "interpolate" delimiter.
- * @param {string} [options.sourceURL] The sourceURL of the template's compiled source.
- * @param {string} [options.variable] The data object variable name.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Function} Returns the compiled template function.
- * @example
- *
- * // Use the "interpolate" delimiter to create a compiled template.
- * var compiled = _.template('hello <%= user %>!');
- * compiled({ 'user': 'fred' });
- * // => 'hello fred!'
- *
- * // Use the HTML "escape" delimiter to escape data property values.
- * var compiled = _.template('<b><%- value %></b>');
- * compiled({ 'value': '<script>' });
- * // => '<b>&lt;script&gt;</b>'
- *
- * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
- * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // Use the internal `print` function in "evaluate" delimiters.
- * var compiled = _.template('<% print("hello " + user); %>!');
- * compiled({ 'user': 'barney' });
- * // => 'hello barney!'
- *
- * // Use the ES delimiter as an alternative to the default "interpolate" delimiter.
- * var compiled = _.template('hello ${ user }!');
- * compiled({ 'user': 'pebbles' });
- * // => 'hello pebbles!'
- *
- * // Use custom template delimiters.
- * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
- * var compiled = _.template('hello {{ user }}!');
- * compiled({ 'user': 'mustache' });
- * // => 'hello mustache!'
- *
- * // Use backslashes to treat delimiters as plain text.
- * var compiled = _.template('<%= "\\<%- value %\\>" %>');
- * compiled({ 'value': 'ignored' });
- * // => '<%- value %>'
- *
- * // Use the `imports` option to import `jQuery` as `jq`.
- * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
- * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
- * compiled({ 'users': ['fred', 'barney'] });
- * // => '<li>fred</li><li>barney</li>'
- *
- * // Use the `sourceURL` option to specify a custom sourceURL for the template.
- * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
- * compiled(data);
- * // => find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector
- *
- * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
- * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
- * compiled.source;
- * // => function(data) {
- * // var __t, __p = '';
- * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
- * // return __p;
- * // }
- *
- * // Use the `source` property to inline compiled templates for meaningful
- * // line numbers in error messages and stack traces.
- * fs.writeFileSync(path.join(cwd, 'jst.js'), '\
- * var JST = {\
- * "main": ' + _.template(mainText).source + '\
- * };\
- * ');
- */
- function template(string, options, guard) {
- // Based on John Resig's `tmpl` implementation (http://ejohn.org/blog/javascript-micro-templating/)
- // and Laura Doktorova's doT.js (https://github.com/olado/doT).
- var settings = lodash.templateSettings;
-
- if (guard && isIterateeCall(string, options, guard)) {
- options = undefined;
- }
- string = toString(string);
- options = assignInWith({}, options, settings, assignInDefaults);
-
- var imports = assignInWith({}, options.imports, settings.imports, assignInDefaults),
- importsKeys = keys(imports),
- importsValues = baseValues(imports, importsKeys);
-
- var isEscaping,
- isEvaluating,
- index = 0,
- interpolate = options.interpolate || reNoMatch,
- source = "__p += '";
-
- // Compile the regexp to match each delimiter.
- var reDelimiters = RegExp(
- (options.escape || reNoMatch).source + '|' +
- interpolate.source + '|' +
- (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
- (options.evaluate || reNoMatch).source + '|$'
- , 'g');
-
- // Use a sourceURL for easier debugging.
- var sourceURL = '//# sourceURL=' +
- ('sourceURL' in options
- ? options.sourceURL
- : ('lodash.templateSources[' + (++templateCounter) + ']')
- ) + '\n';
-
- string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
- interpolateValue || (interpolateValue = esTemplateValue);
-
- // Escape characters that can't be included in string literals.
- source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
-
- // Replace delimiters with snippets.
- if (escapeValue) {
- isEscaping = true;
- source += "' +\n__e(" + escapeValue + ") +\n'";
- }
- if (evaluateValue) {
- isEvaluating = true;
- source += "';\n" + evaluateValue + ";\n__p += '";
- }
- if (interpolateValue) {
- source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
- }
- index = offset + match.length;
-
- // The JS engine embedded in Adobe products needs `match` returned in
- // order to produce the correct `offset` value.
- return match;
- });
-
- source += "';\n";
-
- // If `variable` is not specified wrap a with-statement around the generated
- // code to add the data object to the top of the scope chain.
- var variable = options.variable;
- if (!variable) {
- source = 'with (obj) {\n' + source + '\n}\n';
- }
- // Cleanup code by stripping empty strings.
- source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
- .replace(reEmptyStringMiddle, '$1')
- .replace(reEmptyStringTrailing, '$1;');
-
- // Frame code as the function body.
- source = 'function(' + (variable || 'obj') + ') {\n' +
- (variable
- ? ''
- : 'obj || (obj = {});\n'
- ) +
- "var __t, __p = ''" +
- (isEscaping
- ? ', __e = _.escape'
- : ''
- ) +
- (isEvaluating
- ? ', __j = Array.prototype.join;\n' +
- "function print() { __p += __j.call(arguments, '') }\n"
- : ';\n'
- ) +
- source +
- 'return __p\n}';
-
- var result = attempt(function() {
- return Function(importsKeys, sourceURL + 'return ' + source)
- .apply(undefined, importsValues);
- });
-
- // Provide the compiled function's source by its `toString` method or
- // the `source` property as a convenience for inlining compiled templates.
- result.source = source;
- if (isError(result)) {
- throw result;
- }
- return result;
- }
-
- /**
- * Converts `string`, as a whole, to lower case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the lower cased string.
- * @example
- *
- * _.toLower('--Foo-Bar');
- * // => '--foo-bar'
- *
- * _.toLower('fooBar');
- * // => 'foobar'
- *
- * _.toLower('__FOO_BAR__');
- * // => '__foo_bar__'
- */
- function toLower(value) {
- return toString(value).toLowerCase();
- }
-
- /**
- * Converts `string`, as a whole, to upper case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the upper cased string.
- * @example
- *
- * _.toUpper('--foo-bar');
- * // => '--FOO-BAR'
- *
- * _.toUpper('fooBar');
- * // => 'FOOBAR'
- *
- * _.toUpper('__foo_bar__');
- * // => '__FOO_BAR__'
- */
- function toUpper(value) {
- return toString(value).toUpperCase();
- }
-
- /**
- * Removes leading and trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trim(' abc ');
- * // => 'abc'
- *
- * _.trim('-_-abc-_-', '_-');
- * // => 'abc'
- *
- * _.map([' foo ', ' bar '], _.trim);
- * // => ['foo', 'bar']
- */
- function trim(string, chars, guard) {
- string = toString(string);
- if (!string) {
- return string;
- }
- if (guard || chars === undefined) {
- return string.replace(reTrim, '');
- }
- chars = (chars + '');
- if (!chars) {
- return string;
- }
- var strSymbols = stringToArray(string),
- chrSymbols = stringToArray(chars);
-
- return strSymbols
- .slice(charsStartIndex(strSymbols, chrSymbols), charsEndIndex(strSymbols, chrSymbols) + 1)
- .join('');
- }
-
- /**
- * Removes trailing whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimEnd(' abc ');
- * // => ' abc'
- *
- * _.trimEnd('-_-abc-_-', '_-');
- * // => '-_-abc'
- */
- function trimEnd(string, chars, guard) {
- string = toString(string);
- if (!string) {
- return string;
- }
- if (guard || chars === undefined) {
- return string.replace(reTrimEnd, '');
- }
- chars = (chars + '');
- if (!chars) {
- return string;
- }
- var strSymbols = stringToArray(string);
- return strSymbols
- .slice(0, charsEndIndex(strSymbols, stringToArray(chars)) + 1)
- .join('');
- }
-
- /**
- * Removes leading whitespace or specified characters from `string`.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to trim.
- * @param {string} [chars=whitespace] The characters to trim.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {string} Returns the trimmed string.
- * @example
- *
- * _.trimStart(' abc ');
- * // => 'abc '
- *
- * _.trimStart('-_-abc-_-', '_-');
- * // => 'abc-_-'
- */
- function trimStart(string, chars, guard) {
- string = toString(string);
- if (!string) {
- return string;
- }
- if (guard || chars === undefined) {
- return string.replace(reTrimStart, '');
- }
- chars = (chars + '');
- if (!chars) {
- return string;
- }
- var strSymbols = stringToArray(string);
- return strSymbols
- .slice(charsStartIndex(strSymbols, stringToArray(chars)))
- .join('');
- }
-
- /**
- * Truncates `string` if it's longer than the given maximum string length.
- * The last characters of the truncated string are replaced with the omission
- * string which defaults to "...".
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to truncate.
- * @param {Object} [options=({})] The options object.
- * @param {number} [options.length=30] The maximum string length.
- * @param {string} [options.omission='...'] The string to indicate text is omitted.
- * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
- * @returns {string} Returns the truncated string.
- * @example
- *
- * _.truncate('hi-diddly-ho there, neighborino');
- * // => 'hi-diddly-ho there, neighbo...'
- *
- * _.truncate('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': ' '
- * });
- * // => 'hi-diddly-ho there,...'
- *
- * _.truncate('hi-diddly-ho there, neighborino', {
- * 'length': 24,
- * 'separator': /,? +/
- * });
- * // => 'hi-diddly-ho there...'
- *
- * _.truncate('hi-diddly-ho there, neighborino', {
- * 'omission': ' [...]'
- * });
- * // => 'hi-diddly-ho there, neig [...]'
- */
- function truncate(string, options) {
- var length = DEFAULT_TRUNC_LENGTH,
- omission = DEFAULT_TRUNC_OMISSION;
-
- if (isObject(options)) {
- var separator = 'separator' in options ? options.separator : separator;
- length = 'length' in options ? toInteger(options.length) : length;
- omission = 'omission' in options ? toString(options.omission) : omission;
- }
- string = toString(string);
-
- var strLength = string.length;
- if (reHasComplexSymbol.test(string)) {
- var strSymbols = stringToArray(string);
- strLength = strSymbols.length;
- }
- if (length >= strLength) {
- return string;
- }
- var end = length - stringSize(omission);
- if (end < 1) {
- return omission;
- }
- var result = strSymbols
- ? strSymbols.slice(0, end).join('')
- : string.slice(0, end);
-
- if (separator === undefined) {
- return result + omission;
- }
- if (strSymbols) {
- end += (result.length - end);
- }
- if (isRegExp(separator)) {
- if (string.slice(end).search(separator)) {
- var match,
- substring = result;
-
- if (!separator.global) {
- separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
- }
- separator.lastIndex = 0;
- while ((match = separator.exec(substring))) {
- var newEnd = match.index;
- }
- result = result.slice(0, newEnd === undefined ? end : newEnd);
- }
- } else if (string.indexOf(separator, end) != end) {
- var index = result.lastIndexOf(separator);
- if (index > -1) {
- result = result.slice(0, index);
- }
- }
- return result + omission;
- }
-
- /**
- * The inverse of `_.escape`; this method converts the HTML entities
- * `&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and `&#96;` in `string` to their
- * corresponding characters.
- *
- * **Note:** No other HTML entities are unescaped. To unescape additional HTML
- * entities use a third-party library like [_he_](https://mths.be/he).
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to unescape.
- * @returns {string} Returns the unescaped string.
- * @example
- *
- * _.unescape('fred, barney, &amp; pebbles');
- * // => 'fred, barney, & pebbles'
- */
- function unescape(string) {
- string = toString(string);
- return (string && reHasEscapedHtml.test(string))
- ? string.replace(reEscapedHtml, unescapeHtmlChar)
- : string;
- }
-
- /**
- * Converts `string`, as space separated words, to upper case.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to convert.
- * @returns {string} Returns the upper cased string.
- * @example
- *
- * _.upperCase('--foo-bar');
- * // => 'FOO BAR'
- *
- * _.upperCase('fooBar');
- * // => 'FOO BAR'
- *
- * _.upperCase('__foo_bar__');
- * // => 'FOO BAR'
- */
- var upperCase = createCompounder(function(result, word, index) {
- return result + (index ? ' ' : '') + word.toUpperCase();
- });
-
- /**
- * Splits `string` into an array of its words.
- *
- * @static
- * @memberOf _
- * @category String
- * @param {string} [string=''] The string to inspect.
- * @param {RegExp|string} [pattern] The pattern to match words.
- * @param- {Object} [guard] Enables use as an iteratee for functions like `_.map`.
- * @returns {Array} Returns the words of `string`.
- * @example
- *
- * _.words('fred, barney, & pebbles');
- * // => ['fred', 'barney', 'pebbles']
- *
- * _.words('fred, barney, & pebbles', /[^, ]+/g);
- * // => ['fred', 'barney', '&', 'pebbles']
- */
- function words(string, pattern, guard) {
- string = toString(string);
- pattern = guard ? undefined : pattern;
-
- if (pattern === undefined) {
- pattern = reHasComplexWord.test(string) ? reComplexWord : reBasicWord;
- }
- return string.match(pattern) || [];
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Attempts to invoke `func`, returning either the result or the caught error
- * object. Any additional arguments are provided to `func` when it's invoked.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Function} func The function to attempt.
- * @returns {*} Returns the `func` result or error object.
- * @example
- *
- * // Avoid throwing errors for invalid selectors.
- * var elements = _.attempt(function(selector) {
- * return document.querySelectorAll(selector);
- * }, '>_>');
- *
- * if (_.isError(elements)) {
- * elements = [];
- * }
- */
- var attempt = rest(function(func, args) {
- try {
- return apply(func, undefined, args);
- } catch (e) {
- return isError(e) ? e : new Error(e);
- }
- });
-
- /**
- * Binds methods of an object to the object itself, overwriting the existing
- * method.
- *
- * **Note:** This method doesn't set the "length" property of bound functions.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} object The object to bind and assign the bound methods to.
- * @param {...(string|string[])} methodNames The object method names to bind,
- * specified individually or in arrays.
- * @returns {Object} Returns `object`.
- * @example
- *
- * var view = {
- * 'label': 'docs',
- * 'onClick': function() {
- * console.log('clicked ' + this.label);
- * }
- * };
- *
- * _.bindAll(view, 'onClick');
- * jQuery(element).on('click', view.onClick);
- * // => logs 'clicked docs' when clicked
- */
- var bindAll = rest(function(object, methodNames) {
- arrayEach(baseFlatten(methodNames, 1), function(key) {
- object[key] = bind(object[key], object);
- });
- return object;
- });
-
- /**
- * Creates a function that iterates over `pairs` invoking the corresponding
- * function of the first predicate to return truthy. The predicate-function
- * pairs are invoked with the `this` binding and arguments of the created
- * function.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Array} pairs The predicate-function pairs.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.cond([
- * [_.matches({ 'a': 1 }), _.constant('matches A')],
- * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
- * [_.constant(true), _.constant('no match')]
- * ]);
- *
- * func({ 'a': 1, 'b': 2 });
- * // => 'matches A'
- *
- * func({ 'a': 0, 'b': 1 });
- * // => 'matches B'
- *
- * func({ 'a': '1', 'b': '2' });
- * // => 'no match'
- */
- function cond(pairs) {
- var length = pairs ? pairs.length : 0,
- toIteratee = getIteratee();
-
- pairs = !length ? [] : arrayMap(pairs, function(pair) {
- if (typeof pair[1] != 'function') {
- throw new TypeError(FUNC_ERROR_TEXT);
- }
- return [toIteratee(pair[0]), pair[1]];
- });
-
- return rest(function(args) {
- var index = -1;
- while (++index < length) {
- var pair = pairs[index];
- if (apply(pair[0], this, args)) {
- return apply(pair[1], this, args);
- }
- }
- });
- }
-
- /**
- * Creates a function that invokes the predicate properties of `source` with
- * the corresponding property values of a given object, returning `true` if
- * all predicates return truthy, else `false`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} source The object of property predicates to conform to.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * _.filter(users, _.conforms({ 'age': _.partial(_.gt, _, 38) }));
- * // => [{ 'user': 'fred', 'age': 40 }]
- */
- function conforms(source) {
- return baseConforms(baseClone(source, true));
- }
-
- /**
- * Creates a function that returns `value`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {*} value The value to return from the new function.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var object = { 'user': 'fred' };
- * var getter = _.constant(object);
- *
- * getter() === object;
- * // => true
- */
- function constant(value) {
- return function() {
- return value;
- };
- }
-
- /**
- * Creates a function that returns the result of invoking the given functions
- * with the `this` binding of the created function, where each successive
- * invocation is supplied the return value of the previous.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {...(Function|Function[])} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flow(_.add, square);
- * addSquare(1, 2);
- * // => 9
- */
- var flow = createFlow();
-
- /**
- * This method is like `_.flow` except that it creates a function that
- * invokes the given functions from right to left.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {...(Function|Function[])} [funcs] Functions to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * function square(n) {
- * return n * n;
- * }
- *
- * var addSquare = _.flowRight(square, _.add);
- * addSquare(1, 2);
- * // => 9
- */
- var flowRight = createFlow(true);
-
- /**
- * This method returns the first argument given to it.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {*} value Any value.
- * @returns {*} Returns `value`.
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.identity(object) === object;
- * // => true
- */
- function identity(value) {
- return value;
- }
-
- /**
- * Creates a function that invokes `func` with the arguments of the created
- * function. If `func` is a property name the created callback returns the
- * property value for a given element. If `func` is an object the created
- * callback returns `true` for elements that contain the equivalent object
- * properties, otherwise it returns `false`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {*} [func=_.identity] The value to convert to a callback.
- * @returns {Function} Returns the callback.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36 },
- * { 'user': 'fred', 'age': 40 }
- * ];
- *
- * // Create custom iteratee shorthands.
- * _.iteratee = _.wrap(_.iteratee, function(callback, func) {
- * var p = /^(\S+)\s*([<>])\s*(\S+)$/.exec(func);
- * return !p ? callback(func) : function(object) {
- * return (p[2] == '>' ? object[p[1]] > p[3] : object[p[1]] < p[3]);
- * };
- * });
- *
- * _.filter(users, 'age > 36');
- * // => [{ 'user': 'fred', 'age': 40 }]
- */
- function iteratee(func) {
- return baseIteratee(typeof func == 'function' ? func : baseClone(func, true));
- }
-
- /**
- * Creates a function that performs a partial deep comparison between a given
- * object and `source`, returning `true` if the given object has equivalent
- * property values, else `false`. The created function is equivalent to
- * `_.isMatch` with a `source` partially applied.
- *
- * **Note:** This method supports comparing the same values as `_.isEqual`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} source The object of property values to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney', 'age': 36, 'active': true },
- * { 'user': 'fred', 'age': 40, 'active': false }
- * ];
- *
- * _.filter(users, _.matches({ 'age': 40, 'active': false }));
- * // => [{ 'user': 'fred', 'age': 40, 'active': false }]
- */
- function matches(source) {
- return baseMatches(baseClone(source, true));
- }
-
- /**
- * Creates a function that performs a partial deep comparison between the
- * value at `path` of a given object to `srcValue`, returning `true` if the
- * object value is equivalent, else `false`.
- *
- * **Note:** This method supports comparing the same values as `_.isEqual`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @param {*} srcValue The value to match.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var users = [
- * { 'user': 'barney' },
- * { 'user': 'fred' }
- * ];
- *
- * _.find(users, _.matchesProperty('user', 'fred'));
- * // => { 'user': 'fred' }
- */
- function matchesProperty(path, srcValue) {
- return baseMatchesProperty(path, baseClone(srcValue, true));
- }
-
- /**
- * Creates a function that invokes the method at `path` of a given object.
- * Any additional arguments are provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Array|string} path The path of the method to invoke.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': _.constant(2) } } },
- * { 'a': { 'b': { 'c': _.constant(1) } } }
- * ];
- *
- * _.map(objects, _.method('a.b.c'));
- * // => [2, 1]
- *
- * _.invokeMap(_.sortBy(objects, _.method(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
- var method = rest(function(path, args) {
- return function(object) {
- return baseInvoke(object, path, args);
- };
- });
-
- /**
- * The opposite of `_.method`; this method creates a function that invokes
- * the method at a given path of `object`. Any additional arguments are
- * provided to the invoked method.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} object The object to query.
- * @param {...*} [args] The arguments to invoke the method with.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = _.times(3, _.constant),
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.methodOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
- * // => [2, 0]
- */
- var methodOf = rest(function(object, args) {
- return function(path) {
- return baseInvoke(object, path, args);
- };
- });
-
- /**
- * Adds all own enumerable function properties of a source object to the
- * destination object. If `object` is a function then methods are added to
- * its prototype as well.
- *
- * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
- * avoid conflicts caused by modifying the original.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Function|Object} [object=lodash] The destination object.
- * @param {Object} source The object of functions to add.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.chain=true] Specify whether the functions added
- * are chainable.
- * @returns {Function|Object} Returns `object`.
- * @example
- *
- * function vowels(string) {
- * return _.filter(string, function(v) {
- * return /[aeiou]/i.test(v);
- * });
- * }
- *
- * _.mixin({ 'vowels': vowels });
- * _.vowels('fred');
- * // => ['e']
- *
- * _('fred').vowels().value();
- * // => ['e']
- *
- * _.mixin({ 'vowels': vowels }, { 'chain': false });
- * _('fred').vowels();
- * // => ['e']
- */
- function mixin(object, source, options) {
- var props = keys(source),
- methodNames = baseFunctions(source, props);
-
- if (options == null &&
- !(isObject(source) && (methodNames.length || !props.length))) {
- options = source;
- source = object;
- object = this;
- methodNames = baseFunctions(source, keys(source));
- }
- var chain = (isObject(options) && 'chain' in options) ? options.chain : true,
- isFunc = isFunction(object);
-
- arrayEach(methodNames, function(methodName) {
- var func = source[methodName];
- object[methodName] = func;
- if (isFunc) {
- object.prototype[methodName] = function() {
- var chainAll = this.__chain__;
- if (chain || chainAll) {
- var result = object(this.__wrapped__),
- actions = result.__actions__ = copyArray(this.__actions__);
-
- actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
- result.__chain__ = chainAll;
- return result;
- }
- return func.apply(object, arrayPush([this.value()], arguments));
- };
- }
- });
-
- return object;
- }
-
- /**
- * Reverts the `_` variable to its previous value and returns a reference to
- * the `lodash` function.
- *
- * @static
- * @memberOf _
- * @category Util
- * @returns {Function} Returns the `lodash` function.
- * @example
- *
- * var lodash = _.noConflict();
- */
- function noConflict() {
- if (root._ === this) {
- root._ = oldDash;
- }
- return this;
- }
-
- /**
- * A no-operation function that returns `undefined` regardless of the
- * arguments it receives.
- *
- * @static
- * @memberOf _
- * @category Util
- * @example
- *
- * var object = { 'user': 'fred' };
- *
- * _.noop(object) === undefined;
- * // => true
- */
- function noop() {
- // No operation performed.
- }
-
- /**
- * Creates a function that returns its nth argument.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {number} [n=0] The index of the argument to return.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.nthArg(1);
- *
- * func('a', 'b', 'c');
- * // => 'b'
- */
- function nthArg(n) {
- n = toInteger(n);
- return function() {
- return arguments[n];
- };
- }
-
- /**
- * Creates a function that invokes `iteratees` with the arguments provided
- * to the created function and returns their results.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {...(Function|Function[])} iteratees The iteratees to invoke.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.over(Math.max, Math.min);
- *
- * func(1, 2, 3, 4);
- * // => [4, 1]
- */
- var over = createOver(arrayMap);
-
- /**
- * Creates a function that checks if **all** of the `predicates` return
- * truthy when invoked with the arguments provided to the created function.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {...(Function|Function[])} predicates The predicates to check.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.overEvery(Boolean, isFinite);
- *
- * func('1');
- * // => true
- *
- * func(null);
- * // => false
- *
- * func(NaN);
- * // => false
- */
- var overEvery = createOver(arrayEvery);
-
- /**
- * Creates a function that checks if **any** of the `predicates` return
- * truthy when invoked with the arguments provided to the created function.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {...(Function|Function[])} predicates The predicates to check.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var func = _.overSome(Boolean, isFinite);
- *
- * func('1');
- * // => true
- *
- * func(null);
- * // => true
- *
- * func(NaN);
- * // => false
- */
- var overSome = createOver(arraySome);
-
- /**
- * Creates a function that returns the value at `path` of a given object.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Array|string} path The path of the property to get.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var objects = [
- * { 'a': { 'b': { 'c': 2 } } },
- * { 'a': { 'b': { 'c': 1 } } }
- * ];
- *
- * _.map(objects, _.property('a.b.c'));
- * // => [2, 1]
- *
- * _.map(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');
- * // => [1, 2]
- */
- function property(path) {
- return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
- }
-
- /**
- * The opposite of `_.property`; this method creates a function that returns
- * the value at a given path of `object`.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {Object} object The object to query.
- * @returns {Function} Returns the new function.
- * @example
- *
- * var array = [0, 1, 2],
- * object = { 'a': array, 'b': array, 'c': array };
- *
- * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
- * // => [2, 0]
- *
- * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
- * // => [2, 0]
- */
- function propertyOf(object) {
- return function(path) {
- return object == null ? undefined : baseGet(object, path);
- };
- }
-
- /**
- * Creates an array of numbers (positive and/or negative) progressing from
- * `start` up to, but not including, `end`. A step of `-1` is used if a negative
- * `start` is specified without an `end` or `step`. If `end` is not specified
- * it's set to `start` with `start` then set to `0`.
- *
- * **Note:** JavaScript follows the IEEE-754 standard for resolving
- * floating-point values which can produce unexpected results.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the new array of numbers.
- * @example
- *
- * _.range(4);
- * // => [0, 1, 2, 3]
- *
- * _.range(-4);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 5);
- * // => [1, 2, 3, 4]
- *
- * _.range(0, 20, 5);
- * // => [0, 5, 10, 15]
- *
- * _.range(0, -4, -1);
- * // => [0, -1, -2, -3]
- *
- * _.range(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.range(0);
- * // => []
- */
- var range = createRange();
-
- /**
- * This method is like `_.range` except that it populates values in
- * descending order.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {number} [start=0] The start of the range.
- * @param {number} end The end of the range.
- * @param {number} [step=1] The value to increment or decrement by.
- * @returns {Array} Returns the new array of numbers.
- * @example
- *
- * _.rangeRight(4);
- * // => [3, 2, 1, 0]
- *
- * _.rangeRight(-4);
- * // => [-3, -2, -1, 0]
- *
- * _.rangeRight(1, 5);
- * // => [4, 3, 2, 1]
- *
- * _.rangeRight(0, 20, 5);
- * // => [15, 10, 5, 0]
- *
- * _.rangeRight(0, -4, -1);
- * // => [-3, -2, -1, 0]
- *
- * _.rangeRight(1, 4, 0);
- * // => [1, 1, 1]
- *
- * _.rangeRight(0);
- * // => []
- */
- var rangeRight = createRange(true);
-
- /**
- * Invokes the iteratee `n` times, returning an array of the results of
- * each invocation. The iteratee is invoked with one argument; (index).
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {number} n The number of times to invoke `iteratee`.
- * @param {Function} [iteratee=_.identity] The function invoked per iteration.
- * @returns {Array} Returns the array of results.
- * @example
- *
- * _.times(3, String);
- * // => ['0', '1', '2']
- *
- * _.times(4, _.constant(true));
- * // => [true, true, true, true]
- */
- function times(n, iteratee) {
- n = toInteger(n);
- if (n < 1 || n > MAX_SAFE_INTEGER) {
- return [];
- }
- var index = MAX_ARRAY_LENGTH,
- length = nativeMin(n, MAX_ARRAY_LENGTH);
-
- iteratee = baseCastFunction(iteratee);
- n -= MAX_ARRAY_LENGTH;
-
- var result = baseTimes(length, iteratee);
- while (++index < n) {
- iteratee(index);
- }
- return result;
- }
-
- /**
- * Converts `value` to a property path array.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {*} value The value to convert.
- * @returns {Array} Returns the new property path array.
- * @example
- *
- * _.toPath('a.b.c');
- * // => ['a', 'b', 'c']
- *
- * _.toPath('a[0].b.c');
- * // => ['a', '0', 'b', 'c']
- *
- * var path = ['a', 'b', 'c'],
- * newPath = _.toPath(path);
- *
- * console.log(newPath);
- * // => ['a', 'b', 'c']
- *
- * console.log(path === newPath);
- * // => false
- */
- function toPath(value) {
- return isArray(value) ? arrayMap(value, String) : stringToPath(value);
- }
-
- /**
- * Generates a unique ID. If `prefix` is given the ID is appended to it.
- *
- * @static
- * @memberOf _
- * @category Util
- * @param {string} [prefix=''] The value to prefix the ID with.
- * @returns {string} Returns the unique ID.
- * @example
- *
- * _.uniqueId('contact_');
- * // => 'contact_104'
- *
- * _.uniqueId();
- * // => '105'
- */
- function uniqueId(prefix) {
- var id = ++idCounter;
- return toString(prefix) + id;
- }
-
- /*------------------------------------------------------------------------*/
-
- /**
- * Adds two numbers.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} augend The first number in an addition.
- * @param {number} addend The second number in an addition.
- * @returns {number} Returns the total.
- * @example
- *
- * _.add(6, 4);
- * // => 10
- */
- function add(augend, addend) {
- var result;
- if (augend === undefined && addend === undefined) {
- return 0;
- }
- if (augend !== undefined) {
- result = augend;
- }
- if (addend !== undefined) {
- result = result === undefined ? addend : (result + addend);
- }
- return result;
- }
-
- /**
- * Computes `number` rounded up to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} number The number to round up.
- * @param {number} [precision=0] The precision to round up to.
- * @returns {number} Returns the rounded up number.
- * @example
- *
- * _.ceil(4.006);
- * // => 5
- *
- * _.ceil(6.004, 2);
- * // => 6.01
- *
- * _.ceil(6040, -2);
- * // => 6100
- */
- var ceil = createRound('ceil');
-
- /**
- * Computes `number` rounded down to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} number The number to round down.
- * @param {number} [precision=0] The precision to round down to.
- * @returns {number} Returns the rounded down number.
- * @example
- *
- * _.floor(4.006);
- * // => 4
- *
- * _.floor(0.046, 2);
- * // => 0.04
- *
- * _.floor(4060, -2);
- * // => 4000
- */
- var floor = createRound('floor');
-
- /**
- * Computes the maximum value of `array`. If `array` is empty or falsey
- * `undefined` is returned.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * _.max([4, 2, 8, 6]);
- * // => 8
- *
- * _.max([]);
- * // => undefined
- */
- function max(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, gt)
- : undefined;
- }
-
- /**
- * This method is like `_.max` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * the value is ranked. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {*} Returns the maximum value.
- * @example
- *
- * var objects = [{ 'n': 1 }, { 'n': 2 }];
- *
- * _.maxBy(objects, function(o) { return o.n; });
- * // => { 'n': 2 }
- *
- * // The `_.property` iteratee shorthand.
- * _.maxBy(objects, 'n');
- * // => { 'n': 2 }
- */
- function maxBy(array, iteratee) {
- return (array && array.length)
- ? baseExtremum(array, getIteratee(iteratee), gt)
- : undefined;
- }
-
- /**
- * Computes the mean of the values in `array`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {number} Returns the mean.
- * @example
- *
- * _.mean([4, 2, 8, 6]);
- * // => 5
- */
- function mean(array) {
- return sum(array) / (array ? array.length : 0);
- }
-
- /**
- * Computes the minimum value of `array`. If `array` is empty or falsey
- * `undefined` is returned.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * _.min([4, 2, 8, 6]);
- * // => 2
- *
- * _.min([]);
- * // => undefined
- */
- function min(array) {
- return (array && array.length)
- ? baseExtremum(array, identity, lt)
- : undefined;
- }
-
- /**
- * This method is like `_.min` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the criterion by which
- * the value is ranked. The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {*} Returns the minimum value.
- * @example
- *
- * var objects = [{ 'n': 1 }, { 'n': 2 }];
- *
- * _.minBy(objects, function(o) { return o.n; });
- * // => { 'n': 1 }
- *
- * // The `_.property` iteratee shorthand.
- * _.minBy(objects, 'n');
- * // => { 'n': 1 }
- */
- function minBy(array, iteratee) {
- return (array && array.length)
- ? baseExtremum(array, getIteratee(iteratee), lt)
- : undefined;
- }
-
- /**
- * Computes `number` rounded to `precision`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} number The number to round.
- * @param {number} [precision=0] The precision to round to.
- * @returns {number} Returns the rounded number.
- * @example
- *
- * _.round(4.006);
- * // => 4
- *
- * _.round(4.006, 2);
- * // => 4.01
- *
- * _.round(4060, -2);
- * // => 4100
- */
- var round = createRound('round');
-
- /**
- * Subtract two numbers.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {number} minuend The first number in a subtraction.
- * @param {number} subtrahend The second number in a subtraction.
- * @returns {number} Returns the difference.
- * @example
- *
- * _.subtract(6, 4);
- * // => 2
- */
- function subtract(minuend, subtrahend) {
- var result;
- if (minuend === undefined && subtrahend === undefined) {
- return 0;
- }
- if (minuend !== undefined) {
- result = minuend;
- }
- if (subtrahend !== undefined) {
- result = result === undefined ? subtrahend : (result - subtrahend);
- }
- return result;
- }
-
- /**
- * Computes the sum of the values in `array`.
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @returns {number} Returns the sum.
- * @example
- *
- * _.sum([4, 2, 8, 6]);
- * // => 20
- */
- function sum(array) {
- return (array && array.length)
- ? baseSum(array, identity)
- : 0;
- }
-
- /**
- * This method is like `_.sum` except that it accepts `iteratee` which is
- * invoked for each element in `array` to generate the value to be summed.
- * The iteratee is invoked with one argument: (value).
- *
- * @static
- * @memberOf _
- * @category Math
- * @param {Array} array The array to iterate over.
- * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
- * @returns {number} Returns the sum.
- * @example
- *
- * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
- *
- * _.sumBy(objects, function(o) { return o.n; });
- * // => 20
- *
- * // The `_.property` iteratee shorthand.
- * _.sumBy(objects, 'n');
- * // => 20
- */
- function sumBy(array, iteratee) {
- return (array && array.length)
- ? baseSum(array, getIteratee(iteratee))
- : 0;
- }
-
- /*------------------------------------------------------------------------*/
-
- // Ensure wrappers are instances of `baseLodash`.
- lodash.prototype = baseLodash.prototype;
-
- LodashWrapper.prototype = baseCreate(baseLodash.prototype);
- LodashWrapper.prototype.constructor = LodashWrapper;
-
- LazyWrapper.prototype = baseCreate(baseLodash.prototype);
- LazyWrapper.prototype.constructor = LazyWrapper;
-
- // Avoid inheriting from `Object.prototype` when possible.
- Hash.prototype = nativeCreate ? nativeCreate(null) : objectProto;
-
- // Add functions to the `MapCache`.
- MapCache.prototype.clear = mapClear;
- MapCache.prototype['delete'] = mapDelete;
- MapCache.prototype.get = mapGet;
- MapCache.prototype.has = mapHas;
- MapCache.prototype.set = mapSet;
-
- // Add functions to the `SetCache`.
- SetCache.prototype.push = cachePush;
-
- // Add functions to the `Stack` cache.
- Stack.prototype.clear = stackClear;
- Stack.prototype['delete'] = stackDelete;
- Stack.prototype.get = stackGet;
- Stack.prototype.has = stackHas;
- Stack.prototype.set = stackSet;
-
- // Assign cache to `_.memoize`.
- memoize.Cache = MapCache;
-
- // Add functions that return wrapped values when chaining.
- lodash.after = after;
- lodash.ary = ary;
- lodash.assign = assign;
- lodash.assignIn = assignIn;
- lodash.assignInWith = assignInWith;
- lodash.assignWith = assignWith;
- lodash.at = at;
- lodash.before = before;
- lodash.bind = bind;
- lodash.bindAll = bindAll;
- lodash.bindKey = bindKey;
- lodash.castArray = castArray;
- lodash.chain = chain;
- lodash.chunk = chunk;
- lodash.compact = compact;
- lodash.concat = concat;
- lodash.cond = cond;
- lodash.conforms = conforms;
- lodash.constant = constant;
- lodash.countBy = countBy;
- lodash.create = create;
- lodash.curry = curry;
- lodash.curryRight = curryRight;
- lodash.debounce = debounce;
- lodash.defaults = defaults;
- lodash.defaultsDeep = defaultsDeep;
- lodash.defer = defer;
- lodash.delay = delay;
- lodash.difference = difference;
- lodash.differenceBy = differenceBy;
- lodash.differenceWith = differenceWith;
- lodash.drop = drop;
- lodash.dropRight = dropRight;
- lodash.dropRightWhile = dropRightWhile;
- lodash.dropWhile = dropWhile;
- lodash.fill = fill;
- lodash.filter = filter;
- lodash.flatMap = flatMap;
- lodash.flatten = flatten;
- lodash.flattenDeep = flattenDeep;
- lodash.flattenDepth = flattenDepth;
- lodash.flip = flip;
- lodash.flow = flow;
- lodash.flowRight = flowRight;
- lodash.fromPairs = fromPairs;
- lodash.functions = functions;
- lodash.functionsIn = functionsIn;
- lodash.groupBy = groupBy;
- lodash.initial = initial;
- lodash.intersection = intersection;
- lodash.intersectionBy = intersectionBy;
- lodash.intersectionWith = intersectionWith;
- lodash.invert = invert;
- lodash.invertBy = invertBy;
- lodash.invokeMap = invokeMap;
- lodash.iteratee = iteratee;
- lodash.keyBy = keyBy;
- lodash.keys = keys;
- lodash.keysIn = keysIn;
- lodash.map = map;
- lodash.mapKeys = mapKeys;
- lodash.mapValues = mapValues;
- lodash.matches = matches;
- lodash.matchesProperty = matchesProperty;
- lodash.memoize = memoize;
- lodash.merge = merge;
- lodash.mergeWith = mergeWith;
- lodash.method = method;
- lodash.methodOf = methodOf;
- lodash.mixin = mixin;
- lodash.negate = negate;
- lodash.nthArg = nthArg;
- lodash.omit = omit;
- lodash.omitBy = omitBy;
- lodash.once = once;
- lodash.orderBy = orderBy;
- lodash.over = over;
- lodash.overArgs = overArgs;
- lodash.overEvery = overEvery;
- lodash.overSome = overSome;
- lodash.partial = partial;
- lodash.partialRight = partialRight;
- lodash.partition = partition;
- lodash.pick = pick;
- lodash.pickBy = pickBy;
- lodash.property = property;
- lodash.propertyOf = propertyOf;
- lodash.pull = pull;
- lodash.pullAll = pullAll;
- lodash.pullAllBy = pullAllBy;
- lodash.pullAt = pullAt;
- lodash.range = range;
- lodash.rangeRight = rangeRight;
- lodash.rearg = rearg;
- lodash.reject = reject;
- lodash.remove = remove;
- lodash.rest = rest;
- lodash.reverse = reverse;
- lodash.sampleSize = sampleSize;
- lodash.set = set;
- lodash.setWith = setWith;
- lodash.shuffle = shuffle;
- lodash.slice = slice;
- lodash.sortBy = sortBy;
- lodash.sortedUniq = sortedUniq;
- lodash.sortedUniqBy = sortedUniqBy;
- lodash.split = split;
- lodash.spread = spread;
- lodash.tail = tail;
- lodash.take = take;
- lodash.takeRight = takeRight;
- lodash.takeRightWhile = takeRightWhile;
- lodash.takeWhile = takeWhile;
- lodash.tap = tap;
- lodash.throttle = throttle;
- lodash.thru = thru;
- lodash.toArray = toArray;
- lodash.toPairs = toPairs;
- lodash.toPairsIn = toPairsIn;
- lodash.toPath = toPath;
- lodash.toPlainObject = toPlainObject;
- lodash.transform = transform;
- lodash.unary = unary;
- lodash.union = union;
- lodash.unionBy = unionBy;
- lodash.unionWith = unionWith;
- lodash.uniq = uniq;
- lodash.uniqBy = uniqBy;
- lodash.uniqWith = uniqWith;
- lodash.unset = unset;
- lodash.unzip = unzip;
- lodash.unzipWith = unzipWith;
- lodash.values = values;
- lodash.valuesIn = valuesIn;
- lodash.without = without;
- lodash.words = words;
- lodash.wrap = wrap;
- lodash.xor = xor;
- lodash.xorBy = xorBy;
- lodash.xorWith = xorWith;
- lodash.zip = zip;
- lodash.zipObject = zipObject;
- lodash.zipObjectDeep = zipObjectDeep;
- lodash.zipWith = zipWith;
-
- // Add aliases.
- lodash.extend = assignIn;
- lodash.extendWith = assignInWith;
-
- // Add functions to `lodash.prototype`.
- mixin(lodash, lodash);
-
- /*------------------------------------------------------------------------*/
-
- // Add functions that return unwrapped values when chaining.
- lodash.add = add;
- lodash.attempt = attempt;
- lodash.camelCase = camelCase;
- lodash.capitalize = capitalize;
- lodash.ceil = ceil;
- lodash.clamp = clamp;
- lodash.clone = clone;
- lodash.cloneDeep = cloneDeep;
- lodash.cloneDeepWith = cloneDeepWith;
- lodash.cloneWith = cloneWith;
- lodash.deburr = deburr;
- lodash.endsWith = endsWith;
- lodash.eq = eq;
- lodash.escape = escape;
- lodash.escapeRegExp = escapeRegExp;
- lodash.every = every;
- lodash.find = find;
- lodash.findIndex = findIndex;
- lodash.findKey = findKey;
- lodash.findLast = findLast;
- lodash.findLastIndex = findLastIndex;
- lodash.findLastKey = findLastKey;
- lodash.floor = floor;
- lodash.forEach = forEach;
- lodash.forEachRight = forEachRight;
- lodash.forIn = forIn;
- lodash.forInRight = forInRight;
- lodash.forOwn = forOwn;
- lodash.forOwnRight = forOwnRight;
- lodash.get = get;
- lodash.gt = gt;
- lodash.gte = gte;
- lodash.has = has;
- lodash.hasIn = hasIn;
- lodash.head = head;
- lodash.identity = identity;
- lodash.includes = includes;
- lodash.indexOf = indexOf;
- lodash.inRange = inRange;
- lodash.invoke = invoke;
- lodash.isArguments = isArguments;
- lodash.isArray = isArray;
- lodash.isArrayBuffer = isArrayBuffer;
- lodash.isArrayLike = isArrayLike;
- lodash.isArrayLikeObject = isArrayLikeObject;
- lodash.isBoolean = isBoolean;
- lodash.isBuffer = isBuffer;
- lodash.isDate = isDate;
- lodash.isElement = isElement;
- lodash.isEmpty = isEmpty;
- lodash.isEqual = isEqual;
- lodash.isEqualWith = isEqualWith;
- lodash.isError = isError;
- lodash.isFinite = isFinite;
- lodash.isFunction = isFunction;
- lodash.isInteger = isInteger;
- lodash.isLength = isLength;
- lodash.isMap = isMap;
- lodash.isMatch = isMatch;
- lodash.isMatchWith = isMatchWith;
- lodash.isNaN = isNaN;
- lodash.isNative = isNative;
- lodash.isNil = isNil;
- lodash.isNull = isNull;
- lodash.isNumber = isNumber;
- lodash.isObject = isObject;
- lodash.isObjectLike = isObjectLike;
- lodash.isPlainObject = isPlainObject;
- lodash.isRegExp = isRegExp;
- lodash.isSafeInteger = isSafeInteger;
- lodash.isSet = isSet;
- lodash.isString = isString;
- lodash.isSymbol = isSymbol;
- lodash.isTypedArray = isTypedArray;
- lodash.isUndefined = isUndefined;
- lodash.isWeakMap = isWeakMap;
- lodash.isWeakSet = isWeakSet;
- lodash.join = join;
- lodash.kebabCase = kebabCase;
- lodash.last = last;
- lodash.lastIndexOf = lastIndexOf;
- lodash.lowerCase = lowerCase;
- lodash.lowerFirst = lowerFirst;
- lodash.lt = lt;
- lodash.lte = lte;
- lodash.max = max;
- lodash.maxBy = maxBy;
- lodash.mean = mean;
- lodash.min = min;
- lodash.minBy = minBy;
- lodash.noConflict = noConflict;
- lodash.noop = noop;
- lodash.now = now;
- lodash.pad = pad;
- lodash.padEnd = padEnd;
- lodash.padStart = padStart;
- lodash.parseInt = parseInt;
- lodash.random = random;
- lodash.reduce = reduce;
- lodash.reduceRight = reduceRight;
- lodash.repeat = repeat;
- lodash.replace = replace;
- lodash.result = result;
- lodash.round = round;
- lodash.runInContext = runInContext;
- lodash.sample = sample;
- lodash.size = size;
- lodash.snakeCase = snakeCase;
- lodash.some = some;
- lodash.sortedIndex = sortedIndex;
- lodash.sortedIndexBy = sortedIndexBy;
- lodash.sortedIndexOf = sortedIndexOf;
- lodash.sortedLastIndex = sortedLastIndex;
- lodash.sortedLastIndexBy = sortedLastIndexBy;
- lodash.sortedLastIndexOf = sortedLastIndexOf;
- lodash.startCase = startCase;
- lodash.startsWith = startsWith;
- lodash.subtract = subtract;
- lodash.sum = sum;
- lodash.sumBy = sumBy;
- lodash.template = template;
- lodash.times = times;
- lodash.toInteger = toInteger;
- lodash.toLength = toLength;
- lodash.toLower = toLower;
- lodash.toNumber = toNumber;
- lodash.toSafeInteger = toSafeInteger;
- lodash.toString = toString;
- lodash.toUpper = toUpper;
- lodash.trim = trim;
- lodash.trimEnd = trimEnd;
- lodash.trimStart = trimStart;
- lodash.truncate = truncate;
- lodash.unescape = unescape;
- lodash.uniqueId = uniqueId;
- lodash.upperCase = upperCase;
- lodash.upperFirst = upperFirst;
-
- // Add aliases.
- lodash.each = forEach;
- lodash.eachRight = forEachRight;
- lodash.first = head;
-
- mixin(lodash, (function() {
- var source = {};
- baseForOwn(lodash, function(func, methodName) {
- if (!hasOwnProperty.call(lodash.prototype, methodName)) {
- source[methodName] = func;
- }
- });
- return source;
- }()), { 'chain': false });
-
- /*------------------------------------------------------------------------*/
-
- /**
- * The semantic version number.
- *
- * @static
- * @memberOf _
- * @type {string}
- */
- lodash.VERSION = VERSION;
-
- // Assign default placeholders.
- arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
- lodash[methodName].placeholder = lodash;
- });
-
- // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
- arrayEach(['drop', 'take'], function(methodName, index) {
- LazyWrapper.prototype[methodName] = function(n) {
- var filtered = this.__filtered__;
- if (filtered && !index) {
- return new LazyWrapper(this);
- }
- n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
-
- var result = this.clone();
- if (filtered) {
- result.__takeCount__ = nativeMin(n, result.__takeCount__);
- } else {
- result.__views__.push({
- 'size': nativeMin(n, MAX_ARRAY_LENGTH),
- 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
- });
- }
- return result;
- };
-
- LazyWrapper.prototype[methodName + 'Right'] = function(n) {
- return this.reverse()[methodName](n).reverse();
- };
- });
-
- // Add `LazyWrapper` methods that accept an `iteratee` value.
- arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
- var type = index + 1,
- isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
-
- LazyWrapper.prototype[methodName] = function(iteratee) {
- var result = this.clone();
- result.__iteratees__.push({
- 'iteratee': getIteratee(iteratee, 3),
- 'type': type
- });
- result.__filtered__ = result.__filtered__ || isFilter;
- return result;
- };
- });
-
- // Add `LazyWrapper` methods for `_.head` and `_.last`.
- arrayEach(['head', 'last'], function(methodName, index) {
- var takeName = 'take' + (index ? 'Right' : '');
-
- LazyWrapper.prototype[methodName] = function() {
- return this[takeName](1).value()[0];
- };
- });
-
- // Add `LazyWrapper` methods for `_.initial` and `_.tail`.
- arrayEach(['initial', 'tail'], function(methodName, index) {
- var dropName = 'drop' + (index ? '' : 'Right');
-
- LazyWrapper.prototype[methodName] = function() {
- return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
- };
- });
-
- LazyWrapper.prototype.compact = function() {
- return this.filter(identity);
- };
-
- LazyWrapper.prototype.find = function(predicate) {
- return this.filter(predicate).head();
- };
-
- LazyWrapper.prototype.findLast = function(predicate) {
- return this.reverse().find(predicate);
- };
-
- LazyWrapper.prototype.invokeMap = rest(function(path, args) {
- if (typeof path == 'function') {
- return new LazyWrapper(this);
- }
- return this.map(function(value) {
- return baseInvoke(value, path, args);
- });
- });
-
- LazyWrapper.prototype.reject = function(predicate) {
- predicate = getIteratee(predicate, 3);
- return this.filter(function(value) {
- return !predicate(value);
- });
- };
-
- LazyWrapper.prototype.slice = function(start, end) {
- start = toInteger(start);
-
- var result = this;
- if (result.__filtered__ && (start > 0 || end < 0)) {
- return new LazyWrapper(result);
- }
- if (start < 0) {
- result = result.takeRight(-start);
- } else if (start) {
- result = result.drop(start);
- }
- if (end !== undefined) {
- end = toInteger(end);
- result = end < 0 ? result.dropRight(-end) : result.take(end - start);
- }
- return result;
- };
-
- LazyWrapper.prototype.takeRightWhile = function(predicate) {
- return this.reverse().takeWhile(predicate).reverse();
- };
-
- LazyWrapper.prototype.toArray = function() {
- return this.take(MAX_ARRAY_LENGTH);
- };
-
- // Add `LazyWrapper` methods to `lodash.prototype`.
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
- isTaker = /^(?:head|last)$/.test(methodName),
- lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
- retUnwrapped = isTaker || /^find/.test(methodName);
-
- if (!lodashFunc) {
- return;
- }
- lodash.prototype[methodName] = function() {
- var value = this.__wrapped__,
- args = isTaker ? [1] : arguments,
- isLazy = value instanceof LazyWrapper,
- iteratee = args[0],
- useLazy = isLazy || isArray(value);
-
- var interceptor = function(value) {
- var result = lodashFunc.apply(lodash, arrayPush([value], args));
- return (isTaker && chainAll) ? result[0] : result;
- };
-
- if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
- // Avoid lazy use if the iteratee has a "length" value other than `1`.
- isLazy = useLazy = false;
- }
- var chainAll = this.__chain__,
- isHybrid = !!this.__actions__.length,
- isUnwrapped = retUnwrapped && !chainAll,
- onlyLazy = isLazy && !isHybrid;
-
- if (!retUnwrapped && useLazy) {
- value = onlyLazy ? value : new LazyWrapper(this);
- var result = func.apply(value, args);
- result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
- return new LodashWrapper(result, chainAll);
- }
- if (isUnwrapped && onlyLazy) {
- return func.apply(this, args);
- }
- result = this.thru(interceptor);
- return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
- };
- });
-
- // Add `Array` and `String` methods to `lodash.prototype`.
- arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
- var func = arrayProto[methodName],
- chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
- retUnwrapped = /^(?:pop|shift)$/.test(methodName);
-
- lodash.prototype[methodName] = function() {
- var args = arguments;
- if (retUnwrapped && !this.__chain__) {
- return func.apply(this.value(), args);
- }
- return this[chainName](function(value) {
- return func.apply(value, args);
- });
- };
- });
-
- // Map minified function names to their real names.
- baseForOwn(LazyWrapper.prototype, function(func, methodName) {
- var lodashFunc = lodash[methodName];
- if (lodashFunc) {
- var key = (lodashFunc.name + ''),
- names = realNames[key] || (realNames[key] = []);
-
- names.push({ 'name': methodName, 'func': lodashFunc });
- }
- });
-
- realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{
- 'name': 'wrapper',
- 'func': undefined
- }];
-
- // Add functions to the lazy wrapper.
- LazyWrapper.prototype.clone = lazyClone;
- LazyWrapper.prototype.reverse = lazyReverse;
- LazyWrapper.prototype.value = lazyValue;
-
- // Add chaining functions to the `lodash` wrapper.
- lodash.prototype.at = wrapperAt;
- lodash.prototype.chain = wrapperChain;
- lodash.prototype.commit = wrapperCommit;
- lodash.prototype.flatMap = wrapperFlatMap;
- lodash.prototype.next = wrapperNext;
- lodash.prototype.plant = wrapperPlant;
- lodash.prototype.reverse = wrapperReverse;
- lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
-
- if (iteratorSymbol) {
- lodash.prototype[iteratorSymbol] = wrapperToIterator;
- }
- return lodash;
- }
-
- /*--------------------------------------------------------------------------*/
-
- // Export lodash.
- var _ = runInContext();
-
- // Expose lodash on the free variable `window` or `self` when available. This
- // prevents errors in cases where lodash is loaded by a script tag in the presence
- // of an AMD loader. See http://requirejs.org/docs/errors.html#mismatch for more details.
- (freeWindow || freeSelf || {})._ = _;
-
- // Some AMD build optimizers like r.js check for condition patterns like the following:
- if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
- // Define as an anonymous module so, through path mapping, it can be
- // referenced as the "underscore" module.
- define(function() {
- return _;
- });
- }
- // Check for `exports` after `define` in case a build optimizer adds an `exports` object.
- else if (freeExports && freeModule) {
- // Export for Node.js.
- if (moduleExports) {
- (freeModule.exports = _)._ = _;
- }
- // Export for CommonJS support.
- freeExports._ = _;
- }
- else {
- // Export to the global object.
- root._ = _;
- }
-}.call(this));
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/images/blank.gif b/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/images/blank.gif
deleted file mode 100644
index 75b945d2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/images/blank.gif
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/scribble.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/scribble.css
deleted file mode 100644
index 9986f2ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/scribble.css
+++ /dev/null
@@ -1,40 +0,0 @@
-#scribble-pad {
-/* margin-left:auto;
- margin-right:auto;
- height: 475px;
- width: 475px;*/
- background:url(https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/resource/stickynote.jpg) no-repeat center center;
- background-size: 110% 110%;
-}
-
-
-
-#scribble {
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
- max-width: 300px;
- padding: 120px 100px 100px 75px;
- color: #486891;
- border-color: #ff0000 #0000ff;
- border-color: transparent;
- background-color:rgba(0, 0, 0, 0);
- font-family: Arial,sans-serif;
- font-size: 120%;
- font-style: italic;
- font-weight:bold;
- line-height: 1.5em;
-}
-
-#scribble:focus {
-outline-width: 0;
-}
-.c-link {
- color: #486891;
- font-family: Arial,sans-serif;
- font-size: 95%;
- font-weight:bold;
- text-decoration: none;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/slider.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/slider.css
deleted file mode 100644
index f609403c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/slider.css
+++ /dev/null
@@ -1,142 +0,0 @@
-div,span,p { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; }
-
-
-#container {
- width:580px;
- padding:10px;
- margin:0 auto;
- position:relative;
- z-index:0;
-}
-
-#example {
- width:600px;
- height:350px;
- position:relative;
-}
-
-#ribbon {
- position:absolute;
- top:-3px;
- left:-15px;
- z-index:500;
-}
-
-#frame {
- position:absolute;
- z-index:0;
- width:739px;
- height:341px;
- top:-3px;
- left:-80px;
-}
-
-/*
- Slideshow
-*/
-
-#slides {
- position:absolute;
- top:15px;
- left:4px;
- z-index:100;
-}
-
-/*
- Slides container
- Important:
- Set the width of your slides container
- Set to display none, prevents content flash
-*/
-
-.slides_container {
- width:570px;
- overflow:hidden;
- position:relative;
- display:none;
-}
-
-/*
- Each slide
- Important:
- Set the width of your slides
- If height not specified height will be set by the slide content
- Set to display block
-*/
-
-.slides_container div.slide {
- width:570px;
- height:270px;
- display:block;
-}
-
-
-/*
- Next/prev buttons
-*/
-
-#slides .next,#slides .prev {
- position:absolute;
- top:107px;
- left:-39px;
- width:24px;
- height:43px;
- display:block;
- z-index:101;
-}
-
-#slides .next {
- left:585px;
-}
-
-/*
- Pagination
-*/
-
-.pagination {
- margin:26px auto 0;
- width:100px;
-}
-
-.pagination li {
- float:left;
- margin:0 1px;
- list-style:none;
-}
-
-.pagination li a {
- display:block;
- width:12px;
- height:0;
- padding-top:12px;
- background-image:url(../images/pagination.png);
- background-position:0 0;
- float:left;
- overflow:hidden;
-}
-
-.pagination li.current a {
- background-position:0 -12px;
-}
-
-/*
- Caption
-*/
-
-.caption {
- z-index:500;
- position:absolute;
- bottom:-35px;
- left:0;
- height:30px;
- padding:5px 20px 0 20px;
- background:#000;
- background:rgba(0,0,0,.5);
- width:540px;
- font-size:1.3em;
- line-height:1.33;
- color:#fff;
- border-top:1px solid #000;
- text-shadow:none;
-}
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/spacegallery.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/spacegallery.css
deleted file mode 100644
index ce4fd57c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/css/spacegallery.css
+++ /dev/null
@@ -1,18 +0,0 @@
-.spacegallery {
- position: relative;
- overflow: hidden;
-}
-.spacegallery img {
- position: absolute;
- left: 50%;
-}
-.spacegallery a {
- position: absolute;
- z-index: 1000;
- display: block;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: url(images/blank.gif);
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/area_chart.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/area_chart.html
deleted file mode 100644
index 30ef2011..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/area_chart.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 175px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script>
-historicalBarChart = [
- { "type":"line", "key": "AP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.13}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.36}, { "x":1388552400000 , "y":10.0}, { "x":1391230800000 , "y":3.15}, { "x":1391230800000 , "y":2.88}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":4.0}, { "x":1393650000000 , "y":8.0}, { "x":1393650000000 , "y":3.93}, { "x":1393650000000 , "y":4.27}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.25}, { "x":1396324800000 , "y":5.35}, { "x":1396324800000 , "y":5.92}, { "x":1396324800000 , "y":12.0}, { "x":1398916800000 , "y":5.55}, { "x":1398916800000 , "y":4.89}, { "x":1398916800000 , "y":5.01}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.27}, { "x":1401595200000 , "y":9.17}, { "x":1401595200000 , "y":9.31}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.37}, { "x":1404187200000 , "y":8.11}, { "x":1404187200000 , "y":8.84}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.79}, { "x":1406865600000 , "y":12.22}, { "x":1406865600000 , "y":12.6}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":15.27}, { "x":1409544000000 , "y":19.09}, { "x":1409544000000 , "y":16.09}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":18.4}, { "x":1412136000000 , "y":22.05}, { "x":1412136000000 , "y":21.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":19.13}, { "x":1414814400000 , "y":19.61}, { "x":1414814400000 , "y":17.61}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":19.0}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.67}, { "x":1420088400000 , "y":15.19}, { "x":1420088400000 , "y":15.02}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":16.95}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":12.9}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"line", "key": "ROUTER_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":3.0}, { "x":1388552400000 , "y":4.0}, { "x":1388552400000 , "y":4.89}, { "x":1388552400000 , "y":7.0}, { "x":1391230800000 , "y":4.57}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":7.0}, { "x":1393650000000 , "y":7.0}, { "x":1393650000000 , "y":4.18}, { "x":1393650000000 , "y":5.0}, { "x":1393650000000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.06}, { "x":1396324800000 , "y":6.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.09}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.0}, { "x":1404187200000 , "y":6.36}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1406865600000 , "y":7.0}, { "x":1406865600000 , "y":7.02}, { "x":1406865600000 , "y":7.24}, { "x":1406865600000 , "y":7.0}, { "x":1409544000000 , "y":8.23}, { "x":1409544000000 , "y":8.11}, { "x":1409544000000 , "y":8.12}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9.0}, { "x":1412136000000 , "y":8.93}, { "x":1412136000000 , "y":8.57}, { "x":1412136000000 , "y":9.0}, { "x":1414814400000 , "y":5.97}, { "x":1414814400000 , "y":6.0}, { "x":1414814400000 , "y":9.0}, { "x":1414814400000 , "y":9.0}, { "x":1417410000000 , "y":9.0}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":2.01}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2.67}, { "x":1422766800000 , "y":2.0}, { "x":1425186000000 , "y":2.8}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"line", "key": "SCTP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":7.0}, { "x":1388552400000 , "y":10.0}, { "x":1388552400000 , "y":8.27}, { "x":1388552400000 , "y":8.0}, { "x":1391230800000 , "y":10.02}, { "x":1391230800000 , "y":8.04}, { "x":1391230800000 , "y":9.0}, { "x":1391230800000 , "y":10.0}, { "x":1393650000000 , "y":12.0}, { "x":1393650000000 , "y":10.04}, { "x":1393650000000 , "y":11.16}, { "x":1393650000000 , "y":10.0}, { "x":1396324800000 , "y":10.7}, { "x":1396324800000 , "y":13.31}, { "x":1396324800000 , "y":12.73}, { "x":1396324800000 , "y":9.0}, { "x":1398916800000 , "y":12.41}, { "x":1398916800000 , "y":11.95}, { "x":1398916800000 , "y":12.82}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.28}, { "x":1401595200000 , "y":14.01}, { "x":1401595200000 , "y":14.63}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.06}, { "x":1404187200000 , "y":13.96}, { "x":1404187200000 , "y":14.66}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":16.6}, { "x":1406865600000 , "y":16.95}, { "x":1406865600000 , "y":17.11}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":19.86}, { "x":1409544000000 , "y":22.97}, { "x":1409544000000 , "y":21.56}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":22.66}, { "x":1412136000000 , "y":26.79}, { "x":1412136000000 , "y":26.54}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":21.0}, { "x":1414814400000 , "y":20.35}, { "x":1414814400000 , "y":21.93}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":24.0}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.63}, { "x":1420088400000 , "y":25.14}, { "x":1420088400000 , "y":21.85}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":26.3}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":23.3833333333333}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"line", "key": "DP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.0}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.17}, { "x":1388552400000 , "y":2.0}, { "x":1391230800000 , "y":3.01}, { "x":1391230800000 , "y":2.56}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":9.0}, { "x":1393650000000 , "y":10.0}, { "x":1393650000000 , "y":3.64}, { "x":1393650000000 , "y":4.06}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.04}, { "x":1396324800000 , "y":5.11}, { "x":1396324800000 , "y":5.9}, { "x":1396324800000 , "y":8.0}, { "x":1398916800000 , "y":5.08}, { "x":1398916800000 , "y":4.65}, { "x":1398916800000 , "y":4.74}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":6.13}, { "x":1401595200000 , "y":8.98}, { "x":1401595200000 , "y":9.22}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.12}, { "x":1404187200000 , "y":7.89}, { "x":1404187200000 , "y":8.41}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":11.06}, { "x":1406865600000 , "y":11.84}, { "x":1406865600000 , "y":11.92}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":14.58}, { "x":1409544000000 , "y":18.39}, { "x":1409544000000 , "y":15.5}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.01}, { "x":1412136000000 , "y":21.3}, { "x":1412136000000 , "y":21.11}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":18.59}, { "x":1414814400000 , "y":18.81}, { "x":1414814400000 , "y":17.13}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":18.0}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.16}, { "x":1420088400000 , "y":12.13}, { "x":1420088400000 , "y":11.76}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.47}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.2333333333333}, { "x":1425186000000 , "y":12.4} ] }
-];
-
-</script>
-<script src="js/area_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/bar_chart.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/bar_chart.html
deleted file mode 100644
index 0be16ec1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/bar_chart.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 420px;
- width: 700px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/tooltip.js"></script>
-<script src="../../d3/js/utils.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script src="../../d3/js/models/multiChart.js"></script>
-<script>
-historicalBarChart = [
- { "type":"bar", "key": "AP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":10}, { "x":1391230800000 , "y":4}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":12}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"bar", "key": "ROUTER_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":7}, { "x":1391230800000 , "y":7}, { "x":1393650000000 , "y":5}, { "x":1396324800000 , "y":6}, { "x":1398916800000 , "y":5}, { "x":1401595200000 , "y":6}, { "x":1404187200000 , "y":7}, { "x":1406865600000 , "y":7}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9}, { "x":1414814400000 , "y":9}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"bar", "key": "SCTP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":8}, { "x":1391230800000 , "y":10}, { "x":1393650000000 , "y":10}, { "x":1396324800000 , "y":9}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"bar", "key": "DP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":2}, { "x":1391230800000 , "y":9}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":8}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.4} ] }
-];
-var chart;
-nv.addGraph(function() {
- chart = nv.models.multiBarChart()
- .margin({top: 30, right: 60, bottom: 50, left: 100})
- .showLegend(true)
- .reduceXTicks(false)
- .forceY([0, 34.0])
- .showControls(true)
- .stacked(false)
- .logScale(false)
- .legendPos('top')
- .color(d3.scale.category10().range());
- chart.xAxis
- .tickValues([1388552400000,1391230800000,1393650000000,1396324800000,1398916800000,1401595200000,1404187200000,1406865600000,1409544000000,1412136000000,1414814400000,1417410000000,1420088400000,1422766800000])
- .staggerLabels(false)
- .showMaxMin(false)
- .rotateLabels(90)
- .axisLabel('Timestamp')
- .tickFormat(function(d) {
- return d3.time.format('%b %y')(new Date(d)) });
- chart.yAxis
- .logScale(false)
- .axisLabel('')
- .tickFormat(d3.format(',.1f'));
- d3.select('#chart461 svg')
- .datum(historicalBarChart)
- .transition().duration(1000)
- .call(chart);
-nv.utils.windowResize(chart.update);
-return chart;
-});
-function redraw() {
- d3.select('#chart461 svg')
- .datum(historicalBarChart)
- .transition().duration(500)
- .call(chart);
-}
-
- setInterval(function () {
- redraw();
- }, 1500)
-if(historicalBarChart.length <= 0 ) {
- document.getElementById("chart461").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
- document.getElementById("chart461").className="nodatadiv";
- document.getElementById("nodata").className="nodatainner";
-}
-</script> </body></html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/d3_gauges_demo.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/d3_gauges_demo.html
deleted file mode 100644
index 94596e73..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/d3_gauges_demo.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=utf-8">
- <title>d3.js gauges</title>
-
- <style>
-
- body
- {
- font: 10px arial;
- }
-
- </style>
-
- <script src="../../d3/js/d3.v3.min.js" charset="utf-8"></script>
-
-
- <script>
-
- var dataURL = "data/speedometer2.csv";
- var gauges = [];
- var recordLength = 0;
- var dataset ;
-
- </script>
- <script type="text/javascript" src="js/gauges.min.js"></script>
-
- </head>
-
- <body onload="initialize()">
- <span id="Bedminster"></span>
- <span id="Piscataway"></span>
- <br/>
- <span id="Middletown"></span>
- <span id="Paramus"></span>
- </body>
-
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer2.csv b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer2.csv
deleted file mode 100644
index 406143ea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer2.csv
+++ /dev/null
@@ -1,16 +0,0 @@
-"YEARMONTH","Bedminster","Piscataway","Middletown","Paramus"
-"201401",8.27,4.89,2.36,2.17
-"201402",10.02,4.57,3.15,3.01
-"201403",11.16,5.00,4.27,4.06
-"201404",13.31,5.00,5.35,5.11
-"201405",12.82,5.00,5.01,4.74
-"201406",14.01,6.09,9.17,8.98
-"201407",14.66,7.00,8.84,8.41
-"201408",16.95,7.02,12.22,11.84
-"201409",21.56,8.12,16.09,15.50
-"201410",25.35,9.00,19.04,18.37
-"201411",21.93,9.00,17.61,17.13
-"201412",24.00,9.00,19.00,18.00
-"201501",25.14,2.01,15.19,12.13
-"201502",26.30,2.67,16.95,13.47
-"201503",26.5833333333333,45.63333333333333,16.1166666666667,12.40
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer3.csv b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer3.csv
deleted file mode 100644
index 046383e4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/speedometer3.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"YEARMONTH","Bedminster","Piscataway","Middletown","Paramus"
-"201401",8.27,4.89,2.36,2.17 \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/worddata.csv b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/worddata.csv
deleted file mode 100644
index 6a74cded..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/data/worddata.csv
+++ /dev/null
@@ -1,22 +0,0 @@
-text,frequency
-video,100
-Domain 2.0,75
-spectrum,60
-4GLTE,60
-research,50
-UVerse,60
-DirectTV,30
-Iusacell,89
-Gamma,79
-BigData,55
-RCloud,45
-Raptor,20
-SDN,50
-NFV,50
-ASC,70
-AVPN,40
-Web-RTC,68
-MIS,40
-UDNC,30
-3G,30
-2G,10 \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/donut_d3.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/donut_d3.html
deleted file mode 100644
index afcac359..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/donut_d3.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<style>
-
-body {
- font: 10px sans-serif;
-}
-
-svg {
- padding: 10px 0 0 10px;
-}
-
-.arc {
- stroke: #fff;
-}
-
- .slice text {
- font-size: 16pt;
- font-family: Arial;
- }
-</style>
-<body>
-<script src="../../d3/js/d3.js"></script>
-
-<script>
-
-var radius = 74,
- padding = 10;
-
-var width = 200,
- height = 200;
-
-var outerRadius = height / 2 - 20,
- innerRadius = outerRadius / 3,
- cornerRadius = 10;
-//var color = d3.scale.ordinal()
- // .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]);
- var color = d3.scale.category10();
- var dataURL = "data/speedometer3.csv";
-
-
-</script>
-<script src="js/donut.min.js"></script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/area_chart.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/area_chart.min.js
deleted file mode 100644
index 9b3decb9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/area_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redrawAreaChart(){d3.select("#areaChart svg").datum(historicalBarChart).call(area_chart)}var area_chart;nv.addGraph(function(){return area_chart=nv.models.stackedAreaChart().showControls(!1).margin({top:30,right:60,bottom:50,left:100}).showLegend(!1).yAxisTooltipFormat(d3.format(",.1f")).x(function(a){return a.x}).y(function(a){return a.y}).color(d3.scale.category10().range()),area_chart.xAxis.axisLabel("").staggerLabels(!1).showMaxMin(!1).rotateLabels(90).tickFormat(function(a){return d3.time.format("%b %y")(new Date(a))}),area_chart.yAxis.axisLabel("").tickFormat(d3.format(",.1f")),d3.select("#areaChart svg").datum(historicalBarChart).call(area_chart),nv.utils.windowResize(area_chart.update),area_chart}),redrawAreaChart(),historicalBarChart.length<=0&&(document.getElementById("areaChart").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("areaChart").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/donut.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/donut.min.js
deleted file mode 100644
index 60c4fd4b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/donut.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function angle(t){var e=90*(t.startAngle+t.endAngle)/Math.PI-90;return e>90?e-180:e}function arcTween(t,e){return function(){d3.select(this).transition().delay(e).attrTween("d",function(e){var r=d3.interpolate(e.outerRadius,t);return function(t){return e.outerRadius=r(t),arc(e)}})}}var arc=d3.svg.arc().padRadius(outerRadius).innerRadius(innerRadius),pie=d3.layout.pie().sort(null).padAngle(.02).value(function(t){return t.performance});d3.csv(dataURL,function(t,e){color.domain(d3.keys(e[0]).filter(function(t){return"YEARMONTH"!==t})),e.forEach(function(t){t.performance=color.domain().map(function(e){return{name:e,performance:+t[e]}})});var r=d3.select("body").append("svg").attr("class","legend").attr("width",radius).attr("height",2*radius).selectAll("g").data(color.domain().slice().reverse()).enter().append("g").attr("transform",function(t,e){return"translate(0,"+20*e+")"});r.append("rect").attr("width",18).attr("height",18).style("fill",color),r.append("text").attr("x",24).attr("y",9).attr("dy",".35em").text(function(t){return t});var a=d3.select("body").append("svg").attr("width",width).attr("height",height).data(e).append("g").attr("transform","translate("+radius+","+height/2+")"),n=a.selectAll("g.slice").data(function(t){return pie(t.performance)}).enter().append("g").attr("class","slice");n.append("path").each(function(t){t.outerRadius=outerRadius-10}).attr("class","arc").attr("d",arc).style("fill",function(t){return color(t.data.name)}).on("mouseover",arcTween(outerRadius,0)).on("mouseout",arcTween(outerRadius-10,150)),n.append("text").attr("dy",".35em").attr("transform",function(t){return t.outerRadius=outerRadius,t.innerRadius=outerRadius/2,"translate("+arc.centroid(t)+")rotate("+angle(t)+")"}).attr("text-anchor","middle").style("fill","white").style("font","bold 12px Arial").text(function(t){return t.value}),a.append("text").attr("dy",".35em").style("text-anchor","middle").text(function(t){return t.YEARMONTH})}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/gauges.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/gauges.min.js
deleted file mode 100644
index c0fd7484..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/gauges.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function Gauge(t,i){this.placeholderName=t;var n=this;this.configure=function(t){this.config=t,this.config.size=.9*this.config.size,this.config.raduis=.97*this.config.size/2,this.config.cx=this.config.size/2,this.config.cy=this.config.size/2,this.config.min=void 0!=t.min?t.min:0,this.config.max=void 0!=t.max?t.max:100,this.config.range=this.config.max-this.config.min,this.config.majorTicks=t.majorTicks||5,this.config.minorTicks=t.minorTicks||2,this.config.greenColor=t.greenColor||"#109618",this.config.yellowColor=t.yellowColor||"#FF9900",this.config.redColor=t.redColor||"#DC3912",this.config.transitionDuration=t.transitionDuration||500},this.render=function(){this.body=d3.select("#"+this.placeholderName).append("svg:svg").attr("class","gauge").attr("width",this.config.size).attr("height",this.config.size),this.body.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",this.config.raduis).style("fill","#ccc").style("stroke","#000").style("stroke-width","0.5px"),this.body.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",.9*this.config.raduis).style("fill","#fff").style("stroke","#e0e0e0").style("stroke-width","2px");for(var t in this.config.greenZones)this.drawBand(this.config.greenZones[t].from,this.config.greenZones[t].to,n.config.greenColor);for(var t in this.config.yellowZones)this.drawBand(this.config.yellowZones[t].from,this.config.yellowZones[t].to,n.config.yellowColor);for(var t in this.config.redZones)this.drawBand(this.config.redZones[t].from,this.config.redZones[t].to,n.config.redColor);if(void 0!=this.config.label){var i=Math.round(this.config.size/12);this.body.append("svg:text").attr("x",this.config.cx).attr("y",this.config.cy/2+i/2).attr("dy",i/2).attr("text-anchor","middle").text(this.config.label).style("font-size",i+"px").style("fill","#333").style("stroke-width","0px")}for(var i=Math.round(this.config.size/16),e=this.config.range/(this.config.majorTicks-1),o=this.config.min;o<=this.config.max;o+=e){for(var a=e/this.config.minorTicks,r=o+a;r<Math.min(o+e,this.config.max);r+=a){var s=this.valueToPoint(r,.75),c=this.valueToPoint(r,.85);this.body.append("svg:line").attr("x1",s.x).attr("y1",s.y).attr("x2",c.x).attr("y2",c.y).style("stroke","#666").style("stroke-width","1px")}var s=this.valueToPoint(o,.7),c=this.valueToPoint(o,.85);if(this.body.append("svg:line").attr("x1",s.x).attr("y1",s.y).attr("x2",c.x).attr("y2",c.y).style("stroke","#333").style("stroke-width","2px"),o==this.config.min||o==this.config.max){var g=this.valueToPoint(o,.63);this.body.append("svg:text").attr("x",g.x).attr("y",g.y).attr("dy",i/3).attr("text-anchor",o==this.config.min?"start":"end").text(o).style("font-size",i+"px").style("fill","#333").style("stroke-width","0px")}}var f=this.body.append("svg:g").attr("class","pointerContainer"),h=(this.config.min+this.config.max)/2,l=this.buildPointerPath(h),d=d3.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis");f.selectAll("path").data([l]).enter().append("svg:path").attr("d",d).style("fill","#dc3912").style("stroke","#c63310").style("fill-opacity",.7),f.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",.12*this.config.raduis).style("fill","#4684EE").style("stroke","#666").style("opacity",1);var i=Math.round(this.config.size/10);f.selectAll("text").data([h]).enter().append("svg:text").attr("x",this.config.cx).attr("y",this.config.size-this.config.cy/4-i).attr("dy",i/2).attr("text-anchor","middle").style("font-size",i+"px").style("fill","#000").style("stroke-width","0px"),this.redraw(this.config.min,0)},this.buildPointerPath=function(t){function i(t,i){var e=n.valueToPoint(t,i);return e.x-=n.config.cx,e.y-=n.config.cy,e}var e=this.config.range/13,o=i(t,.85),a=i(t-e,.12),r=i(t+e,.12),s=t-this.config.range*(1/.75)/2,c=i(s,.28),g=i(s-e,.12),f=i(s+e,.12);return[o,a,f,c,g,r,o]},this.drawBand=function(t,i,e){0>=i-t||this.body.append("svg:path").style("fill",e).attr("d",d3.svg.arc().startAngle(this.valueToRadians(t)).endAngle(this.valueToRadians(i)).innerRadius(.65*this.config.raduis).outerRadius(.85*this.config.raduis)).attr("transform",function(){return"translate("+n.config.cx+", "+n.config.cy+") rotate(270)"})},this.redraw=function(t,i,e){var o=this.body.select(".pointerContainer"),a=o.selectAll("text");y=a.attr("y"),dy=parseFloat(a.attr("dy")),a.selectAll("tspan").remove(),a.append("tspan").attr("x",45).attr("dy",0).text(Math.round(t)),a.append("tspan").attr("x",45).attr("dy",10).text(i),o.selectAll("text").style("fill",function(){var i=n.config.max-n.config.min;return Math.round(t)>.9*i?"#DC3912":Math.round(t)>.5*i&&Math.round(t)<.9*i?"#FF9900":"#000000"});var r=o.selectAll("path");r.transition().duration(void 0!=e?e:this.config.transitionDuration).attrTween("transform",function(){var i=t;t>n.config.max?i=n.config.max+.02*n.config.range:t<n.config.min&&(i=n.config.min-.02*n.config.range);var e=n.valueToDegrees(i)-90,o=n._currentRotation||e;return n._currentRotation=e,function(t){var i=o+(e-o)*t;return"translate("+n.config.cx+", "+n.config.cy+") rotate("+i+")"}})},this.valueToDegrees=function(t){return t/this.config.range*270-(this.config.min/this.config.range*270+45)},this.valueToRadians=function(t){return this.valueToDegrees(t)*Math.PI/180},this.valueToPoint=function(t,i){return{x:this.config.cx-this.config.raduis*i*Math.cos(this.valueToRadians(t)),y:this.config.cy-this.config.raduis*i*Math.sin(this.valueToRadians(t))}},this.configure(i)}function createGauge(t,i,n,e){var o={size:100,label:i,min:void 0!=n?n:0,max:void 0!=e?e:100,minorTicks:5},a=o.max-o.min;o.yellowZones=[{from:o.min+.5*a,to:o.min+.9*a}],o.redZones=[{from:o.min+.9*a,to:o.max}],gauges[t]=new Gauge(t,o),gauges[t].render()}function createGauges(){createGauge("Bedminster","Bedminster",0,50),createGauge("Piscataway","Piscataway",0,50),createGauge("Middletown","Middletown",0,50),createGauge("Paramus","Paramus",0,50)}function updateGauges(t){for(var i in gauges){var n=getValue(i,t),e=getDate1(i,t);n&&gauges[i].redraw(n,e,100)}}function getValue(gauge_id,index){var d=dataset[index];return eval("d."+gauge_id)}function getDate1(t,i){var n=dataset[i];return n.YEARMONTH}function getROUTER_CPU_Value(t){d3.csv(dataURL,function(i){i.forEach(function(i,n){return n==t?i.ROUTER_CPU:void 0})})}function getAP_CPU_Value(t){d3.csv(dataURL,function(i){i.forEach(function(i,n){return n==t?i.AP_CPU:void 0})})}function updateData(){for(var t=0;t<recordLength;t++);}function initialize(){createGauges(),d3.csv(dataURL,function(t){dataset=t,recordLength=t.length,dataset.some(function(t,i){return 1==i?(updateGauges(i),1==i):void 0});var i=1e3,n=2,e=function(){return function(){return updateGauges(n++),n<recordLength?(d3.timer(e(),i),!0):(n=0,d3.timer(e(),i),!0)}};d3.timer(e(),i)})} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/line_chart.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/line_chart.min.js
deleted file mode 100644
index e501260b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/line_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redrawLineChart(){d3.select("#lineChart svg").datum(historicalBarChart).call(line_chart)}var line_chart;nv.addGraph(function(){return line_chart=nv.models.multiChart().dualaxis(!1).legendPos("top").margin({top:30,right:60,bottom:50,left:100}).showLegend(!1).color(d3.scale.category10().range()),line_chart.lines1.forceY([0,34]),line_chart.lines2.forceY([0,1]),line_chart.xAxis.axisLabel("").staggerLabels(!1).showMaxMin(!1).rotateLabels(90).tickFormat(function(a){return d3.time.format("%b %y")(new Date(a))}),line_chart.yAxis1.axisLabel("").tickFormat(d3.format(",.1f")),d3.select("#lineChart svg").datum(historicalBarChart).call(line_chart),nv.utils.windowResize(line_chart.update),line_chart}),redrawLineChart(),historicalBarChart.length<=0&&(document.getElementById("lineChart").innerHTML="<div id='noData2'><b>No Data Available</b></div>",document.getElementById("lineChart").className="nodatadiv",document.getElementById("nodata2").className="nodatainner"); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/pie_chart.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/pie_chart.min.js
deleted file mode 100644
index f78eec70..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/pie_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redraw(){d3.select("#chart423 svg").datum(historicalBarChart).transition().duration(500).call(chart)}var chart;nv.addGraph(function(){return chart=nv.models.pieChart().margin({top:30,right:60,bottom:50,left:100}).x(function(t){return t.key}).y(function(t){return t.y}),chart.showLegend(!1),d3.select("#chart423 svg").datum(historicalBarChart).transition().duration(1200).call(chart),nv.utils.windowResize(chart.update),chart}),setInterval(function(){redraw()},1500),historicalBarChart.length<=0&&(document.getElementById("chart423").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("chart423").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/worddata.min.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/worddata.min.js
deleted file mode 100644
index 6b827460..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/js/worddata.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function dataViz(t){function e(t){var e=d3.select("svg").append("g").attr("id","wordCloudG").attr("transform","translate(210,175)");e.selectAll("text").data(t).enter().append("text").style("font-size",function(t){return 1*t.size+"px"}).style("fill",function(t){return keywords.indexOf(t.text)>-1?"red":"black"}).style("opacity",.75).attr("text-anchor","middle").attr("transform",function(t){return"translate("+[t.x,t.y]+")rotate("+t.rotate+")"}).text(function(t){return t.text})}d3.layout.cloud().size([420,350]).words(t).rotate(function(t){return t.text.length>5?0:90}).fontSize(function(t){return wordScale(t.frequency)}).on("end",e).start()}d3.csv(dataURL,function(t){dataViz(t)}),wordScale=d3.scale.linear().domain([0,100]).range([0,70]).clamp(!0); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/line_chart.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/line_chart.html
deleted file mode 100644
index d4ba57a4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/line_chart.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 175px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script>
-historicalBarChart = [
- { "type":"line", "key": "AP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.13}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.36}, { "x":1388552400000 , "y":10.0}, { "x":1391230800000 , "y":3.15}, { "x":1391230800000 , "y":2.88}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":4.0}, { "x":1393650000000 , "y":8.0}, { "x":1393650000000 , "y":3.93}, { "x":1393650000000 , "y":4.27}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.25}, { "x":1396324800000 , "y":5.35}, { "x":1396324800000 , "y":5.92}, { "x":1396324800000 , "y":12.0}, { "x":1398916800000 , "y":5.55}, { "x":1398916800000 , "y":4.89}, { "x":1398916800000 , "y":5.01}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.27}, { "x":1401595200000 , "y":9.17}, { "x":1401595200000 , "y":9.31}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.37}, { "x":1404187200000 , "y":8.11}, { "x":1404187200000 , "y":8.84}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.79}, { "x":1406865600000 , "y":12.22}, { "x":1406865600000 , "y":12.6}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":15.27}, { "x":1409544000000 , "y":19.09}, { "x":1409544000000 , "y":16.09}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":18.4}, { "x":1412136000000 , "y":22.05}, { "x":1412136000000 , "y":21.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":19.13}, { "x":1414814400000 , "y":19.61}, { "x":1414814400000 , "y":17.61}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":19.0}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.67}, { "x":1420088400000 , "y":15.19}, { "x":1420088400000 , "y":15.02}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":16.95}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":12.9}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"line", "key": "ROUTER_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":3.0}, { "x":1388552400000 , "y":4.0}, { "x":1388552400000 , "y":4.89}, { "x":1388552400000 , "y":7.0}, { "x":1391230800000 , "y":4.57}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":7.0}, { "x":1393650000000 , "y":7.0}, { "x":1393650000000 , "y":4.18}, { "x":1393650000000 , "y":5.0}, { "x":1393650000000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.06}, { "x":1396324800000 , "y":6.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.09}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.0}, { "x":1404187200000 , "y":6.36}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1406865600000 , "y":7.0}, { "x":1406865600000 , "y":7.02}, { "x":1406865600000 , "y":7.24}, { "x":1406865600000 , "y":7.0}, { "x":1409544000000 , "y":8.23}, { "x":1409544000000 , "y":8.11}, { "x":1409544000000 , "y":8.12}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9.0}, { "x":1412136000000 , "y":8.93}, { "x":1412136000000 , "y":8.57}, { "x":1412136000000 , "y":9.0}, { "x":1414814400000 , "y":5.97}, { "x":1414814400000 , "y":6.0}, { "x":1414814400000 , "y":9.0}, { "x":1414814400000 , "y":9.0}, { "x":1417410000000 , "y":9.0}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":2.01}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2.67}, { "x":1422766800000 , "y":2.0}, { "x":1425186000000 , "y":2.8}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"line", "key": "SCTP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":7.0}, { "x":1388552400000 , "y":10.0}, { "x":1388552400000 , "y":8.27}, { "x":1388552400000 , "y":8.0}, { "x":1391230800000 , "y":10.02}, { "x":1391230800000 , "y":8.04}, { "x":1391230800000 , "y":9.0}, { "x":1391230800000 , "y":10.0}, { "x":1393650000000 , "y":12.0}, { "x":1393650000000 , "y":10.04}, { "x":1393650000000 , "y":11.16}, { "x":1393650000000 , "y":10.0}, { "x":1396324800000 , "y":10.7}, { "x":1396324800000 , "y":13.31}, { "x":1396324800000 , "y":12.73}, { "x":1396324800000 , "y":9.0}, { "x":1398916800000 , "y":12.41}, { "x":1398916800000 , "y":11.95}, { "x":1398916800000 , "y":12.82}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.28}, { "x":1401595200000 , "y":14.01}, { "x":1401595200000 , "y":14.63}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.06}, { "x":1404187200000 , "y":13.96}, { "x":1404187200000 , "y":14.66}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":16.6}, { "x":1406865600000 , "y":16.95}, { "x":1406865600000 , "y":17.11}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":19.86}, { "x":1409544000000 , "y":22.97}, { "x":1409544000000 , "y":21.56}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":22.66}, { "x":1412136000000 , "y":26.79}, { "x":1412136000000 , "y":26.54}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":21.0}, { "x":1414814400000 , "y":20.35}, { "x":1414814400000 , "y":21.93}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":24.0}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.63}, { "x":1420088400000 , "y":25.14}, { "x":1420088400000 , "y":21.85}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":26.3}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":23.3833333333333}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"line", "key": "DP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.0}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.17}, { "x":1388552400000 , "y":2.0}, { "x":1391230800000 , "y":3.01}, { "x":1391230800000 , "y":2.56}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":9.0}, { "x":1393650000000 , "y":10.0}, { "x":1393650000000 , "y":3.64}, { "x":1393650000000 , "y":4.06}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.04}, { "x":1396324800000 , "y":5.11}, { "x":1396324800000 , "y":5.9}, { "x":1396324800000 , "y":8.0}, { "x":1398916800000 , "y":5.08}, { "x":1398916800000 , "y":4.65}, { "x":1398916800000 , "y":4.74}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":6.13}, { "x":1401595200000 , "y":8.98}, { "x":1401595200000 , "y":9.22}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.12}, { "x":1404187200000 , "y":7.89}, { "x":1404187200000 , "y":8.41}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":11.06}, { "x":1406865600000 , "y":11.84}, { "x":1406865600000 , "y":11.92}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":14.58}, { "x":1409544000000 , "y":18.39}, { "x":1409544000000 , "y":15.5}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.01}, { "x":1412136000000 , "y":21.3}, { "x":1412136000000 , "y":21.11}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":18.59}, { "x":1414814400000 , "y":18.81}, { "x":1414814400000 , "y":17.13}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":18.0}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.16}, { "x":1420088400000 , "y":12.13}, { "x":1420088400000 , "y":11.76}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.47}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.2333333333333}, { "x":1425186000000 , "y":12.4} ] }
-];
-
-</script>
-<script src="js/line_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/pie_chart.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/pie_chart.html
deleted file mode 100644
index ebbdd9c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/pie_chart.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); } svg { display: block; } #chart423 svg {
- height: 275px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- </style>
-<body>
-<div id="chart423"><svg></svg></div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/legend.js"></script>
-<script src="../../d3/js/models/pie.js"></script>
-<script src="../../d3/js/models/pieChart.js"></script>
-<script src="../../d3/js/utils.js"></script>
-<script>
-historicalBarChart = [
-{ "key":"Bedminster", "y":8.27},
-{ "key":"Middletown", "y":2.36},
-{ "key":"Paramus", "y":2.17},
-{ "key":"Piscataway", "y":4.89}
-];
-
-</script>
-<script src="js/pie_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/wordcloud.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/wordcloud.html
deleted file mode 100644
index d9fc53fb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/html/wordcloud.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<html>
-<head>
- <title>Word Cloud Example</title>
- <meta charset="utf-8" />
-<script src="../../d3/js/d3.v3.min.js" type="text/JavaScript"></script>
-<script src="../../d3/js/colorbrewer.js" type="text/JavaScript"></script>
-<script src="../../d3/js/d3.layout.cloud.js" type="text/JavaScript"></script>
-
-</head>
-<style>
- svg {
- height: 350px;
- width: 420px;
- border: 1px solid gray;
- }
-
-</style>
-<body>
-
-<div id="viz">
- <svg>
- </svg>
-</div>
-<div id="controls" />
-</body>
- <footer>
-
-<script>
-var cloudSize = 200;
-var dataURL = "data/worddata.csv";
-var keywords = ["video", "raptor", "4GLTE", "style", "append", "attr"];
-
-</script>
-<script src="js/worddata.min.js" type="text/JavaScript"></script>
- </footer>
-
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/Calendar-16x16.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/Calendar-16x16.png
deleted file mode 100644
index ac970bda..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/Calendar-16x16.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-next.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-next.png
deleted file mode 100644
index 1a4f72c6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-next.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-prev.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-prev.png
deleted file mode 100644
index 8211eba1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/arrow-prev.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_drive_test_map.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_drive_test_map.png
deleted file mode 100644
index 78a8873b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_drive_test_map.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_county.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_county.png
deleted file mode 100644
index df471d7d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_county.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_regression.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_regression.png
deleted file mode 100644
index e59fc189..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_eppt_regression.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_ios_throughput.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_ios_throughput.png
deleted file mode 100644
index 76a2d2b7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_ios_throughput.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map.png
deleted file mode 100644
index 174ef9b8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map_legend.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map_legend.png
deleted file mode 100644
index f7f2719a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_lata_map_legend.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_nova_sdn_map.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_nova_sdn_map.png
deleted file mode 100644
index ee0ddef9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/carousel/slide_b_nova_sdn_map.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/copyicon.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/copyicon.png
deleted file mode 100644
index 6c1c3c15..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/copyicon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/deleteicon.gif b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/deleteicon.gif
deleted file mode 100644
index 4b07af82..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/deleteicon.gif
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/example-frame.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/example-frame.png
deleted file mode 100644
index 31f2fe1c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/example-frame.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/loading.gif b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/loading.gif
deleted file mode 100644
index cccb0fc9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/loading.gif
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/1_mon.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/1_mon.png
deleted file mode 100644
index d46eee50..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/1_mon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/2_tue.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/2_tue.png
deleted file mode 100644
index ed82aad3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/2_tue.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/3_wed.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/3_wed.png
deleted file mode 100644
index 8f8c0328..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/3_wed.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/4_thu.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/4_thu.png
deleted file mode 100644
index 750dca5d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/4_thu.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/5_fri.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/5_fri.png
deleted file mode 100644
index 599e51f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/5_fri.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/6_sat.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/6_sat.png
deleted file mode 100644
index 70323ea0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/6_sat.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/7_sun.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/7_sun.png
deleted file mode 100644
index 9d579d68..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/7_sun.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_IN.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_IN.png
deleted file mode 100644
index af1ac0a7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_IN.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_OUT.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_OUT.png
deleted file mode 100644
index 935b5386..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_DLSTX_OUT.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat.png
deleted file mode 100644
index 916a655f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Def.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Def.png
deleted file mode 100644
index a8b516d9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Def.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Priority.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Priority.png
deleted file mode 100644
index 2cf81411..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/images/tunnels/BH_Nat_Priority.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/FusionCharts.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/FusionCharts.js
deleted file mode 100644
index 4c174dfa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/FusionCharts.js
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
- * FusionCharts: Flash Player detection and Chart embedding.
- * Version 1.2.3F ( 22 November 2008) - Specialized for FusionChartsFREE
- * Checking Flash Version >=6 and added updateChartXML() for FREE Charts.
- * Version: 1.2.3 (1st September, 2008) - Added Fix for % and & characters, scaled dimensions, fixes in to properly handling of double quotes and single quotes in setDataXML() function.
- * Version: 1.2.2 (10th July, 2008) - Added Fix for % scaled dimensions, fixes in setDataXML() and setDataURL() functions
- * Version: 1.2.1 (21st December, 2007) - Added setting up Transparent/opaque mode: setTransparent() function
- * Version: 1.2 (1st November, 2007) - Added FORM fixes for IE
- * Version: 1.1 (29th June, 2007) - Added Player detection, New conditional fixes for IE
- *
- * Morphed from SWFObject (http://blog.deconcept.com/swfobject/) under MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-if(typeof infosoftglobal == "undefined") var infosoftglobal = new Object();
-if(typeof infosoftglobal.FusionChartsUtil == "undefined") infosoftglobal.FusionChartsUtil = new Object();
-infosoftglobal.FusionCharts = function(swf, id, w, h, debugMode, registerWithJS, c, scaleMode, lang, detectFlashVersion, autoInstallRedirect){
- if (!document.getElementById) { return; }
-
- //Flag to see whether data has been set initially
- this.initialDataSet = false;
-
- //Create container objects
- this.params = new Object();
- this.variables = new Object();
- this.attributes = new Array();
-
- //Set attributes for the SWF
- if(swf) { this.setAttribute('swf', swf); }
- if(id) { this.setAttribute('id', id); }
-
- w=w.toString().replace(/\%$/,"%25");
- if(w) { this.setAttribute('width', w); }
- h=h.toString().replace(/\%$/,"%25");
- if(h) { this.setAttribute('height', h); }
-
-
- //Set background color
- if(c) { this.addParam('bgcolor', c); }
-
- //Set Quality
- this.addParam('quality', 'high');
-
- //Add scripting access parameter
- this.addParam('allowScriptAccess', 'always');
-
- //Pass width and height to be appended as chartWidth and chartHeight
- this.addVariable('chartWidth', w);
- this.addVariable('chartHeight', h);
-
- //Whether in debug mode
- debugMode = debugMode ? debugMode : 0;
- this.addVariable('debugMode', debugMode);
- //Pass DOM ID to Chart
- this.addVariable('DOMId', id);
- //Whether to registed with JavaScript
- registerWithJS = registerWithJS ? registerWithJS : 0;
- this.addVariable('registerWithJS', registerWithJS);
-
- //Scale Mode of chart
- scaleMode = scaleMode ? scaleMode : 'noScale';
- this.addVariable('scaleMode', scaleMode);
-
- //Application Message Language
- lang = lang ? lang : 'EN';
- this.addVariable('lang', lang);
-
- //Whether to auto detect and re-direct to Flash Player installation
- this.detectFlashVersion = detectFlashVersion?detectFlashVersion:1;
- this.autoInstallRedirect = autoInstallRedirect?autoInstallRedirect:1;
-
- //Ger Flash Player version
- this.installedVer = infosoftglobal.FusionChartsUtil.getPlayerVersion();
-
- if (!window.opera && document.all && this.installedVer.major > 7) {
- // Only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
- infosoftglobal.FusionCharts.doPrepUnload = true;
- }
-}
-
-infosoftglobal.FusionCharts.prototype = {
- setAttribute: function(name, value){
- this.attributes[name] = value;
- },
- getAttribute: function(name){
- return this.attributes[name];
- },
- addParam: function(name, value){
- this.params[name] = value;
- },
- getParams: function(){
- return this.params;
- },
- addVariable: function(name, value){
- this.variables[name] = value;
- },
- getVariable: function(name){
- return this.variables[name];
- },
- getVariables: function(){
- return this.variables;
- },
- getVariablePairs: function(){
- var variablePairs = new Array();
- var key;
- var variables = this.getVariables();
- for(key in variables){
- variablePairs.push(key +"="+ variables[key]);
- }
- return variablePairs;
- },
- getSWFHTML: function() {
- var swfNode = "";
- if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
- // netscape plugin architecture
- swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" ';
- swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
- var params = this.getParams();
- for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
- var pairs = this.getVariablePairs().join("&");
- if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
- swfNode += '/>';
- } else { // PC IE
- swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
- swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
- var params = this.getParams();
- for(var key in params) {
- swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
- }
- var pairs = this.getVariablePairs().join("&");
- if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
- swfNode += "</object>";
- }
- return swfNode;
- },
- setDataURL: function(strDataURL){
- //This method sets the data URL for the chart.
- //If being set initially
- if (this.initialDataSet==false){
- this.addVariable('dataURL',strDataURL);
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interface
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id'));
-
- if (!chartObj.setDataURL)
- {
- __flash__addCallback(chartObj, "setDataURL");
- }
-
- chartObj.setDataURL(strDataURL);
- }
- },
- //This function :
- //fixes the double quoted attributes to single quotes
- //Encodes all quotes inside attribute values
- //Encodes % to %25 and & to %26;
- encodeDataXML: function(strDataXML){
-
- var regExpReservedCharacters=["\\$","\\+"];
- var arrDQAtt=strDataXML.match(/=\s*\".*?\"/g);
- if (arrDQAtt){
- for(var i=0;i<arrDQAtt.length;i++){
- var repStr=arrDQAtt[i].replace(/^=\s*\"|\"$/g,"");
- repStr=repStr.replace(/\'/g,"%26apos;");
- var strTo=strDataXML.indexOf(arrDQAtt[i]);
- var repStrr="='"+repStr+"'";
- var strStart=strDataXML.substring(0,strTo);
- var strEnd=strDataXML.substring(strTo+arrDQAtt[i].length);
- var strDataXML=strStart+repStrr+strEnd;
- }
- }
-
- strDataXML=strDataXML.replace(/\"/g,"%26quot;");
- strDataXML=strDataXML.replace(/%(?![\da-f]{2}|[\da-f]{4})/ig,"%25");
- strDataXML=strDataXML.replace(/\&/g,"%26");
-
- return strDataXML;
-
- },
- setDataXML: function(strDataXML){
- //If being set initially
- if (this.initialDataSet==false){
- //This method sets the data XML for the chart INITIALLY.
- this.addVariable('dataXML',this.encodeDataXML(strDataXML));
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interface
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id'));
- chartObj.setDataXML(strDataXML);
- }
- },
- setTransparent: function(isTransparent){
- //Sets chart to transparent mode when isTransparent is true (default)
- //When no parameter is passed, we assume transparent to be true.
- if(typeof isTransparent=="undefined") {
- isTransparent=true;
- }
- //Set the property
- if(isTransparent)
- this.addParam('WMode', 'transparent');
- else
- this.addParam('WMode', 'Opaque');
- },
-
- render: function(elementId){
- //First check for installed version of Flash Player - we need a minimum of 6
- if((this.detectFlashVersion==1) && (this.installedVer.major < 6)){
- if (this.autoInstallRedirect==1){
- //If we can auto redirect to install the player?
- var installationConfirm = window.confirm("You need Adobe Flash Player 6 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. Please click on Ok to install the same.");
- if (installationConfirm){
- window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
- }else{
- return false;
- }
- }else{
- //Else, do not take an action. It means the developer has specified a message in the DIV (and probably a link).
- //So, expect the developers to provide a course of way to their end users.
- //window.alert("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. ");
- return false;
- }
- }else{
- //Render the chart
- var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
- n.innerHTML = this.getSWFHTML();
-
- //Added <FORM> compatibility
- //Check if it's added in Mozilla embed array or if already exits
- if(!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')])
- window[this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));
- //or else document.forms[formName/formIndex][chartId]
- return true;
- }
- }
-}
-
-/* ---- detection functions ---- */
-infosoftglobal.FusionChartsUtil.getPlayerVersion = function(){
- var PlayerVersion = new infosoftglobal.PlayerVersion([0,0,0]);
- if(navigator.plugins && navigator.mimeTypes.length){
- var x = navigator.plugins["Shockwave Flash"];
- if(x && x.description) {
- PlayerVersion = new infosoftglobal.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
- }
- }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){
- //If Windows CE
- var axo = 1;
- var counter = 3;
- while(axo) {
- try {
- counter++;
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
- PlayerVersion = new infosoftglobal.PlayerVersion([counter,0,0]);
- } catch (e) {
- axo = null;
- }
- }
- } else {
- // Win IE (non mobile)
- // Do minor version lookup in IE, but avoid Flash Player 6 crashing issues
- try{
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
- }catch(e){
- try {
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
- PlayerVersion = new infosoftglobal.PlayerVersion([6,0,21]);
- axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
- } catch(e) {
- if (PlayerVersion.major == 6) {
- return PlayerVersion;
- }
- }
- try {
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
- } catch(e) {}
- }
- if (axo != null) {
- PlayerVersion = new infosoftglobal.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
- }
- }
- return PlayerVersion;
-}
-infosoftglobal.PlayerVersion = function(arrVersion){
- this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
- this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
- this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
-}
-// ------------ Fix for Out of Memory Bug in IE in FP9 ---------------//
-/* Fix for video streaming bug */
-infosoftglobal.FusionChartsUtil.cleanupSWFs = function() {
- var objects = document.getElementsByTagName("OBJECT");
- for (var i = objects.length - 1; i >= 0; i--) {
- objects[i].style.display = 'none';
- for (var x in objects[i]) {
- if (typeof objects[i][x] == 'function') {
- objects[i][x] = function(){};
- }
- }
- }
-}
-// Fixes bug in fp9
-if (infosoftglobal.FusionCharts.doPrepUnload) {
- if (!infosoftglobal.unloadSet) {
- infosoftglobal.FusionChartsUtil.prepUnload = function() {
- __flash_unloadHandler = function(){};
- __flash_savedUnloadHandler = function(){};
- window.attachEvent("onunload", infosoftglobal.FusionChartsUtil.cleanupSWFs);
- }
- window.attachEvent("onbeforeunload", infosoftglobal.FusionChartsUtil.prepUnload);
- infosoftglobal.unloadSet = true;
- }
-}
-/* Add document.getElementById if needed (mobile IE < 5) */
-if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}
-/* Add Array.push if needed (ie5) */
-if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
-
-/* Function to return Flash Object from ID */
-infosoftglobal.FusionChartsUtil.getChartObject = function(id)
-{
- var chartRef=null;
- if (navigator.appName.indexOf("Microsoft Internet")==-1) {
- if (document.embeds && document.embeds[id])
- chartRef = document.embeds[id];
- else
- chartRef = window.document[id];
- }
- else {
- chartRef = window[id];
- }
- if (!chartRef)
- chartRef = document.getElementById(id);
-
- return chartRef;
-}
-/*
- Function to update chart's data at client side (FOR FusionCharts vFREE and 2.x
-*/
-infosoftglobal.FusionChartsUtil.updateChartXML = function(chartId, strXML){
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(chartId);
- //Set dataURL to null
- chartObj.SetVariable("_root.dataURL","");
- //Set the flag
- chartObj.SetVariable("_root.isNewData","1");
- //Set the actual data
- chartObj.SetVariable("_root.newData",strXML);
- //Go to the required frame
- chartObj.TGotoLabel("/", "JavaScriptHandler");
-}
-
-
-/* Aliases for easy usage */
-var getChartFromId = infosoftglobal.FusionChartsUtil.getChartObject;
-var updateChartXML = infosoftglobal.FusionChartsUtil.updateChartXML;
-var FusionCharts = infosoftglobal.FusionCharts; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/charts.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/charts.js
deleted file mode 100644
index 4bebbd36..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/charts.js
+++ /dev/null
@@ -1,132 +0,0 @@
-
-function drawSingleSeriesChart(tabId, chartId, chartWidth, chartHeight, chartType, chartData,mme,yyyyMo) {
- // define, set the data for each chart, and render them (if indicated)
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/" + chartType, "myChartId" + chartId, chartWidth, chartHeight);
-
- var mmeLabel = "";//mme + "";
-
- var chartCaptionId = tabId + "-chartdiv" + chartId + "-label";
-
- document.getElementById(chartCaptionId).innerHTML = "Hosted Voice Usage in "+ yyyyMo;
-
- myChart.setDataXML("<graph caption='"+mmeLabel + "' xAxisName='' yAxisName='# of Inbound/Outbound calls' showNames='1' decimalPrecision='0' formatNumberScale='0'>" + chartData + "</graph>");
- myChart.setTransparent(true);
- myChart.render(tabId + "-"+ "chartdiv" + chartId);
-
-
- }
-
-
- // gauge charts
- function drawGaugeChart(chartId, gaugeIndex, value) {
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/AngularGauge.swf", "myChartId" + chartId, "300", "300", "0", "0");
- //CPU for NYCMNYBWLT1 on 201301 : 12.63//
- var chartData =
- "<Chart showBorder='0' editMode='1' bgColor='FFFFFF' upperLimit='100' lowerLimit='0' label='CPU' baseFontColor='FFFFFF' majorTMNumber='11' majorTMColor='FFFFFF' majorTMHeight='8' minorTMNumber='5' minorTMColor='FFFFFF' minorTMHeight='3' toolTipBorderColor='FFFFFF' toolTipBgColor='333333' gaugeOuterRadius='100' gaugeOriginX='150' gaugeOriginY='150' gaugeScaleAngle='270' placeValuesInside='1' gaugeInnerRadius='80%25' annRenderDelay='0' gaugeFillMix='' pivotRadius='10' showPivotBorder='0' pivotFillMix='{CCCCCC},{333333}' pivotFillRatio='50,50' showShadow='0' >" +
- "<colorRange>" +
- "<color minValue='0' maxValue='50' code='C1E1C1' alpha='60'/>" +
- "<color minValue='50' maxValue='85' code='F6F164' alpha='60'/>" +
- "<color minValue='85' maxValue='120' code='F70118' alpha='60'/>" +
- "</colorRange>" +
- "<dials>" +
- "<dial value='" + value + "' borderColor='FFFFFF' bgColor='000000,CCCCCC,000000' borderAlpha='0' baseWidth='10'/>" +
- "</dials>" +
- "<annotations>" +
- "<annotationGroup xPos='150' yPos='150' showBelow='1'>" +
- "<annotation type='circle' xPos='0' yPos='0' radius='120' startAngle='0' endAngle='360' fillColor='CCCCCC,111111' fillPattern='linear' fillAlpha='100,100' fillRatio='50,50' fillAngle='-45'/>" +
- "<annotation type='circle' xPos='0' yPos='0' radius='110' startAngle='0' endAngle='360' fillColor='111111,cccccc' fillPattern='linear' fillAlpha='100,100' fillRatio='50,50' fillAngle='-45'/>" +
- "<annotation type='text' label='CPU'/>" +
- "</annotationGroup>" +
- "</annotations>" +
- "</Chart>";
-
- myChart.setDataXML(chartData);
- myChart.render("chartdiv" + chartId);
- }
-
-
- function updateGaugeChart(chartId, gaugeIndex, refreshCount) {
- var myChart = getChartFromId("myChartId" + chartId);
- var val = 0;
- if (gaugeIndex == "10") val = 12;
- else if (gaugeIndex == "20") val = 15;
- else if (gaugeIndex == "30") val = 52;
- else if (gaugeIndex == "40") val = 42;
- myChart.setData(1, val);
- myChart.setData(2, val+20);
- }
-
- function updateGaugeChartWithMMEData(chartId, value) {
- var myChart = getChartFromId("myChartId" + chartId);
- myChart.setData(1, value);
- }
-
-
- function updateGaugeChartWithMMEData(chartId, value, yyyyMo, mme) {
- var myChart = getChartFromId("myChartId" + chartId);
- myChart.setData(1, value);
- document.getElementById("cpuYyyyMm").innerHTML = "Hosted Voice Utilization in "+ yyyyMo;
-
- }
-
- function drawMultiSeriesChart(tabId,chartId, chartWidth, chartHeight, chartType) {
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/" + chartType, "myChartId" + chartId, chartWidth, chartHeight, "0", "0");
-
- myChart.setTransparent(true);
-
- var chartData =
- "<graph caption='Hosted Voice v Audited Communication' xAxisName='Month' yAxisName='Bandwidth Usage'" +
- " showValues='0' decimalPrecision='0' bgcolor='ffffff' bgAlpha='70'" +
- " showColumnShadow='1' divlinecolor='c5c5c5' divLineAlpha='60' showAlternateHGridColor='1'" +
- " alternateHGridColor='f8f8f8' alternateHGridAlpha='60' >" +
- "<categories>" +
- "<category name='Jan' />" +
- "<category name='Feb' />" +
- "<category name='Mar' />" +
- "<category name='Apr' />" +
- "<category name='May' />" +
- "<category name='Jun' />" +
- "<category name='Jul' />" +
- "<category name='Aug' />" +
- "<category name='Sep' />" +
- "<category name='Oct' />" +
- "<category name='Nov' />" +
- "<category name='Dec' />" +
- "</categories>" +
- "<dataset seriesName='Hosted Voice' color='c4e3f7' >" +
- "<set value='7' />" +
- "<set value='8.04' />" +
- "<set value='10.04' />" +
- "<set value='12.73' />" +
- "<set value='12.41' />" +
- "<set value='11.83' />" +
- "<set value='14.06' />" +
- "<set value='15.94' />" +
- "<set value='22.97' />" +
- "<set value='26.79' />" +
- "<set value='20.35' />" +
- "<set value='12.63' />" +
- "</dataset>" +
- "<dataset seriesName='Audited Communication' color='Fad35e' >" +
- "<set value='5.49'/>" +
- "<set value='8.05'/>" +
- "<set value='15.36'/>" +
- "<set value='21.23'/>" +
- "<set value='23.48' />" +
- "<set value='15.49' />" +
- "<set value='26.8' />" +
- "<set value='30.54' />" +
- "<set value='64' />" +
- "<set value='75' />" +
- "<set value='63' />" +
- "<set value='34' />" +
- "</dataset>" +
- "<trendlines>" +
- "<line startValue='26000' color='91C728' displayValue='Target' showOnTop='1'/>" +
- "</trendlines>" +
- "</graph>";
-
- myChart.setDataXML(chartData);
- myChart.render(tabId + "-" + "chartdiv" + chartId);
- }
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/scribble.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/scribble.js
deleted file mode 100644
index 5384b304..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/scribble.js
+++ /dev/null
@@ -1,19 +0,0 @@
- function storeUserScribble(id) {
- var scribble = document.getElementById('scribble').innerHTML;
- localStorage.setItem('userScribble',scribble);
- }
-
- function getUserScribble() {
- if ( localStorage.getItem('userScribble')) {
- var scribble = localStorage.getItem('userScribble');
- }
- else {
- var scribble = 'You can scribble directly on this sticky... and I will also remember your message the next time you visit my blog!';
- }
- document.getElementById('scribble').innerHTML = scribble;
- }
-
- function clearLocal() {
- clear: localStorage.clear();
- return false;
- }
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/slides.min.jquery.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/slides.min.jquery.js
deleted file mode 100644
index 1a1fcdd8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/slides.min.jquery.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
-* Slides, A Slideshow Plugin for jQuery
-* Intructions: http://slidesjs.com
-* By: Nathan Searles, http://nathansearles.com
-* Version: 1.1.9
-* Updated: September 5th, 2011
-*
-* Licensed under the Apache License, Version 2.0 (the "License");
-* you may not use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.
-*/
-(function(a){a.fn.slides=function(b){return b=a.extend({},a.fn.slides.option,b),this.each(function(){function w(g,h,i){if(!p&&o){p=!0,b.animationStart(n+1);switch(g){case"next":l=n,k=n+1,k=e===k?0:k,r=f*2,g=-f*2,n=k;break;case"prev":l=n,k=n-1,k=k===-1?e-1:k,r=0,g=0,n=k;break;case"pagination":k=parseInt(i,10),l=a("."+b.paginationClass+" li."+b.currentClass+" a",c).attr("href").match("[^#/]+$"),k>l?(r=f*2,g=-f*2):(r=0,g=0),n=k}h==="fade"?b.crossfade?d.children(":eq("+k+")",c).css({zIndex:10}).fadeIn(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+l+")",c).css({display:"none",zIndex:0}),d.children(":eq("+k+")",c).css({zIndex:0}),b.animationComplete(k+1),p=!1)}):d.children(":eq("+l+")",c).fadeOut(b.fadeSpeed,b.fadeEasing,function(){b.autoHeight?d.animate({height:d.children(":eq("+k+")",c).outerHeight()},b.autoHeightSpeed,function(){d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing)}):d.children(":eq("+k+")",c).fadeIn(b.fadeSpeed,b.fadeEasing,function(){a.browser.msie&&a(this).get(0).style.removeAttribute("filter")}),b.animationComplete(k+1),p=!1}):(d.children(":eq("+k+")").css({left:r,display:"block"}),b.autoHeight?d.animate({left:g,height:d.children(":eq("+k+")").outerHeight()},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1}):d.animate({left:g},b.slideSpeed,b.slideEasing,function(){d.css({left:-f}),d.children(":eq("+k+")").css({left:f,zIndex:5}),d.children(":eq("+l+")").css({left:f,display:"none",zIndex:0}),b.animationComplete(k+1),p=!1})),b.pagination&&(a("."+b.paginationClass+" li."+b.currentClass,c).removeClass(b.currentClass),a("."+b.paginationClass+" li:eq("+k+")",c).addClass(b.currentClass))}}function x(){clearInterval(c.data("interval"))}function y(){b.pause?(clearTimeout(c.data("pause")),clearInterval(c.data("interval")),u=setTimeout(function(){clearTimeout(c.data("pause")),v=setInterval(function(){w("next",i)},b.play),c.data("interval",v)},b.pause),c.data("pause",u)):x()}a("."+b.container,a(this)).children().wrapAll('<div class="slides_control"/>');var c=a(this),d=a(".slides_control",c),e=d.children().size(),f=d.children().outerWidth(),g=d.children().outerHeight(),h=b.start-1,i=b.effect.indexOf(",")<0?b.effect:b.effect.replace(" ","").split(",")[0],j=b.effect.indexOf(",")<0?i:b.effect.replace(" ","").split(",")[1],k=0,l=0,m=0,n=0,o,p,q,r,s,t,u,v;if(e<2)return a("."+b.container,a(this)).fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()}),a("."+b.next+", ."+b.prev).fadeOut(0),!1;if(e<2)return;h<0&&(h=0),h>e&&(h=e-1),b.start&&(n=h),b.randomize&&d.randomize(),a("."+b.container,c).css({overflow:"hidden",position:"relative"}),d.children().css({position:"absolute",top:0,left:d.children().outerWidth(),zIndex:0,display:"none"}),d.css({position:"relative",width:f*3,height:g,left:-f}),a("."+b.container,c).css({display:"block"}),b.autoHeight&&(d.children().css({height:"auto"}),d.animate({height:d.children(":eq("+h+")").outerHeight()},b.autoHeightSpeed));if(b.preload&&d.find("img:eq("+h+")").length){a("."+b.container,c).css({background:"url("+b.preloadImage+") no-repeat 50% 50%"});var z=d.find("img:eq("+h+")").attr("src")+"?"+(new Date).getTime();a("img",c).parent().attr("class")!="slides_control"?t=d.children(":eq(0)")[0].tagName.toLowerCase():t=d.find("img:eq("+h+")"),d.find("img:eq("+h+")").attr("src",z).load(function(){d.find(t+":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){a(this).css({zIndex:5}),a("."+b.container,c).css({background:""}),o=!0,b.slidesLoaded()})})}else d.children(":eq("+h+")").fadeIn(b.fadeSpeed,b.fadeEasing,function(){o=!0,b.slidesLoaded()});b.bigTarget&&(d.children().css({cursor:"pointer"}),d.children().click(function(){return w("next",i),!1})),b.hoverPause&&b.play&&(d.bind("mouseover",function(){x()}),d.bind("mouseleave",function(){y()})),b.generateNextPrev&&(a("."+b.container,c).after('<a href="#" class="'+b.prev+'">Prev</a>'),a("."+b.prev,c).after('<a href="#" class="'+b.next+'">Next</a>')),a("."+b.next,c).click(function(a){a.preventDefault(),b.play&&y(),w("next",i)}),a("."+b.prev,c).click(function(a){a.preventDefault(),b.play&&y(),w("prev",i)}),b.generatePagination?(b.prependPagination?c.prepend("<ul class="+b.paginationClass+"></ul>"):c.append("<ul class="+b.paginationClass+"></ul>"),d.children().each(function(){a("."+b.paginationClass,c).append('<li><a href="#'+m+'">'+(m+1)+"</a></li>"),m++})):a("."+b.paginationClass+" li a",c).each(function(){a(this).attr("href","#"+m),m++}),a("."+b.paginationClass+" li:eq("+h+")",c).addClass(b.currentClass),a("."+b.paginationClass+" li a",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$"),n!=q&&w("pagination",j,q),!1}),a("a.link",c).click(function(){return b.play&&y(),q=a(this).attr("href").match("[^#/]+$")-1,n!=q&&w("pagination",j,q),!1}),b.play&&(v=setInterval(function(){w("next",i)},b.play),c.data("interval",v))})},a.fn.slides.option={preload:!1,preloadImage:"/img/loading.gif",container:"slides_container",generateNextPrev:!1,next:"next",prev:"prev",pagination:!0,generatePagination:!0,prependPagination:!1,paginationClass:"pagination",currentClass:"current",fadeSpeed:350,fadeEasing:"",slideSpeed:350,slideEasing:"",start:1,effect:"slide",crossfade:!1,randomize:!1,play:0,pause:0,hoverPause:!1,autoHeight:!1,autoHeightSpeed:350,bigTarget:!1,animationStart:function(){},animationComplete:function(){},slidesLoaded:function(){}},a.fn.randomize=function(b){function c(){return Math.round(Math.random())-.5}return a(this).each(function(){var d=a(this),e=d.children(),f=e.length;if(f>1){e.hide();var g=[];for(i=0;i<f;i++)g[g.length]=i;g=g.sort(c),a.each(g,function(a,c){var f=e.eq(c),g=f.clone(!0);g.show().appendTo(d),b!==undefined&&b(f,g),f.remove()})}})}})(jQuery) \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/spacegallery.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/spacegallery.js
deleted file mode 100644
index 69ab2ccc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/js/spacegallery.js
+++ /dev/null
@@ -1,235 +0,0 @@
-/**
- *
- * Spacegallery
- * Author: Stefan Petre www.eyecon.ro
- *
- */
-
-(function($){
- EYE.extend({
-
- spacegallery: {
-
- //default options (many options are controled via CSS)
- defaults: {
- border: 6, // border arround the image
- perspective: 140, // perpective height
- minScale: 0.2, // minimum scale for the image in the back
- duration: 800, // aimation duration
- loadingClass: null, // CSS class applied to the element while looading images
- before: function(){return false},
- after: function(){return false}
- },
-
- animated: false,
-
- //position images
- positionImages: function(el) {
- var top = 0;
- EYE.spacegallery.animated = false;
- $(el)
- .find('a')
- .removeClass(el.spacegalleryCfg.loadingClass)
- .end()
- .find('img')
- .removeAttr('height')
- .each(function(nr){
- var newWidth = this.spacegallery.origWidth - (this.spacegallery.origWidth - this.spacegallery.origWidth * el.spacegalleryCfg.minScale) * el.spacegalleryCfg.asins[nr];
- $(this)
- .css({
- top: el.spacegalleryCfg.tops[nr] + 'px',
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px',
- opacity: 1 - el.spacegalleryCfg.asins[nr]
- })
- .attr('width', parseInt(newWidth));
- this.spacegallery.next = el.spacegalleryCfg.asins[nr+1];
- this.spacegallery.nextTop = el.spacegalleryCfg.tops[nr+1] - el.spacegalleryCfg.tops[nr];
- this.spacegallery.origTop = el.spacegalleryCfg.tops[nr];
- this.spacegallery.opacity = 1 - el.spacegalleryCfg.asins[nr];
- this.spacegallery.increment = el.spacegalleryCfg.asins[nr] - this.spacegallery.next;
- this.spacegallery.current = el.spacegalleryCfg.asins[nr];
- this.spacegallery.width = newWidth;
- })
- },
-
- //animate to nex image
- next: function(e) {
- if (EYE.spacegallery.animated === false) {
- EYE.spacegallery.animated = true;
- var el = this.parentNode;
- el.spacegalleryCfg.before.apply(el);
- $(el)
- .css('spacegallery', 0)
- .animate({
- spacegallery: 100
- },{
- easing: 'easeOut',
- duration: el.spacegalleryCfg.duration,
- complete: function() {
- $(el)
- .find('img:last')
- .prependTo(el);
- EYE.spacegallery.positionImages(el);
- el.spacegalleryCfg.after.apply(el);
- },
- step: function(now) {
- $('img', this)
- .each(function(nr){
- var newWidth, top, next;
- if (nr + 1 == el.spacegalleryCfg.images) {
- top = this.spacegallery.origTop + this.spacegallery.nextTop * 4 * now /100;
- newWidth = this.spacegallery.width * top / this.spacegallery.origTop;
- $(this)
- .css({
- top: top + 'px',
- opacity: 0.7 - now/100,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- } else {
- next = this.spacegallery.current - this.spacegallery.increment * now /100;
- newWidth = this.spacegallery.origWidth - (this.spacegallery.origWidth - this.spacegallery.origWidth * el.spacegalleryCfg.minScale) * next;
- $(this).css({
- top: this.spacegallery.origTop + this.spacegallery.nextTop * now /100 + 'px',
- opacity: 1 - next,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- }
- });
- }
- });
- }
-
- this.blur();
- return false;
- },
-
- autoNext: function(el) {
-
- if (EYE.spacegallery.animated === false) {
- EYE.spacegallery.animated = true;
- el.spacegalleryCfg.before.apply(el); // run the "before" function
- $(el)
- .css('spacegallery', 0)
- .animate({
- spacegallery: 100
- },{
- easing: 'easeOut',
- duration: el.spacegalleryCfg.duration,
- complete: function() { // after animation is complete, move the front image to the back
- $(el)
- .find('img:last') // find the last image in this div
- .prependTo(el); // and stick it at the beginning
- EYE.spacegallery.positionImages(el); // run "position images"
- el.spacegalleryCfg.after.apply(el); //run the "after" function
- },
- step: function(now) {
- $('img', this)
- .each(function(nr){
- var newWidth, top, next;
- if (nr + 1 == el.spacegalleryCfg.images) {
- top = this.spacegallery.origTop + this.spacegallery.nextTop * 4 * now /100;
- newWidth = this.spacegallery.width * top / this.spacegallery.origTop;
- $(this)
- .css({
- top: top + 'px',
- opacity: 0.7 - now/100,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- } else {
- next = this.spacegallery.current - this.spacegallery.increment * now /100;
- newWidth = this.spacegallery.origWidth - (this.spacegallery.origWidth - this.spacegallery.origWidth * el.spacegalleryCfg.minScale) * next;
- $(this).css({
- top: this.spacegallery.origTop + this.spacegallery.nextTop * now /100 + 'px',
- opacity: 1 - next,
- marginLeft: - parseInt((newWidth + el.spacegalleryCfg.border)/2, 10) + 'px'
- })
- .attr('width', newWidth);
- }
- });
- }
- });
- }
-
- return false;
- },
-
- //constructor
- init: function(opt) {
- opt = $.extend({}, EYE.spacegallery.defaults, opt||{});
- return this.each(function(){
- var el = this;
- if ($(el).is('.spacegallery')) {
- $('<a href="#"></a>')
- .appendTo(this)
- .addClass(opt.loadingClass)
- .bind('click', EYE.spacegallery.next);
- el.spacegalleryCfg = opt;
- el.spacegalleryCfg.images = el.getElementsByTagName('img').length;
- el.spacegalleryCfg.loaded = 0;
- el.spacegalleryCfg.asin = Math.asin(1);
- el.spacegalleryCfg.asins = {};
- el.spacegalleryCfg.tops = {};
- el.spacegalleryCfg.increment = parseInt(el.spacegalleryCfg.perspective/el.spacegalleryCfg.images, 10);
- var top = 0;
- $('img', el)
- .each(function(nr){
- var imgEl = new Image();
- var elImg = this;
- el.spacegalleryCfg.asins[nr] = 1 - Math.asin((nr+1)/el.spacegalleryCfg.images)/el.spacegalleryCfg.asin;
- top += el.spacegalleryCfg.increment - el.spacegalleryCfg.increment * el.spacegalleryCfg.asins[nr];
- el.spacegalleryCfg.tops[nr] = top;
- elImg.spacegallery = {};
- imgEl.src = this.src;
- if (imgEl.complete) {
- el.spacegalleryCfg.loaded ++;
- elImg.spacegallery.origWidth = imgEl.width;
- elImg.spacegallery.origHeight = imgEl.height
- } else {
- imgEl.onload = function() {
- el.spacegalleryCfg.loaded ++;
- elImg.spacegallery.origWidth = imgEl.width;
- elImg.spacegallery.origHeight = imgEl.height
- if (el.spacegalleryCfg.loaded == el.spacegalleryCfg.images) {
-
- EYE.spacegallery.positionImages(el);
- }
- };
- }
- });
- el.spacegalleryCfg.asins[el.spacegalleryCfg.images] = el.spacegalleryCfg.asins[el.spacegalleryCfg.images - 1] * 1.3;
- el.spacegalleryCfg.tops[el.spacegalleryCfg.images] = el.spacegalleryCfg.tops[el.spacegalleryCfg.images - 1] * 1.3;
- if (el.spacegalleryCfg.loaded == el.spacegalleryCfg.images) {
- EYE.spacegallery.positionImages(el);
- setInterval(function() { EYE.spacegallery.autoNext(el); }, 4000);
- }
- }
- });
- }
- }
- });
-
- $.fn.extend({
-
- /**
- * Create a space gallery
- * @name spacegallery
- * @description create a space gallery
- * @option int border Images' border. Default: 6
- * @option int perspective Perpective height. Default: 140
- * @option float minScale Minimum scale for the image in the back. Default: 0.2
- * @option int duration Animation duration. Default: 800
- * @option string loadingClass CSS class applied to the element while looading images. Default: null
- * @option function before Callback function triggered before going to the next image
- * @option function after Callback function triggered after going to the next image
- */
- spacegallery: EYE.spacegallery.init
- });
- $.extend($.easing,{
- easeOut:function (x, t, b, c, d) {
- return -c *(t/=d)*(t-2) + b;
- }
- });
-})(jQuery); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/bootstrap.min.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/bootstrap.min.css
deleted file mode 100644
index 3424a5f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/bootstrap.min.css
+++ /dev/null
@@ -1,351 +0,0 @@
-html,body{margin:0;padding:0;}
-h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
-ol,ul{list-style:none;}
-q:before,q:after,blockquote:before,blockquote:after{content:"";}
-html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-a:focus{outline:thin dotted;}
-a:hover,a:active{outline:0;}
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-img{border:0;-ms-interpolation-mode:bicubic;}
-button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
-button,input{line-height:normal;*overflow:visible;}
-button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
-button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
-input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
-input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
-textarea{overflow:auto;vertical-align:top;}
-body{background-color:#ffffff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
-.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;}
-.container:after{clear:both;}
-.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;}
-.container-fluid:after{clear:both;}
-.container-fluid>.sidebar{position:absolute;top:0;left:20px;width:220px;}
-.container-fluid>.content{margin-left:240px;}
-a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-.hide{display:none;}
-.show{display:block;}
-.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;}
-.row:after{clear:both;}
-.row>[class*="span"]{display:inline;float:left;margin-left:20px;}
-.span1{width:40px;}
-.span2{width:100px;}
-.span3{width:160px;}
-.span4{width:220px;}
-.span5{width:280px;}
-.span6{width:340px;}
-.span7{width:400px;}
-.span8{width:460px;}
-.span9{width:520px;}
-.span10{width:580px;}
-.span11{width:640px;}
-.span12{width:700px;}
-.span13{width:760px;}
-.span14{width:820px;}
-.span15{width:880px;}
-.span16{width:940px;}
-.span17{width:1000px;}
-.span18{width:1060px;}
-.span19{width:1120px;}
-.span20{width:1180px;}
-.span21{width:1240px;}
-.span22{width:1300px;}
-.span23{width:1360px;}
-.span24{width:1420px;}
-.row>.offset1{margin-left:80px;}
-.row>.offset2{margin-left:140px;}
-.row>.offset3{margin-left:200px;}
-.row>.offset4{margin-left:260px;}
-.row>.offset5{margin-left:320px;}
-.row>.offset6{margin-left:380px;}
-.row>.offset7{margin-left:440px;}
-.row>.offset8{margin-left:500px;}
-.row>.offset9{margin-left:560px;}
-.row>.offset10{margin-left:620px;}
-.row>.offset11{margin-left:680px;}
-.row>.offset12{margin-left:740px;}
-.span-one-third{width:300px;}
-.span-two-thirds{width:620px;}
-.offset-one-third{margin-left:340px;}
-.offset-two-thirds{margin-left:660px;}
-p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
-h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
-h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
-h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
-h3,h4,h5,h6{line-height:36px;}
-h3{font-size:18px;}h3 small{font-size:14px;}
-h4{font-size:16px;}h4 small{font-size:12px;}
-h5{font-size:14px;}
-h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
-ul,ol{margin:0 0 18px 25px;}
-ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
-ul{list-style:disc;}
-ol{list-style:decimal;}
-li{line-height:18px;color:#808080;}
-ul.unstyled{list-style:none;margin-left:0;}
-dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
-dl dt{font-weight:bold;}
-dl dd{margin-left:9px;}
-hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
-strong{font-style:inherit;font-weight:bold;}
-em{font-style:italic;font-weight:inherit;line-height:inherit;}
-.muted{color:#bfbfbf;}
-blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
-blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
-address{display:block;line-height:18px;margin-bottom:18px;}
-code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;}
-pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
-form{margin-bottom:18px;}
-fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
-form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;}
-form .clearfix:after{clear:both;}
-label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
-label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
-form .input{margin-left:150px;}
-input[type=checkbox],input[type=radio]{cursor:pointer;}
-input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-select{padding:initial;}
-input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
-input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
-select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px;}
-select[multiple]{height:inherit;background-color:#ffffff;}
-textarea{height:auto;}
-.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
-:-moz-placeholder{color:#bfbfbf;}
-::-webkit-input-placeholder{color:#bfbfbf;}
-input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
-input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
-input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
-form .clearfix.error>label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48;}
-form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b;}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
-form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48;}
-form .clearfix.warning>label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853;}
-form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64;}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1;}
-form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853;}
-form .clearfix.success>label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847;}
-form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957;}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;}
-form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;}
-.input-mini,input.mini,textarea.mini,select.mini{width:60px;}
-.input-small,input.small,textarea.small,select.small{width:90px;}
-.input-medium,input.medium,textarea.medium,select.medium{width:150px;}
-.input-large,input.large,textarea.large,select.large{width:210px;}
-.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;}
-.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
-textarea.xxlarge{overflow-y:auto;}
-input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
-input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
-input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
-input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
-input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
-input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
-input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
-input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
-input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
-input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
-input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
-input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
-input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
-input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
-input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
-input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;}
-input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
-.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;}
-.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;}
-.help-inline{padding-left:5px;*position:relative;*top:-5px;}
-.help-block{display:block;max-width:600px;}
-.inline-inputs{color:#808080;}.inline-inputs span{padding:0 2px 0 1px;}
-.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
-.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;}
-.input-prepend .add-on{*margin-top:1px;}
-.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;}
-.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;}
-.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;}
-.inputs-list label small{font-size:11px;font-weight:normal;}
-.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;}
-.inputs-list:first-child{padding-top:6px;}
-.inputs-list li+li{padding-top:2px;}
-.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left;}
-.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;}
-.form-stacked legend{padding-left:0;}
-.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;}
-.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;}
-.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;}
-.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;}
-.form-stacked .actions{margin-left:-20px;padding-left:20px;}
-.condensed-table th,.condensed-table td{padding:5px 5px 4px;}
-.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;}
-.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
-.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
-.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
-.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
-table .span1{width:20px;}
-table .span2{width:60px;}
-table .span3{width:100px;}
-table .span4{width:140px;}
-table .span5{width:180px;}
-table .span6{width:220px;}
-table .span7{width:260px;}
-table .span8{width:300px;}
-table .span9{width:340px;}
-table .span10{width:380px;}
-table .span11{width:420px;}
-table .span12{width:460px;}
-table .span13{width:500px;}
-table .span14{width:540px;}
-table .span15{width:580px;}
-table .span16{width:620px;}
-.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
-.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5;}
-table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
-table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);}
-table .header:hover:after{visibility:visible;}
-table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
-table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
-table .blue{color:#049cdb;border-bottom-color:#049cdb;}
-table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;}
-table .green{color:#46a546;border-bottom-color:#46a546;}
-table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;}
-table .red{color:#9d261d;border-bottom-color:#9d261d;}
-table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;}
-table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;}
-table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;}
-table .orange{color:#f89406;border-bottom-color:#f89406;}
-table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;}
-table .purple{color:#7a43b6;border-bottom-color:#7a43b6;}
-table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;}
-.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
-.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
-.topbar h3{position:relative;}
-.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
-.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;}
-.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
-.topbar form.pull-right{float:right;}
-.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;}
-.topbar input::-webkit-input-placeholder{color:#e6e6e6;}
-.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;}
-.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
-.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
-.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;}
-.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;}
-.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);}
-.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;}
-.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);}
-.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);}
-.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;}
-.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;}
-.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;}
-.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;}
-li.menu,.dropdown{position:relative;}
-a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"&darr;";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
-.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;}
-.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;}
-.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);}
-.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
-.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;}
-.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;}
-.tabs:after,.pills:after{clear:both;}
-.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;}
-.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px;}.tabs>li{position:relative;margin-bottom:-1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;}
-.tabs .active>a,.tabs .active>a:hover{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
-.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
-.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;}
-.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;}
-.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;}
-.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px #ffffff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#00438a;}
-.pills .active a{color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#0069d6;}
-.pills-vertical>li{float:none;}
-.tab-content>.tab-pane,.pill-content>.pill-pane,.tab-content>div,.pill-content>div{display:none;}
-.tab-content>.active,.pill-content>.active{display:block;}
-.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
-.breadcrumb .divider{padding:0 5px;color:#bfbfbf;}
-.breadcrumb .active a{color:#404040;}
-.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
-.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
-footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
-.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
-.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;}
-.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px;}
-.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;}
-.btn:focus{outline:1px dotted #666;}
-.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.active,.btn :active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
-.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.btn.small{padding:7px 9px 7px;font-size:11px;}
-:root .alert-message,:root .btn{border-radius:0 \0;}
-button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;}
-.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
-.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{margin-top:1px;*margin-top:0;}
-.alert-message a{font-weight:bold;color:#404040;}
-.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#ffffff;}
-.alert-message h5{line-height:18px;}
-.alert-message p{margin-bottom:0;}
-.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;}
-.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);}
-.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;}
-.alert-message.block-message ul{margin-bottom:0;}
-.alert-message.block-message li{color:#404040;}
-.alert-message.block-message .alert-actions{margin-top:5px;}
-.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
-.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;}
-.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;}
-.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;}
-.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040;}
-.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
-.pagination li{display:inline;}
-.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;}
-.pagination a:hover,.pagination .active a{background-color:#c7eefe;}
-.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;}
-.pagination .next a{border:0;}
-.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
-.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;}
-.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
-.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;}
-.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
-.modal.fade.in{top:50%;}
-.modal-header{border-bottom:1px solid #eee;padding:5px 15px;}
-.modal-body{padding:15px;}
-.modal-body form{margin-bottom:0;}
-.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;}
-.modal-footer:after{clear:both;}
-.modal-footer .btn{float:right;margin-left:5px;}
-.modal .popover,.modal .twipsy{z-index:12000;}
-.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
-.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.twipsy-arrow{position:absolute;width:0;height:0;}
-.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.popover .arrow{position:absolute;width:0;height:0;}
-.popover .inner{background:#000000;background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
-.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;}
-.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;}
-.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
-.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;}
-.label.warning{background-color:#f89406;}
-.label.success{background-color:#46a546;}
-.label.notice{background-color:#62cffc;}
-.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;}
-.media-grid:after{clear:both;}
-.media-grid li{display:inline;}
-.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;}
-.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/custom.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/custom.css
deleted file mode 100644
index b7df8c25..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/custom.css
+++ /dev/null
@@ -1,97 +0,0 @@
-body, html, div, p, span, a, h1, h2, h3, h4, h5{
- margin : 0;
- padding : 0;
-}
-
-body, html{
- width : 100%;
-}
-
-body{
- color : white;
- font-family : tahoma;
- font-weight : lighter;
- padding-top : 40px;
-}
-
- body p{
- font-size : 14px;
- }
-
- body p a{
- font-size : 16px;
- }
-
-h1 {
- color : #E05E00;
- font-style : italic;
-}
-
-a{
- color : #E05E00;
- text-decoration : none;
-}
-
-a:hover{
- text-decoration : underline;
-}
-
-/* general */
-.clear {
- clear: both;
-}
-
-/* Header */
-.brand{
- color : #E05E00 !important;
- font-family : georgia;
- font-style : italic;
-}
-
-/* list stuff */
-#org{
- background-color : white;
- margin : 10px;
- padding : 10px;
-}
-
-#show-list{
- cursor : pointer;
-}
-
-/* bootstrap overrides */
-.alert-message{
- margin: 2px 0;
-}
-
-.topbar{
- position : absolute;
-}
-
-/* Custom chart styling */
-.jOrgChart {
- margin : 10px;
- padding : 20px;
-}
-
-/* Custom node styling */
-.jOrgChart .node {
- font-weight : bold;
- font-size : 14px;
- background-color : #D5D6DB;
- border-radius : 8px;
- border : 5px solid gray;
- color : #793a06;
- -moz-border-radius : 8px;
-}
- .node p{
- font-family : tahoma;
- font-size : 10px;
- line-height : 11px;
- padding : 2px;
- }
-
-table {
- margin-left: auto;
- margin-right: auto;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/jquery.jOrgChart.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/jquery.jOrgChart.css
deleted file mode 100644
index ffabe274..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/jquery.jOrgChart.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Basic styling */
-/* Draw the lines */
-.jOrgChart .line {
- height : 20px;
- width : 4px;
-}
-
-.jOrgChart .down {
- background-color : black;
- margin : 0px auto;
-}
-
-.jOrgChart .top {
- border-top : 3px solid black;
-}
-
-.jOrgChart .left {
- border-right : 2px solid black;
-}
-
-.jOrgChart .right {
- border-left : 2px solid black;
-}
-
-/* node cell */
-.jOrgChart td {
- text-align : center;
- vertical-align : top;
- padding : 0;
-}
-
-/* The node */
-.jOrgChart .node {
- background-color : #35363B;
- display : inline-block;
- width : 120px;
- height : 60px;
- z-index : 10;
- margin : 0 2px;
-}
-
-/* jQuery drag 'n drop */
-
-.drag-active {
- border-style : dashed !important;
-}
-
-.drop-hover {
- border-style : solid !important;
- border-color : #E05E00 !important;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/prettify.css b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/prettify.css
deleted file mode 100644
index d44b3a22..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/css/prettify.css
+++ /dev/null
@@ -1 +0,0 @@
-.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example.html
deleted file mode 100644
index 543b0f92..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>jOrgChart - A jQuery OrgChart Plugin</title>
- <link rel="stylesheet" href="css/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/jquery.jOrgChart.css"/>
- <link rel="stylesheet" href="css/custom.css"/>
- <link href="css/prettify.css" type="text/css" rel="stylesheet" />
-
- <script type="text/javascript" src="prettify.js"></script>
-
- <!-- jQuery includes -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-
- <script src="jquery.jOrgChart.js"></script>
-
- <script>
- jQuery(document).ready(function() {
- $("#org").jOrgChart({
- chartElement : '#chart',
- dragAndDrop : true
- });
- });
- </script>
- </head>
-
- <body onload="prettyPrint();">
- <ul id="org" style="display:none">
- <li>Product 1<br/>
- <ul>
- <li>Service 1<br/>
- <ul>
- <li>Resource 1<br/></li>
- <li>Resource 2<br/></li>
- <li>Resource 3<br/></li>
- <li>Resource 4<br/></li>
- <li>Resource 5<br/></li>
- </ul>
- </li>
- <li>Service 6<br/></li>
- <li>Service 7<br/>
- <ul>
- <li>Resource 8<br/></li>
- <li>Resource 9<br/></li>
- <li>Resource 10<br/></li>
- <li>Resource 11<br/></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <div id="chart" class="orgChart"></div>
-
- <script>
- jQuery(document).ready(function() {
-
- /* Custom jQuery for the example */
- $("#show-list").click(function(e){
- e.preventDefault();
-
- $('#list-html').toggle('fast', function(){
- if($(this).is(':visible')){
- $('#show-list').text('Hide underlying list.');
- $(".topbar").fadeTo('fast',0.9);
- }else{
- $('#show-list').text('Show underlying list.');
- $(".topbar").fadeTo('fast',1);
- }
- });
- });
-
- $('#list-html').text($('#org').html());
-
- $("#org").bind("DOMSubtreeModified", function() {
- $('#list-html').text('');
-
- $('#list-html').text($('#org').html());
-
- prettyPrint();
- });
- });
- </script>
-</body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example_vsp.html b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example_vsp.html
deleted file mode 100644
index a2e3703d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/example_vsp.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>jOrgChart - A jQuery OrgChart Plugin</title>
- <link rel="stylesheet" href="css/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/jquery.jOrgChart.css"/>
- <link rel="stylesheet" href="css/custom.css"/>
- <link href="css/prettify.css" type="text/css" rel="stylesheet" />
-
- <script type="text/javascript" src="prettify.js"></script>
-
- <!-- jQuery includes -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-
- <script src="jquery.jOrgChart.js"></script>
-
- <script>
- jQuery(document).ready(function() {
- $("#org").jOrgChart({
- chartElement : '#chart',
- dragAndDrop : true
- });
- });
- </script>
- </head>
-
- <body onload="prettyPrint();">
- <ul id="org" style="display:none">
- <li>Trinity<br/>
- <ul>
- <li>Call Forwarding<br/>
- <ul>
- <li>Call Forwarding Busy<br/></li>
- <li>Call Forwarding Always<br/></li>
- <li>Call Forwarding Not Reachable<br/></li>
- </ul>
- </li>
- <li>Dial Restrictions<br/>
- <ul>
- <li>Outgoing Calls<br/></li>
- <li>Redirecting Calls<br/></li>
- <li>Incoming Calls<br/></li>
- </ul>
- </li>
- <li>Messaging<br/>
- <ul>
- <li>Voice Management<br/></li>
- <li>Greetings<br/></li>
- <li>Fax Messaging<br/></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <div id="chart" class="orgChart"></div>
-
- <script>
- jQuery(document).ready(function() {
-
- /* Custom jQuery for the example */
- $("#show-list").click(function(e){
- e.preventDefault();
-
- $('#list-html').toggle('fast', function(){
- if($(this).is(':visible')){
- $('#show-list').text('Hide underlying list.');
- $(".topbar").fadeTo('fast',0.9);
- }else{
- $('#show-list').text('Show underlying list.');
- $(".topbar").fadeTo('fast',1);
- }
- });
- });
-
- $('#list-html').text($('#org').html());
-
- $("#org").bind("DOMSubtreeModified", function() {
- $('#list-html').text('');
-
- $('#list-html').text($('#org').html());
-
- prettyPrint();
- });
- });
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/bkgd.png b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/bkgd.png
deleted file mode 100644
index 3bbaf5ee..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/bkgd.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/raspberry.jpg b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/raspberry.jpg
deleted file mode 100644
index e79a0515..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/images/raspberry.jpg
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/jquery.jOrgChart.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/jquery.jOrgChart.js
deleted file mode 100644
index 89411b29..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/jquery.jOrgChart.js
+++ /dev/null
@@ -1,267 +0,0 @@
-/**
- * jQuery org-chart/tree plugin.
- *
- * Author: Wes Nolte
- * http://twitter.com/wesnolte
- *
- * Based on the work of Mark Lee
- * http://www.capricasoftware.co.uk
- *
- * Copyright (c) 2011 Wesley Nolte
- * Dual licensed under the MIT and GPL licenses.
- *
- */
-(function($) {
-
- $.fn.jOrgChart = function(options) {
- var opts = $.extend({}, $.fn.jOrgChart.defaults, options);
- var $appendTo = $(opts.chartElement);
-
- // build the tree
- $this = $(this);
- var $container = $("<div class='" + opts.chartClass + "'/>");
- if($this.is("ul")) {
- buildNode($this.find("li:first"), $container, 0, opts);
- }
- else if($this.is("li")) {
- buildNode($this, $container, 0, opts);
- }
- $appendTo.append($container);
-
- // add drag and drop if enabled
- if(opts.dragAndDrop){
- $('div.node').draggable({
- cursor : 'move',
- distance : 40,
- helper : 'clone',
- opacity : 0.8,
- revert : true,
- revertDuration : 100,
- snap : 'div.node.expanded',
- snapMode : 'inner',
- stack : 'div.node'
- });
-
- $('div.node').droppable({
- accept : '.node',
- activeClass : 'drag-active',
- hoverClass : 'drop-hover'
- });
-
- // Drag start event handler for nodes
- $('div.node').bind("dragstart", function handleDragStart( event, ui ){
-
- var sourceNode = $(this);
- sourceNode.parentsUntil('.node-container')
- .find('*')
- .filter('.node')
- .droppable('disable');
- });
-
- // Drag stop event handler for nodes
- $('div.node').bind("dragstop", function handleDragStop( event, ui ){
-
- /* reload the plugin */
- $(opts.chartElement).children().remove();
- $this.jOrgChart(opts);
- });
-
- // Drop event handler for nodes
- $('div.node').bind("drop", function handleDropEvent( event, ui ) {
- var sourceNode = ui.draggable;
- var targetNode = $(this);
-
- // finding nodes based on plaintext and html
- // content is hard!
- var targetLi = $('li').filter(function(){
-
- li = $(this).clone()
- .children("ul,li")
- .remove()
- .end();
- var attr = li.attr('id');
- if (typeof attr !== 'undefined' && attr !== false) {
- return li.attr("id") == targetNode.attr("id");
- }
- else {
- return li.html() == targetNode.html();
- }
-
- });
-
- var sourceLi = $('li').filter(function(){
-
- li = $(this).clone()
- .children("ul,li")
- .remove()
- .end();
- var attr = li.attr('id');
- if (typeof attr !== 'undefined' && attr !== false) {
- return li.attr("id") == sourceNode.attr("id");
- }
- else {
- return li.html() == sourceNode.html();
- }
-
- });
-
- var sourceliClone = sourceLi.clone();
- var sourceUl = sourceLi.parent('ul');
-
- if(sourceUl.children('li').size() > 1){
- sourceLi.remove();
- }else{
- sourceUl.remove();
- }
-
- var id = sourceLi.attr("id");
-
- if(targetLi.children('ul').size() >0){
- if (typeof id !== 'undefined' && id !== false) {
- targetLi.children('ul').append('<li id="'+id+'">'+sourceliClone.html()+'</li>');
- }else{
- targetLi.children('ul').append('<li>'+sourceliClone.html()+'</li>');
- }
- }else{
- if (typeof id !== 'undefined' && id !== false) {
- targetLi.append('<ul><li id="'+id+'">'+sourceliClone.html()+'</li></ul>');
- }else{
- targetLi.append('<ul><li>'+sourceliClone.html()+'</li></ul>');
- }
- }
-
- }); // handleDropEvent
-
- } // Drag and drop
- };
-
- // Option defaults
- $.fn.jOrgChart.defaults = {
- chartElement : 'body',
- depth : -1,
- chartClass : "jOrgChart",
- dragAndDrop: false
- };
-
- // Method that recursively builds the tree
- function buildNode($node, $appendTo, level, opts) {
- var $table = $("<table cellpadding='0' cellspacing='0' border='0'/>");
- var $tbody = $("<tbody/>");
-
- // Construct the node container(s)
- var $nodeRow = $("<tr/>").addClass("node-cells");
- var $nodeCell = $("<td/>").addClass("node-cell").attr("colspan", 2);
- var $childNodes = $node.children("ul:first").children("li");
- var $nodeDiv;
-
- if($childNodes.length > 1) {
- $nodeCell.attr("colspan", $childNodes.length * 2);
- }
- // Draw the node
- // Get the contents - any markup except li and ul allowed
- var $nodeContent = $node.clone()
- .children("ul,li")
- .remove()
- .end()
- .html();
-
- var new_node_id = $node.attr("id");
- if (typeof new_node_id !== 'undefined' && new_node_id !== false) {
- $nodeDiv = $("<div>").addClass("node").attr("id", $node.attr("id")).append($nodeContent);
- }else{
- $nodeDiv = $("<div>").addClass("node").append($nodeContent);
- }
-
- // Expand and contract nodes
- if ($childNodes.length > 0) {
- $nodeDiv.click(function() {
- var $this = $(this);
- var $tr = $this.closest("tr");
-
- if($tr.hasClass('contracted')){
- $this.css('cursor','n-resize');
- $tr.removeClass('contracted').addClass('expanded');
- $tr.nextAll("tr").css('visibility', '');
- }else{
- $this.css('cursor','s-resize');
- $tr.removeClass('expanded').addClass('contracted');
- $tr.nextAll("tr").css('visibility', 'hidden');
- }
- });
- }
-
- $nodeCell.append($nodeDiv);
- $nodeRow.append($nodeCell);
- $tbody.append($nodeRow);
-
- if($childNodes.length > 0) {
- // if it can be expanded then change the cursor
- $nodeDiv.css('cursor','n-resize').addClass('expanded');
-
- // recurse until leaves found (-1) or to the level specified
- if(opts.depth == -1 || (level+1 < opts.depth)) {
- var $downLineRow = $("<tr/>");
- var $downLineCell = $("<td/>").attr("colspan", $childNodes.length*2);
- $downLineRow.append($downLineCell);
-
- // draw the connecting line from the parent node to the horizontal line
- $downLine = $("<div></div>").addClass("line down");
- $downLineCell.append($downLine);
- $tbody.append($downLineRow);
-
- // Draw the horizontal lines
- var $linesRow = $("<tr/>");
- $childNodes.each(function() {
- var $left = $("<td>&nbsp;</td>").addClass("line left top");
- var $right = $("<td>&nbsp;</td>").addClass("line right top");
- $linesRow.append($left).append($right);
- });
-
- // horizontal line shouldn't extend beyond the first and last child branches
- $linesRow.find("td:first")
- .removeClass("top")
- .end()
- .find("td:last")
- .removeClass("top");
-
- $tbody.append($linesRow);
- var $childNodesRow = $("<tr/>");
- $childNodes.each(function() {
- var $td = $("<td class='node-container'/>");
- $td.attr("colspan", 2);
- // recurse through children lists and items
- buildNode($(this), $td, level+1, opts);
- $childNodesRow.append($td);
- });
-
- }
- $tbody.append($childNodesRow);
- }
-
- // any classes on the LI element get copied to the relevant node in the tree
- // apart from the special 'collapsed' class, which collapses the sub-tree at this point
- if ($node.attr('class') != undefined) {
- var classList = $node.attr('class').split(/\s+/);
- $.each(classList, function(index,item) {
- if (item == 'collapsed') {
- $nodeRow.nextAll('tr').css('display', 'none');
- $nodeRow.removeClass('expanded');
- $nodeRow.addClass('contracted');
- $nodeDiv.css('cursor','s-resize');
- } else {
- $nodeDiv.addClass(item);
- }
- });
- }
-
- $table.append($tbody);
- $appendTo.append($table);
-
- /* Prevent trees collapsing if a link inside a node is clicked */
- $nodeDiv.children('a').click(function(e){
- console.log(e);
- e.stopPropagation();
- });
- };
-
-})(jQuery);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/prettify.js b/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/prettify.js
deleted file mode 100644
index eef5ad7e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/samples/org_chart/prettify.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
-(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
-[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
-f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
-(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
-{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
-t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
-"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
-l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
-q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
-q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
-"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
-a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
-for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
-m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
-a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
-j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
-"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
-H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
-J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
-I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
-["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
-/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
-["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
-hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
-!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
-250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
-PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/showdown/0.3.4/showdown.js b/usecaseui-common/src/main/webapp/app/fusion/external/showdown/0.3.4/showdown.js
deleted file mode 100644
index 25bed634..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/showdown/0.3.4/showdown.js
+++ /dev/null
@@ -1,1454 +0,0 @@
-//
-// showdown.js -- A javascript port of Markdown.
-//
-// Copyright (c) 2007 John Fraser.
-//
-// Original Markdown Copyright (c) 2004-2005 John Gruber
-// <http://daringfireball.net/projects/markdown/>
-//
-// Redistributable under a BSD-style open source license.
-// See license.txt for more information.
-//
-// The full source distribution is at:
-//
-// A A L
-// T C A
-// T K B
-//
-// <http://www.attacklab.net/>
-//
-
-//
-// Wherever possible, Showdown is a straight, line-by-line port
-// of the Perl version of Markdown.
-//
-// This is not a normal parser design; it's basically just a
-// series of string substitutions. It's hard to read and
-// maintain this way, but keeping Showdown close to the original
-// design makes it easier to port new features.
-//
-// More importantly, Showdown behaves like markdown.pl in most
-// edge cases. So web applications can do client-side preview
-// in Javascript, and then build identical HTML on the server.
-//
-// This port needs the new RegExp functionality of ECMA 262,
-// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers
-// should do fine. Even with the new regular expression features,
-// We do a lot of work to emulate Perl's regex functionality.
-// The tricky changes in this file mostly have the "attacklab:"
-// label. Major or self-explanatory changes don't.
-//
-// Smart diff tools like Araxis Merge will be able to match up
-// this file with markdown.pl in a useful way. A little tweaking
-// helps: in a copy of markdown.pl, replace "#" with "//" and
-// replace "$text" with "text". Be sure to ignore whitespace
-// and line endings.
-//
-
-
-//
-// Showdown usage:
-//
-// var text = "Markdown *rocks*.";
-//
-// var converter = new Showdown.converter();
-// var html = converter.makeHtml(text);
-//
-// alert(html);
-//
-// Note: move the sample code to the bottom of this
-// file before uncommenting it.
-//
-
-
-//
-// Showdown namespace
-//
-var Showdown = {extensions: {}};
-
-//
-// forEach
-//
-var forEach = Showdown.forEach = function (obj, callback) {
- if (typeof obj.forEach === 'function') {
- obj.forEach(callback);
- } else {
- var i, len = obj.length;
- for (i = 0; i < len; i++) {
- callback(obj[i], i, obj);
- }
- }
-};
-
-//
-// Standard extension naming
-//
-var stdExtName = function (s) {
- return s.replace(/[_-]||\s/g, '').toLowerCase();
-};
-
-//
-// converter
-//
-// Wraps all "globals" so that the only thing
-// exposed is makeHtml().
-//
-Showdown.converter = function (converter_options) {
-
-//
-// Globals:
-//
-
-// Global hashes, used by various utility routines
- var g_urls;
- var g_titles;
- var g_html_blocks;
-
-// Used to track when we're inside an ordered or unordered list
-// (see _ProcessListItems() for details):
- var g_list_level = 0;
-
-// Global extensions
- var g_lang_extensions = [];
- var g_output_modifiers = [];
-
-
-//
-// Automatic Extension Loading (node only):
-//
- if (typeof module !== 'undefined' && typeof exports !== 'undefined' && typeof require !== 'undefined') {
- var fs = require('fs');
-
- if (fs) {
- // Search extensions folder
- var extensions = fs.readdirSync((__dirname || '.') + '/extensions').filter(function (file) {
- return ~file.indexOf('.js');
- }).map(function (file) {
- return file.replace(/\.js$/, '');
- });
- // Load extensions into Showdown namespace
- Showdown.forEach(extensions, function (ext) {
- var name = stdExtName(ext);
- Showdown.extensions[name] = require('./extensions/' + ext);
- });
- }
- }
-
- this.makeHtml = function (text) {
-//
-// Main function. The order in which other subs are called here is
-// essential. Link and image substitutions need to happen before
-// _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the <a>
-// and <img> tags get encoded.
-//
-
- // Clear the global hashes. If we don't clear these, you get conflicts
- // from other articles when generating a page which contains more than
- // one article (e.g. an index page that shows the N most recent
- // articles):
- g_urls = {};
- g_titles = {};
- g_html_blocks = [];
-
- // attacklab: Replace ~ with ~T
- // This lets us use tilde as an escape char to avoid md5 hashes
- // The choice of character is arbitray; anything that isn't
- // magic in Markdown will work.
- text = text.replace(/~/g, "~T");
-
- // attacklab: Replace $ with ~D
- // RegExp interprets $ as a special character
- // when it's in a replacement string
- text = text.replace(/\$/g, "~D");
-
- // Standardize line endings
- text = text.replace(/\r\n/g, "\n"); // DOS to Unix
- text = text.replace(/\r/g, "\n"); // Mac to Unix
-
- // Make sure text begins and ends with a couple of newlines:
- text = "\n\n" + text + "\n\n";
-
- // Convert all tabs to spaces.
- text = _Detab(text);
-
- // Strip any lines consisting only of spaces and tabs.
- // This makes subsequent regexen easier to write, because we can
- // match consecutive blank lines with /\n+/ instead of something
- // contorted like /[ \t]*\n+/ .
- text = text.replace(/^[ \t]+$/mg, "");
-
- // Run language extensions
- Showdown.forEach(g_lang_extensions, function (x) {
- text = _ExecuteExtension(x, text);
- });
-
- // Handle github codeblocks prior to running HashHTML so that
- // HTML contained within the codeblock gets escaped propertly
- text = _DoGithubCodeBlocks(text);
-
- // Turn block-level HTML blocks into hash entries
- text = _HashHTMLBlocks(text);
-
- // Strip link definitions, store in hashes.
- text = _StripLinkDefinitions(text);
-
- text = _RunBlockGamut(text);
-
- text = _UnescapeSpecialChars(text);
-
- // attacklab: Restore dollar signs
- text = text.replace(/~D/g, "$$");
-
- // attacklab: Restore tildes
- text = text.replace(/~T/g, "~");
-
- // Run output modifiers
- Showdown.forEach(g_output_modifiers, function (x) {
- text = _ExecuteExtension(x, text);
- });
-
- return text;
- };
-
-
-//
-// Options:
-//
-
-// Parse extensions options into separate arrays
- if (converter_options && converter_options.extensions) {
-
- var self = this;
-
- // Iterate over each plugin
- Showdown.forEach(converter_options.extensions, function (plugin) {
-
- // Assume it's a bundled plugin if a string is given
- if (typeof plugin === 'string') {
- plugin = Showdown.extensions[stdExtName(plugin)];
- }
-
- if (typeof plugin === 'function') {
- // Iterate over each extension within that plugin
- Showdown.forEach(plugin(self), function (ext) {
- // Sort extensions by type
- if (ext.type) {
- if (ext.type === 'language' || ext.type === 'lang') {
- g_lang_extensions.push(ext);
- } else if (ext.type === 'output' || ext.type === 'html') {
- g_output_modifiers.push(ext);
- }
- } else {
- // Assume language extension
- g_output_modifiers.push(ext);
- }
- });
- } else {
- throw "Extension '" + plugin + "' could not be loaded. It was either not found or is not a valid extension.";
- }
- });
- }
-
-
- var _ExecuteExtension = function (ext, text) {
- if (ext.regex) {
- var re = new RegExp(ext.regex, 'g');
- return text.replace(re, ext.replace);
- } else if (ext.filter) {
- return ext.filter(text);
- }
- };
-
- var _StripLinkDefinitions = function (text) {
-//
-// Strips link definitions from text, stores the URLs and titles in
-// hash references.
-//
-
- // Link defs are in the form: ^[id]: url "optional title"
-
- /*
- var text = text.replace(/
- ^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1
- [ \t]*
- \n? // maybe *one* newline
- [ \t]*
- <?(\S+?)>? // url = $2
- [ \t]*
- \n? // maybe one newline
- [ \t]*
- (?:
- (\n*) // any lines skipped = $3 attacklab: lookbehind removed
- ["(]
- (.+?) // title = $4
- [")]
- [ \t]*
- )? // title is optional
- (?:\n+|$)
- /gm,
- function(){...});
- */
-
- // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
- text += "~0";
-
- text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,
- function (wholeMatch, m1, m2, m3, m4) {
- m1 = m1.toLowerCase();
- g_urls[m1] = _EncodeAmpsAndAngles(m2); // Link IDs are case-insensitive
- if (m3) {
- // Oops, found blank lines, so it's not a title.
- // Put back the parenthetical statement we stole.
- return m3 + m4;
- } else if (m4) {
- g_titles[m1] = m4.replace(/"/g, "&quot;");
- }
-
- // Completely remove the definition from the text
- return "";
- }
- );
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- var _HashHTMLBlocks = function (text) {
- // attacklab: Double up blank lines to reduce lookaround
- text = text.replace(/\n/g, "\n\n");
-
- // Hashify HTML blocks:
- // We only want to do this for block-level HTML tags, such as headers,
- // lists, and tables. That's because we still want to wrap <p>s around
- // "paragraphs" that are wrapped in non-block-level tags, such as anchors,
- // phrase emphasis, and spans. The list of tags we're looking for is
- // hard-coded:
- var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del|style|section|header|footer|nav|article|aside";
- var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside";
-
- // First, look for nested blocks, e.g.:
- // <div>
- // <div>
- // tags for inner block must be indented.
- // </div>
- // </div>
- //
- // The outermost tags must start at the left margin for this to match, and
- // the inner nested divs must be indented.
- // We need to do this before the next, more liberal match, because the next
- // match will start at the first `<div>` and stop at the first `</div>`.
-
- // attacklab: This regex can be expensive when it fails.
- /*
- var text = text.replace(/
- ( // save in $1
- ^ // start of line (with /m)
- <($block_tags_a) // start tag = $2
- \b // word break
- // attacklab: hack around khtml/pcre bug...
- [^\r]*?\n // any number of lines, minimally matching
- </\2> // the matching end tag
- [ \t]* // trailing spaces/tabs
- (?=\n+) // followed by a newline
- ) // attacklab: there are sentinel newlines at end of document
- /gm,function(){...}};
- */
- text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, hashElement);
-
- //
- // Now match more liberally, simply from `\n<tag>` to `</tag>\n`
- //
-
- /*
- var text = text.replace(/
- ( // save in $1
- ^ // start of line (with /m)
- <($block_tags_b) // start tag = $2
- \b // word break
- // attacklab: hack around khtml/pcre bug...
- [^\r]*? // any number of lines, minimally matching
- </\2> // the matching end tag
- [ \t]* // trailing spaces/tabs
- (?=\n+) // followed by a newline
- ) // attacklab: there are sentinel newlines at end of document
- /gm,function(){...}};
- */
- text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
-
- // Special case just for <hr />. It was easier to make a special case than
- // to make the other regex more complicated.
-
- /*
- text = text.replace(/
- ( // save in $1
- \n\n // Starting after a blank line
- [ ]{0,3}
- (<(hr) // start tag = $2
- \b // word break
- ([^<>])*? //
- \/?>) // the matching end tag
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, hashElement);
-
- // Special case for standalone HTML comments:
-
- /*
- text = text.replace(/
- ( // save in $1
- \n\n // Starting after a blank line
- [ ]{0,3} // attacklab: g_tab_width - 1
- <!
- (--[^\r]*?--\s*)+
- >
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/(\n\n[ ]{0,3}<!(--[^\r]*?--\s*)+>[ \t]*(?=\n{2,}))/g, hashElement);
-
- // PHP and ASP-style processor instructions (<?...?> and <%...%>)
-
- /*
- text = text.replace(/
- (?:
- \n\n // Starting after a blank line
- )
- ( // save in $1
- [ ]{0,3} // attacklab: g_tab_width - 1
- (?:
- <([?%]) // $2
- [^\r]*?
- \2>
- )
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, hashElement);
-
- // attacklab: Undo double lines (see comment at top of this function)
- text = text.replace(/\n\n/g, "\n");
- return text;
- }
-
- var hashElement = function (wholeMatch, m1) {
- var blockText = m1;
-
- // Undo double lines
- blockText = blockText.replace(/\n\n/g, "\n");
- blockText = blockText.replace(/^\n/, "");
-
- // strip trailing blank lines
- blockText = blockText.replace(/\n+$/g, "");
-
- // Replace the element text with a marker ("~KxK" where x is its key)
- blockText = "\n\n~K" + (g_html_blocks.push(blockText) - 1) + "K\n\n";
-
- return blockText;
- };
-
- var _RunBlockGamut = function (text) {
-//
-// These are all the transformations that form block-level
-// tags like paragraphs, headers, and list items.
-//
- text = _DoHeaders(text);
-
- // Do Horizontal Rules:
- var key = hashBlock("<hr />");
- text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, key);
- text = text.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm, key);
- text = text.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm, key);
-
- text = _DoLists(text);
- text = _DoCodeBlocks(text);
- text = _DoBlockQuotes(text);
-
- // We already ran _HashHTMLBlocks() before, in Markdown(), but that
- // was to escape raw HTML in the original Markdown source. This time,
- // we're escaping the markup we've just created, so that we don't wrap
- // <p> tags around block-level tags.
- text = _HashHTMLBlocks(text);
- text = _FormParagraphs(text);
-
- return text;
- };
-
- var _RunSpanGamut = function (text) {
-//
-// These are all the transformations that occur *within* block-level
-// tags like paragraphs, headers, and list items.
-//
-
- text = _DoCodeSpans(text);
- text = _EscapeSpecialCharsWithinTagAttributes(text);
- text = _EncodeBackslashEscapes(text);
-
- // Process anchor and image tags. Images must come first,
- // because ![foo][f] looks like an anchor.
- text = _DoImages(text);
- text = _DoAnchors(text);
-
- // Make links out of things like `<http://example.com/>`
- // Must come after _DoAnchors(), because you can use < and >
- // delimiters in inline links like [this](<url>).
- text = _DoAutoLinks(text);
- text = _EncodeAmpsAndAngles(text);
- text = _DoItalicsAndBold(text);
-
- // Do hard breaks:
- text = text.replace(/ +\n/g, " <br />\n");
-
- return text;
- }
-
- var _EscapeSpecialCharsWithinTagAttributes = function (text) {
-//
-// Within tags -- meaning between < and > -- encode [\ ` * _] so they
-// don't conflict with their use in Markdown for code, italics and strong.
-//
-
- // Build a regex to find HTML tags and comments. See Friedl's
- // "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
- var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|<!(--.*?--\s*)+>)/gi;
-
- text = text.replace(regex, function (wholeMatch) {
- var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g, "$1`");
- tag = escapeCharacters(tag, "\\`*_");
- return tag;
- });
-
- return text;
- }
-
- var _DoAnchors = function (text) {
-//
-// Turn Markdown link shortcuts into XHTML <a> tags.
-//
- //
- // First, handle reference-style links: [link text] [id]
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- (
- (?:
- \[[^\]]*\] // allow brackets nested one level
- |
- [^\[] // or anything else
- )*
- )
- \]
-
- [ ]? // one optional space
- (?:\n[ ]*)? // one optional newline followed by spaces
-
- \[
- (.*?) // id = $3
- \]
- )()()()() // pad remaining backreferences
- /g,_DoAnchors_callback);
- */
- text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeAnchorTag);
-
- //
- // Next, inline-style links: [link text](url "optional title")
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- (
- (?:
- \[[^\]]*\] // allow brackets nested one level
- |
- [^\[\]] // or anything else
- )
- )
- \]
- \( // literal paren
- [ \t]*
- () // no id, so leave $3 empty
- <?(.*?)>? // href = $4
- [ \t]*
- ( // $5
- (['"]) // quote char = $6
- (.*?) // Title = $7
- \6 // matching quote
- [ \t]* // ignore any spaces/tabs between closing quote and )
- )? // title is optional
- \)
- )
- /g,writeAnchorTag);
- */
- text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()<?(.*?(?:\(.*?\).*?)?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeAnchorTag);
-
- //
- // Last, handle reference-style shortcuts: [link text]
- // These must come last in case you've also got [link test][1]
- // or [link test](/foo)
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- ([^\[\]]+) // link text = $2; can't contain '[' or ']'
- \]
- )()()()()() // pad rest of backreferences
- /g, writeAnchorTag);
- */
- text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag);
-
- return text;
- }
-
- var writeAnchorTag = function (wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
- if (m7 == undefined) m7 = "";
- var whole_match = m1;
- var link_text = m2;
- var link_id = m3.toLowerCase();
- var url = m4;
- var title = m7;
-
- if (url == "") {
- if (link_id == "") {
- // lower-case and turn embedded newlines into spaces
- link_id = link_text.toLowerCase().replace(/ ?\n/g, " ");
- }
- url = "#" + link_id;
-
- if (g_urls[link_id] != undefined) {
- url = g_urls[link_id];
- if (g_titles[link_id] != undefined) {
- title = g_titles[link_id];
- }
- }
- else {
- if (whole_match.search(/\(\s*\)$/m) > -1) {
- // Special case for explicit empty url
- url = "";
- } else {
- return whole_match;
- }
- }
- }
-
- url = escapeCharacters(url, "*_");
- var result = "<a href=\"" + url + "\"";
-
- if (title != "") {
- title = title.replace(/"/g, "&quot;");
- title = escapeCharacters(title, "*_");
- result += " title=\"" + title + "\"";
- }
-
- result += ">" + link_text + "</a>";
-
- return result;
- }
-
- var _DoImages = function (text) {
-//
-// Turn Markdown image shortcuts into <img> tags.
-//
-
- //
- // First, handle reference-style labeled images: ![alt text][id]
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- !\[
- (.*?) // alt text = $2
- \]
-
- [ ]? // one optional space
- (?:\n[ ]*)? // one optional newline followed by spaces
-
- \[
- (.*?) // id = $3
- \]
- )()()()() // pad rest of backreferences
- /g,writeImageTag);
- */
- text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeImageTag);
-
- //
- // Next, handle inline images: ![alt text](url "optional title")
- // Don't forget: encode * and _
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- !\[
- (.*?) // alt text = $2
- \]
- \s? // One optional whitespace character
- \( // literal paren
- [ \t]*
- () // no id, so leave $3 empty
- <?(\S+?)>? // src url = $4
- [ \t]*
- ( // $5
- (['"]) // quote char = $6
- (.*?) // title = $7
- \6 // matching quote
- [ \t]*
- )? // title is optional
- \)
- )
- /g,writeImageTag);
- */
- text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()<?(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeImageTag);
-
- return text;
- }
-
- var writeImageTag = function (wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
- var whole_match = m1;
- var alt_text = m2;
- var link_id = m3.toLowerCase();
- var url = m4;
- var title = m7;
-
- if (!title) title = "";
-
- if (url == "") {
- if (link_id == "") {
- // lower-case and turn embedded newlines into spaces
- link_id = alt_text.toLowerCase().replace(/ ?\n/g, " ");
- }
- url = "#" + link_id;
-
- if (g_urls[link_id] != undefined) {
- url = g_urls[link_id];
- if (g_titles[link_id] != undefined) {
- title = g_titles[link_id];
- }
- }
- else {
- return whole_match;
- }
- }
-
- alt_text = alt_text.replace(/"/g, "&quot;");
- url = escapeCharacters(url, "*_");
- var result = "<img src=\"" + url + "\" alt=\"" + alt_text + "\"";
-
- // attacklab: Markdown.pl adds empty title attributes to images.
- // Replicate this bug.
-
- //if (title != "") {
- title = title.replace(/"/g, "&quot;");
- title = escapeCharacters(title, "*_");
- result += " title=\"" + title + "\"";
- //}
-
- result += " />";
-
- return result;
- }
-
- var _DoHeaders = function (text) {
-
- // Setext-style headers:
- // Header 1
- // ========
- //
- // Header 2
- // --------
- //
- text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,
- function (wholeMatch, m1) {
- return hashBlock('<h1 id="' + headerId(m1) + '">' + _RunSpanGamut(m1) + "</h1>");
- });
-
- text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
- function (matchFound, m1) {
- return hashBlock('<h2 id="' + headerId(m1) + '">' + _RunSpanGamut(m1) + "</h2>");
- });
-
- // atx-style headers:
- // # Header 1
- // ## Header 2
- // ## Header 2 with closing hashes ##
- // ...
- // ###### Header 6
- //
-
- /*
- text = text.replace(/
- ^(\#{1,6}) // $1 = string of #'s
- [ \t]*
- (.+?) // $2 = Header text
- [ \t]*
- \#* // optional closing #'s (not counted)
- \n+
- /gm, function() {...});
- */
-
- text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
- function (wholeMatch, m1, m2) {
- var h_level = m1.length;
- return hashBlock("<h" + h_level + ' id="' + headerId(m2) + '">' + _RunSpanGamut(m2) + "</h" + h_level + ">");
- });
-
- function headerId(m) {
- return m.replace(/[^\w]/g, '').toLowerCase();
- }
-
- return text;
- }
-
-// This declaration keeps Dojo compressor from outputting garbage:
- var _ProcessListItems;
-
- var _DoLists = function (text) {
-//
-// Form HTML ordered (numbered) and unordered (bulleted) lists.
-//
-
- // attacklab: add sentinel to hack around khtml/safari bug:
- // http://bugs.webkit.org/show_bug.cgi?id=11231
- text += "~0";
-
- // Re-usable pattern to match any entirel ul or ol list:
-
- /*
- var whole_list = /
- ( // $1 = whole list
- ( // $2
- [ ]{0,3} // attacklab: g_tab_width - 1
- ([*+-]|\d+[.]) // $3 = first list item marker
- [ \t]+
- )
- [^\r]+?
- ( // $4
- ~0 // sentinel for workaround; should be $
- |
- \n{2,}
- (?=\S)
- (?! // Negative lookahead for another list item marker
- [ \t]*
- (?:[*+-]|\d+[.])[ \t]+
- )
- )
- )/g
- */
- var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
-
- if (g_list_level) {
- text = text.replace(whole_list, function (wholeMatch, m1, m2) {
- var list = m1;
- var list_type = (m2.search(/[*+-]/g) > -1) ? "ul" : "ol";
-
- // Turn double returns into triple returns, so that we can make a
- // paragraph for the last item in a list, if necessary:
- list = list.replace(/\n{2,}/g, "\n\n\n");
- ;
- var result = _ProcessListItems(list);
-
- // Trim any trailing whitespace, to put the closing `</$list_type>`
- // up on the preceding line, to get it past the current stupid
- // HTML block parser. This is a hack to work around the terrible
- // hack that is the HTML block parser.
- result = result.replace(/\s+$/, "");
- result = "<" + list_type + ">" + result + "</" + list_type + ">\n";
- return result;
- });
- } else {
- whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
- text = text.replace(whole_list, function (wholeMatch, m1, m2, m3) {
- var runup = m1;
- var list = m2;
-
- var list_type = (m3.search(/[*+-]/g) > -1) ? "ul" : "ol";
- // Turn double returns into triple returns, so that we can make a
- // paragraph for the last item in a list, if necessary:
- var list = list.replace(/\n{2,}/g, "\n\n\n");
- ;
- var result = _ProcessListItems(list);
- result = runup + "<" + list_type + ">\n" + result + "</" + list_type + ">\n";
- return result;
- });
- }
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- _ProcessListItems = function (list_str) {
-//
-// Process the contents of a single ordered or unordered list, splitting it
-// into individual list items.
-//
- // The $g_list_level global keeps track of when we're inside a list.
- // Each time we enter a list, we increment it; when we leave a list,
- // we decrement. If it's zero, we're not in a list anymore.
- //
- // We do this because when we're not inside a list, we want to treat
- // something like this:
- //
- // I recommend upgrading to version
- // 8. Oops, now this line is treated
- // as a sub-list.
- //
- // As a single paragraph, despite the fact that the second line starts
- // with a digit-period-space sequence.
- //
- // Whereas when we're inside a list (or sub-list), that line will be
- // treated as the start of a sub-list. What a kludge, huh? This is
- // an aspect of Markdown's syntax that's hard to parse perfectly
- // without resorting to mind-reading. Perhaps the solution is to
- // change the syntax rules such that sub-lists must start with a
- // starting cardinal number; e.g. "1." or "a.".
-
- g_list_level++;
-
- // trim trailing blank lines:
- list_str = list_str.replace(/\n{2,}$/, "\n");
-
- // attacklab: add sentinel to emulate \z
- list_str += "~0";
-
- /*
- list_str = list_str.replace(/
- (\n)? // leading line = $1
- (^[ \t]*) // leading whitespace = $2
- ([*+-]|\d+[.]) [ \t]+ // list marker = $3
- ([^\r]+? // list item text = $4
- (\n{1,2}))
- (?= \n* (~0 | \2 ([*+-]|\d+[.]) [ \t]+))
- /gm, function(){...});
- */
- list_str = list_str.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,
- function (wholeMatch, m1, m2, m3, m4) {
- var item = m4;
- var leading_line = m1;
- var leading_space = m2;
-
- if (leading_line || (item.search(/\n{2,}/) > -1)) {
- item = _RunBlockGamut(_Outdent(item));
- }
- else {
- // Recursion for sub-lists:
- item = _DoLists(_Outdent(item));
- item = item.replace(/\n$/, ""); // chomp(item)
- item = _RunSpanGamut(item);
- }
-
- return "<li>" + item + "</li>\n";
- }
- );
-
- // attacklab: strip sentinel
- list_str = list_str.replace(/~0/g, "");
-
- g_list_level--;
- return list_str;
- }
-
- var _DoCodeBlocks = function (text) {
-//
-// Process Markdown `<pre><code>` blocks.
-//
-
- /*
- text = text.replace(text,
- /(?:\n\n|^)
- ( // $1 = the code block -- one or more lines, starting with a space/tab
- (?:
- (?:[ ]{4}|\t) // Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
- .*\n+
- )+
- )
- (\n*[ ]{0,3}[^ \t\n]|(?=~0)) // attacklab: g_tab_width
- /g,function(){...});
- */
-
- // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
- text += "~0";
-
- text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
- function (wholeMatch, m1, m2) {
- var codeblock = m1;
- var nextChar = m2;
-
- codeblock = _EncodeCode(_Outdent(codeblock));
- codeblock = _Detab(codeblock);
- codeblock = codeblock.replace(/^\n+/g, ""); // trim leading newlines
- codeblock = codeblock.replace(/\n+$/g, ""); // trim trailing whitespace
-
- codeblock = "<pre><code>" + codeblock + "\n</code></pre>";
-
- return hashBlock(codeblock) + nextChar;
- }
- );
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- };
-
- var _DoGithubCodeBlocks = function (text) {
-//
-// Process Github-style code blocks
-// Example:
-// ```ruby
-// def hello_world(x)
-// puts "Hello, #{x}"
-// end
-// ```
-//
-
-
- // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
- text += "~0";
-
- text = text.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,
- function (wholeMatch, m1, m2) {
- var language = m1;
- var codeblock = m2;
-
- codeblock = _EncodeCode(codeblock);
- codeblock = _Detab(codeblock);
- codeblock = codeblock.replace(/^\n+/g, ""); // trim leading newlines
- codeblock = codeblock.replace(/\n+$/g, ""); // trim trailing whitespace
-
- codeblock = "<pre><code" + (language ? " class=\"" + language + '"' : "") + ">" + codeblock + "\n</code></pre>";
-
- return hashBlock(codeblock);
- }
- );
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- var hashBlock = function (text) {
- text = text.replace(/(^\n+|\n+$)/g, "");
- return "\n\n~K" + (g_html_blocks.push(text) - 1) + "K\n\n";
- }
-
- var _DoCodeSpans = function (text) {
-//
-// * Backtick quotes are used for <code></code> spans.
-//
-// * You can use multiple backticks as the delimiters if you want to
-// include literal backticks in the code span. So, this input:
-//
-// Just type ``foo `bar` baz`` at the prompt.
-//
-// Will translate to:
-//
-// <p>Just type <code>foo `bar` baz</code> at the prompt.</p>
-//
-// There's no arbitrary limit to the number of backticks you
-// can use as delimters. If you need three consecutive backticks
-// in your code, use four for delimiters, etc.
-//
-// * You can use spaces to get literal backticks at the edges:
-//
-// ... type `` `bar` `` ...
-//
-// Turns to:
-//
-// ... type <code>`bar`</code> ...
-//
-
- /*
- text = text.replace(/
- (^|[^\\]) // Character before opening ` can't be a backslash
- (`+) // $2 = Opening run of `
- ( // $3 = The code block
- [^\r]*?
- [^`] // attacklab: work around lack of lookbehind
- )
- \2 // Matching closer
- (?!`)
- /gm, function(){...});
- */
-
- text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
- function (wholeMatch, m1, m2, m3, m4) {
- var c = m3;
- c = c.replace(/^([ \t]*)/g, ""); // leading whitespace
- c = c.replace(/[ \t]*$/g, ""); // trailing whitespace
- c = _EncodeCode(c);
- return m1 + "<code>" + c + "</code>";
- });
-
- return text;
- }
-
- var _EncodeCode = function (text) {
-//
-// Encode/escape certain characters inside Markdown code runs.
-// The point is that in code, these characters are literals,
-// and lose their special Markdown meanings.
-//
- // Encode all ampersands; HTML entities are not
- // entities within a Markdown code span.
- text = text.replace(/&/g, "&amp;");
-
- // Do the angle bracket song and dance:
- text = text.replace(/</g, "&lt;");
- text = text.replace(/>/g, "&gt;");
-
- // Now, escape characters that are magic in Markdown:
- text = escapeCharacters(text, "\*_{}[]\\", false);
-
-// jj the line above breaks this:
-//---
-
-//* Item
-
-// 1. Subitem
-
-// special char: *
-//---
-
- return text;
- }
-
- var _DoItalicsAndBold = function (text) {
-
- // <strong> must go first:
- text = text.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,
- "<strong>$2</strong>");
-
- text = text.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,
- "<em>$2</em>");
-
- return text;
- }
-
- var _DoBlockQuotes = function (text) {
-
- /*
- text = text.replace(/
- ( // Wrap whole match in $1
- (
- ^[ \t]*>[ \t]? // '>' at the start of a line
- .+\n // rest of the first line
- (.+\n)* // subsequent consecutive lines
- \n* // blanks
- )+
- )
- /gm, function(){...});
- */
-
- text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,
- function (wholeMatch, m1) {
- var bq = m1;
-
- // attacklab: hack around Konqueror 3.5.4 bug:
- // "----------bug".replace(/^-/g,"") == "bug"
-
- bq = bq.replace(/^[ \t]*>[ \t]?/gm, "~0"); // trim one level of quoting
-
- // attacklab: clean up hack
- bq = bq.replace(/~0/g, "");
-
- bq = bq.replace(/^[ \t]+$/gm, ""); // trim whitespace-only lines
- bq = _RunBlockGamut(bq); // recurse
-
- bq = bq.replace(/(^|\n)/g, "$1 ");
- // These leading spaces screw with <pre> content, so we need to fix that:
- bq = bq.replace(
- /(\s*<pre>[^\r]+?<\/pre>)/gm,
- function (wholeMatch, m1) {
- var pre = m1;
- // attacklab: hack around Konqueror 3.5.4 bug:
- pre = pre.replace(/^ /mg, "~0");
- pre = pre.replace(/~0/g, "");
- return pre;
- });
-
- return hashBlock("<blockquote>\n" + bq + "\n</blockquote>");
- });
- return text;
- }
-
- var _FormParagraphs = function (text) {
-//
-// Params:
-// $text - string to process with html <p> tags
-//
-
- // Strip leading and trailing lines:
- text = text.replace(/^\n+/g, "");
- text = text.replace(/\n+$/g, "");
-
- var grafs = text.split(/\n{2,}/g);
- var grafsOut = [];
-
- //
- // Wrap <p> tags.
- //
- var end = grafs.length;
- for (var i = 0; i < end; i++) {
- var str = grafs[i];
-
- // if this is an HTML marker, copy it
- if (str.search(/~K(\d+)K/g) >= 0) {
- grafsOut.push(str);
- }
- else if (str.search(/\S/) >= 0) {
- str = _RunSpanGamut(str);
- str = str.replace(/^([ \t]*)/g, "<p>");
- str += "</p>"
- grafsOut.push(str);
- }
-
- }
-
- //
- // Unhashify HTML blocks
- //
- end = grafsOut.length;
- for (var i = 0; i < end; i++) {
- // if this is a marker for an html block...
- while (grafsOut[i].search(/~K(\d+)K/) >= 0) {
- var blockText = g_html_blocks[RegExp.$1];
- blockText = blockText.replace(/\$/g, "$$$$"); // Escape any dollar signs
- grafsOut[i] = grafsOut[i].replace(/~K\d+K/, blockText);
- }
- }
-
- return grafsOut.join("\n\n");
- }
-
- var _EncodeAmpsAndAngles = function (text) {
-// Smart processing for ampersands and angle brackets that need to be encoded.
-
- // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
- // http://bumppo.net/projects/amputator/
- text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&amp;");
-
- // Encode naked <'s
- text = text.replace(/<(?![a-z\/?\$!])/gi, "&lt;");
-
- return text;
- }
-
- var _EncodeBackslashEscapes = function (text) {
-//
-// Parameter: String.
-// Returns: The string, with after processing the following backslash
-// escape sequences.
-//
-
- // attacklab: The polite way to do this is with the new
- // escapeCharacters() function:
- //
- // text = escapeCharacters(text,"\\",true);
- // text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
- //
- // ...but we're sidestepping its use of the (slow) RegExp constructor
- // as an optimization for Firefox. This function gets called a LOT.
-
- text = text.replace(/\\(\\)/g, escapeCharacters_callback);
- text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g, escapeCharacters_callback);
- return text;
- }
-
- var _DoAutoLinks = function (text) {
-
- text = text.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi, "<a href=\"$1\">$1</a>");
-
- // Email addresses: <address@domain.foo>
-
- /*
- text = text.replace(/
- <
- (?:mailto:)?
- (
- [-.\w]+
- \@
- [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
- )
- >
- /gi, _DoAutoLinks_callback());
- */
- text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
- function (wholeMatch, m1) {
- return _EncodeEmailAddress(_UnescapeSpecialChars(m1));
- }
- );
-
- return text;
- }
-
- var _EncodeEmailAddress = function (addr) {
-//
-// Input: an email address, e.g. "foo@example.com"
-//
-// Output: the email address as a mailto link, with each character
-// of the address encoded as either a decimal or hex entity, in
-// the hopes of foiling most address harvesting spam bots. E.g.:
-//
-// <a href="&#x6D;&#97;&#105;&#108;&#x74;&#111;:&#102;&#111;&#111;&#64;&#101;
-// x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;">&#102;&#111;&#111;
-// &#64;&#101;x&#x61;&#109;&#x70;&#108;&#x65;&#x2E;&#99;&#111;&#109;</a>
-//
-// Based on a filter by Matthew Wickline, posted to the BBEdit-Talk
-// mailing list: <http://tinyurl.com/yu7ue>
-//
-
- var encode = [
- function (ch) {
- return "&#" + ch.charCodeAt(0) + ";";
- },
- function (ch) {
- return "&#x" + ch.charCodeAt(0).toString(16) + ";";
- },
- function (ch) {
- return ch;
- }
- ];
-
- addr = "mailto:" + addr;
-
- addr = addr.replace(/./g, function (ch) {
- if (ch == "@") {
- // this *must* be encoded. I insist.
- ch = encode[Math.floor(Math.random() * 2)](ch);
- } else if (ch != ":") {
- // leave ':' alone (to spot mailto: later)
- var r = Math.random();
- // roughly 10% raw, 45% hex, 45% dec
- ch = (
- r > .9 ? encode[2](ch) :
- r > .45 ? encode[1](ch) :
- encode[0](ch)
- );
- }
- return ch;
- });
-
- addr = "<a href=\"" + addr + "\">" + addr + "</a>";
- addr = addr.replace(/">.+:/g, "\">"); // strip the mailto: from the visible part
-
- return addr;
- }
-
- var _UnescapeSpecialChars = function (text) {
-//
-// Swap back in all the special characters we've hidden.
-//
- text = text.replace(/~E(\d+)E/g,
- function (wholeMatch, m1) {
- var charCodeToReplace = parseInt(m1);
- return String.fromCharCode(charCodeToReplace);
- }
- );
- return text;
- }
-
- var _Outdent = function (text) {
-//
-// Remove one level of line-leading tabs or spaces
-//
-
- // attacklab: hack around Konqueror 3.5.4 bug:
- // "----------bug".replace(/^-/g,"") == "bug"
-
- text = text.replace(/^(\t|[ ]{1,4})/gm, "~0"); // attacklab: g_tab_width
-
- // attacklab: clean up hack
- text = text.replace(/~0/g, "")
-
- return text;
- }
-
- var _Detab = function (text) {
-// attacklab: Detab's completely rewritten for speed.
-// In perl we could fix it by anchoring the regexp with \G.
-// In javascript we're less fortunate.
-
- // expand first n-1 tabs
- text = text.replace(/\t(?=\t)/g, " "); // attacklab: g_tab_width
-
- // replace the nth with two sentinels
- text = text.replace(/\t/g, "~A~B");
-
- // use the sentinel to anchor our regex so it doesn't explode
- text = text.replace(/~B(.+?)~A/g,
- function (wholeMatch, m1, m2) {
- var leadingText = m1;
- var numSpaces = 4 - leadingText.length % 4; // attacklab: g_tab_width
-
- // there *must* be a better way to do this:
- for (var i = 0; i < numSpaces; i++) leadingText += " ";
-
- return leadingText;
- }
- );
-
- // clean up sentinels
- text = text.replace(/~A/g, " "); // attacklab: g_tab_width
- text = text.replace(/~B/g, "");
-
- return text;
- }
-
-
-//
-// attacklab: Utility functions
-//
-
-
- var escapeCharacters = function (text, charsToEscape, afterBackslash) {
- // First we have to escape the escape characters so that
- // we can build a character class out of them
- var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g, "\\$1") + "])";
-
- if (afterBackslash) {
- regexString = "\\\\" + regexString;
- }
-
- var regex = new RegExp(regexString, "g");
- text = text.replace(regex, escapeCharacters_callback);
-
- return text;
- }
-
-
- var escapeCharacters_callback = function (wholeMatch, m1) {
- var charCodeToEscape = m1.charCodeAt(0);
- return "~E" + charCodeToEscape + "E";
- }
-
-} // end of Showdown.converter
-
-
-// export
-if (typeof module !== 'undefined') module.exports = Showdown;
-
-// stolen from AMD branch of underscore
-// AMD define happens at the end for compatibility with AMD loaders
-// that don't enforce next-turn semantics on modules.
-if (typeof define === 'function' && define.amd) {
- define('showdown', function () {
- return Showdown;
- });
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/external/utils/js/browserCheck.js b/usecaseui-common/src/main/webapp/app/fusion/external/utils/js/browserCheck.js
deleted file mode 100644
index 2a290d04..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/external/utils/js/browserCheck.js
+++ /dev/null
@@ -1,5 +0,0 @@
-var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
-var isFirefox = typeof window.InstallTrigger !== 'undefined';
-var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
-var isChrome = !!window.chrome && !isOpera;
-var isIE = !!document.documentMode; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/fonts/dummy.txt b/usecaseui-common/src/main/webapp/app/fusion/fonts/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/fonts/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbook-framecontroller.js b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbook-framecontroller.js
deleted file mode 100644
index 2c8740d6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbook-framecontroller.js
+++ /dev/null
@@ -1,15 +0,0 @@
-app.config(function($routeProvider) {
- $routeProvider
-
- //.when('/notebook-frame/:id/:key/:value',{
- //.when('/notebook-frame/:nid/:qprms',{
- /*.when('/notebook-frame',{
- templateUrl: 'app/fusion/notebook-integration/scripts/view-models/notebook-frame.html',
- controller: 'notebookFrameController'
- })*/
-
- .otherwise({
- templateUrl: 'app/fusion/notebook-integration/scripts/view-models/notebook-viz.html',
- controller: 'notebookFrameController'
- });
-}) \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbookController.js b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbookController.js
deleted file mode 100644
index e6f35384..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/nbookController.js
+++ /dev/null
@@ -1,97 +0,0 @@
-
-app.config(function($routeProvider) {
- $routeProvider
-
- .otherwise({
- // templateUrl: 'app/fusion/notebook-integration/scripts/view-models/notebook-frame.html',
- templateUrl: 'app/fusion/notebook-integration/scripts/view-models/notebookInputs.html',
- controller: 'nbookController'
- });
-}).controller('nbookController', ['$scope', '$location','$window','$http', function ($scope,$location,$window,$http) {
-
- $scope.keyValueList = [{}];
- console.log('onload nbookController');
- $scope.submitParameters = function() {
-
- $scope.iframevisibility = false;
- console.log('Inside nbook invoke save');
-
- $scope.postData = {};
-
- $scope.additionalqueryParams = {};
-
- //Use this if there is only one 1 query param key value pair
- $scope.additionalqueryParams.paramKey = $scope.qparamKey;
- $scope.additionalqueryParams.paramVal = $scope.qparamVal;
-
-
- // console.log('$scope.additionalqueryParams',$scope.additionalqueryParams);
- console.log('$scope.notebookvalue',$scope.notebookvalue);
-
-
- console.log('$scope.additionalqueryParams',$scope.additionalqueryParams);
-
- console.log('$scope.keyValueList',$scope.keyValueList);
-
- console.log('$scope.keyValueList.length',$scope.keyValueList.length);
-
- var qryStr = '';
- for(var i = 0; i < $scope.keyValueList.length; i++) {
- var obj = $scope.keyValueList[i];
- //console.log('obj.qK',obj.qK);
- if (obj.qK != undefined && obj.qV != undefined) {
- //console.log('Inside qk defined');
- if (qryStr!='')
- qryStr = qryStr+'&'+obj.qK+'='+obj.qV;
- else
- qryStr = obj.qK+'='+obj.qV;
-
- }
-
- }
- console.log('qryStr',qryStr);
-
-
-
- //var testurl = 'nbooktest.htm?nid='+$scope.notebookvalue+'&k1='+$scope.additionalqueryParams.paramKey+'&v1='+$scope.additionalqueryParams.paramVal;
-
- // var testurl = 'nbooktest.htm?nid='+$scope.notebookvalue+'&'+$scope.additionalqueryParams.paramKey+'='+$scope.additionalqueryParams.paramVal;
-
- var queryurl = 'nbooktest.htm?nid='+$scope.notebookvalue+'&'+qryStr;
-
- // var testurl = 'notebook.htm#/notebook-frame';
-
- window.open (queryurl,'_self',false);
-
-
- }
-
- $scope.addKeyValuePairs = function (kv) {
-
-
- if ($scope.keyValueList.length < 9) {
- $scope.keyValueList.push({
-
- });
- // alert($scope.reportRunJson.rangeAxisList.length);
- // console.log('$scope.keyValueList',$scope.keyValueList);
-
- } else {
- //document.getElementById("addbtn").disabled = true;
- // $scope.btnactive = false;
- document.getElementById("addbtn")["disabled"] = true;
- //document.getElementById("addbtn")["style.background-color"] = "#FFFF00";
-
- //$('#addbtn').btn('type') = "disabled";
- }
- }
-
- $scope.removeKeyValuePairs = function (index) {
- $scope.keyValueList.splice(index, 1);
- if ($scope.keyValueList.length == 8) {
- document.getElementById("addbtn")["disabled"] = false;
- }
- //console.log($scope.hardCodeReport.rangeAxisList)
- }
-
-}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/notebookFrameController.js b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/notebookFrameController.js
deleted file mode 100644
index 7a10f2e4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/controllers/notebookFrameController.js
+++ /dev/null
@@ -1,26 +0,0 @@
-app.controller('notebookFrameController', function ($scope,$location,$window,$http,$routeParams) {
- var nid = $window.location.search.substr($window.location.search.indexOf("=")+1);
- $scope.additionalqueryParams={};
- if ($window.location.search.substr($window.location.search.indexOf("=")+1)) {
- $scope.queryParams = $window.location.search;
- if($window.location.search.substring(0, $window.location.search.length-1).indexOf("&")!=-1) {
- $scope.notebookparam = $window.location.search.substring($window.location.search.indexOf("?")+1,$window.location.search.indexOf("&"));
- $scope.additionalqueryParams = JSON.parse('{"' + decodeURI($scope.queryParams.substr($scope.queryParams.indexOf("&")+1).replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}');
- }
- else {
- $scope.notebookparam1 = $window.location.search.substr($window.location.search.indexOf("?")+1);
- $scope.notebookparam = $scope.notebookparam1.substring(0, $scope.notebookparam1.length - 1);
- }
- $scope.notebookvalue = $scope.notebookparam.substr($scope.notebookparam.indexOf("=")+1);
- }
- else {
- $scope.notebookvalue = '833c0a69ec1433fbb2f8752af733cf0e';
- //console.log('Notebook value absent ',$scope.notebookvalue);
- }
- $http({method:'POST', url:'rNotebookFE/authCr', data: $scope.notebookvalue, params:{'qparams' : $scope.additionalqueryParams}}).success(function(data, status) {
- //console.log('Data received', data);
- //console.log('Status ', status);
- document.getElementById('itestframe').src = data;
-
- })
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/dependency/angular.js b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/dependency/angular.js
deleted file mode 100644
index 9e6a4f4f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/dependency/angular.js
+++ /dev/null
@@ -1,29400 +0,0 @@
-/**
- * @license AngularJS v1.5.0-beta.2
- * (c) 2010-2015 Google, Inc. http://angularjs.org
- * License: MIT
- */
-(function(window, document, undefined) {'use strict';
-
-/**
- * @description
- *
- * This object provides a utility for producing rich Error messages within
- * Angular. It can be called as follows:
- *
- * var exampleMinErr = minErr('example');
- * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);
- *
- * The above creates an instance of minErr in the example namespace. The
- * resulting error will have a namespaced error code of example.one. The
- * resulting error will replace {0} with the value of foo, and {1} with the
- * value of bar. The object is not restricted in the number of arguments it can
- * take.
- *
- * If fewer arguments are specified than necessary for interpolation, the extra
- * interpolation markers will be preserved in the final string.
- *
- * Since data will be parsed statically during a build step, some restrictions
- * are applied with respect to how minErr instances are created and called.
- * Instances should have names of the form namespaceMinErr for a minErr created
- * using minErr('namespace') . Error codes, namespaces and template strings
- * should all be static strings, not variables or general expressions.
- *
- * @param {string} module The namespace to use for the new minErr instance.
- * @param {function} ErrorConstructor Custom error constructor to be instantiated when returning
- * error from returned function, for cases when a particular type of error is useful.
- * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance
- */
-
-function minErr(module, ErrorConstructor) {
- ErrorConstructor = ErrorConstructor || Error;
- return function() {
- var SKIP_INDEXES = 2;
-
- var templateArgs = arguments,
- code = templateArgs[0],
- message = '[' + (module ? module + ':' : '') + code + '] ',
- template = templateArgs[1],
- paramPrefix, i;
-
- message += template.replace(/\{\d+\}/g, function(match) {
- var index = +match.slice(1, -1),
- shiftedIndex = index + SKIP_INDEXES;
-
- if (shiftedIndex < templateArgs.length) {
- return toDebugString(templateArgs[shiftedIndex]);
- }
-
- return match;
- });
-
- message += '\nhttp://errors.angularjs.org/1.5.0-beta.2/' +
- (module ? module + '/' : '') + code;
-
- for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') {
- message += paramPrefix + 'p' + (i - SKIP_INDEXES) + '=' +
- encodeURIComponent(toDebugString(templateArgs[i]));
- }
-
- return new ErrorConstructor(message);
- };
-}
-
-/* We need to tell jshint what variables are being exported */
-/* global angular: true,
- msie: true,
- jqLite: true,
- jQuery: true,
- slice: true,
- splice: true,
- push: true,
- toString: true,
- ngMinErr: true,
- angularModule: true,
- uid: true,
- REGEX_STRING_REGEXP: true,
- VALIDITY_STATE_PROPERTY: true,
-
- lowercase: true,
- uppercase: true,
- manualLowercase: true,
- manualUppercase: true,
- nodeName_: true,
- isArrayLike: true,
- forEach: true,
- forEachSorted: true,
- reverseParams: true,
- nextUid: true,
- setHashKey: true,
- extend: true,
- toInt: true,
- inherit: true,
- merge: true,
- noop: true,
- identity: true,
- valueFn: true,
- isUndefined: true,
- isDefined: true,
- isObject: true,
- isBlankObject: true,
- isString: true,
- isNumber: true,
- isDate: true,
- isArray: true,
- isFunction: true,
- isRegExp: true,
- isWindow: true,
- isScope: true,
- isFile: true,
- isFormData: true,
- isBlob: true,
- isBoolean: true,
- isPromiseLike: true,
- trim: true,
- escapeForRegexp: true,
- isElement: true,
- makeMap: true,
- includes: true,
- arrayRemove: true,
- copy: true,
- shallowCopy: true,
- equals: true,
- csp: true,
- jq: true,
- concat: true,
- sliceArgs: true,
- bind: true,
- toJsonReplacer: true,
- toJson: true,
- fromJson: true,
- convertTimezoneToLocal: true,
- timezoneToOffset: true,
- startingTag: true,
- tryDecodeURIComponent: true,
- parseKeyValue: true,
- toKeyValue: true,
- encodeUriSegment: true,
- encodeUriQuery: true,
- angularInit: true,
- bootstrap: true,
- getTestability: true,
- snake_case: true,
- bindJQuery: true,
- assertArg: true,
- assertArgFn: true,
- assertNotHasOwnProperty: true,
- getter: true,
- getBlockNodes: true,
- hasOwnProperty: true,
- createMap: true,
-
- NODE_TYPE_ELEMENT: true,
- NODE_TYPE_ATTRIBUTE: true,
- NODE_TYPE_TEXT: true,
- NODE_TYPE_COMMENT: true,
- NODE_TYPE_DOCUMENT: true,
- NODE_TYPE_DOCUMENT_FRAGMENT: true,
-*/
-
-////////////////////////////////////
-
-/**
- * @ngdoc module
- * @name ng
- * @module ng
- * @description
- *
- * # ng (core module)
- * The ng module is loaded by default when an AngularJS application is started. The module itself
- * contains the essential components for an AngularJS application to function. The table below
- * lists a high level breakdown of each of the services/factories, filters, directives and testing
- * components available within this core module.
- *
- * <div doc-module-components="ng"></div>
- */
-
-var REGEX_STRING_REGEXP = /^\/(.+)\/([a-z]*)$/;
-
-// The name of a form control's ValidityState property.
-// This is used so that it's possible for internal tests to create mock ValidityStates.
-var VALIDITY_STATE_PROPERTY = 'validity';
-
-/**
- * @ngdoc function
- * @name angular.lowercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to lowercase.
- * @param {string} string String to be converted to lowercase.
- * @returns {string} Lowercased string.
- */
-var lowercase = function(string) {return isString(string) ? string.toLowerCase() : string;};
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-
-/**
- * @ngdoc function
- * @name angular.uppercase
- * @module ng
- * @kind function
- *
- * @description Converts the specified string to uppercase.
- * @param {string} string String to be converted to uppercase.
- * @returns {string} Uppercased string.
- */
-var uppercase = function(string) {return isString(string) ? string.toUpperCase() : string;};
-
-
-var manualLowercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})
- : s;
-};
-var manualUppercase = function(s) {
- /* jshint bitwise: false */
- return isString(s)
- ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})
- : s;
-};
-
-
-// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish
-// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods
-// with correct but slower alternatives.
-if ('i' !== 'I'.toLowerCase()) {
- lowercase = manualLowercase;
- uppercase = manualUppercase;
-}
-
-
-var
- msie, // holds major version number for IE, or NaN if UA is not IE.
- jqLite, // delay binding since jQuery could be loaded after us.
- jQuery, // delay binding
- slice = [].slice,
- splice = [].splice,
- push = [].push,
- toString = Object.prototype.toString,
- getPrototypeOf = Object.getPrototypeOf,
- ngMinErr = minErr('ng'),
-
- /** @name angular */
- angular = window.angular || (window.angular = {}),
- angularModule,
- uid = 0;
-
-/**
- * documentMode is an IE-only property
- * http://msdn.microsoft.com/en-us/library/ie/cc196988(v=vs.85).aspx
- */
-msie = document.documentMode;
-
-
-/**
- * @private
- * @param {*} obj
- * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,
- * String ...)
- */
-function isArrayLike(obj) {
-
- // `null`, `undefined` and `window` are not array-like
- if (obj == null || isWindow(obj)) return false;
-
- // arrays, strings and jQuery/jqLite objects are array like
- // * jqLite is either the jQuery or jqLite constructor function
- // * we have to check the existance of jqLite first as this method is called
- // via the forEach method when constructing the jqLite object in the first place
- if (isArray(obj) || isString(obj) || (jqLite && obj instanceof jqLite)) return true;
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // "length" in obj used to prevent JIT error (gh-11508)
- var length = "length" in Object(obj) && obj.length;
-
- // NodeList objects (with `item` method) and
- // other objects with suitable length characteristics are array-like
- return isNumber(length) &&
- (length >= 0 && (length - 1) in obj || typeof obj.item == 'function');
-}
-
-/**
- * @ngdoc function
- * @name angular.forEach
- * @module ng
- * @kind function
- *
- * @description
- * Invokes the `iterator` function once for each item in `obj` collection, which can be either an
- * object or an array. The `iterator` function is invoked with `iterator(value, key, obj)`, where `value`
- * is the value of an object property or an array element, `key` is the object property key or
- * array element index and obj is the `obj` itself. Specifying a `context` for the function is optional.
- *
- * It is worth noting that `.forEach` does not iterate over inherited properties because it filters
- * using the `hasOwnProperty` method.
- *
- * Unlike ES262's
- * [Array.prototype.forEach](http://www.ecma-international.org/ecma-262/5.1/#sec-15.4.4.18),
- * Providing 'undefined' or 'null' values for `obj` will not throw a TypeError, but rather just
- * return the value provided.
- *
- ```js
- var values = {name: 'misko', gender: 'male'};
- var log = [];
- angular.forEach(values, function(value, key) {
- this.push(key + ': ' + value);
- }, log);
- expect(log).toEqual(['name: misko', 'gender: male']);
- ```
- *
- * @param {Object|Array} obj Object to iterate over.
- * @param {Function} iterator Iterator function.
- * @param {Object=} context Object to become context (`this`) for the iterator function.
- * @returns {Object|Array} Reference to `obj`.
- */
-
-function forEach(obj, iterator, context) {
- var key, length;
- if (obj) {
- if (isFunction(obj)) {
- for (key in obj) {
- // Need to check if hasOwnProperty exists,
- // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function
- if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else if (isArray(obj) || isArrayLike(obj)) {
- var isPrimitive = typeof obj !== 'object';
- for (key = 0, length = obj.length; key < length; key++) {
- if (isPrimitive || key in obj) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else if (obj.forEach && obj.forEach !== forEach) {
- obj.forEach(iterator, context, obj);
- } else if (isBlankObject(obj)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in obj) {
- iterator.call(context, obj[key], key, obj);
- }
- } else if (typeof obj.hasOwnProperty === 'function') {
- // Slow path for objects inheriting Object.prototype, hasOwnProperty check needed
- for (key in obj) {
- if (obj.hasOwnProperty(key)) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- } else {
- // Slow path for objects which do not have a method `hasOwnProperty`
- for (key in obj) {
- if (hasOwnProperty.call(obj, key)) {
- iterator.call(context, obj[key], key, obj);
- }
- }
- }
- }
- return obj;
-}
-
-function forEachSorted(obj, iterator, context) {
- var keys = Object.keys(obj).sort();
- for (var i = 0; i < keys.length; i++) {
- iterator.call(context, obj[keys[i]], keys[i]);
- }
- return keys;
-}
-
-
-/**
- * when using forEach the params are value, key, but it is often useful to have key, value.
- * @param {function(string, *)} iteratorFn
- * @returns {function(*, string)}
- */
-function reverseParams(iteratorFn) {
- return function(value, key) { iteratorFn(key, value); };
-}
-
-/**
- * A consistent way of creating unique IDs in angular.
- *
- * Using simple numbers allows us to generate 28.6 million unique ids per second for 10 years before
- * we hit number precision issues in JavaScript.
- *
- * Math.pow(2,53) / 60 / 60 / 24 / 365 / 10 = 28.6M
- *
- * @returns {number} an unique alpha-numeric string
- */
-function nextUid() {
- return ++uid;
-}
-
-
-/**
- * Set or clear the hashkey for an object.
- * @param obj object
- * @param h the hashkey (!truthy to delete the hashkey)
- */
-function setHashKey(obj, h) {
- if (h) {
- obj.$$hashKey = h;
- } else {
- delete obj.$$hashKey;
- }
-}
-
-
-function baseExtend(dst, objs, deep) {
- var h = dst.$$hashKey;
-
- for (var i = 0, ii = objs.length; i < ii; ++i) {
- var obj = objs[i];
- if (!isObject(obj) && !isFunction(obj)) continue;
- var keys = Object.keys(obj);
- for (var j = 0, jj = keys.length; j < jj; j++) {
- var key = keys[j];
- var src = obj[key];
-
- if (deep && isObject(src)) {
- if (isDate(src)) {
- dst[key] = new Date(src.valueOf());
- } else if (isRegExp(src)) {
- dst[key] = new RegExp(src);
- } else if (src.nodeName) {
- dst[key] = src.cloneNode(true);
- } else if (isElement(src)) {
- dst[key] = src.clone();
- } else {
- if (!isObject(dst[key])) dst[key] = isArray(src) ? [] : {};
- baseExtend(dst[key], [src], true);
- }
- } else {
- dst[key] = src;
- }
- }
- }
-
- setHashKey(dst, h);
- return dst;
-}
-
-/**
- * @ngdoc function
- * @name angular.extend
- * @module ng
- * @kind function
- *
- * @description
- * Extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
- * to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
- * by passing an empty object as the target: `var object = angular.extend({}, object1, object2)`.
- *
- * **Note:** Keep in mind that `angular.extend` does not support recursive merge (deep copy). Use
- * {@link angular.merge} for this.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- * @returns {Object} Reference to `dst`.
- */
-function extend(dst) {
- return baseExtend(dst, slice.call(arguments, 1), false);
-}
-
-
-/**
-* @ngdoc function
-* @name angular.merge
-* @module ng
-* @kind function
-*
-* @description
-* Deeply extends the destination object `dst` by copying own enumerable properties from the `src` object(s)
-* to `dst`. You can specify multiple `src` objects. If you want to preserve original objects, you can do so
-* by passing an empty object as the target: `var object = angular.merge({}, object1, object2)`.
-*
-* Unlike {@link angular.extend extend()}, `merge()` recursively descends into object properties of source
-* objects, performing a deep copy.
-*
-* @param {Object} dst Destination object.
-* @param {...Object} src Source object(s).
-* @returns {Object} Reference to `dst`.
-*/
-function merge(dst) {
- return baseExtend(dst, slice.call(arguments, 1), true);
-}
-
-
-
-function toInt(str) {
- return parseInt(str, 10);
-}
-
-
-function inherit(parent, extra) {
- return extend(Object.create(parent), extra);
-}
-
-/**
- * @ngdoc function
- * @name angular.noop
- * @module ng
- * @kind function
- *
- * @description
- * A function that performs no operations. This function can be useful when writing code in the
- * functional style.
- ```js
- function foo(callback) {
- var result = calculateResult();
- (callback || angular.noop)(result);
- }
- ```
- */
-function noop() {}
-noop.$inject = [];
-
-
-/**
- * @ngdoc function
- * @name angular.identity
- * @module ng
- * @kind function
- *
- * @description
- * A function that returns its first argument. This function is useful when writing code in the
- * functional style.
- *
- ```js
- function transformer(transformationFn, value) {
- return (transformationFn || angular.identity)(value);
- };
- ```
- * @param {*} value to be returned.
- * @returns {*} the value passed in.
- */
-function identity($) {return $;}
-identity.$inject = [];
-
-
-function valueFn(value) {return function() {return value;};}
-
-function hasCustomToString(obj) {
- return isFunction(obj.toString) && obj.toString !== toString;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isUndefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is undefined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is undefined.
- */
-function isUndefined(value) {return typeof value === 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDefined
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is defined.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is defined.
- */
-function isDefined(value) {return typeof value !== 'undefined';}
-
-
-/**
- * @ngdoc function
- * @name angular.isObject
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not
- * considered to be objects. Note that JavaScript arrays are objects.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Object` but not `null`.
- */
-function isObject(value) {
- // http://jsperf.com/isobject4
- return value !== null && typeof value === 'object';
-}
-
-
-/**
- * Determine if a value is an object with a null prototype
- *
- * @returns {boolean} True if `value` is an `Object` with a null prototype
- */
-function isBlankObject(value) {
- return value !== null && typeof value === 'object' && !getPrototypeOf(value);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isString
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `String`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `String`.
- */
-function isString(value) {return typeof value === 'string';}
-
-
-/**
- * @ngdoc function
- * @name angular.isNumber
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Number`.
- *
- * This includes the "special" numbers `NaN`, `+Infinity` and `-Infinity`.
- *
- * If you wish to exclude these then you can use the native
- * [`isFinite'](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isFinite)
- * method.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Number`.
- */
-function isNumber(value) {return typeof value === 'number';}
-
-
-/**
- * @ngdoc function
- * @name angular.isDate
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a value is a date.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Date`.
- */
-function isDate(value) {
- return toString.call(value) === '[object Date]';
-}
-
-
-/**
- * @ngdoc function
- * @name angular.isArray
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is an `Array`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is an `Array`.
- */
-var isArray = Array.isArray;
-
-/**
- * @ngdoc function
- * @name angular.isFunction
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a `Function`.
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `Function`.
- */
-function isFunction(value) {return typeof value === 'function';}
-
-
-/**
- * Determines if a value is a regular expression object.
- *
- * @private
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a `RegExp`.
- */
-function isRegExp(value) {
- return toString.call(value) === '[object RegExp]';
-}
-
-
-/**
- * Checks if `obj` is a window object.
- *
- * @private
- * @param {*} obj Object to check
- * @returns {boolean} True if `obj` is a window obj.
- */
-function isWindow(obj) {
- return obj && obj.window === obj;
-}
-
-
-function isScope(obj) {
- return obj && obj.$evalAsync && obj.$watch;
-}
-
-
-function isFile(obj) {
- return toString.call(obj) === '[object File]';
-}
-
-
-function isFormData(obj) {
- return toString.call(obj) === '[object FormData]';
-}
-
-
-function isBlob(obj) {
- return toString.call(obj) === '[object Blob]';
-}
-
-
-function isBoolean(value) {
- return typeof value === 'boolean';
-}
-
-
-function isPromiseLike(obj) {
- return obj && isFunction(obj.then);
-}
-
-
-var TYPED_ARRAY_REGEXP = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;
-function isTypedArray(value) {
- return value && isNumber(value.length) && TYPED_ARRAY_REGEXP.test(toString.call(value));
-}
-
-
-var trim = function(value) {
- return isString(value) ? value.trim() : value;
-};
-
-// Copied from:
-// http://docs.closure-library.googlecode.com/git/local_closure_goog_string_string.js.source.html#line1021
-// Prereq: s is a string.
-var escapeForRegexp = function(s) {
- return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1').
- replace(/\x08/g, '\\x08');
-};
-
-
-/**
- * @ngdoc function
- * @name angular.isElement
- * @module ng
- * @kind function
- *
- * @description
- * Determines if a reference is a DOM element (or wrapped jQuery element).
- *
- * @param {*} value Reference to check.
- * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).
- */
-function isElement(node) {
- return !!(node &&
- (node.nodeName // we are a direct element
- || (node.prop && node.attr && node.find))); // we have an on and find method part of jQuery API
-}
-
-/**
- * @param str 'key1,key2,...'
- * @returns {object} in the form of {key1:true, key2:true, ...}
- */
-function makeMap(str) {
- var obj = {}, items = str.split(","), i;
- for (i = 0; i < items.length; i++) {
- obj[items[i]] = true;
- }
- return obj;
-}
-
-
-function nodeName_(element) {
- return lowercase(element.nodeName || (element[0] && element[0].nodeName));
-}
-
-function includes(array, obj) {
- return Array.prototype.indexOf.call(array, obj) != -1;
-}
-
-function arrayRemove(array, value) {
- var index = array.indexOf(value);
- if (index >= 0) {
- array.splice(index, 1);
- }
- return index;
-}
-
-/**
- * @ngdoc function
- * @name angular.copy
- * @module ng
- * @kind function
- *
- * @description
- * Creates a deep copy of `source`, which should be an object or an array.
- *
- * * If no destination is supplied, a copy of the object or array is created.
- * * If a destination is provided, all of its elements (for arrays) or properties (for objects)
- * are deleted and then all elements/properties from the source are copied to it.
- * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.
- * * If `source` is identical to 'destination' an exception will be thrown.
- *
- * @param {*} source The source that will be used to make a copy.
- * Can be any type, including primitives, `null`, and `undefined`.
- * @param {(Object|Array)=} destination Destination into which the source is copied. If
- * provided, must be of the same type as `source`.
- * @returns {*} The copy or updated `destination`, if `destination` was specified.
- *
- * @example
- <example module="copyExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form novalidate class="simple-form">
- Name: <input type="text" ng-model="user.name" /><br />
- E-mail: <input type="email" ng-model="user.email" /><br />
- Gender: <input type="radio" ng-model="user.gender" value="male" />male
- <input type="radio" ng-model="user.gender" value="female" />female<br />
- <button ng-click="reset()">RESET</button>
- <button ng-click="update(user)">SAVE</button>
- </form>
- <pre>form = {{user | json}}</pre>
- <pre>master = {{master | json}}</pre>
- </div>
-
- <script>
- angular.module('copyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.master= {};
-
- $scope.update = function(user) {
- // Example with 1 argument
- $scope.master= angular.copy(user);
- };
-
- $scope.reset = function() {
- // Example with 2 arguments
- angular.copy($scope.master, $scope.user);
- };
-
- $scope.reset();
- }]);
- </script>
- </file>
- </example>
- */
-function copy(source, destination) {
- var stackSource = [];
- var stackDest = [];
-
- if (destination) {
- if (isTypedArray(destination)) {
- throw ngMinErr('cpta', "Can't copy! TypedArray destination cannot be mutated.");
- }
- if (source === destination) {
- throw ngMinErr('cpi', "Can't copy! Source and destination are identical.");
- }
-
- // Empty the destination object
- if (isArray(destination)) {
- destination.length = 0;
- } else {
- forEach(destination, function(value, key) {
- if (key !== '$$hashKey') {
- delete destination[key];
- }
- });
- }
-
- stackSource.push(source);
- stackDest.push(destination);
- return copyRecurse(source, destination);
- }
-
- return copyElement(source);
-
- function copyRecurse(source, destination) {
- var h = destination.$$hashKey;
- var result, key;
- if (isArray(source)) {
- for (var i = 0, ii = source.length; i < ii; i++) {
- destination.push(copyElement(source[i]));
- }
- } else if (isBlankObject(source)) {
- // createMap() fast path --- Safe to avoid hasOwnProperty check because prototype chain is empty
- for (key in source) {
- destination[key] = copyElement(source[key]);
- }
- } else if (source && typeof source.hasOwnProperty === 'function') {
- // Slow path, which must rely on hasOwnProperty
- for (key in source) {
- if (source.hasOwnProperty(key)) {
- destination[key] = copyElement(source[key]);
- }
- }
- } else {
- // Slowest path --- hasOwnProperty can't be called as a method
- for (key in source) {
- if (hasOwnProperty.call(source, key)) {
- destination[key] = copyElement(source[key]);
- }
- }
- }
- setHashKey(destination, h);
- return destination;
- }
-
- function copyElement(source) {
- // Simple values
- if (!isObject(source)) {
- return source;
- }
-
- // Already copied values
- var index = stackSource.indexOf(source);
- if (index !== -1) {
- return stackDest[index];
- }
-
- if (isWindow(source) || isScope(source)) {
- throw ngMinErr('cpws',
- "Can't copy! Making copies of Window or Scope instances is not supported.");
- }
-
- var needsRecurse = false;
- var destination;
-
- if (isArray(source)) {
- destination = [];
- needsRecurse = true;
- } else if (isTypedArray(source)) {
- destination = new source.constructor(source);
- } else if (isDate(source)) {
- destination = new Date(source.getTime());
- } else if (isRegExp(source)) {
- destination = new RegExp(source.source, source.toString().match(/[^\/]*$/)[0]);
- destination.lastIndex = source.lastIndex;
- } else if (isFunction(source.cloneNode)) {
- destination = source.cloneNode(true);
- } else {
- destination = Object.create(getPrototypeOf(source));
- needsRecurse = true;
- }
-
- stackSource.push(source);
- stackDest.push(destination);
-
- return needsRecurse
- ? copyRecurse(source, destination)
- : destination;
- }
-}
-
-/**
- * Creates a shallow copy of an object, an array or a primitive.
- *
- * Assumes that there are no proto properties for objects.
- */
-function shallowCopy(src, dst) {
- if (isArray(src)) {
- dst = dst || [];
-
- for (var i = 0, ii = src.length; i < ii; i++) {
- dst[i] = src[i];
- }
- } else if (isObject(src)) {
- dst = dst || {};
-
- for (var key in src) {
- if (!(key.charAt(0) === '$' && key.charAt(1) === '$')) {
- dst[key] = src[key];
- }
- }
- }
-
- return dst || src;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.equals
- * @module ng
- * @kind function
- *
- * @description
- * Determines if two objects or two values are equivalent. Supports value types, regular
- * expressions, arrays and objects.
- *
- * Two objects or values are considered equivalent if at least one of the following is true:
- *
- * * Both objects or values pass `===` comparison.
- * * Both objects or values are of the same type and all of their properties are equal by
- * comparing them with `angular.equals`.
- * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)
- * * Both values represent the same regular expression (In JavaScript,
- * /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual
- * representation matches).
- *
- * During a property comparison, properties of `function` type and properties with names
- * that begin with `$` are ignored.
- *
- * Scope and DOMWindow objects are being compared only by identify (`===`).
- *
- * @param {*} o1 Object or value to compare.
- * @param {*} o2 Object or value to compare.
- * @returns {boolean} True if arguments are equal.
- */
-function equals(o1, o2) {
- if (o1 === o2) return true;
- if (o1 === null || o2 === null) return false;
- if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN
- var t1 = typeof o1, t2 = typeof o2, length, key, keySet;
- if (t1 == t2) {
- if (t1 == 'object') {
- if (isArray(o1)) {
- if (!isArray(o2)) return false;
- if ((length = o1.length) == o2.length) {
- for (key = 0; key < length; key++) {
- if (!equals(o1[key], o2[key])) return false;
- }
- return true;
- }
- } else if (isDate(o1)) {
- if (!isDate(o2)) return false;
- return equals(o1.getTime(), o2.getTime());
- } else if (isRegExp(o1)) {
- return isRegExp(o2) ? o1.toString() == o2.toString() : false;
- } else {
- if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) ||
- isArray(o2) || isDate(o2) || isRegExp(o2)) return false;
- keySet = createMap();
- for (key in o1) {
- if (key.charAt(0) === '$' || isFunction(o1[key])) continue;
- if (!equals(o1[key], o2[key])) return false;
- keySet[key] = true;
- }
- for (key in o2) {
- if (!(key in keySet) &&
- key.charAt(0) !== '$' &&
- isDefined(o2[key]) &&
- !isFunction(o2[key])) return false;
- }
- return true;
- }
- }
- }
- return false;
-}
-
-var csp = function() {
- if (!isDefined(csp.rules)) {
-
-
- var ngCspElement = (document.querySelector('[ng-csp]') ||
- document.querySelector('[data-ng-csp]'));
-
- if (ngCspElement) {
- var ngCspAttribute = ngCspElement.getAttribute('ng-csp') ||
- ngCspElement.getAttribute('data-ng-csp');
- csp.rules = {
- noUnsafeEval: !ngCspAttribute || (ngCspAttribute.indexOf('no-unsafe-eval') !== -1),
- noInlineStyle: !ngCspAttribute || (ngCspAttribute.indexOf('no-inline-style') !== -1)
- };
- } else {
- csp.rules = {
- noUnsafeEval: noUnsafeEval(),
- noInlineStyle: false
- };
- }
- }
-
- return csp.rules;
-
- function noUnsafeEval() {
- try {
- /* jshint -W031, -W054 */
- new Function('');
- /* jshint +W031, +W054 */
- return false;
- } catch (e) {
- return true;
- }
- }
-};
-
-/**
- * @ngdoc directive
- * @module ng
- * @name ngJq
- *
- * @element ANY
- * @param {string=} ngJq the name of the library available under `window`
- * to be used for angular.element
- * @description
- * Use this directive to force the angular.element library. This should be
- * used to force either jqLite by leaving ng-jq blank or setting the name of
- * the jquery variable under window (eg. jQuery).
- *
- * Since angular looks for this directive when it is loaded (doesn't wait for the
- * DOMContentLoaded event), it must be placed on an element that comes before the script
- * which loads angular. Also, only the first instance of `ng-jq` will be used and all
- * others ignored.
- *
- * @example
- * This example shows how to force jqLite using the `ngJq` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-jq>
- ...
- ...
- </html>
- ```
- * @example
- * This example shows how to use a jQuery based library of a different name.
- * The library name must be available at the top most 'window'.
- ```html
- <!doctype html>
- <html ng-app ng-jq="jQueryLib">
- ...
- ...
- </html>
- ```
- */
-var jq = function() {
- if (isDefined(jq.name_)) return jq.name_;
- var el;
- var i, ii = ngAttrPrefixes.length, prefix, name;
- for (i = 0; i < ii; ++i) {
- prefix = ngAttrPrefixes[i];
- if (el = document.querySelector('[' + prefix.replace(':', '\\:') + 'jq]')) {
- name = el.getAttribute(prefix + 'jq');
- break;
- }
- }
-
- return (jq.name_ = name);
-};
-
-function concat(array1, array2, index) {
- return array1.concat(slice.call(array2, index));
-}
-
-function sliceArgs(args, startIndex) {
- return slice.call(args, startIndex || 0);
-}
-
-
-/* jshint -W101 */
-/**
- * @ngdoc function
- * @name angular.bind
- * @module ng
- * @kind function
- *
- * @description
- * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for
- * `fn`). You can supply optional `args` that are prebound to the function. This feature is also
- * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as
- * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).
- *
- * @param {Object} self Context which `fn` should be evaluated in.
- * @param {function()} fn Function to be bound.
- * @param {...*} args Optional arguments to be prebound to the `fn` function call.
- * @returns {function()} Function that wraps the `fn` with all the specified bindings.
- */
-/* jshint +W101 */
-function bind(self, fn) {
- var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];
- if (isFunction(fn) && !(fn instanceof RegExp)) {
- return curryArgs.length
- ? function() {
- return arguments.length
- ? fn.apply(self, concat(curryArgs, arguments, 0))
- : fn.apply(self, curryArgs);
- }
- : function() {
- return arguments.length
- ? fn.apply(self, arguments)
- : fn.call(self);
- };
- } else {
- // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)
- return fn;
- }
-}
-
-
-function toJsonReplacer(key, value) {
- var val = value;
-
- if (typeof key === 'string' && key.charAt(0) === '$' && key.charAt(1) === '$') {
- val = undefined;
- } else if (isWindow(value)) {
- val = '$WINDOW';
- } else if (value && document === value) {
- val = '$DOCUMENT';
- } else if (isScope(value)) {
- val = '$SCOPE';
- }
-
- return val;
-}
-
-
-/**
- * @ngdoc function
- * @name angular.toJson
- * @module ng
- * @kind function
- *
- * @description
- * Serializes input into a JSON-formatted string. Properties with leading $$ characters will be
- * stripped since angular uses this notation internally.
- *
- * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.
- * @param {boolean|number} [pretty=2] If set to true, the JSON output will contain newlines and whitespace.
- * If set to an integer, the JSON output will contain that many spaces per indentation.
- * @returns {string|undefined} JSON-ified string representing `obj`.
- */
-function toJson(obj, pretty) {
- if (typeof obj === 'undefined') return undefined;
- if (!isNumber(pretty)) {
- pretty = pretty ? 2 : null;
- }
- return JSON.stringify(obj, toJsonReplacer, pretty);
-}
-
-
-/**
- * @ngdoc function
- * @name angular.fromJson
- * @module ng
- * @kind function
- *
- * @description
- * Deserializes a JSON string.
- *
- * @param {string} json JSON string to deserialize.
- * @returns {Object|Array|string|number} Deserialized JSON string.
- */
-function fromJson(json) {
- return isString(json)
- ? JSON.parse(json)
- : json;
-}
-
-
-function timezoneToOffset(timezone, fallback) {
- var requestedTimezoneOffset = Date.parse('Jan 01, 1970 00:00:00 ' + timezone) / 60000;
- return isNaN(requestedTimezoneOffset) ? fallback : requestedTimezoneOffset;
-}
-
-
-function addDateMinutes(date, minutes) {
- date = new Date(date.getTime());
- date.setMinutes(date.getMinutes() + minutes);
- return date;
-}
-
-
-function convertTimezoneToLocal(date, timezone, reverse) {
- reverse = reverse ? -1 : 1;
- var timezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
- return addDateMinutes(date, reverse * (timezoneOffset - date.getTimezoneOffset()));
-}
-
-
-/**
- * @returns {string} Returns the string representation of the element.
- */
-function startingTag(element) {
- element = jqLite(element).clone();
- try {
- // turns out IE does not let you set .html() on elements which
- // are not allowed to have children. So we just ignore it.
- element.empty();
- } catch (e) {}
- var elemHtml = jqLite('<div>').append(element).html();
- try {
- return element[0].nodeType === NODE_TYPE_TEXT ? lowercase(elemHtml) :
- elemHtml.
- match(/^(<[^>]+>)/)[1].
- replace(/^<([\w\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });
- } catch (e) {
- return lowercase(elemHtml);
- }
-
-}
-
-
-/////////////////////////////////////////////////
-
-/**
- * Tries to decode the URI component without throwing an exception.
- *
- * @private
- * @param str value potential URI component to check.
- * @returns {boolean} True if `value` can be decoded
- * with the decodeURIComponent function.
- */
-function tryDecodeURIComponent(value) {
- try {
- return decodeURIComponent(value);
- } catch (e) {
- // Ignore any invalid uri component
- }
-}
-
-
-/**
- * Parses an escaped url query string into key-value pairs.
- * @returns {Object.<string,boolean|Array>}
- */
-function parseKeyValue(/**string*/keyValue) {
- var obj = {};
- forEach((keyValue || "").split('&'), function(keyValue) {
- var splitPoint, key, val;
- if (keyValue) {
- key = keyValue = keyValue.replace(/\+/g,'%20');
- splitPoint = keyValue.indexOf('=');
- if (splitPoint !== -1) {
- key = keyValue.substring(0, splitPoint);
- val = keyValue.substring(splitPoint + 1);
- }
- key = tryDecodeURIComponent(key);
- if (isDefined(key)) {
- val = isDefined(val) ? tryDecodeURIComponent(val) : true;
- if (!hasOwnProperty.call(obj, key)) {
- obj[key] = val;
- } else if (isArray(obj[key])) {
- obj[key].push(val);
- } else {
- obj[key] = [obj[key],val];
- }
- }
- }
- });
- return obj;
-}
-
-function toKeyValue(obj) {
- var parts = [];
- forEach(obj, function(value, key) {
- if (isArray(value)) {
- forEach(value, function(arrayValue) {
- parts.push(encodeUriQuery(key, true) +
- (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));
- });
- } else {
- parts.push(encodeUriQuery(key, true) +
- (value === true ? '' : '=' + encodeUriQuery(value, true)));
- }
- });
- return parts.length ? parts.join('&') : '';
-}
-
-
-/**
- * We need our custom method because encodeURIComponent is too aggressive and doesn't follow
- * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
- * segments:
- * segment = *pchar
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * pct-encoded = "%" HEXDIG HEXDIG
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriSegment(val) {
- return encodeUriQuery(val, true).
- replace(/%26/gi, '&').
- replace(/%3D/gi, '=').
- replace(/%2B/gi, '+');
-}
-
-
-/**
- * This method is intended for encoding *key* or *value* parts of query component. We need a custom
- * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be
- * encoded per http://tools.ietf.org/html/rfc3986:
- * query = *( pchar / "/" / "?" )
- * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- * / "*" / "+" / "," / ";" / "="
- */
-function encodeUriQuery(val, pctEncodeSpaces) {
- return encodeURIComponent(val).
- replace(/%40/gi, '@').
- replace(/%3A/gi, ':').
- replace(/%24/g, '$').
- replace(/%2C/gi, ',').
- replace(/%3B/gi, ';').
- replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));
-}
-
-var ngAttrPrefixes = ['ng-', 'data-ng-', 'ng:', 'x-ng-'];
-
-function getNgAttribute(element, ngAttr) {
- var attr, i, ii = ngAttrPrefixes.length;
- for (i = 0; i < ii; ++i) {
- attr = ngAttrPrefixes[i] + ngAttr;
- if (isString(attr = element.getAttribute(attr))) {
- return attr;
- }
- }
- return null;
-}
-
-/**
- * @ngdoc directive
- * @name ngApp
- * @module ng
- *
- * @element ANY
- * @param {angular.Module} ngApp an optional application
- * {@link angular.module module} name to load.
- * @param {boolean=} ngStrictDi if this attribute is present on the app element, the injector will be
- * created in "strict-di" mode. This means that the application will fail to invoke functions which
- * do not use explicit function annotation (and are thus unsuitable for minification), as described
- * in {@link guide/di the Dependency Injection guide}, and useful debugging info will assist in
- * tracking down the root of these bugs.
- *
- * @description
- *
- * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive
- * designates the **root element** of the application and is typically placed near the root element
- * of the page - e.g. on the `<body>` or `<html>` tags.
- *
- * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`
- * found in the document will be used to define the root element to auto-bootstrap as an
- * application. To run multiple applications in an HTML document you must manually bootstrap them using
- * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.
- *
- * You can specify an **AngularJS module** to be used as the root module for the application. This
- * module will be loaded into the {@link auto.$injector} when the application is bootstrapped. It
- * should contain the application code needed or have dependencies on other modules that will
- * contain the code. See {@link angular.module} for more information.
- *
- * In the example below if the `ngApp` directive were not placed on the `html` element then the
- * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`
- * would not be resolved to `3`.
- *
- * `ngApp` is the easiest, and most common way to bootstrap an application.
- *
- <example module="ngAppDemo">
- <file name="index.html">
- <div ng-controller="ngAppDemoController">
- I can add: {{a}} + {{b}} = {{ a+b }}
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- });
- </file>
- </example>
- *
- * Using `ngStrictDi`, you would see something like this:
- *
- <example ng-app-included="true">
- <file name="index.html">
- <div ng-app="ngAppStrictDemo" ng-strict-di>
- <div ng-controller="GoodController1">
- I can add: {{a}} + {{b}} = {{ a+b }}
-
- <p>This renders because the controller does not fail to
- instantiate, by using explicit annotation style (see
- script.js for details)
- </p>
- </div>
-
- <div ng-controller="GoodController2">
- Name: <input ng-model="name"><br />
- Hello, {{name}}!
-
- <p>This renders because the controller does not fail to
- instantiate, by using explicit annotation style
- (see script.js for details)
- </p>
- </div>
-
- <div ng-controller="BadController">
- I can add: {{a}} + {{b}} = {{ a+b }}
-
- <p>The controller could not be instantiated, due to relying
- on automatic function annotations (which are disabled in
- strict mode). As such, the content of this section is not
- interpolated, and there should be an error in your web console.
- </p>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('ngAppStrictDemo', [])
- // BadController will fail to instantiate, due to relying on automatic function annotation,
- // rather than an explicit annotation
- .controller('BadController', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- })
- // Unlike BadController, GoodController1 and GoodController2 will not fail to be instantiated,
- // due to using explicit annotations using the array style and $inject property, respectively.
- .controller('GoodController1', ['$scope', function($scope) {
- $scope.a = 1;
- $scope.b = 2;
- }])
- .controller('GoodController2', GoodController2);
- function GoodController2($scope) {
- $scope.name = "World";
- }
- GoodController2.$inject = ['$scope'];
- </file>
- <file name="style.css">
- div[ng-controller] {
- margin-bottom: 1em;
- -webkit-border-radius: 4px;
- border-radius: 4px;
- border: 1px solid;
- padding: .5em;
- }
- div[ng-controller^=Good] {
- border-color: #d6e9c6;
- background-color: #dff0d8;
- color: #3c763d;
- }
- div[ng-controller^=Bad] {
- border-color: #ebccd1;
- background-color: #f2dede;
- color: #a94442;
- margin-bottom: 0;
- }
- </file>
- </example>
- */
-function angularInit(element, bootstrap) {
- var appElement,
- module,
- config = {};
-
- // The element `element` has priority over any other element
- forEach(ngAttrPrefixes, function(prefix) {
- var name = prefix + 'app';
-
- if (!appElement && element.hasAttribute && element.hasAttribute(name)) {
- appElement = element;
- module = element.getAttribute(name);
- }
- });
- forEach(ngAttrPrefixes, function(prefix) {
- var name = prefix + 'app';
- var candidate;
-
- if (!appElement && (candidate = element.querySelector('[' + name.replace(':', '\\:') + ']'))) {
- appElement = candidate;
- module = candidate.getAttribute(name);
- }
- });
- if (appElement) {
- config.strictDi = getNgAttribute(appElement, "strict-di") !== null;
- bootstrap(appElement, module ? [module] : [], config);
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.bootstrap
- * @module ng
- * @description
- * Use this function to manually start up angular application.
- *
- * See: {@link guide/bootstrap Bootstrap}
- *
- * Note that Protractor based end-to-end tests cannot use this function to bootstrap manually.
- * They must use {@link ng.directive:ngApp ngApp}.
- *
- * Angular will detect if it has been loaded into the browser more than once and only allow the
- * first loaded script to be bootstrapped and will report a warning to the browser console for
- * each of the subsequent scripts. This prevents strange results in applications, where otherwise
- * multiple instances of Angular try to work on the DOM.
- *
- * ```html
- * <!doctype html>
- * <html>
- * <body>
- * <div ng-controller="WelcomeController">
- * {{greeting}}
- * </div>
- *
- * <script src="angular.js"></script>
- * <script>
- * var app = angular.module('demo', [])
- * .controller('WelcomeController', function($scope) {
- * $scope.greeting = 'Welcome!';
- * });
- * angular.bootstrap(document, ['demo']);
- * </script>
- * </body>
- * </html>
- * ```
- *
- * @param {DOMElement} element DOM element which is the root of angular application.
- * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.
- * Each item in the array should be the name of a predefined module or a (DI annotated)
- * function that will be invoked by the injector as a `config` block.
- * See: {@link angular.module modules}
- * @param {Object=} config an object for defining configuration options for the application. The
- * following keys are supported:
- *
- * * `strictDi` - disable automatic function annotation for the application. This is meant to
- * assist in finding bugs which break minified code. Defaults to `false`.
- *
- * @returns {auto.$injector} Returns the newly created injector for this app.
- */
-function bootstrap(element, modules, config) {
- if (!isObject(config)) config = {};
- var defaultConfig = {
- strictDi: false
- };
- config = extend(defaultConfig, config);
- var doBootstrap = function() {
- element = jqLite(element);
-
- if (element.injector()) {
- var tag = (element[0] === document) ? 'document' : startingTag(element);
- //Encode angle brackets to prevent input from being sanitized to empty string #8683
- throw ngMinErr(
- 'btstrpd',
- "App Already Bootstrapped with this Element '{0}'",
- tag.replace(/</,'&lt;').replace(/>/,'&gt;'));
- }
-
- modules = modules || [];
- modules.unshift(['$provide', function($provide) {
- $provide.value('$rootElement', element);
- }]);
-
- if (config.debugInfoEnabled) {
- // Pushing so that this overrides `debugInfoEnabled` setting defined in user's `modules`.
- modules.push(['$compileProvider', function($compileProvider) {
- $compileProvider.debugInfoEnabled(true);
- }]);
- }
-
- modules.unshift('ng');
- var injector = createInjector(modules, config.strictDi);
- injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector',
- function bootstrapApply(scope, element, compile, injector) {
- scope.$apply(function() {
- element.data('$injector', injector);
- compile(element)(scope);
- });
- }]
- );
- return injector;
- };
-
- var NG_ENABLE_DEBUG_INFO = /^NG_ENABLE_DEBUG_INFO!/;
- var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;
-
- if (window && NG_ENABLE_DEBUG_INFO.test(window.name)) {
- config.debugInfoEnabled = true;
- window.name = window.name.replace(NG_ENABLE_DEBUG_INFO, '');
- }
-
- if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {
- return doBootstrap();
- }
-
- window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');
- angular.resumeBootstrap = function(extraModules) {
- forEach(extraModules, function(module) {
- modules.push(module);
- });
- return doBootstrap();
- };
-
- if (isFunction(angular.resumeDeferredBootstrap)) {
- angular.resumeDeferredBootstrap();
- }
-}
-
-/**
- * @ngdoc function
- * @name angular.reloadWithDebugInfo
- * @module ng
- * @description
- * Use this function to reload the current application with debug information turned on.
- * This takes precedence over a call to `$compileProvider.debugInfoEnabled(false)`.
- *
- * See {@link ng.$compileProvider#debugInfoEnabled} for more.
- */
-function reloadWithDebugInfo() {
- window.name = 'NG_ENABLE_DEBUG_INFO!' + window.name;
- window.location.reload();
-}
-
-/**
- * @name angular.getTestability
- * @module ng
- * @description
- * Get the testability service for the instance of Angular on the given
- * element.
- * @param {DOMElement} element DOM element which is the root of angular application.
- */
-function getTestability(rootElement) {
- var injector = angular.element(rootElement).injector();
- if (!injector) {
- throw ngMinErr('test',
- 'no injector found for element argument to getTestability');
- }
- return injector.get('$$testability');
-}
-
-var SNAKE_CASE_REGEXP = /[A-Z]/g;
-function snake_case(name, separator) {
- separator = separator || '_';
- return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {
- return (pos ? separator : '') + letter.toLowerCase();
- });
-}
-
-var bindJQueryFired = false;
-function bindJQuery() {
- var originalCleanData;
-
- if (bindJQueryFired) {
- return;
- }
-
- // bind to jQuery if present;
- var jqName = jq();
- jQuery = isUndefined(jqName) ? window.jQuery : // use jQuery (if present)
- !jqName ? undefined : // use jqLite
- window[jqName]; // use jQuery specified by `ngJq`
-
- // Use jQuery if it exists with proper functionality, otherwise default to us.
- // Angular 1.2+ requires jQuery 1.7+ for on()/off() support.
- // Angular 1.3+ technically requires at least jQuery 2.1+ but it may work with older
- // versions. It will not work for sure with jQuery <1.7, though.
- if (jQuery && jQuery.fn.on) {
- jqLite = jQuery;
- extend(jQuery.fn, {
- scope: JQLitePrototype.scope,
- isolateScope: JQLitePrototype.isolateScope,
- controller: JQLitePrototype.controller,
- injector: JQLitePrototype.injector,
- inheritedData: JQLitePrototype.inheritedData
- });
-
- // All nodes removed from the DOM via various jQuery APIs like .remove()
- // are passed through jQuery.cleanData. Monkey-patch this method to fire
- // the $destroy event on all removed nodes.
- originalCleanData = jQuery.cleanData;
- jQuery.cleanData = function(elems) {
- var events;
- for (var i = 0, elem; (elem = elems[i]) != null; i++) {
- events = jQuery._data(elem, "events");
- if (events && events.$destroy) {
- jQuery(elem).triggerHandler('$destroy');
- }
- }
- originalCleanData(elems);
- };
- } else {
- jqLite = JQLite;
- }
-
- angular.element = jqLite;
-
- // Prevent double-proxying.
- bindJQueryFired = true;
-}
-
-/**
- * throw error if the argument is falsy.
- */
-function assertArg(arg, name, reason) {
- if (!arg) {
- throw ngMinErr('areq', "Argument '{0}' is {1}", (name || '?'), (reason || "required"));
- }
- return arg;
-}
-
-function assertArgFn(arg, name, acceptArrayAnnotation) {
- if (acceptArrayAnnotation && isArray(arg)) {
- arg = arg[arg.length - 1];
- }
-
- assertArg(isFunction(arg), name, 'not a function, got ' +
- (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));
- return arg;
-}
-
-/**
- * throw error if the name given is hasOwnProperty
- * @param {String} name the name to test
- * @param {String} context the context in which the name is used, such as module or directive
- */
-function assertNotHasOwnProperty(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', "hasOwnProperty is not a valid {0} name", context);
- }
-}
-
-/**
- * Return the value accessible from the object by path. Any undefined traversals are ignored
- * @param {Object} obj starting object
- * @param {String} path path to traverse
- * @param {boolean} [bindFnToScope=true]
- * @returns {Object} value as accessible by path
- */
-//TODO(misko): this function needs to be removed
-function getter(obj, path, bindFnToScope) {
- if (!path) return obj;
- var keys = path.split('.');
- var key;
- var lastInstance = obj;
- var len = keys.length;
-
- for (var i = 0; i < len; i++) {
- key = keys[i];
- if (obj) {
- obj = (lastInstance = obj)[key];
- }
- }
- if (!bindFnToScope && isFunction(obj)) {
- return bind(lastInstance, obj);
- }
- return obj;
-}
-
-/**
- * Return the DOM siblings between the first and last node in the given array.
- * @param {Array} array like object
- * @returns {Array} the inputted object or a jqLite collection containing the nodes
- */
-function getBlockNodes(nodes) {
- // TODO(perf): update `nodes` instead of creating a new object?
- var node = nodes[0];
- var endNode = nodes[nodes.length - 1];
- var blockNodes;
-
- for (var i = 1; node !== endNode && (node = node.nextSibling); i++) {
- if (blockNodes || nodes[i] !== node) {
- if (!blockNodes) {
- blockNodes = jqLite(slice.call(nodes, 0, i));
- }
- blockNodes.push(node);
- }
- }
-
- return blockNodes || nodes;
-}
-
-
-/**
- * Creates a new object without a prototype. This object is useful for lookup without having to
- * guard against prototypically inherited properties via hasOwnProperty.
- *
- * Related micro-benchmarks:
- * - http://jsperf.com/object-create2
- * - http://jsperf.com/proto-map-lookup/2
- * - http://jsperf.com/for-in-vs-object-keys2
- *
- * @returns {Object}
- */
-function createMap() {
- return Object.create(null);
-}
-
-var NODE_TYPE_ELEMENT = 1;
-var NODE_TYPE_ATTRIBUTE = 2;
-var NODE_TYPE_TEXT = 3;
-var NODE_TYPE_COMMENT = 8;
-var NODE_TYPE_DOCUMENT = 9;
-var NODE_TYPE_DOCUMENT_FRAGMENT = 11;
-
-/**
- * @ngdoc type
- * @name angular.Module
- * @module ng
- * @description
- *
- * Interface for configuring angular {@link angular.module modules}.
- */
-
-function setupModuleLoader(window) {
-
- var $injectorMinErr = minErr('$injector');
- var ngMinErr = minErr('ng');
-
- function ensure(obj, name, factory) {
- return obj[name] || (obj[name] = factory());
- }
-
- var angular = ensure(window, 'angular', Object);
-
- // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap
- angular.$$minErr = angular.$$minErr || minErr;
-
- return ensure(angular, 'module', function() {
- /** @type {Object.<string, angular.Module>} */
- var modules = {};
-
- /**
- * @ngdoc function
- * @name angular.module
- * @module ng
- * @description
- *
- * The `angular.module` is a global place for creating, registering and retrieving Angular
- * modules.
- * All modules (angular core or 3rd party) that should be available to an application must be
- * registered using this mechanism.
- *
- * Passing one argument retrieves an existing {@link angular.Module},
- * whereas passing more than one argument creates a new {@link angular.Module}
- *
- *
- * # Module
- *
- * A module is a collection of services, directives, controllers, filters, and configuration information.
- * `angular.module` is used to configure the {@link auto.$injector $injector}.
- *
- * ```js
- * // Create a new module
- * var myModule = angular.module('myModule', []);
- *
- * // register a new service
- * myModule.value('appName', 'MyCoolApp');
- *
- * // configure existing services inside initialization blocks.
- * myModule.config(['$locationProvider', function($locationProvider) {
- * // Configure existing providers
- * $locationProvider.hashPrefix('!');
- * }]);
- * ```
- *
- * Then you can create an injector and load your modules like this:
- *
- * ```js
- * var injector = angular.injector(['ng', 'myModule'])
- * ```
- *
- * However it's more likely that you'll just use
- * {@link ng.directive:ngApp ngApp} or
- * {@link angular.bootstrap} to simplify this process for you.
- *
- * @param {!string} name The name of the module to create or retrieve.
- * @param {!Array.<string>=} requires If specified then new module is being created. If
- * unspecified then the module is being retrieved for further configuration.
- * @param {Function=} configFn Optional configuration function for the module. Same as
- * {@link angular.Module#config Module#config()}.
- * @returns {module} new module with the {@link angular.Module} api.
- */
- return function module(name, requires, configFn) {
- var assertNotHasOwnProperty = function(name, context) {
- if (name === 'hasOwnProperty') {
- throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);
- }
- };
-
- assertNotHasOwnProperty(name, 'module');
- if (requires && modules.hasOwnProperty(name)) {
- modules[name] = null;
- }
- return ensure(modules, name, function() {
- if (!requires) {
- throw $injectorMinErr('nomod', "Module '{0}' is not available! You either misspelled " +
- "the module name or forgot to load it. If registering a module ensure that you " +
- "specify the dependencies as the second argument.", name);
- }
-
- /** @type {!Array.<Array.<*>>} */
- var invokeQueue = [];
-
- /** @type {!Array.<Function>} */
- var configBlocks = [];
-
- /** @type {!Array.<Function>} */
- var runBlocks = [];
-
- var config = invokeLater('$injector', 'invoke', 'push', configBlocks);
-
- /** @type {angular.Module} */
- var moduleInstance = {
- // Private state
- _invokeQueue: invokeQueue,
- _configBlocks: configBlocks,
- _runBlocks: runBlocks,
-
- /**
- * @ngdoc property
- * @name angular.Module#requires
- * @module ng
- *
- * @description
- * Holds the list of modules which the injector will load before the current module is
- * loaded.
- */
- requires: requires,
-
- /**
- * @ngdoc property
- * @name angular.Module#name
- * @module ng
- *
- * @description
- * Name of the module.
- */
- name: name,
-
-
- /**
- * @ngdoc method
- * @name angular.Module#provider
- * @module ng
- * @param {string} name service name
- * @param {Function} providerType Construction function for creating new instance of the
- * service.
- * @description
- * See {@link auto.$provide#provider $provide.provider()}.
- */
- provider: invokeLaterAndSetModuleName('$provide', 'provider'),
-
- /**
- * @ngdoc method
- * @name angular.Module#factory
- * @module ng
- * @param {string} name service name
- * @param {Function} providerFunction Function for creating new instance of the service.
- * @description
- * See {@link auto.$provide#factory $provide.factory()}.
- */
- factory: invokeLaterAndSetModuleName('$provide', 'factory'),
-
- /**
- * @ngdoc method
- * @name angular.Module#service
- * @module ng
- * @param {string} name service name
- * @param {Function} constructor A constructor function that will be instantiated.
- * @description
- * See {@link auto.$provide#service $provide.service()}.
- */
- service: invokeLaterAndSetModuleName('$provide', 'service'),
-
- /**
- * @ngdoc method
- * @name angular.Module#value
- * @module ng
- * @param {string} name service name
- * @param {*} object Service instance object.
- * @description
- * See {@link auto.$provide#value $provide.value()}.
- */
- value: invokeLater('$provide', 'value'),
-
- /**
- * @ngdoc method
- * @name angular.Module#constant
- * @module ng
- * @param {string} name constant name
- * @param {*} object Constant value.
- * @description
- * Because the constants are fixed, they get applied before other provide methods.
- * See {@link auto.$provide#constant $provide.constant()}.
- */
- constant: invokeLater('$provide', 'constant', 'unshift'),
-
- /**
- * @ngdoc method
- * @name angular.Module#decorator
- * @module ng
- * @param {string} The name of the service to decorate.
- * @param {Function} This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance.
- * @description
- * See {@link auto.$provide#decorator $provide.decorator()}.
- */
- decorator: invokeLaterAndSetModuleName('$provide', 'decorator'),
-
- /**
- * @ngdoc method
- * @name angular.Module#animation
- * @module ng
- * @param {string} name animation name
- * @param {Function} animationFactory Factory function for creating new instance of an
- * animation.
- * @description
- *
- * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.
- *
- *
- * Defines an animation hook that can be later used with
- * {@link $animate $animate} service and directives that use this service.
- *
- * ```js
- * module.animation('.animation-name', function($inject1, $inject2) {
- * return {
- * eventName : function(element, done) {
- * //code to run the animation
- * //once complete, then run done()
- * return function cancellationFunction(element) {
- * //code to cancel the animation
- * }
- * }
- * }
- * })
- * ```
- *
- * See {@link ng.$animateProvider#register $animateProvider.register()} and
- * {@link ngAnimate ngAnimate module} for more information.
- */
- animation: invokeLaterAndSetModuleName('$animateProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#filter
- * @module ng
- * @param {string} name Filter name - this must be a valid angular expression identifier
- * @param {Function} filterFactory Factory function for creating new instance of filter.
- * @description
- * See {@link ng.$filterProvider#register $filterProvider.register()}.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- */
- filter: invokeLaterAndSetModuleName('$filterProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#controller
- * @module ng
- * @param {string|Object} name Controller name, or an object map of controllers where the
- * keys are the names and the values are the constructors.
- * @param {Function} constructor Controller constructor function.
- * @description
- * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
- */
- controller: invokeLaterAndSetModuleName('$controllerProvider', 'register'),
-
- /**
- * @ngdoc method
- * @name angular.Module#directive
- * @module ng
- * @param {string|Object} name Directive name, or an object map of directives where the
- * keys are the names and the values are the factories.
- * @param {Function} directiveFactory Factory function for creating new instance of
- * directives.
- * @description
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- directive: invokeLaterAndSetModuleName('$compileProvider', 'directive'),
-
- /**
- * @ngdoc method
- * @name angular.Module#component
- * @module ng
- * @param {string} name Name of the component in camel-case (i.e. myComp which will match as my-comp)
- * @param {Object} options Component definition object (a simplified
- * {@link ng.$compile#directive-definition-object directive definition object}),
- * has the following properties (all optional):
- *
- * - `controller` – `{(string|function()=}` – Controller constructor function that should be
- * associated with newly created scope or the name of a {@link ng.$compile#-controller-
- * registered controller} if passed as a string. Empty function by default.
- * - `controllerAs` – `{string=}` – An identifier name for a reference to the controller.
- * If present, the controller will be published to scope under the `controllerAs` name.
- * If not present, this will default to be the same as the component name.
- * - `template` – `{string=|function()=}` – html template as a string or a function that
- * returns an html template as a string which should be used as the contents of this component.
- * Empty string by default.
- *
- * If `template` is a function, then it is {@link auto.$injector#invoke injected} with
- * the following locals:
- *
- * - `$element` - Current element
- * - `$attrs` - Current attributes object for the element
- *
- * - `templateUrl` – `{string=|function()=}` – path or function that returns a path to an html
- * template that should be used as the contents of this component.
- *
- * If `templateUrl` is a function, then it is {@link auto.$injector#invoke injected} with
- * the following locals:
- *
- * - `$element` - Current element
- * - `$attrs` - Current attributes object for the element
- * - `bindings` – `{object=}` – Define DOM attribute binding to component properties.
- * Component properties are always bound to the component controller and not to the scope.
- * - `transclude` – `{boolean=}` – Whether {@link $compile#transclusion transclusion} is enabled.
- * Enabled by default.
- * - `isolate` – `{boolean=}` – Whether the new scope is isolated. Isolated by default.
- * - `restrict` - `{string=}` - String of subset of {@link ng.$compile#-restrict- EACM} which
- * restricts the component to specific directive declaration style. If omitted, this defaults to 'E'.
- * - `$canActivate` – `{function()=}` – TBD.
- * - `$routeConfig` – `{object=}` – TBD.
- *
- * @description
- * Register a component definition with the compiler. This is short for registering a specific
- * subset of directives which represents actual UI components in your application. Component
- * definitions are very simple and do not require the complexity behind defining directives.
- * Component definitions usually consist only of the template and the controller backing it.
- * In order to make the definition easier, components enforce best practices like controllerAs
- * and default behaviors like scope isolation, restrict to elements and allow transclusion.
- *
- * Here are a few examples of how you would usually define components:
- *
- * ```js
- * var myMod = angular.module(...);
- * myMod.component('myComp', {
- * template: '<div>My name is {{myComp.name}}</div>',
- * controller: function() {
- * this.name = 'shahar';
- * }
- * });
- *
- * myMod.component('myComp', {
- * template: '<div>My name is {{myComp.name}}</div>',
- * bindings: {name: '@'}
- * });
- *
- * myMod.component('myComp', {
- * templateUrl: 'views/my-comp.html',
- * controller: 'MyCtrl as ctrl',
- * bindings: {name: '@'}
- * });
- *
- * ```
- *
- * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
- */
- component: function(name, options) {
- function factory($injector) {
- function makeInjectable(fn) {
- if (angular.isFunction(fn)) {
- return function(tElement, tAttrs) {
- return $injector.invoke(fn, this, {$element: tElement, $attrs: tAttrs});
- };
- } else {
- return fn;
- }
- }
-
- var template = (!options.template && !options.templateUrl ? '' : options.template);
- return {
- controller: options.controller || function() {},
- controllerAs: identifierForController(options.controller) || options.controllerAs || name,
- template: makeInjectable(template),
- templateUrl: makeInjectable(options.templateUrl),
- transclude: options.transclude === undefined ? true : options.transclude,
- scope: options.isolate === false ? true : {},
- bindToController: options.bindings || {},
- restrict: options.restrict || 'E'
- };
- }
-
- if (options.$canActivate) {
- factory.$canActivate = options.$canActivate;
- }
- if (options.$routeConfig) {
- factory.$routeConfig = options.$routeConfig;
- }
- factory.$inject = ['$injector'];
-
- return moduleInstance.directive(name, factory);
- },
-
- /**
- * @ngdoc method
- * @name angular.Module#config
- * @module ng
- * @param {Function} configFn Execute this function on module load. Useful for service
- * configuration.
- * @description
- * Use this method to register work which needs to be performed on module loading.
- * For more about how to configure services, see
- * {@link providers#provider-recipe Provider Recipe}.
- */
- config: config,
-
- /**
- * @ngdoc method
- * @name angular.Module#run
- * @module ng
- * @param {Function} initializationFn Execute this function after injector creation.
- * Useful for application initialization.
- * @description
- * Use this method to register work which should be performed when the injector is done
- * loading all modules.
- */
- run: function(block) {
- runBlocks.push(block);
- return this;
- }
- };
-
- if (configFn) {
- config(configFn);
- }
-
- return moduleInstance;
-
- /**
- * @param {string} provider
- * @param {string} method
- * @param {String=} insertMethod
- * @returns {angular.Module}
- */
- function invokeLater(provider, method, insertMethod, queue) {
- if (!queue) queue = invokeQueue;
- return function() {
- queue[insertMethod || 'push']([provider, method, arguments]);
- return moduleInstance;
- };
- }
-
- /**
- * @param {string} provider
- * @param {string} method
- * @returns {angular.Module}
- */
- function invokeLaterAndSetModuleName(provider, method) {
- return function(recipeName, factoryFunction) {
- if (factoryFunction && isFunction(factoryFunction)) factoryFunction.$$moduleName = name;
- invokeQueue.push([provider, method, arguments]);
- return moduleInstance;
- };
- }
- });
- };
- });
-
-}
-
-/* global: toDebugString: true */
-
-function serializeObject(obj) {
- var seen = [];
-
- return JSON.stringify(obj, function(key, val) {
- val = toJsonReplacer(key, val);
- if (isObject(val)) {
-
- if (seen.indexOf(val) >= 0) return '...';
-
- seen.push(val);
- }
- return val;
- });
-}
-
-function toDebugString(obj) {
- if (typeof obj === 'function') {
- return obj.toString().replace(/ \{[\s\S]*$/, '');
- } else if (isUndefined(obj)) {
- return 'undefined';
- } else if (typeof obj !== 'string') {
- return serializeObject(obj);
- }
- return obj;
-}
-
-/* global angularModule: true,
- version: true,
-
- $CompileProvider,
-
- htmlAnchorDirective,
- inputDirective,
- inputDirective,
- formDirective,
- scriptDirective,
- selectDirective,
- styleDirective,
- optionDirective,
- ngBindDirective,
- ngBindHtmlDirective,
- ngBindTemplateDirective,
- ngClassDirective,
- ngClassEvenDirective,
- ngClassOddDirective,
- ngCloakDirective,
- ngControllerDirective,
- ngFormDirective,
- ngHideDirective,
- ngIfDirective,
- ngIncludeDirective,
- ngIncludeFillContentDirective,
- ngInitDirective,
- ngNonBindableDirective,
- ngPluralizeDirective,
- ngRepeatDirective,
- ngShowDirective,
- ngStyleDirective,
- ngSwitchDirective,
- ngSwitchWhenDirective,
- ngSwitchDefaultDirective,
- ngOptionsDirective,
- ngTranscludeDirective,
- ngModelDirective,
- ngListDirective,
- ngChangeDirective,
- patternDirective,
- patternDirective,
- requiredDirective,
- requiredDirective,
- minlengthDirective,
- minlengthDirective,
- maxlengthDirective,
- maxlengthDirective,
- ngValueDirective,
- ngModelOptionsDirective,
- ngAttributeAliasDirectives,
- ngEventDirectives,
-
- $AnchorScrollProvider,
- $AnimateProvider,
- $CoreAnimateCssProvider,
- $$CoreAnimateQueueProvider,
- $$CoreAnimateRunnerProvider,
- $BrowserProvider,
- $CacheFactoryProvider,
- $ControllerProvider,
- $DateProvider,
- $DocumentProvider,
- $ExceptionHandlerProvider,
- $FilterProvider,
- $$ForceReflowProvider,
- $InterpolateProvider,
- $IntervalProvider,
- $$HashMapProvider,
- $HttpProvider,
- $HttpParamSerializerProvider,
- $HttpParamSerializerJQLikeProvider,
- $HttpBackendProvider,
- $xhrFactoryProvider,
- $LocationProvider,
- $LogProvider,
- $ParseProvider,
- $RootScopeProvider,
- $QProvider,
- $$QProvider,
- $$SanitizeUriProvider,
- $SceProvider,
- $SceDelegateProvider,
- $SnifferProvider,
- $TemplateCacheProvider,
- $TemplateRequestProvider,
- $$TestabilityProvider,
- $TimeoutProvider,
- $$RAFProvider,
- $WindowProvider,
- $$jqLiteProvider,
- $$CookieReaderProvider
-*/
-
-
-/**
- * @ngdoc object
- * @name angular.version
- * @module ng
- * @description
- * An object that contains information about the current AngularJS version.
- *
- * This object has the following properties:
- *
- * - `full` – `{string}` – Full version string, such as "0.9.18".
- * - `major` – `{number}` – Major version number, such as "0".
- * - `minor` – `{number}` – Minor version number, such as "9".
- * - `dot` – `{number}` – Dot version number, such as "18".
- * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat".
- */
-var version = {
- full: '1.5.0-beta.2', // all of these placeholder strings will be replaced by grunt's
- major: 1, // package task
- minor: 5,
- dot: 0,
- codeName: 'effective-delegation'
-};
-
-
-function publishExternalAPI(angular) {
- extend(angular, {
- 'bootstrap': bootstrap,
- 'copy': copy,
- 'extend': extend,
- 'merge': merge,
- 'equals': equals,
- 'element': jqLite,
- 'forEach': forEach,
- 'injector': createInjector,
- 'noop': noop,
- 'bind': bind,
- 'toJson': toJson,
- 'fromJson': fromJson,
- 'identity': identity,
- 'isUndefined': isUndefined,
- 'isDefined': isDefined,
- 'isString': isString,
- 'isFunction': isFunction,
- 'isObject': isObject,
- 'isNumber': isNumber,
- 'isElement': isElement,
- 'isArray': isArray,
- 'version': version,
- 'isDate': isDate,
- 'lowercase': lowercase,
- 'uppercase': uppercase,
- 'callbacks': {counter: 0},
- 'getTestability': getTestability,
- '$$minErr': minErr,
- '$$csp': csp,
- 'reloadWithDebugInfo': reloadWithDebugInfo
- });
-
- angularModule = setupModuleLoader(window);
-
- angularModule('ng', ['ngLocale'], ['$provide',
- function ngModule($provide) {
- // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.
- $provide.provider({
- $$sanitizeUri: $$SanitizeUriProvider
- });
- $provide.provider('$compile', $CompileProvider).
- directive({
- a: htmlAnchorDirective,
- input: inputDirective,
- textarea: inputDirective,
- form: formDirective,
- script: scriptDirective,
- select: selectDirective,
- style: styleDirective,
- option: optionDirective,
- ngBind: ngBindDirective,
- ngBindHtml: ngBindHtmlDirective,
- ngBindTemplate: ngBindTemplateDirective,
- ngClass: ngClassDirective,
- ngClassEven: ngClassEvenDirective,
- ngClassOdd: ngClassOddDirective,
- ngCloak: ngCloakDirective,
- ngController: ngControllerDirective,
- ngForm: ngFormDirective,
- ngHide: ngHideDirective,
- ngIf: ngIfDirective,
- ngInclude: ngIncludeDirective,
- ngInit: ngInitDirective,
- ngNonBindable: ngNonBindableDirective,
- ngPluralize: ngPluralizeDirective,
- ngRepeat: ngRepeatDirective,
- ngShow: ngShowDirective,
- ngStyle: ngStyleDirective,
- ngSwitch: ngSwitchDirective,
- ngSwitchWhen: ngSwitchWhenDirective,
- ngSwitchDefault: ngSwitchDefaultDirective,
- ngOptions: ngOptionsDirective,
- ngTransclude: ngTranscludeDirective,
- ngModel: ngModelDirective,
- ngList: ngListDirective,
- ngChange: ngChangeDirective,
- pattern: patternDirective,
- ngPattern: patternDirective,
- required: requiredDirective,
- ngRequired: requiredDirective,
- minlength: minlengthDirective,
- ngMinlength: minlengthDirective,
- maxlength: maxlengthDirective,
- ngMaxlength: maxlengthDirective,
- ngValue: ngValueDirective,
- ngModelOptions: ngModelOptionsDirective
- }).
- directive({
- ngInclude: ngIncludeFillContentDirective
- }).
- directive(ngAttributeAliasDirectives).
- directive(ngEventDirectives);
- $provide.provider({
- $anchorScroll: $AnchorScrollProvider,
- $animate: $AnimateProvider,
- $animateCss: $CoreAnimateCssProvider,
- $$animateQueue: $$CoreAnimateQueueProvider,
- $$AnimateRunner: $$CoreAnimateRunnerProvider,
- $browser: $BrowserProvider,
- $cacheFactory: $CacheFactoryProvider,
- $controller: $ControllerProvider,
- $document: $DocumentProvider,
- $exceptionHandler: $ExceptionHandlerProvider,
- $filter: $FilterProvider,
- $$forceReflow: $$ForceReflowProvider,
- $interpolate: $InterpolateProvider,
- $interval: $IntervalProvider,
- $http: $HttpProvider,
- $httpParamSerializer: $HttpParamSerializerProvider,
- $httpParamSerializerJQLike: $HttpParamSerializerJQLikeProvider,
- $httpBackend: $HttpBackendProvider,
- $xhrFactory: $xhrFactoryProvider,
- $location: $LocationProvider,
- $log: $LogProvider,
- $parse: $ParseProvider,
- $rootScope: $RootScopeProvider,
- $q: $QProvider,
- $$q: $$QProvider,
- $sce: $SceProvider,
- $sceDelegate: $SceDelegateProvider,
- $sniffer: $SnifferProvider,
- $templateCache: $TemplateCacheProvider,
- $templateRequest: $TemplateRequestProvider,
- $$testability: $$TestabilityProvider,
- $timeout: $TimeoutProvider,
- $window: $WindowProvider,
- $$rAF: $$RAFProvider,
- $$jqLite: $$jqLiteProvider,
- $$HashMap: $$HashMapProvider,
- $$cookieReader: $$CookieReaderProvider
- });
- }
- ]);
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* global JQLitePrototype: true,
- addEventListenerFn: true,
- removeEventListenerFn: true,
- BOOLEAN_ATTR: true,
- ALIASED_ATTR: true,
-*/
-
-//////////////////////////////////
-//JQLite
-//////////////////////////////////
-
-/**
- * @ngdoc function
- * @name angular.element
- * @module ng
- * @kind function
- *
- * @description
- * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.
- *
- * If jQuery is available, `angular.element` is an alias for the
- * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
- * delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
- *
- * <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
- * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
- * commonly needed functionality with the goal of having a very small footprint.</div>
- *
- * To use `jQuery`, simply ensure it is loaded before the `angular.js` file.
- *
- * <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
- * jqLite; they are never raw DOM references.</div>
- *
- * ## Angular's jqLite
- * jqLite provides only the following jQuery methods:
- *
- * - [`addClass()`](http://api.jquery.com/addClass/)
- * - [`after()`](http://api.jquery.com/after/)
- * - [`append()`](http://api.jquery.com/append/)
- * - [`attr()`](http://api.jquery.com/attr/) - Does not support functions as parameters
- * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData
- * - [`children()`](http://api.jquery.com/children/) - Does not support selectors
- * - [`clone()`](http://api.jquery.com/clone/)
- * - [`contents()`](http://api.jquery.com/contents/)
- * - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. As a setter, does not convert numbers to strings or append 'px'.
- * - [`data()`](http://api.jquery.com/data/)
- * - [`detach()`](http://api.jquery.com/detach/)
- * - [`empty()`](http://api.jquery.com/empty/)
- * - [`eq()`](http://api.jquery.com/eq/)
- * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name
- * - [`hasClass()`](http://api.jquery.com/hasClass/)
- * - [`html()`](http://api.jquery.com/html/)
- * - [`next()`](http://api.jquery.com/next/) - Does not support selectors
- * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData
- * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces, selectors or event object as parameter
- * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors
- * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors
- * - [`prepend()`](http://api.jquery.com/prepend/)
- * - [`prop()`](http://api.jquery.com/prop/)
- * - [`ready()`](http://api.jquery.com/ready/)
- * - [`remove()`](http://api.jquery.com/remove/)
- * - [`removeAttr()`](http://api.jquery.com/removeAttr/)
- * - [`removeClass()`](http://api.jquery.com/removeClass/)
- * - [`removeData()`](http://api.jquery.com/removeData/)
- * - [`replaceWith()`](http://api.jquery.com/replaceWith/)
- * - [`text()`](http://api.jquery.com/text/)
- * - [`toggleClass()`](http://api.jquery.com/toggleClass/)
- * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.
- * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces or event object as parameter
- * - [`val()`](http://api.jquery.com/val/)
- * - [`wrap()`](http://api.jquery.com/wrap/)
- *
- * ## jQuery/jqLite Extras
- * Angular also provides the following additional methods and events to both jQuery and jqLite:
- *
- * ### Events
- * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event
- * on all DOM nodes being removed. This can be used to clean up any 3rd party bindings to the DOM
- * element before it is removed.
- *
- * ### Methods
- * - `controller(name)` - retrieves the controller of the current element or its parent. By default
- * retrieves controller associated with the `ngController` directive. If `name` is provided as
- * camelCase directive name, then the controller for this directive will be retrieved (e.g.
- * `'ngModel'`).
- * - `injector()` - retrieves the injector of the current element or its parent.
- * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current
- * element or its parent. Requires {@link guide/production#disabling-debug-data Debug Data} to
- * be enabled.
- * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the
- * current element. This getter should be used only on elements that contain a directive which starts a new isolate
- * scope. Calling `scope()` on this element always returns the original non-isolate scope.
- * Requires {@link guide/production#disabling-debug-data Debug Data} to be enabled.
- * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top
- * parent element is reached.
- *
- * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.
- * @returns {Object} jQuery object.
- */
-
-JQLite.expando = 'ng339';
-
-var jqCache = JQLite.cache = {},
- jqId = 1,
- addEventListenerFn = function(element, type, fn) {
- element.addEventListener(type, fn, false);
- },
- removeEventListenerFn = function(element, type, fn) {
- element.removeEventListener(type, fn, false);
- };
-
-/*
- * !!! This is an undocumented "private" function !!!
- */
-JQLite._data = function(node) {
- //jQuery always returns an object on cache miss
- return this.cache[node[this.expando]] || {};
-};
-
-function jqNextId() { return ++jqId; }
-
-
-var SPECIAL_CHARS_REGEXP = /([\:\-\_]+(.))/g;
-var MOZ_HACK_REGEXP = /^moz([A-Z])/;
-var MOUSE_EVENT_MAP= { mouseleave: "mouseout", mouseenter: "mouseover"};
-var jqLiteMinErr = minErr('jqLite');
-
-/**
- * Converts snake_case to camelCase.
- * Also there is special case for Moz prefix starting with upper case letter.
- * @param name Name to normalize
- */
-function camelCase(name) {
- return name.
- replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {
- return offset ? letter.toUpperCase() : letter;
- }).
- replace(MOZ_HACK_REGEXP, 'Moz$1');
-}
-
-var SINGLE_TAG_REGEXP = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/;
-var HTML_REGEXP = /<|&#?\w+;/;
-var TAG_NAME_REGEXP = /<([\w:-]+)/;
-var XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi;
-
-var wrapMap = {
- 'option': [1, '<select multiple="multiple">', '</select>'],
-
- 'thead': [1, '<table>', '</table>'],
- 'col': [2, '<table><colgroup>', '</colgroup></table>'],
- 'tr': [2, '<table><tbody>', '</tbody></table>'],
- 'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],
- '_default': [0, "", ""]
-};
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function jqLiteIsTextNode(html) {
- return !HTML_REGEXP.test(html);
-}
-
-function jqLiteAcceptsData(node) {
- // The window object can accept data but has no nodeType
- // Otherwise we are only interested in elements (1) and documents (9)
- var nodeType = node.nodeType;
- return nodeType === NODE_TYPE_ELEMENT || !nodeType || nodeType === NODE_TYPE_DOCUMENT;
-}
-
-function jqLiteHasData(node) {
- for (var key in jqCache[node.ng339]) {
- return true;
- }
- return false;
-}
-
-function jqLiteCleanData(nodes) {
- for (var i = 0, ii = nodes.length; i < ii; i++) {
- jqLiteRemoveData(nodes[i]);
- }
-}
-
-function jqLiteBuildFragment(html, context) {
- var tmp, tag, wrap,
- fragment = context.createDocumentFragment(),
- nodes = [], i;
-
- if (jqLiteIsTextNode(html)) {
- // Convert non-html into a text node
- nodes.push(context.createTextNode(html));
- } else {
- // Convert html into DOM nodes
- tmp = tmp || fragment.appendChild(context.createElement("div"));
- tag = (TAG_NAME_REGEXP.exec(html) || ["", ""])[1].toLowerCase();
- wrap = wrapMap[tag] || wrapMap._default;
- tmp.innerHTML = wrap[1] + html.replace(XHTML_TAG_REGEXP, "<$1></$2>") + wrap[2];
-
- // Descend through wrappers to the right content
- i = wrap[0];
- while (i--) {
- tmp = tmp.lastChild;
- }
-
- nodes = concat(nodes, tmp.childNodes);
-
- tmp = fragment.firstChild;
- tmp.textContent = "";
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
- fragment.innerHTML = ""; // Clear inner HTML
- forEach(nodes, function(node) {
- fragment.appendChild(node);
- });
-
- return fragment;
-}
-
-function jqLiteParseHTML(html, context) {
- context = context || document;
- var parsed;
-
- if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {
- return [context.createElement(parsed[1])];
- }
-
- if ((parsed = jqLiteBuildFragment(html, context))) {
- return parsed.childNodes;
- }
-
- return [];
-}
-
-
-// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
-var jqLiteContains = Node.prototype.contains || function(arg) {
- // jshint bitwise: false
- return !!(this.compareDocumentPosition(arg) & 16);
- // jshint bitwise: true
-};
-
-/////////////////////////////////////////////
-function JQLite(element) {
- if (element instanceof JQLite) {
- return element;
- }
-
- var argIsString;
-
- if (isString(element)) {
- element = trim(element);
- argIsString = true;
- }
- if (!(this instanceof JQLite)) {
- if (argIsString && element.charAt(0) != '<') {
- throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');
- }
- return new JQLite(element);
- }
-
- if (argIsString) {
- jqLiteAddNodes(this, jqLiteParseHTML(element));
- } else {
- jqLiteAddNodes(this, element);
- }
-}
-
-function jqLiteClone(element) {
- return element.cloneNode(true);
-}
-
-function jqLiteDealoc(element, onlyDescendants) {
- if (!onlyDescendants) jqLiteRemoveData(element);
-
- if (element.querySelectorAll) {
- var descendants = element.querySelectorAll('*');
- for (var i = 0, l = descendants.length; i < l; i++) {
- jqLiteRemoveData(descendants[i]);
- }
- }
-}
-
-function jqLiteOff(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');
-
- var expandoStore = jqLiteExpandoStore(element);
- var events = expandoStore && expandoStore.events;
- var handle = expandoStore && expandoStore.handle;
-
- if (!handle) return; //no listeners registered
-
- if (!type) {
- for (type in events) {
- if (type !== '$destroy') {
- removeEventListenerFn(element, type, handle);
- }
- delete events[type];
- }
- } else {
-
- var removeHandler = function(type) {
- var listenerFns = events[type];
- if (isDefined(fn)) {
- arrayRemove(listenerFns || [], fn);
- }
- if (!(isDefined(fn) && listenerFns && listenerFns.length > 0)) {
- removeEventListenerFn(element, type, handle);
- delete events[type];
- }
- };
-
- forEach(type.split(' '), function(type) {
- removeHandler(type);
- if (MOUSE_EVENT_MAP[type]) {
- removeHandler(MOUSE_EVENT_MAP[type]);
- }
- });
- }
-}
-
-function jqLiteRemoveData(element, name) {
- var expandoId = element.ng339;
- var expandoStore = expandoId && jqCache[expandoId];
-
- if (expandoStore) {
- if (name) {
- delete expandoStore.data[name];
- return;
- }
-
- if (expandoStore.handle) {
- if (expandoStore.events.$destroy) {
- expandoStore.handle({}, '$destroy');
- }
- jqLiteOff(element);
- }
- delete jqCache[expandoId];
- element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it
- }
-}
-
-
-function jqLiteExpandoStore(element, createIfNecessary) {
- var expandoId = element.ng339,
- expandoStore = expandoId && jqCache[expandoId];
-
- if (createIfNecessary && !expandoStore) {
- element.ng339 = expandoId = jqNextId();
- expandoStore = jqCache[expandoId] = {events: {}, data: {}, handle: undefined};
- }
-
- return expandoStore;
-}
-
-
-function jqLiteData(element, key, value) {
- if (jqLiteAcceptsData(element)) {
-
- var isSimpleSetter = isDefined(value);
- var isSimpleGetter = !isSimpleSetter && key && !isObject(key);
- var massGetter = !key;
- var expandoStore = jqLiteExpandoStore(element, !isSimpleGetter);
- var data = expandoStore && expandoStore.data;
-
- if (isSimpleSetter) { // data('key', value)
- data[key] = value;
- } else {
- if (massGetter) { // data()
- return data;
- } else {
- if (isSimpleGetter) { // data('key')
- // don't force creation of expandoStore if it doesn't exist yet
- return data && data[key];
- } else { // mass-setter: data({key1: val1, key2: val2})
- extend(data, key);
- }
- }
- }
- }
-}
-
-function jqLiteHasClass(element, selector) {
- if (!element.getAttribute) return false;
- return ((" " + (element.getAttribute('class') || '') + " ").replace(/[\n\t]/g, " ").
- indexOf(" " + selector + " ") > -1);
-}
-
-function jqLiteRemoveClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- forEach(cssClasses.split(' '), function(cssClass) {
- element.setAttribute('class', trim(
- (" " + (element.getAttribute('class') || '') + " ")
- .replace(/[\n\t]/g, " ")
- .replace(" " + trim(cssClass) + " ", " "))
- );
- });
- }
-}
-
-function jqLiteAddClass(element, cssClasses) {
- if (cssClasses && element.setAttribute) {
- var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')
- .replace(/[\n\t]/g, " ");
-
- forEach(cssClasses.split(' '), function(cssClass) {
- cssClass = trim(cssClass);
- if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {
- existingClasses += cssClass + ' ';
- }
- });
-
- element.setAttribute('class', trim(existingClasses));
- }
-}
-
-
-function jqLiteAddNodes(root, elements) {
- // THIS CODE IS VERY HOT. Don't make changes without benchmarking.
-
- if (elements) {
-
- // if a Node (the most common case)
- if (elements.nodeType) {
- root[root.length++] = elements;
- } else {
- var length = elements.length;
-
- // if an Array or NodeList and not a Window
- if (typeof length === 'number' && elements.window !== elements) {
- if (length) {
- for (var i = 0; i < length; i++) {
- root[root.length++] = elements[i];
- }
- }
- } else {
- root[root.length++] = elements;
- }
- }
- }
-}
-
-
-function jqLiteController(element, name) {
- return jqLiteInheritedData(element, '$' + (name || 'ngController') + 'Controller');
-}
-
-function jqLiteInheritedData(element, name, value) {
- // if element is the document object work with the html element instead
- // this makes $(document).scope() possible
- if (element.nodeType == NODE_TYPE_DOCUMENT) {
- element = element.documentElement;
- }
- var names = isArray(name) ? name : [name];
-
- while (element) {
- for (var i = 0, ii = names.length; i < ii; i++) {
- if (isDefined(value = jqLite.data(element, names[i]))) return value;
- }
-
- // If dealing with a document fragment node with a host element, and no parent, use the host
- // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM
- // to lookup parent controllers.
- element = element.parentNode || (element.nodeType === NODE_TYPE_DOCUMENT_FRAGMENT && element.host);
- }
-}
-
-function jqLiteEmpty(element) {
- jqLiteDealoc(element, true);
- while (element.firstChild) {
- element.removeChild(element.firstChild);
- }
-}
-
-function jqLiteRemove(element, keepData) {
- if (!keepData) jqLiteDealoc(element);
- var parent = element.parentNode;
- if (parent) parent.removeChild(element);
-}
-
-
-function jqLiteDocumentLoaded(action, win) {
- win = win || window;
- if (win.document.readyState === 'complete') {
- // Force the action to be run async for consistent behaviour
- // from the action's point of view
- // i.e. it will definitely not be in a $apply
- win.setTimeout(action);
- } else {
- // No need to unbind this handler as load is only ever called once
- jqLite(win).on('load', action);
- }
-}
-
-//////////////////////////////////////////
-// Functions which are declared directly.
-//////////////////////////////////////////
-var JQLitePrototype = JQLite.prototype = {
- ready: function(fn) {
- var fired = false;
-
- function trigger() {
- if (fired) return;
- fired = true;
- fn();
- }
-
- // check if document is already loaded
- if (document.readyState === 'complete') {
- setTimeout(trigger);
- } else {
- this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9
- // we can not use jqLite since we are not done loading and jQuery could be loaded later.
- // jshint -W064
- JQLite(window).on('load', trigger); // fallback to window.onload for others
- // jshint +W064
- }
- },
- toString: function() {
- var value = [];
- forEach(this, function(e) { value.push('' + e);});
- return '[' + value.join(', ') + ']';
- },
-
- eq: function(index) {
- return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);
- },
-
- length: 0,
- push: push,
- sort: [].sort,
- splice: [].splice
-};
-
-//////////////////////////////////////////
-// Functions iterating getter/setters.
-// these functions return self on setter and
-// value on get.
-//////////////////////////////////////////
-var BOOLEAN_ATTR = {};
-forEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {
- BOOLEAN_ATTR[lowercase(value)] = value;
-});
-var BOOLEAN_ELEMENTS = {};
-forEach('input,select,option,textarea,button,form,details'.split(','), function(value) {
- BOOLEAN_ELEMENTS[value] = true;
-});
-var ALIASED_ATTR = {
- 'ngMinlength': 'minlength',
- 'ngMaxlength': 'maxlength',
- 'ngMin': 'min',
- 'ngMax': 'max',
- 'ngPattern': 'pattern'
-};
-
-function getBooleanAttrName(element, name) {
- // check dom last since we will most likely fail on name
- var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];
-
- // booleanAttr is here twice to minimize DOM access
- return booleanAttr && BOOLEAN_ELEMENTS[nodeName_(element)] && booleanAttr;
-}
-
-function getAliasedAttrName(name) {
- return ALIASED_ATTR[name];
-}
-
-forEach({
- data: jqLiteData,
- removeData: jqLiteRemoveData,
- hasData: jqLiteHasData,
- cleanData: jqLiteCleanData
-}, function(fn, name) {
- JQLite[name] = fn;
-});
-
-forEach({
- data: jqLiteData,
- inheritedData: jqLiteInheritedData,
-
- scope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);
- },
-
- isolateScope: function(element) {
- // Can't use jqLiteData here directly so we stay compatible with jQuery!
- return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');
- },
-
- controller: jqLiteController,
-
- injector: function(element) {
- return jqLiteInheritedData(element, '$injector');
- },
-
- removeAttr: function(element, name) {
- element.removeAttribute(name);
- },
-
- hasClass: jqLiteHasClass,
-
- css: function(element, name, value) {
- name = camelCase(name);
-
- if (isDefined(value)) {
- element.style[name] = value;
- } else {
- return element.style[name];
- }
- },
-
- attr: function(element, name, value) {
- var nodeType = element.nodeType;
- if (nodeType === NODE_TYPE_TEXT || nodeType === NODE_TYPE_ATTRIBUTE || nodeType === NODE_TYPE_COMMENT) {
- return;
- }
- var lowercasedName = lowercase(name);
- if (BOOLEAN_ATTR[lowercasedName]) {
- if (isDefined(value)) {
- if (!!value) {
- element[name] = true;
- element.setAttribute(name, lowercasedName);
- } else {
- element[name] = false;
- element.removeAttribute(lowercasedName);
- }
- } else {
- return (element[name] ||
- (element.attributes.getNamedItem(name) || noop).specified)
- ? lowercasedName
- : undefined;
- }
- } else if (isDefined(value)) {
- element.setAttribute(name, value);
- } else if (element.getAttribute) {
- // the extra argument "2" is to get the right thing for a.href in IE, see jQuery code
- // some elements (e.g. Document) don't have get attribute, so return undefined
- var ret = element.getAttribute(name, 2);
- // normalize non-existing attributes to undefined (as jQuery)
- return ret === null ? undefined : ret;
- }
- },
-
- prop: function(element, name, value) {
- if (isDefined(value)) {
- element[name] = value;
- } else {
- return element[name];
- }
- },
-
- text: (function() {
- getText.$dv = '';
- return getText;
-
- function getText(element, value) {
- if (isUndefined(value)) {
- var nodeType = element.nodeType;
- return (nodeType === NODE_TYPE_ELEMENT || nodeType === NODE_TYPE_TEXT) ? element.textContent : '';
- }
- element.textContent = value;
- }
- })(),
-
- val: function(element, value) {
- if (isUndefined(value)) {
- if (element.multiple && nodeName_(element) === 'select') {
- var result = [];
- forEach(element.options, function(option) {
- if (option.selected) {
- result.push(option.value || option.text);
- }
- });
- return result.length === 0 ? null : result;
- }
- return element.value;
- }
- element.value = value;
- },
-
- html: function(element, value) {
- if (isUndefined(value)) {
- return element.innerHTML;
- }
- jqLiteDealoc(element, true);
- element.innerHTML = value;
- },
-
- empty: jqLiteEmpty
-}, function(fn, name) {
- /**
- * Properties: writes return selection, reads return first value
- */
- JQLite.prototype[name] = function(arg1, arg2) {
- var i, key;
- var nodeCount = this.length;
-
- // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it
- // in a way that survives minification.
- // jqLiteEmpty takes no arguments but is a setter.
- if (fn !== jqLiteEmpty &&
- (isUndefined((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2))) {
- if (isObject(arg1)) {
-
- // we are a write, but the object properties are the key/values
- for (i = 0; i < nodeCount; i++) {
- if (fn === jqLiteData) {
- // data() takes the whole object in jQuery
- fn(this[i], arg1);
- } else {
- for (key in arg1) {
- fn(this[i], key, arg1[key]);
- }
- }
- }
- // return self for chaining
- return this;
- } else {
- // we are a read, so read the first child.
- // TODO: do we still need this?
- var value = fn.$dv;
- // Only if we have $dv do we iterate over all, otherwise it is just the first element.
- var jj = (isUndefined(value)) ? Math.min(nodeCount, 1) : nodeCount;
- for (var j = 0; j < jj; j++) {
- var nodeValue = fn(this[j], arg1, arg2);
- value = value ? value + nodeValue : nodeValue;
- }
- return value;
- }
- } else {
- // we are a write, so apply to all children
- for (i = 0; i < nodeCount; i++) {
- fn(this[i], arg1, arg2);
- }
- // return self for chaining
- return this;
- }
- };
-});
-
-function createEventHandler(element, events) {
- var eventHandler = function(event, type) {
- // jQuery specific api
- event.isDefaultPrevented = function() {
- return event.defaultPrevented;
- };
-
- var eventFns = events[type || event.type];
- var eventFnsLength = eventFns ? eventFns.length : 0;
-
- if (!eventFnsLength) return;
-
- if (isUndefined(event.immediatePropagationStopped)) {
- var originalStopImmediatePropagation = event.stopImmediatePropagation;
- event.stopImmediatePropagation = function() {
- event.immediatePropagationStopped = true;
-
- if (event.stopPropagation) {
- event.stopPropagation();
- }
-
- if (originalStopImmediatePropagation) {
- originalStopImmediatePropagation.call(event);
- }
- };
- }
-
- event.isImmediatePropagationStopped = function() {
- return event.immediatePropagationStopped === true;
- };
-
- // Some events have special handlers that wrap the real handler
- var handlerWrapper = eventFns.specialHandlerWrapper || defaultHandlerWrapper;
-
- // Copy event handlers in case event handlers array is modified during execution.
- if ((eventFnsLength > 1)) {
- eventFns = shallowCopy(eventFns);
- }
-
- for (var i = 0; i < eventFnsLength; i++) {
- if (!event.isImmediatePropagationStopped()) {
- handlerWrapper(element, event, eventFns[i]);
- }
- }
- };
-
- // TODO: this is a hack for angularMocks/clearDataCache that makes it possible to deregister all
- // events on `element`
- eventHandler.elem = element;
- return eventHandler;
-}
-
-function defaultHandlerWrapper(element, event, handler) {
- handler.call(element, event);
-}
-
-function specialMouseHandlerWrapper(target, event, handler) {
- // Refer to jQuery's implementation of mouseenter & mouseleave
- // Read about mouseenter and mouseleave:
- // http://www.quirksmode.org/js/events_mouse.html#link8
- var related = event.relatedTarget;
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if (!related || (related !== target && !jqLiteContains.call(target, related))) {
- handler.call(target, event);
- }
-}
-
-//////////////////////////////////////////
-// Functions iterating traversal.
-// These functions chain results into a single
-// selector.
-//////////////////////////////////////////
-forEach({
- removeData: jqLiteRemoveData,
-
- on: function jqLiteOn(element, type, fn, unsupported) {
- if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');
-
- // Do not add event handlers to non-elements because they will not be cleaned up.
- if (!jqLiteAcceptsData(element)) {
- return;
- }
-
- var expandoStore = jqLiteExpandoStore(element, true);
- var events = expandoStore.events;
- var handle = expandoStore.handle;
-
- if (!handle) {
- handle = expandoStore.handle = createEventHandler(element, events);
- }
-
- // http://jsperf.com/string-indexof-vs-split
- var types = type.indexOf(' ') >= 0 ? type.split(' ') : [type];
- var i = types.length;
-
- var addHandler = function(type, specialHandlerWrapper, noEventListener) {
- var eventFns = events[type];
-
- if (!eventFns) {
- eventFns = events[type] = [];
- eventFns.specialHandlerWrapper = specialHandlerWrapper;
- if (type !== '$destroy' && !noEventListener) {
- addEventListenerFn(element, type, handle);
- }
- }
-
- eventFns.push(fn);
- };
-
- while (i--) {
- type = types[i];
- if (MOUSE_EVENT_MAP[type]) {
- addHandler(MOUSE_EVENT_MAP[type], specialMouseHandlerWrapper);
- addHandler(type, undefined, true);
- } else {
- addHandler(type);
- }
- }
- },
-
- off: jqLiteOff,
-
- one: function(element, type, fn) {
- element = jqLite(element);
-
- //add the listener twice so that when it is called
- //you can remove the original function and still be
- //able to call element.off(ev, fn) normally
- element.on(type, function onFn() {
- element.off(type, fn);
- element.off(type, onFn);
- });
- element.on(type, fn);
- },
-
- replaceWith: function(element, replaceNode) {
- var index, parent = element.parentNode;
- jqLiteDealoc(element);
- forEach(new JQLite(replaceNode), function(node) {
- if (index) {
- parent.insertBefore(node, index.nextSibling);
- } else {
- parent.replaceChild(node, element);
- }
- index = node;
- });
- },
-
- children: function(element) {
- var children = [];
- forEach(element.childNodes, function(element) {
- if (element.nodeType === NODE_TYPE_ELEMENT) {
- children.push(element);
- }
- });
- return children;
- },
-
- contents: function(element) {
- return element.contentDocument || element.childNodes || [];
- },
-
- append: function(element, node) {
- var nodeType = element.nodeType;
- if (nodeType !== NODE_TYPE_ELEMENT && nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT) return;
-
- node = new JQLite(node);
-
- for (var i = 0, ii = node.length; i < ii; i++) {
- var child = node[i];
- element.appendChild(child);
- }
- },
-
- prepend: function(element, node) {
- if (element.nodeType === NODE_TYPE_ELEMENT) {
- var index = element.firstChild;
- forEach(new JQLite(node), function(child) {
- element.insertBefore(child, index);
- });
- }
- },
-
- wrap: function(element, wrapNode) {
- wrapNode = jqLite(wrapNode).eq(0).clone()[0];
- var parent = element.parentNode;
- if (parent) {
- parent.replaceChild(wrapNode, element);
- }
- wrapNode.appendChild(element);
- },
-
- remove: jqLiteRemove,
-
- detach: function(element) {
- jqLiteRemove(element, true);
- },
-
- after: function(element, newElement) {
- var index = element, parent = element.parentNode;
- newElement = new JQLite(newElement);
-
- for (var i = 0, ii = newElement.length; i < ii; i++) {
- var node = newElement[i];
- parent.insertBefore(node, index.nextSibling);
- index = node;
- }
- },
-
- addClass: jqLiteAddClass,
- removeClass: jqLiteRemoveClass,
-
- toggleClass: function(element, selector, condition) {
- if (selector) {
- forEach(selector.split(' '), function(className) {
- var classCondition = condition;
- if (isUndefined(classCondition)) {
- classCondition = !jqLiteHasClass(element, className);
- }
- (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);
- });
- }
- },
-
- parent: function(element) {
- var parent = element.parentNode;
- return parent && parent.nodeType !== NODE_TYPE_DOCUMENT_FRAGMENT ? parent : null;
- },
-
- next: function(element) {
- return element.nextElementSibling;
- },
-
- find: function(element, selector) {
- if (element.getElementsByTagName) {
- return element.getElementsByTagName(selector);
- } else {
- return [];
- }
- },
-
- clone: jqLiteClone,
-
- triggerHandler: function(element, event, extraParameters) {
-
- var dummyEvent, eventFnsCopy, handlerArgs;
- var eventName = event.type || event;
- var expandoStore = jqLiteExpandoStore(element);
- var events = expandoStore && expandoStore.events;
- var eventFns = events && events[eventName];
-
- if (eventFns) {
- // Create a dummy event to pass to the handlers
- dummyEvent = {
- preventDefault: function() { this.defaultPrevented = true; },
- isDefaultPrevented: function() { return this.defaultPrevented === true; },
- stopImmediatePropagation: function() { this.immediatePropagationStopped = true; },
- isImmediatePropagationStopped: function() { return this.immediatePropagationStopped === true; },
- stopPropagation: noop,
- type: eventName,
- target: element
- };
-
- // If a custom event was provided then extend our dummy event with it
- if (event.type) {
- dummyEvent = extend(dummyEvent, event);
- }
-
- // Copy event handlers in case event handlers array is modified during execution.
- eventFnsCopy = shallowCopy(eventFns);
- handlerArgs = extraParameters ? [dummyEvent].concat(extraParameters) : [dummyEvent];
-
- forEach(eventFnsCopy, function(fn) {
- if (!dummyEvent.isImmediatePropagationStopped()) {
- fn.apply(element, handlerArgs);
- }
- });
- }
- }
-}, function(fn, name) {
- /**
- * chaining functions
- */
- JQLite.prototype[name] = function(arg1, arg2, arg3) {
- var value;
-
- for (var i = 0, ii = this.length; i < ii; i++) {
- if (isUndefined(value)) {
- value = fn(this[i], arg1, arg2, arg3);
- if (isDefined(value)) {
- // any function which returns a value needs to be wrapped
- value = jqLite(value);
- }
- } else {
- jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));
- }
- }
- return isDefined(value) ? value : this;
- };
-
- // bind legacy bind/unbind to on/off
- JQLite.prototype.bind = JQLite.prototype.on;
- JQLite.prototype.unbind = JQLite.prototype.off;
-});
-
-
-// Provider for private $$jqLite service
-function $$jqLiteProvider() {
- this.$get = function $$jqLite() {
- return extend(JQLite, {
- hasClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteHasClass(node, classes);
- },
- addClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteAddClass(node, classes);
- },
- removeClass: function(node, classes) {
- if (node.attr) node = node[0];
- return jqLiteRemoveClass(node, classes);
- }
- });
- };
-}
-
-/**
- * Computes a hash of an 'obj'.
- * Hash of a:
- * string is string
- * number is number as string
- * object is either result of calling $$hashKey function on the object or uniquely generated id,
- * that is also assigned to the $$hashKey property of the object.
- *
- * @param obj
- * @returns {string} hash string such that the same input will have the same hash string.
- * The resulting string key is in 'type:hashKey' format.
- */
-function hashKey(obj, nextUidFn) {
- var key = obj && obj.$$hashKey;
-
- if (key) {
- if (typeof key === 'function') {
- key = obj.$$hashKey();
- }
- return key;
- }
-
- var objType = typeof obj;
- if (objType == 'function' || (objType == 'object' && obj !== null)) {
- key = obj.$$hashKey = objType + ':' + (nextUidFn || nextUid)();
- } else {
- key = objType + ':' + obj;
- }
-
- return key;
-}
-
-/**
- * HashMap which can use objects as keys
- */
-function HashMap(array, isolatedUid) {
- if (isolatedUid) {
- var uid = 0;
- this.nextUid = function() {
- return ++uid;
- };
- }
- forEach(array, this.put, this);
-}
-HashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[hashKey(key, this.nextUid)] = value;
- },
-
- /**
- * @param key
- * @returns {Object} the value for the key
- */
- get: function(key) {
- return this[hashKey(key, this.nextUid)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = hashKey(key, this.nextUid)];
- delete this[key];
- return value;
- }
-};
-
-var $$HashMapProvider = [function() {
- this.$get = [function() {
- return HashMap;
- }];
-}];
-
-/**
- * @ngdoc function
- * @module ng
- * @name angular.injector
- * @kind function
- *
- * @description
- * Creates an injector object that can be used for retrieving services as well as for
- * dependency injection (see {@link guide/di dependency injection}).
- *
- * @param {Array.<string|Function>} modules A list of module functions or their aliases. See
- * {@link angular.module}. The `ng` module must be explicitly added.
- * @param {boolean=} [strictDi=false] Whether the injector should be in strict mode, which
- * disallows argument name annotation inference.
- * @returns {injector} Injector object. See {@link auto.$injector $injector}.
- *
- * @example
- * Typical usage
- * ```js
- * // create an injector
- * var $injector = angular.injector(['ng']);
- *
- * // use the injector to kick off your application
- * // use the type inference to auto inject arguments, or use implicit injection
- * $injector.invoke(function($rootScope, $compile, $document) {
- * $compile($document)($rootScope);
- * $rootScope.$digest();
- * });
- * ```
- *
- * Sometimes you want to get access to the injector of a currently running Angular app
- * from outside Angular. Perhaps, you want to inject and compile some markup after the
- * application has been bootstrapped. You can do this using the extra `injector()` added
- * to JQuery/jqLite elements. See {@link angular.element}.
- *
- * *This is fairly rare but could be the case if a third party library is injecting the
- * markup.*
- *
- * In the following example a new block of HTML containing a `ng-controller`
- * directive is added to the end of the document body by JQuery. We then compile and link
- * it into the current AngularJS scope.
- *
- * ```js
- * var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
- * $(document.body).append($div);
- *
- * angular.element(document).injector().invoke(function($compile) {
- * var scope = angular.element($div).scope();
- * $compile($div)(scope);
- * });
- * ```
- */
-
-
-/**
- * @ngdoc module
- * @name auto
- * @description
- *
- * Implicit module which gets automatically added to each {@link auto.$injector $injector}.
- */
-
-var ARROW_ARG = /^([^\(]+?)=>/;
-var FN_ARGS = /^[^\(]*\(\s*([^\)]*)\)/m;
-var FN_ARG_SPLIT = /,/;
-var FN_ARG = /^\s*(_?)(\S+?)\1\s*$/;
-var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg;
-var $injectorMinErr = minErr('$injector');
-
-function extractArgs(fn) {
- var fnText = fn.toString().replace(STRIP_COMMENTS, ''),
- args = fnText.match(ARROW_ARG) || fnText.match(FN_ARGS);
- return args;
-}
-
-function anonFn(fn) {
- // For anonymous functions, showing at the very least the function signature can help in
- // debugging.
- var args = extractArgs(fn);
- if (args) {
- return 'function(' + (args[1] || '').replace(/[\s\r\n]+/, ' ') + ')';
- }
- return 'fn';
-}
-
-function annotate(fn, strictDi, name) {
- var $inject,
- argDecl,
- last;
-
- if (typeof fn === 'function') {
- if (!($inject = fn.$inject)) {
- $inject = [];
- if (fn.length) {
- if (strictDi) {
- if (!isString(name) || !name) {
- name = fn.name || anonFn(fn);
- }
- throw $injectorMinErr('strictdi',
- '{0} is not using explicit annotation and cannot be invoked in strict mode', name);
- }
- argDecl = extractArgs(fn);
- forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg) {
- arg.replace(FN_ARG, function(all, underscore, name) {
- $inject.push(name);
- });
- });
- }
- fn.$inject = $inject;
- }
- } else if (isArray(fn)) {
- last = fn.length - 1;
- assertArgFn(fn[last], 'fn');
- $inject = fn.slice(0, last);
- } else {
- assertArgFn(fn, 'fn', true);
- }
- return $inject;
-}
-
-///////////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $injector
- *
- * @description
- *
- * `$injector` is used to retrieve object instances as defined by
- * {@link auto.$provide provider}, instantiate types, invoke methods,
- * and load modules.
- *
- * The following always holds true:
- *
- * ```js
- * var $injector = angular.injector();
- * expect($injector.get('$injector')).toBe($injector);
- * expect($injector.invoke(function($injector) {
- * return $injector;
- * })).toBe($injector);
- * ```
- *
- * # Injection Function Annotation
- *
- * JavaScript does not have annotations, and annotations are needed for dependency injection. The
- * following are all valid ways of annotating function with injection arguments and are equivalent.
- *
- * ```js
- * // inferred (only works if code not minified/obfuscated)
- * $injector.invoke(function(serviceA){});
- *
- * // annotated
- * function explicit(serviceA) {};
- * explicit.$inject = ['serviceA'];
- * $injector.invoke(explicit);
- *
- * // inline
- * $injector.invoke(['serviceA', function(serviceA){}]);
- * ```
- *
- * ## Inference
- *
- * In JavaScript calling `toString()` on a function returns the function definition. The definition
- * can then be parsed and the function arguments can be extracted. This method of discovering
- * annotations is disallowed when the injector is in strict mode.
- * *NOTE:* This does not work with minification, and obfuscation tools since these tools change the
- * argument names.
- *
- * ## `$inject` Annotation
- * By adding an `$inject` property onto a function the injection parameters can be specified.
- *
- * ## Inline
- * As an array of injection names, where the last item in the array is the function to call.
- */
-
-/**
- * @ngdoc method
- * @name $injector#get
- *
- * @description
- * Return an instance of the service.
- *
- * @param {string} name The name of the instance to retrieve.
- * @param {string=} caller An optional string to provide the origin of the function call for error messages.
- * @return {*} The instance.
- */
-
-/**
- * @ngdoc method
- * @name $injector#invoke
- *
- * @description
- * Invoke the method and supply the method arguments from the `$injector`.
- *
- * @param {Function|Array.<string|Function>} fn The injectable function to invoke. Function parameters are
- * injected according to the {@link guide/di $inject Annotation} rules.
- * @param {Object=} self The `this` for the invoked method.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {*} the value returned by the invoked `fn` function.
- */
-
-/**
- * @ngdoc method
- * @name $injector#has
- *
- * @description
- * Allows the user to query if the particular service exists.
- *
- * @param {string} name Name of the service to query.
- * @returns {boolean} `true` if injector has given service.
- */
-
-/**
- * @ngdoc method
- * @name $injector#instantiate
- * @description
- * Create a new instance of JS type. The method takes a constructor function, invokes the new
- * operator, and supplies all of the arguments to the constructor function as specified by the
- * constructor annotation.
- *
- * @param {Function} Type Annotated constructor function.
- * @param {Object=} locals Optional object. If preset then any argument names are read from this
- * object first, before the `$injector` is consulted.
- * @returns {Object} new instance of `Type`.
- */
-
-/**
- * @ngdoc method
- * @name $injector#annotate
- *
- * @description
- * Returns an array of service names which the function is requesting for injection. This API is
- * used by the injector to determine which services need to be injected into the function when the
- * function is invoked. There are three ways in which the function can be annotated with the needed
- * dependencies.
- *
- * # Argument names
- *
- * The simplest form is to extract the dependencies from the arguments of the function. This is done
- * by converting the function into a string using `toString()` method and extracting the argument
- * names.
- * ```js
- * // Given
- * function MyController($scope, $route) {
- * // ...
- * }
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * You can disallow this method by using strict injection mode.
- *
- * This method does not work with code minification / obfuscation. For this reason the following
- * annotation strategies are supported.
- *
- * # The `$inject` property
- *
- * If a function has an `$inject` property and its value is an array of strings, then the strings
- * represent names of services to be injected into the function.
- * ```js
- * // Given
- * var MyController = function(obfuscatedScope, obfuscatedRoute) {
- * // ...
- * }
- * // Define function dependencies
- * MyController['$inject'] = ['$scope', '$route'];
- *
- * // Then
- * expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);
- * ```
- *
- * # The array notation
- *
- * It is often desirable to inline Injected functions and that's when setting the `$inject` property
- * is very inconvenient. In these situations using the array notation to specify the dependencies in
- * a way that survives minification is a better choice:
- *
- * ```js
- * // We wish to write this (not minification / obfuscation safe)
- * injector.invoke(function($compile, $rootScope) {
- * // ...
- * });
- *
- * // We are forced to write break inlining
- * var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {
- * // ...
- * };
- * tmpFn.$inject = ['$compile', '$rootScope'];
- * injector.invoke(tmpFn);
- *
- * // To better support inline function the inline annotation is supported
- * injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {
- * // ...
- * }]);
- *
- * // Therefore
- * expect(injector.annotate(
- * ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])
- * ).toEqual(['$compile', '$rootScope']);
- * ```
- *
- * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to
- * be retrieved as described above.
- *
- * @param {boolean=} [strictDi=false] Disallow argument name annotation inference.
- *
- * @returns {Array.<string>} The names of the services which the function requires.
- */
-
-
-
-
-/**
- * @ngdoc service
- * @name $provide
- *
- * @description
- *
- * The {@link auto.$provide $provide} service has a number of methods for registering components
- * with the {@link auto.$injector $injector}. Many of these functions are also exposed on
- * {@link angular.Module}.
- *
- * An Angular **service** is a singleton object created by a **service factory**. These **service
- * factories** are functions which, in turn, are created by a **service provider**.
- * The **service providers** are constructor functions. When instantiated they must contain a
- * property called `$get`, which holds the **service factory** function.
- *
- * When you request a service, the {@link auto.$injector $injector} is responsible for finding the
- * correct **service provider**, instantiating it and then calling its `$get` **service factory**
- * function to get the instance of the **service**.
- *
- * Often services have no configuration options and there is no need to add methods to the service
- * provider. The provider will be no more than a constructor function with a `$get` property. For
- * these cases the {@link auto.$provide $provide} service has additional helper methods to register
- * services without specifying a provider.
- *
- * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the
- * {@link auto.$injector $injector}
- * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by
- * providers and services.
- * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by
- * services, not providers.
- * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,
- * that will be wrapped in a **service provider** object, whose `$get` property will contain the
- * given factory function.
- * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`
- * that will be wrapped in a **service provider** object, whose `$get` property will instantiate
- * a new object using the given constructor function.
- *
- * See the individual methods for more information and examples.
- */
-
-/**
- * @ngdoc method
- * @name $provide#provider
- * @description
- *
- * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions
- * are constructor functions, whose instances are responsible for "providing" a factory for a
- * service.
- *
- * Service provider names start with the name of the service they provide followed by `Provider`.
- * For example, the {@link ng.$log $log} service has a provider called
- * {@link ng.$logProvider $logProvider}.
- *
- * Service provider objects can have additional methods which allow configuration of the provider
- * and its service. Importantly, you can configure what kind of service is created by the `$get`
- * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a
- * method {@link ng.$logProvider#debugEnabled debugEnabled}
- * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the
- * console or not.
- *
- * @param {string} name The name of the instance. NOTE: the provider will be available under `name +
- 'Provider'` key.
- * @param {(Object|function())} provider If the provider is:
- *
- * - `Object`: then it should have a `$get` method. The `$get` method will be invoked using
- * {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.
- * - `Constructor`: a new instance of the provider will be created using
- * {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.
- *
- * @returns {Object} registered provider instance
-
- * @example
- *
- * The following example shows how to create a simple event tracking service and register it using
- * {@link auto.$provide#provider $provide.provider()}.
- *
- * ```js
- * // Define the eventTracker provider
- * function EventTrackerProvider() {
- * var trackingUrl = '/track';
- *
- * // A provider method for configuring where the tracked events should been saved
- * this.setTrackingUrl = function(url) {
- * trackingUrl = url;
- * };
- *
- * // The service factory function
- * this.$get = ['$http', function($http) {
- * var trackedEvents = {};
- * return {
- * // Call this to track an event
- * event: function(event) {
- * var count = trackedEvents[event] || 0;
- * count += 1;
- * trackedEvents[event] = count;
- * return count;
- * },
- * // Call this to save the tracked events to the trackingUrl
- * save: function() {
- * $http.post(trackingUrl, trackedEvents);
- * }
- * };
- * }];
- * }
- *
- * describe('eventTracker', function() {
- * var postSpy;
- *
- * beforeEach(module(function($provide) {
- * // Register the eventTracker provider
- * $provide.provider('eventTracker', EventTrackerProvider);
- * }));
- *
- * beforeEach(module(function(eventTrackerProvider) {
- * // Configure eventTracker provider
- * eventTrackerProvider.setTrackingUrl('/custom-track');
- * }));
- *
- * it('tracks events', inject(function(eventTracker) {
- * expect(eventTracker.event('login')).toEqual(1);
- * expect(eventTracker.event('login')).toEqual(2);
- * }));
- *
- * it('saves to the tracking url', inject(function(eventTracker, $http) {
- * postSpy = spyOn($http, 'post');
- * eventTracker.event('login');
- * eventTracker.save();
- * expect(postSpy).toHaveBeenCalled();
- * expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');
- * expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');
- * expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });
- * }));
- * });
- * ```
- */
-
-/**
- * @ngdoc method
- * @name $provide#factory
- * @description
- *
- * Register a **service factory**, which will be called to return the service instance.
- * This is short for registering a service where its provider consists of only a `$get` property,
- * which is the given service factory function.
- * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to
- * configure your service in a provider.
- *
- * @param {string} name The name of the instance.
- * @param {Function|Array.<string|Function>} $getFn The injectable $getFn for the instance creation.
- * Internally this is a short hand for `$provide.provider(name, {$get: $getFn})`.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service
- * ```js
- * $provide.factory('ping', ['$http', function($http) {
- * return function ping() {
- * return $http.send('/ping');
- * };
- * }]);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#service
- * @description
- *
- * Register a **service constructor**, which will be invoked with `new` to create the service
- * instance.
- * This is short for registering a service where its provider's `$get` property is the service
- * constructor function that will be used to instantiate the service instance.
- *
- * You should use {@link auto.$provide#service $provide.service(class)} if you define your service
- * as a type/class.
- *
- * @param {string} name The name of the instance.
- * @param {Function|Array.<string|Function>} constructor An injectable class (constructor function)
- * that will be instantiated.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here is an example of registering a service using
- * {@link auto.$provide#service $provide.service(class)}.
- * ```js
- * var Ping = function($http) {
- * this.$http = $http;
- * };
- *
- * Ping.$inject = ['$http'];
- *
- * Ping.prototype.send = function() {
- * return this.$http.get('/ping');
- * };
- * $provide.service('ping', Ping);
- * ```
- * You would then inject and use this service like this:
- * ```js
- * someModule.controller('Ctrl', ['ping', function(ping) {
- * ping.send();
- * }]);
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#value
- * @description
- *
- * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a
- * number, an array, an object or a function. This is short for registering a service where its
- * provider's `$get` property is a factory function that takes no arguments and returns the **value
- * service**.
- *
- * Value services are similar to constant services, except that they cannot be injected into a
- * module configuration function (see {@link angular.Module#config}) but they can be overridden by
- * an Angular
- * {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the instance.
- * @param {*} value The value.
- * @returns {Object} registered provider instance
- *
- * @example
- * Here are some examples of creating value services.
- * ```js
- * $provide.value('ADMIN_USER', 'admin');
- *
- * $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });
- *
- * $provide.value('halfOf', function(value) {
- * return value / 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#constant
- * @description
- *
- * Register a **constant service**, such as a string, a number, an array, an object or a function,
- * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be
- * injected into a module configuration function (see {@link angular.Module#config}) and it cannot
- * be overridden by an Angular {@link auto.$provide#decorator decorator}.
- *
- * @param {string} name The name of the constant.
- * @param {*} value The constant value.
- * @returns {Object} registered instance
- *
- * @example
- * Here a some examples of creating constants:
- * ```js
- * $provide.constant('SHARD_HEIGHT', 306);
- *
- * $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);
- *
- * $provide.constant('double', function(value) {
- * return value * 2;
- * });
- * ```
- */
-
-
-/**
- * @ngdoc method
- * @name $provide#decorator
- * @description
- *
- * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator
- * intercepts the creation of a service, allowing it to override or modify the behaviour of the
- * service. The object returned by the decorator may be the original service, or a new service
- * object which replaces or wraps and delegates to the original service.
- *
- * @param {string} name The name of the service to decorate.
- * @param {Function|Array.<string|Function>} decorator This function will be invoked when the service needs to be
- * instantiated and should return the decorated service instance. The function is called using
- * the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.
- * Local injection arguments:
- *
- * * `$delegate` - The original service instance, which can be monkey patched, configured,
- * decorated or delegated to.
- *
- * @example
- * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting
- * calls to {@link ng.$log#error $log.warn()}.
- * ```js
- * $provide.decorator('$log', ['$delegate', function($delegate) {
- * $delegate.warn = $delegate.error;
- * return $delegate;
- * }]);
- * ```
- */
-
-
-function createInjector(modulesToLoad, strictDi) {
- strictDi = (strictDi === true);
- var INSTANTIATING = {},
- providerSuffix = 'Provider',
- path = [],
- loadedModules = new HashMap([], true),
- providerCache = {
- $provide: {
- provider: supportObject(provider),
- factory: supportObject(factory),
- service: supportObject(service),
- value: supportObject(value),
- constant: supportObject(constant),
- decorator: decorator
- }
- },
- providerInjector = (providerCache.$injector =
- createInternalInjector(providerCache, function(serviceName, caller) {
- if (angular.isString(caller)) {
- path.push(caller);
- }
- throw $injectorMinErr('unpr', "Unknown provider: {0}", path.join(' <- '));
- })),
- instanceCache = {},
- protoInstanceInjector =
- createInternalInjector(instanceCache, function(serviceName, caller) {
- var provider = providerInjector.get(serviceName + providerSuffix, caller);
- return instanceInjector.invoke(
- provider.$get, provider, undefined, serviceName);
- }),
- instanceInjector = protoInstanceInjector;
-
- providerCache['$injector' + providerSuffix] = { $get: valueFn(protoInstanceInjector) };
- var runBlocks = loadModules(modulesToLoad);
- instanceInjector = protoInstanceInjector.get('$injector');
- instanceInjector.strictDi = strictDi;
- forEach(runBlocks, function(fn) { if (fn) instanceInjector.invoke(fn); });
-
- return instanceInjector;
-
- ////////////////////////////////////
- // $provider
- ////////////////////////////////////
-
- function supportObject(delegate) {
- return function(key, value) {
- if (isObject(key)) {
- forEach(key, reverseParams(delegate));
- } else {
- return delegate(key, value);
- }
- };
- }
-
- function provider(name, provider_) {
- assertNotHasOwnProperty(name, 'service');
- if (isFunction(provider_) || isArray(provider_)) {
- provider_ = providerInjector.instantiate(provider_);
- }
- if (!provider_.$get) {
- throw $injectorMinErr('pget', "Provider '{0}' must define $get factory method.", name);
- }
- return providerCache[name + providerSuffix] = provider_;
- }
-
- function enforceReturnValue(name, factory) {
- return function enforcedReturnValue() {
- var result = instanceInjector.invoke(factory, this);
- if (isUndefined(result)) {
- throw $injectorMinErr('undef', "Provider '{0}' must return a value from $get factory method.", name);
- }
- return result;
- };
- }
-
- function factory(name, factoryFn, enforce) {
- return provider(name, {
- $get: enforce !== false ? enforceReturnValue(name, factoryFn) : factoryFn
- });
- }
-
- function service(name, constructor) {
- return factory(name, ['$injector', function($injector) {
- return $injector.instantiate(constructor);
- }]);
- }
-
- function value(name, val) { return factory(name, valueFn(val), false); }
-
- function constant(name, value) {
- assertNotHasOwnProperty(name, 'constant');
- providerCache[name] = value;
- instanceCache[name] = value;
- }
-
- function decorator(serviceName, decorFn) {
- var origProvider = providerInjector.get(serviceName + providerSuffix),
- orig$get = origProvider.$get;
-
- origProvider.$get = function() {
- var origInstance = instanceInjector.invoke(orig$get, origProvider);
- return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});
- };
- }
-
- ////////////////////////////////////
- // Module Loading
- ////////////////////////////////////
- function loadModules(modulesToLoad) {
- assertArg(isUndefined(modulesToLoad) || isArray(modulesToLoad), 'modulesToLoad', 'not an array');
- var runBlocks = [], moduleFn;
- forEach(modulesToLoad, function(module) {
- if (loadedModules.get(module)) return;
- loadedModules.put(module, true);
-
- function runInvokeQueue(queue) {
- var i, ii;
- for (i = 0, ii = queue.length; i < ii; i++) {
- var invokeArgs = queue[i],
- provider = providerInjector.get(invokeArgs[0]);
-
- provider[invokeArgs[1]].apply(provider, invokeArgs[2]);
- }
- }
-
- try {
- if (isString(module)) {
- moduleFn = angularModule(module);
- runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);
- runInvokeQueue(moduleFn._invokeQueue);
- runInvokeQueue(moduleFn._configBlocks);
- } else if (isFunction(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else if (isArray(module)) {
- runBlocks.push(providerInjector.invoke(module));
- } else {
- assertArgFn(module, 'module');
- }
- } catch (e) {
- if (isArray(module)) {
- module = module[module.length - 1];
- }
- if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {
- // Safari & FF's stack traces don't contain error.message content
- // unlike those of Chrome and IE
- // So if stack doesn't contain message, we create a new string that contains both.
- // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.
- /* jshint -W022 */
- e = e.message + '\n' + e.stack;
- }
- throw $injectorMinErr('modulerr', "Failed to instantiate module {0} due to:\n{1}",
- module, e.stack || e.message || e);
- }
- });
- return runBlocks;
- }
-
- ////////////////////////////////////
- // internal Injector
- ////////////////////////////////////
-
- function createInternalInjector(cache, factory) {
-
- function getService(serviceName, caller) {
- if (cache.hasOwnProperty(serviceName)) {
- if (cache[serviceName] === INSTANTIATING) {
- throw $injectorMinErr('cdep', 'Circular dependency found: {0}',
- serviceName + ' <- ' + path.join(' <- '));
- }
- return cache[serviceName];
- } else {
- try {
- path.unshift(serviceName);
- cache[serviceName] = INSTANTIATING;
- return cache[serviceName] = factory(serviceName, caller);
- } catch (err) {
- if (cache[serviceName] === INSTANTIATING) {
- delete cache[serviceName];
- }
- throw err;
- } finally {
- path.shift();
- }
- }
- }
-
- function invoke(fn, self, locals, serviceName) {
- if (typeof locals === 'string') {
- serviceName = locals;
- locals = null;
- }
-
- var args = [],
- $inject = createInjector.$$annotate(fn, strictDi, serviceName),
- length, i,
- key;
-
- for (i = 0, length = $inject.length; i < length; i++) {
- key = $inject[i];
- if (typeof key !== 'string') {
- throw $injectorMinErr('itkn',
- 'Incorrect injection token! Expected service name as string, got {0}', key);
- }
- args.push(
- locals && locals.hasOwnProperty(key)
- ? locals[key]
- : getService(key, serviceName)
- );
- }
- if (isArray(fn)) {
- fn = fn[length];
- }
-
- // http://jsperf.com/angularjs-invoke-apply-vs-switch
- // #5388
- return fn.apply(self, args);
- }
-
- function instantiate(Type, locals, serviceName) {
- // Check if Type is annotated and use just the given function at n-1 as parameter
- // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);
- // Object creation: http://jsperf.com/create-constructor/2
- var instance = Object.create((isArray(Type) ? Type[Type.length - 1] : Type).prototype || null);
- var returnedValue = invoke(Type, instance, locals, serviceName);
-
- return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;
- }
-
- return {
- invoke: invoke,
- instantiate: instantiate,
- get: getService,
- annotate: createInjector.$$annotate,
- has: function(name) {
- return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);
- }
- };
- }
-}
-
-createInjector.$$annotate = annotate;
-
-/**
- * @ngdoc provider
- * @name $anchorScrollProvider
- *
- * @description
- * Use `$anchorScrollProvider` to disable automatic scrolling whenever
- * {@link ng.$location#hash $location.hash()} changes.
- */
-function $AnchorScrollProvider() {
-
- var autoScrollingEnabled = true;
-
- /**
- * @ngdoc method
- * @name $anchorScrollProvider#disableAutoScrolling
- *
- * @description
- * By default, {@link ng.$anchorScroll $anchorScroll()} will automatically detect changes to
- * {@link ng.$location#hash $location.hash()} and scroll to the element matching the new hash.<br />
- * Use this method to disable automatic scrolling.
- *
- * If automatic scrolling is disabled, one must explicitly call
- * {@link ng.$anchorScroll $anchorScroll()} in order to scroll to the element related to the
- * current hash.
- */
- this.disableAutoScrolling = function() {
- autoScrollingEnabled = false;
- };
-
- /**
- * @ngdoc service
- * @name $anchorScroll
- * @kind function
- * @requires $window
- * @requires $location
- * @requires $rootScope
- *
- * @description
- * When called, it scrolls to the element related to the specified `hash` or (if omitted) to the
- * current value of {@link ng.$location#hash $location.hash()}, according to the rules specified
- * in the
- * [HTML5 spec](http://www.w3.org/html/wg/drafts/html/master/browsers.html#the-indicated-part-of-the-document).
- *
- * It also watches the {@link ng.$location#hash $location.hash()} and automatically scrolls to
- * match any anchor whenever it changes. This can be disabled by calling
- * {@link ng.$anchorScrollProvider#disableAutoScrolling $anchorScrollProvider.disableAutoScrolling()}.
- *
- * Additionally, you can use its {@link ng.$anchorScroll#yOffset yOffset} property to specify a
- * vertical scroll-offset (either fixed or dynamic).
- *
- * @param {string=} hash The hash specifying the element to scroll to. If omitted, the value of
- * {@link ng.$location#hash $location.hash()} will be used.
- *
- * @property {(number|function|jqLite)} yOffset
- * If set, specifies a vertical scroll-offset. This is often useful when there are fixed
- * positioned elements at the top of the page, such as navbars, headers etc.
- *
- * `yOffset` can be specified in various ways:
- * - **number**: A fixed number of pixels to be used as offset.<br /><br />
- * - **function**: A getter function called everytime `$anchorScroll()` is executed. Must return
- * a number representing the offset (in pixels).<br /><br />
- * - **jqLite**: A jqLite/jQuery element to be used for specifying the offset. The distance from
- * the top of the page to the element's bottom will be used as offset.<br />
- * **Note**: The element will be taken into account only as long as its `position` is set to
- * `fixed`. This option is useful, when dealing with responsive navbars/headers that adjust
- * their height and/or positioning according to the viewport's size.
- *
- * <br />
- * <div class="alert alert-warning">
- * In order for `yOffset` to work properly, scrolling should take place on the document's root and
- * not some child element.
- * </div>
- *
- * @example
- <example module="anchorScrollExample">
- <file name="index.html">
- <div id="scrollArea" ng-controller="ScrollController">
- <a ng-click="gotoBottom()">Go to bottom</a>
- <a id="bottom"></a> You're at the bottom!
- </div>
- </file>
- <file name="script.js">
- angular.module('anchorScrollExample', [])
- .controller('ScrollController', ['$scope', '$location', '$anchorScroll',
- function ($scope, $location, $anchorScroll) {
- $scope.gotoBottom = function() {
- // set the location.hash to the id of
- // the element you wish to scroll to.
- $location.hash('bottom');
-
- // call $anchorScroll()
- $anchorScroll();
- };
- }]);
- </file>
- <file name="style.css">
- #scrollArea {
- height: 280px;
- overflow: auto;
- }
-
- #bottom {
- display: block;
- margin-top: 2000px;
- }
- </file>
- </example>
- *
- * <hr />
- * The example below illustrates the use of a vertical scroll-offset (specified as a fixed value).
- * See {@link ng.$anchorScroll#yOffset $anchorScroll.yOffset} for more details.
- *
- * @example
- <example module="anchorScrollOffsetExample">
- <file name="index.html">
- <div class="fixed-header" ng-controller="headerCtrl">
- <a href="" ng-click="gotoAnchor(x)" ng-repeat="x in [1,2,3,4,5]">
- Go to anchor {{x}}
- </a>
- </div>
- <div id="anchor{{x}}" class="anchor" ng-repeat="x in [1,2,3,4,5]">
- Anchor {{x}} of 5
- </div>
- </file>
- <file name="script.js">
- angular.module('anchorScrollOffsetExample', [])
- .run(['$anchorScroll', function($anchorScroll) {
- $anchorScroll.yOffset = 50; // always scroll by 50 extra pixels
- }])
- .controller('headerCtrl', ['$anchorScroll', '$location', '$scope',
- function ($anchorScroll, $location, $scope) {
- $scope.gotoAnchor = function(x) {
- var newHash = 'anchor' + x;
- if ($location.hash() !== newHash) {
- // set the $location.hash to `newHash` and
- // $anchorScroll will automatically scroll to it
- $location.hash('anchor' + x);
- } else {
- // call $anchorScroll() explicitly,
- // since $location.hash hasn't changed
- $anchorScroll();
- }
- };
- }
- ]);
- </file>
- <file name="style.css">
- body {
- padding-top: 50px;
- }
-
- .anchor {
- border: 2px dashed DarkOrchid;
- padding: 10px 10px 200px 10px;
- }
-
- .fixed-header {
- background-color: rgba(0, 0, 0, 0.2);
- height: 50px;
- position: fixed;
- top: 0; left: 0; right: 0;
- }
-
- .fixed-header > a {
- display: inline-block;
- margin: 5px 15px;
- }
- </file>
- </example>
- */
- this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {
- var document = $window.document;
-
- // Helper function to get first anchor from a NodeList
- // (using `Array#some()` instead of `angular#forEach()` since it's more performant
- // and working in all supported browsers.)
- function getFirstAnchor(list) {
- var result = null;
- Array.prototype.some.call(list, function(element) {
- if (nodeName_(element) === 'a') {
- result = element;
- return true;
- }
- });
- return result;
- }
-
- function getYOffset() {
-
- var offset = scroll.yOffset;
-
- if (isFunction(offset)) {
- offset = offset();
- } else if (isElement(offset)) {
- var elem = offset[0];
- var style = $window.getComputedStyle(elem);
- if (style.position !== 'fixed') {
- offset = 0;
- } else {
- offset = elem.getBoundingClientRect().bottom;
- }
- } else if (!isNumber(offset)) {
- offset = 0;
- }
-
- return offset;
- }
-
- function scrollTo(elem) {
- if (elem) {
- elem.scrollIntoView();
-
- var offset = getYOffset();
-
- if (offset) {
- // `offset` is the number of pixels we should scroll UP in order to align `elem` properly.
- // This is true ONLY if the call to `elem.scrollIntoView()` initially aligns `elem` at the
- // top of the viewport.
- //
- // IF the number of pixels from the top of `elem` to the end of the page's content is less
- // than the height of the viewport, then `elem.scrollIntoView()` will align the `elem` some
- // way down the page.
- //
- // This is often the case for elements near the bottom of the page.
- //
- // In such cases we do not need to scroll the whole `offset` up, just the difference between
- // the top of the element and the offset, which is enough to align the top of `elem` at the
- // desired position.
- var elemTop = elem.getBoundingClientRect().top;
- $window.scrollBy(0, elemTop - offset);
- }
- } else {
- $window.scrollTo(0, 0);
- }
- }
-
- function scroll(hash) {
- hash = isString(hash) ? hash : $location.hash();
- var elm;
-
- // empty hash, scroll to the top of the page
- if (!hash) scrollTo(null);
-
- // element with given id
- else if ((elm = document.getElementById(hash))) scrollTo(elm);
-
- // first anchor with given name :-D
- else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) scrollTo(elm);
-
- // no element and hash == 'top', scroll to the top of the page
- else if (hash === 'top') scrollTo(null);
- }
-
- // does not scroll when user clicks on anchor link that is currently on
- // (no url change, no $location.hash() change), browser native does scroll
- if (autoScrollingEnabled) {
- $rootScope.$watch(function autoScrollWatch() {return $location.hash();},
- function autoScrollWatchAction(newVal, oldVal) {
- // skip the initial scroll if $location.hash is empty
- if (newVal === oldVal && newVal === '') return;
-
- jqLiteDocumentLoaded(function() {
- $rootScope.$evalAsync(scroll);
- });
- });
- }
-
- return scroll;
- }];
-}
-
-var $animateMinErr = minErr('$animate');
-var ELEMENT_NODE = 1;
-var NG_ANIMATE_CLASSNAME = 'ng-animate';
-
-function mergeClasses(a,b) {
- if (!a && !b) return '';
- if (!a) return b;
- if (!b) return a;
- if (isArray(a)) a = a.join(' ');
- if (isArray(b)) b = b.join(' ');
- return a + ' ' + b;
-}
-
-function extractElementNode(element) {
- for (var i = 0; i < element.length; i++) {
- var elm = element[i];
- if (elm.nodeType === ELEMENT_NODE) {
- return elm;
- }
- }
-}
-
-function splitClasses(classes) {
- if (isString(classes)) {
- classes = classes.split(' ');
- }
-
- // Use createMap() to prevent class assumptions involving property names in
- // Object.prototype
- var obj = createMap();
- forEach(classes, function(klass) {
- // sometimes the split leaves empty string values
- // incase extra spaces were applied to the options
- if (klass.length) {
- obj[klass] = true;
- }
- });
- return obj;
-}
-
-// if any other type of options value besides an Object value is
-// passed into the $animate.method() animation then this helper code
-// will be run which will ignore it. While this patch is not the
-// greatest solution to this, a lot of existing plugins depend on
-// $animate to either call the callback (< 1.2) or return a promise
-// that can be changed. This helper function ensures that the options
-// are wiped clean incase a callback function is provided.
-function prepareAnimateOptions(options) {
- return isObject(options)
- ? options
- : {};
-}
-
-var $$CoreAnimateRunnerProvider = function() {
- this.$get = ['$q', '$$rAF', function($q, $$rAF) {
- function AnimateRunner() {}
- AnimateRunner.all = noop;
- AnimateRunner.chain = noop;
- AnimateRunner.prototype = {
- end: noop,
- cancel: noop,
- resume: noop,
- pause: noop,
- complete: noop,
- then: function(pass, fail) {
- return $q(function(resolve) {
- $$rAF(function() {
- resolve();
- });
- }).then(pass, fail);
- }
- };
- return AnimateRunner;
- }];
-};
-
-// this is prefixed with Core since it conflicts with
-// the animateQueueProvider defined in ngAnimate/animateQueue.js
-var $$CoreAnimateQueueProvider = function() {
- var postDigestQueue = new HashMap();
- var postDigestElements = [];
-
- this.$get = ['$$AnimateRunner', '$rootScope',
- function($$AnimateRunner, $rootScope) {
- return {
- enabled: noop,
- on: noop,
- off: noop,
- pin: noop,
-
- push: function(element, event, options, domOperation) {
- domOperation && domOperation();
-
- options = options || {};
- options.from && element.css(options.from);
- options.to && element.css(options.to);
-
- if (options.addClass || options.removeClass) {
- addRemoveClassesPostDigest(element, options.addClass, options.removeClass);
- }
-
- return new $$AnimateRunner(); // jshint ignore:line
- }
- };
-
-
- function updateData(data, classes, value) {
- var changed = false;
- if (classes) {
- classes = isString(classes) ? classes.split(' ') :
- isArray(classes) ? classes : [];
- forEach(classes, function(className) {
- if (className) {
- changed = true;
- data[className] = value;
- }
- });
- }
- return changed;
- }
-
- function handleCSSClassChanges() {
- forEach(postDigestElements, function(element) {
- var data = postDigestQueue.get(element);
- if (data) {
- var existing = splitClasses(element.attr('class'));
- var toAdd = '';
- var toRemove = '';
- forEach(data, function(status, className) {
- var hasClass = !!existing[className];
- if (status !== hasClass) {
- if (status) {
- toAdd += (toAdd.length ? ' ' : '') + className;
- } else {
- toRemove += (toRemove.length ? ' ' : '') + className;
- }
- }
- });
-
- forEach(element, function(elm) {
- toAdd && jqLiteAddClass(elm, toAdd);
- toRemove && jqLiteRemoveClass(elm, toRemove);
- });
- postDigestQueue.remove(element);
- }
- });
- postDigestElements.length = 0;
- }
-
-
- function addRemoveClassesPostDigest(element, add, remove) {
- var data = postDigestQueue.get(element) || {};
-
- var classesAdded = updateData(data, add, true);
- var classesRemoved = updateData(data, remove, false);
-
- if (classesAdded || classesRemoved) {
-
- postDigestQueue.put(element, data);
- postDigestElements.push(element);
-
- if (postDigestElements.length === 1) {
- $rootScope.$$postDigest(handleCSSClassChanges);
- }
- }
- }
- }];
-};
-
-/**
- * @ngdoc provider
- * @name $animateProvider
- *
- * @description
- * Default implementation of $animate that doesn't perform any animations, instead just
- * synchronously performs DOM updates and resolves the returned runner promise.
- *
- * In order to enable animations the `ngAnimate` module has to be loaded.
- *
- * To see the functional implementation check out `src/ngAnimate/animate.js`.
- */
-var $AnimateProvider = ['$provide', function($provide) {
- var provider = this;
-
- this.$$registeredAnimations = Object.create(null);
-
- /**
- * @ngdoc method
- * @name $animateProvider#register
- *
- * @description
- * Registers a new injectable animation factory function. The factory function produces the
- * animation object which contains callback functions for each event that is expected to be
- * animated.
- *
- * * `eventFn`: `function(element, ... , doneFunction, options)`
- * The element to animate, the `doneFunction` and the options fed into the animation. Depending
- * on the type of animation additional arguments will be injected into the animation function. The
- * list below explains the function signatures for the different animation methods:
- *
- * - setClass: function(element, addedClasses, removedClasses, doneFunction, options)
- * - addClass: function(element, addedClasses, doneFunction, options)
- * - removeClass: function(element, removedClasses, doneFunction, options)
- * - enter, leave, move: function(element, doneFunction, options)
- * - animate: function(element, fromStyles, toStyles, doneFunction, options)
- *
- * Make sure to trigger the `doneFunction` once the animation is fully complete.
- *
- * ```js
- * return {
- * //enter, leave, move signature
- * eventFn : function(element, done, options) {
- * //code to run the animation
- * //once complete, then run done()
- * return function endFunction(wasCancelled) {
- * //code to cancel the animation
- * }
- * }
- * }
- * ```
- *
- * @param {string} name The name of the animation (this is what the class-based CSS value will be compared to).
- * @param {Function} factory The factory function that will be executed to return the animation
- * object.
- */
- this.register = function(name, factory) {
- if (name && name.charAt(0) !== '.') {
- throw $animateMinErr('notcsel', "Expecting class selector starting with '.' got '{0}'.", name);
- }
-
- var key = name + '-animation';
- provider.$$registeredAnimations[name.substr(1)] = key;
- $provide.factory(key, factory);
- };
-
- /**
- * @ngdoc method
- * @name $animateProvider#classNameFilter
- *
- * @description
- * Sets and/or returns the CSS class regular expression that is checked when performing
- * an animation. Upon bootstrap the classNameFilter value is not set at all and will
- * therefore enable $animate to attempt to perform an animation on any element that is triggered.
- * When setting the `classNameFilter` value, animations will only be performed on elements
- * that successfully match the filter expression. This in turn can boost performance
- * for low-powered devices as well as applications containing a lot of structural operations.
- * @param {RegExp=} expression The className expression which will be checked against all animations
- * @return {RegExp} The current CSS className expression value. If null then there is no expression value
- */
- this.classNameFilter = function(expression) {
- if (arguments.length === 1) {
- this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;
- if (this.$$classNameFilter) {
- var reservedRegex = new RegExp("(\\s+|\\/)" + NG_ANIMATE_CLASSNAME + "(\\s+|\\/)");
- if (reservedRegex.test(this.$$classNameFilter.toString())) {
- throw $animateMinErr('nongcls','$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', NG_ANIMATE_CLASSNAME);
-
- }
- }
- }
- return this.$$classNameFilter;
- };
-
- this.$get = ['$$animateQueue', function($$animateQueue) {
- function domInsert(element, parentElement, afterElement) {
- // if for some reason the previous element was removed
- // from the dom sometime before this code runs then let's
- // just stick to using the parent element as the anchor
- if (afterElement) {
- var afterNode = extractElementNode(afterElement);
- if (afterNode && !afterNode.parentNode && !afterNode.previousElementSibling) {
- afterElement = null;
- }
- }
- afterElement ? afterElement.after(element) : parentElement.prepend(element);
- }
-
- /**
- * @ngdoc service
- * @name $animate
- * @description The $animate service exposes a series of DOM utility methods that provide support
- * for animation hooks. The default behavior is the application of DOM operations, however,
- * when an animation is detected (and animations are enabled), $animate will do the heavy lifting
- * to ensure that animation runs with the triggered DOM operation.
- *
- * By default $animate doesn't trigger any animations. This is because the `ngAnimate` module isn't
- * included and only when it is active then the animation hooks that `$animate` triggers will be
- * functional. Once active then all structural `ng-` directives will trigger animations as they perform
- * their DOM-related operations (enter, leave and move). Other directives such as `ngClass`,
- * `ngShow`, `ngHide` and `ngMessages` also provide support for animations.
- *
- * It is recommended that the`$animate` service is always used when executing DOM-related procedures within directives.
- *
- * To learn more about enabling animation support, click here to visit the
- * {@link ngAnimate ngAnimate module page}.
- */
- return {
- // we don't call it directly since non-existant arguments may
- // be interpreted as null within the sub enabled function
-
- /**
- *
- * @ngdoc method
- * @name $animate#on
- * @kind function
- * @description Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...)
- * has fired on the given element or among any of its children. Once the listener is fired, the provided callback
- * is fired with the following params:
- *
- * ```js
- * $animate.on('enter', container,
- * function callback(element, phase) {
- * // cool we detected an enter animation within the container
- * }
- * );
- * ```
- *
- * @param {string} event the animation event that will be captured (e.g. enter, leave, move, addClass, removeClass, etc...)
- * @param {DOMElement} container the container element that will capture each of the animation events that are fired on itself
- * as well as among its children
- * @param {Function} callback the callback function that will be fired when the listener is triggered
- *
- * The arguments present in the callback function are:
- * * `element` - The captured DOM element that the animation was fired on.
- * * `phase` - The phase of the animation. The two possible phases are **start** (when the animation starts) and **close** (when it ends).
- */
- on: $$animateQueue.on,
-
- /**
- *
- * @ngdoc method
- * @name $animate#off
- * @kind function
- * @description Deregisters an event listener based on the event which has been associated with the provided element. This method
- * can be used in three different ways depending on the arguments:
- *
- * ```js
- * // remove all the animation event listeners listening for `enter`
- * $animate.off('enter');
- *
- * // remove all the animation event listeners listening for `enter` on the given element and its children
- * $animate.off('enter', container);
- *
- * // remove the event listener function provided by `listenerFn` that is set
- * // to listen for `enter` on the given `element` as well as its children
- * $animate.off('enter', container, callback);
- * ```
- *
- * @param {string} event the animation event (e.g. enter, leave, move, addClass, removeClass, etc...)
- * @param {DOMElement=} container the container element the event listener was placed on
- * @param {Function=} callback the callback function that was registered as the listener
- */
- off: $$animateQueue.off,
-
- /**
- * @ngdoc method
- * @name $animate#pin
- * @kind function
- * @description Associates the provided element with a host parent element to allow the element to be animated even if it exists
- * outside of the DOM structure of the Angular application. By doing so, any animation triggered via `$animate` can be issued on the
- * element despite being outside the realm of the application or within another application. Say for example if the application
- * was bootstrapped on an element that is somewhere inside of the `<body>` tag, but we wanted to allow for an element to be situated
- * as a direct child of `document.body`, then this can be achieved by pinning the element via `$animate.pin(element)`. Keep in mind
- * that calling `$animate.pin(element, parentElement)` will not actually insert into the DOM anywhere; it will just create the association.
- *
- * Note that this feature is only active when the `ngAnimate` module is used.
- *
- * @param {DOMElement} element the external element that will be pinned
- * @param {DOMElement} parentElement the host parent element that will be associated with the external element
- */
- pin: $$animateQueue.pin,
-
- /**
- *
- * @ngdoc method
- * @name $animate#enabled
- * @kind function
- * @description Used to get and set whether animations are enabled or not on the entire application or on an element and its children. This
- * function can be called in four ways:
- *
- * ```js
- * // returns true or false
- * $animate.enabled();
- *
- * // changes the enabled state for all animations
- * $animate.enabled(false);
- * $animate.enabled(true);
- *
- * // returns true or false if animations are enabled for an element
- * $animate.enabled(element);
- *
- * // changes the enabled state for an element and its children
- * $animate.enabled(element, true);
- * $animate.enabled(element, false);
- * ```
- *
- * @param {DOMElement=} element the element that will be considered for checking/setting the enabled state
- * @param {boolean=} enabled whether or not the animations will be enabled for the element
- *
- * @return {boolean} whether or not animations are enabled
- */
- enabled: $$animateQueue.enabled,
-
- /**
- * @ngdoc method
- * @name $animate#cancel
- * @kind function
- * @description Cancels the provided animation.
- *
- * @param {Promise} animationPromise The animation promise that is returned when an animation is started.
- */
- cancel: function(runner) {
- runner.end && runner.end();
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#enter
- * @kind function
- * @description Inserts the element into the DOM either after the `after` element (if provided) or
- * as the first child within the `parent` element and then triggers an animation.
- * A promise is returned that will be resolved during the next digest once the animation
- * has completed.
- *
- * @param {DOMElement} element the element which will be inserted into the DOM
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (so long as the after element is not present)
- * @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- enter: function(element, parent, after, options) {
- parent = parent && jqLite(parent);
- after = after && jqLite(after);
- parent = parent || after.parent();
- domInsert(element, parent, after);
- return $$animateQueue.push(element, 'enter', prepareAnimateOptions(options));
- },
-
- /**
- *
- * @ngdoc method
- * @name $animate#move
- * @kind function
- * @description Inserts (moves) the element into its new position in the DOM either after
- * the `after` element (if provided) or as the first child within the `parent` element
- * and then triggers an animation. A promise is returned that will be resolved
- * during the next digest once the animation has completed.
- *
- * @param {DOMElement} element the element which will be moved into the new DOM position
- * @param {DOMElement} parent the parent element which will append the element as
- * a child (so long as the after element is not present)
- * @param {DOMElement=} after the sibling element after which the element will be appended
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- move: function(element, parent, after, options) {
- parent = parent && jqLite(parent);
- after = after && jqLite(after);
- parent = parent || after.parent();
- domInsert(element, parent, after);
- return $$animateQueue.push(element, 'move', prepareAnimateOptions(options));
- },
-
- /**
- * @ngdoc method
- * @name $animate#leave
- * @kind function
- * @description Triggers an animation and then removes the element from the DOM.
- * When the function is called a promise is returned that will be resolved during the next
- * digest once the animation has completed.
- *
- * @param {DOMElement} element the element which will be removed from the DOM
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- leave: function(element, options) {
- return $$animateQueue.push(element, 'leave', prepareAnimateOptions(options), function() {
- element.remove();
- });
- },
-
- /**
- * @ngdoc method
- * @name $animate#addClass
- * @kind function
- *
- * @description Triggers an addClass animation surrounding the addition of the provided CSS class(es). Upon
- * execution, the addClass operation will only be handled after the next digest and it will not trigger an
- * animation if element already contains the CSS class or if the class is removed at a later step.
- * Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} className the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- addClass: function(element, className, options) {
- options = prepareAnimateOptions(options);
- options.addClass = mergeClasses(options.addclass, className);
- return $$animateQueue.push(element, 'addClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#removeClass
- * @kind function
- *
- * @description Triggers a removeClass animation surrounding the removal of the provided CSS class(es). Upon
- * execution, the removeClass operation will only be handled after the next digest and it will not trigger an
- * animation if element does not contain the CSS class or if the class is added at a later step.
- * Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} className the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- removeClass: function(element, className, options) {
- options = prepareAnimateOptions(options);
- options.removeClass = mergeClasses(options.removeClass, className);
- return $$animateQueue.push(element, 'removeClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#setClass
- * @kind function
- *
- * @description Performs both the addition and removal of a CSS classes on an element and (during the process)
- * triggers an animation surrounding the class addition/removal. Much like `$animate.addClass` and
- * `$animate.removeClass`, `setClass` will only evaluate the classes being added/removed once a digest has
- * passed. Note that class-based animations are treated differently compared to structural animations
- * (like enter, move and leave) since the CSS classes may be added/removed at different points
- * depending if CSS or JavaScript animations are used.
- *
- * @param {DOMElement} element the element which the CSS classes will be applied to
- * @param {string} add the CSS class(es) that will be added (multiple classes are separated via spaces)
- * @param {string} remove the CSS class(es) that will be removed (multiple classes are separated via spaces)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- setClass: function(element, add, remove, options) {
- options = prepareAnimateOptions(options);
- options.addClass = mergeClasses(options.addClass, add);
- options.removeClass = mergeClasses(options.removeClass, remove);
- return $$animateQueue.push(element, 'setClass', options);
- },
-
- /**
- * @ngdoc method
- * @name $animate#animate
- * @kind function
- *
- * @description Performs an inline animation on the element which applies the provided to and from CSS styles to the element.
- * If any detected CSS transition, keyframe or JavaScript matches the provided className value then the animation will take
- * on the provided styles. For example, if a transition animation is set for the given className then the provided from and
- * to styles will be applied alongside the given transition. If a JavaScript animation is detected then the provided styles
- * will be given in as function paramters into the `animate` method (or as apart of the `options` parameter).
- *
- * @param {DOMElement} element the element which the CSS styles will be applied to
- * @param {object} from the from (starting) CSS styles that will be applied to the element and across the animation.
- * @param {object} to the to (destination) CSS styles that will be applied to the element and across the animation.
- * @param {string=} className an optional CSS class that will be applied to the element for the duration of the animation. If
- * this value is left as empty then a CSS class of `ng-inline-animate` will be applied to the element.
- * (Note that if no animation is detected then this value will not be appplied to the element.)
- * @param {object=} options an optional collection of options/styles that will be applied to the element
- *
- * @return {Promise} the animation callback promise
- */
- animate: function(element, from, to, className, options) {
- options = prepareAnimateOptions(options);
- options.from = options.from ? extend(options.from, from) : from;
- options.to = options.to ? extend(options.to, to) : to;
-
- className = className || 'ng-inline-animate';
- options.tempClasses = mergeClasses(options.tempClasses, className);
- return $$animateQueue.push(element, 'animate', options);
- }
- };
- }];
-}];
-
-/**
- * @ngdoc service
- * @name $animateCss
- * @kind object
- *
- * @description
- * This is the core version of `$animateCss`. By default, only when the `ngAnimate` is included,
- * then the `$animateCss` service will actually perform animations.
- *
- * Click here {@link ngAnimate.$animateCss to read the documentation for $animateCss}.
- */
-var $CoreAnimateCssProvider = function() {
- this.$get = ['$$rAF', '$q', function($$rAF, $q) {
-
- var RAFPromise = function() {};
- RAFPromise.prototype = {
- done: function(cancel) {
- this.defer && this.defer[cancel === true ? 'reject' : 'resolve']();
- },
- end: function() {
- this.done();
- },
- cancel: function() {
- this.done(true);
- },
- getPromise: function() {
- if (!this.defer) {
- this.defer = $q.defer();
- }
- return this.defer.promise;
- },
- then: function(f1,f2) {
- return this.getPromise().then(f1,f2);
- },
- 'catch': function(f1) {
- return this.getPromise()['catch'](f1);
- },
- 'finally': function(f1) {
- return this.getPromise()['finally'](f1);
- }
- };
-
- return function(element, options) {
- // there is no point in applying the styles since
- // there is no animation that goes on at all in
- // this version of $animateCss.
- if (options.cleanupStyles) {
- options.from = options.to = null;
- }
-
- if (options.from) {
- element.css(options.from);
- options.from = null;
- }
-
- var closed, runner = new RAFPromise();
- return {
- start: run,
- end: run
- };
-
- function run() {
- $$rAF(function() {
- close();
- if (!closed) {
- runner.done();
- }
- closed = true;
- });
- return runner;
- }
-
- function close() {
- if (options.addClass) {
- element.addClass(options.addClass);
- options.addClass = null;
- }
- if (options.removeClass) {
- element.removeClass(options.removeClass);
- options.removeClass = null;
- }
- if (options.to) {
- element.css(options.to);
- options.to = null;
- }
- }
- };
- }];
-};
-
-/* global stripHash: true */
-
-/**
- * ! This is a private undocumented service !
- *
- * @name $browser
- * @requires $log
- * @description
- * This object has two goals:
- *
- * - hide all the global state in the browser caused by the window object
- * - abstract away all the browser specific features and inconsistencies
- *
- * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`
- * service, which can be used for convenient testing of the application without the interaction with
- * the real browser apis.
- */
-/**
- * @param {object} window The global window object.
- * @param {object} document jQuery wrapped document.
- * @param {object} $log window.console or an object with the same interface.
- * @param {object} $sniffer $sniffer service
- */
-function Browser(window, document, $log, $sniffer) {
- var self = this,
- rawDocument = document[0],
- location = window.location,
- history = window.history,
- setTimeout = window.setTimeout,
- clearTimeout = window.clearTimeout,
- pendingDeferIds = {};
-
- self.isMock = false;
-
- var outstandingRequestCount = 0;
- var outstandingRequestCallbacks = [];
-
- // TODO(vojta): remove this temporary api
- self.$$completeOutstandingRequest = completeOutstandingRequest;
- self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };
-
- /**
- * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`
- * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.
- */
- function completeOutstandingRequest(fn) {
- try {
- fn.apply(null, sliceArgs(arguments, 1));
- } finally {
- outstandingRequestCount--;
- if (outstandingRequestCount === 0) {
- while (outstandingRequestCallbacks.length) {
- try {
- outstandingRequestCallbacks.pop()();
- } catch (e) {
- $log.error(e);
- }
- }
- }
- }
- }
-
- function getHash(url) {
- var index = url.indexOf('#');
- return index === -1 ? '' : url.substr(index);
- }
-
- /**
- * @private
- * Note: this method is used only by scenario runner
- * TODO(vojta): prefix this method with $$ ?
- * @param {function()} callback Function that will be called when no outstanding request
- */
- self.notifyWhenNoOutstandingRequests = function(callback) {
- if (outstandingRequestCount === 0) {
- callback();
- } else {
- outstandingRequestCallbacks.push(callback);
- }
- };
-
- //////////////////////////////////////////////////////////////
- // URL API
- //////////////////////////////////////////////////////////////
-
- var cachedState, lastHistoryState,
- lastBrowserUrl = location.href,
- baseElement = document.find('base'),
- pendingLocation = null;
-
- cacheState();
- lastHistoryState = cachedState;
-
- /**
- * @name $browser#url
- *
- * @description
- * GETTER:
- * Without any argument, this method just returns current value of location.href.
- *
- * SETTER:
- * With at least one argument, this method sets url to new value.
- * If html5 history api supported, pushState/replaceState is used, otherwise
- * location.href/location.replace is used.
- * Returns its own instance to allow chaining
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to change url.
- *
- * @param {string} url New url (when used as setter)
- * @param {boolean=} replace Should new url replace current history record?
- * @param {object=} state object to use with pushState/replaceState
- */
- self.url = function(url, replace, state) {
- // In modern browsers `history.state` is `null` by default; treating it separately
- // from `undefined` would cause `$browser.url('/foo')` to change `history.state`
- // to undefined via `pushState`. Instead, let's change `undefined` to `null` here.
- if (isUndefined(state)) {
- state = null;
- }
-
- // Android Browser BFCache causes location, history reference to become stale.
- if (location !== window.location) location = window.location;
- if (history !== window.history) history = window.history;
-
- // setter
- if (url) {
- var sameState = lastHistoryState === state;
-
- // Don't change anything if previous and current URLs and states match. This also prevents
- // IE<10 from getting into redirect loop when in LocationHashbangInHtml5Url mode.
- // See https://github.com/angular/angular.js/commit/ffb2701
- if (lastBrowserUrl === url && (!$sniffer.history || sameState)) {
- return self;
- }
- var sameBase = lastBrowserUrl && stripHash(lastBrowserUrl) === stripHash(url);
- lastBrowserUrl = url;
- lastHistoryState = state;
- // Don't use history API if only the hash changed
- // due to a bug in IE10/IE11 which leads
- // to not firing a `hashchange` nor `popstate` event
- // in some cases (see #9143).
- if ($sniffer.history && (!sameBase || !sameState)) {
- history[replace ? 'replaceState' : 'pushState'](state, '', url);
- cacheState();
- // Do the assignment again so that those two variables are referentially identical.
- lastHistoryState = cachedState;
- } else {
- if (!sameBase || pendingLocation) {
- pendingLocation = url;
- }
- if (replace) {
- location.replace(url);
- } else if (!sameBase) {
- location.href = url;
- } else {
- location.hash = getHash(url);
- }
- if (location.href !== url) {
- pendingLocation = url;
- }
- }
- return self;
- // getter
- } else {
- // - pendingLocation is needed as browsers don't allow to read out
- // the new location.href if a reload happened or if there is a bug like in iOS 9 (see
- // https://openradar.appspot.com/22186109).
- // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172
- return pendingLocation || location.href.replace(/%27/g,"'");
- }
- };
-
- /**
- * @name $browser#state
- *
- * @description
- * This method is a getter.
- *
- * Return history.state or null if history.state is undefined.
- *
- * @returns {object} state
- */
- self.state = function() {
- return cachedState;
- };
-
- var urlChangeListeners = [],
- urlChangeInit = false;
-
- function cacheStateAndFireUrlChange() {
- pendingLocation = null;
- cacheState();
- fireUrlChange();
- }
-
- function getCurrentState() {
- try {
- return history.state;
- } catch (e) {
- // MSIE can reportedly throw when there is no state (UNCONFIRMED).
- }
- }
-
- // This variable should be used *only* inside the cacheState function.
- var lastCachedState = null;
- function cacheState() {
- // This should be the only place in $browser where `history.state` is read.
- cachedState = getCurrentState();
- cachedState = isUndefined(cachedState) ? null : cachedState;
-
- // Prevent callbacks fo fire twice if both hashchange & popstate were fired.
- if (equals(cachedState, lastCachedState)) {
- cachedState = lastCachedState;
- }
- lastCachedState = cachedState;
- }
-
- function fireUrlChange() {
- if (lastBrowserUrl === self.url() && lastHistoryState === cachedState) {
- return;
- }
-
- lastBrowserUrl = self.url();
- lastHistoryState = cachedState;
- forEach(urlChangeListeners, function(listener) {
- listener(self.url(), cachedState);
- });
- }
-
- /**
- * @name $browser#onUrlChange
- *
- * @description
- * Register callback function that will be called, when url changes.
- *
- * It's only called when the url is changed from outside of angular:
- * - user types different url into address bar
- * - user clicks on history (forward/back) button
- * - user clicks on a link
- *
- * It's not called when url is changed by $browser.url() method
- *
- * The listener gets called with new url as parameter.
- *
- * NOTE: this api is intended for use only by the $location service. Please use the
- * {@link ng.$location $location service} to monitor url changes in angular apps.
- *
- * @param {function(string)} listener Listener function to be called when url changes.
- * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.
- */
- self.onUrlChange = function(callback) {
- // TODO(vojta): refactor to use node's syntax for events
- if (!urlChangeInit) {
- // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)
- // don't fire popstate when user change the address bar and don't fire hashchange when url
- // changed by push/replaceState
-
- // html5 history api - popstate event
- if ($sniffer.history) jqLite(window).on('popstate', cacheStateAndFireUrlChange);
- // hashchange event
- jqLite(window).on('hashchange', cacheStateAndFireUrlChange);
-
- urlChangeInit = true;
- }
-
- urlChangeListeners.push(callback);
- return callback;
- };
-
- /**
- * @private
- * Remove popstate and hashchange handler from window.
- *
- * NOTE: this api is intended for use only by $rootScope.
- */
- self.$$applicationDestroyed = function() {
- jqLite(window).off('hashchange popstate', cacheStateAndFireUrlChange);
- };
-
- /**
- * Checks whether the url has changed outside of Angular.
- * Needs to be exported to be able to check for changes that have been done in sync,
- * as hashchange/popstate events fire in async.
- */
- self.$$checkUrlChange = fireUrlChange;
-
- //////////////////////////////////////////////////////////////
- // Misc API
- //////////////////////////////////////////////////////////////
-
- /**
- * @name $browser#baseHref
- *
- * @description
- * Returns current <base href>
- * (always relative - without domain)
- *
- * @returns {string} The current base href
- */
- self.baseHref = function() {
- var href = baseElement.attr('href');
- return href ? href.replace(/^(https?\:)?\/\/[^\/]*/, '') : '';
- };
-
- /**
- * @name $browser#defer
- * @param {function()} fn A function, who's execution should be deferred.
- * @param {number=} [delay=0] of milliseconds to defer the function execution.
- * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.
- *
- * @description
- * Executes a fn asynchronously via `setTimeout(fn, delay)`.
- *
- * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using
- * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed
- * via `$browser.defer.flush()`.
- *
- */
- self.defer = function(fn, delay) {
- var timeoutId;
- outstandingRequestCount++;
- timeoutId = setTimeout(function() {
- delete pendingDeferIds[timeoutId];
- completeOutstandingRequest(fn);
- }, delay || 0);
- pendingDeferIds[timeoutId] = true;
- return timeoutId;
- };
-
-
- /**
- * @name $browser#defer.cancel
- *
- * @description
- * Cancels a deferred task identified with `deferId`.
- *
- * @param {*} deferId Token returned by the `$browser.defer` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- self.defer.cancel = function(deferId) {
- if (pendingDeferIds[deferId]) {
- delete pendingDeferIds[deferId];
- clearTimeout(deferId);
- completeOutstandingRequest(noop);
- return true;
- }
- return false;
- };
-
-}
-
-function $BrowserProvider() {
- this.$get = ['$window', '$log', '$sniffer', '$document',
- function($window, $log, $sniffer, $document) {
- return new Browser($window, $document, $log, $sniffer);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $cacheFactory
- *
- * @description
- * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to
- * them.
- *
- * ```js
- *
- * var cache = $cacheFactory('cacheId');
- * expect($cacheFactory.get('cacheId')).toBe(cache);
- * expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();
- *
- * cache.put("key", "value");
- * cache.put("another key", "another value");
- *
- * // We've specified no options on creation
- * expect(cache.info()).toEqual({id: 'cacheId', size: 2});
- *
- * ```
- *
- *
- * @param {string} cacheId Name or id of the newly created cache.
- * @param {object=} options Options object that specifies the cache behavior. Properties:
- *
- * - `{number=}` `capacity` — turns the cache into LRU cache.
- *
- * @returns {object} Newly created cache object with the following set of methods:
- *
- * - `{object}` `info()` — Returns id, size, and options of cache.
- * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns
- * it.
- * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.
- * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.
- * - `{void}` `removeAll()` — Removes all cached values.
- * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.
- *
- * @example
- <example module="cacheExampleApp">
- <file name="index.html">
- <div ng-controller="CacheController">
- <input ng-model="newCacheKey" placeholder="Key">
- <input ng-model="newCacheValue" placeholder="Value">
- <button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
-
- <p ng-if="keys.length">Cached Values</p>
- <div ng-repeat="key in keys">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="cache.get(key)"></b>
- </div>
-
- <p>Cache Info</p>
- <div ng-repeat="(key, value) in cache.info()">
- <span ng-bind="key"></span>
- <span>: </span>
- <b ng-bind="value"></b>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cacheExampleApp', []).
- controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {
- $scope.keys = [];
- $scope.cache = $cacheFactory('cacheId');
- $scope.put = function(key, value) {
- if (angular.isUndefined($scope.cache.get(key))) {
- $scope.keys.push(key);
- }
- $scope.cache.put(key, angular.isUndefined(value) ? null : value);
- };
- }]);
- </file>
- <file name="style.css">
- p {
- margin: 10px 0 3px;
- }
- </file>
- </example>
- */
-function $CacheFactoryProvider() {
-
- this.$get = function() {
- var caches = {};
-
- function cacheFactory(cacheId, options) {
- if (cacheId in caches) {
- throw minErr('$cacheFactory')('iid', "CacheId '{0}' is already taken!", cacheId);
- }
-
- var size = 0,
- stats = extend({}, options, {id: cacheId}),
- data = createMap(),
- capacity = (options && options.capacity) || Number.MAX_VALUE,
- lruHash = createMap(),
- freshEnd = null,
- staleEnd = null;
-
- /**
- * @ngdoc type
- * @name $cacheFactory.Cache
- *
- * @description
- * A cache object used to store and retrieve data, primarily used by
- * {@link $http $http} and the {@link ng.directive:script script} directive to cache
- * templates and other data.
- *
- * ```js
- * angular.module('superCache')
- * .factory('superCache', ['$cacheFactory', function($cacheFactory) {
- * return $cacheFactory('super-cache');
- * }]);
- * ```
- *
- * Example test:
- *
- * ```js
- * it('should behave like a cache', inject(function(superCache) {
- * superCache.put('key', 'value');
- * superCache.put('another key', 'another value');
- *
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 2
- * });
- *
- * superCache.remove('another key');
- * expect(superCache.get('another key')).toBeUndefined();
- *
- * superCache.removeAll();
- * expect(superCache.info()).toEqual({
- * id: 'super-cache',
- * size: 0
- * });
- * }));
- * ```
- */
- return caches[cacheId] = {
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#put
- * @kind function
- *
- * @description
- * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be
- * retrieved later, and incrementing the size of the cache if the key was not already
- * present in the cache. If behaving like an LRU cache, it will also remove stale
- * entries from the set.
- *
- * It will not insert undefined values into the cache.
- *
- * @param {string} key the key under which the cached data is stored.
- * @param {*} value the value to store alongside the key. If it is undefined, the key
- * will not be stored.
- * @returns {*} the value stored.
- */
- put: function(key, value) {
- if (isUndefined(value)) return;
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key] || (lruHash[key] = {key: key});
-
- refresh(lruEntry);
- }
-
- if (!(key in data)) size++;
- data[key] = value;
-
- if (size > capacity) {
- this.remove(staleEnd.key);
- }
-
- return value;
- },
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#get
- * @kind function
- *
- * @description
- * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the data to be retrieved
- * @returns {*} the value stored.
- */
- get: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- refresh(lruEntry);
- }
-
- return data[key];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#remove
- * @kind function
- *
- * @description
- * Removes an entry from the {@link $cacheFactory.Cache Cache} object.
- *
- * @param {string} key the key of the entry to be removed
- */
- remove: function(key) {
- if (capacity < Number.MAX_VALUE) {
- var lruEntry = lruHash[key];
-
- if (!lruEntry) return;
-
- if (lruEntry == freshEnd) freshEnd = lruEntry.p;
- if (lruEntry == staleEnd) staleEnd = lruEntry.n;
- link(lruEntry.n,lruEntry.p);
-
- delete lruHash[key];
- }
-
- if (!(key in data)) return;
-
- delete data[key];
- size--;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#removeAll
- * @kind function
- *
- * @description
- * Clears the cache object of any entries.
- */
- removeAll: function() {
- data = createMap();
- size = 0;
- lruHash = createMap();
- freshEnd = staleEnd = null;
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#destroy
- * @kind function
- *
- * @description
- * Destroys the {@link $cacheFactory.Cache Cache} object entirely,
- * removing it from the {@link $cacheFactory $cacheFactory} set.
- */
- destroy: function() {
- data = null;
- stats = null;
- lruHash = null;
- delete caches[cacheId];
- },
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory.Cache#info
- * @kind function
- *
- * @description
- * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.
- *
- * @returns {object} an object with the following properties:
- * <ul>
- * <li>**id**: the id of the cache instance</li>
- * <li>**size**: the number of entries kept in the cache instance</li>
- * <li>**...**: any additional properties from the options object when creating the
- * cache.</li>
- * </ul>
- */
- info: function() {
- return extend({}, stats, {size: size});
- }
- };
-
-
- /**
- * makes the `entry` the freshEnd of the LRU linked list
- */
- function refresh(entry) {
- if (entry != freshEnd) {
- if (!staleEnd) {
- staleEnd = entry;
- } else if (staleEnd == entry) {
- staleEnd = entry.n;
- }
-
- link(entry.n, entry.p);
- link(entry, freshEnd);
- freshEnd = entry;
- freshEnd.n = null;
- }
- }
-
-
- /**
- * bidirectionally links two entries of the LRU linked list
- */
- function link(nextEntry, prevEntry) {
- if (nextEntry != prevEntry) {
- if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify
- if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#info
- *
- * @description
- * Get information about all the caches that have been created
- *
- * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`
- */
- cacheFactory.info = function() {
- var info = {};
- forEach(caches, function(cache, cacheId) {
- info[cacheId] = cache.info();
- });
- return info;
- };
-
-
- /**
- * @ngdoc method
- * @name $cacheFactory#get
- *
- * @description
- * Get access to a cache object by the `cacheId` used when it was created.
- *
- * @param {string} cacheId Name or id of a cache to access.
- * @returns {object} Cache object identified by the cacheId or undefined if no such cache.
- */
- cacheFactory.get = function(cacheId) {
- return caches[cacheId];
- };
-
-
- return cacheFactory;
- };
-}
-
-/**
- * @ngdoc service
- * @name $templateCache
- *
- * @description
- * The first time a template is used, it is loaded in the template cache for quick retrieval. You
- * can load templates directly into the cache in a `script` tag, or by consuming the
- * `$templateCache` service directly.
- *
- * Adding via the `script` tag:
- *
- * ```html
- * <script type="text/ng-template" id="templateId.html">
- * <p>This is the content of the template</p>
- * </script>
- * ```
- *
- * **Note:** the `script` tag containing the template does not need to be included in the `head` of
- * the document, but it must be a descendent of the {@link ng.$rootElement $rootElement} (IE,
- * element with ng-app attribute), otherwise the template will be ignored.
- *
- * Adding via the `$templateCache` service:
- *
- * ```js
- * var myApp = angular.module('myApp', []);
- * myApp.run(function($templateCache) {
- * $templateCache.put('templateId.html', 'This is the content of the template');
- * });
- * ```
- *
- * To retrieve the template later, simply use it in your HTML:
- * ```html
- * <div ng-include=" 'templateId.html' "></div>
- * ```
- *
- * or get it via Javascript:
- * ```js
- * $templateCache.get('templateId.html')
- * ```
- *
- * See {@link ng.$cacheFactory $cacheFactory}.
- *
- */
-function $TemplateCacheProvider() {
- this.$get = ['$cacheFactory', function($cacheFactory) {
- return $cacheFactory('templates');
- }];
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!
- *
- * DOM-related variables:
- *
- * - "node" - DOM Node
- * - "element" - DOM Element or Node
- * - "$node" or "$element" - jqLite-wrapped node or element
- *
- *
- * Compiler related stuff:
- *
- * - "linkFn" - linking fn of a single directive
- * - "nodeLinkFn" - function that aggregates all linking fns for a particular node
- * - "childLinkFn" - function that aggregates all linking fns for child nodes of a particular node
- * - "compositeLinkFn" - function that aggregates all linking fns for a compilation root (nodeList)
- */
-
-
-/**
- * @ngdoc service
- * @name $compile
- * @kind function
- *
- * @description
- * Compiles an HTML string or DOM into a template and produces a template function, which
- * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.
- *
- * The compilation is a process of walking the DOM tree and matching DOM elements to
- * {@link ng.$compileProvider#directive directives}.
- *
- * <div class="alert alert-warning">
- * **Note:** This document is an in-depth reference of all directive options.
- * For a gentle introduction to directives with examples of common use cases,
- * see the {@link guide/directive directive guide}.
- * </div>
- *
- * ## Comprehensive Directive API
- *
- * There are many different options for a directive.
- *
- * The difference resides in the return value of the factory function.
- * You can either return a "Directive Definition Object" (see below) that defines the directive properties,
- * or just the `postLink` function (all other properties will have the default values).
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's recommended to use the "directive definition object" form.
- * </div>
- *
- * Here's an example directive declared with a Directive Definition Object:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * priority: 0,
- * template: '<div></div>', // or // function(tElement, tAttrs) { ... },
- * // or
- * // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },
- * transclude: false,
- * restrict: 'A',
- * templateNamespace: 'html',
- * scope: false,
- * controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },
- * controllerAs: 'stringIdentifier',
- * bindToController: false,
- * require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],
- * compile: function compile(tElement, tAttrs, transclude) {
- * return {
- * pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * }
- * // or
- * // return function postLink( ... ) { ... }
- * },
- * // or
- * // link: {
- * // pre: function preLink(scope, iElement, iAttrs, controller) { ... },
- * // post: function postLink(scope, iElement, iAttrs, controller) { ... }
- * // }
- * // or
- * // link: function postLink( ... ) { ... }
- * };
- * return directiveDefinitionObject;
- * });
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** Any unspecified options will use the default value. You can see the default values below.
- * </div>
- *
- * Therefore the above can be simplified as:
- *
- * ```js
- * var myModule = angular.module(...);
- *
- * myModule.directive('directiveName', function factory(injectables) {
- * var directiveDefinitionObject = {
- * link: function postLink(scope, iElement, iAttrs) { ... }
- * };
- * return directiveDefinitionObject;
- * // or
- * // return function postLink(scope, iElement, iAttrs) { ... }
- * });
- * ```
- *
- *
- *
- * ### Directive Definition Object
- *
- * The directive definition object provides instructions to the {@link ng.$compile
- * compiler}. The attributes are:
- *
- * #### `multiElement`
- * When this property is set to true, the HTML compiler will collect DOM nodes between
- * nodes with the attributes `directive-name-start` and `directive-name-end`, and group them
- * together as the directive elements. It is recommended that this feature be used on directives
- * which are not strictly behavioural (such as {@link ngClick}), and which
- * do not manipulate or replace child nodes (such as {@link ngInclude}).
- *
- * #### `priority`
- * When there are multiple directives defined on a single DOM element, sometimes it
- * is necessary to specify the order in which the directives are applied. The `priority` is used
- * to sort the directives before their `compile` functions get called. Priority is defined as a
- * number. Directives with greater numerical `priority` are compiled first. Pre-link functions
- * are also run in priority order, but post-link functions are run in reverse order. The order
- * of directives with the same priority is undefined. The default priority is `0`.
- *
- * #### `terminal`
- * If set to true then the current `priority` will be the last set of directives
- * which will execute (any directives at the current priority will still execute
- * as the order of execution on same `priority` is undefined). Note that expressions
- * and other directives used in the directive's template will also be excluded from execution.
- *
- * #### `scope`
- * The scope property can be `true`, an object or a falsy value:
- *
- * * **falsy:** No scope will be created for the directive. The directive will use its parent's scope.
- *
- * * **`true`:** A new child scope that prototypically inherits from its parent will be created for
- * the directive's element. If multiple directives on the same element request a new scope,
- * only one new scope is created. The new scope rule does not apply for the root of the template
- * since the root of the template always gets a new scope.
- *
- * * **`{...}` (an object hash):** A new "isolate" scope is created for the directive's element. The
- * 'isolate' scope differs from normal scope in that it does not prototypically inherit from its parent
- * scope. This is useful when creating reusable components, which should not accidentally read or modify
- * data in the parent scope.
- *
- * The 'isolate' scope object hash defines a set of local scope properties derived from attributes on the
- * directive's element. These local properties are useful for aliasing values for templates. The keys in
- * the object hash map to the name of the property on the isolate scope; the values define how the property
- * is bound to the parent scope, via matching attributes on the directive's element:
- *
- * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is
- * always a string since DOM attributes are strings. If no `attr` name is specified then the
- * attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="hello {{name}}">` and widget definition
- * of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect
- * the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the
- * `localName` property on the widget scope. The `name` is read from the parent scope (not
- * component scope).
- *
- * * `=` or `=attr` - set up bi-directional binding between a local scope property and the
- * parent scope property of name defined via the value of the `attr` attribute. If no `attr`
- * name is specified then the attribute name is assumed to be the same as the local name.
- * Given `<widget my-attr="parentModel">` and widget definition of
- * `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the
- * value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected
- * in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent
- * scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You
- * can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional. If
- * you want to shallow watch for changes (i.e. $watchCollection instead of $watch) you can use
- * `=*` or `=*attr` (`=*?` or `=*?attr` if the property is optional).
- *
- * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.
- * If no `attr` name is specified then the attribute name is assumed to be the same as the
- * local name. Given `<widget my-attr="count = count + value">` and widget definition of
- * `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to
- * a function wrapper for the `count = count + value` expression. Often it's desirable to
- * pass data from the isolated scope via an expression to the parent scope, this can be
- * done by passing a map of local variable names and values into the expression wrapper fn.
- * For example, if the expression is `increment(amount)` then we can specify the amount value
- * by calling the `localFn` as `localFn({amount: 22})`.
- *
- * In general it's possible to apply more than one directive to one element, but there might be limitations
- * depending on the type of scope required by the directives. The following points will help explain these limitations.
- * For simplicity only two directives are taken into account, but it is also applicable for several directives:
- *
- * * **no scope** + **no scope** => Two directives which don't require their own scope will use their parent's scope
- * * **child scope** + **no scope** => Both directives will share one single child scope
- * * **child scope** + **child scope** => Both directives will share one single child scope
- * * **isolated scope** + **no scope** => The isolated directive will use it's own created isolated scope. The other directive will use
- * its parent's scope
- * * **isolated scope** + **child scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives cannot
- * be applied to the same element.
- * * **isolated scope** + **isolated scope** => **Won't work!** Only one scope can be related to one element. Therefore these directives
- * cannot be applied to the same element.
- *
- *
- * #### `bindToController`
- * When an isolate scope is used for a component (see above), and `controllerAs` is used, `bindToController: true` will
- * allow a component to have its properties bound to the controller, rather than to scope. When the controller
- * is instantiated, the initial values of the isolate scope bindings are already available.
- *
- * #### `controller`
- * Controller constructor function. The controller is instantiated before the
- * pre-linking phase and can be accessed by other directives (see
- * `require` attribute). This allows the directives to communicate with each other and augment
- * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:
- *
- * * `$scope` - Current scope associated with the element
- * * `$element` - Current element
- * * `$attrs` - Current attributes object for the element
- * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope:
- * `function([scope], cloneLinkingFn, futureParentElement)`.
- * * `scope`: optional argument to override the scope.
- * * `cloneLinkingFn`: optional argument to create clones of the original transcluded content.
- * * `futureParentElement`:
- * * defines the parent to which the `cloneLinkingFn` will add the cloned elements.
- * * default: `$element.parent()` resp. `$element` for `transclude:'element'` resp. `transclude:true`.
- * * only needed for transcludes that are allowed to contain non html elements (e.g. SVG elements)
- * and when the `cloneLinkinFn` is passed,
- * as those elements need to created and cloned in a special way when they are defined outside their
- * usual containers (e.g. like `<svg>`).
- * * See also the `directive.templateNamespace` property.
- *
- *
- * #### `require`
- * Require another directive and inject its controller as the fourth argument to the linking function. The
- * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the
- * injected argument will be an array in corresponding order. If no such directive can be
- * found, or if the directive does not have a controller, then an error is raised (unless no link function
- * is specified, in which case error checking is skipped). The name can be prefixed with:
- *
- * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.
- * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.
- * * `^` - Locate the required controller by searching the element and its parents. Throw an error if not found.
- * * `^^` - Locate the required controller by searching the element's parents. Throw an error if not found.
- * * `?^` - Attempt to locate the required controller by searching the element and its parents or pass
- * `null` to the `link` fn if not found.
- * * `?^^` - Attempt to locate the required controller by searching the element's parents, or pass
- * `null` to the `link` fn if not found.
- *
- *
- * #### `controllerAs`
- * Identifier name for a reference to the controller in the directive's scope.
- * This allows the controller to be referenced from the directive template. This is especially
- * useful when a directive is used as component, i.e. with an `isolate` scope. It's also possible
- * to use it in a directive without an `isolate` / `new` scope, but you need to be aware that the
- * `controllerAs` reference might overwrite a property that already exists on the parent scope.
- *
- *
- * #### `restrict`
- * String of subset of `EACM` which restricts the directive to a specific directive
- * declaration style. If omitted, the defaults (elements and attributes) are used.
- *
- * * `E` - Element name (default): `<my-directive></my-directive>`
- * * `A` - Attribute (default): `<div my-directive="exp"></div>`
- * * `C` - Class: `<div class="my-directive: exp;"></div>`
- * * `M` - Comment: `<!-- directive: my-directive exp -->`
- *
- *
- * #### `templateNamespace`
- * String representing the document type used by the markup in the template.
- * AngularJS needs this information as those elements need to be created and cloned
- * in a special way when they are defined outside their usual containers like `<svg>` and `<math>`.
- *
- * * `html` - All root nodes in the template are HTML. Root nodes may also be
- * top-level elements such as `<svg>` or `<math>`.
- * * `svg` - The root nodes in the template are SVG elements (excluding `<math>`).
- * * `math` - The root nodes in the template are MathML elements (excluding `<svg>`).
- *
- * If no `templateNamespace` is specified, then the namespace is considered to be `html`.
- *
- * #### `template`
- * HTML markup that may:
- * * Replace the contents of the directive's element (default).
- * * Replace the directive's element itself (if `replace` is true - DEPRECATED).
- * * Wrap the contents of the directive's element (if `transclude` is true).
- *
- * Value may be:
- *
- * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.
- * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`
- * function api below) and returns a string value.
- *
- *
- * #### `templateUrl`
- * This is similar to `template` but the template is loaded from the specified URL, asynchronously.
- *
- * Because template loading is asynchronous the compiler will suspend compilation of directives on that element
- * for later when the template has been resolved. In the meantime it will continue to compile and link
- * sibling and parent elements as though this element had not contained any directives.
- *
- * The compiler does not suspend the entire compilation to wait for templates to be loaded because this
- * would result in the whole app "stalling" until all templates are loaded asynchronously - even in the
- * case when only one deeply nested directive has `templateUrl`.
- *
- * Template loading is asynchronous even if the template has been preloaded into the {@link $templateCache}
- *
- * You can specify `templateUrl` as a string representing the URL or as a function which takes two
- * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns
- * a string value representing the url. In either case, the template URL is passed through {@link
- * $sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.
- *
- *
- * #### `replace` ([*DEPRECATED*!], will be removed in next major release - i.e. v2.0)
- * specify what the template should replace. Defaults to `false`.
- *
- * * `true` - the template will replace the directive's element.
- * * `false` - the template will replace the contents of the directive's element.
- *
- * The replacement process migrates all of the attributes / classes from the old element to the new
- * one. See the {@link guide/directive#template-expanding-directive
- * Directives Guide} for an example.
- *
- * There are very few scenarios where element replacement is required for the application function,
- * the main one being reusable custom components that are used within SVG contexts
- * (because SVG doesn't work with custom elements in the DOM tree).
- *
- * #### `transclude`
- * Extract the contents of the element where the directive appears and make it available to the directive.
- * The contents are compiled and provided to the directive as a **transclusion function**. See the
- * {@link $compile#transclusion Transclusion} section below.
- *
- * There are two kinds of transclusion depending upon whether you want to transclude just the contents of the
- * directive's element or the entire element:
- *
- * * `true` - transclude the content (i.e. the child nodes) of the directive's element.
- * * `'element'` - transclude the whole of the directive's element including any directives on this
- * element that defined at a lower priority than this directive. When used, the `template`
- * property is ignored.
- *
- *
- * #### `compile`
- *
- * ```js
- * function compile(tElement, tAttrs, transclude) { ... }
- * ```
- *
- * The compile function deals with transforming the template DOM. Since most directives do not do
- * template transformation, it is not used often. The compile function takes the following arguments:
- *
- * * `tElement` - template element - The element where the directive has been declared. It is
- * safe to do template transformation on the element and child elements only.
- *
- * * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared
- * between all directive compile functions.
- *
- * * `transclude` - [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`
- *
- * <div class="alert alert-warning">
- * **Note:** The template instance and the link instance may be different objects if the template has
- * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that
- * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration
- * should be done in a linking function rather than in a compile function.
- * </div>
-
- * <div class="alert alert-warning">
- * **Note:** The compile function cannot handle directives that recursively use themselves in their
- * own templates or compile functions. Compiling these directives results in an infinite loop and a
- * stack overflow errors.
- *
- * This can be avoided by manually using $compile in the postLink function to imperatively compile
- * a directive's template instead of relying on automatic template compilation via `template` or
- * `templateUrl` declaration or manual compilation inside the compile function.
- * </div>
- *
- * <div class="alert alert-danger">
- * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it
- * e.g. does not know about the right outer scope. Please use the transclude function that is passed
- * to the link function instead.
- * </div>
-
- * A compile function can have a return value which can be either a function or an object.
- *
- * * returning a (post-link) function - is equivalent to registering the linking function via the
- * `link` property of the config object when the compile function is empty.
- *
- * * returning an object with function(s) registered via `pre` and `post` properties - allows you to
- * control when a linking function should be called during the linking phase. See info about
- * pre-linking and post-linking functions below.
- *
- *
- * #### `link`
- * This property is used only if the `compile` property is not defined.
- *
- * ```js
- * function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }
- * ```
- *
- * The link function is responsible for registering DOM listeners as well as updating the DOM. It is
- * executed after the template has been cloned. This is where most of the directive logic will be
- * put.
- *
- * * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the
- * directive for registering {@link ng.$rootScope.Scope#$watch watches}.
- *
- * * `iElement` - instance element - The element where the directive is to be used. It is safe to
- * manipulate the children of the element only in `postLink` function since the children have
- * already been linked.
- *
- * * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared
- * between all directive linking functions.
- *
- * * `controller` - the directive's required controller instance(s) - Instances are shared
- * among all directives, which allows the directives to use the controllers as a communication
- * channel. The exact value depends on the directive's `require` property:
- * * no controller(s) required: the directive's own controller, or `undefined` if it doesn't have one
- * * `string`: the controller instance
- * * `array`: array of controller instances
- *
- * If a required controller cannot be found, and it is optional, the instance is `null`,
- * otherwise the {@link error:$compile:ctreq Missing Required Controller} error is thrown.
- *
- * Note that you can also require the directive's own controller - it will be made available like
- * any other controller.
- *
- * * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.
- * This is the same as the `$transclude`
- * parameter of directive controllers, see there for details.
- * `function([scope], cloneLinkingFn, futureParentElement)`.
- *
- * #### Pre-linking function
- *
- * Executed before the child elements are linked. Not safe to do DOM transformation since the
- * compiler linking function will fail to locate the correct elements for linking.
- *
- * #### Post-linking function
- *
- * Executed after the child elements are linked.
- *
- * Note that child elements that contain `templateUrl` directives will not have been compiled
- * and linked since they are waiting for their template to load asynchronously and their own
- * compilation and linking has been suspended until that occurs.
- *
- * It is safe to do DOM transformation in the post-linking function on elements that are not waiting
- * for their async templates to be resolved.
- *
- *
- * ### Transclusion
- *
- * Transclusion is the process of extracting a collection of DOM elements from one part of the DOM and
- * copying them to another part of the DOM, while maintaining their connection to the original AngularJS
- * scope from where they were taken.
- *
- * Transclusion is used (often with {@link ngTransclude}) to insert the
- * original contents of a directive's element into a specified place in the template of the directive.
- * The benefit of transclusion, over simply moving the DOM elements manually, is that the transcluded
- * content has access to the properties on the scope from which it was taken, even if the directive
- * has isolated scope.
- * See the {@link guide/directive#creating-a-directive-that-wraps-other-elements Directives Guide}.
- *
- * This makes it possible for the widget to have private state for its template, while the transcluded
- * content has access to its originating scope.
- *
- * <div class="alert alert-warning">
- * **Note:** When testing an element transclude directive you must not place the directive at the root of the
- * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives
- * Testing Transclusion Directives}.
- * </div>
- *
- * #### Transclusion Functions
- *
- * When a directive requests transclusion, the compiler extracts its contents and provides a **transclusion
- * function** to the directive's `link` function and `controller`. This transclusion function is a special
- * **linking function** that will return the compiled contents linked to a new transclusion scope.
- *
- * <div class="alert alert-info">
- * If you are just using {@link ngTransclude} then you don't need to worry about this function, since
- * ngTransclude will deal with it for us.
- * </div>
- *
- * If you want to manually control the insertion and removal of the transcluded content in your directive
- * then you must use this transclude function. When you call a transclude function it returns a a jqLite/JQuery
- * object that contains the compiled DOM, which is linked to the correct transclusion scope.
- *
- * When you call a transclusion function you can pass in a **clone attach function**. This function accepts
- * two parameters, `function(clone, scope) { ... }`, where the `clone` is a fresh compiled copy of your transcluded
- * content and the `scope` is the newly created transclusion scope, to which the clone is bound.
- *
- * <div class="alert alert-info">
- * **Best Practice**: Always provide a `cloneFn` (clone attach function) when you call a translude function
- * since you then get a fresh clone of the original DOM and also have access to the new transclusion scope.
- * </div>
- *
- * It is normal practice to attach your transcluded content (`clone`) to the DOM inside your **clone
- * attach function**:
- *
- * ```js
- * var transcludedContent, transclusionScope;
- *
- * $transclude(function(clone, scope) {
- * element.append(clone);
- * transcludedContent = clone;
- * transclusionScope = scope;
- * });
- * ```
- *
- * Later, if you want to remove the transcluded content from your DOM then you should also destroy the
- * associated transclusion scope:
- *
- * ```js
- * transcludedContent.remove();
- * transclusionScope.$destroy();
- * ```
- *
- * <div class="alert alert-info">
- * **Best Practice**: if you intend to add and remove transcluded content manually in your directive
- * (by calling the transclude function to get the DOM and calling `element.remove()` to remove it),
- * then you are also responsible for calling `$destroy` on the transclusion scope.
- * </div>
- *
- * The built-in DOM manipulation directives, such as {@link ngIf}, {@link ngSwitch} and {@link ngRepeat}
- * automatically destroy their transluded clones as necessary so you do not need to worry about this if
- * you are simply using {@link ngTransclude} to inject the transclusion into your directive.
- *
- *
- * #### Transclusion Scopes
- *
- * When you call a transclude function it returns a DOM fragment that is pre-bound to a **transclusion
- * scope**. This scope is special, in that it is a child of the directive's scope (and so gets destroyed
- * when the directive's scope gets destroyed) but it inherits the properties of the scope from which it
- * was taken.
- *
- * For example consider a directive that uses transclusion and isolated scope. The DOM hierarchy might look
- * like this:
- *
- * ```html
- * <div ng-app>
- * <div isolate>
- * <div transclusion>
- * </div>
- * </div>
- * </div>
- * ```
- *
- * The `$parent` scope hierarchy will look like this:
- *
- * ```
- * - $rootScope
- * - isolate
- * - transclusion
- * ```
- *
- * but the scopes will inherit prototypically from different scopes to their `$parent`.
- *
- * ```
- * - $rootScope
- * - transclusion
- * - isolate
- * ```
- *
- *
- * ### Attributes
- *
- * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the
- * `link()` or `compile()` functions. It has a variety of uses.
- *
- * accessing *Normalized attribute names:*
- * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.
- * the attributes object allows for normalized access to
- * the attributes.
- *
- * * *Directive inter-communication:* All directives share the same instance of the attributes
- * object which allows the directives to use the attributes object as inter directive
- * communication.
- *
- * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object
- * allowing other directives to read the interpolated value.
- *
- * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes
- * that contain interpolation (e.g. `src="{{bar}}"`). Not only is this very efficient but it's also
- * the only way to easily get the actual value because during the linking phase the interpolation
- * hasn't been evaluated yet and so the value is at this time set to `undefined`.
- *
- * ```js
- * function linkingFn(scope, elm, attrs, ctrl) {
- * // get the attribute value
- * console.log(attrs.ngModel);
- *
- * // change the attribute
- * attrs.$set('ngModel', 'new value');
- *
- * // observe changes to interpolated attribute
- * attrs.$observe('ngModel', function(value) {
- * console.log('ngModel has changed value to ' + value);
- * });
- * }
- * ```
- *
- * ## Example
- *
- * <div class="alert alert-warning">
- * **Note**: Typically directives are registered with `module.directive`. The example below is
- * to illustrate how `$compile` works.
- * </div>
- *
- <example module="compileExample">
- <file name="index.html">
- <script>
- angular.module('compileExample', [], function($compileProvider) {
- // configure new 'compile' directive by passing a directive
- // factory function. The factory function injects the '$compile'
- $compileProvider.directive('compile', function($compile) {
- // directive factory creates a link function
- return function(scope, element, attrs) {
- scope.$watch(
- function(scope) {
- // watch the 'compile' expression for changes
- return scope.$eval(attrs.compile);
- },
- function(value) {
- // when the 'compile' expression changes
- // assign it into the current DOM
- element.html(value);
-
- // compile the new DOM and link it to the current
- // scope.
- // NOTE: we only compile .childNodes so that
- // we don't get into infinite loop compiling ourselves
- $compile(element.contents())(scope);
- }
- );
- };
- });
- })
- .controller('GreeterController', ['$scope', function($scope) {
- $scope.name = 'Angular';
- $scope.html = 'Hello {{name}}';
- }]);
- </script>
- <div ng-controller="GreeterController">
- <input ng-model="name"> <br/>
- <textarea ng-model="html"></textarea> <br/>
- <div compile="html"></div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should auto compile', function() {
- var textarea = $('textarea');
- var output = $('div[compile]');
- // The initial state reads 'Hello Angular'.
- expect(output.getText()).toBe('Hello Angular');
- textarea.clear();
- textarea.sendKeys('{{name}}!');
- expect(output.getText()).toBe('Angular!');
- });
- </file>
- </example>
-
- *
- *
- * @param {string|DOMElement} element Element or HTML string to compile into a template function.
- * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives - DEPRECATED.
- *
- * <div class="alert alert-danger">
- * **Note:** Passing a `transclude` function to the $compile function is deprecated, as it
- * e.g. will not use the right outer scope. Please pass the transclude function as a
- * `parentBoundTranscludeFn` to the link function instead.
- * </div>
- *
- * @param {number} maxPriority only apply directives lower than given priority (Only effects the
- * root element(s), not their children)
- * @returns {function(scope, cloneAttachFn=, options=)} a link function which is used to bind template
- * (a DOM element/tree) to a scope. Where:
- *
- * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.
- * * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
- * `template` and call the `cloneAttachFn` function allowing the caller to attach the
- * cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
- * called as: <br/> `cloneAttachFn(clonedElement, scope)` where:
- *
- * * `clonedElement` - is a clone of the original `element` passed into the compiler.
- * * `scope` - is the current scope with which the linking function is working with.
- *
- * * `options` - An optional object hash with linking options. If `options` is provided, then the following
- * keys may be used to control linking behavior:
- *
- * * `parentBoundTranscludeFn` - the transclude function made available to
- * directives; if given, it will be passed through to the link functions of
- * directives found in `element` during compilation.
- * * `transcludeControllers` - an object hash with keys that map controller names
- * to controller instances; if given, it will make the controllers
- * available to directives.
- * * `futureParentElement` - defines the parent to which the `cloneAttachFn` will add
- * the cloned elements; only needed for transcludes that are allowed to contain non html
- * elements (e.g. SVG elements). See also the directive.controller property.
- *
- * Calling the linking function returns the element of the template. It is either the original
- * element passed in, or the clone of the element if the `cloneAttachFn` is provided.
- *
- * After linking the view is not updated until after a call to $digest which typically is done by
- * Angular automatically.
- *
- * If you need access to the bound view, there are two ways to do it:
- *
- * - If you are not asking the linking function to clone the template, create the DOM element(s)
- * before you send them to the compiler and keep this reference around.
- * ```js
- * var element = $compile('<p>{{total}}</p>')(scope);
- * ```
- *
- * - if on the other hand, you need the element to be cloned, the view reference from the original
- * example would not point to the clone, but rather to the original template that was cloned. In
- * this case, you can access the clone via the cloneAttachFn:
- * ```js
- * var templateElement = angular.element('<p>{{total}}</p>'),
- * scope = ....;
- *
- * var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {
- * //attach the clone to DOM document at the right place
- * });
- *
- * //now we have reference to the cloned DOM via `clonedElement`
- * ```
- *
- *
- * For information on how the compiler works, see the
- * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
- */
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc provider
- * @name $compileProvider
- *
- * @description
- */
-$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];
-function $CompileProvider($provide, $$sanitizeUriProvider) {
- var hasDirectives = {},
- Suffix = 'Directive',
- COMMENT_DIRECTIVE_REGEXP = /^\s*directive\:\s*([\w\-]+)\s+(.*)$/,
- CLASS_DIRECTIVE_REGEXP = /(([\w\-]+)(?:\:([^;]+))?;?)/,
- ALL_OR_NOTHING_ATTRS = makeMap('ngSrc,ngSrcset,src,srcset'),
- REQUIRE_PREFIX_REGEXP = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/;
-
- // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes
- // The assumption is that future DOM event attribute names will begin with
- // 'on' and be composed of only English letters.
- var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;
-
- function parseIsolateBindings(scope, directiveName, isController) {
- var LOCAL_REGEXP = /^\s*([@&]|=(\*?))(\??)\s*(\w*)\s*$/;
-
- var bindings = {};
-
- forEach(scope, function(definition, scopeName) {
- var match = definition.match(LOCAL_REGEXP);
-
- if (!match) {
- throw $compileMinErr('iscp',
- "Invalid {3} for directive '{0}'." +
- " Definition: {... {1}: '{2}' ...}",
- directiveName, scopeName, definition,
- (isController ? "controller bindings definition" :
- "isolate scope definition"));
- }
-
- bindings[scopeName] = {
- mode: match[1][0],
- collection: match[2] === '*',
- optional: match[3] === '?',
- attrName: match[4] || scopeName
- };
- });
-
- return bindings;
- }
-
- function parseDirectiveBindings(directive, directiveName) {
- var bindings = {
- isolateScope: null,
- bindToController: null
- };
- if (isObject(directive.scope)) {
- if (directive.bindToController === true) {
- bindings.bindToController = parseIsolateBindings(directive.scope,
- directiveName, true);
- bindings.isolateScope = {};
- } else {
- bindings.isolateScope = parseIsolateBindings(directive.scope,
- directiveName, false);
- }
- }
- if (isObject(directive.bindToController)) {
- bindings.bindToController =
- parseIsolateBindings(directive.bindToController, directiveName, true);
- }
- if (isObject(bindings.bindToController)) {
- var controller = directive.controller;
- var controllerAs = directive.controllerAs;
- if (!controller) {
- // There is no controller, there may or may not be a controllerAs property
- throw $compileMinErr('noctrl',
- "Cannot bind to controller without directive '{0}'s controller.",
- directiveName);
- } else if (!identifierForController(controller, controllerAs)) {
- // There is a controller, but no identifier or controllerAs property
- throw $compileMinErr('noident',
- "Cannot bind to controller without identifier for directive '{0}'.",
- directiveName);
- }
- }
- return bindings;
- }
-
- function assertValidDirectiveName(name) {
- var letter = name.charAt(0);
- if (!letter || letter !== lowercase(letter)) {
- throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name);
- }
- if (name !== name.trim()) {
- throw $compileMinErr('baddir',
- "Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces",
- name);
- }
- }
-
- /**
- * @ngdoc method
- * @name $compileProvider#directive
- * @kind function
- *
- * @description
- * Register a new directive with the compiler.
- *
- * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which
- * will match as <code>ng-bind</code>), or an object map of directives where the keys are the
- * names and the values are the factories.
- * @param {Function|Array} directiveFactory An injectable directive factory function. See
- * {@link guide/directive} for more info.
- * @returns {ng.$compileProvider} Self for chaining.
- */
- this.directive = function registerDirective(name, directiveFactory) {
- assertNotHasOwnProperty(name, 'directive');
- if (isString(name)) {
- assertValidDirectiveName(name);
- assertArg(directiveFactory, 'directiveFactory');
- if (!hasDirectives.hasOwnProperty(name)) {
- hasDirectives[name] = [];
- $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',
- function($injector, $exceptionHandler) {
- var directives = [];
- forEach(hasDirectives[name], function(directiveFactory, index) {
- try {
- var directive = $injector.invoke(directiveFactory);
- if (isFunction(directive)) {
- directive = { compile: valueFn(directive) };
- } else if (!directive.compile && directive.link) {
- directive.compile = valueFn(directive.link);
- }
- directive.priority = directive.priority || 0;
- directive.index = index;
- directive.name = directive.name || name;
- directive.require = directive.require || (directive.controller && directive.name);
- directive.restrict = directive.restrict || 'EA';
- var bindings = directive.$$bindings =
- parseDirectiveBindings(directive, directive.name);
- if (isObject(bindings.isolateScope)) {
- directive.$$isolateBindings = bindings.isolateScope;
- }
- directive.$$moduleName = directiveFactory.$$moduleName;
- directives.push(directive);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- return directives;
- }]);
- }
- hasDirectives[name].push(directiveFactory);
- } else {
- forEach(name, reverseParams(registerDirective));
- }
- return this;
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#aHrefSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at preventing XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.aHrefSanitizationWhitelist();
- }
- };
-
-
- /**
- * @ngdoc method
- * @name $compileProvider#imgSrcSanitizationWhitelist
- * @kind function
- *
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);
- return this;
- } else {
- return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();
- }
- };
-
- /**
- * @ngdoc method
- * @name $compileProvider#debugInfoEnabled
- *
- * @param {boolean=} enabled update the debugInfoEnabled state if provided, otherwise just return the
- * current debugInfoEnabled state
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- *
- * @kind function
- *
- * @description
- * Call this method to enable/disable various debug runtime information in the compiler such as adding
- * binding information and a reference to the current scope on to DOM elements.
- * If enabled, the compiler will add the following to DOM elements that have been bound to the scope
- * * `ng-binding` CSS class
- * * `$binding` data property containing an array of the binding expressions
- *
- * You may want to disable this in production for a significant performance boost. See
- * {@link guide/production#disabling-debug-data Disabling Debug Data} for more.
- *
- * The default value is true.
- */
- var debugInfoEnabled = true;
- this.debugInfoEnabled = function(enabled) {
- if (isDefined(enabled)) {
- debugInfoEnabled = enabled;
- return this;
- }
- return debugInfoEnabled;
- };
-
- this.$get = [
- '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse',
- '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',
- function($injector, $interpolate, $exceptionHandler, $templateRequest, $parse,
- $controller, $rootScope, $document, $sce, $animate, $$sanitizeUri) {
-
- var Attributes = function(element, attributesToCopy) {
- if (attributesToCopy) {
- var keys = Object.keys(attributesToCopy);
- var i, l, key;
-
- for (i = 0, l = keys.length; i < l; i++) {
- key = keys[i];
- this[key] = attributesToCopy[key];
- }
- } else {
- this.$attr = {};
- }
-
- this.$$element = element;
- };
-
- Attributes.prototype = {
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$normalize
- * @kind function
- *
- * @description
- * Converts an attribute name (e.g. dash/colon/underscore-delimited string, optionally prefixed with `x-` or
- * `data-`) to its normalized, camelCase form.
- *
- * Also there is special case for Moz prefix starting with upper case letter.
- *
- * For further information check out the guide on {@link guide/directive#matching-directives Matching Directives}
- *
- * @param {string} name Name to normalize
- */
- $normalize: directiveNormalize,
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$addClass
- * @kind function
- *
- * @description
- * Adds the CSS class value specified by the classVal parameter to the element. If animations
- * are enabled then an animation will be triggered for the class addition.
- *
- * @param {string} classVal The className value that will be added to the element
- */
- $addClass: function(classVal) {
- if (classVal && classVal.length > 0) {
- $animate.addClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$removeClass
- * @kind function
- *
- * @description
- * Removes the CSS class value specified by the classVal parameter from the element. If
- * animations are enabled then an animation will be triggered for the class removal.
- *
- * @param {string} classVal The className value that will be removed from the element
- */
- $removeClass: function(classVal) {
- if (classVal && classVal.length > 0) {
- $animate.removeClass(this.$$element, classVal);
- }
- },
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$updateClass
- * @kind function
- *
- * @description
- * Adds and removes the appropriate CSS class values to the element based on the difference
- * between the new and old CSS class values (specified as newClasses and oldClasses).
- *
- * @param {string} newClasses The current CSS className value
- * @param {string} oldClasses The former CSS className value
- */
- $updateClass: function(newClasses, oldClasses) {
- var toAdd = tokenDifference(newClasses, oldClasses);
- if (toAdd && toAdd.length) {
- $animate.addClass(this.$$element, toAdd);
- }
-
- var toRemove = tokenDifference(oldClasses, newClasses);
- if (toRemove && toRemove.length) {
- $animate.removeClass(this.$$element, toRemove);
- }
- },
-
- /**
- * Set a normalized attribute on the element in a way such that all directives
- * can share the attribute. This function properly handles boolean attributes.
- * @param {string} key Normalized key. (ie ngAttribute)
- * @param {string|boolean} value The value to set. If `null` attribute will be deleted.
- * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.
- * Defaults to true.
- * @param {string=} attrName Optional none normalized name. Defaults to key.
- */
- $set: function(key, value, writeAttr, attrName) {
- // TODO: decide whether or not to throw an error if "class"
- //is set through this function since it may cause $updateClass to
- //become unstable.
-
- var node = this.$$element[0],
- booleanKey = getBooleanAttrName(node, key),
- aliasedKey = getAliasedAttrName(key),
- observer = key,
- nodeName;
-
- if (booleanKey) {
- this.$$element.prop(key, value);
- attrName = booleanKey;
- } else if (aliasedKey) {
- this[aliasedKey] = value;
- observer = aliasedKey;
- }
-
- this[key] = value;
-
- // translate normalized key to actual key
- if (attrName) {
- this.$attr[key] = attrName;
- } else {
- attrName = this.$attr[key];
- if (!attrName) {
- this.$attr[key] = attrName = snake_case(key, '-');
- }
- }
-
- nodeName = nodeName_(this.$$element);
-
- if ((nodeName === 'a' && (key === 'href' || key === 'xlinkHref')) ||
- (nodeName === 'img' && key === 'src')) {
- // sanitize a[href] and img[src] values
- this[key] = value = $$sanitizeUri(value, key === 'src');
- } else if (nodeName === 'img' && key === 'srcset') {
- // sanitize img[srcset] values
- var result = "";
-
- // first check if there are spaces because it's not the same pattern
- var trimmedSrcset = trim(value);
- // ( 999x ,| 999w ,| ,|, )
- var srcPattern = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/;
- var pattern = /\s/.test(trimmedSrcset) ? srcPattern : /(,)/;
-
- // split srcset into tuple of uri and descriptor except for the last item
- var rawUris = trimmedSrcset.split(pattern);
-
- // for each tuples
- var nbrUrisWith2parts = Math.floor(rawUris.length / 2);
- for (var i = 0; i < nbrUrisWith2parts; i++) {
- var innerIdx = i * 2;
- // sanitize the uri
- result += $$sanitizeUri(trim(rawUris[innerIdx]), true);
- // add the descriptor
- result += (" " + trim(rawUris[innerIdx + 1]));
- }
-
- // split the last item into uri and descriptor
- var lastTuple = trim(rawUris[i * 2]).split(/\s/);
-
- // sanitize the last uri
- result += $$sanitizeUri(trim(lastTuple[0]), true);
-
- // and add the last descriptor if any
- if (lastTuple.length === 2) {
- result += (" " + trim(lastTuple[1]));
- }
- this[key] = value = result;
- }
-
- if (writeAttr !== false) {
- if (value === null || isUndefined(value)) {
- this.$$element.removeAttr(attrName);
- } else {
- this.$$element.attr(attrName, value);
- }
- }
-
- // fire observers
- var $$observers = this.$$observers;
- $$observers && forEach($$observers[observer], function(fn) {
- try {
- fn(value);
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @name $compile.directive.Attributes#$observe
- * @kind function
- *
- * @description
- * Observes an interpolated attribute.
- *
- * The observer function will be invoked once during the next `$digest` following
- * compilation. The observer is then invoked whenever the interpolated value
- * changes.
- *
- * @param {string} key Normalized key. (ie ngAttribute) .
- * @param {function(interpolatedValue)} fn Function that will be called whenever
- the interpolated value of the attribute changes.
- * See the {@link guide/directive#text-and-attribute-bindings Directives} guide for more info.
- * @returns {function()} Returns a deregistration function for this observer.
- */
- $observe: function(key, fn) {
- var attrs = this,
- $$observers = (attrs.$$observers || (attrs.$$observers = createMap())),
- listeners = ($$observers[key] || ($$observers[key] = []));
-
- listeners.push(fn);
- $rootScope.$evalAsync(function() {
- if (!listeners.$$inter && attrs.hasOwnProperty(key) && !isUndefined(attrs[key])) {
- // no one registered attribute interpolation function, so lets call it manually
- fn(attrs[key]);
- }
- });
-
- return function() {
- arrayRemove(listeners, fn);
- };
- }
- };
-
-
- function safeAddClass($element, className) {
- try {
- $element.addClass(className);
- } catch (e) {
- // ignore, since it means that we are trying to set class on
- // SVG element, where class name is read-only.
- }
- }
-
-
- var startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- denormalizeTemplate = (startSymbol == '{{' || endSymbol == '}}')
- ? identity
- : function denormalizeTemplate(template) {
- return template.replace(/\{\{/g, startSymbol).replace(/}}/g, endSymbol);
- },
- NG_ATTR_BINDING = /^ngAttr[A-Z]/;
- var MULTI_ELEMENT_DIR_RE = /^(.+)Start$/;
-
- compile.$$addBindingInfo = debugInfoEnabled ? function $$addBindingInfo($element, binding) {
- var bindings = $element.data('$binding') || [];
-
- if (isArray(binding)) {
- bindings = bindings.concat(binding);
- } else {
- bindings.push(binding);
- }
-
- $element.data('$binding', bindings);
- } : noop;
-
- compile.$$addBindingClass = debugInfoEnabled ? function $$addBindingClass($element) {
- safeAddClass($element, 'ng-binding');
- } : noop;
-
- compile.$$addScopeInfo = debugInfoEnabled ? function $$addScopeInfo($element, scope, isolated, noTemplate) {
- var dataName = isolated ? (noTemplate ? '$isolateScopeNoTemplate' : '$isolateScope') : '$scope';
- $element.data(dataName, scope);
- } : noop;
-
- compile.$$addScopeClass = debugInfoEnabled ? function $$addScopeClass($element, isolated) {
- safeAddClass($element, isolated ? 'ng-isolate-scope' : 'ng-scope');
- } : noop;
-
- return compile;
-
- //================================
-
- function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,
- previousCompileContext) {
- if (!($compileNodes instanceof jqLite)) {
- // jquery always rewraps, whereas we need to preserve the original selector so that we can
- // modify it.
- $compileNodes = jqLite($compileNodes);
- }
- // We can not compile top level text elements since text nodes can be merged and we will
- // not be able to attach scope data to them, so we will wrap them in <span>
- forEach($compileNodes, function(node, index) {
- if (node.nodeType == NODE_TYPE_TEXT && node.nodeValue.match(/\S+/) /* non-empty */) {
- $compileNodes[index] = jqLite(node).wrap('<span></span>').parent()[0];
- }
- });
- var compositeLinkFn =
- compileNodes($compileNodes, transcludeFn, $compileNodes,
- maxPriority, ignoreDirective, previousCompileContext);
- compile.$$addScopeClass($compileNodes);
- var namespace = null;
- return function publicLinkFn(scope, cloneConnectFn, options) {
- assertArg(scope, 'scope');
-
- if (previousCompileContext && previousCompileContext.needsNewScope) {
- // A parent directive did a replace and a directive on this element asked
- // for transclusion, which caused us to lose a layer of element on which
- // we could hold the new transclusion scope, so we will create it manually
- // here.
- scope = scope.$parent.$new();
- }
-
- options = options || {};
- var parentBoundTranscludeFn = options.parentBoundTranscludeFn,
- transcludeControllers = options.transcludeControllers,
- futureParentElement = options.futureParentElement;
-
- // When `parentBoundTranscludeFn` is passed, it is a
- // `controllersBoundTransclude` function (it was previously passed
- // as `transclude` to directive.link) so we must unwrap it to get
- // its `boundTranscludeFn`
- if (parentBoundTranscludeFn && parentBoundTranscludeFn.$$boundTransclude) {
- parentBoundTranscludeFn = parentBoundTranscludeFn.$$boundTransclude;
- }
-
- if (!namespace) {
- namespace = detectNamespaceForChildElements(futureParentElement);
- }
- var $linkNode;
- if (namespace !== 'html') {
- // When using a directive with replace:true and templateUrl the $compileNodes
- // (or a child element inside of them)
- // might change, so we need to recreate the namespace adapted compileNodes
- // for call to the link function.
- // Note: This will already clone the nodes...
- $linkNode = jqLite(
- wrapTemplate(namespace, jqLite('<div>').append($compileNodes).html())
- );
- } else if (cloneConnectFn) {
- // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart
- // and sometimes changes the structure of the DOM.
- $linkNode = JQLitePrototype.clone.call($compileNodes);
- } else {
- $linkNode = $compileNodes;
- }
-
- if (transcludeControllers) {
- for (var controllerName in transcludeControllers) {
- $linkNode.data('$' + controllerName + 'Controller', transcludeControllers[controllerName].instance);
- }
- }
-
- compile.$$addScopeInfo($linkNode, scope);
-
- if (cloneConnectFn) cloneConnectFn($linkNode, scope);
- if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);
- return $linkNode;
- };
- }
-
- function detectNamespaceForChildElements(parentElement) {
- // TODO: Make this detect MathML as well...
- var node = parentElement && parentElement[0];
- if (!node) {
- return 'html';
- } else {
- return nodeName_(node) !== 'foreignobject' && node.toString().match(/SVG/) ? 'svg' : 'html';
- }
- }
-
- /**
- * Compile function matches each node in nodeList against the directives. Once all directives
- * for a particular node are collected their compile functions are executed. The compile
- * functions return values - the linking functions - are combined into a composite linking
- * function, which is the a linking function for the node.
- *
- * @param {NodeList} nodeList an array of nodes or NodeList to compile
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new child of the transcluded parent scope.
- * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then
- * the rootElement must be set the jqLite collection of the compile root. This is
- * needed so that the jqLite collection items can be replaced with widgets.
- * @param {number=} maxPriority Max directive priority.
- * @returns {Function} A composite linking function of all of the matched directives or null.
- */
- function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,
- previousCompileContext) {
- var linkFns = [],
- attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound, nodeLinkFnFound;
-
- for (var i = 0; i < nodeList.length; i++) {
- attrs = new Attributes();
-
- // we must always refer to nodeList[i] since the nodes can be replaced underneath us.
- directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,
- ignoreDirective);
-
- nodeLinkFn = (directives.length)
- ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,
- null, [], [], previousCompileContext)
- : null;
-
- if (nodeLinkFn && nodeLinkFn.scope) {
- compile.$$addScopeClass(attrs.$$element);
- }
-
- childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||
- !(childNodes = nodeList[i].childNodes) ||
- !childNodes.length)
- ? null
- : compileNodes(childNodes,
- nodeLinkFn ? (
- (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)
- && nodeLinkFn.transclude) : transcludeFn);
-
- if (nodeLinkFn || childLinkFn) {
- linkFns.push(i, nodeLinkFn, childLinkFn);
- linkFnFound = true;
- nodeLinkFnFound = nodeLinkFnFound || nodeLinkFn;
- }
-
- //use the previous context only for the first element in the virtual group
- previousCompileContext = null;
- }
-
- // return a linking function if we have found anything, null otherwise
- return linkFnFound ? compositeLinkFn : null;
-
- function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {
- var nodeLinkFn, childLinkFn, node, childScope, i, ii, idx, childBoundTranscludeFn;
- var stableNodeList;
-
-
- if (nodeLinkFnFound) {
- // copy nodeList so that if a nodeLinkFn removes or adds an element at this DOM level our
- // offsets don't get screwed up
- var nodeListLength = nodeList.length;
- stableNodeList = new Array(nodeListLength);
-
- // create a sparse array by only copying the elements which have a linkFn
- for (i = 0; i < linkFns.length; i+=3) {
- idx = linkFns[i];
- stableNodeList[idx] = nodeList[idx];
- }
- } else {
- stableNodeList = nodeList;
- }
-
- for (i = 0, ii = linkFns.length; i < ii;) {
- node = stableNodeList[linkFns[i++]];
- nodeLinkFn = linkFns[i++];
- childLinkFn = linkFns[i++];
-
- if (nodeLinkFn) {
- if (nodeLinkFn.scope) {
- childScope = scope.$new();
- compile.$$addScopeInfo(jqLite(node), childScope);
- } else {
- childScope = scope;
- }
-
- if (nodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(
- scope, nodeLinkFn.transclude, parentBoundTranscludeFn);
-
- } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {
- childBoundTranscludeFn = parentBoundTranscludeFn;
-
- } else if (!parentBoundTranscludeFn && transcludeFn) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);
-
- } else {
- childBoundTranscludeFn = null;
- }
-
- nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);
-
- } else if (childLinkFn) {
- childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);
- }
- }
- }
- }
-
- function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {
-
- var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) {
-
- if (!transcludedScope) {
- transcludedScope = scope.$new(false, containingScope);
- transcludedScope.$$transcluded = true;
- }
-
- return transcludeFn(transcludedScope, cloneFn, {
- parentBoundTranscludeFn: previousBoundTranscludeFn,
- transcludeControllers: controllers,
- futureParentElement: futureParentElement
- });
- };
-
- // We need to attach the transclusion slots onto the `boundTranscludeFn`
- // so that they are available inside the `controllersBoundTransclude` function
- var boundSlots = boundTranscludeFn.$$slots = createMap();
- for (var slotName in transcludeFn.$$slots) {
- boundSlots[slotName] = createBoundTranscludeFn(scope, transcludeFn.$$slots[slotName], previousBoundTranscludeFn);
- }
-
- return boundTranscludeFn;
- }
-
- /**
- * Looks for directives on the given node and adds them to the directive collection which is
- * sorted.
- *
- * @param node Node to search.
- * @param directives An array to which the directives are added to. This array is sorted before
- * the function returns.
- * @param attrs The shared attrs object which is used to populate the normalized attributes.
- * @param {number=} maxPriority Max directive priority.
- */
- function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {
- var nodeType = node.nodeType,
- attrsMap = attrs.$attr,
- match,
- className;
-
- switch (nodeType) {
- case NODE_TYPE_ELEMENT: /* Element */
- // use the node name: <directive>
- addDirective(directives,
- directiveNormalize(nodeName_(node)), 'E', maxPriority, ignoreDirective);
-
- // iterate over the attributes
- for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,
- j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {
- var attrStartName = false;
- var attrEndName = false;
-
- attr = nAttrs[j];
- name = attr.name;
- value = trim(attr.value);
-
- // support ngAttr attribute binding
- ngAttrName = directiveNormalize(name);
- if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {
- name = name.replace(PREFIX_REGEXP, '')
- .substr(8).replace(/_(.)/g, function(match, letter) {
- return letter.toUpperCase();
- });
- }
-
- var multiElementMatch = ngAttrName.match(MULTI_ELEMENT_DIR_RE);
- if (multiElementMatch && directiveIsMultiElement(multiElementMatch[1])) {
- attrStartName = name;
- attrEndName = name.substr(0, name.length - 5) + 'end';
- name = name.substr(0, name.length - 6);
- }
-
- nName = directiveNormalize(name.toLowerCase());
- attrsMap[nName] = name;
- if (isNgAttr || !attrs.hasOwnProperty(nName)) {
- attrs[nName] = value;
- if (getBooleanAttrName(node, nName)) {
- attrs[nName] = true; // presence means true
- }
- }
- addAttrInterpolateDirective(node, directives, value, nName, isNgAttr);
- addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,
- attrEndName);
- }
-
- // use class as directive
- className = node.className;
- if (isObject(className)) {
- // Maybe SVGAnimatedString
- className = className.animVal;
- }
- if (isString(className) && className !== '') {
- while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {
- nName = directiveNormalize(match[2]);
- if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[3]);
- }
- className = className.substr(match.index + match[0].length);
- }
- }
- break;
- case NODE_TYPE_TEXT: /* Text Node */
- if (msie === 11) {
- // Workaround for #11781
- while (node.parentNode && node.nextSibling && node.nextSibling.nodeType === NODE_TYPE_TEXT) {
- node.nodeValue = node.nodeValue + node.nextSibling.nodeValue;
- node.parentNode.removeChild(node.nextSibling);
- }
- }
- addTextInterpolateDirective(directives, node.nodeValue);
- break;
- case NODE_TYPE_COMMENT: /* Comment */
- try {
- match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);
- if (match) {
- nName = directiveNormalize(match[1]);
- if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {
- attrs[nName] = trim(match[2]);
- }
- }
- } catch (e) {
- // turns out that under some circumstances IE9 throws errors when one attempts to read
- // comment's node value.
- // Just ignore it and continue. (Can't seem to reproduce in test case.)
- }
- break;
- }
-
- directives.sort(byPriority);
- return directives;
- }
-
- /**
- * Given a node with an directive-start it collects all of the siblings until it finds
- * directive-end.
- * @param node
- * @param attrStart
- * @param attrEnd
- * @returns {*}
- */
- function groupScan(node, attrStart, attrEnd) {
- var nodes = [];
- var depth = 0;
- if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {
- do {
- if (!node) {
- throw $compileMinErr('uterdir',
- "Unterminated attribute, found '{0}' but no matching '{1}' found.",
- attrStart, attrEnd);
- }
- if (node.nodeType == NODE_TYPE_ELEMENT) {
- if (node.hasAttribute(attrStart)) depth++;
- if (node.hasAttribute(attrEnd)) depth--;
- }
- nodes.push(node);
- node = node.nextSibling;
- } while (depth > 0);
- } else {
- nodes.push(node);
- }
-
- return jqLite(nodes);
- }
-
- /**
- * Wrapper for linking function which converts normal linking function into a grouped
- * linking function.
- * @param linkFn
- * @param attrStart
- * @param attrEnd
- * @returns {Function}
- */
- function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {
- return function(scope, element, attrs, controllers, transcludeFn) {
- element = groupScan(element[0], attrStart, attrEnd);
- return linkFn(scope, element, attrs, controllers, transcludeFn);
- };
- }
-
- /**
- * A function generator that is used to support both eager and lazy compilation
- * linking function.
- * @param eager
- * @param $compileNodes
- * @param transcludeFn
- * @param maxPriority
- * @param ignoreDirective
- * @param previousCompileContext
- * @returns {Function}
- */
- function compilationGenerator(eager, $compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext) {
- if (eager) {
- return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
- }
-
- var compiled;
-
- return function() {
- if (!compiled) {
- compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext);
-
- // Null out all of these references in order to make them eligible for garbage collection
- // since this is a potentially long lived closure
- $compileNodes = transcludeFn = previousCompileContext = null;
- }
-
- return compiled.apply(this, arguments);
- };
- }
-
- /**
- * Once the directives have been collected, their compile functions are executed. This method
- * is responsible for inlining directive templates as well as terminating the application
- * of the directives if the terminal directive has been reached.
- *
- * @param {Array} directives Array of collected directives to execute their compile function.
- * this needs to be pre-sorted by priority order.
- * @param {Node} compileNode The raw DOM node to apply the compile functions to
- * @param {Object} templateAttrs The shared attribute function
- * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the
- * scope argument is auto-generated to the new
- * child of the transcluded parent scope.
- * @param {JQLite} jqCollection If we are working on the root of the compile tree then this
- * argument has the root jqLite array so that we can replace nodes
- * on it.
- * @param {Object=} originalReplaceDirective An optional directive that will be ignored when
- * compiling the transclusion.
- * @param {Array.<Function>} preLinkFns
- * @param {Array.<Function>} postLinkFns
- * @param {Object} previousCompileContext Context used for previous compilation of the current
- * node
- * @returns {Function} linkFn
- */
- function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,
- jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,
- previousCompileContext) {
- previousCompileContext = previousCompileContext || {};
-
- var terminalPriority = -Number.MAX_VALUE,
- newScopeDirective = previousCompileContext.newScopeDirective,
- controllerDirectives = previousCompileContext.controllerDirectives,
- newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,
- templateDirective = previousCompileContext.templateDirective,
- nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,
- hasTranscludeDirective = false,
- hasTemplate = false,
- hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,
- $compileNode = templateAttrs.$$element = jqLite(compileNode),
- directive,
- directiveName,
- $template,
- replaceDirective = originalReplaceDirective,
- childTranscludeFn = transcludeFn,
- linkFn,
- didScanForMultipleTransclusion = false,
- mightHaveMultipleTransclusionError = false,
- directiveValue;
-
- // executes all directives on the current element
- for (var i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- var attrStart = directive.$$start;
- var attrEnd = directive.$$end;
-
- // collect multiblock sections
- if (attrStart) {
- $compileNode = groupScan(compileNode, attrStart, attrEnd);
- }
- $template = undefined;
-
- if (terminalPriority > directive.priority) {
- break; // prevent further processing of directives
- }
-
- if (directiveValue = directive.scope) {
-
- // skip the check for directives with async templates, we'll check the derived sync
- // directive when the template arrives
- if (!directive.templateUrl) {
- if (isObject(directiveValue)) {
- // This directive is trying to add an isolated scope.
- // Check that there is no scope of any kind already
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective || newScopeDirective,
- directive, $compileNode);
- newIsolateScopeDirective = directive;
- } else {
- // This directive is trying to add a child scope.
- // Check that there is no isolated scope already
- assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,
- $compileNode);
- }
- }
-
- newScopeDirective = newScopeDirective || directive;
- }
-
- directiveName = directive.name;
-
- // If we encounter a condition that can result in transclusion on the directive,
- // then scan ahead in the remaining directives for others that may cause a multiple
- // transclusion error to be thrown during the compilation process. If a matching directive
- // is found, then we know that when we encounter a transcluded directive, we need to eagerly
- // compile the `transclude` function rather than doing it lazily in order to throw
- // exceptions at the correct time
- if (!didScanForMultipleTransclusion && ((directive.replace && (directive.templateUrl || directive.template))
- || (directive.transclude && !directive.$$tlb))) {
- var candidateDirective;
-
- for (var scanningIndex = i + 1; candidateDirective = directives[scanningIndex++];) {
- if ((candidateDirective.transclude && !candidateDirective.$$tlb)
- || (candidateDirective.replace && (candidateDirective.templateUrl || candidateDirective.template))) {
- mightHaveMultipleTransclusionError = true;
- break;
- }
- }
-
- didScanForMultipleTransclusion = true;
- }
-
- if (!directive.templateUrl && directive.controller) {
- directiveValue = directive.controller;
- controllerDirectives = controllerDirectives || createMap();
- assertNoDuplicate("'" + directiveName + "' controller",
- controllerDirectives[directiveName], directive, $compileNode);
- controllerDirectives[directiveName] = directive;
- }
-
- if (directiveValue = directive.transclude) {
- hasTranscludeDirective = true;
-
- // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.
- // This option should only be used by directives that know how to safely handle element transclusion,
- // where the transcluded nodes are added or replaced after linking.
- if (!directive.$$tlb) {
- assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);
- nonTlbTranscludeDirective = directive;
- }
-
- if (directiveValue == 'element') {
- hasElementTranscludeDirective = true;
- terminalPriority = directive.priority;
- $template = $compileNode;
- $compileNode = templateAttrs.$$element =
- jqLite(document.createComment(' ' + directiveName + ': ' +
- templateAttrs[directiveName] + ' '));
- compileNode = $compileNode[0];
- replaceWith(jqCollection, sliceArgs($template), compileNode);
-
- childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority,
- replaceDirective && replaceDirective.name, {
- // Don't pass in:
- // - controllerDirectives - otherwise we'll create duplicates controllers
- // - newIsolateScopeDirective or templateDirective - combining templates with
- // element transclusion doesn't make sense.
- //
- // We need only nonTlbTranscludeDirective so that we prevent putting transclusion
- // on the same element more than once.
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- } else {
-
- var slots = createMap();
- $template = jqLite(jqLiteClone(compileNode)).contents();
-
- if (isObject(directiveValue)) {
-
- // We have transclusion slots - collect them up and compile them and store their
- // transclusion functions
- $template = [];
- var slotNames = createMap();
- var filledSlots = createMap();
-
- // Parse the slot names: if they start with a ? then they are optional
- forEach(directiveValue, function(slotName, key) {
- var optional = (slotName.charAt(0) === '?');
- slotName = optional ? slotName.substring(1) : slotName;
- slotNames[key] = slotName;
- slots[slotName] = [];
- // filledSlots contains `true` for all slots that are either optional or have been
- // filled. This is used to check that we have not missed any required slots
- filledSlots[slotName] = optional;
- });
-
- // Add the matching elements into their slot
- forEach($compileNode.children(), function(node) {
- var slotName = slotNames[directiveNormalize(nodeName_(node))];
- if (slotName) {
- filledSlots[slotName] = true;
- slots[slotName].push(node);
- } else {
- $template.push(node);
- }
- });
-
- // Check for required slots that were not filled
- forEach(filledSlots, function(filled, slotName) {
- if (!filled) {
- throw $compileMinErr('reqslot', 'Required transclusion slot `{0}` was not filled.', slotName);
- }
- });
-
- forEach(Object.keys(slots), function(slotName) {
- slots[slotName] = compilationGenerator(mightHaveMultipleTransclusionError, slots[slotName], transcludeFn);
- });
- }
-
- $compileNode.empty(); // clear contents
- childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, undefined,
- undefined, { needsNewScope: directive.$$isolateScope || directive.$$newScope});
- childTranscludeFn.$$slots = slots;
- }
- }
-
- if (directive.template) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- directiveValue = (isFunction(directive.template))
- ? directive.template($compileNode, templateAttrs)
- : directive.template;
-
- directiveValue = denormalizeTemplate(directiveValue);
-
- if (directive.replace) {
- replaceDirective = directive;
- if (jqLiteIsTextNode(directiveValue)) {
- $template = [];
- } else {
- $template = removeComments(wrapTemplate(directive.templateNamespace, trim(directiveValue)));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- directiveName, '');
- }
-
- replaceWith(jqCollection, $compileNode, compileNode);
-
- var newTemplateAttrs = {$attr: {}};
-
- // combine directives from the original node and from the template:
- // - take the array of directives for this element
- // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)
- // - collect directives from the template and sort them by priority
- // - combine directives as: processed + template + unprocessed
- var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);
- var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));
-
- if (newIsolateScopeDirective || newScopeDirective) {
- // The original directive caused the current element to be replaced but this element
- // also needs to have a new scope, so we need to tell the template directives
- // that they would need to get their scope from further up, if they require transclusion
- markDirectiveScope(templateDirectives, newIsolateScopeDirective, newScopeDirective);
- }
- directives = directives.concat(templateDirectives).concat(unprocessedDirectives);
- mergeTemplateAttributes(templateAttrs, newTemplateAttrs);
-
- ii = directives.length;
- } else {
- $compileNode.html(directiveValue);
- }
- }
-
- if (directive.templateUrl) {
- hasTemplate = true;
- assertNoDuplicate('template', templateDirective, directive, $compileNode);
- templateDirective = directive;
-
- if (directive.replace) {
- replaceDirective = directive;
- }
-
- nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,
- templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {
- controllerDirectives: controllerDirectives,
- newScopeDirective: (newScopeDirective !== directive) && newScopeDirective,
- newIsolateScopeDirective: newIsolateScopeDirective,
- templateDirective: templateDirective,
- nonTlbTranscludeDirective: nonTlbTranscludeDirective
- });
- ii = directives.length;
- } else if (directive.compile) {
- try {
- linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);
- if (isFunction(linkFn)) {
- addLinkFns(null, linkFn, attrStart, attrEnd);
- } else if (linkFn) {
- addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);
- }
- } catch (e) {
- $exceptionHandler(e, startingTag($compileNode));
- }
- }
-
- if (directive.terminal) {
- nodeLinkFn.terminal = true;
- terminalPriority = Math.max(terminalPriority, directive.priority);
- }
-
- }
-
- nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;
- nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;
- nodeLinkFn.templateOnThisElement = hasTemplate;
- nodeLinkFn.transclude = childTranscludeFn;
-
- previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;
-
- // might be normal or delayed nodeLinkFn depending on if templateUrl is present
- return nodeLinkFn;
-
- ////////////////////
-
- function addLinkFns(pre, post, attrStart, attrEnd) {
- if (pre) {
- if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);
- pre.require = directive.require;
- pre.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- pre = cloneAndAnnotateFn(pre, {isolateScope: true});
- }
- preLinkFns.push(pre);
- }
- if (post) {
- if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);
- post.require = directive.require;
- post.directiveName = directiveName;
- if (newIsolateScopeDirective === directive || directive.$$isolateScope) {
- post = cloneAndAnnotateFn(post, {isolateScope: true});
- }
- postLinkFns.push(post);
- }
- }
-
-
- function getControllers(directiveName, require, $element, elementControllers) {
- var value;
-
- if (isString(require)) {
- var match = require.match(REQUIRE_PREFIX_REGEXP);
- var name = require.substring(match[0].length);
- var inheritType = match[1] || match[3];
- var optional = match[2] === '?';
-
- //If only parents then start at the parent element
- if (inheritType === '^^') {
- $element = $element.parent();
- //Otherwise attempt getting the controller from elementControllers in case
- //the element is transcluded (and has no data) and to avoid .data if possible
- } else {
- value = elementControllers && elementControllers[name];
- value = value && value.instance;
- }
-
- if (!value) {
- var dataName = '$' + name + 'Controller';
- value = inheritType ? $element.inheritedData(dataName) : $element.data(dataName);
- }
-
- if (!value && !optional) {
- throw $compileMinErr('ctreq',
- "Controller '{0}', required by directive '{1}', can't be found!",
- name, directiveName);
- }
- } else if (isArray(require)) {
- value = [];
- for (var i = 0, ii = require.length; i < ii; i++) {
- value[i] = getControllers(directiveName, require[i], $element, elementControllers);
- }
- }
-
- return value || null;
- }
-
- function setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope) {
- var elementControllers = createMap();
- for (var controllerKey in controllerDirectives) {
- var directive = controllerDirectives[controllerKey];
- var locals = {
- $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,
- $element: $element,
- $attrs: attrs,
- $transclude: transcludeFn
- };
-
- var controller = directive.controller;
- if (controller == '@') {
- controller = attrs[directive.name];
- }
-
- var controllerInstance = $controller(controller, locals, true, directive.controllerAs);
-
- // For directives with element transclusion the element is a comment,
- // but jQuery .data doesn't support attaching data to comment nodes as it's hard to
- // clean up (http://bugs.jquery.com/ticket/8335).
- // Instead, we save the controllers for the element in a local hash and attach to .data
- // later, once we have the actual element.
- elementControllers[directive.name] = controllerInstance;
- if (!hasElementTranscludeDirective) {
- $element.data('$' + directive.name + 'Controller', controllerInstance.instance);
- }
- }
- return elementControllers;
- }
-
- function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {
- var linkFn, isolateScope, controllerScope, elementControllers, transcludeFn, $element,
- attrs, removeScopeBindingWatches, removeControllerBindingWatches;
-
- if (compileNode === linkNode) {
- attrs = templateAttrs;
- $element = templateAttrs.$$element;
- } else {
- $element = jqLite(linkNode);
- attrs = new Attributes($element, templateAttrs);
- }
-
- controllerScope = scope;
- if (newIsolateScopeDirective) {
- isolateScope = scope.$new(true);
- } else if (newScopeDirective) {
- controllerScope = scope.$parent;
- }
-
- if (boundTranscludeFn) {
- // track `boundTranscludeFn` so it can be unwrapped if `transcludeFn`
- // is later passed as `parentBoundTranscludeFn` to `publicLinkFn`
- transcludeFn = controllersBoundTransclude;
- transcludeFn.$$boundTransclude = boundTranscludeFn;
- }
-
- if (controllerDirectives) {
- elementControllers = setupControllers($element, attrs, transcludeFn, controllerDirectives, isolateScope, scope);
- }
-
- if (newIsolateScopeDirective) {
- // Initialize isolate scope bindings for new isolate scope directive.
- compile.$$addScopeInfo($element, isolateScope, true, !(templateDirective && (templateDirective === newIsolateScopeDirective ||
- templateDirective === newIsolateScopeDirective.$$originalDirective)));
- compile.$$addScopeClass($element, true);
- isolateScope.$$isolateBindings =
- newIsolateScopeDirective.$$isolateBindings;
- removeScopeBindingWatches = initializeDirectiveBindings(scope, attrs, isolateScope,
- isolateScope.$$isolateBindings,
- newIsolateScopeDirective);
- if (removeScopeBindingWatches) {
- isolateScope.$on('$destroy', removeScopeBindingWatches);
- }
- }
-
- // Initialize bindToController bindings
- for (var name in elementControllers) {
- var controllerDirective = controllerDirectives[name];
- var controller = elementControllers[name];
- var bindings = controllerDirective.$$bindings.bindToController;
-
- if (controller.identifier && bindings) {
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
- }
-
- var controllerResult = controller();
- if (controllerResult !== controller.instance) {
- // If the controller constructor has a return value, overwrite the instance
- // from setupControllers
- controller.instance = controllerResult;
- $element.data('$' + controllerDirective.name + 'Controller', controllerResult);
- removeControllerBindingWatches && removeControllerBindingWatches();
- removeControllerBindingWatches =
- initializeDirectiveBindings(controllerScope, attrs, controller.instance, bindings, controllerDirective);
- }
- }
-
- // PRELINKING
- for (i = 0, ii = preLinkFns.length; i < ii; i++) {
- linkFn = preLinkFns[i];
- invokeLinkFn(linkFn,
- linkFn.isolateScope ? isolateScope : scope,
- $element,
- attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),
- transcludeFn
- );
- }
-
- // RECURSION
- // We only pass the isolate scope, if the isolate directive has a template,
- // otherwise the child elements do not belong to the isolate directive.
- var scopeToChild = scope;
- if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {
- scopeToChild = isolateScope;
- }
- childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);
-
- // POSTLINKING
- for (i = postLinkFns.length - 1; i >= 0; i--) {
- linkFn = postLinkFns[i];
- invokeLinkFn(linkFn,
- linkFn.isolateScope ? isolateScope : scope,
- $element,
- attrs,
- linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers),
- transcludeFn
- );
- }
-
- // This is the function that is injected as `$transclude`.
- // Note: all arguments are optional!
- function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) {
- var transcludeControllers;
- // No scope passed in:
- if (!isScope(scope)) {
- slotName = futureParentElement;
- futureParentElement = cloneAttachFn;
- cloneAttachFn = scope;
- scope = undefined;
- }
-
- if (hasElementTranscludeDirective) {
- transcludeControllers = elementControllers;
- }
- if (!futureParentElement) {
- futureParentElement = hasElementTranscludeDirective ? $element.parent() : $element;
- }
- if (slotName) {
- var slotTranscludeFn = boundTranscludeFn.$$slots[slotName];
- if (!slotTranscludeFn) {
- throw $compileMinErr('noslot',
- 'No parent directive that requires a transclusion with slot name "{0}". ' +
- 'Element: {1}',
- slotName, startingTag($element));
- }
- return slotTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
- }
- return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers, futureParentElement, scopeToChild);
- }
- }
- }
-
- // Depending upon the context in which a directive finds itself it might need to have a new isolated
- // or child scope created. For instance:
- // * if the directive has been pulled into a template because another directive with a higher priority
- // asked for element transclusion
- // * if the directive itself asks for transclusion but it is at the root of a template and the original
- // element was replaced. See https://github.com/angular/angular.js/issues/12936
- function markDirectiveScope(directives, isolateScope, newScope) {
- for (var j = 0, jj = directives.length; j < jj; j++) {
- directives[j] = inherit(directives[j], {$$isolateScope: isolateScope, $$newScope: newScope});
- }
- }
-
- /**
- * looks up the directive and decorates it with exception handling and proper parameters. We
- * call this the boundDirective.
- *
- * @param {string} name name of the directive to look up.
- * @param {string} location The directive must be found in specific format.
- * String containing any of theses characters:
- *
- * * `E`: element name
- * * `A': attribute
- * * `C`: class
- * * `M`: comment
- * @returns {boolean} true if directive was added.
- */
- function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,
- endAttrName) {
- if (name === ignoreDirective) return null;
- var match = null;
- if (hasDirectives.hasOwnProperty(name)) {
- for (var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i < ii; i++) {
- try {
- directive = directives[i];
- if ((isUndefined(maxPriority) || maxPriority > directive.priority) &&
- directive.restrict.indexOf(location) != -1) {
- if (startAttrName) {
- directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});
- }
- tDirectives.push(directive);
- match = directive;
- }
- } catch (e) { $exceptionHandler(e); }
- }
- }
- return match;
- }
-
-
- /**
- * looks up the directive and returns true if it is a multi-element directive,
- * and therefore requires DOM nodes between -start and -end markers to be grouped
- * together.
- *
- * @param {string} name name of the directive to look up.
- * @returns true if directive was registered as multi-element.
- */
- function directiveIsMultiElement(name) {
- if (hasDirectives.hasOwnProperty(name)) {
- for (var directive, directives = $injector.get(name + Suffix),
- i = 0, ii = directives.length; i < ii; i++) {
- directive = directives[i];
- if (directive.multiElement) {
- return true;
- }
- }
- }
- return false;
- }
-
- /**
- * When the element is replaced with HTML template then the new attributes
- * on the template need to be merged with the existing attributes in the DOM.
- * The desired effect is to have both of the attributes present.
- *
- * @param {object} dst destination attributes (original DOM)
- * @param {object} src source attributes (from the directive template)
- */
- function mergeTemplateAttributes(dst, src) {
- var srcAttr = src.$attr,
- dstAttr = dst.$attr,
- $element = dst.$$element;
-
- // reapply the old attributes to the new element
- forEach(dst, function(value, key) {
- if (key.charAt(0) != '$') {
- if (src[key] && src[key] !== value) {
- value += (key === 'style' ? ';' : ' ') + src[key];
- }
- dst.$set(key, value, true, srcAttr[key]);
- }
- });
-
- // copy the new attributes on the old attrs object
- forEach(src, function(value, key) {
- if (key == 'class') {
- safeAddClass($element, value);
- dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;
- } else if (key == 'style') {
- $element.attr('style', $element.attr('style') + ';' + value);
- dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;
- // `dst` will never contain hasOwnProperty as DOM parser won't let it.
- // You will get an "InvalidCharacterError: DOM Exception 5" error if you
- // have an attribute like "has-own-property" or "data-has-own-property", etc.
- } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {
- dst[key] = value;
- dstAttr[key] = srcAttr[key];
- }
- });
- }
-
-
- function compileTemplateUrl(directives, $compileNode, tAttrs,
- $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {
- var linkQueue = [],
- afterTemplateNodeLinkFn,
- afterTemplateChildLinkFn,
- beforeTemplateCompileNode = $compileNode[0],
- origAsyncDirective = directives.shift(),
- derivedSyncDirective = inherit(origAsyncDirective, {
- templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective
- }),
- templateUrl = (isFunction(origAsyncDirective.templateUrl))
- ? origAsyncDirective.templateUrl($compileNode, tAttrs)
- : origAsyncDirective.templateUrl,
- templateNamespace = origAsyncDirective.templateNamespace;
-
- $compileNode.empty();
-
- $templateRequest(templateUrl)
- .then(function(content) {
- var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;
-
- content = denormalizeTemplate(content);
-
- if (origAsyncDirective.replace) {
- if (jqLiteIsTextNode(content)) {
- $template = [];
- } else {
- $template = removeComments(wrapTemplate(templateNamespace, trim(content)));
- }
- compileNode = $template[0];
-
- if ($template.length != 1 || compileNode.nodeType !== NODE_TYPE_ELEMENT) {
- throw $compileMinErr('tplrt',
- "Template for directive '{0}' must have exactly one root element. {1}",
- origAsyncDirective.name, templateUrl);
- }
-
- tempTemplateAttrs = {$attr: {}};
- replaceWith($rootElement, $compileNode, compileNode);
- var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);
-
- if (isObject(origAsyncDirective.scope)) {
- // the original directive that caused the template to be loaded async required
- // an isolate scope
- markDirectiveScope(templateDirectives, true);
- }
- directives = templateDirectives.concat(directives);
- mergeTemplateAttributes(tAttrs, tempTemplateAttrs);
- } else {
- compileNode = beforeTemplateCompileNode;
- $compileNode.html(content);
- }
-
- directives.unshift(derivedSyncDirective);
-
- afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,
- childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,
- previousCompileContext);
- forEach($rootElement, function(node, i) {
- if (node == compileNode) {
- $rootElement[i] = $compileNode[0];
- }
- });
- afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);
-
- while (linkQueue.length) {
- var scope = linkQueue.shift(),
- beforeTemplateLinkNode = linkQueue.shift(),
- linkRootElement = linkQueue.shift(),
- boundTranscludeFn = linkQueue.shift(),
- linkNode = $compileNode[0];
-
- if (scope.$$destroyed) continue;
-
- if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {
- var oldClasses = beforeTemplateLinkNode.className;
-
- if (!(previousCompileContext.hasElementTranscludeDirective &&
- origAsyncDirective.replace)) {
- // it was cloned therefore we have to clone as well.
- linkNode = jqLiteClone(compileNode);
- }
- replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);
-
- // Copy in CSS classes from original node
- safeAddClass(jqLite(linkNode), oldClasses);
- }
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- } else {
- childBoundTranscludeFn = boundTranscludeFn;
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,
- childBoundTranscludeFn);
- }
- linkQueue = null;
- });
-
- return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {
- var childBoundTranscludeFn = boundTranscludeFn;
- if (scope.$$destroyed) return;
- if (linkQueue) {
- linkQueue.push(scope,
- node,
- rootElement,
- childBoundTranscludeFn);
- } else {
- if (afterTemplateNodeLinkFn.transcludeOnThisElement) {
- childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);
- }
- afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);
- }
- };
- }
-
-
- /**
- * Sorting function for bound directives.
- */
- function byPriority(a, b) {
- var diff = b.priority - a.priority;
- if (diff !== 0) return diff;
- if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;
- return a.index - b.index;
- }
-
- function assertNoDuplicate(what, previousDirective, directive, element) {
-
- function wrapModuleNameIfDefined(moduleName) {
- return moduleName ?
- (' (module: ' + moduleName + ')') :
- '';
- }
-
- if (previousDirective) {
- throw $compileMinErr('multidir', 'Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}',
- previousDirective.name, wrapModuleNameIfDefined(previousDirective.$$moduleName),
- directive.name, wrapModuleNameIfDefined(directive.$$moduleName), what, startingTag(element));
- }
- }
-
-
- function addTextInterpolateDirective(directives, text) {
- var interpolateFn = $interpolate(text, true);
- if (interpolateFn) {
- directives.push({
- priority: 0,
- compile: function textInterpolateCompileFn(templateNode) {
- var templateNodeParent = templateNode.parent(),
- hasCompileParent = !!templateNodeParent.length;
-
- // When transcluding a template that has bindings in the root
- // we don't have a parent and thus need to add the class during linking fn.
- if (hasCompileParent) compile.$$addBindingClass(templateNodeParent);
-
- return function textInterpolateLinkFn(scope, node) {
- var parent = node.parent();
- if (!hasCompileParent) compile.$$addBindingClass(parent);
- compile.$$addBindingInfo(parent, interpolateFn.expressions);
- scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {
- node[0].nodeValue = value;
- });
- };
- }
- });
- }
- }
-
-
- function wrapTemplate(type, template) {
- type = lowercase(type || 'html');
- switch (type) {
- case 'svg':
- case 'math':
- var wrapper = document.createElement('div');
- wrapper.innerHTML = '<' + type + '>' + template + '</' + type + '>';
- return wrapper.childNodes[0].childNodes;
- default:
- return template;
- }
- }
-
-
- function getTrustedContext(node, attrNormalizedName) {
- if (attrNormalizedName == "srcdoc") {
- return $sce.HTML;
- }
- var tag = nodeName_(node);
- // maction[xlink:href] can source SVG. It's not limited to <maction>.
- if (attrNormalizedName == "xlinkHref" ||
- (tag == "form" && attrNormalizedName == "action") ||
- (tag != "img" && (attrNormalizedName == "src" ||
- attrNormalizedName == "ngSrc"))) {
- return $sce.RESOURCE_URL;
- }
- }
-
-
- function addAttrInterpolateDirective(node, directives, value, name, allOrNothing) {
- var trustedContext = getTrustedContext(node, name);
- allOrNothing = ALL_OR_NOTHING_ATTRS[name] || allOrNothing;
-
- var interpolateFn = $interpolate(value, true, trustedContext, allOrNothing);
-
- // no interpolation found -> ignore
- if (!interpolateFn) return;
-
-
- if (name === "multiple" && nodeName_(node) === "select") {
- throw $compileMinErr("selmulti",
- "Binding to the 'multiple' attribute is not supported. Element: {0}",
- startingTag(node));
- }
-
- directives.push({
- priority: 100,
- compile: function() {
- return {
- pre: function attrInterpolatePreLinkFn(scope, element, attr) {
- var $$observers = (attr.$$observers || (attr.$$observers = createMap()));
-
- if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {
- throw $compileMinErr('nodomevents',
- "Interpolations for HTML DOM event attributes are disallowed. Please use the " +
- "ng- versions (such as ng-click instead of onclick) instead.");
- }
-
- // If the attribute has changed since last $interpolate()ed
- var newValue = attr[name];
- if (newValue !== value) {
- // we need to interpolate again since the attribute value has been updated
- // (e.g. by another directive's compile function)
- // ensure unset/empty values make interpolateFn falsy
- interpolateFn = newValue && $interpolate(newValue, true, trustedContext, allOrNothing);
- value = newValue;
- }
-
- // if attribute was updated so that there is no interpolation going on we don't want to
- // register any observers
- if (!interpolateFn) return;
-
- // initialize attr object so that it's ready in case we need the value for isolate
- // scope initialization, otherwise the value would not be available from isolate
- // directive's linking fn during linking phase
- attr[name] = interpolateFn(scope);
-
- ($$observers[name] || ($$observers[name] = [])).$$inter = true;
- (attr.$$observers && attr.$$observers[name].$$scope || scope).
- $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {
- //special case for class attribute addition + removal
- //so that class changes can tap into the animation
- //hooks provided by the $animate service. Be sure to
- //skip animations when the first digest occurs (when
- //both the new and the old values are the same) since
- //the CSS classes are the non-interpolated values
- if (name === 'class' && newValue != oldValue) {
- attr.$updateClass(newValue, oldValue);
- } else {
- attr.$set(name, newValue);
- }
- });
- }
- };
- }
- });
- }
-
-
- /**
- * This is a special jqLite.replaceWith, which can replace items which
- * have no parents, provided that the containing jqLite collection is provided.
- *
- * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes
- * in the root of the tree.
- * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep
- * the shell, but replace its DOM node reference.
- * @param {Node} newNode The new DOM node.
- */
- function replaceWith($rootElement, elementsToRemove, newNode) {
- var firstElementToRemove = elementsToRemove[0],
- removeCount = elementsToRemove.length,
- parent = firstElementToRemove.parentNode,
- i, ii;
-
- if ($rootElement) {
- for (i = 0, ii = $rootElement.length; i < ii; i++) {
- if ($rootElement[i] == firstElementToRemove) {
- $rootElement[i++] = newNode;
- for (var j = i, j2 = j + removeCount - 1,
- jj = $rootElement.length;
- j < jj; j++, j2++) {
- if (j2 < jj) {
- $rootElement[j] = $rootElement[j2];
- } else {
- delete $rootElement[j];
- }
- }
- $rootElement.length -= removeCount - 1;
-
- // If the replaced element is also the jQuery .context then replace it
- // .context is a deprecated jQuery api, so we should set it only when jQuery set it
- // http://api.jquery.com/context/
- if ($rootElement.context === firstElementToRemove) {
- $rootElement.context = newNode;
- }
- break;
- }
- }
- }
-
- if (parent) {
- parent.replaceChild(newNode, firstElementToRemove);
- }
-
- // Append all the `elementsToRemove` to a fragment. This will...
- // - remove them from the DOM
- // - allow them to still be traversed with .nextSibling
- // - allow a single fragment.qSA to fetch all elements being removed
- var fragment = document.createDocumentFragment();
- for (i = 0; i < removeCount; i++) {
- fragment.appendChild(elementsToRemove[i]);
- }
-
- if (jqLite.hasData(firstElementToRemove)) {
- // Copy over user data (that includes Angular's $scope etc.). Don't copy private
- // data here because there's no public interface in jQuery to do that and copying over
- // event listeners (which is the main use of private data) wouldn't work anyway.
- jqLite.data(newNode, jqLite.data(firstElementToRemove));
-
- // Remove $destroy event listeners from `firstElementToRemove`
- jqLite(firstElementToRemove).off('$destroy');
- }
-
- // Cleanup any data/listeners on the elements and children.
- // This includes invoking the $destroy event on any elements with listeners.
- jqLite.cleanData(fragment.querySelectorAll('*'));
-
- // Update the jqLite collection to only contain the `newNode`
- for (i = 1; i < removeCount; i++) {
- delete elementsToRemove[i];
- }
- elementsToRemove[0] = newNode;
- elementsToRemove.length = 1;
- }
-
-
- function cloneAndAnnotateFn(fn, annotation) {
- return extend(function() { return fn.apply(null, arguments); }, fn, annotation);
- }
-
-
- function invokeLinkFn(linkFn, scope, $element, attrs, controllers, transcludeFn) {
- try {
- linkFn(scope, $element, attrs, controllers, transcludeFn);
- } catch (e) {
- $exceptionHandler(e, startingTag($element));
- }
- }
-
-
- // Set up $watches for isolate scope and controller bindings. This process
- // only occurs for isolate scopes and new scopes with controllerAs.
- function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) {
- var removeWatchCollection = [];
- forEach(bindings, function(definition, scopeName) {
- var attrName = definition.attrName,
- optional = definition.optional,
- mode = definition.mode, // @, =, or &
- lastValue,
- parentGet, parentSet, compare;
-
- switch (mode) {
-
- case '@':
- if (!optional && !hasOwnProperty.call(attrs, attrName)) {
- destination[scopeName] = attrs[attrName] = void 0;
- }
- attrs.$observe(attrName, function(value) {
- if (isString(value)) {
- destination[scopeName] = value;
- }
- });
- attrs.$$observers[attrName].$$scope = scope;
- if (isString(attrs[attrName])) {
- // If the attribute has been provided then we trigger an interpolation to ensure
- // the value is there for use in the link fn
- destination[scopeName] = $interpolate(attrs[attrName])(scope);
- }
- break;
-
- case '=':
- if (!hasOwnProperty.call(attrs, attrName)) {
- if (optional) break;
- attrs[attrName] = void 0;
- }
- if (optional && !attrs[attrName]) break;
-
- parentGet = $parse(attrs[attrName]);
- if (parentGet.literal) {
- compare = equals;
- } else {
- compare = function(a, b) { return a === b || (a !== a && b !== b); };
- }
- parentSet = parentGet.assign || function() {
- // reset the change, or we will throw this exception on every $digest
- lastValue = destination[scopeName] = parentGet(scope);
- throw $compileMinErr('nonassign',
- "Expression '{0}' used with directive '{1}' is non-assignable!",
- attrs[attrName], directive.name);
- };
- lastValue = destination[scopeName] = parentGet(scope);
- var parentValueWatch = function parentValueWatch(parentValue) {
- if (!compare(parentValue, destination[scopeName])) {
- // we are out of sync and need to copy
- if (!compare(parentValue, lastValue)) {
- // parent changed and it has precedence
- destination[scopeName] = parentValue;
- } else {
- // if the parent can be assigned then do so
- parentSet(scope, parentValue = destination[scopeName]);
- }
- }
- return lastValue = parentValue;
- };
- parentValueWatch.$stateful = true;
- var removeWatch;
- if (definition.collection) {
- removeWatch = scope.$watchCollection(attrs[attrName], parentValueWatch);
- } else {
- removeWatch = scope.$watch($parse(attrs[attrName], parentValueWatch), null, parentGet.literal);
- }
- removeWatchCollection.push(removeWatch);
- break;
-
- case '&':
- // Don't assign Object.prototype method to scope
- parentGet = attrs.hasOwnProperty(attrName) ? $parse(attrs[attrName]) : noop;
-
- // Don't assign noop to destination if expression is not valid
- if (parentGet === noop && optional) break;
-
- destination[scopeName] = function(locals) {
- return parentGet(scope, locals);
- };
- break;
- }
- });
-
- return removeWatchCollection.length && function removeWatches() {
- for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) {
- removeWatchCollection[i]();
- }
- };
- }
- }];
-}
-
-var PREFIX_REGEXP = /^((?:x|data)[\:\-_])/i;
-/**
- * Converts all accepted directives format into proper directive name.
- * @param name Name to normalize
- */
-function directiveNormalize(name) {
- return camelCase(name.replace(PREFIX_REGEXP, ''));
-}
-
-/**
- * @ngdoc type
- * @name $compile.directive.Attributes
- *
- * @description
- * A shared object between directive compile / linking functions which contains normalized DOM
- * element attributes. The values reflect current binding state `{{ }}`. The normalization is
- * needed since all of these are treated as equivalent in Angular:
- *
- * ```
- * <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
- * ```
- */
-
-/**
- * @ngdoc property
- * @name $compile.directive.Attributes#$attr
- *
- * @description
- * A map of DOM element attribute names to the normalized name. This is
- * needed to do reverse lookup from normalized name back to actual name.
- */
-
-
-/**
- * @ngdoc method
- * @name $compile.directive.Attributes#$set
- * @kind function
- *
- * @description
- * Set DOM element attribute value.
- *
- *
- * @param {string} name Normalized element attribute name of the property to modify. The name is
- * reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}
- * property to the original name.
- * @param {string} value Value to set the attribute to. The value can be an interpolated string.
- */
-
-
-
-/**
- * Closure compiler type information
- */
-
-function nodesetLinkingFn(
- /* angular.Scope */ scope,
- /* NodeList */ nodeList,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-) {}
-
-function directiveLinkingFn(
- /* nodesetLinkingFn */ nodesetLinkingFn,
- /* angular.Scope */ scope,
- /* Node */ node,
- /* Element */ rootElement,
- /* function(Function) */ boundTranscludeFn
-) {}
-
-function tokenDifference(str1, str2) {
- var values = '',
- tokens1 = str1.split(/\s+/),
- tokens2 = str2.split(/\s+/);
-
- outer:
- for (var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for (var j = 0; j < tokens2.length; j++) {
- if (token == tokens2[j]) continue outer;
- }
- values += (values.length > 0 ? ' ' : '') + token;
- }
- return values;
-}
-
-function removeComments(jqNodes) {
- jqNodes = jqLite(jqNodes);
- var i = jqNodes.length;
-
- if (i <= 1) {
- return jqNodes;
- }
-
- while (i--) {
- var node = jqNodes[i];
- if (node.nodeType === NODE_TYPE_COMMENT) {
- splice.call(jqNodes, i, 1);
- }
- }
- return jqNodes;
-}
-
-var $controllerMinErr = minErr('$controller');
-
-
-var CNTRL_REG = /^(\S+)(\s+as\s+(\w+))?$/;
-function identifierForController(controller, ident) {
- if (ident && isString(ident)) return ident;
- if (isString(controller)) {
- var match = CNTRL_REG.exec(controller);
- if (match) return match[3];
- }
-}
-
-
-/**
- * @ngdoc provider
- * @name $controllerProvider
- * @description
- * The {@link ng.$controller $controller service} is used by Angular to create new
- * controllers.
- *
- * This provider allows controller registration via the
- * {@link ng.$controllerProvider#register register} method.
- */
-function $ControllerProvider() {
- var controllers = {},
- globals = false;
-
- /**
- * @ngdoc method
- * @name $controllerProvider#register
- * @param {string|Object} name Controller name, or an object map of controllers where the keys are
- * the names and the values are the constructors.
- * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI
- * annotations in the array notation).
- */
- this.register = function(name, constructor) {
- assertNotHasOwnProperty(name, 'controller');
- if (isObject(name)) {
- extend(controllers, name);
- } else {
- controllers[name] = constructor;
- }
- };
-
- /**
- * @ngdoc method
- * @name $controllerProvider#allowGlobals
- * @description If called, allows `$controller` to find controller constructors on `window`
- */
- this.allowGlobals = function() {
- globals = true;
- };
-
-
- this.$get = ['$injector', '$window', function($injector, $window) {
-
- /**
- * @ngdoc service
- * @name $controller
- * @requires $injector
- *
- * @param {Function|string} constructor If called with a function then it's considered to be the
- * controller constructor function. Otherwise it's considered to be a string which is used
- * to retrieve the controller constructor using the following steps:
- *
- * * check if a controller with given name is registered via `$controllerProvider`
- * * check if evaluating the string on the current scope returns a constructor
- * * if $controllerProvider#allowGlobals, check `window[constructor]` on the global
- * `window` object (not recommended)
- *
- * The string can use the `controller as property` syntax, where the controller instance is published
- * as the specified property on the `scope`; the `scope` must be injected into `locals` param for this
- * to work correctly.
- *
- * @param {Object} locals Injection locals for Controller.
- * @return {Object} Instance of given controller.
- *
- * @description
- * `$controller` service is responsible for instantiating controllers.
- *
- * It's just a simple call to {@link auto.$injector $injector}, but extracted into
- * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).
- */
- return function(expression, locals, later, ident) {
- // PRIVATE API:
- // param `later` --- indicates that the controller's constructor is invoked at a later time.
- // If true, $controller will allocate the object with the correct
- // prototype chain, but will not invoke the controller until a returned
- // callback is invoked.
- // param `ident` --- An optional label which overrides the label parsed from the controller
- // expression, if any.
- var instance, match, constructor, identifier;
- later = later === true;
- if (ident && isString(ident)) {
- identifier = ident;
- }
-
- if (isString(expression)) {
- match = expression.match(CNTRL_REG);
- if (!match) {
- throw $controllerMinErr('ctrlfmt',
- "Badly formed controller string '{0}'. " +
- "Must match `__name__ as __id__` or `__name__`.", expression);
- }
- constructor = match[1],
- identifier = identifier || match[3];
- expression = controllers.hasOwnProperty(constructor)
- ? controllers[constructor]
- : getter(locals.$scope, constructor, true) ||
- (globals ? getter($window, constructor, true) : undefined);
-
- assertArgFn(expression, constructor, true);
- }
-
- if (later) {
- // Instantiate controller later:
- // This machinery is used to create an instance of the object before calling the
- // controller's constructor itself.
- //
- // This allows properties to be added to the controller before the constructor is
- // invoked. Primarily, this is used for isolate scope bindings in $compile.
- //
- // This feature is not intended for use by applications, and is thus not documented
- // publicly.
- // Object creation: http://jsperf.com/create-constructor/2
- var controllerPrototype = (isArray(expression) ?
- expression[expression.length - 1] : expression).prototype;
- instance = Object.create(controllerPrototype || null);
-
- if (identifier) {
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
-
- var instantiate;
- return instantiate = extend(function() {
- var result = $injector.invoke(expression, instance, locals, constructor);
- if (result !== instance && (isObject(result) || isFunction(result))) {
- instance = result;
- if (identifier) {
- // If result changed, re-assign controllerAs value to scope.
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
- }
- return instance;
- }, {
- instance: instance,
- identifier: identifier
- });
- }
-
- instance = $injector.instantiate(expression, locals, constructor);
-
- if (identifier) {
- addIdentifier(locals, identifier, instance, constructor || expression.name);
- }
-
- return instance;
- };
-
- function addIdentifier(locals, identifier, instance, name) {
- if (!(locals && isObject(locals.$scope))) {
- throw minErr('$controller')('noscp',
- "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",
- name, identifier);
- }
-
- locals.$scope[identifier] = instance;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $document
- * @requires $window
- *
- * @description
- * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.
- *
- * @example
- <example module="documentExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p>$document title: <b ng-bind="title"></b></p>
- <p>window.document title: <b ng-bind="windowTitle"></b></p>
- </div>
- </file>
- <file name="script.js">
- angular.module('documentExample', [])
- .controller('ExampleController', ['$scope', '$document', function($scope, $document) {
- $scope.title = $document[0].title;
- $scope.windowTitle = angular.element(window.document)[0].title;
- }]);
- </file>
- </example>
- */
-function $DocumentProvider() {
- this.$get = ['$window', function(window) {
- return jqLite(window.document);
- }];
-}
-
-/**
- * @ngdoc service
- * @name $exceptionHandler
- * @requires ng.$log
- *
- * @description
- * Any uncaught exception in angular expressions is delegated to this service.
- * The default implementation simply delegates to `$log.error` which logs it into
- * the browser console.
- *
- * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by
- * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.
- *
- * ## Example:
- *
- * ```js
- * angular.module('exceptionOverride', []).factory('$exceptionHandler', function() {
- * return function(exception, cause) {
- * exception.message += ' (caused by "' + cause + '")';
- * throw exception;
- * };
- * });
- * ```
- *
- * This example will override the normal action of `$exceptionHandler`, to make angular
- * exceptions fail hard when they happen, instead of just logging to the console.
- *
- * <hr />
- * Note, that code executed in event-listeners (even those registered using jqLite's `on`/`bind`
- * methods) does not delegate exceptions to the {@link ng.$exceptionHandler $exceptionHandler}
- * (unless executed during a digest).
- *
- * If you wish, you can manually delegate exceptions, e.g.
- * `try { ... } catch(e) { $exceptionHandler(e); }`
- *
- * @param {Error} exception Exception associated with the error.
- * @param {string=} cause optional information about the context in which
- * the error was thrown.
- *
- */
-function $ExceptionHandlerProvider() {
- this.$get = ['$log', function($log) {
- return function(exception, cause) {
- $log.error.apply($log, arguments);
- };
- }];
-}
-
-var $$ForceReflowProvider = function() {
- this.$get = ['$document', function($document) {
- return function(domNode) {
- //the line below will force the browser to perform a repaint so
- //that all the animated elements within the animation frame will
- //be properly updated and drawn on screen. This is required to
- //ensure that the preparation animation is properly flushed so that
- //the active state picks up from there. DO NOT REMOVE THIS LINE.
- //DO NOT OPTIMIZE THIS LINE. THE MINIFIER WILL REMOVE IT OTHERWISE WHICH
- //WILL RESULT IN AN UNPREDICTABLE BUG THAT IS VERY HARD TO TRACK DOWN AND
- //WILL TAKE YEARS AWAY FROM YOUR LIFE.
- if (domNode) {
- if (!domNode.nodeType && domNode instanceof jqLite) {
- domNode = domNode[0];
- }
- } else {
- domNode = $document[0].body;
- }
- return domNode.offsetWidth + 1;
- };
- }];
-};
-
-var APPLICATION_JSON = 'application/json';
-var CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': APPLICATION_JSON + ';charset=utf-8'};
-var JSON_START = /^\[|^\{(?!\{)/;
-var JSON_ENDS = {
- '[': /]$/,
- '{': /}$/
-};
-var JSON_PROTECTION_PREFIX = /^\)\]\}',?\n/;
-var $httpMinErr = minErr('$http');
-var $httpMinErrLegacyFn = function(method) {
- return function() {
- throw $httpMinErr('legacy', 'The method `{0}` on the promise returned from `$http` has been disabled.', method);
- };
-};
-
-function serializeValue(v) {
- if (isObject(v)) {
- return isDate(v) ? v.toISOString() : toJson(v);
- }
- return v;
-}
-
-
-function $HttpParamSerializerProvider() {
- /**
- * @ngdoc service
- * @name $httpParamSerializer
- * @description
- *
- * Default {@link $http `$http`} params serializer that converts objects to strings
- * according to the following rules:
- *
- * * `{'foo': 'bar'}` results in `foo=bar`
- * * `{'foo': Date.now()}` results in `foo=2015-04-01T09%3A50%3A49.262Z` (`toISOString()` and encoded representation of a Date object)
- * * `{'foo': ['bar', 'baz']}` results in `foo=bar&foo=baz` (repeated key for each array element)
- * * `{'foo': {'bar':'baz'}}` results in `foo=%7B%22bar%22%3A%22baz%22%7D"` (stringified and encoded representation of an object)
- *
- * Note that serializer will sort the request parameters alphabetically.
- * */
-
- this.$get = function() {
- return function ngParamSerializer(params) {
- if (!params) return '';
- var parts = [];
- forEachSorted(params, function(value, key) {
- if (value === null || isUndefined(value)) return;
- if (isArray(value)) {
- forEach(value, function(v, k) {
- parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(v)));
- });
- } else {
- parts.push(encodeUriQuery(key) + '=' + encodeUriQuery(serializeValue(value)));
- }
- });
-
- return parts.join('&');
- };
- };
-}
-
-function $HttpParamSerializerJQLikeProvider() {
- /**
- * @ngdoc service
- * @name $httpParamSerializerJQLike
- * @description
- *
- * Alternative {@link $http `$http`} params serializer that follows
- * jQuery's [`param()`](http://api.jquery.com/jquery.param/) method logic.
- * The serializer will also sort the params alphabetically.
- *
- * To use it for serializing `$http` request parameters, set it as the `paramSerializer` property:
- *
- * ```js
- * $http({
- * url: myUrl,
- * method: 'GET',
- * params: myParams,
- * paramSerializer: '$httpParamSerializerJQLike'
- * });
- * ```
- *
- * It is also possible to set it as the default `paramSerializer` in the
- * {@link $httpProvider#defaults `$httpProvider`}.
- *
- * Additionally, you can inject the serializer and use it explicitly, for example to serialize
- * form data for submission:
- *
- * ```js
- * .controller(function($http, $httpParamSerializerJQLike) {
- * //...
- *
- * $http({
- * url: myUrl,
- * method: 'POST',
- * data: $httpParamSerializerJQLike(myData),
- * headers: {
- * 'Content-Type': 'application/x-www-form-urlencoded'
- * }
- * });
- *
- * });
- * ```
- *
- * */
- this.$get = function() {
- return function jQueryLikeParamSerializer(params) {
- if (!params) return '';
- var parts = [];
- serialize(params, '', true);
- return parts.join('&');
-
- function serialize(toSerialize, prefix, topLevel) {
- if (toSerialize === null || isUndefined(toSerialize)) return;
- if (isArray(toSerialize)) {
- forEach(toSerialize, function(value, index) {
- serialize(value, prefix + '[' + (isObject(value) ? index : '') + ']');
- });
- } else if (isObject(toSerialize) && !isDate(toSerialize)) {
- forEachSorted(toSerialize, function(value, key) {
- serialize(value, prefix +
- (topLevel ? '' : '[') +
- key +
- (topLevel ? '' : ']'));
- });
- } else {
- parts.push(encodeUriQuery(prefix) + '=' + encodeUriQuery(serializeValue(toSerialize)));
- }
- }
- };
- };
-}
-
-function defaultHttpResponseTransform(data, headers) {
- if (isString(data)) {
- // Strip json vulnerability protection prefix and trim whitespace
- var tempData = data.replace(JSON_PROTECTION_PREFIX, '').trim();
-
- if (tempData) {
- var contentType = headers('Content-Type');
- if ((contentType && (contentType.indexOf(APPLICATION_JSON) === 0)) || isJsonLike(tempData)) {
- data = fromJson(tempData);
- }
- }
- }
-
- return data;
-}
-
-function isJsonLike(str) {
- var jsonStart = str.match(JSON_START);
- return jsonStart && JSON_ENDS[jsonStart[0]].test(str);
-}
-
-/**
- * Parse headers into key value object
- *
- * @param {string} headers Raw headers as a string
- * @returns {Object} Parsed headers as key value object
- */
-function parseHeaders(headers) {
- var parsed = createMap(), i;
-
- function fillInParsed(key, val) {
- if (key) {
- parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
- }
- }
-
- if (isString(headers)) {
- forEach(headers.split('\n'), function(line) {
- i = line.indexOf(':');
- fillInParsed(lowercase(trim(line.substr(0, i))), trim(line.substr(i + 1)));
- });
- } else if (isObject(headers)) {
- forEach(headers, function(headerVal, headerKey) {
- fillInParsed(lowercase(headerKey), trim(headerVal));
- });
- }
-
- return parsed;
-}
-
-
-/**
- * Returns a function that provides access to parsed headers.
- *
- * Headers are lazy parsed when first requested.
- * @see parseHeaders
- *
- * @param {(string|Object)} headers Headers to provide access to.
- * @returns {function(string=)} Returns a getter function which if called with:
- *
- * - if called with single an argument returns a single header value or null
- * - if called with no arguments returns an object containing all headers.
- */
-function headersGetter(headers) {
- var headersObj;
-
- return function(name) {
- if (!headersObj) headersObj = parseHeaders(headers);
-
- if (name) {
- var value = headersObj[lowercase(name)];
- if (value === void 0) {
- value = null;
- }
- return value;
- }
-
- return headersObj;
- };
-}
-
-
-/**
- * Chain all given functions
- *
- * This function is used for both request and response transforming
- *
- * @param {*} data Data to transform.
- * @param {function(string=)} headers HTTP headers getter fn.
- * @param {number} status HTTP status code of the response.
- * @param {(Function|Array.<Function>)} fns Function or an array of functions.
- * @returns {*} Transformed data.
- */
-function transformData(data, headers, status, fns) {
- if (isFunction(fns)) {
- return fns(data, headers, status);
- }
-
- forEach(fns, function(fn) {
- data = fn(data, headers, status);
- });
-
- return data;
-}
-
-
-function isSuccess(status) {
- return 200 <= status && status < 300;
-}
-
-
-/**
- * @ngdoc provider
- * @name $httpProvider
- * @description
- * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.
- * */
-function $HttpProvider() {
- /**
- * @ngdoc property
- * @name $httpProvider#defaults
- * @description
- *
- * Object containing default values for all {@link ng.$http $http} requests.
- *
- * - **`defaults.cache`** - {Object} - an object built with {@link ng.$cacheFactory `$cacheFactory`}
- * that will provide the cache for all requests who set their `cache` property to `true`.
- * If you set the `defaults.cache = false` then only requests that specify their own custom
- * cache object will be cached. See {@link $http#caching $http Caching} for more information.
- *
- * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.
- * Defaults value is `'XSRF-TOKEN'`.
- *
- * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the
- * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.
- *
- * - **`defaults.headers`** - {Object} - Default headers for all $http requests.
- * Refer to {@link ng.$http#setting-http-headers $http} for documentation on
- * setting default headers.
- * - **`defaults.headers.common`**
- * - **`defaults.headers.post`**
- * - **`defaults.headers.put`**
- * - **`defaults.headers.patch`**
- *
- *
- * - **`defaults.paramSerializer`** - `{string|function(Object<string,string>):string}` - A function
- * used to the prepare string representation of request parameters (specified as an object).
- * If specified as string, it is interpreted as a function registered with the {@link auto.$injector $injector}.
- * Defaults to {@link ng.$httpParamSerializer $httpParamSerializer}.
- *
- **/
- var defaults = this.defaults = {
- // transform incoming response data
- transformResponse: [defaultHttpResponseTransform],
-
- // transform outgoing request data
- transformRequest: [function(d) {
- return isObject(d) && !isFile(d) && !isBlob(d) && !isFormData(d) ? toJson(d) : d;
- }],
-
- // default headers
- headers: {
- common: {
- 'Accept': 'application/json, text/plain, */*'
- },
- post: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- put: shallowCopy(CONTENT_TYPE_APPLICATION_JSON),
- patch: shallowCopy(CONTENT_TYPE_APPLICATION_JSON)
- },
-
- xsrfCookieName: 'XSRF-TOKEN',
- xsrfHeaderName: 'X-XSRF-TOKEN',
-
- paramSerializer: '$httpParamSerializer'
- };
-
- var useApplyAsync = false;
- /**
- * @ngdoc method
- * @name $httpProvider#useApplyAsync
- * @description
- *
- * Configure $http service to combine processing of multiple http responses received at around
- * the same time via {@link ng.$rootScope.Scope#$applyAsync $rootScope.$applyAsync}. This can result in
- * significant performance improvement for bigger applications that make many HTTP requests
- * concurrently (common during application bootstrap).
- *
- * Defaults to false. If no value is specified, returns the current configured value.
- *
- * @param {boolean=} value If true, when requests are loaded, they will schedule a deferred
- * "apply" on the next tick, giving time for subsequent requests in a roughly ~10ms window
- * to load and share the same digest cycle.
- *
- * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
- * otherwise, returns the current configured value.
- **/
- this.useApplyAsync = function(value) {
- if (isDefined(value)) {
- useApplyAsync = !!value;
- return this;
- }
- return useApplyAsync;
- };
-
- var useLegacyPromise = true;
- /**
- * @ngdoc method
- * @name $httpProvider#useLegacyPromiseExtensions
- * @description
- *
- * Configure `$http` service to return promises without the shorthand methods `success` and `error`.
- * This should be used to make sure that applications work without these methods.
- *
- * Defaults to true. If no value is specified, returns the current configured value.
- *
- * @param {boolean=} value If true, `$http` will return a promise with the deprecated legacy `success` and `error` methods.
- *
- * @returns {boolean|Object} If a value is specified, returns the $httpProvider for chaining.
- * otherwise, returns the current configured value.
- **/
- this.useLegacyPromiseExtensions = function(value) {
- if (isDefined(value)) {
- useLegacyPromise = !!value;
- return this;
- }
- return useLegacyPromise;
- };
-
- /**
- * @ngdoc property
- * @name $httpProvider#interceptors
- * @description
- *
- * Array containing service factories for all synchronous or asynchronous {@link ng.$http $http}
- * pre-processing of request or postprocessing of responses.
- *
- * These service factories are ordered by request, i.e. they are applied in the same order as the
- * array, on request, but reverse order, on response.
- *
- * {@link ng.$http#interceptors Interceptors detailed info}
- **/
- var interceptorFactories = this.interceptors = [];
-
- this.$get = ['$httpBackend', '$$cookieReader', '$cacheFactory', '$rootScope', '$q', '$injector',
- function($httpBackend, $$cookieReader, $cacheFactory, $rootScope, $q, $injector) {
-
- var defaultCache = $cacheFactory('$http');
-
- /**
- * Make sure that default param serializer is exposed as a function
- */
- defaults.paramSerializer = isString(defaults.paramSerializer) ?
- $injector.get(defaults.paramSerializer) : defaults.paramSerializer;
-
- /**
- * Interceptors stored in reverse order. Inner interceptors before outer interceptors.
- * The reversal is needed so that we can build up the interception chain around the
- * server request.
- */
- var reversedInterceptors = [];
-
- forEach(interceptorFactories, function(interceptorFactory) {
- reversedInterceptors.unshift(isString(interceptorFactory)
- ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));
- });
-
- /**
- * @ngdoc service
- * @kind function
- * @name $http
- * @requires ng.$httpBackend
- * @requires $cacheFactory
- * @requires $rootScope
- * @requires $q
- * @requires $injector
- *
- * @description
- * The `$http` service is a core Angular service that facilitates communication with the remote
- * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)
- * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).
- *
- * For unit testing applications that use `$http` service, see
- * {@link ngMock.$httpBackend $httpBackend mock}.
- *
- * For a higher level of abstraction, please check out the {@link ngResource.$resource
- * $resource} service.
- *
- * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by
- * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage
- * it is important to familiarize yourself with these APIs and the guarantees they provide.
- *
- *
- * ## General usage
- * The `$http` service is a function which takes a single argument — a {@link $http#usage configuration object} —
- * that is used to generate an HTTP request and returns a {@link ng.$q promise}.
- *
- * ```js
- * // Simple GET request example:
- * $http({
- * method: 'GET',
- * url: '/someUrl'
- * }).then(function successCallback(response) {
- * // this callback will be called asynchronously
- * // when the response is available
- * }, function errorCallback(response) {
- * // called asynchronously if an error occurs
- * // or server returns response with an error status.
- * });
- * ```
- *
- * The response object has these properties:
- *
- * - **data** – `{string|Object}` – The response body transformed with the transform
- * functions.
- * - **status** – `{number}` – HTTP status code of the response.
- * - **headers** – `{function([headerName])}` – Header getter function.
- * - **config** – `{Object}` – The configuration object that was used to generate the request.
- * - **statusText** – `{string}` – HTTP status text of the response.
- *
- * A response status code between 200 and 299 is considered a success status and
- * will result in the success callback being called. Note that if the response is a redirect,
- * XMLHttpRequest will transparently follow it, meaning that the error callback will not be
- * called for such responses.
- *
- *
- * ## Shortcut methods
- *
- * Shortcut methods are also available. All shortcut methods require passing in the URL, and
- * request data must be passed in for POST/PUT requests. An optional config can be passed as the
- * last argument.
- *
- * ```js
- * $http.get('/someUrl', config).then(successCallback, errorCallback);
- * $http.post('/someUrl', data, config).then(successCallback, errorCallback);
- * ```
- *
- * Complete list of shortcut methods:
- *
- * - {@link ng.$http#get $http.get}
- * - {@link ng.$http#head $http.head}
- * - {@link ng.$http#post $http.post}
- * - {@link ng.$http#put $http.put}
- * - {@link ng.$http#delete $http.delete}
- * - {@link ng.$http#jsonp $http.jsonp}
- * - {@link ng.$http#patch $http.patch}
- *
- *
- * ## Writing Unit Tests that use $http
- * When unit testing (using {@link ngMock ngMock}), it is necessary to call
- * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending
- * request using trained responses.
- *
- * ```
- * $httpBackend.expectGET(...);
- * $http.get(...);
- * $httpBackend.flush();
- * ```
- *
- * ## Deprecation Notice
- * <div class="alert alert-danger">
- * The `$http` legacy promise methods `success` and `error` have been deprecated.
- * Use the standard `then` method instead.
- * If {@link $httpProvider#useLegacyPromiseExtensions `$httpProvider.useLegacyPromiseExtensions`} is set to
- * `false` then these methods will throw {@link $http:legacy `$http/legacy`} error.
- * </div>
- *
- * ## Setting HTTP Headers
- *
- * The $http service will automatically add certain HTTP headers to all requests. These defaults
- * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration
- * object, which currently contains this default configuration:
- *
- * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):
- * - `Accept: application/json, text/plain, * / *`
- * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)
- * - `Content-Type: application/json`
- * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)
- * - `Content-Type: application/json`
- *
- * To add or overwrite these defaults, simply add or remove a property from these configuration
- * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object
- * with the lowercased HTTP method name as the key, e.g.
- * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }`.
- *
- * The defaults can also be set at runtime via the `$http.defaults` object in the same
- * fashion. For example:
- *
- * ```
- * module.run(function($http) {
- * $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w';
- * });
- * ```
- *
- * In addition, you can supply a `headers` property in the config object passed when
- * calling `$http(config)`, which overrides the defaults without changing them globally.
- *
- * To explicitly remove a header automatically added via $httpProvider.defaults.headers on a per request basis,
- * Use the `headers` property, setting the desired header to `undefined`. For example:
- *
- * ```js
- * var req = {
- * method: 'POST',
- * url: 'http://example.com',
- * headers: {
- * 'Content-Type': undefined
- * },
- * data: { test: 'test' }
- * }
- *
- * $http(req).then(function(){...}, function(){...});
- * ```
- *
- * ## Transforming Requests and Responses
- *
- * Both requests and responses can be transformed using transformation functions: `transformRequest`
- * and `transformResponse`. These properties can be a single function that returns
- * the transformed value (`function(data, headersGetter, status)`) or an array of such transformation functions,
- * which allows you to `push` or `unshift` a new transformation function into the transformation chain.
- *
- * ### Default Transformations
- *
- * The `$httpProvider` provider and `$http` service expose `defaults.transformRequest` and
- * `defaults.transformResponse` properties. If a request does not provide its own transformations
- * then these will be applied.
- *
- * You can augment or replace the default transformations by modifying these properties by adding to or
- * replacing the array.
- *
- * Angular provides the following default transformations:
- *
- * Request transformations (`$httpProvider.defaults.transformRequest` and `$http.defaults.transformRequest`):
- *
- * - If the `data` property of the request configuration object contains an object, serialize it
- * into JSON format.
- *
- * Response transformations (`$httpProvider.defaults.transformResponse` and `$http.defaults.transformResponse`):
- *
- * - If XSRF prefix is detected, strip it (see Security Considerations section below).
- * - If JSON response is detected, deserialize it using a JSON parser.
- *
- *
- * ### Overriding the Default Transformations Per Request
- *
- * If you wish override the request/response transformations only for a single request then provide
- * `transformRequest` and/or `transformResponse` properties on the configuration object passed
- * into `$http`.
- *
- * Note that if you provide these properties on the config object the default transformations will be
- * overwritten. If you wish to augment the default transformations then you must include them in your
- * local transformation array.
- *
- * The following code demonstrates adding a new response transformation to be run after the default response
- * transformations have been run.
- *
- * ```js
- * function appendTransform(defaults, transform) {
- *
- * // We can't guarantee that the default transformation is an array
- * defaults = angular.isArray(defaults) ? defaults : [defaults];
- *
- * // Append the new transformation to the defaults
- * return defaults.concat(transform);
- * }
- *
- * $http({
- * url: '...',
- * method: 'GET',
- * transformResponse: appendTransform($http.defaults.transformResponse, function(value) {
- * return doTransform(value);
- * })
- * });
- * ```
- *
- *
- * ## Caching
- *
- * To enable caching, set the request configuration `cache` property to `true` (to use default
- * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).
- * When the cache is enabled, `$http` stores the response from the server in the specified
- * cache. The next time the same request is made, the response is served from the cache without
- * sending a request to the server.
- *
- * Note that even if the response is served from cache, delivery of the data is asynchronous in
- * the same way that real requests are.
- *
- * If there are multiple GET requests for the same URL that should be cached using the same
- * cache, but the cache is not populated yet, only one request to the server will be made and
- * the remaining requests will be fulfilled using the response from the first request.
- *
- * You can change the default cache to a new object (built with
- * {@link ng.$cacheFactory `$cacheFactory`}) by updating the
- * {@link ng.$http#defaults `$http.defaults.cache`} property. All requests who set
- * their `cache` property to `true` will now use this cache object.
- *
- * If you set the default cache to `false` then only requests that specify their own custom
- * cache object will be cached.
- *
- * ## Interceptors
- *
- * Before you start creating interceptors, be sure to understand the
- * {@link ng.$q $q and deferred/promise APIs}.
- *
- * For purposes of global error handling, authentication, or any kind of synchronous or
- * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be
- * able to intercept requests before they are handed to the server and
- * responses before they are handed over to the application code that
- * initiated these requests. The interceptors leverage the {@link ng.$q
- * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.
- *
- * The interceptors are service factories that are registered with the `$httpProvider` by
- * adding them to the `$httpProvider.interceptors` array. The factory is called and
- * injected with dependencies (if specified) and returns the interceptor.
- *
- * There are two kinds of interceptors (and two kinds of rejection interceptors):
- *
- * * `request`: interceptors get called with a http {@link $http#usage config} object. The function is free to
- * modify the `config` object or create a new one. The function needs to return the `config`
- * object directly, or a promise containing the `config` or a new `config` object.
- * * `requestError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- * * `response`: interceptors get called with http `response` object. The function is free to
- * modify the `response` object or create a new one. The function needs to return the `response`
- * object directly, or as a promise containing the `response` or a new `response` object.
- * * `responseError`: interceptor gets called when a previous interceptor threw an error or
- * resolved with a rejection.
- *
- *
- * ```js
- * // register the interceptor as a service
- * $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {
- * return {
- * // optional method
- * 'request': function(config) {
- * // do something on success
- * return config;
- * },
- *
- * // optional method
- * 'requestError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * },
- *
- *
- *
- * // optional method
- * 'response': function(response) {
- * // do something on success
- * return response;
- * },
- *
- * // optional method
- * 'responseError': function(rejection) {
- * // do something on error
- * if (canRecover(rejection)) {
- * return responseOrNewPromise
- * }
- * return $q.reject(rejection);
- * }
- * };
- * });
- *
- * $httpProvider.interceptors.push('myHttpInterceptor');
- *
- *
- * // alternatively, register the interceptor via an anonymous factory
- * $httpProvider.interceptors.push(function($q, dependency1, dependency2) {
- * return {
- * 'request': function(config) {
- * // same as above
- * },
- *
- * 'response': function(response) {
- * // same as above
- * }
- * };
- * });
- * ```
- *
- * ## Security Considerations
- *
- * When designing web applications, consider security threats from:
- *
- * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
- *
- * Both server and the client must cooperate in order to eliminate these threats. Angular comes
- * pre-configured with strategies that address these issues, but for this to work backend server
- * cooperation is required.
- *
- * ### JSON Vulnerability Protection
- *
- * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)
- * allows third party website to turn your JSON resource URL into
- * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To
- * counter this your server can prefix all JSON requests with following string `")]}',\n"`.
- * Angular will automatically strip the prefix before processing it as JSON.
- *
- * For example if your server needs to return:
- * ```js
- * ['one','two']
- * ```
- *
- * which is vulnerable to attack, your server can return:
- * ```js
- * )]}',
- * ['one','two']
- * ```
- *
- * Angular will strip the prefix, before processing the JSON.
- *
- *
- * ### Cross Site Request Forgery (XSRF) Protection
- *
- * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which
- * an unauthorized site can gain your user's private data. Angular provides a mechanism
- * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie
- * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only
- * JavaScript that runs on your domain could read the cookie, your server can be assured that
- * the XHR came from JavaScript running on your domain. The header will not be set for
- * cross-domain requests.
- *
- * To take advantage of this, your server needs to set a token in a JavaScript readable session
- * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the
- * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure
- * that only JavaScript running on your domain could have sent the request. The token must be
- * unique for each user and must be verifiable by the server (to prevent the JavaScript from
- * making up its own tokens). We recommend that the token is a digest of your site's
- * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography&#41;)
- * for added security.
- *
- * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName
- * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,
- * or the per-request config object.
- *
- * In order to prevent collisions in environments where multiple Angular apps share the
- * same domain or subdomain, we recommend that each application uses unique cookie name.
- *
- * @param {object} config Object describing the request to be made and how it should be
- * processed. The object has following properties:
- *
- * - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)
- * - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.
- * - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be serialized
- * with the `paramSerializer` and appended as GET parameters.
- * - **data** – `{string|Object}` – Data to be sent as the request message data.
- * - **headers** – `{Object}` – Map of strings or functions which return strings representing
- * HTTP headers to send to the server. If the return value of a function is null, the
- * header will not be sent. Functions accept a config object as an argument.
- * - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.
- * - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.
- * - **transformRequest** –
- * `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * request body and headers and returns its transformed (typically serialized) version.
- * See {@link ng.$http#overriding-the-default-transformations-per-request
- * Overriding the Default Transformations}
- * - **transformResponse** –
- * `{function(data, headersGetter, status)|Array.<function(data, headersGetter, status)>}` –
- * transform function or an array of such functions. The transform function takes the http
- * response body, headers and status and returns its transformed (typically deserialized) version.
- * See {@link ng.$http#overriding-the-default-transformations-per-request
- * Overriding the Default TransformationjqLiks}
- * - **paramSerializer** - `{string|function(Object<string,string>):string}` - A function used to
- * prepare the string representation of request parameters (specified as an object).
- * If specified as string, it is interpreted as function registered with the
- * {@link $injector $injector}, which means you can create your own serializer
- * by registering it as a {@link auto.$provide#service service}.
- * The default serializer is the {@link $httpParamSerializer $httpParamSerializer};
- * alternatively, you can use the {@link $httpParamSerializerJQLike $httpParamSerializerJQLike}
- * - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the
- * GET request, otherwise if a cache instance built with
- * {@link ng.$cacheFactory $cacheFactory}, this cache will be used for
- * caching.
- * - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}
- * that should abort the request when resolved.
- * - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the
- * XHR object. See [requests with credentials](https://developer.mozilla.org/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials)
- * for more information.
- * - **responseType** - `{string}` - see
- * [XMLHttpRequest.responseType](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest#xmlhttprequest-responsetype).
- *
- * @returns {HttpPromise} Returns a {@link ng.$q `Promise}` that will be resolved to a response object
- * when the request succeeds or fails.
- *
- *
- * @property {Array.<Object>} pendingRequests Array of config objects for currently pending
- * requests. This is primarily meant to be used for debugging purposes.
- *
- *
- * @example
-<example module="httpExample">
-<file name="index.html">
- <div ng-controller="FetchController">
- <select ng-model="method" aria-label="Request method">
- <option>GET</option>
- <option>JSONP</option>
- </select>
- <input type="text" ng-model="url" size="80" aria-label="URL" />
- <button id="fetchbtn" ng-click="fetch()">fetch</button><br>
- <button id="samplegetbtn" ng-click="updateModel('GET', 'http-hello.html')">Sample GET</button>
- <button id="samplejsonpbtn"
- ng-click="updateModel('JSONP',
- 'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')">
- Sample JSONP
- </button>
- <button id="invalidjsonpbtn"
- ng-click="updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')">
- Invalid JSONP
- </button>
- <pre>http status code: {{status}}</pre>
- <pre>http response data: {{data}}</pre>
- </div>
-</file>
-<file name="script.js">
- angular.module('httpExample', [])
- .controller('FetchController', ['$scope', '$http', '$templateCache',
- function($scope, $http, $templateCache) {
- $scope.method = 'GET';
- $scope.url = 'http-hello.html';
-
- $scope.fetch = function() {
- $scope.code = null;
- $scope.response = null;
-
- $http({method: $scope.method, url: $scope.url, cache: $templateCache}).
- then(function(response) {
- $scope.status = response.status;
- $scope.data = response.data;
- }, function(response) {
- $scope.data = response.data || "Request failed";
- $scope.status = response.status;
- });
- };
-
- $scope.updateModel = function(method, url) {
- $scope.method = method;
- $scope.url = url;
- };
- }]);
-</file>
-<file name="http-hello.html">
- Hello, $http!
-</file>
-<file name="protractor.js" type="protractor">
- var status = element(by.binding('status'));
- var data = element(by.binding('data'));
- var fetchBtn = element(by.id('fetchbtn'));
- var sampleGetBtn = element(by.id('samplegetbtn'));
- var sampleJsonpBtn = element(by.id('samplejsonpbtn'));
- var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));
-
- it('should make an xhr GET request', function() {
- sampleGetBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('200');
- expect(data.getText()).toMatch(/Hello, \$http!/);
- });
-
-// Commented out due to flakes. See https://github.com/angular/angular.js/issues/9185
-// it('should make a JSONP request to angularjs.org', function() {
-// sampleJsonpBtn.click();
-// fetchBtn.click();
-// expect(status.getText()).toMatch('200');
-// expect(data.getText()).toMatch(/Super Hero!/);
-// });
-
- it('should make JSONP request to invalid URL and invoke the error handler',
- function() {
- invalidJsonpBtn.click();
- fetchBtn.click();
- expect(status.getText()).toMatch('0');
- expect(data.getText()).toMatch('Request failed');
- });
-</file>
-</example>
- */
- function $http(requestConfig) {
-
- if (!isObject(requestConfig)) {
- throw minErr('$http')('badreq', 'Http request configuration must be an object. Received: {0}', requestConfig);
- }
-
- var config = extend({
- method: 'get',
- transformRequest: defaults.transformRequest,
- transformResponse: defaults.transformResponse,
- paramSerializer: defaults.paramSerializer
- }, requestConfig);
-
- config.headers = mergeHeaders(requestConfig);
- config.method = uppercase(config.method);
- config.paramSerializer = isString(config.paramSerializer) ?
- $injector.get(config.paramSerializer) : config.paramSerializer;
-
- var serverRequest = function(config) {
- var headers = config.headers;
- var reqData = transformData(config.data, headersGetter(headers), undefined, config.transformRequest);
-
- // strip content-type if data is undefined
- if (isUndefined(reqData)) {
- forEach(headers, function(value, header) {
- if (lowercase(header) === 'content-type') {
- delete headers[header];
- }
- });
- }
-
- if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {
- config.withCredentials = defaults.withCredentials;
- }
-
- // send request
- return sendReq(config, reqData).then(transformResponse, transformResponse);
- };
-
- var chain = [serverRequest, undefined];
- var promise = $q.when(config);
-
- // apply interceptors
- forEach(reversedInterceptors, function(interceptor) {
- if (interceptor.request || interceptor.requestError) {
- chain.unshift(interceptor.request, interceptor.requestError);
- }
- if (interceptor.response || interceptor.responseError) {
- chain.push(interceptor.response, interceptor.responseError);
- }
- });
-
- while (chain.length) {
- var thenFn = chain.shift();
- var rejectFn = chain.shift();
-
- promise = promise.then(thenFn, rejectFn);
- }
-
- if (useLegacyPromise) {
- promise.success = function(fn) {
- assertArgFn(fn, 'fn');
-
- promise.then(function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
-
- promise.error = function(fn) {
- assertArgFn(fn, 'fn');
-
- promise.then(null, function(response) {
- fn(response.data, response.status, response.headers, config);
- });
- return promise;
- };
- } else {
- promise.success = $httpMinErrLegacyFn('success');
- promise.error = $httpMinErrLegacyFn('error');
- }
-
- return promise;
-
- function transformResponse(response) {
- // make a copy since the response must be cacheable
- var resp = extend({}, response);
- resp.data = transformData(response.data, response.headers, response.status,
- config.transformResponse);
- return (isSuccess(response.status))
- ? resp
- : $q.reject(resp);
- }
-
- function executeHeaderFns(headers, config) {
- var headerContent, processedHeaders = {};
-
- forEach(headers, function(headerFn, header) {
- if (isFunction(headerFn)) {
- headerContent = headerFn(config);
- if (headerContent != null) {
- processedHeaders[header] = headerContent;
- }
- } else {
- processedHeaders[header] = headerFn;
- }
- });
-
- return processedHeaders;
- }
-
- function mergeHeaders(config) {
- var defHeaders = defaults.headers,
- reqHeaders = extend({}, config.headers),
- defHeaderName, lowercaseDefHeaderName, reqHeaderName;
-
- defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);
-
- // using for-in instead of forEach to avoid unecessary iteration after header has been found
- defaultHeadersIteration:
- for (defHeaderName in defHeaders) {
- lowercaseDefHeaderName = lowercase(defHeaderName);
-
- for (reqHeaderName in reqHeaders) {
- if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {
- continue defaultHeadersIteration;
- }
- }
-
- reqHeaders[defHeaderName] = defHeaders[defHeaderName];
- }
-
- // execute if header value is a function for merged headers
- return executeHeaderFns(reqHeaders, shallowCopy(config));
- }
- }
-
- $http.pendingRequests = [];
-
- /**
- * @ngdoc method
- * @name $http#get
- *
- * @description
- * Shortcut method to perform `GET` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#delete
- *
- * @description
- * Shortcut method to perform `DELETE` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#head
- *
- * @description
- * Shortcut method to perform `HEAD` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#jsonp
- *
- * @description
- * Shortcut method to perform `JSONP` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request.
- * The name of the callback should be the string `JSON_CALLBACK`.
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethods('get', 'delete', 'head', 'jsonp');
-
- /**
- * @ngdoc method
- * @name $http#post
- *
- * @description
- * Shortcut method to perform `POST` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#put
- *
- * @description
- * Shortcut method to perform `PUT` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
-
- /**
- * @ngdoc method
- * @name $http#patch
- *
- * @description
- * Shortcut method to perform `PATCH` request.
- *
- * @param {string} url Relative or absolute URL specifying the destination of the request
- * @param {*} data Request content
- * @param {Object=} config Optional configuration object
- * @returns {HttpPromise} Future object
- */
- createShortMethodsWithData('post', 'put', 'patch');
-
- /**
- * @ngdoc property
- * @name $http#defaults
- *
- * @description
- * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of
- * default headers, withCredentials as well as request and response transformations.
- *
- * See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.
- */
- $http.defaults = defaults;
-
-
- return $http;
-
-
- function createShortMethods(names) {
- forEach(arguments, function(name) {
- $http[name] = function(url, config) {
- return $http(extend({}, config || {}, {
- method: name,
- url: url
- }));
- };
- });
- }
-
-
- function createShortMethodsWithData(name) {
- forEach(arguments, function(name) {
- $http[name] = function(url, data, config) {
- return $http(extend({}, config || {}, {
- method: name,
- url: url,
- data: data
- }));
- };
- });
- }
-
-
- /**
- * Makes the request.
- *
- * !!! ACCESSES CLOSURE VARS:
- * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests
- */
- function sendReq(config, reqData) {
- var deferred = $q.defer(),
- promise = deferred.promise,
- cache,
- cachedResp,
- reqHeaders = config.headers,
- url = buildUrl(config.url, config.paramSerializer(config.params));
-
- $http.pendingRequests.push(config);
- promise.then(removePendingReq, removePendingReq);
-
-
- if ((config.cache || defaults.cache) && config.cache !== false &&
- (config.method === 'GET' || config.method === 'JSONP')) {
- cache = isObject(config.cache) ? config.cache
- : isObject(defaults.cache) ? defaults.cache
- : defaultCache;
- }
-
- if (cache) {
- cachedResp = cache.get(url);
- if (isDefined(cachedResp)) {
- if (isPromiseLike(cachedResp)) {
- // cached request has already been sent, but there is no response yet
- cachedResp.then(resolvePromiseWithResult, resolvePromiseWithResult);
- } else {
- // serving from cache
- if (isArray(cachedResp)) {
- resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);
- } else {
- resolvePromise(cachedResp, 200, {}, 'OK');
- }
- }
- } else {
- // put the promise for the non-transformed response into cache as a placeholder
- cache.put(url, promise);
- }
- }
-
-
- // if we won't have the response in cache, set the xsrf headers and
- // send the request to the backend
- if (isUndefined(cachedResp)) {
- var xsrfValue = urlIsSameOrigin(config.url)
- ? $$cookieReader()[config.xsrfCookieName || defaults.xsrfCookieName]
- : undefined;
- if (xsrfValue) {
- reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;
- }
-
- $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,
- config.withCredentials, config.responseType);
- }
-
- return promise;
-
-
- /**
- * Callback registered to $httpBackend():
- * - caches the response if desired
- * - resolves the raw $http promise
- * - calls $apply
- */
- function done(status, response, headersString, statusText) {
- if (cache) {
- if (isSuccess(status)) {
- cache.put(url, [status, response, parseHeaders(headersString), statusText]);
- } else {
- // remove promise from the cache
- cache.remove(url);
- }
- }
-
- function resolveHttpPromise() {
- resolvePromise(response, status, headersString, statusText);
- }
-
- if (useApplyAsync) {
- $rootScope.$applyAsync(resolveHttpPromise);
- } else {
- resolveHttpPromise();
- if (!$rootScope.$$phase) $rootScope.$apply();
- }
- }
-
-
- /**
- * Resolves the raw $http promise.
- */
- function resolvePromise(response, status, headers, statusText) {
- //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
- status = status >= -1 ? status : 0;
-
- (isSuccess(status) ? deferred.resolve : deferred.reject)({
- data: response,
- status: status,
- headers: headersGetter(headers),
- config: config,
- statusText: statusText
- });
- }
-
- function resolvePromiseWithResult(result) {
- resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);
- }
-
- function removePendingReq() {
- var idx = $http.pendingRequests.indexOf(config);
- if (idx !== -1) $http.pendingRequests.splice(idx, 1);
- }
- }
-
-
- function buildUrl(url, serializedParams) {
- if (serializedParams.length > 0) {
- url += ((url.indexOf('?') == -1) ? '?' : '&') + serializedParams;
- }
- return url;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $xhrFactory
- *
- * @description
- * Factory function used to create XMLHttpRequest objects.
- *
- * Replace or decorate this service to create your own custom XMLHttpRequest objects.
- *
- * ```
- * angular.module('myApp', [])
- * .factory('$xhrFactory', function() {
- * return function createXhr(method, url) {
- * return new window.XMLHttpRequest({mozSystem: true});
- * };
- * });
- * ```
- *
- * @param {string} method HTTP method of the request (GET, POST, PUT, ..)
- * @param {string} url URL of the request.
- */
-function $xhrFactoryProvider() {
- this.$get = function() {
- return function createXhr() {
- return new window.XMLHttpRequest();
- };
- };
-}
-
-/**
- * @ngdoc service
- * @name $httpBackend
- * @requires $window
- * @requires $document
- * @requires $xhrFactory
- *
- * @description
- * HTTP backend used by the {@link ng.$http service} that delegates to
- * XMLHttpRequest object or JSONP and deals with browser incompatibilities.
- *
- * You should never need to use this service directly, instead use the higher-level abstractions:
- * {@link ng.$http $http} or {@link ngResource.$resource $resource}.
- *
- * During testing this implementation is swapped with {@link ngMock.$httpBackend mock
- * $httpBackend} which can be trained with responses.
- */
-function $HttpBackendProvider() {
- this.$get = ['$browser', '$window', '$document', '$xhrFactory', function($browser, $window, $document, $xhrFactory) {
- return createHttpBackend($browser, $xhrFactory, $browser.defer, $window.angular.callbacks, $document[0]);
- }];
-}
-
-function createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {
- // TODO(vojta): fix the signature
- return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {
- $browser.$$incOutstandingRequestCount();
- url = url || $browser.url();
-
- if (lowercase(method) == 'jsonp') {
- var callbackId = '_' + (callbacks.counter++).toString(36);
- callbacks[callbackId] = function(data) {
- callbacks[callbackId].data = data;
- callbacks[callbackId].called = true;
- };
-
- var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),
- callbackId, function(status, text) {
- completeRequest(callback, status, callbacks[callbackId].data, "", text);
- callbacks[callbackId] = noop;
- });
- } else {
-
- var xhr = createXhr(method, url);
-
- xhr.open(method, url, true);
- forEach(headers, function(value, key) {
- if (isDefined(value)) {
- xhr.setRequestHeader(key, value);
- }
- });
-
- xhr.onload = function requestLoaded() {
- var statusText = xhr.statusText || '';
-
- // responseText is the old-school way of retrieving response (supported by IE9)
- // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)
- var response = ('response' in xhr) ? xhr.response : xhr.responseText;
-
- // normalize IE9 bug (http://bugs.jquery.com/ticket/1450)
- var status = xhr.status === 1223 ? 204 : xhr.status;
-
- // fix status code when it is 0 (0 status is undocumented).
- // Occurs when accessing file resources or on Android 4.1 stock browser
- // while retrieving files from application cache.
- if (status === 0) {
- status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;
- }
-
- completeRequest(callback,
- status,
- response,
- xhr.getAllResponseHeaders(),
- statusText);
- };
-
- var requestError = function() {
- // The response is always empty
- // See https://xhr.spec.whatwg.org/#request-error-steps and https://fetch.spec.whatwg.org/#concept-network-error
- completeRequest(callback, -1, null, null, '');
- };
-
- xhr.onerror = requestError;
- xhr.onabort = requestError;
-
- if (withCredentials) {
- xhr.withCredentials = true;
- }
-
- if (responseType) {
- try {
- xhr.responseType = responseType;
- } catch (e) {
- // WebKit added support for the json responseType value on 09/03/2013
- // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are
- // known to throw when setting the value "json" as the response type. Other older
- // browsers implementing the responseType
- //
- // The json response type can be ignored if not supported, because JSON payloads are
- // parsed on the client-side regardless.
- if (responseType !== 'json') {
- throw e;
- }
- }
- }
-
- xhr.send(isUndefined(post) ? null : post);
- }
-
- if (timeout > 0) {
- var timeoutId = $browserDefer(timeoutRequest, timeout);
- } else if (isPromiseLike(timeout)) {
- timeout.then(timeoutRequest);
- }
-
-
- function timeoutRequest() {
- jsonpDone && jsonpDone();
- xhr && xhr.abort();
- }
-
- function completeRequest(callback, status, response, headersString, statusText) {
- // cancel timeout and subsequent timeout promise resolution
- if (isDefined(timeoutId)) {
- $browserDefer.cancel(timeoutId);
- }
- jsonpDone = xhr = null;
-
- callback(status, response, headersString, statusText);
- $browser.$$completeOutstandingRequest(noop);
- }
- };
-
- function jsonpReq(url, callbackId, done) {
- // we can't use jQuery/jqLite here because jQuery does crazy stuff with script elements, e.g.:
- // - fetches local scripts via XHR and evals them
- // - adds and immediately removes script elements from the document
- var script = rawDocument.createElement('script'), callback = null;
- script.type = "text/javascript";
- script.src = url;
- script.async = true;
-
- callback = function(event) {
- removeEventListenerFn(script, "load", callback);
- removeEventListenerFn(script, "error", callback);
- rawDocument.body.removeChild(script);
- script = null;
- var status = -1;
- var text = "unknown";
-
- if (event) {
- if (event.type === "load" && !callbacks[callbackId].called) {
- event = { type: "error" };
- }
- text = event.type;
- status = event.type === "error" ? 404 : 200;
- }
-
- if (done) {
- done(status, text);
- }
- };
-
- addEventListenerFn(script, "load", callback);
- addEventListenerFn(script, "error", callback);
- rawDocument.body.appendChild(script);
- return callback;
- }
-}
-
-var $interpolateMinErr = angular.$interpolateMinErr = minErr('$interpolate');
-$interpolateMinErr.throwNoconcat = function(text) {
- throw $interpolateMinErr('noconcat',
- "Error while interpolating: {0}\nStrict Contextual Escaping disallows " +
- "interpolations that concatenate multiple expressions when a trusted value is " +
- "required. See http://docs.angularjs.org/api/ng.$sce", text);
-};
-
-$interpolateMinErr.interr = function(text, err) {
- return $interpolateMinErr('interr', "Can't interpolate: {0}\n{1}", text, err.toString());
-};
-
-/**
- * @ngdoc provider
- * @name $interpolateProvider
- *
- * @description
- *
- * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
- *
- * <div class="alert alert-danger">
- * This feature is sometimes used to mix different markup languages, e.g. to wrap an Angular
- * template within a Python Jinja template (or any other template language). Mixing templating
- * languages is **very dangerous**. The embedding template language will not safely escape Angular
- * expressions, so any user-controlled values in the template will cause Cross Site Scripting (XSS)
- * security bugs!
- * </div>
- *
- * @example
-<example module="customInterpolationApp">
-<file name="index.html">
-<script>
- var customInterpolationApp = angular.module('customInterpolationApp', []);
-
- customInterpolationApp.config(function($interpolateProvider) {
- $interpolateProvider.startSymbol('//');
- $interpolateProvider.endSymbol('//');
- });
-
-
- customInterpolationApp.controller('DemoController', function() {
- this.label = "This binding is brought you by // interpolation symbols.";
- });
-</script>
-<div ng-app="App" ng-controller="DemoController as demo">
- //demo.label//
-</div>
-</file>
-<file name="protractor.js" type="protractor">
- it('should interpolate binding with custom symbols', function() {
- expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');
- });
-</file>
-</example>
- */
-function $InterpolateProvider() {
- var startSymbol = '{{';
- var endSymbol = '}}';
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#startSymbol
- * @description
- * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.
- *
- * @param {string=} value new value to set the starting symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.startSymbol = function(value) {
- if (value) {
- startSymbol = value;
- return this;
- } else {
- return startSymbol;
- }
- };
-
- /**
- * @ngdoc method
- * @name $interpolateProvider#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * @param {string=} value new value to set the ending symbol to.
- * @returns {string|self} Returns the symbol when used as getter and self if used as setter.
- */
- this.endSymbol = function(value) {
- if (value) {
- endSymbol = value;
- return this;
- } else {
- return endSymbol;
- }
- };
-
-
- this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {
- var startSymbolLength = startSymbol.length,
- endSymbolLength = endSymbol.length,
- escapedStartRegexp = new RegExp(startSymbol.replace(/./g, escape), 'g'),
- escapedEndRegexp = new RegExp(endSymbol.replace(/./g, escape), 'g');
-
- function escape(ch) {
- return '\\\\\\' + ch;
- }
-
- function unescapeText(text) {
- return text.replace(escapedStartRegexp, startSymbol).
- replace(escapedEndRegexp, endSymbol);
- }
-
- function stringify(value) {
- if (value == null) { // null || undefined
- return '';
- }
- switch (typeof value) {
- case 'string':
- break;
- case 'number':
- value = '' + value;
- break;
- default:
- value = toJson(value);
- }
-
- return value;
- }
-
- //TODO: this is the same as the constantWatchDelegate in parse.js
- function constantWatchDelegate(scope, listener, objectEquality, constantInterp) {
- var unwatch;
- return unwatch = scope.$watch(function constantInterpolateWatch(scope) {
- unwatch();
- return constantInterp(scope);
- }, listener, objectEquality);
- }
-
- /**
- * @ngdoc service
- * @name $interpolate
- * @kind function
- *
- * @requires $parse
- * @requires $sce
- *
- * @description
- *
- * Compiles a string with markup into an interpolation function. This service is used by the
- * HTML {@link ng.$compile $compile} service for data binding. See
- * {@link ng.$interpolateProvider $interpolateProvider} for configuring the
- * interpolation markup.
- *
- *
- * ```js
- * var $interpolate = ...; // injected
- * var exp = $interpolate('Hello {{name | uppercase}}!');
- * expect(exp({name:'Angular'})).toEqual('Hello ANGULAR!');
- * ```
- *
- * `$interpolate` takes an optional fourth argument, `allOrNothing`. If `allOrNothing` is
- * `true`, the interpolation function will return `undefined` unless all embedded expressions
- * evaluate to a value other than `undefined`.
- *
- * ```js
- * var $interpolate = ...; // injected
- * var context = {greeting: 'Hello', name: undefined };
- *
- * // default "forgiving" mode
- * var exp = $interpolate('{{greeting}} {{name}}!');
- * expect(exp(context)).toEqual('Hello !');
- *
- * // "allOrNothing" mode
- * exp = $interpolate('{{greeting}} {{name}}!', false, null, true);
- * expect(exp(context)).toBeUndefined();
- * context.name = 'Angular';
- * expect(exp(context)).toEqual('Hello Angular!');
- * ```
- *
- * `allOrNothing` is useful for interpolating URLs. `ngSrc` and `ngSrcset` use this behavior.
- *
- * ####Escaped Interpolation
- * $interpolate provides a mechanism for escaping interpolation markers. Start and end markers
- * can be escaped by preceding each of their characters with a REVERSE SOLIDUS U+005C (backslash).
- * It will be rendered as a regular start/end marker, and will not be interpreted as an expression
- * or binding.
- *
- * This enables web-servers to prevent script injection attacks and defacing attacks, to some
- * degree, while also enabling code examples to work without relying on the
- * {@link ng.directive:ngNonBindable ngNonBindable} directive.
- *
- * **For security purposes, it is strongly encouraged that web servers escape user-supplied data,
- * replacing angle brackets (&lt;, &gt;) with &amp;lt; and &amp;gt; respectively, and replacing all
- * interpolation start/end markers with their escaped counterparts.**
- *
- * Escaped interpolation markers are only replaced with the actual interpolation markers in rendered
- * output when the $interpolate service processes the text. So, for HTML elements interpolated
- * by {@link ng.$compile $compile}, or otherwise interpolated with the `mustHaveExpression` parameter
- * set to `true`, the interpolated text must contain an unescaped interpolation expression. As such,
- * this is typically useful only when user-data is used in rendering a template from the server, or
- * when otherwise untrusted data is used by a directive.
- *
- * <example>
- * <file name="index.html">
- * <div ng-init="username='A user'">
- * <p ng-init="apptitle='Escaping demo'">{{apptitle}}: \{\{ username = "defaced value"; \}\}
- * </p>
- * <p><strong>{{username}}</strong> attempts to inject code which will deface the
- * application, but fails to accomplish their task, because the server has correctly
- * escaped the interpolation start/end markers with REVERSE SOLIDUS U+005C (backslash)
- * characters.</p>
- * <p>Instead, the result of the attempted script injection is visible, and can be removed
- * from the database by an administrator.</p>
- * </div>
- * </file>
- * </example>
- *
- * @param {string} text The text with markup to interpolate.
- * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have
- * embedded expression in order to return an interpolation function. Strings with no
- * embedded expression will return null for the interpolation function.
- * @param {string=} trustedContext when provided, the returned function passes the interpolated
- * result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,
- * trustedContext)} before returning it. Refer to the {@link ng.$sce $sce} service that
- * provides Strict Contextual Escaping for details.
- * @param {boolean=} allOrNothing if `true`, then the returned function returns undefined
- * unless all embedded expressions evaluate to a value other than `undefined`.
- * @returns {function(context)} an interpolation function which is used to compute the
- * interpolated string. The function has these parameters:
- *
- * - `context`: evaluation context for all expressions embedded in the interpolated text
- */
- function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing) {
- // Provide a quick exit and simplified result function for text with no interpolation
- if (!text.length || text.indexOf(startSymbol) === -1) {
- var constantInterp;
- if (!mustHaveExpression) {
- var unescapedText = unescapeText(text);
- constantInterp = valueFn(unescapedText);
- constantInterp.exp = text;
- constantInterp.expressions = [];
- constantInterp.$$watchDelegate = constantWatchDelegate;
- }
- return constantInterp;
- }
-
- allOrNothing = !!allOrNothing;
- var startIndex,
- endIndex,
- index = 0,
- expressions = [],
- parseFns = [],
- textLength = text.length,
- exp,
- concat = [],
- expressionPositions = [];
-
- while (index < textLength) {
- if (((startIndex = text.indexOf(startSymbol, index)) != -1) &&
- ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1)) {
- if (index !== startIndex) {
- concat.push(unescapeText(text.substring(index, startIndex)));
- }
- exp = text.substring(startIndex + startSymbolLength, endIndex);
- expressions.push(exp);
- parseFns.push($parse(exp, parseStringifyInterceptor));
- index = endIndex + endSymbolLength;
- expressionPositions.push(concat.length);
- concat.push('');
- } else {
- // we did not find an interpolation, so we have to add the remainder to the separators array
- if (index !== textLength) {
- concat.push(unescapeText(text.substring(index)));
- }
- break;
- }
- }
-
- // Concatenating expressions makes it hard to reason about whether some combination of
- // concatenated values are unsafe to use and could easily lead to XSS. By requiring that a
- // single expression be used for iframe[src], object[src], etc., we ensure that the value
- // that's used is assigned or constructed by some JS code somewhere that is more testable or
- // make it obvious that you bound the value to some user controlled value. This helps reduce
- // the load when auditing for XSS issues.
- if (trustedContext && concat.length > 1) {
- $interpolateMinErr.throwNoconcat(text);
- }
-
- if (!mustHaveExpression || expressions.length) {
- var compute = function(values) {
- for (var i = 0, ii = expressions.length; i < ii; i++) {
- if (allOrNothing && isUndefined(values[i])) return;
- concat[expressionPositions[i]] = values[i];
- }
- return concat.join('');
- };
-
- var getValue = function(value) {
- return trustedContext ?
- $sce.getTrusted(trustedContext, value) :
- $sce.valueOf(value);
- };
-
- return extend(function interpolationFn(context) {
- var i = 0;
- var ii = expressions.length;
- var values = new Array(ii);
-
- try {
- for (; i < ii; i++) {
- values[i] = parseFns[i](context);
- }
-
- return compute(values);
- } catch (err) {
- $exceptionHandler($interpolateMinErr.interr(text, err));
- }
-
- }, {
- // all of these properties are undocumented for now
- exp: text, //just for compatibility with regular watchers created via $watch
- expressions: expressions,
- $$watchDelegate: function(scope, listener) {
- var lastValue;
- return scope.$watchGroup(parseFns, function interpolateFnWatcher(values, oldValues) {
- var currValue = compute(values);
- if (isFunction(listener)) {
- listener.call(this, currValue, values !== oldValues ? lastValue : currValue, scope);
- }
- lastValue = currValue;
- });
- }
- });
- }
-
- function parseStringifyInterceptor(value) {
- try {
- value = getValue(value);
- return allOrNothing && !isDefined(value) ? value : stringify(value);
- } catch (err) {
- $exceptionHandler($interpolateMinErr.interr(text, err));
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $interpolate#startSymbol
- * @description
- * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.
- *
- * Use {@link ng.$interpolateProvider#startSymbol `$interpolateProvider.startSymbol`} to change
- * the symbol.
- *
- * @returns {string} start symbol.
- */
- $interpolate.startSymbol = function() {
- return startSymbol;
- };
-
-
- /**
- * @ngdoc method
- * @name $interpolate#endSymbol
- * @description
- * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.
- *
- * Use {@link ng.$interpolateProvider#endSymbol `$interpolateProvider.endSymbol`} to change
- * the symbol.
- *
- * @returns {string} end symbol.
- */
- $interpolate.endSymbol = function() {
- return endSymbol;
- };
-
- return $interpolate;
- }];
-}
-
-function $IntervalProvider() {
- this.$get = ['$rootScope', '$window', '$q', '$$q', '$browser',
- function($rootScope, $window, $q, $$q, $browser) {
- var intervals = {};
-
-
- /**
- * @ngdoc service
- * @name $interval
- *
- * @description
- * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`
- * milliseconds.
- *
- * The return value of registering an interval function is a promise. This promise will be
- * notified upon each tick of the interval, and will be resolved after `count` iterations, or
- * run indefinitely if `count` is not defined. The value of the notification will be the
- * number of iterations that have run.
- * To cancel an interval, call `$interval.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to
- * move forward by `millis` milliseconds and trigger any functions scheduled to run in that
- * time.
- *
- * <div class="alert alert-warning">
- * **Note**: Intervals created by this service must be explicitly destroyed when you are finished
- * with them. In particular they are not automatically destroyed when a controller's scope or a
- * directive's element are destroyed.
- * You should take this into consideration and make sure to always cancel the interval at the
- * appropriate moment. See the example below for more details on how and when to do this.
- * </div>
- *
- * @param {function()} fn A function that should be called repeatedly.
- * @param {number} delay Number of milliseconds between each function call.
- * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat
- * indefinitely.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {promise} A promise which will be notified on each iteration.
- *
- * @example
- * <example module="intervalExample">
- * <file name="index.html">
- * <script>
- * angular.module('intervalExample', [])
- * .controller('ExampleController', ['$scope', '$interval',
- * function($scope, $interval) {
- * $scope.format = 'M/d/yy h:mm:ss a';
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- *
- * var stop;
- * $scope.fight = function() {
- * // Don't start a new fight if we are already fighting
- * if ( angular.isDefined(stop) ) return;
- *
- * stop = $interval(function() {
- * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
- * $scope.blood_1 = $scope.blood_1 - 3;
- * $scope.blood_2 = $scope.blood_2 - 4;
- * } else {
- * $scope.stopFight();
- * }
- * }, 100);
- * };
- *
- * $scope.stopFight = function() {
- * if (angular.isDefined(stop)) {
- * $interval.cancel(stop);
- * stop = undefined;
- * }
- * };
- *
- * $scope.resetFight = function() {
- * $scope.blood_1 = 100;
- * $scope.blood_2 = 120;
- * };
- *
- * $scope.$on('$destroy', function() {
- * // Make sure that the interval is destroyed too
- * $scope.stopFight();
- * });
- * }])
- * // Register the 'myCurrentTime' directive factory method.
- * // We inject $interval and dateFilter service since the factory method is DI.
- * .directive('myCurrentTime', ['$interval', 'dateFilter',
- * function($interval, dateFilter) {
- * // return the directive link function. (compile function not needed)
- * return function(scope, element, attrs) {
- * var format, // date format
- * stopTime; // so that we can cancel the time updates
- *
- * // used to update the UI
- * function updateTime() {
- * element.text(dateFilter(new Date(), format));
- * }
- *
- * // watch the expression, and update the UI on change.
- * scope.$watch(attrs.myCurrentTime, function(value) {
- * format = value;
- * updateTime();
- * });
- *
- * stopTime = $interval(updateTime, 1000);
- *
- * // listen on DOM destroy (removal) event, and cancel the next UI update
- * // to prevent updating time after the DOM element was removed.
- * element.on('$destroy', function() {
- * $interval.cancel(stopTime);
- * });
- * }
- * }]);
- * </script>
- *
- * <div>
- * <div ng-controller="ExampleController">
- * <label>Date format: <input ng-model="format"></label> <hr/>
- * Current time is: <span my-current-time="format"></span>
- * <hr/>
- * Blood 1 : <font color='red'>{{blood_1}}</font>
- * Blood 2 : <font color='red'>{{blood_2}}</font>
- * <button type="button" data-ng-click="fight()">Fight</button>
- * <button type="button" data-ng-click="stopFight()">StopFight</button>
- * <button type="button" data-ng-click="resetFight()">resetFight</button>
- * </div>
- * </div>
- *
- * </file>
- * </example>
- */
- function interval(fn, delay, count, invokeApply) {
- var hasParams = arguments.length > 4,
- args = hasParams ? sliceArgs(arguments, 4) : [],
- setInterval = $window.setInterval,
- clearInterval = $window.clearInterval,
- iteration = 0,
- skipApply = (isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise;
-
- count = isDefined(count) ? count : 0;
-
- promise.$$intervalId = setInterval(function tick() {
- if (skipApply) {
- $browser.defer(callback);
- } else {
- $rootScope.$evalAsync(callback);
- }
- deferred.notify(iteration++);
-
- if (count > 0 && iteration >= count) {
- deferred.resolve(iteration);
- clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- }
-
- if (!skipApply) $rootScope.$apply();
-
- }, delay);
-
- intervals[promise.$$intervalId] = deferred;
-
- return promise;
-
- function callback() {
- if (!hasParams) {
- fn(iteration);
- } else {
- fn.apply(null, args);
- }
- }
- }
-
-
- /**
- * @ngdoc method
- * @name $interval#cancel
- *
- * @description
- * Cancels a task associated with the `promise`.
- *
- * @param {Promise=} promise returned by the `$interval` function.
- * @returns {boolean} Returns `true` if the task was successfully canceled.
- */
- interval.cancel = function(promise) {
- if (promise && promise.$$intervalId in intervals) {
- intervals[promise.$$intervalId].reject('canceled');
- $window.clearInterval(promise.$$intervalId);
- delete intervals[promise.$$intervalId];
- return true;
- }
- return false;
- };
-
- return interval;
- }];
-}
-
-/**
- * @ngdoc service
- * @name $locale
- *
- * @description
- * $locale service provides localization rules for various Angular components. As of right now the
- * only public api is:
- *
- * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)
- */
-
-var PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
- DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
-var $locationMinErr = minErr('$location');
-
-
-/**
- * Encode path using encodeUriSegment, ignoring forward slashes
- *
- * @param {string} path Path to encode
- * @returns {string}
- */
-function encodePath(path) {
- var segments = path.split('/'),
- i = segments.length;
-
- while (i--) {
- segments[i] = encodeUriSegment(segments[i]);
- }
-
- return segments.join('/');
-}
-
-function parseAbsoluteUrl(absoluteUrl, locationObj) {
- var parsedUrl = urlResolve(absoluteUrl);
-
- locationObj.$$protocol = parsedUrl.protocol;
- locationObj.$$host = parsedUrl.hostname;
- locationObj.$$port = toInt(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;
-}
-
-
-function parseAppUrl(relativeUrl, locationObj) {
- var prefixed = (relativeUrl.charAt(0) !== '/');
- if (prefixed) {
- relativeUrl = '/' + relativeUrl;
- }
- var match = urlResolve(relativeUrl);
- locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?
- match.pathname.substring(1) : match.pathname);
- locationObj.$$search = parseKeyValue(match.search);
- locationObj.$$hash = decodeURIComponent(match.hash);
-
- // make sure path starts with '/';
- if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {
- locationObj.$$path = '/' + locationObj.$$path;
- }
-}
-
-
-/**
- *
- * @param {string} begin
- * @param {string} whole
- * @returns {string} returns text from whole after begin or undefined if it does not begin with
- * expected string.
- */
-function beginsWith(begin, whole) {
- if (whole.indexOf(begin) === 0) {
- return whole.substr(begin.length);
- }
-}
-
-
-function stripHash(url) {
- var index = url.indexOf('#');
- return index == -1 ? url : url.substr(0, index);
-}
-
-function trimEmptyHash(url) {
- return url.replace(/(#.+)|#$/, '$1');
-}
-
-
-function stripFile(url) {
- return url.substr(0, stripHash(url).lastIndexOf('/') + 1);
-}
-
-/* return the server only (scheme://host:port) */
-function serverBase(url) {
- return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));
-}
-
-
-/**
- * LocationHtml5Url represents an url
- * This object is exposed as $location service when HTML5 mode is enabled and supported
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} basePrefix url path prefix
- */
-function LocationHtml5Url(appBase, appBaseNoFile, basePrefix) {
- this.$$html5 = true;
- basePrefix = basePrefix || '';
- parseAbsoluteUrl(appBase, this);
-
-
- /**
- * Parse given html5 (regular) url string into properties
- * @param {string} url HTML5 url
- * @private
- */
- this.$$parse = function(url) {
- var pathUrl = beginsWith(appBaseNoFile, url);
- if (!isString(pathUrl)) {
- throw $locationMinErr('ipthprfx', 'Invalid url "{0}", missing path prefix "{1}".', url,
- appBaseNoFile);
- }
-
- parseAppUrl(pathUrl, this);
-
- if (!this.$$path) {
- this.$$path = '/';
- }
-
- this.$$compose();
- };
-
- /**
- * Compose url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'
- };
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (relHref && relHref[0] === '#') {
- // special case for links to hash fragments:
- // keep the old url and only replace the hash fragment
- this.hash(relHref.slice(1));
- return true;
- }
- var appUrl, prevAppUrl;
- var rewrittenUrl;
-
- if (isDefined(appUrl = beginsWith(appBase, url))) {
- prevAppUrl = appUrl;
- if (isDefined(appUrl = beginsWith(basePrefix, appUrl))) {
- rewrittenUrl = appBaseNoFile + (beginsWith('/', appUrl) || appUrl);
- } else {
- rewrittenUrl = appBase + prevAppUrl;
- }
- } else if (isDefined(appUrl = beginsWith(appBaseNoFile, url))) {
- rewrittenUrl = appBaseNoFile + appUrl;
- } else if (appBaseNoFile == url + '/') {
- rewrittenUrl = appBaseNoFile;
- }
- if (rewrittenUrl) {
- this.$$parse(rewrittenUrl);
- }
- return !!rewrittenUrl;
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when developer doesn't opt into html5 mode.
- * It also serves as the base class for html5 mode fallback on legacy browsers.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangUrl(appBase, appBaseNoFile, hashPrefix) {
-
- parseAbsoluteUrl(appBase, this);
-
-
- /**
- * Parse given hashbang url into properties
- * @param {string} url Hashbang url
- * @private
- */
- this.$$parse = function(url) {
- var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
- var withoutHashUrl;
-
- if (!isUndefined(withoutBaseUrl) && withoutBaseUrl.charAt(0) === '#') {
-
- // The rest of the url starts with a hash so we have
- // got either a hashbang path or a plain hash fragment
- withoutHashUrl = beginsWith(hashPrefix, withoutBaseUrl);
- if (isUndefined(withoutHashUrl)) {
- // There was no hashbang prefix so we just have a hash fragment
- withoutHashUrl = withoutBaseUrl;
- }
-
- } else {
- // There was no hashbang path nor hash fragment:
- // If we are in HTML5 mode we use what is left as the path;
- // Otherwise we ignore what is left
- if (this.$$html5) {
- withoutHashUrl = withoutBaseUrl;
- } else {
- withoutHashUrl = '';
- if (isUndefined(withoutBaseUrl)) {
- appBase = url;
- this.replace();
- }
- }
- }
-
- parseAppUrl(withoutHashUrl, this);
-
- this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);
-
- this.$$compose();
-
- /*
- * In Windows, on an anchor node on documents loaded from
- * the filesystem, the browser will return a pathname
- * prefixed with the drive name ('/C:/path') when a
- * pathname without a drive is set:
- * * a.setAttribute('href', '/foo')
- * * a.pathname === '/C:/foo' //true
- *
- * Inside of Angular, we're always using pathnames that
- * do not include drive names for routing.
- */
- function removeWindowsDriveName(path, url, base) {
- /*
- Matches paths for file protocol on windows,
- such as /C:/foo/bar, and captures only /foo/bar.
- */
- var windowsFilePathExp = /^\/[A-Z]:(\/.*)/;
-
- var firstPathSegmentMatch;
-
- //Get the relative path from the input URL.
- if (url.indexOf(base) === 0) {
- url = url.replace(base, '');
- }
-
- // The input URL intentionally contains a first path segment that ends with a colon.
- if (windowsFilePathExp.exec(url)) {
- return path;
- }
-
- firstPathSegmentMatch = windowsFilePathExp.exec(path);
- return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;
- }
- };
-
- /**
- * Compose hashbang url and update `absUrl` property
- * @private
- */
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');
- };
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (stripHash(appBase) == stripHash(url)) {
- this.$$parse(url);
- return true;
- }
- return false;
- };
-}
-
-
-/**
- * LocationHashbangUrl represents url
- * This object is exposed as $location service when html5 history api is enabled but the browser
- * does not support it.
- *
- * @constructor
- * @param {string} appBase application base URL
- * @param {string} appBaseNoFile application base URL stripped of any filename
- * @param {string} hashPrefix hashbang prefix
- */
-function LocationHashbangInHtml5Url(appBase, appBaseNoFile, hashPrefix) {
- this.$$html5 = true;
- LocationHashbangUrl.apply(this, arguments);
-
- this.$$parseLinkUrl = function(url, relHref) {
- if (relHref && relHref[0] === '#') {
- // special case for links to hash fragments:
- // keep the old url and only replace the hash fragment
- this.hash(relHref.slice(1));
- return true;
- }
-
- var rewrittenUrl;
- var appUrl;
-
- if (appBase == stripHash(url)) {
- rewrittenUrl = url;
- } else if ((appUrl = beginsWith(appBaseNoFile, url))) {
- rewrittenUrl = appBase + hashPrefix + appUrl;
- } else if (appBaseNoFile === url + '/') {
- rewrittenUrl = appBaseNoFile;
- }
- if (rewrittenUrl) {
- this.$$parse(rewrittenUrl);
- }
- return !!rewrittenUrl;
- };
-
- this.$$compose = function() {
- var search = toKeyValue(this.$$search),
- hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';
-
- this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;
- // include hashPrefix in $$absUrl when $$url is empty so IE9 does not reload page because of removal of '#'
- this.$$absUrl = appBase + hashPrefix + this.$$url;
- };
-
-}
-
-
-var locationPrototype = {
-
- /**
- * Are we in html5 mode?
- * @private
- */
- $$html5: false,
-
- /**
- * Has any change been replacing?
- * @private
- */
- $$replace: false,
-
- /**
- * @ngdoc method
- * @name $location#absUrl
- *
- * @description
- * This method is getter only.
- *
- * Return full url representation with all segments encoded according to rules specified in
- * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var absUrl = $location.absUrl();
- * // => "http://example.com/#/some/path?foo=bar&baz=xoxo"
- * ```
- *
- * @return {string} full url
- */
- absUrl: locationGetter('$$absUrl'),
-
- /**
- * @ngdoc method
- * @name $location#url
- *
- * @description
- * This method is getter / setter.
- *
- * Return url (e.g. `/path?a=b#hash`) when called without any parameter.
- *
- * Change path, search and hash, when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var url = $location.url();
- * // => "/some/path?foo=bar&baz=xoxo"
- * ```
- *
- * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)
- * @return {string} url
- */
- url: function(url) {
- if (isUndefined(url)) {
- return this.$$url;
- }
-
- var match = PATH_MATCH.exec(url);
- if (match[1] || url === '') this.path(decodeURIComponent(match[1]));
- if (match[2] || match[1] || url === '') this.search(match[3] || '');
- this.hash(match[5] || '');
-
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#protocol
- *
- * @description
- * This method is getter only.
- *
- * Return protocol of current url.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var protocol = $location.protocol();
- * // => "http"
- * ```
- *
- * @return {string} protocol of current url
- */
- protocol: locationGetter('$$protocol'),
-
- /**
- * @ngdoc method
- * @name $location#host
- *
- * @description
- * This method is getter only.
- *
- * Return host of current url.
- *
- * Note: compared to the non-angular version `location.host` which returns `hostname:port`, this returns the `hostname` portion only.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var host = $location.host();
- * // => "example.com"
- *
- * // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo
- * host = $location.host();
- * // => "example.com"
- * host = location.host;
- * // => "example.com:8080"
- * ```
- *
- * @return {string} host of current url.
- */
- host: locationGetter('$$host'),
-
- /**
- * @ngdoc method
- * @name $location#port
- *
- * @description
- * This method is getter only.
- *
- * Return port of current url.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var port = $location.port();
- * // => 80
- * ```
- *
- * @return {Number} port
- */
- port: locationGetter('$$port'),
-
- /**
- * @ngdoc method
- * @name $location#path
- *
- * @description
- * This method is getter / setter.
- *
- * Return path of current url when called without any parameter.
- *
- * Change path when called with parameter and return `$location`.
- *
- * Note: Path should always begin with forward slash (/), this method will add the forward slash
- * if it is missing.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var path = $location.path();
- * // => "/some/path"
- * ```
- *
- * @param {(string|number)=} path New path
- * @return {string} path
- */
- path: locationGetterSetter('$$path', function(path) {
- path = path !== null ? path.toString() : '';
- return path.charAt(0) == '/' ? path : '/' + path;
- }),
-
- /**
- * @ngdoc method
- * @name $location#search
- *
- * @description
- * This method is getter / setter.
- *
- * Return search part (as object) of current url when called without any parameter.
- *
- * Change search part when called with parameter and return `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo
- * var searchObject = $location.search();
- * // => {foo: 'bar', baz: 'xoxo'}
- *
- * // set foo to 'yipee'
- * $location.search('foo', 'yipee');
- * // $location.search() => {foo: 'yipee', baz: 'xoxo'}
- * ```
- *
- * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or
- * hash object.
- *
- * When called with a single argument the method acts as a setter, setting the `search` component
- * of `$location` to the specified value.
- *
- * If the argument is a hash object containing an array of values, these values will be encoded
- * as duplicate search parameters in the url.
- *
- * @param {(string|Number|Array<string>|boolean)=} paramValue If `search` is a string or number, then `paramValue`
- * will override only a single search property.
- *
- * If `paramValue` is an array, it will override the property of the `search` component of
- * `$location` specified via the first argument.
- *
- * If `paramValue` is `null`, the property specified via the first argument will be deleted.
- *
- * If `paramValue` is `true`, the property specified via the first argument will be added with no
- * value nor trailing equal sign.
- *
- * @return {Object} If called with no arguments returns the parsed `search` object. If called with
- * one or more arguments returns `$location` object itself.
- */
- search: function(search, paramValue) {
- switch (arguments.length) {
- case 0:
- return this.$$search;
- case 1:
- if (isString(search) || isNumber(search)) {
- search = search.toString();
- this.$$search = parseKeyValue(search);
- } else if (isObject(search)) {
- search = copy(search, {});
- // remove object undefined or null properties
- forEach(search, function(value, key) {
- if (value == null) delete search[key];
- });
-
- this.$$search = search;
- } else {
- throw $locationMinErr('isrcharg',
- 'The first argument of the `$location#search()` call must be a string or an object.');
- }
- break;
- default:
- if (isUndefined(paramValue) || paramValue === null) {
- delete this.$$search[search];
- } else {
- this.$$search[search] = paramValue;
- }
- }
-
- this.$$compose();
- return this;
- },
-
- /**
- * @ngdoc method
- * @name $location#hash
- *
- * @description
- * This method is getter / setter.
- *
- * Returns the hash fragment when called without any parameters.
- *
- * Changes the hash fragment when called with a parameter and returns `$location`.
- *
- *
- * ```js
- * // given url http://example.com/#/some/path?foo=bar&baz=xoxo#hashValue
- * var hash = $location.hash();
- * // => "hashValue"
- * ```
- *
- * @param {(string|number)=} hash New hash fragment
- * @return {string} hash
- */
- hash: locationGetterSetter('$$hash', function(hash) {
- return hash !== null ? hash.toString() : '';
- }),
-
- /**
- * @ngdoc method
- * @name $location#replace
- *
- * @description
- * If called, all changes to $location during the current `$digest` will replace the current history
- * record, instead of adding a new one.
- */
- replace: function() {
- this.$$replace = true;
- return this;
- }
-};
-
-forEach([LocationHashbangInHtml5Url, LocationHashbangUrl, LocationHtml5Url], function(Location) {
- Location.prototype = Object.create(locationPrototype);
-
- /**
- * @ngdoc method
- * @name $location#state
- *
- * @description
- * This method is getter / setter.
- *
- * Return the history state object when called without any parameter.
- *
- * Change the history state object when called with one parameter and return `$location`.
- * The state object is later passed to `pushState` or `replaceState`.
- *
- * NOTE: This method is supported only in HTML5 mode and only in browsers supporting
- * the HTML5 History API (i.e. methods `pushState` and `replaceState`). If you need to support
- * older browsers (like IE9 or Android < 4.0), don't use this method.
- *
- * @param {object=} state State object for pushState or replaceState
- * @return {object} state
- */
- Location.prototype.state = function(state) {
- if (!arguments.length) {
- return this.$$state;
- }
-
- if (Location !== LocationHtml5Url || !this.$$html5) {
- throw $locationMinErr('nostate', 'History API state support is available only ' +
- 'in HTML5 mode and only in browsers supporting HTML5 History API');
- }
- // The user might modify `stateObject` after invoking `$location.state(stateObject)`
- // but we're changing the $$state reference to $browser.state() during the $digest
- // so the modification window is narrow.
- this.$$state = isUndefined(state) ? null : state;
-
- return this;
- };
-});
-
-
-function locationGetter(property) {
- return function() {
- return this[property];
- };
-}
-
-
-function locationGetterSetter(property, preprocess) {
- return function(value) {
- if (isUndefined(value)) {
- return this[property];
- }
-
- this[property] = preprocess(value);
- this.$$compose();
-
- return this;
- };
-}
-
-
-/**
- * @ngdoc service
- * @name $location
- *
- * @requires $rootElement
- *
- * @description
- * The $location service parses the URL in the browser address bar (based on the
- * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL
- * available to your application. Changes to the URL in the address bar are reflected into
- * $location service and changes to $location are reflected into the browser address bar.
- *
- * **The $location service:**
- *
- * - Exposes the current URL in the browser address bar, so you can
- * - Watch and observe the URL.
- * - Change the URL.
- * - Synchronizes the URL with the browser when the user
- * - Changes the address bar.
- * - Clicks the back or forward button (or clicks a History link).
- * - Clicks on a link.
- * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).
- *
- * For more information see {@link guide/$location Developer Guide: Using $location}
- */
-
-/**
- * @ngdoc provider
- * @name $locationProvider
- * @description
- * Use the `$locationProvider` to configure how the application deep linking paths are stored.
- */
-function $LocationProvider() {
- var hashPrefix = '',
- html5Mode = {
- enabled: false,
- requireBase: true,
- rewriteLinks: true
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#hashPrefix
- * @description
- * @param {string=} prefix Prefix for hash part (containing path and search)
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.hashPrefix = function(prefix) {
- if (isDefined(prefix)) {
- hashPrefix = prefix;
- return this;
- } else {
- return hashPrefix;
- }
- };
-
- /**
- * @ngdoc method
- * @name $locationProvider#html5Mode
- * @description
- * @param {(boolean|Object)=} mode If boolean, sets `html5Mode.enabled` to value.
- * If object, sets `enabled`, `requireBase` and `rewriteLinks` to respective values. Supported
- * properties:
- * - **enabled** – `{boolean}` – (default: false) If true, will rely on `history.pushState` to
- * change urls where supported. Will fall back to hash-prefixed paths in browsers that do not
- * support `pushState`.
- * - **requireBase** - `{boolean}` - (default: `true`) When html5Mode is enabled, specifies
- * whether or not a <base> tag is required to be present. If `enabled` and `requireBase` are
- * true, and a base tag is not present, an error will be thrown when `$location` is injected.
- * See the {@link guide/$location $location guide for more information}
- * - **rewriteLinks** - `{boolean}` - (default: `true`) When html5Mode is enabled,
- * enables/disables url rewriting for relative links.
- *
- * @returns {Object} html5Mode object if used as getter or itself (chaining) if used as setter
- */
- this.html5Mode = function(mode) {
- if (isBoolean(mode)) {
- html5Mode.enabled = mode;
- return this;
- } else if (isObject(mode)) {
-
- if (isBoolean(mode.enabled)) {
- html5Mode.enabled = mode.enabled;
- }
-
- if (isBoolean(mode.requireBase)) {
- html5Mode.requireBase = mode.requireBase;
- }
-
- if (isBoolean(mode.rewriteLinks)) {
- html5Mode.rewriteLinks = mode.rewriteLinks;
- }
-
- return this;
- } else {
- return html5Mode;
- }
- };
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeStart
- * @eventType broadcast on root scope
- * @description
- * Broadcasted before a URL will change.
- *
- * This change can be prevented by calling
- * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more
- * details about event object. Upon successful change
- * {@link ng.$location#$locationChangeSuccess $locationChangeSuccess} is fired.
- *
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
- * the browser supports the HTML5 History API.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- * @param {string=} newState New history state object
- * @param {string=} oldState History state object that was before it was changed.
- */
-
- /**
- * @ngdoc event
- * @name $location#$locationChangeSuccess
- * @eventType broadcast on root scope
- * @description
- * Broadcasted after a URL was changed.
- *
- * The `newState` and `oldState` parameters may be defined only in HTML5 mode and when
- * the browser supports the HTML5 History API.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {string} newUrl New URL
- * @param {string=} oldUrl URL that was before it was changed.
- * @param {string=} newState New history state object
- * @param {string=} oldState History state object that was before it was changed.
- */
-
- this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement', '$window',
- function($rootScope, $browser, $sniffer, $rootElement, $window) {
- var $location,
- LocationMode,
- baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''
- initialUrl = $browser.url(),
- appBase;
-
- if (html5Mode.enabled) {
- if (!baseHref && html5Mode.requireBase) {
- throw $locationMinErr('nobase',
- "$location in HTML5 mode requires a <base> tag to be present!");
- }
- appBase = serverBase(initialUrl) + (baseHref || '/');
- LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;
- } else {
- appBase = stripHash(initialUrl);
- LocationMode = LocationHashbangUrl;
- }
- var appBaseNoFile = stripFile(appBase);
-
- $location = new LocationMode(appBase, appBaseNoFile, '#' + hashPrefix);
- $location.$$parseLinkUrl(initialUrl, initialUrl);
-
- $location.$$state = $browser.state();
-
- var IGNORE_URI_REGEXP = /^\s*(javascript|mailto):/i;
-
- function setBrowserUrlWithFallback(url, replace, state) {
- var oldUrl = $location.url();
- var oldState = $location.$$state;
- try {
- $browser.url(url, replace, state);
-
- // Make sure $location.state() returns referentially identical (not just deeply equal)
- // state object; this makes possible quick checking if the state changed in the digest
- // loop. Checking deep equality would be too expensive.
- $location.$$state = $browser.state();
- } catch (e) {
- // Restore old values if pushState fails
- $location.url(oldUrl);
- $location.$$state = oldState;
-
- throw e;
- }
- }
-
- $rootElement.on('click', function(event) {
- // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)
- // currently we open nice url link and redirect then
-
- if (!html5Mode.rewriteLinks || event.ctrlKey || event.metaKey || event.shiftKey || event.which == 2 || event.button == 2) return;
-
- var elm = jqLite(event.target);
-
- // traverse the DOM up to find first A tag
- while (nodeName_(elm[0]) !== 'a') {
- // ignore rewriting if no A tag (reached root element, or no parent - removed from document)
- if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;
- }
-
- var absHref = elm.prop('href');
- // get the actual href attribute - see
- // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx
- var relHref = elm.attr('href') || elm.attr('xlink:href');
-
- if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {
- // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during
- // an animation.
- absHref = urlResolve(absHref.animVal).href;
- }
-
- // Ignore when url is started with javascript: or mailto:
- if (IGNORE_URI_REGEXP.test(absHref)) return;
-
- if (absHref && !elm.attr('target') && !event.isDefaultPrevented()) {
- if ($location.$$parseLinkUrl(absHref, relHref)) {
- // We do a preventDefault for all urls that are part of the angular application,
- // in html5mode and also without, so that we are able to abort navigation without
- // getting double entries in the location history.
- event.preventDefault();
- // update location manually
- if ($location.absUrl() != $browser.url()) {
- $rootScope.$apply();
- // hack to work around FF6 bug 684208 when scenario runner clicks on links
- $window.angular['ff-684208-preventDefault'] = true;
- }
- }
- }
- });
-
-
- // rewrite hashbang url <> html5 url
- if (trimEmptyHash($location.absUrl()) != trimEmptyHash(initialUrl)) {
- $browser.url($location.absUrl(), true);
- }
-
- var initializing = true;
-
- // update $location when $browser url changes
- $browser.onUrlChange(function(newUrl, newState) {
-
- if (isUndefined(beginsWith(appBaseNoFile, newUrl))) {
- // If we are navigating outside of the app then force a reload
- $window.location.href = newUrl;
- return;
- }
-
- $rootScope.$evalAsync(function() {
- var oldUrl = $location.absUrl();
- var oldState = $location.$$state;
- var defaultPrevented;
- newUrl = trimEmptyHash(newUrl);
- $location.$$parse(newUrl);
- $location.$$state = newState;
-
- defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
- newState, oldState).defaultPrevented;
-
- // if the location was changed by a `$locationChangeStart` handler then stop
- // processing this location change
- if ($location.absUrl() !== newUrl) return;
-
- if (defaultPrevented) {
- $location.$$parse(oldUrl);
- $location.$$state = oldState;
- setBrowserUrlWithFallback(oldUrl, false, oldState);
- } else {
- initializing = false;
- afterLocationChange(oldUrl, oldState);
- }
- });
- if (!$rootScope.$$phase) $rootScope.$digest();
- });
-
- // update browser
- $rootScope.$watch(function $locationWatch() {
- var oldUrl = trimEmptyHash($browser.url());
- var newUrl = trimEmptyHash($location.absUrl());
- var oldState = $browser.state();
- var currentReplace = $location.$$replace;
- var urlOrStateChanged = oldUrl !== newUrl ||
- ($location.$$html5 && $sniffer.history && oldState !== $location.$$state);
-
- if (initializing || urlOrStateChanged) {
- initializing = false;
-
- $rootScope.$evalAsync(function() {
- var newUrl = $location.absUrl();
- var defaultPrevented = $rootScope.$broadcast('$locationChangeStart', newUrl, oldUrl,
- $location.$$state, oldState).defaultPrevented;
-
- // if the location was changed by a `$locationChangeStart` handler then stop
- // processing this location change
- if ($location.absUrl() !== newUrl) return;
-
- if (defaultPrevented) {
- $location.$$parse(oldUrl);
- $location.$$state = oldState;
- } else {
- if (urlOrStateChanged) {
- setBrowserUrlWithFallback(newUrl, currentReplace,
- oldState === $location.$$state ? null : $location.$$state);
- }
- afterLocationChange(oldUrl, oldState);
- }
- });
- }
-
- $location.$$replace = false;
-
- // we don't need to return anything because $evalAsync will make the digest loop dirty when
- // there is a change
- });
-
- return $location;
-
- function afterLocationChange(oldUrl, oldState) {
- $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl,
- $location.$$state, oldState);
- }
-}];
-}
-
-/**
- * @ngdoc service
- * @name $log
- * @requires $window
- *
- * @description
- * Simple service for logging. Default implementation safely writes the message
- * into the browser's console (if present).
- *
- * The main purpose of this service is to simplify debugging and troubleshooting.
- *
- * The default is to log `debug` messages. You can use
- * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.
- *
- * @example
- <example module="logExample">
- <file name="script.js">
- angular.module('logExample', [])
- .controller('LogController', ['$scope', '$log', function($scope, $log) {
- $scope.$log = $log;
- $scope.message = 'Hello World!';
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="LogController">
- <p>Reload this page with open console, enter text and hit the log button...</p>
- <label>Message:
- <input type="text" ng-model="message" /></label>
- <button ng-click="$log.log(message)">log</button>
- <button ng-click="$log.warn(message)">warn</button>
- <button ng-click="$log.info(message)">info</button>
- <button ng-click="$log.error(message)">error</button>
- <button ng-click="$log.debug(message)">debug</button>
- </div>
- </file>
- </example>
- */
-
-/**
- * @ngdoc provider
- * @name $logProvider
- * @description
- * Use the `$logProvider` to configure how the application logs messages
- */
-function $LogProvider() {
- var debug = true,
- self = this;
-
- /**
- * @ngdoc method
- * @name $logProvider#debugEnabled
- * @description
- * @param {boolean=} flag enable or disable debug level messages
- * @returns {*} current value if used as getter or itself (chaining) if used as setter
- */
- this.debugEnabled = function(flag) {
- if (isDefined(flag)) {
- debug = flag;
- return this;
- } else {
- return debug;
- }
- };
-
- this.$get = ['$window', function($window) {
- return {
- /**
- * @ngdoc method
- * @name $log#log
- *
- * @description
- * Write a log message
- */
- log: consoleLog('log'),
-
- /**
- * @ngdoc method
- * @name $log#info
- *
- * @description
- * Write an information message
- */
- info: consoleLog('info'),
-
- /**
- * @ngdoc method
- * @name $log#warn
- *
- * @description
- * Write a warning message
- */
- warn: consoleLog('warn'),
-
- /**
- * @ngdoc method
- * @name $log#error
- *
- * @description
- * Write an error message
- */
- error: consoleLog('error'),
-
- /**
- * @ngdoc method
- * @name $log#debug
- *
- * @description
- * Write a debug message
- */
- debug: (function() {
- var fn = consoleLog('debug');
-
- return function() {
- if (debug) {
- fn.apply(self, arguments);
- }
- };
- }())
- };
-
- function formatError(arg) {
- if (arg instanceof Error) {
- if (arg.stack) {
- arg = (arg.message && arg.stack.indexOf(arg.message) === -1)
- ? 'Error: ' + arg.message + '\n' + arg.stack
- : arg.stack;
- } else if (arg.sourceURL) {
- arg = arg.message + '\n' + arg.sourceURL + ':' + arg.line;
- }
- }
- return arg;
- }
-
- function consoleLog(type) {
- var console = $window.console || {},
- logFn = console[type] || console.log || noop,
- hasApply = false;
-
- // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.
- // The reason behind this is that console.log has type "object" in IE8...
- try {
- hasApply = !!logFn.apply;
- } catch (e) {}
-
- if (hasApply) {
- return function() {
- var args = [];
- forEach(arguments, function(arg) {
- args.push(formatError(arg));
- });
- return logFn.apply(console, args);
- };
- }
-
- // we are IE which either doesn't have window.console => this is noop and we do nothing,
- // or we are IE where console.log doesn't have apply so we log at least first 2 args
- return function(arg1, arg2) {
- logFn(arg1, arg2 == null ? '' : arg2);
- };
- }
- }];
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-var $parseMinErr = minErr('$parse');
-
-// Sandboxing Angular Expressions
-// ------------------------------
-// Angular expressions are generally considered safe because these expressions only have direct
-// access to `$scope` and locals. However, one can obtain the ability to execute arbitrary JS code by
-// obtaining a reference to native JS functions such as the Function constructor.
-//
-// As an example, consider the following Angular expression:
-//
-// {}.toString.constructor('alert("evil JS code")')
-//
-// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits
-// against the expression language, but not to prevent exploits that were enabled by exposing
-// sensitive JavaScript or browser APIs on Scope. Exposing such objects on a Scope is never a good
-// practice and therefore we are not even trying to protect against interaction with an object
-// explicitly exposed in this way.
-//
-// In general, it is not possible to access a Window object from an angular expression unless a
-// window or some DOM object that has a reference to window is published onto a Scope.
-// Similarly we prevent invocations of function known to be dangerous, as well as assignments to
-// native objects.
-//
-// See https://docs.angularjs.org/guide/security
-
-
-function ensureSafeMemberName(name, fullExpression) {
- if (name === "__defineGetter__" || name === "__defineSetter__"
- || name === "__lookupGetter__" || name === "__lookupSetter__"
- || name === "__proto__") {
- throw $parseMinErr('isecfld',
- 'Attempting to access a disallowed field in Angular expressions! '
- + 'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function getStringValue(name, fullExpression) {
- // From the JavaScript docs:
- // Property names must be strings. This means that non-string objects cannot be used
- // as keys in an object. Any non-string object, including a number, is typecasted
- // into a string via the toString method.
- //
- // So, to ensure that we are checking the same `name` that JavaScript would use,
- // we cast it to a string, if possible.
- // Doing `name + ''` can cause a repl error if the result to `toString` is not a string,
- // this is, this will handle objects that misbehave.
- name = name + '';
- if (!isString(name)) {
- throw $parseMinErr('iseccst',
- 'Cannot convert object to primitive value! '
- + 'Expression: {0}', fullExpression);
- }
- return name;
-}
-
-function ensureSafeObject(obj, fullExpression) {
- // nifty check if obj is Function that is fast and works across iframes and other contexts
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isWindow(obj)
- obj.window === obj) {
- throw $parseMinErr('isecwindow',
- 'Referencing the Window in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// isElement(obj)
- obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {
- throw $parseMinErr('isecdom',
- 'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (// block Object so that we can't get hold of dangerous Object.* methods
- obj === Object) {
- throw $parseMinErr('isecobj',
- 'Referencing Object in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
- return obj;
-}
-
-var CALL = Function.prototype.call;
-var APPLY = Function.prototype.apply;
-var BIND = Function.prototype.bind;
-
-function ensureSafeFunction(obj, fullExpression) {
- if (obj) {
- if (obj.constructor === obj) {
- throw $parseMinErr('isecfn',
- 'Referencing Function in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- } else if (obj === CALL || obj === APPLY || obj === BIND) {
- throw $parseMinErr('isecff',
- 'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',
- fullExpression);
- }
- }
-}
-
-function ensureSafeAssignContext(obj, fullExpression) {
- if (obj) {
- if (obj === (0).constructor || obj === (false).constructor || obj === ''.constructor ||
- obj === {}.constructor || obj === [].constructor || obj === Function.constructor) {
- throw $parseMinErr('isecaf',
- 'Assigning to a constructor is disallowed! Expression: {0}', fullExpression);
- }
- }
-}
-
-var OPERATORS = createMap();
-forEach('+ - * / % === !== == != < > <= >= && || ! = |'.split(' '), function(operator) { OPERATORS[operator] = true; });
-var ESCAPE = {"n":"\n", "f":"\f", "r":"\r", "t":"\t", "v":"\v", "'":"'", '"':'"'};
-
-
-/////////////////////////////////////////
-
-
-/**
- * @constructor
- */
-var Lexer = function(options) {
- this.options = options;
-};
-
-Lexer.prototype = {
- constructor: Lexer,
-
- lex: function(text) {
- this.text = text;
- this.index = 0;
- this.tokens = [];
-
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- if (ch === '"' || ch === "'") {
- this.readString(ch);
- } else if (this.isNumber(ch) || ch === '.' && this.isNumber(this.peek())) {
- this.readNumber();
- } else if (this.isIdent(ch)) {
- this.readIdent();
- } else if (this.is(ch, '(){}[].,;:?')) {
- this.tokens.push({index: this.index, text: ch});
- this.index++;
- } else if (this.isWhitespace(ch)) {
- this.index++;
- } else {
- var ch2 = ch + this.peek();
- var ch3 = ch2 + this.peek(2);
- var op1 = OPERATORS[ch];
- var op2 = OPERATORS[ch2];
- var op3 = OPERATORS[ch3];
- if (op1 || op2 || op3) {
- var token = op3 ? ch3 : (op2 ? ch2 : ch);
- this.tokens.push({index: this.index, text: token, operator: true});
- this.index += token.length;
- } else {
- this.throwError('Unexpected next character ', this.index, this.index + 1);
- }
- }
- }
- return this.tokens;
- },
-
- is: function(ch, chars) {
- return chars.indexOf(ch) !== -1;
- },
-
- peek: function(i) {
- var num = i || 1;
- return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;
- },
-
- isNumber: function(ch) {
- return ('0' <= ch && ch <= '9') && typeof ch === "string";
- },
-
- isWhitespace: function(ch) {
- // IE treats non-breaking space as \u00A0
- return (ch === ' ' || ch === '\r' || ch === '\t' ||
- ch === '\n' || ch === '\v' || ch === '\u00A0');
- },
-
- isIdent: function(ch) {
- return ('a' <= ch && ch <= 'z' ||
- 'A' <= ch && ch <= 'Z' ||
- '_' === ch || ch === '$');
- },
-
- isExpOperator: function(ch) {
- return (ch === '-' || ch === '+' || this.isNumber(ch));
- },
-
- throwError: function(error, start, end) {
- end = end || this.index;
- var colStr = (isDefined(start)
- ? 's ' + start + '-' + this.index + ' [' + this.text.substring(start, end) + ']'
- : ' ' + end);
- throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',
- error, colStr, this.text);
- },
-
- readNumber: function() {
- var number = '';
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = lowercase(this.text.charAt(this.index));
- if (ch == '.' || this.isNumber(ch)) {
- number += ch;
- } else {
- var peekCh = this.peek();
- if (ch == 'e' && this.isExpOperator(peekCh)) {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- peekCh && this.isNumber(peekCh) &&
- number.charAt(number.length - 1) == 'e') {
- number += ch;
- } else if (this.isExpOperator(ch) &&
- (!peekCh || !this.isNumber(peekCh)) &&
- number.charAt(number.length - 1) == 'e') {
- this.throwError('Invalid exponent');
- } else {
- break;
- }
- }
- this.index++;
- }
- this.tokens.push({
- index: start,
- text: number,
- constant: true,
- value: Number(number)
- });
- },
-
- readIdent: function() {
- var start = this.index;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- if (!(this.isIdent(ch) || this.isNumber(ch))) {
- break;
- }
- this.index++;
- }
- this.tokens.push({
- index: start,
- text: this.text.slice(start, this.index),
- identifier: true
- });
- },
-
- readString: function(quote) {
- var start = this.index;
- this.index++;
- var string = '';
- var rawString = quote;
- var escape = false;
- while (this.index < this.text.length) {
- var ch = this.text.charAt(this.index);
- rawString += ch;
- if (escape) {
- if (ch === 'u') {
- var hex = this.text.substring(this.index + 1, this.index + 5);
- if (!hex.match(/[\da-f]{4}/i)) {
- this.throwError('Invalid unicode escape [\\u' + hex + ']');
- }
- this.index += 4;
- string += String.fromCharCode(parseInt(hex, 16));
- } else {
- var rep = ESCAPE[ch];
- string = string + (rep || ch);
- }
- escape = false;
- } else if (ch === '\\') {
- escape = true;
- } else if (ch === quote) {
- this.index++;
- this.tokens.push({
- index: start,
- text: rawString,
- constant: true,
- value: string
- });
- return;
- } else {
- string += ch;
- }
- this.index++;
- }
- this.throwError('Unterminated quote', start);
- }
-};
-
-var AST = function(lexer, options) {
- this.lexer = lexer;
- this.options = options;
-};
-
-AST.Program = 'Program';
-AST.ExpressionStatement = 'ExpressionStatement';
-AST.AssignmentExpression = 'AssignmentExpression';
-AST.ConditionalExpression = 'ConditionalExpression';
-AST.LogicalExpression = 'LogicalExpression';
-AST.BinaryExpression = 'BinaryExpression';
-AST.UnaryExpression = 'UnaryExpression';
-AST.CallExpression = 'CallExpression';
-AST.MemberExpression = 'MemberExpression';
-AST.Identifier = 'Identifier';
-AST.Literal = 'Literal';
-AST.ArrayExpression = 'ArrayExpression';
-AST.Property = 'Property';
-AST.ObjectExpression = 'ObjectExpression';
-AST.ThisExpression = 'ThisExpression';
-
-// Internal use only
-AST.NGValueParameter = 'NGValueParameter';
-
-AST.prototype = {
- ast: function(text) {
- this.text = text;
- this.tokens = this.lexer.lex(text);
-
- var value = this.program();
-
- if (this.tokens.length !== 0) {
- this.throwError('is an unexpected token', this.tokens[0]);
- }
-
- return value;
- },
-
- program: function() {
- var body = [];
- while (true) {
- if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))
- body.push(this.expressionStatement());
- if (!this.expect(';')) {
- return { type: AST.Program, body: body};
- }
- }
- },
-
- expressionStatement: function() {
- return { type: AST.ExpressionStatement, expression: this.filterChain() };
- },
-
- filterChain: function() {
- var left = this.expression();
- var token;
- while ((token = this.expect('|'))) {
- left = this.filter(left);
- }
- return left;
- },
-
- expression: function() {
- return this.assignment();
- },
-
- assignment: function() {
- var result = this.ternary();
- if (this.expect('=')) {
- result = { type: AST.AssignmentExpression, left: result, right: this.assignment(), operator: '='};
- }
- return result;
- },
-
- ternary: function() {
- var test = this.logicalOR();
- var alternate;
- var consequent;
- if (this.expect('?')) {
- alternate = this.expression();
- if (this.consume(':')) {
- consequent = this.expression();
- return { type: AST.ConditionalExpression, test: test, alternate: alternate, consequent: consequent};
- }
- }
- return test;
- },
-
- logicalOR: function() {
- var left = this.logicalAND();
- while (this.expect('||')) {
- left = { type: AST.LogicalExpression, operator: '||', left: left, right: this.logicalAND() };
- }
- return left;
- },
-
- logicalAND: function() {
- var left = this.equality();
- while (this.expect('&&')) {
- left = { type: AST.LogicalExpression, operator: '&&', left: left, right: this.equality()};
- }
- return left;
- },
-
- equality: function() {
- var left = this.relational();
- var token;
- while ((token = this.expect('==','!=','===','!=='))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.relational() };
- }
- return left;
- },
-
- relational: function() {
- var left = this.additive();
- var token;
- while ((token = this.expect('<', '>', '<=', '>='))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.additive() };
- }
- return left;
- },
-
- additive: function() {
- var left = this.multiplicative();
- var token;
- while ((token = this.expect('+','-'))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.multiplicative() };
- }
- return left;
- },
-
- multiplicative: function() {
- var left = this.unary();
- var token;
- while ((token = this.expect('*','/','%'))) {
- left = { type: AST.BinaryExpression, operator: token.text, left: left, right: this.unary() };
- }
- return left;
- },
-
- unary: function() {
- var token;
- if ((token = this.expect('+', '-', '!'))) {
- return { type: AST.UnaryExpression, operator: token.text, prefix: true, argument: this.unary() };
- } else {
- return this.primary();
- }
- },
-
- primary: function() {
- var primary;
- if (this.expect('(')) {
- primary = this.filterChain();
- this.consume(')');
- } else if (this.expect('[')) {
- primary = this.arrayDeclaration();
- } else if (this.expect('{')) {
- primary = this.object();
- } else if (this.constants.hasOwnProperty(this.peek().text)) {
- primary = copy(this.constants[this.consume().text]);
- } else if (this.peek().identifier) {
- primary = this.identifier();
- } else if (this.peek().constant) {
- primary = this.constant();
- } else {
- this.throwError('not a primary expression', this.peek());
- }
-
- var next;
- while ((next = this.expect('(', '[', '.'))) {
- if (next.text === '(') {
- primary = {type: AST.CallExpression, callee: primary, arguments: this.parseArguments() };
- this.consume(')');
- } else if (next.text === '[') {
- primary = { type: AST.MemberExpression, object: primary, property: this.expression(), computed: true };
- this.consume(']');
- } else if (next.text === '.') {
- primary = { type: AST.MemberExpression, object: primary, property: this.identifier(), computed: false };
- } else {
- this.throwError('IMPOSSIBLE');
- }
- }
- return primary;
- },
-
- filter: function(baseExpression) {
- var args = [baseExpression];
- var result = {type: AST.CallExpression, callee: this.identifier(), arguments: args, filter: true};
-
- while (this.expect(':')) {
- args.push(this.expression());
- }
-
- return result;
- },
-
- parseArguments: function() {
- var args = [];
- if (this.peekToken().text !== ')') {
- do {
- args.push(this.expression());
- } while (this.expect(','));
- }
- return args;
- },
-
- identifier: function() {
- var token = this.consume();
- if (!token.identifier) {
- this.throwError('is not a valid identifier', token);
- }
- return { type: AST.Identifier, name: token.text };
- },
-
- constant: function() {
- // TODO check that it is a constant
- return { type: AST.Literal, value: this.consume().value };
- },
-
- arrayDeclaration: function() {
- var elements = [];
- if (this.peekToken().text !== ']') {
- do {
- if (this.peek(']')) {
- // Support trailing commas per ES5.1.
- break;
- }
- elements.push(this.expression());
- } while (this.expect(','));
- }
- this.consume(']');
-
- return { type: AST.ArrayExpression, elements: elements };
- },
-
- object: function() {
- var properties = [], property;
- if (this.peekToken().text !== '}') {
- do {
- if (this.peek('}')) {
- // Support trailing commas per ES5.1.
- break;
- }
- property = {type: AST.Property, kind: 'init'};
- if (this.peek().constant) {
- property.key = this.constant();
- } else if (this.peek().identifier) {
- property.key = this.identifier();
- } else {
- this.throwError("invalid key", this.peek());
- }
- this.consume(':');
- property.value = this.expression();
- properties.push(property);
- } while (this.expect(','));
- }
- this.consume('}');
-
- return {type: AST.ObjectExpression, properties: properties };
- },
-
- throwError: function(msg, token) {
- throw $parseMinErr('syntax',
- 'Syntax Error: Token \'{0}\' {1} at column {2} of the expression [{3}] starting at [{4}].',
- token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));
- },
-
- consume: function(e1) {
- if (this.tokens.length === 0) {
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- }
-
- var token = this.expect(e1);
- if (!token) {
- this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());
- }
- return token;
- },
-
- peekToken: function() {
- if (this.tokens.length === 0) {
- throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);
- }
- return this.tokens[0];
- },
-
- peek: function(e1, e2, e3, e4) {
- return this.peekAhead(0, e1, e2, e3, e4);
- },
-
- peekAhead: function(i, e1, e2, e3, e4) {
- if (this.tokens.length > i) {
- var token = this.tokens[i];
- var t = token.text;
- if (t === e1 || t === e2 || t === e3 || t === e4 ||
- (!e1 && !e2 && !e3 && !e4)) {
- return token;
- }
- }
- return false;
- },
-
- expect: function(e1, e2, e3, e4) {
- var token = this.peek(e1, e2, e3, e4);
- if (token) {
- this.tokens.shift();
- return token;
- }
- return false;
- },
-
-
- /* `undefined` is not a constant, it is an identifier,
- * but using it as an identifier is not supported
- */
- constants: {
- 'true': { type: AST.Literal, value: true },
- 'false': { type: AST.Literal, value: false },
- 'null': { type: AST.Literal, value: null },
- 'undefined': {type: AST.Literal, value: undefined },
- 'this': {type: AST.ThisExpression }
- }
-};
-
-function ifDefined(v, d) {
- return typeof v !== 'undefined' ? v : d;
-}
-
-function plusFn(l, r) {
- if (typeof l === 'undefined') return r;
- if (typeof r === 'undefined') return l;
- return l + r;
-}
-
-function isStateless($filter, filterName) {
- var fn = $filter(filterName);
- return !fn.$stateful;
-}
-
-function findConstantAndWatchExpressions(ast, $filter) {
- var allConstants;
- var argsToWatch;
- switch (ast.type) {
- case AST.Program:
- allConstants = true;
- forEach(ast.body, function(expr) {
- findConstantAndWatchExpressions(expr.expression, $filter);
- allConstants = allConstants && expr.expression.constant;
- });
- ast.constant = allConstants;
- break;
- case AST.Literal:
- ast.constant = true;
- ast.toWatch = [];
- break;
- case AST.UnaryExpression:
- findConstantAndWatchExpressions(ast.argument, $filter);
- ast.constant = ast.argument.constant;
- ast.toWatch = ast.argument.toWatch;
- break;
- case AST.BinaryExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = ast.left.toWatch.concat(ast.right.toWatch);
- break;
- case AST.LogicalExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = ast.constant ? [] : [ast];
- break;
- case AST.ConditionalExpression:
- findConstantAndWatchExpressions(ast.test, $filter);
- findConstantAndWatchExpressions(ast.alternate, $filter);
- findConstantAndWatchExpressions(ast.consequent, $filter);
- ast.constant = ast.test.constant && ast.alternate.constant && ast.consequent.constant;
- ast.toWatch = ast.constant ? [] : [ast];
- break;
- case AST.Identifier:
- ast.constant = false;
- ast.toWatch = [ast];
- break;
- case AST.MemberExpression:
- findConstantAndWatchExpressions(ast.object, $filter);
- if (ast.computed) {
- findConstantAndWatchExpressions(ast.property, $filter);
- }
- ast.constant = ast.object.constant && (!ast.computed || ast.property.constant);
- ast.toWatch = [ast];
- break;
- case AST.CallExpression:
- allConstants = ast.filter ? isStateless($filter, ast.callee.name) : false;
- argsToWatch = [];
- forEach(ast.arguments, function(expr) {
- findConstantAndWatchExpressions(expr, $filter);
- allConstants = allConstants && expr.constant;
- if (!expr.constant) {
- argsToWatch.push.apply(argsToWatch, expr.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = ast.filter && isStateless($filter, ast.callee.name) ? argsToWatch : [ast];
- break;
- case AST.AssignmentExpression:
- findConstantAndWatchExpressions(ast.left, $filter);
- findConstantAndWatchExpressions(ast.right, $filter);
- ast.constant = ast.left.constant && ast.right.constant;
- ast.toWatch = [ast];
- break;
- case AST.ArrayExpression:
- allConstants = true;
- argsToWatch = [];
- forEach(ast.elements, function(expr) {
- findConstantAndWatchExpressions(expr, $filter);
- allConstants = allConstants && expr.constant;
- if (!expr.constant) {
- argsToWatch.push.apply(argsToWatch, expr.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = argsToWatch;
- break;
- case AST.ObjectExpression:
- allConstants = true;
- argsToWatch = [];
- forEach(ast.properties, function(property) {
- findConstantAndWatchExpressions(property.value, $filter);
- allConstants = allConstants && property.value.constant;
- if (!property.value.constant) {
- argsToWatch.push.apply(argsToWatch, property.value.toWatch);
- }
- });
- ast.constant = allConstants;
- ast.toWatch = argsToWatch;
- break;
- case AST.ThisExpression:
- ast.constant = false;
- ast.toWatch = [];
- break;
- }
-}
-
-function getInputs(body) {
- if (body.length != 1) return;
- var lastExpression = body[0].expression;
- var candidate = lastExpression.toWatch;
- if (candidate.length !== 1) return candidate;
- return candidate[0] !== lastExpression ? candidate : undefined;
-}
-
-function isAssignable(ast) {
- return ast.type === AST.Identifier || ast.type === AST.MemberExpression;
-}
-
-function assignableAST(ast) {
- if (ast.body.length === 1 && isAssignable(ast.body[0].expression)) {
- return {type: AST.AssignmentExpression, left: ast.body[0].expression, right: {type: AST.NGValueParameter}, operator: '='};
- }
-}
-
-function isLiteral(ast) {
- return ast.body.length === 0 ||
- ast.body.length === 1 && (
- ast.body[0].expression.type === AST.Literal ||
- ast.body[0].expression.type === AST.ArrayExpression ||
- ast.body[0].expression.type === AST.ObjectExpression);
-}
-
-function isConstant(ast) {
- return ast.constant;
-}
-
-function ASTCompiler(astBuilder, $filter) {
- this.astBuilder = astBuilder;
- this.$filter = $filter;
-}
-
-ASTCompiler.prototype = {
- compile: function(expression, expensiveChecks) {
- var self = this;
- var ast = this.astBuilder.ast(expression);
- this.state = {
- nextId: 0,
- filters: {},
- expensiveChecks: expensiveChecks,
- fn: {vars: [], body: [], own: {}},
- assign: {vars: [], body: [], own: {}},
- inputs: []
- };
- findConstantAndWatchExpressions(ast, self.$filter);
- var extra = '';
- var assignable;
- this.stage = 'assign';
- if ((assignable = assignableAST(ast))) {
- this.state.computing = 'assign';
- var result = this.nextId();
- this.recurse(assignable, result);
- this.return_(result);
- extra = 'fn.assign=' + this.generateFunction('assign', 's,v,l');
- }
- var toWatch = getInputs(ast.body);
- self.stage = 'inputs';
- forEach(toWatch, function(watch, key) {
- var fnKey = 'fn' + key;
- self.state[fnKey] = {vars: [], body: [], own: {}};
- self.state.computing = fnKey;
- var intoId = self.nextId();
- self.recurse(watch, intoId);
- self.return_(intoId);
- self.state.inputs.push(fnKey);
- watch.watchId = key;
- });
- this.state.computing = 'fn';
- this.stage = 'main';
- this.recurse(ast);
- var fnString =
- // The build and minification steps remove the string "use strict" from the code, but this is done using a regex.
- // This is a workaround for this until we do a better job at only removing the prefix only when we should.
- '"' + this.USE + ' ' + this.STRICT + '";\n' +
- this.filterPrefix() +
- 'var fn=' + this.generateFunction('fn', 's,l,a,i') +
- extra +
- this.watchFns() +
- 'return fn;';
-
- /* jshint -W054 */
- var fn = (new Function('$filter',
- 'ensureSafeMemberName',
- 'ensureSafeObject',
- 'ensureSafeFunction',
- 'getStringValue',
- 'ensureSafeAssignContext',
- 'ifDefined',
- 'plus',
- 'text',
- fnString))(
- this.$filter,
- ensureSafeMemberName,
- ensureSafeObject,
- ensureSafeFunction,
- getStringValue,
- ensureSafeAssignContext,
- ifDefined,
- plusFn,
- expression);
- /* jshint +W054 */
- this.state = this.stage = undefined;
- fn.literal = isLiteral(ast);
- fn.constant = isConstant(ast);
- return fn;
- },
-
- USE: 'use',
-
- STRICT: 'strict',
-
- watchFns: function() {
- var result = [];
- var fns = this.state.inputs;
- var self = this;
- forEach(fns, function(name) {
- result.push('var ' + name + '=' + self.generateFunction(name, 's'));
- });
- if (fns.length) {
- result.push('fn.inputs=[' + fns.join(',') + '];');
- }
- return result.join('');
- },
-
- generateFunction: function(name, params) {
- return 'function(' + params + '){' +
- this.varsPrefix(name) +
- this.body(name) +
- '};';
- },
-
- filterPrefix: function() {
- var parts = [];
- var self = this;
- forEach(this.state.filters, function(id, filter) {
- parts.push(id + '=$filter(' + self.escape(filter) + ')');
- });
- if (parts.length) return 'var ' + parts.join(',') + ';';
- return '';
- },
-
- varsPrefix: function(section) {
- return this.state[section].vars.length ? 'var ' + this.state[section].vars.join(',') + ';' : '';
- },
-
- body: function(section) {
- return this.state[section].body.join('');
- },
-
- recurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
- var left, right, self = this, args, expression;
- recursionFn = recursionFn || noop;
- if (!skipWatchIdCheck && isDefined(ast.watchId)) {
- intoId = intoId || this.nextId();
- this.if_('i',
- this.lazyAssign(intoId, this.computedMember('i', ast.watchId)),
- this.lazyRecurse(ast, intoId, nameId, recursionFn, create, true)
- );
- return;
- }
- switch (ast.type) {
- case AST.Program:
- forEach(ast.body, function(expression, pos) {
- self.recurse(expression.expression, undefined, undefined, function(expr) { right = expr; });
- if (pos !== ast.body.length - 1) {
- self.current().body.push(right, ';');
- } else {
- self.return_(right);
- }
- });
- break;
- case AST.Literal:
- expression = this.escape(ast.value);
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.UnaryExpression:
- this.recurse(ast.argument, undefined, undefined, function(expr) { right = expr; });
- expression = ast.operator + '(' + this.ifDefined(right, 0) + ')';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.BinaryExpression:
- this.recurse(ast.left, undefined, undefined, function(expr) { left = expr; });
- this.recurse(ast.right, undefined, undefined, function(expr) { right = expr; });
- if (ast.operator === '+') {
- expression = this.plus(left, right);
- } else if (ast.operator === '-') {
- expression = this.ifDefined(left, 0) + ast.operator + this.ifDefined(right, 0);
- } else {
- expression = '(' + left + ')' + ast.operator + '(' + right + ')';
- }
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.LogicalExpression:
- intoId = intoId || this.nextId();
- self.recurse(ast.left, intoId);
- self.if_(ast.operator === '&&' ? intoId : self.not(intoId), self.lazyRecurse(ast.right, intoId));
- recursionFn(intoId);
- break;
- case AST.ConditionalExpression:
- intoId = intoId || this.nextId();
- self.recurse(ast.test, intoId);
- self.if_(intoId, self.lazyRecurse(ast.alternate, intoId), self.lazyRecurse(ast.consequent, intoId));
- recursionFn(intoId);
- break;
- case AST.Identifier:
- intoId = intoId || this.nextId();
- if (nameId) {
- nameId.context = self.stage === 'inputs' ? 's' : this.assign(this.nextId(), this.getHasOwnProperty('l', ast.name) + '?l:s');
- nameId.computed = false;
- nameId.name = ast.name;
- }
- ensureSafeMemberName(ast.name);
- self.if_(self.stage === 'inputs' || self.not(self.getHasOwnProperty('l', ast.name)),
- function() {
- self.if_(self.stage === 'inputs' || 's', function() {
- if (create && create !== 1) {
- self.if_(
- self.not(self.nonComputedMember('s', ast.name)),
- self.lazyAssign(self.nonComputedMember('s', ast.name), '{}'));
- }
- self.assign(intoId, self.nonComputedMember('s', ast.name));
- });
- }, intoId && self.lazyAssign(intoId, self.nonComputedMember('l', ast.name))
- );
- if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.name)) {
- self.addEnsureSafeObject(intoId);
- }
- recursionFn(intoId);
- break;
- case AST.MemberExpression:
- left = nameId && (nameId.context = this.nextId()) || this.nextId();
- intoId = intoId || this.nextId();
- self.recurse(ast.object, left, undefined, function() {
- self.if_(self.notNull(left), function() {
- if (ast.computed) {
- right = self.nextId();
- self.recurse(ast.property, right);
- self.getStringValue(right);
- self.addEnsureSafeMemberName(right);
- if (create && create !== 1) {
- self.if_(self.not(self.computedMember(left, right)), self.lazyAssign(self.computedMember(left, right), '{}'));
- }
- expression = self.ensureSafeObject(self.computedMember(left, right));
- self.assign(intoId, expression);
- if (nameId) {
- nameId.computed = true;
- nameId.name = right;
- }
- } else {
- ensureSafeMemberName(ast.property.name);
- if (create && create !== 1) {
- self.if_(self.not(self.nonComputedMember(left, ast.property.name)), self.lazyAssign(self.nonComputedMember(left, ast.property.name), '{}'));
- }
- expression = self.nonComputedMember(left, ast.property.name);
- if (self.state.expensiveChecks || isPossiblyDangerousMemberName(ast.property.name)) {
- expression = self.ensureSafeObject(expression);
- }
- self.assign(intoId, expression);
- if (nameId) {
- nameId.computed = false;
- nameId.name = ast.property.name;
- }
- }
- }, function() {
- self.assign(intoId, 'undefined');
- });
- recursionFn(intoId);
- }, !!create);
- break;
- case AST.CallExpression:
- intoId = intoId || this.nextId();
- if (ast.filter) {
- right = self.filter(ast.callee.name);
- args = [];
- forEach(ast.arguments, function(expr) {
- var argument = self.nextId();
- self.recurse(expr, argument);
- args.push(argument);
- });
- expression = right + '(' + args.join(',') + ')';
- self.assign(intoId, expression);
- recursionFn(intoId);
- } else {
- right = self.nextId();
- left = {};
- args = [];
- self.recurse(ast.callee, right, left, function() {
- self.if_(self.notNull(right), function() {
- self.addEnsureSafeFunction(right);
- forEach(ast.arguments, function(expr) {
- self.recurse(expr, self.nextId(), undefined, function(argument) {
- args.push(self.ensureSafeObject(argument));
- });
- });
- if (left.name) {
- if (!self.state.expensiveChecks) {
- self.addEnsureSafeObject(left.context);
- }
- expression = self.member(left.context, left.name, left.computed) + '(' + args.join(',') + ')';
- } else {
- expression = right + '(' + args.join(',') + ')';
- }
- expression = self.ensureSafeObject(expression);
- self.assign(intoId, expression);
- }, function() {
- self.assign(intoId, 'undefined');
- });
- recursionFn(intoId);
- });
- }
- break;
- case AST.AssignmentExpression:
- right = this.nextId();
- left = {};
- if (!isAssignable(ast.left)) {
- throw $parseMinErr('lval', 'Trying to assign a value to a non l-value');
- }
- this.recurse(ast.left, undefined, left, function() {
- self.if_(self.notNull(left.context), function() {
- self.recurse(ast.right, right);
- self.addEnsureSafeObject(self.member(left.context, left.name, left.computed));
- self.addEnsureSafeAssignContext(left.context);
- expression = self.member(left.context, left.name, left.computed) + ast.operator + right;
- self.assign(intoId, expression);
- recursionFn(intoId || expression);
- });
- }, 1);
- break;
- case AST.ArrayExpression:
- args = [];
- forEach(ast.elements, function(expr) {
- self.recurse(expr, self.nextId(), undefined, function(argument) {
- args.push(argument);
- });
- });
- expression = '[' + args.join(',') + ']';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.ObjectExpression:
- args = [];
- forEach(ast.properties, function(property) {
- self.recurse(property.value, self.nextId(), undefined, function(expr) {
- args.push(self.escape(
- property.key.type === AST.Identifier ? property.key.name :
- ('' + property.key.value)) +
- ':' + expr);
- });
- });
- expression = '{' + args.join(',') + '}';
- this.assign(intoId, expression);
- recursionFn(expression);
- break;
- case AST.ThisExpression:
- this.assign(intoId, 's');
- recursionFn('s');
- break;
- case AST.NGValueParameter:
- this.assign(intoId, 'v');
- recursionFn('v');
- break;
- }
- },
-
- getHasOwnProperty: function(element, property) {
- var key = element + '.' + property;
- var own = this.current().own;
- if (!own.hasOwnProperty(key)) {
- own[key] = this.nextId(false, element + '&&(' + this.escape(property) + ' in ' + element + ')');
- }
- return own[key];
- },
-
- assign: function(id, value) {
- if (!id) return;
- this.current().body.push(id, '=', value, ';');
- return id;
- },
-
- filter: function(filterName) {
- if (!this.state.filters.hasOwnProperty(filterName)) {
- this.state.filters[filterName] = this.nextId(true);
- }
- return this.state.filters[filterName];
- },
-
- ifDefined: function(id, defaultValue) {
- return 'ifDefined(' + id + ',' + this.escape(defaultValue) + ')';
- },
-
- plus: function(left, right) {
- return 'plus(' + left + ',' + right + ')';
- },
-
- return_: function(id) {
- this.current().body.push('return ', id, ';');
- },
-
- if_: function(test, alternate, consequent) {
- if (test === true) {
- alternate();
- } else {
- var body = this.current().body;
- body.push('if(', test, '){');
- alternate();
- body.push('}');
- if (consequent) {
- body.push('else{');
- consequent();
- body.push('}');
- }
- }
- },
-
- not: function(expression) {
- return '!(' + expression + ')';
- },
-
- notNull: function(expression) {
- return expression + '!=null';
- },
-
- nonComputedMember: function(left, right) {
- return left + '.' + right;
- },
-
- computedMember: function(left, right) {
- return left + '[' + right + ']';
- },
-
- member: function(left, right, computed) {
- if (computed) return this.computedMember(left, right);
- return this.nonComputedMember(left, right);
- },
-
- addEnsureSafeObject: function(item) {
- this.current().body.push(this.ensureSafeObject(item), ';');
- },
-
- addEnsureSafeMemberName: function(item) {
- this.current().body.push(this.ensureSafeMemberName(item), ';');
- },
-
- addEnsureSafeFunction: function(item) {
- this.current().body.push(this.ensureSafeFunction(item), ';');
- },
-
- addEnsureSafeAssignContext: function(item) {
- this.current().body.push(this.ensureSafeAssignContext(item), ';');
- },
-
- ensureSafeObject: function(item) {
- return 'ensureSafeObject(' + item + ',text)';
- },
-
- ensureSafeMemberName: function(item) {
- return 'ensureSafeMemberName(' + item + ',text)';
- },
-
- ensureSafeFunction: function(item) {
- return 'ensureSafeFunction(' + item + ',text)';
- },
-
- getStringValue: function(item) {
- this.assign(item, 'getStringValue(' + item + ',text)');
- },
-
- ensureSafeAssignContext: function(item) {
- return 'ensureSafeAssignContext(' + item + ',text)';
- },
-
- lazyRecurse: function(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck) {
- var self = this;
- return function() {
- self.recurse(ast, intoId, nameId, recursionFn, create, skipWatchIdCheck);
- };
- },
-
- lazyAssign: function(id, value) {
- var self = this;
- return function() {
- self.assign(id, value);
- };
- },
-
- stringEscapeRegex: /[^ a-zA-Z0-9]/g,
-
- stringEscapeFn: function(c) {
- return '\\u' + ('0000' + c.charCodeAt(0).toString(16)).slice(-4);
- },
-
- escape: function(value) {
- if (isString(value)) return "'" + value.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'";
- if (isNumber(value)) return value.toString();
- if (value === true) return 'true';
- if (value === false) return 'false';
- if (value === null) return 'null';
- if (typeof value === 'undefined') return 'undefined';
-
- throw $parseMinErr('esc', 'IMPOSSIBLE');
- },
-
- nextId: function(skip, init) {
- var id = 'v' + (this.state.nextId++);
- if (!skip) {
- this.current().vars.push(id + (init ? '=' + init : ''));
- }
- return id;
- },
-
- current: function() {
- return this.state[this.state.computing];
- }
-};
-
-
-function ASTInterpreter(astBuilder, $filter) {
- this.astBuilder = astBuilder;
- this.$filter = $filter;
-}
-
-ASTInterpreter.prototype = {
- compile: function(expression, expensiveChecks) {
- var self = this;
- var ast = this.astBuilder.ast(expression);
- this.expression = expression;
- this.expensiveChecks = expensiveChecks;
- findConstantAndWatchExpressions(ast, self.$filter);
- var assignable;
- var assign;
- if ((assignable = assignableAST(ast))) {
- assign = this.recurse(assignable);
- }
- var toWatch = getInputs(ast.body);
- var inputs;
- if (toWatch) {
- inputs = [];
- forEach(toWatch, function(watch, key) {
- var input = self.recurse(watch);
- watch.input = input;
- inputs.push(input);
- watch.watchId = key;
- });
- }
- var expressions = [];
- forEach(ast.body, function(expression) {
- expressions.push(self.recurse(expression.expression));
- });
- var fn = ast.body.length === 0 ? function() {} :
- ast.body.length === 1 ? expressions[0] :
- function(scope, locals) {
- var lastValue;
- forEach(expressions, function(exp) {
- lastValue = exp(scope, locals);
- });
- return lastValue;
- };
- if (assign) {
- fn.assign = function(scope, value, locals) {
- return assign(scope, locals, value);
- };
- }
- if (inputs) {
- fn.inputs = inputs;
- }
- fn.literal = isLiteral(ast);
- fn.constant = isConstant(ast);
- return fn;
- },
-
- recurse: function(ast, context, create) {
- var left, right, self = this, args, expression;
- if (ast.input) {
- return this.inputs(ast.input, ast.watchId);
- }
- switch (ast.type) {
- case AST.Literal:
- return this.value(ast.value, context);
- case AST.UnaryExpression:
- right = this.recurse(ast.argument);
- return this['unary' + ast.operator](right, context);
- case AST.BinaryExpression:
- left = this.recurse(ast.left);
- right = this.recurse(ast.right);
- return this['binary' + ast.operator](left, right, context);
- case AST.LogicalExpression:
- left = this.recurse(ast.left);
- right = this.recurse(ast.right);
- return this['binary' + ast.operator](left, right, context);
- case AST.ConditionalExpression:
- return this['ternary?:'](
- this.recurse(ast.test),
- this.recurse(ast.alternate),
- this.recurse(ast.consequent),
- context
- );
- case AST.Identifier:
- ensureSafeMemberName(ast.name, self.expression);
- return self.identifier(ast.name,
- self.expensiveChecks || isPossiblyDangerousMemberName(ast.name),
- context, create, self.expression);
- case AST.MemberExpression:
- left = this.recurse(ast.object, false, !!create);
- if (!ast.computed) {
- ensureSafeMemberName(ast.property.name, self.expression);
- right = ast.property.name;
- }
- if (ast.computed) right = this.recurse(ast.property);
- return ast.computed ?
- this.computedMember(left, right, context, create, self.expression) :
- this.nonComputedMember(left, right, self.expensiveChecks, context, create, self.expression);
- case AST.CallExpression:
- args = [];
- forEach(ast.arguments, function(expr) {
- args.push(self.recurse(expr));
- });
- if (ast.filter) right = this.$filter(ast.callee.name);
- if (!ast.filter) right = this.recurse(ast.callee, true);
- return ast.filter ?
- function(scope, locals, assign, inputs) {
- var values = [];
- for (var i = 0; i < args.length; ++i) {
- values.push(args[i](scope, locals, assign, inputs));
- }
- var value = right.apply(undefined, values, inputs);
- return context ? {context: undefined, name: undefined, value: value} : value;
- } :
- function(scope, locals, assign, inputs) {
- var rhs = right(scope, locals, assign, inputs);
- var value;
- if (rhs.value != null) {
- ensureSafeObject(rhs.context, self.expression);
- ensureSafeFunction(rhs.value, self.expression);
- var values = [];
- for (var i = 0; i < args.length; ++i) {
- values.push(ensureSafeObject(args[i](scope, locals, assign, inputs), self.expression));
- }
- value = ensureSafeObject(rhs.value.apply(rhs.context, values), self.expression);
- }
- return context ? {value: value} : value;
- };
- case AST.AssignmentExpression:
- left = this.recurse(ast.left, true, 1);
- right = this.recurse(ast.right);
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- ensureSafeObject(lhs.value, self.expression);
- ensureSafeAssignContext(lhs.context);
- lhs.context[lhs.name] = rhs;
- return context ? {value: rhs} : rhs;
- };
- case AST.ArrayExpression:
- args = [];
- forEach(ast.elements, function(expr) {
- args.push(self.recurse(expr));
- });
- return function(scope, locals, assign, inputs) {
- var value = [];
- for (var i = 0; i < args.length; ++i) {
- value.push(args[i](scope, locals, assign, inputs));
- }
- return context ? {value: value} : value;
- };
- case AST.ObjectExpression:
- args = [];
- forEach(ast.properties, function(property) {
- args.push({key: property.key.type === AST.Identifier ?
- property.key.name :
- ('' + property.key.value),
- value: self.recurse(property.value)
- });
- });
- return function(scope, locals, assign, inputs) {
- var value = {};
- for (var i = 0; i < args.length; ++i) {
- value[args[i].key] = args[i].value(scope, locals, assign, inputs);
- }
- return context ? {value: value} : value;
- };
- case AST.ThisExpression:
- return function(scope) {
- return context ? {value: scope} : scope;
- };
- case AST.NGValueParameter:
- return function(scope, locals, assign, inputs) {
- return context ? {value: assign} : assign;
- };
- }
- },
-
- 'unary+': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = argument(scope, locals, assign, inputs);
- if (isDefined(arg)) {
- arg = +arg;
- } else {
- arg = 0;
- }
- return context ? {value: arg} : arg;
- };
- },
- 'unary-': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = argument(scope, locals, assign, inputs);
- if (isDefined(arg)) {
- arg = -arg;
- } else {
- arg = 0;
- }
- return context ? {value: arg} : arg;
- };
- },
- 'unary!': function(argument, context) {
- return function(scope, locals, assign, inputs) {
- var arg = !argument(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary+': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- var arg = plusFn(lhs, rhs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary-': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs = right(scope, locals, assign, inputs);
- var arg = (isDefined(lhs) ? lhs : 0) - (isDefined(rhs) ? rhs : 0);
- return context ? {value: arg} : arg;
- };
- },
- 'binary*': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) * right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary/': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) / right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary%': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) % right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary===': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) === right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary!==': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) !== right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary==': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) == right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary!=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) != right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary<': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) < right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary>': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) > right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary<=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) <= right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary>=': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) >= right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary&&': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) && right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'binary||': function(left, right, context) {
- return function(scope, locals, assign, inputs) {
- var arg = left(scope, locals, assign, inputs) || right(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- 'ternary?:': function(test, alternate, consequent, context) {
- return function(scope, locals, assign, inputs) {
- var arg = test(scope, locals, assign, inputs) ? alternate(scope, locals, assign, inputs) : consequent(scope, locals, assign, inputs);
- return context ? {value: arg} : arg;
- };
- },
- value: function(value, context) {
- return function() { return context ? {context: undefined, name: undefined, value: value} : value; };
- },
- identifier: function(name, expensiveChecks, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var base = locals && (name in locals) ? locals : scope;
- if (create && create !== 1 && base && !(base[name])) {
- base[name] = {};
- }
- var value = base ? base[name] : undefined;
- if (expensiveChecks) {
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: base, name: name, value: value};
- } else {
- return value;
- }
- };
- },
- computedMember: function(left, right, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- var rhs;
- var value;
- if (lhs != null) {
- rhs = right(scope, locals, assign, inputs);
- rhs = getStringValue(rhs);
- ensureSafeMemberName(rhs, expression);
- if (create && create !== 1 && lhs && !(lhs[rhs])) {
- lhs[rhs] = {};
- }
- value = lhs[rhs];
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: lhs, name: rhs, value: value};
- } else {
- return value;
- }
- };
- },
- nonComputedMember: function(left, right, expensiveChecks, context, create, expression) {
- return function(scope, locals, assign, inputs) {
- var lhs = left(scope, locals, assign, inputs);
- if (create && create !== 1 && lhs && !(lhs[right])) {
- lhs[right] = {};
- }
- var value = lhs != null ? lhs[right] : undefined;
- if (expensiveChecks || isPossiblyDangerousMemberName(right)) {
- ensureSafeObject(value, expression);
- }
- if (context) {
- return {context: lhs, name: right, value: value};
- } else {
- return value;
- }
- };
- },
- inputs: function(input, watchId) {
- return function(scope, value, locals, inputs) {
- if (inputs) return inputs[watchId];
- return input(scope, value, locals);
- };
- }
-};
-
-/**
- * @constructor
- */
-var Parser = function(lexer, $filter, options) {
- this.lexer = lexer;
- this.$filter = $filter;
- this.options = options;
- this.ast = new AST(this.lexer);
- this.astCompiler = options.csp ? new ASTInterpreter(this.ast, $filter) :
- new ASTCompiler(this.ast, $filter);
-};
-
-Parser.prototype = {
- constructor: Parser,
-
- parse: function(text) {
- return this.astCompiler.compile(text, this.options.expensiveChecks);
- }
-};
-
-var getterFnCacheDefault = createMap();
-var getterFnCacheExpensive = createMap();
-
-function isPossiblyDangerousMemberName(name) {
- return name == 'constructor';
-}
-
-var objectValueOf = Object.prototype.valueOf;
-
-function getValueOf(value) {
- return isFunction(value.valueOf) ? value.valueOf() : objectValueOf.call(value);
-}
-
-///////////////////////////////////
-
-/**
- * @ngdoc service
- * @name $parse
- * @kind function
- *
- * @description
- *
- * Converts Angular {@link guide/expression expression} into a function.
- *
- * ```js
- * var getter = $parse('user.name');
- * var setter = getter.assign;
- * var context = {user:{name:'angular'}};
- * var locals = {user:{name:'local'}};
- *
- * expect(getter(context)).toEqual('angular');
- * setter(context, 'newValue');
- * expect(context.user.name).toEqual('newValue');
- * expect(getter(context, locals)).toEqual('local');
- * ```
- *
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- *
- * The returned function also has the following properties:
- * * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript
- * literal.
- * * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript
- * constant literals.
- * * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be
- * set to a function to change its value on the given context.
- *
- */
-
-
-/**
- * @ngdoc provider
- * @name $parseProvider
- *
- * @description
- * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}
- * service.
- */
-function $ParseProvider() {
- var cacheDefault = createMap();
- var cacheExpensive = createMap();
-
- this.$get = ['$filter', function($filter) {
- var noUnsafeEval = csp().noUnsafeEval;
- var $parseOptions = {
- csp: noUnsafeEval,
- expensiveChecks: false
- },
- $parseOptionsExpensive = {
- csp: noUnsafeEval,
- expensiveChecks: true
- };
-
- return function $parse(exp, interceptorFn, expensiveChecks) {
- var parsedExpression, oneTime, cacheKey;
-
- switch (typeof exp) {
- case 'string':
- exp = exp.trim();
- cacheKey = exp;
-
- var cache = (expensiveChecks ? cacheExpensive : cacheDefault);
- parsedExpression = cache[cacheKey];
-
- if (!parsedExpression) {
- if (exp.charAt(0) === ':' && exp.charAt(1) === ':') {
- oneTime = true;
- exp = exp.substring(2);
- }
- var parseOptions = expensiveChecks ? $parseOptionsExpensive : $parseOptions;
- var lexer = new Lexer(parseOptions);
- var parser = new Parser(lexer, $filter, parseOptions);
- parsedExpression = parser.parse(exp);
- if (parsedExpression.constant) {
- parsedExpression.$$watchDelegate = constantWatchDelegate;
- } else if (oneTime) {
- parsedExpression.$$watchDelegate = parsedExpression.literal ?
- oneTimeLiteralWatchDelegate : oneTimeWatchDelegate;
- } else if (parsedExpression.inputs) {
- parsedExpression.$$watchDelegate = inputsWatchDelegate;
- }
- cache[cacheKey] = parsedExpression;
- }
- return addInterceptor(parsedExpression, interceptorFn);
-
- case 'function':
- return addInterceptor(exp, interceptorFn);
-
- default:
- return noop;
- }
- };
-
- function expressionInputDirtyCheck(newValue, oldValueOfValue) {
-
- if (newValue == null || oldValueOfValue == null) { // null/undefined
- return newValue === oldValueOfValue;
- }
-
- if (typeof newValue === 'object') {
-
- // attempt to convert the value to a primitive type
- // TODO(docs): add a note to docs that by implementing valueOf even objects and arrays can
- // be cheaply dirty-checked
- newValue = getValueOf(newValue);
-
- if (typeof newValue === 'object') {
- // objects/arrays are not supported - deep-watching them would be too expensive
- return false;
- }
-
- // fall-through to the primitive equality check
- }
-
- //Primitive or NaN
- return newValue === oldValueOfValue || (newValue !== newValue && oldValueOfValue !== oldValueOfValue);
- }
-
- function inputsWatchDelegate(scope, listener, objectEquality, parsedExpression, prettyPrintExpression) {
- var inputExpressions = parsedExpression.inputs;
- var lastResult;
-
- if (inputExpressions.length === 1) {
- var oldInputValueOf = expressionInputDirtyCheck; // init to something unique so that equals check fails
- inputExpressions = inputExpressions[0];
- return scope.$watch(function expressionInputWatch(scope) {
- var newInputValue = inputExpressions(scope);
- if (!expressionInputDirtyCheck(newInputValue, oldInputValueOf)) {
- lastResult = parsedExpression(scope, undefined, undefined, [newInputValue]);
- oldInputValueOf = newInputValue && getValueOf(newInputValue);
- }
- return lastResult;
- }, listener, objectEquality, prettyPrintExpression);
- }
-
- var oldInputValueOfValues = [];
- var oldInputValues = [];
- for (var i = 0, ii = inputExpressions.length; i < ii; i++) {
- oldInputValueOfValues[i] = expressionInputDirtyCheck; // init to something unique so that equals check fails
- oldInputValues[i] = null;
- }
-
- return scope.$watch(function expressionInputsWatch(scope) {
- var changed = false;
-
- for (var i = 0, ii = inputExpressions.length; i < ii; i++) {
- var newInputValue = inputExpressions[i](scope);
- if (changed || (changed = !expressionInputDirtyCheck(newInputValue, oldInputValueOfValues[i]))) {
- oldInputValues[i] = newInputValue;
- oldInputValueOfValues[i] = newInputValue && getValueOf(newInputValue);
- }
- }
-
- if (changed) {
- lastResult = parsedExpression(scope, undefined, undefined, oldInputValues);
- }
-
- return lastResult;
- }, listener, objectEquality, prettyPrintExpression);
- }
-
- function oneTimeWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch, lastValue;
- return unwatch = scope.$watch(function oneTimeWatch(scope) {
- return parsedExpression(scope);
- }, function oneTimeListener(value, old, scope) {
- lastValue = value;
- if (isFunction(listener)) {
- listener.apply(this, arguments);
- }
- if (isDefined(value)) {
- scope.$$postDigest(function() {
- if (isDefined(lastValue)) {
- unwatch();
- }
- });
- }
- }, objectEquality);
- }
-
- function oneTimeLiteralWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch, lastValue;
- return unwatch = scope.$watch(function oneTimeWatch(scope) {
- return parsedExpression(scope);
- }, function oneTimeListener(value, old, scope) {
- lastValue = value;
- if (isFunction(listener)) {
- listener.call(this, value, old, scope);
- }
- if (isAllDefined(value)) {
- scope.$$postDigest(function() {
- if (isAllDefined(lastValue)) unwatch();
- });
- }
- }, objectEquality);
-
- function isAllDefined(value) {
- var allDefined = true;
- forEach(value, function(val) {
- if (!isDefined(val)) allDefined = false;
- });
- return allDefined;
- }
- }
-
- function constantWatchDelegate(scope, listener, objectEquality, parsedExpression) {
- var unwatch;
- return unwatch = scope.$watch(function constantWatch(scope) {
- unwatch();
- return parsedExpression(scope);
- }, listener, objectEquality);
- }
-
- function addInterceptor(parsedExpression, interceptorFn) {
- if (!interceptorFn) return parsedExpression;
- var watchDelegate = parsedExpression.$$watchDelegate;
- var useInputs = false;
-
- var regularWatch =
- watchDelegate !== oneTimeLiteralWatchDelegate &&
- watchDelegate !== oneTimeWatchDelegate;
-
- var fn = regularWatch ? function regularInterceptedExpression(scope, locals, assign, inputs) {
- var value = useInputs && inputs ? inputs[0] : parsedExpression(scope, locals, assign, inputs);
- return interceptorFn(value, scope, locals);
- } : function oneTimeInterceptedExpression(scope, locals, assign, inputs) {
- var value = parsedExpression(scope, locals, assign, inputs);
- var result = interceptorFn(value, scope, locals);
- // we only return the interceptor's result if the
- // initial value is defined (for bind-once)
- return isDefined(value) ? result : value;
- };
-
- // Propagate $$watchDelegates other then inputsWatchDelegate
- if (parsedExpression.$$watchDelegate &&
- parsedExpression.$$watchDelegate !== inputsWatchDelegate) {
- fn.$$watchDelegate = parsedExpression.$$watchDelegate;
- } else if (!interceptorFn.$stateful) {
- // If there is an interceptor, but no watchDelegate then treat the interceptor like
- // we treat filters - it is assumed to be a pure function unless flagged with $stateful
- fn.$$watchDelegate = inputsWatchDelegate;
- useInputs = !parsedExpression.inputs;
- fn.inputs = parsedExpression.inputs ? parsedExpression.inputs : [parsedExpression];
- }
-
- return fn;
- }
- }];
-}
-
-/**
- * @ngdoc service
- * @name $q
- * @requires $rootScope
- *
- * @description
- * A service that helps you run functions asynchronously, and use their return values (or exceptions)
- * when they are done processing.
- *
- * This is an implementation of promises/deferred objects inspired by
- * [Kris Kowal's Q](https://github.com/kriskowal/q).
- *
- * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred
- * implementations, and the other which resembles ES6 promises to some degree.
- *
- * # $q constructor
- *
- * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver`
- * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony,
- * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).
- *
- * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are
- * available yet.
- *
- * It can be used like so:
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * // perform some asynchronous operation, resolve or reject the promise when appropriate.
- * return $q(function(resolve, reject) {
- * setTimeout(function() {
- * if (okToGreet(name)) {
- * resolve('Hello, ' + name + '!');
- * } else {
- * reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- * });
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * });
- * ```
- *
- * Note: progress/notify callbacks are not currently supported via the ES6-style interface.
- *
- * Note: unlike ES6 behaviour, an exception thrown in the constructor function will NOT implicitly reject the promise.
- *
- * However, the more traditional CommonJS-style usage is still available, and documented below.
- *
- * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an
- * interface for interacting with an object that represents the result of an action that is
- * performed asynchronously, and may or may not be finished at any given point in time.
- *
- * From the perspective of dealing with error handling, deferred and promise APIs are to
- * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.
- *
- * ```js
- * // for the purpose of this example let's assume that variables `$q` and `okToGreet`
- * // are available in the current lexical scope (they could have been injected or passed in).
- *
- * function asyncGreet(name) {
- * var deferred = $q.defer();
- *
- * setTimeout(function() {
- * deferred.notify('About to greet ' + name + '.');
- *
- * if (okToGreet(name)) {
- * deferred.resolve('Hello, ' + name + '!');
- * } else {
- * deferred.reject('Greeting ' + name + ' is not allowed.');
- * }
- * }, 1000);
- *
- * return deferred.promise;
- * }
- *
- * var promise = asyncGreet('Robin Hood');
- * promise.then(function(greeting) {
- * alert('Success: ' + greeting);
- * }, function(reason) {
- * alert('Failed: ' + reason);
- * }, function(update) {
- * alert('Got notification: ' + update);
- * });
- * ```
- *
- * At first it might not be obvious why this extra complexity is worth the trouble. The payoff
- * comes in the way of guarantees that promise and deferred APIs make, see
- * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.
- *
- * Additionally the promise api allows for composition that is very hard to do with the
- * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.
- * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the
- * section on serial or parallel joining of promises.
- *
- * # The Deferred API
- *
- * A new instance of deferred is constructed by calling `$q.defer()`.
- *
- * The purpose of the deferred object is to expose the associated Promise instance as well as APIs
- * that can be used for signaling the successful or unsuccessful completion, as well as the status
- * of the task.
- *
- * **Methods**
- *
- * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection
- * constructed via `$q.reject`, the promise will be rejected instead.
- * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to
- * resolving it with a rejection constructed via `$q.reject`.
- * - `notify(value)` - provides updates on the status of the promise's execution. This may be called
- * multiple times before the promise is either resolved or rejected.
- *
- * **Properties**
- *
- * - promise – `{Promise}` – promise object associated with this deferred.
- *
- *
- * # The Promise API
- *
- * A new promise instance is created when a deferred instance is created and can be retrieved by
- * calling `deferred.promise`.
- *
- * The purpose of the promise object is to allow for interested parties to get access to the result
- * of the deferred task when it completes.
- *
- * **Methods**
- *
- * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or
- * will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously
- * as soon as the result is available. The callbacks are called with a single argument: the result
- * or rejection reason. Additionally, the notify callback may be called zero or more times to
- * provide a progress indication, before the promise is resolved or rejected.
- *
- * This method *returns a new promise* which is resolved or rejected via the return value of the
- * `successCallback`, `errorCallback` (unless that value is a promise, in which case it is resolved
- * with the value which is resolved in that promise using
- * [promise chaining](http://www.html5rocks.com/en/tutorials/es6/promises/#toc-promises-queues)).
- * It also notifies via the return value of the `notifyCallback` method. The promise cannot be
- * resolved or rejected from the notifyCallback method.
- *
- * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`
- *
- * - `finally(callback, notifyCallback)` – allows you to observe either the fulfillment or rejection of a promise,
- * but to do so without modifying the final value. This is useful to release resources or do some
- * clean-up that needs to be done whether the promise was rejected or resolved. See the [full
- * specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for
- * more information.
- *
- * # Chaining promises
- *
- * Because calling the `then` method of a promise returns a new derived promise, it is easily
- * possible to create a chain of promises:
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * return result + 1;
- * });
- *
- * // promiseB will be resolved immediately after promiseA is resolved and its value
- * // will be the result of promiseA incremented by 1
- * ```
- *
- * It is possible to create chains of any length and since a promise can be resolved with another
- * promise (which will defer its resolution further), it is possible to pause/defer resolution of
- * the promises at any point in the chain. This makes it possible to implement powerful APIs like
- * $http's response interceptors.
- *
- *
- * # Differences between Kris Kowal's Q and $q
- *
- * There are two main differences:
- *
- * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation
- * mechanism in angular, which means faster propagation of resolution or rejection into your
- * models and avoiding unnecessary browser repaints, which would result in flickering UI.
- * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains
- * all the important functionality needed for common async tasks.
- *
- * # Testing
- *
- * ```js
- * it('should simulate promise', inject(function($q, $rootScope) {
- * var deferred = $q.defer();
- * var promise = deferred.promise;
- * var resolvedValue;
- *
- * promise.then(function(value) { resolvedValue = value; });
- * expect(resolvedValue).toBeUndefined();
- *
- * // Simulate resolving of promise
- * deferred.resolve(123);
- * // Note that the 'then' function does not get called synchronously.
- * // This is because we want the promise API to always be async, whether or not
- * // it got called synchronously or asynchronously.
- * expect(resolvedValue).toBeUndefined();
- *
- * // Propagate promise resolution to 'then' functions using $apply().
- * $rootScope.$apply();
- * expect(resolvedValue).toEqual(123);
- * }));
- * ```
- *
- * @param {function(function, function)} resolver Function which is responsible for resolving or
- * rejecting the newly created promise. The first parameter is a function which resolves the
- * promise, the second parameter is a function which rejects the promise.
- *
- * @returns {Promise} The newly created promise.
- */
-function $QProvider() {
-
- this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {
- return qFactory(function(callback) {
- $rootScope.$evalAsync(callback);
- }, $exceptionHandler);
- }];
-}
-
-function $$QProvider() {
- this.$get = ['$browser', '$exceptionHandler', function($browser, $exceptionHandler) {
- return qFactory(function(callback) {
- $browser.defer(callback);
- }, $exceptionHandler);
- }];
-}
-
-/**
- * Constructs a promise manager.
- *
- * @param {function(function)} nextTick Function for executing functions in the next turn.
- * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for
- * debugging purposes.
- * @returns {object} Promise manager.
- */
-function qFactory(nextTick, exceptionHandler) {
- var $qMinErr = minErr('$q', TypeError);
-
- /**
- * @ngdoc method
- * @name ng.$q#defer
- * @kind function
- *
- * @description
- * Creates a `Deferred` object which represents a task which will finish in the future.
- *
- * @returns {Deferred} Returns a new instance of deferred.
- */
- var defer = function() {
- var d = new Deferred();
- //Necessary to support unbound execution :/
- d.resolve = simpleBind(d, d.resolve);
- d.reject = simpleBind(d, d.reject);
- d.notify = simpleBind(d, d.notify);
- return d;
- };
-
- function Promise() {
- this.$$state = { status: 0 };
- }
-
- extend(Promise.prototype, {
- then: function(onFulfilled, onRejected, progressBack) {
- if (isUndefined(onFulfilled) && isUndefined(onRejected) && isUndefined(progressBack)) {
- return this;
- }
- var result = new Deferred();
-
- this.$$state.pending = this.$$state.pending || [];
- this.$$state.pending.push([result, onFulfilled, onRejected, progressBack]);
- if (this.$$state.status > 0) scheduleProcessQueue(this.$$state);
-
- return result.promise;
- },
-
- "catch": function(callback) {
- return this.then(null, callback);
- },
-
- "finally": function(callback, progressBack) {
- return this.then(function(value) {
- return handleCallback(value, true, callback);
- }, function(error) {
- return handleCallback(error, false, callback);
- }, progressBack);
- }
- });
-
- //Faster, more basic than angular.bind http://jsperf.com/angular-bind-vs-custom-vs-native
- function simpleBind(context, fn) {
- return function(value) {
- fn.call(context, value);
- };
- }
-
- function processQueue(state) {
- var fn, deferred, pending;
-
- pending = state.pending;
- state.processScheduled = false;
- state.pending = undefined;
- for (var i = 0, ii = pending.length; i < ii; ++i) {
- deferred = pending[i][0];
- fn = pending[i][state.status];
- try {
- if (isFunction(fn)) {
- deferred.resolve(fn(state.value));
- } else if (state.status === 1) {
- deferred.resolve(state.value);
- } else {
- deferred.reject(state.value);
- }
- } catch (e) {
- deferred.reject(e);
- exceptionHandler(e);
- }
- }
- }
-
- function scheduleProcessQueue(state) {
- if (state.processScheduled || !state.pending) return;
- state.processScheduled = true;
- nextTick(function() { processQueue(state); });
- }
-
- function Deferred() {
- this.promise = new Promise();
- }
-
- extend(Deferred.prototype, {
- resolve: function(val) {
- if (this.promise.$$state.status) return;
- if (val === this.promise) {
- this.$$reject($qMinErr(
- 'qcycle',
- "Expected promise to be resolved with value other than itself '{0}'",
- val));
- } else {
- this.$$resolve(val);
- }
-
- },
-
- $$resolve: function(val) {
- var then;
- var that = this;
- var done = false;
- try {
- if ((isObject(val) || isFunction(val))) then = val && val.then;
- if (isFunction(then)) {
- this.promise.$$state.status = -1;
- then.call(val, resolvePromise, rejectPromise, simpleBind(this, this.notify));
- } else {
- this.promise.$$state.value = val;
- this.promise.$$state.status = 1;
- scheduleProcessQueue(this.promise.$$state);
- }
- } catch (e) {
- rejectPromise(e);
- exceptionHandler(e);
- }
-
- function resolvePromise(val) {
- if (done) return;
- done = true;
- that.$$resolve(val);
- }
- function rejectPromise(val) {
- if (done) return;
- done = true;
- that.$$reject(val);
- }
- },
-
- reject: function(reason) {
- if (this.promise.$$state.status) return;
- this.$$reject(reason);
- },
-
- $$reject: function(reason) {
- this.promise.$$state.value = reason;
- this.promise.$$state.status = 2;
- scheduleProcessQueue(this.promise.$$state);
- },
-
- notify: function(progress) {
- var callbacks = this.promise.$$state.pending;
-
- if ((this.promise.$$state.status <= 0) && callbacks && callbacks.length) {
- nextTick(function() {
- var callback, result;
- for (var i = 0, ii = callbacks.length; i < ii; i++) {
- result = callbacks[i][0];
- callback = callbacks[i][3];
- try {
- result.notify(isFunction(callback) ? callback(progress) : progress);
- } catch (e) {
- exceptionHandler(e);
- }
- }
- });
- }
- }
- });
-
- /**
- * @ngdoc method
- * @name $q#reject
- * @kind function
- *
- * @description
- * Creates a promise that is resolved as rejected with the specified `reason`. This api should be
- * used to forward rejection in a chain of promises. If you are dealing with the last promise in
- * a promise chain, you don't need to worry about it.
- *
- * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of
- * `reject` as the `throw` keyword in JavaScript. This also means that if you "catch" an error via
- * a promise error callback and you want to forward the error to the promise derived from the
- * current promise, you have to "rethrow" the error by returning a rejection constructed via
- * `reject`.
- *
- * ```js
- * promiseB = promiseA.then(function(result) {
- * // success: do something and resolve promiseB
- * // with the old or a new result
- * return result;
- * }, function(reason) {
- * // error: handle the error if possible and
- * // resolve promiseB with newPromiseOrValue,
- * // otherwise forward the rejection to promiseB
- * if (canHandle(reason)) {
- * // handle the error and recover
- * return newPromiseOrValue;
- * }
- * return $q.reject(reason);
- * });
- * ```
- *
- * @param {*} reason Constant, message, exception or an object representing the rejection reason.
- * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.
- */
- var reject = function(reason) {
- var result = new Deferred();
- result.reject(reason);
- return result.promise;
- };
-
- var makePromise = function makePromise(value, resolved) {
- var result = new Deferred();
- if (resolved) {
- result.resolve(value);
- } else {
- result.reject(value);
- }
- return result.promise;
- };
-
- var handleCallback = function handleCallback(value, isResolved, callback) {
- var callbackOutput = null;
- try {
- if (isFunction(callback)) callbackOutput = callback();
- } catch (e) {
- return makePromise(e, false);
- }
- if (isPromiseLike(callbackOutput)) {
- return callbackOutput.then(function() {
- return makePromise(value, isResolved);
- }, function(error) {
- return makePromise(error, false);
- });
- } else {
- return makePromise(value, isResolved);
- }
- };
-
- /**
- * @ngdoc method
- * @name $q#when
- * @kind function
- *
- * @description
- * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.
- * This is useful when you are dealing with an object that might or might not be a promise, or if
- * the promise comes from a source that can't be trusted.
- *
- * @param {*} value Value or a promise
- * @param {Function=} successCallback
- * @param {Function=} errorCallback
- * @param {Function=} progressCallback
- * @returns {Promise} Returns a promise of the passed value or promise
- */
-
-
- var when = function(value, callback, errback, progressBack) {
- var result = new Deferred();
- result.resolve(value);
- return result.promise.then(callback, errback, progressBack);
- };
-
- /**
- * @ngdoc method
- * @name $q#resolve
- * @kind function
- *
- * @description
- * Alias of {@link ng.$q#when when} to maintain naming consistency with ES6.
- *
- * @param {*} value Value or a promise
- * @param {Function=} successCallback
- * @param {Function=} errorCallback
- * @param {Function=} progressCallback
- * @returns {Promise} Returns a promise of the passed value or promise
- */
- var resolve = when;
-
- /**
- * @ngdoc method
- * @name $q#all
- * @kind function
- *
- * @description
- * Combines multiple promises into a single promise that is resolved when all of the input
- * promises are resolved.
- *
- * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.
- * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,
- * each value corresponding to the promise at the same index/key in the `promises` array/hash.
- * If any of the promises is resolved with a rejection, this resulting promise will be rejected
- * with the same rejection value.
- */
-
- function all(promises) {
- var deferred = new Deferred(),
- counter = 0,
- results = isArray(promises) ? [] : {};
-
- forEach(promises, function(promise, key) {
- counter++;
- when(promise).then(function(value) {
- if (results.hasOwnProperty(key)) return;
- results[key] = value;
- if (!(--counter)) deferred.resolve(results);
- }, function(reason) {
- if (results.hasOwnProperty(key)) return;
- deferred.reject(reason);
- });
- });
-
- if (counter === 0) {
- deferred.resolve(results);
- }
-
- return deferred.promise;
- }
-
- var $Q = function Q(resolver) {
- if (!isFunction(resolver)) {
- throw $qMinErr('norslvr', "Expected resolverFn, got '{0}'", resolver);
- }
-
- if (!(this instanceof Q)) {
- // More useful when $Q is the Promise itself.
- return new Q(resolver);
- }
-
- var deferred = new Deferred();
-
- function resolveFn(value) {
- deferred.resolve(value);
- }
-
- function rejectFn(reason) {
- deferred.reject(reason);
- }
-
- resolver(resolveFn, rejectFn);
-
- return deferred.promise;
- };
-
- $Q.defer = defer;
- $Q.reject = reject;
- $Q.when = when;
- $Q.resolve = resolve;
- $Q.all = all;
-
- return $Q;
-}
-
-function $$RAFProvider() { //rAF
- this.$get = ['$window', '$timeout', function($window, $timeout) {
- var requestAnimationFrame = $window.requestAnimationFrame ||
- $window.webkitRequestAnimationFrame;
-
- var cancelAnimationFrame = $window.cancelAnimationFrame ||
- $window.webkitCancelAnimationFrame ||
- $window.webkitCancelRequestAnimationFrame;
-
- var rafSupported = !!requestAnimationFrame;
- var raf = rafSupported
- ? function(fn) {
- var id = requestAnimationFrame(fn);
- return function() {
- cancelAnimationFrame(id);
- };
- }
- : function(fn) {
- var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666
- return function() {
- $timeout.cancel(timer);
- };
- };
-
- raf.supported = rafSupported;
-
- return raf;
- }];
-}
-
-/**
- * DESIGN NOTES
- *
- * The design decisions behind the scope are heavily favored for speed and memory consumption.
- *
- * The typical use of scope is to watch the expressions, which most of the time return the same
- * value as last time so we optimize the operation.
- *
- * Closures construction is expensive in terms of speed as well as memory:
- * - No closures, instead use prototypical inheritance for API
- * - Internal state needs to be stored on scope directly, which means that private state is
- * exposed as $$____ properties
- *
- * Loop operations are optimized by using while(count--) { ... }
- * - This means that in order to keep the same order of execution as addition we have to add
- * items to the array at the beginning (unshift) instead of at the end (push)
- *
- * Child scopes are created and removed often
- * - Using an array would be slow since inserts in the middle are expensive; so we use linked lists
- *
- * There are fewer watches than observers. This is why you don't want the observer to be implemented
- * in the same way as watch. Watch requires return of the initialization function which is expensive
- * to construct.
- */
-
-
-/**
- * @ngdoc provider
- * @name $rootScopeProvider
- * @description
- *
- * Provider for the $rootScope service.
- */
-
-/**
- * @ngdoc method
- * @name $rootScopeProvider#digestTtl
- * @description
- *
- * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and
- * assuming that the model is unstable.
- *
- * The current default is 10 iterations.
- *
- * In complex applications it's possible that the dependencies between `$watch`s will result in
- * several digest iterations. However if an application needs more than the default 10 digest
- * iterations for its model to stabilize then you should investigate what is causing the model to
- * continuously change during the digest.
- *
- * Increasing the TTL could have performance implications, so you should not change it without
- * proper justification.
- *
- * @param {number} limit The number of digest iterations.
- */
-
-
-/**
- * @ngdoc service
- * @name $rootScope
- * @description
- *
- * Every application has a single root {@link ng.$rootScope.Scope scope}.
- * All other scopes are descendant scopes of the root scope. Scopes provide separation
- * between the model and the view, via a mechanism for watching the model for changes.
- * They also provide event emission/broadcast and subscription facility. See the
- * {@link guide/scope developer guide on scopes}.
- */
-function $RootScopeProvider() {
- var TTL = 10;
- var $rootScopeMinErr = minErr('$rootScope');
- var lastDirtyWatch = null;
- var applyAsyncId = null;
-
- this.digestTtl = function(value) {
- if (arguments.length) {
- TTL = value;
- }
- return TTL;
- };
-
- function createChildScopeClass(parent) {
- function ChildScope() {
- this.$$watchers = this.$$nextSibling =
- this.$$childHead = this.$$childTail = null;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$watchersCount = 0;
- this.$id = nextUid();
- this.$$ChildScope = null;
- }
- ChildScope.prototype = parent;
- return ChildScope;
- }
-
- this.$get = ['$exceptionHandler', '$parse', '$browser',
- function($exceptionHandler, $parse, $browser) {
-
- function destroyChildScope($event) {
- $event.currentScope.$$destroyed = true;
- }
-
- function cleanUpScope($scope) {
-
- if (msie === 9) {
- // There is a memory leak in IE9 if all child scopes are not disconnected
- // completely when a scope is destroyed. So this code will recurse up through
- // all this scopes children
- //
- // See issue https://github.com/angular/angular.js/issues/10706
- $scope.$$childHead && cleanUpScope($scope.$$childHead);
- $scope.$$nextSibling && cleanUpScope($scope.$$nextSibling);
- }
-
- // The code below works around IE9 and V8's memory leaks
- //
- // See:
- // - https://code.google.com/p/v8/issues/detail?id=2073#c26
- // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909
- // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451
-
- $scope.$parent = $scope.$$nextSibling = $scope.$$prevSibling = $scope.$$childHead =
- $scope.$$childTail = $scope.$root = $scope.$$watchers = null;
- }
-
- /**
- * @ngdoc type
- * @name $rootScope.Scope
- *
- * @description
- * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the
- * {@link auto.$injector $injector}. Child scopes are created using the
- * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when
- * compiled HTML template is executed.) See also the {@link guide/scope Scopes guide} for
- * an in-depth introduction and usage examples.
- *
- *
- * # Inheritance
- * A scope can inherit from a parent scope, as in this example:
- * ```js
- var parent = $rootScope;
- var child = parent.$new();
-
- parent.salutation = "Hello";
- expect(child.salutation).toEqual('Hello');
-
- child.salutation = "Welcome";
- expect(child.salutation).toEqual('Welcome');
- expect(parent.salutation).toEqual('Hello');
- * ```
- *
- * When interacting with `Scope` in tests, additional helper methods are available on the
- * instances of `Scope` type. See {@link ngMock.$rootScope.Scope ngMock Scope} for additional
- * details.
- *
- *
- * @param {Object.<string, function()>=} providers Map of service factory which need to be
- * provided for the current scope. Defaults to {@link ng}.
- * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should
- * append/override services provided by `providers`. This is handy
- * when unit-testing and having the need to override a default
- * service.
- * @returns {Object} Newly created scope.
- *
- */
- function Scope() {
- this.$id = nextUid();
- this.$$phase = this.$parent = this.$$watchers =
- this.$$nextSibling = this.$$prevSibling =
- this.$$childHead = this.$$childTail = null;
- this.$root = this;
- this.$$destroyed = false;
- this.$$listeners = {};
- this.$$listenerCount = {};
- this.$$watchersCount = 0;
- this.$$isolateBindings = null;
- }
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$id
- *
- * @description
- * Unique scope ID (monotonically increasing) useful for debugging.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$parent
- *
- * @description
- * Reference to the parent scope.
- */
-
- /**
- * @ngdoc property
- * @name $rootScope.Scope#$root
- *
- * @description
- * Reference to the root scope.
- */
-
- Scope.prototype = {
- constructor: Scope,
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$new
- * @kind function
- *
- * @description
- * Creates a new child {@link ng.$rootScope.Scope scope}.
- *
- * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} event.
- * The scope can be removed from the scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.
- *
- * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is
- * desired for the scope and its child scopes to be permanently detached from the parent and
- * thus stop participating in model change detection and listener notification by invoking.
- *
- * @param {boolean} isolate If true, then the scope does not prototypically inherit from the
- * parent scope. The scope is isolated, as it can not see parent scope properties.
- * When creating widgets, it is useful for the widget to not accidentally read parent
- * state.
- *
- * @param {Scope} [parent=this] The {@link ng.$rootScope.Scope `Scope`} that will be the `$parent`
- * of the newly created scope. Defaults to `this` scope if not provided.
- * This is used when creating a transclude scope to correctly place it
- * in the scope hierarchy while maintaining the correct prototypical
- * inheritance.
- *
- * @returns {Object} The newly created child scope.
- *
- */
- $new: function(isolate, parent) {
- var child;
-
- parent = parent || this;
-
- if (isolate) {
- child = new Scope();
- child.$root = this.$root;
- } else {
- // Only create a child scope class if somebody asks for one,
- // but cache it to allow the VM to optimize lookups.
- if (!this.$$ChildScope) {
- this.$$ChildScope = createChildScopeClass(this);
- }
- child = new this.$$ChildScope();
- }
- child.$parent = parent;
- child.$$prevSibling = parent.$$childTail;
- if (parent.$$childHead) {
- parent.$$childTail.$$nextSibling = child;
- parent.$$childTail = child;
- } else {
- parent.$$childHead = parent.$$childTail = child;
- }
-
- // When the new scope is not isolated or we inherit from `this`, and
- // the parent scope is destroyed, the property `$$destroyed` is inherited
- // prototypically. In all other cases, this property needs to be set
- // when the parent scope is destroyed.
- // The listener needs to be added after the parent is set
- if (isolate || parent != this) child.$on('$destroy', destroyChildScope);
-
- return child;
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watch
- * @kind function
- *
- * @description
- * Registers a `listener` callback to be executed whenever the `watchExpression` changes.
- *
- * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest
- * $digest()} and should return the value that will be watched. (`watchExpression` should not change
- * its value when executed multiple times with the same input because it may be executed multiple
- * times by {@link ng.$rootScope.Scope#$digest $digest()}. That is, `watchExpression` should be
- * [idempotent](http://en.wikipedia.org/wiki/Idempotence).
- * - The `listener` is called only when the value from the current `watchExpression` and the
- * previous call to `watchExpression` are not equal (with the exception of the initial run,
- * see below). Inequality is determined according to reference inequality,
- * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
- * via the `!==` Javascript operator, unless `objectEquality == true`
- * (see next point)
- * - When `objectEquality == true`, inequality of the `watchExpression` is determined
- * according to the {@link angular.equals} function. To save the value of the object for
- * later comparison, the {@link angular.copy} function is used. This therefore means that
- * watching complex objects will have adverse memory and performance implications.
- * - The watch `listener` may change the model, which may trigger other `listener`s to fire.
- * This is achieved by rerunning the watchers until no changes are detected. The rerun
- * iteration limit is 10 to prevent an infinite loop deadlock.
- *
- *
- * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
- * you can register a `watchExpression` function with no `listener`. (Be prepared for
- * multiple calls to your `watchExpression` because it will execute multiple times in a
- * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.)
- *
- * After a watcher is registered with the scope, the `listener` fn is called asynchronously
- * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the
- * watcher. In rare cases, this is undesirable because the listener is called when the result
- * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you
- * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the
- * listener was called due to initialization.
- *
- *
- *
- * # Example
- * ```js
- // let's assume that scope was dependency injected as the $rootScope
- var scope = $rootScope;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
-
-
-
- // Using a function as a watchExpression
- var food;
- scope.foodCounter = 0;
- expect(scope.foodCounter).toEqual(0);
- scope.$watch(
- // This function returns the value being watched. It is called for each turn of the $digest loop
- function() { return food; },
- // This is the change listener, called when the value returned from the above function changes
- function(newValue, oldValue) {
- if ( newValue !== oldValue ) {
- // Only increment the counter if the value changed
- scope.foodCounter = scope.foodCounter + 1;
- }
- }
- );
- // No digest has been run so the counter will be zero
- expect(scope.foodCounter).toEqual(0);
-
- // Run the digest but since food has not changed count will still be zero
- scope.$digest();
- expect(scope.foodCounter).toEqual(0);
-
- // Update food and run digest. Now the counter will increment
- food = 'cheeseburger';
- scope.$digest();
- expect(scope.foodCounter).toEqual(1);
-
- * ```
- *
- *
- *
- * @param {(function()|string)} watchExpression Expression that is evaluated on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers
- * a call to the `listener`.
- *
- * - `string`: Evaluated as {@link guide/expression expression}
- * - `function(scope)`: called with current `scope` as a parameter.
- * @param {function(newVal, oldVal, scope)} listener Callback called whenever the value
- * of `watchExpression` changes.
- *
- * - `newVal` contains the current value of the `watchExpression`
- * - `oldVal` contains the previous value of the `watchExpression`
- * - `scope` refers to the current scope
- * @param {boolean=} [objectEquality=false] Compare for object equality using {@link angular.equals} instead of
- * comparing for reference equality.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $watch: function(watchExp, listener, objectEquality, prettyPrintExpression) {
- var get = $parse(watchExp);
-
- if (get.$$watchDelegate) {
- return get.$$watchDelegate(this, listener, objectEquality, get, watchExp);
- }
- var scope = this,
- array = scope.$$watchers,
- watcher = {
- fn: listener,
- last: initWatchVal,
- get: get,
- exp: prettyPrintExpression || watchExp,
- eq: !!objectEquality
- };
-
- lastDirtyWatch = null;
-
- if (!isFunction(listener)) {
- watcher.fn = noop;
- }
-
- if (!array) {
- array = scope.$$watchers = [];
- }
- // we use unshift since we use a while loop in $digest for speed.
- // the while loop reads in reverse order.
- array.unshift(watcher);
- incrementWatchersCount(this, 1);
-
- return function deregisterWatch() {
- if (arrayRemove(array, watcher) >= 0) {
- incrementWatchersCount(scope, -1);
- }
- lastDirtyWatch = null;
- };
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchGroup
- * @kind function
- *
- * @description
- * A variant of {@link ng.$rootScope.Scope#$watch $watch()} where it watches an array of `watchExpressions`.
- * If any one expression in the collection changes the `listener` is executed.
- *
- * - The items in the `watchExpressions` array are observed via standard $watch operation and are examined on every
- * call to $digest() to see if any items changes.
- * - The `listener` is called whenever any expression in the `watchExpressions` array changes.
- *
- * @param {Array.<string|Function(scope)>} watchExpressions Array of expressions that will be individually
- * watched using {@link ng.$rootScope.Scope#$watch $watch()}
- *
- * @param {function(newValues, oldValues, scope)} listener Callback called whenever the return value of any
- * expression in `watchExpressions` changes
- * The `newValues` array contains the current values of the `watchExpressions`, with the indexes matching
- * those of `watchExpression`
- * and the `oldValues` array contains the previous values of the `watchExpressions`, with the indexes matching
- * those of `watchExpression`
- * The `scope` refers to the current scope.
- * @returns {function()} Returns a de-registration function for all listeners.
- */
- $watchGroup: function(watchExpressions, listener) {
- var oldValues = new Array(watchExpressions.length);
- var newValues = new Array(watchExpressions.length);
- var deregisterFns = [];
- var self = this;
- var changeReactionScheduled = false;
- var firstRun = true;
-
- if (!watchExpressions.length) {
- // No expressions means we call the listener ASAP
- var shouldCall = true;
- self.$evalAsync(function() {
- if (shouldCall) listener(newValues, newValues, self);
- });
- return function deregisterWatchGroup() {
- shouldCall = false;
- };
- }
-
- if (watchExpressions.length === 1) {
- // Special case size of one
- return this.$watch(watchExpressions[0], function watchGroupAction(value, oldValue, scope) {
- newValues[0] = value;
- oldValues[0] = oldValue;
- listener(newValues, (value === oldValue) ? newValues : oldValues, scope);
- });
- }
-
- forEach(watchExpressions, function(expr, i) {
- var unwatchFn = self.$watch(expr, function watchGroupSubAction(value, oldValue) {
- newValues[i] = value;
- oldValues[i] = oldValue;
- if (!changeReactionScheduled) {
- changeReactionScheduled = true;
- self.$evalAsync(watchGroupAction);
- }
- });
- deregisterFns.push(unwatchFn);
- });
-
- function watchGroupAction() {
- changeReactionScheduled = false;
-
- if (firstRun) {
- firstRun = false;
- listener(newValues, newValues, self);
- } else {
- listener(newValues, oldValues, self);
- }
- }
-
- return function deregisterWatchGroup() {
- while (deregisterFns.length) {
- deregisterFns.shift()();
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$watchCollection
- * @kind function
- *
- * @description
- * Shallow watches the properties of an object and fires whenever any of the properties change
- * (for arrays, this implies watching the array items; for object maps, this implies watching
- * the properties). If a change is detected, the `listener` callback is fired.
- *
- * - The `obj` collection is observed via standard $watch operation and is examined on every
- * call to $digest() to see if any items have been added, removed, or moved.
- * - The `listener` is called whenever anything within the `obj` has changed. Examples include
- * adding, removing, and moving items belonging to an object or array.
- *
- *
- * # Example
- * ```js
- $scope.names = ['igor', 'matias', 'misko', 'james'];
- $scope.dataCount = 4;
-
- $scope.$watchCollection('names', function(newNames, oldNames) {
- $scope.dataCount = newNames.length;
- });
-
- expect($scope.dataCount).toEqual(4);
- $scope.$digest();
-
- //still at 4 ... no changes
- expect($scope.dataCount).toEqual(4);
-
- $scope.names.pop();
- $scope.$digest();
-
- //now there's been a change
- expect($scope.dataCount).toEqual(3);
- * ```
- *
- *
- * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The
- * expression value should evaluate to an object or an array which is observed on each
- * {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the
- * collection will trigger a call to the `listener`.
- *
- * @param {function(newCollection, oldCollection, scope)} listener a callback function called
- * when a change is detected.
- * - The `newCollection` object is the newly modified data obtained from the `obj` expression
- * - The `oldCollection` object is a copy of the former collection data.
- * Due to performance considerations, the`oldCollection` value is computed only if the
- * `listener` function declares two or more arguments.
- * - The `scope` argument refers to the current scope.
- *
- * @returns {function()} Returns a de-registration function for this listener. When the
- * de-registration function is executed, the internal watch operation is terminated.
- */
- $watchCollection: function(obj, listener) {
- $watchCollectionInterceptor.$stateful = true;
-
- var self = this;
- // the current value, updated on each dirty-check run
- var newValue;
- // a shallow copy of the newValue from the last dirty-check run,
- // updated to match newValue during dirty-check run
- var oldValue;
- // a shallow copy of the newValue from when the last change happened
- var veryOldValue;
- // only track veryOldValue if the listener is asking for it
- var trackVeryOldValue = (listener.length > 1);
- var changeDetected = 0;
- var changeDetector = $parse(obj, $watchCollectionInterceptor);
- var internalArray = [];
- var internalObject = {};
- var initRun = true;
- var oldLength = 0;
-
- function $watchCollectionInterceptor(_value) {
- newValue = _value;
- var newLength, key, bothNaN, newItem, oldItem;
-
- // If the new value is undefined, then return undefined as the watch may be a one-time watch
- if (isUndefined(newValue)) return;
-
- if (!isObject(newValue)) { // if primitive
- if (oldValue !== newValue) {
- oldValue = newValue;
- changeDetected++;
- }
- } else if (isArrayLike(newValue)) {
- if (oldValue !== internalArray) {
- // we are transitioning from something which was not an array into array.
- oldValue = internalArray;
- oldLength = oldValue.length = 0;
- changeDetected++;
- }
-
- newLength = newValue.length;
-
- if (oldLength !== newLength) {
- // if lengths do not match we need to trigger change notification
- changeDetected++;
- oldValue.length = oldLength = newLength;
- }
- // copy the items to oldValue and look for changes.
- for (var i = 0; i < newLength; i++) {
- oldItem = oldValue[i];
- newItem = newValue[i];
-
- bothNaN = (oldItem !== oldItem) && (newItem !== newItem);
- if (!bothNaN && (oldItem !== newItem)) {
- changeDetected++;
- oldValue[i] = newItem;
- }
- }
- } else {
- if (oldValue !== internalObject) {
- // we are transitioning from something which was not an object into object.
- oldValue = internalObject = {};
- oldLength = 0;
- changeDetected++;
- }
- // copy the items to oldValue and look for changes.
- newLength = 0;
- for (key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- newLength++;
- newItem = newValue[key];
- oldItem = oldValue[key];
-
- if (key in oldValue) {
- bothNaN = (oldItem !== oldItem) && (newItem !== newItem);
- if (!bothNaN && (oldItem !== newItem)) {
- changeDetected++;
- oldValue[key] = newItem;
- }
- } else {
- oldLength++;
- oldValue[key] = newItem;
- changeDetected++;
- }
- }
- }
- if (oldLength > newLength) {
- // we used to have more keys, need to find them and destroy them.
- changeDetected++;
- for (key in oldValue) {
- if (!hasOwnProperty.call(newValue, key)) {
- oldLength--;
- delete oldValue[key];
- }
- }
- }
- }
- return changeDetected;
- }
-
- function $watchCollectionAction() {
- if (initRun) {
- initRun = false;
- listener(newValue, newValue, self);
- } else {
- listener(newValue, veryOldValue, self);
- }
-
- // make a copy for the next time a collection is changed
- if (trackVeryOldValue) {
- if (!isObject(newValue)) {
- //primitive
- veryOldValue = newValue;
- } else if (isArrayLike(newValue)) {
- veryOldValue = new Array(newValue.length);
- for (var i = 0; i < newValue.length; i++) {
- veryOldValue[i] = newValue[i];
- }
- } else { // if object
- veryOldValue = {};
- for (var key in newValue) {
- if (hasOwnProperty.call(newValue, key)) {
- veryOldValue[key] = newValue[key];
- }
- }
- }
- }
- }
-
- return this.$watch(changeDetector, $watchCollectionAction);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$digest
- * @kind function
- *
- * @description
- * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and
- * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change
- * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}
- * until no more listeners are firing. This means that it is possible to get into an infinite
- * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of
- * iterations exceeds 10.
- *
- * Usually, you don't call `$digest()` directly in
- * {@link ng.directive:ngController controllers} or in
- * {@link ng.$compileProvider#directive directives}.
- * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within
- * a {@link ng.$compileProvider#directive directive}), which will force a `$digest()`.
- *
- * If you want to be notified whenever `$digest()` is called,
- * you can register a `watchExpression` function with
- * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.
- *
- * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.
- *
- * # Example
- * ```js
- var scope = ...;
- scope.name = 'misko';
- scope.counter = 0;
-
- expect(scope.counter).toEqual(0);
- scope.$watch('name', function(newValue, oldValue) {
- scope.counter = scope.counter + 1;
- });
- expect(scope.counter).toEqual(0);
-
- scope.$digest();
- // the listener is always called during the first $digest loop after it was registered
- expect(scope.counter).toEqual(1);
-
- scope.$digest();
- // but now it will not be called unless the value changes
- expect(scope.counter).toEqual(1);
-
- scope.name = 'adam';
- scope.$digest();
- expect(scope.counter).toEqual(2);
- * ```
- *
- */
- $digest: function() {
- var watch, value, last,
- watchers,
- length,
- dirty, ttl = TTL,
- next, current, target = this,
- watchLog = [],
- logIdx, logMsg, asyncTask;
-
- beginPhase('$digest');
- // Check for changes to browser url that happened in sync before the call to $digest
- $browser.$$checkUrlChange();
-
- if (this === $rootScope && applyAsyncId !== null) {
- // If this is the root scope, and $applyAsync has scheduled a deferred $apply(), then
- // cancel the scheduled $apply and flush the queue of expressions to be evaluated.
- $browser.defer.cancel(applyAsyncId);
- flushApplyAsync();
- }
-
- lastDirtyWatch = null;
-
- do { // "while dirty" loop
- dirty = false;
- current = target;
-
- while (asyncQueue.length) {
- try {
- asyncTask = asyncQueue.shift();
- asyncTask.scope.$eval(asyncTask.expression, asyncTask.locals);
- } catch (e) {
- $exceptionHandler(e);
- }
- lastDirtyWatch = null;
- }
-
- traverseScopesLoop:
- do { // "traverse the scopes" loop
- if ((watchers = current.$$watchers)) {
- // process our watches
- length = watchers.length;
- while (length--) {
- try {
- watch = watchers[length];
- // Most common watches are on primitives, in which case we can short
- // circuit it with === operator, only when === fails do we use .equals
- if (watch) {
- if ((value = watch.get(current)) !== (last = watch.last) &&
- !(watch.eq
- ? equals(value, last)
- : (typeof value === 'number' && typeof last === 'number'
- && isNaN(value) && isNaN(last)))) {
- dirty = true;
- lastDirtyWatch = watch;
- watch.last = watch.eq ? copy(value, null) : value;
- watch.fn(value, ((last === initWatchVal) ? value : last), current);
- if (ttl < 5) {
- logIdx = 4 - ttl;
- if (!watchLog[logIdx]) watchLog[logIdx] = [];
- watchLog[logIdx].push({
- msg: isFunction(watch.exp) ? 'fn: ' + (watch.exp.name || watch.exp.toString()) : watch.exp,
- newVal: value,
- oldVal: last
- });
- }
- } else if (watch === lastDirtyWatch) {
- // If the most recently dirty watcher is now clean, short circuit since the remaining watchers
- // have already been tested.
- dirty = false;
- break traverseScopesLoop;
- }
- }
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $broadcast
- if (!(next = ((current.$$watchersCount && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while (current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- } while ((current = next));
-
- // `break traverseScopesLoop;` takes us to here
-
- if ((dirty || asyncQueue.length) && !(ttl--)) {
- clearPhase();
- throw $rootScopeMinErr('infdig',
- '{0} $digest() iterations reached. Aborting!\n' +
- 'Watchers fired in the last 5 iterations: {1}',
- TTL, watchLog);
- }
-
- } while (dirty || asyncQueue.length);
-
- clearPhase();
-
- while (postDigestQueue.length) {
- try {
- postDigestQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- },
-
-
- /**
- * @ngdoc event
- * @name $rootScope.Scope#$destroy
- * @eventType broadcast on scope being destroyed
- *
- * @description
- * Broadcasted when a scope and its children are being destroyed.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$destroy
- * @kind function
- *
- * @description
- * Removes the current scope (and all of its children) from the parent scope. Removal implies
- * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer
- * propagate to the current scope and its children. Removal also implies that the current
- * scope is eligible for garbage collection.
- *
- * The `$destroy()` is usually used by directives such as
- * {@link ng.directive:ngRepeat ngRepeat} for managing the
- * unrolling of the loop.
- *
- * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.
- * Application code can register a `$destroy` event handler that will give it a chance to
- * perform any necessary cleanup.
- *
- * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to
- * clean up DOM bindings before an element is removed from the DOM.
- */
- $destroy: function() {
- // We can't destroy a scope that has been already destroyed.
- if (this.$$destroyed) return;
- var parent = this.$parent;
-
- this.$broadcast('$destroy');
- this.$$destroyed = true;
-
- if (this === $rootScope) {
- //Remove handlers attached to window when $rootScope is removed
- $browser.$$applicationDestroyed();
- }
-
- incrementWatchersCount(this, -this.$$watchersCount);
- for (var eventName in this.$$listenerCount) {
- decrementListenerCount(this, this.$$listenerCount[eventName], eventName);
- }
-
- // sever all the references to parent scopes (after this cleanup, the current scope should
- // not be retained by any of our references and should be eligible for garbage collection)
- if (parent && parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;
- if (parent && parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;
- if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;
- if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;
-
- // Disable listeners, watchers and apply/digest methods
- this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = noop;
- this.$on = this.$watch = this.$watchGroup = function() { return noop; };
- this.$$listeners = {};
-
- // Disconnect the next sibling to prevent `cleanUpScope` destroying those too
- this.$$nextSibling = null;
- cleanUpScope(this);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$eval
- * @kind function
- *
- * @description
- * Executes the `expression` on the current scope and returns the result. Any exceptions in
- * the expression are propagated (uncaught). This is useful when evaluating Angular
- * expressions.
- *
- * # Example
- * ```js
- var scope = ng.$rootScope.Scope();
- scope.a = 1;
- scope.b = 2;
-
- expect(scope.$eval('a+b')).toEqual(3);
- expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);
- * ```
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- * @returns {*} The result of evaluating the expression.
- */
- $eval: function(expr, locals) {
- return $parse(expr)(this, locals);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$evalAsync
- * @kind function
- *
- * @description
- * Executes the expression on the current scope at a later point in time.
- *
- * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only
- * that:
- *
- * - it will execute after the function that scheduled the evaluation (preferably before DOM
- * rendering).
- * - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after
- * `expression` execution.
- *
- * Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle
- * will be scheduled. However, it is encouraged to always call code that changes the model
- * from within an `$apply` call. That includes code evaluated via `$evalAsync`.
- *
- * @param {(string|function())=} expression An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with the current `scope` parameter.
- *
- * @param {(object)=} locals Local variables object, useful for overriding values in scope.
- */
- $evalAsync: function(expr, locals) {
- // if we are outside of an $digest loop and this is the first time we are scheduling async
- // task also schedule async auto-flush
- if (!$rootScope.$$phase && !asyncQueue.length) {
- $browser.defer(function() {
- if (asyncQueue.length) {
- $rootScope.$digest();
- }
- });
- }
-
- asyncQueue.push({scope: this, expression: expr, locals: locals});
- },
-
- $$postDigest: function(fn) {
- postDigestQueue.push(fn);
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$apply
- * @kind function
- *
- * @description
- * `$apply()` is used to execute an expression in angular from outside of the angular
- * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).
- * Because we are calling into the angular framework we need to perform proper scope life
- * cycle of {@link ng.$exceptionHandler exception handling},
- * {@link ng.$rootScope.Scope#$digest executing watches}.
- *
- * ## Life cycle
- *
- * # Pseudo-Code of `$apply()`
- * ```js
- function $apply(expr) {
- try {
- return $eval(expr);
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- $root.$digest();
- }
- }
- * ```
- *
- *
- * Scope's `$apply()` method transitions through the following stages:
- *
- * 1. The {@link guide/expression expression} is executed using the
- * {@link ng.$rootScope.Scope#$eval $eval()} method.
- * 2. Any exceptions from the execution of the expression are forwarded to the
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the
- * expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.
- *
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- *
- * @returns {*} The result of evaluating the expression.
- */
- $apply: function(expr) {
- try {
- beginPhase('$apply');
- try {
- return this.$eval(expr);
- } finally {
- clearPhase();
- }
- } catch (e) {
- $exceptionHandler(e);
- } finally {
- try {
- $rootScope.$digest();
- } catch (e) {
- $exceptionHandler(e);
- throw e;
- }
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$applyAsync
- * @kind function
- *
- * @description
- * Schedule the invocation of $apply to occur at a later time. The actual time difference
- * varies across browsers, but is typically around ~10 milliseconds.
- *
- * This can be used to queue up multiple expressions which need to be evaluated in the same
- * digest.
- *
- * @param {(string|function())=} exp An angular expression to be executed.
- *
- * - `string`: execute using the rules as defined in {@link guide/expression expression}.
- * - `function(scope)`: execute the function with current `scope` parameter.
- */
- $applyAsync: function(expr) {
- var scope = this;
- expr && applyAsyncQueue.push($applyAsyncExpression);
- scheduleApplyAsync();
-
- function $applyAsyncExpression() {
- scope.$eval(expr);
- }
- },
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$on
- * @kind function
- *
- * @description
- * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for
- * discussion of event life cycle.
- *
- * The event listener function format is: `function(event, args...)`. The `event` object
- * passed into the listener has the following attributes:
- *
- * - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or
- * `$broadcast`-ed.
- * - `currentScope` - `{Scope}`: the scope that is currently handling the event. Once the
- * event propagates through the scope hierarchy, this property is set to null.
- * - `name` - `{string}`: name of the event.
- * - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel
- * further event propagation (available only for events that were `$emit`-ed).
- * - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag
- * to true.
- * - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.
- *
- * @param {string} name Event name to listen on.
- * @param {function(event, ...args)} listener Function to call when the event is emitted.
- * @returns {function()} Returns a deregistration function for this listener.
- */
- $on: function(name, listener) {
- var namedListeners = this.$$listeners[name];
- if (!namedListeners) {
- this.$$listeners[name] = namedListeners = [];
- }
- namedListeners.push(listener);
-
- var current = this;
- do {
- if (!current.$$listenerCount[name]) {
- current.$$listenerCount[name] = 0;
- }
- current.$$listenerCount[name]++;
- } while ((current = current.$parent));
-
- var self = this;
- return function() {
- var indexOfListener = namedListeners.indexOf(listener);
- if (indexOfListener !== -1) {
- namedListeners[indexOfListener] = null;
- decrementListenerCount(self, 1, name);
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$emit
- * @kind function
- *
- * @description
- * Dispatches an event `name` upwards through the scope hierarchy notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$emit` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event traverses upwards toward the root scope and calls all
- * registered listeners along the way. The event will stop propagating if one of the listeners
- * cancels it.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to emit.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).
- */
- $emit: function(name, args) {
- var empty = [],
- namedListeners,
- scope = this,
- stopPropagation = false,
- event = {
- name: name,
- targetScope: scope,
- stopPropagation: function() {stopPropagation = true;},
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- },
- listenerArgs = concat([event], arguments, 1),
- i, length;
-
- do {
- namedListeners = scope.$$listeners[name] || empty;
- event.currentScope = scope;
- for (i = 0, length = namedListeners.length; i < length; i++) {
-
- // if listeners were deregistered, defragment the array
- if (!namedListeners[i]) {
- namedListeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
- try {
- //allow all listeners attached to the current scope to run
- namedListeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- //if any listener on the current scope stops propagation, prevent bubbling
- if (stopPropagation) {
- event.currentScope = null;
- return event;
- }
- //traverse upwards
- scope = scope.$parent;
- } while (scope);
-
- event.currentScope = null;
-
- return event;
- },
-
-
- /**
- * @ngdoc method
- * @name $rootScope.Scope#$broadcast
- * @kind function
- *
- * @description
- * Dispatches an event `name` downwards to all child scopes (and their children) notifying the
- * registered {@link ng.$rootScope.Scope#$on} listeners.
- *
- * The event life cycle starts at the scope on which `$broadcast` was called. All
- * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get
- * notified. Afterwards, the event propagates to all direct and indirect scopes of the current
- * scope and calls all registered listeners along the way. The event cannot be canceled.
- *
- * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed
- * onto the {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * @param {string} name Event name to broadcast.
- * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.
- * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}
- */
- $broadcast: function(name, args) {
- var target = this,
- current = target,
- next = target,
- event = {
- name: name,
- targetScope: target,
- preventDefault: function() {
- event.defaultPrevented = true;
- },
- defaultPrevented: false
- };
-
- if (!target.$$listenerCount[name]) return event;
-
- var listenerArgs = concat([event], arguments, 1),
- listeners, i, length;
-
- //down while you can, then up and next sibling or up and next sibling until back at root
- while ((current = next)) {
- event.currentScope = current;
- listeners = current.$$listeners[name] || [];
- for (i = 0, length = listeners.length; i < length; i++) {
- // if listeners were deregistered, defragment the array
- if (!listeners[i]) {
- listeners.splice(i, 1);
- i--;
- length--;
- continue;
- }
-
- try {
- listeners[i].apply(null, listenerArgs);
- } catch (e) {
- $exceptionHandler(e);
- }
- }
-
- // Insanity Warning: scope depth-first traversal
- // yes, this code is a bit crazy, but it works and we have tests to prove it!
- // this piece should be kept in sync with the traversal in $digest
- // (though it differs due to having the extra check for $$listenerCount)
- if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||
- (current !== target && current.$$nextSibling)))) {
- while (current !== target && !(next = current.$$nextSibling)) {
- current = current.$parent;
- }
- }
- }
-
- event.currentScope = null;
- return event;
- }
- };
-
- var $rootScope = new Scope();
-
- //The internal queues. Expose them on the $rootScope for debugging/testing purposes.
- var asyncQueue = $rootScope.$$asyncQueue = [];
- var postDigestQueue = $rootScope.$$postDigestQueue = [];
- var applyAsyncQueue = $rootScope.$$applyAsyncQueue = [];
-
- return $rootScope;
-
-
- function beginPhase(phase) {
- if ($rootScope.$$phase) {
- throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);
- }
-
- $rootScope.$$phase = phase;
- }
-
- function clearPhase() {
- $rootScope.$$phase = null;
- }
-
- function incrementWatchersCount(current, count) {
- do {
- current.$$watchersCount += count;
- } while ((current = current.$parent));
- }
-
- function decrementListenerCount(current, count, name) {
- do {
- current.$$listenerCount[name] -= count;
-
- if (current.$$listenerCount[name] === 0) {
- delete current.$$listenerCount[name];
- }
- } while ((current = current.$parent));
- }
-
- /**
- * function used as an initial value for watchers.
- * because it's unique we can easily tell it apart from other values
- */
- function initWatchVal() {}
-
- function flushApplyAsync() {
- while (applyAsyncQueue.length) {
- try {
- applyAsyncQueue.shift()();
- } catch (e) {
- $exceptionHandler(e);
- }
- }
- applyAsyncId = null;
- }
-
- function scheduleApplyAsync() {
- if (applyAsyncId === null) {
- applyAsyncId = $browser.defer(function() {
- $rootScope.$apply(flushApplyAsync);
- });
- }
- }
- }];
-}
-
-/**
- * @description
- * Private service to sanitize uris for links and images. Used by $compile and $sanitize.
- */
-function $$SanitizeUriProvider() {
- var aHrefSanitizationWhitelist = /^\s*(https?|ftp|mailto|tel|file):/,
- imgSrcSanitizationWhitelist = /^\s*((https?|ftp|file|blob):|data:image\/)/;
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during a[href] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to a[href] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.aHrefSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- aHrefSanitizationWhitelist = regexp;
- return this;
- }
- return aHrefSanitizationWhitelist;
- };
-
-
- /**
- * @description
- * Retrieves or overrides the default regular expression that is used for whitelisting of safe
- * urls during img[src] sanitization.
- *
- * The sanitization is a security measure aimed at prevent XSS attacks via html links.
- *
- * Any url about to be assigned to img[src] via data-binding is first normalized and turned into
- * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`
- * regular expression. If a match is found, the original url is written into the dom. Otherwise,
- * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.
- *
- * @param {RegExp=} regexp New regexp to whitelist urls with.
- * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for
- * chaining otherwise.
- */
- this.imgSrcSanitizationWhitelist = function(regexp) {
- if (isDefined(regexp)) {
- imgSrcSanitizationWhitelist = regexp;
- return this;
- }
- return imgSrcSanitizationWhitelist;
- };
-
- this.$get = function() {
- return function sanitizeUri(uri, isImage) {
- var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;
- var normalizedVal;
- normalizedVal = urlResolve(uri).href;
- if (normalizedVal !== '' && !normalizedVal.match(regex)) {
- return 'unsafe:' + normalizedVal;
- }
- return uri;
- };
- };
-}
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * Any commits to this file should be reviewed with security in mind. *
- * Changes to this file can potentially create security vulnerabilities. *
- * An approval from 2 Core members with history of modifying *
- * this file is required. *
- * *
- * Does the change somehow allow for arbitrary javascript to be executed? *
- * Or allows for someone to change the prototype of built-in objects? *
- * Or gives undesired access to variables likes document or window? *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-
-var $sceMinErr = minErr('$sce');
-
-var SCE_CONTEXTS = {
- HTML: 'html',
- CSS: 'css',
- URL: 'url',
- // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a
- // url. (e.g. ng-include, script src, templateUrl)
- RESOURCE_URL: 'resourceUrl',
- JS: 'js'
-};
-
-// Helper functions follow.
-
-function adjustMatcher(matcher) {
- if (matcher === 'self') {
- return matcher;
- } else if (isString(matcher)) {
- // Strings match exactly except for 2 wildcards - '*' and '**'.
- // '*' matches any character except those from the set ':/.?&'.
- // '**' matches any character (like .* in a RegExp).
- // More than 2 *'s raises an error as it's ill defined.
- if (matcher.indexOf('***') > -1) {
- throw $sceMinErr('iwcard',
- 'Illegal sequence *** in string matcher. String: {0}', matcher);
- }
- matcher = escapeForRegexp(matcher).
- replace('\\*\\*', '.*').
- replace('\\*', '[^:/.?&;]*');
- return new RegExp('^' + matcher + '$');
- } else if (isRegExp(matcher)) {
- // The only other type of matcher allowed is a Regexp.
- // Match entire URL / disallow partial matches.
- // Flags are reset (i.e. no global, ignoreCase or multiline)
- return new RegExp('^' + matcher.source + '$');
- } else {
- throw $sceMinErr('imatcher',
- 'Matchers may only be "self", string patterns or RegExp objects');
- }
-}
-
-
-function adjustMatchers(matchers) {
- var adjustedMatchers = [];
- if (isDefined(matchers)) {
- forEach(matchers, function(matcher) {
- adjustedMatchers.push(adjustMatcher(matcher));
- });
- }
- return adjustedMatchers;
-}
-
-
-/**
- * @ngdoc service
- * @name $sceDelegate
- * @kind function
- *
- * @description
- *
- * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict
- * Contextual Escaping (SCE)} services to AngularJS.
- *
- * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of
- * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS. This is
- * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to
- * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things
- * work because `$sce` delegates to `$sceDelegate` for these operations.
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.
- *
- * The default instance of `$sceDelegate` should work out of the box with little pain. While you
- * can override it completely to change the behavior of `$sce`, the common case would
- * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting
- * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as
- * templates. Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist
- * $sceDelegateProvider.resourceUrlWhitelist} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- */
-
-/**
- * @ngdoc provider
- * @name $sceDelegateProvider
- * @description
- *
- * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate
- * $sceDelegate} service. This allows one to get/set the whitelists and blacklists used to ensure
- * that the URLs used for sourcing Angular templates are safe. Refer {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and
- * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}
- *
- * For the general details about this service in Angular, read the main page for {@link ng.$sce
- * Strict Contextual Escaping (SCE)}.
- *
- * **Example**: Consider the following case. <a name="example"></a>
- *
- * - your app is hosted at url `http://myapp.example.com/`
- * - but some of your templates are hosted on other domains you control such as
- * `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.
- * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.
- *
- * Here is what a secure configuration for this scenario might look like:
- *
- * ```
- * angular.module('myApp', []).config(function($sceDelegateProvider) {
- * $sceDelegateProvider.resourceUrlWhitelist([
- * // Allow same origin resource loads.
- * 'self',
- * // Allow loading from our assets domain. Notice the difference between * and **.
- * 'http://srv*.assets.example.com/**'
- * ]);
- *
- * // The blacklist overrides the whitelist so the open redirect here is blocked.
- * $sceDelegateProvider.resourceUrlBlacklist([
- * 'http://myapp.example.com/clickThru**'
- * ]);
- * });
- * ```
- */
-
-function $SceDelegateProvider() {
- this.SCE_CONTEXTS = SCE_CONTEXTS;
-
- // Resource URLs can also be trusted by policy.
- var resourceUrlWhitelist = ['self'],
- resourceUrlBlacklist = [];
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlWhitelist
- * @kind function
- *
- * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * Note: **an empty whitelist array will block all URLs**!
- *
- * @return {Array} the currently set whitelist array.
- *
- * The **default value** when no whitelist has been explicitly set is `['self']` allowing only
- * same origin resource requests.
- *
- * @description
- * Sets/Gets the whitelist of trusted resource URLs.
- */
- this.resourceUrlWhitelist = function(value) {
- if (arguments.length) {
- resourceUrlWhitelist = adjustMatchers(value);
- }
- return resourceUrlWhitelist;
- };
-
- /**
- * @ngdoc method
- * @name $sceDelegateProvider#resourceUrlBlacklist
- * @kind function
- *
- * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value
- * provided. This must be an array or null. A snapshot of this array is used so further
- * changes to the array are ignored.
- *
- * Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items
- * allowed in this array.
- *
- * The typical usage for the blacklist is to **block
- * [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as
- * these would otherwise be trusted but actually return content from the redirected domain.
- *
- * Finally, **the blacklist overrides the whitelist** and has the final say.
- *
- * @return {Array} the currently set blacklist array.
- *
- * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there
- * is no blacklist.)
- *
- * @description
- * Sets/Gets the blacklist of trusted resource URLs.
- */
-
- this.resourceUrlBlacklist = function(value) {
- if (arguments.length) {
- resourceUrlBlacklist = adjustMatchers(value);
- }
- return resourceUrlBlacklist;
- };
-
- this.$get = ['$injector', function($injector) {
-
- var htmlSanitizer = function htmlSanitizer(html) {
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- };
-
- if ($injector.has('$sanitize')) {
- htmlSanitizer = $injector.get('$sanitize');
- }
-
-
- function matchUrl(matcher, parsedUrl) {
- if (matcher === 'self') {
- return urlIsSameOrigin(parsedUrl);
- } else {
- // definitely a regex. See adjustMatchers()
- return !!matcher.exec(parsedUrl.href);
- }
- }
-
- function isResourceUrlAllowedByPolicy(url) {
- var parsedUrl = urlResolve(url.toString());
- var i, n, allowed = false;
- // Ensure that at least one item from the whitelist allows this url.
- for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {
- if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {
- allowed = true;
- break;
- }
- }
- if (allowed) {
- // Ensure that no item from the blacklist blocked this url.
- for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {
- if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {
- allowed = false;
- break;
- }
- }
- }
- return allowed;
- }
-
- function generateHolderType(Base) {
- var holderType = function TrustedValueHolderType(trustedValue) {
- this.$$unwrapTrustedValue = function() {
- return trustedValue;
- };
- };
- if (Base) {
- holderType.prototype = new Base();
- }
- holderType.prototype.valueOf = function sceValueOf() {
- return this.$$unwrapTrustedValue();
- };
- holderType.prototype.toString = function sceToString() {
- return this.$$unwrapTrustedValue().toString();
- };
- return holderType;
- }
-
- var trustedValueHolderBase = generateHolderType(),
- byType = {};
-
- byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);
- byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);
-
- /**
- * @ngdoc method
- * @name $sceDelegate#trustAs
- *
- * @description
- * Returns an object that is trusted by angular for use in specified strict
- * contextual escaping contexts (such as ng-bind-html, ng-include, any src
- * attribute interpolation, any dom event binding attribute interpolation
- * such as for onclick, etc.) that uses the provided value.
- * See {@link ng.$sce $sce} for enabling strict contextual escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
- function trustAs(type, trustedValue) {
- var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (!Constructor) {
- throw $sceMinErr('icontext',
- 'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',
- type, trustedValue);
- }
- if (trustedValue === null || isUndefined(trustedValue) || trustedValue === '') {
- return trustedValue;
- }
- // All the current contexts in SCE_CONTEXTS happen to be strings. In order to avoid trusting
- // mutable objects, we ensure here that the value passed in is actually a string.
- if (typeof trustedValue !== 'string') {
- throw $sceMinErr('itype',
- 'Attempted to trust a non-string value in a content requiring a string: Context: {0}',
- type);
- }
- return new Constructor(trustedValue);
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#valueOf
- *
- * @description
- * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.
- *
- * If the passed parameter is not a value that had been returned by {@link
- * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.
- *
- * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}
- * call or anything else.
- * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if `value` is the result of such a call. Otherwise, returns
- * `value` unchanged.
- */
- function valueOf(maybeTrusted) {
- if (maybeTrusted instanceof trustedValueHolderBase) {
- return maybeTrusted.$$unwrapTrustedValue();
- } else {
- return maybeTrusted;
- }
- }
-
- /**
- * @ngdoc method
- * @name $sceDelegate#getTrusted
- *
- * @description
- * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and
- * returns the originally supplied value if the queried context type is a supertype of the
- * created type. If this condition isn't satisfied, throws an exception.
- *
- * <div class="alert alert-danger">
- * Disabling auto-escaping is extremely dangerous, it usually creates a Cross Site Scripting
- * (XSS) vulnerability in your application.
- * </div>
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} call.
- * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs
- * `$sceDelegate.trustAs`} if valid in this context. Otherwise, throws an exception.
- */
- function getTrusted(type, maybeTrusted) {
- if (maybeTrusted === null || isUndefined(maybeTrusted) || maybeTrusted === '') {
- return maybeTrusted;
- }
- var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);
- if (constructor && maybeTrusted instanceof constructor) {
- return maybeTrusted.$$unwrapTrustedValue();
- }
- // If we get here, then we may only take one of two actions.
- // 1. sanitize the value for the requested type, or
- // 2. throw an exception.
- if (type === SCE_CONTEXTS.RESOURCE_URL) {
- if (isResourceUrlAllowedByPolicy(maybeTrusted)) {
- return maybeTrusted;
- } else {
- throw $sceMinErr('insecurl',
- 'Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}',
- maybeTrusted.toString());
- }
- } else if (type === SCE_CONTEXTS.HTML) {
- return htmlSanitizer(maybeTrusted);
- }
- throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');
- }
-
- return { trustAs: trustAs,
- getTrusted: getTrusted,
- valueOf: valueOf };
- }];
-}
-
-
-/**
- * @ngdoc provider
- * @name $sceProvider
- * @description
- *
- * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.
- * - enable/disable Strict Contextual Escaping (SCE) in a module
- * - override the default implementation with a custom delegate
- *
- * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.
- */
-
-/* jshint maxlen: false*/
-
-/**
- * @ngdoc service
- * @name $sce
- * @kind function
- *
- * @description
- *
- * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.
- *
- * # Strict Contextual Escaping
- *
- * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain
- * contexts to result in a value that is marked as safe to use for that context. One example of
- * such a context is binding arbitrary html controlled by the user via `ng-bind-html`. We refer
- * to these contexts as privileged or SCE contexts.
- *
- * As of version 1.2, Angular ships with SCE enabled by default.
- *
- * Note: When enabled (the default), IE<11 in quirks mode is not supported. In this mode, IE<11 allow
- * one to execute arbitrary javascript by the use of the expression() syntax. Refer
- * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.
- * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`
- * to the top of your HTML document.
- *
- * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for
- * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.
- *
- * Here's an example of a binding in a privileged context:
- *
- * ```
- * <input ng-model="userHtml" aria-label="User input">
- * <div ng-bind-html="userHtml"></div>
- * ```
- *
- * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user. With SCE
- * disabled, this application allows the user to render arbitrary HTML into the DIV.
- * In a more realistic example, one may be rendering user comments, blog articles, etc. via
- * bindings. (HTML is just one example of a context where rendering user controlled input creates
- * security vulnerabilities.)
- *
- * For the case of HTML, you might use a library, either on the client side, or on the server side,
- * to sanitize unsafe HTML before binding to the value and rendering it in the document.
- *
- * How would you ensure that every place that used these types of bindings was bound to a value that
- * was sanitized by your library (or returned as safe for rendering by your server?) How can you
- * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some
- * properties/fields and forgot to update the binding to the sanitized value?
- *
- * To be secure by default, you want to ensure that any such bindings are disallowed unless you can
- * determine that something explicitly says it's safe to use a value for binding in that
- * context. You can then audit your code (a simple grep would do) to ensure that this is only done
- * for those values that you can easily tell are safe - because they were received from your server,
- * sanitized by your library, etc. You can organize your codebase to help with this - perhaps
- * allowing only the files in a specific directory to do this. Ensuring that the internal API
- * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.
- *
- * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}
- * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to
- * obtain values that will be accepted by SCE / privileged contexts.
- *
- *
- * ## How does it work?
- *
- * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted
- * $sce.getTrusted(context, value)} rather than to the value directly. Directives use {@link
- * ng.$sce#parseAs $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the
- * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.
- *
- * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link
- * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}. Here's the actual code (slightly
- * simplified):
- *
- * ```
- * var ngBindHtmlDirective = ['$sce', function($sce) {
- * return function(scope, element, attr) {
- * scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {
- * element.html(value || '');
- * });
- * };
- * }];
- * ```
- *
- * ## Impact on loading templates
- *
- * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as
- * `templateUrl`'s specified by {@link guide/directive directives}.
- *
- * By default, Angular only loads templates from the same domain and protocol as the application
- * document. This is done by calling {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on the template URL. To load templates from other domains and/or
- * protocols, you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist
- * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.
- *
- * *Please note*:
- * The browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy apply in addition to this and may further restrict whether the template is successfully
- * loaded. This means that without the right CORS policy, loading templates from a different domain
- * won't work on all browsers. Also, loading templates from `file://` URL does not work on some
- * browsers.
- *
- * ## This feels like too much overhead
- *
- * It's important to remember that SCE only applies to interpolation expressions.
- *
- * If your expressions are constant literals, they're automatically trusted and you don't need to
- * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.
- * `<div ng-bind-html="'<b>implicitly trusted</b>'"></div>`) just works.
- *
- * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them
- * through {@link ng.$sce#getTrusted $sce.getTrusted}. SCE doesn't play a role here.
- *
- * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load
- * templates in `ng-include` from your application's domain without having to even know about SCE.
- * It blocks loading templates from other domains or loading templates over http from an https
- * served document. You can change these by setting your own custom {@link
- * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link
- * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.
- *
- * This significantly reduces the overhead. It is far easier to pay the small overhead and have an
- * application that's secure and can be audited to verify that with much more ease than bolting
- * security onto an application later.
- *
- * <a name="contexts"></a>
- * ## What trusted context types are supported?
- *
- * | Context | Notes |
- * |---------------------|----------------|
- * | `$sce.HTML` | For HTML that's safe to source into the application. The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |
- * | `$sce.CSS` | For CSS that's safe to source into the application. Currently unused. Feel free to use it in your own directives. |
- * | `$sce.URL` | For URLs that are safe to follow as links. Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |
- * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application. Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.) <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |
- * | `$sce.JS` | For JavaScript that is safe to execute in your application's context. Currently unused. Feel free to use it in your own directives. |
- *
- * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name="resourceUrlPatternItem"></a>
- *
- * Each element in these arrays must be one of the following:
- *
- * - **'self'**
- * - The special **string**, `'self'`, can be used to match against all URLs of the **same
- * domain** as the application document using the **same protocol**.
- * - **String** (except the special value `'self'`)
- * - The string is matched against the full *normalized / absolute URL* of the resource
- * being tested (substring matches are not good enough.)
- * - There are exactly **two wildcard sequences** - `*` and `**`. All other characters
- * match themselves.
- * - `*`: matches zero or more occurrences of any character other than one of the following 6
- * characters: '`:`', '`/`', '`.`', '`?`', '`&`' and '`;`'. It's a useful wildcard for use
- * in a whitelist.
- * - `**`: matches zero or more occurrences of *any* character. As such, it's not
- * appropriate for use in a scheme, domain, etc. as it would match too much. (e.g.
- * http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might
- * not have been the intention.) Its usage at the very end of the path is ok. (e.g.
- * http://foo.example.com/templates/**).
- * - **RegExp** (*see caveat below*)
- * - *Caveat*: While regular expressions are powerful and offer great flexibility, their syntax
- * (and all the inevitable escaping) makes them *harder to maintain*. It's easy to
- * accidentally introduce a bug when one updates a complex expression (imho, all regexes should
- * have good test coverage). For instance, the use of `.` in the regex is correct only in a
- * small number of cases. A `.` character in the regex used when matching the scheme or a
- * subdomain could be matched against a `:` or literal `.` that was likely not intended. It
- * is highly recommended to use the string patterns and only fall back to regular expressions
- * as a last resort.
- * - The regular expression must be an instance of RegExp (i.e. not a string.) It is
- * matched against the **entire** *normalized / absolute URL* of the resource being tested
- * (even when the RegExp did not have the `^` and `$` codes.) In addition, any flags
- * present on the RegExp (such as multiline, global, ignoreCase) are ignored.
- * - If you are generating your JavaScript from some other templating engine (not
- * recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),
- * remember to escape your regular expression (and be aware that you might need more than
- * one level of escaping depending on your templating engine and the way you interpolated
- * the value.) Do make use of your platform's escaping mechanism as it might be good
- * enough before coding your own. E.g. Ruby has
- * [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)
- * and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).
- * Javascript lacks a similar built in function for escaping. Take a look at Google
- * Closure library's [goog.string.regExpEscape(s)](
- * http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).
- *
- * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.
- *
- * ## Show me an example using SCE.
- *
- * <example module="mySceApp" deps="angular-sanitize.js">
- * <file name="index.html">
- * <div ng-controller="AppController as myCtrl">
- * <i ng-bind-html="myCtrl.explicitlyTrustedHtml" id="explicitlyTrustedHtml"></i><br><br>
- * <b>User comments</b><br>
- * By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when
- * $sanitize is available. If $sanitize isn't available, this results in an error instead of an
- * exploit.
- * <div class="well">
- * <div ng-repeat="userComment in myCtrl.userComments">
- * <b>{{userComment.name}}</b>:
- * <span ng-bind-html="userComment.htmlComment" class="htmlComment"></span>
- * <br>
- * </div>
- * </div>
- * </div>
- * </file>
- *
- * <file name="script.js">
- * angular.module('mySceApp', ['ngSanitize'])
- * .controller('AppController', ['$http', '$templateCache', '$sce',
- * function($http, $templateCache, $sce) {
- * var self = this;
- * $http.get("test_data.json", {cache: $templateCache}).success(function(userComments) {
- * self.userComments = userComments;
- * });
- * self.explicitlyTrustedHtml = $sce.trustAsHtml(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * }]);
- * </file>
- *
- * <file name="test_data.json">
- * [
- * { "name": "Alice",
- * "htmlComment":
- * "<span onmouseover='this.textContent=\"PWN3D!\"'>Is <i>anyone</i> reading this?</span>"
- * },
- * { "name": "Bob",
- * "htmlComment": "<i>Yes!</i> Am I the only other one?"
- * }
- * ]
- * </file>
- *
- * <file name="protractor.js" type="protractor">
- * describe('SCE doc demo', function() {
- * it('should sanitize untrusted values', function() {
- * expect(element.all(by.css('.htmlComment')).first().getInnerHtml())
- * .toBe('<span>Is <i>anyone</i> reading this?</span>');
- * });
- *
- * it('should NOT sanitize explicitly trusted values', function() {
- * expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(
- * '<span onmouseover="this.textContent=&quot;Explicitly trusted HTML bypasses ' +
- * 'sanitization.&quot;">Hover over this text.</span>');
- * });
- * });
- * </file>
- * </example>
- *
- *
- *
- * ## Can I disable SCE completely?
- *
- * Yes, you can. However, this is strongly discouraged. SCE gives you a lot of security benefits
- * for little coding overhead. It will be much harder to take an SCE disabled application and
- * either secure it on your own or enable SCE at a later stage. It might make sense to disable SCE
- * for cases where you have a lot of existing code that was written before SCE was introduced and
- * you're migrating them a module at a time.
- *
- * That said, here's how you can completely disable SCE:
- *
- * ```
- * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {
- * // Completely disable SCE. For demonstration purposes only!
- * // Do not use in new projects.
- * $sceProvider.enabled(false);
- * });
- * ```
- *
- */
-/* jshint maxlen: 100 */
-
-function $SceProvider() {
- var enabled = true;
-
- /**
- * @ngdoc method
- * @name $sceProvider#enabled
- * @kind function
- *
- * @param {boolean=} value If provided, then enables/disables SCE.
- * @return {boolean} true if SCE is enabled, false otherwise.
- *
- * @description
- * Enables/disables SCE and returns the current value.
- */
- this.enabled = function(value) {
- if (arguments.length) {
- enabled = !!value;
- }
- return enabled;
- };
-
-
- /* Design notes on the default implementation for SCE.
- *
- * The API contract for the SCE delegate
- * -------------------------------------
- * The SCE delegate object must provide the following 3 methods:
- *
- * - trustAs(contextEnum, value)
- * This method is used to tell the SCE service that the provided value is OK to use in the
- * contexts specified by contextEnum. It must return an object that will be accepted by
- * getTrusted() for a compatible contextEnum and return this value.
- *
- * - valueOf(value)
- * For values that were not produced by trustAs(), return them as is. For values that were
- * produced by trustAs(), return the corresponding input value to trustAs. Basically, if
- * trustAs is wrapping the given values into some type, this operation unwraps it when given
- * such a value.
- *
- * - getTrusted(contextEnum, value)
- * This function should return the a value that is safe to use in the context specified by
- * contextEnum or throw and exception otherwise.
- *
- * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be
- * opaque or wrapped in some holder object. That happens to be an implementation detail. For
- * instance, an implementation could maintain a registry of all trusted objects by context. In
- * such a case, trustAs() would return the same object that was passed in. getTrusted() would
- * return the same object passed in if it was found in the registry under a compatible context or
- * throw an exception otherwise. An implementation might only wrap values some of the time based
- * on some criteria. getTrusted() might return a value and not throw an exception for special
- * constants or objects even if not wrapped. All such implementations fulfill this contract.
- *
- *
- * A note on the inheritance model for SCE contexts
- * ------------------------------------------------
- * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types. This
- * is purely an implementation details.
- *
- * The contract is simply this:
- *
- * getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)
- * will also succeed.
- *
- * Inheritance happens to capture this in a natural way. In some future, we
- * may not use inheritance anymore. That is OK because no code outside of
- * sce.js and sceSpecs.js would need to be aware of this detail.
- */
-
- this.$get = ['$parse', '$sceDelegate', function(
- $parse, $sceDelegate) {
- // Prereq: Ensure that we're not running in IE<11 quirks mode. In that mode, IE < 11 allow
- // the "expression(javascript expression)" syntax which is insecure.
- if (enabled && msie < 8) {
- throw $sceMinErr('iequirks',
- 'Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks ' +
- 'mode. You can fix this by adding the text <!doctype html> to the top of your HTML ' +
- 'document. See http://docs.angularjs.org/api/ng.$sce for more information.');
- }
-
- var sce = shallowCopy(SCE_CONTEXTS);
-
- /**
- * @ngdoc method
- * @name $sce#isEnabled
- * @kind function
- *
- * @return {Boolean} true if SCE is enabled, false otherwise. If you want to set the value, you
- * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.
- *
- * @description
- * Returns a boolean indicating if SCE is enabled.
- */
- sce.isEnabled = function() {
- return enabled;
- };
- sce.trustAs = $sceDelegate.trustAs;
- sce.getTrusted = $sceDelegate.getTrusted;
- sce.valueOf = $sceDelegate.valueOf;
-
- if (!enabled) {
- sce.trustAs = sce.getTrusted = function(type, value) { return value; };
- sce.valueOf = identity;
- }
-
- /**
- * @ngdoc method
- * @name $sce#parseAs
- *
- * @description
- * Converts Angular {@link guide/expression expression} into a function. This is like {@link
- * ng.$parse $parse} and is identical when the expression is a literal constant. Otherwise, it
- * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,
- * *result*)}
- *
- * @param {string} type The kind of SCE context in which this result will be used.
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
- sce.parseAs = function sceParseAs(type, expr) {
- var parsed = $parse(expr);
- if (parsed.literal && parsed.constant) {
- return parsed;
- } else {
- return $parse(expr, function(value) {
- return sce.getTrusted(type, value);
- });
- }
- };
-
- /**
- * @ngdoc method
- * @name $sce#trustAs
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}. As such,
- * returns an object that is trusted by angular for use in specified strict contextual
- * escaping contexts (such as ng-bind-html, ng-include, any src attribute
- * interpolation, any dom event binding attribute interpolation such as for onclick, etc.)
- * that uses the provided value. See * {@link ng.$sce $sce} for enabling strict contextual
- * escaping.
- *
- * @param {string} type The kind of context in which this value is safe for use. e.g. url,
- * resourceUrl, html, js and css.
- * @param {*} value The value that that should be considered trusted/safe.
- * @returns {*} A value that can be used to stand in for the provided `value` in places
- * where Angular expects a $sce.trustAs() return value.
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsHtml
- *
- * @description
- * Shorthand method. `$sce.trustAsHtml(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml
- * $sce.getTrustedHtml(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl
- * $sce.getTrustedUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.trustAsResourceUrl(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the return
- * value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#trustAsJs
- *
- * @description
- * Shorthand method. `$sce.trustAsJs(value)` →
- * {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}
- *
- * @param {*} value The value to trustAs.
- * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs
- * $sce.getTrustedJs(value)} to obtain the original value. (privileged directives
- * only accept expressions that are either literal constants or are the
- * return value of {@link ng.$sce#trustAs $sce.trustAs}.)
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrusted
- *
- * @description
- * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}. As such,
- * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the
- * originally supplied value if the queried context type is a supertype of the created type.
- * If this condition isn't satisfied, throws an exception.
- *
- * @param {string} type The kind of context in which this value is to be used.
- * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}
- * call.
- * @returns {*} The value the was originally provided to
- * {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.
- * Otherwise, throws an exception.
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedHtml
- *
- * @description
- * Shorthand method. `$sce.getTrustedHtml(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedCss
- *
- * @description
- * Shorthand method. `$sce.getTrustedCss(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedResourceUrl
- *
- * @description
- * Shorthand method. `$sce.getTrustedResourceUrl(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}
- *
- * @param {*} value The value to pass to `$sceDelegate.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#getTrustedJs
- *
- * @description
- * Shorthand method. `$sce.getTrustedJs(value)` →
- * {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}
- *
- * @param {*} value The value to pass to `$sce.getTrusted`.
- * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsHtml
- *
- * @description
- * Shorthand method. `$sce.parseAsHtml(expression string)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.HTML, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsCss
- *
- * @description
- * Shorthand method. `$sce.parseAsCss(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.CSS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsUrl(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsResourceUrl
- *
- * @description
- * Shorthand method. `$sce.parseAsResourceUrl(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.RESOURCE_URL, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- /**
- * @ngdoc method
- * @name $sce#parseAsJs
- *
- * @description
- * Shorthand method. `$sce.parseAsJs(value)` →
- * {@link ng.$sce#parseAs `$sce.parseAs($sce.JS, value)`}
- *
- * @param {string} expression String expression to compile.
- * @returns {function(context, locals)} a function which represents the compiled expression:
- *
- * * `context` – `{object}` – an object against which any expressions embedded in the strings
- * are evaluated against (typically a scope object).
- * * `locals` – `{object=}` – local variables context object, useful for overriding values in
- * `context`.
- */
-
- // Shorthand delegations.
- var parse = sce.parseAs,
- getTrusted = sce.getTrusted,
- trustAs = sce.trustAs;
-
- forEach(SCE_CONTEXTS, function(enumValue, name) {
- var lName = lowercase(name);
- sce[camelCase("parse_as_" + lName)] = function(expr) {
- return parse(enumValue, expr);
- };
- sce[camelCase("get_trusted_" + lName)] = function(value) {
- return getTrusted(enumValue, value);
- };
- sce[camelCase("trust_as_" + lName)] = function(value) {
- return trustAs(enumValue, value);
- };
- });
-
- return sce;
- }];
-}
-
-/**
- * !!! This is an undocumented "private" service !!!
- *
- * @name $sniffer
- * @requires $window
- * @requires $document
- *
- * @property {boolean} history Does the browser support html5 history api ?
- * @property {boolean} transitions Does the browser support CSS transition events ?
- * @property {boolean} animations Does the browser support CSS animation events ?
- *
- * @description
- * This is very simple implementation of testing browser's features.
- */
-function $SnifferProvider() {
- this.$get = ['$window', '$document', function($window, $document) {
- var eventSupport = {},
- android =
- toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),
- boxee = /Boxee/i.test(($window.navigator || {}).userAgent),
- document = $document[0] || {},
- vendorPrefix,
- vendorRegex = /^(Moz|webkit|ms)(?=[A-Z])/,
- bodyStyle = document.body && document.body.style,
- transitions = false,
- animations = false,
- match;
-
- if (bodyStyle) {
- for (var prop in bodyStyle) {
- if (match = vendorRegex.exec(prop)) {
- vendorPrefix = match[0];
- vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);
- break;
- }
- }
-
- if (!vendorPrefix) {
- vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';
- }
-
- transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));
- animations = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));
-
- if (android && (!transitions || !animations)) {
- transitions = isString(bodyStyle.webkitTransition);
- animations = isString(bodyStyle.webkitAnimation);
- }
- }
-
-
- return {
- // Android has history.pushState, but it does not update location correctly
- // so let's not use the history API at all.
- // http://code.google.com/p/android/issues/detail?id=17471
- // https://github.com/angular/angular.js/issues/904
-
- // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has
- // so let's not use the history API also
- // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined
- // jshint -W018
- history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),
- // jshint +W018
- hasEvent: function(event) {
- // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have
- // it. In particular the event is not fired when backspace or delete key are pressed or
- // when cut operation is performed.
- // IE10+ implements 'input' event but it erroneously fires under various situations,
- // e.g. when placeholder changes, or a form is focused.
- if (event === 'input' && msie <= 11) return false;
-
- if (isUndefined(eventSupport[event])) {
- var divElm = document.createElement('div');
- eventSupport[event] = 'on' + event in divElm;
- }
-
- return eventSupport[event];
- },
- csp: csp(),
- vendorPrefix: vendorPrefix,
- transitions: transitions,
- animations: animations,
- android: android
- };
- }];
-}
-
-var $compileMinErr = minErr('$compile');
-
-/**
- * @ngdoc provider
- * @name $templateRequestProvider
- * @description
- * Used to configure the options passed to the {@link $http} service when making a template request.
- *
- * For example, it can be used for specifying the "Accept" header that is sent to the server, when
- * requesting a template.
- */
-function $TemplateRequestProvider() {
-
- var httpOptions;
-
- /**
- * @ngdoc method
- * @name $templateRequestProvider#httpOptions
- * @description
- * The options to be passed to the {@link $http} service when making the request.
- * You can use this to override options such as the "Accept" header for template requests.
- *
- * The {@link $templateRequest} will set the `cache` and the `transformResponse` properties of the
- * options if not overridden here.
- *
- * @param {string=} value new value for the {@link $http} options.
- * @returns {string|self} Returns the {@link $http} options when used as getter and self if used as setter.
- */
- this.httpOptions = function(val) {
- if (val) {
- httpOptions = val;
- return this;
- }
- return httpOptions;
- };
-
- /**
- * @ngdoc service
- * @name $templateRequest
- *
- * @description
- * The `$templateRequest` service runs security checks then downloads the provided template using
- * `$http` and, upon success, stores the contents inside of `$templateCache`. If the HTTP request
- * fails or the response data of the HTTP request is empty, a `$compile` error will be thrown (the
- * exception can be thwarted by setting the 2nd parameter of the function to true). Note that the
- * contents of `$templateCache` are trusted, so the call to `$sce.getTrustedUrl(tpl)` is omitted
- * when `tpl` is of type string and `$templateCache` has the matching entry.
- *
- * If you want to pass custom options to the `$http` service, such as setting the Accept header you
- * can configure this via {@link $templateRequestProvider#httpOptions}.
- *
- * @param {string|TrustedResourceUrl} tpl The HTTP request template URL
- * @param {boolean=} ignoreRequestError Whether or not to ignore the exception when the request fails or the template is empty
- *
- * @return {Promise} a promise for the HTTP response data of the given URL.
- *
- * @property {number} totalPendingRequests total amount of pending template requests being downloaded.
- */
- this.$get = ['$templateCache', '$http', '$q', '$sce', function($templateCache, $http, $q, $sce) {
-
- function handleRequestFn(tpl, ignoreRequestError) {
- handleRequestFn.totalPendingRequests++;
-
- // We consider the template cache holds only trusted templates, so
- // there's no need to go through whitelisting again for keys that already
- // are included in there. This also makes Angular accept any script
- // directive, no matter its name. However, we still need to unwrap trusted
- // types.
- if (!isString(tpl) || !$templateCache.get(tpl)) {
- tpl = $sce.getTrustedResourceUrl(tpl);
- }
-
- var transformResponse = $http.defaults && $http.defaults.transformResponse;
-
- if (isArray(transformResponse)) {
- transformResponse = transformResponse.filter(function(transformer) {
- return transformer !== defaultHttpResponseTransform;
- });
- } else if (transformResponse === defaultHttpResponseTransform) {
- transformResponse = null;
- }
-
- return $http.get(tpl, extend({
- cache: $templateCache,
- transformResponse: transformResponse
- }, httpOptions))
- ['finally'](function() {
- handleRequestFn.totalPendingRequests--;
- })
- .then(function(response) {
- $templateCache.put(tpl, response.data);
- return response.data;
- }, handleError);
-
- function handleError(resp) {
- if (!ignoreRequestError) {
- throw $compileMinErr('tpload', 'Failed to load template: {0} (HTTP status: {1} {2})',
- tpl, resp.status, resp.statusText);
- }
- return $q.reject(resp);
- }
- }
-
- handleRequestFn.totalPendingRequests = 0;
-
- return handleRequestFn;
- }];
-}
-
-function $$TestabilityProvider() {
- this.$get = ['$rootScope', '$browser', '$location',
- function($rootScope, $browser, $location) {
-
- /**
- * @name $testability
- *
- * @description
- * The private $$testability service provides a collection of methods for use when debugging
- * or by automated test and debugging tools.
- */
- var testability = {};
-
- /**
- * @name $$testability#findBindings
- *
- * @description
- * Returns an array of elements that are bound (via ng-bind or {{}})
- * to expressions matching the input.
- *
- * @param {Element} element The element root to search from.
- * @param {string} expression The binding expression to match.
- * @param {boolean} opt_exactMatch If true, only returns exact matches
- * for the expression. Filters and whitespace are ignored.
- */
- testability.findBindings = function(element, expression, opt_exactMatch) {
- var bindings = element.getElementsByClassName('ng-binding');
- var matches = [];
- forEach(bindings, function(binding) {
- var dataBinding = angular.element(binding).data('$binding');
- if (dataBinding) {
- forEach(dataBinding, function(bindingName) {
- if (opt_exactMatch) {
- var matcher = new RegExp('(^|\\s)' + escapeForRegexp(expression) + '(\\s|\\||$)');
- if (matcher.test(bindingName)) {
- matches.push(binding);
- }
- } else {
- if (bindingName.indexOf(expression) != -1) {
- matches.push(binding);
- }
- }
- });
- }
- });
- return matches;
- };
-
- /**
- * @name $$testability#findModels
- *
- * @description
- * Returns an array of elements that are two-way found via ng-model to
- * expressions matching the input.
- *
- * @param {Element} element The element root to search from.
- * @param {string} expression The model expression to match.
- * @param {boolean} opt_exactMatch If true, only returns exact matches
- * for the expression.
- */
- testability.findModels = function(element, expression, opt_exactMatch) {
- var prefixes = ['ng-', 'data-ng-', 'ng\\:'];
- for (var p = 0; p < prefixes.length; ++p) {
- var attributeEquals = opt_exactMatch ? '=' : '*=';
- var selector = '[' + prefixes[p] + 'model' + attributeEquals + '"' + expression + '"]';
- var elements = element.querySelectorAll(selector);
- if (elements.length) {
- return elements;
- }
- }
- };
-
- /**
- * @name $$testability#getLocation
- *
- * @description
- * Shortcut for getting the location in a browser agnostic way. Returns
- * the path, search, and hash. (e.g. /path?a=b#hash)
- */
- testability.getLocation = function() {
- return $location.url();
- };
-
- /**
- * @name $$testability#setLocation
- *
- * @description
- * Shortcut for navigating to a location without doing a full page reload.
- *
- * @param {string} url The location url (path, search and hash,
- * e.g. /path?a=b#hash) to go to.
- */
- testability.setLocation = function(url) {
- if (url !== $location.url()) {
- $location.url(url);
- $rootScope.$digest();
- }
- };
-
- /**
- * @name $$testability#whenStable
- *
- * @description
- * Calls the callback when $timeout and $http requests are completed.
- *
- * @param {function} callback
- */
- testability.whenStable = function(callback) {
- $browser.notifyWhenNoOutstandingRequests(callback);
- };
-
- return testability;
- }];
-}
-
-function $TimeoutProvider() {
- this.$get = ['$rootScope', '$browser', '$q', '$$q', '$exceptionHandler',
- function($rootScope, $browser, $q, $$q, $exceptionHandler) {
-
- var deferreds = {};
-
-
- /**
- * @ngdoc service
- * @name $timeout
- *
- * @description
- * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch
- * block and delegates any exceptions to
- * {@link ng.$exceptionHandler $exceptionHandler} service.
- *
- * The return value of calling `$timeout` is a promise, which will be resolved when
- * the delay has passed and the timeout function, if provided, is executed.
- *
- * To cancel a timeout request, call `$timeout.cancel(promise)`.
- *
- * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to
- * synchronously flush the queue of deferred functions.
- *
- * If you only want a promise that will be resolved after some specified delay
- * then you can call `$timeout` without the `fn` function.
- *
- * @param {function()=} fn A function, whose execution should be delayed.
- * @param {number=} [delay=0] Delay in milliseconds.
- * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise
- * will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.
- * @param {...*=} Pass additional parameters to the executed function.
- * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this
- * promise will be resolved with is the return value of the `fn` function.
- *
- */
- function timeout(fn, delay, invokeApply) {
- if (!isFunction(fn)) {
- invokeApply = delay;
- delay = fn;
- fn = noop;
- }
-
- var args = sliceArgs(arguments, 3),
- skipApply = (isDefined(invokeApply) && !invokeApply),
- deferred = (skipApply ? $$q : $q).defer(),
- promise = deferred.promise,
- timeoutId;
-
- timeoutId = $browser.defer(function() {
- try {
- deferred.resolve(fn.apply(null, args));
- } catch (e) {
- deferred.reject(e);
- $exceptionHandler(e);
- }
- finally {
- delete deferreds[promise.$$timeoutId];
- }
-
- if (!skipApply) $rootScope.$apply();
- }, delay);
-
- promise.$$timeoutId = timeoutId;
- deferreds[timeoutId] = deferred;
-
- return promise;
- }
-
-
- /**
- * @ngdoc method
- * @name $timeout#cancel
- *
- * @description
- * Cancels a task associated with the `promise`. As a result of this, the promise will be
- * resolved with a rejection.
- *
- * @param {Promise=} promise Promise returned by the `$timeout` function.
- * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully
- * canceled.
- */
- timeout.cancel = function(promise) {
- if (promise && promise.$$timeoutId in deferreds) {
- deferreds[promise.$$timeoutId].reject('canceled');
- delete deferreds[promise.$$timeoutId];
- return $browser.defer.cancel(promise.$$timeoutId);
- }
- return false;
- };
-
- return timeout;
- }];
-}
-
-// NOTE: The usage of window and document instead of $window and $document here is
-// deliberate. This service depends on the specific behavior of anchor nodes created by the
-// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and
-// cause us to break tests. In addition, when the browser resolves a URL for XHR, it
-// doesn't know about mocked locations and resolves URLs to the real document - which is
-// exactly the behavior needed here. There is little value is mocking these out for this
-// service.
-var urlParsingNode = document.createElement("a");
-var originUrl = urlResolve(window.location.href);
-
-
-/**
- *
- * Implementation Notes for non-IE browsers
- * ----------------------------------------
- * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,
- * results both in the normalizing and parsing of the URL. Normalizing means that a relative
- * URL will be resolved into an absolute URL in the context of the application document.
- * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related
- * properties are all populated to reflect the normalized URL. This approach has wide
- * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc. See
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- *
- * Implementation Notes for IE
- * ---------------------------
- * IE <= 10 normalizes the URL when assigned to the anchor node similar to the other
- * browsers. However, the parsed components will not be set if the URL assigned did not specify
- * them. (e.g. if you assign a.href = "foo", then a.protocol, a.host, etc. will be empty.) We
- * work around that by performing the parsing in a 2nd step by taking a previously normalized
- * URL (e.g. by assigning to a.href) and assigning it a.href again. This correctly populates the
- * properties such as protocol, hostname, port, etc.
- *
- * References:
- * http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement
- * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html
- * http://url.spec.whatwg.org/#urlutils
- * https://github.com/angular/angular.js/pull/2902
- * http://james.padolsey.com/javascript/parsing-urls-with-the-dom/
- *
- * @kind function
- * @param {string} url The URL to be parsed.
- * @description Normalizes and parses a URL.
- * @returns {object} Returns the normalized URL as a dictionary.
- *
- * | member name | Description |
- * |---------------|----------------|
- * | href | A normalized version of the provided URL if it was not an absolute URL |
- * | protocol | The protocol including the trailing colon |
- * | host | The host and port (if the port is non-default) of the normalizedUrl |
- * | search | The search params, minus the question mark |
- * | hash | The hash string, minus the hash symbol
- * | hostname | The hostname
- * | port | The port, without ":"
- * | pathname | The pathname, beginning with "/"
- *
- */
-function urlResolve(url) {
- var href = url;
-
- if (msie) {
- // Normalize before parse. Refer Implementation Notes on why this is
- // done in two steps on IE.
- urlParsingNode.setAttribute("href", href);
- href = urlParsingNode.href;
- }
-
- urlParsingNode.setAttribute('href', href);
-
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
- return {
- href: urlParsingNode.href,
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
- host: urlParsingNode.host,
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
- hostname: urlParsingNode.hostname,
- port: urlParsingNode.port,
- pathname: (urlParsingNode.pathname.charAt(0) === '/')
- ? urlParsingNode.pathname
- : '/' + urlParsingNode.pathname
- };
-}
-
-/**
- * Parse a request URL and determine whether this is a same-origin request as the application document.
- *
- * @param {string|object} requestUrl The url of the request as a string that will be resolved
- * or a parsed URL object.
- * @returns {boolean} Whether the request is for the same origin as the application document.
- */
-function urlIsSameOrigin(requestUrl) {
- var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;
- return (parsed.protocol === originUrl.protocol &&
- parsed.host === originUrl.host);
-}
-
-/**
- * @ngdoc service
- * @name $window
- *
- * @description
- * A reference to the browser's `window` object. While `window`
- * is globally available in JavaScript, it causes testability problems, because
- * it is a global variable. In angular we always refer to it through the
- * `$window` service, so it may be overridden, removed or mocked for testing.
- *
- * Expressions, like the one defined for the `ngClick` directive in the example
- * below, are evaluated with respect to the current scope. Therefore, there is
- * no risk of inadvertently coding in a dependency on a global value in such an
- * expression.
- *
- * @example
- <example module="windowExample">
- <file name="index.html">
- <script>
- angular.module('windowExample', [])
- .controller('ExampleController', ['$scope', '$window', function($scope, $window) {
- $scope.greeting = 'Hello, World!';
- $scope.doGreeting = function(greeting) {
- $window.alert(greeting);
- };
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="text" ng-model="greeting" aria-label="greeting" />
- <button ng-click="doGreeting(greeting)">ALERT</button>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should display the greeting in the input box', function() {
- element(by.model('greeting')).sendKeys('Hello, E2E Tests');
- // If we click the button it will block the test runner
- // element(':button').click();
- });
- </file>
- </example>
- */
-function $WindowProvider() {
- this.$get = valueFn(window);
-}
-
-/**
- * @name $$cookieReader
- * @requires $document
- *
- * @description
- * This is a private service for reading cookies used by $http and ngCookies
- *
- * @return {Object} a key/value map of the current cookies
- */
-function $$CookieReader($document) {
- var rawDocument = $document[0] || {};
- var lastCookies = {};
- var lastCookieString = '';
-
- function safeDecodeURIComponent(str) {
- try {
- return decodeURIComponent(str);
- } catch (e) {
- return str;
- }
- }
-
- return function() {
- var cookieArray, cookie, i, index, name;
- var currentCookieString = rawDocument.cookie || '';
-
- if (currentCookieString !== lastCookieString) {
- lastCookieString = currentCookieString;
- cookieArray = lastCookieString.split('; ');
- lastCookies = {};
-
- for (i = 0; i < cookieArray.length; i++) {
- cookie = cookieArray[i];
- index = cookie.indexOf('=');
- if (index > 0) { //ignore nameless cookies
- name = safeDecodeURIComponent(cookie.substring(0, index));
- // the first value that is seen for a cookie is the most
- // specific one. values for the same cookie name that
- // follow are for less specific paths.
- if (isUndefined(lastCookies[name])) {
- lastCookies[name] = safeDecodeURIComponent(cookie.substring(index + 1));
- }
- }
- }
- }
- return lastCookies;
- };
-}
-
-$$CookieReader.$inject = ['$document'];
-
-function $$CookieReaderProvider() {
- this.$get = $$CookieReader;
-}
-
-/* global currencyFilter: true,
- dateFilter: true,
- filterFilter: true,
- jsonFilter: true,
- limitToFilter: true,
- lowercaseFilter: true,
- numberFilter: true,
- orderByFilter: true,
- uppercaseFilter: true,
- */
-
-/**
- * @ngdoc provider
- * @name $filterProvider
- * @description
- *
- * Filters are just functions which transform input to an output. However filters need to be
- * Dependency Injected. To achieve this a filter definition consists of a factory function which is
- * annotated with dependencies and is responsible for creating a filter function.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- *
- * ```js
- * // Filter registration
- * function MyModule($provide, $filterProvider) {
- * // create a service to demonstrate injection (not always needed)
- * $provide.value('greet', function(name){
- * return 'Hello ' + name + '!';
- * });
- *
- * // register a filter factory which uses the
- * // greet service to demonstrate DI.
- * $filterProvider.register('greet', function(greet){
- * // return the filter function which uses the greet service
- * // to generate salutation
- * return function(text) {
- * // filters need to be forgiving so check input validity
- * return text && greet(text) || text;
- * };
- * });
- * }
- * ```
- *
- * The filter function is registered with the `$injector` under the filter name suffix with
- * `Filter`.
- *
- * ```js
- * it('should be the same instance', inject(
- * function($filterProvider) {
- * $filterProvider.register('reverse', function(){
- * return ...;
- * });
- * },
- * function($filter, reverseFilter) {
- * expect($filter('reverse')).toBe(reverseFilter);
- * });
- * ```
- *
- *
- * For more information about how angular filters work, and how to create your own filters, see
- * {@link guide/filter Filters} in the Angular Developer Guide.
- */
-
-/**
- * @ngdoc service
- * @name $filter
- * @kind function
- * @description
- * Filters are used for formatting data displayed to the user.
- *
- * The general syntax in templates is as follows:
- *
- * {{ expression [| filter_name[:parameter_value] ... ] }}
- *
- * @param {String} name Name of the filter function to retrieve
- * @return {Function} the filter function
- * @example
- <example name="$filter" module="filterExample">
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <h3>{{ originalText }}</h3>
- <h3>{{ filteredText }}</h3>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('filterExample', [])
- .controller('MainCtrl', function($scope, $filter) {
- $scope.originalText = 'hello';
- $scope.filteredText = $filter('uppercase')($scope.originalText);
- });
- </file>
- </example>
- */
-$FilterProvider.$inject = ['$provide'];
-function $FilterProvider($provide) {
- var suffix = 'Filter';
-
- /**
- * @ngdoc method
- * @name $filterProvider#register
- * @param {string|Object} name Name of the filter function, or an object map of filters where
- * the keys are the filter names and the values are the filter factories.
- *
- * <div class="alert alert-warning">
- * **Note:** Filter names must be valid angular {@link expression} identifiers, such as `uppercase` or `orderBy`.
- * Names with special characters, such as hyphens and dots, are not allowed. If you wish to namespace
- * your filters, then you can use capitalization (`myappSubsectionFilterx`) or underscores
- * (`myapp_subsection_filterx`).
- * </div>
- * @param {Function} factory If the first argument was a string, a factory function for the filter to be registered.
- * @returns {Object} Registered filter instance, or if a map of filters was provided then a map
- * of the registered filter instances.
- */
- function register(name, factory) {
- if (isObject(name)) {
- var filters = {};
- forEach(name, function(filter, key) {
- filters[key] = register(key, filter);
- });
- return filters;
- } else {
- return $provide.factory(name + suffix, factory);
- }
- }
- this.register = register;
-
- this.$get = ['$injector', function($injector) {
- return function(name) {
- return $injector.get(name + suffix);
- };
- }];
-
- ////////////////////////////////////////
-
- /* global
- currencyFilter: false,
- dateFilter: false,
- filterFilter: false,
- jsonFilter: false,
- limitToFilter: false,
- lowercaseFilter: false,
- numberFilter: false,
- orderByFilter: false,
- uppercaseFilter: false,
- */
-
- register('currency', currencyFilter);
- register('date', dateFilter);
- register('filter', filterFilter);
- register('json', jsonFilter);
- register('limitTo', limitToFilter);
- register('lowercase', lowercaseFilter);
- register('number', numberFilter);
- register('orderBy', orderByFilter);
- register('uppercase', uppercaseFilter);
-}
-
-/**
- * @ngdoc filter
- * @name filter
- * @kind function
- *
- * @description
- * Selects a subset of items from `array` and returns it as a new array.
- *
- * @param {Array} array The source array.
- * @param {string|Object|function()} expression The predicate to be used for selecting items from
- * `array`.
- *
- * Can be one of:
- *
- * - `string`: The string is used for matching against the contents of the `array`. All strings or
- * objects with string properties in `array` that match this string will be returned. This also
- * applies to nested object properties.
- * The predicate can be negated by prefixing the string with `!`.
- *
- * - `Object`: A pattern object can be used to filter specific properties on objects contained
- * by `array`. For example `{name:"M", phone:"1"}` predicate will return an array of items
- * which have property `name` containing "M" and property `phone` containing "1". A special
- * property name `$` can be used (as in `{$:"text"}`) to accept a match against any
- * property of the object or its nested object properties. That's equivalent to the simple
- * substring match with a `string` as described above. The predicate can be negated by prefixing
- * the string with `!`.
- * For example `{name: "!M"}` predicate will return an array of items which have property `name`
- * not containing "M".
- *
- * Note that a named property will match properties on the same level only, while the special
- * `$` property will match properties on the same level or deeper. E.g. an array item like
- * `{name: {first: 'John', last: 'Doe'}}` will **not** be matched by `{name: 'John'}`, but
- * **will** be matched by `{$: 'John'}`.
- *
- * - `function(value, index, array)`: A predicate function can be used to write arbitrary filters.
- * The function is called for each element of the array, with the element, its index, and
- * the entire array itself as arguments.
- *
- * The final result is an array of those elements that the predicate returned true for.
- *
- * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in
- * determining if the expected value (from the filter expression) and actual value (from
- * the object in the array) should be considered a match.
- *
- * Can be one of:
- *
- * - `function(actual, expected)`:
- * The function will be given the object value and the predicate value to compare and
- * should return true if both values should be considered equal.
- *
- * - `true`: A shorthand for `function(actual, expected) { return angular.equals(actual, expected)}`.
- * This is essentially strict comparison of expected and actual.
- *
- * - `false|undefined`: A short hand for a function which will look for a substring match in case
- * insensitive way.
- *
- * Primitive values are converted to strings. Objects are not compared against primitives,
- * unless they have a custom `toString` method (e.g. `Date` objects).
- *
- * @example
- <example>
- <file name="index.html">
- <div ng-init="friends = [{name:'John', phone:'555-1276'},
- {name:'Mary', phone:'800-BIG-MARY'},
- {name:'Mike', phone:'555-4321'},
- {name:'Adam', phone:'555-5678'},
- {name:'Julie', phone:'555-8765'},
- {name:'Juliette', phone:'555-5678'}]"></div>
-
- <label>Search: <input ng-model="searchText"></label>
- <table id="searchTextResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friend in friends | filter:searchText">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- </tr>
- </table>
- <hr>
- <label>Any: <input ng-model="search.$"></label> <br>
- <label>Name only <input ng-model="search.name"></label><br>
- <label>Phone only <input ng-model="search.phone"></label><br>
- <label>Equality <input type="checkbox" ng-model="strict"></label><br>
- <table id="searchObjResults">
- <tr><th>Name</th><th>Phone</th></tr>
- <tr ng-repeat="friendObj in friends | filter:search:strict">
- <td>{{friendObj.name}}</td>
- <td>{{friendObj.phone}}</td>
- </tr>
- </table>
- </file>
- <file name="protractor.js" type="protractor">
- var expectFriendNames = function(expectedNames, key) {
- element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {
- arr.forEach(function(wd, i) {
- expect(wd.getText()).toMatch(expectedNames[i]);
- });
- });
- };
-
- it('should search across all fields when filtering with a string', function() {
- var searchText = element(by.model('searchText'));
- searchText.clear();
- searchText.sendKeys('m');
- expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');
-
- searchText.clear();
- searchText.sendKeys('76');
- expectFriendNames(['John', 'Julie'], 'friend');
- });
-
- it('should search in specific fields when filtering with a predicate object', function() {
- var searchAny = element(by.model('search.$'));
- searchAny.clear();
- searchAny.sendKeys('i');
- expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');
- });
- it('should use a equal comparison when comparator is true', function() {
- var searchName = element(by.model('search.name'));
- var strict = element(by.model('strict'));
- searchName.clear();
- searchName.sendKeys('Julie');
- strict.click();
- expectFriendNames(['Julie'], 'friendObj');
- });
- </file>
- </example>
- */
-function filterFilter() {
- return function(array, expression, comparator) {
- if (!isArrayLike(array)) {
- if (array == null) {
- return array;
- } else {
- throw minErr('filter')('notarray', 'Expected array but received: {0}', array);
- }
- }
-
- var expressionType = getTypeForFilter(expression);
- var predicateFn;
- var matchAgainstAnyProp;
-
- switch (expressionType) {
- case 'function':
- predicateFn = expression;
- break;
- case 'boolean':
- case 'null':
- case 'number':
- case 'string':
- matchAgainstAnyProp = true;
- //jshint -W086
- case 'object':
- //jshint +W086
- predicateFn = createPredicateFn(expression, comparator, matchAgainstAnyProp);
- break;
- default:
- return array;
- }
-
- return Array.prototype.filter.call(array, predicateFn);
- };
-}
-
-// Helper functions for `filterFilter`
-function createPredicateFn(expression, comparator, matchAgainstAnyProp) {
- var shouldMatchPrimitives = isObject(expression) && ('$' in expression);
- var predicateFn;
-
- if (comparator === true) {
- comparator = equals;
- } else if (!isFunction(comparator)) {
- comparator = function(actual, expected) {
- if (isUndefined(actual)) {
- // No substring matching against `undefined`
- return false;
- }
- if ((actual === null) || (expected === null)) {
- // No substring matching against `null`; only match against `null`
- return actual === expected;
- }
- if (isObject(expected) || (isObject(actual) && !hasCustomToString(actual))) {
- // Should not compare primitives against objects, unless they have custom `toString` method
- return false;
- }
-
- actual = lowercase('' + actual);
- expected = lowercase('' + expected);
- return actual.indexOf(expected) !== -1;
- };
- }
-
- predicateFn = function(item) {
- if (shouldMatchPrimitives && !isObject(item)) {
- return deepCompare(item, expression.$, comparator, false);
- }
- return deepCompare(item, expression, comparator, matchAgainstAnyProp);
- };
-
- return predicateFn;
-}
-
-function deepCompare(actual, expected, comparator, matchAgainstAnyProp, dontMatchWholeObject) {
- var actualType = getTypeForFilter(actual);
- var expectedType = getTypeForFilter(expected);
-
- if ((expectedType === 'string') && (expected.charAt(0) === '!')) {
- return !deepCompare(actual, expected.substring(1), comparator, matchAgainstAnyProp);
- } else if (isArray(actual)) {
- // In case `actual` is an array, consider it a match
- // if ANY of it's items matches `expected`
- return actual.some(function(item) {
- return deepCompare(item, expected, comparator, matchAgainstAnyProp);
- });
- }
-
- switch (actualType) {
- case 'object':
- var key;
- if (matchAgainstAnyProp) {
- for (key in actual) {
- if ((key.charAt(0) !== '$') && deepCompare(actual[key], expected, comparator, true)) {
- return true;
- }
- }
- return dontMatchWholeObject ? false : deepCompare(actual, expected, comparator, false);
- } else if (expectedType === 'object') {
- for (key in expected) {
- var expectedVal = expected[key];
- if (isFunction(expectedVal) || isUndefined(expectedVal)) {
- continue;
- }
-
- var matchAnyProperty = key === '$';
- var actualVal = matchAnyProperty ? actual : actual[key];
- if (!deepCompare(actualVal, expectedVal, comparator, matchAnyProperty, matchAnyProperty)) {
- return false;
- }
- }
- return true;
- } else {
- return comparator(actual, expected);
- }
- break;
- case 'function':
- return false;
- default:
- return comparator(actual, expected);
- }
-}
-
-// Used for easily differentiating between `null` and actual `object`
-function getTypeForFilter(val) {
- return (val === null) ? 'null' : typeof val;
-}
-
-/**
- * @ngdoc filter
- * @name currency
- * @kind function
- *
- * @description
- * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default
- * symbol for current locale is used.
- *
- * @param {number} amount Input to filter.
- * @param {string=} symbol Currency symbol or identifier to be displayed.
- * @param {number=} fractionSize Number of decimal places to round the amount to, defaults to default max fraction size for current locale
- * @returns {string} Formatted number.
- *
- *
- * @example
- <example module="currencyExample">
- <file name="index.html">
- <script>
- angular.module('currencyExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.amount = 1234.56;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input type="number" ng-model="amount" aria-label="amount"> <br>
- default currency symbol ($): <span id="currency-default">{{amount | currency}}</span><br>
- custom currency identifier (USD$): <span id="currency-custom">{{amount | currency:"USD$"}}</span>
- no fractions (0): <span id="currency-no-fractions">{{amount | currency:"USD$":0}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should init with 1234.56', function() {
- expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');
- expect(element(by.id('currency-custom')).getText()).toBe('USD$1,234.56');
- expect(element(by.id('currency-no-fractions')).getText()).toBe('USD$1,235');
- });
- it('should update', function() {
- if (browser.params.browser == 'safari') {
- // Safari does not understand the minus key. See
- // https://github.com/angular/protractor/issues/481
- return;
- }
- element(by.model('amount')).clear();
- element(by.model('amount')).sendKeys('-1234');
- expect(element(by.id('currency-default')).getText()).toBe('-$1,234.00');
- expect(element(by.id('currency-custom')).getText()).toBe('-USD$1,234.00');
- expect(element(by.id('currency-no-fractions')).getText()).toBe('-USD$1,234');
- });
- </file>
- </example>
- */
-currencyFilter.$inject = ['$locale'];
-function currencyFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(amount, currencySymbol, fractionSize) {
- if (isUndefined(currencySymbol)) {
- currencySymbol = formats.CURRENCY_SYM;
- }
-
- if (isUndefined(fractionSize)) {
- fractionSize = formats.PATTERNS[1].maxFrac;
- }
-
- // if null or undefined pass it through
- return (amount == null)
- ? amount
- : formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, fractionSize).
- replace(/\u00A4/g, currencySymbol);
- };
-}
-
-/**
- * @ngdoc filter
- * @name number
- * @kind function
- *
- * @description
- * Formats a number as text.
- *
- * If the input is null or undefined, it will just be returned.
- * If the input is infinite (Infinity/-Infinity) the Infinity symbol '∞' is returned.
- * If the input is not a number an empty string is returned.
- *
- *
- * @param {number|string} number Number to format.
- * @param {(number|string)=} fractionSize Number of decimal places to round the number to.
- * If this is not provided then the fraction size is computed from the current locale's number
- * formatting pattern. In the case of the default locale, it will be 3.
- * @returns {string} Number rounded to decimalPlaces and places a “,†after each third digit.
- *
- * @example
- <example module="numberFilterExample">
- <file name="index.html">
- <script>
- angular.module('numberFilterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = 1234.56789;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Enter number: <input ng-model='val'></label><br>
- Default formatting: <span id='number-default'>{{val | number}}</span><br>
- No fractions: <span>{{val | number:0}}</span><br>
- Negative number: <span>{{-val | number:4}}</span>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format numbers', function() {
- expect(element(by.id('number-default')).getText()).toBe('1,234.568');
- expect(element(by.binding('val | number:0')).getText()).toBe('1,235');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');
- });
-
- it('should update', function() {
- element(by.model('val')).clear();
- element(by.model('val')).sendKeys('3374.333');
- expect(element(by.id('number-default')).getText()).toBe('3,374.333');
- expect(element(by.binding('val | number:0')).getText()).toBe('3,374');
- expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');
- });
- </file>
- </example>
- */
-
-
-numberFilter.$inject = ['$locale'];
-function numberFilter($locale) {
- var formats = $locale.NUMBER_FORMATS;
- return function(number, fractionSize) {
-
- // if null or undefined pass it through
- return (number == null)
- ? number
- : formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,
- fractionSize);
- };
-}
-
-var DECIMAL_SEP = '.';
-function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {
- if (isObject(number)) return '';
-
- var isNegative = number < 0;
- number = Math.abs(number);
-
- var isInfinity = number === Infinity;
- if (!isInfinity && !isFinite(number)) return '';
-
- var numStr = number + '',
- formatedText = '',
- hasExponent = false,
- parts = [];
-
- if (isInfinity) formatedText = '\u221e';
-
- if (!isInfinity && numStr.indexOf('e') !== -1) {
- var match = numStr.match(/([\d\.]+)e(-?)(\d+)/);
- if (match && match[2] == '-' && match[3] > fractionSize + 1) {
- number = 0;
- } else {
- formatedText = numStr;
- hasExponent = true;
- }
- }
-
- if (!isInfinity && !hasExponent) {
- var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;
-
- // determine fractionSize if it is not specified
- if (isUndefined(fractionSize)) {
- fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);
- }
-
- // safely round numbers in JS without hitting imprecisions of floating-point arithmetics
- // inspired by:
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round
- number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);
-
- var fraction = ('' + number).split(DECIMAL_SEP);
- var whole = fraction[0];
- fraction = fraction[1] || '';
-
- var i, pos = 0,
- lgroup = pattern.lgSize,
- group = pattern.gSize;
-
- if (whole.length >= (lgroup + group)) {
- pos = whole.length - lgroup;
- for (i = 0; i < pos; i++) {
- if ((pos - i) % group === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
- }
-
- for (i = pos; i < whole.length; i++) {
- if ((whole.length - i) % lgroup === 0 && i !== 0) {
- formatedText += groupSep;
- }
- formatedText += whole.charAt(i);
- }
-
- // format fraction part.
- while (fraction.length < fractionSize) {
- fraction += '0';
- }
-
- if (fractionSize && fractionSize !== "0") formatedText += decimalSep + fraction.substr(0, fractionSize);
- } else {
- if (fractionSize > 0 && number < 1) {
- formatedText = number.toFixed(fractionSize);
- number = parseFloat(formatedText);
- formatedText = formatedText.replace(DECIMAL_SEP, decimalSep);
- }
- }
-
- if (number === 0) {
- isNegative = false;
- }
-
- parts.push(isNegative ? pattern.negPre : pattern.posPre,
- formatedText,
- isNegative ? pattern.negSuf : pattern.posSuf);
- return parts.join('');
-}
-
-function padNumber(num, digits, trim) {
- var neg = '';
- if (num < 0) {
- neg = '-';
- num = -num;
- }
- num = '' + num;
- while (num.length < digits) num = '0' + num;
- if (trim) {
- num = num.substr(num.length - digits);
- }
- return neg + num;
-}
-
-
-function dateGetter(name, size, offset, trim) {
- offset = offset || 0;
- return function(date) {
- var value = date['get' + name]();
- if (offset > 0 || value > -offset) {
- value += offset;
- }
- if (value === 0 && offset == -12) value = 12;
- return padNumber(value, size, trim);
- };
-}
-
-function dateStrGetter(name, shortForm) {
- return function(date, formats) {
- var value = date['get' + name]();
- var get = uppercase(shortForm ? ('SHORT' + name) : name);
-
- return formats[get][value];
- };
-}
-
-function timeZoneGetter(date, formats, offset) {
- var zone = -1 * offset;
- var paddedZone = (zone >= 0) ? "+" : "";
-
- paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +
- padNumber(Math.abs(zone % 60), 2);
-
- return paddedZone;
-}
-
-function getFirstThursdayOfYear(year) {
- // 0 = index of January
- var dayOfWeekOnFirst = (new Date(year, 0, 1)).getDay();
- // 4 = index of Thursday (+1 to account for 1st = 5)
- // 11 = index of *next* Thursday (+1 account for 1st = 12)
- return new Date(year, 0, ((dayOfWeekOnFirst <= 4) ? 5 : 12) - dayOfWeekOnFirst);
-}
-
-function getThursdayThisWeek(datetime) {
- return new Date(datetime.getFullYear(), datetime.getMonth(),
- // 4 = index of Thursday
- datetime.getDate() + (4 - datetime.getDay()));
-}
-
-function weekGetter(size) {
- return function(date) {
- var firstThurs = getFirstThursdayOfYear(date.getFullYear()),
- thisThurs = getThursdayThisWeek(date);
-
- var diff = +thisThurs - +firstThurs,
- result = 1 + Math.round(diff / 6.048e8); // 6.048e8 ms per week
-
- return padNumber(result, size);
- };
-}
-
-function ampmGetter(date, formats) {
- return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];
-}
-
-function eraGetter(date, formats) {
- return date.getFullYear() <= 0 ? formats.ERAS[0] : formats.ERAS[1];
-}
-
-function longEraGetter(date, formats) {
- return date.getFullYear() <= 0 ? formats.ERANAMES[0] : formats.ERANAMES[1];
-}
-
-var DATE_FORMATS = {
- yyyy: dateGetter('FullYear', 4),
- yy: dateGetter('FullYear', 2, 0, true),
- y: dateGetter('FullYear', 1),
- MMMM: dateStrGetter('Month'),
- MMM: dateStrGetter('Month', true),
- MM: dateGetter('Month', 2, 1),
- M: dateGetter('Month', 1, 1),
- dd: dateGetter('Date', 2),
- d: dateGetter('Date', 1),
- HH: dateGetter('Hours', 2),
- H: dateGetter('Hours', 1),
- hh: dateGetter('Hours', 2, -12),
- h: dateGetter('Hours', 1, -12),
- mm: dateGetter('Minutes', 2),
- m: dateGetter('Minutes', 1),
- ss: dateGetter('Seconds', 2),
- s: dateGetter('Seconds', 1),
- // while ISO 8601 requires fractions to be prefixed with `.` or `,`
- // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions
- sss: dateGetter('Milliseconds', 3),
- EEEE: dateStrGetter('Day'),
- EEE: dateStrGetter('Day', true),
- a: ampmGetter,
- Z: timeZoneGetter,
- ww: weekGetter(2),
- w: weekGetter(1),
- G: eraGetter,
- GG: eraGetter,
- GGG: eraGetter,
- GGGG: longEraGetter
-};
-
-var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,
- NUMBER_STRING = /^\-?\d+$/;
-
-/**
- * @ngdoc filter
- * @name date
- * @kind function
- *
- * @description
- * Formats `date` to a string based on the requested `format`.
- *
- * `format` string can be composed of the following elements:
- *
- * * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)
- * * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)
- * * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)
- * * `'MMMM'`: Month in year (January-December)
- * * `'MMM'`: Month in year (Jan-Dec)
- * * `'MM'`: Month in year, padded (01-12)
- * * `'M'`: Month in year (1-12)
- * * `'dd'`: Day in month, padded (01-31)
- * * `'d'`: Day in month (1-31)
- * * `'EEEE'`: Day in Week,(Sunday-Saturday)
- * * `'EEE'`: Day in Week, (Sun-Sat)
- * * `'HH'`: Hour in day, padded (00-23)
- * * `'H'`: Hour in day (0-23)
- * * `'hh'`: Hour in AM/PM, padded (01-12)
- * * `'h'`: Hour in AM/PM, (1-12)
- * * `'mm'`: Minute in hour, padded (00-59)
- * * `'m'`: Minute in hour (0-59)
- * * `'ss'`: Second in minute, padded (00-59)
- * * `'s'`: Second in minute (0-59)
- * * `'sss'`: Millisecond in second, padded (000-999)
- * * `'a'`: AM/PM marker
- * * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)
- * * `'ww'`: Week of year, padded (00-53). Week 01 is the week with the first Thursday of the year
- * * `'w'`: Week of year (0-53). Week 1 is the week with the first Thursday of the year
- * * `'G'`, `'GG'`, `'GGG'`: The abbreviated form of the era string (e.g. 'AD')
- * * `'GGGG'`: The long form of the era string (e.g. 'Anno Domini')
- *
- * `format` string can also be one of the following predefined
- * {@link guide/i18n localizable formats}:
- *
- * * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
- * (e.g. Sep 3, 2010 12:05:08 PM)
- * * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US locale (e.g. 9/3/10 12:05 PM)
- * * `'fullDate'`: equivalent to `'EEEE, MMMM d, y'` for en_US locale
- * (e.g. Friday, September 3, 2010)
- * * `'longDate'`: equivalent to `'MMMM d, y'` for en_US locale (e.g. September 3, 2010)
- * * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US locale (e.g. Sep 3, 2010)
- * * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)
- * * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 PM)
- * * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 PM)
- *
- * `format` string can contain literal values. These need to be escaped by surrounding with single quotes (e.g.
- * `"h 'in the morning'"`). In order to output a single quote, escape it - i.e., two single quotes in a sequence
- * (e.g. `"h 'o''clock'"`).
- *
- * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or
- * number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its
- * shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is
- * specified in the string input, the time is considered to be in the local timezone.
- * @param {string=} format Formatting rules (see Description). If not specified,
- * `mediumDate` is used.
- * @param {string=} timezone Timezone to be used for formatting. It understands UTC/GMT and the
- * continental US time zone abbreviations, but for general use, use a time zone offset, for
- * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
- * If not specified, the timezone of the browser will be used.
- * @returns {string} Formatted string or the input if input is not recognized as date/millis.
- *
- * @example
- <example>
- <file name="index.html">
- <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:
- <span>{{1288323623006 | date:'medium'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:
- <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:
- <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>
- <span ng-non-bindable>{{1288323623006 | date:"MM/dd/yyyy 'at' h:mma"}}</span>:
- <span>{{'1288323623006' | date:"MM/dd/yyyy 'at' h:mma"}}</span><br>
- </file>
- <file name="protractor.js" type="protractor">
- it('should format date', function() {
- expect(element(by.binding("1288323623006 | date:'medium'")).getText()).
- toMatch(/Oct 2\d, 2010 \d{1,2}:\d{2}:\d{2} (AM|PM)/);
- expect(element(by.binding("1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'")).getText()).
- toMatch(/2010\-10\-2\d \d{2}:\d{2}:\d{2} (\-|\+)?\d{4}/);
- expect(element(by.binding("'1288323623006' | date:'MM/dd/yyyy @ h:mma'")).getText()).
- toMatch(/10\/2\d\/2010 @ \d{1,2}:\d{2}(AM|PM)/);
- expect(element(by.binding("'1288323623006' | date:\"MM/dd/yyyy 'at' h:mma\"")).getText()).
- toMatch(/10\/2\d\/2010 at \d{1,2}:\d{2}(AM|PM)/);
- });
- </file>
- </example>
- */
-dateFilter.$inject = ['$locale'];
-function dateFilter($locale) {
-
-
- var R_ISO8601_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
- // 1 2 3 4 5 6 7 8 9 10 11
- function jsonStringToDate(string) {
- var match;
- if (match = string.match(R_ISO8601_STR)) {
- var date = new Date(0),
- tzHour = 0,
- tzMin = 0,
- dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,
- timeSetter = match[8] ? date.setUTCHours : date.setHours;
-
- if (match[9]) {
- tzHour = toInt(match[9] + match[10]);
- tzMin = toInt(match[9] + match[11]);
- }
- dateSetter.call(date, toInt(match[1]), toInt(match[2]) - 1, toInt(match[3]));
- var h = toInt(match[4] || 0) - tzHour;
- var m = toInt(match[5] || 0) - tzMin;
- var s = toInt(match[6] || 0);
- var ms = Math.round(parseFloat('0.' + (match[7] || 0)) * 1000);
- timeSetter.call(date, h, m, s, ms);
- return date;
- }
- return string;
- }
-
-
- return function(date, format, timezone) {
- var text = '',
- parts = [],
- fn, match;
-
- format = format || 'mediumDate';
- format = $locale.DATETIME_FORMATS[format] || format;
- if (isString(date)) {
- date = NUMBER_STRING.test(date) ? toInt(date) : jsonStringToDate(date);
- }
-
- if (isNumber(date)) {
- date = new Date(date);
- }
-
- if (!isDate(date) || !isFinite(date.getTime())) {
- return date;
- }
-
- while (format) {
- match = DATE_FORMATS_SPLIT.exec(format);
- if (match) {
- parts = concat(parts, match, 1);
- format = parts.pop();
- } else {
- parts.push(format);
- format = null;
- }
- }
-
- var dateTimezoneOffset = date.getTimezoneOffset();
- if (timezone) {
- dateTimezoneOffset = timezoneToOffset(timezone, date.getTimezoneOffset());
- date = convertTimezoneToLocal(date, timezone, true);
- }
- forEach(parts, function(value) {
- fn = DATE_FORMATS[value];
- text += fn ? fn(date, $locale.DATETIME_FORMATS, dateTimezoneOffset)
- : value.replace(/(^'|'$)/g, '').replace(/''/g, "'");
- });
-
- return text;
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name json
- * @kind function
- *
- * @description
- * Allows you to convert a JavaScript object into JSON string.
- *
- * This filter is mostly useful for debugging. When using the double curly {{value}} notation
- * the binding is automatically converted to JSON.
- *
- * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.
- * @param {number=} spacing The number of spaces to use per indentation, defaults to 2.
- * @returns {string} JSON string.
- *
- *
- * @example
- <example>
- <file name="index.html">
- <pre id="default-spacing">{{ {'name':'value'} | json }}</pre>
- <pre id="custom-spacing">{{ {'name':'value'} | json:4 }}</pre>
- </file>
- <file name="protractor.js" type="protractor">
- it('should jsonify filtered objects', function() {
- expect(element(by.id('default-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- expect(element(by.id('custom-spacing')).getText()).toMatch(/\{\n "name": ?"value"\n}/);
- });
- </file>
- </example>
- *
- */
-function jsonFilter() {
- return function(object, spacing) {
- if (isUndefined(spacing)) {
- spacing = 2;
- }
- return toJson(object, spacing);
- };
-}
-
-
-/**
- * @ngdoc filter
- * @name lowercase
- * @kind function
- * @description
- * Converts string to lowercase.
- * @see angular.lowercase
- */
-var lowercaseFilter = valueFn(lowercase);
-
-
-/**
- * @ngdoc filter
- * @name uppercase
- * @kind function
- * @description
- * Converts string to uppercase.
- * @see angular.uppercase
- */
-var uppercaseFilter = valueFn(uppercase);
-
-/**
- * @ngdoc filter
- * @name limitTo
- * @kind function
- *
- * @description
- * Creates a new array or string containing only a specified number of elements. The elements
- * are taken from either the beginning or the end of the source array, string or number, as specified by
- * the value and sign (positive or negative) of `limit`. If a number is used as input, it is
- * converted to a string.
- *
- * @param {Array|string|number} input Source array, string or number to be limited.
- * @param {string|number} limit The length of the returned array or string. If the `limit` number
- * is positive, `limit` number of items from the beginning of the source array/string are copied.
- * If the number is negative, `limit` number of items from the end of the source array/string
- * are copied. The `limit` will be trimmed if it exceeds `array.length`. If `limit` is undefined,
- * the input will be returned unchanged.
- * @param {(string|number)=} begin Index at which to begin limitation. As a negative index, `begin`
- * indicates an offset from the end of `input`. Defaults to `0`.
- * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array
- * had less than `limit` elements.
- *
- * @example
- <example module="limitToExample">
- <file name="index.html">
- <script>
- angular.module('limitToExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.numbers = [1,2,3,4,5,6,7,8,9];
- $scope.letters = "abcdefghi";
- $scope.longNumber = 2345432342;
- $scope.numLimit = 3;
- $scope.letterLimit = 3;
- $scope.longNumberLimit = 3;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>
- Limit {{numbers}} to:
- <input type="number" step="1" ng-model="numLimit">
- </label>
- <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>
- <label>
- Limit {{letters}} to:
- <input type="number" step="1" ng-model="letterLimit">
- </label>
- <p>Output letters: {{ letters | limitTo:letterLimit }}</p>
- <label>
- Limit {{longNumber}} to:
- <input type="number" step="1" ng-model="longNumberLimit">
- </label>
- <p>Output long number: {{ longNumber | limitTo:longNumberLimit }}</p>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var numLimitInput = element(by.model('numLimit'));
- var letterLimitInput = element(by.model('letterLimit'));
- var longNumberLimitInput = element(by.model('longNumberLimit'));
- var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));
- var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));
- var limitedLongNumber = element(by.binding('longNumber | limitTo:longNumberLimit'));
-
- it('should limit the number array to first three items', function() {
- expect(numLimitInput.getAttribute('value')).toBe('3');
- expect(letterLimitInput.getAttribute('value')).toBe('3');
- expect(longNumberLimitInput.getAttribute('value')).toBe('3');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');
- expect(limitedLetters.getText()).toEqual('Output letters: abc');
- expect(limitedLongNumber.getText()).toEqual('Output long number: 234');
- });
-
- // There is a bug in safari and protractor that doesn't like the minus key
- // it('should update the output when -3 is entered', function() {
- // numLimitInput.clear();
- // numLimitInput.sendKeys('-3');
- // letterLimitInput.clear();
- // letterLimitInput.sendKeys('-3');
- // longNumberLimitInput.clear();
- // longNumberLimitInput.sendKeys('-3');
- // expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');
- // expect(limitedLetters.getText()).toEqual('Output letters: ghi');
- // expect(limitedLongNumber.getText()).toEqual('Output long number: 342');
- // });
-
- it('should not exceed the maximum size of input array', function() {
- numLimitInput.clear();
- numLimitInput.sendKeys('100');
- letterLimitInput.clear();
- letterLimitInput.sendKeys('100');
- longNumberLimitInput.clear();
- longNumberLimitInput.sendKeys('100');
- expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');
- expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');
- expect(limitedLongNumber.getText()).toEqual('Output long number: 2345432342');
- });
- </file>
- </example>
-*/
-function limitToFilter() {
- return function(input, limit, begin) {
- if (Math.abs(Number(limit)) === Infinity) {
- limit = Number(limit);
- } else {
- limit = toInt(limit);
- }
- if (isNaN(limit)) return input;
-
- if (isNumber(input)) input = input.toString();
- if (!isArray(input) && !isString(input)) return input;
-
- begin = (!begin || isNaN(begin)) ? 0 : toInt(begin);
- begin = (begin < 0) ? Math.max(0, input.length + begin) : begin;
-
- if (limit >= 0) {
- return input.slice(begin, begin + limit);
- } else {
- if (begin === 0) {
- return input.slice(limit, input.length);
- } else {
- return input.slice(Math.max(0, begin + limit), begin);
- }
- }
- };
-}
-
-/**
- * @ngdoc filter
- * @name orderBy
- * @kind function
- *
- * @description
- * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically
- * for strings and numerically for numbers. Note: if you notice numbers are not being sorted
- * as expected, make sure they are actually being saved as numbers and not strings.
- * Array-like values (e.g. NodeLists, jQuery objects, TypedArrays, Strings, etc) are also supported.
- *
- * @param {Array} array The array (or array-like object) to sort.
- * @param {function(*)|string|Array.<(function(*)|string)>=} expression A predicate to be
- * used by the comparator to determine the order of elements.
- *
- * Can be one of:
- *
- * - `function`: Getter function. The result of this function will be sorted using the
- * `<`, `===`, `>` operator.
- * - `string`: An Angular expression. The result of this expression is used to compare elements
- * (for example `name` to sort by a property called `name` or `name.substr(0, 3)` to sort by
- * 3 first characters of a property called `name`). The result of a constant expression
- * is interpreted as a property name to be used in comparisons (for example `"special name"`
- * to sort object by the value of their `special name` property). An expression can be
- * optionally prefixed with `+` or `-` to control ascending or descending sort order
- * (for example, `+name` or `-name`). If no property is provided, (e.g. `'+'`) then the array
- * element itself is used to compare where sorting.
- * - `Array`: An array of function or string predicates. The first predicate in the array
- * is used for sorting, but when two items are equivalent, the next predicate is used.
- *
- * If the predicate is missing or empty then it defaults to `'+'`.
- *
- * @param {boolean=} reverse Reverse the order of the array.
- * @returns {Array} Sorted copy of the source array.
- *
- *
- * @example
- * The example below demonstrates a simple ngRepeat, where the data is sorted
- * by age in descending order (predicate is set to `'-age'`).
- * `reverse` is not set, which means it defaults to `false`.
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th>Name</th>
- <th>Phone Number</th>
- <th>Age</th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:'-age'">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * The predicate and reverse parameters can be controlled dynamically through scope properties,
- * as shown in the next example.
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <script>
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.friends =
- [{name:'John', phone:'555-1212', age:10},
- {name:'Mary', phone:'555-9876', age:19},
- {name:'Mike', phone:'555-4321', age:21},
- {name:'Adam', phone:'555-5678', age:35},
- {name:'Julie', phone:'555-8765', age:29}];
- $scope.predicate = 'age';
- $scope.reverse = true;
- $scope.order = function(predicate) {
- $scope.reverse = ($scope.predicate === predicate) ? !$scope.reverse : false;
- $scope.predicate = predicate;
- };
- }]);
- </script>
- <style type="text/css">
- .sortorder:after {
- content: '\25b2';
- }
- .sortorder.reverse:after {
- content: '\25bc';
- }
- </style>
- <div ng-controller="ExampleController">
- <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>
- <hr/>
- [ <a href="" ng-click="predicate=''">unsorted</a> ]
- <table class="friend">
- <tr>
- <th>
- <a href="" ng-click="order('name')">Name</a>
- <span class="sortorder" ng-show="predicate === 'name'" ng-class="{reverse:reverse}"></span>
- </th>
- <th>
- <a href="" ng-click="order('phone')">Phone Number</a>
- <span class="sortorder" ng-show="predicate === 'phone'" ng-class="{reverse:reverse}"></span>
- </th>
- <th>
- <a href="" ng-click="order('age')">Age</a>
- <span class="sortorder" ng-show="predicate === 'age'" ng-class="{reverse:reverse}"></span>
- </th>
- </tr>
- <tr ng-repeat="friend in friends | orderBy:predicate:reverse">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
- </example>
- *
- * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the
- * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the
- * desired parameters.
- *
- * Example:
- *
- * @example
- <example module="orderByExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <table class="friend">
- <tr>
- <th><a href="" ng-click="reverse=false;order('name', false)">Name</a>
- (<a href="" ng-click="order('-name',false)">^</a>)</th>
- <th><a href="" ng-click="reverse=!reverse;order('phone', reverse)">Phone Number</a></th>
- <th><a href="" ng-click="reverse=!reverse;order('age',reverse)">Age</a></th>
- </tr>
- <tr ng-repeat="friend in friends">
- <td>{{friend.name}}</td>
- <td>{{friend.phone}}</td>
- <td>{{friend.age}}</td>
- </tr>
- </table>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('orderByExample', [])
- .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {
- var orderBy = $filter('orderBy');
- $scope.friends = [
- { name: 'John', phone: '555-1212', age: 10 },
- { name: 'Mary', phone: '555-9876', age: 19 },
- { name: 'Mike', phone: '555-4321', age: 21 },
- { name: 'Adam', phone: '555-5678', age: 35 },
- { name: 'Julie', phone: '555-8765', age: 29 }
- ];
- $scope.order = function(predicate, reverse) {
- $scope.friends = orderBy($scope.friends, predicate, reverse);
- };
- $scope.order('-age',false);
- }]);
- </file>
-</example>
- */
-orderByFilter.$inject = ['$parse'];
-function orderByFilter($parse) {
- return function(array, sortPredicate, reverseOrder) {
-
- if (array == null) return array;
- if (!isArrayLike(array)) {
- throw minErr('orderBy')('notarray', 'Expected array but received: {0}', array);
- }
-
- if (!isArray(sortPredicate)) { sortPredicate = [sortPredicate]; }
- if (sortPredicate.length === 0) { sortPredicate = ['+']; }
-
- var predicates = processPredicates(sortPredicate, reverseOrder);
- // Add a predicate at the end that evaluates to the element index. This makes the
- // sort stable as it works as a tie-breaker when all the input predicates cannot
- // distinguish between two elements.
- predicates.push({ get: function() { return {}; }, descending: reverseOrder ? -1 : 1});
-
- // The next three lines are a version of a Swartzian Transform idiom from Perl
- // (sometimes called the Decorate-Sort-Undecorate idiom)
- // See https://en.wikipedia.org/wiki/Schwartzian_transform
- var compareValues = Array.prototype.map.call(array, getComparisonObject);
- compareValues.sort(doComparison);
- array = compareValues.map(function(item) { return item.value; });
-
- return array;
-
- function getComparisonObject(value, index) {
- return {
- value: value,
- predicateValues: predicates.map(function(predicate) {
- return getPredicateValue(predicate.get(value), index);
- })
- };
- }
-
- function doComparison(v1, v2) {
- var result = 0;
- for (var index=0, length = predicates.length; index < length; ++index) {
- result = compare(v1.predicateValues[index], v2.predicateValues[index]) * predicates[index].descending;
- if (result) break;
- }
- return result;
- }
- };
-
- function processPredicates(sortPredicate, reverseOrder) {
- reverseOrder = reverseOrder ? -1 : 1;
- return sortPredicate.map(function(predicate) {
- var descending = 1, get = identity;
-
- if (isFunction(predicate)) {
- get = predicate;
- } else if (isString(predicate)) {
- if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {
- descending = predicate.charAt(0) == '-' ? -1 : 1;
- predicate = predicate.substring(1);
- }
- if (predicate !== '') {
- get = $parse(predicate);
- if (get.constant) {
- var key = get();
- get = function(value) { return value[key]; };
- }
- }
- }
- return { get: get, descending: descending * reverseOrder };
- });
- }
-
- function isPrimitive(value) {
- switch (typeof value) {
- case 'number': /* falls through */
- case 'boolean': /* falls through */
- case 'string':
- return true;
- default:
- return false;
- }
- }
-
- function objectValue(value, index) {
- // If `valueOf` is a valid function use that
- if (typeof value.valueOf === 'function') {
- value = value.valueOf();
- if (isPrimitive(value)) return value;
- }
- // If `toString` is a valid function and not the one from `Object.prototype` use that
- if (hasCustomToString(value)) {
- value = value.toString();
- if (isPrimitive(value)) return value;
- }
- // We have a basic object so we use the position of the object in the collection
- return index;
- }
-
- function getPredicateValue(value, index) {
- var type = typeof value;
- if (value === null) {
- type = 'string';
- value = 'null';
- } else if (type === 'string') {
- value = value.toLowerCase();
- } else if (type === 'object') {
- value = objectValue(value, index);
- }
- return { value: value, type: type };
- }
-
- function compare(v1, v2) {
- var result = 0;
- if (v1.type === v2.type) {
- if (v1.value !== v2.value) {
- result = v1.value < v2.value ? -1 : 1;
- }
- } else {
- result = v1.type < v2.type ? -1 : 1;
- }
- return result;
- }
-}
-
-function ngDirective(directive) {
- if (isFunction(directive)) {
- directive = {
- link: directive
- };
- }
- directive.restrict = directive.restrict || 'AC';
- return valueFn(directive);
-}
-
-/**
- * @ngdoc directive
- * @name a
- * @restrict E
- *
- * @description
- * Modifies the default behavior of the html A tag so that the default action is prevented when
- * the href attribute is empty.
- *
- * This change permits the easy creation of action links with the `ngClick` directive
- * without changing the location or causing page reloads, e.g.:
- * `<a href="" ng-click="list.addItem()">Add Item</a>`
- */
-var htmlAnchorDirective = valueFn({
- restrict: 'E',
- compile: function(element, attr) {
- if (!attr.href && !attr.xlinkHref) {
- return function(scope, element) {
- // If the linked element is not an anchor tag anymore, do nothing
- if (element[0].nodeName.toLowerCase() !== 'a') return;
-
- // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.
- var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
- 'xlink:href' : 'href';
- element.on('click', function(event) {
- // if we have no href url, then don't navigate anywhere.
- if (!element.attr(href)) {
- event.preventDefault();
- }
- });
- };
- }
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngHref
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in an href attribute will
- * make the link go to the wrong URL if the user clicks it before
- * Angular has a chance to replace the `{{hash}}` markup with its
- * value. Until Angular replaces the markup the link will be broken
- * and will most likely return a 404 error. The `ngHref` directive
- * solves this problem.
- *
- * The wrong way to write it:
- * ```html
- * <a href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <a ng-href="http://www.gravatar.com/avatar/{{hash}}">link1</a>
- * ```
- *
- * @element A
- * @param {template} ngHref any string which can contain `{{}}` markup.
- *
- * @example
- * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes
- * in links and their different behaviors:
- <example>
- <file name="index.html">
- <input ng-model="value" /><br />
- <a id="link-1" href ng-click="value = 1">link 1</a> (link, don't reload)<br />
- <a id="link-2" href="" ng-click="value = 2">link 2</a> (link, don't reload)<br />
- <a id="link-3" ng-href="/{{'123'}}">link 3</a> (link, reload!)<br />
- <a id="link-4" href="" name="xx" ng-click="value = 4">anchor</a> (link, don't reload)<br />
- <a id="link-5" name="xxx" ng-click="value = 5">anchor</a> (no link)<br />
- <a id="link-6" ng-href="{{value}}">link</a> (link, change location)
- </file>
- <file name="protractor.js" type="protractor">
- it('should execute ng-click but not reload when href without value', function() {
- element(by.id('link-1')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('1');
- expect(element(by.id('link-1')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when href empty string', function() {
- element(by.id('link-2')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('2');
- expect(element(by.id('link-2')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click and change url when ng-href specified', function() {
- expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\/123$/);
-
- element(by.id('link-3')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
-
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/123$/);
- });
- }, 5000, 'page should navigate to /123');
- });
-
- it('should execute ng-click but not reload when href empty string and name specified', function() {
- element(by.id('link-4')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('4');
- expect(element(by.id('link-4')).getAttribute('href')).toBe('');
- });
-
- it('should execute ng-click but not reload when no href but name specified', function() {
- element(by.id('link-5')).click();
- expect(element(by.model('value')).getAttribute('value')).toEqual('5');
- expect(element(by.id('link-5')).getAttribute('href')).toBe(null);
- });
-
- it('should only change url when only ng-href', function() {
- element(by.model('value')).clear();
- element(by.model('value')).sendKeys('6');
- expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\/6$/);
-
- element(by.id('link-6')).click();
-
- // At this point, we navigate away from an Angular page, so we need
- // to use browser.driver to get the base webdriver.
- browser.wait(function() {
- return browser.driver.getCurrentUrl().then(function(url) {
- return url.match(/\/6$/);
- });
- }, 5000, 'page should navigate to /6');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngSrc
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `src` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrc` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img src="http://www.gravatar.com/avatar/{{hash}}" alt="Description"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-src="http://www.gravatar.com/avatar/{{hash}}" alt="Description" />
- * ```
- *
- * @element IMG
- * @param {template} ngSrc any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngSrcset
- * @restrict A
- * @priority 99
- *
- * @description
- * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't
- * work right: The browser will fetch from the URL with the literal
- * text `{{hash}}` until Angular replaces the expression inside
- * `{{hash}}`. The `ngSrcset` directive solves this problem.
- *
- * The buggy way to write it:
- * ```html
- * <img srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description"/>
- * ```
- *
- * The correct way to write it:
- * ```html
- * <img ng-srcset="http://www.gravatar.com/avatar/{{hash}} 2x" alt="Description" />
- * ```
- *
- * @element IMG
- * @param {template} ngSrcset any string which can contain `{{}}` markup.
- */
-
-/**
- * @ngdoc directive
- * @name ngDisabled
- * @restrict A
- * @priority 100
- *
- * @description
- *
- * This directive sets the `disabled` attribute on the element if the
- * {@link guide/expression expression} inside `ngDisabled` evaluates to truthy.
- *
- * A special directive is necessary because we cannot use interpolation inside the `disabled`
- * attribute. The following example would make the button enabled on Chrome/Firefox
- * but not on older IEs:
- *
- * ```html
- * <!-- See below for an example of ng-disabled being used correctly -->
- * <div ng-init="isDisabled = false">
- * <button disabled="{{isDisabled}}">Disabled</button>
- * </div>
- * ```
- *
- * This is because the HTML specification does not require browsers to preserve the values of
- * boolean attributes such as `disabled` (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- *
- * @example
- <example>
- <file name="index.html">
- <label>Click me to toggle: <input type="checkbox" ng-model="checked"></label><br/>
- <button ng-model="button" ng-disabled="checked">Button</button>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle button', function() {
- expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,
- * then the `disabled` attribute will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngChecked
- * @restrict A
- * @priority 100
- *
- * @description
- * Sets the `checked` attribute on the element, if the expression inside `ngChecked` is truthy.
- *
- * Note that this directive should not be used together with {@link ngModel `ngModel`},
- * as this can lead to unexpected behavior.
- *
- * ### Why do we need `ngChecked`?
- *
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as checked. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngChecked` directive solves this problem for the `checked` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me to check both: <input type="checkbox" ng-model="master"></label><br/>
- <input id="checkSlave" type="checkbox" ng-checked="master" aria-label="Slave input">
- </file>
- <file name="protractor.js" type="protractor">
- it('should check both checkBoxes', function() {
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();
- element(by.model('master')).click();
- expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,
- * then the `checked` attribute will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngReadonly
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as readonly. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngReadonly` directive solves this problem for the `readonly` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me to make text readonly: <input type="checkbox" ng-model="checked"></label><br/>
- <input type="text" ng-readonly="checked" value="I'm Angular" aria-label="Readonly field" />
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle readonly attr', function() {
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeFalsy();
- element(by.model('checked')).click();
- expect(element(by.css('[type="text"]')).getAttribute('readonly')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element INPUT
- * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,
- * then special attribute "readonly" will be set on the element
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSelected
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as selected. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngSelected` directive solves this problem for the `selected` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- *
- * @example
- <example>
- <file name="index.html">
- <label>Check me to select: <input type="checkbox" ng-model="selected"></label><br/>
- <select aria-label="ngSelected demo">
- <option>Hello!</option>
- <option id="greet" ng-selected="selected">Greetings!</option>
- </select>
- </file>
- <file name="protractor.js" type="protractor">
- it('should select Greetings!', function() {
- expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();
- element(by.model('selected')).click();
- expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element OPTION
- * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,
- * then special attribute "selected" will be set on the element
- */
-
-/**
- * @ngdoc directive
- * @name ngOpen
- * @restrict A
- * @priority 100
- *
- * @description
- * The HTML specification does not require browsers to preserve the values of boolean attributes
- * such as open. (Their presence means true and their absence means false.)
- * If we put an Angular interpolation expression into such an attribute then the
- * binding information would be lost when the browser removes the attribute.
- * The `ngOpen` directive solves this problem for the `open` attribute.
- * This complementary directive is not removed by the browser and so provides
- * a permanent reliable place to store the binding information.
- * @example
- <example>
- <file name="index.html">
- <label>Check me check multiple: <input type="checkbox" ng-model="open"></label><br/>
- <details id="details" ng-open="open">
- <summary>Show/Hide me</summary>
- </details>
- </file>
- <file name="protractor.js" type="protractor">
- it('should toggle open', function() {
- expect(element(by.id('details')).getAttribute('open')).toBeFalsy();
- element(by.model('open')).click();
- expect(element(by.id('details')).getAttribute('open')).toBeTruthy();
- });
- </file>
- </example>
- *
- * @element DETAILS
- * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,
- * then special attribute "open" will be set on the element
- */
-
-var ngAttributeAliasDirectives = {};
-
-// boolean attrs are evaluated
-forEach(BOOLEAN_ATTR, function(propName, attrName) {
- // binding to multiple is not supported
- if (propName == "multiple") return;
-
- function defaultLinkFn(scope, element, attr) {
- scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {
- attr.$set(attrName, !!value);
- });
- }
-
- var normalized = directiveNormalize('ng-' + attrName);
- var linkFn = defaultLinkFn;
-
- if (propName === 'checked') {
- linkFn = function(scope, element, attr) {
- // ensuring ngChecked doesn't interfere with ngModel when both are set on the same input
- if (attr.ngModel !== attr[normalized]) {
- defaultLinkFn(scope, element, attr);
- }
- };
- }
-
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- restrict: 'A',
- priority: 100,
- link: linkFn
- };
- };
-});
-
-// aliased input attrs are evaluated
-forEach(ALIASED_ATTR, function(htmlAttr, ngAttr) {
- ngAttributeAliasDirectives[ngAttr] = function() {
- return {
- priority: 100,
- link: function(scope, element, attr) {
- //special case ngPattern when a literal regular expression value
- //is used as the expression (this way we don't have to watch anything).
- if (ngAttr === "ngPattern" && attr.ngPattern.charAt(0) == "/") {
- var match = attr.ngPattern.match(REGEX_STRING_REGEXP);
- if (match) {
- attr.$set("ngPattern", new RegExp(match[1], match[2]));
- return;
- }
- }
-
- scope.$watch(attr[ngAttr], function ngAttrAliasWatchAction(value) {
- attr.$set(ngAttr, value);
- });
- }
- };
- };
-});
-
-// ng-src, ng-srcset, ng-href are interpolated
-forEach(['src', 'srcset', 'href'], function(attrName) {
- var normalized = directiveNormalize('ng-' + attrName);
- ngAttributeAliasDirectives[normalized] = function() {
- return {
- priority: 99, // it needs to run after the attributes are interpolated
- link: function(scope, element, attr) {
- var propName = attrName,
- name = attrName;
-
- if (attrName === 'href' &&
- toString.call(element.prop('href')) === '[object SVGAnimatedString]') {
- name = 'xlinkHref';
- attr.$attr[name] = 'xlink:href';
- propName = null;
- }
-
- attr.$observe(normalized, function(value) {
- if (!value) {
- if (attrName === 'href') {
- attr.$set(name, null);
- }
- return;
- }
-
- attr.$set(name, value);
-
- // on IE, if "ng:src" directive declaration is used and "src" attribute doesn't exist
- // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need
- // to set the property as well to achieve the desired effect.
- // we use attr[attrName] value since $set can sanitize the url.
- if (msie && propName) element.prop(propName, attr[name]);
- });
- }
- };
- };
-});
-
-/* global -nullFormCtrl, -SUBMITTED_CLASS, addSetValidityMethod: true
- */
-var nullFormCtrl = {
- $addControl: noop,
- $$renameControl: nullFormRenameControl,
- $removeControl: noop,
- $setValidity: noop,
- $setDirty: noop,
- $setPristine: noop,
- $setSubmitted: noop
-},
-SUBMITTED_CLASS = 'ng-submitted';
-
-function nullFormRenameControl(control, name) {
- control.$name = name;
-}
-
-/**
- * @ngdoc type
- * @name form.FormController
- *
- * @property {boolean} $pristine True if user has not interacted with the form yet.
- * @property {boolean} $dirty True if user has already interacted with the form.
- * @property {boolean} $valid True if all of the containing forms and controls are valid.
- * @property {boolean} $invalid True if at least one containing control or form is invalid.
- * @property {boolean} $pending True if at least one containing control or form is pending.
- * @property {boolean} $submitted True if user has submitted the form even if its invalid.
- *
- * @property {Object} $error Is an object hash, containing references to controls or
- * forms with failing validators, where:
- *
- * - keys are validation tokens (error names),
- * - values are arrays of controls or forms that have a failing validator for given error name.
- *
- * Built-in validation tokens:
- *
- * - `email`
- * - `max`
- * - `maxlength`
- * - `min`
- * - `minlength`
- * - `number`
- * - `pattern`
- * - `required`
- * - `url`
- * - `date`
- * - `datetimelocal`
- * - `time`
- * - `week`
- * - `month`
- *
- * @description
- * `FormController` keeps track of all its controls and nested forms as well as the state of them,
- * such as being valid/invalid or dirty/pristine.
- *
- * Each {@link ng.directive:form form} directive creates an instance
- * of `FormController`.
- *
- */
-//asks for $scope to fool the BC controller module
-FormController.$inject = ['$element', '$attrs', '$scope', '$animate', '$interpolate'];
-function FormController(element, attrs, $scope, $animate, $interpolate) {
- var form = this,
- controls = [];
-
- // init state
- form.$error = {};
- form.$$success = {};
- form.$pending = undefined;
- form.$name = $interpolate(attrs.name || attrs.ngForm || '')($scope);
- form.$dirty = false;
- form.$pristine = true;
- form.$valid = true;
- form.$invalid = false;
- form.$submitted = false;
- form.$$parentForm = nullFormCtrl;
-
- /**
- * @ngdoc method
- * @name form.FormController#$rollbackViewValue
- *
- * @description
- * Rollback all form controls pending updates to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. This method is typically needed by the reset button of
- * a form that uses `ng-model-options` to pend updates.
- */
- form.$rollbackViewValue = function() {
- forEach(controls, function(control) {
- control.$rollbackViewValue();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$commitViewValue
- *
- * @description
- * Commit all form controls pending updates to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. This method is rarely needed as `NgModelController`
- * usually handles calling this in response to input events.
- */
- form.$commitViewValue = function() {
- forEach(controls, function(control) {
- control.$commitViewValue();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$addControl
- * @param {object} control control object, either a {@link form.FormController} or an
- * {@link ngModel.NgModelController}
- *
- * @description
- * Register a control with the form. Input elements using ngModelController do this automatically
- * when they are linked.
- *
- * Note that the current state of the control will not be reflected on the new parent form. This
- * is not an issue with normal use, as freshly compiled and linked controls are in a `$pristine`
- * state.
- *
- * However, if the method is used programmatically, for example by adding dynamically created controls,
- * or controls that have been previously removed without destroying their corresponding DOM element,
- * it's the developers responsiblity to make sure the current state propagates to the parent form.
- *
- * For example, if an input control is added that is already `$dirty` and has `$error` properties,
- * calling `$setDirty()` and `$validate()` afterwards will propagate the state to the parent form.
- */
- form.$addControl = function(control) {
- // Breaking change - before, inputs whose name was "hasOwnProperty" were quietly ignored
- // and not added to the scope. Now we throw an error.
- assertNotHasOwnProperty(control.$name, 'input');
- controls.push(control);
-
- if (control.$name) {
- form[control.$name] = control;
- }
-
- control.$$parentForm = form;
- };
-
- // Private API: rename a form control
- form.$$renameControl = function(control, newName) {
- var oldName = control.$name;
-
- if (form[oldName] === control) {
- delete form[oldName];
- }
- form[newName] = control;
- control.$name = newName;
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$removeControl
- * @param {object} control control object, either a {@link form.FormController} or an
- * {@link ngModel.NgModelController}
- *
- * @description
- * Deregister a control from the form.
- *
- * Input elements using ngModelController do this automatically when they are destroyed.
- *
- * Note that only the removed control's validation state (`$errors`etc.) will be removed from the
- * form. `$dirty`, `$submitted` states will not be changed, because the expected behavior can be
- * different from case to case. For example, removing the only `$dirty` control from a form may or
- * may not mean that the form is still `$dirty`.
- */
- form.$removeControl = function(control) {
- if (control.$name && form[control.$name] === control) {
- delete form[control.$name];
- }
- forEach(form.$pending, function(value, name) {
- form.$setValidity(name, null, control);
- });
- forEach(form.$error, function(value, name) {
- form.$setValidity(name, null, control);
- });
- forEach(form.$$success, function(value, name) {
- form.$setValidity(name, null, control);
- });
-
- arrayRemove(controls, control);
- control.$$parentForm = nullFormCtrl;
- };
-
-
- /**
- * @ngdoc method
- * @name form.FormController#$setValidity
- *
- * @description
- * Sets the validity of a form control.
- *
- * This method will also propagate to parent forms.
- */
- addSetValidityMethod({
- ctrl: this,
- $element: element,
- set: function(object, property, controller) {
- var list = object[property];
- if (!list) {
- object[property] = [controller];
- } else {
- var index = list.indexOf(controller);
- if (index === -1) {
- list.push(controller);
- }
- }
- },
- unset: function(object, property, controller) {
- var list = object[property];
- if (!list) {
- return;
- }
- arrayRemove(list, controller);
- if (list.length === 0) {
- delete object[property];
- }
- },
- $animate: $animate
- });
-
- /**
- * @ngdoc method
- * @name form.FormController#$setDirty
- *
- * @description
- * Sets the form to a dirty state.
- *
- * This method can be called to add the 'ng-dirty' class and set the form to a dirty
- * state (ng-dirty class). This method will also propagate to parent forms.
- */
- form.$setDirty = function() {
- $animate.removeClass(element, PRISTINE_CLASS);
- $animate.addClass(element, DIRTY_CLASS);
- form.$dirty = true;
- form.$pristine = false;
- form.$$parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setPristine
- *
- * @description
- * Sets the form to its pristine state.
- *
- * This method can be called to remove the 'ng-dirty' class and set the form to its pristine
- * state (ng-pristine class). This method will also propagate to all the controls contained
- * in this form.
- *
- * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after
- * saving or resetting it.
- */
- form.$setPristine = function() {
- $animate.setClass(element, PRISTINE_CLASS, DIRTY_CLASS + ' ' + SUBMITTED_CLASS);
- form.$dirty = false;
- form.$pristine = true;
- form.$submitted = false;
- forEach(controls, function(control) {
- control.$setPristine();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setUntouched
- *
- * @description
- * Sets the form to its untouched state.
- *
- * This method can be called to remove the 'ng-touched' class and set the form controls to their
- * untouched state (ng-untouched class).
- *
- * Setting a form controls back to their untouched state is often useful when setting the form
- * back to its pristine state.
- */
- form.$setUntouched = function() {
- forEach(controls, function(control) {
- control.$setUntouched();
- });
- };
-
- /**
- * @ngdoc method
- * @name form.FormController#$setSubmitted
- *
- * @description
- * Sets the form to its submitted state.
- */
- form.$setSubmitted = function() {
- $animate.addClass(element, SUBMITTED_CLASS);
- form.$submitted = true;
- form.$$parentForm.$setSubmitted();
- };
-}
-
-/**
- * @ngdoc directive
- * @name ngForm
- * @restrict EAC
- *
- * @description
- * Nestable alias of {@link ng.directive:form `form`} directive. HTML
- * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a
- * sub-group of controls needs to be determined.
- *
- * Note: the purpose of `ngForm` is to group controls,
- * but not to be a replacement for the `<form>` tag with all of its capabilities
- * (e.g. posting to the server, ...).
- *
- * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- *
- */
-
- /**
- * @ngdoc directive
- * @name form
- * @restrict E
- *
- * @description
- * Directive that instantiates
- * {@link form.FormController FormController}.
- *
- * If the `name` attribute is specified, the form controller is published onto the current scope under
- * this name.
- *
- * # Alias: {@link ng.directive:ngForm `ngForm`}
- *
- * In Angular, forms can be nested. This means that the outer form is valid when all of the child
- * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so
- * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to
- * `<form>` but can be nested. This allows you to have nested forms, which is very useful when
- * using Angular validation directives in forms that are dynamically generated using the
- * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`
- * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an
- * `ngForm` directive and nest these in an outer `form` element.
- *
- *
- * # CSS classes
- * - `ng-valid` is set if the form is valid.
- * - `ng-invalid` is set if the form is invalid.
- * - `ng-pending` is set if the form is pending.
- * - `ng-pristine` is set if the form is pristine.
- * - `ng-dirty` is set if the form is dirty.
- * - `ng-submitted` is set if the form was submitted.
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- *
- * # Submitting a form and preventing the default action
- *
- * Since the role of forms in client-side Angular applications is different than in classical
- * roundtrip apps, it is desirable for the browser not to translate the form submission into a full
- * page reload that sends the data to the server. Instead some javascript logic should be triggered
- * to handle the form submission in an application-specific way.
- *
- * For this reason, Angular prevents the default action (form submission to the server) unless the
- * `<form>` element has an `action` attribute specified.
- *
- * You can use one of the following two ways to specify what javascript method should be called when
- * a form is submitted:
- *
- * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element
- * - {@link ng.directive:ngClick ngClick} directive on the first
- * button or input field of type submit (input[type=submit])
- *
- * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}
- * or {@link ng.directive:ngClick ngClick} directives.
- * This is because of the following form submission rules in the HTML specification:
- *
- * - If a form has only one input field then hitting enter in this field triggers form submit
- * (`ngSubmit`)
- * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter
- * doesn't trigger submit
- * - if a form has one or more input fields and one or more buttons or input[type=submit] then
- * hitting enter in any of the input fields will trigger the click handler on the *first* button or
- * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)
- *
- * Any pending `ngModelOptions` changes will take place immediately when an enclosing form is
- * submitted. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
- * to have access to the updated model.
- *
- * ## Animation Hooks
- *
- * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.
- * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any
- * other validations that are performed within the form. Animations in ngForm are similar to how
- * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well
- * as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style a form element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-form {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-form.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- <example deps="angular-animate.js" animations="true" fixBase="true" module="formExample">
- <file name="index.html">
- <script>
- angular.module('formExample', [])
- .controller('FormController', ['$scope', function($scope) {
- $scope.userType = 'guest';
- }]);
- </script>
- <style>
- .my-form {
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-form.ng-invalid {
- background: red;
- }
- </style>
- <form name="myForm" ng-controller="FormController" class="my-form">
- userType: <input name="input" ng-model="userType" required>
- <span class="error" ng-show="myForm.input.$error.required">Required!</span><br>
- <code>userType = {{userType}}</code><br>
- <code>myForm.input.$valid = {{myForm.input.$valid}}</code><br>
- <code>myForm.input.$error = {{myForm.input.$error}}</code><br>
- <code>myForm.$valid = {{myForm.$valid}}</code><br>
- <code>myForm.$error.required = {{!!myForm.$error.required}}</code><br>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should initialize to model', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
-
- expect(userType.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- var userType = element(by.binding('userType'));
- var valid = element(by.binding('myForm.input.$valid'));
- var userInput = element(by.model('userType'));
-
- userInput.clear();
- userInput.sendKeys('');
-
- expect(userType.getText()).toEqual('userType =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- *
- * @param {string=} name Name of the form. If specified, the form controller will be published into
- * related scope, under this name.
- */
-var formDirectiveFactory = function(isNgForm) {
- return ['$timeout', '$parse', function($timeout, $parse) {
- var formDirective = {
- name: 'form',
- restrict: isNgForm ? 'EAC' : 'E',
- require: ['form', '^^?form'], //first is the form's own ctrl, second is an optional parent form
- controller: FormController,
- compile: function ngFormCompile(formElement, attr) {
- // Setup initial state of the control
- formElement.addClass(PRISTINE_CLASS).addClass(VALID_CLASS);
-
- var nameAttr = attr.name ? 'name' : (isNgForm && attr.ngForm ? 'ngForm' : false);
-
- return {
- pre: function ngFormPreLink(scope, formElement, attr, ctrls) {
- var controller = ctrls[0];
-
- // if `action` attr is not present on the form, prevent the default action (submission)
- if (!('action' in attr)) {
- // we can't use jq events because if a form is destroyed during submission the default
- // action is not prevented. see #1238
- //
- // IE 9 is not affected because it doesn't fire a submit event and try to do a full
- // page reload if the form was destroyed by submission of the form via a click handler
- // on a button in the form. Looks like an IE9 specific bug.
- var handleFormSubmission = function(event) {
- scope.$apply(function() {
- controller.$commitViewValue();
- controller.$setSubmitted();
- });
-
- event.preventDefault();
- };
-
- addEventListenerFn(formElement[0], 'submit', handleFormSubmission);
-
- // unregister the preventDefault listener so that we don't not leak memory but in a
- // way that will achieve the prevention of the default action.
- formElement.on('$destroy', function() {
- $timeout(function() {
- removeEventListenerFn(formElement[0], 'submit', handleFormSubmission);
- }, 0, false);
- });
- }
-
- var parentFormCtrl = ctrls[1] || controller.$$parentForm;
- parentFormCtrl.$addControl(controller);
-
- var setter = nameAttr ? getSetter(controller.$name) : noop;
-
- if (nameAttr) {
- setter(scope, controller);
- attr.$observe(nameAttr, function(newValue) {
- if (controller.$name === newValue) return;
- setter(scope, undefined);
- controller.$$parentForm.$$renameControl(controller, newValue);
- setter = getSetter(controller.$name);
- setter(scope, controller);
- });
- }
- formElement.on('$destroy', function() {
- controller.$$parentForm.$removeControl(controller);
- setter(scope, undefined);
- extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards
- });
- }
- };
- }
- };
-
- return formDirective;
-
- function getSetter(expression) {
- if (expression === '') {
- //create an assignable expression, so forms with an empty name can be renamed later
- return $parse('this[""]').assign;
- }
- return $parse(expression).assign || noop;
- }
- }];
-};
-
-var formDirective = formDirectiveFactory();
-var ngFormDirective = formDirectiveFactory(true);
-
-/* global VALID_CLASS: false,
- INVALID_CLASS: false,
- PRISTINE_CLASS: false,
- DIRTY_CLASS: false,
- UNTOUCHED_CLASS: false,
- TOUCHED_CLASS: false,
- ngModelMinErr: false,
-*/
-
-// Regex code is obtained from SO: https://stackoverflow.com/questions/3143070/javascript-regex-iso-datetime#answer-3143231
-var ISO_DATE_REGEXP = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/;
-// See valid URLs in RFC3987 (http://tools.ietf.org/html/rfc3987)
-var URL_REGEXP = /^[A-Za-z][A-Za-z\d.+-]*:\/*(?:\w+(?::\w+)?@)?[^\s/]+(?::\d+)?(?:\/[\w#!:.?+=&%@\-/]*)?$/;
-var EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;
-var NUMBER_REGEXP = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/;
-var DATE_REGEXP = /^(\d{4})-(\d{2})-(\d{2})$/;
-var DATETIMELOCAL_REGEXP = /^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
-var WEEK_REGEXP = /^(\d{4})-W(\d\d)$/;
-var MONTH_REGEXP = /^(\d{4})-(\d\d)$/;
-var TIME_REGEXP = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/;
-
-var inputType = {
-
- /**
- * @ngdoc input
- * @name input[text]
- *
- * @description
- * Standard HTML text input with angular data binding, inherited by most of the `input` elements.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Adds `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="text-input-directive" module="textInputExample">
- <file name="index.html">
- <script>
- angular.module('textInputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.example = {
- text: 'guest',
- word: /^\s*\w*\s*$/
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Single word:
- <input type="text" name="input" ng-model="example.text"
- ng-pattern="example.word" required ng-trim="false">
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.pattern">
- Single word only!</span>
- </div>
- <tt>text = {{example.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('example.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('guest');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if multi word', function() {
- input.clear();
- input.sendKeys('hello world');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'text': textInputType,
-
- /**
- * @ngdoc input
- * @name input[date]
- *
- * @description
- * Input with date validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601
- * date format (yyyy-MM-dd), for example: `2009-01-06`. Since many
- * modern browsers do not yet support this input type, it is important to provide cues to users on the
- * expected input format via a placeholder or label.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`. This must be a
- * valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
- * (e.g. `min="{{minDate | date:'yyyy-MM-dd'}}"`). Note that `min` will also add native HTML5
- * constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`. This must be
- * a valid ISO date string (yyyy-MM-dd). You can also use interpolation inside this attribute
- * (e.g. `max="{{maxDate | date:'yyyy-MM-dd'}}"`). Note that `max` will also add native HTML5
- * constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO date string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO date string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="date-input-directive" module="dateInputExample">
- <file name="index.html">
- <script>
- angular.module('dateInputExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 9, 22)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a date in 2013:</label>
- <input type="date" id="exampleInput" name="input" ng-model="example.value"
- placeholder="yyyy-MM-dd" min="2013-01-01" max="2013-12-31" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.date">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM-dd"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM-dd"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (see https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-10-22');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01-01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'date': createDateInputType('date', DATE_REGEXP,
- createDateParser(DATE_REGEXP, ['yyyy', 'MM', 'dd']),
- 'yyyy-MM-dd'),
-
- /**
- * @ngdoc input
- * @name input[datetime-local]
- *
- * @description
- * Input with datetime validation and transformation. In browsers that do not yet support
- * the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * local datetime format (yyyy-MM-ddTHH:mm:ss), for example: `2010-12-28T14:57:00`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
- * inside this attribute (e.g. `min="{{minDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
- * Note that `min` will also add native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO datetime format (yyyy-MM-ddTHH:mm:ss). You can also use interpolation
- * inside this attribute (e.g. `max="{{maxDatetimeLocal | date:'yyyy-MM-ddTHH:mm:ss'}}"`).
- * Note that `max` will also add native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation error key to the Date / ISO datetime string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation error key to the Date / ISO datetime string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="datetimelocal-input-directive" module="dateExample">
- <file name="index.html">
- <script>
- angular.module('dateExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2010, 11, 28, 14, 57)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a date between in 2013:</label>
- <input type="datetime-local" id="exampleInput" name="input" ng-model="example.value"
- placeholder="yyyy-MM-ddTHH:mm:ss" min="2001-01-01T00:00:00" max="2013-12-31T00:00:00" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.datetimelocal">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM-ddTHH:mm:ss"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM-ddTHH:mm:ss"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2010-12-28T14:57:00');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01-01T23:59:00');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'datetime-local': createDateInputType('datetimelocal', DATETIMELOCAL_REGEXP,
- createDateParser(DATETIMELOCAL_REGEXP, ['yyyy', 'MM', 'dd', 'HH', 'mm', 'ss', 'sss']),
- 'yyyy-MM-ddTHH:mm:ss.sss'),
-
- /**
- * @ngdoc input
- * @name input[time]
- *
- * @description
- * Input with time validation and transformation. In browsers that do not yet support
- * the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * local time format (HH:mm:ss), for example: `14:57:00`. Model must be a Date object. This binding will always output a
- * Date object to the model of January 1, 1970, or local date `new Date(1970, 0, 1, HH, mm, ss)`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
- * attribute (e.g. `min="{{minTime | date:'HH:mm:ss'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO time format (HH:mm:ss). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxTime | date:'HH:mm:ss'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO time string the
- * `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO time string the
- * `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="time-input-directive" module="timeExample">
- <file name="index.html">
- <script>
- angular.module('timeExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(1970, 0, 1, 14, 57, 0)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a between 8am and 5pm:</label>
- <input type="time" id="exampleInput" name="input" ng-model="example.value"
- placeholder="HH:mm:ss" min="08:00:00" max="17:00:00" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.time">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "HH:mm:ss"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "HH:mm:ss"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('14:57:00');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('23:59:00');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'time': createDateInputType('time', TIME_REGEXP,
- createDateParser(TIME_REGEXP, ['HH', 'mm', 'ss', 'sss']),
- 'HH:mm:ss.sss'),
-
- /**
- * @ngdoc input
- * @name input[week]
- *
- * @description
- * Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support
- * the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * week format (yyyy-W##), for example: `2013-W02`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
- * attribute (e.g. `min="{{minWeek | date:'yyyy-Www'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO week format (yyyy-W##). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxWeek | date:'yyyy-Www'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="week-input-directive" module="weekExample">
- <file name="index.html">
- <script>
- angular.module('weekExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 0, 3)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label>Pick a date between in 2013:
- <input id="exampleInput" type="week" name="input" ng-model="example.value"
- placeholder="YYYY-W##" min="2012-W32"
- max="2013-W52" required />
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.week">
- Not a valid date!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-Www"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-Www"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-W01');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-W01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'week': createDateInputType('week', WEEK_REGEXP, weekParser, 'yyyy-Www'),
-
- /**
- * @ngdoc input
- * @name input[month]
- *
- * @description
- * Input with month validation and transformation. In browsers that do not yet support
- * the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
- * month format (yyyy-MM), for example: `2009-01`.
- *
- * The model must always be a Date object, otherwise Angular will throw an error.
- * Invalid `Date` objects (dates whose `getTime()` is `NaN`) will be rendered as an empty string.
- * If the model is not set to the first of the month, the next view to model update will set it
- * to the first of the month.
- *
- * The timezone to be used to read/write the `Date` instance in the model can be defined using
- * {@link ng.directive:ngModelOptions ngModelOptions}. By default, this is the timezone of the browser.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
- * attribute (e.g. `min="{{minMonth | date:'yyyy-MM'}}"`). Note that `min` will also add
- * native HTML5 constraint validation.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * This must be a valid ISO month format (yyyy-MM). You can also use interpolation inside this
- * attribute (e.g. `max="{{maxMonth | date:'yyyy-MM'}}"`). Note that `max` will also add
- * native HTML5 constraint validation.
- * @param {(date|string)=} ngMin Sets the `min` validation constraint to the Date / ISO week string
- * the `ngMin` expression evaluates to. Note that it does not set the `min` attribute.
- * @param {(date|string)=} ngMax Sets the `max` validation constraint to the Date / ISO week string
- * the `ngMax` expression evaluates to. Note that it does not set the `max` attribute.
-
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="month-input-directive" module="monthExample">
- <file name="index.html">
- <script>
- angular.module('monthExample', [])
- .controller('DateController', ['$scope', function($scope) {
- $scope.example = {
- value: new Date(2013, 9, 1)
- };
- }]);
- </script>
- <form name="myForm" ng-controller="DateController as dateCtrl">
- <label for="exampleInput">Pick a month in 2013:</label>
- <input id="exampleInput" type="month" name="input" ng-model="example.value"
- placeholder="yyyy-MM" min="2013-01" max="2013-12" required />
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.month">
- Not a valid month!</span>
- </div>
- <tt>value = {{example.value | date: "yyyy-MM"}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value | date: "yyyy-MM"'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- // currently protractor/webdriver does not support
- // sending keys to all known HTML5 input controls
- // for various browsers (https://github.com/angular/protractor/issues/562).
- function setInput(val) {
- // set the value of the element and force validation.
- var scr = "var ipt = document.getElementById('exampleInput'); " +
- "ipt.value = '" + val + "';" +
- "angular.element(ipt).scope().$apply(function(s) { s.myForm[ipt.name].$setViewValue('" + val + "'); });";
- browser.executeScript(scr);
- }
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('2013-10');
- expect(valid.getText()).toContain('myForm.input.$valid = true');
- });
-
- it('should be invalid if empty', function() {
- setInput('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
-
- it('should be invalid if over max', function() {
- setInput('2015-01');
- expect(value.getText()).toContain('');
- expect(valid.getText()).toContain('myForm.input.$valid = false');
- });
- </file>
- </example>
- */
- 'month': createDateInputType('month', MONTH_REGEXP,
- createDateParser(MONTH_REGEXP, ['yyyy', 'MM']),
- 'yyyy-MM'),
-
- /**
- * @ngdoc input
- * @name input[number]
- *
- * @description
- * Text input with number validation and transformation. Sets the `number` validation
- * error if not a valid number.
- *
- * <div class="alert alert-warning">
- * The model must always be of type `number` otherwise Angular will throw an error.
- * Be aware that a string containing a number is not enough. See the {@link ngModel:numfmt}
- * error docs for more information and an example of how to convert your model if necessary.
- * </div>
- *
- * ## Issues with HTML5 constraint validation
- *
- * In browsers that follow the
- * [HTML5 specification](https://html.spec.whatwg.org/multipage/forms.html#number-state-%28type=number%29),
- * `input[number]` does not work as expected with {@link ngModelOptions `ngModelOptions.allowInvalid`}.
- * If a non-number is entered in the input, the browser will report the value as an empty string,
- * which means the view / model values in `ngModel` and subsequently the scope value
- * will also be an empty string.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.
- * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="number-input-directive" module="numberExample">
- <file name="index.html">
- <script>
- angular.module('numberExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.example = {
- value: 12
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Number:
- <input type="number" name="input" ng-model="example.value"
- min="0" max="99" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.number">
- Not valid number!</span>
- </div>
- <tt>value = {{example.value}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var value = element(by.binding('example.value'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('example.value'));
-
- it('should initialize to model', function() {
- expect(value.getText()).toContain('12');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if over max', function() {
- input.clear();
- input.sendKeys('123');
- expect(value.getText()).toEqual('value =');
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'number': numberInputType,
-
-
- /**
- * @ngdoc input
- * @name input[url]
- *
- * @description
- * Text input with URL validation. Sets the `url` validation error key if the content is not a
- * valid URL.
- *
- * <div class="alert alert-warning">
- * **Note:** `input[url]` uses a regex to validate urls that is derived from the regex
- * used in Chromium. If you need stricter validation, you can use `ng-pattern` or modify
- * the built-in validators (see the {@link guide/forms Forms guide})
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="url-input-directive" module="urlExample">
- <file name="index.html">
- <script>
- angular.module('urlExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.url = {
- text: 'http://google.com'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>URL:
- <input type="url" name="input" ng-model="url.text" required>
- <label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.url">
- Not valid url!</span>
- </div>
- <tt>text = {{url.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('url.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('url.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('http://google.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
-
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not url', function() {
- input.clear();
- input.sendKeys('box');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'url': urlInputType,
-
-
- /**
- * @ngdoc input
- * @name input[email]
- *
- * @description
- * Text input with email validation. Sets the `email` validation error key if not a valid email
- * address.
- *
- * <div class="alert alert-warning">
- * **Note:** `input[email]` uses a regex to validate email addresses that is derived from the regex
- * used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can
- * use `ng-pattern` or modify the built-in validators (see the {@link guide/forms Forms guide})
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of
- * any length.
- * @param {string=} pattern Similar to `ngPattern` except that the attribute value is the actual string
- * that contains the regular expression body that will be converted to a regular expression
- * as in the ngPattern directive.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="email-input-directive" module="emailExample">
- <file name="index.html">
- <script>
- angular.module('emailExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.email = {
- text: 'me@example.com'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Email:
- <input type="email" name="input" ng-model="email.text" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.input.$error.required">
- Required!</span>
- <span class="error" ng-show="myForm.input.$error.email">
- Not valid email!</span>
- </div>
- <tt>text = {{email.text}}</tt><br/>
- <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>
- <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var text = element(by.binding('email.text'));
- var valid = element(by.binding('myForm.input.$valid'));
- var input = element(by.model('email.text'));
-
- it('should initialize to model', function() {
- expect(text.getText()).toContain('me@example.com');
- expect(valid.getText()).toContain('true');
- });
-
- it('should be invalid if empty', function() {
- input.clear();
- input.sendKeys('');
- expect(text.getText()).toEqual('text =');
- expect(valid.getText()).toContain('false');
- });
-
- it('should be invalid if not email', function() {
- input.clear();
- input.sendKeys('xxx');
-
- expect(valid.getText()).toContain('false');
- });
- </file>
- </example>
- */
- 'email': emailInputType,
-
-
- /**
- * @ngdoc input
- * @name input[radio]
- *
- * @description
- * HTML radio button.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string} value The value to which the `ngModel` expression should be set when selected.
- * Note that `value` only supports `string` values, i.e. the scope model needs to be a string,
- * too. Use `ngValue` if you need complex models (`number`, `object`, ...).
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {string} ngValue Angular expression to which `ngModel` will be be set when the radio
- * is selected. Should be used instead of the `value` attribute if you need
- * a non-string `ngModel` (`boolean`, `array`, ...).
- *
- * @example
- <example name="radio-input-directive" module="radioExample">
- <file name="index.html">
- <script>
- angular.module('radioExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.color = {
- name: 'blue'
- };
- $scope.specialValue = {
- "id": "12345",
- "value": "green"
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>
- <input type="radio" ng-model="color.name" value="red">
- Red
- </label><br/>
- <label>
- <input type="radio" ng-model="color.name" ng-value="specialValue">
- Green
- </label><br/>
- <label>
- <input type="radio" ng-model="color.name" value="blue">
- Blue
- </label><br/>
- <tt>color = {{color.name | json}}</tt><br/>
- </form>
- Note that `ng-value="specialValue"` sets radio item's value to be the value of `$scope.specialValue`.
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var color = element(by.binding('color.name'));
-
- expect(color.getText()).toContain('blue');
-
- element.all(by.model('color.name')).get(0).click();
-
- expect(color.getText()).toContain('red');
- });
- </file>
- </example>
- */
- 'radio': radioInputType,
-
-
- /**
- * @ngdoc input
- * @name input[checkbox]
- *
- * @description
- * HTML checkbox.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {expression=} ngTrueValue The value to which the expression should be set when selected.
- * @param {expression=} ngFalseValue The value to which the expression should be set when not selected.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- *
- * @example
- <example name="checkbox-input-directive" module="checkboxExample">
- <file name="index.html">
- <script>
- angular.module('checkboxExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.checkboxModel = {
- value1 : true,
- value2 : 'YES'
- };
- }]);
- </script>
- <form name="myForm" ng-controller="ExampleController">
- <label>Value1:
- <input type="checkbox" ng-model="checkboxModel.value1">
- </label><br/>
- <label>Value2:
- <input type="checkbox" ng-model="checkboxModel.value2"
- ng-true-value="'YES'" ng-false-value="'NO'">
- </label><br/>
- <tt>value1 = {{checkboxModel.value1}}</tt><br/>
- <tt>value2 = {{checkboxModel.value2}}</tt><br/>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should change state', function() {
- var value1 = element(by.binding('checkboxModel.value1'));
- var value2 = element(by.binding('checkboxModel.value2'));
-
- expect(value1.getText()).toContain('true');
- expect(value2.getText()).toContain('YES');
-
- element(by.model('checkboxModel.value1')).click();
- element(by.model('checkboxModel.value2')).click();
-
- expect(value1.getText()).toContain('false');
- expect(value2.getText()).toContain('NO');
- });
- </file>
- </example>
- */
- 'checkbox': checkboxInputType,
-
- 'hidden': noop,
- 'button': noop,
- 'submit': noop,
- 'reset': noop,
- 'file': noop
-};
-
-function stringBasedInputType(ctrl) {
- ctrl.$formatters.push(function(value) {
- return ctrl.$isEmpty(value) ? value : value.toString();
- });
-}
-
-function textInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-}
-
-function baseInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- var type = lowercase(element[0].type);
-
- // In composition mode, users are still inputing intermediate text buffer,
- // hold the listener until composition is done.
- // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent
- if (!$sniffer.android) {
- var composing = false;
-
- element.on('compositionstart', function(data) {
- composing = true;
- });
-
- element.on('compositionend', function() {
- composing = false;
- listener();
- });
- }
-
- var listener = function(ev) {
- if (timeout) {
- $browser.defer.cancel(timeout);
- timeout = null;
- }
- if (composing) return;
- var value = element.val(),
- event = ev && ev.type;
-
- // By default we will trim the value
- // If the attribute ng-trim exists we will avoid trimming
- // If input type is 'password', the value is never trimmed
- if (type !== 'password' && (!attr.ngTrim || attr.ngTrim !== 'false')) {
- value = trim(value);
- }
-
- // If a control is suffering from bad input (due to native validators), browsers discard its
- // value, so it may be necessary to revalidate (by calling $setViewValue again) even if the
- // control's value is the same empty value twice in a row.
- if (ctrl.$viewValue !== value || (value === '' && ctrl.$$hasNativeValidators)) {
- ctrl.$setViewValue(value, event);
- }
- };
-
- // if the browser does support "input" event, we are fine - except on IE9 which doesn't fire the
- // input event on backspace, delete or cut
- if ($sniffer.hasEvent('input')) {
- element.on('input', listener);
- } else {
- var timeout;
-
- var deferListener = function(ev, input, origValue) {
- if (!timeout) {
- timeout = $browser.defer(function() {
- timeout = null;
- if (!input || input.value !== origValue) {
- listener(ev);
- }
- });
- }
- };
-
- element.on('keydown', function(event) {
- var key = event.keyCode;
-
- // ignore
- // command modifiers arrows
- if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;
-
- deferListener(event, this, this.value);
- });
-
- // if user modifies input value using context menu in IE, we need "paste" and "cut" events to catch it
- if ($sniffer.hasEvent('paste')) {
- element.on('paste cut', deferListener);
- }
- }
-
- // if user paste into input using mouse on older browser
- // or form autocomplete on newer browser, we need "change" event to catch it
- element.on('change', listener);
-
- ctrl.$render = function() {
- // Workaround for Firefox validation #12102.
- var value = ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue;
- if (element.val() !== value) {
- element.val(value);
- }
- };
-}
-
-function weekParser(isoWeek, existingDate) {
- if (isDate(isoWeek)) {
- return isoWeek;
- }
-
- if (isString(isoWeek)) {
- WEEK_REGEXP.lastIndex = 0;
- var parts = WEEK_REGEXP.exec(isoWeek);
- if (parts) {
- var year = +parts[1],
- week = +parts[2],
- hours = 0,
- minutes = 0,
- seconds = 0,
- milliseconds = 0,
- firstThurs = getFirstThursdayOfYear(year),
- addDays = (week - 1) * 7;
-
- if (existingDate) {
- hours = existingDate.getHours();
- minutes = existingDate.getMinutes();
- seconds = existingDate.getSeconds();
- milliseconds = existingDate.getMilliseconds();
- }
-
- return new Date(year, 0, firstThurs.getDate() + addDays, hours, minutes, seconds, milliseconds);
- }
- }
-
- return NaN;
-}
-
-function createDateParser(regexp, mapping) {
- return function(iso, date) {
- var parts, map;
-
- if (isDate(iso)) {
- return iso;
- }
-
- if (isString(iso)) {
- // When a date is JSON'ified to wraps itself inside of an extra
- // set of double quotes. This makes the date parsing code unable
- // to match the date string and parse it as a date.
- if (iso.charAt(0) == '"' && iso.charAt(iso.length - 1) == '"') {
- iso = iso.substring(1, iso.length - 1);
- }
- if (ISO_DATE_REGEXP.test(iso)) {
- return new Date(iso);
- }
- regexp.lastIndex = 0;
- parts = regexp.exec(iso);
-
- if (parts) {
- parts.shift();
- if (date) {
- map = {
- yyyy: date.getFullYear(),
- MM: date.getMonth() + 1,
- dd: date.getDate(),
- HH: date.getHours(),
- mm: date.getMinutes(),
- ss: date.getSeconds(),
- sss: date.getMilliseconds() / 1000
- };
- } else {
- map = { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 };
- }
-
- forEach(parts, function(part, index) {
- if (index < mapping.length) {
- map[mapping[index]] = +part;
- }
- });
- return new Date(map.yyyy, map.MM - 1, map.dd, map.HH, map.mm, map.ss || 0, map.sss * 1000 || 0);
- }
- }
-
- return NaN;
- };
-}
-
-function createDateInputType(type, regexp, parseDate, format) {
- return function dynamicDateInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter) {
- badInputChecker(scope, element, attr, ctrl);
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- var timezone = ctrl && ctrl.$options && ctrl.$options.timezone;
- var previousDate;
-
- ctrl.$$parserName = type;
- ctrl.$parsers.push(function(value) {
- if (ctrl.$isEmpty(value)) return null;
- if (regexp.test(value)) {
- // Note: We cannot read ctrl.$modelValue, as there might be a different
- // parser/formatter in the processing chain so that the model
- // contains some different data format!
- var parsedDate = parseDate(value, previousDate);
- if (timezone) {
- parsedDate = convertTimezoneToLocal(parsedDate, timezone);
- }
- return parsedDate;
- }
- return undefined;
- });
-
- ctrl.$formatters.push(function(value) {
- if (value && !isDate(value)) {
- throw ngModelMinErr('datefmt', 'Expected `{0}` to be a date', value);
- }
- if (isValidDate(value)) {
- previousDate = value;
- if (previousDate && timezone) {
- previousDate = convertTimezoneToLocal(previousDate, timezone, true);
- }
- return $filter('date')(value, format, timezone);
- } else {
- previousDate = null;
- return '';
- }
- });
-
- if (isDefined(attr.min) || attr.ngMin) {
- var minVal;
- ctrl.$validators.min = function(value) {
- return !isValidDate(value) || isUndefined(minVal) || parseDate(value) >= minVal;
- };
- attr.$observe('min', function(val) {
- minVal = parseObservedDateValue(val);
- ctrl.$validate();
- });
- }
-
- if (isDefined(attr.max) || attr.ngMax) {
- var maxVal;
- ctrl.$validators.max = function(value) {
- return !isValidDate(value) || isUndefined(maxVal) || parseDate(value) <= maxVal;
- };
- attr.$observe('max', function(val) {
- maxVal = parseObservedDateValue(val);
- ctrl.$validate();
- });
- }
-
- function isValidDate(value) {
- // Invalid Date: getTime() returns NaN
- return value && !(value.getTime && value.getTime() !== value.getTime());
- }
-
- function parseObservedDateValue(val) {
- return isDefined(val) && !isDate(val) ? parseDate(val) || undefined : val;
- }
- };
-}
-
-function badInputChecker(scope, element, attr, ctrl) {
- var node = element[0];
- var nativeValidation = ctrl.$$hasNativeValidators = isObject(node.validity);
- if (nativeValidation) {
- ctrl.$parsers.push(function(value) {
- var validity = element.prop(VALIDITY_STATE_PROPERTY) || {};
- return validity.badInput || validity.typeMismatch ? undefined : value;
- });
- }
-}
-
-function numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- badInputChecker(scope, element, attr, ctrl);
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
-
- ctrl.$$parserName = 'number';
- ctrl.$parsers.push(function(value) {
- if (ctrl.$isEmpty(value)) return null;
- if (NUMBER_REGEXP.test(value)) return parseFloat(value);
- return undefined;
- });
-
- ctrl.$formatters.push(function(value) {
- if (!ctrl.$isEmpty(value)) {
- if (!isNumber(value)) {
- throw ngModelMinErr('numfmt', 'Expected `{0}` to be a number', value);
- }
- value = value.toString();
- }
- return value;
- });
-
- if (isDefined(attr.min) || attr.ngMin) {
- var minVal;
- ctrl.$validators.min = function(value) {
- return ctrl.$isEmpty(value) || isUndefined(minVal) || value >= minVal;
- };
-
- attr.$observe('min', function(val) {
- if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val, 10);
- }
- minVal = isNumber(val) && !isNaN(val) ? val : undefined;
- // TODO(matsko): implement validateLater to reduce number of validations
- ctrl.$validate();
- });
- }
-
- if (isDefined(attr.max) || attr.ngMax) {
- var maxVal;
- ctrl.$validators.max = function(value) {
- return ctrl.$isEmpty(value) || isUndefined(maxVal) || value <= maxVal;
- };
-
- attr.$observe('max', function(val) {
- if (isDefined(val) && !isNumber(val)) {
- val = parseFloat(val, 10);
- }
- maxVal = isNumber(val) && !isNaN(val) ? val : undefined;
- // TODO(matsko): implement validateLater to reduce number of validations
- ctrl.$validate();
- });
- }
-}
-
-function urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- // Note: no badInputChecker here by purpose as `url` is only a validation
- // in browsers, i.e. we can always read out input.value even if it is not valid!
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-
- ctrl.$$parserName = 'url';
- ctrl.$validators.url = function(modelValue, viewValue) {
- var value = modelValue || viewValue;
- return ctrl.$isEmpty(value) || URL_REGEXP.test(value);
- };
-}
-
-function emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {
- // Note: no badInputChecker here by purpose as `url` is only a validation
- // in browsers, i.e. we can always read out input.value even if it is not valid!
- baseInputType(scope, element, attr, ctrl, $sniffer, $browser);
- stringBasedInputType(ctrl);
-
- ctrl.$$parserName = 'email';
- ctrl.$validators.email = function(modelValue, viewValue) {
- var value = modelValue || viewValue;
- return ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value);
- };
-}
-
-function radioInputType(scope, element, attr, ctrl) {
- // make the name unique, if not defined
- if (isUndefined(attr.name)) {
- element.attr('name', nextUid());
- }
-
- var listener = function(ev) {
- if (element[0].checked) {
- ctrl.$setViewValue(attr.value, ev && ev.type);
- }
- };
-
- element.on('click', listener);
-
- ctrl.$render = function() {
- var value = attr.value;
- element[0].checked = (value == ctrl.$viewValue);
- };
-
- attr.$observe('value', ctrl.$render);
-}
-
-function parseConstantExpr($parse, context, name, expression, fallback) {
- var parseFn;
- if (isDefined(expression)) {
- parseFn = $parse(expression);
- if (!parseFn.constant) {
- throw ngModelMinErr('constexpr', 'Expected constant expression for `{0}`, but saw ' +
- '`{1}`.', name, expression);
- }
- return parseFn(context);
- }
- return fallback;
-}
-
-function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filter, $parse) {
- var trueValue = parseConstantExpr($parse, scope, 'ngTrueValue', attr.ngTrueValue, true);
- var falseValue = parseConstantExpr($parse, scope, 'ngFalseValue', attr.ngFalseValue, false);
-
- var listener = function(ev) {
- ctrl.$setViewValue(element[0].checked, ev && ev.type);
- };
-
- element.on('click', listener);
-
- ctrl.$render = function() {
- element[0].checked = ctrl.$viewValue;
- };
-
- // Override the standard `$isEmpty` because the $viewValue of an empty checkbox is always set to `false`
- // This is because of the parser below, which compares the `$modelValue` with `trueValue` to convert
- // it to a boolean.
- ctrl.$isEmpty = function(value) {
- return value === false;
- };
-
- ctrl.$formatters.push(function(value) {
- return equals(value, trueValue);
- });
-
- ctrl.$parsers.push(function(value) {
- return value ? trueValue : falseValue;
- });
-}
-
-
-/**
- * @ngdoc directive
- * @name textarea
- * @restrict E
- *
- * @description
- * HTML textarea element control with angular data-binding. The data-binding and validation
- * properties of this element are exactly the same as those of the
- * {@link ng.directive:input input element}.
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
- * length.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- */
-
-
-/**
- * @ngdoc directive
- * @name input
- * @restrict E
- *
- * @description
- * HTML input element control. When used together with {@link ngModel `ngModel`}, it provides data-binding,
- * input state control, and validation.
- * Input control follows HTML5 input types and polyfills the HTML5 validation behavior for older browsers.
- *
- * <div class="alert alert-warning">
- * **Note:** Not every feature offered is available for all input types.
- * Specifically, data binding and event handling via `ng-model` is unsupported for `input[file]`.
- * </div>
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {boolean=} ngRequired Sets `required` attribute if set to true
- * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than
- * minlength.
- * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than
- * maxlength. Setting the attribute to a negative or non-numeric value, allows view values of any
- * length.
- * @param {string=} ngPattern Sets `pattern` validation error key if the ngModel value does not match
- * a RegExp found by evaluating the Angular expression given in the attribute value.
- * If the expression evaluates to a RegExp object, then this is used directly.
- * If the expression evaluates to a string, then it will be converted to a RegExp
- * after wrapping it in `^` and `$` characters. For instance, `"abc"` will be converted to
- * `new RegExp('^abc$')`.<br />
- * **Note:** Avoid using the `g` flag on the RegExp, as it will cause each successive search to
- * start at the index of the last search's match, thus not taking the whole input value into
- * account.
- * @param {string=} ngChange Angular expression to be executed when input changes due to user
- * interaction with the input element.
- * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.
- * This parameter is ignored for input[type=password] controls, which will never trim the
- * input.
- *
- * @example
- <example name="input-directive" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = {name: 'guest', last: 'visitor'};
- }]);
- </script>
- <div ng-controller="ExampleController">
- <form name="myForm">
- <label>
- User name:
- <input type="text" name="userName" ng-model="user.name" required>
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.userName.$error.required">
- Required!</span>
- </div>
- <label>
- Last name:
- <input type="text" name="lastName" ng-model="user.last"
- ng-minlength="3" ng-maxlength="10">
- </label>
- <div role="alert">
- <span class="error" ng-show="myForm.lastName.$error.minlength">
- Too short!</span>
- <span class="error" ng-show="myForm.lastName.$error.maxlength">
- Too long!</span>
- </div>
- </form>
- <hr>
- <tt>user = {{user}}</tt><br/>
- <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br/>
- <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br/>
- <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br/>
- <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br/>
- <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br/>
- <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br/>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- var user = element(by.exactBinding('user'));
- var userNameValid = element(by.binding('myForm.userName.$valid'));
- var lastNameValid = element(by.binding('myForm.lastName.$valid'));
- var lastNameError = element(by.binding('myForm.lastName.$error'));
- var formValid = element(by.binding('myForm.$valid'));
- var userNameInput = element(by.model('user.name'));
- var userLastInput = element(by.model('user.last'));
-
- it('should initialize to model', function() {
- expect(user.getText()).toContain('{"name":"guest","last":"visitor"}');
- expect(userNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if empty when required', function() {
- userNameInput.clear();
- userNameInput.sendKeys('');
-
- expect(user.getText()).toContain('{"last":"visitor"}');
- expect(userNameValid.getText()).toContain('false');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be valid if empty when min length is set', function() {
- userLastInput.clear();
- userLastInput.sendKeys('');
-
- expect(user.getText()).toContain('{"name":"guest","last":""}');
- expect(lastNameValid.getText()).toContain('true');
- expect(formValid.getText()).toContain('true');
- });
-
- it('should be invalid if less than required min length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('xx');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('minlength');
- expect(formValid.getText()).toContain('false');
- });
-
- it('should be invalid if longer than max length', function() {
- userLastInput.clear();
- userLastInput.sendKeys('some ridiculously long name');
-
- expect(user.getText()).toContain('{"name":"guest"}');
- expect(lastNameValid.getText()).toContain('false');
- expect(lastNameError.getText()).toContain('maxlength');
- expect(formValid.getText()).toContain('false');
- });
- </file>
- </example>
- */
-var inputDirective = ['$browser', '$sniffer', '$filter', '$parse',
- function($browser, $sniffer, $filter, $parse) {
- return {
- restrict: 'E',
- require: ['?ngModel'],
- link: {
- pre: function(scope, element, attr, ctrls) {
- if (ctrls[0]) {
- (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrls[0], $sniffer,
- $browser, $filter, $parse);
- }
- }
- }
- };
-}];
-
-
-
-var CONSTANT_VALUE_REGEXP = /^(true|false|\d+)$/;
-/**
- * @ngdoc directive
- * @name ngValue
- *
- * @description
- * Binds the given expression to the value of `<option>` or {@link input[radio] `input[radio]`},
- * so that when the element is selected, the {@link ngModel `ngModel`} of that element is set to
- * the bound value.
- *
- * `ngValue` is useful when dynamically generating lists of radio buttons using
- * {@link ngRepeat `ngRepeat`}, as shown below.
- *
- * Likewise, `ngValue` can be used to generate `<option>` elements for
- * the {@link select `select`} element. In that case however, only strings are supported
- * for the `value `attribute, so the resulting `ngModel` will always be a string.
- * Support for `select` models with non-string values is available via `ngOptions`.
- *
- * @element input
- * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute
- * of the `input` element
- *
- * @example
- <example name="ngValue-directive" module="valueExample">
- <file name="index.html">
- <script>
- angular.module('valueExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.names = ['pizza', 'unicorns', 'robots'];
- $scope.my = { favorite: 'unicorns' };
- }]);
- </script>
- <form ng-controller="ExampleController">
- <h2>Which is your favorite?</h2>
- <label ng-repeat="name in names" for="{{name}}">
- {{name}}
- <input type="radio"
- ng-model="my.favorite"
- ng-value="name"
- id="{{name}}"
- name="favorite">
- </label>
- <div>You chose {{my.favorite}}</div>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- var favorite = element(by.binding('my.favorite'));
-
- it('should initialize to model', function() {
- expect(favorite.getText()).toContain('unicorns');
- });
- it('should bind the values to the inputs', function() {
- element.all(by.model('my.favorite')).get(0).click();
- expect(favorite.getText()).toContain('pizza');
- });
- </file>
- </example>
- */
-var ngValueDirective = function() {
- return {
- restrict: 'A',
- priority: 100,
- compile: function(tpl, tplAttr) {
- if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {
- return function ngValueConstantLink(scope, elm, attr) {
- attr.$set('value', scope.$eval(attr.ngValue));
- };
- } else {
- return function ngValueLink(scope, elm, attr) {
- scope.$watch(attr.ngValue, function valueWatchAction(value) {
- attr.$set('value', value);
- });
- };
- }
- }
- };
-};
-
-/**
- * @ngdoc directive
- * @name ngBind
- * @restrict AC
- *
- * @description
- * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element
- * with the value of a given expression, and to update the text content when the value of that
- * expression changes.
- *
- * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like
- * `{{ expression }}` which is similar but less verbose.
- *
- * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily
- * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an
- * element attribute, it makes the bindings invisible to the user while the page is loading.
- *
- * An alternative solution to this problem would be using the
- * {@link ng.directive:ngCloak ngCloak} directive.
- *
- *
- * @element ANY
- * @param {expression} ngBind {@link guide/expression Expression} to evaluate.
- *
- * @example
- * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.name = 'Whirled';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Enter name: <input type="text" ng-model="name"></label><br>
- Hello <span ng-bind="name"></span>!
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var nameInput = element(by.model('name'));
-
- expect(element(by.binding('name')).getText()).toBe('Whirled');
- nameInput.clear();
- nameInput.sendKeys('world');
- expect(element(by.binding('name')).getText()).toBe('world');
- });
- </file>
- </example>
- */
-var ngBindDirective = ['$compile', function($compile) {
- return {
- restrict: 'AC',
- compile: function ngBindCompile(templateElement) {
- $compile.$$addBindingClass(templateElement);
- return function ngBindLink(scope, element, attr) {
- $compile.$$addBindingInfo(element, attr.ngBind);
- element = element[0];
- scope.$watch(attr.ngBind, function ngBindWatchAction(value) {
- element.textContent = isUndefined(value) ? '' : value;
- });
- };
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindTemplate
- *
- * @description
- * The `ngBindTemplate` directive specifies that the element
- * text content should be replaced with the interpolation of the template
- * in the `ngBindTemplate` attribute.
- * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`
- * expressions. This directive is needed since some HTML elements
- * (such as TITLE and OPTION) cannot contain SPAN elements.
- *
- * @element ANY
- * @param {string} ngBindTemplate template of form
- * <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.
- *
- * @example
- * Try it here: enter text in text box and watch the greeting change.
- <example module="bindExample">
- <file name="index.html">
- <script>
- angular.module('bindExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.salutation = 'Hello';
- $scope.name = 'World';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Salutation: <input type="text" ng-model="salutation"></label><br>
- <label>Name: <input type="text" ng-model="name"></label><br>
- <pre ng-bind-template="{{salutation}} {{name}}!"></pre>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-bind', function() {
- var salutationElem = element(by.binding('salutation'));
- var salutationInput = element(by.model('salutation'));
- var nameInput = element(by.model('name'));
-
- expect(salutationElem.getText()).toBe('Hello World!');
-
- salutationInput.clear();
- salutationInput.sendKeys('Greetings');
- nameInput.clear();
- nameInput.sendKeys('user');
-
- expect(salutationElem.getText()).toBe('Greetings user!');
- });
- </file>
- </example>
- */
-var ngBindTemplateDirective = ['$interpolate', '$compile', function($interpolate, $compile) {
- return {
- compile: function ngBindTemplateCompile(templateElement) {
- $compile.$$addBindingClass(templateElement);
- return function ngBindTemplateLink(scope, element, attr) {
- var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));
- $compile.$$addBindingInfo(element, interpolateFn.expressions);
- element = element[0];
- attr.$observe('ngBindTemplate', function(value) {
- element.textContent = isUndefined(value) ? '' : value;
- });
- };
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngBindHtml
- *
- * @description
- * Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,
- * the resulting HTML content will be sanitized using the {@link ngSanitize.$sanitize $sanitize} service.
- * To utilize this functionality, ensure that `$sanitize` is available, for example, by including {@link
- * ngSanitize} in your module's dependencies (not in core Angular). In order to use {@link ngSanitize}
- * in your module's dependencies, you need to include "angular-sanitize.js" in your application.
- *
- * You may also bypass sanitization for values you know are safe. To do so, bind to
- * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}. See the example
- * under {@link ng.$sce#show-me-an-example-using-sce- Strict Contextual Escaping (SCE)}.
- *
- * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you
- * will have an exception (instead of an exploit.)
- *
- * @element ANY
- * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.
- *
- * @example
-
- <example module="bindHtmlExample" deps="angular-sanitize.js">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <p ng-bind-html="myHTML"></p>
- </div>
- </file>
-
- <file name="script.js">
- angular.module('bindHtmlExample', ['ngSanitize'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.myHTML =
- 'I am an <code>HTML</code>string with ' +
- '<a href="#">links!</a> and other <em>stuff</em>';
- }]);
- </file>
-
- <file name="protractor.js" type="protractor">
- it('should check ng-bind-html', function() {
- expect(element(by.binding('myHTML')).getText()).toBe(
- 'I am an HTMLstring with links! and other stuff');
- });
- </file>
- </example>
- */
-var ngBindHtmlDirective = ['$sce', '$parse', '$compile', function($sce, $parse, $compile) {
- return {
- restrict: 'A',
- compile: function ngBindHtmlCompile(tElement, tAttrs) {
- var ngBindHtmlGetter = $parse(tAttrs.ngBindHtml);
- var ngBindHtmlWatch = $parse(tAttrs.ngBindHtml, function getStringValue(value) {
- return (value || '').toString();
- });
- $compile.$$addBindingClass(tElement);
-
- return function ngBindHtmlLink(scope, element, attr) {
- $compile.$$addBindingInfo(element, attr.ngBindHtml);
-
- scope.$watch(ngBindHtmlWatch, function ngBindHtmlWatchAction() {
- // we re-evaluate the expr because we want a TrustedValueHolderType
- // for $sce, not a string
- element.html($sce.getTrustedHtml(ngBindHtmlGetter(scope)) || '');
- });
- };
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngChange
- *
- * @description
- * Evaluate the given expression when the user changes the input.
- * The expression is evaluated immediately, unlike the JavaScript onchange event
- * which only triggers at the end of a change (usually, when the user leaves the
- * form element or presses the return key).
- *
- * The `ngChange` expression is only evaluated when a change in the input value causes
- * a new value to be committed to the model.
- *
- * It will not be evaluated:
- * * if the value returned from the `$parsers` transformation pipeline has not changed
- * * if the input has continued to be invalid since the model will stay `null`
- * * if the model is changed programmatically and not by a change to the input value
- *
- *
- * Note, this directive requires `ngModel` to be present.
- *
- * @element input
- * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change
- * in input value.
- *
- * @example
- * <example name="ngChange-directive" module="changeExample">
- * <file name="index.html">
- * <script>
- * angular.module('changeExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.counter = 0;
- * $scope.change = function() {
- * $scope.counter++;
- * };
- * }]);
- * </script>
- * <div ng-controller="ExampleController">
- * <input type="checkbox" ng-model="confirmed" ng-change="change()" id="ng-change-example1" />
- * <input type="checkbox" ng-model="confirmed" id="ng-change-example2" />
- * <label for="ng-change-example2">Confirmed</label><br />
- * <tt>debug = {{confirmed}}</tt><br/>
- * <tt>counter = {{counter}}</tt><br/>
- * </div>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var counter = element(by.binding('counter'));
- * var debug = element(by.binding('confirmed'));
- *
- * it('should evaluate the expression if changing from view', function() {
- * expect(counter.getText()).toContain('0');
- *
- * element(by.id('ng-change-example1')).click();
- *
- * expect(counter.getText()).toContain('1');
- * expect(debug.getText()).toContain('true');
- * });
- *
- * it('should not evaluate the expression if changing from model', function() {
- * element(by.id('ng-change-example2')).click();
-
- * expect(counter.getText()).toContain('0');
- * expect(debug.getText()).toContain('true');
- * });
- * </file>
- * </example>
- */
-var ngChangeDirective = valueFn({
- restrict: 'A',
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- ctrl.$viewChangeListeners.push(function() {
- scope.$eval(attr.ngChange);
- });
- }
-});
-
-function classDirective(name, selector) {
- name = 'ngClass' + name;
- return ['$animate', function($animate) {
- return {
- restrict: 'AC',
- link: function(scope, element, attr) {
- var oldVal;
-
- scope.$watch(attr[name], ngClassWatchAction, true);
-
- attr.$observe('class', function(value) {
- ngClassWatchAction(scope.$eval(attr[name]));
- });
-
-
- if (name !== 'ngClass') {
- scope.$watch('$index', function($index, old$index) {
- // jshint bitwise: false
- var mod = $index & 1;
- if (mod !== (old$index & 1)) {
- var classes = arrayClasses(scope.$eval(attr[name]));
- mod === selector ?
- addClasses(classes) :
- removeClasses(classes);
- }
- });
- }
-
- function addClasses(classes) {
- var newClasses = digestClassCounts(classes, 1);
- attr.$addClass(newClasses);
- }
-
- function removeClasses(classes) {
- var newClasses = digestClassCounts(classes, -1);
- attr.$removeClass(newClasses);
- }
-
- function digestClassCounts(classes, count) {
- // Use createMap() to prevent class assumptions involving property
- // names in Object.prototype
- var classCounts = element.data('$classCounts') || createMap();
- var classesToUpdate = [];
- forEach(classes, function(className) {
- if (count > 0 || classCounts[className]) {
- classCounts[className] = (classCounts[className] || 0) + count;
- if (classCounts[className] === +(count > 0)) {
- classesToUpdate.push(className);
- }
- }
- });
- element.data('$classCounts', classCounts);
- return classesToUpdate.join(' ');
- }
-
- function updateClasses(oldClasses, newClasses) {
- var toAdd = arrayDifference(newClasses, oldClasses);
- var toRemove = arrayDifference(oldClasses, newClasses);
- toAdd = digestClassCounts(toAdd, 1);
- toRemove = digestClassCounts(toRemove, -1);
- if (toAdd && toAdd.length) {
- $animate.addClass(element, toAdd);
- }
- if (toRemove && toRemove.length) {
- $animate.removeClass(element, toRemove);
- }
- }
-
- function ngClassWatchAction(newVal) {
- if (selector === true || scope.$index % 2 === selector) {
- var newClasses = arrayClasses(newVal || []);
- if (!oldVal) {
- addClasses(newClasses);
- } else if (!equals(newVal,oldVal)) {
- var oldClasses = arrayClasses(oldVal);
- updateClasses(oldClasses, newClasses);
- }
- }
- oldVal = shallowCopy(newVal);
- }
- }
- };
-
- function arrayDifference(tokens1, tokens2) {
- var values = [];
-
- outer:
- for (var i = 0; i < tokens1.length; i++) {
- var token = tokens1[i];
- for (var j = 0; j < tokens2.length; j++) {
- if (token == tokens2[j]) continue outer;
- }
- values.push(token);
- }
- return values;
- }
-
- function arrayClasses(classVal) {
- var classes = [];
- if (isArray(classVal)) {
- forEach(classVal, function(v) {
- classes = classes.concat(arrayClasses(v));
- });
- return classes;
- } else if (isString(classVal)) {
- return classVal.split(' ');
- } else if (isObject(classVal)) {
- forEach(classVal, function(v, k) {
- if (v) {
- classes = classes.concat(k.split(' '));
- }
- });
- return classes;
- }
- return classVal;
- }
- }];
-}
-
-/**
- * @ngdoc directive
- * @name ngClass
- * @restrict AC
- *
- * @description
- * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding
- * an expression that represents all classes to be added.
- *
- * The directive operates in three different ways, depending on which of three types the expression
- * evaluates to:
- *
- * 1. If the expression evaluates to a string, the string should be one or more space-delimited class
- * names.
- *
- * 2. If the expression evaluates to an object, then for each key-value pair of the
- * object with a truthy value the corresponding key is used as a class name.
- *
- * 3. If the expression evaluates to an array, each element of the array should either be a string as in
- * type 1 or an object as in type 2. This means that you can mix strings and objects together in an array
- * to give you more control over what CSS classes appear. See the code below for an example of this.
- *
- *
- * The directive won't add duplicate classes if a particular class was already set.
- *
- * When the expression changes, the previously added classes are removed and only then are the
- * new classes added.
- *
- * @animations
- * **add** - happens just before the class is applied to the elements
- *
- * **remove** - happens just before the class is removed from the element
- *
- * @element ANY
- * @param {expression} ngClass {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class
- * names, an array, or a map of class names to boolean values. In the case of a map, the
- * names of the properties whose values are truthy will be added as css classes to the
- * element.
- *
- * @example Example that demonstrates basic bindings via ngClass directive.
- <example>
- <file name="index.html">
- <p ng-class="{strike: deleted, bold: important, 'has-error': error}">Map Syntax Example</p>
- <label>
- <input type="checkbox" ng-model="deleted">
- deleted (apply "strike" class)
- </label><br>
- <label>
- <input type="checkbox" ng-model="important">
- important (apply "bold" class)
- </label><br>
- <label>
- <input type="checkbox" ng-model="error">
- error (apply "has-error" class)
- </label>
- <hr>
- <p ng-class="style">Using String Syntax</p>
- <input type="text" ng-model="style"
- placeholder="Type: bold strike red" aria-label="Type: bold strike red">
- <hr>
- <p ng-class="[style1, style2, style3]">Using Array Syntax</p>
- <input ng-model="style1"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red"><br>
- <input ng-model="style2"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 2"><br>
- <input ng-model="style3"
- placeholder="Type: bold, strike or red" aria-label="Type: bold, strike or red 3"><br>
- <hr>
- <p ng-class="[style4, {orange: warning}]">Using Array and Map Syntax</p>
- <input ng-model="style4" placeholder="Type: bold, strike" aria-label="Type: bold, strike"><br>
- <label><input type="checkbox" ng-model="warning"> warning (apply "orange" class)</label>
- </file>
- <file name="style.css">
- .strike {
- text-decoration: line-through;
- }
- .bold {
- font-weight: bold;
- }
- .red {
- color: red;
- }
- .has-error {
- color: red;
- background-color: yellow;
- }
- .orange {
- color: orange;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var ps = element.all(by.css('p'));
-
- it('should let you toggle the class', function() {
-
- expect(ps.first().getAttribute('class')).not.toMatch(/bold/);
- expect(ps.first().getAttribute('class')).not.toMatch(/has-error/);
-
- element(by.model('important')).click();
- expect(ps.first().getAttribute('class')).toMatch(/bold/);
-
- element(by.model('error')).click();
- expect(ps.first().getAttribute('class')).toMatch(/has-error/);
- });
-
- it('should let you toggle string example', function() {
- expect(ps.get(1).getAttribute('class')).toBe('');
- element(by.model('style')).clear();
- element(by.model('style')).sendKeys('red');
- expect(ps.get(1).getAttribute('class')).toBe('red');
- });
-
- it('array example should have 3 classes', function() {
- expect(ps.get(2).getAttribute('class')).toBe('');
- element(by.model('style1')).sendKeys('bold');
- element(by.model('style2')).sendKeys('strike');
- element(by.model('style3')).sendKeys('red');
- expect(ps.get(2).getAttribute('class')).toBe('bold strike red');
- });
-
- it('array with map example should have 2 classes', function() {
- expect(ps.last().getAttribute('class')).toBe('');
- element(by.model('style4')).sendKeys('bold');
- element(by.model('warning')).click();
- expect(ps.last().getAttribute('class')).toBe('bold orange');
- });
- </file>
- </example>
-
- ## Animations
-
- The example below demonstrates how to perform animations using ngClass.
-
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <input id="setbtn" type="button" value="set" ng-click="myVar='my-class'">
- <input id="clearbtn" type="button" value="clear" ng-click="myVar=''">
- <br>
- <span class="base-class" ng-class="myVar">Sample Text</span>
- </file>
- <file name="style.css">
- .base-class {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .base-class.my-class {
- color: red;
- font-size:3em;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class', function() {
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
-
- element(by.id('setbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).
- toMatch(/my-class/);
-
- element(by.id('clearbtn')).click();
-
- expect(element(by.css('.base-class')).getAttribute('class')).not.
- toMatch(/my-class/);
- });
- </file>
- </example>
-
-
- ## ngClass and pre-existing CSS3 Transitions/Animations
- The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.
- Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder
- any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure
- to view the step by step details of {@link $animate#addClass $animate.addClass} and
- {@link $animate#removeClass $animate.removeClass}.
- */
-var ngClassDirective = classDirective('', true);
-
-/**
- * @ngdoc directive
- * @name ngClassOdd
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result
- * of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}}
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassOddDirective = classDirective('Odd', 0);
-
-/**
- * @ngdoc directive
- * @name ngClassEven
- * @restrict AC
- *
- * @description
- * The `ngClassOdd` and `ngClassEven` directives work exactly as
- * {@link ng.directive:ngClass ngClass}, except they work in
- * conjunction with `ngRepeat` and take effect only on odd (even) rows.
- *
- * This directive can be applied only within the scope of an
- * {@link ng.directive:ngRepeat ngRepeat}.
- *
- * @element ANY
- * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The
- * result of the evaluation can be a string representing space delimited class names or an array.
- *
- * @example
- <example>
- <file name="index.html">
- <ol ng-init="names=['John', 'Mary', 'Cate', 'Suz']">
- <li ng-repeat="name in names">
- <span ng-class-odd="'odd'" ng-class-even="'even'">
- {{name}} &nbsp; &nbsp; &nbsp;
- </span>
- </li>
- </ol>
- </file>
- <file name="style.css">
- .odd {
- color: red;
- }
- .even {
- color: blue;
- }
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-class-odd and ng-class-even', function() {
- expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).
- toMatch(/odd/);
- expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).
- toMatch(/even/);
- });
- </file>
- </example>
- */
-var ngClassEvenDirective = classDirective('Even', 1);
-
-/**
- * @ngdoc directive
- * @name ngCloak
- * @restrict AC
- *
- * @description
- * The `ngCloak` directive is used to prevent the Angular html template from being briefly
- * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this
- * directive to avoid the undesirable flicker effect caused by the html template display.
- *
- * The directive can be applied to the `<body>` element, but the preferred usage is to apply
- * multiple `ngCloak` directives to small portions of the page to permit progressive rendering
- * of the browser view.
- *
- * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and
- * `angular.min.js`.
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```css
- * [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
- * display: none !important;
- * }
- * ```
- *
- * When this css rule is loaded by the browser, all html elements (including their children) that
- * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive
- * during the compilation of the template it deletes the `ngCloak` element attribute, making
- * the compiled element visible.
- *
- * For the best result, the `angular.js` script must be loaded in the head section of the html
- * document; alternatively, the css rule above must be included in the external stylesheet of the
- * application.
- *
- * @element ANY
- *
- * @example
- <example>
- <file name="index.html">
- <div id="template1" ng-cloak>{{ 'hello' }}</div>
- <div id="template2" class="ng-cloak">{{ 'world' }}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should remove the template directive and css class', function() {
- expect($('#template1').getAttribute('ng-cloak')).
- toBeNull();
- expect($('#template2').getAttribute('ng-cloak')).
- toBeNull();
- });
- </file>
- </example>
- *
- */
-var ngCloakDirective = ngDirective({
- compile: function(element, attr) {
- attr.$set('ngCloak', undefined);
- element.removeClass('ng-cloak');
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngController
- *
- * @description
- * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular
- * supports the principles behind the Model-View-Controller design pattern.
- *
- * MVC components in angular:
- *
- * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties
- * are accessed through bindings.
- * * View — The template (HTML with data bindings) that is rendered into the View.
- * * Controller — The `ngController` directive specifies a Controller class; the class contains business
- * logic behind the application to decorate the scope with functions and values
- *
- * Note that you can also attach controllers to the DOM by declaring it in a route definition
- * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller
- * again using `ng-controller` in the template itself. This will cause the controller to be attached
- * and executed twice.
- *
- * @element ANY
- * @scope
- * @priority 500
- * @param {expression} ngController Name of a constructor function registered with the current
- * {@link ng.$controllerProvider $controllerProvider} or an {@link guide/expression expression}
- * that on the current scope evaluates to a constructor function.
- *
- * The controller instance can be published into a scope property by specifying
- * `ng-controller="as propertyName"`.
- *
- * If the current `$controllerProvider` is configured to use globals (via
- * {@link ng.$controllerProvider#allowGlobals `$controllerProvider.allowGlobals()` }), this may
- * also be the name of a globally accessible constructor function (not recommended).
- *
- * @example
- * Here is a simple form for editing user contact information. Adding, removing, clearing, and
- * greeting are methods declared on the controller (see source tab). These methods can
- * easily be called from the angular markup. Any changes to the data are automatically reflected
- * in the View without the need for a manual update.
- *
- * Two different declaration styles are included below:
- *
- * * one binds methods and properties directly onto the controller using `this`:
- * `ng-controller="SettingsController1 as settings"`
- * * one injects `$scope` into the controller:
- * `ng-controller="SettingsController2"`
- *
- * The second option is more common in the Angular community, and is generally used in boilerplates
- * and in this guide. However, there are advantages to binding properties directly to the controller
- * and avoiding scope.
- *
- * * Using `controller as` makes it obvious which controller you are accessing in the template when
- * multiple controllers apply to an element.
- * * If you are writing your controllers as classes you have easier access to the properties and
- * methods, which will appear on the scope, from inside the controller code.
- * * Since there is always a `.` in the bindings, you don't have to worry about prototypal
- * inheritance masking primitives.
- *
- * This example demonstrates the `controller as` syntax.
- *
- * <example name="ngControllerAs" module="controllerAsExample">
- * <file name="index.html">
- * <div id="ctrl-as-exmpl" ng-controller="SettingsController1 as settings">
- * <label>Name: <input type="text" ng-model="settings.name"/></label>
- * <button ng-click="settings.greet()">greet</button><br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in settings.contacts">
- * <select ng-model="contact.type" aria-label="Contact method" id="select_{{$index}}">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
- * <button ng-click="settings.clearContact(contact)">clear</button>
- * <button ng-click="settings.removeContact(contact)" aria-label="Remove">X</button>
- * </li>
- * <li><button ng-click="settings.addContact()">add</button></li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerAsExample', [])
- * .controller('SettingsController1', SettingsController1);
- *
- * function SettingsController1() {
- * this.name = "John Smith";
- * this.contacts = [
- * {type: 'phone', value: '408 555 1212'},
- * {type: 'email', value: 'john.smith@example.org'} ];
- * }
- *
- * SettingsController1.prototype.greet = function() {
- * alert(this.name);
- * };
- *
- * SettingsController1.prototype.addContact = function() {
- * this.contacts.push({type: 'email', value: 'yourname@example.org'});
- * };
- *
- * SettingsController1.prototype.removeContact = function(contactToRemove) {
- * var index = this.contacts.indexOf(contactToRemove);
- * this.contacts.splice(index, 1);
- * };
- *
- * SettingsController1.prototype.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller as', function() {
- * var container = element(by.id('ctrl-as-exmpl'));
- * expect(container.element(by.model('settings.name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in settings.contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- *
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.buttonText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.buttonText('add')).click();
- *
- * expect(container.element(by.repeater('contact in settings.contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- * </example>
- *
- * This example demonstrates the "attach to `$scope`" style of controller.
- *
- * <example name="ngController" module="controllerExample">
- * <file name="index.html">
- * <div id="ctrl-exmpl" ng-controller="SettingsController2">
- * <label>Name: <input type="text" ng-model="name"/></label>
- * <button ng-click="greet()">greet</button><br/>
- * Contact:
- * <ul>
- * <li ng-repeat="contact in contacts">
- * <select ng-model="contact.type" id="select_{{$index}}">
- * <option>phone</option>
- * <option>email</option>
- * </select>
- * <input type="text" ng-model="contact.value" aria-labelledby="select_{{$index}}" />
- * <button ng-click="clearContact(contact)">clear</button>
- * <button ng-click="removeContact(contact)">X</button>
- * </li>
- * <li>[ <button ng-click="addContact()">add</button> ]</li>
- * </ul>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('controllerExample', [])
- * .controller('SettingsController2', ['$scope', SettingsController2]);
- *
- * function SettingsController2($scope) {
- * $scope.name = "John Smith";
- * $scope.contacts = [
- * {type:'phone', value:'408 555 1212'},
- * {type:'email', value:'john.smith@example.org'} ];
- *
- * $scope.greet = function() {
- * alert($scope.name);
- * };
- *
- * $scope.addContact = function() {
- * $scope.contacts.push({type:'email', value:'yourname@example.org'});
- * };
- *
- * $scope.removeContact = function(contactToRemove) {
- * var index = $scope.contacts.indexOf(contactToRemove);
- * $scope.contacts.splice(index, 1);
- * };
- *
- * $scope.clearContact = function(contact) {
- * contact.type = 'phone';
- * contact.value = '';
- * };
- * }
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should check controller', function() {
- * var container = element(by.id('ctrl-exmpl'));
- *
- * expect(container.element(by.model('name'))
- * .getAttribute('value')).toBe('John Smith');
- *
- * var firstRepeat =
- * container.element(by.repeater('contact in contacts').row(0));
- * var secondRepeat =
- * container.element(by.repeater('contact in contacts').row(1));
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('408 555 1212');
- * expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('john.smith@example.org');
- *
- * firstRepeat.element(by.buttonText('clear')).click();
- *
- * expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))
- * .toBe('');
- *
- * container.element(by.buttonText('add')).click();
- *
- * expect(container.element(by.repeater('contact in contacts').row(2))
- * .element(by.model('contact.value'))
- * .getAttribute('value'))
- * .toBe('yourname@example.org');
- * });
- * </file>
- *</example>
-
- */
-var ngControllerDirective = [function() {
- return {
- restrict: 'A',
- scope: true,
- controller: '@',
- priority: 500
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngCsp
- *
- * @element html
- * @description
- *
- * Angular has some features that can break certain
- * [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) rules.
- *
- * If you intend to implement these rules then you must tell Angular not to use these features.
- *
- * This is necessary when developing things like Google Chrome Extensions or Universal Windows Apps.
- *
- *
- * The following rules affect Angular:
- *
- * * `unsafe-eval`: this rule forbids apps to use `eval` or `Function(string)` generated functions
- * (among other things). Angular makes use of this in the {@link $parse} service to provide a 30%
- * increase in the speed of evaluating Angular expressions.
- *
- * * `unsafe-inline`: this rule forbids apps from inject custom styles into the document. Angular
- * makes use of this to include some CSS rules (e.g. {@link ngCloak} and {@link ngHide}).
- * To make these directives work when a CSP rule is blocking inline styles, you must link to the
- * `angular-csp.css` in your HTML manually.
- *
- * If you do not provide `ngCsp` then Angular tries to autodetect if CSP is blocking unsafe-eval
- * and automatically deactivates this feature in the {@link $parse} service. This autodetection,
- * however, triggers a CSP error to be logged in the console:
- *
- * ```
- * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of
- * script in the following Content Security Policy directive: "default-src 'self'". Note that
- * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
- * ```
- *
- * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`
- * directive on an element of the HTML document that appears before the `<script>` tag that loads
- * the `angular.js` file.
- *
- * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*
- *
- * You can specify which of the CSP related Angular features should be deactivated by providing
- * a value for the `ng-csp` attribute. The options are as follows:
- *
- * * no-inline-style: this stops Angular from injecting CSS styles into the DOM
- *
- * * no-unsafe-eval: this stops Angular from optimising $parse with unsafe eval of strings
- *
- * You can use these values in the following combinations:
- *
- *
- * * No declaration means that Angular will assume that you can do inline styles, but it will do
- * a runtime check for unsafe-eval. E.g. `<body>`. This is backwardly compatible with previous versions
- * of Angular.
- *
- * * A simple `ng-csp` (or `data-ng-csp`) attribute will tell Angular to deactivate both inline
- * styles and unsafe eval. E.g. `<body ng-csp>`. This is backwardly compatible with previous versions
- * of Angular.
- *
- * * Specifying only `no-unsafe-eval` tells Angular that we must not use eval, but that we can inject
- * inline styles. E.g. `<body ng-csp="no-unsafe-eval">`.
- *
- * * Specifying only `no-inline-style` tells Angular that we must not inject styles, but that we can
- * run eval - no automcatic check for unsafe eval will occur. E.g. `<body ng-csp="no-inline-style">`
- *
- * * Specifying both `no-unsafe-eval` and `no-inline-style` tells Angular that we must not inject
- * styles nor use eval, which is the same as an empty: ng-csp.
- * E.g.`<body ng-csp="no-inline-style;no-unsafe-eval">`
- *
- * @example
- * This example shows how to apply the `ngCsp` directive to the `html` tag.
- ```html
- <!doctype html>
- <html ng-app ng-csp>
- ...
- ...
- </html>
- ```
- * @example
- // Note: the suffix `.csp` in the example name triggers
- // csp mode in our http server!
- <example name="example.csp" module="cspExample" ng-csp="true">
- <file name="index.html">
- <div ng-controller="MainController as ctrl">
- <div>
- <button ng-click="ctrl.inc()" id="inc">Increment</button>
- <span id="counter">
- {{ctrl.counter}}
- </span>
- </div>
-
- <div>
- <button ng-click="ctrl.evil()" id="evil">Evil</button>
- <span id="evilError">
- {{ctrl.evilError}}
- </span>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('cspExample', [])
- .controller('MainController', function() {
- this.counter = 0;
- this.inc = function() {
- this.counter++;
- };
- this.evil = function() {
- // jshint evil:true
- try {
- eval('1+2');
- } catch (e) {
- this.evilError = e.message;
- }
- };
- });
- </file>
- <file name="protractor.js" type="protractor">
- var util, webdriver;
-
- var incBtn = element(by.id('inc'));
- var counter = element(by.id('counter'));
- var evilBtn = element(by.id('evil'));
- var evilError = element(by.id('evilError'));
-
- function getAndClearSevereErrors() {
- return browser.manage().logs().get('browser').then(function(browserLog) {
- return browserLog.filter(function(logEntry) {
- return logEntry.level.value > webdriver.logging.Level.WARNING.value;
- });
- });
- }
-
- function clearErrors() {
- getAndClearSevereErrors();
- }
-
- function expectNoErrors() {
- getAndClearSevereErrors().then(function(filteredLog) {
- expect(filteredLog.length).toEqual(0);
- if (filteredLog.length) {
- console.log('browser console errors: ' + util.inspect(filteredLog));
- }
- });
- }
-
- function expectError(regex) {
- getAndClearSevereErrors().then(function(filteredLog) {
- var found = false;
- filteredLog.forEach(function(log) {
- if (log.message.match(regex)) {
- found = true;
- }
- });
- if (!found) {
- throw new Error('expected an error that matches ' + regex);
- }
- });
- }
-
- beforeEach(function() {
- util = require('util');
- webdriver = require('protractor/node_modules/selenium-webdriver');
- });
-
- // For now, we only test on Chrome,
- // as Safari does not load the page with Protractor's injected scripts,
- // and Firefox webdriver always disables content security policy (#6358)
- if (browser.params.browser !== 'chrome') {
- return;
- }
-
- it('should not report errors when the page is loaded', function() {
- // clear errors so we are not dependent on previous tests
- clearErrors();
- // Need to reload the page as the page is already loaded when
- // we come here
- browser.driver.getCurrentUrl().then(function(url) {
- browser.get(url);
- });
- expectNoErrors();
- });
-
- it('should evaluate expressions', function() {
- expect(counter.getText()).toEqual('0');
- incBtn.click();
- expect(counter.getText()).toEqual('1');
- expectNoErrors();
- });
-
- it('should throw and report an error when using "eval"', function() {
- evilBtn.click();
- expect(evilError.getText()).toMatch(/Content Security Policy/);
- expectError(/Content Security Policy/);
- });
- </file>
- </example>
- */
-
-// ngCsp is not implemented as a proper directive any more, because we need it be processed while we
-// bootstrap the system (before $parse is instantiated), for this reason we just have
-// the csp() fn that looks for the `ng-csp` attribute anywhere in the current doc
-
-/**
- * @ngdoc directive
- * @name ngClick
- *
- * @description
- * The ngClick directive allows you to specify custom behavior when
- * an element is clicked.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon
- * click. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-click="count = count + 1" ng-init="count=0">
- Increment
- </button>
- <span>
- count: {{count}}
- </span>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-click', function() {
- expect(element(by.binding('count')).getText()).toMatch('0');
- element(by.css('button')).click();
- expect(element(by.binding('count')).getText()).toMatch('1');
- });
- </file>
- </example>
- */
-/*
- * A collection of directives that allows creation of custom event handlers that are defined as
- * angular expressions and are compiled and executed within the current scope.
- */
-var ngEventDirectives = {};
-
-// For events that might fire synchronously during DOM manipulation
-// we need to execute their event handlers asynchronously using $evalAsync,
-// so that they are not executed in an inconsistent state.
-var forceAsyncEvents = {
- 'blur': true,
- 'focus': true
-};
-forEach(
- 'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),
- function(eventName) {
- var directiveName = directiveNormalize('ng-' + eventName);
- ngEventDirectives[directiveName] = ['$parse', '$rootScope', function($parse, $rootScope) {
- return {
- restrict: 'A',
- compile: function($element, attr) {
- // We expose the powerful $event object on the scope that provides access to the Window,
- // etc. that isn't protected by the fast paths in $parse. We explicitly request better
- // checks at the cost of speed since event handler expressions are not executed as
- // frequently as regular change detection.
- var fn = $parse(attr[directiveName], /* interceptorFn */ null, /* expensiveChecks */ true);
- return function ngEventHandler(scope, element) {
- element.on(eventName, function(event) {
- var callback = function() {
- fn(scope, {$event:event});
- };
- if (forceAsyncEvents[eventName] && $rootScope.$$phase) {
- scope.$evalAsync(callback);
- } else {
- scope.$apply(callback);
- }
- });
- };
- }
- };
- }];
- }
-);
-
-/**
- * @ngdoc directive
- * @name ngDblclick
- *
- * @description
- * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon
- * a dblclick. (The Event object is available as `$event`)
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-dblclick="count = count + 1" ng-init="count=0">
- Increment (on double click)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousedown
- *
- * @description
- * The ngMousedown directive allows you to specify custom behavior on mousedown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon
- * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousedown="count = count + 1" ng-init="count=0">
- Increment (on mouse down)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseup
- *
- * @description
- * Specify custom behavior on mouseup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon
- * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseup="count = count + 1" ng-init="count=0">
- Increment (on mouse up)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngMouseover
- *
- * @description
- * Specify custom behavior on mouseover event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon
- * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseover="count = count + 1" ng-init="count=0">
- Increment (when mouse is over)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseenter
- *
- * @description
- * Specify custom behavior on mouseenter event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon
- * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseenter="count = count + 1" ng-init="count=0">
- Increment (when mouse enters)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMouseleave
- *
- * @description
- * Specify custom behavior on mouseleave event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon
- * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mouseleave="count = count + 1" ng-init="count=0">
- Increment (when mouse leaves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngMousemove
- *
- * @description
- * Specify custom behavior on mousemove event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon
- * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <button ng-mousemove="count = count + 1" ng-init="count=0">
- Increment (when mouse moves)
- </button>
- count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeydown
- *
- * @description
- * Specify custom behavior on keydown event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon
- * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keydown="count = count + 1" ng-init="count=0">
- key down count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeyup
- *
- * @description
- * Specify custom behavior on keyup event.
- *
- * @element ANY
- * @priority 0
- * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon
- * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <p>Typing in the input box below updates the key count</p>
- <input ng-keyup="count = count + 1" ng-init="count=0"> key up count: {{count}}
-
- <p>Typing in the input box below updates the keycode</p>
- <input ng-keyup="event=$event">
- <p>event keyCode: {{ event.keyCode }}</p>
- <p>event altKey: {{ event.altKey }}</p>
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngKeypress
- *
- * @description
- * Specify custom behavior on keypress event.
- *
- * @element ANY
- * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon
- * keypress. ({@link guide/expression#-event- Event object is available as `$event`}
- * and can be interrogated for keyCode, altKey, etc.)
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-keypress="count = count + 1" ng-init="count=0">
- key press count: {{count}}
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc directive
- * @name ngSubmit
- *
- * @description
- * Enables binding angular expressions to onsubmit events.
- *
- * Additionally it prevents the default action (which for form means sending the request to the
- * server and reloading the current page), but only if the form does not contain `action`,
- * `data-action`, or `x-action` attributes.
- *
- * <div class="alert alert-warning">
- * **Warning:** Be careful not to cause "double-submission" by using both the `ngClick` and
- * `ngSubmit` handlers together. See the
- * {@link form#submitting-a-form-and-preventing-the-default-action `form` directive documentation}
- * for a detailed discussion of when `ngSubmit` may be triggered.
- * </div>
- *
- * @element form
- * @priority 0
- * @param {expression} ngSubmit {@link guide/expression Expression} to eval.
- * ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example module="submitExample">
- <file name="index.html">
- <script>
- angular.module('submitExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [];
- $scope.text = 'hello';
- $scope.submit = function() {
- if ($scope.text) {
- $scope.list.push(this.text);
- $scope.text = '';
- }
- };
- }]);
- </script>
- <form ng-submit="submit()" ng-controller="ExampleController">
- Enter text and hit enter:
- <input type="text" ng-model="text" name="text" />
- <input type="submit" id="submit" value="Submit" />
- <pre>list={{list}}</pre>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-submit', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- expect(element(by.model('text')).getAttribute('value')).toBe('');
- });
- it('should ignore empty strings', function() {
- expect(element(by.binding('list')).getText()).toBe('list=[]');
- element(by.css('#submit')).click();
- element(by.css('#submit')).click();
- expect(element(by.binding('list')).getText()).toContain('hello');
- });
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngFocus
- *
- * @description
- * Specify custom behavior on focus event.
- *
- * Note: As the `focus` event is executed synchronously when calling `input.focus()`
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon
- * focus. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngBlur
- *
- * @description
- * Specify custom behavior on blur event.
- *
- * A [blur event](https://developer.mozilla.org/en-US/docs/Web/Events/blur) fires when
- * an element has lost focus.
- *
- * Note: As the `blur` event is executed synchronously also during DOM manipulations
- * (e.g. removing a focussed input),
- * AngularJS executes the expression using `scope.$evalAsync` if the event is fired
- * during an `$apply` to ensure a consistent state.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon
- * blur. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- * See {@link ng.directive:ngClick ngClick}
- */
-
-/**
- * @ngdoc directive
- * @name ngCopy
- *
- * @description
- * Specify custom behavior on copy event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon
- * copy. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-copy="copied=true" ng-init="copied=false; value='copy me'" ng-model="value">
- copied: {{copied}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngCut
- *
- * @description
- * Specify custom behavior on cut event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon
- * cut. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-cut="cut=true" ng-init="cut=false; value='cut me'" ng-model="value">
- cut: {{cut}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngPaste
- *
- * @description
- * Specify custom behavior on paste event.
- *
- * @element window, input, select, textarea, a
- * @priority 0
- * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon
- * paste. ({@link guide/expression#-event- Event object is available as `$event`})
- *
- * @example
- <example>
- <file name="index.html">
- <input ng-paste="paste=true" ng-init="paste=false" placeholder='paste here'>
- pasted: {{paste}}
- </file>
- </example>
- */
-
-/**
- * @ngdoc directive
- * @name ngIf
- * @restrict A
- * @multiElement
- *
- * @description
- * The `ngIf` directive removes or recreates a portion of the DOM tree based on an
- * {expression}. If the expression assigned to `ngIf` evaluates to a false
- * value then the element is removed from the DOM, otherwise a clone of the
- * element is reinserted into the DOM.
- *
- * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the
- * element in the DOM rather than changing its visibility via the `display` css property. A common
- * case when this difference is significant is when using css selectors that rely on an element's
- * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.
- *
- * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope
- * is created when the element is restored. The scope created within `ngIf` inherits from
- * its parent scope using
- * [prototypal inheritance](https://github.com/angular/angular.js/wiki/Understanding-Scopes#javascript-prototypal-inheritance).
- * An important implication of this is if `ngModel` is used within `ngIf` to bind to
- * a javascript primitive defined in the parent scope. In this case any modifications made to the
- * variable within the child scope will override (hide) the value in the parent scope.
- *
- * Also, `ngIf` recreates elements using their compiled state. An example of this behavior
- * is if an element's class attribute is directly modified after it's compiled, using something like
- * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element
- * the added class will be lost because the original compiled state is used to regenerate the element.
- *
- * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`
- * and `leave` effects.
- *
- * @animations
- * enter - happens just after the `ngIf` contents change and a new DOM element is created and injected into the `ngIf` container
- * leave - happens just before the `ngIf` contents are removed from the DOM
- *
- * @element ANY
- * @scope
- * @priority 600
- * @param {expression} ngIf If the {@link guide/expression expression} is falsy then
- * the element is removed from the DOM tree. If it is truthy a copy of the compiled
- * element is added to the DOM tree.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <label>Click me: <input type="checkbox" ng-model="checked" ng-init="checked=true" /></label><br/>
- Show when checked:
- <span ng-if="checked" class="animate-if">
- This is removed when the checkbox is unchecked.
- </span>
- </file>
- <file name="animations.css">
- .animate-if {
- background:white;
- border:1px solid black;
- padding:10px;
- }
-
- .animate-if.ng-enter, .animate-if.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
- }
-
- .animate-if.ng-enter,
- .animate-if.ng-leave.ng-leave-active {
- opacity:0;
- }
-
- .animate-if.ng-leave,
- .animate-if.ng-enter.ng-enter-active {
- opacity:1;
- }
- </file>
- </example>
- */
-var ngIfDirective = ['$animate', function($animate) {
- return {
- multiElement: true,
- transclude: 'element',
- priority: 600,
- terminal: true,
- restrict: 'A',
- $$tlb: true,
- link: function($scope, $element, $attr, ctrl, $transclude) {
- var block, childScope, previousElements;
- $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {
-
- if (value) {
- if (!childScope) {
- $transclude(function(clone, newScope) {
- childScope = newScope;
- clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block = {
- clone: clone
- };
- $animate.enter(clone, $element.parent(), $element);
- });
- }
- } else {
- if (previousElements) {
- previousElements.remove();
- previousElements = null;
- }
- if (childScope) {
- childScope.$destroy();
- childScope = null;
- }
- if (block) {
- previousElements = getBlockNodes(block.clone);
- $animate.leave(previousElements).then(function() {
- previousElements = null;
- });
- block = null;
- }
- }
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngInclude
- * @restrict ECA
- *
- * @description
- * Fetches, compiles and includes an external HTML fragment.
- *
- * By default, the template URL is restricted to the same domain and protocol as the
- * application document. This is done by calling {@link $sce#getTrustedResourceUrl
- * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols
- * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or
- * {@link $sce#trustAsResourceUrl wrap them} as trusted values. Refer to Angular's {@link
- * ng.$sce Strict Contextual Escaping}.
- *
- * In addition, the browser's
- * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)
- * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)
- * policy may further restrict whether the template is successfully loaded.
- * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`
- * access on some browsers.
- *
- * @animations
- * enter - animation is used to bring new content into the browser.
- * leave - animation is used to animate existing content away.
- *
- * The enter and leave animation occur concurrently.
- *
- * @scope
- * @priority 400
- *
- * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,
- * make sure you wrap it in **single** quotes, e.g. `src="'myPartialTemplate.html'"`.
- * @param {string=} onload Expression to evaluate when a new partial is loaded.
- * <div class="alert alert-warning">
- * **Note:** When using onload on SVG elements in IE11, the browser will try to call
- * a function with the name on the window element, which will usually throw a
- * "function is undefined" error. To fix this, you can instead use `data-onload` or a
- * different form that {@link guide/directive#normalization matches} `onload`.
- * </div>
- *
- * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll
- * $anchorScroll} to scroll the viewport after the content is loaded.
- *
- * - If the attribute is not set, disable scrolling.
- * - If the attribute is set without value, enable scrolling.
- * - Otherwise enable scrolling only if the expression evaluates to truthy value.
- *
- * @example
- <example module="includeExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="template" ng-options="t.name for t in templates">
- <option value="">(blank)</option>
- </select>
- url of the template: <code>{{template.url}}</code>
- <hr/>
- <div class="slide-animate-container">
- <div class="slide-animate" ng-include="template.url"></div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('includeExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.templates =
- [ { name: 'template1.html', url: 'template1.html'},
- { name: 'template2.html', url: 'template2.html'} ];
- $scope.template = $scope.templates[0];
- }]);
- </file>
- <file name="template1.html">
- Content of template1.html
- </file>
- <file name="template2.html">
- Content of template2.html
- </file>
- <file name="animations.css">
- .slide-animate-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .slide-animate {
- padding:10px;
- }
-
- .slide-animate.ng-enter, .slide-animate.ng-leave {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- display:block;
- padding:10px;
- }
-
- .slide-animate.ng-enter {
- top:-50px;
- }
- .slide-animate.ng-enter.ng-enter-active {
- top:0;
- }
-
- .slide-animate.ng-leave {
- top:0;
- }
- .slide-animate.ng-leave.ng-leave-active {
- top:50px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var templateSelect = element(by.model('template'));
- var includeElem = element(by.css('[ng-include]'));
-
- it('should load template1.html', function() {
- expect(includeElem.getText()).toMatch(/Content of template1.html/);
- });
-
- it('should load template2.html', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- // See https://github.com/angular/protractor/issues/480
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(2).click();
- expect(includeElem.getText()).toMatch(/Content of template2.html/);
- });
-
- it('should change to blank', function() {
- if (browser.params.browser == 'firefox') {
- // Firefox can't handle using selects
- return;
- }
- templateSelect.click();
- templateSelect.all(by.css('option')).get(0).click();
- expect(includeElem.isPresent()).toBe(false);
- });
- </file>
- </example>
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentRequested
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted every time the ngInclude content is requested.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentLoaded
- * @eventType emit on the current ngInclude scope
- * @description
- * Emitted every time the ngInclude content is reloaded.
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-
-
-/**
- * @ngdoc event
- * @name ngInclude#$includeContentError
- * @eventType emit on the scope ngInclude was declared in
- * @description
- * Emitted when a template HTTP request yields an erroneous response (status < 200 || status > 299)
- *
- * @param {Object} angularEvent Synthetic event object.
- * @param {String} src URL of content to load.
- */
-var ngIncludeDirective = ['$templateRequest', '$anchorScroll', '$animate',
- function($templateRequest, $anchorScroll, $animate) {
- return {
- restrict: 'ECA',
- priority: 400,
- terminal: true,
- transclude: 'element',
- controller: angular.noop,
- compile: function(element, attr) {
- var srcExp = attr.ngInclude || attr.src,
- onloadExp = attr.onload || '',
- autoScrollExp = attr.autoscroll;
-
- return function(scope, $element, $attr, ctrl, $transclude) {
- var changeCounter = 0,
- currentScope,
- previousElement,
- currentElement;
-
- var cleanupLastIncludeContent = function() {
- if (previousElement) {
- previousElement.remove();
- previousElement = null;
- }
- if (currentScope) {
- currentScope.$destroy();
- currentScope = null;
- }
- if (currentElement) {
- $animate.leave(currentElement).then(function() {
- previousElement = null;
- });
- previousElement = currentElement;
- currentElement = null;
- }
- };
-
- scope.$watch(srcExp, function ngIncludeWatchAction(src) {
- var afterAnimation = function() {
- if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {
- $anchorScroll();
- }
- };
- var thisChangeId = ++changeCounter;
-
- if (src) {
- //set the 2nd param to true to ignore the template request error so that the inner
- //contents and scope can be cleaned up.
- $templateRequest(src, true).then(function(response) {
- if (thisChangeId !== changeCounter) return;
- var newScope = scope.$new();
- ctrl.template = response;
-
- // Note: This will also link all children of ng-include that were contained in the original
- // html. If that content contains controllers, ... they could pollute/change the scope.
- // However, using ng-include on an element with additional content does not make sense...
- // Note: We can't remove them in the cloneAttchFn of $transclude as that
- // function is called before linking the content, which would apply child
- // directives to non existing elements.
- var clone = $transclude(newScope, function(clone) {
- cleanupLastIncludeContent();
- $animate.enter(clone, null, $element).then(afterAnimation);
- });
-
- currentScope = newScope;
- currentElement = clone;
-
- currentScope.$emit('$includeContentLoaded', src);
- scope.$eval(onloadExp);
- }, function() {
- if (thisChangeId === changeCounter) {
- cleanupLastIncludeContent();
- scope.$emit('$includeContentError', src);
- }
- });
- scope.$emit('$includeContentRequested', src);
- } else {
- cleanupLastIncludeContent();
- ctrl.template = null;
- }
- });
- };
- }
- };
-}];
-
-// This directive is called during the $transclude call of the first `ngInclude` directive.
-// It will replace and compile the content of the element with the loaded template.
-// We need this directive so that the element content is already filled when
-// the link function of another directive on the same element as ngInclude
-// is called.
-var ngIncludeFillContentDirective = ['$compile',
- function($compile) {
- return {
- restrict: 'ECA',
- priority: -400,
- require: 'ngInclude',
- link: function(scope, $element, $attr, ctrl) {
- if (/SVG/.test($element[0].toString())) {
- // WebKit: https://bugs.webkit.org/show_bug.cgi?id=135698 --- SVG elements do not
- // support innerHTML, so detect this here and try to generate the contents
- // specially.
- $element.empty();
- $compile(jqLiteBuildFragment(ctrl.template, document).childNodes)(scope,
- function namespaceAdaptedClone(clone) {
- $element.append(clone);
- }, {futureParentElement: $element});
- return;
- }
-
- $element.html(ctrl.template);
- $compile($element.contents())(scope);
- }
- };
- }];
-
-/**
- * @ngdoc directive
- * @name ngInit
- * @restrict AC
- *
- * @description
- * The `ngInit` directive allows you to evaluate an expression in the
- * current scope.
- *
- * <div class="alert alert-danger">
- * This directive can be abused to add unnecessary amounts of logic into your templates.
- * There are only a few appropriate uses of `ngInit`, such as for aliasing special properties of
- * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below; and for injecting data via
- * server side scripting. Besides these few cases, you should use {@link guide/controller controllers}
- * rather than `ngInit` to initialize values on a scope.
- * </div>
- *
- * <div class="alert alert-warning">
- * **Note**: If you have assignment in `ngInit` along with a {@link ng.$filter `filter`}, make
- * sure you have parentheses to ensure correct operator precedence:
- * <pre class="prettyprint">
- * `<div ng-init="test1 = ($index | toString)"></div>`
- * </pre>
- * </div>
- *
- * @priority 450
- *
- * @element ANY
- * @param {expression} ngInit {@link guide/expression Expression} to eval.
- *
- * @example
- <example module="initExample">
- <file name="index.html">
- <script>
- angular.module('initExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.list = [['a', 'b'], ['c', 'd']];
- }]);
- </script>
- <div ng-controller="ExampleController">
- <div ng-repeat="innerList in list" ng-init="outerIndex = $index">
- <div ng-repeat="value in innerList" ng-init="innerIndex = $index">
- <span class="example-init">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>
- </div>
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should alias index positions', function() {
- var elements = element.all(by.css('.example-init'));
- expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');
- expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');
- expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');
- expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');
- });
- </file>
- </example>
- */
-var ngInitDirective = ngDirective({
- priority: 450,
- compile: function() {
- return {
- pre: function(scope, element, attrs) {
- scope.$eval(attrs.ngInit);
- }
- };
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngList
- *
- * @description
- * Text input that converts between a delimited string and an array of strings. The default
- * delimiter is a comma followed by a space - equivalent to `ng-list=", "`. You can specify a custom
- * delimiter as the value of the `ngList` attribute - for example, `ng-list=" | "`.
- *
- * The behaviour of the directive is affected by the use of the `ngTrim` attribute.
- * * If `ngTrim` is set to `"false"` then whitespace around both the separator and each
- * list item is respected. This implies that the user of the directive is responsible for
- * dealing with whitespace but also allows you to use whitespace as a delimiter, such as a
- * tab or newline character.
- * * Otherwise whitespace around the delimiter is ignored when splitting (although it is respected
- * when joining the list items back together) and whitespace around each list item is stripped
- * before it is added to the model.
- *
- * ### Example with Validation
- *
- * <example name="ngList-directive" module="listExample">
- * <file name="app.js">
- * angular.module('listExample', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.names = ['morpheus', 'neo', 'trinity'];
- * }]);
- * </file>
- * <file name="index.html">
- * <form name="myForm" ng-controller="ExampleController">
- * <label>List: <input name="namesInput" ng-model="names" ng-list required></label>
- * <span role="alert">
- * <span class="error" ng-show="myForm.namesInput.$error.required">
- * Required!</span>
- * </span>
- * <br>
- * <tt>names = {{names}}</tt><br/>
- * <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>
- * <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>
- * <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>
- * <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>
- * </form>
- * </file>
- * <file name="protractor.js" type="protractor">
- * var listInput = element(by.model('names'));
- * var names = element(by.exactBinding('names'));
- * var valid = element(by.binding('myForm.namesInput.$valid'));
- * var error = element(by.css('span.error'));
- *
- * it('should initialize to model', function() {
- * expect(names.getText()).toContain('["morpheus","neo","trinity"]');
- * expect(valid.getText()).toContain('true');
- * expect(error.getCssValue('display')).toBe('none');
- * });
- *
- * it('should be invalid if empty', function() {
- * listInput.clear();
- * listInput.sendKeys('');
- *
- * expect(names.getText()).toContain('');
- * expect(valid.getText()).toContain('false');
- * expect(error.getCssValue('display')).not.toBe('none');
- * });
- * </file>
- * </example>
- *
- * ### Example - splitting on newline
- * <example name="ngList-directive-newlines">
- * <file name="index.html">
- * <textarea ng-model="list" ng-list="&#10;" ng-trim="false"></textarea>
- * <pre>{{ list | json }}</pre>
- * </file>
- * <file name="protractor.js" type="protractor">
- * it("should split the text by newlines", function() {
- * var listInput = element(by.model('list'));
- * var output = element(by.binding('list | json'));
- * listInput.sendKeys('abc\ndef\nghi');
- * expect(output.getText()).toContain('[\n "abc",\n "def",\n "ghi"\n]');
- * });
- * </file>
- * </example>
- *
- * @element input
- * @param {string=} ngList optional delimiter that should be used to split the value.
- */
-var ngListDirective = function() {
- return {
- restrict: 'A',
- priority: 100,
- require: 'ngModel',
- link: function(scope, element, attr, ctrl) {
- // We want to control whitespace trimming so we use this convoluted approach
- // to access the ngList attribute, which doesn't pre-trim the attribute
- var ngList = element.attr(attr.$attr.ngList) || ', ';
- var trimValues = attr.ngTrim !== 'false';
- var separator = trimValues ? trim(ngList) : ngList;
-
- var parse = function(viewValue) {
- // If the viewValue is invalid (say required but empty) it will be `undefined`
- if (isUndefined(viewValue)) return;
-
- var list = [];
-
- if (viewValue) {
- forEach(viewValue.split(separator), function(value) {
- if (value) list.push(trimValues ? trim(value) : value);
- });
- }
-
- return list;
- };
-
- ctrl.$parsers.push(parse);
- ctrl.$formatters.push(function(value) {
- if (isArray(value)) {
- return value.join(ngList);
- }
-
- return undefined;
- });
-
- // Override the standard $isEmpty because an empty array means the input is empty.
- ctrl.$isEmpty = function(value) {
- return !value || !value.length;
- };
- }
- };
-};
-
-/* global VALID_CLASS: true,
- INVALID_CLASS: true,
- PRISTINE_CLASS: true,
- DIRTY_CLASS: true,
- UNTOUCHED_CLASS: true,
- TOUCHED_CLASS: true,
-*/
-
-var VALID_CLASS = 'ng-valid',
- INVALID_CLASS = 'ng-invalid',
- PRISTINE_CLASS = 'ng-pristine',
- DIRTY_CLASS = 'ng-dirty',
- UNTOUCHED_CLASS = 'ng-untouched',
- TOUCHED_CLASS = 'ng-touched',
- PENDING_CLASS = 'ng-pending',
- EMPTY_CLASS = 'ng-empty',
- NOT_EMPTY_CLASS = 'ng-not-empty';
-
-var ngModelMinErr = minErr('ngModel');
-
-/**
- * @ngdoc type
- * @name ngModel.NgModelController
- *
- * @property {*} $viewValue The actual value from the control's view. For `input` elements, this is a
- * String. See {@link ngModel.NgModelController#$setViewValue} for information about when the $viewValue
- * is set.
- * @property {*} $modelValue The value in the model that the control is bound to.
- * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever
- the control reads value from the DOM. The functions are called in array order, each passing
- its return value through to the next. The last return value is forwarded to the
- {@link ngModel.NgModelController#$validators `$validators`} collection.
-
-Parsers are used to sanitize / convert the {@link ngModel.NgModelController#$viewValue
-`$viewValue`}.
-
-Returning `undefined` from a parser means a parse error occurred. In that case,
-no {@link ngModel.NgModelController#$validators `$validators`} will run and the `ngModel`
-will be set to `undefined` unless {@link ngModelOptions `ngModelOptions.allowInvalid`}
-is set to `true`. The parse error is stored in `ngModel.$error.parse`.
-
- *
- * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever
- the model value changes. The functions are called in reverse array order, each passing the value through to the
- next. The last return value is used as the actual DOM value.
- Used to format / convert values for display in the control.
- * ```js
- * function formatter(value) {
- * if (value) {
- * return value.toUpperCase();
- * }
- * }
- * ngModel.$formatters.push(formatter);
- * ```
- *
- * @property {Object.<string, function>} $validators A collection of validators that are applied
- * whenever the model value changes. The key value within the object refers to the name of the
- * validator while the function refers to the validation operation. The validation operation is
- * provided with the model value as an argument and must return a true or false value depending
- * on the response of that validation.
- *
- * ```js
- * ngModel.$validators.validCharacters = function(modelValue, viewValue) {
- * var value = modelValue || viewValue;
- * return /[0-9]+/.test(value) &&
- * /[a-z]+/.test(value) &&
- * /[A-Z]+/.test(value) &&
- * /\W+/.test(value);
- * };
- * ```
- *
- * @property {Object.<string, function>} $asyncValidators A collection of validations that are expected to
- * perform an asynchronous validation (e.g. a HTTP request). The validation function that is provided
- * is expected to return a promise when it is run during the model validation process. Once the promise
- * is delivered then the validation status will be set to true when fulfilled and false when rejected.
- * When the asynchronous validators are triggered, each of the validators will run in parallel and the model
- * value will only be updated once all validators have been fulfilled. As long as an asynchronous validator
- * is unfulfilled, its key will be added to the controllers `$pending` property. Also, all asynchronous validators
- * will only run once all synchronous validators have passed.
- *
- * Please note that if $http is used then it is important that the server returns a success HTTP response code
- * in order to fulfill the validation and a status level of `4xx` in order to reject the validation.
- *
- * ```js
- * ngModel.$asyncValidators.uniqueUsername = function(modelValue, viewValue) {
- * var value = modelValue || viewValue;
- *
- * // Lookup user by username
- * return $http.get('/api/users/' + value).
- * then(function resolved() {
- * //username exists, this means validation fails
- * return $q.reject('exists');
- * }, function rejected() {
- * //username does not exist, therefore this validation passes
- * return true;
- * });
- * };
- * ```
- *
- * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the
- * view value has changed. It is called with no arguments, and its return value is ignored.
- * This can be used in place of additional $watches against the model value.
- *
- * @property {Object} $error An object hash with all failing validator ids as keys.
- * @property {Object} $pending An object hash with all pending validator ids as keys.
- *
- * @property {boolean} $untouched True if control has not lost focus yet.
- * @property {boolean} $touched True if control has lost focus.
- * @property {boolean} $pristine True if user has not interacted with the control yet.
- * @property {boolean} $dirty True if user has already interacted with the control.
- * @property {boolean} $valid True if there is no error.
- * @property {boolean} $invalid True if at least one error on the control.
- * @property {string} $name The name attribute of the control.
- *
- * @description
- *
- * `NgModelController` provides API for the {@link ngModel `ngModel`} directive.
- * The controller contains services for data-binding, validation, CSS updates, and value formatting
- * and parsing. It purposefully does not contain any logic which deals with DOM rendering or
- * listening to DOM events.
- * Such DOM related logic should be provided by other directives which make use of
- * `NgModelController` for data-binding to control elements.
- * Angular provides this DOM logic for most {@link input `input`} elements.
- * At the end of this page you can find a {@link ngModel.NgModelController#custom-control-example
- * custom control example} that uses `ngModelController` to bind to `contenteditable` elements.
- *
- * @example
- * ### Custom Control Example
- * This example shows how to use `NgModelController` with a custom control to achieve
- * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)
- * collaborate together to achieve the desired result.
- *
- * `contenteditable` is an HTML5 attribute, which tells the browser to let the element
- * contents be edited in place by the user.
- *
- * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}
- * module to automatically remove "bad" content like inline event listener (e.g. `<span onclick="...">`).
- * However, as we are using `$sce` the model can still decide to provide unsafe content if it marks
- * that content using the `$sce` service.
- *
- * <example name="NgModelController" module="customControl" deps="angular-sanitize.js">
- <file name="style.css">
- [contenteditable] {
- border: 1px solid black;
- background-color: white;
- min-height: 20px;
- }
-
- .ng-invalid {
- border: 1px solid red;
- }
-
- </file>
- <file name="script.js">
- angular.module('customControl', ['ngSanitize']).
- directive('contenteditable', ['$sce', function($sce) {
- return {
- restrict: 'A', // only activate on element attribute
- require: '?ngModel', // get a hold of NgModelController
- link: function(scope, element, attrs, ngModel) {
- if (!ngModel) return; // do nothing if no ng-model
-
- // Specify how UI should be updated
- ngModel.$render = function() {
- element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));
- };
-
- // Listen for change events to enable binding
- element.on('blur keyup change', function() {
- scope.$evalAsync(read);
- });
- read(); // initialize
-
- // Write data to the model
- function read() {
- var html = element.html();
- // When we clear the content editable the browser leaves a <br> behind
- // If strip-br attribute is provided then we strip this out
- if ( attrs.stripBr && html == '<br>' ) {
- html = '';
- }
- ngModel.$setViewValue(html);
- }
- }
- };
- }]);
- </file>
- <file name="index.html">
- <form name="myForm">
- <div contenteditable
- name="myWidget" ng-model="userContent"
- strip-br="true"
- required>Change me!</div>
- <span ng-show="myForm.myWidget.$error.required">Required!</span>
- <hr>
- <textarea ng-model="userContent" aria-label="Dynamic textarea"></textarea>
- </form>
- </file>
- <file name="protractor.js" type="protractor">
- it('should data-bind and become invalid', function() {
- if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {
- // SafariDriver can't handle contenteditable
- // and Firefox driver can't clear contenteditables very well
- return;
- }
- var contentEditable = element(by.css('[contenteditable]'));
- var content = 'Change me!';
-
- expect(contentEditable.getText()).toEqual(content);
-
- contentEditable.clear();
- contentEditable.sendKeys(protractor.Key.BACK_SPACE);
- expect(contentEditable.getText()).toEqual('');
- expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);
- });
- </file>
- * </example>
- *
- *
- */
-var NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate', '$timeout', '$rootScope', '$q', '$interpolate',
- function($scope, $exceptionHandler, $attr, $element, $parse, $animate, $timeout, $rootScope, $q, $interpolate) {
- this.$viewValue = Number.NaN;
- this.$modelValue = Number.NaN;
- this.$$rawModelValue = undefined; // stores the parsed modelValue / model set from scope regardless of validity.
- this.$validators = {};
- this.$asyncValidators = {};
- this.$parsers = [];
- this.$formatters = [];
- this.$viewChangeListeners = [];
- this.$untouched = true;
- this.$touched = false;
- this.$pristine = true;
- this.$dirty = false;
- this.$valid = true;
- this.$invalid = false;
- this.$error = {}; // keep invalid keys here
- this.$$success = {}; // keep valid keys here
- this.$pending = undefined; // keep pending keys here
- this.$name = $interpolate($attr.name || '', false)($scope);
- this.$$parentForm = nullFormCtrl;
-
- var parsedNgModel = $parse($attr.ngModel),
- parsedNgModelAssign = parsedNgModel.assign,
- ngModelGet = parsedNgModel,
- ngModelSet = parsedNgModelAssign,
- pendingDebounce = null,
- parserValid,
- ctrl = this;
-
- this.$$setOptions = function(options) {
- ctrl.$options = options;
- if (options && options.getterSetter) {
- var invokeModelGetter = $parse($attr.ngModel + '()'),
- invokeModelSetter = $parse($attr.ngModel + '($$$p)');
-
- ngModelGet = function($scope) {
- var modelValue = parsedNgModel($scope);
- if (isFunction(modelValue)) {
- modelValue = invokeModelGetter($scope);
- }
- return modelValue;
- };
- ngModelSet = function($scope, newValue) {
- if (isFunction(parsedNgModel($scope))) {
- invokeModelSetter($scope, {$$$p: ctrl.$modelValue});
- } else {
- parsedNgModelAssign($scope, ctrl.$modelValue);
- }
- };
- } else if (!parsedNgModel.assign) {
- throw ngModelMinErr('nonassign', "Expression '{0}' is non-assignable. Element: {1}",
- $attr.ngModel, startingTag($element));
- }
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$render
- *
- * @description
- * Called when the view needs to be updated. It is expected that the user of the ng-model
- * directive will implement this method.
- *
- * The `$render()` method is invoked in the following situations:
- *
- * * `$rollbackViewValue()` is called. If we are rolling back the view value to the last
- * committed value then `$render()` is called to update the input control.
- * * The value referenced by `ng-model` is changed programmatically and both the `$modelValue` and
- * the `$viewValue` are different from last time.
- *
- * Since `ng-model` does not do a deep watch, `$render()` is only invoked if the values of
- * `$modelValue` and `$viewValue` are actually different from their previous value. If `$modelValue`
- * or `$viewValue` are objects (rather than a string or number) then `$render()` will not be
- * invoked if you only change a property on the objects.
- */
- this.$render = noop;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$isEmpty
- *
- * @description
- * This is called when we need to determine if the value of an input is empty.
- *
- * For instance, the required directive does this to work out if the input has data or not.
- *
- * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.
- *
- * You can override this for input directives whose concept of being empty is different from the
- * default. The `checkboxInputType` directive does this because in its case a value of `false`
- * implies empty.
- *
- * @param {*} value The value of the input to check for emptiness.
- * @returns {boolean} True if `value` is "empty".
- */
- this.$isEmpty = function(value) {
- return isUndefined(value) || value === '' || value === null || value !== value;
- };
-
- this.$$updateEmptyClasses = function(value) {
- if (ctrl.$isEmpty(value)) {
- $animate.removeClass($element, NOT_EMPTY_CLASS);
- $animate.addClass($element, EMPTY_CLASS);
- } else {
- $animate.removeClass($element, EMPTY_CLASS);
- $animate.addClass($element, NOT_EMPTY_CLASS);
- }
- };
-
-
- var currentValidationRunId = 0;
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setValidity
- *
- * @description
- * Change the validity state, and notify the form.
- *
- * This method can be called within $parsers/$formatters or a custom validation implementation.
- * However, in most cases it should be sufficient to use the `ngModel.$validators` and
- * `ngModel.$asyncValidators` collections which will call `$setValidity` automatically.
- *
- * @param {string} validationErrorKey Name of the validator. The `validationErrorKey` will be assigned
- * to either `$error[validationErrorKey]` or `$pending[validationErrorKey]`
- * (for unfulfilled `$asyncValidators`), so that it is available for data-binding.
- * The `validationErrorKey` should be in camelCase and will get converted into dash-case
- * for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`
- * class and can be bound to as `{{someForm.someControl.$error.myError}}` .
- * @param {boolean} isValid Whether the current state is valid (true), invalid (false), pending (undefined),
- * or skipped (null). Pending is used for unfulfilled `$asyncValidators`.
- * Skipped is used by Angular when validators do not run because of parse errors and
- * when `$asyncValidators` do not run because any of the `$validators` failed.
- */
- addSetValidityMethod({
- ctrl: this,
- $element: $element,
- set: function(object, property) {
- object[property] = true;
- },
- unset: function(object, property) {
- delete object[property];
- },
- $animate: $animate
- });
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setPristine
- *
- * @description
- * Sets the control to its pristine state.
- *
- * This method can be called to remove the `ng-dirty` class and set the control to its pristine
- * state (`ng-pristine` class). A model is considered to be pristine when the control
- * has not been changed from when first compiled.
- */
- this.$setPristine = function() {
- ctrl.$dirty = false;
- ctrl.$pristine = true;
- $animate.removeClass($element, DIRTY_CLASS);
- $animate.addClass($element, PRISTINE_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setDirty
- *
- * @description
- * Sets the control to its dirty state.
- *
- * This method can be called to remove the `ng-pristine` class and set the control to its dirty
- * state (`ng-dirty` class). A model is considered to be dirty when the control has been changed
- * from when first compiled.
- */
- this.$setDirty = function() {
- ctrl.$dirty = true;
- ctrl.$pristine = false;
- $animate.removeClass($element, PRISTINE_CLASS);
- $animate.addClass($element, DIRTY_CLASS);
- ctrl.$$parentForm.$setDirty();
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setUntouched
- *
- * @description
- * Sets the control to its untouched state.
- *
- * This method can be called to remove the `ng-touched` class and set the control to its
- * untouched state (`ng-untouched` class). Upon compilation, a model is set as untouched
- * by default, however this function can be used to restore that state if the model has
- * already been touched by the user.
- */
- this.$setUntouched = function() {
- ctrl.$touched = false;
- ctrl.$untouched = true;
- $animate.setClass($element, UNTOUCHED_CLASS, TOUCHED_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setTouched
- *
- * @description
- * Sets the control to its touched state.
- *
- * This method can be called to remove the `ng-untouched` class and set the control to its
- * touched state (`ng-touched` class). A model is considered to be touched when the user has
- * first focused the control element and then shifted focus away from the control (blur event).
- */
- this.$setTouched = function() {
- ctrl.$touched = true;
- ctrl.$untouched = false;
- $animate.setClass($element, TOUCHED_CLASS, UNTOUCHED_CLASS);
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$rollbackViewValue
- *
- * @description
- * Cancel an update and reset the input element's value to prevent an update to the `$modelValue`,
- * which may be caused by a pending debounced event or because the input is waiting for a some
- * future event.
- *
- * If you have an input that uses `ng-model-options` to set up debounced events or events such
- * as blur you can have a situation where there is a period when the `$viewValue`
- * is out of synch with the ngModel's `$modelValue`.
- *
- * In this case, you can run into difficulties if you try to update the ngModel's `$modelValue`
- * programmatically before these debounced/future events have resolved/occurred, because Angular's
- * dirty checking mechanism is not able to tell whether the model has actually changed or not.
- *
- * The `$rollbackViewValue()` method should be called before programmatically changing the model of an
- * input which may have such events pending. This is important in order to make sure that the
- * input field will be updated with the new model value and any pending operations are cancelled.
- *
- * <example name="ng-model-cancel-update" module="cancel-update-example">
- * <file name="app.js">
- * angular.module('cancel-update-example', [])
- *
- * .controller('CancelUpdateController', ['$scope', function($scope) {
- * $scope.resetWithCancel = function(e) {
- * if (e.keyCode == 27) {
- * $scope.myForm.myInput1.$rollbackViewValue();
- * $scope.myValue = '';
- * }
- * };
- * $scope.resetWithoutCancel = function(e) {
- * if (e.keyCode == 27) {
- * $scope.myValue = '';
- * }
- * };
- * }]);
- * </file>
- * <file name="index.html">
- * <div ng-controller="CancelUpdateController">
- * <p>Try typing something in each input. See that the model only updates when you
- * blur off the input.
- * </p>
- * <p>Now see what happens if you start typing then press the Escape key</p>
- *
- * <form name="myForm" ng-model-options="{ updateOn: 'blur' }">
- * <p id="inputDescription1">With $rollbackViewValue()</p>
- * <input name="myInput1" aria-describedby="inputDescription1" ng-model="myValue"
- * ng-keydown="resetWithCancel($event)"><br/>
- * myValue: "{{ myValue }}"
- *
- * <p id="inputDescription2">Without $rollbackViewValue()</p>
- * <input name="myInput2" aria-describedby="inputDescription2" ng-model="myValue"
- * ng-keydown="resetWithoutCancel($event)"><br/>
- * myValue: "{{ myValue }}"
- * </form>
- * </div>
- * </file>
- * </example>
- */
- this.$rollbackViewValue = function() {
- $timeout.cancel(pendingDebounce);
- ctrl.$viewValue = ctrl.$$lastCommittedViewValue;
- ctrl.$render();
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$validate
- *
- * @description
- * Runs each of the registered validators (first synchronous validators and then
- * asynchronous validators).
- * If the validity changes to invalid, the model will be set to `undefined`,
- * unless {@link ngModelOptions `ngModelOptions.allowInvalid`} is `true`.
- * If the validity changes to valid, it will set the model to the last available valid
- * `$modelValue`, i.e. either the last parsed value or the last value set from the scope.
- */
- this.$validate = function() {
- // ignore $validate before model is initialized
- if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {
- return;
- }
-
- var viewValue = ctrl.$$lastCommittedViewValue;
- // Note: we use the $$rawModelValue as $modelValue might have been
- // set to undefined during a view -> model update that found validation
- // errors. We can't parse the view here, since that could change
- // the model although neither viewValue nor the model on the scope changed
- var modelValue = ctrl.$$rawModelValue;
-
- var prevValid = ctrl.$valid;
- var prevModelValue = ctrl.$modelValue;
-
- var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
-
- ctrl.$$runValidators(modelValue, viewValue, function(allValid) {
- // If there was no change in validity, don't update the model
- // This prevents changing an invalid modelValue to undefined
- if (!allowInvalid && prevValid !== allValid) {
- // Note: Don't check ctrl.$valid here, as we could have
- // external validators (e.g. calculated on the server),
- // that just call $setValidity and need the model value
- // to calculate their validity.
- ctrl.$modelValue = allValid ? modelValue : undefined;
-
- if (ctrl.$modelValue !== prevModelValue) {
- ctrl.$$writeModelToScope();
- }
- }
- });
-
- };
-
- this.$$runValidators = function(modelValue, viewValue, doneCallback) {
- currentValidationRunId++;
- var localValidationRunId = currentValidationRunId;
-
- // check parser error
- if (!processParseErrors()) {
- validationDone(false);
- return;
- }
- if (!processSyncValidators()) {
- validationDone(false);
- return;
- }
- processAsyncValidators();
-
- function processParseErrors() {
- var errorKey = ctrl.$$parserName || 'parse';
- if (isUndefined(parserValid)) {
- setValidity(errorKey, null);
- } else {
- if (!parserValid) {
- forEach(ctrl.$validators, function(v, name) {
- setValidity(name, null);
- });
- forEach(ctrl.$asyncValidators, function(v, name) {
- setValidity(name, null);
- });
- }
- // Set the parse error last, to prevent unsetting it, should a $validators key == parserName
- setValidity(errorKey, parserValid);
- return parserValid;
- }
- return true;
- }
-
- function processSyncValidators() {
- var syncValidatorsValid = true;
- forEach(ctrl.$validators, function(validator, name) {
- var result = validator(modelValue, viewValue);
- syncValidatorsValid = syncValidatorsValid && result;
- setValidity(name, result);
- });
- if (!syncValidatorsValid) {
- forEach(ctrl.$asyncValidators, function(v, name) {
- setValidity(name, null);
- });
- return false;
- }
- return true;
- }
-
- function processAsyncValidators() {
- var validatorPromises = [];
- var allValid = true;
- forEach(ctrl.$asyncValidators, function(validator, name) {
- var promise = validator(modelValue, viewValue);
- if (!isPromiseLike(promise)) {
- throw ngModelMinErr("$asyncValidators",
- "Expected asynchronous validator to return a promise but got '{0}' instead.", promise);
- }
- setValidity(name, undefined);
- validatorPromises.push(promise.then(function() {
- setValidity(name, true);
- }, function(error) {
- allValid = false;
- setValidity(name, false);
- }));
- });
- if (!validatorPromises.length) {
- validationDone(true);
- } else {
- $q.all(validatorPromises).then(function() {
- validationDone(allValid);
- }, noop);
- }
- }
-
- function setValidity(name, isValid) {
- if (localValidationRunId === currentValidationRunId) {
- ctrl.$setValidity(name, isValid);
- }
- }
-
- function validationDone(allValid) {
- if (localValidationRunId === currentValidationRunId) {
-
- doneCallback(allValid);
- }
- }
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$commitViewValue
- *
- * @description
- * Commit a pending update to the `$modelValue`.
- *
- * Updates may be pending by a debounced event or because the input is waiting for a some future
- * event defined in `ng-model-options`. this method is rarely needed as `NgModelController`
- * usually handles calling this in response to input events.
- */
- this.$commitViewValue = function() {
- var viewValue = ctrl.$viewValue;
-
- $timeout.cancel(pendingDebounce);
-
- // If the view value has not changed then we should just exit, except in the case where there is
- // a native validator on the element. In this case the validation state may have changed even though
- // the viewValue has stayed empty.
- if (ctrl.$$lastCommittedViewValue === viewValue && (viewValue !== '' || !ctrl.$$hasNativeValidators)) {
- return;
- }
- ctrl.$$updateEmptyClasses(viewValue);
- ctrl.$$lastCommittedViewValue = viewValue;
-
- // change to dirty
- if (ctrl.$pristine) {
- this.$setDirty();
- }
- this.$$parseAndValidate();
- };
-
- this.$$parseAndValidate = function() {
- var viewValue = ctrl.$$lastCommittedViewValue;
- var modelValue = viewValue;
- parserValid = isUndefined(modelValue) ? undefined : true;
-
- if (parserValid) {
- for (var i = 0; i < ctrl.$parsers.length; i++) {
- modelValue = ctrl.$parsers[i](modelValue);
- if (isUndefined(modelValue)) {
- parserValid = false;
- break;
- }
- }
- }
- if (isNumber(ctrl.$modelValue) && isNaN(ctrl.$modelValue)) {
- // ctrl.$modelValue has not been touched yet...
- ctrl.$modelValue = ngModelGet($scope);
- }
- var prevModelValue = ctrl.$modelValue;
- var allowInvalid = ctrl.$options && ctrl.$options.allowInvalid;
- ctrl.$$rawModelValue = modelValue;
-
- if (allowInvalid) {
- ctrl.$modelValue = modelValue;
- writeToModelIfNeeded();
- }
-
- // Pass the $$lastCommittedViewValue here, because the cached viewValue might be out of date.
- // This can happen if e.g. $setViewValue is called from inside a parser
- ctrl.$$runValidators(modelValue, ctrl.$$lastCommittedViewValue, function(allValid) {
- if (!allowInvalid) {
- // Note: Don't check ctrl.$valid here, as we could have
- // external validators (e.g. calculated on the server),
- // that just call $setValidity and need the model value
- // to calculate their validity.
- ctrl.$modelValue = allValid ? modelValue : undefined;
- writeToModelIfNeeded();
- }
- });
-
- function writeToModelIfNeeded() {
- if (ctrl.$modelValue !== prevModelValue) {
- ctrl.$$writeModelToScope();
- }
- }
- };
-
- this.$$writeModelToScope = function() {
- ngModelSet($scope, ctrl.$modelValue);
- forEach(ctrl.$viewChangeListeners, function(listener) {
- try {
- listener();
- } catch (e) {
- $exceptionHandler(e);
- }
- });
- };
-
- /**
- * @ngdoc method
- * @name ngModel.NgModelController#$setViewValue
- *
- * @description
- * Update the view value.
- *
- * This method should be called when a control wants to change the view value; typically,
- * this is done from within a DOM event handler. For example, the {@link ng.directive:input input}
- * directive calls it when the value of the input changes and {@link ng.directive:select select}
- * calls it when an option is selected.
- *
- * When `$setViewValue` is called, the new `value` will be staged for committing through the `$parsers`
- * and `$validators` pipelines. If there are no special {@link ngModelOptions} specified then the staged
- * value sent directly for processing, finally to be applied to `$modelValue` and then the
- * **expression** specified in the `ng-model` attribute. Lastly, all the registered change listeners,
- * in the `$viewChangeListeners` list, are called.
- *
- * In case the {@link ng.directive:ngModelOptions ngModelOptions} directive is used with `updateOn`
- * and the `default` trigger is not listed, all those actions will remain pending until one of the
- * `updateOn` events is triggered on the DOM element.
- * All these actions will be debounced if the {@link ng.directive:ngModelOptions ngModelOptions}
- * directive is used with a custom debounce for this particular event.
- * Note that a `$digest` is only triggered once the `updateOn` events are fired, or if `debounce`
- * is specified, once the timer runs out.
- *
- * When used with standard inputs, the view value will always be a string (which is in some cases
- * parsed into another type, such as a `Date` object for `input[date]`.)
- * However, custom controls might also pass objects to this method. In this case, we should make
- * a copy of the object before passing it to `$setViewValue`. This is because `ngModel` does not
- * perform a deep watch of objects, it only looks for a change of identity. If you only change
- * the property of the object then ngModel will not realise that the object has changed and
- * will not invoke the `$parsers` and `$validators` pipelines. For this reason, you should
- * not change properties of the copy once it has been passed to `$setViewValue`.
- * Otherwise you may cause the model value on the scope to change incorrectly.
- *
- * <div class="alert alert-info">
- * In any case, the value passed to the method should always reflect the current value
- * of the control. For example, if you are calling `$setViewValue` for an input element,
- * you should pass the input DOM value. Otherwise, the control and the scope model become
- * out of sync. It's also important to note that `$setViewValue` does not call `$render` or change
- * the control's DOM value in any way. If we want to change the control's DOM value
- * programmatically, we should update the `ngModel` scope expression. Its new value will be
- * picked up by the model controller, which will run it through the `$formatters`, `$render` it
- * to update the DOM, and finally call `$validate` on it.
- * </div>
- *
- * @param {*} value value from the view.
- * @param {string} trigger Event that triggered the update.
- */
- this.$setViewValue = function(value, trigger) {
- ctrl.$viewValue = value;
- if (!ctrl.$options || ctrl.$options.updateOnDefault) {
- ctrl.$$debounceViewValueCommit(trigger);
- }
- };
-
- this.$$debounceViewValueCommit = function(trigger) {
- var debounceDelay = 0,
- options = ctrl.$options,
- debounce;
-
- if (options && isDefined(options.debounce)) {
- debounce = options.debounce;
- if (isNumber(debounce)) {
- debounceDelay = debounce;
- } else if (isNumber(debounce[trigger])) {
- debounceDelay = debounce[trigger];
- } else if (isNumber(debounce['default'])) {
- debounceDelay = debounce['default'];
- }
- }
-
- $timeout.cancel(pendingDebounce);
- if (debounceDelay) {
- pendingDebounce = $timeout(function() {
- ctrl.$commitViewValue();
- }, debounceDelay);
- } else if ($rootScope.$$phase) {
- ctrl.$commitViewValue();
- } else {
- $scope.$apply(function() {
- ctrl.$commitViewValue();
- });
- }
- };
-
- // model -> value
- // Note: we cannot use a normal scope.$watch as we want to detect the following:
- // 1. scope value is 'a'
- // 2. user enters 'b'
- // 3. ng-change kicks in and reverts scope value to 'a'
- // -> scope value did not change since the last digest as
- // ng-change executes in apply phase
- // 4. view should be changed back to 'a'
- $scope.$watch(function ngModelWatch() {
- var modelValue = ngModelGet($scope);
-
- // if scope model value and ngModel value are out of sync
- // TODO(perf): why not move this to the action fn?
- if (modelValue !== ctrl.$modelValue &&
- // checks for NaN is needed to allow setting the model to NaN when there's an asyncValidator
- (ctrl.$modelValue === ctrl.$modelValue || modelValue === modelValue)
- ) {
- ctrl.$modelValue = ctrl.$$rawModelValue = modelValue;
- parserValid = undefined;
-
- var formatters = ctrl.$formatters,
- idx = formatters.length;
-
- var viewValue = modelValue;
- while (idx--) {
- viewValue = formatters[idx](viewValue);
- }
- if (ctrl.$viewValue !== viewValue) {
- ctrl.$$updateEmptyClasses(viewValue);
- ctrl.$viewValue = ctrl.$$lastCommittedViewValue = viewValue;
- ctrl.$render();
-
- ctrl.$$runValidators(modelValue, viewValue, noop);
- }
- }
-
- return modelValue;
- });
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngModel
- *
- * @element input
- * @priority 1
- *
- * @description
- * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a
- * property on the scope using {@link ngModel.NgModelController NgModelController},
- * which is created and exposed by this directive.
- *
- * `ngModel` is responsible for:
- *
- * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`
- * require.
- * - Providing validation behavior (i.e. required, number, email, url).
- * - Keeping the state of the control (valid/invalid, dirty/pristine, touched/untouched, validation errors).
- * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`, `ng-touched`,
- * `ng-untouched`, `ng-empty`, `ng-not-empty`) including animations.
- * - Registering the control with its parent {@link ng.directive:form form}.
- *
- * Note: `ngModel` will try to bind to the property given by evaluating the expression on the
- * current scope. If the property doesn't already exist on this scope, it will be created
- * implicitly and added to the scope.
- *
- * For best practices on using `ngModel`, see:
- *
- * - [Understanding Scopes](https://github.com/angular/angular.js/wiki/Understanding-Scopes)
- *
- * For basic examples, how to use `ngModel`, see:
- *
- * - {@link ng.directive:input input}
- * - {@link input[text] text}
- * - {@link input[checkbox] checkbox}
- * - {@link input[radio] radio}
- * - {@link input[number] number}
- * - {@link input[email] email}
- * - {@link input[url] url}
- * - {@link input[date] date}
- * - {@link input[datetime-local] datetime-local}
- * - {@link input[time] time}
- * - {@link input[month] month}
- * - {@link input[week] week}
- * - {@link ng.directive:select select}
- * - {@link ng.directive:textarea textarea}
- *
- * # CSS classes
- * The following CSS classes are added and removed on the associated input/select/textarea element
- * depending on the validity of the model.
- *
- * - `ng-valid`: the model is valid
- * - `ng-invalid`: the model is invalid
- * - `ng-valid-[key]`: for each valid key added by `$setValidity`
- * - `ng-invalid-[key]`: for each invalid key added by `$setValidity`
- * - `ng-pristine`: the control hasn't been interacted with yet
- * - `ng-dirty`: the control has been interacted with
- * - `ng-touched`: the control has been blurred
- * - `ng-untouched`: the control hasn't been blurred
- * - `ng-pending`: any `$asyncValidators` are unfulfilled
- * - `ng-empty`: the view does not contain a value or the value is deemed "empty", as defined
- * by the {@link ngModel.NgModelController#$isEmpty} method
- * - `ng-not-empty`: the view contains a non-empty value
- *
- * Keep in mind that ngAnimate can detect each of these classes when added and removed.
- *
- * ## Animation Hooks
- *
- * Animations within models are triggered when any of the associated CSS classes are added and removed
- * on the input element which is attached to the model. These classes include: `.ng-pristine`, `.ng-dirty`,
- * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.
- * The animations that are triggered within ngModel are similar to how they work in ngClass and
- * animations can be hooked into using CSS transitions, keyframes as well as JS animations.
- *
- * The following example shows a simple way to utilize CSS transitions to style an input element
- * that has been rendered as invalid after it has been validated:
- *
- * <pre>
- * //be sure to include ngAnimate as a module to hook into more
- * //advanced animations
- * .my-input {
- * transition:0.5s linear all;
- * background: white;
- * }
- * .my-input.ng-invalid {
- * background: red;
- * color:white;
- * }
- * </pre>
- *
- * @example
- * <example deps="angular-animate.js" animations="true" fixBase="true" module="inputExample">
- <file name="index.html">
- <script>
- angular.module('inputExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.val = '1';
- }]);
- </script>
- <style>
- .my-input {
- transition:all linear 0.5s;
- background: transparent;
- }
- .my-input.ng-invalid {
- color:white;
- background: red;
- }
- </style>
- <p id="inputDescription">
- Update input to see transitions when valid/invalid.
- Integer is a valid value.
- </p>
- <form name="testForm" ng-controller="ExampleController">
- <input ng-model="val" ng-pattern="/^\d+$/" name="anim" class="my-input"
- aria-describedby="inputDescription" />
- </form>
- </file>
- * </example>
- *
- * ## Binding to a getter/setter
- *
- * Sometimes it's helpful to bind `ngModel` to a getter/setter function. A getter/setter is a
- * function that returns a representation of the model when called with zero arguments, and sets
- * the internal state of a model when called with an argument. It's sometimes useful to use this
- * for models that have an internal representation that's different from what the model exposes
- * to the view.
- *
- * <div class="alert alert-success">
- * **Best Practice:** It's best to keep getters fast because Angular is likely to call them more
- * frequently than other parts of your code.
- * </div>
- *
- * You use this behavior by adding `ng-model-options="{ getterSetter: true }"` to an element that
- * has `ng-model` attached to it. You can also add `ng-model-options="{ getterSetter: true }"` to
- * a `<form>`, which will enable this behavior for all `<input>`s within it. See
- * {@link ng.directive:ngModelOptions `ngModelOptions`} for more.
- *
- * The following example shows how to use `ngModel` with a getter/setter:
- *
- * @example
- * <example name="ngModel-getter-setter" module="getterSetterExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ getterSetter: true }" />
- </label>
- </form>
- <pre>user.name = <span ng-bind="user.name()"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('getterSetterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- var _name = 'Brian';
- $scope.user = {
- name: function(newName) {
- // Note that newName can be undefined for two reasons:
- // 1. Because it is called as a getter and thus called with no arguments
- // 2. Because the property should actually be set to undefined. This happens e.g. if the
- // input is invalid
- return arguments.length ? (_name = newName) : _name;
- }
- };
- }]);
- </file>
- * </example>
- */
-var ngModelDirective = ['$rootScope', function($rootScope) {
- return {
- restrict: 'A',
- require: ['ngModel', '^?form', '^?ngModelOptions'],
- controller: NgModelController,
- // Prelink needs to run before any input directive
- // so that we can set the NgModelOptions in NgModelController
- // before anyone else uses it.
- priority: 1,
- compile: function ngModelCompile(element) {
- // Setup initial state of the control
- element.addClass(PRISTINE_CLASS).addClass(UNTOUCHED_CLASS).addClass(VALID_CLASS);
-
- return {
- pre: function ngModelPreLink(scope, element, attr, ctrls) {
- var modelCtrl = ctrls[0],
- formCtrl = ctrls[1] || modelCtrl.$$parentForm;
-
- modelCtrl.$$setOptions(ctrls[2] && ctrls[2].$options);
-
- // notify others, especially parent forms
- formCtrl.$addControl(modelCtrl);
-
- attr.$observe('name', function(newValue) {
- if (modelCtrl.$name !== newValue) {
- modelCtrl.$$parentForm.$$renameControl(modelCtrl, newValue);
- }
- });
-
- scope.$on('$destroy', function() {
- modelCtrl.$$parentForm.$removeControl(modelCtrl);
- });
- },
- post: function ngModelPostLink(scope, element, attr, ctrls) {
- var modelCtrl = ctrls[0];
- if (modelCtrl.$options && modelCtrl.$options.updateOn) {
- element.on(modelCtrl.$options.updateOn, function(ev) {
- modelCtrl.$$debounceViewValueCommit(ev && ev.type);
- });
- }
-
- element.on('blur', function(ev) {
- if (modelCtrl.$touched) return;
-
- if ($rootScope.$$phase) {
- scope.$evalAsync(modelCtrl.$setTouched);
- } else {
- scope.$apply(modelCtrl.$setTouched);
- }
- });
- }
- };
- }
- };
-}];
-
-var DEFAULT_REGEXP = /(\s+|^)default(\s+|$)/;
-
-/**
- * @ngdoc directive
- * @name ngModelOptions
- *
- * @description
- * Allows tuning how model updates are done. Using `ngModelOptions` you can specify a custom list of
- * events that will trigger a model update and/or a debouncing delay so that the actual update only
- * takes place when a timer expires; this timer will be reset after another change takes place.
- *
- * Given the nature of `ngModelOptions`, the value displayed inside input fields in the view might
- * be different from the value in the actual model. This means that if you update the model you
- * should also invoke {@link ngModel.NgModelController `$rollbackViewValue`} on the relevant input field in
- * order to make sure it is synchronized with the model and that any debounced action is canceled.
- *
- * The easiest way to reference the control's {@link ngModel.NgModelController `$rollbackViewValue`}
- * method is by making sure the input is placed inside a form that has a `name` attribute. This is
- * important because `form` controllers are published to the related scope under the name in their
- * `name` attribute.
- *
- * Any pending changes will take place immediately when an enclosing form is submitted via the
- * `submit` event. Note that `ngClick` events will occur before the model is updated. Use `ngSubmit`
- * to have access to the updated model.
- *
- * `ngModelOptions` has an effect on the element it's declared on and its descendants.
- *
- * @param {Object} ngModelOptions options to apply to the current model. Valid keys are:
- * - `updateOn`: string specifying which event should the input be bound to. You can set several
- * events using an space delimited list. There is a special event called `default` that
- * matches the default events belonging of the control.
- * - `debounce`: integer value which contains the debounce model update value in milliseconds. A
- * value of 0 triggers an immediate update. If an object is supplied instead, you can specify a
- * custom value for each event. For example:
- * `ng-model-options="{ updateOn: 'default blur', debounce: { 'default': 500, 'blur': 0 } }"`
- * - `allowInvalid`: boolean value which indicates that the model can be set with values that did
- * not validate correctly instead of the default behavior of setting the model to undefined.
- * - `getterSetter`: boolean value which determines whether or not to treat functions bound to
- `ngModel` as getters/setters.
- * - `timezone`: Defines the timezone to be used to read/write the `Date` instance in the model for
- * `<input type="date">`, `<input type="time">`, ... . It understands UTC/GMT and the
- * continental US time zone abbreviations, but for general use, use a time zone offset, for
- * example, `'+0430'` (4 hours, 30 minutes east of the Greenwich meridian)
- * If not specified, the timezone of the browser will be used.
- *
- * @example
-
- The following example shows how to override immediate updates. Changes on the inputs within the
- form will update the model only when the control loses focus (blur event). If `escape` key is
- pressed while the input field is focused, the value is reset to the value in the current model.
-
- <example name="ngModelOptions-directive-blur" module="optionsExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ updateOn: 'blur' }"
- ng-keyup="cancel($event)" />
- </label><br />
- <label>Other data:
- <input type="text" ng-model="user.data" />
- </label><br />
- </form>
- <pre>user.name = <span ng-bind="user.name"></span></pre>
- <pre>user.data = <span ng-bind="user.data"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('optionsExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'John', data: '' };
-
- $scope.cancel = function(e) {
- if (e.keyCode == 27) {
- $scope.userForm.userName.$rollbackViewValue();
- }
- };
- }]);
- </file>
- <file name="protractor.js" type="protractor">
- var model = element(by.binding('user.name'));
- var input = element(by.model('user.name'));
- var other = element(by.model('user.data'));
-
- it('should allow custom events', function() {
- input.sendKeys(' Doe');
- input.click();
- expect(model.getText()).toEqual('John');
- other.click();
- expect(model.getText()).toEqual('John Doe');
- });
-
- it('should $rollbackViewValue when model changes', function() {
- input.sendKeys(' Doe');
- expect(input.getAttribute('value')).toEqual('John Doe');
- input.sendKeys(protractor.Key.ESCAPE);
- expect(input.getAttribute('value')).toEqual('John');
- other.click();
- expect(model.getText()).toEqual('John');
- });
- </file>
- </example>
-
- This one shows how to debounce model changes. Model will be updated only 1 sec after last change.
- If the `Clear` button is pressed, any debounced action is canceled and the value becomes empty.
-
- <example name="ngModelOptions-directive-debounce" module="optionsExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ debounce: 1000 }" />
- </label>
- <button ng-click="userForm.userName.$rollbackViewValue(); user.name=''">Clear</button>
- <br />
- </form>
- <pre>user.name = <span ng-bind="user.name"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('optionsExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.user = { name: 'Igor' };
- }]);
- </file>
- </example>
-
- This one shows how to bind to getter/setters:
-
- <example name="ngModelOptions-directive-getter-setter" module="getterSetterExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <form name="userForm">
- <label>Name:
- <input type="text" name="userName"
- ng-model="user.name"
- ng-model-options="{ getterSetter: true }" />
- </label>
- </form>
- <pre>user.name = <span ng-bind="user.name()"></span></pre>
- </div>
- </file>
- <file name="app.js">
- angular.module('getterSetterExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- var _name = 'Brian';
- $scope.user = {
- name: function(newName) {
- // Note that newName can be undefined for two reasons:
- // 1. Because it is called as a getter and thus called with no arguments
- // 2. Because the property should actually be set to undefined. This happens e.g. if the
- // input is invalid
- return arguments.length ? (_name = newName) : _name;
- }
- };
- }]);
- </file>
- </example>
- */
-var ngModelOptionsDirective = function() {
- return {
- restrict: 'A',
- controller: ['$scope', '$attrs', function($scope, $attrs) {
- var that = this;
- this.$options = copy($scope.$eval($attrs.ngModelOptions));
- // Allow adding/overriding bound events
- if (isDefined(this.$options.updateOn)) {
- this.$options.updateOnDefault = false;
- // extract "default" pseudo-event from list of events that can trigger a model update
- this.$options.updateOn = trim(this.$options.updateOn.replace(DEFAULT_REGEXP, function() {
- that.$options.updateOnDefault = true;
- return ' ';
- }));
- } else {
- this.$options.updateOnDefault = true;
- }
- }]
- };
-};
-
-
-
-// helper methods
-function addSetValidityMethod(context) {
- var ctrl = context.ctrl,
- $element = context.$element,
- classCache = {},
- set = context.set,
- unset = context.unset,
- $animate = context.$animate;
-
- classCache[INVALID_CLASS] = !(classCache[VALID_CLASS] = $element.hasClass(VALID_CLASS));
-
- ctrl.$setValidity = setValidity;
-
- function setValidity(validationErrorKey, state, controller) {
- if (isUndefined(state)) {
- createAndSet('$pending', validationErrorKey, controller);
- } else {
- unsetAndCleanup('$pending', validationErrorKey, controller);
- }
- if (!isBoolean(state)) {
- unset(ctrl.$error, validationErrorKey, controller);
- unset(ctrl.$$success, validationErrorKey, controller);
- } else {
- if (state) {
- unset(ctrl.$error, validationErrorKey, controller);
- set(ctrl.$$success, validationErrorKey, controller);
- } else {
- set(ctrl.$error, validationErrorKey, controller);
- unset(ctrl.$$success, validationErrorKey, controller);
- }
- }
- if (ctrl.$pending) {
- cachedToggleClass(PENDING_CLASS, true);
- ctrl.$valid = ctrl.$invalid = undefined;
- toggleValidationCss('', null);
- } else {
- cachedToggleClass(PENDING_CLASS, false);
- ctrl.$valid = isObjectEmpty(ctrl.$error);
- ctrl.$invalid = !ctrl.$valid;
- toggleValidationCss('', ctrl.$valid);
- }
-
- // re-read the state as the set/unset methods could have
- // combined state in ctrl.$error[validationError] (used for forms),
- // where setting/unsetting only increments/decrements the value,
- // and does not replace it.
- var combinedState;
- if (ctrl.$pending && ctrl.$pending[validationErrorKey]) {
- combinedState = undefined;
- } else if (ctrl.$error[validationErrorKey]) {
- combinedState = false;
- } else if (ctrl.$$success[validationErrorKey]) {
- combinedState = true;
- } else {
- combinedState = null;
- }
-
- toggleValidationCss(validationErrorKey, combinedState);
- ctrl.$$parentForm.$setValidity(validationErrorKey, combinedState, ctrl);
- }
-
- function createAndSet(name, value, controller) {
- if (!ctrl[name]) {
- ctrl[name] = {};
- }
- set(ctrl[name], value, controller);
- }
-
- function unsetAndCleanup(name, value, controller) {
- if (ctrl[name]) {
- unset(ctrl[name], value, controller);
- }
- if (isObjectEmpty(ctrl[name])) {
- ctrl[name] = undefined;
- }
- }
-
- function cachedToggleClass(className, switchValue) {
- if (switchValue && !classCache[className]) {
- $animate.addClass($element, className);
- classCache[className] = true;
- } else if (!switchValue && classCache[className]) {
- $animate.removeClass($element, className);
- classCache[className] = false;
- }
- }
-
- function toggleValidationCss(validationErrorKey, isValid) {
- validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';
-
- cachedToggleClass(VALID_CLASS + validationErrorKey, isValid === true);
- cachedToggleClass(INVALID_CLASS + validationErrorKey, isValid === false);
- }
-}
-
-function isObjectEmpty(obj) {
- if (obj) {
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- return false;
- }
- }
- }
- return true;
-}
-
-/**
- * @ngdoc directive
- * @name ngNonBindable
- * @restrict AC
- * @priority 1000
- *
- * @description
- * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current
- * DOM element. This is useful if the element contains what appears to be Angular directives and
- * bindings but which should be ignored by Angular. This could be the case if you have a site that
- * displays snippets of code, for instance.
- *
- * @element ANY
- *
- * @example
- * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,
- * but the one wrapped in `ngNonBindable` is left alone.
- *
- * @example
- <example>
- <file name="index.html">
- <div>Normal: {{1 + 2}}</div>
- <div ng-non-bindable>Ignored: {{1 + 2}}</div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-non-bindable', function() {
- expect(element(by.binding('1 + 2')).getText()).toContain('3');
- expect(element.all(by.css('div')).last().getText()).toMatch(/1 \+ 2/);
- });
- </file>
- </example>
- */
-var ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });
-
-/* global jqLiteRemove */
-
-var ngOptionsMinErr = minErr('ngOptions');
-
-/**
- * @ngdoc directive
- * @name ngOptions
- * @restrict A
- *
- * @description
- *
- * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`
- * elements for the `<select>` element using the array or object obtained by evaluating the
- * `ngOptions` comprehension expression.
- *
- * In many cases, `ngRepeat` can be used on `<option>` elements instead of `ngOptions` to achieve a
- * similar result. However, `ngOptions` provides some benefits such as reducing memory and
- * increasing speed by not creating a new scope for each repeated instance, as well as providing
- * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
- * comprehension expression. `ngOptions` should be used when the `<select>` model needs to be bound
- * to a non-string value. This is because an option element can only be bound to string values at
- * present.
- *
- * When an item in the `<select>` menu is selected, the array element or object property
- * represented by the selected option will be bound to the model identified by the `ngModel`
- * directive.
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * ## Complex Models (objects or collections)
- *
- * By default, `ngModel` watches the model by reference, not value. This is important to know when
- * binding the select to a model that is an object or a collection.
- *
- * One issue occurs if you want to preselect an option. For example, if you set
- * the model to an object that is equal to an object in your collection, `ngOptions` won't be able to set the selection,
- * because the objects are not identical. So by default, you should always reference the item in your collection
- * for preselections, e.g.: `$scope.selected = $scope.collection[3]`.
- *
- * Another solution is to use a `track by` clause, because then `ngOptions` will track the identity
- * of the item not by reference, but by the result of the `track by` expression. For example, if your
- * collection items have an id property, you would `track by item.id`.
- *
- * A different issue with objects or collections is that ngModel won't detect if an object property or
- * a collection item changes. For that reason, `ngOptions` additionally watches the model using
- * `$watchCollection`, when the expression contains a `track by` clause or the the select has the `multiple` attribute.
- * This allows ngOptions to trigger a re-rendering of the options even if the actual object/collection
- * has not changed identity, but only a property on the object or an item in the collection changes.
- *
- * Note that `$watchCollection` does a shallow comparison of the properties of the object (or the items in the collection
- * if the model is an array). This means that changing a property deeper than the first level inside the
- * object/collection will not trigger a re-rendering.
- *
- * ## `select` **`as`**
- *
- * Using `select` **`as`** will bind the result of the `select` expression to the model, but
- * the value of the `<select>` and `<option>` html elements will be either the index (for array data sources)
- * or property name (for object data sources) of the value within the collection. If a **`track by`** expression
- * is used, the result of that expression will be set as the value of the `option` and `select` elements.
- *
- *
- * ### `select` **`as`** and **`track by`**
- *
- * <div class="alert alert-warning">
- * Be careful when using `select` **`as`** and **`track by`** in the same expression.
- * </div>
- *
- * Given this array of items on the $scope:
- *
- * ```js
- * $scope.items = [{
- * id: 1,
- * label: 'aLabel',
- * subItem: { name: 'aSubItem' }
- * }, {
- * id: 2,
- * label: 'bLabel',
- * subItem: { name: 'bSubItem' }
- * }];
- * ```
- *
- * This will work:
- *
- * ```html
- * <select ng-options="item as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0];
- * ```
- *
- * but this will not work:
- *
- * ```html
- * <select ng-options="item.subItem as item.label for item in items track by item.id" ng-model="selected"></select>
- * ```
- * ```js
- * $scope.selected = $scope.items[0].subItem;
- * ```
- *
- * In both examples, the **`track by`** expression is applied successfully to each `item` in the
- * `items` array. Because the selected option has been set programmatically in the controller, the
- * **`track by`** expression is also applied to the `ngModel` value. In the first example, the
- * `ngModel` value is `items[0]` and the **`track by`** expression evaluates to `items[0].id` with
- * no issue. In the second example, the `ngModel` value is `items[0].subItem` and the **`track by`**
- * expression evaluates to `items[0].subItem.id` (which is undefined). As a result, the model value
- * is not matched against any `<option>` and the `<select>` appears as having no selected value.
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} required The control is considered valid only if value is entered.
- * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to
- * the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of
- * `required` when you want to data-bind to the `required` attribute.
- * @param {comprehension_expression=} ngOptions in one of the following forms:
- *
- * * for array data sources:
- * * `label` **`for`** `value` **`in`** `array`
- * * `select` **`as`** `label` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array`
- * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array`
- * * `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * `label` **`disable when`** `disable` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`
- * * `label` **`for`** `value` **`in`** `array` | orderBy:`orderexpr` **`track by`** `trackexpr`
- * (for including a filter with `track by`)
- * * for object data sources:
- * * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`
- * * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `label` **`disable when`** `disable` **`for (`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`group by`** `group`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- * * `select` **`as`** `label` **`disable when`** `disable`
- * **`for` `(`**`key`**`,`** `value`**`) in`** `object`
- *
- * Where:
- *
- * * `array` / `object`: an expression which evaluates to an array / object to iterate over.
- * * `value`: local variable which will refer to each item in the `array` or each property value
- * of `object` during iteration.
- * * `key`: local variable which will refer to a property name in `object` during iteration.
- * * `label`: The result of this expression will be the label for `<option>` element. The
- * `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).
- * * `select`: The result of this expression will be bound to the model of the parent `<select>`
- * element. If not specified, `select` expression will default to `value`.
- * * `group`: The result of this expression will be used to group options using the `<optgroup>`
- * DOM element.
- * * `disable`: The result of this expression will be used to disable the rendered `<option>`
- * element. Return `true` to disable.
- * * `trackexpr`: Used when working with an array of objects. The result of this expression will be
- * used to identify the objects in the array. The `trackexpr` will most likely refer to the
- * `value` variable (e.g. `value.propertyName`). With this the selection is preserved
- * even when the options are recreated (e.g. reloaded from the server).
- *
- * @example
- <example module="selectExample">
- <file name="index.html">
- <script>
- angular.module('selectExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.colors = [
- {name:'black', shade:'dark'},
- {name:'white', shade:'light', notAnOption: true},
- {name:'red', shade:'dark'},
- {name:'blue', shade:'dark', notAnOption: true},
- {name:'yellow', shade:'light', notAnOption: false}
- ];
- $scope.myColor = $scope.colors[2]; // red
- }]);
- </script>
- <div ng-controller="ExampleController">
- <ul>
- <li ng-repeat="color in colors">
- <label>Name: <input ng-model="color.name"></label>
- <label><input type="checkbox" ng-model="color.notAnOption"> Disabled?</label>
- <button ng-click="colors.splice($index, 1)" aria-label="Remove">X</button>
- </li>
- <li>
- <button ng-click="colors.push({})">add</button>
- </li>
- </ul>
- <hr/>
- <label>Color (null not allowed):
- <select ng-model="myColor" ng-options="color.name for color in colors"></select>
- </label><br/>
- <label>Color (null allowed):
- <span class="nullable">
- <select ng-model="myColor" ng-options="color.name for color in colors">
- <option value="">-- choose color --</option>
- </select>
- </span></label><br/>
-
- <label>Color grouped by shade:
- <select ng-model="myColor" ng-options="color.name group by color.shade for color in colors">
- </select>
- </label><br/>
-
- <label>Color grouped by shade, with some disabled:
- <select ng-model="myColor"
- ng-options="color.name group by color.shade disable when color.notAnOption for color in colors">
- </select>
- </label><br/>
-
-
-
- Select <button ng-click="myColor = { name:'not in list', shade: 'other' }">bogus</button>.
- <br/>
- <hr/>
- Currently selected: {{ {selected_color:myColor} }}
- <div style="border:solid 1px black; height:20px"
- ng-style="{'background-color':myColor.name}">
- </div>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should check ng-options', function() {
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');
- element.all(by.model('myColor')).first().click();
- element.all(by.css('select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');
- element(by.css('.nullable select[ng-model="myColor"]')).click();
- element.all(by.css('.nullable select[ng-model="myColor"] option')).first().click();
- expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');
- });
- </file>
- </example>
- */
-
-// jshint maxlen: false
-// //00001111111111000000000002222222222000000000000000000000333333333300000000000000000000000004444444444400000000000005555555555555550000000006666666666666660000000777777777777777000000000000000888888888800000000000000000009999999999
-var NG_OPTIONS_REGEXP = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/;
- // 1: value expression (valueFn)
- // 2: label expression (displayFn)
- // 3: group by expression (groupByFn)
- // 4: disable when expression (disableWhenFn)
- // 5: array item variable name
- // 6: object item key variable name
- // 7: object item value variable name
- // 8: collection expression
- // 9: track by expression
-// jshint maxlen: 100
-
-
-var ngOptionsDirective = ['$compile', '$parse', function($compile, $parse) {
-
- function parseOptionsExpression(optionsExp, selectElement, scope) {
-
- var match = optionsExp.match(NG_OPTIONS_REGEXP);
- if (!(match)) {
- throw ngOptionsMinErr('iexp',
- "Expected expression in form of " +
- "'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'" +
- " but got '{0}'. Element: {1}",
- optionsExp, startingTag(selectElement));
- }
-
- // Extract the parts from the ngOptions expression
-
- // The variable name for the value of the item in the collection
- var valueName = match[5] || match[7];
- // The variable name for the key of the item in the collection
- var keyName = match[6];
-
- // An expression that generates the viewValue for an option if there is a label expression
- var selectAs = / as /.test(match[0]) && match[1];
- // An expression that is used to track the id of each object in the options collection
- var trackBy = match[9];
- // An expression that generates the viewValue for an option if there is no label expression
- var valueFn = $parse(match[2] ? match[1] : valueName);
- var selectAsFn = selectAs && $parse(selectAs);
- var viewValueFn = selectAsFn || valueFn;
- var trackByFn = trackBy && $parse(trackBy);
-
- // Get the value by which we are going to track the option
- // if we have a trackFn then use that (passing scope and locals)
- // otherwise just hash the given viewValue
- var getTrackByValueFn = trackBy ?
- function(value, locals) { return trackByFn(scope, locals); } :
- function getHashOfValue(value) { return hashKey(value); };
- var getTrackByValue = function(value, key) {
- return getTrackByValueFn(value, getLocals(value, key));
- };
-
- var displayFn = $parse(match[2] || match[1]);
- var groupByFn = $parse(match[3] || '');
- var disableWhenFn = $parse(match[4] || '');
- var valuesFn = $parse(match[8]);
-
- var locals = {};
- var getLocals = keyName ? function(value, key) {
- locals[keyName] = key;
- locals[valueName] = value;
- return locals;
- } : function(value) {
- locals[valueName] = value;
- return locals;
- };
-
-
- function Option(selectValue, viewValue, label, group, disabled) {
- this.selectValue = selectValue;
- this.viewValue = viewValue;
- this.label = label;
- this.group = group;
- this.disabled = disabled;
- }
-
- function getOptionValuesKeys(optionValues) {
- var optionValuesKeys;
-
- if (!keyName && isArrayLike(optionValues)) {
- optionValuesKeys = optionValues;
- } else {
- // if object, extract keys, in enumeration order, unsorted
- optionValuesKeys = [];
- for (var itemKey in optionValues) {
- if (optionValues.hasOwnProperty(itemKey) && itemKey.charAt(0) !== '$') {
- optionValuesKeys.push(itemKey);
- }
- }
- }
- return optionValuesKeys;
- }
-
- return {
- trackBy: trackBy,
- getTrackByValue: getTrackByValue,
- getWatchables: $parse(valuesFn, function(optionValues) {
- // Create a collection of things that we would like to watch (watchedArray)
- // so that they can all be watched using a single $watchCollection
- // that only runs the handler once if anything changes
- var watchedArray = [];
- optionValues = optionValues || [];
-
- var optionValuesKeys = getOptionValuesKeys(optionValues);
- var optionValuesLength = optionValuesKeys.length;
- for (var index = 0; index < optionValuesLength; index++) {
- var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];
- var value = optionValues[key];
-
- var locals = getLocals(optionValues[key], key);
- var selectValue = getTrackByValueFn(optionValues[key], locals);
- watchedArray.push(selectValue);
-
- // Only need to watch the displayFn if there is a specific label expression
- if (match[2] || match[1]) {
- var label = displayFn(scope, locals);
- watchedArray.push(label);
- }
-
- // Only need to watch the disableWhenFn if there is a specific disable expression
- if (match[4]) {
- var disableWhen = disableWhenFn(scope, locals);
- watchedArray.push(disableWhen);
- }
- }
- return watchedArray;
- }),
-
- getOptions: function() {
-
- var optionItems = [];
- var selectValueMap = {};
-
- // The option values were already computed in the `getWatchables` fn,
- // which must have been called to trigger `getOptions`
- var optionValues = valuesFn(scope) || [];
- var optionValuesKeys = getOptionValuesKeys(optionValues);
- var optionValuesLength = optionValuesKeys.length;
-
- for (var index = 0; index < optionValuesLength; index++) {
- var key = (optionValues === optionValuesKeys) ? index : optionValuesKeys[index];
- var value = optionValues[key];
- var locals = getLocals(value, key);
- var viewValue = viewValueFn(scope, locals);
- var selectValue = getTrackByValueFn(viewValue, locals);
- var label = displayFn(scope, locals);
- var group = groupByFn(scope, locals);
- var disabled = disableWhenFn(scope, locals);
- var optionItem = new Option(selectValue, viewValue, label, group, disabled);
-
- optionItems.push(optionItem);
- selectValueMap[selectValue] = optionItem;
- }
-
- return {
- items: optionItems,
- selectValueMap: selectValueMap,
- getOptionFromViewValue: function(value) {
- return selectValueMap[getTrackByValue(value)];
- },
- getViewValueFromOption: function(option) {
- // If the viewValue could be an object that may be mutated by the application,
- // we need to make a copy and not return the reference to the value on the option.
- return trackBy ? angular.copy(option.viewValue) : option.viewValue;
- }
- };
- }
- };
- }
-
-
- // we can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- var optionTemplate = document.createElement('option'),
- optGroupTemplate = document.createElement('optgroup');
-
- function ngOptionsPostLink(scope, selectElement, attr, ctrls) {
-
- var selectCtrl = ctrls[0];
- var ngModelCtrl = ctrls[1];
- var multiple = attr.multiple;
-
- // The emptyOption allows the application developer to provide their own custom "empty"
- // option when the viewValue does not match any of the option values.
- var emptyOption;
- for (var i = 0, children = selectElement.children(), ii = children.length; i < ii; i++) {
- if (children[i].value === '') {
- emptyOption = children.eq(i);
- break;
- }
- }
-
- var providedEmptyOption = !!emptyOption;
-
- var unknownOption = jqLite(optionTemplate.cloneNode(false));
- unknownOption.val('?');
-
- var options;
- var ngOptions = parseOptionsExpression(attr.ngOptions, selectElement, scope);
-
-
- var renderEmptyOption = function() {
- if (!providedEmptyOption) {
- selectElement.prepend(emptyOption);
- }
- selectElement.val('');
- emptyOption.prop('selected', true); // needed for IE
- emptyOption.attr('selected', true);
- };
-
- var removeEmptyOption = function() {
- if (!providedEmptyOption) {
- emptyOption.remove();
- }
- };
-
-
- var renderUnknownOption = function() {
- selectElement.prepend(unknownOption);
- selectElement.val('?');
- unknownOption.prop('selected', true); // needed for IE
- unknownOption.attr('selected', true);
- };
-
- var removeUnknownOption = function() {
- unknownOption.remove();
- };
-
- // Update the controller methods for multiple selectable options
- if (!multiple) {
-
- selectCtrl.writeValue = function writeNgOptionsValue(value) {
- var option = options.getOptionFromViewValue(value);
-
- if (option && !option.disabled) {
- if (selectElement[0].value !== option.selectValue) {
- removeUnknownOption();
- removeEmptyOption();
-
- selectElement[0].value = option.selectValue;
- option.element.selected = true;
- option.element.setAttribute('selected', 'selected');
- }
- } else {
- if (value === null || providedEmptyOption) {
- removeUnknownOption();
- renderEmptyOption();
- } else {
- removeEmptyOption();
- renderUnknownOption();
- }
- }
- };
-
- selectCtrl.readValue = function readNgOptionsValue() {
-
- var selectedOption = options.selectValueMap[selectElement.val()];
-
- if (selectedOption && !selectedOption.disabled) {
- removeEmptyOption();
- removeUnknownOption();
- return options.getViewValueFromOption(selectedOption);
- }
- return null;
- };
-
- // If we are using `track by` then we must watch the tracked value on the model
- // since ngModel only watches for object identity change
- if (ngOptions.trackBy) {
- scope.$watch(
- function() { return ngOptions.getTrackByValue(ngModelCtrl.$viewValue); },
- function() { ngModelCtrl.$render(); }
- );
- }
-
- } else {
-
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
-
-
- selectCtrl.writeValue = function writeNgOptionsMultiple(value) {
- options.items.forEach(function(option) {
- option.element.selected = false;
- });
-
- if (value) {
- value.forEach(function(item) {
- var option = options.getOptionFromViewValue(item);
- if (option && !option.disabled) option.element.selected = true;
- });
- }
- };
-
-
- selectCtrl.readValue = function readNgOptionsMultiple() {
- var selectedValues = selectElement.val() || [],
- selections = [];
-
- forEach(selectedValues, function(value) {
- var option = options.selectValueMap[value];
- if (option && !option.disabled) selections.push(options.getViewValueFromOption(option));
- });
-
- return selections;
- };
-
- // If we are using `track by` then we must watch these tracked values on the model
- // since ngModel only watches for object identity change
- if (ngOptions.trackBy) {
-
- scope.$watchCollection(function() {
- if (isArray(ngModelCtrl.$viewValue)) {
- return ngModelCtrl.$viewValue.map(function(value) {
- return ngOptions.getTrackByValue(value);
- });
- }
- }, function() {
- ngModelCtrl.$render();
- });
-
- }
- }
-
-
- if (providedEmptyOption) {
-
- // we need to remove it before calling selectElement.empty() because otherwise IE will
- // remove the label from the element. wtf?
- emptyOption.remove();
-
- // compile the element since there might be bindings in it
- $compile(emptyOption)(scope);
-
- // remove the class, which is added automatically because we recompile the element and it
- // becomes the compilation root
- emptyOption.removeClass('ng-scope');
- } else {
- emptyOption = jqLite(optionTemplate.cloneNode(false));
- }
-
- // We need to do this here to ensure that the options object is defined
- // when we first hit it in writeNgOptionsValue
- updateOptions();
-
- // We will re-render the option elements if the option values or labels change
- scope.$watchCollection(ngOptions.getWatchables, updateOptions);
-
- // ------------------------------------------------------------------ //
-
-
- function updateOptionElement(option, element) {
- option.element = element;
- element.disabled = option.disabled;
- // NOTE: The label must be set before the value, otherwise IE10/11/EDGE create unresponsive
- // selects in certain circumstances when multiple selects are next to each other and display
- // the option list in listbox style, i.e. the select is [multiple], or specifies a [size].
- // See https://github.com/angular/angular.js/issues/11314 for more info.
- // This is unfortunately untestable with unit / e2e tests
- if (option.label !== element.label) {
- element.label = option.label;
- element.textContent = option.label;
- }
- if (option.value !== element.value) element.value = option.selectValue;
- }
-
- function addOrReuseElement(parent, current, type, templateElement) {
- var element;
- // Check whether we can reuse the next element
- if (current && lowercase(current.nodeName) === type) {
- // The next element is the right type so reuse it
- element = current;
- } else {
- // The next element is not the right type so create a new one
- element = templateElement.cloneNode(false);
- if (!current) {
- // There are no more elements so just append it to the select
- parent.appendChild(element);
- } else {
- // The next element is not a group so insert the new one
- parent.insertBefore(element, current);
- }
- }
- return element;
- }
-
-
- function removeExcessElements(current) {
- var next;
- while (current) {
- next = current.nextSibling;
- jqLiteRemove(current);
- current = next;
- }
- }
-
-
- function skipEmptyAndUnknownOptions(current) {
- var emptyOption_ = emptyOption && emptyOption[0];
- var unknownOption_ = unknownOption && unknownOption[0];
-
- // We cannot rely on the extracted empty option being the same as the compiled empty option,
- // because the compiled empty option might have been replaced by a comment because
- // it had an "element" transclusion directive on it (such as ngIf)
- if (emptyOption_ || unknownOption_) {
- while (current &&
- (current === emptyOption_ ||
- current === unknownOption_ ||
- current.nodeType === NODE_TYPE_COMMENT ||
- current.value === '')) {
- current = current.nextSibling;
- }
- }
- return current;
- }
-
-
- function updateOptions() {
-
- var previousValue = options && selectCtrl.readValue();
-
- options = ngOptions.getOptions();
-
- var groupMap = {};
- var currentElement = selectElement[0].firstChild;
-
- // Ensure that the empty option is always there if it was explicitly provided
- if (providedEmptyOption) {
- selectElement.prepend(emptyOption);
- }
-
- currentElement = skipEmptyAndUnknownOptions(currentElement);
-
- options.items.forEach(function updateOption(option) {
- var group;
- var groupElement;
- var optionElement;
-
- if (isDefined(option.group)) {
-
- // This option is to live in a group
- // See if we have already created this group
- group = groupMap[option.group];
-
- if (!group) {
-
- // We have not already created this group
- groupElement = addOrReuseElement(selectElement[0],
- currentElement,
- 'optgroup',
- optGroupTemplate);
- // Move to the next element
- currentElement = groupElement.nextSibling;
-
- // Update the label on the group element
- groupElement.label = option.group;
-
- // Store it for use later
- group = groupMap[option.group] = {
- groupElement: groupElement,
- currentOptionElement: groupElement.firstChild
- };
-
- }
-
- // So now we have a group for this option we add the option to the group
- optionElement = addOrReuseElement(group.groupElement,
- group.currentOptionElement,
- 'option',
- optionTemplate);
- updateOptionElement(option, optionElement);
- // Move to the next element
- group.currentOptionElement = optionElement.nextSibling;
-
- } else {
-
- // This option is not in a group
- optionElement = addOrReuseElement(selectElement[0],
- currentElement,
- 'option',
- optionTemplate);
- updateOptionElement(option, optionElement);
- // Move to the next element
- currentElement = optionElement.nextSibling;
- }
- });
-
-
- // Now remove all excess options and group
- Object.keys(groupMap).forEach(function(key) {
- removeExcessElements(groupMap[key].currentOptionElement);
- });
- removeExcessElements(currentElement);
-
- ngModelCtrl.$render();
-
- // Check to see if the value has changed due to the update to the options
- if (!ngModelCtrl.$isEmpty(previousValue)) {
- var nextValue = selectCtrl.readValue();
- if (ngOptions.trackBy ? !equals(previousValue, nextValue) : previousValue !== nextValue) {
- ngModelCtrl.$setViewValue(nextValue);
- ngModelCtrl.$render();
- }
- }
-
- }
- }
-
- return {
- restrict: 'A',
- terminal: true,
- require: ['select', 'ngModel'],
- link: {
- pre: function ngOptionsPreLink(scope, selectElement, attr, ctrls) {
- // Deactivate the SelectController.register method to prevent
- // option directives from accidentally registering themselves
- // (and unwanted $destroy handlers etc.)
- ctrls[0].registerOption = noop;
- },
- post: ngOptionsPostLink
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngPluralize
- * @restrict EA
- *
- * @description
- * `ngPluralize` is a directive that displays messages according to en-US localization rules.
- * These rules are bundled with angular.js, but can be overridden
- * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive
- * by specifying the mappings between
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * and the strings to be displayed.
- *
- * # Plural categories and explicit number rules
- * There are two
- * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)
- * in Angular's default en-US locale: "one" and "other".
- *
- * While a plural category may match many numbers (for example, in en-US locale, "other" can match
- * any number that is not 1), an explicit number rule can only match one number. For example, the
- * explicit number rule for "3" matches the number 3. There are examples of plural categories
- * and explicit number rules throughout the rest of this documentation.
- *
- * # Configuring ngPluralize
- * You configure ngPluralize by providing 2 attributes: `count` and `when`.
- * You can also provide an optional attribute, `offset`.
- *
- * The value of the `count` attribute can be either a string or an {@link guide/expression
- * Angular expression}; these are evaluated on the current scope for its bound value.
- *
- * The `when` attribute specifies the mappings between plural categories and the actual
- * string to be displayed. The value of the attribute should be a JSON object.
- *
- * The following example shows how to configure ngPluralize:
- *
- * ```html
- * <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- * 'one': '1 person is viewing.',
- * 'other': '{} people are viewing.'}">
- * </ng-pluralize>
- *```
- *
- * In the example, `"0: Nobody is viewing."` is an explicit number rule. If you did not
- * specify this rule, 0 would be matched to the "other" category and "0 people are viewing"
- * would be shown instead of "Nobody is viewing". You can specify an explicit number rule for
- * other numbers, for example 12, so that instead of showing "12 people are viewing", you can
- * show "a dozen people are viewing".
- *
- * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted
- * into pluralized strings. In the previous example, Angular will replace `{}` with
- * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder
- * for <span ng-non-bindable>{{numberExpression}}</span>.
- *
- * If no rule is defined for a category, then an empty string is displayed and a warning is generated.
- * Note that some locales define more categories than `one` and `other`. For example, fr-fr defines `few` and `many`.
- *
- * # Configuring ngPluralize with offset
- * The `offset` attribute allows further customization of pluralized text, which can result in
- * a better user experience. For example, instead of the message "4 people are viewing this document",
- * you might display "John, Kate and 2 others are viewing this document".
- * The offset attribute allows you to offset a number by any desired value.
- * Let's take a look at an example:
- *
- * ```html
- * <ng-pluralize count="personCount" offset=2
- * when="{'0': 'Nobody is viewing.',
- * '1': '{{person1}} is viewing.',
- * '2': '{{person1}} and {{person2}} are viewing.',
- * 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- * 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- * </ng-pluralize>
- * ```
- *
- * Notice that we are still using two plural categories(one, other), but we added
- * three explicit number rules 0, 1 and 2.
- * When one person, perhaps John, views the document, "John is viewing" will be shown.
- * When three people view the document, no explicit number rule is found, so
- * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.
- * In this case, plural category 'one' is matched and "John, Mary and one other person are viewing"
- * is shown.
- *
- * Note that when you specify offsets, you must provide explicit number rules for
- * numbers from 0 up to and including the offset. If you use an offset of 3, for example,
- * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for
- * plural categories "one" and "other".
- *
- * @param {string|expression} count The variable to be bound to.
- * @param {string} when The mapping between plural category to its corresponding strings.
- * @param {number=} offset Offset to deduct from the total number.
- *
- * @example
- <example module="pluralizeExample">
- <file name="index.html">
- <script>
- angular.module('pluralizeExample', [])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.person1 = 'Igor';
- $scope.person2 = 'Misko';
- $scope.personCount = 1;
- }]);
- </script>
- <div ng-controller="ExampleController">
- <label>Person 1:<input type="text" ng-model="person1" value="Igor" /></label><br/>
- <label>Person 2:<input type="text" ng-model="person2" value="Misko" /></label><br/>
- <label>Number of People:<input type="text" ng-model="personCount" value="1" /></label><br/>
-
- <!--- Example with simple pluralization rules for en locale --->
- Without Offset:
- <ng-pluralize count="personCount"
- when="{'0': 'Nobody is viewing.',
- 'one': '1 person is viewing.',
- 'other': '{} people are viewing.'}">
- </ng-pluralize><br>
-
- <!--- Example with offset --->
- With Offset(2):
- <ng-pluralize count="personCount" offset=2
- when="{'0': 'Nobody is viewing.',
- '1': '{{person1}} is viewing.',
- '2': '{{person1}} and {{person2}} are viewing.',
- 'one': '{{person1}}, {{person2}} and one other person are viewing.',
- 'other': '{{person1}}, {{person2}} and {} other people are viewing.'}">
- </ng-pluralize>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should show correct pluralized string', function() {
- var withoutOffset = element.all(by.css('ng-pluralize')).get(0);
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var countInput = element(by.model('personCount'));
-
- expect(withoutOffset.getText()).toEqual('1 person is viewing.');
- expect(withOffset.getText()).toEqual('Igor is viewing.');
-
- countInput.clear();
- countInput.sendKeys('0');
-
- expect(withoutOffset.getText()).toEqual('Nobody is viewing.');
- expect(withOffset.getText()).toEqual('Nobody is viewing.');
-
- countInput.clear();
- countInput.sendKeys('2');
-
- expect(withoutOffset.getText()).toEqual('2 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');
-
- countInput.clear();
- countInput.sendKeys('3');
-
- expect(withoutOffset.getText()).toEqual('3 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');
-
- countInput.clear();
- countInput.sendKeys('4');
-
- expect(withoutOffset.getText()).toEqual('4 people are viewing.');
- expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');
- });
- it('should show data-bound names', function() {
- var withOffset = element.all(by.css('ng-pluralize')).get(1);
- var personCount = element(by.model('personCount'));
- var person1 = element(by.model('person1'));
- var person2 = element(by.model('person2'));
- personCount.clear();
- personCount.sendKeys('4');
- person1.clear();
- person1.sendKeys('Di');
- person2.clear();
- person2.sendKeys('Vojta');
- expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');
- });
- </file>
- </example>
- */
-var ngPluralizeDirective = ['$locale', '$interpolate', '$log', function($locale, $interpolate, $log) {
- var BRACE = /{}/g,
- IS_WHEN = /^when(Minus)?(.+)$/;
-
- return {
- link: function(scope, element, attr) {
- var numberExp = attr.count,
- whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs
- offset = attr.offset || 0,
- whens = scope.$eval(whenExp) || {},
- whensExpFns = {},
- startSymbol = $interpolate.startSymbol(),
- endSymbol = $interpolate.endSymbol(),
- braceReplacement = startSymbol + numberExp + '-' + offset + endSymbol,
- watchRemover = angular.noop,
- lastCount;
-
- forEach(attr, function(expression, attributeName) {
- var tmpMatch = IS_WHEN.exec(attributeName);
- if (tmpMatch) {
- var whenKey = (tmpMatch[1] ? '-' : '') + lowercase(tmpMatch[2]);
- whens[whenKey] = element.attr(attr.$attr[attributeName]);
- }
- });
- forEach(whens, function(expression, key) {
- whensExpFns[key] = $interpolate(expression.replace(BRACE, braceReplacement));
-
- });
-
- scope.$watch(numberExp, function ngPluralizeWatchAction(newVal) {
- var count = parseFloat(newVal);
- var countIsNaN = isNaN(count);
-
- if (!countIsNaN && !(count in whens)) {
- // If an explicit number rule such as 1, 2, 3... is defined, just use it.
- // Otherwise, check it against pluralization rules in $locale service.
- count = $locale.pluralCat(count - offset);
- }
-
- // If both `count` and `lastCount` are NaN, we don't need to re-register a watch.
- // In JS `NaN !== NaN`, so we have to exlicitly check.
- if ((count !== lastCount) && !(countIsNaN && isNumber(lastCount) && isNaN(lastCount))) {
- watchRemover();
- var whenExpFn = whensExpFns[count];
- if (isUndefined(whenExpFn)) {
- if (newVal != null) {
- $log.debug("ngPluralize: no rule defined for '" + count + "' in " + whenExp);
- }
- watchRemover = noop;
- updateElementText();
- } else {
- watchRemover = scope.$watch(whenExpFn, updateElementText);
- }
- lastCount = count;
- }
- });
-
- function updateElementText(newText) {
- element.text(newText || '');
- }
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngRepeat
- * @multiElement
- *
- * @description
- * The `ngRepeat` directive instantiates a template once per item from a collection. Each template
- * instance gets its own scope, where the given loop variable is set to the current collection item,
- * and `$index` is set to the item index or key.
- *
- * Special properties are exposed on the local scope of each template instance, including:
- *
- * | Variable | Type | Details |
- * |-----------|-----------------|-----------------------------------------------------------------------------|
- * | `$index` | {@type number} | iterator offset of the repeated element (0..length-1) |
- * | `$first` | {@type boolean} | true if the repeated element is first in the iterator. |
- * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |
- * | `$last` | {@type boolean} | true if the repeated element is last in the iterator. |
- * | `$even` | {@type boolean} | true if the iterator position `$index` is even (otherwise false). |
- * | `$odd` | {@type boolean} | true if the iterator position `$index` is odd (otherwise false). |
- *
- * <div class="alert alert-info">
- * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.
- * This may be useful when, for instance, nesting ngRepeats.
- * </div>
- *
- *
- * # Iterating over object properties
- *
- * It is possible to get `ngRepeat` to iterate over the properties of an object using the following
- * syntax:
- *
- * ```js
- * <div ng-repeat="(key, value) in myObj"> ... </div>
- * ```
- *
- * You need to be aware that the JavaScript specification does not define the order of keys
- * returned for an object. (To mitigate this in Angular 1.3 the `ngRepeat` directive
- * used to sort the keys alphabetically.)
- *
- * Version 1.4 removed the alphabetic sorting. We now rely on the order returned by the browser
- * when running `for key in myObj`. It seems that browsers generally follow the strategy of providing
- * keys in the order in which they were defined, although there are exceptions when keys are deleted
- * and reinstated. See the [MDN page on `delete` for more info](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/delete#Cross-browser_notes).
- *
- * If this is not desired, the recommended workaround is to convert your object into an array
- * that is sorted into the order that you prefer before providing it to `ngRepeat`. You could
- * do this with a filter such as [toArrayFilter](http://ngmodules.org/modules/angular-toArrayFilter)
- * or implement a `$watch` on the object yourself.
- *
- *
- * # Tracking and Duplicates
- *
- * `ngRepeat` uses {@link $rootScope.Scope#$watchCollection $watchCollection} to detect changes in
- * the collection. When a change happens, ngRepeat then makes the corresponding changes to the DOM:
- *
- * * When an item is added, a new instance of the template is added to the DOM.
- * * When an item is removed, its template instance is removed from the DOM.
- * * When items are reordered, their respective templates are reordered in the DOM.
- *
- * To minimize creation of DOM elements, `ngRepeat` uses a function
- * to "keep track" of all items in the collection and their corresponding DOM elements.
- * For example, if an item is added to the collection, ngRepeat will know that all other items
- * already have DOM elements, and will not re-render them.
- *
- * The default tracking function (which tracks items by their identity) does not allow
- * duplicate items in arrays. This is because when there are duplicates, it is not possible
- * to maintain a one-to-one mapping between collection items and DOM elements.
- *
- * If you do need to repeat duplicate items, you can substitute the default tracking behavior
- * with your own using the `track by` expression.
- *
- * For example, you may track items by the index of each item in the collection, using the
- * special scope property `$index`:
- * ```html
- * <div ng-repeat="n in [42, 42, 43, 43] track by $index">
- * {{n}}
- * </div>
- * ```
- *
- * You may also use arbitrary expressions in `track by`, including references to custom functions
- * on the scope:
- * ```html
- * <div ng-repeat="n in [42, 42, 43, 43] track by myTrackingFunction(n)">
- * {{n}}
- * </div>
- * ```
- *
- * <div class="alert alert-success">
- * If you are working with objects that have an identifier property, you should track
- * by the identifier instead of the whole object. Should you reload your data later, `ngRepeat`
- * will not have to rebuild the DOM elements for items it has already rendered, even if the
- * JavaScript objects in the collection have been substituted for new ones. For large collections,
- * this signifincantly improves rendering performance. If you don't have a unique identifier,
- * `track by $index` can also provide a performance boost.
- * </div>
- * ```html
- * <div ng-repeat="model in collection track by model.id">
- * {{model.name}}
- * </div>
- * ```
- *
- * When no `track by` expression is provided, it is equivalent to tracking by the built-in
- * `$id` function, which tracks items by their identity:
- * ```html
- * <div ng-repeat="obj in collection track by $id(obj)">
- * {{obj.prop}}
- * </div>
- * ```
- *
- * <div class="alert alert-warning">
- * **Note:** `track by` must always be the last expression:
- * </div>
- * ```
- * <div ng-repeat="model in collection | orderBy: 'id' as filtered_result track by model.id">
- * {{model.name}}
- * </div>
- * ```
- *
- * # Special repeat start and end points
- * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending
- * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.
- * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)
- * up to and including the ending HTML tag where **ng-repeat-end** is placed.
- *
- * The example below makes use of this feature:
- * ```html
- * <header ng-repeat-start="item in items">
- * Header {{ item }}
- * </header>
- * <div class="body">
- * Body {{ item }}
- * </div>
- * <footer ng-repeat-end>
- * Footer {{ item }}
- * </footer>
- * ```
- *
- * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:
- * ```html
- * <header>
- * Header A
- * </header>
- * <div class="body">
- * Body A
- * </div>
- * <footer>
- * Footer A
- * </footer>
- * <header>
- * Header B
- * </header>
- * <div class="body">
- * Body B
- * </div>
- * <footer>
- * Footer B
- * </footer>
- * ```
- *
- * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such
- * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).
- *
- * @animations
- * **.enter** - when a new item is added to the list or when an item is revealed after a filter
- *
- * **.leave** - when an item is removed from the list or when an item is filtered out
- *
- * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered
- *
- * @element ANY
- * @scope
- * @priority 1000
- * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These
- * formats are currently supported:
- *
- * * `variable in expression` – where variable is the user defined loop variable and `expression`
- * is a scope expression giving the collection to enumerate.
- *
- * For example: `album in artist.albums`.
- *
- * * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,
- * and `expression` is the scope expression giving the collection to enumerate.
- *
- * For example: `(name, age) in {'adam':10, 'amalie':12}`.
- *
- * * `variable in expression track by tracking_expression` – You can also provide an optional tracking expression
- * which can be used to associate the objects in the collection with the DOM elements. If no tracking expression
- * is specified, ng-repeat associates elements by identity. It is an error to have
- * more than one tracking expression value resolve to the same key. (This would mean that two distinct objects are
- * mapped to the same DOM element, which is not possible.)
- *
- * Note that the tracking expression must come last, after any filters, and the alias expression.
- *
- * For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements
- * will be associated by item identity in the array.
- *
- * For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique
- * `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements
- * with the corresponding item in the array by identity. Moving the same object in array would move the DOM
- * element in the same way in the DOM.
- *
- * For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this
- * case the object identity does not matter. Two objects are considered equivalent as long as their `id`
- * property is same.
- *
- * For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter
- * to items in conjunction with a tracking expression.
- *
- * * `variable in expression as alias_expression` – You can also provide an optional alias expression which will then store the
- * intermediate results of the repeater after the filters have been applied. Typically this is used to render a special message
- * when a filter is active on the repeater, but the filtered result set is empty.
- *
- * For example: `item in items | filter:x as results` will store the fragment of the repeated items as `results`, but only after
- * the items have been processed through the filter.
- *
- * Please note that `as [variable name] is not an operator but rather a part of ngRepeat micro-syntax so it can be used only at the end
- * (and not as operator, inside an expression).
- *
- * For example: `item in items | filter : x | orderBy : order | limitTo : limit as results` .
- *
- * @example
- * This example initializes the scope to a list of names and
- * then uses `ngRepeat` to display every person:
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-init="friends = [
- {name:'John', age:25, gender:'boy'},
- {name:'Jessie', age:30, gender:'girl'},
- {name:'Johanna', age:28, gender:'girl'},
- {name:'Joy', age:15, gender:'girl'},
- {name:'Mary', age:28, gender:'girl'},
- {name:'Peter', age:95, gender:'boy'},
- {name:'Sebastian', age:50, gender:'boy'},
- {name:'Erika', age:27, gender:'girl'},
- {name:'Patrick', age:40, gender:'boy'},
- {name:'Samantha', age:60, gender:'girl'}
- ]">
- I have {{friends.length}} friends. They are:
- <input type="search" ng-model="q" placeholder="filter friends..." aria-label="filter friends" />
- <ul class="example-animate-container">
- <li class="animate-repeat" ng-repeat="friend in friends | filter:q as results">
- [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
- </li>
- <li class="animate-repeat" ng-if="results.length == 0">
- <strong>No results found...</strong>
- </li>
- </ul>
- </div>
- </file>
- <file name="animations.css">
- .example-animate-container {
- background:white;
- border:1px solid black;
- list-style:none;
- margin:0;
- padding:0 10px;
- }
-
- .animate-repeat {
- line-height:40px;
- list-style:none;
- box-sizing:border-box;
- }
-
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter,
- .animate-repeat.ng-leave {
- transition:all linear 0.5s;
- }
-
- .animate-repeat.ng-leave.ng-leave-active,
- .animate-repeat.ng-move,
- .animate-repeat.ng-enter {
- opacity:0;
- max-height:0;
- }
-
- .animate-repeat.ng-leave,
- .animate-repeat.ng-move.ng-move-active,
- .animate-repeat.ng-enter.ng-enter-active {
- opacity:1;
- max-height:40px;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var friends = element.all(by.repeater('friend in friends'));
-
- it('should render initial data set', function() {
- expect(friends.count()).toBe(10);
- expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');
- expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');
- expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');
- expect(element(by.binding('friends.length')).getText())
- .toMatch("I have 10 friends. They are:");
- });
-
- it('should update repeater when filter predicate changes', function() {
- expect(friends.count()).toBe(10);
-
- element(by.model('q')).sendKeys('ma');
-
- expect(friends.count()).toBe(2);
- expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');
- expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');
- });
- </file>
- </example>
- */
-var ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {
- var NG_REMOVED = '$$NG_REMOVED';
- var ngRepeatMinErr = minErr('ngRepeat');
-
- var updateScope = function(scope, index, valueIdentifier, value, keyIdentifier, key, arrayLength) {
- // TODO(perf): generate setters to shave off ~40ms or 1-1.5%
- scope[valueIdentifier] = value;
- if (keyIdentifier) scope[keyIdentifier] = key;
- scope.$index = index;
- scope.$first = (index === 0);
- scope.$last = (index === (arrayLength - 1));
- scope.$middle = !(scope.$first || scope.$last);
- // jshint bitwise: false
- scope.$odd = !(scope.$even = (index&1) === 0);
- // jshint bitwise: true
- };
-
- var getBlockStart = function(block) {
- return block.clone[0];
- };
-
- var getBlockEnd = function(block) {
- return block.clone[block.clone.length - 1];
- };
-
-
- return {
- restrict: 'A',
- multiElement: true,
- transclude: 'element',
- priority: 1000,
- terminal: true,
- $$tlb: true,
- compile: function ngRepeatCompile($element, $attr) {
- var expression = $attr.ngRepeat;
- var ngRepeatEndComment = document.createComment(' end ngRepeat: ' + expression + ' ');
-
- var match = expression.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
-
- if (!match) {
- throw ngRepeatMinErr('iexp', "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",
- expression);
- }
-
- var lhs = match[1];
- var rhs = match[2];
- var aliasAs = match[3];
- var trackByExp = match[4];
-
- match = lhs.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);
-
- if (!match) {
- throw ngRepeatMinErr('iidexp', "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",
- lhs);
- }
- var valueIdentifier = match[3] || match[1];
- var keyIdentifier = match[2];
-
- if (aliasAs && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(aliasAs) ||
- /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(aliasAs))) {
- throw ngRepeatMinErr('badident', "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",
- aliasAs);
- }
-
- var trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn;
- var hashFnLocals = {$id: hashKey};
-
- if (trackByExp) {
- trackByExpGetter = $parse(trackByExp);
- } else {
- trackByIdArrayFn = function(key, value) {
- return hashKey(value);
- };
- trackByIdObjFn = function(key) {
- return key;
- };
- }
-
- return function ngRepeatLink($scope, $element, $attr, ctrl, $transclude) {
-
- if (trackByExpGetter) {
- trackByIdExpFn = function(key, value, index) {
- // assign key, value, and $index to the locals so that they can be used in hash functions
- if (keyIdentifier) hashFnLocals[keyIdentifier] = key;
- hashFnLocals[valueIdentifier] = value;
- hashFnLocals.$index = index;
- return trackByExpGetter($scope, hashFnLocals);
- };
- }
-
- // Store a list of elements from previous run. This is a hash where key is the item from the
- // iterator, and the value is objects with following properties.
- // - scope: bound scope
- // - element: previous element.
- // - index: position
- //
- // We are using no-proto object so that we don't need to guard against inherited props via
- // hasOwnProperty.
- var lastBlockMap = createMap();
-
- //watch props
- $scope.$watchCollection(rhs, function ngRepeatAction(collection) {
- var index, length,
- previousNode = $element[0], // node that cloned nodes should be inserted after
- // initialized to the comment node anchor
- nextNode,
- // Same as lastBlockMap but it has the current state. It will become the
- // lastBlockMap on the next iteration.
- nextBlockMap = createMap(),
- collectionLength,
- key, value, // key/value of iteration
- trackById,
- trackByIdFn,
- collectionKeys,
- block, // last object information {scope, element, id}
- nextBlockOrder,
- elementsToRemove;
-
- if (aliasAs) {
- $scope[aliasAs] = collection;
- }
-
- if (isArrayLike(collection)) {
- collectionKeys = collection;
- trackByIdFn = trackByIdExpFn || trackByIdArrayFn;
- } else {
- trackByIdFn = trackByIdExpFn || trackByIdObjFn;
- // if object, extract keys, in enumeration order, unsorted
- collectionKeys = [];
- for (var itemKey in collection) {
- if (hasOwnProperty.call(collection, itemKey) && itemKey.charAt(0) !== '$') {
- collectionKeys.push(itemKey);
- }
- }
- }
-
- collectionLength = collectionKeys.length;
- nextBlockOrder = new Array(collectionLength);
-
- // locate existing items
- for (index = 0; index < collectionLength; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- trackById = trackByIdFn(key, value, index);
- if (lastBlockMap[trackById]) {
- // found previously seen block
- block = lastBlockMap[trackById];
- delete lastBlockMap[trackById];
- nextBlockMap[trackById] = block;
- nextBlockOrder[index] = block;
- } else if (nextBlockMap[trackById]) {
- // if collision detected. restore lastBlockMap and throw an error
- forEach(nextBlockOrder, function(block) {
- if (block && block.scope) lastBlockMap[block.id] = block;
- });
- throw ngRepeatMinErr('dupes',
- "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",
- expression, trackById, value);
- } else {
- // new never before seen block
- nextBlockOrder[index] = {id: trackById, scope: undefined, clone: undefined};
- nextBlockMap[trackById] = true;
- }
- }
-
- // remove leftover items
- for (var blockKey in lastBlockMap) {
- block = lastBlockMap[blockKey];
- elementsToRemove = getBlockNodes(block.clone);
- $animate.leave(elementsToRemove);
- if (elementsToRemove[0].parentNode) {
- // if the element was not removed yet because of pending animation, mark it as deleted
- // so that we can ignore it later
- for (index = 0, length = elementsToRemove.length; index < length; index++) {
- elementsToRemove[index][NG_REMOVED] = true;
- }
- }
- block.scope.$destroy();
- }
-
- // we are not using forEach for perf reasons (trying to avoid #call)
- for (index = 0; index < collectionLength; index++) {
- key = (collection === collectionKeys) ? index : collectionKeys[index];
- value = collection[key];
- block = nextBlockOrder[index];
-
- if (block.scope) {
- // if we have already seen this object, then we need to reuse the
- // associated scope/element
-
- nextNode = previousNode;
-
- // skip nodes that are already pending removal via leave animation
- do {
- nextNode = nextNode.nextSibling;
- } while (nextNode && nextNode[NG_REMOVED]);
-
- if (getBlockStart(block) != nextNode) {
- // existing item which got moved
- $animate.move(getBlockNodes(block.clone), null, jqLite(previousNode));
- }
- previousNode = getBlockEnd(block);
- updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);
- } else {
- // new item which we don't know about
- $transclude(function ngRepeatTransclude(clone, scope) {
- block.scope = scope;
- // http://jsperf.com/clone-vs-createcomment
- var endNode = ngRepeatEndComment.cloneNode(false);
- clone[clone.length++] = endNode;
-
- // TODO(perf): support naked previousNode in `enter` to avoid creation of jqLite wrapper?
- $animate.enter(clone, null, jqLite(previousNode));
- previousNode = endNode;
- // Note: We only need the first/last node of the cloned nodes.
- // However, we need to keep the reference to the jqlite wrapper as it might be changed later
- // by a directive with templateUrl when its template arrives.
- block.clone = clone;
- nextBlockMap[block.id] = block;
- updateScope(block.scope, index, valueIdentifier, value, keyIdentifier, key, collectionLength);
- });
- }
- }
- lastBlockMap = nextBlockMap;
- });
- };
- }
- };
-}];
-
-var NG_HIDE_CLASS = 'ng-hide';
-var NG_HIDE_IN_PROGRESS_CLASS = 'ng-hide-animate';
-/**
- * @ngdoc directive
- * @name ngShow
- * @multiElement
- *
- * @description
- * The `ngShow` directive shows or hides the given HTML element based on the expression
- * provided to the `ngShow` attribute. The element is shown or hidden by removing or adding
- * the `.ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is visible) -->
- * <div ng-show="myValue"></div>
- *
- * <!-- when $scope.myValue is falsy (element is hidden) -->
- * <div ng-show="myValue" class="ng-hide"></div>
- * ```
- *
- * When the `ngShow` expression evaluates to a falsy value then the `.ng-hide` CSS class is added to the class
- * attribute on the element causing it to become hidden. When truthy, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class CSS. Note that the selector that needs to be used is actually `.ng-hide:not(.ng-hide-animate)` to cope
- * with extra animation classes that can be added.
- *
- * ```css
- * .ng-hide:not(.ng-hide-animate) {
- * /&#42; this is just another form of hiding an element &#42;/
- * display: block!important;
- * position: absolute;
- * top: -9999px;
- * left: -9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngShow`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass except that
- * you must also include the !important flag to override the display property
- * so that you can perform an animation when the element is hidden during the time of the animation.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * /&#42; this is required as of 1.3x to properly
- * apply all styling in a show/hide animation &#42;/
- * transition: 0s linear all;
- * }
- *
- * .my-element.ng-hide-add-active,
- * .my-element.ng-hide-remove-active {
- * /&#42; the transition is defined in the active class &#42;/
- * transition: 1s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * addClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a truthy value and the just before contents are set to visible
- * removeClass: `.ng-hide` - happens after the `ngShow` expression evaluates to a non truthy value and just before the contents are set to hidden
- *
- * @element ANY
- * @param {expression} ngShow If the {@link guide/expression expression} is truthy
- * then the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" aria-label="Toggle ngHide"><br/>
- <div>
- Show:
- <div class="check-element animate-show" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-show" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);
- </file>
- <file name="animations.css">
- .animate-show {
- line-height: 20px;
- opacity: 1;
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
-
- .animate-show.ng-hide-add, .animate-show.ng-hide-remove {
- transition: all linear 0.5s;
- }
-
- .animate-show.ng-hide {
- line-height: 0;
- opacity: 0;
- padding: 0 10px;
- }
-
- .check-element {
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngShowDirective = ['$animate', function($animate) {
- return {
- restrict: 'A',
- multiElement: true,
- link: function(scope, element, attr) {
- scope.$watch(attr.ngShow, function ngShowWatchAction(value) {
- // we're adding a temporary, animation-specific class for ng-hide since this way
- // we can control when the element is actually displayed on screen without having
- // to have a global/greedy CSS selector that breaks when other animations are run.
- // Read: https://github.com/angular/angular.js/issues/9103#issuecomment-58335845
- $animate[value ? 'removeClass' : 'addClass'](element, NG_HIDE_CLASS, {
- tempClasses: NG_HIDE_IN_PROGRESS_CLASS
- });
- });
- }
- };
-}];
-
-
-/**
- * @ngdoc directive
- * @name ngHide
- * @multiElement
- *
- * @description
- * The `ngHide` directive shows or hides the given HTML element based on the expression
- * provided to the `ngHide` attribute. The element is shown or hidden by removing or adding
- * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined
- * in AngularJS and sets the display style to none (using an !important flag).
- * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).
- *
- * ```html
- * <!-- when $scope.myValue is truthy (element is hidden) -->
- * <div ng-hide="myValue" class="ng-hide"></div>
- *
- * <!-- when $scope.myValue is falsy (element is visible) -->
- * <div ng-hide="myValue"></div>
- * ```
- *
- * When the `ngHide` expression evaluates to a truthy value then the `.ng-hide` CSS class is added to the class
- * attribute on the element causing it to become hidden. When falsy, the `.ng-hide` CSS class is removed
- * from the element causing the element not to appear hidden.
- *
- * ## Why is !important used?
- *
- * You may be wondering why !important is used for the `.ng-hide` CSS class. This is because the `.ng-hide` selector
- * can be easily overridden by heavier selectors. For example, something as simple
- * as changing the display style on a HTML list item would make hidden elements appear visible.
- * This also becomes a bigger issue when dealing with CSS frameworks.
- *
- * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector
- * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the
- * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.
- *
- * ### Overriding `.ng-hide`
- *
- * By default, the `.ng-hide` class will style the element with `display: none!important`. If you wish to change
- * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`
- * class in CSS:
- *
- * ```css
- * .ng-hide {
- * /&#42; this is just another form of hiding an element &#42;/
- * display: block!important;
- * position: absolute;
- * top: -9999px;
- * left: -9999px;
- * }
- * ```
- *
- * By default you don't need to override in CSS anything and the animations will work around the display style.
- *
- * ## A note about animations with `ngHide`
- *
- * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression
- * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`
- * CSS class is added and removed for you instead of your own CSS class.
- *
- * ```css
- * //
- * //a working example can be found at the bottom of this page
- * //
- * .my-element.ng-hide-add, .my-element.ng-hide-remove {
- * transition: 0.5s linear all;
- * }
- *
- * .my-element.ng-hide-add { ... }
- * .my-element.ng-hide-add.ng-hide-add-active { ... }
- * .my-element.ng-hide-remove { ... }
- * .my-element.ng-hide-remove.ng-hide-remove-active { ... }
- * ```
- *
- * Keep in mind that, as of AngularJS version 1.3.0-beta.11, there is no need to change the display
- * property to block during animation states--ngAnimate will handle the style toggling automatically for you.
- *
- * @animations
- * removeClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a truthy value and just before the contents are set to hidden
- * addClass: `.ng-hide` - happens after the `ngHide` expression evaluates to a non truthy value and just before the contents are set to visible
- *
- * @element ANY
- * @param {expression} ngHide If the {@link guide/expression expression} is truthy then
- * the element is shown or hidden respectively.
- *
- * @example
- <example module="ngAnimate" deps="angular-animate.js" animations="true">
- <file name="index.html">
- Click me: <input type="checkbox" ng-model="checked" aria-label="Toggle ngShow"><br/>
- <div>
- Show:
- <div class="check-element animate-hide" ng-show="checked">
- <span class="glyphicon glyphicon-thumbs-up"></span> I show up when your checkbox is checked.
- </div>
- </div>
- <div>
- Hide:
- <div class="check-element animate-hide" ng-hide="checked">
- <span class="glyphicon glyphicon-thumbs-down"></span> I hide when your checkbox is checked.
- </div>
- </div>
- </file>
- <file name="glyphicons.css">
- @import url(../../components/bootstrap-3.1.1/css/bootstrap.css);
- </file>
- <file name="animations.css">
- .animate-hide {
- transition: all linear 0.5s;
- line-height: 20px;
- opacity: 1;
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
-
- .animate-hide.ng-hide {
- line-height: 0;
- opacity: 0;
- padding: 0 10px;
- }
-
- .check-element {
- padding: 10px;
- border: 1px solid black;
- background: white;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));
- var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));
-
- it('should check ng-show / ng-hide', function() {
- expect(thumbsUp.isDisplayed()).toBeFalsy();
- expect(thumbsDown.isDisplayed()).toBeTruthy();
-
- element(by.model('checked')).click();
-
- expect(thumbsUp.isDisplayed()).toBeTruthy();
- expect(thumbsDown.isDisplayed()).toBeFalsy();
- });
- </file>
- </example>
- */
-var ngHideDirective = ['$animate', function($animate) {
- return {
- restrict: 'A',
- multiElement: true,
- link: function(scope, element, attr) {
- scope.$watch(attr.ngHide, function ngHideWatchAction(value) {
- // The comment inside of the ngShowDirective explains why we add and
- // remove a temporary class for the show/hide animation
- $animate[value ? 'addClass' : 'removeClass'](element,NG_HIDE_CLASS, {
- tempClasses: NG_HIDE_IN_PROGRESS_CLASS
- });
- });
- }
- };
-}];
-
-/**
- * @ngdoc directive
- * @name ngStyle
- * @restrict AC
- *
- * @description
- * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.
- *
- * @element ANY
- * @param {expression} ngStyle
- *
- * {@link guide/expression Expression} which evals to an
- * object whose keys are CSS style names and values are corresponding values for those CSS
- * keys.
- *
- * Since some CSS style names are not valid keys for an object, they must be quoted.
- * See the 'background-color' style in the example below.
- *
- * @example
- <example>
- <file name="index.html">
- <input type="button" value="set color" ng-click="myStyle={color:'red'}">
- <input type="button" value="set background" ng-click="myStyle={'background-color':'blue'}">
- <input type="button" value="clear" ng-click="myStyle={}">
- <br/>
- <span ng-style="myStyle">Sample Text</span>
- <pre>myStyle={{myStyle}}</pre>
- </file>
- <file name="style.css">
- span {
- color: black;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var colorSpan = element(by.css('span'));
-
- it('should check ng-style', function() {
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- element(by.css('input[value=\'set color\']')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');
- element(by.css('input[value=clear]')).click();
- expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');
- });
- </file>
- </example>
- */
-var ngStyleDirective = ngDirective(function(scope, element, attr) {
- scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {
- if (oldStyles && (newStyles !== oldStyles)) {
- forEach(oldStyles, function(val, style) { element.css(style, '');});
- }
- if (newStyles) element.css(newStyles);
- }, true);
-});
-
-/**
- * @ngdoc directive
- * @name ngSwitch
- * @restrict EA
- *
- * @description
- * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.
- * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location
- * as specified in the template.
- *
- * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it
- * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element
- * matches the value obtained from the evaluated expression. In other words, you define a container element
- * (where you place the directive), place an expression on the **`on="..."` attribute**
- * (or the **`ng-switch="..."` attribute**), define any inner elements inside of the directive and place
- * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on
- * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default
- * attribute is displayed.
- *
- * <div class="alert alert-info">
- * Be aware that the attribute values to match against cannot be expressions. They are interpreted
- * as literal string values to match against.
- * For example, **`ng-switch-when="someVal"`** will match against the string `"someVal"` not against the
- * value of the expression `$scope.someVal`.
- * </div>
-
- * @animations
- * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container
- * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM
- *
- * @usage
- *
- * ```
- * <ANY ng-switch="expression">
- * <ANY ng-switch-when="matchValue1">...</ANY>
- * <ANY ng-switch-when="matchValue2">...</ANY>
- * <ANY ng-switch-default>...</ANY>
- * </ANY>
- * ```
- *
- *
- * @scope
- * @priority 1200
- * @param {*} ngSwitch|on expression to match against <code>ng-switch-when</code>.
- * On child elements add:
- *
- * * `ngSwitchWhen`: the case statement to match against. If match then this
- * case will be displayed. If the same match appears multiple times, all the
- * elements will be displayed.
- * * `ngSwitchDefault`: the default case when no other case match. If there
- * are multiple default cases, all of them will be displayed when no other
- * case match.
- *
- *
- * @example
- <example module="switchExample" deps="angular-animate.js" animations="true">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <select ng-model="selection" ng-options="item for item in items">
- </select>
- <code>selection={{selection}}</code>
- <hr/>
- <div class="animate-switch-container"
- ng-switch on="selection">
- <div class="animate-switch" ng-switch-when="settings">Settings Div</div>
- <div class="animate-switch" ng-switch-when="home">Home Span</div>
- <div class="animate-switch" ng-switch-default>default</div>
- </div>
- </div>
- </file>
- <file name="script.js">
- angular.module('switchExample', ['ngAnimate'])
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.items = ['settings', 'home', 'other'];
- $scope.selection = $scope.items[0];
- }]);
- </file>
- <file name="animations.css">
- .animate-switch-container {
- position:relative;
- background:white;
- border:1px solid black;
- height:40px;
- overflow:hidden;
- }
-
- .animate-switch {
- padding:10px;
- }
-
- .animate-switch.ng-animate {
- transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;
-
- position:absolute;
- top:0;
- left:0;
- right:0;
- bottom:0;
- }
-
- .animate-switch.ng-leave.ng-leave-active,
- .animate-switch.ng-enter {
- top:-50px;
- }
- .animate-switch.ng-leave,
- .animate-switch.ng-enter.ng-enter-active {
- top:0;
- }
- </file>
- <file name="protractor.js" type="protractor">
- var switchElem = element(by.css('[ng-switch]'));
- var select = element(by.model('selection'));
-
- it('should start in settings', function() {
- expect(switchElem.getText()).toMatch(/Settings Div/);
- });
- it('should change to home', function() {
- select.all(by.css('option')).get(1).click();
- expect(switchElem.getText()).toMatch(/Home Span/);
- });
- it('should select default', function() {
- select.all(by.css('option')).get(2).click();
- expect(switchElem.getText()).toMatch(/default/);
- });
- </file>
- </example>
- */
-var ngSwitchDirective = ['$animate', function($animate) {
- return {
- require: 'ngSwitch',
-
- // asks for $scope to fool the BC controller module
- controller: ['$scope', function ngSwitchController() {
- this.cases = {};
- }],
- link: function(scope, element, attr, ngSwitchController) {
- var watchExpr = attr.ngSwitch || attr.on,
- selectedTranscludes = [],
- selectedElements = [],
- previousLeaveAnimations = [],
- selectedScopes = [];
-
- var spliceFactory = function(array, index) {
- return function() { array.splice(index, 1); };
- };
-
- scope.$watch(watchExpr, function ngSwitchWatchAction(value) {
- var i, ii;
- for (i = 0, ii = previousLeaveAnimations.length; i < ii; ++i) {
- $animate.cancel(previousLeaveAnimations[i]);
- }
- previousLeaveAnimations.length = 0;
-
- for (i = 0, ii = selectedScopes.length; i < ii; ++i) {
- var selected = getBlockNodes(selectedElements[i].clone);
- selectedScopes[i].$destroy();
- var promise = previousLeaveAnimations[i] = $animate.leave(selected);
- promise.then(spliceFactory(previousLeaveAnimations, i));
- }
-
- selectedElements.length = 0;
- selectedScopes.length = 0;
-
- if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {
- forEach(selectedTranscludes, function(selectedTransclude) {
- selectedTransclude.transclude(function(caseElement, selectedScope) {
- selectedScopes.push(selectedScope);
- var anchor = selectedTransclude.element;
- caseElement[caseElement.length++] = document.createComment(' end ngSwitchWhen: ');
- var block = { clone: caseElement };
-
- selectedElements.push(block);
- $animate.enter(caseElement, anchor.parent(), anchor);
- });
- });
- }
- });
- }
- };
-}];
-
-var ngSwitchWhenDirective = ngDirective({
- transclude: 'element',
- priority: 1200,
- require: '^ngSwitch',
- multiElement: true,
- link: function(scope, element, attrs, ctrl, $transclude) {
- ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);
- ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });
- }
-});
-
-var ngSwitchDefaultDirective = ngDirective({
- transclude: 'element',
- priority: 1200,
- require: '^ngSwitch',
- multiElement: true,
- link: function(scope, element, attr, ctrl, $transclude) {
- ctrl.cases['?'] = (ctrl.cases['?'] || []);
- ctrl.cases['?'].push({ transclude: $transclude, element: element });
- }
-});
-
-/**
- * @ngdoc directive
- * @name ngTransclude
- * @restrict EAC
- *
- * @description
- * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.
- *
- * You can specify that you want to insert a named transclusion slot, instead of the default slot, by providing the slot name
- * as the value of the `ng-transclude` or `ng-transclude-slot` attribute.
- *
- * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.
- *
- * @element ANY
- *
- * @param {string} ngTransclude|ngTranscludeSlot the name of the slot to insert at this point. If this is not provided or empty then
- * the default slot is used.
- *
- * @example
- * ### Default transclusion
- * This example demonstrates simple transclusion.
- <example name="simpleTranscludeExample" module="transcludeExample">
- <file name="index.html">
- <script>
- angular.module('transcludeExample', [])
- .directive('pane', function(){
- return {
- restrict: 'E',
- transclude: true,
- scope: { title:'@' },
- template: '<div style="border: 1px solid black;">' +
- '<div style="background-color: gray">{{title}}</div>' +
- '<ng-transclude></ng-transclude>' +
- '</div>'
- };
- })
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.title = 'Lorem Ipsum';
- $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
- }]);
- </script>
- <div ng-controller="ExampleController">
- <input ng-model="title" aria-label="title"> <br/>
- <textarea ng-model="text" aria-label="text"></textarea> <br/>
- <pane title="{{title}}">{{text}}</pane>
- </div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should have transcluded', function() {
- var titleElement = element(by.model('title'));
- titleElement.clear();
- titleElement.sendKeys('TITLE');
- var textElement = element(by.model('text'));
- textElement.clear();
- textElement.sendKeys('TEXT');
- expect(element(by.binding('title')).getText()).toEqual('TITLE');
- expect(element(by.binding('text')).getText()).toEqual('TEXT');
- });
- </file>
- </example>
- *
- * @example
- * ### Multi-slot transclusion
- <example name="multiSlotTranscludeExample" module="multiSlotTranscludeExample">
- <file name="index.html">
- <div ng-controller="ExampleController">
- <input ng-model="title" aria-label="title"> <br/>
- <textarea ng-model="text" aria-label="text"></textarea> <br/>
- <pane>
- <pane-title><a ng-href="{{link}}">{{title}}</a></pane-title>
- <pane-body><p>{{text}}</p></pane-body>
- </pane>
- </div>
- </file>
- <file name="app.js">
- angular.module('multiSlotTranscludeExample', [])
- .directive('pane', function(){
- return {
- restrict: 'E',
- transclude: {
- 'paneTitle': '?title',
- 'paneBody': 'body'
- },
- template: '<div style="border: 1px solid black;">' +
- '<div ng-transclude="title" style="background-color: gray"></div>' +
- '<div ng-transclude="body"></div>' +
- '</div>'
- };
- })
- .controller('ExampleController', ['$scope', function($scope) {
- $scope.title = 'Lorem Ipsum';
- $scope.link = "https://google.com";
- $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';
- }]);
- </file>
- <file name="protractor.js" type="protractor">
- it('should have transcluded the title and the body', function() {
- var titleElement = element(by.model('title'));
- titleElement.clear();
- titleElement.sendKeys('TITLE');
- var textElement = element(by.model('text'));
- textElement.clear();
- textElement.sendKeys('TEXT');
- expect(element(by.binding('title')).getText()).toEqual('TITLE');
- expect(element(by.binding('text')).getText()).toEqual('TEXT');
- });
- </file>
- </example> */
-var ngTranscludeMinErr = minErr('ngTransclude');
-var ngTranscludeDirective = ngDirective({
- restrict: 'EAC',
- link: function($scope, $element, $attrs, controller, $transclude) {
-
- function ngTranscludeCloneAttachFn(clone) {
- $element.empty();
- $element.append(clone);
- }
-
- if (!$transclude) {
- throw ngTranscludeMinErr('orphan',
- 'Illegal use of ngTransclude directive in the template! ' +
- 'No parent directive that requires a transclusion found. ' +
- 'Element: {0}',
- startingTag($element));
- }
-
- $transclude(ngTranscludeCloneAttachFn, null, $attrs.ngTransclude || $attrs.ngTranscludeSlot);
- }
-});
-
-/**
- * @ngdoc directive
- * @name script
- * @restrict E
- *
- * @description
- * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the
- * template can be used by {@link ng.directive:ngInclude `ngInclude`},
- * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the
- * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be
- * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.
- *
- * @param {string} type Must be set to `'text/ng-template'`.
- * @param {string} id Cache name of the template.
- *
- * @example
- <example>
- <file name="index.html">
- <script type="text/ng-template" id="/tpl.html">
- Content of the template.
- </script>
-
- <a ng-click="currentTpl='/tpl.html'" id="tpl-link">Load inlined template</a>
- <div id="tpl-content" ng-include src="currentTpl"></div>
- </file>
- <file name="protractor.js" type="protractor">
- it('should load template defined inside script tag', function() {
- element(by.css('#tpl-link')).click();
- expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);
- });
- </file>
- </example>
- */
-var scriptDirective = ['$templateCache', function($templateCache) {
- return {
- restrict: 'E',
- terminal: true,
- compile: function(element, attr) {
- if (attr.type == 'text/ng-template') {
- var templateUrl = attr.id,
- text = element[0].text;
-
- $templateCache.put(templateUrl, text);
- }
- }
- };
-}];
-
-var noopNgModelController = { $setViewValue: noop, $render: noop };
-
-function chromeHack(optionElement) {
- // Workaround for https://code.google.com/p/chromium/issues/detail?id=381459
- // Adding an <option selected="selected"> element to a <select required="required"> should
- // automatically select the new element
- if (optionElement[0].hasAttribute('selected')) {
- optionElement[0].selected = true;
- }
-}
-
-/**
- * @ngdoc type
- * @name select.SelectController
- * @description
- * The controller for the `<select>` directive. This provides support for reading
- * and writing the selected value(s) of the control and also coordinates dynamically
- * added `<option>` elements, perhaps by an `ngRepeat` directive.
- */
-var SelectController =
- ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {
-
- var self = this,
- optionsMap = new HashMap();
-
- // If the ngModel doesn't get provided then provide a dummy noop version to prevent errors
- self.ngModelCtrl = noopNgModelController;
-
- // The "unknown" option is one that is prepended to the list if the viewValue
- // does not match any of the options. When it is rendered the value of the unknown
- // option is '? XXX ?' where XXX is the hashKey of the value that is not known.
- //
- // We can't just jqLite('<option>') since jqLite is not smart enough
- // to create it in <select> and IE barfs otherwise.
- self.unknownOption = jqLite(document.createElement('option'));
- self.renderUnknownOption = function(val) {
- var unknownVal = '? ' + hashKey(val) + ' ?';
- self.unknownOption.val(unknownVal);
- $element.prepend(self.unknownOption);
- $element.val(unknownVal);
- };
-
- $scope.$on('$destroy', function() {
- // disable unknown option so that we don't do work when the whole select is being destroyed
- self.renderUnknownOption = noop;
- });
-
- self.removeUnknownOption = function() {
- if (self.unknownOption.parent()) self.unknownOption.remove();
- };
-
-
- // Read the value of the select control, the implementation of this changes depending
- // upon whether the select can have multiple values and whether ngOptions is at work.
- self.readValue = function readSingleValue() {
- self.removeUnknownOption();
- return $element.val();
- };
-
-
- // Write the value to the select control, the implementation of this changes depending
- // upon whether the select can have multiple values and whether ngOptions is at work.
- self.writeValue = function writeSingleValue(value) {
- if (self.hasOption(value)) {
- self.removeUnknownOption();
- $element.val(value);
- if (value === '') self.emptyOption.prop('selected', true); // to make IE9 happy
- } else {
- if (value == null && self.emptyOption) {
- self.removeUnknownOption();
- $element.val('');
- } else {
- self.renderUnknownOption(value);
- }
- }
- };
-
-
- // Tell the select control that an option, with the given value, has been added
- self.addOption = function(value, element) {
- assertNotHasOwnProperty(value, '"option value"');
- if (value === '') {
- self.emptyOption = element;
- }
- var count = optionsMap.get(value) || 0;
- optionsMap.put(value, count + 1);
- self.ngModelCtrl.$render();
- chromeHack(element);
- };
-
- // Tell the select control that an option, with the given value, has been removed
- self.removeOption = function(value) {
- var count = optionsMap.get(value);
- if (count) {
- if (count === 1) {
- optionsMap.remove(value);
- if (value === '') {
- self.emptyOption = undefined;
- }
- } else {
- optionsMap.put(value, count - 1);
- }
- }
- };
-
- // Check whether the select control has an option matching the given value
- self.hasOption = function(value) {
- return !!optionsMap.get(value);
- };
-
-
- self.registerOption = function(optionScope, optionElement, optionAttrs, interpolateValueFn, interpolateTextFn) {
-
- if (interpolateValueFn) {
- // The value attribute is interpolated
- var oldVal;
- optionAttrs.$observe('value', function valueAttributeObserveAction(newVal) {
- if (isDefined(oldVal)) {
- self.removeOption(oldVal);
- }
- oldVal = newVal;
- self.addOption(newVal, optionElement);
- });
- } else if (interpolateTextFn) {
- // The text content is interpolated
- optionScope.$watch(interpolateTextFn, function interpolateWatchAction(newVal, oldVal) {
- optionAttrs.$set('value', newVal);
- if (oldVal !== newVal) {
- self.removeOption(oldVal);
- }
- self.addOption(newVal, optionElement);
- });
- } else {
- // The value attribute is static
- self.addOption(optionAttrs.value, optionElement);
- }
-
- optionElement.on('$destroy', function() {
- self.removeOption(optionAttrs.value);
- self.ngModelCtrl.$render();
- });
- };
-}];
-
-/**
- * @ngdoc directive
- * @name select
- * @restrict E
- *
- * @description
- * HTML `SELECT` element with angular data-binding.
- *
- * The `select` directive is used together with {@link ngModel `ngModel`} to provide data-binding
- * between the scope and the `<select>` control (including setting default values).
- * ÃŒt also handles dynamic `<option>` elements, which can be added using the {@link ngRepeat `ngRepeat}` or
- * {@link ngOptions `ngOptions`} directives.
- *
- * When an item in the `<select>` menu is selected, the value of the selected option will be bound
- * to the model identified by the `ngModel` directive. With static or repeated options, this is
- * the content of the `value` attribute or the textContent of the `<option>`, if the value attribute is missing.
- * If you want dynamic value attributes, you can use interpolation inside the value attribute.
- *
- * <div class="alert alert-warning">
- * Note that the value of a `select` directive used without `ngOptions` is always a string.
- * When the model needs to be bound to a non-string value, you must either explictly convert it
- * using a directive (see example below) or use `ngOptions` to specify the set of options.
- * This is because an option element can only be bound to string values at present.
- * </div>
- *
- * If the viewValue of `ngModel` does not match any of the options, then the control
- * will automatically add an "unknown" option, which it then removes when the mismatch is resolved.
- *
- * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can
- * be nested into the `<select>` element. This element will then represent the `null` or "not selected"
- * option. See example below for demonstration.
- *
- * <div class="alert alert-info">
- * In many cases, `ngRepeat` can be used on `<option>` elements instead of {@link ng.directive:ngOptions
- * ngOptions} to achieve a similar result. However, `ngOptions` provides some benefits, such as
- * more flexibility in how the `<select>`'s model is assigned via the `select` **`as`** part of the
- * comprehension expression, and additionally in reducing memory and increasing speed by not creating
- * a new scope for each repeated instance.
- * </div>
- *
- *
- * @param {string} ngModel Assignable angular expression to data-bind to.
- * @param {string=} name Property name of the form under which the control is published.
- * @param {string=} multiple Allows multiple options to be selected. The selected values will be
- * bound to the model as an array.
- * @param {string=} required Sets `required` validation error key if the value is not entered.
- * @param {string=} ngRequired Adds required attribute and required validation constraint to
- * the element when the ngRequired expression evaluates to true. Use ngRequired instead of required
- * when you want to data-bind to the required attribute.
- * @param {string=} ngChange Angular expression to be executed when selected option(s) changes due to user
- * interaction with the select element.
- * @param {string=} ngOptions sets the options that the select is populated with and defines what is
- * set on the model on selection. See {@link ngOptions `ngOptions`}.
- *
- * @example
- * ### Simple `select` elements with static options
- *
- * <example name="static-select" module="staticSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="singleSelect"> Single select: </label><br>
- * <select name="singleSelect" ng-model="data.singleSelect">
- * <option value="option-1">Option 1</option>
- * <option value="option-2">Option 2</option>
- * </select><br>
- *
- * <label for="singleSelect"> Single select with "not selected" option and dynamic option values: </label><br>
- * <select name="singleSelect" id="singleSelect" ng-model="data.singleSelect">
- * <option value="">---Please select---</option> <!-- not selected / blank option -->
- * <option value="{{data.option1}}">Option 1</option> <!-- interpolation -->
- * <option value="option-2">Option 2</option>
- * </select><br>
- * <button ng-click="forceUnknownOption()">Force unknown option</button><br>
- * <tt>singleSelect = {{data.singleSelect}}</tt>
- *
- * <hr>
- * <label for="multipleSelect"> Multiple select: </label><br>
- * <select name="multipleSelect" id="multipleSelect" ng-model="data.multipleSelect" multiple>
- * <option value="option-1">Option 1</option>
- * <option value="option-2">Option 2</option>
- * <option value="option-3">Option 3</option>
- * </select><br>
- * <tt>multipleSelect = {{data.multipleSelect}}</tt><br/>
- * </form>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('staticSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * singleSelect: null,
- * multipleSelect: [],
- * option1: 'option-1',
- * };
- *
- * $scope.forceUnknownOption = function() {
- * $scope.data.singleSelect = 'nonsense';
- * };
- * }]);
- * </file>
- *</example>
- *
- * ### Using `ngRepeat` to generate `select` options
- * <example name="ngrepeat-select" module="ngrepeatSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="repeatSelect"> Repeat select: </label>
- * <select name="repeatSelect" id="repeatSelect" ng-model="data.repeatSelect">
- * <option ng-repeat="option in data.availableOptions" value="{{option.id}}">{{option.name}}</option>
- * </select>
- * </form>
- * <hr>
- * <tt>repeatSelect = {{data.repeatSelect}}</tt><br/>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('ngrepeatSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * repeatSelect: null,
- * availableOptions: [
- * {id: '1', name: 'Option A'},
- * {id: '2', name: 'Option B'},
- * {id: '3', name: 'Option C'}
- * ],
- * };
- * }]);
- * </file>
- *</example>
- *
- *
- * ### Using `select` with `ngOptions` and setting a default value
- * See the {@link ngOptions ngOptions documentation} for more `ngOptions` usage examples.
- *
- * <example name="select-with-default-values" module="defaultValueSelect">
- * <file name="index.html">
- * <div ng-controller="ExampleController">
- * <form name="myForm">
- * <label for="mySelect">Make a choice:</label>
- * <select name="mySelect" id="mySelect"
- * ng-options="option.name for option in data.availableOptions track by option.id"
- * ng-model="data.selectedOption"></select>
- * </form>
- * <hr>
- * <tt>option = {{data.selectedOption}}</tt><br/>
- * </div>
- * </file>
- * <file name="app.js">
- * angular.module('defaultValueSelect', [])
- * .controller('ExampleController', ['$scope', function($scope) {
- * $scope.data = {
- * availableOptions: [
- * {id: '1', name: 'Option A'},
- * {id: '2', name: 'Option B'},
- * {id: '3', name: 'Option C'}
- * ],
- * selectedOption: {id: '3', name: 'Option C'} //This sets the default value of the select in the ui
- * };
- * }]);
- * </file>
- *</example>
- *
- *
- * ### Binding `select` to a non-string value via `ngModel` parsing / formatting
- *
- * <example name="select-with-non-string-options" module="nonStringSelect">
- * <file name="index.html">
- * <select ng-model="model.id" convert-to-number>
- * <option value="0">Zero</option>
- * <option value="1">One</option>
- * <option value="2">Two</option>
- * </select>
- * {{ model }}
- * </file>
- * <file name="app.js">
- * angular.module('nonStringSelect', [])
- * .run(function($rootScope) {
- * $rootScope.model = { id: 2 };
- * })
- * .directive('convertToNumber', function() {
- * return {
- * require: 'ngModel',
- * link: function(scope, element, attrs, ngModel) {
- * ngModel.$parsers.push(function(val) {
- * return parseInt(val, 10);
- * });
- * ngModel.$formatters.push(function(val) {
- * return '' + val;
- * });
- * }
- * };
- * });
- * </file>
- * <file name="protractor.js" type="protractor">
- * it('should initialize to model', function() {
- * var select = element(by.css('select'));
- * expect(element(by.model('model.id')).$('option:checked').getText()).toEqual('Two');
- * });
- * </file>
- * </example>
- *
- */
-var selectDirective = function() {
-
- return {
- restrict: 'E',
- require: ['select', '?ngModel'],
- controller: SelectController,
- priority: 1,
- link: {
- pre: selectPreLink
- }
- };
-
- function selectPreLink(scope, element, attr, ctrls) {
-
- // if ngModel is not defined, we don't need to do anything
- var ngModelCtrl = ctrls[1];
- if (!ngModelCtrl) return;
-
- var selectCtrl = ctrls[0];
-
- selectCtrl.ngModelCtrl = ngModelCtrl;
-
- // We delegate rendering to the `writeValue` method, which can be changed
- // if the select can have multiple selected values or if the options are being
- // generated by `ngOptions`
- ngModelCtrl.$render = function() {
- selectCtrl.writeValue(ngModelCtrl.$viewValue);
- };
-
- // When the selected item(s) changes we delegate getting the value of the select control
- // to the `readValue` method, which can be changed if the select can have multiple
- // selected values or if the options are being generated by `ngOptions`
- element.on('change', function() {
- scope.$apply(function() {
- ngModelCtrl.$setViewValue(selectCtrl.readValue());
- });
- });
-
- // If the select allows multiple values then we need to modify how we read and write
- // values from and to the control; also what it means for the value to be empty and
- // we have to add an extra watch since ngModel doesn't work well with arrays - it
- // doesn't trigger rendering if only an item in the array changes.
- if (attr.multiple) {
-
- // Read value now needs to check each option to see if it is selected
- selectCtrl.readValue = function readMultipleValue() {
- var array = [];
- forEach(element.find('option'), function(option) {
- if (option.selected) {
- array.push(option.value);
- }
- });
- return array;
- };
-
- // Write value now needs to set the selected property of each matching option
- selectCtrl.writeValue = function writeMultipleValue(value) {
- var items = new HashMap(value);
- forEach(element.find('option'), function(option) {
- option.selected = isDefined(items.get(option.value));
- });
- };
-
- // we have to do it on each watch since ngModel watches reference, but
- // we need to work of an array, so we need to see if anything was inserted/removed
- var lastView, lastViewRef = NaN;
- scope.$watch(function selectMultipleWatch() {
- if (lastViewRef === ngModelCtrl.$viewValue && !equals(lastView, ngModelCtrl.$viewValue)) {
- lastView = shallowCopy(ngModelCtrl.$viewValue);
- ngModelCtrl.$render();
- }
- lastViewRef = ngModelCtrl.$viewValue;
- });
-
- // If we are a multiple select then value is now a collection
- // so the meaning of $isEmpty changes
- ngModelCtrl.$isEmpty = function(value) {
- return !value || value.length === 0;
- };
-
- }
- }
-};
-
-
-// The option directive is purely designed to communicate the existence (or lack of)
-// of dynamically created (and destroyed) option elements to their containing select
-// directive via its controller.
-var optionDirective = ['$interpolate', function($interpolate) {
- return {
- restrict: 'E',
- priority: 100,
- compile: function(element, attr) {
-
- if (isDefined(attr.value)) {
- // If the value attribute is defined, check if it contains an interpolation
- var interpolateValueFn = $interpolate(attr.value, true);
- } else {
- // If the value attribute is not defined then we fall back to the
- // text content of the option element, which may be interpolated
- var interpolateTextFn = $interpolate(element.text(), true);
- if (!interpolateTextFn) {
- attr.$set('value', element.text());
- }
- }
-
- return function(scope, element, attr) {
-
- // This is an optimization over using ^^ since we don't want to have to search
- // all the way to the root of the DOM for every single option element
- var selectCtrlName = '$selectController',
- parent = element.parent(),
- selectCtrl = parent.data(selectCtrlName) ||
- parent.parent().data(selectCtrlName); // in case we are in optgroup
-
- if (selectCtrl) {
- selectCtrl.registerOption(scope, element, attr, interpolateValueFn, interpolateTextFn);
- }
- };
- }
- };
-}];
-
-var styleDirective = valueFn({
- restrict: 'E',
- terminal: false
-});
-
-var requiredDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
- attr.required = true; // force truthy in case we are on non input element
-
- ctrl.$validators.required = function(modelValue, viewValue) {
- return !attr.required || !ctrl.$isEmpty(viewValue);
- };
-
- attr.$observe('required', function() {
- ctrl.$validate();
- });
- }
- };
-};
-
-
-var patternDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var regexp, patternExp = attr.ngPattern || attr.pattern;
- attr.$observe('pattern', function(regex) {
- if (isString(regex) && regex.length > 0) {
- regex = new RegExp('^' + regex + '$');
- }
-
- if (regex && !regex.test) {
- throw minErr('ngPattern')('noregexp',
- 'Expected {0} to be a RegExp but was {1}. Element: {2}', patternExp,
- regex, startingTag(elm));
- }
-
- regexp = regex || undefined;
- ctrl.$validate();
- });
-
- ctrl.$validators.pattern = function(modelValue, viewValue) {
- // HTML5 pattern constraint validates the input value, so we validate the viewValue
- return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);
- };
- }
- };
-};
-
-
-var maxlengthDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var maxlength = -1;
- attr.$observe('maxlength', function(value) {
- var intVal = toInt(value);
- maxlength = isNaN(intVal) ? -1 : intVal;
- ctrl.$validate();
- });
- ctrl.$validators.maxlength = function(modelValue, viewValue) {
- return (maxlength < 0) || ctrl.$isEmpty(viewValue) || (viewValue.length <= maxlength);
- };
- }
- };
-};
-
-var minlengthDirective = function() {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function(scope, elm, attr, ctrl) {
- if (!ctrl) return;
-
- var minlength = 0;
- attr.$observe('minlength', function(value) {
- minlength = toInt(value) || 0;
- ctrl.$validate();
- });
- ctrl.$validators.minlength = function(modelValue, viewValue) {
- return ctrl.$isEmpty(viewValue) || viewValue.length >= minlength;
- };
- }
- };
-};
-
-if (window.angular.bootstrap) {
- //AngularJS is already loaded, so we can return here...
- console.log('WARNING: Tried to load angular more than once.');
- return;
-}
-
-//try to bind to jquery now so that one can write jqLite(document).ready()
-//but we will rebind on bootstrap again.
-bindJQuery();
-
-publishExternalAPI(angular);
-
-angular.module("ngLocale", [], ["$provide", function($provide) {
-var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
-function getDecimals(n) {
- n = n + '';
- var i = n.indexOf('.');
- return (i == -1) ? 0 : n.length - i - 1;
-}
-
-function getVF(n, opt_precision) {
- var v = opt_precision;
-
- if (undefined === v) {
- v = Math.min(getDecimals(n), 3);
- }
-
- var base = Math.pow(10, v);
- var f = ((n * base) | 0) % base;
- return {v: v, f: f};
-}
-
-$provide.value("$locale", {
- "DATETIME_FORMATS": {
- "AMPMS": [
- "AM",
- "PM"
- ],
- "DAY": [
- "Sunday",
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday"
- ],
- "ERANAMES": [
- "Before Christ",
- "Anno Domini"
- ],
- "ERAS": [
- "BC",
- "AD"
- ],
- "FIRSTDAYOFWEEK": 6,
- "MONTH": [
- "January",
- "February",
- "March",
- "April",
- "May",
- "June",
- "July",
- "August",
- "September",
- "October",
- "November",
- "December"
- ],
- "SHORTDAY": [
- "Sun",
- "Mon",
- "Tue",
- "Wed",
- "Thu",
- "Fri",
- "Sat"
- ],
- "SHORTMONTH": [
- "Jan",
- "Feb",
- "Mar",
- "Apr",
- "May",
- "Jun",
- "Jul",
- "Aug",
- "Sep",
- "Oct",
- "Nov",
- "Dec"
- ],
- "WEEKENDRANGE": [
- 5,
- 6
- ],
- "fullDate": "EEEE, MMMM d, y",
- "longDate": "MMMM d, y",
- "medium": "MMM d, y h:mm:ss a",
- "mediumDate": "MMM d, y",
- "mediumTime": "h:mm:ss a",
- "short": "M/d/yy h:mm a",
- "shortDate": "M/d/yy",
- "shortTime": "h:mm a"
- },
- "NUMBER_FORMATS": {
- "CURRENCY_SYM": "$",
- "DECIMAL_SEP": ".",
- "GROUP_SEP": ",",
- "PATTERNS": [
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 3,
- "minFrac": 0,
- "minInt": 1,
- "negPre": "-",
- "negSuf": "",
- "posPre": "",
- "posSuf": ""
- },
- {
- "gSize": 3,
- "lgSize": 3,
- "maxFrac": 2,
- "minFrac": 2,
- "minInt": 1,
- "negPre": "-\u00a4",
- "negSuf": "",
- "posPre": "\u00a4",
- "posSuf": ""
- }
- ]
- },
- "id": "en-us",
- "pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
-});
-}]);
-
- jqLite(document).ready(function() {
- angularInit(document, bootstrap);
- });
-
-})(window, document);
-
-!window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-frame.html b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-frame.html
deleted file mode 100644
index c6dcfa8f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-frame.html
+++ /dev/null
@@ -1,65 +0,0 @@
-<!-- <!DOCTYPE html>
-<html>
-<head>
-<meta charset="ISO-8859-1">
-<title>Insert title here</title>
-</head>
-<body>
-<div style="min-height:500px" data-ng-init="invokeSaveNotebook()">
-
-
- <div><iframe id='itestfr' width="1400" height="1400"></iframe></div>
-
-
- </div>
-
-</body>
-</html> -->
-
-<!-- <div ng-controller="notebookFrameController" style="min-height:500px">
-
-
- <div><iframe id='itestframe' width="1400" height="1400"></iframe></div>
-
-
- </div> -->
-
-<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta http-equiv="cache-control" content="max-age=0" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="expires" content="0" />
- <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
- <meta http-equiv="pragma" content="no-cache"/>
-
- <script src= "app/fusion/scripts/utils/page-resource.js"></script>
-
- <script>
- // loadjscssfile("app/fusion/notebook-integration/scripts/controllers/notebookController.js", "js");
-
- loadjscssfile("app/fusion/notebook-integration/scripts/controllers/notebookFrameController.js", "js");
- loadjscssfile("app/fusion/notebook-integration/scripts/controllers/nbook-framecontroller.js", "js");
-
- </script>
-
-
-
-
- </head>
- <body class="appBody" ng-app="abs">
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_role.html'"></div>
- <div q-header></div>
- <div q-menu class="appLeftMenu"></div>
- <div ng-view style="min-height: 450px;margin-top:-50px;margin-left:210px;margin-right:110px;"></div>
- <div q-footer class="appFooter"></div>
- </body>
-</html>
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html
deleted file mode 100644
index 252b51ec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook-viz.html
+++ /dev/null
@@ -1,7 +0,0 @@
- <div style="min-height:500px">
-
-
- <div><iframe id='itestframe' width="1400" height="1400" ></iframe></div>
-
-
- </div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm
deleted file mode 100644
index 71aca7ab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebook.htm
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta http-equiv="cache-control" content="max-age=0" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="expires" content="0" />
- <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
- <meta http-equiv="pragma" content="no-cache"/>
-
- <script src= "app/fusion/scripts/utils/page-resource.js"></script>
-
- <script>
- // loadjscssfile("app/fusion/notebook-integration/scripts/controllers/notebookController.js", "js");
- loadjscssfile("app/fusion/notebook-integration/scripts/controllers/nbookController.js", "js");
- </script>
-
-
-
-
- </head>
- <body class="appBody" ng-app="abs">
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_role.html'"></div>
- <div q-header></div>
- <div q-menu class="appLeftMenu"></div>
- <div ng-view style="min-height: 450px;margin-top:-50px;margin-left:210px;margin-right:110px;"></div>
- <div q-footer class="appFooter"></div>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html b/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html
deleted file mode 100644
index 0969aa2f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/notebook-integration/scripts/view-models/notebookInputs.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset="ISO-8859-1">
-<title></title>
-</head>
-<body>
-
-<div style="min-height:500px">
- <br>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Notebook ID:</label><BR>
- <input type="text" name="notebookid" maxlength=200 ng-model="notebookvalue" ng-init="notebookvalue='833c0a69ec1433fbb2f8752af733cf0e'" style="width:180px"/>
- </div>
- <BR>
-
- <!-- Use this for only 1 key value query parameter
- <div class="fn-ebz-container">
-
- <label class="fn-ebz-text-label">Key</label><BR>
- <input type="text" name="key" maxlength=200 ng-model="qparamKey" style="width:180px"/>
- </div>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Value</label><BR>
- <input type="text" name="val" maxlength=200 ng-model="qparamVal" style="width:180px"/>
- </div> -->
-
-
-
- <!-- Use this for multiple key value query parameters -->
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div ng-repeat="kv in keyValueList">
- <div style="margin-left:5px">
-
- <div class="fn-ebz-container">
-
- <label class="fn-ebz-text-label">Key</label><BR>
- <input type="text" name="key" maxlength=100 ng-model="kv.qK" style="width:180px"/>
- </div>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Value</label><BR>
- <input type="text" name="val" maxlength=100 ng-model="kv.qV" style="width:180px"/>
- </div>
-
- <div class="fn-ebz-container" style="position:relative; top: 25px;">
- <button href="javascript:void(0)" id="addbtn" ng-show="{{$index==0}}" style="float: right;" att-button size="small" att-accessibility-click="13,32"
- ng-click="addKeyValuePairs(kv);" >Add</button>
- <a href="javascript:void(0)" ng-show="{{$index>0}}" style="float: right;" att-button size="small" att-accessibility-click="13,32" ng-click="removeKeyValuePairs($index);" >
- Remove</a>
- </div>
- </div>
- </div>
- </div>
-
-
-
-
- <BR>
-
- <div class="fn-ebz-container">
- <a att-button btn-type="primary" att-accessibility-click="13,32" ng-click="submitParameters();">Submit</a>
- </div>
-
- <!-- <div ng-show="iframevisibility"><iframe id='itestfr' width="1400" height="1400"></iframe></div> -->
-
-</div>
-</body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-closed-cloop.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-closed-cloop.js
deleted file mode 100644
index 94169ff4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-closed-cloop.js
+++ /dev/null
@@ -1,28 +0,0 @@
-appDS2.controller('adminClosedLoopController', ['$scope','$http','$q','$log',function ($scope, $http,$q, $log){
- $scope.camunda_cockpit_url = '';
- var deferred = $q.defer();
- $http({
- method: "GET",
- url: "get_camunda_cockpit_link",
- }).success( function(res) {
- // if the returned response is error HTML page in string format
- if(res.link_defined=='false'){
- $log.error('Retrieval of camunda cockpit link failed. Please make sure the variable "camunda_cockpit_url" is defined in the system.properties file.');
- deferred.reject(status);
- }
- // valid cockpit url
- else if(res.camunda_cockpit_link!=null & res.camunda_cockpit_link!= '') {
- $scope.camunda_cockpit_url = res.camunda_cockpit_link;
- deferred.resolve(res);
- // if the defined url is empty;
- } else {
- $log.error('Please ensure the variable "camunda_cockpit_url" is properly defined in system.properties file (i.e., neither null nor empty).');
- deferred.reject(status);
- }
- // API call fails
- }).error( function(status) {
- $log.error('get_camunda_cockpit_link RestAPI call failed.');
- deferred.reject(status);
- });
- return deferred.promise;
-}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js
deleted file mode 100644
index dc59b6c7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-controller.js
+++ /dev/null
@@ -1,877 +0,0 @@
-appDS2.controller('adminController', function($scope, $http,AdminService, $modal, $routeParams, $rootScope){
-
- $scope.totalPages = 5;
- $scope.viewPerPage = 8;
- $scope.searchString = "";
- $scope.currentPage = 1;
- $scope.nextSort="";
- $scope.showLoader = false;
- $scope.tableData=[];
- $scope.showLoader=false;
- $scope.routeRoleId = $routeParams.roleId;
- $scope.regions = [];
- /*function*/
- $scope.getFunctionList = function(){
- $scope.tableData.length=0;
- $scope.showLoader=true;
- AdminService.getRoleFunctionList().then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.tableData =JSON.parse($scope.data.availableRoleFunctions);
- },function(error){
- console.log("failed");
- }).finally(function() {
- $scope.showLoader=false; // Always execute this on both error and success
- });
- }
-
- $scope.getCacheRegionsList = function(){
- AdminService.getCacheRegions().then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.regions =$scope.data;
- },function(error){
- console.log("failed");
- });
- }
-
-
- $scope.delRoleFunc = function(roleData){
- AdminService.delRoleFunctionList(roleData).then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
- $scope.successPopUp();
- $scope.getFunctionList();
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
-
- $scope.saveRoleFunction = function(roleData){
- AdminService.saveRoleFunctionList(roleData).then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
- $scope.successPopUp();
- $scope.getFunctionList();
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
-
- $scope.addRoleFunction = function(roleData){
- AdminService.addRoleFunctionList(roleData).then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
- $scope.successPopUp();
- $scope.getFunctionList();
- }else if(status=='"code exists"'){
- $scope.errorPopUp('Code already exists');
- $scope.getFunctionList();
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
- /*init*/
- $scope.getFunctionList();
- $scope.getCacheRegionsList();
- /*popup*/
- var ModalInstanceCtrl = function ($scope, $modalInstance, items, AdminService,$rootScope) {
- $scope.roleFun=items;
- $scope.msg=items;
-
- // remove role function associated to a role on Role Edit page
- $scope.roleFunRemoveRole = function (roleFunction) {
- AdminService.removeRoleFunction(roleFunction, $routeParams.roleId).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.role){
- $rootScope.$broadcast('updateRoleFunctions',{data:message.role});
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
- console.log("error");
- });
- }
-
- //role activation for selected child role
- $scope.activateRoleChildConfirmPopUp = function (selected, availableRole) {
- $scope.msg.roleFun = availableRole.name;
- $scope.msg.selected = selected;
- $scope.msg.availableRole = availableRole;
- var toggleType = null;
- if(selected) {
- toggleType = "activate";
- } else {
- toggleType = "inactivate";
- }
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-child-add-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return $scope.msg;
- }
- }
- });
- }
-
- // confirm Child Role Add
- $scope.confirmRoleChildAdd = function(selected,availableRole,id){
- AdminService.confirmRoleChildAdd(selected,availableRole,id).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.role){
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
- console.log("error");
- });
- }
-
- // confirm Child Role Remove
- $scope.confirmRoleChildRemove = function(selected,availableRole,id){
- AdminService.confirmRoleChildRemove(selected,availableRole,id).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.role){
- //$rootScope.$broadcast('updateAvailbleRoles',{data:message.availableRoles});
- /*$modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- sizeClass: 'modal-small',
- })*/
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
- console.log("error");
- });
- }
-
- //role activation for role function
- $scope.activateRoleConfirmPopUp = function (selected, availableRole) {
- $scope.msg.roleFun = availableRole.name;
- $scope.msg.selected = selected;
- $scope.msg.availableRole = availableRole;
- var toggleType = null;
- if(selected) {
- toggleType = "activate";
- } else {
- toggleType = "inactivate";
- }
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-add-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return $scope.msg;
- }
- }
- });
- }
-
- // confirm Role Function Add
- $scope.confirmRoleFunAdd = function(selected,availableRole,id){
- AdminService.confirmRoleFunAdd(selected,availableRole,id).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.role){
- $rootScope.$broadcast('updateRoleFunctions',{data:message.role});
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
- console.log("error");
- });
- }
-
- // confirm Role Function Remove
- $scope.confirmRoleFunRemove = function(selected,availableRole,id){
- AdminService.confirmRoleFunRemove(selected,availableRole,id).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.role){
- $rootScope.$broadcast('updateRoleFunctions',{data:message.role});
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
- console.log("error");
- });
- }
-
- //role activation
- $scope.roleActivate = function(selected,availableRole){
- AdminService.activateRole(selected,availableRole).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.availableRoles){
- $rootScope.$broadcast('updateAvailbleRoles',{data:message.availableRoles});
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
- console.log("error");
- });
- }
-
- //role deletion
- $scope.delRole = function(roleData){
- AdminService.delRoleList(roleData).then(function(msg){
- var message = msg;
- $scope.cancel();
- if(message.availableRoles){
- $rootScope.$broadcast('updateAvailbleRoles',{data:message.availableRoles});
- }else{
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- })
- }
-
- },function(error){
-
- });
- }
-
- $scope.save = function (data) {
- $modalInstance.close(data);
- };
-
- // Cancel for toggle switch on Role Fn
- $scope.cancelRoleFunSwitch = function (msg) {
- $scope.msg.availableRole.selected = !$scope.msg.availableRole.selected;
- $modalInstance.dismiss('cancel');
- };
-
- // Cancel for toggle switch on Role List
- $scope.cancelRoleSwitch = function (msg) {
- $scope.msg.availableRole.active = !$scope.msg.availableRole.active;
- $modalInstance.dismiss('cancel');
- };
-
- $scope.cancel = function () {
- $modalInstance.dismiss('cancel');
- };
-
- $scope.deleteFun = function(data){
- $modalInstance.close(data);
- }
- };
-
- $scope.successPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return '';
- }
- }
- });
- };
-
- $scope.successTestModelPopUp = function (response) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modalpopup.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-large',
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: response
- };
- return message;
- }
- }
- });
- };
- $scope.errorPopUp = function (msg) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- });
- };
- $scope.saveRoleFuncPopUp = function (availableRoleFunction) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-edit.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return availableRoleFunction;
- }
- }
- });
-
- modalInstance.result.then(function (data) {
- $scope.saveRoleFunction(data);
- });
- }
-
- $scope.addRoleFuncPopUp = function (availableRoleFunction) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return availableRoleFunction;
- }
- }
- });
-
- modalInstance.result.then(function (data) {
- $scope.addRoleFunction(data);
- });
- }
-
- $scope.delRoleFuncConfirmPopUp = function (availableRoleFunction) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-del-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: availableRoleFunction.name,
- content: availableRoleFunction
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function (data) {
- $scope.delRoleFunc(data.content);
- });
- }
- $scope.clearAllFuncPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- }
- }
- });
-
- modalInstance.result.then(function () {
- $scope.clearAll();
- });
- }
-
- $scope.clearAll = function(){
- AdminService.clearAdminRegions().then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
- $scope.successTestModelPopUp('');
- $scope.getCacheRegionsList();
- }else{
- $scope.errorPopUp();
- }
- }
-
- },function(error){
-
- });
- }
- $scope.showRegionDetailsFuncPopUp = function (response) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/success_modalpopup.html',
- controller: ModalInstanceCtrl,
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: response,
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function (response) {
- $scope.showRegionDetails(response);
- });
- }
-
- $scope.showRegionDetails = function(cacheName) {
- AdminService.showRegionDetails(cacheName).then(function(res){
-
- var message = res.data;
- var msgParsed = JSON.stringify(message);
-
- var messaged = message.data;
- var msgParsedd = JSON.stringify(messaged);
-
- if(message.data!=null && message.data!=''){
- var status = res.status;
-
-
- if(status==200){
-
-
-
- var htmlstring = message.data.toString();
- var htmlStrReplace = htmlstring.replace(/['"]+/g, '');
- var htmlStrReplaceSplit = htmlStrReplace.split('\n');
- var dataStr = htmlStrReplace.replace(/\\n/g, "\n");
- $scope.successTestModelPopUp(dataStr);
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
-
- $scope.clearRegionFuncPopUp = function (cacheName) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-region-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: cacheName
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function (cacheName) {
- $scope.clearRegionFunction(cacheName);
- });
- }
-
- $scope.clearRegionFunction = function(cacheName){
- AdminService.clearRegionFunction(cacheName).then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
- $scope.successPopUp();
- $scope.getCacheRegionsList()();
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
-
- $scope.clearItemFuncPopUp = function (cacheName, key) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/clearItem-region-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: cacheName
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function (cacheName, key) {
- $scope.clearItemFunction(cacheName, key);
- });
- }
-
- $scope.clearItemFunction = function(cacheName, key){
- AdminService.clearItemnFunction(cacheName, key).then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
- $scope.successPopUp();
- $scope.getCacheRegionsList()();
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
-
-
-
- $scope.showItemDetails = function(cacheName, key){
- AdminService.showItemDetails(cacheName, key).then(function(msg){
- var message = msg;
- if(message.data!=null && message.data!=''){
- var status = message.data;
- if(status=='"success"'){
-
- $scope.successPopUp();
- $scope.getCacheRegionsList()();
- }else{
- $scope.errorPopUp('');
- }
- }
-
- },function(error){
-
- });
- }
-
-
- //role deletion pop up
- $scope.delRoleConfirmPopUp = function (availableRole) {
-
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-delete-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- availableRole:availableRole,
- roleName: availableRole.name
- };
- return message;
- }
- }
- });
- }
-
- // role activation
- $scope.activateRoleConfirmPopUp = function (selected, availableRole) {
- var toggleType = null;
- if(selected) {
- toggleType = "activate";
- } else {
- toggleType = "inactivate";
- }
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-confirm-activation.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- text: toggleType,
- selected:selected,
- availableRole:availableRole,
- roleName:availableRole.name
- };
- return message;
- }
- }
- });
- }
-
- $scope.roleFnInit = function(){
- $scope.showLoader=true;
- AdminService.getRole($routeParams.roleId).then(function(data){
-
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.role =JSON.parse($scope.data.role);
-
- $scope.ociavailableRoleFunctions =JSON.parse($scope.data.availableRoleFunctions);
- $scope.availableRoleFunctions=[];
-
- if($scope.ociavailableRoleFunctions)
- angular.forEach($scope.ociavailableRoleFunctions, function(a,i){
- var availableRoleFunction = a;
- availableRoleFunction.selected = false;
- angular.forEach($scope.role.roleFunctions, function(b,j){
- if(a.code === b.code) {
- availableRoleFunction.selected = true;
- }
- });
- $scope.availableRoleFunctions.push(availableRoleFunction);
- });
-
-
- $scope.ociavailableRoles=JSON.parse($scope.data.availableRoles);
- $scope.availableRoles=[];
-
- },function(error){
- console.log("roleControllerDS2 failed: " + error);
- reloadPageOnce();
- }).finally(function() {
- $scope.showLoader=false; // Always execute this on both error and success
- });
- }
-
- // updating roles on role list page after deletion of a role
- $rootScope.$on('updateAvailbleRoles', function(e,d){
- $scope.ociavailableRoles = d.data;
- })
-
- // updating role functions on roles page after deletion of a role function
- $rootScope.$on('updateRoleFunctions',function(e,d){
- $scope.role = d.data;
- })
-
- $scope.roleFnInit();
-
- $scope.saveRole = function() {
- var errorMsg;
- $scope.showLoader=true;
- if($scope.role.id == null || $scope.role.id == undefined ){
- $scope.role = {
- 'id':null,
- 'created':null,
- 'modified':null,
- 'createdId':null,
- 'modifiedId':null,
- 'rowNum':null,
- 'auditUserId':null,
- 'auditTrail':null,
- 'name':$scope.role.name,
- 'active':false,
- 'priority':$scope.role.priority,
- 'roleFunctions':null,
- 'childRoles':null,
- 'toggleActiveAltText':"Click to Activate Role ",
- 'toggleActiveImage':" / static fusion images inactive.png ",
- 'editUrl':" role.htm ? role_id = null",
- };
- }
- // Validate non-empty priority as integer
- if ($scope.role.priority && $scope.role.priority != '' && isNaN(parseInt($scope.role.priority))) {
- errorMsg = 'Priority must be an integer.';
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return errorMsg;
- }
- }
- });
- return;
- }
- for (x in $scope.availableRoles){
- if ($scope.availableRoles[x].name==$scope.role.name){
- errorMsg = 'Role already exists.';
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return errorMsg;
- }
- }
- });
- return;
- }
- }
- if(!errorMsg){
- var postData={
- role: $scope.role,
- childRoles: $scope.role.childRoles,
- roleFunctions : $scope.role.roleFunctions
- };
- AdminService.saveRole(postData, $routeParams.roleId).then(function(msg){
- if(msg.role){
- sessionStorage.setItem('addCall', true);
- location.href='admin#/role/'+msg.role.id;
- $scope.availableRoles.push(msg);
- $scope.routeRoleId = msg.role.id;
- $rootScope.$broadcast('updateAvailbleRoles',{data:$scope.availableRoles});
- //saving the addCall variable in sessionStorage to change the url from AddRole to Edit Role on success of Save and displaying the success pop up
- if(sessionStorage.addCall){
- $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- sizeClass: 'modal-small'
- });
- sessionStorage.removeItem('addCall');
- }
- } else{
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- msg = 'Error saving Role. Please retry';
- return msg;
- }
- }
- });
- }
- },function(error){
- console.log("error msg");
- }).finally(function() {
- $scope.showLoader=false; // Always execute this on both error and success
- });
-
- }
- }
-
- $scope.addNewRoleFunctionModalPopup = function(data, role,info) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-large',
- windowClass:"modal-docked",
- resolve: {
- items: function () {
- var message = {
- role:role,
- roleId:info.id,
- availableRoleFunctions:$scope.ociavailableRoleFunctions
- };
- return message;
- }
- }
- });
- }
-
- $scope.addNewChildRoleFunctionModalPopup = function(data, role,info) {
- data = $scope.role;
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-child-roles-modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-large',
- resolve: {
- items: function () {
- var message = {
- roleChildFunctions:$scope.ociavailableRoles,
- role:role,
- roleId:info.id
- };
- return message;
- }
- }
- });
- }
-
- // remove role function associated to a role on Role Edit page
- $scope.removeRoleFunction= function(roleFunction){
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-role-del-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- roleFunction:roleFunction
- };
- return message;
- }
- }
- });
- }
-
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-menu-edit.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-menu-edit.js
deleted file mode 100644
index 00cd92d7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-menu-edit.js
+++ /dev/null
@@ -1,184 +0,0 @@
-appDS2.controller('AdminMenuEditController', function ($scope, AdminMenuService, $modal, $route,AdminService){
-
- $scope.showInput = true;
- $scope.totalPages1 = 5;
- $scope.viewPerPage1 = 8;
- $scope.currentPage1 = 1;
- $scope.showLoader = false;
- $scope.firstPlay = true;
- $scope.tableFnMenuItems = [];
- $scope.$watch('viewPerPage1', function(val) {
- $scope.showLoader = true;
- AdminMenuService.getFnMenuItems($scope.currentPage1, val).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.fnMenuItems = $scope.data.fnMenuItems;
- var totalItems = $scope.fnMenuItems.length;
- $scope.totalPages1 = Math.ceil(totalItems / $scope.viewPerPage1);
- for (x in $scope.fnMenuItems) {
- if ($scope.fnMenuItems[x].active_yn=='Y')
- $scope.fnMenuItems[x].active_yn=true;
- else
- $scope.fnMenuItems[x].active_yn=false;
- }
- $scope.showLoader = false;
- $scope.currentPage1=1;
- var endIndex = 1 * $scope.viewPerPage1;
- var startIndex = endIndex - $scope.viewPerPage1;
- $scope.tableFnMenuItems = $scope.fnMenuItems.slice(startIndex, endIndex);
- },function(error){
- console.log('AdminMenuEditControler::$watch viewPerPage1 failed', error);
- reloadPageOnce();
- });
-
- });
-
- $scope.customHandler1 = function(num) {
- $scope.currentPage1=num;
- var endIndex = num * $scope.viewPerPage1;
- var startIndex = endIndex - $scope.viewPerPage1;
- $scope.tableFnMenuItems = $scope.fnMenuItems.slice(startIndex, endIndex);
- };
-
- $scope.init = function () {
- $scope.numberOfRecordstoShow=20;
- AdminMenuService.getFnMenuItems().then(function(data){
- var j = data;
- $scope.data =JSON.parse(j.data);
- $scope.fnMenuItems =($scope.data.fnMenuItems);
- },function(error){
- console.log('AdminMenuEditControler::init failed');
- });
- }
-
- $scope.init();
-
- $scope.mapActiveStatus = function(status){
- if(status)
- status = "Y";
- else
- status = "N";
- return status;
- };
-
- $scope.addNewFnMenuItemModalPopup = function(availableFnMenuItem) {
- $scope.editFnMenuItem = null;
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fnmenu-add.html',
- controller: fn_menu_popupController,
- resolve: {
- message: function () {
- var message = {
- availableFnMenuItem: $scope.editFnMenuItem
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function(response){
- // console.log('response', response);
- $scope.availableFnMenuItems=response.availableFnMenuItems;
- $route.reload();
- });
-
- };
-
- $scope.removeMenuItem = function (fnMenuItem) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/admin-menu-del-confirm.html',
- controller: deletefn_menu_popupController,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: fnMenuItem.label
- };
- return fnMenuItem;
- }
- }
- });
- };
-
-
- $scope.editRoleFunction = null;
- var dialog = null;
- $scope.editRoleFunctionPopup = function(availableRoleFunction) {
- $scope.editRoleFunction = availableRoleFunction;
- $( "#dialog" ).dialog({
- modal: true
- });
- };
-
- $scope.editMenuItemModalPopup = function(availableFnMenuItem) {
- $scope.editFnMenuItem = availableFnMenuItem;
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fnmenu-add.html',
- controller: fn_menu_popupController,
- resolve: {
- message: function () {
- var message = {
- availableFnMenuItem: $scope.editFnMenuItem
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function(response){
- $scope.availableFnMenuItems=response.availableFnMenuItems;
- $route.reload();
- });
- };
-
- $scope.editRoleFunctionModalPopup = function(availableRoleFunction) {
- $scope.editRoleFunction = availableRoleFunction;
- var modalInstance = $modal.open({
- templateUrl: 'edit_role_function_popup.html',
- controller: 'rolefunctionpopupController',
- resolve: {
- message: function () {
- var message = {
- availableRoleFunction: $scope.editRoleFunction
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function(response){
- // console.log('response', response);
- $scope.availableRoleFunctions=response.availableRoleFunctions;
- });
- };
-
- $scope.addNewRoleFunctionModalPopup = function(availableRoleFunction) {
- $scope.editRoleFunction = null;
- var modalInstance = $modal.open({
- templateUrl: 'edit_role_function_popup.html',
- controller: 'rolefunctionpopupController',
- resolve: {
- message: function () {
- var message = {
- availableRoleFunction: $scope.editRoleFunction
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function(response){
- $scope.availableRoleFunctions=response.availableRoleFunctions;
- });
- };
-
- $scope.addNewRoleFunctionPopup = function() {
- $scope.editRoleFunction = null;
- $( "#dialog" ).dialog({
- modal: true
- });
- };
-
-
-
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-route.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-route.js
deleted file mode 100644
index c7c06a7e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-route.js
+++ /dev/null
@@ -1,43 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .when('/net_map', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-sample-page/net_map.html',
- controller: "netMapController"
- })
- .when('/jcs_admin', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/jcs_admin.html',
- controller: 'adminController'
- })
- .when('/admin_menu_edit', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/admin-menu-edit.html',
- controller: 'AdminMenuEditController'
- })
- .when('/usage_list', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/usage.html',
- controller: 'usageListControllerDS2'
- })
- .when('/role_function_list', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/role-function.html',
- controller : "adminController"
- })
- .when('/role/:roleId', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/role.html',
- controller: 'adminController'
- })
- .when('/collaborate_list', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html',
- controller: 'collaborateListControllerDS2'
- })
- .when('/adminClosedLoop', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/admin_closed_loop.html',
- controller: 'adminClosedLoopController'
- })
- .when('/all', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-listing.html',
- controller: 'workflowsController'
- })
- .otherwise({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/role_list.html',
- controller : 'adminController'
- });
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-whitelist.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-whitelist.js
deleted file mode 100644
index 3e82df8e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/admin-whitelist.js
+++ /dev/null
@@ -1,3 +0,0 @@
-appDS2.config(function ($sceDelegateProvider) {
- $sceDelegateProvider.resourceUrlWhitelist(['self','**']);
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-controller.js
deleted file mode 100644
index 74a7423e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-controller.js
+++ /dev/null
@@ -1,5 +0,0 @@
-appDS2.controller(
- 'bootstrapSampleController',
- function($scope, $interval, $http, $modal, $log, ManifestService) {
-
- });
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-route.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-route.js
deleted file mode 100644
index ac1ba168..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/bootstrap-sample-route.js
+++ /dev/null
@@ -1,7 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .otherwise({
- templateUrl: 'app/fusion/scripts/DS2-view-models/bootstrap-sample-content.html',
- controller : "bootstrapSampleController"
- });
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate-list-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate-list-controller.js
deleted file mode 100644
index 670e8fc1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate-list-controller.js
+++ /dev/null
@@ -1,71 +0,0 @@
-appDS2.controller("collaborateListControllerDS2", function ($scope,$http, $modal,AdminService) {
-
- $scope.showInput = true;
- $scope.totalPages1 = 5;
- $scope.viewPerPage1 = 8;
- $scope.currentPage1 = 1;
- $scope.showLoader = false;
- $scope.firstPlay = true;
- // Start with empty list to silence error in console
- $scope.tableData = [];
- $scope.tableCollbItems = [];
- // $scope.totalPages1 = 20;
- $scope.$watch('viewPerPage1', function(val) {
- $scope.showLoader = true;
- AdminService.getCollaborateList($scope.currentPage1, val).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.tableData = $scope.data;
- var totalItems = $scope.tableData.length;
- //console.log(totalItems);
- $scope.totalPages1 = Math.ceil(totalItems / $scope.viewPerPage1);
- $scope.showLoader = false;
- $scope.currentPage1=1;
- var endIndex = 1 * $scope.viewPerPage1;
- var startIndex = endIndex - $scope.viewPerPage1;
- $scope.tableCollbItems = $scope.tableData.slice(startIndex, endIndex);
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
- });
-
- $scope.customHandler1 = function(num) {
- $scope.currentPage1=num;
- var endIndex = num * $scope.viewPerPage1;
- var startIndex = endIndex - $scope.viewPerPage1;
- $scope.tableCollbItems = $scope.tableData.slice(startIndex, endIndex);
- };
-
- $scope.openCollaboration = function(chatId){
- openInNewTab('openCollaboration?chat_id=' + chatId);
- }
-
- $scope.toggleProfileActive = function(profileId) {
- modalService.popupConfirmWin("Confirm","You are about to change user's active status. Do you want to continue?",
- function(){
- $http.get("profile/toggleProfileActive?profile_id="+profileId).success(function(){});
- })
- };
-
-});
-
-function openInNewTab(url) {
- var win = window.open(url, '_blank');
- win.focus();
-};
-
-function downloadScreenCaptureExtenstion() {
-
- var chromeURL = 'https://chrome.google.com/webstore/detail/icgmlogfeajbfdffajhoebcfbibfhaen';
- var firefoxURL = 'https://addons.mozilla.org/en-US/firefox/addon/screen-capturing-capability';
- var url;
-
- if(isChrome)
- url = chromeURL;
- else if(isFirefox)
- url = firefoxURL;
-
- var win = window.open(url);
- win.focus();
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/collaborate.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/collaborate.js
deleted file mode 100644
index fa9af088..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/collaborate.js
+++ /dev/null
@@ -1,7 +0,0 @@
-app.config(function($routeProvider) {
- $routeProvider
- .when('/collaborate_list', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html',
- controller: 'collaborateListControllerDS2'
- })
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/workflowController.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/workflowController.js
deleted file mode 100644
index c43ad8b7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborate/workflowController.js
+++ /dev/null
@@ -1,490 +0,0 @@
-app.controller('workflowsController', function($scope, $http, $uibModal, $log, modalService, $modal) {
-
- $scope.viewPerPage = 5;
- $scope.scrollViewsPerPage = 20;
- $scope.currentPage = 2;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- $scope.radio = {
- value: ""
- };
-
-
- $scope.showModal = false;
- $scope.toggleModal = function(){
- $scope.showModal = !$scope.showModal;
- };
-
- $scope.workflow = {};
- $scope.workflow.active = "true";
-
- $scope.updateAllWorkflowStatus = function() {
- angular.forEach($scope.workflows,function(value){
- $scope.checkWorkflowStatus(value);
- })
- }
-
- $scope.fetchWorkflowsList = function() {
- $http.get('workflows/list').then(function(workflowList){
- console.log('Got new list from server = ' + workflowList.data);
- $scope.workflows = workflowList.data;
- $scope.updateAllWorkflowStatus();
- });
- };
-
- $scope.addNewWorkflow = function(newWorkflow) {
- $http.post('workflows/addWorkflow/', JSON.stringify(newWorkflow)).success(function() {
- $scope.fetchWorkflowsList();
- });
-
- $scope.workflow.name = '';
-
- };
-
- $scope.updateWorkflow = function (workflowToEdit) {
- //workflowToEdit.active='true';
- var modalInstance = $uibModal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-new.html',
- //size : modalSize,
- controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
- $scope.workflow = workflowToEdit;
- $scope.ok = function() {
- console.log('Updating existing workflow ... ' + JSON.stringify($scope.workflow));
- $http.post('workflows/editWorkflow/', JSON.stringify($scope.workflow)).then(function(returnedWorkflow){
- console.log('Returned Workflow = ' + JSON.stringify(returnedWorkflow));
- $uibModalInstance.close($scope.workflow);
- });
- };
-
- $scope.cancel = function() {
- $uibModalInstance.dismiss();
- };
- }],
- //End of inner controller
- resolve: {
- workflow: function() {
- console.log('Passing ' + JSON.stringify($scope.workflow));
- return $scope.workflow;
- }
- }
- });
-
- modalInstance.result.then(function (editedWorkFlow) {
- //Need to convert to proper date - later
- delete editedWorkFlow.created;
- delete editedWorkFlow.updated;
-
- delete editedWorkFlow.createdBy;
- delete editedWorkFlow.modifiedBy;
-
- console.log('selected Item ' + JSON.stringify(editedWorkFlow));
- $scope.$emit('workflowAdded', editedWorkFlow);
-
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };
-
- $scope.reset = function(){
- console.log("Resetting ....");
- };
-
- $scope.update = function(){
- console.log("updating ....");
- };
-
- $scope.createWorkflow = function (modalSize) {
-
- var modalInstance = $uibModal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-new.html',
- size : modalSize,
- controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
- $scope.workflow = {};
- $scope.workflow.active = 'true';
- $scope.ok = function() {
- console.log('Saving new workflow ... ' + JSON.stringify($scope.workflow));
- $http.post('workflows/addWorkflow/', JSON.stringify($scope.workflow)).then(function(returnedWorkflow){
- console.log('Returned Workflow = ' + JSON.stringify(returnedWorkflow));
- $uibModalInstance.close($scope.workflow);
- });
- };
-/* console.log(size);*/
- $scope.cancel = function() {
- $uibModalInstance.dismiss();
- };
- }],
- //End of inner controller
- resolve: {
- workflow: function() {
- console.log('Passing ' + JSON.stringify($scope.workflow));
- return $scope.workflow;
- }
- }
- });
-
- modalInstance.result.then(function (newWorkflow) {
- console.log('selected Item ' + JSON.stringify(newWorkflow));
- $scope.$emit('workflowAdded', newWorkflow);
-
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };//End of createWorkflow function
-
-
- $scope.removeWorkflow = function(workflowToRemove){
- var modalInstance = $uibModal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-remove.html',
- controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
- $scope.workflowToRemove = workflowToRemove;
- $scope.ok = function() {
- console.log('Removing workflow ... ' + JSON.stringify($scope.workflowToRemove) + ' on client request.');
- $http.post('workflows/removeWorkflow/', JSON.stringify($scope.workflowToRemove.id)).then(function(){
- console.log('Workflow successfully removed !!!');
- $uibModalInstance.close();
- });
- };
-
- $scope.cancel = function() {
- $uibModalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('workflowRemoved');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
-
- };
-
-
-
- $scope.scheduleWorkflow = function(workflowToSchedule){
- var modalInstance = $uibModal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-schedule.html',
- size:'lg',
-
- controller: ['$scope', '$uibModalInstance', '$http','dateFilter', function ($scope, $uibModalInstance, $http,dateFilter) {
-
- $scope.workflowToSchedule = workflowToSchedule;
- $scope.dt = new Date();
- $scope.dt2 = new Date();
- $scope.dateformat = 'MM/dd/yyyy',
- $scope.datetimeformat = "hh:mm a";
-
- $scope.recurrenceOptions =[{
- index:0, value:'One-Time', title:'One-Time'
- },{
- index:1, value: 'Hourly',title:'Hourly'
- },{
- index:2, value: 'Daily',title:'Daily'
- },{
- index:3, value: 'Weekly',title:'Weekly'
- }]
- $scope.selectRecurrenceOpt = $scope.recurrenceOptions[0];
-
- $scope.hours = [];
- for (var i=0; i<24; i++){
- var newObj={}
- newObj.index = i;
- newObj.value = ""+i;
- newObj.title = ""+i;
- $scope.hours.push(newObj);
- }
-
- $scope.minutes = [];
- for (var i=0; i<60; i++){
- var newObj={}
- newObj.index = i;
- newObj.value = ""+i;
- newObj.title = ""+i;
- $scope.minutes.push(newObj);
- }
-
- $scope.AMPMOptions =[
- {
- index:0, value:'AM', title:'AM'
- },{
- index:1, value: 'PM',title:'PM'
- }]
-
- $scope.selectFirstHour =$scope.hours[0];
- $scope.selectFirstMinute =$scope.minutes[0];
-
- $scope.selectLastHour =$scope.hours[0];
- $scope.selectLastMinute =$scope.minutes[0];
-
- $scope.selectStartAMPMOption=$scope.AMPMOptions[0];
- $scope.selectLastAMPMOption=$scope.AMPMOptions[0];
-
- var GenerateCronExpression = function(trigger_dt, RecurrenceOpt) {
- var CRON_sec = trigger_dt.getSeconds();
- var CRON_min = trigger_dt.getMinutes();
- var CRON_hr = trigger_dt.getHours();
- var CRON_date= trigger_dt.getDate();
- var CRON_month = trigger_dt.toLocaleString('en-US', {month: 'short'}).toUpperCase();
- var CRON_day = trigger_dt.toLocaleString('en-US', {weekday: 'short'}).toUpperCase();
- var CRON_year = trigger_dt.getFullYear();
- if (RecurrenceOpt ==="One-Time") {
- CRON_day = '?'
- } else {
- if (RecurrenceOpt ==="Hourly") {
- CRON_hr = '*';
- CRON_date = '*'
- CRON_month = '*'
- CRON_day = '?'
- CRON_year = '*'
- } else if (RecurrenceOpt ==="Daily") {
- CRON_date = '*'
- CRON_month = '*'
- CRON_day = '?'
- CRON_year = '*'
- } else if (RecurrenceOpt ==="Weekly") {
- CRON_date = '*'
- CRON_month = '*'
- CRON_year = '*'
- }
- }
-
- var CRON_Expression = [CRON_sec, CRON_min, CRON_hr, CRON_date, CRON_month, CRON_day, CRON_year];
- return CRON_Expression.join(" ");
- }
-
- $scope.ok = function() {
-
- // DateTime for the start time: it should be noted that the start time
- // for a CRON job should be prior to the trigger time.
- $scope.trigger_dt = new Date( $scope.dt.getFullYear() +
- "-" + ("0"+($scope.dt.getMonth()+1)).slice(-2) +
- "-" +("0"+ $scope.dt.getDate()).slice(-2) +
- " " + ("0" + $scope.selectFirstHour.value).slice(-2) +
- ":" +("0" + $scope.selectFirstMinute.value).slice(-2) +
- ":00.0");
-
- $scope.startDateTime_CRON = GenerateCronExpression($scope.trigger_dt, $scope.selectRecurrenceOpt.value)
-
- //roll back the the start date time by 30 seconds (start time should be 30 seconds prior to trigger time)
- dt_st = new Date($scope.trigger_dt - 30*1000)
-
- startDateTime = dt_st.getFullYear() +
- "-" + ("0"+(dt_st.getMonth()+1)).slice(-2) +
- "-" +("0"+ dt_st.getDate()).slice(-2) +
- " " + ("0" + dt_st.getHours()).slice(-2) +
- ":" +("0" + dt_st.getMinutes()).slice(-2) +
- ":" + ("0" + dt_st.getSeconds()).slice(-2) +".0";
- $scope.startDateTime = startDateTime;
-
- $scope.endDateTime = $scope.dt2.getFullYear() +
- "-" + ("0"+($scope.dt2.getMonth()+1)).slice(-2) +
- "-" +("0"+ $scope.dt2.getDate()).slice(-2) +
- " " + ("0"+ $scope.selectLastHour.value).slice(-2) +
- ":" +("0" + $scope.selectLastMinute.value).slice(-2) +
- ":00.0"
-
- $scope.WorkflowScheduleObject = {};
- $scope.WorkflowScheduleObject['startDateTime_CRON'] = $scope.startDateTime_CRON;
- $scope.WorkflowScheduleObject['startDateTime'] = $scope.startDateTime;
- $scope.WorkflowScheduleObject['endDateTime'] = $scope.endDateTime;
- $scope.WorkflowScheduleObject['workflowKey'] = $scope.workflowToSchedule.workflowKey;
- $scope.WorkflowScheduleObject['recurrence'] = $scope.selectRecurrenceOpt.value;
- $scope.WorkflowScheduleObject['workflow_arguments'] = "test";
- $scope.WorkflowScheduleObject['workflow_server_url'] = $scope.workflowToSchedule.runLink;
-
-
- TimeFromNowToStart = new Date($scope.startDateTime)-new Date()
- TimeStartToEnd = new Date($scope.endDateTime)-new Date($scope.startDateTime)
-
- if (TimeFromNowToStart<=0) {
- console.log("invalid start time input")
- alert("Please ensure the scheduled start date time is later than current time.")
- return;
- }
- if (TimeStartToEnd<=0) {
- console.log("invalid end time input")
- alert("Please ensure the schduled end date time is later than the start time.")
- return;
- }
- // if successful then save and close
- $scope.saveCronJob($scope.WorkflowScheduleObject);
- $uibModalInstance.close();
-
- };
-
- $scope.saveCronJob = function(cronJobData){
-
- console.log('saving cron job data: ' + cronJobData);
- var uuu = "workflows/saveCronJob.htm";
- var postData={cronJobDataObj: cronJobData};
- $.ajax({
- type : 'POST',
- url : uuu,
- //dataType: 'json', // data type expected from server
- contentType: 'application/json',
- data: JSON.stringify(postData), // data type sent to server
- success : function(data){
- $scope.$apply(function(){
- //$scope.availableRoleFunctions=[];$scope.$apply();
- // new // $scope.availableFnMenuItems=data.availableFnMenuItems;
- }
- );
- //alert("Update Successful.") ;
- //$scope.editRoleFunction = null;
- // new /// $modalInstance.close({availableFnMenuItems:$scope.availableRoleFunctions});
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
-
- };
-
- $scope.cancel = function() {
- console.log("cancel triggered")
- $uibModalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('workflowRemoved');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
-
- };
-
-
-
-
-
-
-
-
- $scope.previewWorkflow = function(workflowToPreview,modalSize){
- var modalInstance = $uibModal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/workflows/workflow-preview.html',
- size:modalSize,
- controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
- $scope.workflowToPreview = workflowToPreview;
- console.log('previewWorkFlow invoked');
- console.log($scope.workflowToPreview);
-
- $scope.cancel = function() {
- $uibModalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('workflowRemoved');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
-
- };
-
-
- /* change work flow status based on the boolean variable "suspendBool" which corresponds whether
- * we would like to suspend or activate a workflow specified by key. */
- $scope.changeWorkflowStatus = function(workflowToChangeStatus,suspendBool){
- if (workflowToChangeStatus!==null) {
- var statusUrl= workflowToChangeStatus.runLink+"/engine-rest/process-definition/key/"+workflowToChangeStatus.workflowKey
- var suspendedUrl= statusUrl+"/suspended"
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.open('PUT', suspendedUrl, false);
- xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
- xmlHttp.onload = function() {
- if (suspendBool) {
- console.log("process definition is now suspended");
- workflowToChangeStatus.active="false"
- } else {
- console.log("process definition is now activated");
- workflowToChangeStatus.active="true"
- }
- };
- xmlHttp.send(JSON.stringify({
- "suspended" : suspendBool,
- "includeProcessInstances" : true,
- "executionDate" : "2013-11-21T10:49:45"
- }));
- }
-
- };
-
- $scope.activateWorkflow = function(workflowToActivate){
- $scope.changeWorkflowStatus(workflowToActivate,false)
-
- };
-
- $scope.suspendWorkflow = function(workflowToActivate){
- $scope.changeWorkflowStatus(workflowToActivate,true)
- };
-
- $scope.checkWorkflowStatus = function(workflow) {
- if (workflow!==null) {
- var statusUrl= workflow.runLink+"/engine-rest/process-definition/key/"+workflow.workflowKey
- var xmlHttp3 = new XMLHttpRequest();
- xmlHttp3.open('GET', statusUrl, true);
- xmlHttp3.withCredentials = true;
- xmlHttp3.send();
- xmlHttp3.onreadystatechange = function() {
- if (xmlHttp3.readyState == 4 && xmlHttp3.status == 200) {
- // do something with the response in the variable data
- var temp = JSON.parse(xmlHttp3.responseText)
- if (temp.suspended == false){
- console.log("Activated")
- workflow.active="true"
- } else {
- console.log("Suspended")
- workflow.active="false"
- }
- }
- }
- }
- };
-
- $scope.StartWorkflowInstance = function(workflowToStart){
- if (workflowToStart!==null) {
- var statusUrl= workflowToStart.runLink+"/engine-rest/process-definition/key/"+workflowToStart.workflowKey
- var suspendedUrl= statusUrl+"/submit-form"
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.open('POST', suspendedUrl, false);
- xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
- xmlHttp.onload = function() {
- };
- xmlHttp.send(JSON.stringify({
- "variables": {
- "customerId": {"value":"asdasda","type":"String"},
- "amount":{"value":"100","type":"String"}
- }
- }));
- }
-
- };
-
-
- $scope.$on('workflowAdded', function(event, newWorkflow) {
- console.log("New Workflow to be added in list scope " + JSON.stringify(newWorkflow));
- //$scope.workflows.push(newWorkflow);
- $scope.fetchWorkflowsList();
- console.log('newly added workflow = ' + JSON.stringify(newWorkflow));
- });
-
- $scope.$on('workflowRemoved', function(event) {
- $scope.fetchWorkflowsList();
- });
-
- $scope.fetchWorkflowsList();
-
-
-
-});
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborateList-route.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborateList-route.js
deleted file mode 100644
index d402fd7b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaborateList-route.js
+++ /dev/null
@@ -1,19 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .when('/collaborate_list', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html',
- controller: 'collaborateListControllerDS2'
- })
- .when('/notebook', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-page.html',
- controller: 'nbookController'
- })
- .when('/leafletMap', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-samplePages/leafletMap.html',
- controller: 'leafletController'
- })
- .when('/notebook', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-page.html',
- controller: 'nbookController'
- })
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaboration-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaboration-controller.js
deleted file mode 100644
index a800c009..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/collaboration-controller.js
+++ /dev/null
@@ -1,266 +0,0 @@
-
-
-appDS2.controller('collaborationControllerDS2', function ($scope,$http, $modal) {
- console.log("modal", $modal);
- var popupModalService;
-
- });
-
-
- $(document).ready(function () {
-
- // OUTER-LAYOUT
- panelLayout = $('body').layout({
- center__paneSelector: ".outer-center"
- , west__paneSelector: ".outer-west"
- , east__paneSelector: ".outer-east"
- //, west__size: 800
- //, east__size: 125
- , spacing_open: 8 // ALL panes
- , spacing_closed: 12 // ALL panes
-
- , center__childOptions: {
- center__paneSelector: ".inner-center"
- , west__paneSelector: ".inner-west"
- , east__paneSelector: ".inner-east"
- , west__size: 75
- , east__size: 75
- , spacing_open: 8 // ALL panes
- , spacing_closed: 8 // ALL panes
- , west__spacing_closed: 12
- , east__spacing_closed: 12
- }
-
-
-
-
- });
-
-
- function initializeConnections() {
-
- var channelId = null;
- channelId = location.href.replace(/\/|:|#|%|\.|\[|\]/g, '');
- var videoChannelId = channelId.concat("video");
- var screenChannelId = channelId.concat("screen");
-
- videoConnection = new RTCMultiConnection(videoChannelId);
- screenConnection = new RTCMultiConnection(screenChannelId);
-
- configConnection(videoConnection,true,true,false,true,false);
- configConnection(screenConnection,false,false,true,false,true);
-
- };
-
- function configConnection(_connection, _audio, _video, _screen, _data, _oneway) {
- _connection.session = {
- audio: _audio, // by default, it is true
- video: _video, // by default, it is true
- screen: _screen,
- data: _data,
- oneway: _oneway,
- broadcast: false
- };
-
- _connection.direction = "one-to-one";
-
- if( _data == true ) {
- _connection.onmessage = function(e) {
- appendDIV(e.data);
-
- console.debug(e.userid, 'posted', e.data);
- console.log('latency:', e.latency, 'ms');
- };
- }
-
-
- };
-
- function assignStreamToDom() {
-
-
- screenConnection.screenbody = document.querySelector('.screenContainer1');
- screenConnection.videobody = document.querySelector('.videoContainer2');
-
- videoConnection.screenbody = document.querySelector('.screenContainer2');
- videoConnection.videobody = document.querySelector('.videoContainer1');
- };
-
- function maximizeLayout() {
-
- // open the panes and maximize the window.
- top.window.resizeTo(screen.availWidth,screen.availHeight);
- panelLayout.open('west');
- // panelLayout.open('south'); is not working due to state initialization problem; debug to find out. so replacing the call with work around below - hack.
- $(".ui-layout-toggler-south-closed").first().click();
-
- };
-
- function minimizeLayout() {
-
- // close the panes and minimize the window.
- top.window.resizeTo(screen.availWidth - 2*screen.availWidth/3, screen.availHeight - screen.availHeight/2);
- panelLayout.close('west');
- // panelLayout.close('south'); is not working due to state initialization problem; debug to find out. so replacing the call with work around below - hack.
- $(".ui-layout-toggler-south-opened").first().click();
- };
-
- function emptyContainers() {
- $('.screenContainer1').empty();
- $('.videoContainer2').empty();
-
- $('.screenContainer2').empty();
- $('.videoContainer1').empty();
- };
-
- function appendDIV(div, parent) {
- if (typeof div === 'string') {
- var content = div;
- div = document.createElement('div');
- div.innerHTML = content;
- };
-
- var chatOutput = document.getElementById('chat-output'),
- fileProgress = document.getElementById('file-progress');
-
- if (!parent) chatOutput.insertBefore(div, chatOutput.firstChild);
- else fileProgress.insertBefore(div, fileProgress.firstChild);
-
- div.tabIndex = 0;
- $('#chat-input').focus();
- };
-
- function confirmClose() {
- var message = "Are you sure you want to close the session?";
-
- /* if(popupModalService != undefined) {
- popupModalService.popupConfirmWin("Confirm", message, function(){ location.reload();});
- }
-
- else */
- if (confirm(message) == true) {
- location.reload();
- //window.opener.location.reload(); // go to the parent window
- //close();
- } else {
- // do nothing
- }
-
- };
-
- function notifyOthers() {
-
- // var websocket = localStorage.getItem('notifySocket');
- //if( websocket != null) {
- // handling websocket peer broadcast session
- var currentUser = "${sessionScope.user.sbcid}";
- var initialPageVisit = "${sessionScope.initialPageVisit}";
- var remoteUser = '';
-
- var userList = location.search.split('chat_id=')[1].split('-');
- for(var i=0;i<userList.length;i++) {
- if(userList[i] !== currentUser) {
- remoteUser = userList[i];
- break;
- }
- }
-
- socketSetup(initialPageVisit, currentUser, remoteUser,"socketSend");
-
-
-
-
-
-
- };
-
- function makeChatVisible() {
-
- $('#chat-input').css("visibility", 'visible');
- };
-
-
-
- /* on click button enabled*/
- window.onload = function () {
- document.getElementById('share-screen').onclick = function() {
-
- emptyContainers();
- videoConnection.close();
- screenConnection.close();
-
- maximizeLayout();
- emptyContainers();
- makeChatVisible();
-
- videoConnection.open();
- screenConnection.open();
-
-
- notifyOthers();
-
-
-
- };
- };
-
- document.getElementById('stop-share-screen').onclick = function() {
-
- emptyContainers();
-
- videoConnection.close();
- screenConnection.close();
-
- confirmClose();
-
- };
-
- document.getElementById('view-screen').onclick = function() {
-
- maximizeLayout();
- emptyContainers();
- makeChatVisible();
-
- // timeout is required for the sharing to properly work
- setTimeout(function() {
- screenConnection.connect();
- },2000);
- setTimeout(function() {
- videoConnection.connect();
- },1000);
-
-
- };
-
- document.getElementById('chat-input').onkeypress = function(e) {
- if (e.keyCode !== 13 || !this.value) return;
- var message = "<b>${model.name}</b>: " + this.value;
- appendDIV(message);
-
- // sending text message
- videoConnection.send(message);
-
- this.value = '';
- };
-
- /*
- document.getElementById('file').onchange = function() {
- videoConnection.send(this.files[0]);
- };
- */
-
-
- //document.querySelector('.screenContainerPane').appenChild(document.querySelector('.screenContainer'));
- //document.querySelector('.videoContainerPane').appendChild(document.querySelector('.videoContainer'));
-
- //panelLayout.bindButton($('#share-screen'), 'open', 'outer-west');
- //panelLayout.bindButton($('#stop-share-screen'), 'close', 'outer-west');
- var videoConnection = null, screenConnection = null;
- initializeConnections();
- assignStreamToDom();
-
- // start the share
- //document.getElementById('share-screen').click();
- //
- });
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js
deleted file mode 100644
index efe2b749..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js
+++ /dev/null
@@ -1,358 +0,0 @@
-appDS2.controller('selfProfileController', function($scope, $http, $modal, $routeParams, $rootScope,SelfProfileService){
-
- /************init values***********************/
- $scope.tableData=[];
- $scope.profile=[];
- $scope.oriProfile=[];
- $scope.ociavailableRoles=[];
- $scope.ociTimeZones;
- $scope.ociCountries;
- var stateList=[];
- $scope.availableRoles = [];
- $scope.timeZones = [];
- $scope.selectedTimeZone = {"index":'',"value":"","title":""};
- $scope.countries = [];
- $scope.selectedCountry = {"index":'',"value":"","title":""};
-
- $scope.isUserSystemAdmin = false;
- $scope.profileId='';
- $scope.showLoader=false;
- $scope.pageType=1 /*1 for slef page 2 for general profile page*/
- $scope.pageTitle='Self Profile Detail';
- $scope.profileIdParam = $routeParams.profileId;
- if (typeof($scope.profileIdParam) != "undefined" && $scope.profileIdParam!=''){
- $scope.pageTitle='Profile Detail';
- $scope.pageType=2;
- }
-
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
-
- /***********************************************************functions***********************************************/
- $scope.getProfileDetail = function(profileIdParam){
- $scope.showLoader=true;
- SelfProfileService.getProfileDetail(profileIdParam).then(function(data){
- $scope.showLoader=false;
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.profile =JSON.parse($scope.data.profile);
- $scope.oriProfile=JSON.parse($scope.data.profile); /*original value*/
- $scope.profileId = $scope.profile.id;
- $scope.ociavailableRoles =JSON.parse($scope.data.availableRoles);
- $scope.ociTimeZones=JSON.parse($scope.data.timeZones);
- $scope.ociCountries=JSON.parse($scope.data.countries);
- stateList=JSON.parse($scope.data.stateList);
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
-
- if($scope.ociavailableRoles)
- $.each($scope.ociavailableRoles, function(i, a){
- var availableRole = a;
- availableRole.selected = false;
- $.each($scope.profile.roles, function(j, b){
- if(a.id === b.id) {
- availableRole.selected = true;
- if(a.id === 1){
- $scope.isUserSystemAdmin = true;
- }
- }
- });
- $scope.availableRoles.push(availableRole);
- });
- ;
- if($scope.ociTimeZones){
- $.each($scope.ociTimeZones, function(i, a){
- var timeZone = {"index":i, "value":a.value, "title":a.label};
- $scope.timeZones.push(timeZone);
- if($scope.profile.timeZoneId !== null && a.value === $scope.profile.timeZoneId.toString()){
- $scope.selectedTimeZone = timeZone;
- }
- });
- };
- if($scope.ociCountries)
- $.each($scope.ociCountries, function(i, a){
- var country = {"index":i, "value":a.value, "title":a.label};
- $scope.countries.push(country);
- if(a.value === $scope.profile.country){
- $scope.selectedCountry = country;
- }
- });
- ;
- stateList = stateList== null? []: stateList;
- var selectedState= $scope.profile.state ? $scope.profile.state:"";
- $scope.stateList = initDropdownWithLookUp(stateList,selectedState );
- },function(error){
- $scope.errorPopUp(error);
- $scope.showLoader=false;
- });
- }
-
- $scope.getSelfProfileDetail = function(){
- $scope.showLoader=true;
- SelfProfileService.getSelfProfileDetail().then(function(data){
- $scope.showLoader=false;
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.profile =JSON.parse($scope.data.profile);
- $scope.oriProfile=JSON.parse($scope.data.profile); /*original value*/
- $scope.profileId = $scope.profile.id;
- $scope.ociavailableRoles =JSON.parse($scope.data.availableRoles);
- $scope.ociTimeZones=JSON.parse($scope.data.timeZones);
- $scope.ociCountries=JSON.parse($scope.data.countries);
- stateList=JSON.parse($scope.data.stateList);
- $scope.sbcid=$scope.profile.sbcid;
- $scope.managerAttuid=$scope.profile.managerAttuid;
-
- if($scope.ociavailableRoles)
- $.each($scope.ociavailableRoles, function(i, a){
- var availableRole = a;
- availableRole.selected = false;
- $.each($scope.profile.roles, function(j, b){
- if(a.id === b.id) {
- availableRole.selected = true;
- if(a.id === 1){
- $scope.isUserSystemAdmin = true;
- }
- }
- });
- $scope.availableRoles.push(availableRole);
- });
- ;
- if($scope.ociTimeZones){
- $.each($scope.ociTimeZones, function(i, a){
- var timeZone = {"index":i, "value":a.value, "title":a.label};
- $scope.timeZones.push(timeZone);
- if($scope.profile.timeZoneId !== null && a.value === $scope.profile.timeZoneId.toString()){
- $scope.selectedTimeZone = timeZone;
- }
- });
- };
- if($scope.ociCountries)
- $.each($scope.ociCountries, function(i, a){
- var country = {"index":i, "value":a.value, "title":a.label};
- $scope.countries.push(country);
- if(a.value === $scope.profile.country){
- $scope.selectedCountry = country;
- }
- });
- ;
- stateList = stateList== null? []: stateList;
- var selectedState= $scope.profile.state ? $scope.profile.state:"";
- $scope.stateList = initDropdownWithLookUp(stateList,selectedState );
- },function(error){
- $scope.errorPopUp(error);
- $scope.showLoader=false;
- });
- }
-
-
- $scope.removeRole = function(data) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-del-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- role:data,
- roleId:$scope.profileId,
- };
- return message;
- }
- }
- });
- };
- $scope.addNewRoleFunctionModalPopup = function(data) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add.html',
- controller: ModalInstanceCtrl,
- windowClass:'modal-docked',
- sizeClass: 'modal-medium',
- resolve: {
- items: function () {
- var message = {
- roleFunctions:data,
- roleId:$scope.profileId,
- availableRoleFunctions:$scope.ociavailableRoles
- };
- return message;
- }
- }
- });
- }
-
-
- $scope.successPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return '';
- }
- }
- });
- };
-
- $scope.errorPopUp = function (msg) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- });
- };
- $scope.saveProfile = function() {
- $scope.errorMsg = '';
- if($scope.oriProfile.orgUserId != $scope.profile.orgUserId){
- $scope.errorPopUp('Organization User ID cannot be changed');
- return;
- }
- if($scope.oriProfile.orgManagerUserId != $scope.profile.orgManagerUserId){
- $scope.errorPopUp('Organization Manager ID cannot be changed');
- return;
- }
- if($scope.oriProfile.loginId != $scope.profile.loginId){
- $scope.errorPopUp('Login ID cannot be changed');
- return;
- }
- if($scope.oriProfile.loginPwd != $scope.profile.loginPwd){
- $scope.errorPopUp('Login Password cannot be changed');
- return;
- }
-
- var postData={
- profile: $scope.profile,
- selectedCountry:$scope.selectedCountry!=null?$scope.selectedCountry.value:"",
- selectedState:$scope.stateList.selected!=null?$scope.stateList.selected.value:"",
- selectedTimeZone:$scope.selectedTimeZone!=null?$scope.selectedTimeZone.value:""
- };
- SelfProfileService.saveProfile(postData, $scope.profileId).then(function(msg){
- $scope.successPopUp();
- },function(error){
- $scope.errorPopUp(error);
- });
- }
- /* updating role tables after adding or deleting*/
- $rootScope.$on('updateRoles',function(e,d){
- $scope.profile.roles = d.data;
- })
- /*****init call*****/
-
- if ($scope.pageType==2){
- $scope.getProfileDetail($scope.profileIdParam);
- }else{
- $scope.getSelfProfileDetail();
- }
-
-
- /****************************************************************popup modal*************************************************************/
- var ModalInstanceCtrl = function ($scope, $modalInstance, items,$rootScope) {
- $scope.roleFun=items;
- $scope.msg=items;
- $scope.activateRoleConfirmPopUp = function (selected, availableRole) {
- $scope.msg.roleFun = availableRole.name;
- $scope.msg.selected = selected;
- $scope.msg.availableRole = availableRole;
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add-confirm.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return $scope.msg;
- }
- }
- });
- }
- $scope.confirmRoleDel = function(role,profileId){
- var postData={role:role};
- SelfProfileService.removeRole(postData,profileId).then(function(msg){
- $scope.cancel();
- $scope.roleTableRefresh(profileId);
- },function(error){
- $scope.errorPopUp(error);
- });
- }
- $scope.confirmRoleFunAdd = function(availableRole,profileId){
- var postData={role:availableRole};
- SelfProfileService.addRole(postData,profileId).then(function(msg){
- $scope.cancel();
- $scope.roleTableRefresh(profileId);
- },function(error){
- $scope.errorPopUp(error);
- });
- }
-
- // confirm Role Function Remove
- $scope.confirmRoleFunRemove = function(availableRole,profileId){
- var postData={role:availableRole};
- SelfProfileService.deRole(postData,profileId).then(function(msg){
- $scope.cancel();
- $scope.roleTableRefresh(profileId);
- },function(error){
- $scope.errorPopUp(error);
- });
- }
-
- $scope.cancel = function () {
- $modalInstance.dismiss('cancel');
- };
-
- $scope.cancelRoleFunSwitch = function (msg) {
- $scope.msg.availableRole.selected = !$scope.msg.availableRole.selected;
- $modalInstance.dismiss('cancel');
- };
-
- $scope.selfProfileRoleRefresh = function(){
- SelfProfileService.getSelfProfileDetail().then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.profileTemp =JSON.parse($scope.data.profile);
- $rootScope.$broadcast('updateRoles',{data:$scope.profileTemp.roles});
- });
- }
- $scope.profileRoleRefresh = function(profileId){
- SelfProfileService.getProfileDetail(profileId).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.profileTemp =JSON.parse($scope.data.profile);
- $rootScope.$broadcast('updateRoles',{data:$scope.profileTemp.roles});
- });
- }
- $scope.roleTableRefresh = function (profileId) {
- if($scope.pageType==1)
- $scope.selfProfileRoleRefresh();
- else
- $scope.profileRoleRefresh(profileId);
- };
-
- };
-
-});
-function initDropdownWithLookUp(arr,selectedValue){
- var dropdownArray=[];
- var selected = null;
- if(arr){
- for(var i = 0,l = arr.length; i < l; i++) {
- var option = {
- "index" : i ,
- "value" : arr[i].value,
- "title" : arr[i].label
- };
- dropdownArray.push(option);
- if(arr[i].value === selectedValue){
- selected = option;
- }
- }
- }
- var dropDown={};
- dropDown.options = dropdownArray;
- dropDown.selected = selected!=null?selected:{"index":'',"value":"","title":""};
- return dropDown;
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js
deleted file mode 100644
index 8fa14643..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js
+++ /dev/null
@@ -1,459 +0,0 @@
-appDS2.controller('reportChartController', function ($scope, $rootScope, $timeout, $window, $http, $routeParams,modalService) {
- $scope.showLoader = true;
- $scope.commonOptionOpen = false;
- $scope.additionalOptionOpen = false;
- $scope.barChartOptionOpen = false;
- $scope.timeSeriesChartOptionOpen = false;
- $scope.selectedChartType = {value:""};
- $scope.chartTypeOptions = [
- {value: 'BarChart3D', text: 'Bar Chart'},
- {value: 'TimeSeriesChart', text: 'Time Series/Area Chart'},
- {value: 'PieChart', text: 'Pie Chart'},
- {value: 'AnnotationChart', text: 'Annotation Chart'},
- {value: 'FlexTimeChart', text: 'Flexible Time Chart'}
- ];
-
- $scope.populateChrtWzdFields = function() {
- $scope.reportRunJson = {};
- $http.get("raptor.htm?action=chart.json&c_master="+$routeParams.reportId).then(function (response) {
- $scope.reportRunJson = response.data;
- //Set chart type
- $scope.reportRunJson.commonChartOptions.animateAnimatedChart = $scope.reportRunJson.commonChartOptions.animateAnimatedChart+"";
- $scope.reportRunJson.commonChartOptions.hideLegend = $scope.reportRunJson.commonChartOptions.hideLegend + "";
- $scope.reportRunJson.showTitle = $scope.reportRunJson.showTitle + "";
-
- // if barChartOptions is not null
- if ($scope.reportRunJson.barChartOptions) {
- $scope.reportRunJson.barChartOptions.displayBarControls = $scope.reportRunJson.barChartOptions.displayBarControls+"";
- $scope.reportRunJson.barChartOptions.minimizeXAxisTickers = $scope.reportRunJson.barChartOptions.minimizeXAxisTickers+"";
- $scope.reportRunJson.barChartOptions.stackedChart = $scope.reportRunJson.barChartOptions.stackedChart+"";
- $scope.reportRunJson.barChartOptions.timeAxis =$scope.reportRunJson.barChartOptions.timeAxis+"";
- $scope.reportRunJson.barChartOptions.verticalOrientation = $scope.reportRunJson.barChartOptions.verticalOrientation +"";
- $scope.reportRunJson.barChartOptions.xAxisDateType = $scope.reportRunJson.barChartOptions.xAxisDateType +"";
- }
-
- if ($scope.reportRunJson.chartTypeJSON) {
- var chrtTypeValue = $scope.reportRunJson.chartType;
- for(var i = 0; i < $scope.chartTypes.length; i++) {
- if ($scope.chartTypes[i].value==chrtTypeValue) {
- $scope.reportRunJson.chartTypeJSON.index=$scope.chartTypes[i].index;
- $scope.reportRunJson.chartTypeJSON.value=$scope.chartTypes[i].value;
- $scope.reportRunJson.chartTypeJSON.title=$scope.chartTypes[i].title;
- }
-
- }
- }
-
- //Set Domain Axis
- if ($scope.reportRunJson.domainAxisJSON) {
- var domaninAxisValue = $scope.reportRunJson.domainAxisJSON.value;
- for(var i = 0; i < $scope.reportRunJson.chartColumnJSONList.length; i++) {
- if ($scope.reportRunJson.chartColumnJSONList[i].value==domaninAxisValue) {
- $scope.reportRunJson.domainAxisJSON.index=$scope.reportRunJson.chartColumnJSONList[i].index;
- $scope.reportRunJson.domainAxisJSON.title=$scope.reportRunJson.chartColumnJSONList[i].title;
- }
-
- }
- }
-
- //Set Category
- if ($scope.reportRunJson.categoryAxisJSON) {
- var categoryAxisValue = $scope.reportRunJson.categoryAxisJSON.value;
- for(var i = 0; i < $scope.reportRunJson.chartColumnJSONList.length; i++) {
- if ($scope.reportRunJson.chartColumnJSONList[i].value==categoryAxisValue) {
- $scope.reportRunJson.categoryAxisJSON.index=$scope.reportRunJson.chartColumnJSONList[i].index;
- $scope.reportRunJson.categoryAxisJSON.title=$scope.reportRunJson.chartColumnJSONList[i].title;
- }
- }
- }
-
- //Set range axis label
- if ($scope.reportRunJson.rangeAxisList) {
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
-
- if ($scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON) {
- var rangeAxisLabelValue = $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.value;
- for(var i = 0; i < $scope.reportRunJson.chartColumnJSONList.length; i++) {
- if ($scope.reportRunJson.chartColumnJSONList[i].value==rangeAxisLabelValue) {
- $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.index=$scope.reportRunJson.chartColumnJSONList[i].index;
- $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.title=$scope.reportRunJson.chartColumnJSONList[i].title;
- }
- }
- }
- }
- }
-
-
- //set range linetype
- if ($scope.reportRunJson.rangeAxisList) {
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
- if ($scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON != null && $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.value != ""
- && $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.value != null) {
- var lineTypeValue = $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.value;
- for(var i = 0; i < $scope.lineTypes.length; i++) {
- if ($scope.lineTypes[i].value==lineTypeValue) {
- $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.index=$scope.lineTypes[i].index;
- $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.title=$scope.lineTypes[i].title;
- }
- }
- } else {
- $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON = null;
- }
- }
- }
- //set range color
- if ($scope.reportRunJson.rangeAxisList) {
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
- if ($scope.reportRunJson.rangeAxisList[j].rangeColorJSON != null && $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.value != ""
- && $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.value != null) {
- var colorValue = $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.value;
- for(var i = 0; i < $scope.rangeColors.length; i++) {
- if ($scope.rangeColors[i].value==colorValue) {
- $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.index=$scope.rangeColors[i].index;
- $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.title=$scope.rangeColors[i].title;
- }
- }
- }else {
- $scope.reportRunJson.rangeAxisList[j].rangeColorJSON = null;
- }
- }
- }
- $scope.showLoader = false;
- });
-
- $scope.legend = "true";
- }
-
- $scope.saveChartData = function() {
- $scope.showLoader = true;
-
- $scope.reportRunJson.commonChartOptions.animateAnimatedChart = ($scope.reportRunJson.commonChartOptions.animateAnimatedChart=="true")
- $scope.reportRunJson.commonChartOptions.hideLegend = ($scope.reportRunJson.commonChartOptions.hideLegend=="true");
- $scope.reportRunJson.showTitle = ($scope.reportRunJson.showTitle=="true");
-
- $scope.reportRunJson.chartTypeJSON = {
- 'index':0,'title':'','value':''};
-
-
- if (($scope.reportRunJson.chartType == "BarChart3D")&&($scope.reportRunJson.barChartOptions)) {
- $scope.reportRunJson.barChartOptions.displayBarControls = ($scope.reportRunJson.barChartOptions.displayBarControls=="true") ;
- $scope.reportRunJson.barChartOptions.minimizeXAxisTickers = ($scope.reportRunJson.barChartOptions.minimizeXAxisTickers=="true") ;
- $scope.reportRunJson.barChartOptions.stackedChart = ($scope.reportRunJson.barChartOptions.stackedChart=="true") ;
- $scope.reportRunJson.barChartOptions.timeAxis= ($scope.reportRunJson.barChartOptions.timeAxi=="true") ;
- $scope.reportRunJson.barChartOptions.verticalOrientation = ($scope.reportRunJson.barChartOptions.verticalOrientation=="true") ;
- $scope.reportRunJson.barChartOptions.xAxisDateType = ($scope.reportRunJson.barChartOptions.xAxisDateType=="true") ;
- }
-
- for (var i=0;i<$scope.chartTypes.length;i++) {
- if ($scope.reportRunJson.chartType==$scope.chartTypes[i].value) {
- $scope.reportRunJson.chartTypeJSON = {
- 'index':$scope.chartTypes[i].index,
- 'title':$scope.chartTypes[i].title,
- 'value':$scope.chartTypes[i].value
- }
- }
- }
-
- $scope.reportRunJson.domainAxisJSON = {
- "index":0,"value":$scope.reportRunJson.domainAxis,"title": $scope.reportRunJson.domainAxis
- };
- $scope.reportRunJson.categoryAxisJSON = {
- "index":0,"value":$scope.reportRunJson.categoryAxis,"title": $scope.reportRunJson.categoryAxis
- };
-
- // Specifically for DS2 for color
- for (var i=0; i<$scope.reportRunJson.rangeAxisList.length; i ++) {
- $scope.reportRunJson.rangeAxisList[i].rangeColorJSON =
- {"index":0, "value": $scope.reportRunJson.rangeAxisList[i].rangeColor, "title": ""};
-
- $scope.reportRunJson.rangeAxisList[i].rangeLineTypeJSON =
- {"index":0, "value": "", "title": ""};
- for (var j=0;j<$scope.lineTypes.length;j++) {
- if ($scope.reportRunJson.rangeAxisList[i].rangeLineType ==$scope.lineTypes[j].value) {
- $scope.reportRunJson.rangeAxisList[i].rangeLineTypeJSON =
- {"index":$scope.lineTypes[j].index, "value": $scope.lineTypes[j].value, "title": $scope.lineTypes[j].title};
- }
- }
-
- }
-
- //Converting string variables to numbers
- $scope.reportRunJson.commonChartOptions.rightMargin = Number($scope.reportRunJson.commonChartOptions.rightMargin);
- $scope.reportRunJson.commonChartOptions.topMargin = Number($scope.reportRunJson.commonChartOptions.topMargin);
- $scope.reportRunJson.commonChartOptions.bottomMargin = Number($scope.reportRunJson.commonChartOptions.bottomMargin);
- $scope.reportRunJson.commonChartOptions.leftMargin = Number($scope.reportRunJson.commonChartOptions.leftMargin);
-
- if ($scope.reportRunJson.categoryAxisJSON == "") {
- $scope.reportRunJson.categoryAxisJSON = {};
- $scope.reportRunJson.categoryAxisJSON.value = -1;
- }
- //add the remove list to the json
- $scope.reportRunJson.rangeAxisRemoveList= $scope.rangeAxisRemoveList;
- $http.post("save_chart", JSON.stringify($scope.reportRunJson)).success(function(data, status) {
- $scope.successSubmit=true;
- $scope.showLoader = false;
- $scope.reportRunJson.commonChartOptions.animateAnimatedChart = $scope.reportRunJson.commonChartOptions.animateAnimatedChart+"";
- $scope.reportRunJson.commonChartOptions.hideLegend = $scope.reportRunJson.commonChartOptions.hideLegend + "";
- $scope.reportRunJson.showTitle = $scope.reportRunJson.showTitle + "";
- if ($scope.reportRunJson.chartType == "BarChart3D") {
- $scope.reportRunJson.barChartOptions.displayBarControls = $scope.reportRunJson.barChartOptions.displayBarControls+"";
- $scope.reportRunJson.barChartOptions.minimizeXAxisTickers = $scope.reportRunJson.barChartOptions.minimizeXAxisTickers+"";
- $scope.reportRunJson.barChartOptions.stackedChart = $scope.reportRunJson.barChartOptions.stackedChart+"";
- $scope.reportRunJson.barChartOptions.timeAxis =$scope.reportRunJson.barChartOptions.timeAxis+"";
- $scope.reportRunJson.barChartOptions.verticalOrientation = $scope.reportRunJson.barChartOptions.verticalOrientation +"";
- $scope.reportRunJson.barChartOptions.xAxisDateType = $scope.reportRunJson.barChartOptions.xAxisDateType +"";
- }
- $scope.populateChrtWzdFields();
- })
- }
-
-
- $scope.addRangeAxisRow = function (rangeaxisitem) {
- $scope.reportRunJson.rangeAxisList.push({
- });
- };
-
- $scope.rangeAxisRemoveList= [];
- $scope.removeRangeAxisRow = function (index) {
- $scope.rangeAxisRemoveList.push($scope.reportRunJson.rangeAxisList[index]);
- $scope.reportRunJson.rangeAxisList[index].removed="true";
- };
-
-
- $scope.init = function () {
- if ($scope) {
- $scope.populateChrtWzdFields();
- $scope.reportRunJson.rangeAxisRemoveList= [];
- }
- };
-
-
-
- $scope.domainItems = [{title:"Domain Axis1", content:"Test1", open: false},{title:"Domain Axis2", content:"Test2", open: false}];
-
- $scope.chartTypes = [
- {index: 0, value: 'BarChart3D', title: 'Bar Chart'},
- {index: 1, value: 'TimeSeriesChart', title: 'Time Series/Area Chart'},
- {index: 2, value: 'PieChart', title: 'Pie Chart'},
- {index: 3, value: 'AnnotationChart', title: 'Annotation Chart'},
- {index: 4, value: 'FlexTimeChart', title: 'Flexible Time Chart'}
- ];
-
- $scope.categories = [
- {index: 0, value: 'scenario_name', title: 'scenario_name'},
- {index: 1, value: 'total_traffic_in_PB', title: 'Total Traffic in PB'},
- {index: 2, value: 'Avg Utilization Day', title: 'Avg Utilization Day'}
- ];
-
- $scope.rangeColors = [
- {index: 0, value: "#1f77b4",title: "Dodger Blue"},
- {index: 1, value: "#ff7f0e",title: "Vivid orange"},
- {index: 2, value: "#2ca02c",title: "Forest Green"},
- {index: 3, value: "#8c864b",title: "Greenish Red"},
- {index: 4, value: "#9467bd",title: "Desaturated violet"},
- {index: 5, value: "#8c564b",title: "Dark moderate red"},
- {index: 6, value: "#e377c2",title: "Soft pink"},
- {index: 7, value: "#7f7f7f",title: "Dark gray"},
- {index: 8, value: "#bcbd22",title: "Strong yellow"},
- {index: 9, value: "#17becf",title: "Strong cyan"},
- {index: 10, value: "#dc143c",title: "Vivid red"},
- {index: 11, value: "#800080",title: "Dark magenta"},
- {index: 12, value: "#0000FF",title: "Blue"},
- {index: 13, value: "#008000",title: "Dark lime green"},
- {index: 14, value: "#D2691E",title: "Reddish Orange"},
- {index: 15, value: "#FF0000",title: "Red"},
- {index: 16, value: "#000000",title: "Black"},
- {index: 17, value: "#DB7093",title: "Pink"},
- {index: 18, value: "#FF00FF",title: "Pure Magenta"},
- {index: 19, value: "#7B68EE",title: "Soft blue"},
- {index: 20, value: "#1f77b6",title: "Strong blue"},
- {index: 21, value: "#9edae5",title: "Very soft cyan"},
- {index: 22, value: "#393b79",title: "Dark Blue"},
- {index: 23, value: "#5254a3",title: "Dark moderate Blue"},
- {index: 24, value: "#6b6ecf",title: "Slightly desaturated blue"},
- {index: 25, value: "#9c9ede",title: "Very soft blue"},
- {index: 26, value: "#637939",title: "Dark Green"},
- {index: 27, value: "#8ca252",title: "Dark moderate green"},
- {index: 28, value: "#b5cf6b",title: "Slightly desaturated green"},
- {index: 29, value: "#cedb9c",title: "Desaturated Green"},
-
- /* Old Colors */
- {index: 30, value: "#00FFFF",title: "Aqua"},
- {index: 31, value: "#000000",title: "Black"},
- {index: 32, value: "#0000FF",title: "Blue"},
- {index: 33, value: "#FF00FF",title: "Fuchsia"},
- {index: 34, value: "#808080",title: "Gray"},
- {index: 35, value: "#008000",title: "Green"},
- {index: 36, value: "#00FF00",title: "Lime"},
- {index: 37, value: "#800000",title: "Maroon"},
- {index: 38, value: "#000080",title: "Navy"},
- {index: 39, value: "#808000",title: "Olive"},
- {index: 40, value: "#FF9900",title: "Orange"},
- {index: 41, value: "#800080",title: "Purple"},
- {index: 42, value: "#FF0000",title: "Red"},
- {index: 43, value: "#C0C0C0",title: "Silver"},
- {index: 44, value: "#008080",title: "Teal"},
- {index: 45, value: "#FFFFFF",title: "White"},
- {index: 46, value: "#FFFF00",title: "Yellow"}
- ];
-
-
- $scope.lineTypes = [
- {index: 0, value: 'default', title: 'Default'},
- {index: 1, value: 'dotted_lines', title: 'Dotted Lines'},
- {index: 2, value: 'dashed_lines', title: 'Dashed Lines'}
- ];
-
- $scope.hardCodeReport= {
- "reportID":"3356",
- "reportName":"Test: Line Chart",
- "reportDescr":"",
- "reportTitle":"",
- "reportSubTitle":"",
- "formFieldList":[
- ],
- "chartColumnJSONList":[
- {
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"056"
- },
- {
- "index":1,
- "value":"ut1",
- "title":"util_perc",
- "$$hashKey":"057"
- }
- ],
- "formfield_comments":null,
- "totalRows":0,
- "chartSqlWhole":"SELECT traffic_date tr0, traffic_date tr0_1,util_perc ut1, 1 FROM portal.demo_util_chart ORDER BY 1",
- "chartAvailable":true,
- "chartType":{"index": "", "value": "Bar Chart", "title": ""},
- "width":"700",
- "height":"420",
- "animation":false,
- "rotateLabels":"90",
- "staggerLabels":false,
- "showTitle":"false",
- "domainAxis":{
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"11H"
- },
-
- "categoryAxis":{
- "index":1,
- "value":"ut1",
- "title":"util_perc",
- "$$hashKey":"11I"
- },
-
- "hasCategoryAxis":false,
- "rangeAxisList":[
- {
-
- "rangeColor":{
- "index":"",
- "value":"#bcbd22",
- "title":""
- },
-
- "rangeLineType":{
- "index":"",
- "value":"dotted_lines",
- "title":""
- },
- "rangeAxisLabel":{
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"056"
- },
- "YAxis":"10",
- "chartTitle":"test"
- },
- {
- "rangeColor":{
- "index":"",
- "value":"#2ca02c",
- "title":""
- },
-
- "rangeLineType":{
- "index":"",
- "value":"dashed_lines",
- "title":""
-
-
- },
-
- "rangeAxisLabel":{
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"056"
- },
- "YAxis":"10",
- "chartTitle":"test"
- }
-
-
- ],
-
- "primaryAxisLabel":"testlabel",
- "secondaryAxisLabel":"testseclabel",
- "minRange":"10",
- "maxRange":"20",
- "topMargin":"6",
- "bottomMargin":"5",
- "leftMargin":"4",
- "rightMargin":"3"
- };
-
- var colorValue = $scope.hardCodeReport.rangeAxisList[0].rangeColor.value;
-
- $timeout(function() {
- $rootScope.isViewRendering = false;
- });
-
-
-});
-
-appDS2.directive('onlyDigits', function () {
-
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function (scope, element, attrs, ngModel) {
- if (!ngModel) return;
- ngModel.$parsers.unshift(function (inputValue) {
- var digits = inputValue.split('').filter(function (s) { return (!isNaN(s) && s != ' '); }).join('');
- ngModel.$viewValue = digits;
- ngModel.$render();
- return digits;
- });
- }
- };
-});
-
-appDS2.directive('onlyCharacters', function () {
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function (scope, element, attrs, ngModel) {
- if (!ngModel) return;
- ngModel.$parsers.unshift(function (inputValue) {
- var digits = inputValue.split('').filter(function (s) { return (isNaN(s) && s != ' '); }).join('');
- ngModel.$viewValue = digits;
- ngModel.$render();
- return digits;
- });
- }
- };
-});
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-import-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-import-controller.js
deleted file mode 100644
index a8f853fd..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-import-controller.js
+++ /dev/null
@@ -1,20 +0,0 @@
-appDS2.controller('reportImportController', function($scope,$http,$location, $routeParams, $q, $modal,$log,$window, raptorReportFactory, stepFormFactory, DOMHelper) {
- $scope.importXML = function(){
-
- var importXMLJSON = {
- "tabId":"Import",
- "tabName":"Import",
- "reportXML":$scope.xmlContent
- }
- $scope.errorMessage = ""
- raptorReportFactory.postImportXml(importXMLJSON).then(function(data){
- if (data.errormessage) {
- $scope.errorMessage = data.errormessage;
- } else {
- $window.location.href = 'report#/report_wizard/-1';
- };
- },function(error){
- $log.error("raptorReportFactory: postImportXml failed.");
- });
- }
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js
deleted file mode 100644
index 1e22cca3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js
+++ /dev/null
@@ -1,41 +0,0 @@
-appDS2.config(['$routeProvider',
- function($routeProvider) {
- $routeProvider.
- when('/', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html',
- controller: 'reportSearchController'
- }).
- when('/report_search', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html',
- controller: 'reportSearchController'
- }).
- when('/report_run/:reportUrlParams*', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html',
- controller: 'reportRunController'
- }).
- when('/report_chart_wizard/:reportId', {
- templateUrl: 'static/fusion/raptor/ebz/report_chart_wizard.html',
- controller: 'ChartController'
- }).
- when('/report_chart/:reportId', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html',
- controller: 'reportChartController'
- }).
- when("/report_wizard", {
- templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html",
- controller: "reportStepController"
- }).
- when("/report_wizard/:reportId", {
- templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html",
- controller: "reportStepController"
- }).
- when("/report_wizard/:reportMode/:reportId", {
- templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html",
- controller: "reportStepController"
- }).
- when("/report_import", {
- templateUrl : "app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html",
- controller: "reportImportController"
- })
- ;
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js
deleted file mode 100644
index 6eb0afe6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js
+++ /dev/null
@@ -1,331 +0,0 @@
-appDS2.controller("reportRunController", ['$scope','$rootScope','$routeParams','$http','dateFilter', '$window', '$timeout', 'rowSorter',
- function ($scope,$rootScope,$routeParams,$http,dateFilter,$window,$timeout,rowSorter) {
- $scope.dateformat = "MM/dd/yyyy";
- $scope.datetimeformat = "MM/dd/yyyy hh:mm a";
- $scope.showFormFields = false;
- $scope.showGrid = false;
- $scope.showChart = false;
- $scope.showBackButton = false;
- $scope.reportData = {};
- $scope.reportData.allowEdit = false;
- $scope.formFieldSelectedValues = {};
- $scope.showFormFieldIds = false;
- $scope.showFormFieldId = {
- value: false
- };
- $scope.isInProgress = true;
-
- if($routeParams.reportUrlParams.indexOf("parent___params===")>-1) {
- $scope.showBackButton = true;
- $scope.parentReportUrlParams = $routeParams.reportUrlParams.substring($routeParams.reportUrlParams.indexOf("parent___params===")+18);
- $scope.currentReportUrlParams = $routeParams.reportUrlParams.substring(0,$routeParams.reportUrlParams.indexOf("parent___params==="));
- } else {
- $scope.currentReportUrlParams = $routeParams.reportUrlParams;
- }
- // console.log($routeParams.reportUrlParams);
- var parseQueryString = function( queryString ) {
- var params = {}, queries, temp, i, l;
- // Split into key/value pairs
- queries = queryString.split("&");
- // Convert the array of strings into an object
- for ( i = 0, l = queries.length; i < l; i++ ) {
- temp = queries[i].split('=');
- //console.log(temp[0]);
- //console.log(temp[0] != "refresh");
- if(temp[0] && temp[0] != "refresh")
- params[temp[0]] = temp[1];
- }
- return params;
- };
-
- var convertQueryString = function(queryString) {
- var keys = ""; var str = "";
- keys = Object.keys(queryString);
- //console.log(keys);
- for ( i = 0, l = keys.length; i < l; i++ ) {
- str += keys[i]+"="+queryString[keys[i]] + "&";
-
- }
- return str;
- //queryString =
- }
-
-
-
- $scope.backToParentReport = function (){
- $window.location.href = "report#/report_run/"+$scope.parentReportUrlParams
- }
-
- $scope.urlParams = parseQueryString($scope.currentReportUrlParams);
-
- $scope.reportChartURL = 'report#/report_chart/'+$scope.urlParams.c_master;
-
- $scope.reportEditURL = 'report#/report_wizard/'+$scope.urlParams.c_master;
-
-
- $http.get('raptor.htm?action=report.run.container&'+$scope.currentReportUrlParams).then(
- function(response){
- // console.log(response);
- $scope.isInProgress = false;
- $scope.reportData = response.data;
- // console.log('reportData report run container response',$scope.reportData);
- if ($scope.reportData.reportTitle) {
- $scope.reportData.reportHeading = $scope.reportData.reportTitle;
- if ($scope.reportData.reportSubTitle) {
- $scope.reportData.reportSubTitle = $scope.reportData.reportSubTitle;
- }
- }
- else
- $scope.reportData.reportHeading = $scope.reportData.reportName;
- if(!$scope.urlParams.hideChart && $scope.reportData.chartAvailable && $scope.reportData.totalRows>1){
- // console.log('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams));
- $http.get('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)).then(
- function(response){
- $scope.showChart = true;
- document.getElementById('chartiframe').contentWindow.document.write(response.data);
- document.getElementById('chartiframe').contentWindow.document.close();
- });
- }
-
- if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields){
- $scope.showFormFields = true;
- }
- });
- $scope.getFormFieldSelectedValuesAsURL = function(){
- var formFieldsUrl = '';
- $scope.reportData.formFieldList.forEach(function(formField) {
- if(formField.fieldType==='LIST_BOX') {
- if($scope.formFieldSelectedValues && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId].value != '') {
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId].value+'&';
- }
- } else if(formField.fieldType==='LIST_MULTI_SELECT') {
- if($scope.formFieldSelectedValues[formField.fieldId].length >0) {
- for (var i = 0; i < $scope.formFieldSelectedValues[formField.fieldId].length; i++) {
- if($scope.formFieldSelectedValues[formField.fieldId][i].defaultValue){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId][i].value+'&';
- }
- }
- }
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && formField.validationType === 'DATE'){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+dateFilter($scope.formFieldSelectedValues[formField.fieldId],$scope.dateformat)+'&';
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && formField.validationType === 'TIMESTAMP_MIN'){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+dateFilter($scope.formFieldSelectedValues[formField.fieldId],$scope.datetimeformat)+'&';
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId] != ''){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId]+'&';
- }
- });
- return formFieldsUrl;
-
- }
-
- $scope.runReport = function(pagination){
- var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL();
- /*if ($scope.reportData.reportTitle)
- $scope.reportData.reportHeading = $scope.reportData.reportTitle;
- else
- $scope.reportData.reportHeading = $scope.reportData.reportName;*/
-
- // console.log("pagination");
- if(!pagination) {
- //console.log("refreshed ...");
- $scope.gridOptions.pageNumber = 1;
- paginationOptions.pageNumber = 1;
- paginationOptions.pageSize = $scope.reportData.pageSize;
- //console.log($scope.gridOptions);
- $scope.gridOptions.paginationCurrentPage = 1;
- $scope.gridOptions.paginationPageSizes= [$scope.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.reportData.pageSize;
- if($scope.reportData.totalRows<14){
- $scope.gridHeight = ($scope.reportData.totalRows+7)*30+'px';
- } else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = $scope.reportData.totalRows;
- $scope.gridOptions.data= $scope.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= $scope.reportData.reportName;
-
- }
- $scope.currentReportUrlParams = 'c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'&display_content=Y&r_page='+(paginationOptions.pageNumber-1);
- // console.log('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- function(response){
- $scope.reportData = response.data;
- if ($scope.reportData.reportTitle) {
- $scope.reportData.reportHeading = $scope.reportData.reportTitle;
- if ($scope.reportData.reportSubTitle) {
- $scope.reportData.reportSubTitle = $scope.reportData.reportSubTitle;
- }
- }
- else
- $scope.reportData.reportHeading = $scope.reportData.reportName;
-
- if($scope.reportData.errormessage) {
- //console.log($scope.reportData);
- var stacktraceFP = $scope.reportData.stacktrace.substring(0, $scope.reportData.stacktrace.indexOf(":")+1);
- document.getElementById('errorDiv').innerHTML = stacktraceFP + " " + $scope.reportData.errormessage;
- //console.log(document.getElementById('errorDiv').innerHtml);
- //console.log(stacktraceFP + " " + $scope.reportData.errormessage);
- }
- if(!pagination) {
- if(!$scope.urlParams.hideChart && $scope.reportData.chartAvailable && $scope.reportData.totalRows>1){
- // console.log('raptor.htm?action=chart.run&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=chart.run&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- function(response) {
- // console.log(response.data);
- $scope.showChart = true;
- // console.log('response.data',response.data);
- document.getElementById('chartiframe').contentWindow.document.write(response.data);
- document.getElementById('chartiframe').contentWindow.document.close();
- });
- } else {
- $scope.showChart = false;
- }
- }
- if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields && !$scope.reportData.hideFormFieldsAfterRun){
- $scope.showFormFields = true;
- } else {
- $scope.showFormFields = false;
- }
- });
- };
-
- var paginationOptions = {
- pageNumber: 1,
- pageSize: 5,
- sort: null
- };
-
- var correctTotalPaginationTemplate =
- //same as normal template, but fixed totals: {{(((grid.options.paginationCurrentPage-1)*grid.options.paginationPageSize)+1)}} {{(grid.options.paginationCurrentPage*grid.options.paginationPageSize>grid.options.totalItems?grid.options.totalItems:grid.options.paginationCurrentPage*grid.options.paginationPageSize)}}
- "<div role=\"contentinfo\" class=\"ui-grid-pager-panel\" ui-grid-pager ng-show=\"grid.options.enablePaginationControls\"><div role=\"navigation\" class=\"ui-grid-pager-container\"><div role=\"menubar\" class=\"ui-grid-pager-control\"><button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-first\" ui-grid-one-bind-title=\"aria.pageToFirst\" ui-grid-one-bind-aria-label=\"aria.pageToFirst\" ng-click=\"pageFirstPageClick()\" ng-disabled=\"cantPageBackward()\"><div class=\"first-triangle\"><div class=\"first-bar\"></div></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-previous\" ui-grid-one-bind-title=\"aria.pageBack\" ui-grid-one-bind-aria-label=\"aria.pageBack\" ng-click=\"pagePreviousPageClick()\" ng-disabled=\"cantPageBackward()\"><div class=\"first-triangle prev-triangle\"></div></button> <input type=\"number\" ui-grid-one-bind-title=\"aria.pageSelected\" ui-grid-one-bind-aria-label=\"aria.pageSelected\" class=\"ui-grid-pager-control-input\" ng-model=\"grid.options.paginationCurrentPage\" min=\"1\" max=\"{{ paginationApi.getTotalPages() }}\" required> <span class=\"ui-grid-pager-max-pages-number\" ng-show=\"paginationApi.getTotalPages() > 0\"><abbr ui-grid-one-bind-title=\"paginationOf\">/</abbr> {{ paginationApi.getTotalPages() }}</span> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-next\" ui-grid-one-bind-title=\"aria.pageForward\" ui-grid-one-bind-aria-label=\"aria.pageForward\" ng-click=\"pageNextPageClick()\" ng-disabled=\"cantPageForward()\"><div class=\"last-triangle next-triangle\"></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-last\" ui-grid-one-bind-title=\"aria.pageToLast\" ui-grid-one-bind-aria-label=\"aria.pageToLast\" ng-click=\"pageLastPageClick()\" ng-disabled=\"cantPageToLast()\"><div class=\"last-triangle\"><div class=\"last-bar\"></div></div></button></div><div class=\"ui-grid-pager-row-count-picker\" ng-if=\"grid.options.paginationPageSizes.length > 1\"><select ui-grid-one-bind-aria-labelledby-grid=\"'items-per-page-label'\" ng-model=\"grid.options.paginationPageSize\" ng-options=\"o as o for o in grid.options.paginationPageSizes\"></select><span ui-grid-one-bind-id-grid=\"'items-per-page-label'\" class=\"ui-grid-pager-row-count-label\">&nbsp;{{sizesLabel}}</span></div><span ng-if=\"grid.options.paginationPageSizes.length <= 1\" class=\"ui-grid-pager-row-count-label\">{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}</span></div><div class=\"ui-grid-pager-count-container\"><div class=\"ui-grid-pager-count\"><span ng-show=\"grid.options.totalItems > 0\">{{(((grid.options.paginationCurrentPage-1)*grid.options.paginationPageSize)+1)}} <abbr ui-grid-one-bind-title=\"paginationThrough\">-</abbr> {{(grid.options.paginationCurrentPage*grid.options.paginationPageSize>grid.options.totalItems?grid.options.totalItems:grid.options.paginationCurrentPage*grid.options.paginationPageSize)}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>";
-
- $scope.gridOptions = {
- pageNumber: 1,
- sort : null,
- paginationPageSizes: [5],
- paginationPageSize: 5,
- paginationTemplate: correctTotalPaginationTemplate,
- columnDefs: [],
- data: [],
- enableGridMenu: true,
- enableSelectAll: true,
- gridMenuCustomItems : [
- { title : 'All Reports',
- action : function($event) {
- $window.open('report.htm','_self');
- }, order : 210 },
- { title : 'Edit Report',
- action : function($event) {
- $window.open($scope.reportEditURL,'_self');
- }, order : 211 },
- { title : 'Export All data as Excel 2007',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.excel2007.session','_self');
- }, order : 212 },
- { title : 'Export All data as Excel',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.excel.session','_self');
- }, order : 213 },
- { title : 'Export All data as CSV',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.csv.session','_self');
- }, order : 214 },
- { title : 'Export All data as PDF',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.pdf.session','_self');
- }, order : 215 } ],
- exporterMenuPdf: false,
- exporterMenuCsv: false,
- exporterCsvFilename: 'myFile.csv',
- exporterPdfDefaultStyle: {fontSize: 9},
- exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
- exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
- exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
- exporterPdfFooter: function ( currentPage, pageCount ) {
- return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
- },
- exporterPdfCustomFormatter: function ( docDefinition ) {
- docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
- docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
- return docDefinition;
- },
- exporterPdfOrientation: 'portrait',
- exporterPdfPageSize: 'LETTER',
- exporterPdfMaxGridWidth: 500,
- exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
- onRegisterApi: function(gridApi) {
- $scope.gridApi = gridApi;
- gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
- paginationOptions.pageNumber = newPage;
- paginationOptions.pageSize = pageSize;
- $scope.runReport(true);
- });
- }
- };
-
- $scope.uiGridRefresh = function(){
- var columnDefsArray = [];
- var columnFreezeEndColumn = $scope.reportData.colIdxTobeFreezed;
- var doColumnNeedToFreeze = false;
- if(columnFreezeEndColumn && columnFreezeEndColumn.length>0) {
- doColumnNeedToFreeze = true;
- }
- $scope.reportData.reportDataColumns.forEach(function(entry) {
- var tempColumnDef = { displayName: entry.columnTitle, field: entry.colId, enableSorting: entry.sortable,
- sortingAlgorithm: function(a, b) {
- return rowSorter.sortAlpha(a.displayValue, b.displayValue);
- },
- cellTemplate: '<div class="ui-grid-cell-contents" style="text-align:{{COL_FIELD.alignment}};" title="TOOLTIP"> '+
- ' <div ng-if="!COL_FIELD.drillDownURL || COL_FIELD.drillDownURL==\'\'">{{COL_FIELD.displayValue}}</div>' +
- ' <a ng-if="COL_FIELD.drillDownURL && COL_FIELD.drillDownURL!=\'\'" ng-href="{{COL_FIELD.drillDownURL}}&parent___params==={{grid.appScope.currentReportUrlParams}}" >{{COL_FIELD.displayValue}}</a>' +
- '</div>'};
- if(entry.columnWidth && entry.columnWidth!='null' && entry.columnWidth!='pxpx' && entry.columnWidth!='nullpx' && entry.columnWidth!='nullpxpx'){
- tempColumnDef['minWidth'] = entry.columnWidth.substring(0, entry.columnWidth.length - 2);
- } else {
- tempColumnDef['minWidth'] = '100';
- }
- if(doColumnNeedToFreeze) {
- tempColumnDef['pinnedLeft']= true;
- if(columnFreezeEndColumn === entry.colId){
- doColumnNeedToFreeze = false;
- }
- }
- columnDefsArray.push(tempColumnDef);
- });
-
- $scope.gridOptions.paginationPageSizes= [$scope.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.reportData.pageSize;
- if($scope.reportData.totalRows<14){
- $scope.gridHeight = ($scope.reportData.totalRows+5)*30+'px';
- }else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = $scope.reportData.totalRows;
- $scope.gridOptions.columnDefs= columnDefsArray;
- $scope.gridOptions.data= $scope.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= $scope.reportData.reportName;
- };
-
- $scope.$watch("reportData",function(newValue,oldValue) {
- if(!$scope.urlParams.hideGrid){
- if($scope.reportData){
- if($scope.reportData.displayData && $scope.reportData.reportDataColumns){
- $scope.showGrid = true;
- $scope.uiGridRefresh();
- }
- }
- }
- });
-
- $scope.triggerOtherFormFields = function(){
- // console.log("report_run");
- var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL();
- $http.get('raptor.htm?action=report.formfields.run.container&c_master='+$scope.reportData.reportID+'&'+formFieldsUrl).then(
- function(response){
- $scope.reportData = response.data;
- });
- };
- $timeout(function() {
- $rootScope.isViewRendering = false;
- });
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js
deleted file mode 100644
index e1c5e1e8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js
+++ /dev/null
@@ -1,186 +0,0 @@
-appDS2.requires.push('ui.grid');
-appDS2.requires.push('ui.grid.pagination');
-appDS2.requires.push('ui.grid.resizeColumns');
-appDS2.controller("reportSearchController", ['$scope','$rootScope','$http','$timeout','uiGridConstants','$modal','$q','$log','raptorReportFactory',function ($scope,$rootScope,$http,$timeout,uiGridConstants,$modal,$q,$log,raptorReportFactory) {
-
- $scope.getSearchData = function(){
- raptorReportFactory.getSearchData().then(function(data){
- $scope.searchdData = data;
- },function(error){
- $log.error("raptorReportFactory: getSearchData failed.");
- });
- }
-
- $scope.getSearchData();
-
- $scope.runReport = function(){
- var searchParams = '';
- if($scope.reportId && $scope.reportId!=''){
- searchParams = '&rep_id='+$scope.reportId+'&rep_id_options='+$scope.operatorRepId.index;
- }
- if($scope.reportName && $scope.reportName!=''){
- searchParams = searchParams+'&rep_name='+$scope.reportName+'&rep_name_options='+$scope.operatorRepName.index;
- }
-
- var pageSearchParameter = ($scope.paginationOptions.pageNumber-1)+searchParams
- raptorReportFactory.getSearchDataAtPage(pageSearchParameter).then(function(data){
- $scope.searchdData = data
- },function(error){
- $log.error("raptorReportFactory: getSearchDataAtPage failed.");
- });
- };
-
-
- $scope.paginationOptions = {
- pageNumber: 1,
- pageSize: 5,
- sort: null
- };
-
- var correctTotalPaginationTemplate =
- //same as normal template, but fixed totals: {{(((grid.options.paginationCurrentPage-1)*grid.options.paginationPageSize)+1)}} {{(grid.options.paginationCurrentPage*grid.options.paginationPageSize>grid.options.totalItems?grid.options.totalItems:grid.options.paginationCurrentPage*grid.options.paginationPageSize)}}
- "<div role=\"contentinfo\" class=\"ui-grid-pager-panel\" ui-grid-pager ng-show=\"grid.options.enablePaginationControls\"><div role=\"navigation\" class=\"ui-grid-pager-container\"><div role=\"menubar\" class=\"ui-grid-pager-control\"><button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-first\" ui-grid-one-bind-title=\"aria.pageToFirst\" ui-grid-one-bind-aria-label=\"aria.pageToFirst\" ng-click=\"pageFirstPageClick()\" ng-disabled=\"cantPageBackward()\"><div class=\"first-triangle\"><div class=\"first-bar\"></div></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-previous\" ui-grid-one-bind-title=\"aria.pageBack\" ui-grid-one-bind-aria-label=\"aria.pageBack\" ng-click=\"pagePreviousPageClick()\" ng-disabled=\"cantPageBackward()\"><div class=\"first-triangle prev-triangle\"></div></button> <input type=\"number\" ui-grid-one-bind-title=\"aria.pageSelected\" ui-grid-one-bind-aria-label=\"aria.pageSelected\" class=\"ui-grid-pager-control-input\" ng-model=\"grid.options.paginationCurrentPage\" min=\"1\" max=\"{{ paginationApi.getTotalPages() }}\" required> <span class=\"ui-grid-pager-max-pages-number\" ng-show=\"paginationApi.getTotalPages() > 0\"><abbr ui-grid-one-bind-title=\"paginationOf\">/</abbr> {{ paginationApi.getTotalPages() }}</span> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-next\" ui-grid-one-bind-title=\"aria.pageForward\" ui-grid-one-bind-aria-label=\"aria.pageForward\" ng-click=\"pageNextPageClick()\" ng-disabled=\"cantPageForward()\"><div class=\"last-triangle next-triangle\"></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-last\" ui-grid-one-bind-title=\"aria.pageToLast\" ui-grid-one-bind-aria-label=\"aria.pageToLast\" ng-click=\"pageLastPageClick()\" ng-disabled=\"cantPageToLast()\"><div class=\"last-triangle\"><div class=\"last-bar\"></div></div></button></div><div class=\"ui-grid-pager-row-count-picker\" ng-if=\"grid.options.paginationPageSizes.length > 1\"><select ui-grid-one-bind-aria-labelledby-grid=\"'items-per-page-label'\" ng-model=\"grid.options.paginationPageSize\" ng-options=\"o as o for o in grid.options.paginationPageSizes\"></select><span ui-grid-one-bind-id-grid=\"'items-per-page-label'\" class=\"ui-grid-pager-row-count-label\">&nbsp;{{sizesLabel}}</span></div><span ng-if=\"grid.options.paginationPageSizes.length <= 1\" class=\"ui-grid-pager-row-count-label\">{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}</span></div><div class=\"ui-grid-pager-count-container\"><div class=\"ui-grid-pager-count\"><span ng-show=\"grid.options.totalItems > 0\">{{(((grid.options.paginationCurrentPage-1)*grid.options.paginationPageSize)+1)}} <abbr ui-grid-one-bind-title=\"paginationThrough\">-</abbr> {{(grid.options.paginationCurrentPage*grid.options.paginationPageSize>grid.options.totalItems?grid.options.totalItems:grid.options.paginationCurrentPage*grid.options.paginationPageSize)}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>";
-
- $scope.gridOptions = {
- paginationPageSizes: [5],
- paginationPageSize: 5,
- paginationTemplate: correctTotalPaginationTemplate,
- columnDefs: [],
- enableColumnResizing: true,
- data: [],
- enableGridMenu: true,
- enableSelectAll: true,
- exporterMenuPdf: false,
- exporterMenuCsv: false,
- exporterCsvFilename: 'myFile.csv',
- exporterPdfDefaultStyle: {fontSize: 9},
- exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
- exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
- exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
- exporterPdfFooter: function ( currentPage, pageCount ) {
- return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
- },
- exporterPdfCustomFormatter: function ( docDefinition ) {
- docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
- docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
- return docDefinition;
- },
- exporterPdfOrientation: 'portrait',
- exporterPdfPageSize: 'LETTER',
- exporterPdfMaxGridWidth: 500,
- exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
- onRegisterApi: function(gridApi) {
- gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
- $scope.paginationOptions.pageNumber = newPage;
- $scope.paginationOptions.pageSize = pageSize;
- $scope.runReport();
- });
- }
- };
-
-
- var getPage = function() {
- $scope.gridOptions.columnDefs = [];
- $scope.searchdData.columns[0].forEach(function(entry) {
- if(entry.columnTitle=='Run'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId, enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="#/report_run/{{COL_FIELD.drillDownLink.substr(39)}}" class="icon-controls-pointer" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Edit'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId, enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="{{COL_FIELD.drillDownLink}}" class="icon-misc-pen" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Delete'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId, enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-click="grid.appScope.removeReport(COL_FIELD.drillDownLink,row)" class="icon-misc-trash" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Copy'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId, enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="{{COL_FIELD.drillDownLink}}" class="icon-documents-copy" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Schedule'){
- } else if(entry.columnTitle=='No'){
- } else {
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId,
- enableSorting: true,
- cellTemplate: '<div class="ui-grid-cell-contents" style="text-align:{{COL_FIELD.alignment}};" title="TOOLTIP"> <div>{{COL_FIELD.displayValue}}</div> </div>'
- });
- }
- });
-
- $scope.gridOptions.paginationPageSizes= [$scope.searchdData.metaReport.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.searchdData.metaReport.pageSize;
- $scope.gridOptions.totalItems = $scope.searchdData.metaReport.totalSize;
-
- $scope.gridOptions.data = [];
- $scope.searchdData.rows[0].forEach(function(entry) {
- var localData = {};
- entry.forEach(function(rowData){
- localData[rowData["columnId"]]= rowData["searchresultField"];
- });
- $scope.gridOptions.data.push(localData);
- });
- };
-
- $scope.$watch("searchdData",function(newValue,oldValue) {
- if($scope.searchdData){
- getPage();
- }
- });
-
- $scope.operatorsRepId = [
- {index: 0, value: 'Equal To', text: 'Equal To', alias:'Equal To'},
- {index: 1, value: 'Less Than', text: 'Less Than', alias:'Less Than'},
- {index: 2, value: 'Greater Than', text: 'Greater Than', alias:'Greater Than'}];
- $scope.operatorRepId = {};
- $scope.operatorRepId.value = $scope.operatorsRepId[0].value;
- $scope.operatorRepId.index = $scope.operatorsRepId[0].index;
-
- $scope.operatorsRepName = [
- {index: 0, value: 'Starts With', text: 'Starts With', alias:'Starts With'},
- {index:1, value: 'Ends With', text: 'Ends With', alias:'Ends With'},
- {index: 2, value: 'Contains', text: 'Contains', alias:'Contains'}];
-
- $scope.operatorRepName = {};
- $scope.operatorRepName.value = $scope.operatorsRepName[0].value;
- $scope.operatorRepName.index = $scope.operatorsRepName[0].index;
-
- $scope.removeReport = function(reportDeleteUrl,row) {
- var modalInstance = $modal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory', function ($scope, $modalInstance, $http, $log, raptorReportFactory) {
- $scope.ok = function() {
- raptorReportFactory.getReportDeleteStatus(reportDeleteUrl).then(function(data){
- if (!(data.deleted)) {
- $log.error("raptorReportFactory: report removal failed.")
- }
- $modalInstance.close();
- },function(error){
- $log.error("report removal error.")
- });
- };
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('RefreshGridOptions');
- }, function () {
- });
- };
-
- $scope.$on('RefreshGridOptions', function(event) {
- $scope.getSearchData();
- });
-
- $timeout(function() {
- $rootScope.isViewRendering = false;
- });
-
-
-}]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js
deleted file mode 100644
index 3196b336..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js
+++ /dev/null
@@ -1,1263 +0,0 @@
-appDS2.controller('reportStepController', function($scope,$http,$location, $routeParams, $q, $modal,$log,$window, raptorReportFactory, stepFormFactory) {
-
- $scope.showLoader = true;
- // tabs for report wizard steps:
- $scope.activeTabsId = 'Definition';
- $scope.addReportUserId = {'id':''};
- $scope.addReportRoleId = {'id':''};
- // For all the dropdown box, please declare the active selection variable in the following manner:
- // $scope.selectedOpt = {};
- // $scope.selectedOpt.value = "";
- $scope.getDefinitionById = function(id) {
- raptorReportFactory.getDefinitionByReportId(id).then(function(data){
- $scope.loadDefinition(data);
- $scope.definitionData = data;
- $scope.showLoader = false;
- },function(error){
- $log.error("raptorReportFactory: getSearchData failed.");
- $scope.showLoader = false;
- });
- }
-
- $scope.addReportSecurityUser = function(userId) {
- raptorReportFactory.addReportSecurityUser(userId).then(function(data){
- $scope.loadSecurityPage();
- },function(error){
- $log.error("raptorReportFactory: addReportSecurityUser failed.");
- });
- }
-
- $scope.removeReportSecurityUser = function(securityUser) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','securityUser', function ($scope, $modalInstance, $http, $log, raptorReportFactory,securityUser) {
- $scope.securityUserName = securityUser.name;
- $scope.ok = function() {
- raptorReportFactory.removeReportSecurityUser(securityUser.id).then(function(data){
- $modalInstance.close();
- },function(error){
- $log.error("raptorReportFactory: removeReportSecurityUser failed.");
- });
- }
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- securityUser: function(){
- return securityUser;
- }
- }
- });
- modalInstance.result.then(function () {
- $scope.loadSecurityPage();
- }, function () {
- });
- };
-
-
- $scope.addReportSecurityRole = function(roleId) {
- raptorReportFactory.addReportSecurityRole(roleId).then(function(data){
- $scope.loadSecurityPage();
- },function(error){
- $log.error("raptorReportFactory: addReportSecurityRole failed.");
- });
- }
-
- $scope.removeReportSecurityRole = function(securityRole) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','securityRole', function ($scope, $modalInstance, $http, $log, raptorReportFactory,securityRole) {
- $scope.securityRoleName = securityRole.name;
- $scope.ok = function() {
- raptorReportFactory.removeReportSecurityRole(securityRole.id).then(function(data){
- $modalInstance.close();
- },function(error){
- $log.error("raptorReportFactory: removeReportSecurityRole failed.");
- });
- }
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- securityRole: function(){
- return securityRole;
- }
- }
- });
- modalInstance.result.then(function () {
- $scope.loadSecurityPage();
- }, function () {
- });
- }
-
- $scope.saveReportSecurityInfo = function(userId, isPublic) {
- var securityInfo = {'userId':userId+"",'isPublic':isPublic};
- raptorReportFactory.updateReportSecurityInfo(securityInfo).then(function(data){
- $scope.loadSecurityPage();
- },function(error){
- $log.error("raptorReportFactory: updateReportSecurityInfo failed.");
- });
- };
-
- $scope.createNewDefinition = function() {
- raptorReportFactory.createNewDefinition().then(function(data){
- $scope.loadDefinition(data);
- $scope.definitionData = data;
- $scope.showLoader = false;
- },function(error){
- $log.error("raptorReportFactory: getSearchData failed.");
- });
- }
-
- var initializeCreateReport = function() {
- $scope["selectedReportType"] ={};
- $scope.selectedReportType.value ="linear";
- $scope.selectedReportType2 ={};
- $scope.selectedReportType2.value ="";
- $scope.selectedDataSource ={};
- $scope.selectedDataSource.value="local";
- $scope.sqlScript = "SELECT ";
- $scope.pageSize = {"value":"50"};
- }
-
-
- var loadSqlInSession = function(){
- raptorReportFactory.getSqlInSession().then(function(data){
- $scope.sqlInSessionJSON = data;
- $scope.sqlScript = data.query;
- $scope.showLoader = false;
- },function(error){
- $log.error("raptorReportFactory: getSearchData failed.");
- });
- };
-
- initializeCreateReport();
- if ($routeParams.reportMode) {
- if ($routeParams.reportMode=="copy") {
- raptorReportFactory.copyReportById($routeParams.reportId).then(function(data){
- $scope.$emit('RefreshInsession');
- },function(error){
- $log.error("raptorReportFactory: deleteFormFieldById failed.");
- });
- } else if ($routeParams.reportMode=="import") {
- $scope.$emit('RefreshInsession');
- }
- } else if ($routeParams.reportId) {
- $scope.getDefinitionById($routeParams.reportId);
- $scope.isEdit = true;
- $scope.reportId = $routeParams.reportId;
- } else {
- $scope.isEdit = false;
- $scope.createNewDefinition();
- }
-
-
- $scope.RunCurrentReport = function (){
- $window.location.href = "#/report_run/c_master="+$scope.reportId+"&refresh=Y";
- }
-
- $scope.deleteFormField = function(rowData) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','rowData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) {
- $scope.tempFieldId = rowData.id;
- $scope.ok = function() {
- raptorReportFactory.deleteFormFieldById(rowData.id).then(function(data){
- $modalInstance.close();
- },function(error){
- $log.error("raptorReportFactory: deleteFormFieldById failed.");
- });
- }
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- rowData: function(){
- return rowData;
- }
- }
- });
- modalInstance.result.then(function () {
- $scope.$emit('RefreshFormField');
- }, function () {
- });
- }
-
- $scope.loadDefinition = function(definitionData) {
- $scope.reportId = definitionData.reportId+"";
- $scope.reportName = definitionData.reportName;
- $scope.reportDescr = definitionData.reportDescr;
- $scope.formHelpText = definitionData.formHelpText;
- $scope.selectedPageSize = {"value": definitionData.pageSize+''};
- $scope.selectedMaxRowsInExcelCSVDownload = {"value": definitionData.maxRowsInExcelCSVDownload};
- $scope.reportTitle = definitionData.reportTitle;
- $scope.reportSubTitle = definitionData.reportSubTitle;
- $scope.selectedNumFormCols ={"value": definitionData.numFormCols+''};
- $scope.selectedFrozenColumns={"value": definitionData.frozenColumns+''};
- $scope.selectedDataGridAlign = {"value":definitionData.dataGridAlign+''};
- $scope.emptyMessage = definitionData.emptyMessage+'';
- $scope.selectedDataContainerHeight = {"value":definitionData.dataContainerHeight+''};
- $scope.selectedDataContainerWidth = {"value":definitionData.dataContainerWidth+''};
- var displayAreaValue = "null"
- for (var i=0; i<3; i++ ) {
- if (definitionData.displayArea[i].selected) {
- displayAreaValue = definitionData.displayArea[i].name;
- }
- }
- $scope.selectedDisplayArea = {"value":displayAreaValue+""};
-
- $scope.hideFormFieldsAfterRunSelected = {"value": definitionData.hideFormFieldsAfterRun}
-
- $scope.hideFormFieldsSelected = {"value":definitionData.displayOptions[0].selected};
- $scope.hideChartSelected = {"value":definitionData.displayOptions[1].selected};
- $scope.hideReportDataSelected = {"value":definitionData.displayOptions[2].selected};
- $scope.hideExcelSelected = {"value":definitionData.displayOptions[3].selected};
- $scope.hidePdfSelected = {"value":definitionData.displayOptions[4].selected};
- $scope.runtimeColSortDisabled = {"value":definitionData.runtimeColSortDisabled};
- $scope.showLoader = false;
- }
-
-
- var setDefinition = function(){
- $scope.updatedDefJson = {
- "tabName" : "Definition",
- "tabId" : "Def",
- "reportId" : ($scope.isEdit?$scope.reportId+'':"-1"),
- "reportName" : $scope.reportName,
- "reportDescr" : $scope.reportDescr,
- "reportType" : "Linear",
- "dbInfo" : "local",
- "formHelpText" : $scope.formHelpText,
- "pageSize" : Number($scope.selectedPageSize.value),
- "displayArea" : [ {
- "id" : "HOME",
- "name" : "HOME",
- "selected" : ($scope.selectedDisplayArea.value=="HOME")
- }, {
- "id" : "CUSTOMER",
- "name" : "CUSTOMER",
- "selected" : ($scope.selectedDisplayArea.value==="CUSTOMER")
- }, {
- "id" : "REPORTS",
- "name" : "REPORTS",
- "selected" : ($scope.selectedDisplayArea.value==="REPORTS")
- } ],
- "hideFormFieldsAfterRun" : $scope.hideFormFieldsAfterRunSelected.value,
- "maxRowsInExcelCSVDownload" : Number($scope.selectedMaxRowsInExcelCSVDownload.value),
- "frozenColumns" : Number($scope.selectedFrozenColumns.value),
- "dataGridAlign" : $scope.selectedDataGridAlign.value,
- "emptyMessage" : $scope.emptyMessage,
- "dataContainerHeight" : $scope.selectedDataContainerHeight.value,
- "dataContainerWidth" : $scope.selectedDataContainerWidth.value,
- "displayOptions" : [ {
- "name" : "HideFormFields",
- "selected" : $scope.hideFormFieldsSelected.value
- }, {
- "name" : "HideChart",
- "selected" : $scope.hideChartSelected.value
- }, {
- "name" : "HideReportData",
- "selected" : $scope.hideReportDataSelected.value
- }, {
- "name" : "HideExcel",
- "selected" : $scope.hideExcelSelected.value
- }, {
- "name" : "HidePdf",
- "selected" : $scope.hidePdfSelected.value
- } ],
- "runtimeColSortDisabled" : $scope.runtimeColSortDisabled.value,
- "numFormCols" : Number($scope.selectedNumFormCols.value),
- "reportTitle" : $scope.reportTitle,
- "reportSubTitle" : $scope.reportSubTitle
- }
-
- }
-
- var updateDefinitionData = function() {
- setDefinition();
- raptorReportFactory.updateDefinition($scope.updatedDefJson,$scope.isEdit).then(function(data){
- },function(error){
- $log.error("raptorReportFactory: updateDefinition by Id failed.");
- });
- }
-
- var saveNewDefinitionData = function() {
- setDefinition();
- raptorReportFactory.saveNewDefinition($scope.updatedDefJson).then(function(data){
- },function(error){
- $log.error("raptorReportFactory: saveNewDefinition by Id failed.");
- });
- }
-
- $scope.testRunSql = function(){
- var queryJSON = {query: $scope.sqlScript};
- queryJSON = JSON.stringify(queryJSON);
- raptorReportFactory.testRunSQL(queryJSON).then(function(data){
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','queriedData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, queriedData) {
- var init = function() {
- $scope.isError = false;
- if (queriedData.errormessage) {
- $scope.isError = true;
- $scope.errormessage = queriedData.errormessage;
- $scope.stacktrace = queriedData.stacktrace;
- } else {
- $scope.queryData = queriedData;
- }
- }
- init();
- $scope.close = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- queriedData: function(){
- return data;
- }
- }
- })
-
- },function(error){
- $log.error("raptorReportFactory: test run SQL failed.");
- });
- }
-
-
- $scope.formFieldVerifySQL= function(sqlScript){
- var queryJSON = {query: sqlScript};
- queryJSON = JSON.stringify(queryJSON);
- raptorReportFactory.formFieldVerifySQL(queryJSON).then(function(data){
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','queriedData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, queriedData) {
- var init = function() {
- $scope.isError = false;
- if (queriedData.errormessage) {
- $scope.isError = true;
- $scope.errormessage = queriedData.errormessage;
- $scope.stacktrace = queriedData.stacktrace;
- } else {
- $scope.queryData = queriedData;
- }
- }
- init();
- $scope.close = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- queriedData: function(){
- return data;
- }
- }
- })
-
- },function(error){
- $log.error("raptorReportFactory: test run SQL failed.");
- });
- }
-
-
- /* $scope.selectedDataSource.allowSchedule={};
- $scope.selectedDataSource.allowSchedule.value=""*/
-
- var getJsonSrcName = function(stepNum){
- var JsonSrcPrefix = "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step"
- return JsonSrcPrefix + stepNum +".json";
- }
-
- $scope.gTabs = [
- {
- title: 'Definition',
- id: 'Definition',
- uniqueId: 'uniqueTab1x',
- tabPanelId: 'threetab1x'
- }, {
- title: 'SQL',
- id: 'SQL',
- uniqueId: 'uniqueTab2x',
- tabPanelId: 'threetab2x',
- disabled: (!$scope.isEdit)
- }, {
- title: 'Columns',
- id: 'Columns',
- uniqueId: 'uniqueTab3x',
- tabPanelId: 'threetab3x',
- disabled: (!$scope.isEdit)
- }, {
- title: 'Form Fields',
- id: 'Form Fields',
- uniqueId: 'uniqueTab4x',
- tabPanelId: 'threetab4x',
- disabled: (!$scope.isEdit)
- }, {
- title: 'Security',
- id: 'Security',
- uniqueId: 'uniqueTab5x',
- tabPanelId: 'threetab5x',
- disabled: (!$scope.isEdit)
- }, {
- title: 'Run',
- id: 'Run',
- uniqueId: 'uniqueTab6x',
- tabPanelId: 'threetab6x',
- disabled: (!$scope.isEdit)
- }
- ];
-
- $scope.unhideAllOtherTabs = function(){
- for (var selectedTab = 0; selectedTab < $scope.gTabs.length; selectedTab++) {
- $scope.gTabs[selectedTab].disabled = false;
- }
- }
-
- $scope.openColumnPopup = function (rowData) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','colData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, colData) {
- raptorReportFactory.getColumnEditInfoById(colData.id).then(function(data){
- $scope.columnEditData = data;
- $scope.colId = data.colId;
-/* $scope.colName = data.colName;*/
- $scope.colName = {'value':data.colName+''};
- $scope.selectedDisplayAlignment = {"value":data.displayAlignment+''};
- $scope.selectedDisplayHeaderAlignment = {"value":data.displayHeaderAlignment+''};
- $scope.sortable = {"value":''+data.sortable};
- $scope.visible = {"value":''+data.visible};
- $scope.drilldownURL = data.drilldownURL;
- $scope.drilldownParams = data.drilldownParams;
- $scope.drilldownType = data.drilldownType;
- $scope.selectedDrillDownReport = {"value":""};
-
-
- },function(error){
- $log.error("raptorReportFactory: getColumnEditInfoById failed.");
- });
-
- var init = function() {
-
- raptorReportFactory.getDrillDownReportList().then(function(data2){
- $scope.drilldownReports = data2;
- },function(error){
- $log.error("raptorReportFactory: getDrillDownReportList failed.");
- });
-
-/* $scope.colTableRowData = colData;*/
- $scope.displayAlignmentOptions = [
- {value:"null", text:""},
- {value:"Left", text:"Left"},
- {value:"Center", text:"Center"},
- {value:"Right", text:"Right"}
- ];
- $scope.ynOptions = [
- {value:"true", text:"Yes"},
- {value:"false", text:"No"}
- ];
- $scope.drillDownOptions = [
- {value:"drillDownOpt1", text:"drillDownOpt1"},
- {value:"drillDownOpt2", text:"drillDownOpt2"},
- {value:"drillDownOpt3", text:"drillDownOpt3"}
- ];
- }
-
- init();
- $scope.$watch('selectedDrillDownReport.value',function(){
- if ($scope.selectedDrillDownReport) {
- $scope.$emit('openDrillDownpage',$scope.selectedDrillDownReport.value);
- }
- });
-
- $scope.save = function() {
- var drilldownURL = "";//raptorReportFactory.drillDownPopupOptions
- //raptorReportFactory.drillDownPopupOptions.radioGroup
- var colInfo = {
- "tabId" : "ColEdit",
- "tabName" : "Column Edit",
- "colId" : $scope.colId,
- "colName" : $scope.colName.value,
- "displayAlignment" : ($scope.selectedDisplayAlignment.value=="null")?null:$scope.selectedDisplayAlignment.value,
- "displayHeaderAlignment" : ($scope.selectedDisplayHeaderAlignment.value=="null")?null:$scope.selectedDisplayHeaderAlignment.value,
- "sortable" : ($scope.sortable.value=="true"),
- "visible" : ($scope.visible.value=="true"),
- "drilldownURL" : raptorReportFactory.drillDownURL,
- "drilldownParams" : raptorReportFactory.drillDownParams,
- "drilldownType" : ""
- }
- raptorReportFactory.saveColumnEditInfo(colInfo).then(function(data){
- $modalInstance.close();
- },function(error){
- $log.error("raptorReportFactory: getColumnEditInfoById failed.");
- });
- };
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- colData: function(){
- return rowData;
- }
- }
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('RefreshColumnList');
- }, function () {
- });
- };
-
-
- $scope.throwReportNameMissingError = function () {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-report-name-validation.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', '$log', function ($scope, $modalInstance, $http, $log) {
- $scope.close = function() {
- $modalInstance.dismiss();
- };
- }]
- });
- modalInstance.result.then(function () {
- }, function () {
- });
- };
-
-
- $scope.addNewFormField = function () {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory', function ($scope, $modalInstance, $http, $log, raptorReportFactory) {
- raptorReportFactory.getFormFieldEditInfoById("add").then(function(data){
- $scope.formFieldEditData = data;
- $scope.fieldId = $scope.formFieldEditData.fieldId;
- $scope.fieldName ={"value": $scope.formFieldEditData.fieldName};
- $scope.selectedVisible = {"value":$scope.formFieldEditData.visible+''};
- $scope.defaultValue = {"value": $scope.formFieldEditData.defaultValue};
- $scope.fieldDefaultSQL = {"value": $scope.formFieldEditData.fieldDefaultSQL};
- $scope.fieldSqlContent = {"value": $scope.formFieldEditData.fieldSQL};
- $scope.selectedValidationType = {"value":$scope.formFieldEditData.validationType +''};
- $scope.selectedFieldType = {"value":$scope.formFieldEditData.fieldType +''};
- $scope.sqlDefaultValueSelected= {value:false};
- $scope.sqlDefaultValueSelected ={"value":false};
- if (($scope.fieldDefaultSQL.value)&&($scope.fieldDefaultSQL.value!="")) {
- $scope.sqlDefaultValueSelected.value =true;
- }
- },function(error){
- $log.error("raptorReportFactory: getColumnEditInfoById failed.");
- });
-
-
- $scope.ynOptions = [
- {value:"true", text:"Yes"},
- {value:"false", text:"No"}
- ];
-
- $scope.verifyFieldValueOptions = [
- {value:"DATE", text:"Date"},
- {value:"TIME_STAMP_HOUR", text:"TimeStamp (Hour)"},
- {value:"TIME_STAMP_HOUR_MIN", text:"TimeStamp (Hour,Min)"},
- {value:"HIDDEN", text:"Hidden"}
- ]
-
- $scope.fieldTypeOptions = [
- {value:"TEXT", text:"Text Box"},
- {value:"LIST_BOX", text:"List Box"},
- {value:"LIST_MULTI_SELECT", text:"Multi-select List Box"},
- {value:"HIDDEN", text:"Hidden"}
- ];
-
- $scope.save = function() {
- var formFieldJSON = {
- "tabId" : "FormEdit",
- "tabName" : "Form Edit",
- "fieldId" : $scope.fieldId,
- "fieldName" : $scope.fieldName.value,
- "fieldType" : $scope.selectedFieldType.value,
- "visible" : ($scope.selectedVisible.value=="true"),
- "defaultValue" : ($scope.sqlDefaultValueSelected.value?'':$scope.defaultValue.value),
- "fieldDefaultSQL" : ($scope.sqlDefaultValueSelected.value?$scope.fieldDefaultSQL.value:""),
- "fieldSQL" :$scope.fieldSqlContent.value,
- "validationType" : "NONE",
- "predefinedValueList" :null
- }
- raptorReportFactory.saveFormFieldEditInfo(formFieldJSON).then(function(data){
- $modalInstance.close();
- },function(error){
- $log.error("raptorReportFactory: saveFormFieldEditInfo failed.");
- });
- };
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }]
- });
- modalInstance.result.then(function () {
- $scope.$emit('RefreshFormField');
- }, function () {
- });
- };
-
- $scope.openFormFieldPopup = function (rowData) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','fieldData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, fieldData) {
- var init = function() {
- raptorReportFactory.getFormFieldEditInfoById(fieldData.id).then(function(data){
- $scope.formFieldEditData = data;
- $scope.fieldId = $scope.formFieldEditData.fieldId;
- $scope.fieldName = {"value":$scope.formFieldEditData.fieldName};
- $scope.selectedVisible = {"value":$scope.formFieldEditData.visible+''};
- $scope.defaultValue = {"value":$scope.formFieldEditData.defaultValue};
- $scope.fieldDefaultSQL = {"value": $scope.formFieldEditData.fieldDefaultSQL};
- $scope.fieldSqlContent = {"value": $scope.formFieldEditData.fieldSQL};
- $scope.selectedValidationType = {"value":$scope.formFieldEditData.validationType +''};
- $scope.selectedFieldType = {"value":$scope.formFieldEditData.fieldType +''};
- $scope.sqlDefaultValueSelected ={"value":false};
- if (($scope.fieldDefaultSQL.value)&&($scope.fieldDefaultSQL.value!="")) {
- $scope.sqlDefaultValueSelected.value =true;
- }
- },function(error){
- $log.error("raptorReportFactory: getColumnEditInfoById failed.");
- });
-
- $scope.ynOptions = [
- {value:"true", text:"Yes"},
- {value:"false", text:"No"}
- ];
-
- $scope.verifyFieldValueOptions = [
- {value:"DATE", text:"Date"},
- {value:"TIME_STAMP_HOUR", text:"TimeStamp (Hour)"},
- {value:"TIME_STAMP_HOUR_MIN", text:"TimeStamp (Hour,Min)"},
- {value:"HIDDEN", text:"Hidden"}
- ]
-
- $scope.fieldTypeOptions = [
- {value:"TEXT", text:"Text Box"},
- {value:"LIST_BOX", text:"List Box"},
- {value:"LIST_MULTI_SELECT", text:"Multi-select List Box"},
- {value:"HIDDEN", text:"Hidden"}
- ];
-
- }
-
- init();
-
- $scope.save = function() {
- var formFieldJSON = {
- "tabId" : "FormEdit",
- "tabName" : "Form Edit",
- "fieldId" : $scope.fieldId,
- "fieldName" : $scope.fieldName.value,
- "fieldType" : $scope.selectedFieldType.value,
- "visible" : ($scope.selectedVisible.value=="true"),
- "defaultValue" : ($scope.sqlDefaultValueSelected.value?'':$scope.defaultValue.value),
- "fieldDefaultSQL" : ($scope.sqlDefaultValueSelected.value?$scope.fieldDefaultSQL.value:""),
- "fieldSQL" :$scope.fieldSqlContent.value,
- "validationType" : "NONE",
- "predefinedValueList" :null
- }
- raptorReportFactory.saveFormFieldEditInfo(formFieldJSON).then(function(data){
- $modalInstance.close();
- },function(error){
- $log.error("raptorReportFactory: saveFormFieldEditInfo failed.");
- });
- };
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- resolve:{
- fieldData: function(){
- return rowData;
- }
- }
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('RefreshFormField');
- }, function () {
- });
- };
-
- $scope.openDrillDownReportPopup = function (reportId,parentReportId) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-drilldown-edit.html',
- sizeClass: 'modal-large',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','reportId', function ($scope, $modalInstance, $http, $log, raptorReportFactory, reportId) {
-
- $scope.drillDownOptionList =[];
- $scope.selectedvalueradioGroup = {"name":""};
- $scope.selectedChildReportFormField = {"value":""};
- $scope.selectedChildReportColumn = {"value":""};
- $scope.fixedValue = {"value":""};
- $scope.suppressValues = {"value":""};
-
- raptorReportFactory.getChildReportFormField(reportId).then(function(data){
- for (var i=0;i<data.length;i++) {
- $scope.drillDownOptionList.push(
- {
- "name": data[i].name,
- "id": data[i].id,
- "selectedvalueradioGroup":{"name":""},
- "selectedChildReportFormField":{"value":""},
- "selectedChildReportColumn":{"value":""},
- "fixedValue":{"value":""},
- "suppressValues":{"value":""}
- }
- )
- }
- },function(error){
- $log.error("raptorReportFactory: getChildReportFormField failed.");
- });
-
- raptorReportFactory.getChildReportFormField(parentReportId).then(function(data){
- $scope.childReportFF =data;
- },function(error){
- $log.error("raptorReportFactory: getChildReportFormField failed.");
- });
-
- raptorReportFactory.getChildReportColumn(parentReportId).then(function(data){
- $scope.childReportCol =data;
- },function(error){
- $log.error("raptorReportFactory: getChildReportFormField failed.");
- });
-
- raptorReportFactory.setDrillDownPopupOptions(null);
-
- $scope.complete = function() {
- var drillDownPopupOptions= {
- radioGroup : $scope.selectedvalueradioGroup.name,
- reportFF: $scope.selectedChildReportFormField.value,
- reportCol: $scope.selectedChildReportColumn.value,
- fixedValue: $scope.fixedValue.value,
- suppressValues: $scope.suppressValues.value
- }
- var drillDownParams = "";
- var ampStr ="";
- for (var i=0;i<$scope.drillDownOptionList.length; i++) {
- if (drillDownParams!="") {
- ampStr = "&amp;";
- }
- if ($scope.drillDownOptionList[i].selectedvalueradioGroup.name=="fixedValue"){
- drillDownParams = drillDownParams + ampStr + $scope.drillDownOptionList[i].id + "="+$scope.drillDownOptionList[i].fixedValue.value;
- } else if ($scope.drillDownOptionList[i].selectedvalueradioGroup.name=="reportFF"){
- drillDownParams = drillDownParams + ampStr + $scope.drillDownOptionList[i].id + "=[!"+$scope.drillDownOptionList[i].selectedChildReportFormField.value + "]";
- } else if ($scope.drillDownOptionList[i].selectedvalueradioGroup.name=="reportCol"){
- drillDownParams = drillDownParams + ampStr + $scope.drillDownOptionList[i].id + "=["+$scope.drillDownOptionList[i].selectedChildReportColumn.value + "]";
- }
- }
- raptorReportFactory.setDrillDownPopupOptions(reportId,drillDownParams);
-
- $modalInstance.close();
- };
- }],
- resolve:{
- reportId: function(){
- return reportId;
- }
- }
- });
-
- modalInstance.result.then(function () {
-/* $scope.$emit('RefreshFormField');*/
- }, function () {
- });
-};
-
- $scope.$watch('activeTabsId', function (newVal, oldVal) {
- if(newVal !== oldVal) {
- $scope.showLoader = true;
- var selectedTab;
- for (selectedTab = 0; selectedTab < $scope.gTabs.length; selectedTab++) {
- if ($scope.gTabs[selectedTab].id === newVal) {
- $scope.stepNum = selectedTab;
-/* stepFormFactory.getStepJSONData(getJsonSrcName($scope.stepNum))*/
- $scope.isColumnStep = false;
- $scope.isFormFieldStep = false;
- $scope.isSecurityStep = false;
- $scope.renderStep(selectedTab+1);
- if ($scope.stepNum == 1) {
- $scope.showLoader = false;
- }
- else if ($scope.stepNum == 2) {
- loadSqlInSession();
- } else if ($scope.stepNum == 3) {
- $scope.isColumnStep = true;
- raptorReportFactory.getColumnList().then(function(data){
- $scope.colTableRowData = data;
- $scope.showLoader = false;
- },function(error){
- $log.error("raptorReportFactory: get column list failed.");
- $scope.showLoader = false;});
-
- } else if ($scope.stepNum == 4) {
- $scope.isFormFieldStep = true;
- // put within then function:
- raptorReportFactory.getFormFieldList().then(function(data){
- $scope.formFieldData = data;
- $scope.showLoader = false;
- },function(error){
- $log.error("raptorReportFactory: get formfields failed.");
- $scope.showLoader = false;});
- } else if ($scope.stepNum == 5) {
- $scope.isSecurityStep = true;
- $scope.reportOwnerId={'id':''};
- $scope.isPublicOptionList = [
- {'value':'true','text':'Yes'},
- {'value':'false','text':'No'},
- ];
- $scope.loadSecurityPage();
-
- }
- else if ($scope.stepNum == 6) {
- raptorReportFactory.getDefinitionInSession().then(function(data){
- $scope.reportId = data.reportId;
- $scope.showLoader = false;
- },function(error){
- $log.error("raptorReportFactory: getDefinitionInSession failed.");
- $scope.showLoader = false;});
- }
-
- if ($scope.stepNum>1){
- $scope.unhideAllOtherTabs();
- }
- break;
- }
- }
- }
- });
-
- $scope.loadSecurityPage = function() {
- $scope.showLoader = true;
- raptorReportFactory.resetSecurityLoadingCounter();
-
- //API call 1:
- raptorReportFactory.getSecurityReportOwnerList().then(function(data){
- $scope.reportOwnerList = data;
- raptorReportFactory.icrementSecurityLoadingCounter();
- if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
- },function(error){
- $log.error("raptorReportFactory: getSecurityReportOwnerList failed.");
- });
-
- //API call 2: get report role list
- raptorReportFactory.getReportRoleList().then(function(data){
- $scope.reportRoleList = data;
- raptorReportFactory.icrementSecurityLoadingCounter();
- if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
- },function(error){
- $log.error("raptorReportFactory: getReportRoleList failed.");
- });
-
- //API call 3: get security page basic info
- raptorReportFactory.getReportSecurityInfo().then(function(data){
- $scope.reportSecurityInfo = data;
- $scope.reportOwnerId ={id: $scope.reportSecurityInfo.ownerId};
- raptorReportFactory.icrementSecurityLoadingCounter();
- if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
- },function(error){
- $log.error("raptorReportFactory: getReportSecurityInfo failed.");
- $scope.showLoader = false;});
-
- //API call 4: retrieve security users
- raptorReportFactory.getReportSecurityUsers().then(function(data){
- $scope.reportSecurityUsers = data;
- for (var i=0; i<$scope.reportSecurityUsers.length;i++) {
- $scope.reportSecurityUsers[i]["accessAllowed"] = !$scope.reportSecurityUsers[i]["readOnly"];
- }
- raptorReportFactory.icrementSecurityLoadingCounter();
- if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
- },function(error){
- $log.error("raptorReportFactory: reportSecurityUsers failed.");
- });
-
- //API call 5: retrieve security roles
- raptorReportFactory.getReportSecurityRoles().then(function(data){
- $scope.reportSecurityRoles = data;
- for (var i=0; i<$scope.reportSecurityRoles.length;i++) {
- $scope.reportSecurityRoles[i]["accessAllowed"] = !$scope.reportSecurityRoles[i]["readOnly"];
- }
-
- raptorReportFactory.icrementSecurityLoadingCounter();
- if(raptorReportFactory.checkSecurityLoadingCounter()){$scope.showLoader = false;};
- },function(error){
- $log.error("raptorReportFactory: reportSecurityRoles failed.");
- });
- }
-
-
- $scope.renderStep = function(stepNum){
- var containerElement = angular.element(document.getElementById("stepView"));
- containerElement.empty();
- $scope.stepNum = stepNum;
- var jsonSrcName = getJsonSrcName(stepNum);
- stepFormFactory.renderForm(jsonSrcName, containerElement, $scope);
- }
-
- $scope.toggleUserEditAccessActive = function(rowData) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','rowData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) {
- $scope.rowData = rowData;
- $scope.toggleEditAccessStatus = function(rowData) {
- raptorReportFactory.toggleUserEditAccess(rowData);
- $modalInstance.close();
- };
-
- $scope.cancelEditAccessToggle = function(rowData) {
- rowData.accessAllowed = ! rowData.accessAllowed;
- $modalInstance.dismiss('cancel');}
- }],
- resolve:{
- rowData: function(){
- return rowData;
- }
- }
- });
- modalInstance.result.then(function () {
-
- }, function () {
- });
- }
-
- $scope.toggleRoleEditAccessActive = function(rowData) {
- var modalInstance = $modal.open({
- scope: $scope,
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', '$log','raptorReportFactory','rowData', function ($scope, $modalInstance, $http, $log, raptorReportFactory, rowData) {
- $scope.rowData = rowData;
- $scope.toggleEditAccessStatus = function(rowData) {
- raptorReportFactory.toggleRoleEditAccess(rowData);
- $modalInstance.close();
- };
-
- $scope.cancelEditAccessToggle = function(rowData) {
- rowData.accessAllowed = ! rowData.accessAllowed;
- $modalInstance.dismiss('cancel');}
- }],
- resolve:{
- rowData: function(){
- return rowData;
- }
- }
- });
- modalInstance.result.then(function () {
-
- }, function () {
- });
- }
-
-
-
-
-
- // initialize the page at step 1;
- $scope.renderStep(1);
-
- // create a message to display in our view
- $scope.allProjects = [];
- if(!$routeParams.step && $routeParams.step == "") $routeParams.step = 1;
- if($routeParams.proj && $routeParams.proj > 0)
- $scope.projid = $routeParams.proj;
- if($routeParams.step)
- $scope.stepNum = $routeParams.step;
- else
- $scope.stepNum = 1;
-
- $scope.jsonSrcName = getJsonSrcName($scope.stepNum);
-
- $scope.selectAction = function () {
- var containerElement = angular.element(document.getElementById("stepView"));
- containerElement.empty();
- $scope.project_name = this.prj.projectName;
- $scope.stepNum = 1;
- var stepNum = $scope.stepNum;
- var jsonSrcName = getJsonSrcName(stepNum);
- stepFormFactory.renderForm(jsonSrcName, containerElement, $scope);
- renderProject(this.prj.id, 1);
- };
-
-
- $scope.createAction = function () {
- var containerElement = angular.element(document.getElementById("stepView"));
- containerElement.empty();
- $scope.stepNum = 1;
- var stepNum = $scope.stepNum;
- $scope.jsonSrcName = "app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step"+$scope.stepNum +".json";
- var jsonSrcName = $scope.jsonSrcName;
- stepFormFactory.renderForm(jsonSrcName, containerElement, $scope);
- };
-
- // select current project
- renderProject = function (proj_id, stepNum) {
- var userSelectedPrjId = proj_id;
- $http({
- method: 'GET',
- url: 'get_selected_project_data',
- params:{'selectedPrjId':userSelectedPrjId, 'step': stepNum}
- }).then(function successCallback(response) {
- var selectedproject = response.data;
- $scope.projid = userSelectedPrjId;
- //$scope.allProjects = projectLists;
- //$location.path('/'+userSelectedPrjId+'/'+stepNum);
- var div = d3.select("#stepView");
- div.select("[name='proj_id']").text(userSelectedPrjId);
- div.select("[name='proj_id']").property("value", userSelectedPrjId);
- d3.select("[name='project_id']").property("value", userSelectedPrjId);
- var h3Text = div.select("h3").text();
- div.select("h3").text($scope.project_name+ " - " + h3Text);
- for (var key in selectedproject) {
- if (selectedproject.hasOwnProperty(key)) {
- var val = selectedproject[key];
- var formElement = d3.selectAll("[name='" + key + "']");
- if(formElement[0].length > 0)
- console.log(formElement.attr("type"));
- if(formElement[0].length > 0 && formElement.attr("type") === "radio") {
- var formRadio = d3.selectAll("[id='" + key +"_"+val + "']");
- formRadio.property('checked', true);
- }
- if(formElement[0].length > 0 && formElement.property("type") === "textarea") {
- div.select("textarea[name='" + key +"']").property('value', val);
- }
- if(formElement[0].length > 0 && formElement.attr("type") === "text") {
- var formText = d3.selectAll("[name='" + key + "']");
- formText.property("value", val);
- }
- if(formElement[0].length > 0 && formElement.html().startsWith("<option")) {
- var formSelect = d3.selectAll("[name='" + key + "']");
-
- var checkOption = function (e) {
- if(e.label === val){
- return formSelect.property("selectedIndex", e.index );
- }
- };
-
- formSelect.selectAll("option").forEach(function(d) {d.forEach(function(optionD) {checkOption(optionD); }) });
- }
-
- if(formElement[0].length == 0) {
- if(key != 'step') {
- if( Object.prototype.toString.call( val ) === '[object Array]' ) {
- val.forEach(function(d){
- for (var keyCheck in d) {
- if (d.hasOwnProperty(keyCheck)) {
- var valCheck = d[keyCheck];
- var formCheck = d3.selectAll("[name='" + key + "_"+keyCheck + "']");
- if(valCheck === true)
- formCheck.property('checked', true);
- }
- }
- });
- }
- }
- var formElementOther = d3.selectAll("[name='" + key + "_"+ val + "']");
- if(formElementOther[0].length > 0 && formElementOther.attr("type") === "checkbox") {
- var formCheckbox = d3.selectAll("[name='" + key +"_"+val + "']");
- formRadio.property('checked', true);
- }
- }
- }
- }
-
-
-
- });
- }
-
- //submit function
- $scope.submit = function(){
- let defer = $q.defer();
-
- var div = d3.select("#stepView");
- var jsonSrcName = $scope.jsonSrcName;
- var stepNum = $scope.stepNum;
- var values = "";
- $http({
- method: 'GET',
- url: jsonSrcName
- }).then(function successCallback(response) {
- var json = response.data;
- var step = json.step;
- if(step > 0) {
- var sections = json.content.sections;
- sections.forEach(function(d, i) {
- var elements = d.elements;
- if(elements) {
- //elements.forEach(function(element, elementIndex) {
- values += "{";
- values += "\"step\""+ ":\"" + step + "\",";
- values += "\"proj_id\""+ ":\"" + d3.select('input[name="project_id"]').property("value") + "\",";
-
- for (elementIndex = 0; elementIndex < elements.length; elementIndex++) {
- var element = elements[elementIndex];
-
- if(elementIndex > 0) values += ",";
- values += "\""+element.name +"\""+ ":" ;
- if(element.input === "hidden") {
- values += "\""+div.select('input[name="'+element.name+'"]').property("value") +"\"";
- }
- if(element.input === "radio") {
- values += "\""+ div.select('input[name="'+element.name+'"]:checked').property("value") +"\"";
- }
- if(element.input === "checkbox") {
- var checkOptions = element.options;
- values += "[{";
- checkOptions.forEach(function(d, i) {
- // if(document.getElementById("'"+element.name+"_"+d.id+"'") != null)
- values += "\""+d.id+"\""+ ":" + div.select('input[name="'+element.name+"_"+d.id+'"]').property("checked") ;
- if(i<checkOptions.length-1) {
- values += ",";
- }
- })
- values += "}]";
- }
- if(element.input === "text") {
- values += "\""+div.select('input[name="'+element.name+'"]').property("value") +"\"";
- }
- if(element.input === "textarea") {
- values += "\""+div.select('textarea[name="'+element.name+'"]').node().value +"\"";
- }
- if(element.input === "select") {
- values += "\""+ div.select('select[name="'+element.name+'"]').property("value") + "\"";
- }
-
- };
- values += "}";
- }
- });
- }
- var valueJSON = JSON.parse(values);
- var valueStr = JSON.stringify(valueJSON, null, 4);
- $http({method:'POST', url:'save_steps', data: jsonSrcName, params:{'result' : valueStr, 'proj_id' : values.proj_id}}).success(function(data, status) {
- if(data.project_name)
- $scope.project_name = data.project_name;
- div.select("[name='proj_id']").property("value", data.proj_id);
- d3.select("[name='project_id']").property("value", data.proj_id);
- //$scope.projid = data.proj_id;
- valueStr=JSON.stringify(data, null, 4);
- defer.resolve();
- //stepNum = Number(stepNum || 0)+1;
- //document.getElementById('itestframe').src = data;
-
- })
-
- defer.resolve();
-
- });
- // $location.path('/step'+($scope.stepNum+1));
- return defer.promise;
-
- };
-
- //Save function
- $scope.save = function() {
- if ($scope.stepNum ==1) {
- updateDefinitionData();
- } else if($scope.stepNum ==5) {
- $scope.saveReportSecurityInfo($scope.reportOwnerId.id,$scope.reportSecurityInfo.isPublic);
- }
- };
-
- //Next function
- $scope.next = function(){
- if ($scope.stepNum ==1) {
- if ($scope.reportName==="") {
- $scope.throwReportNameMissingError();
- return;
- }
- updateDefinitionData();
- }
- $scope.stepNum = $scope.stepNum +1;
- $scope.activeTabsId = $scope.gTabs[$scope.stepNum-1].id;
- };
-
- //Previous function
- $scope.previous = function(){
- $scope.stepNum = $scope.stepNum -1;
- $scope.activeTabsId = $scope.gTabs[$scope.stepNum-1].id;
-
- };
-
- $scope.$on('RefreshInsession', function(event) {
- $scope.isEdit = true;
- $scope.reportId = -1;
- $scope.getDefinitionById(-1);
- });
-
- $scope.$on('openDrillDownpage', function(event, reportId) {
- if (reportId!="") {
- $scope.openDrillDownReportPopup(reportId,$scope.reportId);
- }
- });
-
-
- $scope.$on('RefreshFormField', function(event) {
- raptorReportFactory.getFormFieldList().then(function(data){
- $scope.formFieldData = data;
- },function(error){
- $log.error("raptorReportFactory: get formfields failed.");
- });
- });
-
- $scope.$on('RefreshColumnList', function(event) {
- raptorReportFactory.getColumnList().then(function(data){
- $scope.colTableRowData = data;
- },function(error){
- $log.error("raptorReportFactory: get column list failed.");
- });
- });
-
- $scope.getAllProjects = function(){
- $http({
- method: 'GET',
- url: 'get_projects'
- }).then(function successCallback(response) {
- var projectLists = response.data;
- $scope.allProjects = projectLists;
- });
- }
-
- // getAllProjects();
-
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/drools-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/drools-controller.js
deleted file mode 100644
index 1d4659e3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/drools-controller.js
+++ /dev/null
@@ -1,53 +0,0 @@
-appDS2.controller('droolsController', function($scope, $modal, $routeParams, DroolsService, modalService) {
- $scope.tableDate=[];
- $scope.resultsString = "";
- $scope.postDroolsBean={
- droolsFile:'',
- className:'',
- selectedRules:''
- };
- $scope.filenameFromUrl = $routeParams.filename;
- if($scope.filenameFromUrl!='' && $scope.filenameFromUrl!='0')
- $scope.postDroolsBean.droolsFile = $scope.filenameFromUrl
- $scope.execute = function(postDroolsBean) {
- if($scope.postDroolsBean.droolsFile=='' ||$scope.postDroolsBean.className=='' || $scope.postDroolsBean.selectedRules=='' ){
- modalService.errorPopUp ("Required fields cannot be empty");
- return;
- }
- var uuu = "post_drools/execute";
- var postData={postDroolsBean:postDroolsBean};
- DroolsService.executeDrools(postData).then(function(data){
- $scope.resultsString=data.resultsString;
- modalService.successPopUp($scope.resultsString);
- },function(error){
- modalService.errorPopUp (error);
- });
- };
-});
-
-appDS2.controller('droolsListController', function($scope, $modal, DroolsService, modalService) {
- $scope.tableDate=[];
- $scope.resultsString = "";
- $scope.postDroolsBean="";
-
- $scope.getDroolsList = function(){
- DroolsService.getDroolsList().then(function(data){
- var j = data;
- $scope.tableData = JSON.parse(j.data);
- $scope.buildTable();
- },function(error){
- modalService.errorPopUp (error);
- });
- }
-
- $scope.buildTable = function(){
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- }
-
-});
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/nbook-framecontroller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/nbook-framecontroller.js
deleted file mode 100644
index ab88aed9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/nbook-framecontroller.js
+++ /dev/null
@@ -1,15 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
-
- //.when('/notebook-frame/:id/:key/:value',{
- //.when('/notebook-frame/:nid/:qprms',{
- /*.when('/notebook-frame',{
- templateUrl: 'app/fusion/notebook-integration/scripts/view-models/notebook-frame.html',
- controller: 'notebookFrameController'
- })*/
-
- .otherwise({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-viz.html',
- controller: 'notebookFrameController'
- });
-}) \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebook-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebook-controller.js
deleted file mode 100644
index efd22f0f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebook-controller.js
+++ /dev/null
@@ -1,37 +0,0 @@
-appDS2.controller('nbookController', ['$scope', '$location','$window','$http', function ($scope,$location,$window,$http) {
- $scope.keyValueList = [{}];
- $scope.submitParameters = function() {
- $scope.iframevisibility = false;
- $scope.postData = {};
- $scope.additionalqueryParams = {};
- //Use this if there is only one 1 query param key value pair
- $scope.additionalqueryParams.paramKey = $scope.qparamKey;
- $scope.additionalqueryParams.paramVal = $scope.qparamVal;
- var qryStr = '';
- for(var i = 0; i < $scope.keyValueList.length; i++) {
- var obj = $scope.keyValueList[i];
- if (obj.qK != undefined && obj.qV != undefined) {
- if (qryStr!='')
- qryStr = qryStr+'&'+obj.qK+'='+obj.qV;
- else
- qryStr = obj.qK+'='+obj.qV;
- }
- }
- var queryurl = 'nbooktest.htm?nid='+$scope.notebookvalue+'&'+qryStr;
- window.open (queryurl,'_self',false);
- }
- $scope.addKeyValuePairs = function (kv) {
- if ($scope.keyValueList.length < 9) {
- $scope.keyValueList.push({
- });
- } else {
- document.getElementById("addbtn")["disabled"] = true;
- }
- }
- $scope.removeKeyValuePairs = function (index) {
- $scope.keyValueList.splice(index, 1);
- if ($scope.keyValueList.length == 8) {
- document.getElementById("addbtn")["disabled"] = false;
- }
- }
-}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js
deleted file mode 100644
index 95489918..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js
+++ /dev/null
@@ -1,24 +0,0 @@
-appDS2.controller('notebookFrameController', function ($scope,$location,$window,$http,$routeParams) {
- var nid = $window.location.search.substr($window.location.search.indexOf("=")+1);
- $scope.additionalqueryParams={};
- if ($window.location.search.substr($window.location.search.indexOf("=")+1)) {
- $scope.queryParams = $window.location.search;
- if($window.location.search.substring(0, $window.location.search.length-1).indexOf("&")!=-1) {
- $scope.notebookparam = $window.location.search.substring($window.location.search.indexOf("?")+1,$window.location.search.indexOf("&"));
- $scope.additionalqueryParams = JSON.parse('{"' + decodeURI($scope.queryParams.substr($scope.queryParams.indexOf("&")+1).replace(/&/g, "\",\"").replace(/=/g,"\":\"")) + '"}');
- }
- else {
- $scope.notebookparam1 = $window.location.search.substr($window.location.search.indexOf("?")+1);
- $scope.notebookparam = $scope.notebookparam1.substring(0, $scope.notebookparam1.length - 1);
- }
- $scope.notebookvalue = $scope.notebookparam.substr($scope.notebookparam.indexOf("=")+1);
- }
- else {
- $scope.notebookvalue = '833c0a69ec1433fbb2f8752af733cf0e';
- }
- $http({method:'POST', url:'rNotebookFE/authCr', data: $scope.notebookvalue, params:{'qparams' : $scope.additionalqueryParams}, transformResponse: [function (data) {
- // Do whatever you want!
- document.getElementById('itestframe').src = data;
- return data;
- }]})
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js
deleted file mode 100644
index a3496785..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js
+++ /dev/null
@@ -1,5 +0,0 @@
-angular.module('att.abs.helper', []);
-angular.module('quantum', []);
-//angular.module('ui.bootstrap', []);
-appDS2=angular.module("workflowApp", ["ngRoute", 'ngMessages', 'ngCookies', 'b2b.att.tpls', 'ddh.att.tpls','ddh.att.dropdowns', 'ddh.att.switches', 'b2b.att.footer', 'b2b.att.header','gridster','ui.bootstrap']);
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowController.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowController.js
deleted file mode 100644
index f18f00e9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowController.js
+++ /dev/null
@@ -1,513 +0,0 @@
-
-
-appDS2.controller('workflowsControllerDS2', function($scope, $http, $log, $modal) {
- $scope.viewPerPage = 5;
- $scope.scrollViewsPerPage = 20;
- $scope.currentPage = 2;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- $scope.radio = {
- value: ""
- };
-
-
- $scope.showModal = false;
- $scope.toggleModal = function(){
- $scope.showModal = !$scope.showModal;
- };
-
- $scope.workflow = {};
- $scope.workflow.active = "true";
-
- $scope.updateAllWorkflowStatus = function() {
- angular.forEach($scope.workflows,function(value){
- $scope.checkWorkflowStatus(value);
- })
- }
-
- $scope.fetchWorkflowsList = function() {
- $http.get('workflows/list').then(function(workflowList){
- console.log('Got new list from server = ' + workflowList.data);
- $scope.workflows = workflowList.data;
- $scope.updateAllWorkflowStatus();
- });
- };
-
- $scope.addNewWorkflow = function(newWorkflow) {
- $http.post('workflows/addWorkflow/', JSON.stringify(newWorkflow)).success(function() {
- $scope.fetchWorkflowsList();
- });
-
- $scope.workflow.name = '';
-
- };
-
- $scope.updateWorkflow = function (workflowToEdit) {
- //workflowToEdit.active='true';
- var modalInstance = $modal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-new.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', function ($scope, $modalInstance, $http) {
- $scope.workflow = workflowToEdit;
- $scope.ok = function() {
- if(
- $scope.workflow.name== undefined|| $scope.workflow.name == null|| $scope.workflow.name == ""
- ||$scope.workflow.workflowKey == undefined ||$scope.workflow.workflowKey==null||$scope.workflow.workflowKey==""
- ||$scope.workflow.runLink==undefined||$scope.workflow.runLink==null||$scope.workflow.runLink==""
-
- )
- {
- alert("please provide valid entries !");
- }
- else{
-
- console.log('Updating existing workflow ... ' + JSON.stringify($scope.workflow));
- $http.post('workflows/editWorkflow/', JSON.stringify($scope.workflow)).then(function(returnedWorkflow){
- console.log('Returned Workflow = ' + JSON.stringify(returnedWorkflow));
- $modalInstance.close($scope.workflow);
- });
- }
- };
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- //End of inner controller
- resolve: {
- workflow: function() {
- console.log('Passing ' + JSON.stringify($scope.workflow));
- return $scope.workflow;
- }
- }
- });
-
- modalInstance.result.then(function (editedWorkFlow) {
- //Need to convert to proper date - later
- delete editedWorkFlow.created;
- delete editedWorkFlow.updated;
-
- delete editedWorkFlow.createdBy;
- delete editedWorkFlow.modifiedBy;
-
- console.log('selected Item ' + JSON.stringify(editedWorkFlow));
- $scope.$emit('workflowAdded', editedWorkFlow);
-
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };
-
- $scope.reset = function(){
- console.log("Resetting ....");
- };
-
- $scope.update = function(){
- console.log("updating ....");
- };
-
- $scope.createWorkflow = function (modalSize) {
-
- var modalInstance = $modal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-new.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', function ($scope, $modalInstance, $http) {
- $scope.workflow = {};
- $scope.workflow.active = 'true';
- $scope.ok = function() {
- if($scope.workflow.name== undefined|| $scope.workflow.name == null|| $scope.workflow.name == ""
- ||$scope.workflow.workflowKey == undefined ||$scope.workflow.workflowKey==null||$scope.workflow.workflowKey==""
- ||$scope.workflow.runLink==undefined||$scope.workflow.runLink==null||$scope.workflow.runLink==""
-
- )
- {
- alert("please provide valid entries !");
- }
- else{
- console.log('Saving new workflow ... ' + JSON.stringify($scope.workflow));
- $http.post('workflows/addWorkflow/', JSON.stringify($scope.workflow)).then(function(returnedWorkflow){
- console.log('Returned Workflow = ' + JSON.stringify(returnedWorkflow));
- $modalInstance.close($scope.workflow);
- });
- }
- };
-/* console.log(size);*/
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }],
- //End of inner controller
- resolve: {
- workflow: function() {
- console.log('Passing ' + JSON.stringify($scope.workflow));
- return $scope.workflow;
- }
- }
- });
-
- modalInstance.result.then(function (newWorkflow) {
- console.log('selected Item ' + JSON.stringify(newWorkflow));
- $scope.$emit('workflowAdded', newWorkflow);
-
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };//End of createWorkflow function
-
-
- $scope.removeWorkflow = function(workflowToRemove){
- var modalInstance = $modal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-remove.html',
- sizeClass: 'modal-small',
- controller: ['$scope', '$modalInstance', '$http', function ($scope, $modalInstance, $http) {
- $scope.workflowToRemove = workflowToRemove;
- $scope.ok = function() {
- console.log('Removing workflow ... ' + JSON.stringify($scope.workflowToRemove) + ' on client request.');
- $http.post('workflows/removeWorkflow/', JSON.stringify($scope.workflowToRemove.id)).then(function(){
- console.log('Workflow successfully removed !!!');
- $modalInstance.close();
- });
- };
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('workflowRemoved');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
-
- };
-
-
-
- $scope.scheduleWorkflow = function(workflowToSchedule){
- var modalInstance = $modal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-schedule.html',
-
- controller: ['$scope', '$modalInstance', '$http','dateFilter', function ($scope, $modalInstance, $http,dateFilter) {
-
- $scope.workflowToSchedule = workflowToSchedule;
- $scope.dt = new Date();
- $scope.dt2 = new Date();
- $scope.dateformat = 'MM/dd/yyyy',
- $scope.datetimeformat = "hh:mm a";
-
- $scope.recurrenceOptions =[{
- index:0, value:'One-Time', title:'One-Time'
- },{
- index:1, value: 'Hourly',title:'Hourly'
- },{
- index:2, value: 'Daily',title:'Daily'
- },{
- index:3, value: 'Weekly',title:'Weekly'
- }]
- $scope.selectRecurrenceOpt = $scope.recurrenceOptions[0];
-
- $scope.hours = [];
- for (var i=0; i<24; i++){
- var newObj={}
- newObj.index = i;
- newObj.value = ""+i;
- newObj.title = ""+i;
- $scope.hours.push(newObj);
- }
-
- $scope.minutes = [];
- for (var i=0; i<60; i++){
- var newObj={}
- newObj.index = i;
- newObj.value = ""+i;
- newObj.title = ""+i;
- $scope.minutes.push(newObj);
- }
-
- $scope.AMPMOptions =[
- {
- index:0, value:'AM', title:'AM'
- },{
- index:1, value: 'PM',title:'PM'
- }]
-
- $scope.selectFirstHour =$scope.hours[0];
- $scope.selectFirstMinute =$scope.minutes[0];
-
- $scope.selectLastHour =$scope.hours[0];
- $scope.selectLastMinute =$scope.minutes[0];
-
- $scope.selectStartAMPMOption=$scope.AMPMOptions[0];
- $scope.selectLastAMPMOption=$scope.AMPMOptions[0];
-
- var GenerateCronExpression = function(trigger_dt, RecurrenceOpt) {
- var CRON_sec = trigger_dt.getSeconds();
- var CRON_min = trigger_dt.getMinutes();
- var CRON_hr = trigger_dt.getHours();
- var CRON_date= trigger_dt.getDate();
- var CRON_month = trigger_dt.toLocaleString('en-US', {month: 'short'}).toUpperCase();
- var CRON_day = trigger_dt.toLocaleString('en-US', {weekday: 'short'}).toUpperCase();
- var CRON_year = trigger_dt.getFullYear();
- if (RecurrenceOpt ==="One-Time") {
- CRON_day = '?'
- } else {
- if (RecurrenceOpt ==="Hourly") {
- CRON_hr = '*';
- CRON_date = '*'
- CRON_month = '*'
- CRON_day = '?'
- CRON_year = '*'
- } else if (RecurrenceOpt ==="Daily") {
- CRON_date = '*'
- CRON_month = '*'
- CRON_day = '?'
- CRON_year = '*'
- } else if (RecurrenceOpt ==="Weekly") {
- CRON_date = '*'
- CRON_month = '*'
- CRON_year = '*'
- }
- }
-
- var CRON_Expression = [CRON_sec, CRON_min, CRON_hr, CRON_date, CRON_month, CRON_day, CRON_year];
- return CRON_Expression.join(" ");
- }
-
- $scope.ok = function() {
-
- // DateTime for the start time: it should be noted that the start time
- // for a CRON job should be prior to the trigger time.
- $scope.trigger_dt = new Date( $scope.dt.getFullYear() +
- "-" + ("0"+($scope.dt.getMonth()+1)).slice(-2) +
- "-" +("0"+ $scope.dt.getDate()).slice(-2) +
- " " + ("0" + $scope.selectFirstHour.value).slice(-2) +
- ":" +("0" + $scope.selectFirstMinute.value).slice(-2) +
- ":00.0");
-
- $scope.startDateTime_CRON = GenerateCronExpression($scope.trigger_dt, $scope.selectRecurrenceOpt.value)
-
- //roll back the the start date time by 30 seconds (start time should be 30 seconds prior to trigger time)
- dt_st = new Date($scope.trigger_dt - 30*1000)
-
- startDateTime = dt_st.getFullYear() +
- "-" + ("0"+(dt_st.getMonth()+1)).slice(-2) +
- "-" +("0"+ dt_st.getDate()).slice(-2) +
- " " + ("0" + dt_st.getHours()).slice(-2) +
- ":" +("0" + dt_st.getMinutes()).slice(-2) +
- ":" + ("0" + dt_st.getSeconds()).slice(-2) +".0";
- $scope.startDateTime = startDateTime;
-
- $scope.endDateTime = $scope.dt2.getFullYear() +
- "-" + ("0"+($scope.dt2.getMonth()+1)).slice(-2) +
- "-" +("0"+ $scope.dt2.getDate()).slice(-2) +
- " " + ("0"+ $scope.selectLastHour.value).slice(-2) +
- ":" +("0" + $scope.selectLastMinute.value).slice(-2) +
- ":00.0"
-
- $scope.WorkflowScheduleObject = {};
- $scope.WorkflowScheduleObject['startDateTime_CRON'] = $scope.startDateTime_CRON;
- $scope.WorkflowScheduleObject['startDateTime'] = $scope.startDateTime;
- $scope.WorkflowScheduleObject['endDateTime'] = $scope.endDateTime;
- $scope.WorkflowScheduleObject['workflowKey'] = $scope.workflowToSchedule.workflowKey;
- $scope.WorkflowScheduleObject['recurrence'] = $scope.selectRecurrenceOpt.value;
- $scope.WorkflowScheduleObject['workflow_arguments'] = "test";
- $scope.WorkflowScheduleObject['workflow_server_url'] = $scope.workflowToSchedule.runLink;
-
-
- TimeFromNowToStart = new Date($scope.startDateTime)-new Date()
- TimeStartToEnd = new Date($scope.endDateTime)-new Date($scope.startDateTime)
-
- if (TimeFromNowToStart<=0) {
- console.log("invalid start time input")
- alert("Please ensure the scheduled start date time is later than current time.")
- return;
- }
- if (TimeStartToEnd<=0) {
- console.log("invalid end time input")
- alert("Please ensure the schduled end date time is later than the start time.")
- return;
- }
- // if successful then save and close
- $scope.saveCronJob($scope.WorkflowScheduleObject);
- $modalInstance.close();
-
- };
-
- $scope.saveCronJob = function(cronJobData){
-
- console.log('saving cron job data: ' + cronJobData);
- var uuu = "workflows/saveCronJob.htm";
- var postData={cronJobDataObj: cronJobData};
- $http.post({
-
- url : uuu,
- //dataType: 'json', // data type expected from server
- contentType: 'application/json',
- data: JSON.stringify(postData), // data type sent to server
- success : function(data){
- $scope.$apply(function(){
- //$scope.availableRoleFunctions=[];$scope.$apply();
- // new // $scope.availableFnMenuItems=data.availableFnMenuItems;
- }
- );
- //alert("Update Successful.") ;
- //$scope.editRoleFunction = null;
- // new /// $modalInstance.close({availableFnMenuItems:$scope.availableRoleFunctions});
- },
- error : function(data){
- alert("Error while saving.");
- }
- });
-
- };
-
- $scope.cancel = function() {
- console.log("cancel triggered")
- $modalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('workflowRemoved');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
-
- };
-
-
-
-
-
-
-
-
- $scope.previewWorkflow = function(workflowToPreview,modalSize){
- var modalInstance = $modal.open({
- animation: $scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-preview.html',
- sizeClass: 'modal-medium',
- controller: ['$scope', '$modalInstance', '$http', function ($scope, $modalInstance, $http) {
- $scope.workflowToPreview = workflowToPreview;
- console.log('previewWorkFlow invoked');
- console.log($scope.workflowToPreview);
-
- $scope.cancel = function() {
- $modalInstance.dismiss();
- };
- }]
- });
-
- modalInstance.result.then(function () {
- $scope.$emit('workflowRemoved');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
-
- };
-
-
- /* change work flow status based on the boolean variable "suspendBool" which corresponds whether
- * we would like to suspend or activate a workflow specified by key. */
- $scope.changeWorkflowStatus = function(workflowToChangeStatus,suspendBool){
- if (workflowToChangeStatus!==null) {
- var statusUrl= workflowToChangeStatus.runLink+"/engine-rest/process-definition/key/"+workflowToChangeStatus.workflowKey
- var suspendedUrl= statusUrl+"/suspended"
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.open('PUT', suspendedUrl, false);
- xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
- xmlHttp.onload = function() {
- if (suspendBool) {
- console.log("process definition is now suspended");
- workflowToChangeStatus.active="false"
- } else {
- console.log("process definition is now activated");
- workflowToChangeStatus.active="true"
- }
- };
- xmlHttp.send(JSON.stringify({
- "suspended" : suspendBool,
- "includeProcessInstances" : true,
- "executionDate" : "2013-11-21T10:49:45"
- }));
- }
-
- };
-
- $scope.activateWorkflow = function(workflowToActivate){
- $scope.changeWorkflowStatus(workflowToActivate,false)
-
- };
-
- $scope.suspendWorkflow = function(workflowToActivate){
- $scope.changeWorkflowStatus(workflowToActivate,true)
- };
-
- $scope.checkWorkflowStatus = function(workflow) {
- if (workflow!==null) {
- var statusUrl= workflow.runLink+"/engine-rest/process-definition/key/"+workflow.workflowKey
- var xmlHttp3 = new XMLHttpRequest();
- xmlHttp3.open('GET', statusUrl, true);
- xmlHttp3.withCredentials = true;
- xmlHttp3.send();
- xmlHttp3.onreadystatechange = function() {
- if (xmlHttp3.readyState == 4 && xmlHttp3.status == 200) {
- // do something with the response in the variable data
- var temp = JSON.parse(xmlHttp3.responseText)
- if (temp.suspended == false){
- console.log("Activated")
- workflow.active="true"
- } else {
- console.log("Suspended")
- workflow.active="false"
- }
- }
- }
- }
- };
-
- $scope.StartWorkflowInstance = function(workflowToStart){
- if (workflowToStart!==null) {
- var statusUrl= workflowToStart.runLink+"/engine-rest/process-definition/key/"+workflowToStart.workflowKey
- var suspendedUrl= statusUrl+"/submit-form"
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.open('POST', suspendedUrl, false);
- xmlHttp.setRequestHeader('Content-Type', 'application/json;charset=UTF-8');
- xmlHttp.onload = function() {
- };
- xmlHttp.send(JSON.stringify({
- "variables": {
- "customerId": {"value":"asdasda","type":"String"},
- "amount":{"value":"100","type":"String"}
- }
- }));
- }
-
- };
-
-
- $scope.$on('workflowAdded', function(event, newWorkflow) {
- console.log("New Workflow to be added in list scope " + JSON.stringify(newWorkflow));
- //$scope.workflows.push(newWorkflow);
- $scope.fetchWorkflowsList();
- console.log('newly added workflow = ' + JSON.stringify(newWorkflow));
- });
-
- $scope.$on('workflowRemoved', function(event) {
- $scope.fetchWorkflowsList();
- });
-
- $scope.fetchWorkflowsList();
-
-
-
-});
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowRouting.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowRouting.js
deleted file mode 100644
index f6ffe8f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/ds2-workflows/workflowRouting.js
+++ /dev/null
@@ -1,8 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .when('/all', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-listing.html',
- controller: 'workflowsControllerDS2'
- })
-});
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/fn-menu-add-popup-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/fn-menu-add-popup-controller.js
deleted file mode 100644
index 2b3663c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/fn-menu-add-popup-controller.js
+++ /dev/null
@@ -1,339 +0,0 @@
-var deletefn_menu_popupController = function ($scope,$modal, items,$modalInstance, $http){
- $scope.fnMenuItem=items;
- console.log("fnMenuItems",$scope.fnMenuItem);
- var ModalInstanceCtrl = function ($scope, $modalInstance, items,AdminMenuService,$http,$modal) {
- $scope.fnMenuItem=items;
- $scope.save = function (data) {
- $modalInstance.close(data);
- };
-
- $scope.cancel = function () {
- $modalInstance.dismiss('cancel');
- };
-
- $scope.deleteFun = function(data){
- $modalInstance.close(data);
- }
- };
- $scope.successPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return '';
- }
- }
- });
- };
- $scope.successModelPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modalpopup.html',
- controller: ModalInstanceCtrl,
- //sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return '';
- }
- }
- });
- };
- $scope.errorPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return '';
- }
- }
- });
- };
- $scope.deleteMenuItem= function(fnMenuItem){
- var uuu = "admin_fn_menu/removeMenuItem.htm";
- var postData={fnMenuItem: fnMenuItem};
- $http({
- method :'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData)
-
- }).then(function(data){
- $scope.successPopUp();
- // $scope.$apply(function(){$scope.fnMenuItem=data.data.fnMenuItem;});
- location.reload();
- },function(data){
- $scope.errorPopUp();
- // console.log(data);
- // modalService.showFailure("Fail","Error while deleting: "+ data.responseText);
- });
- }/// examine the LeftMenuService
-}
- var fn_menu_popupController = function ($scope, $modalInstance, message, $http){ /// examine the LeftMenuService
-
- if(message.availableFnMenuItem==null)
- $scope.label='Add New Menu Item'
-
- else{
- $scope.label='Edit Menu Item'
- //$scope.disableParentId=true;
- }
-
- $scope.getParentData = function(){
- var uuu = "admin_fn_menu/get_parent_list"
- $http({
- method : 'GET',
- url : uuu,
- dataType: 'json', // data type expected from server
- contentType: 'application/json',
- //data: JSON.stringify(postData), // data type sent to server
-
- }).then(function(data){
- //$scope.$apply(function(){
- //$scope.availableRoleFunctions=[];$scope.$apply();
- $scope.parentListSelectData=data.data; // data from server
- menuItems = $scope.parentListSelectData;
- var heirarchicalMenuItems = [];
- var children = [];
- for ( var i=0; i<menuItems.length; i++){
- for(var j=0; j<menuItems.length; j++){
- if(menuItems[j][2]==menuItems[i][0])
- children.push(
- {
- menuId: menuItems[j][0],
- label: menuItems[j][1]
- }
- );
- }
- if(children.length!=0){
- heirarchicalMenuItems.push(
- {
-
- menuId: menuItems[i][0],
- label: menuItems[i][1],
- children: children.sort($scope.sortItems("label"))
- }
-
- );
- }
- children = [];
-
- }
- heirarchicalMenuItems.sort($scope.sortItems("label"));
- $scope.childListSelectData = heirarchicalMenuItems;
- //console.log(data);
- //});
- //$scope.editRoleFunction = null;
- ///$modalInstance.close({functionCDselectData:$scope.functionCDselectData});
- },function(data){
- alert("Parent Data not available !");
- });
-
- };
-
- $scope.sortItems = function(prop){
- return function(a, b) {
- if (a[prop] > b[prop]) {
- return 1;
- } else if (a[prop] < b[prop]) {
- return -1;
- }
- return 0;
- }
-
- };
-
- $scope.getParentLabel = function(parentId, parentListSelectData){
- var element;
- element = parentListSelectData[0];
- for (var i=0; i<parentListSelectData.length; i++){
-
- element = parentListSelectData[i];
- if (element[0] == parentId)
- return element[1];
- else "---";
- }
- };
-
-
- $scope.getFunctionCDselectData = function(){
- var uuu = "admin_fn_menu/get_function_cd_list"
- $http({
- method : 'GET',
- url : uuu,
- dataType: 'json', // data type expected from server
- contentType: 'application/json',
- //data: JSON.stringify(postData), // data type sent to server
-
- }).then(function(data){
- //$scope.$apply(function(){
- //$scope.availableRoleFunctions=[];$scope.$apply();
- $scope.functionCDselectData=data.data;
- //});
- //alert("Update Successful.") ;
- //$scope.editRoleFunction = null;
- ///$modalInstance.close({functionCDselectData:$scope.functionCDselectData});
- },function(data){
- alert("Function Code Data not available !");
- });
-
- };
-
- if(message.availableFnMenuItem){
- $scope.addFnMenuItem = message.availableFnMenuItem;
- } else {
- $scope.addFnMenuItem = {};
- }
- $scope.addFnMenuItem.menuSetCode = "APP";
-
- $scope.statusOptions = [
- {index: 0, value: 'true', title: 'Y'},
- {index: 1, value: 'false', title: 'N'}
- ];
- $scope.selectedValue = $scope.statusOptions[0];
-
- $scope.separator = {
- availableOptions:[
- {value: 'true', name: 'Y'},
- {value: 'false', name: 'N'}
- ],
-
- selectedOption: {value: 'true', name: 'Y'}
-
- };
-
-
- $scope.activeStatusOptions = [
- {index: 0, value: 'true', title: 'Y'},
- {index: 1, value: 'false', title: 'N'}
- ];
- $scope.activeSelectedValue = $scope.activeStatusOptions[0];
-
- $scope.separatorStatusOptions = [
- {index: 0, value: 'true', title: 'Y'},
- {index: 1, value: 'false', title: 'N'}
- ];
- $scope.separatorSelectedValue = $scope.separatorStatusOptions[1];
-
- $scope.active = {
- availableOptions:[
- {value: 'true', name: 'Y'},
- {value: 'false', name: 'N'}
- ],
-
- selectedOption: {value: 'true', name: 'Y'}
-
- };
-
-
- $scope.updateFnMenu = function(availableFnMenuItem) {
- // form validation
- if( document.getElementById("popupAddMenuItemImageSrc").value == "" ) availableFnMenuItem.imageSrc = "N/A";
- if( document.getElementById("popupAddMenuItemTarget").value == "" ) availableFnMenuItem.target = "N/A";
- if( document.getElementById("popupAddMenuItemExternalUrl").value == "" ) availableFnMenuItem.externalUrl = "N/A";
- if( document.getElementById("popupAddMenuItemQueryString").value == "" ) availableFnMenuItem.queryString = "N/A";
- if( document.getElementById("popupAddMenuItemServlet").value == "" ) availableFnMenuItem.servlet = "N/A";
-
- validationRule = /^\S{3,}$/;
- var selectedFunction = document.getElementById("repeatSelect");
- var selectedFunctionText = selectedFunction.options[selectedFunction.selectedIndex].text;
- if(
- (document.getElementById("popupAddMenuItemLabel").value == "" || document.getElementById("popupAddMenuItemLabel").value.replace(" ", "").length == 0 ) ||//!validationRule.test(document.getElementById("popupAddMenuItemLabel").value)) ||
- $scope.addFnMenuItem.parentIdAsString == "" ||
- document.getElementById("popupAddMenuItemAction").value == "" ||
- selectedFunctionText == "" ||
- document.getElementById("popupAddMenuItemSortOrder").value == "" ||
- document.getElementById("popupAddMenuItemMenuSetCode").value == ""
- )
- {
- alert("please provide valid entries !");
- }
-
- else{
- var uuu = "admin_fn_menu/updateFnMenu.htm";
- availableFnMenuItem.parentId=parseFloat($scope.addFnMenuItem.parentIdAsString);
- availableFnMenuItem.active=('true'==$scope.addFnMenuItem.activeAsString);
- availableFnMenuItem.separator=('true'==$scope.addFnMenuItem.separatorAsString);
-
-
- var postData={availableFnMenuItem: availableFnMenuItem};
-
- $http({
- method :'POST',
- url : uuu,
- //dataType: 'json', // data type expected from server
- contentType: 'application/json',
- data: JSON.stringify(postData), // data type sent to server
- }).then(function(data){
- //$scope.$apply(function(){
- $scope.availableFnMenuItems=data.availableFnMenuItems;
- //});
-
- $modalInstance.close({availableFnMenuItems:$scope.availableRoleFunctions}),function(data){
- alert("Error while saving.");
- }
- },function(data){
- console.log("Error",data);
- });
- $scope.getLeftMenuItems(); // get left menu items again from database
-
- };
-
- $scope.getLeftMenuItems = function() {
- return $http.get('get_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
- var leftChildData=[];
- var leftParentData=[];
- var leftMenuItems = [];
- var j = response;
- try{
- if(j && j !== "null" && j!== "undefined"){
- leftParentData = JSON.parse(j.data);
- leftChildData = JSON.parse(j.data2);
- }else{
- throw "Get Left Menu respsone is not an object/is empty";
- }
- try{
- var leftChildItemList = leftChildData;
- var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
- var leftParentList = leftParentData;
- for (var i = 0; i < leftParentList.length; i++) {
- $scope.item = {
- parentLabel : leftParentList[i].label,
- parentAction : leftParentList[i].action,
- parentImageSrc : leftParentList[i].imageSrc,
- open:pageUrl==leftParentList[i].action?true:false,
- childItemList : leftChildItemList[i]==null?'x':leftChildItemList[i]
- }
- leftMenuItems.push($scope.item);
- };
-
- $scope.leftMenuItems = leftMenuItems;
-
- }catch(err){
- console.log("error happened while trying to set left menu structure: "+err);
- }
- }catch (e) {
- console.log("error happened while trying to get left menu items: "+e);
- reloadPageOnce();
- return;
- }
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- };
-
- $scope.close = function() {
- $modalInstance.close();
- };
-}
- } \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-route.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-route.js
deleted file mode 100644
index c82185c0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-route.js
+++ /dev/null
@@ -1,19 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .when('/profile/:profileId', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html',
- controller: 'selfProfileController'
- })
- .when('/self_profile', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/self_profile.html',
- controller: 'selfProfileController'
- })
- .when('/post_search', {
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/post.html',
- controller: 'postController'
- })
- .otherwise({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/profile_searchDS2.html',
- controller : "profileSearchCtrlDS2"
- });
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-search-controller-DS2.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-search-controller-DS2.js
deleted file mode 100644
index 5236001f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/profile-search-controller-DS2.js
+++ /dev/null
@@ -1,93 +0,0 @@
-appDS2.controller('profileSearchCtrlDS2', function($scope, $log, $modal, ProfileServiceDS2){
- $scope.showInput = true;
- $scope.totalPages1 = 0;
- $scope.viewPerPage1 = 8;
- $scope.currentPage1 = 1;
- $scope.showLoader = false;
-
- var debug = false;
-
- $scope.$watch('viewPerPage1', function(val) {
- $scope.showLoader = true;
- ProfileServiceDS2.getProfilePagination($scope.currentPage1, val).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.tableData =JSON.parse($scope.data.profileList);
- $scope.totalPages1 =JSON.parse($scope.data.totalPage);
- $scope.showLoader = false;
- },function(error){
- console.log("watch of viewPerPage1 failed");
- reloadPageOnce();
- });
-
- });
-
- $scope.customHandler = function(num) {
- $scope.currentPage1 = num;
- $scope.showLoader = true;
- ProfileServiceDS2.getProfilePagination($scope.currentPage1,$scope.viewPerPage1).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.tableData =JSON.parse($scope.data.profileList);
- $scope.totalPages1 =JSON.parse($scope.data.totalPage);
- $scope.showLoader = false;
- },function(error){
- console.log("customHandler failed");
- reloadPageOnce();
- });
-
- };
-
- $scope.editRow = function(profileId){
- window.location = 'userProfile#/profile/' + profileId;
- };
-
- var ModalInstanceCtrl = function ($scope, $log, $modalInstance, items) {
- $scope.msg = items;
-
- $scope.toggleUserStatus = function(id) {
- if (debug)
- $log.debug('profileSearchCtrlDS2:ModalInstanceCtrl:toggleUserStatus: data is ' + id);
- ProfileServiceDS2.toggleProfileStatus(id);
- $modalInstance.close();
- };
-
- $scope.cancelUserStatusToggle = function(rowData) {
- if (debug)
- $log.debug('profileSearchCtrlDS2:ModalInstanceCtrl: cancelUserStatusToggle: data is ' + JSON.stringify(rowData));
- // Undo the toggle of the checkbox
- rowData.active = ! rowData.active;
- $modalInstance.dismiss('cancel');
- }
-
- }
-
- // user activation/deactivation
- $scope.toggleProfileActive = function(rowData) {
- if (debug)
- $log.debug('profileSearchCtrlDS2:toggleProfileActive: id is ' + rowData.id
- + ', active is ' + rowData.active);
- var toggleType = null;
- // The checkbox is already in the desired state,
- // so the sense of the "if" is reversed here.
- if (rowData.active)
- toggleType = "activate";
- else
- toggleType = "deactivate";
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-view-models/ds2-profile/modals/profile-confirm-toggle.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- text : toggleType,
- rowData : rowData
- };
- return message;
- }
- }
- });
- };
-
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/sampleProfileController.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/sampleProfileController.js
deleted file mode 100644
index 0f02e46f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/sampleProfileController.js
+++ /dev/null
@@ -1,22 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .when('/profile/:profileId', {
- templateUrl: 'app/fusion/scripts/view-models/profile-page/profile_detail.html',
- controller: 'profileController'
- })
- .when('/post_search', {
- templateUrl: 'app/fusion/scripts/view-models/profile-page/post_search.html',
- controller: 'postSearchCtrl'
- })
- .when('/ase', {
- templateUrl: 'app/fusion/ase/index.html'
- })
- .when('/self_profile', {
- templateUrl: 'app/fusion/scripts/view-models/profile-page/self_profile.html',
- controller: 'selfProfileController'
- })
- .otherwise({
- templateUrl: 'app/fusion/scripts/DS2-view-models/DS2-profile-page/profile_searchDS2.html',
- controller : "profileSearchCtrlDS2"
- });
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/usage-list-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/usage-list-controller.js
deleted file mode 100644
index ab229714..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/usage-list-controller.js
+++ /dev/null
@@ -1,39 +0,0 @@
-appDS2.controller('usageListControllerDS2', function ($scope,$interval,$http,$modal, AdminService){
- AdminService.getUsageList().then(function(data){
-
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.users =$scope.data;
- //$scope.resetMenu();
-
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
-
- $scope.successPopUp = function () {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return '';
- }
- }
- });
- };
-
- $scope.removeSession = function(sessionId) {
-
- $http.get("usage_list/removeSession?deleteSessionId="+sessionId).success(function(response){
- $scope.users=response;
- $scope.successPopUp();
- });
-/* modalService.popupConfirmWin("Confirm","You are about to expel this user from the application. All of their unsaved data will be lost. Do you want to continue?",
- function(){
- $http.get("usage_list/removeSession?deleteSessionId="+sessionId).success(function(response){$scope.users=response;});
- })*/
-
- }
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-controller.js
deleted file mode 100644
index b2b3a43b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-controller.js
+++ /dev/null
@@ -1,408 +0,0 @@
-appDS2
- .directive(
- 'integer',
- function() {
- return {
- require : 'ngModel',
- link : function(scope, ele, attr, ctrl) {
- ctrl.$parsers.unshift(function(viewValue) {
- if (viewValue === '' || viewValue === null
- || typeof viewValue === 'undefined') {
- return null;
- }
- return parseInt(viewValue, 10);
- });
- }
- };
- })
-
- .controller(
- 'welcomeController',
- function($scope, $interval, $http, $modal, $log, ManifestService) {
-
- $scope.testMsg = "Welcome Page1";
- $scope.gridsterOpts = {
- columns : 6, // the width of the grid, in columns
- pushing : true, // whether to push other items out of
- // the way on move or resize
- floating : true, // whether to automatically float
- // items up so they stack (you can
- // temporarily disable if you are
- // adding unsorted items with
- // ng-repeat)
- width : 'auto', // can be an integer or 'auto'. 'auto'
- // scales gridster to be the full width
- // of its containing element
- colWidth : 'auto', // can be an integer or 'auto'.
- // 'auto' uses the pixel width of
- // the element divided by 'columns'
- rowHeight : 60, // can be an integer or 'match'. Match
- // uses the colWidth, giving you square
- // widgets.
- margins : [ 10, 10 ], // the pixel distance between
- // each widget
- outerMargin : true, // whether margins apply to outer
- // edges of the grid
- swapping : true,
- draggable : {
- enabled : true, // whether dragging items is
- // supported
- stop : function(event, uiWidget, $element) {
- $scope.setCookie();
- } // optional callback fired when item is finished
- // dragging
- }
-
- };
-
- /*
- * $scope.gridsterOpts = { columns: 6, width: 'auto',
- * colWidth: '230', rowHeight: '120', margins: [10, 10],
- * outerMargin: true, pushing: true, floating: true,
- * swapping: true };
- */
-
- $scope.toggleMinMax = function(index, tileName) {
- if (tileName == '') {
- $scope.standardItems[index].max = !$scope.standardItems[index].max;
- if ($scope.standardItems[index].max)
- $scope.standardItems[index].sizeY = $scope.standardItems[index].maxHeight;
- else
- $scope.standardItems[index].sizeY = 0;
- } else {
- $scope.tileTemp = $scope.$eval(tileName);
- var tileMax = $parse(tileName + '.max');
- tileMax.assign($scope, !$scope.$eval(tileName).max);
- var tileSizeY = $parse(tileName + '.sizeY');
- if ($scope.tileTemp.max)
- tileSizeY.assign($scope,
- $scope.tileTemp.maxHeight);
- else
- tileSizeY.assign($scope, 0);
- }
- };
-
- // These map directly to gridsterItem options
- // IMPORTANT: Items should be placed in the grid in the
- // order in which
- // they should appear.
- // In most cases the sorting should be by row ASC, col ASC
- $scope.standardItems = [
- {
- sizeX : 2,
- sizeY : 8,
- maxHeight : 8,
- row : 0,
- col : 0,
- headerText : 'Dashboard',
- max : false
-
- },
- {
- sizeX : 2,
- sizeY : 5,
- maxHeight : 5,
- row : 0,
- col : 2,
- headerText : 'Donut Chart',
- max : false
-
- },/*
- * { sizeX : 1, sizeY : 5, maxHeight : 5, row :
- * 0, col : 2, headerText : 'Area Chart', max :
- * false },
- */
- {
- sizeX : 2,
- sizeY : 5,
- maxHeight : 5,
- row : 8,
- col : 0,
- headerText : 'Pie Chart',
- max : false
- },
- /*
- * { sizeX : 1, sizeY : 5, maxHeight : 5, row : 8,
- * col : 1, headerText : 'Line Chart', max : false },
- */
- {
- sizeX : 2,
- sizeY : 5,
- maxHeight : 5,
- row : 8,
- col : 4,
- headerText : 'Gauges',
- max : false
- },
- {
- sizeX : 2,
- sizeY : 8,
- maxHeight : 8,
- row : 16,
- col : 0,
- headerText : 'Traffic distribution by day of week',
- max : false
- },
- {
- sizeX : 2,
- sizeY : 8,
- maxHeight : 8,
- row : 16,
- col : 2,
- headerText : 'Busy hour traffic analysis by day of week',
- max : false
- }, {
- sizeX : 2,
- sizeY : 6,
- maxHeight : 7,
- row : 24,
- col : 4,
- headerText : 'Additional Samples',
- max : false
- }, {
- sizeX : 2,
- sizeY : 8,
- maxHeight : 8,
- row : 24,
- col : 2,
- headerText : 'Sticky Notes',
- max : false
- }, {
- sizeX : 6,
- sizeY : 10,
- maxHeight : 10,
- row : 32,
- col : 0,
- headerText : 'Service Configuration',
- max : false
- } ];
-
- /*
- * $.each($scope.standardItems, function(i, a) {
- * $scope.toggleMinMax(i, ''); });
- */
- var counter = 0;
- angular.forEach($scope.standardItems, function(i, a) {
- $scope.toggleMinMax(counter, '');
- counter = counter + 1;
- });
-
- $scope.activeTabId = 'Monday';
- // for generic tabs
-
- $scope.selectedTrafficDay = [ {
- title : 'Mon',
- url : '#Monday'
- }, {
- title : 'Tue',
- url : '#Tuesday'
- }, {
- title : 'Wed',
- url : '#Wednesday'
- }, {
- title : 'Thu',
- url : '#Thursday'
- }, {
- title : 'Fri',
- url : '#Friday'
- }, {
- title : 'Sat',
- url : '#Saturday'
- }, {
- title : 'Sun',
- url : '#Sunday'
- } ];
-
- $scope.currentSelectedDayTab = '#Monday';
-
- $scope.onClickTab1 = function(Daytab) {
- $scope.currentSelectedDayTab = Daytab.url;
- }
-
- $scope.isActiveTab1 = function(tabUrl) {
- return tabUrl == $scope.currentSelectedDayTab;
- }
-
- $scope.gTabs = [ {
- title : 'Monday',
- id : 'Monday',
- url : '#Monday',
- selected : true
- }, {
- title : 'Tuesday',
- id : 'Tuesday',
- url : '#Tuesday'
- }, {
- title : 'Wednesday',
- id : 'Wednesday',
- url : '#Wednesday'
- }, {
- title : 'Thursday',
- id : 'Thursday',
- url : '#Thursday'
- }, {
- title : 'Friday',
- id : 'Friday',
- url : '#Friday'
- }, {
- title : 'Saturday',
- id : 'Saturday',
- url : '#Saturday'
- }, {
- title : 'Sunday',
- id : 'Sunday',
- url : '#Sunday'
- } ];
-
- $scope.BusyHourTraffic = [ {
- title : 'BH SNRC DLSTX - Incoming',
- url : '#Incoming'
- }, {
- title : 'BH SNRC DLSTX - Outgoing',
- url : '#Outgoing'
- }, {
- title : 'BH National - Default',
- url : '#Default'
- }, {
- title : 'BH National - Priority',
- url : '#Priority'
- }, {
- title : 'BH National',
- url : '#BHNational'
- }
-
- ];
-
- $scope.currentSelectedBusyHourTraffic = '#Incoming';
-
- $scope.onClickTab2 = function(TrafficTab) {
- $scope.currentSelectedBusyHourTraffic = TrafficTab.url;
- }
-
- $scope.isActiveTab2 = function(tabUrl) {
- return tabUrl == $scope.currentSelectedBusyHourTraffic;
- }
-
- $scope.activeTabId2 = 'Incoming';
- // for generic tabs
- $scope.gTabs2 = [ {
- title : 'BH SNRC DLSTX - Incoming',
- id : 'Incoming',
- url : '#Incoming',
- selected : true
- }, {
- title : 'BH SNRC DLSTX - Outgoing',
- id : 'Outgoing',
- url : '#Outgoing'
- }, {
- title : 'BH National - Default',
- id : 'Default',
- url : '#Default'
- }, {
- title : 'BH National - Priority',
- id : 'Priority',
- url : '#Priority'
- }, {
- title : 'BH National',
- id : 'BHNational',
- url : '#BHNational'
- } ];
-
- $scope.activeTabId3 = 'Incoming';
- // for generic tabs
- $scope.gTabs3 = [ {
- title : 'BH SNRC DLSTX - Incoming',
- id : 'Incoming',
- url : '#Incoming',
- selected : true
- }, {
- title : 'BH SNRC DLSTX - Outgoing',
- id : 'Outgoing',
- url : '#Outgoing'
- }, {
- title : 'BH National - Default',
- id : 'Default',
- url : '#Default'
- }, {
- title : 'BH National - Priority',
- id : 'Priority',
- url : '#Priority'
- }, {
- title : 'BH National',
- id : 'BHNational',
- url : '#BHNational'
- } ];
-
- /*
- * $scope.$watch('activeTabId', function(newVal) {
- * alert(newval); $('#'+newval).show(); }, true);
- */
-
- $scope.toggleEastToWest = function() {
- $("#toggle").toggle('slide');
- if ($("#leftIcon").is(":visible")) {
- $("#rightIcon").show();
- $("#leftIcon").hide();
- } else if ($("#rightIcon").is(":visible")) {
- $("#rightIcon").hide();
- $("#leftIcon").show();
- }
- };
-
- $scope.group1 = {
- open : true
- };
- $scope.group2 = {
- open : true
- };
- $scope.group3 = {
- open : true
- };
- $scope.group4 = {
- open : true
- };
- $scope.group5 = {
- open : true
- };
- $scope.group6 = {
- open : true
- };
- $scope.group7 = {
- open : true
- };
- $scope.group71 = {
- open : true
- };
- $scope.group8 = {
- open : true
- };
- $scope.group9 = {
- open : true
- };
- $scope.group10 = {
- open : true
- };
- $scope.group11 = {
- open : true
- };
- $scope.group12 = {
- open : false
- };
-
- // Fetch manifest info
- $scope.manifest = {};
- ManifestService.getManifest()
- .then(function(jsonObj) {
- // $log.debug("welcome-controller: getManifest returned " + JSON.stringify(jsonObj));
- if (jsonObj.error) {
- $log.error('welcome-controller: failed to get manifest: ' + JSON.stringify(jsonObj));
- }
- else {
- $scope.manifest=jsonObj;
- }
- },function(error){
- $log.error("welcome-controller: getManifest failed: " + error);
- });
-
-
- });
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-route.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-route.js
deleted file mode 100644
index 8f4b1fdb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-controllers/welcome-route.js
+++ /dev/null
@@ -1,7 +0,0 @@
-appDS2.config(function($routeProvider) {
- $routeProvider
- .otherwise({
- templateUrl: 'app/fusion/scripts/DS2-view-models/welcome-content.html',
- controller : "welcomeController"
- });
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js
deleted file mode 100644
index 64da0a49..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js
+++ /dev/null
@@ -1,64 +0,0 @@
-appDS2.directive('leftMenuEcomp', function () {
- /*
- * Custom version of b2b-left-navigation directive:
- * 1. Make parent menu a link if no child menus.
- * 2. Add unique IDs to all items.
- * 3. Hide icon if no child menus.
- * 4. Arrow toggle button.
- * 5. Adjust the page on collapse/expand.
- */
- return {
- restrict: 'EA',
- templateUrl: 'app/fusion/scripts/DS2-view-models/b2b-leftnav-ext.html',
- scope: {
- menuData: '='
- },
- link: function (scope, element, attrs, ctrl) {
- scope.idx = -1;
- scope.itemIdx = -1;
- scope.navIdx = -1;
- /*assuming menu is expanded when page loads*/
- scope.showmenu=true;
- scope.leftMenuClass= "";
- scope.leftMenuArrowClass="leftmenu-arrow-expand";
- scope.toggleNav = function (val,link,menuStatus) {
-
- if(!menuStatus){
- scope.toggleDrawer(menuStatus);
- return;
- }
- if(link!=null && link!=''){
- location.href = link;
- return;
- }
- if (val === scope.idx) {
- scope.idx = -1;
- return;
- }
- scope.idx = val;
- };
- scope.toggleDrawer = function(menuStatus){
- scope.idx=-1; /*hide the sub menus*/
- if(menuStatus){
- //Collapse Menu
- scope.showmenu=false;
- scope.leftMenuClass = "left-menu-collapsed";
- scope.leftMenuArrowClass="leftmenu-arrow-collapse";
- document.getElementById('page-content').style.marginLeft = "50px";
- }else{
- //Expand Menu
- scope.showmenu=true;
- scope.leftMenuClass = "";
- scope.leftMenuArrowClass="leftmenu-arrow-expand";
- document.getElementById('page-content').style.marginLeft = "250px";
- }
-
- };
- scope.liveLink = function (evt, val1, val2) {
- scope.itemIdx = val1;
- scope.navIdx = val2;
- evt.stopPropagation();
- };
- }
- };
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js
deleted file mode 100644
index 088fa487..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2Header.js
+++ /dev/null
@@ -1,116 +0,0 @@
-appDS2.directive('ds2Header', function () {
- return {
- restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements
- replace: false,
- templateUrl: "app/fusion/scripts/DS2-view-models/ds2Header.html",
- controller: ['$scope', '$filter','$http','$timeout', '$log','UserInfoServiceDS2', 'HeaderServiceDS2', '$window', '$cookies','$cookieStore', function ($scope, $filter, $http, $timeout, $log,UserInfoServiceDS2,HeaderServiceDS2, $window, $cookies,$cookieStore) {
- // copy from existing DS1
-
- /*Define fields*/
- $scope.userName;
- $scope.userFirstName;
- $scope.userId;
- $scope.userEmail;
- $scope.redirectUrl;
- $scope.contactUsUrl;
- $scope.getAccessUrl;
- $scope.menuItems = [];
- $scope.showHeader = ($cookieStore.get("show_app_header") == undefined ? true : $cookies.get("show_app_header") );
-
-
- /***************functions**************/
- /*getting user info from session*/
- $scope.getUserNameFromSession = function(){
- UserInfoServiceDS2.getFunctionalMenuStaticDetailSession()
- .then(function (res) {
- $scope.contactUsUrl=res.contactUsLink;
- $scope.userName = res.userName;
- $scope.userId = res.userid;
- $scope.userEmail = res.email;
- $scope.userFirstName = res.firstName;
- $scope.redirectUrl = res.portalUrl;
- $scope.getAccessUrl = res.getAccessUrl;
- });
- }
-
- $scope.returnToPortal=function(){
- window.location.href = $scope.redirectUrl;
- }
-
- /*Menu Structure*/
- var menuStructureConvert = function(menuItems) {
- $scope.megaMenuDataObjectTemp =
- [{
- text: "Manage",
- children: menuItems
- },
- {
- text: "Support",
- children: [
- {
- label:"Contact Us",
- action:$scope.contactUsUrl,
- childMenus:[]
- },
- {
- label:"Get Access",
- action:$scope.getAccessUrl,
- childMenus:[]
- }]
- }];
- return $scope.megaMenuDataObjectTemp;
- };
-
- $scope.getMenu=function() {
- $scope.getUserNameFromSession();
- var promise = HeaderServiceDS2.getMenu();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.error('failed to get menu');
- $scope.getUserNameFromSession();
- }else{
- $scope.parentMenu = JSON.parse(res.data);
- $scope.childMenu = JSON.parse(res.data2);
- for(var i=0; i<$scope.parentMenu.length;i++){
- $scope.parentMenu[i].childMenus = ($scope.childMenu[i]);
- }
- $scope.menuItems = menuStructureConvert($scope.parentMenu);
- }
- },
- function(err) {
- $log.error('getMenu failed', err);
- }
- );
- }
-
-
-
- $scope.adjustHeader=function() {
- $scope.showHeader = ($cookies.get("show_app_header") == undefined ? true : $cookies.get("show_app_header"));
- // console.log($scope.showHeader);
- if ($scope.showHeader==true) {
- document.getElementById('page-content').style.marginTop = "45px";
- }else{
- document.getElementById('page-content').style.marginTop = "0px";
- }
- }; // adjustHeader
- $scope.$on('$routeChangeSuccess', function () {
- $scope.adjustHeader();
- });
-
- $scope.getUserNameFromSession();
- $scope.getMenu();
- }]
- }
-});
-
-appDS2.filter("ellipsis", function(){
- return function(text, length){
- if (text) {
- var ellipsis = text.length > length ? "..." : "";
- return text.slice(0, length) + ellipsis;
- };
- return text;
- }
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2LeftMenu.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2LeftMenu.js
deleted file mode 100644
index 758add6e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/ds2LeftMenu.js
+++ /dev/null
@@ -1,73 +0,0 @@
-appDS2.directive('ds2Menu', function () {
- return {
- restrict: 'A', //This means that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements
- replace: false,
- templateUrl: "app/fusion/scripts/DS2-view-models/ds2Left_menu.html",
- controller: ['$scope','$filter','$http','$timeout','$cookies','LeftMenuServiceDS2', function ($scope, $filter, $http, $timeout, $cookies, LeftMenuServiceDS2) {
- $scope.menuData = [];
- $scope.leftChildData = [];
- $scope.leftParentData = [];
- $scope.leftMenuItems = [];
- $scope.app_name = "";
- $scope.app_name_full = "";
- LeftMenuServiceDS2.getLeftMenu().then(function(response){
- var j = response;
- if (j && j !== "null" && j !== "undefined"){
- $scope.leftParentData = JSON.parse(j.data);
- $scope.leftChildData = JSON.parse(j.data2);
- } else {
- console.log("ds2Menu::controller: unexpected getLeftMenu response");
- return;
- }
- var leftParentList = $scope.leftParentData;
- var leftChildItemList = $scope.leftChildData;
- for (var i = 0; i < leftParentList.length; i++) {
- var parentItem = {};
- parentItem.name = leftParentList[i].label;
- parentItem.imageSrc = leftParentList[i].imageSrc;
- // Add link to items with no subitems
- if (leftChildItemList[i].length == 0)
- parentItem.href = leftParentList[i].action;
- parentItem.menuItems = [];
- for (var j = 0; j < leftChildItemList[i].length; j++) {
- if (leftChildItemList[i][j].label != null && leftChildItemList[i][j].label.length > 0) {
- var childItem = {};
- childItem.name = leftChildItemList[i][j].label;
- childItem.href = leftChildItemList[i][j].action;
- parentItem.menuItems.push(childItem)
- }
- }
- $scope.menuData.push(parentItem);
- }
- },function(error){
- console.log("ds2Menu::controller: getLeftMenu failed", error);
- });
-
- LeftMenuServiceDS2.getAppName().then(function(response){
- var j = response;
- try {
- if (j && j !== "null" && j!== "undefined"){
- $scope.app_name_full = j.data;
- var processed_app_name = j.data;
- var n = processed_app_name.length;
- if (n > 15) {
- n = 15;
- }
- $scope.app_name = processed_app_name.substr(0, n);
- } else {
- throw "Get app_name respsone is not an object/is empty";
- }
- } catch (e) {
- console.log("error happened while trying to get app name "+e);
- return;
- }
- },function(error){
- console.log("error happened while calling getAppName "+error);
- });
-
- $scope.drawerOpen = true;
-
-
- }]
- }
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/footer.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/footer.js
deleted file mode 100644
index e11c3a05..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-directives/footer.js
+++ /dev/null
@@ -1,27 +0,0 @@
-appDS2.directive('ds2Footer', function () {
- return {
- restrict: 'A', //This means that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements
- replace: false,
- templateUrl: "app/fusion/scripts/DS2-view-models/footer.html",
- controller: ['$scope', '$filter','ManifestService', function ($scope, $filter,ManifestService) {
- $scope.build_number = '';
- ManifestService.getManifest().then(function(response){
- $scope.build_number=response['Build-Number'];
- });
- }]
- }
-});
-
-/*Analytics for all the pages*/
-$(function() {
- portalHook();
- function portalHook() {
- var script = document.createElement('script');
- script.src = "api/v2/analytics"
- script.async = true;
- script.onload = function() {
- runAnalytics(); //runAnaltics() has endpoint in epsdk-fw library.
- }
- document.head.appendChild(script);
- }
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/error_modal.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/error_modal.html
deleted file mode 100644
index 895abaf9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/error_modal.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Error!</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content">
- <p style="word-wrap: break-word;">{{msg}}</p>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="$dismiss('cancel')">OK</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modal.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modal.html
deleted file mode 100644
index 2584216c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modal.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Success!</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 40px;">
- Your change has been saved! {{msg.text}}
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="$dismiss('cancel')">OK</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modalpopup.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modalpopup.html
deleted file mode 100644
index e0a168ab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-modal/success_modalpopup.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<div style="overflow-y:auto">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Success!</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 600px;overflow-y: auto;">
- <pre> {{msg.text}}</pre>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="$dismiss('cancel')">OK</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminMenuService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminMenuService.js
deleted file mode 100644
index 86bf5cd4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminMenuService.js
+++ /dev/null
@@ -1,129 +0,0 @@
-appDS2.factory('AdminMenuService', function ($http, $q) {
- return {
- getRoleFunctionList: function() {
- return $http.get('get_role_functions')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
-getFnMenuItems: function(){
-
- return $http.get('admin_fn_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
-
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- getCollaborateList: function() {
- return $http.get('get_collaborate_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-/* saveRoleFunctionList: function(roleData) {
- return $http.post('role_function_list/saveRoleFunction',{
- roleData
- })
- .then(function(response) {
- console.log(response);
- if (response.status == 200) {
- return response.data;
- } else {
- console.log('eror');
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }*/
- saveRoleFunctionList: function(roleData) {
- return $http({
- method: "POST",
- url: "role_function_list/saveRoleFunction",
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- delRoleFunctionList: function(roleData) {
- return $http({
- method: "POST",
- url: "role_function_list/removeRoleFunction",
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- clearAdminRegions: function() {
- return $http({
- method: "GET",
- url: "jcs_admin/clearAll",
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
-
-
-
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminService.js
deleted file mode 100644
index 105f0202..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/adminService.js
+++ /dev/null
@@ -1,453 +0,0 @@
-appDS2.factory('AdminService', function ($http, $q) {
- return {
- getRole: function(roleId) {
- return $http.get('get_role?role_id=' + roleId)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- getCollaborateList: function() {
- return $http.get('get_collaborate_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getCacheRegions: function() {
- return $http.get('get_regions')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getUsageList: function() {
- return $http.get('get_usage_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
-getFnMenuItems: function(){
-
- return $http.get('admin_fn_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
-
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
-/* saveRoleFunctionList: function(roleData) {
- return $http.post('role_function_list/saveRoleFunction',{
- roleData
- })
- .then(function(response) {
- console.log(response);
- if (response.status == 200) {
- return response.data;
- } else {
- console.log('eror');
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }*/
-
- getRoleFunctionList: function() {
- return $http.get('get_role_functions')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- saveRoleFunctionList: function(roleData) {
- return $http({
- method: "POST",
- url: "role_function_list/saveRoleFunction",
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- addRoleFunctionList: function(roleData) {
- return $http({
- method: "POST",
- url: "role_function_list/addRoleFunction",
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- delRoleFunctionList: function(roleData) {
- return $http({
- method: "POST",
- url: "role_function_list/removeRoleFunction",
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- clearAdminRegions: function() {
- return $http({
- method: "GET",
- url: "jcs_admin/clearAll"
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- showRegionDetails: function(cacheName) {
- return $http({
- method: "GET",
- url: "jcs_admin/showRegionDetails?cacheName="+cacheName,
- contentType: 'application/json',
- }).then(function(response) {
- //var parsed = JSON.stringify(response);
- var responseData = JSON.stringify(response);
- if (response.status == 200) {
- return response;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- console.log('response'+response);
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- clearRegionFunction: function(cacheName) {
- return $http({
- method: "GET",
- url: "jcs_admin/clearRegion?cacheName="+cacheName
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- clearItemnFunction: function(cacheName, key) {
- return $http({
- method: "GET",
- url: "jcs_admin/clearItem?keyName="+key+"&cacheName="+cacheName
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- showItemDetails: function(cacheName, key) {
- return $http({
- method: "GET",
- url: "jcs_admin/showItemDetails?keyName="+key+"&cacheName="+cacheName
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- //role deletion
- delRoleList: function(roleData) {
- return $http({
- method: "POST",
- url: "role_list/removeRole",
- data:JSON.stringify({role:roleData})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- // activate role
- activateRole: function(selected,availableRole){
- return $http({
- method: "POST",
- url: "role_list/toggleRole",
- data:JSON.stringify({role:availableRole})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- // save Role
- saveRole: function(role,roleId){
- return $http({
- method: "POST",
- url: "role/saveRole.htm?role_id="+roleId,
- data:JSON.stringify(role)
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- // activate RoleFun Remove
- confirmRoleFunRemove: function(selected,availableRole,id){
- return $http({
- method: "POST",
- url: "role/removeRoleFunction.htm?role_id=" + id,
- data:JSON.stringify({roleFunction:availableRole})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- // activate RoleFun Add
- confirmRoleFunAdd: function(selected,availableRole,id){
- return $http({
- method: "POST",
- url: "role/addRoleFunction.htm?role_id=" + id,
- data:JSON.stringify({roleFunction:availableRole})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- // activate RoleChild Remove
- confirmRoleChildRemove: function(selected,availableRole,id){
- return $http({
- method: "POST",
- url: "role/removeChildRole.htm?role_id=" + id,
- data:JSON.stringify({roleFunction:availableRole})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- // activate RoleChild Add
- confirmRoleChildAdd: function(selected,availableRole,id){
- return $http({
- method: "POST",
- url: "role/addChildRole.htm?role_id=" + id,
- data:JSON.stringify({roleFunction:availableRole})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- //Role Function delete for associated role on Edit Role
- removeRoleFunction: function(roleFunction,roleId){
- return $http({
- method: "POST",
- url: "role/removeRoleFunction.htm?role_id=" + roleId,
- data:JSON.stringify({roleFunction:roleFunction})
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
-
-/* toggleProfileActiveFunction: function(profileId) {
- return $http({
- method: "GET",
- url: "jcs_admin/clearRegion?cacheName="+cacheName
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }*/
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-modal/modalService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-modal/modalService.js
deleted file mode 100644
index 061d1ba2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-modal/modalService.js
+++ /dev/null
@@ -1,38 +0,0 @@
-angular.module("modalServices",[]).service('modalService', ['$modal', function ($modal) {
- var ModalInstanceCtrl = function ($scope, $modalInstance, items,$rootScope) {
- $scope.roleFun=items;
- $scope.msg=items;
-
- $scope.cancel = function () {
- $modalInstance.dismiss('cancel');
- };
- };
- this.errorPopUp = function (msg) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/error_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- return msg;
- }
- }
- });
- };
- this.successPopUp = function (msg) {
- var modalInstance = $modal.open({
- templateUrl: 'app/fusion/scripts/DS2-modal/success_modal.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-small',
- resolve: {
- items: function () {
- var message = {
- title: '',
- text: msg
- };
- return message;
- }
- }
- });
- };
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-profile/selfProfileService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-profile/selfProfileService.js
deleted file mode 100644
index bc18f2c8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-profile/selfProfileService.js
+++ /dev/null
@@ -1,114 +0,0 @@
-appDS2.factory('SelfProfileService', function ($http, $q) {
- return {
- getProfileDetail: function(profileId) {
- return $http({
- method: "GET",
- url: "get_profile?profile_id=" + profileId,
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getSelfProfileDetail: function() {
- return $http.get('get_self_profile')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- addRole: function(roleData,profileId) {
- return $http({
- method: "POST",
- url: "profile/addNewRole?profile_id=" + profileId,
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- deRole: function(roleData,profileId) {
- return $http({
- method: "POST",
- url: "profile/removeRole?profile_id=" + profileId,
- data:roleData
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- saveProfile: function(data,profileId) {
- return $http({
- method: "POST",
- url: "profile/saveProfile?profile_id=" + profileId,
- data:data
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- removeRole: function(data,profileId) {
- return $http({
- method: "POST",
- url: "profile/removeRole?profile_id=" + profileId,
- data:data
-
- }).then(function(response) {
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/raptorReportFactory.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/raptorReportFactory.js
deleted file mode 100644
index 83c051db..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/raptorReportFactory.js
+++ /dev/null
@@ -1,595 +0,0 @@
-appDS2.factory('raptorReportFactory', function($http, $q) {
- return {
- getDefinitionByReportId: function(reportId) {
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_def_tab_wise_data/"+reportId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getDefinitionByReportId did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getDefinitionByReportId callback failed");
- });
- },
- getDefinitionByReportId: function(reportId) {
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_def_tab_wise_data/"+reportId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getDefinitionByReportId did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getDefinitionByReportId callback failed");
- });
- },
- getDefinitionInSession: function() {
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_def_tab_wise_data/InSession",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getDefinitionInSession did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getDefinitionInSession callback failed");
- });
- },
-
- createNewDefinition: function() {
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_def_tab_wise_data/Create",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: createNewDefinition did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: createNewDefinition callback failed");
- });
- },
- updateDefinition: function(updatedJson,isUpdate) {
- return $http({
- method: "POST",
- url: (isUpdate?("report/wizard/save_def_tab_data/"+updatedJson.reportId):"report/wizard/save_def_tab_data/Create"),
- data: updatedJson
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: updateDefinition did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: updateDefinition callback failed");
- });
- },
- saveNewDefinition: function(updatedJson) {
- return $http({
- method: "POST",
- url: "report/wizard/save_def_tab_data/InSession",
- data: updatedJson
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: saveNewDefinition did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
- });
- },
- getSqlInSession: function() {
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_sql_tab_wise_data/InSession",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getSqlInSession did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getSqlInSession callback failed");
- });
- },
- testRunSQL: function(queryJSON) {
- return $http({
- method: "POST",
- url: "report/wizard/retrieve_data/true",
- data: queryJSON
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return JSON.parse(response.data.data.elements);
- } else {
- return $q.reject("raptorReportFactory: testRunSQL did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: testRunSQL callback failed");
- });
- },
- formFieldVerifySQL: function(queryJSON) {
- return $http({
- method: "POST",
- url: "report/wizard/retrieve_data/false",
- data: queryJSON
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return JSON.parse(response.data.data.elements);
- } else {
- return $q.reject("raptorReportFactory: formFieldVerifySQL did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: formFieldVerifySQL callback failed");
- });
- },
- getColumnList: function() {
- return $http({
- method: "GET",
- url: "report/wizard/list_columns",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getColumnList did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getColumnList callback failed");
- });
- },
- getDrillDownReportList: function() {
- return $http({
- method: "GET",
- url: "report/wizard/list_drilldown_reports",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getDrillDownReportList did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getDrillDownReportList callback failed");
- });
- },
- getChildReportFormField: function(reportId) {
- return $http({
- method: "GET",
- url: "report/wizard/list_child_report_ff/"+reportId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getDrillDownReportList did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getDrillDownReportList callback failed");
- });
- },
- getChildReportColumn: function(reportId) {
- return $http({
- method: "GET",
- url: "report/wizard/list_child_report_col/"+reportId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getChildReportColumn did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getChildReportColumn callback failed");
- });
- },
- getColumnEditInfoById: function(columnId){
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_col_tab_wise_data/"+columnId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getColumnEditInfoById did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getColumnEditInfoById callback failed");
- });
- },
- saveColumnEditInfo: function(updatedColumnJson){
- return $http({
- method: "POST",
- url: "report/wizard/save_col_tab_data",
- data: updatedColumnJson
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: saveColumnEditInfo did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: saveColumnEditInfo callback failed");
- });
- },
- postImportXml: function(importXMLJSON){
- return $http({
- method: "POST",
- url: "report/wizard/import_report",
- data: importXMLJSON
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: importXml did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: importXml callback failed");
- });
- },
- copyReportById: function(reportId) {
- return $http({
- method: "GET",
- url: "report/wizard/copy_report/"+reportId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: copyReportById did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: copyReportById callback failed");
- });
- },
- saveFormFieldEditInfo: function(updatedFormFieldJson){
- return $http({
- method: "POST",
- url: "report/wizard/save_formfield_tab_data",
- data: updatedFormFieldJson
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: saveFormFieldEditInfo did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: saveFormFieldEditInfo callback failed");
- });
- },
- getFormFieldList: function() {
- return $http({
- method: "GET",
- url: "report/wizard/list_formfields",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getFormFieldList did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getFormFieldList callback failed");
- });
- },
- getFormFieldEditInfoById: function(fieldId){
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_form_tab_wise_data/"+fieldId,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getColumnEditInfoById did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getFormFieldEditInfoById callback failed");
- });
- },
- deleteFormFieldById: function(fieldId){
- return $http({
- method: "GET",
- url: "report/wizard/retrieve_form_tab_wise_data/"+fieldId+"/delete",
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: deleteFormFieldById did not return a valid JSON object.");
- }
- return response.data;
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: deleteFormFieldById callback failed");
- });
- },
- getColumns: function() {
- return $http
- .get('raptor.htm?action=report.search.execute&r_page=0')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getColumns did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getColumns callback failed");
- });
- },
-
- getSearchData : function() {
- return $http
- .get('raptor.htm?action=report.search.execute&r_page=0')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getSearchData did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getSearchData callback failed");
- });
- },
-
- getSecurityReportOwnerList: function() {
- return $http
- .get('report/wizard/security/retrieveReportOwner')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getSecurityReportOwnerList did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getSecurityReportOwnerList callback failed");
- });
- },
- getReportRoleList: function() {
- return $http
- .get('report/wizard/security/retrieveReportRoleList')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getReportRoleList did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getReportRoleList callback failed");
- });
- },
- getReportSecurityInfo: function() {
- return $http
- .get('report/wizard/security/getReportSecurityInfo')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getReportSecurityInfo did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getReportSecurityInfo callback failed");
- });
- },
- getReportSecurityUsers: function() {
- return $http
- .get('report/wizard/security/retrieveReportUserList')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getReportSecurityUsers did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getReportSecurityUsers callback failed");
- });
- },
-
- getReportSecurityRoles: function() {
- return $http
- .get('report/wizard/security/getReportSecurityRoles')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getReportSecurityUsers did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getReportSecurityUsers callback failed");
- });
- },
-
-
- getSearchDataAtPage : function(pageSearchParameter) {
- return $http
- .get('raptor.htm?action=report.search.execute&r_page='+pageSearchParameter)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getSearchDataAtPage did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getSearchDataAtPage callback failed");
- });
- },
- setDrillDownPopupOptions: function(drillDownURL,drillDownParams) {
- this.drillDownURL = drillDownURL;
- this.drillDownParams = drillDownParams;
- },
- getReportDeleteStatus : function(deleteUrl) {
- return $http.get(deleteUrl).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: getReportDeleteStatus did not return a valid JSON object.");
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: getReportDeleteStatus callback failed");
- });
- },
- addReportSecurityUser: function(UserId) {
- return $http({
- method: "POST",
- url: "report/security/addReportUser",
- data: UserId
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: addReportSecurityUser did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
- });
- },
- removeReportSecurityUser: function(UserId) {
- return $http({
- method: "POST",
- url: "report/security/removeReportUser",
- data: UserId
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: removeReportSecurityUser did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
- });
- },
- addReportSecurityRole: function(RoleId) {
- return $http({
- method: "POST",
- url: "report/security/addReportRole",
- data: RoleId
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: addReportSecurityRole did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: saveNewDefinition callback failed");
- });
- },
- removeReportSecurityRole: function(RoleId) {
- return $http({
- method: "POST",
- url: "report/security/removeReportRole",
- data: RoleId
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: removeReportSecurityRole did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: removeReportSecurityRole callback failed");
- });
- },
- updateReportSecurityInfo: function(securityInfo) {
- return $http({
- method: "POST",
- url: "report/security/updateReportSecurityInfo",
- data: securityInfo
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: updateReportSecurityInfo did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: updateReportSecurityInfo callback failed");
- });
- },
-
- toggleUserEditAccess: function(reportUser) {
- var readOnly = reportUser.accessAllowed?"N":"Y";
- return $http({
- method: "POST",
- url:"report/security/toggleUserEditAccess/"+reportUser.id,
- data: readOnly
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: toggleUserEditAccess did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: toggleUserEditAccess callback failed");
- });
- },
- toggleRoleEditAccess: function(reportRole) {
- var readOnly = reportRole.accessAllowed?"N":"Y";
- return $http({
- method: "POST",
- url:"report/security/toggleRoleEditAccess/"+reportRole.id,
- data: readOnly
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject("raptorReportFactory: toggleRoleEditAccess did not return a valid JSON object.");
- }
- }, function(response) {
- // something went wrong
- return $q.reject("raptorReportFactory: toggleRoleEditAccess callback failed");
- });
- },
- resetSecurityLoadingCounter: function() {
- this.securityPageApiCounter = 0;
- this.securityPageApiTotalCount = 5;
- },
- icrementSecurityLoadingCounter: function() {
- this.securityPageApiCounter = this.securityPageApiCounter+1;
- },
- checkSecurityLoadingCounter: function() {
- return (this.securityPageApiCounter ==this.securityPageApiTotalCount);
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/stepFormFactory.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/stepFormFactory.js
deleted file mode 100644
index 5c711425..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-raptor-report/stepFormFactory.js
+++ /dev/null
@@ -1,198 +0,0 @@
-(function(){
- var stepFormFactory = function($http, $compile, $q, $log) {
-
- var factory = {};
-
- factory.getStepJSONData = function(jsonSrcName) {
- $http({
- method: "GET",
- url: jsonSrcName,
- }).then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
-
-
- factory.renderColumnForm = function(scope) {
-
- }
- factory.renderForm = function(jsonSrcName, elem, scope) {
- let defer = $q.defer();
- var divStepForm = document.getElementById('stepView');
- var textStyle = "width:300px"
- var textAreaStyle = "width:300px"
- if(divStepForm)
- while(divStepForm && divStepForm.firstChild){
- divStepForm.removeChild(divStepForm.firstChild);
- }
- $http({
- method: 'GET',
- url: jsonSrcName
- }).then(function successCallback(response) {
- // this callback will be called asynchronously
- // when the response is available
- if (typeof response.data === 'object') {
- var json = response.data;
- var step = json.step;
- var div =d3.select(elem[0]);
- var modelNameDict = {};
-
- div.append("h1").attr({"class":"font-color:blue"}).text(json.content.title);
- div.append("div").html(json.content.contentHtml);
- var sections = json.content.sections;
- sections.forEach(function(d, i) {
- var sectionDiv = div.append("div");
- sectionDiv.attr("id", "section_"+i);
- if(d.title != "finalButton")
- sectionDiv.append("h4").text(d.title);
- var proj_id_hidden = sectionDiv.append("input");
- proj_id_hidden.attr({"type":"hidden", "value":"", "name": "proj_id", "ng-model":"proj_id", "style": "" });
-
- var elements = d.elements;
- var buttons = d.buttons;
- var elementTable ;
- if(elements) {
- elements.forEach(function(element, elementIndex) {
-
- var elementBody ;
- if(elementIndex == 0) {
- elementTable = sectionDiv.append("table").attr({"border":"0", "cellpadding":"4", "cellspacing":"0"});
- elementBody = elementTable.append("tbody");
- } else {
- elementBody = elementTable = sectionDiv.select("tbody");
- }
- if(element.input == 'hidden') {
-
- } else {
- var tr = elementBody.append("tr")
- var cellWidthStyle = {"width":"50%"}
-
- if (!(element.spanOverTwoColumns)){
- var td = tr.append("td").attr({"width":"30%","class":"tdLeftColumn"});
- if (element.input=="checkboxGroup") {
- td = td.attr({"rowspan":element.checkboxes.length})
- }
- td.text(element.displayName);
- var cellWidthStyle = {"width":"500px;"}
- }
- td = tr.append("td").attr(cellWidthStyle);
- var model_name_appendix='';
- if (element.name in modelNameDict) {
- modelNameDict[element.name]=modelNameDict[element.name]+1
- model_name_appendix ='_'+modelNameDict[element.name]
- } else {
- modelNameDict[element.name]=0
- }
- if(element.input == 'text') {
- var inp_text = td.append("input");
- inp_text.attr({"type":"text", "value":element.defaultValue, "name": element.name, "ng-model":element.name+model_name_appendix, "style": (element.style?element.style:textStyle) });
- }
- else if(element.input === 'checkbox') {
- var temptd= td.append("label").attr({"class":"checkbox"});
- var temptd2= temptd.append("input").attr({"type":"checkbox", "ng-model": element.checkbox.value});
- var temptd3= temptd.append("i").attr({"class":"skin"})
- var temptd3= temptd.append("span").text(element.checkbox.text);
-
- } else if (element.input === 'radio') {
- element.options.forEach(function(d,i) {
- td.append("input").attr({"type":"radio", "id":element.name+"_"+d.id, "ng-model":element.name+model_name_appendix, "name": element.name, "value": d.id});
- td.append("label").text(d.name);
- })
- } else if (element.input === 'checkboxGroup') {
-
- element.checkboxes.forEach(function(d,i) {
- if (i==0) {
- var temptd= td.append("label").attr({"class":"checkbox"});
- var temptd2= temptd.append("input").attr({"type":"checkbox", "ng-model": d.value});
- var temptd3= temptd.append("i").attr({"class":"skin"})
- var temptd3= temptd.append("span").text(d.text);
- } else {
- var tr = elementBody.append("tr")
- td = tr.append("td").attr({"width":"50%"});
- var temptd= td.append("label").attr({"class":"checkbox"});
- var temptd2= temptd.append("input").attr({"type":"checkbox", "ng-model": d.value});
- var temptd3= temptd.append("i").attr({"class":"skin"})
- var temptd3= temptd.append("span").text(d.text);
- }
- })
- } else if (element.input === 'textarea') {
- td.append("textarea").attr({"rows":"4", "cols":"50", "ng-model":element.name+model_name_appendix, "name": element.name, "style": (element.style?element.style:textAreaStyle)});
- }
- else if (element.input === 'select') {
- var select = td.append("select");
- // need to store options into element name;
- select
- .attr({"name": element.name,"b2b-dropdown":"","ng-model":element.ngModelName,"style":"width:300px"})
- .attr("placeholder-text","Select");
-
-
- /* var data = ["Option 1", "Option 2", "Option 3"]*/
- var options = select
- .selectAll('option')
- .data(element.options).enter()
- .append('option').attr("value", function(d) {return d.value})
- .attr("b2b-dropdown-list","")
- .text(function (d) { return d.text; })
- ;
- } else if (element.input === 'tabletext') {
- var colArray = element.columns.split(',');
- var table = td.append("table");
- table.attr("border", "1");
-
- colArray.forEach(function(d) {
- table.append("th").text(d);
- })
-
- }
- }
- })
- if (buttons) {
- buttons.forEach(function(button, buttonIndex) {
- sectionDiv.append("input").attr({"type":"button", "value": button.text, "ng-click":button.ngFunction,"class":"btn btn-alt btn-small"});
- })
- sectionDiv.append("br");
- }
- }
- else { //if elements
- if((json.step != "1")&&(!json.hideBackButton))
- sectionDiv.append("input").attr({"type":"button", "value": "Back", "ng-click":"previous()","class":"btn btn-alt btn-small"});
- if((d.title == "finalButton")&(!json.hideSaveButton))
- sectionDiv.append("input").attr({"type":"button", "value": "Save", "ng-click":"save()", "class":"btn btn-alt btn-small"});
- if(!json.last_step)
- sectionDiv.append("input").attr({"type":"button", "value": "Next", "ng-click":"next()", "class":"btn btn-alt btn-small"});
-
- }
- })
- elem.html(div.html());
- elem.removeAttr("step-form");
- $compile(elem.contents())(scope);
- defer.resolve();
- } else {
- $log.error
- return $q.reject(response.data);
- }
- }, function errorCallback(response) {
- // called asynchronously if an error occurs
- // or server returns response with an error status.
- $log.error("reponse data is not a valid JSON object");
- defer.resolve();
- });
- //}
- return defer.promise;
- };
-
- return factory;
- };
-
- stepFormFactory.$inject = ['$http', '$compile', '$q'];
-
- appDS2.factory('stepFormFactory', stepFormFactory);
-
-}())
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-sample-page/droolsService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-sample-page/droolsService.js
deleted file mode 100644
index 90c3d00d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/ds2-sample-page/droolsService.js
+++ /dev/null
@@ -1,53 +0,0 @@
-appDS2.factory('DroolsService', function ($http, $q) {
- return {
- getDroolsList: function() {
- return $http.get('getDrools')
- .then(function(response) {
- console.log(response);
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getDroolDetails: function(selectedFile) {
- return $http.get('getDroolDetails'+'?selectedFile=' + selectedFile )
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- executeDrools:function(droolsData) {
- return $http({
- method: "POST",
- url: "post_drools/execute",
- data:droolsData
- }).then(function(response) {
- console.log(response);
- if (response.status == 200) {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- return response.data;
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/headerServiceDS2.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/headerServiceDS2.js
deleted file mode 100644
index c9134f62..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/headerServiceDS2.js
+++ /dev/null
@@ -1,17 +0,0 @@
-appDS2.factory('HeaderServiceDS2', function ($http,$log, $q) {
- return {
- getMenu: function() {
- return $http.get('get_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/leftMenuServiceDS2.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/leftMenuServiceDS2.js
deleted file mode 100644
index 61346c84..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/leftMenuServiceDS2.js
+++ /dev/null
@@ -1,97 +0,0 @@
-function isRealValue(obj){
- return obj && obj !== "null" && obj!== "undefined";
-}
-appDS2.factory('LeftMenuServiceDS2', function ($http,$log, $q) {
- return {
- getLeftMenu: function() {
- return $http.get('get_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- getAppName: function() {
- return $http.get('get_app_name')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
-
- };
-});
-
-/* check if the body height has changed */
-function onElementHeightChange(elm, callback){
- if (!elm) {
- console.log('onElementHeightChange: null element!');
- return;
- }
- var lastHeight = elm.clientHeight, newHeight;
- (function run(){
- newHeight = elm.clientHeight;
- if( lastHeight != newHeight )
- callback();
- lastHeight = newHeight;
-
- if( elm.onElementHeightChangeTimer )
- clearTimeout(elm.onElementHeightChangeTimer);
- elm.onElementHeightChangeTimer = setTimeout(run, 200);
- })();
-}
-
-/*adjust height of left menu*/
-function adjustLeftMenuHeight() {
-
- try{
- var footerTop = $('.footer-container').offset().top;
- var scrollTop = $(window).scrollTop();
- $(".menu-container").css({
- "height" : footerTop- scrollTop,
- });
- }catch(err){
- console.log('adjustLeftMenuHeight failed', err)
- }
-}
-/* adjust left menu height on scroll */
-window.onscroll = function (e) {
- adjustLeftMenuHeight();
-}
-
-/* adjust left menu height on page load */
-$(function() {
- adjustLeftMenuHeight();
-});
-
-
-onElementHeightChange(document.body, function(){
- adjustLeftMenuHeight();
-});
-
-function getCookie(cname) {
- var name = cname + "=";
- var decodedCookie = decodeURIComponent(document.cookie);
- var ca = decodedCookie.split(';');
- for(var i = 0; i <ca.length; i++) {
- var c = ca[i];
- while (c.charAt(0) == ' ') {
- c = c.substring(1);
- }
- if (c.indexOf(name) == 0) {
- return c.substring(name.length, c.length);
- }
- }
- return "";
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/manifestService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/manifestService.js
deleted file mode 100644
index 27e3a6ec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/manifestService.js
+++ /dev/null
@@ -1,24 +0,0 @@
-appDS2.factory('ManifestService', function ($http, $q, $log) {
- return {
- // Gets and returns the manifest for the webapp.
- getManifest: function() {
- // cache control for IE
- var cc = "?cc=" + new Date().getTime().toString();
- return $http({
- method: 'GET',
- url: 'manifest' + cc,
- cache: false,
- responseType: 'json'})
- .then(function(response) {
- // $log.debug("ManifestService.getManifest: " + JSON.stringify(response));
- if (response.data == null || typeof response.data != 'object')
- return $q.reject('ManifestService.getManifest: response.data null or not object');
- else
- return response.data;
- }, function(error) {
- $log.error('ManifestService.getManifest failed: ' + error.data);
- return $q.reject(error.data);
- });
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js
deleted file mode 100644
index cb85ffce..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalService.js
+++ /dev/null
@@ -1,57 +0,0 @@
-
-angular.module("template/modalsAndAlerts/window2.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/modalsAndAlerts/window.html",
- "<div class=\"modalwrapper active {{windowClass}}\" ng-class=\"{'modal-landscape': isModalLandscape}\" role=\"dialog\" tabindex=\"-1\" aria-labelledby=\"{{title}}\" aria-describedby=\"{{content}}\">\n" +
- " <div class=\"modal fade {{sizeClass}}\">sdfdsfsfd</div>\n" +
- "</div>");
- }]);
-
-angular.module('ddh.att.modalsAndAlerts')
-
-.controller('modalsAndAlertsController', function ($scope, $modal, $log) {
- $scope.name='eeee';
- $scope.items = ['item1', 'item2', 'item3'];
- $scope.dt = new Date("March 10, 2014 00:00:00");
- $scope.helperText = "The date you selected is $date. Double tap to open calendar. Select a date to close the calendar.";
- $scope.open = function (event) {
- var modalInstance = $modal.open({
- templateUrl: 'template/modalsAndAlerts/modal-demo.html',
- controller: ModalInstanceCtrl,
- sizeClass: 'modal-long-adjust',
- resolve: {
- items: function () {
- return $scope.items;
- }
- }
- });
-
- modalInstance.result.then(function (selectedItem) {
- $scope.selected = selectedItem;
- event.target.focus();
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- event.target.focus();
- });
- };
- $scope.ok = function () {
- //add the ok functionality
- console.log("ok");
- };
- $scope.cancel = function () {
- //add the cancel functionality
- console.log("cancel");
- };
-})
-
-var ModalInstanceCtrl = function ($scope, $modalInstance, items) {
- $scope.items = items;
- $scope.selected = {
- item: $scope.items[0]
- };
- $scope.ok = function () {
- $modalInstance.close($scope.selected.item);
- };
- $scope.cancel = function () {
- $modalInstance.dismiss('cancel');
- };
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalServiceDS2.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalServiceDS2.js
deleted file mode 100644
index d3cd8737..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/modalServiceDS2.js
+++ /dev/null
@@ -1,31 +0,0 @@
-angular.module("modalServicesDS2",[]).service('modalService', ['$modal', function ($modal) {
-
- this.popupConfirmWinWithCancel = function(title, msgBody, callback,dismissCallback){
- debugger;
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_informativeDS2.html',
- //controller: 'modalpopupControllerDS2',
- //size: 'sm',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- var args = Array.prototype.slice.call( arguments, 0 );
- args.splice( 0, 3);
- modalInstance.result.then(function(){
- callback.apply(null, args);
- }, function() {
- dismissCallback();
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
-
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/profileServiceDS2.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/profileServiceDS2.js
deleted file mode 100644
index 812e8320..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/profileServiceDS2.js
+++ /dev/null
@@ -1,93 +0,0 @@
-appDS2.factory('ProfileServiceDS2', function ($http, $q) {
- return {
- getProfile: function() {
- return $http.get('get_user')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getProfilePagination: function(pageNum,viewPerPage) {
- return $http.get('get_user_pagination?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getPostProfile: function() {
- return $http.get('post_search_sample')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getProfileDetail: function(profileId) {
- return $http.get('get_profile?profile_id='+profileId)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getSelfProfileDetail: function() {
- return $http.get('get_self_profile')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- toggleProfileStatus: function(id) {
- return $http.get('profile/toggleProfileActive?profile_id=' + id)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
-
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/sampleService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/sampleService.js
deleted file mode 100644
index d762dc9c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/sampleService.js
+++ /dev/null
@@ -1,19 +0,0 @@
-appDS2.factory('SampleService', function ($http, $q) {
- return {
- getCollaborateList: function() {
- return $http.get('get_collaborate_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- }
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/userInfoServiceDS2.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/userInfoServiceDS2.js
deleted file mode 100644
index cfb12dd5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-services/userInfoServiceDS2.js
+++ /dev/null
@@ -1,32 +0,0 @@
-appDS2.factory('UserInfoServiceDS2', function ($http, $q,$log) {
- return {
- getFunctionalMenuStaticDetailShareContext: function(contextId,key) {
- var deferred = $q.defer();
- $http({
- method: "GET",
- url: "get_userinfo",
- }).success( function(res) {
- if(res==null || res=='')
- $log.error('userInfoServiceDs2: failed to get user info');
- deferred.resolve(res);
- }).error( function(status) {
- deferred.reject(status);
- });
- return deferred.promise;
- },
- getFunctionalMenuStaticDetailSession: function() {
- var deferred = $q.defer();
- $http({
- method: "GET",
- url: "get_topMenuInfo",
- }).success(function(res) {
- if(res==null || res=='')
- $log.error('userInfoServiceDs2: failed to get top menu info');
- deferred.resolve(res);
- }).error( function(status) {
- deferred.reject(status);
- });
- return deferred.promise;
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-landing.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-landing.html
deleted file mode 100644
index b3526e32..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-landing.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<!DOCTYPE html>
-<!-- Single-page application for EPSDK-App workflow page using DS2 look and feel -->
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Workflow</title>
-
- <!-- Common items -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
-
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
-
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
-
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
-
- <!-- Page specific items -->
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/ds2-workflows/workflowRouting.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/ds2-workflows/workflowController.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/ds2-workflows/workflowApp.js"></script>
-
- <!-- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" />
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/workflows/workflows.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/workflows/bs-workflow.css" >
- -->
-</head>
- <body class="appBody" ng-app="abs">
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-listing.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-listing.html
deleted file mode 100644
index 452dcafa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-listing.html
+++ /dev/null
@@ -1,65 +0,0 @@
-
-<div id="page-content" style=" width: 100%;" >
- <br/>
- <div >
- <h1 class="heading-page">Workflow</h1>
- <button type="submit" ng-click="createWorkflow('md')" class="btn btn-alt btn-small" >Create Workflow</button>
- </div>
- <div>
- <form>
- <div class="form-group" align="right">
- <input type="text" ng-model="search" placeholder = "Search Workflows"/>
- </div>
- </form>
- </div>
-
-
-
-
-<div>
-<table class="striped" table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
- <thead >
- <tr class="info">
- <th >Id</th>
- <th>Name</th>
- <th>Key</th>
- <th>Description</th>
- <th>Workflow Server URL</th>
- <!-- <th>Suspend Link</th> -->
- <th>View</th>
- <th>Active</th>
- <th>Created </th>
- <th>Created By</th>
- <th>Action</th>
- <th>Schedule</th>
- <th>Edit</th>
- <th>Delete?</th>
-
-
- </tr>
- </thead>
-
-
- <tbody type="body" ng-repeat="workflow in workflows | filter: search">
- <tr>
- <td>{{workflow.id}}</td>
- <td>{{workflow.name}}</td>
- <td>{{workflow.workflowKey}}</td>
- <td>{{workflow.description}}</td>
- <td>{{workflow.runLink}}</td>
- <td><div ng-click="previewWorkflow(workflow,'lg');" style="font-size:20px;"><a href="javascript:void(0)" class=" icon-people-preview"></a></div></td>
- <!-- <td>{{workflow.suspendLink}}</td> -->
- <td >{{workflow.active}}</td>
- <td>{{workflow.created}}</td>
- <td>{{workflow.createdBy}}</td>
- <td><div ng-show="workflow.active ==='false'" ng-click="activateWorkflow(workflow)" style="font-size:20px;"><a href="javascript:void(0)" class="icon-controls-playalt"></a></div>
- <div ng-show="workflow.active ==='true'" ng-click="suspendWorkflow(workflow)" style="font-size:20px;"><a href="javascript:void(0)" class="icon-controls-pauseL"></a></div></td>
- <td><div ng-click="scheduleWorkflow(workflow);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-misc-time"></a></div></td>
- <td><div ng-click="updateWorkflow(workflow);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-misc-pen"></a></div></td>
- <td><div ng-click="removeWorkflow(workflow);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-misc-trash"></a></div></td>
- </tr>
- </tbody>
-</table>
-</div>
-
- </div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-new.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-new.html
deleted file mode 100644
index 9daebd07..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-new.html
+++ /dev/null
@@ -1,110 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Create Workflows</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in">
- <form name="workflowForm" class="css-form" novalidate>
- <div class="form-row input-emphasized-field">
- <label for="textinputID1">Name *: </label>
-
- <div class="field-group">
- <input type="text" id="textinputID-2a" ddh-reset ng-model="workflow.name" class="span12 input-emphasized"
- name="workflowName" required="required" placeholder="Workflow Name" />
-
- <div ng-show="workflowForm.$submitted || workflowForm.workflowName.$touched">
- <span ng-show="workflowForm.workflowName.$error.required">Workflow Name is required !!!</span>
- </div>
-
- </div>
- </div>
-
-
- <div class="form-row input-emphasized-field">
- <label for="textinputID1">Key*: </label>
- <div class="field-group">
- <input type="text" id="textinputID-2a" ddh-reset ng-model="workflow.workflowKey" class="span12 input-emphasized"
- name="workflowKey" required="required" placeholder="Workflow Key" />
-
- <div ng-show="workflowForm.$submitted || workflowForm.workflowKey.$touched">
- <span ng-show="workflowForm.workflowKey.$error.required">Workflow Key is required !!!</span>
- </div>
-
- </div>
- </div>
-
-
- <div class="form-row input-emphasized-field">
- <label for="textinputID1">Description: </label>
-
- <div class="field-group">
- <input type="text" ng-model="workflow.description" id = "textinputID-2a" ddh-reset name="workflowDescription" class="span12 input-emphasized" placeholder="Brief Description"/>
- </div>
- </div>
-
- <div class="form-row input-emphasized-field">
- <label for="textinputID1">Workflow Server URL*</label>
- <div class="field-group">
- <input type = "url" ng-model = "workflow.runLink" id = "workflowRunLink" ddh-reset name = "workflowRunLink" required = "required" class="span12 input-emphasized"/>
- </div>
-
- <div ng-show="workflowForm.$submitted || workflowForm.workflowRunLink.$touched">
- <span ng-show="workflowForm.workflowRunLink.$error.required">Run Link is required !!!</span>
- <span class="error" ng-show="workflowForm.workflowRunLink.$error.url">Not valid url!</span>
- </div>
-
- </div>
-
- <!-- <div class="control-group">
- <label class="fn-ebz-text large" for="workflowSuspendLink">Suspend Link*</label>
- <div class="controls">
- <input type = "url" ng-model = "workflow.suspendLink" id = "workflowSuspendLink" name = "workflowSuspendLink" required = "required" class="fn-ebz-text extra-large"/>
- </div>
-
- <div ng-show="workflowForm.$submitted || workflowForm.workflowSuspendLink.$touched">
- <span ng-show="workflowForm.workflowSuspendLink.$error.required">Suspend Link is required !!!</span>
- <span class="error" ng-show="workflowForm.workflowSuspendLink.$error.url">Not valid url!</span>
- </div>
- </div> -->
-
- <div class="form-row" role="radio">
- <fieldset role="radiogroup" radio-group-accessibility aria-labelledby="radiolabel1">
- <label for="optionsRadios1111" class="radio">
- <!-- <input type = "text" ng-model = "workflow.active" id="workflowActive" name="workflowActive" class="fn-ebz-text extra-large"/> -->
- <input type="radio" ng-model="workflow.active" id="optionsRadios1111" name="optionsRadio11" value="true" required="">
- <i class="skin"></i>
- <span>Active</span>
- </label>
- </div>
- <div class="form-row" role="radio">
- <label for="optionsRadios2222" class="radio">
- <input type="radio" ng-model ="workflow.active" id="optionsRadios2222" name="optionsRadio11" value="false">
- <i class="skin"></i>
- <span>Inactive</span>
- </label>
- <!-- </div>
- <input type="radio" ng-model="workflow.active" value="true">Active
- <input type="radio" ng-model="workflow.active" value="false">Inactive
-
-
- </div> -->
- </div>
- </fieldset>
- </div>
-
-
-
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small"" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-medium" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-preview.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-preview.html
deleted file mode 100644
index 0fb1ffa2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-preview.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">View Workflow</h3>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" >
- <form name="workflowForm" class="css-form" novalidate>
-
- <div style="overflow:scroll">
- <img ng-src="{{workflowToPreview.runLink}}/engine-rest/process-definition/key/{{workflowToPreview.workflowKey}}/diagram">
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-medium" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-remove.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-remove.html
deleted file mode 100644
index a355c07e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-remove.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div style=" height: 276px;">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Remove Workflow</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">Workflow "{{workflowToRemove.name}}" is going to be removed. Do you want to continue</label>
- </div>
-
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-medium" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-schedule.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-schedule.html
deleted file mode 100644
index b939a598..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/DS2-workflows-page/workflow-schedule.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Workflow: {{workflowToSchedule.name}}</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
-
- </div>
- <table style="width:60%; margin-bottom: -21px">
- <tr><td>Workflow Key:</td> <td>{{workflowToSchedule.workflowKey}}</td></tr>
- <tr><td>Workflow Description:</td> <td>{{workflowToSchedule.description}}</td></tr>
- </table>
-
-
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="padding:0px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <table>
- <tr>
- <form name="myForm">
- <td>
- <label for="singleSelect"> Recurrence: </label>
- </td>
- <td style="padding-top: 0px;padding-bottom: 0px;">
- <div class="span12">
- <div class="form-row">
- <select name="dropdown1" b2b-dropdown ng-model="selectRecurrenceOpt">
- <option b2b-dropdown-list option-repeat="d in recurrenceOptions" value="{{d.value}}" init-value="{{selectRecurrenceOpt.title}}">{{d.title}}</option>
- </select>
- </div>
- </div>
-
- <br>
- </td>
- <td> </td>
- </form>
- </tr>
-<tr>
-<td>
-
-</td>
-<td>
-Pick a date:
-</td>
-<td>
-Hour:
-</td>
-<td>
-Minute:
-</td>
-</tr>
- <tr>
- <td>
- <form name="FirstScheduleForm">
- <label for="dateSelect"> First Schedule: </label>
- </form>
- </td>
- <td >
- <!--DATEPICKER POPUP-->
- <input class="span12" id="datepicker1" type="text" style="overflow-y:scroll;" ng-model="dt" b2b-datepicker >
- </td>
- <td>
- <div class="span12">
- <div class="form-row">
- <select name="dropdown1" b2b-dropdown ng-model="selectFirstHour">
- <option b2b-dropdown-list option-repeat="d in hours" value="{{d.value}}" init-value="{{selectFirstHour.title}}" placeholder="Select an Option">{{d.title}}</option>
- </select>
- </div>
- </div>
- </td>
- <td>
- <div class="span12">
- <div class="form-row">
- <select name="dropdown1" b2b-dropdown ng-model="selectFirstMinute">
- <option b2b-dropdown-list option-repeat="d in minutes" value="{{d.value}}" init-value="{{selectFirstMinute.title}}" placeholder="Select an Option">{{d.title}}</option>
- </select>
- </div>
- </div>
- </td>
-</tr>
-<tr >
- <td>
- <form name="LastScheduleForm">
- <label for="dateSelect"> Last Schedule: </label>
- </form>
- </td>
- <td>
- <div >
- <input class="span12" id="datepicker2" type="text" ng-model="dt2" b2b-datepicker>
- </div>
- </td>
- <td>
- <div class="span12">
- <div class="form-row">
- <select name="dropdown1" b2b-dropdown ng-model="selectLastHour">
- <option b2b-dropdown-list option-repeat="d in hours" value="{{d.value}}" init-value="{{selectLastHour.title}}" placeholder="Select an Option">{{d.title}}</option>
- </select>
- </div>
- </div>
- </td>
- <td>
- <div class="span12">
- <div class="form-row">
- <select name="dropdown1" b2b-dropdown ng-model="selectLastMinute">
- <option b2b-dropdown-list option-repeat="d in minutes" value="{{d.value}}" init-value="{{selectLastMinute.title}}" placeholder="Select an Option">{{d.title}}</option>
- </select>
- </div>
- </div>
- </td>
- :
-
- </tr>
-<tr>
-
-</tr>
-
-</table>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-medium" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
-
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/b2b-leftnav-ext.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/b2b-leftnav-ext.html
deleted file mode 100644
index 5337fd24..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/b2b-leftnav-ext.html
+++ /dev/null
@@ -1,50 +0,0 @@
-<div class="b2b-nav-menu" id="left-menu-main-div"
- ng-class="leftMenuClass">
- <div class="b2b-subnav-container" id="left-menu-subnav-container">
- <ul class="b2b-subnav-content" id="left-menu-subnav-content">
- <li id="b2b-subnav-content-li">
- <div ng-class="leftMenuArrowClass" id="left-menu-arrow-toggle-div">
- <a ng-click="toggleDrawer(showmenu);" class="text-right"
- id="left-menu-arrow-toggle-anchor"> <i
- ng-class="{true: 'icon-controls-left', false: 'icon-controls-right'}[showmenu]"
- id="left-menuf-arrow-toggle-icon">&nbsp;</i>
- </a>
- </div>
- </li>
- <li ng-repeat="menu in menuData"
- ng-click="toggleNav($index,menu.href,showmenu)"
- id="left-menu-li-{{menu.name.split(' ').join('-')}}"><span
- ng-class="{true: 'menu-icon', false: 'menu-icon-collapse'}[showmenu]"
- id="left-menu-span-{{menu.name.split(' ').join('-')}}"> <span
- class="{{menu.imageSrc}}"
- id="icon-image-{{menu.name.split(' ').join('-')}}"></span>&nbsp;&nbsp;
- </span> <a ng-class="{expand: isOpen($index)}"
- id="parent-item-{{menu.name.split(' ').join('-')}}" ng-if="showmenu"
- aria-label="{{menu.name}}" title="{{menu.name}}"
- aria-expanded="{{(idx==$index)?true:false;}}"
- href="javascript:void(0);"> {{menu.name}} <i aria-hidden="true"
- ng-if="(menu.menuItems.length > 0)"
- class="b2b-icon-primary-plus-minus"
- ng-class="idx==$index ? 'icon-primary-expanded' : 'icon-primary-collapsed'"></i>
- </a>
- <div role="region" aria-hidden="{{(isOpen($index))?false:true;}}"
- id="left-menu-child-div-{{menu.name.split(' ').join('-')}}">
- <div class="left-menu-child">
- <ul ng-class="{expand: idx==$index}"
- id="left-menu-child-ul-{{menu.name.split(' ').join('-')}}">
- <li ng-repeat="menuItem in menu.menuItems"
- ng-click="liveLink($event, $index, $parent.$index)"
- id="left-menu-child-li-{{menuItem.name.split(' ').join('-')}}-{{menu.name.split(' ').join('-')}}">
- <a aria-hidden="{{!(idx==$parent.$index)}}"
- aria-label="{{menuItem.name}}" title="{{menuItem.name}}"
- id="child-item-{{menuItem.name.split(' ').join('-')}}"
- href="{{menuItem.href}}"
- tabindex="{{(idx==$parent.$index)?0:-1;}}"
- ng-class="{active: itemIdx==$index && navIdx==$parent.$index}">{{menuItem.name}}</a>
- </li>
- </ul>
- </div>
- </div></li>
- </ul>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-content.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-content.html
deleted file mode 100644
index 23d138eb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-content.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<div id="page-content" class="content">
- <div>
- <h2>Bootstrap Sample Page</h2>
-
- <!-- dropdown sample -->
- <h3>Bootstrap Dropdowns</h3>
- <div class="dropdown">
- <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
- Dropdown
- <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
- <li><a href="#">Action</a></li>
- <li><a href="#">Another action</a></li>
- <li><a href="#">Something else here</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="#">Separated link</a></li>
- </ul>
- </div>
-
-
- <!-- Button group -->
- <h3>Bootstrap Button Group</h3>
- <div class="btn-group" role="group" aria-label="...">
- <button type="button" class="btn btn-default">Left</button>
- <button type="button" class="btn btn-default">Middle</button>
- <button type="button" class="btn btn-default">Right</button>
- </div>
-
- <!-- Single button dropdowns -->
- <h3>Single Button Dropdowns</h3>
- <div class="btn-group">
- <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- Action <span class="caret"></span>
- </button>
- <ul class="dropdown-menu">
- <li><a href="#">Action</a></li>
- <li><a href="#">Another action</a></li>
- <li><a href="#">Something else here</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="#">Separated link</a></li>
- </ul>
- </div>
-
- <!-- Table -->
- <h3>Table Sample</h3>
- <div class="panel panel-default">
- <!-- Default panel contents -->
- <div class="panel-heading">Table heading</div>
- <div class="panel-body">
- <p>Table description </p>
- </div>
-
- <!-- Table -->
- <table class="table">
- <thead>
- <tr>
- <th>#</th>
- <th>First Name</th>
- <th>Last Name</th>
- <th>Username</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <th scope="row">1</th>
- <td>Mark</td> <td>Otto</td>
- <td>@mdo</td>
- </tr>
- <tr>
- <th scope="row">2</th>
- <td>Jacob</td>
- <td>Thornton</td>
- <td>@fat</td>
- </tr>
- <tr>
- <th scope="row">3</th>
- <td>Larry</td>
- <td>the Bird</td>
- <td>@twitter</td>
- </tr>
- </tbody>
- </table>
- </div>
-
-
- <!-- Checkboxes and radio addons -->
- <h3>Checkboxes and radio addons</h3>
- <p>In order to make bootstrap checkbox and radio button appear, please make sure b2b-bootstrap-common.css in app/fusion/external/ds2-bootstrap directory is included in the main HTML page.</p>
-
- <p>checkbox</p>
- <div class="form-check">
- <label class="form-check-label">
- <input type="checkbox" class="form-check-input">
- Y/N
- </label>
- </div>
-
- <div>
- <p>radio button</p>
- <div class="radio">
- <label><input type="radio" name="optradio">Option 1</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Option 2</label>
- </div>
- <div class="radio disabled">
- <label><input type="radio" name="optradio" disabled>Option 3 (disabled)</label>
- </div>
- </div>
-
- <div class="row">
- <div class="col-lg-6">
- <div class="input-group"> <span class="input-group-addon"> <input type="checkbox" aria-label="Checkbox for following text input"> </span> <input class="form-control" aria-label="Text input with checkbox"> </div>
- </div>
- <div class="col-lg-6">
- <div class="input-group"> <span class="input-group-addon"> <input type="radio" aria-label="Radio button for following text input"> </span> <input class="form-control" aria-label="Text input with radio button"> </div>
- </div>
- </div>
-
- <h3>Available variations</h3>
- <div>
- <span class="label label-default">Default</span>
- <span class="label label-primary">Primary</span>
- <span class="label label-success">Success</span>
- <span class="label label-info">Info</span>
- <span class="label label-warning">Warning</span>
- <span class="label label-danger">Danger</span>
- </div>
-
- <h3>Checkbox</h3>
- <div class="checkbox">
- <label>
- <input type="checkbox" value="">
- Option one is this and that&mdash;be sure to include why it's great
- </label>
- </div>
- <div class="checkbox disabled">
- <label>
- <input type="checkbox" value="" disabled>
- Option two is disabled
- </label>
- </div>
-
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-page.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-page.html
deleted file mode 100644
index 779b2c5f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/bootstrap-sample-page.html
+++ /dev/null
@@ -1,146 +0,0 @@
-<!DOCTYPE html>
-<!-- Single-page application for EPSDK-App welcome page using DS2 look and feel. X-->
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Welcome</title>
-
- <!-- B2b Library -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" />
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/welcome.css" />
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/bootstrap-3.3.7/css/bootstrap.min.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2-bootstrap/b2b-bootstrap-common.css">
- <!-- Common scripts -->
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <!-- EPSDK App scripts and common services -->
- <!-- B2b Library -->
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <script src= "app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
-
- <!-- Page specific items -->
- <script src="app/fusion/scripts/DS2-controllers/bootstrap-sample-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/bootstrap-sample-route.js"></script>
- <script src="app/fusion/external/bootstrap-3.3.7/js/bootstrap.min.js"></script>
-
-<style>
-.controls {
- margin-bottom: 20px;
-}
-.page-header {
- margin-top: 20px;
-}
-ul {
- list-style: none;
-}
-.box {
- height: 100%;
- border: 1px solid #ccc;
- background-color: #fff;
- position: relative;
- overflow: hidden;
-}
-.box-header {
- background-color: #eee;
- padding: 0px 0px 0px 0px;
-/* border-bottom: 1px solid #ccc; */
- margin-bottom: -25px;
- cursor: move;
- position: relative;
-}
-.box-header h3 {
- margin-top: 0px;
- display: inline-block;
-}
-.box-content {
- padding: 10px;
- display:block;
- height: 100%;
- position: relative;
- overflow-x:auto;
- overflow-y:auto;
-}
-.box-header-btns {
- top: 15px;
- right: 10px;
- cursor: pointer;
- position: absolute;
-}
-
-.gridster {
- border: none;
- position:relative;
-}
-
-.box-content .box-content-frame{
-}
-
-.box table{
-border:none;
-display:block;
-}
-
-.box table tr{
-line-height:20px;
-}
-
-.box table th{
-border:none;
-line-height:20px;
-}
-
-.menu-container{
-margin-top:0px
-}
-
-.handle-e {
-width:3px;
-}
-
-
-
-</style>
-
-</head>
- <body class="appBody" ng-app="abs">
- <!-- commented the header for now to avoid duplicate headers on portal -->
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container"></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin-menu-edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin-menu-edit.html
deleted file mode 100644
index 913b10ed..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin-menu-edit.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<div id="page-content">
- <div>
- <h1 class="heading-page" id="AdminMenuItems">Admin Menu Items</h1>
- </div>
- <div>
- <button type="submit" ng-click="addNewFnMenuItemModalPopup();" class="btn btn-alt btn-small" style="position: initial;">Add Menu Item</button>
- </div>
-
- <h3 class="heading-small">
- Existing menu items
- </h3>
-
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img" aria-label="Please wait while we load your content"></i>
- </div>
-
- <div ng-hide="showLoader">
- <table>
- <thead>
- <tr>
- <th sortable="true" key="id" default-sort="a">Menu ID</th>
- <th sortable="true" key="label">Label</th>
- <th sortable="true" key="ParentId">ParentId</th>
- <th sortable="true" key="sortOrder">Sort Order</th>
- <th sortable="true" key="action">Action</th>
- <th sortable="true" key="functionCd">Function</th>
- <th sortable="true" key="active">Active</th>
- <th sortable="true" key="servlet">Servlet</th>
- <th sortable="true" key="queryString">Query String</th>
- <th sortable="true" key="externalUrl">External URL</th>
- <th sortable="true" key="target">Target</th>
- <th sortable="true" key="menuSetCode">Menu Set Code</th>
- <th sortable="true" key="separator">Separator</th>
- <th sortable="true" key="imageSrc">Image Source</th>
- <th sortable="false" key="edit">Edit</th>
- <th sortable="false" key="delete">Delete</th>
- </tr>
- </thead>
- <tbody ng-repeat="fnMenuItem in tableFnMenuItems" >
- <tr>
- <td ng-bind="fnMenuItem.id"></td>
- <td ng-bind="fnMenuItem.label"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.parentId"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.sortOrder"></td>
- <td ng-bind="fnMenuItem.action"></td>
- <td ng-bind="fnMenuItem.functionCd"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.active ? 'Y' : 'N'"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.servlet"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.queryString"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.externalUrl"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.target"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.menuSetCode"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.separator ? 'Y' : 'N'"></td>
- <td style="word-break: break-all;" ng-bind="fnMenuItem.imageSrc"></td>
- <td >
- <div ng-click="editMenuItemModalPopup(fnMenuItem);"
- style="font-size: 20px;"><a href="javascript:void(0)" class="icon-misc-pen"></a>
- </div>
- </td>
- <td>
- <div ng-click="removeMenuItem(fnMenuItem);"><a href="javascript:void(0)" class="icon-misc-trash"></a>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
-
- <div class="well" style="padding-bottom: 35px;">
- <div class="row ddh-page short">
- <div b2b-pagination="" total-pages="totalPages1"
- current-page="currentPage1" click-handler="customHandler1"
- role="navigation" aria-label="Customer Data Pages"></div>
- </div>
-
- <!-- <div class="row span10 offset1">
- <div class="span6">
- <div class="form-row">
- <label for="totalPages1">Total Pages:</label>
- <div class="field-group">
- <input id="totalPages1" type="number" class="span12"
- only-digits="" name="totalPages1" ng-model="totalPages1"
- title="Total Pages {{totalPages1}}"style="pointer-events: none;">
- </div>
- </div>
- </div>
- <div class="span6 font-clearview">
- <div class="form-row">
- <label for="currentPage1">Current Page:</label>
- <div class="field-group">
- <input id="currentPage1" type="number" class="span12"
- only-digits="" name="currentPage1" ng-model="currentPage1"
- title="Current Page {{currentPage1}}">
- </div>
- </div>
- </div>
- </div> -->
- </div>
- </div>
-
-</div>
-
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin.html
deleted file mode 100644
index ecab06a0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!-- Single-page application for EPSDK-App admin pages using DS2 look and feel -->
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Admin</title>
-
- <!-- B2b Library -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
-
-
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <!-- Common scripts -->
- <script src="app/fusion/external/angular-1.4.8/angular.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
-
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <!-- B2b Library -->
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <!-- Page-specific items -->
- <script src="app/fusion/scripts/DS2-controllers/admin-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/admin-route.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/admin-menu-edit.js"></script>
- <script src="app/fusion/scripts/DS2-services/adminService.js"></script>
- <script src="app/fusion/scripts/DS2-services/adminMenuService.js"></script>
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/usage-list-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/fn-menu-add-popup-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/collaborate-list-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/admin-closed-cloop.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/admin-whitelist.js"></script>
-
-</head>
- <body class="appBody" ng-app="abs">
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin_closed_loop.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin_closed_loop.html
deleted file mode 100644
index 4f65e7b3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/admin_closed_loop.html
+++ /dev/null
@@ -1,17 +0,0 @@
-<div style=" margin-right:50px;" id="fnMenueContent">
- <div id="page-content" class="pageTitle" align="left">
-
- <h1 class="heading1" style="margin-top:20px;">Closed Loop</h1>
- <br/>
- <br>
- </div>
- <div id="page-content" style="margin-right: 20px;text-align: justify;text-align-last:auto;">
- Cloop Server
- </div>
- <br>
- <div id="hiddenCamundaDiv" style="width:500px;"></div>
- <br>
- <iframe id="camundaFrame" style=" margin-left: 250px;"
- ng-src="{{camunda_cockpit_url}}"
- width="100%" height="500"></iframe>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html
deleted file mode 100644
index 05c316c8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaborate-list.html
+++ /dev/null
@@ -1,76 +0,0 @@
-
-<div id="page-content">
- <div>
- <div align="right">
- <a href="JavaScript:void(0);" style= "color:#00547A" onClick="downloadScreenCaptureExtenstion()" id="install-button" >
- Please download the extension for ScreenCapture and refresh page</a>
- </div>
- <div>
- <h1 class="heading-page">User List</h1>
- </div>
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img" aria-label="Please wait while we load your content"></i>
- </div>
- <div>
-
- <table class="striped" table-data="tableCollbItems">
-
- <thead>
- <tr>
- <th key="id">User ID</th>
- <th key="lastName">Last Name</th>
- <th key="firstName">First Name</th>
- <th key="email">Email</th>
- <th key="orgUserId">Organization User ID</th>
- <th key="online">Online/Offline</th>
- </tr>
-
- </thead>
- <tbody type="body" ng-repeat="rowData in tableCollbItems">
- <tr>
- <td ng-bind="rowData['id']">{{rowData.id}}</td>
- <td ng-bind="rowData['lastName']">{{rowData.lastName}}</td>
- <td ng-bind="rowData['firstName']">{{rowData.firstName}}</td>
- <td ng-bind="rowData['email']">{{rowData.email}}</td>
- <td ng-bind="rowData['orgUserId']">{{rowData.loginId}}</td>
- <td>
- <div ng-hide="rowData.online" ng-click="rowData.isActive=true;openCollaboration(rowData.chatId)"><span class="icon-misc-lightsoff" ></span>Offline</div>
- <div ng-show="rowData.online"ng-click="rowData.isActive=false;openCollaboration(rowData.chatId)"><span class="icon-misc-bulb" ></span>Online</div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div class="well" style="padding-bottom: 35px;">
- <div class="row">
- <div b2b-pagination="" total-pages="totalPages1"
- current-page="currentPage1" click-handler="customHandler1"
- role="navigation" aria-label="Customer Data Pages"></div>
- </div>
-
- <!-- <div class="row span10 offset1">
- <div class="span6">
- <div class="form-row">
- <label for="totalPages1">Total Pages:</label>
- <div class="field-group">
- <input id="totalPages1" type="number" class="span12"
- only-digits="" name="totalPages1" ng-model="totalPages1"
- title="Total Pages {{totalPages1}}"style="pointer-events: none;">
- </div>
- </div>
- </div>
- <div class="span6 font-clearview">
- <div class="form-row">
- <label for="currentPage1">Current Page:</label>
- <div class="field-group">
- <input id="currentPage1" type="number" class="span12"
- only-digits="" name="currentPage1" ng-model="currentPage1"
- title="Current Page {{currentPage1}}">
- </div>
- </div>
- </div>
- </div> -->
- </div>
- </div>
-<div id="peerBroadcastSection"></div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaboration.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaboration.html
deleted file mode 100644
index cca54a6b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/collaboration.html
+++ /dev/null
@@ -1,182 +0,0 @@
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <style type="text/css">
- /*
- * NOTE: All CSS is purely cosmetic - it does not affect functionality
- * http://layout.jquery-dev.com/demos.cfm
- */
-
- /* customize borders to avoid double-borders around inner-layouts */
- .ui-layout-pane {
- border: 0; /* override layout-default-latest.css */
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
- }
- .ui-layout-pane-north ,
- .ui-layout-pane-south {
- border: 1px solid #BBB;
- overflow: auto;
- }
- .ui-layout-pane-west ,
- .ui-layout-pane-east {
- }
- .ui-layout-pane-center {
- border-left: 0;
- border-right: 0;
- }
- .inner-center {
- border: 1px solid #BBB;
- }
-
- /* add shading to outer sidebar-panes */
- .outer-west ,
- .outer-east {
- background-color: #EEE;
- }
- .middle-west ,
- .middle-east {
- background-color: #F8F8F8;
- }
-
- /* remove padding & scrolling from panes that are 'containers' for nested layouts */
- .outer-center ,
- .middle-center {
- border: 0; /* cosmetic */
- padding: 0;
- overflow: auto;
- }
-
- /*
- * customize borders on panes/resizers to make pretty
- */
- .ui-layout-pane-west { border-right: 0; }
- .ui-layout-resizer-west { border-left: 1px solid #BBB; }
- .ui-layout-pane-east { border-left: 0; }
- .ui-layout-resizer-east { border-right: 1px solid #BBB; }
- .ui-layout-pane-north { border-bottom: 0; }
- .ui-layout-resizer-north { border-top: 1px solid #BBB; }
- .ui-layout-pane-south { border-top: 0; }
- .ui-layout-resizer-south { border-bottom: 1px solid #BBB; }
- /*
- * add borders to resizers when pane is 'closed'
- *
- *.ui-layout-resizer-closed { border: 1px solid #BBB; }
- */
- /*
- * show both borders when the resizer is 'dragging'
- */
- .ui-layout-resizer-west-dragging ,
- .ui-layout-resizer-east-dragging {
- border-left: 1px solid #BBB;
- border-right: 1px solid #BBB;
- }
- .ui-layout-resizer-north-dragging ,
- .ui-layout-resizer-south-dragging {
- border-top: 1px solid #BBB;
- border-bottom: 1px solid #BBB;
- }
-
-
- /*
- layout toggler background image
- */
- .ui-layout-toggler-west, .ui-layout-toggler-east {
- border-width: 1px 0;
- background-image: url("static/fusion/images/layout/panel-e-w-toggle.png");
- background-size: 10px 10px;
- background-repeat: no-repeat;
- background-position: center;
- }
-
- .ui-layout-toggler-north, .ui-layout-toggler-south {
- border-width: 0 1px;
- background-image: url("static/fusion/images/layout/panel-n-s-toggle.png");
- background-size: 10px 10px;
- background-repeat: no-repeat;
- background-position: center;
- }
-
- body{background-color:#fff;font-size:14px;font-size:.875rem;margin:0;padding:0px 0 20px;position:relative}
-
- </style>
-<!-- LAYOUT v 1.3.0 -->
- <script type="text/javascript" src="app/fusion/scripts/layout/jquery-latest.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/layout/jquery-ui-latest.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/layout/jquery.layout-latest.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/webrtc/RTCMultiConnection.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/socket/peerBroadcast.js"></script>
- <script type="text/javascript" src="app/fusion/scripts/layout/debug.js"></script>
-
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
-
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
-
-
- <script type="text/javascript" src= "app/fusion/scripts/DS2-controllers/collaboration-controller.js"></script>
-
-<div class="outer-center" style="position: absolute; left: 12px; right: 0px; top: 0px;bottom: 0px;">
- <div class="inner-center">
-
- <!-- <jsp:include page="/WEB-INF/fusion/zul/chatOne.zul" /> -->
-
-
-
- <table style="width: 100%;">
- <tbody><tr>
- <td>
- <button type="button" id="share-screen" class="btn btn-alt btn-small setup">Start Session</button>
- <button id="stop-share-screen" class="btn btn-alt btn-small setup">Stop Session</button>
- <button id="view-screen" class="btn btn-alt btn-small setup">View</button>
-
- </td>
-
- </tr>
- </tbody>
-
- <tbody><tr>
- <td>
- <input type="text" id="chat-input" style="font-size: 1.2em;visibility:collapse;" placeholder="type here.."/>
- <div id="chat-output"></div>
- </td>
- <!--
- <td style="background: white;">
- <input type="file" id="file">
- <div id="file-progress"></div>
- </td>
- -->
- </tr>
- </tbody>
- </table>
-
-
- </div>
- <div id="inner-south" class="ui-layout-south">
- <div class="videoContainer1"></div>
- <div class="videoContainer2"></div>
-
- </div>
-</div>
-
-<div class="outer-west">
- <div class="screenContainer1"></div>
- <div class="screenContainer2"></div>
- <div ng-controller="collaborationControllerDS2">
- </div>
-</div>
-
-
-
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/jcs_admin.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/jcs_admin.html
deleted file mode 100644
index fd8a5302..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/jcs_admin.html
+++ /dev/null
@@ -1,73 +0,0 @@
-<div id="page-content" style=" width: 100%">
-
- <div>
- <h1 class="heading-page" id="CacheRegions">Cache Regions</h1>
- </div>
-
- <div style="margin-right:20px; text-align:justify; text-align-last:auto;">
- <p>
- These are the regions which are currently defined in the cache. 'Items' and 'Bytes' refer to the elements currently in memory (not spooled).
- You can clear all items for a region by clicking on the Clear icon next to the desired region below. You can also <a href="admin#/jcs_admin" ng-click="clearAllFuncPopUp();">clear all regions</a>
- which empties the entire cache.</p>
- </div>
-
- <!-- This implements an accordion table in place -->
- <div style="border-top: 1px solid #c4c4c4; margin-top: 0px; margin-bottom:30px; margin-right: 20px; background-color: #fff; padding: 10px 0; color: #646464s">
- <div class="row" style="margin: 0 20px 10px 0px; float: left; width: 97%;">
- <div class="col-md-4" style=" width: 16.6666666667%;"><b>Cache Name</b></div>
- <div class="col-md-2" style=" width: 8.3333333333%;"><b># of Items</b></div>
- <div class="col-md-2" style=" width: 8.3333333333%;"><b>Bytes</b></div>
- <div class="col-md-2" style=" width: 8.3333333333%;"><b>Status</b></div>
- <div class="col-md-3" style=" width: 12.5%;"><b>Memory Hits</b></div>
- <div class="col-md-3" style=" width: 12.5%;"><b>Aux Hits</b></div>
- <div class="col-md-3" style=" width: 12.5%;"><b>Not Found Misses</b></div>
- <div class="col-md-3" style=" width:12.5%;"><b>Expired Misses</b></div>
- <div class="col-md-1" style=" width: 4.1666666667%;"><b>Clear?</b></div>
- <div class="col-md-1" style=" width: 4.1666666667%;"><b>Items</b></div>
- </div>
-
- <div ng-repeat="region in regions">
- <div class="row" style="margin: 0 20px 10px 0px; float: left; width: 97%;">
- <div class="col-md-4" style=" width: 16.6666666667%;">
- <a b2b-tooltip="Click to Show Region Details" ng-click="showRegionDetails(region.cacheName);" href="admin#/jcs_admin">{{region.cacheName}}</a></div>
- <div class="col-md-2" style=" width: 8.3333333333%;">{{region.size}}</div>
- <div class="col-md-2" style=" width: 8.3333333333%;">{{region.byteCount}}</div>
- <div class="col-md-2" style=" width: 8.3333333333%;">{{region.status}}</div>
- <div class="col-md-3" style=" width: 12.5%;">{{region.hitCountRam}}</div>
- <div class="col-md-3" style=" width: 12.5%;">{{region.hitCountAux}}</div>
- <div class="col-md-3" style=" width: 12.5%;">{{region.missCountNotFound}}</div>
- <div class="col-md-3" style=" width: 12.5%;">{{region.missCountExpired}}</div>
- <div class="col-md-1" style=" width: 4.1666666667%;">
- <div ng-click="clearRegionFuncPopUp(region.cacheName);" style="font-size:20px;">
- <a href="javascript:void(0)" class="icon-misc-trash"></a></div>
- </div>
- <div class="col-md-1"><i class="icon-primary-accordion-plus" ng-class="{true: 'icon-primary-accordion-plus', false: 'icon-primary-accordion-minus'}[ !bling$index]" ng-click="bling$index = !bling$index" style="display: block;"></i></div>
- </div>
- <div class="row" style="margin: 0px 20px 0px 30px; float: left; width: 95%; border-top: 1px solid #e4e4e4; padding-top: 10px"
- ng-show="bling$index">
- <span style="height: 20px; width: 20px; display: inline-block; float: left"></span>
- <div class="col-md-12" style=" width: 50%;"><b>Key</b></div>
- <div class="col-md-2" style=" width: 8.3333333333%"><b>Eternal?</b></div>
- <div class="col-md-4" style=" width: 16.6666666667%;"><b>Created</b></div>
- <div class="col-md-2" style=" width: 8.3333333333%;"><b>Max Life</b></div>
- <div class="col-md-2" style=" width: 8.3333333333%;"><b>Expires</b></div>
- <div class="col-md-1" style=" width: 4.1666666667%;"><b>Clear?</b></div>
- </div>
- <div ng-repeat="item in region.items">
- <div class="row" style="margin: 0px 20px 0px 30px; float: left; width: 95%;" ng-show="bling$index">
- <span style="height: 20px; width: 20px; display: inline-block; float: left"></span>
- <div class="col-md-12" style=" width: 50%;"><a href="#" tooltip="Click to Show Item Details" ng-click="showItemDetails(region.cacheName,item.key);">{{item.key}}</a></div>
- <div class="col-md-2" style=" width: 8.3333333333%;">{{item.eternal}}</div>
- <div class="col-md-4" style=" width: 16.6666666667%;">{{item.createTime}}</div>
- <div class="col-md-2" style=" width: 8.3333333333%;">{{item.maxLifeSeconds}}</div>
- <div class="col-md-2" style=" width: 8.3333333333%;">{{item.expiresInSeconds}}</div>
- <div class="col-md-1" style=" width: 4.1666666667%;">
- <div ng-click="clearItemFuncPopUp(region.cacheName,item.key);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
- </div>
- </div>
- </div>
- <div style="clear: both"></div>
- </div>
-
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/admin-menu-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/admin-menu-del-confirm.html
deleted file mode 100644
index 5d6cb16c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/admin-menu-del-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope">
- <h2 id="myModalLabel" modal-title=""> Menu Item Deletion</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 145px;">
- You are about to delete '{{fnMenuItem.label}}' Menu Item. Please click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="deleteMenuItem(fnMenuItem);">Ok</button>
- <button class="btn btn-small" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-confirm.html
deleted file mode 100644
index d3eda5e4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope">
- <h2 id="myModalLabel" modal-title="">Clear All Cache Regions</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 145px;">
- You are about to clear all cache regions. Please click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="deleteFun(roleFun);">Ok</button>
- <button class="btn btn-small" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-region-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-region-confirm.html
deleted file mode 100644
index 5f43e2a0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/cache-menu-clear-region-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope">
- <h2 id="myModalLabel" modal-title="">Clear Cache Region</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 145px;">
- You are about to clear all of the items in the cache region {{msg.text}}. Please click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="deleteFun(roleFun);">Ok</button>
- <button class="btn btn-small" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/clearItem-region-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/clearItem-region-confirm.html
deleted file mode 100644
index 004b49d8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/clearItem-region-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope">
- <h2 id="myModalLabel" modal-title="">Clear Item Cache Region</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 145px;">
- You are about to clear this item from the cache region {{msg.text}}. Please click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="deleteFun(roleFun);">Ok</button>
- <button class="btn btn-small" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/collaborate-list-toggle-profile-active-status.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/collaborate-list-toggle-profile-active-status.html
deleted file mode 100644
index 6a91cb0a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/collaborate-list-toggle-profile-active-status.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope">
- <h2 id="myModalLabel" modal-title="">Change User Status</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 145px;">
- You are about to change user's active status. Please click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="deleteFun(roleFun);">Ok</button>
- <button class="btn btn-small" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fn-menu-edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fn-menu-edit.html
deleted file mode 100644
index 2ccdf2af..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fn-menu-edit.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<script type="text/ng-template" id="edit_menu_item_popup.html">
-
- <div class="modal__informative font-showcase" style="width:1100px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">{{label}}</h2>
- </div>
- <div class="divider-container"><hr> </div>
-
- <div class="modal__content" >
- <table>
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Label:</label><br>
- <input id="popupAddMenuItemLabel" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.label" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" style = "display:none" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Parent:</label><br>
- <input id="popupAddMenuItemParentId" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.parentId" ng-disabled="disableParentId" maxlength="30" />
- </div>
- <div class="fn-ebz-container" ng-init="getParentData();">
- <form name="parentListForm">
- <label class="fn-ebz-text-label" for="parentSelect"><sup><b>*</b></sup>Parent:</label><br>
- <select class="form-field" name="parentSelect" id="parentSelect" ng-model="addFnMenuItem.parentId">
- <option>{{getParentLabel(addFnMenuItem.parentId, parentListSelectData)}}</option>
- <option ng-repeat="option in parentListSelectData" value="{{option[0]}}" "{{(addFnMenuItem.parentId===option[0]) ? 'selected' : '' }}">{{option[1]}}</option>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Sort Order:</label><br>
- <input id="popupAddMenuItemSortOrder" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.sortOrder" ng-disabled="disableSortOrder" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Action:</label><br>
- <input id="popupAddMenuItemAction" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.action" ng-disabled="disableAction" maxlength="30" />
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" ng-init="getFunctionCDselectData();">
- <form name="functionCDform">
- <label class="fn-ebz-text-label" for="repeatSelect"><sup><b>*</b></sup>Function:</label><br>
- <select class="form-field" name="repeatSelect" id="repeatSelect" ng-model="addFnMenuItem.functionCd">
- <option>{{addFnMenuItem.functionCd}}</option>
- <option ng-repeat="option in functionCDselectData" value="{{option}}" >{{option}}</option>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Active:</label><br>
- <select class="form-field" name="selectActive" ng-model="addFnMenuItem.active">
- <option ng-repeat="active in activeStatusOptions" value="{{active.value}}" ng-selected="{{active.value}}=={{addFnMenuItem.active}}" >{{active.title}}</option>
- </select>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Servlet:</label><br>
- <input id="popupAddMenuItemServlet" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.servlet" ng-disabled="disableServlet" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Query String:</label><br>
- <input id="popupAddMenuItemQueryString" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.queryString" ng-disabled="disableQueryString" maxlength="30" />
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>External URL:</label><br>
- <input id="popupAddMenuItemExternalUrl" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.externalUrl" ng-disabled="disableExternalUrl" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Target:</label><br>
- <input id="popupAddMenuItemTarget" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.target" ng-disabled="disableTarget" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Menu Set Code:</label><br>
- <input id="popupAddMenuItemMenuSetCode" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.menuSetCode" ng-disabled="disableMenuSetCode" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Separator:</label><br>
- <select class="form-field" name="select" ng-model="addFnMenuItem.separator">
- <option ng-repeat="separator in separatorStatusOptions" value="{{separator.value}}" ng-selected="{{separator.value}}=={{addFnMenuItem.separator}}" >{{separator.title}}</option>
- </select>
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Image Source:</label><br>
- <input id="popupAddMenuItemImageSrc" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.imageSrc" ng-disabled="disableImageSrc" maxlength="30" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="updateFnMenu(addFnMenuItem);">Save</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <!--
- <div class="modal__footer">
- </div>
- -->
- </div>
-</script>
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fnmenu-add.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fnmenu-add.html
deleted file mode 100644
index 167defb7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/popup-modal-fnmenu-add.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope">
- <h2 id="myModalLabel" modal-title="">{{label}}</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope" tabindex="0"
- role="region" aria-label="Modal header text content">
-
- <table>
- <tr>
- <td>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Label:</label><br>
- <input id="popupAddMenuItemLabel" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.label" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" style = "display:none" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Parent:</label><br>
- <input id="popupAddMenuItemParentId" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.parentId" ng-disabled="disableParentId" maxlength="30" />
- </div>
- <div class="fn-ebz-container" ng-init="getParentData();">
- <form name="parentListForm">
- <label class="fn-ebz-text-label" for="parentSelect"><sup><b>*</b></sup>Parent:</label><br>
- <select name="select_projects" id="select_projects" ng-model="addFnMenuItem.parentIdAsString">
-
- <optgroup label="" ng-repeat="header in childListSelectData">
- <option label="{{header.label}}" value="{{header.menuId}}" style="color:black;font-weight:bold;">{{header.label}}</option>
- <option ng-repeat="child in header.children" value="{{child.menuId}}" ng-selected="child.menuId == addFnMenuItem.parentId">{{child.label}}</option>
- </optgroup>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Sort Order:</label><br>
- <input id="popupAddMenuItemSortOrder" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.sortOrder" ng-disabled="disableSortOrder" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Action:</label><br>
- <input id="popupAddMenuItemAction" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.action" ng-disabled="disableAction" maxlength="200" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="fn-ebz-container" ng-init="getFunctionCDselectData();">
- <form name="functionCDform">
- <label class="fn-ebz-text-label" for="repeatSelect"><sup><b>*</b></sup>Function:</label><br>
- <select class="form-field" name="repeatSelect" id="repeatSelect" ng-model="addFnMenuItem.functionCd">
- <option>{{addFnMenuItem.functionCd}}</option>
- <option ng-repeat="option in functionCDselectData" value="{{option}}" ng-selected="option==addFnMenuItem.functionCd">{{option}}</option>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Active:</label><br>
- <select class="form-field" name="selectActive" ng-model="addFnMenuItem.activeAsString" >
- <option ng-repeat="active in activeStatusOptions" value="{{active.value}}" ng-selected="{{active.value}} == {{addFnMenuItem.active}}" >{{active.title}}</option>
- </select>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Servlet:</label><br>
- <input id="popupAddMenuItemServlet" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.servlet" ng-disabled="disableServlet" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Query String:</label><br>
- <input id="popupAddMenuItemQueryString" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.queryString" ng-disabled="disableQueryString" maxlength="30" />
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>External URL:</label><br>
- <input id="popupAddMenuItemExternalUrl" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.externalUrl" ng-disabled="disableExternalUrl" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Target:</label><br>
- <input id="popupAddMenuItemTarget" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.target" ng-disabled="disableTarget" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Menu Set Code:</label><br>
- <input id="popupAddMenuItemMenuSetCode" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.menuSetCode" ng-disabled="disableMenuSetCode" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Separator:</label><br>
- <select class="form-field" name="select" ng-model="addFnMenuItem.separatorAsString">
- <option ng-repeat="separator in separatorStatusOptions" value="{{separator.value}}" ng-selected="{{separator.value}}=={{addFnMenuItem.separator}}" >{{separator.title}}</option>
- </select>
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Image Source:</label><br>
- <input id="popupAddMenuItemImageSrc" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.imageSrc" ng-disabled="disableImageSrc" maxlength="30" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="updateFnMenu(addFnMenuItem);">Save</button>
- <button class="btn btn-small" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
-
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-child-add-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-child-add-confirm.html
deleted file mode 100644
index 8a944d76..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-child-add-confirm.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to add the child role {{msg.roleFun}} to the role for {{msg.role}}. Do you want to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button ng-if="!msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleChildRemove(msg.selected,msg.availableRole,msg.availableRole.id);">Yes</button>
- <button ng-if="msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleChildAdd(msg.selected,msg.availableRole,msg.availableRole.id);">Yes</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-confirm-activation.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-confirm-activation.html
deleted file mode 100644
index 7a663cf3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-confirm-activation.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to {{msg.text}} the {{msg.roleName}} role. Do you want to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="roleActivate(msg.selected,msg.availableRole);">Ok</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="cancelRoleSwitch(msg)">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-delete-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-delete-confirm.html
deleted file mode 100644
index 45e5ddfc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-delete-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="heading-medium" modal-title="">Confrim</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to delete {{msg.roleName}} role. Click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="delRole(msg.availableRole);">Ok</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-add-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-add-confirm.html
deleted file mode 100644
index ff5ac253..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-add-confirm.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to add the role function {{msg.roleFun}} to the role for {{msg.role}}. Do you want to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button ng-if="!msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleFunRemove(msg.selected,msg.availableRole,msg.roleId);">Yes</button>
- <button ng-if="msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleFunAdd(msg.selected,msg.availableRole,msg.roleId);">Yes</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="cancelRoleFunSwitch(msg)">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-role-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-role-del-confirm.html
deleted file mode 100644
index 322c6624..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-fun-role-del-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header">
- <h2 id="myModalLabel" modal-title="">Role</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to delete this Role Function. Click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="roleFunRemoveRole(msg.roleFunction)">Ok</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html
deleted file mode 100644
index a6912571..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-add.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Role Function Create</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
-
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 145px;">
-
- <div class="field-group">
- Name <input id="textinputID-2a" ddh-reset ng-model="roleFun['name']"
- placeholder="Name" class="span12" type="text">
- </div>
- <div class="field-group">
- Code <input id="textinputID-2a" ddh-reset ng-model="roleFun['code']"
- placeholder="Code" class="span12" type="text">
-
- </div>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="save(roleFun);">Create</button>
- <button class="btn btn-medium" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-del-confirm.html
deleted file mode 100644
index 31109112..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-del-confirm.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Role Function Delete</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to delete this role function, '{{msg.text}}'. Click 'OK' to continue.
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="deleteFun(roleFun);">Ok</button>
- <button class="btn btn-medium" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-edit.html
deleted file mode 100644
index ecf69b5a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-function-edit.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="b2b-modal-header">
- <h2 id="myModalLabel" b2b-modal-title>Role Function Edit</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close" ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body" tabindex="0" role="region" aria-label="Modal header text content" style="height: 145px;">
- <div class="field-group">
- Name <input id="textinputID-2a" ng-model="roleFun['name']" placeholder="Name" class="span12" type="text">
- </div>
- <div class="field-group">
- Code <input id="textinputID-2a" ng-model="roleFun['code']" disabled placeholder="Code" class="span12" type="text">
- </div>
- </div>
- <div class="b2b-modal-footer">
- <div class="cta-button-group">
- <button class="btn btn-alt btn-medium" type="button" ng-click="save(roleFun);">Save</button>
- <button class="btn btn-medium" type="button" ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-child-roles-modal.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-child-roles-modal.html
deleted file mode 100644
index ec8b2b8e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-child-roles-modal.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<div>
- <div class="b2b-modal-header">
- <br/>
- <h1 class="heading-medium" id="SelectRole">Select Child Roles</h1>
- </div>
- <br/>
- <div class="b2b-modal-body" tabindex="0" aria-label="Modal header text content" role="region">
- <table class="striped">
- <thead>
- <tr>
- <th></th>
- <th>Role</th>
- </tr>
- </thead>
- <tbody type="body" ng-repeat="role in msg.roleChildFunctions">
- <tr>
- <td>
- <label class="btn-switch-label" tabindex="0" role="option">
- <input ng-click="activateRoleChildConfirmPopUp(role.active, role);" type="checkbox" b2b-switches ng-model="role.active" size-class="modal-small modal-alert">
- </label>
- </td>
- <td>{{ role.name }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="b2b-modal-footer">
- <div class="cta-button-group in">
- <button style="float: right; margin-right: 20px;" class="btn btn-alt btn-small" ng-click="$dismiss('cancel')">Close</button>
- </div>
- <br/>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html
deleted file mode 100644
index dbe9d1c6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/modals/role-functions-modal.html
+++ /dev/null
@@ -1,36 +0,0 @@
- <div class="b2b-modal-header">
- <h2 class="myModalLabel" id="SelectRole">Select Role Functions</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close" ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
-
- <div class="b2b-modal-body" tabindex="0" aria-label="Modal header text content" role="region">
- <table class="striped">
- <thead>
- <tr>
- <th></th>
- <th>Role Function</th>
- </tr>
- </thead>
- <tbody type="body" ng-repeat="roleFunction in msg.availableRoleFunctions">
- <tr>
- <td>
- <label class="btn-switch-label" tabindex="0" role="option">
- <input ng-click="activateRoleConfirmPopUp(roleFunction.selected,roleFunction);" type="checkbox" b2b-switches ng-model="roleFunction.selected" size-class="modal-small modal-alert">
- </label>
- </td>
- <td>{{roleFunction.name}}</td>
- </tr>
- </tbody>
- </table>
- </div>
-
- <div class="b2b-modal-footer">
- <div class="cta-button-group in">
- <button style="float: right; margin-right: 20px;"
- class="btn btn-alt btn-small"
- ng-click="$dismiss('cancel')">Close</button>
- </div>
- <br />
- </div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role-function.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role-function.html
deleted file mode 100644
index cab8c682..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role-function.html
+++ /dev/null
@@ -1,67 +0,0 @@
-<div id="page-content">
- <h1 class="heading-page" id="profileSearch">Role Function</h1>
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img"
- aria-label="Please wait while we load your content"></i>
- </div>
- <div ng-hide="showLoader">
- <div class="row-nowrap">
- <div class="span12">
- <div class="form-row">
- <div class="field-group">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="addRoleFuncPopUp(rowData);">Create</button>
- </div>
- </div>
- </div>
- <div class="span12">
- <div class="form-row">
- <div style="float: right;">
- <div class="form-field form-field__small">
- <input type="text" placeholder="Search role functions" ng-model="searchString" />
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img"
- aria-label="Please wait while we load your content"></i>
- </div>
-
- <div b2b-table class="b2b-table-div" table-data="tableData"
- search-string="searchString" current-page="currentPage"
- next-sort="nextSort">
- <table>
- <thead b2b-table-row type="header">
- <tr>
- <th b2b-table-header key="name">Name</th>
- <th b2b-table-header key="code">Code</th>
- <th b2b-table-header sortable="false">Edit</th>
- <th b2b-table-header sortable="false">Delete</th>
- </tr>
- </thead>
- <tbody b2b-table-row type="body" row-repeat="rowData in tableData">
- <tr>
- <td b2b-table-body ng-bind="rowData['name']"></td>
- <td b2b-table-body ng-bind="rowData['code']"></td>
- <td b2b-table-body>
- <div style="font-size: 20px;">
- <a ng-click="saveRoleFuncPopUp(rowData);" class="icon-misc-pen"></a>
- </div>
- </td>
- <td b2b-table-body>
- <div style="font-size: 20px;">
- <a href="javascript:void(0)"
- ng-click="delRoleFuncConfirmPopUp(rowData);"
- class="icon-misc-trash"></a>
- </div>
- </td>
-
- </tr>
- </tbody>
- </table>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role.html
deleted file mode 100644
index f4c9d0c6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role.html
+++ /dev/null
@@ -1,61 +0,0 @@
-<div id="page-content">
- <div>
- <h1 class="heading-page" id="Roles">Manage Roles</h1>
- </div>
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img" aria-label="Please wait while we load your content"></i>
- </div>
- <div ng-hide="showLoader">
- <div>
- <h2 class="heading-small-content">Please edit the role details below: </h2>
- </div>
-
- <div>
- <label>*Name: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- <input type="text" ng-model="role.name"
- maxlength="300" />
- </label>
- </div>
-
- <div>
- <label>Priority: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
- <input type="text" ng-model="role.priority"
- maxlength="30"/>
- </label>
- </div>
-
- <div>
- <button style="margin-left: 105px;" class="btn btn-small" onClick="window.location='admin'">Cancel</button>
- <button class="btn btn-alt btn-small" ng-click="saveRole();">Save</button>
- </div>
- <br/>
- <div ng-if="routeRoleId != 0">
- <div>
- <h3 class="heading-small-emphasis">Role Functions</h3>
- <button class="btn btn-alt btn-small" ng-click="addNewRoleFunctionModalPopup(role.roleFunctions,role.name, role);">Manage Role Functions</button>
-
- <table class="striped" ng-if="role.roleFunctions.length">
- <thead>
- <tr>
- <th>Role Function Name</th>
- <th>Remove</th>
- </tr>
- </thead>
- <tbody type="body" ng-repeat="roleFunction in role.roleFunctions">
- <tr>
- <td width="70%">{{ roleFunction.name }}</td>
- <td width="10%">
- <div ng-click="removeRoleFunction(roleFunction);"><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <br/>
- <br/>
- <div>
- <a href="admin#/role_function_list">Manage Role Functions</a><br><br>
- </div>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role_list.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role_list.html
deleted file mode 100644
index 5c407390..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/role_list.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<div id="page-content">
- <div>
- <h1 class="heading-page" id="Roles">Roles</h1>
- </div>
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img"
- aria-label="Please wait while we load your content"></i>
- </div>
- <div ng-hide="showLoader">
- <div>
- <button type="submit" onClick="window.location='admin#/role/0';" class="btn btn-alt btn-small">Add New Role</button>
- </div>
- <h2 class="heading-small">Click on a Role to view its details.</h2>
- <table class="striped" ng-if="availableRoleFunctions" style="width: auto;">
- <thead>
- <tr>
- <th>Name</th>
- <th>Priority</th>
- <th>Edit</th>
- <th>Active?</th>
- <th>Delete?</th>
- </tr>
- </thead>
- <tbody type="body" ng-repeat="availableRole in ociavailableRoles">
- <tr>
- <td>{{ availableRole.name }}</td>
- <td>{{ availableRole.priority }}</td>
- <td>
- <a href="admin#/role/{{availableRole.id}}" class="icon-misc-pen"></a>
- </td>
- <td>
- <div >
- <label class="btn-switch-label" tabindex="0" role="option">
- <input type="checkbox" b2b-switches ng-model="availableRole.active" ng-click="activateRoleConfirmPopUp(availableRole.active,availableRole);" >
- </label>
- </div>
- </td>
- <td width="10%">
- <div ng-click="delRoleConfirmPopUp(availableRole);"><a href="javascript:void(0)" class="icon-misc-trash"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/usage.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/usage.html
deleted file mode 100644
index 8e411141..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-admin/usage.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<div id="page-content">
- <div>
- <h1 class="heading-page" id="Usage">Current Usage</h1>
- </div>
-
- <h3 class="heading-small">
- The following table shows all current user sessions. Click the icon to end a user's session.
- </h3>
-
- <!-- A simple table requires no b2b tags -->
- <table style="width: auto;">
-
- <thead>
- <tr>
- <th key="0" sortable="false" width="10%" align="center">User Id</th>
- <th key="1" sortable="true" width="10%" align="center">User Name</th>
- <th key="2" sortable="false" width="10%" align="center">Email</th>
- <th key="3" sortable="true" width="10%" align="center">Last Access Time (minutes)</th>
- <th key="4" sortable="false" width="10%" align="center">Time Remaining (minutes)</th>
- <th key="5" sortable="false" width="10%" align="center">Expire User Session?</th>
- </tr>
- </thead>
-
- <tbody ng-repeat="user in users" style="max-height: 980px;" >
- <tr>
- <td width="10%">{{user.id}}</td>
- <td width="10%">{{user.lastName}}</td>
- <td width="10%">{{user.email}}</td>
- <td width="10%">{{user.lastAccess}}</td>
- <td width="10%">{{user.remaining}}</td>
- <td width="10%"><div ng-hide="user.delete=='yes'">Current Session</div>
- <div ng-click="removeSession(user.sessionId);"
- ng-hide="user.delete=='no'"
- style="font-size:20px;text-align:center">
- <a href="javascript:void(0)" class="icon-misc-trash"></a>
- </div>
- </td>
- </tr>
- </tbody>
-
- </table>
-
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/profile-confirm-toggle.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/profile-confirm-toggle.html
deleted file mode 100644
index 0fe37686..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/profile-confirm-toggle.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to {{msg.text}} the user with ID {{msg.rowData.id}}. Do you want to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="toggleUserStatus(msg.rowData.id);">Ok</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="cancelUserStatusToggle(msg.rowData);">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add-confirm.html
deleted file mode 100644
index edaa0a1e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add-confirm.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to change the role {{msg.roleFun}} Do you want to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button ng-if="!msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleFunRemove(msg.availableRole,msg.roleId);">Yes</button>
- <button ng-if="msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleFunAdd(msg.availableRole,msg.roleId);">Yes</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="cancelRoleFunSwitch(msg)">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add.html
deleted file mode 100644
index f182417e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-add.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-<div class="b2b-modal-header">
- <h1 class="heading-medium" id="SelectRole">Select Role</h1>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close" ng-click="$dismiss('cancel')"></button>
- </div>
-</div>
-
-<div class="b2b-modal-body" tabindex="0" aria-label="Modal header text content" role="region">
- <table class="striped">
- <thead>
- <tr>
- <th></th>
- <th>Role</th>
- </tr>
- </thead>
- <tbody type="body"ng-repeat="roleFunction in msg.availableRoleFunctions">
- <tr>
- <td>
- <label class="btn-switch-label" tabindex="0" role="option">
- <input type="checkbox" b2b-switches ng-model="roleFunction.selected" ng-click="activateRoleConfirmPopUp(roleFunction.selected,roleFunction);" size-class="modal-small modal-alert">
- </label>
- </td>
- <td>{{roleFunction.name}}</td>
- </tr>
- </tbody>
- </table>
-</div>
-
-<div class="b2b-modal-footer" id="role-popup-footer">
- <div class="cta-button-group">
- <button style="float: right; margin-right: 20px;"
- class="btn btn-alt btn-small"
- ng-click="$dismiss('cancel')">Close</button>
- </div>
-</div>
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-del-confirm.html
deleted file mode 100644
index b795d35f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/modals/role-del-confirm.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 50px;">
- You are about to delete the role '{{msg.role.name}}'. Do you want to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button ng-if="!msg.selected" class="btn btn-alt btn-medium" type="button"
- ng-click="confirmRoleDel(msg.role,msg.roleId);">Yes</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="$dismiss('cancel')">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile.html
deleted file mode 100644
index 8aade050..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-profile/profile.html
+++ /dev/null
@@ -1,69 +0,0 @@
-<!DOCTYPE html>
-<!-- Single-page application for EPSDK-App profile pages using DS2 look and feel -->
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Profile Search</title>
-
- <!-- B2b Library -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
-
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <!-- Common scripts -->
-
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
-
- <!-- B2b Library -->
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
-
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
-
- <!-- Page-specific scripts -->
-
- <script src="app/fusion/scripts/DS2-controllers/profile-route.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/ds-profile/post-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/ds2-profile/self-profile-controller.js"></script>
- <script src="app/fusion/scripts/DS2-services/ds2-profile/selfProfileService.js"></script>
- <script src="app/fusion/scripts/DS2-services/profileServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/postSearch.js"></script>
- <script src="app/fusion/scripts/DS2-services/adminService.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/profile-search-controller-DS2.js"></script>
-
-</head>
- <body class="appBody" ng-app="abs">
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html
deleted file mode 100644
index 7f470d40..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/all-reports.html
+++ /dev/null
@@ -1,77 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Reports</title>
-
- <!-- Resources -->
-
-
- <!-- B2b Library -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
-
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
- <!-- digital-design-library must be loaded late -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/digital-design-library.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <!-- Common scripts -->
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <!-- EPSDK App scripts and common services -->
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <script src= "app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
-
- <!-- Page specific items -->
- <script src="app/fusion/external/d3/js/d3.js"></script>
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-ui-grid/ui-grid.css">
- <script src="app/fusion/external/angular-ui-grid/ui-grid.min.js"></script>
- <script src="./app/fusion/scripts/DS2-services/ds2-raptor-report/raptorReportFactory.js"></script>
- <script src="./app/fusion/scripts/DS2-services/ds2-raptor-report/stepFormFactory.js"></script>
- <script src="./app/fusion/scripts/DS2-controllers/ds2-reports/report-search-controller.js"></script>
- <script src="./app/fusion/scripts/DS2-controllers/ds2-reports/report-run-controller.js"></script>
- <script src="./app/fusion/scripts/DS2-controllers/ds2-reports/report-step-controller.js"></script>
- <script src="./app/fusion/scripts/DS2-controllers/ds2-reports/report-import-controller.js"></script>
- <script src="./app/fusion/scripts/DS2-controllers/ds2-reports/report-chart-controller.js"></script>
- <script src="./app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js"></script>
- <script src="./app/fusion/scripts/DS2-controllers/ds2-reports/report-router.js"></script>
-
-</head>
- <body class="appBody" ng-app="abs">
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js
deleted file mode 100644
index 9064b0dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/dynamicform.js
+++ /dev/null
@@ -1,113 +0,0 @@
-appDS2
-.directive('formBuilder', ['$q', '$parse', '$http', '$templateCache', '$compile', '$document', '$timeout', function ($q, $parse, $http, $templateCache, $compile, $document, $timeout) {
- return {
- restrict: 'E', // supports using directive as element only
- scope:{
- ngModel: '=',
- ngFormFields: '=',
- ngNumFormCols: '=',
- ngTriggerMethod: '=',
- ngShowFieldId: '='
- },
- link: function ($scope, element, attrs) {
- $scope.element=element;
- $scope.datetimeformat = "MM/dd/yyyy hh:mm a";
- console.log("$scope");
- console.log($scope);
- $scope.buildField = function (field, parentElement) {
- var x = '';
- if(field.visible) {
- if (field.fieldType === 'LIST_MULTI_SELECT') {
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br>'+
- '<div class="select2-container ebz-listbox form-field" style="height:100px;" tabindex="0" >'+
- '<label ng-repeat="item in ngModel.'+field.fieldId+'" style="display:block;">'+
- '<input type="checkbox" style="margin-top: 10px;" ng-model="item.defaultValue" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-checkbox title="{{item.title}}"/> {{item.title}}<br/>'+
- '</label>'+
- '</div>');
- } else if (field.fieldType === 'LIST_BOX') {
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <div class="form-field" att-select="formFieldLuValues.'+field.fieldId+'" ng-model="ngModel.'+field.fieldId+'" ng-change="triggerFormFields('+field.triggerOtherFormFields+')"></div>');
- } else if((field.fieldType === 'text' || field.fieldType === 'TEXT') && field.validationType === 'DATE'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input id="'+field.fieldId+'" type="text" ng-model="ngModel.'+field.fieldId+'" tabindex="0" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-datepicker>');
- } else if((field.fieldType === 'text' || field.fieldType === 'TEXT') && field.validationType === 'TIMESTAMP_MIN'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input id="'+field.fieldId+'" type="text" date-format="datetimeformat" ng-model="ngModel.'+field.fieldId+'" tabindex="0" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-date-time-picker>');
- } else if(field.fieldType === 'text' || field.fieldType === 'TEXT'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input type="text" class="form-field" ng-model="ngModel.'+field.fieldId+'" maxlength="'+field.length+'" ng-blur="triggerFormFields('+field.triggerOtherFormFields+')" />');
- } else if(field.fieldType === 'CHECK_BOX'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input type="checkbox" ng-model="ngModel.'+field.fieldId+'" tabindex="0" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-checkbox>');
- }
- }
- parentElement.append(x);
- $compile(x)($scope);
- };
- $scope.buildForm = function() {
- // create elements <table> and a <tbody>
- var tbl = angular.element("<table></table>");
- var tblBody = angular.element("<tbody></tbody>");
- var row = angular.element("<tr></tr>");
-
- var ngFormFieldsLength = $scope.ngFormFields.length;
-
- for (var j = 0; j < ngFormFieldsLength; j++) {
- var cell = angular.element("<td style='padding: 5px;'></td>");
- $scope.buildField($scope.ngFormFields[j],cell);
- row.append(cell);
-
- if((j!=0 && (j+1)%$scope.ngNumFormCols==0) || j==(ngFormFieldsLength-1)){
- tblBody.append(row);
- row = angular.element("<tr></tr>");
- }
- }
- tbl.append(tblBody);
- angular.element($scope.element).html('');
- $scope.element.append(tbl);
- };
-
-
- $scope.formFieldLuValues = {};
- $scope.getEBZFormat = function() {
- if($scope.ngFormFields && $scope.ngFormFields.length>0){
- $scope.ngFormFields.forEach(function(formField) {
- if(formField.fieldType === 'LIST_MULTI_SELECT') {
- $scope.ngModel[formField.fieldId]= [];
- if(formField.formFieldValues && formField.formFieldValues.length>0){
- formField.formFieldValues.forEach(function(entry,i) {
- $scope.ngModel[formField.fieldId].push({ index: i, value: entry.id, title: entry.name, defaultValue: entry.defaultValue});
- });
- }
- } else if(formField.fieldType==='LIST_BOX') {
- $scope.formFieldLuValues[formField.fieldId]= [];
- if(formField.formFieldValues && formField.formFieldValues.length>0){
- formField.formFieldValues.forEach(function(entry,i) {
- $scope.formFieldLuValues[formField.fieldId].push({ index: i, value: entry.id, title: entry.name});
- if(entry.defaultValue){
- $scope.ngModel[formField.fieldId]={ index: i, value: entry.id, title: entry.name};
- }
- });
- }
- } else if(formField.fieldType === 'text' || formField.fieldType === 'TEXT' ||
- formField.validationType === 'DATE' || formField.validationType === 'TIMESTAMP_MIN') {
- if(formField.formFieldValues && formField.formFieldValues.length>0){
- $scope.ngModel[formField.fieldId]=formField.formFieldValues[0].id;
- }
- }
- });
- }
- };
-
- $scope.$watch("ngFormFields",function(newValue,oldValue) {
- if($scope.ngFormFields){
- $scope.getEBZFormat();
- $scope.buildForm();
- }
- });
-
- $scope.triggerFormFields = function(triggerFlag) {
- if(triggerFlag){
- $scope.element.html('Loading...');
- $scope.ngTriggerMethod();
- }
- };
-
- }
- };
- }]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/step-form-directive.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/step-form-directive.js
deleted file mode 100644
index a64309bf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/directive/step-form-directive.js
+++ /dev/null
@@ -1,14 +0,0 @@
-appDS2
-.directive('stepForm', function($compile,$http, stepFormFactory) {
- return {
- restrict: 'AE',
-
- // scope: {
- // jsonSource: '='
- // },
- link: function(scope, elem, attrs) {
- var jsonSrcName = "app/fusionapp/scripts/view-models/wz_steps/json/step1.json";
- stepFormFactory.renderForm(jsonSrcName, elem, scope);
- }
- }
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html
deleted file mode 100644
index da255bbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-del-confirm.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div style="height:400px">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Remove Report</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">The selected report will be removed. Do you want to continue</label>
- </div>
-
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-alt btn-small" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html
deleted file mode 100644
index 7bdf5a29..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-formfield-del-confirm.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div style="height:400px">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Remove Formfield</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">The selected formfield {{tempFieldId}} will be removed. Do you want to continue</label>
- </div>
-
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-alt btn-small" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html
deleted file mode 100644
index 01d1e609..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-role-del-confirm.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div style="height:300px">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Remove Report Role</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">{{securityRoleName}} will be removed. Would you want to continue?</label>
- </div>
-
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-alt btn-small" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html
deleted file mode 100644
index 6620fe7c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-security-user-del-confirm.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div style="height:300px">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Remove Report User</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">{{securityUserName}} will be removed. Would you want to continue?</label>
- </div>
-
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="ok()">OK</button>
- <button class="btn btn-alt btn-small" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html
deleted file mode 100644
index 21bb046f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-user-role-confirm-toggle.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<div>
- <div class="b2b-modal-header ng-scope in">
- <h1><i class="icon-primary-alert"></i></h1>
- <h2 id="myModalLabel" modal-title="">Confirm</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" tabindex="0"
- role="region" aria-label="Modal header text content"
- style="height: 55px;">
- You are about to {{rowData.accessAllowed?"grant":"revoke"}} {{rowData.name}} edit access. Would you like to continue?
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-medium" type="button"
- ng-click="toggleEditAccessStatus(rowData);">Ok</button>
- <button class="btn btn-clear btn-medium" type="button"
- ng-click="cancelEditAccessToggle(rowData);">Cancel</button>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html
deleted file mode 100644
index e74f89a8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-col-edit.html
+++ /dev/null
@@ -1,130 +0,0 @@
-<style>
-#columnEditTable table tbody td {
- border: none;
-}
-
-#columnEditTable table tbody tr {
- border: none;
-}
-
-.colTableLeftColumn {
- width: 45%;
- text-align: right;
- vertical-align:middle;
-}
-
-.colTableInput {
- width:220px;
-}
-
-#columnEditTable .selectWrap{
- width:220px;
-}
-
-
-#drilldownOption .selectWrap{
- width:450px;
-}
-</style>
-
-<div style="height: 700px;">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Report Column - Edit </h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
-<!-- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">The selected report will be removed. Do you want to continue</label>
- </div> -->
- <div id="columnEditTable">
- <table class="striped">
-<!-- <caption><span>Table caption</span></caption> -->
-<!-- <thead>
- <tr>
- <th>Column ID:</th>
- <th>Name</th>
- <th>ID</th>
- <th>Edit</th>
- </tr>
- </thead> -->
- <tbody>
- <tr>
- <td class="colTableLeftColumn">Column ID:</td>
- <td>{{columnEditData.colId}}</td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">Display Name:</td>
- <td><input type="text" name="displayName" ng-model="colName.value" class="colTableInput"></td>
- </tr>
-
-<!-- <tr>
- <td class="colTableLeftColumn">Display Width (px):</td>
- <td><input type="text" name="displayWidth" ng-model="displayWidth" class="colTableInput"></td>
- </tr> -->
-
- <tr>
- <td class="colTableLeftColumn">Display Alignment: </td>
- <td>
- <select name="displayAlignment" b2b-dropdown ng-model="selectedDisplayAlignment.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in displayAlignmentOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">Display Header Alignment:</td>
- <td>
- <select name="displayHeaderAlignment" b2b-dropdown ng-model="selectedDisplayHeaderAlignment.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in displayAlignmentOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">Sortable:</td>
- <td>
- <select name="sortable" b2b-dropdown ng-model="sortable.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in ynOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">Visible:</td>
- <td>
- <select name="visible" b2b-dropdown ng-model="visible.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in ynOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn" style="width:350px;">Drill-down Link:</td>
- <td id="drilldownOption">
- <select name="drillDown" b2b-dropdown ng-model="selectedDrillDownReport.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in drilldownReports" value="{{d.id}}">{{d.name}}</option>
- </select>
- </td>
- </tr>
-
-
- </tbody>
- </table>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="save()">Save</button>
- <button class="btn btn-alt btn-small" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-drilldown-edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-drilldown-edit.html
deleted file mode 100644
index 6b98ac78..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-drilldown-edit.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<style>
-#columnEditTable table tbody td {
- border: none;
-}
-
-#columnEditTable table tbody tr {
- border: none;
-}
-
-.colTableLeftColumn {
- width: 45%;
- vertical-align:center;
-}
-
-.colTableInput {
- width:220px;
-}
-
-#columnEditTable .selectWrap{
- width:220px;
-}
-
-</style>
-
-<div style="height: 700px;">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Drill-down Parameters Configuration</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
- <div id="columnEditTable" ng-repeat="drillDownOption in drillDownOptionList">
- <table class="striped">
- <tbody>
- <fieldset role="radiogroup" radio-group-accessibility>
- <tr ng-show="childReportFF.length>0||childReportCol.length>0">
- <td colspan="2">
- <h2>{{drillDownOption.name}}</h2>
- </td>
- </tr>
-
-
- <tr ng-show="childReportFF.length>0||childReportCol.length>0">
- <td>
- <div class="form-row" role="radio" style="margin-top:0px;">
- <label for="optionsRadios2{{$index}}" class="radio">
- <input type="radio" ng-model="drillDownOption.selectedvalueradioGroup.name" id="optionsRadios2{{$index}}" name="optionsRadio2{{$index}}" value="fixedValue">
- <i class="skin"></i>
- <span>Fixed Value</span>
- </label>
- </div>
- </td>
- <td><input type="text" name="defaultValue" ng-model="drillDownOption.fixedValue.value" class="colTableInput"></td>
- </tr>
-
-
- <tr ng-show="childReportCol.length>0">
- <td>
- <div class="form-row" role="radio" style="margin-top:0px;">
- <label for="optionsRadios3{{$index}}" class="radio">
- <input type="radio" ng-model="drillDownOption.selectedvalueradioGroup.name" id="optionsRadios3{{$index}}" name="optionsRadio3{{$index}}" value="reportCol">
- <i class="skin"></i>
- <span>Value of Column</span>
- </div>
- </td>
- <td>
- <select name="childReportColumn" b2b-dropdown ng-model="drillDownOption.selectedChildReportColumn.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in childReportCol" value="{{d.id}}">{{d.name}}</option>
- </select>
- </td>
-
- </tr>
-
- <tr ng-show="childReportFF.length>0">
- <td>
- <div class="form-row" role="radio" style="margin-top:0px;">
- <label for="optionsRadios4{{$index}}" class="radio">
- <input type="radio" ng-model="drillDownOption.selectedvalueradioGroup.name" id="optionsRadios4{{$index}}" name="optionsRadio4{{$index}}" value="reportFF">
- <i class="skin"></i>
- <span>Value of Form Field</span>
- </div>
- </td>
- <td>
- <select name="childReportFormField" b2b-dropdown ng-model="drillDownOption.selectedChildReportFormField.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in childReportFF" value="{{d.id}}">{{d.name}}</option>
- </select>
- </td>
- </tr>
-
-
-
- </fieldset>
-
-
- </tbody>
- </table>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="complete()">Complete</button>
- </div>
-
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html
deleted file mode 100644
index c88eb596..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-formfield-edit.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<style>
-#columnEditTable table tbody td {
- border: none;
-}
-
-#columnEditTable table tbody tr {
- border: none;
-}
-
-.colTableLeftColumn {
- width: 45%;
- text-align: right;
- vertical-align:middle;
-}
-
-.colTableInput {
- width:220px;
-}
-
-#columnEditTable .selectWrap{
- width:220px;
-}
-</style>
-
-<div style="height: 700px;">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Report Form Field - Edit</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-
-<!-- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">The selected report will be removed. Do you want to continue</label>
- </div> -->
- <div id="columnEditTable">
- <table class="striped">
-<!-- <caption><span>Table caption</span></caption> -->
-<!-- <thead>
- <tr>
- <th>Column ID:</th>
- <th>Name</th>
- <th>ID</th>
- <th>Edit</th>
- </tr>
- </thead> -->
- <tbody>
-<!-- <tr>
- <td class="colTableLeftColumn">Field ID:</td>
- <td>{{formFieldEditData.fieldId}}</td>
- </tr> -->
-
- <tr>
- <td class="colTableLeftColumn">Field Name:</td>
- <td><input type="text" name="displayName" ng-model="fieldName.value" class="colTableInput"></td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">Field Type: </td>
- <td>
- <select name="displayAlignment" b2b-dropdown ng-model="selectedFieldType.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in fieldTypeOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">Visible:</td>
- <td>
- <select name="displayHeaderAlignment" b2b-dropdown ng-model="selectedVisible.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in ynOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td class="colTableLeftColumn">SQL as Default Value:</td>
- <td>
- <label for="checkbox1" class="checkbox">
- <input id="checkbox1" type="checkbox" ng-model="sqlDefaultValueSelected.value" /><i class="skin"></i><span></span>
- </label>
- </td>
- </tr>
-
- <tr ng-hide="sqlDefaultValueSelected.value">
- <td class="colTableLeftColumn">Default Value:</td>
- <td><input type="text" name="defaultValue" ng-model="defaultValue.value" class="colTableInput"></td>
- </tr>
-
-
- <tr ng-show="sqlDefaultValueSelected.value">
- <td class="colTableLeftColumn">Default SQL:</td>
- <td>
- <textarea b2b-reset b2b-dragon-input b2b-reset-textarea ng-model="fieldDefaultSQL.value" style="height:80px">
- </textarea>
- </td>
- <td>
- <p><button ng-click="formFieldVerifySQL(fieldDefaultSQL.value)" class="btn btn-alt btn-small">Verify</button></p>
- </td>
- </tr>
-
-<!-- <tr>
- <td class="colTableLeftColumn">Verify Field Value As: </td>
- <td>
- <select name="displayAlignment" b2b-dropdown ng-model="selectedVerifyFieldValue.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in verifyFieldValueOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr> -->
-
- <tr>
- <td class="colTableLeftColumn">SQL Generating Custom List of Values:</td>
- <td>
- <textarea b2b-reset b2b-dragon-input b2b-reset-textarea ng-model="fieldSqlContent.value" style="height:80px">
- </textarea>
- </td>
- <td>
- <p><button ng-click="formFieldVerifySQL(fieldSqlContent.value)" class="btn btn-alt btn-small">Verify</button></p>
- </td>
- </tr>
-
-<!-- <tr>
- <td class="colTableLeftColumn">Drill-down Link:</td>
- <td>
- <select name="drillDown" b2b-dropdown ng-model="selectedDrillDownLink.value" placeholder-text="Select">
- <option b2b-dropdown-list option-repeat="d in drillDownOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- </tr> -->
-
-
- </tbody>
- </table>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button" ng-click="save()">Save</button>
- <button class="btn btn-alt btn-small" type="button"
- ng-click="cancel()">Cancel</button>
- </div>
-
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-report-name-validation.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-report-name-validation.html
deleted file mode 100644
index 50132ecf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-report-name-validation.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<div style="height: 220px;">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">Warning</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <p>Please enter the missing report name.</p>
-
- <button class="btn btn-alt btn-small" type="button"
- ng-click="close()">close</button>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html
deleted file mode 100644
index a7955cad..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/modal/report-wizard-test-run-sql.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<style>
-.colTableLeftColumn {
- width: 45%;
- text-align: right;
- vertical-align:middle;
-}
-
-.colTableInput {
- width:220px;
-}
-
-#columnEditTable .selectWrap{
- width:220px;
-}
-</style>
-
-<div style="height: 700px;">
- <div class="b2b-modal-header ng-scope in">
- <h2 id="myModalLabel" modal-title="">SQL Test Run - {{isError?'Failed':'Executed'}}</h2>
- <div class="corner-button in">
- <button type="button" class="close" aria-label="Close"
- ng-click="$dismiss('cancel')"></button>
- </div>
- </div>
- <div class="b2b-modal-body ng-scope ng-isolate-scope in" style="margin-bottom: -50px;">
- <form name="workflowForm" class="css-form" novalidate>
-<!-- <div class="form-row input-emphasized-field">
- <label class="span12 input-emphasized" for="textinputID-2a">The selected report will be removed. Do you want to continue</label>
- </div> -->
- <div>
-
- <div ng-show="isError">
- <h2>Error Message:</h2><br>
- <p>{{errormessage}}</p>
- <h2>Stack Trace:</h2><br>
- <p>{{stacktrace}}</p>
-
- </div>
- <table class="striped">
- <thead>
- <tr>
- <th ng-repeat="colName in queryData.reportDataColumns">{{colName}}</th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat="rowData in queryData.reportDataRows">
- <td ng-repeat="keyName in queryData.reportDataColumns">{{rowData[keyName]}}</td>
- </tr>
-
- </tbody>
- </table>
- </div>
- <div class="b2b-modal-footer ng-scope ng-isolate-scope in">
- <div class="cta-button-group in">
- <button class="btn btn-alt btn-small" type="button"
- ng-click="close()">Close</button>
- </div>
- </div>
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html
deleted file mode 100644
index 8558729e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-chart-wizard.html
+++ /dev/null
@@ -1,897 +0,0 @@
-<style>
-table tbody td {
- border: none;
-}
-
-table tbody tr {
- border: none;
-}
-
-table{
- border: none;
- margin-bottom:0px;
-}
-
-#RangeTable{
- margin-top: 5px;
- border: 1px solid black;
-}
-</style>
-
-<div id="page-content">
-<h1 class="heading-page">Report Chart Configuration</h1>
-
-<div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img"
- aria-label="Please wait while we load your content"></i>
-</div>
-
-
-<div ng-hide="showLoader">
-<div>
-<table>
- <thead>
- <tr>
- <th width="30%">Chart Type</th>
- <th></th>
- </tr>
- </thead>
-
- <tbody>
- <tr>
- <td>
- <select name="chartType" b2b-dropdown ng-model="reportRunJson.chartType">
- <option b2b-dropdown-list option-repeat="d in chartTypeOptions" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- <td></td>
- </tr>
- </tbody>
-</table>
-
-<table>
- <thead>
- <tr>
- <th width="50px">Width (px)</th>
- <th>Height (px)</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <input type="text" name="displayName" ng-model="reportRunJson.width" style="width:100px;">
- </td>
- <td>
- <input type="text" name="displayName" ng-model="reportRunJson.height" style="width:100px;">
- </td>
- </tr>
- </tbody>
-</table>
-
-<table>
- <thead>
- <tr>
- <th width="50px">Title</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <fieldset role="radiogroup" radio-group-accessibility>
- <td>
- <label for="optionsRadiosShowTitleTrue" class="radio">
- <input type="radio" ng-model="reportRunJson.showTitle" id="optionsRadiosShowTitleTrue" name="optionsRadiosShowTitleTrue" value="true">
- <i class="skin"></i>
- <span>Show</span>
- </label>
- </td>
- <td>
- <label for="optionsRadiosShowTitleFalse" class="radio">
- <input type="radio" ng-model="reportRunJson.showTitle" id="optionsRadiosShowTitleFalse" name="optionsRadiosShowTitleFalse" value="false">
- <i class="skin"></i>
- <span>Hide</span>
- </label>
- </td>
- </fieldset>
- </tr>
-
- </tbody>
-</table>
-
-<table>
- <thead>
- <tr>
- <th width="30%">Domain Axis</th>
- <th width="30%">Category</th>
- <th width="40%"></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <select name="chartType" b2b-dropdown ng-model="reportRunJson.domainAxis">
- <option b2b-dropdown-list option-repeat="d in reportRunJson.chartColumnJSONList" value="{{d.value}}">{{d.title}}</option>
- </select>
- </td>
- <td>
- <select name="chartType" b2b-dropdown ng-model="reportRunJson.categoryAxis">
- <option b2b-dropdown-list option-repeat="d in reportRunJson.chartColumnJSONList" value="{{d.value}}">{{d.title}}</option>
- </select>
- </td>
- </tr>
- </tbody>
-</table>
-
-
- <div id="RangeTable">
-
-<table ng-repeat="rangeReport in reportRunJson.rangeAxisList">
- <thead>
- <tr>
- <th width="18%">Range Axis</th>
- <th width="15%">Y Axis</th>
- <th width="15%">Chart Title</th>
- <th width="22%">Color</th>
- <th width="25%">Line Type</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <select name="chartType" b2b-dropdown ng-model="rangeReport.rangeAxisLabelJSON.value" placeholder-text="Select" ng-disabled="rangeReport.removed=='true'">
- <option b2b-dropdown-list option-repeat="d in reportRunJson.chartColumnJSONList" value="{{d.value}}">{{d.title}}</option>
- </select>
- </td>
- <td>
- <input type="text" name="displayName" ng-model="rangeReport.rangeYAxis" ng-disabled="rangeReport.removed=='true'" style="width:100px;">
- </td>
- <td>
- <input type="text" name="displayName" ng-model="rangeReport.rangeChartGroup" ng-disabled="rangeReport.removed=='true'" style="width:150px;">
- </td>
- <td>
- <select name="chartType" b2b-dropdown ng-model="rangeReport.rangeColor" ng-disabled="rangeReport.removed=='true'">
- <option b2b-dropdown-list option-repeat="d in rangeColors" value="{{d.value}}">{{d.title}}</option>
- </select>
- </td>
- <td>
- <select name="lineType" b2b-dropdown ng-model="rangeReport.rangeLineType" ng-disabled="rangeReport.removed=='true'">
- <option b2b-dropdown-list option-repeat="d in lineTypes" value="{{d.value}}">{{d.title}}</option>
- </select>
- </td>
- <td>
- <button ng-show="$index==0" type="submit" style="width: 90px; height:35px;margin-left:5px;" class="btn btn-secondary btn-small" ng-click="addRangeAxisRow()">Add</button>
- <span ng-hide="$index==0">
- <button ng-if="rangeReport.removed!='true'" type="submit" style="width: 90px; height:35px;margin-left:5px;" class="btn btn-secondary btn-small" ng-click="removeRangeAxisRow($index)">Remove</button>
- <button ng-if="rangeReport.removed=='true'" type="submit" style="width: 90px; height:35px;margin-left:5px;" class="btn btn-secondary btn-small" disabled="disabled">Removed</button>
- </span>
- </td>
- </tr>
-
- </tbody>
-</table>
-</div>
-
-</div>
-
-<div ng-show=false style="min-height:500px" data-ng-init="init()">
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Chart Type</label><BR>
- <div class="form-field" att-select="chartTypes" ng-model="reportRunJson.chartTypeJSON" placeholder="Select an Option" show-input-filter="true" ng-change="actionClicked()"></div>
- </div>
-
-
- <div class="fn-ebz-container" style="position:relative; top: -8px;">
- <label class="fn-ebz-text-label">Animate</label><BR>
- <div><input type="checkbox" ng-model="reportRunJson.animation" att-checkbox data-ng-value="true"></div>
- </div>
- <BR>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Width (Px)</label><BR>
- <input type="text" name="chartWidth" maxlength=4 only-digits ng-model="reportRunJson.width" style="width:80px"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Height (Px)</label><BR>
- <input type="text" name="chartHeight" maxlength=4 only-digits ng-model="reportRunJson.height" style="width:80px"/>
- </div>
- <BR>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Title</label><BR>
- <span><input name="tle" type="radio" ng-model="reportRunJson.showTitle" data-ng-value="true"/>Show</span>
- <span><input name="tle" type="radio" ng-model="reportRunJson.showTitle" data-ng-value="false"/>Hide</span>
- </div>
- <BR>
-
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Domain Axis</label><BR>
- <div class="form-field" att-select="reportRunJson.chartColumnJSONList" ng-model="reportRunJson.domainAxisJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Category</label><BR>
- <div class="form-field" att-select="reportRunJson.chartColumnJSONList" ng-model="reportRunJson.categoryAxis" placeholder="" show-input-filter="true"></div>
- </div>
- <BR>
-
-<div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
-<div ng-repeat="rangeReport in reportRunJson.rangeAxisList">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Range Axis</label><BR>
- <div class="form-field" att-select="reportRunJson.chartColumnJSONList"
- ng-model="rangeReport.rangeAxisLabelJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Y Axis</label><BR>
- <input id="yaxs" type="text" name="yAxis" maxlength=50 ng-model=rangeReport.rangeYAxis style="width:100px"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Chart Title</label><BR>
- <input type="text" name="chartTitle" maxlength=50 ng-model="rangeReport.rangeChartGroup" style="width:200px"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Color</label><BR>
- <div class="form-field" att-select="rangeColors" ng-model="rangeReport.rangeColorJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Line Type</label><BR>
- <div class="form-field" att-select="lineTypes" ng-model="rangeReport.rangeLineTypeJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
- <div class="fn-ebz-container" ng-show="reportRunJson.chartTypeJSON.value=='FlexTimeChart' ||
- reportRunJson.chartTypeJSON.value=='AnnotationChart'" style="position:relative; top: -8px;">
- <label class="fn-ebz-text-label">Area</label><BR>
- <input type="checkbox" ng-model="rangeReport.showAsArea" att-checkbox data-ng-value="true">
- </div>
-
- <div class="fn-ebz-container" style="position:relative; top: 25px;">
- <a href="javascript:void(0)" ng-show="{{$index==0}}" style="float: right;" att-button btn-type="secondary" size="small" att-accessibility-click="13,32"
- ng-click="addRangeAxisRow(rangeReport);" >Add</a>
- <a href="javascript:void(0)" ng-show="{{$index>0}}" style="float: right;" att-button btn-type="secondary" size="small" att-accessibility-click="13,32" ng-click="removeRangeAxisRow($index);" >
- Remove</a>
- </div>
- </div>
- </div>
- </div>
- <BR>
-
-<accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="additionalOptions" heading="Additional Options" child-length="10">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Primary Axis Label</label><BR>
- <input type="text" name="prAxis" maxlength=50 ng-model="reportRunJson.primaryAxisLabel" style="width:210px"/>
- </div>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Secondary Axis Label</label><BR>
- <input type="text" name="secAxis" maxlength=75 ng-model="reportRunJson.secondaryAxisLabel" style="width:210px"/>
- </div>
- <BR>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Range Axis Minimum Range</label><BR>
- <input type="text" name="rAxisMinRange" only-digits ng-model="reportRunJson.minRange" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Maximum Range</label><BR>
- <input type="text" name="rAxisMaxRange" only-digits ng-model="reportRunJson.maxRange" ng-maxLength="35" style="width:210px"/>
- </div><BR>
- </accordion-group>
-</accordion>
-
-
-
-
-<div ng-show="reportRunJson.chartType=='BarChart3D'">
-
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accBar" heading="Bar Chart Options" child-length="10">
-
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div class="fn-ebz-container" style="position:relative;margin:10px;" >
- <label class="fn-ebz-text-label">Orientation</label><BR>
- <span><input name="orient" type="radio" ng-model="reportRunJson.barChartOptions.verticalOrientation" data-ng-value="true"/>Vertical</span>
- <span><input name="orient" type="radio" ng-model="reportRunJson.barChartOptions.verticalOrientation" data-ng-value="false"/>Horizontal</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Stacked</label><BR>
- <span><input name="stack" type="radio" ng-model="reportRunJson.barChartOptions.stackedChart" data-ng-value="true"/>Yes</span>
- <span><input name="stack" type="radio" ng-model="reportRunJson.barChartOptions.stackedChart" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Show Controls</label><BR>
- <span><input name="shwcontrol" type="radio" ng-model="reportRunJson.barChartOptions.displayBarControls" data-ng-value="true"/>Yes</span>
- <span><input name="shwcontrol" type="radio" ng-model="reportRunJson.barChartOptions.displayBarControls" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">XAxis Date Type</label><BR>
- <span><input name="xAxisDtype" type="radio" ng-model="reportRunJson.barChartOptions.xAxisDateType" data-ng-value="true"/>Yes</span>
- <span><input name="xAxisDtype" type="radio" ng-model="reportRunJson.barChartOptions.xAxisDateType" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Display less XAxis tickers</label><BR>
- <span><input name="xTicker" type="radio" ng-model="reportRunJson.barChartOptions.minimizeXAxisTickers" data-ng-value="true"/>Yes</span>
- <span><input name="xTicker" type="radio" ng-model="reportRunJson.barChartOptions.minimizeXAxisTickers" data-ng-value="false"/>No</span>
- </div><BR>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Is Time Axis?</label><BR>
- <span><input name="timeAxis" type="radio" ng-model="reportRunJson.barChartOptions.timeAxis" data-ng-value="true"/>Yes</span>
- <span><input name="timeAxis" type="radio" ng-model="reportRunJson.barChartOptions.timeAxis" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Log Scale (Y Axis)</label><BR>
- <span><input type="checkbox" ng-model="reportRunJson.barChartOptions.yAxisLogScale" att-checkbox data-ng-value="true"></span>
-
- </div>
- </div>
-
- </accordion-group>
-</accordion>
-</div>
- {{reportRunJson.chartType}}
- <div ng-show="reportRunJson.chartType=='TimeSeriesChart'">
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accTimeChart" heading="Time Series Chart Options" child-length="10">
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Render as</label><BR>
- <span><input name="renderAs" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.lineChartRenderer" value="line"/>Line</span>
- <span><input name="orient" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.lineChartRenderer" value="area"/>Area</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">X Axis Label</label><BR>
- <span><input type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.showXAxisLabel" att-checkbox data-ng-value="true"></span>
- </div><BR>
-
- <div class="fn-ebz-container" style="position:relative;bottom:10px;">
- <label class="fn-ebz-text-label">X Axis <br>Tickers</label><BR>
- <span style="position:relative;top:10px;"><input type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.addXAxisTicker" att-checkbox data-ng-value="true"></span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:20px;">
- <label class="fn-ebz-text-label">Is Time Axis?</label><BR>
- <span><input name="timeAxisChart" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.nonTimeAxis" data-ng-value="true"/>Yes</span>
- <span><input name="timeAxisChart" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.nonTimeAxis" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Multi Series?</label><BR>
- <span><input name="mSeries" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.multiSeries" data-ng-value="true"/>Yes</span>
- <span><input name="mSeries" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.multiSeries" data-ng-value="false"/>No</span>
- </div>
- </div>
- </div>
-
- </accordion-group>
- </accordion>
-
- </div>
-
- <div>
-
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accFlexTimeChart" heading="Flex Time Series Chart Options" child-length="10">
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Zoom-In Window</label><BR>
- <span><input type="text" name="zWindow" only-digits maxlength=3 ng-model="reportRunJson.flexTimeSeriesChartOptions.zoomIn"></span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Time Axis Type</label><BR>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="weekly"/>Weekly</span>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="daily"/>Daily</span>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="hourly"/>Hourly</span>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="30min"/>30 Min</span>
- </div>
- </div>
- </div>
- </accordion-group>
- </accordion>
-
- </div>
-
-
-
-
-
-
-
-
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accCommonOptions" heading="Common Options" child-length="10">
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Legend Angle</label><BR>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="up45"/>up 45&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="up90"/>up 90&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="down45"/>down 45&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="down90"/>down 90&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="standard"/>Standard</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:15px;">
- <label class="fn-ebz-text-label">Legend Position</label><BR>
- <span><input name="lgPosition" type="radio" ng-model="reportRunJson.commonChartOptions.legendPosition" value="top"/>Top</span>
- <span><input name="lgPosition" type="radio" ng-model="reportRunJson.commonChartOptions.legendPosition" value="bottom"/>Bottom</span>
- </div><BR>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Legend</label><BR>
- <span><input name="lgd" type="radio" ng-model="reportRunJson.commonChartOptions.hideLegend" data-ng-value="false"/>Yes</span>
- <span><input name="lgd" type="radio" ng-model="reportRunJson.commonChartOptions.hideLegend" data-ng-value="true"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Animation</label><BR>
- <span><input name="anmtate" type="radio" ng-model="reportRunJson.commonChartOptions.animateAnimatedChart" data-ng-value="true" />Yes</span>
- <span><input name="anmtate" type="radio" ng-model="reportRunJson.commonChartOptions.animateAnimatedChart" data-ng-value="false"/>No</span>
- </div><BR>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Top Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.topMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.topMargin" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Bottom Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.bottomMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.bottomMargin" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Left Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.leftMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.leftMargin" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Right Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.rightMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.rightMargin" style="width:210px">
- </div><BR>
- </div>
- </div>
- </accordion-group>
-</accordion>
- <br/><br/>
- <a href="javascript:void(0)" att-button btn-type="primary" att-accessibility-click="13,32" ng-click="saveChartData();">Save</a>
- <a href="report#/report_run/c_master={{reportRunJson.reportID}}&refresh=Y" att-button btn-type="primary" att-accessibility-click="13,32">Run</a>
-</div>
-
-<div>
- <b2b-expanders class="mpc-expanders" is-open="additionalOptionOpen">
- <b2b-expander-heading>
- <div class="row">
- <div class="span6">
- <div class="heading-medium b2b-blue" ng-class=" { 'b2b-toggle-header-active': !additionalOptionOpen, 'b2b-toggle-header-inactive': additionalOptionOpen } ">Additional Options</div>
- <p class="p-small">
- </p>
- </div>
- <div style="position: absolute;right: 250px;" class="span1">
- <i class="pull-right b2b-toggle-header-icon" b2b-expander-toggle b2b-accessibility-click="13,32" expand-icon="icon-primary-collapsed" collapse-icon="icon-primary-expanded" tabindex="0" aria-posinset="1" aria-setsize="2"></i>
- </div>
- </div>
- </b2b-expander-heading>
- <b2b-expander-body>
- <div>
- <div id="RangeTable">
- <table>
- <thead>
- <tr>
- <th width="30%">Primary Axis Label</th>
- <th width="30%">Secondary Axis Label</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <input type="text" name="primaryAxisLabel" ng-model="reportRunJson.primaryAxisLabel" style="width:200px;">
- </td>
- <td>
- <input type="text" name="secondaryAxisLabel" ng-model="reportRunJson.secondaryAxisLabel" style="width:200px;">
- </td>
- </tr>
- </tbody>
- </table>
- <table>
- <thead>
- <tr>
- <th width="30%">Range Axis Minimum Range</th>
- <th width="30%">Maximum Range</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <input type="text" name="minRange" ng-model="reportRunJson.minRange" style="width:200px;">
- </td>
- <td>
- <input type="text" name="maxRange" ng-model="reportRunJson.maxRange" style="width:200px;">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </b2b-expander-body>
- </b2b-expanders>
-
- <!-- BAR CHART OPTION SECTION STARTS HERE -->
- <b2b-expanders ng-show="reportRunJson.chartType=='BarChart3D'" class="mpc-expanders" is-open="barChartOptionOpen">
- <b2b-expander-heading>
- <div class="row">
- <div class="span6">
- <div class="heading-medium b2b-blue" ng-class=" { 'b2b-toggle-header-active': !barChartOptionOpen, 'b2b-toggle-header-inactive': barChartOptionOpen } ">Bar Chart Options</div>
- <p class="p-small">
- </p>
- </div>
- <div style="position: absolute;right: 250px;" class="span1">
- <i class="pull-right b2b-toggle-header-icon" b2b-expander-toggle b2b-accessibility-click="13,32" expand-icon="icon-primary-collapsed" collapse-icon="icon-primary-expanded" tabindex="0" aria-posinset="1" aria-setsize="2"></i>
- </div>
- </div>
- </b2b-expander-heading>
- <b2b-expander-body>
- <div>
- <div id="RangeTable">
- <table>
- <thead>
- <tr>
- <th width="25%">Orientation</th>
- <th width="18%">Stacked</th>
- <th width="18%">Show Controls</th>
- <th width="18%">XAxis Date Type</th>
- <th width="21%">Display less XAxis tickers</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <label for="optionsOrientationVertical" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.verticalOrientation" id="optionsOrientationVertical" name="optionsOrientationVertical" value="true">
- <i class="skin"></i>
- <span>Vertical</span>
- </label>
- <label for="optionsOrientationHorizontal" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.verticalOrientation" id="optionsOrientationHorizontal" name="optionsOrientationHorizontal" value="false">
- <i class="skin"></i>
- <span>Horizontal</span>
- </label>
- </td>
-
- <td>
- <label for="optionsStackedYes" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.stackedChart" id="optionsStackedYes" name="optionsStackedYes" value="true">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsStackedNo" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.stackedChart" id="optionsStackedNo" name="optionsStackedNo" value="false">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- <td>
- <label for="optionsShowControlYes" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.displayBarControls" id="optionsShowControlYes" name="optionsShowControlYes" value="true">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsShowControlNo" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.displayBarControls" id="optionsShowControlNo" name="optionsShowControlNo" value="false">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- <td>
- <label for="optionsXAxisDateTypeYes" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.xAxisDateType" id="optionsXAxisDateTypeYes" name="optionsXAxisDateTypeYes" value="true">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsXAxisDateTypeNo" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.xAxisDateType" id="optionsXAxisDateTypeNo" name="optionsXAxisDateTypeNo" value="false">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- <td>
- <label for="optionsMinimizeXAxisTickersYes" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.minimizeXAxisTickers" id="optionsMinimizeXAxisTickersYes" name="optionsMinimizeXAxisTickersYes" value="true">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsMinimizeXAxisTickersNo" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.minimizeXAxisTickers" id="optionsMinimizeXAxisTickersNo" name="optionsMinimizeXAxisTickersNo" value="false">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- </tr>
- </tbody>
- </table>
- <table>
- <thead>
- <tr>
- <th width="25%">Is Time Axis?</th>
- <th width="25%">Log Scale (Y Axis)</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <label for="optionsTimeAxisYes" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.timeAxis" id="optionsTimeAxisYes" name="optionsTimeAxisYes" value="true">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsTimeAxisNo" class="radio">
- <input type="radio" ng-model="reportRunJson.barChartOptions.timeAxis" id="optionsTimeAxisNo" name="optionsTimeAxisNo" value="false">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- <td>
- <label for="logScaleYAxisCheckBox" class="checkbox">
- <input id="logScaleYAxisCheckBox" type="checkbox" ng-model="reportRunJson.barChartOptions.yAxisLogScale" /><i class="skin"></i><span></span>
- </label>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </b2b-expander-body>
- </b2b-expanders>
- <!-- BAR CHART OPTION SECTION ENDS HERE -->
-
- <!-- TIME SERIES CHART OPTION SECTION STARTS HERE -->
- <b2b-expanders ng-show="reportRunJson.chartType=='TimeSeriesChart'" class="mpc-expanders" is-open="timeSeriesChartOptionOpen">
- <b2b-expander-heading>
- <div class="row">
- <div class="span6">
- <div class="heading-medium b2b-blue" ng-class=" { 'b2b-toggle-header-active': !timeSeriesChartOptionOpen, 'b2b-toggle-header-inactive': timeSeriesChartOptionOpen } ">Time Series Chart Options</div>
- <p class="p-small">
- </p>
- </div>
- <div style="position: absolute;right: 250px;" class="span1">
- <i class="pull-right b2b-toggle-header-icon" b2b-expander-toggle b2b-accessibility-click="13,32" expand-icon="icon-primary-collapsed" collapse-icon="icon-primary-expanded" tabindex="0" aria-posinset="1" aria-setsize="2"></i>
- </div>
- </div>
- </b2b-expander-heading>
- <b2b-expander-body>
- <div>
- <div>
- <table>
- <thead>
- <tr>
- <th width="20%">Render as</th>
- <th width="20%">X Axis Label</th>
- <th width="20%">X Axis Tickers</th>
- <th width="20%">Is Time Axis?</th>
- <th width="20%">Multi Series</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <label for="optionsLineChartRendererLine" class="radio">
- <input type="radio" ng-model="reportRunJson.timeSeriesChartOptions.lineChartRenderer" id="optionsLineChartRendererLine" name="optionsLineChartRendererLine" value="line">
- <i class="skin"></i>
- <span>Line</span>
- </label>
- <label for="optionsLineChartRendererArea" class="radio">
- <input type="radio" ng-model="reportRunJson.timeSeriesChartOptions.lineChartRenderer" id="optionsLineChartRendererArea" name="optionsLineChartRendererArea" value="area">
- <i class="skin"></i>
- <span>Area</span>
- </label>
- </td>
- <td>
- <label for="xAxisLabelCheckBox" class="checkbox">
- <input id="xAxisLabelCheckBox" type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.showXAxisLabel" /><i class="skin"></i><span></span>
- </label>
- </td>
- <td>
- <label for="addXAxisTickerCheckBox" class="checkbox">
- <input id="addXAxisTickerCheckBox" type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.addXAxisTicker" /><i class="skin"></i><span></span>
- </label>
- </td>
- <td>
- <label for="isTimeAxisCheckBox" class="checkbox">
- <input id="isTimeAxisCheckBox" type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.nonTimeAxis" /><i class="skin"></i><span></span>
- </label>
- </td>
- <td>
- <label for="multiSeriesCheckBox" class="checkbox">
- <input id="multiSeriesCheckBox" type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.multiSeries" /><i class="skin"></i><span></span>
- </label>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </b2b-expander-body>
- </b2b-expanders>
- <!-- TIME SERIES CHART OPTION SECTION ENDS HERE -->
-
- <b2b-expanders class="mpc-expanders" is-open="commonOptionOpen">
- <b2b-expander-heading>
- <div class="row">
- <div class="span6">
- <div class="heading-medium b2b-blue" ng-class=" { 'b2b-toggle-header-active': !commonOptionOpen, 'b2b-toggle-header-inactive': commonOptionOpen } ">Common Options</div>
- <p class="p-small">
- </p>
- </div>
- <div style="position: absolute;right: 250px;" class="span1">
- <i class="pull-right b2b-toggle-header-icon" b2b-expander-toggle b2b-accessibility-click="13,32" expand-icon="icon-primary-collapsed" collapse-icon="icon-primary-expanded" tabindex="0" aria-posinset="1" aria-setsize="2"></i>
- </div>
- </div>
- </b2b-expander-heading>
- <b2b-expander-body>
- <div >
- <div>
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:0px">
- <table>
- <thead>
- <tr>
- <th>Legend Angle</th>
- <th>Legend Position</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <fieldset role="radiogroup" radio-group-accessibility>
- <td>
- <label for="optionsRadios1" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" id="optionsRadios1" name="optionsRadio1" value="up45">
- <i class="skin"></i>
- <span>up 45&deg;</span>
- </label>
- <label for="optionsRadios2" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" id="optionsRadios2" name="optionsRadio2" value="up90">
- <i class="skin"></i>
- <span>up 90&deg;</span>
- </label>
- <label for="optionsRadios3" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" id="optionsRadios3" name="optionsRadio3" value="down45">
- <i class="skin"></i>
- <span>down 45&deg;</span>
- </label>
- <label for="optionsRadios4444" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" id="optionsRadios4444" name="optionsRadio44" value="down90">
- <i class="skin"></i>
- <span>down 90&deg;</span>
- </label>
- <label for="optionsRadios5555" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" id="optionsRadios5555" name="optionsRadio55" value="standard">
- <i class="skin"></i>
- <span>Standard</span>
- </label>
- </td>
- </fieldset>
-
- <fieldset role="radiogroup" radio-group-accessibility>
- <td>
- <label for="optionsRadiosTop" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendPosition" id="optionsRadiosTop" name="optionsRadioTop" value="top">
- <i class="skin"></i>
- <span>Top</span>
- </label>
- <label for="optionsRadiosBottom" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.legendPosition" id="optionsRadiosBottom" name="optionsRadioBottom" value="bottom">
- <i class="skin"></i>
- <span>Bottom</span>
- </label>
- </td>
- </fieldset>
- </tr>
- </tbody>
- </table>
-
-
- <table>
- <thead>
- <tr>
- <th width="20%">Legend</th>
- <th width="20%">Animation</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <fieldset role="radiogroup" radio-group-accessibility>
- <td>
- <label for="optionsRadiosHideLegendFalse" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.hideLegend" id="optionsRadiosHideLegendFalse" name="optionsRadiosHideLegendFalse" value="false">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsRadiosHideLegendTrue" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.hideLegend" id="optionsRadiosHideLegendTrue" name="optionsRadiosHideLegendTrue" value="true">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- </fieldset>
-
- <fieldset role="radiogroup" radio-group-accessibility>
- <td>
- <label for="optionsRadiosAnimateChartTrue" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.animateAnimatedChart" id="optionsRadiosAnimateChartTrue" name="optionsRadiosAnimateChartTrue" value="true">
- <i class="skin"></i>
- <span>Yes</span>
- </label>
- <label for="optionsRadiosAnimateChartFalse" class="radio">
- <input type="radio" ng-model="reportRunJson.commonChartOptions.animateAnimatedChart" id="optionsRadiosAnimateChartFalse" name="optionsRadiosAnimateChartFalse" value="false">
- <i class="skin"></i>
- <span>No</span>
- </label>
- </td>
- </fieldset>
- <td>
- </td>
- </tr>
- </tbody>
- </table>
-
- <table>
- <thead>
- <tr>
- <th width="25%">Top Margin</th>
- <th width="25%">Bottom Margin</th>
- <th width="25%">Left Margin</th>
- <th width="25%">Right Margin</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>
- <input type="text" name="topMargin" ng-model="reportRunJson.commonChartOptions.topMargin" style="width:200px;">
- </td>
- <td>
- <input type="text" name="bottomMargin" ng-model="reportRunJson.commonChartOptions.bottomMargin" style="width:200px;">
- </td>
- <td>
- <input type="text" name="leftMargin" ng-model="reportRunJson.commonChartOptions.leftMargin" style="width:200px;">
- </td>
- <td>
- <input type="text" name="rightMargin" ng-model="reportRunJson.commonChartOptions.rightMargin" style="width:200px;">
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </b2b-expander-body>
- </b2b-expanders>
-
-</div>
-</div>
- <div>
- <button type="submit" style="width: 90px; height:35px;margin-top:20px; margin-left:5px;" class="btn btn-alt btn-small" ng-click="saveChartData();">Save</button>
- <a href="report#/report_run/c_master={{reportRunJson.reportID}}&refresh=Y">
- <button type="submit" style="width: 90px; height:35px;margin-top:20px; margin-left:5px;" class="btn btn-alt btn-small">Run</button>
- </a>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html
deleted file mode 100644
index cd64b09f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-import.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<div id="page-content">
-
-<h1 class="heading-page">Report Import</h1>
-
- <h2 id="myModalLabel" modal-title="">Import XML</h2>
-
-<div style="margin-top:5px; color:red;" ng-if="errorMessage&&errorMessage.length>0">
- <h2 id="myModalLabel" modal-title="" style="color:red;">{{errorMessage}}</h2>
-</div>
- <textarea b2b-reset b2b-dragon-input b2b-reset-textarea ng-model="xmlContent" class="span12" id="textareaXmlContent" style="height:480px;margin-top:5px;"></textarea>
-
- <button style="margin-top:5px;" type="submit" class="btn btn-alt btn-small" ng-click="importXML();">Import</button>
-
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html
deleted file mode 100644
index aaa1cac0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-run.html
+++ /dev/null
@@ -1,96 +0,0 @@
-<style>
-table tbody td {
- border: none;
-}
-
-table tbody tr {
- border: none;
-}
-
-table tbody{
- border: none;
-}
-
-table {
- border: none;
-}
-
-.grid {
- width: 100%;
- height: 400;
-}
-.no-rows {
- position: absolute;
- top: 0;
- bottom: 0;
- width: 100%;
- background: rgba(0, 0, 0, 0.4);
-}
-
-.no-rows .msg {
- opacity: 1;
- position: absolute;
- top: 20%;
- left: 20%;
- width: 60%;
- height: 50%;
- line-height: 200%;
- background-color: #eee;
- border-radius: 4px;
- border: 1px solid #555;
- text-align: center;
- font-size: 24px;
- display: table;
-}
-
-.no-rows .msg span {
- display: table-cell;
- vertical-align: middle;
-}
-.grid .ui-grid-header-cell {
- text-align:center;
-}
-body {
- font-size:13px;
-}
-</style>
-
-<div id="page-content">
- <div style="width:100%; overflow:hidden;">
- <div style="float:left;"><h1 class="heading-page">{{reportData.reportHeading}}</h1></div>
- <div style="float:left; margin-left: 10px; margin-right: 10px;">
- <a style="font-size:180%;" ng-href="report#/report_wizard/{{reportData.reportID}}" class="icon-misc-pen" ng-show="reportData.allowEdit"></a>
- </div>
- <div style="float:left; margin-left: 5px; margin-right: 10px;">
- <a style="font-size:180%;" ng-href="report#/report_chart/{{reportData.reportID}}" class="icon-misc-piechart" ng-show="reportData.allowEdit"></a>
- </div>
-
- <div ng-show ="reportData.allowEdit && showFormFields" style="margin-top:5px;">
- <label for="checkbox1" class="checkbox">
- <input id="checkbox1" type="checkbox" ng-model="showFormFieldId.value" /><i class="skin"></i><span>show IDs</span>
- </label>
- </div>
- </div>
- <h3 class="heading3">{{reportData.reportSubTitle}} </h3>
-
- <div ng-show="isInProgress" style="font-size:50px;color:#2ca02c">Loading...</div>
-
- <form ng-show="showFormFields" class="row section-row" style="margin: 10px">
- <form-builder ng-form-fields="reportData.formFieldList" ng-show-field-id="showFormFieldId.value" ng-num-form-cols="reportData.numFormCols" ng-model="formFieldSelectedValues" ng-trigger-method="triggerOtherFormFields"></form-builder>
- <br><br>
- <button type="submit" style="width: 90px; height:35px;margin-top:20px; margin-left:5px;" class="btn btn-alt btn-small" ng-click="runReport()">Run</button>
- </form>
- <button type="submit" ng-show="showBackButton" style="width: 90px; height:35px;margin-top:20px; margin-left:5px;" class="btn btn-alt btn-small" ng-click="backToParentReport()">Back</button>
- <iframe id="chartiframe" ng-show="showChart" width="100%" height="550px" style="border: none" scrolling="no"></iframe>
- <div id="errorDiv"></div>
- <div ng-if="showGrid">
- <div id="grid1" ui-grid="gridOptions" ui-grid-pagination ui-grid-pinning ui-grid-resize-columns class="grid" style="height: {{gridHeight}}">
- <div class="no-rows" ng-show="!gridOptions.data.length">
- <div class="msg">
- <span>{{reportData.message}}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- <a type="submit" ng-show="showBackButton" style="margin: 10px" ng-href="report.htm#/report_run/{{parentReportUrlParams}}" att-button btn-type="primary" size="small" title='Back'>Back</a> -->
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html
deleted file mode 100644
index 7524acca..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/report-search.html
+++ /dev/null
@@ -1,54 +0,0 @@
-<div id="page-content" style="margin-right:-230px;">
-<style>
-.grid {
- width: 100%;
- height: 400px;
-}
-.grid .ui-grid-header-cell {
- text-align:center;
-}
-.icon-add-widget:before {
- content: "\e717";
-}
-.ui-grid-icon-angle-down {
- margin-top: 5px;
-}
-body {
- font-size:13px;
-}
-</style>
-<h1 class="heading-page">Report search</h1>
-<br>
-<div >
-<label style="float:left;margin-top:10px; margin-right: 5px;">Report Id:</label>
-
-<div class="form-row" style="float:left; width:160px;">
- <select id="dropdown1" name="dropdown1" b2b-dropdown placeholder-text="Select" ng-model="operatorRepId.index">
- <option b2b-dropdown-list option-repeat="d in operatorsRepId" value="{{d.index}}">{{d.text}}</option>
- </select>
-</div>
-
-<div class="form-field form-field__glued pull-left size-onefifth" style="float:left; width:160px;margin-right: 40px;">
- <input ng-model="reportId" type="text" placeholder="Search value?" style="margin-top:5px;width:160px;">
-</div>
-
-<label class="pull-left" style="float:left;margin-top: 10px;margin-right: 5px;">Report Name:</label>
-
-<div class="form-row" style="float:left; width:160px;">
- <select id="dropdown2" name="dropdown2" b2b-dropdown placeholder-text="Select" ng-model="operatorRepName.index">
- <option b2b-dropdown-list option-repeat="e in operatorsRepName" value="{{e.index}}">{{e.text}}</option>
- </select>
-</div>
-
-<div class="form-field form-field__glued pull-left size-onefifth" style="width:13% !important;">
- <input ng-model="reportName" type="text" placeholder="Search value?" style="margin-top:5px;width:160px;">
-</div>
-
-<div>
- <button style="margin-left:50px;margin-top:4px;" type="submit" class="btn btn-alt btn-small" ng-click="runReport();">Submit</button>
-</div>
-</div>
-<br>
-
-<div id="grid1" ui-grid="gridOptions" ui-grid-pagination class="grid">
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json
deleted file mode 100644
index 66562d4b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step1.json
+++ /dev/null
@@ -1,218 +0,0 @@
-{
- "step" : "1",
- "content": {
- "title": "Step 1 : Report Definition",
- "sections": [
- {
- "title": "",
- "elements": [
- {
- "input": "hidden",
- "name": "proj_id",
- "displayName": "Project Id",
- "defaultValue": ""
- },
- {
- "input": "text",
- "name": "reportName",
- "displayName": "Report Name *:",
- "defaultValue": ""
- },
- {
- "input": "textarea",
- "name": "reportDescr",
- "displayName": "Report Description:",
- "style":"width:300px;height:80px;"
- },
- {
- "input": "select",
- "name": "reportType",
- "ngModelName":"selectedReportType.value",
- "displayName": "Report Type: ",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "optionsName":"reportTypes",
- "options":[{"value":"linear", "text":"Linear"}]
- },
- {
- "input": "select",
- "name": "dataSource",
- "ngModelName":"selectedDataSource.value",
- "displayName": "Data Source:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "optionsName":"DataSources",
- "options":[{"value":"local", "text":"Local"}]
- },
- {
- "input": "textarea",
- "name": "formHelpText",
- "displayName": "Form Help Text:",
- "style":"width:300px;height:80px;"
- },
- {
- "input": "select",
- "name": "pageSize",
- "ngModelName":"selectedPageSize.value",
- "displayName": "Page Size:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "optionsName":"PageSizes",
- "options":[ {"value":"10", "text":"10"},
- {"value":"20", "text":"20"},
- {"value":"50", "text":"50"},
- {"value":"100", "text":"100"},
- {"value":"500", "text":"500"}
- ]
- },
- {
- "input": "checkboxGroup",
- "name":"displayArea",
- "displayName": "Display Area:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "checkboxes":[{"value":"homeSelected.value", "text":"HOME"},
- {"value":"customerSelected.value", "text":"CUSTOMER"},
- {"value":"reportsSelected.value", "text":"REPORTS"}
- ]
- },
-
- {
- "input": "checkboxGroup",
- "name": "hideFormFieldsAfterRun",
- "displayName": "Hide Form Fields After Run:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "optionsName":"HideFormFieldsAfterRun",
- "checkboxes":[{"value":"hideFormFieldsAfterRunSelected.value", "text":""}
- ]
- },
- {
- "input": "select",
- "name": "maxRowsInExcelCSVDownload",
- "ngModelName":"selectedMaxRowsInExcelCSVDownload.value",
- "displayName": "Max Rows in Excel/CSV Download:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "optionsName":"PageSizes",
- "options":[{"value":"500","text":"500"},{"value":"1000","text":"1000"},{"value":"2000","text":"2000"},{"value":"3000","text":"3000"},{"value":"4000","text":"4000"},{"value":"5000","text":"5000"},{"value":"10000","text":"10000"},{"value":"15000","text":"15000"},{"value":"20000","text":"20000"},{"value":"25000","text":"25000"},{"value":"30000","text":"30000"},{"value":"35000","text":"35000"},{"value":"40000","text":"40000"},{"value":"45000","text":"45000"},{"value":"50000","text":"50000"},{"value":"65000","text":"65000"}]
- },
- {
- "input": "select",
- "name": "frozenColumns",
- "ngModelName":"selectedFrozenColumns.value",
- "displayName": "Columns to be Frozen:",
- "defaultValue": "",
- "action": "",
- "action_img": "",
- "optionsName":"frozenColumnsOptions",
- "options":[{"value":"0","text":"0"},{"value":"1","text":"1"},{"value":"2","text":"2"},{"value":"3","text":"3"},{"value":"4","text":"4"}]
- },
- {
- "input": "select",
- "name": "dataGridAlign",
- "ngModelName":"selectedDataGridAlign.value",
- "displayName": "Data Grid Align:",
- "defaultValue": "",
- "action": "",
- "action_img": "",
- "optionsName":"selectedDataGridAlignOptions",
- "options":[{"value":"left","text":"Left"},{"value":"right","text":"Right"},{"value":"center","text":"Center"}]
- },
- {
- "input": "textarea",
- "name": "emptyMessage",
- "displayName": "Empty Message:",
- "style":"width:300px;height:80px;"
- },
- {
- "input": "select",
- "name": "dataContainerHeight",
- "ngModelName":"selectedDataContainerHeight.value",
- "displayName": "Height of the Data Container:",
- "defaultValue": "",
- "action": "",
- "action_img": "",
- "optionsName":"dataContainerHeightOptions",
- "options":[{"value":"200","text":"200%"},{"value":"190","text":"190%"},{"value":"180","text":"180%"},{"value":"170","text":"170%"},{"value":"160","text":"160%"},{"value":"150","text":"150%"},{"value":"140","text":"140%"},{"value":"130","text":"130%"},{"value":"120","text":"120%"},{"value":"110","text":"110%"},{"value":"100","text":"100%"},{"value":"90","text":"90%"},{"value":"80","text":"80%"},{"value":"70","text":"70%"},{"value":"60","text":"60%"},{"value":"50","text":"50%"},{"value":"40","text":"40%"},{"value":"30","text":"30%"},{"value":"20","text":"20%"},{"value":"10","text":"10%"}]
- },
- {
- "input": "select",
- "name": "dataContainerWidth",
- "ngModelName":"selectedDataContainerWidth.value",
- "displayName": "Width of the Data Container:",
- "defaultValue": "",
- "action": "",
- "action_img": "",
- "optionsName":"dataContainerWidthOptions",
- "options":[{"value":"200","text":"200%"},{"value":"190","text":"190%"},{"value":"180","text":"180%"},{"value":"170","text":"170%"},{"value":"160","text":"160%"},{"value":"150","text":"150%"},{"value":"140","text":"140%"},{"value":"130","text":"130%"},{"value":"120","text":"120%"},{"value":"110","text":"110%"},{"value":"100","text":"100%"},{"value":"90","text":"90%"},{"value":"80","text":"80%"},{"value":"70","text":"70%"},{"value":"60","text":"60%"},{"value":"50","text":"50%"},{"value":"40","text":"40%"},{"value":"30","text":"30%"},{"value":"20","text":"20%"},{"value":"10","text":"10%"}]
- },
- {
- "input": "checkboxGroup",
- "name": "displayOptions",
- "displayName": "Display Options:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "checkboxes":[{"value":"hideFormFieldsSelected.value", "text":"Hide Form Fields"},
- {"value":"hideChartSelected.value", "text":"Hide Chart"},
- {"value":"hideReportDataSelected.value", "text":"Hide Report Data"},
- {"value":"hideExcelSelected.value", "text":"Hide Excel"},
- {"value":"hidePdfSelected.value", "text":"Hide PDF"}
- ]
- },
- {
- "input": "checkboxGroup",
- "name":"runtimeColSort",
- "displayName": "Disable column sort at runtime:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "checkboxes":[{"value":"runtimeColSortDisabled.value", "text":""}
- ]
- },
- {
- "input": "select",
- "name": "runtimeFormNumberColumns",
- "ngModelName":"selectedNumFormCols.value",
- "displayName": "Run-time Form Number Columns:",
- "defaultValue": "no",
- "action": "",
- "action_img": "",
- "optionsName":"runtimeFormNumberColumns",
- "options":[ {"value":"1", "text":"1"},
- {"value":"2", "text":"2"},
- {"value":"3", "text":"3"},
- {"value":"3", "text":"4"}
- ]
- },
- {
- "input": "text",
- "name": "reportTitle",
- "displayName": "Report Title:",
- "defaultValue": ""
- },
- {
- "input": "text",
- "name": "reportSubTitle",
- "displayName": "Report Subtitle:",
- "defaultValue": ""
- }
- ]
-
- },
- {
- "title": "finalButton",
- "submitAction" : "",
- "next":"Microservice Config",
- "previous":"none"
- }
- ]
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step2.json b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step2.json
deleted file mode 100644
index ca01985d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step2.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "step" : "2",
- "content": {
- "title": "Step 2 : Report SQL",
- "sections": [
- {
- "title": "",
- "elements": [
- {
- "input": "textarea",
- "spanOverTwoColumns":"true",
- "name": "sqlScript",
- "displayName": "SQL script:",
- "defaultValue":"SELECT ",
- "style":"width: 600px; height: 400px"
- }
- ],
- "buttons": [
- {
- "text":"Validate/Test Run SQL",
- "value":"next",
- "ngFunction":"testRunSql()"
- }]
-
- },
- {
- "title": "finalButton",
- "submitAction" : "",
- "next":"Microservice Config",
- "previous":"none"
- }
- ]
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step3.json b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step3.json
deleted file mode 100644
index 9ea9b6f4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step3.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "step" : "3",
- "content": {
- "title": "",
- "sections": [
- {
- "title": "",
- "elements": [
- ]
- },
- {
- "title": "finalButton",
- "submitAction" : "",
- "next":"Microservice Config",
- "previous":"none"
- }
- ]
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step4.json b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step4.json
deleted file mode 100644
index 971a0cf3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step4.json
+++ /dev/null
@@ -1,25 +0,0 @@
-{
- "step" : "4",
- "content": {
- "title": "",
- "sections": [
- {
- "title": "",
- "elements": [
- ],
- "buttons": [
- {
- "text":"Add",
- "value":"add",
- "ngFunction":"addNewFormField()"
- }]
- },
- {
- "title": "finalButton",
- "submitAction" : "",
- "next":"Microservice Config",
- "previous":"none"
- }
- ]
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step5.json b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step5.json
deleted file mode 100644
index cc10114d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step5.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "step" : "5",
- "content": {
- "title": "",
- "sections": [
- {
- "title": "",
- "elements": [
- ]
- },
- {
- "title": "finalButton",
- "submitAction" : "",
- "next":"Microservice Config",
- "previous":"none"
- }
- ]
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step6.json b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step6.json
deleted file mode 100644
index e3b1ccce..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/json/step6.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "step" : "6",
- "last_step": true,
- "hideSaveButton":true,
- "hideBackButton":true,
- "content": {
- "title": "Step 6 : Run",
- "sections": [
- {
- "elements": [
- ],
- "buttons": [
- {
- "text":"Run Report",
- "value":"next",
- "ngFunction":"RunCurrentReport()"
- }]
- },
- {
- "title": "finalButton",
- "submitAction" : "",
- "next":"Microservice Config",
- "previous":"none"
- }
- ]
-
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html
deleted file mode 100644
index 9b498870..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-reports/wz_steps/report-step.html
+++ /dev/null
@@ -1,243 +0,0 @@
-<!-- <link rel="stylesheet" type="text/css" href="static/fusion/raptor/css/raptor.css"> -->
-<style>
-#stepView table tbody td {
- border: none;
-}
-
-#stepView table tbody tr {
- border: none;
-}
-
-
-.noTableBorder table tbody td {
- border: none;
-}
-.noTableBorder table tbody tr {
- border: none;
-}
-.selectWrap {
- width: 300px;
-}
-.tdLeftColumn {
- text-align: right;
- vertical-align:middle;
-}
-
-.tabs.tabs-justified > li.active, .tabs.promo-tabs > li.active {
-z-index:0;
-}
-</style>
-
-<div id="page-content">
-<h1 class="heading-page">Report Wizard</h1>
-
-
-<!-- <h1 id="tabs---promo">Tabs - Promo</h1>
-<button class="btn btn-secondary btn-small" ng-click="gTabs[3].disabled = !gTabs[3].disabled">{{gTabs[3].disabled?'Enable':'Disable'}}</button> - Toggle 4th (Features) Tab
-<br><br> -->
- <b2b-tabset tab-id-selected="activeTabsId">
- <b2b-tab ng-repeat="tab in gTabs" tab-item="tab"
- id="{{tab.uniqueId}}" aria-controls="{{tab.tabPanelId}}"
- ng-disabled="tab.disabled">
- {{tab.title}}
- </b2b-tab>
- </b2b-tabset>
-<br><br>
-<div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img"
- aria-label="Please wait while we load your content"></i>
-</div>
-
-<div ng-hide="showLoader">
-
-<!-- <select ng-model="prj"
- ng-options="item.projectName for item in allProjects track by item.id" data-ng-init="getAllProjects()"
- ng-change="selectAction();">
- <option value="">Select project</option>
-</select>
-
-<a ng-click="createAction()" class="pointer">Create Project</a> -->
-
-<input type="hidden" name="project_id" ng-model="project_id" value = ""/>
-
-<div id="stepViewColumn" ng-show = "isColumnStep">
- <h1>Step 3 : Columns</h1>
- <table class="striped">
- <thead>
- <tr>
- <th>No</th>
- <th>Column Name</th>
- <th>ID</th>
- <th>Edit</th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat = "rowData in colTableRowData">
- <td>{{$index+1}}</td>
- <td>{{rowData.name}}</td>
- <td>{{rowData.id}}</td>
- <td><a ng-click="openColumnPopup(rowData)" class="icon-misc-pen"></a></td>
- </tr>
- </tbody>
- </table>
-</div>
-
-<div id="stepViewFormField" ng-show = "isFormFieldStep">
- <h1>Step 4 : Form Fields</h1>
- <table class="striped">
- <thead>
- <tr>
- <th>No</th>
- <th>Field Name</th>
- <th>Edit</th>
- <th>Delete</th>
- </tr>
- </thead>
- <tbody>
- <tr ng-repeat = "rowData in formFieldData">
- <td>{{$index+1}}</td>
- <td>{{rowData.name}}[{{rowData.id}}]</td>
- <td><a ng-click="openFormFieldPopup(rowData)" class="icon-misc-pen"></a></td>
- <td><a ng-click="deleteFormField(rowData)" class="icon-misc-trash"></a></td>
- </tr>
- </tbody>
- </table>
-</div>
-
-<div id="stepViewSecurity" ng-show = "isSecurityStep">
- <h1>Step 5 : Report Security</h1>
- <div class="noTableBorder">
- <table class="striped">
- <tbody>
- <tr>
- <td>Created By: {{reportSecurityInfo.createdUser}}</td>
- <td>Created Date: {{reportSecurityInfo.createdDate}}</td>
- <tr/>
- <tr>
- <td>Last Updated By: {{reportSecurityInfo.updateUser}}</td>
- <td>Last Updated: {{reportSecurityInfo.updatedDate}}</td>
- <tr/>
- <tr>
- <td>
- Report Owner:
-
- <select name="reportOwner" b2b-dropdown ng-model="reportOwnerId.id">
- <option b2b-dropdown-list option-repeat="d in reportOwnerList" value="{{d.id}}">{{d.name}}</option>
- </select>
-
- </td>
- <td>
- Public? (All users can run the report):
- <select name="isPublic" b2b-dropdown ng-model="reportSecurityInfo.isPublic">
- <option b2b-dropdown-list option-repeat="d in isPublicOptionList" value="{{d.value}}">{{d.text}}</option>
- </select>
- </td>
- <tr/>
- </tbody>
- </table>
- </div>
-
- <div style="margin-top:20px;">
- <h1 style="margin-bottom:5px;">Report Users</h1>
- <table class="striped">
- <thead>
- <tr>
- <th width="10%">No</th>
- <th width="45%">User Name</th>
- <th width="15%">Run Access</th>
- <th width="15%">Edit Access</th>
- <th width="15%">Remove</th>
- <tr/>
- </thead>
- <tbody>
- <tr ng-repeat = "reportUser in reportSecurityUsers">
- <td>{{$index+1}}</td>
- <td>{{reportUser.name}}</td>
- <td>
- <label for="switch{{$index+1}}runAccess" class="btn-switch-label">
- <input type="checkbox" role="switch" id="switch{{$index+1}}runAccess" b2b-switches ng-model=true ng-disabled=true aria-disabled=true aria-label="">
- </label>
- </td>
- <td>
- <label for="switch{{$index+1}}" class="btn-switch-label">
- <input type="checkbox" role="switch" id="switch{{$index+1}}" b2b-switches ng-model="reportUser.accessAllowed" ng-click="toggleUserEditAccessActive(reportUser)" ng-disabled=false aria-disabled=false aria-label="">
- </label>
- </td>
- <td>
- <a class="icon-misc-trash" style="font-size: 22px;" ng-click="removeReportSecurityUser(reportUser)"> </a>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- Grant Access To:
- </td>
-
- <td colspan="2">
- <select name="reportUser" b2b-dropdown ng-model="addReportUserId.id" placeholder-text="Select a User">
- <option b2b-dropdown-list option-repeat="d in reportOwnerList" value="{{d.id}}">{{d.name}}</option>
- </select>
- </td>
- <td>
- <button class="btn btn-alt btn-small" type="button" ng-click="addReportSecurityUser(addReportUserId.id)">Add</button>
- </td>
- </tr>
-
- </tbody>
- </table>
- </div>
-
- <div style="margin-top:20px;">
- <h1>Report Roles</h1>
- <table class="striped">
- <thead>
- <tr>
- <th width="10%">No</th>
- <th width="45%">Role Name</th>
- <th width="15%">Run Access</th>
- <th width="15%">Edit Access</th>
- <th width="15%">Remove</th>
- <tr/>
- </thead>
- <tbody>
- <tr ng-repeat = "reportRole in reportSecurityRoles">
- <td>{{$index+1}}</td>
- <td>{{reportRole.name}}</td>
- <td>
- <label for="switch{{$index+1}}RoleRunAccess" class="btn-switch-label">
- <input type="checkbox" role="switch" id="switch{{$index+1}}RoleRunAccess" b2b-switches ng-model=true ng-disabled=true aria-disabled=true aria-label="">
- </label>
- </td>
- <td>
- <label for="switch{{$index+1}}RoleEditAccess" class="btn-switch-label">
- <input type="checkbox" role="switch" id="switch{{$index+1}}RoleEditAccess" b2b-switches ng-model="reportRole.accessAllowed" ng-click="toggleRoleEditAccessActive(reportRole)" ng-disabled=false aria-disabled=false aria-label="">
- </label>
- </td>
- <td>
- <a class="icon-misc-trash" ng-click="removeReportSecurityRole(reportRole)" style="font-size: 22px;"> </a>
-
- </td>
- </tr>
- <tr>
- <td colspan="2">
- Grant Access To:
- </td>
- <td colspan="2">
- <select name="reportOwner" b2b-dropdown ng-model="addReportRoleId.id" placeholder-text="Select a Role">
- <option b2b-dropdown-list option-repeat="d in reportRoleList" value="{{d.id}}">{{d.name}}</option>
- </select>
- </td>
- <td>
- <button class="btn btn-alt btn-small" type="button" ng-click="addReportSecurityRole(addReportRoleId.id)">Add</button>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
-
-</div>
-
-<div id="stepView">
-</div>
-</div>
-
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools-list.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools-list.html
deleted file mode 100644
index b94b5c08..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools-list.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<div id="page-content">
- <h1 class="heading-page">Drools List</h1>
- <div id="droolsTable" title="Drools List">
- <table class="striped" table-data="tableData">
- <thead>
- <tr>
- <th>Drools File Name</th>
- <th>Class Name</th>
- <th>Run Rule</th>
- </tr>
- </thead>
- <tbody type="body" ng-repeat="rowData in tableData">
- <tr>
- <td ng-bind="rowData['droolsFile']"></td>
- <td ng-bind="rowData['className']"></td>
- <td>
- <div>
- <a href="samplePage#/drools/{{rowData.droolsFile}}" class="icon-controls-playalt"></a>
- </div>
- </td>
- </tr>
- </tbody>
-
- </table>
-
- <div ng-if="tableData==null || tableData.length==0" align="center">No records found</div>
- </div>
- <a href="samplePage#/drools/0">Go to Drools Rule Engine import page</a>
-
-</div>
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools.html
deleted file mode 100644
index cbc0cfc0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/drools.html
+++ /dev/null
@@ -1,55 +0,0 @@
-
-<div id="page-content">
- <div>
- <h1 class="heading-page">Drools Rule Engine</h1>
- </div>
- <div>
- <h2>Please enter below details:</h2>
- </div>
- <div ng-show="showLoader" class="span loader-container">
- <i class="icon-primary-spinner" role="img"
- aria-label="Please wait while we load your content"></i>
- </div>
- <div class="row-nowrap">
- <div class="span12">
- <div class="form-row">
- <label for="textinputID-2a">*Drools File</label>
- <div class="field-group">
- <input id="textinputID-2a" ddh-reset=""
- class="span12" type="text" data-ng-model="postDroolsBean.droolsFile">
- </div>
- </div>
- </div>
- <br>
- <div class="span12">
- <div class="form-row">
- <label for="textinputID-3a">*Class Name</label>
- <div class="field-group">
- <input id="textinputID-3a" ddh-reset=""
- class="span12" type="text"
- data-ng-model="postDroolsBean.className">
- </div>
- </div>
- </div>
- <br>
- <div class="span12">
- <div class="form-row">
- <label for="textinputID-3a">*Selected Rules </label>
- <div class="field-group">
- <input id="textinputID-3a" ddh-reset=""
- class="span12" type="text"
- data-ng-model="postDroolsBean.selectedRules">
- </div>
- </div>
- </div>
-
- </div>
- <br>
- <div>
- <button class="btn btn-alt btn-small" type="button" ng-click="execute(postDroolsBean);">Execute Rules</button>
- <a href="samplePage#/droolsList">Go to Drools list page</a>
- </div>
-</div>
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/frame_insert.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/frame_insert.html
deleted file mode 100644
index 5c2e45f9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/frame_insert.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<div>test</div>
-
-<iframe id="frame_insert" src="net_map_int"></iframe>
-
-<script type="text/javascript">
-
- var frameId = "#frame_insert";
-
- $(frameId).load(function(){
- iframeLoaded()
-
- });
-
-
- function iframeLoaded() {
- var iFrameRef = $(frameId);
- if(iFrameRef) {
-
- var height = iFrameRef.contents().find("input[name='inner_height']");
- var width = iFrameRef.contents().find("input[name='inner_width']");
-
- iFrameRef.css('height', (height.val() != undefined ? height.val():"500px"));
- iFrameRef.css('width', (width.val() != undefined ? width.val():"500px"));
- iFrameRef.css('border','none');
- }
- }
-</script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-frame.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-frame.html
deleted file mode 100644
index c9bcc27d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-frame.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Notebook Page</title>
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
- <!-- Common scripts -->
-
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
-
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
-
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
-
- <script src="app/fusion/external/utils/js/browserCheck.js"></script>
-
-
-
- <script src="app/fusion/scripts/DS2-controllers/ds2-sample/nbook-framecontroller.js"></script>
-
-
- <script src="app/fusion/scripts/DS2-controllers/ds2-sample/notebookFrameController.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/ds2-sample/nbook-framecontroller.js"></script>
-
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
-
- <!-- loadjscssfile("./app/fusion/external/utils/js/browserCheck.js","js");
- loadjscssfile("./app/fusion/scripts/DS2-services/adminService.js","js");
- loadjscssfile("./app/fusion/scripts/DS2-services/adminMenuService.js","js"); -->
-
-
-
-<!-- //<script src="dependency/joint.js"></script> -->
-
-</head>
- <body class="appBody" ng-app="abs">
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
-
-
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-page.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-page.html
deleted file mode 100644
index 0db933d6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-page.html
+++ /dev/null
@@ -1,80 +0,0 @@
-<div id="page-content" style="min-height: 500px">
- <div>
- <h1 class="heading-page">Notebook</h1>
- </div>
- <div class="form-row">
- <label for="textinputID1">Notebook ID:</label><BR> <input
- type="text" name="notebookid" b2b-reset maxlength=200 class="span12 "
- ng-model="notebookvalue"
- ng-init="notebookvalue='833c0a69ec1433fbb2f8752af733cf0e'"
- style="width: 180px" />
- </div>
- <BR>
-
- <!-- Use this for only 1 key value query parameter
- <div class="fn-ebz-container">
-
- <label class="fn-ebz-text-label">Key</label><BR>
- <input type="text" name="key" maxlength=200 ng-model="qparamKey" style="width:180px"/>
- </div>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Value</label><BR>
- <input type="text" name="val" maxlength=200 ng-model="qparamVal" style="width:180px"/>
- </div> -->
-
-
-
- <!-- Use this for multiple key value query parameters -->
- <div
- style="border: 2px; border-style: solid; border-color: #808080; margin-bottom: 9px; width: 55%; padding-bottom: 20px;">
- <div ng-repeat="kv in keyValueList">
- <div style="margin-left: 5px">
- <div class=" row-nowrap">
- <div class="form-row input-emphasized-field">
-
- <label for="textinputID1">Key</label><BR> <input type="text"
- id="textinputID-2a" b2b-reset name="key"
- class="span12 input-emphasized" maxlength=100 ng-model="kv.qK"
- style="width: 180px" />
- </div>
-
- <div class="form-row input-emphasized-field"
- style="padding-left: 50px;">
- <label for="textinputID1">Value</label><BR> <input
- type="text" id="textinputID-2a" b2b-reset name="val"
- class="span12 input-emphasized" maxlength=100 ng-model="kv.qV"
- style="width: 180px" />
- </div>
-
- <div class="fn-ebz-container"
- style="position: relative; top: 25px;">
- <button href="javascript:void(0)" id="addbtn"
- ng-show="{{$index==0}}"
- style="float: right; margin-left: 150px; bottom: -17px;"
- size="small" att-accessibility-click="13,32"
- class="btn btn-alt btn-small" ng-click="addKeyValuePairs(kv);">Add</button>
- <a href="javascript:void(0)" ng-show="{{$index>0}}"
- style="float: right; margin-left: 150px; bottom: -17px;"
- size="small" att-accessibility-click="13,32"
- ng-click="removeKeyValuePairs($index);"
- class="btn btn-alt btn-small"> Remove</a>
- </div>
-
- </div>
- </div>
- </div>
- </div>
-
-
-
-
- <BR>
-
- <div class="fn-ebz-container">
- <a class="btn btn-alt btn-small" btn-type="primary"
- att-accessibility-click="13,32" ng-click="submitParameters();">Submit</a>
- </div>
-
- <!-- <div ng-show="iframevisibility"><iframe id='itestfr' width="1400" height="1400"></iframe></div> -->
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-viz.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-viz.html
deleted file mode 100644
index 4c89ee41..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2-samplePages/notebook-viz.html
+++ /dev/null
@@ -1,7 +0,0 @@
- <div style="min-height:500px">
-
-
- <div><iframe id='itestframe' width="1400" height="1400" style="margin-left:300px;"></iframe></div>
-
-
- </div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html
deleted file mode 100644
index d0748e1d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Header.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<div class="header-main-div" >
- <header class="b2b-header-tabs" b2b-header-responsive ng-show="{{showHeader}}">
- <ul class="header__items" role="navigation">
- <li class="header__item icon__item" tabindex="0" ng-click="returnToPortal()">
- <div ng-include src="'app/fusion/scripts/DS2-view-models/header-logo.html'"></div>
- </li>
- <li b2b-header-menu class="header__item b2b-headermenu" ng-repeat="item in menuItems" role="presentation">
- <a href="javascript:void(0);" class="menu__item" role="menuitem" ng-bind="item.text"></a>
- <div class="header-secondary-wrapper">
- <ul class="header-secondary" role="menu">
- <li class="header-subitem" b2b-header-submenu
- ng-repeat="secondLevMenu in item.children" role="presentation">
- <a href="{{secondLevMenu.action}}" ng-if="secondLevMenu.childMenus.length==0" class="menu__item" role="menuitem" ng-bind="secondLevMenu.label"></a>
- <a href="javascript:void(0);" ng-if="secondLevMenu.childMenus.length!=0" class="menu__item" role="menuitem" ng-bind="secondLevMenu.label" ></a>
- <div class="header-tertiary-wrapper">
- <ul class="header-tertiary" role="menu">
- <li b2b-header-tertiarymenu ng-repeat="thirdLevMenu in secondLevMenu.childMenus"role="presentation">
- <a href="{{thirdLevMenu.action}}"role="menuitem" aria-haspopup="true" ng-bind="thirdLevMenu.label"></a>
- </li>
- </ul>
- </div>
- </li>
- </ul>
- </div></li>
- <li class="header__item profile">
- <b2b-flyout>
- <div b2b-flyout-toggler class="header-profile" >
- <div class="icon-people-oneperson" id="header-user-icon" tabindex="0" b2b-accessibility-click="13,32" aria-label="notifications" aria-haspopup="true" aria-expanded="{{flyoutOpened}}" role="button"></div>
- <div id="login-snippet-text" class="login-snippet-text">{{userFirstName}}</div>
- </div>
- <b2b-flyout-content horizontal-placement="center" vertical-placement="below">
- <div>
- <div id="reg-header-snippet">
- <div tabindex="0" class="reg-profileDetails" id="reg-profiledetails-id">
- <ul class="reg-Details-table">
- <li>
- <div class="reg-userName-table">
- <div id="reg-userName-table-row">
- <div id="reg-userName-table-cell">
- <h3 ng-bind="userName">&nbsp;</h3>
- <span>&nbsp;</span>
- </div>
- </div>
- </div>
- </li>
- <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn" style=font-weight:bold>Email<span class="visuallyhidden">:
- </span></span></div></li>
- <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn">
- {{userEmail}}</span></div></li>
- <li>&nbsp;</li>
- <li><div class="reg-userRole-label"><span class="reg-userRole-label-spn" style=font-weight:bold>
- User Id<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userRole-value"><span class="reg-userRole-value-spn">
- {{userId}}<span class="visuallyhidden"></span></span></div></li>
- </ul>
- <div id="reg-logout-div" style="padding-top: 8px">
- <a href="logout.htm" id="allLogout" class="btn btn-alt btn-small">
- Log out
- </a>
- </div>
- </div>
- </div>
- </div>
- </b2b-flyout-content>
- </b2b-flyout>
- </ul>
- </header>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Left_menu.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Left_menu.html
deleted file mode 100644
index c30a0b69..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/ds2Left_menu.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div>
- <left-menu-ecomp menu-data="menuData"></left-menu-ecomp>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/loginSnippet.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/loginSnippet.html
deleted file mode 100644
index 19868bb6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/loginSnippet.html
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-<script>
-var loginSnippetCtrl = function ($scope,$http, $log,UserInfoServiceDS2){
- /*Define fields*/
- $scope.userProfile={
- firstName:'',
- lastName:'',
- fullName:'',
- email:''
- }
- /*Put user info into fields*/
- $scope.inputUserInfo = function(userInfo){
- if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
- if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
- $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
- if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
- $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
- if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
- $scope.userProfile.email = userInfo.USER_EMAIL;
- if (typeof(userInfo.USER_ORG_USER_ID) != "undefined" && userInfo.USER_ORG_USER_ID!=null && userInfo.USER_ORG_USER_ID!='')
- $scope.userProfile.orgUserId = userInfo.USER_ORG_USER_ID;
- }
- }
- /*getting user info from session*/
- $scope.getUserNameFromSession = function(){
- UserInfoService.getFunctionalMenuStaticDetailSession()
- .then(function (response) {
- var j = response;
- // console.log(response);
- $scope.userProfile.fullName = response.userName;
- $scope.userProfile.orgUserId = response.orgUserId;
- $scope.userProfile.email = response.email;
- });
- }
- /*getting user info from shared context*/
- $scope.getUserName=function() {
- var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.info('loginSnippet: get user information from session');
- $scope.getUserNameFromSession();
- }else{
- // $log.info('Received User information from shared context',res);
- var resData = res;
- /* $scope.inputUserInfo(resData); */
- $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
- }
- },
- function(err) {
- console.log('error');
- }
- );
- };
- /*call the get user info function*/
- try{
- $scope.getUserName();
- }catch(err){
- $log.info('Error while getting User information',err);
- }
-}
- </script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-content.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-content.html
deleted file mode 100644
index 2626d01a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-content.html
+++ /dev/null
@@ -1,191 +0,0 @@
-<div id="page-content" class="content" gridster="gridsterOpts">
-
- <!-- Gridster Item starts here -->
- <div>
- <ul>
- <li gridster-item="item" ng-repeat="item in standardItems">
- <div class="box">
- <div class="box-header">
- <table >
- <tr>
- <th table-body width="5%" style="height:20px; float:left;height:100%;" class="icon-content-gridguide" ></th>
- <th>
- <h3 ng-if="item.max">{{item.headerText}}</h3>
- <h3 ng-hide="item.max">{{item.headerText.length<36?item.headerText:item.headerText.substring(0,35)+' ...'}} </h3>
- </th>
- <th>
- <div style="height:20px;" class="box-header-btns pull-right" >
- <div class="tileMinMaxBtn" ng-click="toggleMinMax($index,'')">
- <span class="tileMinMaxIcon">
- <i class="icon-controls-up" style="color:gray" ng-show="item.max"></i>
- <i class="icon-controls-down" style="color:gray" ng-hide="item.max"></i>
- </span>
- </div>
-<!-- <a title="settings" ng-click="openSettings(widget)"><i class="glyphicon glyphicon-cog"></i></a>
- <a title="Remove widget" ng-click="remove(widget)"><i class="glyphicon glyphicon-trash"></i></a> -->
- <class="icon-up">
- </div>
- </th>
- </tr>
- </table>
- </div>
- <div class="box-content">
-
- <div class="box-content-frame" align="center">
-
- <div align="left" ng-if="item.headerText=='Dashboard' && item.max" style="height: 360px;">
- <label>&nbsp; Sample Charts</label><BR>
- <iframe scrolling="yes" frameBorder="0" style="display:block; width: 460px; height:100%;" src="static/fusion/sample/html/wordcloud.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Donut Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/donut_d3.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Area Chart' && item.max">
- <div id="areaChart">
- <div> <svg></svg> </div>
- <script src="static/fusion/sample/html/js/area_chart.min.js"></script>
- </div>
- <!-- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/area_chart.html"></iframe> -->
- </div>
- <div ng-if="item.headerText=='Pie Chart' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/pie_chart.html"></iframe>
- </div>
- <div ng-if="item.headerText=='Line Chart' && item.max">
- <div id="lineChart">
- <div> <svg></svg> </div>
- <script src="static/fusion/sample/html/js/line_chart.min.js"></script>
- </div>
-
-<!-- <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/line_chart.html"></iframe> -->
- </div>
- <div ng-if="item.headerText=='Gauges' && item.max">
- <iframe scrolling="no" frameBorder="0" style="width: 310pxx; height: 210px;" src="static/fusion/sample/html/d3_gauges_demo.html"></iframe>
- </div>
-
- <div align="left" ng-if="item.headerText=='Traffic distribution by day of week' && item.max">
- <div id = "selectedTrafficDay">
- <ul>
- <li ng-repeat="Daytab in selectedTrafficDay"
- ng-class="{active1:isActiveTab1(Daytab.url)}"
- ng-click="onClickTab1(Daytab)">{{Daytab.title}}</li>
- </ul>
- <div id = "SelectedTrafficeDayView">
- <div ng-include="currentSelectedDayTab"></div>
- </div>
- <script type="text/ng-template" id="#Monday">
- <div id="Monday" align="centers"><img src="static/fusion/sample/images/tunnels/1_mon.png" width=100% height=100% alt="Monday"></div>
- </script>
- <script type="text/ng-template" id="#Tuesday">
- <div id="Tuesday" align="center"><img src="static/fusion/sample/images/tunnels/2_tue.png" width=100% height=100% alt="Tuesday"></div>
- </script>
- <script type="text/ng-template" id="#Wednesday">
- <div id="Wednesday" align="center"><img src="static/fusion/sample/images/tunnels/3_wed.png" width=100% height=100% alt="Wednesday"></div>
- </script>
- <script type="text/ng-template" id="#Thursday">
- <div id="Thursday" align="center"><img src="static/fusion/sample/images/tunnels/4_thu.png" width=100% height=100% alt="Thursday"></div>
- </script>
- <script type="text/ng-template" id="#Friday">
- <div id="Friday" align="center"><img src="static/fusion/sample/images/tunnels/5_fri.png" width=100% height=100% alt="Friday"></div>
- </script>
- <script type="text/ng-template" id="#Saturday">
- <div id="Saturday" align="center"><img src="static/fusion/sample/images/tunnels/6_sat.png" width=100% height=100% alt="Saturday"></div>
- </script>
- <script type="text/ng-template" id="#Sunday">
- <div id="Sunday" align="center"><img src="static/fusion/sample/images/tunnels/7_sun.png" width=100% height=100% alt="Sunday"></div>
- </script>
- </div>
- </div>
-
- <div align="left" ng-if="item.headerText=='Busy hour traffic analysis by day of week' && item.max">
- <div id = "BusyHourTraffic">
- <ul>
- <li ng-repeat="TrafficTab in BusyHourTraffic"
- ng-class="{active2:isActiveTab2(TrafficTab.url)}"
- ng-click="onClickTab2(TrafficTab)">{{TrafficTab.title}}</li>
- </ul>
- <div id = "BusyHourTrafficView">
- <div ng-include="currentSelectedBusyHourTraffic"></div>
- </div>
- <script type="text/ng-template" id="#Incoming">
- <div id="Incoming" align="left"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_IN.png" width=100% height=100%></div>
- </script>
- <script type="text/ng-template" id="#Outgoing">
- <div id="Outgoing" align="center"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png" width=100% height=100%></div>
- </script>
- <script type="text/n g-template" id="#Default">
- <div id="Default" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Def.png" width=100% height=100%></div>
- </script>
- <script type="text/ng-template" id="#Priority">
- <div id="Priority" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Priority.png" width=100% height=100%></div>
- </script>
- <script type="text/ng-template" id="#BHNational">
- <div id="BHNational" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat.png" width=100% height=100%></div>
- </script>
- </div>
- </div>
-
- <div align="left" ng-if="item.headerText=='Additional Samples' && item.max">
- <label>&nbsp;Quick Links</label>
- <table table
- id="additional-samples-table"
- search-string="searchStringIgnored"
- view-per-page="viewPerPageIgnored"
- current-page="currentPageIgnored"
- total-page="totalPageIgnored">
-
-
- <tr>
- <td table-body width="90%" ><a href="http://jquery.com" target="_blank">JQuery</a></td>
- <td table-body width="10%">
- <a ng-click="removeRole();" class="icon-misc-trash"></a>
- </td>
- </tr>
- <tr>
- <td table-body width="90%" ><a href="app/sequence/views/details.html" target="_blank">Network Simulation</a></td>
- <td table-body width="10%">
- <a ng-click="removeRole();" class="icon-misc-trash"></a>
- </td>
- </tr>
- <!-- <tr>
- <td table-body width="90%" ><a href="sample_heat_map.htm" target="">Heat Map</a></td>
- <td table-body width="10%">
- <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a>
- </td>
- </tr> -->
- <tr>
- <td table-body width="90%" ><a href="leafletMap.htm" target="">Animated Map</a></td>
- <td table-body width="10%">
- <a ng-click="removeRole();" class="icon-misc-trash"></a>
- </td>
- </tr>
- <tr>
- <td table-body width="90%" ><a href="collaborate_list.htm">Chat Session</a></td>
- <td table-body width="10%">
- <a ng-click="removeRole();" class="icon-misc-trash"></a>
- </td>
- </tr>
- </table>
- </div>
- <div ng-if="item.headerText=='Sticky Notes' && item.max">
- <div style="width:100%; height:400px" id="scribble-pad"><pre id="scribble" contenteditable="true" onkeyup="storeUserScribble(this.id);"></pre></div>
- </div>
-
- <div ng-if="item.headerText=='Service Configuration' && item.max">
-<!-- <accordion close-others="true" css="accordion" > -->
- <accordion-group heading="Service Configuration" ng-if="group11.open">
- <iframe style="overflow:auto" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example.html" ></iframe>
- </accordion-group>
- <accordion-group heading="VSP Service Configuration" ng-if="group12.open">
- <iframe style="overflow:auto" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example_vsp.html" ></iframe>
- </accordion-group>
-<!-- </accordion> -->
- </div>
-
- </div>
- </div>
- </div>
- </li>
- </ul>
- </div>
- <!-- Gridster Item ends here -->
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-sample.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-sample.html
deleted file mode 100644
index 52305d55..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome-sample.html
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html>
-<!-- Single-page application for EPSDK-App welcome page using DS2 look and feel -->
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <title>Welcome</title>
-
- <!-- Common CSS -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/extras/ds2-accordion.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/extras/ds2-bootstrap-datepicker.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/extras/ds2-cc-input-field.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/extras/ds2-tooltip.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/extras/x-tabs-pills.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-accordion.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-bootstrap-datepicker.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-c2c.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-cc-input-field.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-filmstrip.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-filters.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-legacynav-fix.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-marquee.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-pagination.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-popover.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-progressbar.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ds2-tooltip.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/global.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/digital-design-library.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-arrows.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-buildings.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-content.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-controls.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-datanetwork.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-devices.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-documents.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-healthcare.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-location.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-misc.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-numslets.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-people.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-retail.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-securityalerts.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-social.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-speechbubbles.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-test.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-transportation.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/icon-weather.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/x-tabs-pills.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <!-- Common scripts -->
-
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
-
- <script src="app/fusion/external/ds2/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
-
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <script src="app/fusion/external/ds2/js/digital-ng-library/digital-design-library.js"></script>
-
- <!-- Page-specific items -->
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/welcome-route.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/welcome-controller.js"></script>
-
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" />
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/flexslider.css" />
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/welcome.css" />
-
- <script src="static/fusion/d3/js/d3.v3.min.js"></script>
- <script src="static/fusion/d3/js/nv.d3.min.js"></script>
- <script src="static/fusion/d3/js/models/axis.min.js"></script>
-
-</head>
- <body class="appBody" ng-app="abs">
- <!-- commented the header for now to avoid duplicate headers on portal -->
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container" ></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html
deleted file mode 100644
index 0733e4e6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/DS2-view-models/welcome.html
+++ /dev/null
@@ -1,150 +0,0 @@
-<!DOCTYPE html>
-<!-- Single-page application for EPSDK-App welcome page using DS2 look and feel. X-->
-<html>
-<head>
- <meta charset="ISO-8859-1">
- <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />
-
- <title>Welcome</title>
-
- <!-- B2b Library -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/b2b-angular.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/b2b/css/b2b-angular/font_icons.css">
-
- <!-- icons in open source -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ionicons.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ds2/css/digital-ng-library/ecomp-ionicons.css">
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-bootstrap/ui-bootstrap-csp.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/angular-gridster/dist/angular-gridster.min.css">
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" />
- <link rel="stylesheet" type="text/css" href="static/fusion/sample/css/welcome.css" />
-
- <link rel="stylesheet" type="text/css" href="app/fusion/styles/ecomp.css">
-
- <!-- Common scripts -->
- <script src="app/fusion/external/angular-1.4.8/angular.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-messages.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-touch.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.min.js"></script>
- <script src="app/fusion/external/jquery/dist/jquery.min.js"></script>
- <script src="app/fusion/external/javascript-detect-element-resize/jquery.resize.js"></script>
- <script src="app/fusion/external/angular-bootstrap/ui-bootstrap-tpls.min.js"></script>
- <script src="app/fusion/external/angular-gridster/dist/angular-gridster.min.js"></script>
-
- <!-- EPSDK App scripts and common services -->
- <!-- B2b Library -->
- <script src="app/fusion/external/b2b/js/b2b-angular/b2b-library.min.js"></script>
- <script src="app/fusion/scripts/DS2-services/ds2-modal/modalService.js"></script>
- <script src="app/fusion/external/ds2/js/appDS2.js"></script>
-
- <script src="app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/headerServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/leftMenuServiceDS2.js"></script>
- <script src="app/fusion/scripts/DS2-services/manifestService.js"></script>
-
- <script src="app/fusion/scripts/DS2-directives/footer.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2Header.js"></script>
- <script src="app/fusion/scripts/DS2-directives/ds2LeftMenu.js"></script>
- <script src="app/fusion/scripts/DS2-directives/b2b-leftnav-ext.js"></script>
- <script src= "app/fusion/scripts/DS2-services/userInfoServiceDS2.js"></script>
-
- <!-- Page specific items -->
- <script src="app/fusion/scripts/DS2-controllers/welcome-controller.js"></script>
- <script src="app/fusion/scripts/DS2-controllers/welcome-route.js"></script>
-
-<style>
-
-.controls {
- margin-bottom: 20px;
-}
-.page-header {
- margin-top: 20px;
-}
-ul {
- list-style: none;
-}
-.box {
- height: 100%;
- border: 1px solid #ccc;
- background-color: #fff;
- position: relative;
- overflow: hidden;
-}
-.box-header {
- background-color: #eee;
- padding: 0px 0px 0px 0px;
-/* border-bottom: 1px solid #ccc; */
- margin-bottom: -25px;
- cursor: move;
- position: relative;
-}
-.box-header h3 {
- margin-top: 0px;
- display: inline-block;
-}
-.box-content {
- padding: 10px;
- display:block;
- height: 100%;
- position: relative;
- overflow-x:auto;
- overflow-y:auto;
-}
-.box-header-btns {
- top: 15px;
- right: 10px;
- cursor: pointer;
- position: absolute;
-}
-
-.gridster {
- border: none;
- position:relative;
-}
-
-.box-content .box-content-frame{
-
-}
-
-.box table{
-border:none;
-display:block;
-}
-
-.box table tr{
-line-height:20px;
-}
-
-.box table th{
-border:none;
-line-height:20px;
-}
-
-/* .header-container{
- margin-top:-50px;
-} */
-/* .content-container{
- margin-top:50px;
-} */
-.menu-container{
-margin-top:0px
-}
-
-.handle-e {
-width:3px;
-}
-
-</style>
-
-</head>
- <body class="appBody" ng-app="abs">
- <!-- commented the header for now to avoid duplicate headers on portal -->
- <div ds2-Header class="header-container" ></div>
- <div ds2-menu id="menuContainer" class="menu-container"></div>
- <div ng-view id="rightContentProfile" class="content-container"></div>
- <div ds2-Footer class="footer-container"></div>
- </body>
-</html>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js
deleted file mode 100644
index 985fa434..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/angular-gridster.js
+++ /dev/null
@@ -1,2244 +0,0 @@
-/*global define:true*/
-(function(root, factory) {
-
- 'use strict';
-
- if (typeof define === 'function' && define.amd) {
- // AMD
- define(['angular'], factory);
- } else if (typeof exports === 'object') {
- // CommonJS
- module.exports = factory(require('angular'));
- } else {
- // Browser, nothing "exported". Only registered as a module with angular.
- factory(root.angular);
- }
-}(this, function(angular) {
-
- 'use strict';
-
- var ie8 = false;
-
- var getInternetExplorerVersion = function ()
- // Returns the version of Internet Explorer >4 or
- // undefined(indicating the use of another browser).
- {
- var isIE10 = (eval("/*@cc_on!@*/false") && document.documentMode === 10);
- if (isIE10) {
- return 10;
- }
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
- do {
- div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->';
- } while (all[0]);
- return v > 4 ? v : undefined;
- };
-
- var browserVersion = getInternetExplorerVersion();
-
- if (browserVersion && browserVersion < 9) {
- ie8 = true;
- }
-
- // This returned angular module 'gridster' is what is exported.
- return angular.module('attGridsterLib', [])
-
- .constant('gridsterConfig', {
- columns: 6, // number of columns in the grid
- pushing: true, // whether to push other items out of the way
- floating: true, // whether to automatically float items up so they stack
- swapping: true, // whether or not to have items switch places instead of push down if they are the same size
- width: 'auto', // width of the grid. "auto" will expand the grid to its parent container
- colWidth: 'auto', // width of grid columns. "auto" will divide the width of the grid evenly among the columns
- rowHeight: 'match', // height of grid rows. 'match' will make it the same as the column width, a numeric value will be interpreted as pixels, '/2' is half the column width, '*5' is five times the column width, etc.
- margins: [10, 10], // margins in between grid items
- outerMargin: false,
- isMobile: false, // toggle mobile view
- mobileBreakPoint: 100, // width threshold to toggle mobile mode
- mobileModeEnabled: true, // whether or not to toggle mobile mode when screen width is less than mobileBreakPoint
- minColumns: 1, // minimum amount of columns the grid can scale down to
- minRows: 1, // minimum amount of rows to show if the grid is empty
- maxRows: 100, // maximum amount of rows in the grid
- defaultSizeX: 1, // default width of an item in columns
- defaultSizeY: 1, // default height of an item in rows
- minSizeX: 1, // minimum column width of an item
- maxSizeX: null, // maximum column width of an item
- minSizeY: 1, // minumum row height of an item
- maxSizeY: null, // maximum row height of an item
- saveGridItemCalculatedHeightInMobile: false, // grid item height in mobile display. true- to use the calculated height by sizeY given
- resizable: { // options to pass to resizable handler
- enabled: false,
- handles: ['s', 'e', 'n', 'w', 'se', 'ne', 'sw', 'nw']
- },
- draggable: { // options to pass to draggable handler
- enabled: true,
- scrollSensitivity: 20, // Distance in pixels from the edge of the viewport after which the viewport should scroll, relative to pointer
- scrollSpeed: 15 // Speed at which the window should scroll once the mouse pointer gets within scrollSensitivity distance
- }
- })
-
- .controller('GridsterCtrl', ['gridsterConfig', '$timeout',
- function(gridsterConfig, $timeout) {
-
- var gridster = this;
-
- /**
- * Create options from gridsterConfig constant
- */
- angular.extend(this, gridsterConfig);
-
- this.resizable = angular.extend({}, gridsterConfig.resizable || {});
- this.draggable = angular.extend({}, gridsterConfig.draggable || {});
-
- var flag = false;
- this.layoutChanged = function() {
- if (flag) {
- return;
- }
- flag = true;
- $timeout(function() {
- flag = false;
- if (gridster.loaded) {
- gridster.floatItemsUp();
- }
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- }, 30);
- };
-
- /**
- * A positional array of the items in the grid
- */
- this.grid = [];
-
- /**
- * Clean up after yourself
- */
- this.destroy = function() {
- // empty the grid to cut back on the possibility
- // of circular references
- if (this.grid) {
- this.grid = [];
- }
- this.$element = null;
- };
-
- /**
- * Overrides default options
- *
- * @param {Object} options The options to override
- */
- this.setOptions = function(options) {
- if (!options) {
- return;
- }
-
- options = angular.extend({}, options);
-
- // all this to avoid using jQuery...
- if (options.draggable) {
- angular.extend(this.draggable, options.draggable);
- delete(options.draggable);
- }
- if (options.resizable) {
- angular.extend(this.resizable, options.resizable);
- delete(options.resizable);
- }
-
- angular.extend(this, options);
-
- if (!this.margins || this.margins.length !== 2) {
- this.margins = [0, 0];
- } else {
- for (var x = 0, l = this.margins.length; x < l; ++x) {
- this.margins[x] = parseInt(this.margins[x], 10);
- if (isNaN(this.margins[x])) {
- this.margins[x] = 0;
- }
- }
- }
- };
-
- /**
- * Check if item can occupy a specified position in the grid
- *
- * @param {Object} item The item in question
- * @param {Number} row The row index
- * @param {Number} column The column index
- * @returns {Boolean} True if if item fits
- */
- this.canItemOccupy = function(item, row, column) {
- return row > -1 && column > -1 && item.sizeX + column <= this.columns && item.sizeY + row <= this.maxRows;
- };
-
- /**
- * Set the item in the first suitable position
- *
- * @param {Object} item The item to insert
- */
- this.autoSetItemPosition = function(item) {
- // walk through each row and column looking for a place it will fit
- for (var rowIndex = 0; rowIndex < this.maxRows; ++rowIndex) {
- for (var colIndex = 0; colIndex < this.columns; ++colIndex) {
- // only insert if position is not already taken and it can fit
- var items = this.getItems(rowIndex, colIndex, item.sizeX, item.sizeY, item);
- if (items.length === 0 && this.canItemOccupy(item, rowIndex, colIndex)) {
- this.putItem(item, rowIndex, colIndex);
- return;
- }
- }
- }
- throw new Error('Unable to place item!');
- };
-
- /**
- * Gets items at a specific coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Number} sizeX
- * @param {Number} sizeY
- * @param {Array} excludeItems An array of items to exclude from selection
- * @returns {Array} Items that match the criteria
- */
- this.getItems = function(row, column, sizeX, sizeY, excludeItems) {
- var items = [];
- if (!sizeX || !sizeY) {
- sizeX = sizeY = 1;
- }
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- for (var h = 0; h < sizeY; ++h) {
- for (var w = 0; w < sizeX; ++w) {
- var item = this.getItem(row + h, column + w, excludeItems);
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && items.indexOf(item) === -1) {
- items.push(item);
- }
- }
- }
- return items;
- };
-
- /**
- * @param {Array} items
- * @returns {Object} An item that represents the bounding box of the items
- */
- this.getBoundingBox = function(items) {
-
- if (items.length === 0) {
- return null;
- }
- if (items.length === 1) {
- return {
- row: items[0].row,
- col: items[0].col,
- sizeY: items[0].sizeY,
- sizeX: items[0].sizeX
- };
- }
-
- var maxRow = 0;
- var maxCol = 0;
- var minRow = 9999;
- var minCol = 9999;
-
- for (var i = 0, l = items.length; i < l; ++i) {
- var item = items[i];
- minRow = Math.min(item.row, minRow);
- minCol = Math.min(item.col, minCol);
- maxRow = Math.max(item.row + item.sizeY, maxRow);
- maxCol = Math.max(item.col + item.sizeX, maxCol);
- }
-
- return {
- row: minRow,
- col: minCol,
- sizeY: maxRow - minRow,
- sizeX: maxCol - minCol
- };
- };
-
-
- /**
- * Removes an item from the grid
- *
- * @param {Object} item
- */
- this.removeItem = function(item) {
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- var index = columns.indexOf(item);
- if (index !== -1) {
- columns[index] = null;
- break;
- }
- }
- this.layoutChanged();
- };
-
- /**
- * Returns the item at a specified coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Array} excludeItems Items to exclude from selection
- * @returns {Object} The matched item or null
- */
- this.getItem = function(row, column, excludeItems) {
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- var sizeY = 1;
- while (row > -1) {
- var sizeX = 1,
- col = column;
- while (col > -1) {
- var items = this.grid[row];
- if (items) {
- var item = items[col];
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && item.sizeX >= sizeX && item.sizeY >= sizeY) {
- return item;
- }
- }
- ++sizeX;
- --col;
- }
- --row;
- ++sizeY;
- }
- return null;
- };
-
- /**
- * Insert an array of items into the grid
- *
- * @param {Array} items An array of items to insert
- */
- this.putItems = function(items) {
- for (var i = 0, l = items.length; i < l; ++i) {
- this.putItem(items[i]);
- }
- };
-
- /**
- * Insert a single item into the grid
- *
- * @param {Object} item The item to insert
- * @param {Number} row (Optional) Specifies the items row index
- * @param {Number} column (Optional) Specifies the items column index
- * @param {Array} ignoreItems
- */
- this.putItem = function(item, row, column, ignoreItems) {
- // auto place item if no row specified
- if (typeof row === 'undefined' || row === null) {
- row = item.row;
- column = item.col;
- if (typeof row === 'undefined' || row === null) {
- this.autoSetItemPosition(item);
- return;
- }
- }
-
- // keep item within allowed bounds
- if (!this.canItemOccupy(item, row, column)) {
- column = Math.min(this.columns - item.sizeX, Math.max(0, column));
- row = Math.min(this.maxRows - item.sizeY, Math.max(0, row));
- }
-
- // check if item is already in grid
- if (item.oldRow !== null && typeof item.oldRow !== 'undefined') {
- var samePosition = item.oldRow === row && item.oldColumn === column;
- var inGrid = this.grid[row] && this.grid[row][column] === item;
- if (samePosition && inGrid) {
- item.row = row;
- item.col = column;
- return;
- } else {
- // remove from old position
- var oldRow = this.grid[item.oldRow];
- if (oldRow && oldRow[item.oldColumn] === item) {
- delete oldRow[item.oldColumn];
- }
- }
- }
-
- item.oldRow = item.row = row;
- item.oldColumn = item.col = column;
-
- this.moveOverlappingItems(item, ignoreItems);
-
- if (!this.grid[row]) {
- this.grid[row] = [];
- }
- this.grid[row][column] = item;
-
- if (this.movingItem === item) {
- this.floatItemUp(item);
- }
- this.layoutChanged();
- };
-
- /**
- * Trade row and column if item1 with item2
- *
- * @param {Object} item1
- * @param {Object} item2
- */
- this.swapItems = function(item1, item2) {
- this.grid[item1.row][item1.col] = item2;
- this.grid[item2.row][item2.col] = item1;
-
- var item1Row = item1.row;
- var item1Col = item1.col;
- item1.row = item2.row;
- item1.col = item2.col;
- item2.row = item1Row;
- item2.col = item1Col;
- };
-
- /**
- * Prevents items from being overlapped
- *
- * @param {Object} item The item that should remain
- * @param {Array} ignoreItems
- */
- this.moveOverlappingItems = function(item, ignoreItems) {
- // don't move item, so ignore it
- if (!ignoreItems) {
- ignoreItems = [item];
- } else if (ignoreItems.indexOf(item) === -1) {
- ignoreItems = ignoreItems.slice(0);
- ignoreItems.push(item);
- }
-
- // get the items in the space occupied by the item's coordinates
- var overlappingItems = this.getItems(
- item.row,
- item.col,
- item.sizeX,
- item.sizeY,
- ignoreItems
- );
- this.moveItemsDown(overlappingItems, item.row + item.sizeY, ignoreItems);
- };
-
- /**
- * Moves an array of items to a specified row
- *
- * @param {Array} items The items to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemsDown = function(items, newRow, ignoreItems) {
- if (!items || items.length === 0) {
- return;
- }
- items.sort(function(a, b) {
- return a.row - b.row;
- });
-
- ignoreItems = ignoreItems ? ignoreItems.slice(0) : [];
- var topRows = {},
- item, i, l;
-
- // calculate the top rows in each column
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var topRow = topRows[item.col];
- if (typeof topRow === 'undefined' || item.row < topRow) {
- topRows[item.col] = item.row;
- }
- }
-
- // move each item down from the top row in its column to the row
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var rowsToMove = newRow - topRows[item.col];
- this.moveItemDown(item, item.row + rowsToMove, ignoreItems);
- ignoreItems.push(item);
- }
- };
-
- /**
- * Moves an item down to a specified row
- *
- * @param {Object} item The item to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemDown = function(item, newRow, ignoreItems) {
- if (item.row >= newRow) {
- return;
- }
- while (item.row < newRow) {
- ++item.row;
- this.moveOverlappingItems(item, ignoreItems);
- }
- this.putItem(item, item.row, item.col, ignoreItems);
- };
-
- /**
- * Moves all items up as much as possible
- */
- this.floatItemsUp = function() {
- if (this.floating === false) {
- return;
- }
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- var item = columns[colIndex];
- if (item) {
- this.floatItemUp(item);
- }
- }
- }
- };
-
- /**
- * Float an item up to the most suitable row
- *
- * @param {Object} item The item to move
- */
- this.floatItemUp = function(item) {
- if (this.floating === false) {
- return;
- }
- var colIndex = item.col,
- sizeY = item.sizeY,
- sizeX = item.sizeX,
- bestRow = null,
- bestColumn = null,
- rowIndex = item.row - 1;
-
- while (rowIndex > -1) {
- var items = this.getItems(rowIndex, colIndex, sizeX, sizeY, item);
- if (items.length !== 0) {
- break;
- }
- bestRow = rowIndex;
- bestColumn = colIndex;
- --rowIndex;
- }
- if (bestRow !== null) {
- this.putItem(item, bestRow, bestColumn);
- }
- };
-
- /**
- * Update gridsters height
- *
- * @param {Number} plus (Optional) Additional height to add
- */
- this.updateHeight = function(plus) {
- var maxHeight = this.minRows;
- plus = plus || 0;
- for (var rowIndex = this.grid.length; rowIndex >= 0; --rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- maxHeight = Math.max(maxHeight, rowIndex + plus + columns[colIndex].sizeY);
- }
- }
- }
- this.gridHeight = this.maxRows - maxHeight > 0 ? Math.min(this.maxRows, maxHeight) : Math.max(this.maxRows, maxHeight);
- };
-
- /**
- * Returns the number of rows that will fit in given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- */
- this.pixelsToRows = function(pixels, ceilOrFloor) {
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curRowHeight);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curRowHeight);
- }
-
- return Math.round(pixels / this.curRowHeight);
- };
-
- /**
- * Returns the number of columns that will fit in a given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- * @returns {Number} The number of columns
- */
- this.pixelsToColumns = function(pixels, ceilOrFloor) {
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curColWidth);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curColWidth);
- }
-
- return Math.round(pixels / this.curColWidth);
- };
- }
- ])
-
- .directive('gridsterPreview', function() {
- return {
- replace: true,
- scope: true,
- require: '^gridster',
- template: '<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',
- link: function(scope, $el, attrs, gridster) {
-
- /**
- * @returns {Object} style object for preview element
- */
- scope.previewStyle = function() {
-
- if (!gridster.movingItem) {
- return {
- display: 'none'
- };
- }
-
- return {
- display: 'block',
- height: (gridster.movingItem.sizeY * gridster.curRowHeight - gridster.margins[0]) + 'px',
- width: (gridster.movingItem.sizeX * gridster.curColWidth - gridster.margins[1]) + 'px',
- top: (gridster.movingItem.row * gridster.curRowHeight + (gridster.outerMargin ? gridster.margins[0] : 0)) + 'px',
- left: (gridster.movingItem.col * gridster.curColWidth + (gridster.outerMargin ? gridster.margins[1] : 0)) + 'px'
- };
- };
- }
- };
- })
-
- /**
- * The gridster directive
- *
- * @param {Function} $timeout
- * @param {Object} $window
- * @param {Object} $rootScope
- * @param {Function} gridsterDebounce
- */
- .directive('gridster', ['$timeout', '$window', '$rootScope', 'gridsterDebounce',
- function($timeout, $window, $rootScope, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EAC',
- controller: 'GridsterCtrl',
- controllerAs: 'gridster',
- compile: function($tplElem) {
-
- $tplElem.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>');
-
- return function(scope, $elem, attrs, gridster) {
- gridster.loaded = false;
-
- gridster.$element = $elem;
-
- scope.gridster = gridster;
-
- $elem.addClass('gridster');
-
- var isVisible = function(ele) {
- return ele.style.visibility !== 'hidden' && ele.style.display !== 'none';
- };
-
- function refresh(config) {
- gridster.setOptions(config);
-
- if (!isVisible($elem[0])) {
- return;
- }
-
- // resolve "auto" & "match" values
- if (gridster.width === 'auto') {
- gridster.curWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- } else {
- gridster.curWidth = gridster.width;
- }
-
- if (gridster.colWidth === 'auto') {
- gridster.curColWidth = (gridster.curWidth + (gridster.outerMargin ? -gridster.margins[1] : gridster.margins[1])) / gridster.columns;
- } else {
- gridster.curColWidth = gridster.colWidth;
- }
-
- gridster.curRowHeight = gridster.rowHeight;
- if (typeof gridster.rowHeight === 'string') {
- if (gridster.rowHeight === 'match') {
- gridster.curRowHeight = Math.round(gridster.curColWidth);
- } else if (gridster.rowHeight.indexOf('*') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth * gridster.rowHeight.replace('*', '').replace(' ', ''));
- } else if (gridster.rowHeight.indexOf('/') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth / gridster.rowHeight.replace('/', '').replace(' ', ''));
- }
- }
-
- gridster.isMobile = gridster.mobileModeEnabled && gridster.curWidth <= gridster.mobileBreakPoint;
-
- // loop through all items and reset their CSS
- for (var rowIndex = 0, l = gridster.grid.length; rowIndex < l; ++rowIndex) {
- var columns = gridster.grid[rowIndex];
- if (!columns) {
- continue;
- }
-
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- var item = columns[colIndex];
- item.setElementPosition();
- item.setElementSizeY();
- item.setElementSizeX();
- }
- }
- }
-
- updateHeight();
- }
-
- var optionsKey = attrs.gridster;
- if (optionsKey) {
- scope.$parent.$watch(optionsKey, function(newConfig) {
- refresh(newConfig);
- }, true);
- } else {
- refresh({});
- }
-
- scope.$watch(function() {
- return gridster.loaded;
- }, function() {
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- } else {
- $elem.removeClass('gridster-loaded');
- }
- });
-
- scope.$watch(function() {
- return gridster.isMobile;
- }, function() {
- if (gridster.isMobile) {
- $elem.addClass('gridster-mobile').removeClass('gridster-desktop');
- } else {
- $elem.removeClass('gridster-mobile').addClass('gridster-desktop');
- }
- $rootScope.$broadcast('gridster-mobile-changed', gridster);
- });
-
- scope.$watch(function() {
- return gridster.draggable;
- }, function() {
- $rootScope.$broadcast('gridster-draggable-changed', gridster);
- }, true);
-
- scope.$watch(function() {
- return gridster.resizable;
- }, function() {
- $rootScope.$broadcast('gridster-resizable-changed', gridster);
- }, true);
-
- function updateHeight() {
- if(gridster.gridHeight){ //need to put this check, otherwise fail in IE8
- $elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px');
- }
- }
-
- scope.$watch(function() {
- return gridster.gridHeight;
- }, updateHeight);
-
- scope.$watch(function() {
- return gridster.movingItem;
- }, function() {
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- });
-
- var prevWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- var resize = function() {
- var width = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- if (!width || width === prevWidth || gridster.movingItem) {
- return;
- }
- prevWidth = width;
-
- if (gridster.loaded) {
- $elem.removeClass('gridster-loaded');
- }
-
- refresh();
-
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- }
-
- $rootScope.$broadcast('gridster-resized', [width, $elem[0].offsetHeight], gridster);
- };
-
- // track element width changes any way we can
- var onResize = gridsterDebounce(function onResize() {
- resize();
- $timeout(function() {
- scope.$apply();
- });
- }, 100);
-
- scope.$watch(function() {
- return isVisible($elem[0]);
- }, onResize);
-
- // see https://github.com/sdecima/javascript-detect-element-resize
- if (typeof window.addResizeListener === 'function') {
- window.addResizeListener($elem[0], onResize);
- } else {
- scope.$watch(function() {
- return $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- }, resize);
- }
- var $win = angular.element($window);
- $win.on('resize', onResize);
-
- // be sure to cleanup
- scope.$on('$destroy', function() {
- gridster.destroy();
- $win.off('resize', onResize);
- if (typeof window.removeResizeListener === 'function') {
- window.removeResizeListener($elem[0], onResize);
- }
- });
-
- // allow a little time to place items before floating up
- $timeout(function() {
- scope.$watch('gridster.floating', function() {
- gridster.floatItemsUp();
- });
- gridster.loaded = true;
- }, 100);
- };
- }
- };
- }
- ])
-
- .controller('GridsterItemCtrl', function() {
- this.$element = null;
- this.gridster = null;
- this.row = null;
- this.col = null;
- this.sizeX = null;
- this.sizeY = null;
- this.minSizeX = 0;
- this.minSizeY = 0;
- this.maxSizeX = null;
- this.maxSizeY = null;
-
- this.init = function($element, gridster) {
- this.$element = $element;
- this.gridster = gridster;
- this.sizeX = gridster.defaultSizeX;
- this.sizeY = gridster.defaultSizeY;
- };
-
- this.destroy = function() {
- // set these to null to avoid the possibility of circular references
- this.gridster = null;
- this.$element = null;
- };
-
- /**
- * Returns the items most important attributes
- */
- this.toJSON = function() {
- return {
- row: this.row,
- col: this.col,
- sizeY: this.sizeY,
- sizeX: this.sizeX
- };
- };
-
- this.isMoving = function() {
- return this.gridster.movingItem === this;
- };
-
- /**
- * Set the items position
- *
- * @param {Number} row
- * @param {Number} column
- */
- this.setPosition = function(row, column) {
- this.gridster.putItem(this, row, column);
-
- if (!this.isMoving()) {
- this.setElementPosition();
- }
- };
-
- /**
- * Sets a specified size property
- *
- * @param {String} key Can be either "x" or "y"
- * @param {Number} value The size amount
- * @param {Boolean} preventMove
- */
- this.setSize = function(key, value, preventMove) {
- key = key.toUpperCase();
- var camelCase = 'size' + key,
- titleCase = 'Size' + key;
- if (value === '') {
- return;
- }
- value = parseInt(value, 10);
- if (isNaN(value) || value === 0) {
- value = this.gridster['default' + titleCase];
- }
- var max = key === 'X' ? this.gridster.columns : this.gridster.maxRows;
- if (this['max' + titleCase]) {
- max = Math.min(this['max' + titleCase], max);
- }
- if (this.gridster['max' + titleCase]) {
- max = Math.min(this.gridster['max' + titleCase], max);
- }
- if (key === 'X' && this.cols) {
- max -= this.cols;
- } else if (key === 'Y' && this.rows) {
- max -= this.rows;
- }
-
- var min = 0;
- if (this['min' + titleCase]) {
- min = Math.max(this['min' + titleCase], min);
- }
- if (this.gridster['min' + titleCase]) {
- min = Math.max(this.gridster['min' + titleCase], min);
- }
-
- value = Math.max(Math.min(value, max), min);
-
- var changed = (this[camelCase] !== value || (this['old' + titleCase] && this['old' + titleCase] !== value));
- this['old' + titleCase] = this[camelCase] = value;
-
- if (!this.isMoving()) {
- this['setElement' + titleCase]();
- }
- if (!preventMove && changed) {
- this.gridster.moveOverlappingItems(this);
- this.gridster.layoutChanged();
- }
-
- return changed;
- };
-
- /**
- * Sets the items sizeY property
- *
- * @param {Number} rows
- * @param {Boolean} preventMove
- */
- this.setSizeY = function(rows, preventMove) {
- return this.setSize('Y', rows, preventMove);
- };
-
- /**
- * Sets the items sizeX property
- *
- * @param {Number} columns
- * @param {Boolean} preventMove
- */
- this.setSizeX = function(columns, preventMove) {
- return this.setSize('X', columns, preventMove);
- };
-
- /**
- * Sets an elements position on the page
- */
- this.setElementPosition = function() {
- if (this.gridster.isMobile) {
- this.$element.css({
- marginLeft: this.gridster.margins[0] + 'px',
- marginRight: this.gridster.margins[0] + 'px',
- marginTop: this.gridster.margins[1] + 'px',
- marginBottom: this.gridster.margins[1] + 'px',
- top: '',
- left: ''
- });
- } else {
- this.$element.css({
- margin: 0,
- top: (this.row * this.gridster.curRowHeight + (this.gridster.outerMargin ? this.gridster.margins[0] : 0)) + 'px',
- left: (this.col * this.gridster.curColWidth + (this.gridster.outerMargin ? this.gridster.margins[1] : 0)) + 'px'
- });
- }
- };
-
- /**
- * Sets an elements height
- */
- this.setElementSizeY = function() {
- if (this.gridster.isMobile && !this.gridster.saveGridItemCalculatedHeightInMobile) {
- this.$element.css('height', '');
- } else {
- var computedHeight = (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]) + 'px';
- //this.$element.css('height', computedHeight);
- this.$element.attr('style', this.$element.attr('style') + '; ' + 'height: '+computedHeight+' !important;');
- }
- };
-
- /**
- * Sets an elements width
- */
- this.setElementSizeX = function() {
- if (this.gridster.isMobile) {
- this.$element.css('width', '');
- } else {
- this.$element.css('width', (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]) + 'px');
- }
- };
-
- /**
- * Gets an element's width
- */
- this.getElementSizeX = function() {
- return (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]);
- };
-
- /**
- * Gets an element's height
- */
- this.getElementSizeY = function() {
- return (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]);
- };
-
- })
-
- .factory('GridsterTouch', [function() {
- return function GridsterTouch(target, startEvent, moveEvent, endEvent) {
- var lastXYById = {};
-
- // Opera doesn't have Object.keys so we use this wrapper
- var numberOfKeys = function(theObject) {
- if (Object.keys) {
- return Object.keys(theObject).length;
- }
-
- var n = 0,
- key;
- for (key in theObject) {
- ++n;
- }
-
- return n;
- };
-
- // this calculates the delta needed to convert pageX/Y to offsetX/Y because offsetX/Y don't exist in the TouchEvent object or in Firefox's MouseEvent object
- var computeDocumentToElementDelta = function(theElement) {
- var elementLeft = 0;
- var elementTop = 0;
- var oldIEUserAgent = navigator.userAgent.match(/\bMSIE\b/);
-
- for (var offsetElement = theElement; offsetElement != null; offsetElement = offsetElement.offsetParent) {
- // the following is a major hack for versions of IE less than 8 to avoid an apparent problem on the IEBlog with double-counting the offsets
- // this may not be a general solution to IE7's problem with offsetLeft/offsetParent
- if (oldIEUserAgent &&
- (!document.documentMode || document.documentMode < 8) &&
- offsetElement.currentStyle.position === 'relative' && offsetElement.offsetParent && offsetElement.offsetParent.currentStyle.position === 'relative' && offsetElement.offsetLeft === offsetElement.offsetParent.offsetLeft) {
- // add only the top
- elementTop += offsetElement.offsetTop;
- } else {
- elementLeft += offsetElement.offsetLeft;
- elementTop += offsetElement.offsetTop;
- }
- }
-
- return {
- x: elementLeft,
- y: elementTop
- };
- };
-
- // cache the delta from the document to our event target (reinitialized each mousedown/MSPointerDown/touchstart)
- var documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // common event handler for the mouse/pointer/touch models and their down/start, move, up/end, and cancel events
- var doEvent = function(theEvtObj) {
-
- if (theEvtObj.type === 'mousemove' && numberOfKeys(lastXYById) === 0) {
- return;
- }
-
- var prevent = true;
-
- var pointerList = theEvtObj.changedTouches ? theEvtObj.changedTouches : [theEvtObj];
-
- for (var i = 0; i < pointerList.length; ++i) {
- var pointerObj = pointerList[i];
- var pointerId = (typeof pointerObj.identifier !== 'undefined') ? pointerObj.identifier : (typeof pointerObj.pointerId !== 'undefined') ? pointerObj.pointerId : 1;
-
- // use the pageX/Y coordinates to compute target-relative coordinates when we have them (in ie < 9, we need to do a little work to put them there)
- if (typeof pointerObj.pageX === 'undefined') {
-
- // initialize assuming our source element is our target
- if(!ie8){
- pointerObj.pageX = pointerObj.offsetX + documentToTargetDelta.x;
- pointerObj.pageY = pointerObj.offsetY + documentToTargetDelta.y;
- }
- else{
- pointerObj.pageX = pointerObj.clientX;
- pointerObj.pageY = pointerObj.clientY;
- }
-
- if (pointerObj.srcElement.offsetParent === target && document.documentMode && document.documentMode === 8 && pointerObj.type === 'mousedown') {
- // source element is a child piece of VML, we're in IE8, and we've not called setCapture yet - add the origin of the source element
- pointerObj.pageX += pointerObj.srcElement.offsetLeft;
- pointerObj.pageY += pointerObj.srcElement.offsetTop;
- } else if (pointerObj.srcElement !== target && !document.documentMode || document.documentMode < 8) {
- // source element isn't the target (most likely it's a child piece of VML) and we're in a version of IE before IE8 -
- // the offsetX/Y values are unpredictable so use the clientX/Y values and adjust by the scroll offsets of its parents
- // to get the document-relative coordinates (the same as pageX/Y)
- var sx = -2,
- sy = -2; // adjust for old IE's 2-pixel border
- for (var scrollElement = pointerObj.srcElement; scrollElement !== null; scrollElement = scrollElement.parentNode) {
- sx += scrollElement.scrollLeft ? scrollElement.scrollLeft : 0;
- sy += scrollElement.scrollTop ? scrollElement.scrollTop : 0;
- }
-
- pointerObj.pageX = pointerObj.clientX + sx;
- pointerObj.pageY = pointerObj.clientY + sy;
- }
- }
-
-
- var pageX = pointerObj.pageX;
- var pageY = pointerObj.pageY;
-
- if (theEvtObj.type.match(/(start|down)$/i)) {
- // clause for processing MSPointerDown, touchstart, and mousedown
-
- // refresh the document-to-target delta on start in case the target has moved relative to document
- documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // protect against failing to get an up or end on this pointerId
- if (lastXYById[pointerId]) {
- if (endEvent) {
- endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- delete lastXYById[pointerId];
- }
-
- if (startEvent) {
- if (prevent) {
- prevent = startEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
- }
-
- // init last page positions for this pointer
- lastXYById[pointerId] = {
- x: pageX,
- y: pageY
- };
-
- // IE pointer model
- if (target.msSetPointerCapture) {
- target.msSetPointerCapture(pointerId);
- } else if (theEvtObj.type === 'mousedown' && numberOfKeys(lastXYById) === 1) {
- if (useSetReleaseCapture) {
- target.setCapture(true);
- } else {
- document.addEventListener('mousemove', doEvent, false);
- document.addEventListener('mouseup', doEvent, false);
- }
- }
- } else if (theEvtObj.type.match(/move$/i)) {
- // clause handles mousemove, MSPointerMove, and touchmove
-
- if (lastXYById[pointerId] && !(lastXYById[pointerId].x === pageX && lastXYById[pointerId].y === pageY)) {
- // only extend if the pointer is down and it's not the same as the last point
-
- if (moveEvent && prevent) {
- prevent = moveEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // update last page positions for this pointer
- lastXYById[pointerId].x = pageX;
- lastXYById[pointerId].y = pageY;
- }
- } else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel)$/i)) {
- // clause handles up/end/cancel
-
- if (endEvent && prevent) {
- prevent = endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // delete last page positions for this pointer
- delete lastXYById[pointerId];
-
- // in the Microsoft pointer model, release the capture for this pointer
- // in the mouse model, release the capture or remove document-level event handlers if there are no down points
- // nothing is required for the iOS touch model because capture is implied on touchstart
- if (target.msReleasePointerCapture) {
- target.msReleasePointerCapture(pointerId);
- } else if (theEvtObj.type === 'mouseup' && numberOfKeys(lastXYById) === 0) {
- if (useSetReleaseCapture) {
- target.releaseCapture();
- } else {
- document.removeEventListener('mousemove', doEvent, false);
- document.removeEventListener('mouseup', doEvent, false);
- }
- }
- }
- }
-
- if (prevent) {
- if (theEvtObj.preventDefault) {
- theEvtObj.preventDefault();
- }
-
- if (theEvtObj.preventManipulation) {
- theEvtObj.preventManipulation();
- }
-
- if (theEvtObj.preventMouseEvent) {
- theEvtObj.preventMouseEvent();
- }
- }
- };
-
- var useSetReleaseCapture = false;
- // saving the settings for contentZooming and touchaction before activation
- var contentZooming, msTouchAction;
-
- this.enable = function() {
-
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.addEventListener('MSPointerDown', doEvent, false);
- target.addEventListener('MSPointerMove', doEvent, false);
- target.addEventListener('MSPointerUp', doEvent, false);
- target.addEventListener('MSPointerCancel', doEvent, false);
-
- // css way to prevent panning in our target area
- if (typeof target.style.msContentZooming !== 'undefined') {
- contentZooming = target.style.msContentZooming;
- target.style.msContentZooming = 'none';
- }
-
- // new in Windows Consumer Preview: css way to prevent all built-in touch actions on our target
- // without this, you cannot touch draw on the element because IE will intercept the touch events
- if (typeof target.style.msTouchAction !== 'undefined') {
- msTouchAction = target.style.msTouchAction;
- target.style.msTouchAction = 'none';
- }
- } else if (target.addEventListener) {
- // iOS touch model
- target.addEventListener('touchstart', doEvent, false);
- target.addEventListener('touchmove', doEvent, false);
- target.addEventListener('touchend', doEvent, false);
- target.addEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.addEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.addEventListener('mousemove', doEvent, false);
- target.addEventListener('mouseup', doEvent, false);
- }
- } else if (target.attachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.attachEvent('onmousedown', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmousemove', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmouseup', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- }
- };
-
- this.disable = function() {
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.removeEventListener('MSPointerDown', doEvent, false);
- target.removeEventListener('MSPointerMove', doEvent, false);
- target.removeEventListener('MSPointerUp', doEvent, false);
- target.removeEventListener('MSPointerCancel', doEvent, false);
-
- // reset zooming to saved value
- if (contentZooming) {
- target.style.msContentZooming = contentZooming;
- }
-
- // reset touch action setting
- if (msTouchAction) {
- target.style.msTouchAction = msTouchAction;
- }
- } else if (target.removeEventListener) {
- // iOS touch model
- target.removeEventListener('touchstart', doEvent, false);
- target.removeEventListener('touchmove', doEvent, false);
- target.removeEventListener('touchend', doEvent, false);
- target.removeEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.removeEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.removeEventListener('mousemove', doEvent, false);
- target.removeEventListener('mouseup', doEvent, false);
- }
- } else if (target.detachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.detachEvent('onmousedown');
- target.detachEvent('onmousemove');
- target.detachEvent('onmouseup');
- }
- };
-
- return this;
- };
- }])
-
- .factory('GridsterDraggable', ['$document', '$timeout', '$window', 'GridsterTouch',
- function($document, $timeout, $window, GridsterTouch) {
- function GridsterDraggable($el, scope, gridster, item, itemOptions) {
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0,
- realdocument = $document[0];
-
- var originalCol, originalRow;
- var inputTags = ['select', 'input', 'textarea', 'button'];
-
- var gridsterItemDragElement = $el[0].querySelector('[gridster-item-drag]');
- //console.log(gridsterItemDragElement);
- var isDraggableAreaDefined = gridsterItemDragElement?true:false;
- //console.log(isDraggableAreaDefined);
-
- function mouseDown(e) {
-
- if(ie8){
- e.target = window.event.srcElement;
- e.which = window.event.button;
- }
-
- if(isDraggableAreaDefined && (!gridsterItemDragElement.contains(e.target))){
- return false;
- }
-
- if (inputTags.indexOf(e.target.nodeName.toLowerCase()) !== -1) {
- return false;
- }
-
- var $target = angular.element(e.target);
-
- // exit, if a resize handle was hit
- if ($target.hasClass('gridster-item-resizable-handler')) {
- return false;
- }
-
- // exit, if the target has it's own click event
- if ($target.attr('onclick') || $target.attr('ng-click')) {
- return false;
- }
-
- // only works if you have jQuery
- if ($target.closest && $target.closest('.gridster-no-drag').length) {
- return false;
- }
-
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalCol = item.col;
- originalRow = item.row;
-
- dragStart(e);
-
- return true;
- }
-
- function mouseMove(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dX = diffX,
- dY = diffY;
- if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
-
- if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmX += diffX;
- elmY += diffY;
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px'
- });
-
- drag(e);
-
- return true;
- }
-
- function mouseUp(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- mOffX = mOffY = 0;
-
- dragStop(e);
-
- return true;
- }
-
- function dragStart(event) {
- $el.addClass('gridster-item-moving');
- gridster.movingItem = item;
-
- gridster.updateHeight(item.sizeY);
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.start) {
- gridster.draggable.start(event, $el, itemOptions);
- }
- });
- }
-
- function drag(event) {
- var oldRow = item.row,
- oldCol = item.col,
- hasCallback = gridster.draggable && gridster.draggable.drag,
- scrollSensitivity = gridster.draggable.scrollSensitivity,
- scrollSpeed = gridster.draggable.scrollSpeed;
-
- var row = gridster.pixelsToRows(elmY);
- var col = gridster.pixelsToColumns(elmX);
-
- var itemsInTheWay = gridster.getItems(row, col, item.sizeX, item.sizeY, item);
- var hasItemsInTheWay = itemsInTheWay.length !== 0;
-
- if (gridster.swapping === true && hasItemsInTheWay) {
- var boundingBoxItem = gridster.getBoundingBox(itemsInTheWay),
- sameSize = boundingBoxItem.sizeX === item.sizeX && boundingBoxItem.sizeY === item.sizeY,
- sameRow = boundingBoxItem.row === oldRow,
- sameCol = boundingBoxItem.col === oldCol,
- samePosition = boundingBoxItem.row === row && boundingBoxItem.col === col,
- inline = sameRow || sameCol;
-
- if (sameSize && itemsInTheWay.length === 1) {
- if (samePosition) {
- gridster.swapItems(item, itemsInTheWay[0]);
- } else if (inline) {
- return;
- }
- } else if (boundingBoxItem.sizeX <= item.sizeX && boundingBoxItem.sizeY <= item.sizeY && inline) {
- var emptyRow = item.row <= row ? item.row : row + item.sizeY,
- emptyCol = item.col <= col ? item.col : col + item.sizeX,
- rowOffset = emptyRow - boundingBoxItem.row,
- colOffset = emptyCol - boundingBoxItem.col;
-
- for (var i = 0, l = itemsInTheWay.length; i < l; ++i) {
- var itemInTheWay = itemsInTheWay[i];
-
- var itemsInFreeSpace = gridster.getItems(
- itemInTheWay.row + rowOffset,
- itemInTheWay.col + colOffset,
- itemInTheWay.sizeX,
- itemInTheWay.sizeY,
- item
- );
-
- if (itemsInFreeSpace.length === 0) {
- gridster.putItem(itemInTheWay, itemInTheWay.row + rowOffset, itemInTheWay.col + colOffset);
- }
- }
- }
- }
-
- if (gridster.pushing !== false || !hasItemsInTheWay) {
- item.row = row;
- item.col = col;
- }
-
- if(($window.navigator.appName === 'Microsoft Internet Explorer' && !ie8) || $window.navigator.userAgent.indexOf("Firefox")!==-1){
- if (event.pageY - realdocument.documentElement.scrollTop < scrollSensitivity) {
- realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.documentElement.scrollTop) < scrollSensitivity) {
- realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop + scrollSpeed;
- }
- }
- else{
- if (event.pageY - realdocument.body.scrollTop < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.body.scrollTop) < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop + scrollSpeed;
- }
- }
-
-
-
- if (event.pageX - realdocument.body.scrollLeft < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft - scrollSpeed;
- } else if ($window.innerWidth - (event.pageX - realdocument.body.scrollLeft) < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft + scrollSpeed;
- }
-
- if (hasCallback || oldRow !== item.row || oldCol !== item.col) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.draggable.drag(event, $el, itemOptions);
- }
- });
- }
- }
-
- function dragStop(event) {
- $el.removeClass('gridster-item-moving');
- var row = gridster.pixelsToRows(elmY);
- var col = gridster.pixelsToColumns(elmX);
- if (gridster.pushing !== false || gridster.getItems(row, col, item.sizeX, item.sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- }
- gridster.movingItem = null;
- item.setPosition(item.row, item.col);
-
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.stop) {
- gridster.draggable.stop(event, $el, itemOptions);
- }
- });
- }
-
- var enabled = null;
- var $dragHandles = null;
- var unifiedInputs = [];
-
- this.enable = function() {
- if (enabled === true) {
- return;
- }
-
- // disable and timeout required for some template rendering
- $timeout(function() {
- // disable any existing draghandles
- for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) {
- unifiedInputs[u].disable();
- }
- unifiedInputs = [];
-
- if (gridster.draggable && gridster.draggable.handle) {
- $dragHandles = angular.element($el[0].querySelectorAll(gridster.draggable.handle));
- if ($dragHandles.length === 0) {
- // fall back to element if handle not found...
- $dragHandles = $el;
- }
- } else {
- $dragHandles = $el;
- }
-
- for (var h = 0, hl = $dragHandles.length; h < hl; ++h) {
- unifiedInputs[h] = new GridsterTouch($dragHandles[h], mouseDown, mouseMove, mouseUp);
- unifiedInputs[h].enable();
- }
-
- enabled = true;
- });
- };
-
- this.disable = function() {
- if (enabled === false) {
- return;
- }
-
- // timeout to avoid race contition with the enable timeout
- $timeout(function() {
-
- for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) {
- unifiedInputs[u].disable();
- }
-
- unifiedInputs = [];
- enabled = false;
- });
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- return GridsterDraggable;
- }
- ])
-
- .factory('GridsterResizable', ['GridsterTouch', function(GridsterTouch) {
- function GridsterResizable($el, scope, gridster, item, itemOptions) {
-
- function ResizeHandle(handleClass) {
-
- var hClass = handleClass;
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0;
-
- var getMinHeight = function() {
- return (item.minSizeY ? item.minSizeY : 1) * gridster.curRowHeight - gridster.margins[0];
- };
- var getMinWidth = function() {
- return (item.minSizeX ? item.minSizeX : 1) * gridster.curColWidth - gridster.margins[1];
- };
-
- var originalWidth, originalHeight;
- var savedDraggable;
-
- function mouseDown(e) {
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- // save the draggable setting to restore after resize
- savedDraggable = gridster.draggable.enabled;
- if (savedDraggable) {
- gridster.draggable.enabled = false;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- // Get the current mouse position.
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- // Record current widget dimensions
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalWidth = item.sizeX;
- originalHeight = item.sizeY;
-
- resizeStart(e);
-
- return true;
- }
-
- function resizeStart(e) {
- $el.addClass('gridster-item-moving');
- $el.addClass('gridster-item-resizing');
-
- gridster.movingItem = item;
-
- item.setElementSizeX();
- item.setElementSizeY();
- item.setElementPosition();
- gridster.updateHeight(1);
-
- scope.$apply(function() {
- // callback
- if (gridster.resizable && gridster.resizable.start) {
- gridster.resizable.start(e, $el, itemOptions); // options is the item model
- }
- });
- }
-
- function mouseMove(e) {
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dY = diffY,
- dX = diffX;
-
- if (hClass.indexOf('n') >= 0) {
- if (elmH - dY < getMinHeight()) {
- diffY = elmH - getMinHeight();
- mOffY = dY - diffY;
- } else if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- }
- elmY += diffY;
- elmH -= diffY;
- }
- if (hClass.indexOf('s') >= 0) {
- if (elmH + dY < getMinHeight()) {
- diffY = getMinHeight() - elmH;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmH += diffY;
- }
- if (hClass.indexOf('w') >= 0) {
- if (elmW - dX < getMinWidth()) {
- diffX = elmW - getMinWidth();
- mOffX = dX - diffX;
- } else if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- }
- elmX += diffX;
- elmW -= diffX;
- }
- if (hClass.indexOf('e') >= 0) {
- if (elmW + dX < getMinWidth()) {
- diffX = getMinWidth() - elmW;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
- elmW += diffX;
- }
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px',
- 'width': elmW + 'px',
- 'height': elmH + 'px'
- });
-
- resize(e);
-
- return true;
- }
-
- function mouseUp(e) {
- // restore draggable setting to its original state
- if (gridster.draggable.enabled !== savedDraggable) {
- gridster.draggable.enabled = savedDraggable;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- mOffX = mOffY = 0;
-
- resizeStop(e);
-
- return true;
- }
-
- function resize(e) {
- var oldRow = item.row,
- oldCol = item.col,
- oldSizeX = item.sizeX,
- oldSizeY = item.sizeY,
- hasCallback = gridster.resizable && gridster.resizable.resize;
-
- var col = item.col;
- // only change column if grabbing left edge
- if (['w', 'nw', 'sw'].indexOf(handleClass) !== -1) {
- col = gridster.pixelsToColumns(elmX, false);
- }
-
- var row = item.row;
- // only change row if grabbing top edge
- if (['n', 'ne', 'nw'].indexOf(handleClass) !== -1) {
- row = gridster.pixelsToRows(elmY, false);
- }
-
- var sizeX = item.sizeX;
- // only change row if grabbing left or right edge
- if (['n', 's'].indexOf(handleClass) === -1) {
- sizeX = gridster.pixelsToColumns(elmW, true);
- }
-
- var sizeY = item.sizeY;
- // only change row if grabbing top or bottom edge
- if (['e', 'w'].indexOf(handleClass) === -1) {
- sizeY = gridster.pixelsToRows(elmH, true);
- }
-
- if (gridster.pushing !== false || gridster.getItems(row, col, sizeX, sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- item.sizeX = sizeX;
- item.sizeY = sizeY;
- }
- var isChanged = item.row !== oldRow || item.col !== oldCol || item.sizeX !== oldSizeX || item.sizeY !== oldSizeY;
-
- if (hasCallback || isChanged) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.resizable.resize(e, $el, itemOptions); // options is the item model
- }
- });
- }
- }
-
- function resizeStop(e) {
- $el.removeClass('gridster-item-moving');
- $el.removeClass('gridster-item-resizing');
-
- gridster.movingItem = null;
-
- item.setPosition(item.row, item.col);
- item.setSizeY(item.sizeY);
- item.setSizeX(item.sizeX);
-
- scope.$apply(function() {
- if (gridster.resizable && gridster.resizable.stop) {
- gridster.resizable.stop(e, $el, itemOptions); // options is the item model
- }
- });
- }
-
- var $dragHandle = null;
- var unifiedInput;
-
- this.enable = function() {
- if (!$dragHandle) {
- $dragHandle = angular.element('<div class="gridster-item-resizable-handler handle-' + hClass + '"></div>');
- $el.append($dragHandle);
- }
-
- unifiedInput = new GridsterTouch($dragHandle[0], mouseDown, mouseMove, mouseUp);
- unifiedInput.enable();
- };
-
- this.disable = function() {
- if ($dragHandle) {
- $dragHandle.remove();
- $dragHandle = null;
- }
-
- unifiedInput.disable();
- unifiedInput = undefined;
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- var handles = [];
- var handlesOpts = gridster.resizable.handles;
- if (typeof handlesOpts === 'string') {
- handlesOpts = gridster.resizable.handles.split(',');
- }
- var enabled = false;
-
- for (var c = 0, l = handlesOpts.length; c < l; c++) {
- handles.push(new ResizeHandle(handlesOpts[c]));
- }
-
- this.enable = function() {
- if (enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].enable();
- }
- enabled = true;
- };
-
- this.disable = function() {
- if (!enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].disable();
- }
- enabled = false;
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].destroy();
- }
- };
- }
- return GridsterResizable;
- }])
-
- .factory('gridsterDebounce', function() {
- return function gridsterDebounce(func, wait, immediate) {
- var timeout;
- return function() {
- var context = this,
- args = arguments;
- var later = function() {
- timeout = null;
- if (!immediate) {
- func.apply(context, args);
- }
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- func.apply(context, args);
- }
- };
- };
- })
-
- /**
- * GridsterItem directive
- * @param $parse
- * @param GridsterDraggable
- * @param GridsterResizable
- * @param gridsterDebounce
- */
- .directive('gridsterItem', ['$parse', 'GridsterDraggable', 'GridsterResizable', 'gridsterDebounce',
- function($parse, GridsterDraggable, GridsterResizable, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EA',
- controller: 'GridsterItemCtrl',
- controllerAs: 'gridsterItem',
- require: ['^gridster', 'gridsterItem'],
- link: function(scope, $el, attrs, controllers) {
- var optionsKey = attrs.gridsterItem,
- options;
-
- var gridster = controllers[0],
- item = controllers[1];
-
- scope.gridster = gridster;
-
-
- // bind the item's position properties
- // options can be an object specified by gridster-item="object"
- // or the options can be the element html attributes object
- if (optionsKey) {
- var $optionsGetter = $parse(optionsKey);
- options = $optionsGetter(scope) || {};
- if (!options && $optionsGetter.assign) {
- options = {
- row: item.row,
- col: item.col,
- sizeX: item.sizeX,
- sizeY: item.sizeY,
- minSizeX: 0,
- minSizeY: 0,
- maxSizeX: null,
- maxSizeY: null
- };
- $optionsGetter.assign(scope, options);
- }
- } else {
- options = attrs;
- }
-
- item.init($el, gridster);
-
- $el.addClass('gridster-item');
-
- var aspects = ['minSizeX', 'maxSizeX', 'minSizeY', 'maxSizeY', 'sizeX', 'sizeY', 'row', 'col'],
- $getters = {};
-
- var expressions = [];
- var aspectFn = function(aspect) {
- var expression;
- if (typeof options[aspect] === 'string') {
- // watch the expression in the scope
- expression = options[aspect];
- } else if (typeof options[aspect.toLowerCase()] === 'string') {
- // watch the expression in the scope
- expression = options[aspect.toLowerCase()];
- } else if (optionsKey) {
- // watch the expression on the options object in the scope
- expression = optionsKey + '.' + aspect;
- } else {
- return;
- }
- expressions.push('"' + aspect + '":' + expression);
- $getters[aspect] = $parse(expression);
-
- // initial set
- var val = $getters[aspect](scope);
- if (typeof val === 'number') {
- item[aspect] = val;
- }
- };
-
- for (var i = 0, l = aspects.length; i < l; ++i) {
- aspectFn(aspects[i]);
- }
-
- var watchExpressions = '{' + expressions.join(',') + '}';
-
- // when the value changes externally, update the internal item object
- scope.$watchCollection(watchExpressions, function(newVals, oldVals) {
- for (var aspect in newVals) {
- var newVal = newVals[aspect];
- var oldVal = oldVals[aspect];
- if (oldVal === newVal) {
- continue;
- }
- newVal = parseInt(newVal, 10);
- if (!isNaN(newVal)) {
- item[aspect] = newVal;
- }
- }
- });
-
- function positionChanged() {
- // call setPosition so the element and gridster controller are updated
- item.setPosition(item.row, item.col);
-
- // when internal item position changes, update externally bound values
- if ($getters.row && $getters.row.assign) {
- $getters.row.assign(scope, item.row);
- }
- if ($getters.col && $getters.col.assign) {
- $getters.col.assign(scope, item.col);
- }
- }
- scope.$watch(function() {
- return item.row + ',' + item.col;
- }, positionChanged);
-
- function sizeChanged() {
- var changedX = item.setSizeX(item.sizeX, true);
- if (changedX && $getters.sizeX && $getters.sizeX.assign) {
- $getters.sizeX.assign(scope, item.sizeX);
- }
- var changedY = item.setSizeY(item.sizeY, true);
- if (changedY && $getters.sizeY && $getters.sizeY.assign) {
- $getters.sizeY.assign(scope, item.sizeY);
- }
-
- if (changedX || changedY) {
- item.gridster.moveOverlappingItems(item);
- gridster.layoutChanged();
- scope.$broadcast('gridster-item-resized', item);
- }
- }
-
- scope.$watch(function() {
- return item.sizeY + ',' + item.sizeX + ',' + item.minSizeX + ',' + item.maxSizeX + ',' + item.minSizeY + ',' + item.maxSizeY;
- }, sizeChanged);
-
- var draggable = new GridsterDraggable($el, scope, gridster, item, options);
- var resizable = new GridsterResizable($el, scope, gridster, item, options);
-
- var updateResizable = function() {
- resizable.toggle(!gridster.isMobile && gridster.resizable && gridster.resizable.enabled);
- };
- updateResizable();
-
- var updateDraggable = function() {
- draggable.toggle(!gridster.isMobile && gridster.draggable && gridster.draggable.enabled);
- };
- updateDraggable();
-
- scope.$on('gridster-draggable-changed', updateDraggable);
- scope.$on('gridster-resizable-changed', updateResizable);
- scope.$on('gridster-resized', updateResizable);
- scope.$on('gridster-mobile-changed', function() {
- updateResizable();
- updateDraggable();
- });
-
- function whichTransitionEvent() {
- var el = document.createElement('div');
- var transitions = {
- 'transition': 'transitionend',
- 'OTransition': 'oTransitionEnd',
- 'MozTransition': 'transitionend',
- 'WebkitTransition': 'webkitTransitionEnd'
- };
- for (var t in transitions) {
- if (el.style[t] !== undefined) {
- return transitions[t];
- }
- }
- }
-
- var debouncedTransitionEndPublisher = gridsterDebounce(function() {
- scope.$apply(function() {
- scope.$broadcast('gridster-item-transition-end', item);
- });
- }, 50);
-
- if(whichTransitionEvent()){ //check for IE8, as it evaluates to null
- $el.on(whichTransitionEvent(), debouncedTransitionEndPublisher);
- }
-
- scope.$broadcast('gridster-item-initialized', item);
-
- return scope.$on('$destroy', function() {
- try {
- resizable.destroy();
- draggable.destroy();
- } catch (e) {}
-
- try {
- gridster.removeItem(item);
- } catch (e) {}
-
- try {
- item.destroy();
- } catch (e) {}
- });
- }
- };
- }
- ])
-
- .directive('gridsterNoDrag', function() {
- return {
- restrict: 'A',
- link: function(scope, $element) {
- $element.addClass('gridster-no-drag');
- }
- };
- })
-
- ;
-
-}));
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js
deleted file mode 100644
index 3ca3db7d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/att_angular_gridster/ui-gridster-tpls.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
-* FileName ui-gridster
-* Version 0.0.1
-* Build number ad58c6f4f8f8fd7f04ac457f95d76f09
-* Date 08/17/2015
-*/
-
-
-(function(angular, window){
-angular.module("att.gridster", ["att.gridster.tpls", "att.gridster.utilities","att.gridster.gridster"]);
-angular.module("att.gridster.tpls", ["template/gridster/gridster.html","template/gridster/gridsterItem.html","template/gridster/gridsterItemBody.html","template/gridster/gridsterItemFooter.html","template/gridster/gridsterItemHeader.html"]);
-angular.module('att.gridster.utilities', [])
- .factory('$extendObj', [function() {
- var _extendDeep = function(dst) {
- angular.forEach(arguments, function(obj) {
- if (obj !== dst) {
- angular.forEach(obj, function(value, key) {
- if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
- _extendDeep(dst[key], value);
- } else {
- dst[key] = value;
- }
- });
- }
- });
- return dst;
- };
- return {
- extendDeep: _extendDeep
- };
- }]);
-
-angular.module('att.gridster.gridster', ['attGridsterLib', 'att.gridster.utilities'])
- .config(['$compileProvider', function($compileProvider) {
- $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
- }])
- .constant('attGridsterConfig',
- {
- columns: 3,
- margins: [10, 10],
- outerMargin: true,
- pushing: true,
- floating: true,
- swapping: true,
- draggable: {
- enabled: true
- }
- })
- .directive('attGridster', ['attGridsterConfig', '$extendObj', function(attGridsterConfig, $extendObj) {
- return {
- restrict: 'EA',
- scope: {
- attGridsterOptions: '=?'
- },
- templateUrl: 'template/gridster/gridster.html',
- replace: false,
- transclude: true,
- controller: [function() {}],
- link: function(scope) {
- if (angular.isDefined(scope.attGridsterOptions)) {
- attGridsterConfig = $extendObj.extendDeep(attGridsterConfig, scope.attGridsterOptions);
- }
- scope.attGridsterConfig = attGridsterConfig;
- }
- };
- }])
- .directive('attGridsterItem', ['$timeout', function($timeout) {
- return {
- restrict: 'EA',
- require: ['^attGridster'],
- scope: {
- attGridsterItem: '='
- },
- templateUrl: 'template/gridster/gridsterItem.html',
- replace: false,
- transclude: true,
- controller: [function() {}]
- };
- }])
- .directive('attGridsterItemHeader', [function() {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {
- headerText: '@',
- subHeaderText: '@?'
- },
- templateUrl: 'template/gridster/gridsterItemHeader.html',
- replace: true,
- transclude: true,
- link: function(scope, element) {
- if (angular.isDefined(scope.subHeaderText) && scope.subHeaderText) {
- angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("tabindex", "0");
- angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("aria-label", scope.subHeaderText);
- }
- }
- };
- }])
- .directive('attGridsterItemBody', [function() {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {},
- templateUrl: 'template/gridster/gridsterItemBody.html',
- replace: true,
- transclude: true
- };
- }])
- .directive('attGridsterItemFooter', ['$location', function($location) {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {
- attGridsterItemFooterLink: '@?'
- },
- templateUrl: 'template/gridster/gridsterItemFooter.html',
- replace: true,
- transclude: true,
- controller: ['$scope', function($scope) {
- $scope.clickOnFooterLink = function(evt) {
- evt.preventDefault();
- evt.stopPropagation();
- if ($scope.attGridsterItemFooterLink) {
- $location.url($scope.attGridsterItemFooterLink);
- }
- };
- }],
- link: function(scope, element) {
- if (angular.isDefined(scope.attGridsterItemFooterLink) && scope.attGridsterItemFooterLink) {
- element.attr("role", "link");
- }
- }
- };
- }]);
-angular.module("template/gridster/gridster.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridster.html",
- "<div gridster='attGridsterConfig'><div ng-transclude></div></div>");
-}]);
-
-angular.module("template/gridster/gridsterItem.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItem.html",
- "<div gridster-item='attGridsterItem' class=\"gridster-item-container\" ng-transclude></div>");
-}]);
-
-angular.module("template/gridster/gridsterItemBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemBody.html",
- "<div class=\"gridster-item-body\" ng-transclude></div>");
-}]);
-
-angular.module("template/gridster/gridsterItemFooter.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemFooter.html",
- "<div class=\"gridster-item-footer\" ng-click=\"clickOnFooterLink($event)\" tabindex=\"0\" ng-keydown=\"(($event.keyCode && $event.keyCode === 13) || ($event.which && $event.which === 13)) && clickOnFooterLink($event)\" >\n" +
- " <span class=\"gridster-item-footer-content\" ng-transclude></span>\n" +
- "</div>");
-}]);
-
-angular.module("template/gridster/gridsterItemHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemHeader.html",
- "<div class=\"gridster-item-header\">\n" +
- " <img gridster-item-drag src=\"static/fusion/images/att_angular_gridster/grips.png\" alt=\"||\" aria-label=\"Tap/Click to move\" class=\"gridster-item-handle\" />\n" +
- " <span class=\"gridster-item-header-content\" tabindex=\"0\" role=\"presentation\" aria-label=\"{{headerText}}\">{{headerText}}</span>\n" +
- " <span class=\"gridster-item-sub-header-content\" role=\"presentation\">{{subHeaderText}}</span>\n" +
- " <div class=\"gridster-item-header-buttons-container\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-return {}
-})(angular, window); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-closed-cloop.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-closed-cloop.js
deleted file mode 100644
index 39ef50e8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-closed-cloop.js
+++ /dev/null
@@ -1,28 +0,0 @@
-app.controller('adminClosedLoopController', ['$scope','$http','$q','$log',function ($scope, $http,$q, $log){
- $scope.camunda_cockpit_url = '';
- var deferred = $q.defer();
- $http({
- method: "GET",
- url: "get_camunda_cockpit_link",
- }).success( function(res) {
- // if the returned response is error HTML page in string format
- if(res.link_defined=='false'){
- $log.error('Retrieval of camunda cockpit link failed. Please make sure the variable "camunda_cockpit_url" is defined in the system.properties file.');
- deferred.reject(status);
- }
- // valid cockpit url
- else if(res.camunda_cockpit_link!=null & res.camunda_cockpit_link!= '') {
- $scope.camunda_cockpit_url = res.camunda_cockpit_link;
- deferred.resolve(res);
- // if the defined url is empty;
- } else {
- $log.error('Please ensure the variable "camunda_cockpit_url" is properly defined in system.properties file (i.e., neither null nor empty).');
- deferred.reject(status);
- }
- // API call fails
- }).error( function(status) {
- $log.error('get_camunda_cockpit_link RestAPI call failed.');
- deferred.reject(status);
- });
- return deferred.promise;
-}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-whitelist.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-whitelist.js
deleted file mode 100644
index 5eed3003..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/admin-whitelist.js
+++ /dev/null
@@ -1,3 +0,0 @@
-app.config(function ($sceDelegateProvider) {
- $sceDelegateProvider.resourceUrlWhitelist(['self','**']);
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js
deleted file mode 100644
index 3d92220f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/ase-controller.js
+++ /dev/null
@@ -1,3 +0,0 @@
-app.controller('aseCtrl', function ($scope){
-/* do nothing yet*/
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js
deleted file mode 100644
index a6cde5ae..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-controller.js
+++ /dev/null
@@ -1,60 +0,0 @@
-app.controller('broadcastController', function ($scope, modalService, $modal,AdminService,$routeParams){
- //$scope.broadcastMessage=${broadcastMessage};
- //$scope.broadcastSites=${broadcastSites};
- //console.log($scope.broadcastMessage);
- $scope.broadcastMessage=[];
- $scope.broadcastSites=[];
- AdminService.getBroadcast($routeParams.messageLocationId, $routeParams.messageLocation, $routeParams.messageId).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.broadcastMessage=JSON.parse($scope.data.broadcastMessage);
- $scope.broadcastSites=JSON.parse($scope.data.broadcastSites);
- console.log($scope.broadcastMessage);
- console.log($scope.broadcastMessage.id);
- console.log($scope.broadcastSites);
- //$scope.resetMenu();
-
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
-
- $scope.save = function() {
- var uuu = "broadcast/save";
- var postData={broadcastMessage: $scope.broadcastMessage};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- window.location.href = "admin#/broadcast_list";
- },
- error : function(data){
- modalService.showFailure("Fail","Error while saving.");
- }
- });
- };
-
- $scope.close = function() {
- window.location.href = "admin#/broadcast_list";
-};
-
-});
-
-$(function() {
- $( "#startDatepicker" ).datepicker();
- $( "#endDatepicker" ).datepicker();
-
- $( "#startDatepicker" ).change(function() {
- var tempStartDate = moment($( "#startDatepicker" ).val()).format('YYYY-MM-DD hh:mm:ss.S');
- $( "#startDateHidden" ).val(tempStartDate.toString());
- //alert( $( "#startDateHidden" ).val() );
- });
- $( "#endDatepicker" ).change(function() {
- var tempEndDate = moment($( "#endDatepicker" ).val()).format('YYYY-MM-DD hh:mm:ss.S');
- $( "#endDateHidden" ).val(tempEndDate.toString());
- //alert( $( "#endDateHidden" ).val() );
- });
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js
deleted file mode 100644
index 0af15b78..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/broadcast-list-controller.js
+++ /dev/null
@@ -1,101 +0,0 @@
-app.controller('broadcastListController', function ($scope, modalService, $modal,AdminService){
- //$scope.broadcastMessage=${broadcastMessage};
- //$scope.broadcastSites=${broadcastSites};
- //console.log($scope.broadcastMessage);
- var messagesMap = {};
- AdminService.getBroadcastList().then(function(data){
-
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.messagesList=(($scope.data.messagesList===null) ? [""]:$scope.data.messagesList);
- $scope.messageLocations=(($scope.data.messageLocations===null) ? [""]:$scope.data.messageLocations);
- console.log("messages: "+$scope.messagesList);
- console.log("location: "+$scope.messageLocations);
- $.each($scope.messageLocations, function(i, a){
- //var result = [];
- angular.forEach($scope.messagesList, function(value, key) {
- if (key+'' === a.value+'') {
- //var objsJSON = JSON.parse(value);
-
- $.each(value, function(i, a){
- var startDateLong = a.startDate;
- var tempStartDate = new Date(startDateLong);
- tempStartDate = moment(tempStartDate).format('DD MMM YYYY hh:mmA zz');//03 Jun 2013 04:15PM EDT
- a.displayStartDate=tempStartDate.toString();
-
- var endDateLong = a.endDate;
- var tempEndDate = new Date(endDateLong);
- tempEndDate = moment(tempEndDate).format('DD MMM YYYY hh:mmA zz');//03 Jun 2013 04:15PM EDT
- a.displayEndDate=tempEndDate.toString();
- });
- a.messages = value;
- }
- });
- console.log(a.messages);
- });
-
- //$scope.resetMenu();
-
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
-
-
- $scope.editMessage = function(location) {
-
- editMessage(location.value, location.label);
- };
-
- $scope.toggleActive = function(broadcastMessage) {
-
- //alert('deleted'+role.name);
- var uuu = "broadcast_list/toggleActive";
- var postData={broadcastMessage:broadcastMessage};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- //window.location.reload();
- },
- error : function(data){
- console.log(data);
- modalService.showFailure("Fail","Error while toggling: "+ data.responseText);
-
- }
- });
-
-
- };
-
- $scope.remove = function(broadcastMessage) {
-
- //alert('deleted'+role.name);
- var uuu = "broadcast_list/remove";
- var postData={broadcastMessage:broadcastMessage};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- window.location.reload();
- },
- error : function(data){
- console.log(data);
- modalService.showFailure("Fail","Error while deleting: "+ data.responseText);
- }
- });
-
-
- };
-
-});
-
-function editMessage(messageLocationId, messageLocation, messageId) {
- window.location='admin#/broadcast/'+messageLocationId + '/' + messageLocation + ((messageId != null) ? '/' + messageId : '');
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js
deleted file mode 100644
index a1831b7e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/collaborate-list-controller.js
+++ /dev/null
@@ -1,44 +0,0 @@
-app.controller("collaborateListController", function ($scope,$http,modalService, $modal,AdminService) {
- // Table Data
- AdminService.getCollaborateList().then(function(data){
-
- var j = data;
- $scope.tableData = JSON.parse(j.data);
- //$scope.resetMenu();
-
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
-
- $scope.viewPerPage = 20;
- $scope.scrollViewsPerPage = 2;
- $scope.currentPage = 1;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- /* modalService.showSuccess('','Modal Sample') ; */
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- $scope.openCollaboration = function(chatId){
- openInNewTab('openCollaboration?chat_id=' + chatId);
- }
-
- $scope.toggleProfileActive = function(profileId) {
- modalService.popupConfirmWin("Confirm","You are about to change user's active status. Do you want to continue?",
- function(){
- $http.get("profile/toggleProfileActive?profile_id="+profileId).success(function(){});
-
- })
- };
-
-});
-
-function openInNewTab(url) {
- var win = window.open(url, '_blank');
- win.focus();
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/dummy.txt b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/modelpopupController.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/modelpopupController.js
deleted file mode 100644
index 48fbbc03..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/controllers/modelpopupController.js
+++ /dev/null
@@ -1,21 +0,0 @@
-var modalpopupController = function ($scope, $modalInstance, message){
-
- $scope.message = message;
-
-
- $scope.hello = function () {
- $modalInstance.close($scope.digitPattern);
- };
- $modalInstance.ok = function() {
- //add the ok functionality
- alert("Logout");
- };
- $modalInstance.cancel = function() {
- //add the cancel functionality
- alert("Keep Log in");
- };
- $modalInstance.cancelbutton = function() {
- //add the cancel functionality
- alert("Modal Waring popup close event");
- };
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/dummy.txt b/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/footer.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/footer.js
deleted file mode 100644
index d49f5980..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/footer.js
+++ /dev/null
@@ -1,11 +0,0 @@
-app.directive('qFooter', function () {
- return {
- restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements
- replace: false,
- templateUrl: "app/fusion/scripts/view-models/footer.html",
- controller: ['$scope', '$filter', function ($scope, $filter) {
- // Your behaviour goes here :)
- }]
- }
-});
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/header.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/header.js
deleted file mode 100644
index ef0a8fd2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/header.js
+++ /dev/null
@@ -1,479 +0,0 @@
-app.directive('qHeader', function () {
- return {
- restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements
- replace: false,
- templateUrl: "app/fusion/scripts/view-models/header.html",
- controller: ['$scope', '$filter','$http','$timeout', '$log','UserInfoService', '$window', '$cookies', function ($scope, $filter, $http, $timeout, $log,UserInfoService, $window, $cookies) {
-
- /*Define fields*/
- $scope.userName;
- $scope.userFirstName;
- $scope.redirectUrl;
- $scope.contactUsUrl;
- $scope.getAccessUrl;
- $scope.childData=[];
- $scope.parentData=[];
- $scope.menuItems = [];
- $scope.loadMenufail=false;
- $scope.megaMenuDataObject=[];
- $scope.activeClickSubMenu = {
- x: ''
- };
- $scope.activeClickMenu = {
- x: ''
- };
- $scope.favoritesMenuItems = [];
- $scope.favoriteItemsCount = 0;
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- $scope.favoritesWindow = false;
-
- /*Menu Structure*/
- var menuStructureConvert = function(menuItems) {
- // console.log(menuItems);
- $scope.megaMenuDataObjectTemp =
- [
- {
- text: "ECOMP",
- children: menuItems
- },
- {
- text: "Help",
- children: [
- {
- text:"Contact Us",
- url:$scope.contactUsUrl
- },
- {
- text:"Get Access",
- url:$scope.getAccessUrl
- }]
- }
- ];
- return $scope.megaMenuDataObjectTemp;
- };
-
- /***************functions**************/
- /*Put user info into fields*/
- $scope.inputUserInfo = function(userInfo){
- if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
- if(typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null){
- $scope.userFirstName = userInfo.USER_FIRST_NAME;
- }
- }
- }
- /*getting user info from session*/
- $scope.getUserNameFromSession = function(){
- UserInfoService.getFunctionalMenuStaticDetailSession()
- .then(function (res) {
- $scope.contactUsUrl=res.contactUsLink;
- $scope.userName = res.userName;
- $scope.userFirstName = res.firstName;
- $scope.redirectUrl = res.portalUrl;
- $scope.getAccessUrl = res.getAccessUrl;
- });
- }
- $scope.getTopMenuStaticInfo=function() {
- var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.error('failed to get static User information');
- $scope.getUserNameFromSession();
- }else{
- // $log.info('Received static User information');
- var resData = res;
- // console.log(resData);
- $scope.inputUserInfo(resData);
- $scope.userName = $scope.firstName+ ' '+ $scope.lastName;
- }
- },
- function(err) {
- $log.error('getFunctionalMenuStaticDetailShareContext failed', err);
- }
- );
- }
-
- $scope.returnToPortal=function(){
- window.location.href = $scope.redirectUrl;
- }
-
- var unflatten = function( array, parent, tree ){
- tree = typeof tree !== 'undefined' ? tree : [];
- parent = typeof parent !== 'undefined' ? parent : { menuId: null };
- var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
- if( !_.isEmpty( children ) ){
- if( parent.menuId === null ){
- tree = children;
- }else{
- parent['children'] = children
- }
- _.each( children, function( child ){ unflatten( array, child ) } );
- }
- return tree;
- }
-
- $scope.getMenu=function() {
- $scope.getTopMenuStaticInfo();
- $http({
- method: "GET",
- url: 'get_functional_menu',
-// TIMEOUT USED FOR LOCAL TESTING ONLY
-// timeout: 100
- }).success(function (response) {
-
- if (response == '101: Timeout') {
- $log.debug('Timeout attempting to get_functional_menu');
- $scope.megaMenuDataObject = menuStructureConvert("");
-// $scope.createErrorMenu();
- //$scope.loadMenufail=true;
- } else {
- if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
- $log.debug('Timeout attempting to get_functional_menu');
- $scope.menuItems = unflatten( response);
- $scope.megaMenuDataObject = menuStructureConvert($scope.menuItems);
-// $scope.createErrorMenu();
- //$scope.loadMenufail=true;
- }else{
- $scope.loadMenufail=false;
- $scope.contactUsURL = response.contactUsLink;
- $log.debug('functional_menu',response);
- $scope.megaMenuDataObject = menuStructureConvert("");
- }
- }
- }).error(function (response){
- $scope.megaMenuDataObject = menuStructureConvert("");
-// $scope.createErrorMenu();
- //$scope.loadMenufail=true;
- $log.debug('REST API failed get_functional_menu...');
- });
-
- }
-
- $scope.adjustHeader=function() {
- $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
-
- if($scope.showHeader == true) {
- $scope.drawer_margin_top = 70;
- $scope.drawer_custom_top = 54;
- $scope.toggle_drawer_top = 55;
- }
- else {
-
- $scope.drawer_margin_top = 60;
- $scope.drawer_custom_top = 0;
- $scope.toggle_drawer_top = 10;
- }
-
- }
-
- $scope.getMenu();
- $scope.adjustHeader();
-
-/* **************************************************************************/
-/* Logic for the favorite menus is here */
-
- $scope.loadFavorites = function () {
- $log.debug('loadFavorites has happened.');
- if ($scope.favoritesMenuItems == '') {
- $scope.generateFavoriteItems();
- $log.debug('loadFavorites is calling generateFavoriteItems()');
- } else {
- $log.debug('loadFavorites is NOT calling generateFavoriteItems()');
- }
- }
-
- $scope.goToUrl = function (item) {
- $log.debug("goToUrl called", item);
-
- var url = item.url;
- var restrictedApp = item.restrictedApp;
- // $log.debug('Restricted app status is: ' + restrictedApp);
- if (!url) {
- $log.error('No url found for this application, doing nothing..');
- return;
- }
- if (restrictedApp) {
- $window.open(url, '_blank');
- } else {
- $window.open(url, '_self');
- }
-
- }
-
- $scope.submenuLevelAction = function(index, column) {
- if ($scope.favoritesMenuItems == '') {
- $scope.generateFavoriteItems();
- $log.debug('submenuLevelAction is calling generateFavoriteItems()');
- }
- $log.debug('item hovered/clicked: ' + index + '; column = ' + column);
- if (column == 2) { // 2 is Design
- $scope.favoritesWindow = false;
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- }
- if (index=='Favorites' && $scope.favoriteItemsCount != 0) {
- $log.debug('Showing Favorites window');
- $scope.favoritesWindow = true;
- $scope.showFavorites = true;
- $scope.emptyFavorites = false;
- }
- if (index=='Favorites' && $scope.favoriteItemsCount == 0) {
- $log.debug('Hiding Favorites window in favor of No Favorites Window');
- $scope.favoritesWindow = true;
- $scope.showFavorites = false;
- $scope.emptyFavorites = true;
- }
- if (column > 2) {
- $scope.favoritesWindow = false;
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- }
- };
-
- $scope.hideFavoritesWindow = function() {
- $log.debug('$scope.hideFavoritesWindow has been called');
- $scope.showFavorites = false;
- $scope.emptyFavorites = false;
- }
-
- $scope.isUrlFavorite = function (menuId) {
-// $log.debug('array objects in menu favorites = ' + $scope.favoriteItemsCount + '; menuId=' + menuId);
- var jsonMenu = JSON.stringify($scope.favoritesMenuItems);
- var isMenuFavorite = jsonMenu.indexOf('menuId\":' + menuId);
- if (isMenuFavorite==-1) {
- return false;
- } else {
- return true;
- }
-
- }
-
- $scope.generateFavoriteItems = function() {
- $http({
- method: "GET",
- url: 'get_favorites',
-// TIMEOUT USED FOR LOCAL TESTING ONLY
-// timeout: 100
- }).success(function (response) {
- if (response == '101: Timeout') {
- $log.error('Timeout attempting to get_favorites_menu');
- } else {
- if(typeof response != 'undefined' && response.length!=0 && typeof response[0] != 'undefined' && typeof response[0].error!="undefined"){
- $log.error('REST API failed get_favorites' + response);
- }else{
- $log.debug('get_favorites = ' + JSON.stringify(response));
- $scope.favoritesMenuItems = response;
- $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
- // $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
- }
- }
- }).error(function (response){
- $log.error('REST API failed get_favorites' + response);
-//createFavoriteErrorMenu() USED FOR LOCAL TESTING ONLY
-// $scope.createFavoriteErrorMenu();
- });
- }
-
- $scope.createFavoriteErrorMenu=function() {
- $scope.favoritesMenuItems = [];
- $scope.favoriteItemsCount = Object.keys($scope.favoritesMenuItems).length;
- // $log.info('number of favorite menus: ' + $scope.favoriteItemsCount);
- }
-
- /* end of Favorite Menu code */
- /* **************************************************************************/
-
-
- /* **************************************************************************/
- // THIS IS USED FOR LOCAL TESTING ONLY
- /* **************************************************************************/
- $scope.createErrorMenu=function() {
- $log.debug('Creating fake menu now...');
-// $scope.loadMenufail=true;
- $scope.menuItems = [
- {
- "menuId": 1,
- "column": 2,
- "text": "Design",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 2,
- "column": 3,
- "text": "Infrastructure Ordering",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 3,
- "column": 4,
- "text": "Service Creation",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 4,
- "column": 5,
- "text": "Service Mgmt",
- "parentMenuId": null,
- "url": ""
- },
- {
- "menuId": 90,
- "column": 1,
- "text": "Google",
- "parentMenuId": 1,
- "url": "http://google.com"
- },
- {
- "menuId": 91,
- "column": 1,
- "text": "Mike Little's Coffee Cup",
- "parentMenuId": 2,
- "url": "http://coffee.com"
- },
- {
- "menuId": 92,
- "column": 2,
- "text": "Andy and his Astrophotgraphy",
- "parentMenuId": 3,
- "url": "http://nightskypix.com"
- },
- {
- "menuId": 93,
- "column": 1,
- "text": "JSONLint",
- "parentMenuId": 4,
- "url": "http://http://jsonlint.com"
- },
- {
- "menuId": 94,
- "column": 2,
- "text": "ONAP test link",
- "parentMenuId": 4,
- "url": "http://tbd.onap.org/testlink"
- },
- {
- "menuId": 95,
- "column": 2,
- "text": "4th Level App4a R16",
- "parentMenuId": 4,
- "url": "http://app4ar16.onap.org/testlink"
- },
- {
- "menuId": 96,
- "column": 3,
- "text": "3rd Level App1c R200",
- "parentMenuId": 4,
- "url": "http://app1c.com"
- },
- {
- "menuId": 97,
- "column": 1,
- "text": "3rd Level App4b R16",
- "parentMenuId": 5,
- "url": "http://app4b.com"
- },
- {
- "menuId": 98,
- "column": 2,
- "text": "3rd Level App2b R16",
- "parentMenuId": 5,
- "url": "http://app2b.com"
- },
- {
- "menuId": 99,
- "column": 1,
- "text": "Favorites",
- "parentMenuId": null,
- "url": ""
- }
- ];
- $scope.menuItems = unflatten( $scope.menuItems );
- //remove this
- $scope.megaMenuDataObject = menuStructureConvert($scope.menuItems);
- }
- }]
- }
-});
-
-app.filter("ellipsis", function(){
- return function(text, length){
- if (text) {
- var ellipsis = text.length > length ? "..." : "";
- return text.slice(0, length) + ellipsis;
- };
- return text;
- }
-});
-
-function reloadPageOnce() {
- if( window.localStorage )
- {
- if( !localStorage.getItem('firstLoad') )
- {
- localStorage['firstLoad'] = true;
- window.location.reload();
- }
- else
- localStorage.removeItem('firstLoad');
- }
-}
-app.controller('loginSnippetCtrl', function ($scope,$http, $log,UserInfoService){
- /*Define fields*/
- $scope.userProfile={
- firstName:'',
- lastName:'',
- fullName:'',
- email:'',
- }
- /*Put user info into fields*/
- $scope.inputUserInfo = function(userInfo){
- if (typeof(userInfo) != "undefined" && userInfo!=null && userInfo!=''){
- if (typeof(userInfo.USER_FIRST_NAME) != "undefined" && userInfo.USER_FIRST_NAME!=null && userInfo.USER_FIRST_NAME!='')
- $scope.userProfile.firstName = userInfo.USER_FIRST_NAME;
- if (typeof(userInfo.USER_LAST_NAME) != "undefined" && userInfo.USER_LAST_NAME!=null && userInfo.USER_LAST_NAME!='')
- $scope.userProfile.lastName = userInfo.USER_LAST_NAME;
- if (typeof(userInfo.USER_EMAIL) != "undefined" && userInfo.USER_EMAIL!=null && userInfo.USER_EMAIL!='')
- $scope.userProfile.email = userInfo.USER_EMAIL;
-
- }
- }
- /*getting user info from session*/
- $scope.getUserNameFromSession = function(){
- UserInfoService.getFunctionalMenuStaticDetailSession()
- .then(function (response) {
- $scope.userProfile.fullName = response.userName;
- $scope.userProfile.email = response.email;
- });
- }
- /*getting user info from shared context*/
- $scope.getUserName=function() {
- var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.error('getFunctionalMenuStaticDetailShareContext failed');
- $scope.getUserNameFromSession();
- }else{
- // $log.info('Received User information from shared context',res);
- var resData = res;
- // console.log(resData);
- $scope.inputUserInfo(resData);
- $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
- }
- },
- function(err) {
- console.log('getFunctionalMenuStaticDetailShareContext failed', err);
- }
- );
- };
- /*call the get user info function*/
- try{
- $scope.getUserName();
- }catch(err){
- $log.info('getUserName failed', err);
- }
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/leftMenu.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/leftMenu.js
deleted file mode 100644
index f42276fe..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/directives/leftMenu.js
+++ /dev/null
@@ -1,184 +0,0 @@
-
-app.directive('qMenu', function () {
- return {
- restrict: 'A', //This menas that it will be used as an attribute and NOT as an element. I don't like creating custom HTML elements
- replace: false,
- templateUrl: "app/fusion/scripts/view-models/left_menu.html",
- controller: ['$scope', '$filter','$http','$timeout','$cookies','LeftMenuService', function ($scope, $filter, $http,$timeout,$cookies,LeftMenuService) {
-
- $scope.leftChildData=[];
- $scope.leftParentData=[];
- $scope.leftMenuItems = [];
- $scope.app_name = "";
- $scope.app_name_full;
- LeftMenuService.getLeftMenu().then(function(response){
- var j = response;
- try{
- if(j && j !== "null" && j!== "undefined"){
- $scope.leftParentData = JSON.parse(j.data);
- $scope.leftChildData = JSON.parse(j.data2);
- }else{
- throw "Get Left Menu response is not an object/is empty";
- }
- try{
- var leftChildItemList = $scope.leftChildData;
- var pageUrl = window.location.href.split('/')[window.location.href.split('/').length-1];
- var leftParentList =$scope.leftParentData;
- for (var i = 0; i < leftParentList.length; i++) {
- $scope.item = {
- parentLabel : leftParentList[i].label,
- parentAction : leftParentList[i].action,
- parentImageSrc : leftParentList[i].imageSrc,
- open:pageUrl==leftParentList[i].action?true:false,
- childItemList : leftChildItemList[i]
- }
- $scope.leftMenuItems.push($scope.item);
- };
- }catch(err){
- console.log("failed to set left menu structure", err);
- }
- }catch (e) {
- console.log("failed to get left menu items", e);
- reloadPageOnce();
- return;
- }
- },function(error){
- console.log("error happened while calling getLeftMenu", error);
- });
-
- LeftMenuService.getAppName().then(function(response){
- var j = response;
- try{
- if(j && j !== "null" && j!== "undefined"){
- // console.log("app name is " + $scope.app_name);
- $scope.app_name_full = j.data;
- var processed_app_name = j.data;
- var n = processed_app_name.length;
- if (n > 15) {
- n = 15;
- }
- $scope.app_name = processed_app_name.substr(0, n);
- }else{
- throw "Get app_name respsone is not an object/is empty";
- }
- }catch (e) {
- console.log("failed to get app name", e);
- return;
- }
- },function(error){
- console.log("failed in getAppName", error);
- });
-
- $scope.adjustHeader=function() {
- $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
-
- if($scope.showHeader == true) {
- $scope.drawer_margin_top = 50;
- $scope.drawer_custom_top = 54;
- $scope.toggle_drawer_top = 55;
- }
- else {
-
- $scope.drawer_margin_top = 40;
- $scope.drawer_custom_top = 0;
- $scope.toggle_drawer_top = 10;
- }
-
-
- };
-
- $scope.adjustHLeftMenu = function (type){
- $scope.showHeader = ($cookies.show_app_header == undefined ? true : $cookies.show_app_header);
-
- if($scope.showHeader == true) {
- $scope.drawer_margin_top = 60;
- $scope.drawer_custom_top = 54;
- $scope.toggle_drawer_top = 55;
- }
- else {
-
- $scope.drawer_margin_top = 50;
- $scope.drawer_custom_top = 0;
- $scope.toggle_drawer_top = 10;
- }
- if(type=='burgerIcon'){
- return { "top": $scope.toggle_drawer_top+"px"};
- }else if(type=='leftMenu'){
- return { "margin-top": $scope.drawer_margin_top+"px"};
- }else
- return;
- }
- $scope.adjustHeader();
- $scope.drawerOpen = true;
-
- $scope.toggleDrawer = function() {
- $scope.drawerOpen = !($scope.drawerOpen);
- if ($scope.drawerOpen) {
- // setCookie('drawerOpen','open',30);
- $scope.arrowShow = true;
-
-
- if (document.getElementById('fnMenueContent')!=null)
- document.getElementById('fnMenueContent').style.marginLeft = "0px";
-
- if (document.getElementById('rightContentAdmin')!=null)
- document.getElementById('rightContentAdmin').style.marginLeft = "210px";
-
- else if (document.getElementById('rightContentProfile')!=null)
- document.getElementById('rightContentProfile').style.marginLeft = "210px";
-
-
-
- } else {
-
- $scope.arrowShow = false;
-
- if (document.getElementById('fnMenueContent')!=null)
- document.getElementById('fnMenueContent').style.marginLeft = "-150px";
-
- if (document.getElementById('rightContentAdmin')!=null) {
- document.getElementById('rightContentAdmin').style.marginLeft = "50px";
-
- }
-
- else if (document.getElementById('rightContentProfile')!=null)
- document.getElementById('rightContentProfile').style.marginLeft = "50px";
-
-
-
-
- }
- };
-
- $timeout(function() {
- detectScrollEvent();
- }, 800);
- }]
- }
-
-});
-$(window).scroll(function() {
- if ($('.att-drawer').is(':visible')) {
- detectScrollEvent();
- }
-
-});
-
-function detectScrollEvent() {
- try{
- var footerOff = $('#footerContainer').offset().top;
- var headOff = $('#headerContainer').offset().top;
- var winHeight = $(window).height();
- if ((footerOff - headOff) <= winHeight) {
- $('.att-drawer').css({
- "height" : footerOff - headOff - 55
- });
- } else {
- $('.att-drawer').css({
- "height" : "94vh"
- });
- }
- }catch(err){
- console.log('detectScrollEvent failed', err)
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/jquery.resize.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/jquery.resize.js
deleted file mode 100644
index 1ebd6c95..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/jquery.resize.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/*!
- * jquery.resize.js 0.0.1 - https://github.com/yckart/jquery.resize.js
- * Resize-event for DOM-Nodes
- *
- * @see http://workingdraft.de/113/
- * @see http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
- *
- * Copyright (c) 2013 Yannick Albert (http://yckart.com)
- * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
- * 2013/04/01
- */
-
-(function(factory) {
- if(typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery'], factory);
- } else if(typeof exports === 'object') {
- // Node/CommonJS style for Browserify
- module.exports = factory;
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function($) {
-
- function addFlowListener(element, type, fn) {
- var flow = type == 'over';
- element.addEventListener('OverflowEvent' in window ? 'overflowchanged' : type + 'flow', function(e) {
- if(e.type == (type + 'flow') || ((e.orient == 0 && e.horizontalOverflow == flow) || (e.orient == 1 && e.verticalOverflow == flow) || (e.orient == 2 && e.horizontalOverflow == flow && e.verticalOverflow == flow))) {
- e.flow = type;
- return fn.call(this, e);
- }
- }, false);
- };
-
- function fireEvent(element, type, data, options) {
- var options = options || {},
- event = document.createEvent('Event');
- event.initEvent(type, 'bubbles' in options ? options.bubbles : true, 'cancelable' in options ? options.cancelable : true);
- for(var z in data) event[z] = data[z];
- element.dispatchEvent(event);
- };
-
- $.event.special.resize = {
- setup: function() {
- var element = this;
- var resize = 'onresize' in element;
- if(!resize && !element._resizeSensor) {
- var sensor = element._resizeSensor = document.createElement('div');
- sensor.className = 'resize-sensor';
- sensor.innerHTML = '<div class="resize-overflow"><div></div></div><div class="resize-underflow"><div></div></div>';
-
- var x = 0,
- y = 0,
- first = sensor.firstElementChild.firstChild,
- last = sensor.lastElementChild.firstChild,
- matchFlow = function(event) {
- var change = false,
- width = element.offsetWidth;
- if(x != width) {
- first.style.width = width - 1 + 'px';
- last.style.width = width + 1 + 'px';
- change = true;
- x = width;
- }
- var height = element.offsetHeight;
- if(y != height) {
- first.style.height = height - 1 + 'px';
- last.style.height = height + 1 + 'px';
- change = true;
- y = height;
- }
- if(change && event.currentTarget != element) fireEvent(element, 'resize');
- };
-
- if(getComputedStyle(element).position == 'static') {
- element.style.position = 'relative';
- element._resizeSensor._resetPosition = true;
- }
- addFlowListener(sensor, 'over', matchFlow);
- addFlowListener(sensor, 'under', matchFlow);
- addFlowListener(sensor.firstElementChild, 'over', matchFlow);
- addFlowListener(sensor.lastElementChild, 'under', matchFlow);
- element.appendChild(sensor);
- matchFlow({});
- }
- var events = element._flowEvents || (element._flowEvents = []);
- if(events.indexOf(handler) == -1) events.push(handler);
- if(!resize) element.addEventListener('resize', handler, false);
- element.onresize = function(e) {
- events.forEach(function(fn) {
- fn.call(element, e);
- });
- };
- },
-
- teardown: function() {
- var element = this;
- var index = element._flowEvents.indexOf(handler);
- if(index > -1) element._flowEvents.splice(index, 1);
- if(!element._flowEvents.length) {
- var sensor = element._resizeSensor;
- if(sensor) {
- element.removeChild(sensor);
- if(sensor._resetPosition) element.style.position = 'static';
- delete element._resizeSensor;
- }
- if('onresize' in element) element.onresize = null;
- delete element._flowEvents;
- }
- element.removeEventListener('resize', handler);
- }
- };
-
- $.fn.extend({
- resize: function(fn) {
- return fn ? this.bind("resize", fn) : this.trigger("resize");
- },
-
- unresize: function(fn) {
- return this.unbind("resize", fn);
- }
- });
-
-
- function handler(event) {
- var orgEvent = event || window.event,
- args = [].slice.call(arguments, 1);
-
- event = $.event.fix(orgEvent);
- event.type = "resize";
-
- // Add event to the front of the arguments
- args.unshift(event);
-
- return($.event.dispatch || $.event.handle).apply(this, args);
- }
-
-})); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/debug.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/debug.js
deleted file mode 100644
index eff36a25..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/debug.js
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- * debugData
- *
- * Pass me a data structure {} and I'll output all the key/value pairs - recursively
- *
- * @example var HTML = debugData( oElem.style, "Element.style", { keys: "top,left,width,height", recurse: true, sort: true, display: true, returnHTML: true });
- *
- * @param Object o_Data A JSON-style data structure
- * @param String s_Title Title for dialog (optional)
- * @param Hash options Pass additional options in a hash
- */
-function debugData (o_Data, s_Title, options) {
- options = options || {};
- var
- str=(s_Title||s_Title==='' ? s_Title : 'DATA')
- , dType=$.type(o_Data)
- // maintain backward compatibility with OLD 'recurseData' param
- , recurse=($.type(options)==='boolean' ? options : options.recurse !==false)
- , keys=(options.keys?','+options.keys+',':false)
- , display=options.display !==false
- , html=options.returnHTML !==false
- , sort=!!options.sort
- , prefix=options.indent ? ' ' : ''
- , D=[], i=0 // Array to hold data, i=counter
- , hasSubKeys = false
- , k, t, skip, x, type // loop vars
- ;
- if (dType!=='object' && dType!=='array') {
- if (options.display) alert( (s_Title || 'debugData') +': '+ o_Data );
- return o_Data;
- }
- if (dType==='object' && $.isPlainObject(o_Data))
- dType='hash';
-
- if (o_Data.jquery) {
- str=s_Title+'jQuery Collection ('+ o_Data.length +')\n context="'+ o_Data.context +'"';
- }
- else if (o_Data.nodeName) {
- str=s_Title+o_Data.tagName;
- var id = o_Data.id, cls=o_Data.className, src=o_Data.src, hrf=o_Data.href;
- if (id) str+='\n id="'+ id+'"';
- if (cls) str+='\n class="'+ cls+'"';
- if (src) str+='\n src="'+ src+'"';
- if (hrf) str+='\n href="'+ hrf+'"';
- }
- else {
- parse(o_Data,prefix,dType); // recursive parsing
- if (sort && !hasSubKeys) D.sort(); // sort by keyName - but NOT if has subKeys!
- if (str) str += '\n***'+ '****************************'.substr(0,str.length) +'\n';
- str += D.join('\n'); // add line-breaks
- }
-
- if (display) alert(str); // display data
- if (html) str=str.replace(/\n/g, ' <br>').replace(/ /g, ' &nbsp;'); // format as HTML
- return str;
-
- function parse ( data, prefix, parentType ) {
- var first = true;
- try {
- $.each( data, function (key, val) {
- skip = (keys && keys.indexOf(','+key+',') === -1);
- type = $.type(val);
- if (type==='object' && $.isPlainObject(val))
- type = 'hash';
- k = prefix + (first ? ' ' : ', ');
- first = false;
-
- if (parentType!=='array') // no key-names for array items
- k += key+': '; // NOT an array
-
- if (type==="date" || type==="regexp") {
- val = val.toString();
- type = "string";
- }
- if (type==="string") { // STRING
- if (!skip) D[i++] = k +'"'+ val +'"';
- }
- // NULL, UNDEFINED, NUMBER or BOOLEAN
- else if (/^(null|undefined|number|boolean)/.test(type)) {
- if (!skip) D[i++] = k + val;
- }
- else if (type==="function") { // FUNCTION
- if (!skip) D[i++] = k +'function()';
- }
- else if (type==="array") { // ARRAY
- if (!skip) {
- D[i++] = k +'[';
- parse( val, prefix+' ',type); // RECURSE
- D[i++] = prefix +' ]';
- }
- }
- else if (val.jquery) { // JQUERY OBJECT
- if (!skip) D[i++] = k +'jQuery ('+ val.length +') context="'+ val.context +'"';
- }
- else if (val.nodeName) { // DOM ELEMENT
- var id = val.id, cls=val.className, src=val.src, hrf=val.href;
- if (skip) D[i++] = k +' '+
- id ? 'id="'+ id+'"' :
- src ? 'src="'+ src+'"' :
- hrf ? 'href="'+ hrf+'"' :
- cls ? 'class="'+cls+'"' :
- '';
- }
- else if (type==="hash") { // JSON
- if (!recurse || $.isEmptyObject(val)) { // show an empty hash
- if (!skip) D[i++] = k +'{ }';
- }
- else { // recurse into JSON hash - indent output
- D[i++] = k +'{';
- parse( val, prefix+' ',type); // RECURSE
- D[i++] = prefix +' }';
- }
- }
- else { // OBJECT
- if (!skip) D[i++] = k +'OBJECT'; // NOT a hash
- }
- });
- } catch (e) {}
- }
-};
-
-function debugStackTrace (s_Title, options) {
- var
- callstack = []
- , isCallstackPopulated = false
- ;
- try {
- i.dont.exist += 0; // doesn't exist- that's the point
- } catch(e) {
- if (e.stack) { // Firefox
- var lines = e.stack.split('\n');
- for (var i=0, len=lines.length; i<len; i++) {
- if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
- callstack.push(lines[i]);
- }
- }
- //Remove call to printStackTrace()
- callstack.shift();
- isCallstackPopulated = true;
- }
- else if (window.opera && e.message) { // Opera
- var lines = e.message.split('\n');
- for (var i=0, len=lines.length; i<len; i++) {
- if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
- var entry = lines[i];
- //Append next line also since it has the file info
- if (lines[i+1]) {
- entry += ' at ' + lines[i+1];
- i++;
- }
- callstack.push(entry);
- }
- }
- //Remove call to printStackTrace()
- callstack.shift();
- isCallstackPopulated = true;
- }
- }
-
- if (!isCallstackPopulated) { // IE and Safari
- var currentFunction = arguments.callee.caller;
- while (currentFunction) {
- var fn = currentFunction.toString();
- var fname = fn.substring(fn.indexOf('function') + 8, fn.indexOf('')) || 'anonymous';
- callstack.push(fname);
- currentFunction = currentFunction.caller;
- }
- }
-
- debugData( callstack, s_Title, options );
-};
-
-if (!window.console) window.console = { log: debugData };
-
-if (!window.console.trace)
- window.console.trace = function (s_Title) {
- window.console.log( debugStackTrace(s_Title, { display: false, returnHTML: false, sort: false }) );
- };
-
-// add method to output 'hash data' inside an string
-window.console.data = function (data, title) {
- var w = { array: ['[',']'], object: ['{','}'], string: ['"','"'], number: ['',''], function: ['','()'] }
- , x = $.type( data )
- , obj = x.match(/(object|array)/)
- , delim = !obj ? ['',''] : x === 'object' ? ['{\n','\n}'] : ['[\n','\n]']
- , opts = { display: false, returnHTML: false, sort: false }
- , debug = debugData( data, '', opts)
- ;
- console.log(
- (title ? title +' = ' : '')
- + delim[0]
- + ($.type(debug) === 'string' ? debug.replace(/ /g, '\t') : debug)
- + delim[1]
- );
-};
-
-
-/**
- * timer
- *
- * Utility for debug timing of events
- * Can track multiple timers and returns either a total time or interval from last event
- * @param String timerName Name of the timer - defaults to debugTimer
- * @param String action Keyword for action or return-value...
- * action: 'reset' = reset; 'clear' = delete; 'total' = ms since init; 'step' or '' = ms since last event
- */
-/**
- * timer
- *
- * Utility method for timing performance
- * Can track multiple timers and returns either a total time or interval from last event
- *
- * returns time-data: {
- * start: Date Object
- * , last: Date Object
- * , step: 99 // time since 'last'
- * , total: 99 // time since 'start'
- * }
- *
- * USAGE SAMPLES
- * =============
- * timer('name'); // create/init timer
- * timer('name', 'reset'); // re-init timer
- * timer('name', 'clear'); // clear/remove timer
- * var i = timer('name'); // how long since last timer request?
- * var i = timer('name', 'total'); // how long since timer started?
- *
- * @param String timerName Name of the timer - defaults to debugTimer
- * @param String action Keyword for action or return-value...
- * @param Hash options Options to customize return data
- * action: 'reset' = reset; 'clear' = delete; 'total' = ms since init; 'step' or '' = ms since last event
- */
-function timer (timerName, action, options) {
- var
- name = timerName || 'debugTimer'
- , Timer = window[ name ]
- , defaults = {
- returnString: true
- , padNumbers: true
- , timePrefix: ''
- , timeSuffix: ''
- }
- ;
-
- // init the timer first time called
- if (!Timer || action == 'reset') { // init timer
- Timer = window[ name ] = {
- start: new Date()
- , last: new Date()
- , step: 0 // time since 'last'
- , total: 0 // time since 'start'
- , options: $.extend({}, defaults, options)
- };
- }
- else if (action == 'clear') { // remove timer
- window[ name ] = null;
- return null;
- }
- else { // update existing timer
- Timer.step = (new Date()) - Timer.last; // time since 'last'
- Timer.total = (new Date()) - Timer.start; // time since 'start'
- Timer.last = new Date();
- }
-
- var
- time = (action == 'total') ? Timer.total : Timer.step
- , o = Timer.options // alias
- ;
-
- if (o.returnString) {
- time += ""; // convert integer to string
- // pad time to 4 chars with underscores
- if (o.padNumbers)
- switch (time.length) {
- case 1: time = "&ensp;&ensp;&ensp;"+ time; break;
- case 2: time = "&ensp;&ensp;"+ time; break;
- case 3: time = "&ensp;"+ time; break;
- }
- // add prefix and suffix
- if (o.timePrefix || o.timeSuffix)
- time = o.timePrefix + time + o.timeSuffix;
- }
-
- return time;
-};
-
-
-/**
- * showOptions
- *
- * Pass a layout-options object, and the pane/key you want to display
- */
-function showOptions (Layout, key, debugOpts) {
- var data = Layout.options;
- $.each(key.split("."), function() {
- data = data[this]; // recurse through multiple key-levels
- });
- debugData( data, 'options.'+key, debugOpts );
-};
-
-/**
- * showState
- *
- * Pass a layout-options object, and the pane/key you want to display
- */
-function showState (Layout, key, debugOpts) {
- var data = Layout.state;
- $.each(key.split("."), function() {
- data = data[this]; // recurse through multiple key-levels
- });
- debugData( data, 'state.'+key, debugOpts );
-};
-
-
-
-
-function debugWindow ( content, options ) {
- var defaults = {
- css: {
- position: 'fixed'
- , top: 0
- }
- };
- $.extend( true, (options || {}), defaults );
- var $W = $('<div></div>')
- .html( content.replace(/\n/g, '<br>').replace(/ /g, ' &nbsp;') ) // format as HTML
- .css( options.css )
- ;
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js
deleted file mode 100644
index 1c998bab..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-latest.js
+++ /dev/null
@@ -1,9555 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.9.0
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-1-14
- */
-(function( window, undefined ) {
-"use strict";
-var
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // The deferred used on DOM ready
- readyList,
-
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
- location = window.location,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.9.0",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler and self cleanup method
- DOMContentLoaded = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- } else if ( document.readyState === "complete" ) {
- // we're here because readyState === "complete" in oldIE
- // which is good enough for us to call the dom ready!
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- return jQuery.inArray( fn, list ) > -1;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( list && ( !fired || stack ) ) {
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function() {
-
- var support, all, a, select, opt, input, fragment, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType === 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: a.getAttribute("href") === "/a",
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- checkOn: !!input.value,
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: document.compatMode === "CSS1Compat",
-
- // Will be defined later
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- body.style.zoom = 1;
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})();
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt /* For internal use only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data, false );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name, false );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( !name.indexOf( "data-" ) ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- // Try to fetch any internally stored data first
- return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- }
-
- this.each(function() {
- jQuery.data( this, key, value );
- });
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- hooks.cur = fn;
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- // Toggle whole class name
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val,
- self = jQuery(this);
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- // In IE9+, Flash objects don't have .getAttribute (#12945)
- // Support: IE9+
- if ( typeof elem.getAttribute !== "undefined" ) {
- ret = elem.getAttribute( name );
- }
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( rboolean.test( name ) ) {
- // Set corresponding property to false for boolean attributes
- // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
- if ( !getSetAttribute && ruseDefault.test( name ) ) {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- } else {
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- var
- // Use .prop to determine if this attribute is understood as boolean
- prop = jQuery.prop( elem, name ),
-
- // Fetch it accordingly
- attr = typeof prop === "boolean" && elem.getAttribute( name ),
- detail = typeof prop === "boolean" ?
-
- getSetInput && getSetAttribute ?
- attr != null :
- // oldIE fabricates an empty string for missing boolean attributes
- // and conflates checked/selected into attroperties
- ruseDefault.test( name ) ?
- elem[ jQuery.camelCase( "default-" + name ) ] :
- !!attr :
-
- // fetch an attribute node for properties not recognized as boolean
- elem.getAttributeNode( name );
-
- return detail && detail.value !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-
-// fix oldIE value attroperty
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return jQuery.nodeName( elem, "input" ) ?
-
- // Ignore the value *property* by using defaultValue
- elem.defaultValue :
-
- ret && ret.specified ? ret.value : undefined;
- },
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret == null ? undefined : ret;
- }
- });
- });
-
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem );
-
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
-
- var i, cur, tmp, bubbleType, ontype, handle, special,
- eventPath = [ elem || document ],
- type = event.type || event,
- namespaces = event.namespace ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- event.isTrigger = true;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- for ( ; cur != this; cur = cur.parentNode || this ) {
-
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.disabled !== true || event.type !== "click" ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: IE<9
- // Fix target property (#1925)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Support: Chrome 23+, Safari?
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // Support: IE<9
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- }
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== document.activeElement && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // Support: IE<9
- // If we error on focus to hidden element (#1486, #12518),
- // let .trigger() run the handlers
- }
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === document.activeElement && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Even when returnValue equals to undefined Firefox will still show alert
- if ( event.result !== undefined ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === "undefined" ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
- if ( !e ) {
- return;
- }
-
- // If preventDefault exists, run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // Support: IE
- // Otherwise set the returnValue property of the original event to false
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
- if ( !e ) {
- return;
- }
- // If stopPropagation exists, run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
-
- // Support: IE
- // Set the cancelBubble property of the original event to true
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "submitBubbles" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "submitBubbles", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "changeBubbles", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://sizzlejs.com/
- */
-(function( window, undefined ) {
-
-var i,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- hasDuplicate,
- outermostContext,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsXML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
- sortOrder,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- support = {},
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Array methods
- arr = [],
- pop = arr.pop,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- operators = "([*^$|!~]?=)",
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rsibling = /[\x20\t\r\n\f]*[+~]/,
-
- rnative = /\{\s*\[native code\]\s*\}/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
- rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
- funescape = function( _, escaped ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- return high !== high ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Use a stripped-down slice if we can't use a native one
-try {
- slice.call( docElem.childNodes, 0 )[0].nodeType;
-} catch ( e ) {
- slice = function( i ) {
- var elem,
- results = [];
- for ( ; (elem = this[i]); i++ ) {
- results.push( elem );
- }
- return results;
- };
-}
-
-/**
- * For feature detection
- * @param {Function} fn The function to test for native support
- */
-function isNative( fn ) {
- return rnative.test( fn + "" );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var cache,
- keys = [];
-
- return (cache = function( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- });
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return fn( div );
- } catch (e) {
- return false;
- } finally {
- // release memory in IE
- div = null;
- }
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( !documentIsXML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {
- push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && !rbuggyQSA.test(selector) ) {
- old = true;
- nid = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results, slice.call( newContext.querySelectorAll(
- newSelector
- ), 0 ) );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsXML = isXML( doc );
-
- // Check if getElementsByTagName("*") returns only elements
- support.tagNameNoComments = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if attributes should be retrieved by attribute nodes
- support.attributes = assert(function( div ) {
- div.innerHTML = "<select></select>";
- var type = typeof div.lastChild.getAttribute("multiple");
- // IE8 returns a string for some attributes even when not present
- return type !== "boolean" && type !== "string";
- });
-
- // Check if getElementsByClassName can be trusted
- support.getByClassName = assert(function( div ) {
- // Opera can't find a second classname (in 9.6)
- div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
- return false;
- }
-
- // Safari 3.2 caches class attributes and doesn't catch changes
- div.lastChild.className = "e";
- return div.getElementsByClassName("e").length === 2;
- });
-
- // Check if getElementById returns elements by name
- // Check if getElementsByName privileges form controls or returns elements by ID
- support.getByName = assert(function( div ) {
- // Inject content
- div.id = expando + 0;
- div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
- docElem.insertBefore( div, docElem.firstChild );
-
- // Test
- var pass = doc.getElementsByName &&
- // buggy browsers will return fewer than the correct 2
- doc.getElementsByName( expando ).length === 2 +
- // buggy browsers will return more than the correct 0
- doc.getElementsByName( expando + 0 ).length;
- support.getIdNotName = !doc.getElementById( expando );
-
- // Cleanup
- docElem.removeChild( div );
-
- return pass;
- });
-
- // IE6/7 return modified attributes
- Expr.attrHandle = assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
- div.firstChild.getAttribute("href") === "#";
- }) ?
- {} :
- {
- "href": function( elem ) {
- return elem.getAttribute( "href", 2 );
- },
- "type": function( elem ) {
- return elem.getAttribute("type");
- }
- };
-
- // ID find and filter
- if ( support.getIdNotName ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
-
- return m ?
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
- [m] :
- undefined :
- [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.tagNameNoComments ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Name
- Expr.find["NAME"] = support.getByName && function( tag, context ) {
- if ( typeof context.getElementsByName !== strundefined ) {
- return context.getElementsByName( name );
- }
- };
-
- // Class
- Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21),
- // no need to also add to buggyMatches since matches checks buggyQSA
- // A support test would require too much code (would include document ready)
- rbuggyQSA = [ ":focus" ];
-
- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explictly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // IE8 - Some boolean attributes are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Opera 10-12/IE8 - ^= $= *= and empty values
- // Should not select anything
- div.innerHTML = "<input type='hidden' i=''/>";
- if ( div.querySelectorAll("[i^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.webkitMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = new RegExp( rbuggyMatches.join("|") );
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
- var compare;
-
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {
- if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {
- if ( a === doc || contains( preferredDoc, a ) ) {
- return -1;
- }
- if ( b === doc || contains( preferredDoc, b ) ) {
- return 1;
- }
- return 0;
- }
- return compare & 4 ? -1 : 1;
- }
-
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE );
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- // Always assume the presence of duplicates if sort doesn't
- // pass them to our comparison function (as in Google Chrome).
- hasDuplicate = false;
- [0, 0].sort( sortOrder );
- support.detectDuplicates = hasDuplicate;
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- // rbuggyQSA always contains :focus, so no need for an existence check
- if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- var val;
-
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- if ( !documentIsXML ) {
- name = name.toLowerCase();
- }
- if ( (val = Expr.attrHandle[ name ]) ) {
- return val( elem );
- }
- if ( documentIsXML || support.attributes ) {
- return elem.getAttribute( name );
- }
- return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
- name :
- val && val.specified ? val.value : null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-// Document sorting and removing duplicates
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- i = 1,
- j = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem === results[ i - 1 ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-function siblingCheck( a, b ) {
- var cur = a && b && a.nextSibling;
-
- for ( ; cur; cur = cur.nextSibling ) {
- if ( cur === b ) {
- return -1;
- }
- }
-
- return a ? 1 : -1;
-}
-
-// Returns a function to use in pseudos for input types
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for buttons
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for positionals
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[4] ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeName ) {
- if ( nodeName === "*" ) {
- return function() { return true; };
- }
-
- nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.substr( result.length - check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifider
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsXML ?
- elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
- elem.lang) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- } );
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- type: type,
- matches: match
- } );
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && combinator.dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Nested matchers should use non-integer dirruns
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- // `i` starts as a string, so matchedCount would equal "00" if there are no elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- for ( j = 0; (matcher = setMatchers[j]); j++ ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && !documentIsXML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
- if ( !context ) {
- return results;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, slice.call( seed, 0 ) );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- documentIsXML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Easy API for creating new setFilters
-function setFilters() {}
-Expr.filters = setFilters.prototype = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// Initialize with the default document
-setDocument();
-
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- isSimple = /^.[^:#\[\.,]*$/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i, ret, self;
-
- if ( typeof selector !== "string" ) {
- self = this;
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < self.length; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- ret = [];
- for ( i = 0; i < this.length; i++ ) {
- jQuery.find( selector, this[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( jQuery.unique( ret ) );
- ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false) );
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true) );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- rneedsContext.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- cur = this[i];
-
- while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
- }
- cur = cur.parentNode;
- }
- }
-
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( jQuery.unique(all) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( this.length > 1 && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- area: [ 1, "<map>", "</map>" ],
- param: [ 1, "<object>", "</object>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
- // unless wrapped in a div with non-breaking characters in front of it.
- _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, false, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, false, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
-
- // If this is a select, ensure that it displays empty (#12336)
- // Support: IE<9
- if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
- elem.options.length = 0;
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function( value ) {
- var isFunc = jQuery.isFunction( value );
-
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( !isFunc && typeof value !== "string" ) {
- value = jQuery( value ).not( this ).detach();
- }
-
- return this.domManip( [ value ], true, function( elem ) {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- if ( parent && this.nodeType === 1 || this.nodeType === 11 ) {
-
- jQuery( this ).remove();
-
- if ( next ) {
- next.parentNode.insertBefore( elem, next );
- } else {
- parent.appendChild( elem );
- }
- }
- });
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
-
- // Flatten any nested arrays
- args = core_concat.apply( [], args );
-
- var fragment, first, scripts, hasScripts, node, doc,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[0],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[0] = value.call( this, index, table ? self.html() : undefined );
- }
- self.domManip( args, table, callback );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call(
- table && jQuery.nodeName( this[i], "table" ) ?
- findOrAppend( this[i], "tbody" ) :
- this[i],
- node,
- i
- );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Hope ajax is available...
- jQuery.ajax({
- url: node.src,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- } else {
- jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
- }
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
- }
- }
-
- return this;
- }
-});
-
-function findOrAppend( elem, tag ) {
- return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- var attr = elem.getAttributeNode("type");
- elem.type = ( attr && attr.specified ) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
- if ( match ) {
- elem.type = match[1];
- } else {
- elem.removeAttribute("type");
- }
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var elem,
- i = 0;
- for ( ; (elem = elems[i]) != null; i++ ) {
- jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function fixCloneNodeIssues( src, dest ) {
- var nodeName, data, e;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 copies events bound via attachEvent when using cloneNode.
- if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
- data = jQuery._data( dest );
-
- for ( e in data.events ) {
- jQuery.removeEvent( dest, e, data.handle );
- }
-
- // Event data gets referenced instead of copied if the expando gets copied too
- dest.removeAttribute( jQuery.expando );
- }
-
- // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
- if ( nodeName === "script" && dest.text !== src.text ) {
- disableScript( dest ).text = src.text;
- restoreScript( dest );
-
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- } else if ( nodeName === "object" ) {
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.defaultSelected = dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone(true);
- jQuery( insert[i] )[ original ]( elems );
-
- // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
- core_push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !found ) {
- for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
- if ( !tag || jQuery.nodeName( elem, tag ) ) {
- found.push( elem );
- } else {
- jQuery.merge( found, getAll( elem, tag ) );
- }
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], found ) :
- found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( manipulation_rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var destElements, srcElements, node, i, clone,
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- // Fix all IE cloning issues
- for ( i = 0; (node = srcElements[i]) != null; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- fixCloneNodeIssues( node, destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0; (node = srcElements[i]) != null; i++ ) {
- cloneCopyEvent( node, destElements[i] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- destElements = srcElements = node = null;
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var contains, elem, tag, tmp, wrap, tbody, j,
- l = elems.length,
-
- // Ensure a safe fragment
- safe = createSafeFragment( context ),
-
- nodes = [],
- i = 0;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || safe.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
-
- tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
- // Descend through wrappers to the right content
- j = wrap[0];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Manually add leading whitespace removed by IE
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- elem = tag === "table" && !rtbody.test( elem ) ?
- tmp.firstChild :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !rtbody.test( elem ) ?
- tmp :
- 0;
-
- j = elem && elem.childNodes.length;
- while ( j-- ) {
- if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
- elem.removeChild( tbody );
- }
- }
- }
-
- jQuery.merge( nodes, tmp.childNodes );
-
- // Fix #12392 for WebKit and IE > 9
- tmp.textContent = "";
-
- // Fix #12392 for oldIE
- while ( tmp.firstChild ) {
- tmp.removeChild( tmp.firstChild );
- }
-
- // Remember the top-level container for proper cleanup
- tmp = safe.lastChild;
- }
- }
- }
-
- // Fix #11356: Clear elements from fragment
- if ( tmp ) {
- safe.removeChild( tmp );
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
- }
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( safe.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- tmp = null;
-
- return safe;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var data, id, elem, type,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( typeof elem.removeAttribute !== "undefined" ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
- }
- }
- }
- }
- }
-});
-var curCSS, getStyles, iframe,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity\s*=\s*([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var elem,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- values[ index ] = jQuery._data( elem, "olddisplay" );
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && elem.style.display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else if ( !values[ index ] && !isHidden( elem ) ) {
- jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) );
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- var styles, len,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- var bool = typeof state === "boolean";
-
- return this.each(function() {
- if ( bool ? state : isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- getStyles = function( elem ) {
- return window.getComputedStyle( elem, null );
- };
-
- curCSS = function( elem, name, _computed ) {
- var width, minWidth, maxWidth,
- computed = _computed || getStyles( elem ),
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
- style = elem.style;
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- getStyles = function( elem ) {
- return elem.currentStyle;
- };
-
- curCSS = function( elem, name, _computed ) {
- var left, rs, rsLeft,
- computed = _computed || getStyles( elem ),
- ret = computed ? computed[ name ] : undefined,
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rs = elem.runtimeStyle;
- rsLeft = rs && rs.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- rs.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- rs.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
- // Use the already-created iframe if possible
- iframe = ( iframe ||
- jQuery("<iframe frameborder='0' width='0' height='0'/>")
- .css( "cssText", "display:block !important" )
- ).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
- doc.write("<!doctype html><html><body>");
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
- display = jQuery.css( elem[0], "display" );
- elem.remove();
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- // if value === "", then remove inline opacity #12685
- if ( ( value >= 1 || value === "" ) &&
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there is no filter style applied in a css rule or unset inline opacity, we are done
- if ( value === "" || currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function(){
- var type = this.type;
- // Use .is(":disabled") so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !manipulation_rcheckableType.test( type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
-
- ajax_nonce = jQuery.now(),
-
- ajax_rquery = /\?/,
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
- jQuery.fn[ type ] = function( fn ){
- return this.on( type, fn );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var transport,
- // URL without anti-cache param
- cacheURL,
- // Response headers
- responseHeadersString,
- responseHeaders,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
- isSuccess = true;
- statusText = "notmodified";
-
- // If we have data
- } else {
- isSuccess = ajaxConvert( s, response );
- statusText = isSuccess.state;
- success = isSuccess.data;
- error = isSuccess.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- }
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- var conv, conv2, current, tmp,
- converters = {},
- i = 0,
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice(),
- prev = dataTypes[ 0 ];
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- // Convert to each sequential dataType, tolerating list modification
- for ( ; (current = dataTypes[++i]); ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current !== "*" ) {
-
- // Convert response if prev dataType is non-auto and differs from current
- if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split(" ");
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.splice( i--, 0, current );
- }
-
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s["throws"] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
-
- // Update prev for next iteration
- prev = current;
- }
- }
-
- return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || jQuery("head")[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement("script");
-
- script.async = true;
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( script.parentNode ) {
- script.parentNode.removeChild( script );
- }
-
- // Dereference the script
- script = null;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
-
- // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( undefined, true );
- }
- }
- };
- }
-});
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-var xhrCallbacks, xhrSupported,
- xhrId = 0,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject && function() {
- // Abort all pending requests
- var key;
- for ( key in xhrCallbacks ) {
- xhrCallbacks[ key ]( undefined, true );
- }
- };
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( err ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- responses = {};
- status = xhr.status;
- xml = xhr.responseXML;
- responseHeaders = xhr.getAllResponseHeaders();
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- if ( typeof xhr.responseText === "string" ) {
- responses.text = xhr.responseText;
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback( undefined, true );
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var end, unit,
- tween = this.createTween( prop, value ),
- parts = rfxnum.exec( value ),
- target = tween.cur(),
- start = +target || 0,
- scale = 1,
- maxIterations = 20;
-
- if ( parts ) {
- end = +parts[2];
- unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" && start ) {
- // Iteratively approximate from a nonzero starting point
- // Prefer the current property, because this process will be trivial if it uses the same units
- // Fallback to end or a simple constant
- start = jQuery.css( tween.elem, prop, true ) || end || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- tween.unit = unit;
- tween.start = start;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
- }
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-function createTweens( animation, props ) {
- jQuery.each( props, function( prop, value ) {
- var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( collection[ index ].call( animation, prop, value ) ) {
-
- // we're done with this property
- return;
- }
- }
- });
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- createTweens( animation, props );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- /*jshint validthis:true */
- var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
- anim = this,
- style = elem.style,
- orig = {},
- handled = [],
- hidden = elem.nodeType && isHidden( elem );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.done(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( index in props ) {
- value = props[ index ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ index ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- handled.push( index );
- }
- }
-
- length = handled.length;
- if ( length ) {
- dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery._removeData( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( index = 0 ; index < length ; index++ ) {
- prop = handled[ index ];
- tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
- orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing a non empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "auto" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
- doAnimation.finish = function() {
- anim.stop( true );
- };
- // Empty animations, or finishing resolves immediately
- if ( empty || jQuery._data( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = jQuery._data( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.cur && hooks.cur.finish ) {
- hooks.cur.finish.call( this );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) ) {
- jQuery.fx.start();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== "undefined" ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
-};
-
-jQuery.offset = {
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.documentElement;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || document.documentElement;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// })();
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-})( window ); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-ui-latest.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-ui-latest.js
deleted file mode 100644
index aa83af97..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery-ui-latest.js
+++ /dev/null
@@ -1,14879 +0,0 @@
-/*! jQuery UI - v1.9.2 - 2012-11-23
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
-
-(function( $, undefined ) {
-
-var uuid = 0,
- runiqueId = /^ui-id-\d+$/;
-
-// prevent duplicate loading
-// this is only a problem because we proxy existing functions
-// and we don't want to double proxy them
-$.ui = $.ui || {};
-if ( $.ui.version ) {
- return;
-}
-
-$.extend( $.ui, {
- version: "1.9.2",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- NUMPAD_ADD: 107,
- NUMPAD_DECIMAL: 110,
- NUMPAD_DIVIDE: 111,
- NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_SUBTRACT: 109,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- _focus: $.fn.focus,
- focus: function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- this._focus.apply( this, arguments );
- },
-
- scrollParent: function() {
- var scrollParent;
- if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
- scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
- }).eq(0);
- } else {
- scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
- }).eq(0);
- }
-
- return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- },
-
- uniqueId: function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + (++uuid);
- }
- });
- },
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( runiqueId.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().andSelf().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support
-$(function() {
- var body = document.body,
- div = body.appendChild( div = document.createElement( "div" ) );
-
- // access offsetHeight before setting the style to prevent a layout bug
- // in IE 9 which causes the element to continue to take up space even
- // after it is removed from the DOM (#8026)
- div.offsetHeight;
-
- $.extend( div.style, {
- minHeight: "100px",
- height: "auto",
- padding: 0,
- borderWidth: 0
- });
-
- $.support.minHeight = div.offsetHeight === 100;
- $.support.selectstart = "onselectstart" in div;
-
- // set display to none to avoid a layout bug in IE
- // http://dev.jquery.com/ticket/4014
- body.removeChild( div ).style.display = "none";
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-
-(function() {
- var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
- $.ui.ie = uaMatch.length ? true : false;
- $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
-})();
-
-$.fn.extend({
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
- plugin: {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args ) {
- var i,
- set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
- },
-
- contains: $.contains,
-
- // only used by resizable
- hasScroll: function( el, a ) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- },
-
- // these are odd functions, fix the API or move into individual plugins
- isOverAxis: function( x, reference, size ) {
- //Determines when x coordinate is over "b" element axis
- return ( x > reference ) && ( x < ( reference + size ) );
- },
- isOver: function( y, x, top, left, height, width ) {
- //Determines when x, y coordinates is over "b" element
- return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var uuid = 0,
- slice = Array.prototype.slice,
- _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( $.isFunction( value ) ) {
- prototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- }
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
- }, prototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- // TODO remove widgetBaseClass, see #8155
- widgetBaseClass: fullName,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
- var input = slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.widget.extend.apply( null, [ options ].concat(args) ) :
- options;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} )._init();
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- // 1.9 BC for #7810
- // TODO remove dual storage
- $.data( element, this.widgetName, this );
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- // 1.9 BC for #7810
- // TODO remove dual storage
- .removeData( this.widgetName )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( value === undefined ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( value === undefined ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOption( "disabled", false );
- },
- disable: function() {
- return this._setOption( "disabled", true );
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- // accept selectors, DOM elements
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^(\w+)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- $.Widget.prototype._getCreateOptions = function() {
- return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
- };
-}
-
-})( jQuery );
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function( e ) {
- mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
- version: "1.9.2",
- options: {
- cancel: 'input,textarea,button,select,option',
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind('mousedown.'+this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind('click.'+this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, that.widgetName + '.preventClickEvent');
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind('.'+this.widgetName);
- if ( this._mouseMoveDelegate ) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if( mouseHandled ) { return; }
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, this.widgetName + '.preventClickEvent');
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
- $(document)
- .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && !(document.documentMode >= 9) && !event.button) {
- return this._mouseUp(event);
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + '.preventClickEvent', true);
- }
-
- this._mouseStop(event);
- }
-
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(event) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(event) {},
- _mouseDrag: function(event) {},
- _mouseStop: function(event) {},
- _mouseCapture: function(event) { return true; }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowX ? $.position.scrollbarWidth() : 0,
- height: hasOverflowY ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] );
- return {
- element: withinElement,
- isWindow: isWindow,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
- width: isWindow ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- targetElem = target[0],
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- if ( targetElem.nodeType === 9 ) {
- targetWidth = target.width();
- targetHeight = target.height();
- targetOffset = { top: 0, left: 0 };
- } else if ( $.isWindow( targetElem ) ) {
- targetWidth = target.width();
- targetHeight = target.height();
- targetOffset = { top: target.scrollTop(), left: target.scrollLeft() };
- } else if ( targetElem.preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- targetWidth = targetHeight = 0;
- targetOffset = { top: targetElem.pageY, left: targetElem.pageX };
- } else {
- targetWidth = target.outerWidth();
- targetHeight = target.outerHeight();
- targetOffset = target.offset();
- }
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !$.support.offsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem : elem
- });
- }
- });
-
- if ( $.fn.bgiframe ) {
- elem.bgiframe();
- }
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function () {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // offset option
- (function( $ ) {
- var _position = $.fn.position;
- $.fn.position = function( options ) {
- if ( !options || !options.offset ) {
- return _position.call( this, options );
- }
- var offset = options.offset.split( " " ),
- at = options.at.split( " " );
- if ( offset.length === 1 ) {
- offset[ 1 ] = offset[ 0 ];
- }
- if ( /^\d/.test( offset[ 0 ] ) ) {
- offset[ 0 ] = "+" + offset[ 0 ];
- }
- if ( /^\d/.test( offset[ 1 ] ) ) {
- offset[ 1 ] = "+" + offset[ 1 ];
- }
- if ( at.length === 1 ) {
- if ( /left|center|right/.test( at[ 0 ] ) ) {
- at[ 1 ] = "center";
- } else {
- at[ 1 ] = at[ 0 ];
- at[ 0 ] = "center";
- }
- }
- return _position.call( this, $.extend( options, {
- at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
- offset: undefined
- } ) );
- };
- }( jQuery ) );
-}
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-var uid = 0,
- hideProps = {},
- showProps = {};
-
-hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
- hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
-showProps.height = showProps.paddingTop = showProps.paddingBottom =
- showProps.borderTopWidth = showProps.borderBottomWidth = "show";
-
-$.widget( "ui.accordion", {
- version: "1.9.2",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- _create: function() {
- var accordionId = this.accordionId = "ui-accordion-" +
- (this.element.attr( "id" ) || ++uid),
- options = this.options;
-
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" );
-
- this.headers = this.element.find( options.header )
- .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
- this._hoverable( this.headers );
- this._focusable( this.headers );
-
- this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .hide();
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active" )
- .toggleClass( "ui-corner-all ui-corner-top" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this._createIcons();
- this.refresh();
-
- // ARIA
- this.element.attr( "role", "tablist" );
-
- this.headers
- .attr( "role", "tab" )
- .each(function( i ) {
- var header = $( this ),
- headerId = header.attr( "id" ),
- panel = header.next(),
- panelId = panel.attr( "id" );
- if ( !headerId ) {
- headerId = accordionId + "-header-" + i;
- header.attr( "id", headerId );
- }
- if ( !panelId ) {
- panelId = accordionId + "-panel-" + i;
- panel.attr( "id", panelId );
- }
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
-
- this._on( this.headers, { keydown: "_keydown" });
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._setupEvents( options.event );
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- content: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "<span>" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown : function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var maxHeight, overflow,
- heightStyle = this.options.heightStyle,
- parent = this.element.parent();
-
-
- if ( heightStyle === "fill" ) {
- // IE 6 treats height like minHeight, so we need to turn off overflow
- // in order to get a reliable height
- // we use the minHeight support test because we assume that only
- // browsers that don't support minHeight will treat height as minHeight
- if ( !$.support.minHeight ) {
- overflow = parent.css( "overflow" );
- parent.css( "overflow", "hidden");
- }
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
- if ( overflow ) {
- parent.css( "overflow", overflow );
- }
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {};
- if ( !event ) {
- return;
- }
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- this._on( this.headers, events );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- toHide.prev().attr( "aria-selected", "false" );
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- })
- .prev()
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- adjust += fx.now;
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[0].className = toHide.parent()[0].className;
- }
-
- this._trigger( "activate", null, data );
- }
-});
-
-
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // navigation options
- (function( $, prototype ) {
- $.extend( prototype.options, {
- navigation: false,
- navigationFilter: function() {
- return this.href.toLowerCase() === location.href.toLowerCase();
- }
- });
-
- var _create = prototype._create;
- prototype._create = function() {
- if ( this.options.navigation ) {
- var that = this,
- headers = this.element.find( this.options.header ),
- content = headers.next(),
- current = headers.add( content )
- .find( "a" )
- .filter( this.options.navigationFilter )
- [ 0 ];
- if ( current ) {
- headers.add( content ).each( function( index ) {
- if ( $.contains( this, current ) ) {
- that.options.active = Math.floor( index / 2 );
- return false;
- }
- });
- }
- }
- _create.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // height options
- (function( $, prototype ) {
- $.extend( prototype.options, {
- heightStyle: null, // remove default so we fall back to old values
- autoHeight: true, // use heightStyle: "auto"
- clearStyle: false, // use heightStyle: "content"
- fillSpace: false // use heightStyle: "fill"
- });
-
- var _create = prototype._create,
- _setOption = prototype._setOption;
-
- $.extend( prototype, {
- _create: function() {
- this.options.heightStyle = this.options.heightStyle ||
- this._mergeHeightStyle();
-
- _create.call( this );
- },
-
- _setOption: function( key ) {
- if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
- this.options.heightStyle = this._mergeHeightStyle();
- }
- _setOption.apply( this, arguments );
- },
-
- _mergeHeightStyle: function() {
- var options = this.options;
-
- if ( options.fillSpace ) {
- return "fill";
- }
-
- if ( options.clearStyle ) {
- return "content";
- }
-
- if ( options.autoHeight ) {
- return "auto";
- }
- }
- });
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // icon options
- (function( $, prototype ) {
- $.extend( prototype.options.icons, {
- activeHeader: null, // remove default so we fall back to old values
- headerSelected: "ui-icon-triangle-1-s"
- });
-
- var _createIcons = prototype._createIcons;
- prototype._createIcons = function() {
- if ( this.options.icons ) {
- this.options.icons.activeHeader = this.options.icons.activeHeader ||
- this.options.icons.headerSelected;
- }
- _createIcons.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // expanded active option, activate method
- (function( $, prototype ) {
- prototype.activate = prototype._activate;
-
- var _findActive = prototype._findActive;
- prototype._findActive = function( index ) {
- if ( index === -1 ) {
- index = false;
- }
- if ( index && typeof index !== "number" ) {
- index = this.headers.index( this.headers.filter( index ) );
- if ( index === -1 ) {
- index = false;
- }
- }
- return _findActive.call( this, index );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // resize method
- jQuery.ui.accordion.prototype.resize = jQuery.ui.accordion.prototype.refresh;
-
- // change events
- (function( $, prototype ) {
- $.extend( prototype.options, {
- change: null,
- changestart: null
- });
-
- var _trigger = prototype._trigger;
- prototype._trigger = function( type, event, data ) {
- var ret = _trigger.apply( this, arguments );
- if ( !ret ) {
- return false;
- }
-
- if ( type === "beforeActivate" ) {
- ret = _trigger.call( this, "changestart", event, {
- oldHeader: data.oldHeader,
- oldContent: data.oldPanel,
- newHeader: data.newHeader,
- newContent: data.newPanel
- });
- } else if ( type === "activate" ) {
- ret = _trigger.call( this, "change", event, {
- oldHeader: data.oldHeader,
- oldContent: data.oldPanel,
- newHeader: data.newHeader,
- newContent: data.newPanel
- });
- }
- return ret;
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // animated option
- // NOTE: this only provides support for "slide", "bounceslide", and easings
- // not the full $.ui.accordion.animations API
- (function( $, prototype ) {
- $.extend( prototype.options, {
- animate: null,
- animated: "slide"
- });
-
- var _create = prototype._create;
- prototype._create = function() {
- var options = this.options;
- if ( options.animate === null ) {
- if ( !options.animated ) {
- options.animate = false;
- } else if ( options.animated === "slide" ) {
- options.animate = 300;
- } else if ( options.animated === "bounceslide" ) {
- options.animate = {
- duration: 200,
- down: {
- easing: "easeOutBounce",
- duration: 1000
- }
- };
- } else {
- options.animate = options.animated;
- }
- }
-
- _create.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-}
-
-})( jQuery );
-(function( $, undefined ) {
-
-// used to prevent race conditions with remote data sources
-var requestIndex = 0;
-
-$.widget( "ui.autocomplete", {
- version: "1.9.2",
- defaultElement: "<input>",
- options: {
- appendTo: "body",
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
-
- this.isMultiLine = this._isMultiLine();
- this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- case keyCode.NUMPAD_ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- this._value( this.term );
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- event.preventDefault();
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "<ul>" )
- .addClass( "ui-autocomplete" )
- .appendTo( this.document.find( this.options.appendTo || "body" )[ 0 ] )
- .menu({
- // custom key handling for now
- input: $(),
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .zIndex( this.element.zIndex() + 1 )
- .hide()
- .data( "menu" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- // #7024 - Prevent accidental activation of menu items in Firefox
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- // back compat for _renderItem using item.autocomplete, via #7810
- // TODO remove the fallback, see #8156
- var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- } else {
- // Normally the input is populated with the item's value as the
- // menu is navigated, causing screen readers to notice a change and
- // announce the item. Since the focus event was canceled, this doesn't
- // happen, so we update the live region so that screen readers can
- // still notice the change and announce it.
- this.liveRegion.text( item.value );
- }
- },
- menuselect: function( event, ui ) {
- // back compat for _renderItem using item.autocomplete, via #7810
- // TODO remove the fallback, see #8156
- var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[0] !== this.document[0].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "<span>", {
- role: "status",
- "aria-live": "polite"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .insertAfter( this.element );
-
- if ( $.fn.bgiframe ) {
- this.menu.element.bgiframe();
- }
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this.document.find( value || "body" )[0] );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _isMultiLine: function() {
- // Textareas are always multi-line
- if ( this.element.is( "textarea" ) ) {
- return true;
- }
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- if ( this.element.is( "input" ) ) {
- return false;
- }
- // All other element types are determined by whether or not they're contentEditable
- return this.element.prop( "isContentEditable" );
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray(this.options.source) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response( [] );
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
- // only search if the value has changed
- if ( this.term !== this._value() ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var that = this,
- index = ++requestIndex;
-
- return function( content ) {
- if ( index === requestIndex ) {
- that.__response( content );
- }
-
- that.pending--;
- if ( !that.pending ) {
- that.element.removeClass( "ui-autocomplete-loading" );
- }
- };
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[0].label && items[0].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend({
- label: item.label || item.value,
- value: item.value || item.label
- }, item );
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element
- .empty()
- .zIndex( this.element.zIndex() + 1 );
- this._renderMenu( ul, items );
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ));
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "<li>" )
- .append( $( "<a>" ).text( item.label ) )
- .appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
- this._value( this.term );
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
- },
- filter: function(array, term) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
- return $.grep( array, function(value) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.text( message );
- }
-});
-
-
-}( jQuery ));
-(function( $, undefined ) {
-
-var lastActive, startXPos, startYPos, clickDragged,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- stateClasses = "ui-state-hover ui-state-active ",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var buttons = $( this ).find( ":ui-button" );
- setTimeout(function() {
- buttons.button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "']" );
- } else {
- radios = $( "[name='" + name + "']", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.9.2",
- defaultElement: "<button>",
- options: {
- disabled: null,
- text: true,
- label: null,
- icons: {
- primary: null,
- secondary: null
- }
- },
- _create: function() {
- this.element.closest( "form" )
- .unbind( "reset" + this.eventNamespace )
- .bind( "reset" + this.eventNamespace, formResetHandler );
-
- if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = !!this.element.prop( "disabled" );
- } else {
- this.element.prop( "disabled", this.options.disabled );
- }
-
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr( "title" );
-
- var that = this,
- options = this.options,
- toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "",
- focusClass = "ui-state-focus";
-
- if ( options.label === null ) {
- options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
- }
-
- this._hoverable( this.buttonElement );
-
- this.buttonElement
- .addClass( baseClasses )
- .attr( "role", "button" )
- .bind( "mouseenter" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- if ( this === lastActive ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "mouseleave" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- $( this ).removeClass( activeClass );
- })
- .bind( "click" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- event.preventDefault();
- event.stopImmediatePropagation();
- }
- });
-
- this.element
- .bind( "focus" + this.eventNamespace, function() {
- // no need to check disabled, focus won't be triggered anyway
- that.buttonElement.addClass( focusClass );
- })
- .bind( "blur" + this.eventNamespace, function() {
- that.buttonElement.removeClass( focusClass );
- });
-
- if ( toggleButton ) {
- this.element.bind( "change" + this.eventNamespace, function() {
- if ( clickDragged ) {
- return;
- }
- that.refresh();
- });
- // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
- // prevents issue where button state changes but checkbox/radio checked state
- // does not in Firefox (see ticket #6970)
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- clickDragged = false;
- startXPos = event.pageX;
- startYPos = event.pageY;
- })
- .bind( "mouseup" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
- clickDragged = true;
- }
- });
- }
-
- if ( this.type === "checkbox" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).toggleClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", that.element[0].checked );
- });
- } else if ( this.type === "radio" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", "true" );
-
- var radio = that.element[ 0 ];
- radioGroup( radio )
- .not( radio )
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- });
- } else {
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- lastActive = this;
- that.document.one( "mouseup", function() {
- lastActive = null;
- });
- })
- .bind( "mouseup" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).removeClass( "ui-state-active" );
- })
- .bind( "keydown" + this.eventNamespace, function(event) {
- if ( options.disabled ) {
- return false;
- }
- if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "keyup" + this.eventNamespace, function() {
- $( this ).removeClass( "ui-state-active" );
- });
-
- if ( this.buttonElement.is("a") ) {
- this.buttonElement.keyup(function(event) {
- if ( event.keyCode === $.ui.keyCode.SPACE ) {
- // TODO pass through original event correctly (just as 2nd argument doesn't work)
- $( this ).click();
- }
- });
- }
- }
-
- // TODO: pull out $.Widget's handling for the disabled option into
- // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
- // be overridden by individual plugins
- this._setOption( "disabled", options.disabled );
- this._resetButton();
- },
-
- _determineButtonType: function() {
- var ancestor, labelSelector, checked;
-
- if ( this.element.is("[type=checkbox]") ) {
- this.type = "checkbox";
- } else if ( this.element.is("[type=radio]") ) {
- this.type = "radio";
- } else if ( this.element.is("input") ) {
- this.type = "input";
- } else {
- this.type = "button";
- }
-
- if ( this.type === "checkbox" || this.type === "radio" ) {
- // we don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.element.parents().last();
- labelSelector = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = ancestor.find( labelSelector );
- if ( !this.buttonElement.length ) {
- ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
- this.buttonElement = ancestor.filter( labelSelector );
- if ( !this.buttonElement.length ) {
- this.buttonElement = ancestor.find( labelSelector );
- }
- }
- this.element.addClass( "ui-helper-hidden-accessible" );
-
- checked = this.element.is( ":checked" );
- if ( checked ) {
- this.buttonElement.addClass( "ui-state-active" );
- }
- this.buttonElement.prop( "aria-pressed", checked );
- } else {
- this.buttonElement = this.element;
- }
- },
-
- widget: function() {
- return this.buttonElement;
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-helper-hidden-accessible" );
- this.buttonElement
- .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
- .removeAttr( "role" )
- .removeAttr( "aria-pressed" )
- .html( this.buttonElement.find(".ui-button-text").html() );
-
- if ( !this.hasTitle ) {
- this.buttonElement.removeAttr( "title" );
- }
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- } else {
- this.element.prop( "disabled", false );
- }
- return;
- }
- this._resetButton();
- },
-
- refresh: function() {
- //See #8237 & #8828
- var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
-
- if ( isDisabled !== this.options.disabled ) {
- this._setOption( "disabled", isDisabled );
- }
- if ( this.type === "radio" ) {
- radioGroup( this.element[0] ).each(function() {
- if ( $( this ).is( ":checked" ) ) {
- $( this ).button( "widget" )
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- $( this ).button( "widget" )
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- });
- } else if ( this.type === "checkbox" ) {
- if ( this.element.is( ":checked" ) ) {
- this.buttonElement
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- this.buttonElement
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- }
- },
-
- _resetButton: function() {
- if ( this.type === "input" ) {
- if ( this.options.label ) {
- this.element.val( this.options.label );
- }
- return;
- }
- var buttonElement = this.buttonElement.removeClass( typeClasses ),
- buttonText = $( "<span></span>", this.document[0] )
- .addClass( "ui-button-text" )
- .html( this.options.label )
- .appendTo( buttonElement.empty() )
- .text(),
- icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary,
- buttonClasses = [];
-
- if ( icons.primary || icons.secondary ) {
- if ( this.options.text ) {
- buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
- }
-
- if ( icons.primary ) {
- buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
- }
-
- if ( icons.secondary ) {
- buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
- }
-
- if ( !this.options.text ) {
- buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
-
- if ( !this.hasTitle ) {
- buttonElement.attr( "title", $.trim( buttonText ) );
- }
- }
- } else {
- buttonClasses.push( "ui-button-text-only" );
- }
- buttonElement.addClass( buttonClasses.join( " " ) );
- }
-});
-
-$.widget( "ui.buttonset", {
- version: "1.9.2",
- options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
- },
-
- _create: function() {
- this.element.addClass( "ui-buttonset" );
- },
-
- _init: function() {
- this.refresh();
- },
-
- _setOption: function( key, value ) {
- if ( key === "disabled" ) {
- this.buttons.button( "option", key, value );
- }
-
- this._super( key, value );
- },
-
- refresh: function() {
- var rtl = this.element.css( "direction" ) === "rtl";
-
- this.buttons = this.element.find( this.options.items )
- .filter( ":ui-button" )
- .button( "refresh" )
- .end()
- .not( ":ui-button" )
- .button()
- .end()
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
- .filter( ":first" )
- .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
- .end()
- .filter( ":last" )
- .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
- .end()
- .end();
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-buttonset" );
- this.buttons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-left ui-corner-right" )
- .end()
- .button( "destroy" );
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-$.extend($.ui, { datepicker: { version: "1.9.2" } });
-
-var PROP_NAME = 'datepicker';
-var dpuuid = new Date().getTime();
-var instActive;
-
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this.debug = false; // Change this to true to start debugging
- this._curInst = null; // The current instance in use
- this._keyEvent = false; // If the last event was a key event
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
- this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
- this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
- this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
- this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
- this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
- this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
- this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
- this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[''] = { // Default regional settings
- closeText: 'Done', // Display text for close link
- prevText: 'Prev', // Display text for previous month link
- nextText: 'Next', // Display text for next month link
- currentText: 'Today', // Display text for current month link
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
- weekHeader: 'Wk', // Column header for week of the year
- dateFormat: 'mm/dd/yy', // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- isRTL: false, // True if right-to-left language, false if left-to-right
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
- yearSuffix: '' // Additional text to append to the year in the month headers
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: 'focus', // 'focus' for popup on focus,
- // 'button' for trigger button, or 'both' for either
- showAnim: 'fadeIn', // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: '', // Display text following the input box, e.g. showing the format
- buttonText: '...', // Text for trigger button
- buttonImage: '', // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: false, // True if month can be selected directly, false if only prev/next
- changeYear: false, // True if year can be selected directly, false if only prev/next
- yearRange: 'c-10:c+10', // Range of years to display in drop-down,
- // either relative to today's year (-nn:+nn), relative to currently displayed year
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
- showWeek: false, // True to show week of the year, false to not show it
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: '+10', // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with '+' for current year + value
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: 'fast', // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
- stepMonths: 1, // Number of months to step back/forward
- stepBigMonths: 12, // Number of months to step back/forward for the big links
- altField: '', // Selector for an alternate field to store selected dates into
- altFormat: '', // The date format to use for the alternate field
- constrainInput: true, // The input is constrained by the current date format
- showButtonPanel: false, // True to show button panel, false to not show it
- autoSize: false, // True to size the input for the date format, false to leave as is
- disabled: false // The initial disabled state
- };
- $.extend(this._defaults, this.regional['']);
- this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: 'hasDatepicker',
-
- //Keep track of the maximum number of rows displayed (see #7043)
- maxRows: 4,
-
- /* Debug logging (if enabled). */
- log: function () {
- if (this.debug)
- console.log.apply('', arguments);
- },
-
- // TODO rename to "widget" when switching to widget factory
- _widgetDatepicker: function() {
- return this.dpDiv;
- },
-
- /* Override the default settings for all instances of the date picker.
- @param settings object - the new settings to use as defaults (anonymous object)
- @return the manager object */
- setDefaults: function(settings) {
- extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- @param target element - the target input field or division or span
- @param settings object - the new settings to use for this date picker instance (anonymous) */
- _attachDatepicker: function(target, settings) {
- // check for settings on the control itself - in namespace 'date:'
- var inlineSettings = null;
- for (var attrName in this._defaults) {
- var attrValue = target.getAttribute('date:' + attrName);
- if (attrValue) {
- inlineSettings = inlineSettings || {};
- try {
- inlineSettings[attrName] = eval(attrValue);
- } catch (err) {
- inlineSettings[attrName] = attrValue;
- }
- }
- }
- var nodeName = target.nodeName.toLowerCase();
- var inline = (nodeName == 'div' || nodeName == 'span');
- if (!target.id) {
- this.uuid += 1;
- target.id = 'dp' + this.uuid;
- }
- var inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {}, inlineSettings || {});
- if (nodeName == 'input') {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
- return {id: id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- inst.append = $([]);
- inst.trigger = $([]);
- if (input.hasClass(this.markerClassName))
- return;
- this._attachments(input, inst);
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
- keypress(this._doKeyPress).keyup(this._doKeyUp).
- bind("setData.datepicker", function(event, key, value) {
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key) {
- return this._get(inst, key);
- });
- this._autoSize(inst);
- $.data(target, PROP_NAME, inst);
- //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- },
-
- /* Make attachments based on settings. */
- _attachments: function(input, inst) {
- var appendText = this._get(inst, 'appendText');
- var isRTL = this._get(inst, 'isRTL');
- if (inst.append)
- inst.append.remove();
- if (appendText) {
- inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
- input[isRTL ? 'before' : 'after'](inst.append);
- }
- input.unbind('focus', this._showDatepicker);
- if (inst.trigger)
- inst.trigger.remove();
- var showOn = this._get(inst, 'showOn');
- if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
- var buttonText = this._get(inst, 'buttonText');
- var buttonImage = this._get(inst, 'buttonImage');
- inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
- $('<img/>').addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $('<button type="button"></button>').addClass(this._triggerClass).
- html(buttonImage == '' ? buttonText : $('<img/>').attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? 'before' : 'after'](inst.trigger);
- inst.trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
- $.datepicker._hideDatepicker();
- else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
- $.datepicker._hideDatepicker();
- $.datepicker._showDatepicker(input[0]);
- } else
- $.datepicker._showDatepicker(input[0]);
- return false;
- });
- }
- },
-
- /* Apply the maximum length for the date format. */
- _autoSize: function(inst) {
- if (this._get(inst, 'autoSize') && !inst.inline) {
- var date = new Date(2009, 12 - 1, 20); // Ensure double digits
- var dateFormat = this._get(inst, 'dateFormat');
- if (dateFormat.match(/[DM]/)) {
- var findMax = function(names) {
- var max = 0;
- var maxI = 0;
- for (var i = 0; i < names.length; i++) {
- if (names[i].length > max) {
- max = names[i].length;
- maxI = i;
- }
- }
- return maxI;
- };
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
- 'monthNames' : 'monthNamesShort'))));
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
- 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
- }
- inst.input.attr('size', this._formatDate(inst, date).length);
- }
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var divSpan = $(target);
- if (divSpan.hasClass(this.markerClassName))
- return;
- divSpan.addClass(this.markerClassName).append(inst.dpDiv).
- bind("setData.datepicker", function(event, key, value){
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key){
- return this._get(inst, key);
- });
- $.data(target, PROP_NAME, inst);
- this._setDate(inst, this._getDefaultDate(inst), true);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
- inst.dpDiv.css( "display", "block" );
- },
-
- /* Pop-up the date picker in a "dialog" box.
- @param input element - ignored
- @param date string or Date - the initial date to display
- @param onSelect function - the function to call when a date is selected
- @param settings object - update the dialog date picker instance's settings (anonymous object)
- @param pos int[2] - coordinates for the dialog's position within the screen or
- event - with x/y coordinates or
- leave empty for default (screen centre)
- @return the manager object */
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
- var inst = this._dialogInst; // internal instance
- if (!inst) {
- this.uuid += 1;
- var id = 'dp' + this.uuid;
- this._dialogInput = $('<input type="text" id="' + id +
- '" style="position: absolute; top: -100px; width: 0px;"/>');
- this._dialogInput.keydown(this._doKeyDown);
- $('body').append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], PROP_NAME, inst);
- }
- extendRemove(inst.settings, settings || {});
- date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
- this._dialogInput.val(date);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- var browserWidth = document.documentElement.clientWidth;
- var browserHeight = document.documentElement.clientHeight;
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI)
- $.blockUI(this.dpDiv);
- $.data(this._dialogInput[0], PROP_NAME, inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- @param target element - the target input field or division or span */
- _destroyDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- $.removeData(target, PROP_NAME);
- if (nodeName == 'input') {
- inst.append.remove();
- inst.trigger.remove();
- $target.removeClass(this.markerClassName).
- unbind('focus', this._showDatepicker).
- unbind('keydown', this._doKeyDown).
- unbind('keypress', this._doKeyPress).
- unbind('keyup', this._doKeyUp);
- } else if (nodeName == 'div' || nodeName == 'span')
- $target.removeClass(this.markerClassName).empty();
- },
-
- /* Enable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _enableDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- if (nodeName == 'input') {
- target.disabled = false;
- inst.trigger.filter('button').
- each(function() { this.disabled = false; }).end().
- filter('img').css({opacity: '1.0', cursor: ''});
- }
- else if (nodeName == 'div' || nodeName == 'span') {
- var inline = $target.children('.' + this._inlineClass);
- inline.children().removeClass('ui-state-disabled');
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", false);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _disableDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- if (nodeName == 'input') {
- target.disabled = true;
- inst.trigger.filter('button').
- each(function() { this.disabled = true; }).end().
- filter('img').css({opacity: '0.5', cursor: 'default'});
- }
- else if (nodeName == 'div' || nodeName == 'span') {
- var inline = $target.children('.' + this._inlineClass);
- inline.children().addClass('ui-state-disabled');
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", true);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- @param target element - the target input field or division or span
- @return boolean - true if disabled, false if enabled */
- _isDisabledDatepicker: function(target) {
- if (!target) {
- return false;
- }
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] == target)
- return true;
- }
- return false;
- },
-
- /* Retrieve the instance data for the target control.
- @param target element - the target input field or division or span
- @return object - the associated instance data
- @throws error if a jQuery problem getting data */
- _getInst: function(target) {
- try {
- return $.data(target, PROP_NAME);
- }
- catch (err) {
- throw 'Missing instance data for this datepicker';
- }
- },
-
- /* Update or retrieve the settings for a date picker attached to an input field or division.
- @param target element - the target input field or division or span
- @param name object - the new settings to update or
- string - the name of the setting to change or retrieve,
- when retrieving also 'all' for all instance settings or
- 'defaults' for all global defaults
- @param value any - the new value for the setting
- (omit if above is an object or to retrieve a value) */
- _optionDatepicker: function(target, name, value) {
- var inst = this._getInst(target);
- if (arguments.length == 2 && typeof name == 'string') {
- return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
- (inst ? (name == 'all' ? $.extend({}, inst.settings) :
- this._get(inst, name)) : null));
- }
- var settings = name || {};
- if (typeof name == 'string') {
- settings = {};
- settings[name] = value;
- }
- if (inst) {
- if (this._curInst == inst) {
- this._hideDatepicker();
- }
- var date = this._getDateDatepicker(target, true);
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- extendRemove(inst.settings, settings);
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
- if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
- inst.settings.minDate = this._formatDate(inst, minDate);
- if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
- inst.settings.maxDate = this._formatDate(inst, maxDate);
- this._attachments($(target), inst);
- this._autoSize(inst);
- this._setDate(inst, date);
- this._updateAlternate(inst);
- this._updateDatepicker(inst);
- }
- },
-
- // change method deprecated
- _changeDatepicker: function(target, name, value) {
- this._optionDatepicker(target, name, value);
- },
-
- /* Redraw the date picker attached to an input field or division.
- @param target element - the target input field or division or span */
- _refreshDatepicker: function(target) {
- var inst = this._getInst(target);
- if (inst) {
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- @param target element - the target input field or division or span
- @param date Date - the new date */
- _setDateDatepicker: function(target, date) {
- var inst = this._getInst(target);
- if (inst) {
- this._setDate(inst, date);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- @param target element - the target input field or division or span
- @param noDefault boolean - true if no default date is to be used
- @return Date - the current date */
- _getDateDatepicker: function(target, noDefault) {
- var inst = this._getInst(target);
- if (inst && !inst.inline)
- this._setDateFromField(inst, noDefault);
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(event) {
- var inst = $.datepicker._getInst(event.target);
- var handled = true;
- var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
- inst._keyEvent = true;
- if ($.datepicker._datepickerShowing)
- switch (event.keyCode) {
- case 9: $.datepicker._hideDatepicker();
- handled = false;
- break; // hide on tab out
- case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
- $.datepicker._currentClass + ')', inst.dpDiv);
- if (sel[0])
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
- var onSelect = $.datepicker._get(inst, 'onSelect');
- if (onSelect) {
- var dateStr = $.datepicker._formatDate(inst);
-
- // trigger custom callback
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
- }
- else
- $.datepicker._hideDatepicker();
- return false; // don't submit the form
- break; // select the value on enter
- case 27: $.datepicker._hideDatepicker();
- break; // hide on escape
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, 'stepBigMonths') :
- -$.datepicker._get(inst, 'stepMonths')), 'M');
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, 'stepBigMonths') :
- +$.datepicker._get(inst, 'stepMonths')), 'M');
- break; // next month/year on page down/+ ctrl
- case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
- handled = event.ctrlKey || event.metaKey;
- break; // clear on ctrl or command +end
- case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
- handled = event.ctrlKey || event.metaKey;
- break; // current on ctrl or command +home
- case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
- handled = event.ctrlKey || event.metaKey;
- // -1 day on ctrl or command +left
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, 'stepBigMonths') :
- -$.datepicker._get(inst, 'stepMonths')), 'M');
- // next month/year on alt +left on Mac
- break;
- case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
- handled = event.ctrlKey || event.metaKey;
- break; // -1 week on ctrl or command +up
- case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
- handled = event.ctrlKey || event.metaKey;
- // +1 day on ctrl or command +right
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, 'stepBigMonths') :
- +$.datepicker._get(inst, 'stepMonths')), 'M');
- // next month/year on alt +right
- break;
- case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
- handled = event.ctrlKey || event.metaKey;
- break; // +1 week on ctrl or command +down
- default: handled = false;
- }
- else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- else {
- handled = false;
- }
- if (handled) {
- event.preventDefault();
- event.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(event) {
- var inst = $.datepicker._getInst(event.target);
- if ($.datepicker._get(inst, 'constrainInput')) {
- var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
- var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
- return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
- }
- },
-
- /* Synchronise manual entry and field/alternate field. */
- _doKeyUp: function(event) {
- var inst = $.datepicker._getInst(event.target);
- if (inst.input.val() != inst.lastVal) {
- try {
- var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
- (inst.input ? inst.input.val() : null),
- $.datepicker._getFormatConfig(inst));
- if (date) { // only if valid
- $.datepicker._setDateFromField(inst);
- $.datepicker._updateAlternate(inst);
- $.datepicker._updateDatepicker(inst);
- }
- }
- catch (err) {
- $.datepicker.log(err);
- }
- }
- return true;
- },
-
- /* Pop-up the date picker for a given input field.
- If false returned from beforeShow event handler do not show.
- @param input element - the input field attached to the date picker or
- event - if triggered by focus */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
- input = $('input', input.parentNode)[0];
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
- return;
- var inst = $.datepicker._getInst(input);
- if ($.datepicker._curInst && $.datepicker._curInst != inst) {
- $.datepicker._curInst.dpDiv.stop(true, true);
- if ( inst && $.datepicker._datepickerShowing ) {
- $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
- }
- }
- var beforeShow = $.datepicker._get(inst, 'beforeShow');
- var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
- if(beforeShowSettings === false){
- //false
- return;
- }
- extendRemove(inst.settings, beforeShowSettings);
- inst.lastVal = null;
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
- if ($.datepicker._inDialog) // hide cursor
- input.value = '';
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
- var isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css('position') == 'fixed';
- return !isFixed;
- });
- var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- //to avoid flashes on Firefox
- inst.dpDiv.empty();
- // determine sizing offscreen
- inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
- left: offset.left + 'px', top: offset.top + 'px'});
- if (!inst.inline) {
- var showAnim = $.datepicker._get(inst, 'showAnim');
- var duration = $.datepicker._get(inst, 'duration');
- var postProcess = function() {
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !! cover.length ){
- var borders = $.datepicker._getBorders(inst.dpDiv);
- cover.css({left: -borders[0], top: -borders[1],
- width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
- }
- };
- inst.dpDiv.zIndex($(input).zIndex()+1);
- $.datepicker._datepickerShowing = true;
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
- if (!showAnim || !duration)
- postProcess();
- if (inst.input.is(':visible') && !inst.input.is(':disabled'))
- inst.input.focus();
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
- var borders = $.datepicker._getBorders(inst.dpDiv);
- instActive = inst; // for delegate hover events
- inst.dpDiv.empty().append(this._generateHTML(inst));
- this._attachHandlers(inst);
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
- cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
- }
- inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
- var numMonths = this._getNumberOfMonths(inst);
- var cols = numMonths[1];
- var width = 17;
- inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
- if (cols > 1)
- inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
- inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
- 'Class']('ui-datepicker-multi');
- inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
- 'Class']('ui-datepicker-rtl');
- if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
- inst.input.focus();
- // deffered render of the years select (to avoid flashes on Firefox)
- if( inst.yearshtml ){
- var origyearshtml = inst.yearshtml;
- setTimeout(function(){
- //assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
- inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
- }
- origyearshtml = inst.yearshtml = null;
- }, 0);
- }
- },
-
- /* Retrieve the size of left and top borders for an element.
- @param elem (jQuery object) the element of interest
- @return (number[2]) the left and top borders */
- _getBorders: function(elem) {
- var convert = function(value) {
- return {thin: 1, medium: 2, thick: 3}[value] || value;
- };
- return [parseFloat(convert(elem.css('border-left-width'))),
- parseFloat(convert(elem.css('border-top-width')))];
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var dpWidth = inst.dpDiv.outerWidth();
- var dpHeight = inst.dpDiv.outerHeight();
- var inputWidth = inst.input ? inst.input.outerWidth() : 0;
- var inputHeight = inst.input ? inst.input.outerHeight() : 0;
- var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
- var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
-
- offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
- offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
- offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-
- // now check if datepicker is showing outside window viewport - move to a better place if so.
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
- Math.abs(dpHeight + inputHeight) : 0);
-
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- var inst = this._getInst(obj);
- var isRTL = this._get(inst, 'isRTL');
- while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
- obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
- }
- var position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- @param input element - the input field attached to the date picker */
- _hideDatepicker: function(input) {
- var inst = this._curInst;
- if (!inst || (input && inst != $.data(input, PROP_NAME)))
- return;
- if (this._datepickerShowing) {
- var showAnim = this._get(inst, 'showAnim');
- var duration = this._get(inst, 'duration');
- var postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
- (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
- if (!showAnim)
- postProcess();
- this._datepickerShowing = false;
- var onClose = this._get(inst, 'onClose');
- if (onClose)
- onClose.apply((inst.input ? inst.input[0] : null),
- [(inst.input ? inst.input.val() : ''), inst]);
- this._lastInput = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
- if ($.blockUI) {
- $.unblockUI();
- $('body').append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst)
- return;
-
- var $target = $(event.target),
- inst = $.datepicker._getInst($target[0]);
-
- if ( ( ( $target[0].id != $.datepicker._mainDivId &&
- $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.closest("." + $.datepicker._triggerClass).length &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
- ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
- $.datepicker._hideDatepicker();
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- if (this._isDisabledDatepicker(target[0])) {
- return;
- }
- this._adjustInstDate(inst, offset +
- (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
- period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- }
- else {
- var date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
- inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
- parseInt(select.options[select.selectedIndex].value,10);
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- var target = $(id);
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
- return;
- }
- var inst = this._getInst(target[0]);
- inst.selectedDay = inst.currentDay = $('a', td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- this._selectDate(target, '');
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (inst.input)
- inst.input.val(dateStr);
- this._updateAlternate(inst);
- var onSelect = this._get(inst, 'onSelect');
- if (onSelect)
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- else if (inst.input)
- inst.input.trigger('change'); // fire the change event
- if (inst.inline)
- this._updateDatepicker(inst);
- else {
- this._hideDatepicker();
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) != 'object')
- inst.input.focus(); // restore focus
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altField = this._get(inst, 'altField');
- if (altField) { // update alternate field too
- var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
- var date = this._getDate(inst);
- var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- @param date Date - the date to customise
- @return [boolean, string] - is this date selectable?, what is its CSS class? */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ''];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- @param date Date - the date to get the week for
- @return number - the number of the week within the year that contains this date */
- iso8601Week: function(date) {
- var checkDate = new Date(date.getTime());
- // Find Thursday of this week starting on Monday
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
- var time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- },
-
- /* Parse a string value into a date object.
- See formatDate below for the possible formats.
-
- @param format string - the expected format of the date
- @param value string - the date in the above format
- @param settings Object - attributes include:
- shortYearCutoff number - the cutoff year for determining the century (optional)
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return Date - the extracted date value or null if value is blank */
- parseDate: function (format, value, settings) {
- if (format == null || value == null)
- throw 'Invalid arguments';
- value = (typeof value == 'object' ? value.toString() : value + '');
- if (value == '')
- return null;
- var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- var year = -1;
- var month = -1;
- var day = -1;
- var doy = -1;
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Extract a number from the string value
- var getNumber = function(match) {
- var isDoubled = lookAhead(match);
- var size = (match == '@' ? 14 : (match == '!' ? 20 :
- (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
- var digits = new RegExp('^\\d{1,' + size + '}');
- var num = value.substring(iValue).match(digits);
- if (!num)
- throw 'Missing number at position ' + iValue;
- iValue += num[0].length;
- return parseInt(num[0], 10);
- };
- // Extract a name from the string value and convert to an index
- var getName = function(match, shortNames, longNames) {
- var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
- return [ [k, v] ];
- }).sort(function (a, b) {
- return -(a[1].length - b[1].length);
- });
- var index = -1;
- $.each(names, function (i, pair) {
- var name = pair[1];
- if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
- index = pair[0];
- iValue += name.length;
- return false;
- }
- });
- if (index != -1)
- return index + 1;
- else
- throw 'Unknown name at position ' + iValue;
- };
- // Confirm that a literal character matches the string value
- var checkLiteral = function() {
- if (value.charAt(iValue) != format.charAt(iFormat))
- throw 'Unexpected literal at position ' + iValue;
- iValue++;
- };
- var iValue = 0;
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- checkLiteral();
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- day = getNumber('d');
- break;
- case 'D':
- getName('D', dayNamesShort, dayNames);
- break;
- case 'o':
- doy = getNumber('o');
- break;
- case 'm':
- month = getNumber('m');
- break;
- case 'M':
- month = getName('M', monthNamesShort, monthNames);
- break;
- case 'y':
- year = getNumber('y');
- break;
- case '@':
- var date = new Date(getNumber('@'));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case '!':
- var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'"))
- checkLiteral();
- else
- literal = true;
- break;
- default:
- checkLiteral();
- }
- }
- if (iValue < value.length){
- var extra = value.substr(iValue);
- if (!/^\s+/.test(extra)) {
- throw "Extra/unparsed characters found in date: " + extra;
- }
- }
- if (year == -1)
- year = new Date().getFullYear();
- else if (year < 100)
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- if (doy > -1) {
- month = 1;
- day = doy;
- do {
- var dim = this._getDaysInMonth(year, month - 1);
- if (day <= dim)
- break;
- month++;
- day -= dim;
- } while (true);
- }
- var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
- throw 'Invalid date'; // E.g. 31/02/00
- return date;
- },
-
- /* Standard date formats. */
- ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
- COOKIE: 'D, dd M yy',
- ISO_8601: 'yy-mm-dd',
- RFC_822: 'D, d M y',
- RFC_850: 'DD, dd-M-y',
- RFC_1036: 'D, d M y',
- RFC_1123: 'D, d M yy',
- RFC_2822: 'D, d M yy',
- RSS: 'D, d M y', // RFC 822
- TICKS: '!',
- TIMESTAMP: '@',
- W3C: 'yy-mm-dd', // ISO 8601
-
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
-
- /* Format a date object into a string value.
- The format can be combinations of the following:
- d - day of month (no leading zero)
- dd - day of month (two digit)
- o - day of year (no leading zeros)
- oo - day of year (three digit)
- D - day name short
- DD - day name long
- m - month of year (no leading zero)
- mm - month of year (two digit)
- M - month name short
- MM - month name long
- y - year (two digit)
- yy - year (four digit)
- @ - Unix timestamp (ms since 01/01/1970)
- ! - Windows ticks (100ns since 01/01/0001)
- '...' - literal text
- '' - single quote
-
- @param format string - the desired format of the date
- @param date Date - the date value to format
- @param settings Object - attributes include:
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return string - the date in the above format */
- formatDate: function (format, date, settings) {
- if (!date)
- return '';
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Format a number, with leading zero if necessary
- var formatNumber = function(match, value, len) {
- var num = '' + value;
- if (lookAhead(match))
- while (num.length < len)
- num = '0' + num;
- return num;
- };
- // Format a name, short or long as requested
- var formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- };
- var output = '';
- var literal = false;
- if (date)
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- output += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- output += formatNumber('d', date.getDate(), 2);
- break;
- case 'D':
- output += formatName('D', date.getDay(), dayNamesShort, dayNames);
- break;
- case 'o':
- output += formatNumber('o',
- Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
- break;
- case 'm':
- output += formatNumber('m', date.getMonth() + 1, 2);
- break;
- case 'M':
- output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
- break;
- case 'y':
- output += (lookAhead('y') ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
- break;
- case '@':
- output += date.getTime();
- break;
- case '!':
- output += date.getTime() * 10000 + this._ticksTo1970;
- break;
- case "'":
- if (lookAhead("'"))
- output += "'";
- else
- literal = true;
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var chars = '';
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- for (var iFormat = 0; iFormat < format.length; iFormat++)
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- chars += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd': case 'm': case 'y': case '@':
- chars += '0123456789';
- break;
- case 'D': case 'M':
- return null; // Accept anything
- case "'":
- if (lookAhead("'"))
- chars += "'";
- else
- literal = true;
- break;
- default:
- chars += format.charAt(iFormat);
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst, noDefault) {
- if (inst.input.val() == inst.lastVal) {
- return;
- }
- var dateFormat = this._get(inst, 'dateFormat');
- var dates = inst.lastVal = inst.input ? inst.input.val() : null;
- var date, defaultDate;
- date = defaultDate = this._getDefaultDate(inst);
- var settings = this._getFormatConfig(inst);
- try {
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
- } catch (event) {
- this.log(event);
- dates = (noDefault ? '' : dates);
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates ? date.getDate() : 0);
- inst.currentMonth = (dates ? date.getMonth() : 0);
- inst.currentYear = (dates ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- return this._restrictMinMax(inst,
- this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(inst, date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- };
- var offsetString = function(offset) {
- try {
- return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
- offset, $.datepicker._getFormatConfig(inst));
- }
- catch (e) {
- // Ignore
- }
- var date = (offset.toLowerCase().match(/^c/) ?
- $.datepicker._getDate(inst) : null) || new Date();
- var year = date.getFullYear();
- var month = date.getMonth();
- var day = date.getDate();
- var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
- var matches = pattern.exec(offset);
- while (matches) {
- switch (matches[2] || 'd') {
- case 'd' : case 'D' :
- day += parseInt(matches[1],10); break;
- case 'w' : case 'W' :
- day += parseInt(matches[1],10) * 7; break;
- case 'm' : case 'M' :
- month += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- case 'y': case 'Y' :
- year += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- };
- var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
- (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
- newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
- if (newDate) {
- newDate.setHours(0);
- newDate.setMinutes(0);
- newDate.setSeconds(0);
- newDate.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(newDate);
- },
-
- /* Handle switch to/from daylight saving.
- Hours may be non-zero on daylight saving cut-over:
- > 12 when midnight changeover, but then cannot generate
- midnight datetime, so jump to 1AM, otherwise reset.
- @param date (Date) the date to check
- @return (Date) the corrected date */
- _daylightSavingAdjust: function(date) {
- if (!date) return null;
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, noChange) {
- var clear = !date;
- var origMonth = inst.selectedMonth;
- var origYear = inst.selectedYear;
- var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
- inst.selectedDay = inst.currentDay = newDate.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
- if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
- this._notifyChange(inst);
- this._adjustInstDate(inst);
- if (inst.input) {
- inst.input.val(clear ? '' : this._formatDate(inst));
- }
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- return startDate;
- },
-
- /* Attach the onxxx handlers. These are declared statically so
- * they work with static code transformers like Caja.
- */
- _attachHandlers: function(inst) {
- var stepMonths = this._get(inst, 'stepMonths');
- var id = '#' + inst.id.replace( /\\\\/g, "\\" );
- inst.dpDiv.find('[data-handler]').map(function () {
- var handler = {
- prev: function () {
- window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M');
- },
- next: function () {
- window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M');
- },
- hide: function () {
- window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker();
- },
- today: function () {
- window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id);
- },
- selectDay: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this);
- return false;
- },
- selectMonth: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M');
- return false;
- },
- selectYear: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y');
- return false;
- }
- };
- $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]);
- });
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateHTML: function(inst) {
- var today = new Date();
- today = this._daylightSavingAdjust(
- new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
- var isRTL = this._get(inst, 'isRTL');
- var showButtonPanel = this._get(inst, 'showButtonPanel');
- var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
- var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
- var numMonths = this._getNumberOfMonths(inst);
- var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
- var stepMonths = this._get(inst, 'stepMonths');
- var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
- var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- var drawMonth = inst.drawMonth - showCurrentAtPos;
- var drawYear = inst.drawYear;
- if (drawMonth < 0) {
- drawMonth += 12;
- drawYear--;
- }
- if (maxDate) {
- var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- inst.drawMonth = drawMonth;
- inst.drawYear = drawYear;
- var prevText = this._get(inst, 'prevText');
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
- var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
- ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
- var nextText = this._get(inst, 'nextText');
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
- var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
- ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
- var currentText = this._get(inst, 'currentText');
- var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
- currentText = (!navigationAsDateFormat ? currentText :
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
- var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' +
- this._get(inst, 'closeText') + '</button>' : '');
- var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
- (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
- '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
- var firstDay = parseInt(this._get(inst, 'firstDay'),10);
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
- var showWeek = this._get(inst, 'showWeek');
- var dayNames = this._get(inst, 'dayNames');
- var dayNamesShort = this._get(inst, 'dayNamesShort');
- var dayNamesMin = this._get(inst, 'dayNamesMin');
- var monthNames = this._get(inst, 'monthNames');
- var monthNamesShort = this._get(inst, 'monthNamesShort');
- var beforeShowDay = this._get(inst, 'beforeShowDay');
- var showOtherMonths = this._get(inst, 'showOtherMonths');
- var selectOtherMonths = this._get(inst, 'selectOtherMonths');
- var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
- var defaultDate = this._getDefaultDate(inst);
- var html = '';
- for (var row = 0; row < numMonths[0]; row++) {
- var group = '';
- this.maxRows = 4;
- for (var col = 0; col < numMonths[1]; col++) {
- var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- var cornerClass = ' ui-corner-all';
- var calender = '';
- if (isMultiMonth) {
- calender += '<div class="ui-datepicker-group';
- if (numMonths[1] > 1)
- switch (col) {
- case 0: calender += ' ui-datepicker-group-first';
- cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
- case numMonths[1]-1: calender += ' ui-datepicker-group-last';
- cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
- default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
- }
- calender += '">';
- }
- calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
- (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
- (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
- '</div><table class="ui-datepicker-calendar"><thead>' +
- '<tr>';
- var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
- for (var dow = 0; dow < 7; dow++) { // days of the week
- var day = (dow + firstDay) % 7;
- thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
- '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
- }
- calender += thead + '</tr></thead><tbody>';
- var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
- this.maxRows = numRows;
- var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- calender += '<tr>';
- var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
- this._get(inst, 'calculateWeek')(printDate) + '</td>');
- for (var dow = 0; dow < 7; dow++) { // create date picker days
- var daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
- var otherMonth = (printDate.getMonth() != drawMonth);
- var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody += '<td class="' +
- ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
- (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
- ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
- (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
- // or defaultDate is current printedDate and defaultDate is selectedDate
- ' ' + this._dayOverClass : '') + // highlight selected day
- (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
- (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
- (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
- (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
- (unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' + printDate.getMonth() + '" data-year="' + printDate.getFullYear() + '"') + '>' + // actions
- (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
- (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
- (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
- (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
- (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
- '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- calender += tbody + '</tr>';
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
- ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
- group += calender;
- }
- html += group;
- }
- html += buttonPanel + ($.ui.ie6 && !inst.inline ?
- '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
- inst._keyEvent = false;
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- secondary, monthNames, monthNamesShort) {
- var changeMonth = this._get(inst, 'changeMonth');
- var changeYear = this._get(inst, 'changeYear');
- var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
- var html = '<div class="ui-datepicker-title">';
- var monthHtml = '';
- // month selection
- if (secondary || !changeMonth)
- monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
- else {
- var inMinYear = (minDate && minDate.getFullYear() == drawYear);
- var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
- monthHtml += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
- for (var month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) &&
- (!inMaxYear || month <= maxDate.getMonth()))
- monthHtml += '<option value="' + month + '"' +
- (month == drawMonth ? ' selected="selected"' : '') +
- '>' + monthNamesShort[month] + '</option>';
- }
- monthHtml += '</select>';
- }
- if (!showMonthAfterYear)
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
- // year selection
- if ( !inst.yearshtml ) {
- inst.yearshtml = '';
- if (secondary || !changeYear)
- html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
- else {
- // determine range of years to display
- var years = this._get(inst, 'yearRange').split(':');
- var thisYear = new Date().getFullYear();
- var determineYear = function(value) {
- var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
- (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
- parseInt(value, 10)));
- return (isNaN(year) ? thisYear : year);
- };
- var year = determineYear(years[0]);
- var endYear = Math.max(year, determineYear(years[1] || ''));
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- inst.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
- for (; year <= endYear; year++) {
- inst.yearshtml += '<option value="' + year + '"' +
- (year == drawYear ? ' selected="selected"' : '') +
- '>' + year + '</option>';
- }
- inst.yearshtml += '</select>';
-
- html += inst.yearshtml;
- inst.yearshtml = null;
- }
- }
- html += this._get(inst, 'yearSuffix');
- if (showMonthAfterYear)
- html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
- html += '</div>'; // Close datepicker_header
- return html;
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period == 'Y' ? offset : 0);
- var month = inst.drawMonth + (period == 'M' ? offset : 0);
- var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
- (period == 'D' ? offset : 0);
- var date = this._restrictMinMax(inst,
- this._daylightSavingAdjust(new Date(year, month, day)));
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period == 'M' || period == 'Y')
- this._notifyChange(inst);
- },
-
- /* Ensure a date is within any min/max bounds. */
- _restrictMinMax: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- var newDate = (minDate && date < minDate ? minDate : date);
- newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
- return newDate;
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, 'onChangeMonthYear');
- if (onChange)
- onChange.apply((inst.input ? inst.input[0] : null),
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, 'numberOfMonths');
- return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set. */
- _getMinMaxDate: function(inst, minMax) {
- return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst);
- var date = this._daylightSavingAdjust(new Date(curYear,
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
- if (offset < 0)
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, 'shortYearCutoff');
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
- monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day == 'object' ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
- }
-});
-
-/*
- * Bind hover events for datepicker elements.
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
- * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
- */
-function bindHover(dpDiv) {
- var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
- return dpDiv.delegate(selector, 'mouseout', function() {
- $(this).removeClass('ui-state-hover');
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
- })
- .delegate(selector, 'mouseover', function(){
- if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
- $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
- $(this).addClass('ui-state-hover');
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
- }
- });
-}
-
-/* jQuery extend now ignores nulls! */
-function extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props)
- if (props[name] == null || props[name] == undefined)
- target[name] = props[name];
- return target;
-};
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
-
- /* Verify an empty collection wasn't passed - Fixes #6976 */
- if ( !this.length ) {
- return this;
- }
-
- /* Initialise the date picker. */
- if (!$.datepicker.initialized) {
- $(document).mousedown($.datepicker._checkExternalClick).
- find(document.body).append($.datepicker.dpDiv);
- $.datepicker.initialized = true;
- }
-
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- return this.each(function() {
- typeof options == 'string' ?
- $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-$.datepicker.initialized = false;
-$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.9.2";
-
-// Workaround for #4055
-// Add another global to avoid noConflict issues with inline event handlers
-window['DP_jQuery_' + dpuuid] = $;
-
-})(jQuery);
-(function( $, undefined ) {
-
-var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
- sizeRelatedOptions = {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
- resizableRelatedOptions = {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- };
-
-$.widget("ui.dialog", {
- version: "1.9.2",
- options: {
- autoOpen: true,
- buttons: {},
- closeOnEscape: true,
- closeText: "close",
- dialogClass: "",
- draggable: true,
- hide: null,
- height: "auto",
- maxHeight: false,
- maxWidth: false,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: "center",
- at: "center",
- of: window,
- collision: "fit",
- // ensure that the titlebar is never outside the document
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
- }
- }
- },
- resizable: true,
- show: null,
- stack: true,
- title: "",
- width: 300,
- zIndex: 1000
- },
-
- _create: function() {
- this.originalTitle = this.element.attr( "title" );
- // #5742 - .attr() might return a DOMElement
- if ( typeof this.originalTitle !== "string" ) {
- this.originalTitle = "";
- }
- this.oldPosition = {
- parent: this.element.parent(),
- index: this.element.parent().children().index( this.element )
- };
- this.options.title = this.options.title || this.originalTitle;
- var that = this,
- options = this.options,
-
- title = options.title || "&#160;",
- uiDialog,
- uiDialogTitlebar,
- uiDialogTitlebarClose,
- uiDialogTitle,
- uiDialogButtonPane;
-
- uiDialog = ( this.uiDialog = $( "<div>" ) )
- .addClass( uiDialogClasses + options.dialogClass )
- .css({
- display: "none",
- outline: 0, // TODO: move to stylesheet
- zIndex: options.zIndex
- })
- // setting tabIndex makes the div focusable
- .attr( "tabIndex", -1)
- .keydown(function( event ) {
- if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- that.close( event );
- event.preventDefault();
- }
- })
- .mousedown(function( event ) {
- that.moveToTop( false, event );
- })
- .appendTo( "body" );
-
- this.element
- .show()
- .removeAttr( "title" )
- .addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( uiDialog );
-
- uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
- .addClass( "ui-dialog-titlebar ui-widget-header " +
- "ui-corner-all ui-helper-clearfix" )
- .bind( "mousedown", function() {
- // Dialog isn't getting focus when dragging (#8063)
- uiDialog.focus();
- })
- .prependTo( uiDialog );
-
- uiDialogTitlebarClose = $( "<a href='#'></a>" )
- .addClass( "ui-dialog-titlebar-close ui-corner-all" )
- .attr( "role", "button" )
- .click(function( event ) {
- event.preventDefault();
- that.close( event );
- })
- .appendTo( uiDialogTitlebar );
-
- ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
- .addClass( "ui-icon ui-icon-closethick" )
- .text( options.closeText )
- .appendTo( uiDialogTitlebarClose );
-
- uiDialogTitle = $( "<span>" )
- .uniqueId()
- .addClass( "ui-dialog-title" )
- .html( title )
- .prependTo( uiDialogTitlebar );
-
- uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
-
- ( this.uiButtonSet = $( "<div>" ) )
- .addClass( "ui-dialog-buttonset" )
- .appendTo( uiDialogButtonPane );
-
- uiDialog.attr({
- role: "dialog",
- "aria-labelledby": uiDialogTitle.attr( "id" )
- });
-
- uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
- this._hoverable( uiDialogTitlebarClose );
- this._focusable( uiDialogTitlebarClose );
-
- if ( options.draggable && $.fn.draggable ) {
- this._makeDraggable();
- }
- if ( options.resizable && $.fn.resizable ) {
- this._makeResizable();
- }
-
- this._createButtons( options.buttons );
- this._isOpen = false;
-
- if ( $.fn.bgiframe ) {
- uiDialog.bgiframe();
- }
-
- // prevent tabbing out of modal dialogs
- this._on( uiDialog, { keydown: function( event ) {
- if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) {
- return;
- }
-
- var tabbables = $( ":tabbable", uiDialog ),
- first = tabbables.filter( ":first" ),
- last = tabbables.filter( ":last" );
-
- if ( event.target === last[0] && !event.shiftKey ) {
- first.focus( 1 );
- return false;
- } else if ( event.target === first[0] && event.shiftKey ) {
- last.focus( 1 );
- return false;
- }
- }});
- },
-
- _init: function() {
- if ( this.options.autoOpen ) {
- this.open();
- }
- },
-
- _destroy: function() {
- var next,
- oldPosition = this.oldPosition;
-
- if ( this.overlay ) {
- this.overlay.destroy();
- }
- this.uiDialog.hide();
- this.element
- .removeClass( "ui-dialog-content ui-widget-content" )
- .hide()
- .appendTo( "body" );
- this.uiDialog.remove();
-
- if ( this.originalTitle ) {
- this.element.attr( "title", this.originalTitle );
- }
-
- next = oldPosition.parent.children().eq( oldPosition.index );
- // Don't try to place the dialog next to itself (#8613)
- if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
- next.before( this.element );
- } else {
- oldPosition.parent.append( this.element );
- }
- },
-
- widget: function() {
- return this.uiDialog;
- },
-
- close: function( event ) {
- var that = this,
- maxZ, thisZ;
-
- if ( !this._isOpen ) {
- return;
- }
-
- if ( false === this._trigger( "beforeClose", event ) ) {
- return;
- }
-
- this._isOpen = false;
-
- if ( this.overlay ) {
- this.overlay.destroy();
- }
-
- if ( this.options.hide ) {
- this._hide( this.uiDialog, this.options.hide, function() {
- that._trigger( "close", event );
- });
- } else {
- this.uiDialog.hide();
- this._trigger( "close", event );
- }
-
- $.ui.dialog.overlay.resize();
-
- // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- if ( this.options.modal ) {
- maxZ = 0;
- $( ".ui-dialog" ).each(function() {
- if ( this !== that.uiDialog[0] ) {
- thisZ = $( this ).css( "z-index" );
- if ( !isNaN( thisZ ) ) {
- maxZ = Math.max( maxZ, thisZ );
- }
- }
- });
- $.ui.dialog.maxZ = maxZ;
- }
-
- return this;
- },
-
- isOpen: function() {
- return this._isOpen;
- },
-
- // the force parameter allows us to move modal dialogs to their correct
- // position on open
- moveToTop: function( force, event ) {
- var options = this.options,
- saveScroll;
-
- if ( ( options.modal && !force ) ||
- ( !options.stack && !options.modal ) ) {
- return this._trigger( "focus", event );
- }
-
- if ( options.zIndex > $.ui.dialog.maxZ ) {
- $.ui.dialog.maxZ = options.zIndex;
- }
- if ( this.overlay ) {
- $.ui.dialog.maxZ += 1;
- $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
- this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ );
- }
-
- // Save and then restore scroll
- // Opera 9.5+ resets when parent z-index is changed.
- // http://bugs.jqueryui.com/ticket/3193
- saveScroll = {
- scrollTop: this.element.scrollTop(),
- scrollLeft: this.element.scrollLeft()
- };
- $.ui.dialog.maxZ += 1;
- this.uiDialog.css( "z-index", $.ui.dialog.maxZ );
- this.element.attr( saveScroll );
- this._trigger( "focus", event );
-
- return this;
- },
-
- open: function() {
- if ( this._isOpen ) {
- return;
- }
-
- var hasFocus,
- options = this.options,
- uiDialog = this.uiDialog;
-
- this._size();
- this._position( options.position );
- uiDialog.show( options.show );
- this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null;
- this.moveToTop( true );
-
- // set focus to the first tabbable element in the content area or the first button
- // if there are no tabbable elements, set focus on the dialog itself
- hasFocus = this.element.find( ":tabbable" );
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
- if ( !hasFocus.length ) {
- hasFocus = uiDialog;
- }
- }
- hasFocus.eq( 0 ).focus();
-
- this._isOpen = true;
- this._trigger( "open" );
-
- return this;
- },
-
- _createButtons: function( buttons ) {
- var that = this,
- hasButtons = false;
-
- // if we already have a button pane, remove it
- this.uiDialogButtonPane.remove();
- this.uiButtonSet.empty();
-
- if ( typeof buttons === "object" && buttons !== null ) {
- $.each( buttons, function() {
- return !(hasButtons = true);
- });
- }
- if ( hasButtons ) {
- $.each( buttons, function( name, props ) {
- var button, click;
- props = $.isFunction( props ) ?
- { click: props, text: name } :
- props;
- // Default to a non-submitting button
- props = $.extend( { type: "button" }, props );
- // Change the context for the click callback to be the main element
- click = props.click;
- props.click = function() {
- click.apply( that.element[0], arguments );
- };
- button = $( "<button></button>", props )
- .appendTo( that.uiButtonSet );
- if ( $.fn.button ) {
- button.button();
- }
- });
- this.uiDialog.addClass( "ui-dialog-buttons" );
- this.uiDialogButtonPane.appendTo( this.uiDialog );
- } else {
- this.uiDialog.removeClass( "ui-dialog-buttons" );
- }
- },
-
- _makeDraggable: function() {
- var that = this,
- options = this.options;
-
- function filteredUi( ui ) {
- return {
- position: ui.position,
- offset: ui.offset
- };
- }
-
- this.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- $( this )
- .addClass( "ui-dialog-dragging" );
- that._trigger( "dragStart", event, filteredUi( ui ) );
- },
- drag: function( event, ui ) {
- that._trigger( "drag", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- options.position = [
- ui.position.left - that.document.scrollLeft(),
- ui.position.top - that.document.scrollTop()
- ];
- $( this )
- .removeClass( "ui-dialog-dragging" );
- that._trigger( "dragStop", event, filteredUi( ui ) );
- $.ui.dialog.overlay.resize();
- }
- });
- },
-
- _makeResizable: function( handles ) {
- handles = (handles === undefined ? this.options.resizable : handles);
- var that = this,
- options = this.options,
- // .ui-resizable has position: relative defined in the stylesheet
- // but dialogs have to use absolute or fixed positioning
- position = this.uiDialog.css( "position" ),
- resizeHandles = typeof handles === 'string' ?
- handles :
- "n,e,s,w,se,sw,ne,nw";
-
- function filteredUi( ui ) {
- return {
- originalPosition: ui.originalPosition,
- originalSize: ui.originalSize,
- position: ui.position,
- size: ui.size
- };
- }
-
- this.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
- alsoResize: this.element,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: this._minHeight(),
- handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-resizing" );
- that._trigger( "resizeStart", event, filteredUi( ui ) );
- },
- resize: function( event, ui ) {
- that._trigger( "resize", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- $( this ).removeClass( "ui-dialog-resizing" );
- options.height = $( this ).height();
- options.width = $( this ).width();
- that._trigger( "resizeStop", event, filteredUi( ui ) );
- $.ui.dialog.overlay.resize();
- }
- })
- .css( "position", position )
- .find( ".ui-resizable-se" )
- .addClass( "ui-icon ui-icon-grip-diagonal-se" );
- },
-
- _minHeight: function() {
- var options = this.options;
-
- if ( options.height === "auto" ) {
- return options.minHeight;
- } else {
- return Math.min( options.minHeight, options.height );
- }
- },
-
- _position: function( position ) {
- var myAt = [],
- offset = [ 0, 0 ],
- isVisible;
-
- if ( position ) {
- // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
- // if (typeof position == 'string' || $.isArray(position)) {
- // myAt = $.isArray(position) ? position : position.split(' ');
-
- if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
- myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ];
- if ( myAt.length === 1 ) {
- myAt[ 1 ] = myAt[ 0 ];
- }
-
- $.each( [ "left", "top" ], function( i, offsetPosition ) {
- if ( +myAt[ i ] === myAt[ i ] ) {
- offset[ i ] = myAt[ i ];
- myAt[ i ] = offsetPosition;
- }
- });
-
- position = {
- my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
- myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
- at: myAt.join( " " )
- };
- }
-
- position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
- } else {
- position = $.ui.dialog.prototype.options.position;
- }
-
- // need to show the dialog to get the actual offset in the position plugin
- isVisible = this.uiDialog.is( ":visible" );
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- },
-
- _setOptions: function( options ) {
- var that = this,
- resizableOptions = {},
- resize = false;
-
- $.each( options, function( key, value ) {
- that._setOption( key, value );
-
- if ( key in sizeRelatedOptions ) {
- resize = true;
- }
- if ( key in resizableRelatedOptions ) {
- resizableOptions[ key ] = value;
- }
- });
-
- if ( resize ) {
- this._size();
- }
- if ( this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", resizableOptions );
- }
- },
-
- _setOption: function( key, value ) {
- var isDraggable, isResizable,
- uiDialog = this.uiDialog;
-
- switch ( key ) {
- case "buttons":
- this._createButtons( value );
- break;
- case "closeText":
- // ensure that we always pass a string
- this.uiDialogTitlebarCloseText.text( "" + value );
- break;
- case "dialogClass":
- uiDialog
- .removeClass( this.options.dialogClass )
- .addClass( uiDialogClasses + value );
- break;
- case "disabled":
- if ( value ) {
- uiDialog.addClass( "ui-dialog-disabled" );
- } else {
- uiDialog.removeClass( "ui-dialog-disabled" );
- }
- break;
- case "draggable":
- isDraggable = uiDialog.is( ":data(draggable)" );
- if ( isDraggable && !value ) {
- uiDialog.draggable( "destroy" );
- }
-
- if ( !isDraggable && value ) {
- this._makeDraggable();
- }
- break;
- case "position":
- this._position( value );
- break;
- case "resizable":
- // currently resizable, becoming non-resizable
- isResizable = uiDialog.is( ":data(resizable)" );
- if ( isResizable && !value ) {
- uiDialog.resizable( "destroy" );
- }
-
- // currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
- }
-
- // currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- this._makeResizable( value );
- }
- break;
- case "title":
- // convert whatever was passed in o a string, for html() to not throw up
- $( ".ui-dialog-title", this.uiDialogTitlebar )
- .html( "" + ( value || "&#160;" ) );
- break;
- }
-
- this._super( key, value );
- },
-
- _size: function() {
- /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
- * divs will both have width and height set, so we need to reset them
- */
- var nonContentHeight, minContentHeight, autoHeight,
- options = this.options,
- isVisible = this.uiDialog.is( ":visible" );
-
- // reset content sizing
- this.element.show().css({
- width: "auto",
- minHeight: 0,
- height: 0
- });
-
- if ( options.minWidth > options.width ) {
- options.width = options.minWidth;
- }
-
- // reset wrapper sizing
- // determine the height of all the non-content elements
- nonContentHeight = this.uiDialog.css({
- height: "auto",
- width: options.width
- })
- .outerHeight();
- minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
-
- if ( options.height === "auto" ) {
- // only needed for IE6 support
- if ( $.support.minHeight ) {
- this.element.css({
- minHeight: minContentHeight,
- height: "auto"
- });
- } else {
- this.uiDialog.show();
- autoHeight = this.element.css( "height", "auto" ).height();
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- this.element.height( Math.max( autoHeight, minContentHeight ) );
- }
- } else {
- this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
- }
-
- if (this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
- }
- }
-});
-
-$.extend($.ui.dialog, {
- uuid: 0,
- maxZ: 0,
-
- getTitleId: function($el) {
- var id = $el.attr( "id" );
- if ( !id ) {
- this.uuid += 1;
- id = this.uuid;
- }
- return "ui-dialog-title-" + id;
- },
-
- overlay: function( dialog ) {
- this.$el = $.ui.dialog.overlay.create( dialog );
- }
-});
-
-$.extend( $.ui.dialog.overlay, {
- instances: [],
- // reuse old instances due to IE memory leak with alpha transparency (see #5185)
- oldInstances: [],
- maxZ: 0,
- events: $.map(
- "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
- function( event ) {
- return event + ".dialog-overlay";
- }
- ).join( " " ),
- create: function( dialog ) {
- if ( this.instances.length === 0 ) {
- // prevent use of anchors and inputs
- // we use a setTimeout in case the overlay is created from an
- // event that we're going to be cancelling (see #2804)
- setTimeout(function() {
- // handle $(el).dialog().dialog('close') (see #4065)
- if ( $.ui.dialog.overlay.instances.length ) {
- $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
- // stop events if the z-index of the target is < the z-index of the overlay
- // we cannot return true when we don't want to cancel the event (#3523)
- if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
- return false;
- }
- });
- }
- }, 1 );
-
- // handle window resize
- $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
- }
-
- var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
-
- // allow closing by pressing the escape key
- $( document ).bind( "keydown.dialog-overlay", function( event ) {
- var instances = $.ui.dialog.overlay.instances;
- // only react to the event if we're the top overlay
- if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el &&
- dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
-
- dialog.close( event );
- event.preventDefault();
- }
- });
-
- $el.appendTo( document.body ).css({
- width: this.width(),
- height: this.height()
- });
-
- if ( $.fn.bgiframe ) {
- $el.bgiframe();
- }
-
- this.instances.push( $el );
- return $el;
- },
-
- destroy: function( $el ) {
- var indexOf = $.inArray( $el, this.instances ),
- maxZ = 0;
-
- if ( indexOf !== -1 ) {
- this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] );
- }
-
- if ( this.instances.length === 0 ) {
- $( [ document, window ] ).unbind( ".dialog-overlay" );
- }
-
- $el.height( 0 ).width( 0 ).remove();
-
- // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- $.each( this.instances, function() {
- maxZ = Math.max( maxZ, this.css( "z-index" ) );
- });
- this.maxZ = maxZ;
- },
-
- height: function() {
- var scrollHeight,
- offsetHeight;
- // handle IE
- if ( $.ui.ie ) {
- scrollHeight = Math.max(
- document.documentElement.scrollHeight,
- document.body.scrollHeight
- );
- offsetHeight = Math.max(
- document.documentElement.offsetHeight,
- document.body.offsetHeight
- );
-
- if ( scrollHeight < offsetHeight ) {
- return $( window ).height() + "px";
- } else {
- return scrollHeight + "px";
- }
- // handle "good" browsers
- } else {
- return $( document ).height() + "px";
- }
- },
-
- width: function() {
- var scrollWidth,
- offsetWidth;
- // handle IE
- if ( $.ui.ie ) {
- scrollWidth = Math.max(
- document.documentElement.scrollWidth,
- document.body.scrollWidth
- );
- offsetWidth = Math.max(
- document.documentElement.offsetWidth,
- document.body.offsetWidth
- );
-
- if ( scrollWidth < offsetWidth ) {
- return $( window ).width() + "px";
- } else {
- return scrollWidth + "px";
- }
- // handle "good" browsers
- } else {
- return $( document ).width() + "px";
- }
- },
-
- resize: function() {
- /* If the dialog is draggable and the user drags it past the
- * right edge of the window, the document becomes wider so we
- * need to stretch the overlay. If the user then drags the
- * dialog back to the left, the document will become narrower,
- * so we need to shrink the overlay to the appropriate size.
- * This is handled by shrinking the overlay before setting it
- * to the full document size.
- */
- var $overlays = $( [] );
- $.each( $.ui.dialog.overlay.instances, function() {
- $overlays = $overlays.add( this );
- });
-
- $overlays.css({
- width: 0,
- height: 0
- }).css({
- width: $.ui.dialog.overlay.width(),
- height: $.ui.dialog.overlay.height()
- });
- }
-});
-
-$.extend( $.ui.dialog.overlay.prototype, {
- destroy: function() {
- $.ui.dialog.overlay.destroy( this.$el );
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false
- },
- _create: function() {
-
- if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
- this.element[0].style.position = 'relative';
-
- (this.options.addClasses && this.element.addClass("ui-draggable"));
- (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
- return false;
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle)
- return false;
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
-
- return true;
-
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager)
- $.ui.ddmanager.current = this;
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css("position");
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- if(o.containment)
- this._setContainment();
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger('drag', event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- dropped = $.ui.ddmanager.drop(this, event);
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- var element = this.element[0], elementInDom = false;
- while ( element && (element = element.parentNode) ) {
- if (element == document ) {
- elementInDom = true;
- }
- }
- if ( !elementInDom && this.options.helper === "original" )
- return false;
-
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- var that = this;
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
- $(this.options.handle, this.element)
- .find("*")
- .andSelf()
- .each(function() {
- if(this == event.target) handle = true;
- });
-
- return handle;
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options;
- var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
-
- if(!helper.parents('body').length)
- helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
-
- if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
- helper.css("position", "absolute");
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj == 'string') {
- obj = obj.split(' ');
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ('left' in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ('right' in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ('top' in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ('bottom' in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
- po = { top: 0, left: 0 };
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition == "relative") {
- var p = this.element.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0),
- right: (parseInt(this.element.css("marginRight"),10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var o = this.options;
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
- var c = $(o.containment);
- var ce = c[0]; if(!ce) return;
- var co = c.offset();
- var over = ($(ce).css("overflow") != 'hidden');
-
- this.containment = [
- (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
- (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
- (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
- (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
- ];
- this.relative_container = c;
-
- } else if(o.containment.constructor == Array) {
- this.containment = o.containment;
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top // The absolute mouse position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left // The absolute mouse position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
- var pageX = event.pageX;
- var pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
- var containment;
- if(this.containment) {
- if (this.relative_container){
- var co = this.relative_container.offset();
- containment = [ this.containment[0] + co.left,
- this.containment[1] + co.top,
- this.containment[2] + co.left,
- this.containment[3] + co.top ];
- }
- else {
- containment = this.containment;
- }
-
- if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
- if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
- if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
- if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
- }
-
- if(o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
- //if($.ui.ddmanager) $.ui.ddmanager.current = null;
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function(type, event, ui) {
- ui = ui || this._uiHash();
- $.ui.plugin.call(this, type, [event, ui]);
- if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function(event) {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, 'sortable');
- if (sortable && !sortable.options.disabled) {
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
- sortable._trigger("activate", event, uiSortable);
- }
- });
-
- },
- stop: function(event, ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("draggable"),
- uiSortable = $.extend({}, ui, { item: inst.element });
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
-
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-
- //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
- if(this.shouldRevert) this.instance.options.revert = true;
-
- //Trigger the stop of the sortable
- this.instance._mouseStop(event);
-
- this.instance.options.helper = this.instance.options._helper;
-
- //If the helper has been the original item, restore properties in the sortable
- if(inst.options.helper == 'original')
- this.instance.currentItem.css({ top: 'auto', left: 'auto' });
-
- } else {
- this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
- this.instance._trigger("deactivate", event, uiSortable);
- }
-
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("draggable"), that = this;
-
- var checkPos = function(o) {
- var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
- var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
- var itemHeight = o.height, itemWidth = o.width;
- var itemTop = o.top, itemLeft = o.left;
-
- return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
- };
-
- $.each(inst.sortables, function(i) {
-
- var innermostIntersecting = false;
- var thisSortable = this;
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this != thisSortable
- && this.instance._intersectsWith(this.instance.containerCache)
- && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0]))
- innermostIntersecting = false;
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- event.target = this.instance.currentItem[0];
- this.instance._mouseCapture(event, true);
- this.instance._mouseStart(event, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst._trigger("toSortable", event);
- inst.dropped = this.instance.element; //draggable revert needs that
- //hack so receive/update callbacks work (mostly)
- inst.currentItem = inst.element;
- this.instance.fromOutside = inst;
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) this.instance._mouseDrag(event);
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
-
- //Prevent reverting on this forced stop
- this.instance.options.revert = false;
-
- // The out event needs to be triggered independently
- this.instance._trigger('out', event, this.instance._uiHash(this.instance));
-
- this.instance._mouseStop(event, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) this.instance.placeholder.remove();
-
- inst._trigger("fromSortable", event);
- inst.dropped = false; //draggable revert needs that
- }
-
- };
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function(event, ui) {
- var t = $('body'), o = $(this).data('draggable').options;
- if (t.css("cursor")) o._cursor = t.css("cursor");
- t.css("cursor", o.cursor);
- },
- stop: function(event, ui) {
- var o = $(this).data('draggable').options;
- if (o._cursor) $('body').css("cursor", o._cursor);
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data('draggable').options;
- if(t.css("opacity")) o._opacity = t.css("opacity");
- t.css('opacity', o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data('draggable').options;
- if(o._opacity) $(ui.helper).css('opacity', o._opacity);
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function(event, ui) {
- var i = $(this).data("draggable");
- if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
- },
- drag: function(event, ui) {
-
- var i = $(this).data("draggable"), o = i.options, scrolled = false;
-
- if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
-
- if(!o.axis || o.axis != 'x') {
- if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if(!o.axis || o.axis != 'y') {
- if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(!o.axis || o.axis != 'x') {
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(!o.axis || o.axis != 'y') {
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(i, event);
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function(event, ui) {
-
- var i = $(this).data("draggable"), o = i.options;
- i.snapElements = [];
-
- $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
- var $t = $(this); var $o = $t.offset();
- if(this != i.element[0]) i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("draggable"), o = inst.options;
- var d = o.snapTolerance;
-
- var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (var i = inst.snapElements.length - 1; i >= 0; i--){
-
- var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
- t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
- if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if(o.snapMode != 'inner') {
- var ts = Math.abs(t - y2) <= d;
- var bs = Math.abs(b - y1) <= d;
- var ls = Math.abs(l - x2) <= d;
- var rs = Math.abs(r - x1) <= d;
- if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
- if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
- if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
- }
-
- var first = (ts || bs || ls || rs);
-
- if(o.snapMode != 'outer') {
- var ts = Math.abs(t - y1) <= d;
- var bs = Math.abs(b - y2) <= d;
- var ls = Math.abs(l - x1) <= d;
- var rs = Math.abs(r - x2) <= d;
- if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
- if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
- if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
- }
-
- if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- };
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function(event, ui) {
-
- var o = $(this).data("draggable").options;
-
- var group = $.makeArray($(o.stack)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
- });
- if (!group.length) { return; }
-
- var min = parseInt(group[0].style.zIndex) || 0;
- $(group).each(function(i) {
- this.style.zIndex = min + i;
- });
-
- this[0].style.zIndex = min + group.length;
-
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("draggable").options;
- if(t.css("zIndex")) o._zIndex = t.css("zIndex");
- t.css('zIndex', o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("draggable").options;
- if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
- }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.droppable", {
- version: "1.9.2",
- widgetEventPrefix: "drop",
- options: {
- accept: '*',
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: 'default',
- tolerance: 'intersect'
- },
- _create: function() {
-
- var o = this.options, accept = o.accept;
- this.isover = 0; this.isout = 1;
-
- this.accept = $.isFunction(accept) ? accept : function(d) {
- return d.is(accept);
- };
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
- $.ui.ddmanager.droppables[o.scope].push(this);
-
- (o.addClasses && this.element.addClass("ui-droppable"));
-
- },
-
- _destroy: function() {
- var drop = $.ui.ddmanager.droppables[this.options.scope];
- for ( var i = 0; i < drop.length; i++ )
- if ( drop[i] == this )
- drop.splice(i, 1);
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key == 'accept') {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) this.element.addClass(this.options.activeClass);
- (draggable && this._trigger('activate', event, this.ui(draggable)));
- },
-
- _deactivate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
- (draggable && this._trigger('deactivate', event, this.ui(draggable)));
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
- this._trigger('over', event, this.ui(draggable));
- }
-
- },
-
- _out: function(event) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
- this._trigger('out', event, this.ui(draggable));
- }
-
- },
-
- _drop: function(event,custom) {
-
- var draggable = custom || $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
-
- var childrenIntersection = false;
- this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, 'droppable');
- if(
- inst.options.greedy
- && !inst.options.disabled
- && inst.options.scope == draggable.options.scope
- && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
- && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
- ) { childrenIntersection = true; return false; }
- });
- if(childrenIntersection) return false;
-
- if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
- if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
- this._trigger('drop', event, this.ui(draggable));
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) return false;
-
- var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
- var l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case 'fit':
- return (l <= x1 && x2 <= r
- && t <= y1 && y2 <= b);
- break;
- case 'intersect':
- return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
- && x2 - (draggable.helperProportions.width / 2) < r // Left Half
- && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
- && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- break;
- case 'pointer':
- var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
- draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
- isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
- return isOver;
- break;
- case 'touch':
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- break;
- default:
- return false;
- break;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { 'default': [] },
- prepareOffsets: function(t, event) {
-
- var m = $.ui.ddmanager.droppables[t.options.scope] || [];
- var type = event ? event.type : null; // workaround for #2317
- var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
-
- droppablesLoop: for (var i = 0; i < m.length; i++) {
-
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
- for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
- m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
-
- if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
-
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- }
-
- },
- drop: function(draggable, event) {
-
- var dropped = false;
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(!this.options) return;
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
- dropped = this._drop.call(this, event) || dropped;
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = 1; this.isover = 0;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) return;
- var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
-
- var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
- if(!c) return;
-
- var parentInstance;
- if (this.options.greedy) {
- // find droppable parents with same scope
- var scope = this.options.scope;
- var parent = this.element.parents(':data(droppable)').filter(function () {
- return $.data(this, 'droppable').options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], 'droppable');
- parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c == 'isover') {
- parentInstance['isover'] = 0;
- parentInstance['isout'] = 1;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
- this[c == "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c == 'isout') {
- parentInstance['isout'] = 0;
- parentInstance['isover'] = 1;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
- }
-};
-
-})(jQuery);
-;(jQuery.effects || (function($, undefined) {
-
-var backCompat = $.uiBackCompat !== false,
- // prefix used for storing data on .data()
- dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.0.0
- * http://jquery.com/
- *
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Mon Aug 13 13:41:02 2012 -0500
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- if ( l === 0 || l === 1 ) {
- s = l;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add .fx.step functions
-each( stepHooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( error ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
-});
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles() {
- var style = this.ownerDocument.defaultView ?
- this.ownerDocument.defaultView.getComputedStyle( this, null ) :
- this.currentStyle,
- newStyle = {},
- key,
- len;
-
- // webkit enumerates style porperties
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- newStyle[ $.camelCase( key ) ] = style[ key ];
- }
- }
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- newStyle[ key ] = style[ key ];
- }
- }
- }
-
- return newStyle;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).andSelf() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles.call( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles.call( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = jQuery.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, '' );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- _addClass: $.fn.addClass,
- addClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- this._addClass( classNames );
- },
-
- _removeClass: $.fn.removeClass,
- removeClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- this._removeClass( classNames );
- },
-
- _toggleClass: $.fn.toggleClass,
- toggleClass: function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return this._toggleClass( classNames, force );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- },
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.9.2",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardSpeed( speed ) {
- // valid standard speeds
- if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
- return true;
- }
-
- // invalid strings - treat as "normal" speed
- if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
- // TODO: remove in 2.0 (#7115)
- if ( backCompat && $.effects[ speed ] ) {
- return false;
- }
- return true;
- }
-
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ],
-
- // DEPRECATED: remove in 2.0 (#7115)
- oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
-
- if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // if the element is hiddden and mode is hide,
- // or element is visible and mode is show
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- // TODO: remove this check in 2.0, effectMethod will always be true
- if ( effectMethod ) {
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- } else {
- // DEPRECATED: remove in 2.0 (#7115)
- return oldEffectMethod.call(this, {
- options: args,
- duration: args.duration,
- callback: args.complete,
- mode: args.mode
- });
- }
- },
-
- _show: $.fn.show,
- show: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._show.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- },
-
- _hide: $.fn.hide,
- hide: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._hide.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- },
-
- // jQuery core overloads toggle and creates _toggle
- __toggle: $.fn.toggle,
- toggle: function( speed ) {
- if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
- return this.__toggle.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- },
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery));
-(function( $, undefined ) {
-
-var rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/;
-
-$.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( ! motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-$.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || ["middle","center"];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-$.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function(){
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round(o.duration/anims),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop ,
- left: endPosition.left - fixLeft ,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( '<div class="ui-effects-transfer"></div>' )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop ,
- left: startPosition.left - fixLeft ,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-var mouseHandled = false;
-
-$.widget( "ui.menu", {
- version: "1.9.2",
- defaultElement: "<ul>",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- menus: "ul",
- position: {
- my: "left top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- })
- // need to catch all clicks on disabled menu
- // not possible through _on
- .bind( "click" + this.eventNamespace, $.proxy(function( event ) {
- if ( this.options.disabled ) {
- event.preventDefault();
- }
- }, this ));
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-state-disabled > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item:has(a)": function( event ) {
- var target = $( event.target ).closest( ".ui-menu-item" );
- if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- mouseHandled = true;
-
- this.select( event );
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) ) {
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( !$( event.target ).closest( ".ui-menu" ).length ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).andSelf()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .children( "a" )
- .removeUniqueId()
- .removeClass( "ui-corner-all ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- var match, prev, character, skip, regex,
- preventDefault = true;
-
- function escape( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- }
-
- if ( match.length ) {
- this.focus( event, match );
- if ( match.length > 1 ) {
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.prev( "a" ),
- submenuCarat = $( "<span>" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
-
- // Don't refresh list items that are already adapted
- menus.children( ":not(.ui-menu-item):has(a)" )
- .addClass( "ui-menu-item" )
- .attr( "role", "presentation" )
- .children( "a" )
- .uniqueId()
- .addClass( "ui-corner-all" )
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Initialize unlinked menu-items containing spaces and/or dashes only as dividers
- menus.children( ":not(.ui-menu-item)" ).each(function() {
- var item = $( this );
- // hyphen, em dash, en dash
- if ( !/[^\-—–\s]/.test( item.text() ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Add aria-disabled attribute to any disabled menu item
- menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.children( "a" ).addClass( "ui-state-focus" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .children( "a:first" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.height();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.children( "a" ).removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( "a.ui-state-active" )
- .removeClass( "ui-state-active" );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .children( ".ui-menu-item" )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- }
-});
-
-}( jQuery ));
-(function( $, undefined ) {
-
-$.widget( "ui.progressbar", {
- version: "1.9.2",
- options: {
- value: 0,
- max: 100
- },
-
- min: 0,
-
- _create: function() {
- this.element
- .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .attr({
- role: "progressbar",
- "aria-valuemin": this.min,
- "aria-valuemax": this.options.max,
- "aria-valuenow": this._value()
- });
-
- this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
- .appendTo( this.element );
-
- this.oldValue = this._value();
- this._refreshValue();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
-
- this.valueDiv.remove();
- },
-
- value: function( newValue ) {
- if ( newValue === undefined ) {
- return this._value();
- }
-
- this._setOption( "value", newValue );
- return this;
- },
-
- _setOption: function( key, value ) {
- if ( key === "value" ) {
- this.options.value = value;
- this._refreshValue();
- if ( this._value() === this.options.max ) {
- this._trigger( "complete" );
- }
- }
-
- this._super( key, value );
- },
-
- _value: function() {
- var val = this.options.value;
- // normalize invalid value
- if ( typeof val !== "number" ) {
- val = 0;
- }
- return Math.min( this.options.max, Math.max( this.min, val ) );
- },
-
- _percentage: function() {
- return 100 * this._value() / this.options.max;
- },
-
- _refreshValue: function() {
- var value = this.value(),
- percentage = this._percentage();
-
- if ( this.oldValue !== value ) {
- this.oldValue = value;
- this._trigger( "change" );
- }
-
- this.valueDiv
- .toggle( value > this.min )
- .toggleClass( "ui-corner-right", value === this.options.max )
- .width( percentage.toFixed(0) + "%" );
- this.element.attr( "aria-valuenow", value );
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- zIndex: 1000
- },
- _create: function() {
-
- var that = this, o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
- });
-
- //Wrap the element if it cannot hold child nodes
- if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
-
- //Create a wrapper element and set the wrapper to the new current internal element
- this.element.wrap(
- $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
- position: this.element.css('position'),
- width: this.element.outerWidth(),
- height: this.element.outerHeight(),
- top: this.element.css('top'),
- left: this.element.css('left')
- })
- );
-
- //Overwrite the original this.element
- this.element = this.element.parent().data(
- "resizable", this.element.data('resizable')
- );
-
- this.elementIsWrapper = true;
-
- //Move margins to the wrapper
- this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
- this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
-
- //Prevent Safari textarea resize
- this.originalResizeStyle = this.originalElement.css('resize');
- this.originalElement.css('resize', 'none');
-
- //Push the actual element to our proportionallyResize internal array
- this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
-
- // avoid IE jump (hard set the margin)
- this.originalElement.css({ margin: this.originalElement.css('margin') });
-
- // fix handlers offset
- this._proportionallyResize();
-
- }
-
- this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
- if(this.handles.constructor == String) {
-
- if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
- var n = this.handles.split(","); this.handles = {};
-
- for(var i = 0; i < n.length; i++) {
-
- var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
- var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
-
- // Apply zIndex to all handles - see #7960
- axis.css({ zIndex: o.zIndex });
-
- //TODO : What's going on here?
- if ('se' == handle) {
- axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
- };
-
- //Insert into internal handles object and append to element
- this.handles[handle] = '.ui-resizable-'+handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- target = target || this.element;
-
- for(var i in this.handles) {
-
- if(this.handles[i].constructor == String)
- this.handles[i] = $(this.handles[i], this.element).show();
-
- //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
-
- var axis = $(this.handles[i], this.element), padWrapper = 0;
-
- //Checking the correct pad and border
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- //The padding type i have to apply...
- var padPos = [ 'padding',
- /ne|nw|n/.test(i) ? 'Top' :
- /se|sw|s/.test(i) ? 'Bottom' :
- /^e$/.test(i) ? 'Right' : 'Left' ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
-
- }
-
- //TODO: What's that good for? There's not anything to be executed left
- if(!$(this.handles[i]).length)
- continue;
-
- }
- };
-
- //TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = $('.ui-resizable-handle', this.element)
- .disableSelection();
-
- //Matching axis name
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className)
- var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- //Axis, default = se
- that.axis = axis && axis[1] ? axis[1] : 'se';
- }
- });
-
- //If we want to auto hide the elements
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) return;
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function(){
- if (o.disabled) return;
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- //Initialize the mouse interaction
- this._mouseInit();
-
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
- };
-
- //TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- var wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css('position'),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css('top'),
- left: wrapper.css('left')
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css('resize', this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var handle = false;
- for (var i in this.handles) {
- if ($(this.handles[i])[0] == event.target) {
- handle = true;
- }
- }
-
- return !this.options.disabled && handle;
- },
-
- _mouseStart: function(event) {
-
- var o = this.options, iniPos = this.element.position(), el = this.element;
-
- this.resizing = true;
- this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
-
- // bugfix for http://dev.jquery.com/ticket/1749
- if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
- el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
- }
-
- this._renderProxy();
-
- var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft() || 0;
- curtop += $(o.containment).scrollTop() || 0;
- }
-
- //Store needed variables
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
- this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalPosition = { left: curleft, top: curtop };
- this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
- this.originalMousePosition = { left: event.pageX, top: event.pageY };
-
- //Aspect Ratio
- this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
-
- var cursor = $('.ui-resizable-' + this.axis).css('cursor');
- $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
-
- el.addClass("ui-resizable-resizing");
- this._propagate("start", event);
- return true;
- },
-
- _mouseDrag: function(event) {
-
- //Increase performance, avoid regex
- var el = this.helper, o = this.options, props = {},
- that = this, smp = this.originalMousePosition, a = this.axis;
-
- var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
- var trigger = this._change[a];
- if (!trigger) return false;
-
- // Calculate the attrs that will be change
- var data = trigger.apply(this, [event, dx, dy]);
-
- // Put this in the mouseDrag handler since the user can start pressing shift while resizing
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey)
- data = this._updateRatio(data, event);
-
- data = this._respectSize(data, event);
-
- // plugins callbacks need to be called first
- this._propagate("resize", event);
-
- el.css({
- top: this.position.top + "px", left: this.position.left + "px",
- width: this.size.width + "px", height: this.size.height + "px"
- });
-
- if (!this._helper && this._proportionallyResizeElements.length)
- this._proportionallyResize();
-
- this._updateCache(data);
-
- // calling the user callback at the end
- this._trigger('resize', event, this.ui());
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var o = this.options, that = this;
-
- if(this._helper) {
- var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) },
- left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate)
- this.element.css($.extend(s, { top: top, left: left }));
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) this._proportionallyResize();
- }
-
- $('body').css('cursor', 'auto');
-
- this.element.removeClass("ui-resizable-resizing");
-
- this._propagate("stop", event);
-
- if (this._helper) this.helper.remove();
- return false;
-
- },
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
-
- b = {
- minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
- maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
- minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
- maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
- };
-
- if(this._aspectRatio || forceAspectRatio) {
- // We want to create an enclosing box whose aspect ration is the requested one
- // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
- pMinWidth = b.minHeight * this.aspectRatio;
- pMinHeight = b.minWidth / this.aspectRatio;
- pMaxWidth = b.maxHeight * this.aspectRatio;
- pMaxHeight = b.maxWidth / this.aspectRatio;
-
- if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
- if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
- if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
- if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
- }
- this._vBoundaries = b;
- },
-
- _updateCache: function(data) {
- var o = this.options;
- this.offset = this.helper.offset();
- if (isNumber(data.left)) this.position.left = data.left;
- if (isNumber(data.top)) this.position.top = data.top;
- if (isNumber(data.height)) this.size.height = data.height;
- if (isNumber(data.width)) this.size.width = data.width;
- },
-
- _updateRatio: function(data, event) {
-
- var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
-
- if (isNumber(data.height)) data.width = (data.height * this.aspectRatio);
- else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio);
-
- if (a == 'sw') {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a == 'nw') {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
-
- _respectSize: function(data, event) {
-
- var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
- ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
- isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
-
- if (isminw) data.width = o.minWidth;
- if (isminh) data.height = o.minHeight;
- if (ismaxw) data.width = o.maxWidth;
- if (ismaxh) data.height = o.maxHeight;
-
- var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
- var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
-
- if (isminw && cw) data.left = dw - o.minWidth;
- if (ismaxw && cw) data.left = dw - o.maxWidth;
- if (isminh && ch) data.top = dh - o.minHeight;
- if (ismaxh && ch) data.top = dh - o.maxHeight;
-
- // fixing jump error on top/left - bug #2330
- var isNotwh = !data.width && !data.height;
- if (isNotwh && !data.left && data.top) data.top = null;
- else if (isNotwh && !data.top && data.left) data.left = null;
-
- return data;
- },
-
- _proportionallyResize: function() {
-
- var o = this.options;
- if (!this._proportionallyResizeElements.length) return;
- var element = this.helper || this.element;
-
- for (var i=0; i < this._proportionallyResizeElements.length; i++) {
-
- var prel = this._proportionallyResizeElements[i];
-
- if (!this.borderDif) {
- var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
- p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
-
- this.borderDif = $.map(b, function(v, i) {
- var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
- return border + padding;
- });
- }
-
- prel.css({
- height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
- width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
- });
-
- };
-
- },
-
- _renderProxy: function() {
-
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if(this._helper) {
-
- this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
-
- // fix ie6 offset TODO: This seems broken
- var ie6offset = ($.ui.ie6 ? 1 : 0),
- pxyoffset = ( $.ui.ie6 ? 2 : -1 );
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() + pxyoffset,
- height: this.element.outerHeight() + pxyoffset,
- position: 'absolute',
- left: this.elementOffset.left - ie6offset +'px',
- top: this.elementOffset.top - ie6offset +'px',
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx, dy) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(event, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- sw: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- },
- ne: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- nw: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- }
- },
-
- _propagate: function(n, event) {
- $.ui.plugin.call(this, n, [event, this.ui()]);
- (n != "resize" && this._trigger(n, event, this.ui()));
- },
-
- plugins: {},
-
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- }
-
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function (event, ui) {
- var that = $(this).data("resizable"), o = that.options;
-
- var _store = function (exp) {
- $(exp).each(function() {
- var el = $(this);
- el.data("resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
- });
- });
- };
-
- if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
- }else{
- _store(o.alsoResize);
- }
- },
-
- resize: function (event, ui) {
- var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
-
- var delta = {
- height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
- },
-
- _alsoResize = function (exp, c) {
- $(exp).each(function() {
- var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
- css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
-
- $.each(css, function (i, prop) {
- var sum = (start[prop]||0) + (delta[prop]||0);
- if (sum && sum >= 0)
- style[prop] = sum || null;
- });
-
- el.css(style);
- });
- };
-
- if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
- $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
-
- stop: function (event, ui) {
- $(this).removeData("resizable-alsoresize");
- }
-});
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options;
-
- var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css('width'), 10),
- height: parseInt(that.element.css('height'), 10),
- top: parseInt(that.element.css('top'), 10),
- left: parseInt(that.element.css('left'), 10)
- };
-
- if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add("resizable", "containment", {
-
- start: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options, el = that.element;
- var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
- if (!ce) return;
-
- that.containerElement = $(ce);
-
- if (/document/.test(oc) || oc == document) {
- that.containerOffset = { left: 0, top: 0 };
- that.containerPosition = { left: 0, top: 0 };
-
- that.parentData = {
- element: $(document), left: 0, top: 0,
- width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
- };
- }
-
- // i'm a node, so compute top, left, right, bottom
- else {
- var element = $(ce), p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
-
- var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width,
- width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- that.parentData = {
- element: ce, left: co.left, top: co.top, width: width, height: height
- };
- }
- },
-
- resize: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options,
- ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement;
-
- if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
-
- if (cp.left < (that._helper ? co.left : 0)) {
- that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
- if (pRatio) that.size.height = that.size.width / that.aspectRatio;
- that.position.left = o.helper ? co.left : 0;
- }
-
- if (cp.top < (that._helper ? co.top : 0)) {
- that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
- if (pRatio) that.size.width = that.size.height * that.aspectRatio;
- that.position.top = that._helper ? co.top : 0;
- }
-
- that.offset.left = that.parentData.left+that.position.left;
- that.offset.top = that.parentData.top+that.position.top;
-
- var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ),
- hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
-
- var isParent = that.containerElement.get(0) == that.element.parent().get(0),
- isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position'));
-
- if(isParent && isOffsetRelative) woset -= that.parentData.left;
-
- if (woset + that.size.width >= that.parentData.width) {
- that.size.width = that.parentData.width - woset;
- if (pRatio) that.size.height = that.size.width / that.aspectRatio;
- }
-
- if (hoset + that.size.height >= that.parentData.height) {
- that.size.height = that.parentData.height - hoset;
- if (pRatio) that.size.width = that.size.height * that.aspectRatio;
- }
- },
-
- stop: function(event, ui){
- var that = $(this).data("resizable"), o = that.options, cp = that.position,
- co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement;
-
- var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
-
- if (that._helper && !o.animate && (/relative/).test(ce.css('position')))
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
-
- if (that._helper && !o.animate && (/static/).test(ce.css('position')))
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
-
- }
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function(event, ui) {
-
- var that = $(this).data("resizable"), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
- .addClass('ui-resizable-ghost')
- .addClass(typeof o.ghost == 'string' ? o.ghost : '');
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function(event, ui){
- var that = $(this).data("resizable"), o = that.options;
- if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width });
- },
-
- stop: function(event, ui){
- var that = $(this).data("resizable"), o = that.options;
- if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0));
- }
-
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey;
- o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
- var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
-
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- }
- else if (/^(ne)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.top = op.top - oy;
- }
- else if (/^(sw)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.left = op.left - ox;
- }
- else {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
- }
- }
-
-});
-
-var num = function(v) {
- return parseInt(v, 10) || 0;
-};
-
-var isNumber = function(value) {
- return !isNaN(parseInt(value, 10));
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.9.2",
- options: {
- appendTo: 'body',
- autoRefresh: true,
- distance: 0,
- filter: '*',
- tolerance: 'touch'
- },
- _create: function() {
- var that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- var selectees;
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this);
- var pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass('ui-selected'),
- selecting: $this.hasClass('ui-selecting'),
- unselecting: $this.hasClass('ui-unselecting')
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this;
-
- this.opos = [event.pageX, event.pageY];
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.clientX,
- "top": event.clientY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter('.ui-selected').each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().andSelf().each(function() {
- var selectee = $.data(this, "selectable-item");
- if (selectee) {
- var doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected');
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
- var that = this;
- this.dragged = true;
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
- if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item");
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element == that.element[0])
- return;
- var hit = false;
- if (options.tolerance == 'touch') {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance == 'fit') {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass('ui-selecting');
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- selectee.$element.addClass('ui-selected');
- selectee.selected = true;
- } else {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
-
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- var options = this.options;
-
- $('.ui-unselecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $('.ui-selecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-// number of pages in a slider
-// (how many times can you page up/down to go through the whole range)
-var numPages = 5;
-
-$.widget( "ui.slider", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "slide",
-
- options: {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: "horizontal",
- range: false,
- step: 1,
- value: 0,
- values: null
- },
-
- _create: function() {
- var i, handleCount,
- o = this.options,
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
- handles = [];
-
- this._keySliding = false;
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- this._detectOrientation();
- this._mouseInit();
-
- this.element
- .addClass( "ui-slider" +
- " ui-slider-" + this.orientation +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" +
- ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) );
-
- this.range = $([]);
-
- if ( o.range ) {
- if ( o.range === true ) {
- if ( !o.values ) {
- o.values = [ this._valueMin(), this._valueMin() ];
- }
- if ( o.values.length && o.values.length !== 2 ) {
- o.values = [ o.values[0], o.values[0] ];
- }
- }
-
- this.range = $( "<div></div>" )
- .appendTo( this.element )
- .addClass( "ui-slider-range" +
- // note: this isn't the most fittingly semantic framework class for this element,
- // but worked best visually with a variety of themes
- " ui-widget-header" +
- ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
- }
-
- handleCount = ( o.values && o.values.length ) || 1;
-
- for ( i = existingHandles.length; i < handleCount; i++ ) {
- handles.push( handle );
- }
-
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
-
- this.handle = this.handles.eq( 0 );
-
- this.handles.add( this.range ).filter( "a" )
- .click(function( event ) {
- event.preventDefault();
- })
- .mouseenter(function() {
- if ( !o.disabled ) {
- $( this ).addClass( "ui-state-hover" );
- }
- })
- .mouseleave(function() {
- $( this ).removeClass( "ui-state-hover" );
- })
- .focus(function() {
- if ( !o.disabled ) {
- $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
- $( this ).addClass( "ui-state-focus" );
- } else {
- $( this ).blur();
- }
- })
- .blur(function() {
- $( this ).removeClass( "ui-state-focus" );
- });
-
- this.handles.each(function( i ) {
- $( this ).data( "ui-slider-handle-index", i );
- });
-
- this._on( this.handles, {
- keydown: function( event ) {
- var allowed, curVal, newVal, step,
- index = $( event.target ).data( "ui-slider-handle-index" );
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_UP:
- case $.ui.keyCode.PAGE_DOWN:
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- event.preventDefault();
- if ( !this._keySliding ) {
- this._keySliding = true;
- $( event.target ).addClass( "ui-state-active" );
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return;
- }
- }
- break;
- }
-
- step = this.options.step;
- if ( this.options.values && this.options.values.length ) {
- curVal = newVal = this.values( index );
- } else {
- curVal = newVal = this.value();
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- newVal = this._valueMin();
- break;
- case $.ui.keyCode.END:
- newVal = this._valueMax();
- break;
- case $.ui.keyCode.PAGE_UP:
- newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- if ( curVal === this._valueMax() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal + step );
- break;
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- if ( curVal === this._valueMin() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal - step );
- break;
- }
-
- this._slide( event, index, newVal );
- },
- keyup: function( event ) {
- var index = $( event.target ).data( "ui-slider-handle-index" );
-
- if ( this._keySliding ) {
- this._keySliding = false;
- this._stop( event, index );
- this._change( event, index );
- $( event.target ).removeClass( "ui-state-active" );
- }
- }
- });
-
- this._refreshValue();
-
- this._animateOff = false;
- },
-
- _destroy: function() {
- this.handles.remove();
- this.range.remove();
-
- this.element
- .removeClass( "ui-slider" +
- " ui-slider-horizontal" +
- " ui-slider-vertical" +
- " ui-slider-disabled" +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" );
-
- this._mouseDestroy();
- },
-
- _mouseCapture: function( event ) {
- var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
- that = this,
- o = this.options;
-
- if ( o.disabled ) {
- return false;
- }
-
- this.elementSize = {
- width: this.element.outerWidth(),
- height: this.element.outerHeight()
- };
- this.elementOffset = this.element.offset();
-
- position = { x: event.pageX, y: event.pageY };
- normValue = this._normValueFromMouse( position );
- distance = this._valueMax() - this._valueMin() + 1;
- this.handles.each(function( i ) {
- var thisDistance = Math.abs( normValue - that.values(i) );
- if ( distance > thisDistance ) {
- distance = thisDistance;
- closestHandle = $( this );
- index = i;
- }
- });
-
- // workaround for bug #3736 (if both handles of a range are at 0,
- // the first is always used as the one with least distance,
- // and moving it is obviously prevented by preventing negative ranges)
- if( o.range === true && this.values(1) === o.min ) {
- index += 1;
- closestHandle = $( this.handles[index] );
- }
-
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return false;
- }
- this._mouseSliding = true;
-
- this._handleIndex = index;
-
- closestHandle
- .addClass( "ui-state-active" )
- .focus();
-
- offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
- this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
- left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
- top: event.pageY - offset.top -
- ( closestHandle.height() / 2 ) -
- ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
- ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
- };
-
- if ( !this.handles.hasClass( "ui-state-hover" ) ) {
- this._slide( event, index, normValue );
- }
- this._animateOff = true;
- return true;
- },
-
- _mouseStart: function() {
- return true;
- },
-
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- normValue = this._normValueFromMouse( position );
-
- this._slide( event, this._handleIndex, normValue );
-
- return false;
- },
-
- _mouseStop: function( event ) {
- this.handles.removeClass( "ui-state-active" );
- this._mouseSliding = false;
-
- this._stop( event, this._handleIndex );
- this._change( event, this._handleIndex );
-
- this._handleIndex = null;
- this._clickOffset = null;
- this._animateOff = false;
-
- return false;
- },
-
- _detectOrientation: function() {
- this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
- },
-
- _normValueFromMouse: function( position ) {
- var pixelTotal,
- pixelMouse,
- percentMouse,
- valueTotal,
- valueMouse;
-
- if ( this.orientation === "horizontal" ) {
- pixelTotal = this.elementSize.width;
- pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
- } else {
- pixelTotal = this.elementSize.height;
- pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
- }
-
- percentMouse = ( pixelMouse / pixelTotal );
- if ( percentMouse > 1 ) {
- percentMouse = 1;
- }
- if ( percentMouse < 0 ) {
- percentMouse = 0;
- }
- if ( this.orientation === "vertical" ) {
- percentMouse = 1 - percentMouse;
- }
-
- valueTotal = this._valueMax() - this._valueMin();
- valueMouse = this._valueMin() + percentMouse * valueTotal;
-
- return this._trimAlignValue( valueMouse );
- },
-
- _start: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
- return this._trigger( "start", event, uiHash );
- },
-
- _slide: function( event, index, newVal ) {
- var otherVal,
- newValues,
- allowed;
-
- if ( this.options.values && this.options.values.length ) {
- otherVal = this.values( index ? 0 : 1 );
-
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
- ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
- ) {
- newVal = otherVal;
- }
-
- if ( newVal !== this.values( index ) ) {
- newValues = this.values();
- newValues[ index ] = newVal;
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal,
- values: newValues
- } );
- otherVal = this.values( index ? 0 : 1 );
- if ( allowed !== false ) {
- this.values( index, newVal, true );
- }
- }
- } else {
- if ( newVal !== this.value() ) {
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal
- } );
- if ( allowed !== false ) {
- this.value( newVal );
- }
- }
- }
- },
-
- _stop: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "stop", event, uiHash );
- },
-
- _change: function( event, index ) {
- if ( !this._keySliding && !this._mouseSliding ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "change", event, uiHash );
- }
- },
-
- value: function( newValue ) {
- if ( arguments.length ) {
- this.options.value = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, 0 );
- return;
- }
-
- return this._value();
- },
-
- values: function( index, newValue ) {
- var vals,
- newValues,
- i;
-
- if ( arguments.length > 1 ) {
- this.options.values[ index ] = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, index );
- return;
- }
-
- if ( arguments.length ) {
- if ( $.isArray( arguments[ 0 ] ) ) {
- vals = this.options.values;
- newValues = arguments[ 0 ];
- for ( i = 0; i < vals.length; i += 1 ) {
- vals[ i ] = this._trimAlignValue( newValues[ i ] );
- this._change( null, i );
- }
- this._refreshValue();
- } else {
- if ( this.options.values && this.options.values.length ) {
- return this._values( index );
- } else {
- return this.value();
- }
- }
- } else {
- return this._values();
- }
- },
-
- _setOption: function( key, value ) {
- var i,
- valsLength = 0;
-
- if ( $.isArray( this.options.values ) ) {
- valsLength = this.options.values.length;
- }
-
- $.Widget.prototype._setOption.apply( this, arguments );
-
- switch ( key ) {
- case "disabled":
- if ( value ) {
- this.handles.filter( ".ui-state-focus" ).blur();
- this.handles.removeClass( "ui-state-hover" );
- this.handles.prop( "disabled", true );
- this.element.addClass( "ui-disabled" );
- } else {
- this.handles.prop( "disabled", false );
- this.element.removeClass( "ui-disabled" );
- }
- break;
- case "orientation":
- this._detectOrientation();
- this.element
- .removeClass( "ui-slider-horizontal ui-slider-vertical" )
- .addClass( "ui-slider-" + this.orientation );
- this._refreshValue();
- break;
- case "value":
- this._animateOff = true;
- this._refreshValue();
- this._change( null, 0 );
- this._animateOff = false;
- break;
- case "values":
- this._animateOff = true;
- this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
- this._change( null, i );
- }
- this._animateOff = false;
- break;
- case "min":
- case "max":
- this._animateOff = true;
- this._refreshValue();
- this._animateOff = false;
- break;
- }
- },
-
- //internal value getter
- // _value() returns value trimmed by min and max, aligned by step
- _value: function() {
- var val = this.options.value;
- val = this._trimAlignValue( val );
-
- return val;
- },
-
- //internal values getter
- // _values() returns array of values trimmed by min and max, aligned by step
- // _values( index ) returns single value trimmed by min and max, aligned by step
- _values: function( index ) {
- var val,
- vals,
- i;
-
- if ( arguments.length ) {
- val = this.options.values[ index ];
- val = this._trimAlignValue( val );
-
- return val;
- } else {
- // .slice() creates a copy of the array
- // this copy gets trimmed by min and max and then returned
- vals = this.options.values.slice();
- for ( i = 0; i < vals.length; i+= 1) {
- vals[ i ] = this._trimAlignValue( vals[ i ] );
- }
-
- return vals;
- }
- },
-
- // returns the step-aligned value that val is closest to, between (inclusive) min and max
- _trimAlignValue: function( val ) {
- if ( val <= this._valueMin() ) {
- return this._valueMin();
- }
- if ( val >= this._valueMax() ) {
- return this._valueMax();
- }
- var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = (val - this._valueMin()) % step,
- alignValue = val - valModStep;
-
- if ( Math.abs(valModStep) * 2 >= step ) {
- alignValue += ( valModStep > 0 ) ? step : ( -step );
- }
-
- // Since JavaScript has problems with large floats, round
- // the final value to 5 digits after the decimal point (see #4124)
- return parseFloat( alignValue.toFixed(5) );
- },
-
- _valueMin: function() {
- return this.options.min;
- },
-
- _valueMax: function() {
- return this.options.max;
- },
-
- _refreshValue: function() {
- var lastValPercent, valPercent, value, valueMin, valueMax,
- oRange = this.options.range,
- o = this.options,
- that = this,
- animate = ( !this._animateOff ) ? o.animate : false,
- _set = {};
-
- if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i ) {
- valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
- _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
- if ( that.options.range === true ) {
- if ( that.orientation === "horizontal" ) {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- } else {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
- lastValPercent = valPercent;
- });
- } else {
- value = this.value();
- valueMin = this._valueMin();
- valueMax = this._valueMax();
- valPercent = ( valueMax !== valueMin ) ?
- ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
- 0;
- _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
-
- if ( oRange === "min" && this.orientation === "horizontal" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "horizontal" ) {
- this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- if ( oRange === "min" && this.orientation === "vertical" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "vertical" ) {
- this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
-
-});
-
-}(jQuery));
-(function( $, undefined ) {
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: 'auto',
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: '> *',
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000
- },
- _create: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are being displayed horizontally
- this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- )
- this.items[i].item.removeData(this.widgetName + "-item");
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type == 'static') return false;
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- var currentItem = null, nodes = $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + '-item') == that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target);
-
- if(!currentItem) return false;
- if(this.options.handle && !overrideHandle) {
- var validHandle = false;
-
- $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
- if(!validHandle) return false;
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var o = this.options;
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] != this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment)
- this._setContainment();
-
- if(o.cursor) { // cursor option
- if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
- $('body').css("cursor", o.cursor);
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
- this.overflowOffset = this.scrollParent.offset();
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions)
- this._cacheHelperProportions();
-
-
- //Post 'activate' events to possible containers
- if(!noActivation) {
- for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager)
- $.ui.ddmanager.current = this;
-
- if ($.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- var o = this.options, scrolled = false;
- if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
-
- } else {
-
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
-
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
-
- //Rearrange
- for (var i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
- if (!intersection) continue;
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) continue;
-
- if (itemElement != this.currentItem[0] //cannot intersect with itself
- && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
- && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
- && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
- //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
- ) {
-
- this.direction = intersection == 1 ? "down" : "up";
-
- if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
-
- //Call callbacks
- this._trigger('sort', event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) return;
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, event);
-
- if(this.options.revert) {
- var that = this;
- var cur = this.placeholder.offset();
-
- this.reverting = true;
-
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper == "original")
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- else
- this.currentItem.show();
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected);
- var str = []; o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
- if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
- });
-
- if(!str.length && o.key) {
- str.push(o.key + '=');
- }
-
- return str.join('&');
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected);
- var ret = []; o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height;
-
- var l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height;
-
- var dyClick = this.offset.click.top,
- dxClick = this.offset.click.left;
-
- var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
-
- if( this.options.tolerance == "pointer"
- || this.options.forcePointerForContainers
- || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) // Right Half
- && x2 - (this.helperProportions.width / 2) < r // Left Half
- && t < y1 + (this.helperProportions.height / 2) // Bottom Half
- && y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement)
- return false;
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta != 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta != 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor == String
- ? [options.connectWith]
- : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var items = [];
- var queries = [];
- var connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (var i = connectWith.length - 1; i >= 0; i--){
- var cur = $(connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], this.widgetName);
- if(inst && inst != this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
- }
- };
- };
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
-
- for (var i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- };
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] == item.item[0])
- return false;
- };
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
- var items = this.items;
- var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
- var connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (var i = connectWith.length - 1; i >= 0; i--){
- var cur = $(connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], this.widgetName);
- if(inst && inst != this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- };
- };
- }
-
- for (var i = queries.length - 1; i >= 0; i--) {
- var targetData = queries[i][1];
- var _queries = queries[i][0];
-
- for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- var item = $(_queries[j]);
-
- item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- };
- };
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- for (var i = this.items.length - 1; i >= 0; i--){
- var item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
- continue;
-
- var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- var p = t.offset();
- item.left = p.left;
- item.top = p.top;
- };
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (var i = this.containers.length - 1; i >= 0; i--){
- var p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- };
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor == String) {
- var className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var el = $(document.createElement(that.currentItem[0].nodeName))
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper")[0];
-
- if(!className)
- el.style.visibility = "hidden";
-
- return el;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) return;
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); };
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); };
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
-
- // get innermost container that intersects with item
- var innermostContainer = null, innermostIndex = null;
-
-
- for (var i = this.containers.length - 1; i >= 0; i--){
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0]))
- continue;
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
- continue;
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) return;
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- var dist = 10000; var itemWithLeastDistance = null;
- var posProperty = this.containers[innermostIndex].floating ? 'left' : 'top';
- var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height';
- var base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (var j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
- if(this.items[j].item[0] == this.currentItem[0]) continue;
- var cur = this.items[j].item.offset()[posProperty];
- var nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
- return;
-
- this.currentContainer = this.containers[innermostIndex];
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options;
- var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
-
- if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
- $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
-
- if(helper[0] == this.currentItem[0])
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
-
- if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
- if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj == 'string') {
- obj = obj.split(' ');
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ('left' in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ('right' in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ('top' in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ('bottom' in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
- po = { top: 0, left: 0 };
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition == "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var o = this.options;
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
- var over = ($(ce).css("overflow") != 'hidden');
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top // The absolute mouse position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left // The absolute mouse position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- var pageX = event.pageX;
- var pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
- if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
- if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
- if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
- }
-
- if(o.grid) {
- var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
- this._noFinalSort = null;
-
- if(this.helper[0] == this.currentItem[0]) {
- for(var i in this._storedCSS) {
- if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
- if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
- if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
-
- if(!noPropagation) {
- for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-(function( $ ) {
-
-function modifier( fn ) {
- return function() {
- var previous = this.element.val();
- fn.apply( this, arguments );
- this._refresh();
- if ( previous !== this.element.val() ) {
- this._trigger( "change" );
- }
- };
-}
-
-$.widget( "ui.spinner", {
- version: "1.9.2",
- defaultElement: "<input>",
- widgetEventPrefix: "spin",
- options: {
- culture: null,
- icons: {
- down: "ui-icon-triangle-1-s",
- up: "ui-icon-triangle-1-n"
- },
- incremental: true,
- max: null,
- min: null,
- numberFormat: null,
- page: 10,
- step: 1,
-
- change: null,
- spin: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- // handle string values that need to be parsed
- this._setOption( "max", this.options.max );
- this._setOption( "min", this.options.min );
- this._setOption( "step", this.options.step );
-
- // format the value, but don't constrain
- this._value( this.element.val(), true );
-
- this._draw();
- this._on( this._events );
- this._refresh();
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _getCreateOptions: function() {
- var options = {},
- element = this.element;
-
- $.each( [ "min", "max", "step" ], function( i, option ) {
- var value = element.attr( option );
- if ( value !== undefined && value.length ) {
- options[ option ] = value;
- }
- });
-
- return options;
- },
-
- _events: {
- keydown: function( event ) {
- if ( this._start( event ) && this._keydown( event ) ) {
- event.preventDefault();
- }
- },
- keyup: "_stop",
- focus: function() {
- this.previous = this.element.val();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- this._refresh();
- if ( this.previous !== this.element.val() ) {
- this._trigger( "change", event );
- }
- },
- mousewheel: function( event, delta ) {
- if ( !delta ) {
- return;
- }
- if ( !this.spinning && !this._start( event ) ) {
- return false;
- }
-
- this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
- clearTimeout( this.mousewheelTimer );
- this.mousewheelTimer = this._delay(function() {
- if ( this.spinning ) {
- this._stop( event );
- }
- }, 100 );
- event.preventDefault();
- },
- "mousedown .ui-spinner-button": function( event ) {
- var previous;
-
- // We never want the buttons to have focus; whenever the user is
- // interacting with the spinner, the focus should be on the input.
- // If the input is focused then this.previous is properly set from
- // when the input first received focus. If the input is not focused
- // then we need to set this.previous based on the value before spinning.
- previous = this.element[0] === this.document[0].activeElement ?
- this.previous : this.element.val();
- function checkFocus() {
- var isActive = this.element[0] === this.document[0].activeElement;
- if ( !isActive ) {
- this.element.focus();
- this.previous = previous;
- // support: IE
- // IE sets focus asynchronously, so we need to check if focus
- // moved off of the input because the user clicked on the button.
- this._delay(function() {
- this.previous = previous;
- });
- }
- }
-
- // ensure focus is on (or stays on) the text field
- event.preventDefault();
- checkFocus.call( this );
-
- // support: IE
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- // and check (again) if focus moved off of the input.
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- checkFocus.call( this );
- });
-
- if ( this._start( event ) === false ) {
- return;
- }
-
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- "mouseup .ui-spinner-button": "_stop",
- "mouseenter .ui-spinner-button": function( event ) {
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
- return;
- }
-
- if ( this._start( event ) === false ) {
- return false;
- }
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- // TODO: do we really want to consider this a stop?
- // shouldn't we just stop the repeater and wait until mouseup before
- // we trigger the stop event?
- "mouseleave .ui-spinner-button": "_stop"
- },
-
- _draw: function() {
- var uiSpinner = this.uiSpinner = this.element
- .addClass( "ui-spinner-input" )
- .attr( "autocomplete", "off" )
- .wrap( this._uiSpinnerHtml() )
- .parent()
- // add buttons
- .append( this._buttonHtml() );
-
- this.element.attr( "role", "spinbutton" );
-
- // button bindings
- this.buttons = uiSpinner.find( ".ui-spinner-button" )
- .attr( "tabIndex", -1 )
- .button()
- .removeClass( "ui-corner-all" );
-
- // IE 6 doesn't understand height: 50% for the buttons
- // unless the wrapper has an explicit height
- if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
- uiSpinner.height() > 0 ) {
- uiSpinner.height( uiSpinner.height() );
- }
-
- // disable spinner if element was already disabled
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _keydown: function( event ) {
- var options = this.options,
- keyCode = $.ui.keyCode;
-
- switch ( event.keyCode ) {
- case keyCode.UP:
- this._repeat( null, 1, event );
- return true;
- case keyCode.DOWN:
- this._repeat( null, -1, event );
- return true;
- case keyCode.PAGE_UP:
- this._repeat( null, options.page, event );
- return true;
- case keyCode.PAGE_DOWN:
- this._repeat( null, -options.page, event );
- return true;
- }
-
- return false;
- },
-
- _uiSpinnerHtml: function() {
- return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
- },
-
- _buttonHtml: function() {
- return "" +
- "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
- "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
- "</a>" +
- "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
- "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
- "</a>";
- },
-
- _start: function( event ) {
- if ( !this.spinning && this._trigger( "start", event ) === false ) {
- return false;
- }
-
- if ( !this.counter ) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- },
-
- _repeat: function( i, steps, event ) {
- i = i || 500;
-
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- this._repeat( 40, steps, event );
- }, i );
-
- this._spin( steps * this.options.step, event );
- },
-
- _spin: function( step, event ) {
- var value = this.value() || 0;
-
- if ( !this.counter ) {
- this.counter = 1;
- }
-
- value = this._adjustValue( value + step * this._increment( this.counter ) );
-
- if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
- this._value( value );
- this.counter++;
- }
- },
-
- _increment: function( i ) {
- var incremental = this.options.incremental;
-
- if ( incremental ) {
- return $.isFunction( incremental ) ?
- incremental( i ) :
- Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
- }
-
- return 1;
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _adjustValue: function( value ) {
- var base, aboveMin,
- options = this.options;
-
- // make sure we're at a valid step
- // - find out where we are relative to the base (min or 0)
- base = options.min !== null ? options.min : 0;
- aboveMin = value - base;
- // - round to the nearest step
- aboveMin = Math.round(aboveMin / options.step) * options.step;
- // - rounding is based on 0, so adjust back to our base
- value = base + aboveMin;
-
- // fix precision from bad JS floating point math
- value = parseFloat( value.toFixed( this._precision() ) );
-
- // clamp the value
- if ( options.max !== null && value > options.max) {
- return options.max;
- }
- if ( options.min !== null && value < options.min ) {
- return options.min;
- }
-
- return value;
- },
-
- _stop: function( event ) {
- if ( !this.spinning ) {
- return;
- }
-
- clearTimeout( this.timer );
- clearTimeout( this.mousewheelTimer );
- this.counter = 0;
- this.spinning = false;
- this._trigger( "stop", event );
- },
-
- _setOption: function( key, value ) {
- if ( key === "culture" || key === "numberFormat" ) {
- var prevValue = this._parse( this.element.val() );
- this.options[ key ] = value;
- this.element.val( this._format( prevValue ) );
- return;
- }
-
- if ( key === "max" || key === "min" || key === "step" ) {
- if ( typeof value === "string" ) {
- value = this._parse( value );
- }
- }
-
- this._super( key, value );
-
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- this.buttons.button( "disable" );
- } else {
- this.element.prop( "disabled", false );
- this.buttons.button( "enable" );
- }
- }
- },
-
- _setOptions: modifier(function( options ) {
- this._super( options );
- this._value( this.element.val() );
- }),
-
- _parse: function( val ) {
- if ( typeof val === "string" && val !== "" ) {
- val = window.Globalize && this.options.numberFormat ?
- Globalize.parseFloat( val, 10, this.options.culture ) : +val;
- }
- return val === "" || isNaN( val ) ? null : val;
- },
-
- _format: function( value ) {
- if ( value === "" ) {
- return "";
- }
- return window.Globalize && this.options.numberFormat ?
- Globalize.format( value, this.options.numberFormat, this.options.culture ) :
- value;
- },
-
- _refresh: function() {
- this.element.attr({
- "aria-valuemin": this.options.min,
- "aria-valuemax": this.options.max,
- // TODO: what should we do with values that can't be parsed?
- "aria-valuenow": this._parse( this.element.val() )
- });
- },
-
- // update the value without triggering change
- _value: function( value, allowAny ) {
- var parsed;
- if ( value !== "" ) {
- parsed = this._parse( value );
- if ( parsed !== null ) {
- if ( !allowAny ) {
- parsed = this._adjustValue( parsed );
- }
- value = this._format( parsed );
- }
- }
- this.element.val( value );
- this._refresh();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-spinner-input" )
- .prop( "disabled", false )
- .removeAttr( "autocomplete" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
- this.uiSpinner.replaceWith( this.element );
- },
-
- stepUp: modifier(function( steps ) {
- this._stepUp( steps );
- }),
- _stepUp: function( steps ) {
- this._spin( (steps || 1) * this.options.step );
- },
-
- stepDown: modifier(function( steps ) {
- this._stepDown( steps );
- }),
- _stepDown: function( steps ) {
- this._spin( (steps || 1) * -this.options.step );
- },
-
- pageUp: modifier(function( pages ) {
- this._stepUp( (pages || 1) * this.options.page );
- }),
-
- pageDown: modifier(function( pages ) {
- this._stepDown( (pages || 1) * this.options.page );
- }),
-
- value: function( newVal ) {
- if ( !arguments.length ) {
- return this._parse( this.element.val() );
- }
- modifier( this._value ).call( this, newVal );
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-var tabId = 0,
- rhash = /#.*$/;
-
-function getNextTabId() {
- return ++tabId;
-}
-
-function isLocal( anchor ) {
- return anchor.hash.length > 1 &&
- anchor.href.replace( rhash, "" ) ===
- location.href.replace( rhash, "" )
- // support: Safari 5.1
- // Safari 5.1 doesn't encode spaces in window.location
- // but it does encode spaces from anchors (#8777)
- .replace( /\s/g, "%20" );
-}
-
-$.widget( "ui.tabs", {
- version: "1.9.2",
- delay: 300,
- options: {
- active: null,
- collapsible: false,
- event: "click",
- heightStyle: "content",
- hide: null,
- show: null,
-
- // callbacks
- activate: null,
- beforeActivate: null,
- beforeLoad: null,
- load: null
- },
-
- _create: function() {
- var that = this,
- options = this.options,
- active = options.active,
- locationHash = location.hash.substring( 1 );
-
- this.running = false;
-
- this.element
- .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-tabs-collapsible", options.collapsible )
- // Prevent users from focusing disabled tabs via click
- .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
- if ( $( this ).is( ".ui-state-disabled" ) ) {
- event.preventDefault();
- }
- })
- // support: IE <9
- // Preventing the default action in mousedown doesn't prevent IE
- // from focusing the element, so if the anchor gets focused, blur.
- // We don't have to worry about focusing the previously focused
- // element since clicking on a non-focusable element should focus
- // the body anyway.
- .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
- if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
- this.blur();
- }
- });
-
- this._processTabs();
-
- if ( active === null ) {
- // check the fragment identifier in the URL
- if ( locationHash ) {
- this.tabs.each(function( i, tab ) {
- if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
- active = i;
- return false;
- }
- });
- }
-
- // check for a tab marked active via a class
- if ( active === null ) {
- active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
- }
-
- // no active tab, set to false
- if ( active === null || active === -1 ) {
- active = this.tabs.length ? 0 : false;
- }
- }
-
- // handle numbers: negative, out of range
- if ( active !== false ) {
- active = this.tabs.index( this.tabs.eq( active ) );
- if ( active === -1 ) {
- active = options.collapsible ? false : 0;
- }
- }
- options.active = active;
-
- // don't allow collapsible: false and active: false
- if ( !options.collapsible && options.active === false && this.anchors.length ) {
- options.active = 0;
- }
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- if ( $.isArray( options.disabled ) ) {
- options.disabled = $.unique( options.disabled.concat(
- $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
- return that.tabs.index( li );
- })
- ) ).sort();
- }
-
- // check for length avoids error when initializing empty list
- if ( this.options.active !== false && this.anchors.length ) {
- this.active = this._findActive( this.options.active );
- } else {
- this.active = $();
- }
-
- this._refresh();
-
- if ( this.active.length ) {
- this.load( options.active );
- }
- },
-
- _getCreateEventData: function() {
- return {
- tab: this.active,
- panel: !this.active.length ? $() : this._getPanelForTab( this.active )
- };
- },
-
- _tabKeydown: function( event ) {
- var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
- selectedIndex = this.tabs.index( focusedTab ),
- goingForward = true;
-
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- selectedIndex++;
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.LEFT:
- goingForward = false;
- selectedIndex--;
- break;
- case $.ui.keyCode.END:
- selectedIndex = this.anchors.length - 1;
- break;
- case $.ui.keyCode.HOME:
- selectedIndex = 0;
- break;
- case $.ui.keyCode.SPACE:
- // Activate only, no collapsing
- event.preventDefault();
- clearTimeout( this.activating );
- this._activate( selectedIndex );
- return;
- case $.ui.keyCode.ENTER:
- // Toggle (cancel delayed activation, allow collapsing)
- event.preventDefault();
- clearTimeout( this.activating );
- // Determine if we should collapse or activate
- this._activate( selectedIndex === this.options.active ? false : selectedIndex );
- return;
- default:
- return;
- }
-
- // Focus the appropriate tab, based on which key was pressed
- event.preventDefault();
- clearTimeout( this.activating );
- selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
- // Navigating with control key will prevent automatic activation
- if ( !event.ctrlKey ) {
- // Update aria-selected immediately so that AT think the tab is already selected.
- // Otherwise AT may confuse the user by stating that they need to activate the tab,
- // but the tab will already be activated by the time the announcement finishes.
- focusedTab.attr( "aria-selected", "false" );
- this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
- this.activating = this._delay(function() {
- this.option( "active", selectedIndex );
- }, this.delay );
- }
- },
-
- _panelKeydown: function( event ) {
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- // Ctrl+up moves focus to the current tab
- if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
- event.preventDefault();
- this.active.focus();
- }
- },
-
- // Alt+page up/down moves focus to the previous/next tab (and activates)
- _handlePageNav: function( event ) {
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
- this._activate( this._focusNextTab( this.options.active - 1, false ) );
- return true;
- }
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
- this._activate( this._focusNextTab( this.options.active + 1, true ) );
- return true;
- }
- },
-
- _findNextTab: function( index, goingForward ) {
- var lastTabIndex = this.tabs.length - 1;
-
- function constrain() {
- if ( index > lastTabIndex ) {
- index = 0;
- }
- if ( index < 0 ) {
- index = lastTabIndex;
- }
- return index;
- }
-
- while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
- index = goingForward ? index + 1 : index - 1;
- }
-
- return index;
- },
-
- _focusNextTab: function( index, goingForward ) {
- index = this._findNextTab( index, goingForward );
- this.tabs.eq( index ).focus();
- return index;
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "disabled" ) {
- // don't use the widget factory's disabled handling
- this._setupDisabled( value );
- return;
- }
-
- this._super( key, value);
-
- if ( key === "collapsible" ) {
- this.element.toggleClass( "ui-tabs-collapsible", value );
- // Setting collapsible: false while collapsed; open first panel
- if ( !value && this.options.active === false ) {
- this._activate( 0 );
- }
- }
-
- if ( key === "event" ) {
- this._setupEvents( value );
- }
-
- if ( key === "heightStyle" ) {
- this._setupHeightStyle( value );
- }
- },
-
- _tabId: function( tab ) {
- return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
- },
-
- _sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
- },
-
- refresh: function() {
- var options = this.options,
- lis = this.tablist.children( ":has(a[href])" );
-
- // get disabled tabs from class attribute from HTML
- // this will get converted to a boolean if needed in _refresh()
- options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
- return lis.index( tab );
- });
-
- this._processTabs();
-
- // was collapsed or no tabs
- if ( options.active === false || !this.anchors.length ) {
- options.active = false;
- this.active = $();
- // was active, but active tab is gone
- } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
- // all remaining tabs are disabled
- if ( this.tabs.length === options.disabled.length ) {
- options.active = false;
- this.active = $();
- // activate previous tab
- } else {
- this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
- }
- // was active, active tab still exists
- } else {
- // make sure active index is correct
- options.active = this.tabs.index( this.active );
- }
-
- this._refresh();
- },
-
- _refresh: function() {
- this._setupDisabled( this.options.disabled );
- this._setupEvents( this.options.event );
- this._setupHeightStyle( this.options.heightStyle );
-
- this.tabs.not( this.active ).attr({
- "aria-selected": "false",
- tabIndex: -1
- });
- this.panels.not( this._getPanelForTab( this.active ) )
- .hide()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
-
- // Make sure one tab is in the tab order
- if ( !this.active.length ) {
- this.tabs.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active
- .addClass( "ui-tabs-active ui-state-active" )
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- this._getPanelForTab( this.active )
- .show()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
- },
-
- _processTabs: function() {
- var that = this;
-
- this.tablist = this._getList()
- .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .attr( "role", "tablist" );
-
- this.tabs = this.tablist.find( "> li:has(a[href])" )
- .addClass( "ui-state-default ui-corner-top" )
- .attr({
- role: "tab",
- tabIndex: -1
- });
-
- this.anchors = this.tabs.map(function() {
- return $( "a", this )[ 0 ];
- })
- .addClass( "ui-tabs-anchor" )
- .attr({
- role: "presentation",
- tabIndex: -1
- });
-
- this.panels = $();
-
- this.anchors.each(function( i, anchor ) {
- var selector, panel, panelId,
- anchorId = $( anchor ).uniqueId().attr( "id" ),
- tab = $( anchor ).closest( "li" ),
- originalAriaControls = tab.attr( "aria-controls" );
-
- // inline tab
- if ( isLocal( anchor ) ) {
- selector = anchor.hash;
- panel = that.element.find( that._sanitizeSelector( selector ) );
- // remote tab
- } else {
- panelId = that._tabId( tab );
- selector = "#" + panelId;
- panel = that.element.find( selector );
- if ( !panel.length ) {
- panel = that._createPanel( panelId );
- panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
- }
- panel.attr( "aria-live", "polite" );
- }
-
- if ( panel.length) {
- that.panels = that.panels.add( panel );
- }
- if ( originalAriaControls ) {
- tab.data( "ui-tabs-aria-controls", originalAriaControls );
- }
- tab.attr({
- "aria-controls": selector.substring( 1 ),
- "aria-labelledby": anchorId
- });
- panel.attr( "aria-labelledby", anchorId );
- });
-
- this.panels
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .attr( "role", "tabpanel" );
- },
-
- // allow overriding how to find the list for rare usage scenarios (#7715)
- _getList: function() {
- return this.element.find( "ol,ul" ).eq( 0 );
- },
-
- _createPanel: function( id ) {
- return $( "<div>" )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- },
-
- _setupDisabled: function( disabled ) {
- if ( $.isArray( disabled ) ) {
- if ( !disabled.length ) {
- disabled = false;
- } else if ( disabled.length === this.anchors.length ) {
- disabled = true;
- }
- }
-
- // disable tabs
- for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
- if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
- $( li )
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- } else {
- $( li )
- .removeClass( "ui-state-disabled" )
- .removeAttr( "aria-disabled" );
- }
- }
-
- this.options.disabled = disabled;
- },
-
- _setupEvents: function( event ) {
- var events = {
- click: function( event ) {
- event.preventDefault();
- }
- };
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.anchors.add( this.tabs ).add( this.panels ) );
- this._on( this.anchors, events );
- this._on( this.tabs, { keydown: "_tabKeydown" } );
- this._on( this.panels, { keydown: "_panelKeydown" } );
-
- this._focusable( this.tabs );
- this._hoverable( this.tabs );
- },
-
- _setupHeightStyle: function( heightStyle ) {
- var maxHeight, overflow,
- parent = this.element.parent();
-
- if ( heightStyle === "fill" ) {
- // IE 6 treats height like minHeight, so we need to turn off overflow
- // in order to get a reliable height
- // we use the minHeight support test because we assume that only
- // browsers that don't support minHeight will treat height as minHeight
- if ( !$.support.minHeight ) {
- overflow = parent.css( "overflow" );
- parent.css( "overflow", "hidden");
- }
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
- if ( overflow ) {
- parent.css( "overflow", overflow );
- }
-
- this.element.children().not( this.panels ).each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.panels.each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.panels.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
- }).height( maxHeight );
- }
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- anchor = $( event.currentTarget ),
- tab = anchor.closest( "li" ),
- clickedIsActive = tab[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : this._getPanelForTab( tab ),
- toHide = !active.length ? $() : this._getPanelForTab( active ),
- eventData = {
- oldTab: active,
- oldPanel: toHide,
- newTab: collapsing ? $() : tab,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if ( tab.hasClass( "ui-state-disabled" ) ||
- // tab is already loading
- tab.hasClass( "ui-tabs-loading" ) ||
- // can't switch durning an animation
- this.running ||
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.tabs.index( tab );
-
- this.active = clickedIsActive ? $() : tab;
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- if ( !toHide.length && !toShow.length ) {
- $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
- }
-
- if ( toShow.length ) {
- this.load( this.tabs.index( tab ), event );
- }
- this._toggle( event, eventData );
- },
-
- // handles show/hide for selecting tabs
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel;
-
- this.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && that.options.show ) {
- that._show( toShow, that.options.show, complete );
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && this.options.hide ) {
- this._hide( toHide, this.options.hide, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- eventData.oldTab.attr( "aria-selected", "false" );
- // If we're switching tabs, remove the old tab from the tab order.
- // If we're opening from collapsed state, remove the previous tab from the tab order.
- // If we're collapsing, then keep the collapsing tab in the tab order.
- if ( toShow.length && toHide.length ) {
- eventData.oldTab.attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.tabs.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow.attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- eventData.newTab.attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _activate: function( index ) {
- var anchor,
- active = this._findActive( index );
-
- // trying to activate the already active panel
- if ( active[ 0 ] === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the current active header
- if ( !active.length ) {
- active = this.active;
- }
-
- anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
- this._eventHandler({
- target: anchor,
- currentTarget: anchor,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( index ) {
- return index === false ? $() : this.tabs.eq( index );
- },
-
- _getIndex: function( index ) {
- // meta-function to give users option to provide a href string instead of a numerical index.
- if ( typeof index === "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
- }
-
- return index;
- },
-
- _destroy: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
- this.tablist
- .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .removeAttr( "role" );
-
- this.anchors
- .removeClass( "ui-tabs-anchor" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeData( "href.tabs" )
- .removeData( "load.tabs" )
- .removeUniqueId();
-
- this.tabs.add( this.panels ).each(function() {
- if ( $.data( this, "ui-tabs-destroy" ) ) {
- $( this ).remove();
- } else {
- $( this )
- .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
- "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-live" )
- .removeAttr( "aria-busy" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "role" );
- }
- });
-
- this.tabs.each(function() {
- var li = $( this ),
- prev = li.data( "ui-tabs-aria-controls" );
- if ( prev ) {
- li.attr( "aria-controls", prev );
- } else {
- li.removeAttr( "aria-controls" );
- }
- });
-
- this.panels.show();
-
- if ( this.options.heightStyle !== "content" ) {
- this.panels.css( "height", "" );
- }
- },
-
- enable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === false ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = false;
- } else {
- index = this._getIndex( index );
- if ( $.isArray( disabled ) ) {
- disabled = $.map( disabled, function( num ) {
- return num !== index ? num : null;
- });
- } else {
- disabled = $.map( this.tabs, function( li, num ) {
- return num !== index ? num : null;
- });
- }
- }
- this._setupDisabled( disabled );
- },
-
- disable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === true ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = true;
- } else {
- index = this._getIndex( index );
- if ( $.inArray( index, disabled ) !== -1 ) {
- return;
- }
- if ( $.isArray( disabled ) ) {
- disabled = $.merge( [ index ], disabled ).sort();
- } else {
- disabled = [ index ];
- }
- }
- this._setupDisabled( disabled );
- },
-
- load: function( index, event ) {
- index = this._getIndex( index );
- var that = this,
- tab = this.tabs.eq( index ),
- anchor = tab.find( ".ui-tabs-anchor" ),
- panel = this._getPanelForTab( tab ),
- eventData = {
- tab: tab,
- panel: panel
- };
-
- // not remote
- if ( isLocal( anchor[ 0 ] ) ) {
- return;
- }
-
- this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
- // support: jQuery <1.8
- // jQuery <1.8 returns false if the request is canceled in beforeSend,
- // but as of 1.8, $.ajax() always returns a jqXHR object.
- if ( this.xhr && this.xhr.statusText !== "canceled" ) {
- tab.addClass( "ui-tabs-loading" );
- panel.attr( "aria-busy", "true" );
-
- this.xhr
- .success(function( response ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- panel.html( response );
- that._trigger( "load", event, eventData );
- }, 1 );
- })
- .complete(function( jqXHR, status ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
- }, 1 );
- });
- }
- },
-
- // TODO: Remove this function in 1.10 when ajaxOptions is removed
- _ajaxSettings: function( anchor, event, eventData ) {
- var that = this;
- return {
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
- }
- };
- },
-
- _getPanelForTab: function( tab ) {
- var id = $( tab ).attr( "aria-controls" );
- return this.element.find( this._sanitizeSelector( "#" + id ) );
- }
-});
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
-
- // helper method for a lot of the back compat extensions
- $.ui.tabs.prototype._ui = function( tab, panel ) {
- return {
- tab: tab,
- panel: panel,
- index: this.anchors.index( tab )
- };
- };
-
- // url method
- $.widget( "ui.tabs", $.ui.tabs, {
- url: function( index, url ) {
- this.anchors.eq( index ).attr( "href", url );
- }
- });
-
- // TODO: Remove _ajaxSettings() method when removing this extension
- // ajaxOptions and cache options
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- ajaxOptions: null,
- cache: false
- },
-
- _create: function() {
- this._super();
-
- var that = this;
-
- this._on({ tabsbeforeload: function( event, ui ) {
- // tab is already cached
- if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) {
- event.preventDefault();
- return;
- }
-
- ui.jqXHR.success(function() {
- if ( that.options.cache ) {
- $.data( ui.tab[ 0 ], "cache.tabs", true );
- }
- });
- }});
- },
-
- _ajaxSettings: function( anchor, event, ui ) {
- var ajaxOptions = this.options.ajaxOptions;
- return $.extend( {}, ajaxOptions, {
- error: function( xhr, status ) {
- try {
- // Passing index avoid a race condition when this method is
- // called after the user has selected another tab.
- // Pass the anchor that initiated this request allows
- // loadError to manipulate the tab content panel via $(a.hash)
- ajaxOptions.error(
- xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] );
- }
- catch ( error ) {}
- }
- }, this._superApply( arguments ) );
- },
-
- _setOption: function( key, value ) {
- // reset cache if switching from cached to not cached
- if ( key === "cache" && value === false ) {
- this.anchors.removeData( "cache.tabs" );
- }
- this._super( key, value );
- },
-
- _destroy: function() {
- this.anchors.removeData( "cache.tabs" );
- this._super();
- },
-
- url: function( index ){
- this.anchors.eq( index ).removeData( "cache.tabs" );
- this._superApply( arguments );
- }
- });
-
- // abort method
- $.widget( "ui.tabs", $.ui.tabs, {
- abort: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
- }
- });
-
- // spinner
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- spinner: "<em>Loading&#8230;</em>"
- },
- _create: function() {
- this._super();
- this._on({
- tabsbeforeload: function( event, ui ) {
- // Don't react to nested tabs or tabs that don't use a spinner
- if ( event.target !== this.element[ 0 ] ||
- !this.options.spinner ) {
- return;
- }
-
- var span = ui.tab.find( "span" ),
- html = span.html();
- span.html( this.options.spinner );
- ui.jqXHR.complete(function() {
- span.html( html );
- });
- }
- });
- }
- });
-
- // enable/disable events
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- enable: null,
- disable: null
- },
-
- enable: function( index ) {
- var options = this.options,
- trigger;
-
- if ( index && options.disabled === true ||
- ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) {
- trigger = true;
- }
-
- this._superApply( arguments );
-
- if ( trigger ) {
- this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- }
- },
-
- disable: function( index ) {
- var options = this.options,
- trigger;
-
- if ( index && options.disabled === false ||
- ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) {
- trigger = true;
- }
-
- this._superApply( arguments );
-
- if ( trigger ) {
- this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- }
- }
- });
-
- // add/remove methods and events
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- add: null,
- remove: null,
- tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
- },
-
- add: function( url, label, index ) {
- if ( index === undefined ) {
- index = this.anchors.length;
- }
-
- var doInsertAfter, panel,
- options = this.options,
- li = $( options.tabTemplate
- .replace( /#\{href\}/g, url )
- .replace( /#\{label\}/g, label ) ),
- id = !url.indexOf( "#" ) ?
- url.replace( "#", "" ) :
- this._tabId( li );
-
- li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true );
- li.attr( "aria-controls", id );
-
- doInsertAfter = index >= this.tabs.length;
-
- // try to find an existing element before creating a new one
- panel = this.element.find( "#" + id );
- if ( !panel.length ) {
- panel = this._createPanel( id );
- if ( doInsertAfter ) {
- if ( index > 0 ) {
- panel.insertAfter( this.panels.eq( -1 ) );
- } else {
- panel.appendTo( this.element );
- }
- } else {
- panel.insertBefore( this.panels[ index ] );
- }
- }
- panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide();
-
- if ( doInsertAfter ) {
- li.appendTo( this.tablist );
- } else {
- li.insertBefore( this.tabs[ index ] );
- }
-
- options.disabled = $.map( options.disabled, function( n ) {
- return n >= index ? ++n : n;
- });
-
- this.refresh();
- if ( this.tabs.length === 1 && options.active === false ) {
- this.option( "active", 0 );
- }
-
- this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- return this;
- },
-
- remove: function( index ) {
- index = this._getIndex( index );
- var options = this.options,
- tab = this.tabs.eq( index ).remove(),
- panel = this._getPanelForTab( tab ).remove();
-
- // If selected tab was removed focus tab to the right or
- // in case the last tab was removed the tab to the left.
- // We check for more than 2 tabs, because if there are only 2,
- // then when we remove this tab, there will only be one tab left
- // so we don't need to detect which tab to activate.
- if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) {
- this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
- }
-
- options.disabled = $.map(
- $.grep( options.disabled, function( n ) {
- return n !== index;
- }),
- function( n ) {
- return n >= index ? --n : n;
- });
-
- this.refresh();
-
- this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) );
- return this;
- }
- });
-
- // length method
- $.widget( "ui.tabs", $.ui.tabs, {
- length: function() {
- return this.anchors.length;
- }
- });
-
- // panel ids (idPrefix option + title attribute)
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- idPrefix: "ui-tabs-"
- },
-
- _tabId: function( tab ) {
- var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab;
- a = a[0];
- return $( a ).closest( "li" ).attr( "aria-controls" ) ||
- a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) ||
- this.options.idPrefix + getNextTabId();
- }
- });
-
- // _createPanel method
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- panelTemplate: "<div></div>"
- },
-
- _createPanel: function( id ) {
- return $( this.options.panelTemplate )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- }
- });
-
- // selected option
- $.widget( "ui.tabs", $.ui.tabs, {
- _create: function() {
- var options = this.options;
- if ( options.active === null && options.selected !== undefined ) {
- options.active = options.selected === -1 ? false : options.selected;
- }
- this._super();
- options.selected = options.active;
- if ( options.selected === false ) {
- options.selected = -1;
- }
- },
-
- _setOption: function( key, value ) {
- if ( key !== "selected" ) {
- return this._super( key, value );
- }
-
- var options = this.options;
- this._super( "active", value === -1 ? false : value );
- options.selected = options.active;
- if ( options.selected === false ) {
- options.selected = -1;
- }
- },
-
- _eventHandler: function() {
- this._superApply( arguments );
- this.options.selected = this.options.active;
- if ( this.options.selected === false ) {
- this.options.selected = -1;
- }
- }
- });
-
- // show and select event
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- show: null,
- select: null
- },
- _create: function() {
- this._super();
- if ( this.options.active !== false ) {
- this._trigger( "show", null, this._ui(
- this.active.find( ".ui-tabs-anchor" )[ 0 ],
- this._getPanelForTab( this.active )[ 0 ] ) );
- }
- },
- _trigger: function( type, event, data ) {
- var tab, panel,
- ret = this._superApply( arguments );
-
- if ( !ret ) {
- return false;
- }
-
- if ( type === "beforeActivate" ) {
- tab = data.newTab.length ? data.newTab : data.oldTab;
- panel = data.newPanel.length ? data.newPanel : data.oldPanel;
- ret = this._super( "select", event, {
- tab: tab.find( ".ui-tabs-anchor" )[ 0],
- panel: panel[ 0 ],
- index: tab.closest( "li" ).index()
- });
- } else if ( type === "activate" && data.newTab.length ) {
- ret = this._super( "show", event, {
- tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ],
- panel: data.newPanel[ 0 ],
- index: data.newTab.closest( "li" ).index()
- });
- }
- return ret;
- }
- });
-
- // select method
- $.widget( "ui.tabs", $.ui.tabs, {
- select: function( index ) {
- index = this._getIndex( index );
- if ( index === -1 ) {
- if ( this.options.collapsible && this.options.selected !== -1 ) {
- index = this.options.selected;
- } else {
- return;
- }
- }
- this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace );
- }
- });
-
- // cookie option
- (function() {
-
- var listId = 0;
-
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
- },
- _create: function() {
- var options = this.options,
- active;
- if ( options.active == null && options.cookie ) {
- active = parseInt( this._cookie(), 10 );
- if ( active === -1 ) {
- active = false;
- }
- options.active = active;
- }
- this._super();
- },
- _cookie: function( active ) {
- var cookie = [ this.cookie ||
- ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ];
- if ( arguments.length ) {
- cookie.push( active === false ? -1 : active );
- cookie.push( this.options.cookie );
- }
- return $.cookie.apply( null, cookie );
- },
- _refresh: function() {
- this._super();
- if ( this.options.cookie ) {
- this._cookie( this.options.active, this.options.cookie );
- }
- },
- _eventHandler: function() {
- this._superApply( arguments );
- if ( this.options.cookie ) {
- this._cookie( this.options.active, this.options.cookie );
- }
- },
- _destroy: function() {
- this._super();
- if ( this.options.cookie ) {
- this._cookie( null, this.options.cookie );
- }
- }
- });
-
- })();
-
- // load event
- $.widget( "ui.tabs", $.ui.tabs, {
- _trigger: function( type, event, data ) {
- var _data = $.extend( {}, data );
- if ( type === "load" ) {
- _data.panel = _data.panel[ 0 ];
- _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ];
- }
- return this._super( type, event, _data );
- }
- });
-
- // fx option
- // The new animation options (show, hide) conflict with the old show callback.
- // The old fx option wins over show/hide anyway (always favor back-compat).
- // If a user wants to use the new animation API, they must give up the old API.
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 }
- },
-
- _getFx: function() {
- var hide, show,
- fx = this.options.fx;
-
- if ( fx ) {
- if ( $.isArray( fx ) ) {
- hide = fx[ 0 ];
- show = fx[ 1 ];
- } else {
- hide = show = fx;
- }
- }
-
- return fx ? { show: show, hide: hide } : null;
- },
-
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel,
- fx = this._getFx();
-
- if ( !fx ) {
- return this._super( event, eventData );
- }
-
- that.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && fx.show ) {
- toShow
- .animate( fx.show, fx.show.duration, function() {
- complete();
- });
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && fx.hide ) {
- toHide.animate( fx.hide, fx.hide.duration, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
- }
- });
-}
-
-})( jQuery );
-(function( $ ) {
-
-var increments = 0;
-
-function addDescribedBy( elem, id ) {
- var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
- describedby.push( id );
- elem
- .data( "ui-tooltip-id", id )
- .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
-}
-
-function removeDescribedBy( elem ) {
- var id = elem.data( "ui-tooltip-id" ),
- describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
- index = $.inArray( id, describedby );
- if ( index !== -1 ) {
- describedby.splice( index, 1 );
- }
-
- elem.removeData( "ui-tooltip-id" );
- describedby = $.trim( describedby.join( " " ) );
- if ( describedby ) {
- elem.attr( "aria-describedby", describedby );
- } else {
- elem.removeAttr( "aria-describedby" );
- }
-}
-
-$.widget( "ui.tooltip", {
- version: "1.9.2",
- options: {
- content: function() {
- return $( this ).attr( "title" );
- },
- hide: true,
- // Disabled elements have inconsistent behavior across browsers (#8661)
- items: "[title]:not([disabled])",
- position: {
- my: "left top+15",
- at: "left bottom",
- collision: "flipfit flip"
- },
- show: true,
- tooltipClass: null,
- track: false,
-
- // callbacks
- close: null,
- open: null
- },
-
- _create: function() {
- this._on({
- mouseover: "open",
- focusin: "open"
- });
-
- // IDs of generated tooltips, needed for destroy
- this.tooltips = {};
- // IDs of parent tooltips where we removed the title attribute
- this.parents = {};
-
- if ( this.options.disabled ) {
- this._disable();
- }
- },
-
- _setOption: function( key, value ) {
- var that = this;
-
- if ( key === "disabled" ) {
- this[ value ? "_disable" : "_enable" ]();
- this.options[ key ] = value;
- // disable element style changes
- return;
- }
-
- this._super( key, value );
-
- if ( key === "content" ) {
- $.each( this.tooltips, function( id, element ) {
- that._updateContent( element );
- });
- }
- },
-
- _disable: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
- });
-
- // remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).andSelf().each(function() {
- var element = $( this );
- if ( element.is( "[title]" ) ) {
- element
- .data( "ui-tooltip-title", element.attr( "title" ) )
- .attr( "title", "" );
- }
- });
- },
-
- _enable: function() {
- // restore title attributes
- this.element.find( this.options.items ).andSelf().each(function() {
- var element = $( this );
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- });
- },
-
- open: function( event ) {
- var that = this,
- target = $( event ? event.target : this.element )
- // we need closest here due to mouseover bubbling,
- // but always pointing at the same event target
- .closest( this.options.items );
-
- // No element to show a tooltip for or the tooltip is already open
- if ( !target.length || target.data( "ui-tooltip-id" ) ) {
- return;
- }
-
- if ( target.attr( "title" ) ) {
- target.data( "ui-tooltip-title", target.attr( "title" ) );
- }
-
- target.data( "ui-tooltip-open", true );
-
- // kill parent tooltips, custom or native, for hover
- if ( event && event.type === "mouseover" ) {
- target.parents().each(function() {
- var parent = $( this ),
- blurEvent;
- if ( parent.data( "ui-tooltip-open" ) ) {
- blurEvent = $.Event( "blur" );
- blurEvent.target = blurEvent.currentTarget = this;
- that.close( blurEvent, true );
- }
- if ( parent.attr( "title" ) ) {
- parent.uniqueId();
- that.parents[ this.id ] = {
- element: this,
- title: parent.attr( "title" )
- };
- parent.attr( "title", "" );
- }
- });
- }
-
- this._updateContent( target, event );
- },
-
- _updateContent: function( target, event ) {
- var content,
- contentOption = this.options.content,
- that = this,
- eventType = event ? event.type : null;
-
- if ( typeof contentOption === "string" ) {
- return this._open( event, target, contentOption );
- }
-
- content = contentOption.call( target[0], function( response ) {
- // ignore async response if tooltip was closed already
- if ( !target.data( "ui-tooltip-open" ) ) {
- return;
- }
- // IE may instantly serve a cached response for ajax requests
- // delay this call to _open so the other call to _open runs first
- that._delay(function() {
- // jQuery creates a special event for focusin when it doesn't
- // exist natively. To improve performance, the native event
- // object is reused and the type is changed. Therefore, we can't
- // rely on the type being correct after the event finished
- // bubbling, so we set it back to the previous value. (#8740)
- if ( event ) {
- event.type = eventType;
- }
- this._open( event, target, response );
- });
- });
- if ( content ) {
- this._open( event, target, content );
- }
- },
-
- _open: function( event, target, content ) {
- var tooltip, events, delayedShow,
- positionOption = $.extend( {}, this.options.position );
-
- if ( !content ) {
- return;
- }
-
- // Content can be updated multiple times. If the tooltip already
- // exists, then just update the content and bail.
- tooltip = this._find( target );
- if ( tooltip.length ) {
- tooltip.find( ".ui-tooltip-content" ).html( content );
- return;
- }
-
- // if we have a title, clear it to prevent the native tooltip
- // we have to check first to avoid defining a title if none exists
- // (we don't want to cause an element to start matching [title])
- //
- // We use removeAttr only for key events, to allow IE to export the correct
- // accessible attributes. For mouse events, set to empty string to avoid
- // native tooltip showing up (happens only when removing inside mouseover).
- if ( target.is( "[title]" ) ) {
- if ( event && event.type === "mouseover" ) {
- target.attr( "title", "" );
- } else {
- target.removeAttr( "title" );
- }
- }
-
- tooltip = this._tooltip( target );
- addDescribedBy( target, tooltip.attr( "id" ) );
- tooltip.find( ".ui-tooltip-content" ).html( content );
-
- function position( event ) {
- positionOption.of = event;
- if ( tooltip.is( ":hidden" ) ) {
- return;
- }
- tooltip.position( positionOption );
- }
- if ( this.options.track && event && /^mouse/.test( event.type ) ) {
- this._on( this.document, {
- mousemove: position
- });
- // trigger once to override element-relative positioning
- position( event );
- } else {
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) );
- }
-
- tooltip.hide();
-
- this._show( tooltip, this.options.show );
- // Handle tracking tooltips that are shown with a delay (#8644). As soon
- // as the tooltip is visible, position the tooltip using the most recent
- // event.
- if ( this.options.show && this.options.show.delay ) {
- delayedShow = setInterval(function() {
- if ( tooltip.is( ":visible" ) ) {
- position( positionOption.of );
- clearInterval( delayedShow );
- }
- }, $.fx.interval );
- }
-
- this._trigger( "open", event, { tooltip: tooltip } );
-
- events = {
- keyup: function( event ) {
- if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
- var fakeEvent = $.Event(event);
- fakeEvent.currentTarget = target[0];
- this.close( fakeEvent, true );
- }
- },
- remove: function() {
- this._removeTooltip( tooltip );
- }
- };
- if ( !event || event.type === "mouseover" ) {
- events.mouseleave = "close";
- }
- if ( !event || event.type === "focusin" ) {
- events.focusout = "close";
- }
- this._on( true, target, events );
- },
-
- close: function( event ) {
- var that = this,
- target = $( event ? event.currentTarget : this.element ),
- tooltip = this._find( target );
-
- // disabling closes the tooltip, so we need to track when we're closing
- // to avoid an infinite loop in case the tooltip becomes disabled on close
- if ( this.closing ) {
- return;
- }
-
- // only set title if we had one before (see comment in _open())
- if ( target.data( "ui-tooltip-title" ) ) {
- target.attr( "title", target.data( "ui-tooltip-title" ) );
- }
-
- removeDescribedBy( target );
-
- tooltip.stop( true );
- this._hide( tooltip, this.options.hide, function() {
- that._removeTooltip( $( this ) );
- });
-
- target.removeData( "ui-tooltip-open" );
- this._off( target, "mouseleave focusout keyup" );
- // Remove 'remove' binding only on delegated targets
- if ( target[0] !== this.element[0] ) {
- this._off( target, "remove" );
- }
- this._off( this.document, "mousemove" );
-
- if ( event && event.type === "mouseleave" ) {
- $.each( this.parents, function( id, parent ) {
- $( parent.element ).attr( "title", parent.title );
- delete that.parents[ id ];
- });
- }
-
- this.closing = true;
- this._trigger( "close", event, { tooltip: tooltip } );
- this.closing = false;
- },
-
- _tooltip: function( element ) {
- var id = "ui-tooltip-" + increments++,
- tooltip = $( "<div>" )
- .attr({
- id: id,
- role: "tooltip"
- })
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) );
- $( "<div>" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
- tooltip.appendTo( this.document[0].body );
- if ( $.fn.bgiframe ) {
- tooltip.bgiframe();
- }
- this.tooltips[ id ] = element;
- return tooltip;
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? $( "#" + id ) : $();
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- element.removeData( "ui-tooltip-title" );
- }
- });
- }
-});
-
-}( jQuery ) ); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js
deleted file mode 100644
index 434724d9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/layout/jquery.layout-latest.js
+++ /dev/null
@@ -1,6086 +0,0 @@
-/**
- * @preserve
- * jquery.layout 1.4.3
- * $Date: 2015/03/13 22:37:04 $
- * $Rev: 1.0403 $
- *
- * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
- * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * SEE: http://layout.jquery-dev.com/LICENSE.txt
- *
- * Changelog: http://layout.jquery-dev.com/changelog.cfm
- *
- * Docs: http://layout.jquery-dev.com/documentation.html
- * Tips: http://layout.jquery-dev.com/tips.html
- * Help: http://groups.google.com/group/jquery-ui-layout
- */
-
-/* JavaDoc Info: http://code.google.com/closure/compiler/docs/js-for-compiler.html
- * {!Object} non-nullable type (never NULL)
- * {?string} nullable type (sometimes NULL) - default for {Object}
- * {number=} optional parameter
- * {*} ALL types
- */
-/* TODO for jQ 2.0
- * change .andSelf() to .addBack()
- * check $.fn.disableSelection - this is in jQuery UI 1.9.x
- */
-
-// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
-
-;(function ($) {
-
-// alias Math methods - used a lot!
-var min = Math.min
-, max = Math.max
-, round = Math.floor
-
-, isStr = function (v) { return $.type(v) === "string"; }
-
- /**
- * @param {!Object} Instance
- * @param {Array.<string>} a_fn
- */
-, runPluginCallbacks = function (Instance, a_fn) {
- if ($.isArray(a_fn))
- for (var i=0, c=a_fn.length; i<c; i++) {
- var fn = a_fn[i];
- try {
- if (isStr(fn)) // 'name' of a function
- fn = eval(fn);
- if ($.isFunction(fn))
- g(fn)( Instance );
- } catch (ex) {}
- }
- function g (f) { return f; }; // compiler hack
- }
-;
-
-/*
- * GENERIC $.layout METHODS - used by all layouts
- */
-$.layout = {
-
- version: "1.4.3"
-, revision: 1.0403 // eg: 1.4.1 final = 1.0401 - major(n+).minor(nn)+patch(nn+)
-
- // $.layout.browser REPLACES $.browser
-, browser: {} // set below
-
- // *PREDEFINED* EFFECTS & DEFAULTS
- // MUST list effect here - OR MUST set an fxSettings option (can be an empty hash: {})
-, effects: {
-
- // Pane Open/Close Animations
- slide: {
- all: { duration: "fast" } // eg: duration: 1000, easing: "easeOutBounce"
- , north: { direction: "up" }
- , south: { direction: "down" }
- , east: { direction: "right"}
- , west: { direction: "left" }
- }
- , drop: {
- all: { duration: "slow" }
- , north: { direction: "up" }
- , south: { direction: "down" }
- , east: { direction: "right"}
- , west: { direction: "left" }
- }
- , scale: {
- all: { duration: "fast" }
- }
- // these are not recommended, but can be used
- , blind: {}
- , clip: {}
- , explode: {}
- , fade: {}
- , fold: {}
- , puff: {}
-
- // Pane Resize Animations
- , size: {
- all: { easing: "swing" }
- }
- }
-
- // INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
-, config: {
- optionRootKeys: "effects,panes,north,south,west,east,center".split(",")
- , allPanes: "north,south,west,east,center".split(",")
- , borderPanes: "north,south,west,east".split(",")
- , oppositeEdge: {
- north: "south"
- , south: "north"
- , east: "west"
- , west: "east"
- }
- // offscreen data
- , offscreenCSS: { left: "-99999px", right: "auto" } // used by hide/close if useOffscreenClose=true
- , offscreenReset: "offscreenReset" // key used for data
- // CSS used in multiple places
- , hidden: { visibility: "hidden" }
- , visible: { visibility: "visible" }
- // layout element settings
- , resizers: {
- cssReq: {
- position: "absolute"
- , padding: 0
- , margin: 0
- , fontSize: "1px"
- , textAlign: "left" // to counter-act "center" alignment!
- , overflow: "hidden" // prevent toggler-button from overflowing
- // SEE $.layout.defaults.zIndexes.resizer_normal
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- background: "#DDD"
- , border: "none"
- }
- }
- , togglers: {
- cssReq: {
- position: "absolute"
- , display: "block"
- , padding: 0
- , margin: 0
- , overflow: "hidden"
- , textAlign: "center"
- , fontSize: "1px"
- , cursor: "pointer"
- , zIndex: 1
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- background: "#AAA"
- }
- }
- , content: {
- cssReq: {
- position: "relative" /* contain floated or positioned elements */
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- overflow: "auto"
- , padding: "10px"
- }
- , cssDemoPane: { // DEMO CSS - REMOVE scrolling from 'pane' when it has a content-div
- overflow: "hidden"
- , padding: 0
- }
- }
- , panes: { // defaults for ALL panes - overridden by 'per-pane settings' below
- cssReq: {
- position: "absolute"
- , margin: 0
- // $.layout.defaults.zIndexes.pane_normal
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- padding: "10px"
- , background: "#FFF"
- , border: "1px solid #BBB"
- , overflow: "auto"
- }
- }
- , north: {
- side: "top"
- , sizeType: "Height"
- , dir: "horz"
- , cssReq: {
- top: 0
- , bottom: "auto"
- , left: 0
- , right: 0
- , width: "auto"
- // height: DYNAMIC
- }
- }
- , south: {
- side: "bottom"
- , sizeType: "Height"
- , dir: "horz"
- , cssReq: {
- top: "auto"
- , bottom: 0
- , left: 0
- , right: 0
- , width: "auto"
- // height: DYNAMIC
- }
- }
- , east: {
- side: "right"
- , sizeType: "Width"
- , dir: "vert"
- , cssReq: {
- left: "auto"
- , right: 0
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- // width: DYNAMIC
- }
- }
- , west: {
- side: "left"
- , sizeType: "Width"
- , dir: "vert"
- , cssReq: {
- left: 0
- , right: "auto"
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- // width: DYNAMIC
- }
- }
- , center: {
- dir: "center"
- , cssReq: {
- left: "auto" // DYNAMIC
- , right: "auto" // DYNAMIC
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- , width: "auto"
- }
- }
- }
-
- // CALLBACK FUNCTION NAMESPACE - used to store reusable callback functions
-, callbacks: {}
-
-, getParentPaneElem: function (el) {
- // must pass either a container or pane element
- var $el = $(el)
- , layout = $el.data("layout") || $el.data("parentLayout");
- if (layout) {
- var $cont = layout.container;
- // see if this container is directly-nested inside an outer-pane
- if ($cont.data("layoutPane")) return $cont;
- var $pane = $cont.closest("."+ $.layout.defaults.panes.paneClass);
- // if a pane was found, return it
- if ($pane.data("layoutPane")) return $pane;
- }
- return null;
- }
-
-, getParentPaneInstance: function (el) {
- // must pass either a container or pane element
- var $pane = $.layout.getParentPaneElem(el);
- return $pane ? $pane.data("layoutPane") : null;
- }
-
-, getParentLayoutInstance: function (el) {
- // must pass either a container or pane element
- var $pane = $.layout.getParentPaneElem(el);
- return $pane ? $pane.data("parentLayout") : null;
- }
-
-, getEventObject: function (evt) {
- return typeof evt === "object" && evt.stopPropagation ? evt : null;
- }
-, parsePaneName: function (evt_or_pane) {
- var evt = $.layout.getEventObject( evt_or_pane )
- , pane = evt_or_pane;
- if (evt) {
- // ALWAYS stop propagation of events triggered in Layout!
- evt.stopPropagation();
- pane = $(this).data("layoutEdge");
- }
- if (pane && !/^(west|east|north|south|center)$/.test(pane)) {
- $.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+ pane +'"');
- pane = "error";
- }
- return pane;
- }
-
-
- // LAYOUT-PLUGIN REGISTRATION
- // more plugins can added beyond this default list
-, plugins: {
- draggable: !!$.fn.draggable // resizing
- , effects: {
- core: !!$.effects // animimations (specific effects tested by initOptions)
- , slide: $.effects && ($.effects.slide || ($.effects.effect && $.effects.effect.slide)) // default effect
- }
- }
-
-// arrays of plugin or other methods to be triggered for events in *each layout* - will be passed 'Instance'
-, onCreate: [] // runs when layout is just starting to be created - right after options are set
-, onLoad: [] // runs after layout container and global events init, but before initPanes is called
-, onReady: [] // runs after initialization *completes* - ie, after initPanes completes successfully
-, onDestroy: [] // runs after layout is destroyed
-, onUnload: [] // runs after layout is destroyed OR when page unloads
-, afterOpen: [] // runs after setAsOpen() completes
-, afterClose: [] // runs after setAsClosed() completes
-
- /*
- * GENERIC UTILITY METHODS
- */
-
- // calculate and return the scrollbar width, as an integer
-, scrollbarWidth: function () { return window.scrollbarWidth || $.layout.getScrollbarSize('width'); }
-, scrollbarHeight: function () { return window.scrollbarHeight || $.layout.getScrollbarSize('height'); }
-, getScrollbarSize: function (dim) {
- var $c = $('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body")
- , d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight };
- $c.remove();
- window.scrollbarWidth = d.width;
- window.scrollbarHeight = d.height;
- return dim.match(/^(width|height)$/) ? d[dim] : d;
- }
-
-
-, disableTextSelection: function () {
- var $d = $(document)
- , s = 'textSelectionDisabled'
- , x = 'textSelectionInitialized'
- ;
- if ($.fn.disableSelection) {
- if (!$d.data(x)) // document hasn't been initialized yet
- $d.on('mouseup', $.layout.enableTextSelection ).data(x, true);
- if (!$d.data(s))
- $d.disableSelection().data(s, true);
- }
- }
-, enableTextSelection: function () {
- var $d = $(document)
- , s = 'textSelectionDisabled';
- if ($.fn.enableSelection && $d.data(s))
- $d.enableSelection().data(s, false);
- }
-
-
- /**
- * Returns hash container 'display' and 'visibility'
- *
- * @see $.swap() - swaps CSS, runs callback, resets CSS
- * @param {!Object} $E jQuery element
- * @param {boolean=} [force=false] Run even if display != none
- * @return {!Object} Returns current style props, if applicable
- */
-, showInvisibly: function ($E, force) {
- if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden*
- var s = $E[0].style
- // save ONLY the 'style' props because that is what we must restore
- , CSS = { display: s.display || '', visibility: s.visibility || '' };
- // show element 'invisibly' so can be measured
- $E.css({ display: "block", visibility: "hidden" });
- return CSS;
- }
- return {};
- }
-
- /**
- * Returns data for setting size of an element (container or a pane).
- *
- * @see _create(), onWindowResize() for container, plus others for pane
- * @return JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
- */
-, getElementDimensions: function ($E, inset) {
- var
- // dimensions hash - start with current data IF passed
- d = { css: {}, inset: {} }
- , x = d.css // CSS hash
- , i = { bottom: 0 } // TEMP insets (bottom = complier hack)
- , N = $.layout.cssNum
- , R = Math.round
- , off = $E.offset()
- , b, p, ei // TEMP border, padding
- ;
- d.offsetLeft = off.left;
- d.offsetTop = off.top;
-
- if (!inset) inset = {}; // simplify logic below
-
- $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { // e = edge
- b = x["border" + e] = $.layout.borderWidth($E, e);
- p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e);
- ei = e.toLowerCase();
- d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any missing insetX value = paddingX
- i[ei] = d.inset[ei] + b; // total offset of content from outer side
- });
-
- x.width = R($E.width());
- x.height = R($E.height());
- x.top = N($E,"top",true);
- x.bottom = N($E,"bottom",true);
- x.left = N($E,"left",true);
- x.right = N($E,"right",true);
-
- d.outerWidth = R($E.outerWidth());
- d.outerHeight = R($E.outerHeight());
- // calc the TRUE inner-dimensions, even in quirks-mode!
- d.innerWidth = max(0, d.outerWidth - i.left - i.right);
- d.innerHeight = max(0, d.outerHeight - i.top - i.bottom);
- // layoutWidth/Height is used in calcs for manual resizing
- // layoutW/H only differs from innerW/H when in quirks-mode - then is like outerW/H
- d.layoutWidth = R($E.innerWidth());
- d.layoutHeight = R($E.innerHeight());
-
- //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG
-
- //d.visible = $E.is(":visible");// && x.width > 0 && x.height > 0;
-
- return d;
- }
-
-, getElementStyles: function ($E, list) {
- var
- CSS = {}
- , style = $E[0].style
- , props = list.split(",")
- , sides = "Top,Bottom,Left,Right".split(",")
- , attrs = "Color,Style,Width".split(",")
- , p, s, a, i, j, k
- ;
- for (i=0; i < props.length; i++) {
- p = props[i];
- if (p.match(/(border|padding|margin)$/))
- for (j=0; j < 4; j++) {
- s = sides[j];
- if (p === "border")
- for (k=0; k < 3; k++) {
- a = attrs[k];
- CSS[p+s+a] = style[p+s+a];
- }
- else
- CSS[p+s] = style[p+s];
- }
- else
- CSS[p] = style[p];
- };
- return CSS
- }
-
- /**
- * Return the innerWidth for the current browser/doctype
- *
- * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {number=} outerWidth (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerWidth of the elem by subtracting padding and borders
- */
-, cssWidth: function ($E, outerWidth) {
- // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
- if (outerWidth <= 0) return 0;
-
- var lb = $.layout.browser
- , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
- , b = $.layout.borderWidth
- , n = $.layout.cssNum
- , W = outerWidth
- ;
- // strip border and/or padding from outerWidth to get CSS Width
- if (bs !== "border-box")
- W -= (b($E, "Left") + b($E, "Right"));
- if (bs === "content-box")
- W -= (n($E, "paddingLeft") + n($E, "paddingRight"));
- return max(0,W);
- }
-
- /**
- * Return the innerHeight for the current browser/doctype
- *
- * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {number=} outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerHeight of the elem by subtracting padding and borders
- */
-, cssHeight: function ($E, outerHeight) {
- // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
- if (outerHeight <= 0) return 0;
-
- var lb = $.layout.browser
- , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
- , b = $.layout.borderWidth
- , n = $.layout.cssNum
- , H = outerHeight
- ;
- // strip border and/or padding from outerHeight to get CSS Height
- if (bs !== "border-box")
- H -= (b($E, "Top") + b($E, "Bottom"));
- if (bs === "content-box")
- H -= (n($E, "paddingTop") + n($E, "paddingBottom"));
- return max(0,H);
- }
-
- /**
- * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist
- *
- * @see Called by many methods
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {string} prop The name of the CSS property, eg: top, width, etc.
- * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0
- * @return {(string|number)} Usually used to get an integer value for position (top, left) or size (height, width)
- */
-, cssNum: function ($E, prop, allowAuto) {
- if (!$E.jquery) $E = $($E);
- var CSS = $.layout.showInvisibly($E)
- , p = $.css($E[0], prop, true)
- , v = allowAuto && p=="auto" ? p : Math.round(parseFloat(p) || 0);
- $E.css( CSS ); // RESET
- return v;
- }
-
-, borderWidth: function (el, side) {
- if (el.jquery) el = el[0];
- var b = "border"+ side.substr(0,1).toUpperCase() + side.substr(1); // left => Left
- return $.css(el, b+"Style", true) === "none" ? 0 : Math.round(parseFloat($.css(el, b+"Width", true)) || 0);
- }
-
- /**
- * Mouse-tracking utility - FUTURE REFERENCE
- *
- * init: if (!window.mouse) {
- * window.mouse = { x: 0, y: 0 };
- * $(document).mousemove( $.layout.trackMouse );
- * }
- *
- * @param {Object} evt
- *
-, trackMouse: function (evt) {
- window.mouse = { x: evt.clientX, y: evt.clientY };
- }
- */
-
- /**
- * SUBROUTINE for preventPrematureSlideClose option
- *
- * @param {Object} evt
- * @param {Object=} el
- */
-, isMouseOverElem: function (evt, el) {
- var
- $E = $(el || this)
- , d = $E.offset()
- , T = d.top
- , L = d.left
- , R = L + $E.outerWidth()
- , B = T + $E.outerHeight()
- , x = evt.pageX // evt.clientX ?
- , y = evt.pageY // evt.clientY ?
- ;
- // if X & Y are < 0, probably means is over an open SELECT
- return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && x <= R) && (y >= T && y <= B));
- }
-
- /**
- * Message/Logging Utility
- *
- * @example $.layout.msg("My message"); // log text
- * @example $.layout.msg("My message", true); // alert text
- * @example $.layout.msg({ foo: "bar" }, "Title"); // log hash-data, with custom title
- * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false }); -OR-
- * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, display: true }); // alert hash-data
- *
- * @param {(Object|string)} info String message OR Hash/Array
- * @param {(Boolean|string|Object)=} [popup=false] True means alert-box - can be skipped
- * @param {(Object|string)=} [debugTitle=""] Title for Hash data - can be skipped
- * @param {Object=} [debugOpts] Extra options for debug output
- */
-, msg: function (info, popup, debugTitle, debugOpts) {
- if ($.isPlainObject(info) && window.debugData) {
- if (typeof popup === "string") {
- debugOpts = debugTitle;
- debugTitle = popup;
- }
- else if (typeof debugTitle === "object") {
- debugOpts = debugTitle;
- debugTitle = null;
- }
- var t = debugTitle || "log( <object> )"
- , o = $.extend({ sort: false, returnHTML: false, display: false }, debugOpts);
- if (popup === true || o.display)
- debugData( info, t, o );
- else if (window.console)
- console.log(debugData( info, t, o ));
- }
- else if (popup)
- alert(info);
- else if (window.console)
- console.log(info);
- else {
- var id = "#layoutLogger"
- , $l = $(id);
- if (!$l.length)
- $l = createLog();
- $l.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+ info.replace(/\</g,"&lt;").replace(/\>/g,"&gt;") +'</li>');
- }
-
- function createLog () {
- var pos = $.support.fixedPosition ? 'fixed' : 'absolute'
- , $e = $('<div id="layoutLogger" style="position: '+ pos +'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);">'
- + '<div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;">'
- + '<span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div>'
- + '<ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>'
- + '</div>'
- ).appendTo("body");
- $e.css('left', $(window).width() - $e.outerWidth() - 5)
- if ($.ui.draggable) $e.draggable({ handle: ':first-child' });
- return $e;
- };
- }
-
-};
-
-
-/*
- * $.layout.browser REPLACES removed $.browser, with extra data
- * Parsing code here adapted from jQuery 1.8 $.browse
- */
-(function(){
- var u = navigator.userAgent.toLowerCase()
- , m = /(chrome)[ \/]([\w.]+)/.exec( u )
- || /(webkit)[ \/]([\w.]+)/.exec( u )
- || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
- || /(msie) ([\w.]+)/.exec( u )
- || u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
- || []
- , b = m[1] || ""
- , v = m[2] || 0
- , ie = b === "msie"
- , cm = document.compatMode
- , $s = $.support
- , bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable
- , bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
- , lb = $.layout.browser = {
- version: v
- , safari: b === "webkit" // webkit (NOT chrome) = safari
- , webkit: b === "chrome" // chrome = webkit
- , msie: ie
- , isIE6: ie && v == 6
- // ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
- , boxModel: bm
- , boxSizing: !!(typeof bs === "function" ? bs() : bs)
- };
- ;
- if (b) lb[b] = true; // set CURRENT browser
- /* OLD versions of jQuery only set $.support.boxModel after page is loaded
- * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
- if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
-})();
-
-
-// DEFAULT OPTIONS
-$.layout.defaults = {
-/*
- * LAYOUT & LAYOUT-CONTAINER OPTIONS
- * - none of these options are applicable to individual panes
- */
- name: "" // Not required, but useful for buttons and used for the state-cookie
-, containerClass: "ui-layout-container" // layout-container element
-, inset: null // custom container-inset values (override padding)
-, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
-, resizeWithWindow: true // bind thisLayout.resizeAll() to the window.resize event
-, resizeWithWindowDelay: 200 // delay calling resizeAll because makes window resizing very jerky
-, resizeWithWindowMaxDelay: 0 // 0 = none - force resize every XX ms while window is being resized
-, maskPanesEarly: false // true = create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart
-, onresizeall_start: null // CALLBACK when resizeAll() STARTS - NOT pane-specific
-, onresizeall_end: null // CALLBACK when resizeAll() ENDS - NOT pane-specific
-, onload_start: null // CALLBACK when Layout inits - after options initialized, but before elements
-, onload_end: null // CALLBACK when Layout inits - after EVERYTHING has been initialized
-, onunload_start: null // CALLBACK when Layout is destroyed OR onWindowUnload
-, onunload_end: null // CALLBACK when Layout is destroyed OR onWindowUnload
-, initPanes: true // false = DO NOT initialize the panes onLoad - will init later
-, showErrorMessages: true // enables fatal error messages to warn developers of common errors
-, showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has_ debugging code!
-// Changing this zIndex value will cause other zIndex values to automatically change
-, zIndex: null // the PANE zIndex - resizers and masks will be +1
-// DO NOT CHANGE the zIndex values below unless you clearly understand their relationships
-, zIndexes: { // set _default_ z-index values here...
- pane_normal: 0 // normal z-index for panes
- , content_mask: 1 // applied to overlays used to mask content INSIDE panes during resizing
- , resizer_normal: 2 // normal z-index for resizer-bars
- , pane_sliding: 100 // applied to *BOTH* the pane and its resizer when a pane is 'slid open'
- , pane_animate: 1000 // applied to the pane when being animated - not applied to the resizer
- , resizer_drag: 10000 // applied to the CLONED resizer-bar when being 'dragged'
- }
-, errors: {
- pane: "pane" // description of "layout pane element" - used only in error messages
- , selector: "selector" // description of "jQuery-selector" - used only in error messages
- , addButtonError: "Error Adding Button\nInvalid "
- , containerMissing: "UI Layout Initialization Error\nThe specified layout-container does not exist."
- , centerPaneMissing: "UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element."
- , noContainerHeight: "UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!"
- , callbackError: "UI Layout Callback Error\nThe EVENT callback is not a valid function."
- }
-/*
- * PANE DEFAULT SETTINGS
- * - settings under the 'panes' key become the default settings for *all panes*
- * - ALL pane-options can also be set specifically for each panes, which will override these 'default values'
- */
-, panes: { // default options for 'all panes' - will be overridden by 'per-pane settings'
- applyDemoStyles: false // NOTE: renamed from applyDefaultStyles for clarity
- , closable: true // pane can open & close
- , resizable: true // when open, pane can be resized
- , slidable: true // when closed, pane can 'slide open' over other panes - closes on mouse-out
- , initClosed: false // true = init pane as 'closed'
- , initHidden: false // true = init pane as 'hidden' - no resizer-bar/spacing
- // SELECTORS
- //, paneSelector: "" // MUST be pane-specific - jQuery selector for pane
- , contentSelector: ".ui-layout-content" // INNER div/element to auto-size so only it scrolls, not the entire pane!
- , contentIgnoreSelector: ".ui-layout-ignore" // element(s) to 'ignore' when measuring 'content'
- , findNestedContent: false // true = $P.find(contentSelector), false = $P.children(contentSelector)
- // GENERIC ROOT-CLASSES - for auto-generated classNames
- , paneClass: "ui-layout-pane" // Layout Pane
- , resizerClass: "ui-layout-resizer" // Resizer Bar
- , togglerClass: "ui-layout-toggler" // Toggler Button
- , buttonClass: "ui-layout-button" // CUSTOM Buttons - eg: '[ui-layout-button]-toggle/-open/-close/-pin'
- // ELEMENT SIZE & SPACING
- //, size: 100 // MUST be pane-specific -initial size of pane
- , minSize: 0 // when manually resizing a pane
- , maxSize: 0 // ditto, 0 = no limit
- , spacing_open: 6 // space between pane and adjacent panes - when pane is 'open'
- , spacing_closed: 6 // ditto - when pane is 'closed'
- , togglerLength_open: 50 // Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west sides
- , togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
- , togglerAlign_open: "center" // top/left, bottom/right, center, OR...
- , togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
- , togglerContent_open: "" // text or HTML to put INSIDE the toggler
- , togglerContent_closed: "" // ditto
- // RESIZING OPTIONS
- , resizerDblClickToggle: true //
- , autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout resizes
- , autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? False = leave it closed
- , resizerDragOpacity: 1 // option for ui.draggable
- //, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
- , maskContents: false // true = add DIV-mask over-or-inside this pane so can 'drag' over IFRAMES
- , maskObjects: false // true = add IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask will overlay this mask
- , maskZindex: null // will override zIndexes.content_mask if specified - not applicable to iframe-panes
- , resizingGrid: false // grid size that the resizers will snap-to during resizing, eg: [20,20]
- , livePaneResizing: false // true = LIVE Resizing as resizer is dragged
- , liveContentResizing: false // true = re-measure header/footer heights as resizer is dragged
- , liveResizingTolerance: 1 // how many px change before pane resizes, to control performance
- // SLIDING OPTIONS
- , sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
- , slideTrigger_open: "click" // click, dblclick, mouseenter
- , slideTrigger_close: "mouseleave"// click, mouseleave
- , slideDelay_open: 300 // applies only for mouseenter event - 0 = instant open
- , slideDelay_close: 300 // applies only for mouseleave event (300ms is the minimum!)
- , hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
- , preventQuickSlideClose: $.layout.browser.webkit // Chrome triggers slideClosed as it is opening
- , preventPrematureSlideClose: false // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
- // PANE-SPECIFIC TIPS & MESSAGES
- , tips: {
- Open: "Open" // eg: "Open Pane"
- , Close: "Close"
- , Resize: "Resize"
- , Slide: "Slide Open"
- , Pin: "Pin"
- , Unpin: "Un-Pin"
- , noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that cannot
- , minSizeWarning: "Panel has reached its minimum size" // displays in browser statusbar
- , maxSizeWarning: "Panel has reached its maximum size" // ditto
- }
- // HOT-KEYS & MISC
- , showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
- , enableCursorHotkey: true // enabled 'cursor' hotkeys
- //, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
- , customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
- // PANE ANIMATION
- // NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not passed
- , fxName: "slide" // ('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 'size'
- , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
- , fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
- , fxOpacityFix: true // tries to fix opacity in IE to restore anti-aliasing after animation
- , animatePaneSizing: false // true = animate resizing after dragging resizer-bar OR sizePane() is called
- /* NOTE: Action-specific FX options are auto-generated from the options above if not specifically set:
- fxName_open: "slide" // 'Open' pane animation
- fnName_close: "slide" // 'Close' pane animation
- fxName_size: "slide" // 'Size' pane animation - when animatePaneSizing = true
- fxSpeed_open: null
- fxSpeed_close: null
- fxSpeed_size: null
- fxSettings_open: {}
- fxSettings_close: {}
- fxSettings_size: {}
- */
- // CHILD/NESTED LAYOUTS
- , children: null // Layout-options for nested/child layout - even {} is valid as options
- , containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can have more than one child layout!)
- , initChildren: true // true = child layout will be created as soon as _this_ layout completes initialization
- , destroyChildren: true // true = destroy child-layout if this pane is destroyed
- , resizeChildren: true // true = trigger child-layout.resizeAll() when this pane is resized
- // EVENT TRIGGERING
- , triggerEventsOnLoad: false // true = trigger onopen OR onclose callbacks when layout initializes
- , triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneResizing==true
- // PANE CALLBACKS
- , onshow_start: null // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
- , onshow_end: null // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
- , onhide_start: null // CALLBACK when pane STARTS to Close - BEFORE onclose_start
- , onhide_end: null // CALLBACK when pane ENDS being Closed - AFTER onclose_end
- , onopen_start: null // CALLBACK when pane STARTS to Open
- , onopen_end: null // CALLBACK when pane ENDS being Opened
- , onclose_start: null // CALLBACK when pane STARTS to Close
- , onclose_end: null // CALLBACK when pane ENDS being Closed
- , onresize_start: null // CALLBACK when pane STARTS being Resized ***FOR ANY REASON***
- , onresize_end: null // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
- , onsizecontent_start: null // CALLBACK when sizing of content-element STARTS
- , onsizecontent_end: null // CALLBACK when sizing of content-element ENDS
- , onswap_start: null // CALLBACK when pane STARTS to Swap
- , onswap_end: null // CALLBACK when pane ENDS being Swapped
- , ondrag_start: null // CALLBACK when pane STARTS being ***MANUALLY*** Resized
- , ondrag_end: null // CALLBACK when pane ENDS being ***MANUALLY*** Resized
- }
-/*
- * PANE-SPECIFIC SETTINGS
- * - options listed below MUST be specified per-pane - they CANNOT be set under 'panes'
- * - all options under the 'panes' key can also be set specifically for any pane
- * - most options under the 'panes' key apply only to 'border-panes' - NOT the the center-pane
- */
-, north: {
- paneSelector: ".ui-layout-north"
- , size: "auto" // eg: "auto", "30%", .30, 200
- , resizerCursor: "n-resize" // custom = url(myCursor.cur)
- , customHotkey: "" // EITHER a charCode (43) OR a character ("o")
- }
-, south: {
- paneSelector: ".ui-layout-south"
- , size: "50%"//"auto"
- , resizerCursor: "s-resize"
- , customHotkey: ""
- , initClosed: true
- }
-, east: {
- paneSelector: ".ui-layout-east"
- , size: "5%"//200
- , resizerCursor: "e-resize"
- , customHotkey: ""
- }
-, west: {
- paneSelector: ".ui-layout-west"
- , size: "70%" //200
- , resizerCursor: "w-resize"
- , customHotkey: ""
- , initClosed: true
- }
-, center: {
- paneSelector: ".ui-layout-center"
- , size: "30%"//"auto"
- , minWidth: 0
- , minHeight: 0
- }
-};
-
-$.layout.optionsMap = {
- // layout/global options - NOT pane-options
- layout: ("name,instanceKey,stateManagement,effects,inset,zIndexes,errors,"
- + "zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,"
- + "outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,"
- + "onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",")
-// borderPanes: [ ALL options that are NOT specified as 'layout' ]
- // default.panes options that apply to the center-pane (most options apply _only_ to border-panes)
-, center: ("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,"
- + "showOverflowOnHover,maskContents,maskObjects,liveContentResizing,"
- + "containerSelector,children,initChildren,resizeChildren,destroyChildren,"
- + "onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",")
- // options that MUST be specifically set 'per-pane' - CANNOT set in the panes (defaults) key
-, noDefault: ("paneSelector,resizerCursor,customHotkey").split(",")
-};
-
-/**
- * Processes options passed in converts flat-format data into subkey (JSON) format
- * In flat-format, subkeys are _currently_ separated with 2 underscores, like north__optName
- * Plugins may also call this method so they can transform their own data
- *
- * @param {!Object} hash Data/options passed by user - may be a single level or nested levels
- * @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do not exist?
- * @return {Object} Returns hash of minWidth & minHeight
- */
-$.layout.transformData = function (hash, addKeys) {
- var json = addKeys ? { panes: {}, center: {} } : {} // init return object
- , branch, optKey, keys, key, val, i, c;
-
- if (typeof hash !== "object") return json; // no options passed
-
- // convert all 'flat-keys' to 'sub-key' format
- for (optKey in hash) {
- branch = json;
- val = hash[ optKey ];
- keys = optKey.split("__"); // eg: west__size or north__fxSettings__duration
- c = keys.length - 1;
- // convert underscore-delimited to subkeys
- for (i=0; i <= c; i++) {
- key = keys[i];
- if (i === c) { // last key = value
- if ($.isPlainObject( val ))
- branch[key] = $.layout.transformData( val ); // RECURSE
- else
- branch[key] = val;
- }
- else {
- if (!branch[key])
- branch[key] = {}; // create the subkey
- // recurse to sub-key for next loop - if not done
- branch = branch[key];
- }
- }
- }
- return json;
-};
-
-// INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
-$.layout.backwardCompatibility = {
- // data used by renameOldOptions()
- map: {
- // OLD Option Name: NEW Option Name
- applyDefaultStyles: "applyDemoStyles"
- // CHILD/NESTED LAYOUTS
- , childOptions: "children"
- , initChildLayout: "initChildren"
- , destroyChildLayout: "destroyChildren"
- , resizeChildLayout: "resizeChildren"
- , resizeNestedLayout: "resizeChildren"
- // MISC Options
- , resizeWhileDragging: "livePaneResizing"
- , resizeContentWhileDragging: "liveContentResizing"
- , triggerEventsWhileDragging: "triggerEventsDuringLiveResize"
- , maskIframesOnResize: "maskContents"
- // STATE MANAGEMENT
- , useStateCookie: "stateManagement.enabled"
- , "cookie.autoLoad": "stateManagement.autoLoad"
- , "cookie.autoSave": "stateManagement.autoSave"
- , "cookie.keys": "stateManagement.stateKeys"
- , "cookie.name": "stateManagement.cookie.name"
- , "cookie.domain": "stateManagement.cookie.domain"
- , "cookie.path": "stateManagement.cookie.path"
- , "cookie.expires": "stateManagement.cookie.expires"
- , "cookie.secure": "stateManagement.cookie.secure"
- // OLD Language options
- , noRoomToOpenTip: "tips.noRoomToOpen"
- , togglerTip_open: "tips.Close" // open = Close
- , togglerTip_closed: "tips.Open" // closed = Open
- , resizerTip: "tips.Resize"
- , sliderTip: "tips.Slide"
- }
-
-/**
-* @param {Object} opts
-*/
-, renameOptions: function (opts) {
- var map = $.layout.backwardCompatibility.map
- , oldData, newData, value
- ;
- for (var itemPath in map) {
- oldData = getBranch( itemPath );
- value = oldData.branch[ oldData.key ];
- if (value !== undefined) {
- newData = getBranch( map[itemPath], true );
- newData.branch[ newData.key ] = value;
- delete oldData.branch[ oldData.key ];
- }
- }
-
- /**
- * @param {string} path
- * @param {boolean=} [create=false] Create path if does not exist
- */
- function getBranch (path, create) {
- var a = path.split(".") // split keys into array
- , c = a.length - 1
- , D = { branch: opts, key: a[c] } // init branch at top & set key (last item)
- , i = 0, k, undef;
- for (; i<c; i++) { // skip the last key (data)
- k = a[i];
- if (D.branch[ k ] == undefined) { // child-key does not exist
- if (create) {
- D.branch = D.branch[ k ] = {}; // create child-branch
- }
- else // can't go any farther
- D.branch = {}; // branch is undefined
- }
- else
- D.branch = D.branch[ k ]; // get child-branch
- }
- return D;
- };
- }
-
-/**
-* @param {Object} opts
-*/
-, renameAllOptions: function (opts) {
- var ren = $.layout.backwardCompatibility.renameOptions;
- // rename root (layout) options
- ren( opts );
- // rename 'defaults' to 'panes'
- if (opts.defaults) {
- if (typeof opts.panes !== "object")
- opts.panes = {};
- $.extend(true, opts.panes, opts.defaults);
- delete opts.defaults;
- }
- // rename options in the the options.panes key
- if (opts.panes) ren( opts.panes );
- // rename options inside *each pane key*, eg: options.west
- $.each($.layout.config.allPanes, function (i, pane) {
- if (opts[pane]) ren( opts[pane] );
- });
- return opts;
- }
-};
-
-
-
-
-/* ============================================================
- * BEGIN WIDGET: $( selector ).layout( {options} );
- * ============================================================
- */
-$.fn.layout = function (opts) {
- var
-
- // local aliases to global data
- browser = $.layout.browser
-, _c = $.layout.config
-
- // local aliases to utlity methods
-, cssW = $.layout.cssWidth
-, cssH = $.layout.cssHeight
-, elDims = $.layout.getElementDimensions
-, styles = $.layout.getElementStyles
-, evtObj = $.layout.getEventObject
-, evtPane = $.layout.parsePaneName
-
-/**
- * options - populated by initOptions()
- */
-, options = $.extend(true, {}, $.layout.defaults)
-, effects = options.effects = $.extend(true, {}, $.layout.effects)
-
-/**
- * layout-state object
- */
-, state = {
- // generate unique ID to use for event.namespace so can unbind only events added by 'this layout'
- id: "layout"+ $.now() // code uses alias: sID
- , initialized: false
- , paneResizing: false
- , panesSliding: {}
- , container: { // list all keys referenced in code to avoid compiler error msgs
- innerWidth: 0
- , innerHeight: 0
- , outerWidth: 0
- , outerHeight: 0
- , layoutWidth: 0
- , layoutHeight: 0
- }
- , north: { childIdx: 0 }
- , south: { childIdx: 0 }
- , east: { childIdx: 0 }
- , west: { childIdx: 0 }
- , center: { childIdx: 0 }
- }
-
-/**
- * parent/child-layout pointers
- */
-//, hasParentLayout = false - exists ONLY inside Instance so can be set externally
-, children = {
- north: null
- , south: null
- , east: null
- , west: null
- , center: null
- }
-
-/*
- * ###########################
- * INTERNAL HELPER FUNCTIONS
- * ###########################
- */
-
- /**
- * Manages all internal timers
- */
-, timer = {
- data: {}
- , set: function (s, fn, ms) { timer.clear(s); timer.data[s] = setTimeout(fn, ms); }
- , clear: function (s) { var t=timer.data; if (t[s]) {clearTimeout(t[s]); delete t[s];} }
- }
-
- /**
- * Alert or console.log a message - IF option is enabled.
- *
- * @param {(string|!Object)} msg Message (or debug-data) to display
- * @param {boolean=} [popup=false] True by default, means 'alert', false means use console.log
- * @param {boolean=} [debug=false] True means is a widget debugging message
- */
-, _log = function (msg, popup, debug) {
- var o = options;
- if ((o.showErrorMessages && !debug) || (debug && o.showDebugMessages))
- $.layout.msg( o.name +' / '+ msg, (popup !== false) );
- return false;
- }
-
- /**
- * Executes a Callback function after a trigger event, like resize, open or close
- *
- * @param {string} evtName Name of the layout callback, eg "onresize_start"
- * @param {(string|boolean)=} [pane=""] This is passed only so we can pass the 'pane object' to the callback
- * @param {(string|boolean)=} [skipBoundEvents=false] True = do not run events bound to the elements - only the callbacks set in options
- */
-, _runCallbacks = function (evtName, pane, skipBoundEvents) {
- var hasPane = pane && isStr(pane)
- , s = hasPane ? state[pane] : state
- , o = hasPane ? options[pane] : options
- , lName = options.name
- // names like onopen and onopen_end separate are interchangeable in options...
- , lng = evtName + (evtName.match(/_/) ? "" : "_end")
- , shrt = lng.match(/_end$/) ? lng.substr(0, lng.length - 4) : ""
- , fn = o[lng] || o[shrt]
- , retVal = "NC" // NC = No Callback
- , args = []
- , $P = hasPane ? $Ps[pane] : 0
- ;
- if (hasPane && !$P) // a pane is specified, but does not exist!
- return retVal;
- if ( !hasPane && $.type(pane) === "boolean" ) {
- skipBoundEvents = pane; // allow pane param to be skipped for Layout callback
- pane = "";
- }
-
- // first trigger the callback set in the options
- if (fn) {
- try {
- // convert function name (string) to function object
- if (isStr( fn )) {
- if (fn.match(/,/)) {
- // function name cannot contain a comma,
- // so must be a function name AND a parameter to pass
- args = fn.split(",")
- , fn = eval(args[0]);
- }
- else // just the name of an external function?
- fn = eval(fn);
- }
- // execute the callback, if exists
- if ($.isFunction( fn )) {
- if (args.length)
- retVal = g(fn)(args[1]); // pass the argument parsed from 'list'
- else if ( hasPane )
- // pass data: pane-name, pane-element, pane-state, pane-options, and layout-name
- retVal = g(fn)( pane, $Ps[pane], s, o, lName );
- else // must be a layout/container callback - pass suitable info
- retVal = g(fn)( Instance, s, o, lName );
- }
- }
- catch (ex) {
- _log( options.errors.callbackError.replace(/EVENT/, $.trim((pane || "") +" "+ lng)), false );
- if ($.type(ex) === "string" && string.length)
- _log("Exception: "+ ex, false );
- }
- }
-
- // trigger additional events bound directly to the pane
- if (!skipBoundEvents && retVal !== false) {
- if ( hasPane ) { // PANE events can be bound to each pane-elements
- o = options[pane];
- s = state[pane];
- $P.triggerHandler("layoutpane"+ lng, [ pane, $P, s, o, lName ]);
- if (shrt)
- $P.triggerHandler("layoutpane"+ shrt, [ pane, $P, s, o, lName ]);
- }
- else { // LAYOUT events can be bound to the container-element
- $N.triggerHandler("layout"+ lng, [ Instance, s, o, lName ]);
- if (shrt)
- $N.triggerHandler("layout"+ shrt, [ Instance, s, o, lName ]);
- }
- }
-
- // ALWAYS resizeChildren after an onresize_end event - even during initialization
- // IGNORE onsizecontent_end event because causes child-layouts to resize TWICE
- if (hasPane && evtName === "onresize_end") // BAD: || evtName === "onsizecontent_end"
- resizeChildren(pane+"", true); // compiler hack -force string
-
- return retVal;
-
- function g (f) { return f; }; // compiler hack
- }
-
-
- /**
- * cure iframe display issues in IE & other browsers
- */
-, _fixIframe = function (pane) {
- if (browser.mozilla) return; // skip FireFox - it auto-refreshes iframes onShow
- var $P = $Ps[pane];
- // if the 'pane' is an iframe, do it
- if (state[pane].tagName === "IFRAME")
- $P.css(_c.hidden).css(_c.visible);
- else // ditto for any iframes INSIDE the pane
- $P.find('IFRAME').css(_c.hidden).css(_c.visible);
- }
-
- /**
- * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
- * @param {number=} outerSize (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerHeight/Width of el by subtracting padding and borders
- */
-, cssSize = function (pane, outerSize) {
- var fn = _c[pane].dir=="horz" ? cssH : cssW;
- return fn($Ps[pane], outerSize);
- }
-
- /**
- * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
- * @return {Object} Returns hash of minWidth & minHeight
- */
-, cssMinDims = function (pane) {
- // minWidth/Height means CSS width/height = 1px
- var $P = $Ps[pane]
- , dir = _c[pane].dir
- , d = {
- minWidth: 1001 - cssW($P, 1000)
- , minHeight: 1001 - cssH($P, 1000)
- }
- ;
- if (dir === "horz") d.minSize = d.minHeight;
- if (dir === "vert") d.minSize = d.minWidth;
- return d;
- }
-
- // TODO: see if these methods can be made more useful...
- // TODO: *maybe* return cssW/H from these so caller can use this info
-
- /**
- * @param {(string|!Object)} el
- * @param {number=} outerWidth
- * @param {boolean=} [autoHide=false]
- */
-, setOuterWidth = function (el, outerWidth, autoHide) {
- var $E = el, w;
- if (isStr(el)) $E = $Ps[el]; // west
- else if (!el.jquery) $E = $(el);
- w = cssW($E, outerWidth);
- $E.css({ width: w });
- if (w > 0) {
- if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) {
- $E.show().data('autoHidden', false);
- if (!browser.mozilla) // FireFox refreshes iframes - IE does not
- // make hidden, then visible to 'refresh' display after animation
- $E.css(_c.hidden).css(_c.visible);
- }
- }
- else if (autoHide && !$E.data('autoHidden'))
- $E.hide().data('autoHidden', true);
- }
-
- /**
- * @param {(string|!Object)} el
- * @param {number=} outerHeight
- * @param {boolean=} [autoHide=false]
- */
-, setOuterHeight = function (el, outerHeight, autoHide) {
- var $E = el, h;
- if (isStr(el)) $E = $Ps[el]; // west
- else if (!el.jquery) $E = $(el);
- h = cssH($E, outerHeight);
- $E.css({ height: h, visibility: "visible" }); // may have been 'hidden' by sizeContent
- if (h > 0 && $E.innerWidth() > 0) {
- if (autoHide && $E.data('autoHidden')) {
- $E.show().data('autoHidden', false);
- if (!browser.mozilla) // FireFox refreshes iframes - IE does not
- $E.css(_c.hidden).css(_c.visible);
- }
- }
- else if (autoHide && !$E.data('autoHidden'))
- $E.hide().data('autoHidden', true);
- }
-
-
- /**
- * Converts any 'size' params to a pixel/integer size, if not already
- * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated
- *
- /**
- * @param {string} pane
- * @param {(string|number)=} size
- * @param {string=} [dir]
- * @return {number}
- */
-, _parseSize = function (pane, size, dir) {
- if (!dir) dir = _c[pane].dir;
-
- if (isStr(size) && size.match(/%/))
- size = (size === '100%') ? -1 : parseInt(size, 10) / 100; // convert % to decimal
-
- if (size === 0)
- return 0;
- else if (size >= 1)
- return parseInt(size, 10);
-
- var o = options, avail = 0;
- if (dir=="horz") // north or south or center.minHeight
- avail = sC.innerHeight - ($Ps.north ? o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0);
- else if (dir=="vert") // east or west or center.minWidth
- avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open : 0) - ($Ps.east ? o.east.spacing_open : 0);
-
- if (size === -1) // -1 == 100%
- return avail;
- else if (size > 0) // percentage, eg: .25
- return round(avail * size);
- else if (pane=="center")
- return 0;
- else { // size < 0 || size=='auto' || size==Missing || size==Invalid
- // auto-size the pane
- var dim = (dir === "horz" ? "height" : "width")
- , $P = $Ps[pane]
- , $C = dim === 'height' ? $Cs[pane] : false
- , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden
- , szP = $P.css(dim) // SAVE current pane size
- , szC = $C ? $C.css(dim) : 0 // SAVE current content size
- ;
- $P.css(dim, "auto");
- if ($C) $C.css(dim, "auto");
- size = (dim === "height") ? $P.outerHeight() : $P.outerWidth(); // MEASURE
- $P.css(dim, szP).css(vis); // RESET size & visibility
- if ($C) $C.css(dim, szC);
- return size;
- }
- }
-
- /**
- * Calculates current 'size' (outer-width or outer-height) of a border-pane - optionally with 'pane-spacing' added
- *
- * @param {(string|!Object)} pane
- * @param {boolean=} [inclSpace=false]
- * @return {number} Returns EITHER Width for east/west panes OR Height for north/south panes
- */
-, getPaneSize = function (pane, inclSpace) {
- var
- $P = $Ps[pane]
- , o = options[pane]
- , s = state[pane]
- , oSp = (inclSpace ? o.spacing_open : 0)
- , cSp = (inclSpace ? o.spacing_closed : 0)
- ;
- if (!$P || s.isHidden)
- return 0;
- else if (s.isClosed || (s.isSliding && inclSpace))
- return cSp;
- else if (_c[pane].dir === "horz")
- return $P.outerHeight() + oSp;
- else // dir === "vert"
- return $P.outerWidth() + oSp;
- }
-
- /**
- * Calculate min/max pane dimensions and limits for resizing
- *
- * @param {string} pane
- * @param {boolean=} [slide=false]
- */
-, setSizeLimits = function (pane, slide) {
- if (!isInitialized()) return;
- var
- o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , dir = c.dir
- , type = c.sizeType.toLowerCase()
- , isSliding = (slide != undefined ? slide : s.isSliding) // only open() passes 'slide' param
- , $P = $Ps[pane]
- , paneSpacing = o.spacing_open
- // measure the pane on the *opposite side* from this pane
- , altPane = _c.oppositeEdge[pane]
- , altS = state[altPane]
- , $altP = $Ps[altPane]
- , altPaneSize = (!$altP || altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? $altP.outerHeight() : $altP.outerWidth()))
- , altPaneSpacing = ((!$altP || altS.isHidden ? 0 : options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" ]) || 0)
- // limitSize prevents this pane from 'overlapping' opposite pane
- , containerSize = (dir=="horz" ? sC.innerHeight : sC.innerWidth)
- , minCenterDims = cssMinDims("center")
- , minCenterSize = dir=="horz" ? max(options.center.minHeight, minCenterDims.minHeight) : max(options.center.minWidth, minCenterDims.minWidth)
- // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them
- , limitSize = (containerSize - paneSpacing - (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + altPaneSpacing)))
- , minSize = s.minSize = max( _parseSize(pane, o.minSize), cssMinDims(pane).minSize )
- , maxSize = s.maxSize = min( (o.maxSize ? _parseSize(pane, o.maxSize) : 100000), limitSize )
- , r = s.resizerPosition = {} // used to set resizing limits
- , top = sC.inset.top
- , left = sC.inset.left
- , W = sC.innerWidth
- , H = sC.innerHeight
- , rW = o.spacing_open // subtract resizer-width to get top/left position for south/east
- ;
- switch (pane) {
- case "north": r.min = top + minSize;
- r.max = top + maxSize;
- break;
- case "west": r.min = left + minSize;
- r.max = left + maxSize;
- break;
- case "south": r.min = top + H - maxSize - rW;
- r.max = top + H - minSize - rW;
- break;
- case "east": r.min = left + W - maxSize - rW;
- r.max = left + W - minSize - rW;
- break;
- };
- }
-
- /**
- * Returns data for setting the size/position of center pane. Also used to set Height for east/west panes
- *
- * @return JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
- */
-, calcNewCenterPaneDims = function () {
- var d = {
- top: getPaneSize("north", true) // true = include 'spacing' value for pane
- , bottom: getPaneSize("south", true)
- , left: getPaneSize("west", true)
- , right: getPaneSize("east", true)
- , width: 0
- , height: 0
- };
-
- // NOTE: sC = state.container
- // calc center-pane outer dimensions
- d.width = sC.innerWidth - d.left - d.right; // outerWidth
- d.height = sC.innerHeight - d.bottom - d.top; // outerHeight
- // add the 'container border/padding' to get final positions relative to the container
- d.top += sC.inset.top;
- d.bottom += sC.inset.bottom;
- d.left += sC.inset.left;
- d.right += sC.inset.right;
-
- return d;
- }
-
-
- /**
- * @param {!Object} el
- * @param {boolean=} [allStates=false]
- */
-, getHoverClasses = function (el, allStates) {
- var
- $El = $(el)
- , type = $El.data("layoutRole")
- , pane = $El.data("layoutEdge")
- , o = options[pane]
- , root = o[type +"Class"]
- , _pane = "-"+ pane // eg: "-west"
- , _open = "-open"
- , _closed = "-closed"
- , _slide = "-sliding"
- , _hover = "-hover " // NOTE the trailing space
- , _state = $El.hasClass(root+_closed) ? _closed : _open
- , _alt = _state === _closed ? _open : _closed
- , classes = (root+_hover) + (root+_pane+_hover) + (root+_state+_hover) + (root+_pane+_state+_hover)
- ;
- if (allStates) // when 'removing' classes, also remove alternate-state classes
- classes += (root+_alt+_hover) + (root+_pane+_alt+_hover);
-
- if (type=="resizer" && $El.hasClass(root+_slide))
- classes += (root+_slide+_hover) + (root+_pane+_slide+_hover);
-
- return $.trim(classes);
- }
-, addHover = function (evt, el) {
- var $E = $(el || this);
- if (evt && $E.data("layoutRole") === "toggler")
- evt.stopPropagation(); // prevent triggering 'slide' on Resizer-bar
- $E.addClass( getHoverClasses($E) );
- }
-, removeHover = function (evt, el) {
- var $E = $(el || this);
- $E.removeClass( getHoverClasses($E, true) );
- }
-
-, onResizerEnter = function (evt) { // ALSO called by toggler.mouseenter
- var pane = $(this).data("layoutEdge")
- , s = state[pane]
- , $d = $(document)
- ;
- // ignore closed-panes and mouse moving back & forth over resizer!
- // also ignore if ANY pane is currently resizing
- if ( s.isResizing || state.paneResizing ) return;
-
- if (options.maskPanesEarly)
- showMasks( pane, { resizing: true });
- }
-, onResizerLeave = function (evt, el) {
- var e = el || this // el is only passed when called by the timer
- , pane = $(e).data("layoutEdge")
- , name = pane +"ResizerLeave"
- , $d = $(document)
- ;
- timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set
- timer.clear(name); // cancel enableSelection timer - may re/set below
- // this method calls itself on a timer because it needs to allow
- // enough time for dragging to kick-in and set the isResizing flag
- // dragging has a 100ms delay set, so this delay must be >100
- if (!el) // 1st call - mouseleave event
- timer.set(name, function(){ onResizerLeave(evt, e); }, 200);
- // if user is resizing, dragStop will reset everything, so skip it here
- else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer
- hideMasks();
- }
-
-/*
- * ###########################
- * INITIALIZATION METHODS
- * ###########################
- */
-
- /**
- * Initialize the layout - called automatically whenever an instance of layout is created
- *
- * @see none - triggered onInit
- * @return mixed true = fully initialized | false = panes not initialized (yet) | 'cancel' = abort
- */
-, _create = function () {
- // initialize config/options
- initOptions();
- var o = options
- , s = state;
-
- // TEMP state so isInitialized returns true during init process
- s.creatingLayout = true;
-
- // init plugins for this layout, if there are any (eg: stateManagement)
- runPluginCallbacks( Instance, $.layout.onCreate );
-
- // options & state have been initialized, so now run beforeLoad callback
- // onload will CANCEL layout creation if it returns false
- if (false === _runCallbacks("onload_start"))
- return 'cancel';
-
- // initialize the container element
- _initContainer();
-
- // bind hotkey function - keyDown - if required
- initHotkeys();
-
- // bind window.onunload
- $(window).bind("unload."+ sID, unload);
-
- // init plugins for this layout, if there are any (eg: customButtons)
- runPluginCallbacks( Instance, $.layout.onLoad );
-
- // if layout elements are hidden, then layout WILL NOT complete initialization!
- // initLayoutElements will set initialized=true and run the onload callback IF successful
- if (o.initPanes) _initLayoutElements();
-
- delete s.creatingLayout;
-
- return state.initialized;
- }
-
- /**
- * Initialize the layout IF not already
- *
- * @see All methods in Instance run this test
- * @return boolean true = layoutElements have been initialized | false = panes are not initialized (yet)
- */
-, isInitialized = function () {
- if (state.initialized || state.creatingLayout) return true; // already initialized
- else return _initLayoutElements(); // try to init panes NOW
- }
-
- /**
- * Initialize the layout - called automatically whenever an instance of layout is created
- *
- * @see _create() & isInitialized
- * @param {boolean=} [retry=false] // indicates this is a 2nd try
- * @return An object pointer to the instance created
- */
-, _initLayoutElements = function (retry) {
- // initialize config/options
- var o = options;
- // CANNOT init panes inside a hidden container!
- if (!$N.is(":visible")) {
- // handle Chrome bug where popup window 'has no height'
- // if layout is BODY element, try again in 50ms
- // SEE: http://layout.jquery-dev.com/samples/test_popup_window.html
- if ( !retry && browser.webkit && $N[0].tagName === "BODY" )
- setTimeout(function(){ _initLayoutElements(true); }, 50);
- return false;
- }
-
- // a center pane is required, so make sure it exists
- if (!getPane("center").length) {
- return _log( o.errors.centerPaneMissing );
- }
-
- // TEMP state so isInitialized returns true during init process
- state.creatingLayout = true;
-
- // update Container dims
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
-
- // initialize all layout elements
- initPanes(); // size & position panes - calls initHandles() - which calls initResizable()
-
- if (o.scrollToBookmarkOnLoad) {
- var l = self.location;
- if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
- }
-
- // check to see if this layout 'nested' inside a pane
- if (Instance.hasParentLayout)
- o.resizeWithWindow = false;
- // bind resizeAll() for 'this layout instance' to window.resize event
- else if (o.resizeWithWindow)
- $(window).bind("resize."+ sID, windowResize);
-
- delete state.creatingLayout;
- state.initialized = true;
-
- // init plugins for this layout, if there are any
- runPluginCallbacks( Instance, $.layout.onReady );
-
- // now run the onload callback, if exists
- _runCallbacks("onload_end");
-
- return true; // elements initialized successfully
- }
-
- /**
- * Initialize nested layouts for a specific pane - can optionally pass layout-options
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children
- * @return An object pointer to the layout instance created - or null
- */
-, createChildren = function (evt_or_pane, opts) {
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- ;
- if (!$P) return;
- var $C = $Cs[pane]
- , s = state[pane]
- , o = options[pane]
- , sm = options.stateManagement || {}
- , cos = opts ? (o.children = opts) : o.children
- ;
- if ( $.isPlainObject( cos ) )
- cos = [ cos ]; // convert a hash to a 1-elem array
- else if (!cos || !$.isArray( cos ))
- return;
-
- $.each( cos, function (idx, co) {
- if ( !$.isPlainObject( co ) ) return;
-
- // determine which element is supposed to be the 'child container'
- // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane
- var $containers = co.containerSelector ? $P.find( co.containerSelector ) : ($C || $P);
-
- $containers.each(function(){
- var $cont = $(this)
- , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element
- ;
- // if no layout exists, but children are set, try to create the layout now
- if (!child) {
- // TODO: see about moving this to the stateManagement plugin, as a method
- // set a unique child-instance key for this layout, if not already set
- setInstanceKey({ container: $cont, options: co }, s );
- // If THIS layout has a hash in stateManagement.autoLoad,
- // then see if it also contains state-data for this child-layout
- // If so, copy the stateData to child.options.stateManagement.autoLoad
- if ( sm.includeChildren && state.stateData[pane] ) {
- // THIS layout's state was cached when its state was loaded
- var paneChildren = state.stateData[pane].children || {}
- , childState = paneChildren[ co.instanceKey ]
- , co_sm = co.stateManagement || (co.stateManagement = { autoLoad: true })
- ;
- // COPY the stateData into the autoLoad key
- if ( co_sm.autoLoad === true && childState ) {
- co_sm.autoSave = false; // disable autoSave because saving handled by parent-layout
- co_sm.includeChildren = true; // cascade option - FOR NOW
- co_sm.autoLoad = $.extend(true, {}, childState); // COPY the state-hash
- }
- }
-
- // create the layout
- child = $cont.layout( co );
-
- // if successful, update data
- if (child) {
- // add the child and update all layout-pointers
- // MAY have already been done by child-layout calling parent.refreshChildren()
- refreshChildren( pane, child );
- }
- }
- });
- });
- }
-
-, setInstanceKey = function (child, parentPaneState) {
- // create a named key for use in state and instance branches
- var $c = child.container
- , o = child.options
- , sm = o.stateManagement
- , key = o.instanceKey || $c.data("layoutInstanceKey")
- ;
- if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key
- if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one
- else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); // ensure is valid as a hash key
- o.instanceKey = key;
- $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated
- return key;
- }
-
- /**
- * @param {string} pane The pane being opened, ie: north, south, east, or west
- * @param {Object=} newChild New child-layout Instance to add to this pane
- */
-, refreshChildren = function (pane, newChild) {
- var $P = $Ps[pane]
- , pC = children[pane]
- , s = state[pane]
- , o
- ;
- // check for destroy()ed layouts and update the child pointers & arrays
- if ($.isPlainObject( pC )) {
- $.each( pC, function (key, child) {
- if (child.destroyed) delete pC[key]
- });
- // if no more children, remove the children hash
- if ($.isEmptyObject( pC ))
- pC = children[pane] = null; // clear children hash
- }
-
- // see if there is a directly-nested layout inside this pane
- // if there is, then there can be only ONE child-layout, so check that...
- if (!newChild && !pC) {
- newChild = $P.data("layout");
- }
-
- // if a newChild instance was passed, add it to children[pane]
- if (newChild) {
- // update child.state
- newChild.hasParentLayout = true; // set parent-flag in child
- // instanceKey is a key-name used in both state and children
- o = newChild.options;
- // set a unique child-instance key for this layout, if not already set
- setInstanceKey( newChild, s );
- // add pointer to pane.children hash
- if (!pC) pC = children[pane] = {}; // create an empty children hash
- pC[ o.instanceKey ] = newChild.container.data("layout"); // add childLayout instance
- }
-
- // ALWAYS refresh the pane.children alias, even if null
- Instance[pane].children = children[pane];
-
- // if newChild was NOT passed - see if there is a child layout NOW
- if (!newChild) {
- createChildren(pane); // MAY create a child and re-call this method
- }
- }
-
-, windowResize = function () {
- var o = options
- , delay = Number(o.resizeWithWindowDelay);
- if (delay < 10) delay = 100; // MUST have a delay!
- // resizing uses a delay-loop because the resize event fires repeatly - except in FF, but delay anyway
- timer.clear("winResize"); // if already running
- timer.set("winResize", function(){
- timer.clear("winResize");
- timer.clear("winResizeRepeater");
- var dims = elDims( $N, o.inset );
- // only trigger resizeAll() if container has changed size
- if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight)
- resizeAll();
- }, delay);
- // ALSO set fixed-delay timer, if not already running
- if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
- }
-
-, setWindowResizeRepeater = function () {
- var delay = Number(options.resizeWithWindowMaxDelay);
- if (delay > 0)
- timer.set("winResizeRepeater", function(){ setWindowResizeRepeater(); resizeAll(); }, delay);
- }
-
-, unload = function () {
- var o = options;
-
- _runCallbacks("onunload_start");
-
- // trigger plugin callabacks for this layout (eg: stateManagement)
- runPluginCallbacks( Instance, $.layout.onUnload );
-
- _runCallbacks("onunload_end");
- }
-
- /**
- * Validate and initialize container CSS and events
- *
- * @see _create()
- */
-, _initContainer = function () {
- var
- N = $N[0]
- , $H = $("html")
- , tag = sC.tagName = N.tagName
- , id = sC.id = N.id
- , cls = sC.className = N.className
- , o = options
- , name = o.name
- , props = "position,margin,padding,border"
- , css = "layoutCSS"
- , CSS = {}
- , hid = "hidden" // used A LOT!
- // see if this container is a 'pane' inside an outer-layout
- , parent = $N.data("parentLayout") // parent-layout Instance
- , pane = $N.data("layoutEdge") // pane-name in parent-layout
- , isChild = parent && pane
- , num = $.layout.cssNum
- , $parent, n
- ;
- // sC = state.container
- sC.selector = $N.selector.split(".slice")[0];
- sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
- sC.isBody = (tag === "BODY");
-
- // try to find a parent-layout
- if (!isChild && !sC.isBody) {
- $parent = $N.closest("."+ $.layout.defaults.panes.paneClass);
- parent = $parent.data("parentLayout");
- pane = $parent.data("layoutEdge");
- isChild = parent && pane;
- }
-
- $N .data({
- layout: Instance
- , layoutContainer: sID // FLAG to indicate this is a layout-container - contains unique internal ID
- })
- .addClass(o.containerClass)
- ;
- var layoutMethods = {
- destroy: ''
- , initPanes: ''
- , resizeAll: 'resizeAll'
- , resize: 'resizeAll'
- };
- // loop hash and bind all methods - include layoutID namespacing
- for (name in layoutMethods) {
- $N.bind("layout"+ name.toLowerCase() +"."+ sID, Instance[ layoutMethods[name] || name ]);
- }
-
- // if this container is another layout's 'pane', then set child/parent pointers
- if (isChild) {
- // update parent flag
- Instance.hasParentLayout = true;
- // set pointers to THIS child-layout (Instance) in parent-layout
- parent.refreshChildren( pane, Instance );
- }
-
- // SAVE original container CSS for use in destroy()
- if (!$N.data(css)) {
- // handle props like overflow different for BODY & HTML - has 'system default' values
- if (sC.isBody) {
- // SAVE <BODY> CSS
- $N.data(css, $.extend( styles($N, props), {
- height: $N.css("height")
- , overflow: $N.css("overflow")
- , overflowX: $N.css("overflowX")
- , overflowY: $N.css("overflowY")
- }));
- // ALSO SAVE <HTML> CSS
- $H.data(css, $.extend( styles($H, 'padding'), {
- height: "auto" // FF would return a fixed px-size!
- , overflow: $H.css("overflow")
- , overflowX: $H.css("overflowX")
- , overflowY: $H.css("overflowY")
- }));
- }
- else // handle props normally for non-body elements
- $N.data(css, styles($N, props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") );
- }
-
- try {
- // common container CSS
- CSS = {
- overflow: hid
- , overflowX: hid
- , overflowY: hid
- };
- $N.css( CSS );
-
- if (o.inset && !$.isPlainObject(o.inset)) {
- // can specify a single number for equal outset all-around
- n = parseInt(o.inset, 10) || 0
- o.inset = {
- top: n
- , bottom: n
- , left: n
- , right: n
- };
- }
-
- // format html & body if this is a full page layout
- if (sC.isBody) {
- // if HTML has padding, use this as an outer-spacing around BODY
- if (!o.outset) {
- // use padding from parent-elem (HTML) as outset
- o.outset = {
- top: num($H, "paddingTop")
- , bottom: num($H, "paddingBottom")
- , left: num($H, "paddingLeft")
- , right: num($H, "paddingRight")
- };
- }
- else if (!$.isPlainObject(o.outset)) {
- // can specify a single number for equal outset all-around
- n = parseInt(o.outset, 10) || 0
- o.outset = {
- top: n
- , bottom: n
- , left: n
- , right: n
- };
- }
- // HTML
- $H.css( CSS ).css({
- height: "100%"
- , border: "none" // no border or padding allowed when using height = 100%
- , padding: 0 // ditto
- , margin: 0
- });
- // BODY
- if (browser.isIE6) {
- // IE6 CANNOT use the trick of setting absolute positioning on all 4 sides - must have 'height'
- $N.css({
- width: "100%"
- , height: "100%"
- , border: "none" // no border or padding allowed when using height = 100%
- , padding: 0 // ditto
- , margin: 0
- , position: "relative"
- });
- // convert body padding to an inset option - the border cannot be measured in IE6!
- if (!o.inset) o.inset = elDims( $N ).inset;
- }
- else { // use absolute positioning for BODY to allow borders & padding without overflow
- $N.css({
- width: "auto"
- , height: "auto"
- , margin: 0
- , position: "absolute" // allows for border and padding on BODY
- });
- // apply edge-positioning created above
- $N.css( o.outset );
- }
- // set current layout-container dimensions
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
- }
- else {
- // container MUST have 'position'
- var p = $N.css("position");
- if (!p || !p.match(/(fixed|absolute|relative)/))
- $N.css("position","relative");
-
- // set current layout-container dimensions
- if ( $N.is(":visible") ) {
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT change insetX (padding) values
- if (sC.innerHeight < 1) // container has no 'height' - warn developer
- _log( o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) );
- }
- }
-
- // if container has min-width/height, then enable scrollbar(s)
- if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto");
- if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto");
-
- } catch (ex) {}
- }
-
- /**
- * Bind layout hotkeys - if options enabled
- *
- * @see _create() and addPane()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initHotkeys = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
- // bind keyDown to capture hotkeys, if option enabled for ANY pane
- $.each(panes, function (i, pane) {
- var o = options[pane];
- if (o.enableCursorHotkey || o.customHotkey) {
- $(document).bind("keydown."+ sID, keyDown); // only need to bind this ONCE
- return false; // BREAK - binding was done
- }
- });
- }
-
- /**
- * Build final OPTIONS data
- *
- * @see _create()
- */
-, initOptions = function () {
- var data, d, pane, key, val, i, c, o;
-
- // reprocess user's layout-options to have correct options sub-key structure
- opts = $.layout.transformData( opts, true ); // panes = default subkey
-
- // auto-rename old options for backward compatibility
- opts = $.layout.backwardCompatibility.renameAllOptions( opts );
-
- // if user-options has 'panes' key (pane-defaults), clean it...
- if (!$.isEmptyObject(opts.panes)) {
- // REMOVE any pane-defaults that MUST be set per-pane
- data = $.layout.optionsMap.noDefault;
- for (i=0, c=data.length; i<c; i++) {
- key = data[i];
- delete opts.panes[key]; // OK if does not exist
- }
- // REMOVE any layout-options specified under opts.panes
- data = $.layout.optionsMap.layout;
- for (i=0, c=data.length; i<c; i++) {
- key = data[i];
- delete opts.panes[key]; // OK if does not exist
- }
- }
-
- // MOVE any NON-layout-options from opts-root to opts.panes
- data = $.layout.optionsMap.layout;
- var rootKeys = $.layout.config.optionRootKeys;
- for (key in opts) {
- val = opts[key];
- if ($.inArray(key, rootKeys) < 0 && $.inArray(key, data) < 0) {
- if (!opts.panes[key])
- opts.panes[key] = $.isPlainObject(val) ? $.extend(true, {}, val) : val;
- delete opts[key]
- }
- }
-
- // START by updating ALL options from opts
- $.extend(true, options, opts);
-
- // CREATE final options (and config) for EACH pane
- $.each(_c.allPanes, function (i, pane) {
-
- // apply 'pane-defaults' to CONFIG.[PANE]
- _c[pane] = $.extend(true, {}, _c.panes, _c[pane]);
-
- d = options.panes;
- o = options[pane];
-
- // center-pane uses SOME keys in defaults.panes branch
- if (pane === 'center') {
- // ONLY copy keys from opts.panes listed in: $.layout.optionsMap.center
- data = $.layout.optionsMap.center; // list of 'center-pane keys'
- for (i=0, c=data.length; i<c; i++) { // loop the list...
- key = data[i];
- // only need to use pane-default if pane-specific value not set
- if (!opts.center[key] && (opts.panes[key] || !o[key]))
- o[key] = d[key]; // pane-default
- }
- }
- else {
- // border-panes use ALL keys in defaults.panes branch
- o = options[pane] = $.extend(true, {}, d, o); // re-apply pane-specific opts AFTER pane-defaults
- createFxOptions( pane );
- // ensure all border-pane-specific base-classes exist
- if (!o.resizerClass) o.resizerClass = "ui-layout-resizer";
- if (!o.togglerClass) o.togglerClass = "ui-layout-toggler";
- }
- // ensure we have base pane-class (ALL panes)
- if (!o.paneClass) o.paneClass = "ui-layout-pane";
- });
-
- // update options.zIndexes if a zIndex-option specified
- var zo = opts.zIndex
- , z = options.zIndexes;
- if (zo > 0) {
- z.pane_normal = zo;
- z.content_mask = max(zo+1, z.content_mask); // MIN = +1
- z.resizer_normal = max(zo+2, z.resizer_normal); // MIN = +2
- }
-
- // DELETE 'panes' key now that we are done - values were copied to EACH pane
- delete options.panes;
-
-
- function createFxOptions ( pane ) {
- var o = options[pane]
- , d = options.panes;
- // ensure fxSettings key to avoid errors
- if (!o.fxSettings) o.fxSettings = {};
- if (!d.fxSettings) d.fxSettings = {};
-
- $.each(["_open","_close","_size"], function (i,n) {
- var
- sName = "fxName"+ n
- , sSpeed = "fxSpeed"+ n
- , sSettings = "fxSettings"+ n
- // recalculate fxName according to specificity rules
- , fxName = o[sName] =
- o[sName] // options.west.fxName_open
- || d[sName] // options.panes.fxName_open
- || o.fxName // options.west.fxName
- || d.fxName // options.panes.fxName
- || "none" // MEANS $.layout.defaults.panes.fxName == "" || false || null || 0
- , fxExists = $.effects && ($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName]))
- ;
- // validate fxName to ensure is valid effect - MUST have effect-config data in options.effects
- if (fxName === "none" || !options.effects[fxName] || !fxExists)
- fxName = o[sName] = "none"; // effect not loaded OR unrecognized fxName
-
- // set vars for effects subkeys to simplify logic
- var fx = options.effects[fxName] || {} // effects.slide
- , fx_all = fx.all || null // effects.slide.all
- , fx_pane = fx[pane] || null // effects.slide.west
- ;
- // create fxSpeed[_open|_close|_size]
- o[sSpeed] =
- o[sSpeed] // options.west.fxSpeed_open
- || d[sSpeed] // options.west.fxSpeed_open
- || o.fxSpeed // options.west.fxSpeed
- || d.fxSpeed // options.panes.fxSpeed
- || null // DEFAULT - let fxSetting.duration control speed
- ;
- // create fxSettings[_open|_close|_size]
- o[sSettings] = $.extend(
- true
- , {}
- , fx_all // effects.slide.all
- , fx_pane // effects.slide.west
- , d.fxSettings // options.panes.fxSettings
- , o.fxSettings // options.west.fxSettings
- , d[sSettings] // options.panes.fxSettings_open
- , o[sSettings] // options.west.fxSettings_open
- );
- });
-
- // DONE creating action-specific-settings for this pane,
- // so DELETE generic options - are no longer meaningful
- delete o.fxName;
- delete o.fxSpeed;
- delete o.fxSettings;
- }
- }
-
- /**
- * Initialize module objects, styling, size and position for all panes
- *
- * @see _initElements()
- * @param {string} pane The pane to process
- */
-, getPane = function (pane) {
- var sel = options[pane].paneSelector
- if (sel.substr(0,1)==="#") // ID selector
- // NOTE: elements selected 'by ID' DO NOT have to be 'children'
- return $N.find(sel).eq(0);
- else { // class or other selector
- var $P = $N.children(sel).eq(0);
- // look for the pane nested inside a 'form' element
- return $P.length ? $P : $N.children("form:first").children(sel).eq(0);
- }
- }
-
- /**
- * @param {Object=} evt
- */
-, initPanes = function (evt) {
- // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility
- evtPane(evt);
-
- // NOTE: do north & south FIRST so we can measure their height - do center LAST
- $.each(_c.allPanes, function (idx, pane) {
- addPane( pane, true );
- });
-
- // init the pane-handles NOW in case we have to hide or close the pane below
- initHandles();
-
- // now that all panes have been initialized and initially-sized,
- // make sure there is really enough space available for each pane
- $.each(_c.borderPanes, function (i, pane) {
- if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN
- setSizeLimits(pane);
- makePaneFit(pane); // pane may be Closed, Hidden or Resized by makePaneFit()
- }
- });
- // size center-pane AGAIN in case we 'closed' a border-pane in loop above
- sizeMidPanes("center");
-
- // Chrome/Webkit sometimes fires callbacks BEFORE it completes resizing!
- // Before RC30.3, there was a 10ms delay here, but that caused layout
- // to load asynchrously, which is BAD, so try skipping delay for now
-
- // process pane contents and callbacks, and init/resize child-layout if exists
- $.each(_c.allPanes, function (idx, pane) {
- afterInitPane(pane);
- });
- }
-
- /**
- * Add a pane to the layout - subroutine of initPanes()
- *
- * @see initPanes()
- * @param {string} pane The pane to process
- * @param {boolean=} [force=false] Size content after init
- */
-, addPane = function (pane, force) {
- if ( !force && !isInitialized() ) return;
- var
- o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , dir = c.dir
- , fx = s.fx
- , spacing = o.spacing_open || 0
- , isCenter = (pane === "center")
- , CSS = {}
- , $P = $Ps[pane]
- , size, minSize, maxSize, child
- ;
- // if pane-pointer already exists, remove the old one first
- if ($P)
- removePane( pane, false, true, false );
- else
- $Cs[pane] = false; // init
-
- $P = $Ps[pane] = getPane(pane);
- if (!$P.length) {
- $Ps[pane] = false; // logic
- return;
- }
-
- // SAVE original Pane CSS
- if (!$P.data("layoutCSS")) {
- var props = "position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";
- $P.data("layoutCSS", styles($P, props));
- }
-
- // create alias for pane data in Instance - initHandles will add more
- Instance[pane] = {
- name: pane
- , pane: $Ps[pane]
- , content: $Cs[pane]
- , options: options[pane]
- , state: state[pane]
- , children: children[pane]
- };
-
- // add classes, attributes & events
- $P .data({
- parentLayout: Instance // pointer to Layout Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "pane"
- })
- .css(c.cssReq).css("zIndex", options.zIndexes.pane_normal)
- .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles
- .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
- .bind("mouseenter."+ sID, addHover )
- .bind("mouseleave."+ sID, removeHover )
- ;
- var paneMethods = {
- hide: ''
- , show: ''
- , toggle: ''
- , close: ''
- , open: ''
- , slideOpen: ''
- , slideClose: ''
- , slideToggle: ''
- , size: 'sizePane'
- , sizePane: 'sizePane'
- , sizeContent: ''
- , sizeHandles: ''
- , enableClosable: ''
- , disableClosable: ''
- , enableSlideable: ''
- , disableSlideable: ''
- , enableResizable: ''
- , disableResizable: ''
- , swapPanes: 'swapPanes'
- , swap: 'swapPanes'
- , move: 'swapPanes'
- , removePane: 'removePane'
- , remove: 'removePane'
- , createChildren: ''
- , resizeChildren: ''
- , resizeAll: 'resizeAll'
- , resizeLayout: 'resizeAll'
- }
- , name;
- // loop hash and bind all methods - include layoutID namespacing
- for (name in paneMethods) {
- $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, Instance[ paneMethods[name] || name ]);
- }
-
- // see if this pane has a 'scrolling-content element'
- initContent(pane, false); // false = do NOT sizeContent() - called later
-
- if (!isCenter) {
- // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden)
- // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size'
- size = s.size = _parseSize(pane, o.size);
- minSize = _parseSize(pane,o.minSize) || 1;
- maxSize = _parseSize(pane,o.maxSize) || 100000;
- if (size > 0) size = max(min(size, maxSize), minSize);
- s.autoResize = o.autoResize; // used with percentage sizes
-
- // state for border-panes
- s.isClosed = false; // true = pane is closed
- s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
- s.isResizing= false; // true = pane is in process of being resized
- s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible!
-
- // array for 'pin buttons' whose classNames are auto-updated on pane-open/-close
- if (!s.pins) s.pins = [];
- }
- // states common to ALL panes
- s.tagName = $P[0].tagName;
- s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or is going)
- s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
- s.isVisible = true; // false = pane is invisible - closed OR hidden - simplify logic
-
- // init pane positioning
- setPanePosition( pane );
-
- // if pane is not visible,
- if (dir === "horz") // north or south pane
- CSS.height = cssH($P, size);
- else if (dir === "vert") // east or west pane
- CSS.width = cssW($P, size);
- //else if (isCenter) {}
-
- $P.css(CSS); // apply size -- top, bottom & height will be set by sizeMidPanes
- if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback
-
- // if manually adding a pane AFTER layout initialization, then...
- if (state.initialized) {
- initHandles( pane );
- initHotkeys( pane );
- }
-
- // close or hide the pane if specified in settings
- if (o.initClosed && o.closable && !o.initHidden)
- close(pane, true, true); // true, true = force, noAnimation
- else if (o.initHidden || o.initClosed)
- hide(pane); // will be completely invisible - no resizer or spacing
- else if (!s.noRoom)
- // make the pane visible - in case was initially hidden
- $P.css("display","block");
- // ELSE setAsOpen() - called later by initHandles()
-
- // RESET visibility now - pane will appear IF display:block
- $P.css("visibility","visible");
-
- // check option for auto-handling of pop-ups & drop-downs
- if (o.showOverflowOnHover)
- $P.hover( allowOverflow, resetOverflow );
-
- // if manually adding a pane AFTER layout initialization, then...
- if (state.initialized) {
- afterInitPane( pane );
- }
- }
-
-, afterInitPane = function (pane) {
- var $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- ;
- if (!$P) return;
-
- // see if there is a directly-nested layout inside this pane
- if ($P.data("layout"))
- refreshChildren( pane, $P.data("layout") );
-
- // process pane contents and callbacks, and init/resize child-layout if exists
- if (s.isVisible) { // pane is OPEN
- if (state.initialized) // this pane was added AFTER layout was created
- resizeAll(); // will also sizeContent
- else
- sizeContent(pane);
-
- if (o.triggerEventsOnLoad)
- _runCallbacks("onresize_end", pane);
- else // automatic if onresize called, otherwise call it specifically
- // resize child - IF inner-layout already exists (created before this layout)
- resizeChildren(pane, true); // a previously existing childLayout
- }
-
- // init childLayouts - even if pane is not visible
- if (o.initChildren && o.children)
- createChildren(pane);
- }
-
- /**
- * @param {string=} panes The pane(s) to process
- */
-, setPanePosition = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
- $.each(panes, function (i, pane) {
- var $P = $Ps[pane]
- , $R = $Rs[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , CSS = {}
- ;
- if (!$P) return; // pane does not exist - skip
-
- // set css-position to account for container borders & padding
- switch (pane) {
- case "north": CSS.top = sC.inset.top;
- CSS.left = sC.inset.left;
- CSS.right = sC.inset.right;
- break;
- case "south": CSS.bottom = sC.inset.bottom;
- CSS.left = sC.inset.left;
- CSS.right = sC.inset.right;
- break;
- case "west": CSS.left = sC.inset.left; // top, bottom & height set by sizeMidPanes()
- break;
- case "east": CSS.right = sC.inset.right; // ditto
- break;
- case "center": // top, left, width & height set by sizeMidPanes()
- }
- // apply position
- $P.css(CSS);
-
- // update resizer position
- if ($R && s.isClosed)
- $R.css(side, sC.inset[side]);
- else if ($R && !s.isHidden)
- $R.css(side, sC.inset[side] + getPaneSize(pane));
- });
- }
-
- /**
- * Initialize module objects, styling, size and position for all resize bars and toggler buttons
- *
- * @see _create()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initHandles = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
- $.each(panes, function (i, pane) {
- var $P = $Ps[pane];
- $Rs[pane] = false; // INIT
- $Ts[pane] = false;
- if (!$P) return; // pane does not exist - skip
-
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , paneId = o.paneSelector.substr(0,1) === "#" ? o.paneSelector.substr(1) : ""
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , spacing = (s.isVisible ? o.spacing_open : o.spacing_closed)
- , _pane = "-"+ pane // used for classNames
- , _state = (s.isVisible ? "-open" : "-closed") // used for classNames
- , I = Instance[pane]
- // INIT RESIZER BAR
- , $R = I.resizer = $Rs[pane] = $("<div></div>")
- // INIT TOGGLER BUTTON
- , $T = I.toggler = (o.closable ? $Ts[pane] = $("<div></div>") : false)
- ;
-
- //if (s.isVisible && o.resizable) ... handled by initResizable
- if (!s.isVisible && o.slidable)
- $R.attr("title", o.tips.Slide).css("cursor", o.sliderCursor);
-
- $R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
- .attr("id", paneId ? paneId +"-resizer" : "" )
- .data({
- parentLayout: Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "resizer"
- })
- .css(_c.resizers.cssReq).css("zIndex", options.zIndexes.resizer_normal)
- .css(o.applyDemoStyles ? _c.resizers.cssDemo : {}) // add demo styles
- .addClass(rClass +" "+ rClass+_pane)
- .hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handle with CSS instead
- .hover(onResizerEnter, onResizerLeave) // ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter
- .mousedown($.layout.disableTextSelection) // prevent text-selection OUTSIDE resizer
- .mouseup($.layout.enableTextSelection) // not really necessary, but just in case
- .appendTo($N) // append DIV to container
- ;
- if ($.fn.disableSelection)
- $R.disableSelection(); // prevent text-selection INSIDE resizer
- if (o.resizerDblClickToggle)
- $R.bind("dblclick."+ sID, toggle );
-
- if ($T) {
- $T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler"
- .attr("id", paneId ? paneId +"-toggler" : "" )
- .data({
- parentLayout: Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "toggler"
- })
- .css(_c.togglers.cssReq) // add base/required styles
- .css(o.applyDemoStyles ? _c.togglers.cssDemo : {}) // add demo styles
- .addClass(tClass +" "+ tClass+_pane)
- .hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handle with CSS instead
- .bind("mouseenter", onResizerEnter) // NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer
- .appendTo($R) // append SPAN to resizer DIV
- ;
- // ADD INNER-SPANS TO TOGGLER
- if (o.togglerContent_open) // ui-layout-open
- $("<span>"+ o.togglerContent_open +"</span>")
- .data({
- layoutEdge: pane
- , layoutRole: "togglerContent"
- })
- .data("layoutRole", "togglerContent")
- .data("layoutEdge", pane)
- .addClass("content content-open")
- .css("display","none")
- .appendTo( $T )
- //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-open instead!
- ;
- if (o.togglerContent_closed) // ui-layout-closed
- $("<span>"+ o.togglerContent_closed +"</span>")
- .data({
- layoutEdge: pane
- , layoutRole: "togglerContent"
- })
- .addClass("content content-closed")
- .css("display","none")
- .appendTo( $T )
- //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-closed instead!
- ;
- // ADD TOGGLER.click/.hover
- enableClosable(pane);
- }
-
- // add Draggable events
- initResizable(pane);
-
- // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer resizer-west resizer-open"
- if (s.isVisible)
- setAsOpen(pane); // onOpen will be called, but NOT onResize
- else {
- setAsClosed(pane); // onClose will be called
- bindStartSlidingEvents(pane, true); // will enable events IF option is set
- }
-
- });
-
- // SET ALL HANDLE DIMENSIONS
- sizeHandles();
- }
-
-
- /**
- * Initialize scrolling ui-layout-content div - if exists
- *
- * @see initPane() - or externally after an Ajax injection
- * @param {string} pane The pane to process
- * @param {boolean=} [resize=true] Size content after init
- */
-, initContent = function (pane, resize) {
- if (!isInitialized()) return;
- var
- o = options[pane]
- , sel = o.contentSelector
- , I = Instance[pane]
- , $P = $Ps[pane]
- , $C
- ;
- if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
- ? $P.find(sel).eq(0) // match 1-element only
- : $P.children(sel).eq(0)
- ;
- if ($C && $C.length) {
- $C.data("layoutRole", "content");
- // SAVE original Content CSS
- if (!$C.data("layoutCSS"))
- $C.data("layoutCSS", styles($C, "height"));
- $C.css( _c.content.cssReq );
- if (o.applyDemoStyles) {
- $C.css( _c.content.cssDemo ); // add padding & overflow: auto to content-div
- $P.css( _c.content.cssDemoPane ); // REMOVE padding/scrolling from pane
- }
- // ensure no vertical scrollbar on pane - will mess up measurements
- if ($P.css("overflowX").match(/(scroll|auto)/)) {
- $P.css("overflow", "hidden");
- }
- state[pane].content = {}; // init content state
- if (resize !== false) sizeContent(pane);
- // sizeContent() is called AFTER init of all elements
- }
- else
- I.content = $Cs[pane] = false;
- }
-
-
- /**
- * Add resize-bars to all panes that specify it in options
- * -dependancy: $.fn.resizable - will skip if not found
- *
- * @see _create()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initResizable = function (panes) {
- var draggingAvailable = $.layout.plugins.draggable
- , side // set in start()
- ;
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- $.each(panes, function (idx, pane) {
- var o = options[pane];
- if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
- o.resizable = false;
- return true; // skip to next
- }
-
- var s = state[pane]
- , z = options.zIndexes
- , c = _c[pane]
- , side = c.dir=="horz" ? "top" : "left"
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , base = o.resizerClass
- , lastPos = 0 // used when live-resizing
- , r, live // set in start because may change
- // 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
- , resizerClass = base+"-drag" // resizer-drag
- , resizerPaneClass = base+"-"+pane+"-drag" // resizer-north-drag
- // 'helper' class is applied to the CLONED resizer-bar while it is being dragged
- , helperClass = base+"-dragging" // resizer-dragging
- , helperPaneClass = base+"-"+pane+"-dragging" // resizer-north-dragging
- , helperLimitClass = base+"-dragging-limit" // resizer-drag
- , helperPaneLimitClass = base+"-"+pane+"-dragging-limit" // resizer-north-drag
- , helperClassesSet = false // logic var
- ;
-
- if (!s.isClosed)
- $R.attr("title", o.tips.Resize)
- .css("cursor", o.resizerCursor); // n-resize, s-resize, etc
-
- $R.draggable({
- containment: $N[0] // limit resizing to layout container
- , axis: (c.dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis
- , delay: 0
- , distance: 1
- , grid: o.resizingGrid
- // basic format for helper - style it using class: .ui-draggable-dragging
- , helper: "clone"
- , opacity: o.resizerDragOpacity
- , addClasses: false // avoid ui-state-disabled class when disabled
- //, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed
- , zIndex: z.resizer_drag
-
- , start: function (e, ui) {
- // REFRESH options & state pointers in case we used swapPanes
- o = options[pane];
- s = state[pane];
- // re-read options
- live = o.livePaneResizing;
-
- // ondrag_start callback - will CANCEL hide if returns false
- // TODO: dragging CANNOT be cancelled like this, so see if there is a way?
- if (false === _runCallbacks("ondrag_start", pane)) return false;
-
- s.isResizing = true; // prevent pane from closing while resizing
- state.paneResizing = pane; // easy to see if ANY pane is resizing
- timer.clear(pane+"_closeSlider"); // just in case already triggered
-
- // SET RESIZER LIMITS - used in drag()
- setSizeLimits(pane); // update pane/resizer state
- r = s.resizerPosition;
- lastPos = ui.position[ side ]
-
- $R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes
- helperClassesSet = false; // reset logic var - see drag()
-
- // MASK PANES CONTAINING IFRAMES, APPLETS OR OTHER TROUBLESOME ELEMENTS
- showMasks( pane, { resizing: true });
- }
-
- , drag: function (e, ui) {
- if (!helperClassesSet) { // can only add classes after clone has been added to the DOM
- //$(".ui-draggable-dragging")
- ui.helper
- .addClass( helperClass +" "+ helperPaneClass ) // add helper classes
- .css({ right: "auto", bottom: "auto" }) // fix dir="rtl" issue
- .children().css("visibility","hidden") // hide toggler inside dragged resizer-bar
- ;
- helperClassesSet = true;
- // draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
- if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding);
- }
- // CONTAIN RESIZER-BAR TO RESIZING LIMITS
- var limit = 0;
- if (ui.position[side] < r.min) {
- ui.position[side] = r.min;
- limit = -1;
- }
- else if (ui.position[side] > r.max) {
- ui.position[side] = r.max;
- limit = 1;
- }
- // ADD/REMOVE dragging-limit CLASS
- if (limit) {
- ui.helper.addClass( helperLimitClass +" "+ helperPaneLimitClass ); // at dragging-limit
- window.defaultStatus = (limit>0 && pane.match(/(north|west)/)) || (limit<0 && pane.match(/(south|east)/)) ? o.tips.maxSizeWarning : o.tips.minSizeWarning;
- }
- else {
- ui.helper.removeClass( helperLimitClass +" "+ helperPaneLimitClass ); // not at dragging-limit
- window.defaultStatus = "";
- }
- // DYNAMICALLY RESIZE PANES IF OPTION ENABLED
- // won't trigger unless resizer has actually moved!
- if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) {
- lastPos = ui.position[side];
- resizePanes(e, ui, pane)
- }
- }
-
- , stop: function (e, ui) {
- $('body').enableSelection(); // RE-ENABLE TEXT SELECTION
- window.defaultStatus = ""; // clear 'resizing limit' message from statusbar
- $R.removeClass( resizerClass +" "+ resizerPaneClass ); // remove drag classes from Resizer
- s.isResizing = false;
- state.paneResizing = false; // easy to see if ANY pane is resizing
- resizePanes(e, ui, pane, true); // true = resizingDone
- }
-
- });
- });
-
- /**
- * resizePanes
- *
- * Sub-routine called from stop() - and drag() if livePaneResizing
- *
- * @param {!Object} evt
- * @param {!Object} ui
- * @param {string} pane
- * @param {boolean=} [resizingDone=false]
- */
- var resizePanes = function (evt, ui, pane, resizingDone) {
- var dragPos = ui.position
- , c = _c[pane]
- , o = options[pane]
- , s = state[pane]
- , resizerPos
- ;
- switch (pane) {
- case "north": resizerPos = dragPos.top; break;
- case "west": resizerPos = dragPos.left; break;
- case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break;
- case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break;
- };
- // remove container margin from resizer position to get the pane size
- var newSize = resizerPos - sC.inset[c.side];
-
- // Disable OR Resize Mask(s) created in drag.start
- if (!resizingDone) {
- // ensure we meet liveResizingTolerance criteria
- if (Math.abs(newSize - s.size) < o.liveResizingTolerance)
- return; // SKIP resize this time
- // resize the pane
- manualSizePane(pane, newSize, false, true); // true = noAnimation
- sizeMasks(); // resize all visible masks
- }
- else { // resizingDone
- // ondrag_end callback
- if (false !== _runCallbacks("ondrag_end", pane))
- manualSizePane(pane, newSize, false, true); // true = noAnimation
- hideMasks(true); // true = force hiding all masks even if one is 'sliding'
- if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane
- showMasks( pane, { resizing: true });
- }
- };
- }
-
- /**
- * sizeMask
- *
- * Needed to overlay a DIV over an IFRAME-pane because mask CANNOT be *inside* the pane
- * Called when mask created, and during livePaneResizing
- */
-, sizeMask = function () {
- var $M = $(this)
- , pane = $M.data("layoutMask") // eg: "west"
- , s = state[pane]
- ;
- // only masks over an IFRAME-pane need manual resizing
- if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes
- $M.css({
- top: s.offsetTop
- , left: s.offsetLeft
- , width: s.outerWidth
- , height: s.outerHeight
- });
- /* ALT Method...
- var $P = $Ps[pane];
- $M.css( $P.position() ).css({ width: $P[0].offsetWidth, height: $P[0].offsetHeight });
- */
- }
-, sizeMasks = function () {
- $Ms.each( sizeMask ); // resize all 'visible' masks
- }
-
- /**
- * @param {string} pane The pane being resized, animated or isSliding
- * @param {Object=} [args] (optional) Options: which masks to apply, and to which panes
- */
-, showMasks = function (pane, args) {
- var c = _c[pane]
- , panes = ["center"]
- , z = options.zIndexes
- , a = $.extend({
- objectsOnly: false
- , animation: false
- , resizing: true
- , sliding: state[pane].isSliding
- }, args )
- , o, s
- ;
- if (a.resizing)
- panes.push( pane );
- if (a.sliding)
- panes.push( _c.oppositeEdge[pane] ); // ADD the oppositeEdge-pane
-
- if (c.dir === "horz") {
- panes.push("west");
- panes.push("east");
- }
-
- $.each(panes, function(i,p){
- s = state[p];
- o = options[p];
- if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) {
- getMasks(p).each(function(){
- sizeMask.call(this);
- this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1
- this.style.display = "block";
- });
- }
- });
- }
-
- /**
- * @param {boolean=} force Hide masks even if a pane is sliding
- */
-, hideMasks = function (force) {
- // ensure no pane is resizing - could be a timing issue
- if (force || !state.paneResizing) {
- $Ms.hide(); // hide ALL masks
- }
- // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled
- else if (!force && !$.isEmptyObject( state.panesSliding )) {
- var i = $Ms.length - 1
- , p, $M;
- for (; i >= 0; i--) {
- $M = $Ms.eq(i);
- p = $M.data("layoutMask");
- if (!options[p].maskObjects) {
- $M.hide();
- }
- }
- }
- }
-
- /**
- * @param {string} pane
- */
-, getMasks = function (pane) {
- var $Masks = $([])
- , $M, i = 0, c = $Ms.length
- ;
- for (; i<c; i++) {
- $M = $Ms.eq(i);
- if ($M.data("layoutMask") === pane)
- $Masks = $Masks.add( $M );
- }
- if ($Masks.length)
- return $Masks;
- else
- return createMasks(pane);
- }
-
- /**
- * createMasks
- *
- * Generates both DIV (ALWAYS used) and IFRAME (optional) elements as masks
- * An IFRAME mask is created *under* the DIV when maskObjects=true, because a DIV cannot mask an applet
- *
- * @param {string} pane
- */
-, createMasks = function (pane) {
- var
- $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- , z = options.zIndexes
- , isIframe, el, $M, css, i
- ;
- if (!o.maskContents && !o.maskObjects) return $([]);
- // if o.maskObjects=true, then loop TWICE to create BOTH kinds of mask, else only create a DIV
- for (i=0; i < (o.maskObjects ? 2 : 1); i++) {
- isIframe = o.maskObjects && i==0;
- el = document.createElement( isIframe ? "iframe" : "div" );
- $M = $(el).data("layoutMask", pane); // add data to relate mask to pane
- el.className = "ui-layout-mask ui-layout-mask-"+ pane; // for user styling
- css = el.style;
- // Both DIVs and IFRAMES
- css.background = "#FFF";
- css.position = "absolute";
- css.display = "block";
- if (isIframe) { // IFRAME-only props
- el.src = "about:blank";
- el.frameborder = 0;
- css.border = 0;
- css.opacity = 0;
- css.filter = "Alpha(Opacity='0')";
- //el.allowTransparency = true; - for IE, but breaks masking ability!
- }
- else { // DIV-only props
- css.opacity = 0.001;
- css.filter = "Alpha(Opacity='1')";
- }
- // if pane IS an IFRAME, then must mask the pane itself
- if (s.tagName == "IFRAME") {
- // NOTE sizing done by a subroutine so can be called during live-resizing
- css.zIndex = z.pane_normal+1; // 1-higher than pane
- $N.append( el ); // append to LAYOUT CONTAINER
- }
- // otherwise put masks *inside the pane* to mask its contents
- else {
- $M.addClass("ui-layout-mask-inside-pane");
- css.zIndex = o.maskZindex || z.content_mask; // usually 1, but customizable
- css.top = 0;
- css.left = 0;
- css.width = "100%";
- css.height = "100%";
- $P.append( el ); // append INSIDE pane element
- }
- // add Mask to cached array so can be resized & reused
- $Ms = $Ms.add( el );
- }
- return $Ms;
- }
-
-
- /**
- * Destroy this layout and reset all elements
- *
- * @param {boolean=} [destroyChildren=false] Destory Child-Layouts first?
- */
-, destroy = function (evt_or_destroyChildren, destroyChildren) {
- // UNBIND layout events and remove global object
- $(window).unbind("."+ sID); // resize & unload
- $(document).unbind("."+ sID); // keyDown (hotkeys)
-
- if (typeof evt_or_destroyChildren === "object")
- // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
- evtPane(evt_or_destroyChildren);
- else // no event, so transfer 1st param to destroyChildren param
- destroyChildren = evt_or_destroyChildren;
-
- // need to look for parent layout BEFORE we remove the container data, else skips a level
- //var parentPane = Instance.hasParentLayout ? $.layout.getParentPaneInstance( $N ) : null;
-
- // reset layout-container
- $N .clearQueue()
- .removeData("layout")
- .removeData("layoutContainer")
- .removeClass(options.containerClass)
- .unbind("."+ sID) // remove ALL Layout events
- ;
-
- // remove all mask elements that have been created
- $Ms.remove();
-
- // loop all panes to remove layout classes, attributes and bindings
- $.each(_c.allPanes, function (i, pane) {
- removePane( pane, false, true, destroyChildren ); // true = skipResize
- });
-
- // do NOT reset container CSS if is a 'pane' (or 'content') in an outer-layout - ie, THIS layout is 'nested'
- var css = "layoutCSS";
- if ($N.data(css) && !$N.data("layoutRole")) // RESET CSS
- $N.css( $N.data(css) ).removeData(css);
-
- // for full-page layouts, also reset the <HTML> CSS
- if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET <HTML> CSS
- $N.css( $N.data(css) ).removeData(css);
-
- // trigger plugins for this layout, if there are any
- runPluginCallbacks( Instance, $.layout.onDestroy );
-
- // trigger state-management and onunload callback
- unload();
-
- // clear the Instance of everything except for container & options (so could recreate)
- // RE-CREATE: myLayout = myLayout.container.layout( myLayout.options );
- for (var n in Instance)
- if (!n.match(/^(container|options)$/)) delete Instance[ n ];
- // add a 'destroyed' flag to make it easy to check
- Instance.destroyed = true;
-
- // if this is a child layout, CLEAR the child-pointer in the parent
- /* for now the pointer REMAINS, but with only container, options and destroyed keys
- if (parentPane) {
- var layout = parentPane.pane.data("parentLayout")
- , key = layout.options.instanceKey || 'error';
- // THIS SYNTAX MAY BE WRONG!
- parentPane.children[key] = layout.children[ parentPane.name ].children[key] = null;
- }
- */
-
- return Instance; // for coding convenience
- }
-
- /**
- * Remove a pane from the layout - subroutine of destroy()
- *
- * @see destroy()
- * @param {(string|Object)} evt_or_pane The pane to process
- * @param {boolean=} [remove=false] Remove the DOM element?
- * @param {boolean=} [skipResize=false] Skip calling resizeAll()?
- * @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options setting
- */
-, removePane = function (evt_or_pane, remove, skipResize, destroyChild) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- , $C = $Cs[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- ;
- // NOTE: elements can still exist even after remove()
- // so check for missing data(), which is cleared by removed()
- if ($P && $.isEmptyObject( $P.data() )) $P = false;
- if ($C && $.isEmptyObject( $C.data() )) $C = false;
- if ($R && $.isEmptyObject( $R.data() )) $R = false;
- if ($T && $.isEmptyObject( $T.data() )) $T = false;
-
- if ($P) $P.stop(true, true);
-
- var o = options[pane]
- , s = state[pane]
- , d = "layout"
- , css = "layoutCSS"
- , pC = children[pane]
- , hasChildren = $.isPlainObject( pC ) && !$.isEmptyObject( pC )
- , destroy = destroyChild !== undefined ? destroyChild : o.destroyChildren
- ;
- // FIRST destroy the child-layout(s)
- if (hasChildren && destroy) {
- $.each( pC, function (key, child) {
- if (!child.destroyed)
- child.destroy(true);// tell child-layout to destroy ALL its child-layouts too
- if (child.destroyed) // destroy was successful
- delete pC[key];
- });
- // if no more children, remove the children hash
- if ($.isEmptyObject( pC )) {
- pC = children[pane] = null; // clear children hash
- hasChildren = false;
- }
- }
-
- // Note: can't 'remove' a pane element with non-destroyed children
- if ($P && remove && !hasChildren)
- $P.remove(); // remove the pane-element and everything inside it
- else if ($P && $P[0]) {
- // create list of ALL pane-classes that need to be removed
- var root = o.paneClass // default="ui-layout-pane"
- , pRoot = root +"-"+ pane // eg: "ui-layout-pane-west"
- , _open = "-open"
- , _sliding= "-sliding"
- , _closed = "-closed"
- , classes = [ root, root+_open, root+_closed, root+_sliding, // generic classes
- pRoot, pRoot+_open, pRoot+_closed, pRoot+_sliding ] // pane-specific classes
- ;
- $.merge(classes, getHoverClasses($P, true)); // ADD hover-classes
- // remove all Layout classes from pane-element
- $P .removeClass( classes.join(" ") ) // remove ALL pane-classes
- .removeData("parentLayout")
- .removeData("layoutPane")
- .removeData("layoutRole")
- .removeData("layoutEdge")
- .removeData("autoHidden") // in case set
- .unbind("."+ sID) // remove ALL Layout events
- // TODO: remove these extra unbind commands when jQuery is fixed
- //.unbind("mouseenter"+ sID)
- //.unbind("mouseleave"+ sID)
- ;
- // do NOT reset CSS if this pane/content is STILL the container of a nested layout!
- // the nested layout will reset its 'container' CSS when/if it is destroyed
- if (hasChildren && $C) {
- // a content-div may not have a specific width, so give it one to contain the Layout
- $C.width( $C.width() );
- $.each( pC, function (key, child) {
- child.resizeAll(); // resize the Layout
- });
- }
- else if ($C)
- $C.css( $C.data(css) ).removeData(css).removeData("layoutRole");
- // remove pane AFTER content in case there was a nested layout
- if (!$P.data(d))
- $P.css( $P.data(css) ).removeData(css);
- }
-
- // REMOVE pane resizer and toggler elements
- if ($T) $T.remove();
- if ($R) $R.remove();
-
- // CLEAR all pointers and state data
- Instance[pane] = $Ps[pane] = $Cs[pane] = $Rs[pane] = $Ts[pane] = false;
- s = { removed: true };
-
- if (!skipResize)
- resizeAll();
- }
-
-
-/*
- * ###########################
- * ACTION METHODS
- * ###########################
- */
-
- /**
- * @param {string} pane
- */
-, _hidePane = function (pane) {
- var $P = $Ps[pane]
- , o = options[pane]
- , s = $P[0].style
- ;
- if (o.useOffscreenClose) {
- if (!$P.data(_c.offscreenReset))
- $P.data(_c.offscreenReset, { left: s.left, right: s.right });
- $P.css( _c.offscreenCSS );
- }
- else
- $P.hide().removeData(_c.offscreenReset);
- }
-
- /**
- * @param {string} pane
- */
-, _showPane = function (pane) {
- var $P = $Ps[pane]
- , o = options[pane]
- , off = _c.offscreenCSS
- , old = $P.data(_c.offscreenReset)
- , s = $P[0].style
- ;
- $P .show() // ALWAYS show, just in case
- .removeData(_c.offscreenReset);
- if (o.useOffscreenClose && old) {
- if (s.left == off.left)
- s.left = old.left;
- if (s.right == off.right)
- s.right = old.right;
- }
- }
-
-
- /**
- * Completely 'hides' a pane, including its spacing - as if it does not exist
- * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
- *
- * @param {(string|Object)} evt_or_pane The pane being hidden, ie: north, south, east, or west
- * @param {boolean=} [noAnimation=false]
- */
-, hide = function (evt_or_pane, noAnimation) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden
-
- // onhide_start callback - will CANCEL hide if returns false
- if (state.initialized && false === _runCallbacks("onhide_start", pane)) return;
-
- s.isSliding = false; // just in case
- delete state.panesSliding[pane];
-
- // now hide the elements
- if ($R) $R.hide(); // hide resizer-bar
- if (!state.initialized || s.isClosed) {
- s.isClosed = true; // to trigger open-animation on show()
- s.isHidden = true;
- s.isVisible = false;
- if (!state.initialized)
- _hidePane(pane); // no animation when loading page
- sizeMidPanes(_c[pane].dir === "horz" ? "" : "center");
- if (state.initialized || o.triggerEventsOnLoad)
- _runCallbacks("onhide_end", pane);
- }
- else {
- s.isHiding = true; // used by onclose
- close(pane, false, noAnimation); // adjust all panes to fit
- }
- }
-
- /**
- * Show a hidden pane - show as 'closed' by default unless openPane = true
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {boolean=} [openPane=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [noAlert=false]
- */
-, show = function (evt_or_pane, openPane, noAnimation, noAlert) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden
-
- // onshow_start callback - will CANCEL show if returns false
- if (false === _runCallbacks("onshow_start", pane)) return;
-
- s.isShowing = true; // used by onopen/onclose
- //s.isHidden = false; - will be set by open/close - if not cancelled
- s.isSliding = false; // just in case
- delete state.panesSliding[pane];
-
- // now show the elements
- //if ($R) $R.show(); - will be shown by open/close
- if (openPane === false)
- close(pane, true); // true = force
- else
- open(pane, false, noAnimation, noAlert); // adjust all panes to fit
- }
-
-
- /**
- * Toggles a pane open/closed by calling either open or close
- *
- * @param {(string|Object)} evt_or_pane The pane being toggled, ie: north, south, east, or west
- * @param {boolean=} [slide=false]
- */
-, toggle = function (evt_or_pane, slide) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , s = state[pane]
- ;
- if (evt) // called from to $R.dblclick OR triggerPaneEvent
- evt.stopImmediatePropagation();
- if (s.isHidden)
- show(pane); // will call 'open' after unhiding it
- else if (s.isClosed)
- open(pane, !!slide);
- else
- close(pane);
- }
-
-
- /**
- * Utility method used during init or other auto-processes
- *
- * @param {string} pane The pane being closed
- * @param {boolean=} [setHandles=false]
- */
-, _closePane = function (pane, setHandles) {
- var
- $P = $Ps[pane]
- , s = state[pane]
- ;
- _hidePane(pane);
- s.isClosed = true;
- s.isVisible = false;
- if (setHandles) setAsClosed(pane);
- }
-
- /**
- * Close the specified pane (animation optional), and resize all other panes as needed
- *
- * @param {(string|Object)} evt_or_pane The pane being closed, ie: north, south, east, or west
- * @param {boolean=} [force=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [skipCallback=false]
- */
-, close = function (evt_or_pane, force, noAnimation, skipCallback) {
- var pane = evtPane.call(this, evt_or_pane);
- if (pane === "center") return; // validate
- // if pane has been initialized, but NOT the complete layout, close pane instantly
- if (!state.initialized && $Ps[pane]) {
- _closePane(pane, true); // INIT pane as closed
- return;
- }
- if (!isInitialized()) return;
-
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , doFX, isShowing, isHiding, wasSliding;
-
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
-
- if ( !$P
- || (!o.closable && !s.isShowing && !s.isHiding) // invalid request // (!o.resizable && !o.closable) ???
- || (!force && s.isClosed && !s.isShowing) // already closed
- ) return queueNext();
-
- // onclose_start callback - will CANCEL hide if returns false
- // SKIP if just 'showing' a hidden pane as 'closed'
- var abort = !s.isShowing && false === _runCallbacks("onclose_start", pane);
-
- // transfer logic vars to temp vars
- isShowing = s.isShowing;
- isHiding = s.isHiding;
- wasSliding = s.isSliding;
- // now clear the logic vars (REQUIRED before aborting)
- delete s.isShowing;
- delete s.isHiding;
-
- if (abort) return queueNext();
-
- doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none");
- s.isMoving = true;
- s.isClosed = true;
- s.isVisible = false;
- // update isHidden BEFORE sizing panes
- if (isHiding) s.isHidden = true;
- else if (isShowing) s.isHidden = false;
-
- if (s.isSliding) // pane is being closed, so UNBIND trigger events
- bindStopSlidingEvents(pane, false); // will set isSliding=false
- else // resize panes adjacent to this one
- sizeMidPanes(_c[pane].dir === "horz" ? "" : "center", false); // false = NOT skipCallback
-
- // if this pane has a resizer bar, move it NOW - before animation
- setAsClosed(pane);
-
- // CLOSE THE PANE
- if (doFX) { // animate the close
- lockPaneForFX(pane, true); // need to set left/top so animation will work
- $P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
- lockPaneForFX(pane, false); // undo
- if (s.isClosed) close_2();
- queueNext();
- });
- }
- else { // hide the pane without animation
- _hidePane(pane);
- close_2();
- queueNext();
- };
- });
-
- // SUBROUTINE
- function close_2 () {
- s.isMoving = false;
- bindStartSlidingEvents(pane, true); // will enable if o.slidable = true
-
- // if opposite-pane was autoClosed, see if it can be autoOpened now
- var altPane = _c.oppositeEdge[pane];
- if (state[ altPane ].noRoom) {
- setSizeLimits( altPane );
- makePaneFit( altPane );
- }
-
- if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) {
- // onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
- if (!isShowing) _runCallbacks("onclose_end", pane);
- // onhide OR onshow callback
- if (isShowing) _runCallbacks("onshow_end", pane);
- if (isHiding) _runCallbacks("onhide_end", pane);
- }
- }
- }
-
- /**
- * @param {string} pane The pane just closed, ie: north, south, east, or west
- */
-, setAsClosed = function (pane) {
- if (!$Rs[pane]) return; // handles not initialized yet!
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , _pane = "-"+ pane // used for classNames
- , _open = "-open"
- , _sliding= "-sliding"
- , _closed = "-closed"
- ;
- $R
- .css(side, sC.inset[side]) // move the resizer
- .removeClass( rClass+_open +" "+ rClass+_pane+_open )
- .removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
- .addClass( rClass+_closed +" "+ rClass+_pane+_closed )
- ;
- // handle already-hidden panes in case called by swap() or a similar method
- if (s.isHidden) $R.hide(); // hide resizer-bar
-
- // DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvents?
- if (o.resizable && $.layout.plugins.draggable)
- $R
- .draggable("disable")
- .removeClass("ui-state-disabled") // do NOT apply disabled styling - not suitable here
- .css("cursor", "default")
- .attr("title","")
- ;
-
- // if pane has a toggler button, adjust that too
- if ($T) {
- $T
- .removeClass( tClass+_open +" "+ tClass+_pane+_open )
- .addClass( tClass+_closed +" "+ tClass+_pane+_closed )
- .attr("title", o.tips.Open) // may be blank
- ;
- // toggler-content - if exists
- $T.children(".content-open").hide();
- $T.children(".content-closed").css("display","block");
- }
-
- // sync any 'pin buttons'
- syncPinBtns(pane, false);
-
- if (state.initialized) {
- // resize 'length' and position togglers for adjacent panes
- sizeHandles();
- }
- }
-
- /**
- * Open the specified pane (animation optional), and resize all other panes as needed
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {boolean=} [slide=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [noAlert=false]
- */
-, open = function (evt_or_pane, slide, noAnimation, noAlert) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , doFX, isShowing
- ;
- if (pane === "center") return; // validate
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
-
- if ( !$P
- || (!o.resizable && !o.closable && !s.isShowing) // invalid request
- || (s.isVisible && !s.isSliding) // already open
- ) return queueNext();
-
- // pane can ALSO be unhidden by just calling show(), so handle this scenario
- if (s.isHidden && !s.isShowing) {
- queueNext(); // call before show() because it needs the queue free
- show(pane, true);
- return;
- }
-
- if (s.autoResize && s.size != o.size) // resize pane to original size set in options
- sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
- else
- // make sure there is enough space available to open the pane
- setSizeLimits(pane, slide);
-
- // onopen_start callback - will CANCEL open if returns false
- var cbReturn = _runCallbacks("onopen_start", pane);
-
- if (cbReturn === "abort")
- return queueNext();
-
- // update pane-state again in case options were changed in onopen_start
- if (cbReturn !== "NC") // NC = "No Callback"
- setSizeLimits(pane, slide);
-
- if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN!
- syncPinBtns(pane, false); // make sure pin-buttons are reset
- if (!noAlert && o.tips.noRoomToOpen)
- alert(o.tips.noRoomToOpen);
- return queueNext(); // ABORT
- }
-
- if (slide) // START Sliding - will set isSliding=true
- bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
- else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead
- bindStopSlidingEvents(pane, false); // UNBIND trigger events - will set isSliding=false
- else if (o.slidable)
- bindStartSlidingEvents(pane, false); // UNBIND trigger events
-
- s.noRoom = false; // will be reset by makePaneFit if 'noRoom'
- makePaneFit(pane);
-
- // transfer logic var to temp var
- isShowing = s.isShowing;
- // now clear the logic var
- delete s.isShowing;
-
- doFX = !noAnimation && s.isClosed && (o.fxName_open != "none");
- s.isMoving = true;
- s.isVisible = true;
- s.isClosed = false;
- // update isHidden BEFORE sizing panes - WHY??? Old?
- if (isShowing) s.isHidden = false;
-
- if (doFX) { // ANIMATE
- // mask adjacent panes with objects
- lockPaneForFX(pane, true); // need to set left/top so animation will work
- $P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
- lockPaneForFX(pane, false); // undo
- if (s.isVisible) open_2(); // continue
- queueNext();
- });
- }
- else { // no animation
- _showPane(pane);// just show pane and...
- open_2(); // continue
- queueNext();
- };
- });
-
- // SUBROUTINE
- function open_2 () {
- s.isMoving = false;
-
- // cure iframe display issues
- _fixIframe(pane);
-
- // NOTE: if isSliding, then other panes are NOT 'resized'
- if (!s.isSliding) { // resize all panes adjacent to this one
- sizeMidPanes(_c[pane].dir=="vert" ? "center" : "", false); // false = NOT skipCallback
- }
-
- // set classes, position handles and execute callbacks...
- setAsOpen(pane);
- };
-
- }
-
- /**
- * @param {string} pane The pane just opened, ie: north, south, east, or west
- * @param {boolean=} [skipCallback=false]
- */
-, setAsOpen = function (pane, skipCallback) {
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , _pane = "-"+ pane // used for classNames
- , _open = "-open"
- , _closed = "-closed"
- , _sliding= "-sliding"
- ;
- $R
- .css(side, sC.inset[side] + getPaneSize(pane)) // move the resizer
- .removeClass( rClass+_closed +" "+ rClass+_pane+_closed )
- .addClass( rClass+_open +" "+ rClass+_pane+_open )
- ;
- if (s.isSliding)
- $R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
- else // in case 'was sliding'
- $R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
-
- removeHover( 0, $R ); // remove hover classes
- if (o.resizable && $.layout.plugins.draggable)
- $R .draggable("enable")
- .css("cursor", o.resizerCursor)
- .attr("title", o.tips.Resize);
- else if (!s.isSliding)
- $R.css("cursor", "default"); // n-resize, s-resize, etc
-
- // if pane also has a toggler button, adjust that too
- if ($T) {
- $T .removeClass( tClass+_closed +" "+ tClass+_pane+_closed )
- .addClass( tClass+_open +" "+ tClass+_pane+_open )
- .attr("title", o.tips.Close); // may be blank
- removeHover( 0, $T ); // remove hover classes
- // toggler-content - if exists
- $T.children(".content-closed").hide();
- $T.children(".content-open").css("display","block");
- }
-
- // sync any 'pin buttons'
- syncPinBtns(pane, !s.isSliding);
-
- // update pane-state dimensions - BEFORE resizing content
- $.extend(s, elDims($P));
-
- if (state.initialized) {
- // resize resizer & toggler sizes for all panes
- sizeHandles();
- // resize content every time pane opens - to be sure
- sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving'
- }
-
- if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) {
- // onopen callback
- _runCallbacks("onopen_end", pane);
- // onshow callback - TODO: should this be here?
- if (s.isShowing) _runCallbacks("onshow_end", pane);
-
- // ALSO call onresize because layout-size *may* have changed while pane was closed
- if (state.initialized)
- _runCallbacks("onresize_end", pane);
- }
-
- // TODO: Somehow sizePane("north") is being called after this point???
- }
-
-
- /**
- * slideOpen / slideClose / slideToggle
- *
- * Pass-though methods for sliding
- */
-, slideOpen = function (evt_or_pane) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , s = state[pane]
- , delay = options[pane].slideDelay_open
- ;
- if (pane === "center") return; // validate
- // prevent event from triggering on NEW resizer binding created below
- if (evt) evt.stopImmediatePropagation();
-
- if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0)
- // trigger = mouseenter - use a delay
- timer.set(pane+"_openSlider", open_NOW, delay);
- else
- open_NOW(); // will unbind events if is already open
-
- /**
- * SUBROUTINE for timed open
- */
- function open_NOW () {
- if (!s.isClosed) // skip if no longer closed!
- bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
- else if (!s.isMoving)
- open(pane, true); // true = slide - open() will handle binding
- };
- }
-
-, slideClose = function (evt_or_pane) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , delay = s.isMoving ? 1000 : 300 // MINIMUM delay - option may override
- ;
- if (pane === "center") return; // validate
- if (s.isClosed || s.isResizing)
- return; // skip if already closed OR in process of resizing
- else if (o.slideTrigger_close === "click")
- close_NOW(); // close immediately onClick
- else if (o.preventQuickSlideClose && s.isMoving)
- return; // handle Chrome quick-close on slide-open
- else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane]))
- return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
- else if (evt) // trigger = mouseleave - use a delay
- // 1 sec delay if 'opening', else .3 sec
- timer.set(pane+"_closeSlider", close_NOW, max(o.slideDelay_close, delay));
- else // called programically
- close_NOW();
-
- /**
- * SUBROUTINE for timed close
- */
- function close_NOW () {
- if (s.isClosed) // skip 'close' if already closed!
- bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here?
- else if (!s.isMoving)
- close(pane); // close will handle unbinding
- };
- }
-
- /**
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- */
-, slideToggle = function (evt_or_pane) {
- var pane = evtPane.call(this, evt_or_pane);
- toggle(pane, true);
- }
-
-
- /**
- * Must set left/top on East/South panes so animation will work properly
- *
- * @param {string} pane The pane to lock, 'east' or 'south' - any other is ignored!
- * @param {boolean} doLock true = set left/top, false = remove
- */
-, lockPaneForFX = function (pane, doLock) {
- var $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- , z = options.zIndexes
- ;
- if (doLock) {
- showMasks( pane, { animation: true, objectsOnly: true });
- $P.css({ zIndex: z.pane_animate }); // overlay all elements during animation
- if (pane=="south")
- $P.css({ top: sC.inset.top + sC.innerHeight - $P.outerHeight() });
- else if (pane=="east")
- $P.css({ left: sC.inset.left + sC.innerWidth - $P.outerWidth() });
- }
- else { // animation DONE - RESET CSS
- hideMasks();
- $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
- if (pane=="south")
- $P.css({ top: "auto" });
- // if pane is positioned 'off-screen', then DO NOT screw with it!
- else if (pane=="east" && !$P.css("left").match(/\-99999/))
- $P.css({ left: "auto" });
- // fix anti-aliasing in IE - only needed for animations that change opacity
- if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opacity") == 1)
- $P[0].style.removeAttribute('filter');
- }
- }
-
-
- /**
- * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
- *
- * @see open(), close()
- * @param {string} pane The pane to enable/disable, 'north', 'south', etc.
- * @param {boolean} enable Enable or Disable sliding?
- */
-, bindStartSlidingEvents = function (pane, enable) {
- var o = options[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , evtName = o.slideTrigger_open.toLowerCase()
- ;
- if (!$R || (enable && !o.slidable)) return;
-
- // make sure we have a valid event
- if (evtName.match(/mouseover/))
- evtName = o.slideTrigger_open = "mouseenter";
- else if (!evtName.match(/(click|dblclick|mouseenter)/))
- evtName = o.slideTrigger_open = "click";
-
- // must remove double-click-toggle when using dblclick-slide
- if (o.resizerDblClickToggle && evtName.match(/click/)) {
- $R[enable ? "unbind" : "bind"]('dblclick.'+ sID, toggle)
- }
-
- $R
- // add or remove event
- [enable ? "bind" : "unbind"](evtName +'.'+ sID, slideOpen)
- // set the appropriate cursor & title/tip
- .css("cursor", enable ? o.sliderCursor : "default")
- .attr("title", enable ? o.tips.Slide : "")
- ;
- }
-
- /**
- * Add or remove 'mouseleave' events to 'slide close' when pane is 'sliding' open or closed
- * Also increases zIndex when pane is sliding open
- * See bindStartSlidingEvents for code to control 'slide open'
- *
- * @see slideOpen(), slideClose()
- * @param {string} pane The pane to process, 'north', 'south', etc.
- * @param {boolean} enable Enable or Disable events?
- */
-, bindStopSlidingEvents = function (pane, enable) {
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , z = options.zIndexes
- , evtName = o.slideTrigger_close.toLowerCase()
- , action = (enable ? "bind" : "unbind")
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- timer.clear(pane+"_closeSlider"); // just in case
-
- if (enable) {
- s.isSliding = true;
- state.panesSliding[pane] = true;
- // remove 'slideOpen' event from resizer
- // ALSO will raise the zIndex of the pane & resizer
- bindStartSlidingEvents(pane, false);
- }
- else {
- s.isSliding = false;
- delete state.panesSliding[pane];
- }
-
- // RE/SET zIndex - increases when pane is sliding-open, resets to normal when not
- $P.css("zIndex", enable ? z.pane_sliding : z.pane_normal);
- $R.css("zIndex", enable ? z.pane_sliding+2 : z.resizer_normal); // NOTE: mask = pane_sliding+1
-
- // make sure we have a valid event
- if (!evtName.match(/(click|mouseleave)/))
- evtName = o.slideTrigger_close = "mouseleave"; // also catches 'mouseout'
-
- // add/remove slide triggers
- $R[action](evtName, slideClose); // base event on resize
- // need extra events for mouseleave
- if (evtName === "mouseleave") {
- // also close on pane.mouseleave
- $P[action]("mouseleave."+ sID, slideClose);
- // cancel timer when mouse moves between 'pane' and 'resizer'
- $R[action]("mouseenter."+ sID, cancelMouseOut);
- $P[action]("mouseenter."+ sID, cancelMouseOut);
- }
-
- if (!enable)
- timer.clear(pane+"_closeSlider");
- else if (evtName === "click" && !o.resizable) {
- // IF pane is not resizable (which already has a cursor and tip)
- // then set the a cursor & title/tip on resizer when sliding
- $R.css("cursor", enable ? o.sliderCursor : "default");
- $R.attr("title", enable ? o.tips.Close : ""); // use Toggler-tip, eg: "Close Pane"
- }
-
- // SUBROUTINE for mouseleave timer clearing
- function cancelMouseOut (evt) {
- timer.clear(pane+"_closeSlider");
- evt.stopPropagation();
- }
- }
-
-
- /**
- * Hides/closes a pane if there is insufficient room - reverses this when there is room again
- * MUST have already called setSizeLimits() before calling this method
- *
- * @param {string} pane The pane being resized
- * @param {boolean=} [isOpening=false] Called from onOpen?
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [force=false]
- */
-, makePaneFit = function (pane, isOpening, skipCallback, force) {
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , isSidePane = c.dir==="vert"
- , hasRoom = false
- ;
- // special handling for center & east/west panes
- if (pane === "center" || (isSidePane && s.noVerticalRoom)) {
- // see if there is enough room to display the pane
- // ERROR: hasRoom = s.minHeight <= s.maxHeight && (isSidePane || s.minWidth <= s.maxWidth);
- hasRoom = (s.maxHeight >= 0);
- if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now
- _showPane(pane);
- if ($R) $R.show();
- s.isVisible = true;
- s.noRoom = false;
- if (isSidePane) s.noVerticalRoom = false;
- _fixIframe(pane);
- }
- else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now
- _hidePane(pane);
- if ($R) $R.hide();
- s.isVisible = false;
- s.noRoom = true;
- }
- }
-
- // see if there is enough room to fit the border-pane
- if (pane === "center") {
- // ignore center in this block
- }
- else if (s.minSize <= s.maxSize) { // pane CAN fit
- hasRoom = true;
- if (s.size > s.maxSize) // pane is too big - shrink it
- sizePane(pane, s.maxSize, skipCallback, true, force); // true = noAnimation
- else if (s.size < s.minSize) // pane is too small - enlarge it
- sizePane(pane, s.minSize, skipCallback, true, force); // true = noAnimation
- // need s.isVisible because new pseudoClose method keeps pane visible, but off-screen
- else if ($R && s.isVisible && $P.is(":visible")) {
- // make sure resizer-bar is positioned correctly
- // handles situation where nested layout was 'hidden' when initialized
- var pos = s.size + sC.inset[c.side];
- if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos );
- }
-
- // if was previously hidden due to noRoom, then RESET because NOW there is room
- if (s.noRoom) {
- // s.noRoom state will be set by open or show
- if (s.wasOpen && o.closable) {
- if (o.autoReopen)
- open(pane, false, true, true); // true = noAnimation, true = noAlert
- else // leave the pane closed, so just update state
- s.noRoom = false;
- }
- else
- show(pane, s.wasOpen, true, true); // true = noAnimation, true = noAlert
- }
- }
- else { // !hasRoom - pane CANNOT fit
- if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now...
- s.noRoom = true; // update state
- s.wasOpen = !s.isClosed && !s.isSliding;
- if (s.isClosed){} // SKIP
- else if (o.closable) // 'close' if possible
- close(pane, true, true); // true = force, true = noAnimation
- else // 'hide' pane if cannot just be closed
- hide(pane, true); // true = noAnimation
- }
- }
- }
-
-
- /**
- * manualSizePane is an exposed flow-through method allowing extra code when pane is 'manually resized'
- *
- * @param {(string|Object)} evt_or_pane The pane being resized
- * @param {number} size The *desired* new size for this pane - will be validated
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [force=false] Force resizing even if does not seem necessary
- */
-, manualSizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete...
- , forceResize = force || (o.livePaneResizing && !s.isResizing)
- ;
- if (pane === "center") return; // validate
- // ANY call to manualSizePane disables autoResize - ie, percentage sizing
- s.autoResize = false;
- // flow-through...
- sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option enabled
- }
-
- /**
- * sizePane is called only by internal methods whenever a pane needs to be resized
- *
- * @param {(string|Object)} evt_or_pane The pane being resized
- * @param {number} size The *desired* new size for this pane - will be validated
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [force=false] Force resizing even if does not seem necessary
- */
-, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , side = _c[pane].side
- , dimName = _c[pane].sizeType.toLowerCase()
- , skipResizeWhileDragging = s.isResizing && !o.triggerEventsDuringLiveResize
- , doFX = noAnimation !== true && o.animatePaneSizing
- , oldSize, newSize
- ;
- if (pane === "center") return; // validate
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
- // calculate 'current' min/max sizes
- setSizeLimits(pane); // update pane-state
- oldSize = s.size;
- size = _parseSize(pane, size); // handle percentages & auto
- size = max(size, _parseSize(pane, o.minSize));
- size = min(size, s.maxSize);
- if (size < s.minSize) { // not enough room for pane!
- queueNext(); // call before makePaneFit() because it needs the queue free
- makePaneFit(pane, false, skipCallback); // will hide or close pane
- return;
- }
-
- // IF newSize is same as oldSize, then nothing to do - abort
- if (!force && size === oldSize)
- return queueNext();
-
- s.newSize = size;
-
- // onresize_start callback CANNOT cancel resizing because this would break the layout!
- if (!skipCallback && state.initialized && s.isVisible)
- _runCallbacks("onresize_start", pane);
-
- // resize the pane, and make sure its visible
- newSize = cssSize(pane, size);
-
- if (doFX && $P.is(":visible")) { // ANIMATE
- var fx = $.layout.effects.size[pane] || $.layout.effects.size.all
- , easing = o.fxSettings_size.easing || fx.easing
- , z = options.zIndexes
- , props = {};
- props[ dimName ] = newSize +'px';
- s.isMoving = true;
- // overlay all elements during animation
- $P.css({ zIndex: z.pane_animate })
- .show().animate( props, o.fxSpeed_size, easing, function(){
- // reset zIndex after animation
- $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
- s.isMoving = false;
- delete s.newSize;
- sizePane_2(); // continue
- queueNext();
- });
- }
- else { // no animation
- $P.css( dimName, newSize ); // resize pane
- delete s.newSize;
- // if pane is visible, then
- if ($P.is(":visible"))
- sizePane_2(); // continue
- else {
- // pane is NOT VISIBLE, so just update state data...
- // when pane is *next opened*, it will have the new size
- s.size = size; // update state.size
- //$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible! }
- }
- queueNext();
- };
-
- });
-
- // SUBROUTINE
- function sizePane_2 () {
- /* Panes are sometimes not sized precisely in some browsers!?
- * This code will resize the pane up to 3 times to nudge the pane to the correct size
- */
- var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight()
- , tries = [{
- pane: pane
- , count: 1
- , target: size
- , actual: actual
- , correct: (size === actual)
- , attempt: size
- , cssSize: newSize
- }]
- , lastTry = tries[0]
- , thisTry = {}
- , msg = 'Inaccurate size after resizing the '+ pane +'-pane.'
- ;
- while ( !lastTry.correct ) {
- thisTry = { pane: pane, count: lastTry.count+1, target: size };
-
- if (lastTry.actual > size)
- thisTry.attempt = max(0, lastTry.attempt - (lastTry.actual - size));
- else // lastTry.actual < size
- thisTry.attempt = max(0, lastTry.attempt + (size - lastTry.actual));
-
- thisTry.cssSize = cssSize(pane, thisTry.attempt);
- $P.css( dimName, thisTry.cssSize );
-
- thisTry.actual = dimName=='width' ? $P.outerWidth() : $P.outerHeight();
- thisTry.correct = (size === thisTry.actual);
-
- // log attempts and alert the user of this *non-fatal error* (if showDebugMessages)
- if ( tries.length === 1) {
- _log(msg, false, true);
- _log(lastTry, false, true);
- }
- _log(thisTry, false, true);
- // after 4 tries, is as close as its gonna get!
- if (tries.length > 3) break;
-
- tries.push( thisTry );
- lastTry = tries[ tries.length - 1 ];
- }
- // END TESTING CODE
-
- // update pane-state dimensions
- s.size = size;
- $.extend(s, elDims($P));
-
- if (s.isVisible && $P.is(":visible")) {
- // reposition the resizer-bar
- if ($R) $R.css( side, size + sC.inset[side] );
- // resize the content-div
- sizeContent(pane);
- }
-
- if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible)
- _runCallbacks("onresize_end", pane);
-
- // resize all the adjacent panes, and adjust their toggler buttons
- // when skipCallback passed, it means the controlling method will handle 'other panes'
- if (!skipCallback) {
- // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize
- if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, force);
- sizeHandles();
- }
-
- // if opposite-pane was autoClosed, see if it can be autoOpened now
- var altPane = _c.oppositeEdge[pane];
- if (size < oldSize && state[ altPane ].noRoom) {
- setSizeLimits( altPane );
- makePaneFit( altPane, false, skipCallback );
- }
-
- // DEBUG - ALERT user/developer so they know there was a sizing problem
- if (tries.length > 1)
- _log(msg +'\nSee the Error Console for details.', true, true);
- }
- }
-
- /**
- * @see initPanes(), sizePane(), resizeAll(), open(), close(), hide()
- * @param {(Array.<string>|string)} panes The pane(s) being resized, comma-delmited string
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [force=false]
- */
-, sizeMidPanes = function (panes, skipCallback, force) {
- panes = (panes ? panes : "east,west,center").split(",");
-
- $.each(panes, function (i, pane) {
- if (!$Ps[pane]) return; // NO PANE - skip
- var
- o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , isCenter= (pane=="center")
- , hasRoom = true
- , CSS = {}
- // if pane is not visible, show it invisibly NOW rather than for *each call* in this script
- , visCSS = $.layout.showInvisibly($P)
-
- , newCenter = calcNewCenterPaneDims()
- ;
-
- // update pane-state dimensions
- $.extend(s, elDims($P));
-
- if (pane === "center") {
- if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeight) {
- $P.css(visCSS);
- return true; // SKIP - pane already the correct size
- }
- // set state for makePaneFit() logic
- $.extend(s, cssMinDims(pane), {
- maxWidth: newCenter.width
- , maxHeight: newCenter.height
- });
- CSS = newCenter;
- s.newWidth = CSS.width;
- s.newHeight = CSS.height;
- // convert OUTER width/height to CSS width/height
- CSS.width = cssW($P, CSS.width);
- // NEW - allow pane to extend 'below' visible area rather than hide it
- CSS.height = cssH($P, CSS.height);
- hasRoom = CSS.width >= 0 && CSS.height >= 0; // height >= 0 = ALWAYS TRUE NOW
-
- // during layout init, try to shrink east/west panes to make room for center
- if (!state.initialized && o.minWidth > newCenter.width) {
- var
- reqPx = o.minWidth - s.outerWidth
- , minE = options.east.minSize || 0
- , minW = options.west.minSize || 0
- , sizeE = state.east.size
- , sizeW = state.west.size
- , newE = sizeE
- , newW = sizeW
- ;
- if (reqPx > 0 && state.east.isVisible && sizeE > minE) {
- newE = max( sizeE-minE, sizeE-reqPx );
- reqPx -= sizeE-newE;
- }
- if (reqPx > 0 && state.west.isVisible && sizeW > minW) {
- newW = max( sizeW-minW, sizeW-reqPx );
- reqPx -= sizeW-newW;
- }
- // IF we found enough extra space, then resize the border panes as calculated
- if (reqPx === 0) {
- if (sizeE && sizeE != minE)
- sizePane('east', newE, true, true, force); // true = skipCallback/noAnimation - initPanes will handle when done
- if (sizeW && sizeW != minW)
- sizePane('west', newW, true, true, force); // true = skipCallback/noAnimation
- // now start over!
- sizeMidPanes('center', skipCallback, force);
- $P.css(visCSS);
- return; // abort this loop
- }
- }
- }
- else { // for east and west, set only the height, which is same as center height
- // set state.min/maxWidth/Height for makePaneFit() logic
- if (s.isVisible && !s.noVerticalRoom)
- $.extend(s, elDims($P), cssMinDims(pane))
- if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) {
- $P.css(visCSS);
- return true; // SKIP - pane already the correct size
- }
- // east/west have same top, bottom & height as center
- CSS.top = newCenter.top;
- CSS.bottom = newCenter.bottom;
- s.newSize = newCenter.height
- // NEW - allow pane to extend 'below' visible area rather than hide it
- CSS.height = cssH($P, newCenter.height);
- s.maxHeight = CSS.height;
- hasRoom = (s.maxHeight >= 0); // ALWAYS TRUE NOW
- if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic
- }
-
- if (hasRoom) {
- // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
- if (!skipCallback && state.initialized)
- _runCallbacks("onresize_start", pane);
-
- $P.css(CSS); // apply the CSS to pane
- if (pane !== "center")
- sizeHandles(pane); // also update resizer length
- if (s.noRoom && !s.isClosed && !s.isHidden)
- makePaneFit(pane); // will re-open/show auto-closed/hidden pane
- if (s.isVisible) {
- $.extend(s, elDims($P)); // update pane dimensions
- if (state.initialized) sizeContent(pane); // also resize the contents, if exists
- }
- }
- else if (!s.noRoom && s.isVisible) // no room for pane
- makePaneFit(pane); // will hide or close pane
-
- // reset visibility, if necessary
- $P.css(visCSS);
-
- delete s.newSize;
- delete s.newWidth;
- delete s.newHeight;
-
- if (!s.isVisible)
- return true; // DONE - next pane
-
- /*
- * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
- * Normally these panes have only 'left' & 'right' positions so pane auto-sizes
- * ALSO required when pane is an IFRAME because will NOT default to 'full width'
- * TODO: Can I use width:100% for a north/south iframe?
- * TODO: Sounds like a job for $P.outerWidth( sC.innerWidth ) SETTER METHOD
- */
- if (pane === "center") { // finished processing midPanes
- var fix = browser.isIE6 || !browser.boxModel;
- if ($Ps.north && (fix || state.north.tagName=="IFRAME"))
- $Ps.north.css("width", cssW($Ps.north, sC.innerWidth));
- if ($Ps.south && (fix || state.south.tagName=="IFRAME"))
- $Ps.south.css("width", cssW($Ps.south, sC.innerWidth));
- }
-
- // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
- if (!skipCallback && state.initialized)
- _runCallbacks("onresize_end", pane);
- });
- }
-
-
- /**
- * @see window.onresize(), callbacks or custom code
- * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning
- */
-, resizeAll = function (evt_or_refresh) {
- var oldW = sC.innerWidth
- , oldH = sC.innerHeight
- ;
- // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
- evtPane(evt_or_refresh);
-
- // cannot size layout when 'container' is hidden or collapsed
- if (!$N.is(":visible")) return;
-
- if (!state.initialized) {
- _initLayoutElements();
- return; // no need to resize since we just initialized!
- }
-
- if (evt_or_refresh === true && $.isPlainObject(options.outset)) {
- // update container CSS in case outset option has changed
- $N.css( options.outset );
- }
- // UPDATE container dimensions
- $.extend(sC, elDims( $N, options.inset ));
- if (!sC.outerHeight) return;
-
- // if 'true' passed, refresh pane & handle positioning too
- if (evt_or_refresh === true) {
- setPanePosition();
- }
-
- // onresizeall_start will CANCEL resizing if returns false
- // state.container has already been set, so user can access this info for calcuations
- if (false === _runCallbacks("onresizeall_start")) return false;
-
- var // see if container is now 'smaller' than before
- shrunkH = (sC.innerHeight < oldH)
- , shrunkW = (sC.innerWidth < oldW)
- , $P, o, s
- ;
- // NOTE special order for sizing: S-N-E-W
- $.each(["south","north","east","west"], function (i, pane) {
- if (!$Ps[pane]) return; // no pane - SKIP
- o = options[pane];
- s = state[pane];
- if (s.autoResize && s.size != o.size) // resize pane to original size set in options
- sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
- else {
- setSizeLimits(pane);
- makePaneFit(pane, false, true, true); // true=skipCallback/forceResize
- }
- });
-
- sizeMidPanes("", true, true); // true=skipCallback/forceResize
- sizeHandles(); // reposition the toggler elements
-
- // trigger all individual pane callbacks AFTER layout has finished resizing
- $.each(_c.allPanes, function (i, pane) {
- $P = $Ps[pane];
- if (!$P) return; // SKIP
- if (state[pane].isVisible) // undefined for non-existent panes
- _runCallbacks("onresize_end", pane); // callback - if exists
- });
-
- _runCallbacks("onresizeall_end");
- //_triggerLayoutEvent(pane, 'resizeall');
- }
-
- /**
- * Whenever a pane resizes or opens that has a nested layout, trigger resizeAll
- *
- * @param {(string|Object)} evt_or_pane The pane just resized or opened
- */
-, resizeChildren = function (evt_or_pane, skipRefresh) {
- var pane = evtPane.call(this, evt_or_pane);
-
- if (!options[pane].resizeChildren) return;
-
- // ensure the pane-children are up-to-date
- if (!skipRefresh) refreshChildren( pane );
- var pC = children[pane];
- if ($.isPlainObject( pC )) {
- // resize one or more children
- $.each( pC, function (key, child) {
- if (!child.destroyed) child.resizeAll();
- });
- }
- }
-
- /**
- * IF pane has a content-div, then resize all elements inside pane to fit pane-height
- *
- * @param {(string|Object)} evt_or_panes The pane(s) being resized
- * @param {boolean=} [remeasure=false] Should the content (header/footer) be remeasured?
- */
-, sizeContent = function (evt_or_panes, remeasure) {
- if (!isInitialized()) return;
-
- var panes = evtPane.call(this, evt_or_panes);
- panes = panes ? panes.split(",") : _c.allPanes;
-
- $.each(panes, function (idx, pane) {
- var
- $P = $Ps[pane]
- , $C = $Cs[pane]
- , o = options[pane]
- , s = state[pane]
- , m = s.content // m = measurements
- ;
- if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip
-
- // if content-element was REMOVED, update OR remove the pointer
- if (!$C.length) {
- initContent(pane, false); // false = do NOT sizeContent() - already there!
- if (!$C) return; // no replacement element found - pointer have been removed
- }
-
- // onsizecontent_start will CANCEL resizing if returns false
- if (false === _runCallbacks("onsizecontent_start", pane)) return;
-
- // skip re-measuring offsets if live-resizing
- if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) {
- _measure();
- // if any footers are below pane-bottom, they may not measure correctly,
- // so allow pane overflow and re-measure
- if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") {
- $P.css("overflow", "visible");
- _measure(); // remeasure while overflowing
- $P.css("overflow", "hidden");
- }
- }
- // NOTE: spaceAbove/Below *includes* the pane paddingTop/Bottom, but not pane.borders
- var newH = s.innerHeight - (m.spaceAbove - s.css.paddingTop) - (m.spaceBelow - s.css.paddingBottom);
-
- if (!$C.is(":visible") || m.height != newH) {
- // size the Content element to fit new pane-size - will autoHide if not enough room
- setOuterHeight($C, newH, true); // true=autoHide
- m.height = newH; // save new height
- };
-
- if (state.initialized)
- _runCallbacks("onsizecontent_end", pane);
-
- function _below ($E) {
- return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0));
- };
-
- function _measure () {
- var
- ignore = options[pane].contentIgnoreSelector
- , $Fs = $C.nextAll().not(".ui-layout-mask").not(ignore || ":lt(0)") // not :lt(0) = ALL
- , $Fs_vis = $Fs.filter(':visible')
- , $F = $Fs_vis.filter(':last')
- ;
- m = {
- top: $C[0].offsetTop
- , height: $C.outerHeight()
- , numFooters: $Fs.length
- , hiddenFooters: $Fs.length - $Fs_vis.length
- , spaceBelow: 0 // correct if no content footer ($E)
- }
- m.spaceAbove = m.top; // just for state - not used in calc
- m.bottom = m.top + m.height;
- if ($F.length)
- //spaceBelow = (LastFooter.top + LastFooter.height) [footerBottom] - Content.bottom + max(LastFooter.marginBottom, pane.paddingBotom)
- m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F);
- else // no footer - check marginBottom on Content element itself
- m.spaceBelow = _below($C);
- };
- });
- }
-
-
- /**
- * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
- *
- * @see initHandles(), open(), close(), resizeAll()
- * @param {(string|Object)=} evt_or_panes The pane(s) being resized
- */
-, sizeHandles = function (evt_or_panes) {
- var panes = evtPane.call(this, evt_or_panes)
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- $.each(panes, function (i, pane) {
- var
- o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , $TC
- ;
- if (!$P || !$R) return;
-
- var
- dir = _c[pane].dir
- , _state = (s.isClosed ? "_closed" : "_open")
- , spacing = o["spacing"+ _state]
- , togAlign = o["togglerAlign"+ _state]
- , togLen = o["togglerLength"+ _state]
- , paneLen
- , left
- , offset
- , CSS = {}
- ;
-
- if (spacing === 0) {
- $R.hide();
- return;
- }
- else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
- $R.show(); // in case was previously hidden
-
- // Resizer Bar is ALWAYS same width/height of pane it is attached to
- if (dir === "horz") { // north/south
- //paneLen = $P.outerWidth(); // s.outerWidth ||
- paneLen = sC.innerWidth; // handle offscreen-panes
- s.resizerLength = paneLen;
- left = $.layout.cssNum($P, "left")
- $R.css({
- width: cssW($R, paneLen) // account for borders & padding
- , height: cssH($R, spacing) // ditto
- , left: left > -9999 ? left : sC.inset.left // handle offscreen-panes
- });
- }
- else { // east/west
- paneLen = $P.outerHeight(); // s.outerHeight ||
- s.resizerLength = paneLen;
- $R.css({
- height: cssH($R, paneLen) // account for borders & padding
- , width: cssW($R, spacing) // ditto
- , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane?
- //, top: $.layout.cssNum($Ps["center"], "top")
- });
- }
-
- // remove hover classes
- removeHover( o, $R );
-
- if ($T) {
- if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) {
- $T.hide(); // always HIDE the toggler when 'sliding'
- return;
- }
- else
- $T.show(); // in case was previously hidden
-
- if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) {
- togLen = paneLen;
- offset = 0;
- }
- else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
- if (isStr(togAlign)) {
- switch (togAlign) {
- case "top":
- case "left": offset = 0;
- break;
- case "bottom":
- case "right": offset = paneLen - togLen;
- break;
- case "middle":
- case "center":
- default: offset = round((paneLen - togLen) / 2); // 'default' catches typos
- }
- }
- else { // togAlign = number
- var x = parseInt(togAlign, 10); //
- if (togAlign >= 0) offset = x;
- else offset = paneLen - togLen + x; // NOTE: x is negative!
- }
- }
-
- if (dir === "horz") { // north/south
- var width = cssW($T, togLen);
- $T.css({
- width: width // account for borders & padding
- , height: cssH($T, spacing) // ditto
- , left: offset // TODO: VERIFY that toggler positions correctly for ALL values
- , top: 0
- });
- // CENTER the toggler content SPAN
- $T.children(".content").each(function(){
- $TC = $(this);
- $TC.css("marginLeft", round((width-$TC.outerWidth())/2)); // could be negative
- });
- }
- else { // east/west
- var height = cssH($T, togLen);
- $T.css({
- height: height // account for borders & padding
- , width: cssW($T, spacing) // ditto
- , top: offset // POSITION the toggler
- , left: 0
- });
- // CENTER the toggler content SPAN
- $T.children(".content").each(function(){
- $TC = $(this);
- $TC.css("marginTop", round((height-$TC.outerHeight())/2)); // could be negative
- });
- }
-
- // remove ALL hover classes
- removeHover( 0, $T );
- }
-
- // DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
- if (!state.initialized && (o.initHidden || s.isHidden)) {
- $R.hide();
- if ($T) $T.hide();
- }
- });
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableClosable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $T = $Ts[pane]
- , o = options[pane]
- ;
- if (!$T) return;
- o.closable = true;
- $T .bind("click."+ sID, function(evt){ evt.stopPropagation(); toggle(pane); })
- .css("visibility", "visible")
- .css("cursor", "pointer")
- .attr("title", state[pane].isClosed ? o.tips.Open : o.tips.Close) // may be blank
- .show();
- }
- /**
- * @param {(string|Object)} evt_or_pane
- * @param {boolean=} [hide=false]
- */
-, disableClosable = function (evt_or_pane, hide) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $T = $Ts[pane]
- ;
- if (!$T) return;
- options[pane].closable = false;
- // is closable is disable, then pane MUST be open!
- if (state[pane].isClosed) open(pane, false, true);
- $T .unbind("."+ sID)
- .css("visibility", hide ? "hidden" : "visible") // instead of hide(), which creates logic issues
- .css("cursor", "default")
- .attr("title", "");
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableSlidable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- options[pane].slidable = true;
- if (state[pane].isClosed)
- bindStartSlidingEvents(pane, true);
- }
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, disableSlidable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R) return;
- options[pane].slidable = false;
- if (state[pane].isSliding)
- close(pane, false, true);
- else {
- bindStartSlidingEvents(pane, false);
- $R .css("cursor", "default")
- .attr("title", "");
- removeHover(null, $R[0]); // in case currently hovered
- }
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableResizable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- , o = options[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- o.resizable = true;
- $R.draggable("enable");
- if (!state[pane].isClosed)
- $R .css("cursor", o.resizerCursor)
- .attr("title", o.tips.Resize);
- }
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, disableResizable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- options[pane].resizable = false;
- $R .draggable("disable")
- .css("cursor", "default")
- .attr("title", "");
- removeHover(null, $R[0]); // in case currently hovered
- }
-
-
- /**
- * Move a pane from source-side (eg, west) to target-side (eg, east)
- * If pane exists on target-side, move that to source-side, ie, 'swap' the panes
- *
- * @param {(string|Object)} evt_or_pane1 The pane/edge being swapped
- * @param {string} pane2 ditto
- */
-, swapPanes = function (evt_or_pane1, pane2) {
- if (!isInitialized()) return;
- var pane1 = evtPane.call(this, evt_or_pane1);
- // change state.edge NOW so callbacks can know where pane is headed...
- state[pane1].edge = pane2;
- state[pane2].edge = pane1;
- // run these even if NOT state.initialized
- if (false === _runCallbacks("onswap_start", pane1)
- || false === _runCallbacks("onswap_start", pane2)
- ) {
- state[pane1].edge = pane1; // reset
- state[pane2].edge = pane2;
- return;
- }
-
- var
- oPane1 = copy( pane1 )
- , oPane2 = copy( pane2 )
- , sizes = {}
- ;
- sizes[pane1] = oPane1 ? oPane1.state.size : 0;
- sizes[pane2] = oPane2 ? oPane2.state.size : 0;
-
- // clear pointers & state
- $Ps[pane1] = false;
- $Ps[pane2] = false;
- state[pane1] = {};
- state[pane2] = {};
-
- // ALWAYS remove the resizer & toggler elements
- if ($Ts[pane1]) $Ts[pane1].remove();
- if ($Ts[pane2]) $Ts[pane2].remove();
- if ($Rs[pane1]) $Rs[pane1].remove();
- if ($Rs[pane2]) $Rs[pane2].remove();
- $Rs[pane1] = $Rs[pane2] = $Ts[pane1] = $Ts[pane2] = false;
-
- // transfer element pointers and data to NEW Layout keys
- move( oPane1, pane2 );
- move( oPane2, pane1 );
-
- // cleanup objects
- oPane1 = oPane2 = sizes = null;
-
- // make panes 'visible' again
- if ($Ps[pane1]) $Ps[pane1].css(_c.visible);
- if ($Ps[pane2]) $Ps[pane2].css(_c.visible);
-
- // fix any size discrepancies caused by swap
- resizeAll();
-
- // run these even if NOT state.initialized
- _runCallbacks("onswap_end", pane1);
- _runCallbacks("onswap_end", pane2);
-
- return;
-
- function copy (n) { // n = pane
- var
- $P = $Ps[n]
- , $C = $Cs[n]
- ;
- return !$P ? false : {
- pane: n
- , P: $P ? $P[0] : false
- , C: $C ? $C[0] : false
- , state: $.extend(true, {}, state[n])
- , options: $.extend(true, {}, options[n])
- }
- };
-
- function move (oPane, pane) {
- if (!oPane) return;
- var
- P = oPane.P
- , C = oPane.C
- , oldPane = oPane.pane
- , c = _c[pane]
- // save pane-options that should be retained
- , s = $.extend(true, {}, state[pane])
- , o = options[pane]
- // RETAIN side-specific FX Settings - more below
- , fx = { resizerCursor: o.resizerCursor }
- , re, size, pos
- ;
- $.each("fxName,fxSpeed,fxSettings".split(","), function (i, k) {
- fx[k +"_open"] = o[k +"_open"];
- fx[k +"_close"] = o[k +"_close"];
- fx[k +"_size"] = o[k +"_size"];
- });
-
- // update object pointers and attributes
- $Ps[pane] = $(P)
- .data({
- layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- })
- .css(_c.hidden)
- .css(c.cssReq)
- ;
- $Cs[pane] = C ? $(C) : false;
-
- // set options and state
- options[pane] = $.extend(true, {}, oPane.options, fx);
- state[pane] = $.extend(true, {}, oPane.state);
-
- // change classNames on the pane, eg: ui-layout-pane-east ==> ui-layout-pane-west
- re = new RegExp(o.paneClass +"-"+ oldPane, "g");
- P.className = P.className.replace(re, o.paneClass +"-"+ pane);
-
- // ALWAYS regenerate the resizer & toggler elements
- initHandles(pane); // create the required resizer & toggler
-
- // if moving to different orientation, then keep 'target' pane size
- if (c.dir != _c[oldPane].dir) {
- size = sizes[pane] || 0;
- setSizeLimits(pane); // update pane-state
- size = max(size, state[pane].minSize);
- // use manualSizePane to disable autoResize - not useful after panes are swapped
- manualSizePane(pane, size, true, true); // true/true = skipCallback/noAnimation
- }
- else // move the resizer here
- $Rs[pane].css(c.side, sC.inset[c.side] + (state[pane].isVisible ? getPaneSize(pane) : 0));
-
-
- // ADD CLASSNAMES & SLIDE-BINDINGS
- if (oPane.state.isVisible && !s.isVisible)
- setAsOpen(pane, true); // true = skipCallback
- else {
- setAsClosed(pane);
- bindStartSlidingEvents(pane, true); // will enable events IF option is set
- }
-
- // DESTROY the object
- oPane = null;
- };
- }
-
-
- /**
- * INTERNAL method to sync pin-buttons when pane is opened or closed
- * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
- *
- * @see open(), setAsOpen(), setAsClosed()
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin True means set the pin 'down', False means 'up'
- */
-, syncPinBtns = function (pane, doPin) {
- if ($.layout.plugins.buttons)
- $.each(state[pane].pins, function (i, selector) {
- $.layout.buttons.setPinState(Instance, $(selector), pane, doPin);
- });
- }
-
-; // END var DECLARATIONS
-
- /**
- * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
- *
- * @see document.keydown()
- */
- function keyDown (evt) {
- if (!evt) return true;
- var code = evt.keyCode;
- if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
-
- var
- PANE = {
- 38: "north" // Up Cursor - $.ui.keyCode.UP
- , 40: "south" // Down Cursor - $.ui.keyCode.DOWN
- , 37: "west" // Left Cursor - $.ui.keyCode.LEFT
- , 39: "east" // Right Cursor - $.ui.keyCode.RIGHT
- }
- , ALT = evt.altKey // no worky!
- , SHIFT = evt.shiftKey
- , CTRL = evt.ctrlKey
- , CURSOR = (CTRL && code >= 37 && code <= 40)
- , o, k, m, pane
- ;
-
- if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
- pane = PANE[code];
- else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey
- $.each(_c.borderPanes, function (i, p) { // loop each pane to check its hotkey
- o = options[p];
- k = o.customHotkey;
- m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
- if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
- if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
- pane = p;
- return false; // BREAK
- }
- }
- });
-
- // validate pane
- if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden)
- return true;
-
- toggle(pane);
-
- evt.stopPropagation();
- evt.returnValue = false; // CANCEL key
- return false;
- };
-
-
-/*
- * ######################################
- * UTILITY METHODS
- * called externally or by initButtons
- * ######################################
- */
-
- /**
- * Change/reset a pane overflow setting & zIndex to allow popups/drop-downs to work
- *
- * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
- */
- function allowOverflow (el) {
- if (!isInitialized()) return;
- if (this && this.tagName) el = this; // BOUND to element
- var $P;
- if (isStr(el))
- $P = $Ps[el];
- else if ($(el).data("layoutRole"))
- $P = $(el);
- else
- $(el).parents().each(function(){
- if ($(this).data("layoutRole")) {
- $P = $(this);
- return false; // BREAK
- }
- });
- if (!$P || !$P.length) return; // INVALID
-
- var
- pane = $P.data("layoutEdge")
- , s = state[pane]
- ;
-
- // if pane is already raised, then reset it before doing it again!
- // this would happen if allowOverflow is attached to BOTH the pane and an element
- if (s.cssSaved)
- resetOverflow(pane); // reset previous CSS before continuing
-
- // if pane is raised by sliding or resizing, or its closed, then abort
- if (s.isSliding || s.isResizing || s.isClosed) {
- s.cssSaved = false;
- return;
- }
-
- var
- newCSS = { zIndex: (options.zIndexes.resizer_normal + 1) }
- , curCSS = {}
- , of = $P.css("overflow")
- , ofX = $P.css("overflowX")
- , ofY = $P.css("overflowY")
- ;
- // determine which, if any, overflow settings need to be changed
- if (of != "visible") {
- curCSS.overflow = of;
- newCSS.overflow = "visible";
- }
- if (ofX && !ofX.match(/(visible|auto)/)) {
- curCSS.overflowX = ofX;
- newCSS.overflowX = "visible";
- }
- if (ofY && !ofY.match(/(visible|auto)/)) {
- curCSS.overflowY = ofX;
- newCSS.overflowY = "visible";
- }
-
- // save the current overflow settings - even if blank!
- s.cssSaved = curCSS;
-
- // apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
- $P.css( newCSS );
-
- // make sure the zIndex of all other panes is normal
- $.each(_c.allPanes, function(i, p) {
- if (p != pane) resetOverflow(p);
- });
-
- };
- /**
- * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
- */
- function resetOverflow (el) {
- if (!isInitialized()) return;
- if (this && this.tagName) el = this; // BOUND to element
- var $P;
- if (isStr(el))
- $P = $Ps[el];
- else if ($(el).data("layoutRole"))
- $P = $(el);
- else
- $(el).parents().each(function(){
- if ($(this).data("layoutRole")) {
- $P = $(this);
- return false; // BREAK
- }
- });
- if (!$P || !$P.length) return; // INVALID
-
- var
- pane = $P.data("layoutEdge")
- , s = state[pane]
- , CSS = s.cssSaved || {}
- ;
- // reset the zIndex
- if (!s.isSliding && !s.isResizing)
- $P.css("zIndex", options.zIndexes.pane_normal);
-
- // reset Overflow - if necessary
- $P.css( CSS );
-
- // clear var
- s.cssSaved = false;
- };
-
-/*
- * #####################
- * CREATE/RETURN LAYOUT
- * #####################
- */
-
- // validate that container exists
- var $N = $(this).eq(0); // FIRST matching Container element
- if (!$N.length) {
- return _log( options.errors.containerMissing );
- };
-
- // Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout")
- // return the Instance-pointer if layout has already been initialized
- if ($N.data("layoutContainer") && $N.data("layout"))
- return $N.data("layout"); // cached pointer
-
- // init global vars
- var
- $Ps = {} // Panes x5 - set in initPanes()
- , $Cs = {} // Content x5 - set in initPanes()
- , $Rs = {} // Resizers x4 - set in initHandles()
- , $Ts = {} // Togglers x4 - set in initHandles()
- , $Ms = $([]) // Masks - up to 2 masks per pane (IFRAME + DIV)
- // aliases for code brevity
- , sC = state.container // alias for easy access to 'container dimensions'
- , sID = state.id // alias for unique layout ID/namespace - eg: "layout435"
- ;
-
- // create Instance object to expose data & option Properties, and primary action Methods
- var Instance = {
- // layout data
- options: options // property - options hash
- , state: state // property - dimensions hash
- // object pointers
- , container: $N // property - object pointers for layout container
- , panes: $Ps // property - object pointers for ALL Panes: panes.north, panes.center
- , contents: $Cs // property - object pointers for ALL Content: contents.north, contents.center
- , resizers: $Rs // property - object pointers for ALL Resizers, eg: resizers.north
- , togglers: $Ts // property - object pointers for ALL Togglers, eg: togglers.north
- // border-pane open/close
- , hide: hide // method - ditto
- , show: show // method - ditto
- , toggle: toggle // method - pass a 'pane' ("north", "west", etc)
- , open: open // method - ditto
- , close: close // method - ditto
- , slideOpen: slideOpen // method - ditto
- , slideClose: slideClose // method - ditto
- , slideToggle: slideToggle // method - ditto
- // pane actions
- , setSizeLimits: setSizeLimits // method - pass a 'pane' - update state min/max data
- , _sizePane: sizePane // method -intended for user by plugins only!
- , sizePane: manualSizePane // method - pass a 'pane' AND an 'outer-size' in pixels or percent, or 'auto'
- , sizeContent: sizeContent // method - pass a 'pane'
- , swapPanes: swapPanes // method - pass TWO 'panes' - will swap them
- , showMasks: showMasks // method - pass a 'pane' OR list of panes - default = all panes with mask option set
- , hideMasks: hideMasks // method - ditto'
- // pane element methods
- , initContent: initContent // method - ditto
- , addPane: addPane // method - pass a 'pane'
- , removePane: removePane // method - pass a 'pane' to remove from layout, add 'true' to delete the pane-elem
- , createChildren: createChildren // method - pass a 'pane' and (optional) layout-options (OVERRIDES options[pane].children
- , refreshChildren: refreshChildren // method - pass a 'pane' and a layout-instance
- // special pane option setting
- , enableClosable: enableClosable // method - pass a 'pane'
- , disableClosable: disableClosable // method - ditto
- , enableSlidable: enableSlidable // method - ditto
- , disableSlidable: disableSlidable // method - ditto
- , enableResizable: enableResizable // method - ditto
- , disableResizable: disableResizable// method - ditto
- // utility methods for panes
- , allowOverflow: allowOverflow // utility - pass calling element (this)
- , resetOverflow: resetOverflow // utility - ditto
- // layout control
- , destroy: destroy // method - no parameters
- , initPanes: isInitialized // method - no parameters
- , resizeAll: resizeAll // method - no parameters
- // callback triggering
- , runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("onopen", "west")
- // alias collections of options, state and children - created in addPane and extended elsewhere
- , hasParentLayout: false // set by initContainer()
- , children: children // pointers to child-layouts, eg: Instance.children.west.layoutName
- , north: false // alias group: { name: pane, pane: $Ps[pane], options: options[pane], state: state[pane], children: children[pane] }
- , south: false // ditto
- , west: false // ditto
- , east: false // ditto
- , center: false // ditto
- };
-
- // create the border layout NOW
- if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation
- return null;
- else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init later
- return Instance; // return the Instance object
-
-}
-
-
-})( jQuery );
-
-
-
-
-/**
- * jquery.layout.state 1.2
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2014
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @requires: UI Layout 1.4.0 or higher
- * @requires: $.ui.cookie (above)
- *
- * @see: http://groups.google.com/group/jquery-ui-layout
- */
-;(function ($) {
-
-if (!$.layout) return;
-
-
-/**
- * UI COOKIE UTILITY
- *
- * A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
- * This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
- * NOTE: This utility is REQUIRED by the layout.state plugin
- *
- * Cookie methods in Layout are created as part of State Management
- */
-if (!$.ui) $.ui = {};
-$.ui.cookie = {
-
- // cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6
- acceptsCookies: !!navigator.cookieEnabled
-
-, read: function (name) {
- var
- c = document.cookie
- , cs = c ? c.split(';') : []
- , pair, data, i
- ;
- for (i=0; pair=cs[i]; i++) {
- data = $.trim(pair).split('='); // name=value => [ name, value ]
- if (data[0] == name) // found the layout cookie
- return decodeURIComponent(data[1]);
- }
- return null;
- }
-
-, write: function (name, val, cookieOpts) {
- var params = ""
- , date = ""
- , clear = false
- , o = cookieOpts || {}
- , x = o.expires || null
- , t = $.type(x)
- ;
- if (t === "date")
- date = x;
- else if (t === "string" && x > 0) {
- x = parseInt(x,10);
- t = "number";
- }
- if (t === "number") {
- date = new Date();
- if (x > 0)
- date.setDate(date.getDate() + x);
- else {
- date.setFullYear(1970);
- clear = true;
- }
- }
- if (date) params += ";expires="+ date.toUTCString();
- if (o.path) params += ";path="+ o.path;
- if (o.domain) params += ";domain="+ o.domain;
- if (o.secure) params += ";secure";
- document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
- }
-
-, clear: function (name) {
- $.ui.cookie.write(name, "", {expires: -1});
- }
-
-};
-// if cookie.jquery.js is not loaded, create an alias to replicate it
-// this may be useful to other plugins or code dependent on that plugin
-if (!$.cookie) $.cookie = function (k, v, o) {
- var C = $.ui.cookie;
- if (v === null)
- C.clear(k);
- else if (v === undefined)
- return C.read(k);
- else
- C.write(k, v, o);
-};
-
-
-
-/**
- * State-management options stored in options.stateManagement, which includes a .cookie hash
- * Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
- *
- * // STATE/COOKIE OPTIONS
- * @example $(el).layout({
- stateManagement: {
- enabled: true
- , stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
- , cookie: { name: "appLayout", path: "/" }
- }
- })
- * @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
- * @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
- * @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
- *
- * // STATE/COOKIE METHODS
- * @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
- * @example myLayout.loadCookie();
- * @example myLayout.deleteCookie();
- * @example var JSON = myLayout.readState(); // CURRENT Layout State
- * @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
- * @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
- *
- * CUSTOM STATE-MANAGEMENT (eg, saved in a database)
- * @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
- * @example myLayout.loadState( JSON );
- */
-
-// tell Layout that the state plugin is available
-$.layout.plugins.stateManagement = true;
-
-// Add State-Management options to layout.defaults
-$.layout.defaults.stateManagement = {
- enabled: false // true = enable state-management, even if not using cookies
-, autoSave: true // Save a state-cookie when page exits?
-, autoLoad: true // Load the state-cookie when Layout inits?
-, animateLoad: true // animate panes when loading state into an active layout
-, includeChildren: true // recurse into child layouts to include their state as well
- // List state-data to save - must be pane-specific
-, stateKeys: "north.size,south.size,east.size,west.size,"+
- "north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
- "north.isHidden,south.isHidden,east.isHidden,west.isHidden"
-, cookie: {
- name: "" // If not specified, will use Layout.name, else just "Layout"
- , domain: "" // blank = current domain
- , path: "" // blank = current page, "/" = entire website
- , expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
- , secure: false
- }
-};
-
-// Set stateManagement as a 'layout-option', NOT a 'pane-option'
-$.layout.optionsMap.layout.push("stateManagement");
-// Update config so layout does not move options into the pane-default branch (panes)
-$.layout.config.optionRootKeys.push("stateManagement");
-
-/*
- * State Management methods
- */
-$.layout.state = {
-
- /**
- * Get the current layout state and save it to a cookie
- *
- * myLayout.saveCookie( keys, cookieOpts )
- *
- * @param {Object} inst
- * @param {(string|Array)=} keys
- * @param {Object=} cookieOpts
- */
- saveCookie: function (inst, keys, cookieOpts) {
- var o = inst.options
- , sm = o.stateManagement
- , oC = $.extend(true, {}, sm.cookie, cookieOpts || null)
- , data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state
- ;
- $.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
- return $.extend(true, {}, data); // return COPY of state.stateData data
- }
-
- /**
- * Remove the state cookie
- *
- * @param {Object} inst
- */
-, deleteCookie: function (inst) {
- var o = inst.options;
- $.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
- }
-
- /**
- * Read & return data from the cookie - as JSON
- *
- * @param {Object} inst
- */
-, readCookie: function (inst) {
- var o = inst.options;
- var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
- // convert cookie string back to a hash and return it
- return c ? $.layout.state.decodeJSON(c) : {};
- }
-
- /**
- * Get data from the cookie and USE IT to loadState
- *
- * @param {Object} inst
- */
-, loadCookie: function (inst) {
- var c = $.layout.state.readCookie(inst); // READ the cookie
- if (c && !$.isEmptyObject( c )) {
- inst.state.stateData = $.extend(true, {}, c); // SET state.stateData
- inst.loadState(c); // LOAD the retrieved state
- }
- return c;
- }
-
- /**
- * Update layout options from the cookie, if one exists
- *
- * @param {Object} inst
- * @param {Object=} stateData
- * @param {boolean=} animate
- */
-, loadState: function (inst, data, opts) {
- if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
-
- // normalize data & cache in the state object
- data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
-
- // add missing/default state-restore options
- var smo = inst.options.stateManagement;
- opts = $.extend({
- animateLoad: false //smo.animateLoad
- , includeChildren: smo.includeChildren
- }, opts );
-
- if (!inst.state.initialized) {
- /*
- * layout NOT initialized, so just update its options
- */
- // MUST remove pane.children keys before applying to options
- // use a copy so we don't remove keys from original data
- var o = $.extend(true, {}, data);
- //delete o.center; // center has no state-data - only children
- $.each($.layout.config.allPanes, function (idx, pane) {
- if (o[pane]) delete o[pane].children;
- });
- // update CURRENT layout-options with saved state data
- $.extend(true, inst.options, o);
- }
- else {
- /*
- * layout already initialized, so modify layout's configuration
- */
- var noAnimate = !opts.animateLoad
- , o, c, h, state, open
- ;
- $.each($.layout.config.borderPanes, function (idx, pane) {
- o = data[ pane ];
- if (!$.isPlainObject( o )) return; // no key, skip pane
-
- s = o.size;
- c = o.initClosed;
- h = o.initHidden;
- ar = o.autoResize
- state = inst.state[pane];
- open = state.isVisible;
-
- // reset autoResize
- if (ar)
- state.autoResize = ar;
- // resize BEFORE opening
- if (!open)
- inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize
- // open/close as necessary - DO NOT CHANGE THIS ORDER!
- if (h === true) inst.hide(pane, noAnimate);
- else if (c === true) inst.close(pane, false, noAnimate);
- else if (c === false) inst.open (pane, false, noAnimate);
- else if (h === false) inst.show (pane, false, noAnimate);
- // resize AFTER any other actions
- if (open)
- inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
- });
-
- /*
- * RECURSE INTO CHILD-LAYOUTS
- */
- if (opts.includeChildren) {
- var paneStateChildren, childState;
- $.each(inst.children, function (pane, paneChildren) {
- paneStateChildren = data[pane] ? data[pane].children : 0;
- if (paneStateChildren && paneChildren) {
- $.each(paneChildren, function (stateKey, child) {
- childState = paneStateChildren[stateKey];
- if (child && childState)
- child.loadState( childState );
- });
- }
- });
- }
- }
- }
-
- /**
- * Get the *current layout state* and return it as a hash
- *
- * @param {Object=} inst // Layout instance to get state for
- * @param {object=} [opts] // State-Managements override options
- */
-, readState: function (inst, opts) {
- // backward compatility
- if ($.type(opts) === 'string') opts = { keys: opts };
- if (!opts) opts = {};
- var sm = inst.options.stateManagement
- , ic = opts.includeChildren
- , recurse = ic !== undefined ? ic : sm.includeChildren
- , keys = opts.stateKeys || sm.stateKeys
- , alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
- , state = inst.state
- , panes = $.layout.config.allPanes
- , data = {}
- , pair, pane, key, val
- , ps, pC, child, array, count, branch
- ;
- if ($.isArray(keys)) keys = keys.join(",");
- // convert keys to an array and change delimiters from '__' to '.'
- keys = keys.replace(/__/g, ".").split(',');
- // loop keys and create a data hash
- for (var i=0, n=keys.length; i < n; i++) {
- pair = keys[i].split(".");
- pane = pair[0];
- key = pair[1];
- if ($.inArray(pane, panes) < 0) continue; // bad pane!
- val = state[ pane ][ key ];
- if (val == undefined) continue;
- if (key=="isClosed" && state[pane]["isSliding"])
- val = true; // if sliding, then *really* isClosed
- ( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
- }
-
- // recurse into the child-layouts for each pane
- if (recurse) {
- $.each(panes, function (idx, pane) {
- pC = inst.children[pane];
- ps = state.stateData[pane];
- if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
- // ensure a key exists for this 'pane', eg: branch = data.center
- branch = data[pane] || (data[pane] = {});
- if (!branch.children) branch.children = {};
- $.each( pC, function (key, child) {
- // ONLY read state from an initialize layout
- if ( child.state.initialized )
- branch.children[ key ] = $.layout.state.readState( child );
- // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
- else if ( ps && ps.children && ps.children[ key ] ) {
- branch.children[ key ] = $.extend(true, {}, ps.children[ key ] );
- }
- });
- }
- });
- }
-
- return data;
- }
-
- /**
- * Stringify a JSON hash so can save in a cookie or db-field
- */
-, encodeJSON: function (json) {
- var local = window.JSON || {};
- return (local.stringify || stringify)(json);
-
- function stringify (h) {
- var D=[], i=0, k, v, t // k = key, v = value
- , a = $.isArray(h)
- ;
- for (k in h) {
- v = h[k];
- t = typeof v;
- if (t == 'string') // STRING - add quotes
- v = '"'+ v +'"';
- else if (t == 'object') // SUB-KEY - recurse into it
- v = parse(v);
- D[i++] = (!a ? '"'+ k +'":' : '') + v;
- }
- return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}');
- };
- }
-
- /**
- * Convert stringified JSON back to a hash object
- * @see $.parseJSON(), adding in jQuery 1.4.1
- */
-, decodeJSON: function (str) {
- try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
- catch (e) { return {}; }
- }
-
-
-, _create: function (inst) {
- var s = $.layout.state
- , o = inst.options
- , sm = o.stateManagement
- ;
- // ADD State-Management plugin methods to inst
- $.extend( inst, {
- // readCookie - update options from cookie - returns hash of cookie data
- readCookie: function () { return s.readCookie(inst); }
- // deleteCookie
- , deleteCookie: function () { s.deleteCookie(inst); }
- // saveCookie - optionally pass keys-list and cookie-options (hash)
- , saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); }
- // loadCookie - readCookie and use to loadState() - returns hash of cookie data
- , loadCookie: function () { return s.loadCookie(inst); }
- // loadState - pass a hash of state to use to update options
- , loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); }
- // readState - returns hash of current layout-state
- , readState: function (keys) { return s.readState(inst, keys); }
- // add JSON utility methods too...
- , encodeJSON: s.encodeJSON
- , decodeJSON: s.decodeJSON
- });
-
- // init state.stateData key, even if plugin is initially disabled
- inst.state.stateData = {};
-
- // autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE
- if ( !sm.autoLoad ) return;
-
- // When state-data exists in the autoLoad key USE IT,
- // even if stateManagement.enabled == false
- if ($.isPlainObject( sm.autoLoad )) {
- if (!$.isEmptyObject( sm.autoLoad )) {
- inst.loadState( sm.autoLoad );
- }
- }
- else if ( sm.enabled ) {
- // update the options from cookie or callback
- // if options is a function, call it to get stateData
- if ($.isFunction( sm.autoLoad )) {
- var d = {};
- try {
- d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
- } catch (e) {}
- if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
- inst.loadState(d);
- }
- else // any other truthy value will trigger loadCookie
- inst.loadCookie();
- }
- }
-
-, _unload: function (inst) {
- var sm = inst.options.stateManagement;
- if (sm.enabled && sm.autoSave) {
- // if options is a function, call it to save the stateData
- if ($.isFunction( sm.autoSave )) {
- try {
- sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
- } catch (e) {}
- }
- else // any truthy value will trigger saveCookie
- inst.saveCookie();
- }
- }
-
-};
-
-// add state initialization method to Layout's onCreate array of functions
-$.layout.onCreate.push( $.layout.state._create );
-$.layout.onUnload.push( $.layout.state._unload );
-
-})( jQuery );
-
-
-
-/**
- * @preserve jquery.layout.buttons 1.0
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2011
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @dependancies: UI Layout 1.3.0.rc30.1 or higher
- *
- * @support: http://groups.google.com/group/jquery-ui-layout
- *
- * Docs: [ to come ]
- * Tips: [ to come ]
- */
-;(function ($) {
-
-if (!$.layout) return;
-
-
-// tell Layout that the state plugin is available
-$.layout.plugins.buttons = true;
-
-// Add State-Management options to layout.defaults
-$.layout.defaults.autoBindCustomButtons = false;
-// Set stateManagement as a layout-option, NOT a pane-option
-$.layout.optionsMap.layout.push("autoBindCustomButtons");
-
-var lang = $.layout.language;
-
-/*
- * Button methods
- */
-$.layout.buttons = {
- // set data used by multiple methods below
- config: {
- borderPanes: "north,south,west,east"
- }
-
- /**
- * Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
- *
- * @see _create()
- */
-, init: function (inst) {
- var pre = "ui-layout-button-"
- , layout = inst.options.name || ""
- , name;
- $.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
- $.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
- $("."+pre+action+"-"+pane).each(function(){
- // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
- name = $(this).data("layoutName") || $(this).attr("layoutName");
- if (name == undefined || name === layout)
- inst.bindButton(this, action, pane);
- });
- });
- });
- }
-
- /**
- * Helper function to validate params received by addButton utilities
- *
- * Two classes are added to the element, based on the buttonClass...
- * The type of button is appended to create the 2nd className:
- * - ui-layout-button-pin
- * - ui-layout-pane-button-toggle
- * - ui-layout-pane-button-open
- * - ui-layout-pane-button-close
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
- */
-, get: function (inst, selector, pane, action) {
- var $E = $(selector)
- , o = inst.options
- , err = o.showErrorMessages
- ;
- if (!$E.length) { // element not found
- if (err) alert(lang.errButton + lang.selector +": "+ selector);
- }
- else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
- if (err) alert(lang.errButton + lang.pane +": "+ pane);
- $E = $(""); // NO BUTTON
- }
- else { // VALID
- var btn = o[pane].buttonClass +"-"+ action;
- $E .addClass( btn +" "+ btn +"-"+ pane )
- .data("layoutName", o.name); // add layout identifier - even if blank!
- }
- return $E;
- }
-
-
- /**
- * NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
- *
- * @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} action
- * @param {string} pane
- */
-, bind: function (inst, sel, action, pane) {
- var _ = $.layout.buttons;
- switch (action.toLowerCase()) {
- case "toggle": _.addToggle (inst, sel, pane); break;
- case "open": _.addOpen (inst, sel, pane); break;
- case "close": _.addClose (inst, sel, pane); break;
- case "pin": _.addPin (inst, sel, pane); break;
- case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
- case "open-slide": _.addOpen (inst, sel, pane, true); break;
- }
- return inst;
- }
-
- /**
- * Add a custom Toggler button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @param {boolean=} slide true = slide-open, false = pin-open
- */
-, addToggle: function (inst, selector, pane, slide) {
- $.layout.buttons.get(inst, selector, pane, "toggle")
- .click(function(evt){
- inst.toggle(pane, !!slide);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Open button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @param {boolean=} slide true = slide-open, false = pin-open
- */
-, addOpen: function (inst, selector, pane, slide) {
- $.layout.buttons.get(inst, selector, pane, "open")
- .attr("title", lang.Open)
- .click(function (evt) {
- inst.open(pane, !!slide);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Close button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- */
-, addClose: function (inst, selector, pane) {
- $.layout.buttons.get(inst, selector, pane, "close")
- .attr("title", lang.Close)
- .click(function (evt) {
- inst.close(pane);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Pin button for a pane
- *
- * Four classes are added to the element, based on the paneClass for the associated pane...
- * Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
- * - ui-layout-pane-pin
- * - ui-layout-pane-west-pin
- * - ui-layout-pane-pin-up
- * - ui-layout-pane-west-pin-up
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
- */
-, addPin: function (inst, selector, pane) {
- var $E = $.layout.buttons.get(inst, selector, pane, "pin");
- if ($E.length) {
- var s = inst.state[pane];
- $E.click(function (evt) {
- $.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
- if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
- else inst.close( pane ); // slide-closed
- evt.stopPropagation();
- });
- // add up/down pin attributes and classes
- $.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
- // add this pin to the pane data so we can 'sync it' automatically
- // PANE.pins key is an array so we can store multiple pins for each pane
- s.pins.push( selector ); // just save the selector string
- }
- return inst;
- }
-
- /**
- * Change the class of the pin button to make it look 'up' or 'down'
- *
- * @see addPin(), syncPins()
- * @param {Array.<Object>} $Pin The pin-span element in a jQuery wrapper
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin true = set the pin 'down', false = set it 'up'
- */
-, setPinState: function (inst, $Pin, pane, doPin) {
- var updown = $Pin.attr("pin");
- if (updown && doPin === (updown=="down")) return; // already in correct state
- var
- pin = inst.options[pane].buttonClass +"-pin"
- , side = pin +"-"+ pane
- , UP = pin +"-up "+ side +"-up"
- , DN = pin +"-down "+side +"-down"
- ;
- $Pin
- .attr("pin", doPin ? "down" : "up") // logic
- .attr("title", doPin ? lang.Unpin : lang.Pin)
- .removeClass( doPin ? UP : DN )
- .addClass( doPin ? DN : UP )
- ;
- }
-
- /**
- * INTERNAL function to sync 'pin buttons' when pane is opened or closed
- * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
- *
- * @see open(), close()
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin True means set the pin 'down', False means 'up'
- */
-, syncPinBtns: function (inst, pane, doPin) {
- // REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
- $.each(state[pane].pins, function (i, selector) {
- $.layout.buttons.setPinState(inst, $(selector), pane, doPin);
- });
- }
-
-
-, _load: function (inst) {
- // ADD Button methods to Layout Instance
- $.extend( inst, {
- bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
- // DEPRECATED METHODS...
- , addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
- , addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
- , addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
- , addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
- });
-
- // init state array to hold pin-buttons
- for (var i=0; i<4; i++) {
- var pane = $.layout.buttons.config.borderPanes[i];
- inst.state[pane].pins = [];
- }
-
- // auto-init buttons onLoad if option is enabled
- if ( inst.options.autoBindCustomButtons )
- $.layout.buttons.init(inst);
- }
-
-, _unload: function (inst) {
- // TODO: unbind all buttons???
- }
-
-};
-
-// add initialization method to Layout's onLoad array of functions
-$.layout.onLoad.push( $.layout.buttons._load );
-//$.layout.onUnload.push( $.layout.buttons._unload );
-
-})( jQuery );
-
-
-
-
-/**
- * jquery.layout.browserZoom 1.0
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2012
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @requires: UI Layout 1.3.0.rc30.1 or higher
- *
- * @see: http://groups.google.com/group/jquery-ui-layout
- *
- * TODO: Extend logic to handle other problematic zooming in browsers
- * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
- */
-(function ($) {
-
-// tell Layout that the plugin is available
-$.layout.plugins.browserZoom = true;
-
-$.layout.defaults.browserZoomCheckInterval = 1000;
-$.layout.optionsMap.layout.push("browserZoomCheckInterval");
-
-/*
- * browserZoom methods
- */
-$.layout.browserZoom = {
-
- _init: function (inst) {
- // abort if browser does not need this check
- if ($.layout.browserZoom.ratio() !== false)
- $.layout.browserZoom._setTimer(inst);
- }
-
-, _setTimer: function (inst) {
- // abort if layout destroyed or browser does not need this check
- if (inst.destroyed) return;
- var o = inst.options
- , s = inst.state
- // don't need check if inst has parentLayout, but check occassionally in case parent destroyed!
- // MINIMUM 100ms interval, for performance
- , ms = inst.hasParentLayout ? 5000 : Math.max( o.browserZoomCheckInterval, 100 )
- ;
- // set the timer
- setTimeout(function(){
- if (inst.destroyed || !o.resizeWithWindow) return;
- var d = $.layout.browserZoom.ratio();
- if (d !== s.browserZoom) {
- s.browserZoom = d;
- inst.resizeAll();
- }
- // set a NEW timeout
- $.layout.browserZoom._setTimer(inst);
- }
- , ms );
- }
-
-, ratio: function () {
- var w = window
- , s = screen
- , d = document
- , dE = d.documentElement || d.body
- , b = $.layout.browser
- , v = b.version
- , r, sW, cW
- ;
- // we can ignore all browsers that fire window.resize event onZoom
- if (!b.msie || v > 8)
- return false; // don't need to track zoom
- if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack
- return calc(s.deviceXDPI, s.systemXDPI);
- // everything below is just for future reference!
- if (b.webkit && (r = d.body.getBoundingClientRect))
- return calc((r.left - r.right), d.body.offsetWidth);
- if (b.webkit && (sW = w.outerWidth))
- return calc(sW, w.innerWidth);
- if ((sW = s.width) && (cW = dE.clientWidth))
- return calc(sW, cW);
- return false; // no match, so cannot - or don't need to - track zoom
-
- function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); }
- }
-
-};
-// add initialization method to Layout's onLoad array of functions
-$.layout.onReady.push( $.layout.browserZoom._init );
-
-
-})( jQuery );
-
-
-
-
-/**
- * UI Layout Plugin: Slide-Offscreen Animation
- *
- * Prevent panes from being 'hidden' so that an iframes/objects
- * does not reload/refresh when pane 'opens' again.
- * This plug-in adds a new animation called "slideOffscreen".
- * It is identical to the normal "slide" effect, but avoids hiding the element
- *
- * Requires Layout 1.3.0.RC30.1 or later for Close offscreen
- * Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
- *
- * Version: 1.1 - 2012-11-18
- * Author: Kevin Dalman (kevin@jquery-dev.com)
- * @preserve jquery.layout.slideOffscreen-1.1.js
- */
-;(function ($) {
-
-// Add a new "slideOffscreen" effect
-if ($.effects) {
-
- // add an option so initClosed and initHidden will work
- $.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed
- /* set the new animation as the default for all panes
- $.layout.defaults.panes.fxName = "slideOffscreen";
- */
-
- if ($.layout.plugins)
- $.layout.plugins.effects.slideOffscreen = true;
-
- // dupe 'slide' effect defaults as new effect defaults
- $.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide);
-
- // add new effect to jQuery UI
- $.effects.slideOffscreen = function(o) {
- return this.queue(function(){
-
- var fx = $.effects
- , opt = o.options
- , $el = $(this)
- , pane = $el.data('layoutEdge')
- , state = $el.data('parentLayout').state
- , dist = state[pane].size
- , s = this.style
- , props = ['top','bottom','left','right']
- // Set options
- , mode = fx.setMode($el, opt.mode || 'show') // Set Mode
- , show = (mode == 'show')
- , dir = opt.direction || 'left' // Default Direction
- , ref = (dir == 'up' || dir == 'down') ? 'top' : 'left'
- , pos = (dir == 'up' || dir == 'left')
- , offscrn = $.layout.config.offscreenCSS || {}
- , keyLR = $.layout.config.offscreenReset
- , keyTB = 'offscreenResetTop' // only used internally
- , animation = {}
- ;
- // Animation settings
- animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist;
-
- if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
- $el.data(keyTB, { top: s.top, bottom: s.bottom });
-
- // set the top or left offset in preparation for animation
- // Note: ALL animations work by shifting the top or left edges
- if (pos) { // top (north) or left (west)
- $el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge
- }
- else { // bottom (south) or right (east) - shift all the way across container
- if (dir === 'right')
- $el.css({ left: state.container.layoutWidth, right: 'auto' });
- else // dir === bottom
- $el.css({ top: state.container.layoutHeight, bottom: 'auto' });
- }
- // restore the left/right setting if is a top/bottom animation
- if (ref === 'top')
- $el.css( $el.data( keyLR ) || {} );
- }
- else { // hide() animation, so save ALL CSS
- $el.data(keyTB, { top: s.top, bottom: s.bottom });
- $el.data(keyLR, { left: s.left, right: s.right });
- }
-
- // Animate
- $el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){
- // Restore top/bottom
- if ($el.data( keyTB ))
- $el.css($el.data( keyTB )).removeData( keyTB );
- if (show) // Restore left/right too
- $el.css($el.data( keyLR ) || {}).removeData( keyLR );
- else // Move the pane off-screen (left: -99999, right: 'auto')
- $el.css( offscrn );
-
- if (o.callback) o.callback.apply(this, arguments); // Callback
- $el.dequeue();
- }});
-
- });
- };
-
-}
-
-})( jQuery ); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/modalService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/modalService.js
deleted file mode 100644
index 74c848e8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/modalService.js
+++ /dev/null
@@ -1,185 +0,0 @@
-angular.module("modalServices",[]).service('modalService', ['$modal', function ($modal) {
-
-
- this.showSuccess = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- $(".overlayed").css("display","none");
- $(".loadingId").css("display","none");
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
- this.showFailure = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.showMessage = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.showWarning = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.popupConfirmWin = function(title, msgBody, callback){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- var args = Array.prototype.slice.call( arguments, 0 );
- args.splice( 0, 3);
- modalInstance.result.then(function(){
- callback.apply(null, args);
- }, function() {
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
- this.popupConfirmWinWithCancel = function(title, msgBody, callback,dismissCallback){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- var args = Array.prototype.slice.call( arguments, 0 );
- args.splice( 0, 3);
- modalInstance.result.then(function(){
- callback.apply(null, args);
- }, function() {
- dismissCallback();
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
- this.popupDeleteConfirmWin = function(title, msgBody, callback, argForCallBack){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_for_delete.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function(){
- callback(argForCallBack);
- }, function() {
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
-
- this.popupSuccessRedirectWin = function(title, msgBody, redirectUrl){
- var modalInstance = $modal.open({
- templateUrl: 'modal_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function() {
- }, function() {
- window.location.href=redirectUrl;
- })['finally'](function(){
- modalInstance = undefined;
- });
- };
-
- this.popupWarningRedirectWin = function(title, msgBody, redirectUrl){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function() {
- }, function() {
- window.location.href=redirectUrl;
- })['finally'](function(){
- modalInstance = undefined;
- });
- };
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/moment.min.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/moment.min.js
deleted file mode 100644
index 62b1697b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/moment.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// moment.js
-// version : 2.1.0
-// author : Tim Wood
-// license : MIT
-// momentjs.com
-!function(t){function e(t,e){return function(n){return u(t.call(this,n),e)}}function n(t,e){return function(n){return this.lang().ordinal(t.call(this,n),e)}}function s(){}function i(t){a(this,t)}function r(t){var e=t.years||t.year||t.y||0,n=t.months||t.month||t.M||0,s=t.weeks||t.week||t.w||0,i=t.days||t.day||t.d||0,r=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,o=t.seconds||t.second||t.s||0,u=t.milliseconds||t.millisecond||t.ms||0;this._input=t,this._milliseconds=u+1e3*o+6e4*a+36e5*r,this._days=i+7*s,this._months=n+12*e,this._data={},this._bubble()}function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function o(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";n.length<e;)n="0"+n;return n}function h(t,e,n,s){var i,r,a=e._milliseconds,o=e._days,u=e._months;a&&t._d.setTime(+t._d+a*n),(o||u)&&(i=t.minute(),r=t.hour()),o&&t.date(t.date()+o*n),u&&t.month(t.month()+u*n),a&&!s&&H.updateOffset(t),(o||u)&&(t.minute(i),t.hour(r))}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t,e){var n,s=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),r=0;for(n=0;s>n;n++)~~t[n]!==~~e[n]&&r++;return r+i}function f(t){return t?ie[t]||t.toLowerCase().replace(/(.)s$/,"$1"):t}function l(t,e){return e.abbr=t,x[t]||(x[t]=new s),x[t].set(e),x[t]}function _(t){if(!t)return H.fn._lang;if(!x[t]&&A)try{require("./lang/"+t)}catch(e){return H.fn._lang}return x[t]}function m(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,s=t.match(E);for(e=0,n=s.length;n>e;e++)s[e]=ue[s[e]]?ue[s[e]]:m(s[e]);return function(i){var r="";for(e=0;n>e;e++)r+=s[e]instanceof Function?s[e].call(i,t):s[e];return r}}function M(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var s=5;s--&&N.test(e);)e=e.replace(N,n);return re[e]||(re[e]=y(e)),re[e](t)}function g(t,e){switch(t){case"DDDD":return V;case"YYYY":return X;case"YYYYY":return $;case"S":case"SS":case"SSS":case"DDD":return I;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return R;case"a":case"A":return _(e._l)._meridiemParse;case"X":return B;case"Z":case"ZZ":return j;case"T":return q;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return J;default:return new RegExp(t.replace("\\",""))}}function p(t){var e=(j.exec(t)||[])[0],n=(e+"").match(ee)||["-",0,0],s=+(60*n[1])+~~n[2];return"+"===n[0]?-s:s}function D(t,e,n){var s,i=n._a;switch(t){case"M":case"MM":i[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":s=_(n._l).monthsParse(e),null!=s?i[1]=s:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(i[2]=~~e);break;case"YY":i[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~e;break;case"a":case"A":n._isPm=_(n._l).isPM(e);break;case"H":case"HH":case"h":case"hh":i[3]=~~e;break;case"m":case"mm":i[4]=~~e;break;case"s":case"ss":i[5]=~~e;break;case"S":case"SS":case"SSS":i[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=p(e)}null==e&&(n._isValid=!1)}function Y(t){var e,n,s=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];s[3]+=~~((t._tzm||0)/60),s[4]+=~~((t._tzm||0)%60),n=new Date(0),t._useUTC?(n.setUTCFullYear(s[0],s[1],s[2]),n.setUTCHours(s[3],s[4],s[5],s[6])):(n.setFullYear(s[0],s[1],s[2]),n.setHours(s[3],s[4],s[5],s[6])),t._d=n}}function w(t){var e,n,s=t._f.match(E),i=t._i;for(t._a=[],e=0;e<s.length;e++)n=(g(s[e],t).exec(i)||[])[0],n&&(i=i.slice(i.indexOf(n)+n.length)),ue[s[e]]&&D(s[e],n,t);i&&(t._il=i),t._isPm&&t._a[3]<12&&(t._a[3]+=12),t._isPm===!1&&12===t._a[3]&&(t._a[3]=0),Y(t)}function k(t){var e,n,s,r,o,u=99;for(r=0;r<t._f.length;r++)e=a({},t),e._f=t._f[r],w(e),n=new i(e),o=c(e._a,n.toArray()),n._il&&(o+=n._il.length),u>o&&(u=o,s=n);a(t,s)}function v(t){var e,n=t._i,s=K.exec(n);if(s){for(t._f="YYYY-MM-DD"+(s[2]||" "),e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}j.exec(n)&&(t._f+=" Z"),w(t)}else t._d=new Date(n)}function T(e){var n=e._i,s=G.exec(n);n===t?e._d=new Date:s?e._d=new Date(+s[1]):"string"==typeof n?v(e):d(n)?(e._a=n.slice(0),Y(e)):e._d=n instanceof Date?new Date(+n):new Date(n)}function b(t,e,n,s,i){return i.relativeTime(e||1,!!n,t,s)}function S(t,e,n){var s=W(Math.abs(t)/1e3),i=W(s/60),r=W(i/60),a=W(r/24),o=W(a/365),u=45>s&&["s",s]||1===i&&["m"]||45>i&&["mm",i]||1===r&&["h"]||22>r&&["hh",r]||1===a&&["d"]||25>=a&&["dd",a]||45>=a&&["M"]||345>a&&["MM",W(a/30)]||1===o&&["y"]||["yy",o];return u[2]=e,u[3]=t>0,u[4]=n,b.apply({},u)}function F(t,e,n){var s,i=n-e,r=n-t.day();return r>i&&(r-=7),i-7>r&&(r+=7),s=H(t).add("d",r),{week:Math.ceil(s.dayOfYear()/7),year:s.year()}}function O(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=_().preparse(e)),H.isMoment(e)?(t=a({},e),t._d=new Date(+e._d)):n?d(n)?k(t):w(t):T(t),new i(t))}function z(t,e){H.fn[t]=H.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),H.updateOffset(this),this):this._d["get"+n+e]()}}function C(t){H.duration.fn[t]=function(){return this._data[t]}}function L(t,e){H.duration.fn["as"+t]=function(){return+this/e}}for(var H,P,U="2.1.0",W=Math.round,x={},A="undefined"!=typeof module&&module.exports,G=/^\/?Date\((\-?\d+)/i,Z=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,E=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,J=/\d\d?/,I=/\d{1,3}/,V=/\d{3}/,X=/\d{1,4}/,$=/[+\-]?\d{1,6}/,R=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j=/Z|[\+\-]\d\d:?\d\d/i,q=/T/i,B=/[\+\-]?\d+(\.\d{1,3})?/,K=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,Q="YYYY-MM-DDTHH:mm:ssZ",te=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ee=/([\+\-]|\d\d)/gi,ne="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),se={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ie={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},re={},ae="DDD w W M D d".split(" "),oe="M D H h m s w W".split(" "),ue={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},gg:function(){return u(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return u(this.weekYear(),5)},GG:function(){return u(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return u(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ae.length;)P=ae.pop(),ue[P+"o"]=n(ue[P],P);for(;oe.length;)P=oe.pop(),ue[P+P]=e(ue[P],2);for(ue.DDDD=e(ue.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,s;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=H([2e3,e]),s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(s.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,s;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=H([2e3,1]).day(e),s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(s.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,s){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,s):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return F(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},H=function(t,e,n){return O({_i:t,_f:e,_l:n,_isUTC:!1})},H.utc=function(t,e,n){return O({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},H.unix=function(t){return H(1e3*t)},H.duration=function(t,e){var n,s,i=H.isDuration(t),a="number"==typeof t,o=i?t._input:a?{}:t,u=Z.exec(t);return a?e?o[e]=t:o.milliseconds=t:u&&(n="-"===u[1]?-1:1,o={y:0,d:~~u[2]*n,h:~~u[3]*n,m:~~u[4]*n,s:~~u[5]*n,ms:~~u[6]*n}),s=new r(o),i&&t.hasOwnProperty("_lang")&&(s._lang=t._lang),s},H.version=U,H.defaultFormat=Q,H.updateOffset=function(){},H.lang=function(t,e){return t?(e?l(t,e):x[t]||_(t),H.duration.fn._lang=H.fn._lang=_(t),void 0):H.fn._lang._abbr},H.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),_(t)},H.isMoment=function(t){return t instanceof i},H.isDuration=function(t){return t instanceof r},H.fn=i.prototype={clone:function(){return H(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return M(H(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!c(this._a,(this._isUTC?H.utc(this._a):H(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(t){var e=M(this,t||H.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,-1),this},diff:function(t,e,n){var s,i,r=this._isUTC?H(t).zone(this._offset||0):H(t).local(),a=6e4*(this.zone()-r.zone());return e=f(e),"year"===e||"month"===e?(s=432e5*(this.daysInMonth()+r.daysInMonth()),i=12*(this.year()-r.year())+(this.month()-r.month()),i+=(this-H(this).startOf("month")-(r-H(r).startOf("month")))/s,i-=6e4*(this.zone()-H(this).startOf("month").zone()-(r.zone()-H(r).startOf("month").zone()))/s,"year"===e&&(i/=12)):(s=this-r,i="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-a)/864e5:"week"===e?(s-a)/6048e5:s),n?i:o(i)},from:function(t,e){return H.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(H(),t)},calendar:function(){var t=this.diff(H().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?"string"==typeof t&&(t=this.lang().weekdaysParse(t),"number"!=typeof t)?this:this.add({d:t-e}):e},month:function(t){var e,n=this._isUTC?"UTC":"";return null!=t?"string"==typeof t&&(t=this.lang().monthsParse(t),"number"!=typeof t)?this:(e=this.date(),this.date(1),this._d["set"+n+"Month"](t),this.date(Math.min(e,this.daysInMonth())),H.updateOffset(this),this):this._d["get"+n+"Month"]()},startOf:function(t){switch(t=f(t)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),this},endOf:function(t){return this.startOf(t).add(t,1).subtract("ms",1)},isAfter:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)>+H(t).startOf(e)},isBefore:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)<+H(t).startOf(e)},isSame:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)===+H(t).startOf(e)},min:function(t){return t=H.apply(null,arguments),this>t?this:t},max:function(t){return t=H.apply(null,arguments),t>this?this:t},zone:function(t){var e=this._offset||0;return null==t?this._isUTC?e:this._d.getTimezoneOffset():("string"==typeof t&&(t=p(t)),Math.abs(t)<16&&(t=60*t),this._offset=t,this._isUTC=!0,e!==t&&h(this,H.duration(e-t,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return H.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=W((H(this).startOf("day")-H(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},weekYear:function(t){var e=F(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==t?e:this.add("y",t-e)},isoWeekYear:function(t){var e=F(this,1,4).year;return null==t?e:this.add("y",t-e)},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},isoWeek:function(t){var e=F(this,1,4).week;return null==t?e:this.add("d",7*(t-e))},weekday:function(t){var e=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==t?e:this.add("d",t-e)},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},lang:function(e){return e===t?this._lang:(this._lang=_(e),this)}},P=0;P<ne.length;P++)z(ne[P].toLowerCase().replace(/s$/,""),ne[P]);z("year","FullYear"),H.fn.days=H.fn.day,H.fn.months=H.fn.month,H.fn.weeks=H.fn.week,H.fn.isoWeeks=H.fn.isoWeek,H.fn.toJSON=H.fn.toISOString,H.duration.fn=r.prototype={_bubble:function(){var t,e,n,s,i=this._milliseconds,r=this._days,a=this._months,u=this._data;u.milliseconds=i%1e3,t=o(i/1e3),u.seconds=t%60,e=o(t/60),u.minutes=e%60,n=o(e/60),u.hours=n%24,r+=o(n/24),u.days=r%30,a+=o(r/30),u.months=a%12,s=o(a/12),u.years=s},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*~~(this._months/12)},humanize:function(t){var e=+this,n=S(e,!t,this.lang());return t&&(n=this.lang().pastFuture(e,n)),this.lang().postformat(n)},add:function(t,e){var n=H.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=H.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=f(t),this[t.toLowerCase()+"s"]()},as:function(t){return t=f(t),this["as"+t.charAt(0).toUpperCase()+t.slice(1)+"s"]()},lang:H.fn.lang};for(P in se)se.hasOwnProperty(P)&&(L(P,se[P]),C(P.toLowerCase()));L("Weeks",6048e5),H.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},H.lang("en",{ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),A&&(module.exports=H),"undefined"==typeof ender&&(this.moment=H),"function"==typeof define&&define.amd&&define("moment",[],function(){return H})}.call(this); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/network/net_map.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/network/net_map.js
deleted file mode 100644
index 49599503..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/network/net_map.js
+++ /dev/null
@@ -1,947 +0,0 @@
-var graph,paper;
-var zoomIndex = 1;
-var recentCallFlow;
-var recentCallFlowStep;
-var hash_map = new Object();
-var hashVertexDomainXMap = new Object();
-
-var globalCollapseDomanString = "";
-var changeIcon = false;
-var colorSet = ["#0000FF","#8A2BE2","#DEB887",
- "#5F9EA0","#7FFF00","#D2691E","#6495ED","#DC143C",
- "#000000","#A9A9A9","#BDB76B",
- "#FF1493","#48D1CC","#A52A2A","#FF7F50","#DAA520","#32CD32"];
-var colorIndex = 0;
-String.prototype.startsWith = function (str)
-{
- return this.indexOf(str) == 0;
-}
-
-String.prototype.replaceAt=function(index, character) {
- return this.substr(0, index) + character + this.substr(index+character.length);
-}
-function getColor(id1,id2) {
-
- var color = colorSet[colorIndex];
- colorIndex++;
- return color;
-}
-/////////////////////////////////////////////////////////////////////////////////////
- $('.legend-toggle').click(function (a) {
-
- $('.legend-toggle .toggle').hasClass("on")?($('.legend-toggle .toggle').removeClass("on"),$("#legend").fadeOut(350)):($('.legend-toggle .toggle').addClass("on"),$("#legend").fadeIn(350));
-
- });
-
- $('.symbols-toggle').click(function (a) {
-
- $('.symbols-toggle .toggle').hasClass("on")?($('.symbols-toggle .toggle').removeClass("on"),$("#symbols").fadeOut(350)):($('.symbols-toggle .toggle').addClass("on"),$("#symbols").fadeIn(350));
- });
-
-
-
-plotNodes = function(domain) {
-
- if(domain.containerList) {
-
- var containerList = domain.containerList;
-
- for(var i=0; i<containerList.length; i++) {
-
- var container = containerList[i];
- plotContainer(container, 'outContainer');
- }
-
- }
-
- if(domain.innerCList) {
-
- var containerList = domain.innerCList;
-
- for(var i=0; i<containerList.length; i++) {
-
- var container = containerList[i];
- plotContainer(container, 'insideContainer');
- }
-
- }
-
- if(domain.elementList) {
- var elementList = domain.elementList;
-
- for(var i=0; i<elementList.length; i++) {
-
- var element = elementList[i];
- plotElement(element);
- }
-
- }
-}
-
-plotNodesIcon = function(domain) {
-
- if(domain.containerList) {
-
- var containerList = domain.containerList;
-
- for(var i=0; i<containerList.length; i++) {
-
- var container = containerList[i];
- plotContainerIcon(container, 'outContainer');
- }
-
- }
-
- if(domain.innerCList) {
-
- var containerList = domain.innerCList;
-
- for(var i=0; i<containerList.length; i++) {
-
- var container = containerList[i];
- plotContainerIcon(container, 'insideContainer');
- }
-
- }
-
- if(domain.elementList) {
- var elementList = domain.elementList;
-
- for(var i=0; i<elementList.length; i++) {
-
- var element = elementList[i];
- plotElementIcon(element);
- }
-
- }
-
-}
-
-plotExpand = function(container) {
- attributes = container;
- $('#networkModelContainer').append('<div class="expandtri"' + 'id= "' + attributes.name + '"' + 'title= "'+ attributes.name + '"' + ' style="position:absolute;left:'+ (attributes.newXafterColl) +'px;top:' + (attributes.YafterColl) + 'px;width:' + 30 + 'px;height:' + 50 + 'px;z-index:200;">' + '<img src="static/img/map/expand-icon.png" height="42" width="42"></div>');
-
-
-}
-
-plotContainer = function(container, cssType) {
-
- attributes = container;
- //console.log(attributes);
- if(cssType === 'domain'){
- $('#networkModelContainer').append('<div class="container ' + cssType + '" style="position:absolute;left:'+ attributes.left +'px;top:' + attributes.top + 'px;width:' + attributes.width + 'px;height:' + attributes.height + 'px;z-index:-200;' + 'border:1px blue;"><p class="textconetent" style="text-align:center;margin-top:11px;color:white;font-weight:bold;font-size:24px;">' + attributes.name + '</p></div>');
- $('#networkModelContainer').append('<div class="contracttri"' + 'id= "' + attributes.name + '"' + ' style="position:absolute;left:'+ (attributes.left+attributes.width - 40) +'px;top:' + attributes.top + 'px;width:' + 20 + 'px;height:' + (attributes.height/3) + 'px;z-index:200;">' + '<img src="static/img/map/contract-icon.png" height="42" width="42"></div>');
-
-
- }else if(attributes.visibilityType==='invisible'){
-
- $('#networkModelContainer').append('<div ' + '" style="position:absolute;left:'+ (attributes.left+14) +'px;top:' + (attributes.top-5) + 'px;width:' + attributes.width + 'px;height:' + (attributes.height-35) + 'px;' + 'border:1px blue;"><p style="font-weight:bold;font-size:10px;">' + attributes.name + '</p></div>');
-
- }else{
-
- if(!recentCallFlow){
- $('#networkModelContainer').append('<div class="container borderContainer ' + cssType + '" style="position:absolute;left:'+ attributes.left +'px;top:' + attributes.top + 'px;width:' + attributes.width + 'px;height:' + attributes.height + 'px;z-index:-200;' + 'border:1px blue;">' + '</div>');
- //$('#networkModelContainer').append('<p class="speech"' + ' style="position:absolute;left:' + (attributes.left-20) + 'px;top:' + (attributes.top-30) + 'px;width:' + attributes.width + 'px"' + '>'+ attributes.name + '</p>');
- plotHeader(attributes,cssType);
- }else{
- $('#networkModelContainer').append('<div class="container ' + cssType + '" style="position:absolute;left:'+ attributes.left +'px;top:' + attributes.top + 'px;width:' + attributes.width + 'px;height:' + attributes.height + 'px;z-index:-200;' + 'border:1px blue;">' + '</div>');
- //$('#networkModelContainer').append('<p class="speech"' + ' style="position:absolute;left:' + (attributes.left-20) + 'px;top:' + (attributes.top-30) + 'px;width:' + attributes.width + 'px"' + '>'+ attributes.name + '</p>');
- plotHeader(attributes,cssType);
- }
-
- }
-
- plotNodes(container);
-
- }
-
-plotContainerIcon = function(container, cssType) {
- attributes = container;
- //console.log(attributes);
- if(cssType === 'domain'){
- $('#networkModelContainer').append('<div class="container ' + cssType + '" style="position:absolute;left:'+ attributes.left +'px;top:' + attributes.top + 'px;width:' + attributes.width + 'px;height:' + attributes.height + 'px;z-index:-200;' + 'border:1px blue;"><p class="textconetent" style="text-align:center;margin-top:11px;color:white;font-weight:bold;font-size:24px;">' + attributes.name + '</p></div>');
- $('#networkModelContainer').append('<div class="contracttri"' + 'id= "' + attributes.name + '"' + ' style="position:absolute;left:'+ (attributes.left+attributes.width - 40) +'px;top:' + attributes.top + 'px;width:' + 20 + 'px;height:' + (attributes.height/3) + 'px;z-index:200;">' + '<img src="static/img/map/contract-icon.png" height="42" width="42"></div>');
-
- }else if(attributes.visibilityType==='invisible'){
-
- $('#networkModelContainer').append('<div ' + '" style="position:absolute;left:'+ (attributes.left+14) +'px;top:' + (attributes.top-5) + 'px;width:' + attributes.width + 'px;height:' + (attributes.height-35) + 'px;' + 'border:1px blue;"><p style="font-weight:bold;font-size:10px;">' + attributes.name + '</p></div>');
- }
- else{
- if(!recentCallFlow){
- $('#networkModelContainer').append('<div class="container borderContainer ' + cssType + '" style="position:absolute;left:'+ attributes.left +'px;top:' + attributes.top + 'px;width:' + attributes.width + 'px;height:' + attributes.height + 'px;z-index:-200;' + 'border:1px blue;">' + '</div>');
- //$('#networkModelContainer').append('<p class="speech"' + ' style="position:absolute;left:' + (attributes.left-20) + 'px;top:' + (attributes.top-30) + 'px;width:' + attributes.width + 'px"' + '>'+ attributes.name + '</p>');
- plotHeader(attributes,cssType);
- }else{
- $('#networkModelContainer').append('<div class="container ' + cssType + '" style="position:absolute;left:'+ attributes.left +'px;top:' + attributes.top + 'px;width:' + attributes.width + 'px;height:' + attributes.height + 'px;z-index:-200;' + 'border:1px blue;">' + '</div>');
- //$('#networkModelContainer').append('<p class="speech"' + ' style="position:absolute;left:' + (attributes.left-20) + 'px;top:' + (attributes.top-30) + 'px;width:' + attributes.width + 'px"' + '>'+ attributes.name + '</p>');
- plotHeader(attributes,cssType);
- }
- }
-
- plotNodesIcon(container);
-
-}
-
-joint.shapes.basic.newRect = joint.shapes.basic.Generic.extend({
-
- markup: '<g class="rotatable"><g class="scalable"><rect/></g><text/></g>',
-
- defaults: joint.util.deepSupplement({
-
- type: 'basic.newRect',
- attrs: {
- 'rect': { fill: 'white', stroke: 'black', 'follow-scale': true, width: 80, height: 40},
- 'text': { 'font-size': 14, 'ref-x': .5, 'ref-y': .5, ref: 'rect', 'y-alignment': 'middle', 'x-alignment': 'middle'}
- },
- shortname: 'Transcoder',
- description: 'Reconciles mismatched CODECs',
- longname: 'ACME SBC device providing dedicated Transcoder function',
- vendor: 'ORACLE ACME',
- primary_function: 'Allows endpoints utilizing different CODECs to communicate',
- key_interface: 'SBC, MSC',
- network_domain: 'Universal Services Platform - Access Module Group - ISA Core Office',
-
-}, joint.shapes.basic.Generic.prototype.defaults)});
-
-plotHeader = function(attributes,cssType){
-
- var nameLength = attributes.name.length;
- var headName;
- if (nameLength>22){
- headName = attributes.name.substring(0,12) + "-\n" + attributes.name.substring(12);
-
- }else{
- headName = attributes.name;
- }
-
- var thisElement = new joint.shapes.basic.newRect({
- position: { x: attributes.left+10, y: attributes.top + 4 },
- size: { width: attributes.width-20, height: 15 },
- attrs: {
- rect: { fill: "gray" ,stroke: "gray",opacity:"0.8"},
- text: { text: headName, fill: 'black' ,'font-size':10, 'font-weight':'700','text-transform': 'capitalize'}
-
- }
- });
- if(cssType==="outContainer"){
-
- thisElement.attr({
- rect:{fill:"#e7e7e7", stroke: "#e7e7e7",opacity:"0.8"}
- });
-
- }else{
-
- thisElement.attr({
- rect:{fill:"ghostwhite", stroke: "ghostwhite",opacity:"0.8"}
- });
-
-
- }
- graph.addCells([thisElement]);
-
-}
-plotElement = function(element) {
-
- if(element.left){
- if(!element.id.startsWith("com.att.trinity.ue")){
- left = element.left ;
- var thisColor = element.bgColor;
- var thisElement = new joint.shapes.basic.newRect({
- id:element.id,
- position: { x: element.left, y: element.top },
- size: { width: element.width, height: element.height*2 },
-
- attrs: {
- rect: { fill: "lightgray" ,stroke: "gray"},
- text: { text: element.name.replace(" ","\n"), fill: 'black' ,'font-size': 9, 'font-weight': 'bold','font-variant': 'small-caps', 'text-transform': 'capitalize'}
-
- }
-
- });
- if(!recentCallFlow){
- thisElement.attr({
- rect:{fill:element.bgColor, stroke: thisColor}
- });
-
- }
- //thisElement.attr({rect:{style:{"pointer-events":"none"}}});
- thisElement.set('bg-color', (element.bgColor!= null?element.bgColor:"blue"));
- thisElement.set('icon_path', (element.imgFileName != null? element.imgFileName: "static/img/map/icons/sgw-icon.png"));
- thisElement.set('shortname', element.name);
- thisElement.set('description', element.details.description);
- thisElement.set('longname', element.details.display_longname);
- thisElement.set('vendor', element.details.vendor);
- thisElement.set('primary_function', element.details.primary_function);
- thisElement.set('key_interface', element.details.key_interfaces);
- thisElement.set('location', element.details.location);
- thisElement.set('network_function', (element.details.network_function=="V")? "Virtual" : "Physical" );
- if(element.borderType == 'dashed'){
-
- thisElement.attr({
- rect: {stroke: 'black','stroke-width':"2",'stroke-dasharray': "5,2" },
- });
-
- }
-
-
- hash_map[element.name+'']=thisElement.name;
- graph.addCells([thisElement]);
-
- }else{
- plotElementIcon(element);
- }
- }
-
-}
-
-joint.shapes.basic.DecoratedRect = joint.shapes.basic.Generic.extend({
-
- markup: '<g class="rotatable"><g class="scalable"><rect/></g><image/><text/></g>',
-
- defaults: joint.util.deepSupplement({
-
- type: 'basic.DecoratedRect',
- size: { width: 100, height: 60 },
- attrs: {
- 'rect': { fill: 'lightgray', width: 100, height: 60 },
- 'text': { 'font-size': 14, text: '', 'ref-x': .5, 'ref-y': .5, ref: 'rect', 'y-alignment': 'middle', 'x-alignment': 'middle', fill: 'black'},
- 'image': { ref: 'rect', width: 35, height: 25}
- },
- shortname: 'Transcoder',
- description: 'Reconciles mismatched CODECs',
- longname: 'ACME SBC device providing dedicated Transcoder function',
- vendor: 'ORACLE ACME',
- primary_function: 'Allows endpoints utilizing different CODECs to communicate',
- key_interface: 'SBC, MSC',
- network_domain: 'Universal Services Platform - Access Module Group - ISA Core Office',
-
- }, joint.shapes.basic.Generic.prototype.defaults)
-});
-
-plotElementIcon = function(element) {
-
-
- if(element.left){
-
- left = element.left ;
- uetop = element.top;
- if(element.id.startsWith("com.att.trinity.ue")) {
- uetop = element.top - 30;
- } else {
- uetop = element.top ;
- }
- var thisElement = new joint.shapes.basic.DecoratedRect({
- id:element.id,
- position: { x: element.left, y: uetop },
- size: { width:element.width, height: element.height*2 },
- // style:{'pointer-events':'none'},
- attrs: {
- //image: { 'xlink:href': 'static/img/map/icons/sgw-icon.png'
- image: { 'xlink:href': element.imgFileName}
- //rect:{style:{"pointer-events":"none"}}
- // style:{'pointer-events':'none'}
- // 'pointer-events':'none'
- }
- });
- // thisElement.attr({rect:{style:{"pointer-events":"none"}}});
- thisElement.set('bg-color', element.bgColor);
- thisElement.set('icon_path', element.imgFileName);
- thisElement.set('shortname', element.name);
- thisElement.set('description', element.details.description);
- thisElement.set('longname', element.details.display_longname);
- thisElement.set('vendor', element.details.vendor);
- thisElement.set('primary_function', element.details.primary_function);
- thisElement.set('key_interface', element.details.key_interfaces);
- thisElement.set('location', element.details.location);
- thisElement.set('network_function', (element.details.network_function=="V")? "Virtual" : "Physical");
-
- if(!recentCallFlow ){
- thisElement.attr({
- rect:{fill:element.bgColor }
- });
-
- }
- if(element.borderType == 'dashed'){
-
- thisElement.attr({
- rect: {stroke: 'lightskyblue','stroke-width':"2",'stroke-dasharray': "5,2" },
- });
-
- }
- if(element.id.startsWith("com.att.trinity.ue")){
- thisElement.attr({
- rect: {fill: 'white', style:{'pointer-events':'none'}},
- image: { style:{'pointer-events':'none'}}
- });
-
- //thisElement.css('pointer-events', 'none');
- // paper.thisElement.css('pointer-events', 'none');
- }
- hash_map[element.name+'']=thisElement.name;
- graph.addCells([thisElement]);
-
- }
-
-}
-
-
-plotNetMapCallFlow = function(callFlow, callFlowStep, collapsedDomainString, expandedDomainString, icon) {
-
- init();
-
- recentCallFlow = callFlow; //callFlow != null ? callFlow : recentCallFlow;
- recentCallFlowStep = callFlowStep; //callFlowStep != null ? callFlowStep : recentCallFlowStep;
-
- // $.get( "static/trisim_files/network_map.yml", function( data ) {
-
- if(callFlow != null &&callFlow.title != null) {
-
- $(".map-title").html(callFlow.title);
-
- }else{
- $(".map-title").html("Network Map");
-
- }
- $.post('network_model.htm?action=layout', {
- collapsedDomains : collapsedDomainString,
- expandedDomains : expandedDomainString
- }, function(data) {
- var yamlObject = jsyaml.load(data);
-
- var layout = yamlObject.domainList;
- for(var i=0; i<layout.length; i++) {
- domain = layout[i];
- if(icon)
- plotContainerIcon(domain,'domain');
- else
- plotContainer(domain,'domain');
-
- hashVertexDomainXMap[domain.name] = domain.left;
- }
-
- var collapseLayout = yamlObject.collapsedDomainList;
- globalCollapseDomanString = "";
- for(var i=0; i<collapseLayout.length; i++) {
- domain = collapseLayout[i];
- globalCollapseDomanString += (domain.name + ",");
- plotExpand(domain);
- addExpandEvents();
-
- // some hardcoded hack; need to revise; if any one if these are collapsed , then we should not display hard coded links in addLinkVertices method
- if((globalCollapseDomanString.indexOf("USP") > -1)|| (globalCollapseDomanString.indexOf("RAN") > -1)|| (globalCollapseDomanString.indexOf("EPC") > -1)) {
- hashVertexDomainXMap["USP"] = -999;
- hashVertexDomainXMap["RAN"] = -999;
- hashVertexDomainXMap["EPC"] = -999;
- }
-
- }
-
-
- addCollapseEvents(); //onclick="alert(\'hello\')"
- //console.log(yamlObject);
- //addLink('EATF','SDG');
- if(icon == false)
- $('.icons-toggle .toggle').removeClass("on");
-
-
- if(callFlow != null && callFlow.id != null) {
-
- // var callFlowLinkFile = callFlow + "_" + callFlowStep + ".yml";
-
- $.post('network_model.htm?action=callflow', {
- callFlowName : callFlow.id,
- callFlowStep : callFlowStep
- }, function( data ) {
-
- try{
- var yamlObject = jsyaml.load(data);
- //addLink("EATF","MRF");
- var layout = yamlObject.linkList;
-
- var hashLinkElements = new Object();
- for(var i=0; i<layout.length; i++) {
- domain = layout[i];
- try {
- if(hashLinkElements[domain.s] != undefined)
- hashLinkElements[domain.s] +=1;
- else hashLinkElements[domain.s] =1;
- if(hashLinkElements[domain.d] != undefined )
- hashLinkElements[domain.d] +=1;
- else hashLinkElements[domain.d] =1;
- } catch (exception) {}
- }
-
- for(var i=0; i<layout.length; i++) {
- domain = layout[i];
- try {
- addLink(domain.s,domain.d, hashLinkElements,'none');
- } catch (exception) {}
- }
-
- //console.log(yamlObject);
- }
- catch(err) {}
-
- $.post('network_model.htm?action=callflowAdditional', {
- callFlowName : callFlow.id,
- callFlowStep : callFlowStep
- }, function( data ) {
-
- try{
- var yamlObject = jsyaml.load(data);
- //addLink("EATF","MRF");
- var layout = yamlObject.linkList;
- if(layout != undefined)
- for(var i=0; i<layout.length; i++) {
- domain = layout[i];
- try {
- var source = domain.s.split(",");
- var destination = domain.d.split(",");
- addLinkVertices(source[0],source[1],source[2], source[3], destination[0], destination[1], destination[2],'none');
-
- } catch (exception) {}
- }
-
- //make cells active
- var activeIds = yamlObject.activeIds;
- if(activeIds != undefined)
- for(var i=0; i<activeIds.length; i++) {
-
- var chosenElement1 = graph.getCell(activeIds[i]);
- chosenElement1.attr({
- rect: { fill: chosenElement1.get('bg-color')}
- });
- }
-
- // disconnect some links
-
- var disconnectLinks = yamlObject.disconnectLinks;
- if(disconnectLinks != undefined)
- var availableLinks = graph.getLinks();
- //var availableLinks = paper.model.getLinks();
- for(var i=0; i<disconnectLinks.length; i++) {
-
- for(var j=0;j<availableLinks.length; j++) {
-
- if(availableLinks[j].attributes.source.id != undefined ) {
-
-
- if(disconnectLinks[i].s == availableLinks[j].attributes.source.id && disconnectLinks[i].d == availableLinks[j].attributes.target.id) {
-
- availableLinks[j].remove();
- break;
- }
-
- }
- }
- }
-
-
- //console.log(yamlObject);
- }
- catch(err) {}
- finally {
-
- makeLinksVisible();
- }
-
-
- });
-
-
- });
-
-
-
-
-
-
- }
-
-
- });
-
-
-
-
-
-
-};
-
-
-makeLinksVisible = function() {
-
- var linkElements = $(".link");
-
- for(var i= 0;i<linkElements.length;i++) {
- var pathElement = linkElements[i].childNodes[0];
- pathElement.attributes.display.value = 'inline';
- }
-
-
-};
-
-parseYaml = function(callFlow, callFlowStep, collapsedDomainString, expandedDomainString) {
- $('#containerScrollDiv').css("z-index",0);
- plotNetMapCallFlow(callFlow, callFlowStep, collapsedDomainString, expandedDomainString,false);
-
-};
-
-
-parseYamlIcon = function(callFlow, callFlowStep, collapsedDomainString, expandedDomainString){
- $('#containerScrollDiv').css("z-index",0);
- plotNetMapCallFlow(callFlow, callFlowStep, collapsedDomainString, expandedDomainString,true);
-
-};
-
-addLinkVertices = function(sourceX,sourceY, sourceDomain, sourceLabel, destinationX, destinationY, destinationDomain, display){
-
- if(Number(hashVertexDomainXMap[sourceDomain]) == -999)
- return ;
-
- var link = new joint.dia.Link({
- source: { x: Number(hashVertexDomainXMap[sourceDomain]) + Number(sourceX), y: Number(sourceY)},
- target: { x: Number(hashVertexDomainXMap[destinationDomain]) + Number(destinationX), y: Number(destinationY)},
- attrs: {
- '.connection': {
- stroke: '#b5af4c',
- //stroke:getColor(id1,id2),
- 'stroke-width': 2,
- 'display' : (display == undefined ? 'block' : display)
- }
- }
-
- });
-
- if(sourceLabel != "-" ) {
-
- link.label(0, {
- position: .5,
- attrs: {
- text: { fill: 'black', text: sourceLabel.replace(" ","\n") }
- }
- });
-
- }
-
- graph.addCells([link]);
- link.toBack();
-
-}
-
-addLink = function(id1,id2, hashLinkElements, display){
-
- var elementId1 = graph.getCell(id1);
- var elementId2 = graph.getCell(id2);
- var elementId1x = elementId1.attributes.position.x;
- var elementId1y = elementId1.attributes.position.y;
- var elementId2x = elementId2.attributes.position.x;
- var elementId2y = elementId1.attributes.position.y;
-
-
- var link = new joint.dia.Link({
- source: { id: elementId1.id},
- target: { id: elementId2.id},
- //source: { x: elementId1.attributes.position.x+10, y: elementId1.attributes.position.y+10},
- //target: { x: elementId2.attributes.position.x+10, y: elementId2.attributes.position.y+10},
- router: { name: 'manhattan' },
- connector: { name: 'normal' },
- attrs: {
- '.connection': {
- //stroke: '#333333',
- stroke:getColor(id1,id2),
- 'stroke-width': 2,
- 'z-index' :-300,
- 'display' : (display == undefined ? 'block' : display)
- },
-
- },
- });
-
- graph.addCells([link]);
- link.toBack();
- //link.set('vertices', [{ x: (elementId1x + elementId2x)/2 , y: (elementId1y + elementId2y)/2 }]);
- //link.translate(10, 10);
-
-
- var chosenElement1 = graph.getCell(id1);
- chosenElement1.attr({
- rect: { fill: chosenElement1.get('bg-color')}
- });
- var chosenElement2 = graph.getCell(id2);
- chosenElement2.attr({
- rect: { fill: chosenElement2.get('bg-color')}
- });
-
- // logic to avoid overlapping links ; create dummy hidden objects at the vertices so that smart routing will avoid these obstacle when plotting the link
- if(hashLinkElements[id1]> 0 || hashLinkElements[id2] >0) {
- var linkElement = $("[model-id^=" + link.id +"]");
- var pathElement = linkElement.children("path")[0];
- var pathCoordinates = pathElement.attributes.d.value.split(" ");
- for(var i = 1; i<pathCoordinates.length/2 ;i+=2) {
-
- try{
- // plot an element on the starting points
- plotHiddenDummyElement(link.id+"-"+i,Number(pathCoordinates[i]), Number(pathCoordinates[i+1]) );
- }catch(err){
- console.log(err);
- }
-
- try{
- // plot half way on the edge too
- plotHiddenDummyElement(link.id+"--"+i,(Number(pathCoordinates[i])+Number(pathCoordinates[i+2]))/2, (Number(pathCoordinates[i+1])+Number(pathCoordinates[i+3]))/2 );
- }catch(err){}
-
- }
- var newPathCoordinates = "M";
- // in IE every XandY coordinates pair is delimited with L; so two x coordinates are 2 elements apart. In firefox and chrome, they are one element apart. For more clarification,
- // check the pathCoordinates in debug window
- var nextIndex = Browser.isIE == true ? 3 : 2;
- for(var i = 1; i<pathCoordinates.length ;i++) {
- if( i == 1 ) {
- if(pathCoordinates[i] == pathCoordinates[i+nextIndex]) {// x coordinates are the same
- var originalI = Number(pathCoordinates[i]);
- var newI = originalI + (Number(hashLinkElements[id1])*2);
-
- // iteratively change the x coordinates for all the segments
- for(var j = i; j<pathCoordinates.length; j+=nextIndex) {
- if(pathCoordinates[j] == originalI)
- pathCoordinates[j] = newI;
- }
-
- }
- else if(pathCoordinates[i+1] == pathCoordinates[i+1+nextIndex]) {// y coordinates are the same
-
- var originalI = Number(pathCoordinates[i+1]);
- var newI = originalI - (Number(hashLinkElements[id1])*2);
-
- // iteratively change the y coordinates for all the segments
- for(var j = i+1; j<pathCoordinates.length; j+=nextIndex) {
- if(pathCoordinates[j] == originalI)
- pathCoordinates[j] = newI;
- }
-
- }
-
- hashLinkElements[id1]-=1;
- }
- newPathCoordinates += " "+ pathCoordinates[i];
- }
-
- pathElement.attributes.d.value = newPathCoordinates;
-
- }
- //
-
-};
-
-plotHiddenDummyElement = function(dummyId, left, top) {
-
- var thisElement = new joint.shapes.basic.newRect({
- id:dummyId,
- position: { x: left-5, y: top-5 },
- size: { width: 10, height: 10 }
- });
-
- thisElement.attr('./display', 'none');
- graph.addCells([thisElement]);
-
-};
-
-
-////////////////////////////////////////////////////////////////////////////////////////////
-init = function() {
-
- $('.close-btn').click(function (a) {
- $('#popup').fadeOut();
- });
-
-
- if ( window.name === tsWindow.detailWindow && tsWindow.newWindow !== null ) {
- $("#map-controls").fadeOut();
- } else {
- $("#map-controls").fadeIn();
- }
- colorIndex= 0;
-
- if(!changeIcon){
- //$('.legend-toggle .toggle').addClass("on");
- //$("#legend").fadeIn(350);
- }
-
- if(typeof graph!=='undefined'){
- graph.clear();
- $('#networkModelContainer').empty();
- }
- graph = new joint.dia.Graph;
-
- paper = new joint.dia.Paper({
- interactive: false,
- el: $('#networkModelContainer'),
- width: "1400",
- height: 1000,
- model: graph,
- gridSize: 1
- });
-
- //paper.setOrigin(100,100);
-
- // paper.$el.css('pointer-events', 'none');
- paper.on('cell:pointerdown',
- function(cellView, evt, x, y) {
-
- var clickedElement = graph.getCell(cellView.model.id);
- if(clickedElement.get('icon_path')!=null){
-
- // if (clickedElement.get('description') != '') {
-
- $('#popupImg').attr('src',clickedElement.get('icon_path'));
- $("#popupImg").css("background-color",clickedElement.get('bg-color'));
- $('#shortname').text(clickedElement.get('shortname'));
- $('#longname').text(clickedElement.get('longname'));
- $('#name').text(clickedElement.get('longname'));
- $('#description').text(clickedElement.get('description'));
- $('#vendor').text(clickedElement.get('vendor'));
- $('#primary_function').text(clickedElement.get('primary_function'));
- $('#key_interface').text(clickedElement.get('key_interface'));
- $('#location').text(clickedElement.get('location'));
- $('#network_function').text(clickedElement.get('network_function'));
- $('#popup').fadeIn();
- // }
- }
-
-
- }
-
-
- );
-
- /**
- * Zoom In/Out Button
- */
- var w = $("#networkModelContainer").css("width");
- var h = $("#networkModelContainer").css("height");
- $('#btn-zoom-in').unbind("click");
- $('#btn-zoom-in').click(function (a) {
- zoomIndex+=0.04;
- //$("#containerScrollDiv").css("transform",'scale('+ zoomIndex + ')');
- //$("#containerScrollDiv").css("transform-origin",'top left');
- $("#networkModelContainer").css("transform",'scale('+ zoomIndex + ')');
- $("#networkModelContainer").css("transform-origin",'top left');
- $("#networkModelContainer").css("width",w);
- $("#networkModelContainer").css("height",h);
- $("#containerScrollDiv").mCustomScrollbar('update');
- //$("#containerScrollDiv").mCustomScrollbar({
- // axis:"yx" //horizontal scrollbar
- // });
-
-
- });
- $('#btn-zoom-out').unbind("click");
-
- $('#btn-zoom-out').click(function (a) {
-
- if(zoomIndex > 0.9){
- zoomIndex-=0.04;
- //$("#containerScrollDiv").css("transform",'scale('+ zoomIndex + ')');
- //$("#containerScrollDiv").css("transform-origin",'top left');
- $("#networkModelContainer").css("transform",'scale('+ zoomIndex + ')');
- $("#networkModelContainer").css("transform-origin",'top left');
- $("#networkModelContainer").css("width",w);
- $("#networkModelContainer").css("height",h);
-
- //$("#containerScrollDiv").mCustomScrollbar('update');
- $("#containerScrollDiv").mCustomScrollbar('destroy');
- $("#containerScrollDiv").mCustomScrollbar({
- axis:"yx", //horizontal scrollbar
- theme:"3d-thick-dark",
- scrollButtons:{enable:true},
- alwaysShowScrollbar:2
- });
- }
-
- });
-
-
- $('.icons-toggle').unbind("click");
- $('.icons-toggle').click(function (a) {
-
- if($('.icons-toggle .toggle').hasClass("on")){
-
- changeIcon = true;
- $("#networkModelContainer").empty();
- parseYamlIcon(recentCallFlow, recentCallFlowStep, globalCollapseDomanString);
-
- }else{
-
- changeIcon = true;
- $("#networkModelContainer").empty();
- parseYaml(recentCallFlow, recentCallFlowStep, globalCollapseDomanString);
-
- }
-
- });
-
- paper.$el.addClass('connecting');
-
-
-};
-
-
-
- addCollapseEvents = function() {
-
- /*$(document).on("click",".contract",function() {
- alert("click bound to document listening for #test-element");
- });
- */
- var contractElement =$('.contracttri');
-
- contractElement.unbind("click");
- contractElement.css('cursor', 'pointer');
- contractElement.click(function() {
-
- if($('.icons-toggle .toggle').hasClass("on")){
-
- $("#networkModelContainer").empty();
- parseYamlIcon(recentCallFlow, recentCallFlowStep, (globalCollapseDomanString + this.id));
-
- }else{
-
- $("#networkModelContainer").empty();
- parseYaml(recentCallFlow, recentCallFlowStep, (globalCollapseDomanString + this.id));
-
- }
-
- });
-
- };
-
-
- addExpandEvents = function() {
-
- /*$(document).on("click",".contract",function() {
- alert("click bound to document listening for #test-element");
- });
- */
- var contractElement =$('.expandtri');
-
- contractElement.unbind("click");
- contractElement.css('cursor', 'pointer');
- contractElement.click(function() {
-
- if($('.icons-toggle .toggle').hasClass("on")){
-
- $("#networkModelContainer").empty();
- parseYamlIcon(recentCallFlow, recentCallFlowStep, globalCollapseDomanString, (this.id));
-
- }else{
-
- $("#networkModelContainer").empty();
- parseYaml(recentCallFlow, recentCallFlowStep, globalCollapseDomanString, (this.id));
-
- }
-
- });
-
-};
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js
deleted file mode 100644
index cb5fb80d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/adminService.js
+++ /dev/null
@@ -1,141 +0,0 @@
-app.factory('AdminService', function ($http, $q) {
- return {
- getRoles: function() {
- return $http.get('get_roles')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getRoleFunctionList: function() {
- return $http.get('get_role_functions')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getFnMenuItems: function(){
-
- return $http.get('admin_fn_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
-
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getCacheRegions: function() {
- return $http.get('get_regions')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getUsageList: function() {
- return $http.get('get_usage_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getBroadcastList: function() {
- return $http.get('get_broadcast_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getBroadcast: function(messageLocationId, messageLocation, messageId) {
- return $http.get('get_broadcast?message_location_id='+messageLocationId + '&message_location=' + messageLocation + ((messageId != null) ? '&message_id=' + messageId : ''))
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getCollaborateList: function() {
- return $http.get('get_collaborate_list')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getRole: function(roleId) {
-
- return $http.get('get_role?role_id=' + roleId)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
- };
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js
deleted file mode 100644
index 4566c8fa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/headerService.js
+++ /dev/null
@@ -1,70 +0,0 @@
-var menuStructureConvert = function(menuItems) {
- var megaMenuDataObjectTemp = [
- {
- text: "ECOMP",
- children:menuItems
- },
- {
- text: "Help",
- children: [{
- text:"Contact Us",
- url:"javascript:angular.element('[ng-controller=headerController]').scope().redirectLink('contact');"
- },
- {
- text:"Get Access",
- url:"javascript:angular.element('[ng-controller=headerController]').scope().redirectLink('access');"
- }]
- }
- ];
- return megaMenuDataObjectTemp;
-};
-var unflatten = function( array, parent, tree ){
- tree = typeof tree !== 'undefined' ? tree : [];
- parent = typeof parent !== 'undefined' ? parent : { menuId: null };
- var children = _.filter( array, function(child){ return child.parentMenuId == parent.menuId; });
-
- if( !_.isEmpty( children ) ){
- if( parent.menuId === null ){
- tree = children;
- }else{
- parent['children'] = children
- }
- _.each( children, function( child ){ unflatten( array, child ) } );
- }
-
- return tree;
- }
-app.service('HeaderService', function ($http,$log, $q,UserInfoService) {
- return{
-
- getUserNameFromSession : function(){
- UserInfoService.getFunctionalMenuStaticDetailSession()
- .then(function (res) {
- $scope.userName = res.userName;
- $scope.redirectUrl = res.portalUrl;
- });
- },
- getTopMenuStaticInfo:function() {
- var promise = UserInfoService.getFunctionalMenuStaticDetailShareContext();
- promise.then(
- function(res) {
- if(res==null || res==''){
- $log.info('failed getting static User information');
- this.getUserNameFromSession();
- }else{
- $log.info('Received static User information');
- var resData = res;
- $scope.inputUserInfo(resData);
- $scope.userProfile.fullName = $scope.userProfile.firstName+ ' '+ $scope.userProfile.lastName;
- return $scope.userProfile;
- }
- },
- function(err) {
- $log.info('failed getting static User information');
- }
- );
- }
- }
- }
-);
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js
deleted file mode 100644
index 12e19df2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/leftMenuService.js
+++ /dev/null
@@ -1,35 +0,0 @@
-function isRealValue(obj){
- return obj && obj !== "null" && obj!== "undefined";
-}
-app.factory('LeftMenuService', function ($http,$log, $q) {
- return {
- getLeftMenu: function() {
- return $http.get('get_menu')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
- getAppName: function() {
- return $http.get('get_app_name')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
-
- };
-});
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js
deleted file mode 100644
index ca4252df..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/profileService.js
+++ /dev/null
@@ -1,79 +0,0 @@
-
-app.factory('ProfileService', function ($http, $q) {
- return {
- getProfile: function() {
- return $http.get('get_user')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getProfilePagination: function(pageNum,viewPerPage) {
- return $http.get('get_user_pagination?pageNum=' + pageNum + '&viewPerPage=' + viewPerPage)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getPostProfile: function() {
- return $http.get('post_search_sample')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getProfileDetail: function(profileId) {
- return $http.get('get_profile?profile_id='+profileId)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getSelfProfileDetail: function() {
- return $http.get('get_self_profile')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js
deleted file mode 100644
index 66aa1c18..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/services/userInfoService.js
+++ /dev/null
@@ -1,32 +0,0 @@
-app.factory('UserInfoService', function ($http, $q,$log) {
- return {
- getFunctionalMenuStaticDetailShareContext: function(contextId,key) {
- var deferred = $q.defer();
- $http({
- method: "GET",
- url: "get_userinfo",
- }).success( function(res) {
- if(res==null || res=='')
- $log.info('Not be able to get User Info via shared context');
- deferred.resolve(res);
- }).error( function(status) {
- deferred.reject(status);
- });
- return deferred.promise;
- },
- getFunctionalMenuStaticDetailSession: function() {
- var deferred = $q.defer();
- $http({
- method: "GET",
- url: "get_topMenuInfo",
- }).success(function(res) {
- if(res==null || res=='')
- $log.info('Not be able to get User Info via shared context');
- deferred.resolve(res);
- }).error( function(status) {
- deferred.reject(status);
- });
- return deferred.promise;
- }
- };
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/socket/peerBroadcast.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/socket/peerBroadcast.js
deleted file mode 100644
index d056ce48..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/socket/peerBroadcast.js
+++ /dev/null
@@ -1,103 +0,0 @@
-
-var output = $('#peerBroadcastSection');
-var websocket = '';
-var currentUser = '';
-var remoteUser = '';
-var f = '';
-var popupService;
-
-function setPopupService(_popupService) {
- popupService = _popupService;
-}
-
-function socketSetup(initialPageVisit,_currentUser, _remoteUser, _f) {
-
-
-
- if( true) {
-
- var href = window.location.href;
- var hostPatt = new RegExp(window.location.host +"/[^/]*");
- var res = hostPatt.exec(href);
- var protocol = window.location.protocol.replace("http","ws");
-
- var signalingServerPath = protocol + "//" + res + "/contact";
- var wsUri = signalingServerPath;
- console.log("Connecting to " + wsUri);
- websocket = new WebSocket(wsUri);
- //localStorage.notifySocket = JSON.stringify(websocket);
- //window.top.notifySocket = websocket;
-
- currentUser = _currentUser;
- remoteUser = _remoteUser;
- f = socketSend;
-
-
- }
-
- //var websocket = JSON.parse(localStorage.notifySocket || "{}") ;
- if( websocket != null) {
- websocket.onopen = function(evt) { onOpen(evt); };
- websocket.onmessage = function(evt) { onMessage(evt); };
- websocket.onerror = function(evt) { onError(evt); };
-
- }
-
- //if(f != undefined)
- // f();
-
- //window.top.notifySocket.send("");
-}
-
-
-function socketSend(currentUser, remoteUser) {
-
-
-
- websocket.send(JSON.stringify({
- from: currentUser,
- to: remoteUser
- }));
-
- //window.top.notifySocket.send("");
-}
-
-
-
-
-function onOpen(evt) {
- console.log("onOpen");
- //writeToScreen("CONNECTED");
-
- if(f != undefined)
- f(currentUser, remoteUser);
-
-}
-
-function onMessage(evt) {
- if (typeof evt.data == "string") {
- writeToScreen("RECEIVED (text): " + evt.data);
-
- if(popupService != undefined) {
- popupService.showMessage("Call Request","You are being contacted by " + JSON.parse(evt.data).from + ". Please click on the online icon and then click view");
-
- }
- //if (confirm("You are being contacted by " + JSON.parse(evt.data).from )) {
-
- //}
-
- } else {
- writeToScreen("RECEIVED (binary): " + evt.data);
- }
-}
-
-function onError(evt) {
- writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
-}
-
-function writeToScreen(message) {
- var pre = document.createElement("p");
- pre.style.wordWrap = "break-word";
- pre.innerHTML = message;
- output.append(pre);
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/utils/dummy.txt b/usecaseui-common/src/main/webapp/app/fusion/scripts/utils/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/utils/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html
deleted file mode 100644
index d04eba9c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/utils/sandbox-resources.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/demo.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/base.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/dtpk.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/frms.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/sldr.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/tbs.css" >
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/dummy.txt b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/header.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/header.html
deleted file mode 100644
index e7616d94..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/header.html
+++ /dev/null
@@ -1,162 +0,0 @@
-<div style="position: relative; z-index: 999;">
- <div class="headerContainer" id="headerContainer" ng-show="{{showHeader}}">
- <div style="position: relative; z-index: 999;">
- <div class="headerContainer" id="headerContainer">
- <div id="megaMenuContainer" class="megaMenuContainer" style="margin-top: 0; overflow: visible;">
- <!--for mega Menu-->
- <!-- Mega Menu parent-tab directive with three models menu-items, active-sub-menu, active-menu -->
- <div id="topMenu" class="top-megamenu" ng-mouseleave="activeClickSubMenu.x.active=false; activeClickMenu.x.active=false" >
- <div style="float:left;width:100%;"parent-tab menu-items="megaMenuDataObject" active-sub-menu='activeClickSubMenu.x' active-menu='activeClickMenu.x'>
- <div parentmenu-tabs mega-menu="true" menu-items="megaMenuDataObject" style="height:55px;">
- <div style="float:left">
- <li class="megamenu__item" style="line-height:55px;" ng-click="returnToPortal()">
-
- <strong style="font-weight: 400 !important; font-family: clearview_att_bold !important; font-size: 18px;" >ECOMP Portal</strong>
- </li>
- <div menu-tabs mega-menu="true" tab-name="item.text" menu-item="item"
- active-menu="activeClickMenu.x"
- ng-repeat="item in megaMenuDataObject"
- style="font-size: 18px;"
- ng-mousedown="loadFavorites()">
- <div parentmenu-tabs sub-menu="true" ng-show="activeClickMenu.x.active && item.active"
- menu-items="activeClickMenu.x.children">
-
- <!-- Second level menu -->
- <div menu-tabs sub-menu="true" tab-name="subItem.text"
- tab-url="subItem.url" menu-item="subItem"
- ng-repeat="subItem in activeClickMenu.x.children | orderBy : 'column'" active-menu="activeClickSubMenu.x"
- sub-item-active="{{subItem.active}}" style="float:left;" aria-label="{{subItem.text}}"
- ng-mouseenter="submenuLevelAction(subItem.text,subItem.column)"
- ng-mouseleave="submenuLevelAction(subItem.text,subItem.column)"
- ng-click="submenuLevelAction(subItem.text,subItem.column)" >
- <i ng-if="subItem.text=='Favorites'" id="favorite-star"
- class="icon-star favorites-icon-active">
- </i>
- </div>
- <div class="sub__menu" ng-mouseleave="activeClickSubMenu.x.active=false" >
- <ul ng-show="activeClickSubMenu.x.active" role="menubar" class="columns">
- <!-- Third level menu -->
- <div menu-tabs
- menu-item="subItem"
- class="columns-div"
- ng-repeat="subItem in activeClickSubMenu.x.children | orderBy : 'column'"
- ng-show="activeClickSubMenu.x.active">
-
- <i id="favorite-selector-third-level"
- ng-show="isUrlFavorite(subItem.menuId)==false"
- class="icon-star favorites-icon-inactive"
- ng-if="subItem.url.length > 1">
- </i>
- <i id="favorite-selector-third-level"
- ng-show="isUrlFavorite(subItem.menuId)"
- class="icon-star favorites-icon-active"
- ng-if="subItem.url.length > 1">
- </i>
- <span class="title" aria-label="{{subItem.text}}"
- ng-click="goToUrl(subItem)">{{subItem.text}}</span>
- <!-- Fourth level menus -->
- <div att-links-list="">
- <i id="favorite-selector-fourth-level"
- class="icon-star favorites-icon-inactive"
- ng-show="isUrlFavorite(tabValue.menuId)==false"
- ng-if="tabValue.url.length > 1">
-
- </i>
- <i id="favorite-selector-fourth-level"
- class="icon-star favorites-icon-active"
- ng-show="isUrlFavorite(tabValue.menuId)"
- ng-if="tabValue.url.length > 1">
-
- </i>
- <span role="menuitem" att-links-list-item=""
- ng-repeat="tabValue in subItem.children"
- ng-click="goToUrl(tabValue)"
- att-accessibility-click="13,32"
- ng-class="{'disabled': tabValue.disabled}">{{tabValue.text}}</span>
- </div>
- <hr ng-show="!$last"/>
- </div>
- </ul>
- <!-- Favorites level menu -->
- <div class="favorites-window" ng-show='favoritesWindow' ng-mouseleave="hideFavoritesWindow()">
- <div id="favorites-menu-items" ng-show="showFavorites">
- <div ng-repeat="subItem in favoritesMenuItems"
- att-links-list=""
- style='display: inline'>
- <i id="favorite-selector-favorites-list"
- class="icon-star favorites-icon-active"
- >
- </i>
- <a id="favorites-list" aria-label="{{subItem.text}}"
- ng-click="goToUrl(subItem)"
- style="margin-left: 3px; margin-right: 20px; text-decoration: none; color: #666666;">
- {{subItem.text}}
- </a>
- </div>
- <div>
- <br>
- <p style='font-weight: 400; font-family: clearview_att_bold !important;
- font-size: 18px; text-align: center; background-color: lightgray;
- width: 400px; margin-left: 25%; margin-right: 25%;'>
- Manage favorites on ECOMP Portal.
- </p>
- </div>
- </div>
- <!-- Favorites when empty -->
- <div id="favorites-empty" ng-show="emptyFavorites" class="favorites-window-empty">
- <div>
- <img src="app/fusion/external/ebz/images/no_favorites_star.png">
- <p class='favoritesLargeText'>No Favorites</p>
- <p class='favoritesNormalText'>Manage favorites on ECOMP Portal.</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div >
- <li class="megamenu__item" style="line-height:55px;" ng-if="loadMenufail">
- <strong style="font-weight: 400 !important; font-family: clearview_att_bold !important; font-size: 18px;" >Unable to load menus</strong>
- </li>
- <div style="float:right">
- <li id="bcLoginSnippet" class="megamenu__item" style="width: 140px;" >
- <div popover="loginSnippet.html" aria-label="Login Snippet"
- referby="loginSnippet" att-accessibility-click="13,32" popover-style="\" popover-placement="below" style="width: 200px;">
- <div class="icon-user-small login-snippet-icon"></div>
- <div class="login-snippet-text" style="display: inline-block; font-size:12px; margin-left:5px;overflow: hidden; max-height: 31px; overflow: hidden; max-height: 31px; max-width:120px; padding-top: 0px; margin-top: 0px; white-space: nowrap;">{{userFirstName}}</div>
- </div>
- </li>
- </div>
- </div>
- </div>
- </div>
- <div style="clear: both"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
-</div>
-<script type="text/ng-template" id="loginSnippet.html">
- <div style="line-height: normal; right: 167px; min-height: 200px; height: auto; width: auto; " ng-controller="loginSnippetCtrl" >
- <div id="reg-header-snippet">
- <div class="reg-profilePicture" style="min-height: 215px; width: auto; " id="reg-profile-links">
- <div id="reg-profileImage">
- <div style="clear: both; height: 80px; position: relative; width: 80px;">
- <span style=" background-position: -1px -1px; height: 81px;left: 0;position: absolute;top: 0;width: 81px;">&nbsp;</span>
- </div>
- </div>
- <div id="reg-logout-div">
- <a class="reg-logout-btn" href="logout.htm">Log Out</a>
- </div>
- </div>
- <div tabindex="0" class="reg-profileDetails" id="reg-profiledetails-id">
- <ul class="reg-Details-table" style="list-style: none;">
- <li><div class="reg-userName-table"><div id="reg-userName-table-row"><div id="reg-userName-table-cell"><h3 class="att-global-fonts" style="font-size:18px !important;" id="reg-userName">{{userProfile.fullName}}&nbsp;</h3><span class="visuallyhidden">.</span></div></div></div></li>
- <li><div class="reg-userEmail-label"><span class="reg-userEmail-label-spn">EMAIL<span class="visuallyhidden">:</span></span></div></li>
- <li><div class="reg-userEmail-value"><span class="reg-userEmail-value-spn">{{userProfile.email}}<span class="visuallyhidden">.</span></span></div></li>
- </ul>
- </div>
- </div>
- </div>
-</script>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/left_menu.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/left_menu.html
deleted file mode 100644
index ad4e5d91..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/left_menu.html
+++ /dev/null
@@ -1,27 +0,0 @@
- <div class="license-notification">
- <a href="javascript:void(0)" style="background-color:#bbb;" class="button button--small" tooltip="Please contact ECOMP Portal team to get the license" tooltip-placement="below" tooltip-style="light" tooltip-popup-delay="500" >
- <span style="">{{app_name_full}}</span>
- </a>
-</div>
-<div ng-cloak>
- <span ng-style="adjustHLeftMenu('burgerIcon')" style="z-index:998; position:fixed; left:0%; font-size:35px; margin-left:10px;text-decoration:none;">
- <a ng-click="toggleDrawer();isOpen = !isOpen" href="javascript:void(0);" class="arrow-icon-left" >
- <span class="icon-hamburger"></span></a>
- <span ng-init="isOpen = true" ng-show="isOpen" style="font-size:16px; position:relative; top:-8px; left:-15px;">&nbsp&nbsp&nbsp {{app_name}}</span>
- </span>
- <div att-drawer drawer-slide="left" drawer-custom-top="{{drawer_custom_top}}px" drawer-size="200px" drawer-open="drawerOpen" drawer-custom-height="100%" >
- <div ng-style="adjustHLeftMenu('leftMenu')">
- <div class="attDrawer" style="z-index:998">
- <div class="appLeftMenuAccordDiv">
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group ng-repeat="parent in leftMenuItems" heading="{{parent.parentLabel}}" parent-link="{{parent.parentAction}}" image-source="{{parent.parentImageSrc}}" child-length="{{parent.childItemList.length}}" is-open="parent.open">
- <div ng-repeat="subMenu in parent.childItemList" style="font-size:12px; margin-left:10px;">
- <a href="{{subMenu.action}}" style="font-size:12px; color:#666666;" >{{subMenu.label}}</a>
- </div>
- </accordion-group>
- </accordion>
- </div>
- </div>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_closed_loop.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_closed_loop.html
deleted file mode 100644
index a3a5dfc1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/admin_closed_loop.html
+++ /dev/null
@@ -1,20 +0,0 @@
-<div style="margin-left:0px; margin-right:50px;" id="fnMenueContent">
- <div class="pageTitle" align="left">
-
- <h1 class="heading1" style="margin-top:20px;">Closed Loop</h1>
- <br/>
- <br>
- </div>
- <div style="margin-right: 20px;text-align: justify;text-align-last:auto;">
- Cloop Server
- </div>
- <br>
-
- <div id="hiddenCamundaDiv" style="width:500px;"></div>
- <br>
- <iframe id="camundaFrame"
- ng-src="{{camunda_cockpit_url}}"
- width="100%" height="500"
- ></iframe>
-</div>
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html
deleted file mode 100644
index 9ffd9810..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<div style="width:80%;margin-bottom:20px">
- <br/>
- <h1 class="heading1">Broadcast Message Edit</h1>
- <br/>
-
- <div ng-controller="broadcastController" >
- Please edit the broadcast message details below:&nbsp;<br><br>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Message Text:</label><BR>
- <textarea name="comment" ng-model="broadcastMessage.messageText" rows="5" cols="200" style="height:100px"></textarea>
- </div>
- <br>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Start Date:</label><BR>
- <input type="hidden" name="startDateHidden" ng-model="broadcastMessage.startDate">
- <input type="text" class="fn-ebz-text" id="startDatepicker" />
- </div>
-
- <div class="fn-ebz-container" style="margin-left:3em" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>End Date:</label><BR>
- <input type="hidden" name="endDateHidden" ng-model="broadcastMessage.endDate">
- <input type="text" class="fn-ebz-text" id="endDatepicker" />
- </div>
-
- <div class="fn-ebz-container" style="margin-left:3em" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Sort Order:</label><BR>
- <input type="text" class="fn-ebz-text" ng-model="broadcastMessage.sortOrder"
- maxlength="30" />
- </div>
-
- <div class="fn-ebz-container" style="margin-left:1em" >
- <label class="fn-ebz-text-label">Server:</label><BR>
- <div class="form-field" att-select="broadcastSites" ng-model="broadcastMessage.siteCd"></div>
- </div>
-
- <br>
- <div align="left" >
- <button type="submit" ng-click="save();" att-button btn-type="primary" size="small">Save</button>
- <button class="button button--information button--small" herf="javascript:void(0)" ng-click="close();">Cancel</button>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html
deleted file mode 100644
index 512ce7e8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/broadcast_list.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<div style="width:80%;">
-
-<div ng-controller="broadcastListController" >
-
- <h1 class="heading1">Broadcast Messages</h1>
- <br>
- <div ng-repeat="location in messageLocations" >
- {{location.label}} Messages
- <div title="{{location.label}} Messages">
-
- <table att-table table-data="location.messages" current-page="1">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%">No.</th>
- <th att-table-header sortable="false" width="30%">Message Text</th>
- <th att-table-header sortable="false" width="10%">Start Date</th>
- <th att-table-header sortable="false" width="10%">End Date</th>
- <th att-table-header sortable="false" width="10%">Sort Order</th>
- <th att-table-header sortable="false" width="10%">Server</th>
- <th att-table-header sortable="false" width="10%">Active?</th>
- <th att-table-header sortable="false" width="10%">Delete?</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="message in location.messages" style="max-height: 980px;" ><!-- background colors will alternate not properly with multiple tbody-->
- <tr>
- {{message.id}}
- <td width="10%"><a href="javascript:editMessage({{location.value}},'{{location.label}}',{{message.id}});">{{$index+1}}</a></td>
- <td width="30%">{{message.messageText}}</td>
- <td width="10%">
- {{message.displayStartDate}}
- </td>
- <td width="10%">{{message.displayEndDate}}</td>
- <td width="10%">{{message.sortOrder}}</td>
- <td width="10%">{{message.siteCd}}</td>
- <td width="10%">
- <div ng-click="toggleActive(message);">
- <input type="checkbox" ng-model="message.active" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="10%">
- <div ng-click="remove(message);" style="font-size:20px;"><a href="javascript:void(0)" class="icon-trash"></a></div>
- </td>
- </tr>
-
- </tbody>
- </table>
- </div>
- <input att-button btn-type="primary" size="small" class="button" type="button" value="Add" ng-click="editMessage(location);"/>
- <br/><br/><br/>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html
deleted file mode 100644
index 433e0c3f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal.html
+++ /dev/null
@@ -1,263 +0,0 @@
-<script type="text/ng-template" id="modal_informative.html">
- <div class="modal__informative font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Success!</h2>
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}</div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
-
- <script type="text/ng-template" id="delete_informative.html">
- <div class="modal__warning font-showcase">
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are you sure you want to delete the profile?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="email_report_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Mailing your report...</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- The report will be sent to your email soon!
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Ok</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_authCode.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are you sure you want to delete the Authorization Code(s)?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_Schedule.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Schedule(s) ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="alternate_number.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Number ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="manage_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Line Port ?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_virtualOnNet.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete this Virtual On-Net User?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_user_meet_me_conference.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete this Conference?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="confirmation_informative.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">{{message.title}}</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}<br/></div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="confirmation_for_delete.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name"> <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This {{message.title}}?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">Deletions are not reversible. {{message.text}}<br/></div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_warning.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Unable to process your request!</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">Unable to process your request. <br/>{{message.text}}<br/>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
- <script type="text/ng-template" id="modal_warning_message.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Warning</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content" style="white-space: pre-wrap;">{{message.text}}<br/>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Dismiss</button>
- </div>
- </div>
- </script>
-
-
-
- <script type="text/ng-template" id="modal_prompt.html">
- <div class="modal__warning font-showcase">
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Unable to process your request. </h2>
- <i class="icon-circle-action-close close-modal modal__header--close" ng-click="$dismiss()"></i>
-
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Unable to process your request. <br/> {{message.text}}
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete This Device?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script>
- <script type="text/ng-template" id="delete_multiple_device.html">
- <div class="modal__warning font-showcase" >
- <div class="modal__header">
- <h2 class="font-showcase-font-name">Are You Sure You Want to Delete The Device(s)?</h2>
-
- <div class="modal__header--icon"></div>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- Deletions are not reversible.<br/> {{message.text}}
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$close()">Yes</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="$dismiss()">Cancel</button>
- </div>
- </div>
- </script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html
deleted file mode 100644
index b1c9135a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_add.html
+++ /dev/null
@@ -1,136 +0,0 @@
-<script type="text/ng-template" id="fn_menu_add_popup.html">
- <div class="modal__informative font-showcase" style="width:1100px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">{{label}}</h2>
- </div>
- <div class="divider-container"><hr> </div>
-
- <div class="modal__content" >
- <table>
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Label:</label><br>
- <input id="popupAddMenuItemLabel" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.label" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" style = "display:none" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Parent:</label><br>
- <input id="popupAddMenuItemParentId" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.parentId" ng-disabled="disableParentId" maxlength="30" />
- </div>
- <div class="fn-ebz-container" ng-init="getParentData();">
- <form name="parentListForm">
- <label class="fn-ebz-text-label" for="parentSelect"><sup><b>*</b></sup>Parent:</label><br>
- <select name="select_projects" id="select_projects" ng-model="addFnMenuItem.parentId">
- <optgroup label="" ng-repeat="header in childListSelectData">
- <option label="{{header.label}}" value="{{header.menuId}}" style="color:black;font-weight:bold;">{{header.label}}</option>
- <option ng-repeat="child in header.children" value="{{child.menuId}}" "{{(addFnMenuItem.parentId===child.menuId) ? 'selected' : '' }}">{{child.label}}</option>
- </optgroup>
- </select>
- <!--
- <select class="form-field" name="parentSelect" id="parentSelect" ng-model="addFnMenuItem.parentId">
- <option>{{getParentLabel(addFnMenuItem.parentId, parentListSelectData)}}</option>
- <option ng-repeat="option in parentListSelectData" value="{{option[0]}}" "{{(addFnMenuItem.parentId===option[0]) ? 'selected' : '' }}">{{option[1]}}</option>
- </select>
- -->
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Sort Order:</label><br>
- <input id="popupAddMenuItemSortOrder" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.sortOrder" ng-disabled="disableSortOrder" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Action:</label><br>
- <input id="popupAddMenuItemAction" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.action" ng-disabled="disableAction" maxlength="200" />
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" ng-init="getFunctionCDselectData();">
- <form name="functionCDform">
- <label class="fn-ebz-text-label" for="repeatSelect"><sup><b>*</b></sup>Function:</label><br>
- <select class="form-field" name="repeatSelect" id="repeatSelect" ng-model="addFnMenuItem.functionCd">
- <option>{{addFnMenuItem.functionCd}}</option>
- <option ng-repeat="option in functionCDselectData" value="{{option}}" >{{option}}</option>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Active:</label><br>
- <select class="form-field" name="selectActive" ng-model="addFnMenuItem.active">
- <option ng-repeat="active in activeStatusOptions" value="{{active.value}}" ng-selected="{{active.value}}=={{addFnMenuItem.active}}" >{{active.title}}</option>
- </select>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Servlet:</label><br>
- <input id="popupAddMenuItemServlet" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.servlet" ng-disabled="disableServlet" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Query String:</label><br>
- <input id="popupAddMenuItemQueryString" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.queryString" ng-disabled="disableQueryString" maxlength="30" />
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>External URL:</label><br>
- <input id="popupAddMenuItemExternalUrl" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.externalUrl" ng-disabled="disableExternalUrl" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Target:</label><br>
- <input id="popupAddMenuItemTarget" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.target" ng-disabled="disableTarget" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Menu Set Code:</label><br>
- <input id="popupAddMenuItemMenuSetCode" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.menuSetCode" ng-disabled="disableMenuSetCode" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Separator:</label><br>
- <select class="form-field" name="select" ng-model="addFnMenuItem.separator">
- <option ng-repeat="separator in separatorStatusOptions" value="{{separator.value}}" ng-selected="{{separator.value}}=={{addFnMenuItem.separator}}" >{{separator.title}}</option>
- </select>
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Image Source:</label><br>
- <input id="popupAddMenuItemImageSrc" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.imageSrc" ng-disabled="disableImageSrc" maxlength="30" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="updateFnMenu(addFnMenuItem);">Save</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <!--
- <div class="modal__footer">
- </div>
- -->
- </div>
-</script>
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html
deleted file mode 100644
index 2ccdf2af..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_fn_menu_edit.html
+++ /dev/null
@@ -1,129 +0,0 @@
-<script type="text/ng-template" id="edit_menu_item_popup.html">
-
- <div class="modal__informative font-showcase" style="width:1100px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">{{label}}</h2>
- </div>
- <div class="divider-container"><hr> </div>
-
- <div class="modal__content" >
- <table>
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Label:</label><br>
- <input id="popupAddMenuItemLabel" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.label" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" style = "display:none" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Parent:</label><br>
- <input id="popupAddMenuItemParentId" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.parentId" ng-disabled="disableParentId" maxlength="30" />
- </div>
- <div class="fn-ebz-container" ng-init="getParentData();">
- <form name="parentListForm">
- <label class="fn-ebz-text-label" for="parentSelect"><sup><b>*</b></sup>Parent:</label><br>
- <select class="form-field" name="parentSelect" id="parentSelect" ng-model="addFnMenuItem.parentId">
- <option>{{getParentLabel(addFnMenuItem.parentId, parentListSelectData)}}</option>
- <option ng-repeat="option in parentListSelectData" value="{{option[0]}}" "{{(addFnMenuItem.parentId===option[0]) ? 'selected' : '' }}">{{option[1]}}</option>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Sort Order:</label><br>
- <input id="popupAddMenuItemSortOrder" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.sortOrder" ng-disabled="disableSortOrder" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Action:</label><br>
- <input id="popupAddMenuItemAction" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.action" ng-disabled="disableAction" maxlength="30" />
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" ng-init="getFunctionCDselectData();">
- <form name="functionCDform">
- <label class="fn-ebz-text-label" for="repeatSelect"><sup><b>*</b></sup>Function:</label><br>
- <select class="form-field" name="repeatSelect" id="repeatSelect" ng-model="addFnMenuItem.functionCd">
- <option>{{addFnMenuItem.functionCd}}</option>
- <option ng-repeat="option in functionCDselectData" value="{{option}}" >{{option}}</option>
- </select>
- </form>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Active:</label><br>
- <select class="form-field" name="selectActive" ng-model="addFnMenuItem.active">
- <option ng-repeat="active in activeStatusOptions" value="{{active.value}}" ng-selected="{{active.value}}=={{addFnMenuItem.active}}" >{{active.title}}</option>
- </select>
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Servlet:</label><br>
- <input id="popupAddMenuItemServlet" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.servlet" ng-disabled="disableServlet" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Query String:</label><br>
- <input id="popupAddMenuItemQueryString" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.queryString" ng-disabled="disableQueryString" maxlength="30" />
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>External URL:</label><br>
- <input id="popupAddMenuItemExternalUrl" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.externalUrl" ng-disabled="disableExternalUrl" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Target:</label><br>
- <input id="popupAddMenuItemTarget" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.target" ng-disabled="disableTarget" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Menu Set Code:</label><br>
- <input id="popupAddMenuItemMenuSetCode" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.menuSetCode" ng-disabled="disableMenuSetCode" maxlength="30" />
- </div>
- </td>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Separator:</label><br>
- <select class="form-field" name="select" ng-model="addFnMenuItem.separator">
- <option ng-repeat="separator in separatorStatusOptions" value="{{separator.value}}" ng-selected="{{separator.value}}=={{addFnMenuItem.separator}}" >{{separator.title}}</option>
- </select>
- </div>
- </td>
- </tr>
-
- <tr>
- <td>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b></b></sup>Image Source:</label><br>
- <input id="popupAddMenuItemImageSrc" type="text" class="fn-ebz-text" ng-model="addFnMenuItem.imageSrc" ng-disabled="disableImageSrc" maxlength="30" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="updateFnMenu(addFnMenuItem);">Save</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <!--
- <div class="modal__footer">
- </div>
- -->
- </div>
-</script>
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html
deleted file mode 100644
index cbfd6133..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_role.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-<script type="text/ng-template" id="role_functions_popup.html">
- <div class="modal__informative font-showcase" style="width:700px;height:500px;overflow:scroll">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">Select Role Functions</h2>
- </div>
- <button align="right" class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <table att-table
- table-data="availableRoleFunctions"
- view-per-page="viewPerPageIgnore"
- current-page="currentPageIgnore"
- search-category="searchCategoryIgnore"
- search-string="searchStringIgnore"
- total-page="totalPageIgnore">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role Function</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRoleFunction in availableRoleFunctions" style="max-height: 980px;" >
- <tr>
-
- <td width="10%">
- <div ng-click="toggleRoleFunction(availableRoleFunction.selected,availableRoleFunction);">
- <input type="checkbox" ng-model="availableRoleFunction.selected" att-toggle-main>
- </div>
- </td>
- <td width="90%">{{ availableRoleFunction.name }}</td>
-
- </tr>
- </tbody>
- </table>
- </div>
- </div>
-</script>
-
-
-<script type="text/ng-template" id="child_roles_popup.html">
- <div class="modal__informative font-showcase" style="width:700px;height:500px;overflow:scroll">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">Select Child Roles</h2>
- </div>
- <button align="right" class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <table att-table
- table-data="availableRoles"
- view-per-page="viewPerPageIgnore"
- current-page="currentPageIgnore"
- search-category="searchCategoryIgnore"
- search-string="searchStringIgnore"
- total-page="totalPageIgnore">
- <thead att-table-row type="header">
- <tr>
- <th att-table-header sortable="false" width="10%"> </th>
- <th att-table-header sortable="false" width="90%">Role</th>
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="availableRole in availableRoles" style="max-height: 980px;" >
- <tr>
- <td att-table-body width="10%">
- <div ng-click="toggleChildRole(availableRole.selected,availableRole);">
- <input type="checkbox" ng-model="availableRole.selected" att-toggle-main>
- </div>
- </td>
- <td att-table-body width="90%">{{ availableRole.name }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
-</script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html
deleted file mode 100644
index b5fd76ad..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<script type="text/ng-template" id="edit_role_function_popup.html">
- <div class="modal__informative font-showcase" style="width:400px;">
- <div class="modal__header">
- <h2 class="font-showcase-font-name" style="width: 500px;">{{label}}</h2>
- </div>
- <div class="divider-container"><hr> </div>
- <div class="modal__content">
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Name:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.name"
- maxlength="30" />
- </div>
- <br/>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label"><sup><b>*</b></sup>Code:</label><br>
- <input type="text" class="fn-ebz-text" ng-model="editRoleFunction.code" ng-disabled="disableCd"
- maxlength="30" />
- </div>
- </div>
- <div class="modal__footer">
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="saveRoleFunction(editRoleFunction);">Save</button>
- <button class="button button--primary button--small" herf="javascript:void(0)" ng-click="close()">Close</button>
- </div>
- </div>
-</script>
-
-
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/customWidgetSettings.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/customWidgetSettings.js
deleted file mode 100644
index 6cabe9f2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/customWidgetSettings.js
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
- .controller('CustomSettingsDemoCtrl', function($scope, $interval, $window, widgetDefinitions, defaultWidgets, RandomDataModel) {
-
-
- // Add an additional widget with setting overrides
- var definitions = [{
- name: 'congfigurable widget',
- directive: 'wt-scope-watch',
- dataAttrName: 'value',
- dataModelType: RandomDataModel,
- dataModelOptions: {
- limit: 10
- },
- settingsModalOptions: {
- partialTemplateUrl: 'template/configurableWidgetModalOptions.html'
- },
- onSettingsClose: function (result, widget) {
- if (widget.dataModel && widget.dataModel.updateLimit) {
- widget.dataModel.updateLimit(result.dataModelOptions.limit);
- }
- }
- }, {
- name: 'override modal widget',
- directive: 'wt-scope-watch',
- dataAttrName: 'value',
- dataModelType: RandomDataModel,
- settingsModalOptions: {
- templateUrl: 'template/WidgetSpecificSettings.html',
- controller: 'WidgetSpecificSettingsCtrl',
- backdrop: false
- },
- onSettingsClose: function(result, widget) {
- console.log('Widget-specific settings resolved!');
- jQuery.extend(true, widget, result);
- },
- onSettingsDismiss: function(reason, scope) {
- console.log('Settings have been dismissed: ', reason);
- console.log('Dashboard scope: ', scope);
- }
- }];
-
- var defaultWidgets = [
- { name: 'congfigurable widget' },
- { name: 'override modal widget' }
- ];
-
- $scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: definitions,
- defaultWidgets: defaultWidgets,
- storage: $window.localStorage,
- storageId: 'custom-settings',
-
- /*
- // Overrides default $uibModal options.
- // This can also be set on individual
- // widget definition objects (see above).
- settingsModalOptions: {
- // This will completely override the modal template for all widgets.
- // You also have the option to add to the default modal template with settingsModalOptions.partialTemplateUrl (see "configurable widget" above)
- templateUrl: 'template/customSettingsTemplate.html'
- // We could pass a custom controller name here to be used
- // with the widget settings dialog, but for this demo we
- // will just keep the default.
- //
- // controller: 'CustomSettingsModalCtrl'
- //
- // Other options passed to $uibModal.open can be put here,
- // eg:
- //
- // backdrop: false,
- // keyboard: false
- //
- // @see http://angular-ui.github.io/bootstrap/#/modal <-- heads up: routing on their site was broken as of this writing
- },
- */
-
- // Called when a widget settings dialog is closed
- // by the "ok" method (i.e., the promise is resolved
- // and not rejected). This can also be set on individual
- // widgets (see above).
- onSettingsClose: function(result, widget, scope) {
- console.log('Settings result: ', result);
- console.log('Widget: ', widget);
- console.log('Dashboard scope: ', scope);
- jQuery.extend(true, widget, result);
- },
-
- // Called when a widget settings dialog is closed
- // by the "cancel" method (i.e., the promise is rejected
- // and not resolved). This can also be set on individual
- // widgets (see above).
- onSettingsDismiss: function(reason, scope) {
- console.log('Settings have been dismissed: ', reason);
- console.log('Dashboard scope: ', scope);
- }
- };
- })
- .controller('WidgetSpecificSettingsCtrl', function ($scope, $uibModalInstance, widget) {
- // add widget to scope
- $scope.widget = widget;
-
- // set up result object
- $scope.result = jQuery.extend(true, {}, widget);
-
- $scope.ok = function () {
- console.log('calling ok from widget-specific settings controller!');
- $uibModalInstance.close($scope.result);
- };
-
- $scope.cancel = function () {
- console.log('calling cancel from widget-specific settings controller!');
- $uibModalInstance.dismiss('cancel');
- };
- })
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/dataModel.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/dataModel.js
deleted file mode 100644
index d9be52ea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/dataModel.js
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
- .factory('RandomDataModel', function ($interval, WidgetDataModel) {
- function RandomDataModel() {
- }
-
- RandomDataModel.prototype = Object.create(WidgetDataModel.prototype);
- RandomDataModel.prototype.constructor = WidgetDataModel;
-
- angular.extend(RandomDataModel.prototype, {
- init: function () {
- var dataModelOptions = this.dataModelOptions;
- this.limit = (dataModelOptions && dataModelOptions.limit) ? dataModelOptions.limit : 100;
-
- this.updateScope('-');
- this.startInterval();
- },
-
- startInterval: function () {
- $interval.cancel(this.intervalPromise);
-
- this.intervalPromise = $interval(function () {
- var value = Math.floor(Math.random() * this.limit);
- this.updateScope(value);
- }.bind(this), 500);
- },
-
- updateLimit: function (limit) {
- this.dataModelOptions = this.dataModelOptions ? this.dataModelOptions : {};
- this.dataModelOptions.limit = limit;
- this.limit = limit;
- },
-
- destroy: function () {
- WidgetDataModel.prototype.destroy.call(this);
- $interval.cancel(this.intervalPromise);
- }
- });
-
- return RandomDataModel;
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.js
deleted file mode 100644
index d598f0d0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.js
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
-.config(function ($routeProvider) {
- $routeProvider
- .when('/view', {
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html',
- controller: 'DemoCtrl',
- title: 'simple',
- description: 'This is the simplest demo.'
- })
- .when('/resize', {
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html',
- controller: 'ResizeDemoCtrl',
- title: 'resize',
- description: 'This demo showcases widget resizing.'
- })
- .when('/custom-settings', {
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html',
- controller: 'CustomSettingsDemoCtrl',
- title: 'custom widget settings',
- description: 'This demo showcases overriding the widget settings dialog/modal ' +
- 'for the entire dashboard and for a specific widget. Click on the cog of each ' +
- 'widget to see the custom modal. \n"configurable widget" has "limit" option in the modal ' +
- 'that controls RandomDataModel.'
- })
- .when('/explicit-saving', {
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html',
- controller: 'ExplicitSaveDemoCtrl',
- title: 'explicit saving',
- description: 'This demo showcases an option to only save the dashboard state '+
- 'explicitly, e.g. by user input. Notice the "all saved" button in the controls ' +
- 'updates as you make saveable changes.'
- })
- .when('/layouts', {
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/layouts.html',
- controller: 'LayoutsDemoCtrl',
- title: 'dashboard layouts',
- description: 'This demo showcases the ability to have "dashboard layouts", ' +
- 'meaning the ability to have multiple arbitrary configurations of widgets. For more ' +
- 'information, take a look at [issue #31](https://github.com/DataTorrent/malhar-angular-dashboard/issues/31)'
- })
- .when('/', {
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/layouts.html',
- controller: 'LayoutsDemoExplicitSaveCtrl',
- title: 'layouts explicit saving',
- description: 'This demo showcases dashboard layouts with explicit saving enabled.'
- })
- .otherwise({
- redirectTo: '/'
- });
- })
- .controller('NavBarCtrl', function($scope, $route) {
- $scope.$route = $route;
- })
- .factory('widgetDefinitions', function(RandomDataModel) {
- return [
- {
- name: 'random',
- directive: 'wt-scope-watch',
- attrs: {
- value: 'randomValue'
- }
- },
- {
- name: 'time',
- directive: 'wt-time'
- },
- {
- name: 'datamodel',
- directive: 'wt-scope-watch',
- dataAttrName: 'value',
- dataModelType: RandomDataModel
- },
- {
- name: 'resizable',
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/resizable.html',
- attrs: {
- class: 'demo-widget-resizable'
- }
- },
- {
- name: 'fluid',
- directive: 'wt-fluid',
- size: {
- width: '50%',
- height: '250px'
- }
- },
- {
- name: 'raptor-report-data',
- directive: 'raptor-report-data',
- size: {
- width: '50%',
- height: '300px'
- }
- },
- {
- name: 'raptor-report-chart',
- directive: 'raptor-report-chart',
- size: {
- width: '50%',
- height: '300px'
- }
- },
- {
- name: 'r-cloud',
- directive: 'r-cloud',
- size: {
- width: '50%',
- height: '300px'
- }
- }
- ];
-
- })
- .value('defaultWidgets', [
-// { name: 'random' },
-// { name: 'time' },
-// { name: 'datamodel' },
-// {
-// name: 'random',
-// style: {
-// width: '50%',
-// minWidth: '39%'
-// }
-// },
-// {
-// name: 'time',
-// style: {
-// width: '50%'
-// }
-// }
-// {"name":"raptor-report","title":"Spam Source Line Chart","style":{},"size":{"height":"450px","width":"40%"},"attrs":{"value":"randomValue"},"report_id":"3360"}
-
- ])
- .controller('DemoCtrl', function ($scope, $interval, $window, widgetDefinitions, defaultWidgets) {
-
- $scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- storage: $window.localStorage,
- storageId: 'demo_simple'
- };
- $scope.randomValue = Math.random();
- $interval(function () {
- $scope.randomValue = Math.random();
- }, 500);
-
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.less b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.less
deleted file mode 100644
index 91f4cee9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.less
+++ /dev/null
@@ -1,24 +0,0 @@
-body {
- margin: 15px;
- padding-top: 50px;
-}
-a {
- cursor: pointer;
-}
-.layout-tabs {
- margin-bottom: 10px;
-}
-
-.demo-widget-fluid {
- border: 1px solid blue;
- height: 100%;
-}
-
-.demo-widget-fluid > div {
- border: 1px solid red;
- position: relative;
- top: 50%;
- -webkit-transform: translateY(-50%);
- -ms-transform: translateY(-50%);
- transform: translateY(-50%);
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/directives.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/directives.js
deleted file mode 100644
index fe3ee7f7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/directives.js
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
- .directive('wtTime', function ($interval) {
- return {
- restrict: 'A',
- scope: true,
- replace: true,
- template: '<div>Time<div class="alert alert-success">{{time}}</div></div>',
- link: function (scope) {
- function update() {
- scope.time = new Date().toLocaleTimeString();
- }
-
- update();
-
- var promise = $interval(update, 500);
-
- scope.$on('$destroy', function () {
- $interval.cancel(promise);
- });
- }
- };
- })
- .directive('wtScopeWatch', function () {
- return {
- restrict: 'A',
- replace: true,
- template: '<div>Value<div class="alert alert-info">{{value}}</div></div>',
- scope: {
- value: '=value'
- }
- };
- })
- .directive('wtFluid', function () {
- return {
- restrict: 'A',
- replace: true,
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/fluid.html',
- scope: true,
- controller: function ($scope) {
- $scope.$on('widgetResized', function (event, size) {
- $scope.width = size.width || $scope.width;
- $scope.height = size.height || $scope.height;
- });
- }
- };
- })
- .directive('raptorReportChart', ['widgetDefinitions','defaultWidgets',function (widgetDefinitions, defaultWidgets) {
- return {
- restrict: 'A',
- replace: true,
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/raptor-report.html',
- scope: true,
- controller: function ($scope,$http, $rootScope) {
-// console.log('================= Raptor Report scope =================');
-// console.log($scope);
- $scope.showChart = false;
- $scope.url = "report_embedded#/report_run/c_master="+$scope.widget.report_id+ "&refresh=Y&hideGrid=Y&width="+Math.floor($scope.width*13)+"&height=300";
-// $scope.url = "report_embedded#/report_run/c_master="+$scope.widget.report_id+ "&refresh=Y&hideGrid="+$scope.hideGrid+"&width=550&height=300";
- $rootScope.showdataContainer = false;
- $rootScope.$watch('showdataContainer', function () {
- console.log('change showdataContainer');
- console.log($rootScope.showdataContainer);
- $scope.gridOptions = $rootScope.gridOptions;
- $scope.gridOptions = $rootScope.gridOptions;
- $scope.uiGridRefresh = function(){
- var columnDefsArray = [];
- var columnFreezeEndColumn = $scope.widget.reportData.colIdxTobeFreezed;
- var doColumnNeedToFreeze = false;
- if(columnFreezeEndColumn && columnFreezeEndColumn.length>0) {
- doColumnNeedToFreeze = true;
- }
- $scope.widget.reportData.reportDataColumns.forEach(function(entry) {
- var tempColumnDef = { displayName: entry.columnTitle, field: entry.colId, enableSorting: entry.sortable,
- sortingAlgorithm: function(a, b) {
- return rowSorter.sortAlpha(a.displayValue, b.displayValue);
- },
- cellTemplate: '<div class="ui-grid-cell-contents" style="text-align:{{COL_FIELD.alignment}};" title="TOOLTIP"> '+
- ' <div ng-if="!COL_FIELD.drillDownURL || COL_FIELD.drillDownURL==\'\'">{{COL_FIELD.displayValue}}</div>' +
- ' <a ng-if="COL_FIELD.drillDownURL && COL_FIELD.drillDownURL!=\'\'" ng-href="{{COL_FIELD.drillDownURL}}&parent___params==={{grid.appScope.currentReportUrlParams}}" >{{COL_FIELD.displayValue}}</a>' +
- '</div>'};
- if(entry.columnWidth && entry.columnWidth!='null' && entry.columnWidth!='pxpx' && entry.columnWidth!='nullpx' && entry.columnWidth!='nullpxpx'){
- tempColumnDef['minWidth'] = entry.columnWidth.substring(0, entry.columnWidth.length - 2);
- } else {
- tempColumnDef['minWidth'] = '100';
- }
- if(doColumnNeedToFreeze) {
- tempColumnDef['pinnedLeft']= true;
- if(columnFreezeEndColumn === entry.colId){
- doColumnNeedToFreeze = false;
- }
- }
- columnDefsArray.push(tempColumnDef);
- });
-
- $scope.gridOptions.paginationPageSizes= [$scope.widget.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.widget.reportData.pageSize;
- if($scope.widget.reportData.totalRows<14){
- $scope.widget.gridHeight = (widget.reportData.totalRows+5)*30+'px';
- }else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = $scope.widget.reportData.totalRows;
- $scope.gridOptions.columnDefs= columnDefsArray;
- $scope.gridOptions.data= $scope.widget.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= $scope.widget.reportData.reportName;
- };
- $scope.uiGridRefresh();
-
-
- /*presence.setGlobal({
- u: $rootScope.currentUser,
- s: 'on'
- })*/
- })
- $scope.$on('widgetResized', function (event, size) {
- console.log("===$scope===");
- console.log($scope);
- $scope.width = size.width || $scope.width;
- $scope.height = size.height || $scope.height;
- $scope.url = "report_embedded#/report_run/c_master="+$scope.widget.report_id+ "&refresh=Y&hideGrid=Y&width="+Math.floor($scope.width*13)+"&height=300";
- });
- }
- };
- }])
- .directive('raptorReportData', ['widgetDefinitions','defaultWidgets',function (widgetDefinitions, defaultWidgets) {
- return {
- restrict: 'A',
- replace: true,
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/raptor-report.html',
- scope: true,
- controller: function ($scope,$http, $rootScope) {
-// console.log('================= Raptor Report scope =================');
-// console.log($scope);
- $scope.showChart = false;
- $scope.url = "report_embedded#/report_run/c_master="+$scope.widget.report_id+ "&refresh=Y&hideChart=Y&width="+Math.floor($scope.width*13)+"&height=300";
-// $scope.url = "report_embedded#/report_run/c_master="+$scope.widget.report_id+ "&refresh=Y&hideGrid="+$scope.hideGrid+"&width=550&height=300";
- $rootScope.showdataContainer = false;
- $rootScope.$watch('showdataContainer', function () {
- console.log('change showdataContainer');
- console.log($rootScope.showdataContainer);
- $scope.gridOptions = $rootScope.gridOptions;
- $scope.gridOptions = $rootScope.gridOptions;
- $scope.uiGridRefresh = function(){
- var columnDefsArray = [];
- var columnFreezeEndColumn = $scope.widget.reportData.colIdxTobeFreezed;
- var doColumnNeedToFreeze = false;
- if(columnFreezeEndColumn && columnFreezeEndColumn.length>0) {
- doColumnNeedToFreeze = true;
- }
- $scope.widget.reportData.reportDataColumns.forEach(function(entry) {
- var tempColumnDef = { displayName: entry.columnTitle, field: entry.colId, enableSorting: entry.sortable,
- sortingAlgorithm: function(a, b) {
- return rowSorter.sortAlpha(a.displayValue, b.displayValue);
- },
- cellTemplate: '<div class="ui-grid-cell-contents" style="text-align:{{COL_FIELD.alignment}};" title="TOOLTIP"> '+
- ' <div ng-if="!COL_FIELD.drillDownURL || COL_FIELD.drillDownURL==\'\'">{{COL_FIELD.displayValue}}</div>' +
- ' <a ng-if="COL_FIELD.drillDownURL && COL_FIELD.drillDownURL!=\'\'" ng-href="{{COL_FIELD.drillDownURL}}&parent___params==={{grid.appScope.currentReportUrlParams}}" >{{COL_FIELD.displayValue}}</a>' +
- '</div>'};
- if(entry.columnWidth && entry.columnWidth!='null' && entry.columnWidth!='pxpx' && entry.columnWidth!='nullpx' && entry.columnWidth!='nullpxpx'){
- tempColumnDef['minWidth'] = entry.columnWidth.substring(0, entry.columnWidth.length - 2);
- } else {
- tempColumnDef['minWidth'] = '100';
- }
- if(doColumnNeedToFreeze) {
- tempColumnDef['pinnedLeft']= true;
- if(columnFreezeEndColumn === entry.colId){
- doColumnNeedToFreeze = false;
- }
- }
- columnDefsArray.push(tempColumnDef);
- });
-
- $scope.gridOptions.paginationPageSizes= [$scope.widget.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.widget.reportData.pageSize;
- if($scope.widget.reportData.totalRows<14){
- $scope.widget.gridHeight = (widget.reportData.totalRows+5)*30+'px';
- }else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = $scope.widget.reportData.totalRows;
- $scope.gridOptions.columnDefs= columnDefsArray;
- $scope.gridOptions.data= $scope.widget.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= $scope.widget.reportData.reportName;
- };
- $scope.uiGridRefresh();
-
-
- /*presence.setGlobal({
- u: $rootScope.currentUser,
- s: 'on'
- })*/
- })
- }
- };
- }])
- .directive('rCloud', function () {
- return {
- restrict: 'A',
- replace: true,
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/app/template/r-cloud.html',
- scope: true,
- controller: function ($scope,$http) {
- $scope.showChart = false;
- $scope.hideGrid = 'true';
- $scope.url = $scope.widget.rcloud_url;
- $scope.$on('widgetResized', function (event, size) {
- $scope.width = size.width || $scope.width;
- $scope.height = size.height || $scope.height;
- });
- }
- };
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/explicitSave.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/explicitSave.js
deleted file mode 100644
index ad959b21..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/explicitSave.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
- .controller('ExplicitSaveDemoCtrl', function ($scope, $interval, $window, widgetDefinitions, defaultWidgets) {
- $scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- storage: $window.localStorage,
- storageId: 'explicitSave',
- explicitSave: true
- };
- $scope.randomValue = Math.random();
- $interval(function () {
- $scope.randomValue = Math.random();
- }, 500);
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.css b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.css
deleted file mode 100644
index c05f70c1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.css
+++ /dev/null
@@ -1,146 +0,0 @@
-/* #rightContentUiDashboard {
- display:inline-block;
-} */
-
-#rightContentUiDashboard .browsehappy {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
-}
-#rightContentUiDashboard .thumbnail {
- height: 200px;
-}
-#rightContentUiDashboard .thumbnail img.pull-right {
- width: 50px;
-}
-#rightContentUiDashboard body {
- margin: 15px;
- padding-top: 50px;
-}
-#rightContentUiDashboard a {
- cursor: pointer;
-}
-#rightContentUiDashboard .layout-tabs {
- margin-bottom: 10px;
-}
-#rightContentUiDashboard .demo-widget-fluid {
- border: 1px solid blue;
- height: 100%;
-}
-#rightContentUiDashboard .demo-widget-fluid > div {
- border: 1px solid red;
- position: relative;
- top: 50%;
- -webkit-transform: translateY(-50%);
- transform: translateY(-50%);
-}
-#rightContentUiDashboard .dashboard-widget-area {
- margin: 10px 0 30px;
- min-height: 200px;
-}
-#rightContentUiDashboard .widget-container {
- float: left;
- display: inline-block;
- width: 33%;
- padding-bottom: 0em;
-}
-#rightContentUiDashboard .widget {
- margin: 0 1em 0 0;
- background-color: white;
- border-radius: 5px;
- position: relative;
- height: 100%;
-}
-#rightContentUiDashboard .widget-header {
- overflow: hidden;
- width:100%; /* for overlaying effect start*/
- position: absolute;
- z-index: 10;
- opacity: 0.8;
- top: 1px;
- filter: alpha(opacity=80); /* For IE8 and earlier */
- -webkit-transition: width 2s, height 4s; /* Safari */
- transition: width 2s, height 4s;
-}
-#rightContentUiDashboard .widget-header .label {
- display: inline-block;
- vertical-align: middle;
-}
-#rightContentUiDashboard .widget-header .glyphicon {
- cursor: pointer;
- float: right;
- opacity: 0.5;
- margin-left: 5px;
-}
-#rightContentUiDashboard .widget-header .glyphicon:hover {
- opacity: 1;
-}
-#rightContentUiDashboard .widget-header .widget-title {
- vertical-align: middle;
-}
-#rightContentUiDashboard .widget-header form.widget-title {
- display: inline;
-}
-#rightContentUiDashboard .widget-header form.widget-title input.form-control {
- width: auto;
- display: inline-block;
-}
-#rightContentUiDashboard .widget-content {
- padding:0px;
- overflow: hidden;
- position: relative; /* for overlaying effect */
-}
-#rightContentUiDashboard .widget .widget-ew-resizer {
- position: absolute;
- width: 5px;
- right: -2px;
- height: 100%;
- top: 0;
- cursor: ew-resize;
-}
-#rightContentUiDashboard .widget .widget-s-resizer {
- cursor: ns-resize;
- height: 5px;
- width: 100%;
- bottom: -7px;
- left: 0;
-}
-#rightContentUiDashboard .widget .widget-resizer-marquee {
- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
- position: absolute;
- top: 0;
- left: 0;
- z-index: 2;
-}
-#rightContentUiDashboard .remove-layout-icon {
- vertical-align: text-top;
- cursor: pointer;
- opacity: 0.3;
-}
-#rightContentUiDashboard .remove-layout-icon:hover {
- opacity: 1;
-}
-#rightContentUiDashboard .layout-title {
- display: inline-block;
-}
-
-/*
-#container {
- width: 100px;
- height: 100px;
- position: relative;
-}
-#navi,
-#infoi {
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
-}
-#infoi {
- z-index: 10;
-}
-
- */ \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.js
deleted file mode 100644
index b4cfb97d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-angular.module('dashboard', ['ui.bootstrap']);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.less b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.less
deleted file mode 100644
index 87955cbe..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index.less
+++ /dev/null
@@ -1,16 +0,0 @@
-.browsehappy {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
-}
-
-.thumbnail {
- height: 200px;
-
- img.pull-right {
- width: 50px;
- }
-}
-// injector
-// endinjector
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index_original.css b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index_original.css
deleted file mode 100644
index d5cebfb0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/index_original.css
+++ /dev/null
@@ -1,113 +0,0 @@
-.browsehappy {
- margin: 0.2em 0;
- background: #ccc;
- color: #000;
- padding: 0.2em 0;
-}
-.thumbnail {
- height: 200px;
-}
-.thumbnail img.pull-right {
- width: 50px;
-}
-body {
- margin: 15px;
- padding-top: 50px;
-}
-a {
- cursor: pointer;
-}
-.layout-tabs {
- margin-bottom: 10px;
-}
-.demo-widget-fluid {
- border: 1px solid blue;
- height: 100%;
-}
-.demo-widget-fluid > div {
- border: 1px solid red;
- position: relative;
- top: 50%;
- -webkit-transform: translateY(-50%);
- transform: translateY(-50%);
-}
-.dashboard-widget-area {
- margin: 10px 0 30px;
- min-height: 200px;
-}
-.widget-container {
- float: left;
- display: inline-block;
- width: 33%;
- padding-bottom: 1em;
-}
-.widget {
- margin: 0 1em 0 0;
- background-color: white;
- border: 2px solid #444;
- border-radius: 5px;
- position: relative;
- height: 100%;
-}
-.widget-header {
- overflow: hidden;
-}
-.widget-header .label {
- display: inline-block;
- vertical-align: middle;
-}
-.widget-header .glyphicon {
- cursor: pointer;
- float: right;
- opacity: 0.5;
- margin-left: 5px;
-}
-.widget-header .glyphicon:hover {
- opacity: 1;
-}
-.widget-header .widget-title {
- vertical-align: middle;
-}
-.widget-header form.widget-title {
- display: inline;
-}
-.widget-header form.widget-title input.form-control {
- width: auto;
- display: inline-block;
-}
-.widget-content {
- overflow: hidden;
-}
-.widget .widget-ew-resizer {
- position: absolute;
- width: 5px;
- right: -2px;
- height: 100%;
- top: 0;
- cursor: ew-resize;
-}
-.widget .widget-s-resizer {
- cursor: ns-resize;
- height: 5px;
- width: 100%;
- bottom: -7px;
- left: 0;
-}
-.widget .widget-resizer-marquee {
- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
- position: absolute;
- top: 0;
- left: 0;
- z-index: 2;
-}
-.remove-layout-icon {
- vertical-align: text-top;
- cursor: pointer;
- opacity: 0.3;
-}
-.remove-layout-icon:hover {
- opacity: 1;
-}
-.layout-title {
- display: inline-block;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/layouts.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/layouts.js
deleted file mode 100644
index fda21ab0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/layouts.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
- .controller('LayoutsDemoCtrl', function($scope, widgetDefinitions, defaultWidgets, LayoutStorage, $interval) {
- $scope.layoutOptions = {
- storageId: 'demo-layouts',
- storage: localStorage,
- storageHash: 'fs4df4d51',
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- lockDefaultLayouts: true,
- defaultLayouts: [
- { title: 'Layout 1', active: true , defaultWidgets: defaultWidgets },
- { title: 'Layout 2', active: false, defaultWidgets: defaultWidgets },
- { title: 'Layout 3', active: false, defaultWidgets: defaultWidgets, locked: false }
- ]
- };
- $scope.randomValue = Math.random();
- $interval(function () {
- $scope.randomValue = Math.random();
- }, 500);
-
- })
- .controller('LayoutsDemoExplicitSaveCtrl', function($scope, widgetDefinitions, defaultWidgets, LayoutStorage, $interval, $http) {
- $http.get('raptor.htm?action=report.search.execute').then(
- function(result){
- var data = result.data;
- var report_id_name = [];
- for (var i in data.rows[0]) {
- report_id_name.push({index:i, value: data.rows[0][i][1].searchresultField.displayValue, title: data.rows[0][i][2].searchresultField.displayValue})
- }
- $scope.reports = report_id_name;
- console.log($scope.reports);
- $scope.report1 = $scope.reports[1];
- });
- // Can this be removed?
- $scope.rcloud_url= "https://tbd.onap.org/mini.html?notebook=c131ea997453e75303588699936d1896";
- $scope.layoutOptions = {
- storageId: 'demo-layouts-explicit-save',
- storage: localStorage,
- storageHash: 'fs4df4d51',
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- explicitSave: true,
- defaultLayouts: [
- { title: 'Layout 1', active: true , defaultWidgets: defaultWidgets },
- { title: 'Layout 2', active: false, defaultWidgets: defaultWidgets },
- { title: 'Layout 3', active: false, defaultWidgets: defaultWidgets }
- ]
- };
- $scope.randomValue = Math.random();
- $interval(function () {
- $scope.randomValue = Math.random();
- }, 500);
-
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/report_whitelist.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/report_whitelist.js
deleted file mode 100644
index f67d5e64..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/report_whitelist.js
+++ /dev/null
@@ -1,3 +0,0 @@
-app.config(function ($sceDelegateProvider) {
- $sceDelegateProvider.resourceUrlWhitelist(['self','https://tbd.onap.org/**']);
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/resize.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/resize.js
deleted file mode 100644
index db22e548..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/resize.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-app
- .controller('ResizeDemoCtrl', function ($scope, $interval, $window, widgetDefinitions, defaultWidgets) {
- defaultWidgets = [
- { name: 'fluid' },
- { name: 'resizable' },
- { name: 'random', style: { width: '50%' } },
- { name: 'time', style: { width: '50%' } }
- ];
-
- $scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- storage: $window.localStorage,
- storageId: 'demo_resize'
- };
- $scope.randomValue = Math.random();
- $interval(function () {
- $scope.randomValue = Math.random();
- }, 500);
- })
- .controller('ResizableCtrl', function ($scope) {
- $scope.$on('widgetResized', function (event, size) {
- $scope.width = size.width || $scope.width;
- $scope.height = size.height || $scope.height;
- });
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/configurableWidgetModalOptions.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/configurableWidgetModalOptions.html
deleted file mode 100644
index b12c3ade..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/configurableWidgetModalOptions.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div class="form-group">
- <label class="col-sm-2 control-label">Random Limit</label>
- <div class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="result.dataModelOptions.limit">
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/customSettingsTemplate.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/customSettingsTemplate.html
deleted file mode 100644
index be13a89b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/customSettingsTemplate.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
- <h3>Custom Settings Dialog for <small>{{widget.title}}</small></h3>
-</div>
-<div class="modal-body">
- <form name="form" novalidate class="form-horizontal">
- <div class="form-group">
- <label for="widgetTitle" class="col-sm-2 control-label">Title</label>
- <div class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="result.title">
- </div>
- </div>
- <div ng-if="widget.partialSettingTemplateUrl" ng-include="widget.partialSettingTemplateUrl"></div>
- </form>
-</div>
-<div class="modal-footer">
- <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
- <button type="button" class="btn btn-primary" ng-click="ok()">OK</button>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/fluid.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/fluid.html
deleted file mode 100644
index 4bb0c94a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/fluid.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div class="demo-widget-fluid">
- <div>
- <p>Widget takes 100% height (blue border).<p>
- <p>Resize the widget vertically to see that this text (red border) stays middle aligned.</p>
- <p>New width: {{width}}</p>
- <p>New height: {{height}}</p>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/layouts.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/layouts.html
deleted file mode 100644
index 8d6854f7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/layouts.html
+++ /dev/null
@@ -1 +0,0 @@
-<div dashboard-layouts="layoutOptions"></div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/r-cloud.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/r-cloud.html
deleted file mode 100644
index 46cf7b8b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/r-cloud.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<div class="demo-widget-rcloud">
- <div>
-<!-- <h1>R Cloud</h1> -->
-<!-- <p>{{url}}</p> -->
- <iframe src= {{url}} width="100%" height="500" style="border: none; background-color: #f2f2f2; opacity: 1;">
- </iframe>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/raptor-report.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/raptor-report.html
deleted file mode 100644
index fed32ada..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/raptor-report.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<div class="demo-widget-raptor">
- <div ng-show="true">
-<!-- <p>{{url}}</p> -->
- <div style="display:block; border: none; height:50px; background-color:#f2f2f2;"></div>
- <iframe src= {{url}}
- width="100%" height="500"
- style="border: none; background-color: #f2f2f2; opacity: 1;"></iframe>
- </div>
-
-<!-- <div ng-show="!showChart">
- <p>{{showChart}}</p>
- <iframe id="chartiframe" ng-show="showChart" width="100%" height="450px" style="border: none" scrolling="no"></iframe>
- </div> -->
-
- <div>
- <div>
- <div id="grid1" ui-grid="gridOptions" ui-grid-pagination ui-grid-pinning ui-grid-resize-columns class="grid" style="height: {{gridHeight}}">
- <div class="no-rows" ng-show="!gridOptions.data.length">
- <div class="msg">
- <span>{{reportData.message}}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
-
-
-
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/resizable.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/resizable.html
deleted file mode 100644
index 6abaad81..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/resizable.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<div ng-controller="ResizableCtrl">
- <div>
- <div>New width: {{width}}</div>
- <div>New height: {{height}}</div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html
deleted file mode 100644
index 23b72c28..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/view.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<div class="row">
- <div class="col-md-12">
- <div dashboard="dashboardOptions" class="dashboard-container"></div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/widgetSpecificSettings.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/widgetSpecificSettings.html
deleted file mode 100644
index 3b93a0a9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/template/widgetSpecificSettings.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
- <h3>Custom Settings for a special widget</h3>
-</div>
-<div class="modal-body">
- <form name="form" novalidate class="form-horizontal">
- <p>I override the entire widget settings modal template. This can be used for maximum customization!</p>
- <div class="form-group">
- <label for="widgetTitle" class="col-sm-2 control-label">Title</label>
- <div class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="result.title">
- </div>
- </div>
- </form>
-</div>
-<div class="modal-footer">
- <button type="button" class="btn btn-default" ng-click="cancel()">fuhget about it</button>
- <button type="button" class="btn btn-primary" ng-click="ok()">hell yea</button>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.css b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.css
deleted file mode 100644
index a7e815ed..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.css
+++ /dev/null
@@ -1,6658 +0,0 @@
-/*!
- * Bootstrap v3.3.6 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */
-/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
-html {
- font-family: sans-serif;
- -ms-text-size-adjust: 100%;
- -webkit-text-size-adjust: 100%;
-}
-body {
- margin: 0;
-}
-article,
-aside,
-details,
-figcaption,
-figure,
-footer,
-header,
-hgroup,
-main,
-menu,
-nav,
-section,
-summary {
- display: block;
-}
-audio,
-canvas,
-progress,
-video {
- display: inline-block;
- vertical-align: baseline;
-}
-audio:not([controls]) {
- display: none;
- height: 0;
-}
-[hidden],
-template {
- display: none;
-}
-a {
- background-color: transparent;
-}
-a:active,
-a:hover {
- outline: 0;
-}
-abbr[title] {
- border-bottom: 1px dotted;
-}
-b,
-strong {
- font-weight: bold;
-}
-dfn {
- font-style: italic;
-}
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
-mark {
- background: #ff0;
- color: #000;
-}
-small {
- font-size: 80%;
-}
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
-}
-sup {
- top: -0.5em;
-}
-sub {
- bottom: -0.25em;
-}
-img {
- border: 0;
-}
-svg:not(:root) {
- overflow: hidden;
-}
-figure {
- margin: 1em 40px;
-}
-hr {
- box-sizing: content-box;
- height: 0;
-}
-pre {
- overflow: auto;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: monospace, monospace;
- font-size: 1em;
-}
-button,
-input,
-optgroup,
-select,
-textarea {
- color: inherit;
- font: inherit;
- margin: 0;
-}
-button {
- overflow: visible;
-}
-button,
-select {
- text-transform: none;
-}
-button,
-html input[type="button"],
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button;
- cursor: pointer;
-}
-button[disabled],
-html input[disabled] {
- cursor: default;
-}
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-input {
- line-height: normal;
-}
-input[type="checkbox"],
-input[type="radio"] {
- box-sizing: border-box;
- padding: 0;
-}
-input[type="number"]::-webkit-inner-spin-button,
-input[type="number"]::-webkit-outer-spin-button {
- height: auto;
-}
-input[type="search"] {
- -webkit-appearance: textfield;
- box-sizing: content-box;
-}
-input[type="search"]::-webkit-search-cancel-button,
-input[type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
-}
-fieldset {
- border: 1px solid #c0c0c0;
- margin: 0 2px;
- padding: 0.35em 0.625em 0.75em;
-}
-legend {
- border: 0;
- padding: 0;
-}
-textarea {
- overflow: auto;
-}
-optgroup {
- font-weight: bold;
-}
-table {
- border-collapse: collapse;
- border-spacing: 0;
-}
-td,
-th {
- padding: 0;
-}
-/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
-@media print {
- *,
- *:before,
- *:after {
- background: transparent !important;
- color: #000 !important;
- box-shadow: none !important;
- text-shadow: none !important;
- }
- a,
- a:visited {
- text-decoration: underline;
- }
- a[href]:after {
- content: " (" attr(href) ")";
- }
- abbr[title]:after {
- content: " (" attr(title) ")";
- }
- a[href^="#"]:after,
- a[href^="javascript:"]:after {
- content: "";
- }
- pre,
- blockquote {
- border: 1px solid #999;
- page-break-inside: avoid;
- }
- thead {
- display: table-header-group;
- }
- tr,
- img {
- page-break-inside: avoid;
- }
- img {
- max-width: 100% !important;
- }
- p,
- h2,
- h3 {
- orphans: 3;
- widows: 3;
- }
- h2,
- h3 {
- page-break-after: avoid;
- }
- .navbar {
- display: none;
- }
- .btn > .caret,
- .dropup > .btn > .caret {
- border-top-color: #000 !important;
- }
- .label {
- border: 1px solid #000;
- }
- .table {
- border-collapse: collapse !important;
- }
- .table td,
- .table th {
- background-color: #fff !important;
- }
- .table-bordered th,
- .table-bordered td {
- border: 1px solid #ddd !important;
- }
-}
-@font-face {
- font-family: 'Glyphicons Halflings';
- src: url('../../bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot');
- src: url('../../bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../../bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../../bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../../bower_components/boostrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../../bower_components/boostrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
-}
-.glyphicon {
- position: relative;
- top: 1px;
- display: inline-block;
- font-family: 'Glyphicons Halflings';
- font-style: normal;
- font-weight: normal;
- line-height: 1;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-.glyphicon-asterisk:before {
- content: "\002a";
-}
-.glyphicon-plus:before {
- content: "\002b";
-}
-.glyphicon-euro:before,
-.glyphicon-eur:before {
- content: "\20ac";
-}
-.glyphicon-minus:before {
- content: "\2212";
-}
-.glyphicon-cloud:before {
- content: "\2601";
-}
-.glyphicon-envelope:before {
- content: "\2709";
-}
-.glyphicon-pencil:before {
- content: "\270f";
-}
-.glyphicon-glass:before {
- content: "\e001";
-}
-.glyphicon-music:before {
- content: "\e002";
-}
-.glyphicon-search:before {
- content: "\e003";
-}
-.glyphicon-heart:before {
- content: "\e005";
-}
-.glyphicon-star:before {
- content: "\e006";
-}
-.glyphicon-star-empty:before {
- content: "\e007";
-}
-.glyphicon-user:before {
- content: "\e008";
-}
-.glyphicon-film:before {
- content: "\e009";
-}
-.glyphicon-th-large:before {
- content: "\e010";
-}
-.glyphicon-th:before {
- content: "\e011";
-}
-.glyphicon-th-list:before {
- content: "\e012";
-}
-.glyphicon-ok:before {
- content: "\e013";
-}
-.glyphicon-remove:before {
- content: "\e014";
-}
-.glyphicon-zoom-in:before {
- content: "\e015";
-}
-.glyphicon-zoom-out:before {
- content: "\e016";
-}
-.glyphicon-off:before {
- content: "\e017";
-}
-.glyphicon-signal:before {
- content: "\e018";
-}
-.glyphicon-cog:before {
- content: "\e019";
-}
-.glyphicon-trash:before {
- content: "\e020";
-}
-.glyphicon-home:before {
- content: "\e021";
-}
-.glyphicon-file:before {
- content: "\e022";
-}
-.glyphicon-time:before {
- content: "\e023";
-}
-.glyphicon-road:before {
- content: "\e024";
-}
-.glyphicon-download-alt:before {
- content: "\e025";
-}
-.glyphicon-download:before {
- content: "\e026";
-}
-.glyphicon-upload:before {
- content: "\e027";
-}
-.glyphicon-inbox:before {
- content: "\e028";
-}
-.glyphicon-play-circle:before {
- content: "\e029";
-}
-.glyphicon-repeat:before {
- content: "\e030";
-}
-.glyphicon-refresh:before {
- content: "\e031";
-}
-.glyphicon-list-alt:before {
- content: "\e032";
-}
-.glyphicon-lock:before {
- content: "\e033";
-}
-.glyphicon-flag:before {
- content: "\e034";
-}
-.glyphicon-headphones:before {
- content: "\e035";
-}
-.glyphicon-volume-off:before {
- content: "\e036";
-}
-.glyphicon-volume-down:before {
- content: "\e037";
-}
-.glyphicon-volume-up:before {
- content: "\e038";
-}
-.glyphicon-qrcode:before {
- content: "\e039";
-}
-.glyphicon-barcode:before {
- content: "\e040";
-}
-.glyphicon-tag:before {
- content: "\e041";
-}
-.glyphicon-tags:before {
- content: "\e042";
-}
-.glyphicon-book:before {
- content: "\e043";
-}
-.glyphicon-bookmark:before {
- content: "\e044";
-}
-.glyphicon-print:before {
- content: "\e045";
-}
-.glyphicon-camera:before {
- content: "\e046";
-}
-.glyphicon-font:before {
- content: "\e047";
-}
-.glyphicon-bold:before {
- content: "\e048";
-}
-.glyphicon-italic:before {
- content: "\e049";
-}
-.glyphicon-text-height:before {
- content: "\e050";
-}
-.glyphicon-text-width:before {
- content: "\e051";
-}
-.glyphicon-align-left:before {
- content: "\e052";
-}
-.glyphicon-align-center:before {
- content: "\e053";
-}
-.glyphicon-align-right:before {
- content: "\e054";
-}
-.glyphicon-align-justify:before {
- content: "\e055";
-}
-.glyphicon-list:before {
- content: "\e056";
-}
-.glyphicon-indent-left:before {
- content: "\e057";
-}
-.glyphicon-indent-right:before {
- content: "\e058";
-}
-.glyphicon-facetime-video:before {
- content: "\e059";
-}
-.glyphicon-picture:before {
- content: "\e060";
-}
-.glyphicon-map-marker:before {
- content: "\e062";
-}
-.glyphicon-adjust:before {
- content: "\e063";
-}
-.glyphicon-tint:before {
- content: "\e064";
-}
-.glyphicon-edit:before {
- content: "\e065";
-}
-.glyphicon-share:before {
- content: "\e066";
-}
-.glyphicon-check:before {
- content: "\e067";
-}
-.glyphicon-move:before {
- content: "\e068";
-}
-.glyphicon-step-backward:before {
- content: "\e069";
-}
-.glyphicon-fast-backward:before {
- content: "\e070";
-}
-.glyphicon-backward:before {
- content: "\e071";
-}
-.glyphicon-play:before {
- content: "\e072";
-}
-.glyphicon-pause:before {
- content: "\e073";
-}
-.glyphicon-stop:before {
- content: "\e074";
-}
-.glyphicon-forward:before {
- content: "\e075";
-}
-.glyphicon-fast-forward:before {
- content: "\e076";
-}
-.glyphicon-step-forward:before {
- content: "\e077";
-}
-.glyphicon-eject:before {
- content: "\e078";
-}
-.glyphicon-chevron-left:before {
- content: "\e079";
-}
-.glyphicon-chevron-right:before {
- content: "\e080";
-}
-.glyphicon-plus-sign:before {
- content: "\e081";
-}
-.glyphicon-minus-sign:before {
- content: "\e082";
-}
-.glyphicon-remove-sign:before {
- content: "\e083";
-}
-.glyphicon-ok-sign:before {
- content: "\e084";
-}
-.glyphicon-question-sign:before {
- content: "\e085";
-}
-.glyphicon-info-sign:before {
- content: "\e086";
-}
-.glyphicon-screenshot:before {
- content: "\e087";
-}
-.glyphicon-remove-circle:before {
- content: "\e088";
-}
-.glyphicon-ok-circle:before {
- content: "\e089";
-}
-.glyphicon-ban-circle:before {
- content: "\e090";
-}
-.glyphicon-arrow-left:before {
- content: "\e091";
-}
-.glyphicon-arrow-right:before {
- content: "\e092";
-}
-.glyphicon-arrow-up:before {
- content: "\e093";
-}
-.glyphicon-arrow-down:before {
- content: "\e094";
-}
-.glyphicon-share-alt:before {
- content: "\e095";
-}
-.glyphicon-resize-full:before {
- content: "\e096";
-}
-.glyphicon-resize-small:before {
- content: "\e097";
-}
-.glyphicon-exclamation-sign:before {
- content: "\e101";
-}
-.glyphicon-gift:before {
- content: "\e102";
-}
-.glyphicon-leaf:before {
- content: "\e103";
-}
-.glyphicon-fire:before {
- content: "\e104";
-}
-.glyphicon-eye-open:before {
- content: "\e105";
-}
-.glyphicon-eye-close:before {
- content: "\e106";
-}
-.glyphicon-warning-sign:before {
- content: "\e107";
-}
-.glyphicon-plane:before {
- content: "\e108";
-}
-.glyphicon-calendar:before {
- content: "\e109";
-}
-.glyphicon-random:before {
- content: "\e110";
-}
-.glyphicon-comment:before {
- content: "\e111";
-}
-.glyphicon-magnet:before {
- content: "\e112";
-}
-.glyphicon-chevron-up:before {
- content: "\e113";
-}
-.glyphicon-chevron-down:before {
- content: "\e114";
-}
-.glyphicon-retweet:before {
- content: "\e115";
-}
-.glyphicon-shopping-cart:before {
- content: "\e116";
-}
-.glyphicon-folder-close:before {
- content: "\e117";
-}
-.glyphicon-folder-open:before {
- content: "\e118";
-}
-.glyphicon-resize-vertical:before {
- content: "\e119";
-}
-.glyphicon-resize-horizontal:before {
- content: "\e120";
-}
-.glyphicon-hdd:before {
- content: "\e121";
-}
-.glyphicon-bullhorn:before {
- content: "\e122";
-}
-.glyphicon-bell:before {
- content: "\e123";
-}
-.glyphicon-certificate:before {
- content: "\e124";
-}
-.glyphicon-thumbs-up:before {
- content: "\e125";
-}
-.glyphicon-thumbs-down:before {
- content: "\e126";
-}
-.glyphicon-hand-right:before {
- content: "\e127";
-}
-.glyphicon-hand-left:before {
- content: "\e128";
-}
-.glyphicon-hand-up:before {
- content: "\e129";
-}
-.glyphicon-hand-down:before {
- content: "\e130";
-}
-.glyphicon-circle-arrow-right:before {
- content: "\e131";
-}
-.glyphicon-circle-arrow-left:before {
- content: "\e132";
-}
-.glyphicon-circle-arrow-up:before {
- content: "\e133";
-}
-.glyphicon-circle-arrow-down:before {
- content: "\e134";
-}
-.glyphicon-globe:before {
- content: "\e135";
-}
-.glyphicon-wrench:before {
- content: "\e136";
-}
-.glyphicon-tasks:before {
- content: "\e137";
-}
-.glyphicon-filter:before {
- content: "\e138";
-}
-.glyphicon-briefcase:before {
- content: "\e139";
-}
-.glyphicon-fullscreen:before {
- content: "\e140";
-}
-.glyphicon-dashboard:before {
- content: "\e141";
-}
-.glyphicon-paperclip:before {
- content: "\e142";
-}
-.glyphicon-heart-empty:before {
- content: "\e143";
-}
-.glyphicon-link:before {
- content: "\e144";
-}
-.glyphicon-phone:before {
- content: "\e145";
-}
-.glyphicon-pushpin:before {
- content: "\e146";
-}
-.glyphicon-usd:before {
- content: "\e148";
-}
-.glyphicon-gbp:before {
- content: "\e149";
-}
-.glyphicon-sort:before {
- content: "\e150";
-}
-.glyphicon-sort-by-alphabet:before {
- content: "\e151";
-}
-.glyphicon-sort-by-alphabet-alt:before {
- content: "\e152";
-}
-.glyphicon-sort-by-order:before {
- content: "\e153";
-}
-.glyphicon-sort-by-order-alt:before {
- content: "\e154";
-}
-.glyphicon-sort-by-attributes:before {
- content: "\e155";
-}
-.glyphicon-sort-by-attributes-alt:before {
- content: "\e156";
-}
-.glyphicon-unchecked:before {
- content: "\e157";
-}
-.glyphicon-expand:before {
- content: "\e158";
-}
-.glyphicon-collapse-down:before {
- content: "\e159";
-}
-.glyphicon-collapse-up:before {
- content: "\e160";
-}
-.glyphicon-log-in:before {
- content: "\e161";
-}
-.glyphicon-flash:before {
- content: "\e162";
-}
-.glyphicon-log-out:before {
- content: "\e163";
-}
-.glyphicon-new-window:before {
- content: "\e164";
-}
-.glyphicon-record:before {
- content: "\e165";
-}
-.glyphicon-save:before {
- content: "\e166";
-}
-.glyphicon-open:before {
- content: "\e167";
-}
-.glyphicon-saved:before {
- content: "\e168";
-}
-.glyphicon-import:before {
- content: "\e169";
-}
-.glyphicon-export:before {
- content: "\e170";
-}
-.glyphicon-send:before {
- content: "\e171";
-}
-.glyphicon-floppy-disk:before {
- content: "\e172";
-}
-.glyphicon-floppy-saved:before {
- content: "\e173";
-}
-.glyphicon-floppy-remove:before {
- content: "\e174";
-}
-.glyphicon-floppy-save:before {
- content: "\e175";
-}
-.glyphicon-floppy-open:before {
- content: "\e176";
-}
-.glyphicon-credit-card:before {
- content: "\e177";
-}
-.glyphicon-transfer:before {
- content: "\e178";
-}
-.glyphicon-cutlery:before {
- content: "\e179";
-}
-.glyphicon-header:before {
- content: "\e180";
-}
-.glyphicon-compressed:before {
- content: "\e181";
-}
-.glyphicon-earphone:before {
- content: "\e182";
-}
-.glyphicon-phone-alt:before {
- content: "\e183";
-}
-.glyphicon-tower:before {
- content: "\e184";
-}
-.glyphicon-stats:before {
- content: "\e185";
-}
-.glyphicon-sd-video:before {
- content: "\e186";
-}
-.glyphicon-hd-video:before {
- content: "\e187";
-}
-.glyphicon-subtitles:before {
- content: "\e188";
-}
-.glyphicon-sound-stereo:before {
- content: "\e189";
-}
-.glyphicon-sound-dolby:before {
- content: "\e190";
-}
-.glyphicon-sound-5-1:before {
- content: "\e191";
-}
-.glyphicon-sound-6-1:before {
- content: "\e192";
-}
-.glyphicon-sound-7-1:before {
- content: "\e193";
-}
-.glyphicon-copyright-mark:before {
- content: "\e194";
-}
-.glyphicon-registration-mark:before {
- content: "\e195";
-}
-.glyphicon-cloud-download:before {
- content: "\e197";
-}
-.glyphicon-cloud-upload:before {
- content: "\e198";
-}
-.glyphicon-tree-conifer:before {
- content: "\e199";
-}
-.glyphicon-tree-deciduous:before {
- content: "\e200";
-}
-.glyphicon-cd:before {
- content: "\e201";
-}
-.glyphicon-save-file:before {
- content: "\e202";
-}
-.glyphicon-open-file:before {
- content: "\e203";
-}
-.glyphicon-level-up:before {
- content: "\e204";
-}
-.glyphicon-copy:before {
- content: "\e205";
-}
-.glyphicon-paste:before {
- content: "\e206";
-}
-.glyphicon-alert:before {
- content: "\e209";
-}
-.glyphicon-equalizer:before {
- content: "\e210";
-}
-.glyphicon-king:before {
- content: "\e211";
-}
-.glyphicon-queen:before {
- content: "\e212";
-}
-.glyphicon-pawn:before {
- content: "\e213";
-}
-.glyphicon-bishop:before {
- content: "\e214";
-}
-.glyphicon-knight:before {
- content: "\e215";
-}
-.glyphicon-baby-formula:before {
- content: "\e216";
-}
-.glyphicon-tent:before {
- content: "\26fa";
-}
-.glyphicon-blackboard:before {
- content: "\e218";
-}
-.glyphicon-bed:before {
- content: "\e219";
-}
-.glyphicon-apple:before {
- content: "\f8ff";
-}
-.glyphicon-erase:before {
- content: "\e221";
-}
-.glyphicon-hourglass:before {
- content: "\231b";
-}
-.glyphicon-lamp:before {
- content: "\e223";
-}
-.glyphicon-duplicate:before {
- content: "\e224";
-}
-.glyphicon-piggy-bank:before {
- content: "\e225";
-}
-.glyphicon-scissors:before {
- content: "\e226";
-}
-.glyphicon-bitcoin:before {
- content: "\e227";
-}
-.glyphicon-btc:before {
- content: "\e227";
-}
-.glyphicon-xbt:before {
- content: "\e227";
-}
-.glyphicon-yen:before {
- content: "\00a5";
-}
-.glyphicon-jpy:before {
- content: "\00a5";
-}
-.glyphicon-ruble:before {
- content: "\20bd";
-}
-.glyphicon-rub:before {
- content: "\20bd";
-}
-.glyphicon-scale:before {
- content: "\e230";
-}
-.glyphicon-ice-lolly:before {
- content: "\e231";
-}
-.glyphicon-ice-lolly-tasted:before {
- content: "\e232";
-}
-.glyphicon-education:before {
- content: "\e233";
-}
-.glyphicon-option-horizontal:before {
- content: "\e234";
-}
-.glyphicon-option-vertical:before {
- content: "\e235";
-}
-.glyphicon-menu-hamburger:before {
- content: "\e236";
-}
-.glyphicon-modal-window:before {
- content: "\e237";
-}
-.glyphicon-oil:before {
- content: "\e238";
-}
-.glyphicon-grain:before {
- content: "\e239";
-}
-.glyphicon-sunglasses:before {
- content: "\e240";
-}
-.glyphicon-text-size:before {
- content: "\e241";
-}
-.glyphicon-text-color:before {
- content: "\e242";
-}
-.glyphicon-text-background:before {
- content: "\e243";
-}
-.glyphicon-object-align-top:before {
- content: "\e244";
-}
-.glyphicon-object-align-bottom:before {
- content: "\e245";
-}
-.glyphicon-object-align-horizontal:before {
- content: "\e246";
-}
-.glyphicon-object-align-left:before {
- content: "\e247";
-}
-.glyphicon-object-align-vertical:before {
- content: "\e248";
-}
-.glyphicon-object-align-right:before {
- content: "\e249";
-}
-.glyphicon-triangle-right:before {
- content: "\e250";
-}
-.glyphicon-triangle-left:before {
- content: "\e251";
-}
-.glyphicon-triangle-bottom:before {
- content: "\e252";
-}
-.glyphicon-triangle-top:before {
- content: "\e253";
-}
-.glyphicon-console:before {
- content: "\e254";
-}
-.glyphicon-superscript:before {
- content: "\e255";
-}
-.glyphicon-subscript:before {
- content: "\e256";
-}
-.glyphicon-menu-left:before {
- content: "\e257";
-}
-.glyphicon-menu-right:before {
- content: "\e258";
-}
-.glyphicon-menu-down:before {
- content: "\e259";
-}
-.glyphicon-menu-up:before {
- content: "\e260";
-}
-* {
- box-sizing: border-box;
-}
-*:before,
-*:after {
- box-sizing: border-box;
-}
-html {
- font-size: 10px;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-body {
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-size: 14px;
- line-height: 1.42857143;
- color: #333333;
- background-color: #ffffff;
-}
-input,
-button,
-select,
-textarea {
- font-family: inherit;
- font-size: inherit;
- line-height: inherit;
-}
-a {
- color: #337ab7;
- text-decoration: none;
-}
-a:hover,
-a:focus {
- color: #23527c;
- text-decoration: underline;
-}
-a:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-figure {
- margin: 0;
-}
-img {
- vertical-align: middle;
-}
-.img-responsive,
-.thumbnail > img,
-.thumbnail a > img,
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
- display: block;
- max-width: 100%;
- height: auto;
-}
-.img-rounded {
- border-radius: 6px;
-}
-.img-thumbnail {
- padding: 4px;
- line-height: 1.42857143;
- background-color: #ffffff;
- border: 1px solid #dddddd;
- border-radius: 4px;
- transition: all 0.2s ease-in-out;
- display: inline-block;
- max-width: 100%;
- height: auto;
-}
-.img-circle {
- border-radius: 50%;
-}
-hr {
- margin-top: 20px;
- margin-bottom: 20px;
- border: 0;
- border-top: 1px solid #eeeeee;
-}
-.sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- margin: -1px;
- padding: 0;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
-}
-.sr-only-focusable:active,
-.sr-only-focusable:focus {
- position: static;
- width: auto;
- height: auto;
- margin: 0;
- overflow: visible;
- clip: auto;
-}
-[role="button"] {
- cursor: pointer;
-}
-h1,
-h2,
-h3,
-h4,
-h5,
-h6,
-.h1,
-.h2,
-.h3,
-.h4,
-.h5,
-.h6 {
- font-family: inherit;
- font-weight: 500;
- line-height: 1.1;
- color: inherit;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small,
-.h1 small,
-.h2 small,
-.h3 small,
-.h4 small,
-.h5 small,
-.h6 small,
-h1 .small,
-h2 .small,
-h3 .small,
-h4 .small,
-h5 .small,
-h6 .small,
-.h1 .small,
-.h2 .small,
-.h3 .small,
-.h4 .small,
-.h5 .small,
-.h6 .small {
- font-weight: normal;
- line-height: 1;
- color: #777777;
-}
-h1,
-.h1,
-h2,
-.h2,
-h3,
-.h3 {
- margin-top: 20px;
- margin-bottom: 10px;
-}
-h1 small,
-.h1 small,
-h2 small,
-.h2 small,
-h3 small,
-.h3 small,
-h1 .small,
-.h1 .small,
-h2 .small,
-.h2 .small,
-h3 .small,
-.h3 .small {
- font-size: 65%;
-}
-h4,
-.h4,
-h5,
-.h5,
-h6,
-.h6 {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-h4 small,
-.h4 small,
-h5 small,
-.h5 small,
-h6 small,
-.h6 small,
-h4 .small,
-.h4 .small,
-h5 .small,
-.h5 .small,
-h6 .small,
-.h6 .small {
- font-size: 75%;
-}
-h1,
-.h1 {
- font-size: 36px;
-}
-h2,
-.h2 {
- font-size: 30px;
-}
-h3,
-.h3 {
- font-size: 24px;
-}
-h4,
-.h4 {
- font-size: 18px;
-}
-h5,
-.h5 {
- font-size: 14px;
-}
-h6,
-.h6 {
- font-size: 12px;
-}
-p {
- margin: 0 0 10px;
-}
-.lead {
- margin-bottom: 20px;
- font-size: 16px;
- font-weight: 300;
- line-height: 1.4;
-}
-@media (min-width: 768px) {
- .lead {
- font-size: 21px;
- }
-}
-small,
-.small {
- font-size: 85%;
-}
-mark,
-.mark {
- background-color: #fcf8e3;
- padding: .2em;
-}
-.text-left {
- text-align: left;
-}
-.text-right {
- text-align: right;
-}
-.text-center {
- text-align: center;
-}
-.text-justify {
- text-align: justify;
-}
-.text-nowrap {
- white-space: nowrap;
-}
-.text-lowercase {
- text-transform: lowercase;
-}
-.text-uppercase {
- text-transform: uppercase;
-}
-.text-capitalize {
- text-transform: capitalize;
-}
-.text-muted {
- color: #777777;
-}
-.text-primary {
- color: #337ab7;
-}
-a.text-primary:hover,
-a.text-primary:focus {
- color: #286090;
-}
-.text-success {
- color: #3c763d;
-}
-a.text-success:hover,
-a.text-success:focus {
- color: #2b542c;
-}
-.text-info {
- color: #31708f;
-}
-a.text-info:hover,
-a.text-info:focus {
- color: #245269;
-}
-.text-warning {
- color: #8a6d3b;
-}
-a.text-warning:hover,
-a.text-warning:focus {
- color: #66512c;
-}
-.text-danger {
- color: #a94442;
-}
-a.text-danger:hover,
-a.text-danger:focus {
- color: #843534;
-}
-.bg-primary {
- color: #fff;
- background-color: #337ab7;
-}
-a.bg-primary:hover,
-a.bg-primary:focus {
- background-color: #286090;
-}
-.bg-success {
- background-color: #dff0d8;
-}
-a.bg-success:hover,
-a.bg-success:focus {
- background-color: #c1e2b3;
-}
-.bg-info {
- background-color: #d9edf7;
-}
-a.bg-info:hover,
-a.bg-info:focus {
- background-color: #afd9ee;
-}
-.bg-warning {
- background-color: #fcf8e3;
-}
-a.bg-warning:hover,
-a.bg-warning:focus {
- background-color: #f7ecb5;
-}
-.bg-danger {
- background-color: #f2dede;
-}
-a.bg-danger:hover,
-a.bg-danger:focus {
- background-color: #e4b9b9;
-}
-.page-header {
- padding-bottom: 9px;
- margin: 40px 0 20px;
- border-bottom: 1px solid #eeeeee;
-}
-ul,
-ol {
- margin-top: 0;
- margin-bottom: 10px;
-}
-ul ul,
-ol ul,
-ul ol,
-ol ol {
- margin-bottom: 0;
-}
-.list-unstyled {
- padding-left: 0;
- list-style: none;
-}
-.list-inline {
- padding-left: 0;
- list-style: none;
- margin-left: -5px;
-}
-.list-inline > li {
- display: inline-block;
- padding-left: 5px;
- padding-right: 5px;
-}
-dl {
- margin-top: 0;
- margin-bottom: 20px;
-}
-dt,
-dd {
- line-height: 1.42857143;
-}
-dt {
- font-weight: bold;
-}
-dd {
- margin-left: 0;
-}
-@media (min-width: 768px) {
- .dl-horizontal dt {
- float: left;
- width: 160px;
- clear: left;
- text-align: right;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .dl-horizontal dd {
- margin-left: 180px;
- }
-}
-abbr[title],
-abbr[data-original-title] {
- cursor: help;
- border-bottom: 1px dotted #777777;
-}
-.initialism {
- font-size: 90%;
- text-transform: uppercase;
-}
-blockquote {
- padding: 10px 20px;
- margin: 0 0 20px;
- font-size: 17.5px;
- border-left: 5px solid #eeeeee;
-}
-blockquote p:last-child,
-blockquote ul:last-child,
-blockquote ol:last-child {
- margin-bottom: 0;
-}
-blockquote footer,
-blockquote small,
-blockquote .small {
- display: block;
- font-size: 80%;
- line-height: 1.42857143;
- color: #777777;
-}
-blockquote footer:before,
-blockquote small:before,
-blockquote .small:before {
- content: '\2014 \00A0';
-}
-.blockquote-reverse,
-blockquote.pull-right {
- padding-right: 15px;
- padding-left: 0;
- border-right: 5px solid #eeeeee;
- border-left: 0;
- text-align: right;
-}
-.blockquote-reverse footer:before,
-blockquote.pull-right footer:before,
-.blockquote-reverse small:before,
-blockquote.pull-right small:before,
-.blockquote-reverse .small:before,
-blockquote.pull-right .small:before {
- content: '';
-}
-.blockquote-reverse footer:after,
-blockquote.pull-right footer:after,
-.blockquote-reverse small:after,
-blockquote.pull-right small:after,
-.blockquote-reverse .small:after,
-blockquote.pull-right .small:after {
- content: '\00A0 \2014';
-}
-address {
- margin-bottom: 20px;
- font-style: normal;
- line-height: 1.42857143;
-}
-code,
-kbd,
-pre,
-samp {
- font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
-}
-code {
- padding: 2px 4px;
- font-size: 90%;
- color: #c7254e;
- background-color: #f9f2f4;
- border-radius: 4px;
-}
-kbd {
- padding: 2px 4px;
- font-size: 90%;
- color: #ffffff;
- background-color: #333333;
- border-radius: 3px;
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
-}
-kbd kbd {
- padding: 0;
- font-size: 100%;
- font-weight: bold;
- box-shadow: none;
-}
-pre {
- display: block;
- padding: 9.5px;
- margin: 0 0 10px;
- font-size: 13px;
- line-height: 1.42857143;
- word-break: break-all;
- word-wrap: break-word;
- color: #333333;
- background-color: #f5f5f5;
- border: 1px solid #cccccc;
- border-radius: 4px;
-}
-pre code {
- padding: 0;
- font-size: inherit;
- color: inherit;
- white-space: pre-wrap;
- background-color: transparent;
- border-radius: 0;
-}
-.pre-scrollable {
- max-height: 340px;
- overflow-y: scroll;
-}
-.container {
- margin-right: auto;
- margin-left: auto;
- padding-left: 15px;
- padding-right: 15px;
-}
-@media (min-width: 768px) {
- .container {
- width: 750px;
- }
-}
-@media (min-width: 992px) {
- .container {
- width: 970px;
- }
-}
-@media (min-width: 1200px) {
- .container {
- width: 1170px;
- }
-}
-.container-fluid {
- margin-right: auto;
- margin-left: auto;
- padding-left: 15px;
- padding-right: 15px;
-}
-.row {
- margin-left: -15px;
- margin-right: -15px;
-}
-.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
- position: relative;
- min-height: 1px;
- padding-left: 15px;
- padding-right: 15px;
-}
-.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
- float: left;
-}
-.col-xs-12 {
- width: 100%;
-}
-.col-xs-11 {
- width: 91.66666667%;
-}
-.col-xs-10 {
- width: 83.33333333%;
-}
-.col-xs-9 {
- width: 75%;
-}
-.col-xs-8 {
- width: 66.66666667%;
-}
-.col-xs-7 {
- width: 58.33333333%;
-}
-.col-xs-6 {
- width: 50%;
-}
-.col-xs-5 {
- width: 41.66666667%;
-}
-.col-xs-4 {
- width: 33.33333333%;
-}
-.col-xs-3 {
- width: 25%;
-}
-.col-xs-2 {
- width: 16.66666667%;
-}
-.col-xs-1 {
- width: 8.33333333%;
-}
-.col-xs-pull-12 {
- right: 100%;
-}
-.col-xs-pull-11 {
- right: 91.66666667%;
-}
-.col-xs-pull-10 {
- right: 83.33333333%;
-}
-.col-xs-pull-9 {
- right: 75%;
-}
-.col-xs-pull-8 {
- right: 66.66666667%;
-}
-.col-xs-pull-7 {
- right: 58.33333333%;
-}
-.col-xs-pull-6 {
- right: 50%;
-}
-.col-xs-pull-5 {
- right: 41.66666667%;
-}
-.col-xs-pull-4 {
- right: 33.33333333%;
-}
-.col-xs-pull-3 {
- right: 25%;
-}
-.col-xs-pull-2 {
- right: 16.66666667%;
-}
-.col-xs-pull-1 {
- right: 8.33333333%;
-}
-.col-xs-pull-0 {
- right: auto;
-}
-.col-xs-push-12 {
- left: 100%;
-}
-.col-xs-push-11 {
- left: 91.66666667%;
-}
-.col-xs-push-10 {
- left: 83.33333333%;
-}
-.col-xs-push-9 {
- left: 75%;
-}
-.col-xs-push-8 {
- left: 66.66666667%;
-}
-.col-xs-push-7 {
- left: 58.33333333%;
-}
-.col-xs-push-6 {
- left: 50%;
-}
-.col-xs-push-5 {
- left: 41.66666667%;
-}
-.col-xs-push-4 {
- left: 33.33333333%;
-}
-.col-xs-push-3 {
- left: 25%;
-}
-.col-xs-push-2 {
- left: 16.66666667%;
-}
-.col-xs-push-1 {
- left: 8.33333333%;
-}
-.col-xs-push-0 {
- left: auto;
-}
-.col-xs-offset-12 {
- margin-left: 100%;
-}
-.col-xs-offset-11 {
- margin-left: 91.66666667%;
-}
-.col-xs-offset-10 {
- margin-left: 83.33333333%;
-}
-.col-xs-offset-9 {
- margin-left: 75%;
-}
-.col-xs-offset-8 {
- margin-left: 66.66666667%;
-}
-.col-xs-offset-7 {
- margin-left: 58.33333333%;
-}
-.col-xs-offset-6 {
- margin-left: 50%;
-}
-.col-xs-offset-5 {
- margin-left: 41.66666667%;
-}
-.col-xs-offset-4 {
- margin-left: 33.33333333%;
-}
-.col-xs-offset-3 {
- margin-left: 25%;
-}
-.col-xs-offset-2 {
- margin-left: 16.66666667%;
-}
-.col-xs-offset-1 {
- margin-left: 8.33333333%;
-}
-.col-xs-offset-0 {
- margin-left: 0%;
-}
-@media (min-width: 768px) {
- .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
- float: left;
- }
- .col-sm-12 {
- width: 100%;
- }
- .col-sm-11 {
- width: 91.66666667%;
- }
- .col-sm-10 {
- width: 83.33333333%;
- }
- .col-sm-9 {
- width: 75%;
- }
- .col-sm-8 {
- width: 66.66666667%;
- }
- .col-sm-7 {
- width: 58.33333333%;
- }
- .col-sm-6 {
- width: 50%;
- }
- .col-sm-5 {
- width: 41.66666667%;
- }
- .col-sm-4 {
- width: 33.33333333%;
- }
- .col-sm-3 {
- width: 25%;
- }
- .col-sm-2 {
- width: 16.66666667%;
- }
- .col-sm-1 {
- width: 8.33333333%;
- }
- .col-sm-pull-12 {
- right: 100%;
- }
- .col-sm-pull-11 {
- right: 91.66666667%;
- }
- .col-sm-pull-10 {
- right: 83.33333333%;
- }
- .col-sm-pull-9 {
- right: 75%;
- }
- .col-sm-pull-8 {
- right: 66.66666667%;
- }
- .col-sm-pull-7 {
- right: 58.33333333%;
- }
- .col-sm-pull-6 {
- right: 50%;
- }
- .col-sm-pull-5 {
- right: 41.66666667%;
- }
- .col-sm-pull-4 {
- right: 33.33333333%;
- }
- .col-sm-pull-3 {
- right: 25%;
- }
- .col-sm-pull-2 {
- right: 16.66666667%;
- }
- .col-sm-pull-1 {
- right: 8.33333333%;
- }
- .col-sm-pull-0 {
- right: auto;
- }
- .col-sm-push-12 {
- left: 100%;
- }
- .col-sm-push-11 {
- left: 91.66666667%;
- }
- .col-sm-push-10 {
- left: 83.33333333%;
- }
- .col-sm-push-9 {
- left: 75%;
- }
- .col-sm-push-8 {
- left: 66.66666667%;
- }
- .col-sm-push-7 {
- left: 58.33333333%;
- }
- .col-sm-push-6 {
- left: 50%;
- }
- .col-sm-push-5 {
- left: 41.66666667%;
- }
- .col-sm-push-4 {
- left: 33.33333333%;
- }
- .col-sm-push-3 {
- left: 25%;
- }
- .col-sm-push-2 {
- left: 16.66666667%;
- }
- .col-sm-push-1 {
- left: 8.33333333%;
- }
- .col-sm-push-0 {
- left: auto;
- }
- .col-sm-offset-12 {
- margin-left: 100%;
- }
- .col-sm-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-sm-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-sm-offset-9 {
- margin-left: 75%;
- }
- .col-sm-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-sm-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-sm-offset-6 {
- margin-left: 50%;
- }
- .col-sm-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-sm-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-sm-offset-3 {
- margin-left: 25%;
- }
- .col-sm-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-sm-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-sm-offset-0 {
- margin-left: 0%;
- }
-}
-@media (min-width: 992px) {
- .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
- float: left;
- }
- .col-md-12 {
- width: 100%;
- }
- .col-md-11 {
- width: 91.66666667%;
- }
- .col-md-10 {
- width: 83.33333333%;
- }
- .col-md-9 {
- width: 75%;
- }
- .col-md-8 {
- width: 66.66666667%;
- }
- .col-md-7 {
- width: 58.33333333%;
- }
- .col-md-6 {
- width: 50%;
- }
- .col-md-5 {
- width: 41.66666667%;
- }
- .col-md-4 {
- width: 33.33333333%;
- }
- .col-md-3 {
- width: 25%;
- }
- .col-md-2 {
- width: 16.66666667%;
- }
- .col-md-1 {
- width: 8.33333333%;
- }
- .col-md-pull-12 {
- right: 100%;
- }
- .col-md-pull-11 {
- right: 91.66666667%;
- }
- .col-md-pull-10 {
- right: 83.33333333%;
- }
- .col-md-pull-9 {
- right: 75%;
- }
- .col-md-pull-8 {
- right: 66.66666667%;
- }
- .col-md-pull-7 {
- right: 58.33333333%;
- }
- .col-md-pull-6 {
- right: 50%;
- }
- .col-md-pull-5 {
- right: 41.66666667%;
- }
- .col-md-pull-4 {
- right: 33.33333333%;
- }
- .col-md-pull-3 {
- right: 25%;
- }
- .col-md-pull-2 {
- right: 16.66666667%;
- }
- .col-md-pull-1 {
- right: 8.33333333%;
- }
- .col-md-pull-0 {
- right: auto;
- }
- .col-md-push-12 {
- left: 100%;
- }
- .col-md-push-11 {
- left: 91.66666667%;
- }
- .col-md-push-10 {
- left: 83.33333333%;
- }
- .col-md-push-9 {
- left: 75%;
- }
- .col-md-push-8 {
- left: 66.66666667%;
- }
- .col-md-push-7 {
- left: 58.33333333%;
- }
- .col-md-push-6 {
- left: 50%;
- }
- .col-md-push-5 {
- left: 41.66666667%;
- }
- .col-md-push-4 {
- left: 33.33333333%;
- }
- .col-md-push-3 {
- left: 25%;
- }
- .col-md-push-2 {
- left: 16.66666667%;
- }
- .col-md-push-1 {
- left: 8.33333333%;
- }
- .col-md-push-0 {
- left: auto;
- }
- .col-md-offset-12 {
- margin-left: 100%;
- }
- .col-md-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-md-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-md-offset-9 {
- margin-left: 75%;
- }
- .col-md-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-md-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-md-offset-6 {
- margin-left: 50%;
- }
- .col-md-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-md-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-md-offset-3 {
- margin-left: 25%;
- }
- .col-md-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-md-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-md-offset-0 {
- margin-left: 0%;
- }
-}
-@media (min-width: 1200px) {
- .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
- float: left;
- }
- .col-lg-12 {
- width: 100%;
- }
- .col-lg-11 {
- width: 91.66666667%;
- }
- .col-lg-10 {
- width: 83.33333333%;
- }
- .col-lg-9 {
- width: 75%;
- }
- .col-lg-8 {
- width: 66.66666667%;
- }
- .col-lg-7 {
- width: 58.33333333%;
- }
- .col-lg-6 {
- width: 50%;
- }
- .col-lg-5 {
- width: 41.66666667%;
- }
- .col-lg-4 {
- width: 33.33333333%;
- }
- .col-lg-3 {
- width: 25%;
- }
- .col-lg-2 {
- width: 16.66666667%;
- }
- .col-lg-1 {
- width: 8.33333333%;
- }
- .col-lg-pull-12 {
- right: 100%;
- }
- .col-lg-pull-11 {
- right: 91.66666667%;
- }
- .col-lg-pull-10 {
- right: 83.33333333%;
- }
- .col-lg-pull-9 {
- right: 75%;
- }
- .col-lg-pull-8 {
- right: 66.66666667%;
- }
- .col-lg-pull-7 {
- right: 58.33333333%;
- }
- .col-lg-pull-6 {
- right: 50%;
- }
- .col-lg-pull-5 {
- right: 41.66666667%;
- }
- .col-lg-pull-4 {
- right: 33.33333333%;
- }
- .col-lg-pull-3 {
- right: 25%;
- }
- .col-lg-pull-2 {
- right: 16.66666667%;
- }
- .col-lg-pull-1 {
- right: 8.33333333%;
- }
- .col-lg-pull-0 {
- right: auto;
- }
- .col-lg-push-12 {
- left: 100%;
- }
- .col-lg-push-11 {
- left: 91.66666667%;
- }
- .col-lg-push-10 {
- left: 83.33333333%;
- }
- .col-lg-push-9 {
- left: 75%;
- }
- .col-lg-push-8 {
- left: 66.66666667%;
- }
- .col-lg-push-7 {
- left: 58.33333333%;
- }
- .col-lg-push-6 {
- left: 50%;
- }
- .col-lg-push-5 {
- left: 41.66666667%;
- }
- .col-lg-push-4 {
- left: 33.33333333%;
- }
- .col-lg-push-3 {
- left: 25%;
- }
- .col-lg-push-2 {
- left: 16.66666667%;
- }
- .col-lg-push-1 {
- left: 8.33333333%;
- }
- .col-lg-push-0 {
- left: auto;
- }
- .col-lg-offset-12 {
- margin-left: 100%;
- }
- .col-lg-offset-11 {
- margin-left: 91.66666667%;
- }
- .col-lg-offset-10 {
- margin-left: 83.33333333%;
- }
- .col-lg-offset-9 {
- margin-left: 75%;
- }
- .col-lg-offset-8 {
- margin-left: 66.66666667%;
- }
- .col-lg-offset-7 {
- margin-left: 58.33333333%;
- }
- .col-lg-offset-6 {
- margin-left: 50%;
- }
- .col-lg-offset-5 {
- margin-left: 41.66666667%;
- }
- .col-lg-offset-4 {
- margin-left: 33.33333333%;
- }
- .col-lg-offset-3 {
- margin-left: 25%;
- }
- .col-lg-offset-2 {
- margin-left: 16.66666667%;
- }
- .col-lg-offset-1 {
- margin-left: 8.33333333%;
- }
- .col-lg-offset-0 {
- margin-left: 0%;
- }
-}
-table {
- background-color: transparent;
-}
-caption {
- padding-top: 8px;
- padding-bottom: 8px;
- color: #777777;
- text-align: left;
-}
-th {
- text-align: left;
-}
-.table {
- width: 100%;
- max-width: 100%;
- margin-bottom: 20px;
-}
-.table > thead > tr > th,
-.table > tbody > tr > th,
-.table > tfoot > tr > th,
-.table > thead > tr > td,
-.table > tbody > tr > td,
-.table > tfoot > tr > td {
- padding: 8px;
- line-height: 1.42857143;
- vertical-align: top;
- border-top: 1px solid #dddddd;
-}
-.table > thead > tr > th {
- vertical-align: bottom;
- border-bottom: 2px solid #dddddd;
-}
-.table > caption + thead > tr:first-child > th,
-.table > colgroup + thead > tr:first-child > th,
-.table > thead:first-child > tr:first-child > th,
-.table > caption + thead > tr:first-child > td,
-.table > colgroup + thead > tr:first-child > td,
-.table > thead:first-child > tr:first-child > td {
- border-top: 0;
-}
-.table > tbody + tbody {
- border-top: 2px solid #dddddd;
-}
-.table .table {
- background-color: #ffffff;
-}
-.table-condensed > thead > tr > th,
-.table-condensed > tbody > tr > th,
-.table-condensed > tfoot > tr > th,
-.table-condensed > thead > tr > td,
-.table-condensed > tbody > tr > td,
-.table-condensed > tfoot > tr > td {
- padding: 5px;
-}
-.table-bordered {
- border: 1px solid #dddddd;
-}
-.table-bordered > thead > tr > th,
-.table-bordered > tbody > tr > th,
-.table-bordered > tfoot > tr > th,
-.table-bordered > thead > tr > td,
-.table-bordered > tbody > tr > td,
-.table-bordered > tfoot > tr > td {
- border: 1px solid #dddddd;
-}
-.table-bordered > thead > tr > th,
-.table-bordered > thead > tr > td {
- border-bottom-width: 2px;
-}
-.table-striped > tbody > tr:nth-of-type(odd) {
- background-color: #f9f9f9;
-}
-.table-hover > tbody > tr:hover {
- background-color: #f5f5f5;
-}
-table col[class*="col-"] {
- position: static;
- float: none;
- display: table-column;
-}
-table td[class*="col-"],
-table th[class*="col-"] {
- position: static;
- float: none;
- display: table-cell;
-}
-.table > thead > tr > td.active,
-.table > tbody > tr > td.active,
-.table > tfoot > tr > td.active,
-.table > thead > tr > th.active,
-.table > tbody > tr > th.active,
-.table > tfoot > tr > th.active,
-.table > thead > tr.active > td,
-.table > tbody > tr.active > td,
-.table > tfoot > tr.active > td,
-.table > thead > tr.active > th,
-.table > tbody > tr.active > th,
-.table > tfoot > tr.active > th {
- background-color: #f5f5f5;
-}
-.table-hover > tbody > tr > td.active:hover,
-.table-hover > tbody > tr > th.active:hover,
-.table-hover > tbody > tr.active:hover > td,
-.table-hover > tbody > tr:hover > .active,
-.table-hover > tbody > tr.active:hover > th {
- background-color: #e8e8e8;
-}
-.table > thead > tr > td.success,
-.table > tbody > tr > td.success,
-.table > tfoot > tr > td.success,
-.table > thead > tr > th.success,
-.table > tbody > tr > th.success,
-.table > tfoot > tr > th.success,
-.table > thead > tr.success > td,
-.table > tbody > tr.success > td,
-.table > tfoot > tr.success > td,
-.table > thead > tr.success > th,
-.table > tbody > tr.success > th,
-.table > tfoot > tr.success > th {
- background-color: #dff0d8;
-}
-.table-hover > tbody > tr > td.success:hover,
-.table-hover > tbody > tr > th.success:hover,
-.table-hover > tbody > tr.success:hover > td,
-.table-hover > tbody > tr:hover > .success,
-.table-hover > tbody > tr.success:hover > th {
- background-color: #d0e9c6;
-}
-.table > thead > tr > td.info,
-.table > tbody > tr > td.info,
-.table > tfoot > tr > td.info,
-.table > thead > tr > th.info,
-.table > tbody > tr > th.info,
-.table > tfoot > tr > th.info,
-.table > thead > tr.info > td,
-.table > tbody > tr.info > td,
-.table > tfoot > tr.info > td,
-.table > thead > tr.info > th,
-.table > tbody > tr.info > th,
-.table > tfoot > tr.info > th {
- background-color: #d9edf7;
-}
-.table-hover > tbody > tr > td.info:hover,
-.table-hover > tbody > tr > th.info:hover,
-.table-hover > tbody > tr.info:hover > td,
-.table-hover > tbody > tr:hover > .info,
-.table-hover > tbody > tr.info:hover > th {
- background-color: #c4e3f3;
-}
-.table > thead > tr > td.warning,
-.table > tbody > tr > td.warning,
-.table > tfoot > tr > td.warning,
-.table > thead > tr > th.warning,
-.table > tbody > tr > th.warning,
-.table > tfoot > tr > th.warning,
-.table > thead > tr.warning > td,
-.table > tbody > tr.warning > td,
-.table > tfoot > tr.warning > td,
-.table > thead > tr.warning > th,
-.table > tbody > tr.warning > th,
-.table > tfoot > tr.warning > th {
- background-color: #fcf8e3;
-}
-.table-hover > tbody > tr > td.warning:hover,
-.table-hover > tbody > tr > th.warning:hover,
-.table-hover > tbody > tr.warning:hover > td,
-.table-hover > tbody > tr:hover > .warning,
-.table-hover > tbody > tr.warning:hover > th {
- background-color: #faf2cc;
-}
-.table > thead > tr > td.danger,
-.table > tbody > tr > td.danger,
-.table > tfoot > tr > td.danger,
-.table > thead > tr > th.danger,
-.table > tbody > tr > th.danger,
-.table > tfoot > tr > th.danger,
-.table > thead > tr.danger > td,
-.table > tbody > tr.danger > td,
-.table > tfoot > tr.danger > td,
-.table > thead > tr.danger > th,
-.table > tbody > tr.danger > th,
-.table > tfoot > tr.danger > th {
- background-color: #f2dede;
-}
-.table-hover > tbody > tr > td.danger:hover,
-.table-hover > tbody > tr > th.danger:hover,
-.table-hover > tbody > tr.danger:hover > td,
-.table-hover > tbody > tr:hover > .danger,
-.table-hover > tbody > tr.danger:hover > th {
- background-color: #ebcccc;
-}
-.table-responsive {
- overflow-x: auto;
- min-height: 0.01%;
-}
-@media screen and (max-width: 767px) {
- .table-responsive {
- width: 100%;
- margin-bottom: 15px;
- overflow-y: hidden;
- -ms-overflow-style: -ms-autohiding-scrollbar;
- border: 1px solid #dddddd;
- }
- .table-responsive > .table {
- margin-bottom: 0;
- }
- .table-responsive > .table > thead > tr > th,
- .table-responsive > .table > tbody > tr > th,
- .table-responsive > .table > tfoot > tr > th,
- .table-responsive > .table > thead > tr > td,
- .table-responsive > .table > tbody > tr > td,
- .table-responsive > .table > tfoot > tr > td {
- white-space: nowrap;
- }
- .table-responsive > .table-bordered {
- border: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:first-child,
- .table-responsive > .table-bordered > tbody > tr > th:first-child,
- .table-responsive > .table-bordered > tfoot > tr > th:first-child,
- .table-responsive > .table-bordered > thead > tr > td:first-child,
- .table-responsive > .table-bordered > tbody > tr > td:first-child,
- .table-responsive > .table-bordered > tfoot > tr > td:first-child {
- border-left: 0;
- }
- .table-responsive > .table-bordered > thead > tr > th:last-child,
- .table-responsive > .table-bordered > tbody > tr > th:last-child,
- .table-responsive > .table-bordered > tfoot > tr > th:last-child,
- .table-responsive > .table-bordered > thead > tr > td:last-child,
- .table-responsive > .table-bordered > tbody > tr > td:last-child,
- .table-responsive > .table-bordered > tfoot > tr > td:last-child {
- border-right: 0;
- }
- .table-responsive > .table-bordered > tbody > tr:last-child > th,
- .table-responsive > .table-bordered > tfoot > tr:last-child > th,
- .table-responsive > .table-bordered > tbody > tr:last-child > td,
- .table-responsive > .table-bordered > tfoot > tr:last-child > td {
- border-bottom: 0;
- }
-}
-fieldset {
- padding: 0;
- margin: 0;
- border: 0;
- min-width: 0;
-}
-legend {
- display: block;
- width: 100%;
- padding: 0;
- margin-bottom: 20px;
- font-size: 21px;
- line-height: inherit;
- color: #333333;
- border: 0;
- border-bottom: 1px solid #e5e5e5;
-}
-label {
- display: inline-block;
- max-width: 100%;
- margin-bottom: 5px;
- font-weight: bold;
-}
-input[type="search"] {
- box-sizing: border-box;
-}
-input[type="radio"],
-input[type="checkbox"] {
- margin: 4px 0 0;
- margin-top: 1px \9;
- line-height: normal;
-}
-input[type="file"] {
- display: block;
-}
-input[type="range"] {
- display: block;
- width: 100%;
-}
-select[multiple],
-select[size] {
- height: auto;
-}
-input[type="file"]:focus,
-input[type="radio"]:focus,
-input[type="checkbox"]:focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-output {
- display: block;
- padding-top: 7px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555555;
-}
-.form-control {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555555;
- background-color: #ffffff;
- background-image: none;
- border: 1px solid #cccccc;
- border-radius: 4px;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-}
-.form-control:focus {
- border-color: #66afe9;
- outline: 0;
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.form-control::-moz-placeholder {
- color: #999999;
- opacity: 1;
-}
-.form-control:-ms-input-placeholder {
- color: #999999;
-}
-.form-control::-webkit-input-placeholder {
- color: #999999;
-}
-.form-control::-ms-expand {
- border: 0;
- background-color: transparent;
-}
-.form-control[disabled],
-.form-control[readonly],
-fieldset[disabled] .form-control {
- background-color: #eeeeee;
- opacity: 1;
-}
-.form-control[disabled],
-fieldset[disabled] .form-control {
- cursor: not-allowed;
-}
-textarea.form-control {
- height: auto;
-}
-input[type="search"] {
- -webkit-appearance: none;
-}
-@media screen and (-webkit-min-device-pixel-ratio: 0) {
- input[type="date"].form-control,
- input[type="time"].form-control,
- input[type="datetime-local"].form-control,
- input[type="month"].form-control {
- line-height: 34px;
- }
- input[type="date"].input-sm,
- input[type="time"].input-sm,
- input[type="datetime-local"].input-sm,
- input[type="month"].input-sm,
- .input-group-sm input[type="date"],
- .input-group-sm input[type="time"],
- .input-group-sm input[type="datetime-local"],
- .input-group-sm input[type="month"] {
- line-height: 30px;
- }
- input[type="date"].input-lg,
- input[type="time"].input-lg,
- input[type="datetime-local"].input-lg,
- input[type="month"].input-lg,
- .input-group-lg input[type="date"],
- .input-group-lg input[type="time"],
- .input-group-lg input[type="datetime-local"],
- .input-group-lg input[type="month"] {
- line-height: 46px;
- }
-}
-.form-group {
- margin-bottom: 15px;
-}
-.radio,
-.checkbox {
- position: relative;
- display: block;
- margin-top: 10px;
- margin-bottom: 10px;
-}
-.radio label,
-.checkbox label {
- min-height: 20px;
- padding-left: 20px;
- margin-bottom: 0;
- font-weight: normal;
- cursor: pointer;
-}
-.radio input[type="radio"],
-.radio-inline input[type="radio"],
-.checkbox input[type="checkbox"],
-.checkbox-inline input[type="checkbox"] {
- position: absolute;
- margin-left: -20px;
- margin-top: 4px \9;
-}
-.radio + .radio,
-.checkbox + .checkbox {
- margin-top: -5px;
-}
-.radio-inline,
-.checkbox-inline {
- position: relative;
- display: inline-block;
- padding-left: 20px;
- margin-bottom: 0;
- vertical-align: middle;
- font-weight: normal;
- cursor: pointer;
-}
-.radio-inline + .radio-inline,
-.checkbox-inline + .checkbox-inline {
- margin-top: 0;
- margin-left: 10px;
-}
-input[type="radio"][disabled],
-input[type="checkbox"][disabled],
-input[type="radio"].disabled,
-input[type="checkbox"].disabled,
-fieldset[disabled] input[type="radio"],
-fieldset[disabled] input[type="checkbox"] {
- cursor: not-allowed;
-}
-.radio-inline.disabled,
-.checkbox-inline.disabled,
-fieldset[disabled] .radio-inline,
-fieldset[disabled] .checkbox-inline {
- cursor: not-allowed;
-}
-.radio.disabled label,
-.checkbox.disabled label,
-fieldset[disabled] .radio label,
-fieldset[disabled] .checkbox label {
- cursor: not-allowed;
-}
-.form-control-static {
- padding-top: 7px;
- padding-bottom: 7px;
- margin-bottom: 0;
- min-height: 34px;
-}
-.form-control-static.input-lg,
-.form-control-static.input-sm {
- padding-left: 0;
- padding-right: 0;
-}
-.input-sm {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-select.input-sm {
- height: 30px;
- line-height: 30px;
-}
-textarea.input-sm,
-select[multiple].input-sm {
- height: auto;
-}
-.form-group-sm .form-control {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.form-group-sm select.form-control {
- height: 30px;
- line-height: 30px;
-}
-.form-group-sm textarea.form-control,
-.form-group-sm select[multiple].form-control {
- height: auto;
-}
-.form-group-sm .form-control-static {
- height: 30px;
- min-height: 32px;
- padding: 6px 10px;
- font-size: 12px;
- line-height: 1.5;
-}
-.input-lg {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-select.input-lg {
- height: 46px;
- line-height: 46px;
-}
-textarea.input-lg,
-select[multiple].input-lg {
- height: auto;
-}
-.form-group-lg .form-control {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-.form-group-lg select.form-control {
- height: 46px;
- line-height: 46px;
-}
-.form-group-lg textarea.form-control,
-.form-group-lg select[multiple].form-control {
- height: auto;
-}
-.form-group-lg .form-control-static {
- height: 46px;
- min-height: 38px;
- padding: 11px 16px;
- font-size: 18px;
- line-height: 1.3333333;
-}
-.has-feedback {
- position: relative;
-}
-.has-feedback .form-control {
- padding-right: 42.5px;
-}
-.form-control-feedback {
- position: absolute;
- top: 0;
- right: 0;
- z-index: 2;
- display: block;
- width: 34px;
- height: 34px;
- line-height: 34px;
- text-align: center;
- pointer-events: none;
-}
-.input-lg + .form-control-feedback,
-.input-group-lg + .form-control-feedback,
-.form-group-lg .form-control + .form-control-feedback {
- width: 46px;
- height: 46px;
- line-height: 46px;
-}
-.input-sm + .form-control-feedback,
-.input-group-sm + .form-control-feedback,
-.form-group-sm .form-control + .form-control-feedback {
- width: 30px;
- height: 30px;
- line-height: 30px;
-}
-.has-success .help-block,
-.has-success .control-label,
-.has-success .radio,
-.has-success .checkbox,
-.has-success .radio-inline,
-.has-success .checkbox-inline,
-.has-success.radio label,
-.has-success.checkbox label,
-.has-success.radio-inline label,
-.has-success.checkbox-inline label {
- color: #3c763d;
-}
-.has-success .form-control {
- border-color: #3c763d;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-.has-success .form-control:focus {
- border-color: #2b542c;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
-}
-.has-success .input-group-addon {
- color: #3c763d;
- border-color: #3c763d;
- background-color: #dff0d8;
-}
-.has-success .form-control-feedback {
- color: #3c763d;
-}
-.has-warning .help-block,
-.has-warning .control-label,
-.has-warning .radio,
-.has-warning .checkbox,
-.has-warning .radio-inline,
-.has-warning .checkbox-inline,
-.has-warning.radio label,
-.has-warning.checkbox label,
-.has-warning.radio-inline label,
-.has-warning.checkbox-inline label {
- color: #8a6d3b;
-}
-.has-warning .form-control {
- border-color: #8a6d3b;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-.has-warning .form-control:focus {
- border-color: #66512c;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
-}
-.has-warning .input-group-addon {
- color: #8a6d3b;
- border-color: #8a6d3b;
- background-color: #fcf8e3;
-}
-.has-warning .form-control-feedback {
- color: #8a6d3b;
-}
-.has-error .help-block,
-.has-error .control-label,
-.has-error .radio,
-.has-error .checkbox,
-.has-error .radio-inline,
-.has-error .checkbox-inline,
-.has-error.radio label,
-.has-error.checkbox label,
-.has-error.radio-inline label,
-.has-error.checkbox-inline label {
- color: #a94442;
-}
-.has-error .form-control {
- border-color: #a94442;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-.has-error .form-control:focus {
- border-color: #843534;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
-}
-.has-error .input-group-addon {
- color: #a94442;
- border-color: #a94442;
- background-color: #f2dede;
-}
-.has-error .form-control-feedback {
- color: #a94442;
-}
-.has-feedback label ~ .form-control-feedback {
- top: 25px;
-}
-.has-feedback label.sr-only ~ .form-control-feedback {
- top: 0;
-}
-.help-block {
- display: block;
- margin-top: 5px;
- margin-bottom: 10px;
- color: #737373;
-}
-@media (min-width: 768px) {
- .form-inline .form-group {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .form-control {
- display: inline-block;
- width: auto;
- vertical-align: middle;
- }
- .form-inline .form-control-static {
- display: inline-block;
- }
- .form-inline .input-group {
- display: inline-table;
- vertical-align: middle;
- }
- .form-inline .input-group .input-group-addon,
- .form-inline .input-group .input-group-btn,
- .form-inline .input-group .form-control {
- width: auto;
- }
- .form-inline .input-group > .form-control {
- width: 100%;
- }
- .form-inline .control-label {
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .radio,
- .form-inline .checkbox {
- display: inline-block;
- margin-top: 0;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .form-inline .radio label,
- .form-inline .checkbox label {
- padding-left: 0;
- }
- .form-inline .radio input[type="radio"],
- .form-inline .checkbox input[type="checkbox"] {
- position: relative;
- margin-left: 0;
- }
- .form-inline .has-feedback .form-control-feedback {
- top: 0;
- }
-}
-.form-horizontal .radio,
-.form-horizontal .checkbox,
-.form-horizontal .radio-inline,
-.form-horizontal .checkbox-inline {
- margin-top: 0;
- margin-bottom: 0;
- padding-top: 7px;
-}
-.form-horizontal .radio,
-.form-horizontal .checkbox {
- min-height: 27px;
-}
-.form-horizontal .form-group {
- margin-left: -15px;
- margin-right: -15px;
-}
-@media (min-width: 768px) {
- .form-horizontal .control-label {
- text-align: right;
- margin-bottom: 0;
- padding-top: 7px;
- }
-}
-.form-horizontal .has-feedback .form-control-feedback {
- right: 15px;
-}
-@media (min-width: 768px) {
- .form-horizontal .form-group-lg .control-label {
- padding-top: 11px;
- font-size: 18px;
- }
-}
-@media (min-width: 768px) {
- .form-horizontal .form-group-sm .control-label {
- padding-top: 6px;
- font-size: 12px;
- }
-}
-.btn {
- display: inline-block;
- margin-bottom: 0;
- font-weight: normal;
- text-align: center;
- vertical-align: middle;
- -ms-touch-action: manipulation;
- touch-action: manipulation;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- white-space: nowrap;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- border-radius: 4px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-.btn:focus,
-.btn:active:focus,
-.btn.active:focus,
-.btn.focus,
-.btn:active.focus,
-.btn.active.focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.btn:hover,
-.btn:focus,
-.btn.focus {
- color: #333333;
- text-decoration: none;
-}
-.btn:active,
-.btn.active {
- outline: 0;
- background-image: none;
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.btn.disabled,
-.btn[disabled],
-fieldset[disabled] .btn {
- cursor: not-allowed;
- opacity: 0.65;
- filter: alpha(opacity=65);
- box-shadow: none;
-}
-a.btn.disabled,
-fieldset[disabled] a.btn {
- pointer-events: none;
-}
-.btn-default {
- color: #333333;
- background-color: #ffffff;
- border-color: #cccccc;
-}
-.btn-default:focus,
-.btn-default.focus {
- color: #333333;
- background-color: #e6e6e6;
- border-color: #8c8c8c;
-}
-.btn-default:hover {
- color: #333333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- color: #333333;
- background-color: #e6e6e6;
- border-color: #adadad;
-}
-.btn-default:active:hover,
-.btn-default.active:hover,
-.open > .dropdown-toggle.btn-default:hover,
-.btn-default:active:focus,
-.btn-default.active:focus,
-.open > .dropdown-toggle.btn-default:focus,
-.btn-default:active.focus,
-.btn-default.active.focus,
-.open > .dropdown-toggle.btn-default.focus {
- color: #333333;
- background-color: #d4d4d4;
- border-color: #8c8c8c;
-}
-.btn-default:active,
-.btn-default.active,
-.open > .dropdown-toggle.btn-default {
- background-image: none;
-}
-.btn-default.disabled:hover,
-.btn-default[disabled]:hover,
-fieldset[disabled] .btn-default:hover,
-.btn-default.disabled:focus,
-.btn-default[disabled]:focus,
-fieldset[disabled] .btn-default:focus,
-.btn-default.disabled.focus,
-.btn-default[disabled].focus,
-fieldset[disabled] .btn-default.focus {
- background-color: #ffffff;
- border-color: #cccccc;
-}
-.btn-default .badge {
- color: #ffffff;
- background-color: #333333;
-}
-.btn-primary {
- color: #ffffff;
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary:focus,
-.btn-primary.focus {
- color: #ffffff;
- background-color: #286090;
- border-color: #122b40;
-}
-.btn-primary:hover {
- color: #ffffff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- color: #ffffff;
- background-color: #286090;
- border-color: #204d74;
-}
-.btn-primary:active:hover,
-.btn-primary.active:hover,
-.open > .dropdown-toggle.btn-primary:hover,
-.btn-primary:active:focus,
-.btn-primary.active:focus,
-.open > .dropdown-toggle.btn-primary:focus,
-.btn-primary:active.focus,
-.btn-primary.active.focus,
-.open > .dropdown-toggle.btn-primary.focus {
- color: #ffffff;
- background-color: #204d74;
- border-color: #122b40;
-}
-.btn-primary:active,
-.btn-primary.active,
-.open > .dropdown-toggle.btn-primary {
- background-image: none;
-}
-.btn-primary.disabled:hover,
-.btn-primary[disabled]:hover,
-fieldset[disabled] .btn-primary:hover,
-.btn-primary.disabled:focus,
-.btn-primary[disabled]:focus,
-fieldset[disabled] .btn-primary:focus,
-.btn-primary.disabled.focus,
-.btn-primary[disabled].focus,
-fieldset[disabled] .btn-primary.focus {
- background-color: #337ab7;
- border-color: #2e6da4;
-}
-.btn-primary .badge {
- color: #337ab7;
- background-color: #ffffff;
-}
-.btn-success {
- color: #ffffff;
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success:focus,
-.btn-success.focus {
- color: #ffffff;
- background-color: #449d44;
- border-color: #255625;
-}
-.btn-success:hover {
- color: #ffffff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- color: #ffffff;
- background-color: #449d44;
- border-color: #398439;
-}
-.btn-success:active:hover,
-.btn-success.active:hover,
-.open > .dropdown-toggle.btn-success:hover,
-.btn-success:active:focus,
-.btn-success.active:focus,
-.open > .dropdown-toggle.btn-success:focus,
-.btn-success:active.focus,
-.btn-success.active.focus,
-.open > .dropdown-toggle.btn-success.focus {
- color: #ffffff;
- background-color: #398439;
- border-color: #255625;
-}
-.btn-success:active,
-.btn-success.active,
-.open > .dropdown-toggle.btn-success {
- background-image: none;
-}
-.btn-success.disabled:hover,
-.btn-success[disabled]:hover,
-fieldset[disabled] .btn-success:hover,
-.btn-success.disabled:focus,
-.btn-success[disabled]:focus,
-fieldset[disabled] .btn-success:focus,
-.btn-success.disabled.focus,
-.btn-success[disabled].focus,
-fieldset[disabled] .btn-success.focus {
- background-color: #5cb85c;
- border-color: #4cae4c;
-}
-.btn-success .badge {
- color: #5cb85c;
- background-color: #ffffff;
-}
-.btn-info {
- color: #ffffff;
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info:focus,
-.btn-info.focus {
- color: #ffffff;
- background-color: #31b0d5;
- border-color: #1b6d85;
-}
-.btn-info:hover {
- color: #ffffff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- color: #ffffff;
- background-color: #31b0d5;
- border-color: #269abc;
-}
-.btn-info:active:hover,
-.btn-info.active:hover,
-.open > .dropdown-toggle.btn-info:hover,
-.btn-info:active:focus,
-.btn-info.active:focus,
-.open > .dropdown-toggle.btn-info:focus,
-.btn-info:active.focus,
-.btn-info.active.focus,
-.open > .dropdown-toggle.btn-info.focus {
- color: #ffffff;
- background-color: #269abc;
- border-color: #1b6d85;
-}
-.btn-info:active,
-.btn-info.active,
-.open > .dropdown-toggle.btn-info {
- background-image: none;
-}
-.btn-info.disabled:hover,
-.btn-info[disabled]:hover,
-fieldset[disabled] .btn-info:hover,
-.btn-info.disabled:focus,
-.btn-info[disabled]:focus,
-fieldset[disabled] .btn-info:focus,
-.btn-info.disabled.focus,
-.btn-info[disabled].focus,
-fieldset[disabled] .btn-info.focus {
- background-color: #5bc0de;
- border-color: #46b8da;
-}
-.btn-info .badge {
- color: #5bc0de;
- background-color: #ffffff;
-}
-.btn-warning {
- color: #ffffff;
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning:focus,
-.btn-warning.focus {
- color: #ffffff;
- background-color: #ec971f;
- border-color: #985f0d;
-}
-.btn-warning:hover {
- color: #ffffff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- color: #ffffff;
- background-color: #ec971f;
- border-color: #d58512;
-}
-.btn-warning:active:hover,
-.btn-warning.active:hover,
-.open > .dropdown-toggle.btn-warning:hover,
-.btn-warning:active:focus,
-.btn-warning.active:focus,
-.open > .dropdown-toggle.btn-warning:focus,
-.btn-warning:active.focus,
-.btn-warning.active.focus,
-.open > .dropdown-toggle.btn-warning.focus {
- color: #ffffff;
- background-color: #d58512;
- border-color: #985f0d;
-}
-.btn-warning:active,
-.btn-warning.active,
-.open > .dropdown-toggle.btn-warning {
- background-image: none;
-}
-.btn-warning.disabled:hover,
-.btn-warning[disabled]:hover,
-fieldset[disabled] .btn-warning:hover,
-.btn-warning.disabled:focus,
-.btn-warning[disabled]:focus,
-fieldset[disabled] .btn-warning:focus,
-.btn-warning.disabled.focus,
-.btn-warning[disabled].focus,
-fieldset[disabled] .btn-warning.focus {
- background-color: #f0ad4e;
- border-color: #eea236;
-}
-.btn-warning .badge {
- color: #f0ad4e;
- background-color: #ffffff;
-}
-.btn-danger {
- color: #ffffff;
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger:focus,
-.btn-danger.focus {
- color: #ffffff;
- background-color: #c9302c;
- border-color: #761c19;
-}
-.btn-danger:hover {
- color: #ffffff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- color: #ffffff;
- background-color: #c9302c;
- border-color: #ac2925;
-}
-.btn-danger:active:hover,
-.btn-danger.active:hover,
-.open > .dropdown-toggle.btn-danger:hover,
-.btn-danger:active:focus,
-.btn-danger.active:focus,
-.open > .dropdown-toggle.btn-danger:focus,
-.btn-danger:active.focus,
-.btn-danger.active.focus,
-.open > .dropdown-toggle.btn-danger.focus {
- color: #ffffff;
- background-color: #ac2925;
- border-color: #761c19;
-}
-.btn-danger:active,
-.btn-danger.active,
-.open > .dropdown-toggle.btn-danger {
- background-image: none;
-}
-.btn-danger.disabled:hover,
-.btn-danger[disabled]:hover,
-fieldset[disabled] .btn-danger:hover,
-.btn-danger.disabled:focus,
-.btn-danger[disabled]:focus,
-fieldset[disabled] .btn-danger:focus,
-.btn-danger.disabled.focus,
-.btn-danger[disabled].focus,
-fieldset[disabled] .btn-danger.focus {
- background-color: #d9534f;
- border-color: #d43f3a;
-}
-.btn-danger .badge {
- color: #d9534f;
- background-color: #ffffff;
-}
-.btn-link {
- color: #337ab7;
- font-weight: normal;
- border-radius: 0;
-}
-.btn-link,
-.btn-link:active,
-.btn-link.active,
-.btn-link[disabled],
-fieldset[disabled] .btn-link {
- background-color: transparent;
- box-shadow: none;
-}
-.btn-link,
-.btn-link:hover,
-.btn-link:focus,
-.btn-link:active {
- border-color: transparent;
-}
-.btn-link:hover,
-.btn-link:focus {
- color: #23527c;
- text-decoration: underline;
- background-color: transparent;
-}
-.btn-link[disabled]:hover,
-fieldset[disabled] .btn-link:hover,
-.btn-link[disabled]:focus,
-fieldset[disabled] .btn-link:focus {
- color: #777777;
- text-decoration: none;
-}
-.btn-lg,
-.btn-group-lg > .btn {
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-.btn-sm,
-.btn-group-sm > .btn {
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-xs,
-.btn-group-xs > .btn {
- padding: 1px 5px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-.btn-block {
- display: block;
- width: 100%;
-}
-.btn-block + .btn-block {
- margin-top: 5px;
-}
-input[type="submit"].btn-block,
-input[type="reset"].btn-block,
-input[type="button"].btn-block {
- width: 100%;
-}
-.fade {
- opacity: 0;
- transition: opacity 0.15s linear;
-}
-.fade.in {
- opacity: 1;
-}
-.collapse {
- display: none;
-}
-.collapse.in {
- display: block;
-}
-tr.collapse.in {
- display: table-row;
-}
-tbody.collapse.in {
- display: table-row-group;
-}
-.collapsing {
- position: relative;
- height: 0;
- overflow: hidden;
- transition-property: height, visibility;
- transition-duration: 0.35s;
- transition-timing-function: ease;
-}
-.caret {
- display: inline-block;
- width: 0;
- height: 0;
- margin-left: 2px;
- vertical-align: middle;
- border-top: 4px dashed;
- border-top: 4px solid \9;
- border-right: 4px solid transparent;
- border-left: 4px solid transparent;
-}
-.dropup,
-.dropdown {
- position: relative;
-}
-.dropdown-toggle:focus {
- outline: 0;
-}
-.dropdown-menu {
- position: absolute;
- top: 100%;
- left: 0;
- z-index: 1000;
- display: none;
- float: left;
- min-width: 160px;
- padding: 5px 0;
- margin: 2px 0 0;
- list-style: none;
- font-size: 14px;
- text-align: left;
- background-color: #ffffff;
- border: 1px solid #cccccc;
- border: 1px solid rgba(0, 0, 0, 0.15);
- border-radius: 4px;
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
- background-clip: padding-box;
-}
-.dropdown-menu.pull-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu .divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.dropdown-menu > li > a {
- display: block;
- padding: 3px 20px;
- clear: both;
- font-weight: normal;
- line-height: 1.42857143;
- color: #333333;
- white-space: nowrap;
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- text-decoration: none;
- color: #262626;
- background-color: #f5f5f5;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- color: #ffffff;
- text-decoration: none;
- outline: 0;
- background-color: #337ab7;
-}
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- color: #777777;
-}
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- text-decoration: none;
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
- cursor: not-allowed;
-}
-.open > .dropdown-menu {
- display: block;
-}
-.open > a {
- outline: 0;
-}
-.dropdown-menu-right {
- left: auto;
- right: 0;
-}
-.dropdown-menu-left {
- left: 0;
- right: auto;
-}
-.dropdown-header {
- display: block;
- padding: 3px 20px;
- font-size: 12px;
- line-height: 1.42857143;
- color: #777777;
- white-space: nowrap;
-}
-.dropdown-backdrop {
- position: fixed;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- z-index: 990;
-}
-.pull-right > .dropdown-menu {
- right: 0;
- left: auto;
-}
-.dropup .caret,
-.navbar-fixed-bottom .dropdown .caret {
- border-top: 0;
- border-bottom: 4px dashed;
- border-bottom: 4px solid \9;
- content: "";
-}
-.dropup .dropdown-menu,
-.navbar-fixed-bottom .dropdown .dropdown-menu {
- top: auto;
- bottom: 100%;
- margin-bottom: 2px;
-}
-@media (min-width: 768px) {
- .navbar-right .dropdown-menu {
- left: auto;
- right: 0;
- }
- .navbar-right .dropdown-menu-left {
- left: 0;
- right: auto;
- }
-}
-.btn-group,
-.btn-group-vertical {
- position: relative;
- display: inline-block;
- vertical-align: middle;
-}
-.btn-group > .btn,
-.btn-group-vertical > .btn {
- position: relative;
- float: left;
-}
-.btn-group > .btn:hover,
-.btn-group-vertical > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group-vertical > .btn:focus,
-.btn-group > .btn:active,
-.btn-group-vertical > .btn:active,
-.btn-group > .btn.active,
-.btn-group-vertical > .btn.active {
- z-index: 2;
-}
-.btn-group .btn + .btn,
-.btn-group .btn + .btn-group,
-.btn-group .btn-group + .btn,
-.btn-group .btn-group + .btn-group {
- margin-left: -1px;
-}
-.btn-toolbar {
- margin-left: -5px;
-}
-.btn-toolbar .btn,
-.btn-toolbar .btn-group,
-.btn-toolbar .input-group {
- float: left;
-}
-.btn-toolbar > .btn,
-.btn-toolbar > .btn-group,
-.btn-toolbar > .input-group {
- margin-left: 5px;
-}
-.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
- border-radius: 0;
-}
-.btn-group > .btn:first-child {
- margin-left: 0;
-}
-.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
- border-bottom-right-radius: 0;
- border-top-right-radius: 0;
-}
-.btn-group > .btn:last-child:not(:first-child),
-.btn-group > .dropdown-toggle:not(:first-child) {
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
-}
-.btn-group > .btn-group {
- float: left;
-}
-.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
- border-radius: 0;
-}
-.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
-.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
- border-bottom-right-radius: 0;
- border-top-right-radius: 0;
-}
-.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
-}
-.btn-group .dropdown-toggle:active,
-.btn-group.open .dropdown-toggle {
- outline: 0;
-}
-.btn-group > .btn + .dropdown-toggle {
- padding-left: 8px;
- padding-right: 8px;
-}
-.btn-group > .btn-lg + .dropdown-toggle {
- padding-left: 12px;
- padding-right: 12px;
-}
-.btn-group.open .dropdown-toggle {
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.btn-group.open .dropdown-toggle.btn-link {
- box-shadow: none;
-}
-.btn .caret {
- margin-left: 0;
-}
-.btn-lg .caret {
- border-width: 5px 5px 0;
- border-bottom-width: 0;
-}
-.dropup .btn-lg .caret {
- border-width: 0 5px 5px;
-}
-.btn-group-vertical > .btn,
-.btn-group-vertical > .btn-group,
-.btn-group-vertical > .btn-group > .btn {
- display: block;
- float: none;
- width: 100%;
- max-width: 100%;
-}
-.btn-group-vertical > .btn-group > .btn {
- float: none;
-}
-.btn-group-vertical > .btn + .btn,
-.btn-group-vertical > .btn + .btn-group,
-.btn-group-vertical > .btn-group + .btn,
-.btn-group-vertical > .btn-group + .btn-group {
- margin-top: -1px;
- margin-left: 0;
-}
-.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
- border-radius: 0;
-}
-.btn-group-vertical > .btn:first-child:not(:last-child) {
- border-top-right-radius: 4px;
- border-top-left-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn:last-child:not(:first-child) {
- border-top-right-radius: 0;
- border-top-left-radius: 0;
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 4px;
-}
-.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
- border-radius: 0;
-}
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
-.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
- border-top-right-radius: 0;
- border-top-left-radius: 0;
-}
-.btn-group-justified {
- display: table;
- width: 100%;
- table-layout: fixed;
- border-collapse: separate;
-}
-.btn-group-justified > .btn,
-.btn-group-justified > .btn-group {
- float: none;
- display: table-cell;
- width: 1%;
-}
-.btn-group-justified > .btn-group .btn {
- width: 100%;
-}
-.btn-group-justified > .btn-group .dropdown-menu {
- left: auto;
-}
-[data-toggle="buttons"] > .btn input[type="radio"],
-[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
-[data-toggle="buttons"] > .btn input[type="checkbox"],
-[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
- position: absolute;
- clip: rect(0, 0, 0, 0);
- pointer-events: none;
-}
-.input-group {
- position: relative;
- display: table;
- border-collapse: separate;
-}
-.input-group[class*="col-"] {
- float: none;
- padding-left: 0;
- padding-right: 0;
-}
-.input-group .form-control {
- position: relative;
- z-index: 2;
- float: left;
- width: 100%;
- margin-bottom: 0;
-}
-.input-group .form-control:focus {
- z-index: 3;
-}
-.input-group-lg > .form-control,
-.input-group-lg > .input-group-addon,
-.input-group-lg > .input-group-btn > .btn {
- height: 46px;
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
- border-radius: 6px;
-}
-select.input-group-lg > .form-control,
-select.input-group-lg > .input-group-addon,
-select.input-group-lg > .input-group-btn > .btn {
- height: 46px;
- line-height: 46px;
-}
-textarea.input-group-lg > .form-control,
-textarea.input-group-lg > .input-group-addon,
-textarea.input-group-lg > .input-group-btn > .btn,
-select[multiple].input-group-lg > .form-control,
-select[multiple].input-group-lg > .input-group-addon,
-select[multiple].input-group-lg > .input-group-btn > .btn {
- height: auto;
-}
-.input-group-sm > .form-control,
-.input-group-sm > .input-group-addon,
-.input-group-sm > .input-group-btn > .btn {
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
-}
-select.input-group-sm > .form-control,
-select.input-group-sm > .input-group-addon,
-select.input-group-sm > .input-group-btn > .btn {
- height: 30px;
- line-height: 30px;
-}
-textarea.input-group-sm > .form-control,
-textarea.input-group-sm > .input-group-addon,
-textarea.input-group-sm > .input-group-btn > .btn,
-select[multiple].input-group-sm > .form-control,
-select[multiple].input-group-sm > .input-group-addon,
-select[multiple].input-group-sm > .input-group-btn > .btn {
- height: auto;
-}
-.input-group-addon,
-.input-group-btn,
-.input-group .form-control {
- display: table-cell;
-}
-.input-group-addon:not(:first-child):not(:last-child),
-.input-group-btn:not(:first-child):not(:last-child),
-.input-group .form-control:not(:first-child):not(:last-child) {
- border-radius: 0;
-}
-.input-group-addon,
-.input-group-btn {
- width: 1%;
- white-space: nowrap;
- vertical-align: middle;
-}
-.input-group-addon {
- padding: 6px 12px;
- font-size: 14px;
- font-weight: normal;
- line-height: 1;
- color: #555555;
- text-align: center;
- background-color: #eeeeee;
- border: 1px solid #cccccc;
- border-radius: 4px;
-}
-.input-group-addon.input-sm {
- padding: 5px 10px;
- font-size: 12px;
- border-radius: 3px;
-}
-.input-group-addon.input-lg {
- padding: 10px 16px;
- font-size: 18px;
- border-radius: 6px;
-}
-.input-group-addon input[type="radio"],
-.input-group-addon input[type="checkbox"] {
- margin-top: 0;
-}
-.input-group .form-control:first-child,
-.input-group-addon:first-child,
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group > .btn,
-.input-group-btn:first-child > .dropdown-toggle,
-.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
-.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
- border-bottom-right-radius: 0;
- border-top-right-radius: 0;
-}
-.input-group-addon:first-child {
- border-right: 0;
-}
-.input-group .form-control:last-child,
-.input-group-addon:last-child,
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group > .btn,
-.input-group-btn:last-child > .dropdown-toggle,
-.input-group-btn:first-child > .btn:not(:first-child),
-.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
-}
-.input-group-addon:last-child {
- border-left: 0;
-}
-.input-group-btn {
- position: relative;
- font-size: 0;
- white-space: nowrap;
-}
-.input-group-btn > .btn {
- position: relative;
-}
-.input-group-btn > .btn + .btn {
- margin-left: -1px;
-}
-.input-group-btn > .btn:hover,
-.input-group-btn > .btn:focus,
-.input-group-btn > .btn:active {
- z-index: 2;
-}
-.input-group-btn:first-child > .btn,
-.input-group-btn:first-child > .btn-group {
- margin-right: -1px;
-}
-.input-group-btn:last-child > .btn,
-.input-group-btn:last-child > .btn-group {
- z-index: 2;
- margin-left: -1px;
-}
-.nav {
- margin-bottom: 0;
- padding-left: 0;
- list-style: none;
-}
-.nav > li {
- position: relative;
- display: block;
-}
-.nav > li > a {
- position: relative;
- display: block;
- padding: 10px 15px;
-}
-.nav > li > a:hover,
-.nav > li > a:focus {
- text-decoration: none;
- background-color: #eeeeee;
-}
-.nav > li.disabled > a {
- color: #777777;
-}
-.nav > li.disabled > a:hover,
-.nav > li.disabled > a:focus {
- color: #777777;
- text-decoration: none;
- background-color: transparent;
- cursor: not-allowed;
-}
-.nav .open > a,
-.nav .open > a:hover,
-.nav .open > a:focus {
- background-color: #eeeeee;
- border-color: #337ab7;
-}
-.nav .nav-divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.nav > li > a > img {
- max-width: none;
-}
-.nav-tabs {
- border-bottom: 1px solid #dddddd;
-}
-.nav-tabs > li {
- float: left;
- margin-bottom: -1px;
-}
-.nav-tabs > li > a {
- margin-right: 2px;
- line-height: 1.42857143;
- border: 1px solid transparent;
- border-radius: 4px 4px 0 0;
-}
-.nav-tabs > li > a:hover {
- border-color: #eeeeee #eeeeee #dddddd;
-}
-.nav-tabs > li.active > a,
-.nav-tabs > li.active > a:hover,
-.nav-tabs > li.active > a:focus {
- color: #555555;
- background-color: #ffffff;
- border: 1px solid #dddddd;
- border-bottom-color: transparent;
- cursor: default;
-}
-.nav-tabs.nav-justified {
- width: 100%;
- border-bottom: 0;
-}
-.nav-tabs.nav-justified > li {
- float: none;
-}
-.nav-tabs.nav-justified > li > a {
- text-align: center;
- margin-bottom: 5px;
-}
-.nav-tabs.nav-justified > .dropdown .dropdown-menu {
- top: auto;
- left: auto;
-}
-@media (min-width: 768px) {
- .nav-tabs.nav-justified > li {
- display: table-cell;
- width: 1%;
- }
- .nav-tabs.nav-justified > li > a {
- margin-bottom: 0;
- }
-}
-.nav-tabs.nav-justified > li > a {
- margin-right: 0;
- border-radius: 4px;
-}
-.nav-tabs.nav-justified > .active > a,
-.nav-tabs.nav-justified > .active > a:hover,
-.nav-tabs.nav-justified > .active > a:focus {
- border: 1px solid #dddddd;
-}
-@media (min-width: 768px) {
- .nav-tabs.nav-justified > li > a {
- border-bottom: 1px solid #dddddd;
- border-radius: 4px 4px 0 0;
- }
- .nav-tabs.nav-justified > .active > a,
- .nav-tabs.nav-justified > .active > a:hover,
- .nav-tabs.nav-justified > .active > a:focus {
- border-bottom-color: #ffffff;
- }
-}
-.nav-pills > li {
- float: left;
-}
-.nav-pills > li > a {
- border-radius: 4px;
-}
-.nav-pills > li + li {
- margin-left: 2px;
-}
-.nav-pills > li.active > a,
-.nav-pills > li.active > a:hover,
-.nav-pills > li.active > a:focus {
- color: #ffffff;
- background-color: #337ab7;
-}
-.nav-stacked > li {
- float: none;
-}
-.nav-stacked > li + li {
- margin-top: 2px;
- margin-left: 0;
-}
-.nav-justified {
- width: 100%;
-}
-.nav-justified > li {
- float: none;
-}
-.nav-justified > li > a {
- text-align: center;
- margin-bottom: 5px;
-}
-.nav-justified > .dropdown .dropdown-menu {
- top: auto;
- left: auto;
-}
-@media (min-width: 768px) {
- .nav-justified > li {
- display: table-cell;
- width: 1%;
- }
- .nav-justified > li > a {
- margin-bottom: 0;
- }
-}
-.nav-tabs-justified {
- border-bottom: 0;
-}
-.nav-tabs-justified > li > a {
- margin-right: 0;
- border-radius: 4px;
-}
-.nav-tabs-justified > .active > a,
-.nav-tabs-justified > .active > a:hover,
-.nav-tabs-justified > .active > a:focus {
- border: 1px solid #dddddd;
-}
-@media (min-width: 768px) {
- .nav-tabs-justified > li > a {
- border-bottom: 1px solid #dddddd;
- border-radius: 4px 4px 0 0;
- }
- .nav-tabs-justified > .active > a,
- .nav-tabs-justified > .active > a:hover,
- .nav-tabs-justified > .active > a:focus {
- border-bottom-color: #ffffff;
- }
-}
-.tab-content > .tab-pane {
- display: none;
-}
-.tab-content > .active {
- display: block;
-}
-.nav-tabs .dropdown-menu {
- margin-top: -1px;
- border-top-right-radius: 0;
- border-top-left-radius: 0;
-}
-.navbar {
- position: relative;
- min-height: 50px;
- margin-bottom: 20px;
- border: 1px solid transparent;
-}
-@media (min-width: 768px) {
- .navbar {
- border-radius: 4px;
- }
-}
-@media (min-width: 768px) {
- .navbar-header {
- float: left;
- }
-}
-.navbar-collapse {
- overflow-x: visible;
- padding-right: 15px;
- padding-left: 15px;
- border-top: 1px solid transparent;
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
- -webkit-overflow-scrolling: touch;
-}
-.navbar-collapse.in {
- overflow-y: auto;
-}
-@media (min-width: 768px) {
- .navbar-collapse {
- width: auto;
- border-top: 0;
- box-shadow: none;
- }
- .navbar-collapse.collapse {
- display: block !important;
- height: auto !important;
- padding-bottom: 0;
- overflow: visible !important;
- }
- .navbar-collapse.in {
- overflow-y: visible;
- }
- .navbar-fixed-top .navbar-collapse,
- .navbar-static-top .navbar-collapse,
- .navbar-fixed-bottom .navbar-collapse {
- padding-left: 0;
- padding-right: 0;
- }
-}
-.navbar-fixed-top .navbar-collapse,
-.navbar-fixed-bottom .navbar-collapse {
- max-height: 340px;
-}
-@media (max-device-width: 480px) and (orientation: landscape) {
- .navbar-fixed-top .navbar-collapse,
- .navbar-fixed-bottom .navbar-collapse {
- max-height: 200px;
- }
-}
-.container > .navbar-header,
-.container-fluid > .navbar-header,
-.container > .navbar-collapse,
-.container-fluid > .navbar-collapse {
- margin-right: -15px;
- margin-left: -15px;
-}
-@media (min-width: 768px) {
- .container > .navbar-header,
- .container-fluid > .navbar-header,
- .container > .navbar-collapse,
- .container-fluid > .navbar-collapse {
- margin-right: 0;
- margin-left: 0;
- }
-}
-.navbar-static-top {
- z-index: 1000;
- border-width: 0 0 1px;
-}
-@media (min-width: 768px) {
- .navbar-static-top {
- border-radius: 0;
- }
-}
-.navbar-fixed-top,
-.navbar-fixed-bottom {
- position: fixed;
- right: 0;
- left: 0;
- z-index: 1030;
-}
-@media (min-width: 768px) {
- .navbar-fixed-top,
- .navbar-fixed-bottom {
- border-radius: 0;
- }
-}
-.navbar-fixed-top {
- top: 0;
- border-width: 0 0 1px;
-}
-.navbar-fixed-bottom {
- bottom: 0;
- margin-bottom: 0;
- border-width: 1px 0 0;
-}
-.navbar-brand {
- float: left;
- padding: 15px 15px;
- font-size: 18px;
- line-height: 20px;
- height: 50px;
-}
-.navbar-brand:hover,
-.navbar-brand:focus {
- text-decoration: none;
-}
-.navbar-brand > img {
- display: block;
-}
-@media (min-width: 768px) {
- .navbar > .container .navbar-brand,
- .navbar > .container-fluid .navbar-brand {
- margin-left: -15px;
- }
-}
-.navbar-toggle {
- position: relative;
- float: right;
- margin-right: 15px;
- padding: 9px 10px;
- margin-top: 8px;
- margin-bottom: 8px;
- background-color: transparent;
- background-image: none;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.navbar-toggle:focus {
- outline: 0;
-}
-.navbar-toggle .icon-bar {
- display: block;
- width: 22px;
- height: 2px;
- border-radius: 1px;
-}
-.navbar-toggle .icon-bar + .icon-bar {
- margin-top: 4px;
-}
-@media (min-width: 768px) {
- .navbar-toggle {
- display: none;
- }
-}
-.navbar-nav {
- margin: 7.5px -15px;
-}
-.navbar-nav > li > a {
- padding-top: 10px;
- padding-bottom: 10px;
- line-height: 20px;
-}
-@media (max-width: 767px) {
- .navbar-nav .open .dropdown-menu {
- position: static;
- float: none;
- width: auto;
- margin-top: 0;
- background-color: transparent;
- border: 0;
- box-shadow: none;
- }
- .navbar-nav .open .dropdown-menu > li > a,
- .navbar-nav .open .dropdown-menu .dropdown-header {
- padding: 5px 15px 5px 25px;
- }
- .navbar-nav .open .dropdown-menu > li > a {
- line-height: 20px;
- }
- .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-nav .open .dropdown-menu > li > a:focus {
- background-image: none;
- }
-}
-@media (min-width: 768px) {
- .navbar-nav {
- float: left;
- margin: 0;
- }
- .navbar-nav > li {
- float: left;
- }
- .navbar-nav > li > a {
- padding-top: 15px;
- padding-bottom: 15px;
- }
-}
-.navbar-form {
- margin-left: -15px;
- margin-right: -15px;
- padding: 10px 15px;
- border-top: 1px solid transparent;
- border-bottom: 1px solid transparent;
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
- margin-top: 8px;
- margin-bottom: 8px;
-}
-@media (min-width: 768px) {
- .navbar-form .form-group {
- display: inline-block;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .form-control {
- display: inline-block;
- width: auto;
- vertical-align: middle;
- }
- .navbar-form .form-control-static {
- display: inline-block;
- }
- .navbar-form .input-group {
- display: inline-table;
- vertical-align: middle;
- }
- .navbar-form .input-group .input-group-addon,
- .navbar-form .input-group .input-group-btn,
- .navbar-form .input-group .form-control {
- width: auto;
- }
- .navbar-form .input-group > .form-control {
- width: 100%;
- }
- .navbar-form .control-label {
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .radio,
- .navbar-form .checkbox {
- display: inline-block;
- margin-top: 0;
- margin-bottom: 0;
- vertical-align: middle;
- }
- .navbar-form .radio label,
- .navbar-form .checkbox label {
- padding-left: 0;
- }
- .navbar-form .radio input[type="radio"],
- .navbar-form .checkbox input[type="checkbox"] {
- position: relative;
- margin-left: 0;
- }
- .navbar-form .has-feedback .form-control-feedback {
- top: 0;
- }
-}
-@media (max-width: 767px) {
- .navbar-form .form-group {
- margin-bottom: 5px;
- }
- .navbar-form .form-group:last-child {
- margin-bottom: 0;
- }
-}
-@media (min-width: 768px) {
- .navbar-form {
- width: auto;
- border: 0;
- margin-left: 0;
- margin-right: 0;
- padding-top: 0;
- padding-bottom: 0;
- box-shadow: none;
- }
-}
-.navbar-nav > li > .dropdown-menu {
- margin-top: 0;
- border-top-right-radius: 0;
- border-top-left-radius: 0;
-}
-.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
- margin-bottom: 0;
- border-top-right-radius: 4px;
- border-top-left-radius: 4px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
-}
-.navbar-btn {
- margin-top: 8px;
- margin-bottom: 8px;
-}
-.navbar-btn.btn-sm {
- margin-top: 10px;
- margin-bottom: 10px;
-}
-.navbar-btn.btn-xs {
- margin-top: 14px;
- margin-bottom: 14px;
-}
-.navbar-text {
- margin-top: 15px;
- margin-bottom: 15px;
-}
-@media (min-width: 768px) {
- .navbar-text {
- float: left;
- margin-left: 15px;
- margin-right: 15px;
- }
-}
-@media (min-width: 768px) {
- .navbar-left {
- float: left !important;
- }
- .navbar-right {
- float: right !important;
- margin-right: -15px;
- }
- .navbar-right ~ .navbar-right {
- margin-right: 0;
- }
-}
-.navbar-default {
- background-color: #f8f8f8;
- border-color: #e7e7e7;
-}
-.navbar-default .navbar-brand {
- color: #777777;
-}
-.navbar-default .navbar-brand:hover,
-.navbar-default .navbar-brand:focus {
- color: #5e5e5e;
- background-color: transparent;
-}
-.navbar-default .navbar-text {
- color: #777777;
-}
-.navbar-default .navbar-nav > li > a {
- color: #777777;
-}
-.navbar-default .navbar-nav > li > a:hover,
-.navbar-default .navbar-nav > li > a:focus {
- color: #333333;
- background-color: transparent;
-}
-.navbar-default .navbar-nav > .active > a,
-.navbar-default .navbar-nav > .active > a:hover,
-.navbar-default .navbar-nav > .active > a:focus {
- color: #555555;
- background-color: #e7e7e7;
-}
-.navbar-default .navbar-nav > .disabled > a,
-.navbar-default .navbar-nav > .disabled > a:hover,
-.navbar-default .navbar-nav > .disabled > a:focus {
- color: #cccccc;
- background-color: transparent;
-}
-.navbar-default .navbar-toggle {
- border-color: #dddddd;
-}
-.navbar-default .navbar-toggle:hover,
-.navbar-default .navbar-toggle:focus {
- background-color: #dddddd;
-}
-.navbar-default .navbar-toggle .icon-bar {
- background-color: #888888;
-}
-.navbar-default .navbar-collapse,
-.navbar-default .navbar-form {
- border-color: #e7e7e7;
-}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .open > a:hover,
-.navbar-default .navbar-nav > .open > a:focus {
- background-color: #e7e7e7;
- color: #555555;
-}
-@media (max-width: 767px) {
- .navbar-default .navbar-nav .open .dropdown-menu > li > a {
- color: #777777;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
- color: #333333;
- background-color: transparent;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #555555;
- background-color: #e7e7e7;
- }
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
- .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
- color: #cccccc;
- background-color: transparent;
- }
-}
-.navbar-default .navbar-link {
- color: #777777;
-}
-.navbar-default .navbar-link:hover {
- color: #333333;
-}
-.navbar-default .btn-link {
- color: #777777;
-}
-.navbar-default .btn-link:hover,
-.navbar-default .btn-link:focus {
- color: #333333;
-}
-.navbar-default .btn-link[disabled]:hover,
-fieldset[disabled] .navbar-default .btn-link:hover,
-.navbar-default .btn-link[disabled]:focus,
-fieldset[disabled] .navbar-default .btn-link:focus {
- color: #cccccc;
-}
-.navbar-inverse {
- background-color: #222222;
- border-color: #080808;
-}
-.navbar-inverse .navbar-brand {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-brand:hover,
-.navbar-inverse .navbar-brand:focus {
- color: #ffffff;
- background-color: transparent;
-}
-.navbar-inverse .navbar-text {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-nav > li > a {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-nav > li > a:hover,
-.navbar-inverse .navbar-nav > li > a:focus {
- color: #ffffff;
- background-color: transparent;
-}
-.navbar-inverse .navbar-nav > .active > a,
-.navbar-inverse .navbar-nav > .active > a:hover,
-.navbar-inverse .navbar-nav > .active > a:focus {
- color: #ffffff;
- background-color: #080808;
-}
-.navbar-inverse .navbar-nav > .disabled > a,
-.navbar-inverse .navbar-nav > .disabled > a:hover,
-.navbar-inverse .navbar-nav > .disabled > a:focus {
- color: #444444;
- background-color: transparent;
-}
-.navbar-inverse .navbar-toggle {
- border-color: #333333;
-}
-.navbar-inverse .navbar-toggle:hover,
-.navbar-inverse .navbar-toggle:focus {
- background-color: #333333;
-}
-.navbar-inverse .navbar-toggle .icon-bar {
- background-color: #ffffff;
-}
-.navbar-inverse .navbar-collapse,
-.navbar-inverse .navbar-form {
- border-color: #101010;
-}
-.navbar-inverse .navbar-nav > .open > a,
-.navbar-inverse .navbar-nav > .open > a:hover,
-.navbar-inverse .navbar-nav > .open > a:focus {
- background-color: #080808;
- color: #ffffff;
-}
-@media (max-width: 767px) {
- .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
- border-color: #080808;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
- background-color: #080808;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
- color: #9d9d9d;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
- .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
- color: #ffffff;
- background-color: transparent;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
- color: #ffffff;
- background-color: #080808;
- }
- .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
- .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
- color: #444444;
- background-color: transparent;
- }
-}
-.navbar-inverse .navbar-link {
- color: #9d9d9d;
-}
-.navbar-inverse .navbar-link:hover {
- color: #ffffff;
-}
-.navbar-inverse .btn-link {
- color: #9d9d9d;
-}
-.navbar-inverse .btn-link:hover,
-.navbar-inverse .btn-link:focus {
- color: #ffffff;
-}
-.navbar-inverse .btn-link[disabled]:hover,
-fieldset[disabled] .navbar-inverse .btn-link:hover,
-.navbar-inverse .btn-link[disabled]:focus,
-fieldset[disabled] .navbar-inverse .btn-link:focus {
- color: #444444;
-}
-.breadcrumb {
- padding: 8px 15px;
- margin-bottom: 20px;
- list-style: none;
- background-color: #f5f5f5;
- border-radius: 4px;
-}
-.breadcrumb > li {
- display: inline-block;
-}
-.breadcrumb > li + li:before {
- content: "/\00a0";
- padding: 0 5px;
- color: #cccccc;
-}
-.breadcrumb > .active {
- color: #777777;
-}
-.pagination {
- display: inline-block;
- padding-left: 0;
- margin: 20px 0;
- border-radius: 4px;
-}
-.pagination > li {
- display: inline;
-}
-.pagination > li > a,
-.pagination > li > span {
- position: relative;
- float: left;
- padding: 6px 12px;
- line-height: 1.42857143;
- text-decoration: none;
- color: #337ab7;
- background-color: #ffffff;
- border: 1px solid #dddddd;
- margin-left: -1px;
-}
-.pagination > li:first-child > a,
-.pagination > li:first-child > span {
- margin-left: 0;
- border-bottom-left-radius: 4px;
- border-top-left-radius: 4px;
-}
-.pagination > li:last-child > a,
-.pagination > li:last-child > span {
- border-bottom-right-radius: 4px;
- border-top-right-radius: 4px;
-}
-.pagination > li > a:hover,
-.pagination > li > span:hover,
-.pagination > li > a:focus,
-.pagination > li > span:focus {
- z-index: 2;
- color: #23527c;
- background-color: #eeeeee;
- border-color: #dddddd;
-}
-.pagination > .active > a,
-.pagination > .active > span,
-.pagination > .active > a:hover,
-.pagination > .active > span:hover,
-.pagination > .active > a:focus,
-.pagination > .active > span:focus {
- z-index: 3;
- color: #ffffff;
- background-color: #337ab7;
- border-color: #337ab7;
- cursor: default;
-}
-.pagination > .disabled > span,
-.pagination > .disabled > span:hover,
-.pagination > .disabled > span:focus,
-.pagination > .disabled > a,
-.pagination > .disabled > a:hover,
-.pagination > .disabled > a:focus {
- color: #777777;
- background-color: #ffffff;
- border-color: #dddddd;
- cursor: not-allowed;
-}
-.pagination-lg > li > a,
-.pagination-lg > li > span {
- padding: 10px 16px;
- font-size: 18px;
- line-height: 1.3333333;
-}
-.pagination-lg > li:first-child > a,
-.pagination-lg > li:first-child > span {
- border-bottom-left-radius: 6px;
- border-top-left-radius: 6px;
-}
-.pagination-lg > li:last-child > a,
-.pagination-lg > li:last-child > span {
- border-bottom-right-radius: 6px;
- border-top-right-radius: 6px;
-}
-.pagination-sm > li > a,
-.pagination-sm > li > span {
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
-}
-.pagination-sm > li:first-child > a,
-.pagination-sm > li:first-child > span {
- border-bottom-left-radius: 3px;
- border-top-left-radius: 3px;
-}
-.pagination-sm > li:last-child > a,
-.pagination-sm > li:last-child > span {
- border-bottom-right-radius: 3px;
- border-top-right-radius: 3px;
-}
-.pager {
- padding-left: 0;
- margin: 20px 0;
- list-style: none;
- text-align: center;
-}
-.pager li {
- display: inline;
-}
-.pager li > a,
-.pager li > span {
- display: inline-block;
- padding: 5px 14px;
- background-color: #ffffff;
- border: 1px solid #dddddd;
- border-radius: 15px;
-}
-.pager li > a:hover,
-.pager li > a:focus {
- text-decoration: none;
- background-color: #eeeeee;
-}
-.pager .next > a,
-.pager .next > span {
- float: right;
-}
-.pager .previous > a,
-.pager .previous > span {
- float: left;
-}
-.pager .disabled > a,
-.pager .disabled > a:hover,
-.pager .disabled > a:focus,
-.pager .disabled > span {
- color: #777777;
- background-color: #ffffff;
- cursor: not-allowed;
-}
-.label {
- display: inline;
- padding: .2em .6em .3em;
- font-size: 75%;
- font-weight: bold;
- line-height: 1;
- color: #ffffff;
- text-align: center;
- white-space: nowrap;
- vertical-align: baseline;
- border-radius: .25em;
-}
-a.label:hover,
-a.label:focus {
- color: #ffffff;
- text-decoration: none;
- cursor: pointer;
-}
-.label:empty {
- display: none;
-}
-.btn .label {
- position: relative;
- top: -1px;
-}
-.label-default {
- background-color: #777777;
-}
-.label-default[href]:hover,
-.label-default[href]:focus {
- background-color: #5e5e5e;
-}
-.label-primary {
- background-color: #337ab7;
-}
-.label-primary[href]:hover,
-.label-primary[href]:focus {
- background-color: #286090;
-}
-.label-success {
- background-color: #5cb85c;
-}
-.label-success[href]:hover,
-.label-success[href]:focus {
- background-color: #449d44;
-}
-.label-info {
- background-color: #5bc0de;
-}
-.label-info[href]:hover,
-.label-info[href]:focus {
- background-color: #31b0d5;
-}
-.label-warning {
- background-color: #f0ad4e;
-}
-.label-warning[href]:hover,
-.label-warning[href]:focus {
- background-color: #ec971f;
-}
-.label-danger {
- background-color: #d9534f;
-}
-.label-danger[href]:hover,
-.label-danger[href]:focus {
- background-color: #c9302c;
-}
-.badge {
- display: inline-block;
- min-width: 10px;
- padding: 3px 7px;
- font-size: 12px;
- font-weight: bold;
- color: #ffffff;
- line-height: 1;
- vertical-align: middle;
- white-space: nowrap;
- text-align: center;
- background-color: #777777;
- border-radius: 10px;
-}
-.badge:empty {
- display: none;
-}
-.btn .badge {
- position: relative;
- top: -1px;
-}
-.btn-xs .badge,
-.btn-group-xs > .btn .badge {
- top: 0;
- padding: 1px 5px;
-}
-a.badge:hover,
-a.badge:focus {
- color: #ffffff;
- text-decoration: none;
- cursor: pointer;
-}
-.list-group-item.active > .badge,
-.nav-pills > .active > a > .badge {
- color: #337ab7;
- background-color: #ffffff;
-}
-.list-group-item > .badge {
- float: right;
-}
-.list-group-item > .badge + .badge {
- margin-right: 5px;
-}
-.nav-pills > li > a > .badge {
- margin-left: 3px;
-}
-.jumbotron {
- padding-top: 30px;
- padding-bottom: 30px;
- margin-bottom: 30px;
- color: inherit;
- background-color: #eeeeee;
-}
-.jumbotron h1,
-.jumbotron .h1 {
- color: inherit;
-}
-.jumbotron p {
- margin-bottom: 15px;
- font-size: 21px;
- font-weight: 200;
-}
-.jumbotron > hr {
- border-top-color: #d5d5d5;
-}
-.container .jumbotron,
-.container-fluid .jumbotron {
- border-radius: 6px;
- padding-left: 15px;
- padding-right: 15px;
-}
-.jumbotron .container {
- max-width: 100%;
-}
-@media screen and (min-width: 768px) {
- .jumbotron {
- padding-top: 48px;
- padding-bottom: 48px;
- }
- .container .jumbotron,
- .container-fluid .jumbotron {
- padding-left: 60px;
- padding-right: 60px;
- }
- .jumbotron h1,
- .jumbotron .h1 {
- font-size: 63px;
- }
-}
-.thumbnail {
- display: block;
- padding: 4px;
- margin-bottom: 20px;
- line-height: 1.42857143;
- background-color: #ffffff;
- border: 1px solid #dddddd;
- border-radius: 4px;
- transition: border 0.2s ease-in-out;
-}
-.thumbnail > img,
-.thumbnail a > img {
- margin-left: auto;
- margin-right: auto;
-}
-a.thumbnail:hover,
-a.thumbnail:focus,
-a.thumbnail.active {
- border-color: #337ab7;
-}
-.thumbnail .caption {
- padding: 9px;
- color: #333333;
-}
-.alert {
- padding: 15px;
- margin-bottom: 20px;
- border: 1px solid transparent;
- border-radius: 4px;
-}
-.alert h4 {
- margin-top: 0;
- color: inherit;
-}
-.alert .alert-link {
- font-weight: bold;
-}
-.alert > p,
-.alert > ul {
- margin-bottom: 0;
-}
-.alert > p + p {
- margin-top: 5px;
-}
-.alert-dismissable,
-.alert-dismissible {
- padding-right: 35px;
-}
-.alert-dismissable .close,
-.alert-dismissible .close {
- position: relative;
- top: -2px;
- right: -21px;
- color: inherit;
-}
-.alert-success {
- background-color: #dff0d8;
- border-color: #d6e9c6;
- color: #3c763d;
-}
-.alert-success hr {
- border-top-color: #c9e2b3;
-}
-.alert-success .alert-link {
- color: #2b542c;
-}
-.alert-info {
- background-color: #d9edf7;
- border-color: #bce8f1;
- color: #31708f;
-}
-.alert-info hr {
- border-top-color: #a6e1ec;
-}
-.alert-info .alert-link {
- color: #245269;
-}
-.alert-warning {
- background-color: #fcf8e3;
- border-color: #faebcc;
- color: #8a6d3b;
-}
-.alert-warning hr {
- border-top-color: #f7e1b5;
-}
-.alert-warning .alert-link {
- color: #66512c;
-}
-.alert-danger {
- background-color: #f2dede;
- border-color: #ebccd1;
- color: #a94442;
-}
-.alert-danger hr {
- border-top-color: #e4b9c0;
-}
-.alert-danger .alert-link {
- color: #843534;
-}
-@-webkit-keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-@keyframes progress-bar-stripes {
- from {
- background-position: 40px 0;
- }
- to {
- background-position: 0 0;
- }
-}
-.progress {
- overflow: hidden;
- height: 20px;
- margin-bottom: 20px;
- background-color: #f5f5f5;
- border-radius: 4px;
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-}
-.progress-bar {
- float: left;
- width: 0%;
- height: 100%;
- font-size: 12px;
- line-height: 20px;
- color: #ffffff;
- text-align: center;
- background-color: #337ab7;
- box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
- transition: width 0.6s ease;
-}
-.progress-striped .progress-bar,
-.progress-bar-striped {
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
- background-size: 40px 40px;
-}
-.progress.active .progress-bar,
-.progress-bar.active {
- -webkit-animation: progress-bar-stripes 2s linear infinite;
- animation: progress-bar-stripes 2s linear infinite;
-}
-.progress-bar-success {
- background-color: #5cb85c;
-}
-.progress-striped .progress-bar-success {
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-.progress-bar-info {
- background-color: #5bc0de;
-}
-.progress-striped .progress-bar-info {
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-.progress-bar-warning {
- background-color: #f0ad4e;
-}
-.progress-striped .progress-bar-warning {
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-.progress-bar-danger {
- background-color: #d9534f;
-}
-.progress-striped .progress-bar-danger {
- background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-}
-.media {
- margin-top: 15px;
-}
-.media:first-child {
- margin-top: 0;
-}
-.media,
-.media-body {
- zoom: 1;
- overflow: hidden;
-}
-.media-body {
- width: 10000px;
-}
-.media-object {
- display: block;
-}
-.media-object.img-thumbnail {
- max-width: none;
-}
-.media-right,
-.media > .pull-right {
- padding-left: 10px;
-}
-.media-left,
-.media > .pull-left {
- padding-right: 10px;
-}
-.media-left,
-.media-right,
-.media-body {
- display: table-cell;
- vertical-align: top;
-}
-.media-middle {
- vertical-align: middle;
-}
-.media-bottom {
- vertical-align: bottom;
-}
-.media-heading {
- margin-top: 0;
- margin-bottom: 5px;
-}
-.media-list {
- padding-left: 0;
- list-style: none;
-}
-.list-group {
- margin-bottom: 20px;
- padding-left: 0;
-}
-.list-group-item {
- position: relative;
- display: block;
- padding: 10px 15px;
- margin-bottom: -1px;
- background-color: #ffffff;
- border: 1px solid #dddddd;
-}
-.list-group-item:first-child {
- border-top-right-radius: 4px;
- border-top-left-radius: 4px;
-}
-.list-group-item:last-child {
- margin-bottom: 0;
- border-bottom-right-radius: 4px;
- border-bottom-left-radius: 4px;
-}
-a.list-group-item,
-button.list-group-item {
- color: #555555;
-}
-a.list-group-item .list-group-item-heading,
-button.list-group-item .list-group-item-heading {
- color: #333333;
-}
-a.list-group-item:hover,
-button.list-group-item:hover,
-a.list-group-item:focus,
-button.list-group-item:focus {
- text-decoration: none;
- color: #555555;
- background-color: #f5f5f5;
-}
-button.list-group-item {
- width: 100%;
- text-align: left;
-}
-.list-group-item.disabled,
-.list-group-item.disabled:hover,
-.list-group-item.disabled:focus {
- background-color: #eeeeee;
- color: #777777;
- cursor: not-allowed;
-}
-.list-group-item.disabled .list-group-item-heading,
-.list-group-item.disabled:hover .list-group-item-heading,
-.list-group-item.disabled:focus .list-group-item-heading {
- color: inherit;
-}
-.list-group-item.disabled .list-group-item-text,
-.list-group-item.disabled:hover .list-group-item-text,
-.list-group-item.disabled:focus .list-group-item-text {
- color: #777777;
-}
-.list-group-item.active,
-.list-group-item.active:hover,
-.list-group-item.active:focus {
- z-index: 2;
- color: #ffffff;
- background-color: #337ab7;
- border-color: #337ab7;
-}
-.list-group-item.active .list-group-item-heading,
-.list-group-item.active:hover .list-group-item-heading,
-.list-group-item.active:focus .list-group-item-heading,
-.list-group-item.active .list-group-item-heading > small,
-.list-group-item.active:hover .list-group-item-heading > small,
-.list-group-item.active:focus .list-group-item-heading > small,
-.list-group-item.active .list-group-item-heading > .small,
-.list-group-item.active:hover .list-group-item-heading > .small,
-.list-group-item.active:focus .list-group-item-heading > .small {
- color: inherit;
-}
-.list-group-item.active .list-group-item-text,
-.list-group-item.active:hover .list-group-item-text,
-.list-group-item.active:focus .list-group-item-text {
- color: #c7ddef;
-}
-.list-group-item-success {
- color: #3c763d;
- background-color: #dff0d8;
-}
-a.list-group-item-success,
-button.list-group-item-success {
- color: #3c763d;
-}
-a.list-group-item-success .list-group-item-heading,
-button.list-group-item-success .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-success:hover,
-button.list-group-item-success:hover,
-a.list-group-item-success:focus,
-button.list-group-item-success:focus {
- color: #3c763d;
- background-color: #d0e9c6;
-}
-a.list-group-item-success.active,
-button.list-group-item-success.active,
-a.list-group-item-success.active:hover,
-button.list-group-item-success.active:hover,
-a.list-group-item-success.active:focus,
-button.list-group-item-success.active:focus {
- color: #fff;
- background-color: #3c763d;
- border-color: #3c763d;
-}
-.list-group-item-info {
- color: #31708f;
- background-color: #d9edf7;
-}
-a.list-group-item-info,
-button.list-group-item-info {
- color: #31708f;
-}
-a.list-group-item-info .list-group-item-heading,
-button.list-group-item-info .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-info:hover,
-button.list-group-item-info:hover,
-a.list-group-item-info:focus,
-button.list-group-item-info:focus {
- color: #31708f;
- background-color: #c4e3f3;
-}
-a.list-group-item-info.active,
-button.list-group-item-info.active,
-a.list-group-item-info.active:hover,
-button.list-group-item-info.active:hover,
-a.list-group-item-info.active:focus,
-button.list-group-item-info.active:focus {
- color: #fff;
- background-color: #31708f;
- border-color: #31708f;
-}
-.list-group-item-warning {
- color: #8a6d3b;
- background-color: #fcf8e3;
-}
-a.list-group-item-warning,
-button.list-group-item-warning {
- color: #8a6d3b;
-}
-a.list-group-item-warning .list-group-item-heading,
-button.list-group-item-warning .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-warning:hover,
-button.list-group-item-warning:hover,
-a.list-group-item-warning:focus,
-button.list-group-item-warning:focus {
- color: #8a6d3b;
- background-color: #faf2cc;
-}
-a.list-group-item-warning.active,
-button.list-group-item-warning.active,
-a.list-group-item-warning.active:hover,
-button.list-group-item-warning.active:hover,
-a.list-group-item-warning.active:focus,
-button.list-group-item-warning.active:focus {
- color: #fff;
- background-color: #8a6d3b;
- border-color: #8a6d3b;
-}
-.list-group-item-danger {
- color: #a94442;
- background-color: #f2dede;
-}
-a.list-group-item-danger,
-button.list-group-item-danger {
- color: #a94442;
-}
-a.list-group-item-danger .list-group-item-heading,
-button.list-group-item-danger .list-group-item-heading {
- color: inherit;
-}
-a.list-group-item-danger:hover,
-button.list-group-item-danger:hover,
-a.list-group-item-danger:focus,
-button.list-group-item-danger:focus {
- color: #a94442;
- background-color: #ebcccc;
-}
-a.list-group-item-danger.active,
-button.list-group-item-danger.active,
-a.list-group-item-danger.active:hover,
-button.list-group-item-danger.active:hover,
-a.list-group-item-danger.active:focus,
-button.list-group-item-danger.active:focus {
- color: #fff;
- background-color: #a94442;
- border-color: #a94442;
-}
-.list-group-item-heading {
- margin-top: 0;
- margin-bottom: 5px;
-}
-.list-group-item-text {
- margin-bottom: 0;
- line-height: 1.3;
-}
-.panel {
- margin-bottom: 20px;
- background-color: #ffffff;
- border: 1px solid transparent;
- border-radius: 4px;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-.panel-body {
- padding: 15px;
-}
-.panel-heading {
- padding: 10px 15px;
- border-bottom: 1px solid transparent;
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
-}
-.panel-heading > .dropdown .dropdown-toggle {
- color: inherit;
-}
-.panel-title {
- margin-top: 0;
- margin-bottom: 0;
- font-size: 16px;
- color: inherit;
-}
-.panel-title > a,
-.panel-title > small,
-.panel-title > .small,
-.panel-title > small > a,
-.panel-title > .small > a {
- color: inherit;
-}
-.panel-footer {
- padding: 10px 15px;
- background-color: #f5f5f5;
- border-top: 1px solid #dddddd;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .list-group,
-.panel > .panel-collapse > .list-group {
- margin-bottom: 0;
-}
-.panel > .list-group .list-group-item,
-.panel > .panel-collapse > .list-group .list-group-item {
- border-width: 1px 0;
- border-radius: 0;
-}
-.panel > .list-group:first-child .list-group-item:first-child,
-.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
- border-top: 0;
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
-}
-.panel > .list-group:last-child .list-group-item:last-child,
-.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
- border-bottom: 0;
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
- border-top-right-radius: 0;
- border-top-left-radius: 0;
-}
-.panel-heading + .list-group .list-group-item:first-child {
- border-top-width: 0;
-}
-.list-group + .panel-footer {
- border-top-width: 0;
-}
-.panel > .table,
-.panel > .table-responsive > .table,
-.panel > .panel-collapse > .table {
- margin-bottom: 0;
-}
-.panel > .table caption,
-.panel > .table-responsive > .table caption,
-.panel > .panel-collapse > .table caption {
- padding-left: 15px;
- padding-right: 15px;
-}
-.panel > .table:first-child,
-.panel > .table-responsive:first-child > .table:first-child {
- border-top-right-radius: 3px;
- border-top-left-radius: 3px;
-}
-.panel > .table:first-child > thead:first-child > tr:first-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
- border-top-left-radius: 3px;
- border-top-right-radius: 3px;
-}
-.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
-.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
- border-top-left-radius: 3px;
-}
-.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
-.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
-.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
-.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
-.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
- border-top-right-radius: 3px;
-}
-.panel > .table:last-child,
-.panel > .table-responsive:last-child > .table:last-child {
- border-bottom-right-radius: 3px;
- border-bottom-left-radius: 3px;
-}
-.panel > .table:last-child > tbody:last-child > tr:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
- border-bottom-left-radius: 3px;
- border-bottom-right-radius: 3px;
-}
-.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
-.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
- border-bottom-left-radius: 3px;
-}
-.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
-.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
-.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
-.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
- border-bottom-right-radius: 3px;
-}
-.panel > .panel-body + .table,
-.panel > .panel-body + .table-responsive,
-.panel > .table + .panel-body,
-.panel > .table-responsive + .panel-body {
- border-top: 1px solid #dddddd;
-}
-.panel > .table > tbody:first-child > tr:first-child th,
-.panel > .table > tbody:first-child > tr:first-child td {
- border-top: 0;
-}
-.panel > .table-bordered,
-.panel > .table-responsive > .table-bordered {
- border: 0;
-}
-.panel > .table-bordered > thead > tr > th:first-child,
-.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
-.panel > .table-bordered > tbody > tr > th:first-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
-.panel > .table-bordered > tfoot > tr > th:first-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
-.panel > .table-bordered > thead > tr > td:first-child,
-.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
-.panel > .table-bordered > tbody > tr > td:first-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
-.panel > .table-bordered > tfoot > tr > td:first-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
- border-left: 0;
-}
-.panel > .table-bordered > thead > tr > th:last-child,
-.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
-.panel > .table-bordered > tbody > tr > th:last-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
-.panel > .table-bordered > tfoot > tr > th:last-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
-.panel > .table-bordered > thead > tr > td:last-child,
-.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
-.panel > .table-bordered > tbody > tr > td:last-child,
-.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
-.panel > .table-bordered > tfoot > tr > td:last-child,
-.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
- border-right: 0;
-}
-.panel > .table-bordered > thead > tr:first-child > td,
-.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
-.panel > .table-bordered > tbody > tr:first-child > td,
-.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
-.panel > .table-bordered > thead > tr:first-child > th,
-.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
-.panel > .table-bordered > tbody > tr:first-child > th,
-.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
- border-bottom: 0;
-}
-.panel > .table-bordered > tbody > tr:last-child > td,
-.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
-.panel > .table-bordered > tfoot > tr:last-child > td,
-.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
-.panel > .table-bordered > tbody > tr:last-child > th,
-.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
-.panel > .table-bordered > tfoot > tr:last-child > th,
-.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
- border-bottom: 0;
-}
-.panel > .table-responsive {
- border: 0;
- margin-bottom: 0;
-}
-.panel-group {
- margin-bottom: 20px;
-}
-.panel-group .panel {
- margin-bottom: 0;
- border-radius: 4px;
-}
-.panel-group .panel + .panel {
- margin-top: 5px;
-}
-.panel-group .panel-heading {
- border-bottom: 0;
-}
-.panel-group .panel-heading + .panel-collapse > .panel-body,
-.panel-group .panel-heading + .panel-collapse > .list-group {
- border-top: 1px solid #dddddd;
-}
-.panel-group .panel-footer {
- border-top: 0;
-}
-.panel-group .panel-footer + .panel-collapse .panel-body {
- border-bottom: 1px solid #dddddd;
-}
-.panel-default {
- border-color: #dddddd;
-}
-.panel-default > .panel-heading {
- color: #333333;
- background-color: #f5f5f5;
- border-color: #dddddd;
-}
-.panel-default > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #dddddd;
-}
-.panel-default > .panel-heading .badge {
- color: #f5f5f5;
- background-color: #333333;
-}
-.panel-default > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #dddddd;
-}
-.panel-primary {
- border-color: #337ab7;
-}
-.panel-primary > .panel-heading {
- color: #ffffff;
- background-color: #337ab7;
- border-color: #337ab7;
-}
-.panel-primary > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #337ab7;
-}
-.panel-primary > .panel-heading .badge {
- color: #337ab7;
- background-color: #ffffff;
-}
-.panel-primary > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #337ab7;
-}
-.panel-success {
- border-color: #d6e9c6;
-}
-.panel-success > .panel-heading {
- color: #3c763d;
- background-color: #dff0d8;
- border-color: #d6e9c6;
-}
-.panel-success > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #d6e9c6;
-}
-.panel-success > .panel-heading .badge {
- color: #dff0d8;
- background-color: #3c763d;
-}
-.panel-success > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #d6e9c6;
-}
-.panel-info {
- border-color: #bce8f1;
-}
-.panel-info > .panel-heading {
- color: #31708f;
- background-color: #d9edf7;
- border-color: #bce8f1;
-}
-.panel-info > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #bce8f1;
-}
-.panel-info > .panel-heading .badge {
- color: #d9edf7;
- background-color: #31708f;
-}
-.panel-info > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #bce8f1;
-}
-.panel-warning {
- border-color: #faebcc;
-}
-.panel-warning > .panel-heading {
- color: #8a6d3b;
- background-color: #fcf8e3;
- border-color: #faebcc;
-}
-.panel-warning > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #faebcc;
-}
-.panel-warning > .panel-heading .badge {
- color: #fcf8e3;
- background-color: #8a6d3b;
-}
-.panel-warning > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #faebcc;
-}
-.panel-danger {
- border-color: #ebccd1;
-}
-.panel-danger > .panel-heading {
- color: #a94442;
- background-color: #f2dede;
- border-color: #ebccd1;
-}
-.panel-danger > .panel-heading + .panel-collapse > .panel-body {
- border-top-color: #ebccd1;
-}
-.panel-danger > .panel-heading .badge {
- color: #f2dede;
- background-color: #a94442;
-}
-.panel-danger > .panel-footer + .panel-collapse > .panel-body {
- border-bottom-color: #ebccd1;
-}
-.embed-responsive {
- position: relative;
- display: block;
- height: 0;
- padding: 0;
- overflow: hidden;
-}
-.embed-responsive .embed-responsive-item,
-.embed-responsive iframe,
-.embed-responsive embed,
-.embed-responsive object,
-.embed-responsive video {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- height: 100%;
- width: 100%;
- border: 0;
-}
-.embed-responsive-16by9 {
- padding-bottom: 56.25%;
-}
-.embed-responsive-4by3 {
- padding-bottom: 75%;
-}
-.well {
- min-height: 20px;
- padding: 19px;
- margin-bottom: 20px;
- background-color: #f5f5f5;
- border: 1px solid #e3e3e3;
- border-radius: 4px;
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-.well blockquote {
- border-color: #ddd;
- border-color: rgba(0, 0, 0, 0.15);
-}
-.well-lg {
- padding: 24px;
- border-radius: 6px;
-}
-.well-sm {
- padding: 9px;
- border-radius: 3px;
-}
-.close {
- float: right;
- font-size: 21px;
- font-weight: bold;
- line-height: 1;
- color: #000000;
- text-shadow: 0 1px 0 #ffffff;
- opacity: 0.2;
- filter: alpha(opacity=20);
-}
-.close:hover,
-.close:focus {
- color: #000000;
- text-decoration: none;
- cursor: pointer;
- opacity: 0.5;
- filter: alpha(opacity=50);
-}
-button.close {
- padding: 0;
- cursor: pointer;
- background: transparent;
- border: 0;
- -webkit-appearance: none;
-}
-.modal-open {
- overflow: hidden;
-}
-.modal {
- display: none;
- overflow: hidden;
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1050;
- -webkit-overflow-scrolling: touch;
- outline: 0;
-}
-.modal.fade .modal-dialog {
- -webkit-transform: translate(0, -25%);
- transform: translate(0, -25%);
- transition: -webkit-transform 0.3s ease-out;
- transition: transform 0.3s ease-out;
-}
-.modal.in .modal-dialog {
- -webkit-transform: translate(0, 0);
- transform: translate(0, 0);
-}
-.modal-open .modal {
- overflow-x: hidden;
- overflow-y: auto;
-}
-.modal-dialog {
- position: relative;
- width: auto;
- margin: 10px;
-}
-.modal-content {
- position: relative;
- background-color: #ffffff;
- border: 1px solid #999999;
- border: 1px solid rgba(0, 0, 0, 0.2);
- border-radius: 6px;
- box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
- background-clip: padding-box;
- outline: 0;
-}
-.modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 1040;
- background-color: #000000;
-}
-.modal-backdrop.fade {
- opacity: 0;
- filter: alpha(opacity=0);
-}
-.modal-backdrop.in {
- opacity: 0.5;
- filter: alpha(opacity=50);
-}
-.modal-header {
- padding: 15px;
- border-bottom: 1px solid #e5e5e5;
-}
-.modal-header .close {
- margin-top: -2px;
-}
-.modal-title {
- margin: 0;
- line-height: 1.42857143;
-}
-.modal-body {
- position: relative;
- padding: 15px;
-}
-.modal-footer {
- padding: 15px;
- text-align: right;
- border-top: 1px solid #e5e5e5;
-}
-.modal-footer .btn + .btn {
- margin-left: 5px;
- margin-bottom: 0;
-}
-.modal-footer .btn-group .btn + .btn {
- margin-left: -1px;
-}
-.modal-footer .btn-block + .btn-block {
- margin-left: 0;
-}
-.modal-scrollbar-measure {
- position: absolute;
- top: -9999px;
- width: 50px;
- height: 50px;
- overflow: scroll;
-}
-@media (min-width: 768px) {
- .modal-dialog {
- width: 600px;
- margin: 30px auto;
- }
- .modal-content {
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
- }
- .modal-sm {
- width: 300px;
- }
-}
-@media (min-width: 992px) {
- .modal-lg {
- width: 900px;
- }
-}
-.tooltip {
- position: absolute;
- z-index: 1070;
- display: block;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-style: normal;
- font-weight: normal;
- letter-spacing: normal;
- line-break: auto;
- line-height: 1.42857143;
- text-align: left;
- text-align: start;
- text-decoration: none;
- text-shadow: none;
- text-transform: none;
- white-space: normal;
- word-break: normal;
- word-spacing: normal;
- word-wrap: normal;
- font-size: 12px;
- opacity: 0;
- filter: alpha(opacity=0);
-}
-.tooltip.in {
- opacity: 0.9;
- filter: alpha(opacity=90);
-}
-.tooltip.top {
- margin-top: -3px;
- padding: 5px 0;
-}
-.tooltip.right {
- margin-left: 3px;
- padding: 0 5px;
-}
-.tooltip.bottom {
- margin-top: 3px;
- padding: 5px 0;
-}
-.tooltip.left {
- margin-left: -3px;
- padding: 0 5px;
-}
-.tooltip-inner {
- max-width: 200px;
- padding: 3px 8px;
- color: #ffffff;
- text-align: center;
- background-color: #000000;
- border-radius: 4px;
-}
-.tooltip-arrow {
- position: absolute;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-.tooltip.top .tooltip-arrow {
- bottom: 0;
- left: 50%;
- margin-left: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000000;
-}
-.tooltip.top-left .tooltip-arrow {
- bottom: 0;
- right: 5px;
- margin-bottom: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000000;
-}
-.tooltip.top-right .tooltip-arrow {
- bottom: 0;
- left: 5px;
- margin-bottom: -5px;
- border-width: 5px 5px 0;
- border-top-color: #000000;
-}
-.tooltip.right .tooltip-arrow {
- top: 50%;
- left: 0;
- margin-top: -5px;
- border-width: 5px 5px 5px 0;
- border-right-color: #000000;
-}
-.tooltip.left .tooltip-arrow {
- top: 50%;
- right: 0;
- margin-top: -5px;
- border-width: 5px 0 5px 5px;
- border-left-color: #000000;
-}
-.tooltip.bottom .tooltip-arrow {
- top: 0;
- left: 50%;
- margin-left: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000000;
-}
-.tooltip.bottom-left .tooltip-arrow {
- top: 0;
- right: 5px;
- margin-top: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000000;
-}
-.tooltip.bottom-right .tooltip-arrow {
- top: 0;
- left: 5px;
- margin-top: -5px;
- border-width: 0 5px 5px;
- border-bottom-color: #000000;
-}
-.popover {
- position: absolute;
- top: 0;
- left: 0;
- z-index: 1060;
- display: none;
- max-width: 276px;
- padding: 1px;
- font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
- font-style: normal;
- font-weight: normal;
- letter-spacing: normal;
- line-break: auto;
- line-height: 1.42857143;
- text-align: left;
- text-align: start;
- text-decoration: none;
- text-shadow: none;
- text-transform: none;
- white-space: normal;
- word-break: normal;
- word-spacing: normal;
- word-wrap: normal;
- font-size: 14px;
- background-color: #ffffff;
- background-clip: padding-box;
- border: 1px solid #cccccc;
- border: 1px solid rgba(0, 0, 0, 0.2);
- border-radius: 6px;
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-}
-.popover.top {
- margin-top: -10px;
-}
-.popover.right {
- margin-left: 10px;
-}
-.popover.bottom {
- margin-top: 10px;
-}
-.popover.left {
- margin-left: -10px;
-}
-.popover-title {
- margin: 0;
- padding: 8px 14px;
- font-size: 14px;
- background-color: #f7f7f7;
- border-bottom: 1px solid #ebebeb;
- border-radius: 5px 5px 0 0;
-}
-.popover-content {
- padding: 9px 14px;
-}
-.popover > .arrow,
-.popover > .arrow:after {
- position: absolute;
- display: block;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-.popover > .arrow {
- border-width: 11px;
-}
-.popover > .arrow:after {
- border-width: 10px;
- content: "";
-}
-.popover.top > .arrow {
- left: 50%;
- margin-left: -11px;
- border-bottom-width: 0;
- border-top-color: #999999;
- border-top-color: rgba(0, 0, 0, 0.25);
- bottom: -11px;
-}
-.popover.top > .arrow:after {
- content: " ";
- bottom: 1px;
- margin-left: -10px;
- border-bottom-width: 0;
- border-top-color: #ffffff;
-}
-.popover.right > .arrow {
- top: 50%;
- left: -11px;
- margin-top: -11px;
- border-left-width: 0;
- border-right-color: #999999;
- border-right-color: rgba(0, 0, 0, 0.25);
-}
-.popover.right > .arrow:after {
- content: " ";
- left: 1px;
- bottom: -10px;
- border-left-width: 0;
- border-right-color: #ffffff;
-}
-.popover.bottom > .arrow {
- left: 50%;
- margin-left: -11px;
- border-top-width: 0;
- border-bottom-color: #999999;
- border-bottom-color: rgba(0, 0, 0, 0.25);
- top: -11px;
-}
-.popover.bottom > .arrow:after {
- content: " ";
- top: 1px;
- margin-left: -10px;
- border-top-width: 0;
- border-bottom-color: #ffffff;
-}
-.popover.left > .arrow {
- top: 50%;
- right: -11px;
- margin-top: -11px;
- border-right-width: 0;
- border-left-color: #999999;
- border-left-color: rgba(0, 0, 0, 0.25);
-}
-.popover.left > .arrow:after {
- content: " ";
- right: 1px;
- border-right-width: 0;
- border-left-color: #ffffff;
- bottom: -10px;
-}
-.carousel {
- position: relative;
-}
-.carousel-inner {
- position: relative;
- overflow: hidden;
- width: 100%;
-}
-.carousel-inner > .item {
- display: none;
- position: relative;
- transition: 0.6s ease-in-out left;
-}
-.carousel-inner > .item > img,
-.carousel-inner > .item > a > img {
- line-height: 1;
-}
-@media all and (transform-3d), (-webkit-transform-3d) {
- .carousel-inner > .item {
- transition: -webkit-transform 0.6s ease-in-out;
- transition: transform 0.6s ease-in-out;
- -webkit-backface-visibility: hidden;
- backface-visibility: hidden;
- -webkit-perspective: 1000px;
- perspective: 1000px;
- }
- .carousel-inner > .item.next,
- .carousel-inner > .item.active.right {
- -webkit-transform: translate3d(100%, 0, 0);
- transform: translate3d(100%, 0, 0);
- left: 0;
- }
- .carousel-inner > .item.prev,
- .carousel-inner > .item.active.left {
- -webkit-transform: translate3d(-100%, 0, 0);
- transform: translate3d(-100%, 0, 0);
- left: 0;
- }
- .carousel-inner > .item.next.left,
- .carousel-inner > .item.prev.right,
- .carousel-inner > .item.active {
- -webkit-transform: translate3d(0, 0, 0);
- transform: translate3d(0, 0, 0);
- left: 0;
- }
-}
-.carousel-inner > .active,
-.carousel-inner > .next,
-.carousel-inner > .prev {
- display: block;
-}
-.carousel-inner > .active {
- left: 0;
-}
-.carousel-inner > .next,
-.carousel-inner > .prev {
- position: absolute;
- top: 0;
- width: 100%;
-}
-.carousel-inner > .next {
- left: 100%;
-}
-.carousel-inner > .prev {
- left: -100%;
-}
-.carousel-inner > .next.left,
-.carousel-inner > .prev.right {
- left: 0;
-}
-.carousel-inner > .active.left {
- left: -100%;
-}
-.carousel-inner > .active.right {
- left: 100%;
-}
-.carousel-control {
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- width: 15%;
- opacity: 0.5;
- filter: alpha(opacity=50);
- font-size: 20px;
- color: #ffffff;
- text-align: center;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
- background-color: rgba(0, 0, 0, 0);
-}
-.carousel-control.left {
- background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
-}
-.carousel-control.right {
- left: auto;
- right: 0;
- background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
- background-repeat: repeat-x;
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
-}
-.carousel-control:hover,
-.carousel-control:focus {
- outline: 0;
- color: #ffffff;
- text-decoration: none;
- opacity: 0.9;
- filter: alpha(opacity=90);
-}
-.carousel-control .icon-prev,
-.carousel-control .icon-next,
-.carousel-control .glyphicon-chevron-left,
-.carousel-control .glyphicon-chevron-right {
- position: absolute;
- top: 50%;
- margin-top: -10px;
- z-index: 5;
- display: inline-block;
-}
-.carousel-control .icon-prev,
-.carousel-control .glyphicon-chevron-left {
- left: 50%;
- margin-left: -10px;
-}
-.carousel-control .icon-next,
-.carousel-control .glyphicon-chevron-right {
- right: 50%;
- margin-right: -10px;
-}
-.carousel-control .icon-prev,
-.carousel-control .icon-next {
- width: 20px;
- height: 20px;
- line-height: 1;
- font-family: serif;
-}
-.carousel-control .icon-prev:before {
- content: '\2039';
-}
-.carousel-control .icon-next:before {
- content: '\203a';
-}
-.carousel-indicators {
- position: absolute;
- bottom: 10px;
- left: 50%;
- z-index: 15;
- width: 60%;
- margin-left: -30%;
- padding-left: 0;
- list-style: none;
- text-align: center;
-}
-.carousel-indicators li {
- display: inline-block;
- width: 10px;
- height: 10px;
- margin: 1px;
- text-indent: -999px;
- border: 1px solid #ffffff;
- border-radius: 10px;
- cursor: pointer;
- background-color: #000 \9;
- background-color: rgba(0, 0, 0, 0);
-}
-.carousel-indicators .active {
- margin: 0;
- width: 12px;
- height: 12px;
- background-color: #ffffff;
-}
-.carousel-caption {
- position: absolute;
- left: 15%;
- right: 15%;
- bottom: 20px;
- z-index: 10;
- padding-top: 20px;
- padding-bottom: 20px;
- color: #ffffff;
- text-align: center;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
-}
-.carousel-caption .btn {
- text-shadow: none;
-}
-@media screen and (min-width: 768px) {
- .carousel-control .glyphicon-chevron-left,
- .carousel-control .glyphicon-chevron-right,
- .carousel-control .icon-prev,
- .carousel-control .icon-next {
- width: 30px;
- height: 30px;
- margin-top: -10px;
- font-size: 30px;
- }
- .carousel-control .glyphicon-chevron-left,
- .carousel-control .icon-prev {
- margin-left: -10px;
- }
- .carousel-control .glyphicon-chevron-right,
- .carousel-control .icon-next {
- margin-right: -10px;
- }
- .carousel-caption {
- left: 20%;
- right: 20%;
- padding-bottom: 30px;
- }
- .carousel-indicators {
- bottom: 20px;
- }
-}
-.clearfix:before,
-.clearfix:after,
-.dl-horizontal dd:before,
-.dl-horizontal dd:after,
-.container:before,
-.container:after,
-.container-fluid:before,
-.container-fluid:after,
-.row:before,
-.row:after,
-.form-horizontal .form-group:before,
-.form-horizontal .form-group:after,
-.btn-toolbar:before,
-.btn-toolbar:after,
-.btn-group-vertical > .btn-group:before,
-.btn-group-vertical > .btn-group:after,
-.nav:before,
-.nav:after,
-.navbar:before,
-.navbar:after,
-.navbar-header:before,
-.navbar-header:after,
-.navbar-collapse:before,
-.navbar-collapse:after,
-.pager:before,
-.pager:after,
-.panel-body:before,
-.panel-body:after,
-.modal-header:before,
-.modal-header:after,
-.modal-footer:before,
-.modal-footer:after {
- content: " ";
- display: table;
-}
-.clearfix:after,
-.dl-horizontal dd:after,
-.container:after,
-.container-fluid:after,
-.row:after,
-.form-horizontal .form-group:after,
-.btn-toolbar:after,
-.btn-group-vertical > .btn-group:after,
-.nav:after,
-.navbar:after,
-.navbar-header:after,
-.navbar-collapse:after,
-.pager:after,
-.panel-body:after,
-.modal-header:after,
-.modal-footer:after {
- clear: both;
-}
-.center-block {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-.pull-right {
- float: right !important;
-}
-.pull-left {
- float: left !important;
-}
-.hide {
- display: none !important;
-}
-.show {
- display: block !important;
-}
-.invisible {
- visibility: hidden;
-}
-.text-hide {
- font: 0/0 a;
- color: transparent;
- text-shadow: none;
- background-color: transparent;
- border: 0;
-}
-.hidden {
- display: none !important;
-}
-.affix {
- position: fixed;
-}
-@-ms-viewport {
- width: device-width;
-}
-.visible-xs,
-.visible-sm,
-.visible-md,
-.visible-lg {
- display: none !important;
-}
-.visible-xs-block,
-.visible-xs-inline,
-.visible-xs-inline-block,
-.visible-sm-block,
-.visible-sm-inline,
-.visible-sm-inline-block,
-.visible-md-block,
-.visible-md-inline,
-.visible-md-inline-block,
-.visible-lg-block,
-.visible-lg-inline,
-.visible-lg-inline-block {
- display: none !important;
-}
-@media (max-width: 767px) {
- .visible-xs {
- display: block !important;
- }
- table.visible-xs {
- display: table !important;
- }
- tr.visible-xs {
- display: table-row !important;
- }
- th.visible-xs,
- td.visible-xs {
- display: table-cell !important;
- }
-}
-@media (max-width: 767px) {
- .visible-xs-block {
- display: block !important;
- }
-}
-@media (max-width: 767px) {
- .visible-xs-inline {
- display: inline !important;
- }
-}
-@media (max-width: 767px) {
- .visible-xs-inline-block {
- display: inline-block !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm {
- display: block !important;
- }
- table.visible-sm {
- display: table !important;
- }
- tr.visible-sm {
- display: table-row !important;
- }
- th.visible-sm,
- td.visible-sm {
- display: table-cell !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-block {
- display: block !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-inline {
- display: inline !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .visible-sm-inline-block {
- display: inline-block !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md {
- display: block !important;
- }
- table.visible-md {
- display: table !important;
- }
- tr.visible-md {
- display: table-row !important;
- }
- th.visible-md,
- td.visible-md {
- display: table-cell !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-block {
- display: block !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-inline {
- display: inline !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .visible-md-inline-block {
- display: inline-block !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg {
- display: block !important;
- }
- table.visible-lg {
- display: table !important;
- }
- tr.visible-lg {
- display: table-row !important;
- }
- th.visible-lg,
- td.visible-lg {
- display: table-cell !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg-block {
- display: block !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg-inline {
- display: inline !important;
- }
-}
-@media (min-width: 1200px) {
- .visible-lg-inline-block {
- display: inline-block !important;
- }
-}
-@media (max-width: 767px) {
- .hidden-xs {
- display: none !important;
- }
-}
-@media (min-width: 768px) and (max-width: 991px) {
- .hidden-sm {
- display: none !important;
- }
-}
-@media (min-width: 992px) and (max-width: 1199px) {
- .hidden-md {
- display: none !important;
- }
-}
-@media (min-width: 1200px) {
- .hidden-lg {
- display: none !important;
- }
-}
-.visible-print {
- display: none !important;
-}
-@media print {
- .visible-print {
- display: block !important;
- }
- table.visible-print {
- display: table !important;
- }
- tr.visible-print {
- display: table-row !important;
- }
- th.visible-print,
- td.visible-print {
- display: table-cell !important;
- }
-}
-.visible-print-block {
- display: none !important;
-}
-@media print {
- .visible-print-block {
- display: block !important;
- }
-}
-.visible-print-inline {
- display: none !important;
-}
-@media print {
- .visible-print-inline {
- display: inline !important;
- }
-}
-.visible-print-inline-block {
- display: none !important;
-}
-@media print {
- .visible-print-inline-block {
- display: inline-block !important;
- }
-}
-@media print {
- .hidden-print {
- display: none !important;
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.less b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.less
deleted file mode 100644
index 2d0f5cc6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.less
+++ /dev/null
@@ -1,3 +0,0 @@
-@import '../../bower_components/bootstrap/less/bootstrap.less';
-
-@icon-font-path: '/fonts/';
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/angular-markdown-directive/markdown.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/angular-markdown-directive/markdown.js
deleted file mode 100644
index 989a6bec..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/angular-markdown-directive/markdown.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * angular-markdown-directive v0.3.1
- * (c) 2013-2014 Brian Ford http://briantford.com
- * License: MIT
- */
-
-'use strict';
-
-angular.module('btford.markdown', ['ngSanitize']).
- provider('markdownConverter', function () {
- var opts = {};
- return {
- config: function (newOpts) {
- opts = newOpts;
- },
- $get: function () {
- return new Showdown.converter(opts);
- }
- };
- }).
- directive('btfMarkdown', ['$sanitize', 'markdownConverter', function ($sanitize, markdownConverter) {
- return {
- restrict: 'AE',
- link: function (scope, element, attrs) {
- if (attrs.btfMarkdown) {
- scope.$watch(attrs.btfMarkdown, function (newVal) {
- var html = newVal ? $sanitize(markdownConverter.makeHtml(newVal)) : '';
- element.html(html);
- });
- } else {
- var html = $sanitize(markdownConverter.makeHtml(element.text()));
- element.html(html);
- }
- }
- };
- }]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsCtrl.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsCtrl.js
deleted file mode 100644
index 4b420a27..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsCtrl.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .controller('WidgetSettingsCtrl', ['$scope', '$uibModalInstance', 'widget', function ($scope, $uibModalInstance, widget) {
- // add widget to scope
- $scope.widget = widget;
-
- // set up result object
- $scope.result = jQuery.extend(true, {}, widget);
-
- $scope.ok = function () {
- $uibModalInstance.close($scope.result);
- };
-
- $scope.cancel = function () {
- $uibModalInstance.dismiss('cancel');
- };
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsRaptorReportCtrl.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsRaptorReportCtrl.js
deleted file mode 100644
index fd6a0b02..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsRaptorReportCtrl.js
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .controller('WidgetSettingsRaptorReportCtrl', ['$http','$scope','$rootScope','$uibModalInstance', 'widget', function ($http,$scope,$rootScope,$uibModalInstance, widget) {
-
- // add watch function for widget here
- // leave ajax call to the dashboard.js
-
- console.log("============= WidgetSettingsRaptorReportCtrl scope =================");
- console.log($scope);
-
- var getFormFieldListUrl = "raptor.htm?action=report.run.container&c_master="+widget.report_id + "&refresh=Y"
- console.log("============= getFormFieldListUrl =============");
- console.log(getFormFieldListUrl);
- $http.get(getFormFieldListUrl).then(
- function(res){
- $scope.reportData = res.data;
- // add widget to scope
- $scope.showFormFieldIds = false;
- $scope.formFieldSelectedValues = {};
-});
-
- var parseQueryString = function( queryString ) {
- var params = {}, queries, temp, i, l;
- // Split into key/value pairs
- queries = queryString.split("&");
- // Convert the array of strings into an object
- for ( i = 0, l = queries.length; i < l; i++ ) {
- temp = queries[i].split('=');
- //console.log(temp[0]);
- //console.log(temp[0] != "refresh");
- if(temp[0] && temp[0] != "refresh")
- params[temp[0]] = temp[1];
- }
- return params;
- };
-
- var paginationOptions = {
- pageNumber: 1,
- pageSize: 5,
- sort: null
- };
-
- $scope.gridOptions = {
- paginationPageSizes: [5],
- paginationPageSize: 5,
- useExternalPagination: true,
- columnDefs: [],
- data: [],
- enableGridMenu: true,
- enableSelectAll: true,
- exporterMenuPdf: false,
- exporterMenuCsv: false,
- exporterCsvFilename: 'myFile.csv',
- exporterPdfDefaultStyle: {fontSize: 9},
- exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
- exporterPdfTableHeaderStyle: {fontSize: 10, bol$rootScoped: true, italics: true, color: 'red'},
- exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
- exporterPdfFooter: function ( currentPage, pageCount ) {
- return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
- },
- exporterPdfCustomFormatter: function ( docDefinition ) {
- docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
- docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
- return docDefinition;
- },
- exporterPdfOrientation: 'portrait',
- exporterPdfPageSize: 'LETTER',
- exporterPdfMaxGridWidth: 500,
- exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
- onRegisterApi: function(gridApi) {
- $scope.gridApi = gridApi;
- gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
- paginationOptions.pageNumber = newPage;
- paginationOptions.pageSize = pageSize;
- $scope.runReport();
- });
- }
- };
-
-
-
- $scope.getFormFieldSelectedValuesAsURL = function(){
- var formFieldsUrl = '';
- $scope.widget.reportData.formFieldList.forEach(function(formField) {
- if(formField.fieldType==='LIST_BOX') {
- if($scope.formFieldSelectedValues && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId].value != '') {
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId].value+'&';
- }
- } else if(formField.fieldType==='LIST_MULTI_SELECT') {
- if($scope.formFieldSelectedValues[formField.fieldId].length >0) {
- for (var i = 0; i < $scope.formFieldSelectedValues[formField.fieldId].length; i++) {
- if($scope.formFieldSelectedValues[formField.fieldId][i].defaultValue){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId][i].value+'&';
- }
- }
- }
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && formField.validationType === 'DATE'){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+dateFilter($scope.formFieldSelectedValues[formField.fieldId],$scope.dateformat)+'&';
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && formField.validationType === 'TIMESTAMP_MIN'){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+dateFilter($scope.formFieldSelectedValues[formField.fieldId],$scope.datetimeformat)+'&';
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId] != ''){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId]+'&';
- }
- });
- return formFieldsUrl;
-
- }
-
- $scope.triggerOtherFormFields = function(){
- console.log("report_run");
- var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL();
- $http.get('raptor.htm?action=report.formfields.run.container&c_master='+widget.report_id+'&'+formFieldsUrl).then(
- function(response){
- $scope.widget.reportData = response.data;
- });
- };
-
-
- $scope.runReport = function(pagination){
- var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL();
- console.log("pagination");
- if(!pagination) {
- console.log("refreshed ...");
- $scope.gridOptions.pageNumber = 1;
- $scope.gridOptions.paginationPageSizes= [widget.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= widget.reportData.pageSize;
- if(widget.reportData.totalRows<14){
- $scope.gridHeight = (widget.reportData.totalRows+7)*30+'px';
- } else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = widget.reportData.totalRows;
- $scope.gridOptions.data= widget.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= widget.reportData.reportName;
- }
-/* $scope.currentReportUrlParams = 'c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'&display_content=Y&r_page='+(paginationOptions.pageNumber-1);
- console.log('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- */
- $scope.currentReportUrlParams = 'c_master='+ widget.report_id+'&'+formFieldsUrl+'&display_content=Y&r_page='+(paginationOptions.pageNumber-1);
- $scope.urlParams = parseQueryString($scope.currentReportUrlParams);
-
- console.log('raptor.htm?action=report.run.container&c_master='+ widget.report_id +'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=report.run.container&c_master='+widget.report_id+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- function(response){
- widget.reportData = response.data;
- if(widget.reportData.errormessage) {
- document.getElementById('errorDiv').innerHTML = widget.reportData.errormessage;
- console.log(document.getElementById('errorDiv').innerHtml);
- console.log(widget.reportData.errormessage);
- }
- if(!pagination) {
- if(!$scope.urlParams.hideChart && widget.reportData.chartAvailable && widget.reportData.totalRows>1){
- console.log('raptor.htm?action=chart.run&c_master='+widget.report_id+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=chart.run&c_master='+widget.report_id +'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- function(response) {
- console.log(response.data);
- $scope.showChart = true;
- document.getElementById('chartiframe').contentWindow.document.write(response.data);
- document.getElementById('chartiframe').contentWindow.document.close();
- });
- } else {
- $scope.showChart = false;
- }
- }
- if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields){
- $scope.showFormFields = true;
- } else {
- $scope.showFormFields = false;
- }
- });
- $rootScope.gridOptions = $scope.gridOptions;
- $rootScope.gridHeight = $scope.gridHeight;
- $rootScope.showdataContainer = true;
- };
-
-
-
-
-
- // set up result object
- $scope.result = jQuery.extend(true, {}, widget);
-
- $scope.ok = function () {
- $uibModalInstance.close($scope.result);
- };
-
- $scope.okay = function () {
- console.log("$scope.okay!")
- console.log($scope);
- $scope.runReport();
-/* $uibModalInstance.close($scope.result);*/
- };
-
- $scope.cancel = function () {
- $uibModalInstance.dismiss('cancel');
- };
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-raptor-report-template.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-raptor-report-template.html
deleted file mode 100644
index 00d6c41a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-raptor-report-template.html
+++ /dev/null
@@ -1,26 +0,0 @@
-<div>
- <div class="modal-header">
- <h3 class="modal-title"> Add a Raptor Report</h3>
- </div>
-
- <div >
- <form name="addRaptorReportForm" class="css-form" novalidate>
- <div style="width: 100%;">
- <div style="width: 20%; margin-left: 50px;margin-top:28px; float: left; font-size: 15px;">Report Name: </div>
- <div style="margin-top:20px;" class="form-field" att-select="raptorReportList" ng-model="selectedRaptorReport" placeholder="Select a Raptor Report" no-filter="true"></div>
-
- <form action="">
- <input name="radio" type="radio" ng-model="radioValue" att-radio="chart" title="chart" aria-label="chart radio"> chart
- <input name="radio" type="radio" ng-model="radioValue" att-radio="data" title="data" aria-label="data radio"> data
- </form>
- </div>
-
- <div class="modal-footer">
- <a att-button btn-type="primary" ng-click="ok()">OK</a>
- <a att-button btn-type="primary" ng-click="cancel()">Cancel</a>
- </div>
-
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-rcloud-notebook-template.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-rcloud-notebook-template.html
deleted file mode 100644
index 239497c9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-rcloud-notebook-template.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div>
- <div class="modal-header">
- <h3 class="modal-title"> Add a Raptor Report</h3>
- </div>
-
- <div >
- <form name="addRaptorReportForm" class="css-form" novalidate>
- <div style="width: 100%;">
- <div style="margin-left: 50px;margin-top:28px; font-size: 15px;">RCloud Notebook URL: </div>
-<!-- <div style="margin-top:20px;" class="form-field" att-select="raptorReportList" ng-model="selectedRaptorReport" placeholder="Select a Raptor Report" no-filter="true"></div> -->
- <textarea style="margin-left: 50px; width:450px; height: 150px;" ng-model="rcloud_url" name="content">
- </textarea>
- </div>
- <div class="modal-footer">
- <a att-button btn-type="primary" ng-click="ok()">OK</a>
- <a att-button btn-type="primary" ng-click="cancel()">Cancel</a>
- </div>
-
- </form>
- <br />
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/altDashboard.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/altDashboard.html
deleted file mode 100644
index 189bccea..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/altDashboard.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<div>
- <div class="btn-toolbar" ng-if="!options.hideToolbar">
- <div class="btn-group" ng-if="!options.widgetButtons">
- <span class="dropdown" on-toggle="toggled(open)">
- <button type="button" class="btn btn-primary dropdown-toggle" ng-disabled="disabled">
- Button dropdown <span class="caret"></span>
- </button>
- <ul class="dropdown-menu" role="menu">
- <li ng-repeat="widget in widgetDefs">
- <a href="#" ng-click="addWidgetInternal($event, widget);" class="dropdown-toggle">{{widget.name}}</a>
- </li>
- </ul>
- </span>
- </div>
-
- <div class="btn-group" ng-if="options.widgetButtons">
- <button ng-repeat="widget in widgetDefs"
- ng-click="addWidgetInternal($event, widget);" type="button" class="btn btn-primary">
- {{widget.name}}
- </button>
- </div>
-
- <button class="btn btn-warning" ng-click="resetWidgetsToDefault()">Default Widgets</button>
-
- <button ng-if="options.storage && options.explicitSave" ng-click="options.saveDashboard()" class="btn btn-success" ng-hide="!options.unsavedChangeCount">{{ !options.unsavedChangeCount ? "Alternative - No Changes" : "Save" }}</button>
-
- <button ng-click="clear();" ng-hide="!widgets.length" type="button" class="btn btn-info">Clear</button>
- </div>
-
- <div ui-sortable="sortableOptions" ng-model="widgets" class="dashboard-widget-area">
- <div ng-repeat="widget in widgets" ng-style="widget.style" class="widget-container" widget>
- <div class="widget panel panel-default">
- <div class="widget-header panel-heading">
- <h3 class="panel-title">
- <span class="widget-title" ng-dblclick="editTitle(widget)" ng-hide="widget.editingTitle">{{widget.title}}</span>
- <form action="" class="widget-title" ng-show="widget.editingTitle" ng-submit="saveTitleEdit(widget)">
- <input type="text" ng-model="widget.title" class="form-control">
- </form>
- <span class="label label-primary" ng-if="!options.hideWidgetName">{{widget.name}}</span>
- <span ng-click="removeWidget(widget);" class="glyphicon glyphicon-remove icon-erase" ng-if="!options.hideWidgetClose"></span>
- <span ng-click="openWidgetSettings(widget);" class="glyphicon glyphicon-cog icon-settings" ng-if="!options.hideWidgetSettings"></span>
- </h3>
- </div>
- <div class="panel-body widget-content"></div>
- <div class="widget-ew-resizer" ng-mousedown="grabResizer($event)"></div>
- </div>
- </div>
- </div>
-</div>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.html
deleted file mode 100644
index e891b565..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.html
+++ /dev/null
@@ -1,74 +0,0 @@
-
-<div>
- <div class="btn-toolbar" ng-if="!options.hideToolbar">
- <div class="btn-group" ng-if="!options.widgetButtons">
-
- <span class="dropdown" on-toggle="toggled(open)">
- <!--<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown">
- Button dropdown<span class="caret"></span>
- </button>-->
- <ul class="dropdown-menu" role="menu">
- <li ng-repeat="widget in widgetDefs">
- <a href="#" ng-click="addWidgetInternal($event, widget);" class="dropdown-toggle"><span class="label label-primary">{{widget.name}}</span></a>
- </li>
- </ul>
- </span>
- </div>
-
- <div class="btn-group" ng-if="options.widgetButtons">
- <button ng-repeat="widget in widgetDefs"
- ng-click="addWidgetInternal($event, widget);" type="button" class="btn btn-primary">
- {{widget.name}}
- </button>
- </div>
-
-<!-- <div style="float: left" class="form-field" att-select="reports" ng-model="report1" placeholder="Select a Report"></div>
- <button class="btn btn-primary" ng-click="addReport(report1)">Add Raptor Report</button> -->
- <button class="btn btn-primary" ng-click="popupAddReport()">+ Raptor Report</button>
-
-<!-- <div style = "float:left"> <input ng-model = "rcloud_url"> </div>
- <button class="btn btn-primary" ng-click="addRCloudNotebook(rcloud_url)">Add R Cloud</button> -->
- <button class="btn btn-primary" ng-click="popupAddRCloudNotebook()">+ RCloud Notebook</button>
-
-<!-- <button class="btn btn-warning" ng-click="resetWidgetsToDefault()">Default Widgets</button> -->
-
- <button ng-if="options.storage && options.explicitSave" ng-click="options.saveDashboard()" class="btn btn-success" ng-disabled="!options.unsavedChangeCount">{{ !options.unsavedChangeCount ? "All Saved" : "Save Changes (" + options.unsavedChangeCount + ")" }}</button>
-
- <button ng-click="clear();" type="button" class="btn btn-info">Clear</button>
-
-<!-- <button style="float:right" ng-click="clear();" type="button" class="btn btn-info">Save to Database</button> -->
- </div>
-
-
-<!--
- <div id="container">
- <div id="navi">navi</div>
- <div id="infoi">
- <img src="https://appharbor.com/assets/images/stackoverflow-logo.png" height="20" width="32" />infoi
- </div>
-</div>
- -->
-
- <div ui-sortable="sortableOptions" ng-model="widgets" class="dashboard-widget-area">
- <div ng-mouseover="hoverIn()" ng-mouseleave="hoverOut()" ng-repeat="widget in widgets" ng-style="widget.containerStyle" class="widget-container" widget>
- <div class="widget panel panel-default">
- <div style="opacity: 0.8; background-color: #E5E5E5; border: #d3d3d3;" ng-show="hoverEdit" class="widget-header panel-heading">
- <img style="float:left; margin-right: 10px" src="static/fusion/images/att_angular_gridster/grips.png">
- <h3 class="panel-title">
- <span class="widget-title" ng-dblclick="editTitle(widget)" ng-hide="widget.editingTitle"></span>
- <form action="" class="widget-title" ng-show="widget.editingTitle" ng-submit="saveTitleEdit(widget)">
- <input type="text" ng-model="widget.title" class="form-control">
- </form>
- <span class="label label-primary" ng-if="!options.hideWidgetName">{{widget.name}}</span>
- <span ng-click="removeWidget(widget);" class="glyphicon glyphicon-remove icon-erase" ng-if="!options.hideWidgetClose"></span>
- <span ng-click="openWidgetSettings(widget);" class="glyphicon glyphicon-cog icon-settings" ng-if="!options.hideWidgetSettings"></span>
- <span ng-click="widget.contentStyle.display = widget.contentStyle.display === 'none' ? 'block' : 'none'" class="glyphicon" ng-class="{'glyphicon-plus': widget.contentStyle.display === 'none', 'glyphicon-minus': widget.contentStyle.display !== 'none' }"></span>
- </h3>
- </div>
- <div class="panel-body widget-content" ng-style="widget.contentStyle"></div>
- <div class="widget-ew-resizer" ng-mousedown="grabResizer($event)"></div>
- <div style="background-color:#f2f2f2" ng-if="widget.enableVerticalResize" class="widget-s-resizer" ng-mousedown="grabSouthResizer($event)"></div>
- </div>
- </div>
- </div>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.js
deleted file mode 100644
index 4062694e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.js
+++ /dev/null
@@ -1,427 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-'use strict';
-
-angular.module('ui.dashboard', ['ui.bootstrap', 'ui.sortable']);
-
-angular.module('ui.dashboard')
-
- .directive('dashboard', ['$http','WidgetModel', 'WidgetDefCollection', '$uibModal', 'DashboardState', '$log', function ($http, WidgetModel, WidgetDefCollection, $uibModal, DashboardState, $log) {
-
- return {
- restrict: 'A',
- templateUrl: function(element, attr) {
- return attr.templateUrl ? attr.templateUrl : 'app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.html';
- },
- scope: true,
-
- controller: ['$scope', '$attrs', function (scope, attrs) {
- // default options
- var defaults = {
- stringifyStorage: true,
- hideWidgetSettings: false,
- hideWidgetClose: false,
- settingsModalOptions: {
- // templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html',
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-raptor-report-template.html',
- // controller: 'WidgetSettingsCtrl'
- controller: 'WidgetSettingsRaptorReportCtrl'
- },
- onSettingsClose: function(result, widget) { // NOTE: dashboard scope is also passed as 3rd argument
- jQuery.extend(true, widget, result);
- },
- onSettingsDismiss: function(reason) { // NOTE: dashboard scope is also passed as 2nd argument
- $log.info('widget settings were dismissed. Reason: ', reason);
- }
- };
-
- scope.hoverEdit = false;
-
- scope.hoverIn = function(){
- this.hoverEdit = true;
- };
-
- scope.hoverOut = function(){
- this.hoverEdit = false;
- };
-
- // from dashboard="options"
- scope.options = scope.$eval(attrs.dashboard);
-
- // Deep options
- scope.options.settingsModalOptions = scope.options.settingsModalOptions || {};
- _.each(['settingsModalOptions'], function(key) {
- // Ensure it exists on scope.options
- scope.options[key] = scope.options[key] || {};
- // Set defaults
- _.defaults(scope.options[key], defaults[key]);
- });
-
- // Shallow options
- _.defaults(scope.options, defaults);
-
- // sortable options
- var sortableDefaults = {
- stop: function () {
- scope.saveDashboard();
- },
- handle: '.widget-header',
- distance: 5
- };
- scope.sortableOptions = angular.extend({}, sortableDefaults, scope.options.sortableOptions || {});
-
- }],
- link: function (scope) {
-
- // Save default widget config for reset
- scope.defaultWidgets = scope.options.defaultWidgets;
-
- scope.widgetDefs = new WidgetDefCollection(scope.options.widgetDefinitions);
- var count = 1;
-
- // Instantiate new instance of dashboard state
- scope.dashboardState = new DashboardState(
- scope.options.storage,
- scope.options.storageId,
- scope.options.storageHash,
- scope.widgetDefs,
- scope.options.stringifyStorage
- );
-
- /**
- * Instantiates a new widget on the dashboard
- * @param {Object} widgetToInstantiate The definition object of the widget to be instantiated
- */
- scope.addWidget = function (widgetToInstantiate, doNotSave) {
-
- if (typeof widgetToInstantiate === 'string') {
- widgetToInstantiate = {
- name: widgetToInstantiate
- };
- }
-
- var defaultWidgetDefinition = scope.widgetDefs.getByName(widgetToInstantiate.name);
- if (!defaultWidgetDefinition) {
- throw 'Widget ' + widgetToInstantiate.name + ' is not found.';
- }
-
- // Determine the title for the new widget
- var title;
- if (!widgetToInstantiate.title && !defaultWidgetDefinition.title) {
- widgetToInstantiate.title = 'Widget ' + count++;
- }
-
- // Instantiation
- var widget = new WidgetModel(defaultWidgetDefinition, widgetToInstantiate);
-
- // Add to the widgets array
- scope.widgets.push(widget);
- if (!doNotSave) {
- scope.saveDashboard();
- }
-
- return widget;
- };
-
- /**
- * Removes a widget instance from the dashboard
- * @param {Object} widget The widget instance object (not a definition object)
- */
- scope.removeWidget = function (widget) {
- scope.widgets.splice(_.indexOf(scope.widgets, widget), 1);
- scope.saveDashboard();
- };
-
- /**
- * Opens a dialog for setting and changing widget properties
- * @param {Object} widget The widget instance object
- */
- scope.openWidgetSettings = function (widget) {
-/* console.log('======= widgets =======');
- console.log(widget);
- console.log('widget.report_id');
- console.log(widget.report_id);
-*/
- if (widget.directive.includes("raptor-report")) {
- var getFormFieldListUrl = "raptor.htm?action=report.run.container&c_master="+widget.report_id + "&refresh=Y";
- $http.get(getFormFieldListUrl).then(
- function(res){
- widget.reportData = res.data;
- });
-
- // Set up $uibModal options
- var options = _.defaults(
- { scope: scope },
- widget.settingsModalOptions,
- scope.options.settingsModalOptions);
-
-/* console.log('======= options =======');
- console.log(options);
-*/
- // Ensure widget is resolved
- options.resolve = {
- widget: function () {
- return widget;
- }
- };
-
- // Create the modal
- var modalInstance = $uibModal.open(options);
- var onClose = widget.onSettingsClose || scope.options.onSettingsClose;
- var onDismiss = widget.onSettingsDismiss || scope.options.onSettingsDismiss;
-
- // Set resolve and reject callbacks for the result promise
- modalInstance.result.then(
- function (result) {
-
- // Call the close callback
- onClose(result, widget, scope);
-
- //AW Persist title change from options editor
- scope.$emit('widgetChanged', widget);
- },
- function (reason) {
-
- // Call the dismiss callback
- onDismiss(reason, scope);
-
- }
- );
-
- }
-
- };
-
- /**
- * Remove all widget instances from dashboard
- */
- scope.clear = function (doNotSave) {
- scope.widgets = [];
- if (doNotSave === true) {
- return;
- }
- scope.saveDashboard();
- };
-
- /**
- * Used for preventing default on click event
- * @param {Object} event A click event
- * @param {Object} widgetDef A widget definition object
- */
- scope.addWidgetInternal = function (event, widgetDef) {
-// event.preventDefault();
- scope.addWidget(widgetDef);
- };
-
- /**
- * Add report to dashboard
- */
- scope.popupAddReport = function () {
- var modalInstance = $uibModal.open({
- animation: scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-raptor-report-template.html',
- size:'sm',
- controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
- $scope.radioValue="chart"
- $http.get('raptor.htm?action=report.search.execute').then(
- function(result){
- var data = result.data;
- var report_id_name = [];
- for (var i in data.rows[0]) {
- report_id_name.push({index:i, value: data.rows[0][i][1].searchresultField.displayValue, title: data.rows[0][i][2].searchresultField.displayValue})
- }
- $scope.raptorReportList = report_id_name;
- });
-
- $scope.ok = function() {
- scope.addReport($scope.selectedRaptorReport,$scope.radioValue);
- $uibModalInstance.close();
- };
- $scope.cancel = function() {
- $uibModalInstance.dismiss();
- };
- }]
- });
- modalInstance.result.then(function () {
- $scope.$emit('raptorReportWidgetAdded');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };
-
-
- scope.popupAddRCloudNotebook = function () {
- var modalInstance = $uibModal.open({
- animation: scope.animationsEnabled,
- templateUrl: 'app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/add-rcloud-notebook-template.html',
- size:'sm',
- controller: ['$scope', '$uibModalInstance', '$http', function ($scope, $uibModalInstance, $http) {
- $scope.rcloud_url = ""
-
- $scope.ok = function() {
- scope.addRCloudNotebook($scope.rcloud_url);
- $uibModalInstance.close();
- };
- $scope.cancel = function() {
- $uibModalInstance.dismiss();
- };
- }]
- });
- modalInstance.result.then(function () {
- $scope.$emit('raptorReportWidgetAdded');
- }, function () {
- $log.info('Modal dismissed at: ' + new Date());
- });
- };
-
-
- scope.addReport = function (report1,radioValue) {
- scope.report1 =report1
- var raptor_report_type = "raptor-report-chart"
- if (radioValue ==='data') {
- raptor_report_type = 'raptor-report-data'
- }
- console.log("report1")
- console.log(report1);
-// event.preventDefault();
- var newreport = {"title":report1.title,"name":raptor_report_type ,"style":{},"size":{"height":"350px","width":"40%"},"attrs":{"value":"randomValue"},"report_id":report1.value};
- scope.addWidget(newreport, true);
- console.log("widgets");
- console.log(scope.widgets);
- ++scope.options.unsavedChangeCount;
- return false;
- };
-
- /**
- * Add rcloud notebook to dashboard
- */
- scope.addRCloudNotebook = function (rcloud_url) {
- ++scope.options.unsavedChangeCount;
- /* open a new prompt window */
- //event.preventDefault();
- var newreport = {"title":"R-Cloud","name":"r-cloud","style":{},"size":{"height":"450px","width":"40%"},"attrs":{"value":"randomValue"},"rcloud_url":rcloud_url};
-// console.log("newport");
- console.log(newreport)
- scope.addWidget(newreport, true);
- /* scope.addWidget("raptor-report");*/
- return false;
- };
-
- /**
- * Uses dashboardState service to save state
- */
- scope.saveDashboard = function (force) {
- if (!scope.options.explicitSave) {
- scope.dashboardState.save(scope.widgets);
- } else {
- if (!angular.isNumber(scope.options.unsavedChangeCount)) {
- scope.options.unsavedChangeCount = 0;
- }
- if (force) {
- scope.options.unsavedChangeCount = 0;
- scope.dashboardState.save(scope.widgets);
-
- } else {
- ++scope.options.unsavedChangeCount;
- }
- }
- };
-
- /**
- * Wraps saveDashboard for external use.
- */
- scope.externalSaveDashboard = function(force) {
- if (angular.isDefined(force)) {
- scope.saveDashboard(force);
- } else {
- scope.saveDashboard(true);
- }
- };
-
- /**
- * Clears current dash and instantiates widget definitions
- * @param {Array} widgets Array of definition objects
- */
- scope.loadWidgets = function (widgets) {
- // AW dashboards are continuously saved today (no "save" button).
- console.log("widgets")
- scope.defaultWidgets = widgets;
- widgets =
- [
-// {"title":"DEMO Bar Chart","name":"raptor-report-chart","style":{},"size":{"height":"450px","width":"40%"},"attrs":{"value":"randomValue"},"report_id":"2"},
-// {"title":"Pie Chart","name":"raptor-report-data","style":{},"size":{"height":"450px","width":"40%"},"attrs":{"value":"randomValue"},"report_id":"5"},
-// {"title":"Pie Chart","name":"raptor-report-chart","style":{},"size":{"height":"450px","width":"40%"},"attrs":{"value":"randomValue"},"report_id":"5"}
- ];
- console.log('widgets: ');
- console.log(JSON.stringify(widgets));
-
- scope.savedWidgetDefs = widgets;
- scope.clear(true);
- _.each(widgets, function (widgetDef) {
- scope.addWidget(widgetDef, true);
- });
- };
-
- /**
- * Resets widget instances to default config
- * @return {[type]} [description]
- */
- scope.resetWidgetsToDefault = function () {
- scope.loadWidgets(scope.defaultWidgets);
- scope.saveDashboard();
- };
-
- // Set default widgets array
- var savedWidgetDefs = scope.dashboardState.load();
-
- // Success handler
- function handleStateLoad(saved) {
- scope.options.unsavedChangeCount = 0;
- if (saved && saved.length) {
- scope.loadWidgets(saved);
- } else if (scope.defaultWidgets) {
- scope.loadWidgets(scope.defaultWidgets);
- } else {
- scope.clear(true);
- }
- }
-
- if (angular.isArray(savedWidgetDefs)) {
- handleStateLoad(savedWidgetDefs);
- } else if (savedWidgetDefs && angular.isObject(savedWidgetDefs) && angular.isFunction(savedWidgetDefs.then)) {
- savedWidgetDefs.then(handleStateLoad, handleStateLoad);
- } else {
- handleStateLoad();
- }
-
- // expose functionality externally
- // functions are appended to the provided dashboard options
- scope.options.addWidget = scope.addWidget;
- scope.options.loadWidgets = scope.loadWidgets;
- scope.options.saveDashboard = scope.externalSaveDashboard;
- scope.options.removeWidget = scope.removeWidget;
- scope.options.openWidgetSettings = scope.openWidgetSettings;
- scope.options.clear = scope.clear;
- scope.options.resetWidgetsToDefault = scope.resetWidgetsToDefault
-
- // save state
- scope.$on('widgetChanged', function (event) {
- event.stopPropagation();
- scope.saveDashboard();
- });
- }
- };
- }]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.less b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.less
deleted file mode 100644
index 6b5b717f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.less
+++ /dev/null
@@ -1,88 +0,0 @@
-.dashboard-widget-area {
- margin: 10px 0 30px;
- min-height: 200px;
-}
-
-.widget-container {
- float:left;
- display: inline-block;
- width: 33%;
- padding-bottom: 1em;
-}
-
-.widget {
- margin: 0 1em 0 0;
- background-color: white;
- border: 2px solid #444;
- border-radius: 5px;
- position: relative;
- height: 100%;
-}
-.widget-header {
- overflow: hidden;
-}
-.widget-header .label {
- display: inline-block;
- vertical-align: middle;
-}
-.widget-header .glyphicon {
- cursor: pointer;
- float: right;
- opacity: 0.5;
- margin-left: 5px;
-}
-.widget-header .glyphicon:hover {
- opacity: 1;
-}
-.widget-header .widget-title {
- vertical-align: middle;
-}
-.widget-header form.widget-title {
- display: inline;
-}
-
-.widget-header form.widget-title input.form-control {
- width: auto;
- display: inline-block;
-}
-
-.widget-content {
- overflow: hidden;
-}
-
-.widget .widget-ew-resizer {
- position: absolute;
- width: 5px;
- right: -2px;
- height:100%;
- top:0;
- cursor: ew-resize;
-}
-
-.widget .widget-s-resizer {
- cursor: ns-resize;
- height: 5px;
- width: 100%;
- bottom: -7px;
- left: 0;
-}
-
-.widget .widget-resizer-marquee {
- box-shadow: inset 0 0 0 1px rgba(0,0,0,0.5);
- position: absolute;
- top: 0;
- left: 0;
- z-index: 2;
-}
-
-.remove-layout-icon {
- vertical-align: text-top;
- cursor: pointer;
- opacity: 0.3;
-}
-.remove-layout-icon:hover {
- opacity: 1;
-}
-.layout-title {
- display: inline-block;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.spec.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.spec.js
deleted file mode 100644
index 453de431..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.spec.js
+++ /dev/null
@@ -1,878 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-describe('Directive: dashboard', function () {
-
- var scope, element, childScope, DashboardState, mockModal, modalOptions, $compile, $q, mockLog;
-
- // mock UI Sortable
- beforeEach(function () {
- angular.module('ui.sortable', []);
- });
-
- // load the directive's module
- beforeEach(module('ui.dashboard', function($provide) {
- mockModal = {
- open: function(options) {
- modalOptions = options;
- }
- };
- mockLog = {
- info: function() {
-
- }
- };
- $provide.value('$uibModal', mockModal);
- $provide.value('$log', mockLog);
- }));
-
- beforeEach(inject(function (_$compile_, $rootScope, _DashboardState_, _$q_) {
- // services
- scope = $rootScope.$new();
- $compile = _$compile_;
- DashboardState = _DashboardState_;
- $q = _$q_;
-
- // options
- var widgetDefinitions = [
- {
- name: 'wt-one',
- template: '<div class="wt-one-value">{{2 + 2}}</div>'
- },
- {
- name: 'wt-two',
- template: '<span class="wt-two-value">{{value}}</span>'
- }
- ];
- var defaultWidgets = _.clone(widgetDefinitions);
- scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- sortableOptions: {
- testProperty: 'foobar'
- }
- };
- scope.value = 10;
-
- // element setup
- element = $compile('<div dashboard="dashboardOptions"></div>')(scope);
- scope.$digest();
- childScope = element.scope();
- }));
-
- it('should have toolbar', function () {
- var toolbar = element.find('.btn-toolbar');
- expect(toolbar.length).toEqual(1);
- });
-
- it('should have UI.Sortable directive', function () {
- var widgetArea = element.find('.dashboard-widget-area');
- expect(widgetArea.attr('ui-sortable')).toBeDefined();
- });
-
- it('should render widgets', function () {
- var widgets = element.find('.widget');
- expect(widgets.length).toEqual(2);
- });
-
- it('should evaluate widget expressions', function () {
- var divWidget = element.find('.wt-one-value');
- expect(divWidget.html()).toEqual('4');
- });
-
- it('should evaluate scope expressions', function () {
- var spanWidget = element.find('.wt-two-value');
- expect(spanWidget.html()).toEqual('10');
- });
-
- it('should fill options with defaults', function() {
- expect(scope.dashboardOptions.stringifyStorage).toEqual(true);
- });
-
- it('should not overwrite specified options with defaults', inject(function($compile) {
- scope.dashboardOptions.stringifyStorage = false;
- element = $compile('<div dashboard="dashboardOptions"></div>')(scope);
- $compile(element)(scope);
- scope.$digest();
- expect(scope.dashboardOptions.stringifyStorage).toEqual(false);
- }));
-
- it('should be able to use a different dashboard template', inject(function($compile, $templateCache) {
- $templateCache.put(
- 'myCustomTemplate.html',
- '<div>' +
- '<div ui-sortable="sortableOptions" ng-model="widgets">' +
- '<div ng-repeat="widget in widgets" ng-style="widget.style" class="widget-container custom-widget" widget>' +
- '<h3 class="widget-header">' +
- '{{widget.title}}' +
- '<span ng-click="removeWidget(widget);" class="glyphicon glyphicon-remove icon-erase" ng-if="!options.hideWidgetClose"></span>' +
- '<span ng-click="openWidgetSettings(widget);" class="glyphicon glyphicon-cog icon-settings" ng-if="!options.hideWidgetSettings"></span>' +
- '</h3>' +
- '<div class="widget-content"></div>' +
- '<div class="widget-ew-resizer" ng-mousedown="grabResizer($event)"></div>' +
- '</div>' +
- '</div>' +
- '</div>'
- );
- var customElement = $compile('<div dashboard="dashboardOptions" template-url="myCustomTemplate.html"></div>')(scope);
- scope.$digest();
- expect(customElement.find('.custom-widget').length).toEqual(2);
- }));
-
- it('should set scope.widgets to an empty array if no defaultWidgets are specified', inject(function($compile) {
- delete scope.dashboardOptions.defaultWidgets;
- var element2 = $compile('<div dashboard="dashboardOptions"></div>')(scope);
- scope.$digest();
- var childScope2 = element2.scope();
- expect(childScope2.widgets instanceof Array).toEqual(true);
- }));
-
- it('should set options.unsavedChangeCount to 0 upon load', function() {
- expect(scope.dashboardOptions.unsavedChangeCount).toEqual(0);
- });
-
- it('should not call saveDashboard on load', inject(function($compile) {
- spyOn(DashboardState.prototype, 'save');
- var s = scope.$new();
- element = $compile('<div dashboard="dashboardOptions"></div>')(s);
- scope.$digest();
- expect(DashboardState.prototype.save).not.toHaveBeenCalled();
- }));
-
- describe('the sortableOptions', function() {
-
- it('should exist', function() {
- expect(typeof childScope.sortableOptions).toEqual('object');
- });
-
- it('should be possible to be extendable from the dashboardOptions', function() {
- expect(childScope.sortableOptions.testProperty).toEqual('foobar');
- })
-
- it('should have a stop function that calls $scope.saveDashboard', function() {
- expect(typeof childScope.sortableOptions.stop).toEqual('function');
- spyOn(childScope, 'saveDashboard');
- childScope.sortableOptions.stop();
- expect(childScope.saveDashboard).toHaveBeenCalled();
- });
- });
-
- describe('the addWidget function', function() {
-
- var widgetCreated, widgetPassed, widgetDefault;
-
- beforeEach(function() {
- childScope.widgets.push = function(w) {
- widgetCreated = w;
- }
- });
-
- it('should be a function', function() {
- expect(typeof childScope.addWidget).toEqual('function');
- });
-
- it('should throw if no default widgetDefinition was found', function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue(false);
- function fn () {
- childScope.addWidget({ name: 'notReal' });
- }
- expect(fn).toThrow();
- });
-
- it('should look to the passed widgetToInstantiate object for the title before anything else', function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue({ title: 'defaultTitle', name: 'A' });
- childScope.addWidget({ title: 'highestPrecedence', name: 'A' });
- expect(widgetCreated.title).toEqual('highestPrecedence');
- });
-
- it('should use the defaultWidget\'s title second', function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue({ title: 'defaultTitle', name: 'A' });
- childScope.addWidget({ name: 'A' });
- expect(widgetCreated.title).toEqual('defaultTitle');
- });
-
- it('should call the saveDashboard method (internal)', function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue({ title: 'defaultTitle', name: 'A' });
- spyOn(childScope, 'saveDashboard');
- childScope.addWidget({ name: 'A' });
- expect(childScope.saveDashboard).toHaveBeenCalled();
- });
-
- it('should support passing just the widget name as a string', function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue({ title: 'defaultTitle', name: 'A' });
- childScope.addWidget('A');
- expect(childScope.widgetDefs.getByName).toHaveBeenCalledWith('A');
- expect(widgetCreated.title).toEqual('defaultTitle');
- });
-
- describe('@awashbrook Test Case', function() {
- beforeEach(function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue(widgetDefault = {
- "name": "nvLineChartAlpha",
- "directive": "nvd3-line-chart",
- "dataAttrName": "data",
- "attrs": {
- "isArea": true,
- "height": 400,
- "showXAxis": true,
- "showYAxis": true,
- "xAxisTickFormat": "xAxisTickFormat()",
- "interactive": true,
- "useInteractiveGuideline": true,
- "tooltips": true,
- "showLegend": true,
- "noData": "No data for YOU!",
- "color": "colorFunction()",
- "forcey": "[0,2]"
- },
- "dataModelOptions": {
- "params": {
- "from": "-2h",
- "until": "now"
- }
- },
- "style": {
- "width": "400px"
- },
- });
- childScope.addWidget(widgetPassed = {
- "title": "Andy",
- "name": "nvLineChartAlpha",
- "style": {
- "width": "400px"
- },
- "dataModelOptions": {
- "params": {
- "from": "-1h",
- "target": [
- "randomWalk(\"random Andy 1\")",
- "randomWalk(\"random walk 2\")",
- "randomWalk(\"random walk 3\")"
- ]
- }
- },
- "attrs": {
- "height": 400,
- "showXAxis": true,
- "showYAxis": true,
- "xAxisTickFormat": "xAxisTickFormat()",
- "interactive": false,
- "useInteractiveGuideline": true,
- "tooltips": true,
- "showLegend": true,
- "noData": "No data for YOU!",
- "color": "colorFunction()",
- "forcey": "[0,2]",
- "data": "widgetData"
- }
- });
- });
-
- it('should keep overrides from widgetPassed', function() {
- expect(widgetCreated.attrs.interactive).toEqual(widgetPassed.attrs.interactive);
- });
-
- it('should fill in default attrs', function() {
- expect(widgetCreated.attrs.isArea).toEqual(widgetDefault.attrs.isArea);
- });
-
- it('should override deep options in dataModelOptions', function() {
- expect(widgetCreated.dataModelOptions.params.from).toEqual(widgetPassed.dataModelOptions.params.from);
- });
-
- it('should fill in deep default attrs', function() {
- expect(widgetCreated.dataModelOptions.params.until).toEqual(widgetDefault.dataModelOptions.params.until);
- });
- });
-
- describe('the doNotSave parameter', function() {
-
- it('should prevent save from being called if set to true', function() {
- spyOn(childScope.widgetDefs, 'getByName').and.returnValue({ title: 'defaultTitle', name: 'A' });
- spyOn(childScope, 'saveDashboard');
- childScope.addWidget({ name: 'A' }, true);
- expect(childScope.saveDashboard).not.toHaveBeenCalled();
- });
-
- });
-
- });
-
- describe('the removeWidget function', function() {
-
- it('should be a function', function() {
- expect(typeof childScope.removeWidget).toEqual('function');
- });
-
- it('should remove the provided widget from childScope.widgets array', function() {
- var startingLength = childScope.widgets.length;
- var expectedLength = startingLength - 1;
-
- var widgetToRemove = childScope.widgets[0];
- childScope.removeWidget(widgetToRemove);
-
- expect(childScope.widgets.length).toEqual(expectedLength);
- expect(childScope.widgets.indexOf(widgetToRemove)).toEqual(-1);
- });
-
- it('should call saveDashboard', function() {
- spyOn(childScope, 'saveDashboard');
- var widgetToRemove = childScope.widgets[0];
- childScope.removeWidget(widgetToRemove);
- expect(childScope.saveDashboard).toHaveBeenCalled();
- });
-
- });
-
- describe('the saveDashboard function', function() {
-
- it('should be attached to the options object after initialization', function() {
- expect(typeof scope.dashboardOptions.saveDashboard).toEqual('function');
- expect(scope.dashboardOptions.saveDashboard === childScope.externalSaveDashboard).toEqual(true);
- });
-
- it('should call scope.dashboardState.save when called internally if explicitSave is falsey', function() {
- spyOn(childScope.dashboardState, 'save').and.returnValue(true);
- childScope.saveDashboard();
- expect(childScope.dashboardState.save).toHaveBeenCalled();
- });
-
- it('should not call scope.dashboardState.save when called internally if explicitSave is truthy', function() {
- scope.dashboardOptions.explicitSave = true;
- spyOn(childScope.dashboardState, 'save').and.returnValue(true);
- childScope.saveDashboard();
- expect(childScope.dashboardState.save).not.toHaveBeenCalled();
- });
-
- it('should call scope.dashboardState.save when called externally, no matter what explicitSave value is', function() {
- spyOn(childScope.dashboardState, 'save').and.returnValue(true);
-
- scope.dashboardOptions.explicitSave = false;
- scope.dashboardOptions.saveDashboard();
- expect(childScope.dashboardState.save.calls.count()).toEqual(1);
-
- scope.dashboardOptions.explicitSave = true;
- scope.dashboardOptions.saveDashboard();
- expect(childScope.dashboardState.save.calls.count()).toEqual(2);
- });
-
- it('should keep a count of unsaved changes as unsavedChangeCount', function() {
- scope.dashboardOptions.explicitSave = true;
- spyOn(childScope.dashboardState, 'save').and.returnValue(true);
- childScope.saveDashboard();
- expect(scope.dashboardOptions.unsavedChangeCount).toEqual(1);
- childScope.saveDashboard();
- childScope.saveDashboard();
- expect(scope.dashboardOptions.unsavedChangeCount).toEqual(3);
- });
-
- it('should reset the cound of unsaved changes if a successful force save occurs', function() {
- scope.dashboardOptions.explicitSave = true;
- spyOn(childScope.dashboardState, 'save').and.returnValue(true);
-
- childScope.saveDashboard();
- childScope.saveDashboard();
- childScope.saveDashboard();
-
- childScope.saveDashboard(true);
-
- expect(scope.dashboardOptions.unsavedChangeCount).toEqual(0);
- });
-
- });
-
- describe('the loadWidgets function', function() {
-
- it('should be a function', function() {
- expect(typeof childScope.loadWidgets).toEqual('function');
- });
-
- it('should set savedWidgetDefs on scope as passed array', function() {
- var widgets = [];
- childScope.loadWidgets(widgets);
- expect(childScope.savedWidgetDefs === widgets).toEqual(true);
- });
-
- it('should call clear on the scope with true as the only argument', function() {
- spyOn(childScope, 'clear');
- childScope.loadWidgets([]);
- expect(childScope.clear).toHaveBeenCalled();
- expect(childScope.clear.calls.argsFor(0)).toEqual([true]);
- });
-
- it('should call addWidget for each widget in the array', function() {
- spyOn(childScope, 'addWidget').and.returnValue(null);
- var widgets = [{},{},{}];
- childScope.loadWidgets(widgets);
- expect(childScope.addWidget.calls.count()).toEqual(3);
- });
-
- it('should call addWidget for each widget with true as the second parameter (doNotSave)', function() {
- spyOn(childScope, 'addWidget').and.returnValue(null);
- var widgets = [{},{},{}];
- childScope.loadWidgets(widgets);
- expect(childScope.addWidget.calls.argsFor(0)).toEqual( [ widgets[0], true] );
- expect(childScope.addWidget.calls.argsFor(1)).toEqual( [ widgets[1], true] );
- expect(childScope.addWidget.calls.argsFor(2)).toEqual( [ widgets[2], true] );
- });
-
- });
-
- describe('the clear function', function() {
-
- it('should set the scope to an empty array', function() {
- childScope.clear();
- expect(childScope.widgets).toEqual([]);
- });
-
- it('should not call saveDashboard if first arg is true', function() {
- spyOn(childScope, 'saveDashboard');
- childScope.clear(true);
- expect(childScope.saveDashboard).not.toHaveBeenCalled();
- });
-
- it('should call saveDashboard if first arg is not true', function() {
- spyOn(childScope, 'saveDashboard');
- childScope.clear();
- expect(childScope.saveDashboard).toHaveBeenCalled();
- });
-
- });
-
- describe('the openWidgetSettings function', function() {
-
- it('should be a function', function() {
- expect(typeof childScope.openWidgetSettings).toEqual('function');
- });
-
- it('should call $uibModal.open with default options', function() {
- var widget = {};
- spyOn(mockModal, 'open').and.returnValue({
- result: { then: function(fn) {} }
- });
- childScope.openWidgetSettings(widget);
- expect(mockModal.open).toHaveBeenCalled();
- });
-
- it('should have widget in the resolve object', function() {
- var widget = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.resolve.widget() === widget).toEqual(true);
- });
-
- it('should set the templateUrl in modal options to the default ("app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html")', function() {
- var widget = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.templateUrl).toEqual('app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html');
- });
-
- it('should set the templateUrl in modal options to scope.options.settingsModalOptions.templateUrl', function() {
- var other;
- scope.dashboardOptions.settingsModalOptions = {
- templateUrl: other = 'some/other/url.html'
- };
- var widget = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.templateUrl).toEqual(other);
- });
-
- it('should set the templateUrl in modal options to widget.settingsModalOptions.templateUrl, if present', function() {
- var expected;
- var widget = {
- settingsModalOptions: {
- templateUrl: expected = 'specific/template.html'
- }
- };
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.templateUrl).toEqual(expected);
- });
-
- it('should set the controller in modal options to the default ("WidgetSettingsCtrl")', function() {
- var widget = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.controller).toEqual('WidgetSettingsCtrl');
- });
-
- it('should set the controller in modal options to the default ("WidgetSettingsCtrl"), even when settingsModalOptions is supplied in options', inject(function($rootScope) {
-
- scope = $rootScope.$new();
-
- // options
- var widgetDefinitions = [
- {
- name: 'wt-one',
- template: '<div class="wt-one-value">{{2 + 2}}</div>'
- },
- {
- name: 'wt-two',
- template: '<span class="wt-two-value">{{value}}</span>'
- }
- ];
- var defaultWidgets = _.clone(widgetDefinitions);
- scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- sortableOptions: {
- testProperty: 'foobar'
- },
- settingsModalOptions: {
- backdrop: false
- }
- };
- scope.value = 10;
-
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
-
- // element setup
- element = $compile('<div dashboard="dashboardOptions"></div>')(scope);
- scope.$digest();
- childScope = element.scope();
-
- childScope.openWidgetSettings({});
- expect(modalOptions.controller).toEqual('WidgetSettingsCtrl');
-
- }));
-
- it('should set the controller in modal options to the default ("WidgetSettingsCtrl"), even when settingsModalOptions is supplied in widget', inject(function($rootScope) {
-
- scope = $rootScope.$new();
-
- // options
- var widgetDefinitions = [
- {
- name: 'wt-one',
- template: '<div class="wt-one-value">{{2 + 2}}</div>'
- },
- {
- name: 'wt-two',
- template: '<span class="wt-two-value">{{value}}</span>'
- }
- ];
- var defaultWidgets = _.clone(widgetDefinitions);
- scope.dashboardOptions = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultWidgets: defaultWidgets,
- sortableOptions: {
- testProperty: 'foobar'
- },
- settingsModalOptions: {
- backdrop: false
- }
- };
- scope.value = 10;
-
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
-
- // element setup
- element = $compile('<div dashboard="dashboardOptions"></div>')(scope);
- scope.$digest();
- childScope = element.scope();
-
- childScope.openWidgetSettings({
- settingsModalOptions: {
- templateUrl: 'custom/widget/template.html'
- }
- });
- expect(modalOptions.controller).toEqual('WidgetSettingsCtrl');
- expect(modalOptions.backdrop).toEqual(false);
- expect(modalOptions.templateUrl).toEqual('custom/widget/template.html');
-
- }));
-
- it('should set the controller to scope.options.settingsModalOptions.controller if provided', function() {
- scope.dashboardOptions.settingsModalOptions = {};
- var expected = scope.dashboardOptions.settingsModalOptions.controller = 'MyCustomCtrl';
- var widget = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.controller).toEqual(expected);
- });
-
- it('should set the controller to widget.settingsModalOptions.controller if provided', function() {
- var expected;
- var widget = {
- settingsModalOptions: {
- controller: expected = 'MyWidgetCtrl'
- }
- };
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.controller).toEqual(expected);
- });
-
- it('should pass in other modal options set in scope.options.settingsModalOptions', function() {
- scope.dashboardOptions.settingsModalOptions = {
- keyboard: false,
- windowClass: 'my-extra-class'
- };
- var widget = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.keyboard).toEqual(false);
- expect(modalOptions.windowClass).toEqual('my-extra-class');
- });
-
- it('should pass in other modal options set in widget.settingsModalOptions', function() {
- scope.dashboardOptions.settingsModalOptions = {
- keyboard: false,
- windowClass: 'my-extra-class'
- };
- var widget = {
- settingsModalOptions: {
- keyboard: true,
- size: 'sm'
- }
- };
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- childScope.openWidgetSettings(widget);
- expect(modalOptions.keyboard).toEqual(true);
- expect(modalOptions.size).toEqual('sm');
- expect(modalOptions.windowClass).toEqual('my-extra-class');
- });
-
- it('should emit a "widgetChanged" event on the childScope when the modal promise is called', function(done) {
- var widget = {};
- var result = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- spyOn(childScope.options, 'onSettingsClose');
- childScope.openWidgetSettings(widget);
- childScope.$on('widgetChanged', done);
- dfr.resolve(result, widget);
- childScope.$digest();
- });
-
- it('should call scope.options.onSettingsClose when the modal promise is resolved by default', function() {
- var widget = {};
- var result = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- spyOn(childScope.options, 'onSettingsClose');
- childScope.openWidgetSettings(widget);
- dfr.resolve(result);
- childScope.$digest();
- expect(scope.dashboardOptions.onSettingsClose).toHaveBeenCalledWith(result, widget, childScope);
- });
-
- it('should call scope.options.onSettingsDismiss when the modal promise is rejected by default', function() {
- var widget = {};
- var result = {};
- var dfr = $q.defer();
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- spyOn(childScope.options, 'onSettingsDismiss');
- childScope.openWidgetSettings(widget);
- dfr.reject('Testing failure');
- childScope.$digest();
- expect(scope.dashboardOptions.onSettingsDismiss).toHaveBeenCalledWith('Testing failure', childScope);
- });
-
- it('should call widget.onSettingsClose if provided when the modal promise is resolved', function() {
- var widget = {
- onSettingsClose: function(result, widget, scope) {
-
- }
- };
- var result = {};
- var dfr = $q.defer();
- spyOn(widget, 'onSettingsClose');
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- spyOn(childScope.options, 'onSettingsClose');
- childScope.openWidgetSettings(widget);
- dfr.resolve(result);
- childScope.$digest();
- expect(scope.dashboardOptions.onSettingsClose).not.toHaveBeenCalled();
- expect(widget.onSettingsClose).toHaveBeenCalledWith(result, widget, childScope);
- });
-
- it('should call widget.onSettingsDismiss if provided when the modal promise is rejected', function() {
- var widget = {
- onSettingsDismiss: function(result, widget, scope) {
-
- }
- };
- var result = {};
- var dfr = $q.defer();
- spyOn(widget, 'onSettingsDismiss');
- spyOn(mockModal, 'open').and.callFake(function(options) {
- modalOptions = options;
- return {
- result: dfr.promise
- };
- });
- spyOn(childScope.options, 'onSettingsDismiss');
- childScope.openWidgetSettings(widget);
- dfr.reject('Testing failure');
- childScope.$digest();
- expect(scope.dashboardOptions.onSettingsDismiss).not.toHaveBeenCalled();
- expect(widget.onSettingsDismiss).toHaveBeenCalledWith('Testing failure', childScope);
- });
-
- });
-
- describe('the default onSettingsClose callback', function() {
-
- var onSettingsClose;
-
- beforeEach(function() {
- onSettingsClose = childScope.options.onSettingsClose;
- });
-
- it('should exist', function() {
- expect(typeof onSettingsClose).toEqual('function');
- });
-
- it('should deep extend widget with result', function() {
- var result = {
- title: 'andy',
- style: {
- 'float': 'left'
- }
- };
- var widget = {
- title: 'scott',
- style: {
- width: '100px'
- }
- };
- onSettingsClose(result, widget, {});
- expect(widget).toEqual({
- title: 'andy',
- style: {
- width: '100px',
- 'float': 'left'
- }
- });
- });
-
- });
-
- describe('the default onSettingsDismiss callback', function() {
-
- var onSettingsDismiss;
-
- beforeEach(function() {
- onSettingsDismiss = childScope.options.onSettingsDismiss;
- });
-
- it('should exist', function() {
- expect(typeof onSettingsDismiss).toEqual('function');
- });
-
- it('should call $log.info with the reason', function() {
- spyOn(mockLog, 'info');
- onSettingsDismiss('dismiss reason');
- expect(mockLog.info).toHaveBeenCalled();
- });
-
- });
-
-});
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-raptor-report-template.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-raptor-report-template.html
deleted file mode 100644
index 7a533c3f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-raptor-report-template.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
- <h3>Widget Options <small>{{widget.title}}</small></h3>
-</div>
-
-<div class="modal-body">
- <form name="form" novalidate class="form-horizontal">
-<!-- <div class="form-group">
- <label for="widgetTitle" class="col-sm-2 control-label">Title</label>
- <div style="margin-left:120px" class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="result.title">
- </div>
- </div> -->
-
-<!-- <div>{{showFormFieldIds}}</div>
-<div>{{formFieldSelectedValues}}</div>
-<div>{{JSON.strigify(widget.reportData.formFieldList)}}</div>
- -->
-<form ng-show="true" class="row section-row" style="margin: 10px">
- <form-builder ng-form-fields="reportData.formFieldList" ng-show-field-id="showFormFieldIds" ng-num-form-cols="reportData.numFormCols" ng-model="formFieldSelectedValues" ng-trigger-method="triggerOtherFormFields"></form-builder>
-</form>
-
-<!-- <div ng-repeat="formfield in widget.reportData.formFieldList">
- <div class="form-group">
- <label for="widgetTitle" class="col-sm-2 control-label">{{formfield.fieldDisplayName}}:</label>
- <div style="margin-left:120px" class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="formfield.title">
- </div>
- </div>
- </div> -->
-<!-- <div ng-repeat="(formfield_key,formfield_value) in widget.reportData.formFieldList[0]" class="form-group">
- <label for="widgetTitle" class="col-sm-2 control-label">{{formfield_key}}</label>
- <div style="margin-left:120px" class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="formfield_value">
- </div>
- </div> -->
-
-
- <div ng-if="widget.settingsModalOptions.partialTemplateUrl"
- ng-include="widget.settingsModalOptions.partialTemplateUrl"></div>
-
-<!--
- <div ng-show="true" id="grid1" ui-grid="gridOptions" ui-grid-pagination ui-grid-pinning ui-grid-resize-columns class="grid" style="height: {{gridHeight}}">
- <div class="no-rows" ng-show="!gridOptions.data.length">
- <div class="msg">
- <span>{{widget.reportData.message}}</span>
- </div>
- </div>
- </div>
- -->
- </form>
-
-</div>
-
-<div class="modal-footer">
- <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
- <button type="button" class="btn btn-primary" ng-click="ok()">OK</button>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html
deleted file mode 100644
index a57d4366..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/widget-settings-template.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
- <h3>Widget Options <small>{{widget.title}}</small></h3>
-</div>
-
-<div class="modal-body">
- <form name="form" novalidate class="form-horizontal">
- <div class="form-group">
- <label for="widgetTitle" class="col-sm-2 control-label">Title</label>
- <div class="col-sm-10">
- <input type="text" class="form-control" name="widgetTitle" ng-model="result.title">
- </div>
- </div>
- <div ng-if="widget.settingsModalOptions.partialTemplateUrl"
- ng-include="widget.settingsModalOptions.partialTemplateUrl"></div>
- </form>
-</div>
-
-<div class="modal-footer">
- <button type="button" class="btn btn-default" ng-click="cancel()">Cancel</button>
- <button type="button" class="btn btn-primary" ng-click="ok()">OK</button>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModal.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModal.html
deleted file mode 100644
index f9f6f361..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModal.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true" ng-click="cancel()">&times;</button>
- <h3>Unsaved Changes to "{{layout.title}}"</h3>
-</div>
-
-<div class="modal-body">
- <p>You have {{layout.dashboard.unsavedChangeCount}} unsaved changes on this dashboard. Would you like to save them?</p>
-</div>
-
-<div class="modal-footer">
- <button type="button" class="btn btn-default" ng-click="cancel()">Don't Save</button>
- <button type="button" class="btn btn-primary" ng-click="ok()">Save</button>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModalCtrl.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModalCtrl.js
deleted file mode 100644
index 252f9df4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModalCtrl.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .controller('SaveChangesModalCtrl', ['$scope', '$uibModalInstance', 'layout', function ($scope, $uibModalInstance, layout) {
-
- // add layout to scope
- $scope.layout = layout;
-
- $scope.ok = function () {
- $uibModalInstance.close();
- };
-
- $scope.cancel = function () {
- $uibModalInstance.dismiss();
- };
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.html
deleted file mode 100644
index 54aef297..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<ul ui-sortable="sortableOptions" ng-model="layouts" class="nav nav-tabs layout-tabs">
- <li ng-repeat="layout in layouts" ng-class="{ active: layout.active }">
- <a ng-click="makeLayoutActive(layout)">
- <span ng-dblclick="editTitle(layout)" ng-show="!layout.editingTitle">{{layout.title}}</span>
- <form action="" class="layout-title" ng-show="layout.editingTitle" ng-submit="saveTitleEdit(layout)">
- <input type="text" ng-model="layout.title" class="form-control" data-layout="{{layout.id}}">
- </form>
- <span ng-if="!layout.locked" ng-click="removeLayout(layout)" class="glyphicon glyphicon-remove icon-erase remove-layout-icon"></span>
- <!-- <span class="glyphicon glyphicon-pencil"></span> -->
- <!-- <span class="glyphicon glyphicon-remove"></span> -->
- </a>
- </li>
- <li>
- <a ng-click="createNewLayout()">
- <span class="glyphicon glyphicon-plus"></span>
- </a>
- </li>
-</ul>
-<div ng-repeat="layout in layouts | filter:isActive" dashboard="layout.dashboard" template-url="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.html"></div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.js
deleted file mode 100644
index bbf107a8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.js
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .directive('dashboardLayouts', ['LayoutStorage', '$timeout', '$uibModal',
- function(LayoutStorage, $timeout, $uibModal) {
- return {
- scope: true,
- templateUrl: function(element, attr) {
- return attr.templateUrl ? attr.templateUrl : 'app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.html';
- },
- link: function(scope, element, attrs) {
-
- scope.options = scope.$eval(attrs.dashboardLayouts);
-
- var layoutStorage = new LayoutStorage(scope.options);
-
- scope.layouts = layoutStorage.layouts;
-
- scope.createNewLayout = function() {
- var newLayout = {
- title: 'Custom',
- defaultWidgets: scope.options.defaultWidgets || []
- };
- layoutStorage.add(newLayout);
- scope.makeLayoutActive(newLayout);
- layoutStorage.save();
- return newLayout;
- };
-
- scope.removeLayout = function(layout) {
- layoutStorage.remove(layout);
- layoutStorage.save();
- };
-
- scope.makeLayoutActive = function(layout) {
-
- var current = layoutStorage.getActiveLayout();
-
- if (current && current.dashboard.unsavedChangeCount) {
- var modalInstance = $uibModal.open({
- templateUrl: 'template/SaveChangesModal.html',
- resolve: {
- layout: function() {
- return layout;
- }
- },
- controller: 'SaveChangesModalCtrl'
- });
-
- // Set resolve and reject callbacks for the result promise
- modalInstance.result.then(
- function() {
- current.dashboard.saveDashboard();
- scope._makeLayoutActive(layout);
- },
- function() {
- scope._makeLayoutActive(layout);
- }
- );
- } else {
- scope._makeLayoutActive(layout);
- }
-
- };
-
- scope._makeLayoutActive = function(layout) {
- angular.forEach(scope.layouts, function(l) {
- if (l !== layout) {
- l.active = false;
- } else {
- l.active = true;
- }
- });
- layoutStorage.save();
- };
-
- scope.isActive = function(layout) {
- return !!layout.active;
- };
-
- scope.editTitle = function(layout) {
- if (layout.locked) {
- return;
- }
-
- var input = element.find('input[data-layout="' + layout.id + '"]');
- layout.editingTitle = true;
-
- $timeout(function() {
- input.focus()[0].setSelectionRange(0, 9999);
- });
- };
-
- // saves whatever is in the title input as the new title
- scope.saveTitleEdit = function(layout) {
- layout.editingTitle = false;
- layoutStorage.save();
- };
-
- scope.options.saveLayouts = function() {
- layoutStorage.save(true);
- };
- scope.options.addWidget = function() {
- var layout = layoutStorage.getActiveLayout();
- if (layout) {
- layout.dashboard.addWidget.apply(layout.dashboard, arguments);
- }
- };
- scope.options.loadWidgets = function() {
- var layout = layoutStorage.getActiveLayout();
- if (layout) {
- layout.dashboard.loadWidgets.apply(layout.dashboard, arguments);
- }
- };
- scope.options.saveDashboard = function() {
- console.log("================= saveDashboard called =================")
- var layout = layoutStorage.getActiveLayout();
- console.log("===================== layout ===========================");
- console.log(layout);
- if (layout) {
- layout.dashboard.saveDashboard.apply(layout.dashboard, arguments);
- }
- };
-
- var sortableDefaults = {
- stop: function() {
- scope.options.saveLayouts();
- },
- distance: 5
- };
- scope.sortableOptions = angular.extend({}, sortableDefaults, scope.options.sortableOptions || {});
- }
- };
- }
- ]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.spec.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.spec.js
deleted file mode 100644
index 8533a211..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.spec.js
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-describe('Directive: dashboard-layouts', function () {
-
- var $rootScope, element, options, childScope, DashboardState, LayoutStorage, $mockModal, $mockTimeout, toFn;
-
- // mock UI Sortable
- beforeEach(function () {
- angular.module('ui.sortable', []);
- });
-
- // load the directive's module
- beforeEach(module('ui.dashboard', function($provide) {
- $mockModal = {
- open: function() {}
- };
- $mockTimeout = function(fn, delay) {
- toFn = fn;
- };
- $provide.value('$uibModal', $mockModal);
- $provide.value('$timeout', $mockTimeout);
- }));
-
- beforeEach(inject(function ($compile, _$rootScope_, _DashboardState_, _LayoutStorage_) {
- // services
- $rootScope = _$rootScope_;
- DashboardState = _DashboardState_;
- LayoutStorage = _LayoutStorage_;
-
- // options
- var widgetDefinitions = [
- {
- name: 'wt-one',
- template: '<div class="wt-one-value">{{2 + 2}}</div>'
- },
- {
- name: 'wt-two',
- template: '<span class="wt-two-value">{{value}}</span>'
- }
- ];
- var defaultWidgets = _.clone(widgetDefinitions);
- $rootScope.dashboardOptions = options = {
- widgetButtons: true,
- widgetDefinitions: widgetDefinitions,
- defaultLayouts: [
- {
- title: 'first',
- active: true,
- defaultWidgets: defaultWidgets
- },
- {
- title: 'second',
- active: false,
- defaultWidgets: defaultWidgets
- }
- ],
- defaultWidgets: defaultWidgets,
- storage: {
- setItem: function(key, val) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- }
- };
- $rootScope.value = 10;
-
- // element setup
- element = $compile('<div dashboard-layouts="dashboardOptions"></div>')($rootScope);
- $rootScope.$digest();
- childScope = element.scope();
- }));
-
- it('should not require storage', inject(function($compile) {
- delete $rootScope.dashboardOptions.storage;
- expect(function() {
- var noStorageEl = $compile('<div dashboard-layouts="dashboardOptions"></div>')($rootScope);
- $rootScope.$digest();
- }).not.toThrow();
-
- }));
-
- it('should be able to use a different dashboard-layouts template', inject(function($compile, $templateCache) {
- $templateCache.put(
- 'myCustomTemplate.html',
- '<ul class="my-custom-tabs layout-tabs">' +
- '<li ng-repeat="layout in layouts" ng-class="{ active: layout.active }">' +
- '<a ng-click="makeLayoutActive(layout)">' +
- '<span ng-dblclick="editTitle(layout)" ng-show="!layout.editingTitle">{{layout.title}}</span>' +
- '<form action="" class="layout-title" ng-show="layout.editingTitle" ng-submit="saveTitleEdit(layout)">' +
- '<input type="text" ng-model="layout.title" class="form-control" data-layout="{{layout.id}}">' +
- '</form>' +
- '<span ng-click="removeLayout(layout)" class="glyphicon glyphicon-remove icon-erase"></span>' +
- '<!-- <span class="glyphicon glyphicon-pencil"></span> -->' +
- '<!-- <span class="glyphicon glyphicon-remove"></span> -->' +
- '</a>' +
- '</li>' +
- '<li>' +
- '<a ng-click="createNewLayout()">' +
- '<span class="glyphicon glyphicon-plus"></span>' +
- '</a>' +
- '</li>' +
- '</ul>' +
- '<div ng-repeat="layout in layouts | filter:isActive" dashboard="layout.dashboard" templateUrl="template/dashboard.html"></div>'
- );
- var customElement = $compile('<div dashboard-layouts="dashboardOptions" template-url="myCustomTemplate.html"></div>')($rootScope);
- $rootScope.$digest();
- expect(customElement.find('ul.my-custom-tabs').length).toEqual(1);
-
- }));
-
- it('should set the first dashboard to active if there is not one already active', inject(function($compile) {
- options.defaultLayouts[0].active = options.defaultLayouts[1].active = false;
- element = $compile('<div dashboard-layouts="dashboardOptions"></div>')($rootScope);
- $rootScope.$digest();
- childScope = element.scope();
-
- var layouts = childScope.layouts;
- var active;
- for (var i = 0; i < layouts.length; i++) {
- if (layouts[i].active) {
- active = layouts[i];
- break;
- }
- };
- expect(active).not.toBeUndefined();
- }));
-
- describe('the createNewLayout method', function() {
-
- it('should call the add and save methods of LayoutStorage', function() {
- spyOn(LayoutStorage.prototype, 'add');
- spyOn(LayoutStorage.prototype, 'save');
-
- childScope.createNewLayout();
- expect(LayoutStorage.prototype.add).toHaveBeenCalled();
- expect(LayoutStorage.prototype.save).toHaveBeenCalled();
- });
-
- it('should return the newly created layout object', function() {
- var result = childScope.createNewLayout();
- expect(typeof result).toEqual('object');
- });
-
- it('should set active=true on the newly created layout', function() {
- var result = childScope.createNewLayout();
- expect(result.active).toEqual(true);
- });
-
- it('should set defaultWidgets to dashboardOptions.defaultWidgets if it is present', function() {
- var result = childScope.createNewLayout();
- expect(result.defaultWidgets === options.defaultWidgets).toEqual(true);
- });
-
- it('should set defaultWidgets to an empty array if dashboardOptions.defaultWidgets is not present', inject(function($compile) {
- delete options.defaultWidgets;
- element = $compile('<div dashboard-layouts="dashboardOptions"></div>')($rootScope);
- $rootScope.$digest();
- childScope = element.scope();
- var result = childScope.createNewLayout();
- expect(result.defaultWidgets).toEqual([]);
- }));
-
- });
-
- describe('the removeLayout method', function() {
-
- it('should call the remove and save methods of LayoutStorage', function() {
- spyOn(LayoutStorage.prototype, 'remove');
- spyOn(LayoutStorage.prototype, 'save');
-
- childScope.removeLayout(childScope.layouts[0]);
- expect(LayoutStorage.prototype.remove).toHaveBeenCalled();
- expect(LayoutStorage.prototype.save).toHaveBeenCalled();
- });
-
- it('should call remove with the layout it was passed', function() {
- spyOn(LayoutStorage.prototype, 'remove');
- var layout = childScope.layouts[0];
- childScope.removeLayout(layout);
- expect(LayoutStorage.prototype.remove.calls.argsFor(0)[0]).toEqual(layout);
- });
-
- });
-
- describe('the makeLayoutActive method', function() {
-
- it('should call _makeLayoutActive if there is not a currently active dashboard with unsaved changes', function() {
- spyOn(childScope, '_makeLayoutActive');
- var layout = childScope.layouts[1];
- childScope.makeLayoutActive(layout);
- expect(childScope._makeLayoutActive).toHaveBeenCalled();
- });
-
- describe('when there are unsaved changes on the current dashboard', function() {
-
- var current, options, successCb, errorCb, layout;
-
- beforeEach(function() {
- current = childScope.layouts[0];
- current.dashboard.unsavedChangeCount = 1;
-
- spyOn($mockModal, 'open').and.callFake(function(arg) {
- options = arg;
- return {
- result: {
- then: function(success, error) {
- successCb = success;
- errorCb = error;
- }
- }
- }
- });
-
- layout = childScope.layouts[1];
- childScope.makeLayoutActive(layout);
- });
-
- it('should create a modal', function() {
- expect($mockModal.open).toHaveBeenCalled();
- });
-
- it('should resolve layout to the layout to be made active', function() {
- expect(options.resolve.layout()).toEqual(layout);
- });
-
- it('should provide a success callback that saves the current dashboard and then calls _makeLayoutActive', function() {
- spyOn(current.dashboard, 'saveDashboard');
- spyOn(childScope, '_makeLayoutActive');
- successCb();
- expect(current.dashboard.saveDashboard).toHaveBeenCalled();
- expect(childScope._makeLayoutActive).toHaveBeenCalled();
- expect(childScope._makeLayoutActive.calls.argsFor(0)[0]).toEqual(layout);
- });
-
- it('should provide an error callback that only calls _makeLayoutActive', function() {
- spyOn(current.dashboard, 'saveDashboard');
- spyOn(childScope, '_makeLayoutActive');
- errorCb();
- expect(current.dashboard.saveDashboard).not.toHaveBeenCalled();
- expect(childScope._makeLayoutActive).toHaveBeenCalled();
- expect(childScope._makeLayoutActive.calls.argsFor(0)[0]).toEqual(layout);
- });
-
- });
-
- });
-
- describe('the editTitle method', function() {
-
- it('should set the editingTitle attribute to true on the layout it is passed', function() {
- var layout = { id: '1' };
- childScope.editTitle(layout);
- $rootScope.$digest();
- expect(layout.editingTitle).toEqual(true);
- toFn();
- });
-
- });
-
- describe('the saveTitleEdit method', function() {
-
- it('should set editingTitle to false', function() {
- var layout = { id: '1' };
- childScope.saveTitleEdit(layout);
- expect(layout.editingTitle).toEqual(false);
- });
-
- it('should call layoutStorage.save', function() {
- var layout = { id: '1' };
- spyOn(LayoutStorage.prototype, 'save').and.callThrough();
- childScope.saveTitleEdit(layout);
- expect(LayoutStorage.prototype.save).toHaveBeenCalled();
- });
-
- });
-
- describe('the saveLayouts method', function() {
-
- it('should call LayoutStorage.save', function() {
- spyOn(LayoutStorage.prototype, 'save').and.callThrough();
- $rootScope.dashboardOptions.saveLayouts();
- expect(LayoutStorage.prototype.save).toHaveBeenCalled();
- });
-
- it('should call LayoutStorage.save with true as the first arg', function() {
- spyOn(LayoutStorage.prototype, 'save').and.callThrough();
- $rootScope.dashboardOptions.saveLayouts();
- expect(LayoutStorage.prototype.save.calls.argsFor(0)[0]).toEqual(true);
- });
-
- });
- describe('the proxy methods to active layout', function() {
-
- var mockDash, galSpy;
-
- beforeEach(function() {
- mockDash = {
- active: true,
- dashboard: {
- addWidget: function() {},
- loadWidgets: function() {},
- saveDashboard: function() {}
- }
- };
- spyOn(mockDash.dashboard, 'addWidget');
- spyOn(mockDash.dashboard, 'loadWidgets');
- spyOn(mockDash.dashboard, 'saveDashboard');
- galSpy = spyOn(LayoutStorage.prototype, 'getActiveLayout').and;
- galSpy.returnValue(mockDash);
- });
-
- describe('the addWidget method', function() {
-
- it('should call dashboard.addWidget method of the active layout', function() {
- options.addWidget(1,2,3);
- expect(mockDash.dashboard.addWidget).toHaveBeenCalled();
- var firstCall = mockDash.dashboard.addWidget.calls.first();
- expect(firstCall.object).toEqual(mockDash.dashboard);
- expect(firstCall.args).toEqual([1,2,3]);
- });
-
- it('should do nothing if there is no active layout', function() {
- galSpy.returnValue(null);
- expect(function() {
- options.addWidget();
- }).not.toThrow();
- });
-
- });
-
- describe('the loadWidgets method', function() {
-
- it('should call dashboard.loadWidgets of the current layout', function() {
- options.loadWidgets(1,2,3);
- expect(mockDash.dashboard.loadWidgets).toHaveBeenCalled();
- var firstCall = mockDash.dashboard.loadWidgets.calls.first();
- expect(firstCall.object).toEqual(mockDash.dashboard);
- expect(firstCall.args).toEqual([1,2,3]);
- });
-
- it('should do nothing if there is no active layout', function() {
- galSpy.returnValue(null);
- expect(function() {
- options.loadWidgets();
- }).not.toThrow();
- });
-
- });
-
- describe('the saveDashboard method', function() {
-
- it('should call dashboard.saveDashboard of the current layout', function() {
- options.saveDashboard(1,2,3);
- expect(mockDash.dashboard.saveDashboard).toHaveBeenCalled();
- var firstCall = mockDash.dashboard.saveDashboard.calls.first();
- expect(firstCall.object).toEqual(mockDash.dashboard);
- expect(firstCall.args).toEqual([1,2,3]);
- });
-
- it('should do nothing if there is no active layout', function() {
- galSpy.returnValue(null);
- expect(function() {
- options.saveDashboard();
- }).not.toThrow();
- });
-
- });
-
- });
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.js
deleted file mode 100644
index 9ac57b19..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.js
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .controller('DashboardWidgetCtrl', ['$scope', '$element', '$compile', '$window', '$timeout',
- function($scope, $element, $compile, $window, $timeout) {
-
- $scope.status = {
- isopen: false
- };
-
- // Fills "container" with compiled view
- $scope.makeTemplateString = function() {
-
- var widget = $scope.widget;
-
- // First, build template string
- var templateString = '';
-
- if (widget.templateUrl) {
-
- // Use ng-include for templateUrl
- templateString = '<div ng-include="\'' + widget.templateUrl + '\'"></div>';
-
- } else if (widget.template) {
-
- // Direct string template
- templateString = widget.template;
-
- } else {
-
- // Assume attribute directive
- templateString = '<div ' + widget.directive;
-
- // Check if data attribute was specified
- if (widget.dataAttrName) {
- widget.attrs = widget.attrs || {};
- widget.attrs[widget.dataAttrName] = 'widgetData';
- }
-
- // Check for specified attributes
- if (widget.attrs) {
-
- // First check directive name attr
- if (widget.attrs[widget.directive]) {
- templateString += '="' + widget.attrs[widget.directive] + '"';
- }
-
- // Add attributes
- _.each(widget.attrs, function(value, attr) {
-
- // make sure we aren't reusing directive attr
- if (attr !== widget.directive) {
- templateString += ' ' + attr + '="' + value + '"';
- }
-
- });
- }
- templateString += '></div>';
- }
- return templateString;
- };
-
- $scope.grabResizer = function(e) {
-
- var widget = $scope.widget;
- var widgetElm = $element.find('.widget');
-
- // ignore middle- and right-click
- if (e.which !== 1) {
- return;
- }
-
- e.stopPropagation();
- e.originalEvent.preventDefault();
-
- // get the starting horizontal position
- var initX = e.clientX;
- // console.log('initX', initX);
-
- // Get the current width of the widget and dashboard
- var pixelWidth = widgetElm.width();
- var pixelHeight = widgetElm.height();
- var widgetStyleWidth = widget.containerStyle.width;
- var widthUnits = widget.widthUnits;
- var unitWidth = parseFloat(widgetStyleWidth);
-
- // create marquee element for resize action
- var $marquee = angular.element('<div class="widget-resizer-marquee" style="height: ' + pixelHeight + 'px; width: ' + pixelWidth + 'px; z-index:'+ 200 +';"></div>');
- widgetElm.append($marquee);
- // create an overlaying div to block other widgets in order to stop their iframe events from being triggered
- var $marquee2 = angular.element('<div style=" position: absolute; top: 0; left: 0; height: ' + pixelHeight + 'px; width: ' + (pixelWidth+200) + 'px; z-index:'+ 100 +';"></div>');
- widgetElm.append($marquee2);
-
- // determine the unit/pixel ratio
- var transformMultiplier = unitWidth / pixelWidth;
-
- // updates marquee with preview of new width
- var mousemove = function(e) {
- var curX = e.clientX;
-// console.log(curX);
-// console.log(e);
- var pixelChange = curX - initX;
- var newWidth = pixelWidth + pixelChange;
- $marquee.css('width', newWidth + 'px');
- $marquee2.css('width', (newWidth + 200) + 'px');
-
- };
-
- // sets new widget width on mouseup
- var mouseup = function(e) {
- // remove listener and marquee
- jQuery($window).off('mousemove', mousemove);
- $marquee.remove();
- $marquee2.remove();
-
- // calculate change in units
- var curX = e.clientX;
- var pixelChange = curX - initX;
- var unitChange = Math.round(pixelChange * transformMultiplier * 100) / 100;
-
- // add to initial unit width
- var newWidth = unitWidth * 1 + unitChange;
- widget.setWidth(newWidth, widthUnits);
- $scope.$emit('widgetChanged', widget);
- $scope.$apply();
- $scope.$broadcast('widgetResized', {
- width: newWidth
- });
- };
-
-// jQuery($window).on('mousemove', mousemove).one('mouseup', mouseup);
- jQuery($window).on('mousemove', mousemove).one('mouseup', mouseup);
- };
-
- //TODO refactor
- $scope.grabSouthResizer = function(e) {
- var widgetElm = $element.find('.widget');
-
- // ignore middle- and right-click
- if (e.which !== 1) {
- return;
- }
-
- e.stopPropagation();
- e.originalEvent.preventDefault();
-
- // get the starting horizontal position
- var initY = e.clientY;
- // console.log('initX', initX);
-
- // Get the current width of the widget and dashboard
- var pixelWidth = widgetElm.width();
- var pixelHeight = widgetElm.height();
-
- // create marquee element for resize action
- var $marquee = angular.element('<div class="widget-resizer-marquee" style="height: ' + pixelHeight + 'px; width: ' + pixelWidth + 'px;"></div>');
- widgetElm.append($marquee);
-
- // updates marquee with preview of new height
- var mousemove = function(e) {
- var curY = e.clientY;
- var pixelChange = curY - initY;
- var newHeight = pixelHeight + pixelChange;
- $marquee.css('height', newHeight + 'px');
- };
-
- // sets new widget width on mouseup
- var mouseup = function(e) {
- // remove listener and marquee
- jQuery($window).off('mousemove', mousemove);
- $marquee.remove();
-
- // calculate height change
- var curY = e.clientY;
- var pixelChange = curY - initY;
-
- //var widgetContainer = widgetElm.parent(); // widget container responsible for holding widget width and height
- var widgetContainer = widgetElm.find('.widget-content');
-
- var diff = pixelChange;
- var height = parseInt(widgetContainer.css('height'), 10);
- var newHeight = (height + diff);
-
- //$scope.widget.style.height = newHeight + 'px';
-
- $scope.widget.setHeight(newHeight + 'px');
-
- $scope.$emit('widgetChanged', $scope.widget);
- $scope.$apply(); // make AngularJS to apply style changes
-
- $scope.$broadcast('widgetResized', {
- height: newHeight
- });
- };
-
- jQuery($window).on('mousemove', mousemove).one('mouseup', mouseup);
- };
-
- // replaces widget title with input
- $scope.editTitle = function(widget) {
- var widgetElm = $element.find('.widget');
- widget.editingTitle = true;
- // HACK: get the input to focus after being displayed.
- $timeout(function() {
- widgetElm.find('form.widget-title input:eq(0)').focus()[0].setSelectionRange(0, 9999);
- });
- };
-
- // saves whatever is in the title input as the new title
- $scope.saveTitleEdit = function(widget) {
- widget.editingTitle = false;
- $scope.$emit('widgetChanged', widget);
- };
-
- $scope.compileTemplate = function() {
- var container = $scope.findWidgetContainer($element);
- var templateString = $scope.makeTemplateString();
- var widgetElement = angular.element(templateString);
-
- container.empty();
- container.append(widgetElement);
- $compile(widgetElement)($scope);
- };
-
- $scope.findWidgetContainer = function(element) {
- // widget placeholder is the first (and only) child of .widget-content
- return element.find('.widget-content');
- };
- }
- ]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.spec.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.spec.js
deleted file mode 100644
index 55604646..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.spec.js
+++ /dev/null
@@ -1,164 +0,0 @@
-'use strict';
-
-describe('Controller: DashboardWidgetCtrl', function() {
-
- var $scope, $element, $timeout, injections;
-
- beforeEach(module('ui.dashboard'));
-
- beforeEach(inject(function($rootScope, $controller){
- $scope = $rootScope.$new();
- $element = angular.element('<div><div class="widget"></div></div>');
- $timeout = function timeout(fn) {
- fn();
- };
- injections = {
- $scope: $scope,
- $element: $element,
- $timeout: $timeout
- };
- spyOn(injections, '$timeout');
- $controller('DashboardWidgetCtrl', injections);
- }));
-
- describe('the makeTemplateString method', function() {
-
- it('should return a string', function() {
- $scope.widget = {
- templateUrl: 'some/template.html'
- };
- expect(typeof $scope.makeTemplateString()).toEqual('string');
- });
-
- it('should use ng-include if templateUrl is specified on widget, despite any other options', function() {
- $scope.widget = {
- templateUrl: 'some/template.html',
- template: 'not this one',
- directive: 'or-this',
- attrs: {
- something: 'awesome',
- other: 'thing'
- }
- };
- expect($scope.makeTemplateString()).toMatch(/ng-include="'some\/template\.html'"/);
- });
-
- it('should return widget.template if specified, regardless of presence of directive or attrs', function() {
- $scope.widget = {
- template: '<div class="testing"></div>',
- directive: 'no-good'
- };
- expect($scope.makeTemplateString()).toEqual($scope.widget.template);
- });
-
- it('should use widget.directive as attribute directive', function() {
- $scope.widget = {
- directive: 'ng-awesome'
- };
- expect($scope.makeTemplateString()).toEqual('<div ng-awesome></div>');
- });
-
- it('should attach attributes if provided', function() {
- $scope.widget = {
- directive: 'ng-awesome',
- attrs: {
- 'ng-awesome': 'test1',
- other: 'attr',
- more: 'stuff'
- }
- };
- expect($scope.makeTemplateString()).toEqual('<div ng-awesome="test1" other="attr" more="stuff"></div>');
- });
-
- it('should place widgetData into dataAttrName attribute if specified', function() {
- $scope.widget = {
- directive: 'ng-awesome',
- attrs: {
- 'ng-awesome': 'test1',
- other: 'attr',
- more: 'stuff'
- },
- dataAttrName: 'data'
- };
- expect($scope.makeTemplateString()).toEqual('<div ng-awesome="test1" other="attr" more="stuff" data="widgetData"></div>');
- });
-
- it('should add attrs to the widget object if it does not exist and dataAttrName is specified', function() {
- $scope.widget = {
- directive: 'ng-awesome',
- dataAttrName: 'data'
- };
- expect($scope.makeTemplateString()).toEqual('<div ng-awesome data="widgetData"></div>');
- });
-
- });
-
- describe('the grabResizer method', function() {
-
- var evt, widget, WidgetModel;
-
- beforeEach(inject(function (_WidgetModel_) {
- WidgetModel = _WidgetModel_;
- }));
-
- beforeEach(function() {
- evt = {
- stopPropagation: jasmine.createSpy('stopPropagation'),
- originalEvent: {
- preventDefault: jasmine.createSpy('preventDefault')
- },
- clientX: 100,
- which: 1
- };
- $scope.widget = widget = new WidgetModel({
- style: {
- width: '30%'
- }
- });
- });
-
- it('should do nothing if event.which is not 1 (left click)', function() {
- evt.which = 2;
- $scope.grabResizer(evt);
- expect(evt.stopPropagation).not.toHaveBeenCalled();
- });
-
- it('should call stopPropagation and preventDefault', function() {
- $scope.grabResizer(evt);
- expect(evt.stopPropagation).toHaveBeenCalled();
- expect(evt.originalEvent.preventDefault).toHaveBeenCalled();
- });
-
- it('should add a .widget-resizer-marquee element to the .widget element', function() {
- $scope.grabResizer(evt);
- expect($element.find('.widget-resizer-marquee').length).toBeGreaterThan(0);
- });
-
- });
-
- describe('the editTitle method', function() {
-
- it('should set editingTitle=true on the widget object', function() {
- var widget = {};
- $scope.editTitle(widget);
- expect(widget.editingTitle).toEqual(true);
- });
-
- it('should call $timeout', function() {
- var widget = {};
- $scope.editTitle(widget);
- expect(injections.$timeout).toHaveBeenCalled();
- });
-
- });
-
- describe('the saveTitleEdit method', function() {
-
- it('should set editingTitle=false', function() {
- var widget = { editingTitle: true };
- $scope.saveTitleEdit(widget);
- expect(widget.editingTitle).toEqual(false);
- });
- });
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.js
deleted file mode 100644
index f5a6ebef..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.js
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .directive('widget', ['$injector', function ($injector) {
-
- return {
-
- controller: 'DashboardWidgetCtrl',
-
- link: function (scope) {
-
- var widget = scope.widget;
- var dataModelType = widget.dataModelType;
-
- // set up data source
- if (dataModelType) {
- var DataModelConstructor; // data model constructor function
-
- if (angular.isFunction(dataModelType)) {
- DataModelConstructor = dataModelType;
- } else if (angular.isString(dataModelType)) {
- $injector.invoke([dataModelType, function (DataModelType) {
- DataModelConstructor = DataModelType;
- }]);
- } else {
- throw new Error('widget dataModelType should be function or string');
- }
-
- var ds;
- if (widget.dataModelArgs) {
- ds = new DataModelConstructor(widget.dataModelArgs);
- } else {
- ds = new DataModelConstructor();
- }
- widget.dataModel = ds;
- ds.setup(widget, scope);
- ds.init();
- scope.$on('$destroy', _.bind(ds.destroy,ds));
- }
-
- // Compile the widget template, emit add event
- scope.compileTemplate();
- scope.$emit('widgetAdded', widget);
-
- }
-
- };
- }]);
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.spec.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.spec.js
deleted file mode 100644
index 0997e071..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.spec.js
+++ /dev/null
@@ -1,104 +0,0 @@
-// 'use strict';
-
-describe('Directive: widget', function () {
-
- var element, scope, rootScope, isoScope, compile, provide;
-
- function Type() {
- }
-
- Type.prototype = {
- setup: function () {
- },
- init: function () {
- },
- destroy: function () {
- }
- };
-
- beforeEach(function () {
- spyOn(Type.prototype, 'setup');
- spyOn(Type.prototype, 'init');
- spyOn(Type.prototype, 'destroy');
- // define mock objects here
- });
-
- // load the directive's module
- beforeEach(module('ui.dashboard', function ($provide, $controllerProvider) {
- provide = $provide;
- // Inject dependencies like this:
- $controllerProvider.register('DashboardWidgetCtrl', function ($scope) {
-
- });
-
- }));
-
- beforeEach(inject(function ($compile, $rootScope) {
- // Cache these for reuse
- rootScope = $rootScope;
- compile = $compile;
-
- // Other setup, e.g. helper functions, etc.
-
- // Set up the outer scope
- scope = $rootScope.$new();
- scope.widget = {
- dataModelType: Type
- };
-
- compileTemplate = jasmine.createSpy('compileTemplate');
- scope.compileTemplate = compileTemplate;
- }));
-
- function compileWidget() {
- // Define and compile the element
- element = angular.element('<div widget><div class="widget-content"></div></div>');
- element = compile(element)(scope);
- scope.$digest();
- isoScope = element.isolateScope();
- }
-
- it('should create a new instance of dataModelType if provided in scope.widget', function () {
- compileWidget();
- expect(scope.widget.dataModel instanceof Type).toBe(true);
- });
-
- it('should call setup and init on the new dataModel', function () {
- compileWidget();
- expect(Type.prototype.setup).toHaveBeenCalled();
- expect(Type.prototype.init).toHaveBeenCalled();
- });
-
- it('should call compile template', function () {
- compileWidget();
- expect(scope.compileTemplate).toHaveBeenCalled();
- });
-
- it('should create a new instance of dataModelType from string name', function () {
- // register data model with $injector
- provide.factory('StringNameDataModel', function () {
- return Type;
- });
-
- scope.widget = {
- dataModelType: 'StringNameDataModel'
- };
-
- compileWidget();
-
- expect(scope.widget.dataModel instanceof Type).toBe(true);
- expect(Type.prototype.setup).toHaveBeenCalled();
- expect(Type.prototype.init).toHaveBeenCalled();
- });
-
- it('should validate data model type', function () {
- scope.widget = {
- dataModelType: {}
- };
-
- expect(function () {
- compileWidget()
- }).toThrowError();
- });
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/DashboardState.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/DashboardState.js
deleted file mode 100644
index 67948ead..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/DashboardState.js
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .factory('DashboardState', ['$log', '$q', function ($log, $q) {
- function DashboardState(storage, id, hash, widgetDefinitions, stringify) {
- this.storage = storage;
- this.id = id;
- this.hash = hash;
- this.widgetDefinitions = widgetDefinitions;
- this.stringify = stringify;
- }
-
- DashboardState.prototype = {
- /**
- * Takes array of widget instance objects, serializes,
- * and saves state.
- *
- * @param {Array} widgets scope.widgets from dashboard directive
- * @return {Boolean} true on success, false on failure
- */
- save: function (widgets) {
-
- if (!this.storage) {
- return true;
- }
-
- var serialized = _.map(widgets, function (widget) {
- return widget.serialize();
- });
-
- var item = { widgets: serialized, hash: this.hash };
-
- if (this.stringify) {
- item = JSON.stringify(item);
- }
-
- this.storage.setItem(this.id, item);
- return true;
- },
-
- /**
- * Loads dashboard state from the storage object.
- * Can handle a synchronous response or a promise.
- *
- * @return {Array|Promise} Array of widget definitions or a promise
- */
- load: function () {
-
- if (!this.storage) {
- return null;
- }
-
- var serialized;
-
- // try loading storage item
- serialized = this.storage.getItem( this.id );
-
- if (serialized) {
- // check for promise
- if (angular.isObject(serialized) && angular.isFunction(serialized.then)) {
- return this._handleAsyncLoad(serialized);
- }
- // otherwise handle synchronous load
- return this._handleSyncLoad(serialized);
- } else {
- return null;
- }
- },
-
- _handleSyncLoad: function(serialized) {
-
- var deserialized, result = [];
-
- if (!serialized) {
- return null;
- }
-
- if (this.stringify) {
- try { // to deserialize the string
-
- deserialized = JSON.parse(serialized);
-
- } catch (e) {
-
- // bad JSON, log a warning and return
- $log.warn('Serialized dashboard state was malformed and could not be parsed: ', serialized);
- return null;
-
- }
- }
- else {
- deserialized = serialized;
- }
-
- // check hash against current hash
- if (deserialized.hash !== this.hash) {
-
- $log.info('Serialized dashboard from storage was stale (old hash: ' + deserialized.hash + ', new hash: ' + this.hash + ')');
- this.storage.removeItem(this.id);
- return null;
-
- }
-
- // Cache widgets
- var savedWidgetDefs = deserialized.widgets;
-
- // instantiate widgets from stored data
- for (var i = 0; i < savedWidgetDefs.length; i++) {
-
- // deserialized object
- var savedWidgetDef = savedWidgetDefs[i];
-
- // widget definition to use
- var widgetDefinition = this.widgetDefinitions.getByName(savedWidgetDef.name);
-
- // check for no widget
- if (!widgetDefinition) {
- // no widget definition found, remove and return false
- $log.warn('Widget with name "' + savedWidgetDef.name + '" was not found in given widget definition objects');
- continue;
- }
-
- // check widget-specific storageHash
- if (widgetDefinition.hasOwnProperty('storageHash') && widgetDefinition.storageHash !== savedWidgetDef.storageHash) {
- // widget definition was found, but storageHash was stale, removing storage
- $log.info('Widget Definition Object with name "' + savedWidgetDef.name + '" was found ' +
- 'but the storageHash property on the widget definition is different from that on the ' +
- 'serialized widget loaded from storage. hash from storage: "' + savedWidgetDef.storageHash + '"' +
- ', hash from WDO: "' + widgetDefinition.storageHash + '"');
- continue;
- }
-
- // push instantiated widget to result array
- result.push(savedWidgetDef);
- }
-
- return result;
- },
-
- _handleAsyncLoad: function(promise) {
- var self = this;
- var deferred = $q.defer();
- promise.then(
- // success
- function(res) {
- var result = self._handleSyncLoad(res);
- if (result) {
- deferred.resolve(result);
- } else {
- deferred.reject(result);
- }
- },
- // failure
- function(res) {
- deferred.reject(res);
- }
- );
-
- return deferred.promise;
- }
-
- };
- return DashboardState;
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.js
deleted file mode 100644
index 3685fd3f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.js
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .factory('LayoutStorage', function() {
-
- var noopStorage = {
- setItem: function() {
-
- },
- getItem: function() {
-
- },
- removeItem: function() {
-
- }
- };
-
-
-
- function LayoutStorage(options) {
-
- var defaults = {
- storage: noopStorage,
- storageHash: '',
- stringifyStorage: true
- };
-
- angular.extend(defaults, options);
- angular.extend(options, defaults);
-
- this.id = options.storageId;
- this.storage = options.storage;
- this.storageHash = options.storageHash;
- this.stringifyStorage = options.stringifyStorage;
- this.widgetDefinitions = options.widgetDefinitions;
- this.defaultLayouts = options.defaultLayouts;
- this.lockDefaultLayouts = options.lockDefaultLayouts;
- this.widgetButtons = options.widgetButtons;
- this.explicitSave = options.explicitSave;
- this.defaultWidgets = options.defaultWidgets;
- this.settingsModalOptions = options.settingsModalOptions;
- this.onSettingsClose = options.onSettingsClose;
- this.onSettingsDismiss = options.onSettingsDismiss;
- this.options = options;
- this.options.unsavedChangeCount = 0;
-
- this.layouts = [];
- this.states = {};
- this.load();
- this._ensureActiveLayout();
- }
-
- LayoutStorage.prototype = {
-
- add: function(layouts) {
- if (!angular.isArray(layouts)) {
- layouts = [layouts];
- }
- var self = this;
- angular.forEach(layouts, function(layout) {
- layout.dashboard = layout.dashboard || {};
- layout.dashboard.storage = self;
- layout.dashboard.storageId = layout.id = self._getLayoutId.call(self,layout);
- layout.dashboard.widgetDefinitions = layout.widgetDefinitions || self.widgetDefinitions;
- layout.dashboard.stringifyStorage = false;
- layout.dashboard.defaultWidgets = layout.defaultWidgets || self.defaultWidgets;
- layout.dashboard.widgetButtons = self.widgetButtons;
- layout.dashboard.explicitSave = self.explicitSave;
- layout.dashboard.settingsModalOptions = self.settingsModalOptions;
- layout.dashboard.onSettingsClose = self.onSettingsClose;
- layout.dashboard.onSettingsDismiss = self.onSettingsDismiss;
- self.layouts.push(layout);
- });
- },
-
- remove: function(layout) {
- var index = this.layouts.indexOf(layout);
- if (index >= 0) {
- this.layouts.splice(index, 1);
- delete this.states[layout.id];
-
- // check for active
- if (layout.active && this.layouts.length) {
- var nextActive = index > 0 ? index - 1 : 0;
- this.layouts[nextActive].active = true;
- }
- }
- },
-
- save: function() {
-
- var state = {
- layouts: this._serializeLayouts(),
- states: this.states,
- storageHash: this.storageHash
- };
-
- if (this.stringifyStorage) {
- state = JSON.stringify(state);
- }
-
- this.storage.setItem(this.id, state);
- this.options.unsavedChangeCount = 0;
- },
-
- load: function() {
-
- var serialized = this.storage.getItem(this.id);
-
- this.clear();
-
- if (serialized) {
- // check for promise
- if (angular.isObject(serialized) && angular.isFunction(serialized.then)) {
- this._handleAsyncLoad(serialized);
- } else {
- this._handleSyncLoad(serialized);
- }
- } else {
- this._addDefaultLayouts();
- }
- },
-
- clear: function() {
- this.layouts = [];
- this.states = {};
- },
-
- setItem: function(id, value) {
- this.states[id] = value;
- this.save();
- },
-
- getItem: function(id) {
- return this.states[id];
- },
-
- removeItem: function(id) {
- delete this.states[id];
- this.save();
- },
-
- getActiveLayout: function() {
- var len = this.layouts.length;
- for (var i = 0; i < len; i++) {
- var layout = this.layouts[i];
- if (layout.active) {
- return layout;
- }
- }
- return false;
- },
-
- _addDefaultLayouts: function() {
- var self = this;
- var defaults = this.lockDefaultLayouts ? { locked: true } : {};
- angular.forEach(this.defaultLayouts, function(layout) {
- self.add(angular.extend(_.clone(defaults), layout));
- });
- },
-
- _serializeLayouts: function() {
- var result = [];
- angular.forEach(this.layouts, function(l) {
- result.push({
- title: l.title,
- id: l.id,
- active: l.active,
- locked: l.locked,
- defaultWidgets: l.dashboard.defaultWidgets
- });
- });
- return result;
- },
-
- _handleSyncLoad: function(serialized) {
-
- var deserialized;
-
- if (this.stringifyStorage) {
- try {
-
- deserialized = JSON.parse(serialized);
-
- } catch (e) {
- this._addDefaultLayouts();
- return;
- }
- } else {
-
- deserialized = serialized;
-
- }
-
- if (this.storageHash !== deserialized.storageHash) {
- this._addDefaultLayouts();
- return;
- }
- this.states = deserialized.states;
- this.add(deserialized.layouts);
- },
-
- _handleAsyncLoad: function(promise) {
- var self = this;
- promise.then(
- angular.bind(self, this._handleSyncLoad),
- angular.bind(self, this._addDefaultLayouts)
- );
- },
-
- _ensureActiveLayout: function() {
- for (var i = 0; i < this.layouts.length; i++) {
- var layout = this.layouts[i];
- if (layout.active) {
- return;
- }
- }
- if (this.layouts[0]) {
- this.layouts[0].active = true;
- }
- },
-
- _getLayoutId: function(layout) {
- if (layout.id) {
- return layout.id;
- }
- var max = 0;
- for (var i = 0; i < this.layouts.length; i++) {
- var id = this.layouts[i].id;
- max = Math.max(max, id * 1);
- }
- return max + 1;
- }
-
- };
- return LayoutStorage;
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.spec.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.spec.js
deleted file mode 100644
index 3310cad9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.spec.js
+++ /dev/null
@@ -1,692 +0,0 @@
-'use strict';
-
-describe('Factory: LayoutStorage', function () {
-
- // mock UI Sortable
- beforeEach(function () {
- angular.module('ui.sortable', []);
- });
-
- // load the service's module
- beforeEach(module('ui.dashboard'));
-
- // instantiate service
- var LayoutStorage;
- beforeEach(inject(function (_LayoutStorage_) {
- LayoutStorage = _LayoutStorage_;
- }));
-
- describe('the constructor', function() {
-
- var storage, options;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'something'},
- {title: 'something'},
- {title: 'something'}
- ],
- widgetButtons: false,
- explicitSave: false,
- settingsModalOptions: {},
- onSettingsClose: function() {
-
- },
- onSettingsDismiss: function() {
-
- }
- };
- storage = new LayoutStorage(options);
- });
-
- it('should provide an empty implementation of storage if it is not provided', function() {
- delete options.storage;
- var stateless = new LayoutStorage(options);
- var noop = stateless.storage;
- angular.forEach(['setItem', 'getItem', 'removeItem'], function(method) {
- expect(typeof noop[method]).toEqual('function');
- expect(noop[method]).not.toThrow();
- noop[method]();
- });
- });
-
- it('should set a subset of the options directly on the LayoutStorage instance itself', function() {
- var properties = {
- id: 'storageId',
- storage: 'storage',
- storageHash: 'storageHash',
- stringifyStorage: 'stringifyStorage',
- widgetDefinitions: 'widgetDefinitions',
- defaultLayouts: 'defaultLayouts',
- widgetButtons: 'widgetButtons',
- explicitSave: 'explicitSave',
- settingsModalOptions: 'settingsModalOptions',
- onSettingsClose: 'onSettingsClose',
- onSettingsDismiss: 'onSettingsDismiss'
- };
-
- angular.forEach(properties, function(val, key) {
- expect( storage[key] ).toEqual( options[val] );
- });
-
- });
-
- it('should set stringify as true by default', function() {
- delete options.stringifyStorage;
- storage = new LayoutStorage(options);
- expect(storage.stringifyStorage).toEqual(true);
- });
-
- it('should allow stringify to be overridden by option', function() {
- options.stringifyStorage = false;
- storage = new LayoutStorage(options);
- expect(storage.stringifyStorage).toEqual(false);
- });
-
- it('should create a layouts array and states object', function() {
- expect(storage.layouts instanceof Array).toEqual(true);
- expect(typeof storage.states).toEqual('object');
- });
-
- it('should call load', function() {
- spyOn(LayoutStorage.prototype, 'load');
- storage = new LayoutStorage(options);
- expect(LayoutStorage.prototype.load).toHaveBeenCalled();
- });
-
- });
-
- describe('the load method', function() {
-
- var options, storage;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'something'},
- {title: 'something'},
- {title: 'something'}
- ],
- widgetButtons: false,
- explicitSave: false
- }
- storage = new LayoutStorage(options);
- });
-
- it('should use the default layouts if no stored info was found', function() {
- expect(storage.layouts.length).toEqual(options.defaultLayouts.length);
- });
-
- it('should clone default layouts rather than use them directly', function() {
- expect(storage.layouts.indexOf(options.defaultLayouts[0])).toEqual(-1);
- });
-
- it('should use the result from getItem for layouts.', function() {
- spyOn(options.storage, 'getItem').and.returnValue(JSON.stringify({
- storageHash: 'ds5f9d1f',
- layouts: [
- { id: 0, title: 'title', defaultWidgets: [], active: true },
- { id: 1, title: 'title2', defaultWidgets: [], active: false },
- { id: 2, title: 'title3', defaultWidgets: [], active: false },
- { id: 3, title: 'custom', defaultWidgets: [], active: false }
- ],
- states: {
- 0: {},
- 1: {},
- 2: {}
- }
- }));
- storage.load();
- expect(storage.layouts.map(function(l) {return l.title})).toEqual(['title', 'title2', 'title3', 'custom']);
- });
-
- it('should NOT use result from getItem for layouts if the storageHash doesnt match', function() {
- spyOn(options.storage, 'getItem').and.returnValue(JSON.stringify({
- storageHash: 'alskdjf02iej',
- layouts: [
- { id: 0, title: 'title', defaultWidgets: [], active: true },
- { id: 1, title: 'title2', defaultWidgets: [], active: false },
- { id: 2, title: 'title3', defaultWidgets: [], active: false },
- { id: 3, title: 'custom', defaultWidgets: [], active: false }
- ],
- states: {
- 0: {},
- 1: {},
- 2: {}
- }
- }));
- storage.load();
- expect(storage.layouts.map(function(l) {return l.title})).toEqual(['something', 'something', 'something']);
- });
-
- it('should be able to handle async loading via promise', inject(function($rootScope,$q) {
- var deferred = $q.defer();
- spyOn(options.storage, 'getItem').and.returnValue(deferred.promise);
- storage.load();
- expect(storage.layouts).toEqual([]);
- deferred.resolve(JSON.stringify({
- storageHash: 'ds5f9d1f',
- layouts: [
- { id: 0, title: 'title', defaultWidgets: [], active: true },
- { id: 1, title: 'title2', defaultWidgets: [], active: false },
- { id: 2, title: 'title3', defaultWidgets: [], active: false },
- { id: 3, title: 'custom', defaultWidgets: [], active: false }
- ],
- states: {
- 0: {},
- 1: {},
- 2: {}
- }
- }));
- $rootScope.$apply();
- expect(storage.layouts.map(function(l) {return l.title})).toEqual(['title', 'title2', 'title3', 'custom']);
- }));
-
- it('should load defaults if the deferred is rejected', inject(function($rootScope,$q) {
- var deferred = $q.defer();
- spyOn(options.storage, 'getItem').and.returnValue(deferred.promise);
- storage.load();
- deferred.reject();
- $rootScope.$apply();
- expect(storage.layouts.map(function(l) {return l.title})).toEqual(['something', 'something', 'something']);
- }));
-
- it('should load defaults if the json is malformed', inject(function($rootScope,$q) {
- var deferred = $q.defer();
- spyOn(options.storage, 'getItem').and.returnValue(deferred.promise);
- storage.load();
- expect(storage.layouts).toEqual([]);
- deferred.resolve(JSON.stringify({
- storageHash: 'ds5f9d1f',
- layouts: [
- { id: 0, title: 'title', defaultWidgets: [], active: true },
- { id: 1, title: 'title2', defaultWidgets: [], active: false },
- { id: 2, title: 'title3', defaultWidgets: [], active: false },
- { id: 3, title: 'custom', defaultWidgets: [], active: false }
- ],
- states: {
- 0: {},
- 1: {},
- 2: {}
- }
- }).replace('{','{{'));
- $rootScope.$apply();
- expect(storage.layouts.map(function(l) {return l.title})).toEqual(['something', 'something', 'something']);
- }));
-
- it('should not try to JSON.parse the result if stringifyStorage is false.', function() {
- options.stringifyStorage = false;
- storage = new LayoutStorage(options);
- spyOn(options.storage, 'getItem').and.returnValue({
- storageHash: 'ds5f9d1f',
- layouts: [
- { id: 0, title: 'title', defaultWidgets: [], active: true },
- { id: 1, title: 'title2', defaultWidgets: [], active: false },
- { id: 2, title: 'title3', defaultWidgets: [], active: false },
- { id: 3, title: 'custom', defaultWidgets: [], active: false }
- ],
- states: {
- 0: {},
- 1: {},
- 2: {}
- }
- });
- storage.load();
- expect(storage.layouts.map(function(l) {return l.title})).toEqual(['title', 'title2', 'title3', 'custom']);
- });
-
- });
-
- describe('the add method', function() {
-
- var storage, options;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [],
- widgetButtons: false,
- explicitSave: false
- }
-
- spyOn(LayoutStorage.prototype, 'load' );
-
- storage = new LayoutStorage(options);
-
- });
-
- it('should add to storage.layouts', function() {
- var newLayout = { title: 'my-layout' };
- storage.add(newLayout);
- expect(storage.layouts[0]).toEqual(newLayout);
- });
-
- it('should be able to take an array of new layouts', function() {
- var newLayouts = [ { title: 'my-layout' }, { title: 'my-layout-2' } ];
- storage.add(newLayouts);
- expect(storage.layouts.length).toEqual(2);
- expect(storage.layouts.indexOf(newLayouts[0])).not.toEqual(-1);
- expect(storage.layouts.indexOf(newLayouts[1])).not.toEqual(-1);
- });
-
- it('should look for defaultWidgets on storage options if not supplied on layout definition', function() {
- options.defaultWidgets = [{name: 'a'}, {name: 'b'}, {name: 'c'}];
- storage = new LayoutStorage(options);
-
- var newLayouts = [ { title: 'my-layout', defaultWidgets: [] }, { title: 'my-layout-2' } ];
- storage.add(newLayouts);
- expect(newLayouts[0].dashboard.defaultWidgets === newLayouts[0].defaultWidgets).toEqual(true);
- expect(newLayouts[1].dashboard.defaultWidgets === options.defaultWidgets).toEqual(true);
- });
-
- it('should use defaultWidgets if supplied in the layout definition', function() {
- options.defaultWidgets = [{name: 'a'}, {name: 'b'}, {name: 'c'}];
- storage = new LayoutStorage(options);
-
- var newLayouts = [ { title: 'my-layout', defaultWidgets: [] }, { title: 'my-layout-2' } ];
- storage.add(newLayouts);
- expect(newLayouts[0].dashboard.defaultWidgets).toEqual([]);
- expect(newLayouts[1].dashboard.defaultWidgets).toEqual(options.defaultWidgets);
- });
-
- it('should look for widgetDefinitions on storage options if not supplied on layout definition', function() {
- options.widgetDefinitions = [{name: 'a'}, {name: 'b'}, {name: 'c'}];
- storage = new LayoutStorage(options);
-
- var newLayouts = [ { title: 'my-layout', widgetDefinitions: [] }, { title: 'my-layout-2' } ];
- storage.add(newLayouts);
- expect(newLayouts[0].dashboard.widgetDefinitions === newLayouts[0].widgetDefinitions).toEqual(true);
- expect(newLayouts[1].dashboard.widgetDefinitions === options.widgetDefinitions).toEqual(true);
- });
-
- it('should use widgetDefinitions if supplied in the layout definition', function() {
- options.widgetDefinitions = [{name: 'a'}, {name: 'b'}, {name: 'c'}];
- storage = new LayoutStorage(options);
-
- var newLayouts = [ { title: 'my-layout', widgetDefinitions: [] }, { title: 'my-layout-2' } ];
- storage.add(newLayouts);
- expect(newLayouts[0].dashboard.widgetDefinitions).toEqual([]);
- expect(newLayouts[1].dashboard.widgetDefinitions).toEqual(options.widgetDefinitions);
- });
-
- });
-
- describe('the remove method', function() {
-
- var storage, options;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
- { name: 'A' },
- { name: 'B' },
- { name: 'C' }
- ],
- defaultLayouts: [
- { title: '1' },
- { title: '2', active: true },
- { title: '3' }
- ],
- widgetButtons: false,
- explicitSave: false
- }
-
- storage = new LayoutStorage(options);
- });
-
- it('should remove the supplied layout', function() {
- var layout = storage.layouts[1];
- storage.remove(layout);
- expect(storage.layouts.indexOf(layout)).toEqual(-1);
- });
-
- it('should delete the state', function() {
- var layout = storage.layouts[1];
- storage.setItem(layout.id, {});
- storage.remove(layout);
- expect(storage.states[layout.id]).toBeUndefined();
- });
-
- it('should do nothing if layout is not in layouts', function() {
- var layout = {};
- var before = storage.layouts.length;
- storage.remove(layout);
- var after = storage.layouts.length;
- expect(before).toEqual(after);
- });
-
- it('should set another dashboard to active if the layout removed was active', function() {
- var layout = storage.layouts[1];
- storage.remove(layout);
- expect(storage.layouts[0].active || storage.layouts[1].active).toEqual(true);
- });
-
- it('should set the layout at index 0 to active if the removed layout was 0', function() {
- storage.layouts[1].active = false;
- storage.layouts[0].active = true;
- storage.remove(storage.layouts[0]);
- expect(storage.layouts[0].active).toEqual(true);
- });
-
- it('should not change the active layout if it was not the one that got removed', function() {
- var active = storage.layouts[1];
- var layout = storage.layouts[0];
- storage.remove(layout);
- expect(active.active).toEqual(true);
- });
-
- });
-
- describe('the save method', function() {
-
- var options, storage;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'something'},
- {title: 'something'},
- {title: 'something'}
- ],
- widgetButtons: false,
- explicitSave: false
- }
- storage = new LayoutStorage(options);
- });
-
- it('should call options.storage.setItem with a stringified object', function() {
- spyOn(options.storage, 'setItem' );
- storage.save();
- expect(options.storage.setItem).toHaveBeenCalled();
- expect(options.storage.setItem.calls.argsFor(0)[0]).toEqual(storage.id);
- expect(typeof options.storage.setItem.calls.argsFor(0)[1]).toEqual('string');
- expect(function(){
- JSON.parse(options.storage.setItem.calls.argsFor(0)[1]);
- }).not.toThrow();
- });
-
- it('should save an object that has layouts, states, and storageHash', function() {
- spyOn(options.storage, 'setItem' );
- storage.save();
- var obj = JSON.parse(options.storage.setItem.calls.argsFor(0)[1]);
- expect(obj.hasOwnProperty('layouts')).toEqual(true);
- expect(obj.layouts instanceof Array).toEqual(true);
- expect(obj.hasOwnProperty('states')).toEqual(true);
- expect(typeof obj.states).toEqual('object');
- expect(obj.hasOwnProperty('storageHash')).toEqual(true);
- expect(typeof obj.storageHash).toEqual('string');
- });
-
- it('should call options.storage.setItem with an object when stringifyStorage is false', function() {
- options.stringifyStorage = false;
- storage = new LayoutStorage(options);
- spyOn(options.storage, 'setItem' );
- storage.save();
- expect(options.storage.setItem).toHaveBeenCalled();
- expect(options.storage.setItem.calls.argsFor(0)[0]).toEqual(storage.id);
- expect(typeof options.storage.setItem.calls.argsFor(0)[1]).toEqual('object');
- });
-
- });
-
- describe('the setItem method', function() {
-
- var options, storage;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'something'},
- {title: 'something'},
- {title: 'something'}
- ],
- widgetButtons: false,
- explicitSave: false
- }
- storage = new LayoutStorage(options);
- });
-
- it('should set storage.states[id] to the second argument', function() {
- var state = { some: 'thing'};
- storage.setItem('id', state);
- expect(storage.states.id).toEqual(state);
- });
-
- it('should call save', function() {
- spyOn(storage, 'save');
- var state = { some: 'thing'};
- storage.setItem('id', state);
- expect(storage.save).toHaveBeenCalled();
- });
-
- });
-
- describe('the getItem method', function() {
-
- var options, storage;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'something'},
- {title: 'something'},
- {title: 'something'}
- ],
- widgetButtons: false,
- explicitSave: false
- }
- storage = new LayoutStorage(options);
- });
-
- it('should return states[id]', function() {
- storage.states['myId'] = {};
- var result = storage.getItem('myId');
- expect(result === storage.states['myId']).toEqual(true);
- });
-
- });
-
- describe('the getActiveLayout method', function() {
- var options, storage;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'i am active', active: true},
- {title: 'i am not'},
- {title: 'me neither'}
- ],
- widgetButtons: false,
- explicitSave: false
- }
- storage = new LayoutStorage(options);
- });
-
- it('should return the layout with active:true', function() {
- var layout = storage.getActiveLayout();
- expect(layout.title).toEqual('i am active');
- });
-
- it('should return false if no layout is active', function() {
- var layout = storage.getActiveLayout();
- layout.active = false;
- var result = storage.getActiveLayout();
- expect(result).toEqual(false);
- });
-
- });
-
- describe('the removeItem', function() {
-
- var options, storage;
-
- beforeEach(function() {
- options = {
- storageId: 'testingStorage',
- storage: {
- setItem: function(key, value) {
-
- },
- getItem: function(key) {
-
- },
- removeItem: function(key) {
-
- }
- },
- storageHash: 'ds5f9d1f',
- stringifyStorage: true,
- widgetDefinitions: [
-
- ],
- defaultLayouts: [
- {title: 'i am active', active: true},
- {title: 'i am not'},
- {title: 'me neither'}
- ],
- widgetButtons: false,
- explicitSave: false
- }
- storage = new LayoutStorage(options);
- });
-
- it('should remove states[id]', function() {
- var state = {};
- storage.setItem('1', state);
- storage.removeItem('1');
- expect(storage.states['1']).toBeUndefined();
- });
-
- it('should call save', function() {
- spyOn(storage, 'save');
- var state = {};
- storage.setItem('1', state);
- storage.removeItem('1');
- expect(storage.save).toHaveBeenCalled();
- });
-
- });
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDataModel.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDataModel.js
deleted file mode 100644
index 547f2e96..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDataModel.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .factory('WidgetDataModel', function () {
- function WidgetDataModel() {
- }
-
- WidgetDataModel.prototype = {
- setup: function (widget, scope) {
- this.dataAttrName = widget.dataAttrName;
- this.dataModelOptions = widget.dataModelOptions;
- this.widgetScope = scope;
- },
-
- updateScope: function (data) {
- this.widgetScope.widgetData = data;
- },
-
- init: function () {
- // to be overridden by subclasses
- },
-
- destroy: function () {
- // to be overridden by subclasses
- }
- };
-
- return WidgetDataModel;
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDefCollection.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDefCollection.js
deleted file mode 100644
index 27765440..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDefCollection.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .factory('WidgetDefCollection', function () {
-
- function convertToDefinition(d) {
- if (typeof d === 'function') {
- return new d();
- }
- return d;
- }
-
- function WidgetDefCollection(widgetDefs) {
-
- widgetDefs = widgetDefs.map(convertToDefinition);
-
- this.push.apply(this, widgetDefs);
-
- // build (name -> widget definition) map for widget lookup by name
- var map = {};
- _.each(widgetDefs, function (widgetDef) {
- map[widgetDef.name] = widgetDef;
- });
- this.map = map;
- }
-
- WidgetDefCollection.prototype = Object.create(Array.prototype);
-
- WidgetDefCollection.prototype.getByName = function (name) {
- return this.map[name];
- };
-
- WidgetDefCollection.prototype.add = function(def) {
- def = convertToDefinition(def);
- this.push(def);
- this.map[def.name] = def;
- };
-
- return WidgetDefCollection;
- });
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.js
deleted file mode 100644
index c378d3b6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.js
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 2014 DataTorrent, Inc. ALL Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-'use strict';
-
-angular.module('ui.dashboard')
- .factory('WidgetModel', function ($log) {
-
- function defaults() {
- return {
- title: 'Widget',
- style: {},
- size: {},
- enableVerticalResize: true,
- containerStyle: { width: '33%' }, // default width
- contentStyle: {}
- };
- };
-
- // constructor for widget model instances
- function WidgetModel(widgetDefinition, overrides) {
-
- // Extend this with the widget definition object with overrides merged in (deep extended).
- angular.extend(this, defaults(), _.merge(angular.copy(widgetDefinition), overrides));
-
- this.updateContainerStyle(this.style);
-
- if (!this.templateUrl && !this.template && !this.directive) {
- this.directive = widgetDefinition.name;
- }
-
- if (this.size && _.has(this.size, 'height')) {
- this.setHeight(this.size.height);
- }
-
- if (this.style && _.has(this.style, 'width')) { //TODO deprecate style attribute
- this.setWidth(this.style.width);
- }
-
- if (this.size && _.has(this.size, 'width')) {
- this.setWidth(this.size.width);
- }
- }
-
- WidgetModel.prototype = {
- // sets the width (and widthUnits)
- setWidth: function (width, units) {
- width = width.toString();
- units = units || width.replace(/^[-\.\d]+/, '') || '%';
-
- this.widthUnits = units;
- width = parseFloat(width);
-
- // check with min width if set, unit refer to width's unit
- if (this.size && _.has(this.size, 'minWidth')) {
- width = _.max([parseFloat(this.size.minWidth), width]);
- }
-
- if (width < 0 || isNaN(width)) {
- $log.warn('malhar-angular-dashboard: setWidth was called when width was ' + width);
- return false;
- }
-
- if (units === '%') {
- width = Math.min(100, width);
- width = Math.max(0, width);
- }
-
- this.containerStyle.width = width + '' + units;
-
- this.updateSize(this.containerStyle);
-
- return true;
- },
-
- setHeight: function (height) {
- this.contentStyle.height = height;
- this.updateSize(this.contentStyle);
- },
-
- setStyle: function (style) {
- this.style = style;
- this.updateContainerStyle(style);
- },
-
- updateSize: function (size) {
- angular.extend(this.size, size);
- },
-
- updateContainerStyle: function (style) {
- angular.extend(this.containerStyle, style);
- },
- serialize: function() {
- return _.pick(this, ['title', 'name', 'report_id', 'hideGrid', 'showChart' ,'rcloud_url','reportData','style', 'size', 'dataModelOptions', 'attrs', 'storageHash']);
- }
- };
-
- return WidgetModel;
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.spec.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.spec.js
deleted file mode 100644
index 151e560a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.spec.js
+++ /dev/null
@@ -1,156 +0,0 @@
-'use strict';
-
-describe('Factory: WidgetModel', function () {
-
- // load the service's module
- beforeEach(module('ui.dashboard'));
-
- // instantiate service
- var WidgetModel;
- beforeEach(inject(function (_WidgetModel_) {
- WidgetModel = _WidgetModel_;
- }));
-
- it('should be a function', function() {
- expect(typeof WidgetModel).toEqual('function');
- });
-
- describe('the constructor', function() {
- var m, Class, Class2, overrides;
-
- beforeEach(function() {
- Class = {
- name: 'TestWidget',
- attrs: {},
- dataAttrName: 'attr-name',
- dataModelType: function TestType() {},
- dataModelOptions: {},
- style: { width: '10em' },
- settingsModalOptions: {},
- onSettingsClose: function() {},
- onSettingsDismiss: function() {},
- funkyChicken: {
- cool: false,
- fun: true
- }
- };
-
- Class2 = {
- name: 'TestWidget2',
- attrs: {},
- dataAttrName: 'attr-name',
- dataModelType: function TestType() {},
- dataModelOptions: {},
- style: { width: '10em' },
- templateUrl: 'my/url.html',
- template: '<div>some template</div>'
- };
-
- overrides = {
- style: {
- width: '15em'
- }
- };
- spyOn(WidgetModel.prototype, 'setWidth');
- m = new WidgetModel(Class, overrides);
- });
-
- it('should copy class defaults, so that changes on an instance do not change the Class', function() {
- m.style.width = '20em';
- expect(Class.style.width).toEqual('10em');
- });
-
- it('should call setWidth', function() {
- expect(WidgetModel.prototype.setWidth).toHaveBeenCalled();
- });
-
- it('should take overrides as precedent over Class defaults', function() {
- expect(m.style.width).toEqual('15em');
- });
-
- it('should copy arbitrary data from the widget definition', function() {
- expect(m.funkyChicken.cool).toEqual(false);
- expect(m.funkyChicken.fun).toEqual(true);
- expect(m.funkyChicken===Class.funkyChicken).toEqual(false);
- });
-
- it('should set templateUrl if and only if it is present on Class', function() {
- var m2 = new WidgetModel(Class2, overrides);
- expect(m2.templateUrl).toEqual('my/url.html');
- });
-
- it('should set template if and only if it is present on Class', function() {
- delete Class2.templateUrl;
- var m2 = new WidgetModel(Class2, overrides);
- expect(m2.template).toEqual('<div>some template</div>');
- });
-
- it('should look for directive if neither templateUrl nor template is found on Class', function() {
- delete Class2.templateUrl;
- delete Class2.template;
- Class2.directive = 'ng-bind';
- var m2 = new WidgetModel(Class2, overrides);
- expect(m2.directive).toEqual('ng-bind');
- });
-
- it('should set the name as directive if templateUrl, template, and directive are not defined', function() {
- delete Class2.templateUrl;
- delete Class2.template;
- var m2 = new WidgetModel(Class2, overrides);
- expect(m2.directive).toEqual('TestWidget2');
- });
-
- it('should not require overrides', function() {
- var fn = function() {
- var m2 = new WidgetModel(Class);
- }
- expect(fn).not.toThrow();
- });
-
- it('should copy references to settingsModalOptions, onSettingsClose, onSettingsDismiss', function() {
- var m = new WidgetModel(Class);
- expect(m.settingsModalOptions).toEqual(Class.settingsModalOptions);
- expect(m.onSettingsClose).toEqual(Class.onSettingsClose);
- expect(m.onSettingsDismiss).toEqual(Class.onSettingsDismiss);
- });
-
- });
-
- describe('setWidth method', function() {
-
- var context, setWidth;
-
- beforeEach(function() {
- context = new WidgetModel({});
- setWidth = WidgetModel.prototype.setWidth;
- });
-
- it('should take one argument as a string with units', function() {
- setWidth.call(context, '100px');
- expect(context.containerStyle.width).toEqual('100px');
- });
-
- it('should take two args as a number and string as units', function() {
- setWidth.call(context, 100, 'px');
- expect(context.containerStyle.width).toEqual('100px');
- });
-
- it('should return false and not set anything if width is less than 0', function() {
- var result = setWidth.call(context, -100, 'em');
- expect(result).toEqual(false);
- expect(context.containerStyle.width).not.toEqual('-100em');
- });
-
- it('should assume % if no unit is given', function() {
- setWidth.call(context, 50);
- expect(context.containerStyle.width).toEqual('50%');
- });
-
- it('should force greater than 0% and less than or equal 100%', function() {
- setWidth.call(context, '110%');
- expect(context.containerStyle.width).toEqual('100%');
- });
-
- });
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html
deleted file mode 100644
index 8fecfb7b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/view-models/reportdashboard-page/src/report-dashboard.html
+++ /dev/null
@@ -1,220 +0,0 @@
-<!doctype html>
-<html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta http-equiv="cache-control" content="max-age=0" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="expires" content="0" />
- <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
- <meta http-equiv="pragma" content="no-cache"/>
-
- <link rel="stylesheet" href="app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.css">
-<!-- <meta charset="utf-8">
- <title>Malhar Angular Dashboard</title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width"> -->
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/fn-ebz.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css">
- <link rel="import" href="app/fusion/scripts/view-models/header.html">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/demo.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/base.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/dtpk.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/frms.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/sldr.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/tbs.css" >
- <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
- <!--
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
- -->
- <!-- Basic AngularJS -->
-
-
- <!-- build:css({.tmp/serve,src}) styles/vendor.css -->
-
-<!-- <link rel="stylesheet" href="app/fusion/scripts/view-models/reportdashboard-page/src/app/vendor.css"> -->
- <!-- bower:css -->
- <!-- endbower -->
- <!-- endbuild -->
-
- <!-- build:css({.tmp/serve,src}) styles/app.css -->
- <!-- inject:css -->
- <link rel="stylesheet" href="app/fusion/scripts/view-models/reportdashboard-page/src/app/index.css">
- <!-- endinject -->
- <!-- endbuild -->
-
- <!-- build:js(src) scripts/vendor.js -->
- <!-- bower:js -->
-<!-- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/jquery/dist/jquery.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular/angular.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-bootstrap/ui-bootstrap-tpls.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/jquery-ui/jquery-ui.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-ui-sortable/sortable.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/bootstrap/dist/js/bootstrap.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/lodash/lodash.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-cookies/angular-cookies.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-mocks/angular-mocks.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-route/angular-route.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-sanitize/angular-sanitize.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/showdown/src/showdown.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/bower_components/angular-markdown-directive/markdown.js"></script>
- -->
- <script src="app/fusion/ase/scripts/dependencies/jquery-2.1.4.min.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-cookies.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-mocks.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-route.js"></script>
- <script src="app/fusion/external/angular-1.4.8/angular-sanitize.js"></script>
- <script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.2.4.min.js"></script>
- <script src="app/fusion/ase/scripts/menus/jquery-ui.min.js"></script>
- <script src="app/fusion/ase/scripts/menus/bootstrap.min.js"></script>
- <script src="app/fusion/external/angular-ui/ui-sortable/v0.13.4/sortable.min.js"></script>
- <script src="app/fusion/external/lodash/4.5.1/lodash.js"></script>
- <script src="app/fusion/external/showdown/0.3.4/showdown.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/angular-markdown-directive/markdown.js"></script>
-
- <!-- endbower -->
- <!-- endbuild -->
-
-
-<!-- app/fusion/scripts/view-models/reportdashboard-page/ -->
- <script src= "app/fusion/external/ebz/angular_js/app.js"></script>
- <script src= "app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
- <script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
- <script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>
-<!-- <script src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script> -->
-
-<!-- <script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
- <script src= "app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
- <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/0.10.0/lodash.min.js"></script>
- <script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script> -->
-
- <!-- jQuery -->
-<!-- <script src="static/js/jquery-1.10.2.js"></script>
- <script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
- <script src="static/js/jquery-ui.js" type="text/javascript"></script> -->
-
- <!-- AngularJS Gridster -->
- <script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
- <script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
- <!-- AngularJS Config -->
- <script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
- <!-- Utility -->
- <script src="app/fusion/scripts/modalService.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/report_whitelist.js"></script>
- <!-- Controller js -->
-<!-- <script src="app/fusion/scripts/controllers/fn_menu_add_popup_controller.js"></script>
- <script src="app/fusion/scripts/controllers/admin_menu_edit.js"></script>
- <script src="app/fusion/scripts/controllers/profile-search-controller.js"></script>
- <script src="app/fusion/scripts/controllers/profile-controller.js"></script>
- <script src="app/fusion/scripts/controllers/post-search-controller.js"></script>
- <script src="app/fusion/scripts/controllers/role-list-controller.js"></script>
- <script src="app/fusion/scripts/controllers/role-function-list-controller.js"></script>
- <script src="app/fusion/scripts/controllers/rolefunctionpopupController.js"></script>
- <script src="app/fusion/scripts/controllers/modelpopupController.js"></script>
- <script src="app/fusion/scripts/controllers/jcs-admin-controller.js"></script>
- <script src="app/fusion/scripts/controllers/broadcast-list-controller.js"></script>
- <script src="app/fusion/scripts/controllers/broadcast-controller.js"></script>
- <script src="app/fusion/scripts/controllers/usage-list-controller.js"></script>
- <script src="app/fusion/scripts/controllers/collaborate-list-controller.js"></script>
- <script src="app/fusion/scripts/controllers/role-controller.js"></script>
- <script src="app/fusion/scripts/controllers/rolepopupmodelController.js"></script>-->
- <!-- Header and Footer -->
- <!-- <script src="app/fusion/external/ebz/js/attHeaderSnippet.js"></script>
- <script src="app/fusion/external/ebz/js/attHeader.js"></script> -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/footer.css" >
- <script src="app/fusion/scripts/directives/footer.js"></script>
- <script src="app/fusion/external/ebz/js/footer.js"></script>
- <script src="app/fusion/scripts/directives/header.js"></script>
- <script src="app/fusion/scripts/directives/leftMenu.js"></script>
- <script src="app/fusion/scripts/services/leftMenuService.js"></script>
-
- <!-- Services -->
- <script src="app/fusion/scripts/services/profileService.js"></script>
- <script src="app/fusion/scripts/services/adminService.js"></script>
- <script src="app/fusion/scripts/services/userInfoService.js"></script>
- <!-- Controller -->
-<!-- <script src="app/fusion/scripts/controllers/adminController.js"></script> -->
- <!-- other js lib -->
- <script type="text/javascript" src="app/fusion/scripts/socket/peerBroadcast.js"></script>
- <script src="app/fusion/scripts/moment.min.js"></script>
-
- <!-- build:js({.tmp/serve,.tmp/partials,src}) scripts/app.js -->
- <!-- inject:js -->
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/demo.js"></script>
-<!-- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/templateCacheHtml.js"></script> -->
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/dashboard.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/widget.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/widget/DashboardWidgetCtrl.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/dashboardLayouts.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboardLayouts/SaveChangesModalCtrl.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsCtrl.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/directives/dashboard/WidgetSettingsRaptorReportCtrl.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetModel.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDefCollection.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/models/WidgetDataModel.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/models/LayoutStorage.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/components/models/DashboardState.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/resize.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/layouts.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/index.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/explicitSave.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/directives.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/dataModel.js"></script>
- <script src="app/fusion/scripts/view-models/reportdashboard-page/src/app/customWidgetSettings.js"></script>
- <script src="static/fusion/raptor/ebz/dynamicform.js"></script>
- <script src="static/fusion/raptor/ebz/multiselect.js"></script>
- <script src="static/fusion/raptor/ebz/report_search.js"></script>
-<!-- <script src="static/fusion/raptor/ebz/report_run.js"></script> -->
- <script src="static/fusion/raptor/ebz/quick_links.js"></script>
-
- <script src="static/fusion/raptor/uigrid/vfs_fonts.js"></script>
- <script src="static/fusion/raptor/uigrid/ui-grid.js"></script>
-
- <script src="static/fusion/raptor/ebz/report_chart_wizard.js"></script>
-
-
- <script src="app/fusion/scripts/controllers/modelpopupController.js"></script>
-
- <script src="static/fusion/raptor/ebz/date_time_picker.js"></script>
- <script src="static/fusion/raptor/ebz/moment.js"></script>
- <link rel="stylesheet" href="static/fusion/raptor/ebz/date_time_picker.css"/>
- <link rel="stylesheet" href="static/fusion/raptor/uigrid/ui-grid.css" type="text/css">
-
-
- <script>
- app.requires.push('ui.dashboard');
- </script>
- <script>
- angular.module('abs').requires.push('quantum', 'ngRoute', 'ui.grid',
- 'ui.grid.pagination','ui.grid.resizeColumns',
- 'ui.grid.pinning');
- </script>
-
- <!-- endinject -->
-
- <!-- inject:partials -->
- <!-- angular templates will be automatically converted in js and inserted here -->
- <!-- endinject -->
- <!-- endbuild -->
-
-
-
-
-
- </head>
- <body class="appBody" ng-app="abs">
- <div q-header></div>
- <div q-menu class="appLeftMenu"></div>
- <div ng-view id="rightContentUiDashboard" style="position:relative; min-height: 1500px; top:-40px; margin-left:210px;"></div>
- <div q-footer class="appFooter"></div>
- </body>
-
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js b/usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js
deleted file mode 100644
index 3ce348b6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/RTCMultiConnection.js
+++ /dev/null
@@ -1,6788 +0,0 @@
-// Last time updated at Monday, December 21st, 2015, 5:25:26 PM
-
-// Quick-Demo for newbies: http://jsfiddle.net/c46de0L8/
-// Another simple demo: http://jsfiddle.net/zar6fg60/
-
-// Latest file can be found here: https://cdn.webrtc-experiment.com/RTCMultiConnection.js
-
-// Muaz Khan - www.MuazKhan.com
-// MIT License - www.WebRTC-Experiment.com/licence
-// Documentation - www.RTCMultiConnection.org/docs
-// FAQ - www.RTCMultiConnection.org/FAQ
-// Changes log - www.RTCMultiConnection.org/changes-log/
-// Demos - www.WebRTC-Experiment.com/RTCMultiConnection
-
-// _________________________
-// RTCMultiConnection-v2.2.2
-
-(function() {
-
- // RMC == RTCMultiConnection
- // usually page-URL is used as channel-id
- // you can always override it!
- // www.RTCMultiConnection.org/docs/channel-id/
- window.RMCDefaultChannel = location.href.replace(/\/|:|#|\?|\$|\^|%|\.|`|~|!|\+|@|\[|\||]|\|*. /g, '').split('\n').join('').split('\r').join('');
-
- // www.RTCMultiConnection.org/docs/constructor/
- window.RTCMultiConnection = function(channel) {
- // an instance of constructor
- var connection = this;
-
- // a reference to RTCMultiSession
- var rtcMultiSession;
-
- // setting default channel or channel passed through constructor
- connection.channel = channel || RMCDefaultChannel;
-
- // to allow single user to join multiple rooms;
- // you can change this property at runtime!
- connection.isAcceptNewSession = true;
-
- // www.RTCMultiConnection.org/docs/open/
- connection.open = function(args) {
- connection.isAcceptNewSession = false;
-
- // www.RTCMultiConnection.org/docs/session-initiator/
- // you can always use this property to determine room owner!
- connection.isInitiator = true;
-
- var dontTransmit = false;
-
- // a channel can contain multiple rooms i.e. sessions
- if (args) {
- if (isString(args)) {
- connection.sessionid = args;
- } else {
- if (!isNull(args.transmitRoomOnce)) {
- connection.transmitRoomOnce = args.transmitRoomOnce;
- }
-
- if (!isNull(args.dontTransmit)) {
- dontTransmit = args.dontTransmit;
- }
-
- if (!isNull(args.sessionid)) {
- connection.sessionid = args.sessionid;
- }
- }
- }
-
- // if firebase && if session initiator
- if (connection.socket && connection.socket.remove) {
- connection.socket.remove();
- }
-
- if (!connection.sessionid) connection.sessionid = connection.channel;
- connection.sessionDescription = {
- sessionid: connection.sessionid,
- userid: connection.userid,
- session: connection.session,
- extra: connection.extra
- };
-
- if (!connection.sessionDescriptions[connection.sessionDescription.sessionid]) {
- connection.numberOfSessions++;
- connection.sessionDescriptions[connection.sessionDescription.sessionid] = connection.sessionDescription;
- }
-
- // connect with signaling channel
- initRTCMultiSession(function() {
- // "captureUserMediaOnDemand" is disabled by default.
- // invoke "getUserMedia" only when first participant found.
- rtcMultiSession.captureUserMediaOnDemand = args ? !!args.captureUserMediaOnDemand : false;
-
- if (args && args.onMediaCaptured) {
- connection.onMediaCaptured = args.onMediaCaptured;
- }
-
- // for session-initiator, user-media is captured as soon as "open" is invoked.
- if (!rtcMultiSession.captureUserMediaOnDemand) captureUserMedia(function() {
- rtcMultiSession.initSession({
- sessionDescription: connection.sessionDescription,
- dontTransmit: dontTransmit
- });
-
- invokeMediaCaptured(connection);
- });
-
- if (rtcMultiSession.captureUserMediaOnDemand) {
- rtcMultiSession.initSession({
- sessionDescription: connection.sessionDescription,
- dontTransmit: dontTransmit
- });
- }
- });
- return connection.sessionDescription;
- };
-
- // www.RTCMultiConnection.org/docs/connect/
- connection.connect = function(sessionid) {
- // a channel can contain multiple rooms i.e. sessions
- if (sessionid) {
- connection.sessionid = sessionid;
- }
-
- // connect with signaling channel
- initRTCMultiSession(function() {
- log('Signaling channel is ready.');
- });
-
- return this;
- };
-
- // www.RTCMultiConnection.org/docs/join/
- connection.join = joinSession;
-
- // www.RTCMultiConnection.org/docs/send/
- connection.send = function(data, _channel) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.send(data, _channel);
- }, 1000);
- return;
- }
-
- // send file/data or /text
- if (!data)
- throw 'No file, data or text message to share.';
-
- // connection.send([file1, file2, file3])
- // you can share multiple files, strings or data objects using "send" method!
- if (data instanceof Array && !isNull(data[0].size) && !isNull(data[0].type)) {
- // this mechanism can cause failure for subsequent packets/data
- // on Firefox especially; and on chrome as well!
- // todo: need to use setTimeout instead.
- for (var i = 0; i < data.length; i++) {
- data[i].size && data[i].type && connection.send(data[i], _channel);
- }
- return;
- }
-
- // File or Blob object MUST have "type" and "size" properties
- if (!isNull(data.size) && !isNull(data.type)) {
- if (!connection.enableFileSharing) {
- throw '"enableFileSharing" boolean MUST be "true" to support file sharing.';
- }
-
- if (!rtcMultiSession.fileBufferReader) {
- initFileBufferReader(connection, function(fbr) {
- rtcMultiSession.fileBufferReader = fbr;
- connection.send(data, _channel);
- });
- return;
- }
-
- var extra = merge({
- userid: connection.userid
- }, data.extra || connection.extra);
-
- rtcMultiSession.fileBufferReader.readAsArrayBuffer(data, function(uuid) {
- rtcMultiSession.fileBufferReader.getNextChunk(uuid, function(nextChunk, isLastChunk, extra) {
- if (_channel) _channel.send(nextChunk);
- else rtcMultiSession.send(nextChunk);
- });
- }, extra);
- } else {
- // to allow longest string messages
- // and largest data objects
- // or anything of any size!
- // to send multiple data objects concurrently!
-
- TextSender.send({
- text: data,
- channel: rtcMultiSession,
- _channel: _channel,
- connection: connection
- });
- }
- };
-
- function initRTCMultiSession(onSignalingReady) {
- if (screenFrame) {
- loadScreenFrame();
- }
-
- // RTCMultiSession is the backbone object;
- // this object MUST be initialized once!
- if (rtcMultiSession) return onSignalingReady();
-
- // your everything is passed over RTCMultiSession constructor!
- rtcMultiSession = new RTCMultiSession(connection, onSignalingReady);
- }
-
- connection.disconnect = function() {
- if (rtcMultiSession) rtcMultiSession.disconnect();
- rtcMultiSession = null;
- };
-
- function joinSession(session, joinAs) {
- if (isString(session)) {
- connection.skipOnNewSession = true;
- }
-
- if (!rtcMultiSession) {
- log('Signaling channel is not ready. Connecting...');
- // connect with signaling channel
- initRTCMultiSession(function() {
- log('Signaling channel is connected. Joining the session again...');
- setTimeout(function() {
- joinSession(session, joinAs);
- }, 1000);
- });
- return;
- }
-
- // connection.join('sessionid');
- if (isString(session)) {
- if (connection.sessionDescriptions[session]) {
- session = connection.sessionDescriptions[session];
- } else
- return setTimeout(function() {
- log('Session-Descriptions not found. Rechecking..');
- joinSession(session, joinAs);
- }, 1000);
- }
-
- // connection.join('sessionid', { audio: true });
- if (joinAs) {
- return captureUserMedia(function() {
- session.oneway = true;
- joinSession(session);
- }, joinAs);
- }
-
- if (!session || !session.userid || !session.sessionid) {
- error('missing arguments', arguments);
-
- var error = 'Invalid data passed over "connection.join" method.';
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'Unexpected data detected.',
- reason: error
- });
-
- throw error;
- }
-
- if (!connection.dontOverrideSession) {
- connection.session = session.session;
- }
-
- var extra = connection.extra || session.extra || {};
-
- // todo: need to verify that if-block statement works as expected.
- // expectations: if it is oneway streaming; or if it is data-only connection
- // then, it shouldn't capture user-media on participant's side.
- if (session.oneway || isData(session)) {
- rtcMultiSession.joinSession(session, extra);
- } else {
- captureUserMedia(function() {
- rtcMultiSession.joinSession(session, extra);
- });
- }
- }
-
- var isFirstSession = true;
-
- // www.RTCMultiConnection.org/docs/captureUserMedia/
-
- function captureUserMedia(callback, _session, dontCheckChromExtension) {
- // capture user's media resources
- var session = _session || connection.session;
-
- if (isEmpty(session)) {
- if (callback) callback();
- return;
- }
-
- // you can force to skip media capturing!
- if (connection.dontCaptureUserMedia) {
- return callback();
- }
-
- // if it is data-only connection
- // if it is one-way connection and current user is participant
- if (isData(session) || (!connection.isInitiator && session.oneway)) {
- // www.RTCMultiConnection.org/docs/attachStreams/
- connection.attachStreams = [];
- return callback();
- }
-
- var constraints = {
- audio: !!session.audio ? {
- mandatory: {},
- optional: [{
- chromeRenderToAssociatedSink: true
- }]
- } : false,
- video: !!session.video
- };
-
- // if custom audio device is selected
- if (connection._mediaSources.audio) {
- constraints.audio.optional.push({
- sourceId: connection._mediaSources.audio
- });
- }
-
- // if custom video device is selected
- if (connection._mediaSources.video) {
- constraints.video = {
- optional: [{
- sourceId: connection._mediaSources.video
- }]
- };
- }
-
- // for connection.session = {};
- if (!session.screen && !constraints.audio && !constraints.video) {
- return callback();
- }
-
- var screen_constraints = {
- audio: false,
- video: {
- mandatory: {
- chromeMediaSource: DetectRTC.screen.chromeMediaSource,
- maxWidth: screen.width > 1920 ? screen.width : 1920,
- maxHeight: screen.height > 1080 ? screen.height : 1080
- },
- optional: []
- }
- };
-
- if (isFirefox && session.screen) {
- if (location.protocol !== 'https:') {
- return error(SCREEN_COMMON_FAILURE);
- }
- warn(Firefox_Screen_Capturing_Warning);
-
- screen_constraints.video = merge(screen_constraints.video.mandatory, {
- mozMediaSource: 'window', // mozMediaSource is redundant here
- mediaSource: 'window' // 'screen' || 'window'
- });
-
- // Firefox is supporting audio+screen from single getUserMedia request
- // audio+video+screen will become audio+screen for Firefox
- // because Firefox isn't supporting multi-streams feature version < 38
- // version >38 supports multi-stream sharing.
- // we can use: firefoxVersion < 38
- // however capturing audio and screen using single getUserMedia is a better option
- if (constraints.audio /* && !session.video */ ) {
- screen_constraints.audio = true;
- constraints = {};
- }
-
- delete screen_constraints.video.chromeMediaSource;
- }
-
- // if screen is prompted
- if (session.screen) {
- if (isChrome && DetectRTC.screen.extensionid != ReservedExtensionID) {
- useCustomChromeExtensionForScreenCapturing = true;
- }
-
- if (isChrome && !useCustomChromeExtensionForScreenCapturing && !dontCheckChromExtension && !DetectRTC.screen.sourceId) {
- listenEventHandler('message', onIFrameCallback);
-
- function onIFrameCallback(event) {
- if (event.data && event.data.chromeMediaSourceId) {
- // this event listener is no more needed
- window.removeEventListener('message', onIFrameCallback);
-
- var sourceId = event.data.chromeMediaSourceId;
-
- DetectRTC.screen.sourceId = sourceId;
- DetectRTC.screen.chromeMediaSource = 'desktop';
-
- if (sourceId == 'PermissionDeniedError') {
- var mediaStreamError = {
- message: location.protocol == 'https:' ? 'User denied to share content of his screen.' : SCREEN_COMMON_FAILURE,
- name: 'PermissionDeniedError',
- constraintName: screen_constraints,
- session: session
- };
- currentUserMediaRequest.mutex = false;
- DetectRTC.screen.sourceId = null;
- return connection.onMediaError(mediaStreamError);
- }
-
- captureUserMedia(callback, _session);
- }
-
- if (event.data && event.data.chromeExtensionStatus) {
- warn('Screen capturing extension status is:', event.data.chromeExtensionStatus);
- DetectRTC.screen.chromeMediaSource = 'screen';
- captureUserMedia(callback, _session, true);
- }
- }
-
- if (!screenFrame) {
- loadScreenFrame();
- }
-
- screenFrame.postMessage();
- return;
- }
-
- // check if screen capturing extension is installed.
- if (isChrome && useCustomChromeExtensionForScreenCapturing && !dontCheckChromExtension && DetectRTC.screen.chromeMediaSource == 'screen' && DetectRTC.screen.extensionid) {
- if (DetectRTC.screen.extensionid == ReservedExtensionID && document.domain.indexOf('webrtc-experiment.com') == -1) {
- return captureUserMedia(callback, _session, true);
- }
-
- log('checking if chrome extension is installed.');
- DetectRTC.screen.getChromeExtensionStatus(function(status) {
- if (status == 'installed-enabled') {
- DetectRTC.screen.chromeMediaSource = 'desktop';
- }
-
- captureUserMedia(callback, _session, true);
- log('chrome extension is installed?', DetectRTC.screen.chromeMediaSource == 'desktop');
- });
- return;
- }
-
- if (isChrome && useCustomChromeExtensionForScreenCapturing && DetectRTC.screen.chromeMediaSource == 'desktop' && !DetectRTC.screen.sourceId) {
- DetectRTC.screen.getSourceId(function(sourceId) {
- if (sourceId == 'PermissionDeniedError') {
- var mediaStreamError = {
- message: 'User denied to share content of his screen.',
- name: 'PermissionDeniedError',
- constraintName: screen_constraints,
- session: session
- };
- currentUserMediaRequest.mutex = false;
- DetectRTC.screen.chromeMediaSource = 'desktop';
- return connection.onMediaError(mediaStreamError);
- }
-
- if (sourceId == 'No-Response') {
- error('Chrome extension seems not available. Make sure that manifest.json#L16 has valid content-script matches pointing to your URL.');
- DetectRTC.screen.chromeMediaSource = 'screen';
- return captureUserMedia(callback, _session, true);
- }
-
- captureUserMedia(callback, _session, true);
- });
- return;
- }
-
- if (isChrome && DetectRTC.screen.chromeMediaSource == 'desktop') {
- screen_constraints.video.mandatory.chromeMediaSourceId = DetectRTC.screen.sourceId;
- }
-
- var _isFirstSession = isFirstSession;
-
- _captureUserMedia(screen_constraints, constraints.audio || constraints.video ? function() {
-
- if (_isFirstSession) isFirstSession = true;
-
- _captureUserMedia(constraints, callback);
- } : callback);
- } else _captureUserMedia(constraints, callback, session.audio && !session.video);
-
- function _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, dontPreventSSLAutoAllowed) {
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'fetching-usermedia',
- reason: 'About to capture user-media with constraints: ' + toStr(forcedConstraints)
- });
-
-
- if (connection.preventSSLAutoAllowed && !dontPreventSSLAutoAllowed && isChrome) {
- // if navigator.customGetUserMediaBar.js is missing
- if (!navigator.customGetUserMediaBar) {
- loadScript(connection.resources.customGetUserMediaBar, function() {
- _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, dontPreventSSLAutoAllowed);
- });
- return;
- }
-
- navigator.customGetUserMediaBar(forcedConstraints, function() {
- _captureUserMedia(forcedConstraints, forcedCallback, isRemoveVideoTracks, true);
- }, function() {
- connection.onMediaError({
- name: 'PermissionDeniedError',
- message: 'User denied permission.',
- constraintName: forcedConstraints,
- session: session
- });
- });
- return;
- }
-
- var mediaConfig = {
- onsuccess: function(stream, returnBack, idInstance, streamid) {
- onStreamSuccessCallback(stream, returnBack, idInstance, streamid, forcedConstraints, forcedCallback, isRemoveVideoTracks, screen_constraints, constraints, session);
- },
- onerror: function(e, constraintUsed) {
- // http://goo.gl/hrwF1a
- if (isFirefox) {
- if (e == 'PERMISSION_DENIED') {
- e = {
- message: '',
- name: 'PermissionDeniedError',
- constraintName: constraintUsed,
- session: session
- };
- }
- }
-
- if (isFirefox && constraintUsed.video && constraintUsed.video.mozMediaSource) {
- mediaStreamError = {
- message: Firefox_Screen_Capturing_Warning,
- name: e.name || 'PermissionDeniedError',
- constraintName: constraintUsed,
- session: session
- };
-
- connection.onMediaError(mediaStreamError);
- return;
- }
-
- if (isString(e)) {
- return connection.onMediaError({
- message: 'Unknown Error',
- name: e,
- constraintName: constraintUsed,
- session: session
- });
- }
-
- // it seems that chrome 35+ throws "DevicesNotFoundError" exception
- // when any of the requested media is either denied or absent
- if (e.name && (e.name == 'PermissionDeniedError' || e.name == 'DevicesNotFoundError')) {
- var mediaStreamError = 'Either: ';
- mediaStreamError += '\n Media resolutions are not permitted.';
- mediaStreamError += '\n Another application is using same media device.';
- mediaStreamError += '\n Media device is not attached or drivers not installed.';
- mediaStreamError += '\n You denied access once and it is still denied.';
-
- if (e.message && e.message.length) {
- mediaStreamError += '\n ' + e.message;
- }
-
- mediaStreamError = {
- message: mediaStreamError,
- name: e.name,
- constraintName: constraintUsed,
- session: session
- };
-
- connection.onMediaError(mediaStreamError);
-
- if (isChrome && (session.audio || session.video)) {
- // todo: this snippet fails if user has two or more
- // microphone/webcam attached.
- DetectRTC.load(function() {
- // it is possible to check presence of the microphone before using it!
- if (session.audio && !DetectRTC.hasMicrophone) {
- warn('It seems that you have no microphone attached to your device/system.');
- session.audio = session.audio = false;
-
- if (!session.video) {
- alert('It seems that you are capturing microphone and there is no device available or access is denied. Reloading...');
- location.reload();
- }
- }
-
- // it is possible to check presence of the webcam before using it!
- if (session.video && !DetectRTC.hasWebcam) {
- warn('It seems that you have no webcam attached to your device/system.');
- session.video = session.video = false;
-
- if (!session.audio) {
- alert('It seems that you are capturing webcam and there is no device available or access is denied. Reloading...');
- location.reload();
- }
- }
-
- if (!DetectRTC.hasMicrophone && !DetectRTC.hasWebcam) {
- alert('It seems that either both microphone/webcam are not available or access is denied. Reloading...');
- location.reload();
- } else if (!connection.getUserMediaPromptedOnce) {
- // make maximum two tries!
- connection.getUserMediaPromptedOnce = true;
- captureUserMedia(callback, session);
- }
- });
- }
- }
-
- if (e.name && e.name == 'ConstraintNotSatisfiedError') {
- var mediaStreamError = 'Either: ';
- mediaStreamError += '\n You are prompting unknown media resolutions.';
- mediaStreamError += '\n You are using invalid media constraints.';
-
- if (e.message && e.message.length) {
- mediaStreamError += '\n ' + e.message;
- }
-
- mediaStreamError = {
- message: mediaStreamError,
- name: e.name,
- constraintName: constraintUsed,
- session: session
- };
-
- connection.onMediaError(mediaStreamError);
- }
-
- if (session.screen) {
- if (isFirefox) {
- error(Firefox_Screen_Capturing_Warning);
- } else if (location.protocol !== 'https:') {
- if (!isNodeWebkit && (location.protocol == 'file:' || location.protocol == 'http:')) {
- error('You cannot use HTTP or file protocol for screen capturing. You must either use HTTPs or chrome extension page or Node-Webkit page.');
- }
- } else {
- error('Unable to detect actual issue. Maybe "deprecated" screen capturing flag was not set using command line or maybe you clicked "No" button or maybe chrome extension returned invalid "sourceId". Please install chrome-extension: http://bit.ly/webrtc-screen-extension');
- }
- }
-
- currentUserMediaRequest.mutex = false;
-
- // to make sure same stream can be captured again!
- var idInstance = JSON.stringify(constraintUsed);
- if (currentUserMediaRequest.streams[idInstance]) {
- delete currentUserMediaRequest.streams[idInstance];
- }
- },
- mediaConstraints: connection.mediaConstraints || {}
- };
-
- mediaConfig.constraints = forcedConstraints || constraints;
- mediaConfig.connection = connection;
- getUserMedia(mediaConfig);
- }
- }
-
- function onStreamSuccessCallback(stream, returnBack, idInstance, streamid, forcedConstraints, forcedCallback, isRemoveVideoTracks, screen_constraints, constraints, session) {
- if (!streamid) streamid = getRandomString();
-
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'usermedia-fetched',
- reason: 'Captured user media using constraints: ' + toStr(forcedConstraints)
- });
-
- if (isRemoveVideoTracks) {
- stream = convertToAudioStream(stream);
- }
-
- connection.localStreamids.push(streamid);
- stream.onended = function() {
- if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode && document.getElementById(stream.streamid)) {
- streamedObject.mediaElement = document.getElementById(stream.streamid);
- }
-
- // when a stream is stopped; it must be removed from "attachStreams" array
- connection.attachStreams.forEach(function(_stream, index) {
- if (_stream == stream) {
- delete connection.attachStreams[index];
- connection.attachStreams = swap(connection.attachStreams);
- }
- });
-
- onStreamEndedHandler(streamedObject, connection);
-
- if (connection.streams[streamid]) {
- connection.removeStream(streamid);
- }
-
- // if user clicks "stop" button to close screen sharing
- var _stream = connection.streams[streamid];
- if (_stream && _stream.sockets.length) {
- _stream.sockets.forEach(function(socket) {
- socket.send({
- streamid: _stream.streamid,
- stopped: true
- });
- });
- }
-
- currentUserMediaRequest.mutex = false;
- // to make sure same stream can be captured again!
- if (currentUserMediaRequest.streams[idInstance]) {
- delete currentUserMediaRequest.streams[idInstance];
- }
-
- // to allow re-capturing of the screen
- DetectRTC.screen.sourceId = null;
- };
-
- if (!isIE) {
- stream.streamid = streamid;
- stream.isScreen = forcedConstraints == screen_constraints;
- stream.isVideo = forcedConstraints == constraints && !!constraints.video;
- stream.isAudio = forcedConstraints == constraints && !!constraints.audio && !constraints.video;
-
- // if muted stream is negotiated
- stream.preMuted = {
- audio: stream.getAudioTracks().length && !stream.getAudioTracks()[0].enabled,
- video: stream.getVideoTracks().length && !stream.getVideoTracks()[0].enabled
- };
- }
-
- var mediaElement = createMediaElement(stream, session);
- mediaElement.muted = true;
-
- var streamedObject = {
- stream: stream,
- streamid: streamid,
- mediaElement: mediaElement,
- blobURL: mediaElement.mozSrcObject ? URL.createObjectURL(stream) : mediaElement.src,
- type: 'local',
- userid: connection.userid,
- extra: connection.extra,
- session: session,
- isVideo: !!stream.isVideo,
- isAudio: !!stream.isAudio,
- isScreen: !!stream.isScreen,
- isInitiator: !!connection.isInitiator,
- rtcMultiConnection: connection
- };
-
- if (isFirstSession) {
- connection.attachStreams.push(stream);
- }
- isFirstSession = false;
-
- connection.streams[streamid] = connection._getStream(streamedObject);
-
- if (!returnBack) {
- connection.onstream(streamedObject);
- }
-
- if (connection.setDefaultEventsForMediaElement) {
- connection.setDefaultEventsForMediaElement(mediaElement, streamid);
- }
-
- if (forcedCallback) forcedCallback(stream, streamedObject);
-
- if (connection.onspeaking) {
- initHark({
- stream: stream,
- streamedObject: streamedObject,
- connection: connection
- });
- }
- }
-
- // www.RTCMultiConnection.org/docs/captureUserMedia/
- connection.captureUserMedia = captureUserMedia;
-
- // www.RTCMultiConnection.org/docs/leave/
- connection.leave = function(userid) {
- if (!rtcMultiSession) return;
-
- isFirstSession = true;
-
- if (userid) {
- connection.eject(userid);
- return;
- }
-
- rtcMultiSession.leave();
- };
-
- // www.RTCMultiConnection.org/docs/eject/
- connection.eject = function(userid) {
- if (!connection.isInitiator) throw 'Only session-initiator can eject a user.';
- if (!connection.peers[userid]) throw 'You ejected invalid user.';
- connection.peers[userid].sendCustomMessage({
- ejected: true
- });
- };
-
- // www.RTCMultiConnection.org/docs/close/
- connection.close = function() {
- // close entire session
- connection.autoCloseEntireSession = true;
- connection.leave();
- };
-
- // www.RTCMultiConnection.org/docs/renegotiate/
- connection.renegotiate = function(stream, session) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.renegotiate(stream, session);
- }, 1000);
- return;
- }
-
- rtcMultiSession.addStream({
- renegotiate: session || merge({
- oneway: true
- }, connection.session),
- stream: stream
- });
- };
-
- connection.attachExternalStream = function(stream, isScreen) {
- var constraints = {};
- if (stream.getAudioTracks && stream.getAudioTracks().length) {
- constraints.audio = true;
- }
- if (stream.getVideoTracks && stream.getVideoTracks().length) {
- constraints.video = true;
- }
-
- var screen_constraints = {
- video: {
- chromeMediaSource: 'fake'
- }
- };
- var forcedConstraints = isScreen ? screen_constraints : constraints;
- onStreamSuccessCallback(stream, false, '', null, forcedConstraints, false, false, screen_constraints, constraints, constraints);
- };
-
- // www.RTCMultiConnection.org/docs/addStream/
- connection.addStream = function(session, socket) {
- // www.RTCMultiConnection.org/docs/renegotiation/
-
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.addStream(session, socket);
- }, 1000);
- return;
- }
-
- // renegotiate new media stream
- if (session) {
- var isOneWayStreamFromParticipant;
- if (!connection.isInitiator && session.oneway) {
- session.oneway = false;
- isOneWayStreamFromParticipant = true;
- }
-
- captureUserMedia(function(stream) {
- if (isOneWayStreamFromParticipant) {
- session.oneway = true;
- }
- addStream(stream);
- }, session);
- } else addStream();
-
- function addStream(stream) {
- rtcMultiSession.addStream({
- stream: stream,
- renegotiate: session || connection.session,
- socket: socket
- });
- }
- };
-
- // www.RTCMultiConnection.org/docs/removeStream/
- connection.removeStream = function(streamid, dontRenegotiate) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.removeStream(streamid, dontRenegotiate);
- }, 1000);
- return;
- }
-
- if (!streamid) streamid = 'all';
- if (!isString(streamid) || streamid.search(/all|audio|video|screen/gi) != -1) {
- function _detachStream(_stream, config) {
- if (config.local && _stream.type != 'local') return;
- if (config.remote && _stream.type != 'remote') return;
-
- // connection.removeStream({screen:true});
- if (config.screen && !!_stream.isScreen) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- // connection.removeStream({audio:true});
- if (config.audio && !!_stream.isAudio) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- // connection.removeStream({video:true});
- if (config.video && !!_stream.isVideo) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- // connection.removeStream({});
- if (!config.audio && !config.video && !config.screen) {
- connection.detachStreams.push(_stream.streamid);
- }
-
- if (connection.detachStreams.indexOf(_stream.streamid) != -1) {
- log('removing stream', _stream.streamid);
- onStreamEndedHandler(_stream, connection);
-
- if (config.stop) {
- connection.stopMediaStream(_stream.stream);
- }
- }
- }
-
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- _stream = connection.streams[stream];
-
- if (streamid == 'all') _detachStream(_stream, {
- audio: true,
- video: true,
- screen: true
- });
-
- else if (isString(streamid)) {
- // connection.removeStream('screen');
- var config = {};
- config[streamid] = true;
- _detachStream(_stream, config);
- } else _detachStream(_stream, streamid);
- }
- }
-
- if (!dontRenegotiate && connection.detachStreams.length) {
- connection.renegotiate();
- }
-
- return;
- }
-
- var stream = connection.streams[streamid];
-
- // detach pre-attached streams
- if (!stream) return warn('No such stream exists. Stream-id:', streamid);
-
- // www.RTCMultiConnection.org/docs/detachStreams/
- connection.detachStreams.push(stream.streamid);
-
- log('removing stream', stream.streamid);
- onStreamEndedHandler(stream, connection);
-
- // todo: how to allow "stop" function?
- // connection.stopMediaStream(stream.stream)
-
- if (!dontRenegotiate) {
- connection.renegotiate();
- }
- };
-
- connection.switchStream = function(session) {
- if (connection.numberOfConnectedUsers <= 0) {
- // no connections
- setTimeout(function() {
- // try again
- connection.switchStream(session);
- }, 1000);
- return;
- }
-
- connection.removeStream('all', true);
- connection.addStream(session);
- };
-
- // www.RTCMultiConnection.org/docs/sendCustomMessage/
- connection.sendCustomMessage = function(message) {
- if (!rtcMultiSession || !rtcMultiSession.defaultSocket) {
- return setTimeout(function() {
- connection.sendCustomMessage(message);
- }, 1000);
- }
-
- rtcMultiSession.defaultSocket.send({
- customMessage: true,
- message: message
- });
- };
-
- // set RTCMultiConnection defaults on constructor invocation
- setDefaults(connection);
- };
-
- function RTCMultiSession(connection, callbackForSignalingReady) {
- var socketObjects = {};
- var sockets = [];
- var rtcMultiSession = this;
- var participants = {};
-
- if (!rtcMultiSession.fileBufferReader && connection.session.data && connection.enableFileSharing) {
- initFileBufferReader(connection, function(fbr) {
- rtcMultiSession.fileBufferReader = fbr;
- });
- }
-
- var textReceiver = new TextReceiver(connection);
-
- function onDataChannelMessage(e) {
- if (e.data.checkingPresence && connection.channels[e.userid]) {
- connection.channels[e.userid].send({
- presenceDetected: true
- });
- return;
- }
-
- if (e.data.presenceDetected && connection.peers[e.userid]) {
- connection.peers[e.userid].connected = true;
- return;
- }
-
- if (e.data.type === 'text') {
- textReceiver.receive(e.data, e.userid, e.extra);
- } else {
- if (connection.autoTranslateText) {
- e.original = e.data;
- connection.Translator.TranslateText(e.data, function(translatedText) {
- e.data = translatedText;
- connection.onmessage(e);
- });
- } else connection.onmessage(e);
- }
- }
-
- function onNewSession(session) {
- if (connection.skipOnNewSession) return;
-
- if (!session.session) session.session = {};
- if (!session.extra) session.extra = {};
-
- // todo: make sure this works as expected.
- // i.e. "onNewSession" should be fired only for
- // sessionid that is passed over "connect" method.
- if (connection.sessionid && session.sessionid != connection.sessionid) return;
-
- if (connection.onNewSession) {
- session.join = function(forceSession) {
- if (!forceSession) return connection.join(session);
-
- for (var f in forceSession) {
- session.session[f] = forceSession[f];
- }
-
- // keeping previous state
- var isDontCaptureUserMedia = connection.dontCaptureUserMedia;
-
- connection.dontCaptureUserMedia = false;
- connection.captureUserMedia(function() {
- connection.dontCaptureUserMedia = true;
- connection.join(session);
-
- // returning back previous state
- connection.dontCaptureUserMedia = isDontCaptureUserMedia;
- }, forceSession);
- };
- if (!session.extra) session.extra = {};
-
- return connection.onNewSession(session);
- }
-
- connection.join(session);
- }
-
- function updateSocketForLocalStreams(socket) {
- for (var i = 0; i < connection.localStreamids.length; i++) {
- var streamid = connection.localStreamids[i];
- if (connection.streams[streamid]) {
- // using "sockets" array to keep references of all sockets using
- // this media stream; so we can fire "onStreamEndedHandler" among all users.
- connection.streams[streamid].sockets.push(socket);
- }
- }
- }
-
- function newPrivateSocket(_config) {
- var socketConfig = {
- channel: _config.channel,
- onmessage: socketResponse,
- onopen: function(_socket) {
- if (_socket) socket = _socket;
-
- if (isofferer && !peer) {
- peerConfig.session = connection.session;
- if (!peer) peer = new PeerConnection();
- peer.create('offer', peerConfig);
- }
-
- _config.socketIndex = socket.index = sockets.length;
- socketObjects[socketConfig.channel] = socket;
- sockets[_config.socketIndex] = socket;
-
- updateSocketForLocalStreams(socket);
-
- if (!socket.__push) {
- socket.__push = socket.send;
- socket.send = function(message) {
- message.userid = message.userid || connection.userid;
- message.extra = message.extra || connection.extra || {};
-
- socket.__push(message);
- };
- }
- }
- };
-
- socketConfig.callback = function(_socket) {
- socket = _socket;
- socketConfig.onopen();
- };
-
- var socket = connection.openSignalingChannel(socketConfig);
- if (socket) socketConfig.onopen(socket);
-
- var isofferer = _config.isofferer,
- peer;
-
- var peerConfig = {
- onopen: onChannelOpened,
- onicecandidate: function(candidate) {
- if (!connection.candidates) throw 'ICE candidates are mandatory.';
- if (!connection.iceProtocols) throw 'At least one must be true; UDP or TCP.';
-
- var iceCandidates = connection.candidates;
-
- var stun = iceCandidates.stun;
- var turn = iceCandidates.turn;
-
- if (!isNull(iceCandidates.reflexive)) stun = iceCandidates.reflexive;
- if (!isNull(iceCandidates.relay)) turn = iceCandidates.relay;
-
- if (!iceCandidates.host && !!candidate.candidate.match(/a=candidate.*typ host/g)) return;
- if (!turn && !!candidate.candidate.match(/a=candidate.*typ relay/g)) return;
- if (!stun && !!candidate.candidate.match(/a=candidate.*typ srflx/g)) return;
-
- var protocol = connection.iceProtocols;
-
- if (!protocol.udp && !!candidate.candidate.match(/a=candidate.* udp/g)) return;
- if (!protocol.tcp && !!candidate.candidate.match(/a=candidate.* tcp/g)) return;
-
- if (!window.selfNPObject) window.selfNPObject = candidate;
-
- socket && socket.send({
- candidate: JSON.stringify({
- candidate: candidate.candidate,
- sdpMid: candidate.sdpMid,
- sdpMLineIndex: candidate.sdpMLineIndex
- })
- });
- },
- onmessage: function(data) {
- if (!data) return;
-
- var abToStr = ab2str(data);
- if (abToStr.indexOf('"userid":') != -1) {
- abToStr = JSON.parse(abToStr);
- onDataChannelMessage(abToStr);
- } else if (data instanceof ArrayBuffer || data instanceof DataView) {
- if (!connection.enableFileSharing) {
- throw 'It seems that receiving data is either "Blob" or "File" but file sharing is disabled.';
- }
-
- if (!rtcMultiSession.fileBufferReader) {
- var that = this;
- initFileBufferReader(connection, function(fbr) {
- rtcMultiSession.fileBufferReader = fbr;
- that.onmessage(data);
- });
- return;
- }
-
- var fileBufferReader = rtcMultiSession.fileBufferReader;
-
- fileBufferReader.convertToObject(data, function(chunk) {
- if (chunk.maxChunks || chunk.readyForNextChunk) {
- // if target peer requested next chunk
- if (chunk.readyForNextChunk) {
- fileBufferReader.getNextChunk(chunk.uuid, function(nextChunk, isLastChunk, extra) {
- rtcMultiSession.send(nextChunk);
- });
- return;
- }
-
- // if chunk is received
- fileBufferReader.addChunk(chunk, function(promptNextChunk) {
- // request next chunk
- rtcMultiSession.send(promptNextChunk);
- });
- return;
- }
-
- connection.onmessage({
- data: chunk,
- userid: _config.userid,
- extra: _config.extra
- });
- });
- return;
- }
- },
- onaddstream: function(stream, session) {
- session = session || _config.renegotiate || connection.session;
-
- // if it is data-only connection; then return.
- if (isData(session)) return;
-
- if (session.screen && (session.audio || session.video)) {
- if (!_config.gotAudioOrVideo) {
- // audio/video are fired earlier than screen
- _config.gotAudioOrVideo = true;
- session.screen = false;
- } else {
- // screen stream is always fired later
- session.audio = false;
- session.video = false;
- }
- }
-
- var preMuted = {};
-
- if (_config.streaminfo) {
- var streaminfo = _config.streaminfo.split('----');
- var strInfo = JSON.parse(streaminfo[streaminfo.length - 1]);
-
- if (!isIE) {
- stream.streamid = strInfo.streamid;
- stream.isScreen = !!strInfo.isScreen;
- stream.isVideo = !!strInfo.isVideo;
- stream.isAudio = !!strInfo.isAudio;
- preMuted = strInfo.preMuted;
- }
-
- streaminfo.pop();
- _config.streaminfo = streaminfo.join('----');
- }
-
- var mediaElement = createMediaElement(stream, merge({
- remote: true
- }, session));
-
- if (connection.setDefaultEventsForMediaElement) {
- connection.setDefaultEventsForMediaElement(mediaElement, stream.streamid);
- }
-
- if (!isPluginRTC && !stream.getVideoTracks().length) {
- function eventListener() {
- setTimeout(function() {
- mediaElement.muted = false;
- afterRemoteStreamStartedFlowing({
- mediaElement: mediaElement,
- session: session,
- stream: stream,
- preMuted: preMuted
- });
- }, 3000);
-
- mediaElement.removeEventListener('play', eventListener);
- }
- return mediaElement.addEventListener('play', eventListener, false);
- }
-
- waitUntilRemoteStreamStartsFlowing({
- mediaElement: mediaElement,
- session: session,
- stream: stream,
- preMuted: preMuted
- });
- },
-
- onremovestream: function(stream) {
- if (stream && stream.streamid) {
- stream = connection.streams[stream.streamid];
- if (stream) {
- log('on:stream:ended via on:remove:stream', stream);
- onStreamEndedHandler(stream, connection);
- }
- } else log('on:remove:stream', stream);
- },
-
- onclose: function(e) {
- e.extra = _config.extra;
- e.userid = _config.userid;
- connection.onclose(e);
-
- // suggested in #71 by "efaj"
- if (connection.channels[e.userid]) {
- delete connection.channels[e.userid];
- }
- },
- onerror: function(e) {
- e.extra = _config.extra;
- e.userid = _config.userid;
- connection.onerror(e);
- },
-
- oniceconnectionstatechange: function(event) {
- log('oniceconnectionstatechange', toStr(event));
-
- if (peer.connection && peer.connection.iceConnectionState == 'connected' && peer.connection.iceGatheringState == 'complete' && peer.connection.signalingState == 'stable' && connection.numberOfConnectedUsers == 1) {
- connection.onconnected({
- userid: _config.userid,
- extra: _config.extra,
- peer: connection.peers[_config.userid],
- targetuser: _config.userinfo
- });
- }
-
- if (!connection.isInitiator && peer.connection && peer.connection.iceConnectionState == 'connected' && peer.connection.iceGatheringState == 'complete' && peer.connection.signalingState == 'stable' && connection.numberOfConnectedUsers == 1) {
- connection.onstatechange({
- userid: _config.userid,
- extra: _config.extra,
- name: 'connected-with-initiator',
- reason: 'ICE connection state seems connected; gathering state is completed; and signaling state is stable.'
- });
- }
-
- if (connection.peers[_config.userid] && connection.peers[_config.userid].oniceconnectionstatechange) {
- connection.peers[_config.userid].oniceconnectionstatechange(event);
- }
-
- // if ICE connectivity check is failed; renegotiate or redial
- if (connection.peers[_config.userid] && connection.peers[_config.userid].peer.connection.iceConnectionState == 'failed') {
- connection.onfailed({
- userid: _config.userid,
- extra: _config.extra,
- peer: connection.peers[_config.userid],
- targetuser: _config.userinfo
- });
- }
-
- if (connection.peers[_config.userid] && connection.peers[_config.userid].peer.connection.iceConnectionState == 'disconnected') {
- !peer.connection.renegotiate && connection.ondisconnected({
- userid: _config.userid,
- extra: _config.extra,
- peer: connection.peers[_config.userid],
- targetuser: _config.userinfo
- });
- peer.connection.renegotiate = false;
- }
-
- if (!connection.autoReDialOnFailure) return;
-
- if (connection.peers[_config.userid]) {
- if (connection.peers[_config.userid].peer.connection.iceConnectionState != 'disconnected') {
- _config.redialing = false;
- }
-
- if (connection.peers[_config.userid].peer.connection.iceConnectionState == 'disconnected' && !_config.redialing) {
- _config.redialing = true;
- warn('Peer connection is closed.', toStr(connection.peers[_config.userid].peer.connection), 'ReDialing..');
- connection.peers[_config.userid].socket.send({
- redial: true
- });
-
- // to make sure all old "remote" streams are also removed!
- connection.streams.remove({
- remote: true,
- userid: _config.userid
- });
- }
- }
- },
-
- onsignalingstatechange: function(event) {
- log('onsignalingstatechange', toStr(event));
- },
-
- attachStreams: connection.dontAttachStream ? [] : connection.attachStreams,
- iceServers: connection.iceServers,
- rtcConfiguration: connection.rtcConfiguration,
- bandwidth: connection.bandwidth,
- sdpConstraints: connection.sdpConstraints,
- optionalArgument: connection.optionalArgument,
- disableDtlsSrtp: connection.disableDtlsSrtp,
- dataChannelDict: connection.dataChannelDict,
- preferSCTP: connection.preferSCTP,
-
- onSessionDescription: function(sessionDescription, streaminfo) {
- sendsdp({
- sdp: sessionDescription,
- socket: socket,
- streaminfo: streaminfo
- });
- },
- trickleIce: connection.trickleIce,
- processSdp: connection.processSdp,
- sendStreamId: function(stream) {
- socket && socket.send({
- streamid: stream.streamid,
- isScreen: !!stream.isScreen,
- isAudio: !!stream.isAudio,
- isVideo: !!stream.isVideo
- });
- },
- rtcMultiConnection: connection
- };
-
- function waitUntilRemoteStreamStartsFlowing(args) {
- // chrome for android may have some features missing
- if (isMobileDevice || isPluginRTC || (isNull(connection.waitUntilRemoteStreamStartsFlowing) || !connection.waitUntilRemoteStreamStartsFlowing)) {
- return afterRemoteStreamStartedFlowing(args);
- }
-
- if (!args.numberOfTimes) args.numberOfTimes = 0;
- args.numberOfTimes++;
-
- if (!(args.mediaElement.readyState <= HTMLMediaElement.HAVE_CURRENT_DATA || args.mediaElement.paused || args.mediaElement.currentTime <= 0)) {
- return afterRemoteStreamStartedFlowing(args);
- }
-
- if (args.numberOfTimes >= 60) { // wait 60 seconds while video is delivered!
- return socket.send({
- failedToReceiveRemoteVideo: true,
- streamid: args.stream.streamid
- });
- }
-
- setTimeout(function() {
- log('Waiting for incoming remote stream to be started flowing: ' + args.numberOfTimes + ' seconds.');
- waitUntilRemoteStreamStartsFlowing(args);
- }, 900);
- }
-
- function initFakeChannel() {
- if (!connection.fakeDataChannels || connection.channels[_config.userid]) return;
-
- // for non-data connections; allow fake data sender!
- if (!connection.session.data) {
- var fakeChannel = {
- send: function(data) {
- socket.send({
- fakeData: data
- });
- },
- readyState: 'open'
- };
- // connection.channels['user-id'].send(data);
- connection.channels[_config.userid] = {
- channel: fakeChannel,
- send: function(data) {
- this.channel.send(data);
- }
- };
- peerConfig.onopen(fakeChannel);
- }
- }
-
- function afterRemoteStreamStartedFlowing(args) {
- var mediaElement = args.mediaElement;
- var session = args.session;
- var stream = args.stream;
-
- stream.onended = function() {
- if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode && document.getElementById(stream.streamid)) {
- streamedObject.mediaElement = document.getElementById(stream.streamid);
- }
-
- onStreamEndedHandler(streamedObject, connection);
- };
-
- var streamedObject = {
- mediaElement: mediaElement,
-
- stream: stream,
- streamid: stream.streamid,
- session: session || connection.session,
-
- blobURL: isPluginRTC ? '' : mediaElement.mozSrcObject ? URL.createObjectURL(stream) : mediaElement.src,
- type: 'remote',
-
- extra: _config.extra,
- userid: _config.userid,
-
- isVideo: isPluginRTC ? !!session.video : !!stream.isVideo,
- isAudio: isPluginRTC ? !!session.audio && !session.video : !!stream.isAudio,
- isScreen: !!stream.isScreen,
- isInitiator: !!_config.isInitiator,
-
- rtcMultiConnection: connection,
- socket: socket
- };
-
- // connection.streams['stream-id'].mute({audio:true})
- connection.streams[stream.streamid] = connection._getStream(streamedObject);
- connection.onstream(streamedObject);
-
- if (!isEmpty(args.preMuted) && (args.preMuted.audio || args.preMuted.video)) {
- var fakeObject = merge({}, streamedObject);
- fakeObject.session = merge(fakeObject.session, args.preMuted);
-
- fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video;
- fakeObject.isVideo = !!fakeObject.session.video;
- fakeObject.isScreen = false;
-
- connection.onmute(fakeObject);
- }
-
- log('on:add:stream', streamedObject);
-
- onSessionOpened();
-
- if (connection.onspeaking) {
- initHark({
- stream: stream,
- streamedObject: streamedObject,
- connection: connection
- });
- }
- }
-
- function onChannelOpened(channel) {
- _config.channel = channel;
-
- // connection.channels['user-id'].send(data);
- connection.channels[_config.userid] = {
- channel: _config.channel,
- send: function(data) {
- connection.send(data, this.channel);
- }
- };
-
- connection.onopen({
- extra: _config.extra,
- userid: _config.userid,
- channel: channel
- });
-
- // fetch files from file-queue
- for (var q in connection.fileQueue) {
- connection.send(connection.fileQueue[q], channel);
- }
-
- if (isData(connection.session)) onSessionOpened();
-
- if (connection.partOfScreen && connection.partOfScreen.sharing) {
- connection.peers[_config.userid].sharePartOfScreen(connection.partOfScreen);
- }
- }
-
- function updateSocket() {
- // todo: need to check following {if-block} MUST not affect "redial" process
- if (socket.userid == _config.userid)
- return;
-
- socket.userid = _config.userid;
- sockets[_config.socketIndex] = socket;
-
- connection.numberOfConnectedUsers++;
- // connection.peers['user-id'].addStream({audio:true})
- connection.peers[_config.userid] = {
- socket: socket,
- peer: peer,
- userid: _config.userid,
- extra: _config.extra,
- userinfo: _config.userinfo,
- addStream: function(session00) {
- // connection.peers['user-id'].addStream({audio: true, video: true);
-
- connection.addStream(session00, this.socket);
- },
- removeStream: function(streamid) {
- if (!connection.streams[streamid])
- return warn('No such stream exists. Stream-id:', streamid);
-
- this.peer.connection.removeStream(connection.streams[streamid].stream);
- this.renegotiate();
- },
- renegotiate: function(stream, session) {
- // connection.peers['user-id'].renegotiate();
-
- connection.renegotiate(stream, session);
- },
- changeBandwidth: function(bandwidth) {
- // connection.peers['user-id'].changeBandwidth();
-
- if (!bandwidth) throw 'You MUST pass bandwidth object.';
- if (isString(bandwidth)) throw 'Pass object for bandwidth instead of string; e.g. {audio:10, video:20}';
-
- // set bandwidth for self
- this.peer.bandwidth = bandwidth;
-
- // ask remote user to synchronize bandwidth
- this.socket.send({
- changeBandwidth: true,
- bandwidth: bandwidth
- });
- },
- sendCustomMessage: function(message) {
- // connection.peers['user-id'].sendCustomMessage();
-
- this.socket.send({
- customMessage: true,
- message: message
- });
- },
- onCustomMessage: function(message) {
- log('Received "private" message from', this.userid,
- isString(message) ? message : toStr(message));
- },
- drop: function(dontSendMessage) {
- // connection.peers['user-id'].drop();
-
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
-
- if (stream.userid == connection.userid && stream.type == 'local') {
- this.peer.connection.removeStream(stream.stream);
- onStreamEndedHandler(stream, connection);
- }
-
- if (stream.type == 'remote' && stream.userid == this.userid) {
- onStreamEndedHandler(stream, connection);
- }
- }
- }
-
- !dontSendMessage && this.socket.send({
- drop: true
- });
- },
- hold: function(holdMLine) {
- // connection.peers['user-id'].hold();
-
- if (peer.prevCreateType == 'answer') {
- this.socket.send({
- unhold: true,
- holdMLine: holdMLine || 'both',
- takeAction: true
- });
- return;
- }
-
- this.socket.send({
- hold: true,
- holdMLine: holdMLine || 'both'
- });
-
- this.peer.hold = true;
- this.fireHoldUnHoldEvents({
- kind: holdMLine,
- isHold: true,
- userid: connection.userid,
- remoteUser: this.userid
- });
- },
- unhold: function(holdMLine) {
- // connection.peers['user-id'].unhold();
-
- if (peer.prevCreateType == 'answer') {
- this.socket.send({
- unhold: true,
- holdMLine: holdMLine || 'both',
- takeAction: true
- });
- return;
- }
-
- this.socket.send({
- unhold: true,
- holdMLine: holdMLine || 'both'
- });
-
- this.peer.hold = false;
- this.fireHoldUnHoldEvents({
- kind: holdMLine,
- isHold: false,
- userid: connection.userid,
- remoteUser: this.userid
- });
- },
- fireHoldUnHoldEvents: function(e) {
- // this method is for inner usages only!
-
- var isHold = e.isHold;
- var kind = e.kind;
- var userid = e.remoteUser || e.userid;
-
- // hold means inactive a specific media line!
- // a media line can contain multiple synced sources (ssrc)
- // i.e. a media line can reference multiple tracks!
- // that's why hold will affect all relevant tracks in a specific media line!
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
-
- if (stream.userid == userid) {
- // www.RTCMultiConnection.org/docs/onhold/
- if (isHold)
- connection.onhold(merge({
- kind: kind
- }, stream));
-
- // www.RTCMultiConnection.org/docs/onunhold/
- if (!isHold)
- connection.onunhold(merge({
- kind: kind
- }, stream));
- }
- }
- }
- },
- redial: function() {
- // connection.peers['user-id'].redial();
-
- // 1st of all; remove all relevant remote media streams
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
-
- if (stream.userid == this.userid && stream.type == 'remote') {
- onStreamEndedHandler(stream, connection);
- }
- }
- }
-
- log('ReDialing...');
-
- socket.send({
- recreatePeer: true
- });
-
- peer = new PeerConnection();
- peer.create('offer', peerConfig);
- },
- sharePartOfScreen: function(args) {
- // www.RTCMultiConnection.org/docs/onpartofscreen/
- var that = this;
- var lastScreenshot = '';
-
- function partOfScreenCapturer() {
- // if stopped
- if (that.stopPartOfScreenSharing) {
- that.stopPartOfScreenSharing = false;
-
- if (connection.onpartofscreenstopped) {
- connection.onpartofscreenstopped();
- }
- return;
- }
-
- // if paused
- if (that.pausePartOfScreenSharing) {
- if (connection.onpartofscreenpaused) {
- connection.onpartofscreenpaused();
- }
-
- return setTimeout(partOfScreenCapturer, args.interval || 200);
- }
-
- capturePartOfScreen({
- element: args.element,
- connection: connection,
- callback: function(screenshot) {
- if (!connection.channels[that.userid]) {
- throw 'No such data channel exists.';
- }
-
- // don't share repeated content
- if (screenshot != lastScreenshot) {
- lastScreenshot = screenshot;
- connection.channels[that.userid].send({
- screenshot: screenshot,
- isPartOfScreen: true
- });
- }
-
- // "once" can be used to share single screenshot
- !args.once && setTimeout(partOfScreenCapturer, args.interval || 200);
- }
- });
- }
-
- partOfScreenCapturer();
- },
- getConnectionStats: function(callback, interval) {
- if (!callback) throw 'callback is mandatory.';
-
- if (!window.getConnectionStats) {
- loadScript(connection.resources.getConnectionStats, invoker);
- } else invoker();
-
- function invoker() {
- RTCPeerConnection.prototype.getConnectionStats = window.getConnectionStats;
- peer.connection && peer.connection.getConnectionStats(callback, interval);
- }
- },
- takeSnapshot: function(callback) {
- takeSnapshot({
- userid: this.userid,
- connection: connection,
- callback: callback
- });
- }
- };
- }
-
- function onSessionOpened() {
- // original conferencing infrastructure!
- if (connection.isInitiator && getLength(participants) && getLength(participants) <= connection.maxParticipantsAllowed) {
- if (!connection.session.oneway && !connection.session.broadcast) {
- defaultSocket.send({
- sessionid: connection.sessionid,
- newParticipant: _config.userid || socket.channel,
- userData: {
- userid: _config.userid || socket.channel,
- extra: _config.extra
- }
- });
- }
- }
-
- // 1st: renegotiation is supported only on chrome
- // 2nd: must not renegotiate same media multiple times
- // 3rd: todo: make sure that target-user has no such "renegotiated" media.
- if (_config.userinfo.browser == 'chrome' && !_config.renegotiatedOnce) {
- // this code snippet is added to make sure that "previously-renegotiated" streams are also
- // renegotiated to this new user
- for (var rSession in connection.renegotiatedSessions) {
- _config.renegotiatedOnce = true;
-
- if (connection.renegotiatedSessions[rSession] && connection.renegotiatedSessions[rSession].stream) {
- connection.peers[_config.userid].renegotiate(connection.renegotiatedSessions[rSession].stream, connection.renegotiatedSessions[rSession].session);
- }
- }
- }
- }
-
- function socketResponse(response) {
- if (isRMSDeleted) return;
-
- if (response.userid == connection.userid)
- return;
-
- if (response.sdp) {
- _config.userid = response.userid;
- _config.extra = response.extra || {};
- _config.renegotiate = response.renegotiate;
- _config.streaminfo = response.streaminfo;
- _config.isInitiator = response.isInitiator;
- _config.userinfo = response.userinfo;
-
- var sdp = JSON.parse(response.sdp);
-
- if (sdp.type == 'offer') {
- // to synchronize SCTP or RTP
- peerConfig.preferSCTP = !!response.preferSCTP;
- connection.fakeDataChannels = !!response.fakeDataChannels;
- }
-
- // initializing fake channel
- initFakeChannel();
-
- sdpInvoker(sdp, response.labels);
- }
-
- if (response.candidate) {
- peer && peer.addIceCandidate(JSON.parse(response.candidate));
- }
-
- if (response.streamid) {
- if (!rtcMultiSession.streamids) {
- rtcMultiSession.streamids = {};
- }
- if (!rtcMultiSession.streamids[response.streamid]) {
- rtcMultiSession.streamids[response.streamid] = response.streamid;
- connection.onstreamid(response);
- }
- }
-
- if (response.mute || response.unmute) {
- if (response.promptMuteUnmute) {
- if (!connection.privileges.canMuteRemoteStream) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'mute-request-denied',
- reason: response.userid + ' tried to mute your stream; however "privileges.canMuteRemoteStream" is "false".'
- });
- return;
- }
-
- if (connection.streams[response.streamid]) {
- if (response.mute && !connection.streams[response.streamid].muted) {
- connection.streams[response.streamid].mute(response.session);
- }
- if (response.unmute && connection.streams[response.streamid].muted) {
- connection.streams[response.streamid].unmute(response.session);
- }
- }
- } else {
- var streamObject = {};
- if (connection.streams[response.streamid]) {
- streamObject = connection.streams[response.streamid];
- }
-
- var session = response.session;
- var fakeObject = merge({}, streamObject);
- fakeObject.session = session;
-
- fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video;
- fakeObject.isVideo = !!fakeObject.session.video;
- fakeObject.isScreen = !!fakeObject.session.screen;
-
- if (response.mute) connection.onmute(fakeObject || response);
- if (response.unmute) connection.onunmute(fakeObject || response);
- }
- }
-
- if (response.isVolumeChanged) {
- log('Volume of stream: ' + response.streamid + ' has changed to: ' + response.volume);
- if (connection.streams[response.streamid]) {
- var mediaElement = connection.streams[response.streamid].mediaElement;
- if (mediaElement) mediaElement.volume = response.volume;
- }
- }
-
- // to stop local stream
- if (response.stopped) {
- if (connection.streams[response.streamid]) {
- onStreamEndedHandler(connection.streams[response.streamid], connection);
- }
- }
-
- // to stop remote stream
- if (response.promptStreamStop /* && !connection.isInitiator */ ) {
- if (!connection.privileges.canStopRemoteStream) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'stop-request-denied',
- reason: response.userid + ' tried to stop your stream; however "privileges.canStopRemoteStream" is "false".'
- });
- return;
- }
- warn('Remote stream has been manually stopped!');
- if (connection.streams[response.streamid]) {
- connection.streams[response.streamid].stop();
- }
- }
-
- if (response.left) {
- // firefox is unable to stop remote streams
- // firefox doesn't auto stop streams when peer.close() is called.
- if (isFirefox) {
- var userLeft = response.userid;
- for (var stream in connection.streams) {
- stream = connection.streams[stream];
- if (stream.userid == userLeft) {
- connection.stopMediaStream(stream);
- onStreamEndedHandler(stream, connection);
- }
- }
- }
-
- if (peer && peer.connection) {
- // todo: verify if-block's 2nd condition
- if (peer.connection.signalingState != 'closed' && peer.connection.iceConnectionState.search(/disconnected|failed/gi) == -1) {
- peer.connection.close();
- }
- peer.connection = null;
- }
-
- if (participants[response.userid]) delete participants[response.userid];
-
- if (response.closeEntireSession) {
- connection.onSessionClosed(response);
- connection.leave();
- return;
- }
-
- connection.remove(response.userid);
-
- onLeaveHandler({
- userid: response.userid,
- extra: response.extra || {},
- entireSessionClosed: !!response.closeEntireSession
- }, connection);
- }
-
- // keeping session active even if initiator leaves
- if (response.playRoleOfBroadcaster) {
- if (response.extra) {
- // clone extra-data from initial moderator
- connection.extra = merge(connection.extra, response.extra);
- }
- if (response.participants) {
- participants = response.participants;
-
- // make sure that if 2nd initiator leaves; control is shifted to 3rd person.
- if (participants[connection.userid]) {
- delete participants[connection.userid];
- }
-
- if (sockets[0] && sockets[0].userid == response.userid) {
- delete sockets[0];
- sockets = swap(sockets);
- }
-
- if (socketObjects[response.userid]) {
- delete socketObjects[response.userid];
- }
- }
-
- setTimeout(connection.playRoleOfInitiator, 2000);
- }
-
- if (response.changeBandwidth) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
-
- // synchronize bandwidth
- connection.peers[response.userid].peer.bandwidth = response.bandwidth;
-
- // renegotiate to apply bandwidth
- connection.peers[response.userid].renegotiate();
- }
-
- if (response.customMessage) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
- if (response.message.ejected) {
- if (connection.sessionDescriptions[connection.sessionid].userid != response.userid) {
- throw 'only initiator can eject a user.';
- }
- // initiator ejected this user
- connection.leave();
-
- connection.onSessionClosed({
- userid: response.userid,
- extra: response.extra || _config.extra,
- isEjected: true
- });
- } else connection.peers[response.userid].onCustomMessage(response.message);
- }
-
- if (response.drop) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
- connection.peers[response.userid].drop(true);
- connection.peers[response.userid].renegotiate();
-
- connection.ondrop(response.userid);
- }
-
- if (response.hold || response.unhold) {
- if (!connection.peers[response.userid]) throw 'No such peer exists.';
-
- if (response.takeAction) {
- connection.peers[response.userid][!!response.hold ? 'hold' : 'unhold'](response.holdMLine);
- return;
- }
-
- connection.peers[response.userid].peer.hold = !!response.hold;
- connection.peers[response.userid].peer.holdMLine = response.holdMLine;
-
- socket.send({
- isRenegotiate: true
- });
-
- connection.peers[response.userid].fireHoldUnHoldEvents({
- kind: response.holdMLine,
- isHold: !!response.hold,
- userid: response.userid
- });
- }
-
- if (response.isRenegotiate) {
- connection.peers[response.userid].renegotiate(null, connection.peers[response.userid].peer.session);
- }
-
- // fake data channels!
- if (response.fakeData) {
- peerConfig.onmessage(response.fakeData);
- }
-
- // sometimes we don't need to renegotiate e.g. when peers are disconnected
- // or if it is firefox
- if (response.recreatePeer) {
- peer = new PeerConnection();
- }
-
- // remote video failed either out of ICE gathering process or ICE connectivity check-up
- // or IceAgent was unable to locate valid candidates/ports.
- if (response.failedToReceiveRemoteVideo) {
- log('Remote peer hasn\'t received stream: ' + response.streamid + '. Renegotiating...');
- if (connection.peers[response.userid]) {
- connection.peers[response.userid].renegotiate();
- }
- }
-
- if (response.redial) {
- if (connection.peers[response.userid]) {
- if (connection.peers[response.userid].peer.connection.iceConnectionState != 'disconnected') {
- _config.redialing = false;
- }
-
- if (connection.peers[response.userid].peer.connection.iceConnectionState == 'disconnected' && !_config.redialing) {
- _config.redialing = true;
-
- warn('Peer connection is closed.', toStr(connection.peers[response.userid].peer.connection), 'ReDialing..');
- connection.peers[response.userid].redial();
- }
- }
- }
- }
-
- connection.playRoleOfInitiator = function() {
- connection.dontCaptureUserMedia = true;
- connection.open();
- sockets = swap(sockets);
- connection.dontCaptureUserMedia = false;
- };
-
- connection.askToShareParticipants = function() {
- defaultSocket && defaultSocket.send({
- askToShareParticipants: true
- });
- };
-
- connection.shareParticipants = function(args) {
- var message = {
- joinUsers: participants,
- userid: connection.userid,
- extra: connection.extra
- };
-
- if (args) {
- if (args.dontShareWith) message.dontShareWith = args.dontShareWith;
- if (args.shareWith) message.shareWith = args.shareWith;
- }
-
- defaultSocket.send(message);
- };
-
- function sdpInvoker(sdp, labels) {
- if (sdp.type == 'answer') {
- peer.setRemoteDescription(sdp);
- updateSocket();
- return;
- }
- if (!_config.renegotiate && sdp.type == 'offer') {
- peerConfig.offerDescription = sdp;
-
- peerConfig.session = connection.session;
- if (!peer) peer = new PeerConnection();
- peer.create('answer', peerConfig);
-
- updateSocket();
- return;
- }
-
- var session = _config.renegotiate;
- // detach streams
- detachMediaStream(labels, peer.connection);
-
- if (session.oneway || isData(session)) {
- createAnswer();
- delete _config.renegotiate;
- } else {
- if (_config.capturing)
- return;
-
- _config.capturing = true;
-
- connection.captureUserMedia(function(stream) {
- _config.capturing = false;
-
- peer.addStream(stream);
-
- connection.renegotiatedSessions[JSON.stringify(_config.renegotiate)] = {
- session: _config.renegotiate,
- stream: stream
- };
-
- delete _config.renegotiate;
-
- createAnswer();
- }, _config.renegotiate);
- }
-
- function createAnswer() {
- peer.recreateAnswer(sdp, session, function(_sdp, streaminfo) {
- sendsdp({
- sdp: _sdp,
- socket: socket,
- streaminfo: streaminfo
- });
- connection.detachStreams = [];
- });
- }
- }
- }
-
- function detachMediaStream(labels, peer) {
- if (!labels) return;
- for (var i = 0; i < labels.length; i++) {
- var label = labels[i];
- if (connection.streams[label]) {
- peer.removeStream(connection.streams[label].stream);
- }
- }
- }
-
- function sendsdp(e) {
- e.socket.send({
- sdp: JSON.stringify({
- sdp: e.sdp.sdp,
- type: e.sdp.type
- }),
- renegotiate: !!e.renegotiate ? e.renegotiate : false,
- streaminfo: e.streaminfo || '',
- labels: e.labels || [],
- preferSCTP: !!connection.preferSCTP,
- fakeDataChannels: !!connection.fakeDataChannels,
- isInitiator: !!connection.isInitiator,
- userinfo: {
- browser: isFirefox ? 'firefox' : 'chrome'
- }
- });
- }
-
- // sharing new user with existing participants
-
- function onNewParticipant(response) {
- var channel = response.newParticipant;
-
- if (!channel || !!participants[channel] || channel == connection.userid)
- return;
-
- var new_channel = connection.token();
- newPrivateSocket({
- channel: new_channel,
- extra: response.userData ? response.userData.extra : response.extra,
- userid: response.userData ? response.userData.userid : response.userid
- });
-
- defaultSocket.send({
- participant: true,
- targetUser: channel,
- channel: new_channel
- });
- }
-
- // if a user leaves
-
- function clearSession() {
- connection.numberOfConnectedUsers--;
-
- var alertMessage = {
- left: true,
- extra: connection.extra || {},
- userid: connection.userid,
- sessionid: connection.sessionid
- };
-
- if (connection.isInitiator) {
- // if initiator wants to close entire session
- if (connection.autoCloseEntireSession) {
- alertMessage.closeEntireSession = true;
- } else if (sockets[0]) {
- // shift initiation control to another user
- sockets[0].send({
- playRoleOfBroadcaster: true,
- userid: connection.userid,
- extra: connection.extra,
- participants: participants
- });
- }
- }
-
- sockets.forEach(function(socket, i) {
- socket.send(alertMessage);
-
- if (socketObjects[socket.channel]) {
- delete socketObjects[socket.channel];
- }
-
- delete sockets[i];
- });
-
- sockets = swap(sockets);
-
- connection.refresh();
-
- webAudioMediaStreamSources.forEach(function(mediaStreamSource) {
- // if source is connected; then chrome will crash on unload.
- mediaStreamSource.disconnect();
- });
-
- webAudioMediaStreamSources = [];
- }
-
- // www.RTCMultiConnection.org/docs/remove/
- connection.remove = function(userid) {
- if (rtcMultiSession.requestsFrom && rtcMultiSession.requestsFrom[userid]) delete rtcMultiSession.requestsFrom[userid];
-
- if (connection.peers[userid]) {
- if (connection.peers[userid].peer && connection.peers[userid].peer.connection) {
- if (connection.peers[userid].peer.connection.signalingState != 'closed') {
- connection.peers[userid].peer.connection.close();
- }
- connection.peers[userid].peer.connection = null;
- }
- delete connection.peers[userid];
- }
- if (participants[userid]) {
- delete participants[userid];
- }
-
- for (var stream in connection.streams) {
- stream = connection.streams[stream];
- if (stream.userid == userid) {
- onStreamEndedHandler(stream, connection);
- delete connection.streams[stream];
- }
- }
-
- if (socketObjects[userid]) {
- delete socketObjects[userid];
- }
- };
-
- // www.RTCMultiConnection.org/docs/refresh/
- connection.refresh = function() {
- // if firebase; remove data from firebase servers
- if (connection.isInitiator && !!connection.socket && !!connection.socket.remove) {
- connection.socket.remove();
- }
-
- participants = {};
-
- // to stop/remove self streams
- for (var i = 0; i < connection.attachStreams.length; i++) {
- connection.stopMediaStream(connection.attachStreams[i]);
- }
-
- // to allow capturing of identical streams
- currentUserMediaRequest = {
- streams: [],
- mutex: false,
- queueRequests: []
- };
-
- rtcMultiSession.isOwnerLeaving = true;
-
- connection.isInitiator = false;
- connection.isAcceptNewSession = true;
- connection.attachMediaStreams = [];
- connection.sessionDescription = null;
- connection.sessionDescriptions = {};
- connection.localStreamids = [];
- connection.preRecordedMedias = {};
- connection.snapshots = {};
-
- connection.numberOfConnectedUsers = 0;
- connection.numberOfSessions = 0;
-
- connection.attachStreams = [];
- connection.detachStreams = [];
- connection.fileQueue = {};
- connection.channels = {};
- connection.renegotiatedSessions = {};
-
- for (var peer in connection.peers) {
- if (peer != connection.userid) {
- delete connection.peers[peer];
- }
- }
-
- // to make sure remote streams are also removed!
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- onStreamEndedHandler(connection.streams[stream], connection);
- delete connection.streams[stream];
- }
- }
-
- socketObjects = {};
- sockets = [];
- participants = {};
- };
-
- // www.RTCMultiConnection.org/docs/reject/
- connection.reject = function(userid) {
- if (!isString(userid)) userid = userid.userid;
- defaultSocket.send({
- rejectedRequestOf: userid
- });
-
- // remove relevant data to allow him join again
- connection.remove(userid);
- };
-
- rtcMultiSession.leaveHandler = function(e) {
- if (!connection.leaveOnPageUnload) return;
-
- if (isNull(e.keyCode)) {
- return clearSession();
- }
-
- if (e.keyCode == 116) {
- clearSession();
- }
- };
-
- listenEventHandler('beforeunload', rtcMultiSession.leaveHandler);
- listenEventHandler('keyup', rtcMultiSession.leaveHandler);
-
- rtcMultiSession.onLineOffLineHandler = function() {
- if (!navigator.onLine) {
- rtcMultiSession.isOffLine = true;
- } else if (rtcMultiSession.isOffLine) {
- rtcMultiSession.isOffLine = !navigator.onLine;
-
- // defaultSocket = getDefaultSocketRef();
-
- // pending tasks should be resumed?
- // sockets should be reconnected?
- // peers should be re-established?
- }
- };
-
- listenEventHandler('load', rtcMultiSession.onLineOffLineHandler);
- listenEventHandler('online', rtcMultiSession.onLineOffLineHandler);
- listenEventHandler('offline', rtcMultiSession.onLineOffLineHandler);
-
- function onSignalingReady() {
- if (rtcMultiSession.signalingReady) return;
- rtcMultiSession.signalingReady = true;
-
- setTimeout(callbackForSignalingReady, 1000);
-
- if (!connection.isInitiator) {
- // as soon as signaling gateway is connected;
- // user should check existing rooms!
- defaultSocket && defaultSocket.send({
- searchingForRooms: true
- });
- }
- }
-
- function joinParticipants(joinUsers) {
- for (var user in joinUsers) {
- if (!participants[joinUsers[user]]) {
- onNewParticipant({
- sessionid: connection.sessionid,
- newParticipant: joinUsers[user],
- userid: connection.userid,
- extra: connection.extra
- });
- }
- }
- }
-
- function getDefaultSocketRef() {
- return connection.openSignalingChannel({
- onmessage: function(response) {
- // RMS == RTCMultiSession
- if (isRMSDeleted) return;
-
- // if message is sent by same user
- if (response.userid == connection.userid) return;
-
- if (response.sessionid && response.userid) {
- if (!connection.sessionDescriptions[response.sessionid]) {
- connection.numberOfSessions++;
- connection.sessionDescriptions[response.sessionid] = response;
-
- // fire "onNewSession" only if:
- // 1) "isAcceptNewSession" boolean is true
- // 2) "sessionDescriptions" object isn't having same session i.e. to prevent duplicate invocations
- if (connection.isAcceptNewSession) {
-
- if (!connection.dontOverrideSession) {
- connection.session = response.session;
- }
-
- onNewSession(response);
- }
- }
- }
-
- if (response.newParticipant && !connection.isAcceptNewSession && rtcMultiSession.broadcasterid === response.userid) {
- if (response.newParticipant != connection.userid) {
- onNewParticipant(response);
- }
- }
-
- if (getLength(participants) < connection.maxParticipantsAllowed && response.targetUser == connection.userid && response.participant) {
- if (connection.peers[response.userid] && !connection.peers[response.userid].peer) {
- delete participants[response.userid];
- delete connection.peers[response.userid];
- connection.isAcceptNewSession = true;
- return acceptRequest(response);
- }
-
- if (!participants[response.userid]) {
- acceptRequest(response);
- }
- }
-
- if (response.acceptedRequestOf == connection.userid) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'request-accepted',
- reason: response.userid + ' accepted your participation request.'
- });
- }
-
- if (response.rejectedRequestOf == connection.userid) {
- connection.onstatechange({
- userid: response.userid,
- extra: response.extra,
- name: 'request-rejected',
- reason: response.userid + ' rejected your participation request.'
- });
- }
-
- if (response.customMessage) {
- if (response.message.drop) {
- connection.ondrop(response.userid);
-
- connection.attachStreams = [];
- // "drop" should detach all local streams
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
- if (stream.type == 'local') {
- connection.detachStreams.push(stream.streamid);
- onStreamEndedHandler(stream, connection);
- } else onStreamEndedHandler(stream, connection);
- }
- }
-
- if (response.message.renegotiate) {
- // renegotiate; so "peer.removeStream" happens.
- connection.renegotiate();
- }
- } else if (connection.onCustomMessage) {
- connection.onCustomMessage(response.message);
- }
- }
-
- if (connection.isInitiator && response.searchingForRooms) {
- defaultSocket && defaultSocket.send({
- sessionDescription: connection.sessionDescription,
- responseFor: response.userid
- });
- }
-
- if (response.sessionDescription && response.responseFor == connection.userid) {
- var sessionDescription = response.sessionDescription;
- if (!connection.sessionDescriptions[sessionDescription.sessionid]) {
- connection.numberOfSessions++;
- connection.sessionDescriptions[sessionDescription.sessionid] = sessionDescription;
- }
- }
-
- if (connection.isInitiator && response.askToShareParticipants && defaultSocket) {
- connection.shareParticipants({
- shareWith: response.userid
- });
- }
-
- // participants are shared with single user
- if (response.shareWith == connection.userid && response.dontShareWith != connection.userid && response.joinUsers) {
- joinParticipants(response.joinUsers);
- }
-
- // participants are shared with all users
- if (!response.shareWith && response.joinUsers) {
- if (response.dontShareWith) {
- if (connection.userid != response.dontShareWith) {
- joinParticipants(response.joinUsers);
- }
- } else joinParticipants(response.joinUsers);
- }
-
- if (response.messageFor == connection.userid && response.presenceState) {
- if (response.presenceState == 'checking') {
- defaultSocket.send({
- messageFor: response.userid,
- presenceState: 'available',
- _config: response._config
- });
- log('participant asked for availability');
- }
-
- if (response.presenceState == 'available') {
- rtcMultiSession.presenceState = 'available';
-
- connection.onstatechange({
- userid: 'browser',
- extra: {},
- name: 'room-available',
- reason: 'Initiator is available and room is active.'
- });
-
- joinSession(response._config);
- }
- }
-
- if (response.donotJoin && response.messageFor == connection.userid) {
- log(response.userid, 'is not joining your room.');
- }
-
- // if initiator disconnects sockets, participants should also disconnect
- if (response.isDisconnectSockets) {
- log('Disconnecting your sockets because initiator also disconnected his sockets.');
- connection.disconnect();
- }
- },
- callback: function(socket) {
- socket && this.onopen(socket);
- },
- onopen: function(socket) {
- if (socket) defaultSocket = socket;
- if (onSignalingReady) onSignalingReady();
-
- rtcMultiSession.defaultSocket = defaultSocket;
-
- if (!defaultSocket.__push) {
- defaultSocket.__push = defaultSocket.send;
- defaultSocket.send = function(message) {
- message.userid = message.userid || connection.userid;
- message.extra = message.extra || connection.extra || {};
-
- defaultSocket.__push(message);
- };
- }
- }
- });
- }
-
- // default-socket is a common socket shared among all users in a specific channel;
- // to share participation requests; room descriptions; and other stuff.
- var defaultSocket = getDefaultSocketRef();
-
- rtcMultiSession.defaultSocket = defaultSocket;
-
- if (defaultSocket && onSignalingReady) setTimeout(onSignalingReady, 2000);
-
- if (connection.session.screen) {
- loadScreenFrame();
- }
- // CUSTOM CODE //
-
- /* Commenting this
- connection.getExternalIceServers && loadIceFrame(function(iceServers)
- {
- connection.iceServers = connection.iceServers.concat(iceServers);
- });
- */
-
- // CUSTOM CODE //
-
- if (connection.log == false) connection.skipLogs();
- if (connection.onlog) {
- log = warn = error = function() {
- var log = {};
- var index = 0;
- Array.prototype.slice.call(arguments).forEach(function(argument) {
- log[index++] = toStr(argument);
- });
- toStr = function(str) {
- return str;
- };
- connection.onlog(log);
- };
- }
-
- function setDirections() {
- var userMaxParticipantsAllowed = 0;
-
- // if user has set a custom max participant setting, remember it
- if (connection.maxParticipantsAllowed != 256) {
- userMaxParticipantsAllowed = connection.maxParticipantsAllowed;
- }
-
- if (connection.direction == 'one-way') connection.session.oneway = true;
- if (connection.direction == 'one-to-one') connection.maxParticipantsAllowed = 1;
- if (connection.direction == 'one-to-many') connection.session.broadcast = true;
- if (connection.direction == 'many-to-many') {
- if (!connection.maxParticipantsAllowed || connection.maxParticipantsAllowed == 1) {
- connection.maxParticipantsAllowed = 256;
- }
- }
-
- // if user has set a custom max participant setting, set it back
- if (userMaxParticipantsAllowed && connection.maxParticipantsAllowed != 1) {
- connection.maxParticipantsAllowed = userMaxParticipantsAllowed;
- }
- }
-
- // open new session
- this.initSession = function(args) {
- rtcMultiSession.isOwnerLeaving = false;
-
- setDirections();
- participants = {};
-
- rtcMultiSession.isOwnerLeaving = false;
-
- if (!isNull(args.transmitRoomOnce)) {
- connection.transmitRoomOnce = args.transmitRoomOnce;
- }
-
- function transmit() {
- if (defaultSocket && getLength(participants) < connection.maxParticipantsAllowed && !rtcMultiSession.isOwnerLeaving) {
- defaultSocket.send(connection.sessionDescription);
- }
-
- if (!connection.transmitRoomOnce && !rtcMultiSession.isOwnerLeaving)
- setTimeout(transmit, connection.interval || 3000);
- }
-
- // todo: test and fix next line.
- if (!args.dontTransmit /* || connection.transmitRoomOnce */ ) transmit();
- };
-
- function joinSession(_config, skipOnStateChange) {
- if (rtcMultiSession.donotJoin && rtcMultiSession.donotJoin == _config.sessionid) {
- return;
- }
-
- // dontOverrideSession allows you force RTCMultiConnection
- // to not override default session for participants;
- // by default, session is always overridden and set to the session coming from initiator!
- if (!connection.dontOverrideSession) {
- connection.session = _config.session || {};
- }
-
- // make sure that inappropriate users shouldn't receive onNewSession event
- rtcMultiSession.broadcasterid = _config.userid;
-
- if (_config.sessionid) {
- // used later to prevent external rooms messages to be used by this user!
- connection.sessionid = _config.sessionid;
- }
-
- connection.isAcceptNewSession = false;
-
- var channel = getRandomString();
- newPrivateSocket({
- channel: channel,
- extra: _config.extra || {},
- userid: _config.userid
- });
-
- var offers = {};
- if (connection.attachStreams.length) {
- var stream = connection.attachStreams[connection.attachStreams.length - 1];
- if (!!stream.getAudioTracks && stream.getAudioTracks().length) {
- offers.audio = true;
- }
- if (stream.getVideoTracks().length) {
- offers.video = true;
- }
- }
-
- if (!isEmpty(offers)) {
- log(toStr(offers));
- } else log('Seems data-only connection.');
-
- connection.onstatechange({
- userid: _config.userid,
- extra: {},
- name: 'connecting-with-initiator',
- reason: 'Checking presence of the initiator; and the room.'
- });
-
- defaultSocket.send({
- participant: true,
- channel: channel,
- targetUser: _config.userid,
- session: connection.session,
- offers: {
- audio: !!offers.audio,
- video: !!offers.video
- }
- });
-
- connection.skipOnNewSession = false;
- invokeMediaCaptured(connection);
- }
-
- // join existing session
- this.joinSession = function(_config) {
- if (!defaultSocket)
- return setTimeout(function() {
- warn('Default-Socket is not yet initialized.');
- rtcMultiSession.joinSession(_config);
- }, 1000);
-
- _config = _config || {};
- participants = {};
-
- rtcMultiSession.presenceState = 'checking';
-
- connection.onstatechange({
- userid: _config.userid,
- extra: _config.extra || {},
- name: 'detecting-room-presence',
- reason: 'Checking presence of the room.'
- });
-
- function contactInitiator() {
- defaultSocket.send({
- messageFor: _config.userid,
- presenceState: rtcMultiSession.presenceState,
- _config: {
- userid: _config.userid,
- extra: _config.extra || {},
- sessionid: _config.sessionid,
- session: _config.session || false
- }
- });
- }
- contactInitiator();
-
- function checker() {
- if (rtcMultiSession.presenceState == 'checking') {
- warn('Unable to reach initiator. Trying again...');
- contactInitiator();
- setTimeout(function() {
- if (rtcMultiSession.presenceState == 'checking') {
- connection.onstatechange({
- userid: _config.userid,
- extra: _config.extra || {},
- name: 'room-not-available',
- reason: 'Initiator seems absent. Waiting for someone to open the room.'
- });
-
- connection.isAcceptNewSession = true;
- setTimeout(checker, 2000);
- }
- }, 2000);
- }
- }
-
- setTimeout(checker, 3000);
- };
-
- connection.donotJoin = function(sessionid) {
- rtcMultiSession.donotJoin = sessionid;
-
- var session = connection.sessionDescriptions[sessionid];
- if (!session) return;
-
- defaultSocket.send({
- donotJoin: true,
- messageFor: session.userid,
- sessionid: sessionid
- });
-
- participants = {};
- connection.isAcceptNewSession = true;
- connection.sessionid = null;
- };
-
- // send file/data or text message
- this.send = function(message, _channel) {
- if (!(message instanceof ArrayBuffer || message instanceof DataView)) {
- message = str2ab({
- extra: connection.extra,
- userid: connection.userid,
- data: message
- });
- }
-
- if (_channel) {
- if (_channel.readyState == 'open') {
- _channel.send(message);
- }
- return;
- }
-
- for (var dataChannel in connection.channels) {
- var channel = connection.channels[dataChannel].channel;
- if (channel.readyState == 'open') {
- channel.send(message);
- }
- }
- };
-
- // leave session
- this.leave = function() {
- clearSession();
- };
-
- // renegotiate new stream
- this.addStream = function(e) {
- var session = e.renegotiate;
-
- if (!connection.renegotiatedSessions[JSON.stringify(e.renegotiate)]) {
- connection.renegotiatedSessions[JSON.stringify(e.renegotiate)] = {
- session: e.renegotiate,
- stream: e.stream
- };
- }
-
- if (e.socket) {
- if (e.socket.userid != connection.userid) {
- addStream(connection.peers[e.socket.userid]);
- }
- } else {
- for (var peer in connection.peers) {
- if (peer != connection.userid) {
- addStream(connection.peers[peer]);
- }
- }
- }
-
- function addStream(_peer) {
- var socket = _peer.socket;
-
- if (!socket) {
- warn(_peer, 'doesn\'t has socket.');
- return;
- }
-
- updateSocketForLocalStreams(socket);
-
- if (!_peer || !_peer.peer) {
- throw 'No peer to renegotiate.';
- }
-
- var peer = _peer.peer;
-
- if (e.stream) {
- if (!peer.attachStreams) {
- peer.attachStreams = [];
- }
-
- peer.attachStreams.push(e.stream);
- }
-
- // detaching old streams
- detachMediaStream(connection.detachStreams, peer.connection);
-
- if (e.stream && (session.audio || session.video || session.screen)) {
- peer.addStream(e.stream);
- }
-
- peer.recreateOffer(session, function(sdp, streaminfo) {
- sendsdp({
- sdp: sdp,
- socket: socket,
- renegotiate: session,
- labels: connection.detachStreams,
- streaminfo: streaminfo
- });
- connection.detachStreams = [];
- });
- }
- };
-
- // www.RTCMultiConnection.org/docs/request/
- connection.request = function(userid, extra) {
- connection.captureUserMedia(function() {
- // open private socket that will be used to receive offer-sdp
- newPrivateSocket({
- channel: connection.userid,
- extra: extra || {},
- userid: userid
- });
-
- // ask other user to create offer-sdp
- defaultSocket.send({
- participant: true,
- targetUser: userid
- });
- });
- };
-
- function acceptRequest(response) {
- if (!rtcMultiSession.requestsFrom) rtcMultiSession.requestsFrom = {};
- if (rtcMultiSession.requestsFrom[response.userid]) return;
-
- var obj = {
- userid: response.userid,
- extra: response.extra,
- channel: response.channel || response.userid,
- session: response.session || connection.session
- };
-
- // check how participant is willing to join
- if (response.offers) {
- if (response.offers.audio && response.offers.video) {
- log('target user has both audio/video streams.');
- } else if (response.offers.audio && !response.offers.video) {
- log('target user has only audio stream.');
- } else if (!response.offers.audio && response.offers.video) {
- log('target user has only video stream.');
- } else {
- log('target user has no stream; it seems one-way streaming or data-only connection.');
- }
-
- var mandatory = connection.sdpConstraints.mandatory;
- if (isNull(mandatory.OfferToReceiveAudio)) {
- connection.sdpConstraints.mandatory.OfferToReceiveAudio = !!response.offers.audio;
- }
- if (isNull(mandatory.OfferToReceiveVideo)) {
- connection.sdpConstraints.mandatory.OfferToReceiveVideo = !!response.offers.video;
- }
-
- log('target user\'s SDP has?', toStr(connection.sdpConstraints.mandatory));
- }
-
- rtcMultiSession.requestsFrom[response.userid] = obj;
-
- // www.RTCMultiConnection.org/docs/onRequest/
- if (connection.onRequest && connection.isInitiator) {
- connection.onRequest(obj);
- } else _accept(obj);
- }
-
- function _accept(e) {
- if (rtcMultiSession.captureUserMediaOnDemand) {
- rtcMultiSession.captureUserMediaOnDemand = false;
- connection.captureUserMedia(function() {
- _accept(e);
-
- invokeMediaCaptured(connection);
- });
- return;
- }
-
- log('accepting request from', e.userid);
- participants[e.userid] = e.userid;
- newPrivateSocket({
- isofferer: true,
- userid: e.userid,
- channel: e.channel,
- extra: e.extra || {},
- session: e.session || connection.session
- });
- }
-
- // www.RTCMultiConnection.org/docs/accept/
- connection.accept = function(e) {
- // for backward compatibility
- if (arguments.length > 1 && isString(arguments[0])) {
- e = {};
- if (arguments[0]) e.userid = arguments[0];
- if (arguments[1]) e.extra = arguments[1];
- if (arguments[2]) e.channel = arguments[2];
- }
-
- connection.captureUserMedia(function() {
- _accept(e);
- });
- };
-
- var isRMSDeleted = false;
- this.disconnect = function() {
- this.isOwnerLeaving = true;
-
- if (!connection.keepStreamsOpened) {
- for (var streamid in connection.localStreams) {
- connection.localStreams[streamid].stop();
- }
- connection.localStreams = {};
-
- currentUserMediaRequest = {
- streams: [],
- mutex: false,
- queueRequests: []
- };
- }
-
- if (connection.isInitiator) {
- defaultSocket.send({
- isDisconnectSockets: true
- });
- }
-
- connection.refresh();
-
- rtcMultiSession.defaultSocket = defaultSocket = null;
- isRMSDeleted = true;
-
- connection.ondisconnected({
- userid: connection.userid,
- extra: connection.extra,
- peer: connection.peers[connection.userid],
- isSocketsDisconnected: true
- });
-
- // if there is any peer still opened; close it.
- connection.close();
-
- window.removeEventListener('beforeunload', rtcMultiSession.leaveHandler);
- window.removeEventListener('keyup', rtcMultiSession.leaveHandler);
-
- // it will not work, though :)
- delete this;
-
- log('Disconnected your sockets, peers, streams and everything except RTCMultiConnection object.');
- };
- }
-
- var webAudioMediaStreamSources = [];
-
- function convertToAudioStream(mediaStream) {
- if (!mediaStream) throw 'MediaStream is mandatory.';
-
- if (mediaStream.getVideoTracks && !mediaStream.getVideoTracks().length) {
- return mediaStream;
- }
-
- var context = new AudioContext();
- var mediaStreamSource = context.createMediaStreamSource(mediaStream);
-
- var destination = context.createMediaStreamDestination();
- mediaStreamSource.connect(destination);
-
- webAudioMediaStreamSources.push(mediaStreamSource);
-
- return destination.stream;
- }
-
- var isOpera = !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
- var isFirefox = typeof window.InstallTrigger !== 'undefined';
- var isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
- var isChrome = !!window.chrome && !isOpera;
- var isIE = !!document.documentMode;
-
- var isPluginRTC = isSafari || isIE;
-
- var isMobileDevice = !!navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i);
-
- // detect node-webkit
- var isNodeWebkit = !!(window.process && (typeof window.process == 'object') && window.process.versions && window.process.versions['node-webkit']);
-
- window.MediaStream = window.MediaStream || window.webkitMediaStream;
- window.AudioContext = window.AudioContext || window.webkitAudioContext;
-
- function getRandomString() {
- // suggested by @rvulpescu from #154
- if (window.crypto && crypto.getRandomValues && navigator.userAgent.indexOf('Safari') == -1) {
- var a = window.crypto.getRandomValues(new Uint32Array(3)),
- token = '';
- for (var i = 0, l = a.length; i < l; i++) {
- token += a[i].toString(36);
- }
- return token;
- } else {
- return (Math.random() * new Date().getTime()).toString(36).replace(/\./g, '');
- }
- }
-
- var chromeVersion = 50;
- var matchArray = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
- if (isChrome && matchArray && matchArray[2]) {
- chromeVersion = parseInt(matchArray[2], 10);
- }
-
- var firefoxVersion = 50;
- matchArray = navigator.userAgent.match(/Firefox\/(.*)/);
- if (isFirefox && matchArray && matchArray[1]) {
- firefoxVersion = parseInt(matchArray[1], 10);
- }
-
- function isData(session) {
- return !session.audio && !session.video && !session.screen && session.data;
- }
-
- function isNull(obj) {
- return typeof obj == 'undefined';
- }
-
- function isString(obj) {
- return typeof obj == 'string';
- }
-
- function isEmpty(session) {
- var length = 0;
- for (var s in session) {
- length++;
- }
- return length == 0;
- }
-
- // this method converts array-buffer into string
- function ab2str(buf) {
- var result = '';
- try {
- result = String.fromCharCode.apply(null, new Uint16Array(buf));
- } catch (e) {}
- return result;
- }
-
- // this method converts string into array-buffer
- function str2ab(str) {
- if (!isString(str)) str = JSON.stringify(str);
-
- var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
- var bufView = new Uint16Array(buf);
- for (var i = 0, strLen = str.length; i < strLen; i++) {
- bufView[i] = str.charCodeAt(i);
- }
- return buf;
- }
-
- function swap(arr) {
- var swapped = [],
- length = arr.length;
- for (var i = 0; i < length; i++)
- if (arr[i] && arr[i] !== true)
- swapped.push(arr[i]);
- return swapped;
- }
-
- function forEach(obj, callback) {
- for (var item in obj) {
- callback(obj[item], item);
- }
- }
-
- var console = window.console || {
- log: function() {},
- error: function() {},
- warn: function() {}
- };
-
- function log() {
- console.log(arguments);
- }
-
- function error() {
- console.error(arguments);
- }
-
- function warn() {
- console.warn(arguments);
- }
-
- if (isChrome || isFirefox || isSafari) {
- var log = console.log.bind(console);
- var error = console.error.bind(console);
- var warn = console.warn.bind(console);
- }
-
- function toStr(obj) {
- return JSON.stringify(obj, function(key, value) {
- if (value && value.sdp) {
- log(value.sdp.type, '\t', value.sdp.sdp);
- return '';
- } else return value;
- }, '\t');
- }
-
- function getLength(obj) {
- var length = 0;
- for (var o in obj)
- if (o) length++;
- return length;
- }
-
- // Get HTMLAudioElement/HTMLVideoElement accordingly
-
- function createMediaElement(stream, session) {
- var mediaElement = document.createElement(stream.isAudio ? 'audio' : 'video');
- mediaElement.id = stream.streamid;
-
- if (isPluginRTC) {
- var body = (document.body || document.documentElement);
- body.insertBefore(mediaElement, body.firstChild);
-
- setTimeout(function() {
- Plugin.attachMediaStream(mediaElement, stream)
- }, 1000);
-
- return Plugin.attachMediaStream(mediaElement, stream);
- }
-
- // "mozSrcObject" is always preferred over "src"!!
- mediaElement[isFirefox ? 'mozSrcObject' : 'src'] = isFirefox ? stream : (window.URL || window.webkitURL).createObjectURL(stream);
-
- mediaElement.controls = true;
- mediaElement.autoplay = !!session.remote;
- mediaElement.muted = session.remote ? false : true;
-
- // http://goo.gl/WZ5nFl
- // Firefox don't yet support onended for any stream (remote/local)
- isFirefox && mediaElement.addEventListener('ended', function() {
- stream.onended();
- }, false);
-
- mediaElement.play();
-
- return mediaElement;
- }
-
- var onStreamEndedHandlerFiredFor = {};
-
- function onStreamEndedHandler(streamedObject, connection) {
- if (streamedObject.mediaElement && !streamedObject.mediaElement.parentNode) return;
-
- if (onStreamEndedHandlerFiredFor[streamedObject.streamid]) return;
- onStreamEndedHandlerFiredFor[streamedObject.streamid] = streamedObject;
- connection.onstreamended(streamedObject);
- }
-
- var onLeaveHandlerFiredFor = {};
-
- function onLeaveHandler(event, connection) {
- if (onLeaveHandlerFiredFor[event.userid]) return;
- onLeaveHandlerFiredFor[event.userid] = event;
- connection.onleave(event);
- }
-
- function takeSnapshot(args) {
- var userid = args.userid;
- var connection = args.connection;
-
- function _takeSnapshot(video) {
- var canvas = document.createElement('canvas');
- canvas.width = video.videoWidth || video.clientWidth;
- canvas.height = video.videoHeight || video.clientHeight;
-
- var context = canvas.getContext('2d');
- context.drawImage(video, 0, 0, canvas.width, canvas.height);
-
- connection.snapshots[userid] = canvas.toDataURL('image/png');
- args.callback && args.callback(connection.snapshots[userid]);
- }
-
- if (args.mediaElement) return _takeSnapshot(args.mediaElement);
-
- for (var stream in connection.streams) {
- stream = connection.streams[stream];
- if (stream.userid == userid && stream.stream && stream.stream.getVideoTracks && stream.stream.getVideoTracks().length) {
- _takeSnapshot(stream.mediaElement);
- continue;
- }
- }
- }
-
- function invokeMediaCaptured(connection) {
- // to let user know that media resource has been captured
- // now, he can share "sessionDescription" using sockets
- if (connection.onMediaCaptured) {
- connection.onMediaCaptured();
- delete connection.onMediaCaptured;
- }
- }
-
- function merge(mergein, mergeto) {
- if (!mergein) mergein = {};
- if (!mergeto) return mergein;
-
- for (var item in mergeto) {
- mergein[item] = mergeto[item];
- }
- return mergein;
- }
-
- function loadScript(src, onload) {
- var script = document.createElement('script');
- script.src = src;
- script.onload = function() {
- log('loaded resource:', src);
- if (onload) onload();
- };
- document.documentElement.appendChild(script);
- }
-
- function capturePartOfScreen(args) {
- var connection = args.connection;
- var element = args.element;
-
- if (!window.html2canvas) {
- return loadScript(connection.resources.html2canvas, function() {
- capturePartOfScreen(args);
- });
- }
-
- if (isString(element)) {
- element = document.querySelector(element);
- if (!element) element = document.getElementById(element);
- }
- if (!element) throw 'HTML DOM Element is not accessible!';
-
- // todo: store DOM element somewhere to minimize DOM querying issues
-
- // html2canvas.js is used to take screenshots
- html2canvas(element, {
- onrendered: function(canvas) {
- args.callback(canvas.toDataURL());
- }
- });
- }
-
- function initFileBufferReader(connection, callback) {
- if (!window.FileBufferReader) {
- loadScript(connection.resources.FileBufferReader, function() {
- initFileBufferReader(connection, callback);
- });
- return;
- }
-
- function _private(chunk) {
- chunk.userid = chunk.extra.userid;
- return chunk;
- }
-
- var fileBufferReader = new FileBufferReader();
- fileBufferReader.onProgress = function(chunk) {
- connection.onFileProgress(_private(chunk), chunk.uuid);
- };
-
- fileBufferReader.onBegin = function(file) {
- connection.onFileStart(_private(file));
- };
-
- fileBufferReader.onEnd = function(file) {
- connection.onFileEnd(_private(file));
- };
-
- callback(fileBufferReader);
- }
-
- var screenFrame, loadedScreenFrame;
-
- function loadScreenFrame(skip) {
- if (DetectRTC.screen.extensionid != ReservedExtensionID) {
- return;
- }
-
- if (loadedScreenFrame) return;
- if (!skip) return loadScreenFrame(true);
-
- loadedScreenFrame = true;
-
- var iframe = document.createElement('iframe');
- iframe.onload = function() {
- iframe.isLoaded = true;
- log('Screen Capturing frame is loaded.');
- };
- //iframe.src = 'https://www.webrtc-experiment.com/getSourceId/';
- // CUSTOM CODE //
- iframe.src = 'app/fusion/scripts/webrtc/getSourceId.html';
- // CUSTOM CODE //
- iframe.style.display = 'none';
- (document.body || document.documentElement).appendChild(iframe);
-
- screenFrame = {
- postMessage: function() {
- if (!iframe.isLoaded) {
- setTimeout(screenFrame.postMessage, 100);
- return;
- }
- iframe.contentWindow.postMessage({
- captureSourceId: true
- }, '*');
- }
- };
- }
-
- var iceFrame, loadedIceFrame;
-
- function loadIceFrame(callback, skip) {
- if (loadedIceFrame) return;
- if (!skip) return loadIceFrame(callback, true);
-
- loadedIceFrame = true;
-
- var iframe = document.createElement('iframe');
- iframe.onload = function() {
- iframe.isLoaded = true;
-
- listenEventHandler('message', iFrameLoaderCallback);
-
- function iFrameLoaderCallback(event) {
- if (!event.data || !event.data.iceServers) return;
- callback(event.data.iceServers);
-
- // this event listener is no more needed
- window.removeEventListener('message', iFrameLoaderCallback);
- }
-
- iframe.contentWindow.postMessage('get-ice-servers', '*');
- };
- iframe.src = 'https://cdn.webrtc-experiment.com/getIceServers/';
- iframe.style.display = 'none';
- (document.body || document.documentElement).appendChild(iframe);
- }
-
- function muteOrUnmute(e) {
- var stream = e.stream,
- root = e.root,
- session = e.session || {},
- enabled = e.enabled;
-
- if (!session.audio && !session.video) {
- if (!isString(session)) {
- session = merge(session, {
- audio: true,
- video: true
- });
- } else {
- session = {
- audio: true,
- video: true
- };
- }
- }
-
- // implementation from #68
- if (session.type) {
- if (session.type == 'remote' && root.type != 'remote') return;
- if (session.type == 'local' && root.type != 'local') return;
- }
-
- log(enabled ? 'Muting' : 'UnMuting', 'session', toStr(session));
-
- // enable/disable audio/video tracks
-
- if (root.type == 'local' && session.audio && !!stream.getAudioTracks) {
- var audioTracks = stream.getAudioTracks()[0];
- if (audioTracks)
- audioTracks.enabled = !enabled;
- }
-
- if (root.type == 'local' && (session.video || session.screen) && !!stream.getVideoTracks) {
- var videoTracks = stream.getVideoTracks()[0];
- if (videoTracks)
- videoTracks.enabled = !enabled;
- }
-
- root.sockets.forEach(function(socket) {
- if (root.type == 'local') {
- socket.send({
- streamid: root.streamid,
- mute: !!enabled,
- unmute: !enabled,
- session: session
- });
- }
-
- if (root.type == 'remote') {
- socket.send({
- promptMuteUnmute: true,
- streamid: root.streamid,
- mute: !!enabled,
- unmute: !enabled,
- session: session
- });
- }
- });
-
- if (root.type == 'remote') return;
-
- // According to issue #135, onmute/onumute must be fired for self
- // "fakeObject" is used because we need to keep session for renegotiated streams;
- // and MUST pass exact session over onStreamEndedHandler/onmute/onhold/etc. events.
- var fakeObject = merge({}, root);
- fakeObject.session = session;
-
- fakeObject.isAudio = !!fakeObject.session.audio && !fakeObject.session.video;
- fakeObject.isVideo = !!fakeObject.session.video;
- fakeObject.isScreen = !!fakeObject.session.screen;
-
- if (!!enabled) {
- // if muted stream is negotiated
- stream.preMuted = {
- audio: stream.getAudioTracks().length && !stream.getAudioTracks()[0].enabled,
- video: stream.getVideoTracks().length && !stream.getVideoTracks()[0].enabled
- };
- root.rtcMultiConnection.onmute(fakeObject);
- }
-
- if (!enabled) {
- stream.preMuted = {};
- root.rtcMultiConnection.onunmute(fakeObject);
- }
- }
-
- var Firefox_Screen_Capturing_Warning = 'Make sure that you are using Firefox Nightly and you enabled: media.getusermedia.screensharing.enabled flag from about:config page. You also need to add your domain in "media.getusermedia.screensharing.allowed_domains" flag. If you are using WinXP then also enable "media.getusermedia.screensharing.allow_on_old_platforms" flag. NEVER forget to use "only" HTTPs for screen capturing!';
- var SCREEN_COMMON_FAILURE = 'HTTPs i.e. SSL-based URI is mandatory to use screen capturing.';
- // CUSTOM CODE //
- var ReservedExtensionID = 'icgmlogfeajbfdffajhoebcfbibfhaen';
- //var ReservedExtensionID = 'ajhifddimkapgcifgcodmmfdlknahffk';
-
- // if application-developer deployed his own extension on Google App Store
- var useCustomChromeExtensionForScreenCapturing = document.domain.indexOf('webrtc-experiment.com') != -1;
-
- function initHark(args) {
- if (!window.hark) {
- loadScript(args.connection.resources.hark, function() {
- initHark(args);
- });
- return;
- }
-
- var connection = args.connection;
- var streamedObject = args.streamedObject;
- var stream = args.stream;
-
- var options = {};
- var speechEvents = hark(stream, options);
-
- speechEvents.on('speaking', function() {
- if (connection.onspeaking) {
- connection.onspeaking(streamedObject);
- }
- });
-
- speechEvents.on('stopped_speaking', function() {
- if (connection.onsilence) {
- connection.onsilence(streamedObject);
- }
- });
-
- speechEvents.on('volume_change', function(volume, threshold) {
- if (connection.onvolumechange) {
- connection.onvolumechange(merge({
- volume: volume,
- threshold: threshold
- }, streamedObject));
- }
- });
- }
-
- attachEventListener = function(video, type, listener, useCapture) {
- video.addEventListener(type, listener, useCapture);
- };
-
- var Plugin = window.PluginRTC || {};
- window.onPluginRTCInitialized = function(pluginRTCObject) {
- Plugin = pluginRTCObject;
- MediaStreamTrack = Plugin.MediaStreamTrack;
- RTCPeerConnection = Plugin.RTCPeerConnection;
- RTCIceCandidate = Plugin.RTCIceCandidate;
- RTCSessionDescription = Plugin.RTCSessionDescription;
-
- log(isPluginRTC ? 'Java-Applet' : 'ActiveX', 'plugin has been loaded.');
- };
- if (!isEmpty(Plugin)) window.onPluginRTCInitialized(Plugin);
-
- // if IE or Safari
- if (isPluginRTC) {
- loadScript('https://cdn.webrtc-experiment.com/Plugin.EveryWhere.js');
- // loadScript('https://cdn.webrtc-experiment.com/Plugin.Temasys.js');
- }
-
- var MediaStream = window.MediaStream;
-
- if (typeof MediaStream === 'undefined' && typeof webkitMediaStream !== 'undefined') {
- MediaStream = webkitMediaStream;
- }
-
- /*global MediaStream:true */
- if (typeof MediaStream !== 'undefined' && !('stop' in MediaStream.prototype)) {
- MediaStream.prototype.stop = function() {
- this.getAudioTracks().forEach(function(track) {
- track.stop();
- });
-
- this.getVideoTracks().forEach(function(track) {
- track.stop();
- });
- };
- }
-
- var defaultConstraints = {
- mandatory: {},
- optional: []
- };
-
- /* by @FreCap pull request #41 */
- var currentUserMediaRequest = {
- streams: [],
- mutex: false,
- queueRequests: []
- };
-
- function getUserMedia(options) {
- if (isPluginRTC) {
- if (!Plugin.getUserMedia) {
- setTimeout(function() {
- getUserMedia(options);
- }, 1000);
- return;
- }
-
- return Plugin.getUserMedia(options.constraints || {
- audio: true,
- video: true
- }, options.onsuccess, options.onerror);
- }
-
- if (currentUserMediaRequest.mutex === true) {
- currentUserMediaRequest.queueRequests.push(options);
- return;
- }
- currentUserMediaRequest.mutex = true;
-
- var connection = options.connection;
-
- // tools.ietf.org/html/draft-alvestrand-constraints-resolution-00
- var mediaConstraints = options.mediaConstraints || {};
- var videoConstraints = typeof mediaConstraints.video == 'boolean' ? mediaConstraints.video : mediaConstraints.video || mediaConstraints;
- var audioConstraints = typeof mediaConstraints.audio == 'boolean' ? mediaConstraints.audio : mediaConstraints.audio || defaultConstraints;
-
- var n = navigator;
- var hints = options.constraints || {
- audio: defaultConstraints,
- video: defaultConstraints
- };
-
- if (hints.video && hints.video.mozMediaSource) {
- // "mozMediaSource" is redundant
- // need to check "mediaSource" instead.
- videoConstraints = {};
- }
-
- if (hints.video == true) hints.video = defaultConstraints;
- if (hints.audio == true) hints.audio = defaultConstraints;
-
- // connection.mediaConstraints.audio = false;
- if (typeof audioConstraints == 'boolean' && hints.audio) {
- hints.audio = audioConstraints;
- }
-
- // connection.mediaConstraints.video = false;
- if (typeof videoConstraints == 'boolean' && hints.video) {
- hints.video = videoConstraints;
- }
-
- // connection.mediaConstraints.audio.mandatory = {prop:true};
- var audioMandatoryConstraints = audioConstraints.mandatory;
- if (!isEmpty(audioMandatoryConstraints)) {
- hints.audio.mandatory = merge(hints.audio.mandatory, audioMandatoryConstraints);
- }
-
- // connection.media.min(320,180);
- // connection.media.max(1920,1080);
- var videoMandatoryConstraints = videoConstraints.mandatory;
- if (videoMandatoryConstraints) {
- var mandatory = {};
-
- if (videoMandatoryConstraints.minWidth) {
- mandatory.minWidth = videoMandatoryConstraints.minWidth;
- }
-
- if (videoMandatoryConstraints.minHeight) {
- mandatory.minHeight = videoMandatoryConstraints.minHeight;
- }
-
- if (videoMandatoryConstraints.maxWidth) {
- mandatory.maxWidth = videoMandatoryConstraints.maxWidth;
- }
-
- if (videoMandatoryConstraints.maxHeight) {
- mandatory.maxHeight = videoMandatoryConstraints.maxHeight;
- }
-
- if (videoMandatoryConstraints.minAspectRatio) {
- mandatory.minAspectRatio = videoMandatoryConstraints.minAspectRatio;
- }
-
- if (videoMandatoryConstraints.maxFrameRate) {
- mandatory.maxFrameRate = videoMandatoryConstraints.maxFrameRate;
- }
-
- if (videoMandatoryConstraints.minFrameRate) {
- mandatory.minFrameRate = videoMandatoryConstraints.minFrameRate;
- }
-
- if (mandatory.minWidth && mandatory.minHeight) {
- // http://goo.gl/IZVYsj
- var allowed = ['1920:1080', '1280:720', '960:720', '640:360', '640:480', '320:240', '320:180'];
-
- if (allowed.indexOf(mandatory.minWidth + ':' + mandatory.minHeight) == -1 ||
- allowed.indexOf(mandatory.maxWidth + ':' + mandatory.maxHeight) == -1) {
- error('The min/max width/height constraints you passed "seems" NOT supported.', toStr(mandatory));
- }
-
- if (mandatory.minWidth > mandatory.maxWidth || mandatory.minHeight > mandatory.maxHeight) {
- error('Minimum value must not exceed maximum value.', toStr(mandatory));
- }
-
- if (mandatory.minWidth >= 1280 && mandatory.minHeight >= 720) {
- warn('Enjoy HD video! min/' + mandatory.minWidth + ':' + mandatory.minHeight + ', max/' + mandatory.maxWidth + ':' + mandatory.maxHeight);
- }
- }
-
- hints.video.mandatory = merge(hints.video.mandatory, mandatory);
- }
-
- if (videoMandatoryConstraints) {
- hints.video.mandatory = merge(hints.video.mandatory, videoMandatoryConstraints);
- }
-
- // videoConstraints.optional = [{prop:true}];
- if (videoConstraints.optional && videoConstraints.optional instanceof Array && videoConstraints.optional.length) {
- hints.video.optional = hints.video.optional ? hints.video.optional.concat(videoConstraints.optional) : videoConstraints.optional;
- }
-
- // audioConstraints.optional = [{prop:true}];
- if (audioConstraints.optional && audioConstraints.optional instanceof Array && audioConstraints.optional.length) {
- hints.audio.optional = hints.audio.optional ? hints.audio.optional.concat(audioConstraints.optional) : audioConstraints.optional;
- }
-
- if (hints.video.mandatory && !isEmpty(hints.video.mandatory) && connection._mediaSources.video) {
- hints.video.optional.forEach(function(video, index) {
- if (video.sourceId == connection._mediaSources.video) {
- delete hints.video.optional[index];
- }
- });
-
- hints.video.optional = swap(hints.video.optional);
-
- hints.video.optional.push({
- sourceId: connection._mediaSources.video
- });
- }
-
- if (hints.audio.mandatory && !isEmpty(hints.audio.mandatory) && connection._mediaSources.audio) {
- hints.audio.optional.forEach(function(audio, index) {
- if (audio.sourceId == connection._mediaSources.audio) {
- delete hints.audio.optional[index];
- }
- });
-
- hints.audio.optional = swap(hints.audio.optional);
-
- hints.audio.optional.push({
- sourceId: connection._mediaSources.audio
- });
- }
-
- if (hints.video && !hints.video.mozMediaSource && hints.video.optional && hints.video.mandatory) {
- if (!hints.video.optional.length && isEmpty(hints.video.mandatory)) {
- hints.video = true;
- }
- }
-
- if (isMobileDevice) {
- // Android fails for some constraints
- // so need to force {audio:true,video:true}
- hints = {
- audio: !!hints.audio,
- video: !!hints.video
- };
- }
-
- // connection.mediaConstraints always overrides constraints
- // passed from "captureUserMedia" function.
- // todo: need to verify all possible situations
- log('invoked getUserMedia with constraints:', toStr(hints));
-
- // easy way to match
- var idInstance = JSON.stringify(hints);
-
- function streaming(stream, returnBack, streamid) {
- if (!streamid) streamid = getRandomString();
-
- // localStreams object will store stream
- // until it is removed using native-stop method.
- connection.localStreams[streamid] = stream;
-
- var video = options.video;
- if (video) {
- video[isFirefox ? 'mozSrcObject' : 'src'] = isFirefox ? stream : (window.URL || window.webkitURL).createObjectURL(stream);
- video.play();
- }
-
- options.onsuccess(stream, returnBack, idInstance, streamid);
- currentUserMediaRequest.streams[idInstance] = {
- stream: stream,
- streamid: streamid
- };
- currentUserMediaRequest.mutex = false;
- if (currentUserMediaRequest.queueRequests.length)
- getUserMedia(currentUserMediaRequest.queueRequests.shift());
- }
-
- if (currentUserMediaRequest.streams[idInstance]) {
- streaming(currentUserMediaRequest.streams[idInstance].stream, true, currentUserMediaRequest.streams[idInstance].streamid);
- } else {
- n.getMedia = n.webkitGetUserMedia || n.mozGetUserMedia;
-
- // http://goo.gl/eETIK4
- n.getMedia(hints, streaming, function(error) {
- options.onerror(error, hints);
- });
- }
- }
-
- var RTCSessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription;
- var RTCIceCandidate = window.RTCIceCandidate || window.mozRTCIceCandidate;
-
- var RTCPeerConnection;
- if (typeof mozRTCPeerConnection !== 'undefined') {
- RTCPeerConnection = mozRTCPeerConnection;
- } else if (typeof webkitRTCPeerConnection !== 'undefined') {
- RTCPeerConnection = webkitRTCPeerConnection;
- } else if (typeof window.RTCPeerConnection !== 'undefined') {
- RTCPeerConnection = window.RTCPeerConnection;
- } else {
- console.error('WebRTC 1.0 (RTCPeerConnection) API seems NOT available in this browser.');
- }
-
- function setSdpConstraints(config) {
- var sdpConstraints;
-
- var sdpConstraints_mandatory = {
- OfferToReceiveAudio: !!config.OfferToReceiveAudio,
- OfferToReceiveVideo: !!config.OfferToReceiveVideo
- };
-
- sdpConstraints = {
- mandatory: sdpConstraints_mandatory,
- optional: [{
- VoiceActivityDetection: false
- }]
- };
-
- if (!!navigator.mozGetUserMedia && firefoxVersion > 34) {
- sdpConstraints = {
- OfferToReceiveAudio: !!config.OfferToReceiveAudio,
- OfferToReceiveVideo: !!config.OfferToReceiveVideo
- };
- }
-
- return sdpConstraints;
- }
-
- function PeerConnection() {
- return {
- create: function(type, options) {
- merge(this, options);
-
- var self = this;
-
- this.type = type;
- this.init();
- this.attachMediaStreams();
-
- if (isFirefox && this.session.data) {
- if (this.session.data && type == 'offer') {
- this.createDataChannel();
- }
-
- this.getLocalDescription(type);
-
- if (this.session.data && type == 'answer') {
- this.createDataChannel();
- }
- } else self.getLocalDescription(type);
-
- return this;
- },
- getLocalDescription: function(createType) {
- log('(getLocalDescription) peer createType is', createType);
-
- if (this.session.inactive && isNull(this.rtcMultiConnection.waitUntilRemoteStreamStartsFlowing)) {
- // inactive session returns blank-stream
- this.rtcMultiConnection.waitUntilRemoteStreamStartsFlowing = false;
- }
-
- var self = this;
-
- if (createType == 'answer') {
- this.setRemoteDescription(this.offerDescription, createDescription);
- } else createDescription();
-
- function createDescription() {
- self.connection[createType == 'offer' ? 'createOffer' : 'createAnswer'](function(sessionDescription) {
- sessionDescription.sdp = self.serializeSdp(sessionDescription.sdp, createType);
- self.connection.setLocalDescription(sessionDescription);
-
- if (self.trickleIce) {
- self.onSessionDescription(sessionDescription, self.streaminfo);
- }
-
- if (sessionDescription.type == 'offer') {
- log('offer sdp', sessionDescription.sdp);
- }
-
- self.prevCreateType = createType;
- }, self.onSdpError, self.constraints);
- }
- },
- serializeSdp: function(sdp, createType) {
- // it is "connection.processSdp=function(sdp){return sdp;}"
- sdp = this.processSdp(sdp);
-
- if (isFirefox) return sdp;
-
- if (this.session.inactive && !this.holdMLine) {
- this.hold = true;
- if ((this.session.screen || this.session.video) && this.session.audio) {
- this.holdMLine = 'both';
- } else if (this.session.screen || this.session.video) {
- this.holdMLine = 'video';
- } else if (this.session.audio) {
- this.holdMLine = 'audio';
- }
- }
-
- sdp = this.setBandwidth(sdp);
- if (this.holdMLine == 'both') {
- if (this.hold) {
- this.prevSDP = sdp;
- sdp = sdp.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive');
- } else if (this.prevSDP) {
- if (!this.session.inactive) {
- // it means that DTSL key exchange already happened for single or multiple media lines.
- // this block checks, key-exchange must be happened for all media lines.
- sdp = this.prevSDP;
-
- // todo: test it: makes sense?
- if (chromeVersion <= 35) {
- return sdp;
- }
- }
- }
- } else if (this.holdMLine == 'audio' || this.holdMLine == 'video') {
- sdp = sdp.split('m=');
-
- var audio = '';
- var video = '';
-
- if (sdp[1] && sdp[1].indexOf('audio') == 0) {
- audio = 'm=' + sdp[1];
- }
- if (sdp[2] && sdp[2].indexOf('audio') == 0) {
- audio = 'm=' + sdp[2];
- }
-
- if (sdp[1] && sdp[1].indexOf('video') == 0) {
- video = 'm=' + sdp[1];
- }
- if (sdp[2] && sdp[2].indexOf('video') == 0) {
- video = 'm=' + sdp[2];
- }
-
- if (this.holdMLine == 'audio') {
- if (this.hold) {
- this.prevSDP = sdp[0] + audio + video;
- sdp = sdp[0] + audio.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive') + video;
- } else if (this.prevSDP) {
- sdp = this.prevSDP;
- }
- }
-
- if (this.holdMLine == 'video') {
- if (this.hold) {
- this.prevSDP = sdp[0] + audio + video;
- sdp = sdp[0] + audio + video.replace(/a=sendonly|a=recvonly|a=sendrecv/g, 'a=inactive');
- } else if (this.prevSDP) {
- sdp = this.prevSDP;
- }
- }
- }
-
- if (!this.hold && this.session.inactive) {
- // transport.cc&l=852 - http://goo.gl/0FxxqG
- // dtlstransport.h&l=234 - http://goo.gl/7E4sYF
- // http://tools.ietf.org/html/rfc4340
-
- // From RFC 4145, SDP setup attribute values.
- // http://goo.gl/xETJEp && http://goo.gl/3Wgcau
- if (createType == 'offer') {
- sdp = sdp.replace(/a=setup:passive|a=setup:active|a=setup:holdconn/g, 'a=setup:actpass');
- } else {
- sdp = sdp.replace(/a=setup:actpass|a=setup:passive|a=setup:holdconn/g, 'a=setup:active');
- }
-
- // whilst doing handshake, either media lines were "inactive"
- // or no media lines were present
- sdp = sdp.replace(/a=inactive/g, 'a=sendrecv');
- }
- // this.session.inactive = false;
- return sdp;
- },
- init: function() {
- this.setConstraints();
- this.connection = new RTCPeerConnection(this.iceServers, this.optionalArgument);
-
- if (this.session.data) {
- log('invoked: createDataChannel');
- this.createDataChannel();
- }
-
- this.connection.onicecandidate = function(event) {
- if (!event.candidate) {
- if (!self.trickleIce) {
- returnSDP();
- }
-
- return;
- }
-
- if (!self.trickleIce) return;
-
- self.onicecandidate(event.candidate);
- };
-
- function returnSDP() {
- if (self.returnedSDP) {
- self.returnedSDP = false;
- return;
- };
- self.returnedSDP = true;
-
- self.onSessionDescription(self.connection.localDescription, self.streaminfo);
- }
-
- this.connection.onaddstream = function(e) {
- log('onaddstream', isPluginRTC ? e.stream : toStr(e.stream));
-
- self.onaddstream(e.stream, self.session);
- };
-
- this.connection.onremovestream = function(e) {
- self.onremovestream(e.stream);
- };
-
- this.connection.onsignalingstatechange = function() {
- self.connection && self.oniceconnectionstatechange({
- iceConnectionState: self.connection.iceConnectionState,
- iceGatheringState: self.connection.iceGatheringState,
- signalingState: self.connection.signalingState
- });
- };
-
- this.connection.oniceconnectionstatechange = function() {
- if (!self.connection) return;
-
- self.oniceconnectionstatechange({
- iceConnectionState: self.connection.iceConnectionState,
- iceGatheringState: self.connection.iceGatheringState,
- signalingState: self.connection.signalingState
- });
-
- if (self.trickleIce) return;
-
- if (self.connection.iceGatheringState == 'complete') {
- log('iceGatheringState', self.connection.iceGatheringState);
- returnSDP();
- }
- };
-
- var self = this;
- },
- setBandwidth: function(sdp) {
- if (isMobileDevice || isFirefox || !this.bandwidth) return sdp;
-
- var bandwidth = this.bandwidth;
-
- if (this.session.screen) {
- if (!bandwidth.screen) {
- warn('It seems that you are not using bandwidth for screen. Screen sharing is expected to fail.');
- } else if (bandwidth.screen < 300) {
- warn('It seems that you are using wrong bandwidth value for screen. Screen sharing is expected to fail.');
- }
- }
-
- // if screen; must use at least 300kbs
- if (bandwidth.screen && this.session.screen) {
- sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, '');
- sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + bandwidth.screen + '\r\n');
- }
-
- // remove existing bandwidth lines
- if (bandwidth.audio || bandwidth.video || bandwidth.data) {
- sdp = sdp.replace(/b=AS([^\r\n]+\r\n)/g, '');
- }
-
- if (bandwidth.audio) {
- sdp = sdp.replace(/a=mid:audio\r\n/g, 'a=mid:audio\r\nb=AS:' + bandwidth.audio + '\r\n');
- }
-
- if (bandwidth.video) {
- sdp = sdp.replace(/a=mid:video\r\n/g, 'a=mid:video\r\nb=AS:' + (this.session.screen ? bandwidth.screen : bandwidth.video) + '\r\n');
- }
-
- if (bandwidth.data && !this.preferSCTP) {
- sdp = sdp.replace(/a=mid:data\r\n/g, 'a=mid:data\r\nb=AS:' + bandwidth.data + '\r\n');
- }
-
- return sdp;
- },
- setConstraints: function() {
- var sdpConstraints = setSdpConstraints({
- OfferToReceiveAudio: !!this.session.audio,
- OfferToReceiveVideo: !!this.session.video || !!this.session.screen
- });
-
- if (this.sdpConstraints.mandatory) {
- sdpConstraints = setSdpConstraints(this.sdpConstraints.mandatory);
- }
-
- this.constraints = sdpConstraints;
-
- if (this.constraints) {
- log('sdp-constraints', toStr(this.constraints));
- }
-
- this.optionalArgument = {
- optional: this.optionalArgument.optional || [],
- mandatory: this.optionalArgument.mandatory || {}
- };
-
- if (!this.preferSCTP) {
- this.optionalArgument.optional.push({
- RtpDataChannels: true
- });
- }
-
- log('optional-argument', toStr(this.optionalArgument));
-
- if (!isNull(this.iceServers)) {
- var iceCandidates = this.rtcMultiConnection.candidates;
-
- var stun = iceCandidates.stun;
- var turn = iceCandidates.turn;
- var host = iceCandidates.host;
-
- if (!isNull(iceCandidates.reflexive)) stun = iceCandidates.reflexive;
- if (!isNull(iceCandidates.relay)) turn = iceCandidates.relay;
-
- if (!host && !stun && turn) {
- this.rtcConfiguration.iceTransports = 'relay';
- } else if (!host && !stun && !turn) {
- this.rtcConfiguration.iceTransports = 'none';
- }
-
- this.iceServers = {
- iceServers: this.iceServers,
- iceTransports: this.rtcConfiguration.iceTransports
- };
- } else this.iceServers = null;
-
- log('rtc-configuration', toStr(this.iceServers));
- },
- onSdpError: function(e) {
- var message = toStr(e);
-
- if (message && message.indexOf('RTP/SAVPF Expects at least 4 fields') != -1) {
- message = 'It seems that you are trying to interop RTP-datachannels with SCTP. It is not supported!';
- }
- error('onSdpError:', message);
- },
- onSdpSuccess: function() {
- log('sdp success');
- },
- onMediaError: function(err) {
- error(toStr(err));
- },
- setRemoteDescription: function(sessionDescription, onSdpSuccess) {
- if (!sessionDescription) throw 'Remote session description should NOT be NULL.';
-
- if (!this.connection) return;
-
- log('setting remote description', sessionDescription.type, sessionDescription.sdp);
-
- var self = this;
- this.connection.setRemoteDescription(
- new RTCSessionDescription(sessionDescription),
- onSdpSuccess || this.onSdpSuccess,
- function(error) {
- if (error.search(/STATE_SENTINITIATE|STATE_INPROGRESS/gi) == -1) {
- self.onSdpError(error);
- }
- }
- );
- },
- addIceCandidate: function(candidate) {
- var self = this;
- if (isPluginRTC) {
- RTCIceCandidate(candidate, function(iceCandidate) {
- onAddIceCandidate(iceCandidate);
- });
- } else onAddIceCandidate(new RTCIceCandidate(candidate));
-
- function onAddIceCandidate(iceCandidate) {
- self.connection.addIceCandidate(iceCandidate, function() {
- log('added:', candidate.sdpMid, candidate.candidate);
- }, function() {
- error('onIceFailure', arguments, candidate.candidate);
- });
- }
- },
- createDataChannel: function(channelIdentifier) {
- // skip 2nd invocation of createDataChannel
- if (this.channels && this.channels.length) return;
-
- var self = this;
-
- if (!this.channels) this.channels = [];
-
- // protocol: 'text/chat', preset: true, stream: 16
- // maxRetransmits:0 && ordered:false && outOfOrderAllowed: false
- var dataChannelDict = {};
-
- if (this.dataChannelDict) dataChannelDict = this.dataChannelDict;
-
- if (isChrome && !this.preferSCTP) {
- dataChannelDict.reliable = false; // Deprecated!
- }
-
- log('dataChannelDict', toStr(dataChannelDict));
-
- if (this.type == 'answer' || isFirefox) {
- this.connection.ondatachannel = function(event) {
- self.setChannelEvents(event.channel);
- };
- }
-
- if ((isChrome && this.type == 'offer') || isFirefox) {
- this.setChannelEvents(
- this.connection.createDataChannel(channelIdentifier || 'channel', dataChannelDict)
- );
- }
- },
- setChannelEvents: function(channel) {
- var self = this;
-
- channel.binaryType = 'arraybuffer';
-
- if (this.dataChannelDict.binaryType) {
- channel.binaryType = this.dataChannelDict.binaryType;
- }
-
- channel.onmessage = function(event) {
- self.onmessage(event.data);
- };
-
- var numberOfTimes = 0;
- channel.onopen = function() {
- channel.push = channel.send;
- channel.send = function(data) {
- if (self.connection.iceConnectionState == 'disconnected') {
- return;
- }
-
- if (channel.readyState.search(/closing|closed/g) != -1) {
- return;
- }
-
- if (channel.readyState.search(/connecting|open/g) == -1) {
- return;
- }
-
- if (channel.readyState == 'connecting') {
- numberOfTimes++;
- return setTimeout(function() {
- if (numberOfTimes < 20) {
- channel.send(data);
- } else throw 'Number of times exceeded to wait for WebRTC data connection to be opened.';
- }, 1000);
- }
- try {
- channel.push(data);
- } catch (e) {
- numberOfTimes++;
- warn('Data transmission failed. Re-transmitting..', numberOfTimes, toStr(e));
- if (numberOfTimes >= 20) throw 'Number of times exceeded to resend data packets over WebRTC data channels.';
- setTimeout(function() {
- channel.send(data);
- }, 100);
- }
- };
- self.onopen(channel);
- };
-
- channel.onerror = function(event) {
- self.onerror(event);
- };
-
- channel.onclose = function(event) {
- self.onclose(event);
- };
-
- this.channels.push(channel);
- },
- addStream: function(stream) {
- if (!stream.streamid && !isIE) {
- stream.streamid = getRandomString();
- }
-
- // todo: maybe need to add isAudio/isVideo/isScreen if missing?
-
- log('attaching stream:', stream.streamid, isPluginRTC ? stream : toStr(stream));
-
- this.connection.addStream(stream);
-
- this.sendStreamId(stream);
- this.getStreamInfo();
- },
- attachMediaStreams: function() {
- var streams = this.attachStreams;
- for (var i = 0; i < streams.length; i++) {
- this.addStream(streams[i]);
- }
- },
- getStreamInfo: function() {
- this.streaminfo = '';
- var streams = this.connection.getLocalStreams();
- for (var i = 0; i < streams.length; i++) {
- if (i == 0) {
- this.streaminfo = JSON.stringify({
- streamid: streams[i].streamid || '',
- isScreen: !!streams[i].isScreen,
- isAudio: !!streams[i].isAudio,
- isVideo: !!streams[i].isVideo,
- preMuted: streams[i].preMuted || {}
- });
- } else {
- this.streaminfo += '----' + JSON.stringify({
- streamid: streams[i].streamid || '',
- isScreen: !!streams[i].isScreen,
- isAudio: !!streams[i].isAudio,
- isVideo: !!streams[i].isVideo,
- preMuted: streams[i].preMuted || {}
- });
- }
- }
- },
- recreateOffer: function(renegotiate, callback) {
- log('recreating offer');
-
- this.type = 'offer';
- this.session = renegotiate;
-
- // todo: make sure this doesn't affect renegotiation scenarios
- // this.setConstraints();
-
- this.onSessionDescription = callback;
- this.getStreamInfo();
-
- // one can renegotiate data connection in existing audio/video/screen connection!
- if (this.session.data) {
- this.createDataChannel();
- }
-
- this.getLocalDescription('offer');
- },
- recreateAnswer: function(sdp, session, callback) {
- // if(isFirefox) this.create(this.type, this);
-
- log('recreating answer');
-
- this.type = 'answer';
- this.session = session;
-
- // todo: make sure this doesn't affect renegotiation scenarios
- // this.setConstraints();
-
- this.onSessionDescription = callback;
- this.offerDescription = sdp;
- this.getStreamInfo();
-
- // one can renegotiate data connection in existing audio/video/screen connection!
- if (this.session.data) {
- this.createDataChannel();
- }
-
- this.getLocalDescription('answer');
- }
- };
- }
-
- var FileSaver = {
- SaveToDisk: invokeSaveAsDialog
- };
-
-
- function invokeSaveAsDialog(fileUrl, fileName) {
- /*
- if (typeof navigator.msSaveOrOpenBlob !== 'undefined') {
- return navigator.msSaveOrOpenBlob(file, fileFullName);
- } else if (typeof navigator.msSaveBlob !== 'undefined') {
- return navigator.msSaveBlob(file, fileFullName);
- }
- */
-
- var hyperlink = document.createElement('a');
- hyperlink.href = fileUrl;
- hyperlink.target = '_blank';
- hyperlink.download = fileName || fileUrl;
-
- if (!!navigator.mozGetUserMedia) {
- hyperlink.onclick = function() {
- (document.body || document.documentElement).removeChild(hyperlink);
- };
- (document.body || document.documentElement).appendChild(hyperlink);
- }
-
- var evt = new MouseEvent('click', {
- view: window,
- bubbles: true,
- cancelable: true
- });
-
- hyperlink.dispatchEvent(evt);
-
- if (!navigator.mozGetUserMedia) {
- URL.revokeObjectURL(hyperlink.href);
- }
- }
-
- var TextSender = {
- send: function(config) {
- var connection = config.connection;
-
- if (config.text instanceof ArrayBuffer || config.text instanceof DataView) {
- return config.channel.send(config.text, config._channel);
- }
-
- var channel = config.channel,
- _channel = config._channel,
- initialText = config.text,
- packetSize = connection.chunkSize || 1000,
- textToTransfer = '',
- isobject = false;
-
- if (!isString(initialText)) {
- isobject = true;
- initialText = JSON.stringify(initialText);
- }
-
- // uuid is used to uniquely identify sending instance
- var uuid = getRandomString();
- var sendingTime = new Date().getTime();
-
- sendText(initialText);
-
- function sendText(textMessage, text) {
- var data = {
- type: 'text',
- uuid: uuid,
- sendingTime: sendingTime
- };
-
- if (textMessage) {
- text = textMessage;
- data.packets = parseInt(text.length / packetSize);
- }
-
- if (text.length > packetSize)
- data.message = text.slice(0, packetSize);
- else {
- data.message = text;
- data.last = true;
- data.isobject = isobject;
- }
-
- channel.send(data, _channel);
-
- textToTransfer = text.slice(data.message.length);
-
- if (textToTransfer.length) {
- setTimeout(function() {
- sendText(null, textToTransfer);
- }, connection.chunkInterval || 100);
- }
- }
- }
- };
-
- function TextReceiver(connection) {
- var content = {};
-
- function receive(data, userid, extra) {
- // uuid is used to uniquely identify sending instance
- var uuid = data.uuid;
- if (!content[uuid]) content[uuid] = [];
-
- content[uuid].push(data.message);
- if (data.last) {
- var message = content[uuid].join('');
- if (data.isobject) message = JSON.parse(message);
-
- // latency detection
- var receivingTime = new Date().getTime();
- var latency = receivingTime - data.sendingTime;
-
- var e = {
- data: message,
- userid: userid,
- extra: extra,
- latency: latency
- };
-
- if (message.preRecordedMediaChunk) {
- if (!connection.preRecordedMedias[message.streamerid]) {
- connection.shareMediaFile(null, null, message.streamerid);
- }
- connection.preRecordedMedias[message.streamerid].onData(message.chunk);
- } else if (connection.autoTranslateText) {
- e.original = e.data;
- connection.Translator.TranslateText(e.data, function(translatedText) {
- e.data = translatedText;
- connection.onmessage(e);
- });
- } else if (message.isPartOfScreen) {
- connection.onpartofscreen(message);
- } else connection.onmessage(e);
-
- delete content[uuid];
- }
- }
-
- return {
- receive: receive
- };
- }
-
- // Last time updated at Sep 25, 2015, 08:32:23
-
- // Latest file can be found here: https://cdn.webrtc-experiment.com/DetectRTC.js
-
- // Muaz Khan - www.MuazKhan.com
- // MIT License - www.WebRTC-Experiment.com/licence
- // Documentation - github.com/muaz-khan/DetectRTC
- // ____________
- // DetectRTC.js
-
- // DetectRTC.hasWebcam (has webcam device!)
- // DetectRTC.hasMicrophone (has microphone device!)
- // DetectRTC.hasSpeakers (has speakers!)
-
- (function() {
-
- 'use strict';
-
- var navigator = window.navigator;
-
- if (navigator.mediaDevices && navigator.mediaDevices.enumerateDevices) {
- // Firefox 38+ seems having support of enumerateDevices
- // Thanks @xdumaine/enumerateDevices
- navigator.enumerateDevices = function(callback) {
- navigator.mediaDevices.enumerateDevices().then(callback);
- };
- }
-
- if (typeof navigator !== 'undefined') {
- if (typeof navigator.webkitGetUserMedia !== 'undefined') {
- navigator.getUserMedia = navigator.webkitGetUserMedia;
- }
-
- if (typeof navigator.mozGetUserMedia !== 'undefined') {
- navigator.getUserMedia = navigator.mozGetUserMedia;
- }
- } else {
- navigator = {
- getUserMedia: function() {}
- };
- }
-
- var isMobileDevice = !!navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i);
- var isEdge = navigator.userAgent.indexOf('Edge') !== -1 && (!!navigator.msSaveOrOpenBlob || !!navigator.msSaveBlob);
-
- // this one can also be used:
- // https://www.websocket.org/js/stuff.js (DetectBrowser.js)
-
- function getBrowserInfo() {
- var nVer = navigator.appVersion;
- var nAgt = navigator.userAgent;
- var browserName = navigator.appName;
- var fullVersion = '' + parseFloat(navigator.appVersion);
- var majorVersion = parseInt(navigator.appVersion, 10);
- var nameOffset, verOffset, ix;
-
- // In Opera, the true version is after 'Opera' or after 'Version'
- if ((verOffset = nAgt.indexOf('Opera')) !== -1) {
- browserName = 'Opera';
- fullVersion = nAgt.substring(verOffset + 6);
-
- if ((verOffset = nAgt.indexOf('Version')) !== -1) {
- fullVersion = nAgt.substring(verOffset + 8);
- }
- }
- // In MSIE, the true version is after 'MSIE' in userAgent
- else if ((verOffset = nAgt.indexOf('MSIE')) !== -1) {
- browserName = 'IE';
- fullVersion = nAgt.substring(verOffset + 5);
- }
- // In Chrome, the true version is after 'Chrome'
- else if ((verOffset = nAgt.indexOf('Chrome')) !== -1) {
- browserName = 'Chrome';
- fullVersion = nAgt.substring(verOffset + 7);
- }
- // In Safari, the true version is after 'Safari' or after 'Version'
- else if ((verOffset = nAgt.indexOf('Safari')) !== -1) {
- browserName = 'Safari';
- fullVersion = nAgt.substring(verOffset + 7);
-
- if ((verOffset = nAgt.indexOf('Version')) !== -1) {
- fullVersion = nAgt.substring(verOffset + 8);
- }
- }
- // In Firefox, the true version is after 'Firefox'
- else if ((verOffset = nAgt.indexOf('Firefox')) !== -1) {
- browserName = 'Firefox';
- fullVersion = nAgt.substring(verOffset + 8);
- }
-
- // In most other browsers, 'name/version' is at the end of userAgent
- else if ((nameOffset = nAgt.lastIndexOf(' ') + 1) < (verOffset = nAgt.lastIndexOf('/'))) {
- browserName = nAgt.substring(nameOffset, verOffset);
- fullVersion = nAgt.substring(verOffset + 1);
-
- if (browserName.toLowerCase() === browserName.toUpperCase()) {
- browserName = navigator.appName;
- }
- }
-
- if (isEdge) {
- browserName = 'Edge';
- // fullVersion = navigator.userAgent.split('Edge/')[1];
- fullVersion = parseInt(navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)[2], 10);
- }
-
- // trim the fullVersion string at semicolon/space if present
- if ((ix = fullVersion.indexOf(';')) !== -1) {
- fullVersion = fullVersion.substring(0, ix);
- }
-
- if ((ix = fullVersion.indexOf(' ')) !== -1) {
- fullVersion = fullVersion.substring(0, ix);
- }
-
- majorVersion = parseInt('' + fullVersion, 10);
-
- if (isNaN(majorVersion)) {
- fullVersion = '' + parseFloat(navigator.appVersion);
- majorVersion = parseInt(navigator.appVersion, 10);
- }
-
- return {
- fullVersion: fullVersion,
- version: majorVersion,
- name: browserName
- };
- }
-
- var isMobile = {
- Android: function() {
- return navigator.userAgent.match(/Android/i);
- },
- BlackBerry: function() {
- return navigator.userAgent.match(/BlackBerry/i);
- },
- iOS: function() {
- return navigator.userAgent.match(/iPhone|iPad|iPod/i);
- },
- Opera: function() {
- return navigator.userAgent.match(/Opera Mini/i);
- },
- Windows: function() {
- return navigator.userAgent.match(/IEMobile/i);
- },
- any: function() {
- return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
- },
- getOsName: function() {
- var osName = 'Unknown OS';
- if (isMobile.Android()) {
- osName = 'Android';
- }
-
- if (isMobile.BlackBerry()) {
- osName = 'BlackBerry';
- }
-
- if (isMobile.iOS()) {
- osName = 'iOS';
- }
-
- if (isMobile.Opera()) {
- osName = 'Opera Mini';
- }
-
- if (isMobile.Windows()) {
- osName = 'Windows';
- }
-
- return osName;
- }
- };
-
- var osName = 'Unknown OS';
-
- if (isMobile.any()) {
- osName = isMobile.getOsName();
- } else {
- if (navigator.appVersion.indexOf('Win') !== -1) {
- osName = 'Windows';
- }
-
- if (navigator.appVersion.indexOf('Mac') !== -1) {
- osName = 'MacOS';
- }
-
- if (navigator.appVersion.indexOf('X11') !== -1) {
- osName = 'UNIX';
- }
-
- if (navigator.appVersion.indexOf('Linux') !== -1) {
- osName = 'Linux';
- }
- }
-
-
- var isCanvasSupportsStreamCapturing = false;
- var isVideoSupportsStreamCapturing = false;
- ['captureStream', 'mozCaptureStream', 'webkitCaptureStream'].forEach(function(item) {
- // asdf
- if (item in document.createElement('canvas')) {
- isCanvasSupportsStreamCapturing = true;
- }
-
- if (item in document.createElement('video')) {
- isVideoSupportsStreamCapturing = true;
- }
- });
-
- // via: https://github.com/diafygi/webrtc-ips
- function DetectLocalIPAddress(callback) {
- getIPs(function(ip) {
- //local IPs
- if (ip.match(/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/)) {
- callback('Local: ' + ip);
- }
-
- //assume the rest are public IPs
- else {
- callback('Public: ' + ip);
- }
- });
- }
-
- //get the IP addresses associated with an account
- function getIPs(callback) {
- var ipDuplicates = {};
-
- //compatibility for firefox and chrome
- var RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
- var useWebKit = !!window.webkitRTCPeerConnection;
-
- // bypass naive webrtc blocking using an iframe
- if (!RTCPeerConnection) {
- var iframe = document.getElementById('iframe');
- if (!iframe) {
- //<iframe id="iframe" sandbox="allow-same-origin" style="display: none"></iframe>
- throw 'NOTE: you need to have an iframe in the page right above the script tag.';
- }
- var win = iframe.contentWindow;
- RTCPeerConnection = win.RTCPeerConnection || win.mozRTCPeerConnection || win.webkitRTCPeerConnection;
- useWebKit = !!win.webkitRTCPeerConnection;
- }
-
- //minimal requirements for data connection
- var mediaConstraints = {
- optional: [{
- RtpDataChannels: true
- }]
- };
-
- //firefox already has a default stun server in about:config
- // media.peerconnection.default_iceservers =
- // [{"url": "stun:stun.services.mozilla.com"}]
- var servers;
-
- //add same stun server for chrome
- if (useWebKit) {
- servers = {
- iceServers: [{
- urls: 'stun:stun.services.mozilla.com'
- }]
- };
-
- if (typeof DetectRTC !== 'undefined' && DetectRTC.browser.isFirefox && DetectRTC.browser.version <= 38) {
- servers[0] = {
- url: servers[0].urls
- };
- }
- }
-
- //construct a new RTCPeerConnection
- var pc = new RTCPeerConnection(servers, mediaConstraints);
-
- function handleCandidate(candidate) {
- //match just the IP address
- var ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3})/;
- var ipAddress = ipRegex.exec(candidate)[1];
-
- //remove duplicates
- if (ipDuplicates[ipAddress] === undefined) {
- callback(ipAddress);
- }
-
- ipDuplicates[ipAddress] = true;
- }
-
- //listen for candidate events
- pc.onicecandidate = function(ice) {
- //skip non-candidate events
- if (ice.candidate) {
- handleCandidate(ice.candidate.candidate);
- }
- };
-
- //create a bogus data channel
- pc.createDataChannel('');
-
- //create an offer sdp
- pc.createOffer(function(result) {
-
- //trigger the stun server request
- pc.setLocalDescription(result, function() {}, function() {});
-
- }, function() {});
-
- //wait for a while to let everything done
- setTimeout(function() {
- //read candidate info from local description
- var lines = pc.localDescription.sdp.split('\n');
-
- lines.forEach(function(line) {
- if (line.indexOf('a=candidate:') === 0) {
- handleCandidate(line);
- }
- });
- }, 1000);
- }
-
- var MediaDevices = [];
-
- // ---------- Media Devices detection
- var canEnumerate = false;
-
- /*global MediaStreamTrack:true */
- if (typeof MediaStreamTrack !== 'undefined' && 'getSources' in MediaStreamTrack) {
- canEnumerate = true;
- } else if (navigator.mediaDevices && !!navigator.mediaDevices.enumerateDevices) {
- canEnumerate = true;
- }
-
- var hasMicrophone = canEnumerate;
- var hasSpeakers = canEnumerate;
- var hasWebcam = canEnumerate;
-
- // http://dev.w3.org/2011/webrtc/editor/getusermedia.html#mediadevices
- // todo: switch to enumerateDevices when landed in canary.
- function checkDeviceSupport(callback) {
- // This method is useful only for Chrome!
-
- if (!navigator.enumerateDevices && window.MediaStreamTrack && window.MediaStreamTrack.getSources) {
- navigator.enumerateDevices = window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack);
- }
-
- if (!navigator.enumerateDevices && navigator.enumerateDevices) {
- navigator.enumerateDevices = navigator.enumerateDevices.bind(navigator);
- }
-
- if (!navigator.enumerateDevices) {
- if (callback) {
- callback();
- }
- return;
- }
-
- MediaDevices = [];
- navigator.enumerateDevices(function(devices) {
- devices.forEach(function(_device) {
- var device = {};
- for (var d in _device) {
- device[d] = _device[d];
- }
-
- var skip;
- MediaDevices.forEach(function(d) {
- if (d.id === device.id) {
- skip = true;
- }
- });
-
- if (skip) {
- return;
- }
-
- // if it is MediaStreamTrack.getSources
- if (device.kind === 'audio') {
- device.kind = 'audioinput';
- }
-
- if (device.kind === 'video') {
- device.kind = 'videoinput';
- }
-
- if (!device.deviceId) {
- device.deviceId = device.id;
- }
-
- if (!device.id) {
- device.id = device.deviceId;
- }
-
- if (!device.label) {
- device.label = 'Please invoke getUserMedia once.';
- if (!isHTTPs) {
- device.label = 'HTTPs is required to get label of this ' + device.kind + ' device.';
- }
- }
-
- if (device.kind === 'audioinput' || device.kind === 'audio') {
- hasMicrophone = true;
- }
-
- if (device.kind === 'audiooutput') {
- hasSpeakers = true;
- }
-
- if (device.kind === 'videoinput' || device.kind === 'video') {
- hasWebcam = true;
- }
-
- // there is no 'videoouput' in the spec.
-
- MediaDevices.push(device);
- });
-
- if (typeof DetectRTC !== 'undefined') {
- DetectRTC.MediaDevices = MediaDevices;
- DetectRTC.hasMicrophone = hasMicrophone;
- DetectRTC.hasSpeakers = hasSpeakers;
- DetectRTC.hasWebcam = hasWebcam;
- }
-
- if (callback) {
- callback();
- }
- });
- }
-
- // check for microphone/camera support!
- checkDeviceSupport();
-
- var DetectRTC = {};
-
- // ----------
- // DetectRTC.browser.name || DetectRTC.browser.version || DetectRTC.browser.fullVersion
- DetectRTC.browser = getBrowserInfo();
-
- // DetectRTC.isChrome || DetectRTC.isFirefox || DetectRTC.isEdge
- DetectRTC.browser['is' + DetectRTC.browser.name] = true;
-
- var isHTTPs = location.protocol === 'https:';
- var isNodeWebkit = !!(window.process && (typeof window.process === 'object') && window.process.versions && window.process.versions['node-webkit']);
-
- // --------- Detect if system supports WebRTC 1.0 or WebRTC 1.1.
- var isWebRTCSupported = false;
- ['webkitRTCPeerConnection', 'mozRTCPeerConnection', 'RTCIceGatherer'].forEach(function(item) {
- if (item in window) {
- isWebRTCSupported = true;
- }
- });
- DetectRTC.isWebRTCSupported = isWebRTCSupported;
-
- //-------
- DetectRTC.isORTCSupported = typeof RTCIceGatherer !== 'undefined';
-
- // --------- Detect if system supports screen capturing API
- var isScreenCapturingSupported = false;
- if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 35) {
- isScreenCapturingSupported = true;
- } else if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 34) {
- isScreenCapturingSupported = true;
- }
-
- if (!isHTTPs) {
- isScreenCapturingSupported = false;
- }
- DetectRTC.isScreenCapturingSupported = isScreenCapturingSupported;
-
- // --------- Detect if WebAudio API are supported
- var webAudio = {};
- ['AudioContext', 'webkitAudioContext', 'mozAudioContext', 'msAudioContext'].forEach(function(item) {
- if (webAudio.isSupported && webAudio.isCreateMediaStreamSourceSupported) {
- return;
- }
- if (item in window) {
- webAudio.isSupported = true;
-
- if ('createMediaStreamSource' in window[item].prototype) {
- webAudio.isCreateMediaStreamSourceSupported = true;
- }
- }
- });
- DetectRTC.isAudioContextSupported = webAudio.isSupported;
- DetectRTC.isCreateMediaStreamSourceSupported = webAudio.isCreateMediaStreamSourceSupported;
-
- // ---------- Detect if SCTP/RTP channels are supported.
-
- var isRtpDataChannelsSupported = false;
- if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 31) {
- isRtpDataChannelsSupported = true;
- }
- DetectRTC.isRtpDataChannelsSupported = isRtpDataChannelsSupported;
-
- var isSCTPSupportd = false;
- if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 28) {
- isSCTPSupportd = true;
- } else if (DetectRTC.browser.isChrome && DetectRTC.browser.version > 25) {
- isSCTPSupportd = true;
- } else if (DetectRTC.browser.isOpera && DetectRTC.browser.version >= 11) {
- isSCTPSupportd = true;
- }
- DetectRTC.isSctpDataChannelsSupported = isSCTPSupportd;
-
- // ---------
-
- DetectRTC.isMobileDevice = isMobileDevice; // "isMobileDevice" boolean is defined in "getBrowserInfo.js"
-
- // ------
-
- DetectRTC.isWebSocketsSupported = 'WebSocket' in window && 2 === window.WebSocket.CLOSING;
- DetectRTC.isWebSocketsBlocked = 'Checking';
-
- if (DetectRTC.isWebSocketsSupported) {
- /* CUSTOM CODE */
- var href = window.location.href;
- var hostPatt = new RegExp(window.location.host +"/[^/]*");
- var res = hostPatt.exec(href);
- var protocol = window.location.protocol.replace("http","ws");
-
- var signalingServerPath = protocol + "//" + res + "/contact";
- var websocket = new WebSocket(signalingServerPath)
- // var websocket = new WebSocket('wss://echo.websocket.org:443/');
- /* CUSTOM CODE */
- websocket.onopen = function() {
- DetectRTC.isWebSocketsBlocked = false;
-
- if (DetectRTC.loadCallback) {
- DetectRTC.loadCallback();
- }
- };
- websocket.onerror = function() {
- DetectRTC.isWebSocketsBlocked = true;
-
- if (DetectRTC.loadCallback) {
- DetectRTC.loadCallback();
- }
- };
- }
-
- // ------
- var isGetUserMediaSupported = false;
- if (navigator.getUserMedia) {
- isGetUserMediaSupported = true;
- } else if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
- isGetUserMediaSupported = true;
- }
- if (DetectRTC.browser.isChrome && DetectRTC.browser.version >= 47 && !isHTTPs) {
- DetectRTC.isGetUserMediaSupported = 'Requires HTTPs';
- }
- DetectRTC.isGetUserMediaSupported = isGetUserMediaSupported;
-
- // -----------
- DetectRTC.osName = osName; // "osName" is defined in "detectOSName.js"
-
- // ----------
- DetectRTC.isCanvasSupportsStreamCapturing = isCanvasSupportsStreamCapturing;
- DetectRTC.isVideoSupportsStreamCapturing = isVideoSupportsStreamCapturing;
-
- // ------
- DetectRTC.DetectLocalIPAddress = DetectLocalIPAddress;
-
- // -------
- DetectRTC.load = function(callback) {
- this.loadCallback = callback;
-
- checkDeviceSupport(callback);
- };
-
- DetectRTC.MediaDevices = MediaDevices;
- DetectRTC.hasMicrophone = hasMicrophone;
- DetectRTC.hasSpeakers = hasSpeakers;
- DetectRTC.hasWebcam = hasWebcam;
-
- // ------
- var isSetSinkIdSupported = false;
- if ('setSinkId' in document.createElement('video')) {
- isSetSinkIdSupported = true;
- }
- DetectRTC.isSetSinkIdSupported = isSetSinkIdSupported;
-
- // -----
- var isRTPSenderReplaceTracksSupported = false;
- if (DetectRTC.browser.isFirefox /*&& DetectRTC.browser.version > 39*/ ) {
- /*global mozRTCPeerConnection:true */
- if ('getSenders' in mozRTCPeerConnection.prototype) {
- isRTPSenderReplaceTracksSupported = true;
- }
- } else if (DetectRTC.browser.isChrome) {
- /*global webkitRTCPeerConnection:true */
- if ('getSenders' in webkitRTCPeerConnection.prototype) {
- isRTPSenderReplaceTracksSupported = true;
- }
- }
- DetectRTC.isRTPSenderReplaceTracksSupported = isRTPSenderReplaceTracksSupported;
-
- //------
- var isRemoteStreamProcessingSupported = false;
- if (DetectRTC.browser.isFirefox && DetectRTC.browser.version > 38) {
- isRemoteStreamProcessingSupported = true;
- }
- DetectRTC.isRemoteStreamProcessingSupported = isRemoteStreamProcessingSupported;
-
- //-------
- var isApplyConstraintsSupported = false;
-
- /*global MediaStreamTrack:true */
- if (typeof MediaStreamTrack !== 'undefined' && 'applyConstraints' in MediaStreamTrack.prototype) {
- isApplyConstraintsSupported = true;
- }
- DetectRTC.isApplyConstraintsSupported = isApplyConstraintsSupported;
-
- //-------
- var isMultiMonitorScreenCapturingSupported = false;
- if (DetectRTC.browser.isFirefox && DetectRTC.browser.version >= 43) {
- // version 43 merely supports platforms for multi-monitors
- // version 44 will support exact multi-monitor selection i.e. you can select any monitor for screen capturing.
- isMultiMonitorScreenCapturingSupported = true;
- }
- DetectRTC.isMultiMonitorScreenCapturingSupported = isMultiMonitorScreenCapturingSupported;
-
- window.DetectRTC = DetectRTC;
-
- })();
-
- // DetectRTC extender
- var screenCallback;
-
- DetectRTC.screen = {
- chromeMediaSource: 'screen',
- extensionid: ReservedExtensionID,
- getSourceId: function(callback) {
- if (!callback) throw '"callback" parameter is mandatory.';
-
- // make sure that chrome extension is installed.
- if (!!DetectRTC.screen.status) {
- onstatus(DetectRTC.screen.status);
- } else DetectRTC.screen.getChromeExtensionStatus(onstatus);
-
- function onstatus(status) {
- if (status == 'installed-enabled') {
- screenCallback = callback;
- window.postMessage('get-sourceId', '*');
- return;
- }
-
- DetectRTC.screen.chromeMediaSource = 'screen';
- callback('No-Response'); // chrome extension isn't available
- }
- },
- onMessageCallback: function(data) {
- if (!(isString(data) || !!data.sourceId)) return;
-
- log('chrome message', data);
-
- // "cancel" button is clicked
- if (data == 'PermissionDeniedError') {
- DetectRTC.screen.chromeMediaSource = 'PermissionDeniedError';
- if (screenCallback) return screenCallback('PermissionDeniedError');
- else throw new Error('PermissionDeniedError');
- }
-
- // extension notified his presence
- if (data == 'rtcmulticonnection-extension-loaded') {
- DetectRTC.screen.chromeMediaSource = 'desktop';
- if (DetectRTC.screen.onScreenCapturingExtensionAvailable) {
- DetectRTC.screen.onScreenCapturingExtensionAvailable();
-
- // make sure that this event isn't fired multiple times
- DetectRTC.screen.onScreenCapturingExtensionAvailable = null;
- }
- }
-
- // extension shared temp sourceId
- if (data.sourceId) {
- DetectRTC.screen.sourceId = data.sourceId;
- if (screenCallback) screenCallback(DetectRTC.screen.sourceId);
- }
- },
- getChromeExtensionStatus: function(extensionid, callback) {
- function _callback(status) {
- DetectRTC.screen.status = status;
- callback(status);
- }
-
- if (isFirefox) return _callback('not-chrome');
-
- if (arguments.length != 2) {
- callback = extensionid;
- extensionid = this.extensionid;
- }
-
- var image = document.createElement('img');
- image.src = 'chrome-extension://' + extensionid + '/icon.png';
- image.onload = function() {
- DetectRTC.screen.chromeMediaSource = 'screen';
- window.postMessage('are-you-there', '*');
- setTimeout(function() {
- if (DetectRTC.screen.chromeMediaSource == 'screen') {
- _callback(
- DetectRTC.screen.chromeMediaSource == 'desktop' ? 'installed-enabled' : 'installed-disabled' /* if chrome extension isn't permitted for current domain, then it will be installed-disabled all the time even if extension is enabled. */
- );
- } else _callback('installed-enabled');
- }, 2000);
- };
- image.onerror = function() {
- _callback('not-installed');
- };
- }
- };
-
- // if IE
- if (!window.addEventListener) {
- window.addEventListener = function(el, eventName, eventHandler) {
- if (!el.attachEvent) return;
- el.attachEvent('on' + eventName, eventHandler);
- };
- }
-
- function listenEventHandler(eventName, eventHandler) {
- window.removeEventListener(eventName, eventHandler);
- window.addEventListener(eventName, eventHandler, false);
- }
-
- window.addEventListener('message', function(event) {
- if (event.origin != window.location.origin) {
- return;
- }
-
- DetectRTC.screen.onMessageCallback(event.data);
- });
-
- function setDefaults(connection) {
- var DetectRTC = window.DetectRTC || {};
-
- // www.RTCMultiConnection.org/docs/userid/
- connection.userid = getRandomString();
-
- // www.RTCMultiConnection.org/docs/session/
- connection.session = {
- audio: true,
- video: true
- };
-
- // www.RTCMultiConnection.org/docs/maxParticipantsAllowed/
- connection.maxParticipantsAllowed = 256;
-
- // www.RTCMultiConnection.org/docs/direction/
- // 'many-to-many' / 'one-to-many' / 'one-to-one' / 'one-way'
- connection.direction = 'many-to-many';
-
- // www.RTCMultiConnection.org/docs/mediaConstraints/
- connection.mediaConstraints = {
- mandatory: {}, // kept for backward compatibility
- optional: [], // kept for backward compatibility
- audio: {
- mandatory: {},
- optional: []
- },
- video: {
- mandatory: {},
- optional: []
- }
- };
-
- // www.RTCMultiConnection.org/docs/candidates/
- connection.candidates = {
- host: true,
- stun: true,
- turn: true
- };
-
- connection.sdpConstraints = {};
-
- // as @serhanters proposed in #225
- // it will auto fix "all" renegotiation scenarios
- connection.sdpConstraints.mandatory = {
- OfferToReceiveAudio: true,
- OfferToReceiveVideo: true
- };
-
- connection.privileges = {
- canStopRemoteStream: false, // user can stop remote streams
- canMuteRemoteStream: false // user can mute remote streams
- };
-
- connection.iceProtocols = {
- tcp: true,
- udp: true
- };
-
- // www.RTCMultiConnection.org/docs/preferSCTP/
- connection.preferSCTP = isFirefox || chromeVersion >= 32 ? true : false;
- connection.chunkInterval = isFirefox || chromeVersion >= 32 ? 100 : 500; // 500ms for RTP and 100ms for SCTP
- connection.chunkSize = isFirefox || chromeVersion >= 32 ? 13 * 1000 : 1000; // 1000 chars for RTP and 13000 chars for SCTP
-
- // www.RTCMultiConnection.org/docs/fakeDataChannels/
- connection.fakeDataChannels = false;
-
- connection.waitUntilRemoteStreamStartsFlowing = null; // NULL == true
-
- // auto leave on page unload
- connection.leaveOnPageUnload = true;
-
- // get ICE-servers from XirSys
- connection.getExternalIceServers = isChrome;
-
- // www.RTCMultiConnection.org/docs/UA/
- connection.UA = {
- isFirefox: isFirefox,
- isChrome: isChrome,
- isMobileDevice: isMobileDevice,
- version: isChrome ? chromeVersion : firefoxVersion,
- isNodeWebkit: isNodeWebkit,
- isSafari: isSafari,
- isIE: isIE,
- isOpera: isOpera
- };
-
- // file queue: to store previous file objects in memory;
- // and stream over newly connected peers
- // www.RTCMultiConnection.org/docs/fileQueue/
- connection.fileQueue = {};
-
- // this array is aimed to store all renegotiated streams' session-types
- connection.renegotiatedSessions = {};
-
- // www.RTCMultiConnection.org/docs/channels/
- connection.channels = {};
-
- // www.RTCMultiConnection.org/docs/extra/
- connection.extra = {};
-
- // www.RTCMultiConnection.org/docs/bandwidth/
- connection.bandwidth = {
- screen: 300 // 300kbps (dirty workaround)
- };
-
- // www.RTCMultiConnection.org/docs/caniuse/
- connection.caniuse = {
- RTCPeerConnection: DetectRTC.isWebRTCSupported,
- getUserMedia: !!navigator.webkitGetUserMedia || !!navigator.mozGetUserMedia,
- AudioContext: DetectRTC.isAudioContextSupported,
-
- // there is no way to check whether "getUserMedia" flag is enabled or not!
- ScreenSharing: DetectRTC.isScreenCapturingSupported,
- RtpDataChannels: DetectRTC.isRtpDataChannelsSupported,
- SctpDataChannels: DetectRTC.isSctpDataChannelsSupported
- };
-
- // www.RTCMultiConnection.org/docs/snapshots/
- connection.snapshots = {};
-
- // www.WebRTC-Experiment.com/demos/MediaStreamTrack.getSources.html
- connection._mediaSources = {};
-
- // www.RTCMultiConnection.org/docs/devices/
- connection.devices = {};
-
- // www.RTCMultiConnection.org/docs/language/ (to see list of all supported languages)
- connection.language = 'en';
-
- // www.RTCMultiConnection.org/docs/autoTranslateText/
- connection.autoTranslateText = false;
-
- // please use your own Google Translate API key
- // Google Translate is a paid service.
- connection.googKey = 'AIzaSyCgB5hmFY74WYB-EoWkhr9cAGr6TiTHrEE';
-
- connection.localStreamids = [];
- connection.localStreams = {};
-
- // this object stores pre-recorded media streaming uids
- // multiple pre-recorded media files can be streamed concurrently.
- connection.preRecordedMedias = {};
-
- // www.RTCMultiConnection.org/docs/attachStreams/
- connection.attachStreams = [];
-
- // www.RTCMultiConnection.org/docs/detachStreams/
- connection.detachStreams = [];
-
- connection.optionalArgument = {
- optional: [{
- DtlsSrtpKeyAgreement: true
- }, {
- googImprovedWifiBwe: true
- }, {
- googScreencastMinBitrate: 300
- }],
- mandatory: {}
- };
-
- connection.dataChannelDict = {};
-
- // www.RTCMultiConnection.org/docs/dontAttachStream/
- connection.dontAttachStream = false;
-
- // www.RTCMultiConnection.org/docs/dontCaptureUserMedia/
- connection.dontCaptureUserMedia = false;
-
- // this feature added to keep users privacy and
- // make sure HTTPs pages NEVER auto capture users media
- // isChrome && location.protocol == 'https:'
- connection.preventSSLAutoAllowed = false;
-
- connection.autoReDialOnFailure = true;
- connection.isInitiator = false;
-
- // access DetectRTC.js features directly!
- connection.DetectRTC = DetectRTC;
-
- // you can falsify it to merge all ICE in SDP and share only SDP!
- // such mechanism is useful for SIP/XMPP and XMLHttpRequest signaling
- // bug: renegotiation fails if "trickleIce" is false
- connection.trickleIce = true;
-
- // this object stores list of all sessions in current channel
- connection.sessionDescriptions = {};
-
- // this object stores current user's session-description
- // it is set only for initiator
- // it is set as soon as "open" method is invoked.
- connection.sessionDescription = null;
-
- // resources used in RTCMultiConnection
- connection.resources = {
- // CUSTOM CODE //
- /* Commenting this block as we do not wasnt external dependencies
- *
- RecordRTC: 'https://cdn.webrtc-experiment.com/RecordRTC.js',
- PreRecordedMediaStreamer: 'https://cdn.webrtc-experiment.com/PreRecordedMediaStreamer.js',
- customGetUserMediaBar: 'https://cdn.webrtc-experiment.com/navigator.customGetUserMediaBar.js',
- html2canvas: 'https://cdn.webrtc-experiment.com/screenshot.js',
- hark: 'https://cdn.webrtc-experiment.com/hark.js',
- firebase: 'https://cdn.webrtc-experiment.com/firebase.js',
- firebaseio: 'https://webrtc-signaling.firebaseio.com/',
-
- muted: 'static/fusion/images/ATT_Labs_Logo.png',
-
- getConnectionStats: 'https://cdn.webrtc-experiment.com/getConnectionStats.js',
- FileBufferReader: 'https://cdn.webrtc-experiment.com/FileBufferReader.js'
- */
-
- // CUSTOM CODE //
-
-
- };
-
- // www.RTCMultiConnection.org/docs/body/
- connection.body = document.body || document.documentElement;
- connection.screenbody = null;// document.body || document.documentElement;
- connection.videobody = null;//document.body || document.documentElement;
-
- // www.RTCMultiConnection.org/docs/peers/
- connection.peers = {};
-
- // www.RTCMultiConnection.org/docs/firebase/
- connection.firebase = 'chat';
-
- connection.numberOfSessions = 0;
- connection.numberOfConnectedUsers = 0;
-
- // by default, data-connections will always be getting
- // FileBufferReader.js if absent.
- connection.enableFileSharing = true;
-
- // www.RTCMultiConnection.org/docs/autoSaveToDisk/
- // to make sure file-saver dialog is not invoked.
- connection.autoSaveToDisk = false;
-
- connection.processSdp = function(sdp) {
- // process sdp here
- return sdp;
- };
-
- // www.RTCMultiConnection.org/docs/onmessage/
- connection.onmessage = function(e) {
- log('onmessage', toStr(e));
- };
-
- // www.RTCMultiConnection.org/docs/onopen/
- connection.onopen = function(e) {
- log('Data connection is opened between you and', e.userid);
- };
-
- // www.RTCMultiConnection.org/docs/onerror/
- connection.onerror = function(e) {
- error(onerror, toStr(e));
- };
-
- // www.RTCMultiConnection.org/docs/onclose/
- connection.onclose = function(e) {
- warn('onclose', toStr(e));
-
- // todo: should we use "stop" or "remove"?
- // BTW, it is remote user!
- connection.streams.remove({
- userid: e.userid
- });
- };
-
- var progressHelper = {};
-
- // www.RTCMultiConnection.org/docs/onFileStart/
- connection.onFileStart = function(file) {
- var div = document.createElement('div');
- div.title = file.name;
- div.innerHTML = '<label>0%</label> <progress></progress>';
- connection.body.insertBefore(div, connection.body.firstChild);
- progressHelper[file.uuid] = {
- div: div,
- progress: div.querySelector('progress'),
- label: div.querySelector('label')
- };
- progressHelper[file.uuid].progress.max = file.maxChunks;
- };
-
- // www.RTCMultiConnection.org/docs/onFileProgress/
- connection.onFileProgress = function(chunk) {
- var helper = progressHelper[chunk.uuid];
- if (!helper) return;
- helper.progress.value = chunk.currentPosition || chunk.maxChunks || helper.progress.max;
- updateLabel(helper.progress, helper.label);
- };
-
- // www.RTCMultiConnection.org/docs/onFileEnd/
- connection.onFileEnd = function(file) {
- if (progressHelper[file.uuid]) progressHelper[file.uuid].div.innerHTML = '<a href="' + file.url + '" target="_blank" download="' + file.name + '">' + file.name + '</a>';
-
- // for backward compatibility
- if (connection.onFileSent || connection.onFileReceived) {
- if (connection.onFileSent) connection.onFileSent(file, file.uuid);
- if (connection.onFileReceived) connection.onFileReceived(file.name, file);
- }
- };
-
- function updateLabel(progress, label) {
- if (progress.position == -1) return;
- var position = +progress.position.toFixed(2).split('.')[1] || 100;
- label.innerHTML = position + '%';
- }
-
- // www.RTCMultiConnection.org/docs/onstream/
- connection.onstream = function(e) {
- // CUSTOM CODE //
-
- if(e.isVideo || e.isAudio)
- {
- var videoTag = e.mediaElement;
- var videoType = e.type;
- var parentDiv = connection.videobody;
-
- if(videoType == "local")
- {
- videoTag.style.top = "auto";
- videoTag.style.position = "absolute";
- //videoTag.style.left = (parentDiv.offsetWidth - 160) + "px";
- videoTag.style.height = "150px";
- videoTag.style.width = "150px";
- videoTag.style.zIndex = 1;
-
- }
- else if(videoType == "remote")
- {
- videoTag.style.top = "auto";
- videoTag.style.position = "absolute";
- videoTag.style.zIndex = -1;
- }
-
- parentDiv.appendChild(videoTag);
- }
- else if(e.isScreen)
- {
- var screenTag = e.mediaElement;
- var screenType = e.type;
- var parentDiv = connection.screenbody;
-
- if(screenType == "local")
- {
- // no need to display this because the person sharing his/her screen doesn't have to see whats being shared
- // enabled for demo purposes
- parentDiv.appendChild(screenTag);
- }
- else if(screenType == "remote")
- {
- parentDiv.appendChild(screenTag);
- }
-
-
- }
-
- else
- connection.body.insertBefore(e.mediaElement, connection.body.firstChild);
-
- // CUSTOM CODE //
- };
-
- // www.RTCMultiConnection.org/docs/onStreamEndedHandler/
- connection.onstreamended = function(e) {
- log('onStreamEndedHandler:', e);
-
- if (!e.mediaElement) {
- return warn('Event.mediaElement is undefined', e);
- }
- if (!e.mediaElement.parentNode) {
- e.mediaElement = document.getElementById(e.streamid);
-
- if (!e.mediaElement) {
- return warn('Event.mediaElement is undefined', e);
- }
-
- if (!e.mediaElement.parentNode) {
- return warn('Event.mediElement.parentNode is null.', e);
- }
- }
-
- e.mediaElement.parentNode.removeChild(e.mediaElement);
- };
-
- // todo: need to write documentation link
- connection.onSessionClosed = function(session) {
- if (session.isEjected) {
- warn(session.userid, 'ejected you.');
- } else warn('Session has been closed.', session);
- };
-
- // www.RTCMultiConnection.org/docs/onmute/
- connection.onmute = function(e) {
- if (e.isVideo && e.mediaElement) {
- e.mediaElement.pause();
- e.mediaElement.setAttribute('poster', e.snapshot || connection.resources.muted);
- }
- if (e.isAudio && e.mediaElement) {
- e.mediaElement.muted = true;
- }
- };
-
- // www.RTCMultiConnection.org/docs/onunmute/
- connection.onunmute = function(e) {
- if (e.isVideo && e.mediaElement) {
- e.mediaElement.play();
- e.mediaElement.removeAttribute('poster');
- }
- if (e.isAudio && e.mediaElement) {
- e.mediaElement.muted = false;
- }
- };
-
- // www.RTCMultiConnection.org/docs/onleave/
- connection.onleave = function(e) {
- log('onleave', toStr(e));
- };
-
- connection.token = getRandomString;
-
- connection.peers[connection.userid] = {
- drop: function() {
- connection.drop();
- },
- renegotiate: function() {},
- addStream: function() {},
- hold: function() {},
- unhold: function() {},
- changeBandwidth: function() {},
- sharePartOfScreen: function() {}
- };
-
- connection._skip = ['stop', 'mute', 'unmute', '_private', '_selectStreams', 'selectFirst', 'selectAll', 'remove'];
-
- // www.RTCMultiConnection.org/docs/streams/
- connection.streams = {
- mute: function(session) {
- this._private(session, true);
- },
- unmute: function(session) {
- this._private(session, false);
- },
- _private: function(session, enabled) {
- if (session && !isString(session)) {
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- _muteOrUnMute(this[stream], session, enabled);
- }
- }
-
- function _muteOrUnMute(stream, session, isMute) {
- if (session.local && stream.type != 'local') return;
- if (session.remote && stream.type != 'remote') return;
-
- if (session.isScreen && !stream.isScreen) return;
- if (session.isAudio && !stream.isAudio) return;
- if (session.isVideo && !stream.isVideo) return;
-
- if (isMute) stream.mute(session);
- else stream.unmute(session);
- }
- return;
- }
-
- // implementation from #68
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- this[stream]._private(session, enabled);
- }
- }
- },
- stop: function(type) {
- var _stream;
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- _stream = this[stream];
-
- if (!type) _stream.stop();
-
- else if (isString(type)) {
- // connection.streams.stop('screen');
- var config = {};
- config[type] = true;
- _stopStream(_stream, config);
- } else _stopStream(_stream, type);
- }
- }
-
- function _stopStream(_stream, config) {
- // connection.streams.stop({ remote: true, userid: 'remote-userid' });
- if (config.userid && _stream.userid != config.userid) return;
-
- if (config.local && _stream.type != 'local') return;
- if (config.remote && _stream.type != 'remote') return;
-
- if (config.screen && !!_stream.isScreen) {
- _stream.stop();
- }
-
- if (config.audio && !!_stream.isAudio) {
- _stream.stop();
- }
-
- if (config.video && !!_stream.isVideo) {
- _stream.stop();
- }
-
- // connection.streams.stop('local');
- if (!config.audio && !config.video && !config.screen) {
- _stream.stop();
- }
- }
- },
- remove: function(type) {
- var _stream;
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1) {
- _stream = this[stream];
-
- if (!type) _stopAndRemoveStream(_stream, {
- local: true,
- remote: true
- });
-
- else if (isString(type)) {
- // connection.streams.stop('screen');
- var config = {};
- config[type] = true;
- _stopAndRemoveStream(_stream, config);
- } else _stopAndRemoveStream(_stream, type);
- }
- }
-
- function _stopAndRemoveStream(_stream, config) {
- // connection.streams.remove({ remote: true, userid: 'remote-userid' });
- if (config.userid && _stream.userid != config.userid) return;
-
- if (config.local && _stream.type != 'local') return;
- if (config.remote && _stream.type != 'remote') return;
-
- if (config.screen && !!_stream.isScreen) {
- endStream(_stream);
- }
-
- if (config.audio && !!_stream.isAudio) {
- endStream(_stream);
- }
-
- if (config.video && !!_stream.isVideo) {
- endStream(_stream);
- }
-
- // connection.streams.remove('local');
- if (!config.audio && !config.video && !config.screen) {
- endStream(_stream);
- }
- }
-
- function endStream(_stream) {
- onStreamEndedHandler(_stream, connection);
- delete connection.streams[_stream.streamid];
- }
- },
- selectFirst: function(args) {
- return this._selectStreams(args, false);
- },
- selectAll: function(args) {
- return this._selectStreams(args, true);
- },
- _selectStreams: function(args, all) {
- if (!args || isString(args) || isEmpty(args)) throw 'Invalid arguments.';
-
- // if userid is used then both local/remote shouldn't be auto-set
- if (isNull(args.local) && isNull(args.remote) && isNull(args.userid)) {
- args.local = args.remote = true;
- }
-
- if (!args.isAudio && !args.isVideo && !args.isScreen) {
- args.isAudio = args.isVideo = args.isScreen = true;
- }
-
- var selectedStreams = [];
- for (var stream in this) {
- if (connection._skip.indexOf(stream) == -1 && (stream = this[stream]) && ((args.local && stream.type == 'local') || (args.remote && stream.type == 'remote') || (args.userid && stream.userid == args.userid))) {
- if (args.isVideo && stream.isVideo) {
- selectedStreams.push(stream);
- }
-
- if (args.isAudio && stream.isAudio) {
- selectedStreams.push(stream);
- }
-
- if (args.isScreen && stream.isScreen) {
- selectedStreams.push(stream);
- }
- }
- }
-
- return !!all ? selectedStreams : selectedStreams[0];
- }
- };
-
- var iceServers = [];
-
- // CUSTOM CODE //
- // these servers are provided by research
- iceServers.push({
- url: '' /*TODO To test this WebRTC with some open stun and turn test servers*/
- });
-
- iceServers.push({
- url: 'turn:207.140.168.120:3478',
- credential: 'xxx',
- username: 'xxx'
- });
-
- iceServers.push({
- url: 'turn:207.140.168.120:443?transport=tcp',
- credential: 'harmfulmustard',
- username: 'ambient'
- });
-
- /* CHANGED: Fusion: These are non-att servers for testing purposes
-
- iceServers.push({
- url: 'stun:stun.l.google.com:19302'
- });
-
- iceServers.push({
- url: 'stun:stun.anyfirewall.com:3478'
- });
-
- iceServers.push({
- url: 'turn:turn.bistri.com:80',
- credential: 'homeo',
- username: 'homeo'
- });
-
- iceServers.push({
- url: 'turn:turn.anyfirewall.com:443?transport=tcp',
- credential: 'webrtc',
- username: 'webrtc'
- });
-
- */
- // CUSTOM CODE //
- connection.iceServers = iceServers;
-
- connection.rtcConfiguration = {
- iceServers: null,
- iceTransports: 'all', // none || relay || all - ref: http://goo.gl/40I39K
- peerIdentity: false
- };
-
- // www.RTCMultiConnection.org/docs/media/
- connection.media = {
- min: function(width, height) {
- if (!connection.mediaConstraints.video) return;
-
- if (!connection.mediaConstraints.video.mandatory) {
- connection.mediaConstraints.video.mandatory = {};
- }
- connection.mediaConstraints.video.mandatory.minWidth = width;
- connection.mediaConstraints.video.mandatory.minHeight = height;
- },
- max: function(width, height) {
- if (!connection.mediaConstraints.video) return;
-
- if (!connection.mediaConstraints.video.mandatory) {
- connection.mediaConstraints.video.mandatory = {};
- }
-
- connection.mediaConstraints.video.mandatory.maxWidth = width;
- connection.mediaConstraints.video.mandatory.maxHeight = height;
- }
- };
-
- connection._getStream = function(event) {
- var resultingObject = merge({
- sockets: event.socket ? [event.socket] : []
- }, event);
-
- resultingObject.stop = function() {
- var self = this;
-
- self.sockets.forEach(function(socket) {
- if (self.type == 'local') {
- socket.send({
- streamid: self.streamid,
- stopped: true
- });
- }
-
- if (self.type == 'remote') {
- socket.send({
- promptStreamStop: true,
- streamid: self.streamid
- });
- }
- });
-
- if (self.type == 'remote') return;
-
- var stream = self.stream;
- if (stream) self.rtcMultiConnection.stopMediaStream(stream);
- };
-
- resultingObject.mute = function(session) {
- this.muted = true;
- this._private(session, true);
- };
-
- resultingObject.unmute = function(session) {
- this.muted = false;
- this._private(session, false);
- };
-
- function muteOrUnmuteLocally(session, isPause, mediaElement) {
- if (!mediaElement) return;
- var lastPauseState = mediaElement.onpause;
- var lastPlayState = mediaElement.onplay;
- mediaElement.onpause = mediaElement.onplay = function() {};
-
- if (isPause) mediaElement.pause();
- else mediaElement.play();
-
- mediaElement.onpause = lastPauseState;
- mediaElement.onplay = lastPlayState;
- }
-
- resultingObject._private = function(session, enabled) {
- if (session && !isNull(session.sync) && session.sync == false) {
- muteOrUnmuteLocally(session, enabled, this.mediaElement);
- return;
- }
-
- muteOrUnmute({
- root: this,
- session: session,
- enabled: enabled,
- stream: this.stream
- });
- };
-
- resultingObject.startRecording = function(session) {
- var self = this;
-
- if (!session) {
- session = {
- audio: true,
- video: true
- };
- }
-
- if (isString(session)) {
- session = {
- audio: session == 'audio',
- video: session == 'video'
- };
- }
-
- if (!window.RecordRTC) {
- return loadScript(self.rtcMultiConnection.resources.RecordRTC, function() {
- self.startRecording(session);
- });
- }
-
- log('started recording session', session);
-
- self.videoRecorder = self.audioRecorder = null;
-
- if (isFirefox) {
- // firefox supports both audio/video recording in single webm file
- if (session.video) {
- self.videoRecorder = RecordRTC(self.stream, {
- type: 'video'
- });
- } else if (session.audio) {
- self.audioRecorder = RecordRTC(self.stream, {
- type: 'audio'
- });
- }
- } else if (isChrome) {
- // chrome supports recording in two separate files: WAV and WebM
- if (session.video) {
- self.videoRecorder = RecordRTC(self.stream, {
- type: 'video'
- });
- }
-
- if (session.audio) {
- self.audioRecorder = RecordRTC(self.stream, {
- type: 'audio'
- });
- }
- }
-
- if (self.audioRecorder) {
- self.audioRecorder.startRecording();
- }
-
- if (self.videoRecorder) self.videoRecorder.startRecording();
- };
-
- resultingObject.stopRecording = function(callback, session) {
- if (!session) {
- session = {
- audio: true,
- video: true
- };
- }
-
- if (isString(session)) {
- session = {
- audio: session == 'audio',
- video: session == 'video'
- };
- }
-
- log('stopped recording session', session);
-
- var self = this;
-
- if (session.audio && self.audioRecorder) {
- self.audioRecorder.stopRecording(function() {
- if (session.video && self.videoRecorder) {
- self.videoRecorder.stopRecording(function() {
- callback({
- audio: self.audioRecorder.getBlob(),
- video: self.videoRecorder.getBlob()
- });
- });
- } else callback({
- audio: self.audioRecorder.getBlob()
- });
- });
- } else if (session.video && self.videoRecorder) {
- self.videoRecorder.stopRecording(function() {
- callback({
- video: self.videoRecorder.getBlob()
- });
- });
- }
- };
-
- resultingObject.takeSnapshot = function(callback) {
- takeSnapshot({
- mediaElement: this.mediaElement,
- userid: this.userid,
- connection: connection,
- callback: callback
- });
- };
-
- // redundant: kept only for backward compatibility
- resultingObject.streamObject = resultingObject;
-
- return resultingObject;
- };
-
- // new RTCMultiConnection().set({properties}).connect()
- connection.set = function(properties) {
- for (var property in properties) {
- this[property] = properties[property];
- }
- return this;
- };
-
- // www.RTCMultiConnection.org/docs/onMediaError/
- connection.onMediaError = function(event) {
- error('name', event.name);
- error('constraintName', toStr(event.constraintName));
- error('message', event.message);
- error('original session', event.session);
- };
-
- // www.RTCMultiConnection.org/docs/takeSnapshot/
- connection.takeSnapshot = function(userid, callback) {
- takeSnapshot({
- userid: userid,
- connection: connection,
- callback: callback
- });
- };
-
- connection.saveToDisk = function(blob, fileName) {
- if (blob.size && blob.type) FileSaver.SaveToDisk(URL.createObjectURL(blob), fileName || blob.name || blob.type.replace('/', '-') + blob.type.split('/')[1]);
- else FileSaver.SaveToDisk(blob, fileName);
- };
-
- // www.RTCMultiConnection.org/docs/selectDevices/
- connection.selectDevices = function(device1, device2) {
- if (device1) select(this.devices[device1]);
- if (device2) select(this.devices[device2]);
-
- function select(device) {
- if (!device) return;
- connection._mediaSources[device.kind] = device.id;
- }
- };
-
- // www.RTCMultiConnection.org/docs/getDevices/
- connection.getDevices = function(callback) {
- // if, not yet fetched.
- if (!DetectRTC.MediaDevices.length) {
- return setTimeout(function() {
- connection.getDevices(callback);
- }, 1000);
- }
-
- // loop over all audio/video input/output devices
- DetectRTC.MediaDevices.forEach(function(device) {
- connection.devices[device.deviceId] = device;
- });
-
- if (callback) callback(connection.devices);
- };
-
- connection.getMediaDevices = connection.enumerateDevices = function(callback) {
- if (!callback) throw 'callback is mandatory.';
- connection.getDevices(function() {
- callback(connection.DetectRTC.MediaDevices);
- });
- };
-
- // www.RTCMultiConnection.org/docs/onCustomMessage/
- connection.onCustomMessage = function(message) {
- log('Custom message', message);
- };
-
- // www.RTCMultiConnection.org/docs/ondrop/
- connection.ondrop = function(droppedBy) {
- log('Media connection is dropped by ' + droppedBy);
- };
-
- // www.RTCMultiConnection.org/docs/drop/
- connection.drop = function(config) {
- config = config || {};
- connection.attachStreams = [];
-
- // "drop" should detach all local streams
- for (var stream in connection.streams) {
- if (connection._skip.indexOf(stream) == -1) {
- stream = connection.streams[stream];
- if (stream.type == 'local') {
- connection.detachStreams.push(stream.streamid);
- onStreamEndedHandler(stream, connection);
- } else onStreamEndedHandler(stream, connection);
- }
- }
-
- // www.RTCMultiConnection.org/docs/sendCustomMessage/
- connection.sendCustomMessage({
- drop: true,
- dontRenegotiate: isNull(config.renegotiate) ? true : config.renegotiate
- });
- };
-
- // www.RTCMultiConnection.org/docs/Translator/
- connection.Translator = {
- TranslateText: function(text, callback) {
- // if(location.protocol === 'https:') return callback(text);
-
- var newScript = document.createElement('script');
- newScript.type = 'text/javascript';
-
- var sourceText = encodeURIComponent(text); // escape
-
- var randomNumber = 'method' + connection.token();
- window[randomNumber] = function(response) {
- if (response.data && response.data.translations[0] && callback) {
- callback(response.data.translations[0].translatedText);
- }
-
- if (response.error && response.error.message == 'Daily Limit Exceeded') {
- warn('Text translation failed. Error message: "Daily Limit Exceeded."');
-
- // returning original text
- callback(text);
- }
- };
-
- var source = 'https://www.googleapis.com/language/translate/v2?key=' + connection.googKey + '&target=' + (connection.language || 'en-US') + '&callback=window.' + randomNumber + '&q=' + sourceText;
- newScript.src = source;
- document.getElementsByTagName('head')[0].appendChild(newScript);
- }
- };
-
- // you can easily override it by setting it NULL!
- connection.setDefaultEventsForMediaElement = function(mediaElement, streamid) {
- mediaElement.onpause = function() {
- if (connection.streams[streamid] && !connection.streams[streamid].muted) {
- connection.streams[streamid].mute();
- }
- };
-
- // todo: need to make sure that "onplay" EVENT doesn't play self-voice!
- mediaElement.onplay = function() {
- if (connection.streams[streamid] && connection.streams[streamid].muted) {
- connection.streams[streamid].unmute();
- }
- };
-
- var volumeChangeEventFired = false;
- mediaElement.onvolumechange = function() {
- if (!volumeChangeEventFired) {
- volumeChangeEventFired = true;
- connection.streams[streamid] && setTimeout(function() {
- var root = connection.streams[streamid];
- connection.streams[streamid].sockets.forEach(function(socket) {
- socket.send({
- streamid: root.streamid,
- isVolumeChanged: true,
- volume: mediaElement.volume
- });
- });
- volumeChangeEventFired = false;
- }, 2000);
- }
- };
- };
-
- // www.RTCMultiConnection.org/docs/onMediaFile/
- connection.onMediaFile = function(e) {
- log('onMediaFile', e);
- connection.body.appendChild(e.mediaElement);
- };
-
- // www.RTCMultiConnection.org/docs/shareMediaFile/
- // this method handles pre-recorded media streaming
- connection.shareMediaFile = function(file, video, streamerid) {
- streamerid = streamerid || connection.token();
-
- if (!PreRecordedMediaStreamer) {
- loadScript(connection.resources.PreRecordedMediaStreamer, function() {
- connection.shareMediaFile(file, video, streamerid);
- });
- return streamerid;
- }
-
- return PreRecordedMediaStreamer.shareMediaFile({
- file: file,
- video: video,
- streamerid: streamerid,
- connection: connection
- });
- };
-
- // www.RTCMultiConnection.org/docs/onpartofscreen/
- connection.onpartofscreen = function(e) {
- var image = document.createElement('img');
- image.src = e.screenshot;
- connection.body.appendChild(image);
- };
-
- connection.skipLogs = function() {
- log = error = warn = function() {};
- };
-
- // www.RTCMultiConnection.org/docs/hold/
- connection.hold = function(mLine) {
- for (var peer in connection.peers) {
- connection.peers[peer].hold(mLine);
- }
- };
-
- // www.RTCMultiConnection.org/docs/onhold/
- connection.onhold = function(track) {
- log('onhold', track);
-
- if (track.kind != 'audio') {
- track.mediaElement.pause();
- track.mediaElement.setAttribute('poster', track.screenshot || connection.resources.muted);
- }
- if (track.kind == 'audio') {
- track.mediaElement.muted = true;
- }
- };
-
- // www.RTCMultiConnection.org/docs/unhold/
- connection.unhold = function(mLine) {
- for (var peer in connection.peers) {
- connection.peers[peer].unhold(mLine);
- }
- };
-
- // www.RTCMultiConnection.org/docs/onunhold/
- connection.onunhold = function(track) {
- log('onunhold', track);
-
- if (track.kind != 'audio') {
- track.mediaElement.play();
- track.mediaElement.removeAttribute('poster');
- }
- if (track.kind != 'audio') {
- track.mediaElement.muted = false;
- }
- };
-
- connection.sharePartOfScreen = function(args) {
- var lastScreenshot = '';
-
- function partOfScreenCapturer() {
- // if stopped
- if (connection.partOfScreen && !connection.partOfScreen.sharing) {
- return;
- }
-
- capturePartOfScreen({
- element: args.element,
- connection: connection,
- callback: function(screenshot) {
- // don't share repeated content
- if (screenshot != lastScreenshot) {
- lastScreenshot = screenshot;
-
- for (var channel in connection.channels) {
- connection.channels[channel].send({
- screenshot: screenshot,
- isPartOfScreen: true
- });
- }
- }
-
- // "once" can be used to share single screenshot
- !args.once && setTimeout(partOfScreenCapturer, args.interval || 200);
- }
- });
- }
-
- partOfScreenCapturer();
-
- connection.partOfScreen = merge({
- sharing: true
- }, args);
- };
-
- connection.pausePartOfScreenSharing = function() {
- for (var peer in connection.peers) {
- connection.peers[peer].pausePartOfScreenSharing = true;
- }
-
- if (connection.partOfScreen) {
- connection.partOfScreen.sharing = false;
- }
- };
-
- connection.resumePartOfScreenSharing = function() {
- for (var peer in connection.peers) {
- connection.peers[peer].pausePartOfScreenSharing = false;
- }
-
- if (connection.partOfScreen) {
- connection.partOfScreen.sharing = true;
- }
- };
-
- connection.stopPartOfScreenSharing = function() {
- for (var peer in connection.peers) {
- connection.peers[peer].stopPartOfScreenSharing = true;
- }
-
- if (connection.partOfScreen) {
- connection.partOfScreen.sharing = false;
- }
- };
-
- connection.takeScreenshot = function(element, callback) {
- if (!element || !callback) throw 'Invalid number of arguments.';
-
- if (!window.html2canvas) {
- return loadScript(connection.resources.html2canvas, function() {
- connection.takeScreenshot(element);
- });
- }
-
- if (isString(element)) {
- element = document.querySelector(element);
- if (!element) element = document.getElementById(element);
- }
- if (!element) throw 'HTML Element is inaccessible!';
-
- // html2canvas.js is used to take screenshots
- html2canvas(element, {
- onrendered: function(canvas) {
- callback(canvas.toDataURL());
- }
- });
- };
-
- // this event is fired when RTCMultiConnection detects that chrome extension
- // for screen capturing is installed and available
- connection.onScreenCapturingExtensionAvailable = function() {
- log('It seems that screen capturing extension is installed and available on your system!');
- };
-
- if (!isPluginRTC && DetectRTC.screen.onScreenCapturingExtensionAvailable) {
- DetectRTC.screen.onScreenCapturingExtensionAvailable = function() {
- connection.onScreenCapturingExtensionAvailable();
- };
- }
-
- connection.changeBandwidth = function(bandwidth) {
- for (var peer in connection.peers) {
- connection.peers[peer].changeBandwidth(bandwidth);
- }
- };
-
- connection.convertToAudioStream = function(mediaStream) {
- convertToAudioStream(mediaStream);
- };
-
- connection.onstatechange = function(state) {
- log('on:state:change (' + state.userid + '):', state.name + ':', state.reason || '');
- };
-
- connection.onfailed = function(event) {
- if (!event.peer.numOfRetries) event.peer.numOfRetries = 0;
- event.peer.numOfRetries++;
-
- error('ICE connectivity check is failed. Renegotiating peer connection.');
- event.peer.numOfRetries < 2 && event.peer.renegotiate();
-
- if (event.peer.numOfRetries >= 2) event.peer.numOfRetries = 0;
- };
-
- connection.onconnected = function(event) {
- // event.peer.addStream || event.peer.getConnectionStats
- log('Peer connection has been established between you and', event.userid);
- };
-
- connection.ondisconnected = function(event) {
- error('Peer connection seems has been disconnected between you and', event.userid);
-
- if (isEmpty(connection.channels)) return;
- if (!connection.channels[event.userid]) return;
-
- // use WebRTC data channels to detect user's presence
- connection.channels[event.userid].send({
- checkingPresence: true
- });
-
- // wait 5 seconds, if target peer didn't response, simply disconnect
- setTimeout(function() {
- // iceConnectionState == 'disconnected' occurred out of low-bandwidth
- // or internet connectivity issues
- if (connection.peers[event.userid].connected) {
- delete connection.peers[event.userid].connected;
- return;
- }
-
- // to make sure this user's all remote streams are removed.
- connection.streams.remove({
- remote: true,
- userid: event.userid
- });
-
- connection.remove(event.userid);
- }, 3000);
- };
-
- connection.onstreamid = function(event) {
- // event.isScreen || event.isVideo || event.isAudio
- log('got remote streamid', event.streamid, 'from', event.userid);
- };
-
- connection.stopMediaStream = function(mediaStream) {
- if (!mediaStream) throw 'MediaStream argument is mandatory.';
-
- if (connection.keepStreamsOpened) {
- if (mediaStream.onended) mediaStream.onended();
- return;
- }
-
- // remove stream from "localStreams" object
- // when native-stop method invoked.
- if (connection.localStreams[mediaStream.streamid]) {
- delete connection.localStreams[mediaStream.streamid];
- }
-
- if (isFirefox) {
- // Firefox don't yet support onended for any stream (remote/local)
- if (mediaStream.onended) mediaStream.onended();
- }
-
- // Latest firefox does support mediaStream.getAudioTrack but doesn't support stop on MediaStreamTrack
- var checkForMediaStreamTrackStop = Boolean(
- (mediaStream.getAudioTracks || mediaStream.getVideoTracks) && (
- (mediaStream.getAudioTracks()[0] && !mediaStream.getAudioTracks()[0].stop) ||
- (mediaStream.getVideoTracks()[0] && !mediaStream.getVideoTracks()[0].stop)
- )
- );
-
- if (!mediaStream.getAudioTracks || checkForMediaStreamTrackStop) {
- if (mediaStream.stop) {
- mediaStream.stop();
- }
- return;
- }
-
- if (mediaStream.getAudioTracks().length && mediaStream.getAudioTracks()[0].stop) {
- mediaStream.getAudioTracks().forEach(function(track) {
- track.stop();
- });
- }
-
- if (mediaStream.getVideoTracks().length && mediaStream.getVideoTracks()[0].stop) {
- mediaStream.getVideoTracks().forEach(function(track) {
- track.stop();
- });
- }
- };
-
- connection.changeBandwidth = function(bandwidth) {
- if (!bandwidth || isString(bandwidth) || isEmpty(bandwidth)) {
- throw 'Invalid "bandwidth" arguments.';
- }
-
- forEach(connection.peers, function(peer) {
- peer.peer.bandwidth = bandwidth;
- });
-
- connection.renegotiate();
- };
-
- // www.RTCMultiConnection.org/docs/openSignalingChannel/
- // http://goo.gl/uvoIcZ
-
- // CUSTOM CODE
- var href = window.location.href;
- var hostPatt = new RegExp(window.location.host +"/[^/]*");
- var res = hostPatt.exec(href);
- var protocol = window.location.protocol.replace("http","ws");
-
- var signalingServerPath = protocol + "//" + res + "/webrtc";
- var SIGNALING_SERVER = signalingServerPath; //"ws://localhost:80/quantum/webrtc"; //"wss://localhost:80/quantum/webrtc"; --> ws for http and wss for https
-
- connection.openSignalingChannel = function(config) {
-
-
- config.channel = config.channel || this.channel;
- var websocket = new WebSocket(SIGNALING_SERVER);
- websocket.channel = config.channel;
- websocket.onopen = function() {
- websocket.push(JSON.stringify({
- open: true,
- channel: config.channel
- }));
- if (config.callback)
- config.callback(websocket);
- };
- websocket.onmessage = function(event) {
- config.onmessage(JSON.parse(event.data));
- };
- websocket.push = websocket.send;
- websocket.send = function(data) {
- websocket.push(JSON.stringify({
- data: data,
- channel: config.channel
- }));
- };
-
- /*
- // make sure firebase.js is loaded
- if (!window.Firebase) {
- return loadScript(connection.resources.firebase, function() {
- connection.openSignalingChannel(config);
- });
- }
-
- var channel = config.channel || connection.channel;
-
- if (connection.firebase) {
- // for custom firebase instances
- connection.resources.firebaseio = connection.resources.firebaseio.replace('//chat.', '//' + connection.firebase + '.');
- }
-
- var firebase = new Firebase(connection.resources.firebaseio + channel);
- firebase.channel = channel;
- firebase.on('child_added', function(data) {
- config.onmessage(data.val());
- });
-
- firebase.send = function(data) {
- // a quick dirty workaround to make sure firebase
- // shouldn't fail for NULL values.
- for (var prop in data) {
- if (isNull(data[prop]) || typeof data[prop] == 'function') {
- data[prop] = false;
- }
- }
-
- this.push(data);
- };
-
- if (!connection.socket)
- connection.socket = firebase;
-
- firebase.onDisconnect().remove();
-
- setTimeout(function() {
- config.callback(firebase);
- }, 1);
-
- */
- // CUSTOM CODE //
-
- };
-
- connection.Plugin = Plugin;
- }
-
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html b/usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html
deleted file mode 100644
index 6f660025..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/scripts/webrtc/getSourceId.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-<script>
-
-var DetectRTC = {};
-
-var screenCallback;
-
-DetectRTC.screen = {
- chromeMediaSource: 'screen',
- getSourceId: function (callback) {
- screenCallback = callback;
- window.postMessage('get-sourceId', '*');
- },
- onMessageCallback: function (data) {
- // "cancel" button is clicked
- if (data == 'PermissionDeniedError') {
- DetectRTC.screen.chromeMediaSource = 'PermissionDeniedError';
- if (screenCallback) return screenCallback('PermissionDeniedError');
- else throw new Error('PermissionDeniedError');
- }
-
- // extension notified his presence
- if (data == 'rtcmulticonnection-extension-loaded') {
- DetectRTC.screen.chromeMediaSource = 'desktop';
- }
-
- // extension shared temp sourceId
- if (data.sourceId) {
- DetectRTC.screen.sourceId = data.sourceId;
- if (screenCallback) screenCallback(DetectRTC.screen.sourceId);
- }
- },
- getChromeExtensionStatus: function (callback) {
- // https://chrome.google.com/webstore/detail/screen-capturing-private/icgmlogfeajbfdffajhoebcfbibfhaen
- var extensionid = 'icgmlogfeajbfdffajhoebcfbibfhaen';
-
- var image = document.createElement('img');
- image.src = 'chrome-extension://' + extensionid + '/icon.png';
- image.onload = function () {
- DetectRTC.screen.chromeMediaSource = 'screen';
- window.postMessage('are-you-there', '*');
- setTimeout(function () {
- if (DetectRTC.screen.chromeMediaSource == 'screen') {
- callback('installed-disabled');
- } else callback('installed-enabled');
- }, 2000);
- };
- image.onerror = function () {
- callback('not-installed');
- };
- }
-};
-
-window.addEventListener('message', function (event) {
- if (!event.data || !(typeof event.data == 'string' || event.data.sourceId || event.data.captureSourceId)) return;
- if (event.data.captureSourceId) captureSourceId();
-
- DetectRTC.screen.onMessageCallback(event.data);
-});
-
-function captureSourceId() {
- // check if desktop-capture extension installed.
- DetectRTC.screen.getChromeExtensionStatus(function (status) {
- if (status != 'installed-enabled') {
- window.parent.postMessage({
- chromeExtensionStatus: status
- }, '*');
- return;
- }
-
- DetectRTC.screen.getSourceId(function (sourceId) {
- window.parent.postMessage({
- chromeMediaSourceId: sourceId
- }, '*');
- });
- });
-}
-</script>
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css b/usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css
deleted file mode 100644
index a9edba8f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/sandbox-gridster.css
+++ /dev/null
@@ -1,173 +0,0 @@
-.gridster {
- position: relative;
- margin: auto;
- /* height: 0
- */}
-
-.gridster>ul {
- margin: 0;
- list-style: none;
- padding: 0
-}
-
-.gridster-item {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- list-style: none;
- z-index: 2;
- position: absolute;
- display: none
-}
-
-.gridster-loaded {
- -webkit-transition: height .3s;
- -moz-transition: height .3s;
- -o-transition: height .3s;
- transition: height .3s
-}
-
-.gridster-loaded .gridster-item {
- display: block;
- position: absolute;
- -webkit-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -moz-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -o-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms
-}
-
-.gridster-loaded .gridster-preview-holder {
- display: none;
- z-index: 1;
- position: absolute;
- background-color: #067ab4;
- /*
- background-color: rgb(6, 122, 180);
- -ms-filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#067ab4', endColorstr='#067ab4'); IE
- opacity: 0.2;
- */
- border-color: #fff;
- -webkit-transition: width .2s, height .3s;
- -moz-transition: width .2s, height .3s;
- -o-transition: width .2s, height .3s;
- transition: width .2s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms
-}
-
-.gridster-loaded .gridster-item.gridster-item-moving {
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
- opacity: 0.9;
-}
-
-.gridster-mobile {
- height: auto !important
-}
-
-.gridster-mobile .gridster-item {
- height: auto;
- position: static;
- float: none
-}
-
-.gridster-item.ng-leave.ng-leave-active {
- opacity: 0
-}
-
-.gridster-item.ng-enter {
- opacity: 1
-}
-
-.gridster-item-moving {
- z-index: 3
-}
-
-.gridster-item-resizable-handler {
- position: absolute;
- font-size: 1px;
- display: block
-}
-
-.handle-se {
- cursor: se-resize;
- width: 0;
- height: 0;
- right: 1px;
- bottom: 1px;
- border-style: solid;
- border-width: 0 0 12px 12px;
- border-color: transparent
-}
-
-.handle-ne {
- cursor: ne-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- top: 1px
-}
-
-.handle-nw {
- cursor: nw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- top: 1px
-}
-
-.handle-sw {
- cursor: sw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- bottom: 1px
-}
-
-.handle-e {
- cursor: e-resize;
- width: 12px;
- bottom: 0;
- right: 1px;
- top: 0
-}
-
-.handle-s {
- cursor: s-resize;
- height: 12px;
- right: 0;
- bottom: 1px;
- left: 0
-}
-
-.handle-n {
- cursor: n-resize;
- height: 12px;
- right: 0;
- top: 1px;
- left: 0
-}
-
-.handle-w {
- cursor: w-resize;
- width: 12px;
- left: 1px;
- top: 0;
- bottom: 0
-}
-
-.gridster .gridster-item:hover .gridster-box {
- border: 1.5px solid #B3B2B3
-}
-
-.gridster .gridster-item:hover .handle-se {
- border-color: transparent transparent #ccc
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css b/usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css
deleted file mode 100644
index 827e354e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/att_angular_gridster/ui-gridster.css
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ui-gridster.css */
-.gridster-container {
- background-color: #EFEFEF;
- color: #fff;
- border: 1px dashed;
- overflow-y: auto;
- overflow-x: hidden; }
-
-/* app css for attGridtser */
-.gridster-item-container {
- background-color: #FFFFFF;
- position: relative;
- margin-left: auto;
- margin-right: auto;
- min-height: 79px;
- height: 100%; }
- .gridster-item-container .gridster-item-header {
- /* gridster-item Header */
- position: relative;
- height: 50px !important;
- border: 1px solid #d3d3d3;
- border-bottom: 0;
- background-color: #E5E5E5;
- white-space: nowrap;
- text-overflow: ellipsis;
- z-index: 1;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- -ms-border-radius: 2px 2px 0 0;
- -o-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- overflow: hidden;
- /* IE6-8 */ }
- .gridster-item-container .gridster-item-header .gridster-item-handle {
- cursor: move;
- margin: 12px;
- position: absolute;
- top: 0;
- left: 0;
- border: 0;
- vertical-align: middle;
- -ms-interpolation-mode: bicubic;
- display: block; }
- .gridster-item-container .gridster-item-header .gridster-item-header-content {
- line-height: 44px;
- margin-left: 26px;
- font-family: clearviewatt;
- font-size: 18px;
- color: #444444;
- float: left; }
- .gridster-item-container .gridster-item-header .gridster-item-sub-header-content {
- position: absolute;
- top: 29.5px;
- left: 26px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #444444; }
- .gridster-item-container .gridster-item-header .gridster-item-header-buttons-container {
- position: absolute;
- right: 10px;
- top: 10px;
- overflow: hidden;
- text-align: right;
- height: 30px;
- color: #444444; }
- .gridster-item-container .gridster-item-body {
- /* gridster-item Body */
- position: absolute;
- width: 100%;
- top: 50px;
- left: 0;
- right: 0;
- bottom: 29px;
- border: 1px solid #d3d3d3;
- box-sizing: border-box;
- overflow: auto;
- color: #444444;
- /* text-align: center; */ }
- .gridster-item-container .gridster-item-footer {
- /* gridster-item Footer */
- position: absolute;
- bottom: 0;
- width: 100%;
- height: 29px !important;
- text-align: left;
- cursor: pointer;
- border: 1px solid #d3d3d3;
- border-top: 0;
- background-color: #F2F2F2;
- -webkit-border-radius: 0 0 2px 2px;
- -moz-border-radius: 0 0 2px 2px;
- -ms-border-radius: 0 0 2px 2px;
- -o-border-radius: 0 0 2px 2px;
- border-radius: 0 0 2px 2px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- text-decoration: none;
- /* IE6-8 */ }
- .gridster-item-container .gridster-item-footer:hover {
- background-color: #E5E5E5;
- color: #565656;
- text-decoration: underline; }
- .gridster-item-container .gridster-item-footer .gridster-item-footer-content {
- line-height: 30px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #565656;
- margin: 20px;
- text-decoration: none; }
- .gridster-item-container .gridster-item-footer .gridster-item-footer-content:hover {
- color: #199ddf;
- text-decoration: underline; }
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/ecomp.css b/usecaseui-common/src/main/webapp/app/fusion/styles/ecomp.css
deleted file mode 100644
index dd25f755..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/ecomp.css
+++ /dev/null
@@ -1,177 +0,0 @@
-.menu-icon {
- line-height: 40px;
-}
-
-.menu-icon-collapse {
- line-height: 40px;
- margin-top:10px;
- margin-bottom:10px;
-}
-
-.header-container {
- width: 100%;
- float: left;
- position: fixed;
- z-index: 100;
-}
-.menu-container {
- float: left;
- position:fixed;
- background-color:#f2f2f2
-}
-.content-container {
- min-height: 650px;
- width: calc(100% - 250px);
-}
-.footer-container {
- float:left;
- position: relative;
- z-index: 2;
- width: 100%;
- position:relative;
- z-index:2;
-}
-
-.footer-global i {
- font-size:40px;
-}
-
-.b2b-header-tabs .header__item.profile .profile-info{
- border: 1px solid #d3d3d3;
- max-width:400px;
- width:300px;
- padding: 20px;
- pointer-events: auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- font-size: 16px;
- -webkit-transition: opacity .2s ease-out;
- -moz-transition: opacity .2s ease-out;
- transition: opacity .2s ease-out;
- background: #fff;
- border-radius: 5px;
- box-shadow: 0 5px 6px 0 rgba(0,0,0,.25);
- color: #333;
- line-height: 20px;
- position: absolute;
- left:-123px;
- top:38px;
- display:none;
-}
-
-#header-user-icon{
- font-size:25px;
- color:#FFFFFF;
-
-}
-.header-tertiary-wrapper{
- top:52px;
-}
-.header-profile div{
- display:inline-block;
-}
-.b2b-header-tabs .header-secondary{;
- width: 97%;
- height:42px;
-}
-.b2b-header-tabs .header-tertiary{
- width:97%;
-}
-
-.b2b-header-tabs .header-secondary .header-subitem a.menu__item{
- padding: 10px 0;
-}
- .b2b-ln-icon-fix-pos{
- margin-top:10px;
- }
-.left-menu-collapsed {
- width: 22px !important;
-}
-
-.b2b-subnav-content > li > a {
- display: inline;
-}
-
-#page-content{
- margin-left:250px;
-}
-
-.leftmenu-arrow-expand{
- margin-left:200px
-}
-.leftmenu-arrow-collapse{
- margin-left:0px;
-}
-
-.leftment-items{
- margin-left:40px;
-}
-
-.error-popup-body{
- word-wrap: break-word;
-}
-
-.build_number{
- color:white
-}
-
-
-/*popup modal sizes*/
-.b2b-footer-wrapper .divider-bottom-footer{
- padding: 30px 0 50px 0;
-}
-
-.b2b-modal-header{
- font-size: 24px;
-}
-
-.b2b-modal-body{
- font-size: 14px;
-}
-
-/* applying default styles */
-
-p,a{
- font-size:14px;
-}
-
-.b2b-footer-wrapper .copyright-text-sdk {
- color: #fff;
- font-size: 11px;
- text-align: left;
- font-family: "Omnes-ECOMP-W02", Arial;
-}
-.b2b-footer-wrapper .copyright-text-sdk a {
- color: #fff;
- font-size: 11px;
- text-decoration: underline;
- display: inline-block;
-}
-.b2b-footer-wrapper .copyright-text-sdk a:hover {
- text-decoration: none;
-}
-
-.b2b-header-tabs .header__items{
- width:97%;
-}
-
-.header-main-div{
- position: fixed;
- width: 100%;
- top: 0px;
- left: 0;
- background-color: #222;
- z-index: 9999;
-}
-.left-menu-child
-{
- margin-left: 37px;
-}
-
-.header-image{
- height:28px;
-}
-#role-popup-footer{
- height:100px;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/fusion-sunny.css b/usecaseui-common/src/main/webapp/app/fusion/styles/fusion-sunny.css
deleted file mode 100644
index f9154a1c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/fusion-sunny.css
+++ /dev/null
@@ -1,362 +0,0 @@
- input, textarea, select, div {
- font-family: Arial;
- font-size: 11px;
- font-weight: normal;
- }
-
- form {
- margin-top: 5px;
- }
-
-
- .applicationWindow { border-width: 0px 0px 1px 0px;
- border-style: solid;
- border-color: #959595;
- box-shadow: inset 0 0 10px #000000;
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 10px;
- margin-right: 10px;
- }
-
- .feedbackMessage { width: 99%;
- font-family: Arial;
- font-size: 11px;
- color: #1f1f1f;
- padding: 3px;
- border: 1px #eeb420 solid;
- margin: 3px;
- background: #fff9e5;
- }
-
- .menubar {
- border-width: 0px 0px 0px 1px; border-style: solid; border-color: #959595;
- }
-
- .footer {
- /*clear: both;*/
- border-width: 0px 1px 0px 1px; border-style: solid; border-color: #959595;
- font-family: Verdana,Arial,Helvetica, sans-serif;
- font-size: 9px;
- padding: 10px 10px 30px 10px;
- background: white;
- }
-
- .pageTitle {
- font-family: Arial;
- font-size: 18px;
- font-weight: bold;
- margin-top: 5px;
- }
-
- .content {
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- border-color: #959595;
- font-family: Arial;
- font-size: 11px;
- padding: 5px;
- background: white;
- /*height: 600px;*/
- }
-
- .popupContent {
- font-family: Arial;
- font-size: 11px;
- padding: 3px;
- }
-
- .logo {
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- border-color: #959595;
- text-align: right;
- }
-
- .sep {
- border: 1px solid black
- }
-
- .logo { /*position: relative;*/
- float:left;
- padding-top: 25px;
- padding-left: 25px;
- }
-
- .applicationLogo { float:right;
- padding-top: 25px;
- padding-right: 25px;
- }
-
- .applinkWhite { font-family: Arial;
- font-size: 13px;
- font-weight: 900;
- color: #FFFFFF;
- text-decoration: none; }
-
- .terms { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 9px;
- }
-
- .broadcastMessage { color: red; }
- .broadcastMessageList { color: red; }
-
- .button {
- margin: 5px 1px 5px 1px;
- padding: 3px; }
-
- .toolbarbutton:hover {
- color:#005491;
- }
-
- .headerText { font-family: Arial;
- font-size: 15px;
- font-weight: 700;
- color: #000000; }
-
- .headerBackground { background: #336699; }
-
- .errorMessageText { font-family: Arial;
- font-size: 11px;
- font-weight: bold;
- color: red; }
-
-
- .normalText { font-family: Arial;
- font-size: 11px;
- color: #000000; }
-
- .normalTextRed { font-family: Arial;
- font-size: 11px;
- color: red; }
-
-
- .smallNormalText { font-family: Arial;
- font-size: 9px;
- color: #000000; }
-
- .tableBorder { border:1px outset teal }
-
- .validationError { background: #b9eaff; }
-
- .templatebody {
- background: url(../images/body_graphic.jpg) repeat-x;
- /*margin: 40px 80px 40px 80px;*/
- }
-
- /*--------------------- General Content ------------------------------------*/
-
- .relative {
- position:relative;
- }
-
- .clear{
- clear:both;
- }
-
- .left {
- float: left;
- }
-
- .leftCentered{
- float: left;
- text-align: center;
- }
-
- .right {
- float: right;
- }
-
- .rightAligned{
- text-align: right;
- }
-
- .centered {
- text-align: center;
- align: center;
- }
-
-
- .noWrap{
- white-space:nowrap;
- }
-
- .disabled {
- color:gray;
- cursor:hand;
- }
-
- /*--------------------- Tab styles -------------------------------------*/
-
- .current {
- font-weight: bold;
- border-width: 1px 1px 1px 1px;
- border-color: silver;
- border-style: solid;
- }
-
- .subTab {
- font-weight:bold;
- font-family: Arial;
- font-size: 11px;
- color: #0F3B82;
- }
-
-
- /*--------------------- Grid styles ------------------------------------*/
-
- /* Grid navigation and header styles */
- .gridFilterLabel {font-size: 7pt;
- font-align: justify;
- font-weight: bold;
- display: block;}
-
- .gridFilterText {height: 17px;
- font-size: 8pt;
- width: 60%;
- font-align: justify;}
-
- .gridNavigationBar { font-family:Arial,Verdana;
- font-size:11px;
- font-weight:normal;
- color:#000;
- margin: 0px;
- width: 100%;
- vertical-align: middle;
- }
-
- .gridNavigationBar .navLinks { float: left;
- margin-right:15px;
- padding-top: 2px;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageControls { float: left;
- margin-right: 15px;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageControls input { font-size: 8pt;
- height: 17px;
- vertical-align: middle;
- }
-
- .gridNavigationBar .pageInfo { float: right;
- vertical-align: middle;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageInfo input { font-size: 8pt;
- height: 17px;
- vertical-align: middle;
- }
-
-
- .gridNavigationBar span { padding: 3px; }
-
- .gridNavigationBar a {
- text-decoration:underline;
- color:#000;
- font-weight:normal;
- }
-
- .gridNavigationBar img { vertical-align: middle; }
-
- .gridBulkUpdateRow {
- height: 35px;
- line-height: 35px;
- }
-
- .gridBulkUpdateRow input {
- vertical-align: middle;
- }
-
-
- /* dummy class used to lock the form elements of a grid - ex. bulk transaction processing */
- .alwaysEnabled {}
-
- .hidden {
- display: none;
- }
-
- .selectedPage {
- background-color:#C4DFFB;
- color: white;
- border-style: solid;
- border-width: 1px;
- border-color: gray;
- padding-left: 3px;
- padding-right: 3px;
- vertical-align: middle;
- }
-
- .selectedRow{
- /*background-color:#C4DFFB;*/
- }
-
- /* Action Item styles */
- .actionList {
- margin-left: -20px;
- margin-right: -10px;
- padding-left: 5px;
- }
-
- .actionList li {
- float:left;
- padding-left: 3px;
- padding-right: 3px;
- }
-
- .actionList li a {
- text-decoration:none;
- color:#000;
- }
-
- /* Filter Operator List styles */
-
- .filterList {
- margin: 0px;
- }
-
- .filterList li {
- list-style-type: none;
- padding:3px 3px 3px 2px;
- cursor:hand;
- font-size:11px;
- }
-
- .filterList li:hover {
- background: #404040;
- }
-
- .filterList li a {
- color: #000;
- text-decoration: none;
- }
-
- .filterList li:hover a {
- color: white;
- }
-
- .filterList li a:hover {
- text-decoration: none;
- color: white;
- }
-
- .filterListItem a {
- text-decoration:none;
- padding:3px 2px 3px 2px;
- }
-
-
- /*---------------------- Customized ZK Styles ------------------------------*/
-
- .z-datebox input, .z-timebox input {
- font-family: Arial;
- font-size: 11px;
- height: 15px;
- margin-top:1px;
- }
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/global.css b/usecaseui-common/src/main/webapp/app/fusion/styles/global.css
deleted file mode 100644
index 25d1c578..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/global.css
+++ /dev/null
@@ -1,178 +0,0 @@
-body{
- margin: 0;
- padding: 0;
- padding-bottom: 0 !important;
- min-width: 980px;
-}
-label {
- display: inline-block;
- margin-bottom: 5px;
- font-weight: 700;
-}
-.footer-columns label {
- color: #009fdb;
- font-size: 18px;
-}
-
-.b2b-header-tabs .header__item.profile .profile-info{
- border: 1px solid #d3d3d3;
- max-width:400px;
- width:300px;
- padding: 20px;
- pointer-events: auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- font-size: 16px;
- -webkit-transition: opacity .2s ease-out;
- -moz-transition: opacity .2s ease-out;
- transition: opacity .2s ease-out;
- background: #fff;
- border-radius: 5px;
- box-shadow: 0 5px 6px 0 rgba(0,0,0,.25);
- color: #333;
- line-height: 20px;
- position: absolute;
- left:-123px;
- top:38px;
- display:none;
-}
-.b2b-header-tabs .header__item.profile .profile-info.open{
- display:block;
-}
-.b2b-header-tabs .header__item.profile .profile-info label{
- font-family:Omnes-ATT-W02;
- display:block;
- margin-top:20px;
- font-size: 16px;
-}
-.b2b-header-tabs .header__item.profile .profile-info span{
- font-family:Omnes_ATTW02Medium;
- display:block;
-}
-
-.b2b-header-tabs .selectWrap button.awd-select{
- height:36px;
- line-height:31px;
- font-size:1rem;
- display:inline-block;
-}
-/* @font-face {
- font-family: atticons;
- src: url(../fonts/atticons.eot?#iefix) format("embedded-opentype"), url(../fonts/atticons.woff) format("woff"), url(../fonts/atticons.ttf) format("truetype"), url(../fonts/atticons.svg#atticons) format("svg");
- font-weight: normal;
- font-style: normal;
-} */
-[class*=" icon-"], [class^=icon-] {
- font-family: atticons;
- speak: none;
- font-style: normal;
- font-weight: 400;
- font-variant: normal;
- text-transform: none;
- line-height: 40px;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.icon-user-small {
- display: inline-block;
- vertical-align: middle;
- width: 20px;
- font-size: 56px;
- margin-right: 16px;
- float: left;
-}
-.icon-user-small:before {
- content: "\e60b";
-}
-.icon-local-search {
- content: "\e685";
-}
-.header-container {
- width: 100%;
- float: left;
-}
-.menu-container {
- width: 250px;
- float: left;
-}
-.content-container {
- float: left;
- min-height: 650px;
- width: calc(100% - 250px);
-}
-.footer-container {
- float:left;
- width: 100%;
-}
-.profile-info {
- font-size: 16px;
- color: #333;
- line-height: 20px;
-}
-h6 {
- font-weight: bold;
- font-size: 1.125em;
- line-height: 1.3333333333;
-}
-
-.icon-primary-accordion-plus, .icon-primary-accordion-minus {
- float: right;
- line-height: 20px;
-}
-.left-menu-collapsed {
- width: 0px !important;
-}
-.menu-icon {
- float: left;
- line-height: 20px;
- width: 25px;
- height: 20px;
- margin-top: -10px;
-}
-.b2b-footer-wrapper {
- width: 100%;
- background-color: #222;
- height: 88px;
-}
-.icon-primary-right {
- margin-left: -11px;
-}
-@media (max-width: 768px) {
- .divider-bottom-footer .footerLogo {
- margin: 10px 0 0 0px;
- }
- .b2b-header-tabs .header__items {
- width: 700px;
- }
-}
-@media screen and (min-device-width: 769px) and (max-width: 1200px) {
- .b2b-header-tabs .header__items {
- width: 700px;
- }
-}
-@media screen and (max-width: 1100px) {
- .b2b-header-tabs .header__item.profile {
- float: right;
- }
-}
-@media screen and (min-width: 768px) and (max-width: 1105px) {
- table th, table td{
- padding: 19px 10px;
- }
-}
-.icon-spinner {
- animation: spinner 1s linear infinite;
- background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2036%2036%22%3E%0A%20%20%3Cpath%20fill%3D%22%230569AE%22%20d%3D%22M18%2036c-2.7%200-4.8-.6-6.2-1C8%2033.6%205.4%2031.1%204%2029.3%202.7%2027.6.9%2024.7.3%2020.8c-.3-2.1-.5-5.4.9-9.1C3%206.8%206.4%204.1%208.3%202.8%2011.8.5%2015.4%200%2017.8%200l.1%204.3c-1.8%200-4.6.4-7.3%202.2-1.4.9-4%203-5.4%206.7-1%202.8-.9%205.3-.7%206.9.5%203%201.8%205.1%202.9%206.4%201.1%201.4%203%203.2%206%204.3%201.5.5%204.6%201.3%208.3.3%203-.8%205-2.5%206.2-3.7%201.4-1.4%202.4-3.2%203.1-5%20.4-1.3.9-3.3.6-5.8-.5-4.2-2.8-7.1-4.2-8.5L30.5%205c1.8%201.8%204.8%205.6%205.4%2011.1.3%203.2-.3%205.9-.9%207.6-.8%202.4-2.2%204.8-4%206.7-1.5%201.6-4.2%203.8-8.1%204.9-1.8.5-3.4.7-4.9.7z%22%2F%3E%0A%20%20%3Cpath%20fill%3D%22%23FFF%22%20d%3D%22M17.8%202.2c1.8%200%204.9.3%208.2%202.2%201.2.7%202.2%201.5%203%202.3%22%2F%3E%0A%20%20%3Cpath%20fill%3D%22%23F2F2F3%22%20d%3D%22M27.5%208.1c-.8-.8-1.7-1.4-2.6-1.9-2.1-1.2-4.5-1.9-7.1-1.9V0c3.3%200%206.5.9%209.3%202.4%201.2.8%202.3%201.6%203.4%202.6l-3%203.1z%22%2F%3E%0A%3C%2Fsvg%3E");
- height: 50px;
- width: 50px;
-}
-.loader-container {
- position: fixed;
- top: calc(50vh - 25px);
- left: calc(50vw - 25px);
-}
-.loader-container i {
- float: left;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/jquery-ui.css b/usecaseui-common/src/main/webapp/app/fusion/styles/jquery-ui.css
deleted file mode 100644
index 1c22746c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/jquery-ui.css
+++ /dev/null
@@ -1,1225 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-03-11
-* http://jqueryui.com
-* Includes: core.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, draggable.css, menu.css, progressbar.css, resizable.css, selectable.css, selectmenu.css, slider.css, sortable.css, spinner.css, tabs.css, tooltip.css, theme.css
-* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden {
- display: none;
-}
-.ui-helper-hidden-accessible {
- border: 0;
- clip: rect(0 0 0 0);
- height: 1px;
- margin: -1px;
- overflow: hidden;
- padding: 0;
- position: absolute;
- width: 1px;
-}
-.ui-helper-reset {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- line-height: 1.3;
- text-decoration: none;
- font-size: 100%;
- list-style: none;
-}
-.ui-helper-clearfix:before,
-.ui-helper-clearfix:after {
- content: "";
- display: table;
- border-collapse: collapse;
-}
-.ui-helper-clearfix:after {
- clear: both;
-}
-.ui-helper-clearfix {
- min-height: 0; /* support: IE7 */
-}
-.ui-helper-zfix {
- width: 100%;
- height: 100%;
- top: 0;
- left: 0;
- position: absolute;
- opacity: 0;
- filter:Alpha(Opacity=0); /* support: IE8 */
-}
-
-.ui-front {
- z-index: 100;
-}
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled {
- cursor: default !important;
-}
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon {
- display: block;
- text-indent: -99999px;
- overflow: hidden;
- background-repeat: no-repeat;
-}
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
-}
-.ui-accordion .ui-accordion-header {
- display: block;
- cursor: pointer;
- position: relative;
- margin: 2px 0 0 0;
- padding: .5em .5em .5em .7em;
- min-height: 0; /* support: IE7 */
- font-size: 100%;
-}
-.ui-accordion .ui-accordion-icons {
- padding-left: 2.2em;
-}
-.ui-accordion .ui-accordion-icons .ui-accordion-icons {
- padding-left: 2.2em;
-}
-.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
- position: absolute;
- left: .5em;
- top: 50%;
- margin-top: -8px;
-}
-.ui-accordion .ui-accordion-content {
- padding: 1em 2.2em;
- border-top: 0;
- overflow: auto;
-}
-.ui-autocomplete {
- position: absolute;
- top: 0;
- left: 0;
- cursor: default;
-}
-.ui-button {
- display: inline-block;
- position: relative;
- padding: 0;
- line-height: normal;
- margin-right: .1em;
- cursor: pointer;
- vertical-align: middle;
- text-align: center;
- overflow: visible; /* removes extra width in IE */
-}
-.ui-button,
-.ui-button:link,
-.ui-button:visited,
-.ui-button:hover,
-.ui-button:active {
- text-decoration: none;
-}
-/* to make room for the icon, a width needs to be set here */
-.ui-button-icon-only {
- width: 2.2em;
-}
-/* button elements seem to need a little more width */
-button.ui-button-icon-only {
- width: 2.4em;
-}
-.ui-button-icons-only {
- width: 3.4em;
-}
-button.ui-button-icons-only {
- width: 3.7em;
-}
-
-/* button text element */
-.ui-button .ui-button-text {
- display: block;
- line-height: normal;
-}
-.ui-button-text-only .ui-button-text {
- padding: .4em 1em;
-}
-.ui-button-icon-only .ui-button-text,
-.ui-button-icons-only .ui-button-text {
- padding: .4em;
- text-indent: -9999999px;
-}
-.ui-button-text-icon-primary .ui-button-text,
-.ui-button-text-icons .ui-button-text {
- padding: .4em 1em .4em 2.1em;
-}
-.ui-button-text-icon-secondary .ui-button-text,
-.ui-button-text-icons .ui-button-text {
- padding: .4em 2.1em .4em 1em;
-}
-.ui-button-text-icons .ui-button-text {
- padding-left: 2.1em;
- padding-right: 2.1em;
-}
-/* no icon support for input elements, provide padding by default */
-input.ui-button {
- padding: .4em 1em;
-}
-
-/* button icon element(s) */
-.ui-button-icon-only .ui-icon,
-.ui-button-text-icon-primary .ui-icon,
-.ui-button-text-icon-secondary .ui-icon,
-.ui-button-text-icons .ui-icon,
-.ui-button-icons-only .ui-icon {
- position: absolute;
- top: 50%;
- margin-top: -8px;
-}
-.ui-button-icon-only .ui-icon {
- left: 50%;
- margin-left: -8px;
-}
-.ui-button-text-icon-primary .ui-button-icon-primary,
-.ui-button-text-icons .ui-button-icon-primary,
-.ui-button-icons-only .ui-button-icon-primary {
- left: .5em;
-}
-.ui-button-text-icon-secondary .ui-button-icon-secondary,
-.ui-button-text-icons .ui-button-icon-secondary,
-.ui-button-icons-only .ui-button-icon-secondary {
- right: .5em;
-}
-
-/* button sets */
-.ui-buttonset {
- margin-right: 7px;
-}
-.ui-buttonset .ui-button {
- margin-left: 0;
- margin-right: -.3em;
-}
-
-/* workarounds */
-/* reset extra padding in Firefox, see h5bp.com/l */
-input.ui-button::-moz-focus-inner,
-button.ui-button::-moz-focus-inner {
- border: 0;
- padding: 0;
-}
-.ui-datepicker {
- width: 17em;
- padding: .2em .2em 0;
- display: none;
-}
-.ui-datepicker .ui-datepicker-header {
- position: relative;
- padding: .2em 0;
-}
-.ui-datepicker .ui-datepicker-prev,
-.ui-datepicker .ui-datepicker-next {
- position: absolute;
- top: 2px;
- width: 1.8em;
- height: 1.8em;
-}
-.ui-datepicker .ui-datepicker-prev-hover,
-.ui-datepicker .ui-datepicker-next-hover {
- top: 1px;
-}
-.ui-datepicker .ui-datepicker-prev {
- left: 2px;
-}
-.ui-datepicker .ui-datepicker-next {
- right: 2px;
-}
-.ui-datepicker .ui-datepicker-prev-hover {
- left: 1px;
-}
-.ui-datepicker .ui-datepicker-next-hover {
- right: 1px;
-}
-.ui-datepicker .ui-datepicker-prev span,
-.ui-datepicker .ui-datepicker-next span {
- display: block;
- position: absolute;
- left: 50%;
- margin-left: -8px;
- top: 50%;
- margin-top: -8px;
-}
-.ui-datepicker .ui-datepicker-title {
- margin: 0 2.3em;
- line-height: 1.8em;
- text-align: center;
-}
-.ui-datepicker .ui-datepicker-title select {
- font-size: 1em;
- margin: 1px 0;
-}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year {
- width: 45%;
-}
-.ui-datepicker table {
- width: 100%;
- font-size: .9em;
- border-collapse: collapse;
- margin: 0 0 .4em;
-}
-.ui-datepicker th {
- padding: .7em .3em;
- text-align: center;
- font-weight: bold;
- border: 0;
-}
-.ui-datepicker td {
- border: 0;
- padding: 1px;
-}
-.ui-datepicker td span,
-.ui-datepicker td a {
- display: block;
- padding: .2em;
- text-align: right;
- text-decoration: none;
-}
-.ui-datepicker .ui-datepicker-buttonpane {
- background-image: none;
- margin: .7em 0 0 0;
- padding: 0 .2em;
- border-left: 0;
- border-right: 0;
- border-bottom: 0;
-}
-.ui-datepicker .ui-datepicker-buttonpane button {
- float: right;
- margin: .5em .2em .4em;
- cursor: pointer;
- padding: .2em .6em .3em .6em;
- width: auto;
- overflow: visible;
-}
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
- float: left;
-}
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi {
- width: auto;
-}
-.ui-datepicker-multi .ui-datepicker-group {
- float: left;
-}
-.ui-datepicker-multi .ui-datepicker-group table {
- width: 95%;
- margin: 0 auto .4em;
-}
-.ui-datepicker-multi-2 .ui-datepicker-group {
- width: 50%;
-}
-.ui-datepicker-multi-3 .ui-datepicker-group {
- width: 33.3%;
-}
-.ui-datepicker-multi-4 .ui-datepicker-group {
- width: 25%;
-}
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
- border-left-width: 0;
-}
-.ui-datepicker-multi .ui-datepicker-buttonpane {
- clear: left;
-}
-.ui-datepicker-row-break {
- clear: both;
- width: 100%;
- font-size: 0;
-}
-
-/* RTL support */
-.ui-datepicker-rtl {
- direction: rtl;
-}
-.ui-datepicker-rtl .ui-datepicker-prev {
- right: 2px;
- left: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-next {
- left: 2px;
- right: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-prev:hover {
- right: 1px;
- left: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-next:hover {
- left: 1px;
- right: auto;
-}
-.ui-datepicker-rtl .ui-datepicker-buttonpane {
- clear: right;
-}
-.ui-datepicker-rtl .ui-datepicker-buttonpane button {
- float: left;
-}
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
-.ui-datepicker-rtl .ui-datepicker-group {
- float: right;
-}
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
- border-right-width: 0;
- border-left-width: 1px;
-}
-.ui-dialog {
- overflow: hidden;
- position: absolute;
- top: 0;
- left: 0;
- padding: .2em;
- outline: 0;
-}
-.ui-dialog .ui-dialog-titlebar {
- padding: .4em 1em;
- position: relative;
-}
-.ui-dialog .ui-dialog-title {
- float: left;
- margin: .1em 0;
- white-space: nowrap;
- width: 90%;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.ui-dialog .ui-dialog-titlebar-close {
- position: absolute;
- right: .3em;
- top: 50%;
- width: 20px;
- margin: -10px 0 0 0;
- padding: 1px;
- height: 20px;
-}
-.ui-dialog .ui-dialog-content {
- position: relative;
- border: 0;
- padding: .5em 1em;
- background: none;
- overflow: auto;
-}
-.ui-dialog .ui-dialog-buttonpane {
- text-align: left;
- border-width: 1px 0 0 0;
- background-image: none;
- margin-top: .5em;
- padding: .3em 1em .5em .4em;
-}
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
- float: right;
-}
-.ui-dialog .ui-dialog-buttonpane button {
- margin: .5em .4em .5em 0;
- cursor: pointer;
-}
-.ui-dialog .ui-resizable-se {
- width: 12px;
- height: 12px;
- right: -5px;
- bottom: -5px;
- background-position: 16px 16px;
-}
-.ui-draggable .ui-dialog-titlebar {
- cursor: move;
-}
-.ui-draggable-handle {
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-menu {
- list-style: none;
- padding: 0;
- margin: 0;
- display: block;
- outline: none;
-}
-.ui-menu .ui-menu {
- position: absolute;
-}
-.ui-menu .ui-menu-item {
- position: relative;
- margin: 0;
- padding: 3px 1em 3px .4em;
- cursor: pointer;
- min-height: 0; /* support: IE7 */
- /* support: IE10, see #8844 */
- list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
-}
-.ui-menu .ui-menu-divider {
- margin: 5px 0;
- height: 0;
- font-size: 0;
- line-height: 0;
- border-width: 1px 0 0 0;
-}
-.ui-menu .ui-state-focus,
-.ui-menu .ui-state-active {
- margin: -1px;
-}
-
-/* icon support */
-.ui-menu-icons {
- position: relative;
-}
-.ui-menu-icons .ui-menu-item {
- padding-left: 2em;
-}
-
-/* left-aligned */
-.ui-menu .ui-icon {
- position: absolute;
- top: 0;
- bottom: 0;
- left: .2em;
- margin: auto 0;
-}
-
-/* right-aligned */
-.ui-menu .ui-menu-icon {
- left: auto;
- right: 0;
-}
-.ui-progressbar {
- height: 2em;
- text-align: left;
- overflow: hidden;
-}
-.ui-progressbar .ui-progressbar-value {
- margin: -1px;
- height: 100%;
-}
-.ui-progressbar .ui-progressbar-overlay {
- background: url("data:image/gif;base64,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");
- height: 100%;
- filter: alpha(opacity=25); /* support: IE8 */
- opacity: 0.25;
-}
-.ui-progressbar-indeterminate .ui-progressbar-value {
- background-image: none;
-}
-.ui-resizable {
- position: relative;
-}
-.ui-resizable-handle {
- position: absolute;
- font-size: 0.1px;
- display: block;
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-resizable-disabled .ui-resizable-handle,
-.ui-resizable-autohide .ui-resizable-handle {
- display: none;
-}
-.ui-resizable-n {
- cursor: n-resize;
- height: 7px;
- width: 100%;
- top: -5px;
- left: 0;
-}
-.ui-resizable-s {
- cursor: s-resize;
- height: 7px;
- width: 100%;
- bottom: -5px;
- left: 0;
-}
-.ui-resizable-e {
- cursor: e-resize;
- width: 7px;
- right: -5px;
- top: 0;
- height: 100%;
-}
-.ui-resizable-w {
- cursor: w-resize;
- width: 7px;
- left: -5px;
- top: 0;
- height: 100%;
-}
-.ui-resizable-se {
- cursor: se-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- bottom: 1px;
-}
-.ui-resizable-sw {
- cursor: sw-resize;
- width: 9px;
- height: 9px;
- left: -5px;
- bottom: -5px;
-}
-.ui-resizable-nw {
- cursor: nw-resize;
- width: 9px;
- height: 9px;
- left: -5px;
- top: -5px;
-}
-.ui-resizable-ne {
- cursor: ne-resize;
- width: 9px;
- height: 9px;
- right: -5px;
- top: -5px;
-}
-.ui-selectable {
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-selectable-helper {
- position: absolute;
- z-index: 100;
- border: 1px dotted black;
-}
-.ui-selectmenu-menu {
- padding: 0;
- margin: 0;
- position: absolute;
- top: 0;
- left: 0;
- display: none;
-}
-.ui-selectmenu-menu .ui-menu {
- overflow: auto;
- /* Support: IE7 */
- overflow-x: hidden;
- padding-bottom: 1px;
-}
-.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
- font-size: 1em;
- font-weight: bold;
- line-height: 1.5;
- padding: 2px 0.4em;
- margin: 0.5em 0 0 0;
- height: auto;
- border: 0;
-}
-.ui-selectmenu-open {
- display: block;
-}
-.ui-selectmenu-button {
- display: inline-block;
- overflow: hidden;
- position: relative;
- text-decoration: none;
- cursor: pointer;
-}
-.ui-selectmenu-button span.ui-icon {
- right: 0.5em;
- left: auto;
- margin-top: -8px;
- position: absolute;
- top: 50%;
-}
-.ui-selectmenu-button span.ui-selectmenu-text {
- text-align: left;
- padding: 0.4em 2.1em 0.4em 1em;
- display: block;
- line-height: 1.4;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.ui-slider {
- position: relative;
- text-align: left;
-}
-.ui-slider .ui-slider-handle {
- position: absolute;
- z-index: 2;
- width: 1.2em;
- height: 1.2em;
- cursor: default;
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-slider .ui-slider-range {
- position: absolute;
- z-index: 1;
- font-size: .7em;
- display: block;
- border: 0;
- background-position: 0 0;
-}
-
-/* support: IE8 - See #6727 */
-.ui-slider.ui-state-disabled .ui-slider-handle,
-.ui-slider.ui-state-disabled .ui-slider-range {
- filter: inherit;
-}
-
-.ui-slider-horizontal {
- height: .8em;
-}
-.ui-slider-horizontal .ui-slider-handle {
- top: -.3em;
- margin-left: -.6em;
-}
-.ui-slider-horizontal .ui-slider-range {
- top: 0;
- height: 100%;
-}
-.ui-slider-horizontal .ui-slider-range-min {
- left: 0;
-}
-.ui-slider-horizontal .ui-slider-range-max {
- right: 0;
-}
-
-.ui-slider-vertical {
- width: .8em;
- height: 100px;
-}
-.ui-slider-vertical .ui-slider-handle {
- left: -.3em;
- margin-left: 0;
- margin-bottom: -.6em;
-}
-.ui-slider-vertical .ui-slider-range {
- left: 0;
- width: 100%;
-}
-.ui-slider-vertical .ui-slider-range-min {
- bottom: 0;
-}
-.ui-slider-vertical .ui-slider-range-max {
- top: 0;
-}
-.ui-sortable-handle {
- -ms-touch-action: none;
- touch-action: none;
-}
-.ui-spinner {
- position: relative;
- display: inline-block;
- overflow: hidden;
- padding: 0;
- vertical-align: middle;
-}
-.ui-spinner-input {
- border: none;
- background: none;
- color: inherit;
- padding: 0;
- margin: .2em 0;
- vertical-align: middle;
- margin-left: .4em;
- margin-right: 22px;
-}
-.ui-spinner-button {
- width: 16px;
- height: 50%;
- font-size: .5em;
- padding: 0;
- margin: 0;
- text-align: center;
- position: absolute;
- cursor: default;
- display: block;
- overflow: hidden;
- right: 0;
-}
-/* more specificity required here to override default borders */
-.ui-spinner a.ui-spinner-button {
- border-top: none;
- border-bottom: none;
- border-right: none;
-}
-/* vertically center icon */
-.ui-spinner .ui-icon {
- position: absolute;
- margin-top: -8px;
- top: 50%;
- left: 0;
-}
-.ui-spinner-up {
- top: 0;
-}
-.ui-spinner-down {
- bottom: 0;
-}
-
-/* TR overrides */
-.ui-spinner .ui-icon-triangle-1-s {
- /* need to fix icons sprite */
- background-position: -65px -16px;
-}
-.ui-tabs {
- position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
- padding: .2em;
-}
-.ui-tabs .ui-tabs-nav {
- margin: 0;
- padding: .2em .2em 0;
-}
-.ui-tabs .ui-tabs-nav li {
- list-style: none;
- float: left;
- position: relative;
- top: 0;
- margin: 1px .2em 0 0;
- border-bottom-width: 0;
- padding: 0;
- white-space: nowrap;
-}
-.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
- float: left;
- padding: .5em 1em;
- text-decoration: none;
-}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active {
- margin-bottom: -1px;
- padding-bottom: 1px;
-}
-.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
-.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
-.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
- cursor: text;
-}
-.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
- cursor: pointer;
-}
-.ui-tabs .ui-tabs-panel {
- display: block;
- border-width: 0;
- padding: 1em 1.4em;
- background: none;
-}
-.ui-tooltip {
- padding: 8px;
- position: absolute;
- z-index: 9999;
- max-width: 300px;
- -webkit-box-shadow: 0 0 5px #aaa;
- box-shadow: 0 0 5px #aaa;
-}
-body .ui-tooltip {
- border-width: 2px;
-}
-
-/* Component containers
-----------------------------------*/
-.ui-widget {
- font-family: Verdana,Arial,sans-serif;
- font-size: 1.1em;
-}
-.ui-widget .ui-widget {
- font-size: 1em;
-}
-.ui-widget input,
-.ui-widget select,
-.ui-widget textarea,
-.ui-widget button {
- font-family: Verdana,Arial,sans-serif;
- font-size: 1em;
-}
-.ui-widget-content {
- border: 1px solid #aaaaaa;
- background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
- color: #222222;
-}
-.ui-widget-content a {
- color: #222222;
-}
-.ui-widget-header {
- border: 1px solid #aaaaaa;
- background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
- color: #222222;
- font-weight: bold;
-}
-.ui-widget-header a {
- color: #222222;
-}
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default,
-.ui-widget-content .ui-state-default,
-.ui-widget-header .ui-state-default {
- border: 1px solid #d3d3d3;
- background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
- font-weight: normal;
- color: #555555;
-}
-.ui-state-default a,
-.ui-state-default a:link,
-.ui-state-default a:visited {
- color: #555555;
- text-decoration: none;
-}
-.ui-state-hover,
-.ui-widget-content .ui-state-hover,
-.ui-widget-header .ui-state-hover,
-.ui-state-focus,
-.ui-widget-content .ui-state-focus,
-.ui-widget-header .ui-state-focus {
- border: 1px solid #999999;
- background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
- font-weight: normal;
- color: #212121;
-}
-.ui-state-hover a,
-.ui-state-hover a:hover,
-.ui-state-hover a:link,
-.ui-state-hover a:visited,
-.ui-state-focus a,
-.ui-state-focus a:hover,
-.ui-state-focus a:link,
-.ui-state-focus a:visited {
- color: #212121;
- text-decoration: none;
-}
-.ui-state-active,
-.ui-widget-content .ui-state-active,
-.ui-widget-header .ui-state-active {
- border: 1px solid #aaaaaa;
- background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
- font-weight: normal;
- color: #212121;
-}
-.ui-state-active a,
-.ui-state-active a:link,
-.ui-state-active a:visited {
- color: #212121;
- text-decoration: none;
-}
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight,
-.ui-widget-content .ui-state-highlight,
-.ui-widget-header .ui-state-highlight {
- border: 1px solid #fcefa1;
- background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
- color: #363636;
-}
-.ui-state-highlight a,
-.ui-widget-content .ui-state-highlight a,
-.ui-widget-header .ui-state-highlight a {
- color: #363636;
-}
-.ui-state-error,
-.ui-widget-content .ui-state-error,
-.ui-widget-header .ui-state-error {
- border: 1px solid #cd0a0a;
- background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
- color: #cd0a0a;
-}
-.ui-state-error a,
-.ui-widget-content .ui-state-error a,
-.ui-widget-header .ui-state-error a {
- color: #cd0a0a;
-}
-.ui-state-error-text,
-.ui-widget-content .ui-state-error-text,
-.ui-widget-header .ui-state-error-text {
- color: #cd0a0a;
-}
-.ui-priority-primary,
-.ui-widget-content .ui-priority-primary,
-.ui-widget-header .ui-priority-primary {
- font-weight: bold;
-}
-.ui-priority-secondary,
-.ui-widget-content .ui-priority-secondary,
-.ui-widget-header .ui-priority-secondary {
- opacity: .7;
- filter:Alpha(Opacity=70); /* support: IE8 */
- font-weight: normal;
-}
-.ui-state-disabled,
-.ui-widget-content .ui-state-disabled,
-.ui-widget-header .ui-state-disabled {
- opacity: .35;
- filter:Alpha(Opacity=35); /* support: IE8 */
- background-image: none;
-}
-.ui-state-disabled .ui-icon {
- filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
-}
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon {
- width: 16px;
- height: 16px;
-}
-.ui-icon,
-.ui-widget-content .ui-icon {
- background-image: url("images/ui-icons_222222_256x240.png");
-}
-.ui-widget-header .ui-icon {
- background-image: url("images/ui-icons_222222_256x240.png");
-}
-.ui-state-default .ui-icon {
- background-image: url("images/ui-icons_888888_256x240.png");
-}
-.ui-state-hover .ui-icon,
-.ui-state-focus .ui-icon {
- background-image: url("images/ui-icons_454545_256x240.png");
-}
-.ui-state-active .ui-icon {
- background-image: url("images/ui-icons_454545_256x240.png");
-}
-.ui-state-highlight .ui-icon {
- background-image: url("images/ui-icons_2e83ff_256x240.png");
-}
-.ui-state-error .ui-icon,
-.ui-state-error-text .ui-icon {
- background-image: url("images/ui-icons_cd0a0a_256x240.png");
-}
-
-/* positioning */
-.ui-icon-blank { background-position: 16px 16px; }
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-on { background-position: -96px -144px; }
-.ui-icon-radio-off { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-all,
-.ui-corner-top,
-.ui-corner-left,
-.ui-corner-tl {
- border-top-left-radius: 4px;
-}
-.ui-corner-all,
-.ui-corner-top,
-.ui-corner-right,
-.ui-corner-tr {
- border-top-right-radius: 4px;
-}
-.ui-corner-all,
-.ui-corner-bottom,
-.ui-corner-left,
-.ui-corner-bl {
- border-bottom-left-radius: 4px;
-}
-.ui-corner-all,
-.ui-corner-bottom,
-.ui-corner-right,
-.ui-corner-br {
- border-bottom-right-radius: 4px;
-}
-
-/* Overlays */
-.ui-widget-overlay {
- background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
- opacity: .3;
- filter: Alpha(Opacity=30); /* support: IE8 */
-}
-.ui-widget-shadow {
- margin: -8px 0 0 -8px;
- padding: 8px;
- background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
- opacity: .3;
- filter: Alpha(Opacity=30); /* support: IE8 */
- border-radius: 8px;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css b/usecaseui-common/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css
deleted file mode 100644
index aa382de3..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/layout/layout-default-latest.css
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- * Default Layout Theme
- *
- * Created for jquery.layout
- *
- * Copyright (c) 2010
- * Fabrizio Balliano (http://www.fabrizioballiano.net)
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * Last Updated: 2010-02-10
- * NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
- */
-
-/*
- * DEFAULT FONT
- * Just to make demo-pages look better - not actually relevant to Layout!
- */
-body {
- font-family: Geneva, Arial, Helvetica, sans-serif;
- font-size: 100%;
- *font-size: 80%;
-}
-
-/*
- * PANES & CONTENT-DIVs
- */
-.ui-layout-pane { /* all 'panes' */
- background: #FFF;
- border: 1px solid #BBB;
- padding: 10px;
- overflow: auto;
- /* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
- otherwise you may get double-scrollbars - on the pane AND on the content-div
- - use ui-layout-wrapper class if pane has a content-div
- - use ui-layout-container if pane has an inner-layout
- */
- }
- /* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
- .ui-layout-content {
- padding: 10px;
- position: relative; /* contain floated or positioned elements */
- overflow: auto; /* add scrolling to content-div */
- }
-
-/*
- * UTILITY CLASSES
- * Must come AFTER pane-class above so will override
- * These classes are NOT auto-generated and are NOT used by Layout
- */
-.layout-child-container,
-.layout-content-container {
- padding: 0;
- overflow: hidden;
-}
-.layout-child-container {
- border: 0; /* remove border because inner-layout-panes probably have borders */
-}
-.layout-scroll {
- overflow: auto;
-}
-.layout-hide {
- display: none;
-}
-
-/*
- * RESIZER-BARS
- */
-.ui-layout-resizer { /* all 'resizer-bars' */
- background: #DDD;
- border: 1px solid #BBB;
- border-width: 0;
- }
- .ui-layout-resizer-drag { /* REAL resizer while resize in progress */
- }
- .ui-layout-resizer-hover { /* affects both open and closed states */
- }
- /* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
- otherwise color shifts while dragging when bar can't keep up with mouse */
- .ui-layout-resizer-open-hover , /* hover-color to 'resize' */
- .ui-layout-resizer-dragging { /* resizer beging 'dragging' */
- background: #C4E1A4;
- }
- .ui-layout-resizer-dragging { /* CLONED resizer being dragged */
- border: 1px solid #BBB;
- }
- .ui-layout-resizer-north-dragging,
- .ui-layout-resizer-south-dragging {
- border-width: 1px 0;
- }
- .ui-layout-resizer-west-dragging,
- .ui-layout-resizer-east-dragging {
- border-width: 0 1px;
- }
- /* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
- .ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
- background: #E1A4A4; /* red */
- }
-
- .ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
- background: #EBD5AA;
- }
- .ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
- opacity: .10; /* show only a slight shadow */
- filter: alpha(opacity=10);
- }
- .ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
- opacity: 1.00; /* on-hover, show the resizer-bar normally */
- filter: alpha(opacity=100);
- }
- /* sliding resizer - add 'outside-border' to resizer on-hover
- * this sample illustrates how to target specific panes and states */
- .ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
- .ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
- .ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
- .ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
-
-/*
- * TOGGLER-BUTTONS
- */
-.ui-layout-toggler {
- border: 1px solid #BBB; /* match pane-border */
- background-color: #BBB;
- }
- .ui-layout-resizer-hover .ui-layout-toggler {
- opacity: .60;
- filter: alpha(opacity=60);
- }
- .ui-layout-toggler-hover , /* need when NOT resizable */
- .ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
- background-color: #FC6;
- opacity: 1.00;
- filter: alpha(opacity=100);
- }
- .ui-layout-toggler-north ,
- .ui-layout-toggler-south {
- border-width: 0 1px; /* left/right borders */
- }
- .ui-layout-toggler-west ,
- .ui-layout-toggler-east {
- border-width: 1px 0; /* top/bottom borders */
- }
- /* hide the toggler-button when the pane is 'slid open' */
- .ui-layout-resizer-sliding .ui-layout-toggler {
- display: none;
- }
- /*
- * style the text we put INSIDE the togglers
- */
- .ui-layout-toggler .content {
- color: #666;
- font-size: 12px;
- font-weight: bold;
- width: 100%;
- padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
- }
-
-/*
- * PANE-MASKS
- * these styles are hard-coded on mask elems, but are also
- * included here as !important to ensure will overrides any generic styles
- */
-.ui-layout-mask {
- border: none !important;
- padding: 0 !important;
- margin: 0 !important;
- overflow: hidden !important;
- position: absolute !important;
- opacity: 0 !important;
- filter: Alpha(Opacity="0") !important;
-}
-.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
- top: 0 !important;
- left: 0 !important;
- width: 100% !important;
- height: 100% !important;
-}
-div.ui-layout-mask {} /* standard mask for iframes */
-iframe.ui-layout-mask {} /* extra mask for objects/applets */
-
-/*
- * Default printing styles
- */
-@media print {
- /*
- * Unless you want to print the layout as it appears onscreen,
- * these html/body styles are needed to allow the content to 'flow'
- */
- html {
- height: auto !important;
- overflow: visible !important;
- }
- body.ui-layout-container {
- position: static !important;
- top: auto !important;
- bottom: auto !important;
- left: auto !important;
- right: auto !important;
- /* only IE6 has container width & height set by Layout */
- _width: auto !important;
- _height: auto !important;
- }
- .ui-layout-resizer, .ui-layout-toggler {
- display: none !important;
- }
- /*
- * Default pane print styles disables positioning, borders and backgrounds.
- * You can modify these styles however it suit your needs.
- */
- .ui-layout-pane {
- border: none !important;
- background: transparent !important;
- position: relative !important;
- top: auto !important;
- bottom: auto !important;
- left: auto !important;
- right: auto !important;
- width: auto !important;
- height: auto !important;
- overflow: visible !important;
- }
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/workflows/bs-workflow.css b/usecaseui-common/src/main/webapp/app/fusion/styles/workflows/bs-workflow.css
deleted file mode 100644
index 09e0a927..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/workflows/bs-workflow.css
+++ /dev/null
@@ -1,134 +0,0 @@
-.fade {
- opacity: 0;
- -webkit-transition: opacity .15s linear;
- -o-transition: opacity .15s linear;
- transition: opacity .15s linear;
-}
-.fade.in {
- opacity: 1;
-}
-.modal-open {
- overflow: hidden;
-}
-.modal {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 99999;
- display: none;
- overflow: hidden;
- -webkit-overflow-scrolling: touch;
- outline: 0;
- background-color: transparent;
-}
-.modal.fade .modal-dialog {
- -webkit-transition: -webkit-transform .3s ease-out;
- -o-transition: -o-transform .3s ease-out;
- transition: transform .3s ease-out;
- -webkit-transform: translate(0, -25%);
- -ms-transform: translate(0, -25%);
- -o-transform: translate(0, -25%);
- transform: translate(0, -25%);
-}
-.modal.in .modal-dialog {
- -webkit-transform: translate(0, 0);
- -ms-transform: translate(0, 0);
- -o-transform: translate(0, 0);
- transform: translate(0, 0);
-}
-.modal-open .modal {
- overflow-x: hidden;
- overflow-y: auto;
-}
-.modal-dialog {
- position: relative;
- width: auto;
- margin: 10px;
-}
-.modal-content {
- position: relative;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #999;
- border: 1px solid rgba(0, 0, 0, .2);
- border-radius: 6px;
- outline: 0;
- -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
- box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
-}
-.modal-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 9997;
- background-color: #000;
-}
-.modal-backdrop.fade {
- filter: alpha(opacity=0);
- opacity: 0;
-}
-.modal-backdrop.in {
- filter: alpha(opacity=50);
- opacity: .5;
-}
-.modal-header {
- min-height: 16.42857143px;
- padding: 15px;
- border-bottom: 1px solid #e5e5e5;
-}
-.modal-header .close {
- margin-top: -2px;
-}
-.modal-title {
- margin: 0;
- line-height: 1.42857143;
-}
-.modal-body {
- position: relative;
- padding: 15px;
-}
-.modal-footer {
- padding: 15px;
- text-align: right;
- border-top: 1px solid #e5e5e5;
-}
-.modal-footer .btn + .btn {
- margin-bottom: 0;
- margin-left: 5px;
-}
-.modal-footer .btn-group .btn + .btn {
- margin-left: -1px;
-}
-.modal-footer .btn-block + .btn-block {
- margin-left: 0;
-}
-.modal-scrollbar-measure {
- position: absolute;
- top: -9999px;
- width: 50px;
- height: 50px;
- overflow: scroll;
-}
-@media (min-width: 768px) {
- .modal-dialog {
- width: 600px;
- margin: 30px auto;
- }
- .modal-content {
- -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
- box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
- }
- .modal-sm {
- width: 300px;
- }
-}
-@media (min-width: 992px) {
- .modal-lg {
- width: 900px;
- }
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusion/styles/workflows/workflows.css b/usecaseui-common/src/main/webapp/app/fusion/styles/workflows/workflows.css
deleted file mode 100644
index 2a740ec5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusion/styles/workflows/workflows.css
+++ /dev/null
@@ -1,31 +0,0 @@
-.scrolling-table{
- width: 1200px;
-}
-.scrolling-table .scroll-viewport {
- height: 200px !important;
- width: 99.5% !important;
- background-color:white;
-}
-
-.scrolling-table .scroll-overview{
- margin-top:-14px !important;
-}
-
-.scrolling-table .scroll-viewport:hover{
- background-color:white;
-}
-
-.scrolling-table #att-scroll-table-content{
- height:200px;
- position: absolute !important;
- width:700px;
- padding-left: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- padding-right:5px;
-}
-
-.workflow-popup-body{
- position: relative;
- padding: 30px;
-}
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js b/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js
deleted file mode 100644
index c8a363c9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-list-controller.js
+++ /dev/null
@@ -1,43 +0,0 @@
-app.controller("droolsListController", function ($scope,$http,droolsService, modalService, $modal) {
- // Table Data
- droolsService.getDrools().then(function(data){
-
- var j = data;
- $scope.tableData = JSON.parse(j.data);
- //$scope.resetMenu();
-
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
-
- $scope.viewPerPage = 20;
- $scope.scrollViewsPerPage = 2;
- $scope.currentPage = 1;
- $scope.totalPage;
- $scope.searchCategory = "";
- $scope.searchString = "";
- /* modalService.showSuccess('','Modal Sample') ; */
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- $scope.openDialog = function(droolFile){
- droolsService.setSelectedFile(droolFile);
- $modal.open({
- templateUrl: 'app/fusionapp/drools/view-models/droolsView.html',
- controller: 'droolsViewController'
-
- })
- }
-
-
-
-});
-
-function openInNewTab(url) {
- var win = window.open(url, '_blank');
- win.focus();
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js b/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js
deleted file mode 100644
index 0412718f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/drools-view-controller.js
+++ /dev/null
@@ -1,45 +0,0 @@
-app.controller('droolsViewController', function ($scope,modalService,droolsService){
-
-
- $scope.resultsString = "";
- // Table Data
- droolsService.getDroolDetails(droolsService.getSelectedFile()).then(function(data){
-
- var j = data;
- $scope.postDroolsBean = JSON.parse(j.data);
- //execute($scope.postDroolsBean);
-
- },function(error){
- console.log("failed");
- //reloadPageOnce();
- });
-
-
-
- $scope.execute = function(postDroolsBean) {
- console.log(postDroolsBean);
- var uuu = "post_drools/execute";
- var postData={postDroolsBean:postDroolsBean};
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- $scope.$apply(function(){
- $scope.resultsString=data.resultsString;
- console.log($scope.resultsString);
- });
- },
- error : function(data){
- console.log(data);
- modalService.showFailure("Fail","Error while executing: "+ data.responseText);
- }
- });
-
- };
-
-
-
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/droolsController.js b/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/droolsController.js
deleted file mode 100644
index c5c4e708..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/droolsController.js
+++ /dev/null
@@ -1,11 +0,0 @@
-app.config(function($routeProvider) {
- $routeProvider
- .when('/view', {
- templateUrl: 'app/fusionapp/drools/view-models/droolsView.html',
- controller : "droolsViewController"
- })
- .otherwise({
- templateUrl: 'app/fusionapp/drools/view-models/droolsList.html',
- controller : "droolsListController"
- });
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/controller/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/directives/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/drools/directives/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/directives/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/services/droolsService.js b/usecaseui-common/src/main/webapp/app/fusionapp/drools/services/droolsService.js
deleted file mode 100644
index 3b4ba3eb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/services/droolsService.js
+++ /dev/null
@@ -1,57 +0,0 @@
-app.factory('droolsService', function ($http, $q) {
- return {
- getDrools: function() {
- return $http.get('getDrools')
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getDroolDetails: function(selectedFile) {
- return $http.get('getDroolDetails'+'?selectedFile=' + selectedFile )
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getRole: function(roleId) {
-
- return $http.get('get_role?role_id=' + roleId)
- .then(function(response) {
- if (typeof response.data === 'object') {
- return response.data;
- } else {
- return $q.reject(response.data);
- }
-
- }, function(response) {
- // something went wrong
- return $q.reject(response.data);
- });
- },
-
- getSelectedFile: function() {
- return this.selectedFile;
- },
-
- setSelectedFile: function(_selectedFile) {
- this.selectedFile = _selectedFile;
- }
- };
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/utils/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/drools/utils/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/utils/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html b/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html
deleted file mode 100644
index 91e68a15..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsList.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<div ng-controller="droolsListController">
- <div>
- <h1 class="heading1" style="margin-top:20px;">Drools List</h1>
- <div style="margin-top:30px">
- <table att-table table-data="tableData" view-per-page="viewPerPage" current-page="currentPage" search-category="searchCategory" search-string="searchString" total-page="totalPage">
-
- <thead att-table-row type="header">
- <tr>
- <th att-table-header key="droolsFile">Drools File Name</th>
- <th att-table-header key="className">Class Name</th>
- <th att-table-header key="selectedRules">Run Rule</th>
-
- </tr>
- </thead>
- <tbody att-table-row type="body" row-repeat="rowData in tableData">
- <tr>
- <td att-table-body ng-bind="rowData['droolsFile']">{{rowData.droolsFile}}</td>
- <td att-table-body ng-bind="rowData['className']">{{rowData.className}}</td>
-
- <td att-table-body >
- <div ng-click="openDialog(rowData.droolsFile)" style="font-size:20px;"><a href="javascript:void(0)" class="icon-play"></a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <input ng-model="currentPage"></input>
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html b/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html
deleted file mode 100644
index a1d0a5ba..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsSinglePage.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta http-equiv="cache-control" content="max-age=0" />
- <meta http-equiv="cache-control" content="no-cache" />
- <meta http-equiv="expires" content="0" />
- <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
- <meta http-equiv="pragma" content="no-cache" />
- <!-- CSS -->
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/fn-ebz.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/demo.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/base.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/btn.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/dtpk.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/frms.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/sldr.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/style.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/sandbox/styles/tbs.css" >
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/portal_ebz_header.css">
- <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css">
- <!-- Basic AngularJS -->
- <script src= "app/fusion/external/ebz/angular_js/angular.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-sanitize.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-route.min.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/app.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/gestures.js"></script>
- <script src= "app/fusion/external/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script>
- <script src="app/fusion/external/angular-ui/ui-bootstrap-tpls-1.1.2.min.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/angular-cookies.js"></script>
- <!-- jQuery -->
- <script src="static/js/jquery-1.10.2.js"></script>
- <script src="static/js/jquery.mask.min.js" type="text/javascript"></script>
- <script src="static/js/jquery-ui.js" type="text/javascript"></script>
- <!-- AngularJS Gridster -->
- <script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script>
- <script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script>
- <!-- AngularJS Config -->
- <script src= "app/fusion/external/ebz/angular_js/app.js"></script>
- <script src= "app/fusion/external/ebz/angular_js/checklist-model.js"></script>
- <!-- Utility -->
- <script src="app/fusion/scripts/modalService.js"></script>
- <!-- Controller js -->
- <script src="app/fusion/scripts/controllers/rolefunctionpopupController.js"></script>
- <script src="app/fusion/scripts/controllers/modelpopupController.js"></script>
- <script src="app/fusionapp/drools/controller/droolsController.js"></script>
- <script src="app/fusionapp/drools/controller/drools-list-controller.js"></script>
- <script src="app/fusionapp/drools/controller/drools-view-controller.js"></script>
- <!-- Header and Footer -->
- <script src="app/fusion/external/ebz/js/attHeaderSnippet.js"></script>
- <script src="app/fusion/external/ebz/js/attHeader.js"></script>
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/header.css">
- <link rel="stylesheet" type="text/css" href="app/fusion/external/ebz/ebz_header/footer.css" >
- <script src="app/fusion/scripts/directives/footer.js"></script>
- <script src="app/fusion/external/ebz/js/footer.js"></script>
- <script src="app/fusion/scripts/directives/header.js"></script>
- <script src="app/fusion/scripts/directives/leftMenu.js"></script>
- <script src="app/fusion/scripts/services/leftMenuService.js"></script>
-
- <!-- Services -->
- <script src="app/fusionapp/drools/services/droolsService.js"></script>
- <script src="app/fusion/scripts/services/userInfoService.js"></script>
- </head>
- <body class="appBody" ng-app="abs">
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal_rolefunction.html'"></div>
- <div ng-include src="'app/fusion/scripts/view-models/profile-page/popup_modal.html'"></div>
- <div q-header></div>
- <div q-menu class="appLeftMenu"></div>
- <div id="rightContentAdmin" ng-view style="min-height: 450px;margin-top:-50px;margin-left:210px;margin-right:10px;"></div>
- <div q-footer class="appFooter"></div>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html b/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html
deleted file mode 100644
index bcc80b73..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/droolsView.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<div ng-controller="droolsViewController" class="modal__informative font-showcase">
-
-<h1 class="heading1" style="margin-top:20px;">Drools Rule Engine</h1>
- <br>
- Please enter below details:<br/>
-
- <div class="fn-ebz-container">
- Drools File:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postDroolsBean.droolsFile" value="" size="25">
- </div>
-
- <div class="fn-ebz-container">
- Class Name:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postDroolsBean.className" value="" size="25">
- </div>
-
- <div class="fn-ebz-container">
- Selected Rules:<br/>
- <input class="fn-ebz-text" type="text" ng-model="postDroolsBean.selectedRules" value="" size="25">
- </div>
-
-
- <div>
- <input att-button btn-type="primary" size="small" class="button" type="submit" value="Execute Rules" ng-click="execute(postDroolsBean);" />
- </div>
- <br>
- {{resultsString}}
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
- <br>
-
-
-
-
-</div>
-
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/drools/view-models/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/external/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/external/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/external/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/fonts/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/fonts/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/fonts/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-icon.png
deleted file mode 100644
index 52ab2b54..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-text.png
deleted file mode 100644
index 9b3c3325..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7450-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-icon.png
deleted file mode 100644
index 9ee5499a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-text.png
deleted file mode 100644
index aeb2dd00..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/7750-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-icon.png
deleted file mode 100644
index 0ba5c523..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-text.png
deleted file mode 100644
index 46631163..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/apn-dns-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-text.png
deleted file mode 100644
index 1566d5be..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atcf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-text.png
deleted file mode 100644
index f7c50c60..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/atgw-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-text.png
deleted file mode 100644
index b1e0869e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/bgcf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/com-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/com-icon.png
deleted file mode 100644
index 59463a91..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/com-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-icon.png
deleted file mode 100644
index 9176a0d2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-text.png
deleted file mode 100644
index 5b35e77d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/cpm-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/default-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/default-icon.png
deleted file mode 100644
index 296a6f5c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/default-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-icon.png
deleted file mode 100644
index 74bfcfce..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-text.png
deleted file mode 100644
index 00f2a2e4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-epc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-icon.png
deleted file mode 100644
index 74bfcfce..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-text.png
deleted file mode 100644
index 1d54d9aa..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dra-ims-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-icon.png
deleted file mode 100644
index b2a0585a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-text.png
deleted file mode 100644
index 1452d2e6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/dslam-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-icon.png
deleted file mode 100644
index 59463a91..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-text.png
deleted file mode 100644
index ba9b216d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/eatf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-icon.png
deleted file mode 100644
index dafbe9e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-text.png
deleted file mode 100644
index ca98a51d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ecscf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/emsc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/emsc-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/emsc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-icon.png
deleted file mode 100644
index e03be510..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-text.png
deleted file mode 100644
index 9fbf8c29..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enb-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-icon.png
deleted file mode 100644
index daee75ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-text.png
deleted file mode 100644
index f04e3d5c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/enum-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-text.png
deleted file mode 100644
index 0a29e736..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/esmlc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-icon.png
deleted file mode 100644
index 6f15bdbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-text.png
deleted file mode 100644
index 6f15bdbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ettcs-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-text.png
deleted file mode 100644
index 43cf74d9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/gmlc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-icon.png
deleted file mode 100644
index daee75ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-text.png
deleted file mode 100644
index b2762502..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hlr-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-icon.png
deleted file mode 100644
index daee75ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-text.png
deleted file mode 100644
index 9739214f..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-epc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-icon.png
deleted file mode 100644
index daee75ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-text.png
deleted file mode 100644
index ec69f259..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/hss-ims-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-icon.png
deleted file mode 100644
index dafbe9e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-text.png
deleted file mode 100644
index 6dbfc819..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/icscf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-icon.png
deleted file mode 100644
index 6f15bdbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-text.png
deleted file mode 100644
index 6f15bdbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ipag-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-icon.png
deleted file mode 100644
index dafbe9e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-text.png
deleted file mode 100644
index a842e9ff..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/isbc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-icon.png
deleted file mode 100644
index a82e73c1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-text.png
deleted file mode 100644
index 4d0092eb..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/iwf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/logo_onap_transbg.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/logo_onap_transbg.png
deleted file mode 100644
index 8d601009..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/logo_onap_transbg.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-icon.png
deleted file mode 100644
index 82b5c473..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-text.png
deleted file mode 100644
index 14daba85..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrf-rdf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrg-rdf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrg-rdf-text.png
deleted file mode 100644
index 3f7e2245..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/lrg-rdf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-text.png
deleted file mode 100644
index 2ba933a7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgc8-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-text.png
deleted file mode 100644
index 74bf8f2c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgcf-emsc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-text.png
deleted file mode 100644
index a2470f5d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mgw-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-icon.png
deleted file mode 100644
index daee75ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-text.png
deleted file mode 100644
index 84f9d86d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mind-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-icon.png
deleted file mode 100644
index 58ab86c5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-text.png
deleted file mode 100644
index e524f192..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mme-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-icon.png
deleted file mode 100644
index 59463a91..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-text.png
deleted file mode 100644
index fa9a61cc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/mrf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/msc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/msc-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/msc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-icon.png
deleted file mode 100644
index 8386fcb4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-text.png
deleted file mode 100644
index 954982f1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/msn-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/multi-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/multi-icon.png
deleted file mode 100644
index 296a6f5c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/multi-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-icon.png
deleted file mode 100644
index 1ed07db4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-text.png
deleted file mode 100644
index 9b3c3325..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7450-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-icon.png
deleted file mode 100644
index 79ba2fc2..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-text.png
deleted file mode 100644
index afad34de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750a-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-icon.png
deleted file mode 100644
index bfce0b12..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-text.png
deleted file mode 100644
index afad34de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750b-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-icon.png
deleted file mode 100644
index 47870bc5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-text.png
deleted file mode 100644
index afad34de..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750c-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-icon.png
deleted file mode 100644
index f407a0f6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-text.png
deleted file mode 100644
index 6e25a269..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/n7750d-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-icon.png
deleted file mode 100644
index e03be510..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-text.png
deleted file mode 100644
index bbc1357b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/nb-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-icon.png
deleted file mode 100644
index 74bfcfce..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-text.png
deleted file mode 100644
index 48b1e273..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pas-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-icon.png
deleted file mode 100644
index 17ed4a4a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-text.png
deleted file mode 100644
index 23faa7d7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcef-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-icon.png
deleted file mode 100644
index 17ed4a4a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-text.png
deleted file mode 100644
index e48c305e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcrf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-icon.png
deleted file mode 100644
index dafbe9e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-text.png
deleted file mode 100644
index b8d2c3dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pcscf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-text.png
deleted file mode 100644
index d5f86b59..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pgw-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-icon.png
deleted file mode 100644
index 82b5c473..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-text.png
deleted file mode 100644
index 72662ef4..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/plrf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/psap-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/psap-icon.png
deleted file mode 100644
index 2145c5f6..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/psap-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-icon.png
deleted file mode 100644
index 6f15bdbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-text.png
deleted file mode 100644
index 6f15bdbf..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/pstn-tdm-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-text.png
deleted file mode 100644
index ab93224c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rg-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-icon.png
deleted file mode 100644
index 733d3da5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-text.png
deleted file mode 100644
index 24cab754..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/rnc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-icon.png
deleted file mode 100644
index dafbe9e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-text.png
deleted file mode 100644
index f71bfba5..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sbc-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-icon.png
deleted file mode 100644
index 59463a91..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-text.png
deleted file mode 100644
index 1ca4e1dc..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sccas-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-icon.png
deleted file mode 100644
index dafbe9e0..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-text.png
deleted file mode 100644
index fd3cab53..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/scscf-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-icon.png
deleted file mode 100644
index b4c0288b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-text.png
deleted file mode 100644
index 3881e662..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sdg-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-icon.png
deleted file mode 100644
index 8df1aac1..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-text.png
deleted file mode 100644
index 92cbd290..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgsns4-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-icon.png
deleted file mode 100644
index 2904d277..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-text.png
deleted file mode 100644
index 0801d797..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/sgw-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-icon.png
deleted file mode 100644
index b2a0585a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-text.png
deleted file mode 100644
index 323c125e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/siad-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-icon.png
deleted file mode 100644
index 319bb37c..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-text.png
deleted file mode 100644
index 1ba8a76d..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7-gport-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-icon.png
deleted file mode 100644
index daee75ac..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-text.png
deleted file mode 100644
index 8656f9f8..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ss7gport-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/switch-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/switch-icon.png
deleted file mode 100644
index 6e512719..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/switch-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-icon.png
deleted file mode 100644
index 59463a91..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-text.png
deleted file mode 100644
index 7a843e8b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/tas-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-icon.png
deleted file mode 100644
index b2a0585a..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-text.png
deleted file mode 100644
index 975dd30b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/transcoder-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ue-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/ue-icon.png
deleted file mode 100644
index e23dfd36..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/ue-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/uephone-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/uephone-icon.png
deleted file mode 100644
index 50182db9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/uephone-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-icon.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-icon.png
deleted file mode 100644
index 0ba5c523..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-icon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-text.png b/usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-text.png
deleted file mode 100644
index 46de0c26..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/icons/usp-dns-text.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/images/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/images/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/images/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js
deleted file mode 100644
index ad4f777e..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-controller.js
+++ /dev/null
@@ -1,61 +0,0 @@
-app.controller('samplePageController', function($scope, $http,ProfileService,modalService){
- $scope.tableData=[];
- $scope.viewPerPage=20;
- $scope.scrollViewPerPage=2;
- $scope.currentPage=1;
- $scope.totalPage;
- $scope.searchCategory;
- $scope.searchString="";
- $scope.currentPageNum=1;
- ProfileService.getProfilePagination(1,$scope.viewPerPage).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.tableData =JSON.parse($scope.data.profileList);
- $scope.totalPages =JSON.parse($scope.data.totalPage);
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- //$scope.resetMenu();
- },function(error){
- console.log("failed");
- reloadPageOnce();
- });
-
- $scope.$watch('currentPageNum', function(val) {
-
- ProfileService.getProfilePagination(val,$scope.viewPerPage).then(function(data){
- var j = data;
- $scope.data = JSON.parse(j.data);
- $scope.tableData =JSON.parse($scope.data.profileList);
- $scope.totalPages =JSON.parse($scope.data.totalPage);
- for(x in $scope.tableData){
- if($scope.tableData[x].active_yn=='Y')
- $scope.tableData[x].active_yn=true;
- else
- $scope.tableData[x].active_yn=false;
- }
- //$scope.resetMenu();
- },function(error){
- console.log("failed");
- });
-
- });
-
- $scope.editRow = function(profileId){
- window.location = 'userProfile#/profile/' + profileId;
- }
-
- $scope.toggleProfileActive = function(rowData) {
- modalService.popupConfirmWinWithCancel("Confirm","You are about to change user's active status. Do you want to continue?",
- function(){
- $http.get("profile/toggleProfileActive?profile_id="+rowData.id).success(function(){});
- },
- function(){
- rowData.active=!rowData.active;
- })
- };
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js
deleted file mode 100644
index 8ba4eb54..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sample-page-iframe-controller.js
+++ /dev/null
@@ -1,4 +0,0 @@
-app.controller('samplePageWithIframeController', function($scope, $http,ProfileService,modalService){
-
-
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js
deleted file mode 100644
index 518880c7..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/controller/sampleController.js
+++ /dev/null
@@ -1,11 +0,0 @@
-app.config(function($routeProvider) {
- $routeProvider
- .when('/iframe', {
- templateUrl: 'app/fusionapp/scripts/view-models/sampleWithIframe.html',
- controller : "samplePageWithIframeController"
- })
- .otherwise({
- templateUrl: 'app/fusionapp/scripts/view-models/sample.html',
- controller : "samplePageController"
- });
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/directives/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/utils/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html b/usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html
deleted file mode 100644
index dafdc6a9..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/scripts/view-models/sampleWithIframe.html
+++ /dev/null
@@ -1,3 +0,0 @@
-<div ng-controller="samplePageWithIframeController" style="margin-left: auto;margin-right: auto;height:700px;">
- <iframe style="margin-top:5px;width:100%;height:100%" frameBorder="0" vspace="0" src="user_profile"></iframe>
-</div> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/app/fusionapp/styles/dummy.txt b/usecaseui-common/src/main/webapp/app/fusionapp/styles/dummy.txt
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/app/fusionapp/styles/dummy.txt
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/sandbox-gridster.css b/usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/sandbox-gridster.css
deleted file mode 100644
index a9edba8f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/sandbox-gridster.css
+++ /dev/null
@@ -1,173 +0,0 @@
-.gridster {
- position: relative;
- margin: auto;
- /* height: 0
- */}
-
-.gridster>ul {
- margin: 0;
- list-style: none;
- padding: 0
-}
-
-.gridster-item {
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- list-style: none;
- z-index: 2;
- position: absolute;
- display: none
-}
-
-.gridster-loaded {
- -webkit-transition: height .3s;
- -moz-transition: height .3s;
- -o-transition: height .3s;
- transition: height .3s
-}
-
-.gridster-loaded .gridster-item {
- display: block;
- position: absolute;
- -webkit-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -moz-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -o-transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- transition: opacity .3s, left .3s, top .3s, width .3s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms
-}
-
-.gridster-loaded .gridster-preview-holder {
- display: none;
- z-index: 1;
- position: absolute;
- background-color: #067ab4;
- /*
- background-color: rgb(6, 122, 180);
- -ms-filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#067ab4', endColorstr='#067ab4'); IE
- opacity: 0.2;
- */
- border-color: #fff;
- -webkit-transition: width .2s, height .3s;
- -moz-transition: width .2s, height .3s;
- -o-transition: width .2s, height .3s;
- transition: width .2s, height .3s;
- -webkit-transition-delay: 50ms;
- -moz-transition-delay: 50ms;
- -o-transition-delay: 50ms;
- transition-delay: 50ms
-}
-
-.gridster-loaded .gridster-item.gridster-item-moving {
- -webkit-transition: none;
- -moz-transition: none;
- -o-transition: none;
- transition: none;
- opacity: 0.9;
-}
-
-.gridster-mobile {
- height: auto !important
-}
-
-.gridster-mobile .gridster-item {
- height: auto;
- position: static;
- float: none
-}
-
-.gridster-item.ng-leave.ng-leave-active {
- opacity: 0
-}
-
-.gridster-item.ng-enter {
- opacity: 1
-}
-
-.gridster-item-moving {
- z-index: 3
-}
-
-.gridster-item-resizable-handler {
- position: absolute;
- font-size: 1px;
- display: block
-}
-
-.handle-se {
- cursor: se-resize;
- width: 0;
- height: 0;
- right: 1px;
- bottom: 1px;
- border-style: solid;
- border-width: 0 0 12px 12px;
- border-color: transparent
-}
-
-.handle-ne {
- cursor: ne-resize;
- width: 12px;
- height: 12px;
- right: 1px;
- top: 1px
-}
-
-.handle-nw {
- cursor: nw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- top: 1px
-}
-
-.handle-sw {
- cursor: sw-resize;
- width: 12px;
- height: 12px;
- left: 1px;
- bottom: 1px
-}
-
-.handle-e {
- cursor: e-resize;
- width: 12px;
- bottom: 0;
- right: 1px;
- top: 0
-}
-
-.handle-s {
- cursor: s-resize;
- height: 12px;
- right: 0;
- bottom: 1px;
- left: 0
-}
-
-.handle-n {
- cursor: n-resize;
- height: 12px;
- right: 0;
- top: 1px;
- left: 0
-}
-
-.handle-w {
- cursor: w-resize;
- width: 12px;
- left: 1px;
- top: 0;
- bottom: 0
-}
-
-.gridster .gridster-item:hover .gridster-box {
- border: 1.5px solid #B3B2B3
-}
-
-.gridster .gridster-item:hover .handle-se {
- border-color: transparent transparent #ccc
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/ui-gridster.css b/usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/ui-gridster.css
deleted file mode 100644
index 827e354e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/css/att_angular_gridster/ui-gridster.css
+++ /dev/null
@@ -1,116 +0,0 @@
-/* ui-gridster.css */
-.gridster-container {
- background-color: #EFEFEF;
- color: #fff;
- border: 1px dashed;
- overflow-y: auto;
- overflow-x: hidden; }
-
-/* app css for attGridtser */
-.gridster-item-container {
- background-color: #FFFFFF;
- position: relative;
- margin-left: auto;
- margin-right: auto;
- min-height: 79px;
- height: 100%; }
- .gridster-item-container .gridster-item-header {
- /* gridster-item Header */
- position: relative;
- height: 50px !important;
- border: 1px solid #d3d3d3;
- border-bottom: 0;
- background-color: #E5E5E5;
- white-space: nowrap;
- text-overflow: ellipsis;
- z-index: 1;
- -webkit-border-radius: 2px 2px 0 0;
- -moz-border-radius: 2px 2px 0 0;
- -ms-border-radius: 2px 2px 0 0;
- -o-border-radius: 2px 2px 0 0;
- border-radius: 2px 2px 0 0;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- overflow: hidden;
- /* IE6-8 */ }
- .gridster-item-container .gridster-item-header .gridster-item-handle {
- cursor: move;
- margin: 12px;
- position: absolute;
- top: 0;
- left: 0;
- border: 0;
- vertical-align: middle;
- -ms-interpolation-mode: bicubic;
- display: block; }
- .gridster-item-container .gridster-item-header .gridster-item-header-content {
- line-height: 44px;
- margin-left: 26px;
- font-family: clearviewatt;
- font-size: 18px;
- color: #444444;
- float: left; }
- .gridster-item-container .gridster-item-header .gridster-item-sub-header-content {
- position: absolute;
- top: 29.5px;
- left: 26px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #444444; }
- .gridster-item-container .gridster-item-header .gridster-item-header-buttons-container {
- position: absolute;
- right: 10px;
- top: 10px;
- overflow: hidden;
- text-align: right;
- height: 30px;
- color: #444444; }
- .gridster-item-container .gridster-item-body {
- /* gridster-item Body */
- position: absolute;
- width: 100%;
- top: 50px;
- left: 0;
- right: 0;
- bottom: 29px;
- border: 1px solid #d3d3d3;
- box-sizing: border-box;
- overflow: auto;
- color: #444444;
- /* text-align: center; */ }
- .gridster-item-container .gridster-item-footer {
- /* gridster-item Footer */
- position: absolute;
- bottom: 0;
- width: 100%;
- height: 29px !important;
- text-align: left;
- cursor: pointer;
- border: 1px solid #d3d3d3;
- border-top: 0;
- background-color: #F2F2F2;
- -webkit-border-radius: 0 0 2px 2px;
- -moz-border-radius: 0 0 2px 2px;
- -ms-border-radius: 0 0 2px 2px;
- -o-border-radius: 0 0 2px 2px;
- border-radius: 0 0 2px 2px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- text-decoration: none;
- /* IE6-8 */ }
- .gridster-item-container .gridster-item-footer:hover {
- background-color: #E5E5E5;
- color: #565656;
- text-decoration: underline; }
- .gridster-item-container .gridster-item-footer .gridster-item-footer-content {
- line-height: 30px;
- font-family: clearviewatt;
- font-size: 12px;
- color: #565656;
- margin: 20px;
- text-decoration: none; }
- .gridster-item-container .gridster-item-footer .gridster-item-footer-content:hover {
- color: #199ddf;
- text-decoration: underline; }
diff --git a/usecaseui-common/src/main/webapp/static/fusion/css/fusion-sunny.css b/usecaseui-common/src/main/webapp/static/fusion/css/fusion-sunny.css
deleted file mode 100644
index f9154a1c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/css/fusion-sunny.css
+++ /dev/null
@@ -1,362 +0,0 @@
- input, textarea, select, div {
- font-family: Arial;
- font-size: 11px;
- font-weight: normal;
- }
-
- form {
- margin-top: 5px;
- }
-
-
- .applicationWindow { border-width: 0px 0px 1px 0px;
- border-style: solid;
- border-color: #959595;
- box-shadow: inset 0 0 10px #000000;
- margin-top: 10px;
- margin-bottom: 10px;
- margin-left: 10px;
- margin-right: 10px;
- }
-
- .feedbackMessage { width: 99%;
- font-family: Arial;
- font-size: 11px;
- color: #1f1f1f;
- padding: 3px;
- border: 1px #eeb420 solid;
- margin: 3px;
- background: #fff9e5;
- }
-
- .menubar {
- border-width: 0px 0px 0px 1px; border-style: solid; border-color: #959595;
- }
-
- .footer {
- /*clear: both;*/
- border-width: 0px 1px 0px 1px; border-style: solid; border-color: #959595;
- font-family: Verdana,Arial,Helvetica, sans-serif;
- font-size: 9px;
- padding: 10px 10px 30px 10px;
- background: white;
- }
-
- .pageTitle {
- font-family: Arial;
- font-size: 18px;
- font-weight: bold;
- margin-top: 5px;
- }
-
- .content {
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- border-color: #959595;
- font-family: Arial;
- font-size: 11px;
- padding: 5px;
- background: white;
- /*height: 600px;*/
- }
-
- .popupContent {
- font-family: Arial;
- font-size: 11px;
- padding: 3px;
- }
-
- .logo {
- border-width: 0px 1px 0px 1px;
- border-style: solid;
- border-color: #959595;
- text-align: right;
- }
-
- .sep {
- border: 1px solid black
- }
-
- .logo { /*position: relative;*/
- float:left;
- padding-top: 25px;
- padding-left: 25px;
- }
-
- .applicationLogo { float:right;
- padding-top: 25px;
- padding-right: 25px;
- }
-
- .applinkWhite { font-family: Arial;
- font-size: 13px;
- font-weight: 900;
- color: #FFFFFF;
- text-decoration: none; }
-
- .terms { font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 9px;
- }
-
- .broadcastMessage { color: red; }
- .broadcastMessageList { color: red; }
-
- .button {
- margin: 5px 1px 5px 1px;
- padding: 3px; }
-
- .toolbarbutton:hover {
- color:#005491;
- }
-
- .headerText { font-family: Arial;
- font-size: 15px;
- font-weight: 700;
- color: #000000; }
-
- .headerBackground { background: #336699; }
-
- .errorMessageText { font-family: Arial;
- font-size: 11px;
- font-weight: bold;
- color: red; }
-
-
- .normalText { font-family: Arial;
- font-size: 11px;
- color: #000000; }
-
- .normalTextRed { font-family: Arial;
- font-size: 11px;
- color: red; }
-
-
- .smallNormalText { font-family: Arial;
- font-size: 9px;
- color: #000000; }
-
- .tableBorder { border:1px outset teal }
-
- .validationError { background: #b9eaff; }
-
- .templatebody {
- background: url(../images/body_graphic.jpg) repeat-x;
- /*margin: 40px 80px 40px 80px;*/
- }
-
- /*--------------------- General Content ------------------------------------*/
-
- .relative {
- position:relative;
- }
-
- .clear{
- clear:both;
- }
-
- .left {
- float: left;
- }
-
- .leftCentered{
- float: left;
- text-align: center;
- }
-
- .right {
- float: right;
- }
-
- .rightAligned{
- text-align: right;
- }
-
- .centered {
- text-align: center;
- align: center;
- }
-
-
- .noWrap{
- white-space:nowrap;
- }
-
- .disabled {
- color:gray;
- cursor:hand;
- }
-
- /*--------------------- Tab styles -------------------------------------*/
-
- .current {
- font-weight: bold;
- border-width: 1px 1px 1px 1px;
- border-color: silver;
- border-style: solid;
- }
-
- .subTab {
- font-weight:bold;
- font-family: Arial;
- font-size: 11px;
- color: #0F3B82;
- }
-
-
- /*--------------------- Grid styles ------------------------------------*/
-
- /* Grid navigation and header styles */
- .gridFilterLabel {font-size: 7pt;
- font-align: justify;
- font-weight: bold;
- display: block;}
-
- .gridFilterText {height: 17px;
- font-size: 8pt;
- width: 60%;
- font-align: justify;}
-
- .gridNavigationBar { font-family:Arial,Verdana;
- font-size:11px;
- font-weight:normal;
- color:#000;
- margin: 0px;
- width: 100%;
- vertical-align: middle;
- }
-
- .gridNavigationBar .navLinks { float: left;
- margin-right:15px;
- padding-top: 2px;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageControls { float: left;
- margin-right: 15px;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageControls input { font-size: 8pt;
- height: 17px;
- vertical-align: middle;
- }
-
- .gridNavigationBar .pageInfo { float: right;
- vertical-align: middle;
- height: 19px;
- line-height: 19px;
- }
-
- .gridNavigationBar .pageInfo input { font-size: 8pt;
- height: 17px;
- vertical-align: middle;
- }
-
-
- .gridNavigationBar span { padding: 3px; }
-
- .gridNavigationBar a {
- text-decoration:underline;
- color:#000;
- font-weight:normal;
- }
-
- .gridNavigationBar img { vertical-align: middle; }
-
- .gridBulkUpdateRow {
- height: 35px;
- line-height: 35px;
- }
-
- .gridBulkUpdateRow input {
- vertical-align: middle;
- }
-
-
- /* dummy class used to lock the form elements of a grid - ex. bulk transaction processing */
- .alwaysEnabled {}
-
- .hidden {
- display: none;
- }
-
- .selectedPage {
- background-color:#C4DFFB;
- color: white;
- border-style: solid;
- border-width: 1px;
- border-color: gray;
- padding-left: 3px;
- padding-right: 3px;
- vertical-align: middle;
- }
-
- .selectedRow{
- /*background-color:#C4DFFB;*/
- }
-
- /* Action Item styles */
- .actionList {
- margin-left: -20px;
- margin-right: -10px;
- padding-left: 5px;
- }
-
- .actionList li {
- float:left;
- padding-left: 3px;
- padding-right: 3px;
- }
-
- .actionList li a {
- text-decoration:none;
- color:#000;
- }
-
- /* Filter Operator List styles */
-
- .filterList {
- margin: 0px;
- }
-
- .filterList li {
- list-style-type: none;
- padding:3px 3px 3px 2px;
- cursor:hand;
- font-size:11px;
- }
-
- .filterList li:hover {
- background: #404040;
- }
-
- .filterList li a {
- color: #000;
- text-decoration: none;
- }
-
- .filterList li:hover a {
- color: white;
- }
-
- .filterList li a:hover {
- text-decoration: none;
- color: white;
- }
-
- .filterListItem a {
- text-decoration:none;
- padding:3px 2px 3px 2px;
- }
-
-
- /*---------------------- Customized ZK Styles ------------------------------*/
-
- .z-datebox input, .z-timebox input {
- font-family: Arial;
- font-size: 11px;
- height: 15px;
- margin-top:1px;
- }
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/css/nv.d3.css b/usecaseui-common/src/main/webapp/static/fusion/d3/css/nv.d3.css
deleted file mode 100644
index 28ccd053..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/css/nv.d3.css
+++ /dev/null
@@ -1,656 +0,0 @@
-
-/********************
- * HTML CSS
- */
-
-
-.chartWrap {
- margin: 0;
- padding: 0;
- overflow: hidden;
-}
-
-
-/********************
- * TOOLTIP CSS
- */
-
-.nvtooltip {
- position: absolute;
- background-color: rgba(255,255,255,1);
- padding: 10px;
- border: 1px solid #ddd;
- z-index: 10000;
-
- font-family: Arial;
- font-size: 13px;
-
- transition: opacity 500ms linear;
- -moz-transition: opacity 500ms linear;
- -webkit-transition: opacity 500ms linear;
-
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
-
- -moz-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- -webkit-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- box-shadow: 4px 4px 8px rgba(0,0,0,.5);
-
- -moz-border-radius: 10px;
- border-radius: 10px;
-
- pointer-events: none;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.nvtooltip h3 {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip p {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip span {
- display: inline-block;
- margin: 2px 0;
-}
-
-.nvtooltip-pending-removal {
- position: absolute;
- pointer-events: none;
-}
-
-
-/********************
- * SVG CSS
- */
-
-
-svg {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* Trying to get SVG to act like a greedy block in all browsers */
- display: block;
- width:100%;
- height:100%;
-}
-
-
-svg text {
- font: normal 12px Arial;
-}
-
-svg .title {
- font: bold 14px Arial;
-}
-
-.nvd3 .nv-background {
- fill: white;
- fill-opacity: 0;
- /*
- pointer-events: none;
- */
-}
-
-.nvd3.nv-noData {
- font-size: 18px;
- font-weight: bolf;
-}
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .extent {
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-
-
-/**********
-* Legend
-*/
-
-.nvd3 .nv-legend .nv-series {
- cursor: pointer;
-}
-
-.nvd3 .nv-legend .disabled circle {
- fill-opacity: 0;
-}
-
-
-
-/**********
-* Axes
-*/
-
-.nvd3 .nv-axis path {
- fill: none;
- stroke: #000;
- stroke-opacity: .75;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis path.domain {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis.nv-x path.domain {
- stroke-opacity: 0;
-}
-
-.nvd3 .nv-axis line {
- fill: none;
- stroke: #000;
- stroke-opacity: .25;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis line.zero {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis .nv-axisMaxMin text {
- font-weight: bold;
-}
-
-.nvd3 .x .nv-axis .nv-axisMaxMin text,
-.nvd3 .x2 .nv-axis .nv-axisMaxMin text,
-.nvd3 .x3 .nv-axis .nv-axisMaxMin text {
- text-anchor: middle
-}
-
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .resize path {
- fill: #eee;
- stroke: #666;
-}
-
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-bars .negative rect {
- zfill: brown;
-}
-
-.nvd3 .nv-bars rect {
- zfill: steelblue;
- fill-opacity: .75;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-bars rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-bars .hover rect {
- fill: lightblue;
-}
-
-.nvd3 .nv-bars text {
- fill: rgba(0,0,0,0);
-}
-
-.nvd3 .nv-bars .hover text {
- fill: rgba(0,0,0,1);
-}
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-multibar .nv-groups rect,
-.nvd3 .nv-multibarHorizontal .nv-groups rect,
-.nvd3 .nv-discretebar .nv-groups rect {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-multibar .nv-groups rect:hover,
-.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,
-.nvd3 .nv-discretebar .nv-groups rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-discretebar .nv-groups text,
-.nvd3 .nv-multibarHorizontal .nv-groups text {
- font-weight: bold;
- fill: rgba(0,0,0,1);
- stroke: rgba(0,0,0,0);
-}
-
-/***********
-* Pie Chart
-*/
-
-.nvd3.nv-pie path {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
-
-}
-
-.nvd3.nv-pie .nv-slice text {
- stroke: #000;
- stroke-width: 0;
-}
-
-.nvd3.nv-pie path {
- stroke: #fff;
- stroke-width: 1px;
- stroke-opacity: 1;
-}
-
-.nvd3.nv-pie .hover path {
- fill-opacity: .7;
-/*
- stroke-width: 6px;
- stroke-opacity: 1;
-*/
-}
-
-.nvd3.nv-pie .nv-label rect {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-/**********
-* Lines
-*/
-
-.nvd3 .nv-groups path.nv-line {
- fill: none;
- stroke-width: 2.5px;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-groups path.nv-area {
- stroke: none;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- stroke-width: 2.5px;
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-line.hover path {
- stroke-width: 6px;
-}
-
-/*
-.nvd3.scatter .groups .point {
- fill-opacity: 0.1;
- stroke-opacity: 0.1;
-}
- */
-
-.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-groups .nv-point {
- transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
-}
-
-.nvd3.nv-scatter .nv-groups .nv-point.hover,
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-point-paths path {
- stroke: #aaa;
- stroke-opacity: 0;
- fill: #eee;
- fill-opacity: 0;
-}
-
-
-
-.nvd3 .nv-indexLine {
- cursor: ew-resize;
-}
-
-
-/**********
-* Distribution
-*/
-
-.nvd3 .nv-distribution {
- pointer-events: none;
-}
-
-
-
-/**********
-* Scatter
-*/
-
-/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere
-.nvd3 .nv-groups .nv-point {
- pointer-events: none;
-}
-*/
-
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .5;
-}
-
-.nvd3 .nv-scatter .nv-point.hover {
- fill-opacity: 1;
-}
-
-/*
-.nv-group.hover .nv-point {
- fill-opacity: 1;
-}
-*/
-
-
-/**********
-* Stacked Area
-*/
-
-.nvd3.nv-stackedarea path.nv-area {
- fill-opacity: .7;
- /*
- stroke-opacity: .65;
- fill-opacity: 1;
- */
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
-
- /*
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
- */
-
-}
-
-.nvd3.nv-stackedarea path.nv-area.hover {
- fill-opacity: .9;
- /*
- stroke-opacity: .85;
- */
-}
-/*
-.d3stackedarea .groups path {
- stroke-opacity: 0;
-}
- */
-
-
-
-.nvd3.nv-stackedarea .nv-groups .nv-point {
- stroke-opacity: 0;
- fill-opacity: 0;
-}
-
-.nvd3.nv-stackedarea .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .75;
- fill-opacity: 1;
-}
-
-
-
-/**********
-* Line Plus Bar
-*/
-
-.nvd3.nv-linePlusBar .nv-bar rect {
- fill-opacity: .75;
-}
-
-.nvd3.nv-linePlusBar .nv-bar rect:hover {
- fill-opacity: 1;
-}
-
-
-/**********
-* Bullet
-*/
-
-.nvd3.nv-bullet { font: 10px sans-serif; }
-.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
-.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
-.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
-.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; }
-.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
-.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
-.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
-.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
-.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
-.nvd3.nv-bullet .nv-subtitle { fill: #999; }
-
-
-.nvd3.nv-bullet .nv-range {
- fill: #999;
- fill-opacity: .4;
-}
-.nvd3.nv-bullet .nv-range:hover {
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Sparkline
-*/
-
-.nvd3.nv-sparkline path {
- fill: none;
-}
-
-.nvd3.nv-sparklineplus g.nv-hoverValue {
- pointer-events: none;
-}
-
-.nvd3.nv-sparklineplus .nv-hoverValue line {
- stroke: #333;
- stroke-width: 1.5px;
- }
-
-.nvd3.nv-sparklineplus,
-.nvd3.nv-sparklineplus g {
- pointer-events: all;
-}
-
-.nvd3 .nv-hoverArea {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-sparklineplus .nv-xValue,
-.nvd3.nv-sparklineplus .nv-yValue {
- /*
- stroke: #666;
- */
- stroke-width: 0;
- font-size: .9em;
- font-weight: normal;
-}
-
-.nvd3.nv-sparklineplus .nv-yValue {
- stroke: #f66;
-}
-
-.nvd3.nv-sparklineplus .nv-maxValue {
- stroke: #2ca02c;
- fill: #2ca02c;
-}
-
-.nvd3.nv-sparklineplus .nv-minValue {
- stroke: #d62728;
- fill: #d62728;
-}
-
-.nvd3.nv-sparklineplus .nv-currentValue {
- /*
- stroke: #444;
- fill: #000;
- */
- font-weight: bold;
- font-size: 1.1em;
-}
-
-/**********
-* historical stock
-*/
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick {
- stroke-width: 2px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover {
- stroke-width: 4px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive {
- stroke: #2ca02c;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative {
- stroke: #d62728;
-}
-
-.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel {
- font-weight: bold;
-}
-
-.nvd3.nv-historicalStockChart .nv-dragTarget {
- fill-opacity: 0;
- stroke: none;
- cursor: move;
-}
-
-.nvd3 .nv-brush .extent {
- /*
- cursor: ew-resize !important;
- */
- fill-opacity: 0 !important;
-}
-
-.nvd3 .nv-brushBackground rect {
- stroke: #000;
- stroke-width: .4;
- fill: #fff;
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Indented Tree
-*/
-
-
-/**
- * TODO: the following 3 selectors are based on classes used in the example. I should either make them standard and leave them here, or move to a CSS file not included in the library
- */
-.nvd3.nv-indentedtree .name {
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .clickable {
- color: #08C;
- cursor: pointer;
-}
-
-.nvd3.nv-indentedtree span.clickable:hover {
- color: #005580;
- text-decoration: underline;
-}
-
-
-.nvd3.nv-indentedtree .nv-childrenCount {
- display: inline-block;
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .nv-treeicon {
- cursor: pointer;
- /*
- cursor: n-resize;
- */
-}
-
-.nvd3.nv-indentedtree .nv-treeicon.nv-folded {
- cursor: pointer;
- /*
- cursor: s-resize;
- */
-}
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/cie.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/cie.js
deleted file mode 100644
index 45f01329..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/cie.js
+++ /dev/null
@@ -1,155 +0,0 @@
-(function(d3) {
- var cie = d3.cie = {};
-
- cie.lab = function(l, a, b) {
- return arguments.length === 1
- ? (l instanceof Lab ? lab(l.l, l.a, l.b)
- : (l instanceof Lch ? lch_lab(l.l, l.c, l.h)
- : rgb_lab((l = d3.rgb(l)).r, l.g, l.b)))
- : lab(+l, +a, +b);
- };
-
- cie.lch = function(l, c, h) {
- return arguments.length === 1
- ? (l instanceof Lch ? lch(l.l, l.c, l.h)
- : (l instanceof Lab ? lab_lch(l.l, l.a, l.b)
- : lab_lch((l = rgb_lab((l = d3.rgb(l)).r, l.g, l.b)).l, l.a, l.b)))
- : lch(+l, +c, +h);
- };
-
- cie.interpolateLab = function(a, b) {
- a = cie.lab(a);
- b = cie.lab(b);
- var al = a.l,
- aa = a.a,
- ab = a.b,
- bl = b.l - al,
- ba = b.a - aa,
- bb = b.b - ab;
- return function(t) {
- return lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
-
- cie.interpolateLch = function(a, b) {
- a = cie.lch(a);
- b = cie.lch(b);
- var al = a.l,
- ac = a.c,
- ah = a.h,
- bl = b.l - al,
- bc = b.c - ac,
- bh = b.h - ah;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; // shortest path
- return function(t) {
- return lch_lab(al + bl * t, ac + bc * t, ah + bh * t) + "";
- };
- };
-
- function lab(l, a, b) {
- return new Lab(l, a, b);
- }
-
- function Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
-
- Lab.prototype.brighter = function(k) {
- return lab(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.darker = function(k) {
- return lab(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.rgb = function() {
- return lab_rgb(this.l, this.a, this.b);
- };
-
- Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- function lch(l, c, h) {
- return new Lch(l, c, h);
- }
-
- function Lch(l, c, h) {
- this.l = l;
- this.c = c;
- this.h = h;
- }
-
- Lch.prototype.brighter = function(k) {
- return lch(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.darker = function(k) {
- return lch(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.rgb = function() {
- return lch_lab(this.l, this.c, this.h).rgb();
- };
-
- Lch.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- // Corresponds roughly to RGB brighter/darker
- var K = 18;
-
- // D65 standard referent
- var X = 0.950470, Y = 1, Z = 1.088830;
-
- function lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = lab_xyz(x) * X;
- y = lab_xyz(y) * Y;
- z = lab_xyz(z) * Z;
- return d3.rgb(
- xyz_rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z),
- xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
- xyz_rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)
- );
- }
-
- function rgb_lab(r, g, b) {
- r = rgb_xyz(r);
- g = rgb_xyz(g);
- b = rgb_xyz(b);
- var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / X),
- y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Y),
- z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Z);
- return lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
-
- function lab_lch(l, a, b) {
- var c = Math.sqrt(a * a + b * b),
- h = Math.atan2(b, a) / Math.PI * 180;
- return lch(l, c, h);
- }
-
- function lch_lab(l, c, h) {
- h = h * Math.PI / 180;
- return lab(l, Math.cos(h) * c, Math.sin(h) * c);
- }
-
- function lab_xyz(x) {
- return x > 0.206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
-
- function xyz_lab(x) {
- return x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
-
- function xyz_rgb(r) {
- return Math.round(255 * (r <= 0.00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055));
- }
-
- function rgb_xyz(r) {
- return (r /= 255) <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
- }
-})(d3);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/colorbrewer.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/colorbrewer.js
deleted file mode 100644
index 2295527b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/colorbrewer.js
+++ /dev/null
@@ -1,302 +0,0 @@
-// This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
-var colorbrewer = {YlGn: {
-3: ["#f7fcb9","#addd8e","#31a354"],
-4: ["#ffffcc","#c2e699","#78c679","#238443"],
-5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
-6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
-7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
-},YlGnBu: {
-3: ["#edf8b1","#7fcdbb","#2c7fb8"],
-4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"],
-5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],
-6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],
-7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]
-},GnBu: {
-3: ["#e0f3db","#a8ddb5","#43a2ca"],
-4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],
-5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],
-6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],
-7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]
-},BuGn: {
-3: ["#e5f5f9","#99d8c9","#2ca25f"],
-4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"],
-5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],
-6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],
-7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]
-},PuBuGn: {
-3: ["#ece2f0","#a6bddb","#1c9099"],
-4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"],
-5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],
-6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],
-7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]
-},PuBu: {
-3: ["#ece7f2","#a6bddb","#2b8cbe"],
-4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],
-5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],
-6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],
-7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]
-},BuPu: {
-3: ["#e0ecf4","#9ebcda","#8856a7"],
-4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"],
-5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],
-6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],
-7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]
-},RdPu: {
-3: ["#fde0dd","#fa9fb5","#c51b8a"],
-4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"],
-5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],
-6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],
-7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]
-},PuRd: {
-3: ["#e7e1ef","#c994c7","#dd1c77"],
-4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"],
-5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],
-6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],
-7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]
-},OrRd: {
-3: ["#fee8c8","#fdbb84","#e34a33"],
-4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],
-5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],
-6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],
-7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]
-},YlOrRd: {
-3: ["#ffeda0","#feb24c","#f03b20"],
-4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],
-5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],
-6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],
-7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]
-},YlOrBr: {
-3: ["#fff7bc","#fec44f","#d95f0e"],
-4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"],
-5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],
-6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],
-7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]
-},Purples: {
-3: ["#efedf5","#bcbddc","#756bb1"],
-4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],
-5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],
-6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],
-7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]
-},Blues: {
-3: ["#deebf7","#9ecae1","#3182bd"],
-4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"],
-5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],
-6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],
-7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]
-},Greens: {
-3: ["#e5f5e0","#a1d99b","#31a354"],
-4: ["#edf8e9","#bae4b3","#74c476","#238b45"],
-5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],
-6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],
-7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]
-},Oranges: {
-3: ["#fee6ce","#fdae6b","#e6550d"],
-4: ["#feedde","#fdbe85","#fd8d3c","#d94701"],
-5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],
-6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],
-7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]
-},Reds: {
-3: ["#fee0d2","#fc9272","#de2d26"],
-4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"],
-5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],
-6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],
-7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]
-},Greys: {
-3: ["#f0f0f0","#bdbdbd","#636363"],
-4: ["#f7f7f7","#cccccc","#969696","#525252"],
-5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"],
-6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],
-7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]
-},PuOr: {
-3: ["#f1a340","#f7f7f7","#998ec3"],
-4: ["#e66101","#fdb863","#b2abd2","#5e3c99"],
-5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],
-6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],
-7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],
-8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],
-9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],
-10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],
-11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]
-},BrBG: {
-3: ["#d8b365","#f5f5f5","#5ab4ac"],
-4: ["#a6611a","#dfc27d","#80cdc1","#018571"],
-5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],
-6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],
-7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],
-8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],
-9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],
-10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],
-11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]
-},PRGn: {
-3: ["#af8dc3","#f7f7f7","#7fbf7b"],
-4: ["#7b3294","#c2a5cf","#a6dba0","#008837"],
-5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],
-6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],
-7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],
-8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],
-11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]
-},PiYG: {
-3: ["#e9a3c9","#f7f7f7","#a1d76a"],
-4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"],
-5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],
-6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],
-7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],
-8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],
-11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]
-},RdBu: {
-3: ["#ef8a62","#f7f7f7","#67a9cf"],
-4: ["#ca0020","#f4a582","#92c5de","#0571b0"],
-5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],
-6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],
-7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]
-},RdGy: {
-3: ["#ef8a62","#ffffff","#999999"],
-4: ["#ca0020","#f4a582","#bababa","#404040"],
-5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"],
-6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],
-7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]
-},RdYlBu: {
-3: ["#fc8d59","#ffffbf","#91bfdb"],
-4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"],
-5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],
-6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],
-7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],
-8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]
-},Spectral: {
-3: ["#fc8d59","#ffffbf","#99d594"],
-4: ["#d7191c","#fdae61","#abdda4","#2b83ba"],
-5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],
-6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],
-7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],
-8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],
-9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],
-10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],
-11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]
-},RdYlGn: {
-3: ["#fc8d59","#ffffbf","#91cf60"],
-4: ["#d7191c","#fdae61","#a6d96a","#1a9641"],
-5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],
-6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],
-7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],
-8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]
-},Accent: {
-3: ["#7fc97f","#beaed4","#fdc086"],
-4: ["#7fc97f","#beaed4","#fdc086","#ffff99"],
-5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],
-6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],
-7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],
-8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]
-},Dark2: {
-3: ["#1b9e77","#d95f02","#7570b3"],
-4: ["#1b9e77","#d95f02","#7570b3","#e7298a"],
-5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],
-6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],
-7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],
-8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]
-},Paired: {
-3: ["#a6cee3","#1f78b4","#b2df8a"],
-4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"],
-5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],
-6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],
-7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],
-8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],
-9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],
-10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],
-11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],
-12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]
-},Pastel1: {
-3: ["#fbb4ae","#b3cde3","#ccebc5"],
-4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],
-5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],
-6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],
-7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],
-8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],
-9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]
-},Pastel2: {
-3: ["#b3e2cd","#fdcdac","#cbd5e8"],
-4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],
-5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],
-6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],
-7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],
-8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]
-},Set1: {
-3: ["#e41a1c","#377eb8","#4daf4a"],
-4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"],
-5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],
-6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],
-7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],
-8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],
-9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]
-},Set2: {
-3: ["#66c2a5","#fc8d62","#8da0cb"],
-4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],
-5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],
-6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],
-7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],
-8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]
-},Set3: {
-3: ["#8dd3c7","#ffffb3","#bebada"],
-4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"],
-5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],
-6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],
-7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],
-8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],
-9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],
-10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],
-11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],
-12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]
-}};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/core.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/core.js
deleted file mode 100644
index 912de8d8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/core.js
+++ /dev/null
@@ -1,122 +0,0 @@
-
-var nv = window.nv || {};
-
-
-nv.version = '1.1.13b';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = nv.utils || {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-// Note: in IE8 console.log is an object not a function, and if modernizr is used
-// then calling Function.prototype.bind with with anything other than a function
-// causes a TypeError to be thrown.
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && typeof console.log == "function" && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.js
deleted file mode 100644
index 1aaabca2..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.js
+++ /dev/null
@@ -1,1180 +0,0 @@
-(function(exports){
-crossfilter.version = "1.0.3";
-function crossfilter_identity(d) {
- return d;
-}
-crossfilter.permute = permute;
-
-function permute(array, index) {
- for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {
- copy[i] = array[index[i]];
- }
- return copy;
-}
-var bisect = crossfilter.bisect = bisect_by(crossfilter_identity);
-
-bisect.by = bisect_by;
-
-function bisect_by(f) {
-
- // Locate the insertion point for x in a to maintain sorted order. The
- // arguments lo and hi may be used to specify a subset of the array which
- // should be considered; by default the entire array is used. If x is already
- // present in a, the insertion point will be before (to the left of) any
- // existing entries. The return value is suitable for use as the first
- // argument to `array.splice` assuming that a is already sorted.
- //
- // The returned insertion point i partitions the array a into two halves so
- // that all v < x for v in a[lo:i] for the left side and all v >= x for v in
- // a[i:hi] for the right side.
- function bisectLeft(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (f(a[mid]) < x) lo = mid + 1;
- else hi = mid;
- }
- return lo;
- }
-
- // Similar to bisectLeft, but returns an insertion point which comes after (to
- // the right of) any existing entries of x in a.
- //
- // The returned insertion point i partitions the array into two halves so that
- // all v <= x for v in a[lo:i] for the left side and all v > x for v in
- // a[i:hi] for the right side.
- function bisectRight(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (x < f(a[mid])) hi = mid;
- else lo = mid + 1;
- }
- return lo;
- }
-
- bisectRight.right = bisectRight;
- bisectRight.left = bisectLeft;
- return bisectRight;
-}
-var heap = crossfilter.heap = heap_by(crossfilter_identity);
-
-heap.by = heap_by;
-
-function heap_by(f) {
-
- // Builds a binary heap within the specified array a[lo:hi]. The heap has the
- // property such that the parent a[lo+i] is always less than or equal to its
- // two children: a[lo+2*i+1] and a[lo+2*i+2].
- function heap(a, lo, hi) {
- var n = hi - lo,
- i = (n >>> 1) + 1;
- while (--i > 0) sift(a, i, n, lo);
- return a;
- }
-
- // Sorts the specified array a[lo:hi] in descending order, assuming it is
- // already a heap.
- function sort(a, lo, hi) {
- var n = hi - lo,
- t;
- while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);
- return a;
- }
-
- // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous
- // slice of array a[lo:lo+n]. This method can also be used to update the heap
- // incrementally, without incurring the full cost of reconstructing the heap.
- function sift(a, i, n, lo) {
- var d = a[--lo + i],
- x = f(d),
- child;
- while ((child = i << 1) <= n) {
- if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;
- if (x <= f(a[lo + child])) break;
- a[lo + i] = a[lo + child];
- i = child;
- }
- a[lo + i] = d;
- }
-
- heap.sort = sort;
- return heap;
-}
-var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity);
-
-heapselect.by = heapselect_by;
-
-function heapselect_by(f) {
- var heap = heap_by(f);
-
- // Returns a new array containing the top k elements in the array a[lo:hi].
- // The returned array is not sorted, but maintains the heap property. If k is
- // greater than hi - lo, then fewer than k elements will be returned. The
- // order of elements in a is unchanged by this operation.
- function heapselect(a, lo, hi, k) {
- var queue = new Array(k = Math.min(hi - lo, k)),
- min,
- i,
- x,
- d;
-
- for (i = 0; i < k; ++i) queue[i] = a[lo++];
- heap(queue, 0, k);
-
- if (lo < hi) {
- min = f(queue[0]);
- do {
- if (x = f(d = a[lo]) > min) {
- queue[0] = d;
- min = f(heap(queue, 0, k)[0]);
- }
- } while (++lo < hi);
- }
-
- return queue;
- }
-
- return heapselect;
-}
-var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity);
-
-insertionsort.by = insertionsort_by;
-
-function insertionsort_by(f) {
-
- function insertionsort(a, lo, hi) {
- for (var i = lo + 1; i < hi; ++i) {
- for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) {
- a[j] = a[j - 1];
- }
- a[j] = t;
- }
- return a;
- }
-
- return insertionsort;
-}
-// Algorithm designed by Vladimir Yaroslavskiy.
-// Implementation based on the Dart project; see lib/dart/LICENSE for details.
-
-var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity);
-
-quicksort.by = quicksort_by;
-
-function quicksort_by(f) {
- var insertionsort = insertionsort_by(f);
-
- function sort(a, lo, hi) {
- return (hi - lo < quicksort_sizeThreshold
- ? insertionsort
- : quicksort)(a, lo, hi);
- }
-
- function quicksort(a, lo, hi) {
-
- // Compute the two pivots by looking at 5 elements.
- var sixth = (hi - lo) / 6 | 0,
- i1 = lo + sixth,
- i5 = hi - 1 - sixth,
- i3 = lo + hi - 1 >> 1, // The midpoint.
- i2 = i3 - sixth,
- i4 = i3 + sixth;
-
- var e1 = a[i1], x1 = f(e1),
- e2 = a[i2], x2 = f(e2),
- e3 = a[i3], x3 = f(e3),
- e4 = a[i4], x4 = f(e4),
- e5 = a[i5], x5 = f(e5);
-
- var t;
-
- // Sort the selected 5 elements using a sorting network.
- if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
- if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t;
- if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t;
- if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
-
- var pivot1 = e2, pivotValue1 = x2,
- pivot2 = e4, pivotValue2 = x4;
-
- // e2 and e4 have been saved in the pivot variables. They will be written
- // back, once the partitioning is finished.
- a[i1] = e1;
- a[i2] = a[lo];
- a[i3] = e3;
- a[i4] = a[hi - 1];
- a[i5] = e5;
-
- var less = lo + 1, // First element in the middle partition.
- great = hi - 2; // Last element in the middle partition.
-
- // Note that for value comparison, <, <=, >= and > coerce to a primitive via
- // Object.prototype.valueOf; == and === do not, so in order to be consistent
- // with natural order (such as for Date objects), we must do two compares.
- var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2;
- if (pivotsEqual) {
-
- // Degenerated case where the partitioning becomes a dutch national flag
- // problem.
- //
- // [ | < pivot | == pivot | unpartitioned | > pivot | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1) for x in ]left, less[ : x < pivot.
- // 2) for x in [less, k[ : x == pivot.
- // 3) for x in ]great, right[ : x > pivot.
- for (var k = less; k <= great; ++k) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else if (xk > pivotValue1) {
-
- // Find the first element <= pivot in the range [k - 1, great] and
- // put [:ek:] there. We know that such an element must exist:
- // When k == less, then el3 (which is equal to pivot) lies in the
- // interval. Otherwise a[k - 1] == pivot and the search stops at k-1.
- // Note that in the latter case invariant 2 will be violated for a
- // short amount of time. The invariant will be restored when the
- // pivots are put into their final positions.
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue1) {
- great--;
- // This is the only location in the while-loop where a new
- // iteration is started.
- continue;
- } else if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- break;
- } else {
- a[k] = a[great];
- a[great--] = ek;
- // Note: if great < k then we will exit the outer loop and fix
- // invariant 2 (which we just violated).
- break;
- }
- }
- }
- }
- } else {
-
- // We partition the list into three parts:
- // 1. < pivot1
- // 2. >= pivot1 && <= pivot2
- // 3. > pivot2
- //
- // During the loop we have:
- // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1. for x in ]left, less[ : x < pivot1
- // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2
- // 3. for x in ]great, right[ : x > pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else {
- if (xk > pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] <= pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] >= pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // Move pivots into their final positions.
- // We shrunk the list from both sides (a[left] and a[right] have
- // meaningless values in them) and now we move elements from the first
- // and third partition into these locations so that we can store the
- // pivots.
- a[lo] = a[less - 1];
- a[less - 1] = pivot1;
- a[hi - 1] = a[great + 1];
- a[great + 1] = pivot2;
-
- // The list is now partitioned into three partitions:
- // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ]
- // ^ ^ ^ ^
- // left less great right
-
- // Recursive descent. (Don't include the pivot values.)
- sort(a, lo, less - 1);
- sort(a, great + 2, hi);
-
- if (pivotsEqual) {
- // All elements in the second partition are equal to the pivot. No
- // need to sort them.
- return a;
- }
-
- // In theory it should be enough to call _doSort recursively on the second
- // partition.
- // The Android source however removes the pivot elements from the recursive
- // call if the second partition is too large (more than 2/3 of the list).
- if (less < i1 && great > i5) {
- var lessValue, greatValue;
- while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less;
- while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great;
-
- // Copy paste of the previous 3-way partitioning with adaptions.
- //
- // We partition the list into three parts:
- // 1. == pivot1
- // 2. > pivot1 && < pivot2
- // 3. == pivot2
- //
- // During the loop we have:
- // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ]
- // ^ ^ ^
- // less k great
- //
- // Invariants:
- // 1. for x in [ *, less[ : x == pivot1
- // 2. for x in [less, k[ : pivot1 < x && x < pivot2
- // 3. for x in ]great, * ] : x == pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk <= pivotValue1 && xk >= pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- less++;
- } else {
- if (xk <= pivotValue2 && xk >= pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue <= pivotValue2 && greatValue >= pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] < pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] == pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // The second partition has now been cleared of pivot elements and looks
- // as follows:
- // [ * | > pivot1 && < pivot2 | * ]
- // ^ ^
- // less great
- // Sort the second partition using recursive descent.
-
- // The second partition looks as follows:
- // [ * | >= pivot1 && <= pivot2 | * ]
- // ^ ^
- // less great
- // Simply sort it by recursive descent.
-
- return sort(a, less, great + 1);
- }
-
- return sort;
-}
-
-var quicksort_sizeThreshold = 32;
-var crossfilter_array8 = crossfilter_arrayUntyped,
- crossfilter_array16 = crossfilter_arrayUntyped,
- crossfilter_array32 = crossfilter_arrayUntyped,
- crossfilter_arrayLengthen = crossfilter_identity,
- crossfilter_arrayWiden = crossfilter_identity;
-
-if (typeof Uint8Array !== "undefined") {
- crossfilter_array8 = function(n) { return new Uint8Array(n); };
- crossfilter_array16 = function(n) { return new Uint16Array(n); };
- crossfilter_array32 = function(n) { return new Uint32Array(n); };
-
- crossfilter_arrayLengthen = function(array, length) {
- var copy = new array.constructor(length);
- copy.set(array);
- return copy;
- };
-
- crossfilter_arrayWiden = function(array, width) {
- var copy;
- switch (width) {
- case 16: copy = crossfilter_array16(array.length); break;
- case 32: copy = crossfilter_array32(array.length); break;
- default: throw new Error("invalid array width!");
- }
- copy.set(array);
- return copy;
- };
-}
-
-function crossfilter_arrayUntyped(n) {
- return new Array(n);
-}
-function crossfilter_filterExact(bisect, value) {
- return function(values) {
- var n = values.length;
- return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];
- };
-}
-
-function crossfilter_filterRange(bisect, range) {
- var min = range[0],
- max = range[1];
- return function(values) {
- var n = values.length;
- return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];
- };
-}
-
-function crossfilter_filterAll(values) {
- return [0, values.length];
-}
-function crossfilter_null() {
- return null;
-}
-function crossfilter_zero() {
- return 0;
-}
-function crossfilter_reduceIncrement(p) {
- return p + 1;
-}
-
-function crossfilter_reduceDecrement(p) {
- return p - 1;
-}
-
-function crossfilter_reduceAdd(f) {
- return function(p, v) {
- return p + +f(v);
- };
-}
-
-function crossfilter_reduceSubtract(f) {
- return function(p, v) {
- return p - f(v);
- };
-}
-exports.crossfilter = crossfilter;
-
-function crossfilter() {
- var crossfilter = {
- add: add,
- dimension: dimension,
- groupAll: groupAll,
- size: size
- };
-
- var data = [], // the records
- n = 0, // the number of records; data.length
- m = 0, // number of dimensions in use
- M = 8, // number of dimensions that can fit in `filters`
- filters = crossfilter_array8(0), // M bits per record; 1 is filtered out
- filterListeners = [], // when the filters change
- dataListeners = []; // when data is added
-
- // Adds the specified new records to this crossfilter.
- function add(newData) {
- var n0 = n,
- n1 = newData.length;
-
- // If there's actually new data to add…
- // Merge the new data into the existing data.
- // Lengthen the filter bitset to handle the new records.
- // Notify listeners (dimensions and groups) that new data is available.
- if (n1) {
- data = data.concat(newData);
- filters = crossfilter_arrayLengthen(filters, n += n1);
- dataListeners.forEach(function(l) { l(newData, n0, n1); });
- }
-
- return crossfilter;
- }
-
- // Adds a new dimension with the specified value accessor function.
- function dimension(value) {
- var dimension = {
- filter: filter,
- filterExact: filterExact,
- filterRange: filterRange,
- filterAll: filterAll,
- top: top,
- group: group,
- groupAll: groupAll
- };
-
- var one = 1 << m++, // bit mask, e.g., 00001000
- zero = ~one, // inverted one, e.g., 11110111
- values, // sorted, cached array
- index, // value rank ↦ object id
- newValues, // temporary array storing newly-added values
- newIndex, // temporary array storing newly-added index
- sort = quicksort_by(function(i) { return newValues[i]; }),
- refilter = crossfilter_filterAll, // for recomputing filter
- indexListeners = [], // when data is added
- lo0 = 0,
- hi0 = 0;
-
- // Updating a dimension is a two-stage process. First, we must update the
- // associated filters for the newly-added records. Once all dimensions have
- // updated their filters, the groups are notified to update.
- dataListeners.unshift(preAdd);
- dataListeners.push(postAdd);
-
- // Incorporate any existing data into this dimension, and make sure that the
- // filter bitset is wide enough to handle the new dimension.
- if (m > M) filters = crossfilter_arrayWiden(filters, M <<= 1);
- preAdd(data, 0, n);
- postAdd(data, 0, n);
-
- // Incorporates the specified new records into this dimension.
- // This function is responsible for updating filters, values, and index.
- function preAdd(newData, n0, n1) {
-
- // Permute new values into natural order using a sorted index.
- newValues = newData.map(value);
- newIndex = sort(crossfilter_range(n1), 0, n1);
- newValues = permute(newValues, newIndex);
-
- // Bisect newValues to determine which new records are selected.
- var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;
- for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;
- for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;
-
- // If this dimension previously had no data, then we don't need to do the
- // more expensive merge operation; use the new values and index as-is.
- if (!n0) {
- values = newValues;
- index = newIndex;
- lo0 = lo1;
- hi0 = hi1;
- return;
- }
-
- var oldValues = values,
- oldIndex = index,
- i0 = 0,
- i1 = 0;
-
- // Otherwise, create new arrays into which to merge new and old.
- values = new Array(n);
- index = crossfilter_index(n, n);
-
- // Merge the old and new sorted values, and old and new index.
- for (i = 0; i0 < n0 && i1 < n1; ++i) {
- if (oldValues[i0] < newValues[i1]) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0++];
- } else {
- values[i] = newValues[i1];
- index[i] = newIndex[i1++] + n0;
- }
- }
-
- // Add any remaining old values.
- for (; i0 < n0; ++i0, ++i) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0];
- }
-
- // Add any remaining new values.
- for (; i1 < n1; ++i1, ++i) {
- values[i] = newValues[i1];
- index[i] = newIndex[i1] + n0;
- }
-
- // Bisect again to recompute lo0 and hi0.
- bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];
- }
-
- // When all filters have updated, notify index listeners of the new values.
- function postAdd(newData, n0, n1) {
- indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });
- newValues = newIndex = null;
- }
-
- // Updates the selected values based on the specified bounds [lo, hi].
- // This implementation is used by all the public filter methods.
- function filterIndex(bounds) {
- var i,
- j,
- k,
- lo1 = bounds[0],
- hi1 = bounds[1],
- added = [],
- removed = [];
-
- // Fast incremental update based on previous lo index.
- if (lo1 < lo0) {
- for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (lo1 > lo0) {
- for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- // Fast incremental update based on previous hi index.
- if (hi1 > hi0) {
- for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (hi1 < hi0) {
- for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- lo0 = lo1;
- hi0 = hi1;
- filterListeners.forEach(function(l) { l(one, added, removed); });
- return dimension;
- }
-
- // Filters this dimension using the specified range, value, or null.
- // If the range is null, this is equivalent to filterAll.
- // If the range is an array, this is equivalent to filterRange.
- // Otherwise, this is equivalent to filterExact.
- function filter(range) {
- return range == null
- ? filterAll() : Array.isArray(range)
- ? filterRange(range)
- : filterExact(range);
- }
-
- // Filters this dimension to select the exact value.
- function filterExact(value) {
- return filterIndex((refilter = crossfilter_filterExact(bisect, value))(values));
- }
-
- // Filters this dimension to select the specified range [lo, hi].
- // The lower bound is inclusive, and the upper bound is exclusive.
- function filterRange(range) {
- return filterIndex((refilter = crossfilter_filterRange(bisect, range))(values));
- }
-
- // Clears any filters on this dimension.
- function filterAll() {
- return filterIndex((refilter = crossfilter_filterAll)(values));
- }
-
- // Returns the top K selected records, based on this dimension's order.
- // Note: observes this dimension's filter, unlike group and groupAll.
- function top(k) {
- var array = [],
- i = hi0,
- j;
-
- while (--i >= lo0 && k > 0) {
- if (!filters[j = index[i]]) {
- array.push(data[j]);
- --k;
- }
- }
-
- return array;
- }
-
- // Adds a new group to this dimension, using the specified key function.
- function group(key) {
- var group = {
- top: top,
- all: all,
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- order: order,
- orderNatural: orderNatural,
- size: size
- };
-
- var groups, // array of {key, value}
- groupIndex, // object id ↦ group id
- groupWidth = 8,
- groupCapacity = crossfilter_capacity(groupWidth),
- k = 0, // cardinality
- select,
- heap,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- update = crossfilter_null,
- reset = crossfilter_null,
- resetNeeded = true;
-
- if (arguments.length < 1) key = crossfilter_identity;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the associated reduce values. It must also listen to
- // the parent dimension for when data is added, and compute new keys.
- filterListeners.push(update);
- indexListeners.push(add);
-
- // Incorporate any existing data into the grouping.
- add(values, index, 0, n);
-
- // Incorporates the specified new values into this group.
- // This function is responsible for updating groups and groupIndex.
- function add(newValues, newIndex, n0, n1) {
- var oldGroups = groups,
- reIndex = crossfilter_index(k, groupCapacity),
- add = reduceAdd,
- initial = reduceInitial,
- k0 = k, // old cardinality
- i0 = 0, // index of old group
- i1 = 0, // index of new record
- j, // object id
- g0, // old group
- x0, // old key
- x1, // new key
- g, // group to add
- x; // key of group to add
-
- // If a reset is needed, we don't need to update the reduce values.
- if (resetNeeded) add = initial = crossfilter_null;
-
- // Reset the new groups (k is a lower bound).
- // Also, make sure that groupIndex exists and is long enough.
- groups = new Array(k), k = 0;
- groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);
-
- // Get the first old key (x0 of g0), if it exists.
- if (k0) x0 = (g0 = oldGroups[0]).key;
-
- // Find the first new key (x1), skipping NaN keys.
- while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;
-
- // While new keys remain…
- while (i1 < n1) {
-
- // Determine the lesser of the two current keys; new and old.
- // If there are no old keys remaining, then always add the new key.
- if (g0 && x0 <= x1) {
- g = g0, x = x0;
-
- // Record the new index of the old group.
- reIndex[i0] = k;
-
- // Retrieve the next old key.
- if (g0 = oldGroups[++i0]) x0 = g0.key;
- } else {
- g = {key: x1, value: initial()}, x = x1;
- }
-
- // Add the lesser group.
- groups[k] = g;
-
- // Add any selected records belonging to the added group, while
- // advancing the new key and populating the associated group index.
- while (!(x1 > x)) {
- groupIndex[j = newIndex[i1] + n0] = k;
- if (!(filters[j] & zero)) g.value = add(g.value, data[j]);
- if (++i1 >= n1) break;
- x1 = key(newValues[i1]);
- }
-
- groupIncrement();
- }
-
- // Add any remaining old groups that were greater than all new keys.
- // No incremental reduce is needed; these groups have no new records.
- // Also record the new index of the old group.
- while (i0 < k0) {
- groups[reIndex[i0] = k] = oldGroups[i0++];
- groupIncrement();
- }
-
- // If we added any new groups before any old groups,
- // update the group index of all the old records.
- if (k > i0) for (i0 = 0; i0 < n0; ++i0) {
- groupIndex[i0] = reIndex[groupIndex[i0]];
- }
-
- // Modify the update and reset behavior based on the cardinality.
- // If the cardinality is less than or equal to one, then the groupIndex
- // is not needed. If the cardinality is zero, then there are no records
- // and therefore no groups to update or reset. Note that we also must
- // change the registered listener to point to the new method.
- j = filterListeners.indexOf(update);
- if (k > 1) {
- update = updateMany;
- reset = resetMany;
- } else {
- if (k === 1) {
- update = updateOne;
- reset = resetOne;
- } else {
- update = crossfilter_null;
- reset = crossfilter_null;
- }
- groupIndex = null;
- }
- filterListeners[j] = update;
-
- // Count the number of added groups,
- // and widen the group index as needed.
- function groupIncrement() {
- if (++k === groupCapacity) {
- reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);
- groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);
- groupCapacity = crossfilter_capacity(groupWidth);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is greater than 1.
- function updateMany(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g = groups[groupIndex[k]];
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g = groups[groupIndex[k]];
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is 1.
- function updateOne(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g = groups[0];
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is greater than 1.
- function resetMany() {
- var i,
- g;
-
- // Reset all group values.
- for (i = 0; i < k; ++i) {
- groups[i].value = reduceInitial();
- }
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g = groups[groupIndex[i]];
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is 1.
- function resetOne() {
- var i,
- g = groups[0];
-
- // Reset the singleton group values.
- g.value = reduceInitial();
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Returns the array of group values, in the dimension's natural order.
- function all() {
- if (resetNeeded) reset(), resetNeeded = false;
- return groups;
- }
-
- // Returns a new array containing the top K group values, in reduce order.
- function top(k) {
- var top = select(all(), 0, groups.length, k);
- return heap.sort(top, 0, top.length);
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce values, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Sets the reduce order, using the specified accessor.
- function order(value) {
- select = heapselect_by(valueOf);
- heap = heap_by(valueOf);
- function valueOf(d) { return value(d.value); }
- return group;
- }
-
- // A convenience method for natural ordering by reduce value.
- function orderNatural() {
- return order(crossfilter_identity);
- }
-
- // Returns the cardinality of this group, irrespective of any filters.
- function size() {
- return k;
- }
-
- return reduceCount().orderNatural();
- }
-
- // A convenience function for generating a singleton group.
- function groupAll() {
- var g = group(crossfilter_null), all = g.all;
- delete g.all;
- delete g.top;
- delete g.order;
- delete g.orderNatural;
- delete g.size;
- g.value = function() { return all()[0].value; };
- return g;
- }
-
- return dimension;
- }
-
- // A convenience method for groupAll on a dummy dimension.
- // This implementation can be optimized since it is always cardinality 1.
- function groupAll() {
- var group = {
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- value: value
- };
-
- var reduceValue,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- resetNeeded = true;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the reduce value. It must also listen to the parent
- // dimension for when data is added.
- filterListeners.push(update);
- dataListeners.push(add);
-
- // For consistency; actually a no-op since resetNeeded is true.
- add(data, 0, n);
-
- // Incorporates the specified new values into this group.
- function add(newData, n0, n1) {
- var i;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = n0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- function update(filterOne, added, removed) {
- var i,
- k,
- n;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!filters[k = added[i]]) {
- reduceValue = reduceAdd(reduceValue, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if (filters[k = removed[i]] === filterOne) {
- reduceValue = reduceRemove(reduceValue, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce value from scratch.
- function reset() {
- var i;
-
- reduceValue = reduceInitial();
-
- for (i = 0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce value, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Returns the computed reduce value.
- function value() {
- if (resetNeeded) reset(), resetNeeded = false;
- return reduceValue;
- }
-
- return reduceCount();
- }
-
- // Returns the number of records in this crossfilter, irrespective of any filters.
- function size() {
- return n;
- }
-
- return arguments.length
- ? add(arguments[0])
- : crossfilter;
-}
-
-// Returns an array of size n, big enough to store ids up to m.
-function crossfilter_index(n, m) {
- return (m < 0x101
- ? crossfilter_array8 : m < 0x10001
- ? crossfilter_array16
- : crossfilter_array32)(n);
-}
-
-// Constructs a new array of size n, with sequential values from 0 to n - 1.
-function crossfilter_range(n) {
- var range = crossfilter_index(n, n);
- for (var i = -1; ++i < n;) range[i] = i;
- return range;
-}
-
-function crossfilter_capacity(w) {
- return w === 8
- ? 0x100 : w === 16
- ? 0x10000
- : 0x100000000;
-}
-})(this);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.min.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.min.js
deleted file mode 100644
index 981f0d64..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/crossfilter.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){function b(a){return a}function c(a,b){for(var c=0,d=b.length,e=new Array(d);c<d;++c)e[c]=a[b[c]];return e}function e(a){function b(b,c,d,e){while(d<e){var f=d+e>>1;a(b[f])<c?d=f+1:e=f}return d}function c(b,c,d,e){while(d<e){var f=d+e>>1;c<a(b[f])?e=f:d=f+1}return d}return c.right=c,c.left=b,c}function g(a){function b(a,b,c){var e=c-b,f=(e>>>1)+1;while(--f>0)d(a,f,e,b);return a}function c(a,b,c){var e=c-b,f;while(--e>0)f=a[b],a[b]=a[b+e],a[b+e]=f,d(a,1,e,b);return a}function d(b,c,d,e){var f=b[--e+c],g=a(f),h;while((h=c<<1)<=d){h<d&&a(b[e+h])>a(b[e+h+1])&&h++;if(g<=a(b[e+h]))break;b[e+c]=b[e+h],c=h}b[e+c]=f}return b.sort=c,b}function i(a){function c(c,d,e,f){var g=new Array(f=Math.min(e-d,f)),h,i,j,k;for(i=0;i<f;++i)g[i]=c[d++];b(g,0,f);if(d<e){h=a(g[0]);do if(j=a(k=c[d])>h)g[0]=k,h=a(b(g,0,f)[0]);while(++d<e)}return g}var b=g(a);return c}function k(a){function b(b,c,d){for(var e=c+1;e<d;++e){for(var f=e,g=b[e],h=a(g);f>c&&a(b[f-1])>h;--f)b[f]=b[f-1];b[f]=g}return b}return b}function m(a){function c(a,c,e){return(e-c<n?b:d)(a,c,e)}function d(b,d,e){var f=(e-d)/6|0,g=d+f,h=e-1-f,i=d+e-1>>1,j=i-f,k=i+f,l=b[g],m=a(l),n=b[j],o=a(n),p=b[i],q=a(p),r=b[k],s=a(r),t=b[h],u=a(t),v;m>o&&(v=l,l=n,n=v,v=m,m=o,o=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v),m>q&&(v=l,l=p,p=v,v=m,m=q,q=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),m>s&&(v=l,l=r,r=v,v=m,m=s,s=v),q>s&&(v=p,p=r,r=v,v=q,q=s,s=v),o>u&&(v=n,n=t,t=v,v=o,o=u,u=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v);var w=n,x=o,y=r,z=s;b[g]=l,b[j]=b[d],b[i]=p,b[k]=b[e-1],b[h]=t;var A=d+1,B=e-2,C=x<=z&&x>=z;if(C)for(var D=A;D<=B;++D){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>x)for(;;){var G=a(b[B]);if(G>x){B--;continue}if(G<x){b[D]=b[A],b[A++]=b[B],b[B--]=E;break}b[D]=b[B],b[B--]=E;break}}else for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>z)for(;;){var G=a(b[B]);if(G>z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}b[d]=b[A-1],b[A-1]=w,b[e-1]=b[B+1],b[B+1]=y,c(b,d,A-1),c(b,B+2,e);if(C)return b;if(A<g&&B>h){var H,G;while((H=a(b[A]))<=x&&H>=x)++A;while((G=a(b[B]))<=z&&G>=z)--B;for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<=x&&F>=x)D!==A&&(b[D]=b[A],b[A]=E),A++;else if(F<=z&&F>=z)for(;;){var G=a(b[B]);if(G<=z&&G>=z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}}return c(b,A,B+1)}var b=k(a);return c}function t(a){return new Array(a)}function u(a,b){return function(c){var d=c.length;return[a.left(c,b,0,d),a.right(c,b,0,d)]}}function v(a,b){var c=b[0],d=b[1];return function(b){var e=b.length;return[a.left(b,c,0,e),a.left(b,d,0,e)]}}function w(a){return[0,a.length]}function x(){return null}function y(){return 0}function z(a){return a+1}function A(a){return a-1}function B(a){return function(b,c){return b+ +a(c)}}function C(a){return function(b,c){return b-a(c)}}function D(){function p(b){var c=f,d=b.length;return d&&(e=e.concat(b),k=r(k,f+=d),n.forEach(function(a){a(b,c,d)})),a}function q(a){function P(b,d,e){H=b.map(a),I=J(F(e),0,e),H=c(H,I);var g=K(H),h=g[0],i=g[1],j;for(j=0;j<h;++j)k[I[j]+d]|=p;for(j=i;j<e;++j)k[I[j]+d]|=p;if(!d){t=H,D=I,N=h,O=i;return}var l=t,m=D,n=0,o=0;t=new Array(f),D=E(f,f);for(j=0;n<d&&o<e;++j)l[n]<H[o]?(t[j]=l[n],D[j]=m[n++]):(t[j]=H[o],D[j]=I[o++]+d);for(;n<d;++n,++j)t[j]=l[n],D[j]=m[n];for(;o<e;++o,++j)t[j]=H[o],D[j]=I[o]+d;g=K(t),N=g[0],O=g[1]}function Q(a,b,c){L.forEach(function(a){a(H,I,b,c)}),H=I=null}function R(a){var b,c,d,e=a[0],f=a[1],g=[],h=[];if(e<N)for(b=e,c=Math.min(N,f);b<c;++b)k[d=D[b]]^=p,g.push(d);else if(e>N)for(b=N,c=Math.min(e,O);b<c;++b)k[d=D[b]]^=p,h.push(d);if(f>O)for(b=Math.max(e,O),c=f;b<c;++b)k[d=D[b]]^=p,g.push(d);else if(f<O)for(b=Math.max(N,f),c=O;b<c;++b)k[d=D[b]]^=p,h.push(d);return N=e,O=f,l.forEach(function(a){a(p,g,h)}),o}function S(a){return a==null?V():Array.isArray(a)?U(a):T(a)}function T(a){return R((K=u(d,a))(t))}function U(a){return R((K=v(d,a))(t))}function V(){return R((K=w)(t))}function W(a){var b=[],c=O,d;while(--c>=N&&a>0)k[d=D[c]]||(b.push(e[d]),--a);return b}function X(a){function K(b,c,g,i){function Q(){++n===m&&(p=s(p,j<<=1),h=s(h,j),m=G(j))}var o=d,p=E(n,m),t=v,u=F,w=n,y=0,z=0,A,B,C,D,K,L;J&&(t=u=x),d=new Array(n),n=0,h=w>1?r(h,f):E(f,m),w&&(C=(B=o[0]).key);while(z<i&&!((D=a(b[z]))>=D))++z;while(z<i){if(B&&C<=D){K=B,L=C,p[y]=n;if(B=o[++y])C=B.key}else K={key:D,value:u()},L=D;d[n]=K;while(!(D>L)){h[A=c[z]+g]=n,k[A]&q||(K.value=t(K.value,e[A]));if(++z>=i)break;D=a(b[z])}Q()}while(y<w)d[p[y]=n]=o[y++],Q();if(n>y)for(y=0;y<g;++y)h[y]=p[h[y]];A=l.indexOf(H),n>1?(H=M,I=O):(n===1?(H=N,I=P):(H=x,I=x),h=null),l[A]=H}function M(a,b,c){if(a===p||J)return;var f,g,i,j;for(f=0,i=b.length;f<i;++f)k[g=b[f]]&q||(j=d[h[g]],j.value=v(j.value,e[g]));for(f=0,i=c.length;f<i;++f)(k[g=c[f]]&q)===a&&(j=d[h[g]],j.value=w(j.value,e[g]))}function N(a,b,c){if(a===p||J)return;var f,g,h,i=d[0];for(f=0,h=b.length;f<h;++f)k[g=b[f]]&q||(i.value=v(i.value,e[g]));for(f=0,h=c.length;f<h;++f)(k[g=c[f]]&q)===a&&(i.value=w(i.value,e[g]))}function O(){var a,b;for(a=0;a<n;++a)d[a].value=F();for(a=0;a<f;++a)k[a]&q||(b=d[h[a]],b.value=v(b.value,e[a]))}function P(){var a,b=d[0];b.value=F();for(a=0;a<f;++a)k[a]&q||(b.value=v(b.value,e[a]))}function Q(){return J&&(I(),J=!1),d}function R(a){var b=o(Q(),0,d.length,a);return u.sort(b,0,b.length)}function S(a,b,d){return v=a,w=b,F=d,J=!0,c}function T(){return S(z,A,y)}function U(a){return S(B(a),C(a),y)}function V(a){function b(b){return a(b.value)}return o=i(b),u=g(b),c}function W(){return V(b)}function X(){return n}var c={top:R,all:Q,reduce:S,reduceCount:T,reduceSum:U,order:V,orderNatural:W,size:X},d,h,j=8,m=G(j),n=0,o,u,v,w,F,H=x,I=x,J=!0;return arguments.length<1&&(a=b),l.push(H),L.push(K),K(t,D,0,f),T().orderNatural()}function Y(){var a=X(x),b=a.all;return delete a.all,delete a.top,delete a.order,delete a.orderNatural,delete a.size,a.value=function(){return b()[0].value},a}var o={filter:S,filterExact:T,filterRange:U,filterAll:V,top:W,group:X,groupAll:Y},p=1<<h++,q=~p,t,D,H,I,J=m(function(a){return H[a]}),K=w,L=[],N=0,O=0;return n.unshift(P),n.push(Q),h>j&&(k=s(k,j<<=1)),P(e,0,f),Q(e,0,f),o}function t(){function i(a,d,g){var i;if(h)return;for(i=d;i<f;++i)k[i]||(b=c(b,e[i]))}function j(a,f,g){var i,j,l;if(h)return;for(i=0,l=f.length;i<l;++i)k[j=f[i]]||(b=c(b,e[j]));for(i=0,l=g.length;i<l;++i)k[j=g[i]]===a&&(b=d(b,e[j]))}function m(){var a;b=g();for(a=0;a<f;++a)k[a]||(b=c(b,e[a]))}function o(b,e,f){return c=b,d=e,g=f,h=!0,a}function p(){return o(z,A,y)}function q(a){return o(B(a),C(a),y)}function r(){return h&&(m(),h=!1),b}var a={reduce:o,reduceCount:p,reduceSum:q,value:r},b,c,d,g,h=!0;return l.push(j),n.push(i),i(e,0,f),p()}function D(){return f}var a={add:p,dimension:q,groupAll:t,size:D},e=[],f=0,h=0,j=8,k=o(0),l=[],n=[];return arguments.length?p(arguments[0]):a}function E(a,b){return(b<257?o:b<65537?p:q)(a)}function F(a){var b=E(a,a);for(var c=-1;++c<a;)b[c]=c;return b}function G(a){return a===8?256:a===16?65536:4294967296}D.version="1.0.3",D.permute=c;var d=D.bisect=e(b);d.by=e;var f=D.heap=g(b);f.by=g;var h=D.heapselect=i(b);h.by=i;var j=D.insertionsort=k(b);j.by=k;var l=D.quicksort=m(b);l.by=m;var n=32,o=t,p=t,q=t,r=b,s=b;typeof Uint8Array!="undefined"&&(o=function(a){return new Uint8Array(a)},p=function(a){return new Uint16Array(a)},q=function(a){return new Uint32Array(a)},r=function(a,b){var c=new a.constructor(b);return c.set(a),c},s=function(a,b){var c;switch(b){case 16:c=p(a.length);break;case 32:c=q(a.length);break;default:throw new Error("invalid array width!")}return c.set(a),c}),a.crossfilter=D})(this); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.js
deleted file mode 100644
index 7655eb78..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.js
+++ /dev/null
@@ -1,5 +0,0 @@
-!function(){function n(n,t){return t>n?-1:n>t?1:n>=t?0:0/0}function t(n){return null===n?0/0:+n}function e(n){return!isNaN(n)}function r(n){return{left:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)<0?r=i+1:u=i}return r},right:function(t,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=t.length);u>r;){var i=r+u>>>1;n(t[i],e)>0?u=i:r=i+1}return r}}}function u(n){return n.length}function i(n){for(var t=1;n*t%1;)t*=10;return t}function o(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function a(){this._=Object.create(null)}function c(n){return(n+="")===da||n[0]===ma?ma+n:n}function l(n){return(n+="")[0]===ma?n.slice(1):n}function s(n){return c(n)in this._}function f(n){return(n=c(n))in this._&&delete this._[n]}function h(){var n=[];for(var t in this._)n.push(l(t));return n}function g(){var n=0;for(var t in this._)++n;return n}function p(){for(var n in this._)return!1;return!0}function v(){this._=Object.create(null)}function d(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function m(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=ya.length;r>e;++e){var u=ya[e]+t;if(u in n)return u}}function y(){}function M(){}function x(n){function t(){for(var t,r=e,u=-1,i=r.length;++u<i;)(t=r[u].on)&&t.apply(this,arguments);return n}var e=[],r=new a;return t.on=function(t,u){var i,o=r.get(t);return arguments.length<2?o&&o.on:(o&&(o.on=null,e=e.slice(0,i=e.indexOf(o)).concat(e.slice(i+1)),r.remove(t)),u&&e.push(r.set(t,{on:u})),n)},t}function b(){ta.event.preventDefault()}function _(){for(var n,t=ta.event;n=t.sourceEvent;)t=n;return t}function w(n){for(var t=new M,e=0,r=arguments.length;++e<r;)t[arguments[e]]=x(t);return t.of=function(e,r){return function(u){try{var i=u.sourceEvent=ta.event;u.target=n,ta.event=u,t[u.type].apply(e,r)}finally{ta.event=i}}},t}function S(n){return xa(n,ka),n}function k(n){return"function"==typeof n?n:function(){return ba(n,this)}}function E(n){return"function"==typeof n?n:function(){return _a(n,this)}}function A(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function u(){this.setAttribute(n,t)}function i(){this.setAttributeNS(n.space,n.local,t)}function o(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=ta.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:o:n.local?i:u}function N(n){return n.trim().replace(/\s+/g," ")}function C(n){return new RegExp("(?:^|\\s+)"+ta.requote(n)+"(?:\\s+|$)","g")}function z(n){return(n+"").trim().split(/^|\s+/)}function q(n,t){function e(){for(var e=-1;++e<u;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<u;)n[e](this,r)}n=z(n).map(L);var u=n.length;return"function"==typeof t?r:e}function L(n){var t=C(n);return function(e,r){if(u=e.classList)return r?u.add(n):u.remove(n);var u=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(u)||e.setAttribute("class",N(u+" "+n))):e.setAttribute("class",N(u.replace(t," ")))}}function T(n,t,e){function r(){this.style.removeProperty(n)}function u(){this.style.setProperty(n,t,e)}function i(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?i:u}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function u(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?u:r}function D(n){return"function"==typeof n?n:(n=ta.ns.qualify(n)).local?function(){return this.ownerDocument.createElementNS(n.space,n.local)}:function(){return this.ownerDocument.createElementNS(this.namespaceURI,n)}}function P(){var n=this.parentNode;n&&n.removeChild(this)}function U(n){return{__data__:n}}function j(n){return function(){return Sa(this,n)}}function F(t){return arguments.length||(t=n),function(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}}function H(n,t){for(var e=0,r=n.length;r>e;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function O(n){return xa(n,Aa),n}function Y(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t<c;);return o}}function I(n){var t=n.__transition__;t&&++t.active}function Z(n,t,e){function r(){var t=this[o];t&&(this.removeEventListener(n,t,t.$),delete this[o])}function u(){var u=c(t,ra(arguments));r.call(this),this.addEventListener(n,this[o]=u,u.$=e),u._=t}function i(){var t,e=new RegExp("^__on([^.]+)"+ta.requote(n)+"$");for(var r in this)if(t=r.match(e)){var u=this[r];this.removeEventListener(t[1],u,u.$),delete this[r]}}var o="__on"+n,a=n.indexOf("."),c=V;a>0&&(n=n.slice(0,a));var l=Ca.get(n);return l&&(n=l,c=X),a?t?u:r:t?y:i}function V(n,t){return function(e){var r=ta.event;ta.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{ta.event=r}}}function X(n,t){var e=V(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function $(){var n=".dragsuppress-"+ ++qa,t="click"+n,e=ta.select(oa).on("touchmove"+n,b).on("dragstart"+n,b).on("selectstart"+n,b);if(za){var r=ia.style,u=r[za];r[za]="none"}return function(i){if(e.on(n,null),za&&(r[za]=u),i){var o=function(){e.on(t,null)};e.on(t,function(){b(),o()},!0),setTimeout(o,0)}}}function B(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>La&&(oa.scrollX||oa.scrollY)){e=ta.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();La=!(u.f||u.e),e.remove()}return La?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function W(){return ta.event.changedTouches[0].identifier}function J(){return ta.event.target}function G(){return oa}function K(n){return n>0?1:0>n?-1:0}function Q(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function nt(n){return n>1?0:-1>n?Da:Math.acos(n)}function tt(n){return n>1?ja:-1>n?-ja:Math.asin(n)}function et(n){return((n=Math.exp(n))-1/n)/2}function rt(n){return((n=Math.exp(n))+1/n)/2}function ut(n){return((n=Math.exp(2*n))-1)/(n+1)}function it(n){return(n=Math.sin(n/2))*n}function ot(){}function at(n,t,e){return this instanceof at?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof at?new at(n.h,n.s,n.l):bt(""+n,_t,at):new at(n,t,e)}function ct(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,new mt(u(n+120),u(n),u(n-120))}function lt(n,t,e){return this instanceof lt?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof lt?new lt(n.h,n.c,n.l):n instanceof ft?gt(n.l,n.a,n.b):gt((n=wt((n=ta.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new lt(n,t,e)}function st(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new ft(e,Math.cos(n*=Fa)*t,Math.sin(n)*t)}function ft(n,t,e){return this instanceof ft?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof ft?new ft(n.l,n.a,n.b):n instanceof lt?st(n.h,n.c,n.l):wt((n=mt(n)).r,n.g,n.b):new ft(n,t,e)}function ht(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=pt(u)*Ja,r=pt(r)*Ga,i=pt(i)*Ka,new mt(dt(3.2404542*u-1.5371385*r-.4985314*i),dt(-.969266*u+1.8760108*r+.041556*i),dt(.0556434*u-.2040259*r+1.0572252*i))}function gt(n,t,e){return n>0?new lt(Math.atan2(e,t)*Ha,Math.sqrt(t*t+e*e),n):new lt(0/0,0/0,n)}function pt(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function vt(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function dt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function mt(n,t,e){return this instanceof mt?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof mt?new mt(n.r,n.g,n.b):bt(""+n,mt,ct):new mt(n,t,e)}function yt(n){return new mt(n>>16,255&n>>8,255&n)}function Mt(n){return yt(n)+""}function xt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function bt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(kt(u[0]),kt(u[1]),kt(u[2]))}return(i=tc.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&i)>>4,o=o>>4|o,a=240&i,a=a>>4|a,c=15&i,c=c<<4|c):7===n.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),t(o,a,c))}function _t(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),new at(r,u,c)}function wt(n,t,e){n=St(n),t=St(t),e=St(e);var r=vt((.4124564*n+.3575761*t+.1804375*e)/Ja),u=vt((.2126729*n+.7151522*t+.072175*e)/Ga),i=vt((.0193339*n+.119192*t+.9503041*e)/Ka);return ft(116*u-16,500*(r-u),200*(u-i))}function St(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Et(n){return"function"==typeof n?n:function(){return n}}function At(n){return n}function Nt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ct(t,e,n,r)}}function Ct(n,t,e,r){function u(){var n,t=c.status;if(!t&&qt(c)||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=ta.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,l=null;return!oa.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=ta.event;ta.event=n;try{o.progress.call(i,c)}finally{ta.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(l=n,i):l},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(ra(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var s in a)c.setRequestHeader(s,a[s]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=l&&(c.responseType=l),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ta.rebind(i,o,"on"),null==r?i:i.get(zt(r))}function zt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function qt(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Lt(){var n=Tt(),t=Rt()-n;t>24?(isFinite(t)&&(clearTimeout(ic),ic=setTimeout(Lt,t)),uc=0):(uc=1,ac(Lt))}function Tt(){var n=Date.now();for(oc=ec;oc;)n>=oc.t&&(oc.f=oc.c(n-oc.t)),oc=oc.n;return n}function Rt(){for(var n,t=ec,e=1/0;t;)t.f?t=n?n.n=t.n:ec=t.n:(t.t<e&&(e=t.t),t=(n=t).n);return rc=n,e}function Dt(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Pt(n,t){var e=Math.pow(10,3*va(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Ut(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r&&e?function(n,t){for(var u=n.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>t&&(a=Math.max(1,t-c)),i.push(n.substring(u-=a,u+a)),!((c+=a+1)>t));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:At;return function(n){var e=lc.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",l=e[5],s=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===o)&&(l=r="0",o="="),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=sc.get(g)||jt;var M=l&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>p){var c=ta.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x,b,_=n.lastIndexOf(".");if(0>_){var w=y?n.lastIndexOf("e"):-1;0>w?(x=n,b=""):(x=n.substring(0,w),b=n.substring(w))}else x=n.substring(0,_),b=t+n.substring(_+1);!l&&f&&(x=i(x,1/0));var S=v.length+x.length+b.length+(M?0:u.length),k=s>S?new Array(S=s-S+1).join(r):"";return M&&(x=i(k+x,k.length?s-b.length:1/0)),u+=v,n=x+b,("<"===o?u+n+k:">"===o?k+u+n:"^"===o?k.substring(0,S>>=1)+u+n+k.substring(S):u+(M?n:k+n))+e}}}function jt(n){return n+""}function Ft(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new hc(e-1)),1),e}function i(n,e){return t(n=new hc(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{hc=Ft;var r=new Ft;return r._=n,o(r,t,e)}finally{hc=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Ot(n);return c.floor=c,c.round=Ot(r),c.ceil=Ot(u),c.offset=Ot(i),c.range=a,n}function Ot(n){return function(t,e){try{hc=Ft;var r=new Ft;return r._=t,n(r,e)._}finally{hc=Date}}}function Yt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++a<r;)37===n.charCodeAt(a)&&(o.push(n.slice(c,a)),null!=(u=pc[e=n.charAt(++a)])&&(e=n.charAt(++a)),(i=N[e])&&(e=i(t,null==u?"e"===e?" ":"0":u)),o.push(e),c=a+1);return o.push(n.slice(c,a)),o.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},u=e(r,n,t,0);if(u!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&hc!==Ft,o=new(i?Ft:hc);return"j"in r?o.setFullYear(r.y,0,r.j):"w"in r&&("W"in r||"U"in r)?(o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(0|r.Z/100),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var u,i,o,a=0,c=t.length,l=e.length;c>a;){if(r>=l)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=C[o in pc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){_.lastIndex=0;var r=_.exec(t.slice(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function c(n,t,r){return e(n,N.x.toString(),t,r)}function l(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=M.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{hc=Ft;var t=new hc;return t._=n,r(t)}finally{hc=Date}}var r=t(n);return e.parse=function(n){try{hc=Ft;var t=r.parse(n);return t&&t._}finally{hc=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ce;var M=ta.map(),x=Zt(v),b=Vt(v),_=Zt(d),w=Vt(d),S=Zt(m),k=Vt(m),E=Zt(y),A=Vt(y);p.forEach(function(n,t){M.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return It(n.getDate(),t,2)},e:function(n,t){return It(n.getDate(),t,2)},H:function(n,t){return It(n.getHours(),t,2)},I:function(n,t){return It(n.getHours()%12||12,t,2)},j:function(n,t){return It(1+fc.dayOfYear(n),t,3)},L:function(n,t){return It(n.getMilliseconds(),t,3)},m:function(n,t){return It(n.getMonth()+1,t,2)},M:function(n,t){return It(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return It(n.getSeconds(),t,2)},U:function(n,t){return It(fc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return It(fc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return It(n.getFullYear()%100,t,2)},Y:function(n,t){return It(n.getFullYear()%1e4,t,4)},Z:oe,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:ne,e:ne,H:ee,I:ee,j:te,L:ie,m:Qt,M:re,p:s,S:ue,U:$t,w:Xt,W:Bt,x:c,X:l,y:Jt,Y:Wt,Z:Gt,"%":ae};return t}function It(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function Zt(n){return new RegExp("^(?:"+n.map(ta.requote).join("|")+")","i")}function Vt(n){for(var t=new a,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function $t(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Bt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Wt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Jt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.y=Kt(+r[0]),e+r[0].length):-1}function Gt(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function Kt(n){return n+(n>68?1900:2e3)}function Qt(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function ne(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function te(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function ee(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function re(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ue(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function ie(n,t,e){vc.lastIndex=0;var r=vc.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function oe(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=0|va(t)/60,u=va(t)%60;return e+It(r,"0",2)+It(u,"0",2)}function ae(n,t,e){dc.lastIndex=0;var r=dc.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function ce(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function le(){}function se(n,t,e){var r=e.s=n+t,u=r-n,i=r-u;e.t=n-i+(t-u)}function fe(n,t){n&&xc.hasOwnProperty(n.type)&&xc[n.type](n,t)}function he(n,t,e){var r,u=-1,i=n.length-e;for(t.lineStart();++u<i;)r=n[u],t.point(r[0],r[1],r[2]);t.lineEnd()}function ge(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)he(n[e],t,1);t.polygonEnd()}function pe(){function n(n,t){n*=Fa,t=t*Fa/2+Da/4;var e=n-r,o=e>=0?1:-1,a=o*e,c=Math.cos(t),l=Math.sin(t),s=i*l,f=u*c+s*Math.cos(a),h=s*o*Math.sin(a);_c.add(Math.atan2(h,f)),r=n,u=c,i=l}var t,e,r,u,i;wc.point=function(o,a){wc.point=n,r=(t=o)*Fa,u=Math.cos(a=(e=a)*Fa/2+Da/4),i=Math.sin(a)},wc.lineEnd=function(){n(t,e)}}function ve(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function de(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function me(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function ye(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Me(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function xe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function be(n){return[Math.atan2(n[1],n[0]),tt(n[2])]}function _e(n,t){return va(n[0]-t[0])<Ta&&va(n[1]-t[1])<Ta}function we(n,t){n*=Fa;var e=Math.cos(t*=Fa);Se(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Se(n,t,e){++Sc,Ec+=(n-Ec)/Sc,Ac+=(t-Ac)/Sc,Nc+=(e-Nc)/Sc}function ke(){function n(n,u){n*=Fa;var i=Math.cos(u*=Fa),o=i*Math.cos(n),a=i*Math.sin(n),c=Math.sin(u),l=Math.atan2(Math.sqrt((l=e*c-r*a)*l+(l=r*o-t*c)*l+(l=t*a-e*o)*l),t*o+e*a+r*c);kc+=l,Cc+=l*(t+(t=o)),zc+=l*(e+(e=a)),qc+=l*(r+(r=c)),Se(t,e,r)}var t,e,r;Dc.point=function(u,i){u*=Fa;var o=Math.cos(i*=Fa);t=o*Math.cos(u),e=o*Math.sin(u),r=Math.sin(i),Dc.point=n,Se(t,e,r)}}function Ee(){Dc.point=we}function Ae(){function n(n,t){n*=Fa;var e=Math.cos(t*=Fa),o=e*Math.cos(n),a=e*Math.sin(n),c=Math.sin(t),l=u*c-i*a,s=i*o-r*c,f=r*a-u*o,h=Math.sqrt(l*l+s*s+f*f),g=r*o+u*a+i*c,p=h&&-nt(g)/h,v=Math.atan2(h,g);Lc+=p*l,Tc+=p*s,Rc+=p*f,kc+=v,Cc+=v*(r+(r=o)),zc+=v*(u+(u=a)),qc+=v*(i+(i=c)),Se(r,u,i)}var t,e,r,u,i;Dc.point=function(o,a){t=o,e=a,Dc.point=n,o*=Fa;var c=Math.cos(a*=Fa);r=c*Math.cos(o),u=c*Math.sin(o),i=Math.sin(a),Se(r,u,i)},Dc.lineEnd=function(){n(t,e),Dc.lineEnd=Ee,Dc.point=we}}function Ne(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function Ce(){return!0}function ze(n,t,e,r,u){var i=[],o=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(_e(e,r)){u.lineStart();for(var a=0;t>a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new Le(e,n,null,!0),l=new Le(e,null,c,!1);c.o=l,i.push(c),o.push(l),c=new Le(r,n,null,!1),l=new Le(r,null,c,!0),c.o=l,i.push(c),o.push(l)}}),o.sort(t),qe(i),qe(o),i.length){for(var a=0,c=e,l=o.length;l>a;++a)o[a].e=c=!c;for(var s,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;s=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,l=s.length;l>a;++a)u.point((f=s[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){s=g.p.z;for(var a=s.length-1;a>=0;--a)u.point((f=s[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,s=g.z,p=!p}while(!g.v);u.lineEnd()}}}function qe(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r<t;)u.n=e=n[r],e.p=u,u=e;u.n=e=n[0],e.p=u}}function Le(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Te(n,t,e,r){return function(u,i){function o(t,e){var r=u(t,e);n(t=r[0],e=r[1])&&i.point(t,e)}function a(n,t){var e=u(n,t);d.point(e[0],e[1])}function c(){y.point=a,d.lineStart()}function l(){y.point=o,d.lineEnd()}function s(n,t){v.push([n,t]);var e=u(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),v=[]}function h(){s(v[0][0],v[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(v.pop(),p.push(v),v=null,r)if(1&t){n=e[0];var u,r=n.length-1,o=-1;if(r>0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o<r;)i.point((u=n[o])[0],u[1]);i.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Re))}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:l,polygonStart:function(){y.point=s,y.lineStart=f,y.lineEnd=h,g=[],p=[]},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=l,g=ta.merge(g);var n=He(m,p);g.length?(b||(i.polygonStart(),b=!0),ze(g,Pe,n,e,i)):n&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},M=De(),x=t(M),b=!1;return y}}function Re(n){return n.length>1}function De(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:y,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Pe(n,t){return((n=n.x)[0]<0?n[1]-ja-Ta:ja-n[1])-((t=t.x)[0]<0?t[1]-ja-Ta:ja-t[1])}function Ue(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Da:-Da,c=va(i-e);va(c-Da)<Ta?(n.point(e,r=(r+o)/2>0?ja:-ja),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Da&&(va(e-u)<Ta&&(e-=u*Ta),va(i-a)<Ta&&(i-=a*Ta),r=je(e,r,i,o),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=i,r=o),u=a},lineEnd:function(){n.lineEnd(),e=r=0/0},clean:function(){return 2-t}}}function je(n,t,e,r){var u,i,o=Math.sin(n-e);return va(o)>Ta?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Fe(n,t,e,r){var u;if(null==n)u=e*ja,r.point(-Da,u),r.point(0,u),r.point(Da,u),r.point(Da,0),r.point(Da,-u),r.point(0,-u),r.point(-Da,-u),r.point(-Da,0),r.point(-Da,u);else if(va(n[0]-t[0])>Ta){var i=n[0]<t[0]?Da:-Da;u=e*i/2,r.point(-i,u),r.point(0,u),r.point(i,u)}else r.point(t[0],t[1])}function He(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;_c.reset();for(var a=0,c=t.length;c>a;++a){var l=t[a],s=l.length;if(s)for(var f=l[0],h=f[0],g=f[1]/2+Da/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===s&&(d=0),n=l[d];var m=n[0],y=n[1]/2+Da/4,M=Math.sin(y),x=Math.cos(y),b=m-h,_=b>=0?1:-1,w=_*b,S=w>Da,k=p*M;if(_c.add(Math.atan2(k*_*Math.sin(w),v*x+k*Math.cos(w))),i+=S?b+_*Pa:b,S^h>=e^m>=e){var E=me(ve(f),ve(n));xe(E);var A=me(u,E);xe(A);var N=(S^b>=0?-1:1)*tt(A[2]);(r>N||r===N&&(E[0]||E[1]))&&(o+=S^b>=0?1:-1)}if(!d++)break;h=m,p=M,v=x,f=n}}return(-Ta>i||Ta>i&&0>_c)^1&o}function Oe(n){function t(n,t){return Math.cos(n)*Math.cos(t)>i}function e(n){var e,i,c,l,s;return{lineStart:function(){l=c=!1,s=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Da:-Da),h):0;if(!e&&(l=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(_e(e,g)||_e(p,g))&&(p[0]+=Ta,p[1]+=Ta,v=t(p[0],p[1]))),v!==c)s=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(s=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&_e(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return s|(l&&c)<<1}}}function r(n,t,e){var r=ve(n),u=ve(t),o=[1,0,0],a=me(r,u),c=de(a,a),l=a[0],s=c-l*l;if(!s)return!e&&n;var f=i*c/s,h=-i*l/s,g=me(o,a),p=Me(o,f),v=Me(a,h);ye(p,v);var d=g,m=de(p,d),y=de(d,d),M=m*m-y*(de(p,p)-1);if(!(0>M)){var x=Math.sqrt(M),b=Me(d,(-m-x)/y);if(ye(b,p),b=be(b),!e)return b;var _,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(_=w,w=S,S=_);var A=S-w,N=va(A-Da)<Ta,C=N||Ta>A;if(!N&&k>E&&(_=k,k=E,E=_),C?N?k+E>0^b[1]<(va(b[0]-w)<Ta?k:E):k<=b[1]&&b[1]<=E:A>Da^(w<=b[0]&&b[0]<=S)){var z=Me(d,(-m+x)/y);return ye(z,p),[b,be(z)]}}}function u(t,e){var r=o?n:Da-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=va(i)>Ta,c=pr(n,6*Fa);return Te(t,e,c,o?[0,-n]:[-Da,n-Da])}function Ye(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,l=o.y,s=a.x,f=a.y,h=0,g=1,p=s-c,v=f-l;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-l,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-l,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:l+h*v}),1>g&&(u.b={x:c+g*p,y:l+g*v}),u}}}}}}function Ie(n,t,e,r){function u(r,u){return va(r[0]-n)<Ta?u>0?0:3:va(r[0]-e)<Ta?u>0?2:1:va(r[1]-t)<Ta?u>0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,l=a[0];c>o;++o)i=a[o],l[1]<=r?i[1]>r&&Q(l,i,n)>0&&++t:i[1]<=r&&Q(l,i,n)<0&&--t,l=i;return 0!==t}function l(i,a,c,l){var s=0,f=0;if(null==i||(s=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do l.point(0===s||3===s?n:e,s>1?r:t);while((s=(s+c+4)%4)!==f)}else l.point(a[0],a[1])}function s(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=p,d&&d.push(m=[]),S=!0,w=!1,b=_=0/0}function g(){v&&(p(y,M),x&&w&&A.rejoin(),v.push(A.buffer())),C.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Uc,Math.min(Uc,n)),t=Math.max(-Uc,Math.min(Uc,t));var e=s(n,t);if(d&&m.push([n,t]),S)y=n,M=t,x=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:b,y:_},b:{x:n,y:t}};N(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}b=n,_=t,w=e}var v,d,m,y,M,x,b,_,w,S,k,E=a,A=De(),N=Ye(n,t,e,r),C={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=ta.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),l(null,null,1,a),a.lineEnd()),u&&ze(v,i,t,l,a),a.polygonEnd()),v=d=m=null}};return C}}function Ze(n){var t=0,e=Da/3,r=or(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Da/180,e=n[1]*Da/180):[180*(t/Da),180*(e/Da)]},u}function Ve(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,tt((i-(n*n+e*e)*u*u)/(2*u))]},e}function Xe(){function n(n,t){Fc+=u*n-r*t,r=n,u=t}var t,e,r,u;Zc.point=function(i,o){Zc.point=n,t=r=i,e=u=o},Zc.lineEnd=function(){n(t,e)}}function $e(n,t){Hc>n&&(Hc=n),n>Yc&&(Yc=n),Oc>t&&(Oc=t),t>Ic&&(Ic=t)}function Be(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=We(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=We(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function We(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Je(n,t){Ec+=n,Ac+=t,++Nc}function Ge(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);Cc+=o*(t+n)/2,zc+=o*(e+r)/2,qc+=o,Je(t=n,e=r)}var t,e;Xc.point=function(r,u){Xc.point=n,Je(t=r,e=u)}}function Ke(){Xc.point=Je}function Qe(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);Cc+=o*(r+n)/2,zc+=o*(u+t)/2,qc+=o,o=u*n-r*t,Lc+=o*(r+n),Tc+=o*(u+t),Rc+=3*o,Je(r=n,u=t)}var t,e,r,u;Xc.point=function(i,o){Xc.point=n,Je(t=r=i,e=u=o)},Xc.lineEnd=function(){n(t,e)}}function nr(n){function t(t,e){n.moveTo(t+o,e),n.arc(t,e,o,0,Pa)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:y};return a}function tr(n){function t(n){return(a?r:e)(n)}function e(t){return ur(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){M=0/0,S.point=i,t.lineStart()}function i(e,r){var i=ve([e,r]),o=n(e,r);u(M,x,y,b,_,w,M=o[0],x=o[1],y=e,b=i[0],_=i[1],w=i[2],a,t),t.point(M,x)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=l,S.lineEnd=s}function l(n,t){i(f=n,h=t),g=M,p=x,v=b,d=_,m=w,S.point=i}function s(){u(M,x,y,b,_,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,M,x,b,_,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,l,s,f,h,g,p,v,d,m){var y=s-t,M=f-e,x=y*y+M*M;if(x>4*i&&d--){var b=a+g,_=c+p,w=l+v,S=Math.sqrt(b*b+_*_+w*w),k=Math.asin(w/=S),E=va(va(w)-1)<Ta||va(r-h)<Ta?(r+h)/2:Math.atan2(_,b),A=n(E,k),N=A[0],C=A[1],z=N-t,q=C-e,L=M*z-y*q;
-(L*L/x>i||va((y*z+M*q)/x-.5)>.3||o>a*g+c*p+l*v)&&(u(t,e,r,a,c,l,N,C,E,b/=S,_/=S,w,d,m),m.point(N,C),u(N,C,E,b,_,w,s,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Fa),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function er(n){var t=tr(function(t,e){return n([t*Ha,e*Ha])});return function(n){return ar(t(n))}}function rr(n){this.stream=n}function ur(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ir(n){return or(function(){return n})()}function or(n){function t(n){return n=a(n[0]*Fa,n[1]*Fa),[n[0]*h+c,l-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(l-n[1])/h),n&&[n[0]*Ha,n[1]*Ha]}function r(){a=Ne(o=sr(m,y,M),i);var n=i(v,d);return c=g-n[0]*h,l=p+n[1]*h,u()}function u(){return s&&(s.valid=!1,s=null),t}var i,o,a,c,l,s,f=tr(function(n,t){return n=i(n,t),[n[0]*h+c,l-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,M=0,x=Pc,b=At,_=null,w=null;return t.stream=function(n){return s&&(s.valid=!1),s=ar(x(o,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(_=n,Pc):Oe((_=+n)*Fa),u()):_},t.clipExtent=function(n){return arguments.length?(w=n,b=n?Ie(n[0][0],n[0][1],n[1][0],n[1][1]):At,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Fa,d=n[1]%360*Fa,r()):[v*Ha,d*Ha]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Fa,y=n[1]%360*Fa,M=n.length>2?n[2]%360*Fa:0,r()):[m*Ha,y*Ha,M*Ha]},ta.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function ar(n){return ur(n,function(t,e){n.point(t*Fa,e*Fa)})}function cr(n,t){return[n,t]}function lr(n,t){return[n>Da?n-Pa:-Da>n?n+Pa:n,t]}function sr(n,t,e){return n?t||e?Ne(hr(n),gr(t,e)):hr(n):t||e?gr(t,e):lr}function fr(n){return function(t,e){return t+=n,[t>Da?t-Pa:-Da>t?t+Pa:t,e]}}function hr(n){var t=fr(n);return t.invert=fr(-n),t}function gr(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*r+a*u;return[Math.atan2(c*i-s*o,a*r-l*u),tt(s*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,l=Math.sin(t),s=l*i-c*o;return[Math.atan2(c*i+l*o,a*r+s*u),tt(s*r-a*u)]},e}function pr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=vr(e,u),i=vr(e,i),(o>0?i>u:u>i)&&(u+=o*Pa)):(u=n+o*Pa,i=n-.5*c);for(var l,s=u;o>0?s>i:i>s;s-=c)a.point((l=be([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],l[1])}}function vr(n,t){var e=ve(t);e[0]-=n,xe(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ta)%(2*Math.PI)}function dr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function mr(n,t,e){var r=ta.range(n,t-Ta,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function yr(n){return n.source}function Mr(n){return n.target}function xr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),l=u*Math.sin(n),s=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(it(r-t)+u*o*it(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*s,u=e*l+t*f,o=e*i+t*a;return[Math.atan2(u,r)*Ha,Math.atan2(o,Math.sqrt(r*r+u*u))*Ha]}:function(){return[n*Ha,t*Ha]};return p.distance=h,p}function br(){function n(n,u){var i=Math.sin(u*=Fa),o=Math.cos(u),a=va((n*=Fa)-t),c=Math.cos(a);$c+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;Bc.point=function(u,i){t=u*Fa,e=Math.sin(i*=Fa),r=Math.cos(i),Bc.point=n},Bc.lineEnd=function(){Bc.point=Bc.lineEnd=y}}function _r(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function wr(n,t){function e(n,t){o>0?-ja+Ta>t&&(t=-ja+Ta):t>ja-Ta&&(t=ja-Ta);var e=o/Math.pow(u(t),i);return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),u=function(n){return Math.tan(Da/4+n/2)},i=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(u(t)/u(n)),o=r*Math.pow(u(n),i)/i;return i?(e.invert=function(n,t){var e=o-t,r=K(i)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/i,2*Math.atan(Math.pow(o/r,1/i))-ja]},e):kr}function Sr(n,t){function e(n,t){var e=i-t;return[e*Math.sin(u*n),i-e*Math.cos(u*n)]}var r=Math.cos(n),u=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),i=r/u+n;return va(u)<Ta?cr:(e.invert=function(n,t){var e=i-t;return[Math.atan2(n,e)/u,i-K(u)*Math.sqrt(n*n+e*e)]},e)}function kr(n,t){return[n,Math.log(Math.tan(Da/4+t/2))]}function Er(n){var t,e=ir(n),r=e.scale,u=e.translate,i=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=u.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var o=i.apply(e,arguments);if(o===e){if(t=null==n){var a=Da*r(),c=u();i([[c[0]-a,c[1]-a],[c[0]+a,c[1]+a]])}}else t&&(o=null);return o},e.clipExtent(null)}function Ar(n,t){return[Math.log(Math.tan(Da/4+t/2)),-n]}function Nr(n){return n[0]}function Cr(n){return n[1]}function zr(n){for(var t=n.length,e=[0,1],r=2,u=2;t>u;u++){for(;r>1&&Q(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function qr(n,t){return n[0]-t[0]||n[1]-t[1]}function Lr(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Tr(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],l=e[1],s=t[1]-c,f=r[1]-l,h=(a*(c-l)-f*(u-i))/(f*o-a*s);return[u+h*o,c+h*s]}function Rr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Dr(){eu(this),this.edge=this.site=this.circle=null}function Pr(n){var t=ol.pop()||new Dr;return t.site=n,t}function Ur(n){$r(n),rl.remove(n),ol.push(n),eu(n)}function jr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];Ur(n);for(var c=i;c.circle&&va(e-c.circle.x)<Ta&&va(r-c.circle.cy)<Ta;)i=c.P,a.unshift(c),Ur(c),c=i;a.unshift(c),$r(c);for(var l=o;l.circle&&va(e-l.circle.x)<Ta&&va(r-l.circle.cy)<Ta;)o=l.N,a.push(l),Ur(l),l=o;a.push(l),$r(l);var s,f=a.length;for(s=1;f>s;++s)l=a[s],c=a[s-1],Qr(l.edge,c.site,l.site,u);c=a[0],l=a[f-1],l.edge=Gr(c.site,l.site,null,u),Xr(c),Xr(l)}function Fr(n){for(var t,e,r,u,i=n.x,o=n.y,a=rl._;a;)if(r=Hr(a,o)-i,r>Ta)a=a.L;else{if(u=i-Or(a,o),!(u>Ta)){r>-Ta?(t=a.P,e=a):u>-Ta?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Pr(n);if(rl.insert(t,c),t||e){if(t===e)return $r(t),e=Pr(t.site),rl.insert(c,e),c.edge=e.edge=Gr(t.site,c.site),Xr(t),Xr(e),void 0;if(!e)return c.edge=Gr(t.site,c.site),void 0;$r(t),$r(e);var l=t.site,s=l.x,f=l.y,h=n.x-s,g=n.y-f,p=e.site,v=p.x-s,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,M=v*v+d*d,x={x:(d*y-g*M)/m+s,y:(h*M-v*y)/m+f};Qr(e.edge,l,p,x),c.edge=Gr(l,n,null,x),e.edge=Gr(n,p,null,x),Xr(t),Xr(e)}}function Hr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,l=c-t;if(!l)return a;var s=a-r,f=1/i-1/l,h=s/l;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*l)-c+l/2+u-i/2)))/f+r:(r+a)/2}function Or(n,t){var e=n.N;if(e)return Hr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Yr(n){this.site=n,this.edges=[]}function Ir(n){for(var t,e,r,u,i,o,a,c,l,s,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=el,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)s=a[o].end(),r=s.x,u=s.y,l=a[++o%c].start(),t=l.x,e=l.y,(va(r-t)>Ta||va(u-e)>Ta)&&(a.splice(o,0,new nu(Kr(i.site,s,va(r-f)<Ta&&p-u>Ta?{x:f,y:va(t-f)<Ta?e:p}:va(u-p)<Ta&&h-r>Ta?{x:va(e-p)<Ta?t:h,y:p}:va(r-h)<Ta&&u-g>Ta?{x:h,y:va(t-h)<Ta?e:g}:va(u-g)<Ta&&r-f>Ta?{x:va(e-g)<Ta?t:f,y:g}:null),i.site,null)),++c)}function Zr(n,t){return t.angle-n.angle}function Vr(){eu(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xr(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,u=n.site,i=e.site;if(r!==i){var o=u.x,a=u.y,c=r.x-o,l=r.y-a,s=i.x-o,f=i.y-a,h=2*(c*f-l*s);if(!(h>=-Ra)){var g=c*c+l*l,p=s*s+f*f,v=(f*g-l*p)/h,d=(c*p-s*g)/h,f=d+a,m=al.pop()||new Vr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,M=il._;M;)if(m.y<M.y||m.y===M.y&&m.x<=M.x){if(!M.L){y=M.P;break}M=M.L}else{if(!M.R){y=M;break}M=M.R}il.insert(y,m),y||(ul=m)}}}}function $r(n){var t=n.circle;t&&(t.P||(ul=t.N),il.remove(t),al.push(t),eu(t),n.circle=null)}function Br(n){for(var t,e=tl,r=Ye(n[0][0],n[0][1],n[1][0],n[1][1]),u=e.length;u--;)t=e[u],(!Wr(t,n)||!r(t)||va(t.a.x-t.b.x)<Ta&&va(t.a.y-t.b.y)<Ta)&&(t.a=t.b=null,e.splice(u,1))}function Wr(n,t){var e=n.b;if(e)return!0;var r,u,i=n.a,o=t[0][0],a=t[1][0],c=t[0][1],l=t[1][1],s=n.l,f=n.r,h=s.x,g=s.y,p=f.x,v=f.y,d=(h+p)/2,m=(g+v)/2;if(v===g){if(o>d||d>=a)return;if(h>p){if(i){if(i.y>=l)return}else i={x:d,y:c};e={x:d,y:l}}else{if(i){if(i.y<c)return}else i={x:d,y:l};e={x:d,y:c}}}else if(r=(h-p)/(v-g),u=m-r*d,-1>r||r>1)if(h>p){if(i){if(i.y>=l)return}else i={x:(c-u)/r,y:c};e={x:(l-u)/r,y:l}}else{if(i){if(i.y<c)return}else i={x:(l-u)/r,y:l};e={x:(c-u)/r,y:c}}else if(v>g){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.x<o)return}else i={x:a,y:r*a+u};e={x:o,y:r*o+u}}return n.a=i,n.b=e,!0}function Jr(n,t){this.l=n,this.r=t,this.a=this.b=null}function Gr(n,t,e,r){var u=new Jr(n,t);return tl.push(u),e&&Qr(u,n,t,e),r&&Qr(u,t,n,r),el[n.i].edges.push(new nu(u,n,t)),el[t.i].edges.push(new nu(u,t,n)),u}function Kr(n,t,e){var r=new Jr(n,null);return r.a=t,r.b=e,tl.push(r),r}function Qr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function nu(n,t,e){var r=n.a,u=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(u.x-r.x,r.y-u.y):Math.atan2(r.x-u.x,u.y-r.y)}function tu(){this._=null}function eu(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function ru(n,t){var e=t,r=t.R,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function uu(n,t){var e=t,r=t.L,u=e.U;u?u.L===e?u.L=r:u.R=r:n._=r,r.U=u,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function iu(n){for(;n.L;)n=n.L;return n}function ou(n,t){var e,r,u,i=n.sort(au).pop();for(tl=[],el=new Array(n.length),rl=new tu,il=new tu;;)if(u=ul,i&&(!u||i.y<u.y||i.y===u.y&&i.x<u.x))(i.x!==e||i.y!==r)&&(el[i.i]=new Yr(i),Fr(i),e=i.x,r=i.y),i=n.pop();else{if(!u)break;jr(u.arc)}t&&(Br(t),Ir(t));var o={cells:el,edges:tl};return rl=il=tl=el=null,o}function au(n,t){return t.y-n.y||t.x-n.x}function cu(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function lu(n){return n.x}function su(n){return n.y}function fu(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function hu(n,t,e,r,u,i){if(!n(t,e,r,u,i)){var o=.5*(e+u),a=.5*(r+i),c=t.nodes;c[0]&&hu(n,c[0],e,r,o,a),c[1]&&hu(n,c[1],o,r,u,a),c[2]&&hu(n,c[2],e,a,o,i),c[3]&&hu(n,c[3],o,a,u,i)}}function gu(n,t,e,r,u,i,o){var a,c=1/0;return function l(n,s,f,h,g){if(!(s>i||f>o||r>h||u>g)){if(p=n.point){var p,v=t-p[0],d=e-p[1],m=v*v+d*d;if(c>m){var y=Math.sqrt(c=m);r=t-y,u=e-y,i=t+y,o=e+y,a=p}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+g),_=t>=x,w=e>=b,S=w<<1|_,k=S+4;k>S;++S)if(n=M[3&S])switch(3&S){case 0:l(n,s,f,x,b);break;case 1:l(n,x,f,h,b);break;case 2:l(n,s,b,x,g);break;case 3:l(n,x,b,h,g)}}}(n,r,u,i,o),a}function pu(n,t){n=ta.rgb(n),t=ta.rgb(t);var e=n.r,r=n.g,u=n.b,i=t.r-e,o=t.g-r,a=t.b-u;return function(n){return"#"+xt(Math.round(e+i*n))+xt(Math.round(r+o*n))+xt(Math.round(u+a*n))}}function vu(n,t){var e,r={},u={};for(e in n)e in t?r[e]=yu(n[e],t[e]):u[e]=n[e];for(e in t)e in n||(u[e]=t[e]);return function(n){for(e in r)u[e]=r[e](n);return u}}function du(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function mu(n,t){var e,r,u,i=ll.lastIndex=sl.lastIndex=0,o=-1,a=[],c=[];for(n+="",t+="";(e=ll.exec(n))&&(r=sl.exec(t));)(u=r.index)>i&&(u=t.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:du(e,r)})),i=sl.lastIndex;return i<t.length&&(u=t.slice(i),a[o]?a[o]+=u:a[++o]=u),a.length<2?c[0]?(t=c[0].x,function(n){return t(n)+""}):function(){return t}:(t=c.length,function(n){for(var e,r=0;t>r;++r)a[(e=c[r]).i]=e.x(n);return a.join("")})}function yu(n,t){for(var e,r=ta.interpolators.length;--r>=0&&!(e=ta.interpolators[r](n,t)););return e}function Mu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(yu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function xu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function bu(n){return function(t){return 1-n(1-t)}}function _u(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function wu(n){return n*n}function Su(n){return n*n*n}function ku(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Eu(n){return function(t){return Math.pow(t,n)}}function Au(n){return 1-Math.cos(n*ja)}function Nu(n){return Math.pow(2,10*(n-1))}function Cu(n){return 1-Math.sqrt(1-n*n)}function zu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Pa*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Pa/t)}}function qu(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function Lu(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Tu(n,t){n=ta.hcl(n),t=ta.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return st(e+i*n,r+o*n,u+a*n)+""}}function Ru(n,t){n=ta.hsl(n),t=ta.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return ct(e+i*n,r+o*n,u+a*n)+""}}function Du(n,t){n=ta.lab(n),t=ta.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ht(e+i*n,r+o*n,u+a*n)+""}}function Pu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Uu(n){var t=[n.a,n.b],e=[n.c,n.d],r=Fu(t),u=ju(t,e),i=Fu(Hu(e,t,-u))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,u*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Ha,this.translate=[n.e,n.f],this.scale=[r,i],this.skew=i?Math.atan2(u,i)*Ha:0}function ju(n,t){return n[0]*t[0]+n[1]*t[1]}function Fu(n){var t=Math.sqrt(ju(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hu(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ou(n,t){var e,r=[],u=[],i=ta.transform(n),o=ta.transform(t),a=i.translate,c=o.translate,l=i.rotate,s=o.rotate,f=i.skew,h=o.skew,g=i.scale,p=o.scale;return a[0]!=c[0]||a[1]!=c[1]?(r.push("translate(",null,",",null,")"),u.push({i:1,x:du(a[0],c[0])},{i:3,x:du(a[1],c[1])})):c[0]||c[1]?r.push("translate("+c+")"):r.push(""),l!=s?(l-s>180?s+=360:s-l>180&&(l+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:du(l,s)})):s&&r.push(r.pop()+"rotate("+s+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:du(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:du(g[0],p[0])},{i:e-2,x:du(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++i<e;)r[(t=u[i]).i]=t.x(n);return r.join("")}}function Yu(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Iu(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Zu(n){for(var t=n.source,e=n.target,r=Xu(t,e),u=[t];t!==r;)t=t.parent,u.push(t);for(var i=u.length;e!==r;)u.splice(i,0,e),e=e.parent;return u}function Vu(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Xu(n,t){if(n===t)return n;for(var e=Vu(n),r=Vu(t),u=e.pop(),i=r.pop(),o=null;u===i;)o=u,u=e.pop(),i=r.pop();return o}function $u(n){n.fixed|=2}function Bu(n){n.fixed&=-7}function Wu(n){n.fixed|=4,n.px=n.x,n.py=n.y}function Ju(n){n.fixed&=-5}function Gu(n,t,e){var r=0,u=0;if(n.charge=0,!n.leaf)for(var i,o=n.nodes,a=o.length,c=-1;++c<a;)i=o[c],null!=i&&(Gu(i,t,e),n.charge+=i.charge,r+=i.charge*i.cx,u+=i.charge*i.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var l=t*e[n.point.index];n.charge+=n.pointCharge=l,r+=l*n.point.x,u+=l*n.point.y}n.cx=r/n.charge,n.cy=u/n.charge}function Ku(n,t){return ta.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=ui,n}function Qu(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(u=n.children)&&(r=u.length))for(var r,u;--r>=0;)e.push(u[r])}function ni(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(i=n.children)&&(u=i.length))for(var u,i,o=-1;++o<u;)e.push(i[o]);for(;null!=(n=r.pop());)t(n)}function ti(n){return n.children}function ei(n){return n.value}function ri(n,t){return t.value-n.value}function ui(n){return ta.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function ii(n){return n.x}function oi(n){return n.y}function ai(n,t,e){n.y0=t,n.y=e}function ci(n){return ta.range(n.length)}function li(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function si(n){for(var t,e=1,r=0,u=n[0][1],i=n.length;i>e;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function fi(n){return n.reduce(hi,0)}function hi(n,t){return n+t[1]}function gi(n,t){return pi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function pi(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function vi(n){return[ta.min(n),ta.max(n)]}function di(n,t){return n.value-t.value}function mi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function yi(n,t){n._pack_next=t,t._pack_prev=n}function Mi(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function xi(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(l=e.length)){var e,r,u,i,o,a,c,l,s=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(bi),r=e[0],r.x=-r.r,r.y=0,t(r),l>1&&(u=e[1],u.x=u.r,u.y=0,t(u),l>2))for(i=e[2],Si(r,u,i),t(i),mi(r,i),r._pack_prev=i,mi(i,u),u=r._pack_next,o=3;l>o;o++){Si(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(Mi(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!Mi(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.r<r.r?yi(r,u=a):yi(r=c,u),o--):(mi(r,i),u=i,t(i))}var m=(s+f)/2,y=(h+g)/2,M=0;for(o=0;l>o;o++)i=e[o],i.x-=m,i.y-=y,M=Math.max(M,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=M,e.forEach(_i)}}function bi(n){n._pack_next=n._pack_prev=n}function _i(n){delete n._pack_next,delete n._pack_prev}function wi(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++i<o;)wi(u[i],t,e,r)}function Si(n,t,e){var r=n.r+e.r,u=t.x-n.x,i=t.y-n.y;if(r&&(u||i)){var o=t.r+e.r,a=u*u+i*i;o*=o,r*=r;var c=.5+(r-o)/(2*a),l=Math.sqrt(Math.max(0,2*o*(r+a)-(r-=a)*r-o*o))/(2*a);e.x=n.x+c*u+l*i,e.y=n.y+c*i-l*u}else e.x=n.x+r,e.y=n.y}function ki(n,t){return n.parent==t.parent?1:2}function Ei(n){var t=n.children;return t.length?t[0]:n.t}function Ai(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Ni(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Ci(n){for(var t,e=0,r=0,u=n.children,i=u.length;--i>=0;)t=u[i],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function zi(n,t,e){return n.a.parent===t.parent?n.a:e}function qi(n){return 1+ta.max(n,function(n){return n.y})}function Li(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Ti(n){var t=n.children;return t&&t.length?Ti(t[0]):n}function Ri(n){var t,e=n.children;return e&&(t=e.length)?Ri(e[t-1]):n}function Di(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Pi(n,t){var e=n.x+t[3],r=n.y+t[0],u=n.dx-t[1]-t[3],i=n.dy-t[0]-t[2];return 0>u&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ui(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function ji(n){return n.rangeExtent?n.rangeExtent():Ui(n.range())}function Fi(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Hi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Oi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Yi(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++o<=a;)u.push(e(n[o-1],n[o])),i.push(r(t[o-1],t[o]));return function(t){var e=ta.bisect(n,t,1,a)-1;return i[e](u[e](t))}}function Ii(n,t,e,r){function u(){var u=Math.min(n.length,t.length)>2?Yi:Fi,c=r?Iu:Yu;return o=u(n,t,c,e),a=u(t,n,c,yu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Pu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return $i(n,t)},i.tickFormat=function(t,e){return Bi(n,t,e)},i.nice=function(t){return Vi(n,t),u()},i.copy=function(){return Ii(n,t,e,r)},u()}function Zi(n,t){return ta.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Vi(n,t){return Hi(n,Oi(Xi(n,t)[2]))}function Xi(n,t){null==t&&(t=10);var e=Ui(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function $i(n,t){return ta.range.apply(ta,Xi(n,t))}function Bi(n,t,e){var r=Xi(n,t);if(e){var u=lc.exec(e);if(u.shift(),"s"===u[8]){var i=ta.formatPrefix(Math.max(va(r[0]),va(r[1])));return u[7]||(u[7]="."+Wi(i.scale(r[2]))),u[8]="f",e=ta.format(u.join("")),function(n){return e(i.scale(n))+i.symbol}}u[7]||(u[7]="."+Ji(u[8],r)),e=u.join("")}else e=",."+Wi(r[2])+"f";return ta.format(e)}function Wi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Ji(n,t){var e=Wi(t[2]);return n in _l?Math.abs(e-Wi(Math.max(va(t[0]),va(t[1]))))+ +("e"!==n):e-2*("%"===n)}function Gi(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Hi(r.map(u),e?Math:Sl);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ui(r),o=[],a=n[0],c=n[1],l=Math.floor(u(a)),s=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(s-l)){if(e){for(;s>l;l++)for(var h=1;f>h;h++)o.push(i(l)*h);o.push(i(l))}else for(o.push(i(l));l++<s;)for(var h=f-1;h>0;h--)o.push(i(l)*h);for(l=0;o[l]<a;l++);for(s=o.length;o[s-1]>c;s--);o=o.slice(l,s)}return o},o.tickFormat=function(n,t){if(!arguments.length)return wl;arguments.length<2?t=wl:"function"!=typeof t&&(t=ta.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return Gi(n.copy(),t,e,r)},Zi(o,n)}function Ki(n,t,e){function r(t){return n(u(t))}var u=Qi(t),i=Qi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return $i(e,n)},r.tickFormat=function(n,t){return Bi(e,n,t)},r.nice=function(n){return r.domain(Vi(e,n))},r.exponent=function(o){return arguments.length?(u=Qi(t=o),i=Qi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Ki(n.copy(),t,e)},Zi(r,n)}function Qi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function no(n,t){function e(e){return i[((u.get(e)||("range"===t.t?u.set(e,n.push(e)):0/0))-1)%i.length]}function r(t,e){return ta.range(n.length).map(function(n){return t+e*n})}var u,i,o;return e.domain=function(r){if(!arguments.length)return n;n=[],u=new a;for(var i,o=-1,c=r.length;++o<c;)u.has(i=r[o])||u.set(i,n.push(i));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(i=n,o=0,t={t:"range",a:arguments},e):i},e.rangePoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=(c+l)/2,0):(l-c)/(n.length-1+a);return i=r(c+s*a/2,s),o=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(u,a){arguments.length<2&&(a=0);var c=u[0],l=u[1],s=n.length<2?(c=l=Math.round((c+l)/2),0):0|(l-c)/(n.length-1+a);return i=r(c+Math.round(s*a/2+(l-c-(n.length-1+a)*s)/2),s),o=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=(f-s)/(n.length-a+2*c);return i=r(s+h*c,h),l&&i.reverse(),o=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(u,a,c){arguments.length<2&&(a=0),arguments.length<3&&(c=a);var l=u[1]<u[0],s=u[l-0],f=u[1-l],h=Math.floor((f-s)/(n.length-a+2*c));return i=r(s+Math.round((f-s-(n.length-a)*h)/2),h),l&&i.reverse(),o=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return o},e.rangeExtent=function(){return Ui(t.a[0])},e.copy=function(){return no(n,t)},e.domain(n)}function to(r,u){function i(){var n=0,t=u.length;for(a=[];++n<t;)a[n-1]=ta.quantile(r,n/t);return o}function o(n){return isNaN(n=+n)?void 0:u[ta.bisect(a,n)]}var a;return o.domain=function(u){return arguments.length?(r=u.map(t).filter(e).sort(n),i()):r},o.range=function(n){return arguments.length?(u=n,i()):u},o.quantiles=function(){return a},o.invertExtent=function(n){return n=u.indexOf(n),0>n?[0/0,0/0]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},o.copy=function(){return to(r,u)},i()}function eo(n,t,e){function r(t){return e[Math.max(0,Math.min(o,Math.floor(i*(t-n))))]}function u(){return i=e.length/(t-n),o=e.length-1,r}var i,o;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],u()):[n,t]},r.range=function(n){return arguments.length?(e=n,u()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=0>t?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return eo(n,t,e)},u()}function ro(n,t){function e(e){return e>=e?t[ta.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return ro(n,t)},e}function uo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return $i(n,t)},t.tickFormat=function(t,e){return Bi(n,t,e)},t.copy=function(){return uo(n)},t}function io(){return 0}function oo(n){return n.innerRadius}function ao(n){return n.outerRadius}function co(n){return n.startAngle}function lo(n){return n.endAngle}function so(n){return n&&n.padAngle}function fo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function ho(n,t,e,r,u){var i=n[0]-t[0],o=n[1]-t[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,l=-a*i,s=n[0]+c,f=n[1]+l,h=t[0]+c,g=t[1]+l,p=(s+h)/2,v=(f+g)/2,d=h-s,m=g-f,y=d*d+m*m,M=e-r,x=s*g-h*f,b=(0>m?-1:1)*Math.sqrt(M*M*y-x*x),_=(x*m-d*b)/y,w=(-x*d-m*b)/y,S=(x*m+d*b)/y,k=(-x*d+m*b)/y,E=_-p,A=w-v,N=S-p,C=k-v;return E*E+A*A>N*N+C*C&&(_=S,w=k),[[_-c,w-l],[_*e/M,w*e/M]]}function go(n){function t(t){function o(){l.push("M",i(n(s),a))}for(var c,l=[],s=[],f=-1,h=t.length,g=Et(e),p=Et(r);++f<h;)u.call(this,c=t[f],f)?s.push([+g.call(this,c,f),+p.call(this,c,f)]):s.length&&(o(),s=[]);return s.length&&o(),l.length?l.join(""):null}var e=Nr,r=Cr,u=Ce,i=po,o=i.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(o="function"==typeof n?i=n:(i=zl.get(n)||po).key,t):o},t.tension=function(n){return arguments.length?(a=n,t):a},t}function po(n){return n.join("L")}function vo(n){return po(n)+"Z"}function mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&u.push("H",r[0]),u.join("")}function yo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("V",(r=n[t])[1],"H",r[0]);return u.join("")}function Mo(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t<e;)u.push("H",(r=n[t])[0],"V",r[1]);return u.join("")}function xo(n,t){return n.length<4?po(n):n[1]+wo(n.slice(1,-1),So(n,t))}function bo(n,t){return n.length<3?po(n):n[0]+wo((n.push(n[0]),n),So([n[n.length-2]].concat(n,[n[1]]),t))}function _o(n,t){return n.length<3?po(n):n[0]+wo(n,So(n,t))}function wo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return po(n);var e=n.length!=t.length,r="",u=n[0],i=n[1],o=t[0],a=o,c=1;if(e&&(r+="Q"+(i[0]-2*o[0]/3)+","+(i[1]-2*o[1]/3)+","+i[0]+","+i[1],u=n[1],c=2),t.length>1){a=t[1],i=n[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var l=2;l<t.length;l++,c++)i=n[c],a=t[l],r+="S"+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1]}if(e){var s=n[c];r+="Q"+(i[0]+2*a[0]/3)+","+(i[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function So(n,t){for(var e,r=[],u=(1-t)/2,i=n[0],o=n[1],a=1,c=n.length;++a<c;)e=i,i=o,o=n[a],r.push([u*(o[0]-e[0]),u*(o[1]-e[1])]);return r}function ko(n){if(n.length<3)return po(n);var t=1,e=n.length,r=n[0],u=r[0],i=r[1],o=[u,u,u,(r=n[1])[0]],a=[i,i,i,r[1]],c=[u,",",i,"L",Co(Tl,o),",",Co(Tl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],o.shift(),o.push(r[0]),a.shift(),a.push(r[1]),zo(c,o,a);return n.pop(),c.push("L",r),c.join("")}function Eo(n){if(n.length<4)return po(n);for(var t,e=[],r=-1,u=n.length,i=[0],o=[0];++r<3;)t=n[r],i.push(t[0]),o.push(t[1]);for(e.push(Co(Tl,i)+","+Co(Tl,o)),--r;++r<u;)t=n[r],i.shift(),i.push(t[0]),o.shift(),o.push(t[1]),zo(e,i,o);return e.join("")}function Ao(n){for(var t,e,r=-1,u=n.length,i=u+4,o=[],a=[];++r<4;)e=n[r%u],o.push(e[0]),a.push(e[1]);for(t=[Co(Tl,o),",",Co(Tl,a)],--r;++r<i;)e=n[r%u],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),zo(t,o,a);return t.join("")}function No(n,t){var e=n.length-1;if(e)for(var r,u,i=n[0][0],o=n[0][1],a=n[e][0]-i,c=n[e][1]-o,l=-1;++l<=e;)r=n[l],u=l/e,r[0]=t*r[0]+(1-t)*(i+u*a),r[1]=t*r[1]+(1-t)*(o+u*c);return ko(n)}function Co(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function zo(n,t,e){n.push("C",Co(ql,t),",",Co(ql,e),",",Co(Ll,t),",",Co(Ll,e),",",Co(Tl,t),",",Co(Tl,e))}function qo(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Lo(n){for(var t=0,e=n.length-1,r=[],u=n[0],i=n[1],o=r[0]=qo(u,i);++t<e;)r[t]=(o+(o=qo(u=i,i=n[t+1])))/2;return r[t]=o,r}function To(n){for(var t,e,r,u,i=[],o=Lo(n),a=-1,c=n.length-1;++a<c;)t=qo(n[a],n[a+1]),va(t)<Ta?o[a]=o[a+1]=0:(e=o[a]/t,r=o[a+1]/t,u=e*e+r*r,u>9&&(u=3*t/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(n[Math.min(c,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Ro(n){return n.length<3?po(n):n[0]+wo(n,To(n))}function Do(n){for(var t,e,r,u=-1,i=n.length;++u<i;)t=n[u],e=t[0],r=t[1]-ja,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Po(n){function t(t){function c(){v.push("M",a(n(m),f),s,l(n(d.reverse()),f),"Z")}for(var h,g,p,v=[],d=[],m=[],y=-1,M=t.length,x=Et(e),b=Et(u),_=e===r?function(){return g}:Et(r),w=u===i?function(){return p}:Et(i);++y<M;)o.call(this,h=t[y],y)?(d.push([g=+x.call(this,h,y),p=+b.call(this,h,y)]),m.push([+_.call(this,h,y),+w.call(this,h,y)])):d.length&&(c(),d=[],m=[]);return d.length&&c(),v.length?v.join(""):null}var e=Nr,r=Nr,u=0,i=Cr,o=Ce,a=po,c=a.key,l=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(u=i=n,t):i},t.y0=function(n){return arguments.length?(u=n,t):u},t.y1=function(n){return arguments.length?(i=n,t):i},t.defined=function(n){return arguments.length?(o=n,t):o},t.interpolate=function(n){return arguments.length?(c="function"==typeof n?a=n:(a=zl.get(n)||po).key,l=a.reverse||a,s=a.closed?"M":"L",t):c
-},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Uo(n){return n.radius}function jo(n){return[n.x,n.y]}function Fo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-ja;return[e*Math.cos(r),e*Math.sin(r)]}}function Ho(){return 64}function Oo(){return"circle"}function Yo(n){var t=Math.sqrt(n/Da);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Io(n,t,e){return xa(n,Fl),n.namespace=t,n.id=e,n}function Zo(n,t,e,r){var u=n.id,i=n.namespace;return H(n,"function"==typeof e?function(n,o,a){n[i][u].tween.set(t,r(e.call(n,n.__data__,o,a)))}:(e=r(e),function(n){n[i][u].tween.set(t,e)}))}function Vo(n){return null==n&&(n=""),function(){this.textContent=n}}function Xo(n){return null==n?"__transition__":"__transition_"+n+"__"}function $o(n,t,e,r,u){var i=n[e]||(n[e]={active:0,count:0}),o=i[r];if(!o){var c=u.time;o=i[r]={tween:new a,time:c,ease:u.ease,delay:u.delay,duration:u.duration},u=null,++i.count,ta.timer(function(u){function a(e){return i.active>r?s(!1):(i.active=r,o.event&&o.event.start.call(n,f,t),o.tween.forEach(function(e,r){(r=r.call(n,f,t))&&d.push(r)}),ta.timer(function(){return v.c=l(e||1)?Ce:l,1},0,c),void 0)}function l(t){if(i.active!==r)return s(!1);for(var e=t/p,u=h(e),o=d.length;o>0;)d[--o].call(n,u);return e>=1?s(!0):void 0}function s(u){return o.event&&o.event[u?"end":"interrupt"].call(n,f,t),--i.count?delete i[r]:delete n[e],1}var f=n.__data__,h=o.ease,g=o.delay,p=o.duration,v=oc,d=[];return v.t=g+c,u>=g?a(u-g):(v.c=a,void 0)},0,c)}}function Bo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function Wo(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function Jo(n){return n.toISOString()}function Go(n,t,e){function r(t){return n(t)}function u(n,e){var r=n[1]-n[0],u=r/e,i=ta.bisect(Bl,u);return i==Bl.length?[t.year,Xi(n.map(function(n){return n/31536e6}),e)[2]]:i?t[u/Bl[i-1]<Bl[i]/u?i-1:i]:[Gl,Xi(n,e)[2]]}return r.invert=function(t){return Ko(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(Ko)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,Ko(+e+1),t).length}var i=r.domain(),o=Ui(i),a=null==n?u(o,10):"number"==typeof n&&u(o,n);return a&&(n=a[0],t=a[1]),r.domain(Hi(i,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=Ko(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=Ko(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Ui(r.domain()),i=null==n?u(e,10):"number"==typeof n?u(e,n):!n.range&&[{range:n},t];return i&&(n=i[0],t=i[1]),n.range(e[0],Ko(+e[1]+1),1>t?1:t)},r.tickFormat=function(){return e},r.copy=function(){return Go(n.copy(),t,e)},Zi(r,n)}function Ko(n){return new Date(n)}function Qo(n){return JSON.parse(n.responseText)}function na(n){var t=ua.createRange();return t.selectNode(ua.body),t.createContextualFragment(n.responseText)}var ta={version:"3.5.0pre"};Date.now||(Date.now=function(){return+new Date});var ea=[].slice,ra=function(n){return ea.call(n)},ua=document,ia=ua.documentElement,oa=window;try{ra(ia.childNodes)[0].nodeType}catch(aa){ra=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}try{ua.createElement("div").style.setProperty("opacity",0,"")}catch(ca){var la=oa.Element.prototype,sa=la.setAttribute,fa=la.setAttributeNS,ha=oa.CSSStyleDeclaration.prototype,ga=ha.setProperty;la.setAttribute=function(n,t){sa.call(this,n,t+"")},la.setAttributeNS=function(n,t,e){fa.call(this,n,t,e+"")},ha.setProperty=function(n,t,e){ga.call(this,n,t+"",e)}}ta.ascending=n,ta.descending=function(n,t){return n>t?-1:t>n?1:t>=n?0:0/0},ta.min=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&e>r&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&e>r&&(e=r)}return e},ta.max=function(n,t){var e,r,u=-1,i=n.length;if(1===arguments.length){for(;++u<i;)if(null!=(r=n[u])&&r>=r){e=r;break}for(;++u<i;)null!=(r=n[u])&&r>e&&(e=r)}else{for(;++u<i;)if(null!=(r=t.call(n,n[u],u))&&r>=r){e=r;break}for(;++u<i;)null!=(r=t.call(n,n[u],u))&&r>e&&(e=r)}return e},ta.extent=function(n,t){var e,r,u,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=n[i])&&(e>r&&(e=r),r>u&&(u=r))}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=u=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&(e>r&&(e=r),r>u&&(u=r))}return[e,u]},ta.sum=function(n,t){var r,u=0,i=n.length,o=-1;if(1===arguments.length)for(;++o<i;)e(r=+n[o])&&(u+=r);else for(;++o<i;)e(r=+t.call(n,n[o],o))&&(u+=r);return u},ta.mean=function(n,r){var u,i=0,o=n.length,a=-1,c=o;if(1===arguments.length)for(;++a<o;)e(u=t(n[a]))?i+=u:--c;else for(;++a<o;)e(u=t(r.call(n,n[a],a)))?i+=u:--c;return c?i/c:void 0},ta.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),u=+n[r-1],i=e-r;return i?u+i*(n[r]-u):u},ta.median=function(r,u){var i,o=[],a=r.length,c=-1;if(1===arguments.length)for(;++c<a;)e(i=t(r[c]))&&o.push(i);else for(;++c<a;)e(i=t(u.call(r,r[c],c)))&&o.push(i);return o.length?ta.quantile(o.sort(n),.5):void 0};var pa=r(n);ta.bisectLeft=pa.left,ta.bisect=ta.bisectRight=pa.right,ta.bisector=function(t){return r(1===t.length?function(e,r){return n(t(e),r)}:t)},ta.shuffle=function(n,t,e){(i=arguments.length)<3&&(e=n.length,2>i&&(t=0));for(var r,u,i=e-t;i;)u=0|Math.random()*i--,r=n[i+t],n[i+t]=n[u+t],n[u+t]=r;return n},ta.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},ta.pairs=function(n){for(var t,e=0,r=n.length-1,u=n[0],i=new Array(0>r?0:r);r>e;)i[e]=[t=u,u=n[++e]];return i},ta.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=ta.min(arguments,u),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},ta.transpose=function(n){return ta.zip.apply(ta,n)},ta.keys=function(n){var t=[];for(var e in n)t.push(e);return t},ta.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},ta.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},ta.merge=function(n){for(var t,e,r,u=n.length,i=-1,o=0;++i<u;)o+=n[i].length;for(e=new Array(o);--u>=0;)for(r=n[u],t=r.length;--t>=0;)e[--o]=r[t];return e};var va=Math.abs;ta.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),1/0===(t-n)/e)throw new Error("infinite range");var r,u=[],o=i(va(e)),a=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++a)>t;)u.push(r/o);else for(;(r=n+e*++a)<t;)u.push(r/o);return u},ta.map=function(n,t){var e=new a;if(n instanceof a)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,u=-1,i=n.length;if(1===arguments.length)for(;++u<i;)e.set(u,n[u]);else for(;++u<i;)e.set(t.call(n,r=n[u],u),r)}else for(var o in n)e.set(o,n[o]);return e};var da="__proto__",ma="\x00";o(a,{has:s,get:function(n){return this._[c(n)]},set:function(n,t){return this._[c(n)]=t},remove:f,keys:h,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:l(t),value:this._[t]});return n},size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t),this._[t])}}),ta.nest=function(){function n(t,o,c){if(c>=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var l,s,f,h,g=-1,p=o.length,v=i[c++],d=new a;++g<p;)(h=d.get(l=v(s=o[g])))?h.push(s):d.set(l,[s]);return t?(s=t(),f=function(e,r){s.set(e,n(t,r,c))}):(s={},f=function(e,r){s[e]=n(t,r,c)}),d.forEach(f),s}function t(n,e){if(e>=i.length)return n;var r=[],u=o[e++];return n.forEach(function(n,u){r.push({key:n,values:t(u,e)})}),u?r.sort(function(n,t){return u(n.key,t.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(t,e){return n(e,t,0)},u.entries=function(e){return t(n(ta.map,e,0),0)},u.key=function(n){return i.push(n),u},u.sortKeys=function(n){return o[i.length-1]=n,u},u.sortValues=function(n){return e=n,u},u.rollup=function(n){return r=n,u},u},ta.set=function(n){var t=new v;if(n)for(var e=0,r=n.length;r>e;++e)t.add(n[e]);return t},o(v,{has:s,add:function(n){return this._[c(n+="")]=!0,n},remove:f,values:h,size:g,empty:p,forEach:function(n){for(var t in this._)n.call(this,l(t))}}),ta.behavior={},ta.rebind=function(n,t){for(var e,r=1,u=arguments.length;++r<u;)n[e=arguments[r]]=d(n,t,t[e]);return n};var ya=["webkit","ms","moz","Moz","o","O"];ta.dispatch=function(){for(var n=new M,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=x(n);return n},M.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},ta.event=null,ta.requote=function(n){return n.replace(Ma,"\\$&")};var Ma=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xa={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ba=function(n,t){return t.querySelector(n)},_a=function(n,t){return t.querySelectorAll(n)},wa=ia.matches||ia[m(ia,"matchesSelector")],Sa=function(n,t){return wa.call(n,t)};"function"==typeof Sizzle&&(ba=function(n,t){return Sizzle(n,t)[0]||null},_a=Sizzle,Sa=Sizzle.matchesSelector),ta.selection=function(){return Na};var ka=ta.selection.prototype=[];ka.select=function(n){var t,e,r,u,i=[];n=k(n);for(var o=-1,a=this.length;++o<a;){i.push(t=[]),t.parentNode=(r=this[o]).parentNode;for(var c=-1,l=r.length;++c<l;)(u=r[c])?(t.push(e=n.call(u,u.__data__,c,o)),e&&"__data__"in u&&(e.__data__=u.__data__)):t.push(null)}return S(i)},ka.selectAll=function(n){var t,e,r=[];n=E(n);for(var u=-1,i=this.length;++u<i;)for(var o=this[u],a=-1,c=o.length;++a<c;)(e=o[a])&&(r.push(t=ra(n.call(e,e.__data__,a,u))),t.parentNode=e);return S(r)};var Ea={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ta.ns={prefix:Ea,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&(e=n.slice(0,t),n=n.slice(t+1)),Ea.hasOwnProperty(e)?{space:Ea[e],local:n}:n}},ka.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=ta.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(A(t,n[t]));return this}return this.each(A(n,t))},ka.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=z(n)).length,u=-1;if(t=e.classList){for(;++u<r;)if(!t.contains(n[u]))return!1}else for(t=e.getAttribute("class");++u<r;)if(!C(n[u]).test(t))return!1;return!0}for(t in n)this.each(q(t,n[t]));return this}return this.each(q(n,t))},ka.style=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t="");for(e in n)this.each(T(e,n[e],t));return this}if(2>r)return oa.getComputedStyle(this.node(),null).getPropertyValue(n);e=""}return this.each(T(n,t,e))},ka.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},ka.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},ka.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},ka.append=function(n){return n=D(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},ka.insert=function(n,t){return n=D(n),t=k(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},ka.remove=function(){return this.each(P)},ka.data=function(n,t){function e(n,e){var r,u,i,o=n.length,f=e.length,h=Math.min(o,f),g=new Array(f),p=new Array(f),v=new Array(o);if(t){var d,m=new a,y=new Array(o);for(r=-1;++r<o;)m.has(d=t.call(u=n[r],u.__data__,r))?v[r]=u:m.set(d,u),y[r]=d;for(r=-1;++r<f;)(u=m.get(d=t.call(e,i=e[r],r)))?u!==!0&&(g[r]=u,u.__data__=i):p[r]=U(i),m.set(d,!0);for(r=-1;++r<o;)m.get(y[r])!==!0&&(v[r]=n[r])}else{for(r=-1;++r<h;)u=n[r],i=e[r],u?(u.__data__=i,g[r]=u):p[r]=U(i);for(;f>r;++r)p[r]=U(e[r]);for(;o>r;++r)v[r]=n[r]}p.update=g,p.parentNode=g.parentNode=v.parentNode=n.parentNode,c.push(p),l.push(g),s.push(v)}var r,u,i=-1,o=this.length;if(!arguments.length){for(n=new Array(o=(r=this[0]).length);++i<o;)(u=r[i])&&(n[i]=u.__data__);return n}var c=O([]),l=S([]),s=S([]);if("function"==typeof n)for(;++i<o;)e(r=this[i],n.call(r,r.parentNode.__data__,i));else for(;++i<o;)e(r=this[i],n);return l.enter=function(){return c},l.exit=function(){return s},l},ka.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},ka.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]),t.parentNode=(e=this[i]).parentNode;for(var a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return S(u)},ka.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],u=r.length-1,i=r[u];--u>=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},ka.sort=function(n){n=F.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},ka.each=function(n){return H(this,function(t,e,r){n.call(t,t.__data__,e,r)})},ka.call=function(n){var t=ra(arguments);return n.apply(t[0]=this,t),this},ka.empty=function(){return!this.node()},ka.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,u=e.length;u>r;r++){var i=e[r];if(i)return i}return null},ka.size=function(){var n=0;return H(this,function(){++n}),n};var Aa=[];ta.selection.enter=O,ta.selection.enter.prototype=Aa,Aa.append=ka.append,Aa.empty=ka.empty,Aa.node=ka.node,Aa.call=ka.call,Aa.size=ka.size,Aa.select=function(n){for(var t,e,r,u,i,o=[],a=-1,c=this.length;++a<c;){r=(u=this[a]).update,o.push(t=[]),t.parentNode=u.parentNode;for(var l=-1,s=u.length;++l<s;)(i=u[l])?(t.push(r[l]=e=n.call(u.parentNode,i.__data__,l,a)),e.__data__=i.__data__):t.push(null)}return S(o)},Aa.insert=function(n,t){return arguments.length<2&&(t=Y(this)),ka.insert.call(this,n,t)},ka.transition=function(n){for(var t,e,r=Dl||++Hl,u=Xo(n),i=[],o=Pl||{time:Date.now(),ease:ku,delay:0,duration:250},a=-1,c=this.length;++a<c;){i.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(e=l[s])&&$o(e,s,u,r,o),t.push(e)}return Io(i,u,r)},ka.interrupt=function(n){var t=Xo(n);return this.each(function(){var n=this[t];n&&++n.active})},ta.select=function(n){var t=["string"==typeof n?ba(n,ua):n];return t.parentNode=ia,S([t])},ta.selectAll=function(n){var t=ra("string"==typeof n?_a(n,ua):n);return t.parentNode=ia,S([t])};var Na=ta.select(ia);ka.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(Z(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(Z(n,t,e))};var Ca=ta.map({mouseenter:"mouseover",mouseleave:"mouseout"});Ca.forEach(function(n){"on"+n in ua&&Ca.remove(n)});var za="onselectstart"in ua?null:m(ia.style,"userSelect"),qa=0;ta.mouse=function(n){return B(n,_())};var La=/WebKit/.test(oa.navigator.userAgent)?-1:0;ta.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=_().changedTouches),t)for(var r,u=0,i=t.length;i>u;++u)if((r=t[u]).identifier===e)return B(n,r)},ta.behavior.drag=function(){function n(){this.on("mousedown.drag",u).on("touchstart.drag",i)}function t(n,t,u,i,o){return function(){function a(){var n,e,r=t(h,v);r&&(n=r[0]-M[0],e=r[1]-M[1],p|=n|e,M=r,g({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:n,dy:e}))}function c(){t(h,v)&&(m.on(i+d,null).on(o+d,null),y(p&&ta.event.target===f),g({type:"dragend"}))}var l,s=this,f=ta.event.target,h=s.parentNode,g=e.of(s,arguments),p=0,v=n(),d=".drag"+(null==v?"":"-"+v),m=ta.select(u()).on(i+d,a).on(o+d,c),y=$(),M=t(h,v);r?(l=r.apply(s,arguments),l=[l.x-M[0],l.y-M[1]]):l=[0,0],g({type:"dragstart"})}}var e=w(n,"drag","dragstart","dragend"),r=null,u=t(y,ta.mouse,G,"mousemove","mouseup"),i=t(W,ta.touch,J,"touchmove","touchend");return n.origin=function(t){return arguments.length?(r=t,n):r},ta.rebind(n,e,"on")},ta.touches=function(n,t){return arguments.length<2&&(t=_().touches),t?ra(t).map(function(t){var e=B(n,t);return e.identifier=t.identifier,e}):[]};var Ta=1e-6,Ra=Ta*Ta,Da=Math.PI,Pa=2*Da,Ua=Pa-Ta,ja=Da/2,Fa=Da/180,Ha=180/Da,Oa=Math.SQRT2,Ya=2,Ia=4;ta.interpolateZoom=function(n,t){function e(n){var t=n*y;if(m){var e=rt(v),o=i/(Ya*h)*(e*ut(Oa*t+v)-et(v));return[r+o*l,u+o*s,i*e/rt(Oa*t+v)]}return[r+n*l,u+n*s,i*Math.exp(Oa*t)]}var r=n[0],u=n[1],i=n[2],o=t[0],a=t[1],c=t[2],l=o-r,s=a-u,f=l*l+s*s,h=Math.sqrt(f),g=(c*c-i*i+Ia*f)/(2*i*Ya*h),p=(c*c-i*i-Ia*f)/(2*c*Ya*h),v=Math.log(Math.sqrt(g*g+1)-g),d=Math.log(Math.sqrt(p*p+1)-p),m=d-v,y=(m||Math.log(c/i))/Oa;return e.duration=1e3*y,e},ta.behavior.zoom=function(){function n(n){n.on(C,s).on(Xa+".zoom",h).on("dblclick.zoom",g).on(L,f)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function e(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function r(n){k.k=Math.max(A[0],Math.min(A[1],n))}function u(n,t){t=e(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function i(t,e,i,o){t.__chart__={x:k.x,y:k.y,k:k.k},r(Math.pow(2,o)),u(v=e,i),ta.select(t).transition().duration(350).call(n.event)}function o(){x&&x.domain(M.range().map(function(n){return(n-k.x)/k.k}).map(M.invert)),S&&S.domain(_.range().map(function(n){return(n-k.y)/k.k}).map(_.invert))}function a(n){N++||n({type:"zoomstart"})}function c(n){o(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(n){--N||n({type:"zoomend"}),v=null}function s(){function n(){s=1,u(ta.mouse(r),h),c(o)}function e(){f.on(z,null).on(q,null),g(s&&ta.event.target===i),l(o)}var r=this,i=ta.event.target,o=T.of(r,arguments),s=0,f=ta.select(oa).on(z,n).on(q,e),h=t(ta.mouse(r)),g=$();I(r),a(o)}function f(){function n(){var n=ta.touches(p);return g=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=ta.event.target;ta.select(t).on(x,o).on(_,h),w.push(t);for(var e=ta.event.changedTouches,r=0,u=e.length;u>r;++r)d[e[r].identifier]=null;var a=n(),c=Date.now();if(1===a.length){if(500>c-y){var l=a[0];i(p,l,d[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),b()}y=c}else if(a.length>1){var l=a[0],s=a[1],f=l[0]-s[0],g=l[1]-s[1];m=f*f+g*g}}function o(){var n,t,e,i,o=ta.touches(p);I(p);for(var a=0,l=o.length;l>a;++a,i=null)if(e=o[a],i=d[e.identifier]){if(t)break;n=e,t=i}if(i){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=m&&Math.sqrt(s/m);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+i[0])/2,(t[1]+i[1])/2],r(f*g)}y=null,u(n,t),c(v)}function h(){if(ta.event.touches.length){for(var t=ta.event.changedTouches,e=0,r=t.length;r>e;++e)delete d[t[e].identifier];for(var u in d)return void n()}ta.selectAll(w).on(M,null),S.on(C,s).on(L,f),E(),l(v)}var g,p=this,v=T.of(p,arguments),d={},m=0,M=".zoom-"+ta.event.changedTouches[0].identifier,x="touchmove"+M,_="touchend"+M,w=[],S=ta.select(p),E=$();e(),a(v),S.on(C,null).on(L,e)}function h(){var n=T.of(this,arguments);m?clearTimeout(m):(p=t(v=d||ta.mouse(this)),I(this),a(n)),m=setTimeout(function(){m=null,l(n)},50),b(),r(Math.pow(2,.002*Za())*k.k),u(v,p),c(n)}function g(){var n=ta.mouse(this),e=Math.log(k.k)/Math.LN2;i(this,n,t(n),ta.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var p,v,d,m,y,M,x,_,S,k={x:0,y:0,k:1},E=[960,500],A=Va,N=0,C="mousedown.zoom",z="mousemove.zoom",q="mouseup.zoom",L="touchstart.zoom",T=w(n,"zoomstart","zoom","zoomend");return n.event=function(n){n.each(function(){var n=T.of(this,arguments),t=k;Dl?ta.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},a(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],u=v?v[0]:e/2,i=v?v[1]:r/2,o=ta.interpolateZoom([(u-k.x)/k.k,(i-k.y)/k.k,e/k.k],[(u-t.x)/t.k,(i-t.y)/t.k,e/t.k]);return function(t){var r=o(t),a=e/r[2];this.__chart__=k={x:u-r[0]*a,y:i-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){l(n)}).each("end.zoom",function(){l(n)}):(this.__chart__=k,a(n),c(n),l(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},o(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:+t},o(),n):k.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Va:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(d=t&&[+t[0],+t[1]],n):d},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.x=function(t){return arguments.length?(x=t,M=t.copy(),k={x:0,y:0,k:1},n):x},n.y=function(t){return arguments.length?(S=t,_=t.copy(),k={x:0,y:0,k:1},n):S},ta.rebind(n,T,"on")};var Za,Va=[0,1/0],Xa="onwheel"in ua?(Za=function(){return-ta.event.deltaY*(ta.event.deltaMode?120:1)},"wheel"):"onmousewheel"in ua?(Za=function(){return ta.event.wheelDelta},"mousewheel"):(Za=function(){return-ta.event.detail},"MozMousePixelScroll");ta.color=ot,ot.prototype.toString=function(){return this.rgb()+""},ta.hsl=at;var $a=at.prototype=new ot;$a.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,this.l/n)},$a.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new at(this.h,this.s,n*this.l)},$a.rgb=function(){return ct(this.h,this.s,this.l)},ta.hcl=lt;var Ba=lt.prototype=new ot;Ba.brighter=function(n){return new lt(this.h,this.c,Math.min(100,this.l+Wa*(arguments.length?n:1)))},Ba.darker=function(n){return new lt(this.h,this.c,Math.max(0,this.l-Wa*(arguments.length?n:1)))},Ba.rgb=function(){return st(this.h,this.c,this.l).rgb()},ta.lab=ft;var Wa=18,Ja=.95047,Ga=1,Ka=1.08883,Qa=ft.prototype=new ot;Qa.brighter=function(n){return new ft(Math.min(100,this.l+Wa*(arguments.length?n:1)),this.a,this.b)},Qa.darker=function(n){return new ft(Math.max(0,this.l-Wa*(arguments.length?n:1)),this.a,this.b)},Qa.rgb=function(){return ht(this.l,this.a,this.b)},ta.rgb=mt;var nc=mt.prototype=new ot;nc.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,u=30;return t||e||r?(t&&u>t&&(t=u),e&&u>e&&(e=u),r&&u>r&&(r=u),new mt(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new mt(u,u,u)},nc.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new mt(n*this.r,n*this.g,n*this.b)},nc.hsl=function(){return _t(this.r,this.g,this.b)},nc.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var tc=ta.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});tc.forEach(function(n,t){tc.set(n,yt(t))}),ta.functor=Et,ta.xhr=Nt(At),ta.dsv=function(n,t){function e(n,e,i){arguments.length<3&&(i=e,e=null);var o=Ct(n,t,null==e?r:u(e),i);return o.row=function(n){return arguments.length?o.response(null==(e=n)?r:u(n)):e},o}function r(n){return e.parse(n.responseText)}function u(n){return function(t){return e.parse(t.responseText,n)}}function i(t){return t.map(o).join(n)}function o(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),c=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var u=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(u(n),e)}:u})},e.parseRows=function(n,t){function e(){if(s>=l)return o;if(u)return u=!1,i;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<l;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(u=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(u=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;l>s;){var r=n.charCodeAt(s++),a=1;if(10===r)u=!0;else if(13===r)u=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==c)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,u,i={},o={},a=[],l=n.length,s=0,f=0;(r=e())!==o;){for(var h=[];r!==i&&r!==o;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new v,u=[];return t.forEach(function(n){for(var t in n)r.has(t)||u.push(r.add(t))}),[u.map(o).join(n)].concat(t.map(function(t){return u.map(function(n){return o(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(i).join("\n")},e},ta.csv=ta.dsv(",","text/csv"),ta.tsv=ta.dsv(" ","text/tab-separated-values");var ec,rc,uc,ic,oc,ac=oa[m(oa,"requestAnimationFrame")]||function(n){setTimeout(n,17)};ta.timer=function(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var u=e+t,i={c:n,t:u,f:!1,n:null};rc?rc.n=i:ec=i,rc=i,uc||(ic=clearTimeout(ic),uc=1,ac(Lt))},ta.timer.flush=function(){Tt(),Rt()},ta.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var cc=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"].map(Pt);ta.formatPrefix=function(n,t){var e=0;return n&&(0>n&&(n*=-1),t&&(n=ta.round(n,Dt(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),cc[8+e/3]};var lc=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,sc=ta.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=ta.round(n,Dt(n,t))).toFixed(Math.max(0,Math.min(20,Dt(n*(1+1e-15),t))))}}),fc=ta.time={},hc=Date;Ft.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){gc.setUTCDate.apply(this._,arguments)},setDay:function(){gc.setUTCDay.apply(this._,arguments)},setFullYear:function(){gc.setUTCFullYear.apply(this._,arguments)},setHours:function(){gc.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){gc.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){gc.setUTCMinutes.apply(this._,arguments)},setMonth:function(){gc.setUTCMonth.apply(this._,arguments)},setSeconds:function(){gc.setUTCSeconds.apply(this._,arguments)},setTime:function(){gc.setTime.apply(this._,arguments)}};var gc=Date.prototype;fc.year=Ht(function(n){return n=fc.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),fc.years=fc.year.range,fc.years.utc=fc.year.utc.range,fc.day=Ht(function(n){var t=new hc(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),fc.days=fc.day.range,fc.days.utc=fc.day.utc.range,fc.dayOfYear=function(n){var t=fc.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=fc[n]=Ht(function(n){return(n=fc.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});fc[n+"s"]=e.range,fc[n+"s"].utc=e.utc.range,fc[n+"OfYear"]=function(n){var e=fc.year(n).getDay();return Math.floor((fc.dayOfYear(n)+(e+t)%7)/7)}}),fc.week=fc.sunday,fc.weeks=fc.sunday.range,fc.weeks.utc=fc.sunday.utc.range,fc.weekOfYear=fc.sundayOfYear;var pc={"-":"",_:" ",0:"0"},vc=/^\s*\d+/,dc=/^%/;ta.locale=function(n){return{numberFormat:Ut(n),timeFormat:Yt(n)}};var mc=ta.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ta.format=mc.numberFormat,ta.geo={},le.prototype={s:0,t:0,add:function(n){se(n,this.t,yc),se(yc.s,this.s,this),this.s?this.t+=yc.t:this.s=yc.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yc=new le;ta.geo.stream=function(n,t){n&&Mc.hasOwnProperty(n.type)?Mc[n.type](n,t):fe(n,t)};var Mc={Feature:function(n,t){fe(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,u=e.length;++r<u;)fe(e[r].geometry,t)}},xc={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){he(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)he(e[r],t,0)},Polygon:function(n,t){ge(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,u=e.length;++r<u;)ge(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,u=e.length;++r<u;)fe(e[r],t)
-}};ta.geo.area=function(n){return bc=0,ta.geo.stream(n,wc),bc};var bc,_c=new le,wc={sphere:function(){bc+=4*Da},point:y,lineStart:y,lineEnd:y,polygonStart:function(){_c.reset(),wc.lineStart=pe},polygonEnd:function(){var n=2*_c;bc+=0>n?4*Da+n:n,wc.lineStart=wc.lineEnd=wc.point=y}};ta.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=ve([t*Fa,e*Fa]);if(m){var u=me(m,r),i=[u[1],-u[0],0],o=me(i,u);xe(o),o=be(o);var c=t-p,l=c>0?1:-1,v=o[0]*Ha*l,d=va(c)>180;if(d^(v>l*p&&l*t>v)){var y=o[1]*Ha;y>g&&(g=y)}else if(v=(v+360)%360-180,d^(v>l*p&&l*t>v)){var y=-o[1]*Ha;f>y&&(f=y)}else f>e&&(f=e),e>g&&(g=e);d?p>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>p?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);m=r,p=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,m=null}function u(n,e){if(m){var r=n-p;y+=va(r)>180?r+(r>0?360:-360):r}else v=n,d=e;wc.point(n,e),t(n,e)}function i(){wc.lineStart()}function o(){u(v,d),wc.lineEnd(),va(y)>Ta&&(s=-(h=180)),x[0]=s,x[1]=h,m=null}function a(n,t){return(t-=n)<0?t+360:t}function c(n,t){return n[0]-t[0]}function l(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,g,p,v,d,m,y,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=u,b.lineStart=i,b.lineEnd=o,y=0,wc.polygonStart()},polygonEnd:function(){wc.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>_c?(s=-(h=180),f=-(g=90)):y>Ta?g=90:-Ta>y&&(f=-90),x[0]=s,x[1]=h}};return function(n){g=h=-(s=f=1/0),M=[],ta.geo.stream(n,b);var t=M.length;if(t){M.sort(c);for(var e,r=1,u=M[0],i=[u];t>r;++r)e=M[r],l(e[0],u)||l(e[1],u)?(a(u[0],e[1])>a(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,t=i.length-1,r=0,u=i[t];t>=r;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,s=e[0],h=u[1])}return M=x=null,1/0===s||1/0===f?[[0/0,0/0],[0/0,0/0]]:[[s,f],[h,g]]}}(),ta.geo.centroid=function(n){Sc=kc=Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,Dc);var t=Lc,e=Tc,r=Rc,u=t*t+e*e+r*r;return Ra>u&&(t=Cc,e=zc,r=qc,Ta>kc&&(t=Ec,e=Ac,r=Nc),u=t*t+e*e+r*r,Ra>u)?[0/0,0/0]:[Math.atan2(e,t)*Ha,tt(r/Math.sqrt(u))*Ha]};var Sc,kc,Ec,Ac,Nc,Cc,zc,qc,Lc,Tc,Rc,Dc={sphere:y,point:we,lineStart:ke,lineEnd:Ee,polygonStart:function(){Dc.lineStart=Ae},polygonEnd:function(){Dc.lineStart=ke}},Pc=Te(Ce,Ue,Fe,[-Da,-Da/2]),Uc=1e9;ta.geo.clipExtent=function(){var n,t,e,r,u,i,o={stream:function(n){return u&&(u.valid=!1),u=i(n),u.valid=!0,u},extent:function(a){return arguments.length?(i=Ie(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),u&&(u.valid=!1,u=null),o):[[n,t],[e,r]]}};return o.extent([[0,0],[960,500]])},(ta.geo.conicEqualArea=function(){return Ze(Ve)}).raw=Ve,ta.geo.albers=function(){return ta.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ta.geo.albersUsa=function(){function n(n){var i=n[0],o=n[1];return t=null,e(i,o),t||(r(i,o),t)||u(i,o),t}var t,e,r,u,i=ta.geo.albers(),o=ta.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=ta.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=i.scale(),e=i.translate(),r=(n[0]-e[0])/t,u=(n[1]-e[1])/t;return(u>=.12&&.234>u&&r>=-.425&&-.214>r?o:u>=.166&&.234>u&&r>=-.214&&-.115>r?a:i).invert(n)},n.stream=function(n){var t=i.stream(n),e=o.stream(n),r=a.stream(n);return{point:function(n,u){t.point(n,u),e.point(n,u),r.point(n,u)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(i.precision(t),o.precision(t),a.precision(t),n):i.precision()},n.scale=function(t){return arguments.length?(i.scale(t),o.scale(.35*t),a.scale(t),n.translate(i.translate())):i.scale()},n.translate=function(t){if(!arguments.length)return i.translate();var l=i.scale(),s=+t[0],f=+t[1];return e=i.translate(t).clipExtent([[s-.455*l,f-.238*l],[s+.455*l,f+.238*l]]).stream(c).point,r=o.translate([s-.307*l,f+.201*l]).clipExtent([[s-.425*l+Ta,f+.12*l+Ta],[s-.214*l-Ta,f+.234*l-Ta]]).stream(c).point,u=a.translate([s-.205*l,f+.212*l]).clipExtent([[s-.214*l+Ta,f+.166*l+Ta],[s-.115*l-Ta,f+.234*l-Ta]]).stream(c).point,n},n.scale(1070)};var jc,Fc,Hc,Oc,Yc,Ic,Zc={point:y,lineStart:y,lineEnd:y,polygonStart:function(){Fc=0,Zc.lineStart=Xe},polygonEnd:function(){Zc.lineStart=Zc.lineEnd=Zc.point=y,jc+=va(Fc/2)}},Vc={point:$e,lineStart:y,lineEnd:y,polygonStart:y,polygonEnd:y},Xc={point:Je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){Xc.lineStart=Qe},polygonEnd:function(){Xc.point=Je,Xc.lineStart=Ge,Xc.lineEnd=Ke}};ta.geo.path=function(){function n(n){return n&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ta.geo.stream(n,o)),i.result()}function t(){return o=null,n}var e,r,u,i,o,a=4.5;return n.area=function(n){return jc=0,ta.geo.stream(n,u(Zc)),jc},n.centroid=function(n){return Ec=Ac=Nc=Cc=zc=qc=Lc=Tc=Rc=0,ta.geo.stream(n,u(Xc)),Rc?[Lc/Rc,Tc/Rc]:qc?[Cc/qc,zc/qc]:Nc?[Ec/Nc,Ac/Nc]:[0/0,0/0]},n.bounds=function(n){return Yc=Ic=-(Hc=Oc=1/0),ta.geo.stream(n,u(Vc)),[[Hc,Oc],[Yc,Ic]]},n.projection=function(n){return arguments.length?(u=(e=n)?n.stream||er(n):At,t()):e},n.context=function(n){return arguments.length?(i=null==(r=n)?new Be:new nr(n),"function"!=typeof a&&i.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(ta.geo.albersUsa()).context(null)},ta.geo.transform=function(n){return{stream:function(t){var e=new rr(t);for(var r in n)e[r]=n[r];return e}}},rr.prototype={point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ta.geo.projection=ir,ta.geo.projectionMutator=or,(ta.geo.equirectangular=function(){return ir(cr)}).raw=cr.invert=cr,ta.geo.rotation=function(n){function t(t){return t=n(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t}return n=sr(n[0]%360*Fa,n[1]*Fa,n.length>2?n[2]*Fa:0),t.invert=function(t){return t=n.invert(t[0]*Fa,t[1]*Fa),t[0]*=Ha,t[1]*=Ha,t},t},lr.invert=cr,ta.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=sr(-n[0]*Fa,-n[1]*Fa,0).invert,u=[];return e(null,null,1,{point:function(n,e){u.push(n=t(n,e)),n[0]*=Ha,n[1]*=Ha}}),{type:"Polygon",coordinates:[u]}}var t,e,r=[0,0],u=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=pr((t=+r)*Fa,u*Fa),n):t},n.precision=function(r){return arguments.length?(e=pr(t*Fa,(u=+r)*Fa),n):u},n.angle(90)},ta.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Fa,u=n[1]*Fa,i=t[1]*Fa,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),l=Math.cos(u),s=Math.sin(i),f=Math.cos(i);return Math.atan2(Math.sqrt((e=f*o)*e+(e=l*s-c*f*a)*e),c*s+l*f*a)},ta.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return ta.range(Math.ceil(i/d)*d,u,d).map(h).concat(ta.range(Math.ceil(l/m)*m,c,m).map(g)).concat(ta.range(Math.ceil(r/p)*p,e,p).filter(function(n){return va(n%d)>Ta}).map(s)).concat(ta.range(Math.ceil(a/v)*v,o,v).filter(function(n){return va(n%m)>Ta}).map(f))}var e,r,u,i,o,a,c,l,s,f,h,g,p=10,v=p,d=90,m=360,y=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(g(c).slice(1),h(u).reverse().slice(1),g(l).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(i=+t[0][0],u=+t[1][0],l=+t[0][1],c=+t[1][1],i>u&&(t=i,i=u,u=t),l>c&&(t=l,l=c,c=t),n.precision(y)):[[i,l],[u,c]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],o=+t[1][1],r>e&&(t=r,r=e,e=t),a>o&&(t=a,a=o,o=t),n.precision(y)):[[r,a],[e,o]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],m=+t[1],n):[d,m]},n.minorStep=function(t){return arguments.length?(p=+t[0],v=+t[1],n):[p,v]},n.precision=function(t){return arguments.length?(y=+t,s=dr(a,o,90),f=mr(r,e,y),h=dr(l,c,90),g=mr(i,u,y),n):y},n.majorExtent([[-180,-90+Ta],[180,90-Ta]]).minorExtent([[-180,-80-Ta],[180,80+Ta]])},ta.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||u.apply(this,arguments)]}}var t,e,r=yr,u=Mr;return n.distance=function(){return ta.geo.distance(t||r.apply(this,arguments),e||u.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(u=t,e="function"==typeof t?null:t,n):u},n.precision=function(){return arguments.length?n:0},n},ta.geo.interpolate=function(n,t){return xr(n[0]*Fa,n[1]*Fa,t[0]*Fa,t[1]*Fa)},ta.geo.length=function(n){return $c=0,ta.geo.stream(n,Bc),$c};var $c,Bc={sphere:y,point:y,lineStart:br,lineEnd:y,polygonStart:y,polygonEnd:y},Wc=_r(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(ta.geo.azimuthalEqualArea=function(){return ir(Wc)}).raw=Wc;var Jc=_r(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},At);(ta.geo.azimuthalEquidistant=function(){return ir(Jc)}).raw=Jc,(ta.geo.conicConformal=function(){return Ze(wr)}).raw=wr,(ta.geo.conicEquidistant=function(){return Ze(Sr)}).raw=Sr;var Gc=_r(function(n){return 1/n},Math.atan);(ta.geo.gnomonic=function(){return ir(Gc)}).raw=Gc,kr.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-ja]},(ta.geo.mercator=function(){return Er(kr)}).raw=kr;var Kc=_r(function(){return 1},Math.asin);(ta.geo.orthographic=function(){return ir(Kc)}).raw=Kc;var Qc=_r(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(ta.geo.stereographic=function(){return ir(Qc)}).raw=Qc,Ar.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-ja]},(ta.geo.transverseMercator=function(){var n=Er(Ar),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ar,ta.geom={},ta.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,u=Et(e),i=Et(r),o=n.length,a=[],c=[];for(t=0;o>t;t++)a.push([+u.call(this,n[t],t),+i.call(this,n[t],t),t]);for(a.sort(qr),t=0;o>t;t++)c.push([a[t][0],-a[t][1]]);var l=zr(a),s=zr(c),f=s[0]===l[0],h=s[s.length-1]===l[l.length-1],g=[];for(t=l.length-1;t>=0;--t)g.push(n[a[l[t]][2]]);for(t=+f;t<s.length-h;++t)g.push(n[a[s[t]][2]]);return g}var e=Nr,r=Cr;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},ta.geom.polygon=function(n){return xa(n,nl),n};var nl=ta.geom.polygon.prototype=[];nl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],u=0;++t<e;)n=r,r=this[t],u+=n[1]*r[0]-n[0]*r[1];return.5*u},nl.centroid=function(n){var t,e,r=-1,u=this.length,i=0,o=0,a=this[u-1];for(arguments.length||(n=-1/(6*this.area()));++r<u;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],i+=(t[0]+a[0])*e,o+=(t[1]+a[1])*e;return[i*n,o*n]},nl.clip=function(n){for(var t,e,r,u,i,o,a=Rr(n),c=-1,l=this.length-Rr(this),s=this[l-1];++c<l;){for(t=n.slice(),n.length=0,u=this[c],i=t[(r=t.length-a)-1],e=-1;++e<r;)o=t[e],Lr(o,s,u)?(Lr(i,s,u)||n.push(Tr(i,o,s,u)),n.push(o)):Lr(i,s,u)&&n.push(Tr(i,o,s,u)),i=o;a&&n.push(n[0]),s=u}return n};var tl,el,rl,ul,il,ol=[],al=[];Yr.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort(Zr),t.length},nu.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tu.prototype={insert:function(n,t){var e,r,u;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=iu(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(u=r.R,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.R&&(ru(this,e),n=e,e=n.U),e.C=!1,r.C=!0,uu(this,r))):(u=r.L,u&&u.C?(e.C=u.C=!1,r.C=!0,n=r):(n===e.L&&(uu(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ru(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,u=n.U,i=n.L,o=n.R;if(e=i?o?iu(o):i:o,u?u.L===n?u.L=e:u.R=e:this._=e,i&&o?(r=e.C,e.C=n.C,e.L=i,i.U=e,e!==o?(u=e.U,e.U=n.U,n=e.R,u.L=n,e.R=o,o.U=e):(e.U=u,u=e,n=e.R)):(r=n.C,n=e),n&&(n.U=u),!r){if(n&&n.C)return n.C=!1,void 0;do{if(n===this._)break;if(n===u.L){if(t=u.R,t.C&&(t.C=!1,u.C=!0,ru(this,u),t=u.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,uu(this,t),t=u.R),t.C=u.C,u.C=t.R.C=!1,ru(this,u),n=this._;break}}else if(t=u.L,t.C&&(t.C=!1,u.C=!0,uu(this,u),t=u.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,ru(this,t),t=u.L),t.C=u.C,u.C=t.L.C=!1,uu(this,u),n=this._;break}t.C=!0,n=u,u=u.U}while(!n.C);n&&(n.C=!1)}}},ta.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],u=a[0][1],i=a[1][0],o=a[1][1];return ou(e(n),a).cells.forEach(function(e,a){var c=e.edges,l=e.site,s=t[a]=c.length?c.map(function(n){var t=n.start();return[t.x,t.y]}):l.x>=r&&l.x<=i&&l.y>=u&&l.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[];s.point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(i(n,t)/Ta)*Ta,y:Math.round(o(n,t)/Ta)*Ta,i:t}})}var r=Nr,u=Cr,i=r,o=u,a=cl;return n?t(n):(t.links=function(n){return ou(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return ou(e(n)).cells.forEach(function(e,r){for(var u,i,o=e.site,a=e.edges.sort(Zr),c=-1,l=a.length,s=a[l-1].edge,f=s.l===o?s.r:s.l;++c<l;)u=s,i=f,s=a[c].edge,f=s.l===o?s.r:s.l,r<i.i&&r<f.i&&cu(o,i,f)<0&&t.push([n[r],n[i.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(i=Et(r=n),t):r},t.y=function(n){return arguments.length?(o=Et(u=n),t):u},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];ta.geom.delaunay=function(n){return ta.geom.voronoi().triangles(n)},ta.geom.quadtree=function(n,t,e,r,u){function i(n){function i(n,t,e,r,u,i,o,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var c=n.x,s=n.y;if(null!=c)if(va(c-e)+va(s-r)<.01)l(n,t,e,r,u,i,o,a);else{var f=n.point;n.x=n.y=n.point=null,l(n,f,c,s,u,i,o,a),l(n,t,e,r,u,i,o,a)}else n.x=e,n.y=r,n.point=t}else l(n,t,e,r,u,i,o,a)}function l(n,t,e,r,u,o,a,c){var l=.5*(u+a),s=.5*(o+c),f=e>=l,h=r>=s,g=h<<1|f;n.leaf=!1,n=n.nodes[g]||(n.nodes[g]=fu()),f?u=l:a=l,h?o=s:c=s,i(n,t,e,r,u,o,a,c)}var s,f,h,g,p,v,d,m,y,M=Et(a),x=Et(c);if(null!=t)v=t,d=e,m=r,y=u;else if(m=y=-(v=d=1/0),f=[],h=[],p=n.length,o)for(g=0;p>g;++g)s=n[g],s.x<v&&(v=s.x),s.y<d&&(d=s.y),s.x>m&&(m=s.x),s.y>y&&(y=s.y),f.push(s.x),h.push(s.y);else for(g=0;p>g;++g){var b=+M(s=n[g],g),_=+x(s,g);v>b&&(v=b),d>_&&(d=_),b>m&&(m=b),_>y&&(y=_),f.push(b),h.push(_)}var w=m-v,S=y-d;w>S?y=d+w:m=v+S;var k=fu();if(k.add=function(n){i(k,n,+M(n,++g),+x(n,g),v,d,m,y)},k.visit=function(n){hu(n,k,v,d,m,y)},k.find=function(n){return gu(k,n[0],n[1],v,d,m,y)},g=-1,null==t){for(;++g<p;)i(k,n[g],f[g],h[g],v,d,m,y);--g}else n.forEach(k.add);return f=h=n=s=null,k}var o,a=Nr,c=Cr;return(o=arguments.length)?(a=lu,c=su,3===o&&(u=e,r=t,e=t=0),i(n)):(i.x=function(n){return arguments.length?(a=n,i):a},i.y=function(n){return arguments.length?(c=n,i):c},i.extent=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],u=+n[1][1]),i):null==t?null:[[t,e],[r,u]]},i.size=function(n){return arguments.length?(null==n?t=e=r=u=null:(t=e=0,r=+n[0],u=+n[1]),i):null==t?null:[r-t,u-e]},i)},ta.interpolateRgb=pu,ta.interpolateObject=vu,ta.interpolateNumber=du,ta.interpolateString=mu;var ll=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sl=new RegExp(ll.source,"g");ta.interpolate=yu,ta.interpolators=[function(n,t){var e=typeof t;return("string"===e?tc.has(t)||/^(#|rgb\(|hsl\()/.test(t)?pu:mu:t instanceof ot?pu:Array.isArray(t)?Mu:"object"===e&&isNaN(t)?vu:du)(n,t)}],ta.interpolateArray=Mu;var fl=function(){return At},hl=ta.map({linear:fl,poly:Eu,quad:function(){return wu},cubic:function(){return Su},sin:function(){return Au},exp:function(){return Nu},circle:function(){return Cu},elastic:zu,back:qu,bounce:function(){return Lu}}),gl=ta.map({"in":At,out:bu,"in-out":_u,"out-in":function(n){return _u(bu(n))}});ta.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=hl.get(e)||fl,r=gl.get(r)||At,xu(r(e.apply(null,ea.call(arguments,1))))},ta.interpolateHcl=Tu,ta.interpolateHsl=Ru,ta.interpolateLab=Du,ta.interpolateRound=Pu,ta.transform=function(n){var t=ua.createElementNS(ta.ns.prefix.svg,"g");return(ta.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Uu(e?e.matrix:pl)})(n)},Uu.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pl={a:1,b:0,c:0,d:1,e:0,f:0};ta.interpolateTransform=Ou,ta.layout={},ta.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Zu(n[e]));return t}},ta.layout.chord=function(){function n(){var n,l,f,h,g,p={},v=[],d=ta.range(i),m=[];for(e=[],r=[],n=0,h=-1;++h<i;){for(l=0,g=-1;++g<i;)l+=u[h][g];v.push(l),m.push(ta.range(i)),n+=l}for(o&&d.sort(function(n,t){return o(v[n],v[t])}),a&&m.forEach(function(n,t){n.sort(function(n,e){return a(u[t][n],u[t][e])})}),n=(Pa-s*i)/n,l=0,h=-1;++h<i;){for(f=l,g=-1;++g<i;){var y=d[h],M=m[y][g],x=u[y][M],b=l,_=l+=x*n;p[y+"-"+M]={index:y,subindex:M,startAngle:b,endAngle:_,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:(l-f)/n},l+=s}for(h=-1;++h<i;)for(g=h-1;++g<i;){var w=p[h+"-"+g],S=p[g+"-"+h];(w.value||S.value)&&e.push(w.value<S.value?{source:S,target:w}:{source:w,target:S})}c&&t()}function t(){e.sort(function(n,t){return c((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,u,i,o,a,c,l={},s=0;return l.matrix=function(n){return arguments.length?(i=(u=n)&&u.length,e=r=null,l):u},l.padding=function(n){return arguments.length?(s=n,e=r=null,l):s},l.sortGroups=function(n){return arguments.length?(o=n,e=r=null,l):o},l.sortSubgroups=function(n){return arguments.length?(a=n,e=null,l):a},l.sortChords=function(n){return arguments.length?(c=n,e&&t(),l):c},l.chords=function(){return e||n(),e},l.groups=function(){return r||n(),r},l},ta.layout.force=function(){function n(n){return function(t,e,r,u){if(t.point!==n){var i=t.cx-n.x,o=t.cy-n.y,a=u-e,c=i*i+o*o;if(c>a*a/d){if(p>c){var l=t.charge/c;n.px-=i*l,n.py-=o*l}return!0}if(t.point&&c&&p>c){var l=t.pointCharge/c;n.px-=i*l,n.py-=o*l}}return!t.charge}}function t(n){n.px=ta.event.x,n.py=ta.event.y,a.resume()}var e,r,u,i,o,a={},c=ta.dispatch("start","tick","end"),l=[1,1],s=.9,f=vl,h=dl,g=-30,p=ml,v=.1,d=.64,m=[],y=[];return a.tick=function(){if((r*=.99)<.005)return c.end({type:"end",alpha:r=0}),!0;var t,e,a,f,h,p,d,M,x,b=m.length,_=y.length;for(e=0;_>e;++e)a=y[e],f=a.source,h=a.target,M=h.x-f.x,x=h.y-f.y,(p=M*M+x*x)&&(p=r*i[e]*((p=Math.sqrt(p))-u[e])/p,M*=p,x*=p,h.x-=M*(d=f.weight/(h.weight+f.weight)),h.y-=x*d,f.x+=M*(d=1-d),f.y+=x*d);if((d=r*v)&&(M=l[0]/2,x=l[1]/2,e=-1,d))for(;++e<b;)a=m[e],a.x+=(M-a.x)*d,a.y+=(x-a.y)*d;if(g)for(Gu(t=ta.geom.quadtree(m),r,o),e=-1;++e<b;)(a=m[e]).fixed||t.visit(n(a));for(e=-1;++e<b;)a=m[e],a.fixed?(a.x=a.px,a.y=a.py):(a.x-=(a.px-(a.px=a.x))*s,a.y-=(a.py-(a.py=a.y))*s);c.tick({type:"tick",alpha:r})},a.nodes=function(n){return arguments.length?(m=n,a):m},a.links=function(n){return arguments.length?(y=n,a):y},a.size=function(n){return arguments.length?(l=n,a):l},a.linkDistance=function(n){return arguments.length?(f="function"==typeof n?n:+n,a):f},a.distance=a.linkDistance,a.linkStrength=function(n){return arguments.length?(h="function"==typeof n?n:+n,a):h},a.friction=function(n){return arguments.length?(s=+n,a):s},a.charge=function(n){return arguments.length?(g="function"==typeof n?n:+n,a):g},a.chargeDistance=function(n){return arguments.length?(p=n*n,a):Math.sqrt(p)},a.gravity=function(n){return arguments.length?(v=+n,a):v},a.theta=function(n){return arguments.length?(d=n*n,a):Math.sqrt(d)},a.alpha=function(n){return arguments.length?(n=+n,r?r=n>0?n:0:n>0&&(c.start({type:"start",alpha:r=n}),ta.timer(a.tick)),a):r},a.start=function(){function n(n,r){if(!e){for(e=new Array(c),a=0;c>a;++a)e[a]=[];for(a=0;l>a;++a){var u=y[a];e[u.source.index].push(u.target),e[u.target.index].push(u.source)}}for(var i,o=e[t],a=-1,l=o.length;++a<l;)if(!isNaN(i=o[a][n]))return i;return Math.random()*r}var t,e,r,c=m.length,s=y.length,p=l[0],v=l[1];for(t=0;c>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;s>t;++t)r=y[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;c>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",p)),isNaN(r.y)&&(r.y=n("y",v)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(u=[],"function"==typeof f)for(t=0;s>t;++t)u[t]=+f.call(this,y[t],t);else for(t=0;s>t;++t)u[t]=f;if(i=[],"function"==typeof h)for(t=0;s>t;++t)i[t]=+h.call(this,y[t],t);else for(t=0;s>t;++t)i[t]=h;if(o=[],"function"==typeof g)for(t=0;c>t;++t)o[t]=+g.call(this,m[t],t);else for(t=0;c>t;++t)o[t]=g;return a.resume()},a.resume=function(){return a.alpha(.1)},a.stop=function(){return a.alpha(0)},a.drag=function(){return e||(e=ta.behavior.drag().origin(At).on("dragstart.force",$u).on("drag.force",t).on("dragend.force",Bu)),arguments.length?(this.on("mouseover.force",Wu).on("mouseout.force",Ju).call(e),void 0):e},ta.rebind(a,c,"on")};var vl=20,dl=1,ml=1/0;ta.layout.hierarchy=function(){function n(u){var i,o=[u],a=[];for(u.depth=0;null!=(i=o.pop());)if(a.push(i),(l=e.call(n,i,i.depth))&&(c=l.length)){for(var c,l,s;--c>=0;)o.push(s=l[c]),s.parent=i,s.depth=i.depth+1;r&&(i.value=0),i.children=l}else r&&(i.value=+r.call(n,i,i.depth)||0),delete i.children;return ni(u,function(n){var e,u;t&&(e=n.children)&&e.sort(t),r&&(u=n.parent)&&(u.value+=n.value)}),a}var t=ri,e=ti,r=ei;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qu(t,function(n){n.children&&(n.value=0)}),ni(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},ta.layout.partition=function(){function n(t,e,r,u){var i=t.children;if(t.x=e,t.y=t.depth*u,t.dx=r,t.dy=u,i&&(o=i.length)){var o,a,c,l=-1;for(r=t.value?r/t.value:0;++l<o;)n(a=i[l],e,c=a.value*r,u),e+=c}}function t(n){var e=n.children,r=0;if(e&&(u=e.length))for(var u,i=-1;++i<u;)r=Math.max(r,t(e[i]));return 1+r}function e(e,i){var o=r.call(this,e,i);return n(o[0],0,u[0],u[1]/t(o[0])),o}var r=ta.layout.hierarchy(),u=[1,1];return e.size=function(n){return arguments.length?(u=n,e):u},Ku(e,r)},ta.layout.pie=function(){function n(o){var a,c=o.length,l=o.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof u?u.apply(this,arguments):u)-s,h=Math.min(Math.abs(f)/c,+("function"==typeof i?i.apply(this,arguments):i)),g=h*(0>f?-1:1),p=(f-c*g)/ta.sum(l),v=ta.range(c),d=[];return null!=e&&v.sort(e===yl?function(n,t){return l[t]-l[n]}:function(n,t){return e(o[n],o[t])}),v.forEach(function(n){d[n]={data:o[n],value:a=l[n],startAngle:s,endAngle:s+=a*p+g,padAngle:h}}),d}var t=Number,e=yl,r=0,u=Pa,i=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(u=t,n):u},n.padAngle=function(t){return arguments.length?(i=t,n):i},n};var yl={};ta.layout.stack=function(){function n(a,c){if(!(h=a.length))return a;var l=a.map(function(e,r){return t.call(n,e,r)}),s=l.map(function(t){return t.map(function(t,e){return[i.call(n,t,e),o.call(n,t,e)]})}),f=e.call(n,s,c);l=ta.permute(l,f),s=ta.permute(s,f);var h,g,p,v,d=r.call(n,s,c),m=l[0].length;for(p=0;m>p;++p)for(u.call(n,l[0][p],v=d[p],s[0][p][1]),g=1;h>g;++g)u.call(n,l[g][p],v+=s[g-1][p][1],s[g][p][1]);return a}var t=At,e=ci,r=li,u=ai,i=ii,o=oi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:Ml.get(t)||ci,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:xl.get(t)||li,n):r},n.x=function(t){return arguments.length?(i=t,n):i},n.y=function(t){return arguments.length?(o=t,n):o},n.out=function(t){return arguments.length?(u=t,n):u},n};var Ml=ta.map({"inside-out":function(n){var t,e,r=n.length,u=n.map(si),i=n.map(fi),o=ta.range(r).sort(function(n,t){return u[n]-u[t]}),a=0,c=0,l=[],s=[];for(t=0;r>t;++t)e=o[t],c>a?(a+=i[e],l.push(e)):(c+=i[e],s.push(e));return s.reverse().concat(l)},reverse:function(n){return ta.range(n.length).reverse()},"default":ci}),xl=ta.map({silhouette:function(n){var t,e,r,u=n.length,i=n[0].length,o=[],a=0,c=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];r>a&&(a=r),o.push(r)}for(e=0;i>e;++e)c[e]=(a-o[e])/2;return c},wiggle:function(n){var t,e,r,u,i,o,a,c,l,s=n.length,f=n[0],h=f.length,g=[];for(g[0]=c=l=0,e=1;h>e;++e){for(t=0,u=0;s>t;++t)u+=n[t][e][1];for(t=0,i=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,o=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++r)o+=(n[r][e][1]-n[r][e-1][1])/a;i+=o*n[t][e][1]}g[e]=c-=u?i/u*a:0,l>c&&(l=c)}for(e=0;h>e;++e)g[e]-=l;return g},expand:function(n){var t,e,r,u=n.length,i=n[0].length,o=1/u,a=[];for(e=0;i>e;++e){for(t=0,r=0;u>t;t++)r+=n[t][e][1];if(r)for(t=0;u>t;t++)n[t][e][1]/=r;else for(t=0;u>t;t++)n[t][e][1]=o}for(e=0;i>e;++e)a[e]=0;return a},zero:li});ta.layout.histogram=function(){function n(n,i){for(var o,a,c=[],l=n.map(e,this),s=r.call(this,l,i),f=u.call(this,s,l,i),i=-1,h=l.length,g=f.length-1,p=t?1:1/h;++i<g;)o=c[i]=[],o.dx=f[i+1]-(o.x=f[i]),o.y=0;if(g>0)for(i=-1;++i<h;)a=l[i],a>=s[0]&&a<=s[1]&&(o=c[ta.bisect(f,a,1,g)-1],o.y+=p,o.push(n[i]));return c}var t=!0,e=Number,r=vi,u=gi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Et(t),n):r},n.bins=function(t){return arguments.length?(u="number"==typeof t?function(n){return pi(n,t)}:Et(t),n):u},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},ta.layout.pack=function(){function n(n,i){var o=e.call(this,n,i),a=o[0],c=u[0],l=u[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ni(a,function(n){n.r=+s(n.value)}),ni(a,xi),r){var f=r*(t?1:Math.max(2*a.r/c,2*a.r/l))/2;ni(a,function(n){n.r+=f}),ni(a,xi),ni(a,function(n){n.r-=f})}return wi(a,c/2,l/2,t?1:1/Math.max(2*a.r/c,2*a.r/l)),o}var t,e=ta.layout.hierarchy().sort(di),r=0,u=[1,1];return n.size=function(t){return arguments.length?(u=t,n):u},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},Ku(n,e)},ta.layout.tree=function(){function n(n,u){var s=o.call(this,n,u),f=s[0],h=t(f);if(ni(h,e),h.parent.m=-h.z,Qu(h,r),l)Qu(f,i);else{var g=f,p=f,v=f;Qu(f,function(n){n.x<g.x&&(g=n),n.x>p.x&&(p=n),n.depth>v.depth&&(v=n)});var d=a(g,p)/2-g.x,m=c[0]/(p.x+a(p,g)/2+d),y=c[1]/(v.depth||1);Qu(f,function(n){n.x=(n.x+d)*m,n.y=n.depth*y})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var u,i=t.children,o=0,a=i.length;a>o;++o)r.push((i[o]=u={_:i[o],parent:t,children:(u=i[o].children)&&u.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=u);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Ci(n);var i=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-i):n.z=i}else r&&(n.z=r.z+a(n._,r._));n.parent.A=u(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function u(n,t,e){if(t){for(var r,u=n,i=n,o=t,c=u.parent.children[0],l=u.m,s=i.m,f=o.m,h=c.m;o=Ai(o),u=Ei(u),o&&u;)c=Ei(c),i=Ai(i),i.a=n,r=o.z+f-u.z-l+a(o._,u._),r>0&&(Ni(zi(o,n,e),n,r),l+=r,s+=r),f+=o.m,l+=u.m,h+=c.m,s+=i.m;o&&!Ai(i)&&(i.t=o,i.m+=f-s),u&&!Ei(c)&&(c.t=u,c.m+=l-h,e=n)}return e}function i(n){n.x*=c[0],n.y=n.depth*c[1]}var o=ta.layout.hierarchy().sort(null).value(null),a=ki,c=[1,1],l=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(l=null==(c=t)?i:null,n):l?null:c},n.nodeSize=function(t){return arguments.length?(l=null==(c=t)?null:i,n):l?c:null},Ku(n,o)},ta.layout.cluster=function(){function n(n,i){var o,a=t.call(this,n,i),c=a[0],l=0;ni(c,function(n){var t=n.children;t&&t.length?(n.x=Li(t),n.y=qi(t)):(n.x=o?l+=e(n,o):0,n.y=0,o=n)});var s=Ti(c),f=Ri(c),h=s.x-e(s,f)/2,g=f.x+e(f,s)/2;return ni(c,u?function(n){n.x=(n.x-c.x)*r[0],n.y=(c.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(g-h)*r[0],n.y=(1-(c.y?n.y/c.y:1))*r[1]}),a}var t=ta.layout.hierarchy().sort(null).value(null),e=ki,r=[1,1],u=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(u=null==(r=t),n):u?null:r},n.nodeSize=function(t){return arguments.length?(u=null!=(r=t),n):u?r:null},Ku(n,t)},ta.layout.treemap=function(){function n(n,t){for(var e,r,u=-1,i=n.length;++u<i;)r=(e=n[u]).value*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var i=e.children;if(i&&i.length){var o,a,c,l=f(e),s=[],h=i.slice(),p=1/0,v="slice"===g?l.dx:"dice"===g?l.dy:"slice-dice"===g?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(n(h,l.dx*l.dy/e.value),s.area=0;(c=h.length)>0;)s.push(o=h[c-1]),s.area+=o.area,"squarify"!==g||(a=r(s,v))<=p?(h.pop(),p=a):(s.area-=s.pop().area,u(s,v,l,!1),v=Math.min(l.dx,l.dy),s.length=s.area=0,p=1/0);s.length&&(u(s,v,l,!0),s.length=s.area=0),i.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var i,o=f(t),a=r.slice(),c=[];for(n(a,o.dx*o.dy/t.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,u=0,i=1/0,o=-1,a=n.length;++o<a;)(e=n[o].area)&&(i>e&&(i=e),e>u&&(u=e));return r*=r,t*=t,r?Math.max(t*u*p/r,r/(t*i*p)):1/0}function u(n,t,e,r){var u,i=-1,o=n.length,a=e.x,l=e.y,s=t?c(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++i<o;)u=n[i],u.x=a,u.y=l,u.dy=s,a+=u.dx=Math.min(e.x+e.dx-a,s?c(u.area/s):0);u.z=!0,u.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++i<o;)u=n[i],u.x=a,u.y=l,u.dx=s,l+=u.dy=Math.min(e.y+e.dy-l,s?c(u.area/s):0);u.z=!1,u.dy+=e.y+e.dy-l,e.x+=s,e.dx-=s}}function i(r){var u=o||a(r),i=u[0];return i.x=0,i.y=0,i.dx=l[0],i.dy=l[1],o&&a.revalue(i),n([i],i.dx*i.dy/i.value),(o?e:t)(i),h&&(o=u),u}var o,a=ta.layout.hierarchy(),c=Math.round,l=[1,1],s=null,f=Di,h=!1,g="squarify",p=.5*(1+Math.sqrt(5));return i.size=function(n){return arguments.length?(l=n,i):l},i.padding=function(n){function t(t){var e=n.call(i,t,t.depth);return null==e?Di(t):Pi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Pi(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Di:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,i},i.round=function(n){return arguments.length?(c=n?Math.round:Number,i):c!=Number},i.sticky=function(n){return arguments.length?(h=n,o=null,i):h},i.ratio=function(n){return arguments.length?(p=n,i):p},i.mode=function(n){return arguments.length?(g=n+"",i):g},Ku(i,a)},ta.random={normal:function(n,t){var e=arguments.length;return 2>e&&(t=1),1>e&&(n=0),function(){var e,r,u;do e=2*Math.random()-1,r=2*Math.random()-1,u=e*e+r*r;while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)
-}},logNormal:function(){var n=ta.random.normal.apply(ta,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=ta.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;n>e;e++)t+=Math.random();return t}}},ta.scale={};var bl={floor:At,ceil:At};ta.scale.linear=function(){return Ii([0,1],[0,1],yu,!1)};var _l={s:1,g:1,p:1,r:1,e:1};ta.scale.log=function(){return Gi(ta.scale.linear().domain([0,1]),10,!0,[1,10])};var wl=ta.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};ta.scale.pow=function(){return Ki(ta.scale.linear(),1,[0,1])},ta.scale.sqrt=function(){return ta.scale.pow().exponent(.5)},ta.scale.ordinal=function(){return no([],{t:"range",a:[[]]})},ta.scale.category10=function(){return ta.scale.ordinal().range(kl)},ta.scale.category20=function(){return ta.scale.ordinal().range(El)},ta.scale.category20b=function(){return ta.scale.ordinal().range(Al)},ta.scale.category20c=function(){return ta.scale.ordinal().range(Nl)};var kl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mt),El=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mt),Al=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mt),Nl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mt);ta.scale.quantile=function(){return to([],[])},ta.scale.quantize=function(){return eo(0,1,[0,1])},ta.scale.threshold=function(){return ro([.5],[0,1])},ta.scale.identity=function(){return uo([0,1])},ta.svg={},ta.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),s=o.apply(this,arguments)-ja,f=a.apply(this,arguments)-ja,h=Math.abs(f-s),g=s>f?0:1;if(n>l&&(p=l,l=n,n=p),h>=Ua)return t(l,g)+(n?t(n,1-g):"")+"Z";var p,v,d,m,y,M,x,b,_,w,S,k,E=0,A=0,N=[];if((m=(+c.apply(this,arguments)||0)/2)&&(d=i===Cl?Math.sqrt(n*n+l*l):+i.apply(this,arguments),g||(A*=-1),l&&(A=tt(d/l*Math.sin(m))),n&&(E=tt(d/n*Math.sin(m)))),l){y=l*Math.cos(s+A),M=l*Math.sin(s+A),x=l*Math.cos(f-A),b=l*Math.sin(f-A);var C=Math.abs(f-s-2*A)<=Da?0:1;if(A&&fo(y,M,x,b)===g^C){var z=(s+f)/2;y=l*Math.cos(z),M=l*Math.sin(z),x=b=null}}else y=M=0;if(n){_=n*Math.cos(f-E),w=n*Math.sin(f-E),S=n*Math.cos(s+E),k=n*Math.sin(s+E);var q=Math.abs(s-f+2*E)<=Da?0:1;if(E&&fo(_,w,S,k)===1-g^q){var L=(s+f)/2;_=n*Math.cos(L),w=n*Math.sin(L),S=k=null}}else _=w=0;if((p=Math.min(Math.abs(l-n)/2,+u.apply(this,arguments)))>.001){v=l>n^g?0:1;var T=null==S?[_,w]:null==x?[y,M]:Tr([y,M],[S,k],[x,b],[_,w]),R=y-T[0],D=M-T[1],P=x-T[0],U=b-T[1],j=1/Math.sin(Math.acos((R*P+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(P*P+U*U)))/2),F=Math.sqrt(T[0]*T[0]+T[1]*T[1]);if(null!=x){var H=Math.min(p,(l-F)/(j+1)),O=ho(null==S?[_,w]:[S,k],[y,M],l,H,g),Y=ho([x,b],[_,w],l,H,g);p===H?N.push("M",O[0],"A",H,",",H," 0 0,",v," ",O[1],"A",l,",",l," 0 ",1-g^fo(O[1][0],O[1][1],Y[1][0],Y[1][1]),",",g," ",Y[1],"A",H,",",H," 0 0,",v," ",Y[0]):N.push("M",O[0],"A",H,",",H," 0 1,",v," ",Y[0])}else N.push("M",y,",",M);if(null!=S){var I=Math.min(p,(n-F)/(j-1)),Z=ho([y,M],[S,k],n,-I,g),V=ho([_,w],null==x?[y,M]:[x,b],n,-I,g);p===I?N.push("L",V[0],"A",I,",",I," 0 0,",v," ",V[1],"A",n,",",n," 0 ",g^fo(V[1][0],V[1][1],Z[1][0],Z[1][1]),",",1-g," ",Z[1],"A",I,",",I," 0 0,",v," ",Z[0]):N.push("L",V[0],"A",I,",",I," 0 0,",v," ",Z[0])}else N.push("L",_,",",w)}else N.push("M",y,",",M),null!=x&&N.push("A",l,",",l," 0 ",C,",",g," ",x,",",b),N.push("L",_,",",w),null!=S&&N.push("A",n,",",n," 0 ",q,",",1-g," ",S,",",k);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=oo,r=ao,u=io,i=Cl,o=co,a=lo,c=so;return n.innerRadius=function(t){return arguments.length?(e=Et(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Et(t),n):r},n.cornerRadius=function(t){return arguments.length?(u=Et(t),n):u},n.padRadius=function(t){return arguments.length?(i=t==Cl?Cl:Et(t),n):i},n.startAngle=function(t){return arguments.length?(o=Et(t),n):o},n.endAngle=function(t){return arguments.length?(a=Et(t),n):a},n.padAngle=function(t){return arguments.length?(c=Et(t),n):c},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ja;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Cl="auto";ta.svg.line=function(){return go(At)};var zl=ta.map({linear:po,"linear-closed":vo,step:mo,"step-before":yo,"step-after":Mo,basis:ko,"basis-open":Eo,"basis-closed":Ao,bundle:No,cardinal:_o,"cardinal-open":xo,"cardinal-closed":bo,monotone:Ro});zl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var ql=[0,2/3,1/3,0],Ll=[0,1/3,2/3,0],Tl=[0,1/6,2/3,1/6];ta.svg.line.radial=function(){var n=go(Do);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},yo.reverse=Mo,Mo.reverse=yo,ta.svg.area=function(){return Po(At)},ta.svg.area.radial=function(){var n=Po(Do);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},ta.svg.chord=function(){function n(n,a){var c=t(this,i,n,a),l=t(this,o,n,a);return"M"+c.p0+r(c.r,c.p1,c.a1-c.a0)+(e(c,l)?u(c.r,c.p1,c.r,c.p0):u(c.r,c.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+u(l.r,l.p1,c.r,c.p0))+"Z"}function t(n,t,e,r){var u=t.call(n,e,r),i=a.call(n,u,r),o=c.call(n,u,r)-ja,s=l.call(n,u,r)-ja;return{r:i,a0:o,a1:s,p0:[i*Math.cos(o),i*Math.sin(o)],p1:[i*Math.cos(s),i*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Da)+",1 "+t}function u(n,t,e,r){return"Q 0,0 "+r}var i=yr,o=Mr,a=Uo,c=co,l=lo;return n.radius=function(t){return arguments.length?(a=Et(t),n):a},n.source=function(t){return arguments.length?(i=Et(t),n):i},n.target=function(t){return arguments.length?(o=Et(t),n):o},n.startAngle=function(t){return arguments.length?(c=Et(t),n):c},n.endAngle=function(t){return arguments.length?(l=Et(t),n):l},n},ta.svg.diagonal=function(){function n(n,u){var i=t.call(this,n,u),o=e.call(this,n,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var t=yr,e=Mr,r=jo;return n.source=function(e){return arguments.length?(t=Et(e),n):t},n.target=function(t){return arguments.length?(e=Et(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},ta.svg.diagonal.radial=function(){var n=ta.svg.diagonal(),t=jo,e=n.projection;return n.projection=function(n){return arguments.length?e(Fo(t=n)):t},n},ta.svg.symbol=function(){function n(n,r){return(Rl.get(t.call(this,n,r))||Yo)(e.call(this,n,r))}var t=Oo,e=Ho;return n.type=function(e){return arguments.length?(t=Et(e),n):t},n.size=function(t){return arguments.length?(e=Et(t),n):e},n};var Rl=ta.map({circle:Yo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*jl)),e=t*jl;return"M0,"+-t+"L"+e+",0"+" 0,"+t+" "+-e+",0"+"Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});ta.svg.symbolTypes=Rl.keys();var Dl,Pl,Ul=Math.sqrt(3),jl=Math.tan(30*Fa),Fl=[],Hl=0;Fl.call=ka.call,Fl.empty=ka.empty,Fl.node=ka.node,Fl.size=ka.size,ta.transition=function(n){return arguments.length?Dl?n.transition():n:Na.transition()},ta.transition.prototype=Fl,Fl.select=function(n){var t,e,r,u=this.id,i=this.namespace,o=[];n=k(n);for(var a=-1,c=this.length;++a<c;){o.push(t=[]);for(var l=this[a],s=-1,f=l.length;++s<f;)(r=l[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),$o(e,s,i,u,r[i][u]),t.push(e)):t.push(null)}return Io(o,i,u)},Fl.selectAll=function(n){var t,e,r,u,i,o=this.id,a=this.namespace,c=[];n=E(n);for(var l=-1,s=this.length;++l<s;)for(var f=this[l],h=-1,g=f.length;++h<g;)if(r=f[h]){i=r[a][o],e=n.call(r,r.__data__,h,l),c.push(t=[]);for(var p=-1,v=e.length;++p<v;)(u=e[p])&&$o(u,p,a,o,i),t.push(u)}return Io(c,a,o)},Fl.filter=function(n){var t,e,r,u=[];"function"!=typeof n&&(n=j(n));for(var i=0,o=this.length;o>i;i++){u.push(t=[]);for(var e=this[i],a=0,c=e.length;c>a;a++)(r=e[a])&&n.call(r,r.__data__,a,i)&&t.push(r)}return Io(u,this.namespace,this.id)},Fl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):H(this,null==t?function(t){t[r][e].tween.remove(n)}:function(u){u[r][e].tween.set(n,t)})},Fl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function u(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=o(e,n),function(n){this.setAttribute(a,t(n))})})}function i(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=o(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var o="transform"==n?Ou:yu,a=ta.ns.qualify(n);return Zo(this,"attr."+n,t,a.local?i:u)},Fl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(u));return r&&function(n){this.setAttribute(u,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(u.space,u.local));return r&&function(n){this.setAttributeNS(u.space,u.local,r(n))}}var u=ta.ns.qualify(n);return this.tween("attr."+n,u.local?r:e)},Fl.style=function(n,t,e){function r(){this.style.removeProperty(n)}function u(t){return null==t?r:(t+="",function(){var r,u=oa.getComputedStyle(this,null).getPropertyValue(n);return u!==t&&(r=yu(u,t),function(t){this.style.setProperty(n,r(t),e)})})}var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(e in n)this.style(e,n[e],t);return this}e=""}return Zo(this,"style."+n,t,u)},Fl.styleTween=function(n,t,e){function r(r,u){var i=t.call(this,r,u,oa.getComputedStyle(this,null).getPropertyValue(n));return i&&function(t){this.style.setProperty(n,i(t),e)}}return arguments.length<3&&(e=""),this.tween("style."+n,r)},Fl.text=function(n){return Zo(this,"text",n,Vo)},Fl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Fl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=ta.ease.apply(ta,arguments)),H(this,function(r){r[e][t].ease=n}))},Fl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:H(this,"function"==typeof n?function(r,u,i){r[e][t].delay=+n.call(r,r.__data__,u,i)}:(n=+n,function(r){r[e][t].delay=n}))},Fl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:H(this,"function"==typeof n?function(r,u,i){r[e][t].duration=Math.max(1,n.call(r,r.__data__,u,i))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Fl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var u=Pl,i=Dl;Dl=e,H(this,function(t,u,i){Pl=t[r][e],n.call(t,t.__data__,u,i)}),Pl=u,Dl=i}else H(this,function(u){var i=u[r][e];(i.event||(i.event=ta.dispatch("start","end","interrupt"))).on(n,t)});return this},Fl.transition=function(){for(var n,t,e,r,u=this.id,i=++Hl,o=this.namespace,a=[],c=0,l=this.length;l>c;c++){a.push(n=[]);for(var t=this[c],s=0,f=t.length;f>s;s++)(e=t[s])&&(r=e[o][u],$o(e,s,o,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Io(a,o,i)},ta.svg.axis=function(){function n(n){n.each(function(){var n,l=ta.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==c?f.ticks?f.ticks.apply(f,a):f.domain():c,g=null==t?f.tickFormat?f.tickFormat.apply(f,a):At:t,p=l.selectAll(".tick").data(h,f),v=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Ta),d=ta.transition(p.exit()).style("opacity",Ta).remove(),m=ta.transition(p.order()).style("opacity",1),y=Math.max(u,0)+o,M=ji(f),x=l.selectAll(".domain").data([0]),b=(x.enter().append("path").attr("class","domain"),ta.transition(x));v.append("line"),v.append("text");var _,w,S,k,E=v.select("line"),A=m.select("line"),N=p.select("text").text(g),C=v.select("text"),z=m.select("text"),q="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=Bo,_="x",S="y",w="x2",k="y2",N.attr("dy",0>q?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+M[0]+","+q*i+"V0H"+M[1]+"V"+q*i)):(n=Wo,_="y",S="x",w="y2",k="x2",N.attr("dy",".32em").style("text-anchor",0>q?"end":"start"),b.attr("d","M"+q*i+","+M[0]+"H0V"+M[1]+"H"+q*i)),E.attr(k,q*u),C.attr(S,q*y),A.attr(w,0).attr(k,q*u),z.attr(_,0).attr(S,q*y),f.rangeBand){var L=f,T=L.rangeBand()/2;s=f=function(n){return L(n)+T}}else s.rangeBand?s=f:d.call(n,f,s);v.call(n,s,f),m.call(n,f,f)})}var t,e=ta.scale.linear(),r=Ol,u=6,i=6,o=3,a=[10],c=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Ol,n):r},n.ticks=function(){return arguments.length?(a=arguments,n):a},n.tickValues=function(t){return arguments.length?(c=t,n):c},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(u=+t,i=+arguments[e-1],n):u},n.innerTickSize=function(t){return arguments.length?(u=+t,n):u},n.outerTickSize=function(t){return arguments.length?(i=+t,n):i},n.tickPadding=function(t){return arguments.length?(o=+t,n):o},n.tickSubdivide=function(){return arguments.length&&n},n};var Ol="bottom",Yl={top:1,right:1,bottom:1,left:1};ta.svg.brush=function(){function n(i){i.each(function(){var i=ta.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",u).on("touchstart.brush",u),o=i.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),i.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=i.selectAll(".resize").data(p,At);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Il[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var s,f=ta.transition(i),h=ta.transition(o);c&&(s=ji(c),h.attr("x",s[0]).attr("width",s[1]-s[0]),e(f)),l&&(s=ji(l),h.attr("y",s[0]).attr("height",s[1]-s[0]),r(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+s[+/e$/.test(n)]+","+f[+/^s/.test(n)]+")"})}function e(n){n.select(".extent").attr("x",s[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",s[1]-s[0])}function r(n){n.select(".extent").attr("y",f[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function u(){function u(){32==ta.event.keyCode&&(N||(y=null,z[0]-=s[1],z[1]-=f[1],N=2),b())}function p(){32==ta.event.keyCode&&2==N&&(z[0]+=s[1],z[1]+=f[1],N=0,b())}function v(){var n=ta.mouse(x),u=!1;M&&(n[0]+=M[0],n[1]+=M[1]),N||(ta.event.altKey?(y||(y=[(s[0]+s[1])/2,(f[0]+f[1])/2]),z[0]=s[+(n[0]<y[0])],z[1]=f[+(n[1]<y[1])]):y=null),E&&d(n,c,0)&&(e(S),u=!0),A&&d(n,l,1)&&(r(S),u=!0),u&&(t(S),w({type:"brush",mode:N?"move":"resize"}))}function d(n,t,e){var r,u,a=ji(t),c=a[0],l=a[1],p=z[e],v=e?f:s,d=v[1]-v[0];return N&&(c-=p,l-=d+p),r=(e?g:h)?Math.max(c,Math.min(l,n[e])):n[e],N?u=(r+=p)+d:(y&&(p=Math.max(c,Math.min(l,2*y[e]-r))),r>p?(u=r,r=p):u=p),v[0]!=r||v[1]!=u?(e?o=null:i=null,v[0]=r,v[1]=u,!0):void 0}function m(){v(),S.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),ta.select("body").style("cursor",null),q.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),w({type:"brushend"})}var y,M,x=this,_=ta.select(ta.event.target),w=a.of(x,arguments),S=ta.select(x),k=_.datum(),E=!/^(n|s)$/.test(k)&&c,A=!/^(e|w)$/.test(k)&&l,N=_.classed("extent"),C=$(),z=ta.mouse(x),q=ta.select(oa).on("keydown.brush",u).on("keyup.brush",p);if(ta.event.changedTouches?q.on("touchmove.brush",v).on("touchend.brush",m):q.on("mousemove.brush",v).on("mouseup.brush",m),S.interrupt().selectAll("*").interrupt(),N)z[0]=s[0]-z[0],z[1]=f[0]-z[1];else if(k){var L=+/w$/.test(k),T=+/^n/.test(k);M=[s[1-L]-z[0],f[1-T]-z[1]],z[0]=s[L],z[1]=f[T]}else ta.event.altKey&&(y=z.slice());S.style("pointer-events","none").selectAll(".resize").style("display",null),ta.select("body").style("cursor",_.style("cursor")),w({type:"brushstart"}),v()}var i,o,a=w(n,"brushstart","brush","brushend"),c=null,l=null,s=[0,0],f=[0,0],h=!0,g=!0,p=Zl[0];return n.event=function(n){n.each(function(){var n=a.of(this,arguments),t={x:s,y:f,i:i,j:o},e=this.__chart__||t;this.__chart__=t,Dl?ta.select(this).transition().each("start.brush",function(){i=e.i,o=e.j,s=e.x,f=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mu(s,t.x),r=Mu(f,t.y);return i=o=null,function(u){s=t.x=e(u),f=t.y=r(u),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){i=t.i,o=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,p=Zl[!c<<1|!l],n):c},n.y=function(t){return arguments.length?(l=t,p=Zl[!c<<1|!l],n):l},n.clamp=function(t){return arguments.length?(c&&l?(h=!!t[0],g=!!t[1]):c?h=!!t:l&&(g=!!t),n):c&&l?[h,g]:c?h:l?g:null},n.extent=function(t){var e,r,u,a,h;return arguments.length?(c&&(e=t[0],r=t[1],l&&(e=e[0],r=r[0]),i=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(h=e,e=r,r=h),(e!=s[0]||r!=s[1])&&(s=[e,r])),l&&(u=t[0],a=t[1],c&&(u=u[1],a=a[1]),o=[u,a],l.invert&&(u=l(u),a=l(a)),u>a&&(h=u,u=a,a=h),(u!=f[0]||a!=f[1])&&(f=[u,a])),n):(c&&(i?(e=i[0],r=i[1]):(e=s[0],r=s[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(h=e,e=r,r=h))),l&&(o?(u=o[0],a=o[1]):(u=f[0],a=f[1],l.invert&&(u=l.invert(u),a=l.invert(a)),u>a&&(h=u,u=a,a=h))),c&&l?[[e,u],[r,a]]:c?[e,r]:l&&[u,a])},n.clear=function(){return n.empty()||(s=[0,0],f=[0,0],i=o=null),n},n.empty=function(){return!!c&&s[0]==s[1]||!!l&&f[0]==f[1]},ta.rebind(n,a,"on")};var Il={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Vl=fc.format=mc.timeFormat,Xl=Vl.utc,$l=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Vl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Jo:$l,Jo.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},Jo.toString=$l.toString,fc.second=Ht(function(n){return new hc(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),fc.seconds=fc.second.range,fc.seconds.utc=fc.second.utc.range,fc.minute=Ht(function(n){return new hc(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),fc.minutes=fc.minute.range,fc.minutes.utc=fc.minute.utc.range,fc.hour=Ht(function(n){var t=n.getTimezoneOffset()/60;return new hc(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),fc.hours=fc.hour.range,fc.hours.utc=fc.hour.utc.range,fc.month=Ht(function(n){return n=fc.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),fc.months=fc.month.range,fc.months.utc=fc.month.utc.range;var Bl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Wl=[[fc.second,1],[fc.second,5],[fc.second,15],[fc.second,30],[fc.minute,1],[fc.minute,5],[fc.minute,15],[fc.minute,30],[fc.hour,1],[fc.hour,3],[fc.hour,6],[fc.hour,12],[fc.day,1],[fc.day,2],[fc.week,1],[fc.month,1],[fc.month,3],[fc.year,1]],Jl=Vl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Ce]]),Gl={range:function(n,t,e){return ta.range(Math.ceil(n/e)*e,+t,e).map(Ko)},floor:At,ceil:At};Wl.year=fc.year,fc.scale=function(){return Go(ta.scale.linear(),Wl,Jl)};var Kl=Wl.map(function(n){return[n[0].utc,n[1]]}),Ql=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Ce]]);Kl.year=fc.year.utc,fc.scale.utc=function(){return Go(ta.scale.linear(),Kl,Ql)},ta.text=Nt(function(n){return n.responseText}),ta.json=function(n,t){return Ct(n,"application/json",Qo,t)},ta.html=function(n,t){return Ct(n,"text/html",na,t)},ta.xml=Nt(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(ta):"object"==typeof module&&module.exports&&(module.exports=ta),this.d3=ta}(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.cloud.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.cloud.js
deleted file mode 100644
index 44c4f7de..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.cloud.js
+++ /dev/null
@@ -1,433 +0,0 @@
-// Word cloud layout by Jason Davies, http://www.jasondavies.com/word-cloud/
-// Algorithm due to Jonathan Feinberg, http://static.mrfeinberg.com/bv_ch03.pdf
-(function() {
- function cloud() {
- var size = [256, 256],
- text = cloudText,
- font = cloudFont,
- fontSize = cloudFontSize,
- fontStyle = cloudFontNormal,
- fontWeight = cloudFontNormal,
- rotate = cloudRotate,
- padding = cloudPadding,
- spiral = archimedeanSpiral,
- words = [],
- timeInterval = Infinity,
- event = d3.dispatch("word", "end"),
- timer = null,
- cloud = {};
-
- cloud.start = function() {
- var board = zeroArray((size[0] >> 5) * size[1]),
- bounds = null,
- n = words.length,
- i = -1,
- tags = [],
- data = words.map(function(d, i) {
- d.text = text.call(this, d, i);
- d.font = font.call(this, d, i);
- d.style = fontStyle.call(this, d, i);
- d.weight = fontWeight.call(this, d, i);
- d.rotate = rotate.call(this, d, i);
- d.size = ~~fontSize.call(this, d, i);
- d.padding = padding.call(this, d, i);
- return d;
- }).sort(function(a, b) { return b.size - a.size; });
-// createMask();
-/* var bd = 3000;
- while (bd < 4000) {
- board[bd] = -1;
- bd++
- }
- */
- function createMask()
- {
- d3.select("body").append("canvas").attr("id", "maskCanvas")
- maskCanvas = document.getElementById('maskCanvas'),
- maskCanvas.width = 85;
- maskCanvas.height = 85;
- maskContext = maskCanvas.getContext('2d');
- maskImage = new Image();
- maskImage.src = 'mask.png';
- maskImage.onload = function(){
- maskContext.drawImage(maskImage,0,0,85,85 * maskImage.height / maskImage.width);
- maskData = maskContext.getImageData(0,0,85,85).data;
-/*
- var hh = 0;
- while (hh < maskData.length) {
- if (hh%4 == 0) {
- if (maskData[hh] == 0) {
- board[~~(hh/4)] = -1;
- }
- }
- hh++;
- }
- */
-
- }
- }
- if (timer) clearInterval(timer);
- timer = setInterval(step, 0);
- step();
-
- return cloud;
-
- function step() {
- var start = +new Date,
- d;
- while (+new Date - start < timeInterval && ++i < n && timer) {
- d = data[i];
- d.x = (size[0] * (Math.random() + .5)) >> 1;
- d.y = (size[1] * (Math.random() + .5)) >> 1;
- cloudSprite(d, data, i);
- if (d.hasText && place(board, d, bounds)) {
- tags.push(d);
- event.word(d);
- if (bounds) cloudBounds(bounds, d);
- else bounds = [{x: d.x + d.x0, y: d.y + d.y0}, {x: d.x + d.x1, y: d.y + d.y1}];
- // Temporary hack
- d.x -= size[0] >> 1;
- d.y -= size[1] >> 1;
- }
- }
- if (i >= n) {
- cloud.stop();
- event.end(tags, bounds);
- }
- }
- }
-
- cloud.stop = function() {
- if (timer) {
- clearInterval(timer);
- timer = null;
- }
- return cloud;
- };
-
- cloud.timeInterval = function(x) {
- if (!arguments.length) return timeInterval;
- timeInterval = x == null ? Infinity : x;
- return cloud;
- };
-
- function place(board, tag, bounds) {
- var perimeter = [{x: 0, y: 0}, {x: size[0], y: size[1]}],
- startX = tag.x,
- startY = tag.y,
- maxDelta = Math.sqrt(size[0] * size[0] + size[1] * size[1]),
- s = spiral(size),
- dt = Math.random() < .5 ? 1 : -1,
- t = -dt,
- dxdy,
- dx,
- dy;
-
- while (dxdy = s(t += dt)) {
- dx = ~~dxdy[0];
- dy = ~~dxdy[1];
-
- if (Math.min(dx, dy) > maxDelta) break;
-
- tag.x = startX + dx;
- tag.y = startY + dy;
-
- if (tag.x + tag.x0 < 0 || tag.y + tag.y0 < 0 ||
- tag.x + tag.x1 > size[0] || tag.y + tag.y1 > size[1]) continue;
- // TODO only check for collisions within current bounds.
- if (!bounds || !cloudCollide(tag, board, size[0])) {
- if (!bounds || collideRects(tag, bounds)) {
- var sprite = tag.sprite,
- w = tag.width >> 5,
- sw = size[0] >> 5,
- lx = tag.x - (w << 4),
- sx = lx & 0x7f,
- msx = 32 - sx,
- h = tag.y1 - tag.y0,
- x = (tag.y + tag.y0) * sw + (lx >> 5),
- last;
- for (var j = 0; j < h; j++) {
- last = 0;
- for (var i = 0; i <= w; i++) {
- board[x + i] |= (last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0);
- }
- x += sw;
- }
- delete tag.sprite;
- return true;
- }
- }
- }
- return false;
- }
-
- cloud.words = function(x) {
- if (!arguments.length) return words;
- words = x;
- return cloud;
- };
-
- cloud.size = function(x) {
- if (!arguments.length) return size;
- size = [+x[0], +x[1]];
- return cloud;
- };
-
- cloud.font = function(x) {
- if (!arguments.length) return font;
- font = d3.functor(x);
- return cloud;
- };
-
- cloud.fontStyle = function(x) {
- if (!arguments.length) return fontStyle;
- fontStyle = d3.functor(x);
- return cloud;
- };
-
- cloud.fontWeight = function(x) {
- if (!arguments.length) return fontWeight;
- fontWeight = d3.functor(x);
- return cloud;
- };
-
- cloud.rotate = function(x) {
- if (!arguments.length) return rotate;
- rotate = d3.functor(x);
- return cloud;
- };
-
- cloud.text = function(x) {
- if (!arguments.length) return text;
- text = d3.functor(x);
- return cloud;
- };
-
- cloud.spiral = function(x) {
- if (!arguments.length) return spiral;
- spiral = spirals[x + ""] || x;
- return cloud;
- };
-
- cloud.fontSize = function(x) {
- if (!arguments.length) return fontSize;
- fontSize = d3.functor(x);
- return cloud;
- };
-
- cloud.padding = function(x) {
- if (!arguments.length) return padding;
- padding = d3.functor(x);
- return cloud;
- };
-
- return d3.rebind(cloud, event, "on");
- }
-
- function cloudText(d) {
- return d.text;
- }
-
- function cloudFont() {
- return "serif";
- }
-
- function cloudFontNormal() {
- return "normal";
- }
-
- function cloudFontSize(d) {
- return Math.sqrt(d.value);
- }
-
- function cloudRotate() {
- return (~~(Math.random() * 6) - 3) * 30;
- }
-
- function cloudPadding() {
- return 1;
- }
-
- // Fetches a monochrome sprite bitmap for the specified text.
- // Load in batches for speed.
- function cloudSprite(d, data, di) {
- if (d.sprite) return;
- c.clearRect(0, 0, (cw << 5) / ratio, ch / ratio);
- var x = 0,
- y = 0,
- maxh = 0,
- n = data.length;
- --di;
- while (++di < n) {
- d = data[di];
- c.save();
- c.font = d.style + " " + d.weight + " " + ~~((d.size + 1) / ratio) + "px " + d.font;
- var w = c.measureText(d.text + "m").width * ratio,
- h = d.size << 1;
- if (d.rotate) {
- var sr = Math.sin(d.rotate * cloudRadians),
- cr = Math.cos(d.rotate * cloudRadians),
- wcr = w * cr,
- wsr = w * sr,
- hcr = h * cr,
- hsr = h * sr;
- w = (Math.max(Math.abs(wcr + hsr), Math.abs(wcr - hsr)) + 0x1f) >> 5 << 5;
- h = ~~Math.max(Math.abs(wsr + hcr), Math.abs(wsr - hcr));
- } else {
- w = (w + 0x1f) >> 5 << 5;
- }
- if (h > maxh) maxh = h;
- if (x + w >= (cw << 5)) {
- x = 0;
- y += maxh;
- maxh = 0;
- }
- if (y + h >= ch) break;
- c.translate((x + (w >> 1)) / ratio, (y + (h >> 1)) / ratio);
- if (d.rotate) c.rotate(d.rotate * cloudRadians);
- c.fillText(d.text, 0, 0);
- if (d.padding) c.lineWidth = 2 * d.padding, c.strokeText(d.text, 0, 0);
- c.restore();
- d.width = w;
- d.height = h;
- d.xoff = x;
- d.yoff = y;
- d.x1 = w >> 1;
- d.y1 = h >> 1;
- d.x0 = -d.x1;
- d.y0 = -d.y1;
- d.hasText = true;
- x += w;
- }
- var pixels = c.getImageData(0, 0, (cw << 5) / ratio, ch / ratio).data,
- sprite = [];
- while (--di >= 0) {
- d = data[di];
- if (!d.hasText) continue;
- var w = d.width,
- w32 = w >> 5,
- h = d.y1 - d.y0;
- // Zero the buffer
- for (var i = 0; i < h * w32; i++) sprite[i] = 0;
- x = d.xoff;
- if (x == null) return;
- y = d.yoff;
- var seen = 0,
- seenRow = -1;
- for (var j = 0; j < h; j++) {
- for (var i = 0; i < w; i++) {
- var k = w32 * j + (i >> 5),
- m = pixels[((y + j) * (cw << 5) + (x + i)) << 2] ? 1 << (31 - (i % 32)) : 0;
- sprite[k] |= m;
- seen |= m;
- }
- if (seen) seenRow = j;
- else {
- d.y0++;
- h--;
- j--;
- y++;
- }
- }
- d.y1 = d.y0 + seenRow;
- d.sprite = sprite.slice(0, (d.y1 - d.y0) * w32);
- }
- }
-
- // Use mask-based collision detection.
- function cloudCollide(tag, board, sw) {
- sw >>= 5;
- var sprite = tag.sprite,
- w = tag.width >> 5,
- lx = tag.x - (w << 4),
- sx = lx & 0x7f,
- msx = 32 - sx,
- h = tag.y1 - tag.y0,
- x = (tag.y + tag.y0) * sw + (lx >> 5),
- last;
- for (var j = 0; j < h; j++) {
- last = 0;
- for (var i = 0; i <= w; i++) {
- if (((last << msx) | (i < w ? (last = sprite[j * w + i]) >>> sx : 0))
- & board[x + i]) return true;
- }
- x += sw;
- }
- return false;
- }
-
- function cloudBounds(bounds, d) {
- var b0 = bounds[0],
- b1 = bounds[1];
- if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;
- if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;
- if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;
- if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;
- }
-
- function collideRects(a, b) {
- return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;
- }
-
- function archimedeanSpiral(size) {
- var e = size[0] / size[1];
- return function(t) {
- return [e * (t *= .1) * Math.cos(t), t * Math.sin(t)];
- };
- }
-
- function rectangularSpiral(size) {
- var dy = 4,
- dx = dy * size[0] / size[1],
- x = 0,
- y = 0;
- return function(t) {
- var sign = t < 0 ? -1 : 1;
- // See triangular numbers: T_n = n * (n + 1) / 2.
- switch ((Math.sqrt(1 + 4 * sign * t) - sign) & 3) {
- case 0: x += dx; break;
- case 1: y += dy; break;
- case 2: x -= dx; break;
- default: y -= dy; break;
- }
- return [x, y];
- };
- }
-
- // TODO reuse arrays?
- function zeroArray(n) {
- var a = [],
- i = -1;
- while (++i < n) a[i] = 0;
- return a;
- }
-
- var cloudRadians = Math.PI / 180,
- cw = 1 << 11 >> 5,
- ch = 1 << 11,
- canvas,
- ratio = 1;
-
- if (typeof document !== "undefined") {
- canvas = document.createElement("canvas");
- canvas.width = 1;
- canvas.height = 1;
- ratio = Math.sqrt(canvas.getContext("2d").getImageData(0, 0, 1, 1).data.length >> 2);
- canvas.width = (cw << 5) / ratio;
- canvas.height = ch / ratio;
- } else {
- // Attempt to use node-canvas.
- canvas = new Canvas(cw << 5, ch);
- }
-
- var c = canvas.getContext("2d"),
- spirals = {
- archimedean: archimedeanSpiral,
- rectangular: rectangularSpiral
- };
- c.fillStyle = c.strokeStyle = "red";
- c.textAlign = "center";
-
- if (typeof module === "object" && module.exports) module.exports = cloud;
- else (d3.layout || (d3.layout = {})).cloud = cloud;
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.js
deleted file mode 100644
index abc5ebef..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.layout.js
+++ /dev/null
@@ -1,908 +0,0 @@
-(function(){d3.layout = {};
-d3.layout.chord = function() {
- var chord = {},
- chords,
- groups,
- matrix,
- n,
- padding = 0,
- sortGroups,
- sortSubgroups,
- sortChords;
-
- function relayout() {
- var subgroups = {},
- groupSums = [],
- groupIndex = d3.range(n),
- subgroupIndex = [],
- k,
- x,
- x0,
- i,
- j;
-
- chords = [];
- groups = [];
-
- // Compute the sum.
- k = 0, i = -1; while (++i < n) {
- x = 0, j = -1; while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
-
- // Sort groups…
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
-
- // Sort subgroups…
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
-
- // Convert the sum to scaling factor for [0, 2pi].
- // TODO Allow start and end angle to be specified.
- // TODO Allow padding to be specified as percentage?
- k = (2 * Math.PI - padding * n) / k;
-
- // Compute the start and end angle for each group and subgroup.
- x = 0, i = -1; while (++i < n) {
- x0 = x, j = -1; while (++j < n) {
- var di = groupIndex[i],
- dj = subgroupIndex[i][j],
- v = matrix[di][dj];
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: x,
- endAngle: x += v * k,
- value: v
- };
- }
- groups.push({
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- });
- x += padding;
- }
-
- // Generate chords for each (non-empty) subgroup-subgroup link.
- i = -1; while (++i < n) {
- j = i - 1; while (++j < n) {
- var source = subgroups[i + "-" + j],
- target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push({
- source: source,
- target: target
- })
- }
- }
- }
-
- if (sortChords) resort();
- }
-
- function resort() {
- chords.sort(function(a, b) {
- a = Math.min(a.source.value, a.target.value);
- b = Math.min(b.source.value, b.target.value);
- return sortChords(a, b);
- });
- }
-
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
-
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
-
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
-
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
-
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
-
- return chord;
-};
-// A rudimentary force layout using Gauss-Seidel.
-d3.layout.force = function() {
- var force = {},
- event = d3.dispatch("tick"),
- size = [1, 1],
- alpha = .5,
- distance = 30,
- interval,
- nodes,
- links,
- distances;
-
- function tick() {
- var n = distances.length,
- i, // current index
- o, // current link
- s, // current source
- t, // current target
- l, // current distance
- x, // x-distance
- y; // y-distance
-
- // gauss-seidel relaxation
- for (i = 0; i < n; ++i) {
- o = distances[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = Math.sqrt(x * x + y * y)) {
- l = alpha / (o.distance * o.distance) * (l - distance * o.distance) / l;
- x *= l;
- y *= l;
- if (!t.fixed) {
- t.x -= x;
- t.y -= y;
- }
- if (!s.fixed) {
- s.x += x;
- s.y += y;
- }
- }
- }
-
- event.tick.dispatch({type: "tick"});
-
- // simulated annealing, basically
- return (alpha *= .99) < .005;
- }
-
- force.on = function(type, listener) {
- event[type].add(listener);
- return force;
- };
-
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
-
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
-
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
-
- force.distance = function(d) {
- if (!arguments.length) return distance;
- distance = d;
- return force;
- };
-
- force.start = function() {
- var i,
- j,
- k,
- n = nodes.length,
- m = links.length,
- w = size[0],
- h = size[1],
- o;
-
- var paths = [];
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- o.x = o.x || Math.random() * w;
- o.y = o.y || Math.random() * h;
- o.fixed = 0;
- paths[i] = [];
- for (j = 0; j < n; ++j) {
- paths[i][j] = Infinity;
- }
- paths[i][i] = 0;
- }
-
- for (i = 0; i < m; ++i) {
- o = links[i];
- paths[o.source][o.target] = 1;
- paths[o.target][o.source] = 1;
- o.source = nodes[o.source];
- o.target = nodes[o.target];
- }
-
- // Floyd-Warshall
- for (k = 0; k < n; ++k) {
- for (i = 0; i < n; ++i) {
- for (j = 0; j < n; ++j) {
- paths[i][j] = Math.min(paths[i][j], paths[i][k] + paths[k][j]);
- }
- }
- }
-
- distances = [];
- for (i = 0; i < n; ++i) {
- for (j = i + 1; j < n; ++j) {
- distances.push({
- source: nodes[i],
- target: nodes[j],
- distance: paths[i][j] * paths[i][j]
- });
- }
- }
-
- distances.sort(function(a, b) {
- return a.distance - b.distance;
- });
-
- d3.timer(tick);
- return force;
- };
-
- force.resume = function() {
- alpha = .1;
- d3.timer(tick);
- return force;
- };
-
- force.stop = function() {
- alpha = 0;
- return force;
- };
-
- // use `node.call(force.drag)` to make nodes draggable
- force.drag = function() {
- var node, element;
-
- this
- .on("mouseover", function(d) { d.fixed = true; })
- .on("mouseout", function(d) { if (d != node) d.fixed = false; })
- .on("mousedown", mousedown);
-
- d3.select(window)
- .on("mousemove", mousemove)
- .on("mouseup", mouseup);
-
- function mousedown(d) {
- (node = d).fixed = true;
- element = this;
- d3.event.preventDefault();
- }
-
- function mousemove() {
- if (!node) return;
- var m = d3.svg.mouse(element);
- node.x = m[0];
- node.y = m[1];
- force.resume(); // restart annealing
- }
-
- function mouseup() {
- if (!node) return;
- mousemove();
- node.fixed = false;
- node = element = null;
- }
-
- return force;
- };
-
- return force;
-};
-d3.layout.partition = function() {
- var hierarchy = d3.layout.hierarchy(),
- size = [1, 1]; // width, height
-
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children) {
- var i = -1,
- n = children.length,
- c,
- d;
- dx /= node.value;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
-
- function depth(node) {
- var children = node.children,
- d = 0;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
-
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
-
- partition.sort = d3.rebind(partition, hierarchy.sort);
- partition.children = d3.rebind(partition, hierarchy.children);
- partition.value = d3.rebind(partition, hierarchy.value);
-
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
-
- return partition;
-};
-d3.layout.pie = function() {
- var value = Number,
- sort = null,
- startAngle = 0,
- endAngle = 2 * Math.PI;
-
- function pie(data, i) {
-
- // Compute the start angle.
- var a = +(typeof startAngle == "function"
- ? startAngle.apply(this, arguments)
- : startAngle);
-
- // Compute the angular range (end - start).
- var k = (typeof endAngle == "function"
- ? endAngle.apply(this, arguments)
- : endAngle) - startAngle;
-
- // Optionally sort the data.
- var index = d3.range(data.length);
- if (sort != null) index.sort(function(i, j) {
- return sort(data[i], data[j]);
- });
-
- // Compute the numeric values for each data element.
- var values = data.map(value);
-
- // Convert k into a scale factor from value to angle, using the sum.
- k /= values.reduce(function(p, d) { return p + d; }, 0);
-
- // Compute the arcs!
- var arcs = index.map(function(i) {
- return {
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
-
- // Return the arcs in the original data's order.
- return data.map(function(d, i) {
- return arcs[index[i]];
- });
- }
-
- /**
- * Specifies the value function *x*, which returns a nonnegative numeric value
- * for each datum. The default value function is `Number`. The value function
- * is passed two arguments: the current datum and the current index.
- */
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
-
- /**
- * Specifies a sort comparison operator *x*. The comparator is passed two data
- * elements from the data array, a and b; it returns a negative value if a is
- * less than b, a positive value if a is greater than b, and zero if a equals
- * b.
- */
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
-
- /**
- * Specifies the overall start angle of the pie chart. Defaults to 0. The
- * start angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
-
- /**
- * Specifies the overall end angle of the pie chart. Defaults to 2Ï€. The
- * end angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
-
- return pie;
-};
-// data is two-dimensional array of x,y; we populate y0
-// TODO perhaps make the `x`, `y` and `y0` structure customizable
-d3.layout.stack = function() {
- var order = "default",
- offset = "zero";
-
- function stack(data) {
- var n = data.length,
- m = data[0].length,
- i,
- j,
- y0;
-
- // compute the order of series
- var index = d3_layout_stackOrders[order](data);
-
- // set y0 on the baseline
- d3_layout_stackOffsets[offset](data, index);
-
- // propagate offset to other series
- for (j = 0; j < m; ++j) {
- for (i = 1, y0 = data[index[0]][j].y0; i < n; ++i) {
- data[index[i]][j].y0 = y0 += data[index[i - 1]][j].y;
- }
- }
-
- return data;
- }
-
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = x;
- return stack;
- };
-
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = x;
- return stack;
- };
-
- return stack;
-}
-
-var d3_layout_stackOrders = {
-
- "inside-out": function(data) {
- var n = data.length,
- i,
- j,
- max = data.map(d3_layout_stackMaxIndex),
- sums = data.map(d3_layout_stackReduceSum),
- index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),
- top = 0,
- bottom = 0,
- tops = [],
- bottoms = [];
- for (i = 0; i < n; i++) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
-
- "reverse": function(data) {
- return d3.range(data.length).reverse();
- },
-
- "default": function(data) {
- return d3.range(data.length);
- }
-
-};
-
-var d3_layout_stackOffsets = {
-
- "silhouette": function(data, index) {
- var n = data.length,
- m = data[0].length,
- sums = [],
- max = 0,
- i,
- j,
- o;
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j].y;
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0, i = index[0]; j < m; ++j) {
- data[i][j].y0 = (max - sums[j]) / 2;
- }
- },
-
- "wiggle": function(data, index) {
- var n = data.length,
- x = data[0],
- m = x.length,
- max = 0,
- i,
- j,
- k,
- ii,
- ik,
- i0 = index[0],
- s1,
- s2,
- s3,
- dx,
- o,
- o0;
- data[i0][0].y0 = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j].y;
- for (i = 0, s2 = 0, dx = x[j].x - x[j - 1].x; i < n; ++i) {
- for (k = 0, ii = index[i], s3 = (data[ii][j].y - data[ii][j - 1].y) / (2 * dx); k < i; ++k) {
- s3 += (data[ik = index[k]][j].y - data[ik][j - 1].y) / dx;
- }
- s2 += s3 * data[ii][j].y;
- }
- data[i0][j].y0 = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) data[i0][j].y0 -= o0;
- },
-
- "zero": function(data, index) {
- var j = 0,
- m = data[0].length,
- i0 = index[0];
- for (; j < m; ++j) data[i0][j].y0 = 0;
- }
-
-};
-
-function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
-}
-
-function d3_layout_stackMaxIndex(array) {
- var i = 1,
- j = 0,
- v = array[0].y,
- k,
- n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i].y) > v) {
- j = i;
- v = k;
- }
- }
- return j;
-}
-
-function d3_layout_stackSum(p, d) {
- return p + d.y;
-}
-d3.layout.hierarchy = function() {
- var sort = d3_layout_hierarchySort,
- children = d3_layout_hierarchyChildren,
- value = d3_layout_hierarchyValue;
-
- // Recursively compute the node depth and value.
- // Also converts the data representation into a standard hierarchy structure.
- function recurse(data, depth, nodes) {
- var datas = children.call(hierarchy, data, depth),
- node = {depth: depth, data: data};
- nodes.push(node);
- if (datas) {
- var i = -1,
- n = datas.length,
- c = node.children = [],
- v = 0,
- j = depth + 1;
- while (++i < n) {
- d = recurse(datas[i], j, nodes);
- if (d.value > 0) { // ignore NaN, negative, etc.
- c.push(d);
- v += d.value;
- d.parent = node;
- }
- }
- if (sort) c.sort(sort);
- node.value = v;
- } else {
- node.value = value.call(hierarchy, data, depth);
- }
- return node;
- }
-
- // Recursively re-evaluates the node value.
- function revalue(node, depth) {
- var children = node.children,
- v = 0;
- if (children) {
- var i = -1,
- n = children.length,
- j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else {
- v = value.call(hierarchy, node.data, depth);
- }
- return node.value = v;
- }
-
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
-
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
-
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
-
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
-
- // Re-evaluates the `value` property for the specified hierarchy.
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
-
- return hierarchy;
-}
-
-function d3_layout_hierarchyChildren(d) {
- return d.children;
-}
-
-function d3_layout_hierarchyValue(d) {
- return d.value;
-}
-
-function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
-}
-// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
-d3.layout.treemap = function() {
- var hierarchy = d3.layout.hierarchy(),
- round = Math.round,
- size = [1, 1], // width, height
- sticky = false,
- stickies;
-
- // Recursively compute the node area based on value & scale.
- function scale(node, k) {
- var children = node.children;
- node.area = node.value * k;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) scale(children[i], k);
- }
- }
-
- // Recursively arranges the specified node's children into squarified rows.
- function squarify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- row = [],
- children = node.children.slice(), // copy-on-write
- child,
- best = Infinity, // the best row score so far
- score, // the current row score
- u = Math.min(rect.dx, rect.dy), // initial orientation
- n;
- row.area = 0;
- while ((n = children.length) > 0) {
- row.push(child = children[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) { // continue with this orientation
- children.pop();
- best = score;
- } else { // abort, and try a different orientation
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- node.children.forEach(squarify);
- }
-
- // Recursively resizes the specified node's children into existing rows.
- // Preserves the existing layout!
- function stickify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- children = node.children.slice(), // copy-on-write
- child,
- row = [];
- row.area = 0;
- while (child = children.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !children.length);
- row.length = row.area = 0;
- }
- }
- node.children.forEach(stickify);
- }
-
- // Computes the score for the specified row, as the worst aspect ratio.
- function worst(row, u) {
- var s = row.area,
- r,
- rmax = 0,
- rmin = Infinity,
- i = -1,
- n = row.length;
- while (++i < n) {
- r = row[i].area;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return Math.max((u * rmax) / s, s / (u * rmin));
- }
-
- // Positions the specified row of nodes. Modifies `rect`.
- function position(row, u, rect, flush) {
- var i = -1,
- n = row.length,
- x = rect.x,
- y = rect.y,
- v = u ? round(row.area / u) : 0,
- o;
- if (u == rect.dx) { // horizontal subdivision
- if (flush || v > rect.dy) v = rect.dy; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = round(o.area / v);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x; // rounding error
- rect.y += v;
- rect.dy -= v;
- } else { // vertical subdivision
- if (flush || v > rect.dx) v = rect.dx; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = round(o.area / v);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y; // rounding error
- rect.x += v;
- rect.dx -= v;
- }
- }
-
- function treemap(d) {
- var nodes = stickies || hierarchy(d),
- root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale(root, size[0] * size[1] / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
-
- treemap.sort = d3.rebind(treemap, hierarchy.sort);
- treemap.children = d3.rebind(treemap, hierarchy.children);
- treemap.value = d3.rebind(treemap, hierarchy.value);
-
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
-
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
-
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
-
- return treemap;
-};
-})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.js
deleted file mode 100644
index 78c4dbca..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.js
+++ /dev/null
@@ -1,7037 +0,0 @@
-(function() {
- function d3_class(ctor, properties) {
- try {
- for (var key in properties) {
- Object.defineProperty(ctor.prototype, key, {
- value: properties[key],
- enumerable: false
- });
- }
- } catch (e) {
- ctor.prototype = properties;
- }
- }
- function d3_arrayCopy(pseudoarray) {
- var i = -1, n = pseudoarray.length, array = [];
- while (++i < n) array.push(pseudoarray[i]);
- return array;
- }
- function d3_arraySlice(pseudoarray) {
- return Array.prototype.slice.call(pseudoarray);
- }
- function d3_Map() {}
- function d3_identity(d) {
- return d;
- }
- function d3_this() {
- return this;
- }
- function d3_true() {
- return true;
- }
- function d3_functor(v) {
- return typeof v === "function" ? v : function() {
- return v;
- };
- }
- function d3_rebind(target, source, method) {
- return function() {
- var value = method.apply(source, arguments);
- return arguments.length ? target : value;
- };
- }
- function d3_number(x) {
- return x != null && !isNaN(x);
- }
- function d3_zipLength(d) {
- return d.length;
- }
- function d3_splitter(d) {
- return d == null;
- }
- function d3_collapse(s) {
- return s.trim().replace(/\s+/g, " ");
- }
- function d3_range_integerScale(x) {
- var k = 1;
- while (x * k % 1) k *= 10;
- return k;
- }
- function d3_dispatch() {}
- function d3_dispatch_event(dispatch) {
- function event() {
- var z = listeners, i = -1, n = z.length, l;
- while (++i < n) if (l = z[i].on) l.apply(this, arguments);
- return dispatch;
- }
- var listeners = [], listenerByName = new d3_Map;
- event.on = function(name, listener) {
- var l = listenerByName.get(name), i;
- if (arguments.length < 2) return l && l.on;
- if (l) {
- l.on = null;
- listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
- listenerByName.remove(name);
- }
- if (listener) listeners.push(listenerByName.set(name, {
- on: listener
- }));
- return dispatch;
- };
- return event;
- }
- function d3_format_precision(x, p) {
- return p - (x ? 1 + Math.floor(Math.log(x + Math.pow(10, 1 + Math.floor(Math.log(x) / Math.LN10) - p)) / Math.LN10) : 1);
- }
- function d3_format_typeDefault(x) {
- return x + "";
- }
- function d3_format_group(value) {
- var i = value.lastIndexOf("."), f = i >= 0 ? value.substring(i) : (i = value.length, ""), t = [];
- while (i > 0) t.push(value.substring(i -= 3, i + 3));
- return t.reverse().join(",") + f;
- }
- function d3_formatPrefix(d, i) {
- var k = Math.pow(10, Math.abs(8 - i) * 3);
- return {
- scale: i > 8 ? function(d) {
- return d / k;
- } : function(d) {
- return d * k;
- },
- symbol: d
- };
- }
- function d3_ease_clamp(f) {
- return function(t) {
- return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
- };
- }
- function d3_ease_reverse(f) {
- return function(t) {
- return 1 - f(1 - t);
- };
- }
- function d3_ease_reflect(f) {
- return function(t) {
- return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
- };
- }
- function d3_ease_identity(t) {
- return t;
- }
- function d3_ease_poly(e) {
- return function(t) {
- return Math.pow(t, e);
- };
- }
- function d3_ease_sin(t) {
- return 1 - Math.cos(t * Math.PI / 2);
- }
- function d3_ease_exp(t) {
- return Math.pow(2, 10 * (t - 1));
- }
- function d3_ease_circle(t) {
- return 1 - Math.sqrt(1 - t * t);
- }
- function d3_ease_elastic(a, p) {
- var s;
- if (arguments.length < 2) p = .45;
- if (arguments.length < 1) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return function(t) {
- return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
- };
- }
- function d3_ease_back(s) {
- if (!s) s = 1.70158;
- return function(t) {
- return t * t * ((s + 1) * t - s);
- };
- }
- function d3_ease_bounce(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
- }
- function d3_eventCancel() {
- d3.event.stopPropagation();
- d3.event.preventDefault();
- }
- function d3_eventSource() {
- var e = d3.event, s;
- while (s = e.sourceEvent) e = s;
- return e;
- }
- function d3_eventDispatch(target) {
- var dispatch = new d3_dispatch, i = 0, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- dispatch.of = function(thiz, argumentz) {
- return function(e1) {
- try {
- var e0 = e1.sourceEvent = d3.event;
- e1.target = target;
- d3.event = e1;
- dispatch[e1.type].apply(thiz, argumentz);
- } finally {
- d3.event = e0;
- }
- };
- };
- return dispatch;
- }
- function d3_transform(m) {
- var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
- if (r0[0] * r1[1] < r1[0] * r0[1]) {
- r0[0] *= -1;
- r0[1] *= -1;
- kx *= -1;
- kz *= -1;
- }
- this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_transformDegrees;
- this.translate = [ m.e, m.f ];
- this.scale = [ kx, ky ];
- this.skew = ky ? Math.atan2(kz, ky) * d3_transformDegrees : 0;
- }
- function d3_transformDot(a, b) {
- return a[0] * b[0] + a[1] * b[1];
- }
- function d3_transformNormalize(a) {
- var k = Math.sqrt(d3_transformDot(a, a));
- if (k) {
- a[0] /= k;
- a[1] /= k;
- }
- return k;
- }
- function d3_transformCombine(a, b, k) {
- a[0] += k * b[0];
- a[1] += k * b[1];
- return a;
- }
- function d3_interpolateByName(name) {
- return name == "transform" ? d3.interpolateTransform : d3.interpolate;
- }
- function d3_uninterpolateNumber(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return (x - a) * b;
- };
- }
- function d3_uninterpolateClamp(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return Math.max(0, Math.min(1, (x - a) * b));
- };
- }
- function d3_rgb(r, g, b) {
- return new d3_Rgb(r, g, b);
- }
- function d3_Rgb(r, g, b) {
- this.r = r;
- this.g = g;
- this.b = b;
- }
- function d3_rgb_hex(v) {
- return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
- }
- function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, g = 0, b = 0, m1, m2, name;
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl":
- {
- return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
- }
- case "rgb":
- {
- return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
- }
- }
- }
- if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);
- if (format != null && format.charAt(0) === "#") {
- if (format.length === 4) {
- r = format.charAt(1);
- r += r;
- g = format.charAt(2);
- g += g;
- b = format.charAt(3);
- b += b;
- } else if (format.length === 7) {
- r = format.substring(1, 3);
- g = format.substring(3, 5);
- b = format.substring(5, 7);
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- }
- return rgb(r, g, b);
- }
- function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
- h *= 60;
- } else {
- s = h = 0;
- }
- return d3_hsl(h, s, l);
- }
- function d3_rgb_lab(r, g, b) {
- r = d3_rgb_xyz(r);
- g = d3_rgb_xyz(g);
- b = d3_rgb_xyz(b);
- var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
- return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
- function d3_rgb_xyz(r) {
- return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
- }
- function d3_rgb_parseNumber(c) {
- var f = parseFloat(c);
- return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
- }
- function d3_hsl(h, s, l) {
- return new d3_Hsl(h, s, l);
- }
- function d3_Hsl(h, s, l) {
- this.h = h;
- this.s = s;
- this.l = l;
- }
- function d3_hsl_rgb(h, s, l) {
- function v(h) {
- if (h > 360) h -= 360; else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
- function vv(h) {
- return Math.round(v(h) * 255);
- }
- var m1, m2;
- h = h % 360;
- if (h < 0) h += 360;
- s = s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
- return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
- }
- function d3_hcl(h, c, l) {
- return new d3_Hcl(h, c, l);
- }
- function d3_Hcl(h, c, l) {
- this.h = h;
- this.c = c;
- this.l = l;
- }
- function d3_hcl_lab(h, c, l) {
- return d3_lab(l, Math.cos(h *= Math.PI / 180) * c, Math.sin(h) * c);
- }
- function d3_lab(l, a, b) {
- return new d3_Lab(l, a, b);
- }
- function d3_Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
- function d3_lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = d3_lab_xyz(x) * d3_lab_X;
- y = d3_lab_xyz(y) * d3_lab_Y;
- z = d3_lab_xyz(z) * d3_lab_Z;
- return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
- }
- function d3_lab_hcl(l, a, b) {
- return d3_hcl(Math.atan2(b, a) / Math.PI * 180, Math.sqrt(a * a + b * b), l);
- }
- function d3_lab_xyz(x) {
- return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
- function d3_xyz_lab(x) {
- return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
- function d3_xyz_rgb(r) {
- return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
- }
- function d3_selection(groups) {
- d3_arraySubclass(groups, d3_selectionPrototype);
- return groups;
- }
- function d3_selection_selector(selector) {
- return function() {
- return d3_select(selector, this);
- };
- }
- function d3_selection_selectorAll(selector) {
- return function() {
- return d3_selectAll(selector, this);
- };
- }
- function d3_selection_attr(name, value) {
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- function attrConstant() {
- this.setAttribute(name, value);
- }
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
- }
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
- }
- name = d3.ns.qualify(name);
- return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
- }
- function d3_selection_classedRe(name) {
- return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
- }
- function d3_selection_classed(name, value) {
- function classedConstant() {
- var i = -1;
- while (++i < n) name[i](this, value);
- }
- function classedFunction() {
- var i = -1, x = value.apply(this, arguments);
- while (++i < n) name[i](this, x);
- }
- name = name.trim().split(/\s+/).map(d3_selection_classedName);
- var n = name.length;
- return typeof value === "function" ? classedFunction : classedConstant;
- }
- function d3_selection_classedName(name) {
- var re = d3_selection_classedRe(name);
- return function(node, value) {
- if (c = node.classList) return value ? c.add(name) : c.remove(name);
- var c = node.className, cb = c.baseVal != null, cv = cb ? c.baseVal : c;
- if (value) {
- re.lastIndex = 0;
- if (!re.test(cv)) {
- cv = d3_collapse(cv + " " + name);
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- } else if (cv) {
- cv = d3_collapse(cv.replace(re, " "));
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- };
- }
- function d3_selection_style(name, value, priority) {
- function styleNull() {
- this.style.removeProperty(name);
- }
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
- }
- return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
- }
- function d3_selection_property(name, value) {
- function propertyNull() {
- delete this[name];
- }
- function propertyConstant() {
- this[name] = value;
- }
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name]; else this[name] = x;
- }
- return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
- }
- function d3_selection_dataNode(data) {
- return {
- __data__: data
- };
- }
- function d3_selection_filter(selector) {
- return function() {
- return d3_selectMatches(this, selector);
- };
- }
- function d3_selection_sortComparator(comparator) {
- if (!arguments.length) comparator = d3.ascending;
- return function(a, b) {
- return comparator(a && a.__data__, b && b.__data__);
- };
- }
- function d3_selection_on(type, listener, capture) {
- function onRemove() {
- var wrapper = this[name];
- if (wrapper) {
- this.removeEventListener(type, wrapper, wrapper.$);
- delete this[name];
- }
- }
- function onAdd() {
- function wrapper(e) {
- var o = d3.event;
- d3.event = e;
- args[0] = node.__data__;
- try {
- listener.apply(node, args);
- } finally {
- d3.event = o;
- }
- }
- var node = this, args = arguments;
- onRemove.call(this);
- this.addEventListener(type, this[name] = wrapper, wrapper.$ = capture);
- wrapper._ = listener;
- }
- var name = "__on" + type, i = type.indexOf(".");
- if (i > 0) type = type.substring(0, i);
- return listener ? onAdd : onRemove;
- }
- function d3_selection_each(groups, callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
- if (node = group[i]) callback(node, i, j);
- }
- }
- return groups;
- }
- function d3_selection_enter(selection) {
- d3_arraySubclass(selection, d3_selection_enterPrototype);
- return selection;
- }
- function d3_transition(groups, id, time) {
- d3_arraySubclass(groups, d3_transitionPrototype);
- var tweens = new d3_Map, event = d3.dispatch("start", "end"), ease = d3_transitionEase;
- groups.id = id;
- groups.time = time;
- groups.tween = function(name, tween) {
- if (arguments.length < 2) return tweens.get(name);
- if (tween == null) tweens.remove(name); else tweens.set(name, tween);
- return groups;
- };
- groups.ease = function(value) {
- if (!arguments.length) return ease;
- ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments);
- return groups;
- };
- groups.each = function(type, listener) {
- if (arguments.length < 2) return d3_transition_each.call(groups, type);
- event.on(type, listener);
- return groups;
- };
- d3.timer(function(elapsed) {
- return d3_selection_each(groups, function(node, i, j) {
- function start(elapsed) {
- if (lock.active > id) return stop();
- lock.active = id;
- tweens.forEach(function(key, value) {
- if (value = value.call(node, d, i)) {
- tweened.push(value);
- }
- });
- event.start.call(node, d, i);
- if (!tick(elapsed)) d3.timer(tick, 0, time);
- return 1;
- }
- function tick(elapsed) {
- if (lock.active !== id) return stop();
- var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
- while (n > 0) {
- tweened[--n].call(node, e);
- }
- if (t >= 1) {
- stop();
- d3_transitionId = id;
- event.end.call(node, d, i);
- d3_transitionId = 0;
- return 1;
- }
- }
- function stop() {
- if (!--lock.count) delete node.__transition__;
- return 1;
- }
- var tweened = [], delay = node.delay, duration = node.duration, lock = (node = node.node).__transition__ || (node.__transition__ = {
- active: 0,
- count: 0
- }), d = node.__data__;
- ++lock.count;
- delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time);
- });
- }, 0, time);
- return groups;
- }
- function d3_transition_each(callback) {
- var id = d3_transitionId, ease = d3_transitionEase, delay = d3_transitionDelay, duration = d3_transitionDuration;
- d3_transitionId = this.id;
- d3_transitionEase = this.ease();
- d3_selection_each(this, function(node, i, j) {
- d3_transitionDelay = node.delay;
- d3_transitionDuration = node.duration;
- callback.call(node = node.node, node.__data__, i, j);
- });
- d3_transitionId = id;
- d3_transitionEase = ease;
- d3_transitionDelay = delay;
- d3_transitionDuration = duration;
- return this;
- }
- function d3_tweenNull(d, i, a) {
- return a != "" && d3_tweenRemove;
- }
- function d3_tweenByName(b, name) {
- return d3.tween(b, d3_interpolateByName(name));
- }
- function d3_timer_step() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- var delay = d3_timer_flush() - now;
- if (delay > 24) {
- if (isFinite(delay)) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_step, delay);
- }
- d3_timer_interval = 0;
- } else {
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- }
- function d3_timer_flush() {
- var t0 = null, t1 = d3_timer_queue, then = Infinity;
- while (t1) {
- if (t1.flush) {
- t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
- } else {
- then = Math.min(then, t1.then + t1.delay);
- t1 = (t0 = t1).next;
- }
- }
- return then;
- }
- function d3_mousePoint(container, e) {
- var svg = container.ownerSVGElement || container;
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- if (d3_mouse_bug44083 < 0 && (window.scrollX || window.scrollY)) {
- svg = d3.select(document.body).append("svg").style("position", "absolute").style("top", 0).style("left", 0);
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- if (d3_mouse_bug44083) {
- point.x = e.pageX;
- point.y = e.pageY;
- } else {
- point.x = e.clientX;
- point.y = e.clientY;
- }
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [ point.x, point.y ];
- }
- var rect = container.getBoundingClientRect();
- return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
- }
- function d3_noop() {}
- function d3_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_scaleRange(scale) {
- return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
- }
- function d3_scale_nice(domain, nice) {
- var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
- if (x1 < x0) {
- dx = i0, i0 = i1, i1 = dx;
- dx = x0, x0 = x1, x1 = dx;
- }
- if (nice = nice(x1 - x0)) {
- domain[i0] = nice.floor(x0);
- domain[i1] = nice.ceil(x1);
- }
- return domain;
- }
- function d3_scale_niceDefault() {
- return Math;
- }
- function d3_scale_linear(domain, range, interpolate, clamp) {
- function rescale() {
- var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
- output = linear(domain, range, uninterpolate, interpolate);
- input = linear(range, domain, uninterpolate, d3.interpolate);
- return scale;
- }
- function scale(x) {
- return output(x);
- }
- var output, input;
- scale.invert = function(y) {
- return input(y);
- };
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(Number);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.rangeRound = function(x) {
- return scale.range(x).interpolate(d3.interpolateRound);
- };
- scale.clamp = function(x) {
- if (!arguments.length) return clamp;
- clamp = x;
- return rescale();
- };
- scale.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x;
- return rescale();
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- scale.nice = function() {
- d3_scale_nice(domain, d3_scale_linearNice);
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_linear(domain, range, interpolate, clamp);
- };
- return rescale();
- }
- function d3_scale_linearRebind(scale, linear) {
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_scale_linearNice(dx) {
- dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
- return dx && {
- floor: function(x) {
- return Math.floor(x / dx) * dx;
- },
- ceil: function(x) {
- return Math.ceil(x / dx) * dx;
- }
- };
- }
- function d3_scale_linearTickRange(domain, m) {
- var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
- if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
- extent[0] = Math.ceil(extent[0] / step) * step;
- extent[1] = Math.floor(extent[1] / step) * step + step * .5;
- extent[2] = step;
- return extent;
- }
- function d3_scale_linearTicks(domain, m) {
- return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
- }
- function d3_scale_linearTickFormat(domain, m) {
- return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f");
- }
- function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
- var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
- return function(x) {
- return i(u(x));
- };
- }
- function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
- var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
- if (domain[k] < domain[0]) {
- domain = domain.slice().reverse();
- range = range.slice().reverse();
- }
- while (++j <= k) {
- u.push(uninterpolate(domain[j - 1], domain[j]));
- i.push(interpolate(range[j - 1], range[j]));
- }
- return function(x) {
- var j = d3.bisect(domain, x, 1, k) - 1;
- return i[j](u[j](x));
- };
- }
- function d3_scale_log(linear, log) {
- function scale(x) {
- return linear(log(x));
- }
- var pow = log.pow;
- scale.invert = function(x) {
- return pow(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(pow);
- log = x[0] < 0 ? d3_scale_logn : d3_scale_logp;
- pow = log.pow;
- linear.domain(x.map(log));
- return scale;
- };
- scale.nice = function() {
- linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));
- return scale;
- };
- scale.ticks = function() {
- var extent = d3_scaleExtent(linear.domain()), ticks = [];
- if (extent.every(isFinite)) {
- var i = Math.floor(extent[0]), j = Math.ceil(extent[1]), u = pow(extent[0]), v = pow(extent[1]);
- if (log === d3_scale_logn) {
- ticks.push(pow(i));
- for (; i++ < j; ) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
- } else {
- for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
- ticks.push(pow(i));
- }
- for (i = 0; ticks[i] < u; i++) {}
- for (j = ticks.length; ticks[j - 1] > v; j--) {}
- ticks = ticks.slice(i, j);
- }
- return ticks;
- };
- scale.tickFormat = function(n, format) {
- if (arguments.length < 2) format = d3_scale_logFormat;
- if (arguments.length < 1) return format;
- var k = Math.max(.1, n / scale.ticks().length), f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil), e;
- return function(d) {
- return d / pow(f(log(d) + e)) <= k ? format(d) : "";
- };
- };
- scale.copy = function() {
- return d3_scale_log(linear.copy(), log);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_logp(x) {
- return Math.log(x < 0 ? 0 : x) / Math.LN10;
- }
- function d3_scale_logn(x) {
- return -Math.log(x > 0 ? 0 : -x) / Math.LN10;
- }
- function d3_scale_pow(linear, exponent) {
- function scale(x) {
- return linear(powp(x));
- }
- var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
- scale.invert = function(x) {
- return powb(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(powb);
- linear.domain(x.map(powp));
- return scale;
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(scale.domain(), m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(scale.domain(), m);
- };
- scale.nice = function() {
- return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
- };
- scale.exponent = function(x) {
- if (!arguments.length) return exponent;
- var domain = scale.domain();
- powp = d3_scale_powPow(exponent = x);
- powb = d3_scale_powPow(1 / exponent);
- return scale.domain(domain);
- };
- scale.copy = function() {
- return d3_scale_pow(linear.copy(), exponent);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_powPow(e) {
- return function(x) {
- return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
- };
- }
- function d3_scale_ordinal(domain, ranger) {
- function scale(x) {
- return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
- }
- function steps(start, step) {
- return d3.range(domain.length).map(function(i) {
- return start + step * i;
- });
- }
- var index, range, rangeBand;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = [];
- index = new d3_Map;
- var i = -1, n = x.length, xi;
- while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
- return scale[ranger.t].apply(scale, ranger.a);
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- rangeBand = 0;
- ranger = {
- t: "range",
- a: arguments
- };
- return scale;
- };
- scale.rangePoints = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding);
- range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);
- rangeBand = 0;
- ranger = {
- t: "rangePoints",
- a: arguments
- };
- return scale;
- };
- scale.rangeBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
- range = steps(start + step * outerPadding, step);
- if (reverse) range.reverse();
- rangeBand = step * (1 - padding);
- ranger = {
- t: "rangeBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeRoundBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step;
- range = steps(start + Math.round(error / 2), step);
- if (reverse) range.reverse();
- rangeBand = Math.round(step * (1 - padding));
- ranger = {
- t: "rangeRoundBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeBand = function() {
- return rangeBand;
- };
- scale.rangeExtent = function() {
- return d3_scaleExtent(ranger.a[0]);
- };
- scale.copy = function() {
- return d3_scale_ordinal(domain, ranger);
- };
- return scale.domain(domain);
- }
- function d3_scale_quantile(domain, range) {
- function rescale() {
- var k = 0, n = domain.length, q = range.length;
- thresholds = [];
- while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
- return scale;
- }
- function scale(x) {
- if (isNaN(x = +x)) return NaN;
- return range[d3.bisect(thresholds, x)];
- }
- var thresholds;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.filter(function(d) {
- return !isNaN(d);
- }).sort(d3.ascending);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.quantiles = function() {
- return thresholds;
- };
- scale.copy = function() {
- return d3_scale_quantile(domain, range);
- };
- return rescale();
- }
- function d3_scale_quantize(x0, x1, range) {
- function scale(x) {
- return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
- }
- function rescale() {
- kx = range.length / (x1 - x0);
- i = range.length - 1;
- return scale;
- }
- var kx, i;
- scale.domain = function(x) {
- if (!arguments.length) return [ x0, x1 ];
- x0 = +x[0];
- x1 = +x[x.length - 1];
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_quantize(x0, x1, range);
- };
- return rescale();
- }
- function d3_scale_threshold(domain, range) {
- function scale(x) {
- return range[d3.bisect(domain, x)];
- }
- scale.domain = function(_) {
- if (!arguments.length) return domain;
- domain = _;
- return scale;
- };
- scale.range = function(_) {
- if (!arguments.length) return range;
- range = _;
- return scale;
- };
- scale.copy = function() {
- return d3_scale_threshold(domain, range);
- };
- return scale;
- }
- function d3_scale_identity(domain) {
- function identity(x) {
- return +x;
- }
- identity.invert = identity;
- identity.domain = identity.range = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(identity);
- return identity;
- };
- identity.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- identity.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- identity.copy = function() {
- return d3_scale_identity(domain);
- };
- return identity;
- }
- function d3_svg_arcInnerRadius(d) {
- return d.innerRadius;
- }
- function d3_svg_arcOuterRadius(d) {
- return d.outerRadius;
- }
- function d3_svg_arcStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_arcEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_line(projection) {
- function line(data) {
- function segment() {
- segments.push("M", interpolate(projection(points), tension));
- }
- var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
- } else if (points.length) {
- segment();
- points = [];
- }
- }
- if (points.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
- line.x = function(_) {
- if (!arguments.length) return x;
- x = _;
- return line;
- };
- line.y = function(_) {
- if (!arguments.length) return y;
- y = _;
- return line;
- };
- line.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return line;
- };
- line.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- return line;
- };
- line.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return line;
- };
- return line;
- }
- function d3_svg_lineX(d) {
- return d[0];
- }
- function d3_svg_lineY(d) {
- return d[1];
- }
- function d3_svg_lineLinear(points) {
- return points.join("L");
- }
- function d3_svg_lineLinearClosed(points) {
- return d3_svg_lineLinear(points) + "Z";
- }
- function d3_svg_lineStepBefore(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
- return path.join("");
- }
- function d3_svg_lineStepAfter(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
- return path.join("");
- }
- function d3_svg_lineCardinalOpen(points, tension) {
- return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineCardinalClosed(points, tension) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
- }
- function d3_svg_lineCardinal(points, tension, closed) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineHermite(points, tangents) {
- if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
- return d3_svg_lineLinear(points);
- }
- var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
- if (quad) {
- path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
- p0 = points[1];
- pi = 2;
- }
- if (tangents.length > 1) {
- t = tangents[1];
- p = points[pi];
- pi++;
- path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- for (var i = 2; i < tangents.length; i++, pi++) {
- p = points[pi];
- t = tangents[i];
- path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- }
- }
- if (quad) {
- var lp = points[pi];
- path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
- }
- return path;
- }
- function d3_svg_lineCardinalTangents(points, tension) {
- var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
- while (++i < n) {
- p0 = p1;
- p1 = p2;
- p2 = points[i];
- tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
- }
- return tangents;
- }
- function d3_svg_lineBasis(points) {
- if (points.length < 3) return d3_svg_lineLinear(points);
- var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0 ];
- d3_svg_lineBasisBezier(path, px, py);
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- i = -1;
- while (++i < 2) {
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisOpen(points) {
- if (points.length < 4) return d3_svg_lineLinear(points);
- var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
- while (++i < 3) {
- pi = points[i];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
- --i;
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisClosed(points) {
- var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
- while (++i < 4) {
- pi = points[i % n];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
- --i;
- while (++i < m) {
- pi = points[i % n];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBundle(points, tension) {
- var n = points.length - 1;
- if (n) {
- var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
- while (++i <= n) {
- p = points[i];
- t = i / n;
- p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
- p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
- }
- }
- return d3_svg_lineBasis(points);
- }
- function d3_svg_lineDot4(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- }
- function d3_svg_lineBasisBezier(path, x, y) {
- path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
- }
- function d3_svg_lineSlope(p0, p1) {
- return (p1[1] - p0[1]) / (p1[0] - p0[0]);
- }
- function d3_svg_lineFiniteDifferences(points) {
- var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
- while (++i < j) {
- m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
- }
- m[i] = d;
- return m;
- }
- function d3_svg_lineMonotoneTangents(points) {
- var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
- while (++i < j) {
- d = d3_svg_lineSlope(points[i], points[i + 1]);
- if (Math.abs(d) < 1e-6) {
- m[i] = m[i + 1] = 0;
- } else {
- a = m[i] / d;
- b = m[i + 1] / d;
- s = a * a + b * b;
- if (s > 9) {
- s = d * 3 / Math.sqrt(s);
- m[i] = s * a;
- m[i + 1] = s * b;
- }
- }
- }
- i = -1;
- while (++i <= j) {
- s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
- tangents.push([ s || 0, m[i] * s || 0 ]);
- }
- return tangents;
- }
- function d3_svg_lineMonotone(points) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
- }
- function d3_svg_lineRadial(points) {
- var point, i = -1, n = points.length, r, a;
- while (++i < n) {
- point = points[i];
- r = point[0];
- a = point[1] + d3_svg_arcOffset;
- point[0] = r * Math.cos(a);
- point[1] = r * Math.sin(a);
- }
- return points;
- }
- function d3_svg_area(projection) {
- function area(data) {
- function segment() {
- segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
- }
- var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
- return x;
- } : d3_functor(x1), fy1 = y0 === y1 ? function() {
- return y;
- } : d3_functor(y1), x, y;
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
- points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
- } else if (points0.length) {
- segment();
- points0 = [];
- points1 = [];
- }
- }
- if (points0.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
- area.x = function(_) {
- if (!arguments.length) return x1;
- x0 = x1 = _;
- return area;
- };
- area.x0 = function(_) {
- if (!arguments.length) return x0;
- x0 = _;
- return area;
- };
- area.x1 = function(_) {
- if (!arguments.length) return x1;
- x1 = _;
- return area;
- };
- area.y = function(_) {
- if (!arguments.length) return y1;
- y0 = y1 = _;
- return area;
- };
- area.y0 = function(_) {
- if (!arguments.length) return y0;
- y0 = _;
- return area;
- };
- area.y1 = function(_) {
- if (!arguments.length) return y1;
- y1 = _;
- return area;
- };
- area.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return area;
- };
- area.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- interpolateReverse = interpolate.reverse || interpolate;
- L = interpolate.closed ? "M" : "L";
- return area;
- };
- area.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return area;
- };
- return area;
- }
- function d3_svg_chordSource(d) {
- return d.source;
- }
- function d3_svg_chordTarget(d) {
- return d.target;
- }
- function d3_svg_chordRadius(d) {
- return d.radius;
- }
- function d3_svg_chordStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_chordEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_diagonalProjection(d) {
- return [ d.x, d.y ];
- }
- function d3_svg_diagonalRadialProjection(projection) {
- return function() {
- var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset;
- return [ r * Math.cos(a), r * Math.sin(a) ];
- };
- }
- function d3_svg_symbolSize() {
- return 64;
- }
- function d3_svg_symbolType() {
- return "circle";
- }
- function d3_svg_symbolCircle(size) {
- var r = Math.sqrt(size / Math.PI);
- return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
- }
- function d3_svg_axisX(selection, x) {
- selection.attr("transform", function(d) {
- return "translate(" + x(d) + ",0)";
- });
- }
- function d3_svg_axisY(selection, y) {
- selection.attr("transform", function(d) {
- return "translate(0," + y(d) + ")";
- });
- }
- function d3_svg_axisSubdivide(scale, ticks, m) {
- subticks = [];
- if (m && ticks.length > 1) {
- var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v;
- while (++i < n) {
- for (j = m; --j > 0; ) {
- if ((v = +ticks[i] - j * d) >= extent[0]) {
- subticks.push(v);
- }
- }
- }
- for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) {
- subticks.push(v);
- }
- }
- return subticks;
- }
- function d3_behavior_zoomDelta() {
- if (!d3_behavior_zoomDiv) {
- d3_behavior_zoomDiv = d3.select("body").append("div").style("visibility", "hidden").style("top", 0).style("height", 0).style("width", 0).style("overflow-y", "scroll").append("div").style("height", "2000px").node().parentNode;
- }
- var e = d3.event, delta;
- try {
- d3_behavior_zoomDiv.scrollTop = 1e3;
- d3_behavior_zoomDiv.dispatchEvent(e);
- delta = 1e3 - d3_behavior_zoomDiv.scrollTop;
- } catch (error) {
- delta = e.wheelDelta || -e.detail * 5;
- }
- return delta;
- }
- function d3_layout_bundlePath(link) {
- var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
- while (start !== lca) {
- start = start.parent;
- points.push(start);
- }
- var k = points.length;
- while (end !== lca) {
- points.splice(k, 0, end);
- end = end.parent;
- }
- return points;
- }
- function d3_layout_bundleAncestors(node) {
- var ancestors = [], parent = node.parent;
- while (parent != null) {
- ancestors.push(node);
- node = parent;
- parent = parent.parent;
- }
- ancestors.push(node);
- return ancestors;
- }
- function d3_layout_bundleLeastCommonAncestor(a, b) {
- if (a === b) return a;
- var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
- while (aNode === bNode) {
- sharedNode = aNode;
- aNode = aNodes.pop();
- bNode = bNodes.pop();
- }
- return sharedNode;
- }
- function d3_layout_forceDragstart(d) {
- d.fixed |= 2;
- }
- function d3_layout_forceDragend(d) {
- d.fixed &= 1;
- }
- function d3_layout_forceMouseover(d) {
- d.fixed |= 4;
- }
- function d3_layout_forceMouseout(d) {
- d.fixed &= 3;
- }
- function d3_layout_forceAccumulate(quad, alpha, charges) {
- var cx = 0, cy = 0;
- quad.charge = 0;
- if (!quad.leaf) {
- var nodes = quad.nodes, n = nodes.length, i = -1, c;
- while (++i < n) {
- c = nodes[i];
- if (c == null) continue;
- d3_layout_forceAccumulate(c, alpha, charges);
- quad.charge += c.charge;
- cx += c.charge * c.cx;
- cy += c.charge * c.cy;
- }
- }
- if (quad.point) {
- if (!quad.leaf) {
- quad.point.x += Math.random() - .5;
- quad.point.y += Math.random() - .5;
- }
- var k = alpha * charges[quad.point.index];
- quad.charge += quad.pointCharge = k;
- cx += k * quad.point.x;
- cy += k * quad.point.y;
- }
- quad.cx = cx / quad.charge;
- quad.cy = cy / quad.charge;
- }
- function d3_layout_forceLinkDistance(link) {
- return 20;
- }
- function d3_layout_forceLinkStrength(link) {
- return 1;
- }
- function d3_layout_stackX(d) {
- return d.x;
- }
- function d3_layout_stackY(d) {
- return d.y;
- }
- function d3_layout_stackOut(d, y0, y) {
- d.y0 = y0;
- d.y = y;
- }
- function d3_layout_stackOrderDefault(data) {
- return d3.range(data.length);
- }
- function d3_layout_stackOffsetZero(data) {
- var j = -1, m = data[0].length, y0 = [];
- while (++j < m) y0[j] = 0;
- return y0;
- }
- function d3_layout_stackMaxIndex(array) {
- var i = 1, j = 0, v = array[0][1], k, n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i][1]) > v) {
- j = i;
- v = k;
- }
- }
- return j;
- }
- function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
- }
- function d3_layout_stackSum(p, d) {
- return p + d[1];
- }
- function d3_layout_histogramBinSturges(range, values) {
- return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
- }
- function d3_layout_histogramBinFixed(range, n) {
- var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
- while (++x <= n) f[x] = m * x + b;
- return f;
- }
- function d3_layout_histogramRange(values) {
- return [ d3.min(values), d3.max(values) ];
- }
- function d3_layout_hierarchyRebind(object, hierarchy) {
- d3.rebind(object, hierarchy, "sort", "children", "value");
- object.links = d3_layout_hierarchyLinks;
- object.nodes = function(d) {
- d3_layout_hierarchyInline = true;
- return (object.nodes = object)(d);
- };
- return object;
- }
- function d3_layout_hierarchyChildren(d) {
- return d.children;
- }
- function d3_layout_hierarchyValue(d) {
- return d.value;
- }
- function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
- }
- function d3_layout_hierarchyLinks(nodes) {
- return d3.merge(nodes.map(function(parent) {
- return (parent.children || []).map(function(child) {
- return {
- source: parent,
- target: child
- };
- });
- }));
- }
- function d3_layout_packSort(a, b) {
- return a.value - b.value;
- }
- function d3_layout_packInsert(a, b) {
- var c = a._pack_next;
- a._pack_next = b;
- b._pack_prev = a;
- b._pack_next = c;
- c._pack_prev = b;
- }
- function d3_layout_packSplice(a, b) {
- a._pack_next = b;
- b._pack_prev = a;
- }
- function d3_layout_packIntersects(a, b) {
- var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
- return dr * dr - dx * dx - dy * dy > .001;
- }
- function d3_layout_packSiblings(node) {
- function bound(node) {
- xMin = Math.min(node.x - node.r, xMin);
- xMax = Math.max(node.x + node.r, xMax);
- yMin = Math.min(node.y - node.r, yMin);
- yMax = Math.max(node.y + node.r, yMax);
- }
- if (!(nodes = node.children) || !(n = nodes.length)) return;
- var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
- nodes.forEach(d3_layout_packLink);
- a = nodes[0];
- a.x = -a.r;
- a.y = 0;
- bound(a);
- if (n > 1) {
- b = nodes[1];
- b.x = b.r;
- b.y = 0;
- bound(b);
- if (n > 2) {
- c = nodes[2];
- d3_layout_packPlace(a, b, c);
- bound(c);
- d3_layout_packInsert(a, c);
- a._pack_prev = c;
- d3_layout_packInsert(c, b);
- b = a._pack_next;
- for (i = 3; i < n; i++) {
- d3_layout_packPlace(a, b, c = nodes[i]);
- var isect = 0, s1 = 1, s2 = 1;
- for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
- if (d3_layout_packIntersects(j, c)) {
- isect = 1;
- break;
- }
- }
- if (isect == 1) {
- for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
- if (d3_layout_packIntersects(k, c)) {
- break;
- }
- }
- }
- if (isect) {
- if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
- i--;
- } else {
- d3_layout_packInsert(a, c);
- b = c;
- bound(c);
- }
- }
- }
- }
- var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
- for (i = 0; i < n; i++) {
- c = nodes[i];
- c.x -= cx;
- c.y -= cy;
- cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
- }
- node.r = cr;
- nodes.forEach(d3_layout_packUnlink);
- }
- function d3_layout_packLink(node) {
- node._pack_next = node._pack_prev = node;
- }
- function d3_layout_packUnlink(node) {
- delete node._pack_next;
- delete node._pack_prev;
- }
- function d3_layout_packTransform(node, x, y, k) {
- var children = node.children;
- node.x = x += k * node.x;
- node.y = y += k * node.y;
- node.r *= k;
- if (children) {
- var i = -1, n = children.length;
- while (++i < n) d3_layout_packTransform(children[i], x, y, k);
- }
- }
- function d3_layout_packPlace(a, b, c) {
- var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
- if (db && (dx || dy)) {
- var da = b.r + c.r, dc = dx * dx + dy * dy;
- da *= da;
- db *= db;
- var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
- c.x = a.x + x * dx + y * dy;
- c.y = a.y + x * dy - y * dx;
- } else {
- c.x = a.x + db;
- c.y = a.y;
- }
- }
- function d3_layout_clusterY(children) {
- return 1 + d3.max(children, function(child) {
- return child.y;
- });
- }
- function d3_layout_clusterX(children) {
- return children.reduce(function(x, child) {
- return x + child.x;
- }, 0) / children.length;
- }
- function d3_layout_clusterLeft(node) {
- var children = node.children;
- return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
- }
- function d3_layout_clusterRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
- }
- function d3_layout_treeSeparation(a, b) {
- return a.parent == b.parent ? 1 : 2;
- }
- function d3_layout_treeLeft(node) {
- var children = node.children;
- return children && children.length ? children[0] : node._tree.thread;
- }
- function d3_layout_treeRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? children[n - 1] : node._tree.thread;
- }
- function d3_layout_treeSearch(node, compare) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, n, i = -1;
- while (++i < n) {
- if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
- node = child;
- }
- }
- }
- return node;
- }
- function d3_layout_treeRightmost(a, b) {
- return a.x - b.x;
- }
- function d3_layout_treeLeftmost(a, b) {
- return b.x - a.x;
- }
- function d3_layout_treeDeepest(a, b) {
- return a.depth - b.depth;
- }
- function d3_layout_treeVisitAfter(node, callback) {
- function visit(node, previousSibling) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, previousChild = null, i = -1, n;
- while (++i < n) {
- child = children[i];
- visit(child, previousChild);
- previousChild = child;
- }
- }
- callback(node, previousSibling);
- }
- visit(node, null);
- }
- function d3_layout_treeShift(node) {
- var shift = 0, change = 0, children = node.children, i = children.length, child;
- while (--i >= 0) {
- child = children[i]._tree;
- child.prelim += shift;
- child.mod += shift;
- shift += child.shift + (change += child.change);
- }
- }
- function d3_layout_treeMove(ancestor, node, shift) {
- ancestor = ancestor._tree;
- node = node._tree;
- var change = shift / (node.number - ancestor.number);
- ancestor.change += change;
- node.change -= change;
- node.shift += shift;
- node.prelim += shift;
- node.mod += shift;
- }
- function d3_layout_treeAncestor(vim, node, ancestor) {
- return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
- }
- function d3_layout_treemapPadNull(node) {
- return {
- x: node.x,
- y: node.y,
- dx: node.dx,
- dy: node.dy
- };
- }
- function d3_layout_treemapPad(node, padding) {
- var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
- if (dx < 0) {
- x += dx / 2;
- dx = 0;
- }
- if (dy < 0) {
- y += dy / 2;
- dy = 0;
- }
- return {
- x: x,
- y: y,
- dx: dx,
- dy: dy
- };
- }
- function d3_dsv(delimiter, mimeType) {
- function dsv(url, callback) {
- d3.text(url, mimeType, function(text) {
- callback(text && dsv.parse(text));
- });
- }
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
- function formatValue(text) {
- return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
- }
- var reParse = new RegExp("\r\n|[" + delimiter + "\r\n]", "g"), reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
- dsv.parse = function(text) {
- var header;
- return dsv.parseRows(text, function(row, i) {
- if (i) {
- var o = {}, j = -1, m = header.length;
- while (++j < m) o[header[j]] = row[j];
- return o;
- } else {
- header = row;
- return null;
- }
- });
- };
- dsv.parseRows = function(text, f) {
- function token() {
- if (reParse.lastIndex >= text.length) return EOF;
- if (eol) {
- eol = false;
- return EOL;
- }
- var j = reParse.lastIndex;
- if (text.charCodeAt(j) === 34) {
- var i = j;
- while (i++ < text.length) {
- if (text.charCodeAt(i) === 34) {
- if (text.charCodeAt(i + 1) !== 34) break;
- i++;
- }
- }
- reParse.lastIndex = i + 2;
- var c = text.charCodeAt(i + 1);
- if (c === 13) {
- eol = true;
- if (text.charCodeAt(i + 2) === 10) reParse.lastIndex++;
- } else if (c === 10) {
- eol = true;
- }
- return text.substring(j + 1, i).replace(/""/g, '"');
- }
- var m = reParse.exec(text);
- if (m) {
- eol = m[0].charCodeAt(0) !== delimiterCode;
- return text.substring(j, m.index);
- }
- reParse.lastIndex = text.length;
- return text.substring(j);
- }
- var EOL = {}, EOF = {}, rows = [], n = 0, t, eol;
- reParse.lastIndex = 0;
- while ((t = token()) !== EOF) {
- var a = [];
- while (t !== EOL && t !== EOF) {
- a.push(t);
- t = token();
- }
- if (f && !(a = f(a, n++))) continue;
- rows.push(a);
- }
- return rows;
- };
- dsv.format = function(rows) {
- return rows.map(formatRow).join("\n");
- };
- return dsv;
- }
- function d3_geo_type(types, defaultValue) {
- return function(object) {
- return object && types.hasOwnProperty(object.type) ? types[object.type](object) : defaultValue;
- };
- }
- function d3_path_circle(radius) {
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + +2 * radius + "z";
- }
- function d3_geo_bounds(o, f) {
- if (d3_geo_boundsTypes.hasOwnProperty(o.type)) d3_geo_boundsTypes[o.type](o, f);
- }
- function d3_geo_boundsFeature(o, f) {
- d3_geo_bounds(o.geometry, f);
- }
- function d3_geo_boundsFeatureCollection(o, f) {
- for (var a = o.features, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i].geometry, f);
- }
- }
- function d3_geo_boundsGeometryCollection(o, f) {
- for (var a = o.geometries, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i], f);
- }
- }
- function d3_geo_boundsLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_boundsMultiLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsMultiPolygon(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsPoint(o, f) {
- f.apply(null, o.coordinates);
- }
- function d3_geo_boundsPolygon(o, f) {
- for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_greatArcSource(d) {
- return d.source;
- }
- function d3_geo_greatArcTarget(d) {
- return d.target;
- }
- function d3_geo_greatArcInterpolator() {
- function interpolate(t) {
- var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
- return [ Math.atan2(y, x) / d3_geo_radians, Math.atan2(z, Math.sqrt(x * x + y * y)) / d3_geo_radians ];
- }
- var x0, y0, cy0, sy0, kx0, ky0, x1, y1, cy1, sy1, kx1, ky1, d, k;
- interpolate.distance = function() {
- if (d == null) k = 1 / Math.sin(d = Math.acos(Math.max(-1, Math.min(1, sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)))));
- return d;
- };
- interpolate.source = function(_) {
- var cx0 = Math.cos(x0 = _[0] * d3_geo_radians), sx0 = Math.sin(x0);
- cy0 = Math.cos(y0 = _[1] * d3_geo_radians);
- sy0 = Math.sin(y0);
- kx0 = cy0 * cx0;
- ky0 = cy0 * sx0;
- d = null;
- return interpolate;
- };
- interpolate.target = function(_) {
- var cx1 = Math.cos(x1 = _[0] * d3_geo_radians), sx1 = Math.sin(x1);
- cy1 = Math.cos(y1 = _[1] * d3_geo_radians);
- sy1 = Math.sin(y1);
- kx1 = cy1 * cx1;
- ky1 = cy1 * sx1;
- d = null;
- return interpolate;
- };
- return interpolate;
- }
- function d3_geo_greatArcInterpolate(a, b) {
- var i = d3_geo_greatArcInterpolator().source(a).target(b);
- i.distance();
- return i;
- }
- function d3_geom_contourStart(grid) {
- var x = 0, y = 0;
- while (true) {
- if (grid(x, y)) {
- return [ x, y ];
- }
- if (x === 0) {
- x = y + 1;
- y = 0;
- } else {
- x = x - 1;
- y = y + 1;
- }
- }
- }
- function d3_geom_hullCCW(i1, i2, i3, v) {
- var t, a, b, c, d, e, f;
- t = v[i1];
- a = t[0];
- b = t[1];
- t = v[i2];
- c = t[0];
- d = t[1];
- t = v[i3];
- e = t[0];
- f = t[1];
- return (f - b) * (c - a) - (d - b) * (e - a) > 0;
- }
- function d3_geom_polygonInside(p, a, b) {
- return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
- }
- function d3_geom_polygonIntersect(c, d, a, b) {
- var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0], y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1], x13 = x1 - x3, x21 = x2 - x1, x43 = x4 - x3, y13 = y1 - y3, y21 = y2 - y1, y43 = y4 - y3, ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
- return [ x1 + ua * x21, y1 + ua * y21 ];
- }
- function d3_voronoi_tessellate(vertices, callback) {
- var Sites = {
- list: vertices.map(function(v, i) {
- return {
- index: i,
- x: v[0],
- y: v[1]
- };
- }).sort(function(a, b) {
- return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0;
- }),
- bottomSite: null
- };
- var EdgeList = {
- list: [],
- leftEnd: null,
- rightEnd: null,
- init: function() {
- EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.leftEnd.r = EdgeList.rightEnd;
- EdgeList.rightEnd.l = EdgeList.leftEnd;
- EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
- },
- createHalfEdge: function(edge, side) {
- return {
- edge: edge,
- side: side,
- vertex: null,
- l: null,
- r: null
- };
- },
- insert: function(lb, he) {
- he.l = lb;
- he.r = lb.r;
- lb.r.l = he;
- lb.r = he;
- },
- leftBound: function(p) {
- var he = EdgeList.leftEnd;
- do {
- he = he.r;
- } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
- he = he.l;
- return he;
- },
- del: function(he) {
- he.l.r = he.r;
- he.r.l = he.l;
- he.edge = null;
- },
- right: function(he) {
- return he.r;
- },
- left: function(he) {
- return he.l;
- },
- leftRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[he.side];
- },
- rightRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[d3_voronoi_opposite[he.side]];
- }
- };
- var Geom = {
- bisect: function(s1, s2) {
- var newEdge = {
- region: {
- l: s1,
- r: s2
- },
- ep: {
- l: null,
- r: null
- }
- };
- var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy;
- newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5;
- if (adx > ady) {
- newEdge.a = 1;
- newEdge.b = dy / dx;
- newEdge.c /= dx;
- } else {
- newEdge.b = 1;
- newEdge.a = dx / dy;
- newEdge.c /= dy;
- }
- return newEdge;
- },
- intersect: function(el1, el2) {
- var e1 = el1.edge, e2 = el2.edge;
- if (!e1 || !e2 || e1.region.r == e2.region.r) {
- return null;
- }
- var d = e1.a * e2.b - e1.b * e2.a;
- if (Math.abs(d) < 1e-10) {
- return null;
- }
- var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e;
- if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) {
- el = el1;
- e = e1;
- } else {
- el = el2;
- e = e2;
- }
- var rightOfSite = xint >= e.region.r.x;
- if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") {
- return null;
- }
- return {
- x: xint,
- y: yint
- };
- },
- rightOf: function(he, p) {
- var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
- if (rightOfSite && he.side === "l") {
- return 1;
- }
- if (!rightOfSite && he.side === "r") {
- return 0;
- }
- if (e.a === 1) {
- var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0;
- if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) {
- above = fast = dyp >= e.b * dxp;
- } else {
- above = p.x + p.y * e.b > e.c;
- if (e.b < 0) {
- above = !above;
- }
- if (!above) {
- fast = 1;
- }
- }
- if (!fast) {
- var dxs = topsite.x - e.region.l.x;
- above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b);
- if (e.b < 0) {
- above = !above;
- }
- }
- } else {
- var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y;
- above = t1 * t1 > t2 * t2 + t3 * t3;
- }
- return he.side === "l" ? above : !above;
- },
- endPoint: function(edge, side, site) {
- edge.ep[side] = site;
- if (!edge.ep[d3_voronoi_opposite[side]]) return;
- callback(edge);
- },
- distance: function(s, t) {
- var dx = s.x - t.x, dy = s.y - t.y;
- return Math.sqrt(dx * dx + dy * dy);
- }
- };
- var EventQueue = {
- list: [],
- insert: function(he, site, offset) {
- he.vertex = site;
- he.ystar = site.y + offset;
- for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) {
- var next = list[i];
- if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) {
- continue;
- } else {
- break;
- }
- }
- list.splice(i, 0, he);
- },
- del: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {}
- ls.splice(i, 1);
- },
- empty: function() {
- return EventQueue.list.length === 0;
- },
- nextEvent: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) {
- if (ls[i] == he) return ls[i + 1];
- }
- return null;
- },
- min: function() {
- var elem = EventQueue.list[0];
- return {
- x: elem.vertex.x,
- y: elem.ystar
- };
- },
- extractMin: function() {
- return EventQueue.list.shift();
- }
- };
- EdgeList.init();
- Sites.bottomSite = Sites.list.shift();
- var newSite = Sites.list.shift(), newIntStar;
- var lbnd, rbnd, llbnd, rrbnd, bisector;
- var bot, top, temp, p, v;
- var e, pm;
- while (true) {
- if (!EventQueue.empty()) {
- newIntStar = EventQueue.min();
- }
- if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) {
- lbnd = EdgeList.leftBound(newSite);
- rbnd = EdgeList.right(lbnd);
- bot = EdgeList.rightRegion(lbnd);
- e = Geom.bisect(bot, newSite);
- bisector = EdgeList.createHalfEdge(e, "l");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(lbnd, bisector);
- if (p) {
- EventQueue.del(lbnd);
- EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
- }
- lbnd = bisector;
- bisector = EdgeList.createHalfEdge(e, "r");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(bisector, rbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, newSite));
- }
- newSite = Sites.list.shift();
- } else if (!EventQueue.empty()) {
- lbnd = EventQueue.extractMin();
- llbnd = EdgeList.left(lbnd);
- rbnd = EdgeList.right(lbnd);
- rrbnd = EdgeList.right(rbnd);
- bot = EdgeList.leftRegion(lbnd);
- top = EdgeList.rightRegion(rbnd);
- v = lbnd.vertex;
- Geom.endPoint(lbnd.edge, lbnd.side, v);
- Geom.endPoint(rbnd.edge, rbnd.side, v);
- EdgeList.del(lbnd);
- EventQueue.del(rbnd);
- EdgeList.del(rbnd);
- pm = "l";
- if (bot.y > top.y) {
- temp = bot;
- bot = top;
- top = temp;
- pm = "r";
- }
- e = Geom.bisect(bot, top);
- bisector = EdgeList.createHalfEdge(e, pm);
- EdgeList.insert(llbnd, bisector);
- Geom.endPoint(e, d3_voronoi_opposite[pm], v);
- p = Geom.intersect(llbnd, bisector);
- if (p) {
- EventQueue.del(llbnd);
- EventQueue.insert(llbnd, p, Geom.distance(p, bot));
- }
- p = Geom.intersect(bisector, rrbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, bot));
- }
- } else {
- break;
- }
- }
- for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) {
- callback(lbnd.edge);
- }
- }
- function d3_geom_quadtreeNode() {
- return {
- leaf: true,
- nodes: [],
- point: null
- };
- }
- function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
- if (!f(node, x1, y1, x2, y2)) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
- if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
- if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
- if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
- if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
- }
- }
- function d3_geom_quadtreePoint(p) {
- return {
- x: p[0],
- y: p[1]
- };
- }
- function d3_time_utc() {
- this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
- }
- function d3_time_formatAbbreviate(name) {
- return name.substring(0, 3);
- }
- function d3_time_parse(date, template, string, j) {
- var c, p, i = 0, n = template.length, m = string.length;
- while (i < n) {
- if (j >= m) return -1;
- c = template.charCodeAt(i++);
- if (c == 37) {
- p = d3_time_parsers[template.charAt(i++)];
- if (!p || (j = p(date, string, j)) < 0) return -1;
- } else if (c != string.charCodeAt(j++)) {
- return -1;
- }
- }
- return j;
- }
- function d3_time_formatRe(names) {
- return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
- }
- function d3_time_formatLookup(names) {
- var map = new d3_Map, i = -1, n = names.length;
- while (++i < n) map.set(names[i].toLowerCase(), i);
- return map;
- }
- function d3_time_parseWeekdayAbbrev(date, string, i) {
- d3_time_dayAbbrevRe.lastIndex = 0;
- var n = d3_time_dayAbbrevRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseWeekday(date, string, i) {
- d3_time_dayRe.lastIndex = 0;
- var n = d3_time_dayRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseMonthAbbrev(date, string, i) {
- d3_time_monthAbbrevRe.lastIndex = 0;
- var n = d3_time_monthAbbrevRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseMonth(date, string, i) {
- d3_time_monthRe.lastIndex = 0;
- var n = d3_time_monthRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseLocaleFull(date, string, i) {
- return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
- }
- function d3_time_parseLocaleDate(date, string, i) {
- return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
- }
- function d3_time_parseLocaleTime(date, string, i) {
- return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
- }
- function d3_time_parseFullYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 4));
- return n ? (date.y = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.y = d3_time_expandYear(+n[0]), i += n[0].length) : -1;
- }
- function d3_time_expandYear(d) {
- return d + (d > 68 ? 1900 : 2e3);
- }
- function d3_time_parseMonthNumber(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.m = n[0] - 1, i += n[0].length) : -1;
- }
- function d3_time_parseDay(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.d = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseHour24(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.H = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMinutes(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.M = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseSeconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.S = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMilliseconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 3));
- return n ? (date.L = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseAmPm(date, string, i) {
- var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());
- return n == null ? -1 : (date.p = n, i);
- }
- function d3_time_zone(d) {
- var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60;
- return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
- }
- function d3_time_formatIsoNative(date) {
- return date.toISOString();
- }
- function d3_time_interval(local, step, number) {
- function round(date) {
- var d0 = local(date), d1 = offset(d0, 1);
- return date - d0 < d1 - date ? d0 : d1;
- }
- function ceil(date) {
- step(date = local(new d3_time(date - 1)), 1);
- return date;
- }
- function offset(date, k) {
- step(date = new d3_time(+date), k);
- return date;
- }
- function range(t0, t1, dt) {
- var time = ceil(t0), times = [];
- if (dt > 1) {
- while (time < t1) {
- if (!(number(time) % dt)) times.push(new Date(+time));
- step(time, 1);
- }
- } else {
- while (time < t1) times.push(new Date(+time)), step(time, 1);
- }
- return times;
- }
- function range_utc(t0, t1, dt) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = t0;
- return range(utc, t1, dt);
- } finally {
- d3_time = Date;
- }
- }
- local.floor = local;
- local.round = round;
- local.ceil = ceil;
- local.offset = offset;
- local.range = range;
- var utc = local.utc = d3_time_interval_utc(local);
- utc.floor = utc;
- utc.round = d3_time_interval_utc(round);
- utc.ceil = d3_time_interval_utc(ceil);
- utc.offset = d3_time_interval_utc(offset);
- utc.range = range_utc;
- return local;
- }
- function d3_time_interval_utc(method) {
- return function(date, k) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = date;
- return method(utc, k)._;
- } finally {
- d3_time = Date;
- }
- };
- }
- function d3_time_scale(linear, methods, format) {
- function scale(x) {
- return linear(x);
- }
- scale.invert = function(x) {
- return d3_time_scaleDate(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
- linear.domain(x);
- return scale;
- };
- scale.nice = function(m) {
- return scale.domain(d3_scale_nice(scale.domain(), function() {
- return m;
- }));
- };
- scale.ticks = function(m, k) {
- var extent = d3_time_scaleExtent(scale.domain());
- if (typeof m !== "function") {
- var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
- if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
- if (!i) return linear.ticks(m).map(d3_time_scaleDate);
- if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
- m = methods[i];
- k = m[1];
- m = m[0].range;
- }
- return m(extent[0], new Date(+extent[1] + 1), k);
- };
- scale.tickFormat = function() {
- return format;
- };
- scale.copy = function() {
- return d3_time_scale(linear.copy(), methods, format);
- };
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_time_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_time_scaleDate(t) {
- return new Date(t);
- }
- function d3_time_scaleFormat(formats) {
- return function(date) {
- var i = formats.length - 1, f = formats[i];
- while (!f[1](date)) f = formats[--i];
- return f[0](date);
- };
- }
- function d3_time_scaleSetYear(y) {
- var d = new Date(y, 0, 1);
- d.setFullYear(y);
- return d;
- }
- function d3_time_scaleGetYear(d) {
- var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- function d3_time_scaleUTCSetYear(y) {
- var d = new Date(Date.UTC(y, 0, 1));
- d.setUTCFullYear(y);
- return d;
- }
- function d3_time_scaleUTCGetYear(d) {
- var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- if (!Date.now) Date.now = function() {
- return +(new Date);
- };
- try {
- document.createElement("div").style.setProperty("opacity", 0, "");
- } catch (error) {
- var d3_style_prototype = CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
- d3_style_prototype.setProperty = function(name, value, priority) {
- d3_style_setProperty.call(this, name, value + "", priority);
- };
- }
- d3 = {
- version: "2.10.2"
- };
- var d3_array = d3_arraySlice;
- try {
- d3_array(document.documentElement.childNodes)[0].nodeType;
- } catch (e) {
- d3_array = d3_arrayCopy;
- }
- var d3_arraySubclass = [].__proto__ ? function(array, prototype) {
- array.__proto__ = prototype;
- } : function(array, prototype) {
- for (var property in prototype) array[property] = prototype[property];
- };
- d3.map = function(object) {
- var map = new d3_Map;
- for (var key in object) map.set(key, object[key]);
- return map;
- };
- d3_class(d3_Map, {
- has: function(key) {
- return d3_map_prefix + key in this;
- },
- get: function(key) {
- return this[d3_map_prefix + key];
- },
- set: function(key, value) {
- return this[d3_map_prefix + key] = value;
- },
- remove: function(key) {
- key = d3_map_prefix + key;
- return key in this && delete this[key];
- },
- keys: function() {
- var keys = [];
- this.forEach(function(key) {
- keys.push(key);
- });
- return keys;
- },
- values: function() {
- var values = [];
- this.forEach(function(key, value) {
- values.push(value);
- });
- return values;
- },
- entries: function() {
- var entries = [];
- this.forEach(function(key, value) {
- entries.push({
- key: key,
- value: value
- });
- });
- return entries;
- },
- forEach: function(f) {
- for (var key in this) {
- if (key.charCodeAt(0) === d3_map_prefixCode) {
- f.call(this, key.substring(1), this[key]);
- }
- }
- }
- });
- var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
- d3.functor = d3_functor;
- d3.rebind = function(target, source) {
- var i = 1, n = arguments.length, method;
- while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
- return target;
- };
- d3.ascending = function(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- };
- d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
- };
- d3.mean = function(array, f) {
- var n = array.length, a, m = 0, i = -1, j = 0;
- if (arguments.length === 1) {
- while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;
- } else {
- while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;
- }
- return j ? m : undefined;
- };
- d3.median = function(array, f) {
- if (arguments.length > 1) array = array.map(f);
- array = array.filter(d3_number);
- return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;
- };
- d3.min = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && a > b) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
- }
- return a;
- };
- d3.max = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && b > a) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
- }
- return a;
- };
- d3.extent = function(array, f) {
- var i = -1, n = array.length, a, b, c;
- if (arguments.length === 1) {
- while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;
- while (++i < n) if ((b = array[i]) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- } else {
- while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- }
- return [ a, c ];
- };
- d3.random = {
- normal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- return function() {
- var x, y, r;
- do {
- x = Math.random() * 2 - 1;
- y = Math.random() * 2 - 1;
- r = x * x + y * y;
- } while (!r || r > 1);
- return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
- };
- },
- logNormal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- var random = d3.random.normal();
- return function() {
- return Math.exp(µ + σ * random());
- };
- },
- irwinHall: function(m) {
- return function() {
- for (var s = 0, j = 0; j < m; j++) s += Math.random();
- return s / m;
- };
- }
- };
- d3.sum = function(array, f) {
- var s = 0, n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (!isNaN(a = +array[i])) s += a;
- } else {
- while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
- }
- return s;
- };
- d3.quantile = function(values, p) {
- var H = (values.length - 1) * p + 1, h = Math.floor(H), v = values[h - 1], e = H - h;
- return e ? v + e * (values[h] - v) : v;
- };
- d3.transpose = function(matrix) {
- return d3.zip.apply(d3, matrix);
- };
- d3.zip = function() {
- if (!(n = arguments.length)) return [];
- for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
- for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
- zip[j] = arguments[j][i];
- }
- }
- return zips;
- };
- d3.bisector = function(f) {
- return {
- left: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1;
- }
- return lo;
- }
- };
- };
- var d3_bisector = d3.bisector(function(d) {
- return d;
- });
- d3.bisectLeft = d3_bisector.left;
- d3.bisect = d3.bisectRight = d3_bisector.right;
- d3.first = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) > 0) {
- a = b;
- }
- }
- return a;
- };
- d3.last = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) <= 0) {
- a = b;
- }
- }
- return a;
- };
- d3.nest = function() {
- function map(array, depth) {
- if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
- var i = -1, n = array.length, key = keys[depth++], keyValue, object, valuesByKey = new d3_Map, values, o = {};
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
- values.push(object);
- } else {
- valuesByKey.set(keyValue, [ object ]);
- }
- }
- valuesByKey.forEach(function(keyValue, values) {
- o[keyValue] = map(values, depth);
- });
- return o;
- }
- function entries(map, depth) {
- if (depth >= keys.length) return map;
- var a = [], sortKey = sortKeys[depth++], key;
- for (key in map) {
- a.push({
- key: key,
- values: entries(map[key], depth)
- });
- }
- if (sortKey) a.sort(function(a, b) {
- return sortKey(a.key, b.key);
- });
- return a;
- }
- var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
- nest.map = function(array) {
- return map(array, 0);
- };
- nest.entries = function(array) {
- return entries(map(array, 0), 0);
- };
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
- return nest;
- };
- d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
- };
- d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
- };
- d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({
- key: key,
- value: map[key]
- });
- return entries;
- };
- d3.permute = function(array, indexes) {
- var permutes = [], i = -1, n = indexes.length;
- while (++i < n) permutes[i] = array[indexes[i]];
- return permutes;
- };
- d3.merge = function(arrays) {
- return Array.prototype.concat.apply([], arrays);
- };
- d3.split = function(array, f) {
- var arrays = [], values = [], value, i = -1, n = array.length;
- if (arguments.length < 2) f = d3_splitter;
- while (++i < n) {
- if (f.call(values, value = array[i], i)) {
- values = [];
- } else {
- if (!values.length) arrays.push(values);
- values.push(value);
- }
- }
- return arrays;
- };
- d3.range = function(start, stop, step) {
- if (arguments.length < 3) {
- step = 1;
- if (arguments.length < 2) {
- stop = start;
- start = 0;
- }
- }
- if ((stop - start) / step === Infinity) throw new Error("infinite range");
- var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j;
- start *= k, stop *= k, step *= k;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
- return range;
- };
- d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
- };
- var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
- d3.round = function(x, n) {
- return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
- };
- d3.xhr = function(url, mime, callback) {
- var req = new XMLHttpRequest;
- if (arguments.length < 3) callback = mime, mime = null; else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
- req.open("GET", url, true);
- if (mime) req.setRequestHeader("Accept", mime);
- req.onreadystatechange = function() {
- if (req.readyState === 4) {
- var s = req.status;
- callback(!s && req.response || s >= 200 && s < 300 || s === 304 ? req : null);
- }
- };
- req.send(null);
- };
- d3.text = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseText);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- d3.json = function(url, callback) {
- d3.text(url, "application/json", function(text) {
- callback(text ? JSON.parse(text) : null);
- });
- };
- d3.html = function(url, callback) {
- d3.text(url, "text/html", function(text) {
- if (text != null) {
- var range = document.createRange();
- range.selectNode(document.body);
- text = range.createContextualFragment(text);
- }
- callback(text);
- });
- };
- d3.xml = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseXML);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- var d3_nsPrefix = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- };
- d3.ns = {
- prefix: d3_nsPrefix,
- qualify: function(name) {
- var i = name.indexOf(":"), prefix = name;
- if (i >= 0) {
- prefix = name.substring(0, i);
- name = name.substring(i + 1);
- }
- return d3_nsPrefix.hasOwnProperty(prefix) ? {
- space: d3_nsPrefix[prefix],
- local: name
- } : name;
- }
- };
- d3.dispatch = function() {
- var dispatch = new d3_dispatch, i = -1, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- return dispatch;
- };
- d3_dispatch.prototype.on = function(type, listener) {
- var i = type.indexOf("."), name = "";
- if (i > 0) {
- name = type.substring(i + 1);
- type = type.substring(0, i);
- }
- return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
- };
- d3.format = function(specifier) {
- var match = d3_format_re.exec(specifier), fill = match[1] || " ", sign = match[3] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
- if (precision) precision = +precision.substring(1);
- if (zfill) {
- fill = "0";
- if (comma) width -= Math.floor((width - 1) / 4);
- }
- switch (type) {
- case "n":
- comma = true;
- type = "g";
- break;
- case "%":
- scale = 100;
- suffix = "%";
- type = "f";
- break;
- case "p":
- scale = 100;
- suffix = "%";
- type = "r";
- break;
- case "d":
- integer = true;
- precision = 0;
- break;
- case "s":
- scale = -1;
- type = "r";
- break;
- }
- if (type == "r" && !precision) type = "g";
- type = d3_format_types.get(type) || d3_format_typeDefault;
- return function(value) {
- if (integer && value % 1) return "";
- var negative = value < 0 && (value = -value) ? "-" : sign;
- if (scale < 0) {
- var prefix = d3.formatPrefix(value, precision);
- value = prefix.scale(value);
- suffix = prefix.symbol;
- } else {
- value *= scale;
- }
- value = type(value, precision);
- if (zfill) {
- var length = value.length + negative.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- if (comma) value = d3_format_group(value);
- value = negative + value;
- } else {
- if (comma) value = d3_format_group(value);
- value = negative + value;
- var length = value.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- }
- return value + suffix;
- };
- };
- var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
- var d3_format_types = d3.map({
- g: function(x, p) {
- return x.toPrecision(p);
- },
- e: function(x, p) {
- return x.toExponential(p);
- },
- f: function(x, p) {
- return x.toFixed(p);
- },
- r: function(x, p) {
- return d3.round(x, p = d3_format_precision(x, p)).toFixed(Math.max(0, Math.min(20, p)));
- }
- });
- var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "μ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
- d3.formatPrefix = function(value, precision) {
- var i = 0;
- if (value) {
- if (value < 0) value *= -1;
- if (precision) value = d3.round(value, d3_format_precision(value, precision));
- i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
- i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));
- }
- return d3_formatPrefixes[8 + i / 3];
- };
- var d3_ease_quad = d3_ease_poly(2), d3_ease_cubic = d3_ease_poly(3), d3_ease_default = function() {
- return d3_ease_identity;
- };
- var d3_ease = d3.map({
- linear: d3_ease_default,
- poly: d3_ease_poly,
- quad: function() {
- return d3_ease_quad;
- },
- cubic: function() {
- return d3_ease_cubic;
- },
- sin: function() {
- return d3_ease_sin;
- },
- exp: function() {
- return d3_ease_exp;
- },
- circle: function() {
- return d3_ease_circle;
- },
- elastic: d3_ease_elastic,
- back: d3_ease_back,
- bounce: function() {
- return d3_ease_bounce;
- }
- });
- var d3_ease_mode = d3.map({
- "in": d3_ease_identity,
- out: d3_ease_reverse,
- "in-out": d3_ease_reflect,
- "out-in": function(f) {
- return d3_ease_reflect(d3_ease_reverse(f));
- }
- });
- d3.ease = function(name) {
- var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in";
- t = d3_ease.get(t) || d3_ease_default;
- m = d3_ease_mode.get(m) || d3_ease_identity;
- return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));
- };
- d3.event = null;
- d3.transform = function(string) {
- var g = document.createElementNS(d3.ns.prefix.svg, "g");
- return (d3.transform = function(string) {
- g.setAttribute("transform", string);
- var t = g.transform.baseVal.consolidate();
- return new d3_transform(t ? t.matrix : d3_transformIdentity);
- })(string);
- };
- d3_transform.prototype.toString = function() {
- return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
- };
- var d3_transformDegrees = 180 / Math.PI, d3_transformIdentity = {
- a: 1,
- b: 0,
- c: 0,
- d: 1,
- e: 0,
- f: 0
- };
- d3.interpolate = function(a, b) {
- var i = d3.interpolators.length, f;
- while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
- return f;
- };
- d3.interpolateNumber = function(a, b) {
- b -= a;
- return function(t) {
- return a + b * t;
- };
- };
- d3.interpolateRound = function(a, b) {
- b -= a;
- return function(t) {
- return Math.round(a + b * t);
- };
- };
- d3.interpolateString = function(a, b) {
- var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
- d3_interpolate_number.lastIndex = 0;
- for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
- if (m.index) s.push(b.substring(s0, s1 = m.index));
- q.push({
- i: s.length,
- x: m[0]
- });
- s.push(null);
- s0 = d3_interpolate_number.lastIndex;
- }
- if (s0 < b.length) s.push(b.substring(s0));
- for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
- o = q[i];
- if (o.x == m[0]) {
- if (o.i) {
- if (s[o.i + 1] == null) {
- s[o.i - 1] += o.x;
- s.splice(o.i, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- } else {
- s[o.i - 1] += o.x + s[o.i + 1];
- s.splice(o.i, 2);
- for (j = i + 1; j < n; ++j) q[j].i -= 2;
- }
- } else {
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- }
- }
- q.splice(i, 1);
- n--;
- i--;
- } else {
- o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
- }
- }
- while (i < n) {
- o = q.pop();
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- }
- n--;
- }
- if (s.length === 1) {
- return s[0] == null ? q[0].x : function() {
- return b;
- };
- }
- return function(t) {
- for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateTransform = function(a, b) {
- var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
- if (ta[0] != tb[0] || ta[1] != tb[1]) {
- s.push("translate(", null, ",", null, ")");
- q.push({
- i: 1,
- x: d3.interpolateNumber(ta[0], tb[0])
- }, {
- i: 3,
- x: d3.interpolateNumber(ta[1], tb[1])
- });
- } else if (tb[0] || tb[1]) {
- s.push("translate(" + tb + ")");
- } else {
- s.push("");
- }
- if (ra != rb) {
- if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
- q.push({
- i: s.push(s.pop() + "rotate(", null, ")") - 2,
- x: d3.interpolateNumber(ra, rb)
- });
- } else if (rb) {
- s.push(s.pop() + "rotate(" + rb + ")");
- }
- if (wa != wb) {
- q.push({
- i: s.push(s.pop() + "skewX(", null, ")") - 2,
- x: d3.interpolateNumber(wa, wb)
- });
- } else if (wb) {
- s.push(s.pop() + "skewX(" + wb + ")");
- }
- if (ka[0] != kb[0] || ka[1] != kb[1]) {
- n = s.push(s.pop() + "scale(", null, ",", null, ")");
- q.push({
- i: n - 4,
- x: d3.interpolateNumber(ka[0], kb[0])
- }, {
- i: n - 2,
- x: d3.interpolateNumber(ka[1], kb[1])
- });
- } else if (kb[0] != 1 || kb[1] != 1) {
- s.push(s.pop() + "scale(" + kb + ")");
- }
- n = q.length;
- return function(t) {
- var i = -1, o;
- while (++i < n) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateRgb = function(a, b) {
- a = d3.rgb(a);
- b = d3.rgb(b);
- var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
- return function(t) {
- return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
- };
- };
- d3.interpolateHsl = function(a, b) {
- a = d3.hsl(a);
- b = d3.hsl(b);
- var h0 = a.h, s0 = a.s, l0 = a.l, h1 = b.h - h0, s1 = b.s - s0, l1 = b.l - l0;
- if (h1 > 180) h1 -= 360; else if (h1 < -180) h1 += 360;
- return function(t) {
- return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t) + "";
- };
- };
- d3.interpolateLab = function(a, b) {
- a = d3.lab(a);
- b = d3.lab(b);
- var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
- return function(t) {
- return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
- d3.interpolateHcl = function(a, b) {
- a = d3.hcl(a);
- b = d3.hcl(b);
- var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
- return function(t) {
- return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
- };
- };
- d3.interpolateArray = function(a, b) {
- var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
- for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
- for (; i < na; ++i) c[i] = a[i];
- for (; i < nb; ++i) c[i] = b[i];
- return function(t) {
- for (i = 0; i < n0; ++i) c[i] = x[i](t);
- return c;
- };
- };
- d3.interpolateObject = function(a, b) {
- var i = {}, c = {}, k;
- for (k in a) {
- if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
- } else {
- c[k] = a[k];
- }
- }
- for (k in b) {
- if (!(k in a)) {
- c[k] = b[k];
- }
- }
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
- };
- var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
- d3.interpolators = [ d3.interpolateObject, function(a, b) {
- return b instanceof Array && d3.interpolateArray(a, b);
- }, function(a, b) {
- return (typeof a === "string" || typeof b === "string") && d3.interpolateString(a + "", b + "");
- }, function(a, b) {
- return (typeof b === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b);
- }, function(a, b) {
- return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b);
- } ];
- d3.rgb = function(r, g, b) {
- return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b);
- };
- d3_Rgb.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- var r = this.r, g = this.g, b = this.b, i = 30;
- if (!r && !g && !b) return d3_rgb(i, i, i);
- if (r && r < i) r = i;
- if (g && g < i) g = i;
- if (b && b < i) b = i;
- return d3_rgb(Math.min(255, Math.floor(r / k)), Math.min(255, Math.floor(g / k)), Math.min(255, Math.floor(b / k)));
- };
- d3_Rgb.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_rgb(Math.floor(k * this.r), Math.floor(k * this.g), Math.floor(k * this.b));
- };
- d3_Rgb.prototype.hsl = function() {
- return d3_rgb_hsl(this.r, this.g, this.b);
- };
- d3_Rgb.prototype.toString = function() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
- };
- var d3_rgb_names = d3.map({
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- });
- d3_rgb_names.forEach(function(key, value) {
- d3_rgb_names.set(key, d3_rgb_parse(value, d3_rgb, d3_hsl_rgb));
- });
- d3.hsl = function(h, s, l) {
- return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l);
- };
- d3_Hsl.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, this.l / k);
- };
- d3_Hsl.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, k * this.l);
- };
- d3_Hsl.prototype.rgb = function() {
- return d3_hsl_rgb(this.h, this.s, this.l);
- };
- d3_Hsl.prototype.toString = function() {
- return this.rgb().toString();
- };
- d3.hcl = function(h, c, l) {
- return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l);
- };
- d3_Hcl.prototype.brighter = function(k) {
- return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.darker = function(k) {
- return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.rgb = function() {
- return d3_hcl_lab(this.h, this.c, this.l).rgb();
- };
- d3_Hcl.prototype.toString = function() {
- return this.rgb() + "";
- };
- d3.lab = function(l, a, b) {
- return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b);
- };
- var d3_lab_K = 18;
- var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
- d3_Lab.prototype.brighter = function(k) {
- return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.darker = function(k) {
- return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.rgb = function() {
- return d3_lab_rgb(this.l, this.a, this.b);
- };
- d3_Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
- var d3_select = function(s, n) {
- return n.querySelector(s);
- }, d3_selectAll = function(s, n) {
- return n.querySelectorAll(s);
- }, d3_selectRoot = document.documentElement, d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector, d3_selectMatches = function(n, s) {
- return d3_selectMatcher.call(n, s);
- };
- if (typeof Sizzle === "function") {
- d3_select = function(s, n) {
- return Sizzle(s, n)[0] || null;
- };
- d3_selectAll = function(s, n) {
- return Sizzle.uniqueSort(Sizzle(s, n));
- };
- d3_selectMatches = Sizzle.matchesSelector;
- }
- var d3_selectionPrototype = [];
- d3.selection = function() {
- return d3_selectionRoot;
- };
- d3.selection.prototype = d3_selectionPrototype;
- d3_selectionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, group, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(subnode = selector.call(node, node.__data__, i));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));
- subgroup.parentNode = node;
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node();
- name = d3.ns.qualify(name);
- return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
- }
- for (value in name) this.each(d3_selection_attr(value, name[value]));
- return this;
- }
- return this.each(d3_selection_attr(name, value));
- };
- d3_selectionPrototype.classed = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1;
- if (value = node.classList) {
- while (++i < n) if (!value.contains(name[i])) return false;
- } else {
- value = node.className;
- if (value.baseVal != null) value = value.baseVal;
- while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
- }
- return true;
- }
- for (value in name) this.each(d3_selection_classed(value, name[value]));
- return this;
- }
- return this.each(d3_selection_classed(name, value));
- };
- d3_selectionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
- return this;
- }
- if (n < 2) return window.getComputedStyle(this.node(), null).getPropertyValue(name);
- priority = "";
- }
- return this.each(d3_selection_style(name, value, priority));
- };
- d3_selectionPrototype.property = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") return this.node()[name];
- for (value in name) this.each(d3_selection_property(value, name[value]));
- return this;
- }
- return this.each(d3_selection_property(name, value));
- };
- d3_selectionPrototype.text = function(value) {
- return arguments.length < 1 ? this.node().textContent : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- } : value == null ? function() {
- this.textContent = "";
- } : function() {
- this.textContent = value;
- });
- };
- d3_selectionPrototype.html = function(value) {
- return arguments.length < 1 ? this.node().innerHTML : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- } : value == null ? function() {
- this.innerHTML = "";
- } : function() {
- this.innerHTML = value;
- });
- };
- d3_selectionPrototype.append = function(name) {
- function append() {
- return this.appendChild(document.createElementNS(this.namespaceURI, name));
- }
- function appendNS() {
- return this.appendChild(document.createElementNS(name.space, name.local));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? appendNS : append);
- };
- d3_selectionPrototype.insert = function(name, before) {
- function insert() {
- return this.insertBefore(document.createElementNS(this.namespaceURI, name), d3_select(before, this));
- }
- function insertNS() {
- return this.insertBefore(document.createElementNS(name.space, name.local), d3_select(before, this));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? insertNS : insert);
- };
- d3_selectionPrototype.remove = function() {
- return this.each(function() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
- });
- };
- d3_selectionPrototype.data = function(value, key) {
- function bind(group, groupData) {
- var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), n1 = Math.max(n, m), updateNodes = [], enterNodes = [], exitNodes = [], node, nodeData;
- if (key) {
- var nodeByKeyValue = new d3_Map, keyValues = [], keyValue, j = groupData.length;
- for (i = -1; ++i < n; ) {
- keyValue = key.call(node = group[i], node.__data__, i);
- if (nodeByKeyValue.has(keyValue)) {
- exitNodes[j++] = node;
- } else {
- nodeByKeyValue.set(keyValue, node);
- }
- keyValues.push(keyValue);
- }
- for (i = -1; ++i < m; ) {
- keyValue = key.call(groupData, nodeData = groupData[i], i);
- if (nodeByKeyValue.has(keyValue)) {
- updateNodes[i] = node = nodeByKeyValue.get(keyValue);
- node.__data__ = nodeData;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- nodeByKeyValue.remove(keyValue);
- }
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.has(keyValues[i])) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (i = -1; ++i < n0; ) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- }
- for (; i < m; ++i) {
- enterNodes[i] = d3_selection_dataNode(groupData[i]);
- updateNodes[i] = exitNodes[i] = null;
- }
- for (; i < n1; ++i) {
- exitNodes[i] = group[i];
- enterNodes[i] = updateNodes[i] = null;
- }
- }
- enterNodes.update = updateNodes;
- enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
- var i = -1, n = this.length, group, node;
- if (!arguments.length) {
- value = new Array(n = (group = this[0]).length);
- while (++i < n) {
- if (node = group[i]) {
- value[i] = node.__data__;
- }
- }
- return value;
- }
- var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
- if (typeof value === "function") {
- while (++i < n) {
- bind(group = this[i], value.call(group, group.parentNode.__data__, i));
- }
- } else {
- while (++i < n) {
- bind(group = this[i], value);
- }
- }
- update.enter = function() {
- return enter;
- };
- update.exit = function() {
- return exit;
- };
- return update;
- };
- d3_selectionPrototype.datum = d3_selectionPrototype.map = function(value) {
- return arguments.length < 1 ? this.property("__data__") : this.property("__data__", value);
- };
- d3_selectionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.order = function() {
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
- return this;
- };
- d3_selectionPrototype.sort = function(comparator) {
- comparator = d3_selection_sortComparator.apply(this, arguments);
- for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
- return this.order();
- };
- d3_selectionPrototype.on = function(type, listener, capture) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof type !== "string") {
- if (n < 2) listener = false;
- for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
- return this;
- }
- if (n < 2) return (n = this.node()["__on" + type]) && n._;
- capture = false;
- }
- return this.each(d3_selection_on(type, listener, capture));
- };
- d3_selectionPrototype.each = function(callback) {
- return d3_selection_each(this, function(node, i, j) {
- callback.call(node, node.__data__, i, j);
- });
- };
- d3_selectionPrototype.call = function(callback) {
- callback.apply(this, (arguments[0] = this, arguments));
- return this;
- };
- d3_selectionPrototype.empty = function() {
- return !this.node();
- };
- d3_selectionPrototype.node = function(callback) {
- for (var j = 0, m = this.length; j < m; j++) {
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return node;
- }
- }
- return null;
- };
- d3_selectionPrototype.transition = function() {
- var subgroups = [], subgroup, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- subgroup.push((node = group[i]) ? {
- node: node,
- delay: d3_transitionDelay,
- duration: d3_transitionDuration
- } : null);
- }
- }
- return d3_transition(subgroups, d3_transitionId || ++d3_transitionNextId, Date.now());
- };
- var d3_selectionRoot = d3_selection([ [ document ] ]);
- d3_selectionRoot[0].parentNode = d3_selectRoot;
- d3.select = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.select(selector) : d3_selection([ [ selector ] ]);
- };
- d3.selectAll = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.selectAll(selector) : d3_selection([ d3_array(selector) ]);
- };
- var d3_selection_enterPrototype = [];
- d3.selection.enter = d3_selection_enter;
- d3.selection.enter.prototype = d3_selection_enterPrototype;
- d3_selection_enterPrototype.append = d3_selectionPrototype.append;
- d3_selection_enterPrototype.insert = d3_selectionPrototype.insert;
- d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
- d3_selection_enterPrototype.node = d3_selectionPrototype.node;
- d3_selection_enterPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, upgroup, group, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- upgroup = (group = this[j]).update;
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- var d3_transitionPrototype = [], d3_transitionNextId = 0, d3_transitionId = 0, d3_transitionDefaultDelay = 0, d3_transitionDefaultDuration = 250, d3_transitionDefaultEase = d3.ease("cubic-in-out"), d3_transitionDelay = d3_transitionDefaultDelay, d3_transitionDuration = d3_transitionDefaultDuration, d3_transitionEase = d3_transitionDefaultEase;
- d3_transitionPrototype.call = d3_selectionPrototype.call;
- d3.transition = function(selection) {
- return arguments.length ? d3_transitionId ? selection.transition() : selection : d3_selectionRoot.transition();
- };
- d3.transition.prototype = d3_transitionPrototype;
- d3_transitionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {
- if ("__data__" in node.node) subnode.__data__ = node.node.__data__;
- subgroup.push({
- node: subnode,
- delay: node.delay,
- duration: node.duration
- });
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, subnodes, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subnodes = selector.call(node.node, node.node.__data__, i);
- subgroups.push(subgroup = []);
- for (var k = -1, o = subnodes.length; ++k < o; ) {
- subgroup.push({
- node: subnodes[k],
- delay: node.delay,
- duration: node.duration
- });
- }
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node.node, node.node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- for (value in name) this.attrTween(value, d3_tweenByName(name[value], value));
- return this;
- }
- return this.attrTween(name, d3_tweenByName(value, name));
- };
- d3_transitionPrototype.attrTween = function(nameNS, tween) {
- function attrTween(d, i) {
- var f = tween.call(this, d, i, this.getAttribute(name));
- return f === d3_tweenRemove ? (this.removeAttribute(name), null) : f && function(t) {
- this.setAttribute(name, f(t));
- };
- }
- function attrTweenNS(d, i) {
- var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
- return f === d3_tweenRemove ? (this.removeAttributeNS(name.space, name.local), null) : f && function(t) {
- this.setAttributeNS(name.space, name.local, f(t));
- };
- }
- var name = d3.ns.qualify(nameNS);
- return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
- };
- d3_transitionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.styleTween(priority, d3_tweenByName(name[priority], priority), value);
- return this;
- }
- priority = "";
- }
- return this.styleTween(name, d3_tweenByName(value, name), priority);
- };
- d3_transitionPrototype.styleTween = function(name, tween, priority) {
- if (arguments.length < 3) priority = "";
- return this.tween("style." + name, function(d, i) {
- var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
- return f === d3_tweenRemove ? (this.style.removeProperty(name), null) : f && function(t) {
- this.style.setProperty(name, f(t), priority);
- };
- });
- };
- d3_transitionPrototype.text = function(value) {
- return this.tween("text", function(d, i) {
- this.textContent = typeof value === "function" ? value.call(this, d, i) : value;
- });
- };
- d3_transitionPrototype.remove = function() {
- return this.each("end.transition", function() {
- var p;
- if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);
- });
- };
- d3_transitionPrototype.delay = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.delay = value.call(node = node.node, node.__data__, i, j) | 0;
- } : (value = value | 0, function(node) {
- node.delay = value;
- }));
- };
- d3_transitionPrototype.duration = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.duration = Math.max(1, value.call(node = node.node, node.__data__, i, j) | 0);
- } : (value = Math.max(1, value | 0), function(node) {
- node.duration = value;
- }));
- };
- d3_transitionPrototype.transition = function() {
- return this.select(d3_this);
- };
- d3.tween = function(b, interpolate) {
- function tweenFunction(d, i, a) {
- var v = b.call(this, d, i);
- return v == null ? a != "" && d3_tweenRemove : a != v && interpolate(a, v);
- }
- function tweenString(d, i, a) {
- return a != b && interpolate(a, b);
- }
- return typeof b === "function" ? tweenFunction : b == null ? d3_tweenNull : (b += "", tweenString);
- };
- var d3_tweenRemove = {};
- var d3_timer_queue = null, d3_timer_interval, d3_timer_timeout;
- d3.timer = function(callback, delay, then) {
- var found = false, t0, t1 = d3_timer_queue;
- if (arguments.length < 3) {
- if (arguments.length < 2) delay = 0; else if (!isFinite(delay)) return;
- then = Date.now();
- }
- while (t1) {
- if (t1.callback === callback) {
- t1.then = then;
- t1.delay = delay;
- found = true;
- break;
- }
- t0 = t1;
- t1 = t1.next;
- }
- if (!found) d3_timer_queue = {
- callback: callback,
- then: then,
- delay: delay,
- next: d3_timer_queue
- };
- if (!d3_timer_interval) {
- d3_timer_timeout = clearTimeout(d3_timer_timeout);
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- };
- d3.timer.flush = function() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (!t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- d3_timer_flush();
- };
- var d3_timer_frame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) {
- setTimeout(callback, 17);
- };
- d3.mouse = function(container) {
- return d3_mousePoint(container, d3_eventSource());
- };
- var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
- d3.touches = function(container, touches) {
- if (arguments.length < 2) touches = d3_eventSource().touches;
- return touches ? d3_array(touches).map(function(touch) {
- var point = d3_mousePoint(container, touch);
- point.identifier = touch.identifier;
- return point;
- }) : [];
- };
- d3.scale = {};
- d3.scale.linear = function() {
- return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3.interpolate, false);
- };
- d3.scale.log = function() {
- return d3_scale_log(d3.scale.linear(), d3_scale_logp);
- };
- var d3_scale_logFormat = d3.format(".0e");
- d3_scale_logp.pow = function(x) {
- return Math.pow(10, x);
- };
- d3_scale_logn.pow = function(x) {
- return -Math.pow(10, -x);
- };
- d3.scale.pow = function() {
- return d3_scale_pow(d3.scale.linear(), 1);
- };
- d3.scale.sqrt = function() {
- return d3.scale.pow().exponent(.5);
- };
- d3.scale.ordinal = function() {
- return d3_scale_ordinal([], {
- t: "range",
- a: [ [] ]
- });
- };
- d3.scale.category10 = function() {
- return d3.scale.ordinal().range(d3_category10);
- };
- d3.scale.category20 = function() {
- return d3.scale.ordinal().range(d3_category20);
- };
- d3.scale.category20b = function() {
- return d3.scale.ordinal().range(d3_category20b);
- };
- d3.scale.category20c = function() {
- return d3.scale.ordinal().range(d3_category20c);
- };
- d3.scale.category50 = function() {
- return d3.scale.ordinal().range(d3_category50);
- };
- var d3_category10 = [ "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" ];
- var d3_category20 = [ "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5" ];
- var d3_category20b = [ "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", "#843c39", "#ad494a", "#d6616b", "#e7969c", "#7b4173", "#a55194", "#ce6dbd", "#de9ed6" ];
- var d3_category20c = [ "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", "#31a354", "#74c476", "#a1d99b", "#c7e9c0", "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", "#636363", "#969696", "#bdbdbd", "#d9d9d9" ];
- var d3_category50 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#8c864b", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6", "#9edae5", "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#aec7e8", "#e7ba52", "#ffbb78", "#e7cb94", "#98df8a", "#843c39", "#ff9896", "#ad494a", "#c5b0d5", "#d6616b", "#c49c94", "#e7969c", "#f7b6d2", "#fd8d3c", "#c7c7c7", "#7b4173", "#dbdb8d", "#a55194", ];
- d3.scale.quantile = function() {
- return d3_scale_quantile([], []);
- };
- d3.scale.quantize = function() {
- return d3_scale_quantize(0, 1, [ 0, 1 ]);
- };
- d3.scale.threshold = function() {
- return d3_scale_threshold([ .5 ], [ 0, 1 ]);
- };
- d3.scale.identity = function() {
- return d3_scale_identity([ 0, 1 ]);
- };
- d3.svg = {};
- d3.svg.arc = function() {
- function arc() {
- var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0), df = da < Math.PI ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
- return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
- }
- var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- arc.innerRadius = function(v) {
- if (!arguments.length) return innerRadius;
- innerRadius = d3_functor(v);
- return arc;
- };
- arc.outerRadius = function(v) {
- if (!arguments.length) return outerRadius;
- outerRadius = d3_functor(v);
- return arc;
- };
- arc.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return arc;
- };
- arc.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return arc;
- };
- arc.centroid = function() {
- var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
- return [ Math.cos(a) * r, Math.sin(a) * r ];
- };
- return arc;
- };
- var d3_svg_arcOffset = -Math.PI / 2, d3_svg_arcMax = 2 * Math.PI - 1e-6;
- d3.svg.line = function() {
- return d3_svg_line(d3_identity);
- };
- var d3_svg_lineInterpolators = d3.map({
- linear: d3_svg_lineLinear,
- "linear-closed": d3_svg_lineLinearClosed,
- "step-before": d3_svg_lineStepBefore,
- "step-after": d3_svg_lineStepAfter,
- basis: d3_svg_lineBasis,
- "basis-open": d3_svg_lineBasisOpen,
- "basis-closed": d3_svg_lineBasisClosed,
- bundle: d3_svg_lineBundle,
- cardinal: d3_svg_lineCardinal,
- "cardinal-open": d3_svg_lineCardinalOpen,
- "cardinal-closed": d3_svg_lineCardinalClosed,
- monotone: d3_svg_lineMonotone
- });
- d3_svg_lineInterpolators.forEach(function(key, value) {
- value.key = key;
- value.closed = /-closed$/.test(key);
- });
- var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
- d3.svg.line.radial = function() {
- var line = d3_svg_line(d3_svg_lineRadial);
- line.radius = line.x, delete line.x;
- line.angle = line.y, delete line.y;
- return line;
- };
- d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
- d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
- d3.svg.area = function() {
- return d3_svg_area(d3_identity);
- };
- d3.svg.area.radial = function() {
- var area = d3_svg_area(d3_svg_lineRadial);
- area.radius = area.x, delete area.x;
- area.innerRadius = area.x0, delete area.x0;
- area.outerRadius = area.x1, delete area.x1;
- area.angle = area.y, delete area.y;
- area.startAngle = area.y0, delete area.y0;
- area.endAngle = area.y1, delete area.y1;
- return area;
- };
- d3.svg.chord = function() {
- function chord(d, i) {
- var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
- return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
- }
- function subgroup(self, f, d, i) {
- var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
- return {
- r: r,
- a0: a0,
- a1: a1,
- p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
- p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
- };
- }
- function equals(a, b) {
- return a.a0 == b.a0 && a.a1 == b.a1;
- }
- function arc(r, p, a) {
- return "A" + r + "," + r + " 0 " + +(a > Math.PI) + ",1 " + p;
- }
- function curve(r0, p0, r1, p1) {
- return "Q 0,0 " + p1;
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- chord.radius = function(v) {
- if (!arguments.length) return radius;
- radius = d3_functor(v);
- return chord;
- };
- chord.source = function(v) {
- if (!arguments.length) return source;
- source = d3_functor(v);
- return chord;
- };
- chord.target = function(v) {
- if (!arguments.length) return target;
- target = d3_functor(v);
- return chord;
- };
- chord.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return chord;
- };
- chord.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return chord;
- };
- return chord;
- };
- d3.svg.diagonal = function() {
- function diagonal(d, i) {
- var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
- x: p0.x,
- y: m
- }, {
- x: p3.x,
- y: m
- }, p3 ];
- p = p.map(projection);
- return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, projection = d3_svg_diagonalProjection;
- diagonal.source = function(x) {
- if (!arguments.length) return source;
- source = d3_functor(x);
- return diagonal;
- };
- diagonal.target = function(x) {
- if (!arguments.length) return target;
- target = d3_functor(x);
- return diagonal;
- };
- diagonal.projection = function(x) {
- if (!arguments.length) return projection;
- projection = x;
- return diagonal;
- };
- return diagonal;
- };
- d3.svg.diagonal.radial = function() {
- var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
- diagonal.projection = function(x) {
- return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
- };
- return diagonal;
- };
- d3.svg.mouse = d3.mouse;
- d3.svg.touches = d3.touches;
- d3.svg.symbol = function() {
- function symbol(d, i) {
- return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
- }
- var type = d3_svg_symbolType, size = d3_svg_symbolSize;
- symbol.type = function(x) {
- if (!arguments.length) return type;
- type = d3_functor(x);
- return symbol;
- };
- symbol.size = function(x) {
- if (!arguments.length) return size;
- size = d3_functor(x);
- return symbol;
- };
- return symbol;
- };
- var d3_svg_symbols = d3.map({
- circle: d3_svg_symbolCircle,
- cross: function(size) {
- var r = Math.sqrt(size / 5) / 2;
- return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
- },
- diamond: function(size) {
- var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
- return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
- },
- square: function(size) {
- var r = Math.sqrt(size) / 2;
- return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
- },
- "triangle-down": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
- },
- "triangle-up": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
- }
- });
- d3.svg.symbolTypes = d3_svg_symbols.keys();
- var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
- d3.svg.axis = function() {
- function axis(g) {
- g.each(function() {
- var g = d3.select(this);
- var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
- var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
- var tick = g.selectAll("g").data(ticks, String), tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
- var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathEnter = path.enter().append("path").attr("class", "domain"), pathUpdate = d3.transition(path);
- var scale1 = scale.copy(), scale0 = this.__chart__ || scale1;
- this.__chart__ = scale1;
- tickEnter.append("line").attr("class", "tick");
- tickEnter.append("text");
- var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text");
- switch (orient) {
- case "bottom":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize);
- lineEnter.attr("y2", tickMajorSize);
- textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", 0).attr("y2", tickMajorSize);
- textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- text.attr("dy", ".71em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
- break;
- }
- case "top":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", -tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize);
- lineEnter.attr("y2", -tickMajorSize);
- textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize);
- textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- text.attr("dy", "0em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
- break;
- }
- case "left":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", -tickMinorSize);
- subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", -tickMajorSize);
- textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "end");
- pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
- break;
- }
- case "right":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", tickMinorSize);
- subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", tickMajorSize);
- textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "start");
- pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
- break;
- }
- }
- if (scale.ticks) {
- tickEnter.call(tickTransform, scale0);
- tickUpdate.call(tickTransform, scale1);
- tickExit.call(tickTransform, scale1);
- subtickEnter.call(tickTransform, scale0);
- subtickUpdate.call(tickTransform, scale1);
- subtickExit.call(tickTransform, scale1);
- } else {
- var dx = scale1.rangeBand() / 2, x = function(d) {
- return scale1(d) + dx;
- };
- tickEnter.call(tickTransform, x);
- tickUpdate.call(tickTransform, x);
- }
- });
- }
- var scale = d3.scale.linear(), orient = "bottom", tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
- axis.scale = function(x) {
- if (!arguments.length) return scale;
- scale = x;
- return axis;
- };
- axis.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- return axis;
- };
- axis.ticks = function() {
- if (!arguments.length) return tickArguments_;
- tickArguments_ = arguments;
- return axis;
- };
- axis.tickValues = function(x) {
- if (!arguments.length) return tickValues;
- tickValues = x;
- return axis;
- };
- axis.tickFormat = function(x) {
- if (!arguments.length) return tickFormat_;
- tickFormat_ = x;
- return axis;
- };
- axis.tickSize = function(x, y, z) {
- if (!arguments.length) return tickMajorSize;
- var n = arguments.length - 1;
- tickMajorSize = +x;
- tickMinorSize = n > 1 ? +y : tickMajorSize;
- tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;
- return axis;
- };
- axis.tickPadding = function(x) {
- if (!arguments.length) return tickPadding;
- tickPadding = +x;
- return axis;
- };
- axis.tickSubdivide = function(x) {
- if (!arguments.length) return tickSubdivide;
- tickSubdivide = +x;
- return axis;
- };
- return axis;
- };
- d3.svg.brush = function() {
- function brush(g) {
- g.each(function() {
- var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
- g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
- bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
- fg.enter().append("rect").attr("class", "extent").style("cursor", "move");
- tz.enter().append("g").attr("class", function(d) {
- return "resize " + d;
- }).style("cursor", function(d) {
- return d3_svg_brushCursor[d];
- }).append("rect").attr("x", function(d) {
- return /[ew]$/.test(d) ? -3 : null;
- }).attr("y", function(d) {
- return /^[ns]/.test(d) ? -3 : null;
- }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
- tz.style("display", brush.empty() ? "none" : null);
- tz.exit().remove();
- if (x) {
- e = d3_scaleRange(x);
- bg.attr("x", e[0]).attr("width", e[1] - e[0]);
- redrawX(g);
- }
- if (y) {
- e = d3_scaleRange(y);
- bg.attr("y", e[0]).attr("height", e[1] - e[0]);
- redrawY(g);
- }
- redraw(g);
- });
- }
- function redraw(g) {
- g.selectAll(".resize").attr("transform", function(d) {
- return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")";
- });
- }
- function redrawX(g) {
- g.select(".extent").attr("x", extent[0][0]);
- g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]);
- }
- function redrawY(g) {
- g.select(".extent").attr("y", extent[0][1]);
- g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]);
- }
- function brushstart() {
- function mouse() {
- var touches = d3.event.changedTouches;
- return touches ? d3.touches(target, touches)[0] : d3.mouse(target);
- }
- function keydown() {
- if (d3.event.keyCode == 32) {
- if (!dragging) {
- center = null;
- origin[0] -= extent[1][0];
- origin[1] -= extent[1][1];
- dragging = 2;
- }
- d3_eventCancel();
- }
- }
- function keyup() {
- if (d3.event.keyCode == 32 && dragging == 2) {
- origin[0] += extent[1][0];
- origin[1] += extent[1][1];
- dragging = 0;
- d3_eventCancel();
- }
- }
- function brushmove() {
- var point = mouse(), moved = false;
- if (offset) {
- point[0] += offset[0];
- point[1] += offset[1];
- }
- if (!dragging) {
- if (d3.event.altKey) {
- if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ];
- origin[0] = extent[+(point[0] < center[0])][0];
- origin[1] = extent[+(point[1] < center[1])][1];
- } else center = null;
- }
- if (resizingX && move1(point, x, 0)) {
- redrawX(g);
- moved = true;
- }
- if (resizingY && move1(point, y, 1)) {
- redrawY(g);
- moved = true;
- }
- if (moved) {
- redraw(g);
- event_({
- type: "brush",
- mode: dragging ? "move" : "resize"
- });
- }
- }
- function move1(point, scale, i) {
- var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max;
- if (dragging) {
- r0 -= position;
- r1 -= size + position;
- }
- min = Math.max(r0, Math.min(r1, point[i]));
- if (dragging) {
- max = (min += position) + size;
- } else {
- if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
- if (position < min) {
- max = min;
- min = position;
- } else {
- max = position;
- }
- }
- if (extent[0][i] !== min || extent[1][i] !== max) {
- extentDomain = null;
- extent[0][i] = min;
- extent[1][i] = max;
- return true;
- }
- }
- function brushend() {
- brushmove();
- g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
- d3.select("body").style("cursor", null);
- w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
- event_({
- type: "brushend"
- });
- d3_eventCancel();
- }
- var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), center, origin = mouse(), offset;
- var w = d3.select(window).on("mousemove.brush", brushmove).on("mouseup.brush", brushend).on("touchmove.brush", brushmove).on("touchend.brush", brushend).on("keydown.brush", keydown).on("keyup.brush", keyup);
- if (dragging) {
- origin[0] = extent[0][0] - origin[0];
- origin[1] = extent[0][1] - origin[1];
- } else if (resizing) {
- var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
- offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ];
- origin[0] = extent[ex][0];
- origin[1] = extent[ey][1];
- } else if (d3.event.altKey) center = origin.slice();
- g.style("pointer-events", "none").selectAll(".resize").style("display", null);
- d3.select("body").style("cursor", eventTarget.style("cursor"));
- event_({
- type: "brushstart"
- });
- brushmove();
- d3_eventCancel();
- }
- var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], extentDomain;
- brush.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.extent = function(z) {
- var x0, x1, y0, y1, t;
- if (!arguments.length) {
- z = extentDomain || extent;
- if (x) {
- x0 = z[0][0], x1 = z[1][0];
- if (!extentDomain) {
- x0 = extent[0][0], x1 = extent[1][0];
- if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- }
- }
- if (y) {
- y0 = z[0][1], y1 = z[1][1];
- if (!extentDomain) {
- y0 = extent[0][1], y1 = extent[1][1];
- if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- }
- }
- return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
- }
- extentDomain = [ [ 0, 0 ], [ 0, 0 ] ];
- if (x) {
- x0 = z[0], x1 = z[1];
- if (y) x0 = x0[0], x1 = x1[0];
- extentDomain[0][0] = x0, extentDomain[1][0] = x1;
- if (x.invert) x0 = x(x0), x1 = x(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;
- }
- if (y) {
- y0 = z[0], y1 = z[1];
- if (x) y0 = y0[1], y1 = y1[1];
- extentDomain[0][1] = y0, extentDomain[1][1] = y1;
- if (y.invert) y0 = y(y0), y1 = y(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;
- }
- return brush;
- };
- brush.clear = function() {
- extentDomain = null;
- extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0;
- return brush;
- };
- brush.empty = function() {
- return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1];
- };
- return d3.rebind(brush, event, "on");
- };
- var d3_svg_brushCursor = {
- n: "ns-resize",
- e: "ew-resize",
- s: "ns-resize",
- w: "ew-resize",
- nw: "nwse-resize",
- ne: "nesw-resize",
- se: "nwse-resize",
- sw: "nesw-resize"
- };
- var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
- d3.behavior = {};
- d3.behavior.drag = function() {
- function drag() {
- this.on("mousedown.drag", mousedown).on("touchstart.drag", mousedown);
- }
- function mousedown() {
- function point() {
- var p = target.parentNode;
- return touchId ? d3.touches(p).filter(function(p) {
- return p.identifier === touchId;
- })[0] : d3.mouse(p);
- }
- function dragmove() {
- if (!target.parentNode) return dragend();
- var p = point(), dx = p[0] - origin_[0], dy = p[1] - origin_[1];
- moved |= dx | dy;
- origin_ = p;
- d3_eventCancel();
- event_({
- type: "drag",
- x: p[0] + offset[0],
- y: p[1] + offset[1],
- dx: dx,
- dy: dy
- });
- }
- function dragend() {
- event_({
- type: "dragend"
- });
- if (moved) {
- d3_eventCancel();
- if (d3.event.target === eventTarget) w.on("click.drag", click, true);
- }
- w.on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", null).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", null);
- }
- function click() {
- d3_eventCancel();
- w.on("click.drag", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, touchId = d3.event.touches && d3.event.changedTouches[0].identifier, offset, origin_ = point(), moved = 0;
- var w = d3.select(window).on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", dragmove).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", dragend, true);
- if (origin) {
- offset = origin.apply(target, arguments);
- offset = [ offset.x - origin_[0], offset.y - origin_[1] ];
- } else {
- offset = [ 0, 0 ];
- }
- if (!touchId) d3_eventCancel();
- event_({
- type: "dragstart"
- });
- }
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null;
- drag.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return drag;
- };
- return d3.rebind(drag, event, "on");
- };
- d3.behavior.zoom = function() {
- function zoom() {
- this.on("mousedown.zoom", mousedown).on("mousewheel.zoom", mousewheel).on("mousemove.zoom", mousemove).on("DOMMouseScroll.zoom", mousewheel).on("dblclick.zoom", dblclick).on("touchstart.zoom", touchstart).on("touchmove.zoom", touchmove).on("touchend.zoom", touchstart);
- }
- function location(p) {
- return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ];
- }
- function point(l) {
- return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ];
- }
- function scaleTo(s) {
- scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
- }
- function translateTo(p, l) {
- l = point(l);
- translate[0] += p[0] - l[0];
- translate[1] += p[1] - l[1];
- }
- function dispatch(event) {
- if (x1) x1.domain(x0.range().map(function(x) {
- return (x - translate[0]) / scale;
- }).map(x0.invert));
- if (y1) y1.domain(y0.range().map(function(y) {
- return (y - translate[1]) / scale;
- }).map(y0.invert));
- d3.event.preventDefault();
- event({
- type: "zoom",
- scale: scale,
- translate: translate
- });
- }
- function mousedown() {
- function mousemove() {
- moved = 1;
- translateTo(d3.mouse(target), l);
- dispatch(event_);
- }
- function mouseup() {
- if (moved) d3_eventCancel();
- w.on("mousemove.zoom", null).on("mouseup.zoom", null);
- if (moved && d3.event.target === eventTarget) w.on("click.zoom", click, true);
- }
- function click() {
- d3_eventCancel();
- w.on("click.zoom", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, moved = 0, w = d3.select(window).on("mousemove.zoom", mousemove).on("mouseup.zoom", mouseup), l = location(d3.mouse(target));
- window.focus();
- d3_eventCancel();
- }
- function mousewheel() {
- if (!translate0) translate0 = location(d3.mouse(this));
- scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);
- translateTo(d3.mouse(this), translate0);
- dispatch(event.of(this, arguments));
- }
- function mousemove() {
- translate0 = null;
- }
- function dblclick() {
- var p = d3.mouse(this), l = location(p);
- scaleTo(d3.event.shiftKey ? scale / 2 : scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- function touchstart() {
- var touches = d3.touches(this), now = Date.now();
- scale0 = scale;
- translate0 = {};
- touches.forEach(function(t) {
- translate0[t.identifier] = location(t);
- });
- d3_eventCancel();
- if (touches.length === 1) {
- if (now - touchtime < 500) {
- var p = touches[0], l = location(touches[0]);
- scaleTo(scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- touchtime = now;
- }
- }
- function touchmove() {
- var touches = d3.touches(this), p0 = touches[0], l0 = translate0[p0.identifier];
- if (p1 = touches[1]) {
- var p1, l1 = translate0[p1.identifier];
- p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
- l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
- scaleTo(d3.event.scale * scale0);
- }
- translateTo(p0, l0);
- touchtime = null;
- dispatch(event.of(this, arguments));
- }
- var translate = [ 0, 0 ], translate0, scale = 1, scale0, scaleExtent = d3_behavior_zoomInfinity, event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
- zoom.translate = function(x) {
- if (!arguments.length) return translate;
- translate = x.map(Number);
- return zoom;
- };
- zoom.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return zoom;
- };
- zoom.scaleExtent = function(x) {
- if (!arguments.length) return scaleExtent;
- scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);
- return zoom;
- };
- zoom.x = function(z) {
- if (!arguments.length) return x1;
- x1 = z;
- x0 = z.copy();
- return zoom;
- };
- zoom.y = function(z) {
- if (!arguments.length) return y1;
- y1 = z;
- y0 = z.copy();
- return zoom;
- };
- return d3.rebind(zoom, event, "on");
- };
- var d3_behavior_zoomDiv, d3_behavior_zoomInfinity = [ 0, Infinity ];
- d3.layout = {};
- d3.layout.bundle = function() {
- return function(links) {
- var paths = [], i = -1, n = links.length;
- while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
- return paths;
- };
- };
- d3.layout.chord = function() {
- function relayout() {
- var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
- chords = [];
- groups = [];
- k = 0, i = -1;
- while (++i < n) {
- x = 0, j = -1;
- while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
- k = (2 * Math.PI - padding * n) / k;
- x = 0, i = -1;
- while (++i < n) {
- x0 = x, j = -1;
- while (++j < n) {
- var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: a0,
- endAngle: a1,
- value: v
- };
- }
- groups[di] = {
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- };
- x += padding;
- }
- i = -1;
- while (++i < n) {
- j = i - 1;
- while (++j < n) {
- var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push(source.value < target.value ? {
- source: target,
- target: source
- } : {
- source: source,
- target: target
- });
- }
- }
- }
- if (sortChords) resort();
- }
- function resort() {
- chords.sort(function(a, b) {
- return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
- });
- }
- var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
- return chord;
- };
- d3.layout.force = function() {
- function repulse(node) {
- return function(quad, x1, y1, x2, y2) {
- if (quad.point !== node) {
- var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
- if ((x2 - x1) * dn < theta) {
- var k = quad.charge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- return true;
- }
- if (quad.point && isFinite(dn)) {
- var k = quad.pointCharge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- }
- }
- return !quad.charge;
- };
- }
- function dragmove(d) {
- d.px = d3.event.x;
- d.py = d3.event.y;
- force.resume();
- }
- var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, interval, nodes = [], links = [], distances, strengths, charges;
- force.tick = function() {
- if ((alpha *= .99) < .005) {
- event.end({
- type: "end",
- alpha: alpha = 0
- });
- return true;
- }
- var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
- for (i = 0; i < m; ++i) {
- o = links[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = x * x + y * y) {
- l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
- x *= l;
- y *= l;
- t.x -= x * (k = s.weight / (t.weight + s.weight));
- t.y -= y * k;
- s.x += x * (k = 1 - k);
- s.y += y * k;
- }
- }
- if (k = alpha * gravity) {
- x = size[0] / 2;
- y = size[1] / 2;
- i = -1;
- if (k) while (++i < n) {
- o = nodes[i];
- o.x += (x - o.x) * k;
- o.y += (y - o.y) * k;
- }
- }
- if (charge) {
- d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
- i = -1;
- while (++i < n) {
- if (!(o = nodes[i]).fixed) {
- q.visit(repulse(o));
- }
- }
- }
- i = -1;
- while (++i < n) {
- o = nodes[i];
- if (o.fixed) {
- o.x = o.px;
- o.y = o.py;
- } else {
- o.x -= (o.px - (o.px = o.x)) * friction;
- o.y -= (o.py - (o.py = o.y)) * friction;
- }
- }
- event.tick({
- type: "tick",
- alpha: alpha
- });
- };
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
- force.linkDistance = function(x) {
- if (!arguments.length) return linkDistance;
- linkDistance = d3_functor(x);
- return force;
- };
- force.distance = force.linkDistance;
- force.linkStrength = function(x) {
- if (!arguments.length) return linkStrength;
- linkStrength = d3_functor(x);
- return force;
- };
- force.friction = function(x) {
- if (!arguments.length) return friction;
- friction = x;
- return force;
- };
- force.charge = function(x) {
- if (!arguments.length) return charge;
- charge = typeof x === "function" ? x : +x;
- return force;
- };
- force.gravity = function(x) {
- if (!arguments.length) return gravity;
- gravity = x;
- return force;
- };
- force.theta = function(x) {
- if (!arguments.length) return theta;
- theta = x;
- return force;
- };
- force.alpha = function(x) {
- if (!arguments.length) return alpha;
- if (alpha) {
- if (x > 0) alpha = x; else alpha = 0;
- } else if (x > 0) {
- event.start({
- type: "start",
- alpha: alpha = x
- });
- d3.timer(force.tick);
- }
- return force;
- };
- force.start = function() {
- function position(dimension, size) {
- var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
- while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
- return Math.random() * size;
- }
- function neighbor() {
- if (!neighbors) {
- neighbors = [];
- for (j = 0; j < n; ++j) {
- neighbors[j] = [];
- }
- for (j = 0; j < m; ++j) {
- var o = links[j];
- neighbors[o.source.index].push(o.target);
- neighbors[o.target.index].push(o.source);
- }
- }
- return neighbors[i];
- }
- var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
- for (i = 0; i < n; ++i) {
- (o = nodes[i]).index = i;
- o.weight = 0;
- }
- distances = [];
- strengths = [];
- for (i = 0; i < m; ++i) {
- o = links[i];
- if (typeof o.source == "number") o.source = nodes[o.source];
- if (typeof o.target == "number") o.target = nodes[o.target];
- distances[i] = linkDistance.call(this, o, i);
- strengths[i] = linkStrength.call(this, o, i);
- ++o.source.weight;
- ++o.target.weight;
- }
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- if (isNaN(o.x)) o.x = position("x", w);
- if (isNaN(o.y)) o.y = position("y", h);
- if (isNaN(o.px)) o.px = o.x;
- if (isNaN(o.py)) o.py = o.y;
- }
- charges = [];
- if (typeof charge === "function") {
- for (i = 0; i < n; ++i) {
- charges[i] = +charge.call(this, nodes[i], i);
- }
- } else {
- for (i = 0; i < n; ++i) {
- charges[i] = charge;
- }
- }
- return force.resume();
- };
- force.resume = function() {
- return force.alpha(.1);
- };
- force.stop = function() {
- return force.alpha(0);
- };
- force.drag = function() {
- if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart", d3_layout_forceDragstart).on("drag", dragmove).on("dragend", d3_layout_forceDragend);
- this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
- };
- return d3.rebind(force, event, "on");
- };
- d3.layout.partition = function() {
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children && (n = children.length)) {
- var i = -1, n, c, d;
- dx = node.value ? dx / node.value : 0;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
- function depth(node) {
- var children = node.children, d = 0;
- if (children && (n = children.length)) {
- var i = -1, n;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
- return d3_layout_hierarchyRebind(partition, hierarchy);
- };
- d3.layout.pie = function() {
- function pie(data, i) {
- var values = data.map(function(d, i) {
- return +value.call(pie, d, i);
- });
- var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle);
- var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - startAngle) / d3.sum(values);
- var index = d3.range(data.length);
- if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
- return values[j] - values[i];
- } : function(i, j) {
- return sort(data[i], data[j]);
- });
- var arcs = [];
- index.forEach(function(i) {
- var d;
- arcs[i] = {
- data: data[i],
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
- return arcs;
- }
- var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * Math.PI;
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
- return pie;
- };
- var d3_layout_pieSortByValue = {};
- d3.layout.stack = function() {
- function stack(data, index) {
- var series = data.map(function(d, i) {
- return values.call(stack, d, i);
- });
- var points = series.map(function(d, i) {
- return d.map(function(v, i) {
- return [ x.call(stack, v, i), y.call(stack, v, i) ];
- });
- });
- var orders = order.call(stack, points, index);
- series = d3.permute(series, orders);
- points = d3.permute(points, orders);
- var offsets = offset.call(stack, points, index);
- var n = series.length, m = series[0].length, i, j, o;
- for (j = 0; j < m; ++j) {
- out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
- for (i = 1; i < n; ++i) {
- out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
- }
- }
- return data;
- }
- var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
- stack.values = function(x) {
- if (!arguments.length) return values;
- values = x;
- return stack;
- };
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
- return stack;
- };
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
- return stack;
- };
- stack.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return stack;
- };
- stack.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return stack;
- };
- stack.out = function(z) {
- if (!arguments.length) return out;
- out = z;
- return stack;
- };
- return stack;
- };
- var d3_layout_stackOrders = d3.map({
- "inside-out": function(data) {
- var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
- return max[a] - max[b];
- }), top = 0, bottom = 0, tops = [], bottoms = [];
- for (i = 0; i < n; ++i) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
- reverse: function(data) {
- return d3.range(data.length).reverse();
- },
- "default": d3_layout_stackOrderDefault
- });
- var d3_layout_stackOffsets = d3.map({
- silhouette: function(data) {
- var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0; j < m; ++j) {
- y0[j] = (max - sums[j]) / 2;
- }
- return y0;
- },
- wiggle: function(data) {
- var n = data.length, x = data[0], m = x.length, max = 0, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
- y0[0] = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
- for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
- for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
- s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
- }
- s2 += s3 * data[i][j][1];
- }
- y0[j] = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) y0[j] -= o0;
- return y0;
- },
- expand: function(data) {
- var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- },
- zero: d3_layout_stackOffsetZero
- });
- d3.layout.histogram = function() {
- function histogram(data, i) {
- var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
- while (++i < m) {
- bin = bins[i] = [];
- bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
- bin.y = 0;
- }
- if (m > 0) {
- i = -1;
- while (++i < n) {
- x = values[i];
- if (x >= range[0] && x <= range[1]) {
- bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
- bin.y += k;
- bin.push(data[i]);
- }
- }
- }
- return bins;
- }
- var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
- histogram.value = function(x) {
- if (!arguments.length) return valuer;
- valuer = x;
- return histogram;
- };
- histogram.range = function(x) {
- if (!arguments.length) return ranger;
- ranger = d3_functor(x);
- return histogram;
- };
- histogram.bins = function(x) {
- if (!arguments.length) return binner;
- binner = typeof x === "number" ? function(range) {
- return d3_layout_histogramBinFixed(range, x);
- } : d3_functor(x);
- return histogram;
- };
- histogram.frequency = function(x) {
- if (!arguments.length) return frequency;
- frequency = !!x;
- return histogram;
- };
- return histogram;
- };
- d3.layout.hierarchy = function() {
- function recurse(data, depth, nodes) {
- var childs = children.call(hierarchy, data, depth), node = d3_layout_hierarchyInline ? data : {
- data: data
- };
- node.depth = depth;
- nodes.push(node);
- if (childs && (n = childs.length)) {
- var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d;
- while (++i < n) {
- d = recurse(childs[i], j, nodes);
- d.parent = node;
- c.push(d);
- v += d.value;
- }
- if (sort) c.sort(sort);
- if (value) node.value = v;
- } else if (value) {
- node.value = +value.call(hierarchy, data, depth) || 0;
- }
- return node;
- }
- function revalue(node, depth) {
- var children = node.children, v = 0;
- if (children && (n = children.length)) {
- var i = -1, n, j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else if (value) {
- v = +value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth) || 0;
- }
- if (value) node.value = v;
- return v;
- }
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
- var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
- return hierarchy;
- };
- var d3_layout_hierarchyInline = false;
- d3.layout.pack = function() {
- function pack(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- root.x = 0;
- root.y = 0;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r = Math.sqrt(d.value);
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- var w = size[0], h = size[1], k = Math.max(2 * root.r / w, 2 * root.r / h);
- if (padding > 0) {
- var dr = padding * k / 2;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r += dr;
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- d3_layout_treeVisitAfter(root, function(d) {
- d.r -= dr;
- });
- k = Math.max(2 * root.r / w, 2 * root.r / h);
- }
- d3_layout_packTransform(root, w / 2, h / 2, 1 / k);
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ];
- pack.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return pack;
- };
- pack.padding = function(_) {
- if (!arguments.length) return padding;
- padding = +_;
- return pack;
- };
- return d3_layout_hierarchyRebind(pack, hierarchy);
- };
- d3.layout.cluster = function() {
- function cluster(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0, kx, ky;
- d3_layout_treeVisitAfter(root, function(node) {
- var children = node.children;
- if (children && children.length) {
- node.x = d3_layout_clusterX(children);
- node.y = d3_layout_clusterY(children);
- } else {
- node.x = previousNode ? x += separation(node, previousNode) : 0;
- node.y = 0;
- previousNode = node;
- }
- });
- var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- cluster.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return cluster;
- };
- cluster.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return cluster;
- };
- return d3_layout_hierarchyRebind(cluster, hierarchy);
- };
- d3.layout.tree = function() {
- function tree(d, i) {
- function firstWalk(node, previousSibling) {
- var children = node.children, layout = node._tree;
- if (children && (n = children.length)) {
- var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
- while (++i < n) {
- child = children[i];
- firstWalk(child, previousChild);
- ancestor = apportion(child, previousChild, ancestor);
- previousChild = child;
- }
- d3_layout_treeShift(node);
- var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- layout.mod = layout.prelim - midpoint;
- } else {
- layout.prelim = midpoint;
- }
- } else {
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- }
- }
- }
- function secondWalk(node, x) {
- node.x = node._tree.prelim + x;
- var children = node.children;
- if (children && (n = children.length)) {
- var i = -1, n;
- x += node._tree.mod;
- while (++i < n) {
- secondWalk(children[i], x);
- }
- }
- }
- function apportion(node, previousSibling, ancestor) {
- if (previousSibling) {
- var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
- while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
- vom = d3_layout_treeLeft(vom);
- vop = d3_layout_treeRight(vop);
- vop._tree.ancestor = node;
- shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
- if (shift > 0) {
- d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
- sip += shift;
- sop += shift;
- }
- sim += vim._tree.mod;
- sip += vip._tree.mod;
- som += vom._tree.mod;
- sop += vop._tree.mod;
- }
- if (vim && !d3_layout_treeRight(vop)) {
- vop._tree.thread = vim;
- vop._tree.mod += sim - sop;
- }
- if (vip && !d3_layout_treeLeft(vom)) {
- vom._tree.thread = vip;
- vom._tree.mod += sip - som;
- ancestor = node;
- }
- }
- return ancestor;
- }
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- d3_layout_treeVisitAfter(root, function(node, previousSibling) {
- node._tree = {
- ancestor: node,
- prelim: 0,
- mod: 0,
- change: 0,
- shift: 0,
- number: previousSibling ? previousSibling._tree.number + 1 : 0
- };
- });
- firstWalk(root);
- secondWalk(root, -root._tree.prelim);
- var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = node.depth / y1 * size[1];
- delete node._tree;
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- tree.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return tree;
- };
- tree.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return tree;
- };
- return d3_layout_hierarchyRebind(tree, hierarchy);
- };
- d3.layout.treemap = function() {
- function scale(children, k) {
- var i = -1, n = children.length, child, area;
- while (++i < n) {
- area = (child = children[i]).value * (k < 0 ? 0 : k);
- child.area = isNaN(area) || area <= 0 ? 0 : area;
- }
- }
- function squarify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = Math.min(rect.dx, rect.dy), n;
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while ((n = remaining.length) > 0) {
- row.push(child = remaining[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) {
- remaining.pop();
- best = score;
- } else {
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- children.forEach(squarify);
- }
- }
- function stickify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), remaining = children.slice(), child, row = [];
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while (child = remaining.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
- row.length = row.area = 0;
- }
- }
- children.forEach(stickify);
- }
- }
- function worst(row, u) {
- var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
- while (++i < n) {
- if (!(r = row[i].area)) continue;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
- }
- function position(row, u, rect, flush) {
- var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
- if (u == rect.dx) {
- if (flush || v > rect.dy) v = rect.dy;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x;
- rect.y += v;
- rect.dy -= v;
- } else {
- if (flush || v > rect.dx) v = rect.dx;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y;
- rect.x += v;
- rect.dx -= v;
- }
- }
- function treemap(d) {
- var nodes = stickies || hierarchy(d), root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale([ root ], root.dx * root.dy / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, ratio = .5 * (1 + Math.sqrt(5));
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
- treemap.padding = function(x) {
- function padFunction(node) {
- var p = x.call(treemap, node, node.depth);
- return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
- }
- function padConstant(node) {
- return d3_layout_treemapPad(node, x);
- }
- if (!arguments.length) return padding;
- var type;
- pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], padConstant) : padConstant;
- return treemap;
- };
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
- treemap.ratio = function(x) {
- if (!arguments.length) return ratio;
- ratio = x;
- return treemap;
- };
- return d3_layout_hierarchyRebind(treemap, hierarchy);
- };
- d3.csv = d3_dsv(",", "text/csv");
- d3.tsv = d3_dsv(" ", "text/tab-separated-values");
- d3.geo = {};
- var d3_geo_radians = Math.PI / 180;
- d3.geo.azimuthal = function() {
- function azimuthal(coordinates) {
- var x1 = coordinates[0] * d3_geo_radians - x0, y1 = coordinates[1] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1), cy1 = Math.cos(y1), sy1 = Math.sin(y1), cc = mode !== "orthographic" ? sy0 * sy1 + cy0 * cy1 * cx1 : null, c, k = mode === "stereographic" ? 1 / (1 + cc) : mode === "gnomonic" ? 1 / cc : mode === "equidistant" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0) : mode === "equalarea" ? Math.sqrt(2 / (1 + cc)) : 1, x = k * cy1 * sx1, y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var mode = "orthographic", origin, scale = 200, translate = [ 480, 250 ], x0, y0, cy0, sy0;
- azimuthal.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p = Math.sqrt(x * x + y * y), c = mode === "stereographic" ? 2 * Math.atan(p) : mode === "gnomonic" ? Math.atan(p) : mode === "equidistant" ? p : mode === "equalarea" ? 2 * Math.asin(.5 * p) : Math.asin(p), sc = Math.sin(c), cc = Math.cos(c);
- return [ (x0 + Math.atan2(x * sc, p * cy0 * cc + y * sy0 * sc)) / d3_geo_radians, Math.asin(cc * sy0 - (p ? y * sc * cy0 / p : 0)) / d3_geo_radians ];
- };
- azimuthal.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return azimuthal;
- };
- azimuthal.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- x0 = origin[0] * d3_geo_radians;
- y0 = origin[1] * d3_geo_radians;
- cy0 = Math.cos(y0);
- sy0 = Math.sin(y0);
- return azimuthal;
- };
- azimuthal.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return azimuthal;
- };
- azimuthal.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return azimuthal;
- };
- return azimuthal.origin([ 0, 0 ]);
- };
- d3.geo.albers = function() {
- function albers(coordinates) {
- var t = n * (d3_geo_radians * coordinates[0] - lng0), p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;
- return [ scale * p * Math.sin(t) + translate[0], scale * (p * Math.cos(t) - p0) + translate[1] ];
- }
- function reload() {
- var phi1 = d3_geo_radians * parallels[0], phi2 = d3_geo_radians * parallels[1], lat0 = d3_geo_radians * origin[1], s = Math.sin(phi1), c = Math.cos(phi1);
- lng0 = d3_geo_radians * origin[0];
- n = .5 * (s + Math.sin(phi2));
- C = c * c + 2 * n * s;
- p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;
- return albers;
- }
- var origin = [ -98, 38 ], parallels = [ 29.5, 45.5 ], scale = 1e3, translate = [ 480, 250 ], lng0, n, C, p0;
- albers.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p0y = p0 + y, t = Math.atan2(x, p0y), p = Math.sqrt(x * x + p0y * p0y);
- return [ (lng0 + t / n) / d3_geo_radians, Math.asin((C - p * p * n * n) / (2 * n)) / d3_geo_radians ];
- };
- albers.origin = function(x) {
- if (!arguments.length) return origin;
- origin = [ +x[0], +x[1] ];
- return reload();
- };
- albers.parallels = function(x) {
- if (!arguments.length) return parallels;
- parallels = [ +x[0], +x[1] ];
- return reload();
- };
- albers.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return albers;
- };
- albers.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return albers;
- };
- return reload();
- };
- d3.geo.albersUsa = function() {
- function albersUsa(coordinates) {
- var lon = coordinates[0], lat = coordinates[1];
- return (lat > 50 ? alaska : lon < -140 ? hawaii : lat < 21 ? puertoRico : lower48)(coordinates);
- }
- var lower48 = d3.geo.albers();
- var alaska = d3.geo.albers().origin([ -160, 60 ]).parallels([ 55, 65 ]);
- var hawaii = d3.geo.albers().origin([ -160, 20 ]).parallels([ 8, 18 ]);
- var puertoRico = d3.geo.albers().origin([ -60, 10 ]).parallels([ 8, 18 ]);
- albersUsa.scale = function(x) {
- if (!arguments.length) return lower48.scale();
- lower48.scale(x);
- alaska.scale(x * .6);
- hawaii.scale(x);
- puertoRico.scale(x * 1.5);
- return albersUsa.translate(lower48.translate());
- };
- albersUsa.translate = function(x) {
- if (!arguments.length) return lower48.translate();
- var dz = lower48.scale() / 1e3, dx = x[0], dy = x[1];
- lower48.translate(x);
- alaska.translate([ dx - 400 * dz, dy + 170 * dz ]);
- hawaii.translate([ dx - 190 * dz, dy + 200 * dz ]);
- puertoRico.translate([ dx + 580 * dz, dy + 430 * dz ]);
- return albersUsa;
- };
- return albersUsa.scale(lower48.scale());
- };
- d3.geo.bonne = function() {
- function bonne(coordinates) {
- var x = coordinates[0] * d3_geo_radians - x0, y = coordinates[1] * d3_geo_radians - y0;
- if (y1) {
- var p = c1 + y1 - y, E = x * Math.cos(y) / p;
- x = p * Math.sin(E);
- y = p * Math.cos(E) - c1;
- } else {
- x *= Math.cos(y);
- y *= -1;
- }
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 200, translate = [ 480, 250 ], x0, y0, y1, c1;
- bonne.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- if (y1) {
- var c = c1 + y, p = Math.sqrt(x * x + c * c);
- y = c1 + y1 - p;
- x = x0 + p * Math.atan2(x, c) / Math.cos(y);
- } else {
- y *= -1;
- x /= Math.cos(y);
- }
- return [ x / d3_geo_radians, y / d3_geo_radians ];
- };
- bonne.parallel = function(x) {
- if (!arguments.length) return y1 / d3_geo_radians;
- c1 = 1 / Math.tan(y1 = x * d3_geo_radians);
- return bonne;
- };
- bonne.origin = function(x) {
- if (!arguments.length) return [ x0 / d3_geo_radians, y0 / d3_geo_radians ];
- x0 = x[0] * d3_geo_radians;
- y0 = x[1] * d3_geo_radians;
- return bonne;
- };
- bonne.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return bonne;
- };
- bonne.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return bonne;
- };
- return bonne.origin([ 0, 0 ]).parallel(45);
- };
- d3.geo.equirectangular = function() {
- function equirectangular(coordinates) {
- var x = coordinates[0] / 360, y = -coordinates[1] / 360;
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- equirectangular.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, -360 * y ];
- };
- equirectangular.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return equirectangular;
- };
- equirectangular.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return equirectangular;
- };
- return equirectangular;
- };
- d3.geo.mercator = function() {
- function mercator(coordinates) {
- var x = coordinates[0] / 360, y = -(Math.log(Math.tan(Math.PI / 4 + coordinates[1] * d3_geo_radians / 2)) / d3_geo_radians) / 360;
- return [ scale * x + translate[0], scale * Math.max(-.5, Math.min(.5, y)) + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- mercator.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, 2 * Math.atan(Math.exp(-360 * y * d3_geo_radians)) / d3_geo_radians - 90 ];
- };
- mercator.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return mercator;
- };
- mercator.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return mercator;
- };
- return mercator;
- };
- d3.geo.path = function() {
- function path(d, i) {
- if (typeof pointRadius === "function") pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
- pathType(d);
- var result = buffer.length ? buffer.join("") : null;
- buffer = [];
- return result;
- }
- function project(coordinates) {
- return projection(coordinates).join(",");
- }
- function polygonArea(coordinates) {
- var sum = area(coordinates[0]), i = 0, n = coordinates.length;
- while (++i < n) sum -= area(coordinates[i]);
- return sum;
- }
- function polygonCentroid(coordinates) {
- var polygon = d3.geom.polygon(coordinates[0].map(projection)), area = polygon.area(), centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1), x = centroid[0], y = centroid[1], z = area, i = 0, n = coordinates.length;
- while (++i < n) {
- polygon = d3.geom.polygon(coordinates[i].map(projection));
- area = polygon.area();
- centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1);
- x -= centroid[0];
- y -= centroid[1];
- z -= area;
- }
- return [ x, y, 6 * z ];
- }
- function area(coordinates) {
- return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());
- }
- var pointRadius = 4.5, pointCircle = d3_path_circle(pointRadius), projection = d3.geo.albersUsa(), buffer = [];
- var pathType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features, i = -1, n = features.length;
- while (++i < n) buffer.push(pathType(features[i].geometry));
- },
- Feature: function(o) {
- pathType(o.geometry);
- },
- Point: function(o) {
- buffer.push("M", project(o.coordinates), pointCircle);
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) buffer.push("M", project(coordinates[i]), pointCircle);
- },
- LineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- buffer.push("M");
- while (++i < n) buffer.push(project(coordinates[i]), "L");
- buffer.pop();
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer.pop();
- }
- },
- Polygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- if ((m = subcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m, subsubcoordinates, k, p;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- while (++j < m) {
- subsubcoordinates = subcoordinates[j];
- k = -1;
- if ((p = subsubcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++k < p) buffer.push(project(subsubcoordinates[k]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- }
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) buffer.push(pathType(geometries[i]));
- }
- });
- var areaType = path.area = d3_geo_type({
- FeatureCollection: function(o) {
- var area = 0, features = o.features, i = -1, n = features.length;
- while (++i < n) area += areaType(features[i]);
- return area;
- },
- Feature: function(o) {
- return areaType(o.geometry);
- },
- Polygon: function(o) {
- return polygonArea(o.coordinates);
- },
- MultiPolygon: function(o) {
- var sum = 0, coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) sum += polygonArea(coordinates[i]);
- return sum;
- },
- GeometryCollection: function(o) {
- var sum = 0, geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) sum += areaType(geometries[i]);
- return sum;
- }
- }, 0);
- var centroidType = path.centroid = d3_geo_type({
- Feature: function(o) {
- return centroidType(o.geometry);
- },
- Polygon: function(o) {
- var centroid = polygonCentroid(o.coordinates);
- return [ centroid[0] / centroid[2], centroid[1] / centroid[2] ];
- },
- MultiPolygon: function(o) {
- var area = 0, coordinates = o.coordinates, centroid, x = 0, y = 0, z = 0, i = -1, n = coordinates.length;
- while (++i < n) {
- centroid = polygonCentroid(coordinates[i]);
- x += centroid[0];
- y += centroid[1];
- z += centroid[2];
- }
- return [ x / z, y / z ];
- }
- });
- path.projection = function(x) {
- projection = x;
- return path;
- };
- path.pointRadius = function(x) {
- if (typeof x === "function") pointRadius = x; else {
- pointRadius = +x;
- pointCircle = d3_path_circle(pointRadius);
- }
- return path;
- };
- return path;
- };
- d3.geo.bounds = function(feature) {
- var left = Infinity, bottom = Infinity, right = -Infinity, top = -Infinity;
- d3_geo_bounds(feature, function(x, y) {
- if (x < left) left = x;
- if (x > right) right = x;
- if (y < bottom) bottom = y;
- if (y > top) top = y;
- });
- return [ [ left, bottom ], [ right, top ] ];
- };
- var d3_geo_boundsTypes = {
- Feature: d3_geo_boundsFeature,
- FeatureCollection: d3_geo_boundsFeatureCollection,
- GeometryCollection: d3_geo_boundsGeometryCollection,
- LineString: d3_geo_boundsLineString,
- MultiLineString: d3_geo_boundsMultiLineString,
- MultiPoint: d3_geo_boundsLineString,
- MultiPolygon: d3_geo_boundsMultiPolygon,
- Point: d3_geo_boundsPoint,
- Polygon: d3_geo_boundsPolygon
- };
- d3.geo.circle = function() {
- function circle() {}
- function visible(point) {
- return arc.distance(point) < radians;
- }
- function clip(coordinates) {
- var i = -1, n = coordinates.length, clipped = [], p0, p1, p2, d0, d1;
- while (++i < n) {
- d1 = arc.distance(p2 = coordinates[i]);
- if (d1 < radians) {
- if (p1) clipped.push(d3_geo_greatArcInterpolate(p1, p2)((d0 - radians) / (d0 - d1)));
- clipped.push(p2);
- p0 = p1 = null;
- } else {
- p1 = p2;
- if (!p0 && clipped.length) {
- clipped.push(d3_geo_greatArcInterpolate(clipped[clipped.length - 1], p1)((radians - d0) / (d1 - d0)));
- p0 = p1;
- }
- }
- d0 = d1;
- }
- p0 = coordinates[0];
- p1 = clipped[0];
- if (p1 && p2[0] === p0[0] && p2[1] === p0[1] && !(p2[0] === p1[0] && p2[1] === p1[1])) {
- clipped.push(p1);
- }
- return resample(clipped);
- }
- function resample(coordinates) {
- var i = 0, n = coordinates.length, j, m, resampled = n ? [ coordinates[0] ] : coordinates, resamples, origin = arc.source();
- while (++i < n) {
- resamples = arc.source(coordinates[i - 1])(coordinates[i]).coordinates;
- for (j = 0, m = resamples.length; ++j < m; ) resampled.push(resamples[j]);
- }
- arc.source(origin);
- return resampled;
- }
- var origin = [ 0, 0 ], degrees = 90 - .01, radians = degrees * d3_geo_radians, arc = d3.geo.greatArc().source(origin).target(d3_identity);
- circle.clip = function(d) {
- if (typeof origin === "function") arc.source(origin.apply(this, arguments));
- return clipType(d) || null;
- };
- var clipType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features.map(clipType).filter(d3_identity);
- return features && (o = Object.create(o), o.features = features, o);
- },
- Feature: function(o) {
- var geometry = clipType(o.geometry);
- return geometry && (o = Object.create(o), o.geometry = geometry, o);
- },
- Point: function(o) {
- return visible(o.coordinates) && o;
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates.filter(visible);
- return coordinates.length && {
- type: o.type,
- coordinates: coordinates
- };
- },
- LineString: function(o) {
- var coordinates = clip(o.coordinates);
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates.map(clip).filter(function(d) {
- return d.length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- Polygon: function(o) {
- var coordinates = o.coordinates.map(clip);
- return coordinates[0].length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates.map(function(d) {
- return d.map(clip);
- }).filter(function(d) {
- return d[0].length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries.map(clipType).filter(d3_identity);
- return geometries.length && (o = Object.create(o), o.geometries = geometries, o);
- }
- });
- circle.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- if (typeof origin !== "function") arc.source(origin);
- return circle;
- };
- circle.angle = function(x) {
- if (!arguments.length) return degrees;
- radians = (degrees = +x) * d3_geo_radians;
- return circle;
- };
- return d3.rebind(circle, arc, "precision");
- };
- d3.geo.greatArc = function() {
- function greatArc() {
- var d = greatArc.distance.apply(this, arguments), t = 0, dt = precision / d, coordinates = [ p0 ];
- while ((t += dt) < 1) coordinates.push(interpolate(t));
- coordinates.push(p1);
- return {
- type: "LineString",
- coordinates: coordinates
- };
- }
- var source = d3_geo_greatArcSource, p0, target = d3_geo_greatArcTarget, p1, precision = 6 * d3_geo_radians, interpolate = d3_geo_greatArcInterpolator();
- greatArc.distance = function() {
- if (typeof source === "function") interpolate.source(p0 = source.apply(this, arguments));
- if (typeof target === "function") interpolate.target(p1 = target.apply(this, arguments));
- return interpolate.distance();
- };
- greatArc.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- if (typeof source !== "function") interpolate.source(p0 = source);
- return greatArc;
- };
- greatArc.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- if (typeof target !== "function") interpolate.target(p1 = target);
- return greatArc;
- };
- greatArc.precision = function(_) {
- if (!arguments.length) return precision / d3_geo_radians;
- precision = _ * d3_geo_radians;
- return greatArc;
- };
- return greatArc;
- };
- d3.geo.greatCircle = d3.geo.circle;
- d3.geom = {};
- d3.geom.contour = function(grid, start) {
- var s = start || d3_geom_contourStart(grid), c = [], x = s[0], y = s[1], dx = 0, dy = 0, pdx = NaN, pdy = NaN, i = 0;
- do {
- i = 0;
- if (grid(x - 1, y - 1)) i += 1;
- if (grid(x, y - 1)) i += 2;
- if (grid(x - 1, y)) i += 4;
- if (grid(x, y)) i += 8;
- if (i === 6) {
- dx = pdy === -1 ? -1 : 1;
- dy = 0;
- } else if (i === 9) {
- dx = 0;
- dy = pdx === 1 ? -1 : 1;
- } else {
- dx = d3_geom_contourDx[i];
- dy = d3_geom_contourDy[i];
- }
- if (dx != pdx && dy != pdy) {
- c.push([ x, y ]);
- pdx = dx;
- pdy = dy;
- }
- x += dx;
- y += dy;
- } while (s[0] != x || s[1] != y);
- return c;
- };
- var d3_geom_contourDx = [ 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 0, 0, -1, 0, -1, NaN ], d3_geom_contourDy = [ 0, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 1, 0, -1, 0, NaN ];
- d3.geom.hull = function(vertices) {
- if (vertices.length < 3) return [];
- var len = vertices.length, plen = len - 1, points = [], stack = [], i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
- for (i = 1; i < len; ++i) {
- if (vertices[i][1] < vertices[h][1]) {
- h = i;
- } else if (vertices[i][1] == vertices[h][1]) {
- h = vertices[i][0] < vertices[h][0] ? i : h;
- }
- }
- for (i = 0; i < len; ++i) {
- if (i === h) continue;
- y1 = vertices[i][1] - vertices[h][1];
- x1 = vertices[i][0] - vertices[h][0];
- points.push({
- angle: Math.atan2(y1, x1),
- index: i
- });
- }
- points.sort(function(a, b) {
- return a.angle - b.angle;
- });
- a = points[0].angle;
- v = points[0].index;
- u = 0;
- for (i = 1; i < plen; ++i) {
- j = points[i].index;
- if (a == points[i].angle) {
- x1 = vertices[v][0] - vertices[h][0];
- y1 = vertices[v][1] - vertices[h][1];
- x2 = vertices[j][0] - vertices[h][0];
- y2 = vertices[j][1] - vertices[h][1];
- if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
- points[i].index = -1;
- } else {
- points[u].index = -1;
- a = points[i].angle;
- u = i;
- v = j;
- }
- } else {
- a = points[i].angle;
- u = i;
- v = j;
- }
- }
- stack.push(h);
- for (i = 0, j = 0; i < 2; ++j) {
- if (points[j].index !== -1) {
- stack.push(points[j].index);
- i++;
- }
- }
- sp = stack.length;
- for (; j < plen; ++j) {
- if (points[j].index === -1) continue;
- while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
- --sp;
- }
- stack[sp++] = points[j].index;
- }
- var poly = [];
- for (i = 0; i < sp; ++i) {
- poly.push(vertices[stack[i]]);
- }
- return poly;
- };
- d3.geom.polygon = function(coordinates) {
- coordinates.area = function() {
- var i = 0, n = coordinates.length, a = coordinates[n - 1][0] * coordinates[0][1], b = coordinates[n - 1][1] * coordinates[0][0];
- while (++i < n) {
- a += coordinates[i - 1][0] * coordinates[i][1];
- b += coordinates[i - 1][1] * coordinates[i][0];
- }
- return (b - a) * .5;
- };
- coordinates.centroid = function(k) {
- var i = -1, n = coordinates.length, x = 0, y = 0, a, b = coordinates[n - 1], c;
- if (!arguments.length) k = -1 / (6 * coordinates.area());
- while (++i < n) {
- a = b;
- b = coordinates[i];
- c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
- return [ x * k, y * k ];
- };
- coordinates.clip = function(subject) {
- var input, i = -1, n = coordinates.length, j, m, a = coordinates[n - 1], b, c, d;
- while (++i < n) {
- input = subject.slice();
- subject.length = 0;
- b = coordinates[i];
- c = input[(m = input.length) - 1];
- j = -1;
- while (++j < m) {
- d = input[j];
- if (d3_geom_polygonInside(d, a, b)) {
- if (!d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- subject.push(d);
- } else if (d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- c = d;
- }
- a = b;
- }
- return subject;
- };
- return coordinates;
- };
- d3.geom.voronoi = function(vertices) {
- var polygons = vertices.map(function() {
- return [];
- });
- d3_voronoi_tessellate(vertices, function(e) {
- var s1, s2, x1, x2, y1, y2;
- if (e.a === 1 && e.b >= 0) {
- s1 = e.ep.r;
- s2 = e.ep.l;
- } else {
- s1 = e.ep.l;
- s2 = e.ep.r;
- }
- if (e.a === 1) {
- y1 = s1 ? s1.y : -1e6;
- x1 = e.c - e.b * y1;
- y2 = s2 ? s2.y : 1e6;
- x2 = e.c - e.b * y2;
- } else {
- x1 = s1 ? s1.x : -1e6;
- y1 = e.c - e.a * x1;
- x2 = s2 ? s2.x : 1e6;
- y2 = e.c - e.a * x2;
- }
- var v1 = [ x1, y1 ], v2 = [ x2, y2 ];
- polygons[e.region.l.index].push(v1, v2);
- polygons[e.region.r.index].push(v1, v2);
- });
- return polygons.map(function(polygon, i) {
- var cx = vertices[i][0], cy = vertices[i][1];
- polygon.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- return polygon.sort(function(a, b) {
- return a.angle - b.angle;
- }).filter(function(d, i) {
- return !i || d.angle - polygon[i - 1].angle > 1e-10;
- });
- });
- };
- var d3_voronoi_opposite = {
- l: "r",
- r: "l"
- };
- d3.geom.delaunay = function(vertices) {
- var edges = vertices.map(function() {
- return [];
- }), triangles = [];
- d3_voronoi_tessellate(vertices, function(e) {
- edges[e.region.l.index].push(vertices[e.region.r.index]);
- });
- edges.forEach(function(edge, i) {
- var v = vertices[i], cx = v[0], cy = v[1];
- edge.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- edge.sort(function(a, b) {
- return a.angle - b.angle;
- });
- for (var j = 0, m = edge.length - 1; j < m; j++) {
- triangles.push([ v, edge[j], edge[j + 1] ]);
- }
- });
- return triangles;
- };
- d3.geom.quadtree = function(points, x1, y1, x2, y2) {
- function insert(n, p, x1, y1, x2, y2) {
- if (isNaN(p.x) || isNaN(p.y)) return;
- if (n.leaf) {
- var v = n.point;
- if (v) {
- if (Math.abs(v.x - p.x) + Math.abs(v.y - p.y) < .01) {
- insertChild(n, p, x1, y1, x2, y2);
- } else {
- n.point = null;
- insertChild(n, v, x1, y1, x2, y2);
- insertChild(n, p, x1, y1, x2, y2);
- }
- } else {
- n.point = p;
- }
- } else {
- insertChild(n, p, x1, y1, x2, y2);
- }
- }
- function insertChild(n, p, x1, y1, x2, y2) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = p.x >= sx, bottom = p.y >= sy, i = (bottom << 1) + right;
- n.leaf = false;
- n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
- if (right) x1 = sx; else x2 = sx;
- if (bottom) y1 = sy; else y2 = sy;
- insert(n, p, x1, y1, x2, y2);
- }
- var p, i = -1, n = points.length;
- if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);
- if (arguments.length < 5) {
- if (arguments.length === 3) {
- y2 = x2 = y1;
- y1 = x1;
- } else {
- x1 = y1 = Infinity;
- x2 = y2 = -Infinity;
- while (++i < n) {
- p = points[i];
- if (p.x < x1) x1 = p.x;
- if (p.y < y1) y1 = p.y;
- if (p.x > x2) x2 = p.x;
- if (p.y > y2) y2 = p.y;
- }
- var dx = x2 - x1, dy = y2 - y1;
- if (dx > dy) y2 = y1 + dx; else x2 = x1 + dy;
- }
- }
- var root = d3_geom_quadtreeNode();
- root.add = function(p) {
- insert(root, p, x1, y1, x2, y2);
- };
- root.visit = function(f) {
- d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
- };
- points.forEach(root.add);
- return root;
- };
- d3.time = {};
- var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
- d3_time_utc.prototype = {
- getDate: function() {
- return this._.getUTCDate();
- },
- getDay: function() {
- return this._.getUTCDay();
- },
- getFullYear: function() {
- return this._.getUTCFullYear();
- },
- getHours: function() {
- return this._.getUTCHours();
- },
- getMilliseconds: function() {
- return this._.getUTCMilliseconds();
- },
- getMinutes: function() {
- return this._.getUTCMinutes();
- },
- getMonth: function() {
- return this._.getUTCMonth();
- },
- getSeconds: function() {
- return this._.getUTCSeconds();
- },
- getTime: function() {
- return this._.getTime();
- },
- getTimezoneOffset: function() {
- return 0;
- },
- valueOf: function() {
- return this._.valueOf();
- },
- setDate: function() {
- d3_time_prototype.setUTCDate.apply(this._, arguments);
- },
- setDay: function() {
- d3_time_prototype.setUTCDay.apply(this._, arguments);
- },
- setFullYear: function() {
- d3_time_prototype.setUTCFullYear.apply(this._, arguments);
- },
- setHours: function() {
- d3_time_prototype.setUTCHours.apply(this._, arguments);
- },
- setMilliseconds: function() {
- d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
- },
- setMinutes: function() {
- d3_time_prototype.setUTCMinutes.apply(this._, arguments);
- },
- setMonth: function() {
- d3_time_prototype.setUTCMonth.apply(this._, arguments);
- },
- setSeconds: function() {
- d3_time_prototype.setUTCSeconds.apply(this._, arguments);
- },
- setTime: function() {
- d3_time_prototype.setTime.apply(this._, arguments);
- }
- };
- var d3_time_prototype = Date.prototype;
- var d3_time_formatDateTime = "%a %b %e %H:%M:%S %Y", d3_time_formatDate = "%m/%d/%y", d3_time_formatTime = "%H:%M:%S";
- var d3_time_days = d3_time_daySymbols, d3_time_dayAbbreviations = d3_time_days.map(d3_time_formatAbbreviate), d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = d3_time_months.map(d3_time_formatAbbreviate);
- d3.time.format = function(template) {
- function format(date) {
- var string = [], i = -1, j = 0, c, f;
- while (++i < n) {
- if (template.charCodeAt(i) == 37) {
- string.push(template.substring(j, i), (f = d3_time_formats[c = template.charAt(++i)]) ? f(date) : c);
- j = i + 1;
- }
- }
- string.push(template.substring(j, i));
- return string.join("");
- }
- var n = template.length;
- format.parse = function(string) {
- var d = {
- y: 1900,
- m: 0,
- d: 1,
- H: 0,
- M: 0,
- S: 0,
- L: 0
- }, i = d3_time_parse(d, template, string, 0);
- if (i != string.length) return null;
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
- var date = new d3_time;
- date.setFullYear(d.y, d.m, d.d);
- date.setHours(d.H, d.M, d.S, d.L);
- return date;
- };
- format.toString = function() {
- return template;
- };
- return format;
- };
- var d3_time_zfill2 = d3.format("02d"), d3_time_zfill3 = d3.format("03d"), d3_time_zfill4 = d3.format("04d"), d3_time_sfill2 = d3.format("2d");
- var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations);
- var d3_time_formats = {
- a: function(d) {
- return d3_time_dayAbbreviations[d.getDay()];
- },
- A: function(d) {
- return d3_time_days[d.getDay()];
- },
- b: function(d) {
- return d3_time_monthAbbreviations[d.getMonth()];
- },
- B: function(d) {
- return d3_time_months[d.getMonth()];
- },
- c: d3.time.format(d3_time_formatDateTime),
- d: function(d) {
- return d3_time_zfill2(d.getDate());
- },
- e: function(d) {
- return d3_time_sfill2(d.getDate());
- },
- H: function(d) {
- return d3_time_zfill2(d.getHours());
- },
- I: function(d) {
- return d3_time_zfill2(d.getHours() % 12 || 12);
- },
- j: function(d) {
- return d3_time_zfill3(1 + d3.time.dayOfYear(d));
- },
- L: function(d) {
- return d3_time_zfill3(d.getMilliseconds());
- },
- m: function(d) {
- return d3_time_zfill2(d.getMonth() + 1);
- },
- M: function(d) {
- return d3_time_zfill2(d.getMinutes());
- },
- p: function(d) {
- return d.getHours() >= 12 ? "PM" : "AM";
- },
- S: function(d) {
- return d3_time_zfill2(d.getSeconds());
- },
- U: function(d) {
- return d3_time_zfill2(d3.time.sundayOfYear(d));
- },
- w: function(d) {
- return d.getDay();
- },
- W: function(d) {
- return d3_time_zfill2(d3.time.mondayOfYear(d));
- },
- x: d3.time.format(d3_time_formatDate),
- X: d3.time.format(d3_time_formatTime),
- y: function(d) {
- return d3_time_zfill2(d.getFullYear() % 100);
- },
- Y: function(d) {
- return d3_time_zfill4(d.getFullYear() % 1e4);
- },
- Z: d3_time_zone,
- "%": function(d) {
- return "%";
- }
- };
- var d3_time_parsers = {
- a: d3_time_parseWeekdayAbbrev,
- A: d3_time_parseWeekday,
- b: d3_time_parseMonthAbbrev,
- B: d3_time_parseMonth,
- c: d3_time_parseLocaleFull,
- d: d3_time_parseDay,
- e: d3_time_parseDay,
- H: d3_time_parseHour24,
- I: d3_time_parseHour24,
- L: d3_time_parseMilliseconds,
- m: d3_time_parseMonthNumber,
- M: d3_time_parseMinutes,
- p: d3_time_parseAmPm,
- S: d3_time_parseSeconds,
- x: d3_time_parseLocaleDate,
- X: d3_time_parseLocaleTime,
- y: d3_time_parseYear,
- Y: d3_time_parseFullYear
- };
- var d3_time_numberRe = /^\s*\d+/;
- var d3_time_amPmLookup = d3.map({
- am: 0,
- pm: 1
- });
- d3.time.format.utc = function(template) {
- function format(date) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time;
- utc._ = date;
- return local(utc);
- } finally {
- d3_time = Date;
- }
- }
- var local = d3.time.format(template);
- format.parse = function(string) {
- try {
- d3_time = d3_time_utc;
- var date = local.parse(string);
- return date && date._;
- } finally {
- d3_time = Date;
- }
- };
- format.toString = local.toString;
- return format;
- };
- var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
- d3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;
- d3_time_formatIsoNative.parse = function(string) {
- var date = new Date(string);
- return isNaN(date) ? null : date;
- };
- d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
- d3.time.second = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 1e3) * 1e3);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 1e3);
- }, function(date) {
- return date.getSeconds();
- });
- d3.time.seconds = d3.time.second.range;
- d3.time.seconds.utc = d3.time.second.utc.range;
- d3.time.minute = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 6e4) * 6e4);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 6e4);
- }, function(date) {
- return date.getMinutes();
- });
- d3.time.minutes = d3.time.minute.range;
- d3.time.minutes.utc = d3.time.minute.utc.range;
- d3.time.hour = d3_time_interval(function(date) {
- var timezone = date.getTimezoneOffset() / 60;
- return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 36e5);
- }, function(date) {
- return date.getHours();
- });
- d3.time.hours = d3.time.hour.range;
- d3.time.hours.utc = d3.time.hour.utc.range;
- d3.time.day = d3_time_interval(function(date) {
- var day = new d3_time(1970, 0);
- day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- return day;
- }, function(date, offset) {
- date.setDate(date.getDate() + offset);
- }, function(date) {
- return date.getDate() - 1;
- });
- d3.time.days = d3.time.day.range;
- d3.time.days.utc = d3.time.day.utc.range;
- d3.time.dayOfYear = function(date) {
- var year = d3.time.year(date);
- return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
- };
- d3_time_daySymbols.forEach(function(day, i) {
- day = day.toLowerCase();
- i = 7 - i;
- var interval = d3.time[day] = d3_time_interval(function(date) {
- (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
- return date;
- }, function(date, offset) {
- date.setDate(date.getDate() + Math.floor(offset) * 7);
- }, function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
- });
- d3.time[day + "s"] = interval.range;
- d3.time[day + "s"].utc = interval.utc.range;
- d3.time[day + "OfYear"] = function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);
- };
- });
- d3.time.week = d3.time.sunday;
- d3.time.weeks = d3.time.sunday.range;
- d3.time.weeks.utc = d3.time.sunday.utc.range;
- d3.time.weekOfYear = d3.time.sundayOfYear;
- d3.time.month = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setDate(1);
- return date;
- }, function(date, offset) {
- date.setMonth(date.getMonth() + offset);
- }, function(date) {
- return date.getMonth();
- });
- d3.time.months = d3.time.month.range;
- d3.time.months.utc = d3.time.month.utc.range;
- d3.time.year = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setMonth(0, 1);
- return date;
- }, function(date, offset) {
- date.setFullYear(date.getFullYear() + offset);
- }, function(date) {
- return date.getFullYear();
- });
- d3.time.years = d3.time.year.range;
- d3.time.years.utc = d3.time.year.utc.range;
- var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
- var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ];
- var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), function(d) {
- return true;
- } ], [ d3.time.format("%B"), function(d) {
- return d.getMonth();
- } ], [ d3.time.format("%b %d"), function(d) {
- return d.getDate() != 1;
- } ], [ d3.time.format("%a %d"), function(d) {
- return d.getDay() && d.getDate() != 1;
- } ], [ d3.time.format("%I %p"), function(d) {
- return d.getHours();
- } ], [ d3.time.format("%I:%M"), function(d) {
- return d.getMinutes();
- } ], [ d3.time.format(":%S"), function(d) {
- return d.getSeconds();
- } ], [ d3.time.format(".%L"), function(d) {
- return d.getMilliseconds();
- } ] ];
- var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
- d3_time_scaleLocalMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
- };
- d3.time.scale = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
- };
- var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
- return [ m[0].utc, m[1] ];
- });
- var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), function(d) {
- return true;
- } ], [ d3.time.format.utc("%B"), function(d) {
- return d.getUTCMonth();
- } ], [ d3.time.format.utc("%b %d"), function(d) {
- return d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%a %d"), function(d) {
- return d.getUTCDay() && d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%I %p"), function(d) {
- return d.getUTCHours();
- } ], [ d3.time.format.utc("%I:%M"), function(d) {
- return d.getUTCMinutes();
- } ], [ d3.time.format.utc(":%S"), function(d) {
- return d.getUTCSeconds();
- } ], [ d3.time.format.utc(".%L"), function(d) {
- return d.getUTCMilliseconds();
- } ] ];
- var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
- d3_time_scaleUTCMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);
- };
- d3.time.scale.utc = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
- };
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.min.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.min.js
deleted file mode 100644
index cc47f1ea..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){function e(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function t(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function n(e){return Array.prototype.slice.call(e)}function r(){}function i(e){return e}function s(){return this}function o(){return!0}function u(e){return typeof e=="function"?e:function(){return e}}function a(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function f(e){return e!=null&&!isNaN(e)}function l(e){return e.length}function c(e){return e==null}function h(e){return e.trim().replace(/\s+/g," ")}function p(e){var t=1;while(e*t%1)t*=10;return t}function d(){}function v(e){function t(){var t=n,r=-1,i=t.length,s;while(++r<i)(s=t[r].on)&&s.apply(this,arguments);return e}var n=[],i=new r;return t.on=function(t,r){var s=i.get(t),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)},t}function m(e,t){return t-(e?1+Math.floor(Math.log(e+Math.pow(10,1+Math.floor(Math.log(e)/Math.LN10)-t))/Math.LN10):1)}function g(e){return e+""}function y(e){var t=e.lastIndexOf("."),n=t>=0?e.substring(t):(t=e.length,""),r=[];while(t>0)r.push(e.substring(t-=3,t+3));return r.reverse().join(",")+n}function b(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function w(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function E(e){return function(t){return 1-e(1-t)}}function S(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function x(e){return e}function T(e){return function(t){return Math.pow(t,e)}}function N(e){return 1-Math.cos(e*Math.PI/2)}function C(e){return Math.pow(2,10*(e-1))}function k(e){return 1-Math.sqrt(1-e*e)}function L(e,t){var n;return arguments.length<2&&(t=.45),arguments.length<1?(e=1,n=t/4):n=t/(2*Math.PI)*Math.asin(1/e),function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*Math.PI/t)}}function A(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function O(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function M(){d3.event.stopPropagation(),d3.event.preventDefault()}function _(){var e=d3.event,t;while(t=e.sourceEvent)e=t;return e}function D(e){var t=new d,n=0,r=arguments.length;while(++n<r)t[arguments[n]]=v(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=d3.event;i.target=e,d3.event=i,t[i.type].apply(n,r)}finally{d3.event=s}}},t}function P(e){var t=[e.a,e.b],n=[e.c,e.d],r=B(t),i=H(t,n),s=B(j(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*fs,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*fs:0}function H(e,t){return e[0]*t[0]+e[1]*t[1]}function B(e){var t=Math.sqrt(H(e,e));return t&&(e[0]/=t,e[1]/=t),t}function j(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function F(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function I(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function q(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function R(e,t,n){return new U(e,t,n)}function U(e,t,n){this.r=e,this.g=t,this.b=n}function z(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function W(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(J(u[0]),J(u[1]),J(u[2]))}}return(a=hs.get(e))?t(a.r,a.g,a.b):(e!=null&&e.charAt(0)==="#"&&(e.length===4?(r=e.charAt(1),r+=r,i=e.charAt(2),i+=i,s=e.charAt(3),s+=s):e.length===7&&(r=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7)),r=parseInt(r,16),i=parseInt(i,16),s=parseInt(s,16)),t(r,i,s))}function X(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;return s?(u=a<.5?s/(i+r):s/(2-i-r),e==i?o=(t-n)/s+(t<n?6:0):t==i?o=(n-e)/s+2:o=(e-t)/s+4,o*=60):u=o=0,K(o,u,a)}function V(e,t,n){e=$(e),t=$(t),n=$(n);var r=ot((.4124564*e+.3575761*t+.1804375*n)/ds),i=ot((.2126729*e+.7151522*t+.072175*n)/vs),s=ot((.0193339*e+.119192*t+.9503041*n)/ms);return tt(116*i-16,500*(r-i),200*(i-s))}function $(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function J(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function K(e,t,n){return new Q(e,t,n)}function Q(e,t,n){this.h=e,this.s=t,this.l=n}function G(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?s+(o-s)*e/60:e<180?o:e<240?s+(o-s)*(240-e)/60:s}function i(e){return Math.round(r(e)*255)}var s,o;return e%=360,e<0&&(e+=360),t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o,R(i(e+120),i(e),i(e-120))}function Y(e,t,n){return new Z(e,t,n)}function Z(e,t,n){this.h=e,this.c=t,this.l=n}function et(e,t,n){return tt(n,Math.cos(e*=Math.PI/180)*t,Math.sin(e)*t)}function tt(e,t,n){return new nt(e,t,n)}function nt(e,t,n){this.l=e,this.a=t,this.b=n}function rt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=st(i)*ds,r=st(r)*vs,s=st(s)*ms,R(ut(3.2404542*i-1.5371385*r-.4985314*s),ut(-0.969266*i+1.8760108*r+.041556*s),ut(.0556434*i-.2040259*r+1.0572252*s))}function it(e,t,n){return Y(Math.atan2(n,t)/Math.PI*180,Math.sqrt(t*t+n*n),e)}function st(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ut(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e){return Ki(e,Ss),e}function ft(e){return function(){return gs(e,this)}}function lt(e){return function(){return ys(e,this)}}function ct(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=d3.ns.qualify(e),t==null?e.local?r:n:typeof t=="function"?e.local?u:o:e.local?s:i}function ht(e){return new RegExp("(?:^|\\s+)"+d3.requote(e)+"(?:\\s+|$)","g")}function pt(e,t){function n(){var n=-1;while(++n<i)e[n](this,t)}function r(){var n=-1,r=t.apply(this,arguments);while(++n<i)e[n](this,r)}e=e.trim().split(/\s+/).map(dt);var i=e.length;return typeof t=="function"?r:n}function dt(e){var t=ht(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.className,s=i.baseVal!=null,o=s?i.baseVal:i;r?(t.lastIndex=0,t.test(o)||(o=h(o+" "+e),s?i.baseVal=o:n.className=o)):o&&(o=h(o.replace(t," ")),s?i.baseVal=o:n.className=o)}}function vt(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return t==null?r:typeof t=="function"?s:i}function mt(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}return t==null?n:typeof t=="function"?i:r}function gt(e){return{__data__:e}}function yt(e){return function(){return Es(this,e)}}function bt(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function wt(e,t,n){function r(){var t=this[s];t&&(this.removeEventListener(e,t,t.$),delete this[s])}function i(){function i(e){var n=d3.event;d3.event=e,u[0]=o.__data__;try{t.apply(o,u)}finally{d3.event=n}}var o=this,u=arguments;r.call(this),this.addEventListener(e,this[s]=i,i.$=n),i._=t}var s="__on"+e,o=e.indexOf(".");return o>0&&(e=e.substring(0,o)),t?i:r}function Et(e,t){for(var n=0,r=e.length;n<r;n++)for(var i=e[n],s=0,o=i.length,u;s<o;s++)(u=i[s])&&t(u,s,n);return e}function St(e){return Ki(e,Ts),e}function xt(e,t,n){Ki(e,Ns);var i=new r,s=d3.dispatch("start","end"),o=Ds;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?i.get(t):(n==null?i.remove(t):i.set(t,n),e)},e.ease=function(t){return arguments.length?(o=typeof t=="function"?t:d3.ease.apply(d3,arguments),e):o},e.each=function(t,n){return arguments.length<2?Tt.call(e,t):(s.on(t,n),e)},d3.timer(function(r){return Et(e,function(e,u,a){function f(r){return v.active>t?c():(v.active=t,i.forEach(function(t,n){(n=n.call(e,m,u))&&h.push(n)}),s.start.call(e,m,u),l(r)||d3.timer(l,0,n),1)}function l(n){if(v.active!==t)return c();var r=(n-p)/d,i=o(r),a=h.length;while(a>0)h[--a].call(e,i);if(r>=1)return c(),ks=t,s.end.call(e,m,u),ks=0,1}function c(){return--v.count||delete e.__transition__,1}var h=[],p=e.delay,d=e.duration,v=(e=e.node).__transition__||(e.__transition__={active:0,count:0}),m=e.__data__;++v.count,p<=r?f(r):d3.timer(f,p,n)})},0,n),e}function Tt(e){var t=ks,n=Ds,r=Ms,i=_s;return ks=this.id,Ds=this.ease(),Et(this,function(t,n,r){Ms=t.delay,_s=t.duration,e.call(t=t.node,t.__data__,n,r)}),ks=t,Ds=n,Ms=r,_s=i,this}function Nt(e,t,n){return n!=""&&Ps}function Ct(e,t){return d3.tween(e,F(t))}function kt(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,e>=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=Lt()-t;r>24?(isFinite(r)&&(clearTimeout(js),js=setTimeout(kt,r)),Bs=0):(Bs=1,Fs(kt))}function Lt(){var e=null,t=Hs,n=Infinity;while(t)t.flush?t=e?e.next=t.next:Hs=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function At(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Is<0&&(window.scrollX||window.scrollY)){n=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=n[0][0].getScreenCTM();Is=!i.f&&!i.e,n.remove()}return Is?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Ot(){}function Mt(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function _t(e){return e.rangeExtent?e.rangeExtent():Mt(e.range())}function Dt(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;s<i&&(o=n,n=r,r=o,o=i,i=s,s=o);if(t=t(s-i))e[n]=t.floor(i),e[r]=t.ceil(s);return e}function Pt(){return Math}function Ht(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Ut:Rt,a=r?q:I;return o=i(e,t,a,n),u=i(t,e,a,d3.interpolate),s}function s(e){return o(e)}var o,u;return s.invert=function(e){return u(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},s.range=function(e){return arguments.length?(t=e,i()):t},s.rangeRound=function(e){return s.range(e).interpolate(d3.interpolateRound)},s.clamp=function(e){return arguments.length?(r=e,i()):r},s.interpolate=function(e){return arguments.length?(n=e,i()):n},s.ticks=function(t){return It(e,t)},s.tickFormat=function(t){return qt(e,t)},s.nice=function(){return Dt(e,jt),i()},s.copy=function(){return Ht(e,t,n,r)},i()}function Bt(e,t){return d3.rebind(e,t,"range","rangeRound","interpolate","clamp")}function jt(e){return e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1),e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Ft(e,t){var n=Mt(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function It(e,t){return d3.range.apply(d3,Ft(e,t))}function qt(e,t){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Ft(e,t)[2])/Math.LN10+.01))+"f")}function Rt(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Ut(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());while(++o<=u)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=d3.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function zt(e,t){function n(n){return e(t(n))}var r=t.pow;return n.invert=function(t){return r(e.invert(t))},n.domain=function(i){return arguments.length?(t=i[0]<0?Xt:Wt,r=t.pow,e.domain(i.map(t)),n):e.domain().map(r)},n.nice=function(){return e.domain(Dt(e.domain(),Pt)),n},n.ticks=function(){var n=Mt(e.domain()),i=[];if(n.every(isFinite)){var s=Math.floor(n[0]),o=Math.ceil(n[1]),u=r(n[0]),a=r(n[1]);if(t===Xt){i.push(r(s));for(;s++<o;)for(var f=9;f>0;f--)i.push(r(s)*f)}else{for(;s<o;s++)for(var f=1;f<10;f++)i.push(r(s)*f);i.push(r(s))}for(s=0;i[s]<u;s++);for(o=i.length;i[o-1]>a;o--);i=i.slice(s,o)}return i},n.tickFormat=function(e,i){arguments.length<2&&(i=qs);if(arguments.length<1)return i;var s=Math.max(.1,e/n.ticks().length),o=t===Xt?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil),u;return function(e){return e/r(o(t(e)+u))<=s?i(e):""}},n.copy=function(){return zt(e.copy(),t)},Bt(n,e)}function Wt(e){return Math.log(e<0?0:e)/Math.LN10}function Xt(e){return-Math.log(e>0?0:-e)/Math.LN10}function Vt(e,t){function n(t){return e(r(t))}var r=$t(t),i=$t(1/t);return n.invert=function(t){return i(e.invert(t))},n.domain=function(t){return arguments.length?(e.domain(t.map(r)),n):e.domain().map(i)},n.ticks=function(e){return It(n.domain(),e)},n.tickFormat=function(e){return qt(n.domain(),e)},n.nice=function(){return n.domain(Dt(n.domain(),jt))},n.exponent=function(e){if(!arguments.length)return t;var s=n.domain();return r=$t(t=e),i=$t(1/t),n.domain(s)},n.copy=function(){return Vt(e.copy(),t)},Bt(n,e)}function $t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Jt(e,t){function n(t){return o[((s.get(t)||s.set(t,e.push(t)))-1)%o.length]}function i(t,n){return d3.range(e.length).map(function(e){return t+n*e})}var s,o,u;return n.domain=function(i){if(!arguments.length)return e;e=[],s=new r;var o=-1,u=i.length,a;while(++o<u)s.has(a=i[o])||s.set(a,e.push(a));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,u=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var a=r[0],f=r[1],l=(f-a)/(Math.max(1,e.length-1)+s);return o=i(e.length<2?(a+f)/2:a+l*s/2,l),u=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=(c-l)/(e.length-s+2*a);return o=i(l+h*a,h),f&&o.reverse(),u=h*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=Math.floor((c-l)/(e.length-s+2*a)),p=c-l-(e.length-s)*h;return o=i(l+Math.round(p/2),h),f&&o.reverse(),u=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return u},n.rangeExtent=function(){return Mt(t.a[0])},n.copy=function(){return Jt(e,t)},n.domain(e)}function Kt(e,t){function n(){var n=0,s=e.length,o=t.length;i=[];while(++n<o)i[n-1]=d3.quantile(e,n/o);return r}function r(e){return isNaN(e=+e)?NaN:t[d3.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(d3.ascending),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.copy=function(){return Kt(e,t)},n()}function Qt(e,t,n){function r(t){return n[Math.max(0,Math.min(o,Math.floor(s*(t-e))))]}function i(){return s=n.length/(t-e),o=n.length-1,r}var s,o;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.copy=function(){return Qt(e,t,n)},i()}function Gt(e,t){function n(n){return t[d3.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Gt(e,t)},n}function Yt(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return It(e,t)},t.tickFormat=function(t){return qt(e,t)},t.copy=function(){return Yt(e)},t}function Zt(e){return e.innerRadius}function en(e){return e.outerRadius}function tn(e){return e.startAngle}function nn(e){return e.endAngle}function rn(e){function t(t){function o(){a.push("M",s(e(l),f))}var a=[],l=[],c=-1,h=t.length,p,d=u(n),v=u(r);while(++c<h)i.call(this,p=t[c],c)?l.push([+d.call(this,p,c),+v.call(this,p,c)]):l.length&&(o(),l=[]);return l.length&&o(),a.length?a.join(""):null}var n=sn,r=on,i=o,s=un,a=s.key,f=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(typeof e=="function"?a=s=e:a=(s=$s.get(e)||un).key,t):a},t.tension=function(e){return arguments.length?(f=e,t):f},t}function sn(e){return e[0]}function on(e){return e[1]}function un(e){return e.join("L")}function an(e){return un(e)+"Z"}function fn(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ln(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function cn(e,t){return e.length<4?un(e):e[1]+dn(e.slice(1,e.length-1),vn(e,t))}function hn(e,t){return e.length<3?un(e):e[0]+dn((e.push(e[0]),e),vn([e[e.length-2]].concat(e,[e[1]]),t))}function pn(e,t,n){return e.length<3?un(e):e[0]+dn(e,vn(e,t))}function dn(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return un(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;n&&(r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1],i=e[1],a=2);if(t.length>1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function vn(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a)i=s,s=o,o=e[u],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function mn(e){if(e.length<3)return un(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];En(a,o,u);while(++t<n)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);t=-1;while(++t<2)o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);return a.join("")}function gn(e){if(e.length<4)return un(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3)i=e[n],s.push(i[0]),o.push(i[1]);t.push(wn(Qs,s)+","+wn(Qs,o)),--n;while(++n<r)i=e[n],s.shift(),s.push(i[0]),o.shift(),o.push(i[1]),En(t,s,o);return t.join("")}function yn(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4)s=e[n%r],o.push(s[0]),u.push(s[1]);t=[wn(Qs,o),",",wn(Qs,u)],--n;while(++n<i)s=e[n%r],o.shift(),o.push(s[0]),u.shift(),u.push(s[1]),En(t,o,u);return t.join("")}function bn(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n)a=e[u],f=u/n,a[0]=t*a[0]+(1-t)*(r+f*s),a[1]=t*a[1]+(1-t)*(i+f*o)}return mn(e)}function wn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function En(e,t,n){e.push("C",wn(Js,t),",",wn(Js,n),",",wn(Ks,t),",",wn(Ks,n),",",wn(Qs,t),",",wn(Qs,n))}function Sn(e,t){return(t[1]-e[1])/(t[0]-e[0])}function xn(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Sn(i,s);while(++t<n)r[t]=(o+(o=Sn(i=s,s=e[t+1])))/2;return r[t]=o,r}function Tn(e){var t=[],n,r,i,s,o=xn(e),u=-1,a=e.length-1;while(++u<a)n=Sn(e[u],e[u+1]),Math.abs(n)<1e-6?o[u]=o[u+1]=0:(r=o[u]/n,i=o[u+1]/n,s=r*r+i*i,s>9&&(s=n*3/Math.sqrt(s),o[u]=s*r,o[u+1]=s*i));u=-1;while(++u<=a)s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),t.push([s||0,o[u]*s||0]);return t}function Nn(e){return e.length<3?un(e):e[0]+dn(e,Tn(e))}function Cn(e){var t,n=-1,r=e.length,i,s;while(++n<r)t=e[n],i=t[0],s=t[1]+Xs,t[0]=i*Math.cos(s),t[1]=i*Math.sin(s);return e}function kn(e){function t(t){function o(){l.push("M",f(e(v),p),h,c(e(d.reverse()),p),"Z")}var l=[],d=[],v=[],m=-1,g=t.length,y,b=u(n),w=u(i),E=n===r?function(){return x}:u(r),S=i===s?function(){return T}:u(s),x,T;while(++m<g)a.call(this,y=t[m],m)?(d.push([x=+b.call(this,y,m),T=+w.call(this,y,m)]),v.push([+E.call(this,y,m),+S.call(this,y,m)])):d.length&&(o(),d=[],v=[]);return d.length&&o(),l.length?l.join(""):null}var n=sn,r=sn,i=0,s=on,a=o,f=un,l=f.key,c=f,h="L",p=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=s=e,t):s},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(s=e,t):s},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(typeof e=="function"?l=f=e:l=(f=$s.get(e)||un).key,c=f.reverse||f,h=f.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(p=e,t):p},t}function Ln(e){return e.source}function An(e){return e.target}function On(e){return e.radius}function Mn(e){return e.startAngle}function _n(e){return e.endAngle}function Dn(e){return[e.x,e.y]}function Pn(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Xs;return[n*Math.cos(r),n*Math.sin(r)]}}function Hn(){return 64}function Bn(){return"circle"}function jn(e){var t=Math.sqrt(e/Math.PI);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Fn(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function In(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function qn(e,t,n){i=[];if(n&&t.length>1){var r=Mt(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o)for(a=n;--a>0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];)i.push(f)}return i}function Rn(){no||(no=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var e=d3.event,t;try{no.scrollTop=1e3,no.dispatchEvent(e),t=1e3-no.scrollTop}catch(n){t=e.wheelDelta||-e.detail*5}return t}function Un(e){var t=e.source,n=e.target,r=Wn(t,n),i=[t];while(t!==r)t=t.parent,i.push(t);var s=i.length;while(n!==r)i.splice(s,0,n),n=n.parent;return i}function zn(e){var t=[],n=e.parent;while(n!=null)t.push(e),e=n,n=n.parent;return t.push(e),t}function Wn(e,t){if(e===t)return e;var n=zn(e),r=zn(t),i=n.pop(),s=r.pop(),o=null;while(i===s)o=i,i=n.pop(),s=r.pop();return o}function Xn(e){e.fixed|=2}function Vn(e){e.fixed&=1}function $n(e){e.fixed|=4}function Jn(e){e.fixed&=3}function Kn(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Kn(a,t,n),e.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy}}if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Qn(e){return 20}function Gn(e){return 1}function Yn(e){return e.x}function Zn(e){return e.y}function er(e,t,n){e.y0=t,e.y=n}function tr(e){return d3.range(e.length)}function nr(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function rr(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t)(i=e[t][1])>r&&(n=t,r=i);return n}function ir(e){return e.reduce(sr,0)}function sr(e,t){return e+t[1]}function or(e,t){return ur(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ur(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function ar(e){return[d3.min(e),d3.max(e)]}function fr(e,t){return d3.rebind(e,t,"sort","children","value"),e.links=pr,e.nodes=function(t){return uo=!0,(e.nodes=e)(t)},e}function lr(e){return e.children}function cr(e){return e.value}function hr(e,t){return t.value-e.value}function pr(e){return d3.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function dr(e,t){return e.value-t.value}function vr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function mr(e,t){e._pack_next=t,t._pack_prev=e}function gr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function yr(e){function t(e){r=Math.min(e.x-e.r,r),i=Math.max(e.x+e.r,i),s=Math.min(e.y-e.r,s),o=Math.max(e.y+e.r,o)}if(!(n=e.children)||!(p=n.length))return;var n,r=Infinity,i=-Infinity,s=Infinity,o=-Infinity,u,a,f,l,c,h,p;n.forEach(br),u=n[0],u.x=-u.r,u.y=0,t(u);if(p>1){a=n[1],a.x=a.r,a.y=0,t(a);if(p>2){f=n[2],Sr(u,a,f),t(f),vr(u,f),u._pack_prev=f,vr(f,a),a=u._pack_next;for(l=3;l<p;l++){Sr(u,a,f=n[l]);var d=0,v=1,m=1;for(c=a._pack_next;c!==a;c=c._pack_next,v++)if(gr(c,f)){d=1;break}if(d==1)for(h=u._pack_prev;h!==c._pack_prev;h=h._pack_prev,m++)if(gr(h,f))break;d?(v<m||v==m&&a.r<u.r?mr(u,a=c):mr(u=h,a),l--):(vr(u,f),a=f,t(f))}}}var g=(r+i)/2,y=(s+o)/2,b=0;for(l=0;l<p;l++)f=n[l],f.x-=g,f.y-=y,b=Math.max(b,f.r+Math.sqrt(f.x*f.x+f.y*f.y));e.r=b,n.forEach(wr)}function br(e){e._pack_next=e._pack_prev=e}function wr(e){delete e._pack_next,delete e._pack_prev}function Er(e,t,n,r){var i=e.children;e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)Er(i[s],t,n,r)}}function Sr(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function xr(e){return 1+d3.max(e,function(e){return e.y})}function Tr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Nr(e){var t=e.children;return t&&t.length?Nr(t[0]):e}function Cr(e){var t=e.children,n;return t&&(n=t.length)?Cr(t[n-1]):e}function kr(e,t){return e.parent==t.parent?1:2}function Lr(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ar(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Or(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i)t(r=Or(n[s],t),e)>0&&(e=r)}return e}function Mr(e,t){return e.x-t.x}function _r(e,t){return t.x-e.x}function Dr(e,t){return e.depth-t.depth}function Pr(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a)s=i[u],n(s,o),o=s}t(e,r)}n(e,null)}function Hr(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0)s=r[i]._tree,s.prelim+=t,s.mod+=t,t+=s.shift+(n+=s.change)}function Br(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function jr(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function Fr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Ir(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function qr(e,t){function n(e,r){d3.text(e,t,function(e){r(e&&n.parse(e))})}function r(t){return t.map(i).join(e)}function i(e){return o.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp("\r\n|["+e+"\r\n]","g"),o=new RegExp('["'+e+"\n]"),u=e.charCodeAt(0);return n.parse=function(e){var t;return n.parseRows(e,function(e,n){if(n){var r={},i=-1,s=t.length;while(++i<s)r[t[i]]=e[i];return r}return t=e,null})},n.parseRows=function(e,t){function n(){if(s.lastIndex>=e.length)return i;if(l)return l=!1,r;var t=s.lastIndex;if(e.charCodeAt(t)===34){var n=t;while(n++<e.length)if(e.charCodeAt(n)===34){if(e.charCodeAt(n+1)!==34)break;n++}s.lastIndex=n+2;var o=e.charCodeAt(n+1);return o===13?(l=!0,e.charCodeAt(n+2)===10&&s.lastIndex++):o===10&&(l=!0),e.substring(t+1,n).replace(/""/g,'"')}var a=s.exec(e);return a?(l=a[0].charCodeAt(0)!==u,e.substring(t,a.index)):(s.lastIndex=e.length,e.substring(t))}var r={},i={},o=[],a=0,f,l;s.lastIndex=0;while((f=n())!==i){var c=[];while(f!==r&&f!==i)c.push(f),f=n();if(t&&!(c=t(c,a++)))continue;o.push(c)}return o},n.format=function(e){return e.map(r).join("\n")},n}function Rr(e,t){return function(n){return n&&e.hasOwnProperty(n.type)?e[n.type](n):t}}function Ur(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function zr(e,t){fo.hasOwnProperty(e.type)&&fo[e.type](e,t)}function Wr(e,t){zr(e.geometry,t)}function Xr(e,t){for(var n=e.features,r=0,i=n.length;r<i;r++)zr(n[r].geometry,t)}function Vr(e,t){for(var n=e.geometries,r=0,i=n.length;r<i;r++)zr(n[r],t)}function $r(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Jr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Kr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r][0],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Qr(e,t){t.apply(null,e.coordinates)}function Gr(e,t){for(var n=e.coordinates[0],r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Yr(e){return e.source}function Zr(e){return e.target}function ei(){function e(e){var t=Math.sin(e*=p)*d,n=Math.sin(p-e)*d,r=n*s+t*c,u=n*o+t*h,a=n*i+t*l;return[Math.atan2(u,r)/ao,Math.atan2(a,Math.sqrt(r*r+u*u))/ao]}var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return e.distance=function(){return p==null&&(d=1/Math.sin(p=Math.acos(Math.max(-1,Math.min(1,i*l+r*f*Math.cos(u-t)))))),p},e.source=function(u){var a=Math.cos(t=u[0]*ao),f=Math.sin(t);return r=Math.cos(n=u[1]*ao),i=Math.sin(n),s=r*a,o=r*f,p=null,e},e.target=function(t){var n=Math.cos(u=t[0]*ao),r=Math.sin(u);return f=Math.cos(a=t[1]*ao),l=Math.sin(a),c=f*n,h=f*r,p=null,e},e}function ti(e,t){var n=ei().source(e).target(t);return n.distance(),n}function ni(e){var t=0,n=0;for(;;){if(e(t,n))return[t,n];t===0?(t=n+1,n=0):(t-=1,n+=1)}}function ri(e,t,n,r){var i,s,o,u,a,f,l;return i=r[e],s=i[0],o=i[1],i=r[t],u=i[0],a=i[1],i=r[n],f=i[0],l=i[1],(l-o)*(u-s)-(a-o)*(f-s)>0}function ii(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function si(e,t,n,r){var i=e[0],s=t[0],o=n[0],u=r[0],a=e[1],f=t[1],l=n[1],c=r[1],h=i-o,p=s-i,d=u-o,v=a-l,m=f-a,g=c-l,y=(d*v-g*h)/(g*p-d*m);return[i+y*p,a+y*m]}function oi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=r.leftEnd;do t=t.r;while(t!=r.rightEnd&&i.rightOf(t,e));return t=t.l,t},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[ho[e.side]]}},i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;return n.c=e.x*r+e.y*i+(r*r+i*i)*.5,s>o?(n.a=1,n.b=i/r,n.c/=r):(n.b=1,n.a=r/i,n.c/=i),n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r)return null;var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10)return null;var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;u.y<a.y||u.y==a.y&&u.x<a.x?(f=e,l=n):(f=t,l=r);var c=s>=l.region.r.x;return c&&f.side==="l"||!c&&f.side==="r"?null:{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l")return 1;if(!i&&e.side==="r")return 0;if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;!i&&n.b<0||i&&n.b>=0?a=u=s>=n.b*o:(a=t.x+t.y*n.b>n.c,n.b<0&&(a=!a),a||(u=1));if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b),n.b<0&&(a=!a)}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[ho[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}},s={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x)continue;break}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init(),n.bottomSite=n.list.shift();var o=n.list.shift(),u,a,f,l,c,h,p,d,v,m,g,y,b;for(;;){s.empty()||(u=s.min());if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x))a=r.leftBound(o),f=r.right(a),p=r.rightRegion(a),y=i.bisect(p,o),h=r.createHalfEdge(y,"l"),r.insert(a,h),m=i.intersect(a,h),m&&(s.del(a),s.insert(a,m,i.distance(m,o))),a=h,h=r.createHalfEdge(y,"r"
-),r.insert(a,h),m=i.intersect(h,f),m&&s.insert(h,m,i.distance(m,o)),o=n.list.shift();else{if(!!s.empty())break;a=s.extractMin(),l=r.left(a),f=r.right(a),c=r.right(f),p=r.leftRegion(a),d=r.rightRegion(f),g=a.vertex,i.endPoint(a.edge,a.side,g),i.endPoint(f.edge,f.side,g),r.del(a),s.del(f),r.del(f),b="l",p.y>d.y&&(v=p,p=d,d=v,b="r"),y=i.bisect(p,d),h=r.createHalfEdge(y,b),r.insert(l,h),i.endPoint(y,ho[b],g),m=i.intersect(l,h),m&&(s.del(l),s.insert(l,m,i.distance(m,p))),m=i.intersect(h,c),m&&s.insert(h,m,i.distance(m,p))}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a))t(a.edge)}function ui(){return{leaf:!0,nodes:[],point:null}}function ai(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;a[0]&&ai(e,a[0],n,r,o,u),a[1]&&ai(e,a[1],o,r,i,u),a[2]&&ai(e,a[2],n,u,o,s),a[3]&&ai(e,a[3],o,u,i,s)}}function fi(e){return{x:e[0],y:e[1]}}function li(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ci(e){return e.substring(0,3)}function hi(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i==37){s=Ho[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function pi(e){return new RegExp("^(?:"+e.map(d3.requote).join("|")+")","i")}function di(e){var t=new r,n=-1,i=e.length;while(++n<i)t.set(e[n].toLowerCase(),n);return t}function vi(e,t,n){Ao.lastIndex=0;var r=Ao.exec(t.substring(n));return r?n+=r[0].length:-1}function mi(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n));return r?n+=r[0].length:-1}function gi(e,t,n){_o.lastIndex=0;var r=_o.exec(t.substring(n));return r?(e.m=Do.get(r[0].toLowerCase()),n+=r[0].length):-1}function yi(e,t,n){Oo.lastIndex=0;var r=Oo.exec(t.substring(n));return r?(e.m=Mo.get(r[0].toLowerCase()),n+=r[0].length):-1}function bi(e,t,n){return hi(e,Po.c.toString(),t,n)}function wi(e,t,n){return hi(e,Po.x.toString(),t,n)}function Ei(e,t,n){return hi(e,Po.X.toString(),t,n)}function Si(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function xi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.y=Ti(+r[0]),n+=r[0].length):-1}function Ti(e){return e+(e>68?1900:2e3)}function Ni(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function Ci(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function ki(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function Li(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function Ai(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function Oi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function Mi(e,t,n){var r=jo.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function _i(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+To(r)+To(i)}function Di(e){return e.toISOString()}function Pi(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new po(n-1)),1),n}function s(e,n){return t(e=new po(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)while(o<r)n(o)%s||u.push(new Date(+o)),t(o,1);else while(o<r)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{po=li;var r=new li;return r._=e,o(r,t,n)}finally{po=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Hi(e);return a.floor=a,a.round=Hi(r),a.ceil=Hi(i),a.offset=Hi(s),a.range=u,e}function Hi(e){return function(t,n){try{po=li;var r=new li;return r._=t,e(r,n)._}finally{po=Date}}}function Bi(e,t,n){function r(t){return e(t)}return r.invert=function(t){return Fi(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Fi)},r.nice=function(e){return r.domain(Dt(r.domain(),function(){return e}))},r.ticks=function(n,i){var s=ji(r.domain());if(typeof n!="function"){var o=s[1]-s[0],u=o/n,a=d3.bisect(Io,u);if(a==Io.length)return t.year(s,n);if(!a)return e.ticks(n).map(Fi);Math.log(u/Io[a-1])<Math.log(Io[a]/u)&&--a,n=t[a],i=n[1],n=n[0].range}return n(s[0],new Date(+s[1]+1),i)},r.tickFormat=function(){return n},r.copy=function(){return Bi(e.copy(),t,n)},d3.rebind(r,e,"range","rangeRound","interpolate","clamp")}function ji(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Fi(e){return new Date(e)}function Ii(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function qi(e){var t=new Date(e,0,1);return t.setFullYear(e),t}function Ri(e){var t=e.getFullYear(),n=qi(t),r=qi(t+1);return t+(e-n)/(r-n)}function Ui(e){var t=new Date(Date.UTC(e,0,1));return t.setUTCFullYear(e),t}function zi(e){var t=e.getUTCFullYear(),n=Ui(t),r=Ui(t+1);return t+(e-n)/(r-n)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Wi){var Xi=CSSStyleDeclaration.prototype,Vi=Xi.setProperty;Xi.setProperty=function(e,t,n){Vi.call(this,e,t+"",n)}}d3={version:"2.10.2"};var $i=n;try{$i(document.documentElement.childNodes)[0].nodeType}catch(Ji){$i=t}var Ki=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};d3.map=function(e){var t=new r;for(var n in e)t.set(n,e[n]);return t},e(r,{has:function(e){return Qi+e in this},get:function(e){return this[Qi+e]},set:function(e,t){return this[Qi+e]=t},remove:function(e){return e=Qi+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===Gi&&e.call(this,t.substring(1),this[t])}});var Qi="\0",Gi=Qi.charCodeAt(0);d3.functor=u,d3.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=a(e,t,t[i]);return e},d3.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},d3.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},d3.mean=function(e,t){var n=e.length,r,i=0,s=-1,o=0;if(arguments.length===1)while(++s<n)f(r=e[s])&&(i+=(r-i)/++o);else while(++s<n)f(r=t.call(e,e[s],s))&&(i+=(r-i)/++o);return o?i:undefined},d3.median=function(e,t){return arguments.length>1&&(e=e.map(t)),e=e.filter(f),e.length?d3.quantile(e.sort(d3.ascending),.5):undefined},d3.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&i>s&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&i>s&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&s>i&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&s>i&&(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)(s=e[n])!=null&&(i>s&&(i=s),o<s&&(o=s))}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&(i>s&&(i=s),o<s&&(o=s))}return[i,o]},d3.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=Math.random()*2-1,r=Math.random()*2-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(e,t){var n=arguments.length;n<2&&(t=1),n<1&&(e=0);var r=d3.random.normal();return function(){return Math.exp(e+t*r())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s<r)isNaN(i=+e[s])||(n+=i);else while(++s<r)isNaN(i=+t.call(e,e[s],s))||(n+=i);return n},d3.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=e[r-1],s=n-r;return s?i+s*(e[r]-i):i},d3.transpose=function(e){return d3.zip.apply(d3,e)},d3.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=d3.min(arguments,l),n=new Array(t);++e<t;)for(var r=-1,i,s=n[e]=new Array(i);++r<i;)s[r]=arguments[r][e];return n},d3.bisector=function(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var Yi=d3.bisector(function(e){return e});d3.bisectLeft=Yi.left,d3.bisect=d3.bisectRight=Yi.right,d3.first=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])>0&&(i=s);return i},d3.last=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])<=0&&(i=s);return i},d3.nest=function(){function e(t,s){if(s>=i.length)return u?u.call(n,t):o?t.sort(o):t;var a=-1,f=t.length,l=i[s++],c,h,p=new r,d,v={};while(++a<f)(d=p.get(c=l(h=t[a])))?d.push(h):p.set(c,[h]);return p.forEach(function(t,n){v[t]=e(n,s)}),v}function t(e,n){if(n>=i.length)return e;var r=[],o=s[n++],u;for(u in e)r.push({key:u,values:t(e[u],n)});return o&&r.sort(function(e,t){return o(e.key,t.key)}),r}var n={},i=[],s=[],o,u;return n.map=function(t){return e(t,0)},n.entries=function(n){return t(e(n,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return s[i.length-1]=e,n},n.sortValues=function(e){return o=e,n},n.rollup=function(e){return u=e,n},n},d3.keys=function(e){var t=[];for(var n in e)t.push(n);return t},d3.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d3.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},d3.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n},d3.merge=function(e){return Array.prototype.concat.apply([],e)},d3.split=function(e,t){var n=[],r=[],i,s=-1,o=e.length;arguments.length<2&&(t=c);while(++s<o)t.call(r,i=e[s],s)?r=[]:(r.length||n.push(r),r.push(i));return n},d3.range=function(e,t,n){arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0));if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=p(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r},d3.requote=function(e){return e.replace(Zi,"\\$&")};var Zi=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},d3.xhr=function(e,t,n){var r=new XMLHttpRequest;arguments.length<3?(n=t,t=null):t&&r.overrideMimeType&&r.overrideMimeType(t),r.open("GET",e,!0),t&&r.setRequestHeader("Accept",t),r.onreadystatechange=function(){if(r.readyState===4){var e=r.status;n(!e&&r.response||e>=200&&e<300||e===304?r:null)}},r.send(null)},d3.text=function(e,t,n){function r(e){n(e&&e.responseText)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)},d3.json=function(e,t){d3.text(e,"application/json",function(e){t(e?JSON.parse(e):null)})},d3.html=function(e,t){d3.text(e,"text/html",function(e){if(e!=null){var n=document.createRange();n.selectNode(document.body),e=n.createContextualFragment(e)}t(e)})},d3.xml=function(e,t,n){function r(e){n(e&&e.responseXML)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)};var es={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:es,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),es.hasOwnProperty(n)?{space:es[n],local:e}:e}},d3.dispatch=function(){var e=new d,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=v(e);return e},d.prototype.on=function(e,t){var n=e.indexOf("."),r="";return n>0&&(r=e.substring(n+1),e=e.substring(0,n)),arguments.length<2?this[e].on(r):this[e].on(r,t)},d3.format=function(e){var t=ts.exec(e),n=t[1]||" ",r=t[3]||"",i=t[5],s=+t[6],o=t[7],u=t[8],a=t[9],f=1,l="",c=!1;u&&(u=+u.substring(1)),i&&(n="0",o&&(s-=Math.floor((s-1)/4)));switch(a){case"n":o=!0,a="g";break;case"%":f=100,l="%",a="f";break;case"p":f=100,l="%",a="r";break;case"d":c=!0,u=0;break;case"s":f=-1,a="r"}return a=="r"&&!u&&(a="g"),a=ns.get(a)||g,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"-":r;if(f<0){var h=d3.formatPrefix(e,u);e=h.scale(e),l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p<s&&(e=(new Array(s-p+1)).join(n)+e),o&&(e=y(e)),e=t+e}else{o&&(e=y(e)),e=t+e;var p=e.length;p<s&&(e=(new Array(s-p+1)).join(n)+e)}return e+l}};var ts=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,ns=d3.map({g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return d3.round(e,t=m(e,t)).toFixed(Math.max(0,Math.min(20,t)))}}),rs=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(b);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,m(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n<=0?n+1:n-1)/3)*3))),rs[8+n/3]};var is=T(2),ss=T(3),os=function(){return x},us=d3.map({linear:os,poly:T,quad:function(){return is},cubic:function(){return ss},sin:function(){return N},exp:function(){return C},circle:function(){return k},elastic:L,back:A,bounce:function(){return O}}),as=d3.map({"in":x,out:E,"in-out":S,"out-in":function(e){return S(E(e))}});d3.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=us.get(n)||os,r=as.get(r)||x,w(r(n.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(e){var t=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate();return new P(n?n.matrix:ls)})(e)},P.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var fs=180/Math.PI,ls={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(e,t){var n=d3.interpolators.length,r;while(--n>=0&&!(r=d3.interpolators[n](e,t)));return r},d3.interpolateNumber=function(e,t){return t-=e,function(n){return e+t*n}},d3.interpolateRound=function(e,t){return t-=e,function(n){return Math.round(e+t*n)}},d3.interpolateString=function(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;cs.lastIndex=0;for(r=0;n=cs.exec(t);++r)n.index&&u.push(t.substring(s,o=n.index)),a.push({i:u.length,x:n[0]}),u.push(null),s=cs.lastIndex;s<t.length&&u.push(t.substring(s));for(r=0,f=a.length;(n=cs.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i)if(u[l.i+1]==null){u[l.i-1]+=l.x,u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1],u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}else if(u[l.i+1]==null)u[l.i]=l.x;else{u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}a.splice(r,1),f--,r--}else l.x=d3.interpolateNumber(parseFloat(n[0]),parseFloat(l.x))}while(r<f)l=a.pop(),u[l.i+1]==null?u[l.i]=l.x:(u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1)),f--;return u.length===1?u[0]==null?a[0].x:function(){return t}:function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}},d3.interpolateTransform=function(e,t){var n=[],r=[],i,s=d3.transform(e),o=d3.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:d3.interpolateNumber(u[0],a[0])},{i:3,x:d3.interpolateNumber(u[1],a[1])})):a[0]||a[1]?n.push("translate("+a+")"):n.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(f,l)})):l&&n.push(n.pop()+"rotate("+l+")"),c!=h?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(c,h)}):h&&n.push(n.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:d3.interpolateNumber(p[0],d[0])},{i:i-2,x:d3.interpolateNumber(p[1],d[1])})):(d[0]!=1||d[1]!=1)&&n.push(n.pop()+"scale("+d+")"),i=r.length,function(e){var t=-1,s;while(++t<i)n[(s=r[t]).i]=s.x(e);return n.join("")}},d3.interpolateRgb=function(e,t){e=d3.rgb(e),t=d3.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+z(Math.round(n+s*e))+z(Math.round(r+o*e))+z(Math.round(i+u*e))}},d3.interpolateHsl=function(e,t){e=d3.hsl(e),t=d3.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return G(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateLab=function(e,t){e=d3.lab(e),t=d3.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return rt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateHcl=function(e,t){e=d3.hcl(e),t=d3.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return et(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateArray=function(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(d3.interpolate(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}},d3.interpolateObject=function(e,t){var n={},r={},i;for(i in e)i in t?n[i]=F(i)(e[i],t[i]):r[i]=e[i];for(i in t)i in e||(r[i]=t[i]);return function(e){for(i in n)r[i]=n[i](e);return r}};var cs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(e,t){return t instanceof Array&&d3.interpolateArray(e,t)},function(e,t){return(typeof e=="string"||typeof t=="string")&&d3.interpolateString(e+"",t+"")},function(e,t){return(typeof t=="string"?hs.has(t)||/^(#|rgb\(|hsl\()/.test(t):t instanceof U||t instanceof Q)&&d3.interpolateRgb(e,t)},function(e,t){return!isNaN(e=+e)&&!isNaN(t=+t)&&d3.interpolateNumber(e,t)}],d3.rgb=function(e,t,n){return arguments.length===1?e instanceof U?R(e.r,e.g,e.b):W(""+e,R,G):R(~~e,~~t,~~n)},U.prototype.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?R(i,i,i):(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),R(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e))))},U.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),R(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))},U.prototype.hsl=function(){return X(this.r,this.g,this.b)},U.prototype.toString=function(){return"#"+z(this.r)+z(this.g)+z(this.b)};var hs=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});hs.forEach(function(e,t){hs.set(e,W(t,R,G))}),d3.hsl=function(e,t,n){return arguments.length===1?e instanceof Q?K(e.h,e.s,e.l):W(""+e,X,K):K(+e,+t,+n)},Q.prototype.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,this.l/e)},Q.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,e*this.l)},Q.prototype.rgb=function(){return G(this.h,this.s,this.l)},Q.prototype.toString=function(){return this.rgb().toString()},d3.hcl=function(e,t,n){return arguments.length===1?e instanceof Z?Y(e.h,e.c,e.l):e instanceof nt?it(e.l,e.a,e.b):it((e=V((e=d3.rgb(e)).r,e.g,e.b)).l,e.a,e.b):Y(+e,+t,+n)},Z.prototype.brighter=function(e){return Y(this.h,this.c,Math.min(100,this.l+ps*(arguments.length?e:1)))},Z.prototype.darker=function(e){return Y(this.h,this.c,Math.max(0,this.l-ps*(arguments.length?e:1)))},Z.prototype.rgb=function(){return et(this.h,this.c,this.l).rgb()},Z.prototype.toString=function(){return this.rgb()+""},d3.lab=function(e,t,n){return arguments.length===1?e instanceof nt?tt(e.l,e.a,e.b):e instanceof Z?et(e.l,e.c,e.h):V((e=d3.rgb(e)).r,e.g,e.b):tt(+e,+t,+n)};var ps=18,ds=.95047,vs=1,ms=1.08883;nt.prototype.brighter=function(e){return tt(Math.min(100,this.l+ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.darker=function(e){return tt(Math.max(0,this.l-ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.rgb=function(){return rt(this.l,this.a,this.b)},nt.prototype.toString=function(){return this.rgb()+""};var gs=function(e,t){return t.querySelector(e)},ys=function(e,t){return t.querySelectorAll(e)},bs=document.documentElement,ws=bs.matchesSelector||bs.webkitMatchesSelector||bs.mozMatchesSelector||bs.msMatchesSelector||bs.oMatchesSelector,Es=function(e,t){return ws.call(e,t)};typeof Sizzle=="function"&&(gs=function(e,t){return Sizzle(e,t)[0]||null},ys=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},Es=Sizzle.matchesSelector);var Ss=[];d3.selection=function(){return xs},d3.selection.prototype=Ss,Ss.select=function(e){var t=[],n,r,i,s;typeof e!="function"&&(e=ft(e));for(var o=-1,u=this.length;++o<u;){t.push(n=[]),n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;)(s=i[a])?(n.push(r=e.call(s,s.__data__,a)),r&&"__data__"in s&&(r.__data__=s.__data__)):n.push(null)}return at(t)},Ss.selectAll=function(e){var t=[],n,r;typeof e!="function"&&(e=lt(e));for(var i=-1,s=this.length;++i<s;)for(var o=this[i],u=-1,a=o.length;++u<a;)if(r=o[u])t.push(n=$i(e.call(r,r.__data__,u))),n.parentNode=r;return at(t)},Ss.attr=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node();return e=d3.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ct(t,e[t]));return this}return this.each(ct(e,t))},Ss.classed=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return!1}else{t=n.className,t.baseVal!=null&&(t=t.baseVal);while(++i<r)if(!ht(e[i]).test(t))return!1}return!0}for(t in e)this.each(pt(t,e[t]));return this}return this.each(pt(e,t))},Ss.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.each(vt(n,e[n],t));return this}if(r<2)return window.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(vt(e,t,n))},Ss.property=function(e,t){if(arguments.length<2){if(typeof e=="string")return this.node()[e];for(t in e)this.each(mt(t,e[t]));return this}return this.each(mt(e,t))},Ss.text=function(e){return arguments.length<1?this.node().textContent:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e})},Ss.html=function(e){return arguments.length<1?this.node().innerHTML:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e})},Ss.append=function(e){function t(){return this.appendChild(document.createElementNS(this.namespaceURI,e))}function n(){return this.appendChild(document.createElementNS(e.space,e.local))}return e=d3.ns.qualify(e),this.select(e.local?n:t)},Ss.insert=function(e,t){function n(){return this.insertBefore(document.createElementNS(this.namespaceURI,e),gs(t,this))}function r(){return this.insertBefore(document.createElementNS(e.space,e.local),gs(t,this))}return e=d3.ns.qualify(e),this.select(e.local?r:n)},Ss.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},Ss.data=function(e,t){function n(e,n){var i,s=e.length,o=n.length,u=Math.min(s,o),c=Math.max(s,o),h=[],p=[],d=[],v,m;if(t){var g=new r,y=[],b,w=n.length;for(i=-1;++i<s;)b=t.call(v=e[i],v.__data__,i),g.has(b)?d[w++]=v:g.set(b,v),y.push(b);for(i=-1;++i<o;)b=t.call(n,m=n[i],i),g.has(b)?(h[i]=v=g.get(b),v.__data__=m,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null),g.remove(b);for(i=-1;++i<s;)g.has(y[i])&&(d[i]=e[i])}else{for(i=-1;++i<u;)v=e[i],m=n[i],v?(v.__data__=m,h[i]=v,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null);for(;i<o;++i)p[i]=gt(n[i]),h[i]=d[i]=null;for(;i<c;++i)d[i]=e[i],p[i]=h[i]=null}p.update=h,p.parentNode=h.parentNode=d.parentNode=e.parentNode,a.push(p),f.push(h),l.push(d)}var i=-1,s=this.length,o,u;if(!arguments.length){e=new Array(s=(o=this[0]).length);while(++i<s)if(u=o[i])e[i]=u.__data__;return e}var a=St([]),f=at([]),l=at([]);if(typeof e=="function")while(++i<s)n(o=this[i],e.call(o,o.parentNode.__data__,i));else while(++i<s)n(o=this[i],e);return f.enter=function(){return a},f.exit=function(){return l},f},Ss.datum=Ss.map=function(e){return arguments.length<1?this.property("__data__"):this.property("__data__",e)},Ss.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]),n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i,i.__data__,u)&&n.push(i)}return at(t)},Ss.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;)if(s=n[r])i&&i!==s.nextSibling&&i.parentNode.insertBefore(s,i),i=s;return this},Ss.sort=function(e){e=bt.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ss.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t=!1);for(n in e)this.each(wt(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(wt(e,t,n))},Ss.each=function(e){return Et(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Ss.call=function(e){return e.apply(this,(arguments[0]=this,arguments)),this},Ss.empty=function(){return!this.node()},Ss.node=function(e){for(var t=0,n=this.length;t<n;t++)for(var r=this[t],i=0,s=r.length;i<s;i++){var o=r[i];if(o)return o}return null},Ss.transition=function(){var e=[],t,n;for(var r=-1,i=this.length;++r<i;){e.push(t=[]);for(var s=this[r],o=-1,u=s.length;++o<u;)t.push((n=s[o])?{node:n,delay:Ms,duration:_s}:null)}return xt(e,ks||++Cs,Date.now())};var xs=at([[document]]);xs[0].parentNode=bs,d3.select=function(e){return typeof e=="string"?xs.select(e):at([[e]])},d3.selectAll=function(e){return typeof e=="string"?xs.selectAll(e):at([$i(e)])};var Ts=[];d3.selection.enter=St,d3.selection.enter.prototype=Ts,Ts.append=Ss.append,Ts.insert=Ss.insert,Ts.empty=Ss.empty,Ts.node=Ss.node,Ts.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update,t.push(n=[]),n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;)(o=s[f])?(n.push(i[f]=r=e.call(s.parentNode,o.__data__,f)),r.__data__=o.__data__):n.push(null)}return at(t)};var Ns=[],Cs=0,ks=0,Ls=0,As=250,Os=d3.ease("cubic-in-out"),Ms=Ls,_s=As,Ds=Os;Ns.call=Ss.call,d3.transition=function(e){return arguments.length?ks?e.transition():e:xs.transition()},d3.transition.prototype=Ns,Ns.select=function(e){var t=[],n,r,i;typeof e!="function"&&(e=ft(e));for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(i=u[a])&&(r=e.call(i.node,i.node.__data__,a))?("__data__"in i.node&&(r.__data__=i.node.__data__),n.push({node:r,delay:i.delay,duration:i.duration})):n.push(null)}return xt(t,this.id,this.time).ease(this.ease())},Ns.selectAll=function(e){var t=[],n,r,i;typeof e!="function"&&(e=lt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(i=u[a]){r=e.call(i.node,i.node.__data__,a),t.push(n=[]);for(var l=-1,c=r.length;++l<c;)n.push({node:r[l],delay:i.delay,duration:i.duration})}return xt(t,this.id,this.time).ease(this.ease())},Ns.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i.node,i.node.__data__,u)&&n.push(i)}return xt(t,this.id,this.time).ease(this.ease())},Ns.attr=function(e,t){if(arguments.length<2){for(t in e)this.attrTween(t,Ct(e[t],t));return this}return this.attrTween(e,Ct(t,e))},Ns.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r===Ps?(this.removeAttribute(i),null):r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r===Ps?(this.removeAttributeNS(i.space,i.local),null):r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=d3.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Ns.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.styleTween(n,Ct(e[n],n),t);return this}n=""}return this.styleTween(e,Ct(t,e),n)},Ns.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,i){var s=t.call(this,r,i,window.getComputedStyle(this,null).getPropertyValue(e));return s===Ps?(this.style.removeProperty(e),null):s&&function(t){this.style.setProperty(e,s(t),n)}})},Ns.text=function(e){return this.tween("text",function(t,n){this.textContent=typeof e=="function"?e.call(this,t,n):e})},Ns.remove=function(){return this.each("end.transition",function(){var e;!this.__transition__&&(e=this.parentNode)&&e.removeChild(this)})},Ns.delay=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.delay=e.call(t=t.node,t.__data__,n,r)|0}:(e|=0,function(t){t.delay=e}))},Ns.duration=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.duration=Math.max(1,e.call(t=t.node,t.__data__,n,r)|0)}:(e=Math.max(1,e|0),function(t){t.duration=e}))},Ns.transition=function(){return this.select(s)},d3.tween=function(e,t){function n(n,r,i){var s=e.call(this,n,r);return s==null?i!=""&&Ps:i!=s&&t(i,s)}function r(n,r,i){return i!=e&&t(i,e)}return typeof e=="function"?n:e==null?Nt:(e+="",r)};var Ps={},Hs=null,Bs,js;d3.timer=function(e,t,n){var r=!1,i,s=Hs;if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}while(s){if(s.callback===e){s.then=n,s.delay=t,r=!0;break}i=s,s=s.next}r||(Hs={callback:e,then:n,delay:t,next:Hs}),Bs||(js=clearTimeout(js),Bs=1,Fs(kt))},d3.timer.flush=function(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,n.delay||(n.flush=n.callback(e)),n=n.next;Lt()};var Fs=window.requestAnimationFrame||window.webkitRequestAnimationFrame||
-window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,17)};d3.mouse=function(e){return At(e,_())};var Is=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(e,t){return arguments.length<2&&(t=_().touches),t?$i(t).map(function(t){var n=At(e,t);return n.identifier=t.identifier,n}):[]},d3.scale={},d3.scale.linear=function(){return Ht([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return zt(d3.scale.linear(),Wt)};var qs=d3.format(".0e");Wt.pow=function(e){return Math.pow(10,e)},Xt.pow=function(e){return-Math.pow(10,-e)},d3.scale.pow=function(){return Vt(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Jt([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Rs)},d3.scale.category20=function(){return d3.scale.ordinal().range(Us)},d3.scale.category20b=function(){return d3.scale.ordinal().range(zs)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Ws)};var Rs=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Us=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],zs=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Ws=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Kt([],[])},d3.scale.quantize=function(){return Qt(0,1,[0,1])},d3.scale.threshold=function(){return Gt([.5],[0,1])},d3.scale.identity=function(){return Yt([0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=t.apply(this,arguments),s=n.apply(this,arguments),o=r.apply(this,arguments)+Xs,u=i.apply(this,arguments)+Xs,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<Math.PI?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=Vs?e?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":e?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+e*h+","+e*p+"A"+e+","+e+" 0 "+f+",0 "+e*l+","+e*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var t=Zt,n=en,r=tn,i=nn;return e.innerRadius=function(n){return arguments.length?(t=u(n),e):t},e.outerRadius=function(t){return arguments.length?(n=u(t),e):n},e.startAngle=function(t){return arguments.length?(r=u(t),e):r},e.endAngle=function(t){return arguments.length?(i=u(t),e):i},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,s=(r.apply(this,arguments)+i.apply(this,arguments))/2+Xs;return[Math.cos(s)*e,Math.sin(s)*e]},e};var Xs=-Math.PI/2,Vs=2*Math.PI-1e-6;d3.svg.line=function(){return rn(i)};var $s=d3.map({linear:un,"linear-closed":an,"step-before":fn,"step-after":ln,basis:mn,"basis-open":gn,"basis-closed":yn,bundle:bn,cardinal:pn,"cardinal-open":cn,"cardinal-closed":hn,monotone:Nn});$s.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Js=[0,2/3,1/3,0],Ks=[0,1/3,2/3,0],Qs=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=rn(Cn);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},fn.reverse=ln,ln.reverse=fn,d3.svg.area=function(){return kn(i)},d3.svg.area.radial=function(){var e=kn(Cn);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},d3.svg.chord=function(){function e(e,u){var a=t(this,s,e,u),f=t(this,o,e,u);return"M"+a.p0+r(a.r,a.p1,a.a1-a.a0)+(n(a,f)?i(a.r,a.p1,a.r,a.p0):i(a.r,a.p1,f.r,f.p0)+r(f.r,f.p1,f.a1-f.a0)+i(f.r,f.p1,a.r,a.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),s=a.call(e,i,r),o=f.call(e,i,r)+Xs,u=l.call(e,i,r)+Xs;return{r:s,a0:o,a1:u,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(u),s*Math.sin(u)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Math.PI)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var s=Ln,o=An,a=On,f=tn,l=nn;return e.radius=function(t){return arguments.length?(a=u(t),e):a},e.source=function(t){return arguments.length?(s=u(t),e):s},e.target=function(t){return arguments.length?(o=u(t),e):o},e.startAngle=function(t){return arguments.length?(f=u(t),e):f},e.endAngle=function(t){return arguments.length?(l=u(t),e):l},e},d3.svg.diagonal=function(){function e(e,i){var s=t.call(this,e,i),o=n.call(this,e,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(r),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var t=Ln,n=An,r=Dn;return e.source=function(n){return arguments.length?(t=u(n),e):t},e.target=function(t){return arguments.length?(n=u(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},d3.svg.diagonal.radial=function(){var e=d3.svg.diagonal(),t=Dn,n=e.projection;return e.projection=function(e){return arguments.length?n(Pn(t=e)):t},e},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function e(e,r){return(Gs.get(t.call(this,e,r))||jn)(n.call(this,e,r))}var t=Bn,n=Hn;return e.type=function(n){return arguments.length?(t=u(n),e):t},e.size=function(t){return arguments.length?(n=u(t),e):n},e};var Gs=d3.map({circle:jn,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Zs)),n=t*Zs;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});d3.svg.symbolTypes=Gs.keys();var Ys=Math.sqrt(3),Zs=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function e(e){e.each(function(){var e=d3.select(this),c=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,h=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f,p=qn(t,c,l),d=e.selectAll(".minor").data(p,String),v=d.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),m=d3.transition(d.exit()).style("opacity",1e-6).remove(),g=d3.transition(d).style("opacity",1),y=e.selectAll("g").data(c,String),b=y.enter().insert("g","path").style("opacity",1e-6),w=d3.transition(y.exit()).style("opacity",1e-6).remove(),E=d3.transition(y).style("opacity",1),S,x=_t(t),T=e.selectAll(".domain").data([0]),N=T.enter().append("path").attr("class","domain"),C=d3.transition(T),k=t.copy(),L=this.__chart__||k;this.__chart__=k,b.append("line").attr("class","tick"),b.append("text");var A=b.select("line"),O=E.select("line"),M=y.select("text").text(h),_=b.select("text"),D=E.select("text");switch(n){case"bottom":S=Fn,v.attr("y2",i),g.attr("x2",0).attr("y2",i),A.attr("y2",r),_.attr("y",Math.max(r,0)+o),O.attr("x2",0).attr("y2",r),D.attr("x",0).attr("y",Math.max(r,0)+o),M.attr("dy",".71em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+s+"V0H"+x[1]+"V"+s);break;case"top":S=Fn,v.attr("y2",-i),g.attr("x2",0).attr("y2",-i),A.attr("y2",-r),_.attr("y",-(Math.max(r,0)+o)),O.attr("x2",0).attr("y2",-r),D.attr("x",0).attr("y",-(Math.max(r,0)+o)),M.attr("dy","0em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+ -s+"V0H"+x[1]+"V"+ -s);break;case"left":S=In,v.attr("x2",-i),g.attr("x2",-i).attr("y2",0),A.attr("x2",-r),_.attr("x",-(Math.max(r,0)+o)),O.attr("x2",-r).attr("y2",0),D.attr("x",-(Math.max(r,0)+o)).attr("y",0),M.attr("dy",".32em").attr("text-anchor","end"),C.attr("d","M"+ -s+","+x[0]+"H0V"+x[1]+"H"+ -s);break;case"right":S=In,v.attr("x2",i),g.attr("x2",i).attr("y2",0),A.attr("x2",r),_.attr("x",Math.max(r,0)+o),O.attr("x2",r).attr("y2",0),D.attr("x",Math.max(r,0)+o).attr("y",0),M.attr("dy",".32em").attr("text-anchor","start"),C.attr("d","M"+s+","+x[0]+"H0V"+x[1]+"H"+s)}if(t.ticks)b.call(S,L),E.call(S,k),w.call(S,k),v.call(S,L),g.call(S,k),m.call(S,k);else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};b.call(S,H),E.call(S,H)}})}var t=d3.scale.linear(),n="bottom",r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;return e.scale=function(n){return arguments.length?(t=n,e):t},e.orient=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return arguments.length?(u=arguments,e):u},e.tickValues=function(t){return arguments.length?(a=t,e):a},e.tickFormat=function(t){return arguments.length?(f=t,e):f},e.tickSize=function(t,n,o){if(!arguments.length)return r;var u=arguments.length-1;return r=+t,i=u>1?+n:r,s=u>0?+arguments[u]:r,e},e.tickPadding=function(t){return arguments.length?(o=+t,e):o},e.tickSubdivide=function(t){return arguments.length?(l=+t,e):l},e},d3.svg.brush=function(){function e(s){s.each(function(){var s=d3.select(this),f=s.selectAll(".background").data([0]),l=s.selectAll(".extent").data([0]),c=s.selectAll(".resize").data(a,String),h;s.style("pointer-events","all").on("mousedown.brush",i).on("touchstart.brush",i),f.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),c.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return eo[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),c.style("display",e.empty()?"none":null),c.exit().remove(),o&&(h=_t(o),f.attr("x",h[0]).attr("width",h[1]-h[0]),n(s)),u&&(h=_t(u),f.attr("y",h[0]).attr("height",h[1]-h[0]),r(s)),t(s)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+f[+/e$/.test(e)][0]+","+f[+/^s/.test(e)][1]+")"})}function n(e){e.select(".extent").attr("x",f[0][0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1][0]-f[0][0])}function r(e){e.select(".extent").attr("y",f[0][1]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1][1]-f[0][1])}function i(){function i(){var e=d3.event.changedTouches;return e?d3.touches(v,e)[0]:d3.mouse(v)}function a(){d3.event.keyCode==32&&(S||(x=null,T[0]-=f[1][0],T[1]-=f[1][1],S=2),M())}function c(){d3.event.keyCode==32&&S==2&&(T[0]+=f[1][0],T[1]+=f[1][1],S=0,M())}function h(){var e=i(),s=!1;N&&(e[0]+=N[0],e[1]+=N[1]),S||(d3.event.altKey?(x||(x=[(f[0][0]+f[1][0])/2,(f[0][1]+f[1][1])/2]),T[0]=f[+(e[0]<x[0])][0],T[1]=f[+(e[1]<x[1])][1]):x=null),w&&p(e,o,0)&&(n(y),s=!0),E&&p(e,u,1)&&(r(y),s=!0),s&&(t(y),g({type:"brush",mode:S?"move":"resize"}))}function p(e,t,n){var r=_t(t),i=r[0],s=r[1],o=T[n],u=f[1][n]-f[0][n],a,c;S&&(i-=o,s-=u+o),a=Math.max(i,Math.min(s,e[n])),S?c=(a+=o)+u:(x&&(o=Math.max(i,Math.min(s,2*x[n]-a))),o<a?(c=a,a=o):c=o);if(f[0][n]!==a||f[1][n]!==c)return l=null,f[0][n]=a,f[1][n]=c,!0}function d(){h(),y.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),d3.select("body").style("cursor",null),C.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),g({type:"brushend"}),M()}var v=this,m=d3.select(d3.event.target),g=s.of(v,arguments),y=d3.select(v),b=m.datum(),w=!/^(n|s)$/.test(b)&&o,E=!/^(e|w)$/.test(b)&&u,S=m.classed("extent"),x,T=i(),N,C=d3.select(window).on("mousemove.brush",h).on("mouseup.brush",d).on("touchmove.brush",h).on("touchend.brush",d).on("keydown.brush",a).on("keyup.brush",c);if(S)T[0]=f[0][0]-T[0],T[1]=f[0][1]-T[1];else if(b){var k=+/w$/.test(b),L=+/^n/.test(b);N=[f[1-k][0]-T[0],f[1-L][1]-T[1]],T[0]=f[k][0],T[1]=f[L][1]}else d3.event.altKey&&(x=T.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",m.style("cursor")),g({type:"brushstart"}),h(),M()}var s=D(e,"brushstart","brush","brushend"),o=null,u=null,a=to[0],f=[[0,0],[0,0]],l;return e.x=function(t){return arguments.length?(o=t,a=to[!o<<1|!u],e):o},e.y=function(t){return arguments.length?(u=t,a=to[!o<<1|!u],e):u},e.extent=function(t){var n,r,i,s,a;return arguments.length?(l=[[0,0],[0,0]],o&&(n=t[0],r=t[1],u&&(n=n[0],r=r[0]),l[0][0]=n,l[1][0]=r,o.invert&&(n=o(n),r=o(r)),r<n&&(a=n,n=r,r=a),f[0][0]=n|0,f[1][0]=r|0),u&&(i=t[0],s=t[1],o&&(i=i[1],s=s[1]),l[0][1]=i,l[1][1]=s,u.invert&&(i=u(i),s=u(s)),s<i&&(a=i,i=s,s=a),f[0][1]=i|0,f[1][1]=s|0),e):(t=l||f,o&&(n=t[0][0],r=t[1][0],l||(n=f[0][0],r=f[1][0],o.invert&&(n=o.invert(n),r=o.invert(r)),r<n&&(a=n,n=r,r=a))),u&&(i=t[0][1],s=t[1][1],l||(i=f[0][1],s=f[1][1],u.invert&&(i=u.invert(i),s=u.invert(s)),s<i&&(a=i,i=s,s=a))),o&&u?[[n,i],[r,s]]:o?[n,r]:u&&[i,s])},e.clear=function(){return l=null,f[0][0]=f[0][1]=f[1][0]=f[1][1]=0,e},e.empty=function(){return o&&f[0][0]===f[1][0]||u&&f[0][1]===f[1][1]},d3.rebind(e,s,"on")};var eo={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},to=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function e(){this.on("mousedown.drag",t).on("touchstart.drag",t)}function t(){function e(){var e=o.parentNode;return f?d3.touches(e).filter(function(e){return e.identifier===f})[0]:d3.mouse(e)}function t(){if(!o.parentNode)return i();var t=e(),n=t[0]-c[0],r=t[1]-c[1];h|=n|r,c=t,M(),u({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:r})}function i(){u({type:"dragend"}),h&&(M(),d3.event.target===a&&p.on("click.drag",s,!0)),p.on(f?"touchmove.drag-"+f:"mousemove.drag",null).on(f?"touchend.drag-"+f:"mouseup.drag",null)}function s(){M(),p.on("click.drag",null)}var o=this,u=n.of(o,arguments),a=d3.event.target,f=d3.event.touches&&d3.event.changedTouches[0].identifier,l,c=e(),h=0,p=d3.select(window).on(f?"touchmove.drag-"+f:"mousemove.drag",t).on(f?"touchend.drag-"+f:"mouseup.drag",i,!0);r?(l=r.apply(o,arguments),l=[l.x-c[0],l.y-c[1]]):l=[0,0],f||M(),u({type:"dragstart"})}var n=D(e,"drag","dragstart","dragend"),r=null;return e.origin=function(t){return arguments.length?(r=t,e):r},d3.rebind(e,n,"on")},d3.behavior.zoom=function(){function e(){this.on("mousedown.zoom",o).on("mousewheel.zoom",u).on("mousemove.zoom",a).on("DOMMouseScroll.zoom",u).on("dblclick.zoom",f).on("touchstart.zoom",l).on("touchmove.zoom",c).on("touchend.zoom",l)}function t(e){return[(e[0]-h[0])/d,(e[1]-h[1])/d]}function n(e){return[e[0]*d+h[0],e[1]*d+h[1]]}function r(e){d=Math.max(m[0],Math.min(m[1],e))}function i(e,t){t=n(t),h[0]+=e[0]-t[0],h[1]+=e[1]-t[1]}function s(e){b&&b.domain(y.range().map(function(e){return(e-h[0])/d}).map(y.invert)),E&&E.domain(w.range().map(function(e){return(e-h[1])/d}).map(w.invert)),d3.event.preventDefault(),e({type:"zoom",scale:d,translate:h})}function o(){function e(){f=1,i(d3.mouse(o),c),s(u)}function n(){f&&M(),l.on("mousemove.zoom",null).on("mouseup.zoom",null),f&&d3.event.target===a&&l.on("click.zoom",r,!0)}function r(){M(),l.on("click.zoom",null)}var o=this,u=g.of(o,arguments),a=d3.event.target,f=0,l=d3.select(window).on("mousemove.zoom",e).on("mouseup.zoom",n),c=t(d3.mouse(o));window.focus(),M()}function u(){p||(p=t(d3.mouse(this))),r(Math.pow(2,Rn()*.002)*d),i(d3.mouse(this),p),s(g.of(this,arguments))}function a(){p=null}function f(){var e=d3.mouse(this),n=t(e);r(d3.event.shiftKey?d/2:d*2),i(e,n),s(g.of(this,arguments))}function l(){var e=d3.touches(this),n=Date.now();v=d,p={},e.forEach(function(e){p[e.identifier]=t(e)}),M();if(e.length===1){if(n-S<500){var o=e[0],u=t(e[0]);r(d*2),i(o,u),s(g.of(this,arguments))}S=n}}function c(){var e=d3.touches(this),t=e[0],n=p[t.identifier];if(o=e[1]){var o,u=p[o.identifier];t=[(t[0]+o[0])/2,(t[1]+o[1])/2],n=[(n[0]+u[0])/2,(n[1]+u[1])/2],r(d3.event.scale*v)}i(t,n),S=null,s(g.of(this,arguments))}var h=[0,0],p,d=1,v,m=ro,g=D(e,"zoom"),y,b,w,E,S;return e.translate=function(t){return arguments.length?(h=t.map(Number),e):h},e.scale=function(t){return arguments.length?(d=+t,e):d},e.scaleExtent=function(t){return arguments.length?(m=t==null?ro:t.map(Number),e):m},e.x=function(t){return arguments.length?(b=t,y=t.copy(),e):b},e.y=function(t){return arguments.length?(E=t,w=t.copy(),e):E},d3.rebind(e,g,"on")};var no,ro=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Un(e[n]));return t}},d3.layout.chord=function(){function e(){var e={},n=[],c=d3.range(o),h=[],p,d,v,m,g;r=[],i=[],p=0,m=-1;while(++m<o){d=0,g=-1;while(++g<o)d+=s[m][g];n.push(d),h.push(d3.range(o)),p+=d}a&&c.sort(function(e,t){return a(n[e],n[t])}),f&&h.forEach(function(e,t){e.sort(function(e,n){return f(s[t][e],s[t][n])})}),p=(2*Math.PI-u*o)/p,d=0,m=-1;while(++m<o){v=d,g=-1;while(++g<o){var y=c[m],b=h[y][g],w=s[y][b],E=d,S=d+=w*p;e[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}i[y]={index:y,startAngle:v,endAngle:d,value:(d-v)/p},d+=u}m=-1;while(++m<o){g=m-1;while(++g<o){var x=e[m+"-"+g],T=e[g+"-"+m];(x.value||T.value)&&r.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}}l&&t()}function t(){r.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n={},r,i,s,o,u=0,a,f,l;return n.matrix=function(e){return arguments.length?(o=(s=e)&&s.length,r=i=null,n):s},n.padding=function(e){return arguments.length?(u=e,r=i=null,n):u},n.sortGroups=function(e){return arguments.length?(a=e,r=i=null,n):a},n.sortSubgroups=function(e){return arguments.length?(f=e,r=null,n):f},n.sortChords=function(e){return arguments.length?(l=e,r&&t(),n):l},n.chords=function(){return r||e(),r},n.groups=function(){return i||e(),i},n},d3.layout.force=function(){function e(e){return function(t,n,r,i,s){if(t.point!==e){var o=t.cx-e.x,u=t.cy-e.y,a=1/Math.sqrt(o*o+u*u);if((i-n)*a<d){var f=t.charge*a*a;return e.px-=o*f,e.py-=u*f,!0}if(t.point&&isFinite(a)){var f=t.pointCharge*a*a;e.px-=o*f,e.py-=u*f}}return!t.charge}}function t(e){e.px=d3.event.x,e.py=d3.event.y,n.resume()}var n={},r=d3.dispatch("start","tick","end"),s=[1,1],o,a,f=.9,l=Qn,c=Gn,h=-30,p=.1,d=.8,v,m=[],g=[],y,b,w;return n.tick=function(){if((a*=.99)<.005)return r.end({type:"end",alpha:a=0}),!0;var t=m.length,n=g.length,i,o,u,l,c,d,v,E,S;for(o=0;o<n;++o){u=g[o],l=u.source,c=u.target,E=c.x-l.x,S=c.y-l.y;if(d=E*E+S*S)d=a*b[o]*((d=Math.sqrt(d))-y[o])/d,E*=d,S*=d,c.x-=E*(v=l.weight/(c.weight+l.weight)),c.y-=S*v,l.x+=E*(v=1-v),l.y+=S*v}if(v=a*p){E=s[0]/2,S=s[1]/2,o=-1;if(v)while(++o<t)u=m[o],u.x+=(E-u.x)*v,u.y+=(S-u.y)*v}if(h){Kn(i=d3.geom.quadtree(m),a,w),o=-1;while(++o<t)(u=m[o]).fixed||i.visit(e(u))}o=-1;while(++o<t)u=m[o],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*f,u.y-=(u.py-(u.py=u.y))*f);r.tick({type:"tick",alpha:a})},n.nodes=function(e){return arguments.length?(m=e,n):m},n.links=function(e){return arguments.length?(g=e,n):g},n.size=function(e){return arguments.length?(s=e,n):s},n.linkDistance=function(e){return arguments.length?(l=u(e),n):l},n.distance=n.linkDistance,n.linkStrength=function(e){return arguments.length?(c=u(e),n):c},n.friction=function(e){return arguments.length?(f=e,n):f},n.charge=function(e){return arguments.length?(h=typeof e=="function"?e:+e,n):h},n.gravity=function(e){return arguments.length?(p=e,n):p},n.theta=function(e){return arguments.length?(d=e,n):d},n.alpha=function(e){return arguments.length?(a?e>0?a=e:a=0:e>0&&(r.start({type:"start",alpha:a=e}),d3.timer(n.tick)),n):a},n.start=function(){function e(e,n){var i=t(r),s=-1,o=i.length,u;while(++s<o)if(!isNaN(u=i[s][e]))return u;return Math.random()*n}function t(){if(!p){p=[];for(i=0;i<o;++i)p[i]=[];for(i=0;i<u;++i){var e=g[i];p[e.source.index].push(e.target),p[e.target.index].push(e.source)}}return p[r]}var r,i,o=m.length,u=g.length,a=s[0],f=s[1],p,d;for(r=0;r<o;++r)(d=m[r]).index=r,d.weight=0;y=[],b=[];for(r=0;r<u;++r)d=g[r],typeof d.source=="number"&&(d.source=m[d.source]),typeof d.target=="number"&&(d.target=m[d.target]),y[r]=l.call(this,d,r),b[r]=c.call(this,d,r),++d.source.weight,++d.target.weight;for(r=0;r<o;++r)d=m[r],isNaN(d.x)&&(d.x=e("x",a)),isNaN(d.y)&&(d.y=e("y",f)),isNaN(d.px)&&(d.px=d.x),isNaN(d.py)&&(d.py=d.y);w=[];if(typeof h=="function")for(r=0;r<o;++r)w[r]=+h.call(this,m[r],r);else for(r=0;r<o;++r)w[r]=h;return n.resume()},n.resume=function(){return n.alpha(.1)},n.stop=function(){return n.alpha(0)},n.drag=function(){o||(o=d3.behavior.drag().origin(i).on("dragstart",Xn).on("drag",t).on("dragend",Vn)),this.on("mouseover.force",$n).on("mouseout.force",Jn).call(o)},d3.rebind(n,r,"on")},d3.layout.partition=function(){function e(t,n,r,i){var s=t.children;t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;r=t.value?r/t.value:0;while(++o<u)e(a=s[o],n,f=a.value*r,i),n+=f}}function t(e){var n=e.children,r=0;if(n&&(s=n.length)){var i=-1,s;while(++i<s)r=Math.max(r,t(n[i]))}return 1+r}function n(n,s){var o=r.call(this,n,s);return e(o[0],0,i[0],i[1]/t(o[0])),o}var r=d3.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},fr(n,r)},d3.layout.pie=function(){function e(s,o){var u=s.map(function(n,r){return+t.call(e,n,r)}),a=+(typeof r=="function"?r.apply(this,arguments):r),f=((typeof i=="function"?i.apply(this,arguments):i)-r)/d3.sum(u),l=d3.range(s.length);n!=null&&l.sort(n===io?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])});var c=[];return l.forEach(function(e){var t;c[e]={data:s[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}}),c}var t=Number,n=io,r=0,i=2*Math.PI;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e};var io={};d3.layout.stack=function(){function e(i,a){var f=i.map(function(n,r){return t.call(e,n,r)}),l=f.map(function(t,n){return t.map(function(t,n){return[o.call(e,t,n),u.call(e,t,n)]})}),c=n.call(e,l,a);f=d3.permute(f,c),l=d3.permute(l,c);var h=r.call(e,l,a),p=f.length,d=f[0].length,v,m,g;for(m=0;m<d;++m){s.call(e,f[0][m],g=h[m],l[0][m][1]);for(v=1;v<p;++v)s.call(e,f[v][m],g+=l[v-1][m][1],l[v][m][1])}return i}var t=i,n=tr,r=nr,s=er,o=Yn,u=Zn;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n=typeof t=="function"?t:so.get(t)||tr,e):n},e.offset=function(t){return arguments.length?(r=typeof t=="function"?t:oo.get(t)||nr,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(u=t,e):u},e.out=function(t){return arguments.length?(s=t,e):s},e};var so=d3.map({"inside-out":function(e){var t=e.length,n,r,i=e.map(rr),s=e.map(ir),o=d3.range(t).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(n=0;n<t;++n)r=o[n],u<a?(u+=s[r],f.push(r)):(a+=s[r],l.push(r));return l.reverse().concat(f)},reverse:function(e){return d3.range(e.length).reverse()},"default":tr}),oo=d3.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];u>i&&(i=u),r.push(u)}for(o=0;o<n;++o)a[o]=(i-r[o])/2;return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i=0,s,o,u,a,f,l,c,h,p,d=[];d[0]=h=p=0;for(o=1;o<r;++o){for(s=0,a=0;s<t;++s)a+=e[s][o][1];for(s=0,f=0,c=n[o][0]-n[o-1][0];s<t;++s){for(u=0,l=(e[s][o][1]-e[s][o-1][1])/(2*c);u<s;++u)l+=(e[u][o][1]-e[u][o-1][1])/c;f+=l*e[s][o][1]}d[o]=h-=a?f/a*c:0,h<p&&(p=h)}for(o=0;o<r;++o)d[o]-=p;return d},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:nr});d3.layout.histogram=function(){function e(e,s){var o=[],u=e.map(n,this),a=r.call(this,u,s),f=i.call(this,a,u,s),l,s=-1,c=u.length,h=f.length-1,p=t?1:1/c,d;while(++s<h)l=o[s]=[],l.dx=f[s+1]-(l.x=f[s]),l.y=0;if(h>0){s=-1;while(++s<c)d=u[s],d>=a[0]&&d<=a[1]&&(l=o[d3.bisect(f,d,1,h)-1],l.y+=p,l.push(e[s]))}return o}var t=!0,n=Number,r=ar,i=or;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=u(t),e):r},e.bins=function(t){return arguments.length?(i=typeof t=="number"?function(e){return ur(e,t)}:u(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},d3.layout.hierarchy=function(){function e(t,o,u){var a=i.call(n,t,o),f=uo?t:{data:t};f.depth=o,u.push(f);if(a&&(c=a.length)){var l=-1,c,h=f.children=[],p=0,d=o+1,v;while(++l<c)v=e(a[l],d,u),v.parent=f,h.push(v),p+=v.value;r&&h.sort(r),s&&(f.value=p)}else s&&(f.value=+s.call(n,t,o)||0);return f}function t(e,r){var i=e.children,o=0;if(i&&(a=i.length)){var u=-1,a,f=r+1;while(++u<a)o+=t(i[u],f)}else s&&(o=+s.call(n,uo?e:e.data,r)||0);return s&&(e.value=o),o}function n(t){var n=[];return e(t,0,n),n}var r=hr,i=lr,s=cr;return n.sort=function(e){return arguments.length?(r=e,n):r},n.children=function(e){return arguments.length?(i=e,n):i},n.value=function(e){return arguments.length?(s=e,n):s},n.revalue=function(e){return t(e,0),e},n};var uo=!1;d3.layout.pack=function(){function e(e,i){var s=t.call(this,e,i),o=s[0];o.x=0,o.y=0,Pr(o,function(e){e.r=Math.sqrt(e.value)}),Pr(o,yr);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;Pr(o,function(e){e.r+=l}),Pr(o,yr),Pr(o,function(e){e.r-=l}),f=Math.max(2*o.r/u,2*o.r/a)}return Er(o,u/2,a/2,1/f),s}var t=d3.layout.hierarchy().sort(dr),n=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.padding=function(t){return arguments.length?(n=+t,e):n},fr(e,t)},d3.layout.cluster=function(){function e(e,i){var s=t.call(this,e,i),o=s[0],u,a=0,f,l;Pr(o,function(e){var t=e.children;t&&t.length?(e.x=Tr(t),e.y=xr(t)):(e.x=u?a+=n(e,u):0,e.y=0,u=e)});var c=Nr(o),h=Cr(o),p=c.x-n(c,h)/2,d=h.x+n(h,c)/2;return Pr(o,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=(1-(o.y?e.y/o.y:1))*r[1]}),s}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.tree=function(){function e(e,i){function s(e,t){var r=e.children,i=e._tree;if(r&&(o=r.length)){var o,a=r[0],f,l=a,c,h=-1;while(++h<o)c=r[h],s(c,f),l=u(c,f,l),f=c;Hr(e);var p=.5*(a._tree.prelim+c._tree.prelim);t?(i.prelim=t._tree.prelim+n(e,t),i.mod=i.prelim-p):i.prelim=p}else t&&(i.prelim=t._tree.prelim+n(e,t))}function o(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i)o(n[r],t)}}function u(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ar(o),i=Lr(i),o&&i)u=Lr(u),s=Ar(s),s._tree.ancestor=e,h=o._tree.prelim+l-i._tree.prelim-a+n(o,i),h>0&&(Br(jr(o,e,r),e,h),a+=h,f+=h),l+=o._tree.mod,a+=i._tree.mod,c+=u._tree.mod,f+=s._tree.mod;o&&!Ar(s)&&(s._tree.thread=o,s._tree.mod+=l-f),i&&!Lr(u)&&(u._tree.thread=i,u._tree.mod+=a-c,r=e)}return r}var a=t.call(this,e,i),f=a[0];Pr(f,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),s(f),o(f,-f._tree.prelim);var l=Or(f,_r),c=Or(f,Mr),h=Or(f,Dr),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;return Pr(f,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=e.depth/v*r[1],delete e._tree}),a}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.treemap=function(){function e(e,t){var n=-1,r=e.length,i,s;while(++n<r)s=(i=e[n]).value*(t<0?0:t),i.area=isNaN(s)||s<=0?0:s}function t(n){var s=n.children;if(s&&s.length){var o=l(n),u=[],a=s.slice(),f,c=Infinity,h,p=Math.min(o.dx,o.dy),d;e(a,o.dx*o.dy/n.value),u.area=0;while((d=a.length)>0)u.push(f=a[d-1]),u.area+=f.area,(h=r(u,p))<=c?(a.pop(),c=h):(u.area-=u.pop().area,i(u,p,o,!1),p=Math.min(o.dx,o.dy),u.length=u.area=0,c=Infinity);u.length&&(i(u,p,o,!0),u.length=u.area=0),s.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var s=l(t),o=r.slice(),u,a=[];e(o,s.dx*s.dy/t.value),a.area=0;while(u=o.pop())a.push(u),a.area+=u.area,u.z!=null&&(i(a,u.z?s.dx:s.dy,s,!o.length),a.length=a.area=0);r.forEach(n)}}function r(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;r<s&&(s=r),r>i&&(i=r)}return n*=n,t*=t,n?Math.max(t*i*p/n,n/(t*s*p)):Infinity}function i(e,t,n,r){var i=-1,s=e.length,o=n.x,a=n.y,f=t?u(e.area/t):0,l;if(t==n.dx){if(r||f>n.dy)f=n.dy;while(++i<s)l=e[i],l.x=o,l.y=a,l.dy=f,o+=l.dx=Math.min(n.x+n.dx-o,f?u(l.area/f):0);l.z=!0,l.dx+=n.x+n.dx-o,n.y+=f,n.dy-=f}else{if(r||f>n.dx)f=n.dx;while(++i<s)l=e[i],l.x=o,l.y=a,l.dx=f,a+=l.dy=Math.min(n.y+n.dy-a,f?u(l.area/f):0);l.z=!1,l.dy+=n.y+n.dy-a,n.x+=f,n.dx-=f}}function s(r){var i=h||o(r),s=i[0];return s.x=0,s.y=0,s.dx=a[0],s.dy=a[1],h&&o.revalue(s),e([s],s.dx*s.dy/s.value),(h?n:t)(s),c&&(h=i),i}var o=d3.layout.hierarchy(),u=Math.round,a=[1,1],f=null,l=Fr,c=!1,h,p=.5*(1+Math.sqrt(5));return s.size=function(e){return arguments.length?(a=e,s):a},s.padding=function(e){function t(t){var n=e.call(s,t,t.depth);return n==null?Fr(t):Ir(t,typeof n=="number"?[n,n,n,n]:n)}function n(t){return Ir(t,e)}if(!arguments.length)return f;var r;return l=(f=e)==null?Fr:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n,s},s.round=function(e){return arguments.length?(u=e?Math.round:Number,s):u!=Number},s.sticky=function(e){return arguments.length?(c=e,h=null,s):c},s.ratio=function(e){return arguments.length?(p=e,s):p},fr(s,o)},d3.csv=qr(",","text/csv"),d3.tsv=qr(" ","text/tab-separated-values"),d3.geo={};var ao=Math.PI/180;d3.geo.azimuthal=function(){function e(e){var n=e[0]*ao-s,o=e[1]*ao,f=Math.cos(n),l=Math.sin(n),c=Math.cos(o),h=Math.sin(o),p=t!=="orthographic"?a*h+u*c*f:null,d,v=t==="stereographic"?1/(1+p):t==="gnomonic"?1/p:t==="equidistant"?(d=Math.acos(p),d?d/Math.sin(d):0):t==="equalarea"?Math.sqrt(2/(1+p)):1,m=v*c*l,g=v*(a*c*f-u*h);return[r*m+i[0],r*g+i[1]]}var t="orthographic",n,r=200,i=[480,250],s,o,u,a;return e.invert=function(e){var n=(e[0]-i[0])/r,o=(e[1]-i[1])/r,f=Math.sqrt(n*n+o*o),l=t==="stereographic"?2*Math.atan(f):t==="gnomonic"?Math.atan(f):t==="equidistant"?f:t==="equalarea"?2*Math.asin(.5*f):Math.asin(f),c=Math.sin(l),h=Math.cos(l);return[(s+Math.atan2(n*c,f*u*h+o*a*c))/ao,Math.asin(h*a-(f?o*c*u/f:0))/ao]},e.mode=function(n){return arguments.length?(t=n+"",e):t},e.origin=function(t){return arguments.length?(n=t,s=n[0]*ao,o=n[1]*ao,u=Math.cos(o),a=Math.sin(o),e):n},e.scale=function(t){return arguments.length?(r=+t,e):r},e.translate=function(t){return arguments.length?(i=[+t[0],+t[1]],e):i},e.origin([0,0])},d3.geo.albers=function(){function e(e){var t=u*(ao*e[0]-o),n=Math.sqrt(a-2*u*Math.sin(ao*e[1]))/u;return[i*n*Math.sin(t)+s[0],i*(n*Math.cos(t)-f)+s[1]]}function t(){var t=ao*r[0],i=ao*r[1],s=ao*n[1],l=Math.sin(t),c=Math.cos(t);return o=ao*n[0],u=.5*(l+Math.sin(i)),a=c*c+2*u*l,f=Math.sqrt(a-2*u*Math.sin(s))/u,e}var n=[-98,38],r=[29.5,45.5],i=1e3,s=[480,250],o,u,a,f;return e.invert=function(e){var t=(e[0]-s[0])/i,n=(e[1]-s[1])/i,r=f+n,l=Math.atan2(t,r),c=Math.sqrt(t*t+r*r);return[(o+l/u)/ao,Math.asin((a-c*c*u*u)/(2*u))/ao]},e.origin=function(e){return arguments.length?(n=[+e[0],+e[1]],t()):n},e.parallels=function(e){return arguments.length?(r=[+e[0],+e[1]],t()):r},e.scale=function(t){return arguments.length?(i=+t,e):i},e.translate=function(t){return arguments.length?(s=[+t[0],+t[1]],e):s},t()},d3.geo.albersUsa=function(){function e(e){var s=e[0],o=e[1];return(o>50?n:s<-140?r:o<21?i:t)(e)}var t=d3.geo.albers(),n=d3.geo.albers().origin([-160,60]).parallels([55,65]),r=d3.geo.albers().origin([-160,20]).parallels([8,18]),i=d3.geo.albers().origin([-60,10]).parallels([8,18]);return e.scale=function(s){return arguments.length?(t.scale(s),n.scale(s*.6),r.scale(s),i.scale(s*1.5),e.translate(t.translate())):t.scale()},e.translate=function(s){if(!arguments.length)return t.translate();var o=t.scale()/1e3,u=s[0],a=s[1];return t.translate(s),n.translate([u-400*o,a+170*o]),r.translate([u-190*o,a+200*o]),i.translate([u+580*o,a+430*o]),e},e.scale(t.scale())},d3.geo.bonne=function(){function e(e){var u=e[0]*ao-r,a=e[1]*ao-i;if(s){var f=o+s-a,l=u*Math.cos(a)/f;u=f*Math.sin(l),a=f*Math.cos(l)-o}else u*=Math.cos(a),a*=-1;return[t*u+n[0],t*a+n[1]]}var t=200,n=[480,250],r,i,s,o;return e.invert=function(e){var i=(e[0]-n[0])/t,u=(e[1]-n[1])/t;if(s){var a=o+u,f=Math.sqrt(i*i+a*a);u=o+s-f,i=r+f*Math.atan2(i,a)/Math.cos(u)}else u*=-1,i/=Math.cos(u);return[i/ao,u/ao]},e.parallel=function(t){return arguments.length?(o=1/Math.tan
-(s=t*ao),e):s/ao},e.origin=function(t){return arguments.length?(r=t[0]*ao,i=t[1]*ao,e):[r/ao,i/ao]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function e(e){var r=e[0]/360,i=-e[1]/360;return[t*r+n[0],t*i+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,-360*i]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.mercator=function(){function e(e){var r=e[0]/360,i=-(Math.log(Math.tan(Math.PI/4+e[1]*ao/2))/ao)/360;return[t*r+n[0],t*Math.max(-0.5,Math.min(.5,i))+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,2*Math.atan(Math.exp(-360*i*ao))/ao-90]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.path=function(){function e(e,t){typeof s=="function"&&(o=Ur(s.apply(this,arguments))),f(e);var n=a.length?a.join(""):null;return a=[],n}function t(e){return u(e).join(",")}function n(e){var t=i(e[0]),n=0,r=e.length;while(++n<r)t-=i(e[n]);return t}function r(e){var t=d3.geom.polygon(e[0].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i=r[0],s=r[1],o=n,a=0,f=e.length;while(++a<f)t=d3.geom.polygon(e[a].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i-=r[0],s-=r[1],o-=n;return[i,s,6*o]}function i(e){return Math.abs(d3.geom.polygon(e.map(u)).area())}var s=4.5,o=Ur(s),u=d3.geo.albersUsa(),a=[],f=Rr({FeatureCollection:function(e){var t=e.features,n=-1,r=t.length;while(++n<r)a.push(f(t[n].geometry))},Feature:function(e){f(e.geometry)},Point:function(e){a.push("M",t(e.coordinates),o)},MultiPoint:function(e){var n=e.coordinates,r=-1,i=n.length;while(++r<i)a.push("M",t(n[r]),o)},LineString:function(e){var n=e.coordinates,r=-1,i=n.length;a.push("M");while(++r<i)a.push(t(n[r]),"L");a.pop()},MultiLineString:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1,u=s.length,a.push("M");while(++o<u)a.push(t(s[o]),"L");a.pop()}},Polygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1;if((u=s.length-1)>0){a.push("M");while(++o<u)a.push(t(s[o]),"L");a[a.length-1]="Z"}}},MultiPolygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u,f,l,c;while(++r<i){s=n[r],o=-1,u=s.length;while(++o<u){f=s[o],l=-1;if((c=f.length-1)>0){a.push("M");while(++l<c)a.push(t(f[l]),"L");a[a.length-1]="Z"}}}},GeometryCollection:function(e){var t=e.geometries,n=-1,r=t.length;while(++n<r)a.push(f(t[n]))}}),l=e.area=Rr({FeatureCollection:function(e){var t=0,n=e.features,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t},Feature:function(e){return l(e.geometry)},Polygon:function(e){return n(e.coordinates)},MultiPolygon:function(e){var t=0,r=e.coordinates,i=-1,s=r.length;while(++i<s)t+=n(r[i]);return t},GeometryCollection:function(e){var t=0,n=e.geometries,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t}},0),c=e.centroid=Rr({Feature:function(e){return c(e.geometry)},Polygon:function(e){var t=r(e.coordinates);return[t[0]/t[2],t[1]/t[2]]},MultiPolygon:function(e){var t=0,n=e.coordinates,i,s=0,o=0,u=0,a=-1,f=n.length;while(++a<f)i=r(n[a]),s+=i[0],o+=i[1],u+=i[2];return[s/u,o/u]}});return e.projection=function(t){return u=t,e},e.pointRadius=function(t){return typeof t=="function"?s=t:(s=+t,o=Ur(s)),e},e},d3.geo.bounds=function(e){var t=Infinity,n=Infinity,r=-Infinity,i=-Infinity;return zr(e,function(e,s){e<t&&(t=e),e>r&&(r=e),s<n&&(n=s),s>i&&(i=s)}),[[t,n],[r,i]]};var fo={Feature:Wr,FeatureCollection:Xr,GeometryCollection:Vr,LineString:$r,MultiLineString:Jr,MultiPoint:$r,MultiPolygon:Kr,Point:Qr,Polygon:Gr};d3.geo.circle=function(){function e(){}function t(e){return a.distance(e)<u}function n(e){var t=-1,n=e.length,i=[],s,o,f,l,c;while(++t<n)c=a.distance(f=e[t]),c<u?(o&&i.push(ti(o,f)((l-u)/(l-c))),i.push(f),s=o=null):(o=f,!s&&i.length&&(i.push(ti(i[i.length-1],o)((u-l)/(c-l))),s=o)),l=c;return s=e[0],o=i[0],o&&f[0]===s[0]&&f[1]===s[1]&&(f[0]!==o[0]||f[1]!==o[1])&&i.push(o),r(i)}function r(e){var t=0,n=e.length,r,i,s=n?[e[0]]:e,o,u=a.source();while(++t<n){o=a.source(e[t-1])(e[t]).coordinates;for(r=0,i=o.length;++r<i;)s.push(o[r])}return a.source(u),s}var s=[0,0],o=89.99,u=o*ao,a=d3.geo.greatArc().source(s).target(i);e.clip=function(e){return typeof s=="function"&&a.source(s.apply(this,arguments)),f(e)||null};var f=Rr({FeatureCollection:function(e){var t=e.features.map(f).filter(i);return t&&(e=Object.create(e),e.features=t,e)},Feature:function(e){var t=f(e.geometry);return t&&(e=Object.create(e),e.geometry=t,e)},Point:function(e){return t(e.coordinates)&&e},MultiPoint:function(e){var n=e.coordinates.filter(t);return n.length&&{type:e.type,coordinates:n}},LineString:function(e){var t=n(e.coordinates);return t.length&&(e=Object.create(e),e.coordinates=t,e)},MultiLineString:function(e){var t=e.coordinates.map(n).filter(function(e){return e.length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},Polygon:function(e){var t=e.coordinates.map(n);return t[0].length&&(e=Object.create(e),e.coordinates=t,e)},MultiPolygon:function(e){var t=e.coordinates.map(function(e){return e.map(n)}).filter(function(e){return e[0].length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},GeometryCollection:function(e){var t=e.geometries.map(f).filter(i);return t.length&&(e=Object.create(e),e.geometries=t,e)}});return e.origin=function(t){return arguments.length?(s=t,typeof s!="function"&&a.source(s),e):s},e.angle=function(t){return arguments.length?(u=(o=+t)*ao,e):o},d3.rebind(e,a,"precision")},d3.geo.greatArc=function(){function e(){var t=e.distance.apply(this,arguments),r=0,u=s/t,a=[n];while((r+=u)<1)a.push(o(r));return a.push(i),{type:"LineString",coordinates:a}}var t=Yr,n,r=Zr,i,s=6*ao,o=ei();return e.distance=function(){return typeof t=="function"&&o.source(n=t.apply(this,arguments)),typeof r=="function"&&o.target(i=r.apply(this,arguments)),o.distance()},e.source=function(r){return arguments.length?(t=r,typeof t!="function"&&o.source(n=t),e):t},e.target=function(t){return arguments.length?(r=t,typeof r!="function"&&o.target(i=r),e):r},e.precision=function(t){return arguments.length?(s=t*ao,e):s/ao},e},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(e,t){var n=t||ni(e),r=[],i=n[0],s=n[1],o=0,u=0,a=NaN,f=NaN,l=0;do l=0,e(i-1,s-1)&&(l+=1),e(i,s-1)&&(l+=2),e(i-1,s)&&(l+=4),e(i,s)&&(l+=8),l===6?(o=f===-1?-1:1,u=0):l===9?(o=0,u=a===1?-1:1):(o=lo[l],u=co[l]),o!=a&&u!=f&&(r.push([i,s]),a=o,f=u),i+=o,s+=u;while(n[0]!=i||n[1]!=s);return r};var lo=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],co=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(e){if(e.length<3)return[];var t=e.length,n=t-1,r=[],i=[],s,o,u=0,a,f,l,c,h,p,d,v;for(s=1;s<t;++s)e[s][1]<e[u][1]?u=s:e[s][1]==e[u][1]&&(u=e[s][0]<e[u][0]?s:u);for(s=0;s<t;++s){if(s===u)continue;f=e[s][1]-e[u][1],a=e[s][0]-e[u][0],r.push({angle:Math.atan2(f,a),index:s})}r.sort(function(e,t){return e.angle-t.angle}),d=r[0].angle,p=r[0].index,h=0;for(s=1;s<n;++s)o=r[s].index,d==r[s].angle?(a=e[p][0]-e[u][0],f=e[p][1]-e[u][1],l=e[o][0]-e[u][0],c=e[o][1]-e[u][1],a*a+f*f>=l*l+c*c?r[s].index=-1:(r[h].index=-1,d=r[s].angle,h=s,p=o)):(d=r[s].angle,h=s,p=o);i.push(u);for(s=0,o=0;s<2;++o)r[o].index!==-1&&(i.push(r[o].index),s++);v=i.length;for(;o<n;++o){if(r[o].index===-1)continue;while(!ri(i[v-2],i[v-1],r[o].index,e))--v;i[v++]=r[o].index}var m=[];for(s=0;s<v;++s)m.push(e[i[s]]);return m},d3.geom.polygon=function(e){return e.area=function(){var t=0,n=e.length,r=e[n-1][0]*e[0][1],i=e[n-1][1]*e[0][0];while(++t<n)r+=e[t-1][0]*e[t][1],i+=e[t-1][1]*e[t][0];return(i-r)*.5},e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;arguments.length||(t=-1/(6*e.area()));while(++n<r)o=u,u=e[n],a=o[0]*u[1]-u[0]*o[1],i+=(o[0]+u[0])*a,s+=(o[1]+u[1])*a;return[i*t,s*t]},e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice(),t.length=0,a=e[r],f=n[(o=n.length)-1],s=-1;while(++s<o)l=n[s],ii(l,u,a)?(ii(f,u,a)||t.push(si(f,l,u,a)),t.push(l)):ii(f,u,a)&&t.push(si(f,l,u,a)),f=l;u=a}return t},e},d3.geom.voronoi=function(e){var t=e.map(function(){return[]});return oi(e,function(e){var n,r,i,s,o,u;e.a===1&&e.b>=0?(n=e.ep.r,r=e.ep.l):(n=e.ep.l,r=e.ep.r),e.a===1?(o=n?n.y:-1e6,i=e.c-e.b*o,u=r?r.y:1e6,s=e.c-e.b*u):(i=n?n.x:-1e6,o=e.c-e.a*i,s=r?r.x:1e6,u=e.c-e.a*s);var a=[i,o],f=[s,u];t[e.region.l.index].push(a,f),t[e.region.r.index].push(a,f)}),t.map(function(t,n){var r=e[n][0],i=e[n][1];return t.forEach(function(e){e.angle=Math.atan2(e[0]-r,e[1]-i)}),t.sort(function(e,t){return e.angle-t.angle}).filter(function(e,n){return!n||e.angle-t[n-1].angle>1e-10})})};var ho={l:"r",r:"l"};d3.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return oi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++)n.push([i,t[u],t[u+1]])}),n},d3.geom.quadtree=function(e,t,n,r,i){function s(e,t,n,r,i,s){if(isNaN(t.x)||isNaN(t.y))return;if(e.leaf){var u=e.point;u?Math.abs(u.x-t.x)+Math.abs(u.y-t.y)<.01?o(e,t,n,r,i,s):(e.point=null,o(e,u,n,r,i,s),o(e,t,n,r,i,s)):e.point=t}else o(e,t,n,r,i,s)}function o(e,t,n,r,i,o){var u=(n+i)*.5,a=(r+o)*.5,f=t.x>=u,l=t.y>=a,c=(l<<1)+f;e.leaf=!1,e=e.nodes[c]||(e.nodes[c]=ui()),f?n=u:i=u,l?r=a:o=a,s(e,t,n,r,i,o)}var u,a=-1,f=e.length;f&&isNaN(e[0].x)&&(e=e.map(fi));if(arguments.length<5)if(arguments.length===3)i=r=n,n=t;else{t=n=Infinity,r=i=-Infinity;while(++a<f)u=e[a],u.x<t&&(t=u.x),u.y<n&&(n=u.y),u.x>r&&(r=u.x),u.y>i&&(i=u.y);var l=r-t,c=i-n;l>c?i=n+l:r=t+c}var h=ui();return h.add=function(e){s(h,e,t,n,r,i)},h.visit=function(e){ai(e,h,t,n,r,i)},e.forEach(h.add),h},d3.time={};var po=Date,vo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];li.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){mo.setUTCDate.apply(this._,arguments)},setDay:function(){mo.setUTCDay.apply(this._,arguments)},setFullYear:function(){mo.setUTCFullYear.apply(this._,arguments)},setHours:function(){mo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){mo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){mo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){mo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){mo.setUTCSeconds.apply(this._,arguments)},setTime:function(){mo.setTime.apply(this._,arguments)}};var mo=Date.prototype,go="%a %b %e %H:%M:%S %Y",yo="%m/%d/%y",bo="%H:%M:%S",wo=vo,Eo=wo.map(ci),So=["January","February","March","April","May","June","July","August","September","October","November","December"],xo=So.map(ci);d3.time.format=function(e){function t(t){var r=[],i=-1,s=0,o,u;while(++i<n)e.charCodeAt(i)==37&&(r.push(e.substring(s,i),(u=Po[o=e.charAt(++i)])?u(t):o),s=i+1);return r.push(e.substring(s,i)),r.join("")}var n=e.length;return t.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=hi(n,e,t,0);if(r!=t.length)return null;"p"in n&&(n.H=n.H%12+n.p*12);var i=new po;return i.setFullYear(n.y,n.m,n.d),i.setHours(n.H,n.M,n.S,n.L),i},t.toString=function(){return e},t};var To=d3.format("02d"),No=d3.format("03d"),Co=d3.format("04d"),ko=d3.format("2d"),Lo=pi(wo),Ao=pi(Eo),Oo=pi(So),Mo=di(So),_o=pi(xo),Do=di(xo),Po={a:function(e){return Eo[e.getDay()]},A:function(e){return wo[e.getDay()]},b:function(e){return xo[e.getMonth()]},B:function(e){return So[e.getMonth()]},c:d3.time.format(go),d:function(e){return To(e.getDate())},e:function(e){return ko(e.getDate())},H:function(e){return To(e.getHours())},I:function(e){return To(e.getHours()%12||12)},j:function(e){return No(1+d3.time.dayOfYear(e))},L:function(e){return No(e.getMilliseconds())},m:function(e){return To(e.getMonth()+1)},M:function(e){return To(e.getMinutes())},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e){return To(e.getSeconds())},U:function(e){return To(d3.time.sundayOfYear(e))},w:function(e){return e.getDay()},W:function(e){return To(d3.time.mondayOfYear(e))},x:d3.time.format(yo),X:d3.time.format(bo),y:function(e){return To(e.getFullYear()%100)},Y:function(e){return Co(e.getFullYear()%1e4)},Z:_i,"%":function(e){return"%"}},Ho={a:vi,A:mi,b:gi,B:yi,c:bi,d:Ci,e:Ci,H:ki,I:ki,L:Oi,m:Ni,M:Li,p:Mi,S:Ai,x:wi,X:Ei,y:xi,Y:Si},Bo=/^\s*\d+/,jo=d3.map({am:0,pm:1});d3.time.format.utc=function(e){function t(e){try{po=li;var t=new po;return t._=e,n(t)}finally{po=Date}}var n=d3.time.format(e);return t.parse=function(e){try{po=li;var t=n.parse(e);return t&&t._}finally{po=Date}},t.toString=n.toString,t};var Fo=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Di:Fo,Di.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Di.toString=Fo.toString,d3.time.second=Pi(function(e){return new po(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Pi(function(e){return new po(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Pi(function(e){var t=e.getTimezoneOffset()/60;return new po((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Pi(function(e){var t=new po(1970,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(e){var t=d3.time.year(e);return Math.floor((e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5)},vo.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=d3.time[e]=Pi(function(e){return(e=d3.time.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});d3.time[e+"s"]=n.range,d3.time[e+"s"].utc=n.utc.range,d3.time[e+"OfYear"]=function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Pi(function(e){return e=d3.time.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Pi(function(e){return e=d3.time.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Io=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],qo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Ro=[[d3.time.format("%Y"),function(e){return!0}],[d3.time.format("%B"),function(e){return e.getMonth()}],[d3.time.format("%b %d"),function(e){return e.getDate()!=1}],[d3.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[d3.time.format("%I %p"),function(e){return e.getHours()}],[d3.time.format("%I:%M"),function(e){return e.getMinutes()}],[d3.time.format(":%S"),function(e){return e.getSeconds()}],[d3.time.format(".%L"),function(e){return e.getMilliseconds()}]],Uo=d3.scale.linear(),zo=Ii(Ro);qo.year=function(e,t){return Uo.domain(e.map(Ri)).ticks(t).map(qi)},d3.time.scale=function(){return Bi(d3.scale.linear(),qo,zo)};var Wo=qo.map(function(e){return[e[0].utc,e[1]]}),Xo=[[d3.time.format.utc("%Y"),function(e){return!0}],[d3.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]],Vo=Ii(Xo);Wo.year=function(e,t){return Uo.domain(e.map(zi)).ticks(t).map(Ui)},d3.time.scale.utc=function(){return Bi(d3.scale.linear(),Wo,Vo)}})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v3.min.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v3.min.js
deleted file mode 100644
index 7975878f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/d3.v3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-d3=function(){function o(e){return e!=null&&!isNaN(e)}function a(e){return e.length}function f(e){var t=1;while(e*t%1)t*=10;return t}function l(e,t){try{for(var n in t){Object.defineProperty(e.prototype,n,{value:t[n],enumerable:false})}}catch(r){e.prototype=t}}function c(){}function d(){}function v(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function m(){}function g(e){function r(){var n=t,r=-1,i=n.length,s;while(++r<i)if(s=n[r].on)s.apply(this,arguments);return e}var t=[],n=new c;r.on=function(r,i){var s=n.get(r),o;if(arguments.length<2)return s&&s.on;if(s){s.on=null;t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1));n.remove(r)}if(i)t.push(n.set(r,{on:i}));return e};return r}function y(){e.event.stopPropagation();e.event.preventDefault()}function w(){var t=e.event,n;while(n=t.sourceEvent)t=n;return t}function E(e,t){function n(){e.on(t,null)}e.on(t,function(){y();n()},true);setTimeout(n,0)}function S(t){var n=new m,r=0,i=arguments.length;while(++r<i)n[arguments[r]]=g(n);n.of=function(r,i){return function(s){try{var o=s.sourceEvent=e.event;s.target=t;e.event=s;n[s.type].apply(r,i)}finally{e.event=o}}};return n}function T(r,i){var s=r.ownerSVGElement||r;if(s.createSVGPoint){var o=s.createSVGPoint();if(x<0&&(n.scrollX||n.scrollY)){s=e.select(t.body).append("svg").style("position","absolute").style("top",0).style("left",0);var u=s[0][0].getScreenCTM();x=!(u.f||u.e);s.remove()}if(x){o.x=i.pageX;o.y=i.pageY}else{o.x=i.clientX;o.y=i.clientY}o=o.matrixTransform(r.getScreenCTM().inverse());return[o.x,o.y]}var a=r.getBoundingClientRect();return[i.clientX-a.left-r.clientLeft,i.clientY-a.top-r.clientTop]}function C(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function k(e){return Array.prototype.slice.call(e)}function O(e){A(e,B);return e}function j(e){return function(){return M(e,this)}}function F(e){return function(){return _(e,this)}}function q(t,n){function r(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function s(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function u(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}function a(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}t=e.ns.qualify(t);return n==null?t.local?i:r:typeof n==="function"?t.local?a:u:t.local?o:s}function R(e){return e.trim().replace(/\s+/g," ")}function z(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function W(e,t){function r(){var r=-1;while(++r<n)e[r](this,t)}function i(){var r=-1,i=t.apply(this,arguments);while(++r<n)e[r](this,i)}e=e.trim().split(/\s+/).map(X);var n=e.length;return typeof t==="function"?i:r}function X(e){var t=z(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";if(r){t.lastIndex=0;if(!t.test(i))n.setAttribute("class",R(i+" "+e))}else{n.setAttribute("class",R(i.replace(t," ")))}}}function V(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);if(r==null)this.style.removeProperty(e);else this.style.setProperty(e,r,n)}return t==null?r:typeof t==="function"?s:i}function $(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);if(n==null)delete this[e];else this[e]=n}return t==null?n:typeof t==="function"?i:r}function J(e){return{__data__:e}}function K(e){return function(){return H(this,e)}}function Q(t){if(!arguments.length)t=e.ascending;return function(e,n){return!e-!n||t(e.__data__,n.__data__)}}function G(){}function Y(t,n,r){function a(){var e=this[i];if(e){this.removeEventListener(t,e,e.$);delete this[i]}}function f(){var e=o(n,N(arguments));a.call(this);this.addEventListener(t,this[i]=e,e.$=r);e._=n}function l(){var n=new RegExp("^__on([^.]+)"+e.requote(t)+"$"),r;for(var i in this){if(r=i.match(n)){var s=this[i];this.removeEventListener(r[1],s,s.$);delete this[i]}}}var i="__on"+t,s=t.indexOf("."),o=et;if(s>0)t=t.substring(0,s);var u=Z.get(t);if(u)t=u,o=tt;return s?n?f:a:n?G:l}function et(t,n){return function(r){var i=e.event;e.event=r;n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=i}}}function tt(e,t){var n=et(e,t);return function(e){var t=this,r=e.relatedTarget;if(!r||r!==t&&!(r.compareDocumentPosition(t)&8)){n.call(t,e)}}}function nt(e,t){for(var n=0,r=e.length;n<r;n++){for(var i=e[n],s=0,o=i.length,u;s<o;s++){if(u=i[s])t(u,s,n)}}return e}function rt(e){A(e,it);return e}function ft(){}function lt(e,t,n){return new ct(e,t,n)}function ct(e,t,n){this.h=e;this.s=t;this.l=n}function pt(e,t,n){function s(e){if(e>360)e-=360;else if(e<0)e+=360;if(e<60)return r+(i-r)*e/60;if(e<180)return i;if(e<240)return r+(i-r)*(240-e)/60;return r}function o(e){return Math.round(s(e)*255)}var r,i;e=e%360;if(e<0)e+=360;t=t<0?0:t>1?1:t;n=n<0?0:n>1?1:n;i=n<=.5?n*(1+t):n+t-n*t;r=2*n-i;return qt(o(e+120),o(e),o(e-120))}function yt(e){return e>0?1:e<0?-1:0}function bt(e){return Math.acos(Math.max(-1,Math.min(1,e)))}function wt(e){return e>1?dt/2:e<-1?-dt/2:Math.asin(e)}function Et(e){return(Math.exp(e)-Math.exp(-e))/2}function St(e){return(Math.exp(e)+Math.exp(-e))/2}function xt(e){return(e=Math.sin(e/2))*e}function Tt(e,t,n){return new Nt(e,t,n)}function Nt(e,t,n){this.h=e;this.c=t;this.l=n}function kt(e,t,n){return Lt(n,Math.cos(e*=mt)*t,Math.sin(e)*t)}function Lt(e,t,n){return new At(e,t,n)}function At(e,t,n){this.l=e;this.a=t;this.b=n}function Ht(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;i=jt(i)*Mt;r=jt(r)*_t;s=jt(s)*Dt;return qt(It(3.2404542*i-1.5371385*r-.4985314*s),It(-.969266*i+1.8760108*r+.041556*s),It(.0556434*i-.2040259*r+1.0572252*s))}function Bt(e,t,n){return Tt(Math.atan2(n,t)*gt,Math.sqrt(t*t+n*n),e)}function jt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ft(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function It(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function qt(e,t,n){return new Rt(e,t,n)}function Rt(e,t,n){this.r=e;this.g=t;this.b=n}function zt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Wt(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":{return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100)};case"rgb":{return t(Jt(u[0]),Jt(u[1]),Jt(u[2]))}}}if(a=Kt.get(e))return t(a.r,a.g,a.b);if(e!=null&&e.charAt(0)==="#"){if(e.length===4){r=e.charAt(1);r+=r;i=e.charAt(2);i+=i;s=e.charAt(3);s+=s}else if(e.length===7){r=e.substring(1,3);i=e.substring(3,5);s=e.substring(5,7)}r=parseInt(r,16);i=parseInt(i,16);s=parseInt(s,16)}return t(r,i,s)}function Xt(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;if(s){u=a<.5?s/(i+r):s/(2-i-r);if(e==i)o=(t-n)/s+(t<n?6:0);else if(t==i)o=(n-e)/s+2;else o=(e-t)/s+4;o*=60}else{u=o=0}return lt(o,u,a)}function Vt(e,t,n){e=$t(e);t=$t(t);n=$t(n);var r=Ft((.4124564*e+.3575761*t+.1804375*n)/Mt),i=Ft((.2126729*e+.7151522*t+.072175*n)/_t),s=Ft((.0193339*e+.119192*t+.9503041*n)/Dt);return Lt(116*i-16,500*(r-i),200*(i-s))}function $t(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jt(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function Qt(e){return typeof e==="function"?e:function(){return e}}function Gt(e){return e}function Yt(e){return e.length===1?function(t,n){e(t==null?n:null)}:e}function Zt(t,n){function s(t,r,i){if(arguments.length<3)i=r,r=null;var s=e.xhr(t,n,i);s.row=function(e){return arguments.length?s.response((r=e)==null?o:u(e)):r};return s.row(r)}function o(e){return s.parse(e.responseText)}function u(e){return function(t){return s.parse(t.responseText,e)}}function a(e){return e.map(f).join(t)}function f(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var r=new RegExp('["'+t+"\n]"),i=t.charCodeAt(0);s.parse=function(e,t){var n;return s.parseRows(e,function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i})};s.parseRows=function(e,t){function c(){if(u>=o)return r;if(l)return l=false,n;var t=u;if(e.charCodeAt(t)===34){var s=t;while(s++<o){if(e.charCodeAt(s)===34){if(e.charCodeAt(s+1)!==34)break;++s}}u=s+2;var a=e.charCodeAt(s+1);if(a===13){l=true;if(e.charCodeAt(s+2)===10)++u}else if(a===10){l=true}return e.substring(t+1,s).replace(/""/g,'"')}while(u<o){var a=e.charCodeAt(u++),f=1;if(a===10)l=true;else if(a===13){l=true;if(e.charCodeAt(u)===10)++u,++f}else if(a!==i)continue;return e.substring(t,u-f)}return e.substring(t)}var n={},r={},s=[],o=e.length,u=0,a=0,f,l;while((f=c())!==r){var h=[];while(f!==n&&f!==r){h.push(f);f=c()}if(t&&!(h=t(h,a++)))continue;s.push(h)}return s};s.format=function(e){if(Array.isArray(e[0]))return s.formatRows(e);var n=new d,r=[];e.forEach(function(e){for(var t in e){if(!n.has(t)){r.push(n.add(t))}}});return[r.map(f).join(t)].concat(e.map(function(e){return r.map(function(t){return f(e[t])}).join(t)})).join("\n")};s.formatRows=function(e){return e.map(a).join("\n")};return s}function on(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(e>=n.delay)n.flush=n.callback(e);n=n.next}var r=un()-t;if(r>24){if(isFinite(r)){clearTimeout(sn);sn=setTimeout(on,r)}rn=0}else{rn=1;an(on)}}function un(){var e=null,t=nn,n=Infinity;while(t){if(t.flush){delete tn[t.callback.id];t=e?e.next=t.next:nn=t.next}else{n=Math.min(n,t.then+t.delay);t=(e=t).next}}return n}function pn(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function mn(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function gn(e){return e+""}function wn(e,t){if(e&&Sn.hasOwnProperty(e.type)){Sn[e.type](e,t)}}function xn(e,t,n){var r=-1,i=e.length-n,s;t.lineStart();while(++r<i)s=e[r],t.point(s[0],s[1]);t.lineEnd()}function Tn(e,t){var n=-1,r=e.length;t.polygonStart();while(++n<r)xn(e[n],t,1);t.polygonEnd()}function An(){function s(e,t){e*=mt;t=t*mt/2+dt/4;var s=e-n,o=Math.cos(t),u=Math.sin(t),a=i*u,f=Cn,l=kn,c=r*o+a*Math.cos(s),h=a*Math.sin(s);Cn=f*c-l*h;kn=l*c+f*h;n=e,r=o,i=u}var e,t,n,r,i;Ln.point=function(o,u){Ln.point=s;n=(e=o)*mt,r=Math.cos(u=(t=u)*mt/2+dt/4),i=Math.sin(u)};Ln.lineEnd=function(){s(e,t)}}function On(t){function u(e,t){if(e<n)n=e;if(e>i)i=e;if(t<r)r=t;if(t>s)s=t}function a(){o.point=o.lineEnd=G}var n,r,i,s;var o={point:u,lineStart:G,lineEnd:G,polygonStart:function(){o.lineEnd=a},polygonEnd:function(){o.point=u}};return function(u){s=i=-(n=r=Infinity);e.geo.stream(u,t(o));return[[n,r],[i,s]]}}function jn(e,t){if(Mn)return;++_n;e*=mt;var n=Math.cos(t*=mt);Dn+=(n*Math.cos(e)-Dn)/_n;Pn+=(n*Math.sin(e)-Pn)/_n;Hn+=(Math.sin(t)-Hn)/_n}function Fn(){var e,t;Mn=1;In();Mn=2;var n=Bn.point;Bn.point=function(r,i){n(e=r,t=i)};Bn.lineEnd=function(){Bn.point(e,t);qn();Bn.lineEnd=qn}}function In(){function r(r,i){r*=mt;var s=Math.cos(i*=mt),o=s*Math.cos(r),u=s*Math.sin(r),a=Math.sin(i),f=Math.atan2(Math.sqrt((f=t*a-n*u)*f+(f=n*o-e*a)*f+(f=e*u-t*o)*f),e*o+t*u+n*a);_n+=f;Dn+=f*(e+(e=o));Pn+=f*(t+(t=u));Hn+=f*(n+(n=a))}var e,t,n;if(Mn>1)return;if(Mn<1){Mn=1;_n=Dn=Pn=Hn=0}Bn.point=function(i,s){i*=mt;var o=Math.cos(s*=mt);e=o*Math.cos(i);t=o*Math.sin(i);n=Math.sin(s);Bn.point=r}}function qn(){Bn.point=jn}function Rn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function zn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wn(e,t){e[0]+=t[0];e[1]+=t[1];e[2]+=t[2]}function Xn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Vn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t;e[1]/=t;e[2]/=t}function $n(){return true}function Jn(e){return[Math.atan2(e[1],e[0]),Math.asin(Math.max(-1,Math.min(1,e[2])))]}function Kn(e,t){return Math.abs(e[0]-t[0])<vt&&Math.abs(e[1]-t[1])<vt}function Qn(e,t,n,r,i){var s=[],o=[];e.forEach(function(e){if((t=e.length-1)<=0)return;var t,n=e[0],r=e[t];if(Kn(n,r)){i.lineStart();for(var u=0;u<t;++u)i.point((n=e[u])[0],n[1]);i.lineEnd();return}var a={point:n,points:e,other:null,visited:false,entry:true,subject:true},f={point:n,points:[n],other:a,visited:false,entry:false,subject:false};a.other=f;s.push(a);o.push(f);a={point:r,points:[r],other:null,visited:false,entry:false,subject:true};f={point:r,points:[r],other:a,visited:false,entry:true,subject:false};a.other=f;s.push(a);o.push(f)});o.sort(t);Gn(s);Gn(o);if(!s.length)return;if(n)for(var u=1,a=!n(o[0].point),f=o.length;u<f;++u){o[u].entry=a=!a}var l=s[0],c,h,p;while(1){c=l;while(c.visited)if((c=c.next)===l)return;h=c.points;i.lineStart();do{c.visited=c.other.visited=true;if(c.entry){if(c.subject){for(var u=0;u<h.length;u++)i.point((p=h[u])[0],p[1])}else{r(c.point,c.next.point,1,i)}c=c.next}else{if(c.subject){h=c.prev.points;for(var u=h.length;--u>=0;)i.point((p=h[u])[0],p[1])}else{r(c.point,c.prev.point,-1,i)}c=c.prev}c=c.other;h=c.points}while(!c.visited);i.lineEnd()}}function Gn(e){if(!(t=e.length))return;var t,n=0,r=e[0],i;while(++n<t){r.next=i=e[n];i.prev=r;r=i}r.next=i=e[0];i.prev=r}function Yn(t,n,r){return function(i){function u(e,n){if(t(e,n))i.point(e,n)}function a(e,t){s.point(e,t)}function f(){o.point=a;s.lineStart()}function l(){o.point=u;s.lineEnd()}function y(e,t){m.point(e,t);g.push([e,t])}function b(){m.lineStart();g=[]}function w(){y(g[0][0],g[0][1]);m.lineEnd();var e=m.clean(),t=v.buffer(),n,r=t.length;if(!r){d=true;p+=tr(g,-1);g=null;return}g=null;if(e&1){n=t[0];h+=tr(n,1);var r=n.length-1,s=-1,o;i.lineStart();while(++s<r)i.point((o=n[s])[0],o[1]);i.lineEnd();return}if(r>1&&e&2)t.push(t.pop().concat(t.shift()));c.push(t.filter(Zn))}var s=n(i);var o={point:u,lineStart:f,lineEnd:l,polygonStart:function(){o.point=y;o.lineStart=b;o.lineEnd=w;d=false;p=h=0;c=[];i.polygonStart()},polygonEnd:function(){o.point=u;o.lineStart=f;o.lineEnd=l;c=e.merge(c);if(c.length){Qn(c,nr,null,r,i)}else if(h<-vt||d&&p<-vt){i.lineStart();r(null,null,1,i);i.lineEnd()}i.polygonEnd();c=null},sphere:function(){i.polygonStart();i.lineStart();r(null,null,1,i);i.lineEnd();i.polygonEnd()}};var c,h,p,d;var v=er(),m=n(v),g;return o}}function Zn(e){return e.length>1}function er(){var e=[],t;return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:G,buffer:function(){var n=e;e=[];t=null;return n},rejoin:function(){if(e.length>1)e.push(e.pop().concat(e.shift()))}}}function tr(e,t){if(!(n=e.length))return 0;var n,r=0,i=0,s=e[0],o=s[0],u=s[1],a=Math.cos(u),f=Math.atan2(t*Math.sin(o)*a,Math.sin(u)),l=1-t*Math.cos(o)*a,c=f,h,p;while(++r<n){s=e[r];a=Math.cos(u=s[1]);h=Math.atan2(t*Math.sin(o=s[0])*a,Math.sin(u));p=1-t*Math.cos(o)*a;if(Math.abs(l-2)<vt&&Math.abs(p-2)<vt)continue;if(Math.abs(p)<vt||Math.abs(l)<vt){}else if(Math.abs(Math.abs(h-f)-dt)<vt){if(p+l>2)i+=4*(h-f)}else if(Math.abs(l-2)<vt)i+=4*(h-c);else i+=((3*dt+h-f)%(2*dt)-dt)*(l+p);c=f,f=h,l=p}return i}function nr(e,t){return((e=e.point)[0]<0?e[1]-dt/2-vt:dt/2-e[1])-((t=t.point)[0]<0?t[1]-dt/2-vt:dt/2-t[1])}function ir(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart();i=1},point:function(s,o){var u=s>0?dt:-dt,a=Math.abs(s-t);if(Math.abs(a-dt)<vt){e.point(t,n=(n+o)/2>0?dt/2:-dt/2);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);e.point(s,n);i=0}else if(r!==u&&a>=dt){if(Math.abs(t-r)<vt)t-=r*vt;if(Math.abs(s-u)<vt)s-=u*vt;n=sr(t,n,s,o);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);i=0}e.point(t=s,n=o);r=u},lineEnd:function(){e.lineEnd();t=n=NaN},clean:function(){return 2-i}}}function sr(e,t,n,r){var i,s,o=Math.sin(e-n);return Math.abs(o)>vt?Math.atan((Math.sin(t)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*s*o)):(t+r)/2}function or(e,t,n,r){var i;if(e==null){i=n*dt/2;r.point(-dt,i);r.point(0,i);r.point(dt,i);r.point(dt,0);r.point(dt,-i);r.point(0,-i);r.point(-dt,-i);r.point(-dt,0);r.point(-dt,i)}else if(Math.abs(e[0]-t[0])>vt){var s=(e[0]<t[0]?1:-1)*dt;i=n*s/2;r.point(-s,i);r.point(0,i);r.point(s,i)}else{r.point(t[0],t[1])}}function ur(e){function s(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e){var t,i,o,f,l;return{lineStart:function(){f=o=false;l=1},point:function(c,h){var p=[c,h],d,v=s(c,h),m=n?v?0:a(c,h):v?a(c+(c<0?dt:-dt),h):0;if(!t&&(f=o=v))e.lineStart();if(v!==o){d=u(t,p);if(Kn(t,d)||Kn(p,d)){p[0]+=vt;p[1]+=vt;v=s(p[0],p[1])}}if(v!==o){l=0;if(v){e.lineStart();d=u(p,t);e.point(d[0],d[1])}else{d=u(t,p);e.point(d[0],d[1]);e.lineEnd()}t=d}else if(r&&t&&n^v){var g;if(!(m&i)&&(g=u(p,t,true))){l=0;if(n){e.lineStart();e.point(g[0][0],g[0][1]);e.point(g[1][0],g[1][1]);e.lineEnd()}else{e.point(g[1][0],g[1][1]);e.lineEnd();e.lineStart();e.point(g[0][0],g[0][1])}}}if(v&&(!t||!Kn(t,p))){e.point(p[0],p[1])}t=p,o=v,i=m},lineEnd:function(){if(o)e.lineEnd();t=null},clean:function(){return l|(f&&o)<<1}}}function u(e,n,r){var i=Rn(e),s=Rn(n);var o=[1,0,0],u=zn(i,s),a=Un(u,u),f=u[0],l=a-f*f;if(!l)return!r&&e;var c=t*a/l,h=-t*f/l,p=zn(o,u),d=Xn(o,c),v=Xn(u,h);Wn(d,v);var m=p,g=Un(d,m),y=Un(m,m),b=g*g-y*(Un(d,d)-1);if(b<0)return;var w=Math.sqrt(b),E=Xn(m,(-g-w)/y);Wn(E,d);E=Jn(E);if(!r)return E;var S=e[0],x=n[0],T=e[1],N=n[1],C;if(x<S)C=S,S=x,x=C;var k=x-S,L=Math.abs(k-dt)<vt,A=L||k<vt;if(!L&&N<T)C=T,T=N,N=C;if(A?L?T+N>0^E[1]<(Math.abs(E[0]-S)<vt?T:N):T<=E[1]&&E[1]<=N:k>dt^(S<=E[0]&&E[0]<=x)){var O=Xn(m,(-g+w)/y);Wn(O,d);return[E,Jn(O)]}}function a(t,r){var i=n?e:dt-e,s=0;if(t<-i)s|=1;else if(t>i)s|=2;if(r<-i)s|=4;else if(r>i)s|=8;return s}var t=Math.cos(e),n=t>0,r=Math.abs(t)>vt,i=Er(e,6*mt);return Yn(s,o,i)}function fr(t,n,r,i){function s(e,i){return Math.abs(e[0]-t)<vt?i>0?0:3:Math.abs(e[0]-r)<vt?i>0?2:1:Math.abs(e[1]-n)<vt?i>0?1:0:i>0?3:2}function o(e,t){return u(e.point,t.point)}function u(e,t){var n=s(e,1),r=s(t,1);return n!==r?n-r:n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]}function a(e,s){var o=s[0]-e[0],u=s[1]-e[1],a=[0,1];if(Math.abs(o)<vt&&Math.abs(u)<vt)return t<=e[0]&&e[0]<=r&&n<=e[1]&&e[1]<=i;if(lr(t-e[0],o,a)&&lr(e[0]-r,-o,a)&&lr(n-e[1],u,a)&&lr(e[1]-i,-u,a)){if(a[1]<1){s[0]=e[0]+a[1]*o;s[1]=e[1]+a[1]*u}if(a[0]>0){e[0]+=a[0]*o;e[1]+=a[0]*u}return true}return false}return function(f){function m(e){var o=s(e,-1),u=g([o===0||o===3?t:r,o>1?i:n]);return u}function g(e){var t=0,n=p.length,r=e[1];for(var i=0;i<n;++i){for(var s=1,o=p[i],u=o.length,a=o[0];s<u;++s){b=o[s];if(a[1]<=r){if(b[1]>r&&y(a,b,e)>0)++t}else{if(b[1]<=r&&y(a,b,e)<0)--t}a=b}}return t!==0}function y(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}function w(e,o,a,f){var l=0,c=0;if(e==null||(l=s(e,a))!==(c=s(o,a))||u(e,o)<0^a>0){do{f.point(l===0||l===3?t:r,l>1?i:n)}while((l=(l+a+4)%4)!==c)}else{f.point(o[0],o[1])}}function E(e,s){return t<=e&&e<=r&&n<=s&&s<=i}function S(e,t){if(E(e,t))f.point(e,t)}function O(){v.point=_;if(p)p.push(d=[]);A=true;L=false;C=k=NaN}function M(){if(h){_(x,T);if(N&&L)c.rejoin();h.push(c.buffer())}v.point=S;if(L)f.lineEnd()}function _(e,t){e=Math.max(-ar,Math.min(ar,e));t=Math.max(-ar,Math.min(ar,t));var n=E(e,t);if(p)d.push([e,t]);if(A){x=e,T=t,N=n;A=false;if(n){f.lineStart();f.point(e,t)}}else{if(n&&L)f.point(e,t);else{var r=[C,k],i=[e,t];if(a(r,i)){if(!L){f.lineStart();f.point(r[0],r[1])}f.point(i[0],i[1]);if(!n)f.lineEnd()}else{f.lineStart();f.point(e,t)}}}C=e,k=t,L=n}var l=f,c=er(),h,p,d;var v={point:S,lineStart:O,lineEnd:M,polygonStart:function(){f=c;h=[];p=[]},polygonEnd:function(){f=l;if((h=e.merge(h)).length){f.polygonStart();Qn(h,o,m,w,f);f.polygonEnd()}else if(g([t,n])){f.polygonStart(),f.lineStart();w(null,null,1,f);f.lineEnd(),f.polygonEnd()}h=p=d=null}};var x,T,N,C,k,L,A;return v}}function lr(e,t,n){if(Math.abs(t)<vt)return e<=0;var r=e/t;if(t>0){if(r>n[1])return false;if(r>n[0])n[0]=r}else{if(r<n[0])return false;if(r<n[1])n[1]=r}return true}function cr(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}if(e.invert&&t.invert)n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])};return n}function hr(e){function r(t){function c(n,r){n=e(n,r);t.point(n[0],n[1])}function h(){s=NaN;l.point=p;t.lineStart()}function p(l,c){var h=Rn([l,c]),p=e(l,c);i(s,o,r,u,a,f,s=p[0],o=p[1],r=l,u=h[0],a=h[1],f=h[2],n,t);t.point(s,o)}function d(){l.point=c;t.lineEnd()}function v(){var e,c,v,m,g,y,b;h();l.point=function(t,n){p(e=t,c=n),v=s,m=o,g=u,y=a,b=f;l.point=p};l.lineEnd=function(){i(s,o,r,u,a,f,v,m,e,g,y,b,n,t);l.lineEnd=d;d()}}var r,s,o,u,a,f;var l={point:c,lineStart:h,lineEnd:d,polygonStart:function(){t.polygonStart();l.lineStart=v},polygonEnd:function(){t.polygonEnd();l.lineStart=h}};return l}function i(n,r,s,o,u,a,f,l,c,h,p,d,v,m){var g=f-n,y=l-r,b=g*g+y*y;if(b>4*t&&v--){var w=o+h,E=u+p,S=a+d,x=Math.sqrt(w*w+E*E+S*S),T=Math.asin(S/=x),N=Math.abs(Math.abs(S)-1)<vt?(s+c)/2:Math.atan2(E,w),C=e(N,T),k=C[0],L=C[1],A=k-n,O=L-r,M=y*A-g*O;if(M*M/b>t||Math.abs((g*A+y*O)/b-.5)>.3){i(n,r,s,o,u,a,k,L,N,w/=x,E/=x,S,v,m);m.point(k,L);i(k,L,N,w,E,S,f,l,c,h,p,d,v,m)}}}var t=.5,n=16;r.precision=function(e){if(!arguments.length)return Math.sqrt(t);n=(t=e*e)>0&&16;return r};return r}function pr(e){return dr(function(){return e})()}function dr(t){function w(e){e=i(e[0]*mt,e[1]*mt);return[e[0]*o+d,v-e[1]*o]}function E(e){e=i.invert((e[0]-d)/o,(v-e[1])/o);return e&&[e[0]*gt,e[1]*gt]}function S(){i=cr(r=gr(c,h,p),n);var e=n(f,l);d=u-e[0]*o;v=a+e[1]*o;return w}var n,r,i,s=hr(function(e,t){e=n(e,t);return[e[0]*o+d,v-e[1]*o]}),o=150,u=480,a=250,f=0,l=0,c=0,h=0,p=0,d,v,m=rr,g=Gt,y=null,b=null;w.stream=function(e){return vr(r,m(s(g(e))))};w.clipAngle=function(e){if(!arguments.length)return y;m=e==null?(y=e,rr):ur((y=+e)*mt);return w};w.clipExtent=function(e){if(!arguments.length)return b;b=e;g=e==null?Gt:fr(e[0][0],e[0][1],e[1][0],e[1][1]);return w};w.scale=function(e){if(!arguments.length)return o;o=+e;return S()};w.translate=function(e){if(!arguments.length)return[u,a];u=+e[0];a=+e[1];return S()};w.center=function(e){if(!arguments.length)return[f*gt,l*gt];f=e[0]%360*mt;l=e[1]%360*mt;return S()};w.rotate=function(e){if(!arguments.length)return[c*gt,h*gt,p*gt];c=e[0]%360*mt;h=e[1]%360*mt;p=e.length>2?e[2]%360*mt:0;return S()};e.rebind(w,s,"precision");return function(){n=t.apply(this,arguments);w.invert=n.invert&&E;return S()}}function vr(e,t){return{point:function(n,r){r=e(n*mt,r*mt),n=r[0];t.point(n>dt?n-2*dt:n<-dt?n+2*dt:n,r[1])},sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function mr(e,t){return[e,t]}function gr(e,t,n){return e?t||n?cr(br(e),wr(t,n)):br(e):t||n?wr(t,n):mr}function yr(e){return function(t,n){return t+=e,[t>dt?t-2*dt:t<-dt?t+2*dt:t,n]}}function br(e){var t=yr(e);t.invert=yr(-e);return t}function wr(e,t){function o(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*n+u*r;return[Math.atan2(a*i-l*s,u*n-f*r),Math.asin(Math.max(-1,Math.min(1,l*i+a*s)))]}var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),s=Math.sin(t);o.invert=function(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*i-a*s;return[Math.atan2(a*i+f*s,u*n+l*r),Math.asin(Math.max(-1,Math.min(1,l*n-u*r)))]};return o}function Er(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,s,o,u){if(i!=null){i=Sr(n,i);s=Sr(n,s);if(o>0?i<s:i>s)i+=o*2*dt}else{i=e+o*2*dt;s=e}var a;for(var f=o*t,l=i;o>0?l>s:l<s;l-=f){u.point((a=Jn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],a[1])}}}function Sr(e,t){var n=Rn(t);n[0]-=e;Vn(n);var r=bt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-vt)%(2*Math.PI)}function xr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[e,t]})}}function Tr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[t,e]})}}function Nr(e){return e.source}function Cr(e){return e.target}function kr(e,t,n,r){var i=Math.cos(t),s=Math.sin(t),o=Math.cos(r),u=Math.sin(r),a=i*Math.cos(e),f=i*Math.sin(e),l=o*Math.cos(n),c=o*Math.sin(n),h=2*Math.asin(Math.sqrt(xt(r-t)+i*o*xt(n-e))),p=1/Math.sin(h);var d=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,r=n*a+t*l,i=n*f+t*c,o=n*s+t*u;return[Math.atan2(i,r)*gt,Math.atan2(o,Math.sqrt(r*r+i*i))*gt]}:function(){return[e*gt,t*gt]};d.distance=h;return d}function Or(){function r(r,i){var s=Math.sin(i*=mt),o=Math.cos(i),u=Math.abs((r*=mt)-e),a=Math.cos(u);Lr+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=n*s-t*o*a)*u),t*s+n*o*a);e=r,t=s,n=o}var e,t,n;Ar.point=function(i,s){e=i*mt,t=Math.sin(s*=mt),n=Math.cos(s);Ar.point=r};Ar.lineEnd=function(){Ar.point=Ar.lineEnd=G}}function Mr(e){var t=0,n=dt/3,r=dr(e),i=r(t,n);i.parallels=function(e){if(!arguments.length)return[t/dt*180,n/dt*180];return r(t=e[0]*dt/180,n=e[1]*dt/180)};return i}function _r(e,t){function o(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),s-n*Math.cos(e)]}var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),s=Math.sqrt(i)/r;o.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/r,Math.asin((i-(e*e+n*n)*r*r)/(2*r))]};return o}function Dr(e,t){var n=e(t[0]),r=e([.5*(t[0][0]+t[1][0]),t[0][1]]),i=e([t[1][0],t[0][1]]),s=e(t[1]);var o=r[1]-n[1],u=r[0]-n[0],a=i[1]-r[1],f=i[0]-r[0];var l=o/u,c=a/f;var h=.5*(l*c*(n[1]-i[1])+c*(n[0]+r[0])-l*(r[0]+i[0]))/(c-l),p=(.5*(n[0]+r[0])-h)/l+.5*(n[1]+r[1]);var d=s[0]-h,v=s[1]-p,m=n[0]-h,g=n[1]-p,y=d*d+v*v,b=m*m+g*g;var w=Math.atan2(v,d),E=Math.atan2(g,m);return function(t){var n=t[0]-h,r=t[1]-p,i=n*n+r*r,s=Math.atan2(r,n);if(y<i&&i<b&&w<s&&s<E)return e.invert(t)}}function jr(){function i(e,t){Hr+=r*e-n*t;n=e,r=t}var e,t,n,r;Br.point=function(s,o){Br.point=i;e=n=s,t=r=o};Br.lineEnd=function(){i(e,t)}}function Fr(){function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r);n.point=s}function s(e,n){t.push("L",e,",",n)}function o(){n.point=r}function u(){t.push("Z")}var e=Xr(4.5),t=[];var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(t){e=Xr(t);return n},result:function(){if(t.length){var e=t.join("");t=[];return e}}};return n}function qr(e,t){if(Mn)return;Dn+=e;Pn+=t;++Hn}function Rr(){function n(n,r){var i=n-e,s=r-t,o=Math.sqrt(i*i+s*s);Dn+=o*(e+n)/2;Pn+=o*(t+r)/2;Hn+=o;e=n,t=r}var e,t;if(Mn!==1){if(Mn<1){Mn=1;Dn=Pn=Hn=0}else return}Ir.point=function(r,i){Ir.point=n;e=r,t=i}}function Ur(){Ir.point=qr}function zr(){function i(e,t){var i=r*e-n*t;Dn+=i*(n+e);Pn+=i*(r+t);Hn+=i*3;n=e,r=t}var e,t,n,r;if(Mn<2){Mn=2;Dn=Pn=Hn=0}Ir.point=function(s,o){Ir.point=i;e=n=s,t=r=o};Ir.lineEnd=function(){i(e,t)}}function Wr(e){function r(n,r){e.moveTo(n,r);e.arc(n,r,t,0,2*dt)}function i(t,r){e.moveTo(t,r);n.point=s}function s(t,n){e.lineTo(t,n)}function o(){n.point=r}function u(){e.closePath()}var t=4.5;var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(e){t=e;return n},result:G};return n}function Xr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+ +2*e+"z"}function Vr(e){var t=hr(function(t,n){return e([t*gt,n*gt])});return function(e){e=t(e);return{point:function(t,n){e.point(t*mt,n*mt)},sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}}function $r(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),s=e(r*i);return[s*i*Math.sin(t),s*Math.sin(n)]}n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(e*s,r*o),Math.asin(r&&n*s/r)]};return n}function Qr(e,t){function o(e,t){var n=Math.abs(Math.abs(t)-dt/2)<vt?0:s/Math.pow(r(t),i);return[n*Math.sin(i*e),s-n*Math.cos(i*e)]}var n=Math.cos(e),r=function(e){return Math.tan(dt/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),s=n*Math.pow(r(e),i)/i;if(!i)return Zr;o.invert=function(e,t){var n=s-t,r=yt(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(s/r,1/i))-dt/2]};return o}function Gr(e,t){function s(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(Math.abs(r)<vt)return mr;s.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-yt(r)*Math.sqrt(e*e+n*n)]};return s}function Zr(e,t){return[e,Math.log(Math.tan(dt/4+t/2))]}function ei(e){var t=pr(e),n=t.scale,r=t.translate,i=t.clipExtent,s;t.scale=function(){var e=n.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.translate=function(){var e=r.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.clipExtent=function(e){var o=i.apply(t,arguments);if(o===t){if(s=e==null){var u=dt*n(),a=r();i([[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]])}}else if(s){o=null}return o};return t.clipExtent(null)}function ri(e,t){var n=Math.cos(t)*Math.sin(e);return[Math.log((1+n)/(1-n))/2,Math.atan2(Math.tan(t),Math.cos(e))]}function ii(e){function u(s){function d(){u.push("M",i(e(a),o))}var u=[],a=[],f=-1,l=s.length,c,h=Qt(t),p=Qt(n);while(++f<l){if(r.call(this,c=s[f],f)){a.push([+h.call(this,c,f),+p.call(this,c,f)])}else if(a.length){d();a=[]}}if(a.length)d();return u.length?u.join(""):null}var t=si,n=oi,r=$n,i=ai,s=i.key,o=.7;u.x=function(e){if(!arguments.length)return t;t=e;return u};u.y=function(e){if(!arguments.length)return n;n=e;return u};u.defined=function(e){if(!arguments.length)return r;r=e;return u};u.interpolate=function(e){if(!arguments.length)return s;if(typeof e==="function")s=i=e;else s=(i=ui.get(e)||ai).key;return u};u.tension=function(e){if(!arguments.length)return o;o=e;return u};return u}function si(e){return e[0]}function oi(e){return e[1]}function ai(e){return e.join("L")}function fi(e){return ai(e)+"Z"}function li(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ci(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function hi(e,t){return e.length<4?ai(e):e[1]+vi(e.slice(1,e.length-1),mi(e,t))}function pi(e,t){return e.length<3?ai(e):e[0]+vi((e.push(e[0]),e),mi([e[e.length-2]].concat(e,[e[1]]),t))}function di(e,t){return e.length<3?ai(e):e[0]+vi(e,mi(e,t))}function vi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2){return ai(e)}var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;if(n){r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1];i=e[1];a=2}if(t.length>1){u=t[1];s=e[a];a++;r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++){s=e[a];u=t[f];r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function mi(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a){i=s;s=o;o=e[u];n.push([r*(o[0]-i[0]),r*(o[1]-i[1])])}return n}function gi(e){if(e.length<3)return ai(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];Ni(a,o,u);while(++t<n){r=e[t];o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}t=-1;while(++t<2){o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}return a.join("")}function yi(e){if(e.length<4)return ai(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3){i=e[n];s.push(i[0]);o.push(i[1])}t.push(Ei(Ti,s)+","+Ei(Ti,o));--n;while(++n<r){i=e[n];s.shift();s.push(i[0]);o.shift();o.push(i[1]);Ni(t,s,o)}return t.join("")}function bi(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4){s=e[n%r];o.push(s[0]);u.push(s[1])}t=[Ei(Ti,o),",",Ei(Ti,u)];--n;while(++n<i){s=e[n%r];o.shift();o.push(s[0]);u.shift();u.push(s[1]);Ni(t,o,u)}return t.join("")}function wi(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n){a=e[u];f=u/n;a[0]=t*a[0]+(1-t)*(r+f*s);a[1]=t*a[1]+(1-t)*(i+f*o)}}return gi(e)}function Ei(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Ni(e,t,n){e.push("C",Ei(Si,t),",",Ei(Si,n),",",Ei(xi,t),",",Ei(xi,n),",",Ei(Ti,t),",",Ei(Ti,n))}function Ci(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ki(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Ci(i,s);while(++t<n){r[t]=(o+(o=Ci(i=s,s=e[t+1])))/2}r[t]=o;return r}function Li(e){var t=[],n,r,i,s,o=ki(e),u=-1,a=e.length-1;while(++u<a){n=Ci(e[u],e[u+1]);if(Math.abs(n)<1e-6){o[u]=o[u+1]=0}else{r=o[u]/n;i=o[u+1]/n;s=r*r+i*i;if(s>9){s=n*3/Math.sqrt(s);o[u]=s*r;o[u+1]=s*i}}}u=-1;while(++u<=a){s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u]));t.push([s||0,o[u]*s||0])}return t}function Ai(e){return e.length<3?ai(e):e[0]+vi(e,Li(e))}function Oi(e,t,n,r){var i,s,o,u,a,f,l;i=r[e];s=i[0];o=i[1];i=r[t];u=i[0];a=i[1];i=r[n];f=i[0];l=i[1];return(l-o)*(u-s)-(a-o)*(f-s)>0}function Mi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function _i(e,t,n,r){var i=e[0],s=n[0],o=t[0]-i,u=r[0]-s,a=e[1],f=n[1],l=t[1]-a,c=r[1]-f,h=(u*(a-f)-c*(i-s))/(c*o-u*l);return[i+h*o,a+h*l]}function Pi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null};var r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l");r.rightEnd=r.createHalfEdge(null,"l");r.leftEnd.r=r.rightEnd;r.rightEnd.l=r.leftEnd;r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e;t.r=e.r;e.r.l=t;e.r=t},leftBound:function(e){var t=r.leftEnd;do{t=t.r}while(t!=r.rightEnd&&i.rightOf(t,e));t=t.l;return t},del:function(e){e.l.r=e.r;e.r.l=e.l;e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[Di[e.side]]}};var i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}};var r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;n.c=e.x*r+e.y*i+(r*r+i*i)*.5;if(s>o){n.a=1;n.b=i/r;n.c/=r}else{n.b=1;n.a=r/i;n.c/=i}return n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r){return null}var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10){return null}var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;if(u.y<a.y||u.y==a.y&&u.x<a.x){f=e;l=n}else{f=t;l=r}var c=s>=l.region.r.x;if(c&&f.side==="l"||!c&&f.side==="r"){return null}return{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l"){return 1}if(!i&&e.side==="r"){return 0}if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;if(!i&&n.b<0||i&&n.b>=0){a=u=s>=n.b*o}else{a=t.x+t.y*n.b>n.c;if(n.b<0){a=!a}if(!a){u=1}}if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b);if(n.b<0){a=!a}}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[Di[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}};var s={list:[],insert:function(e,t,n){e.vertex=t;e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x){continue}else{break}}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t){}n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t){if(n[t]==e)return n[t+1]}return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init();n.bottomSite=n.list.shift();var o=n.list.shift(),u;var a,f,l,c,h;var p,d,v,m,g;var y,b;while(true){if(!s.empty()){u=s.min()}if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x)){a=r.leftBound(o);f=r.right(a);p=r.rightRegion(a);y=i.bisect(p,o);h=r.createHalfEdge(y,"l");r.insert(a,h);m=i.intersect(a,h);if(m){s.del(a);s.insert(a,m,i.distance(m,o))}a=h;h=r.createHalfEdge(y,"r");r.insert(a,h);m=i.intersect(h,f);if(m){s.insert(h,m,i.distance(m,o))}o=n.list.shift()}else if(!s.empty()){a=s.extractMin();l=r.left(a);f=r.right(a);c=r.right(f);p=r.leftRegion(a);d=r.rightRegion(f);g=a.vertex;i.endPoint(a.edge,a.side,g);i.endPoint(f.edge,f.side,g);r.del(a);s.del(f);r.del(f);b="l";if(p.y>d.y){v=p;p=d;d=v;b="r"}y=i.bisect(p,d);h=r.createHalfEdge(y,b);r.insert(l,h);i.endPoint(y,Di[b],g);m=i.intersect(l,h);if(m){s.del(l);s.insert(l,m,i.distance(m,p))}m=i.intersect(h,c);if(m){s.insert(h,m,i.distance(m,p))}}else{break}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a)){t(a.edge)}}function Hi(e){return e.x}function Bi(e){return e.y}function ji(){return{leaf:true,nodes:[],point:null,x:null,y:null}}function Fi(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;if(a[0])Fi(e,a[0],n,r,o,u);if(a[1])Fi(e,a[1],o,r,i,u);if(a[2])Fi(e,a[2],n,u,o,s);if(a[3])Fi(e,a[3],o,u,i,s)}}function Ii(t,n){t=e.rgb(t);n=e.rgb(n);var r=t.r,i=t.g,s=t.b,o=n.r-r,u=n.g-i,a=n.b-s;return function(e){return"#"+zt(Math.round(r+o*e))+zt(Math.round(i+u*e))+zt(Math.round(s+a*e))}}function qi(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ui(t),i=Ri(t,n),s=Ui(zi(n,t,-i))||0;if(t[0]*n[1]<n[0]*t[1]){t[0]*=-1;t[1]*=-1;r*=-1;i*=-1}this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*gt;this.translate=[e.e,e.f];this.scale=[r,s];this.skew=s?Math.atan2(i,s)*gt:0}function Ri(e,t){return e[0]*t[0]+e[1]*t[1]}function Ui(e){var t=Math.sqrt(Ri(e,e));if(t){e[0]/=t;e[1]/=t}return t}function zi(e,t,n){e[0]+=n*t[0];e[1]+=n*t[1];return e}function Xi(e,t){t-=e=+e;return function(n){return e+t*n}}function Vi(t,n){var r=[],i=[],s,o=e.transform(t),u=e.transform(n),a=o.translate,f=u.translate,l=o.rotate,c=u.rotate,h=o.skew,p=u.skew,d=o.scale,v=u.scale;if(a[0]!=f[0]||a[1]!=f[1]){r.push("translate(",null,",",null,")");i.push({i:1,x:Xi(a[0],f[0])},{i:3,x:Xi(a[1],f[1])})}else if(f[0]||f[1]){r.push("translate("+f+")")}else{r.push("")}if(l!=c){if(l-c>180)c+=360;else if(c-l>180)l+=360;i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:Xi(l,c)})}else if(c){r.push(r.pop()+"rotate("+c+")")}if(h!=p){i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:Xi(h,p)})}else if(p){r.push(r.pop()+"skewX("+p+")")}if(d[0]!=v[0]||d[1]!=v[1]){s=r.push(r.pop()+"scale(",null,",",null,")");i.push({i:s-4,x:Xi(d[0],v[0])},{i:s-2,x:Xi(d[1],v[1])})}else if(v[0]!=1||v[1]!=1){r.push(r.pop()+"scale("+v+")")}s=i.length;return function(e){var t=-1,n;while(++t<s)r[(n=i[t]).i]=n.x(e);return r.join("")}}function $i(e,t){var n={},r={},i;for(i in e){if(i in t){n[i]=Gi(i)(e[i],t[i])}else{r[i]=e[i]}}for(i in t){if(!(i in e)){r[i]=t[i]}}return function(e){for(i in n)r[i]=n[i](e);return r}}function Ji(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;e=e+"",t=t+"";Ki.lastIndex=0;for(r=0;n=Ki.exec(t);++r){if(n.index)u.push(t.substring(s,o=n.index));a.push({i:u.length,x:n[0]});u.push(null);s=Ki.lastIndex}if(s<t.length)u.push(t.substring(s));for(r=0,f=a.length;(n=Ki.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i){if(u[l.i+1]==null){u[l.i-1]+=l.x;u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1];u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}}else{if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}}a.splice(r,1);f--;r--}else{l.x=Xi(parseFloat(n[0]),parseFloat(l.x))}}while(r<f){l=a.pop();if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1)}f--}if(u.length===1){return u[0]==null?a[0].x:function(){return t}}return function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}}function Qi(t,n){var r=e.interpolators.length,i;while(--r>=0&&!(i=e.interpolators[r](t,n)));return i}function Gi(e){return e=="transform"?Vi:Qi}function Yi(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(Qi(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}}function ns(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function rs(e){return function(t){return 1-e(1-t)}}function is(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function ss(e){return e*e}function os(e){return e*e*e}function us(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function as(e){return function(t){return Math.pow(t,e)}}function fs(e){return 1-Math.cos(e*dt/2)}function ls(e){return Math.pow(2,10*(e-1))}function cs(e){return 1-Math.sqrt(1-e*e)}function hs(e,t){var n;if(arguments.length<2)t=.45;if(arguments.length)n=t/(2*dt)*Math.asin(1/e);else e=1,n=t/4;return function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*dt/t)}}function ps(e){if(!e)e=1.70158;return function(t){return t*t*((e+1)*t-e)}}function ds(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function vs(t,n){t=e.hcl(t);n=e.hcl(n);var r=t.h,i=t.c,s=t.l,o=n.h-r,u=n.c-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return kt(r+o*e,i+u*e,s+a*e)+""}}function ms(t,n){t=e.hsl(t);n=e.hsl(n);var r=t.h,i=t.s,s=t.l,o=n.h-r,u=n.s-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return pt(r+o*e,i+u*e,s+a*e)+""}}function gs(t,n){t=e.lab(t);n=e.lab(n);var r=t.l,i=t.a,s=t.b,o=n.l-r,u=n.a-i,a=n.b-s;return function(e){return Ht(r+o*e,i+u*e,s+a*e)+""}}function ys(e,t){t-=e;return function(n){return Math.round(e+t*n)}}function bs(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return(n-e)*t}}function ws(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Es(e){var t=e.source,n=e.target,r=xs(t,n),i=[t];while(t!==r){t=t.parent;i.push(t)}var s=i.length;while(n!==r){i.splice(s,0,n);n=n.parent}return i}function Ss(e){var t=[],n=e.parent;while(n!=null){t.push(e);e=n;n=n.parent}t.push(e);return t}function xs(e,t){if(e===t)return e;var n=Ss(e),r=Ss(t),i=n.pop(),s=r.pop(),o=null;while(i===s){o=i;i=n.pop();s=r.pop()}return o}function Ts(e){e.fixed|=2}function Ns(e){e.fixed&=~6}function Cs(e){e.fixed|=4;e.px=e.x,e.py=e.y}function ks(e){e.fixed&=~4}function Ls(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Ls(a,t,n);e.charge+=a.charge;r+=a.charge*a.cx;i+=a.charge*a.cy}}if(e.point){if(!e.leaf){e.point.x+=Math.random()-.5;e.point.y+=Math.random()-.5}var f=t*n[e.point.index];e.charge+=e.pointCharge=f;r+=f*e.point.x;i+=f*e.point.y}e.cx=r/e.charge;e.cy=i/e.charge}function Ms(t,n){e.rebind(t,n,"sort","children","value");t.nodes=t;t.links=Hs;return t}function _s(e){return e.children}function Ds(e){return e.value}function Ps(e,t){return t.value-e.value}function Hs(t){return e.merge(t.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function js(e){return e.x}function Fs(e){return e.y}function Is(e,t,n){e.y0=t;e.y=n}function Us(t){return e.range(t.length)}function zs(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function Ws(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t){if((i=e[t][1])>r){n=t;r=i}}return n}function Xs(e){return e.reduce(Vs,0)}function Vs(e,t){return e+t[1]}function $s(e,t){return Js(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Js(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function Ks(t){return[e.min(t),e.max(t)]}function Qs(e,t){return e.parent==t.parent?1:2}function Gs(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ys(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Zs(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i){if(t(r=Zs(n[s],t),e)>0){e=r}}}return e}function eo(e,t){return e.x-t.x}function to(e,t){return t.x-e.x}function no(e,t){return e.depth-t.depth}function ro(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a){s=i[u];n(s,o);o=s}}t(e,r)}n(e,null)}function io(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0){s=r[i]._tree;s.prelim+=t;s.mod+=t;t+=s.shift+(n+=s.change)}}function so(e,t,n){e=e._tree;t=t._tree;var r=n/(t.number-e.number);e.change+=r;t.change-=r;t.shift+=n;t.prelim+=n;t.mod+=n}function oo(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function uo(e,t){return e.value-t.value}function ao(e,t){var n=e._pack_next;e._pack_next=t;t._pack_prev=e;t._pack_next=n;n._pack_prev=t}function fo(e,t){e._pack_next=t;t._pack_prev=e}function lo(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function co(e){function p(e){n=Math.min(e.x-e.r,n);r=Math.max(e.x+e.r,r);i=Math.min(e.y-e.r,i);s=Math.max(e.y+e.r,s)}if(!(t=e.children)||!(h=t.length))return;var t,n=Infinity,r=-Infinity,i=Infinity,s=-Infinity,o,u,a,f,l,c,h;t.forEach(ho);o=t[0];o.x=-o.r;o.y=0;p(o);if(h>1){u=t[1];u.x=u.r;u.y=0;p(u);if(h>2){a=t[2];mo(o,u,a);p(a);ao(o,a);o._pack_prev=a;ao(a,u);u=o._pack_next;for(f=3;f<h;f++){mo(o,u,a=t[f]);var d=0,v=1,m=1;for(l=u._pack_next;l!==u;l=l._pack_next,v++){if(lo(l,a)){d=1;break}}if(d==1){for(c=o._pack_prev;c!==l._pack_prev;c=c._pack_prev,m++){if(lo(c,a)){break}}}if(d){if(v<m||v==m&&u.r<o.r)fo(o,u=l);else fo(o=c,u);f--}else{ao(o,a);u=a;p(a)}}}}var g=(n+r)/2,y=(i+s)/2,b=0;for(f=0;f<h;f++){a=t[f];a.x-=g;a.y-=y;b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y))}e.r=b;t.forEach(po)}function ho(e){e._pack_next=e._pack_prev=e}function po(e){delete e._pack_next;delete e._pack_prev}function vo(e,t,n,r){var i=e.children;e.x=t+=r*e.x;e.y=n+=r*e.y;e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)vo(i[s],t,n,r)}}function mo(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o;r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s;n.y=e.y+a*s-f*i}else{n.x=e.x+r;n.y=e.y}}function go(t){return 1+e.max(t,function(e){return e.y})}function yo(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function bo(e){var t=e.children;return t&&t.length?bo(t[0]):e}function wo(e){var t=e.children,n;return t&&(n=t.length)?wo(t[n-1]):e}function Eo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function So(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];if(i<0){n+=i/2;i=0}if(s<0){r+=s/2;s=0}return{x:n,y:r,dx:i,dy:s}}function xo(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function To(e){return e.rangeExtent?e.rangeExtent():xo(e.range())}function No(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Co(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;if(s<i){o=n,n=r,r=o;o=i,i=s,s=o}if(t=t(s-i)){e[n]=t.floor(i);e[r]=t.ceil(s)}return e}function ko(t,n,r,i){var s=[],o=[],u=0,a=Math.min(t.length,n.length)-1;if(t[a]<t[0]){t=t.slice().reverse();n=n.slice().reverse()}while(++u<=a){s.push(r(t[u-1],t[u]));o.push(i(n[u-1],n[u]))}return function(n){var r=e.bisect(t,n,1,a)-1;return o[r](s[r](n))}}function Lo(e,t,n,r){function o(){var o=Math.min(e.length,t.length)>2?ko:No,a=r?ws:bs;i=o(e,t,a,n);s=o(t,e,a,Qi);return u}function u(e){return i(e)}var i,s;u.invert=function(e){return s(e)};u.domain=function(t){if(!arguments.length)return e;e=t.map(Number);return o()};u.range=function(e){if(!arguments.length)return t;t=e;return o()};u.rangeRound=function(e){return u.range(e).interpolate(ys)};u.clamp=function(e){if(!arguments.length)return r;r=e;return o()};u.interpolate=function(e){if(!arguments.length)return n;n=e;return o()};u.ticks=function(t){return _o(e,t)};u.tickFormat=function(t,n){return Do(e,t,n)};u.nice=function(){Co(e,Oo);return o()};u.copy=function(){return Lo(e,t,n,r)};return o()}function Ao(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Oo(e){e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1);return e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Mo(e,t){var n=xo(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;if(s<=.15)i*=10;else if(s<=.35)i*=5;else if(s<=.75)i*=2;n[0]=Math.ceil(n[0]/i)*i;n[1]=Math.floor(n[1]/i)*i+i*.5;n[2]=i;return n}function _o(t,n){return e.range.apply(e,Mo(t,n))}function Do(t,n,r){var i=-Math.floor(Math.log(Mo(t,n)[2])/Math.LN10+.01);return e.format(r?r.replace(dn,function(e,t,n,r,s,o,u,a,f,l){return[t,n,r,s,o,u,a,f||"."+(i-(l==="%")*2),l].join("")}):",."+i+"f")}function Po(e,t,n,r){function i(t){return e(n(t))}i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);if(t[0]<0)n=Fo,r=Io;else n=Bo,r=jo;e.domain(t.map(n));return i};i.base=function(e){if(!arguments.length)return t;t=+e;return i};i.nice=function(){e.domain(Co(e.domain(),qo(t)));return i};i.ticks=function(){var i=xo(e.domain()),s=[];if(i.every(isFinite)){var o=Math.log(t),u=Math.floor(i[0]/o),a=Math.ceil(i[1]/o),f=r(i[0]),l=r(i[1]),c=t%1?2:t;if(n===Fo){s.push(-Math.pow(t,-u));for(;u++<a;)for(var h=c-1;h>0;h--)s.push(-Math.pow(t,-u)*h)}else{for(;u<a;u++)for(var h=1;h<c;h++)s.push(Math.pow(t,u)*h);s.push(Math.pow(t,u))}for(u=0;s[u]<f;u++){}for(a=s.length;s[a-1]>l;a--){}s=s.slice(u,a)}return s};i.tickFormat=function(e,s){if(arguments.length<2)s=Ho;if(!arguments.length)return s;var o=Math.log(t),u=Math.max(.1,e/i.ticks().length),a=n===Fo?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil),f;return function(e){return e/r(o*a(n(e)/o+f))<=u?s(e):""}};i.copy=function(){return Po(e.copy(),t,n,r)};return Ao(i,e)}function Bo(e){return Math.log(e<0?0:e)}function jo(e){return Math.exp(e)}function Fo(e){return-Math.log(e>0?0:-e)}function Io(e){return-Math.exp(-e)}function qo(e){e=Math.log(e);var t={floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}};return function(){return t}}function Ro(e,t){function i(t){return e(n(t))}var n=Uo(t),r=Uo(1/t);i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);e.domain(t.map(n));return i};i.ticks=function(e){return _o(i.domain(),e)};i.tickFormat=function(e,t){return Do(i.domain(),e,t)};i.nice=function(){return i.domain(Co(i.domain(),Oo))};i.exponent=function(e){if(!arguments.length)return t;var s=i.domain();n=Uo(t=e);r=Uo(1/t);return i.domain(s)};i.copy=function(){return Ro(e.copy(),t)};return Ao(i,e)}function Uo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function zo(t,n){function o(e){return i[((r.get(e)||r.set(e,t.push(e)))-1)%i.length]}function u(n,r){return e.range(t.length).map(function(e){return n+r*e})}var r,i,s;o.domain=function(e){if(!arguments.length)return t;t=[];r=new c;var i=-1,s=e.length,u;while(++i<s)if(!r.has(u=e[i]))r.set(u,t.push(u));return o[n.t].apply(o,n.a)};o.range=function(e){if(!arguments.length)return i;i=e;s=0;n={t:"range",a:arguments};return o};o.rangePoints=function(e,r){if(arguments.length<2)r=0;var a=e[0],f=e[1],l=(f-a)/(Math.max(1,t.length-1)+r);i=u(t.length<2?(a+f)/2:a+l*r/2,l);s=0;n={t:"rangePoints",a:arguments};return o};o.rangeBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=(c-l)/(t.length-r+2*a);i=u(l+h*a,h);if(f)i.reverse();s=h*(1-r);n={t:"rangeBands",a:arguments};return o};o.rangeRoundBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=Math.floor((c-l)/(t.length-r+2*a)),p=c-l-(t.length-r)*h;i=u(l+Math.round(p/2),h);if(f)i.reverse();s=Math.round(h*(1-r));n={t:"rangeRoundBands",a:arguments};return o};o.rangeBand=function(){if(s<=50)return s;else return 50};o.rangeExtent=function(){return xo(n.a[0])};o.copy=function(){return zo(t,n)};return o.domain(t)}function Ko(t,n){function i(){var i=0,o=n.length;r=[];while(++i<o)r[i-1]=e.quantile(t,i/o);return s}function s(t){if(isNaN(t=+t))return NaN;return n[e.bisect(r,t)]}var r;s.domain=function(n){if(!arguments.length)return t;t=n.filter(function(e){return!isNaN(e)}).sort(e.ascending);return i()};s.range=function(e){if(!arguments.length)return n;n=e;return i()};s.quantiles=function(){return r};s.copy=function(){return Ko(t,n)};return i()}function Qo(e,t,n){function s(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function o(){r=n.length/(t-e);i=n.length-1;return s}var r,i;s.domain=function(n){if(!arguments.length)return[e,t];e=+n[0];t=+n[n.length-1];return o()};s.range=function(e){if(!arguments.length)return n;n=e;return o()};s.copy=function(){return Qo(e,t,n)};return o()}function Go(t,n){function r(r){return n[e.bisect(t,r)]}r.domain=function(e){if(!arguments.length)return t;t=e;return r};r.range=function(e){if(!arguments.length)return n;n=e;return r};r.copy=function(){return Go(t,n)};return r}function Yo(e){function t(e){return+e}t.invert=t;t.domain=t.range=function(n){if(!arguments.length)return e;e=n.map(t);return t};t.ticks=function(t){return _o(e,t)};t.tickFormat=function(t,n){return Do(e,t,n)};t.copy=function(){return Yo(e)};return t}function tu(e){return e.innerRadius}function nu(e){return e.outerRadius}function ru(e){return e.startAngle}function iu(e){return e.endAngle}function su(e){var t,n=-1,r=e.length,i,s;while(++n<r){t=e[n];i=t[0];s=t[1]+Zo;t[0]=i*Math.cos(s);t[1]=i*Math.sin(s)}return e}function ou(e){function c(u){function x(){c.push("M",o(e(p),l),f,a(e(h.reverse()),l),"Z")}var c=[],h=[],p=[],d=-1,v=u.length,m,g=Qt(t),y=Qt(r),b=t===n?function(){return E}:Qt(n),w=r===i?function(){return S}:Qt(i),E,S;while(++d<v){if(s.call(this,m=u[d],d)){h.push([E=+g.call(this,m,d),S=+y.call(this,m,d)]);p.push([+b.call(this,m,d),+w.call(this,m,d)])}else if(h.length){x();h=[];p=[]}}if(h.length)x();return c.length?c.join(""):null}var t=si,n=si,r=0,i=oi,s=$n,o=ai,u=o.key,a=o,f="L",l=.7;c.x=function(e){if(!arguments.length)return n;t=n=e;return c};c.x0=function(e){if(!arguments.length)return t;t=e;return c};c.x1=function(e){if(!arguments.length)return n;n=e;return c};c.y=function(e){if(!arguments.length)return i;r=i=e;return c};c.y0=function(e){if(!arguments.length)return r;r=e;return c};c.y1=function(e){if(!arguments.length)return i;i=e;return c};c.defined=function(e){if(!arguments.length)return s;s=e;return c};c.interpolate=function(e){if(!arguments.length)return u;if(typeof e==="function")u=o=e;else u=(o=ui.get(e)||ai).key;a=o.reverse||o;f=o.closed?"M":"L";return c};c.tension=function(e){if(!arguments.length)return l;l=e;return c};return c}function uu(e){return e.radius}function au(e){return[e.x,e.y]}function fu(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Zo;return[n*Math.cos(r),n*Math.sin(r)]}}function lu(){return 64}function cu(){return"circle"}function hu(e){var t=Math.sqrt(e/dt);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function mu(e,t){A(e,gu);e.id=t;return e}function Eu(e,t,n,r){var i=e.id;return nt(e,typeof n==="function"?function(e,s,o){e.__transition__[i].tween.set(t,r(n.call(e,e.__data__,s,o)))}:(n=r(n),function(e){e.__transition__[i].tween.set(t,n)}))}function Su(e){if(e==null)e="";return function(){this.textContent=e}}function xu(t,n,r,i){var s=t.__transition__||(t.__transition__={active:0,count:0}),o=s[r];if(!o){var u=i.time;o=s[r]={tween:new c,event:e.dispatch("start","end"),time:u,ease:i.ease,delay:i.delay,duration:i.duration};++s.count;e.timer(function(i){function d(i){if(s.active>r)return m();s.active=r;l.start.call(t,a,n);o.tween.forEach(function(e,r){if(r=r.call(t,a,n)){p.push(r)}});if(!v(i))e.timer(v,0,u);return 1}function v(e){if(s.active!==r)return m();var i=(e-c)/h,o=f(i),u=p.length;while(u>0){p[--u].call(t,o)}if(i>=1){m();l.end.call(t,a,n);return 1}}function m(){if(--s.count)delete s[r];else delete t.__transition__;return 1}var a=t.__data__,f=o.ease,l=o.event,c=o.delay,h=o.duration,p=[];return c<=i?d(i):e.timer(d,c,u),1},0,u);return o}}function Cu(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function ku(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Lu(e,t,n){i=[];if(n&&t.length>1){var r=xo(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o){for(a=n;--a>0;){if((f=+t[s]-a*u)>=r[0]){i.push(f)}}}for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];){i.push(f)}}return i}function Du(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Uu(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){t(n=e(new Mu(n-1)),1);return n}function s(e,n){t(e=new Mu(+e),n);return e}function o(e,r,s){var o=i(e),u=[];if(s>1){while(o<r){if(!(n(o)%s))u.push(new Date(+o));t(o,1)}}else{while(o<r)u.push(new Date(+o)),t(o,1)}return u}function u(e,t,n){try{Mu=Du;var r=new Du;r._=e;return o(r,t,n)}finally{Mu=Date}}e.floor=e;e.round=r;e.ceil=i;e.offset=s;e.range=o;var a=e.utc=zu(e);a.floor=a;a.round=zu(r);a.ceil=zu(i);a.offset=zu(s);a.range=u;return e}function zu(e){return function(t,n){try{Mu=Du;var r=new Du;r._=t;return e(r,n)._}finally{Mu=Date}}}function Wu(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i===37){s=na[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++)){return-1}}return r}function Xu(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Vu(e){var t=new c,n=-1,r=e.length;while(++n<r)t.set(e[n].toLowerCase(),n);return t}function $u(e,t,n){e+="";var r=e.length;return r<n?(new Array(n-r+1)).join(t)+e:e}function ra(e,t,n){Ku.lastIndex=0;var r=Ku.exec(t.substring(n));return r?n+=r[0].length:-1}function ia(e,t,n){Ju.lastIndex=0;var r=Ju.exec(t.substring(n));return r?n+=r[0].length:-1}function sa(e,t,n){Yu.lastIndex=0;var r=Yu.exec(t.substring(n));return r?(e.m=Zu.get(r[0].toLowerCase()),n+=r[0].length):-1}function oa(e,t,n){Qu.lastIndex=0;var r=Qu.exec(t.substring(n));return r?(e.m=Gu.get(r[0].toLowerCase()),n+=r[0].length):-1}function ua(e,t,n){return Wu(e,ta.c.toString(),t,n)}function aa(e,t,n){return Wu(e,ta.x.toString(),t,n)}function fa(e,t,n){return Wu(e,ta.X.toString(),t,n)}function la(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function ca(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.y=ha(+r[0]),n+=r[0].length):-1}function ha(e){return e+(e>68?1900:2e3)}function pa(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function da(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function va(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function ma(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function ga(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function ya(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function wa(e,t,n){var r=Ea.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function Sa(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+$u(r,"0",2)+$u(i,"0",2)}function Ta(e){return e.toISOString()}function Na(t,n,r){function i(e){return t(e)}i.invert=function(e){return ka(t.invert(e))};i.domain=function(e){if(!arguments.length)return t.domain().map(ka);t.domain(e);return i};i.nice=function(e){return i.domain(Co(i.domain(),function(){return e}))};i.ticks=function(r,s){var o=Ca(i.domain());if(typeof r!=="function"){var u=o[1]-o[0],a=u/r,f=e.bisect(Ma,a);if(f==Ma.length)return n.year(o,r);if(!f)return t.ticks(r).map(ka);if(Math.log(a/Ma[f-1])<Math.log(Ma[f]/a))--f;r=n[f];s=r[1];r=r[0].range}return r(o[0],new Date(+o[1]+1),s)};i.tickFormat=function(){return r};i.copy=function(){return Na(t.copy(),n,r)};return e.rebind(i,t,"range","rangeRound","interpolate","clamp")}function Ca(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function ka(e){return new Date(e)}function La(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function Aa(e){var t=new Date(e,0,1);t.setFullYear(e);return t}function Oa(e){var t=e.getFullYear(),n=Aa(t),r=Aa(t+1);return t+(e-n)/(r-n)}function Ia(e){var t=new Date(Date.UTC(e,0,1));t.setUTCFullYear(e);return t}function qa(e){var t=e.getUTCFullYear(),n=Ia(t),r=Ia(t+1);return t+(e-n)/(r-n)}function Ra(e){return e.responseText}function Ua(e){return JSON.parse(e.responseText)}function za(e){var n=t.createRange();n.selectNode(t.body);return n.createContextualFragment(e.responseText)}function Wa(e){return e.responseXML}var e={version:"3.1.5"};if(!Date.now)Date.now=function(){return+(new Date)};var t=document,n=window;try{t.createElement("div").style.setProperty("opacity",0,"")}catch(r){var i=n.CSSStyleDeclaration.prototype,s=i.setProperty;i.setProperty=function(e,t,n){s.call(this,e,t+"",n)}}e.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN};e.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&i>s)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&i>s)i=s}return i};e.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&s>i)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&s>i)i=s}return i};e.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)if((s=e[n])!=null){if(i>s)i=s;if(o<s)o=s}}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null){if(i>s)i=s;if(o<s)o=s}}return[i,o]};e.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1){while(++s<r)if(!isNaN(i=+e[s]))n+=i}else{while(++s<r)if(!isNaN(i=+t.call(e,e[s],s)))n+=i}return n};e.mean=function(e,t){var n=e.length,r,i=0,s=-1,u=0;if(arguments.length===1){while(++s<n)if(o(r=e[s]))i+=(r-i)/++u}else{while(++s<n)if(o(r=t.call(e,e[s],s)))i+=(r-i)/++u}return u?i:undefined};e.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],s=n-r;return s?i+s*(e[r]-i):i};e.median=function(t,n){if(arguments.length>1)t=t.map(n);t=t.filter(o);return t.length?e.quantile(t.sort(e.ascending),.5):undefined};e.bisector=function(e){return{left:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(e.call(t,t[s],s)<n)r=s+1;else i=s}return r},right:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(n<e.call(t,t[s],s))i=s;else r=s+1}return r}}};var u=e.bisector(function(e){return e});e.bisectLeft=u.left;e.bisect=e.bisectRight=u.right;e.shuffle=function(e){var t=e.length,n,r;while(t){r=Math.random()*t--|0;n=e[t],e[t]=e[r],e[r]=n}return e};e.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n};e.zip=function(){if(!(s=arguments.length))return[];for(var t=-1,n=e.min(arguments,a),r=new Array(n);++t<n;){for(var i=-1,s,o=r[t]=new Array(s);++i<s;){o[i]=arguments[i][t]}}return r};e.transpose=function(t){return e.zip.apply(e,t)};e.keys=function(e){var t=[];for(var n in e)t.push(n);return t};e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t};e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};e.merge=function(e){return Array.prototype.concat.apply([],e)};e.range=function(e,t,n){if(arguments.length<3){n=1;if(arguments.length<2){t=e;e=0}}if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=f(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r};e.map=function(e){var t=new c;for(var n in e)t.set(n,e[n]);return t};l(c,{has:function(e){return h+e in this},get:function(e){return this[h+e]},set:function(e,t){return this[h+e]=t},remove:function(e){e=h+e;return e in this&&delete this[e]},keys:function(){var e=[];this.forEach(function(t){e.push(t)});return e},values:function(){var e=[];this.forEach(function(t,n){e.push(n)});return e},entries:function(){var e=[];this.forEach(function(t,n){e.push({key:t,value:n})});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1),this[t])}}}});var h="\0",p=h.charCodeAt(0);e.nest=function(){function o(e,r,u){if(u>=n.length)return s?s.call(t,r):i?r.sort(i):r;var a=-1,f=r.length,l=n[u++],h,p,d,v=new c,m;while(++a<f){if(m=v.get(h=l(p=r[a]))){m.push(p)}else{v.set(h,[p])}}if(e){p=e();d=function(t,n){p.set(t,o(e,n,u))}}else{p={};d=function(t,n){p[t]=o(e,n,u)}}v.forEach(d);return p}function u(e,t){if(t>=n.length)return e;var i=[],s=r[t++];e.forEach(function(e,n){i.push({key:e,values:u(n,t)})});return s?i.sort(function(e,t){return s(e.key,t.key)}):i}var t={},n=[],r=[],i,s;t.map=function(e,t){return o(t,e,0)};t.entries=function(t){return u(o(e.map,t,0),0)};t.key=function(e){n.push(e);return t};t.sortKeys=function(e){r[n.length-1]=e;return t};t.sortValues=function(e){i=e;return t};t.rollup=function(e){s=e;return t};return t};e.set=function(e){var t=new d;if(e)for(var n=0;n<e.length;n++)t.add(e[n]);return t};l(d,{has:function(e){return h+e in this},add:function(e){this[h+e]=true;return e},remove:function(e){e=h+e;return e in this&&delete this[e]},values:function(){var e=[];this.forEach(function(t){e.push(t)});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1))}}}});e.behavior={};e.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=v(e,t,t[i]);return e};e.dispatch=function(){var e=new m,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=g(e);return e};m.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0){r=e.substring(n+1);e=e.substring(0,n)}if(e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(arguments.length===2){if(t==null)for(e in this){if(this.hasOwnProperty(e))this[e].on(r,null)}return this}};e.event=null;e.mouse=function(e){return T(e,w())};var x=/WebKit/.test(n.navigator.userAgent)?-1:0;var N=k;try{N(t.documentElement.childNodes)[0].nodeType}catch(L){N=C}var A=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};e.touches=function(e,t){if(arguments.length<2)t=w().touches;return t?N(t).map(function(t){var n=T(e,t);n.identifier=t.identifier;return n}):[]};e.behavior.drag=function(){function i(){this.on("mousedown.drag",s).on("touchstart.drag",s)}function s(){function h(){var t=i.parentNode;return u!=null?e.touches(t).filter(function(e){return e.identifier===u})[0]:e.mouse(t)}function p(){if(!i.parentNode)return d();var e=h(),t=e[0]-f[0],n=e[1]-f[1];l|=t|n;f=e;y();s({type:"drag",x:e[0]+a[0],y:e[1]+a[1],dx:t,dy:n})}function d(){s({type:"dragend"});if(l){y();if(e.event.target===o)E(c,"click")}c.on(u!=null?"touchmove.drag-"+u:"mousemove.drag",null).on(u!=null?"touchend.drag-"+u:"mouseup.drag",null)}var i=this,s=t.of(i,arguments),o=e.event.target,u=e.event.touches?e.event.changedTouches[0].identifier:null,a,f=h(),l=0;var c=e.select(n).on(u!=null?"touchmove.drag-"+u:"mousemove.drag",p).on(u!=null?"touchend.drag-"+u:"mouseup.drag",d,true);if(r){a=r.apply(i,arguments);a=[a.x-f[0],a.y-f[1]]}else{a=[0,0]}if(u==null)y();s({type:"dragstart"})}var t=S(i,"drag","dragstart","dragend"),r=null;i.origin=function(e){if(!arguments.length)return r;r=e;return i};return e.rebind(i,t,"on")};var M=function(e,t){return t.querySelector(e)},_=function(e,t){return t.querySelectorAll(e)},D=t.documentElement,P=D.matchesSelector||D.webkitMatchesSelector||D.mozMatchesSelector||D.msMatchesSelector||D.oMatchesSelector,H=function(e,t){return P.call(e,t)};if(typeof Sizzle==="function"){M=function(e,t){return Sizzle(e,t)[0]||null};_=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))};H=Sizzle.matchesSelector}var B=[];e.selection=function(){return st};e.selection.prototype=B;B.select=function(e){var t=[],n,r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){t.push(n=[]);n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;){if(s=i[a]){n.push(r=e.call(s,s.__data__,a));if(r&&"__data__"in s)r.__data__=s.__data__}else{n.push(null)}}}return O(t)};B.selectAll=function(e){var t=[],n,r;if(typeof e!=="function")e=F(e);for(var i=-1,s=this.length;++i<s;){for(var o=this[i],u=-1,a=o.length;++u<a;){if(r=o[u]){t.push(n=N(e.call(r,r.__data__,u)));n.parentNode=r}}}return O(t)};var I={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:I,qualify:function(e){var t=e.indexOf(":"),n=e;if(t>=0){n=e.substring(0,t);e=e.substring(t+1)}return I.hasOwnProperty(n)?{space:I[n],local:e}:e}};B.attr=function(t,n){if(arguments.length<2){if(typeof t==="string"){var r=this.node();t=e.ns.qualify(t);return t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each(q(n,t[n]));return this}return this.each(q(t,n))};e.requote=function(e){return e.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;B.classed=function(e,t){if(arguments.length<2){if(typeof e==="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return false}else{t=n.getAttribute("class");while(++i<r)if(!z(e[i]).test(t))return false}return true}for(t in e)this.each(W(t,e[t]));return this}return this.each(W(e,t))};B.style=function(e,t,r){var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.each(V(r,e[r],t));return this}if(i<2)return n.getComputedStyle(this.node(),null).getPropertyValue(e);r=""}return this.each(V(e,t,r))};B.property=function(e,t){if(arguments.length<2){if(typeof e==="string")return this.node()[e];for(t in e)this.each($(t,e[t]));return this}return this.each($(e,t))};B.text=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent};B.html=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML};B.append=function(n){function r(){return this.appendChild(t.createElementNS(this.namespaceURI,n))}function i(){return this.appendChild(t.createElementNS(n.space,n.local))}n=e.ns.qualify(n);return this.select(n.local?i:r)};B.insert=function(n,r){function i(e,i){return this.insertBefore(t.createElementNS(this.namespaceURI,n),r.call(this,e,i))}function s(e,i){return this.insertBefore(t.createElementNS(n.space,n.local),r.call(this,e,i))}n=e.ns.qualify(n);if(typeof r!=="function")r=j(r);return this.select(n.local?s:i)};B.remove=function(){return this.each(function(){var e=this.parentNode;if(e)e.removeChild(this)})};B.data=function(e,t){function o(e,n){var r,i=e.length,s=n.length,o=Math.min(i,s),l=new Array(s),h=new Array(s),p=new Array(i),d,v;if(t){var m=new c,g=new c,y=[],b;for(r=-1;++r<i;){b=t.call(d=e[r],d.__data__,r);if(m.has(b)){p[r]=d}else{m.set(b,d)}y.push(b)}for(r=-1;++r<s;){b=t.call(n,v=n[r],r);if(d=m.get(b)){l[r]=d;d.__data__=v}else if(!g.has(b)){h[r]=J(v)}g.set(b,v);m.remove(b)}for(r=-1;++r<i;){if(m.has(y[r])){p[r]=e[r]}}}else{for(r=-1;++r<o;){d=e[r];v=n[r];if(d){d.__data__=v;l[r]=d}else{h[r]=J(v)}}for(;r<s;++r){h[r]=J(n[r])}for(;r<i;++r){p[r]=e[r]}}h.update=l;h.parentNode=l.parentNode=p.parentNode=e.parentNode;u.push(h);a.push(l);f.push(p)}var n=-1,r=this.length,i,s;if(!arguments.length){e=new Array(r=(i=this[0]).length);while(++n<r){if(s=i[n]){e[n]=s.__data__}}return e}var u=rt([]),a=O([]),f=O([]);if(typeof e==="function"){while(++n<r){o(i=this[n],e.call(i,i.parentNode.__data__,n))}}else{while(++n<r){o(i=this[n],e)}}a.enter=function(){return u};a.exit=function(){return f};return a};B.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")};B.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return O(t)};B.order=function(){for(var e=-1,t=this.length;++e<t;){for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;){if(s=n[r]){if(i&&i!==s.nextSibling)i.parentNode.insertBefore(s,i);i=s}}}return this};B.sort=function(e){e=Q.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()};B.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!=="string"){if(r<2)t=false;for(n in e)this.each(Y(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=false}return this.each(Y(e,t,n))};var Z=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});Z.forEach(function(e){if("on"+e in t)Z.remove(e)});B.each=function(e){return nt(this,function(t,n,r){e.call(t,t.__data__,n,r)})};B.call=function(e){var t=N(arguments);e.apply(t[0]=this,t);return this};B.empty=function(){return!this.node()};B.node=function(){for(var e=0,t=this.length;e<t;e++){for(var n=this[e],r=0,i=n.length;r<i;r++){var s=n[r];if(s)return s}}return null};var it=[];e.selection.enter=rt;e.selection.enter.prototype=it;it.append=B.append;it.insert=B.insert;it.empty=B.empty;it.node=B.node;it.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update;t.push(n=[]);n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;){if(o=s[f]){n.push(i[f]=r=e.call(s.parentNode,o.__data__,f));r.__data__=o.__data__}else{n.push(null)}}}return O(t)};B.transition=function(){var e=bu||++yu,t=[],n,r,i=Object.create(wu);i.time=Date.now();for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;){if(r=u[a])xu(r,a,e,i);n.push(r)}}return mu(t,e)};var st=O([[t]]);st[0].parentNode=D;e.select=function(e){return typeof e==="string"?st.select(e):O([[e]])};e.selectAll=function(e){return typeof e==="string"?st.selectAll(e):O([N(e)])};e.behavior.zoom=function(){function p(){this.on("mousedown.zoom",x).on("mousemove.zoom",N).on(at+".zoom",T).on("dblclick.zoom",C).on("touchstart.zoom",k).on("touchmove.zoom",L).on("touchend.zoom",k)}function d(e){return[(e[0]-t[0])/i,(e[1]-t[1])/i]}function v(e){return[e[0]*i+t[0],e[1]*i+t[1]]}function m(e){i=Math.max(o[0],Math.min(o[1],e))}function g(e,n){n=v(n);t[0]+=e[0]-n[0];t[1]+=e[1]-n[1]}function b(){if(f)f.domain(a.range().map(function(e){return(e-t[0])/i}).map(a.invert));if(c)c.domain(l.range().map(function(e){return(e-t[1])/i}).map(l.invert))}function w(n){b();e.event.preventDefault();n({type:"zoom",scale:i,translate:t})}function x(){function f(){s=1;g(e.mouse(t),a);w(r)}function l(){if(s)y();o.on("mousemove.zoom",null).on("mouseup.zoom",null);if(s&&e.event.target===i)E(o,"click.zoom")}var t=this,r=u.of(t,arguments),i=e.event.target,s=0,o=e.select(n).on("mousemove.zoom",f).on("mouseup.zoom",l),a=d(e.mouse(t));n.focus();y()}function T(){if(!r)r=d(e.mouse(this));m(Math.pow(2,ut()*.002)*i);g(e.mouse(this),r);w(u.of(this,arguments))}function N(){r=null}function C(){var t=e.mouse(this),n=d(t),r=Math.log(i)/Math.LN2;m(Math.pow(2,e.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1));g(t,n);w(u.of(this,arguments))}function k(){var t=e.touches(this),n=Date.now();s=i;r={};t.forEach(function(e){r[e.identifier]=d(e)});y();if(t.length===1){if(n-h<500){var o=t[0],a=d(t[0]);m(i*2);g(o,a);w(u.of(this,arguments))}h=n}}function L(){var t=e.touches(this),n=t[0],i=r[n.identifier];if(o=t[1]){var o,a=r[o.identifier];n=[(n[0]+o[0])/2,(n[1]+o[1])/2];i=[(i[0]+a[0])/2,(i[1]+a[1])/2];m(e.event.scale*s)}g(n,i);h=null;w(u.of(this,arguments))}var t=[0,0],r,i=1,s,o=ot,u=S(p,"zoom"),a,f,l,c,h;p.translate=function(e){if(!arguments.length)return t;t=e.map(Number);b();return p};p.scale=function(e){if(!arguments.length)return i;i=+e;b();return p};p.scaleExtent=function(e){if(!arguments.length)return o;o=e==null?ot:e.map(Number);return p};p.x=function(e){if(!arguments.length)return f;f=e;a=e.copy();t=[0,0];i=1;return p};p.y=function(e){if(!arguments.length)return c;c=e;l=e.copy();t=[0,0];i=1;return p};return e.rebind(p,u,"on")};var ot=[0,Infinity];var ut,at="onwheel"in t?(ut=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in t?(ut=function(){return e.event.wheelDelta},"mousewheel"):(ut=function(){return-e.event.detail},"MozMousePixelScroll");ft.prototype.toString=function(){return this.rgb()+""};e.hsl=function(e,t,n){return arguments.length===1?e instanceof ct?lt(e.h,e.s,e.l):Wt(""+e,Xt,lt):lt(+e,+t,+n)};var ht=ct.prototype=new ft;ht.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,this.l/e)};ht.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,e*this.l)};ht.rgb=function(){return pt(this.h,this.s,this.l)};var dt=Math.PI,vt=1e-6,mt=dt/180,gt=180/dt;e.hcl=function(t,n,r){return arguments.length===1?t instanceof Nt?Tt(t.h,t.c,t.l):t instanceof At?Bt(t.l,t.a,t.b):Bt((t=Vt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):Tt(+t,+n,+r)};var Ct=Nt.prototype=new ft;Ct.brighter=function(e){return Tt(this.h,this.c,Math.min(100,this.l+Ot*(arguments.length?e:1)))};Ct.darker=function(e){return Tt(this.h,this.c,Math.max(0,this.l-Ot*(arguments.length?e:1)))};Ct.rgb=function(){return kt(this.h,this.c,this.l).rgb()};e.lab=function(t,n,r){return arguments.length===1?t instanceof At?Lt(t.l,t.a,t.b):t instanceof Nt?kt(t.l,t.c,t.h):Vt((t=e.rgb(t)).r,t.g,t.b):Lt(+t,+n,+r)};var Ot=18;var Mt=.95047,_t=1,Dt=1.08883;var Pt=At.prototype=new ft;Pt.brighter=function(e){return Lt(Math.min(100,this.l+Ot*(arguments.length?e:1)),this.a,this.b)};Pt.darker=function(e){return Lt(Math.max(0,this.l-Ot*(arguments.length?e:1)),this.a,this.b)};Pt.rgb=function(){return Ht(this.l,this.a,this.b)};e.rgb=function(e,t,n){return arguments.length===1?e instanceof Rt?qt(e.r,e.g,e.b):Wt(""+e,qt,pt):qt(~~e,~~t,~~n)};var Ut=Rt.prototype=new ft;Ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;if(!t&&!n&&!r)return qt(i,i,i);if(t&&t<i)t=i;if(n&&n<i)n=i;if(r&&r<i)r=i;return qt(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e)))};Ut.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return qt(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))};Ut.hsl=function(){return Xt(this.r,this.g,this.b)};Ut.toString=function(){return"#"+zt(this.r)+zt(this.g)+zt(this.b)};var Kt=e.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});Kt.forEach(function(e,t){Kt.set(e,Wt(t,qt,pt))});e.functor=Qt;e.xhr=function(t,r,i){function l(){var e=f.status;!e&&f.responseText||e>=200&&e<300||e===304?o.load.call(s,a.call(s,f)):o.error.call(s,f)}var s={},o=e.dispatch("progress","load","error"),u={},a=Gt,f=new(n.XDomainRequest&&/^(http(s)?:)?\/\//.test(t)?XDomainRequest:XMLHttpRequest);"onload"in f?f.onload=f.onerror=l:f.onreadystatechange=function(){f.readyState>3&&l()};f.onprogress=function(t){var n=e.event;e.event=t;try{o.progress.call(s,f)}finally{e.event=n}};s.header=function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return u[e];if(t==null)delete u[e];else u[e]=t+"";return s};s.mimeType=function(e){if(!arguments.length)return r;r=e==null?null:e+"";return s};s.response=function(e){a=e;return s};["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(N(arguments)))}});s.send=function(e,n,i){if(arguments.length===2&&typeof n==="function")i=n,n=null;f.open(e,t,true);if(r!=null&&!("accept"in u))u["accept"]=r+",*/*";if(f.setRequestHeader)for(var o in u)f.setRequestHeader(o,u[o]);if(r!=null&&f.overrideMimeType)f.overrideMimeType(r);if(i!=null)s.on("error",i).on("load",function(e){i(null,e)});f.send(n==null?null:n);return s};s.abort=function(){f.abort();return s};e.rebind(s,o,"on");if(arguments.length===2&&typeof r==="function")i=r,r=null;return i==null?s:s.get(Yt(i))};e.csv=Zt(",","text/csv");e.tsv=Zt(" ","text/tab-separated-values");var en=0,tn={},nn=null,rn,sn;e.timer=function(e,t,n){if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}var r=tn[e.id];if(r&&r.callback===e){r.then=n;r.delay=t}else tn[e.id=++en]=nn={callback:e,then:n,delay:t,next:nn};if(!rn){sn=clearTimeout(sn);rn=1;an(on)}};e.timer.flush=function(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(!n.delay)n.flush=n.callback(e);n=n.next}un()};var an=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(e){setTimeout(e,17)};var fn=".",ln=",",cn=[3,3];var hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(pn);e.formatPrefix=function(t,n){var r=0;if(t){if(t<0)t*=-1;if(n)t=e.round(t,mn(t,n));r=1+Math.floor(1e-12+Math.log(t)/Math.LN10);r=Math.max(-24,Math.min(24,Math.floor((r<=0?r+1:r-1)/3)*3))}return hn[8+r/3]};e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};e.format=function(t){var n=dn.exec(t),r=n[1]||" ",i=n[2]||">",s=n[3]||"",o=n[4]||"",u=n[5],a=+n[6],f=n[7],l=n[8],c=n[9],h=1,p="",d=false;if(l)l=+l.substring(1);if(u||r==="0"&&i==="="){u=r="0";i="=";if(f)a-=Math.floor((a-1)/4)}switch(c){case"n":f=true;c="g";break;case"%":h=100;p="%";c="f";break;case"p":h=100;p="%";c="r";break;case"b":case"o":case"x":case"X":if(o)o="0"+c.toLowerCase();case"c":case"d":d=true;l=0;break;case"s":h=-1;c="r";break}if(o==="#")o="";if(c=="r"&&!l)c="g";if(l!=null){if(c=="g")l=Math.max(1,Math.min(21,l));else if(c=="e"||c=="f")l=Math.max(0,Math.min(20,l))}c=vn.get(c)||gn;var v=u&&f;return function(t){if(d&&t%1)return"";var n=t<0||t===0&&1/t<0?(t=-t,"-"):s;if(h<0){var m=e.formatPrefix(t,l);t=m.scale(t);p=m.symbol}else{t*=h}t=c(t,l);if(!u&&f)t=yn(t);var g=o.length+t.length+(v?0:n.length),y=g<a?(new Array(g=a-g+1)).join(r):"";if(v)t=yn(y+t);if(fn)t.replace(".",fn);n+=o;return(i==="<"?n+t+y:i===">"?y+n+t:i==="^"?y.substring(0,g>>=1)+n+t+y.substring(g):n+(v?t:y+t))+p}};var dn=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;var vn=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,n){return(t=e.round(t,mn(t,n))).toFixed(Math.max(0,Math.min(20,mn(t*(1+1e-15),n))))}});var yn=Gt;if(cn){var bn=cn.length;yn=function(e){var t=e.lastIndexOf("."),n=t>=0?"."+e.substring(t+1):(t=e.length,""),r=[],i=0,s=cn[0];while(t>0&&s>0){r.push(e.substring(t-=s,t+s));s=cn[i=(i+1)%bn]}return r.reverse().join(ln||"")+n}}e.geo={};e.geo.stream=function(e,t){if(e&&En.hasOwnProperty(e.type)){En[e.type](e,t)}else{wn(e,t)}};var En={Feature:function(e,t){wn(e.geometry,t)},FeatureCollection:function(e,t){var n=e.features,r=-1,i=n.length;while(++r<i)wn(n[r].geometry,t)}};var Sn={Sphere:function(e,t){t.sphere()},Point:function(e,t){var n=e.coordinates;t.point(n[0],n[1])},MultiPoint:function(e,t){var n=e.coordinates,r=-1,i=n.length,s;while(++r<i)s=n[r],t.point(s[0],s[1])},LineString:function(e,t){xn(e.coordinates,t,0)},MultiLineString:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)xn(n[r],t,0)},Polygon:function(e,t){Tn(e.coordinates,t)},MultiPolygon:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)Tn(n[r],t)},GeometryCollection:function(e,t){var n=e.geometries,r=-1,i=n.length;while(++r<i)wn(n[r],t)}};e.geo.area=function(t){Nn=0;e.geo.stream(t,Ln);return Nn};var Nn,Cn,kn;var Ln={sphere:function(){Nn+=4*dt},point:G,lineStart:G,lineEnd:G,polygonStart:function(){Cn=1,kn=0;Ln.lineStart=An},polygonEnd:function(){var e=2*Math.atan2(kn,Cn);Nn+=e<0?4*dt+e:e;Ln.lineStart=Ln.lineEnd=Ln.point=G}};e.geo.bounds=On(Gt);e.geo.centroid=function(t){Mn=_n=Dn=Pn=Hn=0;e.geo.stream(t,Bn);var n;if(_n&&Math.abs(n=Math.sqrt(Dn*Dn+Pn*Pn+Hn*Hn))>vt){return[Math.atan2(Pn,Dn)*gt,Math.asin(Math.max(-1,Math.min(1,Hn/n)))*gt]}};var Mn,_n,Dn,Pn,Hn;var Bn={sphere:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}},point:jn,lineStart:In,lineEnd:qn,polygonStart:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}Bn.lineStart=Fn},polygonEnd:function(){Bn.lineStart=In}};var rr=Yn($n,ir,or);var ar=1e9;e.geo.projection=pr;e.geo.projectionMutator=dr;(e.geo.equirectangular=function(){return pr(mr)}).raw=mr.invert=mr;e.geo.rotation=function(e){function t(t){t=e(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t}e=gr(e[0]%360*mt,e[1]*mt,e.length>2?e[2]*mt:0);t.invert=function(t){t=e.invert(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t};return t};e.geo.circle=function(){function i(){var t=typeof e==="function"?e.apply(this,arguments):e,n=gr(-t[0]*mt,-t[1]*mt,0).invert,i=[];r(null,null,1,{point:function(e,t){i.push(e=n(e,t));e[0]*=gt,e[1]*=gt}});return{type:"Polygon",coordinates:[i]}}var e=[0,0],t,n=6,r;i.origin=function(t){if(!arguments.length)return e;e=t;return i};i.angle=function(e){if(!arguments.length)return t;r=Er((t=+e)*mt,n*mt);return i};i.precision=function(e){if(!arguments.length)return n;r=Er(t*mt,(n=+e)*mt);return i};return i.angle(90)};e.geo.distance=function(e,t){var n=(t[0]-e[0])*mt,r=e[1]*mt,i=t[1]*mt,s=Math.sin(n),o=Math.cos(n),u=Math.sin(r),a=Math.cos(r),f=Math.sin(i),l=Math.cos(i),c;return Math.atan2(Math.sqrt((c=l*s)*c+(c=a*f-u*l*o)*c),u*f+a*l*o)};e.geo.graticule=function(){function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(i/c)*c,r,c).map(v).concat(e.range(Math.ceil(a/h)*h,u,h).map(m)).concat(e.range(Math.ceil(n/f)*f,t,f).filter(function(e){return Math.abs(e%c)>vt}).map(p)).concat(e.range(Math.ceil(o/l)*l,s,l).filter(function(e){return Math.abs(e%h)>vt}).map(d))}var t,n,r,i,s,o,u,a,f=10,l=f,c=90,h=360,p,d,v,m,g=2.5;y.lines=function(){return b().map(function(e){return{type:"LineString",coordinates:e}})};y.outline=function(){return{type:"Polygon",coordinates:[v(i).concat(m(u).slice(1),v(r).reverse().slice(1),m(a).reverse().slice(1))]}};y.extent=function(e){if(!arguments.length)return y.minorExtent();return y.majorExtent(e).minorExtent(e)};y.majorExtent=function(e){if(!arguments.length)return[[i,a],[r,u]];i=+e[0][0],r=+e[1][0];a=+e[0][1],u=+e[1][1];if(i>r)e=i,i=r,r=e;if(a>u)e=a,a=u,u=e;return y.precision(g)};y.minorExtent=function(e){if(!arguments.length)return[[n,o],[t,s]];n=+e[0][0],t=+e[1][0];o=+e[0][1],s=+e[1][1];if(n>t)e=n,n=t,t=e;if(o>s)e=o,o=s,s=e;return y.precision(g)};y.step=function(e){if(!arguments.length)return y.minorStep();return y.majorStep(e).minorStep(e)};y.majorStep=function(e){if(!arguments.length)return[c,h];c=+e[0],h=+e[1];return y};y.minorStep=function(e){if(!arguments.length)return[f,l];f=+e[0],l=+e[1];return y};y.precision=function(e){if(!arguments.length)return g;g=+e;p=xr(o,s,90);d=Tr(n,t,g);v=xr(a,u,90);m=Tr(i,r,g);return y};return y.majorExtent([[-180,-90+vt],[180,90-vt]]).minorExtent([[-180,-80-vt],[180,80+vt]])};e.geo.greatArc=function(){function s(){return{type:"LineString",coordinates:[n||t.apply(this,arguments),i||r.apply(this,arguments)]}}var t=Nr,n,r=Cr,i;s.distance=function(){return e.geo.distance(n||t.apply(this,arguments),i||r.apply(this,arguments))};s.source=function(e){if(!arguments.length)return t;t=e,n=typeof e==="function"?null:e;return s};s.target=function(e){if(!arguments.length)return r;r=e,i=typeof e==="function"?null:e;return s};s.precision=function(){return arguments.length?s:0};return s};e.geo.interpolate=function(e,t){return kr(e[0]*mt,e[1]*mt,t[0]*mt,t[1]*mt)};e.geo.length=function(t){Lr=0;e.geo.stream(t,Ar);return Lr};var Lr;var Ar={sphere:G,point:G,lineStart:Or,lineEnd:G,polygonStart:G,polygonEnd:G};(e.geo.conicEqualArea=function(){return Mr(_r)}).raw=_r;e.geo.albersUsa=function(){function a(e){return f(e)(e)}function f(e){var s=e[0],o=e[1];return o>50?n:s<-140?r:o<21?i:t}var t=e.geo.conicEqualArea().rotate([98,0]).center([0,38]).parallels([29.5,45.5]);var n=e.geo.conicEqualArea().rotate([160,0]).center([0,60]).parallels([55,65]);var r=e.geo.conicEqualArea().rotate([160,0]).center([0,20]).parallels([8,18]);var i=e.geo.conicEqualArea().rotate([60,0]).center([0,10]).parallels([8,18]);var s,o,u;a.invert=function(e){return s(e)||o(e)||u(e)||t.invert(e)};a.scale=function(e){if(!arguments.length)return t.scale();t.scale(e);n.scale(e*.6);r.scale(e);i.scale(e*1.5);return a.translate(t.translate())};a.translate=function(e){if(!arguments.length)return t.translate();var f=t.scale(),l=e[0],c=e[1];t.translate(e);n.translate([l-.4*f,c+.17*f]);r.translate([l-.19*f,c+.2*f]);i.translate([l+.58*f,c+.43*f]);s=Dr(n,[[-180,50],[-130,72]]);o=Dr(r,[[-164,18],[-154,24]]);u=Dr(i,[[-67.5,17.5],[-65,19]]);return a};return a.scale(1e3)};var Pr,Hr,Br={point:G,lineStart:G,lineEnd:G,polygonStart:function(){Hr=0;Br.lineStart=jr},polygonEnd:function(){Br.lineStart=Br.lineEnd=Br.point=G;Pr+=Math.abs(Hr/2)}};var Ir={point:qr,lineStart:Rr,lineEnd:Ur,polygonStart:function(){Ir.lineStart=zr},polygonEnd:function(){Ir.point=qr;Ir.lineStart=Rr;Ir.lineEnd=Ur}};e.geo.path=function(){function o(n){if(n)e.geo.stream(n,i(s.pointRadius(typeof t==="function"?+t.apply(this,arguments):t)));return s.result()}var t=4.5,n,r,i,s;o.area=function(t){Pr=0;e.geo.stream(t,i(Br));return Pr};o.centroid=function(t){Mn=Dn=Pn=Hn=0;e.geo.stream(t,i(Ir));return Hn?[Dn/Hn,Pn/Hn]:undefined};o.bounds=function(e){return On(i)(e)};o.projection=function(e){if(!arguments.length)return n;i=(n=e)?e.stream||Vr(e):Gt;return o};o.context=function(e){if(!arguments.length)return r;s=(r=e)==null?new Fr:new Wr(e);return o};o.pointRadius=function(e){if(!arguments.length)return t;t=typeof e==="function"?e:+e;return o};return o.projection(e.geo.albersUsa()).context(null)};e.geo.albers=function(){return e.geo.conicEqualArea().parallels([29.5,45.5]).rotate([98,0]).center([0,38]).scale(1e3)};var Jr=$r(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(e.geo.azimuthalEqualArea=function(){return pr(Jr)}).raw=Jr;var Kr=$r(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},Gt);(e.geo.azimuthalEquidistant=function(){return pr(Kr)}).raw=Kr;(e.geo.conicConformal=function(){return Mr(Qr)}).raw=Qr;(e.geo.conicEquidistant=function(){return Mr(Gr)}).raw=Gr;var Yr=$r(function(e){return 1/e},Math.atan);(e.geo.gnomonic=function(){return pr(Yr)}).raw=Yr;Zr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-dt/2]};(e.geo.mercator=function(){return ei(Zr)}).raw=Zr;var ti=$r(function(){return 1},Math.asin);(e.geo.orthographic=function(){return pr(ti)}).raw=ti;var ni=$r(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(e.geo.stereographic=function(){return pr(ni)}).raw=ni;ri.invert=function(e,t){return[Math.atan2(Et(e),Math.cos(t)),wt(Math.sin(t)/St(e))]};(e.geo.transverseMercator=function(){return ei(ri)}).raw=ri;e.geom={};e.svg={};e.svg.line=function(){return ii(Gt)};var ui=e.map({linear:ai,"linear-closed":fi,"step-before":li,"step-after":ci,basis:gi,"basis-open":yi,"basis-closed":bi,bundle:wi,cardinal:di,"cardinal-open":hi,"cardinal-closed":pi,monotone:Ai});ui.forEach(function(e,t){t.key=e;t.closed=/-closed$/.test(e)});var Si=[0,2/3,1/3,0],xi=[0,1/3,2/3,0],Ti=[0,1/6,2/3,1/6];e.geom.hull=function(e){function r(e){if(e.length<3)return[];var r=Qt(t),i=Qt(n),s=e.length,o,u=s-1,a=[],f=[],l,c,h,p=0,d,v,m,g,y,b,w,E;if(r===si&&n===oi)o=e;else for(c=0,o=[];c<s;++c){o.push([+r.call(this,l=e[c],c),+i.call(this,l,c)])}for(c=1;c<s;++c){if(o[c][1]<o[p][1]){p=c}else if(o[c][1]==o[p][1]){p=o[c][0]<o[p][0]?c:p}}for(c=0;c<s;++c){if(c===p)continue;v=o[c][1]-o[p][1];d=o[c][0]-o[p][0];a.push({angle:Math.atan2(v,d),index:c})}a.sort(function(e,t){return e.angle-t.angle});w=a[0].angle;b=a[0].index;y=0;for(c=1;c<u;++c){h=a[c].index;if(w==a[c].angle){d=o[b][0]-o[p][0];v=o[b][1]-o[p][1];m=o[h][0]-o[p][0];g=o[h][1]-o[p][1];if(d*d+v*v>=m*m+g*g){a[c].index=-1}else{a[y].index=-1;w=a[c].angle;y=c;b=h}}else{w=a[c].angle;y=c;b=h}}f.push(p);for(c=0,h=0;c<2;++h){if(a[h].index!==-1){f.push(a[h].index);c++}}E=f.length;for(;h<u;++h){if(a[h].index===-1)continue;while(!Oi(f[E-2],f[E-1],a[h].index,o)){--E}f[E++]=a[h].index}var S=[];for(c=0;c<E;++c){S.push(e[f[c]])}return S}var t=si,n=oi;if(arguments.length)return r(e);r.x=function(e){return arguments.length?(t=e,r):t};r.y=function(e){return arguments.length?(n=e,r):n};return r};e.geom.polygon=function(e){e.area=function(){var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];while(++t<n){r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1]}return r*.5};e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;if(!arguments.length)t=-1/(6*e.area());while(++n<r){o=u;u=e[n];a=o[0]*u[1]-u[0]*o[1];i+=(o[0]+u[0])*a;s+=(o[1]+u[1])*a}return[i*t,s*t]};e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice();t.length=0;a=e[r];f=n[(o=n.length)-1];s=-1;while(++s<o){l=n[s];if(Mi(l,u,a)){if(!Mi(f,u,a)){t.push(_i(f,l,u,a))}t.push(l)}else if(Mi(f,u,a)){t.push(_i(f,l,u,a))}f=l}u=a}return t};return e};e.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];Pi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])});t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)});t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++){n.push([i,t[u],t[u+1]])}});return n};e.geom.voronoi=function(t){function o(t){var n,o=t.map(function(){return[]}),u=Qt(r),a=Qt(i),f,l,c=t.length,h=1e6;if(u===si&&a===oi)n=t;else for(n=[],l=0;l<c;++l){n.push([+u.call(this,f=t[l],l),+a.call(this,f,l)])}Pi(n,function(e){var t,n,r,i,s,u;if(e.a===1&&e.b>=0){t=e.ep.r;n=e.ep.l}else{t=e.ep.l;n=e.ep.r}if(e.a===1){s=t?t.y:-h;r=e.c-e.b*s;u=n?n.y:h;i=e.c-e.b*u}else{r=t?t.x:-h;s=e.c-e.a*r;i=n?n.x:h;u=e.c-e.a*i}var a=[r,s],f=[i,u];o[e.region.l.index].push(a,f);o[e.region.r.index].push(a,f)});o=o.map(function(t,r){var i=n[r][0],s=n[r][1],o=t.map(function(e){return Math.atan2(e[0]-i,e[1]-s)}),u=e.range(t.length).sort(function(e,t){return o[e]-o[t]});return u.filter(function(e,t){return!t||o[e]-o[u[t-1]]>vt}).map(function(e){return t[e]})});o.forEach(function(e,t){var r=e.length;if(!r)return e.push([-h,-h],[-h,h],[h,h],[h,-h]);if(r>2)return;var i=n[t],s=e[0],o=e[1],u=i[0],a=i[1],f=s[0],l=s[1],c=o[0],p=o[1],d=Math.abs(c-f),v=p-l;if(Math.abs(v)<vt){var m=a<l?-h:h;e.push([-h,m],[h,m])}else if(d<vt){var g=u<f?-h:h;e.push([g,-h],[g,h])}else{var m=(c-f)*(l-a)<(f-u)*(p-l)?h:-h,y=Math.abs(v)-d;if(Math.abs(y)<vt){e.push([v<0?m:-m,m])}else{if(y>0)m*=-1;e.push([-h,m],[h,m])}}});if(s)for(l=0;l<c;++l)s(o[l]);for(l=0;l<c;++l)o[l].point=t[l];return o}var n=null,r=si,i=oi,s;if(arguments.length)return o(t);o.x=function(e){return arguments.length?(r=e,o):r};o.y=function(e){return arguments.length?(i=e,o):i};o.size=function(t){if(!arguments.length)return n;if(t==null){s=null}else{n=[+t[0],+t[1]];s=e.geom.polygon([[0,0],[0,n[1]],n,[n[0],0]]).clip}return o};o.links=function(e){var t,n=e.map(function(){return[]}),s=[],o=Qt(r),u=Qt(i),a,f,l=e.length;if(o===si&&u===oi)t=e;else for(f=0;f<l;++f){t.push([+o.call(this,a=e[f],f),+u.call(this,a,f)])}Pi(t,function(t){var r=t.region.l.index,i=t.region.r.index;if(n[r][i])return;n[r][i]=n[i][r]=true;s.push({source:e[r],target:e[i]})});return s};o.triangles=function(t){if(r===si&&i===oi)return e.geom.delaunay(t);var n,s,o=Qt(r),u=Qt(i),a,f,l;for(f=0,n=[],l=t.length;f<l;++f){s=[+o.call(this,a=t[f],f),+u.call(this,a,f)];s.data=a;n.push(s)}return e.geom.delaunay(n).map(function(e){return e.map(function(e){return e.data})})};return o};var Di={l:"r",r:"l"};e.geom.quadtree=function(e,t,n,r,i){function a(e){function x(e,t,n,r,i,s,o,u){if(isNaN(n)||isNaN(r))return;if(e.leaf){var a=e.x,f=e.y;if(a!=null){if(Math.abs(a-n)+Math.abs(f-r)<.01){T(e,t,n,r,i,s,o,u)}else{var l=e.point;e.x=e.y=e.point=null;T(e,l,a,f,i,s,o,u);T(e,t,n,r,i,s,o,u)}}else{e.x=n,e.y=r,e.point=t}}else{T(e,t,n,r,i,s,o,u)}}function T(e,t,n,r,i,s,o,u){var a=(i+o)*.5,f=(s+u)*.5,l=n>=a,c=r>=f,h=(c<<1)+l;e.leaf=false;e=e.nodes[h]||(e.nodes[h]=ji());if(l)i=a;else o=a;if(c)s=f;else u=f;x(e,t,n,r,i,s,o,u)}var a,f=Qt(s),l=Qt(o),c,h,p,d,v,m,g,y;if(t!=null){v=t,m=n,g=r,y=i}else{g=y=-(v=m=Infinity);c=[],h=[];d=e.length;if(u)for(p=0;p<d;++p){a=e[p];if(a.x<v)v=a.x;if(a.y<m)m=a.y;if(a.x>g)g=a.x;if(a.y>y)y=a.y;c.push(a.x);h.push(a.y)}else for(p=0;p<d;++p){var b=+f(a=e[p],p),w=+l(a,p);if(b<v)v=b;if(w<m)m=w;if(b>g)g=b;if(w>y)y=w;c.push(b);h.push(w)}}var E=g-v,S=y-m;if(E>S)y=m+E;else g=v+S;var N=ji();N.add=function(e){x(N,e,+f(e,++p),+l(e,p),v,m,g,y)};N.visit=function(e){Fi(e,N,v,m,g,y)};p=-1;if(t==null){while(++p<d){x(N,e[p],c[p],h[p],v,m,g,y)}--p}else e.forEach(N.add);c=h=e=a=null;return N}var s=si,o=oi,u;if(u=arguments.length){s=Hi;o=Bi;if(u===3){i=n;r=t;n=t=0}return a(e)}a.x=function(e){return arguments.length?(s=e,a):s};a.y=function(e){return arguments.length?(o=e,a):o};a.size=function(e){if(!arguments.length)return t==null?null:[r,i];if(e==null){t=n=r=i=null}else{t=n=0;r=+e[0],i=+e[1]}return a};return a};e.interpolateRgb=Ii;e.transform=function(n){var r=t.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate();return new qi(t?t.matrix:Wi)})(n)};qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Wi={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateNumber=Xi;e.interpolateTransform=Vi;e.interpolateObject=$i;e.interpolateString=Ji;var Ki=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;e.interpolate=Qi;e.interpolators=[function(e,t){var n=typeof t;return(n==="string"||n!==typeof e?Kt.has(t)||/^(#|rgb\(|hsl\()/.test(t)?Ii:Ji:t instanceof ft?Ii:n==="object"?Array.isArray(t)?Yi:$i:Xi)(e,t)}];e.interpolateArray=Yi;var Zi=function(){return Gt};var es=e.map({linear:Zi,poly:as,quad:function(){return ss},cubic:function(){return os},sin:function(){return fs},exp:function(){return ls},circle:function(){return cs},elastic:hs,back:ps,bounce:function(){return ds}});var ts=e.map({"in":Gt,out:rs,"in-out":is,"out-in":function(e){return is(rs(e))}});e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";n=es.get(n)||Zi;r=ts.get(r)||Gt;return ns(r(n.apply(null,Array.prototype.slice.call(arguments,1))))};e.interpolateHcl=vs;e.interpolateHsl=ms;e.interpolateLab=gs;e.interpolateRound=ys;e.layout={};e.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Es(e[n]));return t}};e.layout.chord=function(){function l(){var t={},l=[],h=e.range(s),p=[],d,v,m,g,y;n=[];r=[];d=0,g=-1;while(++g<s){v=0,y=-1;while(++y<s){v+=i[g][y]}l.push(v);p.push(e.range(s));d+=v}if(u){h.sort(function(e,t){return u(l[e],l[t])})}if(a){p.forEach(function(e,t){e.sort(function(e,n){return a(i[t][e],i[t][n])})})}d=(2*dt-o*s)/d;v=0,g=-1;while(++g<s){m=v,y=-1;while(++y<s){var b=h[g],w=p[b][y],E=i[b][w],S=v,x=v+=E*d;t[b+"-"+w]={index:b,subindex:w,startAngle:S,endAngle:x,value:E}}r[b]={index:b,startAngle:m,endAngle:v,value:(v-m)/d};v+=o}g=-1;while(++g<s){y=g-1;while(++y<s){var T=t[g+"-"+y],N=t[y+"-"+g];if(T.value||N.value){n.push(T.value<N.value?{source:N,target:T}:{source:T,target:N})}}}if(f)c()}function c(){n.sort(function(e,t){return f((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var t={},n,r,i,s,o=0,u,a,f;t.matrix=function(e){if(!arguments.length)return i;s=(i=e)&&i.length;n=r=null;return t};t.padding=function(e){if(!arguments.length)return o;o=e;n=r=null;return t};t.sortGroups=function(e){if(!arguments.length)return u;u=e;n=r=null;return t};t.sortSubgroups=function(e){if(!arguments.length)return a;a=e;n=null;return t};t.sortChords=function(e){if(!arguments.length)return f;f=e;if(n)c();return t};t.chords=function(){if(!n)l();return n};t.groups=function(){if(!r)l();return r};return t};e.layout.force=function(){function g(e){return function(t,n,r,i){if(t.point!==e){var s=t.cx-e.x,o=t.cy-e.y,u=1/Math.sqrt(s*s+o*o);if((i-n)*u<c){var a=t.charge*u*u;e.px-=s*a;e.py-=o*a;return true}if(t.point&&isFinite(u)){var a=t.pointCharge*u*u;e.px-=s*a;e.py-=o*a}}return!t.charge}}function y(n){n.px=e.event.x,n.py=e.event.y;t.resume()}var t={},n=e.dispatch("start","tick","end"),r=[1,1],i,s,o=.9,u=As,a=Os,f=-30,l=.1,c=.8,h=[],p=[],d,v,m;t.tick=function(){if((s*=.99)<.005){n.end({type:"end",alpha:s=0});return true}var t=h.length,i=p.length,u,a,c,y,b,w,E,S,x;for(a=0;a<i;++a){c=p[a];y=c.source;b=c.target;S=b.x-y.x;x=b.y-y.y;if(w=S*S+x*x){w=s*v[a]*((w=Math.sqrt(w))-d[a])/w;S*=w;x*=w;b.x-=S*(E=y.weight/(b.weight+y.weight));b.y-=x*E;y.x+=S*(E=1-E);y.y+=x*E}}if(E=s*l){S=r[0]/2;x=r[1]/2;a=-1;if(E)while(++a<t){c=h[a];c.x+=(S-c.x)*E;c.y+=(x-c.y)*E}}if(f){Ls(u=e.geom.quadtree(h),s,m);a=-1;while(++a<t){if(!(c=h[a]).fixed){u.visit(g(c))}}}a=-1;while(++a<t){c=h[a];if(c.fixed){c.x=c.px;c.y=c.py}else{c.x-=(c.px-(c.px=c.x))*o;c.y-=(c.py-(c.py=c.y))*o}}n.tick({type:"tick",alpha:s})};t.nodes=function(e){if(!arguments.length)return h;h=e;return t};t.links=function(e){if(!arguments.length)return p;p=e;return t};t.size=function(e){if(!arguments.length)return r;r=e;return t};t.linkDistance=function(e){if(!arguments.length)return u;u=typeof e==="function"?e:+e;return t};t.distance=t.linkDistance;t.linkStrength=function(e){if(!arguments.length)return a;a=typeof e==="function"?e:+e;return t};t.friction=function(e){if(!arguments.length)return o;o=+e;return t};t.charge=function(e){if(!arguments.length)return f;f=typeof e==="function"?e:+e;return t};t.gravity=function(e){if(!arguments.length)return l;l=+e;return t};t.theta=function(e){if(!arguments.length)return c;c=+e;return t};t.alpha=function(r){if(!arguments.length)return s;r=+r;if(s){if(r>0)s=r;else s=0}else if(r>0){n.start({type:"start",alpha:s=r});e.timer(t.tick)}return t};t.start=function(){function y(t,n){var r=b(e),i=-1,s=r.length,o;while(++i<s)if(!isNaN(o=r[i][t]))return o;return Math.random()*n}function b(){if(!c){c=[];for(n=0;n<i;++n){c[n]=[]}for(n=0;n<s;++n){var t=p[n];c[t.source.index].push(t.target);c[t.target.index].push(t.source)}}return c[e]}var e,n,i=h.length,s=p.length,o=r[0],l=r[1],c,g;for(e=0;e<i;++e){(g=h[e]).index=e;g.weight=0}for(e=0;e<s;++e){g=p[e];if(typeof g.source=="number")g.source=h[g.source];if(typeof g.target=="number")g.target=h[g.target];++g.source.weight;++g.target.weight}for(e=0;e<i;++e){g=h[e];if(isNaN(g.x))g.x=y("x",o);if(isNaN(g.y))g.y=y("y",l);if(isNaN(g.px))g.px=g.x;if(isNaN(g.py))g.py=g.y}d=[];if(typeof u==="function")for(e=0;e<s;++e)d[e]=+u.call(this,p[e],e);else for(e=0;e<s;++e)d[e]=u;v=[];if(typeof a==="function")for(e=0;e<s;++e)v[e]=+a.call(this,p[e],e);else for(e=0;e<s;++e)v[e]=a;m=[];if(typeof f==="function")for(e=0;e<i;++e)m[e]=+f.call(this,h[e],e);else for(e=0;e<i;++e)m[e]=f;return t.resume()};t.resume=function(){return t.alpha(.1)};t.stop=function(){return t.alpha(0)};t.drag=function(){if(!i)i=e.behavior.drag().origin(Gt).on("dragstart.force",Ts).on("drag.force",y).on("dragend.force",Ns);if(!arguments.length)return i;this.on("mouseover.force",Cs).on("mouseout.force",ks).call(i)};return e.rebind(t,n,"on")};var As=20,Os=1;e.layout.hierarchy=function(){function r(i,o,u){var a=t.call(s,i,o);i.depth=o;u.push(i);if(a&&(l=a.length)){var f=-1,l,c=i.children=[],h=0,p=o+1,d;while(++f<l){d=r(a[f],p,u);d.parent=i;c.push(d);h+=d.value}if(e)c.sort(e);if(n)i.value=h}else if(n){i.value=+n.call(s,i,o)||0}return i}function i(e,t){var r=e.children,o=0;if(r&&(a=r.length)){var u=-1,a,f=t+1;while(++u<a)o+=i(r[u],f)}else if(n){o=+n.call(s,e,t)||0}if(n)e.value=o;return o}function s(e){var t=[];r(e,0,t);return t}var e=Ps,t=_s,n=Ds;s.sort=function(t){if(!arguments.length)return e;e=t;return s};s.children=function(e){if(!arguments.length)return t;t=e;return s};s.value=function(e){if(!arguments.length)return n;n=e;return s};s.revalue=function(e){i(e,0);return e};return s};e.layout.partition=function(){function r(e,t,n,i){var s=e.children;e.x=t;e.y=e.depth*i;e.dx=n;e.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;n=e.value?n/e.value:0;while(++o<u){r(a=s[o],t,f=a.value*n,i);t+=f}}}function i(e){var t=e.children,n=0;if(t&&(s=t.length)){var r=-1,s;while(++r<s)n=Math.max(n,i(t[r]))}return 1+n}function s(e,s){var o=t.call(this,e,s);r(o[0],0,n[0],n[1]/i(o[0]));return o}var t=e.layout.hierarchy(),n=[1,1];s.size=function(e){if(!arguments.length)return n;n=e;return s};return Ms(s,t)};e.layout.pie=function(){function s(o){var u=o.map(function(e,n){return+t.call(s,e,n)});var a=+(typeof r==="function"?r.apply(this,arguments):r);var f=((typeof i==="function"?i.apply(this,arguments):i)-a)/e.sum(u);var l=e.range(o.length);if(n!=null)l.sort(n===Bs?function(e,t){return u[t]-u[e]}:function(e,t){return n(o[e],o[t])});var c=[];l.forEach(function(e){var t;c[e]={data:o[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}});return c}var t=Number,n=Bs,r=0,i=2*dt;s.value=function(e){if(!arguments.length)return t;t=e;return s};s.sort=function(e){if(!arguments.length)return n;n=e;return s};s.startAngle=function(e){if(!arguments.length)return r;r=e;return s};s.endAngle=function(e){if(!arguments.length)return i;i=e;return s};return s};var Bs={};e.layout.stack=function(){function u(a,f){var l=a.map(function(e,n){return t.call(u,e,n)});var c=l.map(function(e){return e.map(function(e,t){return[s.call(u,e,t),o.call(u,e,t)]})});var h=n.call(u,c,f);l=e.permute(l,h);c=e.permute(c,h);var p=r.call(u,c,f);var d=l.length,v=l[0].length,m,g,y;for(g=0;g<v;++g){i.call(u,l[0][g],y=p[g],c[0][g][1]);for(m=1;m<d;++m){i.call(u,l[m][g],y+=c[m-1][g][1],c[m][g][1])}}return a}var t=Gt,n=Us,r=zs,i=Is,s=js,o=Fs;u.values=function(e){if(!arguments.length)return t;t=e;return u};u.order=function(e){if(!arguments.length)return n;n=typeof e==="function"?e:qs.get(e)||Us;return u};u.offset=function(e){if(!arguments.length)return r;r=typeof e==="function"?e:Rs.get(e)||zs;return u};u.x=function(e){if(!arguments.length)return s;s=e;return u};u.y=function(e){if(!arguments.length)return o;o=e;return u};u.out=function(e){if(!arguments.length)return i;i=e;return u};return u};var qs=e.map({"inside-out":function(t){var n=t.length,r,i,s=t.map(Ws),o=t.map(Xs),u=e.range(n).sort(function(e,t){return s[e]-s[t]}),a=0,f=0,l=[],c=[];for(r=0;r<n;++r){i=u[r];if(a<f){a+=o[i];l.push(i)}else{f+=o[i];c.push(i)}}return c.reverse().concat(l)},reverse:function(t){return e.range(t.length).reverse()},"default":Us});var Rs=e.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];if(u>i)i=u;r.push(u)}for(o=0;o<n;++o){a[o]=(i-r[o])/2}return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i,s,o,u,a,f,l,c,h,p=[];p[0]=c=h=0;for(s=1;s<r;++s){for(i=0,u=0;i<t;++i)u+=e[i][s][1];for(i=0,a=0,l=n[s][0]-n[s-1][0];i<t;++i){for(o=0,f=(e[i][s][1]-e[i][s-1][1])/(2*l);o<i;++o){f+=(e[o][s][1]-e[o][s-1][1])/l}a+=f*e[i][s][1]}p[s]=c-=u?a/u*l:0;if(c<h)h=c}for(s=0;s<r;++s)p[s]-=h;return p},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:zs});e.layout.histogram=function(){function s(s,o){var u=[],a=s.map(n,this),f=r.call(this,a,o),l=i.call(this,f,a,o),c,o=-1,h=a.length,p=l.length-1,d=t?1:1/h,v;while(++o<p){c=u[o]=[];c.dx=l[o+1]-(c.x=l[o]);c.y=0}if(p>0){o=-1;while(++o<h){v=a[o];if(v>=f[0]&&v<=f[1]){c=u[e.bisect(l,v,1,p)-1];c.y+=d;c.push(s[o])}}}return u}var t=true,n=Number,r=Ks,i=$s;s.value=function(e){if(!arguments.length)return n;n=e;return s};s.range=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.bins=function(e){if(!arguments.length)return i;i=typeof e==="number"?function(t){return Js(t,e)}:Qt(e);return s};s.frequency=function(e){if(!arguments.length)return t;t=!!e;return s};return s};e.layout.tree=function(){function i(e,i){function u(e,t){var r=e.children,i=e._tree;if(r&&(s=r.length)){var s,o=r[0],a,l=o,c,h=-1;while(++h<s){c=r[h];u(c,a);l=f(c,a,l);a=c}io(e);var p=.5*(o._tree.prelim+c._tree.prelim);if(t){i.prelim=t._tree.prelim+n(e,t);i.mod=i.prelim-p}else{i.prelim=p}}else{if(t){i.prelim=t._tree.prelim+n(e,t)}}}function a(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i){a(n[r],t)}}}function f(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ys(o),i=Gs(i),o&&i){u=Gs(u);s=Ys(s);s._tree.ancestor=e;h=o._tree.prelim+l-i._tree.prelim-a+n(o,i);if(h>0){so(oo(o,e,r),e,h);a+=h;f+=h}l+=o._tree.mod;a+=i._tree.mod;c+=u._tree.mod;f+=s._tree.mod}if(o&&!Ys(s)){s._tree.thread=o;s._tree.mod+=l-f}if(i&&!Gs(u)){u._tree.thread=i;u._tree.mod+=a-c;r=e}}return r}var s=t.call(this,e,i),o=s[0];ro(o,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}});u(o);a(o,-o._tree.prelim);var l=Zs(o,to),c=Zs(o,eo),h=Zs(o,no),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;ro(o,function(e){e.x=(e.x-p)/(d-p)*r[0];e.y=e.depth/v*r[1];delete e._tree});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.pack=function(){function i(e,i){var s=t.call(this,e,i),o=s[0];o.x=0;o.y=0;ro(o,function(e){e.r=Math.sqrt(e.value)});ro(o,co);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;ro(o,function(e){e.r+=l});ro(o,co);ro(o,function(e){e.r-=l});f=Math.max(2*o.r/u,2*o.r/a)}vo(o,u/2,a/2,1/f);return s}var t=e.layout.hierarchy().sort(uo),n=0,r=[1,1];i.size=function(e){if(!arguments.length)return r;r=e;return i};i.padding=function(e){if(!arguments.length)return n;n=+e;return i};return Ms(i,t)};e.layout.cluster=function(){function i(e,i){var s=t.call(this,e,i),o=s[0],u,a=0;ro(o,function(e){var t=e.children;if(t&&t.length){e.x=yo(t);e.y=go(t)}else{e.x=u?a+=n(e,u):0;e.y=0;u=e}});var f=bo(o),l=wo(o),c=f.x-n(f,l)/2,h=l.x+n(l,f)/2;ro(o,function(e){e.x=(e.x-c)/(h-c)*r[0];e.y=(1-(o.y?e.y/o.y:1))*r[1]});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.treemap=function(){function l(e,t){var n=-1,r=e.length,i,s;while(++n<r){s=(i=e[n]).value*(t<0?0:t);i.area=isNaN(s)||s<=0?0:s}}function c(e){var t=e.children;if(t&&t.length){var n=s(e),r=[],i=t.slice(),o,u=Infinity,f,h=a==="slice"?n.dx:a==="dice"?n.dy:a==="slice-dice"?e.depth&1?n.dy:n.dx:Math.min(n.dx,n.dy),v;l(i,n.dx*n.dy/e.value);r.area=0;while((v=i.length)>0){r.push(o=i[v-1]);r.area+=o.area;if(a!=="squarify"||(f=p(r,h))<=u){i.pop();u=f}else{r.area-=r.pop().area;d(r,h,n,false);h=Math.min(n.dx,n.dy);r.length=r.area=0;u=Infinity}}if(r.length){d(r,h,n,true);r.length=r.area=0}t.forEach(c)}}function h(e){var t=e.children;if(t&&t.length){var n=s(e),r=t.slice(),i,o=[];l(r,n.dx*n.dy/e.value);o.area=0;while(i=r.pop()){o.push(i);o.area+=i.area;if(i.z!=null){d(o,i.z?n.dx:n.dy,n,!r.length);o.length=o.area=0}}t.forEach(h)}}function p(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;if(r<s)s=r;if(r>i)i=r}n*=n;t*=t;return n?Math.max(t*i*f/n,n/(t*s*f)):Infinity}function d(e,t,r,i){var s=-1,o=e.length,u=r.x,a=r.y,f=t?n(e.area/t):0,l;if(t==r.dx){if(i||f>r.dy)f=r.dy;while(++s<o){l=e[s];l.x=u;l.y=a;l.dy=f;u+=l.dx=Math.min(r.x+r.dx-u,f?n(l.area/f):0)}l.z=true;l.dx+=r.x+r.dx-u;r.y+=f;r.dy-=f}else{if(i||f>r.dx)f=r.dx;while(++s<o){l=e[s];l.x=u;l.y=a;l.dx=f;a+=l.dy=Math.min(r.y+r.dy-a,f?n(l.area/f):0)}l.z=false;l.dy+=r.y+r.dy-a;r.x+=f;r.dx-=f}}function v(e){var n=u||t(e),i=n[0];i.x=0;i.y=0;i.dx=r[0];i.dy=r[1];if(u)t.revalue(i);l([i],i.dx*i.dy/i.value);(u?h:c)(i);if(o)u=n;return n}var t=e.layout.hierarchy(),n=Math.round,r=[1,1],i=null,s=Eo,o=false,u,a="squarify",f=.5*(1+Math.sqrt(5));v.size=function(e){if(!arguments.length)return r;r=e;return v};v.padding=function(e){function t(t){var n=e.call(v,t,t.depth);return n==null?Eo(t):So(t,typeof n==="number"?[n,n,n,n]:n)}function n(t){return So(t,e)}if(!arguments.length)return i;var r;s=(i=e)==null?Eo:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n;return v};v.round=function(e){if(!arguments.length)return n!=Number;n=e?Math.round:Number;return v};v.sticky=function(e){if(!arguments.length)return o;o=e;u=null;return v};v.ratio=function(e){if(!arguments.length)return f;f=e;return v};v.mode=function(e){if(!arguments.length)return a;a=e+"";return v};return Ms(v,t)};e.random={normal:function(e,t){var n=arguments.length;if(n<2)t=1;if(n<1)e=0;return function(){var n,r,i;do{n=Math.random()*2-1;r=Math.random()*2-1;i=n*n+r*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}};e.scale={};e.scale.linear=function(){return Lo([0,1],[0,1],Qi,false)};e.scale.log=function(){return Po(e.scale.linear().domain([0,Math.LN10]),10,Bo,jo)};var Ho=e.format(".0e");e.scale.pow=function(){return Ro(e.scale.linear(),1)};e.scale.sqrt=function(){return e.scale.pow().exponent(.5)};e.scale.ordinal=function(){return zo([],{t:"range",a:[[]]})};e.scale.category10=function(){return e.scale.ordinal().range(Wo)};e.scale.category20=function(){return e.scale.ordinal().range(Xo)};e.scale.category20b=function(){return e.scale.ordinal().range(Vo)};e.scale.category20c=function(){return e.scale.ordinal().range($o)};e.scale.category50=function(){return e.scale.ordinal().range(Jo)};var Wo=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Xo=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];var Vo=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"];var $o=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];var Jo=["#1f77b4","#ff7f0e","#2ca02c","#8c864b","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6","#9edae5","#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#aec7e8","#e7ba52","#ffbb78","#e7cb94","#98df8a","#843c39","#ff9896","#ad494a","#c5b0d5","#d6616b","#c49c94","#e7969c","#f7b6d2","#fd8d3c","#c7c7c7","#7b4173","#dbdb8d","#a55194"];e.scale.quantile=function(){return Ko([],[])};e.scale.quantize=function(){return Qo(0,1,[0,1])};e.scale.threshold=function(){return Go([.5],[0,1])};e.scale.identity=function(){return Yo([0,1])};e.svg.arc=function(){function i(){var i=e.apply(this,arguments),s=t.apply(this,arguments),o=n.apply(this,arguments)+Zo,u=r.apply(this,arguments)+Zo,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<dt?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=eu?i?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+i+"A"+i+","+i+" 0 1,0 0,"+ -i+"A"+i+","+i+" 0 1,0 0,"+i+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":i?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+i*h+","+i*p+"A"+i+","+i+" 0 "+f+",0 "+i*l+","+i*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var e=tu,t=nu,n=ru,r=iu;i.innerRadius=function(t){if(!arguments.length)return e;e=Qt(t);return i};i.outerRadius=function(e){if(!arguments.length)return t;t=Qt(e);return i};i.startAngle=function(e){if(!arguments.length)return n;n=Qt(e);return i};i.endAngle=function(e){if(!arguments.length)return r;r=Qt(e);return i};i.centroid=function(){var i=(e.apply(this,arguments)+t.apply(this,arguments))/2,s=(n.apply(this,arguments)+r.apply(this,arguments))/2+Zo;return[Math.cos(s)*i,Math.sin(s)*i]};return i};var Zo=-dt/2,eu=2*dt-1e-6;e.svg.line.radial=function(){var e=ii(su);e.radius=e.x,delete e.x;e.angle=e.y,delete e.y;return e};li.reverse=ci;ci.reverse=li;e.svg.area=function(){return ou(Gt)};e.svg.area.radial=function(){var e=ou(su);e.radius=e.x,delete e.x;e.innerRadius=e.x0,delete e.x0;e.outerRadius=e.x1,delete e.x1;e.angle=e.y,delete e.y;e.startAngle=e.y0,delete e.y0;e.endAngle=e.y1,delete e.y1;return e};e.svg.chord=function(){function s(n,r){var i=o(this,e,n,r),s=o(this,t,n,r);return"M"+i.p0+a(i.r,i.p1,i.a1-i.a0)+(u(i,s)?f(i.r,i.p1,i.r,i.p0):f(i.r,i.p1,s.r,s.p0)+a(s.r,s.p1,s.a1-s.a0)+f(s.r,s.p1,i.r,i.p0))+"Z"}function o(e,t,s,o){var u=t.call(e,s,o),a=n.call(e,u,o),f=r.call(e,u,o)+Zo,l=i.call(e,u,o)+Zo;return{r:a,a0:f,a1:l,p0:[a*Math.cos(f),a*Math.sin(f)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function u(e,t){return e.a0==t.a0&&e.a1==t.a1}function a(e,t,n){return"A"+e+","+e+" 0 "+ +(n>dt)+",1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Nr,t=Cr,n=uu,r=ru,i=iu;s.radius=function(e){if(!arguments.length)return n;n=Qt(e);return s};s.source=function(t){if(!arguments.length)return e;e=Qt(t);return s};s.target=function(e){if(!arguments.length)return t;t=Qt(e);return s};s.startAngle=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.endAngle=function(e){if(!arguments.length)return i;i=Qt(e);return s};return s};e.svg.diagonal=function(){function r(r,i){var s=e.call(this,r,i),o=t.call(this,r,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];a=a.map(n);return"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var e=Nr,t=Cr,n=au;r.source=function(t){if(!arguments.length)return e;e=Qt(t);return r};r.target=function(e){if(!arguments.length)return t;t=Qt(e);return r};r.projection=function(e){if(!arguments.length)return n;n=e;return r};return r};e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=au,r=t.projection;t.projection=function(e){return arguments.length?r(fu(n=e)):n};return t};e.svg.symbol=function(){function n(n,r){return(pu.get(e.call(this,n,r))||hu)(t.call(this,n,r))}var e=cu,t=lu;n.type=function(t){if(!arguments.length)return e;e=Qt(t);return n};n.size=function(e){if(!arguments.length)return t;t=Qt(e);return n};return n};var pu=e.map({circle:hu,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*vu)),n=t*vu;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});e.svg.symbolTypes=pu.keys();var du=Math.sqrt(3),vu=Math.tan(30*mt);var gu=[],yu=0,bu,wu={ease:us,delay:0,duration:250};gu.call=B.call;gu.empty=B.empty;gu.node=B.node;e.transition=function(e){return arguments.length?bu?e.transition():e:st.transition()};e.transition.prototype=gu;gu.select=function(e){var t=this.id,n=[],r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){n.push(r=[]);for(var a=this[o],f=-1,l=a.length;++f<l;){if((s=a[f])&&(i=e.call(s,s.__data__,f))){if("__data__"in s)i.__data__=s.__data__;xu(i,f,t,s.__transition__[t]);r.push(i)}else{r.push(null)}}}return mu(n,t)};gu.selectAll=function(e){var t=this.id,n=[],r,i,s,o,u;if(typeof e!=="function")e=F(e);for(var a=-1,f=this.length;++a<f;){for(var l=this[a],c=-1,h=l.length;++c<h;){if(s=l[c]){u=s.__transition__[t];i=e.call(s,s.__data__,c);n.push(r=[]);for(var p=-1,d=i.length;++p<d;){xu(o=i[p],p,t,u);r.push(o)}}}}return mu(n,t)};gu.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return mu(t,this.id,this.time).ease(this.ease())};gu.tween=function(e,t){var n=this.id;if(arguments.length<2)return this.node().__transition__[n].tween.get(e);return nt(this,t==null?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})};gu.attr=function(t,n){function s(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var r=Gi(t),i=e.ns.qualify(t);return Eu(this,"attr."+t,n,function(e){function t(){var t=this.getAttribute(i),n;return t!==e&&(n=r(t,e),function(e){this.setAttribute(i,n(e))})}function n(){var t=this.getAttributeNS(i.space,i.local),n;return t!==e&&(n=r(t,e),function(e){this.setAttributeNS(i.space,i.local,n(e))})}return e==null?i.local?o:s:(e+="",i.local?n:t)})};gu.attrTween=function(t,n){function i(e,t){var i=n.call(this,e,t,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function s(e,t){var i=n.call(this,e,t,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=e.ns.qualify(t);return this.tween("attr."+t,r.local?s:i)};gu.style=function(e,t,r){function o(){this.style.removeProperty(e)}var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.style(r,e[r],t);return this}r=""}var s=Gi(e);return Eu(this,"style."+e,t,function(t){function i(){var i=n.getComputedStyle(this,null).getPropertyValue(e),o;return i!==t&&(o=s(i,t),function(t){this.style.setProperty(e,o(t),r)})}return t==null?o:(t+="",i)})};gu.styleTween=function(e,t,r){if(arguments.length<3)r="";return this.tween("style."+e,function(i,s){var o=t.call(this,i,s,n.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),r)}})};gu.text=function(e){return Eu(this,"text",e,Su)};gu.remove=function(){return this.each("end.transition",function(){var e;if(!this.__transition__&&(e=this.parentNode))e.removeChild(this)})};gu.ease=function(t){var n=this.id;if(arguments.length<1)return this.node().__transition__[n].ease;if(typeof t!=="function")t=e.ease.apply(e,arguments);return nt(this,function(e){e.__transition__[n].ease=t})};gu.delay=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].delay=e.call(n,n.__data__,r,i)|0}:(e|=0,function(n){n.__transition__[t].delay=e}))};gu.duration=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,i)|0)}:(e=Math.max(1,e|0),function(n){n.__transition__[t].duration=e}))};gu.each=function(e,t){var n=this.id;if(arguments.length<2){var r=wu,i=bu;bu=n;nt(this,function(t,r,i){wu=t.__transition__[n];e.call(t,t.__data__,r,i)});wu=r;bu=i}else{nt(this,function(r){r.__transition__[n].event.on(e,t)})}return this};gu.transition=function(){var e=this.id,t=++yu,n=[],r,i,s,o;for(var u=0,a=this.length;u<a;u++){n.push(r=[]);for(var i=this[u],f=0,l=i.length;f<l;f++){if(s=i[f]){o=Object.create(s.__transition__[e]);o.delay+=o.duration;xu(s,f,t,o)}r.push(s)}}return mu(n,t)};e.svg.axis=function(){function c(c){c.each(function(){var c=e.select(this);var h=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,p=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f;var d=Lu(t,h,l),v=c.selectAll(".tick.minor").data(d,String),m=v.enter().insert("line",".tick").attr("class","tick minor").style("opacity",1e-6),g=e.transition(v.exit()).style("opacity",1e-6).remove(),y=e.transition(v).style("opacity",1);var b=c.selectAll(".tick.major").data(h,String),w=b.enter().insert("g","path").attr("class","tick major").style("opacity",1e-6),E=e.transition(b.exit()).style("opacity",1e-6).remove(),S=e.transition(b).style("opacity",1),x;var T=To(t),N=c.selectAll(".domain").data([0]),C=(N.enter().append("path").attr("class","domain"),e.transition(N));var k=t.copy(),L=this.__chart__||k;this.__chart__=k;w.append("line");w.append("text");var A=w.select("line"),O=S.select("line"),M=b.select("text").text(p),_=w.select("text"),D=S.select("text");switch(n){case"bottom":{x=Cu;m.attr("y2",i);y.attr("x2",0).attr("y2",i);A.attr("y2",r);_.attr("y",Math.max(r,0)+o);O.attr("x2",0).attr("y2",r);D.attr("x",0).attr("y",Math.max(r,0)+o);M.attr("dy",".71em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+s+"V0H"+T[1]+"V"+s);break};case"top":{x=Cu;m.attr("y2",-i);y.attr("x2",0).attr("y2",-i);A.attr("y2",-r);_.attr("y",-(Math.max(r,0)+o));O.attr("x2",0).attr("y2",-r);D.attr("x",0).attr("y",-(Math.max(r,0)+o));M.attr("dy","0em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+ -s+"V0H"+T[1]+"V"+ -s);break};case"left":{x=ku;m.attr("x2",-i);y.attr("x2",-i).attr("y2",0);A.attr("x2",-r);_.attr("x",-(Math.max(r,0)+o));O.attr("x2",-r).attr("y2",0);D.attr("x",-(Math.max(r,0)+o)).attr("y",0);M.attr("dy",".32em").style("text-anchor","end");C.attr("d","M"+ -s+","+T[0]+"H0V"+T[1]+"H"+ -s);break};case"right":{x=ku;m.attr("x2",i);y.attr("x2",i).attr("y2",0);A.attr("x2",r);_.attr("x",Math.max(r,0)+o);O.attr("x2",r).attr("y2",0);D.attr("x",Math.max(r,0)+o).attr("y",0);M.attr("dy",".32em").style("text-anchor","start");C.attr("d","M"+s+","+T[0]+"H0V"+T[1]+"H"+s);break}}if(t.ticks){w.call(x,L);S.call(x,k);E.call(x,k);m.call(x,L);y.call(x,k);g.call(x,k)}else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};w.call(x,H);S.call(x,H)}})}var t=e.scale.linear(),n=Tu,r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;c.scale=function(e){if(!arguments.length)return t;t=e;return c};c.orient=function(e){if(!arguments.length)return n;n=e in Nu?e+"":Tu;return c};c.ticks=function(){if(!arguments.length)return u;u=arguments;return c};c.tickValues=function(e){if(!arguments.length)return a;a=e;return c};c.tickFormat=function(e){if(!arguments.length)return f;f=e;return c};c.tickSize=function(e,t){if(!arguments.length)return r;var n=arguments.length-1;r=+e;i=n>1?+t:r;s=n>0?+arguments[n]:r;return c};c.tickPadding=function(e){if(!arguments.length)return o;o=+e;return c};c.tickSubdivide=function(e){if(!arguments.length)return l;l=+e;return c};return c};var Tu="bottom",Nu={top:1,right:1,bottom:1,left:1};e.svg.brush=function(){function a(t){t.each(function(){var t=e.select(this),n=t.selectAll(".background").data([0]),o=t.selectAll(".extent").data([0]),u=t.selectAll(".resize").data(s,String),p;t.style("pointer-events","all").on("mousedown.brush",h).on("touchstart.brush",h);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair");o.enter().append("rect").attr("class","extent").style("cursor","move");u.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Au[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden");u.style("display",a.empty()?"none":null);u.exit().remove();if(r){p=To(r);n.attr("x",p[0]).attr("width",p[1]-p[0]);l(t)}if(i){p=To(i);n.attr("y",p[0]).attr("height",p[1]-p[0]);c(t)}f(t)})}function f(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+o[+/e$/.test(e)][0]+","+o[+/^s/.test(e)][1]+")"})}function l(e){e.select(".extent").attr("x",o[0][0]);e.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1][0]-o[0][0])}function c(e){e.select(".extent").attr("y",o[0][1]);e.selectAll(".extent,.e>rect,.w>rect").attr("height",o[1][1]-o[0][1])}function h(){function C(){var t=e.event.changedTouches;return t?e.touches(s,t)[0]:e.mouse(s)}function k(){if(e.event.keyCode==32){if(!b){w=null;E[0]-=o[1][0];E[1]-=o[1][1];b=2}y()}}function L(){if(e.event.keyCode==32&&b==2){E[0]+=o[1][0];E[1]+=o[1][1];b=0;y()}}function A(){var t=C(),n=false;if(S){t[0]+=S[0];t[1]+=S[1]}if(!b){if(e.event.altKey){if(!w)w=[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2];E[0]=o[+(t[0]<w[0])][0];E[1]=o[+(t[1]<w[1])][1]}else w=null}if(m&&O(t,r,0)){l(d);n=true}if(g&&O(t,i,1)){c(d);n=true}if(n){f(d);p({type:"brush",mode:b?"move":"resize"})}}function O(e,t,n){var r=To(t),i=r[0],s=r[1],a=E[n],f=o[1][n]-o[0][n],l,c;if(b){i-=a;s-=f+a}l=Math.max(i,Math.min(s,e[n]));if(b){c=(l+=a)+f}else{if(w)a=Math.max(i,Math.min(s,2*w[n]-l));if(a<l){c=l;l=a}else{c=a}}if(o[0][n]!==l||o[1][n]!==c){u=null;o[0][n]=l;o[1][n]=c;return true}}function M(){A();d.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null);e.select("body").style("cursor",null);x.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null);p({type:"brushend"});y()}var s=this,h=e.select(e.event.target),p=t.of(s,arguments),d=e.select(s),v=h.datum(),m=!/^(n|s)$/.test(v)&&r,g=!/^(e|w)$/.test(v)&&i,b=h.classed("extent"),w,E=C(),S;var x=e.select(n).on("mousemove.brush",A).on("mouseup.brush",M).on("touchmove.brush",A).on("touchend.brush",M).on("keydown.brush",k).on("keyup.brush",L);if(b){E[0]=o[0][0]-E[0];E[1]=o[0][1]-E[1]}else if(v){var T=+/w$/.test(v),N=+/^n/.test(v);S=[o[1-T][0]-E[0],o[1-N][1]-E[1]];E[0]=o[T][0];E[1]=o[N][1]}else if(e.event.altKey)w=E.slice();d.style("pointer-events","none").selectAll(".resize").style("display",null);e.select("body").style("cursor",h.style("cursor"));p({type:"brushstart"});A();y()}var t=S(a,"brushstart","brush","brushend"),r=null,i=null,s=Ou[0],o=[[0,0],[0,0]],u;a.x=function(e){if(!arguments.length)return r;r=e;s=Ou[!r<<1|!i];return a};a.y=function(e){if(!arguments.length)return i;i=e;s=Ou[!r<<1|!i];return a};a.extent=function(e){var t,n,s,f,l;if(!arguments.length){e=u||o;if(r){t=e[0][0],n=e[1][0];if(!u){t=o[0][0],n=o[1][0];if(r.invert)t=r.invert(t),n=r.invert(n);if(n<t)l=t,t=n,n=l}}if(i){s=e[0][1],f=e[1][1];if(!u){s=o[0][1],f=o[1][1];if(i.invert)s=i.invert(s),f=i.invert(f);if(f<s)l=s,s=f,f=l}}return r&&i?[[t,s],[n,f]]:r?[t,n]:i&&[s,f]}u=[[0,0],[0,0]];if(r){t=e[0],n=e[1];if(i)t=t[0],n=n[0];u[0][0]=t,u[1][0]=n;if(r.invert)t=r(t),n=r(n);if(n<t)l=t,t=n,n=l;o[0][0]=t|0,o[1][0]=n|0}if(i){s=e[0],f=e[1];if(r)s=s[1],f=f[1];u[0][1]=s,u[1][1]=f;if(i.invert)s=i(s),f=i(f);if(f<s)l=s,s=f,f=l;o[0][1]=s|0,o[1][1]=f|0}return a};a.clear=function(){u=null;o[0][0]=o[0][1]=o[1][0]=o[1][1]=0;return a};a.empty=function(){return r&&o[0][0]===o[1][0]||i&&o[0][1]===o[1][1]};return e.rebind(a,t,"on")};var Au={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"};var Ou=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.time={};var Mu=Date,_u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Du.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Pu.setUTCDate.apply(this._,arguments)},setDay:function(){Pu.setUTCDay.apply(this._,arguments)},setFullYear:function(){Pu.setUTCFullYear.apply(this._,arguments)},setHours:function(){Pu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Pu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Pu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Pu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Pu.setUTCSeconds.apply(this._,arguments)},setTime:function(){Pu.setTime.apply(this._,arguments)}};var Pu=Date.prototype;var Hu="%a %b %e %X %Y",Bu="%m/%d/%Y",ju="%H:%M:%S";var Fu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Iu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ru=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.time.year=Uu(function(t){t=e.time.day(t);t.setMonth(0,1);return t},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()});e.time.years=e.time.year.range;e.time.years.utc=e.time.year.utc.range;e.time.day=Uu(function(e){var t=new Mu(1970,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1});e.time.days=e.time.day.range;e.time.days.utc=e.time.day.utc.range;e.time.dayOfYear=function(t){var n=e.time.year(t);return Math.floor((t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*6e4)/864e5)};_u.forEach(function(t,n){t=t.toLowerCase();n=7-n;var r=e.time[t]=Uu(function(t){(t=e.time.day(t)).setDate(t.getDate()-(t.getDay()+n)%7);return t},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)-(r!==n)});e.time[t+"s"]=r.range;e.time[t+"s"].utc=r.utc.range;e.time[t+"OfYear"]=function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)}});e.time.week=e.time.sunday;e.time.weeks=e.time.sunday.range;e.time.weeks.utc=e.time.sunday.utc.range;e.time.weekOfYear=e.time.sundayOfYear;e.time.format=function(e){function n(n){var r=[],i=-1,s=0,o,u,a;while(++i<t){if(e.charCodeAt(i)===37){r.push(e.substring(s,i));if((u=ea[o=e.charAt(++i)])!=null)o=e.charAt(++i);if(a=ta[o])o=a(n,u==null?o==="e"?" ":"0":u);r.push(o);s=i+1}}r.push(e.substring(s,i));return r.join("")}var t=e.length;n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Wu(n,e,t,0);if(r!=t.length)return null;if("p"in n)n.H=n.H%12+n.p*12;var i=new Mu;i.setFullYear(n.y,n.m,n.d);i.setHours(n.H,n.M,n.S,n.L);return i};n.toString=function(){return e};return n};var Ju=Xu(Fu),Ku=Xu(Iu),Qu=Xu(qu),Gu=Vu(qu),Yu=Xu(Ru),Zu=Vu(Ru);var ea={"-":"",_:" ",0:"0"};var ta={a:function(e){return Iu[e.getDay()]},A:function(e){return Fu[e.getDay()]},b:function(e){return Ru[e.getMonth()]},B:function(e){return qu[e.getMonth()]},c:e.time.format(Hu),d:function(e,t){return $u(e.getDate(),t,2)},e:function(e,t){return $u(e.getDate(),t,2)},H:function(e,t){return $u(e.getHours(),t,2)},I:function(e,t){return $u(e.getHours()%12||12,t,2)},j:function(t,n){return $u(1+e.time.dayOfYear(t),n,3)},L:function(e,t){return $u(e.getMilliseconds(),t,3)},m:function(e,t){return $u(e.getMonth()+1,t,2)},M:function(e,t){return $u(e.getMinutes(),t,2)},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e,t){return $u(e.getSeconds(),t,2)},U:function(t,n){return $u(e.time.sundayOfYear(t),n,2)},w:function(e){return e.getDay()},W:function(t,n){return $u(e.time.mondayOfYear(t),n,2)},x:e.time.format(Bu),X:e.time.format(ju),y:function(e,t){return $u(e.getFullYear()%100,t,2)},Y:function(e,t){return $u(e.getFullYear()%1e4,t,4)},Z:Sa,"%":function(){return"%"}};var na={a:ra,A:ia,b:sa,B:oa,c:ua,d:da,e:da,H:va,I:va,L:ya,m:pa,M:ma,p:wa,S:ga,x:aa,X:fa,y:ca,Y:la};var ba=/^\s*\d+/;var Ea=e.map({am:0,pm:1});e.time.format.utc=function(t){function r(e){try{Mu=Du;var t=new Mu;t._=e;return n(t)}finally{Mu=Date}}var n=e.time.format(t);r.parse=function(e){try{Mu=Du;var t=n.parse(e);return t&&t._}finally{Mu=Date}};r.toString=n.toString;return r};var xa=e.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");e.time.format.iso=Date.prototype.toISOString&&+(new Date("2000-01-01T00:00:00.000Z"))?Ta:xa;Ta.parse=function(e){var t=new Date(e);return isNaN(t)?null:t};Ta.toString=xa.toString;e.time.second=Uu(function(e){return new Mu(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()});e.time.seconds=e.time.second.range;e.time.seconds.utc=e.time.second.utc.range;e.time.minute=Uu(function(e){return new Mu(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()});e.time.minutes=e.time.minute.range;e.time.minutes.utc=e.time.minute.utc.range;e.time.hour=Uu(function(e){var t=e.getTimezoneOffset()/60;return new Mu((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()});e.time.hours=e.time.hour.range;e.time.hours.utc=e.time.hour.utc.range;e.time.month=Uu(function(t){t=e.time.day(t);t.setDate(1);return t},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()});e.time.months=e.time.month.range;e.time.months.utc=e.time.month.utc.range;var Ma=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6];var _a=[[e.time.second,1],[e.time.second,5],[e.time.second,15],[e.time.second,30],[e.time.minute,1],[e.time.minute,5],[e.time.minute,15],[e.time.minute,30],[e.time.hour,1],[e.time.hour,3],[e.time.hour,6],[e.time.hour,12],[e.time.day,1],[e.time.day,2],[e.time.week,1],[e.time.month,1],[e.time.month,3],[e.time.year,1]];var Da=[[e.time.format("%Y"),$n],[e.time.format("%B"),function(e){return e.getMonth()}],[e.time.format("%b %d"),function(e){return e.getDate()!=1}],[e.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[e.time.format("%I %p"),function(e){return e.getHours()}],[e.time.format("%I:%M"),function(e){return e.getMinutes()}],[e.time.format(":%S"),function(e){return e.getSeconds()}],[e.time.format(".%L"),function(e){return e.getMilliseconds()}]];var Pa=e.scale.linear(),Ha=La(Da);_a.year=function(e,t){return Pa.domain(e.map(Oa)).ticks(t).map(Aa)};e.time.scale=function(){return Na(e.scale.linear(),_a,Ha)};var Ba=_a.map(function(e){return[e[0].utc,e[1]]});var ja=[[e.time.format.utc("%Y"),$n],[e.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[e.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[e.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[e.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[e.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[e.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[e.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]];var Fa=La(ja);Ba.year=function(e,t){return Pa.domain(e.map(qa)).ticks(t).map(Ia)};e.time.scale.utc=function(){return Na(e.scale.linear(),Ba,Fa)};e.text=function(){return e.xhr.apply(e,arguments).response(Ra)};e.json=function(t,n){return e.xhr(t,"application/json",n).response(Ua)};e.html=function(t,n){return e.xhr(t,"text/html",n).response(za)};e.xml=function(){return e.xhr.apply(e,arguments).response(Wa)};return e}() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/fisheye.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/fisheye.js
deleted file mode 100644
index e1addd7b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/fisheye.js
+++ /dev/null
@@ -1,86 +0,0 @@
-(function() {
- d3.fisheye = {
- scale: function(scaleType) {
- return d3_fisheye_scale(scaleType(), 3, 0);
- },
- circular: function() {
- var radius = 200,
- distortion = 2,
- k0,
- k1,
- focus = [0, 0];
-
- function fisheye(d) {
- var dx = d.x - focus[0],
- dy = d.y - focus[1],
- dd = Math.sqrt(dx * dx + dy * dy);
- if (!dd || dd >= radius) return {x: d.x, y: d.y, z: 1};
- var k = k0 * (1 - Math.exp(-dd * k1)) / dd * .75 + .25;
- return {x: focus[0] + dx * k, y: focus[1] + dy * k, z: Math.min(k, 10)};
- }
-
- function rescale() {
- k0 = Math.exp(distortion);
- k0 = k0 / (k0 - 1) * radius;
- k1 = distortion / radius;
- return fisheye;
- }
-
- fisheye.radius = function(_) {
- if (!arguments.length) return radius;
- radius = +_;
- return rescale();
- };
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return distortion;
- distortion = +_;
- return rescale();
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return focus;
- focus = _;
- return fisheye;
- };
-
- return rescale();
- }
- };
-
- function d3_fisheye_scale(scale, d, a) {
-
- function fisheye(_) {
- var x = scale(_),
- left = x < a,
- v,
- range = d3.extent(scale.range()),
- min = range[0],
- max = range[1],
- m = left ? a - min : max - a;
- if (m == 0) m = max - min;
- return (left ? -1 : 1) * m * (d + 1) / (d + (m / Math.abs(x - a))) + a;
- }
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return d;
- d = +_;
- return fisheye;
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return a;
- a = +_;
- return fisheye;
- };
-
- fisheye.copy = function() {
- return d3_fisheye_scale(scale.copy(), d, a);
- };
-
- fisheye.nice = scale.nice;
- fisheye.ticks = scale.ticks;
- fisheye.tickFormat = scale.tickFormat;
- return d3.rebind(fisheye, scale, "domain", "range");
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/hive.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/hive.js
deleted file mode 100644
index 06e53aed..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/hive.js
+++ /dev/null
@@ -1,80 +0,0 @@
-d3.hive = {};
-
-d3.hive.link = function() {
- var source = function(d) { return d.source; },
- target = function(d) { return d.target; },
- angle = function(d) { return d.angle; },
- startRadius = function(d) { return d.radius; },
- endRadius = startRadius,
- arcOffset = -Math.PI / 2;
-
- function link(d, i) {
- var s = node(source, this, d, i),
- t = node(target, this, d, i),
- x;
- if (t.a < s.a) x = t, t = s, s = x;
- if (t.a - s.a > Math.PI) s.a += 2 * Math.PI;
- var a1 = s.a + (t.a - s.a) / 3,
- a2 = t.a - (t.a - s.a) / 3;
- return s.r0 - s.r1 || t.r0 - t.r1
- ? "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "L" + Math.cos(s.a) * s.r1 + "," + Math.sin(s.a) * s.r1
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1
- + "L" + Math.cos(t.a) * t.r0 + "," + Math.sin(t.a) * t.r0
- + "C" + Math.cos(a2) * t.r0 + "," + Math.sin(a2) * t.r0
- + " " + Math.cos(a1) * s.r0 + "," + Math.sin(a1) * s.r0
- + " " + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- : "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1;
- }
-
- function node(method, thiz, d, i) {
- var node = method.call(thiz, d, i),
- a = +(typeof angle === "function" ? angle.call(thiz, node, i) : angle) + arcOffset,
- r0 = +(typeof startRadius === "function" ? startRadius.call(thiz, node, i) : startRadius),
- r1 = (startRadius === endRadius ? r0 : +(typeof endRadius === "function" ? endRadius.call(thiz, node, i) : endRadius));
- return {r0: r0, r1: r1, a: a};
- }
-
- link.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- return link;
- };
-
- link.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- return link;
- };
-
- link.angle = function(_) {
- if (!arguments.length) return angle;
- angle = _;
- return link;
- };
-
- link.radius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = endRadius = _;
- return link;
- };
-
- link.startRadius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = _;
- return link;
- };
-
- link.endRadius = function(_) {
- if (!arguments.length) return endRadius;
- endRadius = _;
- return link;
- };
-
- return link;
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/horizon.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/horizon.js
deleted file mode 100644
index d84c6567..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/horizon.js
+++ /dev/null
@@ -1,192 +0,0 @@
-(function() {
- d3.horizon = function() {
- var bands = 1, // between 1 and 5, typically
- mode = "offset", // or mirror
- interpolate = "linear", // or basis, monotone, step-before, etc.
- x = d3_horizonX,
- y = d3_horizonY,
- w = 960,
- h = 40,
- duration = 0;
-
- var color = d3.scale.linear()
- .domain([-1, 0, 1])
- .range(["#d62728", "#fff", "#1f77b4"]);
-
- // For each small multiple…
- function horizon(g) {
- g.each(function(d, i) {
- var g = d3.select(this),
- n = 2 * bands + 1,
- xMin = Infinity,
- xMax = -Infinity,
- yMax = -Infinity,
- x0, // old x-scale
- y0, // old y-scale
- id; // unique id for paths
-
- // Compute x- and y-values along with extents.
- var data = d.map(function(d, i) {
- var xv = x.call(this, d, i),
- yv = y.call(this, d, i);
- if (xv < xMin) xMin = xv;
- if (xv > xMax) xMax = xv;
- if (-yv > yMax) yMax = -yv;
- if (yv > yMax) yMax = yv;
- return [xv, yv];
- });
-
- // Compute the new x- and y-scales, and transform.
- var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]),
- y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]),
- t1 = d3_horizonTransform(bands, h, mode);
-
- // Retrieve the old scales, if this is an update.
- if (this.__chart__) {
- x0 = this.__chart__.x;
- y0 = this.__chart__.y;
- t0 = this.__chart__.t;
- id = this.__chart__.id;
- } else {
- x0 = x1.copy();
- y0 = y1.copy();
- t0 = t1;
- id = ++d3_horizonId;
- }
-
- // We'll use a defs to store the area path and the clip path.
- var defs = g.selectAll("defs")
- .data([null]);
-
- // The clip path is a simple rect.
- defs.enter().append("defs").append("clipPath")
- .attr("id", "d3_horizon_clip" + id)
- .append("rect")
- .attr("width", w)
- .attr("height", h);
-
- defs.select("rect").transition()
- .duration(duration)
- .attr("width", w)
- .attr("height", h);
-
- // We'll use a container to clip all horizon layers at once.
- g.selectAll("g")
- .data([null])
- .enter().append("g")
- .attr("clip-path", "url(#d3_horizon_clip" + id + ")");
-
- // Instantiate each copy of the path with different transforms.
- var path = g.select("g").selectAll("path")
- .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number);
-
- var d0 = d3_horizonArea
- .interpolate(interpolate)
- .x(function(d) { return x0(d[0]); })
- .y0(h * bands)
- .y1(function(d) { return h * bands - y0(d[1]); })
- (data);
-
- var d1 = d3_horizonArea
- .x(function(d) { return x1(d[0]); })
- .y1(function(d) { return h * bands - y1(d[1]); })
- (data);
-
- path.enter().append("path")
- .style("fill", color)
- .attr("transform", t0)
- .attr("d", d0);
-
- path.transition()
- .duration(duration)
- .style("fill", color)
- .attr("transform", t1)
- .attr("d", d1);
-
- path.exit().transition()
- .duration(duration)
- .attr("transform", t1)
- .attr("d", d1)
- .remove();
-
- // Stash the new scales.
- this.__chart__ = {x: x1, y: y1, t: t1, id: id};
- });
- d3.timer.flush();
- }
-
- horizon.duration = function(x) {
- if (!arguments.length) return duration;
- duration = +x;
- return horizon;
- };
-
- horizon.bands = function(x) {
- if (!arguments.length) return bands;
- bands = +x;
- color.domain([-bands, 0, bands]);
- return horizon;
- };
-
- horizon.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return horizon;
- };
-
- horizon.colors = function(x) {
- if (!arguments.length) return color.range();
- color.range(x);
- return horizon;
- };
-
- horizon.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x + "";
- return horizon;
- };
-
- horizon.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return horizon;
- };
-
- horizon.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return horizon;
- };
-
- horizon.width = function(x) {
- if (!arguments.length) return w;
- w = +x;
- return horizon;
- };
-
- horizon.height = function(x) {
- if (!arguments.length) return h;
- h = +x;
- return horizon;
- };
-
- return horizon;
- };
-
- var d3_horizonArea = d3.svg.area(),
- d3_horizonId = 0;
-
- function d3_horizonX(d) {
- return d[0];
- }
-
- function d3_horizonY(d) {
- return d[1];
- }
-
- function d3_horizonTransform(bands, h, mode) {
- return mode == "offset"
- ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; }
- : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; };
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/interactiveLayer.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/interactiveLayer.js
deleted file mode 100644
index 4dfb68dc..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/interactiveLayer.js
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Utility class to handle creation of an interactive layer.
-This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
-containing the X-coordinate. It can also render a vertical line where the mouse is located.
-
-dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
-the rectangle. The dispatch is given one object which contains the mouseX/Y location.
-It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
-*/
-nv.interactiveGuideline = function() {
- "use strict";
- var tooltip = nv.models.tooltip();
- //Public settings
- var width = null
- , height = null
- //Please pass in the bounding chart's top and left margins
- //This is important for calculating the correct mouseX/Y positions.
- , margin = {left: 0, top: 0}
- , xScale = d3.scale.linear()
- , yScale = d3.scale.linear()
- , dispatch = d3.dispatch('elementMousemove', 'elementMouseout','elementDblclick')
- , showGuideLine = true
- , svgContainer = null
- //Must pass in the bounding chart's <svg> container.
- //The mousemove event is attached to this container.
- ;
-
- //Private variables
- var isMSIE = navigator.userAgent.indexOf("MSIE") !== -1 //Check user-agent for Microsoft Internet Explorer.
- ;
-
-
- function layer(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || 960), availableHeight = (height || 400);
-
- var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([data]);
- var wrapEnter = wrap.enter()
- .append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
-
-
- wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
-
- if (!svgContainer) {
- return;
- }
-
- function mouseHandler() {
- var d3mouse = d3.mouse(this);
- var mouseX = d3mouse[0];
- var mouseY = d3mouse[1];
- var subtractMargin = true;
- var mouseOutAnyReason = false;
- if (isMSIE) {
- /*
- D3.js (or maybe SVG.getScreenCTM) has a nasty bug in Internet Explorer 10.
- d3.mouse() returns incorrect X,Y mouse coordinates when mouse moving
- over a rect in IE 10.
- However, d3.event.offsetX/Y also returns the mouse coordinates
- relative to the triggering <rect>. So we use offsetX/Y on IE.
- */
- mouseX = d3.event.offsetX;
- mouseY = d3.event.offsetY;
-
- /*
- On IE, if you attach a mouse event listener to the <svg> container,
- it will actually trigger it for all the child elements (like <path>, <circle>, etc).
- When this happens on IE, the offsetX/Y is set to where ever the child element
- is located.
- As a result, we do NOT need to subtract margins to figure out the mouse X/Y
- position under this scenario. Removing the line below *will* cause
- the interactive layer to not work right on IE.
- */
- if(d3.event.target.tagName !== "svg")
- subtractMargin = false;
-
- if (d3.event.target.className.baseVal.match("nv-legend"))
- mouseOutAnyReason = true;
-
- }
-
- if(subtractMargin) {
- mouseX -= margin.left;
- mouseY -= margin.top;
- }
-
- /* If mouseX/Y is outside of the chart's bounds,
- trigger a mouseOut event.
- */
- if (mouseX < 0 || mouseY < 0
- || mouseX > availableWidth || mouseY > availableHeight
- || (d3.event.relatedTarget && d3.event.relatedTarget.ownerSVGElement === undefined)
- || mouseOutAnyReason
- )
- {
- if (isMSIE) {
- if (d3.event.relatedTarget
- && d3.event.relatedTarget.ownerSVGElement === undefined
- && d3.event.relatedTarget.className.match(tooltip.nvPointerEventsClass)) {
- return;
- }
- }
- dispatch.elementMouseout({
- mouseX: mouseX,
- mouseY: mouseY
- });
- layer.renderGuideLine(null); //hide the guideline
- return;
- }
-
- var pointXValue = xScale.invert(mouseX);
- dispatch.elementMousemove({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
-
- //If user double clicks the layer, fire a elementDblclick dispatch.
- if (d3.event.type === "dblclick") {
- dispatch.elementDblclick({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
- }
- }
-
- svgContainer
- .on("mousemove",mouseHandler, true)
- .on("mouseout" ,mouseHandler,true)
- .on("dblclick" ,mouseHandler)
- ;
-
- //Draws a vertical guideline at the given X postion.
- layer.renderGuideLine = function(x) {
- if (!showGuideLine) return;
- var line = wrap.select(".nv-interactiveGuideLine")
- .selectAll("line")
- .data((x != null) ? [nv.utils.NaNtoZero(x)] : [], String);
-
- line.enter()
- .append("line")
- .attr("class", "nv-guideline")
- .attr("x1", function(d) { return d;})
- .attr("x2", function(d) { return d;})
- .attr("y1", availableHeight)
- .attr("y2",0)
- ;
- line.exit().remove();
-
- }
- });
- }
-
- layer.dispatch = dispatch;
- layer.tooltip = tooltip;
-
- layer.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return layer;
- };
-
- layer.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return layer;
- };
-
- layer.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return layer;
- };
-
- layer.xScale = function(_) {
- if (!arguments.length) return xScale;
- xScale = _;
- return layer;
- };
-
- layer.showGuideLine = function(_) {
- if (!arguments.length) return showGuideLine;
- showGuideLine = _;
- return layer;
- };
-
- layer.svgContainer = function(_) {
- if (!arguments.length) return svgContainer;
- svgContainer = _;
- return layer;
- };
-
-
- return layer;
-};
-
-/* Utility class that uses d3.bisect to find the index in a given array, where a search value can be inserted.
-This is different from normal bisectLeft; this function finds the nearest index to insert the search value.
-
-For instance, lets say your array is [1,2,3,5,10,30], and you search for 28.
-Normal d3.bisectLeft will return 4, because 28 is inserted after the number 10. But interactiveBisect will return 5
-because 28 is closer to 30 than 10.
-
-Unit tests can be found in: interactiveBisectTest.html
-
-Has the following known issues:
- * Will not work if the data points move backwards (ie, 10,9,8,7, etc) or if the data points are in random order.
- * Won't work if there are duplicate x coordinate values.
-*/
-nv.interactiveBisect = function (values, searchVal, xAccessor) {
- "use strict";
- if (! values instanceof Array) return null;
- if (typeof xAccessor !== 'function') xAccessor = function(d,i) { return d.x;}
-
- var bisect = d3.bisector(xAccessor).left;
- var index = d3.max([0, bisect(values,searchVal) - 1]);
- var currentValue = xAccessor(values[index], index);
- if (typeof currentValue === 'undefined') currentValue = index;
-
- if (currentValue === searchVal) return index; //found exact match
-
- var nextIndex = d3.min([index+1, values.length - 1]);
- var nextValue = xAccessor(values[nextIndex], nextIndex);
- if (typeof nextValue === 'undefined') nextValue = nextIndex;
-
- if (Math.abs(nextValue - searchVal) >= Math.abs(currentValue - searchVal))
- return index;
- else
- return nextIndex
-};
-
-/*
-Returns the index in the array "values" that is closest to searchVal.
-Only returns an index if searchVal is within some "threshold".
-Otherwise, returns null.
-*/
-nv.nearestValueIndex = function (values, searchVal, threshold) {
- "use strict";
- var yDistMax = Infinity, indexToHighlight = null;
- values.forEach(function(d,i) {
- var delta = Math.abs(searchVal - d);
- if ( delta <= yDistMax && delta < threshold) {
- yDistMax = delta;
- indexToHighlight = i;
- }
- });
- return indexToHighlight;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/intro.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/intro.js
deleted file mode 100644
index af50383e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/intro.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis-min.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis-min.js
deleted file mode 100644
index 1101dde5..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis-min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){function o(d){return d.each(function(d){var o=d3.select(this),p=o.selectAll("g.nv-wrap.nv-axis").data([d]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");q.append("g");var s=p.select("g");null!==m?a.ticks(m):("top"==a.orient()||"bottom"==a.orient())&&a.ticks(Math.abs(e.range()[1]-e.range()[0])/100),d3.transition(s).call(a),n=n||a.scale();var t=a.tickFormat();null==t&&(t=n.tickFormat());var u=s.selectAll("text.nv-axislabel").data([f||null]);switch(u.exit().remove(),a.orient()){case"top":u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",0);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+e(a)+",0)"}).select("text").attr("dy","0em").attr("y",-a.tickPadding()).attr("text-anchor","middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate("+e.range()[b]+",0)"})}break;case"bottom":var x=36,y=30,z=s.selectAll("g").select("text");if(i%360){z.each(function(){var c=this.getBBox().width;c>y&&(y=c)});var A=Math.abs(Math.sin(i*Math.PI/180)),x=(A?A*y:y)+30;z.attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i%360>0?"start":"end")}u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",x);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data([e.domain()[0],e.domain()[e.domain().length-1]]);w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",a.tickPadding()).attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i?i%360>0?"start":"end":"middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"})}k&&z.attr("transform",function(a,b){return"translate(0,"+(0==b%2?"0":"12")+")"});break;case"right":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(90)":"").attr("y",j?-Math.max(b.right,c)+30:-10),u.attr("x",j?e.range()[0]/2:a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(-90)":"").attr("y",j?-Math.max(b.left,c)+0:-10),u.attr("x",j?-e.range()[0]/2:-a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}}if(u.text(function(a){return a}),!g||"left"!==a.orient()&&"right"!==a.orient()||(s.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(e(a)<e.range()[1]+10||e(a)>e.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),e.domain()[0]==e.domain()[1]&&0==e.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),g&&("top"===a.orient()||"bottom"===a.orient())){var B=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?B.push(e(a)-this.getBBox().width-4):B.push(e(a)+this.getBBox().width+4)}catch(c){b?B.push(e(a)-4):B.push(e(a)+4)}}),s.selectAll("g").each(function(a){(e(a)<B[0]||e(a)>B[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}h&&s.selectAll("line.tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)}).classed("zero",!0),n=e.copy()}),o}var a=d3.svg.axis(),b={top:0,right:0,bottom:0,left:0},c=75,d=60,e=d3.scale.linear(),f=null,g=!1,h=!0,i=0,j=!0,k=!1,l=!1,m=null;a.scale(e).orient("bottom").tickFormat(function(a){return a});var n;return o.axis=a,d3.rebind(o,a,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o.margin=function(a){return arguments.length?(b.top=a.top!==void 0?a.top:b.top,b.right=a.right!==void 0?a.right:b.right,b.bottom=a.bottom!==void 0?a.bottom:b.bottom,b.left=a.left!==void 0?a.left:b.left,o):b},o.width=function(a){return arguments.length?(c=a,o):c},o.ticks=function(a){return arguments.length?(m=a,o):m},o.height=function(a){return arguments.length?(d=a,o):d},o.axisLabel=function(a){return arguments.length?(f=a,o):f},o.showMaxMin=function(a){return arguments.length?(g=a,o):g},o.highlightZero=function(a){return arguments.length?(h=a,o):h},o.scale=function(b){return arguments.length?(e=b,a.scale(e),l="function"==typeof e.rangeBands,d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o):e},o.rotateYLabel=function(a){return arguments.length?(j=a,o):j},o.rotateLabels=function(a){return arguments.length?(i=a,o):i},o.staggerLabels=function(a){return arguments.length?(k=a,o):k},o}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.js
deleted file mode 100644
index 9895c3f0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.js
+++ /dev/null
@@ -1,470 +0,0 @@
-nv.models.axis = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale = false
- , axisLabelDistance = 12 //The larger this number is, the closer the axis label is to the axis.
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- g.transition().call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .style('text-anchor', 'start')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + axisLabelDistance) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else {
- v = fmt(d);
- }
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- //v = fmt(v);
- //fmt = d3.format(',.2f');
- v = fmt(v);
- } else {
- v = fmt(d);
- }
- //alert(v);
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
-
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.axisLabelDistance = function(_) {
- if (!arguments.length) return axisLabelDistance;
- axisLabelDistance = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.min.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.min.js
deleted file mode 100644
index 6c8ad6ab..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/axis.min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){"use strict";function m(r){r.each(function(r){var m=d3.select(this);var g=m.selectAll("g.nv-wrap.nv-axis").data([r]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(h!==null)e.ticks(h);else if(e.orient()=="top"||e.orient()=="bottom")e.ticks(Math.abs(i.range()[1]-i.range()[0])/100);w.transition().call(e);v=v||e.scale();var E=e.tickFormat();if(E==null){E=v.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([s||null]);S.exit().remove();switch(e.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+i(e)+",0)"}).select("text").attr("dy","0em").attr("y",-e.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+i.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(a%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(a*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",e.tickPadding()).attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a?a%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"})}if(l)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"begin").attr("transform",f?"rotate(90)":"").attr("y",f?-Math.max(t.right,n)+12:-10).attr("x",f?i.range()[0]/2:e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+i(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",e.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"end").attr("transform",f?"rotate(-90)":"").attr("y",f?-Math.max(t.left,n)+d:-10).attr("x",f?-i.range()[0]/2:-e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+v(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-e.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(o&&(e.orient()==="left"||e.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<i.range()[1]+10||i(e)>i.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(i.domain()[0]==i.domain()[1]&&i.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(o&&(e.orient()==="top"||e.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(i(e)-this.getBBox().width-4);else A.push(i(e)+this.getBBox().width+4)}catch(n){if(t)A.push(i(e)-4);else A.push(i(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<A[0]||i(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(u)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);v=i.copy()});return m}var e=d3.svg.axis();var t={top:0,right:0,bottom:0,left:0},n=75,r=60,i=d3.scale.linear(),s=null,o=true,u=true,a=0,f=true,l=false,c=false,h=null,p=false,d=12;e.scale(i).orient("bottom").tickFormat(function(e){return e});var v;m.axis=e;d3.rebind(m,e,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(m,i,"domain","range","rangeBand","rangeBands");m.options=nv.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.width=function(e){if(!arguments.length)return n;n=e;return m};m.ticks=function(e){if(!arguments.length)return h;h=e;return m};m.height=function(e){if(!arguments.length)return r;r=e;return m};m.axisLabel=function(e){if(!arguments.length)return s;s=e;return m};m.showMaxMin=function(e){if(!arguments.length)return o;o=e;return m};m.logScale=function(e){if(!arguments.length)return p;p=e;return m};m.highlightZero=function(e){if(!arguments.length)return u;u=e;return m};m.scale=function(t){if(!arguments.length)return i;i=t;e.scale(i);c=typeof i.rangeBands==="function";d3.rebind(m,i,"domain","range","rangeBand","rangeBands");return m};m.rotateYLabel=function(e){if(!arguments.length)return f;f=e;return m};m.rotateLabels=function(e){if(!arguments.length)return a;a=e;return m};m.staggerLabels=function(e){if(!arguments.length)return l;l=e;return m};m.axisLabelDistance=function(e){if(!arguments.length)return d;d=e;return m};return m} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bullet.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bullet.js
deleted file mode 100644
index 86ebeb0f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bullet.js
+++ /dev/null
@@ -1,250 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this),
- mainGroup = nv.log(this.parentNode.parentNode).getAttribute('transform'),
- heightFromTop = nv.log(parseInt(mainGroup.replace(/.*,(\d+)\)/,"$1"))); //TODO: There should be a smarter way to get this value
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var MaxX = Math.max(rangez[0] ? rangez[0]:0 , markerz[0] ? markerz[0] : 0 , measurez[0] ? measurez[0] : 0)
- var x1 = d3.scale.linear()
- .domain([0, MaxX]).nice() // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), heightFromTop]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bulletChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bulletChart.js
deleted file mode 100644
index a2a0f077..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/backup/bulletChart.js
+++ /dev/null
@@ -1,349 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + e.label + '</h3>' +
- '<p>' + e.value + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, parentElement) {
- var offsetElement = parentElement.parentNode.parentNode,
- left = e.pos[0] + offsetElement.offsetLeft + margin.left,
- top = e.pos[1] + offsetElement.offsetTop + margin.top;
-
- var content = '<h3>' + e.label + '</h3>' +
- '<p>' + e.value + '</p>';
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement.parentNode);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- /*
- // Disabled until I figure out a better way to check for no data with the bullet chart
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
- */
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + ( margin.top + i*height )+ ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var MaxX = Math.max(rangez[0] ? rangez[0]:0 , markerz[0] ? markerz[0] : 0 , measurez[0] ? measurez[0] : 0)
- var x1 = d3.scale.linear()
- .domain([0, MaxX]).nice() // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append("g")
- .attr("text-anchor", "end")
- .attr("transform", "translate(-6," + (height - margin.top - margin.bottom) / 2 + ")");
- title.append("text")
- .attr("class", "nv-title")
- .text(function(d) { return d.title; });
-
- title.append("text")
- .attr("class", "nv-subtitle")
- .attr("dy", "1em")
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat(8);
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks(8), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
- // Transition the entering ticks to the new scale, x1.
- d3.transition(tickEnter)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/boilerplate.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/boilerplate.js
deleted file mode 100644
index 3d2360a6..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/boilerplate.js
+++ /dev/null
@@ -1,104 +0,0 @@
-
-nv.models.chartName = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , dispatch = d3.dispatch('stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-chartName').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-chartName');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-mainWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bullet.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bullet.js
deleted file mode 100644
index 9b9bf4d1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bullet.js
+++ /dev/null
@@ -1,385 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , rangeLabels = function(d) { return d.rangeLabels ? d.rangeLabels : [] }
- , markerLabels = function(d) { return d.markerLabels ? d.markerLabels : [] }
- , measureLabels = function(d) { return d.measureLabels ? d.measureLabels : [] }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending),
- rangeLabelz = rangeLabels.call(this, d, i).slice(),
- markerLabelz = markerLabels.call(this, d, i).slice(),
- measureLabelz = measureLabels.call(this, d, i).slice();
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: measureLabelz[0] || 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: measureLabelz[0] || 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bulletChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bulletChart.js
deleted file mode 100644
index fa5bd596..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/bulletChart.js
+++ /dev/null
@@ -1,343 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/cumulativeLineChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/cumulativeLineChart.js
deleted file mode 100644
index 00f193cf..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/cumulativeLineChart.js
+++ /dev/null
@@ -1,782 +0,0 @@
-
-nv.models.cumulativeLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , showControls = true
- , useInteractiveGuideline = false
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
- controls.updateState(false);
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
- var interactivePointerEvents = (useInteractiveGuideline) ? "none" : "all";
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-interactive');
- gEnter.append('g').attr('class', 'nv-x nv-axis').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap').style("pointer-events",interactivePointerEvents);
- gEnter.append('g').attr('class', 'nv-avgLinesWrap').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left,top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- var getAvgLineY = function(d) {
- //If average lines go off the svg element, clamp them to the svg bounds.
- var yVal = y(average(d));
- if (yVal < 0) return 0;
- if (yVal > availableHeight) return availableHeight;
- return yVal;
- };
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines
- .style('stroke-opacity',function(d){
- //If average lines go offscreen, make them transparent
- var yVal = y(average(d));
- if (yVal < 0 || yVal > availableHeight) return 0;
- return 1;
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .style("pointer-events","all")
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- //When dragging the index line, turn off line transitions.
- // Then turn them back on when done dragging.
- var oldDuration = chart.transitionDuration();
- chart.transitionDuration(0);
- chart.update();
- chart.transitionDuration(oldDuration);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
-
-
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
-
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex), pointIndex);
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'xScale','yScale', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi','useVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBar.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBar.js
deleted file mode 100644
index a20f5829..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBar.js
+++ /dev/null
@@ -1,349 +0,0 @@
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range(yRange || [availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range(yRange || [availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- ;
-
- bars.select('text')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- .transition()
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
-
- ;
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .transition()
- .attr('width', x.rangeBand() * .9 / data.length);
- bars.transition()
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y((yDomain && yDomain[0]) || 0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBarChart.js
deleted file mode 100644
index 48a48164..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/discreteBarChart.js
+++ /dev/null
@@ -1,333 +0,0 @@
-
-nv.models.discreteBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() {
- dispatch.beforeUpdate();
- container.transition().duration(transitionDuration).call(chart);
- };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale().clamp(true);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/distribution.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/distribution.js
deleted file mode 100644
index 62a74655..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/distribution.js
+++ /dev/null
@@ -1,148 +0,0 @@
-
-nv.models.distribution = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- distWrap.exit().selectAll('line.nv-dist' + axis)
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- dist
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBar.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBar.js
deleted file mode 100644
index 2a6c644d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBar.js
+++ /dev/null
@@ -1,331 +0,0 @@
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , interactive = true
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
-
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBar-' + id).data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBar-' + id);
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d }, function(d,i) {return getX(d,i)});
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return nv.utils.NaNtoZero(y(Math.max(0, getY(d,i)))) })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.abs(y(getY(d,i)) - y(0))) })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- .on('mouseover', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- if (!interactive) return;
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- if (!interactive) return;
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 );
-
-
- bars.transition()
- .attr('y', function(d,i) {
- var rval = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i));
- return nv.utils.NaNtoZero(rval);
- })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.max(Math.abs(y(getY(d,i)) - y(0)),1)) });
-
- });
-
- return chart;
- }
-
- //Create methods to allow outside functions to highlight a specific bar.
- chart.highlightPoint = function(pointIndex, isHoverOver) {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar-0-" + pointIndex)
- .classed("hover", isHoverOver)
- ;
- };
-
- chart.clearHighlights = function() {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar.hover")
- .classed("hover", false)
- ;
- };
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if(!arguments.length) return interactive;
- interactive = false;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBarChart.js
deleted file mode 100644
index a5b4a097..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/historicalBarChart.js
+++ /dev/null
@@ -1,419 +0,0 @@
-
-nv.models.historicalBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBarChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBarChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale',
- 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate','highlightPoint','clearHighlights', 'interactive');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/indentedTree.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/indentedTree.js
deleted file mode 100644
index 18c2700f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/indentedTree.js
+++ /dev/null
@@ -1,337 +0,0 @@
-nv.models.indentedTree = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- , getUrl = function(d) { return d.url }
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.each(function(d) {
- if (!index && getUrl(d))
- d3.select(this)
- .append('a')
- .attr('href',getUrl)
- .attr('class', d3.functor(column.classes))
- .append('span')
- else
- d3.select(this)
- .append('span')
-
- d3.select(this).select('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
- });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- // if (column.click)
- // nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- chart.getUrl = function(_){
- if (!arguments.length) return getUrl;
- getUrl = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/legend.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/legend.js
deleted file mode 100644
index 21f9f9a4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/legend.js
+++ /dev/null
@@ -1,270 +0,0 @@
-nv.models.legend = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , rightAlign = true
- , updateState = true //If true, legend will update data.disabled and trigger a 'stateChange' dispatch.
- , radioButtonMode = false //If true, clicking legend items will cause it to behave like a radio button. (only one can be selected at a time)
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout', 'stateChange')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- if (updateState) {
- if (radioButtonMode) {
- //Radio button mode: set every series to disabled,
- // and enable the clicked series.
- data.forEach(function(series) { series.disabled = true});
- d.disabled = false;
- }
- else {
- d.disabled = !d.disabled;
- if (data.every(function(series) { return series.disabled})) {
- //the default behavior of NVD3 legends is, if every single series
- // is disabled, turn all series' back on.
- data.forEach(function(series) { series.disabled = false});
- }
- }
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- if (updateState) {
- //the default behavior of NVD3 legends, when double clicking one,
- // is to set all other series' to false, and make the double clicked series enabled.
- data.forEach(function(series) {
- series.disabled = true;
- });
- d.disabled = false;
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('class','nv-legend-symbol')
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('class','nv-legend-text')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var nodeTextLength;
- try {
- nodeTextLength = legendText.node().getComputedTextLength();
- }
- catch(e) {
- nodeTextLength = nv.utils.calcApproxTextWidth(legendText);
- }
-
- seriesWidths.push(nodeTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
- if (seriesPerRow === 0) seriesPerRow = 1; //minimum of one series per row
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (var k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- if (rightAlign) {
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
- }
- else {
- g.attr('transform', 'translate(0' + ',' + margin.top + ')');
- }
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- chart.rightAlign = function(_) {
- if (!arguments.length) return rightAlign;
- rightAlign = _;
- return chart;
- };
-
- chart.updateState = function(_) {
- if (!arguments.length) return updateState;
- updateState = _;
- return chart;
- };
-
- chart.radioButtonMode = function(_) {
- if (!arguments.length) return radioButtonMode;
- radioButtonMode = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/line.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/line.js
deleted file mode 100644
index 855cc541..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/line.js
+++ /dev/null
@@ -1,284 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- scatterWrap.transition().call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- groups.exit().selectAll('path.nv-area')
- .remove();
-
- areaPaths
- .transition()
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- );
- groups.exit().selectAll('path.nv-line')
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
- linePaths
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi', 'clipRadius', 'padData','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineChart.js
deleted file mode 100644
index a4ffcf6a..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineChart.js
+++ /dev/null
@@ -1,465 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left, top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- linesWrap.transition().call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange'
- , 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'useVoronoi','id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarChart.js
deleted file mode 100644
index 77fcbab7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarChart.js
+++ /dev/null
@@ -1,433 +0,0 @@
-
-nv.models.linePlusBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarWithFocusChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarWithFocusChart.js
deleted file mode 100644
index 2ef31137..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/linePlusBarWithFocusChart.js
+++ /dev/null
@@ -1,658 +0,0 @@
-
-nv.models.linePlusBarWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 0
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- bars2Wrap.transition().call(bars2);
- lines2Wrap.transition().call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- g.select('.nv-context .nv-x.nv-axis').transition()
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- g.select('.nv-context .nv-y1.nv-axis').transition()
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- g.select('.nv-context .nv-y2.nv-axis').transition()
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- g.select('.nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- focusBarsWrap.transition().duration(transitionDuration).call(bars);
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- g.select('.nv-focus .nv-y1.nv-axis').transition().duration(transitionDuration)
- .call(y1Axis);
- g.select('.nv-focus .nv-y2.nv-axis').transition().duration(transitionDuration)
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheye.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheye.js
deleted file mode 100644
index 2b411672..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheye.js
+++ /dev/null
@@ -1,200 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //Default Settings
- var margin = {top: 0, right: 0, bottom: 0, left: 0},
- width = 960,
- height = 500,
- color = nv.utils.defaultColor(), // function that returns colors
- id = Math.floor(Math.random() * 10000), //Create semi-unique ID incase user doesn't select one
- getX = function(d) { return d.x }, // accessor to get the x value from a data point
- getY = function(d) { return d.y }, // accessor to get the y value from a data point
- clipEdge = false, // if true, masks lines within x and y scale
- interpolate = "linear"; // controls the line interpolation
-
-
- var scatter = nv.models.scatter()
- .id(id)
- .size(16) // default size
- .sizeDomain([16,256]), //set to speed up calculation, needs to be unset if there is a custom size accessor
- //x = scatter.xScale(),
- //y = scatter.yScale(),
- x, y,
- x0, y0, timeoutID;
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom;
-
- //get the scales inscase scatter scale was set manually
- x = x || scatter.xScale();
- y = y || scatter.yScale();
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y;
-
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- wrapEnter.append('g').attr('class', 'nv-scatterWrap');
- var scatterWrap = wrap.select('.nv-scatterWrap').datum(data);
-
- gEnter.append('g').attr('class', 'nv-groups');
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- d3.transition(scatterWrap).call(scatter);
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) })
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5)
-
-
- var paths = groups.selectAll('path')
- .data(function(d, i) { return [d.values] });
- paths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path'))
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- )
- .remove(); // redundant? line is already being removed
- d3.transition(paths)
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- //store old scales for use in transitions on update, to animate from old to new positions
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = scatter.dispatch;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheyeChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheyeChart.js
deleted file mode 100644
index ad894190..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFisheyeChart.js
+++ /dev/null
@@ -1,297 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = nv.utils.defaultColor(),
- width = null,
- height = null,
- showLegend = true,
- showControls = true,
- fisheye = 0,
- pauseFisheye = false,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- noData = "No Data Available."
- ;
-
-
- var x = d3.fisheye.scale(d3.scale.linear).distortion(0);
-
- var lines = nv.models.line().xScale(x),
- //x = lines.xScale(),
- y = lines.yScale(),
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis = nv.models.axis().scale(y).orient('left'),
- legend = nv.models.legend().height(30),
- controls = nv.models.legend().height(30).updateState(false),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this; // I need a reference to the container in order to have outside code check if the chart is visible or not
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- container.append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('x', availableWidth / 2)
- .attr('y', availableHeight / 2)
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle')
- .text(noData);
- return chart;
- } else {
- container.select('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
-
-
- gEnter.append('rect')
- .attr('class', 'nvd3 nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- var g = wrap.select('g');
-
-
-
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
-
-
- xAxis
- //.scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- //.scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
-
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye; });
- //g.select('.point-paths').on('mousemove', updateFisheye);
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- //g.select('.background') .style('pointer-events', 'none');
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-background') .style('pointer-events', 'all');
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- x.distortion(fisheye).focus(mouse[0]);
- }
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- //scatter.interactive(d.disabled);
- //tooltips = d.disabled;
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
-
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
- if (tooltips) dispatch.on('tooltipShow', function(e) { showTooltip(e, that.parentNode) } ); // TODO: maybe merge with above?
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- if (tooltips) dispatch.on('tooltipHide', nv.tooltip.cleanup);
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFocusChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFocusChart.js
deleted file mode 100644
index 0afd28bd..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/lineWithFocusChart.js
+++ /dev/null
@@ -1,574 +0,0 @@
-nv.models.lineWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 250
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', function() {
- //When brushing, turn off transitions because chart needs to change immediately.
- var oldTransition = chart.transitionDuration();
- chart.transitionDuration(0);
- onBrush();
- chart.transitionDuration(oldTransition);
- });
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- var extent = brush.empty() ? x2.domain() : brush.extent();
-
- //The brush extent cannot be less than one. If it is, don't update the line chart.
- if (Math.abs(extent[0] - extent[1]) <= 1) {
- return;
- }
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
-
- // Update Main (Focus) Axes
- g.select('.nv-focus .nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- g.select('.nv-focus .nv-y.nv-axis').transition().duration(transitionDuration)
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBar.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBar.js
deleted file mode 100644
index 1085919b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBar.js
+++ /dev/null
@@ -1,461 +0,0 @@
-
-nv.models.multiBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , stackOffset = 'zero' // options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , groupSpacing = 0.1
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset(stackOffset)
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], groupSpacing);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .selectAll('rect.nv-bar')
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) )
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- ;
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
- .delay(function(d,i) {
-
- return i * delay / data[0].values.length;
- })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- else
- bars.transition()
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.stackOffset = function(_) {
- if (!arguments.length) return stackOffset;
- stackOffset = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.groupSpacing = function(_) {
- if (!arguments.length) return groupSpacing;
- groupSpacing = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarChart.js
deleted file mode 100644
index 0323063f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarChart.js
+++ /dev/null
@@ -1,524 +0,0 @@
-
-nv.models.multiBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('.tick text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .style('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge',
- 'id', 'stacked', 'stackOffset', 'delay', 'barColor','groupSpacing');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontal.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontal.js
deleted file mode 100644
index d16d4605..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontal.js
+++ /dev/null
@@ -1,424 +0,0 @@
-
-nv.models.multiBarHorizontal = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range(yRange || [(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range(yRange || [0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit().transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups.transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- bars.transition()
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- bars.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- bars.transition()
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontalChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontalChart.js
deleted file mode 100644
index 02aa6fa4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarHorizontalChart.js
+++ /dev/null
@@ -1,434 +0,0 @@
-
-nv.models.multiBarHorizontalChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeries.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeries.js
deleted file mode 100644
index abc062c3..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeries.js
+++ /dev/null
@@ -1,384 +0,0 @@
-nv.models.multiBarTimeSeries = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.time.scale()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.x })))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- //.style('stroke-opacity', 1e-6)
- //.style('fill-opacity', 1e-6)
- .selectAll('rect.nv-bar')
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
- var maxElements = 0;
- for(var ei=0; ei<seriesData.length; ei+=1) {
- maxElements = Math.max(seriesData[ei].length, maxElements);
- }
-
- var bandWidth = (availableWidth / maxElements)-0.1;
- var barWidth = bandWidth / data.length;
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', stacked ? bandWidth : barWidth );
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- if (stacked)
- d3.transition(bars)
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
- return y(getY(d,i) + (stacked ? d.y0 : 0));
- })
- .attr('height', function(d,i) {
- return Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0)))
- })
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('x', function(d,i) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('width', stacked ? bandWidth : barWidth );
- })
- else
- d3.transition(bars)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * barWidth
- })
- .attr('width', barWidth)
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(getY(d,i))
- })
- .attr('height', function(d,i) {
- return Math.abs(y(getY(d,i)) - y(0))
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeriesChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeriesChart.js
deleted file mode 100644
index 5aebafa7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiBarTimeSeriesChart.js
+++ /dev/null
@@ -1,405 +0,0 @@
-nv.models.multiBarTimeSeriesChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarTimeSeries()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , reduceXTicks = true // if false a tick will show for every data point
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- .showMaxMin(false)
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { selection.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth / 2);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(180).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks(availableWidth / 100)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'rotate('+rotateLabels+' 0,0)' })
- .attr('text-transform', rotateLabels > 0 ? 'start' : 'end');
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- selection.transition().call(chart);
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- selection.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiChart.js
deleted file mode 100644
index e3e2c5e8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/multiChart.js
+++ /dev/null
@@ -1,452 +0,0 @@
-nv.models.multiChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x,
- y,
- yDomain1,
- yDomain2
- ; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(yDomain1 || d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(yDomain2 || d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.yDomain1 = function(_) {
- if (!arguments.length) return yDomain1;
- yDomain1 = _;
- return chart;
- };
-
- chart.yDomain2 = function(_) {
- if (!arguments.length) return yDomain2;
- yDomain2 = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/ohlcBar.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/ohlcBar.js
deleted file mode 100644
index 46f2b60c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/ohlcBar.js
+++ /dev/null
@@ -1,380 +0,0 @@
-
-nv.models.ohlcBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/parallelCoordinates.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/parallelCoordinates.js
deleted file mode 100644
index 107154f7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/parallelCoordinates.js
+++ /dev/null
@@ -1,239 +0,0 @@
-
-//Code adapted from Jason Davies' "Parallel Coordinates"
-// http://bl.ocks.org/jasondavies/1341281
-
-nv.models.parallelCoordinates = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = {}
- , dimensions = []
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , axisLabel = function(d) { return d; }
- , filters = []
- , active = []
- , dispatch = d3.dispatch('brush')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- active = data; //set all active before first brush call
-
- chart.update = function() { }; //This is a placeholder until this chart is made resizeable
-
- //------------------------------------------------------------
- // Setup Scales
-
- x
- .rangePoints([0, availableWidth], 1)
- .domain(dimensions);
-
- // Extract the list of dimensions and create a scale for each.
- dimensions.forEach(function(d) {
- y[d] = d3.scale.linear()
- .domain(d3.extent(data, function(p) { return +p[d]; }))
- .range([availableHeight, 0]);
-
- y[d].brush = d3.svg.brush().y(y[d]).on('brush', brush);
-
- return d != 'name';
- })
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-parallelCoordinates').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-parallelCoordinates');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-parallelCoordinatesWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var line = d3.svg.line(),
- axis = d3.svg.axis().orient('left'),
- background,
- foreground;
-
-
- // Add grey background lines for context.
- background = gEnter.append('g')
- .attr('class', 'background')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add blue foreground lines for focus.
- foreground = gEnter.append('g')
- .attr('class', 'foreground')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add a group element for each dimension.
- var dimension = g.selectAll('.dimension')
- .data(dimensions)
- .enter().append('g')
- .attr('class', 'dimension')
- .attr('transform', function(d) { return 'translate(' + x(d) + ',0)'; });
-
- // Add an axis and title.
- dimension.append('g')
- .attr('class', 'axis')
- .each(function(d) { d3.select(this).call(axis.scale(y[d])); })
- .append('text')
- .attr('text-anchor', 'middle')
- .attr('y', -9)
- .text(String);
-
- // Add and store a brush for each axis.
- dimension.append('g')
- .attr('class', 'brush')
- .each(function(d) { d3.select(this).call(y[d].brush); })
- .selectAll('rect')
- .attr('x', -8)
- .attr('width', 16);
-
-
- // Returns the path for a given data point.
- function path(d) {
- return line(dimensions.map(function(p) { return [x(p), y[p](d[p])]; }));
- }
-
- // Handles a brush event, toggling the display of foreground lines.
- function brush() {
- var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
- extents = actives.map(function(p) { return y[p].brush.extent(); });
-
- filters = []; //erase current filters
- actives.forEach(function(d,i) {
- filters[i] = {
- dimension: d,
- extent: extents[i]
- }
- });
-
- active = []; //erase current active list
- foreground.style('display', function(d) {
- var isActive = actives.every(function(p, i) {
- return extents[i][0] <= d[p] && d[p] <= extents[i][1];
- });
- if (isActive) active.push(d);
- return isActive ? null : 'none';
- });
-
- dispatch.brush({
- filters: filters,
- active: active
- });
-
- }
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.dimensions = function(_) {
- if (!arguments.length) return dimensions;
- dimensions = _;
- return chart;
- };
-
- chart.filters = function() {
- return filters;
- };
-
- chart.active = function() {
- return active;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pie.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pie.js
deleted file mode 100644
index 2099c8f3..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pie.js
+++ /dev/null
@@ -1,400 +0,0 @@
-nv.models.pie = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelType = "key"
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data(data);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc);
- //.attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return Math.round(percent*1001/10)+"%";
- /*var labelTypes = {
- "key" : getX(d.data),
- "value": getY(d.data),
- "percent": d3.format('%')(percent)
- };
- return (d.value && percent > labelThreshold) ? labelTypes[labelType] : '';
- */
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- nv.log("pie.values() is no longer supported.");
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.labelType = function(_) {
- if (!arguments.length) return labelType;
- labelType = _;
- labelType = labelType || "key";
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pieChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pieChart.js
deleted file mode 100644
index b4303fd6..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/pieChart.js
+++ /dev/null
@@ -1,292 +0,0 @@
-nv.models.pieChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = false
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum([data]);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- /*legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });*/
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'labelType', 'donut', 'donutRatio', 'labelThreshold');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatter.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatter.js
deleted file mode 100644
index 16cbee65..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatter.js
+++ /dev/null
@@ -1,674 +0,0 @@
-
-nv.models.scatter = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , xRange = null // Override x range
- , yRange = null // Override y range
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range(xRange || [(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] - y.domain()[0] * 0.01, y.domain()[1] + y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex);
- var pY = getY(point,pointIndex);
-
- return [x(pX)+ Math.random() * 1e-7,
- y(pY)+ Math.random() * 1e-7,
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- var mouseEventCallback = function(d,mDispatch) {
- if (needsUpdate) return 0;
- var series = data[d.series];
- if (typeof series === 'undefined') return;
-
- var point = series.values[d.point];
-
- mDispatch({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- };
-
- pointPaths
- .on('click', function(d) {
- mouseEventCallback(d, dispatch.elementClick);
- })
- .on('mouseover', function(d) {
- mouseEventCallback(d, dispatch.elementMouseover);
- })
- .on('mouseout', function(d, i) {
- mouseEventCallback(d, dispatch.elementMouseout);
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- groups.exit().selectAll('path.nv-point')
- .transition()
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
- chart.clearHighlights = function() {
- //Remove the 'hover' class from all highlighted points.
- d3.selectAll(".nv-chart-" + id + " .nv-point.hover").classed("hover",false);
- };
-
- chart.highlightPoint = function(seriesIndex,pointIndex,isHoverOver) {
- d3.select(".nv-chart-" + id + " .nv-series-" + seriesIndex + " .nv-point-" + pointIndex)
- .classed("hover",isHoverOver);
- };
-
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterChart.js
deleted file mode 100644
index 65b6e387..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterChart.js
+++ /dev/null
@@ -1,628 +0,0 @@
-nv.models.scatterChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth / 2 : availableWidth;
- legend.width(legendWidth);
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth - legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
- if (xPadding !== 0)
- scatter.xDomain(null);
-
- if (yPadding !== 0)
- scatter.yDomain(null);
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //Adjust for x and y padding
- if (xPadding !== 0) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding !== 0) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- //Only need to update the scatter again if x/yPadding changed the domain.
- if (yPadding !== 0 || xPadding !== 0) {
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform',
- 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterPlusLineChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterPlusLineChart.js
deleted file mode 100644
index 23c87853..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/scatterPlusLineChart.js
+++ /dev/null
@@ -1,620 +0,0 @@
-
-nv.models.scatterPlusLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background').style("pointer-events","none");
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) {return d });
-
- regWrap.enter().append('g').attr('class', 'nv-regLines');
-
- var regLine = regWrap.selectAll('.nv-regLine').data(function(d){return [d]});
- var regLineEnter = regLine.enter()
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- regLine
- .transition()
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) {return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight)
- ;
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparkline.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparkline.js
deleted file mode 100644
index e4c2e87b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparkline.js
+++ /dev/null
@@ -1,194 +0,0 @@
-
-nv.models.sparkline = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- , xRange
- , yRange
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range(yRange || [availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparklinePlus.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparklinePlus.js
deleted file mode 100644
index 1535f8af..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/sparklinePlus.js
+++ /dev/null
@@ -1,295 +0,0 @@
-
-nv.models.sparklinePlus = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedArea.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedArea.js
deleted file mode 100644
index eefeb8fb..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedArea.js
+++ /dev/null
@@ -1,368 +0,0 @@
-
-nv.models.stackedArea = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
- var dataRaw = data;
- // Injecting point index into each point because d3.layout.stack().out does not give index
- data.forEach(function(aseries, i) {
- aseries.seriesIndex = i;
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.seriesIndex = i;
- return d;
- });
- });
-
- var dataFiltered = data.filter(function(series) {
- return !series.disabled;
- });
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(getY)
- .out(function(d, y0, y) {
- var yHeight = (getY(d) === 0) ? 0 : y;
- d.display = {
- y: yHeight,
- y0: y0
- };
- })
- (dataFiltered);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, d.seriesIndex);
- }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data);
-
- scatterWrap.call(scatter);
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) {
- return y(d.display.y0)
- })
- .y1(function(d) {
- return y(d.display.y + d.display.y0)
- })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
-
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .attr('d', function(d,i){
- return zeroArea(d.values, d.seriesIndex);
- })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- path.exit().transition()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){
- return d.color || color(d, d.seriesIndex)
- })
- .style('stroke', function(d,i){ return d.color || color(d, d.seriesIndex) });
- path.transition()
- .attr('d', function(d,i) {
- return area(d.values,i)
- });
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
- //Special offset functions
- chart.d3_stackedOffset_stackPercent = function(stackData) {
- var n = stackData.length, //How many series
- m = stackData[0].length, //how many points per series
- k = 1 / n,
- i,
- j,
- o,
- y0 = [];
-
- for (j = 0; j < m; ++j) { //Looping through all points
- for (i = 0, o = 0; i < dataRaw.length; i++) //looping through series'
- o += getY(dataRaw[i].values[j]) //total value of all points at a certian point in time.
-
- if (o) for (i = 0; i < n; i++)
- stackData[i][j][1] /= o;
- else
- for (i = 0; i < n; i++)
- stackData[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- };
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi','clipRadius','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- case 'stack_percent':
- chart.offset(chart.d3_stackedOffset_stackPercent);
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedAreaChart.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedAreaChart.js
deleted file mode 100644
index a036b8b0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/models/stackedAreaChart.js
+++ /dev/null
@@ -1,629 +0,0 @@
-
-nv.models.stackedAreaChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- , cData = ['Stacked','Stream','Expanded']
- , controlLabels = {}
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth - controlWidth : availableWidth;
- legend
- .width(legendWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth-legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- {
- key: controlLabels.stacked || 'Stacked',
- metaKey: 'Stacked',
- disabled: stacked.style() != 'stack',
- style: 'stack'
- },
- {
- key: controlLabels.stream || 'Stream',
- metaKey: 'Stream',
- disabled: stacked.style() != 'stream',
- style: 'stream'
- },
- {
- key: controlLabels.expanded || 'Expanded',
- metaKey: 'Expanded',
- disabled: stacked.style() != 'expand',
- style: 'expand'
- },
- {
- key: controlLabels.stack_percent || 'Stack %',
- metaKey: 'Stack_Percent',
- disabled: stacked.style() != 'stack_percent',
- style: 'stack_percent'
- }
- ];
-
- controlWidth = (cData.length/3) * 260;
-
- controlsData = controlsData.filter(function(d) {
- return cData.indexOf(d.metaKey) !== -1;
- })
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left: margin.left, top: margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
-
- stackedWrap.transition().call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
-
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat( (stacked.style() == 'expand' || stacked.style() == 'stack_percent')
- ? d3.format('%') : yAxisTickFormat);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data.forEach(function(d) {
- d.disabled = false;
- });
- else
- data.forEach(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- stacked.style(d.style);
-
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- stacked.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- stacked.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
-
- //If we are in 'expand' mode, use the stacked percent value instead of raw value.
- var tooltipValue = (stacked.style() == 'expand') ? point.display.y : chart.y()(point,pointIndex);
- allData.push({
- key: series.key,
- value: tooltipValue,
- color: color(series,series.seriesIndex),
- stackedValue: point.display
- });
- });
-
- allData.reverse();
-
- //Highlight the tooltip entry based on which stack the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var yDistMax = Infinity, indexToHighlight = null;
- allData.forEach(function(series,i) {
- if ( yValue >= series.stackedValue.y0 && yValue <= (series.stackedValue.y0 + series.stackedValue.y))
- {
- indexToHighlight = i;
- return;
- }
- });
- if (indexToHighlight != null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
-
- //If we are in 'expand' mode, force the format to be a percentage.
- var valueFormatter = (stacked.style() == 'expand') ?
- function(d,i) {return d3.format(".1%")(d);} :
- function(d,i) {return yAxis.tickFormat()(d); };
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(valueFormatter)
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- stacked.clearHighlights();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'interactive', 'useVoronoi', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- chart.controlsData = function(_) {
- if (!arguments.length) return cData;
- cData = _;
- return chart;
- };
-
- chart.controlLabels = function(_) {
- if (!arguments.length) return controlLabels;
- if (typeof _ !== 'object') return controlLabels;
- controlLabels = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
-
- //============================================================
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.js
deleted file mode 100644
index 78586667..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.js
+++ /dev/null
@@ -1,13097 +0,0 @@
-(function(){
-
-var nv = window.nv || {};
-
-nv.version = '0.0.1a';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && console.log && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
-
-/*****
- * A no-frills tooltip implementation.
- *****/
-
-
-(function() {
-
- var nvtooltip = window.nv.tooltip = {};
-
- nvtooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.innerHTML = content;
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
-
- body.appendChild(container);
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.scrollY,
- scrollLeft = window.scrollX,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- var tooltipTop = function ( Elem ) {
- var offsetTop = top;
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- }
-
- var tooltipLeft = function ( Elem ) {
- var offsetLeft = left;
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- }
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop - height - 5;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute'; //fix scroll bar issue
- container.style.pointerEvents = 'none'; //fix scroll bar issue
-
- return container;
- };
-
- nvtooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-
-})();
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-nv.models.axis = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale=false
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- d3.transition(g)
- .call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .attr('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .attr('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .attr('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .attr('text-anchor', 'start')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .attr('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- var v = fmt(d);
- return ('' + v).match('NaN') ? '' : v;
- });
- d3.transition(axisMaxMin)
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = !i ? "Maximum" : i == 1 ? "Mean" : "Minimum";
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = !i ? "Maximum" : i == 1 ? "Mean" : "Minimum";
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
-
-nv.models.cumulativeLineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , tooltips = true
- , showControls = true
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient('left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
-
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-avgLinesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', function(d) { return y(average(d)); })
- .attr('y2', function(d) { return y(average(d)); });
-
- avgLines
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', function(d) { return y(average(d)); })
- .attr('y2', function(d) { return y(average(d)); });
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- container.call(chart);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- //
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _
- return rescaleY;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range([availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range([availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- bars.select('text')
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
- .text(function(d,i) { return valueFormat(getY(d,i)) });
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .attr('width', x.rangeBand() * .9 / data.length);
- d3.transition(bars)
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- }
- //============================================================
-
-
- return chart;
-}
-
-nv.models.discreteBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { dispatch.beforeUpdate(); container.transition().call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition().duration(0)
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.distribution = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- d3.transition(distWrap.exit().selectAll('line.nv-dist' + axis))
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- d3.transition(dist)
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- .attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; }) //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- d3.transition(bars)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i))
- })
- .attr('height', function(d,i) { return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.historicalBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.indentedTree = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.append('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- if (column.click)
- nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-};nv.models.legend = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var svgComputedTextLength = legendText.node().getComputedTextLength()
- || nv.utils.calcApproxTextWidth(legendText);
- seriesWidths.push(svgComputedTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- //nv.log('Series Widths: ', JSON.stringify(seriesWidths));
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
- //console.log(columnWidths, legendWidth, seriesPerRow);
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.line = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- d3.transition(scatterWrap).call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y0(function(d,i) { return y0(getY(d,i)) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- d3.transition(groups.exit().selectAll('path.nv-area'))
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d,i) { return y(getY(d,i)) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- d3.transition(areaPaths)
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d,i) { return y(getY(d,i)) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path.nv-line'))
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
- d3.transition(linePaths)
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'padData');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.lineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-//set margin.right to 23 to fit dates on the x-axis within the chart
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- // container.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
-/*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- selection.transition().call(chart)
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- selection.transition().call(chart)
- });
-*/
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.linePlusBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.lineWithFocusChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- container.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- d3.transition(focusLinesWrap).call(lines);
-
-
- // Update Main (Focus) Axes
- d3.transition(g.select('.nv-focus .nv-x.nv-axis'))
- .call(xAxis);
- d3.transition(g.select('.nv-focus .nv-y.nv-axis'))
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.linePlusBarWithFocusChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- d3.transition(bars2Wrap).call(bars2);
- d3.transition(lines2Wrap).call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- d3.transition(g.select('.nv-context .nv-y1.nv-axis'))
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-context .nv-y2.nv-axis'))
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- d3.transition(focusBarsWrap).call(bars);
- d3.transition(focusLinesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-focus .nv-y1.nv-axis'))
- .call(y1Axis);
- d3.transition(g.select('.nv-focus .nv-y2.nv-axis'))
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , drawTime = 500
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableWidth], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
-
-
- groups.exit()
- .selectAll('rect.nv-bar')
- .transition()
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- //.style('fill', barColor)
- //.style('stroke', barColor)
- //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
-
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- if(d.y == null) return 0;
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .each('end', function() {
- d3.select(this).transition().duration(drawTime)
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- })
- else
- d3.transition(bars).duration(drawTime)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .each('end', function() {
- d3.select(this).transition().duration(drawTime)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- if(d.y == null) return 0;
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.drawTime = function(_) {
- if (!arguments.length) return drawTime;
- drawTime = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , logScale = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph, logScale) {
- //alert(y+ " " + logScale);
- if(logScale) {
- var fmt = d3.format(',.2f');
- return '<h3>' + key + '</h3>' +
- '<p>' + fmt(Math.pow(10,y)) + ' on ' + x + '</p>'
- } else {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
-
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- ;
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart, logScale);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .attr('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay', 'barColor');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarHorizontal = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands([0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range([(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range([0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- //bars.selectAll('text').remove();
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- //.style('fill', barColor)
- //.style('stroke', barColor)
- //.style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- //.style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker(j).toString(); })
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('transform', function(d,i) {
- //return 'translate(' + y(d.y0) + ',0)'
- //return 'translate(' + y(d.y0) + ',' + x(getX(d,i)) + ')'
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- d3.transition(bars)
- //.delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.multiBarHorizontalChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , logScale = false
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph, logScale) {
- //alert(y+ " " + logScale + " " + Math.pow(10,y) + " " + Math.pow(10,y).toFixed(0));
- if(logScale) {
- //var fmt = d3.format(',.2f');
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + yAxis.tickFormat()(Math.pow(10,y)) + '</p>'
- } else {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
-
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- //var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- //alert(offsetElement.offsetLeft + " " + e.pos[0]);
- var leftPos = 0;
- if(e.pos[0] >=200) leftPos = 200;
- else leftPos = e.pos[0];
- if(logScale)
- y = multibar.y()(e.point, e.pointIndex);
- else
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex))
- var left = leftPos + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart, logScale);
- //alert("from tooltip " + multibar.y()(e.point, e.pointIndex));
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.multiChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x, y; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- if (series2.length <= 0) {
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.series').classed('disabled', false);
- return d;
- });
- }
- chart.update();
- }
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
-
-nv.models.ohlcBar = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range([availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-nv.models.pie = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getValues = function(d) { return d.values }
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data([getValues(data[0])]);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc)
- .attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return (d.value && percent > labelThreshold) ? getX(d.data) : '';
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- if (!arguments.length) return getValues;
- getValues = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
-nv.models.pieChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = true
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data[0].map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data[0] || !data[0].length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(pie.values()(data[0]))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum(data);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!pie.values()(data[0]).filter(function(d) { return !d.disabled }).length) {
- pie.values()(data[0]).map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data[0].map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data[0].forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'donut', 'donutRatio', 'labelThreshold');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatter = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data = data.map(function(series, i) {
- series.values = series.values.map(function(point) {
- point.series = i;
- return point;
- });
- return series;
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range([(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range([availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex) + Math.random() * 1e-7;
- var pY = getY(point,pointIndex) + Math.random() * 1e-7;
-
- return [x(pX),
- y(pY),
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- pointPaths
- .on('click', function(d) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- })
- .on('mouseover', function(d) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- })
- .on('mouseout', function(d, i) {
- if (needsUpdate) return 0;
- var series = data[d.series],
- point = series.values[d.point];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: d.point
- });
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- d3.transition(groups)
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .attr('cx', function(d,i) { return x0(getX(d,i)) })
- .attr('cy', function(d,i) { return y0(getY(d,i)) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return x(getX(d,i)) })
- .attr('cy', function(d,i) { return y(getY(d,i)) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true);
- });
- points.transition()
- .attr('cx', function(d,i) { return x(getX(d,i)) })
- .attr('cy', function(d,i) { return y(getY(d,i)) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- d3.transition(groups.exit().selectAll('path.nv-point'))
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true);
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive)
- d3.select('.nv-chart-' + id + ' .nv-series-' + d.seriesIndex + ' .nv-point-' + d.pointIndex)
- .classed('hover', true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive)
- d3.select('.nv-chart-' + id + ' .nv-series-' + d.seriesIndex + ' .nv-point-' + d.pointIndex)
- .classed('hover', false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatterChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- //, tooltip = function(key, x, y) { return '<h3>' + key + '</h3>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient('left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
- .xDomain(null)
- .yDomain(null)
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
-
- //Adjust for x and y padding
- if (xPadding) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(-' + distY.size() + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- /*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- chart(selection);
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- chart(selection);
- });
- */
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.scatterPlusLineChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- //, tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient('left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background')
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) { return d });
-
- var reglines = regWrap.enter()
- .append('g').attr('class', 'nv-regLines')
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- //d3.transition(regWrap.selectAll('.nv-regLines line'))
- regWrap.selectAll('.nv-regLines line')
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) { return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
-
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(-' + distY.size() + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i, that) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- /*
- legend.dispatch.on('legendMouseover', function(d, i) {
- d.hover = true;
- chart(selection);
- });
-
- legend.dispatch.on('legendMouseout', function(d, i) {
- d.hover = false;
- chart(selection);
- });
- */
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.sparkline = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range([0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range([availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.sparklinePlus = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.stackedArea = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTooltipFormat = d3.format(',.3f')
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
-
- // Injecting point index into each point because d3.layout.stack().out does not give index
- // ***Also storing getY(d,i) as stackedY so that it can be set to 0 if series is disabled
- data = data.map(function(aseries, i) {
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.stackedY = aseries.disabled ? 0 : getY(d,j);
- return d;
- })
- return aseries;
- });
-
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(function(d) { return d.stackedY })
- .out(function(d, y0, y) {
- d.display = {
- y: y,
- y0: y0
- };
- })
- (data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- //d3.transition(scatterWrap).call(scatter);
- scatterWrap.call(scatter);
-
-
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y + d.display.y0) })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
- //.data(function(d) { return d }, function(d) { return d.key });
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- //d3.transition(path.exit())
- path.exit()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){ return d.color || color(d, i) })
- .style('stroke', function(d,i){ return d.color || color(d, i) });
- //d3.transition(path)
- path
- .attr('d', function(d,i) { return area(d.values,i) })
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return interpolate;
-
- };
-
- //============================================================
-
-
- return chart;
-}
-
-nv.models.stackedAreaChart = function() {
-
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , yAxisTooltipFormat = d3.format(',.3f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient('left')
- ;
- stacked.scatter
- .pointActive(function(d) {
- //console.log(stacked.y()(d), !!Math.round(stacked.y()(d) * 100));
- return !!Math.round(stacked.y()(d) * 100);
- })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- //y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- y = yAxisTooltipFormat(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth - controlWidth );
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Stacked', disabled: stacked.offset() != 'zero' },
- { key: 'Stream', disabled: stacked.offset() != 'wiggle' },
- { key: 'Expanded', disabled: stacked.offset() != 'expand' }
- ];
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
- //d3.transition(stackedWrap).call(stacked);
- stackedWrap.call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
-
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat(stacked.offset() == 'expand' ? d3.format('%') : yAxisTickFormat);
-
- //d3.transition(g.select('.nv-y.nv-axis'))
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data = data.map(function(d) {
- d.disabled = false;
- return d
- });
- else
- data = data.map(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- return d
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Stacked':
- stacked.style('stack');
- break;
- case 'Stream':
- stacked.style('stream');
- break;
- case 'Expanded':
- stacked.style('expand');
- break;
- }
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- //selection.transition().call(chart);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'sizeDomain', 'interactive', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return getWidth;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return getHeight;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.yAxisTooltipFormat = function(_) {
- if (!arguments.length) return yAxisTooltipFormat;
- yAxisTooltipFormat = _;
- return chart;
- };
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
- //============================================================
-
- return chart;
-}
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.min.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.min.js
deleted file mode 100644
index 892379c4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/nv.d3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){function t(e,t){return(new Date(t,e+1,0)).getDate()}function n(e,t,n){return function(r,i,s){var o=e(r),u=[];if(o<r)t(o);if(s>1){while(o<i){var a=new Date(+o);if(n(a)%s===0)u.push(a);t(o)}}else{while(o<i){u.push(new Date(+o));t(o)}}return u}}var e=window.nv||{};e.version="1.1.13b";e.dev=true;window.nv=e;e.tooltip={};e.utils=e.utils||{};e.models={};e.charts={};e.graphs=[];e.logs={};e.dispatch=d3.dispatch("render_start","render_end");if(e.dev){e.dispatch.on("render_start",function(t){e.logs.startTime=+(new Date)});e.dispatch.on("render_end",function(t){e.logs.endTime=+(new Date);e.logs.totalTime=e.logs.endTime-e.logs.startTime;e.log("total",e.logs.totalTime)})}e.log=function(){if(e.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(e.dev&&typeof console.log=="function"&&Function.prototype.bind){var t=Function.prototype.bind.call(console.log,console);t.apply(console,arguments)}return arguments[arguments.length-1]};e.render=function(n){n=n||1;e.render.active=true;e.dispatch.render_start();setTimeout(function(){var t,r;for(var i=0;i<n&&(r=e.render.queue[i]);i++){t=r.generate();if(typeof r.callback==typeof Function)r.callback(t);e.graphs.push(t)}e.render.queue.splice(0,i);if(e.render.queue.length)setTimeout(arguments.callee,0);else{e.render.active=false;e.dispatch.render_end()}},0)};e.render.active=false;e.render.queue=[];e.addGraph=function(t){if(typeof arguments[0]===typeof Function)t={generate:arguments[0],callback:arguments[1]};e.render.queue.push(t);if(!e.render.active)e.render()};e.identity=function(e){return e};e.strip=function(e){return e.replace(/(\s|&)/g,"")};d3.time.monthEnd=function(e){return new Date(e.getFullYear(),e.getMonth(),0)};d3.time.monthEnds=n(d3.time.monthEnd,function(e){e.setUTCDate(e.getUTCDate()+1);e.setDate(t(e.getMonth()+1,e.getFullYear()))},function(e){return e.getMonth()});e.interactiveGuideline=function(){"use strict";function c(o){o.each(function(o){function g(){var e=d3.mouse(this);var n=e[0];var r=e[1];var o=true;var a=false;if(l){n=d3.event.offsetX;r=d3.event.offsetY;if(d3.event.target.tagName!=="svg")o=false;if(d3.event.target.className.baseVal.match("nv-legend"))a=true}if(o){n-=i.left;r-=i.top}if(n<0||r<0||n>p||r>d||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||a){if(l){if(d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(t.nvPointerEventsClass)){return}}u.elementMouseout({mouseX:n,mouseY:r});c.renderGuideLine(null);return}var f=s.invert(n);u.elementMousemove({mouseX:n,mouseY:r,pointXValue:f});if(d3.event.type==="dblclick"){u.elementDblclick({mouseX:n,mouseY:r,pointXValue:f})}}var h=d3.select(this);var p=n||960,d=r||400;var v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([o]);var m=v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");m.append("g").attr("class","nv-interactiveGuideLine");if(!f){return}f.on("mousemove",g,true).on("mouseout",g,true).on("dblclick",g);c.renderGuideLine=function(t){if(!a)return;var n=v.select(".nv-interactiveGuideLine").selectAll("line").data(t!=null?[e.utils.NaNtoZero(t)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",function(e){return e}).attr("x2",function(e){return e}).attr("y1",d).attr("y2",0);n.exit().remove()}})}var t=e.models.tooltip();var n=null,r=null,i={left:0,top:0},s=d3.scale.linear(),o=d3.scale.linear(),u=d3.dispatch("elementMousemove","elementMouseout","elementDblclick"),a=true,f=null;var l=navigator.userAgent.indexOf("MSIE")!==-1;c.dispatch=u;c.tooltip=t;c.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.left=typeof e.left!="undefined"?e.left:i.left;return c};c.width=function(e){if(!arguments.length)return n;n=e;return c};c.height=function(e){if(!arguments.length)return r;r=e;return c};c.xScale=function(e){if(!arguments.length)return s;s=e;return c};c.showGuideLine=function(e){if(!arguments.length)return a;a=e;return c};c.svgContainer=function(e){if(!arguments.length)return f;f=e;return c};return c};e.interactiveBisect=function(e,t,n){"use strict";if(!e instanceof Array)return null;if(typeof n!=="function")n=function(e,t){return e.x};var r=d3.bisector(n).left;var i=d3.max([0,r(e,t)-1]);var s=n(e[i],i);if(typeof s==="undefined")s=i;if(s===t)return i;var o=d3.min([i+1,e.length-1]);var u=n(e[o],o);if(typeof u==="undefined")u=o;if(Math.abs(u-t)>=Math.abs(s-t))return i;else return o};e.nearestValueIndex=function(e,t,n){"use strict";var r=Infinity,i=null;e.forEach(function(e,s){var o=Math.abs(t-e);if(o<=r&&o<n){r=o;i=s}});return i};(function(){"use strict";window.nv.tooltip={};window.nv.models.tooltip=function(){function y(){if(a){var e=d3.select(a);if(e.node().tagName!=="svg"){e=e.select("svg")}var t=e.node()?e.attr("viewBox"):null;if(t){t=t.split(" ");var n=parseInt(e.style("width"))/t[2];l.left=l.left*n;l.top=l.top*n}}}function b(e){var t;if(a)t=d3.select(a);else t=d3.select("body");var n=t.select(".nvtooltip");if(n.node()===null){n=t.append("div").attr("class","nvtooltip "+(u?u:"xy-tooltip")).attr("id",h)}n.node().innerHTML=e;n.style("top",0).style("left",0).style("opacity",0);n.selectAll("div, table, td, tr").classed(p,true);n.classed(p,true);return n.node()}function w(){if(!c)return;if(!g(n))return;y();var t=l.left;var u=o!=null?o:l.top;var h=b(m(n));f=h;if(a){var p=a.getElementsByTagName("svg")[0];var d=p?p.getBoundingClientRect():a.getBoundingClientRect();var v={left:0,top:0};if(p){var E=p.getBoundingClientRect();var S=a.getBoundingClientRect();var x=E.top;if(x<0){var T=a.getBoundingClientRect();x=Math.abs(x)>T.height?0:x}v.top=Math.abs(x-S.top);v.left=Math.abs(E.left-S.left)}t+=a.offsetLeft+v.left-2*a.scrollLeft;u+=a.offsetTop+v.top-2*a.scrollTop}if(s&&s>0){u=Math.floor(u/s)*s}e.tooltip.calcTooltipPosition([t,u],r,i,h);return w}var t=null,n=null,r="w",i=50,s=25,o=null,u=null,a=null,f=null,l={left:null,top:null},c=true,h="nvtooltip-"+Math.floor(Math.random()*1e5);var p="nv-pointer-events-none";var d=function(e,t){return e};var v=function(e){return e};var m=function(e){if(t!=null)return t;if(e==null)return"";var n=d3.select(document.createElement("table"));var r=n.selectAll("thead").data([e]).enter().append("thead");r.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",true).html(v(e.value));var i=n.selectAll("tbody").data([e]).enter().append("tbody");var s=i.selectAll("tr").data(function(e){return e.series}).enter().append("tr").classed("highlight",function(e){return e.highlight});s.append("td").classed("legend-color-guide",true).append("div").style("background-color",function(e){return e.color});s.append("td").classed("key",true).html(function(e){return e.key});s.append("td").classed("value",true).html(function(e,t){return d(e.value,t)});s.selectAll("td").each(function(e){if(e.highlight){var t=d3.scale.linear().domain([0,1]).range(["#fff",e.color]);var n=.6;d3.select(this).style("border-bottom-color",t(n)).style("border-top-color",t(n))}});var o=n.node().outerHTML;if(e.footer!==undefined)o+="<div class='footer'>"+e.footer+"</div>";return o};var g=function(e){if(e&&e.series&&e.series.length>0)return true;return false};w.nvPointerEventsClass=p;w.content=function(e){if(!arguments.length)return t;t=e;return w};w.tooltipElem=function(){return f};w.contentGenerator=function(e){if(!arguments.length)return m;if(typeof e==="function"){m=e}return w};w.data=function(e){if(!arguments.length)return n;n=e;return w};w.gravity=function(e){if(!arguments.length)return r;r=e;return w};w.distance=function(e){if(!arguments.length)return i;i=e;return w};w.snapDistance=function(e){if(!arguments.length)return s;s=e;return w};w.classes=function(e){if(!arguments.length)return u;u=e;return w};w.chartContainer=function(e){if(!arguments.length)return a;a=e;return w};w.position=function(e){if(!arguments.length)return l;l.left=typeof e.left!=="undefined"?e.left:l.left;l.top=typeof e.top!=="undefined"?e.top:l.top;return w};w.fixedTop=function(e){if(!arguments.length)return o;o=e;return w};w.enabled=function(e){if(!arguments.length)return c;c=e;return w};w.valueFormatter=function(e){if(!arguments.length)return d;if(typeof e==="function"){d=e}return w};w.headerFormatter=function(e){if(!arguments.length)return v;if(typeof e==="function"){v=e}return w};w.id=function(){return h};return w};e.tooltip.show=function(t,n,r,i,s,o){var u=document.createElement("div");u.className="nvtooltip "+(o?o:"xy-tooltip");var a=s;if(!s||s.tagName.match(/g|svg/i)){a=document.getElementsByTagName("body")[0]}u.style.left=0;u.style.top=0;u.style.opacity=0;u.innerHTML=n;a.appendChild(u);if(s){t[0]=t[0]-s.scrollLeft;t[1]=t[1]-s.scrollTop}e.tooltip.calcTooltipPosition(t,r,i,u)};e.tooltip.findFirstNonSVGParent=function(e){while(e.tagName.match(/^g|svg$/i)!==null){e=e.parentNode}return e};e.tooltip.findTotalOffsetTop=function(e,t){var n=t;do{if(!isNaN(e.offsetTop)){n+=e.offsetTop}}while(e=e.offsetParent);return n};e.tooltip.findTotalOffsetLeft=function(e,t){var n=t;do{if(!isNaN(e.offsetLeft)){n+=e.offsetLeft}}while(e=e.offsetParent);return n};e.tooltip.calcTooltipPosition=function(t,n,r,i){var s=parseInt(i.offsetHeight),o=parseInt(i.offsetWidth),u=e.utils.windowSize().width,a=e.utils.windowSize().height,f=window.pageYOffset,l=window.pageXOffset,c,h;a=window.innerWidth>=document.body.scrollWidth?a:a-16;u=window.innerHeight>=document.body.scrollHeight?u:u-16;n=n||"s";r=r||20;var p=function(t){return e.tooltip.findTotalOffsetTop(t,h)};var d=function(t){return e.tooltip.findTotalOffsetLeft(t,c)};switch(n){case"e":c=t[0]-o-r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v<l)c=t[0]+r>l?t[0]+r:l-v+c;if(m<f)h=f-m+h;if(m+s>f+a)h=f+a-m+h-s;break;case"w":c=t[0]+r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v+o>u)c=t[0]-o-r;if(m<f)h=f+5;if(m+s>f+a)h=f+a-m+h-s;break;case"n":c=t[0]-o/2-5;h=t[1]+r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(m+s>f+a)h=f+a-m+h-s;break;case"s":c=t[0]-o/2;h=t[1]-s-r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(f>m)h=f;break;case"none":c=t[0];h=t[1]-r;var v=d(i);var m=p(i);break}i.style.left=c+"px";i.style.top=h+"px";i.style.opacity=1;i.style.position="absolute";return i};e.tooltip.cleanup=function(){var e=document.getElementsByClassName("nvtooltip");var t=[];while(e.length){t.push(e[0]);e[0].style.transitionDelay="0 !important";e[0].style.opacity=0;e[0].className="nvtooltip-pending-removal"}setTimeout(function(){while(t.length){var e=t.pop();e.parentNode.removeChild(e)}},500)}})();e.utils.windowSize=function(){var e={width:640,height:480};if(document.body&&document.body.offsetWidth){e.width=document.body.offsetWidth;e.height=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){e.width=document.documentElement.offsetWidth;e.height=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){e.width=window.innerWidth;e.height=window.innerHeight}return e};e.utils.windowResize=function(e){if(e===undefined)return;var t=window.onresize;window.onresize=function(n){if(typeof t=="function")t(n);e(n)}};e.utils.getColor=function(t){if(!arguments.length)return e.utils.defaultColor();if(Object.prototype.toString.call(t)==="[object Array]")return function(e,n){return e.color||t[n%t.length]};else return t};e.utils.defaultColor=function(){var e=d3.scale.category20().range();return function(t,n){return t.color||e[n%e.length]}};e.utils.customTheme=function(e,t,n){t=t||function(e){return e.key};n=n||d3.scale.category20().range();var r=n.length;return function(i,s){var o=t(i);if(!r)r=n.length;if(typeof e[o]!=="undefined")return typeof e[o]==="function"?e[o]():e[o];else return n[--r]}};e.utils.pjax=function(t,n){function r(r){d3.html(r,function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i);e.utils.pjax(t,n)})}d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href);r(this.href);d3.event.preventDefault()});d3.select(window).on("popstate",function(){if(d3.event.state)r(d3.event.state)})};e.utils.calcApproxTextWidth=function(e){if(e instanceof d3.selection){var t=parseInt(e.style("font-size").replace("px",""));var n=e.text().length;return n*t*.5}return 0};e.utils.NaNtoZero=function(e){if(typeof e!=="number"||isNaN(e)||e===null||e===Infinity)return 0;return e};e.utils.optionsFunc=function(e){if(e){d3.map(e).forEach(function(e,t){if(typeof this[e]==="function"){this[e](t)}}.bind(this))}return this};e.models.axis=function(){"use strict";function g(e){e.each(function(e){var i=d3.select(this);var g=i.selectAll("g.nv-wrap.nv-axis").data([e]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(p!==null)t.ticks(p);else if(t.orient()=="top"||t.orient()=="bottom")t.ticks(Math.abs(s.range()[1]-s.range()[0])/100);w.transition().call(t);m=m||t.scale();var E=t.tickFormat();if(E==null){E=m.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([o||null]);S.exit().remove();switch(t.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+s(e)+",0)"}).select("text").attr("dy","0em").attr("y",-t.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+s.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(f%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(f*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data([s.domain()[0],s.domain()[s.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",t.tickPadding()).attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f?f%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"})}if(c)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(n.right,r)+12:-10).attr("x",l?s.range()[0]/2:t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+s(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",t.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(n.left,r)+v:-10).attr("x",l?-s.range()[0]/2:-t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+m(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-t.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(u&&(t.orient()==="left"||t.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<s.range()[1]+10||s(e)>s.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(s.domain()[0]==s.domain()[1]&&s.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(u&&(t.orient()==="top"||t.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(s(e)-this.getBBox().width-4);else A.push(s(e)+this.getBBox().width+4)}catch(n){if(t)A.push(s(e)-4);else A.push(s(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<A[0]||s(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(a)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);m=s.copy()});return g}var t=d3.svg.axis();var n={top:0,right:0,bottom:0,left:0},r=75,i=60,s=d3.scale.linear(),o=null,u=true,a=true,f=0,l=true,c=false,h=false,p=null,d=false,v=12;t.scale(s).orient("bottom").tickFormat(function(e){return e});var m;g.axis=t;d3.rebind(g,t,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(g,s,"domain","range","rangeBand","rangeBands");g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return g};g.width=function(e){if(!arguments.length)return r;r=e;return g};g.ticks=function(e){if(!arguments.length)return p;p=e;return g};g.height=function(e){if(!arguments.length)return i;i=e;return g};g.axisLabel=function(e){if(!arguments.length)return o;o=e;return g};g.showMaxMin=function(e){if(!arguments.length)return u;u=e;return g};g.logScale=function(e){if(!arguments.length)return d;d=e;return g};g.highlightZero=function(e){if(!arguments.length)return a;a=e;return g};g.scale=function(e){if(!arguments.length)return s;s=e;t.scale(s);h=typeof s.rangeBands==="function";d3.rebind(g,s,"domain","range","rangeBand","rangeBands");return g};g.rotateYLabel=function(e){if(!arguments.length)return l;l=e;return g};g.rotateLabels=function(e){if(!arguments.length)return f;f=e;return g};g.staggerLabels=function(e){if(!arguments.length)return c;c=e;return g};g.axisLabelDistance=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.bullet=function(){"use strict";function m(e){e.each(function(e,n){var p=c-t.left-t.right,m=h-t.top-t.bottom,g=d3.select(this);var y=i.call(this,e,n).slice().sort(d3.descending),b=s.call(this,e,n).slice().sort(d3.descending),w=o.call(this,e,n).slice().sort(d3.descending),E=u.call(this,e,n).slice(),S=a.call(this,e,n).slice(),x=f.call(this,e,n).slice();var T=d3.scale.linear().domain(d3.extent(d3.merge([l,y]))).range(r?[p,0]:[0,p]);var N=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(T.range());this.__chart__=T;var C=d3.min(y),k=d3.max(y),L=y[1];var A=g.selectAll("g.nv-wrap.nv-bullet").data([e]);var O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet");var M=O.append("g");var _=A.select("g");M.append("rect").attr("class","nv-range nv-rangeMax");M.append("rect").attr("class","nv-range nv-rangeAvg");M.append("rect").attr("class","nv-range nv-rangeMin");M.append("rect").attr("class","nv-measure");M.append("path").attr("class","nv-markerTriangle");A.attr("transform","translate("+t.left+","+t.top+")");var D=function(e){return Math.abs(N(e)-N(0))},P=function(e){return Math.abs(T(e)-T(0))};var H=function(e){return e<0?N(e):N(0)},B=function(e){return e<0?T(e):T(0)};_.select("rect.nv-rangeMax").attr("height",m).attr("width",P(k>0?k:C)).attr("x",B(k>0?k:C)).datum(k>0?k:C);_.select("rect.nv-rangeAvg").attr("height",m).attr("width",P(L)).attr("x",B(L)).datum(L);_.select("rect.nv-rangeMin").attr("height",m).attr("width",P(k)).attr("x",B(k)).attr("width",P(k>0?C:k)).attr("x",B(k>0?C:k)).datum(k>0?C:k);_.select("rect.nv-measure").style("fill",d).attr("height",m/3).attr("y",m/3).attr("width",w<0?T(0)-T(w[0]):T(w[0])-T(0)).attr("x",B(w)).on("mouseover",function(){v.elementMouseover({value:w[0],label:x[0]||"Current",pos:[T(w[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:w[0],label:x[0]||"Current"})});var j=m/6;if(b[0]){_.selectAll("path.nv-markerTriangle").attr("transform",function(e){return"translate("+T(b[0])+","+m/2+")"}).attr("d","M0,"+j+"L"+j+","+ -j+" "+ -j+","+ -j+"Z").on("mouseover",function(){v.elementMouseover({value:b[0],label:S[0]||"Previous",pos:[T(b[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:b[0],label:S[0]||"Previous"})})}else{_.selectAll("path.nv-markerTriangle").remove()}A.selectAll(".nv-range").on("mouseover",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseover({value:e,label:n,pos:[T(e),m/2]})}).on("mouseout",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseout({value:e,label:n})})});return m}var t={top:0,right:0,bottom:0,left:0},n="left",r=false,i=function(e){return e.ranges},s=function(e){return e.markers},o=function(e){return e.measures},u=function(e){return e.rangeLabels?e.rangeLabels:[]},a=function(e){return e.markerLabels?e.markerLabels:[]},f=function(e){return e.measureLabels?e.measureLabels:[]},l=[0],c=380,h=30,p=null,d=e.utils.getColor(["#1f77b4"]),v=d3.dispatch("elementMouseover","elementMouseout");m.dispatch=v;m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return i;i=e;return m};m.markers=function(e){if(!arguments.length)return s;s=e;return m};m.measures=function(e){if(!arguments.length)return o;o=e;return m};m.forceX=function(e){if(!arguments.length)return l;l=e;return m};m.width=function(e){if(!arguments.length)return c;c=e;return m};m.height=function(e){if(!arguments.length)return h;h=e;return m};m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.tickFormat=function(e){if(!arguments.length)return p;p=e;return m};m.color=function(t){if(!arguments.length)return d;d=e.utils.getColor(t);return m};return m};e.models.bulletChart=function(){"use strict";function m(e){e.each(function(n,h){var g=d3.select(this);var y=(a||parseInt(g.style("width"))||960)-i.left-i.right,b=f-i.top-i.bottom,w=this;m.update=function(){m(e)};m.container=this;if(!n||!s.call(this,n,h)){var E=g.selectAll(".nv-noData").data([p]);E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");E.attr("x",i.left+y/2).attr("y",18+i.top+b/2).text(function(e){return e});return m}else{g.selectAll(".nv-noData").remove()}var S=s.call(this,n,h).slice().sort(d3.descending),x=o.call(this,n,h).slice().sort(d3.descending),T=u.call(this,n,h).slice().sort(d3.descending);var N=g.selectAll("g.nv-wrap.nv-bulletChart").data([n]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-bulletWrap");k.append("g").attr("class","nv-titles");N.attr("transform","translate("+i.left+","+i.top+")");var A=d3.scale.linear().domain([0,Math.max(S[0],x[0],T[0])]).range(r?[y,0]:[0,y]);var O=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(A.range());this.__chart__=A;var M=function(e){return Math.abs(O(e)-O(0))},_=function(e){return Math.abs(A(e)-A(0))};var D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-i.top-i.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(e){return e.title});D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(e){return e.subtitle});t.width(y).height(b);var P=L.select(".nv-bulletWrap");d3.transition(P).call(t);var H=l||A.tickFormat(y/100);var B=L.selectAll("g.nv-tick").data(A.ticks(y/50),function(e){return this.textContent||H(e)});var j=B.enter().append("g").attr("class","nv-tick").attr("transform",function(e){return"translate("+O(e)+",0)"}).style("opacity",1e-6);j.append("line").attr("y1",b).attr("y2",b*7/6);j.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",b*7/6).text(H);var F=d3.transition(B).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1);F.select("line").attr("y1",b).attr("y2",b*7/6);F.select("text").attr("y",b*7/6);d3.transition(B.exit()).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1e-6).remove();d.on("tooltipShow",function(e){e.key=n.title;if(c)v(e,w.parentNode)})});d3.timer.flush();return m}var t=e.models.bullet();var n="left",r=false,i={top:5,right:40,bottom:20,left:120},s=function(e){return e.ranges},o=function(e){return e.markers},u=function(e){return e.measures},a=null,f=55,l=null,c=true,h=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},p="No Data Available.",d=d3.dispatch("tooltipShow","tooltipHide");var v=function(t,n){var r=t.pos[0]+(n.offsetLeft||0)+i.left,s=t.pos[1]+(n.offsetTop||0)+i.top,o=h(t.key,t.label,t.value,t,m);e.tooltip.show([r,s],o,t.value<0?"e":"w",null,n)};t.dispatch.on("elementMouseover.tooltip",function(e){d.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){d.tooltipHide(e)});d.on("tooltipHide",function(){if(c)e.tooltip.cleanup()});m.dispatch=d;m.bullet=t;d3.rebind(m,t,"color");m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return s;s=e;return m};m.markers=function(e){if(!arguments.length)return o;o=e;return m};m.measures=function(e){if(!arguments.length)return u;u=e;return m};m.width=function(e){if(!arguments.length)return a;a=e;return m};m.height=function(e){if(!arguments.length)return f;f=e;return m};m.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return m};m.tickFormat=function(e){if(!arguments.length)return l;l=e;return m};m.tooltips=function(e){if(!arguments.length)return c;c=e;return m};m.tooltipContent=function(e){if(!arguments.length)return h;h=e;return m};m.noData=function(e){if(!arguments.length)return p;p=e;return m};return m};e.models.cumulativeLineChart=function(){"use strict";function _(b){b.each(function(b){function q(e,t){d3.select(_.container).style("cursor","ew-resize")}function R(e,t){O.x=d3.event.x;O.i=Math.round(A.invert(O.x));rt()}function U(e,t){d3.select(_.container).style("cursor","auto");x.index=O.i;k.stateChange(x)}function rt(){nt.data([O]);var e=_.transitionDuration();_.transitionDuration(0);_.update();_.transitionDuration(e)}var P=d3.select(this).classed("nv-chart-"+S,true),H=this;var B=(f||parseInt(P.style("width"))||960)-u.left-u.right,j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom;_.update=function(){P.transition().duration(L).call(_)};_.container=this;x.disabled=b.map(function(e){return!!e.disabled});if(!T){var F;T={};for(F in x){if(x[F]instanceof Array)T[F]=x[F].slice(0);else T[F]=x[F]}}var I=d3.behavior.drag().on("dragstart",q).on("drag",R).on("dragend",U);if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var z=P.selectAll(".nv-noData").data([N]);z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");z.attr("x",u.left+B/2).attr("y",u.top+j/2).text(function(e){return e});return _}else{P.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();if(!y){var W=b.filter(function(e){return!e.disabled}).map(function(e,n){var r=d3.extent(e.values,t.y());if(r[0]<-.95)r[0]=-.95;return[(r[0]-r[1])/(1+r[1]),(r[1]-r[0])/(1+r[0])]});var X=[d3.min(W,function(e){return e[0]}),d3.max(W,function(e){return e[1]})];t.yDomain(X)}else{t.yDomain(null)}A.domain([0,b[0].values.length-1]).range([0,B]).clamp(true);var b=D(O.i,b);var V=g?"none":"all";var $=P.selectAll("g.nv-wrap.nv-cumulativeLine").data([b]);var J=$.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g");var K=$.select("g");J.append("g").attr("class","nv-interactive");J.append("g").attr("class","nv-x nv-axis").style("pointer-events","none");J.append("g").attr("class","nv-y nv-axis");J.append("g").attr("class","nv-background");J.append("g").attr("class","nv-linesWrap").style("pointer-events",V);J.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none");J.append("g").attr("class","nv-legendWrap");J.append("g").attr("class","nv-controlsWrap");if(c){i.width(B);K.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom}K.select(".nv-legendWrap").attr("transform","translate(0,"+ -u.top+")")}if(m){var Q=[{key:"Re-scale y-axis",disabled:!y}];s.width(140).color(["#444","#444","#444"]);K.select(".nv-controlsWrap").datum(Q).attr("transform","translate(0,"+ -u.top+")").call(s)}$.attr("transform","translate("+u.left+","+u.top+")");if(d){K.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)")}var G=b.filter(function(e){return e.tempDisabled});$.select(".tempDisabled").remove();if(G.length){$.append("text").attr("class","tempDisabled").attr("x",B/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(e){return e.key}).join(", ")+" values cannot be calculated for this time period.")}if(g){o.width(B).height(j).margin({left:u.left,top:u.top}).svgContainer(P).xScale(w);$.select(".nv-interactive").call(o)}J.select(".nv-background").append("rect");K.select(".nv-background rect").attr("width",B).attr("height",j);t.y(function(e){return e.display.y}).width(B).height(j).color(b.map(function(e,t){return e.color||a(e,t)}).filter(function(e,t){return!b[t].disabled&&!b[t].tempDisabled}));var Y=K.select(".nv-linesWrap").datum(b.filter(function(e){return!e.disabled&&!e.tempDisabled}));Y.call(t);b.forEach(function(e,t){e.seriesIndex=t});var Z=b.filter(function(e){return!e.disabled&&!!C(e)});var et=K.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(e){return e.key});var tt=function(e){var t=E(C(e));if(t<0)return 0;if(t>j)return j;return t};et.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(e,n){return t.color()(e,e.seriesIndex)}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.style("stroke-opacity",function(e){var t=E(C(e));if(t<0||t>j)return 0;return 1}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.exit().remove();var nt=Y.selectAll(".nv-indexLine").data([O]);nt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(I);nt.attr("transform",function(e){return"translate("+A(e.i)+",0)"}).attr("height",j);if(h){n.scale(w).ticks(Math.min(b[0].values.length,B/70)).tickSize(-j,0);K.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")");d3.transition(K.select(".nv-x.nv-axis")).call(n)}if(p){r.scale(E).ticks(j/36).tickSize(-B,0);d3.transition(K.select(".nv-y.nv-axis")).call(r)}K.select(".nv-background rect").on("click",function(){O.x=d3.mouse(this)[0];O.i=Math.round(A.invert(O.x));x.index=O.i;k.stateChange(x);rt()});t.dispatch.on("elementClick",function(e){O.i=e.pointIndex;O.x=A(O.i);x.index=O.i;k.stateChange(x);rt()});s.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled;y=!e.disabled;x.rescaleY=y;k.stateChange(x);_.update()});i.dispatch.on("stateChange",function(e){x.disabled=e.disabled;k.stateChange(x);_.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,f,l,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,_.x());t.highlightPoint(r,f,true);var o=n.values[f];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof l==="undefined")l=_.xScale()(_.x()(o,f));c.push({key:n.key,value:_.y()(o,f),color:a(n,n.seriesIndex)})});if(c.length>2){var h=_.yScale().invert(i.mouseY);var p=Math.abs(_.yScale().domain()[0]-_.yScale().domain()[1]);var d=.03*p;var m=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(m!==null)c[m].highlight=true}var g=n.tickFormat()(_.x()(s,f),f);o.tooltip.position({left:l+u.left,top:i.mouseY+u.top}).chartContainer(H.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:g,series:c})();o.renderGuideLine(l)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(v)M(e,H.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});x.disabled=e.disabled}if(typeof e.index!=="undefined"){O.i=e.index;O.x=A(O.i);x.index=e.index;nt.data([O])}if(typeof e.rescaleY!=="undefined"){y=e.rescaleY}_.update()})});return _}function D(e,n){return n.map(function(n,r){if(!n.values){return n}var i=t.y()(n.values[e],e);if(i<-.95){n.tempDisabled=true;return n}n.tempDisabled=false;n.values=n.values.map(function(e,n){e.display={y:(t.y()(e,n)-i)/(1+i)};return e});return n})}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:30,bottom:50,left:60},a=e.utils.defaultColor(),f=null,l=null,c=true,h=true,p=true,d=false,v=true,m=true,g=false,y=true,b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},w,E,S=t.id(),x={index:0,rescaleY:y},T=null,N="No Data Available.",C=function(e){return e.average},k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250;n.orient("bottom").tickPadding(7);r.orient(d?"right":"left");s.updateState(false);var A=d3.scale.linear(),O={i:0,x:0};var M=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,_);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});_.dispatch=k;_.lines=t;_.legend=i;_.xAxis=n;_.yAxis=r;_.interactiveLayer=o;d3.rebind(_,t,"defined","isArea","x","y","xScale","yScale","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id");_.options=e.utils.optionsFunc.bind(_);_.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return _};_.width=function(e){if(!arguments.length)return f;f=e;return _};_.height=function(e){if(!arguments.length)return l;l=e;return _};_.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);i.color(a);return _};_.rescaleY=function(e){if(!arguments.length)return y;y=e;return _};_.showControls=function(e){if(!arguments.length)return m;m=e;return _};_.useInteractiveGuideline=function(e){if(!arguments.length)return g;g=e;if(e===true){_.interactive(false);_.useVoronoi(false)}return _};_.showLegend=function(e){if(!arguments.length)return c;c=e;return _};_.showXAxis=function(e){if(!arguments.length)return h;h=e;return _};_.showYAxis=function(e){if(!arguments.length)return p;p=e;return _};_.rightAlignYAxis=function(e){if(!arguments.length)return d;d=e;r.orient(e?"right":"left");return _};_.tooltips=function(e){if(!arguments.length)return v;v=e;return _};_.tooltipContent=function(e){if(!arguments.length)return b;b=e;return _};_.state=function(e){if(!arguments.length)return x;x=e;return _};_.defaultState=function(e){if(!arguments.length)return T;T=e;return _};_.noData=function(e){if(!arguments.length)return N;N=e;return _};_.average=function(e){if(!arguments.length)return C;C=e;return _};_.transitionDuration=function(e){if(!arguments.length)return L;L=e;return _};return _};e.models.discreteBar=function(){"use strict";function E(e){e.each(function(e){var i=n-t.left-t.right,E=r-t.top-t.bottom,S=d3.select(this);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});var T=p&&d?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0}})});s.domain(p||d3.merge(T).map(function(e){return e.x})).rangeBands(v||[0,i],.1);o.domain(d||d3.extent(d3.merge(T).map(function(e){return e.y}).concat(f)));if(c)o.range(m||[E-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]);else o.range(m||[E,0]);b=b||s;w=w||o.copy().range([o(0),o(0)]);var N=S.selectAll("g.nv-wrap.nv-discretebar").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-groups");N.attr("transform","translate("+t.left+","+t.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();A.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});A.transition().style("stroke-opacity",1).style("fill-opacity",.75);var O=A.selectAll("g.nv-bar").data(function(e){return e.values});O.exit().remove();var M=O.enter().append("g").attr("transform",function(e,t,n){return"translate("+(s(u(e,t))+s.rangeBand()*.05)+", "+o(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);g.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);g.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){g.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){g.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});M.append("rect").attr("height",0).attr("width",s.rangeBand()*.9/e.length);if(c){M.append("text").attr("text-anchor","middle");O.select("text").text(function(e,t){return h(a(e,t))}).transition().attr("x",s.rangeBand()*.9/2).attr("y",function(e,t){return a(e,t)<0?o(a(e,t))-o(0)+12:-4})}else{O.selectAll("text").remove()}O.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(e,t){return e.color||l(e,t)}).style("stroke",function(e,t){return e.color||l(e,t)}).select("rect").attr("class",y).transition().attr("width",s.rangeBand()*.9/e.length);O.transition().attr("transform",function(e,t){var n=s(u(e,t))+s.rangeBand()*.05,r=a(e,t)<0?o(0):o(0)-o(a(e,t))<1?o(0)-1:o(a(e,t));return"translate("+n+", "+r+")"}).select("rect").attr("height",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(d&&d[0]||0))||1)});b=s.copy();w=o.copy()});return E}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=false,h=d3.format(",.2f"),p,d,v,m,g=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),y="discreteBar";var b,w;E.dispatch=g;E.options=e.utils.optionsFunc.bind(E);E.x=function(e){if(!arguments.length)return u;u=e;return E};E.y=function(e){if(!arguments.length)return a;a=e;return E};E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.xScale=function(e){if(!arguments.length)return s;s=e;return E};E.yScale=function(e){if(!arguments.length)return o;o=e;return E};E.xDomain=function(e){if(!arguments.length)return p;p=e;return E};E.yDomain=function(e){if(!arguments.length)return d;d=e;return E};E.xRange=function(e){if(!arguments.length)return v;v=e;return E};E.yRange=function(e){if(!arguments.length)return m;m=e;return E};E.forceY=function(e){if(!arguments.length)return f;f=e;return E};E.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return E};E.id=function(e){if(!arguments.length)return i;i=e;return E};E.showValues=function(e){if(!arguments.length)return c;c=e;return E};E.valueFormat=function(e){if(!arguments.length)return h;h=e;return E};E.rectClass=function(e){if(!arguments.length)return y;y=e;return E};return E};e.models.discreteBarChart=function(){"use strict";function w(e){e.each(function(e){var u=d3.select(this),p=this;var E=(s||parseInt(u.style("width"))||960)-i.left-i.right,S=(o||parseInt(u.style("height"))||400)-i.top-i.bottom;w.update=function(){g.beforeUpdate();u.transition().duration(y).call(w)};w.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var T=u.selectAll(".nv-noData").data([m]);T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");T.attr("x",i.left+E/2).attr("y",i.top+S/2).text(function(e){return e});return w}else{u.selectAll(".nv-noData").remove()}d=t.xScale();v=t.yScale().clamp(true);var N=u.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g");var k=C.append("defs");var L=N.select("g");C.append("g").attr("class","nv-x nv-axis");C.append("g").attr("class","nv-y nv-axis");C.append("g").attr("class","nv-barsWrap");L.attr("transform","translate("+i.left+","+i.top+")");if(l){L.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)")}t.width(E).height(S);var A=L.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));A.transition().call(t);k.append("clipPath").attr("id","nv-x-label-clip-"+t.id()).append("rect");L.select("#nv-x-label-clip-"+t.id()+" rect").attr("width",d.rangeBand()*(c?2:1)).attr("height",16).attr("x",-d.rangeBand()/(c?1:2));if(a){n.scale(d).ticks(E/100).tickSize(-S,0);L.select(".nv-x.nv-axis").attr("transform","translate(0,"+(v.range()[0]+(t.showValues()&&v.domain()[0]<0?16:0))+")");L.select(".nv-x.nv-axis").transition().call(n);var O=L.select(".nv-x.nv-axis").selectAll("g");if(c){O.selectAll("text").attr("transform",function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})}}if(f){r.scale(v).ticks(S/36).tickSize(-E,0);L.select(".nv-y.nv-axis").transition().call(r)}g.on("tooltipShow",function(e){if(h)b(e,p.parentNode)})});return w}var t=e.models.discreteBar(),n=e.models.axis(),r=e.models.axis();var i={top:15,right:10,bottom:50,left:60},s=null,o=null,u=e.utils.getColor(),a=true,f=true,l=false,c=false,h=true,p=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},d,v,m="No Data Available.",g=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate"),y=250;n.orient("bottom").highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient(l?"right":"left").tickFormat(d3.format(",.1f"));var b=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=p(i.series.key,a,f,i,w);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+i.left,e.pos[1]+i.top];g.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});g.on("tooltipHide",function(){if(h)e.tooltip.cleanup()});w.dispatch=g;w.discretebar=t;w.xAxis=n;w.yAxis=r;d3.rebind(w,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","id","showValues","valueFormat");w.options=e.utils.optionsFunc.bind(w);w.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return w};w.width=function(e){if(!arguments.length)return s;s=e;return w};w.height=function(e){if(!arguments.length)return o;o=e;return w};w.color=function(n){if(!arguments.length)return u;u=e.utils.getColor(n);t.color(u);return w};w.showXAxis=function(e){if(!arguments.length)return a;a=e;return w};w.showYAxis=function(e){if(!arguments.length)return f;f=e;return w};w.rightAlignYAxis=function(e){if(!arguments.length)return l;l=e;r.orient(e?"right":"left");return w};w.staggerLabels=function(e){if(!arguments.length)return c;c=e;return w};w.tooltips=function(e){if(!arguments.length)return h;h=e;return w};w.tooltipContent=function(e){if(!arguments.length)return p;p=e;return w};w.noData=function(e){if(!arguments.length)return m;m=e;return w};w.transitionDuration=function(e){if(!arguments.length)return y;y=e;return w};return w};e.models.distribution=function(){"use strict";function l(e){e.each(function(e){var a=n-(i==="x"?t.left+t.right:t.top+t.bottom),l=i=="x"?"y":"x",c=d3.select(this);f=f||u;var h=c.selectAll("g.nv-distribution").data([e]);var p=h.enter().append("g").attr("class","nvd3 nv-distribution");var d=p.append("g");var v=h.select("g");h.attr("transform","translate("+t.left+","+t.top+")");var m=v.selectAll("g.nv-dist").data(function(e){return e},function(e){return e.key});m.enter().append("g");m.attr("class",function(e,t){return"nv-dist nv-series-"+t}).style("stroke",function(e,t){return o(e,t)});var g=m.selectAll("line.nv-dist"+i).data(function(e){return e.values});g.enter().append("line").attr(i+"1",function(e,t){return f(s(e,t))}).attr(i+"2",function(e,t){return f(s(e,t))});m.exit().selectAll("line.nv-dist"+i).transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}).style("stroke-opacity",0).remove();g.attr("class",function(e,t){return"nv-dist"+i+" nv-dist"+i+"-"+t}).attr(l+"1",0).attr(l+"2",r);g.transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))});f=u.copy()});return l}var t={top:0,right:0,bottom:0,left:0},n=400,r=8,i="x",s=function(e){return e[i]},o=e.utils.defaultColor(),u=d3.scale.linear(),a;var f;l.options=e.utils.optionsFunc.bind(l);l.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return l};l.width=function(e){if(!arguments.length)return n;n=e;return l};l.axis=function(e){if(!arguments.length)return i;i=e;return l};l.size=function(e){if(!arguments.length)return r;r=e;return l};l.getData=function(e){if(!arguments.length)return s;s=d3.functor(e);return l};l.scale=function(e){if(!arguments.length)return u;u=e;return l};l.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);return l};return l};e.models.historicalBar=function(){"use strict";function w(E){E.each(function(w){var E=n-t.left-t.right,S=r-t.top-t.bottom,T=d3.select(this);s.domain(d||d3.extent(w[0].values.map(u).concat(f)));if(c)s.range(m||[E*.5/w[0].values.length,E*(w[0].values.length-.5)/w[0].values.length]);else s.range(m||[0,E]);o.domain(v||d3.extent(w[0].values.map(a).concat(l))).range(g||[S,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=T.selectAll("g.nv-wrap.nv-historicalBar-"+i).data([w[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+i);var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-bars");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){y.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",E).attr("height",S);A.attr("clip-path",h?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-bars").selectAll(".nv-bar").data(function(e){return e},function(e,t){return u(e,t)});O.exit().remove();var M=O.enter().append("rect").attr("x",0).attr("y",function(t,n){return e.utils.NaNtoZero(o(Math.max(0,a(t,n))))}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.abs(o(a(t,n))-o(0)))}).attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).on("mouseover",function(e,t){if(!b)return;d3.select(this).classed("hover",true);y.elementMouseover({point:e,series:w[0],pos:[s(u(e,t)),o(a(e,t))],pointIndex:t,seriesIndex:0,e:d3.event})}).on("mouseout",function(e,t){if(!b)return;d3.select(this).classed("hover",false);y.elementMouseout({point:e,series:w[0],pointIndex:t,seriesIndex:0,e:d3.event})}).on("click",function(e,t){if(!b)return;y.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){if(!b)return;y.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("fill",function(e,t){return p(e,t)}).attr("class",function(e,t,n){return(a(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t}).transition().attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).attr("width",E/w[0].values.length*.9);O.transition().attr("y",function(t,n){var r=a(t,n)<0?o(0):o(0)-o(a(t,n))<1?o(0)-1:o(a(t,n));return e.utils.NaNtoZero(r)}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.max(Math.abs(o(a(t,n))-o(0)),1))})});return w}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[],l=[0],c=false,h=true,p=e.utils.defaultColor(),d,v,m,g,y=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),b=true;w.highlightPoint=function(e,t){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar-0-"+e).classed("hover",t)};w.clearHighlights=function(){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar.hover").classed("hover",false)};w.dispatch=y;w.options=e.utils.optionsFunc.bind(w);w.x=function(e){if(!arguments.length)return u;u=e;return w};w.y=function(e){if(!arguments.length)return a;a=e;return w};w.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return w};w.width=function(e){if(!arguments.length)return n;n=e;return w};w.height=function(e){if(!arguments.length)return r;r=e;return w};w.xScale=function(e){if(!arguments.length)return s;s=e;return w};w.yScale=function(e){if(!arguments.length)return o;o=e;return w};w.xDomain=function(e){if(!arguments.length)return d;d=e;return w};w.yDomain=function(e){if(!arguments.length)return v;v=e;return w};w.xRange=function(e){if(!arguments.length)return m;m=e;return w};w.yRange=function(e){if(!arguments.length)return g;g=e;return w};w.forceX=function(e){if(!arguments.length)return f;f=e;return w};w.forceY=function(e){if(!arguments.length)return l;l=e;return w};w.padData=function(e){if(!arguments.length)return c;c=e;return w};w.clipEdge=function(e){if(!arguments.length)return h;h=e;return w};w.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return w};w.id=function(e){if(!arguments.length)return i;i=e;return w};w.interactive=function(e){if(!arguments.length)return b;b=false;return w};return w};e.models.historicalBarChart=function(){"use strict";function x(e){e.each(function(d){var T=d3.select(this),N=this;var C=(u||parseInt(T.style("width"))||960)-s.left-s.right,k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom;x.update=function(){T.transition().duration(E).call(x)};x.container=this;g.disabled=d.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g){if(g[L]instanceof Array)y[L]=g[L].slice(0);else y[L]=g[L]}}if(!d||!d.length||!d.filter(function(e){return e.values.length}).length){var A=T.selectAll(".nv-noData").data([b]);A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");A.attr("x",s.left+C/2).attr("y",s.top+k/2).text(function(e){return e});return x}else{T.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();var O=T.selectAll("g.nv-wrap.nv-historicalBarChart").data([d]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-legendWrap");if(f){i.width(C);_.select(".nv-legendWrap").datum(d).call(i);if(s.top!=i.height()){s.top=i.height();k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom}O.select(".nv-legendWrap").attr("transform","translate(0,"+ -s.top+")")}O.attr("transform","translate("+s.left+","+s.top+")");if(h){_.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}t.width(C).height(k).color(d.map(function(e,t){return e.color||o(e,t)}).filter(function(e,t){return!d[t].disabled}));var D=_.select(".nv-barsWrap").datum(d.filter(function(e){return!e.disabled}));D.transition().call(t);if(l){n.scale(v).tickSize(-k,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+m.range()[0]+")");_.select(".nv-x.nv-axis").transition().call(n)}if(c){r.scale(m).ticks(k/36).tickSize(-C,0);_.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled;if(!d.filter(function(e){return!e.disabled}).length){d.map(function(e){e.disabled=false;O.selectAll(".nv-series").classed("disabled",false);return e})}g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);e.transition().call(x)});i.dispatch.on("legendDblclick",function(e){d.forEach(function(e){e.disabled=true});e.disabled=false;g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);x.update()});w.on("tooltipShow",function(e){if(p)S(e,N.parentNode)});w.on("changeState",function(t){if(typeof t.disabled!=="undefined"){d.forEach(function(e,n){e.disabled=t.disabled[n]});g.disabled=t.disabled}e.call(x)})});return x}var t=e.models.historicalBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend();var s={top:30,right:90,bottom:50,left:90},o=e.utils.defaultColor(),u=null,a=null,f=false,l=true,c=true,h=false,p=true,d=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},v,m,g={},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=250;n.orient("bottom").tickPadding(7);r.orient(h?"right":"left");var S=function(i,s){if(s){var o=d3.select(s).select("svg");var u=o.node()?o.attr("viewBox"):null;if(u){u=u.split(" ");var a=parseInt(o.style("width"))/u[2];i.pos[0]=i.pos[0]*a;i.pos[1]=i.pos[1]*a}}var f=i.pos[0]+(s.offsetLeft||0),l=i.pos[1]+(s.offsetTop||0),c=n.tickFormat()(t.x()(i.point,i.pointIndex)),h=r.tickFormat()(t.y()(i.point,i.pointIndex)),p=d(i.series.key,c,h,i,x);e.tooltip.show([f,l],p,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+s.left,e.pos[1]+s.top];w.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)});w.on("tooltipHide",function(){if(p)e.tooltip.cleanup()});x.dispatch=w;x.bars=t;x.legend=i;x.xAxis=n;x.yAxis=r;d3.rebind(x,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate","highlightPoint","clearHighlights","interactive");x.options=e.utils.optionsFunc.bind(x);x.margin=function(e){if(!arguments.length)return s;s.top=typeof e.top!="undefined"?e.top:s.top;s.right=typeof e.right!="undefined"?e.right:s.right;s.bottom=typeof e.bottom!="undefined"?e.bottom:s.bottom;s.left=typeof e.left!="undefined"?e.left:s.left;return x};x.width=function(e){if(!arguments.length)return u;u=e;return x};x.height=function(e){if(!arguments.length)return a;a=e;return x};x.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);i.color(o);return x};x.showLegend=function(e){if(!arguments.length)return f;f=e;return x};x.showXAxis=function(e){if(!arguments.length)return l;l=e;return x};x.showYAxis=function(e){if(!arguments.length)return c;c=e;return x};x.rightAlignYAxis=function(e){if(!arguments.length)return h;h=e;r.orient(e?"right":"left");return x};x.tooltips=function(e){if(!arguments.length)return p;p=e;return x};x.tooltipContent=function(e){if(!arguments.length)return d;d=e;return x};x.state=function(e){if(!arguments.length)return g;g=e;return x};x.defaultState=function(e){if(!arguments.length)return y;y=e;return x};x.noData=function(e){if(!arguments.length)return b;b=e;return x};x.transitionDuration=function(e){if(!arguments.length)return E;E=e;return x};return x};e.models.indentedTree=function(){"use strict";function g(e){e.each(function(e){function k(e,t,n){d3.event.stopPropagation();if(d3.event.shiftKey&&!n){d3.event.shiftKey=false;e.values&&e.values.forEach(function(e){if(e.values||e._values){k(e,0,true)}});return true}if(!O(e)){return true}if(e.values){e._values=e.values;e.values=null}else{e.values=e._values;e._values=null}g.update()}function L(e){return e._values&&e._values.length?h:e.values&&e.values.length?p:""}function A(e){return e._values&&e._values.length}function O(e){var t=e.values||e._values;return t&&t.length}var t=1,n=d3.select(this);var i=d3.layout.tree().children(function(e){return e.values}).size([r,f]);g.update=function(){n.transition().duration(600).call(g)};if(!e[0])e[0]={key:a};var s=i.nodes(e[0]);var y=d3.select(this).selectAll("div").data([[s]]);var b=y.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree");var w=b.append("table");var E=y.select("table").attr("width","100%").attr("class",c);if(o){var S=w.append("thead");var x=S.append("tr");l.forEach(function(e){x.append("th").attr("width",e.width?e.width:"10%").style("text-align",e.type=="numeric"?"right":"left").append("span").text(e.label)})}var T=E.selectAll("tbody").data(function(e){return e});T.enter().append("tbody");t=d3.max(s,function(e){return e.depth});i.size([r,t*f]);var N=T.selectAll("tr").data(function(e){return e.filter(function(e){return u&&!e.children?u(e):true})},function(e,t){return e.id||e.id||++m});N.exit().remove();N.select("img.nv-treeicon").attr("src",L).classed("folded",A);var C=N.enter().append("tr");l.forEach(function(e,t){var n=C.append("td").style("padding-left",function(e){return(t?0:e.depth*f+12+(L(e)?0:16))+"px"},"important").style("text-align",e.type=="numeric"?"right":"left");if(t==0){n.append("img").classed("nv-treeicon",true).classed("nv-folded",A).attr("src",L).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(e){return L(e)?"inline-block":"none"}).on("click",k)}n.each(function(n){if(!t&&v(n))d3.select(this).append("a").attr("href",v).attr("class",d3.functor(e.classes)).append("span");else d3.select(this).append("span");d3.select(this).select("span").attr("class",d3.functor(e.classes)).text(function(t){return e.format?e.format(t):t[e.key]||"-"})});if(e.showCount){n.append("span").attr("class","nv-childrenCount");N.selectAll("span.nv-childrenCount").text(function(e){return e.values&&e.values.length||e._values&&e._values.length?"("+(e.values&&e.values.filter(function(e){return u?u(e):true}).length||e._values&&e._values.filter(function(e){return u?u(e):true}).length||0)+")":""})}});N.order().on("click",function(e){d.elementClick({row:this,data:e,pos:[e.x,e.y]})}).on("dblclick",function(e){d.elementDblclick({row:this,data:e,pos:[e.x,e.y]})}).on("mouseover",function(e){d.elementMouseover({row:this,data:e,pos:[e.x,e.y]})}).on("mouseout",function(e){d.elementMouseout({row:this,data:e,pos:[e.x,e.y]})})});return g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e4),o=true,u=false,a="No Data Available.",f=20,l=[{key:"key",label:"Name",type:"text"}],c=null,h="images/grey-plus.png",p="images/grey-minus.png",d=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),v=function(e){return e.url};var m=0;g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return g};g.width=function(e){if(!arguments.length)return n;n=e;return g};g.height=function(e){if(!arguments.length)return r;r=e;return g};g.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);scatter.color(i);return g};g.id=function(e){if(!arguments.length)return s;s=e;return g};g.header=function(e){if(!arguments.length)return o;o=e;return g};g.noData=function(e){if(!arguments.length)return a;a=e;return g};g.filterZero=function(e){if(!arguments.length)return u;u=e;return g};g.columns=function(e){if(!arguments.length)return l;l=e;return g};g.tableClass=function(e){if(!arguments.length)return c;c=e;return g};g.iconOpen=function(e){if(!arguments.length)return h;h=e;return g};g.iconClose=function(e){if(!arguments.length)return p;p=e;return g};g.getUrl=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.legend=function(){"use strict";function h(p){p.each(function(h){var p=n-t.left-t.right,d=d3.select(this);var v=d.selectAll("g.nv-legend").data([h]);var m=v.enter().append("g").attr("class","nvd3 nv-legend").append("g");var g=v.select("g");v.attr("transform","translate("+t.left+","+t.top+")");var y=g.selectAll(".nv-series").data(function(e){return e});var b=y.enter().append("g").attr("class","nv-series").on("mouseover",function(e,t){l.legendMouseover(e,t)}).on("mouseout",function(e,t){l.legendMouseout(e,t)}).on("click",function(e,t){if(!c){l.legendClick(e,t);if(a){if(f){h.forEach(function(e){e.disabled=true});e.disabled=false}else{e.disabled=!e.disabled;if(h.every(function(e){return e.disabled})){h.forEach(function(e){e.disabled=false})}}l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}}).on("dblclick",function(e,t){if(!c){l.legendDblclick(e,t);if(a){h.forEach(function(e){e.disabled=true});e.disabled=false;l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}});b.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5);b.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");y.classed("disabled",function(e){return e.disabled});y.exit().remove();y.select("circle").style("fill",function(e,t){return e.color||s(e,t)}).style("stroke",function(e,t){return e.color||s(e,t)});y.select("text").text(i);if(o){var w=[];y.each(function(t,n){var r=d3.select(this).select("text");var i=r.node().getComputedTextLength()||e.utils.calcApproxTextWidth(r);w.push(i+28)});var E=0;var S=0;var x=[];while(S<p&&E<w.length){x[E]=w[E];S+=w[E++]}if(E===0)E=1;while(S>p&&E>1){x=[];E--;for(var T=0;T<w.length;T++){if(w[T]>(x[T%E]||0))x[T%E]=w[T]}S=x.reduce(function(e,t,n,r){return e+t})}var N=[];for(var C=0,k=0;C<E;C++){N[C]=k;k+=x[C]}y.attr("transform",function(e,t){return"translate("+N[t%E]+","+(5+Math.floor(t/E)*20)+")"});if(u){g.attr("transform","translate("+(n-t.right-S)+","+t.top+")")}else{g.attr("transform","translate(0"+","+t.top+")")}r=t.top+t.bottom+Math.ceil(w.length/E)*20}else{var L=5,A=5,O=0,M;y.attr("transform",function(e,r){var i=d3.select(this).select("text").node().getComputedTextLength()+28;M=A;if(n<t.left+t.right+M+i){A=M=5;L+=20}A+=i;if(A>O)O=A;return"translate("+M+","+L+")"});g.attr("transform","translate("+(n-t.right-O)+","+t.top+")");r=t.top+t.bottom+L+15}});return h}var t={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},s=e.utils.defaultColor(),o=true,u=true,a=true,f=false,l=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),c=false;h.dispatch=l;h.options=e.utils.optionsFunc.bind(h);h.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return h};h.width=function(e){if(!arguments.length)return n;n=e;return h};h.height=function(e){if(!arguments.length)return r;r=e;return h};h.key=function(e){if(!arguments.length)return i;i=e;return h};h.color=function(t){if(!arguments.length)return s;s=e.utils.getColor(t);return h};h.align=function(e){if(!arguments.length)return o;o=e;return h};h.rightAlign=function(e){if(!arguments.length)return u;u=e;return h};h.dualaxis=function(e){if(!arguments.length)return c;c=e;return h};h.updateState=function(e){if(!arguments.length)return a;a=e;return h};h.radioButtonMode=function(e){if(!arguments.length)return f;f=e;return h};return h};e.models.line=function(){"use strict";function m(g){g.each(function(m){var g=r-n.left-n.right,b=i-n.top-n.bottom,w=d3.select(this);c=t.xScale();h=t.yScale();d=d||c;v=v||h;var E=w.selectAll("g.nv-wrap.nv-line").data([m]);var S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line");var T=S.append("defs");var N=S.append("g");var C=E.select("g");N.append("g").attr("class","nv-groups");N.append("g").attr("class","nv-scatterWrap");E.attr("transform","translate("+n.left+","+n.top+")");t.width(g).height(b);var k=E.select(".nv-scatterWrap");k.transition().call(t);T.append("clipPath").attr("id","nv-edge-clip-"+t.id()).append("rect");E.select("#nv-edge-clip-"+t.id()+" rect").attr("width",g).attr("height",b);C.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");k.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);L.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();L.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return s(e,t)}).style("stroke",function(e,t){return s(e,t)});L.transition().style("stroke-opacity",1).style("fill-opacity",.5);var A=L.selectAll("path.nv-area").data(function(e){return f(e)?[e]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}).y1(function(e,t){return v(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});L.exit().selectAll("path.nv-area").remove();A.transition().attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}).y1(function(e,t){return h(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});var O=L.selectAll("path.nv-line").data(function(e){return[e.values]});O.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}));L.exit().selectAll("path.nv-line").transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));O.transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));d=c.copy();v=h.copy()});return m}var t=e.models.scatter();var n={top:0,right:0,bottom:0,left:0},r=960,i=500,s=e.utils.defaultColor(),o=function(e){return e.x},u=function(e){return e.y},a=function(e,t){return!isNaN(u(e,t))&&u(e,t)!==null},f=function(e){return e.area},l=false,c,h,p="linear";t.size(16).sizeDomain([16,256]);var d,v;m.dispatch=t.dispatch;m.scatter=t;d3.rebind(m,t,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","padData","highlightPoint","clearHighlights");m.options=e.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return m};m.width=function(e){if(!arguments.length)return r;r=e;return m};m.height=function(e){if(!arguments.length)return i;i=e;return m};m.x=function(e){if(!arguments.length)return o;o=e;t.x(e);return m};m.y=function(e){if(!arguments.length)return u;u=e;t.y(e);return m};m.clipEdge=function(e){if(!arguments.length)return l;l=e;return m};m.color=function(n){if(!arguments.length)return s;s=e.utils.getColor(n);t.color(s);return m};m.interpolate=function(e){if(!arguments.length)return p;p=e;return m};m.defined=function(e){if(!arguments.length)return a;a=e;return m};m.isArea=function(e){if(!arguments.length)return f;f=d3.functor(e);return m};return m};e.models.lineChart=function(){"use strict";function N(m){m.each(function(m){var C=d3.select(this),k=this;var L=(a||parseInt(C.style("width"))||960)-o.left-o.right,A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom;N.update=function(){C.transition().duration(x).call(N)};N.container=this;b.disabled=m.map(function(e){return!!e.disabled});if(!w){var O;w={};for(O in b){if(b[O]instanceof Array)w[O]=b[O].slice(0);else w[O]=b[O]}}if(!m||!m.length||!m.filter(function(e){return e.values.length}).length){var M=C.selectAll(".nv-noData").data([E]);M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");M.attr("x",o.left+L/2).attr("y",o.top+A/2).text(function(e){return e});return N}else{C.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var _=C.selectAll("g.nv-wrap.nv-lineChart").data([m]);var D=_.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g");var P=_.select("g");D.append("rect").style("opacity",0);D.append("g").attr("class","nv-x nv-axis");D.append("g").attr("class","nv-y nv-axis");D.append("g").attr("class","nv-linesWrap");D.append("g").attr("class","nv-legendWrap");D.append("g").attr("class","nv-interactive");P.select("rect").attr("width",L).attr("height",A);if(l){i.width(L);P.select(".nv-legendWrap").datum(m).call(i);if(o.top!=i.height()){o.top=i.height();A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom}_.select(".nv-legendWrap").attr("transform","translate(0,"+ -o.top+")")}_.attr("transform","translate("+o.left+","+o.top+")");if(p){P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}if(d){s.width(L).height(A).margin({left:o.left,top:o.top}).svgContainer(C).xScale(g);_.select(".nv-interactive").call(s)}t.width(L).height(A).color(m.map(function(e,t){return e.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));var H=P.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));H.transition().call(t);if(c){n.scale(g).ticks(L/100).tickSize(-A,0);P.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");P.select(".nv-x.nv-axis").transition().call(n)}if(h){r.scale(y).ticks(A/36).tickSize(-L,0);P.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);N.update()});s.dispatch.on("elementMousemove",function(i){t.clearHighlights();var a,f,l,c=[];m.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,N.x());t.highlightPoint(r,f,true);var s=n.values[f];if(typeof s==="undefined")return;if(typeof a==="undefined")a=s;if(typeof l==="undefined")l=N.xScale()(N.x()(s,f));c.push({key:n.key,value:N.y()(s,f),color:u(n,n.seriesIndex)})});if(c.length>2){var h=N.yScale().invert(i.mouseY);var p=Math.abs(N.yScale().domain()[0]-N.yScale().domain()[1]);var d=.03*p;var g=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(g!==null)c[g].highlight=true}var y=n.tickFormat()(N.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(k.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:y,series:c})();s.renderGuideLine(l)});s.dispatch.on("elementMouseout",function(e){S.tooltipHide();t.clearHighlights()});S.on("tooltipShow",function(e){if(v)T(e,k.parentNode)});S.on("changeState",function(e){if(typeof e.disabled!=="undefined"){m.forEach(function(t,n){t.disabled=e.disabled[n]});b.disabled=e.disabled}N.update()})});return N}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline();var o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=true,c=true,h=true,p=false,d=false,v=true,m=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=250;n.orient("bottom").tickPadding(7);r.orient(p?"right":"left");var T=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,N);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});N.dispatch=S;N.lines=t;N.legend=i;N.xAxis=n;N.yAxis=r;N.interactiveLayer=s;d3.rebind(N,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id","interpolate");N.options=e.utils.optionsFunc.bind(N);N.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return N};N.width=function(e){if(!arguments.length)return a;a=e;return N};N.height=function(e){if(!arguments.length)return f;f=e;return N};N.color=function(t){if(!arguments.length)return u;u=e.utils.getColor(t);i.color(u);return N};N.showLegend=function(e){if(!arguments.length)return l;l=e;return N};N.showXAxis=function(e){if(!arguments.length)return c;c=e;return N};N.showYAxis=function(e){if(!arguments.length)return h;h=e;return N};N.rightAlignYAxis=function(e){if(!arguments.length)return p;p=e;r.orient(e?"right":"left");return N};N.useInteractiveGuideline=function(e){if(!arguments.length)return d;d=e;if(e===true){N.interactive(false);N.useVoronoi(false)}return N};N.tooltips=function(e){if(!arguments.length)return v;v=e;return N};N.tooltipContent=function(e){if(!arguments.length)return m;m=e;return N};N.state=function(e){if(!arguments.length)return b;b=e;return N};N.defaultState=function(e){if(!arguments.length)return w;w=e;return N};N.noData=function(e){if(!arguments.length)return E;E=e;return N};N.transitionDuration=function(e){if(!arguments.length)return x;x=e;return N};return N};e.models.linePlusBarChart=function(){"use strict";function T(e){e.each(function(e){var l=d3.select(this),c=this;var v=(a||parseInt(l.style("width"))||960)-u.left-u.right,N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom;T.update=function(){l.transition().call(T)};b.disabled=e.map(function(e){return!!e.disabled});if(!w){var C;w={};for(C in b){if(b[C]instanceof Array)w[C]=b[C].slice(0);else w[C]=b[C]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var k=l.selectAll(".nv-noData").data([E]);k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");k.attr("x",u.left+v/2).attr("y",u.top+N/2).text(function(e){return e});return T}else{l.selectAll(".nv-noData").remove()}var L=e.filter(function(e){return!e.disabled&&e.bar});var A=e.filter(function(e){return!e.bar});m=A.filter(function(e){return!e.disabled}).length&&A.filter(function(e){return!e.disabled})[0].values.length?t.xScale():n.xScale();g=n.yScale();y=t.yScale();var O=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y1 nv-axis");M.append("g").attr("class","nv-y2 nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-linesWrap");M.append("g").attr("class","nv-legendWrap");if(p){o.width(v/2);_.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(o);if(u.top!=o.height()){u.top=o.height();N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom}_.select(".nv-legendWrap").attr("transform","translate("+v/2+","+ -u.top+")")}O.attr("transform","translate("+u.left+","+u.top+")");t.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));n.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));var D=_.select(".nv-barsWrap").datum(L.length?L:[{values:[]}]);var P=_.select(".nv-linesWrap").datum(A[0]&&!A[0].disabled?A:[{values:[]}]);d3.transition(D).call(n);d3.transition(P).call(t);r.scale(m).ticks(v/100).tickSize(-N,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")");d3.transition(_.select(".nv-x.nv-axis")).call(r);i.scale(g).ticks(N/36).tickSize(-v,0);d3.transition(_.select(".nv-y1.nv-axis")).style("opacity",L.length?1:0).call(i);s.scale(y).ticks(N/36).tickSize(L.length?0:-v,0);_.select(".nv-y2.nv-axis").style("opacity",A.length?1:0).attr("transform","translate("+v+",0)");d3.transition(_.select(".nv-y2.nv-axis")).call(s);o.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);T.update()});S.on("tooltipShow",function(e){if(d)x(e,c.parentNode)});S.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});b.disabled=t.disabled}T.update()})});return T}var t=e.models.line(),n=e.models.historicalBar(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.legend();var u={top:30,right:60,bottom:50,left:60},a=null,f=null,l=function(e){return e.x},c=function(e){return e.y},h=e.utils.defaultColor(),p=true,d=true,v=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},m,g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.padData(true);t.clipEdge(false).padData(true);r.orient("bottom").tickPadding(7).highlightZero(false);i.orient("left");s.orient("right");var x=function(n,o){var u=n.pos[0]+(o.offsetLeft||0),a=n.pos[1]+(o.offsetTop||0),f=r.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?i:s).tickFormat()(t.y()(n.point,n.pointIndex)),c=v(n.series.key,f,l,n,T);e.tooltip.show([u,a],c,n.value<0?"n":"s",null,o)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});n.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});n.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});T.dispatch=S;T.legend=o;T.lines=t;T.bars=n;T.xAxis=r;T.y1Axis=i;T.y2Axis=s;d3.rebind(T,t,"defined","size","clipVoronoi","interpolate");T.options=e.utils.optionsFunc.bind(T);T.x=function(e){if(!arguments.length)return l;l=e;t.x(e);n.x(e);return T};T.y=function(e){if(!arguments.length)return c;c=e;t.y(e);n.y(e);return T};T.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return T};T.width=function(e){if(!arguments.length)return a;a=e;return T};T.height=function(e){if(!arguments.length)return f;f=e;return T};T.color=function(t){if(!arguments.length)return h;h=e.utils.getColor(t);o.color(h);return T};T.showLegend=function(e){if(!arguments.length)return p;p=e;return T};T.tooltips=function(e){if(!arguments.length)return d;d=e;return T};T.tooltipContent=function(e){if(!arguments.length)return v;v=e;return T};T.state=function(e){if(!arguments.length)return b;b=e;return T};T.defaultState=function(e){if(!arguments.length)return w;w=e;return T};T.noData=function(e){if(!arguments.length)return E;E=e;return T};return T};e.models.lineWithFocusChart=function(){"use strict";function k(e){e.each(function(e){function U(e){var t=+(e=="e"),n=t?1:-1,r=M/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function z(){if(!a.empty())a.extent(w);I.data([a.empty()?g.domain():w]).each(function(e,t){var n=g(e[0])-v.range()[0],r=v.range()[1]-g(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",g(e[1])).attr("width",r<0?0:r)})}function W(){w=a.empty()?null:a.extent();var n=a.empty()?g.domain():a.extent();if(Math.abs(n[0]-n[1])<=1){return}T.brush({extent:n,brush:a});z();var s=H.select(".nv-focus .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}).map(function(e,r){return{key:e.key,values:e.values.filter(function(e,r){return t.x()(e,r)>=n[0]&&t.x()(e,r)<=n[1]})}}));s.transition().duration(N).call(t);H.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(r);H.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(i)}var S=d3.select(this),L=this;var A=(h||parseInt(S.style("width"))||960)-f.left-f.right,O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d,M=d-l.top-l.bottom;k.update=function(){S.transition().duration(N).call(k)};k.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var _=S.selectAll(".nv-noData").data([x]);_.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");_.attr("x",f.left+A/2).attr("y",f.top+O/2).text(function(e){return e});return k}else{S.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();g=n.xScale();y=n.yScale();var D=S.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([e]);var P=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g");var H=D.select("g");P.append("g").attr("class","nv-legendWrap");var B=P.append("g").attr("class","nv-focus");B.append("g").attr("class","nv-x nv-axis");B.append("g").attr("class","nv-y nv-axis");B.append("g").attr("class","nv-linesWrap");var j=P.append("g").attr("class","nv-context");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-linesWrap");j.append("g").attr("class","nv-brushBackground");j.append("g").attr("class","nv-x nv-brush");if(b){u.width(A);H.select(".nv-legendWrap").datum(e).call(u);if(f.top!=u.height()){f.top=u.height();O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d}H.select(".nv-legendWrap").attr("transform","translate(0,"+ -f.top+")")}D.attr("transform","translate("+f.left+","+f.top+")");t.width(A).height(O).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));n.defined(t.defined()).width(A).height(M).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));H.select(".nv-context").attr("transform","translate(0,"+(O+f.bottom+l.top)+")");var F=H.select(".nv-context .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(n);r.scale(v).ticks(A/100).tickSize(-O,0);i.scale(m).ticks(O/36).tickSize(-A,0);H.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+O+")");a.x(g).on("brush",function(){var e=k.transitionDuration();k.transitionDuration(0);W();k.transitionDuration(e)});if(w)a.extent(w);var I=H.select(".nv-brushBackground").selectAll("g").data([w||a.extent()]);var q=I.enter().append("g");q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M);q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var R=H.select(".nv-x.nv-brush").call(a);R.selectAll("rect").attr("height",M);R.selectAll(".resize").append("path").attr("d",U);W();s.scale(g).ticks(A/100).tickSize(-M,0);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");d3.transition(H.select(".nv-context .nv-x.nv-axis")).call(s);o.scale(y).ticks(M/36).tickSize(-A,0);d3.transition(H.select(".nv-context .nv-y.nv-axis")).call(o);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");u.dispatch.on("stateChange",function(e){k.update()});T.on("tooltipShow",function(e){if(E)C(e,L.parentNode)})});return k}var t=e.models.line(),n=e.models.line(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.axis(),u=e.models.legend(),a=d3.svg.brush();var f={top:30,right:30,bottom:30,left:60},l={top:0,right:30,bottom:20,left:60},c=e.utils.defaultColor(),h=null,p=null,d=100,v,m,g,y,b=true,w=null,E=true,S=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},x="No Data Available.",T=d3.dispatch("tooltipShow","tooltipHide","brush"),N=250;t.clipEdge(true);n.interactive(false);r.orient("bottom").tickPadding(5);i.orient("left");s.orient("bottom").tickPadding(5);o.orient("left");var C=function(n,s){var o=n.pos[0]+(s.offsetLeft||0),u=n.pos[1]+(s.offsetTop||0),a=r.tickFormat()(t.x()(n.point,n.pointIndex)),f=i.tickFormat()(t.y()(n.point,n.pointIndex)),l=S(n.series.key,a,f,n,k);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+f.left,e.pos[1]+f.top];T.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)});T.on("tooltipHide",function(){if(E)e.tooltip.cleanup()});k.dispatch=T;k.legend=u;k.lines=t;k.lines2=n;k.xAxis=r;k.yAxis=i;k.x2Axis=s;k.y2Axis=o;d3.rebind(k,t,"defined","isArea","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id");k.options=e.utils.optionsFunc.bind(k);k.x=function(e){if(!arguments.length)return t.x;t.x(e);n.x(e);return k};k.y=function(e){if(!arguments.length)return t.y;t.y(e);n.y(e);return k};k.margin=function(e){if(!arguments.length)return f;f.top=typeof e.top!="undefined"?e.top:f.top;f.right=typeof e.right!="undefined"?e.right:f.right;f.bottom=typeof e.bottom!="undefined"?e.bottom:f.bottom;f.left=typeof e.left!="undefined"?e.left:f.left;return k};k.margin2=function(e){if(!arguments.length)return l;l=e;return k};k.width=function(e){if(!arguments.length)return h;h=e;return k};k.height=function(e){if(!arguments.length)return p;p=e;return k};k.height2=function(e){if(!arguments.length)return d;d=e;return k};k.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);u.color(c);return k};k.showLegend=function(e){if(!arguments.length)return b;b=e;return k};k.tooltips=function(e){if(!arguments.length)return E;E=e;return k};k.tooltipContent=function(e){if(!arguments.length)return S;S=e;return k};k.interpolate=function(e){if(!arguments.length)return t.interpolate();t.interpolate(e);n.interpolate(e);return k};k.noData=function(e){if(!arguments.length)return x;x=e;return k};k.xTickFormat=function(e){if(!arguments.length)return r.tickFormat();r.tickFormat(e);s.tickFormat(e);return k};k.yTickFormat=function(e){if(!arguments.length)return i.tickFormat();i.tickFormat(e);o.tickFormat(e);return k};k.brushExtent=function(e){if(!arguments.length)return w;w=e;return k};k.transitionDuration=function(e){if(!arguments.length)return N;N=e;return k};return k};e.models.linePlusBarWithFocusChart=function(){"use strict";function B(e){e.each(function(e){function nt(e){var t=+(e=="e"),n=t?1:-1,r=q/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function rt(){if(!h.empty())h.extent(x);Z.data([h.empty()?k.domain():x]).each(function(e,t){var n=k(e[0])-k.range()[0],r=k.range()[1]-k(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",k(e[1])).attr("width",r<0?0:r)})}function it(){x=h.empty()?null:h.extent();S=h.empty()?k.domain():h.extent();D.brush({extent:S,brush:h});rt();r.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));t.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var n=J.select(".nv-focus .nv-barsWrap").datum(!U.length?[{values:[]}]:U.map(function(e,t){return{key:e.key,values:e.values.filter(function(e,t){return r.x()(e,t)>=S[0]&&r.x()(e,t)<=S[1]})}}));var i=J.select(".nv-focus .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z.map(function(e,n){return{key:e.key,values:e.values.filter(function(e,n){return t.x()(e,n)>=S[0]&&t.x()(e,n)<=S[1]})}}));if(U.length){C=r.xScale()}else{C=t.xScale()}s.scale(C).ticks(F/100).tickSize(-I,0);s.domain([Math.ceil(S[0]),Math.floor(S[1])]);J.select(".nv-x.nv-axis").transition().duration(P).call(s);n.transition().duration(P).call(r);i.transition().duration(P).call(t);J.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L.range()[0]+")");u.scale(L).ticks(I/36).tickSize(-F,0);J.select(".nv-focus .nv-y1.nv-axis").style("opacity",U.length?1:0);a.scale(A).ticks(I/36).tickSize(U.length?0:-F,0);J.select(".nv-focus .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+C.range()[1]+",0)");J.select(".nv-focus .nv-y1.nv-axis").transition().duration(P).call(u);J.select(".nv-focus .nv-y2.nv-axis").transition().duration(P).call(a)}var N=d3.select(this),j=this;var F=(v||parseInt(N.style("width"))||960)-p.left-p.right,I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g,q=g-d.top-d.bottom;B.update=function(){N.transition().duration(P).call(B)};B.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=N.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",p.left+F/2).attr("y",p.top+I/2).text(function(e){return e});return B}else{N.selectAll(".nv-noData").remove()}var U=e.filter(function(e){return!e.disabled&&e.bar});var z=e.filter(function(e){return!e.bar});C=r.xScale();k=o.scale();L=r.yScale();A=t.yScale();O=i.yScale();M=n.yScale();var W=e.filter(function(e){return!e.disabled&&e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});var X=e.filter(function(e){return!e.disabled&&!e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});C.range([0,F]);k.domain(d3.extent(d3.merge(W.concat(X)),function(e){return e.x})).range([0,F]);var V=N.selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var $=V.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var J=V.select("g");$.append("g").attr("class","nv-legendWrap");var K=$.append("g").attr("class","nv-focus");K.append("g").attr("class","nv-x nv-axis");K.append("g").attr("class","nv-y1 nv-axis");K.append("g").attr("class","nv-y2 nv-axis");K.append("g").attr("class","nv-barsWrap");K.append("g").attr("class","nv-linesWrap");var Q=$.append("g").attr("class","nv-context");Q.append("g").attr("class","nv-x nv-axis");Q.append("g").attr("class","nv-y1 nv-axis");Q.append("g").attr("class","nv-y2 nv-axis");Q.append("g").attr("class","nv-barsWrap");Q.append("g").attr("class","nv-linesWrap");Q.append("g").attr("class","nv-brushBackground");Q.append("g").attr("class","nv-x nv-brush");if(E){c.width(F/2);J.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(c);if(p.top!=c.height()){p.top=c.height();I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g}J.select(".nv-legendWrap").attr("transform","translate("+F/2+","+ -p.top+")")}V.attr("transform","translate("+p.left+","+p.top+")");i.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));n.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var G=J.select(".nv-context .nv-barsWrap").datum(U.length?U:[{values:[]}]);var Y=J.select(".nv-context .nv-linesWrap").datum(!z[0].disabled?z:[{values:[]}]);J.select(".nv-context").attr("transform","translate(0,"+(I+p.bottom+d.top)+")");G.transition().call(i);Y.transition().call(n);h.x(k).on("brush",it);if(x)h.extent(x);var Z=J.select(".nv-brushBackground").selectAll("g").data([x||h.extent()]);var et=Z.enter().append("g");et.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",q);et.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",q);var tt=J.select(".nv-x.nv-brush").call(h);tt.selectAll("rect").attr("height",q);tt.selectAll(".resize").append("path").attr("d",nt);o.ticks(F/100).tickSize(-q,0);J.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+O.range()[0]+")");J.select(".nv-context .nv-x.nv-axis").transition().call(o);f.scale(O).ticks(q/36).tickSize(-F,0);J.select(".nv-context .nv-y1.nv-axis").style("opacity",U.length?1:0).attr("transform","translate(0,"+k.range()[0]+")");J.select(".nv-context .nv-y1.nv-axis").transition().call(f);l.scale(M).ticks(q/36).tickSize(U.length?0:-F,0);J.select(".nv-context .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+k.range()[1]+",0)");J.select(".nv-context .nv-y2.nv-axis").transition().call(l);c.dispatch.on("stateChange",function(e){B.update()});D.on("tooltipShow",function(e){if(T)H(e,j.parentNode)});it()});return B}var t=e.models.line(),n=e.models.line(),r=e.models.historicalBar(),i=e.models.historicalBar(),s=e.models.axis(),o=e.models.axis(),u=e.models.axis(),a=e.models.axis(),f=e.models.axis(),l=e.models.axis(),c=e.models.legend(),h=d3.svg.brush();var p={top:30,right:30,bottom:30,left:60},d={top:0,right:30,bottom:20,left:60},v=null,m=null,g=100,y=function(e){return e.x},b=function(e){return e.y},w=e.utils.defaultColor(),E=true,S,x=null,T=true,N=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},C,k,L,A,O,M,_="No Data Available.",D=d3.dispatch("tooltipShow","tooltipHide","brush"),P=0;t.clipEdge(true);n.interactive(false);s.orient("bottom").tickPadding(5);u.orient("left");a.orient("right");o.orient("bottom").tickPadding(5);f.orient("left");l.orient("right");var H=function(n,r){if(S){n.pointIndex+=Math.ceil(S[0])}var i=n.pos[0]+(r.offsetLeft||0),o=n.pos[1]+(r.offsetTop||0),f=s.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?u:a).tickFormat()(t.y()(n.point,n.pointIndex)),c=N(n.series.key,f,l,n,B);e.tooltip.show([i,o],c,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});r.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});r.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});D.on("tooltipHide",function(){if(T)e.tooltip.cleanup()});B.dispatch=D;B.legend=c;B.lines=t;B.lines2=n;B.bars=r;B.bars2=i;B.xAxis=s;B.x2Axis=o;B.y1Axis=u;B.y2Axis=a;B.y3Axis=f;B.y4Axis=l;d3.rebind(B,t,"defined","size","clipVoronoi","interpolate");B.options=e.utils.optionsFunc.bind(B);B.x=function(e){if(!arguments.length)return y;y=e;t.x(e);r.x(e);return B};B.y=function(e){if(!arguments.length)return b;b=e;t.y(e);r.y(e);return B};B.margin=function(e){if(!arguments.length)return p;p.top=typeof e.top!="undefined"?e.top:p.top;p.right=typeof e.right!="undefined"?e.right:p.right;p.bottom=typeof e.bottom!="undefined"?e.bottom:p.bottom;p.left=typeof e.left!="undefined"?e.left:p.left;return B};B.width=function(e){if(!arguments.length)return v;v=e;return B};B.height=function(e){if(!arguments.length)return m;m=e;return B};B.color=function(t){if(!arguments.length)return w;w=e.utils.getColor(t);c.color(w);return B};B.showLegend=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipContent=function(e){if(!arguments.length)return N;N=e;return B};B.noData=function(e){if(!arguments.length)return _;_=e;return B};B.brushExtent=function(e){if(!arguments.length)return x;x=e;return B};return B};e.models.multiBar=function(){"use strict";function C(e){e.each(function(e){var C=n-t.left-t.right,k=r-t.top-t.bottom,L=d3.select(this);if(d&&e.length)d=[{values:e[0].values.map(function(e){return{x:e.x,y:0,series:e.series,size:.01}})}];if(c)e=d3.layout.stack().offset(h).values(function(e){return e.values}).y(a)(!e.length&&d?d:e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(c)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i;i=i-t.size}else{t.y1=t.size+r;r=r+t.size}})});var A=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});i.domain(y||d3.merge(A).map(function(e){return e.x})).rangeBands(w||[0,C],S);s.domain(b||d3.extent(d3.merge(A).map(function(e){return c?e.y>0?e.y1:e.y1+e.y:e.y}).concat(f))).range(E||[k,0]);if(i.domain()[0]===i.domain()[1])i.domain()[0]?i.domain([i.domain()[0]-i.domain()[0]*.01,i.domain()[1]+i.domain()[1]*.01]):i.domain([-1,1]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]+s.domain()[0]*.01,s.domain()[1]-s.domain()[1]*.01]):s.domain([-1,1]);T=T||i;N=N||s;var O=L.selectAll("g.nv-wrap.nv-multibar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar");var _=M.append("defs");var D=M.append("g");var P=O.select("g");D.append("g").attr("class","nv-groups");O.attr("transform","translate("+t.left+","+t.top+")");_.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect");O.select("#nv-edge-clip-"+o+" rect").attr("width",C).attr("height",k);P.attr("clip-path",l?"url(#nv-edge-clip-"+o+")":"");var H=O.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);H.exit().transition().selectAll("rect.nv-bar").delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e){return c?N(e.y0):N(0)}).attr("height",0).remove();H.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return p(e,t)}).style("stroke",function(e,t){return p(e,t)});H.transition().style("stroke-opacity",1).style("fill-opacity",.75);var B=H.selectAll("rect.nv-bar").data(function(t){return d&&!e.length?d.values:t.values});B.exit().remove();var j=B.enter().append("rect").attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,r){return c?0:r*i.rangeBand()/e.length}).attr("y",function(e){return N(c?e.y0:0)}).attr("height",0).attr("width",i.rangeBand()/(c?1:e.length)).attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});B.style("fill",function(e,t,n){return p(e,n,t)}).style("stroke",function(e,t,n){return p(e,n,t)}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);x.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);x.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){x.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){x.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});B.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).transition().attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});if(v){if(!m)m=e.map(function(){return true});B.style("fill",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()})}if(c)B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e,t){return s(c?e.y1:0)}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(e.y+(c?e.y0:0))-s(c?e.y0:0)),1)}).attr("x",function(t,n){return c?0:t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/(c?1:e.length));else B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("x",function(t,n){return t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/e.length).attr("y",function(e,t){return a(e,t)<0?s(0):s(0)-s(a(e,t))<1?s(0)-1:s(a(e,t))||0}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(a(e,t))-s(0)),1)||0});T=i.copy();N=s.copy()});return C}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=d3.scale.ordinal(),s=d3.scale.linear(),o=Math.floor(Math.random()*1e4),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=true,c=false,h="zero",p=e.utils.defaultColor(),d=false,v=null,m,g=1200,y,b,w,E,S=.1,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var T,N;C.dispatch=x;C.options=e.utils.optionsFunc.bind(C);C.x=function(e){if(!arguments.length)return u;u=e;return C};C.y=function(e){if(!arguments.length)return a;a=e;return C};C.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return C};C.width=function(e){if(!arguments.length)return n;n=e;return C};C.height=function(e){if(!arguments.length)return r;r=e;return C};C.xScale=function(e){if(!arguments.length)return i;i=e;return C};C.yScale=function(e){if(!arguments.length)return s;s=e;return C};C.xDomain=function(e){if(!arguments.length)return y;y=e;return C};C.yDomain=function(e){if(!arguments.length)return b;b=e;return C};C.xRange=function(e){if(!arguments.length)return w;w=e;return C};C.yRange=function(e){if(!arguments.length)return E;E=e;return C};C.forceY=function(e){if(!arguments.length)return f;f=e;return C};C.stacked=function(e){if(!arguments.length)return c;c=e;return C};C.stackOffset=function(e){if(!arguments.length)return h;h=e;return C};C.clipEdge=function(e){if(!arguments.length)return l;l=e;return C};C.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return C};C.barColor=function(t){if(!arguments.length)return v;v=e.utils.getColor(t);return C};C.disabled=function(e){if(!arguments.length)return m;m=e;return C};C.id=function(e){if(!arguments.length)return o;o=e;return C};C.hideable=function(e){if(!arguments.length)return d;d=e;return C};C.delay=function(e){if(!arguments.length)return g;g=e;return C};C.groupSpacing=function(e){if(!arguments.length)return S;S=e;return C};return C};e.models.multiBarChart=function(){"use strict";function M(e){e.each(function(e){var h=d3.select(this),E=this;var _=(u||parseInt(h.style("width"))||960)-o.left-o.right,D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom;M.update=function(){h.transition().duration(A).call(M)};M.container=this;if(w=="right")_=_-250;T.disabled=e.map(function(e){return!!e.disabled});if(!N){var P;N={};for(P in T){if(T[P]instanceof Array)N[P]=T[P].slice(0);else N[P]=T[P]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var H=h.selectAll(".nv-noData").data([C]);H.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");H.attr("x",o.left+_/2).attr("y",o.top+D/2).text(function(e){return e});return M}else{h.selectAll(".nv-noData").remove()}S=t.xScale();x=t.yScale();var B=h.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]);var j=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g");var F=B.select("g");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-barsWrap");j.append("g").attr("class","nv-legendWrap");j.append("g").attr("class","nv-controlsWrap");if(c){i.width(_-L());if(t.barColor())e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});F.select(".nv-legendWrap").datum(e).call(i);if(o.top!=i.height()){o.top=i.height();D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom}if(w=="right"){F.select(".nv-legendWrap").attr("transform","translate("+_+","+(-o.top+20+30)+")")}else{F.select(".nv-legendWrap").attr("transform","translate("+L()+","+ -o.top+")")}}if(l){var I=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(L()).color(["#444","#444","#444"]);F.select(".nv-controlsWrap").datum(I).call(s);if(w=="right"){F.select(".nv-controlsWrap").attr("transform","translate("+_+","+(-o.top+20)+")")}else{F.select(".nv-controlsWrap").attr("transform","translate("+0+","+ -o.top+")")}}B.attr("transform","translate("+o.left+","+o.top+")");if(v){F.select(".nv-y.nv-axis").attr("transform","translate("+_+",0)")}t.disabled(e.map(function(e){return e.disabled})).width(_).height(D).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var q=F.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));q.transition().call(t);if(p){n.scale(S).ticks(_/100).tickSize(-D,0);F.select(".nv-x.nv-axis").attr("transform","translate(0,"+x.range()[0]+")");F.select(".nv-x.nv-axis").transition().call(n);var R=F.select(".nv-x.nv-axis > g").selectAll("g");R.selectAll("line, text").style("opacity",1);if(g){var U=function(e,t){return"translate("+e+","+t+")"};var z=5,W=17;R.selectAll("text").attr("transform",function(e,t,n){return U(0,n%2==0?z:W)});var X=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;F.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){return U(0,t===0||X%2!==0?W:z)})}if(m)R.filter(function(t,n){return n%Math.ceil(e[0].values.length/(_/100))!==0}).selectAll("text, line").style("opacity",0);if(y)R.selectAll(".tick text").attr("transform","rotate("+y+" 0,0)").style("text-anchor",y>0?"start":"end");F.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}if(d){r.scale(x).ticks(D/36).tickSize(-_,0);F.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){T=e;k.stateChange(T);M.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;I=I.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}T.stacked=t.stacked();k.stateChange(T);M.update()});k.on("tooltipShow",function(e){if(b)O(e,E.parentNode)});k.on("changeState",function(n){if(typeof n.disabled!=="undefined"){e.forEach(function(e,t){e.disabled=n.disabled[t]});T.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);T.stacked=n.stacked}M.update()})});return M}var t=e.models.multiBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend();var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=true,d=true,v=false,m=true,g=false,y=0,b=true,w="top",E=function(e,t,n,r,i,s){if(s){var o=d3.format(",.2f");return"<h3>"+e+"</h3>"+"<p>"+o(Math.pow(10,n))+" on "+t+"</p>"}else{return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"}},S,x,T={stacked:false},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=function(){return l?180:0},A=250;t.stacked(false);n.orient("bottom").tickPadding(7).highlightZero(true).showMaxMin(false).tickFormat(function(e){return e});r.orient(v?"right":"left").tickFormat(d3.format(",.1f"));s.updateState(false);var O=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=E(i.series.key,a,f,i,M,h);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(b)e.tooltip.cleanup()});M.dispatch=k;M.multibar=t;M.legend=i;M.xAxis=n;M.yAxis=r;d3.rebind(M,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","stacked","stackOffset","delay","barColor","groupSpacing");M.options=e.utils.optionsFunc.bind(M);M.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return M};M.width=function(e){if(!arguments.length)return u;u=e;return M};M.height=function(e){if(!arguments.length)return a;a=e;return M};M.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return M};M.showControls=function(e){if(!arguments.length)return l;l=e;return M};M.showLegend=function(e){if(!arguments.length)return c;c=e;return M};M.logScale=function(e){if(!arguments.length)return h;h=e;return M};M.showXAxis=function(e){if(!arguments.length)return p;p=e;return M};M.showYAxis=function(e){if(!arguments.length)return d;d=e;return M};M.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return M};M.reduceXTicks=function(e){if(!arguments.length)return m;m=e;return M};M.rotateLabels=function(e){if(!arguments.length)return y;y=e;return M};M.staggerLabels=function(e){if(!arguments.length)return g;g=e;return M};M.tooltip=function(e){if(!arguments.length)return E;E=e;return M};M.tooltips=function(e){if(!arguments.length)return b;b=e;return M};M.legendPos=function(e){if(!arguments.length)return w;w=e;return M};M.tooltipContent=function(e){if(!arguments.length)return E;E=e;return M};M.state=function(e){if(!arguments.length)return T;T=e;return M};M.defaultState=function(e){if(!arguments.length)return N;N=e;return M};M.noData=function(e){if(!arguments.length)return C;C=e;return M};M.transitionDuration=function(e){if(!arguments.length)return A;A=e;return M};return M};e.models.multiBarHorizontal=function(){"use strict";function N(e){e.each(function(e){var i=n-t.left-t.right,g=r-t.top-t.bottom,N=d3.select(this);if(p)e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(p)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i-t.size;i=i-t.size}else{t.y1=r;r=r+t.size}})});var C=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});s.domain(y||d3.merge(C).map(function(e){return e.x})).rangeBands(w||[0,g],.1);o.domain(b||d3.extent(d3.merge(C).map(function(e){return p?e.y>0?e.y1+e.y:e.y1:e.y}).concat(f)));if(d&&!p)o.range(E||[o.domain()[0]<0?v:0,i-(o.domain()[1]>0?v:0)]);else o.range(E||[0,i]);x=x||s;T=T||d3.scale.linear().domain(o.domain()).range([o(0),o(0)]);var k=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]);var L=k.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");var A=L.append("defs");var O=L.append("g");var M=k.select("g");O.append("g").attr("class","nv-groups");k.attr("transform","translate("+t.left+","+t.top+")");var _=k.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});_.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);_.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();_.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return l(e,t)}).style("stroke",function(e,t){return l(e,t)});_.transition().style("stroke-opacity",1).style("fill-opacity",.75);var D=_.selectAll("g.nv-bar").data(function(e){return e.values});D.exit().remove();var P=D.enter().append("g").attr("transform",function(t,n,r){return"translate("+T(p?t.y0:0)+","+(p?0:r*s.rangeBand()/e.length+s(u(t,n)))+")"});P.append("rect").attr("width",0).attr("height",s.rangeBand()/(p?1:e.length));D.on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[o(a(t,n)+(p?t.y0:0)),s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){S.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){S.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});P.append("text");if(d&&!p){D.select("text").attr("text-anchor",function(e,t){return a(e,t)<0?"end":"start"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return m(a(e,t))});D.transition().select("text").attr("x",function(e,t){return a(e,t)<0?-4:o(a(e,t))-o(0)+4})}else{D.selectAll("text").text("")}D.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"});if(c){if(!h)h=e.map(function(){return true});D.style("fill",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()})}if(p)D.transition().attr("transform",function(e,t){return"translate("+o(e.y1)+","+s(u(e,t))+")"}).select("rect").attr("width",function(e,t){return Math.abs(o(a(e,t)+e.y0)-o(e.y0))}).attr("height",s.rangeBand());else D.transition().attr("transform",function(t,n){return"translate("+(a(t,n)<0?o(a(t,n)):o(0))+","+(t.series*s.rangeBand()/e.length+s(u(t,n)))+")"}).select("rect").attr("height",s.rangeBand()/e.length).attr("width",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(0)),1)});x=s.copy();T=o.copy()});return N}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=null,h,p=false,d=false,v=60,m=d3.format(",.2f"),g=1200,y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var x,T;N.dispatch=S;N.options=e.utils.optionsFunc.bind(N);N.x=function(e){if(!arguments.length)return u;u=e;return N};N.y=function(e){if(!arguments.length)return a;a=e;return N};N.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return N};N.width=function(e){if(!arguments.length)return n;n=e;return N};N.height=function(e){if(!arguments.length)return r;r=e;return N};N.xScale=function(e){if(!arguments.length)return s;s=e;return N};N.yScale=function(e){if(!arguments.length)return o;o=e;return N};N.xDomain=function(e){if(!arguments.length)return y;y=e;return N};N.yDomain=function(e){if(!arguments.length)return b;b=e;return N};N.xRange=function(e){if(!arguments.length)return w;w=e;return N};N.yRange=function(e){if(!arguments.length)return E;E=e;return N};N.forceY=function(e){if(!arguments.length)return f;f=e;return N};N.stacked=function(e){if(!arguments.length)return p;p=e;return N};N.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return N};N.barColor=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);return N};N.disabled=function(e){if(!arguments.length)return h;h=e;return N};N.id=function(e){if(!arguments.length)return i;i=e;return N};N.delay=function(e){if(!arguments.length)return g;g=e;return N};N.showValues=function(e){if(!arguments.length)return d;d=e;return N};N.valueFormat=function(e){if(!arguments.length)return m;m=e;return N};N.valuePadding=function(e){if(!arguments.length)return v;v=e;return N};return N};e.models.multiBarHorizontalChart=function(){"use strict";function C(e){e.each(function(h){var p=d3.select(this),m=this;var k=(u||parseInt(p.style("width"))||960)-o.left-o.right,L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom;C.update=function(){p.transition().duration(T).call(C)};C.container=this;if(v=="right")k=k-250;b.disabled=h.map(function(e){return!!e.disabled});if(!w){var A;w={};for(A in b){if(b[A]instanceof Array)w[A]=b[A].slice(0);else w[A]=b[A]}}if(!h||!h.length||!h.filter(function(e){return e.values.length}).length){var O=p.selectAll(".nv-noData").data([E]);O.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");O.attr("x",o.left+k/2).attr("y",o.top+L/2).text(function(e){return e});return C}else{p.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var M=p.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([h]);var _=M.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g");var D=M.select("g");_.append("g").attr("class","nv-x nv-axis");_.append("g").attr("class","nv-y nv-axis");_.append("g").attr("class","nv-barsWrap");_.append("g").attr("class","nv-legendWrap");_.append("g").attr("class","nv-controlsWrap");if(c){i.width(k-x());if(t.barColor())h.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});D.select(".nv-legendWrap").datum(h).call(i);if(o.top!=i.height()){o.top=i.height();L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom}if(v=="right"){D.select(".nv-legendWrap").attr("transform","translate("+x()+","+20+")")}else{D.select(".nv-legendWrap").attr("transform","translate("+x()+","+ -o.top+")")}}if(l){var P=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(x()).color(["#444","#444","#444"]);D.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+ -o.top+")").call(s)}M.attr("transform","translate("+o.left+","+o.top+")");t.disabled(h.map(function(e){return e.disabled})).width(k).height(L).color(h.map(function(e,t){return e.color||f(e,t)}).filter(function(e,t){return!h[t].disabled}));var H=D.select(".nv-barsWrap").datum(h.filter(function(e){return!e.disabled}));H.transition().call(t);n.scale(g).ticks(L/24).tickSize(-k,0);D.select(".nv-x.nv-axis").transition().call(n);var B=D.select(".nv-x.nv-axis").selectAll("g");B.selectAll("line, text").style("opacity",1);r.scale(y).ticks(k/100).tickSize(-L,0);D.select(".nv-y.nv-axis").attr("transform","translate(0,"+L+")");D.select(".nv-y.nv-axis").transition().call(r);i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);C.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;P=P.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}b.stacked=t.stacked();S.stateChange(b);C.update()});S.on("tooltipShow",function(e){if(d)N(e,m.parentNode)});S.on("changeState",function(n){if(typeof n.disabled!=="undefined"){h.forEach(function(e,t){e.disabled=n.disabled[t]});b.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);b.stacked=n.stacked}e.call(C)})});return C}var t=e.models.multiBarHorizontal(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend().height(30),s=e.models.legend().height(30);var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=false,d=true,v="top",m=function(e,t,n,i,s,o){if(o){return"<h3>"+e+" - "+t+"</h3>"+"<p>"+r.tickFormat()(Math.pow(10,n))+"</p>"}else{return"<h3>"+e+" - "+t+"</h3>"+"<p>"+n+"</p>"}},g,y,b={stacked:p},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=function(){return l?180:0},T=250;t.stacked(p);n.orient("left").tickPadding(5).highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient("bottom").tickFormat(d3.format(",.1f"));s.updateState(false);var N=function(i,s){var o=0;if(i.pos[0]>=200)o=200;else o=i.pos[0];if(h)l=t.y()(i.point,i.pointIndex);else l=r.tickFormat()(t.y()(i.point,i.pointIndex));var u=o+(s.offsetLeft||0),a=i.pos[1]+(s.offsetTop||0),f=n.tickFormat()(t.x()(i.point,i.pointIndex)),l=r.tickFormat()(t.y()(i.point,i.pointIndex)),c=m(i.series.key,f,l,i,C,h);e.tooltip.show([u,a],c,i.value<0?"e":"w",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});C.dispatch=S;C.multibar=t;C.legend=i;C.xAxis=n;C.yAxis=r;d3.rebind(C,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor");C.options=e.utils.optionsFunc.bind(C);C.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return C};C.width=function(e){if(!arguments.length)return u;u=e;return C};C.height=function(e){if(!arguments.length)return a;a=e;return C};C.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return C};C.showControls=function(e){if(!arguments.length)return l;l=e;return C};C.showLegend=function(e){if(!arguments.length)return c;c=e;return C};C.logScale=function(e){if(!arguments.length)return h;h=e;return C};C.tooltip=function(e){if(!arguments.length)return m;m=e;return C};C.tooltips=function(e){if(!arguments.length)return d;d=e;return C};C.legendPos=function(e){if(!arguments.length)return v;v=e;return C};C.tooltipContent=function(e){if(!arguments.length)return m;m=e;return C};C.state=function(e){if(!arguments.length)return b;b=e;return C};C.defaultState=function(e){if(!arguments.length)return w;w=e;return C};C.noData=function(e){if(!arguments.length)return E;E=e;return C};C.transitionDuration=function(e){if(!arguments.length)return T;T=e;return C};return C};e.models.multiChart=function(){"use strict";function L(e){e.each(function(e){var f=d3.select(this),c=this;L.update=function(){f.transition().call(L)};L.container=this;var h=(r||parseInt(f.style("width"))||960)-t.left-t.right,p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom;if(a=="right")h=h-250;var A=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==1});var O=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==2});var M=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==1});var _=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==2});var D=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==1});var P=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==2});var H=e.filter(function(e){return!e.disabled&&e.yAxis==1}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});var B=e.filter(function(e){return!e.disabled&&e.yAxis==2}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});l.domain(d3.extent(d3.merge(H.concat(B)),function(e){return e.x})).range([0,h]);var j=f.selectAll("g.wrap.multiChart").data([e]);var F=j.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");F.append("g").attr("class","x axis");F.append("g").attr("class","y1 axis");F.append("g").attr("class","y2 axis");F.append("g").attr("class","lines1Wrap");F.append("g").attr("class","lines2Wrap");F.append("g").attr("class","bars1Wrap");F.append("g").attr("class","bars2Wrap");F.append("g").attr("class","stack1Wrap");F.append("g").attr("class","stack2Wrap");F.append("g").attr("class","legendWrap");var I=j.select("g");if(s){N.width(h/2);I.select(".legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.yAxis==1?"":" (right axis)");return e})).call(N);if(t.top!=N.height()){t.top=N.height();p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom}if(a=="right"){I.select(".legendWrap").attr("transform","translate("+h+","+20+")")}else{I.select(".legendWrap").attr("transform","translate("+h/2+","+ -t.top+")")}}m.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="line"}));g.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="line"}));y.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="bar"}));b.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="bar"}));w.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="area"}));E.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="area"}));if(a=="right"){I.attr("transform","translate("+t.left+","+"20"+")")}else{I.attr("transform","translate("+t.left+","+t.top+")")}var q=I.select(".lines1Wrap").datum(A);var R=I.select(".bars1Wrap").datum(M);var U=I.select(".stack1Wrap").datum(D);var z=I.select(".lines2Wrap").datum(O);var W=I.select(".bars2Wrap").datum(_);var X=I.select(".stack2Wrap").datum(P);var V=D.length?D.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];var $=P.length?P.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];d.domain(d3.extent(d3.extent(d3.merge(H).concat(V),function(e){return e.y}).concat(m.forceY()))).range([0,p]);v.domain(d3.extent(d3.extent(d3.merge(B).concat($),function(e){return e.y}).concat(g.forceY()))).range([0,p]);m.yDomain(d.domain());y.yDomain(d.domain());w.yDomain(d.domain());g.yDomain(v.domain());b.yDomain(v.domain());E.yDomain(v.domain());if(D.length){d3.transition(U).call(w)}if(P.length){d3.transition(X).call(E)}if(M.length){d3.transition(R).call(y)}if(_.length){d3.transition(W).call(b)}if(A.length){d3.transition(q).call(m)}if(O.length){d3.transition(z).call(g)}S.ticks(h/100).tickSize(-p,0);I.select(".x.axis").attr("transform","translate(0,"+p+")");d3.transition(I.select(".x.axis")).call(S);x.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y1.axis")).call(x);T.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y2.axis")).call(T);I.select(".y2.axis").style("opacity",B.length?1:0).attr("transform","translate("+l.range()[1]+",0)");N.dispatch.on("stateChange",function(e){L.update()});if(u){N.dualaxis(true)}else{N.dualaxis(false)}C.on("tooltipShow",function(e){if(o)k(e,c.parentNode)})});return L}var t={top:30,right:20,bottom:50,left:60},n=d3.scale.category20().range(),r=null,i=null,s=true,o=true,u=false,a="top",f=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},l,c,h,p;var l=d3.scale.linear(),d=d3.scale.linear(),v=d3.scale.linear(),m=e.models.line().yScale(d),g=e.models.line().yScale(v),y=e.models.multiBar().stacked(false).yScale(d),b=e.models.multiBar().stacked(false).yScale(v),w=e.models.stackedArea().yScale(d),E=e.models.stackedArea().yScale(v),S=e.models.axis().scale(l).orient("bottom").tickPadding(5),x=e.models.axis().scale(d).orient("left"),T=e.models.axis().scale(v).orient("right"),N=e.models.legend().height(30),C=d3.dispatch("tooltipShow","tooltipHide");var k=function(t,n){var r=t.pos[0]+(n.offsetLeft||0),i=t.pos[1]+(n.offsetTop||0),s=S.tickFormat()(m.x()(t.point,t.pointIndex)),o=(t.series.yAxis==2?T:x).tickFormat()(m.y()(t.point,t.pointIndex)),u=f(t.series.key,s,o,t,L);e.tooltip.show([r,i],u,undefined,undefined,n.offsetParent)};m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});y.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});y.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});b.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});b.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});w.dispatch.on("tooltipShow",function(e){if(!Math.round(w.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});w.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});E.dispatch.on("tooltipShow",function(e){if(!Math.round(E.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});E.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});C.on("tooltipHide",function(){if(o)e.tooltip.cleanup()});L.dispatch=C;L.lines1=m;L.lines2=g;L.bars1=y;L.bars2=b;L.stack1=w;L.stack2=E;L.xAxis=S;L.yAxis1=x;L.yAxis2=T;L.options=e.utils.optionsFunc.bind(L);L.x=function(e){if(!arguments.length)return getX;getX=e;m.x(e);y.x(e);return L};L.y=function(e){if(!arguments.length)return getY;getY=e;m.y(e);y.y(e);return L};L.yDomain1=function(e){if(!arguments.length)return h;h=e;return L};L.yDomain2=function(e){if(!arguments.length)return p;p=e;return L};L.margin=function(e){if(!arguments.length)return t;t=e;return L};L.width=function(e){if(!arguments.length)return r;r=e;return L};L.height=function(e){if(!arguments.length)return i;i=e;return L};L.color=function(e){if(!arguments.length)return n;n=e;N.color(e);return L};L.showLegend=function(e){if(!arguments.length)return s;s=e;return L};L.tooltips=function(e){if(!arguments.length)return o;o=e;return L};L.dualaxis=function(e){if(!arguments.length)return u;u=e;return L};L.legendPos=function(e){if(!arguments.length)return a;a=e;return L};L.tooltipContent=function(e){if(!arguments.length)return f;f=e;return L};return L};e.models.ohlcBar=function(){"use strict";function x(e){e.each(function(e){var g=n-t.left-t.right,x=r-t.top-t.bottom,T=d3.select(this);s.domain(y||d3.extent(e[0].values.map(u).concat(p)));if(v)s.range(w||[g*.5/e[0].values.length,g*(e[0].values.length-.5)/e[0].values.length]);else s.range(w||[0,g]);o.domain(b||[d3.min(e[0].values.map(h).concat(d)),d3.max(e[0].values.map(c).concat(d))]).range(E||[x,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar");var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-ticks");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",g).attr("height",x);A.attr("clip-path",m?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-ticks").selectAll(".nv-tick").data(function(e){return e});O.exit().remove();var M=O.enter().append("path").attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"}).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({point:t,series:e[0],pos:[s(u(t,n)),o(a(t,n))],pointIndex:n,seriesIndex:0,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({point:t,series:e[0],pointIndex:n,seriesIndex:0,e:d3.event})}).on("click",function(e,t){S.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){S.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t});d3.transition(O).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"})});return x}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=function(e){return e.open},l=function(e){return e.close},c=function(e){return e.high},h=function(e){return e.low},p=[],d=[],v=false,m=true,g=e.utils.defaultColor(),y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");x.dispatch=S;x.options=e.utils.optionsFunc.bind(x);x.x=function(e){if(!arguments.length)return u;u=e;return x};x.y=function(e){if(!arguments.length)return a;a=e;return x};x.open=function(e){if(!arguments.length)return f;f=e;return x};x.close=function(e){if(!arguments.length)return l;l=e;return x};x.high=function(e){if(!arguments.length)return c;c=e;return x};x.low=function(e){if(!arguments.length)return h;h=e;return x};x.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return x};x.width=function(e){if(!arguments.length)return n;n=e;return x};x.height=function(e){if(!arguments.length)return r;r=e;return x};x.xScale=function(e){if(!arguments.length)return s;s=e;return x};x.yScale=function(e){if(!arguments.length)return o;o=e;return x};x.xDomain=function(e){if(!arguments.length)return y;y=e;return x};x.yDomain=function(e){if(!arguments.length)return b;b=e;return x};x.xRange=function(e){if(!arguments.length)return w;w=e;return x};x.yRange=function(e){if(!arguments.length)return E;E=e;return x};x.forceX=function(e){if(!arguments.length)return p;p=e;return x};x.forceY=function(e){if(!arguments.length)return d;d=e;return x};x.padData=function(e){if(!arguments.length)return v;v=e;return x};x.clipEdge=function(e){if(!arguments.length)return m;m=e;return x};x.color=function(t){if(!arguments.length)return g;g=e.utils.getColor(t);return x};x.id=function(e){if(!arguments.length)return i;i=e;return x};return x};e.models.pie=function(){"use strict";function E(e){e.each(function(e){function P(e){var t=(e.startAngle+e.endAngle)*90/Math.PI-90;return t>90?t-180:t}function H(e){e.endAngle=isNaN(e.endAngle)?0:e.endAngle;e.startAngle=isNaN(e.startAngle)?0:e.startAngle;if(!v)e.innerRadius=0;var t=d3.interpolate(this._current,e);this._current=t(0);return function(e){return L(t(e))}}function B(e){e.innerRadius=0;var t=d3.interpolate({startAngle:0,endAngle:0},e);return function(e){return L(t(e))}}var o=n-t.left-t.right,f=r-t.top-t.bottom,E=Math.min(o,f)/2,S=E-E/5,x=d3.select(this);var T=x.selectAll(".nv-wrap.nv-pie").data(e);var N=T.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u);var C=N.append("g");var k=T.select("g");C.append("g").attr("class","nv-pie");T.attr("transform","translate("+t.left+","+t.top+")");k.select(".nv-pie").attr("transform","translate("+o/2+","+f/2+")");x.on("click",function(e,t){w.chartClick({data:e,index:t,pos:d3.event,id:u})});var L=d3.svg.arc().outerRadius(S);if(g)L.startAngle(g);if(y)L.endAngle(y);if(v)L.innerRadius(E*b);var A=d3.layout.pie().sort(null).value(function(e){return e.disabled?0:s(e)});var O=T.select(".nv-pie").selectAll(".nv-slice").data(A);O.exit().remove();var M=O.enter().append("g").attr("class","nv-slice").on("mouseover",function(e,t){d3.select(this).classed("hover",true);w.elementMouseover({label:i(e.data),value:s(e.data),point:e.data,pointIndex:t,pos:[d3.event.pageX,d3.event.pageY],id:u})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);w.elementMouseout({label:i(e.data),value:s(e.data),point:e.data,index:t,id:u})}).on("click",function(e,t){w.elementClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()}).on("dblclick",function(e,t){w.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()});O.attr("fill",function(e,t){return a(e,t)}).attr("stroke",function(e,t){return a(e,t)});var _=M.append("path").each(function(e){this._current=e});d3.transition(O.select("path")).attr("d",L).attrTween("d",H);if(l){var D=d3.svg.arc().innerRadius(0);if(c){D=L}if(h){D=d3.svg.arc().outerRadius(L.outerRadius())}M.append("g").classed("nv-label",true).each(function(e,t){var n=d3.select(this);n.attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3);n.append("text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});O.select(".nv-label").transition().attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});O.each(function(e,t){var n=d3.select(this);n.select(".nv-label text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").text(function(e,t){var n=(e.endAngle-e.startAngle)/(2*Math.PI);var r={key:i(e.data),value:s(e.data),percent:d3.format("%")(n)};return e.value&&n>d?r[p]:""});var r=n.select("text").node().getBBox();n.select(".nv-label rect").attr("width",r.width+10).attr("height",r.height+10).attr("transform",function(){return"translate("+[r.x-5,r.y-5]+")"})})}});return E}var t={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},s=function(e){return e.y},o=function(e){return e.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=true,c=true,h=false,p="key",d=.02,v=false,m=false,g=false,y=false,b=.5,w=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");E.dispatch=w;E.options=e.utils.optionsFunc.bind(E);E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.values=function(t){e.log("pie.values() is no longer supported.");return E};E.x=function(e){if(!arguments.length)return i;i=e;return E};E.y=function(e){if(!arguments.length)return s;s=d3.functor(e);return E};E.description=function(e){if(!arguments.length)return o;o=e;return E};E.showLabels=function(e){if(!arguments.length)return l;l=e;return E};E.labelSunbeamLayout=function(e){if(!arguments.length)return m;m=e;return E};E.donutLabelsOutside=function(e){if(!arguments.length)return h;h=e;return E};E.pieLabelsOutside=function(e){if(!arguments.length)return c;c=e;return E};E.labelType=function(e){if(!arguments.length)return p;p=e;p=p||"key";return E};E.donut=function(e){if(!arguments.length)return v;v=e;return E};E.donutRatio=function(e){if(!arguments.length)return b;b=e;return E};E.startAngle=function(e){if(!arguments.length)return g;g=e;return E};E.endAngle=function(e){if(!arguments.length)return y;y=e;return E};E.id=function(e){if(!arguments.length)return u;u=e;return E};E.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);return E};E.valueFormat=function(e){if(!arguments.length)return f;f=e;return E};E.labelThreshold=function(e){if(!arguments.length)return d;d=e;return E};return E};e.models.pieChart=function(){"use strict";function v(e){e.each(function(e){var u=d3.select(this),a=this;var f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)};v.container=this;l.disabled=e.map(function(e){return!!e.disabled});if(!c){var m;c={};for(m in l){if(l[m]instanceof Array)c[m]=l[m].slice(0);else c[m]=l[m]}}if(!e||!e.length){var g=u.selectAll(".nv-noData").data([h]);g.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");g.attr("x",r.left+f/2).attr("y",r.top+d/2).text(function(e){return e});return v}else{u.selectAll(".nv-noData").remove()}var y=u.selectAll("g.nv-wrap.nv-pieChart").data([e]);var b=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g");var w=y.select("g");b.append("g").attr("class","nv-pieWrap");b.append("g").attr("class","nv-legendWrap");if(o){n.width(f).key(t.x());y.select(".nv-legendWrap").datum(e).call(n);if(r.top!=n.height()){r.top=n.height();d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom}y.select(".nv-legendWrap").attr("transform","translate(0,"+ -r.top+")")}y.attr("transform","translate("+r.left+","+r.top+")");t.width(f).height(d);var E=w.select(".nv-pieWrap").datum([e]);d3.transition(E).call(t);n.dispatch.on("stateChange",function(e){l=e;p.stateChange(l);v.update()});t.dispatch.on("elementMouseout.tooltip",function(e){p.tooltipHide(e)});p.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});l.disabled=t.disabled}v.update()})});return v}var t=e.models.pie(),n=e.models.legend();var r={top:30,right:20,bottom:20,left:20},i=null,s=null,o=true,u=e.utils.defaultColor(),a=true,f=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+t+"</p>"},l={},c=null,h="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");var d=function(n,r){var i=t.description()(n.point)||t.x()(n.point);var s=n.pos[0]+(r&&r.offsetLeft||0),o=n.pos[1]+(r&&r.offsetTop||0),u=t.valueFormat()(t.y()(n.point)),a=f(i,u,n,v);e.tooltip.show([s,o],a,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+r.left,e.pos[1]+r.top];p.tooltipShow(e)});p.on("tooltipShow",function(e){if(a)d(e)});p.on("tooltipHide",function(){if(a)e.tooltip.cleanup()});v.legend=n;v.dispatch=p;v.pie=t;d3.rebind(v,t,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","labelType","donut","donutRatio","labelThreshold");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return r;r.top=typeof e.top!="undefined"?e.top:r.top;r.right=typeof e.right!="undefined"?e.right:r.right;r.bottom=typeof e.bottom!="undefined"?e.bottom:r.bottom;r.left=typeof e.left!="undefined"?e.left:r.left;return v};v.width=function(e){if(!arguments.length)return i;i=e;return v};v.height=function(e){if(!arguments.length)return s;s=e;return v};v.color=function(r){if(!arguments.length)return u;u=e.utils.getColor(r);n.color(u);t.color(u);return v};v.showLegend=function(e){if(!arguments.length)return o;o=e;return v};v.tooltips=function(e){if(!arguments.length)return a;a=e;return v};v.tooltipContent=function(e){if(!arguments.length)return f;f=e;return v};v.state=function(e){if(!arguments.length)return l;l=e;return v};v.defaultState=function(e){if(!arguments.length)return c;c=e;return v};v.noData=function(e){if(!arguments.length)return h;h=e;return v};return v};e.models.scatter=function(){"use strict";function I(q){q.each(function(I){function Q(){if(!g)return false;var e;var i=d3.merge(I.map(function(e,t){return e.values.map(function(e,n){var r=f(e,n);var i=l(e,n);return[o(r)+Math.random()*1e-7,u(i)+Math.random()*1e-7,t,n,e]}).filter(function(e,t){return b(e[4],t)})}));if(D===true){if(x){var a=X.select("defs").selectAll(".nv-point-clips").data([s]).enter();a.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+s);var c=X.select("#nv-points-clip-"+s).selectAll("circle").data(i);c.enter().append("circle").attr("r",T);c.exit().remove();c.attr("cx",function(e){return e[0]}).attr("cy",function(e){return e[1]});X.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+s+")")}if(i.length){i.push([o.range()[0]-20,u.range()[0]-20,null,null]);i.push([o.range()[1]+20,u.range()[1]+20,null,null]);i.push([o.range()[0]-20,u.range()[0]+20,null,null]);i.push([o.range()[1]+20,u.range()[1]-20,null,null])}var h=d3.geom.polygon([[-10,-10],[-10,r+10],[n+10,r+10],[n+10,-10]]);var p=d3.geom.voronoi(i).map(function(e,t){return{data:h.clip(e),series:i[t][2],point:i[t][3]}});var d=X.select(".nv-point-paths").selectAll("path").data(p);d.enter().append("path").attr("class",function(e,t){return"nv-path-"+t});d.exit().remove();d.attr("d",function(e){if(e.data.length===0)return"M 0 0";else return"M"+e.data.join("L")+"Z"});var v=function(e,n){if(F)return 0;var r=I[e.series];if(typeof r==="undefined")return;var i=r.values[e.point];n({point:i,series:r,pos:[o(f(i,e.point))+t.left,u(l(i,e.point))+t.top],seriesIndex:e.series,pointIndex:e.point})};d.on("click",function(e){v(e,_.elementClick)}).on("mouseover",function(e){v(e,_.elementMouseover)}).on("mouseout",function(e,t){v(e,_.elementMouseout)})}else{X.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementClick({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseover",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementMouseover({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseout",function(e,t){if(F||!I[e.series])return 0;var n=I[e.series],r=n.values[t];_.elementMouseout({point:r,series:n,seriesIndex:e.series,pointIndex:t})})}F=false}var q=n-t.left-t.right,R=r-t.top-t.bottom,U=d3.select(this);I.forEach(function(e,t){e.values.forEach(function(e){e.series=t})});var W=N&&C&&A?[]:d3.merge(I.map(function(e){return e.values.map(function(e,t){return{x:f(e,t),y:l(e,t),size:c(e,t)}})}));o.domain(N||d3.extent(W.map(function(e){return e.x}).concat(d)));if(w&&I[0])o.range(k||[(q*E+q)/(2*I[0].values.length),q-q*(1+E)/(2*I[0].values.length)]);else o.range(k||[0,q]);u.domain(C||d3.extent(W.map(function(e){return e.y}).concat(v))).range(L||[R,0]);a.domain(A||d3.extent(W.map(function(e){return e.size}).concat(m))).range(O||[16,256]);if(o.domain()[0]===o.domain()[1]||u.domain()[0]===u.domain()[1])M=true;if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]-o.domain()[0]*.01,o.domain()[1]+o.domain()[1]*.01]):o.domain([-1,1]);if(u.domain()[0]===u.domain()[1])u.domain()[0]?u.domain([u.domain()[0]-u.domain()[0]*.01,u.domain()[1]+u.domain()[1]*.01]):u.domain([-1,1]);if(isNaN(o.domain()[0])){o.domain([-1,1])}if(isNaN(u.domain()[0])){u.domain([-1,1])}P=P||o;H=H||u;B=B||a;var X=U.selectAll("g.nv-wrap.nv-scatter").data([I]);var V=X.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+s+(M?" nv-single-point":""));var $=V.append("defs");var J=V.append("g");var K=X.select("g");J.append("g").attr("class","nv-groups");J.append("g").attr("class","nv-point-paths");X.attr("transform","translate("+t.left+","+t.top+")");$.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");X.select("#nv-edge-clip-"+s+" rect").attr("width",q).attr("height",R);K.attr("clip-path",S?"url(#nv-edge-clip-"+s+")":"");F=true;var G=X.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);G.exit().remove();G.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});G.transition().style("fill",function(e,t){return i(e,t)}).style("stroke",function(e,t){return i(e,t)}).style("stroke-opacity",1).style("fill-opacity",.5);if(p){var Y=G.selectAll("circle.nv-point").data(function(e){return e.values},y);Y.enter().append("circle").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("cx",function(t,n){return e.utils.NaNtoZero(P(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(H(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)});Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)})}else{var Y=G.selectAll("path.nv-point").data(function(e){return e.values});Y.enter().append("path").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("transform",function(e,t){return"translate("+P(f(e,t))+","+H(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}));Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}))}clearTimeout(j);j=setTimeout(Q,300);P=o.copy();H=u.copy();B=a.copy()});return I}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=d3.scale.linear(),u=d3.scale.linear(),a=d3.scale.linear(),f=function(e){return e.x},l=function(e){return e.y},c=function(e){return e.size||1},h=function(e){return e.shape||"circle"},p=true,d=[],v=[],m=[],g=true,y=null,b=function(e){return!e.notActive},w=false,E=.1,S=false,x=true,T=function(){return 25},N=null,C=null,k=null,L=null,A=null,O=null,M=false,_=d3.dispatch("elementClick","elementMouseover","elementMouseout"),D=true;var P,H,B,j,F=false;I.clearHighlights=function(){d3.selectAll(".nv-chart-"+s+" .nv-point.hover").classed("hover",false)};I.highlightPoint=function(e,t,n){d3.select(".nv-chart-"+s+" .nv-series-"+e+" .nv-point-"+t).classed("hover",n)};_.on("elementMouseover.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,true)});_.on("elementMouseout.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,false)});I.dispatch=_;I.options=e.utils.optionsFunc.bind(I);I.x=function(e){if(!arguments.length)return f;f=d3.functor(e);return I};I.y=function(e){if(!arguments.length)return l;l=d3.functor(e);return I};I.size=function(e){if(!arguments.length)return c;c=d3.functor(e);return I};I.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return I};I.width=function(e){if(!arguments.length)return n;n=e;return I};I.height=function(e){if(!arguments.length)return r;r=e;return I};I.xScale=function(e){if(!arguments.length)return o;o=e;return I};I.yScale=function(e){if(!arguments.length)return u;u=e;return I};I.zScale=function(e){if(!arguments.length)return a;a=e;return I};I.xDomain=function(e){if(!arguments.length)return N;N=e;return I};I.yDomain=function(e){if(!arguments.length)return C;C=e;return I};I.sizeDomain=function(e){if(!arguments.length)return A;A=e;return I};I.xRange=function(e){if(!arguments.length)return k;k=e;return I};I.yRange=function(e){if(!arguments.length)return L;L=e;return I};I.sizeRange=function(e){if(!arguments.length)return O;O=e;return I};I.forceX=function(e){if(!arguments.length)return d;d=e;return I};I.forceY=function(e){if(!arguments.length)return v;v=e;return I};I.forceSize=function(e){if(!arguments.length)return m;m=e;return I};I.interactive=function(e){if(!arguments.length)return g;g=e;return I};I.pointKey=function(e){if(!arguments.length)return y;y=e;return I};I.pointActive=function(e){if(!arguments.length)return b;b=e;return I};I.padData=function(e){if(!arguments.length)return w;w=e;return I};I.padDataOuter=function(e){if(!arguments.length)return E;E=e;return I};I.clipEdge=function(e){if(!arguments.length)return S;S=e;return I};I.clipVoronoi=function(e){if(!arguments.length)return x;x=e;return I};I.useVoronoi=function(e){if(!arguments.length)return D;D=e;if(D===false){x=false}return I};I.clipRadius=function(e){if(!arguments.length)return T;T=e;return I};I.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return I};I.shape=function(e){if(!arguments.length)return h;h=e;return I};I.onlyCircles=function(e){if(!arguments.length)return p;p=e;return I};I.id=function(e){if(!arguments.length)return s;s=e;return I};I.singlePoint=function(e){if(!arguments.length)return M;M=e;return I};return I};e.models.scatterChart=function(){"use strict";function F(e){e.each(function(e){function K(){if(T){X.select(".nv-point-paths").style("pointer-events","all");return false}X.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(x).focus(i[0]);p.distortion(x).focus(i[1]);X.select(".nv-scatterWrap").call(t);if(b)X.select(".nv-x.nv-axis").call(n);if(w)X.select(".nv-y.nv-axis").call(r);X.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);X.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var C=d3.select(this),k=this;var L=(f||parseInt(C.style("width"))||960)-a.left-a.right,I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom;F.update=function(){C.transition().duration(D).call(F)};F.container=this;A.disabled=e.map(function(e){return!!e.disabled});if(!O){var q;O={};for(q in A){if(A[q]instanceof Array)O[q]=A[q].slice(0);else O[q]=A[q]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=C.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",a.left+L/2).attr("y",a.top+I/2).text(function(e){return e});return F}else{C.selectAll(".nv-noData").remove()}P=P||h;H=H||p;var U=C.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var z=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var W=z.append("g");var X=U.select("g");W.append("rect").attr("class","nvd3 nv-background");W.append("g").attr("class","nv-x nv-axis");W.append("g").attr("class","nv-y nv-axis");W.append("g").attr("class","nv-scatterWrap");W.append("g").attr("class","nv-distWrap");W.append("g").attr("class","nv-legendWrap");W.append("g").attr("class","nv-controlsWrap");if(y){var V=S?L/2:L;i.width(V);U.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom}U.select(".nv-legendWrap").attr("transform","translate("+(L-V)+","+ -a.top+")")}if(S){s.width(180).color(["#444"]);X.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+ -a.top+")").call(s)}U.attr("transform","translate("+a.left+","+a.top+")");if(E){X.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}t.width(L).height(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));if(d!==0)t.xDomain(null);if(v!==0)t.yDomain(null);U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(d!==0){var $=h.domain()[1]-h.domain()[0];t.xDomain([h.domain()[0]-d*$,h.domain()[1]+d*$])}if(v!==0){var J=p.domain()[1]-p.domain()[0];t.yDomain([p.domain()[0]-v*J,p.domain()[1]+v*J])}if(v!==0||d!==0){U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t)}if(b){n.scale(h).ticks(n.ticks()&&n.ticks().length?n.ticks():L/100).tickSize(-I,0);X.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(w){r.scale(p).ticks(r.ticks()&&r.ticks().length?r.ticks():I/36).tickSize(-L,0);X.select(".nv-y.nv-axis").call(r)}if(m){o.getData(t.x()).scale(h).width(L).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionX");X.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(g){u.getData(t.y()).scale(p).width(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionY");X.select(".nv-distributionY").attr("transform","translate("+(E?L:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){X.select(".nv-background").attr("width",L).attr("height",I);X.select(".nv-background").on("mousemove",K);X.select(".nv-background").on("click",function(){T=!T});t.dispatch.on("elementClick.freezeFisheye",function(){T=!T})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;x=e.disabled?0:2.5;X.select(".nv-background").style("pointer-events",e.disabled?"none":"all");X.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(x).focus(0);p.distortion(x).focus(0);X.select(".nv-scatterWrap").call(t);X.select(".nv-x.nv-axis").call(n);X.select(".nv-y.nv-axis").call(r)}else{T=false}F.update()});i.dispatch.on("stateChange",function(e){A.disabled=e.disabled;M.stateChange(A);F.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",function(t,n){return e.pos[1]-I});d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];M.tooltipShow(e)});M.on("tooltipShow",function(e){if(N)B(e,k.parentNode)});M.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});A.disabled=t.disabled}F.update()});P=h.copy();H=p.copy()});return F}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=0,v=0,m=false,g=false,y=true,b=true,w=true,E=false,S=!!d3.fisheye,x=0,T=false,N=true,C=function(e,t,n){return"<strong>"+t+"</strong>"},k=function(e,t,n){return"<strong>"+n+"</strong>"},L=null,A={},O=null,M=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),_="No Data Available.",D=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(E?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var P,H;var B=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(C!=null)e.tooltip.show([f,l],C(i.series.key,v,m,i,F),"n",1,s,"x-nvtooltip");if(k!=null)e.tooltip.show([c,d],k(i.series.key,v,m,i,F),"e",1,s,"y-nvtooltip");if(L!=null)e.tooltip.show([o,u],L(i.series.key,v,m,i,F),i.value<0?"n":"s",null,s)};var j=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){M.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});M.on("tooltipHide",function(){if(N)e.tooltip.cleanup()});F.dispatch=M;F.scatter=t;F.legend=i;F.controls=s;F.xAxis=n;F.yAxis=r;F.distX=o;F.distY=u;d3.rebind(F,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");F.options=e.utils.optionsFunc.bind(F);F.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return F};F.width=function(e){if(!arguments.length)return f;f=e;return F};F.height=function(e){if(!arguments.length)return l;l=e;return F};F.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return F};F.showDistX=function(e){if(!arguments.length)return m;m=e;return F};F.showDistY=function(e){if(!arguments.length)return g;g=e;return F};F.showControls=function(e){if(!arguments.length)return S;S=e;return F};F.showLegend=function(e){if(!arguments.length)return y;y=e;return F};F.showXAxis=function(e){if(!arguments.length)return b;b=e;return F};F.showYAxis=function(e){if(!arguments.length)return w;w=e;return F};F.rightAlignYAxis=function(e){if(!arguments.length)return E;E=e;r.orient(e?"right":"left");return F};F.fisheye=function(e){if(!arguments.length)return x;x=e;return F};F.xPadding=function(e){if(!arguments.length)return d;d=e;return F};F.yPadding=function(e){if(!arguments.length)return v;v=e;return F};F.tooltips=function(e){if(!arguments.length)return N;N=e;return F};F.tooltipContent=function(e){if(!arguments.length)return L;L=e;return F};F.tooltipXContent=function(e){if(!arguments.length)return C;C=e;return F};F.tooltipYContent=function(e){if(!arguments.length)return k;k=e;return F};F.state=function(e){if(!arguments.length)return A;A=e;return F};F.defaultState=function(e){if(!arguments.length)return O;O=e;return F};F.noData=function(e){if(!arguments.length)return _;_=e;return F};F.transitionDuration=function(e){if(!arguments.length)return D;D=e;return F};return F};e.models.scatterPlusLineChart=function(){"use strict";function B(e){e.each(function(e){function $(){if(S){z.select(".nv-point-paths").style("pointer-events","all");return false}z.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(E).focus(i[0]);p.distortion(E).focus(i[1]);z.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(g)z.select(".nv-x.nv-axis").call(n);if(y)z.select(".nv-y.nv-axis").call(r);z.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);z.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var T=d3.select(this),N=this;var C=(f||parseInt(T.style("width"))||960)-a.left-a.right,j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom;B.update=function(){T.transition().duration(M).call(B)};B.container=this;k.disabled=e.map(function(e){return!!e.disabled});if(!L){var F;L={};for(F in k){if(k[F]instanceof Array)L[F]=k[F].slice(0);else L[F]=k[F]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var I=T.selectAll(".nv-noData").data([O]);I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");I.attr("x",a.left+C/2).attr("y",a.top+j/2).text(function(e){return e});return B}else{T.selectAll(".nv-noData").remove()}h=t.xScale();p=t.yScale();_=_||h;D=D||p;var q=T.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var R=q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var U=R.append("g");var z=q.select("g");U.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none");U.append("g").attr("class","nv-x nv-axis");U.append("g").attr("class","nv-y nv-axis");U.append("g").attr("class","nv-scatterWrap");U.append("g").attr("class","nv-regressionLinesWrap");U.append("g").attr("class","nv-distWrap");U.append("g").attr("class","nv-legendWrap");U.append("g").attr("class","nv-controlsWrap");q.attr("transform","translate("+a.left+","+a.top+")");if(b){z.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}if(m){i.width(C/2);q.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom}q.select(".nv-legendWrap").attr("transform","translate("+C/2+","+ -a.top+")")}if(w){s.width(180).color(["#444"]);z.select(".nv-controlsWrap").datum(H).attr("transform","translate(0,"+ -a.top+")").call(s)}t.width(C).height(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));q.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);q.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+t.id()+")");var W=q.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(e){return e});W.enter().append("g").attr("class","nv-regLines");var X=W.selectAll(".nv-regLine").data(function(e){return[e]});var V=X.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0);X.transition().attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",function(e,t){return p(h.domain()[0]*e.slope+e.intercept)}).attr("y2",function(e,t){return p(h.domain()[1]*e.slope+e.intercept)}).style("stroke",function(e,t,n){return c(e,n)}).style("stroke-opacity",function(e,t){return e.disabled||typeof e.slope==="undefined"||typeof e.intercept==="undefined"?0:1});if(g){n.scale(h).ticks(n.ticks()?n.ticks():C/100).tickSize(-j,0);z.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(y){r.scale(p).ticks(r.ticks()?r.ticks():j/36).tickSize(-C,0);z.select(".nv-y.nv-axis").call(r)}if(d){o.getData(t.x()).scale(h).width(C).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionX");z.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(v){u.getData(t.y()).scale(p).width(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionY");z.select(".nv-distributionY").attr("transform","translate("+(b?C:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){z.select(".nv-background").attr("width",C).attr("height",j);z.select(".nv-background").on("mousemove",$);z.select(".nv-background").on("click",function(){S=!S});t.dispatch.on("elementClick.freezeFisheye",function(){S=!S})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;E=e.disabled?0:2.5;z.select(".nv-background").style("pointer-events",e.disabled?"none":"all");z.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(E).focus(0);p.distortion(E).focus(0);z.select(".nv-scatterWrap").call(t);z.select(".nv-x.nv-axis").call(n);z.select(".nv-y.nv-axis").call(r)}else{S=false}B.update()});i.dispatch.on("stateChange",function(e){k=e;A.stateChange(k);B.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.pos[1]-j);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];A.tooltipShow(e)});A.on("tooltipShow",function(e){if(x)P(e,N.parentNode)});A.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});k.disabled=t.disabled}B.update()});_=h.copy();D=p.copy()});return B}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=false,v=false,m=true,g=true,y=true,b=false,w=!!d3.fisheye,E=0,S=false,x=true,T=function(e,t,n){return"<strong>"+t+"</strong>"},N=function(e,t,n){return"<strong>"+n+"</strong>"},C=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+r+"</p>"},k={},L=null,A=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),O="No Data Available.",M=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(b?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var _,D;var P=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(T!=null)e.tooltip.show([f,l],T(i.series.key,v,m,i,B),"n",1,s,"x-nvtooltip");if(N!=null)e.tooltip.show([c,d],N(i.series.key,v,m,i,B),"e",1,s,"y-nvtooltip");if(C!=null)e.tooltip.show([o,u],C(i.series.key,v,m,i.point.tooltip,i,B),i.value<0?"n":"s",null,s)};var H=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){A.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});A.on("tooltipHide",function(){if(x)e.tooltip.cleanup()});B.dispatch=A;B.scatter=t;B.legend=i;B.controls=s;B.xAxis=n;B.yAxis=r;B.distX=o;B.distY=u;d3.rebind(B,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");B.options=e.utils.optionsFunc.bind(B);B.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return B};B.width=function(e){if(!arguments.length)return f;f=e;return B};B.height=function(e){if(!arguments.length)return l;l=e;return B};B.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return B};B.showDistX=function(e){if(!arguments.length)return d;d=e;return B};B.showDistY=function(e){if(!arguments.length)return v;v=e;return B};B.showControls=function(e){if(!arguments.length)return w;w=e;return B};B.showLegend=function(e){if(!arguments.length)return m;m=e;return B};B.showXAxis=function(e){if(!arguments.length)return g;g=e;return B};B.showYAxis=function(e){if(!arguments.length)return y;y=e;return B};B.rightAlignYAxis=function(e){if(!arguments.length)return b;b=e;r.orient(e?"right":"left");return B};B.fisheye=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return x;x=e;return B};B.tooltipContent=function(e){if(!arguments.length)return C;C=e;return B};B.tooltipXContent=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipYContent=function(e){if(!arguments.length)return N;N=e;return B};B.state=function(e){if(!arguments.length)return k;k=e;return B};B.defaultState=function(e){if(!arguments.length)return L;L=e;return B};B.noData=function(e){if(!arguments.length)return O;O=e;return B};B.transitionDuration=function(e){if(!arguments.length)return M;M=e;return B};return B};e.models.sparkline=function(){"use strict";function d(e){e.each(function(e){var i=n-t.left-t.right,d=r-t.top-t.bottom,v=d3.select(this);s.domain(l||d3.extent(e,u)).range(h||[0,i]);o.domain(c||d3.extent(e,a)).range(p||[d,0]);var m=v.selectAll("g.nv-wrap.nv-sparkline").data([e]);var g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");var b=g.append("g");var w=m.select("g");m.attr("transform","translate("+t.left+","+t.top+")");var E=m.selectAll("path").data(function(e){return[e]});E.enter().append("path");E.exit().remove();E.style("stroke",function(e,t){return e.color||f(e,t)}).attr("d",d3.svg.line().x(function(e,t){return s(u(e,t))}).y(function(e,t){return o(a(e,t))}));var S=m.selectAll("circle.nv-point").data(function(e){function n(t){if(t!=-1){var n=e[t];n.pointIndex=t;return n}else{return null}}var t=e.map(function(e,t){return a(e,t)});var r=n(t.lastIndexOf(o.domain()[1])),i=n(t.indexOf(o.domain()[0])),s=n(t.length-1);return[i,r,s].filter(function(e){return e!=null})});S.enter().append("circle");S.exit().remove();S.attr("cx",function(e,t){return s(u(e,e.pointIndex))}).attr("cy",function(e,t){return o(a(e,e.pointIndex))}).attr("r",2).attr("class",function(e,t){return u(e,e.pointIndex)==s.domain()[1]?"nv-point nv-currentValue":a(e,e.pointIndex)==o.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})});return d}var t={top:2,right:0,bottom:2,left:0},n=400,r=32,i=true,s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=e.utils.getColor(["#000"]),l,c,h,p;d.options=e.utils.optionsFunc.bind(d);d.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return d};d.width=function(e){if(!arguments.length)return n;n=e;return d};d.height=function(e){if(!arguments.length)return r;r=e;return d};d.x=function(e){if(!arguments.length)return u;u=d3.functor(e);return d};d.y=function(e){if(!arguments.length)return a;a=d3.functor(e);return d};d.xScale=function(e){if(!arguments.length)return s;s=e;return d};d.yScale=function(e){if(!arguments.length)return o;o=e;return d};d.xDomain=function(e){if(!arguments.length)return l;l=e;return d};d.yDomain=function(e){if(!arguments.length)return c;c=e;return d};d.xRange=function(e){if(!arguments.length)return h;h=e;return d};d.yRange=function(e){if(!arguments.length)return p;p=e;return d};d.animate=function(e){if(!arguments.length)return i;i=e;return d};d.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);return d};return d};e.models.sparklinePlus=function(){"use strict";function v(e){e.each(function(c){function O(){if(a)return;var e=C.selectAll(".nv-hoverValue").data(u);var r=e.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);e.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove();e.attr("transform",function(e){return"translate("+s(t.x()(c[e],e))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!u.length)return;r.append("line").attr("x1",0).attr("y1",-n.top).attr("x2",0).attr("y2",b);r.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-n.top).attr("text-anchor","end").attr("dy",".9em");C.select(".nv-hoverValue .nv-xValue").text(f(t.x()(c[u[0]],u[0])));r.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-n.top).attr("text-anchor","start").attr("dy",".9em");C.select(".nv-hoverValue .nv-yValue").text(l(t.y()(c[u[0]],u[0])))}function M(){function r(e,n){var r=Math.abs(t.x()(e[0],0)-n);var i=0;for(var s=0;s<e.length;s++){if(Math.abs(t.x()(e[s],s)-n)<r){r=Math.abs(t.x()(e[s],s)-n);i=s}}return i}if(a)return;var e=d3.mouse(this)[0]-n.left;u=[r(c,Math.round(s.invert(e)))];O()}var m=d3.select(this);var g=(r||parseInt(m.style("width"))||960)-n.left-n.right,b=(i||parseInt(m.style("height"))||400)-n.top-n.bottom;v.update=function(){v(e)};v.container=this;if(!c||!c.length){var w=m.selectAll(".nv-noData").data([d]);w.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");w.attr("x",n.left+g/2).attr("y",n.top+b/2).text(function(e){return e});return v}else{m.selectAll(".nv-noData").remove()}var E=t.y()(c[c.length-1],c.length-1);s=t.xScale();o=t.yScale();var S=m.selectAll("g.nv-wrap.nv-sparklineplus").data([c]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus");var N=T.append("g");var C=S.select("g");N.append("g").attr("class","nv-sparklineWrap");N.append("g").attr("class","nv-valueWrap");N.append("g").attr("class","nv-hoverArea");S.attr("transform","translate("+n.left+","+n.top+")");var k=C.select(".nv-sparklineWrap");t.width(g).height(b);k.call(t);var L=C.select(".nv-valueWrap");var A=L.selectAll(".nv-currentValue").data([E]);A.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start");A.attr("x",g+(p?n.right:0)).attr("y",h?function(e){return o(e)}:0).style("fill",t.color()(c[c.length-1],c.length-1)).text(l(E));N.select(".nv-hoverArea").append("rect").on("mousemove",M).on("click",function(){a=!a}).on("mouseout",function(){u=[];O()});C.select(".nv-hoverArea rect").attr("transform",function(e){return"translate("+ -n.left+","+ -n.top+")"}).attr("width",g+n.left+n.right).attr("height",b+n.top)});return v}var t=e.models.sparkline();var n={top:15,right:100,bottom:10,left:50},r=null,i=null,s,o,u=[],a=false,f=d3.format(",r"),l=d3.format(",.2f"),c=true,h=true,p=false,d="No Data Available.";v.sparkline=t;d3.rebind(v,t,"x","y","xScale","yScale","color");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return v};v.width=function(e){if(!arguments.length)return r;r=e;return v};v.height=function(e){if(!arguments.length)return i;i=e;return v};v.xTickFormat=function(e){if(!arguments.length)return f;f=e;return v};v.yTickFormat=function(e){if(!arguments.length)return l;l=e;return v};v.showValue=function(e){if(!arguments.length)return c;c=e;return v};v.alignValue=function(e){if(!arguments.length)return h;h=e;return v};v.rightAlignValue=function(e){if(!arguments.length)return p;p=e;return v};v.noData=function(e){if(!arguments.length)return d;d=e;return v};return v};e.models.stackedArea=function(){"use strict";function y(e){e.each(function(e){var a=n-t.left-t.right,v=r-t.top-t.bottom,b=d3.select(this);p=m.xScale();d=m.yScale();var w=e;e=e.map(function(e,t){e.seriesIndex=t;e.values=e.values.map(function(e,n){e.index=n;e.seriesIndex=t;return e});return e});var E=e.filter(function(e){return!e.disabled});e=d3.layout.stack().order(l).offset(f).values(function(e){return e.values}).x(o).y(u).out(function(e,t,n){var r=u(e)===0?0:n;e.display={y:r,y0:t}})(E);var S=b.selectAll("g.nv-wrap.nv-stackedarea").data([e]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea");var N=T.append("defs");var C=T.append("g");var k=S.select("g");C.append("g").attr("class","nv-areaWrap");C.append("g").attr("class","nv-scatterWrap");S.attr("transform","translate("+t.left+","+t.top+")");m.width(a).height(v).x(o).y(function(e){return e.display.y+e.display.y0}).forceY([0]).color(e.map(function(e,t){return e.color||i(e,e.seriesIndex)}));var L=k.select(".nv-scatterWrap").datum(e);L.call(m);N.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");S.select("#nv-edge-clip-"+s+" rect").attr("width",a).attr("height",v);k.attr("clip-path",h?"url(#nv-edge-clip-"+s+")":"");var A=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y+e.display.y0)}).interpolate(c);var O=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y0)});var M=k.select(".nv-areaWrap").selectAll("path.nv-area").data(function(e){return e});M.enter().append("path").attr("class",function(e,t){return"nv-area nv-area-"+t}).attr("d",function(e,t){return O(e.values,e.seriesIndex)}).on("mouseover",function(e,t){d3.select(this).classed("hover",true);g.areaMouseover({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);g.areaMouseout({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("click",function(e,t){d3.select(this).classed("hover",false);g.areaClick({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})});M.exit().transition().attr("d",function(e,t){return O(e.values,t)}).remove();M.style("fill",function(e,t){return e.color||i(e,e.seriesIndex)}).style("stroke",function(e,t){return e.color||i(e,e.seriesIndex)});M.transition().attr("d",function(e,t){return A(e.values,t)});m.dispatch.on("elementMouseover.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",true)});m.dispatch.on("elementMouseout.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",false)});y.d3_stackedOffset_stackPercent=function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,a=[];for(s=0;s<n;++s){for(i=0,o=0;i<w.length;i++)o+=u(w[i].values[s]);if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)a[s]=0;return a}});return y}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=function(e){return e.x},u=function(e){return e.y},a="stack",f="zero",l="default",c="linear",h=false,p,d,v=d3.format(",.3f"),m=e.models.scatter(),g=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");m.size(2.2).sizeDomain([2.2,2.2]);m.dispatch.on("elementClick.area",function(e){g.areaClick(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],g.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});y.dispatch=g;y.scatter=m;d3.rebind(y,m,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","highlightPoint","clearHighlights");y.options=e.utils.optionsFunc.bind(y);y.x=function(e){if(!arguments.length)return o;o=d3.functor(e);return y};y.y=function(e){if(!arguments.length)return u;u=d3.functor(e);return y};y.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return y};y.width=function(e){if(!arguments.length)return n;n=e;return y};y.height=function(e){if(!arguments.length)return r;r=e;return y};y.clipEdge=function(e){if(!arguments.length)return h;h=e;return y};y.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return y};y.offset=function(e){if(!arguments.length)return f;f=e;return y};y.order=function(e){if(!arguments.length)return l;l=e;return y};y.style=function(e){if(!arguments.length)return a;a=e;switch(a){case"stack":y.offset("zero");y.order("default");break;case"stream":y.offset("wiggle");y.order("inside-out");break;case"stream-center":y.offset("silhouette");y.order("inside-out");break;case"expand":y.offset("expand");y.order("default");break;case"stack_percent":y.offset(y.d3_stackedOffset_stackPercent);y.order("default");break}return y};y.interpolate=function(e){if(!arguments.length)return c;c=e;return y};return y};e.models.stackedAreaChart=function(){"use strict";function D(b){b.each(function(b){var x=d3.select(this),P=this;var H=(a||parseInt(x.style("width"))||960)-u.left-u.right,B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom;D.update=function(){x.transition().duration(M).call(D)};D.container=this;if(y=="right")H=H-250;T.disabled=b.map(function(e){return!!e.disabled});if(!N){var j;N={};for(j in T){if(T[j]instanceof Array)N[j]=T[j].slice(0);else N[j]=T[j]}}if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var F=x.selectAll(".nv-noData").data([C]);F.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");F.attr("x",u.left+H/2).attr("y",u.top+B/2).text(function(e){return e});return D}else{x.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();var I=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([b]);var q=I.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g");var R=I.select("g");q.append("rect").style("opacity",0);q.append("g").attr("class","nv-x nv-axis");q.append("g").attr("class","nv-y nv-axis");q.append("g").attr("class","nv-stackedWrap");q.append("g").attr("class","nv-legendWrap");q.append("g").attr("class","nv-controlsWrap");q.append("g").attr("class","nv-interactive");R.select("rect").attr("width",H).attr("height",B);if(h){var U=c?H-L:H;i.width(U);R.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}if(y=="right"){R.select(".nv-legendWrap").attr("transform","translate("+H+","+20+")")}else{R.select(".nv-legendWrap").attr("transform","translate("+(H-U)+","+ -u.top+")")}}if(c){var z=[{key:O.stacked||"Stacked",metaKey:"Stacked",disabled:t.style()!="stack",style:"stack"},{key:O.stream||"Stream",metaKey:"Stream",disabled:t.style()!="stream",style:"stream"},{key:O.expanded||"Expanded",metaKey:"Expanded",disabled:t.style()!="expand",style:"expand"},{key:O.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:t.style()!="stack_percent",style:"stack_percent"}];L=A.length/3*260;z=z.filter(function(e){return A.indexOf(e.metaKey)!==-1});s.width(L).color(["#444","#444","#444"]);R.select(".nv-controlsWrap").datum(z).call(s);if(u.top!=Math.max(s.height(),i.height())){u.top=Math.max(s.height(),i.height());B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}R.select(".nv-controlsWrap").attr("transform","translate(0,"+ -u.top+")")}I.attr("transform","translate("+u.left+","+u.top+")");if(v){R.select(".nv-y.nv-axis").attr("transform","translate("+H+",0)")}if(m){o.width(H).height(B).margin({left:u.left,top:u.top}).svgContainer(x).xScale(w);I.select(".nv-interactive").call(o)}t.width(H).height(B);var W=R.select(".nv-stackedWrap").datum(b);W.transition().call(t);if(p){n.scale(w).ticks(H/100).tickSize(-B,0);R.select(".nv-x.nv-axis").attr("transform","translate(0,"+B+")");R.select(".nv-x.nv-axis").transition().duration(0).call(n)}if(d){r.scale(E).ticks(t.offset()=="wiggle"?0:B/36).tickSize(-H,0).setTickFormat(t.style()=="expand"||t.style()=="stack_percent"?d3.format("%"):S);R.select(".nv-y.nv-axis").transition().duration(0).call(r)}t.dispatch.on("areaClick.toggle",function(e){if(b.filter(function(e){return!e.disabled}).length===1)b=b.map(function(e){e.disabled=false;return e});else b=b.map(function(t,n){t.disabled=n!=e.seriesIndex;return t});T.disabled=b.map(function(e){return!!e.disabled});k.stateChange(T);D.update()});i.dispatch.on("stateChange",function(e){T.disabled=e.disabled;k.stateChange(T);D.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;z=z.map(function(e){e.disabled=true;return e});e.disabled=false;t.style(e.style);T.style=t.style();k.stateChange(T);D.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,a,f,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){a=e.interactiveBisect(n.values,i.pointXValue,D.x());t.highlightPoint(r,a,true);var o=n.values[a];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof f==="undefined")f=D.xScale()(D.x()(o,a));var u=t.style()=="expand"?o.display.y:D.y()(o,a);c.push({key:n.key,value:u,color:l(n,n.seriesIndex),stackedValue:o.display})});c.reverse();if(c.length>2){var h=D.yScale().invert(i.mouseY);var p=Infinity,d=null;c.forEach(function(e,t){if(h>=e.stackedValue.y0&&h<=e.stackedValue.y0+e.stackedValue.y){d=t;return}});if(d!=null)c[d].highlight=true}var v=n.tickFormat()(D.x()(s,a));var m=t.style()=="expand"?function(e,t){return d3.format(".1%")(e)}:function(e,t){return r.tickFormat()(e)};o.tooltip.position({left:f+u.left,top:i.mouseY+u.top}).chartContainer(P.parentNode).enabled(g).valueFormatter(m).data({value:v,series:c})();o.renderGuideLine(f)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(g)_(e,P.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});T.disabled=e.disabled}if(typeof e.style!=="undefined"){t.style(e.style)}D.update()})});return D}var t=e.models.stackedArea(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:25,bottom:50,left:60},a=null,f=null,l=e.utils.defaultColor(),c=true,h=true,p=true,d=true,v=false,m=false,g=true,y="top",b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"},w,E,S=d3.format(",.2f"),x=d3.format(",.3f"),T={style:t.style()},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250,A=["Stacked","Stream","Expanded"],O={},M=250;n.orient("bottom").tickPadding(7);r.orient(v?"right":"left");s.updateState(false);var _=function(r,i){var s=r.pos[0]+(i.offsetLeft||0),o=r.pos[1]+(i.offsetTop||0),u=n.tickFormat()(t.x()(r.point,r.pointIndex)),a=x(t.y()(r.point,r.pointIndex)),f=b(r.series.key,u,a,r,D);e.tooltip.show([s,o],f,r.value<0?"n":"s",null,i)};t.dispatch.on("tooltipShow",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],k.tooltipShow(e)});t.dispatch.on("tooltipHide",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(g)e.tooltip.cleanup()});D.dispatch=k;D.stacked=t;D.legend=i;D.controls=s;D.xAxis=n;D.yAxis=r;D.interactiveLayer=o;d3.rebind(D,t,"x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","sizeDomain","interactive","useVoronoi","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate");D.options=e.utils.optionsFunc.bind(D);D.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return D};D.width=function(e){if(!arguments.length)return a;a=e;return D};D.height=function(e){if(!arguments.length)return f;f=e;return D};D.color=function(n){if(!arguments.length)return l;l=e.utils.getColor(n);i.color(l);t.color(l);return D};D.showControls=function(e){if(!arguments.length)return c;c=e;return D};D.showLegend=function(e){if(!arguments.length)return h;h=e;return D};D.showXAxis=function(e){if(!arguments.length)return p;p=e;return D};D.showYAxis=function(e){if(!arguments.length)return d;d=e;return D};D.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return D};D.useInteractiveGuideline=function(e){if(!arguments.length)return m;m=e;if(e===true){D.interactive(false);D.useVoronoi(false)}return D};D.tooltip=function(e){if(!arguments.length)return b;b=e;return D};D.tooltips=function(e){if(!arguments.length)return g;g=e;return D};D.legendPos=function(e){if(!arguments.length)return y;y=e;return D};D.tooltipContent=function(e){if(!arguments.length)return b;b=e;return D};D.yAxisTooltipFormat=function(e){if(!arguments.length)return x;x=e;return D};D.state=function(e){if(!arguments.length)return T;T=e;return D};D.defaultState=function(e){if(!arguments.length)return N;N=e;return D};D.noData=function(e){if(!arguments.length)return C;C=e;return D};D.transitionDuration=function(e){if(!arguments.length)return M;M=e;return D};D.controlsData=function(e){if(!arguments.length)return A;A=e;return D};D.controlLabels=function(e){if(!arguments.length)return O;if(typeof e!=="object")return O;O=e;return D};r.setTickFormat=r.tickFormat;r.tickFormat=function(e){if(!arguments.length)return S;S=e;return r};return D}})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/outro.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/outro.js
deleted file mode 100644
index 158693a0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/outro.js
+++ /dev/null
@@ -1 +0,0 @@
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/sankey.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/sankey.js
deleted file mode 100644
index c3bc59fb..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/sankey.js
+++ /dev/null
@@ -1,292 +0,0 @@
-d3.sankey = function() {
- var sankey = {},
- nodeWidth = 24,
- nodePadding = 8,
- size = [1, 1],
- nodes = [],
- links = [];
-
- sankey.nodeWidth = function(_) {
- if (!arguments.length) return nodeWidth;
- nodeWidth = +_;
- return sankey;
- };
-
- sankey.nodePadding = function(_) {
- if (!arguments.length) return nodePadding;
- nodePadding = +_;
- return sankey;
- };
-
- sankey.nodes = function(_) {
- if (!arguments.length) return nodes;
- nodes = _;
- return sankey;
- };
-
- sankey.links = function(_) {
- if (!arguments.length) return links;
- links = _;
- return sankey;
- };
-
- sankey.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return sankey;
- };
-
- sankey.layout = function(iterations) {
- computeNodeLinks();
- computeNodeValues();
- computeNodeBreadths();
- computeNodeDepths(iterations);
- computeLinkDepths();
- return sankey;
- };
-
- sankey.relayout = function() {
- computeLinkDepths();
- return sankey;
- };
-
- sankey.link = function() {
- var curvature = .5;
-
- function link(d) {
- var x0 = d.source.x + d.source.dx,
- x1 = d.target.x,
- xi = d3.interpolateNumber(x0, x1),
- x2 = xi(curvature),
- x3 = xi(1 - curvature),
- y0 = d.source.y + d.sy + d.dy / 2,
- y1 = d.target.y + d.ty + d.dy / 2;
- return "M" + x0 + "," + y0
- + "C" + x2 + "," + y0
- + " " + x3 + "," + y1
- + " " + x1 + "," + y1;
- }
-
- link.curvature = function(_) {
- if (!arguments.length) return curvature;
- curvature = +_;
- return link;
- };
-
- return link;
- };
-
- // Populate the sourceLinks and targetLinks for each node.
- // Also, if the source and target are not objects, assume they are indices.
- function computeNodeLinks() {
- nodes.forEach(function(node) {
- node.sourceLinks = [];
- node.targetLinks = [];
- });
- links.forEach(function(link) {
- var source = link.source,
- target = link.target;
- if (typeof source === "number") source = link.source = nodes[link.source];
- if (typeof target === "number") target = link.target = nodes[link.target];
- source.sourceLinks.push(link);
- target.targetLinks.push(link);
- });
- }
-
- // Compute the value (size) of each node by summing the associated links.
- function computeNodeValues() {
- nodes.forEach(function(node) {
- node.value = Math.max(
- d3.sum(node.sourceLinks, value),
- d3.sum(node.targetLinks, value)
- );
- });
- }
-
- // Iteratively assign the breadth (x-position) for each node.
- // Nodes are assigned the maximum breadth of incoming neighbors plus one;
- // nodes with no incoming links are assigned breadth zero, while
- // nodes with no outgoing links are assigned the maximum breadth.
- function computeNodeBreadths() {
- var remainingNodes = nodes,
- nextNodes,
- x = 0;
-
- while (remainingNodes.length) {
- nextNodes = [];
- remainingNodes.forEach(function(node) {
- node.x = x;
- node.dx = nodeWidth;
- node.sourceLinks.forEach(function(link) {
- nextNodes.push(link.target);
- });
- });
- remainingNodes = nextNodes;
- ++x;
- }
-
- //
- moveSinksRight(x);
- scaleNodeBreadths((size[0] - nodeWidth) / (x - 1));
- }
-
- function moveSourcesRight() {
- nodes.forEach(function(node) {
- if (!node.targetLinks.length) {
- node.x = d3.min(node.sourceLinks, function(d) { return d.target.x; }) - 1;
- }
- });
- }
-
- function moveSinksRight(x) {
- nodes.forEach(function(node) {
- if (!node.sourceLinks.length) {
- node.x = x - 1;
- }
- });
- }
-
- function scaleNodeBreadths(kx) {
- nodes.forEach(function(node) {
- node.x *= kx;
- });
- }
-
- function computeNodeDepths(iterations) {
- var nodesByBreadth = d3.nest()
- .key(function(d) { return d.x; })
- .sortKeys(d3.ascending)
- .entries(nodes)
- .map(function(d) { return d.values; });
-
- //
- initializeNodeDepth();
- resolveCollisions();
- for (var alpha = 1; iterations > 0; --iterations) {
- relaxRightToLeft(alpha *= .99);
- resolveCollisions();
- relaxLeftToRight(alpha);
- resolveCollisions();
- }
-
- function initializeNodeDepth() {
- var ky = d3.min(nodesByBreadth, function(nodes) {
- return (size[1] - (nodes.length - 1) * nodePadding) / d3.sum(nodes, value);
- });
-
- nodesByBreadth.forEach(function(nodes) {
- nodes.forEach(function(node, i) {
- node.y = i;
- node.dy = node.value * ky;
- });
- });
-
- links.forEach(function(link) {
- link.dy = link.value * ky;
- });
- }
-
- function relaxLeftToRight(alpha) {
- nodesByBreadth.forEach(function(nodes, breadth) {
- nodes.forEach(function(node) {
- if (node.targetLinks.length) {
- var y = d3.sum(node.targetLinks, weightedSource) / d3.sum(node.targetLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedSource(link) {
- return center(link.source) * link.value;
- }
- }
-
- function relaxRightToLeft(alpha) {
- nodesByBreadth.slice().reverse().forEach(function(nodes) {
- nodes.forEach(function(node) {
- if (node.sourceLinks.length) {
- var y = d3.sum(node.sourceLinks, weightedTarget) / d3.sum(node.sourceLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedTarget(link) {
- return center(link.target) * link.value;
- }
- }
-
- function resolveCollisions() {
- nodesByBreadth.forEach(function(nodes) {
- var node,
- dy,
- y0 = 0,
- n = nodes.length,
- i;
-
- // Push any overlapping nodes down.
- nodes.sort(ascendingDepth);
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- dy = y0 - node.y;
- if (dy > 0) node.y += dy;
- y0 = node.y + node.dy + nodePadding;
- }
-
- // If the bottommost node goes outside the bounds, push it back up.
- dy = y0 - nodePadding - size[1];
- if (dy > 0) {
- y0 = node.y -= dy;
-
- // Push any overlapping nodes back up.
- for (i = n - 2; i >= 0; --i) {
- node = nodes[i];
- dy = node.y + node.dy + nodePadding - y0;
- if (dy > 0) node.y -= dy;
- y0 = node.y;
- }
- }
- });
- }
-
- function ascendingDepth(a, b) {
- return a.y - b.y;
- }
- }
-
- function computeLinkDepths() {
- nodes.forEach(function(node) {
- node.sourceLinks.sort(ascendingTargetDepth);
- node.targetLinks.sort(ascendingSourceDepth);
- });
- nodes.forEach(function(node) {
- var sy = 0, ty = 0;
- node.sourceLinks.forEach(function(link) {
- link.sy = sy;
- sy += link.dy;
- });
- node.targetLinks.forEach(function(link) {
- link.ty = ty;
- ty += link.dy;
- });
- });
-
- function ascendingSourceDepth(a, b) {
- return a.source.y - b.source.y;
- }
-
- function ascendingTargetDepth(a, b) {
- return a.target.y - b.target.y;
- }
- }
-
- function center(node) {
- return node.y + node.dy / 2;
- }
-
- function value(link) {
- return link.value;
- }
-
- return sankey;
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/tooltip.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/tooltip.js
deleted file mode 100644
index 46e5a816..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/tooltip.js
+++ /dev/null
@@ -1,490 +0,0 @@
-/* Tooltip rendering model for nvd3 charts.
-window.nv.models.tooltip is the updated,new way to render tooltips.
-
-window.nv.tooltip.show is the old tooltip code.
-window.nv.tooltip.* also has various helper methods.
-*/
-(function() {
- "use strict";
- window.nv.tooltip = {};
-
- /* Model which can be instantiated to handle tooltip rendering.
- Example usage:
- var tip = nv.models.tooltip().gravity('w').distance(23)
- .data(myDataObject);
-
- tip(); //just invoke the returned function to render tooltip.
- */
- window.nv.models.tooltip = function() {
- var content = null //HTML contents of the tooltip. If null, the content is generated via the data variable.
- , data = null /* Tooltip data. If data is given in the proper format, a consistent tooltip is generated.
- Format of data:
- {
- key: "Date",
- value: "August 2009",
- series: [
- {
- key: "Series 1",
- value: "Value 1",
- color: "#000"
- },
- {
- key: "Series 2",
- value: "Value 2",
- color: "#00f"
- }
- ]
-
- }
-
- */
- , gravity = 'w' //Can be 'n','s','e','w'. Determines how tooltip is positioned.
- , distance = 50 //Distance to offset tooltip from the mouse location.
- , snapDistance = 25 //Tolerance allowed before tooltip is moved from its current position (creates 'snapping' effect)
- , fixedTop = null //If not null, this fixes the top position of the tooltip.
- , classes = null //Attaches additional CSS classes to the tooltip DIV that is created.
- , chartContainer = null //Parent DIV, of the SVG Container that holds the chart.
- , tooltipElem = null //actual DOM element representing the tooltip.
- , position = {left: null, top: null} //Relative position of the tooltip inside chartContainer.
- , enabled = true //True -> tooltips are rendered. False -> don't render tooltips.
- //Generates a unique id when you create a new tooltip() object
- , id = "nvtooltip-" + Math.floor(Math.random() * 100000)
- ;
-
- //CSS class to specify whether element should not have mouse events.
- var nvPointerEventsClass = "nv-pointer-events-none";
-
- //Format function for the tooltip values column
- var valueFormatter = function(d,i) {
- return d;
- };
-
- //Format function for the tooltip header value.
- var headerFormatter = function(d) {
- return d;
- };
-
- //By default, the tooltip model renders a beautiful table inside a DIV.
- //You can override this function if a custom tooltip is desired.
- var contentGenerator = function(d) {
- if (content != null) return content;
-
- if (d == null) return '';
-
- var table = d3.select(document.createElement("table"));
- var theadEnter = table.selectAll("thead")
- .data([d])
- .enter().append("thead");
- theadEnter.append("tr")
- .append("td")
- .attr("colspan",3)
- .append("strong")
- .classed("x-value",true)
- .html(headerFormatter(d.value));
-
- var tbodyEnter = table.selectAll("tbody")
- .data([d])
- .enter().append("tbody");
- var trowEnter = tbodyEnter.selectAll("tr")
- .data(function(p) { return p.series})
- .enter()
- .append("tr")
- .classed("highlight", function(p) { return p.highlight})
- ;
-
- trowEnter.append("td")
- .classed("legend-color-guide",true)
- .append("div")
- .style("background-color", function(p) { return p.color});
- trowEnter.append("td")
- .classed("key",true)
- .html(function(p) {return p.key});
- trowEnter.append("td")
- .classed("value",true)
- .html(function(p,i) { return valueFormatter(p.value,i) });
-
-
- trowEnter.selectAll("td").each(function(p) {
- if (p.highlight) {
- var opacityScale = d3.scale.linear().domain([0,1]).range(["#fff",p.color]);
- var opacity = 0.6;
- d3.select(this)
- .style("border-bottom-color", opacityScale(opacity))
- .style("border-top-color", opacityScale(opacity))
- ;
- }
- });
-
- var html = table.node().outerHTML;
- if (d.footer !== undefined)
- html += "<div class='footer'>" + d.footer + "</div>";
- return html;
-
- };
-
- var dataSeriesExists = function(d) {
- if (d && d.series && d.series.length > 0) return true;
-
- return false;
- };
-
- //In situations where the chart is in a 'viewBox', re-position the tooltip based on how far chart is zoomed.
- function convertViewBoxRatio() {
- if (chartContainer) {
- var svg = d3.select(chartContainer);
- if (svg.node().tagName !== "svg") {
- svg = svg.select("svg");
- }
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
-
- position.left = position.left * ratio;
- position.top = position.top * ratio;
- }
- }
- }
-
- //Creates new tooltip container, or uses existing one on DOM.
- function getTooltipContainer(newContent) {
- var body;
- if (chartContainer)
- body = d3.select(chartContainer);
- else
- body = d3.select("body");
-
- var container = body.select(".nvtooltip");
- if (container.node() === null) {
- //Create new tooltip div if it doesn't exist on DOM.
- container = body.append("div")
- .attr("class", "nvtooltip " + (classes? classes: "xy-tooltip"))
- .attr("id",id)
- ;
- }
-
-
- container.node().innerHTML = newContent;
- container.style("top",0).style("left",0).style("opacity",0);
- container.selectAll("div, table, td, tr").classed(nvPointerEventsClass,true)
- container.classed(nvPointerEventsClass,true);
- return container.node();
- }
-
-
-
- //Draw the tooltip onto the DOM.
- function nvtooltip() {
- if (!enabled) return;
- if (!dataSeriesExists(data)) return;
-
- convertViewBoxRatio();
-
- var left = position.left;
- var top = (fixedTop != null) ? fixedTop : position.top;
- var container = getTooltipContainer(contentGenerator(data));
- tooltipElem = container;
- if (chartContainer) {
- var svgComp = chartContainer.getElementsByTagName("svg")[0];
- var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();
- var svgOffset = {left:0,top:0};
- if (svgComp) {
- var svgBound = svgComp.getBoundingClientRect();
- var chartBound = chartContainer.getBoundingClientRect();
- var svgBoundTop = svgBound.top;
-
- //Defensive code. Sometimes, svgBoundTop can be a really negative
- // number, like -134254. That's a bug.
- // If such a number is found, use zero instead. FireFox bug only
- if (svgBoundTop < 0) {
- var containerBound = chartContainer.getBoundingClientRect();
- svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;
- }
- svgOffset.top = Math.abs(svgBoundTop - chartBound.top);
- svgOffset.left = Math.abs(svgBound.left - chartBound.left);
- }
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- //You need to also add any offset between the <svg> element and its containing <div>
- //Finally, add any offset of the containing <div> on the whole page.
- left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;
- top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;
- }
-
- if (snapDistance && snapDistance > 0) {
- top = Math.floor(top/snapDistance) * snapDistance;
- }
-
- nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);
- return nvtooltip;
- };
-
- nvtooltip.nvPointerEventsClass = nvPointerEventsClass;
-
- nvtooltip.content = function(_) {
- if (!arguments.length) return content;
- content = _;
- return nvtooltip;
- };
-
- //Returns tooltipElem...not able to set it.
- nvtooltip.tooltipElem = function() {
- return tooltipElem;
- };
-
- nvtooltip.contentGenerator = function(_) {
- if (!arguments.length) return contentGenerator;
- if (typeof _ === 'function') {
- contentGenerator = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.data = function(_) {
- if (!arguments.length) return data;
- data = _;
- return nvtooltip;
- };
-
- nvtooltip.gravity = function(_) {
- if (!arguments.length) return gravity;
- gravity = _;
- return nvtooltip;
- };
-
- nvtooltip.distance = function(_) {
- if (!arguments.length) return distance;
- distance = _;
- return nvtooltip;
- };
-
- nvtooltip.snapDistance = function(_) {
- if (!arguments.length) return snapDistance;
- snapDistance = _;
- return nvtooltip;
- };
-
- nvtooltip.classes = function(_) {
- if (!arguments.length) return classes;
- classes = _;
- return nvtooltip;
- };
-
- nvtooltip.chartContainer = function(_) {
- if (!arguments.length) return chartContainer;
- chartContainer = _;
- return nvtooltip;
- };
-
- nvtooltip.position = function(_) {
- if (!arguments.length) return position;
- position.left = (typeof _.left !== 'undefined') ? _.left : position.left;
- position.top = (typeof _.top !== 'undefined') ? _.top : position.top;
- return nvtooltip;
- };
-
- nvtooltip.fixedTop = function(_) {
- if (!arguments.length) return fixedTop;
- fixedTop = _;
- return nvtooltip;
- };
-
- nvtooltip.enabled = function(_) {
- if (!arguments.length) return enabled;
- enabled = _;
- return nvtooltip;
- };
-
- nvtooltip.valueFormatter = function(_) {
- if (!arguments.length) return valueFormatter;
- if (typeof _ === 'function') {
- valueFormatter = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.headerFormatter = function(_) {
- if (!arguments.length) return headerFormatter;
- if (typeof _ === 'function') {
- headerFormatter = _;
- }
- return nvtooltip;
- };
-
- //id() is a read-only function. You can't use it to set the id.
- nvtooltip.id = function() {
- return id;
- };
-
-
- return nvtooltip;
- };
-
-
- //Original tooltip.show function. Kept for backward compatibility.
- // pos = [left,top]
- nv.tooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- //Create new tooltip div if it doesn't exist on DOM.
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
- container.innerHTML = content;
- body.appendChild(container);
-
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- if (parentContainer) {
- pos[0] = pos[0] - parentContainer.scrollLeft;
- pos[1] = pos[1] - parentContainer.scrollTop;
- }
- nv.tooltip.calcTooltipPosition(pos, gravity, dist, container);
- };
-
- //Looks up the ancestry of a DOM element, and returns the first NON-svg node.
- nv.tooltip.findFirstNonSVGParent = function(Elem) {
- while(Elem.tagName.match(/^g|svg$/i) !== null) {
- Elem = Elem.parentNode;
- }
- return Elem;
- };
-
- //Finds the total offsetTop of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetTop = function ( Elem, initialTop ) {
- var offsetTop = initialTop;
-
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- };
-
- //Finds the total offsetLeft of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetLeft = function ( Elem, initialLeft) {
- var offsetLeft = initialLeft;
-
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- };
-
- //Global utility function to render a tooltip on the DOM.
- //pos = [left,top] coordinates of where to place the tooltip, relative to the SVG chart container.
- //gravity = how to orient the tooltip
- //dist = how far away from the mouse to place tooltip
- //container = tooltip DIV
- nv.tooltip.calcTooltipPosition = function(pos, gravity, dist, container) {
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.pageYOffset,
- scrollLeft = window.pageXOffset,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var tooltipTop = function ( Elem ) {
- return nv.tooltip.findTotalOffsetTop(Elem, top);
- };
-
- var tooltipLeft = function ( Elem ) {
- return nv.tooltip.findTotalOffsetLeft(Elem,left);
- };
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- case 'none':
- left = pos[0];
- top = pos[1] - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute';
-
- return container;
- };
-
- //Global utility function to remove tooltips from the DOM.
- nv.tooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/d3/js/utils.js b/usecaseui-common/src/main/webapp/static/fusion/d3/js/utils.js
deleted file mode 100644
index 7b99e1da..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/d3/js/utils.js
+++ /dev/null
@@ -1,152 +0,0 @@
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- if (fun === undefined) return;
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-
-/* Numbers that are undefined, null or NaN, convert them to zeros.
-*/
-nv.utils.NaNtoZero = function(n) {
- if (typeof n !== 'number'
- || isNaN(n)
- || n === null
- || n === Infinity) return 0;
-
- return n;
-};
-
-/*
-Snippet of code you can insert into each nv.models.* to give you the ability to
-do things like:
-chart.options({
- showXAxis: true,
- tooltips: true
-});
-
-To enable in the chart:
-chart.options = nv.utils.optionsFunc.bind(chart);
-*/
-nv.utils.optionsFunc = function(args) {
- if (args) {
- d3.map(args).forEach((function(key,value) {
- if (typeof this[key] === "function") {
- this[key](value);
- }
- }).bind(this));
- }
- return this;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/gis/js/local.js b/usecaseui-common/src/main/webapp/static/fusion/gis/js/local.js
deleted file mode 100644
index 5f4208a8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/gis/js/local.js
+++ /dev/null
@@ -1,178 +0,0 @@
-var pointLayer= null;
-var animateFlag = false;
-var frame = 0;
-var dates = [];
-var delay = 1000;
-var intervalId = null;
-$( document ).ready(function() {
- map(data2.map.lat,data2.map.lon,data2.map.zoom);
- pointLayer = new L.layerGroup().addTo(map);
- var point = getDates(data2.points);
- drawPoints(data2,point);
-
-
- $('#timeUp').bind('click',function(){
- delay += 500;
- if ( animateFlag ) {
- clearInterval(intervalId);
- intervalId = window.setInterval(function(){animate(data2);},delay);
- }
- });
- $('#timeDown').bind('click',function(){
- if ( delay === 500 ) { return false; }
- delay -= 500;
- if ( animateFlag ) {
- clearInterval(intervalId);
- intervalId = window.setInterval(function(){animate(data2);},delay);
- }
- });
-
-
- $('#date').bind('change',function(){
- drawPoints(data2,$('#date').val());
- });
- $('#animate').bind('click',function(){
- if ( animateFlag ) {
- animateFlag = false;
- $('#animate_color').html('Off');
- $('#animate_color').removeClass('animateOn');
- $('#animate_color').addClass('animateOff');
- clearInterval(intervalId);
- } else {
- animateFlag = true;
- $('#animate_color').html('On');
- $('#animate_color').removeClass('animateOff');
- $('#animate_color').addClass('animateOn');
- intervalId = window.setInterval(function(){animate(data2);},delay);
- }
- });
-
-
-});
-
-function abc() {
- var abc = 1;
- var xyz = "";
- return nul;
-
-}
-
-
-
-function animate(obj){
- var point = dates[frame];
- drawPoints(obj,point);
- frame++;
- if ( frame >= dates.length ) {
- frame = 0;
- }
- $('#currDate').val(point);
- $('#showDelay').html(delay);
-}
-
-function someFunction() {
-
- var self = this;
- var x = 1;
- var z = self + x;
-}
-
-
-/**
-* drawPoints - Draw the points provided by point(date)
-* obj JSON Object - Data for Map
-* p String - Key (date) from the JSON object.
-*/
-function drawPoints(obj,p){
- pointLayer.clearLayers();
- var lats = obj.points[p].lats;
- var lons = obj.points[p].lons;
- var txt = obj.points[p].text;
- var fills = obj.points[p].colors;
- points(lats, lons,txt,fills);
-}
-
-/**
-* Get dates from the list provided in pIn and put them in Select.
-* then return the fist date.
-*
-*/
-function getDates(pIn) {
- var html = "<option value='na'>--Select--</option>";
- var c = 0;
- var ret = 0;
- for (var d in pIn ) {
- var val = d.replace('"','');
- if ( c === 0 ) { ret = val;};
- html += "<option value='" + d + "'>" + d + "</option>";
- dates[c] = val;
- c++;
- }
- $('#date').html(html);
- return ret;
-}
-
-/**
-* Map - pass argumets to build map as specified Lat/Lon and zoom level
-* String lat - Latitude
-* String lon - Longitude
-* String zoom - Zoom Level (1-18)
-*
-*/
-function map(lat,lon,zoom){
- var map = L.map('map').setView([lat,lon],zoom);
- map.addControl(new L.control.scale());
- L.tileLayer('http://localhost/tiles-light/{z}/{x}/{y}.png', {maxZoom:18}).addTo(map);
- window.L=L;
- window.map=map;
-}
-
-/**
-* points - pass argumets to points specified Lat/Lon. Text and color for point is also passed.
-* Input is either all singe values or all arrays.
-* String[] lat - Latitude
-* String[] lon - Longitude
-* String[] text - Single/Array of Text for points
-* String[] fill - Single/Array of Fill colors.
-*/
-function points(lat,lon,text,fill){
- if(lat.length) {
- for(i=0;i<lat.length;i++) {
- pointLayer.addLayer(L.circleMarker([lat[i], lon[i]], {
- radius:"5",
- color: fill[i],
- fillColor: fill[i],
- fillOpacity: "0.5" }).bindPopup(text[i]));
-
- /*
- L.circleMarker([lat[i], lon[i]], {
- radius:"5",
- color: fill[i],
- fillColor: fill[i],
- fillOpacity: "0.5" }).addTo(map).bindPopup(text[i]);
-
- */
-
- }
-
- } else {
- L.circleMarker([lat, lon], {
- radius:"5",
- color:fill,
- fillColor:fill,
- fillOpacity: "0.5"
- }).addTo(map).bindPopup(text);
- }
-}
-
-/**
-* Get data from json file and creat return an object of data.
-* Returns json object.
-*
-**/
-function getData(){
- $.getJSON( "./data.json", function( data ) {
- return data;
- });
-
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/angular-gridster.js b/usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/angular-gridster.js
deleted file mode 100644
index 985fa434..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/angular-gridster.js
+++ /dev/null
@@ -1,2244 +0,0 @@
-/*global define:true*/
-(function(root, factory) {
-
- 'use strict';
-
- if (typeof define === 'function' && define.amd) {
- // AMD
- define(['angular'], factory);
- } else if (typeof exports === 'object') {
- // CommonJS
- module.exports = factory(require('angular'));
- } else {
- // Browser, nothing "exported". Only registered as a module with angular.
- factory(root.angular);
- }
-}(this, function(angular) {
-
- 'use strict';
-
- var ie8 = false;
-
- var getInternetExplorerVersion = function ()
- // Returns the version of Internet Explorer >4 or
- // undefined(indicating the use of another browser).
- {
- var isIE10 = (eval("/*@cc_on!@*/false") && document.documentMode === 10);
- if (isIE10) {
- return 10;
- }
- var v = 3,
- div = document.createElement('div'),
- all = div.getElementsByTagName('i');
- do {
- div.innerHTML = '<!--[if gt IE ' + (++v) + ']><i></i><![endif]-->';
- } while (all[0]);
- return v > 4 ? v : undefined;
- };
-
- var browserVersion = getInternetExplorerVersion();
-
- if (browserVersion && browserVersion < 9) {
- ie8 = true;
- }
-
- // This returned angular module 'gridster' is what is exported.
- return angular.module('attGridsterLib', [])
-
- .constant('gridsterConfig', {
- columns: 6, // number of columns in the grid
- pushing: true, // whether to push other items out of the way
- floating: true, // whether to automatically float items up so they stack
- swapping: true, // whether or not to have items switch places instead of push down if they are the same size
- width: 'auto', // width of the grid. "auto" will expand the grid to its parent container
- colWidth: 'auto', // width of grid columns. "auto" will divide the width of the grid evenly among the columns
- rowHeight: 'match', // height of grid rows. 'match' will make it the same as the column width, a numeric value will be interpreted as pixels, '/2' is half the column width, '*5' is five times the column width, etc.
- margins: [10, 10], // margins in between grid items
- outerMargin: false,
- isMobile: false, // toggle mobile view
- mobileBreakPoint: 100, // width threshold to toggle mobile mode
- mobileModeEnabled: true, // whether or not to toggle mobile mode when screen width is less than mobileBreakPoint
- minColumns: 1, // minimum amount of columns the grid can scale down to
- minRows: 1, // minimum amount of rows to show if the grid is empty
- maxRows: 100, // maximum amount of rows in the grid
- defaultSizeX: 1, // default width of an item in columns
- defaultSizeY: 1, // default height of an item in rows
- minSizeX: 1, // minimum column width of an item
- maxSizeX: null, // maximum column width of an item
- minSizeY: 1, // minumum row height of an item
- maxSizeY: null, // maximum row height of an item
- saveGridItemCalculatedHeightInMobile: false, // grid item height in mobile display. true- to use the calculated height by sizeY given
- resizable: { // options to pass to resizable handler
- enabled: false,
- handles: ['s', 'e', 'n', 'w', 'se', 'ne', 'sw', 'nw']
- },
- draggable: { // options to pass to draggable handler
- enabled: true,
- scrollSensitivity: 20, // Distance in pixels from the edge of the viewport after which the viewport should scroll, relative to pointer
- scrollSpeed: 15 // Speed at which the window should scroll once the mouse pointer gets within scrollSensitivity distance
- }
- })
-
- .controller('GridsterCtrl', ['gridsterConfig', '$timeout',
- function(gridsterConfig, $timeout) {
-
- var gridster = this;
-
- /**
- * Create options from gridsterConfig constant
- */
- angular.extend(this, gridsterConfig);
-
- this.resizable = angular.extend({}, gridsterConfig.resizable || {});
- this.draggable = angular.extend({}, gridsterConfig.draggable || {});
-
- var flag = false;
- this.layoutChanged = function() {
- if (flag) {
- return;
- }
- flag = true;
- $timeout(function() {
- flag = false;
- if (gridster.loaded) {
- gridster.floatItemsUp();
- }
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- }, 30);
- };
-
- /**
- * A positional array of the items in the grid
- */
- this.grid = [];
-
- /**
- * Clean up after yourself
- */
- this.destroy = function() {
- // empty the grid to cut back on the possibility
- // of circular references
- if (this.grid) {
- this.grid = [];
- }
- this.$element = null;
- };
-
- /**
- * Overrides default options
- *
- * @param {Object} options The options to override
- */
- this.setOptions = function(options) {
- if (!options) {
- return;
- }
-
- options = angular.extend({}, options);
-
- // all this to avoid using jQuery...
- if (options.draggable) {
- angular.extend(this.draggable, options.draggable);
- delete(options.draggable);
- }
- if (options.resizable) {
- angular.extend(this.resizable, options.resizable);
- delete(options.resizable);
- }
-
- angular.extend(this, options);
-
- if (!this.margins || this.margins.length !== 2) {
- this.margins = [0, 0];
- } else {
- for (var x = 0, l = this.margins.length; x < l; ++x) {
- this.margins[x] = parseInt(this.margins[x], 10);
- if (isNaN(this.margins[x])) {
- this.margins[x] = 0;
- }
- }
- }
- };
-
- /**
- * Check if item can occupy a specified position in the grid
- *
- * @param {Object} item The item in question
- * @param {Number} row The row index
- * @param {Number} column The column index
- * @returns {Boolean} True if if item fits
- */
- this.canItemOccupy = function(item, row, column) {
- return row > -1 && column > -1 && item.sizeX + column <= this.columns && item.sizeY + row <= this.maxRows;
- };
-
- /**
- * Set the item in the first suitable position
- *
- * @param {Object} item The item to insert
- */
- this.autoSetItemPosition = function(item) {
- // walk through each row and column looking for a place it will fit
- for (var rowIndex = 0; rowIndex < this.maxRows; ++rowIndex) {
- for (var colIndex = 0; colIndex < this.columns; ++colIndex) {
- // only insert if position is not already taken and it can fit
- var items = this.getItems(rowIndex, colIndex, item.sizeX, item.sizeY, item);
- if (items.length === 0 && this.canItemOccupy(item, rowIndex, colIndex)) {
- this.putItem(item, rowIndex, colIndex);
- return;
- }
- }
- }
- throw new Error('Unable to place item!');
- };
-
- /**
- * Gets items at a specific coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Number} sizeX
- * @param {Number} sizeY
- * @param {Array} excludeItems An array of items to exclude from selection
- * @returns {Array} Items that match the criteria
- */
- this.getItems = function(row, column, sizeX, sizeY, excludeItems) {
- var items = [];
- if (!sizeX || !sizeY) {
- sizeX = sizeY = 1;
- }
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- for (var h = 0; h < sizeY; ++h) {
- for (var w = 0; w < sizeX; ++w) {
- var item = this.getItem(row + h, column + w, excludeItems);
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && items.indexOf(item) === -1) {
- items.push(item);
- }
- }
- }
- return items;
- };
-
- /**
- * @param {Array} items
- * @returns {Object} An item that represents the bounding box of the items
- */
- this.getBoundingBox = function(items) {
-
- if (items.length === 0) {
- return null;
- }
- if (items.length === 1) {
- return {
- row: items[0].row,
- col: items[0].col,
- sizeY: items[0].sizeY,
- sizeX: items[0].sizeX
- };
- }
-
- var maxRow = 0;
- var maxCol = 0;
- var minRow = 9999;
- var minCol = 9999;
-
- for (var i = 0, l = items.length; i < l; ++i) {
- var item = items[i];
- minRow = Math.min(item.row, minRow);
- minCol = Math.min(item.col, minCol);
- maxRow = Math.max(item.row + item.sizeY, maxRow);
- maxCol = Math.max(item.col + item.sizeX, maxCol);
- }
-
- return {
- row: minRow,
- col: minCol,
- sizeY: maxRow - minRow,
- sizeX: maxCol - minCol
- };
- };
-
-
- /**
- * Removes an item from the grid
- *
- * @param {Object} item
- */
- this.removeItem = function(item) {
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- var index = columns.indexOf(item);
- if (index !== -1) {
- columns[index] = null;
- break;
- }
- }
- this.layoutChanged();
- };
-
- /**
- * Returns the item at a specified coordinate
- *
- * @param {Number} row
- * @param {Number} column
- * @param {Array} excludeItems Items to exclude from selection
- * @returns {Object} The matched item or null
- */
- this.getItem = function(row, column, excludeItems) {
- if (excludeItems && !(excludeItems instanceof Array)) {
- excludeItems = [excludeItems];
- }
- var sizeY = 1;
- while (row > -1) {
- var sizeX = 1,
- col = column;
- while (col > -1) {
- var items = this.grid[row];
- if (items) {
- var item = items[col];
- if (item && (!excludeItems || excludeItems.indexOf(item) === -1) && item.sizeX >= sizeX && item.sizeY >= sizeY) {
- return item;
- }
- }
- ++sizeX;
- --col;
- }
- --row;
- ++sizeY;
- }
- return null;
- };
-
- /**
- * Insert an array of items into the grid
- *
- * @param {Array} items An array of items to insert
- */
- this.putItems = function(items) {
- for (var i = 0, l = items.length; i < l; ++i) {
- this.putItem(items[i]);
- }
- };
-
- /**
- * Insert a single item into the grid
- *
- * @param {Object} item The item to insert
- * @param {Number} row (Optional) Specifies the items row index
- * @param {Number} column (Optional) Specifies the items column index
- * @param {Array} ignoreItems
- */
- this.putItem = function(item, row, column, ignoreItems) {
- // auto place item if no row specified
- if (typeof row === 'undefined' || row === null) {
- row = item.row;
- column = item.col;
- if (typeof row === 'undefined' || row === null) {
- this.autoSetItemPosition(item);
- return;
- }
- }
-
- // keep item within allowed bounds
- if (!this.canItemOccupy(item, row, column)) {
- column = Math.min(this.columns - item.sizeX, Math.max(0, column));
- row = Math.min(this.maxRows - item.sizeY, Math.max(0, row));
- }
-
- // check if item is already in grid
- if (item.oldRow !== null && typeof item.oldRow !== 'undefined') {
- var samePosition = item.oldRow === row && item.oldColumn === column;
- var inGrid = this.grid[row] && this.grid[row][column] === item;
- if (samePosition && inGrid) {
- item.row = row;
- item.col = column;
- return;
- } else {
- // remove from old position
- var oldRow = this.grid[item.oldRow];
- if (oldRow && oldRow[item.oldColumn] === item) {
- delete oldRow[item.oldColumn];
- }
- }
- }
-
- item.oldRow = item.row = row;
- item.oldColumn = item.col = column;
-
- this.moveOverlappingItems(item, ignoreItems);
-
- if (!this.grid[row]) {
- this.grid[row] = [];
- }
- this.grid[row][column] = item;
-
- if (this.movingItem === item) {
- this.floatItemUp(item);
- }
- this.layoutChanged();
- };
-
- /**
- * Trade row and column if item1 with item2
- *
- * @param {Object} item1
- * @param {Object} item2
- */
- this.swapItems = function(item1, item2) {
- this.grid[item1.row][item1.col] = item2;
- this.grid[item2.row][item2.col] = item1;
-
- var item1Row = item1.row;
- var item1Col = item1.col;
- item1.row = item2.row;
- item1.col = item2.col;
- item2.row = item1Row;
- item2.col = item1Col;
- };
-
- /**
- * Prevents items from being overlapped
- *
- * @param {Object} item The item that should remain
- * @param {Array} ignoreItems
- */
- this.moveOverlappingItems = function(item, ignoreItems) {
- // don't move item, so ignore it
- if (!ignoreItems) {
- ignoreItems = [item];
- } else if (ignoreItems.indexOf(item) === -1) {
- ignoreItems = ignoreItems.slice(0);
- ignoreItems.push(item);
- }
-
- // get the items in the space occupied by the item's coordinates
- var overlappingItems = this.getItems(
- item.row,
- item.col,
- item.sizeX,
- item.sizeY,
- ignoreItems
- );
- this.moveItemsDown(overlappingItems, item.row + item.sizeY, ignoreItems);
- };
-
- /**
- * Moves an array of items to a specified row
- *
- * @param {Array} items The items to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemsDown = function(items, newRow, ignoreItems) {
- if (!items || items.length === 0) {
- return;
- }
- items.sort(function(a, b) {
- return a.row - b.row;
- });
-
- ignoreItems = ignoreItems ? ignoreItems.slice(0) : [];
- var topRows = {},
- item, i, l;
-
- // calculate the top rows in each column
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var topRow = topRows[item.col];
- if (typeof topRow === 'undefined' || item.row < topRow) {
- topRows[item.col] = item.row;
- }
- }
-
- // move each item down from the top row in its column to the row
- for (i = 0, l = items.length; i < l; ++i) {
- item = items[i];
- var rowsToMove = newRow - topRows[item.col];
- this.moveItemDown(item, item.row + rowsToMove, ignoreItems);
- ignoreItems.push(item);
- }
- };
-
- /**
- * Moves an item down to a specified row
- *
- * @param {Object} item The item to move
- * @param {Number} newRow The target row
- * @param {Array} ignoreItems
- */
- this.moveItemDown = function(item, newRow, ignoreItems) {
- if (item.row >= newRow) {
- return;
- }
- while (item.row < newRow) {
- ++item.row;
- this.moveOverlappingItems(item, ignoreItems);
- }
- this.putItem(item, item.row, item.col, ignoreItems);
- };
-
- /**
- * Moves all items up as much as possible
- */
- this.floatItemsUp = function() {
- if (this.floating === false) {
- return;
- }
- for (var rowIndex = 0, l = this.grid.length; rowIndex < l; ++rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- var item = columns[colIndex];
- if (item) {
- this.floatItemUp(item);
- }
- }
- }
- };
-
- /**
- * Float an item up to the most suitable row
- *
- * @param {Object} item The item to move
- */
- this.floatItemUp = function(item) {
- if (this.floating === false) {
- return;
- }
- var colIndex = item.col,
- sizeY = item.sizeY,
- sizeX = item.sizeX,
- bestRow = null,
- bestColumn = null,
- rowIndex = item.row - 1;
-
- while (rowIndex > -1) {
- var items = this.getItems(rowIndex, colIndex, sizeX, sizeY, item);
- if (items.length !== 0) {
- break;
- }
- bestRow = rowIndex;
- bestColumn = colIndex;
- --rowIndex;
- }
- if (bestRow !== null) {
- this.putItem(item, bestRow, bestColumn);
- }
- };
-
- /**
- * Update gridsters height
- *
- * @param {Number} plus (Optional) Additional height to add
- */
- this.updateHeight = function(plus) {
- var maxHeight = this.minRows;
- plus = plus || 0;
- for (var rowIndex = this.grid.length; rowIndex >= 0; --rowIndex) {
- var columns = this.grid[rowIndex];
- if (!columns) {
- continue;
- }
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- maxHeight = Math.max(maxHeight, rowIndex + plus + columns[colIndex].sizeY);
- }
- }
- }
- this.gridHeight = this.maxRows - maxHeight > 0 ? Math.min(this.maxRows, maxHeight) : Math.max(this.maxRows, maxHeight);
- };
-
- /**
- * Returns the number of rows that will fit in given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- */
- this.pixelsToRows = function(pixels, ceilOrFloor) {
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curRowHeight);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curRowHeight);
- }
-
- return Math.round(pixels / this.curRowHeight);
- };
-
- /**
- * Returns the number of columns that will fit in a given amount of pixels
- *
- * @param {Number} pixels
- * @param {Boolean} ceilOrFloor (Optional) Determines rounding method
- * @returns {Number} The number of columns
- */
- this.pixelsToColumns = function(pixels, ceilOrFloor) {
- if (ceilOrFloor === true) {
- return Math.ceil(pixels / this.curColWidth);
- } else if (ceilOrFloor === false) {
- return Math.floor(pixels / this.curColWidth);
- }
-
- return Math.round(pixels / this.curColWidth);
- };
- }
- ])
-
- .directive('gridsterPreview', function() {
- return {
- replace: true,
- scope: true,
- require: '^gridster',
- template: '<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',
- link: function(scope, $el, attrs, gridster) {
-
- /**
- * @returns {Object} style object for preview element
- */
- scope.previewStyle = function() {
-
- if (!gridster.movingItem) {
- return {
- display: 'none'
- };
- }
-
- return {
- display: 'block',
- height: (gridster.movingItem.sizeY * gridster.curRowHeight - gridster.margins[0]) + 'px',
- width: (gridster.movingItem.sizeX * gridster.curColWidth - gridster.margins[1]) + 'px',
- top: (gridster.movingItem.row * gridster.curRowHeight + (gridster.outerMargin ? gridster.margins[0] : 0)) + 'px',
- left: (gridster.movingItem.col * gridster.curColWidth + (gridster.outerMargin ? gridster.margins[1] : 0)) + 'px'
- };
- };
- }
- };
- })
-
- /**
- * The gridster directive
- *
- * @param {Function} $timeout
- * @param {Object} $window
- * @param {Object} $rootScope
- * @param {Function} gridsterDebounce
- */
- .directive('gridster', ['$timeout', '$window', '$rootScope', 'gridsterDebounce',
- function($timeout, $window, $rootScope, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EAC',
- controller: 'GridsterCtrl',
- controllerAs: 'gridster',
- compile: function($tplElem) {
-
- $tplElem.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>');
-
- return function(scope, $elem, attrs, gridster) {
- gridster.loaded = false;
-
- gridster.$element = $elem;
-
- scope.gridster = gridster;
-
- $elem.addClass('gridster');
-
- var isVisible = function(ele) {
- return ele.style.visibility !== 'hidden' && ele.style.display !== 'none';
- };
-
- function refresh(config) {
- gridster.setOptions(config);
-
- if (!isVisible($elem[0])) {
- return;
- }
-
- // resolve "auto" & "match" values
- if (gridster.width === 'auto') {
- gridster.curWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- } else {
- gridster.curWidth = gridster.width;
- }
-
- if (gridster.colWidth === 'auto') {
- gridster.curColWidth = (gridster.curWidth + (gridster.outerMargin ? -gridster.margins[1] : gridster.margins[1])) / gridster.columns;
- } else {
- gridster.curColWidth = gridster.colWidth;
- }
-
- gridster.curRowHeight = gridster.rowHeight;
- if (typeof gridster.rowHeight === 'string') {
- if (gridster.rowHeight === 'match') {
- gridster.curRowHeight = Math.round(gridster.curColWidth);
- } else if (gridster.rowHeight.indexOf('*') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth * gridster.rowHeight.replace('*', '').replace(' ', ''));
- } else if (gridster.rowHeight.indexOf('/') !== -1) {
- gridster.curRowHeight = Math.round(gridster.curColWidth / gridster.rowHeight.replace('/', '').replace(' ', ''));
- }
- }
-
- gridster.isMobile = gridster.mobileModeEnabled && gridster.curWidth <= gridster.mobileBreakPoint;
-
- // loop through all items and reset their CSS
- for (var rowIndex = 0, l = gridster.grid.length; rowIndex < l; ++rowIndex) {
- var columns = gridster.grid[rowIndex];
- if (!columns) {
- continue;
- }
-
- for (var colIndex = 0, len = columns.length; colIndex < len; ++colIndex) {
- if (columns[colIndex]) {
- var item = columns[colIndex];
- item.setElementPosition();
- item.setElementSizeY();
- item.setElementSizeX();
- }
- }
- }
-
- updateHeight();
- }
-
- var optionsKey = attrs.gridster;
- if (optionsKey) {
- scope.$parent.$watch(optionsKey, function(newConfig) {
- refresh(newConfig);
- }, true);
- } else {
- refresh({});
- }
-
- scope.$watch(function() {
- return gridster.loaded;
- }, function() {
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- } else {
- $elem.removeClass('gridster-loaded');
- }
- });
-
- scope.$watch(function() {
- return gridster.isMobile;
- }, function() {
- if (gridster.isMobile) {
- $elem.addClass('gridster-mobile').removeClass('gridster-desktop');
- } else {
- $elem.removeClass('gridster-mobile').addClass('gridster-desktop');
- }
- $rootScope.$broadcast('gridster-mobile-changed', gridster);
- });
-
- scope.$watch(function() {
- return gridster.draggable;
- }, function() {
- $rootScope.$broadcast('gridster-draggable-changed', gridster);
- }, true);
-
- scope.$watch(function() {
- return gridster.resizable;
- }, function() {
- $rootScope.$broadcast('gridster-resizable-changed', gridster);
- }, true);
-
- function updateHeight() {
- if(gridster.gridHeight){ //need to put this check, otherwise fail in IE8
- $elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px');
- }
- }
-
- scope.$watch(function() {
- return gridster.gridHeight;
- }, updateHeight);
-
- scope.$watch(function() {
- return gridster.movingItem;
- }, function() {
- gridster.updateHeight(gridster.movingItem ? gridster.movingItem.sizeY : 0);
- });
-
- var prevWidth = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- var resize = function() {
- var width = $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
-
- if (!width || width === prevWidth || gridster.movingItem) {
- return;
- }
- prevWidth = width;
-
- if (gridster.loaded) {
- $elem.removeClass('gridster-loaded');
- }
-
- refresh();
-
- if (gridster.loaded) {
- $elem.addClass('gridster-loaded');
- }
-
- $rootScope.$broadcast('gridster-resized', [width, $elem[0].offsetHeight], gridster);
- };
-
- // track element width changes any way we can
- var onResize = gridsterDebounce(function onResize() {
- resize();
- $timeout(function() {
- scope.$apply();
- });
- }, 100);
-
- scope.$watch(function() {
- return isVisible($elem[0]);
- }, onResize);
-
- // see https://github.com/sdecima/javascript-detect-element-resize
- if (typeof window.addResizeListener === 'function') {
- window.addResizeListener($elem[0], onResize);
- } else {
- scope.$watch(function() {
- return $elem[0].offsetWidth || parseInt($elem.css('width'), 10);
- }, resize);
- }
- var $win = angular.element($window);
- $win.on('resize', onResize);
-
- // be sure to cleanup
- scope.$on('$destroy', function() {
- gridster.destroy();
- $win.off('resize', onResize);
- if (typeof window.removeResizeListener === 'function') {
- window.removeResizeListener($elem[0], onResize);
- }
- });
-
- // allow a little time to place items before floating up
- $timeout(function() {
- scope.$watch('gridster.floating', function() {
- gridster.floatItemsUp();
- });
- gridster.loaded = true;
- }, 100);
- };
- }
- };
- }
- ])
-
- .controller('GridsterItemCtrl', function() {
- this.$element = null;
- this.gridster = null;
- this.row = null;
- this.col = null;
- this.sizeX = null;
- this.sizeY = null;
- this.minSizeX = 0;
- this.minSizeY = 0;
- this.maxSizeX = null;
- this.maxSizeY = null;
-
- this.init = function($element, gridster) {
- this.$element = $element;
- this.gridster = gridster;
- this.sizeX = gridster.defaultSizeX;
- this.sizeY = gridster.defaultSizeY;
- };
-
- this.destroy = function() {
- // set these to null to avoid the possibility of circular references
- this.gridster = null;
- this.$element = null;
- };
-
- /**
- * Returns the items most important attributes
- */
- this.toJSON = function() {
- return {
- row: this.row,
- col: this.col,
- sizeY: this.sizeY,
- sizeX: this.sizeX
- };
- };
-
- this.isMoving = function() {
- return this.gridster.movingItem === this;
- };
-
- /**
- * Set the items position
- *
- * @param {Number} row
- * @param {Number} column
- */
- this.setPosition = function(row, column) {
- this.gridster.putItem(this, row, column);
-
- if (!this.isMoving()) {
- this.setElementPosition();
- }
- };
-
- /**
- * Sets a specified size property
- *
- * @param {String} key Can be either "x" or "y"
- * @param {Number} value The size amount
- * @param {Boolean} preventMove
- */
- this.setSize = function(key, value, preventMove) {
- key = key.toUpperCase();
- var camelCase = 'size' + key,
- titleCase = 'Size' + key;
- if (value === '') {
- return;
- }
- value = parseInt(value, 10);
- if (isNaN(value) || value === 0) {
- value = this.gridster['default' + titleCase];
- }
- var max = key === 'X' ? this.gridster.columns : this.gridster.maxRows;
- if (this['max' + titleCase]) {
- max = Math.min(this['max' + titleCase], max);
- }
- if (this.gridster['max' + titleCase]) {
- max = Math.min(this.gridster['max' + titleCase], max);
- }
- if (key === 'X' && this.cols) {
- max -= this.cols;
- } else if (key === 'Y' && this.rows) {
- max -= this.rows;
- }
-
- var min = 0;
- if (this['min' + titleCase]) {
- min = Math.max(this['min' + titleCase], min);
- }
- if (this.gridster['min' + titleCase]) {
- min = Math.max(this.gridster['min' + titleCase], min);
- }
-
- value = Math.max(Math.min(value, max), min);
-
- var changed = (this[camelCase] !== value || (this['old' + titleCase] && this['old' + titleCase] !== value));
- this['old' + titleCase] = this[camelCase] = value;
-
- if (!this.isMoving()) {
- this['setElement' + titleCase]();
- }
- if (!preventMove && changed) {
- this.gridster.moveOverlappingItems(this);
- this.gridster.layoutChanged();
- }
-
- return changed;
- };
-
- /**
- * Sets the items sizeY property
- *
- * @param {Number} rows
- * @param {Boolean} preventMove
- */
- this.setSizeY = function(rows, preventMove) {
- return this.setSize('Y', rows, preventMove);
- };
-
- /**
- * Sets the items sizeX property
- *
- * @param {Number} columns
- * @param {Boolean} preventMove
- */
- this.setSizeX = function(columns, preventMove) {
- return this.setSize('X', columns, preventMove);
- };
-
- /**
- * Sets an elements position on the page
- */
- this.setElementPosition = function() {
- if (this.gridster.isMobile) {
- this.$element.css({
- marginLeft: this.gridster.margins[0] + 'px',
- marginRight: this.gridster.margins[0] + 'px',
- marginTop: this.gridster.margins[1] + 'px',
- marginBottom: this.gridster.margins[1] + 'px',
- top: '',
- left: ''
- });
- } else {
- this.$element.css({
- margin: 0,
- top: (this.row * this.gridster.curRowHeight + (this.gridster.outerMargin ? this.gridster.margins[0] : 0)) + 'px',
- left: (this.col * this.gridster.curColWidth + (this.gridster.outerMargin ? this.gridster.margins[1] : 0)) + 'px'
- });
- }
- };
-
- /**
- * Sets an elements height
- */
- this.setElementSizeY = function() {
- if (this.gridster.isMobile && !this.gridster.saveGridItemCalculatedHeightInMobile) {
- this.$element.css('height', '');
- } else {
- var computedHeight = (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]) + 'px';
- //this.$element.css('height', computedHeight);
- this.$element.attr('style', this.$element.attr('style') + '; ' + 'height: '+computedHeight+' !important;');
- }
- };
-
- /**
- * Sets an elements width
- */
- this.setElementSizeX = function() {
- if (this.gridster.isMobile) {
- this.$element.css('width', '');
- } else {
- this.$element.css('width', (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]) + 'px');
- }
- };
-
- /**
- * Gets an element's width
- */
- this.getElementSizeX = function() {
- return (this.sizeX * this.gridster.curColWidth - this.gridster.margins[1]);
- };
-
- /**
- * Gets an element's height
- */
- this.getElementSizeY = function() {
- return (this.sizeY * this.gridster.curRowHeight - this.gridster.margins[0]);
- };
-
- })
-
- .factory('GridsterTouch', [function() {
- return function GridsterTouch(target, startEvent, moveEvent, endEvent) {
- var lastXYById = {};
-
- // Opera doesn't have Object.keys so we use this wrapper
- var numberOfKeys = function(theObject) {
- if (Object.keys) {
- return Object.keys(theObject).length;
- }
-
- var n = 0,
- key;
- for (key in theObject) {
- ++n;
- }
-
- return n;
- };
-
- // this calculates the delta needed to convert pageX/Y to offsetX/Y because offsetX/Y don't exist in the TouchEvent object or in Firefox's MouseEvent object
- var computeDocumentToElementDelta = function(theElement) {
- var elementLeft = 0;
- var elementTop = 0;
- var oldIEUserAgent = navigator.userAgent.match(/\bMSIE\b/);
-
- for (var offsetElement = theElement; offsetElement != null; offsetElement = offsetElement.offsetParent) {
- // the following is a major hack for versions of IE less than 8 to avoid an apparent problem on the IEBlog with double-counting the offsets
- // this may not be a general solution to IE7's problem with offsetLeft/offsetParent
- if (oldIEUserAgent &&
- (!document.documentMode || document.documentMode < 8) &&
- offsetElement.currentStyle.position === 'relative' && offsetElement.offsetParent && offsetElement.offsetParent.currentStyle.position === 'relative' && offsetElement.offsetLeft === offsetElement.offsetParent.offsetLeft) {
- // add only the top
- elementTop += offsetElement.offsetTop;
- } else {
- elementLeft += offsetElement.offsetLeft;
- elementTop += offsetElement.offsetTop;
- }
- }
-
- return {
- x: elementLeft,
- y: elementTop
- };
- };
-
- // cache the delta from the document to our event target (reinitialized each mousedown/MSPointerDown/touchstart)
- var documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // common event handler for the mouse/pointer/touch models and their down/start, move, up/end, and cancel events
- var doEvent = function(theEvtObj) {
-
- if (theEvtObj.type === 'mousemove' && numberOfKeys(lastXYById) === 0) {
- return;
- }
-
- var prevent = true;
-
- var pointerList = theEvtObj.changedTouches ? theEvtObj.changedTouches : [theEvtObj];
-
- for (var i = 0; i < pointerList.length; ++i) {
- var pointerObj = pointerList[i];
- var pointerId = (typeof pointerObj.identifier !== 'undefined') ? pointerObj.identifier : (typeof pointerObj.pointerId !== 'undefined') ? pointerObj.pointerId : 1;
-
- // use the pageX/Y coordinates to compute target-relative coordinates when we have them (in ie < 9, we need to do a little work to put them there)
- if (typeof pointerObj.pageX === 'undefined') {
-
- // initialize assuming our source element is our target
- if(!ie8){
- pointerObj.pageX = pointerObj.offsetX + documentToTargetDelta.x;
- pointerObj.pageY = pointerObj.offsetY + documentToTargetDelta.y;
- }
- else{
- pointerObj.pageX = pointerObj.clientX;
- pointerObj.pageY = pointerObj.clientY;
- }
-
- if (pointerObj.srcElement.offsetParent === target && document.documentMode && document.documentMode === 8 && pointerObj.type === 'mousedown') {
- // source element is a child piece of VML, we're in IE8, and we've not called setCapture yet - add the origin of the source element
- pointerObj.pageX += pointerObj.srcElement.offsetLeft;
- pointerObj.pageY += pointerObj.srcElement.offsetTop;
- } else if (pointerObj.srcElement !== target && !document.documentMode || document.documentMode < 8) {
- // source element isn't the target (most likely it's a child piece of VML) and we're in a version of IE before IE8 -
- // the offsetX/Y values are unpredictable so use the clientX/Y values and adjust by the scroll offsets of its parents
- // to get the document-relative coordinates (the same as pageX/Y)
- var sx = -2,
- sy = -2; // adjust for old IE's 2-pixel border
- for (var scrollElement = pointerObj.srcElement; scrollElement !== null; scrollElement = scrollElement.parentNode) {
- sx += scrollElement.scrollLeft ? scrollElement.scrollLeft : 0;
- sy += scrollElement.scrollTop ? scrollElement.scrollTop : 0;
- }
-
- pointerObj.pageX = pointerObj.clientX + sx;
- pointerObj.pageY = pointerObj.clientY + sy;
- }
- }
-
-
- var pageX = pointerObj.pageX;
- var pageY = pointerObj.pageY;
-
- if (theEvtObj.type.match(/(start|down)$/i)) {
- // clause for processing MSPointerDown, touchstart, and mousedown
-
- // refresh the document-to-target delta on start in case the target has moved relative to document
- documentToTargetDelta = computeDocumentToElementDelta(target);
-
- // protect against failing to get an up or end on this pointerId
- if (lastXYById[pointerId]) {
- if (endEvent) {
- endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- delete lastXYById[pointerId];
- }
-
- if (startEvent) {
- if (prevent) {
- prevent = startEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
- }
-
- // init last page positions for this pointer
- lastXYById[pointerId] = {
- x: pageX,
- y: pageY
- };
-
- // IE pointer model
- if (target.msSetPointerCapture) {
- target.msSetPointerCapture(pointerId);
- } else if (theEvtObj.type === 'mousedown' && numberOfKeys(lastXYById) === 1) {
- if (useSetReleaseCapture) {
- target.setCapture(true);
- } else {
- document.addEventListener('mousemove', doEvent, false);
- document.addEventListener('mouseup', doEvent, false);
- }
- }
- } else if (theEvtObj.type.match(/move$/i)) {
- // clause handles mousemove, MSPointerMove, and touchmove
-
- if (lastXYById[pointerId] && !(lastXYById[pointerId].x === pageX && lastXYById[pointerId].y === pageY)) {
- // only extend if the pointer is down and it's not the same as the last point
-
- if (moveEvent && prevent) {
- prevent = moveEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // update last page positions for this pointer
- lastXYById[pointerId].x = pageX;
- lastXYById[pointerId].y = pageY;
- }
- } else if (lastXYById[pointerId] && theEvtObj.type.match(/(up|end|cancel)$/i)) {
- // clause handles up/end/cancel
-
- if (endEvent && prevent) {
- prevent = endEvent({
- target: theEvtObj.target,
- which: theEvtObj.which,
- pointerId: pointerId,
- pageX: pageX,
- pageY: pageY
- });
- }
-
- // delete last page positions for this pointer
- delete lastXYById[pointerId];
-
- // in the Microsoft pointer model, release the capture for this pointer
- // in the mouse model, release the capture or remove document-level event handlers if there are no down points
- // nothing is required for the iOS touch model because capture is implied on touchstart
- if (target.msReleasePointerCapture) {
- target.msReleasePointerCapture(pointerId);
- } else if (theEvtObj.type === 'mouseup' && numberOfKeys(lastXYById) === 0) {
- if (useSetReleaseCapture) {
- target.releaseCapture();
- } else {
- document.removeEventListener('mousemove', doEvent, false);
- document.removeEventListener('mouseup', doEvent, false);
- }
- }
- }
- }
-
- if (prevent) {
- if (theEvtObj.preventDefault) {
- theEvtObj.preventDefault();
- }
-
- if (theEvtObj.preventManipulation) {
- theEvtObj.preventManipulation();
- }
-
- if (theEvtObj.preventMouseEvent) {
- theEvtObj.preventMouseEvent();
- }
- }
- };
-
- var useSetReleaseCapture = false;
- // saving the settings for contentZooming and touchaction before activation
- var contentZooming, msTouchAction;
-
- this.enable = function() {
-
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.addEventListener('MSPointerDown', doEvent, false);
- target.addEventListener('MSPointerMove', doEvent, false);
- target.addEventListener('MSPointerUp', doEvent, false);
- target.addEventListener('MSPointerCancel', doEvent, false);
-
- // css way to prevent panning in our target area
- if (typeof target.style.msContentZooming !== 'undefined') {
- contentZooming = target.style.msContentZooming;
- target.style.msContentZooming = 'none';
- }
-
- // new in Windows Consumer Preview: css way to prevent all built-in touch actions on our target
- // without this, you cannot touch draw on the element because IE will intercept the touch events
- if (typeof target.style.msTouchAction !== 'undefined') {
- msTouchAction = target.style.msTouchAction;
- target.style.msTouchAction = 'none';
- }
- } else if (target.addEventListener) {
- // iOS touch model
- target.addEventListener('touchstart', doEvent, false);
- target.addEventListener('touchmove', doEvent, false);
- target.addEventListener('touchend', doEvent, false);
- target.addEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.addEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.addEventListener('mousemove', doEvent, false);
- target.addEventListener('mouseup', doEvent, false);
- }
- } else if (target.attachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.attachEvent('onmousedown', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmousemove', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- target.attachEvent('onmouseup', function() {
- doEvent(window.event);
- window.event.returnValue = false;
- return false;
- });
- }
- };
-
- this.disable = function() {
- if (window.navigator.msPointerEnabled) {
- // Microsoft pointer model
- target.removeEventListener('MSPointerDown', doEvent, false);
- target.removeEventListener('MSPointerMove', doEvent, false);
- target.removeEventListener('MSPointerUp', doEvent, false);
- target.removeEventListener('MSPointerCancel', doEvent, false);
-
- // reset zooming to saved value
- if (contentZooming) {
- target.style.msContentZooming = contentZooming;
- }
-
- // reset touch action setting
- if (msTouchAction) {
- target.style.msTouchAction = msTouchAction;
- }
- } else if (target.removeEventListener) {
- // iOS touch model
- target.removeEventListener('touchstart', doEvent, false);
- target.removeEventListener('touchmove', doEvent, false);
- target.removeEventListener('touchend', doEvent, false);
- target.removeEventListener('touchcancel', doEvent, false);
-
- // mouse model
- target.removeEventListener('mousedown', doEvent, false);
-
- // mouse model with capture
- // rejecting gecko because, unlike ie, firefox does not send events to target when the mouse is outside target
- if (target.setCapture && !window.navigator.userAgent.match(/\bGecko\b/)) {
- useSetReleaseCapture = true;
-
- target.removeEventListener('mousemove', doEvent, false);
- target.removeEventListener('mouseup', doEvent, false);
- }
- } else if (target.detachEvent && target.setCapture) {
- // legacy IE mode - mouse with capture
- useSetReleaseCapture = true;
- target.detachEvent('onmousedown');
- target.detachEvent('onmousemove');
- target.detachEvent('onmouseup');
- }
- };
-
- return this;
- };
- }])
-
- .factory('GridsterDraggable', ['$document', '$timeout', '$window', 'GridsterTouch',
- function($document, $timeout, $window, GridsterTouch) {
- function GridsterDraggable($el, scope, gridster, item, itemOptions) {
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0,
- realdocument = $document[0];
-
- var originalCol, originalRow;
- var inputTags = ['select', 'input', 'textarea', 'button'];
-
- var gridsterItemDragElement = $el[0].querySelector('[gridster-item-drag]');
- //console.log(gridsterItemDragElement);
- var isDraggableAreaDefined = gridsterItemDragElement?true:false;
- //console.log(isDraggableAreaDefined);
-
- function mouseDown(e) {
-
- if(ie8){
- e.target = window.event.srcElement;
- e.which = window.event.button;
- }
-
- if(isDraggableAreaDefined && (!gridsterItemDragElement.contains(e.target))){
- return false;
- }
-
- if (inputTags.indexOf(e.target.nodeName.toLowerCase()) !== -1) {
- return false;
- }
-
- var $target = angular.element(e.target);
-
- // exit, if a resize handle was hit
- if ($target.hasClass('gridster-item-resizable-handler')) {
- return false;
- }
-
- // exit, if the target has it's own click event
- if ($target.attr('onclick') || $target.attr('ng-click')) {
- return false;
- }
-
- // only works if you have jQuery
- if ($target.closest && $target.closest('.gridster-no-drag').length) {
- return false;
- }
-
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalCol = item.col;
- originalRow = item.row;
-
- dragStart(e);
-
- return true;
- }
-
- function mouseMove(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dX = diffX,
- dY = diffY;
- if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
-
- if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmX += diffX;
- elmY += diffY;
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px'
- });
-
- drag(e);
-
- return true;
- }
-
- function mouseUp(e) {
- if (!$el.hasClass('gridster-item-moving') || $el.hasClass('gridster-item-resizing')) {
- return false;
- }
-
- mOffX = mOffY = 0;
-
- dragStop(e);
-
- return true;
- }
-
- function dragStart(event) {
- $el.addClass('gridster-item-moving');
- gridster.movingItem = item;
-
- gridster.updateHeight(item.sizeY);
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.start) {
- gridster.draggable.start(event, $el, itemOptions);
- }
- });
- }
-
- function drag(event) {
- var oldRow = item.row,
- oldCol = item.col,
- hasCallback = gridster.draggable && gridster.draggable.drag,
- scrollSensitivity = gridster.draggable.scrollSensitivity,
- scrollSpeed = gridster.draggable.scrollSpeed;
-
- var row = gridster.pixelsToRows(elmY);
- var col = gridster.pixelsToColumns(elmX);
-
- var itemsInTheWay = gridster.getItems(row, col, item.sizeX, item.sizeY, item);
- var hasItemsInTheWay = itemsInTheWay.length !== 0;
-
- if (gridster.swapping === true && hasItemsInTheWay) {
- var boundingBoxItem = gridster.getBoundingBox(itemsInTheWay),
- sameSize = boundingBoxItem.sizeX === item.sizeX && boundingBoxItem.sizeY === item.sizeY,
- sameRow = boundingBoxItem.row === oldRow,
- sameCol = boundingBoxItem.col === oldCol,
- samePosition = boundingBoxItem.row === row && boundingBoxItem.col === col,
- inline = sameRow || sameCol;
-
- if (sameSize && itemsInTheWay.length === 1) {
- if (samePosition) {
- gridster.swapItems(item, itemsInTheWay[0]);
- } else if (inline) {
- return;
- }
- } else if (boundingBoxItem.sizeX <= item.sizeX && boundingBoxItem.sizeY <= item.sizeY && inline) {
- var emptyRow = item.row <= row ? item.row : row + item.sizeY,
- emptyCol = item.col <= col ? item.col : col + item.sizeX,
- rowOffset = emptyRow - boundingBoxItem.row,
- colOffset = emptyCol - boundingBoxItem.col;
-
- for (var i = 0, l = itemsInTheWay.length; i < l; ++i) {
- var itemInTheWay = itemsInTheWay[i];
-
- var itemsInFreeSpace = gridster.getItems(
- itemInTheWay.row + rowOffset,
- itemInTheWay.col + colOffset,
- itemInTheWay.sizeX,
- itemInTheWay.sizeY,
- item
- );
-
- if (itemsInFreeSpace.length === 0) {
- gridster.putItem(itemInTheWay, itemInTheWay.row + rowOffset, itemInTheWay.col + colOffset);
- }
- }
- }
- }
-
- if (gridster.pushing !== false || !hasItemsInTheWay) {
- item.row = row;
- item.col = col;
- }
-
- if(($window.navigator.appName === 'Microsoft Internet Explorer' && !ie8) || $window.navigator.userAgent.indexOf("Firefox")!==-1){
- if (event.pageY - realdocument.documentElement.scrollTop < scrollSensitivity) {
- realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.documentElement.scrollTop) < scrollSensitivity) {
- realdocument.documentElement.scrollTop = realdocument.documentElement.scrollTop + scrollSpeed;
- }
- }
- else{
- if (event.pageY - realdocument.body.scrollTop < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop - scrollSpeed;
- } else if ($window.innerHeight - (event.pageY - realdocument.body.scrollTop) < scrollSensitivity) {
- realdocument.body.scrollTop = realdocument.body.scrollTop + scrollSpeed;
- }
- }
-
-
-
- if (event.pageX - realdocument.body.scrollLeft < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft - scrollSpeed;
- } else if ($window.innerWidth - (event.pageX - realdocument.body.scrollLeft) < scrollSensitivity) {
- realdocument.body.scrollLeft = realdocument.body.scrollLeft + scrollSpeed;
- }
-
- if (hasCallback || oldRow !== item.row || oldCol !== item.col) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.draggable.drag(event, $el, itemOptions);
- }
- });
- }
- }
-
- function dragStop(event) {
- $el.removeClass('gridster-item-moving');
- var row = gridster.pixelsToRows(elmY);
- var col = gridster.pixelsToColumns(elmX);
- if (gridster.pushing !== false || gridster.getItems(row, col, item.sizeX, item.sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- }
- gridster.movingItem = null;
- item.setPosition(item.row, item.col);
-
- scope.$apply(function() {
- if (gridster.draggable && gridster.draggable.stop) {
- gridster.draggable.stop(event, $el, itemOptions);
- }
- });
- }
-
- var enabled = null;
- var $dragHandles = null;
- var unifiedInputs = [];
-
- this.enable = function() {
- if (enabled === true) {
- return;
- }
-
- // disable and timeout required for some template rendering
- $timeout(function() {
- // disable any existing draghandles
- for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) {
- unifiedInputs[u].disable();
- }
- unifiedInputs = [];
-
- if (gridster.draggable && gridster.draggable.handle) {
- $dragHandles = angular.element($el[0].querySelectorAll(gridster.draggable.handle));
- if ($dragHandles.length === 0) {
- // fall back to element if handle not found...
- $dragHandles = $el;
- }
- } else {
- $dragHandles = $el;
- }
-
- for (var h = 0, hl = $dragHandles.length; h < hl; ++h) {
- unifiedInputs[h] = new GridsterTouch($dragHandles[h], mouseDown, mouseMove, mouseUp);
- unifiedInputs[h].enable();
- }
-
- enabled = true;
- });
- };
-
- this.disable = function() {
- if (enabled === false) {
- return;
- }
-
- // timeout to avoid race contition with the enable timeout
- $timeout(function() {
-
- for (var u = 0, ul = unifiedInputs.length; u < ul; ++u) {
- unifiedInputs[u].disable();
- }
-
- unifiedInputs = [];
- enabled = false;
- });
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- return GridsterDraggable;
- }
- ])
-
- .factory('GridsterResizable', ['GridsterTouch', function(GridsterTouch) {
- function GridsterResizable($el, scope, gridster, item, itemOptions) {
-
- function ResizeHandle(handleClass) {
-
- var hClass = handleClass;
-
- var elmX, elmY, elmW, elmH,
-
- mouseX = 0,
- mouseY = 0,
- lastMouseX = 0,
- lastMouseY = 0,
- mOffX = 0,
- mOffY = 0,
-
- minTop = 0,
- maxTop = 9999,
- minLeft = 0;
-
- var getMinHeight = function() {
- return (item.minSizeY ? item.minSizeY : 1) * gridster.curRowHeight - gridster.margins[0];
- };
- var getMinWidth = function() {
- return (item.minSizeX ? item.minSizeX : 1) * gridster.curColWidth - gridster.margins[1];
- };
-
- var originalWidth, originalHeight;
- var savedDraggable;
-
- function mouseDown(e) {
- switch (e.which) {
- case 1:
- // left mouse button
- break;
- case 2:
- case 3:
- // right or middle mouse button
- return;
- }
-
- // save the draggable setting to restore after resize
- savedDraggable = gridster.draggable.enabled;
- if (savedDraggable) {
- gridster.draggable.enabled = false;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- // Get the current mouse position.
- lastMouseX = e.pageX;
- lastMouseY = e.pageY;
-
- // Record current widget dimensions
- elmX = parseInt($el.css('left'), 10);
- elmY = parseInt($el.css('top'), 10);
- elmW = $el[0].offsetWidth;
- elmH = $el[0].offsetHeight;
-
- originalWidth = item.sizeX;
- originalHeight = item.sizeY;
-
- resizeStart(e);
-
- return true;
- }
-
- function resizeStart(e) {
- $el.addClass('gridster-item-moving');
- $el.addClass('gridster-item-resizing');
-
- gridster.movingItem = item;
-
- item.setElementSizeX();
- item.setElementSizeY();
- item.setElementPosition();
- gridster.updateHeight(1);
-
- scope.$apply(function() {
- // callback
- if (gridster.resizable && gridster.resizable.start) {
- gridster.resizable.start(e, $el, itemOptions); // options is the item model
- }
- });
- }
-
- function mouseMove(e) {
- var maxLeft = gridster.curWidth - 1;
-
- // Get the current mouse position.
- mouseX = e.pageX;
- mouseY = e.pageY;
-
- // Get the deltas
- var diffX = mouseX - lastMouseX + mOffX;
- var diffY = mouseY - lastMouseY + mOffY;
- mOffX = mOffY = 0;
-
- // Update last processed mouse positions.
- lastMouseX = mouseX;
- lastMouseY = mouseY;
-
- var dY = diffY,
- dX = diffX;
-
- if (hClass.indexOf('n') >= 0) {
- if (elmH - dY < getMinHeight()) {
- diffY = elmH - getMinHeight();
- mOffY = dY - diffY;
- } else if (elmY + dY < minTop) {
- diffY = minTop - elmY;
- mOffY = dY - diffY;
- }
- elmY += diffY;
- elmH -= diffY;
- }
- if (hClass.indexOf('s') >= 0) {
- if (elmH + dY < getMinHeight()) {
- diffY = getMinHeight() - elmH;
- mOffY = dY - diffY;
- } else if (elmY + elmH + dY > maxTop) {
- diffY = maxTop - elmY - elmH;
- mOffY = dY - diffY;
- }
- elmH += diffY;
- }
- if (hClass.indexOf('w') >= 0) {
- if (elmW - dX < getMinWidth()) {
- diffX = elmW - getMinWidth();
- mOffX = dX - diffX;
- } else if (elmX + dX < minLeft) {
- diffX = minLeft - elmX;
- mOffX = dX - diffX;
- }
- elmX += diffX;
- elmW -= diffX;
- }
- if (hClass.indexOf('e') >= 0) {
- if (elmW + dX < getMinWidth()) {
- diffX = getMinWidth() - elmW;
- mOffX = dX - diffX;
- } else if (elmX + elmW + dX > maxLeft) {
- diffX = maxLeft - elmX - elmW;
- mOffX = dX - diffX;
- }
- elmW += diffX;
- }
-
- // set new position
- $el.css({
- 'top': elmY + 'px',
- 'left': elmX + 'px',
- 'width': elmW + 'px',
- 'height': elmH + 'px'
- });
-
- resize(e);
-
- return true;
- }
-
- function mouseUp(e) {
- // restore draggable setting to its original state
- if (gridster.draggable.enabled !== savedDraggable) {
- gridster.draggable.enabled = savedDraggable;
- scope.$broadcast('gridster-draggable-changed', gridster);
- }
-
- mOffX = mOffY = 0;
-
- resizeStop(e);
-
- return true;
- }
-
- function resize(e) {
- var oldRow = item.row,
- oldCol = item.col,
- oldSizeX = item.sizeX,
- oldSizeY = item.sizeY,
- hasCallback = gridster.resizable && gridster.resizable.resize;
-
- var col = item.col;
- // only change column if grabbing left edge
- if (['w', 'nw', 'sw'].indexOf(handleClass) !== -1) {
- col = gridster.pixelsToColumns(elmX, false);
- }
-
- var row = item.row;
- // only change row if grabbing top edge
- if (['n', 'ne', 'nw'].indexOf(handleClass) !== -1) {
- row = gridster.pixelsToRows(elmY, false);
- }
-
- var sizeX = item.sizeX;
- // only change row if grabbing left or right edge
- if (['n', 's'].indexOf(handleClass) === -1) {
- sizeX = gridster.pixelsToColumns(elmW, true);
- }
-
- var sizeY = item.sizeY;
- // only change row if grabbing top or bottom edge
- if (['e', 'w'].indexOf(handleClass) === -1) {
- sizeY = gridster.pixelsToRows(elmH, true);
- }
-
- if (gridster.pushing !== false || gridster.getItems(row, col, sizeX, sizeY, item).length === 0) {
- item.row = row;
- item.col = col;
- item.sizeX = sizeX;
- item.sizeY = sizeY;
- }
- var isChanged = item.row !== oldRow || item.col !== oldCol || item.sizeX !== oldSizeX || item.sizeY !== oldSizeY;
-
- if (hasCallback || isChanged) {
- scope.$apply(function() {
- if (hasCallback) {
- gridster.resizable.resize(e, $el, itemOptions); // options is the item model
- }
- });
- }
- }
-
- function resizeStop(e) {
- $el.removeClass('gridster-item-moving');
- $el.removeClass('gridster-item-resizing');
-
- gridster.movingItem = null;
-
- item.setPosition(item.row, item.col);
- item.setSizeY(item.sizeY);
- item.setSizeX(item.sizeX);
-
- scope.$apply(function() {
- if (gridster.resizable && gridster.resizable.stop) {
- gridster.resizable.stop(e, $el, itemOptions); // options is the item model
- }
- });
- }
-
- var $dragHandle = null;
- var unifiedInput;
-
- this.enable = function() {
- if (!$dragHandle) {
- $dragHandle = angular.element('<div class="gridster-item-resizable-handler handle-' + hClass + '"></div>');
- $el.append($dragHandle);
- }
-
- unifiedInput = new GridsterTouch($dragHandle[0], mouseDown, mouseMove, mouseUp);
- unifiedInput.enable();
- };
-
- this.disable = function() {
- if ($dragHandle) {
- $dragHandle.remove();
- $dragHandle = null;
- }
-
- unifiedInput.disable();
- unifiedInput = undefined;
- };
-
- this.destroy = function() {
- this.disable();
- };
- }
-
- var handles = [];
- var handlesOpts = gridster.resizable.handles;
- if (typeof handlesOpts === 'string') {
- handlesOpts = gridster.resizable.handles.split(',');
- }
- var enabled = false;
-
- for (var c = 0, l = handlesOpts.length; c < l; c++) {
- handles.push(new ResizeHandle(handlesOpts[c]));
- }
-
- this.enable = function() {
- if (enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].enable();
- }
- enabled = true;
- };
-
- this.disable = function() {
- if (!enabled) {
- return;
- }
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].disable();
- }
- enabled = false;
- };
-
- this.toggle = function(enabled) {
- if (enabled) {
- this.enable();
- } else {
- this.disable();
- }
- };
-
- this.destroy = function() {
- for (var c = 0, l = handles.length; c < l; c++) {
- handles[c].destroy();
- }
- };
- }
- return GridsterResizable;
- }])
-
- .factory('gridsterDebounce', function() {
- return function gridsterDebounce(func, wait, immediate) {
- var timeout;
- return function() {
- var context = this,
- args = arguments;
- var later = function() {
- timeout = null;
- if (!immediate) {
- func.apply(context, args);
- }
- };
- var callNow = immediate && !timeout;
- clearTimeout(timeout);
- timeout = setTimeout(later, wait);
- if (callNow) {
- func.apply(context, args);
- }
- };
- };
- })
-
- /**
- * GridsterItem directive
- * @param $parse
- * @param GridsterDraggable
- * @param GridsterResizable
- * @param gridsterDebounce
- */
- .directive('gridsterItem', ['$parse', 'GridsterDraggable', 'GridsterResizable', 'gridsterDebounce',
- function($parse, GridsterDraggable, GridsterResizable, gridsterDebounce) {
- return {
- scope: true,
- restrict: 'EA',
- controller: 'GridsterItemCtrl',
- controllerAs: 'gridsterItem',
- require: ['^gridster', 'gridsterItem'],
- link: function(scope, $el, attrs, controllers) {
- var optionsKey = attrs.gridsterItem,
- options;
-
- var gridster = controllers[0],
- item = controllers[1];
-
- scope.gridster = gridster;
-
-
- // bind the item's position properties
- // options can be an object specified by gridster-item="object"
- // or the options can be the element html attributes object
- if (optionsKey) {
- var $optionsGetter = $parse(optionsKey);
- options = $optionsGetter(scope) || {};
- if (!options && $optionsGetter.assign) {
- options = {
- row: item.row,
- col: item.col,
- sizeX: item.sizeX,
- sizeY: item.sizeY,
- minSizeX: 0,
- minSizeY: 0,
- maxSizeX: null,
- maxSizeY: null
- };
- $optionsGetter.assign(scope, options);
- }
- } else {
- options = attrs;
- }
-
- item.init($el, gridster);
-
- $el.addClass('gridster-item');
-
- var aspects = ['minSizeX', 'maxSizeX', 'minSizeY', 'maxSizeY', 'sizeX', 'sizeY', 'row', 'col'],
- $getters = {};
-
- var expressions = [];
- var aspectFn = function(aspect) {
- var expression;
- if (typeof options[aspect] === 'string') {
- // watch the expression in the scope
- expression = options[aspect];
- } else if (typeof options[aspect.toLowerCase()] === 'string') {
- // watch the expression in the scope
- expression = options[aspect.toLowerCase()];
- } else if (optionsKey) {
- // watch the expression on the options object in the scope
- expression = optionsKey + '.' + aspect;
- } else {
- return;
- }
- expressions.push('"' + aspect + '":' + expression);
- $getters[aspect] = $parse(expression);
-
- // initial set
- var val = $getters[aspect](scope);
- if (typeof val === 'number') {
- item[aspect] = val;
- }
- };
-
- for (var i = 0, l = aspects.length; i < l; ++i) {
- aspectFn(aspects[i]);
- }
-
- var watchExpressions = '{' + expressions.join(',') + '}';
-
- // when the value changes externally, update the internal item object
- scope.$watchCollection(watchExpressions, function(newVals, oldVals) {
- for (var aspect in newVals) {
- var newVal = newVals[aspect];
- var oldVal = oldVals[aspect];
- if (oldVal === newVal) {
- continue;
- }
- newVal = parseInt(newVal, 10);
- if (!isNaN(newVal)) {
- item[aspect] = newVal;
- }
- }
- });
-
- function positionChanged() {
- // call setPosition so the element and gridster controller are updated
- item.setPosition(item.row, item.col);
-
- // when internal item position changes, update externally bound values
- if ($getters.row && $getters.row.assign) {
- $getters.row.assign(scope, item.row);
- }
- if ($getters.col && $getters.col.assign) {
- $getters.col.assign(scope, item.col);
- }
- }
- scope.$watch(function() {
- return item.row + ',' + item.col;
- }, positionChanged);
-
- function sizeChanged() {
- var changedX = item.setSizeX(item.sizeX, true);
- if (changedX && $getters.sizeX && $getters.sizeX.assign) {
- $getters.sizeX.assign(scope, item.sizeX);
- }
- var changedY = item.setSizeY(item.sizeY, true);
- if (changedY && $getters.sizeY && $getters.sizeY.assign) {
- $getters.sizeY.assign(scope, item.sizeY);
- }
-
- if (changedX || changedY) {
- item.gridster.moveOverlappingItems(item);
- gridster.layoutChanged();
- scope.$broadcast('gridster-item-resized', item);
- }
- }
-
- scope.$watch(function() {
- return item.sizeY + ',' + item.sizeX + ',' + item.minSizeX + ',' + item.maxSizeX + ',' + item.minSizeY + ',' + item.maxSizeY;
- }, sizeChanged);
-
- var draggable = new GridsterDraggable($el, scope, gridster, item, options);
- var resizable = new GridsterResizable($el, scope, gridster, item, options);
-
- var updateResizable = function() {
- resizable.toggle(!gridster.isMobile && gridster.resizable && gridster.resizable.enabled);
- };
- updateResizable();
-
- var updateDraggable = function() {
- draggable.toggle(!gridster.isMobile && gridster.draggable && gridster.draggable.enabled);
- };
- updateDraggable();
-
- scope.$on('gridster-draggable-changed', updateDraggable);
- scope.$on('gridster-resizable-changed', updateResizable);
- scope.$on('gridster-resized', updateResizable);
- scope.$on('gridster-mobile-changed', function() {
- updateResizable();
- updateDraggable();
- });
-
- function whichTransitionEvent() {
- var el = document.createElement('div');
- var transitions = {
- 'transition': 'transitionend',
- 'OTransition': 'oTransitionEnd',
- 'MozTransition': 'transitionend',
- 'WebkitTransition': 'webkitTransitionEnd'
- };
- for (var t in transitions) {
- if (el.style[t] !== undefined) {
- return transitions[t];
- }
- }
- }
-
- var debouncedTransitionEndPublisher = gridsterDebounce(function() {
- scope.$apply(function() {
- scope.$broadcast('gridster-item-transition-end', item);
- });
- }, 50);
-
- if(whichTransitionEvent()){ //check for IE8, as it evaluates to null
- $el.on(whichTransitionEvent(), debouncedTransitionEndPublisher);
- }
-
- scope.$broadcast('gridster-item-initialized', item);
-
- return scope.$on('$destroy', function() {
- try {
- resizable.destroy();
- draggable.destroy();
- } catch (e) {}
-
- try {
- gridster.removeItem(item);
- } catch (e) {}
-
- try {
- item.destroy();
- } catch (e) {}
- });
- }
- };
- }
- ])
-
- .directive('gridsterNoDrag', function() {
- return {
- restrict: 'A',
- link: function(scope, $element) {
- $element.addClass('gridster-no-drag');
- }
- };
- })
-
- ;
-
-}));
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js b/usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js
deleted file mode 100644
index 3ca3db7d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/att_angular_gridster/ui-gridster-tpls.js
+++ /dev/null
@@ -1,168 +0,0 @@
-/**
-* FileName ui-gridster
-* Version 0.0.1
-* Build number ad58c6f4f8f8fd7f04ac457f95d76f09
-* Date 08/17/2015
-*/
-
-
-(function(angular, window){
-angular.module("att.gridster", ["att.gridster.tpls", "att.gridster.utilities","att.gridster.gridster"]);
-angular.module("att.gridster.tpls", ["template/gridster/gridster.html","template/gridster/gridsterItem.html","template/gridster/gridsterItemBody.html","template/gridster/gridsterItemFooter.html","template/gridster/gridsterItemHeader.html"]);
-angular.module('att.gridster.utilities', [])
- .factory('$extendObj', [function() {
- var _extendDeep = function(dst) {
- angular.forEach(arguments, function(obj) {
- if (obj !== dst) {
- angular.forEach(obj, function(value, key) {
- if (dst[key] && dst[key].constructor && dst[key].constructor === Object) {
- _extendDeep(dst[key], value);
- } else {
- dst[key] = value;
- }
- });
- }
- });
- return dst;
- };
- return {
- extendDeep: _extendDeep
- };
- }]);
-
-angular.module('att.gridster.gridster', ['attGridsterLib', 'att.gridster.utilities'])
- .config(['$compileProvider', function($compileProvider) {
- $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|javascript):/);
- }])
- .constant('attGridsterConfig',
- {
- columns: 3,
- margins: [10, 10],
- outerMargin: true,
- pushing: true,
- floating: true,
- swapping: true,
- draggable: {
- enabled: true
- }
- })
- .directive('attGridster', ['attGridsterConfig', '$extendObj', function(attGridsterConfig, $extendObj) {
- return {
- restrict: 'EA',
- scope: {
- attGridsterOptions: '=?'
- },
- templateUrl: 'template/gridster/gridster.html',
- replace: false,
- transclude: true,
- controller: [function() {}],
- link: function(scope) {
- if (angular.isDefined(scope.attGridsterOptions)) {
- attGridsterConfig = $extendObj.extendDeep(attGridsterConfig, scope.attGridsterOptions);
- }
- scope.attGridsterConfig = attGridsterConfig;
- }
- };
- }])
- .directive('attGridsterItem', ['$timeout', function($timeout) {
- return {
- restrict: 'EA',
- require: ['^attGridster'],
- scope: {
- attGridsterItem: '='
- },
- templateUrl: 'template/gridster/gridsterItem.html',
- replace: false,
- transclude: true,
- controller: [function() {}]
- };
- }])
- .directive('attGridsterItemHeader', [function() {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {
- headerText: '@',
- subHeaderText: '@?'
- },
- templateUrl: 'template/gridster/gridsterItemHeader.html',
- replace: true,
- transclude: true,
- link: function(scope, element) {
- if (angular.isDefined(scope.subHeaderText) && scope.subHeaderText) {
- angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("tabindex", "0");
- angular.element(element[0].querySelector('span.gridster-item-sub-header-content')).attr("aria-label", scope.subHeaderText);
- }
- }
- };
- }])
- .directive('attGridsterItemBody', [function() {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {},
- templateUrl: 'template/gridster/gridsterItemBody.html',
- replace: true,
- transclude: true
- };
- }])
- .directive('attGridsterItemFooter', ['$location', function($location) {
- return {
- restrict: 'EA',
- require: ['^attGridsterItem'],
- scope: {
- attGridsterItemFooterLink: '@?'
- },
- templateUrl: 'template/gridster/gridsterItemFooter.html',
- replace: true,
- transclude: true,
- controller: ['$scope', function($scope) {
- $scope.clickOnFooterLink = function(evt) {
- evt.preventDefault();
- evt.stopPropagation();
- if ($scope.attGridsterItemFooterLink) {
- $location.url($scope.attGridsterItemFooterLink);
- }
- };
- }],
- link: function(scope, element) {
- if (angular.isDefined(scope.attGridsterItemFooterLink) && scope.attGridsterItemFooterLink) {
- element.attr("role", "link");
- }
- }
- };
- }]);
-angular.module("template/gridster/gridster.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridster.html",
- "<div gridster='attGridsterConfig'><div ng-transclude></div></div>");
-}]);
-
-angular.module("template/gridster/gridsterItem.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItem.html",
- "<div gridster-item='attGridsterItem' class=\"gridster-item-container\" ng-transclude></div>");
-}]);
-
-angular.module("template/gridster/gridsterItemBody.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemBody.html",
- "<div class=\"gridster-item-body\" ng-transclude></div>");
-}]);
-
-angular.module("template/gridster/gridsterItemFooter.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemFooter.html",
- "<div class=\"gridster-item-footer\" ng-click=\"clickOnFooterLink($event)\" tabindex=\"0\" ng-keydown=\"(($event.keyCode && $event.keyCode === 13) || ($event.which && $event.which === 13)) && clickOnFooterLink($event)\" >\n" +
- " <span class=\"gridster-item-footer-content\" ng-transclude></span>\n" +
- "</div>");
-}]);
-
-angular.module("template/gridster/gridsterItemHeader.html", []).run(["$templateCache", function($templateCache) {
- $templateCache.put("template/gridster/gridsterItemHeader.html",
- "<div class=\"gridster-item-header\">\n" +
- " <img gridster-item-drag src=\"static/fusion/images/att_angular_gridster/grips.png\" alt=\"||\" aria-label=\"Tap/Click to move\" class=\"gridster-item-handle\" />\n" +
- " <span class=\"gridster-item-header-content\" tabindex=\"0\" role=\"presentation\" aria-label=\"{{headerText}}\">{{headerText}}</span>\n" +
- " <span class=\"gridster-item-sub-header-content\" role=\"presentation\">{{subHeaderText}}</span>\n" +
- " <div class=\"gridster-item-header-buttons-container\" ng-transclude></div>\n" +
- "</div>");
-}]);
-
-return {}
-})(angular, window); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/jquery.resize.js b/usecaseui-common/src/main/webapp/static/fusion/js/jquery.resize.js
deleted file mode 100644
index 1ebd6c95..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/jquery.resize.js
+++ /dev/null
@@ -1,139 +0,0 @@
-/*!
- * jquery.resize.js 0.0.1 - https://github.com/yckart/jquery.resize.js
- * Resize-event for DOM-Nodes
- *
- * @see http://workingdraft.de/113/
- * @see http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
- *
- * Copyright (c) 2013 Yannick Albert (http://yckart.com)
- * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php).
- * 2013/04/01
- */
-
-(function(factory) {
- if(typeof define === 'function' && define.amd) {
- // AMD. Register as an anonymous module.
- define(['jquery'], factory);
- } else if(typeof exports === 'object') {
- // Node/CommonJS style for Browserify
- module.exports = factory;
- } else {
- // Browser globals
- factory(jQuery);
- }
-}(function($) {
-
- function addFlowListener(element, type, fn) {
- var flow = type == 'over';
- element.addEventListener('OverflowEvent' in window ? 'overflowchanged' : type + 'flow', function(e) {
- if(e.type == (type + 'flow') || ((e.orient == 0 && e.horizontalOverflow == flow) || (e.orient == 1 && e.verticalOverflow == flow) || (e.orient == 2 && e.horizontalOverflow == flow && e.verticalOverflow == flow))) {
- e.flow = type;
- return fn.call(this, e);
- }
- }, false);
- };
-
- function fireEvent(element, type, data, options) {
- var options = options || {},
- event = document.createEvent('Event');
- event.initEvent(type, 'bubbles' in options ? options.bubbles : true, 'cancelable' in options ? options.cancelable : true);
- for(var z in data) event[z] = data[z];
- element.dispatchEvent(event);
- };
-
- $.event.special.resize = {
- setup: function() {
- var element = this;
- var resize = 'onresize' in element;
- if(!resize && !element._resizeSensor) {
- var sensor = element._resizeSensor = document.createElement('div');
- sensor.className = 'resize-sensor';
- sensor.innerHTML = '<div class="resize-overflow"><div></div></div><div class="resize-underflow"><div></div></div>';
-
- var x = 0,
- y = 0,
- first = sensor.firstElementChild.firstChild,
- last = sensor.lastElementChild.firstChild,
- matchFlow = function(event) {
- var change = false,
- width = element.offsetWidth;
- if(x != width) {
- first.style.width = width - 1 + 'px';
- last.style.width = width + 1 + 'px';
- change = true;
- x = width;
- }
- var height = element.offsetHeight;
- if(y != height) {
- first.style.height = height - 1 + 'px';
- last.style.height = height + 1 + 'px';
- change = true;
- y = height;
- }
- if(change && event.currentTarget != element) fireEvent(element, 'resize');
- };
-
- if(getComputedStyle(element).position == 'static') {
- element.style.position = 'relative';
- element._resizeSensor._resetPosition = true;
- }
- addFlowListener(sensor, 'over', matchFlow);
- addFlowListener(sensor, 'under', matchFlow);
- addFlowListener(sensor.firstElementChild, 'over', matchFlow);
- addFlowListener(sensor.lastElementChild, 'under', matchFlow);
- element.appendChild(sensor);
- matchFlow({});
- }
- var events = element._flowEvents || (element._flowEvents = []);
- if(events.indexOf(handler) == -1) events.push(handler);
- if(!resize) element.addEventListener('resize', handler, false);
- element.onresize = function(e) {
- events.forEach(function(fn) {
- fn.call(element, e);
- });
- };
- },
-
- teardown: function() {
- var element = this;
- var index = element._flowEvents.indexOf(handler);
- if(index > -1) element._flowEvents.splice(index, 1);
- if(!element._flowEvents.length) {
- var sensor = element._resizeSensor;
- if(sensor) {
- element.removeChild(sensor);
- if(sensor._resetPosition) element.style.position = 'static';
- delete element._resizeSensor;
- }
- if('onresize' in element) element.onresize = null;
- delete element._flowEvents;
- }
- element.removeEventListener('resize', handler);
- }
- };
-
- $.fn.extend({
- resize: function(fn) {
- return fn ? this.bind("resize", fn) : this.trigger("resize");
- },
-
- unresize: function(fn) {
- return this.unbind("resize", fn);
- }
- });
-
-
- function handler(event) {
- var orgEvent = event || window.event,
- args = [].slice.call(arguments, 1);
-
- event = $.event.fix(orgEvent);
- event.type = "resize";
-
- // Add event to the front of the arguments
- args.unshift(event);
-
- return($.event.dispatch || $.event.handle).apply(this, args);
- }
-
-})); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/layout/debug.js b/usecaseui-common/src/main/webapp/static/fusion/js/layout/debug.js
deleted file mode 100644
index eff36a25..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/layout/debug.js
+++ /dev/null
@@ -1,329 +0,0 @@
-/**
- * debugData
- *
- * Pass me a data structure {} and I'll output all the key/value pairs - recursively
- *
- * @example var HTML = debugData( oElem.style, "Element.style", { keys: "top,left,width,height", recurse: true, sort: true, display: true, returnHTML: true });
- *
- * @param Object o_Data A JSON-style data structure
- * @param String s_Title Title for dialog (optional)
- * @param Hash options Pass additional options in a hash
- */
-function debugData (o_Data, s_Title, options) {
- options = options || {};
- var
- str=(s_Title||s_Title==='' ? s_Title : 'DATA')
- , dType=$.type(o_Data)
- // maintain backward compatibility with OLD 'recurseData' param
- , recurse=($.type(options)==='boolean' ? options : options.recurse !==false)
- , keys=(options.keys?','+options.keys+',':false)
- , display=options.display !==false
- , html=options.returnHTML !==false
- , sort=!!options.sort
- , prefix=options.indent ? ' ' : ''
- , D=[], i=0 // Array to hold data, i=counter
- , hasSubKeys = false
- , k, t, skip, x, type // loop vars
- ;
- if (dType!=='object' && dType!=='array') {
- if (options.display) alert( (s_Title || 'debugData') +': '+ o_Data );
- return o_Data;
- }
- if (dType==='object' && $.isPlainObject(o_Data))
- dType='hash';
-
- if (o_Data.jquery) {
- str=s_Title+'jQuery Collection ('+ o_Data.length +')\n context="'+ o_Data.context +'"';
- }
- else if (o_Data.nodeName) {
- str=s_Title+o_Data.tagName;
- var id = o_Data.id, cls=o_Data.className, src=o_Data.src, hrf=o_Data.href;
- if (id) str+='\n id="'+ id+'"';
- if (cls) str+='\n class="'+ cls+'"';
- if (src) str+='\n src="'+ src+'"';
- if (hrf) str+='\n href="'+ hrf+'"';
- }
- else {
- parse(o_Data,prefix,dType); // recursive parsing
- if (sort && !hasSubKeys) D.sort(); // sort by keyName - but NOT if has subKeys!
- if (str) str += '\n***'+ '****************************'.substr(0,str.length) +'\n';
- str += D.join('\n'); // add line-breaks
- }
-
- if (display) alert(str); // display data
- if (html) str=str.replace(/\n/g, ' <br>').replace(/ /g, ' &nbsp;'); // format as HTML
- return str;
-
- function parse ( data, prefix, parentType ) {
- var first = true;
- try {
- $.each( data, function (key, val) {
- skip = (keys && keys.indexOf(','+key+',') === -1);
- type = $.type(val);
- if (type==='object' && $.isPlainObject(val))
- type = 'hash';
- k = prefix + (first ? ' ' : ', ');
- first = false;
-
- if (parentType!=='array') // no key-names for array items
- k += key+': '; // NOT an array
-
- if (type==="date" || type==="regexp") {
- val = val.toString();
- type = "string";
- }
- if (type==="string") { // STRING
- if (!skip) D[i++] = k +'"'+ val +'"';
- }
- // NULL, UNDEFINED, NUMBER or BOOLEAN
- else if (/^(null|undefined|number|boolean)/.test(type)) {
- if (!skip) D[i++] = k + val;
- }
- else if (type==="function") { // FUNCTION
- if (!skip) D[i++] = k +'function()';
- }
- else if (type==="array") { // ARRAY
- if (!skip) {
- D[i++] = k +'[';
- parse( val, prefix+' ',type); // RECURSE
- D[i++] = prefix +' ]';
- }
- }
- else if (val.jquery) { // JQUERY OBJECT
- if (!skip) D[i++] = k +'jQuery ('+ val.length +') context="'+ val.context +'"';
- }
- else if (val.nodeName) { // DOM ELEMENT
- var id = val.id, cls=val.className, src=val.src, hrf=val.href;
- if (skip) D[i++] = k +' '+
- id ? 'id="'+ id+'"' :
- src ? 'src="'+ src+'"' :
- hrf ? 'href="'+ hrf+'"' :
- cls ? 'class="'+cls+'"' :
- '';
- }
- else if (type==="hash") { // JSON
- if (!recurse || $.isEmptyObject(val)) { // show an empty hash
- if (!skip) D[i++] = k +'{ }';
- }
- else { // recurse into JSON hash - indent output
- D[i++] = k +'{';
- parse( val, prefix+' ',type); // RECURSE
- D[i++] = prefix +' }';
- }
- }
- else { // OBJECT
- if (!skip) D[i++] = k +'OBJECT'; // NOT a hash
- }
- });
- } catch (e) {}
- }
-};
-
-function debugStackTrace (s_Title, options) {
- var
- callstack = []
- , isCallstackPopulated = false
- ;
- try {
- i.dont.exist += 0; // doesn't exist- that's the point
- } catch(e) {
- if (e.stack) { // Firefox
- var lines = e.stack.split('\n');
- for (var i=0, len=lines.length; i<len; i++) {
- if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
- callstack.push(lines[i]);
- }
- }
- //Remove call to printStackTrace()
- callstack.shift();
- isCallstackPopulated = true;
- }
- else if (window.opera && e.message) { // Opera
- var lines = e.message.split('\n');
- for (var i=0, len=lines.length; i<len; i++) {
- if (lines[i].match(/^\s*[A-Za-z0-9\-_\$]+\(/)) {
- var entry = lines[i];
- //Append next line also since it has the file info
- if (lines[i+1]) {
- entry += ' at ' + lines[i+1];
- i++;
- }
- callstack.push(entry);
- }
- }
- //Remove call to printStackTrace()
- callstack.shift();
- isCallstackPopulated = true;
- }
- }
-
- if (!isCallstackPopulated) { // IE and Safari
- var currentFunction = arguments.callee.caller;
- while (currentFunction) {
- var fn = currentFunction.toString();
- var fname = fn.substring(fn.indexOf('function') + 8, fn.indexOf('')) || 'anonymous';
- callstack.push(fname);
- currentFunction = currentFunction.caller;
- }
- }
-
- debugData( callstack, s_Title, options );
-};
-
-if (!window.console) window.console = { log: debugData };
-
-if (!window.console.trace)
- window.console.trace = function (s_Title) {
- window.console.log( debugStackTrace(s_Title, { display: false, returnHTML: false, sort: false }) );
- };
-
-// add method to output 'hash data' inside an string
-window.console.data = function (data, title) {
- var w = { array: ['[',']'], object: ['{','}'], string: ['"','"'], number: ['',''], function: ['','()'] }
- , x = $.type( data )
- , obj = x.match(/(object|array)/)
- , delim = !obj ? ['',''] : x === 'object' ? ['{\n','\n}'] : ['[\n','\n]']
- , opts = { display: false, returnHTML: false, sort: false }
- , debug = debugData( data, '', opts)
- ;
- console.log(
- (title ? title +' = ' : '')
- + delim[0]
- + ($.type(debug) === 'string' ? debug.replace(/ /g, '\t') : debug)
- + delim[1]
- );
-};
-
-
-/**
- * timer
- *
- * Utility for debug timing of events
- * Can track multiple timers and returns either a total time or interval from last event
- * @param String timerName Name of the timer - defaults to debugTimer
- * @param String action Keyword for action or return-value...
- * action: 'reset' = reset; 'clear' = delete; 'total' = ms since init; 'step' or '' = ms since last event
- */
-/**
- * timer
- *
- * Utility method for timing performance
- * Can track multiple timers and returns either a total time or interval from last event
- *
- * returns time-data: {
- * start: Date Object
- * , last: Date Object
- * , step: 99 // time since 'last'
- * , total: 99 // time since 'start'
- * }
- *
- * USAGE SAMPLES
- * =============
- * timer('name'); // create/init timer
- * timer('name', 'reset'); // re-init timer
- * timer('name', 'clear'); // clear/remove timer
- * var i = timer('name'); // how long since last timer request?
- * var i = timer('name', 'total'); // how long since timer started?
- *
- * @param String timerName Name of the timer - defaults to debugTimer
- * @param String action Keyword for action or return-value...
- * @param Hash options Options to customize return data
- * action: 'reset' = reset; 'clear' = delete; 'total' = ms since init; 'step' or '' = ms since last event
- */
-function timer (timerName, action, options) {
- var
- name = timerName || 'debugTimer'
- , Timer = window[ name ]
- , defaults = {
- returnString: true
- , padNumbers: true
- , timePrefix: ''
- , timeSuffix: ''
- }
- ;
-
- // init the timer first time called
- if (!Timer || action == 'reset') { // init timer
- Timer = window[ name ] = {
- start: new Date()
- , last: new Date()
- , step: 0 // time since 'last'
- , total: 0 // time since 'start'
- , options: $.extend({}, defaults, options)
- };
- }
- else if (action == 'clear') { // remove timer
- window[ name ] = null;
- return null;
- }
- else { // update existing timer
- Timer.step = (new Date()) - Timer.last; // time since 'last'
- Timer.total = (new Date()) - Timer.start; // time since 'start'
- Timer.last = new Date();
- }
-
- var
- time = (action == 'total') ? Timer.total : Timer.step
- , o = Timer.options // alias
- ;
-
- if (o.returnString) {
- time += ""; // convert integer to string
- // pad time to 4 chars with underscores
- if (o.padNumbers)
- switch (time.length) {
- case 1: time = "&ensp;&ensp;&ensp;"+ time; break;
- case 2: time = "&ensp;&ensp;"+ time; break;
- case 3: time = "&ensp;"+ time; break;
- }
- // add prefix and suffix
- if (o.timePrefix || o.timeSuffix)
- time = o.timePrefix + time + o.timeSuffix;
- }
-
- return time;
-};
-
-
-/**
- * showOptions
- *
- * Pass a layout-options object, and the pane/key you want to display
- */
-function showOptions (Layout, key, debugOpts) {
- var data = Layout.options;
- $.each(key.split("."), function() {
- data = data[this]; // recurse through multiple key-levels
- });
- debugData( data, 'options.'+key, debugOpts );
-};
-
-/**
- * showState
- *
- * Pass a layout-options object, and the pane/key you want to display
- */
-function showState (Layout, key, debugOpts) {
- var data = Layout.state;
- $.each(key.split("."), function() {
- data = data[this]; // recurse through multiple key-levels
- });
- debugData( data, 'state.'+key, debugOpts );
-};
-
-
-
-
-function debugWindow ( content, options ) {
- var defaults = {
- css: {
- position: 'fixed'
- , top: 0
- }
- };
- $.extend( true, (options || {}), defaults );
- var $W = $('<div></div>')
- .html( content.replace(/\n/g, '<br>').replace(/ /g, ' &nbsp;') ) // format as HTML
- .css( options.css )
- ;
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-latest.js b/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-latest.js
deleted file mode 100644
index 1c998bab..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-latest.js
+++ /dev/null
@@ -1,9555 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.9.0
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-1-14
- */
-(function( window, undefined ) {
-"use strict";
-var
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // The deferred used on DOM ready
- readyList,
-
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
- location = window.location,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.9.0",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler and self cleanup method
- DOMContentLoaded = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
- jQuery.ready();
- } else if ( document.readyState === "complete" ) {
- // we're here because readyState === "complete" in oldIE
- // which is good enough for us to call the dom ready!
- document.detachEvent( "onreadystatechange", DOMContentLoaded );
- jQuery.ready();
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", jQuery.ready, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", DOMContentLoaded );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", jQuery.ready );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // Flag to know if list is currently firing
- firing,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Control if a given callback is in the list
- has: function( fn ) {
- return jQuery.inArray( fn, list ) > -1;
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( list && ( !fired || stack ) ) {
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function() {
-
- var support, all, a, select, opt, input, fragment, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType === 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: a.getAttribute("href") === "/a",
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- checkOn: !!input.value,
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: document.compatMode === "CSS1Compat",
-
- // Will be defined later
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== "undefined" ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- body.style.zoom = 1;
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})();
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt /* For internal use only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i, l,
-
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data, false );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name, false );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( !name.indexOf( "data-" ) ) {
- name = jQuery.camelCase( name.substring(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- // Try to fetch any internally stored data first
- return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- }
-
- this.each(function() {
- jQuery.data( this, key, value );
- });
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- hooks.cur = fn;
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- // Toggle whole class name
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var hooks, ret, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val,
- self = jQuery(this);
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === "undefined" ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- // In IE9+, Flash objects don't have .getAttribute (#12945)
- // Support: IE9+
- if ( typeof elem.getAttribute !== "undefined" ) {
- ret = elem.getAttribute( name );
- }
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( rboolean.test( name ) ) {
- // Set corresponding property to false for boolean attributes
- // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
- if ( !getSetAttribute && ruseDefault.test( name ) ) {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- } else {
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- var
- // Use .prop to determine if this attribute is understood as boolean
- prop = jQuery.prop( elem, name ),
-
- // Fetch it accordingly
- attr = typeof prop === "boolean" && elem.getAttribute( name ),
- detail = typeof prop === "boolean" ?
-
- getSetInput && getSetAttribute ?
- attr != null :
- // oldIE fabricates an empty string for missing boolean attributes
- // and conflates checked/selected into attroperties
- ruseDefault.test( name ) ?
- elem[ jQuery.camelCase( "default-" + name ) ] :
- !!attr :
-
- // fetch an attribute node for properties not recognized as boolean
- elem.getAttributeNode( name );
-
- return detail && detail.value !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-
-// fix oldIE value attroperty
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return jQuery.nodeName( elem, "input" ) ?
-
- // Ignore the value *property* by using defaultValue
- elem.defaultValue :
-
- ret && ret.specified ? ret.value : undefined;
- },
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret == null ? undefined : ret;
- }
- });
- });
-
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- elemData = elem.nodeType !== 3 && elem.nodeType !== 8 && jQuery._data( elem );
-
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
-
- var i, cur, tmp, bubbleType, ontype, handle, special,
- eventPath = [ elem || document ],
- type = event.type || event,
- namespaces = event.namespace ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- event.isTrigger = true;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- for ( ; cur != this; cur = cur.parentNode || this ) {
-
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.disabled !== true || event.type !== "click" ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop,
- originalEvent = event,
- fixHook = jQuery.event.fixHooks[ event.type ] || {},
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: IE<9
- // Fix target property (#1925)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Support: Chrome 23+, Safari?
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // Support: IE<9
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- }
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== document.activeElement && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // Support: IE<9
- // If we error on focus to hidden element (#1486, #12518),
- // let .trigger() run the handlers
- }
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === document.activeElement && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Even when returnValue equals to undefined Firefox will still show alert
- if ( event.result !== undefined ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- { type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === "undefined" ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
- if ( !e ) {
- return;
- }
-
- // If preventDefault exists, run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // Support: IE
- // Otherwise set the returnValue property of the original event to false
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
- if ( !e ) {
- return;
- }
- // If stopPropagation exists, run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
-
- // Support: IE
- // Set the cancelBubble property of the original event to true
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "submitBubbles" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "submitBubbles", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "changeBubbles", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- },
-
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- }
-});
-
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-
- if ( rkeyEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.keyHooks;
- }
-
- if ( rmouseEvent.test( name ) ) {
- jQuery.event.fixHooks[ name ] = jQuery.event.mouseHooks;
- }
-});
-/*!
- * Sizzle CSS Selector Engine
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license
- * http://sizzlejs.com/
- */
-(function( window, undefined ) {
-
-var i,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- hasDuplicate,
- outermostContext,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsXML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
- sortOrder,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- support = {},
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Array methods
- arr = [],
- pop = arr.pop,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- operators = "([*^$|!~]?=)",
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ),
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rsibling = /[\x20\t\r\n\f]*[+~]/,
-
- rnative = /\{\s*\[native code\]\s*\}/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
- rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,
- funescape = function( _, escaped ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- return high !== high ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Use a stripped-down slice if we can't use a native one
-try {
- slice.call( docElem.childNodes, 0 )[0].nodeType;
-} catch ( e ) {
- slice = function( i ) {
- var elem,
- results = [];
- for ( ; (elem = this[i]); i++ ) {
- results.push( elem );
- }
- return results;
- };
-}
-
-/**
- * For feature detection
- * @param {Function} fn The function to test for native support
- */
-function isNative( fn ) {
- return rnative.test( fn + "" );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var cache,
- keys = [];
-
- return (cache = function( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- });
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return fn( div );
- } catch (e) {
- return false;
- } finally {
- // release memory in IE
- div = null;
- }
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( !documentIsXML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) {
- push.apply( results, slice.call(context.getElementsByClassName( m ), 0) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && !rbuggyQSA.test(selector) ) {
- old = true;
- nid = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results, slice.call( newContext.querySelectorAll(
- newSelector
- ), 0 ) );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsXML = isXML( doc );
-
- // Check if getElementsByTagName("*") returns only elements
- support.tagNameNoComments = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if attributes should be retrieved by attribute nodes
- support.attributes = assert(function( div ) {
- div.innerHTML = "<select></select>";
- var type = typeof div.lastChild.getAttribute("multiple");
- // IE8 returns a string for some attributes even when not present
- return type !== "boolean" && type !== "string";
- });
-
- // Check if getElementsByClassName can be trusted
- support.getByClassName = assert(function( div ) {
- // Opera can't find a second classname (in 9.6)
- div.innerHTML = "<div class='hidden e'></div><div class='hidden'></div>";
- if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) {
- return false;
- }
-
- // Safari 3.2 caches class attributes and doesn't catch changes
- div.lastChild.className = "e";
- return div.getElementsByClassName("e").length === 2;
- });
-
- // Check if getElementById returns elements by name
- // Check if getElementsByName privileges form controls or returns elements by ID
- support.getByName = assert(function( div ) {
- // Inject content
- div.id = expando + 0;
- div.innerHTML = "<a name='" + expando + "'></a><div name='" + expando + "'></div>";
- docElem.insertBefore( div, docElem.firstChild );
-
- // Test
- var pass = doc.getElementsByName &&
- // buggy browsers will return fewer than the correct 2
- doc.getElementsByName( expando ).length === 2 +
- // buggy browsers will return more than the correct 0
- doc.getElementsByName( expando + 0 ).length;
- support.getIdNotName = !doc.getElementById( expando );
-
- // Cleanup
- docElem.removeChild( div );
-
- return pass;
- });
-
- // IE6/7 return modified attributes
- Expr.attrHandle = assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild && typeof div.firstChild.getAttribute !== strundefined &&
- div.firstChild.getAttribute("href") === "#";
- }) ?
- {} :
- {
- "href": function( elem ) {
- return elem.getAttribute( "href", 2 );
- },
- "type": function( elem ) {
- return elem.getAttribute("type");
- }
- };
-
- // ID find and filter
- if ( support.getIdNotName ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && !documentIsXML ) {
- var m = context.getElementById( id );
-
- return m ?
- m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ?
- [m] :
- undefined :
- [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.tagNameNoComments ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Name
- Expr.find["NAME"] = support.getByName && function( tag, context ) {
- if ( typeof context.getElementsByName !== strundefined ) {
- return context.getElementsByName( name );
- }
- };
-
- // Class
- Expr.find["CLASS"] = support.getByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21),
- // no need to also add to buggyMatches since matches checks buggyQSA
- // A support test would require too much code (would include document ready)
- rbuggyQSA = [ ":focus" ];
-
- if ( (support.qsa = isNative(doc.querySelectorAll)) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explictly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // IE8 - Some boolean attributes are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Opera 10-12/IE8 - ^= $= *= and empty values
- // Should not select anything
- div.innerHTML = "<input type='hidden' i=''/>";
- if ( div.querySelectorAll("[i^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.webkitMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = new RegExp( rbuggyMatches.join("|") );
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = isNative(docElem.contains) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
- var compare;
-
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) {
- if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) {
- if ( a === doc || contains( preferredDoc, a ) ) {
- return -1;
- }
- if ( b === doc || contains( preferredDoc, b ) ) {
- return 1;
- }
- return 0;
- }
- return compare & 4 ? -1 : 1;
- }
-
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // The nodes are identical, we can exit early
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Fallback to using sourceIndex (in IE) if it's available on both nodes
- } else if ( a.sourceIndex && b.sourceIndex ) {
- return ( ~b.sourceIndex || MAX_NEGATIVE ) - ( contains( preferredDoc, a ) && ~a.sourceIndex || MAX_NEGATIVE );
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- // Always assume the presence of duplicates if sort doesn't
- // pass them to our comparison function (as in Google Chrome).
- hasDuplicate = false;
- [0, 0].sort( sortOrder );
- support.detectDuplicates = hasDuplicate;
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- // rbuggyQSA always contains :focus, so no need for an existence check
- if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) {
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- var val;
-
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- if ( !documentIsXML ) {
- name = name.toLowerCase();
- }
- if ( (val = Expr.attrHandle[ name ]) ) {
- return val( elem );
- }
- if ( documentIsXML || support.attributes ) {
- return elem.getAttribute( name );
- }
- return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ?
- name :
- val && val.specified ? val.value : null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-// Document sorting and removing duplicates
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- i = 1,
- j = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- for ( ; (elem = results[i]); i++ ) {
- if ( elem === results[ i - 1 ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-function siblingCheck( a, b ) {
- var cur = a && b && a.nextSibling;
-
- for ( ; cur; cur = cur.nextSibling ) {
- if ( cur === b ) {
- return -1;
- }
- }
-
- return a ? 1 : -1;
-}
-
-// Returns a function to use in pseudos for input types
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for buttons
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-// Returns a function to use in pseudos for positionals
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[4] ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeName ) {
- if ( nodeName === "*" ) {
- return function() { return true; };
- }
-
- nodeName = nodeName.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.substr( result.length - check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.substr( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifider
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsXML ?
- elem.getAttribute("xml:lang") || elem.getAttribute("lang") :
- elem.lang) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- } );
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push( {
- value: matched,
- type: type,
- matches: match
- } );
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && combinator.dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Nested matchers should use non-integer dirruns
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.E);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- for ( j = 0; (matcher = elementMatchers[j]); j++ ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- // `i` starts as a string, so matchedCount would equal "00" if there are no elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- for ( j = 0; (matcher = setMatchers[j]); j++ ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- context.nodeType === 9 && !documentIsXML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0];
- if ( !context ) {
- return results;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- for ( i = matchExpr["needsContext"].test( selector ) ? -1 : tokens.length - 1; i >= 0; i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, slice.call( seed, 0 ) );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- documentIsXML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// Deprecated
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Easy API for creating new setFilters
-function setFilters() {}
-Expr.filters = setFilters.prototype = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-// Initialize with the default document
-setDocument();
-
-// Override sizzle attribute retrieval
-Sizzle.attr = jQuery.attr;
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-var runtil = /Until$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- isSimple = /^.[^:#\[\.,]*$/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i, ret, self;
-
- if ( typeof selector !== "string" ) {
- self = this;
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < self.length; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- ret = [];
- for ( i = 0; i < this.length; i++ ) {
- jQuery.find( selector, this[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( jQuery.unique( ret ) );
- ret.selector = ( this.selector ? this.selector + " " : "" ) + selector;
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector, false) );
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector, true) );
- },
-
- is: function( selector ) {
- return !!selector && (
- typeof selector === "string" ?
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- rneedsContext.test( selector ) ?
- jQuery( selector, this.context ).index( this[0] ) >= 0 :
- jQuery.filter( selector, this ).length > 0 :
- this.filter( selector ).length > 0 );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- cur = this[i];
-
- while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) {
- if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) {
- ret.push( cur );
- break;
- }
- cur = cur.parentNode;
- }
- }
-
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( jQuery.unique(all) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( !runtil.test( name ) ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret;
-
- if ( this.length > 1 && rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
-
- return this.pushStack( ret );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 ?
- jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] :
- jQuery.find.matches(expr, elems);
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, keep ) {
-
- // Can't pass null or undefined to indexOf in Firefox 4
- // Set to 0 to skip string check
- qualifier = qualifier || 0;
-
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep(elements, function( elem, i ) {
- var retVal = !!qualifier.call( elem, i, elem );
- return retVal === keep;
- });
-
- } else if ( qualifier.nodeType ) {
- return jQuery.grep(elements, function( elem ) {
- return ( elem === qualifier ) === keep;
- });
-
- } else if ( typeof qualifier === "string" ) {
- var filtered = jQuery.grep(elements, function( elem ) {
- return elem.nodeType === 1;
- });
-
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter(qualifier, filtered, !keep);
- } else {
- qualifier = jQuery.filter( qualifier, filtered );
- }
- }
-
- return jQuery.grep(elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- area: [ 1, "<map>", "</map>" ],
- param: [ 1, "<object>", "</object>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
- // unless wrapped in a div with non-breaking characters in front of it.
- _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- },
-
- append: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- this.insertBefore( elem, this.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, false, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, false, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) {
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
-
- // If this is a select, ensure that it displays empty (#12336)
- // Support: IE<9
- if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
- elem.options.length = 0;
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function( value ) {
- var isFunc = jQuery.isFunction( value );
-
- // Make sure that the elements are removed from the DOM before they are inserted
- // this can help fix replacing a parent with child elements
- if ( !isFunc && typeof value !== "string" ) {
- value = jQuery( value ).not( this ).detach();
- }
-
- return this.domManip( [ value ], true, function( elem ) {
- var next = this.nextSibling,
- parent = this.parentNode;
-
- if ( parent && this.nodeType === 1 || this.nodeType === 11 ) {
-
- jQuery( this ).remove();
-
- if ( next ) {
- next.parentNode.insertBefore( elem, next );
- } else {
- parent.appendChild( elem );
- }
- }
- });
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, table, callback ) {
-
- // Flatten any nested arrays
- args = core_concat.apply( [], args );
-
- var fragment, first, scripts, hasScripts, node, doc,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[0],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[0] = value.call( this, index, table ? self.html() : undefined );
- }
- self.domManip( args, table, callback );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- table = table && jQuery.nodeName( first, "tr" );
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call(
- table && jQuery.nodeName( this[i], "table" ) ?
- findOrAppend( this[i], "tbody" ) :
- this[i],
- node,
- i
- );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Hope ajax is available...
- jQuery.ajax({
- url: node.src,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- } else {
- jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
- }
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
- }
- }
-
- return this;
- }
-});
-
-function findOrAppend( elem, tag ) {
- return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) );
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- var attr = elem.getAttributeNode("type");
- elem.type = ( attr && attr.specified ) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
- if ( match ) {
- elem.type = match[1];
- } else {
- elem.removeAttribute("type");
- }
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var elem,
- i = 0;
- for ( ; (elem = elems[i]) != null; i++ ) {
- jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function fixCloneNodeIssues( src, dest ) {
- var nodeName, data, e;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 copies events bound via attachEvent when using cloneNode.
- if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
- data = jQuery._data( dest );
-
- for ( e in data.events ) {
- jQuery.removeEvent( dest, e, data.handle );
- }
-
- // Event data gets referenced instead of copied if the expando gets copied too
- dest.removeAttribute( jQuery.expando );
- }
-
- // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
- if ( nodeName === "script" && dest.text !== src.text ) {
- disableScript( dest ).text = src.text;
- restoreScript( dest );
-
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- } else if ( nodeName === "object" ) {
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.defaultSelected = dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone(true);
- jQuery( insert[i] )[ original ]( elems );
-
- // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
- core_push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- found = typeof context.getElementsByTagName !== "undefined" ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !found ) {
- for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
- if ( !tag || jQuery.nodeName( elem, tag ) ) {
- found.push( elem );
- } else {
- jQuery.merge( found, getAll( elem, tag ) );
- }
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], found ) :
- found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( manipulation_rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var destElements, srcElements, node, i, clone,
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- // Fix all IE cloning issues
- for ( i = 0; (node = srcElements[i]) != null; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- fixCloneNodeIssues( node, destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0; (node = srcElements[i]) != null; i++ ) {
- cloneCopyEvent( node, destElements[i] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- destElements = srcElements = node = null;
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var contains, elem, tag, tmp, wrap, tbody, j,
- l = elems.length,
-
- // Ensure a safe fragment
- safe = createSafeFragment( context ),
-
- nodes = [],
- i = 0;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || safe.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
-
- tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
- // Descend through wrappers to the right content
- j = wrap[0];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Manually add leading whitespace removed by IE
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- elem = tag === "table" && !rtbody.test( elem ) ?
- tmp.firstChild :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !rtbody.test( elem ) ?
- tmp :
- 0;
-
- j = elem && elem.childNodes.length;
- while ( j-- ) {
- if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
- elem.removeChild( tbody );
- }
- }
- }
-
- jQuery.merge( nodes, tmp.childNodes );
-
- // Fix #12392 for WebKit and IE > 9
- tmp.textContent = "";
-
- // Fix #12392 for oldIE
- while ( tmp.firstChild ) {
- tmp.removeChild( tmp.firstChild );
- }
-
- // Remember the top-level container for proper cleanup
- tmp = safe.lastChild;
- }
- }
- }
-
- // Fix #11356: Clear elements from fragment
- if ( tmp ) {
- safe.removeChild( tmp );
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
- }
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( safe.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- tmp = null;
-
- return safe;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var data, id, elem, type,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( typeof elem.removeAttribute !== "undefined" ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
- }
- }
- }
- }
- }
-});
-var curCSS, getStyles, iframe,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity\s*=\s*([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var elem,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- values[ index ] = jQuery._data( elem, "olddisplay" );
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && elem.style.display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else if ( !values[ index ] && !isHidden( elem ) ) {
- jQuery._data( elem, "olddisplay", jQuery.css( elem, "display" ) );
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- var styles, len,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- var bool = typeof state === "boolean";
-
- return this.each(function() {
- if ( bool ? state : isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Exclude the following css properties to add px
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var val, num, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- getStyles = function( elem ) {
- return window.getComputedStyle( elem, null );
- };
-
- curCSS = function( elem, name, _computed ) {
- var width, minWidth, maxWidth,
- computed = _computed || getStyles( elem ),
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
- style = elem.style;
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- getStyles = function( elem ) {
- return elem.currentStyle;
- };
-
- curCSS = function( elem, name, _computed ) {
- var left, rs, rsLeft,
- computed = _computed || getStyles( elem ),
- ret = computed ? computed[ name ] : undefined,
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rs = elem.runtimeStyle;
- rsLeft = rs && rs.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- rs.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- rs.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
- // Use the already-created iframe if possible
- iframe = ( iframe ||
- jQuery("<iframe frameborder='0' width='0' height='0'/>")
- .css( "cssText", "display:block !important" )
- ).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
- doc.write("<!doctype html><html><body>");
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
- display = jQuery.css( elem[0], "display" );
- elem.remove();
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- // if value === "", then remove inline opacity #12685
- if ( ( value >= 1 || value === "" ) &&
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there is no filter style applied in a css rule or unset inline opacity, we are done
- if ( value === "" || currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- return ( elem.offsetWidth === 0 && elem.offsetHeight === 0 ) || (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function(){
- var type = this.type;
- // Use .is(":disabled") so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !manipulation_rcheckableType.test( type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
-
- ajax_nonce = jQuery.now(),
-
- ajax_rquery = /\?/,
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var key, deep,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, type, response,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
- jQuery.fn[ type ] = function( fn ){
- return this.on( type, fn );
- };
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": window.String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var transport,
- // URL without anti-cache param
- cacheURL,
- // Response headers
- responseHeadersString,
- responseHeaders,
- // timeout handle
- timeoutTimer,
- // Cross-domain detection vars
- parts,
- // To know if global events are to be dispatched
- fireGlobals,
- // Loop variable
- i,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? 80 : 443 ) ) !=
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? 80 : 443 ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // If successful, handle type chaining
- if ( status >= 200 && status < 300 || status === 304 ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // If not modified
- if ( status === 304 ) {
- isSuccess = true;
- statusText = "notmodified";
-
- // If we have data
- } else {
- isSuccess = ajaxConvert( s, response );
- statusText = isSuccess.state;
- success = isSuccess.data;
- error = isSuccess.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- }
-});
-
-/* Handles responses to an ajax request:
- * - sets all responseXXX fields accordingly
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
-
- var ct, type, finalDataType, firstDataType,
- contents = s.contents,
- dataTypes = s.dataTypes,
- responseFields = s.responseFields;
-
- // Fill responseXXX fields
- for ( type in responseFields ) {
- if ( type in responses ) {
- jqXHR[ responseFields[type] ] = responses[ type ];
- }
- }
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-// Chain conversions given the request and the original response
-function ajaxConvert( s, response ) {
-
- var conv, conv2, current, tmp,
- converters = {},
- i = 0,
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice(),
- prev = dataTypes[ 0 ];
-
- // Apply the dataFilter if provided
- if ( s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- // Convert to each sequential dataType, tolerating list modification
- for ( ; (current = dataTypes[++i]); ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current !== "*" ) {
-
- // Convert response if prev dataType is non-auto and differs from current
- if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split(" ");
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.splice( i--, 0, current );
- }
-
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s["throws"] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
-
- // Update prev for next iteration
- prev = current;
- }
- }
-
- return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || jQuery("head")[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement("script");
-
- script.async = true;
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( script.parentNode ) {
- script.parentNode.removeChild( script );
- }
-
- // Dereference the script
- script = null;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
-
- // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( undefined, true );
- }
- }
- };
- }
-});
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-var xhrCallbacks, xhrSupported,
- xhrId = 0,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject && function() {
- // Abort all pending requests
- var key;
- for ( key in xhrCallbacks ) {
- xhrCallbacks[ key ]( undefined, true );
- }
- };
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( err ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
-
- var status,
- statusText,
- responseHeaders,
- responses,
- xml;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- responses = {};
- status = xhr.status;
- xml = xhr.responseXML;
- responseHeaders = xhr.getAllResponseHeaders();
-
- // Construct response list
- if ( xml && xml.documentElement /* #4958 */ ) {
- responses.xml = xml;
- }
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- if ( typeof xhr.responseText === "string" ) {
- responses.text = xhr.responseText;
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback( undefined, true );
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var end, unit,
- tween = this.createTween( prop, value ),
- parts = rfxnum.exec( value ),
- target = tween.cur(),
- start = +target || 0,
- scale = 1,
- maxIterations = 20;
-
- if ( parts ) {
- end = +parts[2];
- unit = parts[3] || ( jQuery.cssNumber[ prop ] ? "" : "px" );
-
- // We need to compute starting value
- if ( unit !== "px" && start ) {
- // Iteratively approximate from a nonzero starting point
- // Prefer the current property, because this process will be trivial if it uses the same units
- // Fallback to end or a simple constant
- start = jQuery.css( tween.elem, prop, true ) || end || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- tween.unit = unit;
- tween.start = start;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[1] ? start + ( parts[1] + 1 ) * end : end;
- }
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-function createTweens( animation, props ) {
- jQuery.each( props, function( prop, value ) {
- var collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( collection[ index ].call( animation, prop, value ) ) {
-
- // we're done with this property
- return;
- }
- }
- });
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- createTweens( animation, props );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- /*jshint validthis:true */
- var index, prop, value, length, dataShow, toggle, tween, hooks, oldfire,
- anim = this,
- style = elem.style,
- orig = {},
- handled = [],
- hidden = elem.nodeType && isHidden( elem );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.done(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( index in props ) {
- value = props[ index ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ index ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- handled.push( index );
- }
- }
-
- length = handled.length;
- if ( length ) {
- dataShow = jQuery._data( elem, "fxshow" ) || jQuery._data( elem, "fxshow", {} );
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery._removeData( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( index = 0 ; index < length ; index++ ) {
- prop = handled[ index ];
- tween = anim.createTween( prop, hidden ? dataShow[ prop ] : 0 );
- orig[ prop ] = dataShow[ prop ] || jQuery.style( elem, prop );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing a non empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "auto" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Remove in 2.0 - this supports IE8's panic based approach
-// to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
- doAnimation.finish = function() {
- anim.stop( true );
- };
- // Empty animations, or finishing resolves immediately
- if ( empty || jQuery._data( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = jQuery._data( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.cur && hooks.cur.finish ) {
- hooks.cur.finish.call( this );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) ) {
- jQuery.fx.start();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== "undefined" ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
-};
-
-jQuery.offset = {
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || document.documentElement;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || document.documentElement;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// })();
-// Expose jQuery to the global object
-window.jQuery = window.$ = jQuery;
-
-// Expose jQuery as an AMD module, but only for AMD loaders that
-// understand the issues with loading multiple versions of jQuery
-// in a page that all might call define(). The loader will indicate
-// they have special allowances for multiple jQuery versions by
-// specifying define.amd.jQuery = true. Register as a named module,
-// since jQuery can be concatenated with other files that may use define,
-// but not use a proper concatenation script that understands anonymous
-// AMD modules. A named AMD is safest and most robust way to register.
-// Lowercase jquery is used because AMD module names are derived from
-// file names, and jQuery is normally delivered in a lowercase file name.
-// Do this after creating the global so that if an AMD module wants to call
-// noConflict to hide this version of jQuery, it will work.
-if ( typeof define === "function" && define.amd && define.amd.jQuery ) {
- define( "jquery", [], function () { return jQuery; } );
-}
-
-})( window ); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-ui-latest.js b/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-ui-latest.js
deleted file mode 100644
index aa83af97..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery-ui-latest.js
+++ /dev/null
@@ -1,14879 +0,0 @@
-/*! jQuery UI - v1.9.2 - 2012-11-23
-* http://jqueryui.com
-* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.slider.js, jquery.ui.sortable.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
-* Copyright (c) 2012 jQuery Foundation and other contributors Licensed MIT */
-
-(function( $, undefined ) {
-
-var uuid = 0,
- runiqueId = /^ui-id-\d+$/;
-
-// prevent duplicate loading
-// this is only a problem because we proxy existing functions
-// and we don't want to double proxy them
-$.ui = $.ui || {};
-if ( $.ui.version ) {
- return;
-}
-
-$.extend( $.ui, {
- version: "1.9.2",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- NUMPAD_ADD: 107,
- NUMPAD_DECIMAL: 110,
- NUMPAD_DIVIDE: 111,
- NUMPAD_ENTER: 108,
- NUMPAD_MULTIPLY: 106,
- NUMPAD_SUBTRACT: 109,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- _focus: $.fn.focus,
- focus: function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- this._focus.apply( this, arguments );
- },
-
- scrollParent: function() {
- var scrollParent;
- if (($.ui.ie && (/(static|relative)/).test(this.css('position'))) || (/absolute/).test(this.css('position'))) {
- scrollParent = this.parents().filter(function() {
- return (/(relative|absolute|fixed)/).test($.css(this,'position')) && (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
- }).eq(0);
- } else {
- scrollParent = this.parents().filter(function() {
- return (/(auto|scroll)/).test($.css(this,'overflow')+$.css(this,'overflow-y')+$.css(this,'overflow-x'));
- }).eq(0);
- }
-
- return (/fixed/).test(this.css('position')) || !scrollParent.length ? $(document) : scrollParent;
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- },
-
- uniqueId: function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + (++uuid);
- }
- });
- },
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( runiqueId.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap=#" + mapName + "]" )[0];
- return !!img && visible( img );
- }
- return ( /input|select|textarea|button|object/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().andSelf().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support
-$(function() {
- var body = document.body,
- div = body.appendChild( div = document.createElement( "div" ) );
-
- // access offsetHeight before setting the style to prevent a layout bug
- // in IE 9 which causes the element to continue to take up space even
- // after it is removed from the DOM (#8026)
- div.offsetHeight;
-
- $.extend( div.style, {
- minHeight: "100px",
- height: "auto",
- padding: 0,
- borderWidth: 0
- });
-
- $.support.minHeight = div.offsetHeight === 100;
- $.support.selectstart = "onselectstart" in div;
-
- // set display to none to avoid a layout bug in IE
- // http://dev.jquery.com/ticket/4014
- body.removeChild( div ).style.display = "none";
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-
-
-
-
-// deprecated
-
-(function() {
- var uaMatch = /msie ([\w.]+)/.exec( navigator.userAgent.toLowerCase() ) || [];
- $.ui.ie = uaMatch.length ? true : false;
- $.ui.ie6 = parseFloat( uaMatch[ 1 ], 10 ) === 6;
-})();
-
-$.fn.extend({
- disableSelection: function() {
- return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
- ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- },
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- }
-});
-
-$.extend( $.ui, {
- // $.ui.plugin is deprecated. Use the proxy pattern instead.
- plugin: {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args ) {
- var i,
- set = instance.plugins[ name ];
- if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
- },
-
- contains: $.contains,
-
- // only used by resizable
- hasScroll: function( el, a ) {
-
- //If overflow is hidden, the element might have extra content, but the user wants to hide it
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- },
-
- // these are odd functions, fix the API or move into individual plugins
- isOverAxis: function( x, reference, size ) {
- //Determines when x coordinate is over "b" element axis
- return ( x > reference ) && ( x < ( reference + size ) );
- },
- isOver: function( y, x, top, left, height, width ) {
- //Determines when x, y coordinates is over "b" element
- return $.ui.isOverAxis( y, top, height ) && $.ui.isOverAxis( x, left, width );
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-var uuid = 0,
- slice = Array.prototype.slice,
- _cleanData = $.cleanData;
-$.cleanData = function( elems ) {
- for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
- try {
- $( elem ).triggerHandler( "remove" );
- // http://bugs.jquery.com/ticket/8235
- } catch( e ) {}
- }
- _cleanData( elems );
-};
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( $.isFunction( value ) ) {
- prototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- }
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
- }, prototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- // TODO remove widgetBaseClass, see #8155
- widgetBaseClass: fullName,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-};
-
-$.widget.extend = function( target ) {
- var input = slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = slice.call( arguments, 1 ),
- returnValue = this;
-
- // allow multiple hashes to be passed on init
- options = !isMethodCall && args.length ?
- $.widget.extend.apply( null, [ options ].concat(args) ) :
- options;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} )._init();
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- // 1.9 BC for #7810
- // TODO remove dual storage
- $.data( element, this.widgetName, this );
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- // 1.9 BC for #7810
- // TODO remove dual storage
- .removeData( this.widgetName )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( value === undefined ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( value === undefined ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOption( "disabled", false );
- },
- disable: function() {
- return this._setOption( "disabled", true );
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- // accept selectors, DOM elements
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^(\w+)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && ( $.effects.effect[ effectName ] || $.uiBackCompat !== false && $.effects[ effectName ] ) ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- $.Widget.prototype._getCreateOptions = function() {
- return $.metadata && $.metadata.get( this.element[0] )[ this.widgetName ];
- };
-}
-
-})( jQuery );
-(function( $, undefined ) {
-
-var mouseHandled = false;
-$( document ).mouseup( function( e ) {
- mouseHandled = false;
-});
-
-$.widget("ui.mouse", {
- version: "1.9.2",
- options: {
- cancel: 'input,textarea,button,select,option',
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind('mousedown.'+this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind('click.'+this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, that.widgetName + '.preventClickEvent');
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind('.'+this.widgetName);
- if ( this._mouseMoveDelegate ) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if( mouseHandled ) { return; }
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + '.preventClickEvent')) {
- $.removeData(event.target, this.widgetName + '.preventClickEvent');
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
- $(document)
- .bind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .bind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && !(document.documentMode >= 9) && !event.button) {
- return this._mouseUp(event);
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- $(document)
- .unbind('mousemove.'+this.widgetName, this._mouseMoveDelegate)
- .unbind('mouseup.'+this.widgetName, this._mouseUpDelegate);
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + '.preventClickEvent', true);
- }
-
- this._mouseStop(event);
- }
-
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(event) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(event) {},
- _mouseDrag: function(event) {},
- _mouseStop: function(event) {},
- _mouseCapture: function(event) { return true; }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseInt( offsets[ 0 ], 10 ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseInt( offsets[ 1 ], 10 ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
- overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowX ? $.position.scrollbarWidth() : 0,
- height: hasOverflowY ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] );
- return {
- element: withinElement,
- isWindow: isWindow,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
- width: isWindow ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- targetElem = target[0],
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- if ( targetElem.nodeType === 9 ) {
- targetWidth = target.width();
- targetHeight = target.height();
- targetOffset = { top: 0, left: 0 };
- } else if ( $.isWindow( targetElem ) ) {
- targetWidth = target.width();
- targetHeight = target.height();
- targetOffset = { top: target.scrollTop(), left: target.scrollLeft() };
- } else if ( targetElem.preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- targetWidth = targetHeight = 0;
- targetOffset = { top: targetElem.pageY, left: targetElem.pageX };
- } else {
- targetWidth = target.outerWidth();
- targetHeight = target.outerHeight();
- targetOffset = target.offset();
- }
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !$.support.offsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem : elem
- });
- }
- });
-
- if ( $.fn.bgiframe ) {
- elem.bgiframe();
- }
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function () {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // offset option
- (function( $ ) {
- var _position = $.fn.position;
- $.fn.position = function( options ) {
- if ( !options || !options.offset ) {
- return _position.call( this, options );
- }
- var offset = options.offset.split( " " ),
- at = options.at.split( " " );
- if ( offset.length === 1 ) {
- offset[ 1 ] = offset[ 0 ];
- }
- if ( /^\d/.test( offset[ 0 ] ) ) {
- offset[ 0 ] = "+" + offset[ 0 ];
- }
- if ( /^\d/.test( offset[ 1 ] ) ) {
- offset[ 1 ] = "+" + offset[ 1 ];
- }
- if ( at.length === 1 ) {
- if ( /left|center|right/.test( at[ 0 ] ) ) {
- at[ 1 ] = "center";
- } else {
- at[ 1 ] = at[ 0 ];
- at[ 0 ] = "center";
- }
- }
- return _position.call( this, $.extend( options, {
- at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
- offset: undefined
- } ) );
- };
- }( jQuery ) );
-}
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-var uid = 0,
- hideProps = {},
- showProps = {};
-
-hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
- hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
-showProps.height = showProps.paddingTop = showProps.paddingBottom =
- showProps.borderTopWidth = showProps.borderBottomWidth = "show";
-
-$.widget( "ui.accordion", {
- version: "1.9.2",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- _create: function() {
- var accordionId = this.accordionId = "ui-accordion-" +
- (this.element.attr( "id" ) || ++uid),
- options = this.options;
-
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" );
-
- this.headers = this.element.find( options.header )
- .addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
- this._hoverable( this.headers );
- this._focusable( this.headers );
-
- this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .hide();
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active" )
- .toggleClass( "ui-corner-all ui-corner-top" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this._createIcons();
- this.refresh();
-
- // ARIA
- this.element.attr( "role", "tablist" );
-
- this.headers
- .attr( "role", "tab" )
- .each(function( i ) {
- var header = $( this ),
- headerId = header.attr( "id" ),
- panel = header.next(),
- panelId = panel.attr( "id" );
- if ( !headerId ) {
- headerId = accordionId + "-header-" + i;
- header.attr( "id", headerId );
- }
- if ( !panelId ) {
- panelId = accordionId + "-panel-" + i;
- panel.attr( "id", panelId );
- }
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
-
- this._on( this.headers, { keydown: "_keydown" });
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._setupEvents( options.event );
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- content: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "<span>" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .each(function() {
- if ( /^ui-accordion/.test( this.id ) ) {
- this.removeAttribute( "id" );
- }
- });
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown : function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var maxHeight, overflow,
- heightStyle = this.options.heightStyle,
- parent = this.element.parent();
-
-
- if ( heightStyle === "fill" ) {
- // IE 6 treats height like minHeight, so we need to turn off overflow
- // in order to get a reliable height
- // we use the minHeight support test because we assume that only
- // browsers that don't support minHeight will treat height as minHeight
- if ( !$.support.minHeight ) {
- overflow = parent.css( "overflow" );
- parent.css( "overflow", "hidden");
- }
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
- if ( overflow ) {
- parent.css( "overflow", overflow );
- }
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {};
- if ( !event ) {
- return;
- }
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- this._on( this.headers, events );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- toHide.prev().attr( "aria-selected", "false" );
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- })
- .prev()
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- adjust += fx.now;
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[0].className = toHide.parent()[0].className;
- }
-
- this._trigger( "activate", null, data );
- }
-});
-
-
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
- // navigation options
- (function( $, prototype ) {
- $.extend( prototype.options, {
- navigation: false,
- navigationFilter: function() {
- return this.href.toLowerCase() === location.href.toLowerCase();
- }
- });
-
- var _create = prototype._create;
- prototype._create = function() {
- if ( this.options.navigation ) {
- var that = this,
- headers = this.element.find( this.options.header ),
- content = headers.next(),
- current = headers.add( content )
- .find( "a" )
- .filter( this.options.navigationFilter )
- [ 0 ];
- if ( current ) {
- headers.add( content ).each( function( index ) {
- if ( $.contains( this, current ) ) {
- that.options.active = Math.floor( index / 2 );
- return false;
- }
- });
- }
- }
- _create.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // height options
- (function( $, prototype ) {
- $.extend( prototype.options, {
- heightStyle: null, // remove default so we fall back to old values
- autoHeight: true, // use heightStyle: "auto"
- clearStyle: false, // use heightStyle: "content"
- fillSpace: false // use heightStyle: "fill"
- });
-
- var _create = prototype._create,
- _setOption = prototype._setOption;
-
- $.extend( prototype, {
- _create: function() {
- this.options.heightStyle = this.options.heightStyle ||
- this._mergeHeightStyle();
-
- _create.call( this );
- },
-
- _setOption: function( key ) {
- if ( key === "autoHeight" || key === "clearStyle" || key === "fillSpace" ) {
- this.options.heightStyle = this._mergeHeightStyle();
- }
- _setOption.apply( this, arguments );
- },
-
- _mergeHeightStyle: function() {
- var options = this.options;
-
- if ( options.fillSpace ) {
- return "fill";
- }
-
- if ( options.clearStyle ) {
- return "content";
- }
-
- if ( options.autoHeight ) {
- return "auto";
- }
- }
- });
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // icon options
- (function( $, prototype ) {
- $.extend( prototype.options.icons, {
- activeHeader: null, // remove default so we fall back to old values
- headerSelected: "ui-icon-triangle-1-s"
- });
-
- var _createIcons = prototype._createIcons;
- prototype._createIcons = function() {
- if ( this.options.icons ) {
- this.options.icons.activeHeader = this.options.icons.activeHeader ||
- this.options.icons.headerSelected;
- }
- _createIcons.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // expanded active option, activate method
- (function( $, prototype ) {
- prototype.activate = prototype._activate;
-
- var _findActive = prototype._findActive;
- prototype._findActive = function( index ) {
- if ( index === -1 ) {
- index = false;
- }
- if ( index && typeof index !== "number" ) {
- index = this.headers.index( this.headers.filter( index ) );
- if ( index === -1 ) {
- index = false;
- }
- }
- return _findActive.call( this, index );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // resize method
- jQuery.ui.accordion.prototype.resize = jQuery.ui.accordion.prototype.refresh;
-
- // change events
- (function( $, prototype ) {
- $.extend( prototype.options, {
- change: null,
- changestart: null
- });
-
- var _trigger = prototype._trigger;
- prototype._trigger = function( type, event, data ) {
- var ret = _trigger.apply( this, arguments );
- if ( !ret ) {
- return false;
- }
-
- if ( type === "beforeActivate" ) {
- ret = _trigger.call( this, "changestart", event, {
- oldHeader: data.oldHeader,
- oldContent: data.oldPanel,
- newHeader: data.newHeader,
- newContent: data.newPanel
- });
- } else if ( type === "activate" ) {
- ret = _trigger.call( this, "change", event, {
- oldHeader: data.oldHeader,
- oldContent: data.oldPanel,
- newHeader: data.newHeader,
- newContent: data.newPanel
- });
- }
- return ret;
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-
- // animated option
- // NOTE: this only provides support for "slide", "bounceslide", and easings
- // not the full $.ui.accordion.animations API
- (function( $, prototype ) {
- $.extend( prototype.options, {
- animate: null,
- animated: "slide"
- });
-
- var _create = prototype._create;
- prototype._create = function() {
- var options = this.options;
- if ( options.animate === null ) {
- if ( !options.animated ) {
- options.animate = false;
- } else if ( options.animated === "slide" ) {
- options.animate = 300;
- } else if ( options.animated === "bounceslide" ) {
- options.animate = {
- duration: 200,
- down: {
- easing: "easeOutBounce",
- duration: 1000
- }
- };
- } else {
- options.animate = options.animated;
- }
- }
-
- _create.call( this );
- };
- }( jQuery, jQuery.ui.accordion.prototype ) );
-}
-
-})( jQuery );
-(function( $, undefined ) {
-
-// used to prevent race conditions with remote data sources
-var requestIndex = 0;
-
-$.widget( "ui.autocomplete", {
- version: "1.9.2",
- defaultElement: "<input>",
- options: {
- appendTo: "body",
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput;
-
- this.isMultiLine = this._isMultiLine();
- this.valueMethod = this.element[ this.element.is( "input,textarea" ) ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- case keyCode.NUMPAD_ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- this._value( this.term );
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- event.preventDefault();
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "<ul>" )
- .addClass( "ui-autocomplete" )
- .appendTo( this.document.find( this.options.appendTo || "body" )[ 0 ] )
- .menu({
- // custom key handling for now
- input: $(),
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .zIndex( this.element.zIndex() + 1 )
- .hide()
- .data( "menu" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- // #7024 - Prevent accidental activation of menu items in Firefox
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- // back compat for _renderItem using item.autocomplete, via #7810
- // TODO remove the fallback, see #8156
- var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- } else {
- // Normally the input is populated with the item's value as the
- // menu is navigated, causing screen readers to notice a change and
- // announce the item. Since the focus event was canceled, this doesn't
- // happen, so we update the live region so that screen readers can
- // still notice the change and announce it.
- this.liveRegion.text( item.value );
- }
- },
- menuselect: function( event, ui ) {
- // back compat for _renderItem using item.autocomplete, via #7810
- // TODO remove the fallback, see #8156
- var item = ui.item.data( "ui-autocomplete-item" ) || ui.item.data( "item.autocomplete" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[0] !== this.document[0].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "<span>", {
- role: "status",
- "aria-live": "polite"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .insertAfter( this.element );
-
- if ( $.fn.bgiframe ) {
- this.menu.element.bgiframe();
- }
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this.document.find( value || "body" )[0] );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _isMultiLine: function() {
- // Textareas are always multi-line
- if ( this.element.is( "textarea" ) ) {
- return true;
- }
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- if ( this.element.is( "input" ) ) {
- return false;
- }
- // All other element types are determined by whether or not they're contentEditable
- return this.element.prop( "isContentEditable" );
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray(this.options.source) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response( [] );
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
- // only search if the value has changed
- if ( this.term !== this._value() ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var that = this,
- index = ++requestIndex;
-
- return function( content ) {
- if ( index === requestIndex ) {
- that.__response( content );
- }
-
- that.pending--;
- if ( !that.pending ) {
- that.element.removeClass( "ui-autocomplete-loading" );
- }
- };
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[0].label && items[0].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend({
- label: item.label || item.value,
- value: item.value || item.label
- }, item );
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element
- .empty()
- .zIndex( this.element.zIndex() + 1 );
- this._renderMenu( ul, items );
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ));
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "<li>" )
- .append( $( "<a>" ).text( item.label ) )
- .appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
- this._value( this.term );
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
- },
- filter: function(array, term) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
- return $.grep( array, function(value) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.text( message );
- }
-});
-
-
-}( jQuery ));
-(function( $, undefined ) {
-
-var lastActive, startXPos, startYPos, clickDragged,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- stateClasses = "ui-state-hover ui-state-active ",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var buttons = $( this ).find( ":ui-button" );
- setTimeout(function() {
- buttons.button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "']" );
- } else {
- radios = $( "[name='" + name + "']", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.9.2",
- defaultElement: "<button>",
- options: {
- disabled: null,
- text: true,
- label: null,
- icons: {
- primary: null,
- secondary: null
- }
- },
- _create: function() {
- this.element.closest( "form" )
- .unbind( "reset" + this.eventNamespace )
- .bind( "reset" + this.eventNamespace, formResetHandler );
-
- if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = !!this.element.prop( "disabled" );
- } else {
- this.element.prop( "disabled", this.options.disabled );
- }
-
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr( "title" );
-
- var that = this,
- options = this.options,
- toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "",
- focusClass = "ui-state-focus";
-
- if ( options.label === null ) {
- options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
- }
-
- this._hoverable( this.buttonElement );
-
- this.buttonElement
- .addClass( baseClasses )
- .attr( "role", "button" )
- .bind( "mouseenter" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- if ( this === lastActive ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "mouseleave" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- $( this ).removeClass( activeClass );
- })
- .bind( "click" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- event.preventDefault();
- event.stopImmediatePropagation();
- }
- });
-
- this.element
- .bind( "focus" + this.eventNamespace, function() {
- // no need to check disabled, focus won't be triggered anyway
- that.buttonElement.addClass( focusClass );
- })
- .bind( "blur" + this.eventNamespace, function() {
- that.buttonElement.removeClass( focusClass );
- });
-
- if ( toggleButton ) {
- this.element.bind( "change" + this.eventNamespace, function() {
- if ( clickDragged ) {
- return;
- }
- that.refresh();
- });
- // if mouse moves between mousedown and mouseup (drag) set clickDragged flag
- // prevents issue where button state changes but checkbox/radio checked state
- // does not in Firefox (see ticket #6970)
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- clickDragged = false;
- startXPos = event.pageX;
- startYPos = event.pageY;
- })
- .bind( "mouseup" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- return;
- }
- if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
- clickDragged = true;
- }
- });
- }
-
- if ( this.type === "checkbox" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).toggleClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", that.element[0].checked );
- });
- } else if ( this.type === "radio" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled || clickDragged ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", "true" );
-
- var radio = that.element[ 0 ];
- radioGroup( radio )
- .not( radio )
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- });
- } else {
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- lastActive = this;
- that.document.one( "mouseup", function() {
- lastActive = null;
- });
- })
- .bind( "mouseup" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).removeClass( "ui-state-active" );
- })
- .bind( "keydown" + this.eventNamespace, function(event) {
- if ( options.disabled ) {
- return false;
- }
- if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "keyup" + this.eventNamespace, function() {
- $( this ).removeClass( "ui-state-active" );
- });
-
- if ( this.buttonElement.is("a") ) {
- this.buttonElement.keyup(function(event) {
- if ( event.keyCode === $.ui.keyCode.SPACE ) {
- // TODO pass through original event correctly (just as 2nd argument doesn't work)
- $( this ).click();
- }
- });
- }
- }
-
- // TODO: pull out $.Widget's handling for the disabled option into
- // $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
- // be overridden by individual plugins
- this._setOption( "disabled", options.disabled );
- this._resetButton();
- },
-
- _determineButtonType: function() {
- var ancestor, labelSelector, checked;
-
- if ( this.element.is("[type=checkbox]") ) {
- this.type = "checkbox";
- } else if ( this.element.is("[type=radio]") ) {
- this.type = "radio";
- } else if ( this.element.is("input") ) {
- this.type = "input";
- } else {
- this.type = "button";
- }
-
- if ( this.type === "checkbox" || this.type === "radio" ) {
- // we don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.element.parents().last();
- labelSelector = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = ancestor.find( labelSelector );
- if ( !this.buttonElement.length ) {
- ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
- this.buttonElement = ancestor.filter( labelSelector );
- if ( !this.buttonElement.length ) {
- this.buttonElement = ancestor.find( labelSelector );
- }
- }
- this.element.addClass( "ui-helper-hidden-accessible" );
-
- checked = this.element.is( ":checked" );
- if ( checked ) {
- this.buttonElement.addClass( "ui-state-active" );
- }
- this.buttonElement.prop( "aria-pressed", checked );
- } else {
- this.buttonElement = this.element;
- }
- },
-
- widget: function() {
- return this.buttonElement;
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-helper-hidden-accessible" );
- this.buttonElement
- .removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
- .removeAttr( "role" )
- .removeAttr( "aria-pressed" )
- .html( this.buttonElement.find(".ui-button-text").html() );
-
- if ( !this.hasTitle ) {
- this.buttonElement.removeAttr( "title" );
- }
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- } else {
- this.element.prop( "disabled", false );
- }
- return;
- }
- this._resetButton();
- },
-
- refresh: function() {
- //See #8237 & #8828
- var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
-
- if ( isDisabled !== this.options.disabled ) {
- this._setOption( "disabled", isDisabled );
- }
- if ( this.type === "radio" ) {
- radioGroup( this.element[0] ).each(function() {
- if ( $( this ).is( ":checked" ) ) {
- $( this ).button( "widget" )
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- $( this ).button( "widget" )
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- });
- } else if ( this.type === "checkbox" ) {
- if ( this.element.is( ":checked" ) ) {
- this.buttonElement
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- this.buttonElement
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- }
- },
-
- _resetButton: function() {
- if ( this.type === "input" ) {
- if ( this.options.label ) {
- this.element.val( this.options.label );
- }
- return;
- }
- var buttonElement = this.buttonElement.removeClass( typeClasses ),
- buttonText = $( "<span></span>", this.document[0] )
- .addClass( "ui-button-text" )
- .html( this.options.label )
- .appendTo( buttonElement.empty() )
- .text(),
- icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary,
- buttonClasses = [];
-
- if ( icons.primary || icons.secondary ) {
- if ( this.options.text ) {
- buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
- }
-
- if ( icons.primary ) {
- buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
- }
-
- if ( icons.secondary ) {
- buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
- }
-
- if ( !this.options.text ) {
- buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
-
- if ( !this.hasTitle ) {
- buttonElement.attr( "title", $.trim( buttonText ) );
- }
- }
- } else {
- buttonClasses.push( "ui-button-text-only" );
- }
- buttonElement.addClass( buttonClasses.join( " " ) );
- }
-});
-
-$.widget( "ui.buttonset", {
- version: "1.9.2",
- options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(button)"
- },
-
- _create: function() {
- this.element.addClass( "ui-buttonset" );
- },
-
- _init: function() {
- this.refresh();
- },
-
- _setOption: function( key, value ) {
- if ( key === "disabled" ) {
- this.buttons.button( "option", key, value );
- }
-
- this._super( key, value );
- },
-
- refresh: function() {
- var rtl = this.element.css( "direction" ) === "rtl";
-
- this.buttons = this.element.find( this.options.items )
- .filter( ":ui-button" )
- .button( "refresh" )
- .end()
- .not( ":ui-button" )
- .button()
- .end()
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
- .filter( ":first" )
- .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
- .end()
- .filter( ":last" )
- .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
- .end()
- .end();
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-buttonset" );
- this.buttons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-left ui-corner-right" )
- .end()
- .button( "destroy" );
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-$.extend($.ui, { datepicker: { version: "1.9.2" } });
-
-var PROP_NAME = 'datepicker';
-var dpuuid = new Date().getTime();
-var instActive;
-
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this.debug = false; // Change this to true to start debugging
- this._curInst = null; // The current instance in use
- this._keyEvent = false; // If the last event was a key event
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = 'ui-datepicker-div'; // The ID of the main datepicker division
- this._inlineClass = 'ui-datepicker-inline'; // The name of the inline marker class
- this._appendClass = 'ui-datepicker-append'; // The name of the append marker class
- this._triggerClass = 'ui-datepicker-trigger'; // The name of the trigger marker class
- this._dialogClass = 'ui-datepicker-dialog'; // The name of the dialog marker class
- this._disableClass = 'ui-datepicker-disabled'; // The name of the disabled covering marker class
- this._unselectableClass = 'ui-datepicker-unselectable'; // The name of the unselectable cell marker class
- this._currentClass = 'ui-datepicker-current-day'; // The name of the current day marker class
- this._dayOverClass = 'ui-datepicker-days-cell-over'; // The name of the day hover marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[''] = { // Default regional settings
- closeText: 'Done', // Display text for close link
- prevText: 'Prev', // Display text for previous month link
- nextText: 'Next', // Display text for next month link
- currentText: 'Today', // Display text for current month link
- monthNames: ['January','February','March','April','May','June',
- 'July','August','September','October','November','December'], // Names of months for drop-down and formatting
- monthNamesShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], // For formatting
- dayNames: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], // For formatting
- dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
- dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday
- weekHeader: 'Wk', // Column header for week of the year
- dateFormat: 'mm/dd/yy', // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- isRTL: false, // True if right-to-left language, false if left-to-right
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
- yearSuffix: '' // Additional text to append to the year in the month headers
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: 'focus', // 'focus' for popup on focus,
- // 'button' for trigger button, or 'both' for either
- showAnim: 'fadeIn', // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: '', // Display text following the input box, e.g. showing the format
- buttonText: '...', // Text for trigger button
- buttonImage: '', // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: false, // True if month can be selected directly, false if only prev/next
- changeYear: false, // True if year can be selected directly, false if only prev/next
- yearRange: 'c-10:c+10', // Range of years to display in drop-down,
- // either relative to today's year (-nn:+nn), relative to currently displayed year
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
- showWeek: false, // True to show week of the year, false to not show it
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: '+10', // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with '+' for current year + value
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: 'fast', // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or '',
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
- stepMonths: 1, // Number of months to step back/forward
- stepBigMonths: 12, // Number of months to step back/forward for the big links
- altField: '', // Selector for an alternate field to store selected dates into
- altFormat: '', // The date format to use for the alternate field
- constrainInput: true, // The input is constrained by the current date format
- showButtonPanel: false, // True to show button panel, false to not show it
- autoSize: false, // True to size the input for the date format, false to leave as is
- disabled: false // The initial disabled state
- };
- $.extend(this._defaults, this.regional['']);
- this.dpDiv = bindHover($('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'));
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: 'hasDatepicker',
-
- //Keep track of the maximum number of rows displayed (see #7043)
- maxRows: 4,
-
- /* Debug logging (if enabled). */
- log: function () {
- if (this.debug)
- console.log.apply('', arguments);
- },
-
- // TODO rename to "widget" when switching to widget factory
- _widgetDatepicker: function() {
- return this.dpDiv;
- },
-
- /* Override the default settings for all instances of the date picker.
- @param settings object - the new settings to use as defaults (anonymous object)
- @return the manager object */
- setDefaults: function(settings) {
- extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- @param target element - the target input field or division or span
- @param settings object - the new settings to use for this date picker instance (anonymous) */
- _attachDatepicker: function(target, settings) {
- // check for settings on the control itself - in namespace 'date:'
- var inlineSettings = null;
- for (var attrName in this._defaults) {
- var attrValue = target.getAttribute('date:' + attrName);
- if (attrValue) {
- inlineSettings = inlineSettings || {};
- try {
- inlineSettings[attrName] = eval(attrValue);
- } catch (err) {
- inlineSettings[attrName] = attrValue;
- }
- }
- }
- var nodeName = target.nodeName.toLowerCase();
- var inline = (nodeName == 'div' || nodeName == 'span');
- if (!target.id) {
- this.uuid += 1;
- target.id = 'dp' + this.uuid;
- }
- var inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {}, inlineSettings || {});
- if (nodeName == 'input') {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_-])/g, '\\\\$1'); // escape jQuery meta chars
- return {id: id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- bindHover($('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- inst.append = $([]);
- inst.trigger = $([]);
- if (input.hasClass(this.markerClassName))
- return;
- this._attachments(input, inst);
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
- keypress(this._doKeyPress).keyup(this._doKeyUp).
- bind("setData.datepicker", function(event, key, value) {
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key) {
- return this._get(inst, key);
- });
- this._autoSize(inst);
- $.data(target, PROP_NAME, inst);
- //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- },
-
- /* Make attachments based on settings. */
- _attachments: function(input, inst) {
- var appendText = this._get(inst, 'appendText');
- var isRTL = this._get(inst, 'isRTL');
- if (inst.append)
- inst.append.remove();
- if (appendText) {
- inst.append = $('<span class="' + this._appendClass + '">' + appendText + '</span>');
- input[isRTL ? 'before' : 'after'](inst.append);
- }
- input.unbind('focus', this._showDatepicker);
- if (inst.trigger)
- inst.trigger.remove();
- var showOn = this._get(inst, 'showOn');
- if (showOn == 'focus' || showOn == 'both') // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- if (showOn == 'button' || showOn == 'both') { // pop-up date picker when button clicked
- var buttonText = this._get(inst, 'buttonText');
- var buttonImage = this._get(inst, 'buttonImage');
- inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
- $('<img/>').addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $('<button type="button"></button>').addClass(this._triggerClass).
- html(buttonImage == '' ? buttonText : $('<img/>').attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? 'before' : 'after'](inst.trigger);
- inst.trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
- $.datepicker._hideDatepicker();
- else if ($.datepicker._datepickerShowing && $.datepicker._lastInput != input[0]) {
- $.datepicker._hideDatepicker();
- $.datepicker._showDatepicker(input[0]);
- } else
- $.datepicker._showDatepicker(input[0]);
- return false;
- });
- }
- },
-
- /* Apply the maximum length for the date format. */
- _autoSize: function(inst) {
- if (this._get(inst, 'autoSize') && !inst.inline) {
- var date = new Date(2009, 12 - 1, 20); // Ensure double digits
- var dateFormat = this._get(inst, 'dateFormat');
- if (dateFormat.match(/[DM]/)) {
- var findMax = function(names) {
- var max = 0;
- var maxI = 0;
- for (var i = 0; i < names.length; i++) {
- if (names[i].length > max) {
- max = names[i].length;
- maxI = i;
- }
- }
- return maxI;
- };
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
- 'monthNames' : 'monthNamesShort'))));
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
- 'dayNames' : 'dayNamesShort'))) + 20 - date.getDay());
- }
- inst.input.attr('size', this._formatDate(inst, date).length);
- }
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var divSpan = $(target);
- if (divSpan.hasClass(this.markerClassName))
- return;
- divSpan.addClass(this.markerClassName).append(inst.dpDiv).
- bind("setData.datepicker", function(event, key, value){
- inst.settings[key] = value;
- }).bind("getData.datepicker", function(event, key){
- return this._get(inst, key);
- });
- $.data(target, PROP_NAME, inst);
- this._setDate(inst, this._getDefaultDate(inst), true);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
- inst.dpDiv.css( "display", "block" );
- },
-
- /* Pop-up the date picker in a "dialog" box.
- @param input element - ignored
- @param date string or Date - the initial date to display
- @param onSelect function - the function to call when a date is selected
- @param settings object - update the dialog date picker instance's settings (anonymous object)
- @param pos int[2] - coordinates for the dialog's position within the screen or
- event - with x/y coordinates or
- leave empty for default (screen centre)
- @return the manager object */
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
- var inst = this._dialogInst; // internal instance
- if (!inst) {
- this.uuid += 1;
- var id = 'dp' + this.uuid;
- this._dialogInput = $('<input type="text" id="' + id +
- '" style="position: absolute; top: -100px; width: 0px;"/>');
- this._dialogInput.keydown(this._doKeyDown);
- $('body').append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], PROP_NAME, inst);
- }
- extendRemove(inst.settings, settings || {});
- date = (date && date.constructor == Date ? this._formatDate(inst, date) : date);
- this._dialogInput.val(date);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- var browserWidth = document.documentElement.clientWidth;
- var browserHeight = document.documentElement.clientHeight;
- var scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- var scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css('left', (this._pos[0] + 20) + 'px').css('top', this._pos[1] + 'px');
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI)
- $.blockUI(this.dpDiv);
- $.data(this._dialogInput[0], PROP_NAME, inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- @param target element - the target input field or division or span */
- _destroyDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- $.removeData(target, PROP_NAME);
- if (nodeName == 'input') {
- inst.append.remove();
- inst.trigger.remove();
- $target.removeClass(this.markerClassName).
- unbind('focus', this._showDatepicker).
- unbind('keydown', this._doKeyDown).
- unbind('keypress', this._doKeyPress).
- unbind('keyup', this._doKeyUp);
- } else if (nodeName == 'div' || nodeName == 'span')
- $target.removeClass(this.markerClassName).empty();
- },
-
- /* Enable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _enableDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- if (nodeName == 'input') {
- target.disabled = false;
- inst.trigger.filter('button').
- each(function() { this.disabled = false; }).end().
- filter('img').css({opacity: '1.0', cursor: ''});
- }
- else if (nodeName == 'div' || nodeName == 'span') {
- var inline = $target.children('.' + this._inlineClass);
- inline.children().removeClass('ui-state-disabled');
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", false);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- @param target element - the target input field or division or span */
- _disableDatepicker: function(target) {
- var $target = $(target);
- var inst = $.data(target, PROP_NAME);
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
- var nodeName = target.nodeName.toLowerCase();
- if (nodeName == 'input') {
- target.disabled = true;
- inst.trigger.filter('button').
- each(function() { this.disabled = true; }).end().
- filter('img').css({opacity: '0.5', cursor: 'default'});
- }
- else if (nodeName == 'div' || nodeName == 'span') {
- var inline = $target.children('.' + this._inlineClass);
- inline.children().addClass('ui-state-disabled');
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", true);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value == target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- @param target element - the target input field or division or span
- @return boolean - true if disabled, false if enabled */
- _isDisabledDatepicker: function(target) {
- if (!target) {
- return false;
- }
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] == target)
- return true;
- }
- return false;
- },
-
- /* Retrieve the instance data for the target control.
- @param target element - the target input field or division or span
- @return object - the associated instance data
- @throws error if a jQuery problem getting data */
- _getInst: function(target) {
- try {
- return $.data(target, PROP_NAME);
- }
- catch (err) {
- throw 'Missing instance data for this datepicker';
- }
- },
-
- /* Update or retrieve the settings for a date picker attached to an input field or division.
- @param target element - the target input field or division or span
- @param name object - the new settings to update or
- string - the name of the setting to change or retrieve,
- when retrieving also 'all' for all instance settings or
- 'defaults' for all global defaults
- @param value any - the new value for the setting
- (omit if above is an object or to retrieve a value) */
- _optionDatepicker: function(target, name, value) {
- var inst = this._getInst(target);
- if (arguments.length == 2 && typeof name == 'string') {
- return (name == 'defaults' ? $.extend({}, $.datepicker._defaults) :
- (inst ? (name == 'all' ? $.extend({}, inst.settings) :
- this._get(inst, name)) : null));
- }
- var settings = name || {};
- if (typeof name == 'string') {
- settings = {};
- settings[name] = value;
- }
- if (inst) {
- if (this._curInst == inst) {
- this._hideDatepicker();
- }
- var date = this._getDateDatepicker(target, true);
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- extendRemove(inst.settings, settings);
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
- if (minDate !== null && settings['dateFormat'] !== undefined && settings['minDate'] === undefined)
- inst.settings.minDate = this._formatDate(inst, minDate);
- if (maxDate !== null && settings['dateFormat'] !== undefined && settings['maxDate'] === undefined)
- inst.settings.maxDate = this._formatDate(inst, maxDate);
- this._attachments($(target), inst);
- this._autoSize(inst);
- this._setDate(inst, date);
- this._updateAlternate(inst);
- this._updateDatepicker(inst);
- }
- },
-
- // change method deprecated
- _changeDatepicker: function(target, name, value) {
- this._optionDatepicker(target, name, value);
- },
-
- /* Redraw the date picker attached to an input field or division.
- @param target element - the target input field or division or span */
- _refreshDatepicker: function(target) {
- var inst = this._getInst(target);
- if (inst) {
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- @param target element - the target input field or division or span
- @param date Date - the new date */
- _setDateDatepicker: function(target, date) {
- var inst = this._getInst(target);
- if (inst) {
- this._setDate(inst, date);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- @param target element - the target input field or division or span
- @param noDefault boolean - true if no default date is to be used
- @return Date - the current date */
- _getDateDatepicker: function(target, noDefault) {
- var inst = this._getInst(target);
- if (inst && !inst.inline)
- this._setDateFromField(inst, noDefault);
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(event) {
- var inst = $.datepicker._getInst(event.target);
- var handled = true;
- var isRTL = inst.dpDiv.is('.ui-datepicker-rtl');
- inst._keyEvent = true;
- if ($.datepicker._datepickerShowing)
- switch (event.keyCode) {
- case 9: $.datepicker._hideDatepicker();
- handled = false;
- break; // hide on tab out
- case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' +
- $.datepicker._currentClass + ')', inst.dpDiv);
- if (sel[0])
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
- var onSelect = $.datepicker._get(inst, 'onSelect');
- if (onSelect) {
- var dateStr = $.datepicker._formatDate(inst);
-
- // trigger custom callback
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
- }
- else
- $.datepicker._hideDatepicker();
- return false; // don't submit the form
- break; // select the value on enter
- case 27: $.datepicker._hideDatepicker();
- break; // hide on escape
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, 'stepBigMonths') :
- -$.datepicker._get(inst, 'stepMonths')), 'M');
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, 'stepBigMonths') :
- +$.datepicker._get(inst, 'stepMonths')), 'M');
- break; // next month/year on page down/+ ctrl
- case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
- handled = event.ctrlKey || event.metaKey;
- break; // clear on ctrl or command +end
- case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
- handled = event.ctrlKey || event.metaKey;
- break; // current on ctrl or command +home
- case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
- handled = event.ctrlKey || event.metaKey;
- // -1 day on ctrl or command +left
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, 'stepBigMonths') :
- -$.datepicker._get(inst, 'stepMonths')), 'M');
- // next month/year on alt +left on Mac
- break;
- case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
- handled = event.ctrlKey || event.metaKey;
- break; // -1 week on ctrl or command +up
- case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
- handled = event.ctrlKey || event.metaKey;
- // +1 day on ctrl or command +right
- if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, 'stepBigMonths') :
- +$.datepicker._get(inst, 'stepMonths')), 'M');
- // next month/year on alt +right
- break;
- case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
- handled = event.ctrlKey || event.metaKey;
- break; // +1 week on ctrl or command +down
- default: handled = false;
- }
- else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- else {
- handled = false;
- }
- if (handled) {
- event.preventDefault();
- event.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(event) {
- var inst = $.datepicker._getInst(event.target);
- if ($.datepicker._get(inst, 'constrainInput')) {
- var chars = $.datepicker._possibleChars($.datepicker._get(inst, 'dateFormat'));
- var chr = String.fromCharCode(event.charCode == undefined ? event.keyCode : event.charCode);
- return event.ctrlKey || event.metaKey || (chr < ' ' || !chars || chars.indexOf(chr) > -1);
- }
- },
-
- /* Synchronise manual entry and field/alternate field. */
- _doKeyUp: function(event) {
- var inst = $.datepicker._getInst(event.target);
- if (inst.input.val() != inst.lastVal) {
- try {
- var date = $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
- (inst.input ? inst.input.val() : null),
- $.datepicker._getFormatConfig(inst));
- if (date) { // only if valid
- $.datepicker._setDateFromField(inst);
- $.datepicker._updateAlternate(inst);
- $.datepicker._updateDatepicker(inst);
- }
- }
- catch (err) {
- $.datepicker.log(err);
- }
- }
- return true;
- },
-
- /* Pop-up the date picker for a given input field.
- If false returned from beforeShow event handler do not show.
- @param input element - the input field attached to the date picker or
- event - if triggered by focus */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() != 'input') // find from button/image trigger
- input = $('input', input.parentNode)[0];
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput == input) // already here
- return;
- var inst = $.datepicker._getInst(input);
- if ($.datepicker._curInst && $.datepicker._curInst != inst) {
- $.datepicker._curInst.dpDiv.stop(true, true);
- if ( inst && $.datepicker._datepickerShowing ) {
- $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
- }
- }
- var beforeShow = $.datepicker._get(inst, 'beforeShow');
- var beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
- if(beforeShowSettings === false){
- //false
- return;
- }
- extendRemove(inst.settings, beforeShowSettings);
- inst.lastVal = null;
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
- if ($.datepicker._inDialog) // hide cursor
- input.value = '';
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
- var isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css('position') == 'fixed';
- return !isFixed;
- });
- var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- //to avoid flashes on Firefox
- inst.dpDiv.empty();
- // determine sizing offscreen
- inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- 'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none',
- left: offset.left + 'px', top: offset.top + 'px'});
- if (!inst.inline) {
- var showAnim = $.datepicker._get(inst, 'showAnim');
- var duration = $.datepicker._get(inst, 'duration');
- var postProcess = function() {
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !! cover.length ){
- var borders = $.datepicker._getBorders(inst.dpDiv);
- cover.css({left: -borders[0], top: -borders[1],
- width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()});
- }
- };
- inst.dpDiv.zIndex($(input).zIndex()+1);
- $.datepicker._datepickerShowing = true;
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[showAnim || 'show']((showAnim ? duration : null), postProcess);
- if (!showAnim || !duration)
- postProcess();
- if (inst.input.is(':visible') && !inst.input.is(':disabled'))
- inst.input.focus();
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
- var borders = $.datepicker._getBorders(inst.dpDiv);
- instActive = inst; // for delegate hover events
- inst.dpDiv.empty().append(this._generateHTML(inst));
- this._attachHandlers(inst);
- var cover = inst.dpDiv.find('iframe.ui-datepicker-cover'); // IE6- only
- if( !!cover.length ){ //avoid call to outerXXXX() when not in IE6
- cover.css({left: -borders[0], top: -borders[1], width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()})
- }
- inst.dpDiv.find('.' + this._dayOverClass + ' a').mouseover();
- var numMonths = this._getNumberOfMonths(inst);
- var cols = numMonths[1];
- var width = 17;
- inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width('');
- if (cols > 1)
- inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em');
- inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
- 'Class']('ui-datepicker-multi');
- inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +
- 'Class']('ui-datepicker-rtl');
- if (inst == $.datepicker._curInst && $.datepicker._datepickerShowing && inst.input &&
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- inst.input.is(':visible') && !inst.input.is(':disabled') && inst.input[0] != document.activeElement)
- inst.input.focus();
- // deffered render of the years select (to avoid flashes on Firefox)
- if( inst.yearshtml ){
- var origyearshtml = inst.yearshtml;
- setTimeout(function(){
- //assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
- inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
- }
- origyearshtml = inst.yearshtml = null;
- }, 0);
- }
- },
-
- /* Retrieve the size of left and top borders for an element.
- @param elem (jQuery object) the element of interest
- @return (number[2]) the left and top borders */
- _getBorders: function(elem) {
- var convert = function(value) {
- return {thin: 1, medium: 2, thick: 3}[value] || value;
- };
- return [parseFloat(convert(elem.css('border-left-width'))),
- parseFloat(convert(elem.css('border-top-width')))];
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var dpWidth = inst.dpDiv.outerWidth();
- var dpHeight = inst.dpDiv.outerHeight();
- var inputWidth = inst.input ? inst.input.outerWidth() : 0;
- var inputHeight = inst.input ? inst.input.outerHeight() : 0;
- var viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft());
- var viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
-
- offset.left -= (this._get(inst, 'isRTL') ? (dpWidth - inputWidth) : 0);
- offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
- offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-
- // now check if datepicker is showing outside window viewport - move to a better place if so.
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
- Math.abs(dpHeight + inputHeight) : 0);
-
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- var inst = this._getInst(obj);
- var isRTL = this._get(inst, 'isRTL');
- while (obj && (obj.type == 'hidden' || obj.nodeType != 1 || $.expr.filters.hidden(obj))) {
- obj = obj[isRTL ? 'previousSibling' : 'nextSibling'];
- }
- var position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- @param input element - the input field attached to the date picker */
- _hideDatepicker: function(input) {
- var inst = this._curInst;
- if (!inst || (input && inst != $.data(input, PROP_NAME)))
- return;
- if (this._datepickerShowing) {
- var showAnim = this._get(inst, 'showAnim');
- var duration = this._get(inst, 'duration');
- var postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) )
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, 'showOptions'), duration, postProcess);
- else
- inst.dpDiv[(showAnim == 'slideDown' ? 'slideUp' :
- (showAnim == 'fadeIn' ? 'fadeOut' : 'hide'))]((showAnim ? duration : null), postProcess);
- if (!showAnim)
- postProcess();
- this._datepickerShowing = false;
- var onClose = this._get(inst, 'onClose');
- if (onClose)
- onClose.apply((inst.input ? inst.input[0] : null),
- [(inst.input ? inst.input.val() : ''), inst]);
- this._lastInput = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' });
- if ($.blockUI) {
- $.unblockUI();
- $('body').append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind('.ui-datepicker-calendar');
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst)
- return;
-
- var $target = $(event.target),
- inst = $.datepicker._getInst($target[0]);
-
- if ( ( ( $target[0].id != $.datepicker._mainDivId &&
- $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.closest("." + $.datepicker._triggerClass).length &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
- ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst != inst ) )
- $.datepicker._hideDatepicker();
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- if (this._isDisabledDatepicker(target[0])) {
- return;
- }
- this._adjustInstDate(inst, offset +
- (period == 'M' ? this._get(inst, 'showCurrentAtPos') : 0), // undo positioning
- period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- if (this._get(inst, 'gotoCurrent') && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- }
- else {
- var date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- inst['selected' + (period == 'M' ? 'Month' : 'Year')] =
- inst['draw' + (period == 'M' ? 'Month' : 'Year')] =
- parseInt(select.options[select.selectedIndex].value,10);
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- var target = $(id);
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
- return;
- }
- var inst = this._getInst(target[0]);
- inst.selectedDay = inst.currentDay = $('a', td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- this._selectDate(target, '');
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var target = $(id);
- var inst = this._getInst(target[0]);
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (inst.input)
- inst.input.val(dateStr);
- this._updateAlternate(inst);
- var onSelect = this._get(inst, 'onSelect');
- if (onSelect)
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- else if (inst.input)
- inst.input.trigger('change'); // fire the change event
- if (inst.inline)
- this._updateDatepicker(inst);
- else {
- this._hideDatepicker();
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) != 'object')
- inst.input.focus(); // restore focus
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altField = this._get(inst, 'altField');
- if (altField) { // update alternate field too
- var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
- var date = this._getDate(inst);
- var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- @param date Date - the date to customise
- @return [boolean, string] - is this date selectable?, what is its CSS class? */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ''];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- @param date Date - the date to get the week for
- @return number - the number of the week within the year that contains this date */
- iso8601Week: function(date) {
- var checkDate = new Date(date.getTime());
- // Find Thursday of this week starting on Monday
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
- var time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- },
-
- /* Parse a string value into a date object.
- See formatDate below for the possible formats.
-
- @param format string - the expected format of the date
- @param value string - the date in the above format
- @param settings Object - attributes include:
- shortYearCutoff number - the cutoff year for determining the century (optional)
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return Date - the extracted date value or null if value is blank */
- parseDate: function (format, value, settings) {
- if (format == null || value == null)
- throw 'Invalid arguments';
- value = (typeof value == 'object' ? value.toString() : value + '');
- if (value == '')
- return null;
- var shortYearCutoff = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff;
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- var year = -1;
- var month = -1;
- var day = -1;
- var doy = -1;
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Extract a number from the string value
- var getNumber = function(match) {
- var isDoubled = lookAhead(match);
- var size = (match == '@' ? 14 : (match == '!' ? 20 :
- (match == 'y' && isDoubled ? 4 : (match == 'o' ? 3 : 2))));
- var digits = new RegExp('^\\d{1,' + size + '}');
- var num = value.substring(iValue).match(digits);
- if (!num)
- throw 'Missing number at position ' + iValue;
- iValue += num[0].length;
- return parseInt(num[0], 10);
- };
- // Extract a name from the string value and convert to an index
- var getName = function(match, shortNames, longNames) {
- var names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
- return [ [k, v] ];
- }).sort(function (a, b) {
- return -(a[1].length - b[1].length);
- });
- var index = -1;
- $.each(names, function (i, pair) {
- var name = pair[1];
- if (value.substr(iValue, name.length).toLowerCase() == name.toLowerCase()) {
- index = pair[0];
- iValue += name.length;
- return false;
- }
- });
- if (index != -1)
- return index + 1;
- else
- throw 'Unknown name at position ' + iValue;
- };
- // Confirm that a literal character matches the string value
- var checkLiteral = function() {
- if (value.charAt(iValue) != format.charAt(iFormat))
- throw 'Unexpected literal at position ' + iValue;
- iValue++;
- };
- var iValue = 0;
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- checkLiteral();
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- day = getNumber('d');
- break;
- case 'D':
- getName('D', dayNamesShort, dayNames);
- break;
- case 'o':
- doy = getNumber('o');
- break;
- case 'm':
- month = getNumber('m');
- break;
- case 'M':
- month = getName('M', monthNamesShort, monthNames);
- break;
- case 'y':
- year = getNumber('y');
- break;
- case '@':
- var date = new Date(getNumber('@'));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case '!':
- var date = new Date((getNumber('!') - this._ticksTo1970) / 10000);
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'"))
- checkLiteral();
- else
- literal = true;
- break;
- default:
- checkLiteral();
- }
- }
- if (iValue < value.length){
- var extra = value.substr(iValue);
- if (!/^\s+/.test(extra)) {
- throw "Extra/unparsed characters found in date: " + extra;
- }
- }
- if (year == -1)
- year = new Date().getFullYear();
- else if (year < 100)
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- if (doy > -1) {
- month = 1;
- day = doy;
- do {
- var dim = this._getDaysInMonth(year, month - 1);
- if (day <= dim)
- break;
- month++;
- day -= dim;
- } while (true);
- }
- var date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() != year || date.getMonth() + 1 != month || date.getDate() != day)
- throw 'Invalid date'; // E.g. 31/02/00
- return date;
- },
-
- /* Standard date formats. */
- ATOM: 'yy-mm-dd', // RFC 3339 (ISO 8601)
- COOKIE: 'D, dd M yy',
- ISO_8601: 'yy-mm-dd',
- RFC_822: 'D, d M y',
- RFC_850: 'DD, dd-M-y',
- RFC_1036: 'D, d M y',
- RFC_1123: 'D, d M yy',
- RFC_2822: 'D, d M yy',
- RSS: 'D, d M y', // RFC 822
- TICKS: '!',
- TIMESTAMP: '@',
- W3C: 'yy-mm-dd', // ISO 8601
-
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
-
- /* Format a date object into a string value.
- The format can be combinations of the following:
- d - day of month (no leading zero)
- dd - day of month (two digit)
- o - day of year (no leading zeros)
- oo - day of year (three digit)
- D - day name short
- DD - day name long
- m - month of year (no leading zero)
- mm - month of year (two digit)
- M - month name short
- MM - month name long
- y - year (two digit)
- yy - year (four digit)
- @ - Unix timestamp (ms since 01/01/1970)
- ! - Windows ticks (100ns since 01/01/0001)
- '...' - literal text
- '' - single quote
-
- @param format string - the desired format of the date
- @param date Date - the date value to format
- @param settings Object - attributes include:
- dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- dayNames string[7] - names of the days from Sunday (optional)
- monthNamesShort string[12] - abbreviated names of the months (optional)
- monthNames string[12] - names of the months (optional)
- @return string - the date in the above format */
- formatDate: function (format, date, settings) {
- if (!date)
- return '';
- var dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort;
- var dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames;
- var monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort;
- var monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- // Format a number, with leading zero if necessary
- var formatNumber = function(match, value, len) {
- var num = '' + value;
- if (lookAhead(match))
- while (num.length < len)
- num = '0' + num;
- return num;
- };
- // Format a name, short or long as requested
- var formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- };
- var output = '';
- var literal = false;
- if (date)
- for (var iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- output += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd':
- output += formatNumber('d', date.getDate(), 2);
- break;
- case 'D':
- output += formatName('D', date.getDay(), dayNamesShort, dayNames);
- break;
- case 'o':
- output += formatNumber('o',
- Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
- break;
- case 'm':
- output += formatNumber('m', date.getMonth() + 1, 2);
- break;
- case 'M':
- output += formatName('M', date.getMonth(), monthNamesShort, monthNames);
- break;
- case 'y':
- output += (lookAhead('y') ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? '0' : '') + date.getYear() % 100);
- break;
- case '@':
- output += date.getTime();
- break;
- case '!':
- output += date.getTime() * 10000 + this._ticksTo1970;
- break;
- case "'":
- if (lookAhead("'"))
- output += "'";
- else
- literal = true;
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var chars = '';
- var literal = false;
- // Check whether a format character is doubled
- var lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) == match);
- if (matches)
- iFormat++;
- return matches;
- };
- for (var iFormat = 0; iFormat < format.length; iFormat++)
- if (literal)
- if (format.charAt(iFormat) == "'" && !lookAhead("'"))
- literal = false;
- else
- chars += format.charAt(iFormat);
- else
- switch (format.charAt(iFormat)) {
- case 'd': case 'm': case 'y': case '@':
- chars += '0123456789';
- break;
- case 'D': case 'M':
- return null; // Accept anything
- case "'":
- if (lookAhead("'"))
- chars += "'";
- else
- literal = true;
- break;
- default:
- chars += format.charAt(iFormat);
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst, noDefault) {
- if (inst.input.val() == inst.lastVal) {
- return;
- }
- var dateFormat = this._get(inst, 'dateFormat');
- var dates = inst.lastVal = inst.input ? inst.input.val() : null;
- var date, defaultDate;
- date = defaultDate = this._getDefaultDate(inst);
- var settings = this._getFormatConfig(inst);
- try {
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
- } catch (event) {
- this.log(event);
- dates = (noDefault ? '' : dates);
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates ? date.getDate() : 0);
- inst.currentMonth = (dates ? date.getMonth() : 0);
- inst.currentYear = (dates ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- return this._restrictMinMax(inst,
- this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(inst, date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- };
- var offsetString = function(offset) {
- try {
- return $.datepicker.parseDate($.datepicker._get(inst, 'dateFormat'),
- offset, $.datepicker._getFormatConfig(inst));
- }
- catch (e) {
- // Ignore
- }
- var date = (offset.toLowerCase().match(/^c/) ?
- $.datepicker._getDate(inst) : null) || new Date();
- var year = date.getFullYear();
- var month = date.getMonth();
- var day = date.getDate();
- var pattern = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g;
- var matches = pattern.exec(offset);
- while (matches) {
- switch (matches[2] || 'd') {
- case 'd' : case 'D' :
- day += parseInt(matches[1],10); break;
- case 'w' : case 'W' :
- day += parseInt(matches[1],10) * 7; break;
- case 'm' : case 'M' :
- month += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- case 'y': case 'Y' :
- year += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- };
- var newDate = (date == null || date === '' ? defaultDate : (typeof date == 'string' ? offsetString(date) :
- (typeof date == 'number' ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
- newDate = (newDate && newDate.toString() == 'Invalid Date' ? defaultDate : newDate);
- if (newDate) {
- newDate.setHours(0);
- newDate.setMinutes(0);
- newDate.setSeconds(0);
- newDate.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(newDate);
- },
-
- /* Handle switch to/from daylight saving.
- Hours may be non-zero on daylight saving cut-over:
- > 12 when midnight changeover, but then cannot generate
- midnight datetime, so jump to 1AM, otherwise reset.
- @param date (Date) the date to check
- @return (Date) the corrected date */
- _daylightSavingAdjust: function(date) {
- if (!date) return null;
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, noChange) {
- var clear = !date;
- var origMonth = inst.selectedMonth;
- var origYear = inst.selectedYear;
- var newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
- inst.selectedDay = inst.currentDay = newDate.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
- if ((origMonth != inst.selectedMonth || origYear != inst.selectedYear) && !noChange)
- this._notifyChange(inst);
- this._adjustInstDate(inst);
- if (inst.input) {
- inst.input.val(clear ? '' : this._formatDate(inst));
- }
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() == '') ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- return startDate;
- },
-
- /* Attach the onxxx handlers. These are declared statically so
- * they work with static code transformers like Caja.
- */
- _attachHandlers: function(inst) {
- var stepMonths = this._get(inst, 'stepMonths');
- var id = '#' + inst.id.replace( /\\\\/g, "\\" );
- inst.dpDiv.find('[data-handler]').map(function () {
- var handler = {
- prev: function () {
- window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, -stepMonths, 'M');
- },
- next: function () {
- window['DP_jQuery_' + dpuuid].datepicker._adjustDate(id, +stepMonths, 'M');
- },
- hide: function () {
- window['DP_jQuery_' + dpuuid].datepicker._hideDatepicker();
- },
- today: function () {
- window['DP_jQuery_' + dpuuid].datepicker._gotoToday(id);
- },
- selectDay: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectDay(id, +this.getAttribute('data-month'), +this.getAttribute('data-year'), this);
- return false;
- },
- selectMonth: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'M');
- return false;
- },
- selectYear: function () {
- window['DP_jQuery_' + dpuuid].datepicker._selectMonthYear(id, this, 'Y');
- return false;
- }
- };
- $(this).bind(this.getAttribute('data-event'), handler[this.getAttribute('data-handler')]);
- });
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateHTML: function(inst) {
- var today = new Date();
- today = this._daylightSavingAdjust(
- new Date(today.getFullYear(), today.getMonth(), today.getDate())); // clear time
- var isRTL = this._get(inst, 'isRTL');
- var showButtonPanel = this._get(inst, 'showButtonPanel');
- var hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext');
- var navigationAsDateFormat = this._get(inst, 'navigationAsDateFormat');
- var numMonths = this._getNumberOfMonths(inst);
- var showCurrentAtPos = this._get(inst, 'showCurrentAtPos');
- var stepMonths = this._get(inst, 'stepMonths');
- var isMultiMonth = (numMonths[0] != 1 || numMonths[1] != 1);
- var currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- var drawMonth = inst.drawMonth - showCurrentAtPos;
- var drawYear = inst.drawYear;
- if (drawMonth < 0) {
- drawMonth += 12;
- drawYear--;
- }
- if (maxDate) {
- var maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- inst.drawMonth = drawMonth;
- inst.drawYear = drawYear;
- var prevText = this._get(inst, 'prevText');
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
- var prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- '<a class="ui-datepicker-prev ui-corner-all" data-handler="prev" data-event="click"' +
- ' title="' + prevText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>' :
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+ prevText +'"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'e' : 'w') + '">' + prevText + '</span></a>'));
- var nextText = this._get(inst, 'nextText');
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
- var next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- '<a class="ui-datepicker-next ui-corner-all" data-handler="next" data-event="click"' +
- ' title="' + nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>' :
- (hideIfNoPrevNext ? '' : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+ nextText + '"><span class="ui-icon ui-icon-circle-triangle-' + ( isRTL ? 'w' : 'e') + '">' + nextText + '</span></a>'));
- var currentText = this._get(inst, 'currentText');
- var gotoDate = (this._get(inst, 'gotoCurrent') && inst.currentDay ? currentDate : today);
- currentText = (!navigationAsDateFormat ? currentText :
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
- var controls = (!inst.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" data-handler="hide" data-event="click">' +
- this._get(inst, 'closeText') + '</button>' : '');
- var buttonPanel = (showButtonPanel) ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (isRTL ? controls : '') +
- (this._isInRange(inst, gotoDate) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" data-handler="today" data-event="click"' +
- '>' + currentText + '</button>' : '') + (isRTL ? '' : controls) + '</div>' : '';
- var firstDay = parseInt(this._get(inst, 'firstDay'),10);
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
- var showWeek = this._get(inst, 'showWeek');
- var dayNames = this._get(inst, 'dayNames');
- var dayNamesShort = this._get(inst, 'dayNamesShort');
- var dayNamesMin = this._get(inst, 'dayNamesMin');
- var monthNames = this._get(inst, 'monthNames');
- var monthNamesShort = this._get(inst, 'monthNamesShort');
- var beforeShowDay = this._get(inst, 'beforeShowDay');
- var showOtherMonths = this._get(inst, 'showOtherMonths');
- var selectOtherMonths = this._get(inst, 'selectOtherMonths');
- var calculateWeek = this._get(inst, 'calculateWeek') || this.iso8601Week;
- var defaultDate = this._getDefaultDate(inst);
- var html = '';
- for (var row = 0; row < numMonths[0]; row++) {
- var group = '';
- this.maxRows = 4;
- for (var col = 0; col < numMonths[1]; col++) {
- var selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- var cornerClass = ' ui-corner-all';
- var calender = '';
- if (isMultiMonth) {
- calender += '<div class="ui-datepicker-group';
- if (numMonths[1] > 1)
- switch (col) {
- case 0: calender += ' ui-datepicker-group-first';
- cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break;
- case numMonths[1]-1: calender += ' ui-datepicker-group-last';
- cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break;
- default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break;
- }
- calender += '">';
- }
- calender += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + cornerClass + '">' +
- (/all|left/.test(cornerClass) && row == 0 ? (isRTL ? next : prev) : '') +
- (/all|right/.test(cornerClass) && row == 0 ? (isRTL ? prev : next) : '') +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
- '</div><table class="ui-datepicker-calendar"><thead>' +
- '<tr>';
- var thead = (showWeek ? '<th class="ui-datepicker-week-col">' + this._get(inst, 'weekHeader') + '</th>' : '');
- for (var dow = 0; dow < 7; dow++) { // days of the week
- var day = (dow + firstDay) % 7;
- thead += '<th' + ((dow + firstDay + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : '') + '>' +
- '<span title="' + dayNames[day] + '">' + dayNamesMin[day] + '</span></th>';
- }
- calender += thead + '</tr></thead><tbody>';
- var daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear == inst.selectedYear && drawMonth == inst.selectedMonth)
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- var leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- var curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- var numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
- this.maxRows = numRows;
- var printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (var dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- calender += '<tr>';
- var tbody = (!showWeek ? '' : '<td class="ui-datepicker-week-col">' +
- this._get(inst, 'calculateWeek')(printDate) + '</td>');
- for (var dow = 0; dow < 7; dow++) { // create date picker days
- var daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, '']);
- var otherMonth = (printDate.getMonth() != drawMonth);
- var unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody += '<td class="' +
- ((dow + firstDay + 6) % 7 >= 5 ? ' ui-datepicker-week-end' : '') + // highlight weekends
- (otherMonth ? ' ui-datepicker-other-month' : '') + // highlight days from other months
- ((printDate.getTime() == selectedDate.getTime() && drawMonth == inst.selectedMonth && inst._keyEvent) || // user pressed key
- (defaultDate.getTime() == printDate.getTime() && defaultDate.getTime() == selectedDate.getTime()) ?
- // or defaultDate is current printedDate and defaultDate is selectedDate
- ' ' + this._dayOverClass : '') + // highlight selected day
- (unselectable ? ' ' + this._unselectableClass + ' ui-state-disabled': '') + // highlight unselectable days
- (otherMonth && !showOtherMonths ? '' : ' ' + daySettings[1] + // highlight custom dates
- (printDate.getTime() == currentDate.getTime() ? ' ' + this._currentClass : '') + // highlight selected day
- (printDate.getTime() == today.getTime() ? ' ui-datepicker-today' : '')) + '"' + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? ' title="' + daySettings[2] + '"' : '') + // cell title
- (unselectable ? '' : ' data-handler="selectDay" data-event="click" data-month="' + printDate.getMonth() + '" data-year="' + printDate.getFullYear() + '"') + '>' + // actions
- (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
- (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
- (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
- (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
- (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
- '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- calender += tbody + '</tr>';
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
- ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
- group += calender;
- }
- html += group;
- }
- html += buttonPanel + ($.ui.ie6 && !inst.inline ?
- '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : '');
- inst._keyEvent = false;
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- secondary, monthNames, monthNamesShort) {
- var changeMonth = this._get(inst, 'changeMonth');
- var changeYear = this._get(inst, 'changeYear');
- var showMonthAfterYear = this._get(inst, 'showMonthAfterYear');
- var html = '<div class="ui-datepicker-title">';
- var monthHtml = '';
- // month selection
- if (secondary || !changeMonth)
- monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
- else {
- var inMinYear = (minDate && minDate.getFullYear() == drawYear);
- var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
- monthHtml += '<select class="ui-datepicker-month" data-handler="selectMonth" data-event="change">';
- for (var month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) &&
- (!inMaxYear || month <= maxDate.getMonth()))
- monthHtml += '<option value="' + month + '"' +
- (month == drawMonth ? ' selected="selected"' : '') +
- '>' + monthNamesShort[month] + '</option>';
- }
- monthHtml += '</select>';
- }
- if (!showMonthAfterYear)
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
- // year selection
- if ( !inst.yearshtml ) {
- inst.yearshtml = '';
- if (secondary || !changeYear)
- html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
- else {
- // determine range of years to display
- var years = this._get(inst, 'yearRange').split(':');
- var thisYear = new Date().getFullYear();
- var determineYear = function(value) {
- var year = (value.match(/c[+-].*/) ? drawYear + parseInt(value.substring(1), 10) :
- (value.match(/[+-].*/) ? thisYear + parseInt(value, 10) :
- parseInt(value, 10)));
- return (isNaN(year) ? thisYear : year);
- };
- var year = determineYear(years[0]);
- var endYear = Math.max(year, determineYear(years[1] || ''));
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- inst.yearshtml += '<select class="ui-datepicker-year" data-handler="selectYear" data-event="change">';
- for (; year <= endYear; year++) {
- inst.yearshtml += '<option value="' + year + '"' +
- (year == drawYear ? ' selected="selected"' : '') +
- '>' + year + '</option>';
- }
- inst.yearshtml += '</select>';
-
- html += inst.yearshtml;
- inst.yearshtml = null;
- }
- }
- html += this._get(inst, 'yearSuffix');
- if (showMonthAfterYear)
- html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
- html += '</div>'; // Close datepicker_header
- return html;
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period == 'Y' ? offset : 0);
- var month = inst.drawMonth + (period == 'M' ? offset : 0);
- var day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) +
- (period == 'D' ? offset : 0);
- var date = this._restrictMinMax(inst,
- this._daylightSavingAdjust(new Date(year, month, day)));
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period == 'M' || period == 'Y')
- this._notifyChange(inst);
- },
-
- /* Ensure a date is within any min/max bounds. */
- _restrictMinMax: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- var newDate = (minDate && date < minDate ? minDate : date);
- newDate = (maxDate && newDate > maxDate ? maxDate : newDate);
- return newDate;
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, 'onChangeMonthYear');
- if (onChange)
- onChange.apply((inst.input ? inst.input[0] : null),
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, 'numberOfMonths');
- return (numMonths == null ? [1, 1] : (typeof numMonths == 'number' ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set. */
- _getMinMaxDate: function(inst, minMax) {
- return this._determineDate(inst, this._get(inst, minMax + 'Date'), null);
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst);
- var date = this._daylightSavingAdjust(new Date(curYear,
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
- if (offset < 0)
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, 'min');
- var maxDate = this._getMinMaxDate(inst, 'max');
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, 'shortYearCutoff');
- shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'),
- monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day == 'object' ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, 'dateFormat'), date, this._getFormatConfig(inst));
- }
-});
-
-/*
- * Bind hover events for datepicker elements.
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
- * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
- */
-function bindHover(dpDiv) {
- var selector = 'button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a';
- return dpDiv.delegate(selector, 'mouseout', function() {
- $(this).removeClass('ui-state-hover');
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).removeClass('ui-datepicker-prev-hover');
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).removeClass('ui-datepicker-next-hover');
- })
- .delegate(selector, 'mouseover', function(){
- if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
- $(this).parents('.ui-datepicker-calendar').find('a').removeClass('ui-state-hover');
- $(this).addClass('ui-state-hover');
- if (this.className.indexOf('ui-datepicker-prev') != -1) $(this).addClass('ui-datepicker-prev-hover');
- if (this.className.indexOf('ui-datepicker-next') != -1) $(this).addClass('ui-datepicker-next-hover');
- }
- });
-}
-
-/* jQuery extend now ignores nulls! */
-function extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props)
- if (props[name] == null || props[name] == undefined)
- target[name] = props[name];
- return target;
-};
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
-
- /* Verify an empty collection wasn't passed - Fixes #6976 */
- if ( !this.length ) {
- return this;
- }
-
- /* Initialise the date picker. */
- if (!$.datepicker.initialized) {
- $(document).mousedown($.datepicker._checkExternalClick).
- find(document.body).append($.datepicker.dpDiv);
- $.datepicker.initialized = true;
- }
-
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate' || options == 'widget'))
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- if (options == 'option' && arguments.length == 2 && typeof arguments[1] == 'string')
- return $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this[0]].concat(otherArgs));
- return this.each(function() {
- typeof options == 'string' ?
- $.datepicker['_' + options + 'Datepicker'].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-$.datepicker.initialized = false;
-$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.9.2";
-
-// Workaround for #4055
-// Add another global to avoid noConflict issues with inline event handlers
-window['DP_jQuery_' + dpuuid] = $;
-
-})(jQuery);
-(function( $, undefined ) {
-
-var uiDialogClasses = "ui-dialog ui-widget ui-widget-content ui-corner-all ",
- sizeRelatedOptions = {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
- resizableRelatedOptions = {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- };
-
-$.widget("ui.dialog", {
- version: "1.9.2",
- options: {
- autoOpen: true,
- buttons: {},
- closeOnEscape: true,
- closeText: "close",
- dialogClass: "",
- draggable: true,
- hide: null,
- height: "auto",
- maxHeight: false,
- maxWidth: false,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: "center",
- at: "center",
- of: window,
- collision: "fit",
- // ensure that the titlebar is never outside the document
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
- }
- }
- },
- resizable: true,
- show: null,
- stack: true,
- title: "",
- width: 300,
- zIndex: 1000
- },
-
- _create: function() {
- this.originalTitle = this.element.attr( "title" );
- // #5742 - .attr() might return a DOMElement
- if ( typeof this.originalTitle !== "string" ) {
- this.originalTitle = "";
- }
- this.oldPosition = {
- parent: this.element.parent(),
- index: this.element.parent().children().index( this.element )
- };
- this.options.title = this.options.title || this.originalTitle;
- var that = this,
- options = this.options,
-
- title = options.title || "&#160;",
- uiDialog,
- uiDialogTitlebar,
- uiDialogTitlebarClose,
- uiDialogTitle,
- uiDialogButtonPane;
-
- uiDialog = ( this.uiDialog = $( "<div>" ) )
- .addClass( uiDialogClasses + options.dialogClass )
- .css({
- display: "none",
- outline: 0, // TODO: move to stylesheet
- zIndex: options.zIndex
- })
- // setting tabIndex makes the div focusable
- .attr( "tabIndex", -1)
- .keydown(function( event ) {
- if ( options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- that.close( event );
- event.preventDefault();
- }
- })
- .mousedown(function( event ) {
- that.moveToTop( false, event );
- })
- .appendTo( "body" );
-
- this.element
- .show()
- .removeAttr( "title" )
- .addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( uiDialog );
-
- uiDialogTitlebar = ( this.uiDialogTitlebar = $( "<div>" ) )
- .addClass( "ui-dialog-titlebar ui-widget-header " +
- "ui-corner-all ui-helper-clearfix" )
- .bind( "mousedown", function() {
- // Dialog isn't getting focus when dragging (#8063)
- uiDialog.focus();
- })
- .prependTo( uiDialog );
-
- uiDialogTitlebarClose = $( "<a href='#'></a>" )
- .addClass( "ui-dialog-titlebar-close ui-corner-all" )
- .attr( "role", "button" )
- .click(function( event ) {
- event.preventDefault();
- that.close( event );
- })
- .appendTo( uiDialogTitlebar );
-
- ( this.uiDialogTitlebarCloseText = $( "<span>" ) )
- .addClass( "ui-icon ui-icon-closethick" )
- .text( options.closeText )
- .appendTo( uiDialogTitlebarClose );
-
- uiDialogTitle = $( "<span>" )
- .uniqueId()
- .addClass( "ui-dialog-title" )
- .html( title )
- .prependTo( uiDialogTitlebar );
-
- uiDialogButtonPane = ( this.uiDialogButtonPane = $( "<div>" ) )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
-
- ( this.uiButtonSet = $( "<div>" ) )
- .addClass( "ui-dialog-buttonset" )
- .appendTo( uiDialogButtonPane );
-
- uiDialog.attr({
- role: "dialog",
- "aria-labelledby": uiDialogTitle.attr( "id" )
- });
-
- uiDialogTitlebar.find( "*" ).add( uiDialogTitlebar ).disableSelection();
- this._hoverable( uiDialogTitlebarClose );
- this._focusable( uiDialogTitlebarClose );
-
- if ( options.draggable && $.fn.draggable ) {
- this._makeDraggable();
- }
- if ( options.resizable && $.fn.resizable ) {
- this._makeResizable();
- }
-
- this._createButtons( options.buttons );
- this._isOpen = false;
-
- if ( $.fn.bgiframe ) {
- uiDialog.bgiframe();
- }
-
- // prevent tabbing out of modal dialogs
- this._on( uiDialog, { keydown: function( event ) {
- if ( !options.modal || event.keyCode !== $.ui.keyCode.TAB ) {
- return;
- }
-
- var tabbables = $( ":tabbable", uiDialog ),
- first = tabbables.filter( ":first" ),
- last = tabbables.filter( ":last" );
-
- if ( event.target === last[0] && !event.shiftKey ) {
- first.focus( 1 );
- return false;
- } else if ( event.target === first[0] && event.shiftKey ) {
- last.focus( 1 );
- return false;
- }
- }});
- },
-
- _init: function() {
- if ( this.options.autoOpen ) {
- this.open();
- }
- },
-
- _destroy: function() {
- var next,
- oldPosition = this.oldPosition;
-
- if ( this.overlay ) {
- this.overlay.destroy();
- }
- this.uiDialog.hide();
- this.element
- .removeClass( "ui-dialog-content ui-widget-content" )
- .hide()
- .appendTo( "body" );
- this.uiDialog.remove();
-
- if ( this.originalTitle ) {
- this.element.attr( "title", this.originalTitle );
- }
-
- next = oldPosition.parent.children().eq( oldPosition.index );
- // Don't try to place the dialog next to itself (#8613)
- if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
- next.before( this.element );
- } else {
- oldPosition.parent.append( this.element );
- }
- },
-
- widget: function() {
- return this.uiDialog;
- },
-
- close: function( event ) {
- var that = this,
- maxZ, thisZ;
-
- if ( !this._isOpen ) {
- return;
- }
-
- if ( false === this._trigger( "beforeClose", event ) ) {
- return;
- }
-
- this._isOpen = false;
-
- if ( this.overlay ) {
- this.overlay.destroy();
- }
-
- if ( this.options.hide ) {
- this._hide( this.uiDialog, this.options.hide, function() {
- that._trigger( "close", event );
- });
- } else {
- this.uiDialog.hide();
- this._trigger( "close", event );
- }
-
- $.ui.dialog.overlay.resize();
-
- // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- if ( this.options.modal ) {
- maxZ = 0;
- $( ".ui-dialog" ).each(function() {
- if ( this !== that.uiDialog[0] ) {
- thisZ = $( this ).css( "z-index" );
- if ( !isNaN( thisZ ) ) {
- maxZ = Math.max( maxZ, thisZ );
- }
- }
- });
- $.ui.dialog.maxZ = maxZ;
- }
-
- return this;
- },
-
- isOpen: function() {
- return this._isOpen;
- },
-
- // the force parameter allows us to move modal dialogs to their correct
- // position on open
- moveToTop: function( force, event ) {
- var options = this.options,
- saveScroll;
-
- if ( ( options.modal && !force ) ||
- ( !options.stack && !options.modal ) ) {
- return this._trigger( "focus", event );
- }
-
- if ( options.zIndex > $.ui.dialog.maxZ ) {
- $.ui.dialog.maxZ = options.zIndex;
- }
- if ( this.overlay ) {
- $.ui.dialog.maxZ += 1;
- $.ui.dialog.overlay.maxZ = $.ui.dialog.maxZ;
- this.overlay.$el.css( "z-index", $.ui.dialog.overlay.maxZ );
- }
-
- // Save and then restore scroll
- // Opera 9.5+ resets when parent z-index is changed.
- // http://bugs.jqueryui.com/ticket/3193
- saveScroll = {
- scrollTop: this.element.scrollTop(),
- scrollLeft: this.element.scrollLeft()
- };
- $.ui.dialog.maxZ += 1;
- this.uiDialog.css( "z-index", $.ui.dialog.maxZ );
- this.element.attr( saveScroll );
- this._trigger( "focus", event );
-
- return this;
- },
-
- open: function() {
- if ( this._isOpen ) {
- return;
- }
-
- var hasFocus,
- options = this.options,
- uiDialog = this.uiDialog;
-
- this._size();
- this._position( options.position );
- uiDialog.show( options.show );
- this.overlay = options.modal ? new $.ui.dialog.overlay( this ) : null;
- this.moveToTop( true );
-
- // set focus to the first tabbable element in the content area or the first button
- // if there are no tabbable elements, set focus on the dialog itself
- hasFocus = this.element.find( ":tabbable" );
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
- if ( !hasFocus.length ) {
- hasFocus = uiDialog;
- }
- }
- hasFocus.eq( 0 ).focus();
-
- this._isOpen = true;
- this._trigger( "open" );
-
- return this;
- },
-
- _createButtons: function( buttons ) {
- var that = this,
- hasButtons = false;
-
- // if we already have a button pane, remove it
- this.uiDialogButtonPane.remove();
- this.uiButtonSet.empty();
-
- if ( typeof buttons === "object" && buttons !== null ) {
- $.each( buttons, function() {
- return !(hasButtons = true);
- });
- }
- if ( hasButtons ) {
- $.each( buttons, function( name, props ) {
- var button, click;
- props = $.isFunction( props ) ?
- { click: props, text: name } :
- props;
- // Default to a non-submitting button
- props = $.extend( { type: "button" }, props );
- // Change the context for the click callback to be the main element
- click = props.click;
- props.click = function() {
- click.apply( that.element[0], arguments );
- };
- button = $( "<button></button>", props )
- .appendTo( that.uiButtonSet );
- if ( $.fn.button ) {
- button.button();
- }
- });
- this.uiDialog.addClass( "ui-dialog-buttons" );
- this.uiDialogButtonPane.appendTo( this.uiDialog );
- } else {
- this.uiDialog.removeClass( "ui-dialog-buttons" );
- }
- },
-
- _makeDraggable: function() {
- var that = this,
- options = this.options;
-
- function filteredUi( ui ) {
- return {
- position: ui.position,
- offset: ui.offset
- };
- }
-
- this.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- $( this )
- .addClass( "ui-dialog-dragging" );
- that._trigger( "dragStart", event, filteredUi( ui ) );
- },
- drag: function( event, ui ) {
- that._trigger( "drag", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- options.position = [
- ui.position.left - that.document.scrollLeft(),
- ui.position.top - that.document.scrollTop()
- ];
- $( this )
- .removeClass( "ui-dialog-dragging" );
- that._trigger( "dragStop", event, filteredUi( ui ) );
- $.ui.dialog.overlay.resize();
- }
- });
- },
-
- _makeResizable: function( handles ) {
- handles = (handles === undefined ? this.options.resizable : handles);
- var that = this,
- options = this.options,
- // .ui-resizable has position: relative defined in the stylesheet
- // but dialogs have to use absolute or fixed positioning
- position = this.uiDialog.css( "position" ),
- resizeHandles = typeof handles === 'string' ?
- handles :
- "n,e,s,w,se,sw,ne,nw";
-
- function filteredUi( ui ) {
- return {
- originalPosition: ui.originalPosition,
- originalSize: ui.originalSize,
- position: ui.position,
- size: ui.size
- };
- }
-
- this.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
- alsoResize: this.element,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: this._minHeight(),
- handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-resizing" );
- that._trigger( "resizeStart", event, filteredUi( ui ) );
- },
- resize: function( event, ui ) {
- that._trigger( "resize", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- $( this ).removeClass( "ui-dialog-resizing" );
- options.height = $( this ).height();
- options.width = $( this ).width();
- that._trigger( "resizeStop", event, filteredUi( ui ) );
- $.ui.dialog.overlay.resize();
- }
- })
- .css( "position", position )
- .find( ".ui-resizable-se" )
- .addClass( "ui-icon ui-icon-grip-diagonal-se" );
- },
-
- _minHeight: function() {
- var options = this.options;
-
- if ( options.height === "auto" ) {
- return options.minHeight;
- } else {
- return Math.min( options.minHeight, options.height );
- }
- },
-
- _position: function( position ) {
- var myAt = [],
- offset = [ 0, 0 ],
- isVisible;
-
- if ( position ) {
- // deep extending converts arrays to objects in jQuery <= 1.3.2 :-(
- // if (typeof position == 'string' || $.isArray(position)) {
- // myAt = $.isArray(position) ? position : position.split(' ');
-
- if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
- myAt = position.split ? position.split( " " ) : [ position[ 0 ], position[ 1 ] ];
- if ( myAt.length === 1 ) {
- myAt[ 1 ] = myAt[ 0 ];
- }
-
- $.each( [ "left", "top" ], function( i, offsetPosition ) {
- if ( +myAt[ i ] === myAt[ i ] ) {
- offset[ i ] = myAt[ i ];
- myAt[ i ] = offsetPosition;
- }
- });
-
- position = {
- my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
- myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
- at: myAt.join( " " )
- };
- }
-
- position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
- } else {
- position = $.ui.dialog.prototype.options.position;
- }
-
- // need to show the dialog to get the actual offset in the position plugin
- isVisible = this.uiDialog.is( ":visible" );
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- },
-
- _setOptions: function( options ) {
- var that = this,
- resizableOptions = {},
- resize = false;
-
- $.each( options, function( key, value ) {
- that._setOption( key, value );
-
- if ( key in sizeRelatedOptions ) {
- resize = true;
- }
- if ( key in resizableRelatedOptions ) {
- resizableOptions[ key ] = value;
- }
- });
-
- if ( resize ) {
- this._size();
- }
- if ( this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", resizableOptions );
- }
- },
-
- _setOption: function( key, value ) {
- var isDraggable, isResizable,
- uiDialog = this.uiDialog;
-
- switch ( key ) {
- case "buttons":
- this._createButtons( value );
- break;
- case "closeText":
- // ensure that we always pass a string
- this.uiDialogTitlebarCloseText.text( "" + value );
- break;
- case "dialogClass":
- uiDialog
- .removeClass( this.options.dialogClass )
- .addClass( uiDialogClasses + value );
- break;
- case "disabled":
- if ( value ) {
- uiDialog.addClass( "ui-dialog-disabled" );
- } else {
- uiDialog.removeClass( "ui-dialog-disabled" );
- }
- break;
- case "draggable":
- isDraggable = uiDialog.is( ":data(draggable)" );
- if ( isDraggable && !value ) {
- uiDialog.draggable( "destroy" );
- }
-
- if ( !isDraggable && value ) {
- this._makeDraggable();
- }
- break;
- case "position":
- this._position( value );
- break;
- case "resizable":
- // currently resizable, becoming non-resizable
- isResizable = uiDialog.is( ":data(resizable)" );
- if ( isResizable && !value ) {
- uiDialog.resizable( "destroy" );
- }
-
- // currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
- }
-
- // currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- this._makeResizable( value );
- }
- break;
- case "title":
- // convert whatever was passed in o a string, for html() to not throw up
- $( ".ui-dialog-title", this.uiDialogTitlebar )
- .html( "" + ( value || "&#160;" ) );
- break;
- }
-
- this._super( key, value );
- },
-
- _size: function() {
- /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
- * divs will both have width and height set, so we need to reset them
- */
- var nonContentHeight, minContentHeight, autoHeight,
- options = this.options,
- isVisible = this.uiDialog.is( ":visible" );
-
- // reset content sizing
- this.element.show().css({
- width: "auto",
- minHeight: 0,
- height: 0
- });
-
- if ( options.minWidth > options.width ) {
- options.width = options.minWidth;
- }
-
- // reset wrapper sizing
- // determine the height of all the non-content elements
- nonContentHeight = this.uiDialog.css({
- height: "auto",
- width: options.width
- })
- .outerHeight();
- minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
-
- if ( options.height === "auto" ) {
- // only needed for IE6 support
- if ( $.support.minHeight ) {
- this.element.css({
- minHeight: minContentHeight,
- height: "auto"
- });
- } else {
- this.uiDialog.show();
- autoHeight = this.element.css( "height", "auto" ).height();
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- this.element.height( Math.max( autoHeight, minContentHeight ) );
- }
- } else {
- this.element.height( Math.max( options.height - nonContentHeight, 0 ) );
- }
-
- if (this.uiDialog.is( ":data(resizable)" ) ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
- }
- }
-});
-
-$.extend($.ui.dialog, {
- uuid: 0,
- maxZ: 0,
-
- getTitleId: function($el) {
- var id = $el.attr( "id" );
- if ( !id ) {
- this.uuid += 1;
- id = this.uuid;
- }
- return "ui-dialog-title-" + id;
- },
-
- overlay: function( dialog ) {
- this.$el = $.ui.dialog.overlay.create( dialog );
- }
-});
-
-$.extend( $.ui.dialog.overlay, {
- instances: [],
- // reuse old instances due to IE memory leak with alpha transparency (see #5185)
- oldInstances: [],
- maxZ: 0,
- events: $.map(
- "focus,mousedown,mouseup,keydown,keypress,click".split( "," ),
- function( event ) {
- return event + ".dialog-overlay";
- }
- ).join( " " ),
- create: function( dialog ) {
- if ( this.instances.length === 0 ) {
- // prevent use of anchors and inputs
- // we use a setTimeout in case the overlay is created from an
- // event that we're going to be cancelling (see #2804)
- setTimeout(function() {
- // handle $(el).dialog().dialog('close') (see #4065)
- if ( $.ui.dialog.overlay.instances.length ) {
- $( document ).bind( $.ui.dialog.overlay.events, function( event ) {
- // stop events if the z-index of the target is < the z-index of the overlay
- // we cannot return true when we don't want to cancel the event (#3523)
- if ( $( event.target ).zIndex() < $.ui.dialog.overlay.maxZ ) {
- return false;
- }
- });
- }
- }, 1 );
-
- // handle window resize
- $( window ).bind( "resize.dialog-overlay", $.ui.dialog.overlay.resize );
- }
-
- var $el = ( this.oldInstances.pop() || $( "<div>" ).addClass( "ui-widget-overlay" ) );
-
- // allow closing by pressing the escape key
- $( document ).bind( "keydown.dialog-overlay", function( event ) {
- var instances = $.ui.dialog.overlay.instances;
- // only react to the event if we're the top overlay
- if ( instances.length !== 0 && instances[ instances.length - 1 ] === $el &&
- dialog.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
-
- dialog.close( event );
- event.preventDefault();
- }
- });
-
- $el.appendTo( document.body ).css({
- width: this.width(),
- height: this.height()
- });
-
- if ( $.fn.bgiframe ) {
- $el.bgiframe();
- }
-
- this.instances.push( $el );
- return $el;
- },
-
- destroy: function( $el ) {
- var indexOf = $.inArray( $el, this.instances ),
- maxZ = 0;
-
- if ( indexOf !== -1 ) {
- this.oldInstances.push( this.instances.splice( indexOf, 1 )[ 0 ] );
- }
-
- if ( this.instances.length === 0 ) {
- $( [ document, window ] ).unbind( ".dialog-overlay" );
- }
-
- $el.height( 0 ).width( 0 ).remove();
-
- // adjust the maxZ to allow other modal dialogs to continue to work (see #4309)
- $.each( this.instances, function() {
- maxZ = Math.max( maxZ, this.css( "z-index" ) );
- });
- this.maxZ = maxZ;
- },
-
- height: function() {
- var scrollHeight,
- offsetHeight;
- // handle IE
- if ( $.ui.ie ) {
- scrollHeight = Math.max(
- document.documentElement.scrollHeight,
- document.body.scrollHeight
- );
- offsetHeight = Math.max(
- document.documentElement.offsetHeight,
- document.body.offsetHeight
- );
-
- if ( scrollHeight < offsetHeight ) {
- return $( window ).height() + "px";
- } else {
- return scrollHeight + "px";
- }
- // handle "good" browsers
- } else {
- return $( document ).height() + "px";
- }
- },
-
- width: function() {
- var scrollWidth,
- offsetWidth;
- // handle IE
- if ( $.ui.ie ) {
- scrollWidth = Math.max(
- document.documentElement.scrollWidth,
- document.body.scrollWidth
- );
- offsetWidth = Math.max(
- document.documentElement.offsetWidth,
- document.body.offsetWidth
- );
-
- if ( scrollWidth < offsetWidth ) {
- return $( window ).width() + "px";
- } else {
- return scrollWidth + "px";
- }
- // handle "good" browsers
- } else {
- return $( document ).width() + "px";
- }
- },
-
- resize: function() {
- /* If the dialog is draggable and the user drags it past the
- * right edge of the window, the document becomes wider so we
- * need to stretch the overlay. If the user then drags the
- * dialog back to the left, the document will become narrower,
- * so we need to shrink the overlay to the appropriate size.
- * This is handled by shrinking the overlay before setting it
- * to the full document size.
- */
- var $overlays = $( [] );
- $.each( $.ui.dialog.overlay.instances, function() {
- $overlays = $overlays.add( this );
- });
-
- $overlays.css({
- width: 0,
- height: 0
- }).css({
- width: $.ui.dialog.overlay.width(),
- height: $.ui.dialog.overlay.height()
- });
- }
-});
-
-$.extend( $.ui.dialog.overlay.prototype, {
- destroy: function() {
- $.ui.dialog.overlay.destroy( this.$el );
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false
- },
- _create: function() {
-
- if (this.options.helper == 'original' && !(/^(?:r|a|f)/).test(this.element.css("position")))
- this.element[0].style.position = 'relative';
-
- (this.options.addClasses && this.element.addClass("ui-draggable"));
- (this.options.disabled && this.element.addClass("ui-draggable-disabled"));
-
- this._mouseInit();
-
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
-
- var o = this.options;
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).is('.ui-resizable-handle'))
- return false;
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle)
- return false;
-
- $(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
- $('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>')
- .css({
- width: this.offsetWidth+"px", height: this.offsetHeight+"px",
- position: "absolute", opacity: "0.001", zIndex: 1000
- })
- .css($(this).offset())
- .appendTo("body");
- });
-
- return true;
-
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if($.ui.ddmanager)
- $.ui.ddmanager.current = this;
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css("position");
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.positionAbs = this.element.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- if(o.containment)
- this._setContainment();
-
- //Trigger event + callbacks
- if(this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
-
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) $.ui.ddmanager.dragStart(this, event);
-
- return true;
- },
-
- _mouseDrag: function(event, noPropagation) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if(this._trigger('drag', event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- dropped = $.ui.ddmanager.drop(this, event);
-
- //if a drop comes from outside (a sortable)
- if(this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- //if the original element is no longer in the DOM don't bother to continue (see #8269)
- var element = this.element[0], elementInDom = false;
- while ( element && (element = element.parentNode) ) {
- if (element == document ) {
- elementInDom = true;
- }
- }
- if ( !elementInDom && this.options.helper === "original" )
- return false;
-
- if((this.options.revert == "invalid" && !dropped) || (this.options.revert == "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- var that = this;
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if(that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if(this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function(event) {
- //Remove frame helpers
- $("div.ui-draggable-iframeFix").each(function() {
- this.parentNode.removeChild(this);
- });
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if( $.ui.ddmanager ) $.ui.ddmanager.dragStop(this, event);
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if(this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
-
- var handle = !this.options.handle || !$(this.options.handle, this.element).length ? true : false;
- $(this.options.handle, this.element)
- .find("*")
- .andSelf()
- .each(function() {
- if(this == event.target) handle = true;
- });
-
- return handle;
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options;
- var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper == 'clone' ? this.element.clone().removeAttr('id') : this.element);
-
- if(!helper.parents('body').length)
- helper.appendTo((o.appendTo == 'parent' ? this.element[0].parentNode : o.appendTo));
-
- if(helper[0] != this.element[0] && !(/(fixed|absolute)/).test(helper.css("position")))
- helper.css("position", "absolute");
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj == 'string') {
- obj = obj.split(' ');
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ('left' in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ('right' in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ('top' in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ('bottom' in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
- po = { top: 0, left: 0 };
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition == "relative") {
- var p = this.element.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"),10) || 0),
- top: (parseInt(this.element.css("marginTop"),10) || 0),
- right: (parseInt(this.element.css("marginRight"),10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var o = this.options;
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- o.containment == 'document' ? 0 : $(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- o.containment == 'document' ? 0 : $(window).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- (o.containment == 'document' ? 0 : $(window).scrollLeft()) + $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- (o.containment == 'document' ? 0 : $(window).scrollTop()) + ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
- var c = $(o.containment);
- var ce = c[0]; if(!ce) return;
- var co = c.offset();
- var over = ($(ce).css("overflow") != 'hidden');
-
- this.containment = [
- (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0),
- (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0),
- (over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right,
- (over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom
- ];
- this.relative_container = c;
-
- } else if(o.containment.constructor == Array) {
- this.containment = o.containment;
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top // The absolute mouse position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left // The absolute mouse position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
- var pageX = event.pageX;
- var pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
- var containment;
- if(this.containment) {
- if (this.relative_container){
- var co = this.relative_container.offset();
- containment = [ this.containment[0] + co.left,
- this.containment[1] + co.top,
- this.containment[2] + co.left,
- this.containment[3] + co.top ];
- }
- else {
- containment = this.containment;
- }
-
- if(event.pageX - this.offset.click.left < containment[0]) pageX = containment[0] + this.offset.click.left;
- if(event.pageY - this.offset.click.top < containment[1]) pageY = containment[1] + this.offset.click.top;
- if(event.pageX - this.offset.click.left > containment[2]) pageX = containment[2] + this.offset.click.left;
- if(event.pageY - this.offset.click.top > containment[3]) pageY = containment[3] + this.offset.click.top;
- }
-
- if(o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- var top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? (!(top - this.offset.click.top < containment[1] || top - this.offset.click.top > containment[3]) ? top : (!(top - this.offset.click.top < containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? (!(left - this.offset.click.left < containment[0] || left - this.offset.click.left > containment[2]) ? left : (!(left - this.offset.click.left < containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if(this.helper[0] != this.element[0] && !this.cancelHelperRemoval) this.helper.remove();
- //if($.ui.ddmanager) $.ui.ddmanager.current = null;
- this.helper = null;
- this.cancelHelperRemoval = false;
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function(type, event, ui) {
- ui = ui || this._uiHash();
- $.ui.plugin.call(this, type, [event, ui]);
- if(type == "drag") this.positionAbs = this._convertPositionTo("absolute"); //The absolute position has to be recalculated after plugins
- return $.Widget.prototype._trigger.call(this, type, event, ui);
- },
-
- plugins: {},
-
- _uiHash: function(event) {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add("draggable", "connectToSortable", {
- start: function(event, ui) {
-
- var inst = $(this).data("draggable"), o = inst.options,
- uiSortable = $.extend({}, ui, { item: inst.element });
- inst.sortables = [];
- $(o.connectToSortable).each(function() {
- var sortable = $.data(this, 'sortable');
- if (sortable && !sortable.options.disabled) {
- inst.sortables.push({
- instance: sortable,
- shouldRevert: sortable.options.revert
- });
- sortable.refreshPositions(); // Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
- sortable._trigger("activate", event, uiSortable);
- }
- });
-
- },
- stop: function(event, ui) {
-
- //If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
- var inst = $(this).data("draggable"),
- uiSortable = $.extend({}, ui, { item: inst.element });
-
- $.each(inst.sortables, function() {
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
-
- inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
- this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
-
- //The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: 'valid/invalid'
- if(this.shouldRevert) this.instance.options.revert = true;
-
- //Trigger the stop of the sortable
- this.instance._mouseStop(event);
-
- this.instance.options.helper = this.instance.options._helper;
-
- //If the helper has been the original item, restore properties in the sortable
- if(inst.options.helper == 'original')
- this.instance.currentItem.css({ top: 'auto', left: 'auto' });
-
- } else {
- this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
- this.instance._trigger("deactivate", event, uiSortable);
- }
-
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("draggable"), that = this;
-
- var checkPos = function(o) {
- var dyClick = this.offset.click.top, dxClick = this.offset.click.left;
- var helperTop = this.positionAbs.top, helperLeft = this.positionAbs.left;
- var itemHeight = o.height, itemWidth = o.width;
- var itemTop = o.top, itemLeft = o.left;
-
- return $.ui.isOver(helperTop + dyClick, helperLeft + dxClick, itemTop, itemLeft, itemHeight, itemWidth);
- };
-
- $.each(inst.sortables, function(i) {
-
- var innermostIntersecting = false;
- var thisSortable = this;
- //Copy over some variables to allow calling the sortable's native _intersectsWith
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
-
- if(this.instance._intersectsWith(this.instance.containerCache)) {
- innermostIntersecting = true;
- $.each(inst.sortables, function () {
- this.instance.positionAbs = inst.positionAbs;
- this.instance.helperProportions = inst.helperProportions;
- this.instance.offset.click = inst.offset.click;
- if (this != thisSortable
- && this.instance._intersectsWith(this.instance.containerCache)
- && $.ui.contains(thisSortable.instance.element[0], this.instance.element[0]))
- innermostIntersecting = false;
- return innermostIntersecting;
- });
- }
-
-
- if(innermostIntersecting) {
- //If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
- if(!this.instance.isOver) {
-
- this.instance.isOver = 1;
- //Now we fake the start of dragging for the sortable instance,
- //by cloning the list group item, appending it to the sortable and using it as inst.currentItem
- //We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
- this.instance.currentItem = $(that).clone().removeAttr('id').appendTo(this.instance.element).data("sortable-item", true);
- this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
- this.instance.options.helper = function() { return ui.helper[0]; };
-
- event.target = this.instance.currentItem[0];
- this.instance._mouseCapture(event, true);
- this.instance._mouseStart(event, true, true);
-
- //Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
- this.instance.offset.click.top = inst.offset.click.top;
- this.instance.offset.click.left = inst.offset.click.left;
- this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
- this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
-
- inst._trigger("toSortable", event);
- inst.dropped = this.instance.element; //draggable revert needs that
- //hack so receive/update callbacks work (mostly)
- inst.currentItem = inst.element;
- this.instance.fromOutside = inst;
-
- }
-
- //Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
- if(this.instance.currentItem) this.instance._mouseDrag(event);
-
- } else {
-
- //If it doesn't intersect with the sortable, and it intersected before,
- //we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
- if(this.instance.isOver) {
-
- this.instance.isOver = 0;
- this.instance.cancelHelperRemoval = true;
-
- //Prevent reverting on this forced stop
- this.instance.options.revert = false;
-
- // The out event needs to be triggered independently
- this.instance._trigger('out', event, this.instance._uiHash(this.instance));
-
- this.instance._mouseStop(event, true);
- this.instance.options.helper = this.instance.options._helper;
-
- //Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
- this.instance.currentItem.remove();
- if(this.instance.placeholder) this.instance.placeholder.remove();
-
- inst._trigger("fromSortable", event);
- inst.dropped = false; //draggable revert needs that
- }
-
- };
-
- });
-
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function(event, ui) {
- var t = $('body'), o = $(this).data('draggable').options;
- if (t.css("cursor")) o._cursor = t.css("cursor");
- t.css("cursor", o.cursor);
- },
- stop: function(event, ui) {
- var o = $(this).data('draggable').options;
- if (o._cursor) $('body').css("cursor", o._cursor);
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data('draggable').options;
- if(t.css("opacity")) o._opacity = t.css("opacity");
- t.css('opacity', o.opacity);
- },
- stop: function(event, ui) {
- var o = $(this).data('draggable').options;
- if(o._opacity) $(ui.helper).css('opacity', o._opacity);
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function(event, ui) {
- var i = $(this).data("draggable");
- if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') i.overflowOffset = i.scrollParent.offset();
- },
- drag: function(event, ui) {
-
- var i = $(this).data("draggable"), o = i.options, scrolled = false;
-
- if(i.scrollParent[0] != document && i.scrollParent[0].tagName != 'HTML') {
-
- if(!o.axis || o.axis != 'x') {
- if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity)
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if(!o.axis || o.axis != 'y') {
- if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity)
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(!o.axis || o.axis != 'x') {
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
-
- if(!o.axis || o.axis != 'y') {
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(i, event);
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function(event, ui) {
-
- var i = $(this).data("draggable"), o = i.options;
- i.snapElements = [];
-
- $(o.snap.constructor != String ? ( o.snap.items || ':data(draggable)' ) : o.snap).each(function() {
- var $t = $(this); var $o = $t.offset();
- if(this != i.element[0]) i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- });
-
- },
- drag: function(event, ui) {
-
- var inst = $(this).data("draggable"), o = inst.options;
- var d = o.snapTolerance;
-
- var x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (var i = inst.snapElements.length - 1; i >= 0; i--){
-
- var l = inst.snapElements[i].left, r = l + inst.snapElements[i].width,
- t = inst.snapElements[i].top, b = t + inst.snapElements[i].height;
-
- //Yes, I know, this is insane ;)
- if(!((l-d < x1 && x1 < r+d && t-d < y1 && y1 < b+d) || (l-d < x1 && x1 < r+d && t-d < y2 && y2 < b+d) || (l-d < x2 && x2 < r+d && t-d < y1 && y1 < b+d) || (l-d < x2 && x2 < r+d && t-d < y2 && y2 < b+d))) {
- if(inst.snapElements[i].snapping) (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if(o.snapMode != 'inner') {
- var ts = Math.abs(t - y2) <= d;
- var bs = Math.abs(b - y1) <= d;
- var ls = Math.abs(l - x2) <= d;
- var rs = Math.abs(r - x1) <= d;
- if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
- if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
- if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
- }
-
- var first = (ts || bs || ls || rs);
-
- if(o.snapMode != 'outer') {
- var ts = Math.abs(t - y1) <= d;
- var bs = Math.abs(b - y2) <= d;
- var ls = Math.abs(l - x1) <= d;
- var rs = Math.abs(r - x2) <= d;
- if(ts) ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
- if(bs) ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
- if(ls) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
- if(rs) ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
- }
-
- if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first))
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- };
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function(event, ui) {
-
- var o = $(this).data("draggable").options;
-
- var group = $.makeArray($(o.stack)).sort(function(a,b) {
- return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
- });
- if (!group.length) { return; }
-
- var min = parseInt(group[0].style.zIndex) || 0;
- $(group).each(function(i) {
- this.style.zIndex = min + i;
- });
-
- this[0].style.zIndex = min + group.length;
-
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function(event, ui) {
- var t = $(ui.helper), o = $(this).data("draggable").options;
- if(t.css("zIndex")) o._zIndex = t.css("zIndex");
- t.css('zIndex', o.zIndex);
- },
- stop: function(event, ui) {
- var o = $(this).data("draggable").options;
- if(o._zIndex) $(ui.helper).css('zIndex', o._zIndex);
- }
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.droppable", {
- version: "1.9.2",
- widgetEventPrefix: "drop",
- options: {
- accept: '*',
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: 'default',
- tolerance: 'intersect'
- },
- _create: function() {
-
- var o = this.options, accept = o.accept;
- this.isover = 0; this.isout = 1;
-
- this.accept = $.isFunction(accept) ? accept : function(d) {
- return d.is(accept);
- };
-
- //Store the droppable's proportions
- this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
-
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
- $.ui.ddmanager.droppables[o.scope].push(this);
-
- (o.addClasses && this.element.addClass("ui-droppable"));
-
- },
-
- _destroy: function() {
- var drop = $.ui.ddmanager.droppables[this.options.scope];
- for ( var i = 0; i < drop.length; i++ )
- if ( drop[i] == this )
- drop.splice(i, 1);
-
- this.element.removeClass("ui-droppable ui-droppable-disabled");
- },
-
- _setOption: function(key, value) {
-
- if(key == 'accept') {
- this.accept = $.isFunction(value) ? value : function(d) {
- return d.is(value);
- };
- }
- $.Widget.prototype._setOption.apply(this, arguments);
- },
-
- _activate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) this.element.addClass(this.options.activeClass);
- (draggable && this._trigger('activate', event, this.ui(draggable)));
- },
-
- _deactivate: function(event) {
- var draggable = $.ui.ddmanager.current;
- if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
- (draggable && this._trigger('deactivate', event, this.ui(draggable)));
- },
-
- _over: function(event) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) this.element.addClass(this.options.hoverClass);
- this._trigger('over', event, this.ui(draggable));
- }
-
- },
-
- _out: function(event) {
-
- var draggable = $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return; // Bail if draggable and droppable are same element
-
- if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
- this._trigger('out', event, this.ui(draggable));
- }
-
- },
-
- _drop: function(event,custom) {
-
- var draggable = custom || $.ui.ddmanager.current;
- if (!draggable || (draggable.currentItem || draggable.element)[0] == this.element[0]) return false; // Bail if draggable and droppable are same element
-
- var childrenIntersection = false;
- this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function() {
- var inst = $.data(this, 'droppable');
- if(
- inst.options.greedy
- && !inst.options.disabled
- && inst.options.scope == draggable.options.scope
- && inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element))
- && $.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
- ) { childrenIntersection = true; return false; }
- });
- if(childrenIntersection) return false;
-
- if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- if(this.options.activeClass) this.element.removeClass(this.options.activeClass);
- if(this.options.hoverClass) this.element.removeClass(this.options.hoverClass);
- this._trigger('drop', event, this.ui(draggable));
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function(c) {
- return {
- draggable: (c.currentItem || c.element),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = function(draggable, droppable, toleranceMode) {
-
- if (!droppable.offset) return false;
-
- var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
- y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height;
- var l = droppable.offset.left, r = l + droppable.proportions.width,
- t = droppable.offset.top, b = t + droppable.proportions.height;
-
- switch (toleranceMode) {
- case 'fit':
- return (l <= x1 && x2 <= r
- && t <= y1 && y2 <= b);
- break;
- case 'intersect':
- return (l < x1 + (draggable.helperProportions.width / 2) // Right Half
- && x2 - (draggable.helperProportions.width / 2) < r // Left Half
- && t < y1 + (draggable.helperProportions.height / 2) // Bottom Half
- && y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
- break;
- case 'pointer':
- var draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left),
- draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top),
- isOver = $.ui.isOver(draggableTop, draggableLeft, t, l, droppable.proportions.height, droppable.proportions.width);
- return isOver;
- break;
- case 'touch':
- return (
- (y1 >= t && y1 <= b) || // Top edge touching
- (y2 >= t && y2 <= b) || // Bottom edge touching
- (y1 < t && y2 > b) // Surrounded vertically
- ) && (
- (x1 >= l && x1 <= r) || // Left edge touching
- (x2 >= l && x2 <= r) || // Right edge touching
- (x1 < l && x2 > r) // Surrounded horizontally
- );
- break;
- default:
- return false;
- break;
- }
-
-};
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { 'default': [] },
- prepareOffsets: function(t, event) {
-
- var m = $.ui.ddmanager.droppables[t.options.scope] || [];
- var type = event ? event.type : null; // workaround for #2317
- var list = (t.currentItem || t.element).find(":data(droppable)").andSelf();
-
- droppablesLoop: for (var i = 0; i < m.length; i++) {
-
- if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) continue; //No disabled and non-accepted
- for (var j=0; j < list.length; j++) { if(list[j] == m[i].element[0]) { m[i].proportions.height = 0; continue droppablesLoop; } }; //Filter out elements in the current dragged item
- m[i].visible = m[i].element.css("display") != "none"; if(!m[i].visible) continue; //If the element is not visible, continue
-
- if(type == "mousedown") m[i]._activate.call(m[i], event); //Activate the droppable if used directly from draggables
-
- m[i].offset = m[i].element.offset();
- m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
-
- }
-
- },
- drop: function(draggable, event) {
-
- var dropped = false;
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(!this.options) return;
- if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance))
- dropped = this._drop.call(this, event) || dropped;
-
- if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
- this.isout = 1; this.isover = 0;
- this._deactivate.call(this, event);
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- //Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
- });
- },
- drag: function(draggable, event) {
-
- //If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if(draggable.options.refreshPositions) $.ui.ddmanager.prepareOffsets(draggable, event);
-
- //Run through all droppables and check their positions based on specific tolerance options
- $.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
-
- if(this.options.disabled || this.greedyChild || !this.visible) return;
- var intersects = $.ui.intersect(draggable, this, this.options.tolerance);
-
- var c = !intersects && this.isover == 1 ? 'isout' : (intersects && this.isover == 0 ? 'isover' : null);
- if(!c) return;
-
- var parentInstance;
- if (this.options.greedy) {
- // find droppable parents with same scope
- var scope = this.options.scope;
- var parent = this.element.parents(':data(droppable)').filter(function () {
- return $.data(this, 'droppable').options.scope === scope;
- });
-
- if (parent.length) {
- parentInstance = $.data(parent[0], 'droppable');
- parentInstance.greedyChild = (c == 'isover' ? 1 : 0);
- }
- }
-
- // we just moved into a greedy child
- if (parentInstance && c == 'isover') {
- parentInstance['isover'] = 0;
- parentInstance['isout'] = 1;
- parentInstance._out.call(parentInstance, event);
- }
-
- this[c] = 1; this[c == 'isout' ? 'isover' : 'isout'] = 0;
- this[c == "isover" ? "_over" : "_out"].call(this, event);
-
- // we just moved out of a greedy child
- if (parentInstance && c == 'isout') {
- parentInstance['isout'] = 0;
- parentInstance['isover'] = 1;
- parentInstance._over.call(parentInstance, event);
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- //Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if( !draggable.options.refreshPositions ) $.ui.ddmanager.prepareOffsets( draggable, event );
- }
-};
-
-})(jQuery);
-;(jQuery.effects || (function($, undefined) {
-
-var backCompat = $.uiBackCompat !== false,
- // prefix used for storing data on .data()
- dataSpace = "ui-effects-";
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.0.0
- * http://jquery.com/
- *
- * Copyright 2012 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Mon Aug 13 13:41:02 2012 -0500
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor".split(" "),
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [{
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- }],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && $.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + (q - p) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + (q - p) * ((2/3) - h) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function ( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- if ( l === 0 || l === 1 ) {
- s = l;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function ( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add .fx.step functions
-each( stepHooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch( error ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
-});
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles() {
- var style = this.ownerDocument.defaultView ?
- this.ownerDocument.defaultView.getComputedStyle( this, null ) :
- this.currentStyle,
- newStyle = {},
- key,
- len;
-
- // webkit enumerates style porperties
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- newStyle[ $.camelCase( key ) ] = style[ key ];
- }
- }
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- newStyle[ key ] = style[ key ];
- }
- }
- }
-
- return newStyle;
-}
-
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).andSelf() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles.call( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles.call( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = jQuery.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, '' );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- _addClass: $.fn.addClass,
- addClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- this._addClass( classNames );
- },
-
- _removeClass: $.fn.removeClass,
- removeClass: function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- this._removeClass( classNames );
- },
-
- _toggleClass: $.fn.toggleClass,
- toggleClass: function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return this._toggleClass( classNames, force );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- },
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.9.2",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for( var i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for( i=0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardSpeed( speed ) {
- // valid standard speeds
- if ( !speed || typeof speed === "number" || $.fx.speeds[ speed ] ) {
- return true;
- }
-
- // invalid strings - treat as "normal" speed
- if ( typeof speed === "string" && !$.effects.effect[ speed ] ) {
- // TODO: remove in 2.0 (#7115)
- if ( backCompat && $.effects[ speed ] ) {
- return false;
- }
- return true;
- }
-
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ],
-
- // DEPRECATED: remove in 2.0 (#7115)
- oldEffectMethod = !effectMethod && backCompat && $.effects[ args.effect ];
-
- if ( $.fx.off || !( effectMethod || oldEffectMethod ) ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // if the element is hiddden and mode is hide,
- // or element is visible and mode is show
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- // TODO: remove this check in 2.0, effectMethod will always be true
- if ( effectMethod ) {
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- } else {
- // DEPRECATED: remove in 2.0 (#7115)
- return oldEffectMethod.call(this, {
- options: args,
- duration: args.duration,
- callback: args.complete,
- mode: args.mode
- });
- }
- },
-
- _show: $.fn.show,
- show: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._show.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- },
-
- _hide: $.fn.hide,
- hide: function( speed ) {
- if ( standardSpeed( speed ) ) {
- return this._hide.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- },
-
- // jQuery core overloads toggle and creates _toggle
- __toggle: $.fn.toggle,
- toggle: function( speed ) {
- if ( standardSpeed( speed ) || typeof speed === "boolean" || $.isFunction( speed ) ) {
- return this.__toggle.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- },
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function ( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function ( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function ( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-})(jQuery));
-(function( $, undefined ) {
-
-var rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/;
-
-$.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( ! motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-$.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || ["middle","center"];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-$.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function(){
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round(o.duration/anims),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop ,
- left: endPosition.left - fixLeft ,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( '<div class="ui-effects-transfer"></div>' )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop ,
- left: startPosition.left - fixLeft ,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-var mouseHandled = false;
-
-$.widget( "ui.menu", {
- version: "1.9.2",
- defaultElement: "<ul>",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- menus: "ul",
- position: {
- my: "left top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- })
- // need to catch all clicks on disabled menu
- // not possible through _on
- .bind( "click" + this.eventNamespace, $.proxy(function( event ) {
- if ( this.options.disabled ) {
- event.preventDefault();
- }
- }, this ));
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-state-disabled > a": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item:has(a)": function( event ) {
- var target = $( event.target ).closest( ".ui-menu-item" );
- if ( !mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- mouseHandled = true;
-
- this.select( event );
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) ) {
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( !$( event.target ).closest( ".ui-menu" ).length ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).andSelf()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .children( "a" )
- .removeUniqueId()
- .removeClass( "ui-corner-all ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- var match, prev, character, skip, regex,
- preventDefault = true;
-
- function escape( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- regex = new RegExp( "^" + escape( character ), "i" );
- match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
- return regex.test( $( this ).children( "a" ).text() );
- });
- }
-
- if ( match.length ) {
- this.focus( event, match );
- if ( match.length > 1 ) {
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.prev( "a" ),
- submenuCarat = $( "<span>" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
-
- // Don't refresh list items that are already adapted
- menus.children( ":not(.ui-menu-item):has(a)" )
- .addClass( "ui-menu-item" )
- .attr( "role", "presentation" )
- .children( "a" )
- .uniqueId()
- .addClass( "ui-corner-all" )
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Initialize unlinked menu-items containing spaces and/or dashes only as dividers
- menus.children( ":not(.ui-menu-item)" ).each(function() {
- var item = $( this );
- // hyphen, em dash, en dash
- if ( !/[^\-—–\s]/.test( item.text() ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Add aria-disabled attribute to any disabled menu item
- menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.children( "a" ).addClass( "ui-state-focus" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .children( "a:first" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.height();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.children( "a" ).removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( "a.ui-state-active" )
- .removeClass( "ui-state-active" );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .children( ".ui-menu-item" )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- }
-});
-
-}( jQuery ));
-(function( $, undefined ) {
-
-$.widget( "ui.progressbar", {
- version: "1.9.2",
- options: {
- value: 0,
- max: 100
- },
-
- min: 0,
-
- _create: function() {
- this.element
- .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .attr({
- role: "progressbar",
- "aria-valuemin": this.min,
- "aria-valuemax": this.options.max,
- "aria-valuenow": this._value()
- });
-
- this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
- .appendTo( this.element );
-
- this.oldValue = this._value();
- this._refreshValue();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
-
- this.valueDiv.remove();
- },
-
- value: function( newValue ) {
- if ( newValue === undefined ) {
- return this._value();
- }
-
- this._setOption( "value", newValue );
- return this;
- },
-
- _setOption: function( key, value ) {
- if ( key === "value" ) {
- this.options.value = value;
- this._refreshValue();
- if ( this._value() === this.options.max ) {
- this._trigger( "complete" );
- }
- }
-
- this._super( key, value );
- },
-
- _value: function() {
- var val = this.options.value;
- // normalize invalid value
- if ( typeof val !== "number" ) {
- val = 0;
- }
- return Math.min( this.options.max, Math.max( this.min, val ) );
- },
-
- _percentage: function() {
- return 100 * this._value() / this.options.max;
- },
-
- _refreshValue: function() {
- var value = this.value(),
- percentage = this._percentage();
-
- if ( this.oldValue !== value ) {
- this.oldValue = value;
- this._trigger( "change" );
- }
-
- this.valueDiv
- .toggle( value > this.min )
- .toggleClass( "ui-corner-right", value === this.options.max )
- .width( percentage.toFixed(0) + "%" );
- this.element.attr( "aria-valuenow", value );
- }
-});
-
-})( jQuery );
-(function( $, undefined ) {
-
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- zIndex: 1000
- },
- _create: function() {
-
- var that = this, o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || 'ui-resizable-helper' : null
- });
-
- //Wrap the element if it cannot hold child nodes
- if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
-
- //Create a wrapper element and set the wrapper to the new current internal element
- this.element.wrap(
- $('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({
- position: this.element.css('position'),
- width: this.element.outerWidth(),
- height: this.element.outerHeight(),
- top: this.element.css('top'),
- left: this.element.css('left')
- })
- );
-
- //Overwrite the original this.element
- this.element = this.element.parent().data(
- "resizable", this.element.data('resizable')
- );
-
- this.elementIsWrapper = true;
-
- //Move margins to the wrapper
- this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
- this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
-
- //Prevent Safari textarea resize
- this.originalResizeStyle = this.originalElement.css('resize');
- this.originalElement.css('resize', 'none');
-
- //Push the actual element to our proportionallyResize internal array
- this._proportionallyResizeElements.push(this.originalElement.css({ position: 'static', zoom: 1, display: 'block' }));
-
- // avoid IE jump (hard set the margin)
- this.originalElement.css({ margin: this.originalElement.css('margin') });
-
- // fix handlers offset
- this._proportionallyResize();
-
- }
-
- this.handles = o.handles || (!$('.ui-resizable-handle', this.element).length ? "e,s,se" : { n: '.ui-resizable-n', e: '.ui-resizable-e', s: '.ui-resizable-s', w: '.ui-resizable-w', se: '.ui-resizable-se', sw: '.ui-resizable-sw', ne: '.ui-resizable-ne', nw: '.ui-resizable-nw' });
- if(this.handles.constructor == String) {
-
- if(this.handles == 'all') this.handles = 'n,e,s,w,se,sw,ne,nw';
- var n = this.handles.split(","); this.handles = {};
-
- for(var i = 0; i < n.length; i++) {
-
- var handle = $.trim(n[i]), hname = 'ui-resizable-'+handle;
- var axis = $('<div class="ui-resizable-handle ' + hname + '"></div>');
-
- // Apply zIndex to all handles - see #7960
- axis.css({ zIndex: o.zIndex });
-
- //TODO : What's going on here?
- if ('se' == handle) {
- axis.addClass('ui-icon ui-icon-gripsmall-diagonal-se');
- };
-
- //Insert into internal handles object and append to element
- this.handles[handle] = '.ui-resizable-'+handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- target = target || this.element;
-
- for(var i in this.handles) {
-
- if(this.handles[i].constructor == String)
- this.handles[i] = $(this.handles[i], this.element).show();
-
- //Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
-
- var axis = $(this.handles[i], this.element), padWrapper = 0;
-
- //Checking the correct pad and border
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- //The padding type i have to apply...
- var padPos = [ 'padding',
- /ne|nw|n/.test(i) ? 'Top' :
- /se|sw|s/.test(i) ? 'Bottom' :
- /^e$/.test(i) ? 'Right' : 'Left' ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
-
- }
-
- //TODO: What's that good for? There's not anything to be executed left
- if(!$(this.handles[i]).length)
- continue;
-
- }
- };
-
- //TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = $('.ui-resizable-handle', this.element)
- .disableSelection();
-
- //Matching axis name
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className)
- var axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- //Axis, default = se
- that.axis = axis && axis[1] ? axis[1] : 'se';
- }
- });
-
- //If we want to auto hide the elements
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) return;
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function(){
- if (o.disabled) return;
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- //Initialize the mouse interaction
- this._mouseInit();
-
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var _destroy = function(exp) {
- $(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable").removeData("ui-resizable").unbind(".resizable").find('.ui-resizable-handle').remove();
- };
-
- //TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- var wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css('position'),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css('top'),
- left: wrapper.css('left')
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css('resize', this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var handle = false;
- for (var i in this.handles) {
- if ($(this.handles[i])[0] == event.target) {
- handle = true;
- }
- }
-
- return !this.options.disabled && handle;
- },
-
- _mouseStart: function(event) {
-
- var o = this.options, iniPos = this.element.position(), el = this.element;
-
- this.resizing = true;
- this.documentScroll = { top: $(document).scrollTop(), left: $(document).scrollLeft() };
-
- // bugfix for http://dev.jquery.com/ticket/1749
- if (el.is('.ui-draggable') || (/absolute/).test(el.css('position'))) {
- el.css({ position: 'absolute', top: iniPos.top, left: iniPos.left });
- }
-
- this._renderProxy();
-
- var curleft = num(this.helper.css('left')), curtop = num(this.helper.css('top'));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft() || 0;
- curtop += $(o.containment).scrollTop() || 0;
- }
-
- //Store needed variables
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
- this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
- this.originalPosition = { left: curleft, top: curtop };
- this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
- this.originalMousePosition = { left: event.pageX, top: event.pageY };
-
- //Aspect Ratio
- this.aspectRatio = (typeof o.aspectRatio == 'number') ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
-
- var cursor = $('.ui-resizable-' + this.axis).css('cursor');
- $('body').css('cursor', cursor == 'auto' ? this.axis + '-resize' : cursor);
-
- el.addClass("ui-resizable-resizing");
- this._propagate("start", event);
- return true;
- },
-
- _mouseDrag: function(event) {
-
- //Increase performance, avoid regex
- var el = this.helper, o = this.options, props = {},
- that = this, smp = this.originalMousePosition, a = this.axis;
-
- var dx = (event.pageX-smp.left)||0, dy = (event.pageY-smp.top)||0;
- var trigger = this._change[a];
- if (!trigger) return false;
-
- // Calculate the attrs that will be change
- var data = trigger.apply(this, [event, dx, dy]);
-
- // Put this in the mouseDrag handler since the user can start pressing shift while resizing
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey)
- data = this._updateRatio(data, event);
-
- data = this._respectSize(data, event);
-
- // plugins callbacks need to be called first
- this._propagate("resize", event);
-
- el.css({
- top: this.position.top + "px", left: this.position.left + "px",
- width: this.size.width + "px", height: this.size.height + "px"
- });
-
- if (!this._helper && this._proportionallyResizeElements.length)
- this._proportionallyResize();
-
- this._updateCache(data);
-
- // calling the user callback at the end
- this._trigger('resize', event, this.ui());
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var o = this.options, that = this;
-
- if(this._helper) {
- var pr = this._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- var s = { width: (that.helper.width() - soffsetw), height: (that.helper.height() - soffseth) },
- left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate)
- this.element.css($.extend(s, { top: top, left: left }));
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) this._proportionallyResize();
- }
-
- $('body').css('cursor', 'auto');
-
- this.element.removeClass("ui-resizable-resizing");
-
- this._propagate("stop", event);
-
- if (this._helper) this.helper.remove();
- return false;
-
- },
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var o = this.options, pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b;
-
- b = {
- minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
- maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
- minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
- maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
- };
-
- if(this._aspectRatio || forceAspectRatio) {
- // We want to create an enclosing box whose aspect ration is the requested one
- // First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
- pMinWidth = b.minHeight * this.aspectRatio;
- pMinHeight = b.minWidth / this.aspectRatio;
- pMaxWidth = b.maxHeight * this.aspectRatio;
- pMaxHeight = b.maxWidth / this.aspectRatio;
-
- if(pMinWidth > b.minWidth) b.minWidth = pMinWidth;
- if(pMinHeight > b.minHeight) b.minHeight = pMinHeight;
- if(pMaxWidth < b.maxWidth) b.maxWidth = pMaxWidth;
- if(pMaxHeight < b.maxHeight) b.maxHeight = pMaxHeight;
- }
- this._vBoundaries = b;
- },
-
- _updateCache: function(data) {
- var o = this.options;
- this.offset = this.helper.offset();
- if (isNumber(data.left)) this.position.left = data.left;
- if (isNumber(data.top)) this.position.top = data.top;
- if (isNumber(data.height)) this.size.height = data.height;
- if (isNumber(data.width)) this.size.width = data.width;
- },
-
- _updateRatio: function(data, event) {
-
- var o = this.options, cpos = this.position, csize = this.size, a = this.axis;
-
- if (isNumber(data.height)) data.width = (data.height * this.aspectRatio);
- else if (isNumber(data.width)) data.height = (data.width / this.aspectRatio);
-
- if (a == 'sw') {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a == 'nw') {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
-
- _respectSize: function(data, event) {
-
- var el = this.helper, o = this._vBoundaries, pRatio = this._aspectRatio || event.shiftKey, a = this.axis,
- ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
- isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height);
-
- if (isminw) data.width = o.minWidth;
- if (isminh) data.height = o.minHeight;
- if (ismaxw) data.width = o.maxWidth;
- if (ismaxh) data.height = o.maxHeight;
-
- var dw = this.originalPosition.left + this.originalSize.width, dh = this.position.top + this.size.height;
- var cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
-
- if (isminw && cw) data.left = dw - o.minWidth;
- if (ismaxw && cw) data.left = dw - o.maxWidth;
- if (isminh && ch) data.top = dh - o.minHeight;
- if (ismaxh && ch) data.top = dh - o.maxHeight;
-
- // fixing jump error on top/left - bug #2330
- var isNotwh = !data.width && !data.height;
- if (isNotwh && !data.left && data.top) data.top = null;
- else if (isNotwh && !data.top && data.left) data.left = null;
-
- return data;
- },
-
- _proportionallyResize: function() {
-
- var o = this.options;
- if (!this._proportionallyResizeElements.length) return;
- var element = this.helper || this.element;
-
- for (var i=0; i < this._proportionallyResizeElements.length; i++) {
-
- var prel = this._proportionallyResizeElements[i];
-
- if (!this.borderDif) {
- var b = [prel.css('borderTopWidth'), prel.css('borderRightWidth'), prel.css('borderBottomWidth'), prel.css('borderLeftWidth')],
- p = [prel.css('paddingTop'), prel.css('paddingRight'), prel.css('paddingBottom'), prel.css('paddingLeft')];
-
- this.borderDif = $.map(b, function(v, i) {
- var border = parseInt(v,10)||0, padding = parseInt(p[i],10)||0;
- return border + padding;
- });
- }
-
- prel.css({
- height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
- width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
- });
-
- };
-
- },
-
- _renderProxy: function() {
-
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if(this._helper) {
-
- this.helper = this.helper || $('<div style="overflow:hidden;"></div>');
-
- // fix ie6 offset TODO: This seems broken
- var ie6offset = ($.ui.ie6 ? 1 : 0),
- pxyoffset = ( $.ui.ie6 ? 2 : -1 );
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() + pxyoffset,
- height: this.element.outerHeight() + pxyoffset,
- position: 'absolute',
- left: this.elementOffset.left - ie6offset +'px',
- top: this.elementOffset.top - ie6offset +'px',
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx, dy) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var o = this.options, cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(event, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- sw: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- },
- ne: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
- },
- nw: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
- }
- },
-
- _propagate: function(n, event) {
- $.ui.plugin.call(this, n, [event, this.ui()]);
- (n != "resize" && this._trigger(n, event, this.ui()));
- },
-
- plugins: {},
-
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- }
-
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function (event, ui) {
- var that = $(this).data("resizable"), o = that.options;
-
- var _store = function (exp) {
- $(exp).each(function() {
- var el = $(this);
- el.data("resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css('left'), 10), top: parseInt(el.css('top'), 10)
- });
- });
- };
-
- if (typeof(o.alsoResize) == 'object' && !o.alsoResize.parentNode) {
- if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
- else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
- }else{
- _store(o.alsoResize);
- }
- },
-
- resize: function (event, ui) {
- var that = $(this).data("resizable"), o = that.options, os = that.originalSize, op = that.originalPosition;
-
- var delta = {
- height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
- },
-
- _alsoResize = function (exp, c) {
- $(exp).each(function() {
- var el = $(this), start = $(this).data("resizable-alsoresize"), style = {},
- css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ['width', 'height'] : ['width', 'height', 'top', 'left'];
-
- $.each(css, function (i, prop) {
- var sum = (start[prop]||0) + (delta[prop]||0);
- if (sum && sum >= 0)
- style[prop] = sum || null;
- });
-
- el.css(style);
- });
- };
-
- if (typeof(o.alsoResize) == 'object' && !o.alsoResize.nodeType) {
- $.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
- }else{
- _alsoResize(o.alsoResize);
- }
- },
-
- stop: function (event, ui) {
- $(this).removeData("resizable-alsoresize");
- }
-});
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options;
-
- var pr = that._proportionallyResizeElements, ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && $.ui.hasScroll(pr[0], 'left') /* TODO - jump height */ ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- var style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css('left'), 10) + (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css('top'), 10) + (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css('width'), 10),
- height: parseInt(that.element.css('height'), 10),
- top: parseInt(that.element.css('top'), 10),
- left: parseInt(that.element.css('left'), 10)
- };
-
- if (pr && pr.length) $(pr[0]).css({ width: data.width, height: data.height });
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add("resizable", "containment", {
-
- start: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options, el = that.element;
- var oc = o.containment, ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
- if (!ce) return;
-
- that.containerElement = $(ce);
-
- if (/document/.test(oc) || oc == document) {
- that.containerOffset = { left: 0, top: 0 };
- that.containerPosition = { left: 0, top: 0 };
-
- that.parentData = {
- element: $(document), left: 0, top: 0,
- width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
- };
- }
-
- // i'm a node, so compute top, left, right, bottom
- else {
- var element = $(ce), p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
-
- var co = that.containerOffset, ch = that.containerSize.height, cw = that.containerSize.width,
- width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw ), height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
-
- that.parentData = {
- element: ce, left: co.left, top: co.top, width: width, height: height
- };
- }
- },
-
- resize: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options,
- ps = that.containerSize, co = that.containerOffset, cs = that.size, cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey, cop = { top:0, left:0 }, ce = that.containerElement;
-
- if (ce[0] != document && (/static/).test(ce.css('position'))) cop = co;
-
- if (cp.left < (that._helper ? co.left : 0)) {
- that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
- if (pRatio) that.size.height = that.size.width / that.aspectRatio;
- that.position.left = o.helper ? co.left : 0;
- }
-
- if (cp.top < (that._helper ? co.top : 0)) {
- that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
- if (pRatio) that.size.width = that.size.height * that.aspectRatio;
- that.position.top = that._helper ? co.top : 0;
- }
-
- that.offset.left = that.parentData.left+that.position.left;
- that.offset.top = that.parentData.top+that.position.top;
-
- var woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width ),
- hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
-
- var isParent = that.containerElement.get(0) == that.element.parent().get(0),
- isOffsetRelative = /relative|absolute/.test(that.containerElement.css('position'));
-
- if(isParent && isOffsetRelative) woset -= that.parentData.left;
-
- if (woset + that.size.width >= that.parentData.width) {
- that.size.width = that.parentData.width - woset;
- if (pRatio) that.size.height = that.size.width / that.aspectRatio;
- }
-
- if (hoset + that.size.height >= that.parentData.height) {
- that.size.height = that.parentData.height - hoset;
- if (pRatio) that.size.width = that.size.height * that.aspectRatio;
- }
- },
-
- stop: function(event, ui){
- var that = $(this).data("resizable"), o = that.options, cp = that.position,
- co = that.containerOffset, cop = that.containerPosition, ce = that.containerElement;
-
- var helper = $(that.helper), ho = helper.offset(), w = helper.outerWidth() - that.sizeDiff.width, h = helper.outerHeight() - that.sizeDiff.height;
-
- if (that._helper && !o.animate && (/relative/).test(ce.css('position')))
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
-
- if (that._helper && !o.animate && (/static/).test(ce.css('position')))
- $(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
-
- }
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function(event, ui) {
-
- var that = $(this).data("resizable"), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({ opacity: .25, display: 'block', position: 'relative', height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
- .addClass('ui-resizable-ghost')
- .addClass(typeof o.ghost == 'string' ? o.ghost : '');
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function(event, ui){
- var that = $(this).data("resizable"), o = that.options;
- if (that.ghost) that.ghost.css({ position: 'relative', height: that.size.height, width: that.size.width });
- },
-
- stop: function(event, ui){
- var that = $(this).data("resizable"), o = that.options;
- if (that.ghost && that.helper) that.helper.get(0).removeChild(that.ghost.get(0));
- }
-
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function(event, ui) {
- var that = $(this).data("resizable"), o = that.options, cs = that.size, os = that.originalSize, op = that.originalPosition, a = that.axis, ratio = o._aspectRatio || event.shiftKey;
- o.grid = typeof o.grid == "number" ? [o.grid, o.grid] : o.grid;
- var ox = Math.round((cs.width - os.width) / (o.grid[0]||1)) * (o.grid[0]||1), oy = Math.round((cs.height - os.height) / (o.grid[1]||1)) * (o.grid[1]||1);
-
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- }
- else if (/^(ne)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.top = op.top - oy;
- }
- else if (/^(sw)$/.test(a)) {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.left = op.left - ox;
- }
- else {
- that.size.width = os.width + ox;
- that.size.height = os.height + oy;
- that.position.top = op.top - oy;
- that.position.left = op.left - ox;
- }
- }
-
-});
-
-var num = function(v) {
- return parseInt(v, 10) || 0;
-};
-
-var isNumber = function(value) {
- return !isNaN(parseInt(value, 10));
-};
-
-})(jQuery);
-(function( $, undefined ) {
-
-$.widget("ui.selectable", $.ui.mouse, {
- version: "1.9.2",
- options: {
- appendTo: 'body',
- autoRefresh: true,
- distance: 0,
- filter: '*',
- tolerance: 'touch'
- },
- _create: function() {
- var that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- var selectees;
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this);
- var pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass('ui-selected'),
- selecting: $this.hasClass('ui-selecting'),
- unselecting: $this.hasClass('ui-unselecting')
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this;
-
- this.opos = [event.pageX, event.pageY];
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.clientX,
- "top": event.clientY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter('.ui-selected').each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().andSelf().each(function() {
- var selectee = $.data(this, "selectable-item");
- if (selectee) {
- var doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass('ui-selected');
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
- var that = this;
- this.dragged = true;
-
- if (this.options.disabled)
- return;
-
- var options = this.options;
-
- var x1 = this.opos[0], y1 = this.opos[1], x2 = event.pageX, y2 = event.pageY;
- if (x1 > x2) { var tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { var tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item");
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element == that.element[0])
- return;
- var hit = false;
- if (options.tolerance == 'touch') {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance == 'fit') {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass('ui-selecting');
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- selectee.$element.addClass('ui-selected');
- selectee.selected = true;
- } else {
- selectee.$element.removeClass('ui-selecting');
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass('ui-selected');
- selectee.selected = false;
-
- selectee.$element.addClass('ui-unselecting');
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- var options = this.options;
-
- $('.ui-unselecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-unselecting');
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $('.ui-selecting', this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass('ui-selecting').addClass('ui-selected');
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-})(jQuery);
-(function( $, undefined ) {
-
-// number of pages in a slider
-// (how many times can you page up/down to go through the whole range)
-var numPages = 5;
-
-$.widget( "ui.slider", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "slide",
-
- options: {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: "horizontal",
- range: false,
- step: 1,
- value: 0,
- values: null
- },
-
- _create: function() {
- var i, handleCount,
- o = this.options,
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
- handles = [];
-
- this._keySliding = false;
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- this._detectOrientation();
- this._mouseInit();
-
- this.element
- .addClass( "ui-slider" +
- " ui-slider-" + this.orientation +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" +
- ( o.disabled ? " ui-slider-disabled ui-disabled" : "" ) );
-
- this.range = $([]);
-
- if ( o.range ) {
- if ( o.range === true ) {
- if ( !o.values ) {
- o.values = [ this._valueMin(), this._valueMin() ];
- }
- if ( o.values.length && o.values.length !== 2 ) {
- o.values = [ o.values[0], o.values[0] ];
- }
- }
-
- this.range = $( "<div></div>" )
- .appendTo( this.element )
- .addClass( "ui-slider-range" +
- // note: this isn't the most fittingly semantic framework class for this element,
- // but worked best visually with a variety of themes
- " ui-widget-header" +
- ( ( o.range === "min" || o.range === "max" ) ? " ui-slider-range-" + o.range : "" ) );
- }
-
- handleCount = ( o.values && o.values.length ) || 1;
-
- for ( i = existingHandles.length; i < handleCount; i++ ) {
- handles.push( handle );
- }
-
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
-
- this.handle = this.handles.eq( 0 );
-
- this.handles.add( this.range ).filter( "a" )
- .click(function( event ) {
- event.preventDefault();
- })
- .mouseenter(function() {
- if ( !o.disabled ) {
- $( this ).addClass( "ui-state-hover" );
- }
- })
- .mouseleave(function() {
- $( this ).removeClass( "ui-state-hover" );
- })
- .focus(function() {
- if ( !o.disabled ) {
- $( ".ui-slider .ui-state-focus" ).removeClass( "ui-state-focus" );
- $( this ).addClass( "ui-state-focus" );
- } else {
- $( this ).blur();
- }
- })
- .blur(function() {
- $( this ).removeClass( "ui-state-focus" );
- });
-
- this.handles.each(function( i ) {
- $( this ).data( "ui-slider-handle-index", i );
- });
-
- this._on( this.handles, {
- keydown: function( event ) {
- var allowed, curVal, newVal, step,
- index = $( event.target ).data( "ui-slider-handle-index" );
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_UP:
- case $.ui.keyCode.PAGE_DOWN:
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- event.preventDefault();
- if ( !this._keySliding ) {
- this._keySliding = true;
- $( event.target ).addClass( "ui-state-active" );
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return;
- }
- }
- break;
- }
-
- step = this.options.step;
- if ( this.options.values && this.options.values.length ) {
- curVal = newVal = this.values( index );
- } else {
- curVal = newVal = this.value();
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- newVal = this._valueMin();
- break;
- case $.ui.keyCode.END:
- newVal = this._valueMax();
- break;
- case $.ui.keyCode.PAGE_UP:
- newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- if ( curVal === this._valueMax() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal + step );
- break;
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- if ( curVal === this._valueMin() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal - step );
- break;
- }
-
- this._slide( event, index, newVal );
- },
- keyup: function( event ) {
- var index = $( event.target ).data( "ui-slider-handle-index" );
-
- if ( this._keySliding ) {
- this._keySliding = false;
- this._stop( event, index );
- this._change( event, index );
- $( event.target ).removeClass( "ui-state-active" );
- }
- }
- });
-
- this._refreshValue();
-
- this._animateOff = false;
- },
-
- _destroy: function() {
- this.handles.remove();
- this.range.remove();
-
- this.element
- .removeClass( "ui-slider" +
- " ui-slider-horizontal" +
- " ui-slider-vertical" +
- " ui-slider-disabled" +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" );
-
- this._mouseDestroy();
- },
-
- _mouseCapture: function( event ) {
- var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
- that = this,
- o = this.options;
-
- if ( o.disabled ) {
- return false;
- }
-
- this.elementSize = {
- width: this.element.outerWidth(),
- height: this.element.outerHeight()
- };
- this.elementOffset = this.element.offset();
-
- position = { x: event.pageX, y: event.pageY };
- normValue = this._normValueFromMouse( position );
- distance = this._valueMax() - this._valueMin() + 1;
- this.handles.each(function( i ) {
- var thisDistance = Math.abs( normValue - that.values(i) );
- if ( distance > thisDistance ) {
- distance = thisDistance;
- closestHandle = $( this );
- index = i;
- }
- });
-
- // workaround for bug #3736 (if both handles of a range are at 0,
- // the first is always used as the one with least distance,
- // and moving it is obviously prevented by preventing negative ranges)
- if( o.range === true && this.values(1) === o.min ) {
- index += 1;
- closestHandle = $( this.handles[index] );
- }
-
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return false;
- }
- this._mouseSliding = true;
-
- this._handleIndex = index;
-
- closestHandle
- .addClass( "ui-state-active" )
- .focus();
-
- offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().andSelf().is( ".ui-slider-handle" );
- this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
- left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
- top: event.pageY - offset.top -
- ( closestHandle.height() / 2 ) -
- ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
- ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
- };
-
- if ( !this.handles.hasClass( "ui-state-hover" ) ) {
- this._slide( event, index, normValue );
- }
- this._animateOff = true;
- return true;
- },
-
- _mouseStart: function() {
- return true;
- },
-
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- normValue = this._normValueFromMouse( position );
-
- this._slide( event, this._handleIndex, normValue );
-
- return false;
- },
-
- _mouseStop: function( event ) {
- this.handles.removeClass( "ui-state-active" );
- this._mouseSliding = false;
-
- this._stop( event, this._handleIndex );
- this._change( event, this._handleIndex );
-
- this._handleIndex = null;
- this._clickOffset = null;
- this._animateOff = false;
-
- return false;
- },
-
- _detectOrientation: function() {
- this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
- },
-
- _normValueFromMouse: function( position ) {
- var pixelTotal,
- pixelMouse,
- percentMouse,
- valueTotal,
- valueMouse;
-
- if ( this.orientation === "horizontal" ) {
- pixelTotal = this.elementSize.width;
- pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
- } else {
- pixelTotal = this.elementSize.height;
- pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
- }
-
- percentMouse = ( pixelMouse / pixelTotal );
- if ( percentMouse > 1 ) {
- percentMouse = 1;
- }
- if ( percentMouse < 0 ) {
- percentMouse = 0;
- }
- if ( this.orientation === "vertical" ) {
- percentMouse = 1 - percentMouse;
- }
-
- valueTotal = this._valueMax() - this._valueMin();
- valueMouse = this._valueMin() + percentMouse * valueTotal;
-
- return this._trimAlignValue( valueMouse );
- },
-
- _start: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
- return this._trigger( "start", event, uiHash );
- },
-
- _slide: function( event, index, newVal ) {
- var otherVal,
- newValues,
- allowed;
-
- if ( this.options.values && this.options.values.length ) {
- otherVal = this.values( index ? 0 : 1 );
-
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
- ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
- ) {
- newVal = otherVal;
- }
-
- if ( newVal !== this.values( index ) ) {
- newValues = this.values();
- newValues[ index ] = newVal;
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal,
- values: newValues
- } );
- otherVal = this.values( index ? 0 : 1 );
- if ( allowed !== false ) {
- this.values( index, newVal, true );
- }
- }
- } else {
- if ( newVal !== this.value() ) {
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal
- } );
- if ( allowed !== false ) {
- this.value( newVal );
- }
- }
- }
- },
-
- _stop: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "stop", event, uiHash );
- },
-
- _change: function( event, index ) {
- if ( !this._keySliding && !this._mouseSliding ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "change", event, uiHash );
- }
- },
-
- value: function( newValue ) {
- if ( arguments.length ) {
- this.options.value = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, 0 );
- return;
- }
-
- return this._value();
- },
-
- values: function( index, newValue ) {
- var vals,
- newValues,
- i;
-
- if ( arguments.length > 1 ) {
- this.options.values[ index ] = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, index );
- return;
- }
-
- if ( arguments.length ) {
- if ( $.isArray( arguments[ 0 ] ) ) {
- vals = this.options.values;
- newValues = arguments[ 0 ];
- for ( i = 0; i < vals.length; i += 1 ) {
- vals[ i ] = this._trimAlignValue( newValues[ i ] );
- this._change( null, i );
- }
- this._refreshValue();
- } else {
- if ( this.options.values && this.options.values.length ) {
- return this._values( index );
- } else {
- return this.value();
- }
- }
- } else {
- return this._values();
- }
- },
-
- _setOption: function( key, value ) {
- var i,
- valsLength = 0;
-
- if ( $.isArray( this.options.values ) ) {
- valsLength = this.options.values.length;
- }
-
- $.Widget.prototype._setOption.apply( this, arguments );
-
- switch ( key ) {
- case "disabled":
- if ( value ) {
- this.handles.filter( ".ui-state-focus" ).blur();
- this.handles.removeClass( "ui-state-hover" );
- this.handles.prop( "disabled", true );
- this.element.addClass( "ui-disabled" );
- } else {
- this.handles.prop( "disabled", false );
- this.element.removeClass( "ui-disabled" );
- }
- break;
- case "orientation":
- this._detectOrientation();
- this.element
- .removeClass( "ui-slider-horizontal ui-slider-vertical" )
- .addClass( "ui-slider-" + this.orientation );
- this._refreshValue();
- break;
- case "value":
- this._animateOff = true;
- this._refreshValue();
- this._change( null, 0 );
- this._animateOff = false;
- break;
- case "values":
- this._animateOff = true;
- this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
- this._change( null, i );
- }
- this._animateOff = false;
- break;
- case "min":
- case "max":
- this._animateOff = true;
- this._refreshValue();
- this._animateOff = false;
- break;
- }
- },
-
- //internal value getter
- // _value() returns value trimmed by min and max, aligned by step
- _value: function() {
- var val = this.options.value;
- val = this._trimAlignValue( val );
-
- return val;
- },
-
- //internal values getter
- // _values() returns array of values trimmed by min and max, aligned by step
- // _values( index ) returns single value trimmed by min and max, aligned by step
- _values: function( index ) {
- var val,
- vals,
- i;
-
- if ( arguments.length ) {
- val = this.options.values[ index ];
- val = this._trimAlignValue( val );
-
- return val;
- } else {
- // .slice() creates a copy of the array
- // this copy gets trimmed by min and max and then returned
- vals = this.options.values.slice();
- for ( i = 0; i < vals.length; i+= 1) {
- vals[ i ] = this._trimAlignValue( vals[ i ] );
- }
-
- return vals;
- }
- },
-
- // returns the step-aligned value that val is closest to, between (inclusive) min and max
- _trimAlignValue: function( val ) {
- if ( val <= this._valueMin() ) {
- return this._valueMin();
- }
- if ( val >= this._valueMax() ) {
- return this._valueMax();
- }
- var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = (val - this._valueMin()) % step,
- alignValue = val - valModStep;
-
- if ( Math.abs(valModStep) * 2 >= step ) {
- alignValue += ( valModStep > 0 ) ? step : ( -step );
- }
-
- // Since JavaScript has problems with large floats, round
- // the final value to 5 digits after the decimal point (see #4124)
- return parseFloat( alignValue.toFixed(5) );
- },
-
- _valueMin: function() {
- return this.options.min;
- },
-
- _valueMax: function() {
- return this.options.max;
- },
-
- _refreshValue: function() {
- var lastValPercent, valPercent, value, valueMin, valueMax,
- oRange = this.options.range,
- o = this.options,
- that = this,
- animate = ( !this._animateOff ) ? o.animate : false,
- _set = {};
-
- if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i ) {
- valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
- _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
- if ( that.options.range === true ) {
- if ( that.orientation === "horizontal" ) {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- } else {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
- lastValPercent = valPercent;
- });
- } else {
- value = this.value();
- valueMin = this._valueMin();
- valueMax = this._valueMax();
- valPercent = ( valueMax !== valueMin ) ?
- ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
- 0;
- _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
-
- if ( oRange === "min" && this.orientation === "horizontal" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "horizontal" ) {
- this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- if ( oRange === "min" && this.orientation === "vertical" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "vertical" ) {
- this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
-
-});
-
-}(jQuery));
-(function( $, undefined ) {
-
-$.widget("ui.sortable", $.ui.mouse, {
- version: "1.9.2",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: 'auto',
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: '> *',
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000
- },
- _create: function() {
-
- var o = this.options;
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine if the items are being displayed horizontally
- this.floating = this.items.length ? o.axis === 'x' || (/left|right/).test(this.items[0].item.css('float')) || (/inline|table-cell/).test(this.items[0].item.css('display')) : false;
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- //We're ready to go
- this.ready = true
-
- },
-
- _destroy: function() {
- this.element
- .removeClass("ui-sortable ui-sortable-disabled");
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- )
- this.items[i].item.removeData(this.widgetName + "-item");
-
- return this;
- },
-
- _setOption: function(key, value){
- if ( key === "disabled" ) {
- this.options[ key ] = value;
-
- this.widget().toggleClass( "ui-sortable-disabled", !!value );
- } else {
- // Don't call widget base _setOption for disable as it adds ui-state-disabled class
- $.Widget.prototype._setOption.apply(this, arguments);
- }
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type == 'static') return false;
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- var currentItem = null, nodes = $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + '-item') == that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + '-item') == that) currentItem = $(event.target);
-
- if(!currentItem) return false;
- if(this.options.handle && !overrideHandle) {
- var validHandle = false;
-
- $(this.options.handle, currentItem).find("*").andSelf().each(function() { if(this == event.target) validHandle = true; });
- if(!validHandle) return false;
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var o = this.options;
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] != this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment)
- this._setContainment();
-
- if(o.cursor) { // cursor option
- if ($('body').css("cursor")) this._storedCursor = $('body').css("cursor");
- $('body').css("cursor", o.cursor);
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML')
- this.overflowOffset = this.scrollParent.offset();
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions)
- this._cacheHelperProportions();
-
-
- //Post 'activate' events to possible containers
- if(!noActivation) {
- for (var i = this.containers.length - 1; i >= 0; i--) { this.containers[i]._trigger("activate", event, this._uiHash(this)); }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager)
- $.ui.ddmanager.current = this;
-
- if ($.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- var o = this.options, scrolled = false;
- if(this.scrollParent[0] != document && this.scrollParent[0].tagName != 'HTML') {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity)
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity)
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity)
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity)
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
-
- } else {
-
- if(event.pageY - $(document).scrollTop() < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity)
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
-
- if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity)
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour)
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left+'px';
- if(!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top+'px';
-
- //Rearrange
- for (var i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- var item = this.items[i], itemElement = item.item[0], intersection = this._intersectsWithPointer(item);
- if (!intersection) continue;
-
- // Only put the placeholder inside the current Container, skip all
- // items form other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this moving items in "sub-sortables" can cause the placeholder to jitter
- // beetween the outer and inner container.
- if (item.instance !== this.currentContainer) continue;
-
- if (itemElement != this.currentItem[0] //cannot intersect with itself
- && this.placeholder[intersection == 1 ? "next" : "prev"]()[0] != itemElement //no useless actions that have been done before
- && !$.contains(this.placeholder[0], itemElement) //no action if the item moved is the parent of the item checked
- && (this.options.type == 'semi-dynamic' ? !$.contains(this.element[0], itemElement) : true)
- //&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
- ) {
-
- this.direction = intersection == 1 ? "down" : "up";
-
- if (this.options.tolerance == "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) $.ui.ddmanager.drag(this, event);
-
- //Call callbacks
- this._trigger('sort', event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) return;
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour)
- $.ui.ddmanager.drop(this, event);
-
- if(this.options.revert) {
- var that = this;
- var cur = this.placeholder.offset();
-
- this.reverting = true;
-
- $(this.helper).animate({
- left: cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
- top: cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
- }, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper == "original")
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- else
- this.currentItem.show();
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- if(this.options.helper != "original" && this.helper && this.helper[0].parentNode) this.helper.remove();
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected);
- var str = []; o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/));
- if(res) str.push((o.key || res[1]+'[]')+'='+(o.key && o.expression ? res[1] : res[2]));
- });
-
- if(!str.length && o.key) {
- str.push(o.key + '=');
- }
-
- return str.join('&');
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected);
- var ret = []; o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || 'id') || ''); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height;
-
- var l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height;
-
- var dyClick = this.offset.click.top,
- dxClick = this.offset.click.left;
-
- var isOverElement = (y1 + dyClick) > t && (y1 + dyClick) < b && (x1 + dxClick) > l && (x1 + dxClick) < r;
-
- if( this.options.tolerance == "pointer"
- || this.options.forcePointerForContainers
- || (this.options.tolerance != "pointer" && this.helperProportions[this.floating ? 'width' : 'height'] > item[this.floating ? 'width' : 'height'])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) // Right Half
- && x2 - (this.helperProportions.width / 2) < r // Left Half
- && t < y1 + (this.helperProportions.height / 2) // Bottom Half
- && y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === 'x') || $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === 'y') || $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement)
- return false;
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection == "right") || verticalDirection == "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection == "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = $.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = $.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta != 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta != 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor == String
- ? [options.connectWith]
- : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var items = [];
- var queries = [];
- var connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (var i = connectWith.length - 1; i >= 0; i--){
- var cur = $(connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], this.widgetName);
- if(inst && inst != this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), inst]);
- }
- };
- };
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not('.ui-sortable-placeholder'), this]);
-
- for (var i = queries.length - 1; i >= 0; i--){
- queries[i][0].each(function() {
- items.push(this);
- });
- };
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] == item.item[0])
- return false;
- };
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
- var items = this.items;
- var queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]];
- var connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (var i = connectWith.length - 1; i >= 0; i--){
- var cur = $(connectWith[i]);
- for (var j = cur.length - 1; j >= 0; j--){
- var inst = $.data(cur[j], this.widgetName);
- if(inst && inst != this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- };
- };
- }
-
- for (var i = queries.length - 1; i >= 0; i--) {
- var targetData = queries[i][1];
- var _queries = queries[i][0];
-
- for (var j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- var item = $(_queries[j]);
-
- item.data(this.widgetName + '-item', targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- };
- };
-
- },
-
- refreshPositions: function(fast) {
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- for (var i = this.items.length - 1; i >= 0; i--){
- var item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance != this.currentContainer && this.currentContainer && item.item[0] != this.currentItem[0])
- continue;
-
- var t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- var p = t.offset();
- item.left = p.left;
- item.top = p.top;
- };
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (var i = this.containers.length - 1; i >= 0; i--){
- var p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- };
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor == String) {
- var className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var el = $(document.createElement(that.currentItem[0].nodeName))
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper")[0];
-
- if(!className)
- el.style.visibility = "hidden";
-
- return el;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) return;
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css('paddingTop')||0, 10) - parseInt(that.currentItem.css('paddingBottom')||0, 10)); };
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css('paddingLeft')||0, 10) - parseInt(that.currentItem.css('paddingRight')||0, 10)); };
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _contactContainers: function(event) {
-
- // get innermost container that intersects with item
- var innermostContainer = null, innermostIndex = null;
-
-
- for (var i = this.containers.length - 1; i >= 0; i--){
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0]))
- continue;
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0]))
- continue;
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) return;
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- var dist = 10000; var itemWithLeastDistance = null;
- var posProperty = this.containers[innermostIndex].floating ? 'left' : 'top';
- var sizeProperty = this.containers[innermostIndex].floating ? 'width' : 'height';
- var base = this.positionAbs[posProperty] + this.offset.click[posProperty];
- for (var j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) continue;
- if(this.items[j].item[0] == this.currentItem[0]) continue;
- var cur = this.items[j].item.offset()[posProperty];
- var nearBottom = false;
- if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
- nearBottom = true;
- cur += this.items[j][sizeProperty];
- }
-
- if(Math.abs(cur - base) < dist) {
- dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) //Check if dropOnEmpty is enabled
- return;
-
- this.currentContainer = this.containers[innermostIndex];
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options;
- var helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper == 'clone' ? this.currentItem.clone() : this.currentItem);
-
- if(!helper.parents('body').length) //Add the helper to the DOM if that didn't happen already
- $(o.appendTo != 'parent' ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
-
- if(helper[0] == this.currentItem[0])
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
-
- if(helper[0].style.width == '' || o.forceHelperSize) helper.width(this.currentItem.width());
- if(helper[0].style.height == '' || o.forceHelperSize) helper.height(this.currentItem.height());
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj == 'string') {
- obj = obj.split(' ');
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ('left' in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ('right' in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ('top' in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ('bottom' in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition == 'absolute' && this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if((this.offsetParent[0] == document.body) //This needs to be actually done for all browsers, since pageX/pageY includes this information
- || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == 'html' && $.ui.ie)) //Ugly IE fix
- po = { top: 0, left: 0 };
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition == "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var o = this.options;
- if(o.containment == 'parent') o.containment = this.helper[0].parentNode;
- if(o.containment == 'document' || o.containment == 'window') this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- $(o.containment == 'document' ? document : window).width() - this.helperProportions.width - this.margins.left,
- ($(o.containment == 'document' ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- var ce = $(o.containment)[0];
- var co = $(o.containment).offset();
- var over = ($(ce).css("overflow") != 'hidden');
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) pos = this.position;
- var mod = d == "absolute" ? 1 : -1;
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top // The absolute mouse position
- + this.offset.relative.top * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.top * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left // The absolute mouse position
- + this.offset.relative.left * mod // Only for relative positioned nodes: Relative offset from element to offset parent
- + this.offset.parent.left * mod // The offsetParent's offset without borders (offset + border)
- - ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition == 'relative' && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- var pageX = event.pageX;
- var pageY = event.pageY;
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) pageX = this.containment[0] + this.offset.click.left;
- if(event.pageY - this.offset.click.top < this.containment[1]) pageY = this.containment[1] + this.offset.click.top;
- if(event.pageX - this.offset.click.left > this.containment[2]) pageX = this.containment[2] + this.offset.click.left;
- if(event.pageY - this.offset.click.top > this.containment[3]) pageY = this.containment[3] + this.offset.click.top;
- }
-
- if(o.grid) {
- var top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? (!(top - this.offset.click.top < this.containment[1] || top - this.offset.click.top > this.containment[3]) ? top : (!(top - this.offset.click.top < this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- var left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? (!(left - this.offset.click.left < this.containment[0] || left - this.offset.click.left > this.containment[2]) ? left : (!(left - this.offset.click.left < this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY // The absolute mouse position
- - this.offset.click.top // Click offset (relative to the element)
- - this.offset.relative.top // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.top // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX // The absolute mouse position
- - this.offset.click.left // Click offset (relative to the element)
- - this.offset.relative.left // Only for relative positioned nodes: Relative offset from element to offset parent
- - this.offset.parent.left // The offsetParent's offset without borders (offset + border)
- + ( ( this.cssPosition == 'fixed' ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction == 'down' ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter == this.counter) this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) this.placeholder.before(this.currentItem);
- this._noFinalSort = null;
-
- if(this.helper[0] == this.currentItem[0]) {
- for(var i in this._storedCSS) {
- if(this._storedCSS[i] == 'auto' || this._storedCSS[i] == 'static') this._storedCSS[i] = '';
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- if((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !noPropagation) delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- if(!noPropagation) delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); }; }).call(this, this.containers[i]));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if(this._storedCursor) $('body').css("cursor", this._storedCursor); //Reset cursor
- if(this._storedOpacity) this.helper.css("opacity", this._storedOpacity); //Reset opacity
- if(this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == 'auto' ? '' : this._storedZIndex); //Reset z-index
-
- this.dragging = false;
- if(this.cancelHelperRemoval) {
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return false;
- }
-
- if(!noPropagation) this._trigger("beforeStop", event, this._uiHash());
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if(this.helper[0] != this.currentItem[0]) this.helper.remove(); this.helper = null;
-
- if(!noPropagation) {
- for (var i=0; i < delayedTriggers.length; i++) { delayedTriggers[i].call(this, event); }; //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return true;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-})(jQuery);
-(function( $ ) {
-
-function modifier( fn ) {
- return function() {
- var previous = this.element.val();
- fn.apply( this, arguments );
- this._refresh();
- if ( previous !== this.element.val() ) {
- this._trigger( "change" );
- }
- };
-}
-
-$.widget( "ui.spinner", {
- version: "1.9.2",
- defaultElement: "<input>",
- widgetEventPrefix: "spin",
- options: {
- culture: null,
- icons: {
- down: "ui-icon-triangle-1-s",
- up: "ui-icon-triangle-1-n"
- },
- incremental: true,
- max: null,
- min: null,
- numberFormat: null,
- page: 10,
- step: 1,
-
- change: null,
- spin: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- // handle string values that need to be parsed
- this._setOption( "max", this.options.max );
- this._setOption( "min", this.options.min );
- this._setOption( "step", this.options.step );
-
- // format the value, but don't constrain
- this._value( this.element.val(), true );
-
- this._draw();
- this._on( this._events );
- this._refresh();
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _getCreateOptions: function() {
- var options = {},
- element = this.element;
-
- $.each( [ "min", "max", "step" ], function( i, option ) {
- var value = element.attr( option );
- if ( value !== undefined && value.length ) {
- options[ option ] = value;
- }
- });
-
- return options;
- },
-
- _events: {
- keydown: function( event ) {
- if ( this._start( event ) && this._keydown( event ) ) {
- event.preventDefault();
- }
- },
- keyup: "_stop",
- focus: function() {
- this.previous = this.element.val();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- this._refresh();
- if ( this.previous !== this.element.val() ) {
- this._trigger( "change", event );
- }
- },
- mousewheel: function( event, delta ) {
- if ( !delta ) {
- return;
- }
- if ( !this.spinning && !this._start( event ) ) {
- return false;
- }
-
- this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
- clearTimeout( this.mousewheelTimer );
- this.mousewheelTimer = this._delay(function() {
- if ( this.spinning ) {
- this._stop( event );
- }
- }, 100 );
- event.preventDefault();
- },
- "mousedown .ui-spinner-button": function( event ) {
- var previous;
-
- // We never want the buttons to have focus; whenever the user is
- // interacting with the spinner, the focus should be on the input.
- // If the input is focused then this.previous is properly set from
- // when the input first received focus. If the input is not focused
- // then we need to set this.previous based on the value before spinning.
- previous = this.element[0] === this.document[0].activeElement ?
- this.previous : this.element.val();
- function checkFocus() {
- var isActive = this.element[0] === this.document[0].activeElement;
- if ( !isActive ) {
- this.element.focus();
- this.previous = previous;
- // support: IE
- // IE sets focus asynchronously, so we need to check if focus
- // moved off of the input because the user clicked on the button.
- this._delay(function() {
- this.previous = previous;
- });
- }
- }
-
- // ensure focus is on (or stays on) the text field
- event.preventDefault();
- checkFocus.call( this );
-
- // support: IE
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- // and check (again) if focus moved off of the input.
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- checkFocus.call( this );
- });
-
- if ( this._start( event ) === false ) {
- return;
- }
-
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- "mouseup .ui-spinner-button": "_stop",
- "mouseenter .ui-spinner-button": function( event ) {
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
- return;
- }
-
- if ( this._start( event ) === false ) {
- return false;
- }
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- // TODO: do we really want to consider this a stop?
- // shouldn't we just stop the repeater and wait until mouseup before
- // we trigger the stop event?
- "mouseleave .ui-spinner-button": "_stop"
- },
-
- _draw: function() {
- var uiSpinner = this.uiSpinner = this.element
- .addClass( "ui-spinner-input" )
- .attr( "autocomplete", "off" )
- .wrap( this._uiSpinnerHtml() )
- .parent()
- // add buttons
- .append( this._buttonHtml() );
-
- this.element.attr( "role", "spinbutton" );
-
- // button bindings
- this.buttons = uiSpinner.find( ".ui-spinner-button" )
- .attr( "tabIndex", -1 )
- .button()
- .removeClass( "ui-corner-all" );
-
- // IE 6 doesn't understand height: 50% for the buttons
- // unless the wrapper has an explicit height
- if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
- uiSpinner.height() > 0 ) {
- uiSpinner.height( uiSpinner.height() );
- }
-
- // disable spinner if element was already disabled
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _keydown: function( event ) {
- var options = this.options,
- keyCode = $.ui.keyCode;
-
- switch ( event.keyCode ) {
- case keyCode.UP:
- this._repeat( null, 1, event );
- return true;
- case keyCode.DOWN:
- this._repeat( null, -1, event );
- return true;
- case keyCode.PAGE_UP:
- this._repeat( null, options.page, event );
- return true;
- case keyCode.PAGE_DOWN:
- this._repeat( null, -options.page, event );
- return true;
- }
-
- return false;
- },
-
- _uiSpinnerHtml: function() {
- return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
- },
-
- _buttonHtml: function() {
- return "" +
- "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
- "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
- "</a>" +
- "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
- "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
- "</a>";
- },
-
- _start: function( event ) {
- if ( !this.spinning && this._trigger( "start", event ) === false ) {
- return false;
- }
-
- if ( !this.counter ) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- },
-
- _repeat: function( i, steps, event ) {
- i = i || 500;
-
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- this._repeat( 40, steps, event );
- }, i );
-
- this._spin( steps * this.options.step, event );
- },
-
- _spin: function( step, event ) {
- var value = this.value() || 0;
-
- if ( !this.counter ) {
- this.counter = 1;
- }
-
- value = this._adjustValue( value + step * this._increment( this.counter ) );
-
- if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
- this._value( value );
- this.counter++;
- }
- },
-
- _increment: function( i ) {
- var incremental = this.options.incremental;
-
- if ( incremental ) {
- return $.isFunction( incremental ) ?
- incremental( i ) :
- Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
- }
-
- return 1;
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _adjustValue: function( value ) {
- var base, aboveMin,
- options = this.options;
-
- // make sure we're at a valid step
- // - find out where we are relative to the base (min or 0)
- base = options.min !== null ? options.min : 0;
- aboveMin = value - base;
- // - round to the nearest step
- aboveMin = Math.round(aboveMin / options.step) * options.step;
- // - rounding is based on 0, so adjust back to our base
- value = base + aboveMin;
-
- // fix precision from bad JS floating point math
- value = parseFloat( value.toFixed( this._precision() ) );
-
- // clamp the value
- if ( options.max !== null && value > options.max) {
- return options.max;
- }
- if ( options.min !== null && value < options.min ) {
- return options.min;
- }
-
- return value;
- },
-
- _stop: function( event ) {
- if ( !this.spinning ) {
- return;
- }
-
- clearTimeout( this.timer );
- clearTimeout( this.mousewheelTimer );
- this.counter = 0;
- this.spinning = false;
- this._trigger( "stop", event );
- },
-
- _setOption: function( key, value ) {
- if ( key === "culture" || key === "numberFormat" ) {
- var prevValue = this._parse( this.element.val() );
- this.options[ key ] = value;
- this.element.val( this._format( prevValue ) );
- return;
- }
-
- if ( key === "max" || key === "min" || key === "step" ) {
- if ( typeof value === "string" ) {
- value = this._parse( value );
- }
- }
-
- this._super( key, value );
-
- if ( key === "disabled" ) {
- if ( value ) {
- this.element.prop( "disabled", true );
- this.buttons.button( "disable" );
- } else {
- this.element.prop( "disabled", false );
- this.buttons.button( "enable" );
- }
- }
- },
-
- _setOptions: modifier(function( options ) {
- this._super( options );
- this._value( this.element.val() );
- }),
-
- _parse: function( val ) {
- if ( typeof val === "string" && val !== "" ) {
- val = window.Globalize && this.options.numberFormat ?
- Globalize.parseFloat( val, 10, this.options.culture ) : +val;
- }
- return val === "" || isNaN( val ) ? null : val;
- },
-
- _format: function( value ) {
- if ( value === "" ) {
- return "";
- }
- return window.Globalize && this.options.numberFormat ?
- Globalize.format( value, this.options.numberFormat, this.options.culture ) :
- value;
- },
-
- _refresh: function() {
- this.element.attr({
- "aria-valuemin": this.options.min,
- "aria-valuemax": this.options.max,
- // TODO: what should we do with values that can't be parsed?
- "aria-valuenow": this._parse( this.element.val() )
- });
- },
-
- // update the value without triggering change
- _value: function( value, allowAny ) {
- var parsed;
- if ( value !== "" ) {
- parsed = this._parse( value );
- if ( parsed !== null ) {
- if ( !allowAny ) {
- parsed = this._adjustValue( parsed );
- }
- value = this._format( parsed );
- }
- }
- this.element.val( value );
- this._refresh();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-spinner-input" )
- .prop( "disabled", false )
- .removeAttr( "autocomplete" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
- this.uiSpinner.replaceWith( this.element );
- },
-
- stepUp: modifier(function( steps ) {
- this._stepUp( steps );
- }),
- _stepUp: function( steps ) {
- this._spin( (steps || 1) * this.options.step );
- },
-
- stepDown: modifier(function( steps ) {
- this._stepDown( steps );
- }),
- _stepDown: function( steps ) {
- this._spin( (steps || 1) * -this.options.step );
- },
-
- pageUp: modifier(function( pages ) {
- this._stepUp( (pages || 1) * this.options.page );
- }),
-
- pageDown: modifier(function( pages ) {
- this._stepDown( (pages || 1) * this.options.page );
- }),
-
- value: function( newVal ) {
- if ( !arguments.length ) {
- return this._parse( this.element.val() );
- }
- modifier( this._value ).call( this, newVal );
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-}( jQuery ) );
-(function( $, undefined ) {
-
-var tabId = 0,
- rhash = /#.*$/;
-
-function getNextTabId() {
- return ++tabId;
-}
-
-function isLocal( anchor ) {
- return anchor.hash.length > 1 &&
- anchor.href.replace( rhash, "" ) ===
- location.href.replace( rhash, "" )
- // support: Safari 5.1
- // Safari 5.1 doesn't encode spaces in window.location
- // but it does encode spaces from anchors (#8777)
- .replace( /\s/g, "%20" );
-}
-
-$.widget( "ui.tabs", {
- version: "1.9.2",
- delay: 300,
- options: {
- active: null,
- collapsible: false,
- event: "click",
- heightStyle: "content",
- hide: null,
- show: null,
-
- // callbacks
- activate: null,
- beforeActivate: null,
- beforeLoad: null,
- load: null
- },
-
- _create: function() {
- var that = this,
- options = this.options,
- active = options.active,
- locationHash = location.hash.substring( 1 );
-
- this.running = false;
-
- this.element
- .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-tabs-collapsible", options.collapsible )
- // Prevent users from focusing disabled tabs via click
- .delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
- if ( $( this ).is( ".ui-state-disabled" ) ) {
- event.preventDefault();
- }
- })
- // support: IE <9
- // Preventing the default action in mousedown doesn't prevent IE
- // from focusing the element, so if the anchor gets focused, blur.
- // We don't have to worry about focusing the previously focused
- // element since clicking on a non-focusable element should focus
- // the body anyway.
- .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
- if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
- this.blur();
- }
- });
-
- this._processTabs();
-
- if ( active === null ) {
- // check the fragment identifier in the URL
- if ( locationHash ) {
- this.tabs.each(function( i, tab ) {
- if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
- active = i;
- return false;
- }
- });
- }
-
- // check for a tab marked active via a class
- if ( active === null ) {
- active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
- }
-
- // no active tab, set to false
- if ( active === null || active === -1 ) {
- active = this.tabs.length ? 0 : false;
- }
- }
-
- // handle numbers: negative, out of range
- if ( active !== false ) {
- active = this.tabs.index( this.tabs.eq( active ) );
- if ( active === -1 ) {
- active = options.collapsible ? false : 0;
- }
- }
- options.active = active;
-
- // don't allow collapsible: false and active: false
- if ( !options.collapsible && options.active === false && this.anchors.length ) {
- options.active = 0;
- }
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- if ( $.isArray( options.disabled ) ) {
- options.disabled = $.unique( options.disabled.concat(
- $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
- return that.tabs.index( li );
- })
- ) ).sort();
- }
-
- // check for length avoids error when initializing empty list
- if ( this.options.active !== false && this.anchors.length ) {
- this.active = this._findActive( this.options.active );
- } else {
- this.active = $();
- }
-
- this._refresh();
-
- if ( this.active.length ) {
- this.load( options.active );
- }
- },
-
- _getCreateEventData: function() {
- return {
- tab: this.active,
- panel: !this.active.length ? $() : this._getPanelForTab( this.active )
- };
- },
-
- _tabKeydown: function( event ) {
- var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
- selectedIndex = this.tabs.index( focusedTab ),
- goingForward = true;
-
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- selectedIndex++;
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.LEFT:
- goingForward = false;
- selectedIndex--;
- break;
- case $.ui.keyCode.END:
- selectedIndex = this.anchors.length - 1;
- break;
- case $.ui.keyCode.HOME:
- selectedIndex = 0;
- break;
- case $.ui.keyCode.SPACE:
- // Activate only, no collapsing
- event.preventDefault();
- clearTimeout( this.activating );
- this._activate( selectedIndex );
- return;
- case $.ui.keyCode.ENTER:
- // Toggle (cancel delayed activation, allow collapsing)
- event.preventDefault();
- clearTimeout( this.activating );
- // Determine if we should collapse or activate
- this._activate( selectedIndex === this.options.active ? false : selectedIndex );
- return;
- default:
- return;
- }
-
- // Focus the appropriate tab, based on which key was pressed
- event.preventDefault();
- clearTimeout( this.activating );
- selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
- // Navigating with control key will prevent automatic activation
- if ( !event.ctrlKey ) {
- // Update aria-selected immediately so that AT think the tab is already selected.
- // Otherwise AT may confuse the user by stating that they need to activate the tab,
- // but the tab will already be activated by the time the announcement finishes.
- focusedTab.attr( "aria-selected", "false" );
- this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
- this.activating = this._delay(function() {
- this.option( "active", selectedIndex );
- }, this.delay );
- }
- },
-
- _panelKeydown: function( event ) {
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- // Ctrl+up moves focus to the current tab
- if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
- event.preventDefault();
- this.active.focus();
- }
- },
-
- // Alt+page up/down moves focus to the previous/next tab (and activates)
- _handlePageNav: function( event ) {
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
- this._activate( this._focusNextTab( this.options.active - 1, false ) );
- return true;
- }
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
- this._activate( this._focusNextTab( this.options.active + 1, true ) );
- return true;
- }
- },
-
- _findNextTab: function( index, goingForward ) {
- var lastTabIndex = this.tabs.length - 1;
-
- function constrain() {
- if ( index > lastTabIndex ) {
- index = 0;
- }
- if ( index < 0 ) {
- index = lastTabIndex;
- }
- return index;
- }
-
- while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
- index = goingForward ? index + 1 : index - 1;
- }
-
- return index;
- },
-
- _focusNextTab: function( index, goingForward ) {
- index = this._findNextTab( index, goingForward );
- this.tabs.eq( index ).focus();
- return index;
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "disabled" ) {
- // don't use the widget factory's disabled handling
- this._setupDisabled( value );
- return;
- }
-
- this._super( key, value);
-
- if ( key === "collapsible" ) {
- this.element.toggleClass( "ui-tabs-collapsible", value );
- // Setting collapsible: false while collapsed; open first panel
- if ( !value && this.options.active === false ) {
- this._activate( 0 );
- }
- }
-
- if ( key === "event" ) {
- this._setupEvents( value );
- }
-
- if ( key === "heightStyle" ) {
- this._setupHeightStyle( value );
- }
- },
-
- _tabId: function( tab ) {
- return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
- },
-
- _sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
- },
-
- refresh: function() {
- var options = this.options,
- lis = this.tablist.children( ":has(a[href])" );
-
- // get disabled tabs from class attribute from HTML
- // this will get converted to a boolean if needed in _refresh()
- options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
- return lis.index( tab );
- });
-
- this._processTabs();
-
- // was collapsed or no tabs
- if ( options.active === false || !this.anchors.length ) {
- options.active = false;
- this.active = $();
- // was active, but active tab is gone
- } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
- // all remaining tabs are disabled
- if ( this.tabs.length === options.disabled.length ) {
- options.active = false;
- this.active = $();
- // activate previous tab
- } else {
- this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
- }
- // was active, active tab still exists
- } else {
- // make sure active index is correct
- options.active = this.tabs.index( this.active );
- }
-
- this._refresh();
- },
-
- _refresh: function() {
- this._setupDisabled( this.options.disabled );
- this._setupEvents( this.options.event );
- this._setupHeightStyle( this.options.heightStyle );
-
- this.tabs.not( this.active ).attr({
- "aria-selected": "false",
- tabIndex: -1
- });
- this.panels.not( this._getPanelForTab( this.active ) )
- .hide()
- .attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
-
- // Make sure one tab is in the tab order
- if ( !this.active.length ) {
- this.tabs.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active
- .addClass( "ui-tabs-active ui-state-active" )
- .attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- this._getPanelForTab( this.active )
- .show()
- .attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- }
- },
-
- _processTabs: function() {
- var that = this;
-
- this.tablist = this._getList()
- .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .attr( "role", "tablist" );
-
- this.tabs = this.tablist.find( "> li:has(a[href])" )
- .addClass( "ui-state-default ui-corner-top" )
- .attr({
- role: "tab",
- tabIndex: -1
- });
-
- this.anchors = this.tabs.map(function() {
- return $( "a", this )[ 0 ];
- })
- .addClass( "ui-tabs-anchor" )
- .attr({
- role: "presentation",
- tabIndex: -1
- });
-
- this.panels = $();
-
- this.anchors.each(function( i, anchor ) {
- var selector, panel, panelId,
- anchorId = $( anchor ).uniqueId().attr( "id" ),
- tab = $( anchor ).closest( "li" ),
- originalAriaControls = tab.attr( "aria-controls" );
-
- // inline tab
- if ( isLocal( anchor ) ) {
- selector = anchor.hash;
- panel = that.element.find( that._sanitizeSelector( selector ) );
- // remote tab
- } else {
- panelId = that._tabId( tab );
- selector = "#" + panelId;
- panel = that.element.find( selector );
- if ( !panel.length ) {
- panel = that._createPanel( panelId );
- panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
- }
- panel.attr( "aria-live", "polite" );
- }
-
- if ( panel.length) {
- that.panels = that.panels.add( panel );
- }
- if ( originalAriaControls ) {
- tab.data( "ui-tabs-aria-controls", originalAriaControls );
- }
- tab.attr({
- "aria-controls": selector.substring( 1 ),
- "aria-labelledby": anchorId
- });
- panel.attr( "aria-labelledby", anchorId );
- });
-
- this.panels
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .attr( "role", "tabpanel" );
- },
-
- // allow overriding how to find the list for rare usage scenarios (#7715)
- _getList: function() {
- return this.element.find( "ol,ul" ).eq( 0 );
- },
-
- _createPanel: function( id ) {
- return $( "<div>" )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- },
-
- _setupDisabled: function( disabled ) {
- if ( $.isArray( disabled ) ) {
- if ( !disabled.length ) {
- disabled = false;
- } else if ( disabled.length === this.anchors.length ) {
- disabled = true;
- }
- }
-
- // disable tabs
- for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
- if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
- $( li )
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- } else {
- $( li )
- .removeClass( "ui-state-disabled" )
- .removeAttr( "aria-disabled" );
- }
- }
-
- this.options.disabled = disabled;
- },
-
- _setupEvents: function( event ) {
- var events = {
- click: function( event ) {
- event.preventDefault();
- }
- };
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.anchors.add( this.tabs ).add( this.panels ) );
- this._on( this.anchors, events );
- this._on( this.tabs, { keydown: "_tabKeydown" } );
- this._on( this.panels, { keydown: "_panelKeydown" } );
-
- this._focusable( this.tabs );
- this._hoverable( this.tabs );
- },
-
- _setupHeightStyle: function( heightStyle ) {
- var maxHeight, overflow,
- parent = this.element.parent();
-
- if ( heightStyle === "fill" ) {
- // IE 6 treats height like minHeight, so we need to turn off overflow
- // in order to get a reliable height
- // we use the minHeight support test because we assume that only
- // browsers that don't support minHeight will treat height as minHeight
- if ( !$.support.minHeight ) {
- overflow = parent.css( "overflow" );
- parent.css( "overflow", "hidden");
- }
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
- if ( overflow ) {
- parent.css( "overflow", overflow );
- }
-
- this.element.children().not( this.panels ).each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.panels.each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.panels.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
- }).height( maxHeight );
- }
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- anchor = $( event.currentTarget ),
- tab = anchor.closest( "li" ),
- clickedIsActive = tab[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : this._getPanelForTab( tab ),
- toHide = !active.length ? $() : this._getPanelForTab( active ),
- eventData = {
- oldTab: active,
- oldPanel: toHide,
- newTab: collapsing ? $() : tab,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if ( tab.hasClass( "ui-state-disabled" ) ||
- // tab is already loading
- tab.hasClass( "ui-tabs-loading" ) ||
- // can't switch durning an animation
- this.running ||
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.tabs.index( tab );
-
- this.active = clickedIsActive ? $() : tab;
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- if ( !toHide.length && !toShow.length ) {
- $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
- }
-
- if ( toShow.length ) {
- this.load( this.tabs.index( tab ), event );
- }
- this._toggle( event, eventData );
- },
-
- // handles show/hide for selecting tabs
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel;
-
- this.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && that.options.show ) {
- that._show( toShow, that.options.show, complete );
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && this.options.hide ) {
- this._hide( toHide, this.options.hide, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
-
- toHide.attr({
- "aria-expanded": "false",
- "aria-hidden": "true"
- });
- eventData.oldTab.attr( "aria-selected", "false" );
- // If we're switching tabs, remove the old tab from the tab order.
- // If we're opening from collapsed state, remove the previous tab from the tab order.
- // If we're collapsing, then keep the collapsing tab in the tab order.
- if ( toShow.length && toHide.length ) {
- eventData.oldTab.attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.tabs.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow.attr({
- "aria-expanded": "true",
- "aria-hidden": "false"
- });
- eventData.newTab.attr({
- "aria-selected": "true",
- tabIndex: 0
- });
- },
-
- _activate: function( index ) {
- var anchor,
- active = this._findActive( index );
-
- // trying to activate the already active panel
- if ( active[ 0 ] === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the current active header
- if ( !active.length ) {
- active = this.active;
- }
-
- anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
- this._eventHandler({
- target: anchor,
- currentTarget: anchor,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( index ) {
- return index === false ? $() : this.tabs.eq( index );
- },
-
- _getIndex: function( index ) {
- // meta-function to give users option to provide a href string instead of a numerical index.
- if ( typeof index === "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
- }
-
- return index;
- },
-
- _destroy: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
- this.tablist
- .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .removeAttr( "role" );
-
- this.anchors
- .removeClass( "ui-tabs-anchor" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeData( "href.tabs" )
- .removeData( "load.tabs" )
- .removeUniqueId();
-
- this.tabs.add( this.panels ).each(function() {
- if ( $.data( this, "ui-tabs-destroy" ) ) {
- $( this ).remove();
- } else {
- $( this )
- .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
- "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-live" )
- .removeAttr( "aria-busy" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "role" );
- }
- });
-
- this.tabs.each(function() {
- var li = $( this ),
- prev = li.data( "ui-tabs-aria-controls" );
- if ( prev ) {
- li.attr( "aria-controls", prev );
- } else {
- li.removeAttr( "aria-controls" );
- }
- });
-
- this.panels.show();
-
- if ( this.options.heightStyle !== "content" ) {
- this.panels.css( "height", "" );
- }
- },
-
- enable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === false ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = false;
- } else {
- index = this._getIndex( index );
- if ( $.isArray( disabled ) ) {
- disabled = $.map( disabled, function( num ) {
- return num !== index ? num : null;
- });
- } else {
- disabled = $.map( this.tabs, function( li, num ) {
- return num !== index ? num : null;
- });
- }
- }
- this._setupDisabled( disabled );
- },
-
- disable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === true ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = true;
- } else {
- index = this._getIndex( index );
- if ( $.inArray( index, disabled ) !== -1 ) {
- return;
- }
- if ( $.isArray( disabled ) ) {
- disabled = $.merge( [ index ], disabled ).sort();
- } else {
- disabled = [ index ];
- }
- }
- this._setupDisabled( disabled );
- },
-
- load: function( index, event ) {
- index = this._getIndex( index );
- var that = this,
- tab = this.tabs.eq( index ),
- anchor = tab.find( ".ui-tabs-anchor" ),
- panel = this._getPanelForTab( tab ),
- eventData = {
- tab: tab,
- panel: panel
- };
-
- // not remote
- if ( isLocal( anchor[ 0 ] ) ) {
- return;
- }
-
- this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
- // support: jQuery <1.8
- // jQuery <1.8 returns false if the request is canceled in beforeSend,
- // but as of 1.8, $.ajax() always returns a jqXHR object.
- if ( this.xhr && this.xhr.statusText !== "canceled" ) {
- tab.addClass( "ui-tabs-loading" );
- panel.attr( "aria-busy", "true" );
-
- this.xhr
- .success(function( response ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- panel.html( response );
- that._trigger( "load", event, eventData );
- }, 1 );
- })
- .complete(function( jqXHR, status ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
- }, 1 );
- });
- }
- },
-
- // TODO: Remove this function in 1.10 when ajaxOptions is removed
- _ajaxSettings: function( anchor, event, eventData ) {
- var that = this;
- return {
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
- }
- };
- },
-
- _getPanelForTab: function( tab ) {
- var id = $( tab ).attr( "aria-controls" );
- return this.element.find( this._sanitizeSelector( "#" + id ) );
- }
-});
-
-// DEPRECATED
-if ( $.uiBackCompat !== false ) {
-
- // helper method for a lot of the back compat extensions
- $.ui.tabs.prototype._ui = function( tab, panel ) {
- return {
- tab: tab,
- panel: panel,
- index: this.anchors.index( tab )
- };
- };
-
- // url method
- $.widget( "ui.tabs", $.ui.tabs, {
- url: function( index, url ) {
- this.anchors.eq( index ).attr( "href", url );
- }
- });
-
- // TODO: Remove _ajaxSettings() method when removing this extension
- // ajaxOptions and cache options
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- ajaxOptions: null,
- cache: false
- },
-
- _create: function() {
- this._super();
-
- var that = this;
-
- this._on({ tabsbeforeload: function( event, ui ) {
- // tab is already cached
- if ( $.data( ui.tab[ 0 ], "cache.tabs" ) ) {
- event.preventDefault();
- return;
- }
-
- ui.jqXHR.success(function() {
- if ( that.options.cache ) {
- $.data( ui.tab[ 0 ], "cache.tabs", true );
- }
- });
- }});
- },
-
- _ajaxSettings: function( anchor, event, ui ) {
- var ajaxOptions = this.options.ajaxOptions;
- return $.extend( {}, ajaxOptions, {
- error: function( xhr, status ) {
- try {
- // Passing index avoid a race condition when this method is
- // called after the user has selected another tab.
- // Pass the anchor that initiated this request allows
- // loadError to manipulate the tab content panel via $(a.hash)
- ajaxOptions.error(
- xhr, status, ui.tab.closest( "li" ).index(), ui.tab[ 0 ] );
- }
- catch ( error ) {}
- }
- }, this._superApply( arguments ) );
- },
-
- _setOption: function( key, value ) {
- // reset cache if switching from cached to not cached
- if ( key === "cache" && value === false ) {
- this.anchors.removeData( "cache.tabs" );
- }
- this._super( key, value );
- },
-
- _destroy: function() {
- this.anchors.removeData( "cache.tabs" );
- this._super();
- },
-
- url: function( index ){
- this.anchors.eq( index ).removeData( "cache.tabs" );
- this._superApply( arguments );
- }
- });
-
- // abort method
- $.widget( "ui.tabs", $.ui.tabs, {
- abort: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
- }
- });
-
- // spinner
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- spinner: "<em>Loading&#8230;</em>"
- },
- _create: function() {
- this._super();
- this._on({
- tabsbeforeload: function( event, ui ) {
- // Don't react to nested tabs or tabs that don't use a spinner
- if ( event.target !== this.element[ 0 ] ||
- !this.options.spinner ) {
- return;
- }
-
- var span = ui.tab.find( "span" ),
- html = span.html();
- span.html( this.options.spinner );
- ui.jqXHR.complete(function() {
- span.html( html );
- });
- }
- });
- }
- });
-
- // enable/disable events
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- enable: null,
- disable: null
- },
-
- enable: function( index ) {
- var options = this.options,
- trigger;
-
- if ( index && options.disabled === true ||
- ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) !== -1 ) ) {
- trigger = true;
- }
-
- this._superApply( arguments );
-
- if ( trigger ) {
- this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- }
- },
-
- disable: function( index ) {
- var options = this.options,
- trigger;
-
- if ( index && options.disabled === false ||
- ( $.isArray( options.disabled ) && $.inArray( index, options.disabled ) === -1 ) ) {
- trigger = true;
- }
-
- this._superApply( arguments );
-
- if ( trigger ) {
- this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- }
- }
- });
-
- // add/remove methods and events
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- add: null,
- remove: null,
- tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
- },
-
- add: function( url, label, index ) {
- if ( index === undefined ) {
- index = this.anchors.length;
- }
-
- var doInsertAfter, panel,
- options = this.options,
- li = $( options.tabTemplate
- .replace( /#\{href\}/g, url )
- .replace( /#\{label\}/g, label ) ),
- id = !url.indexOf( "#" ) ?
- url.replace( "#", "" ) :
- this._tabId( li );
-
- li.addClass( "ui-state-default ui-corner-top" ).data( "ui-tabs-destroy", true );
- li.attr( "aria-controls", id );
-
- doInsertAfter = index >= this.tabs.length;
-
- // try to find an existing element before creating a new one
- panel = this.element.find( "#" + id );
- if ( !panel.length ) {
- panel = this._createPanel( id );
- if ( doInsertAfter ) {
- if ( index > 0 ) {
- panel.insertAfter( this.panels.eq( -1 ) );
- } else {
- panel.appendTo( this.element );
- }
- } else {
- panel.insertBefore( this.panels[ index ] );
- }
- }
- panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ).hide();
-
- if ( doInsertAfter ) {
- li.appendTo( this.tablist );
- } else {
- li.insertBefore( this.tabs[ index ] );
- }
-
- options.disabled = $.map( options.disabled, function( n ) {
- return n >= index ? ++n : n;
- });
-
- this.refresh();
- if ( this.tabs.length === 1 && options.active === false ) {
- this.option( "active", 0 );
- }
-
- this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) );
- return this;
- },
-
- remove: function( index ) {
- index = this._getIndex( index );
- var options = this.options,
- tab = this.tabs.eq( index ).remove(),
- panel = this._getPanelForTab( tab ).remove();
-
- // If selected tab was removed focus tab to the right or
- // in case the last tab was removed the tab to the left.
- // We check for more than 2 tabs, because if there are only 2,
- // then when we remove this tab, there will only be one tab left
- // so we don't need to detect which tab to activate.
- if ( tab.hasClass( "ui-tabs-active" ) && this.anchors.length > 2 ) {
- this._activate( index + ( index + 1 < this.anchors.length ? 1 : -1 ) );
- }
-
- options.disabled = $.map(
- $.grep( options.disabled, function( n ) {
- return n !== index;
- }),
- function( n ) {
- return n >= index ? --n : n;
- });
-
- this.refresh();
-
- this._trigger( "remove", null, this._ui( tab.find( "a" )[ 0 ], panel[ 0 ] ) );
- return this;
- }
- });
-
- // length method
- $.widget( "ui.tabs", $.ui.tabs, {
- length: function() {
- return this.anchors.length;
- }
- });
-
- // panel ids (idPrefix option + title attribute)
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- idPrefix: "ui-tabs-"
- },
-
- _tabId: function( tab ) {
- var a = tab.is( "li" ) ? tab.find( "a[href]" ) : tab;
- a = a[0];
- return $( a ).closest( "li" ).attr( "aria-controls" ) ||
- a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF\-]/g, "" ) ||
- this.options.idPrefix + getNextTabId();
- }
- });
-
- // _createPanel method
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- panelTemplate: "<div></div>"
- },
-
- _createPanel: function( id ) {
- return $( this.options.panelTemplate )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- }
- });
-
- // selected option
- $.widget( "ui.tabs", $.ui.tabs, {
- _create: function() {
- var options = this.options;
- if ( options.active === null && options.selected !== undefined ) {
- options.active = options.selected === -1 ? false : options.selected;
- }
- this._super();
- options.selected = options.active;
- if ( options.selected === false ) {
- options.selected = -1;
- }
- },
-
- _setOption: function( key, value ) {
- if ( key !== "selected" ) {
- return this._super( key, value );
- }
-
- var options = this.options;
- this._super( "active", value === -1 ? false : value );
- options.selected = options.active;
- if ( options.selected === false ) {
- options.selected = -1;
- }
- },
-
- _eventHandler: function() {
- this._superApply( arguments );
- this.options.selected = this.options.active;
- if ( this.options.selected === false ) {
- this.options.selected = -1;
- }
- }
- });
-
- // show and select event
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- show: null,
- select: null
- },
- _create: function() {
- this._super();
- if ( this.options.active !== false ) {
- this._trigger( "show", null, this._ui(
- this.active.find( ".ui-tabs-anchor" )[ 0 ],
- this._getPanelForTab( this.active )[ 0 ] ) );
- }
- },
- _trigger: function( type, event, data ) {
- var tab, panel,
- ret = this._superApply( arguments );
-
- if ( !ret ) {
- return false;
- }
-
- if ( type === "beforeActivate" ) {
- tab = data.newTab.length ? data.newTab : data.oldTab;
- panel = data.newPanel.length ? data.newPanel : data.oldPanel;
- ret = this._super( "select", event, {
- tab: tab.find( ".ui-tabs-anchor" )[ 0],
- panel: panel[ 0 ],
- index: tab.closest( "li" ).index()
- });
- } else if ( type === "activate" && data.newTab.length ) {
- ret = this._super( "show", event, {
- tab: data.newTab.find( ".ui-tabs-anchor" )[ 0 ],
- panel: data.newPanel[ 0 ],
- index: data.newTab.closest( "li" ).index()
- });
- }
- return ret;
- }
- });
-
- // select method
- $.widget( "ui.tabs", $.ui.tabs, {
- select: function( index ) {
- index = this._getIndex( index );
- if ( index === -1 ) {
- if ( this.options.collapsible && this.options.selected !== -1 ) {
- index = this.options.selected;
- } else {
- return;
- }
- }
- this.anchors.eq( index ).trigger( this.options.event + this.eventNamespace );
- }
- });
-
- // cookie option
- (function() {
-
- var listId = 0;
-
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
- },
- _create: function() {
- var options = this.options,
- active;
- if ( options.active == null && options.cookie ) {
- active = parseInt( this._cookie(), 10 );
- if ( active === -1 ) {
- active = false;
- }
- options.active = active;
- }
- this._super();
- },
- _cookie: function( active ) {
- var cookie = [ this.cookie ||
- ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ];
- if ( arguments.length ) {
- cookie.push( active === false ? -1 : active );
- cookie.push( this.options.cookie );
- }
- return $.cookie.apply( null, cookie );
- },
- _refresh: function() {
- this._super();
- if ( this.options.cookie ) {
- this._cookie( this.options.active, this.options.cookie );
- }
- },
- _eventHandler: function() {
- this._superApply( arguments );
- if ( this.options.cookie ) {
- this._cookie( this.options.active, this.options.cookie );
- }
- },
- _destroy: function() {
- this._super();
- if ( this.options.cookie ) {
- this._cookie( null, this.options.cookie );
- }
- }
- });
-
- })();
-
- // load event
- $.widget( "ui.tabs", $.ui.tabs, {
- _trigger: function( type, event, data ) {
- var _data = $.extend( {}, data );
- if ( type === "load" ) {
- _data.panel = _data.panel[ 0 ];
- _data.tab = _data.tab.find( ".ui-tabs-anchor" )[ 0 ];
- }
- return this._super( type, event, _data );
- }
- });
-
- // fx option
- // The new animation options (show, hide) conflict with the old show callback.
- // The old fx option wins over show/hide anyway (always favor back-compat).
- // If a user wants to use the new animation API, they must give up the old API.
- $.widget( "ui.tabs", $.ui.tabs, {
- options: {
- fx: null // e.g. { height: "toggle", opacity: "toggle", duration: 200 }
- },
-
- _getFx: function() {
- var hide, show,
- fx = this.options.fx;
-
- if ( fx ) {
- if ( $.isArray( fx ) ) {
- hide = fx[ 0 ];
- show = fx[ 1 ];
- } else {
- hide = show = fx;
- }
- }
-
- return fx ? { show: show, hide: hide } : null;
- },
-
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel,
- fx = this._getFx();
-
- if ( !fx ) {
- return this._super( event, eventData );
- }
-
- that.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && fx.show ) {
- toShow
- .animate( fx.show, fx.show.duration, function() {
- complete();
- });
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && fx.hide ) {
- toHide.animate( fx.hide, fx.hide.duration, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
- }
- });
-}
-
-})( jQuery );
-(function( $ ) {
-
-var increments = 0;
-
-function addDescribedBy( elem, id ) {
- var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
- describedby.push( id );
- elem
- .data( "ui-tooltip-id", id )
- .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
-}
-
-function removeDescribedBy( elem ) {
- var id = elem.data( "ui-tooltip-id" ),
- describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
- index = $.inArray( id, describedby );
- if ( index !== -1 ) {
- describedby.splice( index, 1 );
- }
-
- elem.removeData( "ui-tooltip-id" );
- describedby = $.trim( describedby.join( " " ) );
- if ( describedby ) {
- elem.attr( "aria-describedby", describedby );
- } else {
- elem.removeAttr( "aria-describedby" );
- }
-}
-
-$.widget( "ui.tooltip", {
- version: "1.9.2",
- options: {
- content: function() {
- return $( this ).attr( "title" );
- },
- hide: true,
- // Disabled elements have inconsistent behavior across browsers (#8661)
- items: "[title]:not([disabled])",
- position: {
- my: "left top+15",
- at: "left bottom",
- collision: "flipfit flip"
- },
- show: true,
- tooltipClass: null,
- track: false,
-
- // callbacks
- close: null,
- open: null
- },
-
- _create: function() {
- this._on({
- mouseover: "open",
- focusin: "open"
- });
-
- // IDs of generated tooltips, needed for destroy
- this.tooltips = {};
- // IDs of parent tooltips where we removed the title attribute
- this.parents = {};
-
- if ( this.options.disabled ) {
- this._disable();
- }
- },
-
- _setOption: function( key, value ) {
- var that = this;
-
- if ( key === "disabled" ) {
- this[ value ? "_disable" : "_enable" ]();
- this.options[ key ] = value;
- // disable element style changes
- return;
- }
-
- this._super( key, value );
-
- if ( key === "content" ) {
- $.each( this.tooltips, function( id, element ) {
- that._updateContent( element );
- });
- }
- },
-
- _disable: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
- });
-
- // remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).andSelf().each(function() {
- var element = $( this );
- if ( element.is( "[title]" ) ) {
- element
- .data( "ui-tooltip-title", element.attr( "title" ) )
- .attr( "title", "" );
- }
- });
- },
-
- _enable: function() {
- // restore title attributes
- this.element.find( this.options.items ).andSelf().each(function() {
- var element = $( this );
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- });
- },
-
- open: function( event ) {
- var that = this,
- target = $( event ? event.target : this.element )
- // we need closest here due to mouseover bubbling,
- // but always pointing at the same event target
- .closest( this.options.items );
-
- // No element to show a tooltip for or the tooltip is already open
- if ( !target.length || target.data( "ui-tooltip-id" ) ) {
- return;
- }
-
- if ( target.attr( "title" ) ) {
- target.data( "ui-tooltip-title", target.attr( "title" ) );
- }
-
- target.data( "ui-tooltip-open", true );
-
- // kill parent tooltips, custom or native, for hover
- if ( event && event.type === "mouseover" ) {
- target.parents().each(function() {
- var parent = $( this ),
- blurEvent;
- if ( parent.data( "ui-tooltip-open" ) ) {
- blurEvent = $.Event( "blur" );
- blurEvent.target = blurEvent.currentTarget = this;
- that.close( blurEvent, true );
- }
- if ( parent.attr( "title" ) ) {
- parent.uniqueId();
- that.parents[ this.id ] = {
- element: this,
- title: parent.attr( "title" )
- };
- parent.attr( "title", "" );
- }
- });
- }
-
- this._updateContent( target, event );
- },
-
- _updateContent: function( target, event ) {
- var content,
- contentOption = this.options.content,
- that = this,
- eventType = event ? event.type : null;
-
- if ( typeof contentOption === "string" ) {
- return this._open( event, target, contentOption );
- }
-
- content = contentOption.call( target[0], function( response ) {
- // ignore async response if tooltip was closed already
- if ( !target.data( "ui-tooltip-open" ) ) {
- return;
- }
- // IE may instantly serve a cached response for ajax requests
- // delay this call to _open so the other call to _open runs first
- that._delay(function() {
- // jQuery creates a special event for focusin when it doesn't
- // exist natively. To improve performance, the native event
- // object is reused and the type is changed. Therefore, we can't
- // rely on the type being correct after the event finished
- // bubbling, so we set it back to the previous value. (#8740)
- if ( event ) {
- event.type = eventType;
- }
- this._open( event, target, response );
- });
- });
- if ( content ) {
- this._open( event, target, content );
- }
- },
-
- _open: function( event, target, content ) {
- var tooltip, events, delayedShow,
- positionOption = $.extend( {}, this.options.position );
-
- if ( !content ) {
- return;
- }
-
- // Content can be updated multiple times. If the tooltip already
- // exists, then just update the content and bail.
- tooltip = this._find( target );
- if ( tooltip.length ) {
- tooltip.find( ".ui-tooltip-content" ).html( content );
- return;
- }
-
- // if we have a title, clear it to prevent the native tooltip
- // we have to check first to avoid defining a title if none exists
- // (we don't want to cause an element to start matching [title])
- //
- // We use removeAttr only for key events, to allow IE to export the correct
- // accessible attributes. For mouse events, set to empty string to avoid
- // native tooltip showing up (happens only when removing inside mouseover).
- if ( target.is( "[title]" ) ) {
- if ( event && event.type === "mouseover" ) {
- target.attr( "title", "" );
- } else {
- target.removeAttr( "title" );
- }
- }
-
- tooltip = this._tooltip( target );
- addDescribedBy( target, tooltip.attr( "id" ) );
- tooltip.find( ".ui-tooltip-content" ).html( content );
-
- function position( event ) {
- positionOption.of = event;
- if ( tooltip.is( ":hidden" ) ) {
- return;
- }
- tooltip.position( positionOption );
- }
- if ( this.options.track && event && /^mouse/.test( event.type ) ) {
- this._on( this.document, {
- mousemove: position
- });
- // trigger once to override element-relative positioning
- position( event );
- } else {
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) );
- }
-
- tooltip.hide();
-
- this._show( tooltip, this.options.show );
- // Handle tracking tooltips that are shown with a delay (#8644). As soon
- // as the tooltip is visible, position the tooltip using the most recent
- // event.
- if ( this.options.show && this.options.show.delay ) {
- delayedShow = setInterval(function() {
- if ( tooltip.is( ":visible" ) ) {
- position( positionOption.of );
- clearInterval( delayedShow );
- }
- }, $.fx.interval );
- }
-
- this._trigger( "open", event, { tooltip: tooltip } );
-
- events = {
- keyup: function( event ) {
- if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
- var fakeEvent = $.Event(event);
- fakeEvent.currentTarget = target[0];
- this.close( fakeEvent, true );
- }
- },
- remove: function() {
- this._removeTooltip( tooltip );
- }
- };
- if ( !event || event.type === "mouseover" ) {
- events.mouseleave = "close";
- }
- if ( !event || event.type === "focusin" ) {
- events.focusout = "close";
- }
- this._on( true, target, events );
- },
-
- close: function( event ) {
- var that = this,
- target = $( event ? event.currentTarget : this.element ),
- tooltip = this._find( target );
-
- // disabling closes the tooltip, so we need to track when we're closing
- // to avoid an infinite loop in case the tooltip becomes disabled on close
- if ( this.closing ) {
- return;
- }
-
- // only set title if we had one before (see comment in _open())
- if ( target.data( "ui-tooltip-title" ) ) {
- target.attr( "title", target.data( "ui-tooltip-title" ) );
- }
-
- removeDescribedBy( target );
-
- tooltip.stop( true );
- this._hide( tooltip, this.options.hide, function() {
- that._removeTooltip( $( this ) );
- });
-
- target.removeData( "ui-tooltip-open" );
- this._off( target, "mouseleave focusout keyup" );
- // Remove 'remove' binding only on delegated targets
- if ( target[0] !== this.element[0] ) {
- this._off( target, "remove" );
- }
- this._off( this.document, "mousemove" );
-
- if ( event && event.type === "mouseleave" ) {
- $.each( this.parents, function( id, parent ) {
- $( parent.element ).attr( "title", parent.title );
- delete that.parents[ id ];
- });
- }
-
- this.closing = true;
- this._trigger( "close", event, { tooltip: tooltip } );
- this.closing = false;
- },
-
- _tooltip: function( element ) {
- var id = "ui-tooltip-" + increments++,
- tooltip = $( "<div>" )
- .attr({
- id: id,
- role: "tooltip"
- })
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) );
- $( "<div>" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
- tooltip.appendTo( this.document[0].body );
- if ( $.fn.bgiframe ) {
- tooltip.bgiframe();
- }
- this.tooltips[ id ] = element;
- return tooltip;
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? $( "#" + id ) : $();
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, element ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" );
- event.target = event.currentTarget = element[0];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- element.removeData( "ui-tooltip-title" );
- }
- });
- }
-});
-
-}( jQuery ) ); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery.layout-latest.js b/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery.layout-latest.js
deleted file mode 100644
index 434724d9..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/layout/jquery.layout-latest.js
+++ /dev/null
@@ -1,6086 +0,0 @@
-/**
- * @preserve
- * jquery.layout 1.4.3
- * $Date: 2015/03/13 22:37:04 $
- * $Rev: 1.0403 $
- *
- * Copyright (c) 2014 Kevin Dalman (http://jquery-dev.com)
- * Based on work by Fabrizio Balliano (http://www.fabrizioballiano.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * SEE: http://layout.jquery-dev.com/LICENSE.txt
- *
- * Changelog: http://layout.jquery-dev.com/changelog.cfm
- *
- * Docs: http://layout.jquery-dev.com/documentation.html
- * Tips: http://layout.jquery-dev.com/tips.html
- * Help: http://groups.google.com/group/jquery-ui-layout
- */
-
-/* JavaDoc Info: http://code.google.com/closure/compiler/docs/js-for-compiler.html
- * {!Object} non-nullable type (never NULL)
- * {?string} nullable type (sometimes NULL) - default for {Object}
- * {number=} optional parameter
- * {*} ALL types
- */
-/* TODO for jQ 2.0
- * change .andSelf() to .addBack()
- * check $.fn.disableSelection - this is in jQuery UI 1.9.x
- */
-
-// NOTE: For best readability, view with a fixed-width font and tabs equal to 4-chars
-
-;(function ($) {
-
-// alias Math methods - used a lot!
-var min = Math.min
-, max = Math.max
-, round = Math.floor
-
-, isStr = function (v) { return $.type(v) === "string"; }
-
- /**
- * @param {!Object} Instance
- * @param {Array.<string>} a_fn
- */
-, runPluginCallbacks = function (Instance, a_fn) {
- if ($.isArray(a_fn))
- for (var i=0, c=a_fn.length; i<c; i++) {
- var fn = a_fn[i];
- try {
- if (isStr(fn)) // 'name' of a function
- fn = eval(fn);
- if ($.isFunction(fn))
- g(fn)( Instance );
- } catch (ex) {}
- }
- function g (f) { return f; }; // compiler hack
- }
-;
-
-/*
- * GENERIC $.layout METHODS - used by all layouts
- */
-$.layout = {
-
- version: "1.4.3"
-, revision: 1.0403 // eg: 1.4.1 final = 1.0401 - major(n+).minor(nn)+patch(nn+)
-
- // $.layout.browser REPLACES $.browser
-, browser: {} // set below
-
- // *PREDEFINED* EFFECTS & DEFAULTS
- // MUST list effect here - OR MUST set an fxSettings option (can be an empty hash: {})
-, effects: {
-
- // Pane Open/Close Animations
- slide: {
- all: { duration: "fast" } // eg: duration: 1000, easing: "easeOutBounce"
- , north: { direction: "up" }
- , south: { direction: "down" }
- , east: { direction: "right"}
- , west: { direction: "left" }
- }
- , drop: {
- all: { duration: "slow" }
- , north: { direction: "up" }
- , south: { direction: "down" }
- , east: { direction: "right"}
- , west: { direction: "left" }
- }
- , scale: {
- all: { duration: "fast" }
- }
- // these are not recommended, but can be used
- , blind: {}
- , clip: {}
- , explode: {}
- , fade: {}
- , fold: {}
- , puff: {}
-
- // Pane Resize Animations
- , size: {
- all: { easing: "swing" }
- }
- }
-
- // INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
-, config: {
- optionRootKeys: "effects,panes,north,south,west,east,center".split(",")
- , allPanes: "north,south,west,east,center".split(",")
- , borderPanes: "north,south,west,east".split(",")
- , oppositeEdge: {
- north: "south"
- , south: "north"
- , east: "west"
- , west: "east"
- }
- // offscreen data
- , offscreenCSS: { left: "-99999px", right: "auto" } // used by hide/close if useOffscreenClose=true
- , offscreenReset: "offscreenReset" // key used for data
- // CSS used in multiple places
- , hidden: { visibility: "hidden" }
- , visible: { visibility: "visible" }
- // layout element settings
- , resizers: {
- cssReq: {
- position: "absolute"
- , padding: 0
- , margin: 0
- , fontSize: "1px"
- , textAlign: "left" // to counter-act "center" alignment!
- , overflow: "hidden" // prevent toggler-button from overflowing
- // SEE $.layout.defaults.zIndexes.resizer_normal
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- background: "#DDD"
- , border: "none"
- }
- }
- , togglers: {
- cssReq: {
- position: "absolute"
- , display: "block"
- , padding: 0
- , margin: 0
- , overflow: "hidden"
- , textAlign: "center"
- , fontSize: "1px"
- , cursor: "pointer"
- , zIndex: 1
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- background: "#AAA"
- }
- }
- , content: {
- cssReq: {
- position: "relative" /* contain floated or positioned elements */
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- overflow: "auto"
- , padding: "10px"
- }
- , cssDemoPane: { // DEMO CSS - REMOVE scrolling from 'pane' when it has a content-div
- overflow: "hidden"
- , padding: 0
- }
- }
- , panes: { // defaults for ALL panes - overridden by 'per-pane settings' below
- cssReq: {
- position: "absolute"
- , margin: 0
- // $.layout.defaults.zIndexes.pane_normal
- }
- , cssDemo: { // DEMO CSS - applied if: options.PANE.applyDemoStyles=true
- padding: "10px"
- , background: "#FFF"
- , border: "1px solid #BBB"
- , overflow: "auto"
- }
- }
- , north: {
- side: "top"
- , sizeType: "Height"
- , dir: "horz"
- , cssReq: {
- top: 0
- , bottom: "auto"
- , left: 0
- , right: 0
- , width: "auto"
- // height: DYNAMIC
- }
- }
- , south: {
- side: "bottom"
- , sizeType: "Height"
- , dir: "horz"
- , cssReq: {
- top: "auto"
- , bottom: 0
- , left: 0
- , right: 0
- , width: "auto"
- // height: DYNAMIC
- }
- }
- , east: {
- side: "right"
- , sizeType: "Width"
- , dir: "vert"
- , cssReq: {
- left: "auto"
- , right: 0
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- // width: DYNAMIC
- }
- }
- , west: {
- side: "left"
- , sizeType: "Width"
- , dir: "vert"
- , cssReq: {
- left: 0
- , right: "auto"
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- // width: DYNAMIC
- }
- }
- , center: {
- dir: "center"
- , cssReq: {
- left: "auto" // DYNAMIC
- , right: "auto" // DYNAMIC
- , top: "auto" // DYNAMIC
- , bottom: "auto" // DYNAMIC
- , height: "auto"
- , width: "auto"
- }
- }
- }
-
- // CALLBACK FUNCTION NAMESPACE - used to store reusable callback functions
-, callbacks: {}
-
-, getParentPaneElem: function (el) {
- // must pass either a container or pane element
- var $el = $(el)
- , layout = $el.data("layout") || $el.data("parentLayout");
- if (layout) {
- var $cont = layout.container;
- // see if this container is directly-nested inside an outer-pane
- if ($cont.data("layoutPane")) return $cont;
- var $pane = $cont.closest("."+ $.layout.defaults.panes.paneClass);
- // if a pane was found, return it
- if ($pane.data("layoutPane")) return $pane;
- }
- return null;
- }
-
-, getParentPaneInstance: function (el) {
- // must pass either a container or pane element
- var $pane = $.layout.getParentPaneElem(el);
- return $pane ? $pane.data("layoutPane") : null;
- }
-
-, getParentLayoutInstance: function (el) {
- // must pass either a container or pane element
- var $pane = $.layout.getParentPaneElem(el);
- return $pane ? $pane.data("parentLayout") : null;
- }
-
-, getEventObject: function (evt) {
- return typeof evt === "object" && evt.stopPropagation ? evt : null;
- }
-, parsePaneName: function (evt_or_pane) {
- var evt = $.layout.getEventObject( evt_or_pane )
- , pane = evt_or_pane;
- if (evt) {
- // ALWAYS stop propagation of events triggered in Layout!
- evt.stopPropagation();
- pane = $(this).data("layoutEdge");
- }
- if (pane && !/^(west|east|north|south|center)$/.test(pane)) {
- $.layout.msg('LAYOUT ERROR - Invalid pane-name: "'+ pane +'"');
- pane = "error";
- }
- return pane;
- }
-
-
- // LAYOUT-PLUGIN REGISTRATION
- // more plugins can added beyond this default list
-, plugins: {
- draggable: !!$.fn.draggable // resizing
- , effects: {
- core: !!$.effects // animimations (specific effects tested by initOptions)
- , slide: $.effects && ($.effects.slide || ($.effects.effect && $.effects.effect.slide)) // default effect
- }
- }
-
-// arrays of plugin or other methods to be triggered for events in *each layout* - will be passed 'Instance'
-, onCreate: [] // runs when layout is just starting to be created - right after options are set
-, onLoad: [] // runs after layout container and global events init, but before initPanes is called
-, onReady: [] // runs after initialization *completes* - ie, after initPanes completes successfully
-, onDestroy: [] // runs after layout is destroyed
-, onUnload: [] // runs after layout is destroyed OR when page unloads
-, afterOpen: [] // runs after setAsOpen() completes
-, afterClose: [] // runs after setAsClosed() completes
-
- /*
- * GENERIC UTILITY METHODS
- */
-
- // calculate and return the scrollbar width, as an integer
-, scrollbarWidth: function () { return window.scrollbarWidth || $.layout.getScrollbarSize('width'); }
-, scrollbarHeight: function () { return window.scrollbarHeight || $.layout.getScrollbarSize('height'); }
-, getScrollbarSize: function (dim) {
- var $c = $('<div style="position: absolute; top: -10000px; left: -10000px; width: 100px; height: 100px; border: 0; overflow: scroll;"></div>').appendTo("body")
- , d = { width: $c.outerWidth - $c[0].clientWidth, height: 100 - $c[0].clientHeight };
- $c.remove();
- window.scrollbarWidth = d.width;
- window.scrollbarHeight = d.height;
- return dim.match(/^(width|height)$/) ? d[dim] : d;
- }
-
-
-, disableTextSelection: function () {
- var $d = $(document)
- , s = 'textSelectionDisabled'
- , x = 'textSelectionInitialized'
- ;
- if ($.fn.disableSelection) {
- if (!$d.data(x)) // document hasn't been initialized yet
- $d.on('mouseup', $.layout.enableTextSelection ).data(x, true);
- if (!$d.data(s))
- $d.disableSelection().data(s, true);
- }
- }
-, enableTextSelection: function () {
- var $d = $(document)
- , s = 'textSelectionDisabled';
- if ($.fn.enableSelection && $d.data(s))
- $d.enableSelection().data(s, false);
- }
-
-
- /**
- * Returns hash container 'display' and 'visibility'
- *
- * @see $.swap() - swaps CSS, runs callback, resets CSS
- * @param {!Object} $E jQuery element
- * @param {boolean=} [force=false] Run even if display != none
- * @return {!Object} Returns current style props, if applicable
- */
-, showInvisibly: function ($E, force) {
- if ($E && $E.length && (force || $E.css("display") === "none")) { // only if not *already hidden*
- var s = $E[0].style
- // save ONLY the 'style' props because that is what we must restore
- , CSS = { display: s.display || '', visibility: s.visibility || '' };
- // show element 'invisibly' so can be measured
- $E.css({ display: "block", visibility: "hidden" });
- return CSS;
- }
- return {};
- }
-
- /**
- * Returns data for setting size of an element (container or a pane).
- *
- * @see _create(), onWindowResize() for container, plus others for pane
- * @return JSON Returns a hash of all dimensions: top, bottom, left, right, outerWidth, innerHeight, etc
- */
-, getElementDimensions: function ($E, inset) {
- var
- // dimensions hash - start with current data IF passed
- d = { css: {}, inset: {} }
- , x = d.css // CSS hash
- , i = { bottom: 0 } // TEMP insets (bottom = complier hack)
- , N = $.layout.cssNum
- , R = Math.round
- , off = $E.offset()
- , b, p, ei // TEMP border, padding
- ;
- d.offsetLeft = off.left;
- d.offsetTop = off.top;
-
- if (!inset) inset = {}; // simplify logic below
-
- $.each("Left,Right,Top,Bottom".split(","), function (idx, e) { // e = edge
- b = x["border" + e] = $.layout.borderWidth($E, e);
- p = x["padding"+ e] = $.layout.cssNum($E, "padding"+e);
- ei = e.toLowerCase();
- d.inset[ei] = inset[ei] >= 0 ? inset[ei] : p; // any missing insetX value = paddingX
- i[ei] = d.inset[ei] + b; // total offset of content from outer side
- });
-
- x.width = R($E.width());
- x.height = R($E.height());
- x.top = N($E,"top",true);
- x.bottom = N($E,"bottom",true);
- x.left = N($E,"left",true);
- x.right = N($E,"right",true);
-
- d.outerWidth = R($E.outerWidth());
- d.outerHeight = R($E.outerHeight());
- // calc the TRUE inner-dimensions, even in quirks-mode!
- d.innerWidth = max(0, d.outerWidth - i.left - i.right);
- d.innerHeight = max(0, d.outerHeight - i.top - i.bottom);
- // layoutWidth/Height is used in calcs for manual resizing
- // layoutW/H only differs from innerW/H when in quirks-mode - then is like outerW/H
- d.layoutWidth = R($E.innerWidth());
- d.layoutHeight = R($E.innerHeight());
-
- //if ($E.prop('tagName') === 'BODY') { debugData( d, $E.prop('tagName') ); } // DEBUG
-
- //d.visible = $E.is(":visible");// && x.width > 0 && x.height > 0;
-
- return d;
- }
-
-, getElementStyles: function ($E, list) {
- var
- CSS = {}
- , style = $E[0].style
- , props = list.split(",")
- , sides = "Top,Bottom,Left,Right".split(",")
- , attrs = "Color,Style,Width".split(",")
- , p, s, a, i, j, k
- ;
- for (i=0; i < props.length; i++) {
- p = props[i];
- if (p.match(/(border|padding|margin)$/))
- for (j=0; j < 4; j++) {
- s = sides[j];
- if (p === "border")
- for (k=0; k < 3; k++) {
- a = attrs[k];
- CSS[p+s+a] = style[p+s+a];
- }
- else
- CSS[p+s] = style[p+s];
- }
- else
- CSS[p] = style[p];
- };
- return CSS
- }
-
- /**
- * Return the innerWidth for the current browser/doctype
- *
- * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {number=} outerWidth (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerWidth of the elem by subtracting padding and borders
- */
-, cssWidth: function ($E, outerWidth) {
- // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
- if (outerWidth <= 0) return 0;
-
- var lb = $.layout.browser
- , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
- , b = $.layout.borderWidth
- , n = $.layout.cssNum
- , W = outerWidth
- ;
- // strip border and/or padding from outerWidth to get CSS Width
- if (bs !== "border-box")
- W -= (b($E, "Left") + b($E, "Right"));
- if (bs === "content-box")
- W -= (n($E, "paddingLeft") + n($E, "paddingRight"));
- return max(0,W);
- }
-
- /**
- * Return the innerHeight for the current browser/doctype
- *
- * @see initPanes(), sizeMidPanes(), initHandles(), sizeHandles()
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {number=} outerHeight (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerHeight of the elem by subtracting padding and borders
- */
-, cssHeight: function ($E, outerHeight) {
- // a 'calculated' outerHeight can be passed so borders and/or padding are removed if needed
- if (outerHeight <= 0) return 0;
-
- var lb = $.layout.browser
- , bs = !lb.boxModel ? "border-box" : lb.boxSizing ? $E.css("boxSizing") : "content-box"
- , b = $.layout.borderWidth
- , n = $.layout.cssNum
- , H = outerHeight
- ;
- // strip border and/or padding from outerHeight to get CSS Height
- if (bs !== "border-box")
- H -= (b($E, "Top") + b($E, "Bottom"));
- if (bs === "content-box")
- H -= (n($E, "paddingTop") + n($E, "paddingBottom"));
- return max(0,H);
- }
-
- /**
- * Returns the 'current CSS numeric value' for a CSS property - 0 if property does not exist
- *
- * @see Called by many methods
- * @param {Array.<Object>} $E Must pass a jQuery object - first element is processed
- * @param {string} prop The name of the CSS property, eg: top, width, etc.
- * @param {boolean=} [allowAuto=false] true = return 'auto' if that is value; false = return 0
- * @return {(string|number)} Usually used to get an integer value for position (top, left) or size (height, width)
- */
-, cssNum: function ($E, prop, allowAuto) {
- if (!$E.jquery) $E = $($E);
- var CSS = $.layout.showInvisibly($E)
- , p = $.css($E[0], prop, true)
- , v = allowAuto && p=="auto" ? p : Math.round(parseFloat(p) || 0);
- $E.css( CSS ); // RESET
- return v;
- }
-
-, borderWidth: function (el, side) {
- if (el.jquery) el = el[0];
- var b = "border"+ side.substr(0,1).toUpperCase() + side.substr(1); // left => Left
- return $.css(el, b+"Style", true) === "none" ? 0 : Math.round(parseFloat($.css(el, b+"Width", true)) || 0);
- }
-
- /**
- * Mouse-tracking utility - FUTURE REFERENCE
- *
- * init: if (!window.mouse) {
- * window.mouse = { x: 0, y: 0 };
- * $(document).mousemove( $.layout.trackMouse );
- * }
- *
- * @param {Object} evt
- *
-, trackMouse: function (evt) {
- window.mouse = { x: evt.clientX, y: evt.clientY };
- }
- */
-
- /**
- * SUBROUTINE for preventPrematureSlideClose option
- *
- * @param {Object} evt
- * @param {Object=} el
- */
-, isMouseOverElem: function (evt, el) {
- var
- $E = $(el || this)
- , d = $E.offset()
- , T = d.top
- , L = d.left
- , R = L + $E.outerWidth()
- , B = T + $E.outerHeight()
- , x = evt.pageX // evt.clientX ?
- , y = evt.pageY // evt.clientY ?
- ;
- // if X & Y are < 0, probably means is over an open SELECT
- return ($.layout.browser.msie && x < 0 && y < 0) || ((x >= L && x <= R) && (y >= T && y <= B));
- }
-
- /**
- * Message/Logging Utility
- *
- * @example $.layout.msg("My message"); // log text
- * @example $.layout.msg("My message", true); // alert text
- * @example $.layout.msg({ foo: "bar" }, "Title"); // log hash-data, with custom title
- * @example $.layout.msg({ foo: "bar" }, true, "Title", { sort: false }); -OR-
- * @example $.layout.msg({ foo: "bar" }, "Title", { sort: false, display: true }); // alert hash-data
- *
- * @param {(Object|string)} info String message OR Hash/Array
- * @param {(Boolean|string|Object)=} [popup=false] True means alert-box - can be skipped
- * @param {(Object|string)=} [debugTitle=""] Title for Hash data - can be skipped
- * @param {Object=} [debugOpts] Extra options for debug output
- */
-, msg: function (info, popup, debugTitle, debugOpts) {
- if ($.isPlainObject(info) && window.debugData) {
- if (typeof popup === "string") {
- debugOpts = debugTitle;
- debugTitle = popup;
- }
- else if (typeof debugTitle === "object") {
- debugOpts = debugTitle;
- debugTitle = null;
- }
- var t = debugTitle || "log( <object> )"
- , o = $.extend({ sort: false, returnHTML: false, display: false }, debugOpts);
- if (popup === true || o.display)
- debugData( info, t, o );
- else if (window.console)
- console.log(debugData( info, t, o ));
- }
- else if (popup)
- alert(info);
- else if (window.console)
- console.log(info);
- else {
- var id = "#layoutLogger"
- , $l = $(id);
- if (!$l.length)
- $l = createLog();
- $l.children("ul").append('<li style="padding: 4px 10px; margin: 0; border-top: 1px solid #CCC;">'+ info.replace(/\</g,"&lt;").replace(/\>/g,"&gt;") +'</li>');
- }
-
- function createLog () {
- var pos = $.support.fixedPosition ? 'fixed' : 'absolute'
- , $e = $('<div id="layoutLogger" style="position: '+ pos +'; top: 5px; z-index: 999999; max-width: 25%; overflow: hidden; border: 1px solid #000; border-radius: 5px; background: #FBFBFB; box-shadow: 0 2px 10px rgba(0,0,0,0.3);">'
- + '<div style="font-size: 13px; font-weight: bold; padding: 5px 10px; background: #F6F6F6; border-radius: 5px 5px 0 0; cursor: move;">'
- + '<span style="float: right; padding-left: 7px; cursor: pointer;" title="Remove Console" onclick="$(this).closest(\'#layoutLogger\').remove()">X</span>Layout console.log</div>'
- + '<ul style="font-size: 13px; font-weight: none; list-style: none; margin: 0; padding: 0 0 2px;"></ul>'
- + '</div>'
- ).appendTo("body");
- $e.css('left', $(window).width() - $e.outerWidth() - 5)
- if ($.ui.draggable) $e.draggable({ handle: ':first-child' });
- return $e;
- };
- }
-
-};
-
-
-/*
- * $.layout.browser REPLACES removed $.browser, with extra data
- * Parsing code here adapted from jQuery 1.8 $.browse
- */
-(function(){
- var u = navigator.userAgent.toLowerCase()
- , m = /(chrome)[ \/]([\w.]+)/.exec( u )
- || /(webkit)[ \/]([\w.]+)/.exec( u )
- || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec( u )
- || /(msie) ([\w.]+)/.exec( u )
- || u.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec( u )
- || []
- , b = m[1] || ""
- , v = m[2] || 0
- , ie = b === "msie"
- , cm = document.compatMode
- , $s = $.support
- , bs = $s.boxSizing !== undefined ? $s.boxSizing : $s.boxSizingReliable
- , bm = !ie || !cm || cm === "CSS1Compat" || $s.boxModel || false
- , lb = $.layout.browser = {
- version: v
- , safari: b === "webkit" // webkit (NOT chrome) = safari
- , webkit: b === "chrome" // chrome = webkit
- , msie: ie
- , isIE6: ie && v == 6
- // ONLY IE reverts to old box-model - Note that compatMode was deprecated as of IE8
- , boxModel: bm
- , boxSizing: !!(typeof bs === "function" ? bs() : bs)
- };
- ;
- if (b) lb[b] = true; // set CURRENT browser
- /* OLD versions of jQuery only set $.support.boxModel after page is loaded
- * so if this is IE, use support.boxModel to test for quirks-mode (ONLY IE changes boxModel) */
- if (!bm && !cm) $(function(){ lb.boxModel = $s.boxModel; });
-})();
-
-
-// DEFAULT OPTIONS
-$.layout.defaults = {
-/*
- * LAYOUT & LAYOUT-CONTAINER OPTIONS
- * - none of these options are applicable to individual panes
- */
- name: "" // Not required, but useful for buttons and used for the state-cookie
-, containerClass: "ui-layout-container" // layout-container element
-, inset: null // custom container-inset values (override padding)
-, scrollToBookmarkOnLoad: true // after creating a layout, scroll to bookmark in URL (.../page.htm#myBookmark)
-, resizeWithWindow: true // bind thisLayout.resizeAll() to the window.resize event
-, resizeWithWindowDelay: 200 // delay calling resizeAll because makes window resizing very jerky
-, resizeWithWindowMaxDelay: 0 // 0 = none - force resize every XX ms while window is being resized
-, maskPanesEarly: false // true = create pane-masks on resizer.mouseDown instead of waiting for resizer.dragstart
-, onresizeall_start: null // CALLBACK when resizeAll() STARTS - NOT pane-specific
-, onresizeall_end: null // CALLBACK when resizeAll() ENDS - NOT pane-specific
-, onload_start: null // CALLBACK when Layout inits - after options initialized, but before elements
-, onload_end: null // CALLBACK when Layout inits - after EVERYTHING has been initialized
-, onunload_start: null // CALLBACK when Layout is destroyed OR onWindowUnload
-, onunload_end: null // CALLBACK when Layout is destroyed OR onWindowUnload
-, initPanes: true // false = DO NOT initialize the panes onLoad - will init later
-, showErrorMessages: true // enables fatal error messages to warn developers of common errors
-, showDebugMessages: false // display console-and-alert debug msgs - IF this Layout version _has_ debugging code!
-// Changing this zIndex value will cause other zIndex values to automatically change
-, zIndex: null // the PANE zIndex - resizers and masks will be +1
-// DO NOT CHANGE the zIndex values below unless you clearly understand their relationships
-, zIndexes: { // set _default_ z-index values here...
- pane_normal: 0 // normal z-index for panes
- , content_mask: 1 // applied to overlays used to mask content INSIDE panes during resizing
- , resizer_normal: 2 // normal z-index for resizer-bars
- , pane_sliding: 100 // applied to *BOTH* the pane and its resizer when a pane is 'slid open'
- , pane_animate: 1000 // applied to the pane when being animated - not applied to the resizer
- , resizer_drag: 10000 // applied to the CLONED resizer-bar when being 'dragged'
- }
-, errors: {
- pane: "pane" // description of "layout pane element" - used only in error messages
- , selector: "selector" // description of "jQuery-selector" - used only in error messages
- , addButtonError: "Error Adding Button\nInvalid "
- , containerMissing: "UI Layout Initialization Error\nThe specified layout-container does not exist."
- , centerPaneMissing: "UI Layout Initialization Error\nThe center-pane element does not exist.\nThe center-pane is a required element."
- , noContainerHeight: "UI Layout Initialization Warning\nThe layout-container \"CONTAINER\" has no height.\nTherefore the layout is 0-height and hence 'invisible'!"
- , callbackError: "UI Layout Callback Error\nThe EVENT callback is not a valid function."
- }
-/*
- * PANE DEFAULT SETTINGS
- * - settings under the 'panes' key become the default settings for *all panes*
- * - ALL pane-options can also be set specifically for each panes, which will override these 'default values'
- */
-, panes: { // default options for 'all panes' - will be overridden by 'per-pane settings'
- applyDemoStyles: false // NOTE: renamed from applyDefaultStyles for clarity
- , closable: true // pane can open & close
- , resizable: true // when open, pane can be resized
- , slidable: true // when closed, pane can 'slide open' over other panes - closes on mouse-out
- , initClosed: false // true = init pane as 'closed'
- , initHidden: false // true = init pane as 'hidden' - no resizer-bar/spacing
- // SELECTORS
- //, paneSelector: "" // MUST be pane-specific - jQuery selector for pane
- , contentSelector: ".ui-layout-content" // INNER div/element to auto-size so only it scrolls, not the entire pane!
- , contentIgnoreSelector: ".ui-layout-ignore" // element(s) to 'ignore' when measuring 'content'
- , findNestedContent: false // true = $P.find(contentSelector), false = $P.children(contentSelector)
- // GENERIC ROOT-CLASSES - for auto-generated classNames
- , paneClass: "ui-layout-pane" // Layout Pane
- , resizerClass: "ui-layout-resizer" // Resizer Bar
- , togglerClass: "ui-layout-toggler" // Toggler Button
- , buttonClass: "ui-layout-button" // CUSTOM Buttons - eg: '[ui-layout-button]-toggle/-open/-close/-pin'
- // ELEMENT SIZE & SPACING
- //, size: 100 // MUST be pane-specific -initial size of pane
- , minSize: 0 // when manually resizing a pane
- , maxSize: 0 // ditto, 0 = no limit
- , spacing_open: 6 // space between pane and adjacent panes - when pane is 'open'
- , spacing_closed: 6 // ditto - when pane is 'closed'
- , togglerLength_open: 50 // Length = WIDTH of toggler button on north/south sides - HEIGHT on east/west sides
- , togglerLength_closed: 50 // 100% OR -1 means 'full height/width of resizer bar' - 0 means 'hidden'
- , togglerAlign_open: "center" // top/left, bottom/right, center, OR...
- , togglerAlign_closed: "center" // 1 => nn = offset from top/left, -1 => -nn == offset from bottom/right
- , togglerContent_open: "" // text or HTML to put INSIDE the toggler
- , togglerContent_closed: "" // ditto
- // RESIZING OPTIONS
- , resizerDblClickToggle: true //
- , autoResize: true // IF size is 'auto' or a percentage, then recalc 'pixel size' whenever the layout resizes
- , autoReopen: true // IF a pane was auto-closed due to noRoom, reopen it when there is room? False = leave it closed
- , resizerDragOpacity: 1 // option for ui.draggable
- //, resizerCursor: "" // MUST be pane-specific - cursor when over resizer-bar
- , maskContents: false // true = add DIV-mask over-or-inside this pane so can 'drag' over IFRAMES
- , maskObjects: false // true = add IFRAME-mask over-or-inside this pane to cover objects/applets - content-mask will overlay this mask
- , maskZindex: null // will override zIndexes.content_mask if specified - not applicable to iframe-panes
- , resizingGrid: false // grid size that the resizers will snap-to during resizing, eg: [20,20]
- , livePaneResizing: false // true = LIVE Resizing as resizer is dragged
- , liveContentResizing: false // true = re-measure header/footer heights as resizer is dragged
- , liveResizingTolerance: 1 // how many px change before pane resizes, to control performance
- // SLIDING OPTIONS
- , sliderCursor: "pointer" // cursor when resizer-bar will trigger 'sliding'
- , slideTrigger_open: "click" // click, dblclick, mouseenter
- , slideTrigger_close: "mouseleave"// click, mouseleave
- , slideDelay_open: 300 // applies only for mouseenter event - 0 = instant open
- , slideDelay_close: 300 // applies only for mouseleave event (300ms is the minimum!)
- , hideTogglerOnSlide: false // when pane is slid-open, should the toggler show?
- , preventQuickSlideClose: $.layout.browser.webkit // Chrome triggers slideClosed as it is opening
- , preventPrematureSlideClose: false // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
- // PANE-SPECIFIC TIPS & MESSAGES
- , tips: {
- Open: "Open" // eg: "Open Pane"
- , Close: "Close"
- , Resize: "Resize"
- , Slide: "Slide Open"
- , Pin: "Pin"
- , Unpin: "Un-Pin"
- , noRoomToOpen: "Not enough room to show this panel." // alert if user tries to open a pane that cannot
- , minSizeWarning: "Panel has reached its minimum size" // displays in browser statusbar
- , maxSizeWarning: "Panel has reached its maximum size" // ditto
- }
- // HOT-KEYS & MISC
- , showOverflowOnHover: false // will bind allowOverflow() utility to pane.onMouseOver
- , enableCursorHotkey: true // enabled 'cursor' hotkeys
- //, customHotkey: "" // MUST be pane-specific - EITHER a charCode OR a character
- , customHotkeyModifier: "SHIFT" // either 'SHIFT', 'CTRL' or 'CTRL+SHIFT' - NOT 'ALT'
- // PANE ANIMATION
- // NOTE: fxSss_open, fxSss_close & fxSss_size options (eg: fxName_open) are auto-generated if not passed
- , fxName: "slide" // ('none' or blank), slide, drop, scale -- only relevant to 'open' & 'close', NOT 'size'
- , fxSpeed: null // slow, normal, fast, 200, nnn - if passed, will OVERRIDE fxSettings.duration
- , fxSettings: {} // can be passed, eg: { easing: "easeOutBounce", duration: 1500 }
- , fxOpacityFix: true // tries to fix opacity in IE to restore anti-aliasing after animation
- , animatePaneSizing: false // true = animate resizing after dragging resizer-bar OR sizePane() is called
- /* NOTE: Action-specific FX options are auto-generated from the options above if not specifically set:
- fxName_open: "slide" // 'Open' pane animation
- fnName_close: "slide" // 'Close' pane animation
- fxName_size: "slide" // 'Size' pane animation - when animatePaneSizing = true
- fxSpeed_open: null
- fxSpeed_close: null
- fxSpeed_size: null
- fxSettings_open: {}
- fxSettings_close: {}
- fxSettings_size: {}
- */
- // CHILD/NESTED LAYOUTS
- , children: null // Layout-options for nested/child layout - even {} is valid as options
- , containerSelector: '' // if child is NOT 'directly nested', a selector to find it/them (can have more than one child layout!)
- , initChildren: true // true = child layout will be created as soon as _this_ layout completes initialization
- , destroyChildren: true // true = destroy child-layout if this pane is destroyed
- , resizeChildren: true // true = trigger child-layout.resizeAll() when this pane is resized
- // EVENT TRIGGERING
- , triggerEventsOnLoad: false // true = trigger onopen OR onclose callbacks when layout initializes
- , triggerEventsDuringLiveResize: true // true = trigger onresize callback REPEATEDLY if livePaneResizing==true
- // PANE CALLBACKS
- , onshow_start: null // CALLBACK when pane STARTS to Show - BEFORE onopen/onhide_start
- , onshow_end: null // CALLBACK when pane ENDS being Shown - AFTER onopen/onhide_end
- , onhide_start: null // CALLBACK when pane STARTS to Close - BEFORE onclose_start
- , onhide_end: null // CALLBACK when pane ENDS being Closed - AFTER onclose_end
- , onopen_start: null // CALLBACK when pane STARTS to Open
- , onopen_end: null // CALLBACK when pane ENDS being Opened
- , onclose_start: null // CALLBACK when pane STARTS to Close
- , onclose_end: null // CALLBACK when pane ENDS being Closed
- , onresize_start: null // CALLBACK when pane STARTS being Resized ***FOR ANY REASON***
- , onresize_end: null // CALLBACK when pane ENDS being Resized ***FOR ANY REASON***
- , onsizecontent_start: null // CALLBACK when sizing of content-element STARTS
- , onsizecontent_end: null // CALLBACK when sizing of content-element ENDS
- , onswap_start: null // CALLBACK when pane STARTS to Swap
- , onswap_end: null // CALLBACK when pane ENDS being Swapped
- , ondrag_start: null // CALLBACK when pane STARTS being ***MANUALLY*** Resized
- , ondrag_end: null // CALLBACK when pane ENDS being ***MANUALLY*** Resized
- }
-/*
- * PANE-SPECIFIC SETTINGS
- * - options listed below MUST be specified per-pane - they CANNOT be set under 'panes'
- * - all options under the 'panes' key can also be set specifically for any pane
- * - most options under the 'panes' key apply only to 'border-panes' - NOT the the center-pane
- */
-, north: {
- paneSelector: ".ui-layout-north"
- , size: "auto" // eg: "auto", "30%", .30, 200
- , resizerCursor: "n-resize" // custom = url(myCursor.cur)
- , customHotkey: "" // EITHER a charCode (43) OR a character ("o")
- }
-, south: {
- paneSelector: ".ui-layout-south"
- , size: "50%"//"auto"
- , resizerCursor: "s-resize"
- , customHotkey: ""
- , initClosed: true
- }
-, east: {
- paneSelector: ".ui-layout-east"
- , size: "5%"//200
- , resizerCursor: "e-resize"
- , customHotkey: ""
- }
-, west: {
- paneSelector: ".ui-layout-west"
- , size: "70%" //200
- , resizerCursor: "w-resize"
- , customHotkey: ""
- , initClosed: true
- }
-, center: {
- paneSelector: ".ui-layout-center"
- , size: "30%"//"auto"
- , minWidth: 0
- , minHeight: 0
- }
-};
-
-$.layout.optionsMap = {
- // layout/global options - NOT pane-options
- layout: ("name,instanceKey,stateManagement,effects,inset,zIndexes,errors,"
- + "zIndex,scrollToBookmarkOnLoad,showErrorMessages,maskPanesEarly,"
- + "outset,resizeWithWindow,resizeWithWindowDelay,resizeWithWindowMaxDelay,"
- + "onresizeall,onresizeall_start,onresizeall_end,onload,onload_start,onload_end,onunload,onunload_start,onunload_end").split(",")
-// borderPanes: [ ALL options that are NOT specified as 'layout' ]
- // default.panes options that apply to the center-pane (most options apply _only_ to border-panes)
-, center: ("paneClass,contentSelector,contentIgnoreSelector,findNestedContent,applyDemoStyles,triggerEventsOnLoad,"
- + "showOverflowOnHover,maskContents,maskObjects,liveContentResizing,"
- + "containerSelector,children,initChildren,resizeChildren,destroyChildren,"
- + "onresize,onresize_start,onresize_end,onsizecontent,onsizecontent_start,onsizecontent_end").split(",")
- // options that MUST be specifically set 'per-pane' - CANNOT set in the panes (defaults) key
-, noDefault: ("paneSelector,resizerCursor,customHotkey").split(",")
-};
-
-/**
- * Processes options passed in converts flat-format data into subkey (JSON) format
- * In flat-format, subkeys are _currently_ separated with 2 underscores, like north__optName
- * Plugins may also call this method so they can transform their own data
- *
- * @param {!Object} hash Data/options passed by user - may be a single level or nested levels
- * @param {boolean=} [addKeys=false] Should the primary layout.options keys be added if they do not exist?
- * @return {Object} Returns hash of minWidth & minHeight
- */
-$.layout.transformData = function (hash, addKeys) {
- var json = addKeys ? { panes: {}, center: {} } : {} // init return object
- , branch, optKey, keys, key, val, i, c;
-
- if (typeof hash !== "object") return json; // no options passed
-
- // convert all 'flat-keys' to 'sub-key' format
- for (optKey in hash) {
- branch = json;
- val = hash[ optKey ];
- keys = optKey.split("__"); // eg: west__size or north__fxSettings__duration
- c = keys.length - 1;
- // convert underscore-delimited to subkeys
- for (i=0; i <= c; i++) {
- key = keys[i];
- if (i === c) { // last key = value
- if ($.isPlainObject( val ))
- branch[key] = $.layout.transformData( val ); // RECURSE
- else
- branch[key] = val;
- }
- else {
- if (!branch[key])
- branch[key] = {}; // create the subkey
- // recurse to sub-key for next loop - if not done
- branch = branch[key];
- }
- }
- }
- return json;
-};
-
-// INTERNAL CONFIG DATA - DO NOT CHANGE THIS!
-$.layout.backwardCompatibility = {
- // data used by renameOldOptions()
- map: {
- // OLD Option Name: NEW Option Name
- applyDefaultStyles: "applyDemoStyles"
- // CHILD/NESTED LAYOUTS
- , childOptions: "children"
- , initChildLayout: "initChildren"
- , destroyChildLayout: "destroyChildren"
- , resizeChildLayout: "resizeChildren"
- , resizeNestedLayout: "resizeChildren"
- // MISC Options
- , resizeWhileDragging: "livePaneResizing"
- , resizeContentWhileDragging: "liveContentResizing"
- , triggerEventsWhileDragging: "triggerEventsDuringLiveResize"
- , maskIframesOnResize: "maskContents"
- // STATE MANAGEMENT
- , useStateCookie: "stateManagement.enabled"
- , "cookie.autoLoad": "stateManagement.autoLoad"
- , "cookie.autoSave": "stateManagement.autoSave"
- , "cookie.keys": "stateManagement.stateKeys"
- , "cookie.name": "stateManagement.cookie.name"
- , "cookie.domain": "stateManagement.cookie.domain"
- , "cookie.path": "stateManagement.cookie.path"
- , "cookie.expires": "stateManagement.cookie.expires"
- , "cookie.secure": "stateManagement.cookie.secure"
- // OLD Language options
- , noRoomToOpenTip: "tips.noRoomToOpen"
- , togglerTip_open: "tips.Close" // open = Close
- , togglerTip_closed: "tips.Open" // closed = Open
- , resizerTip: "tips.Resize"
- , sliderTip: "tips.Slide"
- }
-
-/**
-* @param {Object} opts
-*/
-, renameOptions: function (opts) {
- var map = $.layout.backwardCompatibility.map
- , oldData, newData, value
- ;
- for (var itemPath in map) {
- oldData = getBranch( itemPath );
- value = oldData.branch[ oldData.key ];
- if (value !== undefined) {
- newData = getBranch( map[itemPath], true );
- newData.branch[ newData.key ] = value;
- delete oldData.branch[ oldData.key ];
- }
- }
-
- /**
- * @param {string} path
- * @param {boolean=} [create=false] Create path if does not exist
- */
- function getBranch (path, create) {
- var a = path.split(".") // split keys into array
- , c = a.length - 1
- , D = { branch: opts, key: a[c] } // init branch at top & set key (last item)
- , i = 0, k, undef;
- for (; i<c; i++) { // skip the last key (data)
- k = a[i];
- if (D.branch[ k ] == undefined) { // child-key does not exist
- if (create) {
- D.branch = D.branch[ k ] = {}; // create child-branch
- }
- else // can't go any farther
- D.branch = {}; // branch is undefined
- }
- else
- D.branch = D.branch[ k ]; // get child-branch
- }
- return D;
- };
- }
-
-/**
-* @param {Object} opts
-*/
-, renameAllOptions: function (opts) {
- var ren = $.layout.backwardCompatibility.renameOptions;
- // rename root (layout) options
- ren( opts );
- // rename 'defaults' to 'panes'
- if (opts.defaults) {
- if (typeof opts.panes !== "object")
- opts.panes = {};
- $.extend(true, opts.panes, opts.defaults);
- delete opts.defaults;
- }
- // rename options in the the options.panes key
- if (opts.panes) ren( opts.panes );
- // rename options inside *each pane key*, eg: options.west
- $.each($.layout.config.allPanes, function (i, pane) {
- if (opts[pane]) ren( opts[pane] );
- });
- return opts;
- }
-};
-
-
-
-
-/* ============================================================
- * BEGIN WIDGET: $( selector ).layout( {options} );
- * ============================================================
- */
-$.fn.layout = function (opts) {
- var
-
- // local aliases to global data
- browser = $.layout.browser
-, _c = $.layout.config
-
- // local aliases to utlity methods
-, cssW = $.layout.cssWidth
-, cssH = $.layout.cssHeight
-, elDims = $.layout.getElementDimensions
-, styles = $.layout.getElementStyles
-, evtObj = $.layout.getEventObject
-, evtPane = $.layout.parsePaneName
-
-/**
- * options - populated by initOptions()
- */
-, options = $.extend(true, {}, $.layout.defaults)
-, effects = options.effects = $.extend(true, {}, $.layout.effects)
-
-/**
- * layout-state object
- */
-, state = {
- // generate unique ID to use for event.namespace so can unbind only events added by 'this layout'
- id: "layout"+ $.now() // code uses alias: sID
- , initialized: false
- , paneResizing: false
- , panesSliding: {}
- , container: { // list all keys referenced in code to avoid compiler error msgs
- innerWidth: 0
- , innerHeight: 0
- , outerWidth: 0
- , outerHeight: 0
- , layoutWidth: 0
- , layoutHeight: 0
- }
- , north: { childIdx: 0 }
- , south: { childIdx: 0 }
- , east: { childIdx: 0 }
- , west: { childIdx: 0 }
- , center: { childIdx: 0 }
- }
-
-/**
- * parent/child-layout pointers
- */
-//, hasParentLayout = false - exists ONLY inside Instance so can be set externally
-, children = {
- north: null
- , south: null
- , east: null
- , west: null
- , center: null
- }
-
-/*
- * ###########################
- * INTERNAL HELPER FUNCTIONS
- * ###########################
- */
-
- /**
- * Manages all internal timers
- */
-, timer = {
- data: {}
- , set: function (s, fn, ms) { timer.clear(s); timer.data[s] = setTimeout(fn, ms); }
- , clear: function (s) { var t=timer.data; if (t[s]) {clearTimeout(t[s]); delete t[s];} }
- }
-
- /**
- * Alert or console.log a message - IF option is enabled.
- *
- * @param {(string|!Object)} msg Message (or debug-data) to display
- * @param {boolean=} [popup=false] True by default, means 'alert', false means use console.log
- * @param {boolean=} [debug=false] True means is a widget debugging message
- */
-, _log = function (msg, popup, debug) {
- var o = options;
- if ((o.showErrorMessages && !debug) || (debug && o.showDebugMessages))
- $.layout.msg( o.name +' / '+ msg, (popup !== false) );
- return false;
- }
-
- /**
- * Executes a Callback function after a trigger event, like resize, open or close
- *
- * @param {string} evtName Name of the layout callback, eg "onresize_start"
- * @param {(string|boolean)=} [pane=""] This is passed only so we can pass the 'pane object' to the callback
- * @param {(string|boolean)=} [skipBoundEvents=false] True = do not run events bound to the elements - only the callbacks set in options
- */
-, _runCallbacks = function (evtName, pane, skipBoundEvents) {
- var hasPane = pane && isStr(pane)
- , s = hasPane ? state[pane] : state
- , o = hasPane ? options[pane] : options
- , lName = options.name
- // names like onopen and onopen_end separate are interchangeable in options...
- , lng = evtName + (evtName.match(/_/) ? "" : "_end")
- , shrt = lng.match(/_end$/) ? lng.substr(0, lng.length - 4) : ""
- , fn = o[lng] || o[shrt]
- , retVal = "NC" // NC = No Callback
- , args = []
- , $P = hasPane ? $Ps[pane] : 0
- ;
- if (hasPane && !$P) // a pane is specified, but does not exist!
- return retVal;
- if ( !hasPane && $.type(pane) === "boolean" ) {
- skipBoundEvents = pane; // allow pane param to be skipped for Layout callback
- pane = "";
- }
-
- // first trigger the callback set in the options
- if (fn) {
- try {
- // convert function name (string) to function object
- if (isStr( fn )) {
- if (fn.match(/,/)) {
- // function name cannot contain a comma,
- // so must be a function name AND a parameter to pass
- args = fn.split(",")
- , fn = eval(args[0]);
- }
- else // just the name of an external function?
- fn = eval(fn);
- }
- // execute the callback, if exists
- if ($.isFunction( fn )) {
- if (args.length)
- retVal = g(fn)(args[1]); // pass the argument parsed from 'list'
- else if ( hasPane )
- // pass data: pane-name, pane-element, pane-state, pane-options, and layout-name
- retVal = g(fn)( pane, $Ps[pane], s, o, lName );
- else // must be a layout/container callback - pass suitable info
- retVal = g(fn)( Instance, s, o, lName );
- }
- }
- catch (ex) {
- _log( options.errors.callbackError.replace(/EVENT/, $.trim((pane || "") +" "+ lng)), false );
- if ($.type(ex) === "string" && string.length)
- _log("Exception: "+ ex, false );
- }
- }
-
- // trigger additional events bound directly to the pane
- if (!skipBoundEvents && retVal !== false) {
- if ( hasPane ) { // PANE events can be bound to each pane-elements
- o = options[pane];
- s = state[pane];
- $P.triggerHandler("layoutpane"+ lng, [ pane, $P, s, o, lName ]);
- if (shrt)
- $P.triggerHandler("layoutpane"+ shrt, [ pane, $P, s, o, lName ]);
- }
- else { // LAYOUT events can be bound to the container-element
- $N.triggerHandler("layout"+ lng, [ Instance, s, o, lName ]);
- if (shrt)
- $N.triggerHandler("layout"+ shrt, [ Instance, s, o, lName ]);
- }
- }
-
- // ALWAYS resizeChildren after an onresize_end event - even during initialization
- // IGNORE onsizecontent_end event because causes child-layouts to resize TWICE
- if (hasPane && evtName === "onresize_end") // BAD: || evtName === "onsizecontent_end"
- resizeChildren(pane+"", true); // compiler hack -force string
-
- return retVal;
-
- function g (f) { return f; }; // compiler hack
- }
-
-
- /**
- * cure iframe display issues in IE & other browsers
- */
-, _fixIframe = function (pane) {
- if (browser.mozilla) return; // skip FireFox - it auto-refreshes iframes onShow
- var $P = $Ps[pane];
- // if the 'pane' is an iframe, do it
- if (state[pane].tagName === "IFRAME")
- $P.css(_c.hidden).css(_c.visible);
- else // ditto for any iframes INSIDE the pane
- $P.find('IFRAME').css(_c.hidden).css(_c.visible);
- }
-
- /**
- * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
- * @param {number=} outerSize (optional) Can pass a width, allowing calculations BEFORE element is resized
- * @return {number} Returns the innerHeight/Width of el by subtracting padding and borders
- */
-, cssSize = function (pane, outerSize) {
- var fn = _c[pane].dir=="horz" ? cssH : cssW;
- return fn($Ps[pane], outerSize);
- }
-
- /**
- * @param {string} pane Can accept ONLY a 'pane' (east, west, etc)
- * @return {Object} Returns hash of minWidth & minHeight
- */
-, cssMinDims = function (pane) {
- // minWidth/Height means CSS width/height = 1px
- var $P = $Ps[pane]
- , dir = _c[pane].dir
- , d = {
- minWidth: 1001 - cssW($P, 1000)
- , minHeight: 1001 - cssH($P, 1000)
- }
- ;
- if (dir === "horz") d.minSize = d.minHeight;
- if (dir === "vert") d.minSize = d.minWidth;
- return d;
- }
-
- // TODO: see if these methods can be made more useful...
- // TODO: *maybe* return cssW/H from these so caller can use this info
-
- /**
- * @param {(string|!Object)} el
- * @param {number=} outerWidth
- * @param {boolean=} [autoHide=false]
- */
-, setOuterWidth = function (el, outerWidth, autoHide) {
- var $E = el, w;
- if (isStr(el)) $E = $Ps[el]; // west
- else if (!el.jquery) $E = $(el);
- w = cssW($E, outerWidth);
- $E.css({ width: w });
- if (w > 0) {
- if (autoHide && $E.data('autoHidden') && $E.innerHeight() > 0) {
- $E.show().data('autoHidden', false);
- if (!browser.mozilla) // FireFox refreshes iframes - IE does not
- // make hidden, then visible to 'refresh' display after animation
- $E.css(_c.hidden).css(_c.visible);
- }
- }
- else if (autoHide && !$E.data('autoHidden'))
- $E.hide().data('autoHidden', true);
- }
-
- /**
- * @param {(string|!Object)} el
- * @param {number=} outerHeight
- * @param {boolean=} [autoHide=false]
- */
-, setOuterHeight = function (el, outerHeight, autoHide) {
- var $E = el, h;
- if (isStr(el)) $E = $Ps[el]; // west
- else if (!el.jquery) $E = $(el);
- h = cssH($E, outerHeight);
- $E.css({ height: h, visibility: "visible" }); // may have been 'hidden' by sizeContent
- if (h > 0 && $E.innerWidth() > 0) {
- if (autoHide && $E.data('autoHidden')) {
- $E.show().data('autoHidden', false);
- if (!browser.mozilla) // FireFox refreshes iframes - IE does not
- $E.css(_c.hidden).css(_c.visible);
- }
- }
- else if (autoHide && !$E.data('autoHidden'))
- $E.hide().data('autoHidden', true);
- }
-
-
- /**
- * Converts any 'size' params to a pixel/integer size, if not already
- * If 'auto' or a decimal/percentage is passed as 'size', a pixel-size is calculated
- *
- /**
- * @param {string} pane
- * @param {(string|number)=} size
- * @param {string=} [dir]
- * @return {number}
- */
-, _parseSize = function (pane, size, dir) {
- if (!dir) dir = _c[pane].dir;
-
- if (isStr(size) && size.match(/%/))
- size = (size === '100%') ? -1 : parseInt(size, 10) / 100; // convert % to decimal
-
- if (size === 0)
- return 0;
- else if (size >= 1)
- return parseInt(size, 10);
-
- var o = options, avail = 0;
- if (dir=="horz") // north or south or center.minHeight
- avail = sC.innerHeight - ($Ps.north ? o.north.spacing_open : 0) - ($Ps.south ? o.south.spacing_open : 0);
- else if (dir=="vert") // east or west or center.minWidth
- avail = sC.innerWidth - ($Ps.west ? o.west.spacing_open : 0) - ($Ps.east ? o.east.spacing_open : 0);
-
- if (size === -1) // -1 == 100%
- return avail;
- else if (size > 0) // percentage, eg: .25
- return round(avail * size);
- else if (pane=="center")
- return 0;
- else { // size < 0 || size=='auto' || size==Missing || size==Invalid
- // auto-size the pane
- var dim = (dir === "horz" ? "height" : "width")
- , $P = $Ps[pane]
- , $C = dim === 'height' ? $Cs[pane] : false
- , vis = $.layout.showInvisibly($P) // show pane invisibly if hidden
- , szP = $P.css(dim) // SAVE current pane size
- , szC = $C ? $C.css(dim) : 0 // SAVE current content size
- ;
- $P.css(dim, "auto");
- if ($C) $C.css(dim, "auto");
- size = (dim === "height") ? $P.outerHeight() : $P.outerWidth(); // MEASURE
- $P.css(dim, szP).css(vis); // RESET size & visibility
- if ($C) $C.css(dim, szC);
- return size;
- }
- }
-
- /**
- * Calculates current 'size' (outer-width or outer-height) of a border-pane - optionally with 'pane-spacing' added
- *
- * @param {(string|!Object)} pane
- * @param {boolean=} [inclSpace=false]
- * @return {number} Returns EITHER Width for east/west panes OR Height for north/south panes
- */
-, getPaneSize = function (pane, inclSpace) {
- var
- $P = $Ps[pane]
- , o = options[pane]
- , s = state[pane]
- , oSp = (inclSpace ? o.spacing_open : 0)
- , cSp = (inclSpace ? o.spacing_closed : 0)
- ;
- if (!$P || s.isHidden)
- return 0;
- else if (s.isClosed || (s.isSliding && inclSpace))
- return cSp;
- else if (_c[pane].dir === "horz")
- return $P.outerHeight() + oSp;
- else // dir === "vert"
- return $P.outerWidth() + oSp;
- }
-
- /**
- * Calculate min/max pane dimensions and limits for resizing
- *
- * @param {string} pane
- * @param {boolean=} [slide=false]
- */
-, setSizeLimits = function (pane, slide) {
- if (!isInitialized()) return;
- var
- o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , dir = c.dir
- , type = c.sizeType.toLowerCase()
- , isSliding = (slide != undefined ? slide : s.isSliding) // only open() passes 'slide' param
- , $P = $Ps[pane]
- , paneSpacing = o.spacing_open
- // measure the pane on the *opposite side* from this pane
- , altPane = _c.oppositeEdge[pane]
- , altS = state[altPane]
- , $altP = $Ps[altPane]
- , altPaneSize = (!$altP || altS.isVisible===false || altS.isSliding ? 0 : (dir=="horz" ? $altP.outerHeight() : $altP.outerWidth()))
- , altPaneSpacing = ((!$altP || altS.isHidden ? 0 : options[altPane][ altS.isClosed !== false ? "spacing_closed" : "spacing_open" ]) || 0)
- // limitSize prevents this pane from 'overlapping' opposite pane
- , containerSize = (dir=="horz" ? sC.innerHeight : sC.innerWidth)
- , minCenterDims = cssMinDims("center")
- , minCenterSize = dir=="horz" ? max(options.center.minHeight, minCenterDims.minHeight) : max(options.center.minWidth, minCenterDims.minWidth)
- // if pane is 'sliding', then ignore center and alt-pane sizes - because 'overlays' them
- , limitSize = (containerSize - paneSpacing - (isSliding ? 0 : (_parseSize("center", minCenterSize, dir) + altPaneSize + altPaneSpacing)))
- , minSize = s.minSize = max( _parseSize(pane, o.minSize), cssMinDims(pane).minSize )
- , maxSize = s.maxSize = min( (o.maxSize ? _parseSize(pane, o.maxSize) : 100000), limitSize )
- , r = s.resizerPosition = {} // used to set resizing limits
- , top = sC.inset.top
- , left = sC.inset.left
- , W = sC.innerWidth
- , H = sC.innerHeight
- , rW = o.spacing_open // subtract resizer-width to get top/left position for south/east
- ;
- switch (pane) {
- case "north": r.min = top + minSize;
- r.max = top + maxSize;
- break;
- case "west": r.min = left + minSize;
- r.max = left + maxSize;
- break;
- case "south": r.min = top + H - maxSize - rW;
- r.max = top + H - minSize - rW;
- break;
- case "east": r.min = left + W - maxSize - rW;
- r.max = left + W - minSize - rW;
- break;
- };
- }
-
- /**
- * Returns data for setting the size/position of center pane. Also used to set Height for east/west panes
- *
- * @return JSON Returns a hash of all dimensions: top, bottom, left, right, (outer) width and (outer) height
- */
-, calcNewCenterPaneDims = function () {
- var d = {
- top: getPaneSize("north", true) // true = include 'spacing' value for pane
- , bottom: getPaneSize("south", true)
- , left: getPaneSize("west", true)
- , right: getPaneSize("east", true)
- , width: 0
- , height: 0
- };
-
- // NOTE: sC = state.container
- // calc center-pane outer dimensions
- d.width = sC.innerWidth - d.left - d.right; // outerWidth
- d.height = sC.innerHeight - d.bottom - d.top; // outerHeight
- // add the 'container border/padding' to get final positions relative to the container
- d.top += sC.inset.top;
- d.bottom += sC.inset.bottom;
- d.left += sC.inset.left;
- d.right += sC.inset.right;
-
- return d;
- }
-
-
- /**
- * @param {!Object} el
- * @param {boolean=} [allStates=false]
- */
-, getHoverClasses = function (el, allStates) {
- var
- $El = $(el)
- , type = $El.data("layoutRole")
- , pane = $El.data("layoutEdge")
- , o = options[pane]
- , root = o[type +"Class"]
- , _pane = "-"+ pane // eg: "-west"
- , _open = "-open"
- , _closed = "-closed"
- , _slide = "-sliding"
- , _hover = "-hover " // NOTE the trailing space
- , _state = $El.hasClass(root+_closed) ? _closed : _open
- , _alt = _state === _closed ? _open : _closed
- , classes = (root+_hover) + (root+_pane+_hover) + (root+_state+_hover) + (root+_pane+_state+_hover)
- ;
- if (allStates) // when 'removing' classes, also remove alternate-state classes
- classes += (root+_alt+_hover) + (root+_pane+_alt+_hover);
-
- if (type=="resizer" && $El.hasClass(root+_slide))
- classes += (root+_slide+_hover) + (root+_pane+_slide+_hover);
-
- return $.trim(classes);
- }
-, addHover = function (evt, el) {
- var $E = $(el || this);
- if (evt && $E.data("layoutRole") === "toggler")
- evt.stopPropagation(); // prevent triggering 'slide' on Resizer-bar
- $E.addClass( getHoverClasses($E) );
- }
-, removeHover = function (evt, el) {
- var $E = $(el || this);
- $E.removeClass( getHoverClasses($E, true) );
- }
-
-, onResizerEnter = function (evt) { // ALSO called by toggler.mouseenter
- var pane = $(this).data("layoutEdge")
- , s = state[pane]
- , $d = $(document)
- ;
- // ignore closed-panes and mouse moving back & forth over resizer!
- // also ignore if ANY pane is currently resizing
- if ( s.isResizing || state.paneResizing ) return;
-
- if (options.maskPanesEarly)
- showMasks( pane, { resizing: true });
- }
-, onResizerLeave = function (evt, el) {
- var e = el || this // el is only passed when called by the timer
- , pane = $(e).data("layoutEdge")
- , name = pane +"ResizerLeave"
- , $d = $(document)
- ;
- timer.clear(pane+"_openSlider"); // cancel slideOpen timer, if set
- timer.clear(name); // cancel enableSelection timer - may re/set below
- // this method calls itself on a timer because it needs to allow
- // enough time for dragging to kick-in and set the isResizing flag
- // dragging has a 100ms delay set, so this delay must be >100
- if (!el) // 1st call - mouseleave event
- timer.set(name, function(){ onResizerLeave(evt, e); }, 200);
- // if user is resizing, dragStop will reset everything, so skip it here
- else if (options.maskPanesEarly && !state.paneResizing) // 2nd call - by timer
- hideMasks();
- }
-
-/*
- * ###########################
- * INITIALIZATION METHODS
- * ###########################
- */
-
- /**
- * Initialize the layout - called automatically whenever an instance of layout is created
- *
- * @see none - triggered onInit
- * @return mixed true = fully initialized | false = panes not initialized (yet) | 'cancel' = abort
- */
-, _create = function () {
- // initialize config/options
- initOptions();
- var o = options
- , s = state;
-
- // TEMP state so isInitialized returns true during init process
- s.creatingLayout = true;
-
- // init plugins for this layout, if there are any (eg: stateManagement)
- runPluginCallbacks( Instance, $.layout.onCreate );
-
- // options & state have been initialized, so now run beforeLoad callback
- // onload will CANCEL layout creation if it returns false
- if (false === _runCallbacks("onload_start"))
- return 'cancel';
-
- // initialize the container element
- _initContainer();
-
- // bind hotkey function - keyDown - if required
- initHotkeys();
-
- // bind window.onunload
- $(window).bind("unload."+ sID, unload);
-
- // init plugins for this layout, if there are any (eg: customButtons)
- runPluginCallbacks( Instance, $.layout.onLoad );
-
- // if layout elements are hidden, then layout WILL NOT complete initialization!
- // initLayoutElements will set initialized=true and run the onload callback IF successful
- if (o.initPanes) _initLayoutElements();
-
- delete s.creatingLayout;
-
- return state.initialized;
- }
-
- /**
- * Initialize the layout IF not already
- *
- * @see All methods in Instance run this test
- * @return boolean true = layoutElements have been initialized | false = panes are not initialized (yet)
- */
-, isInitialized = function () {
- if (state.initialized || state.creatingLayout) return true; // already initialized
- else return _initLayoutElements(); // try to init panes NOW
- }
-
- /**
- * Initialize the layout - called automatically whenever an instance of layout is created
- *
- * @see _create() & isInitialized
- * @param {boolean=} [retry=false] // indicates this is a 2nd try
- * @return An object pointer to the instance created
- */
-, _initLayoutElements = function (retry) {
- // initialize config/options
- var o = options;
- // CANNOT init panes inside a hidden container!
- if (!$N.is(":visible")) {
- // handle Chrome bug where popup window 'has no height'
- // if layout is BODY element, try again in 50ms
- // SEE: http://layout.jquery-dev.com/samples/test_popup_window.html
- if ( !retry && browser.webkit && $N[0].tagName === "BODY" )
- setTimeout(function(){ _initLayoutElements(true); }, 50);
- return false;
- }
-
- // a center pane is required, so make sure it exists
- if (!getPane("center").length) {
- return _log( o.errors.centerPaneMissing );
- }
-
- // TEMP state so isInitialized returns true during init process
- state.creatingLayout = true;
-
- // update Container dims
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
-
- // initialize all layout elements
- initPanes(); // size & position panes - calls initHandles() - which calls initResizable()
-
- if (o.scrollToBookmarkOnLoad) {
- var l = self.location;
- if (l.hash) l.replace( l.hash ); // scrollTo Bookmark
- }
-
- // check to see if this layout 'nested' inside a pane
- if (Instance.hasParentLayout)
- o.resizeWithWindow = false;
- // bind resizeAll() for 'this layout instance' to window.resize event
- else if (o.resizeWithWindow)
- $(window).bind("resize."+ sID, windowResize);
-
- delete state.creatingLayout;
- state.initialized = true;
-
- // init plugins for this layout, if there are any
- runPluginCallbacks( Instance, $.layout.onReady );
-
- // now run the onload callback, if exists
- _runCallbacks("onload_end");
-
- return true; // elements initialized successfully
- }
-
- /**
- * Initialize nested layouts for a specific pane - can optionally pass layout-options
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {Object=} [opts] Layout-options - if passed, will OVERRRIDE options[pane].children
- * @return An object pointer to the layout instance created - or null
- */
-, createChildren = function (evt_or_pane, opts) {
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- ;
- if (!$P) return;
- var $C = $Cs[pane]
- , s = state[pane]
- , o = options[pane]
- , sm = options.stateManagement || {}
- , cos = opts ? (o.children = opts) : o.children
- ;
- if ( $.isPlainObject( cos ) )
- cos = [ cos ]; // convert a hash to a 1-elem array
- else if (!cos || !$.isArray( cos ))
- return;
-
- $.each( cos, function (idx, co) {
- if ( !$.isPlainObject( co ) ) return;
-
- // determine which element is supposed to be the 'child container'
- // if pane has a 'containerSelector' OR a 'content-div', use those instead of the pane
- var $containers = co.containerSelector ? $P.find( co.containerSelector ) : ($C || $P);
-
- $containers.each(function(){
- var $cont = $(this)
- , child = $cont.data("layout") // see if a child-layout ALREADY exists on this element
- ;
- // if no layout exists, but children are set, try to create the layout now
- if (!child) {
- // TODO: see about moving this to the stateManagement plugin, as a method
- // set a unique child-instance key for this layout, if not already set
- setInstanceKey({ container: $cont, options: co }, s );
- // If THIS layout has a hash in stateManagement.autoLoad,
- // then see if it also contains state-data for this child-layout
- // If so, copy the stateData to child.options.stateManagement.autoLoad
- if ( sm.includeChildren && state.stateData[pane] ) {
- // THIS layout's state was cached when its state was loaded
- var paneChildren = state.stateData[pane].children || {}
- , childState = paneChildren[ co.instanceKey ]
- , co_sm = co.stateManagement || (co.stateManagement = { autoLoad: true })
- ;
- // COPY the stateData into the autoLoad key
- if ( co_sm.autoLoad === true && childState ) {
- co_sm.autoSave = false; // disable autoSave because saving handled by parent-layout
- co_sm.includeChildren = true; // cascade option - FOR NOW
- co_sm.autoLoad = $.extend(true, {}, childState); // COPY the state-hash
- }
- }
-
- // create the layout
- child = $cont.layout( co );
-
- // if successful, update data
- if (child) {
- // add the child and update all layout-pointers
- // MAY have already been done by child-layout calling parent.refreshChildren()
- refreshChildren( pane, child );
- }
- }
- });
- });
- }
-
-, setInstanceKey = function (child, parentPaneState) {
- // create a named key for use in state and instance branches
- var $c = child.container
- , o = child.options
- , sm = o.stateManagement
- , key = o.instanceKey || $c.data("layoutInstanceKey")
- ;
- if (!key) key = (sm && sm.cookie ? sm.cookie.name : '') || o.name; // look for a name/key
- if (!key) key = "layout"+ (++parentPaneState.childIdx); // if no name/key found, generate one
- else key = key.replace(/[^\w-]/gi, '_').replace(/_{2,}/g, '_'); // ensure is valid as a hash key
- o.instanceKey = key;
- $c.data("layoutInstanceKey", key); // useful if layout is destroyed and then recreated
- return key;
- }
-
- /**
- * @param {string} pane The pane being opened, ie: north, south, east, or west
- * @param {Object=} newChild New child-layout Instance to add to this pane
- */
-, refreshChildren = function (pane, newChild) {
- var $P = $Ps[pane]
- , pC = children[pane]
- , s = state[pane]
- , o
- ;
- // check for destroy()ed layouts and update the child pointers & arrays
- if ($.isPlainObject( pC )) {
- $.each( pC, function (key, child) {
- if (child.destroyed) delete pC[key]
- });
- // if no more children, remove the children hash
- if ($.isEmptyObject( pC ))
- pC = children[pane] = null; // clear children hash
- }
-
- // see if there is a directly-nested layout inside this pane
- // if there is, then there can be only ONE child-layout, so check that...
- if (!newChild && !pC) {
- newChild = $P.data("layout");
- }
-
- // if a newChild instance was passed, add it to children[pane]
- if (newChild) {
- // update child.state
- newChild.hasParentLayout = true; // set parent-flag in child
- // instanceKey is a key-name used in both state and children
- o = newChild.options;
- // set a unique child-instance key for this layout, if not already set
- setInstanceKey( newChild, s );
- // add pointer to pane.children hash
- if (!pC) pC = children[pane] = {}; // create an empty children hash
- pC[ o.instanceKey ] = newChild.container.data("layout"); // add childLayout instance
- }
-
- // ALWAYS refresh the pane.children alias, even if null
- Instance[pane].children = children[pane];
-
- // if newChild was NOT passed - see if there is a child layout NOW
- if (!newChild) {
- createChildren(pane); // MAY create a child and re-call this method
- }
- }
-
-, windowResize = function () {
- var o = options
- , delay = Number(o.resizeWithWindowDelay);
- if (delay < 10) delay = 100; // MUST have a delay!
- // resizing uses a delay-loop because the resize event fires repeatly - except in FF, but delay anyway
- timer.clear("winResize"); // if already running
- timer.set("winResize", function(){
- timer.clear("winResize");
- timer.clear("winResizeRepeater");
- var dims = elDims( $N, o.inset );
- // only trigger resizeAll() if container has changed size
- if (dims.innerWidth !== sC.innerWidth || dims.innerHeight !== sC.innerHeight)
- resizeAll();
- }, delay);
- // ALSO set fixed-delay timer, if not already running
- if (!timer.data["winResizeRepeater"]) setWindowResizeRepeater();
- }
-
-, setWindowResizeRepeater = function () {
- var delay = Number(options.resizeWithWindowMaxDelay);
- if (delay > 0)
- timer.set("winResizeRepeater", function(){ setWindowResizeRepeater(); resizeAll(); }, delay);
- }
-
-, unload = function () {
- var o = options;
-
- _runCallbacks("onunload_start");
-
- // trigger plugin callabacks for this layout (eg: stateManagement)
- runPluginCallbacks( Instance, $.layout.onUnload );
-
- _runCallbacks("onunload_end");
- }
-
- /**
- * Validate and initialize container CSS and events
- *
- * @see _create()
- */
-, _initContainer = function () {
- var
- N = $N[0]
- , $H = $("html")
- , tag = sC.tagName = N.tagName
- , id = sC.id = N.id
- , cls = sC.className = N.className
- , o = options
- , name = o.name
- , props = "position,margin,padding,border"
- , css = "layoutCSS"
- , CSS = {}
- , hid = "hidden" // used A LOT!
- // see if this container is a 'pane' inside an outer-layout
- , parent = $N.data("parentLayout") // parent-layout Instance
- , pane = $N.data("layoutEdge") // pane-name in parent-layout
- , isChild = parent && pane
- , num = $.layout.cssNum
- , $parent, n
- ;
- // sC = state.container
- sC.selector = $N.selector.split(".slice")[0];
- sC.ref = (o.name ? o.name +' layout / ' : '') + tag + (id ? "#"+id : cls ? '.['+cls+']' : ''); // used in messages
- sC.isBody = (tag === "BODY");
-
- // try to find a parent-layout
- if (!isChild && !sC.isBody) {
- $parent = $N.closest("."+ $.layout.defaults.panes.paneClass);
- parent = $parent.data("parentLayout");
- pane = $parent.data("layoutEdge");
- isChild = parent && pane;
- }
-
- $N .data({
- layout: Instance
- , layoutContainer: sID // FLAG to indicate this is a layout-container - contains unique internal ID
- })
- .addClass(o.containerClass)
- ;
- var layoutMethods = {
- destroy: ''
- , initPanes: ''
- , resizeAll: 'resizeAll'
- , resize: 'resizeAll'
- };
- // loop hash and bind all methods - include layoutID namespacing
- for (name in layoutMethods) {
- $N.bind("layout"+ name.toLowerCase() +"."+ sID, Instance[ layoutMethods[name] || name ]);
- }
-
- // if this container is another layout's 'pane', then set child/parent pointers
- if (isChild) {
- // update parent flag
- Instance.hasParentLayout = true;
- // set pointers to THIS child-layout (Instance) in parent-layout
- parent.refreshChildren( pane, Instance );
- }
-
- // SAVE original container CSS for use in destroy()
- if (!$N.data(css)) {
- // handle props like overflow different for BODY & HTML - has 'system default' values
- if (sC.isBody) {
- // SAVE <BODY> CSS
- $N.data(css, $.extend( styles($N, props), {
- height: $N.css("height")
- , overflow: $N.css("overflow")
- , overflowX: $N.css("overflowX")
- , overflowY: $N.css("overflowY")
- }));
- // ALSO SAVE <HTML> CSS
- $H.data(css, $.extend( styles($H, 'padding'), {
- height: "auto" // FF would return a fixed px-size!
- , overflow: $H.css("overflow")
- , overflowX: $H.css("overflowX")
- , overflowY: $H.css("overflowY")
- }));
- }
- else // handle props normally for non-body elements
- $N.data(css, styles($N, props+",top,bottom,left,right,width,height,overflow,overflowX,overflowY") );
- }
-
- try {
- // common container CSS
- CSS = {
- overflow: hid
- , overflowX: hid
- , overflowY: hid
- };
- $N.css( CSS );
-
- if (o.inset && !$.isPlainObject(o.inset)) {
- // can specify a single number for equal outset all-around
- n = parseInt(o.inset, 10) || 0
- o.inset = {
- top: n
- , bottom: n
- , left: n
- , right: n
- };
- }
-
- // format html & body if this is a full page layout
- if (sC.isBody) {
- // if HTML has padding, use this as an outer-spacing around BODY
- if (!o.outset) {
- // use padding from parent-elem (HTML) as outset
- o.outset = {
- top: num($H, "paddingTop")
- , bottom: num($H, "paddingBottom")
- , left: num($H, "paddingLeft")
- , right: num($H, "paddingRight")
- };
- }
- else if (!$.isPlainObject(o.outset)) {
- // can specify a single number for equal outset all-around
- n = parseInt(o.outset, 10) || 0
- o.outset = {
- top: n
- , bottom: n
- , left: n
- , right: n
- };
- }
- // HTML
- $H.css( CSS ).css({
- height: "100%"
- , border: "none" // no border or padding allowed when using height = 100%
- , padding: 0 // ditto
- , margin: 0
- });
- // BODY
- if (browser.isIE6) {
- // IE6 CANNOT use the trick of setting absolute positioning on all 4 sides - must have 'height'
- $N.css({
- width: "100%"
- , height: "100%"
- , border: "none" // no border or padding allowed when using height = 100%
- , padding: 0 // ditto
- , margin: 0
- , position: "relative"
- });
- // convert body padding to an inset option - the border cannot be measured in IE6!
- if (!o.inset) o.inset = elDims( $N ).inset;
- }
- else { // use absolute positioning for BODY to allow borders & padding without overflow
- $N.css({
- width: "auto"
- , height: "auto"
- , margin: 0
- , position: "absolute" // allows for border and padding on BODY
- });
- // apply edge-positioning created above
- $N.css( o.outset );
- }
- // set current layout-container dimensions
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT include insetX values
- }
- else {
- // container MUST have 'position'
- var p = $N.css("position");
- if (!p || !p.match(/(fixed|absolute|relative)/))
- $N.css("position","relative");
-
- // set current layout-container dimensions
- if ( $N.is(":visible") ) {
- $.extend(sC, elDims( $N, o.inset )); // passing inset means DO NOT change insetX (padding) values
- if (sC.innerHeight < 1) // container has no 'height' - warn developer
- _log( o.errors.noContainerHeight.replace(/CONTAINER/, sC.ref) );
- }
- }
-
- // if container has min-width/height, then enable scrollbar(s)
- if ( num($N, "minWidth") ) $N.parent().css("overflowX","auto");
- if ( num($N, "minHeight") ) $N.parent().css("overflowY","auto");
-
- } catch (ex) {}
- }
-
- /**
- * Bind layout hotkeys - if options enabled
- *
- * @see _create() and addPane()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initHotkeys = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
- // bind keyDown to capture hotkeys, if option enabled for ANY pane
- $.each(panes, function (i, pane) {
- var o = options[pane];
- if (o.enableCursorHotkey || o.customHotkey) {
- $(document).bind("keydown."+ sID, keyDown); // only need to bind this ONCE
- return false; // BREAK - binding was done
- }
- });
- }
-
- /**
- * Build final OPTIONS data
- *
- * @see _create()
- */
-, initOptions = function () {
- var data, d, pane, key, val, i, c, o;
-
- // reprocess user's layout-options to have correct options sub-key structure
- opts = $.layout.transformData( opts, true ); // panes = default subkey
-
- // auto-rename old options for backward compatibility
- opts = $.layout.backwardCompatibility.renameAllOptions( opts );
-
- // if user-options has 'panes' key (pane-defaults), clean it...
- if (!$.isEmptyObject(opts.panes)) {
- // REMOVE any pane-defaults that MUST be set per-pane
- data = $.layout.optionsMap.noDefault;
- for (i=0, c=data.length; i<c; i++) {
- key = data[i];
- delete opts.panes[key]; // OK if does not exist
- }
- // REMOVE any layout-options specified under opts.panes
- data = $.layout.optionsMap.layout;
- for (i=0, c=data.length; i<c; i++) {
- key = data[i];
- delete opts.panes[key]; // OK if does not exist
- }
- }
-
- // MOVE any NON-layout-options from opts-root to opts.panes
- data = $.layout.optionsMap.layout;
- var rootKeys = $.layout.config.optionRootKeys;
- for (key in opts) {
- val = opts[key];
- if ($.inArray(key, rootKeys) < 0 && $.inArray(key, data) < 0) {
- if (!opts.panes[key])
- opts.panes[key] = $.isPlainObject(val) ? $.extend(true, {}, val) : val;
- delete opts[key]
- }
- }
-
- // START by updating ALL options from opts
- $.extend(true, options, opts);
-
- // CREATE final options (and config) for EACH pane
- $.each(_c.allPanes, function (i, pane) {
-
- // apply 'pane-defaults' to CONFIG.[PANE]
- _c[pane] = $.extend(true, {}, _c.panes, _c[pane]);
-
- d = options.panes;
- o = options[pane];
-
- // center-pane uses SOME keys in defaults.panes branch
- if (pane === 'center') {
- // ONLY copy keys from opts.panes listed in: $.layout.optionsMap.center
- data = $.layout.optionsMap.center; // list of 'center-pane keys'
- for (i=0, c=data.length; i<c; i++) { // loop the list...
- key = data[i];
- // only need to use pane-default if pane-specific value not set
- if (!opts.center[key] && (opts.panes[key] || !o[key]))
- o[key] = d[key]; // pane-default
- }
- }
- else {
- // border-panes use ALL keys in defaults.panes branch
- o = options[pane] = $.extend(true, {}, d, o); // re-apply pane-specific opts AFTER pane-defaults
- createFxOptions( pane );
- // ensure all border-pane-specific base-classes exist
- if (!o.resizerClass) o.resizerClass = "ui-layout-resizer";
- if (!o.togglerClass) o.togglerClass = "ui-layout-toggler";
- }
- // ensure we have base pane-class (ALL panes)
- if (!o.paneClass) o.paneClass = "ui-layout-pane";
- });
-
- // update options.zIndexes if a zIndex-option specified
- var zo = opts.zIndex
- , z = options.zIndexes;
- if (zo > 0) {
- z.pane_normal = zo;
- z.content_mask = max(zo+1, z.content_mask); // MIN = +1
- z.resizer_normal = max(zo+2, z.resizer_normal); // MIN = +2
- }
-
- // DELETE 'panes' key now that we are done - values were copied to EACH pane
- delete options.panes;
-
-
- function createFxOptions ( pane ) {
- var o = options[pane]
- , d = options.panes;
- // ensure fxSettings key to avoid errors
- if (!o.fxSettings) o.fxSettings = {};
- if (!d.fxSettings) d.fxSettings = {};
-
- $.each(["_open","_close","_size"], function (i,n) {
- var
- sName = "fxName"+ n
- , sSpeed = "fxSpeed"+ n
- , sSettings = "fxSettings"+ n
- // recalculate fxName according to specificity rules
- , fxName = o[sName] =
- o[sName] // options.west.fxName_open
- || d[sName] // options.panes.fxName_open
- || o.fxName // options.west.fxName
- || d.fxName // options.panes.fxName
- || "none" // MEANS $.layout.defaults.panes.fxName == "" || false || null || 0
- , fxExists = $.effects && ($.effects[fxName] || ($.effects.effect && $.effects.effect[fxName]))
- ;
- // validate fxName to ensure is valid effect - MUST have effect-config data in options.effects
- if (fxName === "none" || !options.effects[fxName] || !fxExists)
- fxName = o[sName] = "none"; // effect not loaded OR unrecognized fxName
-
- // set vars for effects subkeys to simplify logic
- var fx = options.effects[fxName] || {} // effects.slide
- , fx_all = fx.all || null // effects.slide.all
- , fx_pane = fx[pane] || null // effects.slide.west
- ;
- // create fxSpeed[_open|_close|_size]
- o[sSpeed] =
- o[sSpeed] // options.west.fxSpeed_open
- || d[sSpeed] // options.west.fxSpeed_open
- || o.fxSpeed // options.west.fxSpeed
- || d.fxSpeed // options.panes.fxSpeed
- || null // DEFAULT - let fxSetting.duration control speed
- ;
- // create fxSettings[_open|_close|_size]
- o[sSettings] = $.extend(
- true
- , {}
- , fx_all // effects.slide.all
- , fx_pane // effects.slide.west
- , d.fxSettings // options.panes.fxSettings
- , o.fxSettings // options.west.fxSettings
- , d[sSettings] // options.panes.fxSettings_open
- , o[sSettings] // options.west.fxSettings_open
- );
- });
-
- // DONE creating action-specific-settings for this pane,
- // so DELETE generic options - are no longer meaningful
- delete o.fxName;
- delete o.fxSpeed;
- delete o.fxSettings;
- }
- }
-
- /**
- * Initialize module objects, styling, size and position for all panes
- *
- * @see _initElements()
- * @param {string} pane The pane to process
- */
-, getPane = function (pane) {
- var sel = options[pane].paneSelector
- if (sel.substr(0,1)==="#") // ID selector
- // NOTE: elements selected 'by ID' DO NOT have to be 'children'
- return $N.find(sel).eq(0);
- else { // class or other selector
- var $P = $N.children(sel).eq(0);
- // look for the pane nested inside a 'form' element
- return $P.length ? $P : $N.children("form:first").children(sel).eq(0);
- }
- }
-
- /**
- * @param {Object=} evt
- */
-, initPanes = function (evt) {
- // stopPropagation if called by trigger("layoutinitpanes") - use evtPane utility
- evtPane(evt);
-
- // NOTE: do north & south FIRST so we can measure their height - do center LAST
- $.each(_c.allPanes, function (idx, pane) {
- addPane( pane, true );
- });
-
- // init the pane-handles NOW in case we have to hide or close the pane below
- initHandles();
-
- // now that all panes have been initialized and initially-sized,
- // make sure there is really enough space available for each pane
- $.each(_c.borderPanes, function (i, pane) {
- if ($Ps[pane] && state[pane].isVisible) { // pane is OPEN
- setSizeLimits(pane);
- makePaneFit(pane); // pane may be Closed, Hidden or Resized by makePaneFit()
- }
- });
- // size center-pane AGAIN in case we 'closed' a border-pane in loop above
- sizeMidPanes("center");
-
- // Chrome/Webkit sometimes fires callbacks BEFORE it completes resizing!
- // Before RC30.3, there was a 10ms delay here, but that caused layout
- // to load asynchrously, which is BAD, so try skipping delay for now
-
- // process pane contents and callbacks, and init/resize child-layout if exists
- $.each(_c.allPanes, function (idx, pane) {
- afterInitPane(pane);
- });
- }
-
- /**
- * Add a pane to the layout - subroutine of initPanes()
- *
- * @see initPanes()
- * @param {string} pane The pane to process
- * @param {boolean=} [force=false] Size content after init
- */
-, addPane = function (pane, force) {
- if ( !force && !isInitialized() ) return;
- var
- o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , dir = c.dir
- , fx = s.fx
- , spacing = o.spacing_open || 0
- , isCenter = (pane === "center")
- , CSS = {}
- , $P = $Ps[pane]
- , size, minSize, maxSize, child
- ;
- // if pane-pointer already exists, remove the old one first
- if ($P)
- removePane( pane, false, true, false );
- else
- $Cs[pane] = false; // init
-
- $P = $Ps[pane] = getPane(pane);
- if (!$P.length) {
- $Ps[pane] = false; // logic
- return;
- }
-
- // SAVE original Pane CSS
- if (!$P.data("layoutCSS")) {
- var props = "position,top,left,bottom,right,width,height,overflow,zIndex,display,backgroundColor,padding,margin,border";
- $P.data("layoutCSS", styles($P, props));
- }
-
- // create alias for pane data in Instance - initHandles will add more
- Instance[pane] = {
- name: pane
- , pane: $Ps[pane]
- , content: $Cs[pane]
- , options: options[pane]
- , state: state[pane]
- , children: children[pane]
- };
-
- // add classes, attributes & events
- $P .data({
- parentLayout: Instance // pointer to Layout Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "pane"
- })
- .css(c.cssReq).css("zIndex", options.zIndexes.pane_normal)
- .css(o.applyDemoStyles ? c.cssDemo : {}) // demo styles
- .addClass( o.paneClass +" "+ o.paneClass+"-"+pane ) // default = "ui-layout-pane ui-layout-pane-west" - may be a dupe of 'paneSelector'
- .bind("mouseenter."+ sID, addHover )
- .bind("mouseleave."+ sID, removeHover )
- ;
- var paneMethods = {
- hide: ''
- , show: ''
- , toggle: ''
- , close: ''
- , open: ''
- , slideOpen: ''
- , slideClose: ''
- , slideToggle: ''
- , size: 'sizePane'
- , sizePane: 'sizePane'
- , sizeContent: ''
- , sizeHandles: ''
- , enableClosable: ''
- , disableClosable: ''
- , enableSlideable: ''
- , disableSlideable: ''
- , enableResizable: ''
- , disableResizable: ''
- , swapPanes: 'swapPanes'
- , swap: 'swapPanes'
- , move: 'swapPanes'
- , removePane: 'removePane'
- , remove: 'removePane'
- , createChildren: ''
- , resizeChildren: ''
- , resizeAll: 'resizeAll'
- , resizeLayout: 'resizeAll'
- }
- , name;
- // loop hash and bind all methods - include layoutID namespacing
- for (name in paneMethods) {
- $P.bind("layoutpane"+ name.toLowerCase() +"."+ sID, Instance[ paneMethods[name] || name ]);
- }
-
- // see if this pane has a 'scrolling-content element'
- initContent(pane, false); // false = do NOT sizeContent() - called later
-
- if (!isCenter) {
- // call _parseSize AFTER applying pane classes & styles - but before making visible (if hidden)
- // if o.size is auto or not valid, then MEASURE the pane and use that as its 'size'
- size = s.size = _parseSize(pane, o.size);
- minSize = _parseSize(pane,o.minSize) || 1;
- maxSize = _parseSize(pane,o.maxSize) || 100000;
- if (size > 0) size = max(min(size, maxSize), minSize);
- s.autoResize = o.autoResize; // used with percentage sizes
-
- // state for border-panes
- s.isClosed = false; // true = pane is closed
- s.isSliding = false; // true = pane is currently open by 'sliding' over adjacent panes
- s.isResizing= false; // true = pane is in process of being resized
- s.isHidden = false; // true = pane is hidden - no spacing, resizer or toggler is visible!
-
- // array for 'pin buttons' whose classNames are auto-updated on pane-open/-close
- if (!s.pins) s.pins = [];
- }
- // states common to ALL panes
- s.tagName = $P[0].tagName;
- s.edge = pane; // useful if pane is (or about to be) 'swapped' - easy find out where it is (or is going)
- s.noRoom = false; // true = pane 'automatically' hidden due to insufficient room - will unhide automatically
- s.isVisible = true; // false = pane is invisible - closed OR hidden - simplify logic
-
- // init pane positioning
- setPanePosition( pane );
-
- // if pane is not visible,
- if (dir === "horz") // north or south pane
- CSS.height = cssH($P, size);
- else if (dir === "vert") // east or west pane
- CSS.width = cssW($P, size);
- //else if (isCenter) {}
-
- $P.css(CSS); // apply size -- top, bottom & height will be set by sizeMidPanes
- if (dir != "horz") sizeMidPanes(pane, true); // true = skipCallback
-
- // if manually adding a pane AFTER layout initialization, then...
- if (state.initialized) {
- initHandles( pane );
- initHotkeys( pane );
- }
-
- // close or hide the pane if specified in settings
- if (o.initClosed && o.closable && !o.initHidden)
- close(pane, true, true); // true, true = force, noAnimation
- else if (o.initHidden || o.initClosed)
- hide(pane); // will be completely invisible - no resizer or spacing
- else if (!s.noRoom)
- // make the pane visible - in case was initially hidden
- $P.css("display","block");
- // ELSE setAsOpen() - called later by initHandles()
-
- // RESET visibility now - pane will appear IF display:block
- $P.css("visibility","visible");
-
- // check option for auto-handling of pop-ups & drop-downs
- if (o.showOverflowOnHover)
- $P.hover( allowOverflow, resetOverflow );
-
- // if manually adding a pane AFTER layout initialization, then...
- if (state.initialized) {
- afterInitPane( pane );
- }
- }
-
-, afterInitPane = function (pane) {
- var $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- ;
- if (!$P) return;
-
- // see if there is a directly-nested layout inside this pane
- if ($P.data("layout"))
- refreshChildren( pane, $P.data("layout") );
-
- // process pane contents and callbacks, and init/resize child-layout if exists
- if (s.isVisible) { // pane is OPEN
- if (state.initialized) // this pane was added AFTER layout was created
- resizeAll(); // will also sizeContent
- else
- sizeContent(pane);
-
- if (o.triggerEventsOnLoad)
- _runCallbacks("onresize_end", pane);
- else // automatic if onresize called, otherwise call it specifically
- // resize child - IF inner-layout already exists (created before this layout)
- resizeChildren(pane, true); // a previously existing childLayout
- }
-
- // init childLayouts - even if pane is not visible
- if (o.initChildren && o.children)
- createChildren(pane);
- }
-
- /**
- * @param {string=} panes The pane(s) to process
- */
-, setPanePosition = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
- $.each(panes, function (i, pane) {
- var $P = $Ps[pane]
- , $R = $Rs[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , CSS = {}
- ;
- if (!$P) return; // pane does not exist - skip
-
- // set css-position to account for container borders & padding
- switch (pane) {
- case "north": CSS.top = sC.inset.top;
- CSS.left = sC.inset.left;
- CSS.right = sC.inset.right;
- break;
- case "south": CSS.bottom = sC.inset.bottom;
- CSS.left = sC.inset.left;
- CSS.right = sC.inset.right;
- break;
- case "west": CSS.left = sC.inset.left; // top, bottom & height set by sizeMidPanes()
- break;
- case "east": CSS.right = sC.inset.right; // ditto
- break;
- case "center": // top, left, width & height set by sizeMidPanes()
- }
- // apply position
- $P.css(CSS);
-
- // update resizer position
- if ($R && s.isClosed)
- $R.css(side, sC.inset[side]);
- else if ($R && !s.isHidden)
- $R.css(side, sC.inset[side] + getPaneSize(pane));
- });
- }
-
- /**
- * Initialize module objects, styling, size and position for all resize bars and toggler buttons
- *
- * @see _create()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initHandles = function (panes) {
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- // create toggler DIVs for each pane, and set object pointers for them, eg: $R.north = north toggler DIV
- $.each(panes, function (i, pane) {
- var $P = $Ps[pane];
- $Rs[pane] = false; // INIT
- $Ts[pane] = false;
- if (!$P) return; // pane does not exist - skip
-
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , paneId = o.paneSelector.substr(0,1) === "#" ? o.paneSelector.substr(1) : ""
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , spacing = (s.isVisible ? o.spacing_open : o.spacing_closed)
- , _pane = "-"+ pane // used for classNames
- , _state = (s.isVisible ? "-open" : "-closed") // used for classNames
- , I = Instance[pane]
- // INIT RESIZER BAR
- , $R = I.resizer = $Rs[pane] = $("<div></div>")
- // INIT TOGGLER BUTTON
- , $T = I.toggler = (o.closable ? $Ts[pane] = $("<div></div>") : false)
- ;
-
- //if (s.isVisible && o.resizable) ... handled by initResizable
- if (!s.isVisible && o.slidable)
- $R.attr("title", o.tips.Slide).css("cursor", o.sliderCursor);
-
- $R // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "paneLeft-resizer"
- .attr("id", paneId ? paneId +"-resizer" : "" )
- .data({
- parentLayout: Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "resizer"
- })
- .css(_c.resizers.cssReq).css("zIndex", options.zIndexes.resizer_normal)
- .css(o.applyDemoStyles ? _c.resizers.cssDemo : {}) // add demo styles
- .addClass(rClass +" "+ rClass+_pane)
- .hover(addHover, removeHover) // ALWAYS add hover-classes, even if resizing is not enabled - handle with CSS instead
- .hover(onResizerEnter, onResizerLeave) // ALWAYS NEED resizer.mouseleave to balance toggler.mouseenter
- .mousedown($.layout.disableTextSelection) // prevent text-selection OUTSIDE resizer
- .mouseup($.layout.enableTextSelection) // not really necessary, but just in case
- .appendTo($N) // append DIV to container
- ;
- if ($.fn.disableSelection)
- $R.disableSelection(); // prevent text-selection INSIDE resizer
- if (o.resizerDblClickToggle)
- $R.bind("dblclick."+ sID, toggle );
-
- if ($T) {
- $T // if paneSelector is an ID, then create a matching ID for the resizer, eg: "#paneLeft" => "#paneLeft-toggler"
- .attr("id", paneId ? paneId +"-toggler" : "" )
- .data({
- parentLayout: Instance
- , layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- , layoutRole: "toggler"
- })
- .css(_c.togglers.cssReq) // add base/required styles
- .css(o.applyDemoStyles ? _c.togglers.cssDemo : {}) // add demo styles
- .addClass(tClass +" "+ tClass+_pane)
- .hover(addHover, removeHover) // ALWAYS add hover-classes, even if toggling is not enabled - handle with CSS instead
- .bind("mouseenter", onResizerEnter) // NEED toggler.mouseenter because mouseenter MAY NOT fire on resizer
- .appendTo($R) // append SPAN to resizer DIV
- ;
- // ADD INNER-SPANS TO TOGGLER
- if (o.togglerContent_open) // ui-layout-open
- $("<span>"+ o.togglerContent_open +"</span>")
- .data({
- layoutEdge: pane
- , layoutRole: "togglerContent"
- })
- .data("layoutRole", "togglerContent")
- .data("layoutEdge", pane)
- .addClass("content content-open")
- .css("display","none")
- .appendTo( $T )
- //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-open instead!
- ;
- if (o.togglerContent_closed) // ui-layout-closed
- $("<span>"+ o.togglerContent_closed +"</span>")
- .data({
- layoutEdge: pane
- , layoutRole: "togglerContent"
- })
- .addClass("content content-closed")
- .css("display","none")
- .appendTo( $T )
- //.hover( addHover, removeHover ) // use ui-layout-toggler-west-hover .content-closed instead!
- ;
- // ADD TOGGLER.click/.hover
- enableClosable(pane);
- }
-
- // add Draggable events
- initResizable(pane);
-
- // ADD CLASSNAMES & SLIDE-BINDINGS - eg: class="resizer resizer-west resizer-open"
- if (s.isVisible)
- setAsOpen(pane); // onOpen will be called, but NOT onResize
- else {
- setAsClosed(pane); // onClose will be called
- bindStartSlidingEvents(pane, true); // will enable events IF option is set
- }
-
- });
-
- // SET ALL HANDLE DIMENSIONS
- sizeHandles();
- }
-
-
- /**
- * Initialize scrolling ui-layout-content div - if exists
- *
- * @see initPane() - or externally after an Ajax injection
- * @param {string} pane The pane to process
- * @param {boolean=} [resize=true] Size content after init
- */
-, initContent = function (pane, resize) {
- if (!isInitialized()) return;
- var
- o = options[pane]
- , sel = o.contentSelector
- , I = Instance[pane]
- , $P = $Ps[pane]
- , $C
- ;
- if (sel) $C = I.content = $Cs[pane] = (o.findNestedContent)
- ? $P.find(sel).eq(0) // match 1-element only
- : $P.children(sel).eq(0)
- ;
- if ($C && $C.length) {
- $C.data("layoutRole", "content");
- // SAVE original Content CSS
- if (!$C.data("layoutCSS"))
- $C.data("layoutCSS", styles($C, "height"));
- $C.css( _c.content.cssReq );
- if (o.applyDemoStyles) {
- $C.css( _c.content.cssDemo ); // add padding & overflow: auto to content-div
- $P.css( _c.content.cssDemoPane ); // REMOVE padding/scrolling from pane
- }
- // ensure no vertical scrollbar on pane - will mess up measurements
- if ($P.css("overflowX").match(/(scroll|auto)/)) {
- $P.css("overflow", "hidden");
- }
- state[pane].content = {}; // init content state
- if (resize !== false) sizeContent(pane);
- // sizeContent() is called AFTER init of all elements
- }
- else
- I.content = $Cs[pane] = false;
- }
-
-
- /**
- * Add resize-bars to all panes that specify it in options
- * -dependancy: $.fn.resizable - will skip if not found
- *
- * @see _create()
- * @param {string=} [panes=""] The edge(s) to process
- */
-, initResizable = function (panes) {
- var draggingAvailable = $.layout.plugins.draggable
- , side // set in start()
- ;
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- $.each(panes, function (idx, pane) {
- var o = options[pane];
- if (!draggingAvailable || !$Ps[pane] || !o.resizable) {
- o.resizable = false;
- return true; // skip to next
- }
-
- var s = state[pane]
- , z = options.zIndexes
- , c = _c[pane]
- , side = c.dir=="horz" ? "top" : "left"
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , base = o.resizerClass
- , lastPos = 0 // used when live-resizing
- , r, live // set in start because may change
- // 'drag' classes are applied to the ORIGINAL resizer-bar while dragging is in process
- , resizerClass = base+"-drag" // resizer-drag
- , resizerPaneClass = base+"-"+pane+"-drag" // resizer-north-drag
- // 'helper' class is applied to the CLONED resizer-bar while it is being dragged
- , helperClass = base+"-dragging" // resizer-dragging
- , helperPaneClass = base+"-"+pane+"-dragging" // resizer-north-dragging
- , helperLimitClass = base+"-dragging-limit" // resizer-drag
- , helperPaneLimitClass = base+"-"+pane+"-dragging-limit" // resizer-north-drag
- , helperClassesSet = false // logic var
- ;
-
- if (!s.isClosed)
- $R.attr("title", o.tips.Resize)
- .css("cursor", o.resizerCursor); // n-resize, s-resize, etc
-
- $R.draggable({
- containment: $N[0] // limit resizing to layout container
- , axis: (c.dir=="horz" ? "y" : "x") // limit resizing to horz or vert axis
- , delay: 0
- , distance: 1
- , grid: o.resizingGrid
- // basic format for helper - style it using class: .ui-draggable-dragging
- , helper: "clone"
- , opacity: o.resizerDragOpacity
- , addClasses: false // avoid ui-state-disabled class when disabled
- //, iframeFix: o.draggableIframeFix // TODO: consider using when bug is fixed
- , zIndex: z.resizer_drag
-
- , start: function (e, ui) {
- // REFRESH options & state pointers in case we used swapPanes
- o = options[pane];
- s = state[pane];
- // re-read options
- live = o.livePaneResizing;
-
- // ondrag_start callback - will CANCEL hide if returns false
- // TODO: dragging CANNOT be cancelled like this, so see if there is a way?
- if (false === _runCallbacks("ondrag_start", pane)) return false;
-
- s.isResizing = true; // prevent pane from closing while resizing
- state.paneResizing = pane; // easy to see if ANY pane is resizing
- timer.clear(pane+"_closeSlider"); // just in case already triggered
-
- // SET RESIZER LIMITS - used in drag()
- setSizeLimits(pane); // update pane/resizer state
- r = s.resizerPosition;
- lastPos = ui.position[ side ]
-
- $R.addClass( resizerClass +" "+ resizerPaneClass ); // add drag classes
- helperClassesSet = false; // reset logic var - see drag()
-
- // MASK PANES CONTAINING IFRAMES, APPLETS OR OTHER TROUBLESOME ELEMENTS
- showMasks( pane, { resizing: true });
- }
-
- , drag: function (e, ui) {
- if (!helperClassesSet) { // can only add classes after clone has been added to the DOM
- //$(".ui-draggable-dragging")
- ui.helper
- .addClass( helperClass +" "+ helperPaneClass ) // add helper classes
- .css({ right: "auto", bottom: "auto" }) // fix dir="rtl" issue
- .children().css("visibility","hidden") // hide toggler inside dragged resizer-bar
- ;
- helperClassesSet = true;
- // draggable bug!? RE-SET zIndex to prevent E/W resize-bar showing through N/S pane!
- if (s.isSliding) $Ps[pane].css("zIndex", z.pane_sliding);
- }
- // CONTAIN RESIZER-BAR TO RESIZING LIMITS
- var limit = 0;
- if (ui.position[side] < r.min) {
- ui.position[side] = r.min;
- limit = -1;
- }
- else if (ui.position[side] > r.max) {
- ui.position[side] = r.max;
- limit = 1;
- }
- // ADD/REMOVE dragging-limit CLASS
- if (limit) {
- ui.helper.addClass( helperLimitClass +" "+ helperPaneLimitClass ); // at dragging-limit
- window.defaultStatus = (limit>0 && pane.match(/(north|west)/)) || (limit<0 && pane.match(/(south|east)/)) ? o.tips.maxSizeWarning : o.tips.minSizeWarning;
- }
- else {
- ui.helper.removeClass( helperLimitClass +" "+ helperPaneLimitClass ); // not at dragging-limit
- window.defaultStatus = "";
- }
- // DYNAMICALLY RESIZE PANES IF OPTION ENABLED
- // won't trigger unless resizer has actually moved!
- if (live && Math.abs(ui.position[side] - lastPos) >= o.liveResizingTolerance) {
- lastPos = ui.position[side];
- resizePanes(e, ui, pane)
- }
- }
-
- , stop: function (e, ui) {
- $('body').enableSelection(); // RE-ENABLE TEXT SELECTION
- window.defaultStatus = ""; // clear 'resizing limit' message from statusbar
- $R.removeClass( resizerClass +" "+ resizerPaneClass ); // remove drag classes from Resizer
- s.isResizing = false;
- state.paneResizing = false; // easy to see if ANY pane is resizing
- resizePanes(e, ui, pane, true); // true = resizingDone
- }
-
- });
- });
-
- /**
- * resizePanes
- *
- * Sub-routine called from stop() - and drag() if livePaneResizing
- *
- * @param {!Object} evt
- * @param {!Object} ui
- * @param {string} pane
- * @param {boolean=} [resizingDone=false]
- */
- var resizePanes = function (evt, ui, pane, resizingDone) {
- var dragPos = ui.position
- , c = _c[pane]
- , o = options[pane]
- , s = state[pane]
- , resizerPos
- ;
- switch (pane) {
- case "north": resizerPos = dragPos.top; break;
- case "west": resizerPos = dragPos.left; break;
- case "south": resizerPos = sC.layoutHeight - dragPos.top - o.spacing_open; break;
- case "east": resizerPos = sC.layoutWidth - dragPos.left - o.spacing_open; break;
- };
- // remove container margin from resizer position to get the pane size
- var newSize = resizerPos - sC.inset[c.side];
-
- // Disable OR Resize Mask(s) created in drag.start
- if (!resizingDone) {
- // ensure we meet liveResizingTolerance criteria
- if (Math.abs(newSize - s.size) < o.liveResizingTolerance)
- return; // SKIP resize this time
- // resize the pane
- manualSizePane(pane, newSize, false, true); // true = noAnimation
- sizeMasks(); // resize all visible masks
- }
- else { // resizingDone
- // ondrag_end callback
- if (false !== _runCallbacks("ondrag_end", pane))
- manualSizePane(pane, newSize, false, true); // true = noAnimation
- hideMasks(true); // true = force hiding all masks even if one is 'sliding'
- if (s.isSliding) // RE-SHOW 'object-masks' so objects won't show through sliding pane
- showMasks( pane, { resizing: true });
- }
- };
- }
-
- /**
- * sizeMask
- *
- * Needed to overlay a DIV over an IFRAME-pane because mask CANNOT be *inside* the pane
- * Called when mask created, and during livePaneResizing
- */
-, sizeMask = function () {
- var $M = $(this)
- , pane = $M.data("layoutMask") // eg: "west"
- , s = state[pane]
- ;
- // only masks over an IFRAME-pane need manual resizing
- if (s.tagName == "IFRAME" && s.isVisible) // no need to mask closed/hidden panes
- $M.css({
- top: s.offsetTop
- , left: s.offsetLeft
- , width: s.outerWidth
- , height: s.outerHeight
- });
- /* ALT Method...
- var $P = $Ps[pane];
- $M.css( $P.position() ).css({ width: $P[0].offsetWidth, height: $P[0].offsetHeight });
- */
- }
-, sizeMasks = function () {
- $Ms.each( sizeMask ); // resize all 'visible' masks
- }
-
- /**
- * @param {string} pane The pane being resized, animated or isSliding
- * @param {Object=} [args] (optional) Options: which masks to apply, and to which panes
- */
-, showMasks = function (pane, args) {
- var c = _c[pane]
- , panes = ["center"]
- , z = options.zIndexes
- , a = $.extend({
- objectsOnly: false
- , animation: false
- , resizing: true
- , sliding: state[pane].isSliding
- }, args )
- , o, s
- ;
- if (a.resizing)
- panes.push( pane );
- if (a.sliding)
- panes.push( _c.oppositeEdge[pane] ); // ADD the oppositeEdge-pane
-
- if (c.dir === "horz") {
- panes.push("west");
- panes.push("east");
- }
-
- $.each(panes, function(i,p){
- s = state[p];
- o = options[p];
- if (s.isVisible && ( o.maskObjects || (!a.objectsOnly && o.maskContents) )) {
- getMasks(p).each(function(){
- sizeMask.call(this);
- this.style.zIndex = s.isSliding ? z.pane_sliding+1 : z.pane_normal+1
- this.style.display = "block";
- });
- }
- });
- }
-
- /**
- * @param {boolean=} force Hide masks even if a pane is sliding
- */
-, hideMasks = function (force) {
- // ensure no pane is resizing - could be a timing issue
- if (force || !state.paneResizing) {
- $Ms.hide(); // hide ALL masks
- }
- // if ANY pane is sliding, then DO NOT remove masks from panes with maskObjects enabled
- else if (!force && !$.isEmptyObject( state.panesSliding )) {
- var i = $Ms.length - 1
- , p, $M;
- for (; i >= 0; i--) {
- $M = $Ms.eq(i);
- p = $M.data("layoutMask");
- if (!options[p].maskObjects) {
- $M.hide();
- }
- }
- }
- }
-
- /**
- * @param {string} pane
- */
-, getMasks = function (pane) {
- var $Masks = $([])
- , $M, i = 0, c = $Ms.length
- ;
- for (; i<c; i++) {
- $M = $Ms.eq(i);
- if ($M.data("layoutMask") === pane)
- $Masks = $Masks.add( $M );
- }
- if ($Masks.length)
- return $Masks;
- else
- return createMasks(pane);
- }
-
- /**
- * createMasks
- *
- * Generates both DIV (ALWAYS used) and IFRAME (optional) elements as masks
- * An IFRAME mask is created *under* the DIV when maskObjects=true, because a DIV cannot mask an applet
- *
- * @param {string} pane
- */
-, createMasks = function (pane) {
- var
- $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- , z = options.zIndexes
- , isIframe, el, $M, css, i
- ;
- if (!o.maskContents && !o.maskObjects) return $([]);
- // if o.maskObjects=true, then loop TWICE to create BOTH kinds of mask, else only create a DIV
- for (i=0; i < (o.maskObjects ? 2 : 1); i++) {
- isIframe = o.maskObjects && i==0;
- el = document.createElement( isIframe ? "iframe" : "div" );
- $M = $(el).data("layoutMask", pane); // add data to relate mask to pane
- el.className = "ui-layout-mask ui-layout-mask-"+ pane; // for user styling
- css = el.style;
- // Both DIVs and IFRAMES
- css.background = "#FFF";
- css.position = "absolute";
- css.display = "block";
- if (isIframe) { // IFRAME-only props
- el.src = "about:blank";
- el.frameborder = 0;
- css.border = 0;
- css.opacity = 0;
- css.filter = "Alpha(Opacity='0')";
- //el.allowTransparency = true; - for IE, but breaks masking ability!
- }
- else { // DIV-only props
- css.opacity = 0.001;
- css.filter = "Alpha(Opacity='1')";
- }
- // if pane IS an IFRAME, then must mask the pane itself
- if (s.tagName == "IFRAME") {
- // NOTE sizing done by a subroutine so can be called during live-resizing
- css.zIndex = z.pane_normal+1; // 1-higher than pane
- $N.append( el ); // append to LAYOUT CONTAINER
- }
- // otherwise put masks *inside the pane* to mask its contents
- else {
- $M.addClass("ui-layout-mask-inside-pane");
- css.zIndex = o.maskZindex || z.content_mask; // usually 1, but customizable
- css.top = 0;
- css.left = 0;
- css.width = "100%";
- css.height = "100%";
- $P.append( el ); // append INSIDE pane element
- }
- // add Mask to cached array so can be resized & reused
- $Ms = $Ms.add( el );
- }
- return $Ms;
- }
-
-
- /**
- * Destroy this layout and reset all elements
- *
- * @param {boolean=} [destroyChildren=false] Destory Child-Layouts first?
- */
-, destroy = function (evt_or_destroyChildren, destroyChildren) {
- // UNBIND layout events and remove global object
- $(window).unbind("."+ sID); // resize & unload
- $(document).unbind("."+ sID); // keyDown (hotkeys)
-
- if (typeof evt_or_destroyChildren === "object")
- // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
- evtPane(evt_or_destroyChildren);
- else // no event, so transfer 1st param to destroyChildren param
- destroyChildren = evt_or_destroyChildren;
-
- // need to look for parent layout BEFORE we remove the container data, else skips a level
- //var parentPane = Instance.hasParentLayout ? $.layout.getParentPaneInstance( $N ) : null;
-
- // reset layout-container
- $N .clearQueue()
- .removeData("layout")
- .removeData("layoutContainer")
- .removeClass(options.containerClass)
- .unbind("."+ sID) // remove ALL Layout events
- ;
-
- // remove all mask elements that have been created
- $Ms.remove();
-
- // loop all panes to remove layout classes, attributes and bindings
- $.each(_c.allPanes, function (i, pane) {
- removePane( pane, false, true, destroyChildren ); // true = skipResize
- });
-
- // do NOT reset container CSS if is a 'pane' (or 'content') in an outer-layout - ie, THIS layout is 'nested'
- var css = "layoutCSS";
- if ($N.data(css) && !$N.data("layoutRole")) // RESET CSS
- $N.css( $N.data(css) ).removeData(css);
-
- // for full-page layouts, also reset the <HTML> CSS
- if (sC.tagName === "BODY" && ($N = $("html")).data(css)) // RESET <HTML> CSS
- $N.css( $N.data(css) ).removeData(css);
-
- // trigger plugins for this layout, if there are any
- runPluginCallbacks( Instance, $.layout.onDestroy );
-
- // trigger state-management and onunload callback
- unload();
-
- // clear the Instance of everything except for container & options (so could recreate)
- // RE-CREATE: myLayout = myLayout.container.layout( myLayout.options );
- for (var n in Instance)
- if (!n.match(/^(container|options)$/)) delete Instance[ n ];
- // add a 'destroyed' flag to make it easy to check
- Instance.destroyed = true;
-
- // if this is a child layout, CLEAR the child-pointer in the parent
- /* for now the pointer REMAINS, but with only container, options and destroyed keys
- if (parentPane) {
- var layout = parentPane.pane.data("parentLayout")
- , key = layout.options.instanceKey || 'error';
- // THIS SYNTAX MAY BE WRONG!
- parentPane.children[key] = layout.children[ parentPane.name ].children[key] = null;
- }
- */
-
- return Instance; // for coding convenience
- }
-
- /**
- * Remove a pane from the layout - subroutine of destroy()
- *
- * @see destroy()
- * @param {(string|Object)} evt_or_pane The pane to process
- * @param {boolean=} [remove=false] Remove the DOM element?
- * @param {boolean=} [skipResize=false] Skip calling resizeAll()?
- * @param {boolean=} [destroyChild=true] Destroy Child-layouts? If not passed, obeys options setting
- */
-, removePane = function (evt_or_pane, remove, skipResize, destroyChild) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- , $C = $Cs[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- ;
- // NOTE: elements can still exist even after remove()
- // so check for missing data(), which is cleared by removed()
- if ($P && $.isEmptyObject( $P.data() )) $P = false;
- if ($C && $.isEmptyObject( $C.data() )) $C = false;
- if ($R && $.isEmptyObject( $R.data() )) $R = false;
- if ($T && $.isEmptyObject( $T.data() )) $T = false;
-
- if ($P) $P.stop(true, true);
-
- var o = options[pane]
- , s = state[pane]
- , d = "layout"
- , css = "layoutCSS"
- , pC = children[pane]
- , hasChildren = $.isPlainObject( pC ) && !$.isEmptyObject( pC )
- , destroy = destroyChild !== undefined ? destroyChild : o.destroyChildren
- ;
- // FIRST destroy the child-layout(s)
- if (hasChildren && destroy) {
- $.each( pC, function (key, child) {
- if (!child.destroyed)
- child.destroy(true);// tell child-layout to destroy ALL its child-layouts too
- if (child.destroyed) // destroy was successful
- delete pC[key];
- });
- // if no more children, remove the children hash
- if ($.isEmptyObject( pC )) {
- pC = children[pane] = null; // clear children hash
- hasChildren = false;
- }
- }
-
- // Note: can't 'remove' a pane element with non-destroyed children
- if ($P && remove && !hasChildren)
- $P.remove(); // remove the pane-element and everything inside it
- else if ($P && $P[0]) {
- // create list of ALL pane-classes that need to be removed
- var root = o.paneClass // default="ui-layout-pane"
- , pRoot = root +"-"+ pane // eg: "ui-layout-pane-west"
- , _open = "-open"
- , _sliding= "-sliding"
- , _closed = "-closed"
- , classes = [ root, root+_open, root+_closed, root+_sliding, // generic classes
- pRoot, pRoot+_open, pRoot+_closed, pRoot+_sliding ] // pane-specific classes
- ;
- $.merge(classes, getHoverClasses($P, true)); // ADD hover-classes
- // remove all Layout classes from pane-element
- $P .removeClass( classes.join(" ") ) // remove ALL pane-classes
- .removeData("parentLayout")
- .removeData("layoutPane")
- .removeData("layoutRole")
- .removeData("layoutEdge")
- .removeData("autoHidden") // in case set
- .unbind("."+ sID) // remove ALL Layout events
- // TODO: remove these extra unbind commands when jQuery is fixed
- //.unbind("mouseenter"+ sID)
- //.unbind("mouseleave"+ sID)
- ;
- // do NOT reset CSS if this pane/content is STILL the container of a nested layout!
- // the nested layout will reset its 'container' CSS when/if it is destroyed
- if (hasChildren && $C) {
- // a content-div may not have a specific width, so give it one to contain the Layout
- $C.width( $C.width() );
- $.each( pC, function (key, child) {
- child.resizeAll(); // resize the Layout
- });
- }
- else if ($C)
- $C.css( $C.data(css) ).removeData(css).removeData("layoutRole");
- // remove pane AFTER content in case there was a nested layout
- if (!$P.data(d))
- $P.css( $P.data(css) ).removeData(css);
- }
-
- // REMOVE pane resizer and toggler elements
- if ($T) $T.remove();
- if ($R) $R.remove();
-
- // CLEAR all pointers and state data
- Instance[pane] = $Ps[pane] = $Cs[pane] = $Rs[pane] = $Ts[pane] = false;
- s = { removed: true };
-
- if (!skipResize)
- resizeAll();
- }
-
-
-/*
- * ###########################
- * ACTION METHODS
- * ###########################
- */
-
- /**
- * @param {string} pane
- */
-, _hidePane = function (pane) {
- var $P = $Ps[pane]
- , o = options[pane]
- , s = $P[0].style
- ;
- if (o.useOffscreenClose) {
- if (!$P.data(_c.offscreenReset))
- $P.data(_c.offscreenReset, { left: s.left, right: s.right });
- $P.css( _c.offscreenCSS );
- }
- else
- $P.hide().removeData(_c.offscreenReset);
- }
-
- /**
- * @param {string} pane
- */
-, _showPane = function (pane) {
- var $P = $Ps[pane]
- , o = options[pane]
- , off = _c.offscreenCSS
- , old = $P.data(_c.offscreenReset)
- , s = $P[0].style
- ;
- $P .show() // ALWAYS show, just in case
- .removeData(_c.offscreenReset);
- if (o.useOffscreenClose && old) {
- if (s.left == off.left)
- s.left = old.left;
- if (s.right == off.right)
- s.right = old.right;
- }
- }
-
-
- /**
- * Completely 'hides' a pane, including its spacing - as if it does not exist
- * The pane is not actually 'removed' from the source, so can use 'show' to un-hide it
- *
- * @param {(string|Object)} evt_or_pane The pane being hidden, ie: north, south, east, or west
- * @param {boolean=} [noAnimation=false]
- */
-, hide = function (evt_or_pane, noAnimation) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- if (pane === "center" || !$P || s.isHidden) return; // pane does not exist OR is already hidden
-
- // onhide_start callback - will CANCEL hide if returns false
- if (state.initialized && false === _runCallbacks("onhide_start", pane)) return;
-
- s.isSliding = false; // just in case
- delete state.panesSliding[pane];
-
- // now hide the elements
- if ($R) $R.hide(); // hide resizer-bar
- if (!state.initialized || s.isClosed) {
- s.isClosed = true; // to trigger open-animation on show()
- s.isHidden = true;
- s.isVisible = false;
- if (!state.initialized)
- _hidePane(pane); // no animation when loading page
- sizeMidPanes(_c[pane].dir === "horz" ? "" : "center");
- if (state.initialized || o.triggerEventsOnLoad)
- _runCallbacks("onhide_end", pane);
- }
- else {
- s.isHiding = true; // used by onclose
- close(pane, false, noAnimation); // adjust all panes to fit
- }
- }
-
- /**
- * Show a hidden pane - show as 'closed' by default unless openPane = true
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {boolean=} [openPane=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [noAlert=false]
- */
-, show = function (evt_or_pane, openPane, noAnimation, noAlert) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- if (pane === "center" || !$P || !s.isHidden) return; // pane does not exist OR is not hidden
-
- // onshow_start callback - will CANCEL show if returns false
- if (false === _runCallbacks("onshow_start", pane)) return;
-
- s.isShowing = true; // used by onopen/onclose
- //s.isHidden = false; - will be set by open/close - if not cancelled
- s.isSliding = false; // just in case
- delete state.panesSliding[pane];
-
- // now show the elements
- //if ($R) $R.show(); - will be shown by open/close
- if (openPane === false)
- close(pane, true); // true = force
- else
- open(pane, false, noAnimation, noAlert); // adjust all panes to fit
- }
-
-
- /**
- * Toggles a pane open/closed by calling either open or close
- *
- * @param {(string|Object)} evt_or_pane The pane being toggled, ie: north, south, east, or west
- * @param {boolean=} [slide=false]
- */
-, toggle = function (evt_or_pane, slide) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , s = state[pane]
- ;
- if (evt) // called from to $R.dblclick OR triggerPaneEvent
- evt.stopImmediatePropagation();
- if (s.isHidden)
- show(pane); // will call 'open' after unhiding it
- else if (s.isClosed)
- open(pane, !!slide);
- else
- close(pane);
- }
-
-
- /**
- * Utility method used during init or other auto-processes
- *
- * @param {string} pane The pane being closed
- * @param {boolean=} [setHandles=false]
- */
-, _closePane = function (pane, setHandles) {
- var
- $P = $Ps[pane]
- , s = state[pane]
- ;
- _hidePane(pane);
- s.isClosed = true;
- s.isVisible = false;
- if (setHandles) setAsClosed(pane);
- }
-
- /**
- * Close the specified pane (animation optional), and resize all other panes as needed
- *
- * @param {(string|Object)} evt_or_pane The pane being closed, ie: north, south, east, or west
- * @param {boolean=} [force=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [skipCallback=false]
- */
-, close = function (evt_or_pane, force, noAnimation, skipCallback) {
- var pane = evtPane.call(this, evt_or_pane);
- if (pane === "center") return; // validate
- // if pane has been initialized, but NOT the complete layout, close pane instantly
- if (!state.initialized && $Ps[pane]) {
- _closePane(pane, true); // INIT pane as closed
- return;
- }
- if (!isInitialized()) return;
-
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , doFX, isShowing, isHiding, wasSliding;
-
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
-
- if ( !$P
- || (!o.closable && !s.isShowing && !s.isHiding) // invalid request // (!o.resizable && !o.closable) ???
- || (!force && s.isClosed && !s.isShowing) // already closed
- ) return queueNext();
-
- // onclose_start callback - will CANCEL hide if returns false
- // SKIP if just 'showing' a hidden pane as 'closed'
- var abort = !s.isShowing && false === _runCallbacks("onclose_start", pane);
-
- // transfer logic vars to temp vars
- isShowing = s.isShowing;
- isHiding = s.isHiding;
- wasSliding = s.isSliding;
- // now clear the logic vars (REQUIRED before aborting)
- delete s.isShowing;
- delete s.isHiding;
-
- if (abort) return queueNext();
-
- doFX = !noAnimation && !s.isClosed && (o.fxName_close != "none");
- s.isMoving = true;
- s.isClosed = true;
- s.isVisible = false;
- // update isHidden BEFORE sizing panes
- if (isHiding) s.isHidden = true;
- else if (isShowing) s.isHidden = false;
-
- if (s.isSliding) // pane is being closed, so UNBIND trigger events
- bindStopSlidingEvents(pane, false); // will set isSliding=false
- else // resize panes adjacent to this one
- sizeMidPanes(_c[pane].dir === "horz" ? "" : "center", false); // false = NOT skipCallback
-
- // if this pane has a resizer bar, move it NOW - before animation
- setAsClosed(pane);
-
- // CLOSE THE PANE
- if (doFX) { // animate the close
- lockPaneForFX(pane, true); // need to set left/top so animation will work
- $P.hide( o.fxName_close, o.fxSettings_close, o.fxSpeed_close, function () {
- lockPaneForFX(pane, false); // undo
- if (s.isClosed) close_2();
- queueNext();
- });
- }
- else { // hide the pane without animation
- _hidePane(pane);
- close_2();
- queueNext();
- };
- });
-
- // SUBROUTINE
- function close_2 () {
- s.isMoving = false;
- bindStartSlidingEvents(pane, true); // will enable if o.slidable = true
-
- // if opposite-pane was autoClosed, see if it can be autoOpened now
- var altPane = _c.oppositeEdge[pane];
- if (state[ altPane ].noRoom) {
- setSizeLimits( altPane );
- makePaneFit( altPane );
- }
-
- if (!skipCallback && (state.initialized || o.triggerEventsOnLoad)) {
- // onclose callback - UNLESS just 'showing' a hidden pane as 'closed'
- if (!isShowing) _runCallbacks("onclose_end", pane);
- // onhide OR onshow callback
- if (isShowing) _runCallbacks("onshow_end", pane);
- if (isHiding) _runCallbacks("onhide_end", pane);
- }
- }
- }
-
- /**
- * @param {string} pane The pane just closed, ie: north, south, east, or west
- */
-, setAsClosed = function (pane) {
- if (!$Rs[pane]) return; // handles not initialized yet!
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , _pane = "-"+ pane // used for classNames
- , _open = "-open"
- , _sliding= "-sliding"
- , _closed = "-closed"
- ;
- $R
- .css(side, sC.inset[side]) // move the resizer
- .removeClass( rClass+_open +" "+ rClass+_pane+_open )
- .removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
- .addClass( rClass+_closed +" "+ rClass+_pane+_closed )
- ;
- // handle already-hidden panes in case called by swap() or a similar method
- if (s.isHidden) $R.hide(); // hide resizer-bar
-
- // DISABLE 'resizing' when closed - do this BEFORE bindStartSlidingEvents?
- if (o.resizable && $.layout.plugins.draggable)
- $R
- .draggable("disable")
- .removeClass("ui-state-disabled") // do NOT apply disabled styling - not suitable here
- .css("cursor", "default")
- .attr("title","")
- ;
-
- // if pane has a toggler button, adjust that too
- if ($T) {
- $T
- .removeClass( tClass+_open +" "+ tClass+_pane+_open )
- .addClass( tClass+_closed +" "+ tClass+_pane+_closed )
- .attr("title", o.tips.Open) // may be blank
- ;
- // toggler-content - if exists
- $T.children(".content-open").hide();
- $T.children(".content-closed").css("display","block");
- }
-
- // sync any 'pin buttons'
- syncPinBtns(pane, false);
-
- if (state.initialized) {
- // resize 'length' and position togglers for adjacent panes
- sizeHandles();
- }
- }
-
- /**
- * Open the specified pane (animation optional), and resize all other panes as needed
- *
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- * @param {boolean=} [slide=false]
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [noAlert=false]
- */
-, open = function (evt_or_pane, slide, noAnimation, noAlert) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , doFX, isShowing
- ;
- if (pane === "center") return; // validate
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
-
- if ( !$P
- || (!o.resizable && !o.closable && !s.isShowing) // invalid request
- || (s.isVisible && !s.isSliding) // already open
- ) return queueNext();
-
- // pane can ALSO be unhidden by just calling show(), so handle this scenario
- if (s.isHidden && !s.isShowing) {
- queueNext(); // call before show() because it needs the queue free
- show(pane, true);
- return;
- }
-
- if (s.autoResize && s.size != o.size) // resize pane to original size set in options
- sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
- else
- // make sure there is enough space available to open the pane
- setSizeLimits(pane, slide);
-
- // onopen_start callback - will CANCEL open if returns false
- var cbReturn = _runCallbacks("onopen_start", pane);
-
- if (cbReturn === "abort")
- return queueNext();
-
- // update pane-state again in case options were changed in onopen_start
- if (cbReturn !== "NC") // NC = "No Callback"
- setSizeLimits(pane, slide);
-
- if (s.minSize > s.maxSize) { // INSUFFICIENT ROOM FOR PANE TO OPEN!
- syncPinBtns(pane, false); // make sure pin-buttons are reset
- if (!noAlert && o.tips.noRoomToOpen)
- alert(o.tips.noRoomToOpen);
- return queueNext(); // ABORT
- }
-
- if (slide) // START Sliding - will set isSliding=true
- bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
- else if (s.isSliding) // PIN PANE (stop sliding) - open pane 'normally' instead
- bindStopSlidingEvents(pane, false); // UNBIND trigger events - will set isSliding=false
- else if (o.slidable)
- bindStartSlidingEvents(pane, false); // UNBIND trigger events
-
- s.noRoom = false; // will be reset by makePaneFit if 'noRoom'
- makePaneFit(pane);
-
- // transfer logic var to temp var
- isShowing = s.isShowing;
- // now clear the logic var
- delete s.isShowing;
-
- doFX = !noAnimation && s.isClosed && (o.fxName_open != "none");
- s.isMoving = true;
- s.isVisible = true;
- s.isClosed = false;
- // update isHidden BEFORE sizing panes - WHY??? Old?
- if (isShowing) s.isHidden = false;
-
- if (doFX) { // ANIMATE
- // mask adjacent panes with objects
- lockPaneForFX(pane, true); // need to set left/top so animation will work
- $P.show( o.fxName_open, o.fxSettings_open, o.fxSpeed_open, function() {
- lockPaneForFX(pane, false); // undo
- if (s.isVisible) open_2(); // continue
- queueNext();
- });
- }
- else { // no animation
- _showPane(pane);// just show pane and...
- open_2(); // continue
- queueNext();
- };
- });
-
- // SUBROUTINE
- function open_2 () {
- s.isMoving = false;
-
- // cure iframe display issues
- _fixIframe(pane);
-
- // NOTE: if isSliding, then other panes are NOT 'resized'
- if (!s.isSliding) { // resize all panes adjacent to this one
- sizeMidPanes(_c[pane].dir=="vert" ? "center" : "", false); // false = NOT skipCallback
- }
-
- // set classes, position handles and execute callbacks...
- setAsOpen(pane);
- };
-
- }
-
- /**
- * @param {string} pane The pane just opened, ie: north, south, east, or west
- * @param {boolean=} [skipCallback=false]
- */
-, setAsOpen = function (pane, skipCallback) {
- var
- $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , o = options[pane]
- , s = state[pane]
- , side = _c[pane].side
- , rClass = o.resizerClass
- , tClass = o.togglerClass
- , _pane = "-"+ pane // used for classNames
- , _open = "-open"
- , _closed = "-closed"
- , _sliding= "-sliding"
- ;
- $R
- .css(side, sC.inset[side] + getPaneSize(pane)) // move the resizer
- .removeClass( rClass+_closed +" "+ rClass+_pane+_closed )
- .addClass( rClass+_open +" "+ rClass+_pane+_open )
- ;
- if (s.isSliding)
- $R.addClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
- else // in case 'was sliding'
- $R.removeClass( rClass+_sliding +" "+ rClass+_pane+_sliding )
-
- removeHover( 0, $R ); // remove hover classes
- if (o.resizable && $.layout.plugins.draggable)
- $R .draggable("enable")
- .css("cursor", o.resizerCursor)
- .attr("title", o.tips.Resize);
- else if (!s.isSliding)
- $R.css("cursor", "default"); // n-resize, s-resize, etc
-
- // if pane also has a toggler button, adjust that too
- if ($T) {
- $T .removeClass( tClass+_closed +" "+ tClass+_pane+_closed )
- .addClass( tClass+_open +" "+ tClass+_pane+_open )
- .attr("title", o.tips.Close); // may be blank
- removeHover( 0, $T ); // remove hover classes
- // toggler-content - if exists
- $T.children(".content-closed").hide();
- $T.children(".content-open").css("display","block");
- }
-
- // sync any 'pin buttons'
- syncPinBtns(pane, !s.isSliding);
-
- // update pane-state dimensions - BEFORE resizing content
- $.extend(s, elDims($P));
-
- if (state.initialized) {
- // resize resizer & toggler sizes for all panes
- sizeHandles();
- // resize content every time pane opens - to be sure
- sizeContent(pane, true); // true = remeasure headers/footers, even if 'pane.isMoving'
- }
-
- if (!skipCallback && (state.initialized || o.triggerEventsOnLoad) && $P.is(":visible")) {
- // onopen callback
- _runCallbacks("onopen_end", pane);
- // onshow callback - TODO: should this be here?
- if (s.isShowing) _runCallbacks("onshow_end", pane);
-
- // ALSO call onresize because layout-size *may* have changed while pane was closed
- if (state.initialized)
- _runCallbacks("onresize_end", pane);
- }
-
- // TODO: Somehow sizePane("north") is being called after this point???
- }
-
-
- /**
- * slideOpen / slideClose / slideToggle
- *
- * Pass-though methods for sliding
- */
-, slideOpen = function (evt_or_pane) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , s = state[pane]
- , delay = options[pane].slideDelay_open
- ;
- if (pane === "center") return; // validate
- // prevent event from triggering on NEW resizer binding created below
- if (evt) evt.stopImmediatePropagation();
-
- if (s.isClosed && evt && evt.type === "mouseenter" && delay > 0)
- // trigger = mouseenter - use a delay
- timer.set(pane+"_openSlider", open_NOW, delay);
- else
- open_NOW(); // will unbind events if is already open
-
- /**
- * SUBROUTINE for timed open
- */
- function open_NOW () {
- if (!s.isClosed) // skip if no longer closed!
- bindStopSlidingEvents(pane, true); // BIND trigger events to close sliding-pane
- else if (!s.isMoving)
- open(pane, true); // true = slide - open() will handle binding
- };
- }
-
-, slideClose = function (evt_or_pane) {
- if (!isInitialized()) return;
- var evt = evtObj(evt_or_pane)
- , pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- , delay = s.isMoving ? 1000 : 300 // MINIMUM delay - option may override
- ;
- if (pane === "center") return; // validate
- if (s.isClosed || s.isResizing)
- return; // skip if already closed OR in process of resizing
- else if (o.slideTrigger_close === "click")
- close_NOW(); // close immediately onClick
- else if (o.preventQuickSlideClose && s.isMoving)
- return; // handle Chrome quick-close on slide-open
- else if (o.preventPrematureSlideClose && evt && $.layout.isMouseOverElem(evt, $Ps[pane]))
- return; // handle incorrect mouseleave trigger, like when over a SELECT-list in IE
- else if (evt) // trigger = mouseleave - use a delay
- // 1 sec delay if 'opening', else .3 sec
- timer.set(pane+"_closeSlider", close_NOW, max(o.slideDelay_close, delay));
- else // called programically
- close_NOW();
-
- /**
- * SUBROUTINE for timed close
- */
- function close_NOW () {
- if (s.isClosed) // skip 'close' if already closed!
- bindStopSlidingEvents(pane, false); // UNBIND trigger events - TODO: is this needed here?
- else if (!s.isMoving)
- close(pane); // close will handle unbinding
- };
- }
-
- /**
- * @param {(string|Object)} evt_or_pane The pane being opened, ie: north, south, east, or west
- */
-, slideToggle = function (evt_or_pane) {
- var pane = evtPane.call(this, evt_or_pane);
- toggle(pane, true);
- }
-
-
- /**
- * Must set left/top on East/South panes so animation will work properly
- *
- * @param {string} pane The pane to lock, 'east' or 'south' - any other is ignored!
- * @param {boolean} doLock true = set left/top, false = remove
- */
-, lockPaneForFX = function (pane, doLock) {
- var $P = $Ps[pane]
- , s = state[pane]
- , o = options[pane]
- , z = options.zIndexes
- ;
- if (doLock) {
- showMasks( pane, { animation: true, objectsOnly: true });
- $P.css({ zIndex: z.pane_animate }); // overlay all elements during animation
- if (pane=="south")
- $P.css({ top: sC.inset.top + sC.innerHeight - $P.outerHeight() });
- else if (pane=="east")
- $P.css({ left: sC.inset.left + sC.innerWidth - $P.outerWidth() });
- }
- else { // animation DONE - RESET CSS
- hideMasks();
- $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
- if (pane=="south")
- $P.css({ top: "auto" });
- // if pane is positioned 'off-screen', then DO NOT screw with it!
- else if (pane=="east" && !$P.css("left").match(/\-99999/))
- $P.css({ left: "auto" });
- // fix anti-aliasing in IE - only needed for animations that change opacity
- if (browser.msie && o.fxOpacityFix && o.fxName_open != "slide" && $P.css("filter") && $P.css("opacity") == 1)
- $P[0].style.removeAttribute('filter');
- }
- }
-
-
- /**
- * Toggle sliding functionality of a specific pane on/off by adding removing 'slide open' trigger
- *
- * @see open(), close()
- * @param {string} pane The pane to enable/disable, 'north', 'south', etc.
- * @param {boolean} enable Enable or Disable sliding?
- */
-, bindStartSlidingEvents = function (pane, enable) {
- var o = options[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , evtName = o.slideTrigger_open.toLowerCase()
- ;
- if (!$R || (enable && !o.slidable)) return;
-
- // make sure we have a valid event
- if (evtName.match(/mouseover/))
- evtName = o.slideTrigger_open = "mouseenter";
- else if (!evtName.match(/(click|dblclick|mouseenter)/))
- evtName = o.slideTrigger_open = "click";
-
- // must remove double-click-toggle when using dblclick-slide
- if (o.resizerDblClickToggle && evtName.match(/click/)) {
- $R[enable ? "unbind" : "bind"]('dblclick.'+ sID, toggle)
- }
-
- $R
- // add or remove event
- [enable ? "bind" : "unbind"](evtName +'.'+ sID, slideOpen)
- // set the appropriate cursor & title/tip
- .css("cursor", enable ? o.sliderCursor : "default")
- .attr("title", enable ? o.tips.Slide : "")
- ;
- }
-
- /**
- * Add or remove 'mouseleave' events to 'slide close' when pane is 'sliding' open or closed
- * Also increases zIndex when pane is sliding open
- * See bindStartSlidingEvents for code to control 'slide open'
- *
- * @see slideOpen(), slideClose()
- * @param {string} pane The pane to process, 'north', 'south', etc.
- * @param {boolean} enable Enable or Disable events?
- */
-, bindStopSlidingEvents = function (pane, enable) {
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , z = options.zIndexes
- , evtName = o.slideTrigger_close.toLowerCase()
- , action = (enable ? "bind" : "unbind")
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- ;
- timer.clear(pane+"_closeSlider"); // just in case
-
- if (enable) {
- s.isSliding = true;
- state.panesSliding[pane] = true;
- // remove 'slideOpen' event from resizer
- // ALSO will raise the zIndex of the pane & resizer
- bindStartSlidingEvents(pane, false);
- }
- else {
- s.isSliding = false;
- delete state.panesSliding[pane];
- }
-
- // RE/SET zIndex - increases when pane is sliding-open, resets to normal when not
- $P.css("zIndex", enable ? z.pane_sliding : z.pane_normal);
- $R.css("zIndex", enable ? z.pane_sliding+2 : z.resizer_normal); // NOTE: mask = pane_sliding+1
-
- // make sure we have a valid event
- if (!evtName.match(/(click|mouseleave)/))
- evtName = o.slideTrigger_close = "mouseleave"; // also catches 'mouseout'
-
- // add/remove slide triggers
- $R[action](evtName, slideClose); // base event on resize
- // need extra events for mouseleave
- if (evtName === "mouseleave") {
- // also close on pane.mouseleave
- $P[action]("mouseleave."+ sID, slideClose);
- // cancel timer when mouse moves between 'pane' and 'resizer'
- $R[action]("mouseenter."+ sID, cancelMouseOut);
- $P[action]("mouseenter."+ sID, cancelMouseOut);
- }
-
- if (!enable)
- timer.clear(pane+"_closeSlider");
- else if (evtName === "click" && !o.resizable) {
- // IF pane is not resizable (which already has a cursor and tip)
- // then set the a cursor & title/tip on resizer when sliding
- $R.css("cursor", enable ? o.sliderCursor : "default");
- $R.attr("title", enable ? o.tips.Close : ""); // use Toggler-tip, eg: "Close Pane"
- }
-
- // SUBROUTINE for mouseleave timer clearing
- function cancelMouseOut (evt) {
- timer.clear(pane+"_closeSlider");
- evt.stopPropagation();
- }
- }
-
-
- /**
- * Hides/closes a pane if there is insufficient room - reverses this when there is room again
- * MUST have already called setSizeLimits() before calling this method
- *
- * @param {string} pane The pane being resized
- * @param {boolean=} [isOpening=false] Called from onOpen?
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [force=false]
- */
-, makePaneFit = function (pane, isOpening, skipCallback, force) {
- var o = options[pane]
- , s = state[pane]
- , c = _c[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , isSidePane = c.dir==="vert"
- , hasRoom = false
- ;
- // special handling for center & east/west panes
- if (pane === "center" || (isSidePane && s.noVerticalRoom)) {
- // see if there is enough room to display the pane
- // ERROR: hasRoom = s.minHeight <= s.maxHeight && (isSidePane || s.minWidth <= s.maxWidth);
- hasRoom = (s.maxHeight >= 0);
- if (hasRoom && s.noRoom) { // previously hidden due to noRoom, so show now
- _showPane(pane);
- if ($R) $R.show();
- s.isVisible = true;
- s.noRoom = false;
- if (isSidePane) s.noVerticalRoom = false;
- _fixIframe(pane);
- }
- else if (!hasRoom && !s.noRoom) { // not currently hidden, so hide now
- _hidePane(pane);
- if ($R) $R.hide();
- s.isVisible = false;
- s.noRoom = true;
- }
- }
-
- // see if there is enough room to fit the border-pane
- if (pane === "center") {
- // ignore center in this block
- }
- else if (s.minSize <= s.maxSize) { // pane CAN fit
- hasRoom = true;
- if (s.size > s.maxSize) // pane is too big - shrink it
- sizePane(pane, s.maxSize, skipCallback, true, force); // true = noAnimation
- else if (s.size < s.minSize) // pane is too small - enlarge it
- sizePane(pane, s.minSize, skipCallback, true, force); // true = noAnimation
- // need s.isVisible because new pseudoClose method keeps pane visible, but off-screen
- else if ($R && s.isVisible && $P.is(":visible")) {
- // make sure resizer-bar is positioned correctly
- // handles situation where nested layout was 'hidden' when initialized
- var pos = s.size + sC.inset[c.side];
- if ($.layout.cssNum( $R, c.side ) != pos) $R.css( c.side, pos );
- }
-
- // if was previously hidden due to noRoom, then RESET because NOW there is room
- if (s.noRoom) {
- // s.noRoom state will be set by open or show
- if (s.wasOpen && o.closable) {
- if (o.autoReopen)
- open(pane, false, true, true); // true = noAnimation, true = noAlert
- else // leave the pane closed, so just update state
- s.noRoom = false;
- }
- else
- show(pane, s.wasOpen, true, true); // true = noAnimation, true = noAlert
- }
- }
- else { // !hasRoom - pane CANNOT fit
- if (!s.noRoom) { // pane not set as noRoom yet, so hide or close it now...
- s.noRoom = true; // update state
- s.wasOpen = !s.isClosed && !s.isSliding;
- if (s.isClosed){} // SKIP
- else if (o.closable) // 'close' if possible
- close(pane, true, true); // true = force, true = noAnimation
- else // 'hide' pane if cannot just be closed
- hide(pane, true); // true = noAnimation
- }
- }
- }
-
-
- /**
- * manualSizePane is an exposed flow-through method allowing extra code when pane is 'manually resized'
- *
- * @param {(string|Object)} evt_or_pane The pane being resized
- * @param {number} size The *desired* new size for this pane - will be validated
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [force=false] Force resizing even if does not seem necessary
- */
-, manualSizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , o = options[pane]
- , s = state[pane]
- // if resizing callbacks have been delayed and resizing is now DONE, force resizing to complete...
- , forceResize = force || (o.livePaneResizing && !s.isResizing)
- ;
- if (pane === "center") return; // validate
- // ANY call to manualSizePane disables autoResize - ie, percentage sizing
- s.autoResize = false;
- // flow-through...
- sizePane(pane, size, skipCallback, noAnimation, forceResize); // will animate resize if option enabled
- }
-
- /**
- * sizePane is called only by internal methods whenever a pane needs to be resized
- *
- * @param {(string|Object)} evt_or_pane The pane being resized
- * @param {number} size The *desired* new size for this pane - will be validated
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [noAnimation=false]
- * @param {boolean=} [force=false] Force resizing even if does not seem necessary
- */
-, sizePane = function (evt_or_pane, size, skipCallback, noAnimation, force) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane) // probably NEVER called from event?
- , o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , side = _c[pane].side
- , dimName = _c[pane].sizeType.toLowerCase()
- , skipResizeWhileDragging = s.isResizing && !o.triggerEventsDuringLiveResize
- , doFX = noAnimation !== true && o.animatePaneSizing
- , oldSize, newSize
- ;
- if (pane === "center") return; // validate
- // QUEUE in case another action/animation is in progress
- $N.queue(function( queueNext ){
- // calculate 'current' min/max sizes
- setSizeLimits(pane); // update pane-state
- oldSize = s.size;
- size = _parseSize(pane, size); // handle percentages & auto
- size = max(size, _parseSize(pane, o.minSize));
- size = min(size, s.maxSize);
- if (size < s.minSize) { // not enough room for pane!
- queueNext(); // call before makePaneFit() because it needs the queue free
- makePaneFit(pane, false, skipCallback); // will hide or close pane
- return;
- }
-
- // IF newSize is same as oldSize, then nothing to do - abort
- if (!force && size === oldSize)
- return queueNext();
-
- s.newSize = size;
-
- // onresize_start callback CANNOT cancel resizing because this would break the layout!
- if (!skipCallback && state.initialized && s.isVisible)
- _runCallbacks("onresize_start", pane);
-
- // resize the pane, and make sure its visible
- newSize = cssSize(pane, size);
-
- if (doFX && $P.is(":visible")) { // ANIMATE
- var fx = $.layout.effects.size[pane] || $.layout.effects.size.all
- , easing = o.fxSettings_size.easing || fx.easing
- , z = options.zIndexes
- , props = {};
- props[ dimName ] = newSize +'px';
- s.isMoving = true;
- // overlay all elements during animation
- $P.css({ zIndex: z.pane_animate })
- .show().animate( props, o.fxSpeed_size, easing, function(){
- // reset zIndex after animation
- $P.css({ zIndex: (s.isSliding ? z.pane_sliding : z.pane_normal) });
- s.isMoving = false;
- delete s.newSize;
- sizePane_2(); // continue
- queueNext();
- });
- }
- else { // no animation
- $P.css( dimName, newSize ); // resize pane
- delete s.newSize;
- // if pane is visible, then
- if ($P.is(":visible"))
- sizePane_2(); // continue
- else {
- // pane is NOT VISIBLE, so just update state data...
- // when pane is *next opened*, it will have the new size
- s.size = size; // update state.size
- //$.extend(s, elDims($P)); // update state dimensions - CANNOT do this when not visible! }
- }
- queueNext();
- };
-
- });
-
- // SUBROUTINE
- function sizePane_2 () {
- /* Panes are sometimes not sized precisely in some browsers!?
- * This code will resize the pane up to 3 times to nudge the pane to the correct size
- */
- var actual = dimName==='width' ? $P.outerWidth() : $P.outerHeight()
- , tries = [{
- pane: pane
- , count: 1
- , target: size
- , actual: actual
- , correct: (size === actual)
- , attempt: size
- , cssSize: newSize
- }]
- , lastTry = tries[0]
- , thisTry = {}
- , msg = 'Inaccurate size after resizing the '+ pane +'-pane.'
- ;
- while ( !lastTry.correct ) {
- thisTry = { pane: pane, count: lastTry.count+1, target: size };
-
- if (lastTry.actual > size)
- thisTry.attempt = max(0, lastTry.attempt - (lastTry.actual - size));
- else // lastTry.actual < size
- thisTry.attempt = max(0, lastTry.attempt + (size - lastTry.actual));
-
- thisTry.cssSize = cssSize(pane, thisTry.attempt);
- $P.css( dimName, thisTry.cssSize );
-
- thisTry.actual = dimName=='width' ? $P.outerWidth() : $P.outerHeight();
- thisTry.correct = (size === thisTry.actual);
-
- // log attempts and alert the user of this *non-fatal error* (if showDebugMessages)
- if ( tries.length === 1) {
- _log(msg, false, true);
- _log(lastTry, false, true);
- }
- _log(thisTry, false, true);
- // after 4 tries, is as close as its gonna get!
- if (tries.length > 3) break;
-
- tries.push( thisTry );
- lastTry = tries[ tries.length - 1 ];
- }
- // END TESTING CODE
-
- // update pane-state dimensions
- s.size = size;
- $.extend(s, elDims($P));
-
- if (s.isVisible && $P.is(":visible")) {
- // reposition the resizer-bar
- if ($R) $R.css( side, size + sC.inset[side] );
- // resize the content-div
- sizeContent(pane);
- }
-
- if (!skipCallback && !skipResizeWhileDragging && state.initialized && s.isVisible)
- _runCallbacks("onresize_end", pane);
-
- // resize all the adjacent panes, and adjust their toggler buttons
- // when skipCallback passed, it means the controlling method will handle 'other panes'
- if (!skipCallback) {
- // also no callback if live-resize is in progress and NOT triggerEventsDuringLiveResize
- if (!s.isSliding) sizeMidPanes(_c[pane].dir=="horz" ? "" : "center", skipResizeWhileDragging, force);
- sizeHandles();
- }
-
- // if opposite-pane was autoClosed, see if it can be autoOpened now
- var altPane = _c.oppositeEdge[pane];
- if (size < oldSize && state[ altPane ].noRoom) {
- setSizeLimits( altPane );
- makePaneFit( altPane, false, skipCallback );
- }
-
- // DEBUG - ALERT user/developer so they know there was a sizing problem
- if (tries.length > 1)
- _log(msg +'\nSee the Error Console for details.', true, true);
- }
- }
-
- /**
- * @see initPanes(), sizePane(), resizeAll(), open(), close(), hide()
- * @param {(Array.<string>|string)} panes The pane(s) being resized, comma-delmited string
- * @param {boolean=} [skipCallback=false] Should the onresize callback be run?
- * @param {boolean=} [force=false]
- */
-, sizeMidPanes = function (panes, skipCallback, force) {
- panes = (panes ? panes : "east,west,center").split(",");
-
- $.each(panes, function (i, pane) {
- if (!$Ps[pane]) return; // NO PANE - skip
- var
- o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , isCenter= (pane=="center")
- , hasRoom = true
- , CSS = {}
- // if pane is not visible, show it invisibly NOW rather than for *each call* in this script
- , visCSS = $.layout.showInvisibly($P)
-
- , newCenter = calcNewCenterPaneDims()
- ;
-
- // update pane-state dimensions
- $.extend(s, elDims($P));
-
- if (pane === "center") {
- if (!force && s.isVisible && newCenter.width === s.outerWidth && newCenter.height === s.outerHeight) {
- $P.css(visCSS);
- return true; // SKIP - pane already the correct size
- }
- // set state for makePaneFit() logic
- $.extend(s, cssMinDims(pane), {
- maxWidth: newCenter.width
- , maxHeight: newCenter.height
- });
- CSS = newCenter;
- s.newWidth = CSS.width;
- s.newHeight = CSS.height;
- // convert OUTER width/height to CSS width/height
- CSS.width = cssW($P, CSS.width);
- // NEW - allow pane to extend 'below' visible area rather than hide it
- CSS.height = cssH($P, CSS.height);
- hasRoom = CSS.width >= 0 && CSS.height >= 0; // height >= 0 = ALWAYS TRUE NOW
-
- // during layout init, try to shrink east/west panes to make room for center
- if (!state.initialized && o.minWidth > newCenter.width) {
- var
- reqPx = o.minWidth - s.outerWidth
- , minE = options.east.minSize || 0
- , minW = options.west.minSize || 0
- , sizeE = state.east.size
- , sizeW = state.west.size
- , newE = sizeE
- , newW = sizeW
- ;
- if (reqPx > 0 && state.east.isVisible && sizeE > minE) {
- newE = max( sizeE-minE, sizeE-reqPx );
- reqPx -= sizeE-newE;
- }
- if (reqPx > 0 && state.west.isVisible && sizeW > minW) {
- newW = max( sizeW-minW, sizeW-reqPx );
- reqPx -= sizeW-newW;
- }
- // IF we found enough extra space, then resize the border panes as calculated
- if (reqPx === 0) {
- if (sizeE && sizeE != minE)
- sizePane('east', newE, true, true, force); // true = skipCallback/noAnimation - initPanes will handle when done
- if (sizeW && sizeW != minW)
- sizePane('west', newW, true, true, force); // true = skipCallback/noAnimation
- // now start over!
- sizeMidPanes('center', skipCallback, force);
- $P.css(visCSS);
- return; // abort this loop
- }
- }
- }
- else { // for east and west, set only the height, which is same as center height
- // set state.min/maxWidth/Height for makePaneFit() logic
- if (s.isVisible && !s.noVerticalRoom)
- $.extend(s, elDims($P), cssMinDims(pane))
- if (!force && !s.noVerticalRoom && newCenter.height === s.outerHeight) {
- $P.css(visCSS);
- return true; // SKIP - pane already the correct size
- }
- // east/west have same top, bottom & height as center
- CSS.top = newCenter.top;
- CSS.bottom = newCenter.bottom;
- s.newSize = newCenter.height
- // NEW - allow pane to extend 'below' visible area rather than hide it
- CSS.height = cssH($P, newCenter.height);
- s.maxHeight = CSS.height;
- hasRoom = (s.maxHeight >= 0); // ALWAYS TRUE NOW
- if (!hasRoom) s.noVerticalRoom = true; // makePaneFit() logic
- }
-
- if (hasRoom) {
- // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
- if (!skipCallback && state.initialized)
- _runCallbacks("onresize_start", pane);
-
- $P.css(CSS); // apply the CSS to pane
- if (pane !== "center")
- sizeHandles(pane); // also update resizer length
- if (s.noRoom && !s.isClosed && !s.isHidden)
- makePaneFit(pane); // will re-open/show auto-closed/hidden pane
- if (s.isVisible) {
- $.extend(s, elDims($P)); // update pane dimensions
- if (state.initialized) sizeContent(pane); // also resize the contents, if exists
- }
- }
- else if (!s.noRoom && s.isVisible) // no room for pane
- makePaneFit(pane); // will hide or close pane
-
- // reset visibility, if necessary
- $P.css(visCSS);
-
- delete s.newSize;
- delete s.newWidth;
- delete s.newHeight;
-
- if (!s.isVisible)
- return true; // DONE - next pane
-
- /*
- * Extra CSS for IE6 or IE7 in Quirks-mode - add 'width' to NORTH/SOUTH panes
- * Normally these panes have only 'left' & 'right' positions so pane auto-sizes
- * ALSO required when pane is an IFRAME because will NOT default to 'full width'
- * TODO: Can I use width:100% for a north/south iframe?
- * TODO: Sounds like a job for $P.outerWidth( sC.innerWidth ) SETTER METHOD
- */
- if (pane === "center") { // finished processing midPanes
- var fix = browser.isIE6 || !browser.boxModel;
- if ($Ps.north && (fix || state.north.tagName=="IFRAME"))
- $Ps.north.css("width", cssW($Ps.north, sC.innerWidth));
- if ($Ps.south && (fix || state.south.tagName=="IFRAME"))
- $Ps.south.css("width", cssW($Ps.south, sC.innerWidth));
- }
-
- // resizeAll passes skipCallback because it triggers callbacks after ALL panes are resized
- if (!skipCallback && state.initialized)
- _runCallbacks("onresize_end", pane);
- });
- }
-
-
- /**
- * @see window.onresize(), callbacks or custom code
- * @param {(Object|boolean)=} evt_or_refresh If 'true', then also reset pane-positioning
- */
-, resizeAll = function (evt_or_refresh) {
- var oldW = sC.innerWidth
- , oldH = sC.innerHeight
- ;
- // stopPropagation if called by trigger("layoutdestroy") - use evtPane utility
- evtPane(evt_or_refresh);
-
- // cannot size layout when 'container' is hidden or collapsed
- if (!$N.is(":visible")) return;
-
- if (!state.initialized) {
- _initLayoutElements();
- return; // no need to resize since we just initialized!
- }
-
- if (evt_or_refresh === true && $.isPlainObject(options.outset)) {
- // update container CSS in case outset option has changed
- $N.css( options.outset );
- }
- // UPDATE container dimensions
- $.extend(sC, elDims( $N, options.inset ));
- if (!sC.outerHeight) return;
-
- // if 'true' passed, refresh pane & handle positioning too
- if (evt_or_refresh === true) {
- setPanePosition();
- }
-
- // onresizeall_start will CANCEL resizing if returns false
- // state.container has already been set, so user can access this info for calcuations
- if (false === _runCallbacks("onresizeall_start")) return false;
-
- var // see if container is now 'smaller' than before
- shrunkH = (sC.innerHeight < oldH)
- , shrunkW = (sC.innerWidth < oldW)
- , $P, o, s
- ;
- // NOTE special order for sizing: S-N-E-W
- $.each(["south","north","east","west"], function (i, pane) {
- if (!$Ps[pane]) return; // no pane - SKIP
- o = options[pane];
- s = state[pane];
- if (s.autoResize && s.size != o.size) // resize pane to original size set in options
- sizePane(pane, o.size, true, true, true); // true=skipCallback/noAnimation/forceResize
- else {
- setSizeLimits(pane);
- makePaneFit(pane, false, true, true); // true=skipCallback/forceResize
- }
- });
-
- sizeMidPanes("", true, true); // true=skipCallback/forceResize
- sizeHandles(); // reposition the toggler elements
-
- // trigger all individual pane callbacks AFTER layout has finished resizing
- $.each(_c.allPanes, function (i, pane) {
- $P = $Ps[pane];
- if (!$P) return; // SKIP
- if (state[pane].isVisible) // undefined for non-existent panes
- _runCallbacks("onresize_end", pane); // callback - if exists
- });
-
- _runCallbacks("onresizeall_end");
- //_triggerLayoutEvent(pane, 'resizeall');
- }
-
- /**
- * Whenever a pane resizes or opens that has a nested layout, trigger resizeAll
- *
- * @param {(string|Object)} evt_or_pane The pane just resized or opened
- */
-, resizeChildren = function (evt_or_pane, skipRefresh) {
- var pane = evtPane.call(this, evt_or_pane);
-
- if (!options[pane].resizeChildren) return;
-
- // ensure the pane-children are up-to-date
- if (!skipRefresh) refreshChildren( pane );
- var pC = children[pane];
- if ($.isPlainObject( pC )) {
- // resize one or more children
- $.each( pC, function (key, child) {
- if (!child.destroyed) child.resizeAll();
- });
- }
- }
-
- /**
- * IF pane has a content-div, then resize all elements inside pane to fit pane-height
- *
- * @param {(string|Object)} evt_or_panes The pane(s) being resized
- * @param {boolean=} [remeasure=false] Should the content (header/footer) be remeasured?
- */
-, sizeContent = function (evt_or_panes, remeasure) {
- if (!isInitialized()) return;
-
- var panes = evtPane.call(this, evt_or_panes);
- panes = panes ? panes.split(",") : _c.allPanes;
-
- $.each(panes, function (idx, pane) {
- var
- $P = $Ps[pane]
- , $C = $Cs[pane]
- , o = options[pane]
- , s = state[pane]
- , m = s.content // m = measurements
- ;
- if (!$P || !$C || !$P.is(":visible")) return true; // NOT VISIBLE - skip
-
- // if content-element was REMOVED, update OR remove the pointer
- if (!$C.length) {
- initContent(pane, false); // false = do NOT sizeContent() - already there!
- if (!$C) return; // no replacement element found - pointer have been removed
- }
-
- // onsizecontent_start will CANCEL resizing if returns false
- if (false === _runCallbacks("onsizecontent_start", pane)) return;
-
- // skip re-measuring offsets if live-resizing
- if ((!s.isMoving && !s.isResizing) || o.liveContentResizing || remeasure || m.top == undefined) {
- _measure();
- // if any footers are below pane-bottom, they may not measure correctly,
- // so allow pane overflow and re-measure
- if (m.hiddenFooters > 0 && $P.css("overflow") === "hidden") {
- $P.css("overflow", "visible");
- _measure(); // remeasure while overflowing
- $P.css("overflow", "hidden");
- }
- }
- // NOTE: spaceAbove/Below *includes* the pane paddingTop/Bottom, but not pane.borders
- var newH = s.innerHeight - (m.spaceAbove - s.css.paddingTop) - (m.spaceBelow - s.css.paddingBottom);
-
- if (!$C.is(":visible") || m.height != newH) {
- // size the Content element to fit new pane-size - will autoHide if not enough room
- setOuterHeight($C, newH, true); // true=autoHide
- m.height = newH; // save new height
- };
-
- if (state.initialized)
- _runCallbacks("onsizecontent_end", pane);
-
- function _below ($E) {
- return max(s.css.paddingBottom, (parseInt($E.css("marginBottom"), 10) || 0));
- };
-
- function _measure () {
- var
- ignore = options[pane].contentIgnoreSelector
- , $Fs = $C.nextAll().not(".ui-layout-mask").not(ignore || ":lt(0)") // not :lt(0) = ALL
- , $Fs_vis = $Fs.filter(':visible')
- , $F = $Fs_vis.filter(':last')
- ;
- m = {
- top: $C[0].offsetTop
- , height: $C.outerHeight()
- , numFooters: $Fs.length
- , hiddenFooters: $Fs.length - $Fs_vis.length
- , spaceBelow: 0 // correct if no content footer ($E)
- }
- m.spaceAbove = m.top; // just for state - not used in calc
- m.bottom = m.top + m.height;
- if ($F.length)
- //spaceBelow = (LastFooter.top + LastFooter.height) [footerBottom] - Content.bottom + max(LastFooter.marginBottom, pane.paddingBotom)
- m.spaceBelow = ($F[0].offsetTop + $F.outerHeight()) - m.bottom + _below($F);
- else // no footer - check marginBottom on Content element itself
- m.spaceBelow = _below($C);
- };
- });
- }
-
-
- /**
- * Called every time a pane is opened, closed, or resized to slide the togglers to 'center' and adjust their length if necessary
- *
- * @see initHandles(), open(), close(), resizeAll()
- * @param {(string|Object)=} evt_or_panes The pane(s) being resized
- */
-, sizeHandles = function (evt_or_panes) {
- var panes = evtPane.call(this, evt_or_panes)
- panes = panes ? panes.split(",") : _c.borderPanes;
-
- $.each(panes, function (i, pane) {
- var
- o = options[pane]
- , s = state[pane]
- , $P = $Ps[pane]
- , $R = $Rs[pane]
- , $T = $Ts[pane]
- , $TC
- ;
- if (!$P || !$R) return;
-
- var
- dir = _c[pane].dir
- , _state = (s.isClosed ? "_closed" : "_open")
- , spacing = o["spacing"+ _state]
- , togAlign = o["togglerAlign"+ _state]
- , togLen = o["togglerLength"+ _state]
- , paneLen
- , left
- , offset
- , CSS = {}
- ;
-
- if (spacing === 0) {
- $R.hide();
- return;
- }
- else if (!s.noRoom && !s.isHidden) // skip if resizer was hidden for any reason
- $R.show(); // in case was previously hidden
-
- // Resizer Bar is ALWAYS same width/height of pane it is attached to
- if (dir === "horz") { // north/south
- //paneLen = $P.outerWidth(); // s.outerWidth ||
- paneLen = sC.innerWidth; // handle offscreen-panes
- s.resizerLength = paneLen;
- left = $.layout.cssNum($P, "left")
- $R.css({
- width: cssW($R, paneLen) // account for borders & padding
- , height: cssH($R, spacing) // ditto
- , left: left > -9999 ? left : sC.inset.left // handle offscreen-panes
- });
- }
- else { // east/west
- paneLen = $P.outerHeight(); // s.outerHeight ||
- s.resizerLength = paneLen;
- $R.css({
- height: cssH($R, paneLen) // account for borders & padding
- , width: cssW($R, spacing) // ditto
- , top: sC.inset.top + getPaneSize("north", true) // TODO: what if no North pane?
- //, top: $.layout.cssNum($Ps["center"], "top")
- });
- }
-
- // remove hover classes
- removeHover( o, $R );
-
- if ($T) {
- if (togLen === 0 || (s.isSliding && o.hideTogglerOnSlide)) {
- $T.hide(); // always HIDE the toggler when 'sliding'
- return;
- }
- else
- $T.show(); // in case was previously hidden
-
- if (!(togLen > 0) || togLen === "100%" || togLen > paneLen) {
- togLen = paneLen;
- offset = 0;
- }
- else { // calculate 'offset' based on options.PANE.togglerAlign_open/closed
- if (isStr(togAlign)) {
- switch (togAlign) {
- case "top":
- case "left": offset = 0;
- break;
- case "bottom":
- case "right": offset = paneLen - togLen;
- break;
- case "middle":
- case "center":
- default: offset = round((paneLen - togLen) / 2); // 'default' catches typos
- }
- }
- else { // togAlign = number
- var x = parseInt(togAlign, 10); //
- if (togAlign >= 0) offset = x;
- else offset = paneLen - togLen + x; // NOTE: x is negative!
- }
- }
-
- if (dir === "horz") { // north/south
- var width = cssW($T, togLen);
- $T.css({
- width: width // account for borders & padding
- , height: cssH($T, spacing) // ditto
- , left: offset // TODO: VERIFY that toggler positions correctly for ALL values
- , top: 0
- });
- // CENTER the toggler content SPAN
- $T.children(".content").each(function(){
- $TC = $(this);
- $TC.css("marginLeft", round((width-$TC.outerWidth())/2)); // could be negative
- });
- }
- else { // east/west
- var height = cssH($T, togLen);
- $T.css({
- height: height // account for borders & padding
- , width: cssW($T, spacing) // ditto
- , top: offset // POSITION the toggler
- , left: 0
- });
- // CENTER the toggler content SPAN
- $T.children(".content").each(function(){
- $TC = $(this);
- $TC.css("marginTop", round((height-$TC.outerHeight())/2)); // could be negative
- });
- }
-
- // remove ALL hover classes
- removeHover( 0, $T );
- }
-
- // DONE measuring and sizing this resizer/toggler, so can be 'hidden' now
- if (!state.initialized && (o.initHidden || s.isHidden)) {
- $R.hide();
- if ($T) $T.hide();
- }
- });
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableClosable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $T = $Ts[pane]
- , o = options[pane]
- ;
- if (!$T) return;
- o.closable = true;
- $T .bind("click."+ sID, function(evt){ evt.stopPropagation(); toggle(pane); })
- .css("visibility", "visible")
- .css("cursor", "pointer")
- .attr("title", state[pane].isClosed ? o.tips.Open : o.tips.Close) // may be blank
- .show();
- }
- /**
- * @param {(string|Object)} evt_or_pane
- * @param {boolean=} [hide=false]
- */
-, disableClosable = function (evt_or_pane, hide) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $T = $Ts[pane]
- ;
- if (!$T) return;
- options[pane].closable = false;
- // is closable is disable, then pane MUST be open!
- if (state[pane].isClosed) open(pane, false, true);
- $T .unbind("."+ sID)
- .css("visibility", hide ? "hidden" : "visible") // instead of hide(), which creates logic issues
- .css("cursor", "default")
- .attr("title", "");
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableSlidable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- options[pane].slidable = true;
- if (state[pane].isClosed)
- bindStartSlidingEvents(pane, true);
- }
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, disableSlidable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R) return;
- options[pane].slidable = false;
- if (state[pane].isSliding)
- close(pane, false, true);
- else {
- bindStartSlidingEvents(pane, false);
- $R .css("cursor", "default")
- .attr("title", "");
- removeHover(null, $R[0]); // in case currently hovered
- }
- }
-
-
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, enableResizable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- , o = options[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- o.resizable = true;
- $R.draggable("enable");
- if (!state[pane].isClosed)
- $R .css("cursor", o.resizerCursor)
- .attr("title", o.tips.Resize);
- }
- /**
- * @param {(string|Object)} evt_or_pane
- */
-, disableResizable = function (evt_or_pane) {
- if (!isInitialized()) return;
- var pane = evtPane.call(this, evt_or_pane)
- , $R = $Rs[pane]
- ;
- if (!$R || !$R.data('draggable')) return;
- options[pane].resizable = false;
- $R .draggable("disable")
- .css("cursor", "default")
- .attr("title", "");
- removeHover(null, $R[0]); // in case currently hovered
- }
-
-
- /**
- * Move a pane from source-side (eg, west) to target-side (eg, east)
- * If pane exists on target-side, move that to source-side, ie, 'swap' the panes
- *
- * @param {(string|Object)} evt_or_pane1 The pane/edge being swapped
- * @param {string} pane2 ditto
- */
-, swapPanes = function (evt_or_pane1, pane2) {
- if (!isInitialized()) return;
- var pane1 = evtPane.call(this, evt_or_pane1);
- // change state.edge NOW so callbacks can know where pane is headed...
- state[pane1].edge = pane2;
- state[pane2].edge = pane1;
- // run these even if NOT state.initialized
- if (false === _runCallbacks("onswap_start", pane1)
- || false === _runCallbacks("onswap_start", pane2)
- ) {
- state[pane1].edge = pane1; // reset
- state[pane2].edge = pane2;
- return;
- }
-
- var
- oPane1 = copy( pane1 )
- , oPane2 = copy( pane2 )
- , sizes = {}
- ;
- sizes[pane1] = oPane1 ? oPane1.state.size : 0;
- sizes[pane2] = oPane2 ? oPane2.state.size : 0;
-
- // clear pointers & state
- $Ps[pane1] = false;
- $Ps[pane2] = false;
- state[pane1] = {};
- state[pane2] = {};
-
- // ALWAYS remove the resizer & toggler elements
- if ($Ts[pane1]) $Ts[pane1].remove();
- if ($Ts[pane2]) $Ts[pane2].remove();
- if ($Rs[pane1]) $Rs[pane1].remove();
- if ($Rs[pane2]) $Rs[pane2].remove();
- $Rs[pane1] = $Rs[pane2] = $Ts[pane1] = $Ts[pane2] = false;
-
- // transfer element pointers and data to NEW Layout keys
- move( oPane1, pane2 );
- move( oPane2, pane1 );
-
- // cleanup objects
- oPane1 = oPane2 = sizes = null;
-
- // make panes 'visible' again
- if ($Ps[pane1]) $Ps[pane1].css(_c.visible);
- if ($Ps[pane2]) $Ps[pane2].css(_c.visible);
-
- // fix any size discrepancies caused by swap
- resizeAll();
-
- // run these even if NOT state.initialized
- _runCallbacks("onswap_end", pane1);
- _runCallbacks("onswap_end", pane2);
-
- return;
-
- function copy (n) { // n = pane
- var
- $P = $Ps[n]
- , $C = $Cs[n]
- ;
- return !$P ? false : {
- pane: n
- , P: $P ? $P[0] : false
- , C: $C ? $C[0] : false
- , state: $.extend(true, {}, state[n])
- , options: $.extend(true, {}, options[n])
- }
- };
-
- function move (oPane, pane) {
- if (!oPane) return;
- var
- P = oPane.P
- , C = oPane.C
- , oldPane = oPane.pane
- , c = _c[pane]
- // save pane-options that should be retained
- , s = $.extend(true, {}, state[pane])
- , o = options[pane]
- // RETAIN side-specific FX Settings - more below
- , fx = { resizerCursor: o.resizerCursor }
- , re, size, pos
- ;
- $.each("fxName,fxSpeed,fxSettings".split(","), function (i, k) {
- fx[k +"_open"] = o[k +"_open"];
- fx[k +"_close"] = o[k +"_close"];
- fx[k +"_size"] = o[k +"_size"];
- });
-
- // update object pointers and attributes
- $Ps[pane] = $(P)
- .data({
- layoutPane: Instance[pane] // NEW pointer to pane-alias-object
- , layoutEdge: pane
- })
- .css(_c.hidden)
- .css(c.cssReq)
- ;
- $Cs[pane] = C ? $(C) : false;
-
- // set options and state
- options[pane] = $.extend(true, {}, oPane.options, fx);
- state[pane] = $.extend(true, {}, oPane.state);
-
- // change classNames on the pane, eg: ui-layout-pane-east ==> ui-layout-pane-west
- re = new RegExp(o.paneClass +"-"+ oldPane, "g");
- P.className = P.className.replace(re, o.paneClass +"-"+ pane);
-
- // ALWAYS regenerate the resizer & toggler elements
- initHandles(pane); // create the required resizer & toggler
-
- // if moving to different orientation, then keep 'target' pane size
- if (c.dir != _c[oldPane].dir) {
- size = sizes[pane] || 0;
- setSizeLimits(pane); // update pane-state
- size = max(size, state[pane].minSize);
- // use manualSizePane to disable autoResize - not useful after panes are swapped
- manualSizePane(pane, size, true, true); // true/true = skipCallback/noAnimation
- }
- else // move the resizer here
- $Rs[pane].css(c.side, sC.inset[c.side] + (state[pane].isVisible ? getPaneSize(pane) : 0));
-
-
- // ADD CLASSNAMES & SLIDE-BINDINGS
- if (oPane.state.isVisible && !s.isVisible)
- setAsOpen(pane, true); // true = skipCallback
- else {
- setAsClosed(pane);
- bindStartSlidingEvents(pane, true); // will enable events IF option is set
- }
-
- // DESTROY the object
- oPane = null;
- };
- }
-
-
- /**
- * INTERNAL method to sync pin-buttons when pane is opened or closed
- * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
- *
- * @see open(), setAsOpen(), setAsClosed()
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin True means set the pin 'down', False means 'up'
- */
-, syncPinBtns = function (pane, doPin) {
- if ($.layout.plugins.buttons)
- $.each(state[pane].pins, function (i, selector) {
- $.layout.buttons.setPinState(Instance, $(selector), pane, doPin);
- });
- }
-
-; // END var DECLARATIONS
-
- /**
- * Capture keys when enableCursorHotkey - toggle pane if hotkey pressed
- *
- * @see document.keydown()
- */
- function keyDown (evt) {
- if (!evt) return true;
- var code = evt.keyCode;
- if (code < 33) return true; // ignore special keys: ENTER, TAB, etc
-
- var
- PANE = {
- 38: "north" // Up Cursor - $.ui.keyCode.UP
- , 40: "south" // Down Cursor - $.ui.keyCode.DOWN
- , 37: "west" // Left Cursor - $.ui.keyCode.LEFT
- , 39: "east" // Right Cursor - $.ui.keyCode.RIGHT
- }
- , ALT = evt.altKey // no worky!
- , SHIFT = evt.shiftKey
- , CTRL = evt.ctrlKey
- , CURSOR = (CTRL && code >= 37 && code <= 40)
- , o, k, m, pane
- ;
-
- if (CURSOR && options[PANE[code]].enableCursorHotkey) // valid cursor-hotkey
- pane = PANE[code];
- else if (CTRL || SHIFT) // check to see if this matches a custom-hotkey
- $.each(_c.borderPanes, function (i, p) { // loop each pane to check its hotkey
- o = options[p];
- k = o.customHotkey;
- m = o.customHotkeyModifier; // if missing or invalid, treated as "CTRL+SHIFT"
- if ((SHIFT && m=="SHIFT") || (CTRL && m=="CTRL") || (CTRL && SHIFT)) { // Modifier matches
- if (k && code === (isNaN(k) || k <= 9 ? k.toUpperCase().charCodeAt(0) : k)) { // Key matches
- pane = p;
- return false; // BREAK
- }
- }
- });
-
- // validate pane
- if (!pane || !$Ps[pane] || !options[pane].closable || state[pane].isHidden)
- return true;
-
- toggle(pane);
-
- evt.stopPropagation();
- evt.returnValue = false; // CANCEL key
- return false;
- };
-
-
-/*
- * ######################################
- * UTILITY METHODS
- * called externally or by initButtons
- * ######################################
- */
-
- /**
- * Change/reset a pane overflow setting & zIndex to allow popups/drop-downs to work
- *
- * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
- */
- function allowOverflow (el) {
- if (!isInitialized()) return;
- if (this && this.tagName) el = this; // BOUND to element
- var $P;
- if (isStr(el))
- $P = $Ps[el];
- else if ($(el).data("layoutRole"))
- $P = $(el);
- else
- $(el).parents().each(function(){
- if ($(this).data("layoutRole")) {
- $P = $(this);
- return false; // BREAK
- }
- });
- if (!$P || !$P.length) return; // INVALID
-
- var
- pane = $P.data("layoutEdge")
- , s = state[pane]
- ;
-
- // if pane is already raised, then reset it before doing it again!
- // this would happen if allowOverflow is attached to BOTH the pane and an element
- if (s.cssSaved)
- resetOverflow(pane); // reset previous CSS before continuing
-
- // if pane is raised by sliding or resizing, or its closed, then abort
- if (s.isSliding || s.isResizing || s.isClosed) {
- s.cssSaved = false;
- return;
- }
-
- var
- newCSS = { zIndex: (options.zIndexes.resizer_normal + 1) }
- , curCSS = {}
- , of = $P.css("overflow")
- , ofX = $P.css("overflowX")
- , ofY = $P.css("overflowY")
- ;
- // determine which, if any, overflow settings need to be changed
- if (of != "visible") {
- curCSS.overflow = of;
- newCSS.overflow = "visible";
- }
- if (ofX && !ofX.match(/(visible|auto)/)) {
- curCSS.overflowX = ofX;
- newCSS.overflowX = "visible";
- }
- if (ofY && !ofY.match(/(visible|auto)/)) {
- curCSS.overflowY = ofX;
- newCSS.overflowY = "visible";
- }
-
- // save the current overflow settings - even if blank!
- s.cssSaved = curCSS;
-
- // apply new CSS to raise zIndex and, if necessary, make overflow 'visible'
- $P.css( newCSS );
-
- // make sure the zIndex of all other panes is normal
- $.each(_c.allPanes, function(i, p) {
- if (p != pane) resetOverflow(p);
- });
-
- };
- /**
- * @param {Object=} [el] (optional) Can also be 'bound' to a click, mouseOver, or other event
- */
- function resetOverflow (el) {
- if (!isInitialized()) return;
- if (this && this.tagName) el = this; // BOUND to element
- var $P;
- if (isStr(el))
- $P = $Ps[el];
- else if ($(el).data("layoutRole"))
- $P = $(el);
- else
- $(el).parents().each(function(){
- if ($(this).data("layoutRole")) {
- $P = $(this);
- return false; // BREAK
- }
- });
- if (!$P || !$P.length) return; // INVALID
-
- var
- pane = $P.data("layoutEdge")
- , s = state[pane]
- , CSS = s.cssSaved || {}
- ;
- // reset the zIndex
- if (!s.isSliding && !s.isResizing)
- $P.css("zIndex", options.zIndexes.pane_normal);
-
- // reset Overflow - if necessary
- $P.css( CSS );
-
- // clear var
- s.cssSaved = false;
- };
-
-/*
- * #####################
- * CREATE/RETURN LAYOUT
- * #####################
- */
-
- // validate that container exists
- var $N = $(this).eq(0); // FIRST matching Container element
- if (!$N.length) {
- return _log( options.errors.containerMissing );
- };
-
- // Users retrieve Instance of a layout with: $N.layout() OR $N.data("layout")
- // return the Instance-pointer if layout has already been initialized
- if ($N.data("layoutContainer") && $N.data("layout"))
- return $N.data("layout"); // cached pointer
-
- // init global vars
- var
- $Ps = {} // Panes x5 - set in initPanes()
- , $Cs = {} // Content x5 - set in initPanes()
- , $Rs = {} // Resizers x4 - set in initHandles()
- , $Ts = {} // Togglers x4 - set in initHandles()
- , $Ms = $([]) // Masks - up to 2 masks per pane (IFRAME + DIV)
- // aliases for code brevity
- , sC = state.container // alias for easy access to 'container dimensions'
- , sID = state.id // alias for unique layout ID/namespace - eg: "layout435"
- ;
-
- // create Instance object to expose data & option Properties, and primary action Methods
- var Instance = {
- // layout data
- options: options // property - options hash
- , state: state // property - dimensions hash
- // object pointers
- , container: $N // property - object pointers for layout container
- , panes: $Ps // property - object pointers for ALL Panes: panes.north, panes.center
- , contents: $Cs // property - object pointers for ALL Content: contents.north, contents.center
- , resizers: $Rs // property - object pointers for ALL Resizers, eg: resizers.north
- , togglers: $Ts // property - object pointers for ALL Togglers, eg: togglers.north
- // border-pane open/close
- , hide: hide // method - ditto
- , show: show // method - ditto
- , toggle: toggle // method - pass a 'pane' ("north", "west", etc)
- , open: open // method - ditto
- , close: close // method - ditto
- , slideOpen: slideOpen // method - ditto
- , slideClose: slideClose // method - ditto
- , slideToggle: slideToggle // method - ditto
- // pane actions
- , setSizeLimits: setSizeLimits // method - pass a 'pane' - update state min/max data
- , _sizePane: sizePane // method -intended for user by plugins only!
- , sizePane: manualSizePane // method - pass a 'pane' AND an 'outer-size' in pixels or percent, or 'auto'
- , sizeContent: sizeContent // method - pass a 'pane'
- , swapPanes: swapPanes // method - pass TWO 'panes' - will swap them
- , showMasks: showMasks // method - pass a 'pane' OR list of panes - default = all panes with mask option set
- , hideMasks: hideMasks // method - ditto'
- // pane element methods
- , initContent: initContent // method - ditto
- , addPane: addPane // method - pass a 'pane'
- , removePane: removePane // method - pass a 'pane' to remove from layout, add 'true' to delete the pane-elem
- , createChildren: createChildren // method - pass a 'pane' and (optional) layout-options (OVERRIDES options[pane].children
- , refreshChildren: refreshChildren // method - pass a 'pane' and a layout-instance
- // special pane option setting
- , enableClosable: enableClosable // method - pass a 'pane'
- , disableClosable: disableClosable // method - ditto
- , enableSlidable: enableSlidable // method - ditto
- , disableSlidable: disableSlidable // method - ditto
- , enableResizable: enableResizable // method - ditto
- , disableResizable: disableResizable// method - ditto
- // utility methods for panes
- , allowOverflow: allowOverflow // utility - pass calling element (this)
- , resetOverflow: resetOverflow // utility - ditto
- // layout control
- , destroy: destroy // method - no parameters
- , initPanes: isInitialized // method - no parameters
- , resizeAll: resizeAll // method - no parameters
- // callback triggering
- , runCallbacks: _runCallbacks // method - pass evtName & pane (if a pane-event), eg: trigger("onopen", "west")
- // alias collections of options, state and children - created in addPane and extended elsewhere
- , hasParentLayout: false // set by initContainer()
- , children: children // pointers to child-layouts, eg: Instance.children.west.layoutName
- , north: false // alias group: { name: pane, pane: $Ps[pane], options: options[pane], state: state[pane], children: children[pane] }
- , south: false // ditto
- , west: false // ditto
- , east: false // ditto
- , center: false // ditto
- };
-
- // create the border layout NOW
- if (_create() === 'cancel') // onload_start callback returned false to CANCEL layout creation
- return null;
- else // true OR false -- if layout-elements did NOT init (hidden or do not exist), can auto-init later
- return Instance; // return the Instance object
-
-}
-
-
-})( jQuery );
-
-
-
-
-/**
- * jquery.layout.state 1.2
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2014
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @requires: UI Layout 1.4.0 or higher
- * @requires: $.ui.cookie (above)
- *
- * @see: http://groups.google.com/group/jquery-ui-layout
- */
-;(function ($) {
-
-if (!$.layout) return;
-
-
-/**
- * UI COOKIE UTILITY
- *
- * A $.cookie OR $.ui.cookie namespace *should be standard*, but until then...
- * This creates $.ui.cookie so Layout does not need the cookie.jquery.js plugin
- * NOTE: This utility is REQUIRED by the layout.state plugin
- *
- * Cookie methods in Layout are created as part of State Management
- */
-if (!$.ui) $.ui = {};
-$.ui.cookie = {
-
- // cookieEnabled is not in DOM specs, but DOES works in all browsers,including IE6
- acceptsCookies: !!navigator.cookieEnabled
-
-, read: function (name) {
- var
- c = document.cookie
- , cs = c ? c.split(';') : []
- , pair, data, i
- ;
- for (i=0; pair=cs[i]; i++) {
- data = $.trim(pair).split('='); // name=value => [ name, value ]
- if (data[0] == name) // found the layout cookie
- return decodeURIComponent(data[1]);
- }
- return null;
- }
-
-, write: function (name, val, cookieOpts) {
- var params = ""
- , date = ""
- , clear = false
- , o = cookieOpts || {}
- , x = o.expires || null
- , t = $.type(x)
- ;
- if (t === "date")
- date = x;
- else if (t === "string" && x > 0) {
- x = parseInt(x,10);
- t = "number";
- }
- if (t === "number") {
- date = new Date();
- if (x > 0)
- date.setDate(date.getDate() + x);
- else {
- date.setFullYear(1970);
- clear = true;
- }
- }
- if (date) params += ";expires="+ date.toUTCString();
- if (o.path) params += ";path="+ o.path;
- if (o.domain) params += ";domain="+ o.domain;
- if (o.secure) params += ";secure";
- document.cookie = name +"="+ (clear ? "" : encodeURIComponent( val )) + params; // write or clear cookie
- }
-
-, clear: function (name) {
- $.ui.cookie.write(name, "", {expires: -1});
- }
-
-};
-// if cookie.jquery.js is not loaded, create an alias to replicate it
-// this may be useful to other plugins or code dependent on that plugin
-if (!$.cookie) $.cookie = function (k, v, o) {
- var C = $.ui.cookie;
- if (v === null)
- C.clear(k);
- else if (v === undefined)
- return C.read(k);
- else
- C.write(k, v, o);
-};
-
-
-
-/**
- * State-management options stored in options.stateManagement, which includes a .cookie hash
- * Default options saves ALL KEYS for ALL PANES, ie: pane.size, pane.isClosed, pane.isHidden
- *
- * // STATE/COOKIE OPTIONS
- * @example $(el).layout({
- stateManagement: {
- enabled: true
- , stateKeys: "east.size,west.size,east.isClosed,west.isClosed"
- , cookie: { name: "appLayout", path: "/" }
- }
- })
- * @example $(el).layout({ stateManagement__enabled: true }) // enable auto-state-management using cookies
- * @example $(el).layout({ stateManagement__cookie: { name: "appLayout", path: "/" } })
- * @example $(el).layout({ stateManagement__cookie__name: "appLayout", stateManagement__cookie__path: "/" })
- *
- * // STATE/COOKIE METHODS
- * @example myLayout.saveCookie( "west.isClosed,north.size,south.isHidden", {expires: 7} );
- * @example myLayout.loadCookie();
- * @example myLayout.deleteCookie();
- * @example var JSON = myLayout.readState(); // CURRENT Layout State
- * @example var JSON = myLayout.readCookie(); // SAVED Layout State (from cookie)
- * @example var JSON = myLayout.state.stateData; // LAST LOADED Layout State (cookie saved in layout.state hash)
- *
- * CUSTOM STATE-MANAGEMENT (eg, saved in a database)
- * @example var JSON = myLayout.readState( "west.isClosed,north.size,south.isHidden" );
- * @example myLayout.loadState( JSON );
- */
-
-// tell Layout that the state plugin is available
-$.layout.plugins.stateManagement = true;
-
-// Add State-Management options to layout.defaults
-$.layout.defaults.stateManagement = {
- enabled: false // true = enable state-management, even if not using cookies
-, autoSave: true // Save a state-cookie when page exits?
-, autoLoad: true // Load the state-cookie when Layout inits?
-, animateLoad: true // animate panes when loading state into an active layout
-, includeChildren: true // recurse into child layouts to include their state as well
- // List state-data to save - must be pane-specific
-, stateKeys: "north.size,south.size,east.size,west.size,"+
- "north.isClosed,south.isClosed,east.isClosed,west.isClosed,"+
- "north.isHidden,south.isHidden,east.isHidden,west.isHidden"
-, cookie: {
- name: "" // If not specified, will use Layout.name, else just "Layout"
- , domain: "" // blank = current domain
- , path: "" // blank = current page, "/" = entire website
- , expires: "" // 'days' to keep cookie - leave blank for 'session cookie'
- , secure: false
- }
-};
-
-// Set stateManagement as a 'layout-option', NOT a 'pane-option'
-$.layout.optionsMap.layout.push("stateManagement");
-// Update config so layout does not move options into the pane-default branch (panes)
-$.layout.config.optionRootKeys.push("stateManagement");
-
-/*
- * State Management methods
- */
-$.layout.state = {
-
- /**
- * Get the current layout state and save it to a cookie
- *
- * myLayout.saveCookie( keys, cookieOpts )
- *
- * @param {Object} inst
- * @param {(string|Array)=} keys
- * @param {Object=} cookieOpts
- */
- saveCookie: function (inst, keys, cookieOpts) {
- var o = inst.options
- , sm = o.stateManagement
- , oC = $.extend(true, {}, sm.cookie, cookieOpts || null)
- , data = inst.state.stateData = inst.readState( keys || sm.stateKeys ) // read current panes-state
- ;
- $.ui.cookie.write( oC.name || o.name || "Layout", $.layout.state.encodeJSON(data), oC );
- return $.extend(true, {}, data); // return COPY of state.stateData data
- }
-
- /**
- * Remove the state cookie
- *
- * @param {Object} inst
- */
-, deleteCookie: function (inst) {
- var o = inst.options;
- $.ui.cookie.clear( o.stateManagement.cookie.name || o.name || "Layout" );
- }
-
- /**
- * Read & return data from the cookie - as JSON
- *
- * @param {Object} inst
- */
-, readCookie: function (inst) {
- var o = inst.options;
- var c = $.ui.cookie.read( o.stateManagement.cookie.name || o.name || "Layout" );
- // convert cookie string back to a hash and return it
- return c ? $.layout.state.decodeJSON(c) : {};
- }
-
- /**
- * Get data from the cookie and USE IT to loadState
- *
- * @param {Object} inst
- */
-, loadCookie: function (inst) {
- var c = $.layout.state.readCookie(inst); // READ the cookie
- if (c && !$.isEmptyObject( c )) {
- inst.state.stateData = $.extend(true, {}, c); // SET state.stateData
- inst.loadState(c); // LOAD the retrieved state
- }
- return c;
- }
-
- /**
- * Update layout options from the cookie, if one exists
- *
- * @param {Object} inst
- * @param {Object=} stateData
- * @param {boolean=} animate
- */
-, loadState: function (inst, data, opts) {
- if (!$.isPlainObject( data ) || $.isEmptyObject( data )) return;
-
- // normalize data & cache in the state object
- data = inst.state.stateData = $.layout.transformData( data ); // panes = default subkey
-
- // add missing/default state-restore options
- var smo = inst.options.stateManagement;
- opts = $.extend({
- animateLoad: false //smo.animateLoad
- , includeChildren: smo.includeChildren
- }, opts );
-
- if (!inst.state.initialized) {
- /*
- * layout NOT initialized, so just update its options
- */
- // MUST remove pane.children keys before applying to options
- // use a copy so we don't remove keys from original data
- var o = $.extend(true, {}, data);
- //delete o.center; // center has no state-data - only children
- $.each($.layout.config.allPanes, function (idx, pane) {
- if (o[pane]) delete o[pane].children;
- });
- // update CURRENT layout-options with saved state data
- $.extend(true, inst.options, o);
- }
- else {
- /*
- * layout already initialized, so modify layout's configuration
- */
- var noAnimate = !opts.animateLoad
- , o, c, h, state, open
- ;
- $.each($.layout.config.borderPanes, function (idx, pane) {
- o = data[ pane ];
- if (!$.isPlainObject( o )) return; // no key, skip pane
-
- s = o.size;
- c = o.initClosed;
- h = o.initHidden;
- ar = o.autoResize
- state = inst.state[pane];
- open = state.isVisible;
-
- // reset autoResize
- if (ar)
- state.autoResize = ar;
- // resize BEFORE opening
- if (!open)
- inst._sizePane(pane, s, false, false, false); // false=skipCallback/noAnimation/forceResize
- // open/close as necessary - DO NOT CHANGE THIS ORDER!
- if (h === true) inst.hide(pane, noAnimate);
- else if (c === true) inst.close(pane, false, noAnimate);
- else if (c === false) inst.open (pane, false, noAnimate);
- else if (h === false) inst.show (pane, false, noAnimate);
- // resize AFTER any other actions
- if (open)
- inst._sizePane(pane, s, false, false, noAnimate); // animate resize if option passed
- });
-
- /*
- * RECURSE INTO CHILD-LAYOUTS
- */
- if (opts.includeChildren) {
- var paneStateChildren, childState;
- $.each(inst.children, function (pane, paneChildren) {
- paneStateChildren = data[pane] ? data[pane].children : 0;
- if (paneStateChildren && paneChildren) {
- $.each(paneChildren, function (stateKey, child) {
- childState = paneStateChildren[stateKey];
- if (child && childState)
- child.loadState( childState );
- });
- }
- });
- }
- }
- }
-
- /**
- * Get the *current layout state* and return it as a hash
- *
- * @param {Object=} inst // Layout instance to get state for
- * @param {object=} [opts] // State-Managements override options
- */
-, readState: function (inst, opts) {
- // backward compatility
- if ($.type(opts) === 'string') opts = { keys: opts };
- if (!opts) opts = {};
- var sm = inst.options.stateManagement
- , ic = opts.includeChildren
- , recurse = ic !== undefined ? ic : sm.includeChildren
- , keys = opts.stateKeys || sm.stateKeys
- , alt = { isClosed: 'initClosed', isHidden: 'initHidden' }
- , state = inst.state
- , panes = $.layout.config.allPanes
- , data = {}
- , pair, pane, key, val
- , ps, pC, child, array, count, branch
- ;
- if ($.isArray(keys)) keys = keys.join(",");
- // convert keys to an array and change delimiters from '__' to '.'
- keys = keys.replace(/__/g, ".").split(',');
- // loop keys and create a data hash
- for (var i=0, n=keys.length; i < n; i++) {
- pair = keys[i].split(".");
- pane = pair[0];
- key = pair[1];
- if ($.inArray(pane, panes) < 0) continue; // bad pane!
- val = state[ pane ][ key ];
- if (val == undefined) continue;
- if (key=="isClosed" && state[pane]["isSliding"])
- val = true; // if sliding, then *really* isClosed
- ( data[pane] || (data[pane]={}) )[ alt[key] ? alt[key] : key ] = val;
- }
-
- // recurse into the child-layouts for each pane
- if (recurse) {
- $.each(panes, function (idx, pane) {
- pC = inst.children[pane];
- ps = state.stateData[pane];
- if ($.isPlainObject( pC ) && !$.isEmptyObject( pC )) {
- // ensure a key exists for this 'pane', eg: branch = data.center
- branch = data[pane] || (data[pane] = {});
- if (!branch.children) branch.children = {};
- $.each( pC, function (key, child) {
- // ONLY read state from an initialize layout
- if ( child.state.initialized )
- branch.children[ key ] = $.layout.state.readState( child );
- // if we have PREVIOUS (onLoad) state for this child-layout, KEEP IT!
- else if ( ps && ps.children && ps.children[ key ] ) {
- branch.children[ key ] = $.extend(true, {}, ps.children[ key ] );
- }
- });
- }
- });
- }
-
- return data;
- }
-
- /**
- * Stringify a JSON hash so can save in a cookie or db-field
- */
-, encodeJSON: function (json) {
- var local = window.JSON || {};
- return (local.stringify || stringify)(json);
-
- function stringify (h) {
- var D=[], i=0, k, v, t // k = key, v = value
- , a = $.isArray(h)
- ;
- for (k in h) {
- v = h[k];
- t = typeof v;
- if (t == 'string') // STRING - add quotes
- v = '"'+ v +'"';
- else if (t == 'object') // SUB-KEY - recurse into it
- v = parse(v);
- D[i++] = (!a ? '"'+ k +'":' : '') + v;
- }
- return (a ? '[' : '{') + D.join(',') + (a ? ']' : '}');
- };
- }
-
- /**
- * Convert stringified JSON back to a hash object
- * @see $.parseJSON(), adding in jQuery 1.4.1
- */
-, decodeJSON: function (str) {
- try { return $.parseJSON ? $.parseJSON(str) : window["eval"]("("+ str +")") || {}; }
- catch (e) { return {}; }
- }
-
-
-, _create: function (inst) {
- var s = $.layout.state
- , o = inst.options
- , sm = o.stateManagement
- ;
- // ADD State-Management plugin methods to inst
- $.extend( inst, {
- // readCookie - update options from cookie - returns hash of cookie data
- readCookie: function () { return s.readCookie(inst); }
- // deleteCookie
- , deleteCookie: function () { s.deleteCookie(inst); }
- // saveCookie - optionally pass keys-list and cookie-options (hash)
- , saveCookie: function (keys, cookieOpts) { return s.saveCookie(inst, keys, cookieOpts); }
- // loadCookie - readCookie and use to loadState() - returns hash of cookie data
- , loadCookie: function () { return s.loadCookie(inst); }
- // loadState - pass a hash of state to use to update options
- , loadState: function (stateData, opts) { s.loadState(inst, stateData, opts); }
- // readState - returns hash of current layout-state
- , readState: function (keys) { return s.readState(inst, keys); }
- // add JSON utility methods too...
- , encodeJSON: s.encodeJSON
- , decodeJSON: s.decodeJSON
- });
-
- // init state.stateData key, even if plugin is initially disabled
- inst.state.stateData = {};
-
- // autoLoad MUST BE one of: data-array, data-hash, callback-function, or TRUE
- if ( !sm.autoLoad ) return;
-
- // When state-data exists in the autoLoad key USE IT,
- // even if stateManagement.enabled == false
- if ($.isPlainObject( sm.autoLoad )) {
- if (!$.isEmptyObject( sm.autoLoad )) {
- inst.loadState( sm.autoLoad );
- }
- }
- else if ( sm.enabled ) {
- // update the options from cookie or callback
- // if options is a function, call it to get stateData
- if ($.isFunction( sm.autoLoad )) {
- var d = {};
- try {
- d = sm.autoLoad( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
- } catch (e) {}
- if (d && $.isPlainObject( d ) && !$.isEmptyObject( d ))
- inst.loadState(d);
- }
- else // any other truthy value will trigger loadCookie
- inst.loadCookie();
- }
- }
-
-, _unload: function (inst) {
- var sm = inst.options.stateManagement;
- if (sm.enabled && sm.autoSave) {
- // if options is a function, call it to save the stateData
- if ($.isFunction( sm.autoSave )) {
- try {
- sm.autoSave( inst, inst.state, inst.options, inst.options.name || '' ); // try to get data from fn
- } catch (e) {}
- }
- else // any truthy value will trigger saveCookie
- inst.saveCookie();
- }
- }
-
-};
-
-// add state initialization method to Layout's onCreate array of functions
-$.layout.onCreate.push( $.layout.state._create );
-$.layout.onUnload.push( $.layout.state._unload );
-
-})( jQuery );
-
-
-
-/**
- * @preserve jquery.layout.buttons 1.0
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2011
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @dependancies: UI Layout 1.3.0.rc30.1 or higher
- *
- * @support: http://groups.google.com/group/jquery-ui-layout
- *
- * Docs: [ to come ]
- * Tips: [ to come ]
- */
-;(function ($) {
-
-if (!$.layout) return;
-
-
-// tell Layout that the state plugin is available
-$.layout.plugins.buttons = true;
-
-// Add State-Management options to layout.defaults
-$.layout.defaults.autoBindCustomButtons = false;
-// Set stateManagement as a layout-option, NOT a pane-option
-$.layout.optionsMap.layout.push("autoBindCustomButtons");
-
-var lang = $.layout.language;
-
-/*
- * Button methods
- */
-$.layout.buttons = {
- // set data used by multiple methods below
- config: {
- borderPanes: "north,south,west,east"
- }
-
- /**
- * Searches for .ui-layout-button-xxx elements and auto-binds them as layout-buttons
- *
- * @see _create()
- */
-, init: function (inst) {
- var pre = "ui-layout-button-"
- , layout = inst.options.name || ""
- , name;
- $.each("toggle,open,close,pin,toggle-slide,open-slide".split(","), function (i, action) {
- $.each($.layout.buttons.config.borderPanes.split(","), function (ii, pane) {
- $("."+pre+action+"-"+pane).each(function(){
- // if button was previously 'bound', data.layoutName was set, but is blank if layout has no 'name'
- name = $(this).data("layoutName") || $(this).attr("layoutName");
- if (name == undefined || name === layout)
- inst.bindButton(this, action, pane);
- });
- });
- });
- }
-
- /**
- * Helper function to validate params received by addButton utilities
- *
- * Two classes are added to the element, based on the buttonClass...
- * The type of button is appended to create the 2nd className:
- * - ui-layout-button-pin
- * - ui-layout-pane-button-toggle
- * - ui-layout-pane-button-open
- * - ui-layout-pane-button-close
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @return {Array.<Object>} If both params valid, the element matching 'selector' in a jQuery wrapper - otherwise returns null
- */
-, get: function (inst, selector, pane, action) {
- var $E = $(selector)
- , o = inst.options
- , err = o.showErrorMessages
- ;
- if (!$E.length) { // element not found
- if (err) alert(lang.errButton + lang.selector +": "+ selector);
- }
- else if ($.layout.buttons.config.borderPanes.indexOf(pane) === -1) { // invalid 'pane' sepecified
- if (err) alert(lang.errButton + lang.pane +": "+ pane);
- $E = $(""); // NO BUTTON
- }
- else { // VALID
- var btn = o[pane].buttonClass +"-"+ action;
- $E .addClass( btn +" "+ btn +"-"+ pane )
- .data("layoutName", o.name); // add layout identifier - even if blank!
- }
- return $E;
- }
-
-
- /**
- * NEW syntax for binding layout-buttons - will eventually replace addToggle, addOpen, etc.
- *
- * @param {(string|!Object)} sel jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} action
- * @param {string} pane
- */
-, bind: function (inst, sel, action, pane) {
- var _ = $.layout.buttons;
- switch (action.toLowerCase()) {
- case "toggle": _.addToggle (inst, sel, pane); break;
- case "open": _.addOpen (inst, sel, pane); break;
- case "close": _.addClose (inst, sel, pane); break;
- case "pin": _.addPin (inst, sel, pane); break;
- case "toggle-slide": _.addToggle (inst, sel, pane, true); break;
- case "open-slide": _.addOpen (inst, sel, pane, true); break;
- }
- return inst;
- }
-
- /**
- * Add a custom Toggler button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @param {boolean=} slide true = slide-open, false = pin-open
- */
-, addToggle: function (inst, selector, pane, slide) {
- $.layout.buttons.get(inst, selector, pane, "toggle")
- .click(function(evt){
- inst.toggle(pane, !!slide);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Open button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- * @param {boolean=} slide true = slide-open, false = pin-open
- */
-, addOpen: function (inst, selector, pane, slide) {
- $.layout.buttons.get(inst, selector, pane, "open")
- .attr("title", lang.Open)
- .click(function (evt) {
- inst.open(pane, !!slide);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Close button for a pane
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the button is for: 'north', 'south', etc.
- */
-, addClose: function (inst, selector, pane) {
- $.layout.buttons.get(inst, selector, pane, "close")
- .attr("title", lang.Close)
- .click(function (evt) {
- inst.close(pane);
- evt.stopPropagation();
- });
- return inst;
- }
-
- /**
- * Add a custom Pin button for a pane
- *
- * Four classes are added to the element, based on the paneClass for the associated pane...
- * Assuming the default paneClass and the pin is 'up', these classes are added for a west-pane pin:
- * - ui-layout-pane-pin
- * - ui-layout-pane-west-pin
- * - ui-layout-pane-pin-up
- * - ui-layout-pane-west-pin-up
- *
- * @param {(string|!Object)} selector jQuery selector (or element) for button, eg: ".ui-layout-north .toggle-button"
- * @param {string} pane Name of the pane the pin is for: 'north', 'south', etc.
- */
-, addPin: function (inst, selector, pane) {
- var $E = $.layout.buttons.get(inst, selector, pane, "pin");
- if ($E.length) {
- var s = inst.state[pane];
- $E.click(function (evt) {
- $.layout.buttons.setPinState(inst, $(this), pane, (s.isSliding || s.isClosed));
- if (s.isSliding || s.isClosed) inst.open( pane ); // change from sliding to open
- else inst.close( pane ); // slide-closed
- evt.stopPropagation();
- });
- // add up/down pin attributes and classes
- $.layout.buttons.setPinState(inst, $E, pane, (!s.isClosed && !s.isSliding));
- // add this pin to the pane data so we can 'sync it' automatically
- // PANE.pins key is an array so we can store multiple pins for each pane
- s.pins.push( selector ); // just save the selector string
- }
- return inst;
- }
-
- /**
- * Change the class of the pin button to make it look 'up' or 'down'
- *
- * @see addPin(), syncPins()
- * @param {Array.<Object>} $Pin The pin-span element in a jQuery wrapper
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin true = set the pin 'down', false = set it 'up'
- */
-, setPinState: function (inst, $Pin, pane, doPin) {
- var updown = $Pin.attr("pin");
- if (updown && doPin === (updown=="down")) return; // already in correct state
- var
- pin = inst.options[pane].buttonClass +"-pin"
- , side = pin +"-"+ pane
- , UP = pin +"-up "+ side +"-up"
- , DN = pin +"-down "+side +"-down"
- ;
- $Pin
- .attr("pin", doPin ? "down" : "up") // logic
- .attr("title", doPin ? lang.Unpin : lang.Pin)
- .removeClass( doPin ? UP : DN )
- .addClass( doPin ? DN : UP )
- ;
- }
-
- /**
- * INTERNAL function to sync 'pin buttons' when pane is opened or closed
- * Unpinned means the pane is 'sliding' - ie, over-top of the adjacent panes
- *
- * @see open(), close()
- * @param {string} pane These are the params returned to callbacks by layout()
- * @param {boolean} doPin True means set the pin 'down', False means 'up'
- */
-, syncPinBtns: function (inst, pane, doPin) {
- // REAL METHOD IS _INSIDE_ LAYOUT - THIS IS HERE JUST FOR REFERENCE
- $.each(state[pane].pins, function (i, selector) {
- $.layout.buttons.setPinState(inst, $(selector), pane, doPin);
- });
- }
-
-
-, _load: function (inst) {
- // ADD Button methods to Layout Instance
- $.extend( inst, {
- bindButton: function (selector, action, pane) { return $.layout.buttons.bind(inst, selector, action, pane); }
- // DEPRECATED METHODS...
- , addToggleBtn: function (selector, pane, slide) { return $.layout.buttons.addToggle(inst, selector, pane, slide); }
- , addOpenBtn: function (selector, pane, slide) { return $.layout.buttons.addOpen(inst, selector, pane, slide); }
- , addCloseBtn: function (selector, pane) { return $.layout.buttons.addClose(inst, selector, pane); }
- , addPinBtn: function (selector, pane) { return $.layout.buttons.addPin(inst, selector, pane); }
- });
-
- // init state array to hold pin-buttons
- for (var i=0; i<4; i++) {
- var pane = $.layout.buttons.config.borderPanes[i];
- inst.state[pane].pins = [];
- }
-
- // auto-init buttons onLoad if option is enabled
- if ( inst.options.autoBindCustomButtons )
- $.layout.buttons.init(inst);
- }
-
-, _unload: function (inst) {
- // TODO: unbind all buttons???
- }
-
-};
-
-// add initialization method to Layout's onLoad array of functions
-$.layout.onLoad.push( $.layout.buttons._load );
-//$.layout.onUnload.push( $.layout.buttons._unload );
-
-})( jQuery );
-
-
-
-
-/**
- * jquery.layout.browserZoom 1.0
- * $Date: 2015/03/13 22:37:04 $
- *
- * Copyright (c) 2012
- * Kevin Dalman (http://allpro.net)
- *
- * Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
- * and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
- *
- * @requires: UI Layout 1.3.0.rc30.1 or higher
- *
- * @see: http://groups.google.com/group/jquery-ui-layout
- *
- * TODO: Extend logic to handle other problematic zooming in browsers
- * TODO: Add hotkey/mousewheel bindings to _instantly_ respond to these zoom event
- */
-(function ($) {
-
-// tell Layout that the plugin is available
-$.layout.plugins.browserZoom = true;
-
-$.layout.defaults.browserZoomCheckInterval = 1000;
-$.layout.optionsMap.layout.push("browserZoomCheckInterval");
-
-/*
- * browserZoom methods
- */
-$.layout.browserZoom = {
-
- _init: function (inst) {
- // abort if browser does not need this check
- if ($.layout.browserZoom.ratio() !== false)
- $.layout.browserZoom._setTimer(inst);
- }
-
-, _setTimer: function (inst) {
- // abort if layout destroyed or browser does not need this check
- if (inst.destroyed) return;
- var o = inst.options
- , s = inst.state
- // don't need check if inst has parentLayout, but check occassionally in case parent destroyed!
- // MINIMUM 100ms interval, for performance
- , ms = inst.hasParentLayout ? 5000 : Math.max( o.browserZoomCheckInterval, 100 )
- ;
- // set the timer
- setTimeout(function(){
- if (inst.destroyed || !o.resizeWithWindow) return;
- var d = $.layout.browserZoom.ratio();
- if (d !== s.browserZoom) {
- s.browserZoom = d;
- inst.resizeAll();
- }
- // set a NEW timeout
- $.layout.browserZoom._setTimer(inst);
- }
- , ms );
- }
-
-, ratio: function () {
- var w = window
- , s = screen
- , d = document
- , dE = d.documentElement || d.body
- , b = $.layout.browser
- , v = b.version
- , r, sW, cW
- ;
- // we can ignore all browsers that fire window.resize event onZoom
- if (!b.msie || v > 8)
- return false; // don't need to track zoom
- if (s.deviceXDPI && s.systemXDPI) // syntax compiler hack
- return calc(s.deviceXDPI, s.systemXDPI);
- // everything below is just for future reference!
- if (b.webkit && (r = d.body.getBoundingClientRect))
- return calc((r.left - r.right), d.body.offsetWidth);
- if (b.webkit && (sW = w.outerWidth))
- return calc(sW, w.innerWidth);
- if ((sW = s.width) && (cW = dE.clientWidth))
- return calc(sW, cW);
- return false; // no match, so cannot - or don't need to - track zoom
-
- function calc (x,y) { return (parseInt(x,10) / parseInt(y,10) * 100).toFixed(); }
- }
-
-};
-// add initialization method to Layout's onLoad array of functions
-$.layout.onReady.push( $.layout.browserZoom._init );
-
-
-})( jQuery );
-
-
-
-
-/**
- * UI Layout Plugin: Slide-Offscreen Animation
- *
- * Prevent panes from being 'hidden' so that an iframes/objects
- * does not reload/refresh when pane 'opens' again.
- * This plug-in adds a new animation called "slideOffscreen".
- * It is identical to the normal "slide" effect, but avoids hiding the element
- *
- * Requires Layout 1.3.0.RC30.1 or later for Close offscreen
- * Requires Layout 1.3.0.RC30.5 or later for Hide, initClosed & initHidden offscreen
- *
- * Version: 1.1 - 2012-11-18
- * Author: Kevin Dalman (kevin@jquery-dev.com)
- * @preserve jquery.layout.slideOffscreen-1.1.js
- */
-;(function ($) {
-
-// Add a new "slideOffscreen" effect
-if ($.effects) {
-
- // add an option so initClosed and initHidden will work
- $.layout.defaults.panes.useOffscreenClose = false; // user must enable when needed
- /* set the new animation as the default for all panes
- $.layout.defaults.panes.fxName = "slideOffscreen";
- */
-
- if ($.layout.plugins)
- $.layout.plugins.effects.slideOffscreen = true;
-
- // dupe 'slide' effect defaults as new effect defaults
- $.layout.effects.slideOffscreen = $.extend(true, {}, $.layout.effects.slide);
-
- // add new effect to jQuery UI
- $.effects.slideOffscreen = function(o) {
- return this.queue(function(){
-
- var fx = $.effects
- , opt = o.options
- , $el = $(this)
- , pane = $el.data('layoutEdge')
- , state = $el.data('parentLayout').state
- , dist = state[pane].size
- , s = this.style
- , props = ['top','bottom','left','right']
- // Set options
- , mode = fx.setMode($el, opt.mode || 'show') // Set Mode
- , show = (mode == 'show')
- , dir = opt.direction || 'left' // Default Direction
- , ref = (dir == 'up' || dir == 'down') ? 'top' : 'left'
- , pos = (dir == 'up' || dir == 'left')
- , offscrn = $.layout.config.offscreenCSS || {}
- , keyLR = $.layout.config.offscreenReset
- , keyTB = 'offscreenResetTop' // only used internally
- , animation = {}
- ;
- // Animation settings
- animation[ref] = (show ? (pos ? '+=' : '-=') : (pos ? '-=' : '+=')) + dist;
-
- if (show) { // show() animation, so save top/bottom but retain left/right set when 'hidden'
- $el.data(keyTB, { top: s.top, bottom: s.bottom });
-
- // set the top or left offset in preparation for animation
- // Note: ALL animations work by shifting the top or left edges
- if (pos) { // top (north) or left (west)
- $el.css(ref, isNaN(dist) ? "-" + dist : -dist); // Shift outside the left/top edge
- }
- else { // bottom (south) or right (east) - shift all the way across container
- if (dir === 'right')
- $el.css({ left: state.container.layoutWidth, right: 'auto' });
- else // dir === bottom
- $el.css({ top: state.container.layoutHeight, bottom: 'auto' });
- }
- // restore the left/right setting if is a top/bottom animation
- if (ref === 'top')
- $el.css( $el.data( keyLR ) || {} );
- }
- else { // hide() animation, so save ALL CSS
- $el.data(keyTB, { top: s.top, bottom: s.bottom });
- $el.data(keyLR, { left: s.left, right: s.right });
- }
-
- // Animate
- $el.show().animate(animation, { queue: false, duration: o.duration, easing: opt.easing, complete: function(){
- // Restore top/bottom
- if ($el.data( keyTB ))
- $el.css($el.data( keyTB )).removeData( keyTB );
- if (show) // Restore left/right too
- $el.css($el.data( keyLR ) || {}).removeData( keyLR );
- else // Move the pane off-screen (left: -99999, right: 'auto')
- $el.css( offscrn );
-
- if (o.callback) o.callback.apply(this, arguments); // Callback
- $el.dequeue();
- }});
-
- });
- };
-
-}
-
-})( jQuery ); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/js/moment.min.js b/usecaseui-common/src/main/webapp/static/fusion/js/moment.min.js
deleted file mode 100644
index 62b1697b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/js/moment.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// moment.js
-// version : 2.1.0
-// author : Tim Wood
-// license : MIT
-// momentjs.com
-!function(t){function e(t,e){return function(n){return u(t.call(this,n),e)}}function n(t,e){return function(n){return this.lang().ordinal(t.call(this,n),e)}}function s(){}function i(t){a(this,t)}function r(t){var e=t.years||t.year||t.y||0,n=t.months||t.month||t.M||0,s=t.weeks||t.week||t.w||0,i=t.days||t.day||t.d||0,r=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,o=t.seconds||t.second||t.s||0,u=t.milliseconds||t.millisecond||t.ms||0;this._input=t,this._milliseconds=u+1e3*o+6e4*a+36e5*r,this._days=i+7*s,this._months=n+12*e,this._data={},this._bubble()}function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function o(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";n.length<e;)n="0"+n;return n}function h(t,e,n,s){var i,r,a=e._milliseconds,o=e._days,u=e._months;a&&t._d.setTime(+t._d+a*n),(o||u)&&(i=t.minute(),r=t.hour()),o&&t.date(t.date()+o*n),u&&t.month(t.month()+u*n),a&&!s&&H.updateOffset(t),(o||u)&&(t.minute(i),t.hour(r))}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t,e){var n,s=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),r=0;for(n=0;s>n;n++)~~t[n]!==~~e[n]&&r++;return r+i}function f(t){return t?ie[t]||t.toLowerCase().replace(/(.)s$/,"$1"):t}function l(t,e){return e.abbr=t,x[t]||(x[t]=new s),x[t].set(e),x[t]}function _(t){if(!t)return H.fn._lang;if(!x[t]&&A)try{require("./lang/"+t)}catch(e){return H.fn._lang}return x[t]}function m(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,s=t.match(E);for(e=0,n=s.length;n>e;e++)s[e]=ue[s[e]]?ue[s[e]]:m(s[e]);return function(i){var r="";for(e=0;n>e;e++)r+=s[e]instanceof Function?s[e].call(i,t):s[e];return r}}function M(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var s=5;s--&&N.test(e);)e=e.replace(N,n);return re[e]||(re[e]=y(e)),re[e](t)}function g(t,e){switch(t){case"DDDD":return V;case"YYYY":return X;case"YYYYY":return $;case"S":case"SS":case"SSS":case"DDD":return I;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return R;case"a":case"A":return _(e._l)._meridiemParse;case"X":return B;case"Z":case"ZZ":return j;case"T":return q;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return J;default:return new RegExp(t.replace("\\",""))}}function p(t){var e=(j.exec(t)||[])[0],n=(e+"").match(ee)||["-",0,0],s=+(60*n[1])+~~n[2];return"+"===n[0]?-s:s}function D(t,e,n){var s,i=n._a;switch(t){case"M":case"MM":i[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":s=_(n._l).monthsParse(e),null!=s?i[1]=s:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(i[2]=~~e);break;case"YY":i[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~e;break;case"a":case"A":n._isPm=_(n._l).isPM(e);break;case"H":case"HH":case"h":case"hh":i[3]=~~e;break;case"m":case"mm":i[4]=~~e;break;case"s":case"ss":i[5]=~~e;break;case"S":case"SS":case"SSS":i[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=p(e)}null==e&&(n._isValid=!1)}function Y(t){var e,n,s=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];s[3]+=~~((t._tzm||0)/60),s[4]+=~~((t._tzm||0)%60),n=new Date(0),t._useUTC?(n.setUTCFullYear(s[0],s[1],s[2]),n.setUTCHours(s[3],s[4],s[5],s[6])):(n.setFullYear(s[0],s[1],s[2]),n.setHours(s[3],s[4],s[5],s[6])),t._d=n}}function w(t){var e,n,s=t._f.match(E),i=t._i;for(t._a=[],e=0;e<s.length;e++)n=(g(s[e],t).exec(i)||[])[0],n&&(i=i.slice(i.indexOf(n)+n.length)),ue[s[e]]&&D(s[e],n,t);i&&(t._il=i),t._isPm&&t._a[3]<12&&(t._a[3]+=12),t._isPm===!1&&12===t._a[3]&&(t._a[3]=0),Y(t)}function k(t){var e,n,s,r,o,u=99;for(r=0;r<t._f.length;r++)e=a({},t),e._f=t._f[r],w(e),n=new i(e),o=c(e._a,n.toArray()),n._il&&(o+=n._il.length),u>o&&(u=o,s=n);a(t,s)}function v(t){var e,n=t._i,s=K.exec(n);if(s){for(t._f="YYYY-MM-DD"+(s[2]||" "),e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}j.exec(n)&&(t._f+=" Z"),w(t)}else t._d=new Date(n)}function T(e){var n=e._i,s=G.exec(n);n===t?e._d=new Date:s?e._d=new Date(+s[1]):"string"==typeof n?v(e):d(n)?(e._a=n.slice(0),Y(e)):e._d=n instanceof Date?new Date(+n):new Date(n)}function b(t,e,n,s,i){return i.relativeTime(e||1,!!n,t,s)}function S(t,e,n){var s=W(Math.abs(t)/1e3),i=W(s/60),r=W(i/60),a=W(r/24),o=W(a/365),u=45>s&&["s",s]||1===i&&["m"]||45>i&&["mm",i]||1===r&&["h"]||22>r&&["hh",r]||1===a&&["d"]||25>=a&&["dd",a]||45>=a&&["M"]||345>a&&["MM",W(a/30)]||1===o&&["y"]||["yy",o];return u[2]=e,u[3]=t>0,u[4]=n,b.apply({},u)}function F(t,e,n){var s,i=n-e,r=n-t.day();return r>i&&(r-=7),i-7>r&&(r+=7),s=H(t).add("d",r),{week:Math.ceil(s.dayOfYear()/7),year:s.year()}}function O(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=_().preparse(e)),H.isMoment(e)?(t=a({},e),t._d=new Date(+e._d)):n?d(n)?k(t):w(t):T(t),new i(t))}function z(t,e){H.fn[t]=H.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),H.updateOffset(this),this):this._d["get"+n+e]()}}function C(t){H.duration.fn[t]=function(){return this._data[t]}}function L(t,e){H.duration.fn["as"+t]=function(){return+this/e}}for(var H,P,U="2.1.0",W=Math.round,x={},A="undefined"!=typeof module&&module.exports,G=/^\/?Date\((\-?\d+)/i,Z=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,E=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,J=/\d\d?/,I=/\d{1,3}/,V=/\d{3}/,X=/\d{1,4}/,$=/[+\-]?\d{1,6}/,R=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j=/Z|[\+\-]\d\d:?\d\d/i,q=/T/i,B=/[\+\-]?\d+(\.\d{1,3})?/,K=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,Q="YYYY-MM-DDTHH:mm:ssZ",te=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ee=/([\+\-]|\d\d)/gi,ne="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),se={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ie={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},re={},ae="DDD w W M D d".split(" "),oe="M D H h m s w W".split(" "),ue={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},gg:function(){return u(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return u(this.weekYear(),5)},GG:function(){return u(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return u(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ae.length;)P=ae.pop(),ue[P+"o"]=n(ue[P],P);for(;oe.length;)P=oe.pop(),ue[P+P]=e(ue[P],2);for(ue.DDDD=e(ue.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,s;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=H([2e3,e]),s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(s.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,s;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=H([2e3,1]).day(e),s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(s.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,s){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,s):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return F(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},H=function(t,e,n){return O({_i:t,_f:e,_l:n,_isUTC:!1})},H.utc=function(t,e,n){return O({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},H.unix=function(t){return H(1e3*t)},H.duration=function(t,e){var n,s,i=H.isDuration(t),a="number"==typeof t,o=i?t._input:a?{}:t,u=Z.exec(t);return a?e?o[e]=t:o.milliseconds=t:u&&(n="-"===u[1]?-1:1,o={y:0,d:~~u[2]*n,h:~~u[3]*n,m:~~u[4]*n,s:~~u[5]*n,ms:~~u[6]*n}),s=new r(o),i&&t.hasOwnProperty("_lang")&&(s._lang=t._lang),s},H.version=U,H.defaultFormat=Q,H.updateOffset=function(){},H.lang=function(t,e){return t?(e?l(t,e):x[t]||_(t),H.duration.fn._lang=H.fn._lang=_(t),void 0):H.fn._lang._abbr},H.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),_(t)},H.isMoment=function(t){return t instanceof i},H.isDuration=function(t){return t instanceof r},H.fn=i.prototype={clone:function(){return H(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return M(H(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!c(this._a,(this._isUTC?H.utc(this._a):H(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(t){var e=M(this,t||H.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,-1),this},diff:function(t,e,n){var s,i,r=this._isUTC?H(t).zone(this._offset||0):H(t).local(),a=6e4*(this.zone()-r.zone());return e=f(e),"year"===e||"month"===e?(s=432e5*(this.daysInMonth()+r.daysInMonth()),i=12*(this.year()-r.year())+(this.month()-r.month()),i+=(this-H(this).startOf("month")-(r-H(r).startOf("month")))/s,i-=6e4*(this.zone()-H(this).startOf("month").zone()-(r.zone()-H(r).startOf("month").zone()))/s,"year"===e&&(i/=12)):(s=this-r,i="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-a)/864e5:"week"===e?(s-a)/6048e5:s),n?i:o(i)},from:function(t,e){return H.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(H(),t)},calendar:function(){var t=this.diff(H().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?"string"==typeof t&&(t=this.lang().weekdaysParse(t),"number"!=typeof t)?this:this.add({d:t-e}):e},month:function(t){var e,n=this._isUTC?"UTC":"";return null!=t?"string"==typeof t&&(t=this.lang().monthsParse(t),"number"!=typeof t)?this:(e=this.date(),this.date(1),this._d["set"+n+"Month"](t),this.date(Math.min(e,this.daysInMonth())),H.updateOffset(this),this):this._d["get"+n+"Month"]()},startOf:function(t){switch(t=f(t)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),this},endOf:function(t){return this.startOf(t).add(t,1).subtract("ms",1)},isAfter:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)>+H(t).startOf(e)},isBefore:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)<+H(t).startOf(e)},isSame:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)===+H(t).startOf(e)},min:function(t){return t=H.apply(null,arguments),this>t?this:t},max:function(t){return t=H.apply(null,arguments),t>this?this:t},zone:function(t){var e=this._offset||0;return null==t?this._isUTC?e:this._d.getTimezoneOffset():("string"==typeof t&&(t=p(t)),Math.abs(t)<16&&(t=60*t),this._offset=t,this._isUTC=!0,e!==t&&h(this,H.duration(e-t,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return H.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=W((H(this).startOf("day")-H(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},weekYear:function(t){var e=F(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==t?e:this.add("y",t-e)},isoWeekYear:function(t){var e=F(this,1,4).year;return null==t?e:this.add("y",t-e)},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},isoWeek:function(t){var e=F(this,1,4).week;return null==t?e:this.add("d",7*(t-e))},weekday:function(t){var e=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==t?e:this.add("d",t-e)},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},lang:function(e){return e===t?this._lang:(this._lang=_(e),this)}},P=0;P<ne.length;P++)z(ne[P].toLowerCase().replace(/s$/,""),ne[P]);z("year","FullYear"),H.fn.days=H.fn.day,H.fn.months=H.fn.month,H.fn.weeks=H.fn.week,H.fn.isoWeeks=H.fn.isoWeek,H.fn.toJSON=H.fn.toISOString,H.duration.fn=r.prototype={_bubble:function(){var t,e,n,s,i=this._milliseconds,r=this._days,a=this._months,u=this._data;u.milliseconds=i%1e3,t=o(i/1e3),u.seconds=t%60,e=o(t/60),u.minutes=e%60,n=o(e/60),u.hours=n%24,r+=o(n/24),u.days=r%30,a+=o(r/30),u.months=a%12,s=o(a/12),u.years=s},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*~~(this._months/12)},humanize:function(t){var e=+this,n=S(e,!t,this.lang());return t&&(n=this.lang().pastFuture(e,n)),this.lang().postformat(n)},add:function(t,e){var n=H.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=H.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=f(t),this[t.toLowerCase()+"s"]()},as:function(t){return t=f(t),this["as"+t.charAt(0).toUpperCase()+t.slice(1)+"s"]()},lang:H.fn.lang};for(P in se)se.hasOwnProperty(P)&&(L(P,se[P]),C(P.toLowerCase()));L("Weeks",6048e5),H.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},H.lang("en",{ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),A&&(module.exports=H),"undefined"==typeof ender&&(this.moment=H),"function"==typeof define&&define.amd&&define("moment",[],function(){return H})}.call(this); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Entries b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Entries
deleted file mode 100644
index a4612779..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Entries
+++ /dev/null
@@ -1,9 +0,0 @@
-D/tree////
-/calendar.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/dashboard.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/form-field-tooltip.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/mobile_raptor.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/novamap.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/picker.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/ral.css/1.2/Tue Oct 01 18:58:02 2013/-ko/TQuantum_BD
-/raptor.css/1.2/Wed Jul 03 21:16:48 2013/-ko/TQuantum_BD
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Repository b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Repository
deleted file mode 100644
index d4b93eab..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Repository
+++ /dev/null
@@ -1 +0,0 @@
-fusion/war/static/fusion/raptor/css
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Root b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Root
deleted file mode 100644
index e69de29b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Root
+++ /dev/null
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Tag b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Tag
deleted file mode 100644
index 8f405b6d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/CVS/Tag
+++ /dev/null
@@ -1 +0,0 @@
-TQuantum_BD
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/Style.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/Style.css
deleted file mode 100644
index 1fa71bef..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/Style.css
+++ /dev/null
@@ -1,77 +0,0 @@
-th.header {
- background: #DDEEFB repeat-x 0 0 !important;
- text-align: center;
- color: #144BA1 !important;
- font-weight: bold !important;
-}
-td.last, th.last {
- border-right-width: 3px !important;
-}
-td.years , td.season, td.month {
- text-align: center;
- color: #043554;
-}
-td.years {
- background: #085d8a !important;
- color: white;
-}
-.years .z-label {
- font-size: 16px;
-}
-td.season {
- background: #F2DFBA !important;
-}
-td.month {
- background: #CADBA4 !important;
- font-style: italic;
-}
-.tooltip {
- padding: .8em;
- width: 200px;
- border-width: 2px !important;
- position: absolute;
- background:#FFE45C url(${c:encodeURL('/images/tooltip-bg.png')}) repeat-x scroll 50% top;
- border:1px solid #FED22F;
- color:#363636;
- -moz-border-radius-bottomleft:4px;
- -moz-border-radius-bottomright:4px;
- -moz-border-radius-topleft:4px;
- -moz-border-radius-topright:4px;
- -webkit-border-top-left-radius: 4px;
- -webkit-border-top-right-radius: 4px;
- -webkit-border-bottom-left-radius: 4px;
- -webkit-border-bottom-right-radius: 4px;
- top: 280px;
- display: none;
-}
-
-.tooltip-anchor, .tooltip-anchor-inner {
- position: absolute;
- width:0;
- height:0;
- border-bottom-width: 0;
- background: none;
- border:1px solid #FED22F;
- color:#363636;
- border-bottom-width: 0;
-}
-.tooltip-anchor {
- border-left:0 none;
- border-right:17px dotted transparent;
- border-top-width:14px;
- bottom:-14px;
- left:1em;
- margin:0;
- right:auto;
-}
-.tooltip-anchor-inner {
- border-left:0 none;
- border-right:12px dotted transparent;
- border-top:10px solid #FFFFFF;
- bottom:auto;
- border-top-color:#FFE45C;
- border-top-style:solid;
- border-top-width:10px;
- left:2px;
- top:-14px;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/bd_quantum_raptor.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/bd_quantum_raptor.css
deleted file mode 100644
index 8674a88c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/bd_quantum_raptor.css
+++ /dev/null
@@ -1,305 +0,0 @@
-/* Make Plain Grid+smaller comps Padding + white background */
-/* "overflow:hidden ;" not working in Chrome/Safari */
-.GridLayoutNoBorder tr.z-row td.z-row-inner,tr.z-row,div.z-grid-body div.z-cell,div.z-grid,tr.z-grid-odd td.z-row-inner,tr.z-grid-odd .z-cell,tr.z-grid-odd
- {
- border: none;
- zoom: 1;
- background: white;
- border-top: none;
- border-left: none;
- border-right: none;
- border-bottom: none;
- padding: 1px;
-}
-
-.GridLayoutNoBorder .z-row:hover>.z-cell {
- background-color: white;
- color: black;
- font-weight: bold;
-}
-
-.GridReport tr.z-row td.z-row-inner,tr.z-row,div.z-grid-body div.z-cell,div.z-grid
- {
- background-color: white;
- border-top: none;
- border-left: none;
- border-right: none;
- border-bottom: none;
- padding-top: 4px;
- padding-bottom: 4px;
- padding-left: 6px;
- padding-right: 6px;
- vertical-align:middle;
- border-right-color: #ccc;
- border-bottom-color: #ccc;
- /*overflow:hidden;*/
-}
-.GridReportodd, .GridReportodd > td
- {
- color: black; background-color: rgb(255,255,204) !important;
- }
-
-
-.z-toolbarbutton {
- display: inline-block;
- height: 24px;
- border: 1px solid transparent;
- -webkit-border-radius: 3px;
- border-radius: 3px;
- margin: 0 2px;
- padding: 1px 0;
- line-height: 14px;
- position: relative;
- cursor: pointer;
- float: right;
-}
-
-.z-paging-input {
- font-family:Arial,Sans-serif;
- font-size:12px;
- font-weight:normal;
- font-style:normal;
- color:#000;
- height:24px;
- border:1px solid #8fb9d0;
- margin-left:6px;
- padding:3px 0;
- line-height:20px;
- vertical-align:baseline;
-}
-.z-paging-text {
- font-family:Arial,Sans-serif;
- font-size:12px;
- font-weight:normal;
- font-style:normal;
- color:#000;
- margin-right:12px
-}
-.z-paging-info {
- font-family:Arial,Sans-serif;
- font-size:12px;
- font-weight:normal;
- font-style:normal;
- color:#000;
- padding:4px 0;
- position:absolute;
- top:4px;
- right:10px;
-}
-.z-menu-text,.z-menuitem-text {
- font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
- font-size:12px;
- font-weight:normal;
- display:inline-block;
- line-height:16px;
- text-shadow:0 0px #fff
-}
-.z-menubar {
- border-top: 0px
- border-bottom: 0px;
-}
-.z-column-content {
- font-family: Arial,Sans-serif;
- font-size: 12px;
- color: #fff;
- padding: 4px 5px;
- line-height: 24px;
- overflow: hidden;
-}
-.z-column-hover {
- background: -webkit-linear-gradient(top, #336699 0%, #336699 100%); /* Chrome10+,Safari5.1+ */
- background: linear-gradient(to bottom, #336699 0%, #336699 100%); /* W3C */
-}
-/*
-.z-row:hover>.z-row-inner, .z-row:hover>.z-cell {
-background: #6ba6bf;
-background-clip: padding-box;
-position: relative;*/
-
-.z-messagebox .z-label {
- font-family: Arial,Sans-serif;
- font-size: 12px;
- color: #000;
-}
-
-.z-popup .z-popup-content{
- font-family: Arial,Sans-serif;
- font-size: 12px;
- font-weight: normal;
- font-style: normal;
- color: #000;
- height: 100%;
- padding: 10px;
- line-height: 14px;
-}
-
-.z-notification-pointer ~ .z-notification-content {
- display:table-cell;
- width:150px;
- height:50px;
- min-height:60px;
- ${t:borderRadius('5px') };
- padding:5px 18px 5px 45px;
- vertical-align:middle;
-}
-.z-loading {
- background-color:#808080;
- border:1px outset #A0A0A0;
- font-weight: bold;
- padding:2px;
-}
-.z-loading-indicator {
- color: gray;
- border:0 none;
-}
-.z-toolbarbutton-content {
- color: #fff;
- text-shadow: 0 0px;
-}
-
-.z-groupbox>.z-groupbox-header {
- color: #000;
-}
-
-.z-combobox-button, .z-bandbox-button, .z-datebox-button, .z-timebox-button, .z-spinner-button, .z-doublespinner-button {
- color: #000;
-}
-
-
-/*.z-panel-header {
-font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
-font-size: 12px;
-font-weight: normal;
-font-style: normal;
-color: #fff;
-border: 0;
-padding: 3px 0 5px 0;
-line-height: 0px;
-background: #369;
-overflow: hidden;
-zoom: 1;
-display: none;
-}*/
-
-
-
- .z-menupopup .z-menu-image, .z-menupopup .z-menuitem-image {
-min-width: 16px;
-min-height: 16px;
-margin-right: 9px;
-display: none;
-}
-
-
- .z-menupopup-separator {
-width: 2px;
-height: 100%;
-border-width: 3px 1px 3px 0;
-border-style: solid;
-border-color: #d9f0fc;
-background: #a2c0ce;
-position: absolute;
-top: 0;
-left: 31px;
-z-index: 10;
-display: none;
-}
-
-
- .z-menupopup-content {
-left: 0px;
-}
-
- .z-menu-icon.z-icon-caret-right {
-font-size: 15px;
-color: red;
-}
-
-
- .z-menu-content:hover, .z-menuitem-content:hover {
-border-color: #8fb9d0;
-background: -webkit-linear-gradient(top, #e2f3fc 0%, #336699 100%);
-background: linear-gradient(to bottom, #e2f3fc 0%, #336699 100%);
-}
-
-/*.toolBarRaptor .z-toolbar {
- background:white;
-}
-
-.toolBarRaptor .z-menuitem-content {
- color:#000;
-}
-
-.toolBarRaptor .z-menuitem-content {
- color:#000;
-}*/
-
-/*.z-caption .z-label {
- float: right;
-}
-
-.z-caption-content, .z-caption .z-label {
- display: inline-block;
- padding: 0;
- line-height: 24px;
- float: right;
-} */
-
-
-
-.ChartPanel .z-panel-head {
- border:;
-}
-.ChartPanel .z-panel-header {
-line-height: 12px;
-color: #000;
-background:;
-}
-.ChartPanel .z-panel-icon {
-color: #000;
-display: block;
--webkit-border-radius: ;
-border-radius: ;
-text-align: left;
-overflow: hidden;
-cursor: pointer;
-float: left;
-}
-
-.ChartPanel .z-panel-icon:hover {
- color: ;
- border-color: ;
- background: 0;
-filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
- background:;
- float:left;
-}
-
-.ChartPanel .z-panel-expand {
-font-size: 9px;
-width: 12px;
-line-height: 12px;
-}
-
-/*[class^="z-icon-"], [class*=" z-icon-"] {*/
-.ChartPanel .z-icon {
-display: inline-block;
-font-family: FontAwesome;
-font-size: 10px;
-font-weight: normal;
-font-style: normal;
--webkit-font-smoothing: antialiased;
--moz-osx-font-smoothing: grayscale;
-}
-
-.ChartPanel .z-icon-caret-up:before {
- content: "\f068";
-}
-
-.ChartPanel .z-icon-caret-down:before {
- content: "\f067";
-}
-
-.ie8 .z-column {
-background: #369;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/calendar.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/calendar.css
deleted file mode 100644
index fdd2242f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/calendar.css
+++ /dev/null
@@ -1,97 +0,0 @@
-.TESTcpYearNavigation,
-.raptorcpMonthNavigation
- {
- background-color:#336699;
- text-align:center;
- vertical-align:center;
- text-decoration:none;
- color:#FFFFFF;
- font-weight:bold;
- }
-.raptorcpDayColumnHeader,
-.raptorcpYearNavigation,
-.raptorcpMonthNavigation,
-.raptorcpCurrentMonthDate,
-.raptorcpCurrentMonthDateDisabled,
-.raptorcpOtherMonthDate,
-.raptorcpOtherMonthDateDisabled,
-.raptorcpCurrentDate,
-.raptorcpCurrentDateDisabled,
-.raptorcpTodayText,
-.raptorcpTodayTextDisabled,
-.raptorcpText
- {
- font-family:arial;
- font-size:8pt;
- }
-TD.raptorcpDayColumnHeader
- {
- text-align:right;
- border:solid thin #336699;
- border-width:0 0 1 0;
- }
-.raptorcpCurrentMonthDate,
-.raptorcpOtherMonthDate,
-.raptorcpCurrentDate
- {
- text-align:right;
- text-decoration:none;
- }
-.raptorcpCurrentMonthDateDisabled,
-.raptorcpOtherMonthDateDisabled,
-.raptorcpCurrentDateDisabled
- {
- color:#D0D0D0;
- text-align:right;
- text-decoration:line-through;
- }
-.raptorcpCurrentMonthDate
- {
- color:#336699;
- font-weight:bold;
- }
-.raptorcpCurrentDate
- {
- color: #FFFFFF;
- font-weight:bold;
- }
-.raptorcpOtherMonthDate
- {
- color:#808080;
- }
-TD.raptorcpCurrentDate
- {
- color:#FFFFFF;
- background-color: red;
- border-width:1;
- border:solid thin #000000;
- }
-TD.raptorcpCurrentDateDisabled
- {
- border-width:1;
- border:solid thin #FFAAAA;
- }
-TD.raptorcpTodayText,
-TD.raptorcpTodayTextDisabled
- {
- border:solid thin #336699;
- border-width:1 0 0 0;
- }
-A.raptorcpTodayText,
-SPAN.raptorcpTodayTextDisabled
- {
- height:20px;
- }
-A.raptorcpTodayText
- {
- color:#336699;
- font-weight:bold;
- }
-SPAN.raptorcpTodayTextDisabled
- {
- color:#D0D0D0;
- }
-.raptorcpBorder
- {
- border:solid thin #336699;
- }
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/dashboard.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/dashboard.css
deleted file mode 100644
index 2c79da20..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/dashboard.css
+++ /dev/null
@@ -1,36 +0,0 @@
-#news1{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 4pt;
- margin: 0px;
- background-color:#FFFFDF;
- overflow: auto;
- }
-
-#news2{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 4pt;
- margin: 0px;
- background-color:#E2E2E2;
- overflow: auto;
- }
-#news3{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 4pt;
- margin: 0px;
- background-color:#E2E2E2;
- overflow: auto;
- }
-
-#news4{
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-size: 4pt;
- margin: 0px;
- background-color:#FFFFDF;
- overflow: auto;
- }
-
-#superTable {
- width: 100%;
- height: 100%;
- /*table-layout: fixed;*/
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/drupal.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/drupal.css
deleted file mode 100644
index 15850790..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/drupal.css
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-#aggregator .feed-source .feed-title{margin-top:0;}#aggregator .feed-source .feed-image img{margin-bottom:0.75em;}#aggregator .feed-source .feed-icon{float:right;display:block;}#aggregator .feed-item{margin-bottom:1.5em;}#aggregator .feed-item-title{margin-bottom:0;font-size:1.3em;}#aggregator .feed-item-meta,#aggregator .feed-item-body{margin-bottom:0.5em;}#aggregator .feed-item-categories{font-size:0.9em;}#aggregator td{vertical-align:bottom;}#aggregator td.categorize-item{white-space:nowrap;}#aggregator .categorize-item .news-item .body{margin-top:0;}#aggregator .categorize-item h3{margin-bottom:1em;margin-top:0;}
-
-
-.book-navigation .menu{border-top:1px solid #888;padding:1em 0 0 3em;}.book-navigation .page-links{border-top:1px solid #888;border-bottom:1px solid #888;text-align:center;padding:0.5em;}.book-navigation .page-previous{text-align:left;width:42%;display:block;float:left;}.book-navigation .page-up{margin:0 5%;width:4%;display:block;float:left;}.book-navigation .page-next{text-align:right;width:42%;display:block;float:right;}#book-outline{min-width:56em;}.book-outline-form .form-item{margin-top:0;margin-bottom:0;}#edit-book-bid-wrapper .description{clear:both;}#book-admin-edit select{margin-right:24px;}#book-admin-edit select.progress-disabled{margin-right:0;}#book-admin-edit tr.ahah-new-content{background-color:#ffd;}#book-admin-edit .form-item{float:left;}
-
-
-.node-unpublished{background-color:#fff4f4;}.preview .node{background-color:#ffffea;}#node-admin-filter ul{list-style-type:none;padding:0;margin:0;width:100%;}#node-admin-buttons{float:left;margin-left:0.5em;clear:right;}td.revision-current{background:#ffc;}.node-form .form-text{display:block;width:95%;}.node-form .container-inline .form-text{display:inline;width:auto;}.node-form .standard{clear:both;}.node-form textarea{display:block;width:95%;}.node-form .attachments fieldset{float:none;display:block;}.terms-inline{display:inline;}
-
-
-
-fieldset{margin-bottom:1em;padding:.5em;}form{margin:0;padding:0;}hr{height:1px;border:1px solid gray;}img{border:0;}table{border-collapse:collapse;}th{text-align:left;padding-right:1em;border-bottom:3px solid #ccc;}.clear-block:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.clear-block{display:inline-block;}/*_\*/
-* html .clear-block{height:1%;}.clear-block{display:block;}/* End hide from IE-mac */
-
-
-
-
-body.drag{cursor:move;}th.active img{display:inline;}tr.even,tr.odd{background-color:#eee;border-bottom:1px solid #ccc;padding:0.1em 0.6em;}tr.drag{background-color:#fffff0;}tr.drag-previous{background-color:#ffd;}td.active{background-color:#ddd;}td.checkbox,th.checkbox{text-align:center;}tbody{border-top:1px solid #ccc;}tbody th{border-bottom:1px solid #ccc;}thead th{text-align:left;padding-right:1em;border-bottom:3px solid #ccc;}.breadcrumb{padding-bottom:.5em}div.indentation{width:20px;height:1.7em;margin:-0.4em 0.2em -0.4em -0.4em;padding:0.42em 0 0.42em 0.6em;float:left;}div.tree-child{background:url(/misc/tree.png) no-repeat 11px center;}div.tree-child-last{background:url(/misc/tree-bottom.png) no-repeat 11px center;}div.tree-child-horizontal{background:url(/misc/tree.png) no-repeat -11px center;}.error{color:#e55;}div.error{border:1px solid #d77;}div.error,tr.error{background:#fcc;color:#200;padding:2px;}.warning{color:#e09010;}div.warning{border:1px solid #f0c020;}div.warning,tr.warning{background:#ffd;color:#220;padding:2px;}.ok{color:#008000;}div.ok{border:1px solid #00aa00;}div.ok,tr.ok{background:#dfd;color:#020;padding:2px;}.item-list .icon{color:#555;float:right;padding-left:0.25em;clear:right;}.item-list .title{font-weight:bold;}.item-list ul{margin:0 0 0.75em 0;padding:0;}.item-list ul li{margin:0 0 0.25em 1.5em;padding:0;list-style:disc;}ol.task-list li.active{font-weight:bold;}.form-item{margin-top:1em;margin-bottom:1em;}tr.odd .form-item,tr.even .form-item{margin-top:0;margin-bottom:0;white-space:nowrap;}tr.merge-down,tr.merge-down td,tr.merge-down th{border-bottom-width:0 !important;}tr.merge-up,tr.merge-up td,tr.merge-up th{border-top-width:0 !important;}.form-item input.error,.form-item textarea.error,.form-item select.error{border:2px solid red;}.form-item .description{font-size:0.85em;}.form-item label{display:block;font-weight:bold;}.form-item label.option{display:inline;font-weight:normal;}.form-checkboxes,.form-radios{margin:1em 0;}.form-checkboxes .form-item,.form-radios .form-item{margin-top:0.4em;margin-bottom:0.4em;}.marker,.form-required{color:#f00;}.more-link{text-align:right;}.more-help-link{font-size:0.85em;text-align:right;}.nowrap{white-space:nowrap;}.item-list .pager{clear:both;text-align:center;}.item-list .pager li{background-image:none;display:inline;list-style-type:none;padding:0.5em;}.pager-current{font-weight:bold;}.tips{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;font-size:0.9em;}dl.multiselect dd.b,dl.multiselect dd.b .form-item,dl.multiselect dd.b select{font-family:inherit;font-size:inherit;width:14em;}dl.multiselect dd.a,dl.multiselect dd.a .form-item{width:8em;}dl.multiselect dt,dl.multiselect dd{float:left;line-height:1.75em;padding:0;margin:0 1em 0 0;}dl.multiselect .form-item{height:1.75em;margin:0;}.container-inline div,.container-inline label{display:inline;}ul.primary{border-collapse:collapse;padding:0 0 0 1em;white-space:nowrap;list-style:none;margin:5px;height:auto;line-height:normal;border-bottom:1px solid #bbb;}ul.primary li{display:inline;}ul.primary li a{background-color:#ddd;border-color:#bbb;border-width:1px;border-style:solid solid none solid;height:auto;margin-right:0.5em;padding:0 1em;text-decoration:none;}ul.primary li.active a{background-color:#fff;border:1px solid #bbb;border-bottom:#fff 1px solid;}ul.primary li a:hover{background-color:#eee;border-color:#ccc;border-bottom-color:#eee;}ul.secondary{border-bottom:1px solid #bbb;padding:0.5em 1em;margin:5px;}ul.secondary li{display:inline;padding:0 1em;border-right:1px solid #ccc;}ul.secondary a{padding:0;text-decoration:none;}ul.secondary a.active{border-bottom:4px solid #999;}#autocomplete{position:absolute;border:1px solid;overflow:hidden;z-index:100;}#autocomplete ul{margin:0;padding:0;list-style:none;}#autocomplete li{background:#fff;color:#000;white-space:pre;cursor:default;}#autocomplete li.selected{background:#0072b9;color:#fff;}html.js input.form-autocomplete{background-image:url(/misc/throbber.gif);background-repeat:no-repeat;background-position:100% 2px;}html.js input.throbbing{background-position:100% -18px;}html.js fieldset.collapsed{border-bottom-width:0;border-left-width:0;border-right-width:0;margin-bottom:0;height:1em;}html.js fieldset.collapsed *{display:none;}html.js fieldset.collapsed legend{display:block;}html.js fieldset.collapsible legend a{padding-left:15px;background:url(/misc/menu-expanded.png) 5px 75% no-repeat;}html.js fieldset.collapsed legend a{background-image:url(/misc/menu-collapsed.png);background-position:5px 50%;}* html.js fieldset.collapsed legend,* html.js fieldset.collapsed legend *,* html.js fieldset.collapsed table *{display:inline;}html.js fieldset.collapsible{position:relative;}html.js fieldset.collapsible legend a{display:block;}html.js fieldset.collapsible .fieldset-wrapper{overflow:auto;}.resizable-textarea{width:95%;}.resizable-textarea .grippie{height:9px;overflow:hidden;background:#eee url(/misc/grippie.png) no-repeat center 2px;border:1px solid #ddd;border-top-width:0;cursor:s-resize;}html.js .resizable-textarea textarea{margin-bottom:0;width:100%;display:block;}.draggable a.tabledrag-handle{cursor:move;float:left;height:1.7em;margin:-0.4em 0 -0.4em -0.5em;padding:0.42em 1.5em 0.42em 0.5em;text-decoration:none;}a.tabledrag-handle:hover{text-decoration:none;}a.tabledrag-handle .handle{margin-top:4px;height:13px;width:13px;background:url(/misc/draggable.png) no-repeat 0 0;}a.tabledrag-handle-hover .handle{background-position:0 -20px;}.joined + .grippie{height:5px;background-position:center 1px;margin-bottom:-2px;}.teaser-checkbox{padding-top:1px;}div.teaser-button-wrapper{float:right;padding-right:5%;margin:0;}.teaser-checkbox div.form-item{float:right;margin:0 5% 0 0;padding:0;}textarea.teaser{display:none;}html.js .no-js{display:none;}.progress{font-weight:bold;}.progress .bar{background:#fff url(/misc/progress.gif);border:1px solid #00375a;height:1.5em;margin:0 0.2em;}.progress .filled{background:#0072b9;height:1em;border-bottom:0.5em solid #004a73;width:0%;}.progress .percentage{float:right;}.progress-disabled{float:left;}.ahah-progress{float:left;}.ahah-progress .throbber{width:15px;height:15px;margin:2px;background:transparent url(/misc/throbber.gif) no-repeat 0px -18px;float:left;}tr .ahah-progress .throbber{margin:0 2px;}.ahah-progress-bar{width:16em;}#first-time strong{display:block;padding:1.5em 0 .5em;}tr.selected td{background:#ffc;}table.sticky-header{margin-top:0;background:#fff;}#clean-url.install{display:none;}html.js .js-hide{display:none;}#system-modules div.incompatible{font-weight:bold;}#system-themes-form div.incompatible{font-weight:bold;}span.password-strength{visibility:hidden;}input.password-field{margin-right:10px;}div.password-description{padding:0 2px;margin:4px 0 0 0;font-size:0.85em;max-width:500px;}div.password-description ul{margin-bottom:0;}.password-parent{margin:0 0 0 0;}input.password-confirm{margin-right:10px;}.confirm-parent{margin:5px 0 0 0;}span.password-confirm{visibility:hidden;}span.password-confirm span{font-weight:normal;}
-
-
-ul.menu{list-style:none;border:none;text-align:left;}ul.menu li{margin:0 0 0 0.5em;}li.expanded{list-style-type:circle;list-style-image:url(/misc/menu-expanded.png);padding:0.2em 0.5em 0 0;margin:0;}li.collapsed{list-style-type:disc;list-style-image:url(/misc/menu-collapsed.png);padding:0.2em 0.5em 0 0;margin:0;}li.leaf{list-style-type:square;list-style-image:url(/misc/menu-leaf.png);padding:0.2em 0.5em 0 0;margin:0;}li a.active{color:#000;}td.menu-disabled{background:#ccc;}ul.links{margin:0;padding:0;}ul.links.inline{display:inline;}ul.links li{display:inline;list-style-type:none;padding:0 0.5em;}.block ul{margin:0;padding:0 0 0.25em 1em;}
-
-
-#permissions td.module{font-weight:bold;}#permissions td.permission{padding-left:1.5em;}#access-rules .access-type,#access-rules .rule-type{margin-right:1em;float:left;}#access-rules .access-type .form-item,#access-rules .rule-type .form-item{margin-top:0;}#access-rules .mask{clear:both;}#user-login-form{text-align:center;}#user-admin-filter ul{list-style-type:none;padding:0;margin:0;width:100%;}#user-admin-buttons{float:left;margin-left:0.5em;clear:right;}#user-admin-settings fieldset .description{font-size:0.85em;padding-bottom:.5em;}.profile{clear:both;margin:1em 0;}.profile .picture{float:right;margin:0 1em 1em 0;}.profile h3{border-bottom:1px solid #ccc;}.profile dl{margin:0 0 1.5em 0;}.profile dt{margin:0 0 0.2em 0;font-weight:bold;}.profile dd{margin:0 0 1em 0;}
-div.codeblock{padding:5px;border:1px solid #CCC;background-color:#EEE;}
-
-.ctools-locked{color:red;border:1px solid red;padding:1em;}.ctools-owns-lock{background:#FFFFDD none repeat scroll 0 0;border:1px solid #F0C020;padding:1em;}a.ctools-ajaxing,input.ctools-ajaxing,button.ctools-ajaxing,select.ctools-ajaxing{padding-right:18px !important;background:url(/sites/all/modules/ctools/images/status-active.gif) right center no-repeat;}div.ctools-ajaxing{float:left;width:18px;background:url(/sites/all/modules/ctools/images/status-active.gif) center center no-repeat;}
-.gam-banner{line-height:0;position:absolute;}.gam-holder{margin:0 auto;}.block-google_admanager{line-height:0;}
-#html5-user-geolocation-map{width:450px;height:250px;background:url(/sites/all/modules/html5_user_geolocation/world-map.png);position:relative;}#html5-user-geolocation-map-wrapper,#html5-user-geolocation-messages-wrapper .geolocating{display:none;}#html5-user-geolocation-map .dot{position:absolute;border:4px solid #064771;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;margin:-4px -4px -4px -4px;display:none;}
-
-
-#forum .description{font-size:0.9em;margin:0.5em;}#forum td.created,#forum td.posts,#forum td.topics,#forum td.last-reply,#forum td.replies,#forum td.pager{white-space:nowrap;}#forum td.posts,#forum td.topics,#forum td.replies,#forum td.pager{text-align:center;}#forum tr td.forum{padding-left:25px;background-position:2px 2px;background-image:url(/misc/forum-default.png);background-repeat:no-repeat;}#forum tr.new-topics td.forum{background-image:url(/misc/forum-new.png);}#forum div.indent{margin-left:20px;}.forum-topic-navigation{padding:1em 0 0 3em;border-top:1px solid #888;border-bottom:1px solid #888;text-align:center;padding:0.5em;}.forum-topic-navigation .topic-previous{text-align:right;float:left;width:46%;}.forum-topic-navigation .topic-next{text-align:left;float:right;width:46%;}
-
-
-.project table{width:auto;}.project tbody,.project tr{border:0;}.project td{vertical-align:top;padding:0.4em 0.1em;}.project .links{font-size:0.8em;}.project .author{color:#999;font-size:0.8em;}.project .downloads td{border-bottom:1px solid #ccc;padding-bottom:1em;}.project .downloads ul{margin:0px;}.project .downloads li{list-style-type:none;margin:0px;}.project-links-section div{float:left;padding-right:1.2em;width:30%;}#edit-project-goto{width:150px;}.node-form .project-taxonomy-element{float:left;padding-right:2em;}ul.project-terms{padding-left:1.5em;}.project-feed-icon{padding-left:1em;}
-
-
-.node-form .version-elements .form-item{float:left;padding-right:0.8em;margin:0.05em 0.1em;}table.releases{margin-top:.5em;}table.releases .release-title{width:15%;}table.releases .release-date{width:15%;}table.releases .release-size{width:10%;}table.releases .release-links{width:33%;}table.releases .release-status{width:25%;}table.releases .release-icon{width:2%;}.download-table h4{margin-bottom:0.67em;}.download-table-ok tr.odd,.download-table-ok tr.odd td.active,.download-table-ok tr.even,.download-table-ok tr.even td.active,table.releases tr.ok{background-color:#dfd;}.project-release tr.release-update-status-1,.download-table-warning tr.odd,.download-table-warning tr.odd td.active,.download-table-warning tr.even,.download-table-warning tr.even td.active,table.releases tr.warning{background-color:#ffd;}.project-release tr.release-update-status-2,.download-table-error tr.odd,.download-table-error tr.odd td.active,.download-table-error tr.even,.download-table-error tr.even td.active,table.releases tr.error{background-color:#fdd;}.view-project-release-download-table table{width:99%;}.view-project-release-download-table td.views-field-version{width:20%;}.view-project-release-download-table td.views-field-files{width:30%;}.view-project-release-download-table td.views-field-files span.filesize{font-size:80%;}.view-project-release-download-table td.views-field-file-timestamp{width:15%;}.view-project-release-download-table td.views-field-view-node{width:15%;}.view-project-release-download-table td.views-field-update-status{width:20%;}.project-release-files .views-field-filehash{color:#999;}
-
-
-
-#project-issue-summary-table{float:left;}#project-issue-summary-links{float:right;}#project-issue-summary-links li{background:none;list-style-type:none;margin-left:0;padding-left:0;}.project-issue .header{font-weight:bold;padding-top:0.5em;}.project-issue .summary table{border-collapse:collapse;width:auto;border:1px;border-style:solid;border-color:#eee;}.project-issue .summary table td{color:#333;background-color:transparent;font-size:90%;padding:0em 1em;border:0;}.project-issue tbody{border:0;}.project-issue .summary table tr{border:0;}.project-issue .node-form div.inline-options .form-item{float:left;padding-right:0.8em;margin:0.05em 0.1em;}.project-issue .node-form div.inline-options{overflow:hidden;}.project-issue .node-form div.inline-options:after{content:".";display:block;height:0;clear:both;visibility:hidden;}.project-issue .node-form fieldset{display:inline-block;width:97%;}.project-issue .node-form #edit-pid,.project-issue .node-form #edit-project-info-pid{width:225px;}table.projects{width:100%;margin-bottom:3em;}table.projects .project-name{width:24%;}table.projects .project-issue-updated{width:15%;}table.projects .project-issues{width:11%;text-align:center;}table.projects .project-issue-links{width:28%;padding-left:0.4em;padding-right:0.4em;text-align:center;}table.projects .project-project-links{width:22%;text-align:center;}table.projects .project-project-links a{white-space:nowrap;}.project-issue .quick-search #edit-projects,.project-issue .quick-search #edit-states{width:150px;}.view-project-issues-project .form-item #edit-filter1,.view-project-issues-project-search .form-item #edit-filter1,#edit-filter2{width:150px;}.view-project-issues-project-search #views-filters{width:100%;overflow:auto;}.project-issue .quick-search tr td .form-item,.project-issue .quick-search tr td input{margin:0;padding:0;}.project-issue .quick-search tr td{vertical-align:bottom;}.project-issue-status-info a,.project-issue-status-info .project-issue-assigned-user{background-color:#cdcdcd;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;padding:2px 4px;}.project-issue-status-info .project-issue-assigned-user{white-space:nowrap;}.project-issue tr.state-1,.project-issue-status-1 a{background-color:#fff;}.project-issue tr.state-1 td.active{background-color:#e1e7eb;}.project-issue tr.state-2,.project-issue-status-2 a{background-color:#c0ffc0;}.project-issue tr.state-2 td.active{background-color:#cec;}.project-issue tr.state-3,.project-issue-status-3 a,.project-issue tr.state-4,.project-issue-status-4 a,.project-issue tr.state-5,.project-issue-status-5 a,.project-issue tr.state-6,.project-issue-status-6 a{background-color:#ddf;}.project-issue tr.state-3 td.active,.project-issue tr.state-4 td.active,.project-issue tr.state-5 td.active,.project-issue tr.state-6 td.active{background-color:#cce;}.project-issue tr.state-7,.project-issue-status-7 a{background-color:#ffc9c9;}.project-issue tr.state-7 td.active{background-color:#eeb9b9;}.project-issue tr.state-8,.project-issue-status-8 a{background-color:#ffd;}.project-issue tr.state-8 td.active{background-color:#eed;}.project-issue tr.state-13,.project-issue-status-13 a{background-color:#ffe7dd;}.project-issue tr.state-13 td.active{background-color:#eed7cc;}.project-issue tr.state-14,.project-issue-status-14 a{background-color:#e7ffdd;}.project-issue tr.state-14 td.active{background-color:#d7eecc;}.project-issue-numeric{text-align:center;}.project-issue-numeric-light{text-align:center;color:#999;}.project-issue-statistics-overview-table{overflow:auto;}.project-issue-status-2,.project-issue-status-3,.project-issue-status-5,.project-issue-status-6,.project-issue-status-7{text-decoration:line-through;}.wrapper-throbber{background:url(/misc/throbber.gif) no-repeat right -18px;width:20px;height:18px;margin-top:20px;float:left;}
-
-
-tr.pift-pass{background-color:#99FF99 !important;}tr.pift-fail{background-color:#FF9999 !important;}tr.pift-retest{background-color:#FFFF77 !important;}
-
-.views-exposed-form .views-exposed-widget{float:left;padding:.5em 1em 0 0;}.views-exposed-form .views-exposed-widget .form-submit{margin-top:1.6em;}.views-exposed-form .form-item,.views-exposed-form .form-submit{margin-top:0;margin-bottom:0;}.views-exposed-form label{font-weight:bold;}.views-exposed-widgets{margin-bottom:.5em;}html.js a.views-throbbing,html.js span.views-throbbing{background:url(/sites/all/modules/views/images/status-active.gif) no-repeat right center;padding-right:18px;}div.view div.views-admin-links{font-size:xx-small;margin-right:1em;margin-top:1em;}.block div.view div.views-admin-links{margin-top:0;}div.view div.views-admin-links ul{padding-left:0;}div.view div.views-admin-links li a{color:#ccc;}div.view div.views-admin-links li{padding-bottom:2px;z-index:201;}div.view div.views-admin-links-hover a,div.view div.views-admin-links:hover a{color:#000;}div.view div.views-admin-links-hover,div.view div.views-admin-links:hover{background:transparent;;}div.view div.views-admin-links a:before{content:"[";}div.view div.views-admin-links a:after{content:"]";}div.view div.views-hide{display:none;}div.view div.views-hide-hover,div.view:hover div.views-hide{display:block;position:absolute;z-index:200;}div.view:hover div.views-hide{margin-top:-1.5em;}.views-view-grid tbody{border-top:none;}
-
-
-
-html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{border:0;background:transparent;font-size:100%;margin:0;padding:0;vertical-align:baseline;}img{border:0;background:transparent;font-size:100%;padding:0;vertical-align:baseline;}body{line-height:1;}ol,ul{list-style:none;}blockquote,q{quotes:none;}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;}ins{text-decoration:none;}del{text-decoration:line-through;}table{border-collapse:collapse;border-spacing:0;}ul.primary,ul.primary li,ul.primary li.active,ul.secondary,ul.secondary li,ul.secondary li.active{display:inline;}ul.primary,ul.primary li,ul.primary li a,ul.primary li.active a,ul.secondary,ul.secondary li,ul.secondary li a,ul.secondary li.active,ul.secondary li.active a{margin:0;padding:0;border:none;background:none;}.item-list ul li{margin:0;padding:0;list-style:none;list-style-image:none;list-style-position:inherit;list-style-type:none;}.block ul{margin:0;padding:0;}
-
-
-.container-12{margin-left:auto;margin-right:auto;width:960px;}#homebox.column-count-3 .homebox-column-wrapper,.grid-1,.grid-2,.grid-3,.grid-4,.grid-5,.grid-6,.grid-7,.grid-8,.grid-9,.grid-10,.grid-11,.grid-12,.grid-footer{display:inline;float:left;margin-left:10px;margin-right:10px;position:relative;}[dir=rtl] #homebox.column-count-3 .homebox-column-wrapper,[dir=rtl] .grid-1,[dir=rtl] .grid-2,[dir=rtl] .grid-3,[dir=rtl] .grid-4,[dir=rtl] .grid-5,[dir=rtl] .grid-6,[dir=rtl] .grid-7,[dir=rtl] .grid-8,[dir=rtl] .grid-9,[dir=rtl] .grid-10,[dir=rtl] .grid-11,[dir=rtl] .grid-12,[dir=rtl] .grid-footer{float:right;}#homebox.column-count-3 .homebox-column-wrapper-1,.alpha{margin-left:0;}[dir=rtl] #homebox.column-count-3 .homebox-column-wrapper-1,[dir=rtl] .alpha{margin-left:10px;margin-right:0;}#homebox.column-count-3 .homebox-column-wrapper-3,.omega{margin-right:0;}[dir=rtl] #homebox.column-count-3 .homebox-column-wrapper-3,[dir=rtl] .omega{margin-right:10px;margin-left:0;}.grid-1{width:60px;}.grid-2{width:140px;}.grid-3{width:220px;}#homebox.column-count-3 .homebox-column-wrapper,.grid-4{width:300px;}.grid-5{width:380px;}.grid-6{width:460px;}.grid-7{width:540px;}.grid-8{width:620px;}.grid-9{width:700px;}.grid-10{width:780px;}.grid-11{width:860px;}.grid-12{width:940px;}.grid-footer{width:172px;}.clear{clear:both;}.clearleft{clear:left;}.clearright{clear:right;}img.right{clear:right;float:right;margin:0 0 0.692em 20px;}img.left{clear:left;float:left;margin:0 20px 0.692em 0;}img.no-clear{clear:none;}.clear-block:after{clear:both;content:".";display:block;font-size:0;height:0;visibility:hidden;}.clear-block{display:inline-block;}/*_\*/
-* html .clear-block{height:1%;}.clear-block{display:block;}/* End hide from IE/Mac */
-
-
-
-
-
-
-body{color:#222;background-color:#fff;font-size:0.8125em;}body,caption,th,td,input,textarea,select,option,legend,fieldset{font-family:"Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif;line-height:1.384615em;}h1,h2,h3,h4,.h1,.h2,.h3,.h4{color:#555;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:normal;line-height:1.5em;}h1,.h1{color:#000;font-size:1.846em;line-height:1.25em;margin:1.125em 0 0.375em;}#aggregator .feed-item-title,h2,.h2{font-size:1.615em;line-height:1.286em;margin:0.619em 0 0.238em;}.block h2{margin-top:0;}#profile .name,h3,.h3{font-size:1.231em;line-height:1.125em;margin:1.125em 0 0.563em;}h4,.h4,h5,.h5,h6,.h6{color:#000;font-size:1em;line-height:1.385em;font-weight:bold;}#content h4,#content .h4{margin:0.5em 0 0.166667em;}#content h5,#content .h5{margin:1em 0 0;}#content h6,#content .h6{margin:0.5em 0 0;}p{margin-bottom:0.692em;}a,a:link,a:visited,a:active{color:#0678BE;text-decoration:none;}a:hover,a:focus{color:#0678BE;text-decoration:underline;}code,tt,pre{background-color:#F6F6F2;font-family:"Bitstream Vera Sans Mono",Monaco,"Lucida Console",monospace;font-size:0.9230em;padding:1px;white-space:pre-wrap;}
-
-
-table{margin-bottom:0.5em;}thead th{border-bottom:0;padding:0.25em 0.5em;}th,td{padding:0.25em 0.5em;}th{background:#eaeae1;font-weight:bold;}th span.sort-header{float:left;}.table-sort-asc,.table-sort-desc{padding:0 14px 0 0;}.table-sort-asc{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:right -636px;}.table-sort-desc{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:right -600px;}th a,th a:link,th a:visited{color:#222;}th.active{background:#d7d7c7;}tr.even td.active{background:#e5e5d4;border-bottom:1px solid #D7D7C7;border-top:1px solid #D7D7C7;}tr.odd td.active{background:#eaeae1;}tr.even{background:#EEEEE0;border-bottom:1px solid #D8D8D2;border-top:1px solid #D8D8D2;position:relative;}tr.odd{background-color:#fff;border:0;border-bottom:1px solid #D8D8D2;position:relative;}#forum td > td{border:1px solid #f0f;}#forum ul{padding:0;}#forum .forum.first.last a{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 -415px;padding-left:15px;}#forum tr td.container{padding-left:10px;}#forum tr td.container .name{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 3px;padding:0px 0 5px 20px;min-width:20px;}#forum div.indent{margin-left:30px;}#forum tr td.forum{background:none;padding:0.25em 0.5em;}#forum tr td.forum .name{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 -155px;min-width:20px;}#forum tr td.forum .name,#forum .description{margin:0;padding:0 0 0 20px;}td.icon{margin:5px 0 0 0;}.icon16{width:16px;height:16px;display:block;}.forum-default,.forum-hot{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 -155px;}.forum-hot-new,.forum-new{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 -410px;}.forum-closed{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 -380px;}.forum-sticky{background:transparent url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat;background-position:0 5px;}table.releases tr.ok td{background-color:#F9FFEC;border-bottom:1px solid #EAEAE1;}table.releases tr.release-dev td{background-color:#F6E8E8;border-bottom:1px solid #EBCCCC;}table.releases td{vertical-align:middle;}#content table.releases td ul.links{margin:0;padding:0;}table.releases td.release-icon{padding:0 5px;vertical-align:middle;}table.releases td.release-icon img{display:block;}table.project-issue td{}table tr.notrecommended td{background:#F6E8E8;border-bottom:1px solid #EBCCCC;}
-
-
-#project-solr-browse-projects-form .results-count{border-bottom:1px solid #DDDDDD;margin:0 0 1em 0;padding-bottom:0.5em;}
-
-
-
-
-
-#skip-links a,#skip-links a:link,#skip-links a:visited,#skip-links a:hover{height:1px;left:0;overflow:hidden;position:absolute;top:-500px;width:1px;}#skip-links a:active,#skip-links a:focus{position:static;height:auto;width:auto;}blockquote{background:#fff url(/sites/all/themes/bluecheese/images/blockquote-66.png) no-repeat 0 0;margin:1.384em 40px 1.384em 20px;padding-left:30px;}acronym{border-bottom:1px dotted #666;}sub{font-size:0.923em;text-align:sub;}small{font-size:0.923em;}#column-left{z-index:1;}#content-top-region,#content,#content-bottom-region,#column-right-region{margin-bottom:13px;}#header,#footer,#page{min-width:960px;}#header{background-color:#56B3E6;height:10.846153em;}#header-content{position:relative;z-index:2;height:6.69230769em;}body.drupalorg-front #header{height:22.153846em;}body.drupalorg-front #header-content{height:18em;}#drupalorg-site-status{background-color:#D32101;color:#FFF;padding:0.5em;text-align:center;position:relative;-moz-box-shadow:0 2px 2px 1px rgba(68,68,68,0.5);-webkit-box-shadow:0 2px 2px 1px rgba(68,68,68,0.5);box-shadow:0 2px 2px 1px rgba(68,68,68,0.5);z-index:1;}#drupalorg-site-status a{color:#FFF;text-decoration:underline;}h1#site-name{margin:0;}#site-name a{display:block;height:63px;overflow:hidden;text-indent:-999em;width:181px;}#site-name a:focus,#site-name a:active{outline:#FFF dotted thin;}#header-left h2{color:#FFF;font-size:1.6153em;font-weight:lighter;margin:24px 0 12px 0;}#header-left-inner a{color:#fff;}.standfirst{font-size:1em;height:6.15384em;line-height:1.538461em;margin-top:0.5em;overflow:auto;}#header-right-inner{margin-top:46px;}#page{margin-bottom:30px;}#page-subtitle{margin-top:0;}.breadcrumb{padding-bottom:0;}#page-tools{margin:0.692em 0 0;float:right;text-align:right;}#page-tools li{display:block;padding:0;}#page-tools a{color:#96BC44;}#footer{background-color:#F6F6F2;font-size:0.92307em;line-height:1.5em;padding:30px 0 20px;}#footer-region li.first a{color:#222;}#footer-region .grid-footer:hover li.first a,#footer-region li.first a:hover{color:#0678BE;}#footer-message{border-top:1px solid #E2E2DF;margin-top:50px;padding-top:10px;}#footer-message-inner{color:#666;text-align:center;}#search-theme-form{float:right;vertical-align:middle;}#edit-search-theme-form-1-wrapper{display:inline;margin-bottom:0;}#edit-search-theme-form-1{background-color:#FFF;border:3px solid #1885C8;color:#999;float:left;font-size:0.92307em;min-height:18px;line-height:1.61538em;margin:0 5px 0 0;padding:8px 10px 8px 30px;width:229px;}#edit-search-theme-form-1-wrapper input.has-value,body.front #edit-search-theme-form-1-wrapper input{color:#222;font-size:1.0769em;}#edit-search-theme-form-1:focus{outline:#E4E4E4 solid 2px;}#edit-search-theme-form-1-wrapper label{display:none;}.drupalorg-front #edit-search-theme-form-1-wrapper label{color:#FFF;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.61538em;font-weight:lighter;margin:0 0 .5em 0;}#search-theme-form-advanced{clear:left;display:none;float:left;margin-top:-3px;width:275px;}#search-theme-form-advanced fieldset{border:0;line-height:1.538461em;margin:0;padding:0;}.drupalorg-front #search-theme-form-advanced{display:block;margin:9px 0 0 3px;}#search-theme-form-advanced{display:none;}html.js #search-theme-form-advanced{display:block;}#search-theme-form-advanced fieldset.collapsible{background:url(/sites/all/themes/bluecheese/images/search-bottom.png) 0 100% no-repeat;border:0;margin:0;padding:0;padding-bottom:12px;}#search-theme-form-advanced fieldset.collapsed{background:transparent;}#search-theme-form-advanced fieldset.collapsible .fieldset-wrapper{background-color:#0678BE;padding:2em 10px 0;}#search-theme-form-advanced fieldset.collapsed .fieldset-wrapper{background-color:transparent;}#search-theme-form-advanced fieldset.collapsible .form-radios{border:0;color:#FFF;}html.js #search-theme-form-advanced fieldset.collapsible .fieldset-wrapper{overflow:visible;float:left;}#search-theme-form-advanced legend{margin:0;height:1.538461em;line-height:1.538461em;}#search-theme-form-advanced fieldset.collapsible legend{height:auto;position:absolute;right:0;top:4px;}#search-theme-form-advanced fieldset.collapsible legend a{color:#000;padding:0 16px 0 0;text-decoration:none;}#search-theme-form-advanced fieldset.collapsible legend a:hover{text-decoration:underline;}#search-theme-form-advanced fieldset.collapsible legend a:focus{outline:none;}#search-theme-form-advanced .form-radios,#search-theme-form-advanced .form-radios .form-item{margin:0;float:left;}#search-theme-form-advanced .form-radios{padding-top:0;width:275px;position:relative;}#search-theme-form-advanced fieldset.collapsible .form-radios{width:255px;}#search-theme-form-advanced .form-radios .form-item{min-height:1.538461em;width:135px;}#search-theme-form-advanced fieldset.collapsible .form-radios .form-item{font-size:0.923076em;width:127px;}#search-theme-form-advanced .form-radios .form-divider{float:left;width:127px;}#search-theme-form-advanced .form-radios .form-item input{margin:0;}#search-theme-form-advanced .form-radios label{color:#FFF;}#search-theme-form-submit{display:inline;margin-top:3px;}.page-search h1{background-color:#F6F6F2;color:#555555;font-size:1.38461em;padding:10px;}.page-search h1 em{font-style:normal;font-weight:bold;}.page-search #project-solr-browse-projects-form{background:none;margin-bottom:1em;padding:0;}.page-search #project-solr-browse-projects-form label{font-weight:normal;}.page-search #drupalorg-search-sort-form{margin-bottom:1em;}.page-search #drupalorg-search-sort-form .form-item{margin-top:0;}.page-search #edit-solrsort-wrapper label,.page-search #edit-solrsort-wrapper select{display:inline;font-weight:normal;margin:0 10px 0 0;}.page-search #edit-solrsort-wrapper{margin-right:0;}.search-results dd{padding-left:0;}.search-results .search-info{color:#666;font-size:0.92307em;}.search-results dt{font-size:1em;}.page-search #column-right .block{background:none;}.page-search #column-right .item-list ul{list-style-image:none;list-style-position:outside;list-style-type:none;margin-left:-10px;}.page-search #column-right .item-list ul li{list-style-type:none;margin-bottom:3px;margin-left:0;}#block-drupalorg_news-news-terms ul.links li a,.page-search #column-right .item-list ul li a{color:#0678BE;padding:0.153846em 0.384615em 0.230769em 1em;}.page-search #column-right .item-list ul li a.selected,.page-search #column-right .item-list ul li a:hover,#block-drupalorg_news-news-terms ul.links li a.active,#block-drupalorg_news-news-terms ul.links li a:hover,#block-drupalorg_news-news-terms ul.links li a:focus{background-color:#666;color:#fff;text-decoration:none;}.page-search #drupalorg-search-block-form .form-text{height:1.5em;width:150px;}.page-search #content-top-region form.drupalorgSearch-processed input[type=submit]{display:none;}#autocomplete{background-color:#FFF;}#content #autocomplete ul{padding-left:5px;}#content #autocomplete ul li{list-style-type:none;}div#page-title{margin-top:1.048em;}#nav-header{font-size:0.923076em;}#nav-header ul{background:#064771;float:right;padding:0 0.75em 0 0.75em;}#nav-header ul li{float:left;margin:0.333333em 0.833333em;}#nav-header ul li a{color:#FFF;}#nav-header ul li a:hover,#nav-header ul li a:focus{color:#A5E2FF;text-decoration:none;}#nav-masthead{display:block;float:left;position:relative;z-index:1;}#nav-masthead ul li{list-style:none;float:left;font-size:0.923076em;margin:0;padding:0 0.615384em;}#nav-masthead ul li a{color:#FFF;display:block;float:left;margin:0;padding:0.416666em .75em 0.416666em 0;text-decoration:none;}#nav-masthead ul li.active a,#nav-masthead ul li:hover a,#nav-masthead ul li:focus a{color:#000;}#userinfo{float:left;margin:5px 0 0 .75em;}#userinfo a{color:#FFF;font-size:0.92307em;margin:0 1em 0 0;text-decoration:none;}#nav-content ul{border-bottom:1px solid #DDD;float:left;margin-bottom:1.154em;width:100%;}#nav-content ul li{float:left;margin-bottom:-1px;padding:4px 12px 5px 12px;position:relative;}#nav-content ul li a:hover,#nav-content ul li a:focus,#nav-content ul li.active-parent a{color:#000;text-decoration:none;}#nav-content ul li.active,#nav-content ul li.active-parent{background-color:transparent;border:none;}#nav-content ul li.active a:hover,#nav-content ul li.active a:focus{text-decoration:none;}#nav-content li.active,#nav-content li.active-parent{padding:0 0 0 0.384615em;}#nav-content li.active a.active,#nav-content li.active-parent a{display:block;padding:0.307692em 0.692307em 0.846153em 0.230769em;}.ui-tabs-nav{width:100%;float:left;border-bottom:1px solid #BFBFBA;}.ui-tabs-nav li{float:left;padding:0 0 0 10px;position:relative;margin-bottom:-1px;}.ui-tabs-nav a{color:#27537A;display:block;float:left;height:25px;padding:6px 11px 0 0;}.ui-tabs-nav li.ui-tabs-selected a{color:#000;}.ui-tabs-nav li a:hover,.ui-tabs-nav li a:focus{text-decoration:none;}.ui-tabs-hide{display:none;}.ui-tabs-nav a:active{outline:none;}.ui-tabs-nav .icon{display:inline-block;height:13px;margin-right:3px;width:11px;}#content .ui-tabs-panel h6{margin:0;}#tabs{margin-bottom:20px;}#tabs ul.tabs{display:block;}#tabs ul.tabs li{float:left;margin-right:5px;}#tabs ul.tabs li a{color:#96BC44;display:block;float:left;}#tabs ul.tabs li a:hover,#tabs ul.tabs li a:focus{background:#96BC44;color:#FFF;text-decoration:none;}#tabs ul.tabs li.active{}#tabs ul.tabs li.active a{background:#96BC44;color:#FFF;}#tabs ul.tabs li.active a:hover,#tabs ul.tabs li.active a:focus{}#tabs ul.primary{height:23px;}#tabs ul.primary li{}#tabs ul.primary li a{padding:0.230769em 0.615384em;}#tabs ul.primary li.parent-active{}#tabs ul.primary li.parent-active a{background:#E6FCB6;height:20px;}#tabs ul.primary li.parent-active a:hover{background:#96BC44;}#tabs ul.secondary{background:#E6FCB6;font-size:0.92307em;height:22px;}#tabs ul.secondary li{}#tabs ul.secondary li a{height:20px;padding:2px 10px 0 10px;}#content ul,ol{margin-bottom:0.692em;padding-left:2em;}#content [dir=rtl] ul,[dir=rtl] ol{padding-left:0;padding-right:2em;}ol{list-style:decimal outside;}.block ol{list-style:none;padding-left:0;}#content .profile ul,#homebox ul,#homebox ol{margin-bottom:0;padding-left:0;}#content ul{list-style-type:disc;}#node-type-page #content ul{list-style-type:none;}#content .item-list ul.flat,#content .item-list ul.links,#content .item-list ul.flat li,#content .item-list ul.links li,#content ul.flat,#content ul.links,#content ul.flat li,#content ul.links li{list-style-type:none;list-style-image:none;margin-left:0;padding-left:0;}#content .node,#aggregator .feed-item{margin-bottom:1.385em;}#content .sticky{background-color:#F6F6F2;padding:10px;}#content .sticky h2.node-title{margin-top:0;}#content .comment h3.comment-title{word-spacing:0.2em;color:#888;margin-bottom:0;}#content .comment h3.comment-title a{word-spacing:normal;}#content .submitted,#content .modified,#aggregator .feed-item-meta,#content .comment .links{color:#666;font-size:0.923em;line-height:1.5em;margin-bottom:0.75em;}#content .comment .links{float:right;}#aggregator .feed-item-date{font-style:italic;}body.page-node #content .tabs{float:right;}body.page-node #content .tabs ul.tabs li{float:left;display:block;font-size:0.92307em;margin:0 5px;padding:1px 4px;text-decoration:none;}body.page-node #content .tabs ul.tabs li.active{display:none;}.feed-source,#content .node-footer,#aggregator .feed-item-categories,.user-signature,#block-drupalorg_handbook-license{color:#666;font-size:0.92307em;}#content .item-list .pager{padding:1em 0 0;text-align:left;}.item-list ul.pager li{margin:0;padding:0 5px;}.pager li.first{padding:0;}ul.pager a{color:#2E6AB1;}.pager li.pager-current{background-color:#2E6AB1;color:#FFF;}.forum-topic-navigation{margin-bottom:10px;}.book-navigation{clear:both;}.book-navigation ul.menu{border-top:1px solid #E1E1DB;display:block;padding-bottom:.5em;}.book-navigation .page-links{border-top:1px solid #E1E1DB;border-bottom:1px solid #E1E1DB;margin-bottom:20px;}#column-right .block{background:#F6F6F2;}#column-right .block-inner{padding:1em;}.profile .item-list li,#column-right .block .item-list li,#homebox .block .item-list li{line-height:1.2em;margin-bottom:0.6em;}.front .block-content h4{clear:both;font-weight:bold;}.front .block-content .front-get-started{border:1px solid #DDD;border-width:1px 0;margin:1em 0;padding:20px 0;text-align:center;}.front #content .block-content ul{list-style:none;padding-left:0;}#front-middle-inner .block-content{margin-top:1.846em;height:5.538461em;padding:1.385em 0 0 64px;}#front-drupal-stats{border-top:1px solid #EEE;color:#9D9D93;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.846em;font-weight:lighter;line-height:1.5em;padding-top:5px;padding-left:16px;}#front-drupal-stats em{font-style:normal;color:#55554A;}#block-project-5 p.date{color:#666;font-size:0.92307em;}#cvs ul{margin:0 0 0.5em 0;padding:0;}#cvs ul,#cvs li{list-style:none;}#cvs li div.title{color:#555;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1em;font-weight:bold;margin:0 0 0.5em 0;}#cvs li div.files{margin:0 0 0.5em 0;}#cvs li div.description{border-bottom:1px solid #E1E1DB;margin:0 0 2em 0;padding:0 0 1em 0;}#block-cvs-cvs_project_maintainers div.cvs-commit-times{color:#666;font-size:0.92307em;margin-bottom:0.5em;}#block-cvs-cvs_project_maintainers span.cvs-commits{white-space:nowrap;}.block ul.menu{padding:0 0 0.25em 1em;}#block-user-1 .h2{overflow:hidden;}.node-type-project-issue .comment-inner{margin-left:40px;}.node-type-project-issue #content h3.comment-title{float:left;font-size:1.1538em;margin-left:-40px;}.node-type-project-issue #content .comment .submitted{padding-top:1.4em;}.node-type-project-issue #content .comment .submitted a{font-size:1.2307em;}.comment .new{background-color:#E6FCB6;padding:1px 6px 2px;}.comment .picture{float:left;margin:0 1.5em 1.5em 0;}.comment-with-picture .content{margin-left:5.5em;}.node .picture{float:right;margin:0 1.5em 1.5em 0;}.indented{margin-left:30px;}.indented .indented .indented .indented{margin-left:0;}dl{margin-bottom:0.692em;}dt{font-weight:bold;margin:0.692em 0 0;}dl.documentation{margin-bottom:0;}dl.documentation dt{font-size:1.23076em;margin-top:0.563em;}a.all{font-weight:bold;}.narrow-box{margin-bottom:18px;padding:18px;}.narrow-box ul{padding-left:0!important;}.narrow-box ul li{list-style-type:none;}.narrow-box a.link-button{margin:20px 0 15px 0;}.narrow-box a.link-button span{font-size:0.92307em;white-space:nowrap;}.narrow-box-list{margin-bottom:1.5em;}#getting-started img{float:left;}a.action-button{display:inline-block;color:#fff;background:#9fc748;padding:0.643em 1.5em;font-size:1.077em;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;}a.action-button:hover{text-decoration:none;background:#8aaf3c;}#download h2,#content .drupal-modules-facets h2{margin-top:0;}#download .core ul li.download-core{margin-bottom:1.5em;}#content li.more a,#content li.more a:link,#content li.more a:visited,#content li.more a:active,#content li.all a,#content li.all a:link,#content li.all a:visited,#content li.all a:active{font-weight:bold;}#project-solr-version-form{margin-bottom:1em;}#edit-drupal-core-wrapper,#project-solr-version-form label,#project-solr-version-form select,#project-solr-version-form .form-submit{float:left;font-weight:normal;margin:0 10px 0 0;}#edit-drupal-core-wrapper{margin-right:0;}#project-solr-version-form .form-submit{padding:0 3px;}.feed-item-categories a,.feed-item-categories a:link,.feed-item-categories a:visited,.terms a,.terms a:link,.terms a:visited{background-color:#EEE;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;color:#666;display:inline-block;margin:3px 0;padding:3px 5px;text-decoration:none;}.feed-item-categories a:hover,.feed-item-categories a:active,.feed-item-categories a:focus,.terms a:hover,.terms a:active,.terms a:focus{background-color:#999;color:#FFF;}div.codeblock{background-color:#F6F6F2;margin-bottom:.5em;}.meta{background:#fffbd9;border-color:#ffebc5;border-style:solid none;border-width:1px;color:#666;font-size:0.92307em;margin:0.5em 0 1em;padding:0.5em 1em;}#content .meta h5{margin:0;}#page ul ul li{margin-left:1em;}#content .meta ul{list-style-type:none;margin:0;padding:0;}.profile{clear:none;margin-top:0;margin-bottom:0.692em;}.profile.alpha{clear:left;}.profile h3{border-bottom:none;clear:left;}.profile dl{margin:0;}.profile dt{clear:left;margin:0 10px 0 0;}.profile dd{margin-bottom:0.692em;}.profile .picture{float:right;margin-top:6px;}a.link-button{color:#FFF;display:inline-block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.38461em;height:36px;overflow:hidden;padding-left:1em;text-align:center;}a.link-button:focus,a.link-button:active{outline:#000 dotted thin;}a.link-button:hover{text-decoration:none;}.link-button span{cursor:pointer;display:inline-block;line-height:36px;padding:0 1em 0 0;}input.default{color:#888;}div.help,div.messages,div.warning{border:none;min-height:1em;padding:1em 1em 1em 3.5em;}div.help a,div.messages a,div.warning a{font-weight:bold;}#content div.help ul,#content div.messages ul{margin-bottom:1em;margin-left:0;padding:0;}#content div.help ul li,#content div.messages ul li{margin-bottom:.25em;}div.help{background:rgb(205,228,242) url(/sites/all/themes/bluecheese/images/icon-help.gif) 10px 14px no-repeat;margin-bottom:20px;}div.help ul li{list-style-image:url(/sites/all/themes/bluecheese/images/bullet-dot-blue.png);}div.more-help-link{margin-bottom:.5em;}div.messages,div.warning{margin-bottom:10px;}div.messages-multiple{padding-bottom:0;padding-left:4.5em;}div.messages-status{background:rgb(212,239,204) url(/sites/all/themes/bluecheese/images/icon-success.png) 10px 14px no-repeat;}div.messages-status ul li{list-style-image:url(/sites/all/themes/bluecheese/images/bullet-dot-green.png);}div.messages-warning,div.warning{background:#E6FCB6 url(/sites/all/themes/bluecheese/images/icon-warning.gif) 10px 14px no-repeat;}div.messages-warning ul li{list-style-image:url(/sites/all/themes/bluecheese/images/bullet-dot-yellow.png);}div.messages-error{background:#EBCCCC url(/sites/all/themes/bluecheese/images/icon-error.png) 10px 14px no-repeat;}div.messages-error ul li{list-style-image:url(/sites/all/themes/bluecheese/images/bullet-dot-red.png);}div.warning{margin-top:20px;}span.warning{color:rgb(227,144,27);margin-left:.5em;}div.warning span.warning{display:none;}tr.drag-previous{background:#E6FCB6;}.image-tags span{background-color:#49A9E4;display:inline-block;font-size:.6em;line-height:18px;padding-left:4px;}.image-tags span a{color:#FFF;display:inline-block;line-height:18px;padding-right:4px;}.source-tags .source-tag-688{background-color:#9FCA44;}.source-tags .source-tag-689{background-color:#EEE;}.source-tags .source-tag-689 a{color:#666;}.image-tags span:hover{background-color:#044771;}.image-tags span:hover a{text-decoration:none;}.source-tags span.source-tag-688:hover{background-color:#688A1F;}.source-tags span.source-tag-689:hover{background-color:#999;}.source-tags .source-tag-689 a:hover{color:#FFF;}.feature-tags span{background-color:#EBE3A4;color:#000;}.feature-tags span a{color:#000;}.feature-tags span:hover{background-color:#E9B538;}.feature-tags span:hover a{color:#FFF;}h2 .image-tags span{margin-left:1em;}.aggregator-promote-link{text-align:center;width:120px;padding:2px 0;}.aggregator-promote-link a{color:#96BC44;}.aggregator-promote-link:hover{background-color:#96BC44;}.aggregator-promote-link a:hover{color:#FFF;text-decoration:none;}#block-drupalorg_news-news-terms .block-inner{padding-left:3px;}#column-right #block-block-40,#column-right #block-drupalorg-drupalorg_activity,#block-drupalorg_news-news-terms.block{background-color:#FFF;}#block-drupalorg_news-news-terms h2{margin-bottom:.5em;}#block-drupalorg_news-news-terms ul.links{margin-left:-10px;}#block-drupalorg_news-news-terms ul.links li{display:list-item;margin-bottom:4px;}#about-features h3{font:bold 1em "Lucida Grande",Helvetica,Arial,sans-serif;text-transform:uppercase;}#about-features h3 a{display:block;padding:4px 0 0 70px;min-height:50px;}.node-section{border-bottom:1px solid #D8D8D2;padding-bottom:0.692em;}.comment{margin-top:0.692em;border-top:1px solid #D8D8D2;}.node-footer-section h3{margin:1em 0 .5em;}.aboutsmall{color:#555;font-size:0.92307em;}#content .aboutsmall ul{list-style:none;margin-bottom:1.5em;padding-left:0;}.aboutsmall dd{padding-left:0;}.aboutsmall h3{border-top:1px solid #DDD;margin-top:1em;padding-top:1em;}.aboutsmall .link-button{float:left;margin:1em 0;}.aboutsmall strong,.aboutsmall dt{color:#555;}.drupalorg-front #page{margin-top:1.385em;}.homepage-map{background:url(/sites/all/themes/bluecheese/images/world-map.png);height:250px;position:relative;width:450px;white-space:nowrap;}.homepage-map .homepage-pin{position:absolute;width:10px;height:10px;display:none;margin:0 0 -5px -5px;}.homepage-map .homepage-pin .latitude,.homepage-map .homepage-pin .longitude{display:none;}.homepage-map .homepage-pin .content{background:#fff;position:absolute;border:1px solid #bfbfba;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;padding:1px 4px;bottom:11px;}.homepage-map .homepage-pin-east .content{right:-40px;}.homepage-map .homepage-pin-west .content{left:-40px;}.homepage-map .homepage-pin .content:after{content:' ';display:block;position:absolute;width:12px;height:10px;bottom:-10px;background:url(/sites/all/themes/bluecheese/images/small-icons.png) no-repeat 0 -734px;}.homepage-map .homepage-pin-east .content:after{right:39px;}.homepage-map .homepage-pin-west .content:after{left:37px;}.homepage-map .drupalcon a{font-weight:bold;color:#d32101;}div.things-we-made-wrapper{width:300px;overflow:hidden;margin:0 0 1em 0;}#project-overview .project{border-bottom:1px solid #E1E1DB;margin-bottom:20px;padding-bottom:20px;}#project-overview .image-attach-teaser{float:right;margin:0 0 20px 20px;}#project-overview .image-attach-teaser img{border:1px solid #9D9D93;display:block;}#project-overview ul.project-meta li{color:#666;font-size:0.92307em;margin-bottom:0;}#project-overview .links{font-size:1em;}#content #project-overview .project ul,#content #project-overview .project ol{overflow:auto;}#project-solr-browse-projects-form{background-color:#F6F6F2;margin:0 0 20px 0;padding:10px;}#project-solr-browse-projects-form .form-item,#project-solr-browse-projects-form #edit-submit,#project-solr-browse-projects-form #edit-submit-2{float:none;}#project-solr-browse-projects-form #edit-submit,#project-solr-browse-projects-form #edit-submit-2{margin-bottom:0;}#project-solr-browse-projects-form .form-item>*{display:inline;}.project-links-section div{margin:1em 0;}#content .project-links-section ul{margin-left:0;padding-left:0;}body .project-issue tr.odd,body .project-issue tr.even{background:none;border:none;}table{border-collapse:separate;}.project-issue tr td,.project-issue tr td.active{background-color:#F9F9F9;border-bottom:1px solid #D8D8D2;border-top:2px solid #CCC;}.project-issue tr td.active{background-color:#FFF;border-top:2px solid #939393;}.project-issue tr.state-1 td{background-color:#F9F9F9;border-top:2px solid #ccc;}.project-issue tr.state-1 td.active{background-color:#FFF;border-top:2px solid #939393;}.project-issue tr.state-2 td{background-color:#D7FFD8;border-top:2px solid #A8FF98;}.project-issue tr.state-2 td.active{background-color:#EDFFEC;border-top:2px solid #96bc44;}.project-issue tr.state-3 td,.project-issue tr.state-4 td,.project-issue tr.state-5 td,.project-issue tr.state-6 td,.project-issue tr.state-16 td{background-color:#EFF1FE;border-top:2px solid #B5C4FE;}.project-issue tr.state-3 td.active,.project-issue tr.state-4 td.active,.project-issue tr.state-5 td.active,.project-issue tr.state-6 td.active,.project-issue tr.state-16 td.active{background-color:#F2F4FE;border-top:2px solid #4988FE;}.project-issue tr.state-7 td,.project-issue tr.state-18 td{background-color:#FDDDDD;border-top:2px solid #FC8596;}.project-issue tr.state-7 td.active,.project-issue tr.state-18 td.active{background-color:#FDEBED;border-top:2px solid #FC2843;}.project-issue tr.state-8 td{background-color:#FFFFDD;border-top:2px solid #FFCF73;}.project-issue tr.state-8 td.active{background-color:#FEFFEC;border-top:2px solid #FFB404;}.project-issue tr.state-13 td{background-color:#FFECE8;border-top:2px solid #FFDCCD;}.project-issue tr.state-13 td.active{background-color:#FFF6F6;border-top:2px solid #FFBCA4;}.project-issue tr.state-14 td,.project-issue tr.state-15 td{background-color:#F1FFE8;border-top:2px solid #BCFFB3;}.project-issue tr.state-14 td.active,.project-issue tr.state-15 td.active{background-color:#F8FFF1;border-top:2px solid #93FF88;}#block-project_issue-issue_cockpit .block-inner,#block-cvs-cvs_project_maintainers .block-inner{margin:0;}#block-project_issue-issue_cockpit .block-content,#homebox-block-project_issue_issue_cockpit .portlet-content{color:#888;}form#project-issue-issue-cockpit-searchbox,.issue-cockpit-categories,.issue-cockpit-subscribe,.issue-cockpit-statistics,.issue-cockpit-oldest{color:#222;}form#project-issue-issue-cockpit-searchbox{margin-bottom:0.5em;margin-top:0.5em;}form#project-issue-issue-cockpit-searchbox .form-item{float:left;margin:0 10px 0.5em 0;}form#project-issue-issue-cockpit-searchbox a{clear:left;display:block;}#block-project_issue-issue_cockpit .category-header,#homebox-block-project_issue_issue_cockpit .category-header{color:#555;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.2307em;font-weight:normal;margin-top:0.5em;}.issue-cockpit-bug,.issue-cockpit-statistics{margin-bottom:0.5em;}.issue-cockpit-oldest{color:#888;}.view-project-issue-user-issues div.project-title{font-weight:bold;}#homebox #homebox-block-views_a512ec6dea837b33a2b010c2af17ed85 .portlet-content{padding:0;}#homebox .homebox-portlet .view-project-issue-user-issues .more-link{padding:0px 10px 10px 0px;}#homebox #homebox-block-views_a512ec6dea837b33a2b010c2af17ed85 th{display:none;}#homebox #homebox-block-views_a512ec6dea837b33a2b010c2af17ed85 td{padding:0.25em 10px;}.project-info .count{font-weight:bold;}#homebox .homebox-column{background:none;margin:0;padding:0;}#homebox .homebox-portlet{border:0;margin:0 0 20px;}#homebox .homebox-placeholder{margin:0 0 14px;}#homebox .homebox-portlet .homebox-portlet-inner{background-color:#F6F6F2;border:0;}#homebox .portlet-config{padding:0 10px 10px;}#homebox .portlet-content{padding:10px;}#homebox .homebox-portlet .portlet-header{background:none;font-size:1.38461em;padding:10px 10px 8px;}#homebox .homebox-portlet .portlet-minus,#homebox .homebox-portlet .portlet-maximize{display:none;}#homebox .homebox-portlet .portlet-icon{margin-top:4px;margin-left:4px;}#homebox-buttons,#homebox-add{margin-bottom:10px;}#homebox-add a.restore{display:inline;height:auto;padding:0;width:auto;}#drupalorg-set-home a,html.js #drupalorg-set-home input{display:none;}html.js #drupalorg-set-home a{display:inline;}#drupalorg-set-home .ahah-progress{float:right;}#drupalorg-search-help-form{background-color:#F6F5F1;margin-bottom:20px;padding:20px 20px 15px 20px;}#drupalorg-search-help-form label{font-size:1.61538em;font-weight:normal;margin:0 0 1em 0;}#drupalorg-search-help-form .form-text{background:#FFFFFF url(/sites/all/themes/bluecheese/images/throbber-large.gif) 231px 8px no-repeat;border:2px solid #c8c9c4;color:#858585;font-size:1.61538em;height:35px;margin:0 0 5px 0;padding:0 30px 0 5px;width:221px;}#drupalorg-search-help-form .form-text.throbbing{background:#FFFFFF url(/sites/all/themes/bluecheese/images/throbber-large.gif) 231px -92px no-repeat;}#edit-search-term-results p.help-result-text{font-weight:bold;margin-left:10px;}#edit-search-term-results ul{list-style-type:none;margin:0 0 5px 0;padding:0;}#edit-search-term-results ul a{font-weight:bold;}#edit-search-term-results li .help-result-value{border-top:1px solid #E1E1DB;line-height:2em;list-style-type:none;margin:0;padding:0 0 0 10px;}#recent-activity ul{margin-left:0;padding-left:0;}#page .block-google_admanager{background-color:#f6f6f2;line-height:inherit;}.gam-holder{margin:0 0 1em;}.gam-prefix,.gam-suffix{padding:12px;}.gam-suffix{color:#666;font-size:0.92307em;}.gam-suffix a{color:#000;}.gam-holder .text{background-color:#f6f6f2;width:274px;line-height:1.5em;padding:13px;}.gam-holder .text a{font-weight:bold;}#column-right .block-google_admanager{margin:12px 0 12px 0;}#column-right .block-google_admanager .block-inner{padding:0;}.front-current-activity{float:left;margin-bottom:1.385em;}.front-current-activity:first-child{margin-right:1.5em;}.front-current-activity td{padding:0;white-space:nowrap;}.front-current-activity td:first-child{text-align:right;padding-right:0.4em;}.front-current-activity th{background:transparent;font-weight:normal;border-bottom:none;padding:0;}body.front .gam-holder{margin:1.385em 0 0 0;}#block-google_admanager-89caa04f148acdc52719b3d001e487c4 .gam-prefix h3{margin-top:0;}#block-google_admanager-89caa04f148acdc52719b3d001e487c4 .gam-prefix p{margin-bottom:0;}#google_ads_div_Security_books img,#google_ads_div_Redesign_books img{padding:0 12px;}.view-drupalorg-community-spotlight.view-display-id-block_1 .node-footer .links{display:block;}.view-drupalorg-community-spotlight.view-display-id-block_1 .node-footer .separator{display:none;}#block-drupalorg_search-drupalorg_search_users form,#block-drupalorg_search-drupalorg_search_users .form-item{margin:0;}#block-drupalorg_search-drupalorg_search_users .form-text{width:150px;}.drupalorg-front #header-screen{background:url(/sites/all/themes/bluecheese/images/fireworks.png) 5% 0 no-repeat;}.link-button span.celebrating{display:inline-block;margin-left:-1em;padding:0 0 0 1em;background:url(/sites/all/themes/bluecheese/images/fireworks-link-button.png) 0 0 no-repeat;}
-
-
-
-div.block-region{background:none;border:2px dashed #53B0EB;color:#53B0EB;font-size:1.0769em;margin:10px 0;padding:10px;}.views-tabs .ui-tabs-nav li,.views-tabs .ui-tabs-nav a{float:none;}#content .views-tabs ul.ui-tabs-nav{padding-left:0;}
-
-
-
-#content .node-footer a.comment_comments,#content .node-footer a.comment_add,html.js #search-theme-form-advanced fieldset.collapsible legend a,div.nav-content-dashboard ul li.active span.hover a.edit span,div.nav-content-dashboard ul li.active span.hover a.delete,#page-tools a.add,#dashboard a.remove-widget,.meta .alert,.project-info .alert,.rss-feed-link,.search-results .search-info .comments,.portlet-header .portlet-settings,.portlet-plus,.portlet-minus,.portlet-close,.portlet-maximize,.portlet-maximized .portlet-minimize{background-image:url(/sites/all/themes/bluecheese/images/small-icons.png);background-repeat:no-repeat;}#content .node-footer a.comment_comments,#content .node-footer a.comment_add{background-position:0 -415px;padding-left:15px;}html.js #search-theme-form-advanced fieldset.collapsible legend a{background-position:100% -473px;}div.nav-content-dashboard ul li.active span.hover a.edit span{background-position:8px -61px;padding-left:20px;}div.nav-content-dashboard ul li.active span.hover a.delete{background-position:8px -125px;height:12px;padding-left:20px;}#dashboard a.remove-widget{background-position:0 -128px;height:12px;padding-left:12px;}#page-tools a.add{background-position:right -188px;padding-right:18px;}.meta .alert{background-position:0 -225px;padding-left:14px;}.project-info .alert{background-position:0 -223px;padding-left:16px;}.rss-feed-link{background-position:0 -30px;padding-left:20px;}.search-results .search-info .comments{background-position:0 -415px;padding-left:14px;}.portlet-header .portlet-settings{background-position:2px -64px;}.portlet-plus{background-position:2px -192px;}.portlet-close{background-position:2px -128px;}.page-search #column-right .item-list ul li,#block-drupalorg_news-news-terms ul.links li{line-height:1.5em;}.page-search #column-right .item-list ul li a.selected,.page-search #column-right .item-list ul li a:hover,#block-drupalorg_news-news-terms ul.links li a.active,#block-drupalorg_news-news-terms ul.links li a:hover,#block-drupalorg_news-news-terms ul.links li a:focus{background-image:url(/sites/all/themes/bluecheese/images/pointer.png);background-repeat:no-repeat;background-position:0 center;}#edit-search-theme-form-1,#aboutwebbased a,#aboutcontentmanagement a,#aboutmodules a,#aboutthemes a,#aboutsearching a,#aboutsocial a,#aboutcommunity a,#aboutpersonalisation a{background:#fff url(/sites/all/themes/bluecheese/images/large-icons.png) no-repeat;}#edit-search-theme-form-1{background-position:8px -856px;}#aboutwebbased a{background-position:4px 0;}#aboutcontentmanagement a{background-position:4px -96px;}#aboutmodules a{background-position:4px -192px;}#aboutthemes a{background-position:4px -288px;}#aboutsearching a{background-position:4px -384px;}#aboutsocial a{background-position:4px -480px;}#aboutcommunity a{background-position:4px -576px;}#aboutpersonalisation a{background-position:4px -1056px;}#header{background-image:url(/sites/all/themes/bluecheese/images/sprites-horizontal.png);background-repeat:repeat-x;}#header{background-position:0 -1088px;}body.drupalorg-front #header{background-position:0 0;}#site-name a,#nav-content li.active,#nav-content li.active a.active,#nav-content li.active-parent,#nav-content li.active-parent a,#nav-masthead li,#nav-masthead li a,.ui-tabs-nav li.ui-tabs-selected,.ui-tabs-nav li.ui-tabs-selected a,.ui-tabs-nav .icon,a.link-button,a.link-button span,#front-middle-inner .block-content,.homepage-pin,.image-tags span,.image-tags span a{background-image:url(/sites/all/themes/bluecheese/images/sprites.png);background-repeat:no-repeat;}#site-name a{background-position:0 -467px;}.homepage-pin-doc{background-position:-22px -753px;}.ui-tabs-docs-updates .icon{background-position:-22px -750px;}.homepage-pin-forum{background-position:-11px -753px;}.ui-tabs-forum-posts .icon{background-position:-11px -750px;}.homepage-pin-commit{background-position:0 -753px;}.ui-tabs-commits .icon{background-position:0 -750px;}#nav-content li.active,#nav-content li.active-parent,.ui-tabs-nav li.ui-tabs-selected{background-position:0 -1300px;}#nav-content li.active a.active,#nav-content li.active-parent a,.ui-tabs-nav li.ui-tabs-selected a{background-position:100% -1200px;}#nav-masthead li a{background-position:100% -800px;}#nav-masthead li{background-position:0 -900px;}#nav-masthead li.active a,#nav-masthead li:hover a{background-position:100% -1000px;}#nav-masthead li.active,#nav-masthead li:hover{background-position:0 -1100px;}a.link-button{background-position:0 -48px;}a.link-button span{background-position:100% 0;}#front-middle-inner .block-content{background-position:0 -537px;}.image-tags span{background-position:0 -224px;}.image-tags a{background-position:100% -192px;}.feature-tags span{background-position:0 -288px;}.feature-tags a{background-position:100% -256px;}.sticky .image-tags span{background-position:0 -352px;}.sticky .image-tags a{background-position:100% -320px;}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/form-field-tooltip.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/form-field-tooltip.css
deleted file mode 100644
index 24b40da9..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/form-field-tooltip.css
+++ /dev/null
@@ -1,12 +0,0 @@
-#DHTMLgoodies_formTooltipDiv{
- color:#000000;
- font-family:arial;
- font-weight:bold;
- font-size:0.8em;
- line-height:120%;
-}
-.DHTMLgoodies_formTooltip_closeMessage{
- color:#000000;
- font-weight:normal;
- font-size:0.7em;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/mobile_raptor.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/mobile_raptor.css
deleted file mode 100644
index b47fc431..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/mobile_raptor.css
+++ /dev/null
@@ -1,73 +0,0 @@
-#reportContainer {text-align:center;margin-bottom:5px;}
-
-#chartContainer {-webkit-border-radius:5px;margin-bottom:5px;}
-
-#reportTitleContainer {
- background-color: rgb(57,91,162);
- padding:8px 5px 0px 10px;
- font-family:Helvetica;
- color:#fff;
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
-}
-
-#reportTitle,#eventTitle{
- font-size:15px;
- font-weight:bold;
- text-align:left;
-}
-
-#reportSubTitleContainer{
- font-family:Helvetica;
- font-weight:bold;
- color:rgb(255,255,102);
- padding:2px 10px 3px 10px;
- background-color: rgb(57,91,162);
-}
-
-#reportFooter{
- background-color: rgb(57,91,162);
- -webkit-border-bottom-left-radius: 5px;
- -webkit-border-bottom-right-radius: 5px;
-}
-
-.reportHeadRow {
- background-color: rgb(57,91,162);
- border-top:1px solid rgb(148,175,222);
- border-bottom:1px solid rgb(148,175,222);
-}
-
-.reportHeadCell {
- font-family:Helvetica;
- font-weight:bold;
- font-size:12px;
- height:20px;
-}
-
-.rcolheader{
- font-family:Helvetica;
- font-size:13px;
- color:#fff;
-}
-
-.reportRow {
- border-top: 1px solid solid rgb(109,132,162);
- background-color: rgb(112,137,193);
-}
-
-.reportAltRow {
- border-top: 1px solid solid rgb(109,132,162);
- background-color: rgb(57,91,162);
-}
-
-.reportCell {
- padding-left:3px;
- padding-right:3px;
- padding-top:10px;
- padding-bottom:10px;
- font-family:Helvetica;
- font-size:13px;
- color:#fff;
-}
-
-.reportCellLink {font-family:Helvetica;font-size:13px;color:#fff;word-break:break-all} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/novamap.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/novamap.css
deleted file mode 100644
index 7bbf4bf5..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/novamap.css
+++ /dev/null
@@ -1,25 +0,0 @@
-@CHARSET "ISO-8859-1";
-
-.buttondefault {
- background: lightgrey;
- border-left: 2px lightgrey solid;
- border-top: 2px lightgrey solid;
- border-right: 2px gray solid;
- border-bottom: 2px gray solid;
-}
-
-.buttonover {
- cursor: hand;
- background: #F0F8FF;
-}
-
-.buttonout {
- background: lightgrey;
-}
-
-.buttonclick {
- border-left: 2px gray solid;
- border-top: 2px gray solid;
- border-right: 2px white solid;
- border-bottom: 2px white solid;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/picker.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/picker.css
deleted file mode 100644
index bbc439ec..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/picker.css
+++ /dev/null
@@ -1,40 +0,0 @@
-.picker_layer {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- text-decoration: none;
- background-color: #d4d0c8;
- border-width: 1px;
- border-style: solid;
- border-color: #666666;
- overflow: visible;
- height: auto;
- width: auto;
-}
-.picker_buttons {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- background-color:#d4d0c8;
- border-style:solid;
- border-color:#666666;
- border-width:1px;
- padding:1px;
- cursor:pointer;
- color:#000000;
-}
-.cell_color {
- cursor:pointer;
- width:9px;
- height:9px;
-}
-.color_table {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- text-decoration: none;
-}
-.choosed_color_cell{
- border-style:solid; border-color:#000000; border-width:1px;
-}
-.default_color_btn{
- width:17px; height:17px; background-image:url(defaultcolor.jpg);
- background-repeat:no-repeat; background-position:center;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/ral.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/ral.css
deleted file mode 100644
index 65fb6fd2..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/ral.css
+++ /dev/null
@@ -1,1437 +0,0 @@
-/*
-Reusable Asset Library - CSS Positioning Version (v3.2)
-Release Date: 1/26/07
-Core Styles
-*/
-
-/*------------------------General-----------------------------------*/
-body{
-background:#FFF;
-font-family:Arial,Verdana,Geneva,Helvetica,sans-serif;
-font-size:.71em;
-padding:0;
-margin:0px;
-margin-right:1px;
-border:0;
-}
-.nested{
-border:0;
-padding:0;
-margin:0;
-}
-.btm{
-vertical-align:bottom !important;
-}
-.nowrap{
-white-space:nowrap;
-}
-.top, .top td{
-vertical-align:top !important;
-}
-table{ /*IE5.5 hack*/
-font-size:100%;
-}
-td,tr,th{ /*IE5.5 hack*/
-font-size:inherit;
-}
-.hide{
-display:none !important;
-}
-.mid {
-vertical-align:middle !important;
-}
-.value {
-text-align:right;
-}
-.show{
-display:block !important;
-}
-ul{
-padding:0;
-margin:0;
-border:0;
-}
-.indent{
-margin-left:10px !important;
-}
-.code{
-font-family: Courier,serif;
-}
-p{
-padding:5px 0;
-margin:0;
-border:0;
-}
-h1{
-font-size:150%;
-margin:2px 0px;
-display:block;
-position:relative;
-clear:both;
-}
-h2{
-font-size:130%;
-margin:2px 0px;
-clear:both;
-position:relative;
-display:block;
-}
-h2.blue{
-position:relative;
-top:0;
-left:0;
-font-size:100%;
-background:#369;
-color:#FFF;
-margin:0;
-margin-top:10px;
-padding:2px 5px 2px 8px;
-height:14px;
-width:auto;
-vertical-align:middle;
-}
-h3{
-font-size:120%;
-clear:both;
-margin:2px 0px;
-position:relative;
-display:block;
-}
-h4 {
-font-size:100%;
-clear:both;
-margin:2px 0px;
-position:relative;
-display:block;
-}
-
-/*----------------------Horizontal Rules----------------------------*/
-.hrule-blue {
-height:1px;
-border-top:1px #369 solid;
-margin-top:6px;
-margin-bottom:2px;
-line-height:0px;
-padding:0;
-clear:both;
-}
-hr{
-border:0;
-height:1px;
-margin:10px 0;
-background:#CCC;
-width:100%;
-clear:both;
-}
-
-/*--------------Primay Window Banner--------------------------------*/
-#tBAN{
-padding:0;
-border:0;
-margin:0;
-position:relative;
-background:no-repeat url(../images/swoosh.gif) 100% 0;
-min-width:800px;
-display:table; /*For vertical centering in standards complaint browsers*/
-height:69px;
-overflow-x:hidden; /*Remove horizonal scroll in IE*/
-}
-#banner-spacer{
-display:block;
-width:650px;
-height:1px;
-position:relative;
-top:-1px;
-}
-#tBAN #logo{
-border:0;
-padding:0;
-margin:0;
-top:10px;
-position:absolute;
-}
-#tBAN #company {
-color:#FFF;
-font-weight:bold;
-font-size:10pt;
-padding-right:10px;
-_position:absolute; /*IE Hack for vertical centering*/
-_top:48%; /*IE Hack for vertical centering*/
-display:table-cell; /*For standards complaint browsers*/
-vertical-align:middle; /*For standards complaint browsers*/
-text-align:right;
-width:99%;
-}
-#tBAN #txt{
-_position:relative; /*IE Hack for vertical centering*/
-_top:-48%; /*IE Hack for vertical centering*/
-width:205px;
-float:right;
-overflow:hidden;
-}
-#appName{
-position:absolute;
-left:112px;
-top:45px;
-color:#09C;
-font-size:11pt;
-font-weight:bold;
-white-space:nowrap;
-}
-
-/*---------------------Secondary Window Banner----------------------*/
-#tSWB{
-background:#FFF;
-height:69px;
-border-bottom:2px #369 solid;
-}
-#tSWB #appName{
-top:35px;
-}
-
-
-/*--------------------Secondary Windows (General)-------------------*/
-.pHW{
-background:#FFC;
-}
-.pSW{
-background:#FFF;
-}
-.pSW .tPH,.pHW .tPH{
-margin:0;
-}
-/*--------------------mIC: Introductory Copy------------------------*/
-p.mIC{
-padding:0;
-margin:0;
-}
-
-/*-----------------------mQH: Quick Help----------------------------*/
-.qh-link{
-float:right;
-width:12px;
-height:14px;
-background:url(../images/quickhelp_lt.gif) no-repeat 0 50%;
-cursor:pointer;
-position:relative;
-vertical-align:middle;
-}
-.qh-link-field{
-width:12px;
-height:12px;
-background:url(../images/quickhelp_lt.gif) no-repeat 0px 0px;
-cursor:pointer;
-position:relative;
-top:0px;
-}
-.qh-element{
-margin-left:5px;
-vertical-align:middle;
-}
-.icon-quick-help{
-display:inline;
-}
-.mQH {
-clear:both !important;
-display:none;
-background:#9CF !important;
-margin:0 !important;
-border:0 !important;
-height:auto !important;
-padding:4px 8px !important;
-position:relative !important;
-z-index:0;
-}
-.mQH .label{
-font-weight:bold;
-padding-right:5px;
-}
-
-/*----------------------bPF: Footer---------------------------------*/
-#bPF{
-position:relative;
-bottom:0px;
-display:block;
-/*float:none;*/
-height:60px;
-clear:both;
-padding:25px 0 20px 10px;
-line-height:100%;
-color:#333;
-white-space:nowrap;
-}
-#bPF ul{
-position:relative;
-top:0px;
-left:0px;
-margin:0 !important;
-padding:0 !important;
-margin-left:0px !important;
-}
-#bPF li{
-display:inline;
-}
-#bPF .pipe{
-padding-right:5px;
-padding-left:5px;
-}
-
-/*---------------------------LAYOUT---------------------------------*/
-#grid{
-display:block;
-clear:both !important;
-height:50%;
-width:auto;
-position:relative;
-width:95%;
-min-width:800px;
-margin-left:10px;
-z-index:10;
-}
-.grid-secondary{
-margin-top:10px;
-margin-left:10px;
-width:95%;
-position:relative;
-}
-
-/* One column-------------------------------------------------------*/
-.one-col .col1 {
-width:95%;
-}
-.one-col .col2 {
-display:none;
-}
-.one-col .col3 {
-display:none;
-}
-
-/* Two column, wide left:------------------------------------------*/
-.two-col-wl .col1 {
-width:75%;
-float:left;
-}
-.two-col-wl .col2 {
-width:15%;
-float:left;
-margin-left:10px;
-}
-.two-col-wl .col3 {
-display:none;
-}
-
-/* Two column, wide right:------------------------------------------*/
-.two-col-wr .col1 {
-width:15%;
-float:left;
-}
-.two-col-wr .col2 {
-width:75%;
-float:left;
-margin-left:10px;
-}
-.two-col-wr .col3 {
-display:none;
-}
-
-/* Three column-----------------------------------------------------*/
-.three-col .col1 {
-width:15%;
-float:left;
-min-width:140px;
-}
-.three-col .col2 {
-width:60%;
-float:left;
-margin-left:10px;
-}
-.three-col .col3 {
-width:15%;
-float:left;
-margin-left:10px;
-min-width:140px;
-}
-
-
-/*---------------------------Forms----------------------------------*/
-.first-row td{
-padding-top:5px !important;
-}
-.last-row td{
-padding-bottom:5px !important;
-}
-.checkbox{
-height:13px;
-width:13px;
-vertical-align:middle;
-padding:0;
-margin:0;
-margin-right:10px;
-text-align:center !important;
-}
-.col-ast{
-width:10px !important;
-}
-.col-ast div,.col-ast img{
-width:9px;
-height:14px;
-}
-.form-grid td {
-padding:5px 0;
-vertical-align:middle;
-}
-.form-grid label.twoline,
-label.br {
-display:block;
-}
-
-
-.inline{ /*When multiple text input fields */
-margin-right:10px !important; /*are adjacent, space them out!!*/
-}
-label{
-white-space:nowrap;
-margin-right:15px;
-vertical-align:middle;
-}
-.noborder{
-border:0 !important;
-}
-.rcb-spacer,.rcb-spacer img{
-width:20px;
-}
-p .ast{
-position:relative;
-left:0px;
-padding-right:3px;
-}
-.spacer-left {
-padding:0 !important;
-margin:0 !important;
-width:5px;
-}
-.spacer-left img{
-margin:0;
-padding:0;
-border:0;
-width:5px;
-height:1px;
-}
-label span.br{
-display:block;
-padding-left:5px;
-}
-label.text{
-vertical-align:top !important;
-}
-label.spacer{
-color:white;
-}
-form {
-margin:0;
-padding:0;
-border:0;
-}
-.form-buttons{
-margin:10px 0;
-white-space:nowrap;
-margin-left:0px;
-}
-.top-border{
-border-top:1px #666 solid;
-padding-top:10px;
-margin-top:15px;
-}
-.form-buttons td {
-vertical-align:middle;
-padding:5px 0;
-}
-fieldset{
-border:0;
-border-bottom:1px #000 solid;
-padding:5px;
-}
-fieldset td{
-padding:3px 0;
-}
-fieldset .btm-row td{
-border-top:1px #CCC solid !important;
-}
-fieldset legend{
-color:#000;
-font-weight:bold;
-padding-bottom:5px;
-margin-top:5px;
-margin-left:-6px;
-}
-input.button{
-padding:1px 4px;
-font-size:85%;
-margin:0;
-background:#ccc;
-}
-input.arrow-up{
-background:#CCC url(../images/button_arrow_up.gif) no-repeat 90% 50%;
-padding-right:20px;
-font-size:11px;
-}
-input.arrow-down{
-background:#CCC url(../images/button_arrow_down.gif) no-repeat 90% 50%;
-padding-right:20px;
-font-size:11px;
-}
-input.button-blue{
-padding:1px 4px;
-font-size:85%;
-margin:0;
-color:#FFF;
-background:#369;
-}
-input.button-sm{
-padding:1px;
-font-size:78%;
-margin:0;
-}
-textarea{
-font-size:100%;
-font-family:sans-serif;
-}
-td.spacer{
-height:1px;
-padding:0;
-}
-.disabled {
-color:#CCC !important;
-}
-.abled {
-color:#000 !important;
-}
-input.text, input.password{
-font-size:100%;
-vertical-align:middle;
-}
-input.text:focus,textarea:focus{
-background:#FFC;
-}
-.radio{
-padding:0;
-margin:0;
-border:0;
-height:12px;
-width:12px;
-vertical-align:middle;
-margin-right:8px !important;
-text-align:center !important;
-}
-.rcb {
-line-height:120%;
-}
-select {
-font-size:85%;
-}
-.tip{
-font-size:80%;
-padding-left:5px;
-display:inline;
-position:relative;
-}
-td.tier2 label{
-padding-left:22px !important;
-}
-td.tier2 .checkbox{
-margin-left:-1px;
-}
-.col-radio{
-text-align:center;
-}
-/*---------------------------Help-----------------------------------*/
-.app-help{
-margin-right:auto;
-margin-left:auto;
-}
-.nobullet li{
-list-style:none;
-}
-.plain{
-position:relative;
-top:0px;
-left:0px;
-margin:0 !important;
-padding:0 !important;
-margin-left:1px !important;
-}
-.plain .list-label{
-padding-right:10px;
-}
-.plain li{
-list-style:none;
-}
-.index{
-clear:both;
-padding:0;
-margin:0;
-border:0;
-}
-.index ul{
-padding:0px;
-margin:0px;
-border:0px;
-height:15px;
-}
-.index ul li{
-float:left;
-padding:4px;
-list-style:none;
-}
-.index a{
-text-decoration:none !important;
-}
-.index a:hover{
-text-decoration:underline !important;
-}
-
-/*--------------------------Glossary--------------------------------*/
-.glossary-index{
-height:12px;
-display:block;
-margin:0;
-padding:0;
-border:0;
-padding-top:5px;
-padding-bottom:5px;
-margin-right:auto;
-margin-left:auto;
-text-transform:uppercase;
-}
-.glossary-index li{
-list-style:none;
-display:inline;
-padding-right:2px;
-padding-left:2px;
-font-weight:bold;
-}
-.glossary-index a{
-padding-left:2px;
-padding-right:2px;
-}
-.glossary-index a:hover{
-background:#CCC;
-}
-dl{
-margin:0;
-}
-dt{
-font-weight:bold;
-}
-dd {
-margin-left:20px;
-}
-.marker {
-font-weight:bold;
-color:#369;
-width:100%;
-text-transform:uppercase;
-}
-.section{
-border-bottom:1px #999 solid;
-}
-p.link{
-width:100%;
-text-align:center;
-margin-top:0px;
-padding:0;
-padding-bottom:5px;
-}
-.blocks {
-padding:0;
-margin:0;
-border:0;
-}
-.blocks li{
-list-style:none;
-float:left;
-padding:10px;
-}
-.last{
-border-right:0 !important;
-}
-table {
-clear:both;
-}
-.noline td {
-border-bottom:0 !important;
-}
-.scroll{
-overflow:auto;
-}
-.ital{
-font-style:oblique;
-}
-.em{
-font-weight:bold !important;
-}
-.left{
-float:left;
-}
-.right{
-float:right;
-}
-
-/*--------------------mTIE: Table of Interactive Elements-----------*/
-th{
-font-weight:bold !important;
-}
-th a{
-font-weight:bold !important;
-}
-.mTIE {
-margin:10px 0;
-border:0;
-padding:0;
-border-left:1px #CCC solid;
-border-top:1px #CCC solid;
-width:100%;
-}
-.date, .date-ss, .time {
-text-align:right;
-white-space:nowrap;
-
-}
-.mTIE td{
-margin:0;
-border:0;
-border-bottom:1px #CCC solid;
-border-right:1px #CCC solid;
-padding:4px 6px;
-vertical-align:middle;
-}
-.mTIE .headerRow td {
-text-align:center;
-}
-.mTIE th {
-margin:0;
-border:0;
-border-bottom:1px #CCC solid;
-border-right:1px #CCC solid;
-padding:3px 6px;
-}
-.mTIE a {
-text-decoration:underline;
-}
-.headerRow{
-background:#369 !important;
-color:#FFF;
-font-weight:bold;
-}
-.button-mTIE{ /*Check All-Clear All button*/
-padding:1px 4px;
-background:#CCC;
-font-size:85%;
-margin:0;
-width:75px;
-}
-.decimal{
-text-align:right;
-}
-#totalRow {
-background:#FFF !important;
-}
-#totalRow .decTotal {
-text-align:right;
-}
-#totalRow .total{
-text-align:right;
-}
-
-/*------------------------mTAB--------------------------------------*/
-.mTAB {
-margin:0px 0;
-border:0;
-padding:0;
-border-left:1px #CCC solid;
-border-top:1px #CCC solid;
-/*width:100%;*/
-}
-.mTAB .date{
-text-align:right;
-white-space:nowrap;
-}
-.mTAB td{
-margin:0;
-border:0;
-border-bottom:1px #CCC solid;
-border-right:1px #CCC solid;
-padding:4px 6px;
-vertical-align:middle;
-}
-.mTAB .headerRow td {
-text-align:center;
-}
-.mTAB th {
-margin:0;
-border:0;
-border-bottom:1px #CCC solid;
-border-right:1px #CCC solid;
-padding:4px 6px;
-}
-/*.mTAB a {
-text-decoration:underline;
-}*/
-.headerRow{
-background:#369 !important;
-color:#FFF;
-font-weight:bold;
-}
-.button-mTAB{ /*Check All-Clear All button*/
-font-size:10px;
-padding:1px 4px;
-height:20px;
-line-height:12px;
-width:75px;
-}
-
-/* LISTS and mTS */
-/*----------------------mIM: Inline Messages------------------------*/
-.mIM{
-background:#9CF;
-margin:5px 0;
-padding:5px;
-background-position:9px 5px !important;
-clear:both;
-display:block;
-}
-.mIM p,.mIM ul,.mIM ol{
-position:relative;
-top:0;
-left:0;
-padding:0;
-margin:0;
-padding-left:48px;
-padding-bottom:5px;
-border:0;
-display:block;
-}
-.mIM ul{
-padding-left:65px;
-width:80%;
-}
-.mIM ol{
-padding-left:70px;
-width:80%;
-}
-* html .mIM { /*IE Hack*/
-height:35px; /*set the height in IE5.5*/
-voice-family:"\"}\"";
-voice-family:inherit;
-height:30px; /*set the height in IE6.0*/
-}
-*+.mIM{ /*high end browser hack*/
-min-height:30px;
-}
-div.error {
-background:#9CF url(../images/icon_error.gif) no-repeat;
-}
-.error .txt{
-font-size:100%;
-color:#F00;
-font-weight:bold;
-text-align:right;
-padding-right:10px;
-padding-left:44px;
-width:35px;
-}
-.error table{
-position:relative;
-}
-.error table td{
-vertical-align:top;
-}
-.error .list-errors {
-padding:0;
-display:block;
-clear:both;
-left:-1px;
-position:relative;
-}
-.error .list-errors li {
-list-style:none;
-background:url(../images/dash.gif) no-repeat 0 50%;
-padding-left:12px;
-}
-.error p,
-.error ul{
-padding-left:0;
-}
-.error p{
-padding-top:0;
-margin-top:0;
-}
-.info {
-background:#9CF url(../images/icon_info.gif) no-repeat;
-}
-.confirmation {
-background:#9CF url(../images/icon_confirmation.gif) no-repeat;
-}
-.alert {
-background:#9CF url(../images/icon_alert.gif) no-repeat;
-}
-.help {
-background:#9CF url(../images/icon_help.gif) no-repeat;
-}
-
-/*---------------------mRT: Return to Top---------------------------*/
-.mRT {
-margin:10px 0;
-clear:both;
-display:block;
-}
-.mRT a {
-background:url(../images/return_to_top.gif) no-repeat 0 2px;
-padding-left:15px;
-}
-/*---------------------mPW:Please Wait------------------------------*/
-.mPW {
-border-top:1px #666 solid;
-border-bottom:1px #666 solid;
-background:#FFF;
-padding:10px;
-text-align:center;
-height:auto;
-width:auto;
-clear:both;
-display:block;
-margin:10px 0px;
-}
-.icon-wait {
-background:url(../images/please_wait.gif) no-repeat 50% 100%;
-width:100px;
-height:20px;
-margin-left:auto;
-margin-right:auto;
-clear:both;
-display:block;
-}
-
-/*---------------------mDL: Data List-------------------------------*/
-.mDL{
-width:100%;
-margin:10px 0;
-}
-.mDL td{
-padding:4px 0px 4px 10px;
-}
-.mDL th{
-background:#369;
-color:#FFF;
-text-align:left;
-padding:2px 5px;
-}
-.mDL .label{
-text-align:right;
-}
-.mDL .total{ /*are these being duplicated?*/
-text-align:right;
-font-weight:bold;
-padding-right:10px;
-}
-.mDL .decimal{
-text-align:right;
-padding-right:10px;
-}
-
-/*------------------mDDL: Double Data List--------------------------*/
-.mDDL .plain{
-margin-bottom:10px !important;
-}
-.mDDL{
-width:100%;
-margin:10px 0;
-}
-.mDDL td{
-padding:4px 0px 4px 10px;
-}
-.mDDL th{
-background:#369;
-color:#FFF;
-text-align:left;
-padding:2px 5px;
-}
-.mDDL .label{
-text-align:right;
-}
-.mDDL .total{
-text-align:right;
-font-weight:bold;
-padding-right:10px;
-}
-.mDDL .decimal{
-text-align:right;
-padding-right:10px;
-}
-
-/*------------------------mCA: Contact -------------------------*/
-.mCA{
-position:relative;
-width:50%;
-height:auto;
-margin:10px 0;
-}
-.mCA .number {
-position:relative;
-}
-.mCA .mail{
-font-weight:bold;
-position:relative;
-background:inherit;
-}
-.mCA address{
-margin-left:150px;
-font-weight:normal;
-font-style:normal;
-}
-
-
-/*----------mDSR:Data Summary/Review Verification-------------------*/
-.mDSR {
-border-bottom:1px #000 solid;
-width:100%;
-margin:10px 0;
-}
-.mDSR th {
-text-align:left;
-padding:4px 6px;
-}
-.mDSR td {
-text-align:left;
-padding:4px 4px;
-vertical-align:top;
-}
-th a{
-font-weight:normal;
-margin-left:5px;
-}
-
-/*---------------------mLL: Link Listing----------------------------*/
-.mLL {
-margin:10px 0;
-width:100%;
-display:block;
-height:auto;
-position:relative;
-clear:both;
-float:none;
-}
-.mLL ul{
-margin:0;
-padding:10px 0px;
-width:45%;
-position:relative;
-}
-.mLL ul li{
-list-style:none;
-border:0;
-margin:0;
-padding-bottom:2px;
-}
-
-
-/*-----------------mPN: Pagination/Navigation-----------------------*/
-.mPN{
-position:relative;
-display:block;
-clear:both;
-height:45px;
-margin:10px 0;
-white-space:nowrap;
-}
-.mPN p,
-.mPN label {
-line-height:160% !important;
-padding:0;
-margin:0;
-border:0;
-vertical-align:top;
-}
-.mPN .current{
-font-weight:bold;
-}
-.mPN a{
-font-weight:bold;
-}
-.mPN .left,.mPN .right{
-float:left;
-vertical-align:top;
-height:100%;
-color:#999;
-font-weight:bold;
-}
-.mPN .left{
-padding-right:40px;
-}
-.mPN .right{
-padding-left:45px;
-}
-.mPN .middle{
-float:left;
-text-align:left;
-height:100%;
-padding-top:0px;
-}
-.mPN input.text{
-vertical-align:top;
-}
-
-/*-----------------mSN: Simple Navigation---------------------------*/
-.mSN{
-padding:5px 0 !important;
-margin:0;
-border:0;
-width:90%;
-}
-.mSN *{ /*IE Hack to fix jumping*/
-position:relative;
-top:0;
-left:0;
-}
-.mSN ul{
-clear:both;
-width:80%;
-margin:0 !important;
-left:15px;
-}
-.mSN li {
-list-style:none;
-padding-bottom:3px;
-}
-
-/*----------------------mTC: Task Confirmation----------------------*/
-.mTC{
-border:1px #9CF solid;
-border-top:0;
-margin:10px 0;
-min-width:300px;
-}
-.mTC ul{
-margin-left:65px;
-}
-.mTC p{
-margin-left:60px;
-}
-.mTC table{
-padding:0;
-margin:0;
-border:0;
-margin-left:58px;
-}
-.mTC h2{
-position:relative;
-top:0;
-left:0;
-width:auto;
-background:#9CF url(../images/banner-confirmation.gif) repeat-x 0 0;
-padding:12px 10px 12px 60px;
-font-size:100%;
-font-weight:normal;
-margin-bottom:10px;
-}
-
-/*--------------------mHL: Helpful Links (new)----------------------*/
-.mHL{
-border-top:1px #333 solid;
-border-bottom:1px #333 solid;
-padding:10px 0;
-margin-bottom:10px;
-}
-.mHL h3{
-font-size:100%;
-}
-.mHL ul{
-margin-left:65px;
-}
-
-/*--------------------mTI: Task Instructions------------------------*/
-.mTI{
-display:block;
-clear:both;
-margin:10px 0;
-}
-.mTI ul{
-position:relative;
-display:block;
-left:.1em;
-padding:0;
-border:0;
-}
-/*---------------bSWN: Secondary Window Navigation------------------*/
-.bSWN{
-padding:10px 0;
-border-top:1px #369 solid;
-}
-
-/*----------------mSD: Status Dashboard-----------------------------*/
-.mSD{
-border:1px #369 solid;
-margin:10px 0;
-width:100%;
-}
-.mSD th{
-background:#369;
-color:#FFF;
-text-align:left;
-padding:2px 5px;
-}
-
-/*----------------mSDL: Summary Data Listing-----------------------*/
-.mSDL{
-border:1px #369 solid;
-margin:10px 0;
-min-width:250px;
-width:100%;
-}
-.mSDL td{
-border:0;
-margin:0;
-padding:2px 0 2px 8px;
-vertical-align:middle;
-}
-.mSDL th{
-background:#369;
-color:#FFF;
-text-align:left;
-padding:2px 5px;
-}
-.mSDL .value{
-text-align:right;
-}
-
-/*----------------------mDEE: Data Entry/Edit ----------------------*/
-.mDEE{
-margin:10px 0;
-width:100%;
-}
-table.mDEE{
-border:1px #369 solid;
-}
-.mDEE td{
-border:0;
-margin:0;
-padding:5px 0;
-vertical-align:middle;
-}
-.mDEE th{
-background:#369;
-color:#FFF;
-text-align:left;
-padding:2px 5px;
-}
-.nopad{
-padding:0 !important;
-border:0;
-margin:0;
-width:100%;
-}
-.desc {
-text-align:right;
-}
-
-/*---------------------Supporting Text------------------------------*/
-.mST{
-margin:10px 0;
-display:block;
-clear:both;
-}
-
-/*------------------------tPH: Page header--------------------------*/
-.tPH {
-margin:10px 100px 1px 10px;
-display:block;
-clear:both;
-}
-
-/*----------------Topic index found in pHW2.html--------------------*/
-.topic-index{
-padding:0;
-margin:5px 0;
-width:100%;
-height:14px;
-display:block;
-clear:both;
-position:relative;
-top:0;
-left:0;
-}
-.topic-index li{
-list-style:none;
-float:left;
-margin-right:25px;
-padding:0;
-border:0;
-}
-.topic-index li a{
-padding-left:10px;
-background:url(../images/arrow_down_alt.gif) no-repeat 0 50%;
-}
-.alt li a{
-padding-left:10px;
-background:url(../images/arrow_down_alt2.gif) no-repeat 0 50%;
-}
-
-/*------------------Freezing header mods for NS7------------------- */
-div[class="class_float"] table {
-padding:0;
-margin:0;
-border:1px #CCC solid !important;
-background:#369;
-width:100%;
-}
-div[class="class_float"] th {
-margin:0;
-border-right:0;
-border-bottom:0;
-vertical-align:middle;
-}
-.headerRow nobr{
-border-left:2px #369 solid;
-}
-
-/*------------------mSD:Status Dashboard----------------------------*/
-.data-mSD{
-width:90%;
-margin:0 10px;
-}
-.data-mSD td{
-padding:2px 0 !important;
-margin:0 !important;
-border:0 !important;
-}
-.data-mSD .value{
-text-align:right !important;
-}
-.wrap {
-white-space:normal;
-}
-.input-error{
-color:#F00;
-font-weight:bold;
-}
-
-
-/*-------------------mCC: Convenence Choices------------------------*/
-.mCC{
-margin:10px 0;
-width:100%;
-}
-table.mCC{
-border:1px #369 solid;
-}
-.mCC td{
-border:0;
-margin:0;
-padding:5px 0;
-vertical-align:middle;
-}
-.mCC th{
-background:#369;
-color:#FFF;
-text-align:left;
-padding:2px 5px;
-}
-
-/*-----------------------Layout sample pages------------------------*/
-.layout-template .col1,
-.layout-template .col2,
-.layout-template .col3{
-background:#efefef;
-height:350px;
-border:1px #CCC dotted;
-text-align:center;
-}
-.layout-template #grid{
-padding-top:10px;
-}
-.center{
-text-align:center;
-}
-
-/*----------------------Row Exchange Module-------------------------*/
-div.mREX{
-border:1px #999 solid;
-padding:5px 10px;
-margin-bottom:20px;
-background:#efefef;
-}
-h1.mREX{
-background:#999;
-color:#FFF;
-padding:5px 10px;
-margin:0;
-font-size:100%;
-margin-top:20px;
-}
-
-/*---------------508 Complaint Skip Navigation Link-----------------*/
-#skip{
-display:inline;
-color:#FFF !important;
-text-decoration:none;
-font-size:1px;
-position:absolute;
-top:0;
-left:0;
-z-index:10;
-}
-.cal-label{
-font-size:90%;
-color:#999;
-position: relative;
-top:4px;
-}
-caption{
-font-weight:bold;
-color:#369;
-}
-#grid a:visited{
-text-decoration:none;
-border-bottom:1px dotted;
-}
-.clear{
-display:block !imporatn;
-clear:both;
-}
-
-/*---------------------mTS: Task Steps------------------------------*/
-.mTS {
-border:1px #9CF solid;
-width:140px;
-background:#FFF;
-margin:10px 0;
-}
-.mTS h2 {
-text-transform:uppercase;
-text-align:center;
-color:#369;
-padding:0px 4px;
-margin:0;
-border:0;
-font-size:100%;
-border-bottom:1px #9CF solid;
-}
-.mTS ul {
-margin:0;
-border:0;
-padding:5px 0;
-width:90%;
-}
-.mTS ul li {
-list-style:none;
-padding-bottom:8px;
-padding-left:20px;
-padding-right:5px;
-}
-.mTS li.current {
-font-weight:bold;
-background:url(../images/task_arrow_on.gif) no-repeat;
-}
-.mTS li.complete {
-background:url(../images/check.gif) no-repeat;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/raptor.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/raptor.css
deleted file mode 100644
index ea37015a..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/raptor.css
+++ /dev/null
@@ -1,62 +0,0 @@
- .rowalt1 {background-color: rgb(255, 255, 255);}
- .rowalt2 {background-color: rgb(255, 255, 204);}
- .rowalt3 {background-color: rgb(255, 0, 0);}
-.rbg1 { background-color:#336699; } /* header background (gray) */
- .rbg1d { background:#747474; } /* tab dark background (gray) */
- .rbg2 { background:#FFFFFF;/*background:#D6DCE4;*/ } /* darker background */
- .rbg3 { background:#FFFFFF;/*background:#EDEDED;*/ } /* light background */
- .rbg4 { background:#88CAFB; } /* second header - dark */
- .rbg6 { background:#ffbbbb; } /* light error background */
- .rbg7 { background:#ff9999; } /* dark error background - header */
- .rcolheader { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#FFFFFF;font-weight:700;text-decoration:none }
- .rcolheader:hover { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#FFFFFF;font-weight:700;text-decoration:underline }
- .rtableheader { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#FFFFFF;font-weight:700; }
- .rtabletext { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#000000; }
- .rtabletextwhite { font-family:Arial;font-size:11px;color:#FFFFFF; }
- .rtext { font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#000000; }
- .rtext2 { font-family:Arial,Helvetica,sans-serif;font-size:13px;color:#ffffff; }
- .rerrortext { font-family:Arial,Helvetica,sans-serif;font-size:16px;color:#000000; }
- .rerrortextsm { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#000000; }
- .rprismsbutton { margin:3px 3px 3px 0px; padding:1px 5px 1px 5px; font-family: Arial; font-weight: 700; font-size: 11px; color: #ffffff; background-color: #336699 }
- .rsmallbutton { margin:3px 3px 3px 0px; padding:1px 5px 1px 5px; font-family: Arial; font-weight: 700; font-size: 11px; color: #336699; background-color: #EDEDED }
- .rrequired { background-image:url(raptor/images/required.gif); background-position:top right; background-repeat:no-repeat;}
- .rtabselected { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#FFFFFF;font-weight:700; }
- .rtabtext { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#CCCCCC;font-weight:700; }
- .buttonLabelField { margin:3px 3px 3px 0px; }
-
- /* Added to better customize the UI with FUSION */
- .rbg8 { border: 1px outset #8DA9D1; background: #EDEDED; color: #000000; } /* alternate table row background */
- .tableBorder { border:1px outset teal }
- .unpaddedButton { margin:3px 3px 3px 0px; font-family: Arial; font-weight: 700; font-size: 11px; color: #ffffff; background-color: #336699 }
- .normalText { font-family: Arial; font-size: 11px; color: #000000; }
- .popText { font-size:11px;font-family:Arial,Helvetica,sans-serif;color:#000000;padding:1px;font-weight:700;text-decoration:none; }
- .hyperref1 { font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#000000;text-decoration: none}
- A:link {text-decoration: none}
- A:visited {text-decoration: none}
- A:active {text-decoration: none}
- A:hover {text-decoration: none; color: blue;}
- .tdborder {margin:0;border:0;border-bottom:1px #CCC solid;border-right:1px #CCC solid;padding:4px 6px;vertical-align:middle;}
-
-div.scrollableTable {
- clear: both;
- border: 1px solid #963;
- height:100%;
- overflow: auto;
-}
-div.scrollableTable table {float:left;width:100%}
-
-thead.scrollableTableHeader tr {
- position: relative;
- top: expression(this.offsetParent.scrollTop);
- background:white;
-}
-
-thead.scrollableTableHeader tr th {position: relative;background: #336699;}
-/*thead.scrollableTableHeader tr td {position: relative;top: expression(this.offsetParent.scrollTop);background: #8a9bb3;}*/
-thead.scrollableTableHeader tr td {position: relative;top: expression(this.offsetParent.scrollTop);background: #336699;}
-tbody[class].scrollableTableContent {
- display: block;
- overflow: auto;
-}
- .trhideunhidecolor {background: #ffffff;}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/tree/drag-drop-folder-tree.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/css/tree/drag-drop-folder-tree.css
deleted file mode 100644
index 67afc894..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/css/tree/drag-drop-folder-tree.css
+++ /dev/null
@@ -1,64 +0,0 @@
- ul,ol{
- top:0;
- left:0px;
- margin:0px 0px;
- position:static;
- border:0;
- padding:0;
- }
-
- p{
- font-family:arial;
-
- }
- a{
- color:#000;
- font-family:arial;
- }
-
- .dhtmlgoodies_tree,#floatingContainer{
- margin:0px;
- padding:0px;
- }
- .dhtmlgoodies_tree ul{ /* Sub menu groups */
- margin-left:20px; /* Left spacing */
- padding-left:0px;
- display:none; /* Initially hide sub nodes */
- }
-
- #floatingContainer ul{
- margin-left:20px; /* Left spacing */
- padding-left:0px;
- }
- .dhtmlgoodies_tree li,#floatingContainer li{ /* Nodes */
- list-style-type:none;
- vertical-align:middle;
-
- }
- .dhtmlgoodies_tree li a,#floatingContainer li a{ /* Node links */
- color:#000;
- text-decoration:none;
- font-family:arial;
- font-size:0.8em;
- padding-left:1px;
- line-height:13px;
- margin-left:2px;
-
- }
- .dhtmlgoodies_tree li a.highlightedNodeItem{
- color:#FFF;
- background-color:#009;
- }
-
-
- body{
- margin:0px;
- padding:0px;
- }
-
- .dhtmlgoodies_tree input.folderTreeTextBox{ /* Css for the text input - rename item */
- font-size:10px;
- margin:0px;
- padding:0px;
- height:12px;
- } \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/css/nv.d3.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/css/nv.d3.css
deleted file mode 100644
index 28ccd053..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/css/nv.d3.css
+++ /dev/null
@@ -1,656 +0,0 @@
-
-/********************
- * HTML CSS
- */
-
-
-.chartWrap {
- margin: 0;
- padding: 0;
- overflow: hidden;
-}
-
-
-/********************
- * TOOLTIP CSS
- */
-
-.nvtooltip {
- position: absolute;
- background-color: rgba(255,255,255,1);
- padding: 10px;
- border: 1px solid #ddd;
- z-index: 10000;
-
- font-family: Arial;
- font-size: 13px;
-
- transition: opacity 500ms linear;
- -moz-transition: opacity 500ms linear;
- -webkit-transition: opacity 500ms linear;
-
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
-
- -moz-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- -webkit-box-shadow: 4px 4px 8px rgba(0,0,0,.5);
- box-shadow: 4px 4px 8px rgba(0,0,0,.5);
-
- -moz-border-radius: 10px;
- border-radius: 10px;
-
- pointer-events: none;
-
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
-}
-
-.nvtooltip h3 {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip p {
- margin: 0;
- padding: 0;
- text-align: center;
-}
-
-.nvtooltip span {
- display: inline-block;
- margin: 2px 0;
-}
-
-.nvtooltip-pending-removal {
- position: absolute;
- pointer-events: none;
-}
-
-
-/********************
- * SVG CSS
- */
-
-
-svg {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* Trying to get SVG to act like a greedy block in all browsers */
- display: block;
- width:100%;
- height:100%;
-}
-
-
-svg text {
- font: normal 12px Arial;
-}
-
-svg .title {
- font: bold 14px Arial;
-}
-
-.nvd3 .nv-background {
- fill: white;
- fill-opacity: 0;
- /*
- pointer-events: none;
- */
-}
-
-.nvd3.nv-noData {
- font-size: 18px;
- font-weight: bolf;
-}
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .extent {
- fill-opacity: .125;
- shape-rendering: crispEdges;
-}
-
-
-
-/**********
-* Legend
-*/
-
-.nvd3 .nv-legend .nv-series {
- cursor: pointer;
-}
-
-.nvd3 .nv-legend .disabled circle {
- fill-opacity: 0;
-}
-
-
-
-/**********
-* Axes
-*/
-
-.nvd3 .nv-axis path {
- fill: none;
- stroke: #000;
- stroke-opacity: .75;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis path.domain {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis.nv-x path.domain {
- stroke-opacity: 0;
-}
-
-.nvd3 .nv-axis line {
- fill: none;
- stroke: #000;
- stroke-opacity: .25;
- shape-rendering: crispEdges;
-}
-
-.nvd3 .nv-axis line.zero {
- stroke-opacity: .75;
-}
-
-.nvd3 .nv-axis .nv-axisMaxMin text {
- font-weight: bold;
-}
-
-.nvd3 .x .nv-axis .nv-axisMaxMin text,
-.nvd3 .x2 .nv-axis .nv-axisMaxMin text,
-.nvd3 .x3 .nv-axis .nv-axisMaxMin text {
- text-anchor: middle
-}
-
-
-
-/**********
-* Brush
-*/
-
-.nv-brush .resize path {
- fill: #eee;
- stroke: #666;
-}
-
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-bars .negative rect {
- zfill: brown;
-}
-
-.nvd3 .nv-bars rect {
- zfill: steelblue;
- fill-opacity: .75;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-bars rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-bars .hover rect {
- fill: lightblue;
-}
-
-.nvd3 .nv-bars text {
- fill: rgba(0,0,0,0);
-}
-
-.nvd3 .nv-bars .hover text {
- fill: rgba(0,0,0,1);
-}
-
-
-/**********
-* Bars
-*/
-
-.nvd3 .nv-multibar .nv-groups rect,
-.nvd3 .nv-multibarHorizontal .nv-groups rect,
-.nvd3 .nv-discretebar .nv-groups rect {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear;
-}
-
-.nvd3 .nv-multibar .nv-groups rect:hover,
-.nvd3 .nv-multibarHorizontal .nv-groups rect:hover,
-.nvd3 .nv-discretebar .nv-groups rect:hover {
- fill-opacity: 1;
-}
-
-.nvd3 .nv-discretebar .nv-groups text,
-.nvd3 .nv-multibarHorizontal .nv-groups text {
- font-weight: bold;
- fill: rgba(0,0,0,1);
- stroke: rgba(0,0,0,0);
-}
-
-/***********
-* Pie Chart
-*/
-
-.nvd3.nv-pie path {
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-width 250ms linear, stroke-opacity 250ms linear;
-
-}
-
-.nvd3.nv-pie .nv-slice text {
- stroke: #000;
- stroke-width: 0;
-}
-
-.nvd3.nv-pie path {
- stroke: #fff;
- stroke-width: 1px;
- stroke-opacity: 1;
-}
-
-.nvd3.nv-pie .hover path {
- fill-opacity: .7;
-/*
- stroke-width: 6px;
- stroke-opacity: 1;
-*/
-}
-
-.nvd3.nv-pie .nv-label rect {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-/**********
-* Lines
-*/
-
-.nvd3 .nv-groups path.nv-line {
- fill: none;
- stroke-width: 2.5px;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-groups path.nv-area {
- stroke: none;
- /*
- stroke-linecap: round;
- shape-rendering: geometricPrecision;
-
- stroke-width: 2.5px;
- transition: stroke-width 250ms linear;
- -moz-transition: stroke-width 250ms linear;
- -webkit-transition: stroke-width 250ms linear;
-
- transition-delay: 250ms
- -moz-transition-delay: 250ms;
- -webkit-transition-delay: 250ms;
- */
-}
-
-.nvd3 .nv-line.hover path {
- stroke-width: 6px;
-}
-
-/*
-.nvd3.scatter .groups .point {
- fill-opacity: 0.1;
- stroke-opacity: 0.1;
-}
- */
-
-.nvd3.nv-line .nvd3.nv-scatter .nv-groups .nv-point {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-scatter.nv-single-point .nv-groups .nv-point {
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-groups .nv-point {
- transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: stroke-width 250ms linear, stroke-opacity 250ms linear;
-}
-
-.nvd3.nv-scatter .nv-groups .nv-point.hover,
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- fill-opacity: .5 !important;
- stroke-opacity: .5 !important;
-}
-
-
-.nvd3 .nv-point-paths path {
- stroke: #aaa;
- stroke-opacity: 0;
- fill: #eee;
- fill-opacity: 0;
-}
-
-
-
-.nvd3 .nv-indexLine {
- cursor: ew-resize;
-}
-
-
-/**********
-* Distribution
-*/
-
-.nvd3 .nv-distribution {
- pointer-events: none;
-}
-
-
-
-/**********
-* Scatter
-*/
-
-/* **Attempting to remove this for useVoronoi(false), need to see if it's required anywhere
-.nvd3 .nv-groups .nv-point {
- pointer-events: none;
-}
-*/
-
-.nvd3 .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .5;
-}
-
-.nvd3 .nv-scatter .nv-point.hover {
- fill-opacity: 1;
-}
-
-/*
-.nv-group.hover .nv-point {
- fill-opacity: 1;
-}
-*/
-
-
-/**********
-* Stacked Area
-*/
-
-.nvd3.nv-stackedarea path.nv-area {
- fill-opacity: .7;
- /*
- stroke-opacity: .65;
- fill-opacity: 1;
- */
- stroke-opacity: 0;
-
- transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -moz-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
- -webkit-transition: fill-opacity 250ms linear, stroke-opacity 250ms linear;
-
- /*
- transition-delay: 500ms;
- -moz-transition-delay: 500ms;
- -webkit-transition-delay: 500ms;
- */
-
-}
-
-.nvd3.nv-stackedarea path.nv-area.hover {
- fill-opacity: .9;
- /*
- stroke-opacity: .85;
- */
-}
-/*
-.d3stackedarea .groups path {
- stroke-opacity: 0;
-}
- */
-
-
-
-.nvd3.nv-stackedarea .nv-groups .nv-point {
- stroke-opacity: 0;
- fill-opacity: 0;
-}
-
-.nvd3.nv-stackedarea .nv-groups .nv-point.hover {
- stroke-width: 20px;
- stroke-opacity: .75;
- fill-opacity: 1;
-}
-
-
-
-/**********
-* Line Plus Bar
-*/
-
-.nvd3.nv-linePlusBar .nv-bar rect {
- fill-opacity: .75;
-}
-
-.nvd3.nv-linePlusBar .nv-bar rect:hover {
- fill-opacity: 1;
-}
-
-
-/**********
-* Bullet
-*/
-
-.nvd3.nv-bullet { font: 10px sans-serif; }
-.nvd3.nv-bullet .nv-measure { fill-opacity: .8; }
-.nvd3.nv-bullet .nv-measure:hover { fill-opacity: 1; }
-.nvd3.nv-bullet .nv-marker { stroke: #000; stroke-width: 2px; }
-.nvd3.nv-bullet .nv-markerTriangle { stroke: #000; fill: #fff; stroke-width: 1.5px; }
-.nvd3.nv-bullet .nv-tick line { stroke: #666; stroke-width: .5px; }
-.nvd3.nv-bullet .nv-range.nv-s0 { fill: #eee; }
-.nvd3.nv-bullet .nv-range.nv-s1 { fill: #ddd; }
-.nvd3.nv-bullet .nv-range.nv-s2 { fill: #ccc; }
-.nvd3.nv-bullet .nv-title { font-size: 14px; font-weight: bold; }
-.nvd3.nv-bullet .nv-subtitle { fill: #999; }
-
-
-.nvd3.nv-bullet .nv-range {
- fill: #999;
- fill-opacity: .4;
-}
-.nvd3.nv-bullet .nv-range:hover {
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Sparkline
-*/
-
-.nvd3.nv-sparkline path {
- fill: none;
-}
-
-.nvd3.nv-sparklineplus g.nv-hoverValue {
- pointer-events: none;
-}
-
-.nvd3.nv-sparklineplus .nv-hoverValue line {
- stroke: #333;
- stroke-width: 1.5px;
- }
-
-.nvd3.nv-sparklineplus,
-.nvd3.nv-sparklineplus g {
- pointer-events: all;
-}
-
-.nvd3 .nv-hoverArea {
- fill-opacity: 0;
- stroke-opacity: 0;
-}
-
-.nvd3.nv-sparklineplus .nv-xValue,
-.nvd3.nv-sparklineplus .nv-yValue {
- /*
- stroke: #666;
- */
- stroke-width: 0;
- font-size: .9em;
- font-weight: normal;
-}
-
-.nvd3.nv-sparklineplus .nv-yValue {
- stroke: #f66;
-}
-
-.nvd3.nv-sparklineplus .nv-maxValue {
- stroke: #2ca02c;
- fill: #2ca02c;
-}
-
-.nvd3.nv-sparklineplus .nv-minValue {
- stroke: #d62728;
- fill: #d62728;
-}
-
-.nvd3.nv-sparklineplus .nv-currentValue {
- /*
- stroke: #444;
- fill: #000;
- */
- font-weight: bold;
- font-size: 1.1em;
-}
-
-/**********
-* historical stock
-*/
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick {
- stroke-width: 2px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.hover {
- stroke-width: 4px;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.positive {
- stroke: #2ca02c;
-}
-
-.nvd3.nv-ohlcBar .nv-ticks .nv-tick.negative {
- stroke: #d62728;
-}
-
-.nvd3.nv-historicalStockChart .nv-axis .nv-axislabel {
- font-weight: bold;
-}
-
-.nvd3.nv-historicalStockChart .nv-dragTarget {
- fill-opacity: 0;
- stroke: none;
- cursor: move;
-}
-
-.nvd3 .nv-brush .extent {
- /*
- cursor: ew-resize !important;
- */
- fill-opacity: 0 !important;
-}
-
-.nvd3 .nv-brushBackground rect {
- stroke: #000;
- stroke-width: .4;
- fill: #fff;
- fill-opacity: .7;
-}
-
-
-
-/**********
-* Indented Tree
-*/
-
-
-/**
- * TODO: the following 3 selectors are based on classes used in the example. I should either make them standard and leave them here, or move to a CSS file not included in the library
- */
-.nvd3.nv-indentedtree .name {
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .clickable {
- color: #08C;
- cursor: pointer;
-}
-
-.nvd3.nv-indentedtree span.clickable:hover {
- color: #005580;
- text-decoration: underline;
-}
-
-
-.nvd3.nv-indentedtree .nv-childrenCount {
- display: inline-block;
- margin-left: 5px;
-}
-
-.nvd3.nv-indentedtree .nv-treeicon {
- cursor: pointer;
- /*
- cursor: n-resize;
- */
-}
-
-.nvd3.nv-indentedtree .nv-treeicon.nv-folded {
- cursor: pointer;
- /*
- cursor: s-resize;
- */
-}
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/cie.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/cie.js
deleted file mode 100644
index 45f01329..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/cie.js
+++ /dev/null
@@ -1,155 +0,0 @@
-(function(d3) {
- var cie = d3.cie = {};
-
- cie.lab = function(l, a, b) {
- return arguments.length === 1
- ? (l instanceof Lab ? lab(l.l, l.a, l.b)
- : (l instanceof Lch ? lch_lab(l.l, l.c, l.h)
- : rgb_lab((l = d3.rgb(l)).r, l.g, l.b)))
- : lab(+l, +a, +b);
- };
-
- cie.lch = function(l, c, h) {
- return arguments.length === 1
- ? (l instanceof Lch ? lch(l.l, l.c, l.h)
- : (l instanceof Lab ? lab_lch(l.l, l.a, l.b)
- : lab_lch((l = rgb_lab((l = d3.rgb(l)).r, l.g, l.b)).l, l.a, l.b)))
- : lch(+l, +c, +h);
- };
-
- cie.interpolateLab = function(a, b) {
- a = cie.lab(a);
- b = cie.lab(b);
- var al = a.l,
- aa = a.a,
- ab = a.b,
- bl = b.l - al,
- ba = b.a - aa,
- bb = b.b - ab;
- return function(t) {
- return lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
-
- cie.interpolateLch = function(a, b) {
- a = cie.lch(a);
- b = cie.lch(b);
- var al = a.l,
- ac = a.c,
- ah = a.h,
- bl = b.l - al,
- bc = b.c - ac,
- bh = b.h - ah;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360; // shortest path
- return function(t) {
- return lch_lab(al + bl * t, ac + bc * t, ah + bh * t) + "";
- };
- };
-
- function lab(l, a, b) {
- return new Lab(l, a, b);
- }
-
- function Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
-
- Lab.prototype.brighter = function(k) {
- return lab(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.darker = function(k) {
- return lab(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.a, this.b);
- };
-
- Lab.prototype.rgb = function() {
- return lab_rgb(this.l, this.a, this.b);
- };
-
- Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- function lch(l, c, h) {
- return new Lch(l, c, h);
- }
-
- function Lch(l, c, h) {
- this.l = l;
- this.c = c;
- this.h = h;
- }
-
- Lch.prototype.brighter = function(k) {
- return lch(Math.min(100, this.l + K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.darker = function(k) {
- return lch(Math.max(0, this.l - K * (arguments.length ? k : 1)), this.c, this.h);
- };
-
- Lch.prototype.rgb = function() {
- return lch_lab(this.l, this.c, this.h).rgb();
- };
-
- Lch.prototype.toString = function() {
- return this.rgb() + "";
- };
-
- // Corresponds roughly to RGB brighter/darker
- var K = 18;
-
- // D65 standard referent
- var X = 0.950470, Y = 1, Z = 1.088830;
-
- function lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = lab_xyz(x) * X;
- y = lab_xyz(y) * Y;
- z = lab_xyz(z) * Z;
- return d3.rgb(
- xyz_rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z),
- xyz_rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
- xyz_rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z)
- );
- }
-
- function rgb_lab(r, g, b) {
- r = rgb_xyz(r);
- g = rgb_xyz(g);
- b = rgb_xyz(b);
- var x = xyz_lab((0.4124564 * r + 0.3575761 * g + 0.1804375 * b) / X),
- y = xyz_lab((0.2126729 * r + 0.7151522 * g + 0.0721750 * b) / Y),
- z = xyz_lab((0.0193339 * r + 0.1191920 * g + 0.9503041 * b) / Z);
- return lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
-
- function lab_lch(l, a, b) {
- var c = Math.sqrt(a * a + b * b),
- h = Math.atan2(b, a) / Math.PI * 180;
- return lch(l, c, h);
- }
-
- function lch_lab(l, c, h) {
- h = h * Math.PI / 180;
- return lab(l, Math.cos(h) * c, Math.sin(h) * c);
- }
-
- function lab_xyz(x) {
- return x > 0.206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
-
- function xyz_lab(x) {
- return x > 0.008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
-
- function xyz_rgb(r) {
- return Math.round(255 * (r <= 0.00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - 0.055));
- }
-
- function rgb_xyz(r) {
- return (r /= 255) <= 0.04045 ? r / 12.92 : Math.pow((r + 0.055) / 1.055, 2.4);
- }
-})(d3);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/colorbrewer.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/colorbrewer.js
deleted file mode 100644
index 2295527b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/colorbrewer.js
+++ /dev/null
@@ -1,302 +0,0 @@
-// This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/).
-var colorbrewer = {YlGn: {
-3: ["#f7fcb9","#addd8e","#31a354"],
-4: ["#ffffcc","#c2e699","#78c679","#238443"],
-5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"],
-6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"],
-7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"],
-9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"]
-},YlGnBu: {
-3: ["#edf8b1","#7fcdbb","#2c7fb8"],
-4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"],
-5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"],
-6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"],
-7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"],
-9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"]
-},GnBu: {
-3: ["#e0f3db","#a8ddb5","#43a2ca"],
-4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"],
-5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"],
-6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"],
-7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"],
-9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"]
-},BuGn: {
-3: ["#e5f5f9","#99d8c9","#2ca25f"],
-4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"],
-5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"],
-6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"],
-7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"],
-9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"]
-},PuBuGn: {
-3: ["#ece2f0","#a6bddb","#1c9099"],
-4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"],
-5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"],
-6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"],
-7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"],
-9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"]
-},PuBu: {
-3: ["#ece7f2","#a6bddb","#2b8cbe"],
-4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"],
-5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"],
-6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"],
-7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"],
-9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"]
-},BuPu: {
-3: ["#e0ecf4","#9ebcda","#8856a7"],
-4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"],
-5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"],
-6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"],
-7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"],
-9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"]
-},RdPu: {
-3: ["#fde0dd","#fa9fb5","#c51b8a"],
-4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"],
-5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"],
-6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"],
-7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"],
-9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"]
-},PuRd: {
-3: ["#e7e1ef","#c994c7","#dd1c77"],
-4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"],
-5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"],
-6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"],
-7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"],
-9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"]
-},OrRd: {
-3: ["#fee8c8","#fdbb84","#e34a33"],
-4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"],
-5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"],
-6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"],
-7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"],
-9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"]
-},YlOrRd: {
-3: ["#ffeda0","#feb24c","#f03b20"],
-4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"],
-5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"],
-6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"],
-7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"],
-9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"]
-},YlOrBr: {
-3: ["#fff7bc","#fec44f","#d95f0e"],
-4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"],
-5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"],
-6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"],
-7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"],
-9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"]
-},Purples: {
-3: ["#efedf5","#bcbddc","#756bb1"],
-4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"],
-5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"],
-6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"],
-7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"],
-9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"]
-},Blues: {
-3: ["#deebf7","#9ecae1","#3182bd"],
-4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"],
-5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"],
-6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"],
-7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"],
-9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"]
-},Greens: {
-3: ["#e5f5e0","#a1d99b","#31a354"],
-4: ["#edf8e9","#bae4b3","#74c476","#238b45"],
-5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"],
-6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"],
-7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"],
-9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"]
-},Oranges: {
-3: ["#fee6ce","#fdae6b","#e6550d"],
-4: ["#feedde","#fdbe85","#fd8d3c","#d94701"],
-5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"],
-6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"],
-7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"],
-9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"]
-},Reds: {
-3: ["#fee0d2","#fc9272","#de2d26"],
-4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"],
-5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"],
-6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"],
-7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"],
-9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"]
-},Greys: {
-3: ["#f0f0f0","#bdbdbd","#636363"],
-4: ["#f7f7f7","#cccccc","#969696","#525252"],
-5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"],
-6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"],
-7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"],
-9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"]
-},PuOr: {
-3: ["#f1a340","#f7f7f7","#998ec3"],
-4: ["#e66101","#fdb863","#b2abd2","#5e3c99"],
-5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"],
-6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"],
-7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"],
-8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"],
-9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"],
-10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],
-11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"]
-},BrBG: {
-3: ["#d8b365","#f5f5f5","#5ab4ac"],
-4: ["#a6611a","#dfc27d","#80cdc1","#018571"],
-5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"],
-6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"],
-7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"],
-8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"],
-9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"],
-10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],
-11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"]
-},PRGn: {
-3: ["#af8dc3","#f7f7f7","#7fbf7b"],
-4: ["#7b3294","#c2a5cf","#a6dba0","#008837"],
-5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"],
-6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"],
-7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"],
-8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"],
-10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],
-11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"]
-},PiYG: {
-3: ["#e9a3c9","#f7f7f7","#a1d76a"],
-4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"],
-5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"],
-6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"],
-7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"],
-8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"],
-10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],
-11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"]
-},RdBu: {
-3: ["#ef8a62","#f7f7f7","#67a9cf"],
-4: ["#ca0020","#f4a582","#92c5de","#0571b0"],
-5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"],
-6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"],
-7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"]
-},RdGy: {
-3: ["#ef8a62","#ffffff","#999999"],
-4: ["#ca0020","#f4a582","#bababa","#404040"],
-5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"],
-6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"],
-7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"],
-8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"],
-9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"],
-10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],
-11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"]
-},RdYlBu: {
-3: ["#fc8d59","#ffffbf","#91bfdb"],
-4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"],
-5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"],
-6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"],
-7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"],
-8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"]
-},Spectral: {
-3: ["#fc8d59","#ffffbf","#99d594"],
-4: ["#d7191c","#fdae61","#abdda4","#2b83ba"],
-5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"],
-6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"],
-7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"],
-8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"],
-9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"],
-10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],
-11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"]
-},RdYlGn: {
-3: ["#fc8d59","#ffffbf","#91cf60"],
-4: ["#d7191c","#fdae61","#a6d96a","#1a9641"],
-5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"],
-6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"],
-7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"],
-8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"],
-10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],
-11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"]
-},Accent: {
-3: ["#7fc97f","#beaed4","#fdc086"],
-4: ["#7fc97f","#beaed4","#fdc086","#ffff99"],
-5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"],
-6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"],
-7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"],
-8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"]
-},Dark2: {
-3: ["#1b9e77","#d95f02","#7570b3"],
-4: ["#1b9e77","#d95f02","#7570b3","#e7298a"],
-5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"],
-6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"],
-7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"],
-8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"]
-},Paired: {
-3: ["#a6cee3","#1f78b4","#b2df8a"],
-4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"],
-5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"],
-6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"],
-7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"],
-8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"],
-9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"],
-10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"],
-11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"],
-12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"]
-},Pastel1: {
-3: ["#fbb4ae","#b3cde3","#ccebc5"],
-4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"],
-5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"],
-6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"],
-7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"],
-8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"],
-9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]
-},Pastel2: {
-3: ["#b3e2cd","#fdcdac","#cbd5e8"],
-4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"],
-5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"],
-6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"],
-7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"],
-8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"]
-},Set1: {
-3: ["#e41a1c","#377eb8","#4daf4a"],
-4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"],
-5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"],
-6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"],
-7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"],
-8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"],
-9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"]
-},Set2: {
-3: ["#66c2a5","#fc8d62","#8da0cb"],
-4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"],
-5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"],
-6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"],
-7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"],
-8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"]
-},Set3: {
-3: ["#8dd3c7","#ffffb3","#bebada"],
-4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"],
-5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"],
-6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"],
-7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"],
-8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"],
-9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"],
-10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"],
-11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"],
-12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"]
-}};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/core.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/core.js
deleted file mode 100644
index 912de8d8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/core.js
+++ /dev/null
@@ -1,122 +0,0 @@
-
-var nv = window.nv || {};
-
-
-nv.version = '1.1.13b';
-nv.dev = true //set false when in production
-
-window.nv = nv;
-
-nv.tooltip = {}; // For the tooltip system
-nv.utils = nv.utils || {}; // Utility subsystem
-nv.models = {}; //stores all the possible models/components
-nv.charts = {}; //stores all the ready to use charts
-nv.graphs = []; //stores all the graphs currently on the page
-nv.logs = {}; //stores some statistics and potential error messages
-
-nv.dispatch = d3.dispatch('render_start', 'render_end');
-
-// *************************************************************************
-// Development render timers - disabled if dev = false
-
-if (nv.dev) {
- nv.dispatch.on('render_start', function(e) {
- nv.logs.startTime = +new Date();
- });
-
- nv.dispatch.on('render_end', function(e) {
- nv.logs.endTime = +new Date();
- nv.logs.totalTime = nv.logs.endTime - nv.logs.startTime;
- nv.log('total', nv.logs.totalTime); // used for development, to keep track of graph generation times
- });
-}
-
-// ********************************************
-// Public Core NV functions
-
-// Logs all arguments, and returns the last so you can test things in place
-// Note: in IE8 console.log is an object not a function, and if modernizr is used
-// then calling Function.prototype.bind with with anything other than a function
-// causes a TypeError to be thrown.
-nv.log = function() {
- if (nv.dev && console.log && console.log.apply)
- console.log.apply(console, arguments)
- else if (nv.dev && typeof console.log == "function" && Function.prototype.bind) {
- var log = Function.prototype.bind.call(console.log, console);
- log.apply(console, arguments);
- }
- return arguments[arguments.length - 1];
-};
-
-
-nv.render = function render(step) {
- step = step || 1; // number of graphs to generate in each timeout loop
-
- nv.render.active = true;
- nv.dispatch.render_start();
-
- setTimeout(function() {
- var chart, graph;
-
- for (var i = 0; i < step && (graph = nv.render.queue[i]); i++) {
- chart = graph.generate();
- if (typeof graph.callback == typeof(Function)) graph.callback(chart);
- nv.graphs.push(chart);
- }
-
- nv.render.queue.splice(0, i);
-
- if (nv.render.queue.length) setTimeout(arguments.callee, 0);
- else { nv.render.active = false; nv.dispatch.render_end(); }
- }, 0);
-};
-
-nv.render.active = false;
-nv.render.queue = [];
-
-nv.addGraph = function(obj) {
- if (typeof arguments[0] === typeof(Function))
- obj = {generate: arguments[0], callback: arguments[1]};
-
- nv.render.queue.push(obj);
-
- if (!nv.render.active) nv.render();
-};
-
-nv.identity = function(d) { return d; };
-
-nv.strip = function(s) { return s.replace(/(\s|&)/g,''); };
-
-function daysInMonth(month,year) {
- return (new Date(year, month+1, 0)).getDate();
-}
-
-function d3_time_range(floor, step, number) {
- return function(t0, t1, dt) {
- var time = floor(t0), times = [];
- if (time < t0) step(time);
- if (dt > 1) {
- while (time < t1) {
- var date = new Date(+time);
- if ((number(date) % dt === 0)) times.push(date);
- step(time);
- }
- } else {
- while (time < t1) { times.push(new Date(+time)); step(time); }
- }
- return times;
- };
-}
-
-d3.time.monthEnd = function(date) {
- return new Date(date.getFullYear(), date.getMonth(), 0);
-};
-
-d3.time.monthEnds = d3_time_range(d3.time.monthEnd, function(date) {
- date.setUTCDate(date.getUTCDate() + 1);
- date.setDate(daysInMonth(date.getMonth() + 1, date.getFullYear()));
- }, function(date) {
- return date.getMonth();
- }
-);
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.js
deleted file mode 100644
index 1aaabca2..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.js
+++ /dev/null
@@ -1,1180 +0,0 @@
-(function(exports){
-crossfilter.version = "1.0.3";
-function crossfilter_identity(d) {
- return d;
-}
-crossfilter.permute = permute;
-
-function permute(array, index) {
- for (var i = 0, n = index.length, copy = new Array(n); i < n; ++i) {
- copy[i] = array[index[i]];
- }
- return copy;
-}
-var bisect = crossfilter.bisect = bisect_by(crossfilter_identity);
-
-bisect.by = bisect_by;
-
-function bisect_by(f) {
-
- // Locate the insertion point for x in a to maintain sorted order. The
- // arguments lo and hi may be used to specify a subset of the array which
- // should be considered; by default the entire array is used. If x is already
- // present in a, the insertion point will be before (to the left of) any
- // existing entries. The return value is suitable for use as the first
- // argument to `array.splice` assuming that a is already sorted.
- //
- // The returned insertion point i partitions the array a into two halves so
- // that all v < x for v in a[lo:i] for the left side and all v >= x for v in
- // a[i:hi] for the right side.
- function bisectLeft(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (f(a[mid]) < x) lo = mid + 1;
- else hi = mid;
- }
- return lo;
- }
-
- // Similar to bisectLeft, but returns an insertion point which comes after (to
- // the right of) any existing entries of x in a.
- //
- // The returned insertion point i partitions the array into two halves so that
- // all v <= x for v in a[lo:i] for the left side and all v > x for v in
- // a[i:hi] for the right side.
- function bisectRight(a, x, lo, hi) {
- while (lo < hi) {
- var mid = lo + hi >> 1;
- if (x < f(a[mid])) hi = mid;
- else lo = mid + 1;
- }
- return lo;
- }
-
- bisectRight.right = bisectRight;
- bisectRight.left = bisectLeft;
- return bisectRight;
-}
-var heap = crossfilter.heap = heap_by(crossfilter_identity);
-
-heap.by = heap_by;
-
-function heap_by(f) {
-
- // Builds a binary heap within the specified array a[lo:hi]. The heap has the
- // property such that the parent a[lo+i] is always less than or equal to its
- // two children: a[lo+2*i+1] and a[lo+2*i+2].
- function heap(a, lo, hi) {
- var n = hi - lo,
- i = (n >>> 1) + 1;
- while (--i > 0) sift(a, i, n, lo);
- return a;
- }
-
- // Sorts the specified array a[lo:hi] in descending order, assuming it is
- // already a heap.
- function sort(a, lo, hi) {
- var n = hi - lo,
- t;
- while (--n > 0) t = a[lo], a[lo] = a[lo + n], a[lo + n] = t, sift(a, 1, n, lo);
- return a;
- }
-
- // Sifts the element a[lo+i-1] down the heap, where the heap is the contiguous
- // slice of array a[lo:lo+n]. This method can also be used to update the heap
- // incrementally, without incurring the full cost of reconstructing the heap.
- function sift(a, i, n, lo) {
- var d = a[--lo + i],
- x = f(d),
- child;
- while ((child = i << 1) <= n) {
- if (child < n && f(a[lo + child]) > f(a[lo + child + 1])) child++;
- if (x <= f(a[lo + child])) break;
- a[lo + i] = a[lo + child];
- i = child;
- }
- a[lo + i] = d;
- }
-
- heap.sort = sort;
- return heap;
-}
-var heapselect = crossfilter.heapselect = heapselect_by(crossfilter_identity);
-
-heapselect.by = heapselect_by;
-
-function heapselect_by(f) {
- var heap = heap_by(f);
-
- // Returns a new array containing the top k elements in the array a[lo:hi].
- // The returned array is not sorted, but maintains the heap property. If k is
- // greater than hi - lo, then fewer than k elements will be returned. The
- // order of elements in a is unchanged by this operation.
- function heapselect(a, lo, hi, k) {
- var queue = new Array(k = Math.min(hi - lo, k)),
- min,
- i,
- x,
- d;
-
- for (i = 0; i < k; ++i) queue[i] = a[lo++];
- heap(queue, 0, k);
-
- if (lo < hi) {
- min = f(queue[0]);
- do {
- if (x = f(d = a[lo]) > min) {
- queue[0] = d;
- min = f(heap(queue, 0, k)[0]);
- }
- } while (++lo < hi);
- }
-
- return queue;
- }
-
- return heapselect;
-}
-var insertionsort = crossfilter.insertionsort = insertionsort_by(crossfilter_identity);
-
-insertionsort.by = insertionsort_by;
-
-function insertionsort_by(f) {
-
- function insertionsort(a, lo, hi) {
- for (var i = lo + 1; i < hi; ++i) {
- for (var j = i, t = a[i], x = f(t); j > lo && f(a[j - 1]) > x; --j) {
- a[j] = a[j - 1];
- }
- a[j] = t;
- }
- return a;
- }
-
- return insertionsort;
-}
-// Algorithm designed by Vladimir Yaroslavskiy.
-// Implementation based on the Dart project; see lib/dart/LICENSE for details.
-
-var quicksort = crossfilter.quicksort = quicksort_by(crossfilter_identity);
-
-quicksort.by = quicksort_by;
-
-function quicksort_by(f) {
- var insertionsort = insertionsort_by(f);
-
- function sort(a, lo, hi) {
- return (hi - lo < quicksort_sizeThreshold
- ? insertionsort
- : quicksort)(a, lo, hi);
- }
-
- function quicksort(a, lo, hi) {
-
- // Compute the two pivots by looking at 5 elements.
- var sixth = (hi - lo) / 6 | 0,
- i1 = lo + sixth,
- i5 = hi - 1 - sixth,
- i3 = lo + hi - 1 >> 1, // The midpoint.
- i2 = i3 - sixth,
- i4 = i3 + sixth;
-
- var e1 = a[i1], x1 = f(e1),
- e2 = a[i2], x2 = f(e2),
- e3 = a[i3], x3 = f(e3),
- e4 = a[i4], x4 = f(e4),
- e5 = a[i5], x5 = f(e5);
-
- var t;
-
- // Sort the selected 5 elements using a sorting network.
- if (x1 > x2) t = e1, e1 = e2, e2 = t, t = x1, x1 = x2, x2 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
- if (x1 > x3) t = e1, e1 = e3, e3 = t, t = x1, x1 = x3, x3 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x1 > x4) t = e1, e1 = e4, e4 = t, t = x1, x1 = x4, x4 = t;
- if (x3 > x4) t = e3, e3 = e4, e4 = t, t = x3, x3 = x4, x4 = t;
- if (x2 > x5) t = e2, e2 = e5, e5 = t, t = x2, x2 = x5, x5 = t;
- if (x2 > x3) t = e2, e2 = e3, e3 = t, t = x2, x2 = x3, x3 = t;
- if (x4 > x5) t = e4, e4 = e5, e5 = t, t = x4, x4 = x5, x5 = t;
-
- var pivot1 = e2, pivotValue1 = x2,
- pivot2 = e4, pivotValue2 = x4;
-
- // e2 and e4 have been saved in the pivot variables. They will be written
- // back, once the partitioning is finished.
- a[i1] = e1;
- a[i2] = a[lo];
- a[i3] = e3;
- a[i4] = a[hi - 1];
- a[i5] = e5;
-
- var less = lo + 1, // First element in the middle partition.
- great = hi - 2; // Last element in the middle partition.
-
- // Note that for value comparison, <, <=, >= and > coerce to a primitive via
- // Object.prototype.valueOf; == and === do not, so in order to be consistent
- // with natural order (such as for Date objects), we must do two compares.
- var pivotsEqual = pivotValue1 <= pivotValue2 && pivotValue1 >= pivotValue2;
- if (pivotsEqual) {
-
- // Degenerated case where the partitioning becomes a dutch national flag
- // problem.
- //
- // [ | < pivot | == pivot | unpartitioned | > pivot | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1) for x in ]left, less[ : x < pivot.
- // 2) for x in [less, k[ : x == pivot.
- // 3) for x in ]great, right[ : x > pivot.
- for (var k = less; k <= great; ++k) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else if (xk > pivotValue1) {
-
- // Find the first element <= pivot in the range [k - 1, great] and
- // put [:ek:] there. We know that such an element must exist:
- // When k == less, then el3 (which is equal to pivot) lies in the
- // interval. Otherwise a[k - 1] == pivot and the search stops at k-1.
- // Note that in the latter case invariant 2 will be violated for a
- // short amount of time. The invariant will be restored when the
- // pivots are put into their final positions.
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue1) {
- great--;
- // This is the only location in the while-loop where a new
- // iteration is started.
- continue;
- } else if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- break;
- } else {
- a[k] = a[great];
- a[great--] = ek;
- // Note: if great < k then we will exit the outer loop and fix
- // invariant 2 (which we just violated).
- break;
- }
- }
- }
- }
- } else {
-
- // We partition the list into three parts:
- // 1. < pivot1
- // 2. >= pivot1 && <= pivot2
- // 3. > pivot2
- //
- // During the loop we have:
- // [ | < pivot1 | >= pivot1 && <= pivot2 | unpartitioned | > pivot2 | ]
- // ^ ^ ^ ^ ^
- // left less k great right
- //
- // a[left] and a[right] are undefined and are filled after the
- // partitioning.
- //
- // Invariants:
- // 1. for x in ]left, less[ : x < pivot1
- // 2. for x in [less, k[ : pivot1 <= x && x <= pivot2
- // 3. for x in ]great, right[ : x > pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk < pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- ++less;
- } else {
- if (xk > pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue > pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] <= pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] >= pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // Move pivots into their final positions.
- // We shrunk the list from both sides (a[left] and a[right] have
- // meaningless values in them) and now we move elements from the first
- // and third partition into these locations so that we can store the
- // pivots.
- a[lo] = a[less - 1];
- a[less - 1] = pivot1;
- a[hi - 1] = a[great + 1];
- a[great + 1] = pivot2;
-
- // The list is now partitioned into three partitions:
- // [ < pivot1 | >= pivot1 && <= pivot2 | > pivot2 ]
- // ^ ^ ^ ^
- // left less great right
-
- // Recursive descent. (Don't include the pivot values.)
- sort(a, lo, less - 1);
- sort(a, great + 2, hi);
-
- if (pivotsEqual) {
- // All elements in the second partition are equal to the pivot. No
- // need to sort them.
- return a;
- }
-
- // In theory it should be enough to call _doSort recursively on the second
- // partition.
- // The Android source however removes the pivot elements from the recursive
- // call if the second partition is too large (more than 2/3 of the list).
- if (less < i1 && great > i5) {
- var lessValue, greatValue;
- while ((lessValue = f(a[less])) <= pivotValue1 && lessValue >= pivotValue1) ++less;
- while ((greatValue = f(a[great])) <= pivotValue2 && greatValue >= pivotValue2) --great;
-
- // Copy paste of the previous 3-way partitioning with adaptions.
- //
- // We partition the list into three parts:
- // 1. == pivot1
- // 2. > pivot1 && < pivot2
- // 3. == pivot2
- //
- // During the loop we have:
- // [ == pivot1 | > pivot1 && < pivot2 | unpartitioned | == pivot2 ]
- // ^ ^ ^
- // less k great
- //
- // Invariants:
- // 1. for x in [ *, less[ : x == pivot1
- // 2. for x in [less, k[ : pivot1 < x && x < pivot2
- // 3. for x in ]great, * ] : x == pivot2
- for (var k = less; k <= great; k++) {
- var ek = a[k], xk = f(ek);
- if (xk <= pivotValue1 && xk >= pivotValue1) {
- if (k !== less) {
- a[k] = a[less];
- a[less] = ek;
- }
- less++;
- } else {
- if (xk <= pivotValue2 && xk >= pivotValue2) {
- while (true) {
- var greatValue = f(a[great]);
- if (greatValue <= pivotValue2 && greatValue >= pivotValue2) {
- great--;
- if (great < k) break;
- // This is the only location inside the loop where a new
- // iteration is started.
- continue;
- } else {
- // a[great] < pivot2.
- if (greatValue < pivotValue1) {
- // Triple exchange.
- a[k] = a[less];
- a[less++] = a[great];
- a[great--] = ek;
- } else {
- // a[great] == pivot1.
- a[k] = a[great];
- a[great--] = ek;
- }
- break;
- }
- }
- }
- }
- }
- }
-
- // The second partition has now been cleared of pivot elements and looks
- // as follows:
- // [ * | > pivot1 && < pivot2 | * ]
- // ^ ^
- // less great
- // Sort the second partition using recursive descent.
-
- // The second partition looks as follows:
- // [ * | >= pivot1 && <= pivot2 | * ]
- // ^ ^
- // less great
- // Simply sort it by recursive descent.
-
- return sort(a, less, great + 1);
- }
-
- return sort;
-}
-
-var quicksort_sizeThreshold = 32;
-var crossfilter_array8 = crossfilter_arrayUntyped,
- crossfilter_array16 = crossfilter_arrayUntyped,
- crossfilter_array32 = crossfilter_arrayUntyped,
- crossfilter_arrayLengthen = crossfilter_identity,
- crossfilter_arrayWiden = crossfilter_identity;
-
-if (typeof Uint8Array !== "undefined") {
- crossfilter_array8 = function(n) { return new Uint8Array(n); };
- crossfilter_array16 = function(n) { return new Uint16Array(n); };
- crossfilter_array32 = function(n) { return new Uint32Array(n); };
-
- crossfilter_arrayLengthen = function(array, length) {
- var copy = new array.constructor(length);
- copy.set(array);
- return copy;
- };
-
- crossfilter_arrayWiden = function(array, width) {
- var copy;
- switch (width) {
- case 16: copy = crossfilter_array16(array.length); break;
- case 32: copy = crossfilter_array32(array.length); break;
- default: throw new Error("invalid array width!");
- }
- copy.set(array);
- return copy;
- };
-}
-
-function crossfilter_arrayUntyped(n) {
- return new Array(n);
-}
-function crossfilter_filterExact(bisect, value) {
- return function(values) {
- var n = values.length;
- return [bisect.left(values, value, 0, n), bisect.right(values, value, 0, n)];
- };
-}
-
-function crossfilter_filterRange(bisect, range) {
- var min = range[0],
- max = range[1];
- return function(values) {
- var n = values.length;
- return [bisect.left(values, min, 0, n), bisect.left(values, max, 0, n)];
- };
-}
-
-function crossfilter_filterAll(values) {
- return [0, values.length];
-}
-function crossfilter_null() {
- return null;
-}
-function crossfilter_zero() {
- return 0;
-}
-function crossfilter_reduceIncrement(p) {
- return p + 1;
-}
-
-function crossfilter_reduceDecrement(p) {
- return p - 1;
-}
-
-function crossfilter_reduceAdd(f) {
- return function(p, v) {
- return p + +f(v);
- };
-}
-
-function crossfilter_reduceSubtract(f) {
- return function(p, v) {
- return p - f(v);
- };
-}
-exports.crossfilter = crossfilter;
-
-function crossfilter() {
- var crossfilter = {
- add: add,
- dimension: dimension,
- groupAll: groupAll,
- size: size
- };
-
- var data = [], // the records
- n = 0, // the number of records; data.length
- m = 0, // number of dimensions in use
- M = 8, // number of dimensions that can fit in `filters`
- filters = crossfilter_array8(0), // M bits per record; 1 is filtered out
- filterListeners = [], // when the filters change
- dataListeners = []; // when data is added
-
- // Adds the specified new records to this crossfilter.
- function add(newData) {
- var n0 = n,
- n1 = newData.length;
-
- // If there's actually new data to add…
- // Merge the new data into the existing data.
- // Lengthen the filter bitset to handle the new records.
- // Notify listeners (dimensions and groups) that new data is available.
- if (n1) {
- data = data.concat(newData);
- filters = crossfilter_arrayLengthen(filters, n += n1);
- dataListeners.forEach(function(l) { l(newData, n0, n1); });
- }
-
- return crossfilter;
- }
-
- // Adds a new dimension with the specified value accessor function.
- function dimension(value) {
- var dimension = {
- filter: filter,
- filterExact: filterExact,
- filterRange: filterRange,
- filterAll: filterAll,
- top: top,
- group: group,
- groupAll: groupAll
- };
-
- var one = 1 << m++, // bit mask, e.g., 00001000
- zero = ~one, // inverted one, e.g., 11110111
- values, // sorted, cached array
- index, // value rank ↦ object id
- newValues, // temporary array storing newly-added values
- newIndex, // temporary array storing newly-added index
- sort = quicksort_by(function(i) { return newValues[i]; }),
- refilter = crossfilter_filterAll, // for recomputing filter
- indexListeners = [], // when data is added
- lo0 = 0,
- hi0 = 0;
-
- // Updating a dimension is a two-stage process. First, we must update the
- // associated filters for the newly-added records. Once all dimensions have
- // updated their filters, the groups are notified to update.
- dataListeners.unshift(preAdd);
- dataListeners.push(postAdd);
-
- // Incorporate any existing data into this dimension, and make sure that the
- // filter bitset is wide enough to handle the new dimension.
- if (m > M) filters = crossfilter_arrayWiden(filters, M <<= 1);
- preAdd(data, 0, n);
- postAdd(data, 0, n);
-
- // Incorporates the specified new records into this dimension.
- // This function is responsible for updating filters, values, and index.
- function preAdd(newData, n0, n1) {
-
- // Permute new values into natural order using a sorted index.
- newValues = newData.map(value);
- newIndex = sort(crossfilter_range(n1), 0, n1);
- newValues = permute(newValues, newIndex);
-
- // Bisect newValues to determine which new records are selected.
- var bounds = refilter(newValues), lo1 = bounds[0], hi1 = bounds[1], i;
- for (i = 0; i < lo1; ++i) filters[newIndex[i] + n0] |= one;
- for (i = hi1; i < n1; ++i) filters[newIndex[i] + n0] |= one;
-
- // If this dimension previously had no data, then we don't need to do the
- // more expensive merge operation; use the new values and index as-is.
- if (!n0) {
- values = newValues;
- index = newIndex;
- lo0 = lo1;
- hi0 = hi1;
- return;
- }
-
- var oldValues = values,
- oldIndex = index,
- i0 = 0,
- i1 = 0;
-
- // Otherwise, create new arrays into which to merge new and old.
- values = new Array(n);
- index = crossfilter_index(n, n);
-
- // Merge the old and new sorted values, and old and new index.
- for (i = 0; i0 < n0 && i1 < n1; ++i) {
- if (oldValues[i0] < newValues[i1]) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0++];
- } else {
- values[i] = newValues[i1];
- index[i] = newIndex[i1++] + n0;
- }
- }
-
- // Add any remaining old values.
- for (; i0 < n0; ++i0, ++i) {
- values[i] = oldValues[i0];
- index[i] = oldIndex[i0];
- }
-
- // Add any remaining new values.
- for (; i1 < n1; ++i1, ++i) {
- values[i] = newValues[i1];
- index[i] = newIndex[i1] + n0;
- }
-
- // Bisect again to recompute lo0 and hi0.
- bounds = refilter(values), lo0 = bounds[0], hi0 = bounds[1];
- }
-
- // When all filters have updated, notify index listeners of the new values.
- function postAdd(newData, n0, n1) {
- indexListeners.forEach(function(l) { l(newValues, newIndex, n0, n1); });
- newValues = newIndex = null;
- }
-
- // Updates the selected values based on the specified bounds [lo, hi].
- // This implementation is used by all the public filter methods.
- function filterIndex(bounds) {
- var i,
- j,
- k,
- lo1 = bounds[0],
- hi1 = bounds[1],
- added = [],
- removed = [];
-
- // Fast incremental update based on previous lo index.
- if (lo1 < lo0) {
- for (i = lo1, j = Math.min(lo0, hi1); i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (lo1 > lo0) {
- for (i = lo0, j = Math.min(lo1, hi0); i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- // Fast incremental update based on previous hi index.
- if (hi1 > hi0) {
- for (i = Math.max(lo1, hi0), j = hi1; i < j; ++i) {
- filters[k = index[i]] ^= one;
- added.push(k);
- }
- } else if (hi1 < hi0) {
- for (i = Math.max(lo0, hi1), j = hi0; i < j; ++i) {
- filters[k = index[i]] ^= one;
- removed.push(k);
- }
- }
-
- lo0 = lo1;
- hi0 = hi1;
- filterListeners.forEach(function(l) { l(one, added, removed); });
- return dimension;
- }
-
- // Filters this dimension using the specified range, value, or null.
- // If the range is null, this is equivalent to filterAll.
- // If the range is an array, this is equivalent to filterRange.
- // Otherwise, this is equivalent to filterExact.
- function filter(range) {
- return range == null
- ? filterAll() : Array.isArray(range)
- ? filterRange(range)
- : filterExact(range);
- }
-
- // Filters this dimension to select the exact value.
- function filterExact(value) {
- return filterIndex((refilter = crossfilter_filterExact(bisect, value))(values));
- }
-
- // Filters this dimension to select the specified range [lo, hi].
- // The lower bound is inclusive, and the upper bound is exclusive.
- function filterRange(range) {
- return filterIndex((refilter = crossfilter_filterRange(bisect, range))(values));
- }
-
- // Clears any filters on this dimension.
- function filterAll() {
- return filterIndex((refilter = crossfilter_filterAll)(values));
- }
-
- // Returns the top K selected records, based on this dimension's order.
- // Note: observes this dimension's filter, unlike group and groupAll.
- function top(k) {
- var array = [],
- i = hi0,
- j;
-
- while (--i >= lo0 && k > 0) {
- if (!filters[j = index[i]]) {
- array.push(data[j]);
- --k;
- }
- }
-
- return array;
- }
-
- // Adds a new group to this dimension, using the specified key function.
- function group(key) {
- var group = {
- top: top,
- all: all,
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- order: order,
- orderNatural: orderNatural,
- size: size
- };
-
- var groups, // array of {key, value}
- groupIndex, // object id ↦ group id
- groupWidth = 8,
- groupCapacity = crossfilter_capacity(groupWidth),
- k = 0, // cardinality
- select,
- heap,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- update = crossfilter_null,
- reset = crossfilter_null,
- resetNeeded = true;
-
- if (arguments.length < 1) key = crossfilter_identity;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the associated reduce values. It must also listen to
- // the parent dimension for when data is added, and compute new keys.
- filterListeners.push(update);
- indexListeners.push(add);
-
- // Incorporate any existing data into the grouping.
- add(values, index, 0, n);
-
- // Incorporates the specified new values into this group.
- // This function is responsible for updating groups and groupIndex.
- function add(newValues, newIndex, n0, n1) {
- var oldGroups = groups,
- reIndex = crossfilter_index(k, groupCapacity),
- add = reduceAdd,
- initial = reduceInitial,
- k0 = k, // old cardinality
- i0 = 0, // index of old group
- i1 = 0, // index of new record
- j, // object id
- g0, // old group
- x0, // old key
- x1, // new key
- g, // group to add
- x; // key of group to add
-
- // If a reset is needed, we don't need to update the reduce values.
- if (resetNeeded) add = initial = crossfilter_null;
-
- // Reset the new groups (k is a lower bound).
- // Also, make sure that groupIndex exists and is long enough.
- groups = new Array(k), k = 0;
- groupIndex = k0 > 1 ? crossfilter_arrayLengthen(groupIndex, n) : crossfilter_index(n, groupCapacity);
-
- // Get the first old key (x0 of g0), if it exists.
- if (k0) x0 = (g0 = oldGroups[0]).key;
-
- // Find the first new key (x1), skipping NaN keys.
- while (i1 < n1 && !((x1 = key(newValues[i1])) >= x1)) ++i1;
-
- // While new keys remain…
- while (i1 < n1) {
-
- // Determine the lesser of the two current keys; new and old.
- // If there are no old keys remaining, then always add the new key.
- if (g0 && x0 <= x1) {
- g = g0, x = x0;
-
- // Record the new index of the old group.
- reIndex[i0] = k;
-
- // Retrieve the next old key.
- if (g0 = oldGroups[++i0]) x0 = g0.key;
- } else {
- g = {key: x1, value: initial()}, x = x1;
- }
-
- // Add the lesser group.
- groups[k] = g;
-
- // Add any selected records belonging to the added group, while
- // advancing the new key and populating the associated group index.
- while (!(x1 > x)) {
- groupIndex[j = newIndex[i1] + n0] = k;
- if (!(filters[j] & zero)) g.value = add(g.value, data[j]);
- if (++i1 >= n1) break;
- x1 = key(newValues[i1]);
- }
-
- groupIncrement();
- }
-
- // Add any remaining old groups that were greater than all new keys.
- // No incremental reduce is needed; these groups have no new records.
- // Also record the new index of the old group.
- while (i0 < k0) {
- groups[reIndex[i0] = k] = oldGroups[i0++];
- groupIncrement();
- }
-
- // If we added any new groups before any old groups,
- // update the group index of all the old records.
- if (k > i0) for (i0 = 0; i0 < n0; ++i0) {
- groupIndex[i0] = reIndex[groupIndex[i0]];
- }
-
- // Modify the update and reset behavior based on the cardinality.
- // If the cardinality is less than or equal to one, then the groupIndex
- // is not needed. If the cardinality is zero, then there are no records
- // and therefore no groups to update or reset. Note that we also must
- // change the registered listener to point to the new method.
- j = filterListeners.indexOf(update);
- if (k > 1) {
- update = updateMany;
- reset = resetMany;
- } else {
- if (k === 1) {
- update = updateOne;
- reset = resetOne;
- } else {
- update = crossfilter_null;
- reset = crossfilter_null;
- }
- groupIndex = null;
- }
- filterListeners[j] = update;
-
- // Count the number of added groups,
- // and widen the group index as needed.
- function groupIncrement() {
- if (++k === groupCapacity) {
- reIndex = crossfilter_arrayWiden(reIndex, groupWidth <<= 1);
- groupIndex = crossfilter_arrayWiden(groupIndex, groupWidth);
- groupCapacity = crossfilter_capacity(groupWidth);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is greater than 1.
- function updateMany(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g = groups[groupIndex[k]];
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g = groups[groupIndex[k]];
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- // This function is only used when the cardinality is 1.
- function updateOne(filterOne, added, removed) {
- if (filterOne === one || resetNeeded) return;
-
- var i,
- k,
- n,
- g = groups[0];
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!(filters[k = added[i]] & zero)) {
- g.value = reduceAdd(g.value, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if ((filters[k = removed[i]] & zero) === filterOne) {
- g.value = reduceRemove(g.value, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is greater than 1.
- function resetMany() {
- var i,
- g;
-
- // Reset all group values.
- for (i = 0; i < k; ++i) {
- groups[i].value = reduceInitial();
- }
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g = groups[groupIndex[i]];
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Recomputes the group reduce values from scratch.
- // This function is only used when the cardinality is 1.
- function resetOne() {
- var i,
- g = groups[0];
-
- // Reset the singleton group values.
- g.value = reduceInitial();
-
- // Add any selected records.
- for (i = 0; i < n; ++i) {
- if (!(filters[i] & zero)) {
- g.value = reduceAdd(g.value, data[i]);
- }
- }
- }
-
- // Returns the array of group values, in the dimension's natural order.
- function all() {
- if (resetNeeded) reset(), resetNeeded = false;
- return groups;
- }
-
- // Returns a new array containing the top K group values, in reduce order.
- function top(k) {
- var top = select(all(), 0, groups.length, k);
- return heap.sort(top, 0, top.length);
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce values, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Sets the reduce order, using the specified accessor.
- function order(value) {
- select = heapselect_by(valueOf);
- heap = heap_by(valueOf);
- function valueOf(d) { return value(d.value); }
- return group;
- }
-
- // A convenience method for natural ordering by reduce value.
- function orderNatural() {
- return order(crossfilter_identity);
- }
-
- // Returns the cardinality of this group, irrespective of any filters.
- function size() {
- return k;
- }
-
- return reduceCount().orderNatural();
- }
-
- // A convenience function for generating a singleton group.
- function groupAll() {
- var g = group(crossfilter_null), all = g.all;
- delete g.all;
- delete g.top;
- delete g.order;
- delete g.orderNatural;
- delete g.size;
- g.value = function() { return all()[0].value; };
- return g;
- }
-
- return dimension;
- }
-
- // A convenience method for groupAll on a dummy dimension.
- // This implementation can be optimized since it is always cardinality 1.
- function groupAll() {
- var group = {
- reduce: reduce,
- reduceCount: reduceCount,
- reduceSum: reduceSum,
- value: value
- };
-
- var reduceValue,
- reduceAdd,
- reduceRemove,
- reduceInitial,
- resetNeeded = true;
-
- // The group listens to the crossfilter for when any dimension changes, so
- // that it can update the reduce value. It must also listen to the parent
- // dimension for when data is added.
- filterListeners.push(update);
- dataListeners.push(add);
-
- // For consistency; actually a no-op since resetNeeded is true.
- add(data, 0, n);
-
- // Incorporates the specified new values into this group.
- function add(newData, n0, n1) {
- var i;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = n0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Reduces the specified selected or deselected records.
- function update(filterOne, added, removed) {
- var i,
- k,
- n;
-
- if (resetNeeded) return;
-
- // Add the added values.
- for (i = 0, n = added.length; i < n; ++i) {
- if (!filters[k = added[i]]) {
- reduceValue = reduceAdd(reduceValue, data[k]);
- }
- }
-
- // Remove the removed values.
- for (i = 0, n = removed.length; i < n; ++i) {
- if (filters[k = removed[i]] === filterOne) {
- reduceValue = reduceRemove(reduceValue, data[k]);
- }
- }
- }
-
- // Recomputes the group reduce value from scratch.
- function reset() {
- var i;
-
- reduceValue = reduceInitial();
-
- for (i = 0; i < n; ++i) {
- if (!filters[i]) {
- reduceValue = reduceAdd(reduceValue, data[i]);
- }
- }
- }
-
- // Sets the reduce behavior for this group to use the specified functions.
- // This method lazily recomputes the reduce value, waiting until needed.
- function reduce(add, remove, initial) {
- reduceAdd = add;
- reduceRemove = remove;
- reduceInitial = initial;
- resetNeeded = true;
- return group;
- }
-
- // A convenience method for reducing by count.
- function reduceCount() {
- return reduce(crossfilter_reduceIncrement, crossfilter_reduceDecrement, crossfilter_zero);
- }
-
- // A convenience method for reducing by sum(value).
- function reduceSum(value) {
- return reduce(crossfilter_reduceAdd(value), crossfilter_reduceSubtract(value), crossfilter_zero);
- }
-
- // Returns the computed reduce value.
- function value() {
- if (resetNeeded) reset(), resetNeeded = false;
- return reduceValue;
- }
-
- return reduceCount();
- }
-
- // Returns the number of records in this crossfilter, irrespective of any filters.
- function size() {
- return n;
- }
-
- return arguments.length
- ? add(arguments[0])
- : crossfilter;
-}
-
-// Returns an array of size n, big enough to store ids up to m.
-function crossfilter_index(n, m) {
- return (m < 0x101
- ? crossfilter_array8 : m < 0x10001
- ? crossfilter_array16
- : crossfilter_array32)(n);
-}
-
-// Constructs a new array of size n, with sequential values from 0 to n - 1.
-function crossfilter_range(n) {
- var range = crossfilter_index(n, n);
- for (var i = -1; ++i < n;) range[i] = i;
- return range;
-}
-
-function crossfilter_capacity(w) {
- return w === 8
- ? 0x100 : w === 16
- ? 0x10000
- : 0x100000000;
-}
-})(this);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.min.js
deleted file mode 100644
index 981f0d64..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/crossfilter.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(a){function b(a){return a}function c(a,b){for(var c=0,d=b.length,e=new Array(d);c<d;++c)e[c]=a[b[c]];return e}function e(a){function b(b,c,d,e){while(d<e){var f=d+e>>1;a(b[f])<c?d=f+1:e=f}return d}function c(b,c,d,e){while(d<e){var f=d+e>>1;c<a(b[f])?e=f:d=f+1}return d}return c.right=c,c.left=b,c}function g(a){function b(a,b,c){var e=c-b,f=(e>>>1)+1;while(--f>0)d(a,f,e,b);return a}function c(a,b,c){var e=c-b,f;while(--e>0)f=a[b],a[b]=a[b+e],a[b+e]=f,d(a,1,e,b);return a}function d(b,c,d,e){var f=b[--e+c],g=a(f),h;while((h=c<<1)<=d){h<d&&a(b[e+h])>a(b[e+h+1])&&h++;if(g<=a(b[e+h]))break;b[e+c]=b[e+h],c=h}b[e+c]=f}return b.sort=c,b}function i(a){function c(c,d,e,f){var g=new Array(f=Math.min(e-d,f)),h,i,j,k;for(i=0;i<f;++i)g[i]=c[d++];b(g,0,f);if(d<e){h=a(g[0]);do if(j=a(k=c[d])>h)g[0]=k,h=a(b(g,0,f)[0]);while(++d<e)}return g}var b=g(a);return c}function k(a){function b(b,c,d){for(var e=c+1;e<d;++e){for(var f=e,g=b[e],h=a(g);f>c&&a(b[f-1])>h;--f)b[f]=b[f-1];b[f]=g}return b}return b}function m(a){function c(a,c,e){return(e-c<n?b:d)(a,c,e)}function d(b,d,e){var f=(e-d)/6|0,g=d+f,h=e-1-f,i=d+e-1>>1,j=i-f,k=i+f,l=b[g],m=a(l),n=b[j],o=a(n),p=b[i],q=a(p),r=b[k],s=a(r),t=b[h],u=a(t),v;m>o&&(v=l,l=n,n=v,v=m,m=o,o=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v),m>q&&(v=l,l=p,p=v,v=m,m=q,q=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),m>s&&(v=l,l=r,r=v,v=m,m=s,s=v),q>s&&(v=p,p=r,r=v,v=q,q=s,s=v),o>u&&(v=n,n=t,t=v,v=o,o=u,u=v),o>q&&(v=n,n=p,p=v,v=o,o=q,q=v),s>u&&(v=r,r=t,t=v,v=s,s=u,u=v);var w=n,x=o,y=r,z=s;b[g]=l,b[j]=b[d],b[i]=p,b[k]=b[e-1],b[h]=t;var A=d+1,B=e-2,C=x<=z&&x>=z;if(C)for(var D=A;D<=B;++D){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>x)for(;;){var G=a(b[B]);if(G>x){B--;continue}if(G<x){b[D]=b[A],b[A++]=b[B],b[B--]=E;break}b[D]=b[B],b[B--]=E;break}}else for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<x)D!==A&&(b[D]=b[A],b[A]=E),++A;else if(F>z)for(;;){var G=a(b[B]);if(G>z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}b[d]=b[A-1],b[A-1]=w,b[e-1]=b[B+1],b[B+1]=y,c(b,d,A-1),c(b,B+2,e);if(C)return b;if(A<g&&B>h){var H,G;while((H=a(b[A]))<=x&&H>=x)++A;while((G=a(b[B]))<=z&&G>=z)--B;for(var D=A;D<=B;D++){var E=b[D],F=a(E);if(F<=x&&F>=x)D!==A&&(b[D]=b[A],b[A]=E),A++;else if(F<=z&&F>=z)for(;;){var G=a(b[B]);if(G<=z&&G>=z){B--;if(B<D)break;continue}G<x?(b[D]=b[A],b[A++]=b[B],b[B--]=E):(b[D]=b[B],b[B--]=E);break}}}return c(b,A,B+1)}var b=k(a);return c}function t(a){return new Array(a)}function u(a,b){return function(c){var d=c.length;return[a.left(c,b,0,d),a.right(c,b,0,d)]}}function v(a,b){var c=b[0],d=b[1];return function(b){var e=b.length;return[a.left(b,c,0,e),a.left(b,d,0,e)]}}function w(a){return[0,a.length]}function x(){return null}function y(){return 0}function z(a){return a+1}function A(a){return a-1}function B(a){return function(b,c){return b+ +a(c)}}function C(a){return function(b,c){return b-a(c)}}function D(){function p(b){var c=f,d=b.length;return d&&(e=e.concat(b),k=r(k,f+=d),n.forEach(function(a){a(b,c,d)})),a}function q(a){function P(b,d,e){H=b.map(a),I=J(F(e),0,e),H=c(H,I);var g=K(H),h=g[0],i=g[1],j;for(j=0;j<h;++j)k[I[j]+d]|=p;for(j=i;j<e;++j)k[I[j]+d]|=p;if(!d){t=H,D=I,N=h,O=i;return}var l=t,m=D,n=0,o=0;t=new Array(f),D=E(f,f);for(j=0;n<d&&o<e;++j)l[n]<H[o]?(t[j]=l[n],D[j]=m[n++]):(t[j]=H[o],D[j]=I[o++]+d);for(;n<d;++n,++j)t[j]=l[n],D[j]=m[n];for(;o<e;++o,++j)t[j]=H[o],D[j]=I[o]+d;g=K(t),N=g[0],O=g[1]}function Q(a,b,c){L.forEach(function(a){a(H,I,b,c)}),H=I=null}function R(a){var b,c,d,e=a[0],f=a[1],g=[],h=[];if(e<N)for(b=e,c=Math.min(N,f);b<c;++b)k[d=D[b]]^=p,g.push(d);else if(e>N)for(b=N,c=Math.min(e,O);b<c;++b)k[d=D[b]]^=p,h.push(d);if(f>O)for(b=Math.max(e,O),c=f;b<c;++b)k[d=D[b]]^=p,g.push(d);else if(f<O)for(b=Math.max(N,f),c=O;b<c;++b)k[d=D[b]]^=p,h.push(d);return N=e,O=f,l.forEach(function(a){a(p,g,h)}),o}function S(a){return a==null?V():Array.isArray(a)?U(a):T(a)}function T(a){return R((K=u(d,a))(t))}function U(a){return R((K=v(d,a))(t))}function V(){return R((K=w)(t))}function W(a){var b=[],c=O,d;while(--c>=N&&a>0)k[d=D[c]]||(b.push(e[d]),--a);return b}function X(a){function K(b,c,g,i){function Q(){++n===m&&(p=s(p,j<<=1),h=s(h,j),m=G(j))}var o=d,p=E(n,m),t=v,u=F,w=n,y=0,z=0,A,B,C,D,K,L;J&&(t=u=x),d=new Array(n),n=0,h=w>1?r(h,f):E(f,m),w&&(C=(B=o[0]).key);while(z<i&&!((D=a(b[z]))>=D))++z;while(z<i){if(B&&C<=D){K=B,L=C,p[y]=n;if(B=o[++y])C=B.key}else K={key:D,value:u()},L=D;d[n]=K;while(!(D>L)){h[A=c[z]+g]=n,k[A]&q||(K.value=t(K.value,e[A]));if(++z>=i)break;D=a(b[z])}Q()}while(y<w)d[p[y]=n]=o[y++],Q();if(n>y)for(y=0;y<g;++y)h[y]=p[h[y]];A=l.indexOf(H),n>1?(H=M,I=O):(n===1?(H=N,I=P):(H=x,I=x),h=null),l[A]=H}function M(a,b,c){if(a===p||J)return;var f,g,i,j;for(f=0,i=b.length;f<i;++f)k[g=b[f]]&q||(j=d[h[g]],j.value=v(j.value,e[g]));for(f=0,i=c.length;f<i;++f)(k[g=c[f]]&q)===a&&(j=d[h[g]],j.value=w(j.value,e[g]))}function N(a,b,c){if(a===p||J)return;var f,g,h,i=d[0];for(f=0,h=b.length;f<h;++f)k[g=b[f]]&q||(i.value=v(i.value,e[g]));for(f=0,h=c.length;f<h;++f)(k[g=c[f]]&q)===a&&(i.value=w(i.value,e[g]))}function O(){var a,b;for(a=0;a<n;++a)d[a].value=F();for(a=0;a<f;++a)k[a]&q||(b=d[h[a]],b.value=v(b.value,e[a]))}function P(){var a,b=d[0];b.value=F();for(a=0;a<f;++a)k[a]&q||(b.value=v(b.value,e[a]))}function Q(){return J&&(I(),J=!1),d}function R(a){var b=o(Q(),0,d.length,a);return u.sort(b,0,b.length)}function S(a,b,d){return v=a,w=b,F=d,J=!0,c}function T(){return S(z,A,y)}function U(a){return S(B(a),C(a),y)}function V(a){function b(b){return a(b.value)}return o=i(b),u=g(b),c}function W(){return V(b)}function X(){return n}var c={top:R,all:Q,reduce:S,reduceCount:T,reduceSum:U,order:V,orderNatural:W,size:X},d,h,j=8,m=G(j),n=0,o,u,v,w,F,H=x,I=x,J=!0;return arguments.length<1&&(a=b),l.push(H),L.push(K),K(t,D,0,f),T().orderNatural()}function Y(){var a=X(x),b=a.all;return delete a.all,delete a.top,delete a.order,delete a.orderNatural,delete a.size,a.value=function(){return b()[0].value},a}var o={filter:S,filterExact:T,filterRange:U,filterAll:V,top:W,group:X,groupAll:Y},p=1<<h++,q=~p,t,D,H,I,J=m(function(a){return H[a]}),K=w,L=[],N=0,O=0;return n.unshift(P),n.push(Q),h>j&&(k=s(k,j<<=1)),P(e,0,f),Q(e,0,f),o}function t(){function i(a,d,g){var i;if(h)return;for(i=d;i<f;++i)k[i]||(b=c(b,e[i]))}function j(a,f,g){var i,j,l;if(h)return;for(i=0,l=f.length;i<l;++i)k[j=f[i]]||(b=c(b,e[j]));for(i=0,l=g.length;i<l;++i)k[j=g[i]]===a&&(b=d(b,e[j]))}function m(){var a;b=g();for(a=0;a<f;++a)k[a]||(b=c(b,e[a]))}function o(b,e,f){return c=b,d=e,g=f,h=!0,a}function p(){return o(z,A,y)}function q(a){return o(B(a),C(a),y)}function r(){return h&&(m(),h=!1),b}var a={reduce:o,reduceCount:p,reduceSum:q,value:r},b,c,d,g,h=!0;return l.push(j),n.push(i),i(e,0,f),p()}function D(){return f}var a={add:p,dimension:q,groupAll:t,size:D},e=[],f=0,h=0,j=8,k=o(0),l=[],n=[];return arguments.length?p(arguments[0]):a}function E(a,b){return(b<257?o:b<65537?p:q)(a)}function F(a){var b=E(a,a);for(var c=-1;++c<a;)b[c]=c;return b}function G(a){return a===8?256:a===16?65536:4294967296}D.version="1.0.3",D.permute=c;var d=D.bisect=e(b);d.by=e;var f=D.heap=g(b);f.by=g;var h=D.heapselect=i(b);h.by=i;var j=D.insertionsort=k(b);j.by=k;var l=D.quicksort=m(b);l.by=m;var n=32,o=t,p=t,q=t,r=b,s=b;typeof Uint8Array!="undefined"&&(o=function(a){return new Uint8Array(a)},p=function(a){return new Uint16Array(a)},q=function(a){return new Uint32Array(a)},r=function(a,b){var c=new a.constructor(b);return c.set(a),c},s=function(a,b){var c;switch(b){case 16:c=p(a.length);break;case 32:c=q(a.length);break;default:throw new Error("invalid array width!")}return c.set(a),c}),a.crossfilter=D})(this); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.js
deleted file mode 100644
index 250d9767..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.js
+++ /dev/null
@@ -1,3015 +0,0 @@
-(function(){d3 = {version: "1.8.5"}; // semver
-if (!Date.now) Date.now = function() {
- return +new Date();
-};
-if (!Object.create) Object.create = function(o) {
- /** @constructor */ function f() {}
- f.prototype = o;
- return new f();
-};
-var d3_array = d3_arraySlice; // conversion for NodeLists
-
-function d3_arrayCopy(psuedoarray) {
- var i = -1, n = psuedoarray.length, array = [];
- while (++i < n) array.push(psuedoarray[i]);
- return array;
-}
-
-function d3_arraySlice(psuedoarray) {
- return Array.prototype.slice.call(psuedoarray);
-}
-
-try {
- d3_array(document.documentElement.childNodes)[0].nodeType;
-} catch(e) {
- d3_array = d3_arrayCopy;
-}
-function d3_functor(v) {
- return typeof v == "function" ? v : function() { return v; };
-}
-// A getter-setter method that preserves the appropriate `this` context.
-d3.rebind = function(object, method) {
- return function() {
- var x = method.apply(object, arguments);
- return arguments.length ? object : x;
- };
-};
-d3.ascending = function(a, b) {
- return a < b ? -1 : a > b ? 1 : 0;
-};
-d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : 0;
-};
-d3.min = function(array, f) {
- var i = 0,
- n = array.length,
- a = array[0],
- b;
- if (arguments.length == 1) {
- while (++i < n) if (a > (b = array[i])) a = b;
- } else {
- a = f(array[0]);
- while (++i < n) if (a > (b = f(array[i]))) a = b;
- }
- return a;
-};
-d3.max = function(array, f) {
- var i = 0,
- n = array.length,
- a = array[0],
- b;
- if (arguments.length == 1) {
- while (++i < n) if (a < (b = array[i])) a = b;
- } else {
- a = f(a);
- while (++i < n) if (a < (b = f(array[i]))) a = b;
- }
- return a;
-};
-d3.nest = function() {
- var nest = {},
- keys = [],
- sortKeys = [],
- sortValues,
- rollup;
-
- function map(array, depth) {
- if (depth >= keys.length) return rollup
- ? rollup.call(nest, array) : (sortValues
- ? array.sort(sortValues)
- : array);
-
- var i = -1,
- n = array.length,
- key = keys[depth++],
- keyValue,
- object,
- o = {};
-
- while (++i < n) {
- if ((keyValue = key(object = array[i])) in o) {
- o[keyValue].push(object);
- } else {
- o[keyValue] = [object];
- }
- }
-
- for (keyValue in o) {
- o[keyValue] = map(o[keyValue], depth);
- }
-
- return o;
- }
-
- function entries(map, depth) {
- if (depth >= keys.length) return map;
-
- var a = [],
- sortKey = sortKeys[depth++],
- key;
-
- for (key in map) {
- a.push({key: key, values: entries(map[key], depth)});
- }
-
- if (sortKey) a.sort(function(a, b) {
- return sortKey(a.key, b.key);
- });
-
- return a;
- }
-
- nest.map = function(array) {
- return map(array, 0);
- };
-
- nest.entries = function(array) {
- return entries(map(array, 0), 0);
- };
-
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
-
- // Specifies the order for the most-recently specified key.
- // Note: only applies to entries. Map keys are unordered!
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
-
- // Specifies the order for leaf values.
- // Applies to both maps and entries array.
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
-
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
-
- return nest;
-};
-d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
-};
-d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
-};
-d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({key: key, value: map[key]});
- return entries;
-};
-d3.merge = function(arrays) {
- return Array.prototype.concat.apply([], arrays);
-};
-d3.split = function(array, f) {
- var arrays = [],
- values = [],
- value,
- i = -1,
- n = array.length;
- if (arguments.length < 2) f = d3_splitter;
- while (++i < n) {
- if (f.call(values, value = array[i], i)) {
- values = [];
- } else {
- if (!values.length) arrays.push(values);
- values.push(value);
- }
- }
- return arrays;
-};
-
-function d3_splitter(d) {
- return d == null;
-}
-function d3_collapse(s) {
- return s.replace(/(^\s+)|(\s+$)/g, "").replace(/\s+/g, " ");
-}
-//
-// Note: assigning to the arguments array simultaneously changes the value of
-// the corresponding argument!
-//
-// TODO The `this` argument probably shouldn't be the first argument to the
-// callback, anyway, since it's redundant. However, that will require a major
-// version bump due to backwards compatibility, so I'm not changing it right
-// away.
-//
-function d3_call(callback) {
- callback.apply(this, (arguments[0] = this, arguments));
- return this;
-}
-/**
- * @param {number} start
- * @param {number=} stop
- * @param {number=} step
- */
-d3.range = function(start, stop, step) {
- if (arguments.length == 1) { stop = start; start = 0; }
- if (step == null) step = 1;
- if ((stop - start) / step == Infinity) throw new Error("infinite range");
- var range = [],
- i = -1,
- j;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j);
- else while ((j = start + step * ++i) < stop) range.push(j);
- return range;
-};
-d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
-};
-
-var d3_requote_re = /[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g;
-d3.xhr = function(url, mime, callback) {
- var req = new XMLHttpRequest();
- if (arguments.length < 3) callback = mime;
- else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
- req.open("GET", url, true);
- req.onreadystatechange = function() {
- if (req.readyState == 4) callback(req.status < 300 ? req : null);
- };
- req.send(null);
-};
-d3.text = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseText);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
-};
-d3.json = function(url, callback) {
- d3.text(url, "application/json", function(text) {
- callback(text ? JSON.parse(text) : null);
- });
-};
-d3.html = function(url, callback) {
- d3.text(url, "text/html", function(text) {
- if (text != null) { // Treat empty string as valid HTML.
- var range = document.createRange();
- range.selectNode(document.body);
- text = range.createContextualFragment(text);
- }
- callback(text);
- });
-};
-d3.xml = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseXML);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
-};
-d3.ns = {
-
- prefix: {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- },
-
- qualify: function(name) {
- var i = name.indexOf(":");
- return i < 0 ? name : {
- space: d3.ns.prefix[name.substring(0, i)],
- local: name.substring(i + 1)
- };
- }
-
-};
-/** @param {...string} types */
-d3.dispatch = function(types) {
- var dispatch = {},
- type;
- for (var i = 0, n = arguments.length; i < n; i++) {
- type = arguments[i];
- dispatch[type] = d3_dispatch(type);
- }
- return dispatch;
-};
-
-function d3_dispatch(type) {
- var dispatch = {},
- listeners = [];
-
- dispatch.add = function(listener) {
- for (var i = 0; i < listeners.length; i++) {
- if (listeners[i].listener == listener) return dispatch; // already registered
- }
- listeners.push({listener: listener, on: true});
- return dispatch;
- };
-
- dispatch.remove = function(listener) {
- for (var i = 0; i < listeners.length; i++) {
- var l = listeners[i];
- if (l.listener == listener) {
- l.on = false;
- listeners = listeners.slice(0, i).concat(listeners.slice(i + 1));
- break;
- }
- }
- return dispatch;
- };
-
- dispatch.dispatch = function() {
- var ls = listeners; // defensive reference
- for (var i = 0, n = ls.length; i < n; i++) {
- var l = ls[i];
- if (l.on) l.listener.apply(this, arguments);
- }
- };
-
- return dispatch;
-};
-// TODO align, type
-d3.format = function(specifier) {
- var match = d3_format_re.exec(specifier),
- fill = match[1] || " ",
- sign = match[3] || "",
- zfill = match[5],
- width = +match[6],
- comma = match[7],
- precision = match[8],
- type = match[9];
- if (precision) precision = precision.substring(1);
- if (zfill) {
- fill = "0"; // TODO align = "=";
- if (comma) width -= Math.floor((width - 1) / 4);
- }
- if (type == "d") precision = "0";
- return function(value) {
- var number = +value,
- negative = (number < 0) && (number = -number) ? "\u2212" : sign;
-
- // Return the empty string for floats formatted as ints.
- if ((type == "d") && (number % 1)) return "";
-
- // Convert the input value to the desired precision.
- if (precision) value = number.toFixed(precision);
- else value = "" + number;
-
- // If the fill character is 0, the sign and group is applied after the fill.
- if (zfill) {
- var length = value.length + negative.length;
- if (length < width) value = new Array(width - length + 1).join(fill) + value;
- if (comma) value = d3_format_group(value);
- value = negative + value;
- }
-
- // Otherwise (e.g., space-filling), the sign and group is applied before.
- else {
- if (comma) value = d3_format_group(value);
- value = negative + value;
- var length = value.length;
- if (length < width) value = new Array(width - length + 1).join(fill) + value;
- }
-
- return value;
- };
-};
-
-// [[fill]align][sign][#][0][width][,][.precision][type]
-var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
-
-// Apply comma grouping for thousands.
-function d3_format_group(value) {
- var i = value.lastIndexOf("."),
- f = i >= 0 ? value.substring(i) : (i = value.length, ""),
- t = [];
- while (i > 0) t.push(value.substring(i -= 3, i + 3));
- return t.reverse().join(",") + f;
-}
-/*
- * TERMS OF USE - EASING EQUATIONS
- *
- * Open source under the BSD License.
- *
- * Copyright 2001 Robert Penner
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * - Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * - Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * - Neither the name of the author nor the names of contributors may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-
-var d3_ease_quad = d3_ease_poly(2),
- d3_ease_cubic = d3_ease_poly(3);
-
-var d3_ease = {
- linear: function() { return d3_ease_linear; },
- poly: d3_ease_poly,
- quad: function() { return d3_ease_quad; },
- cubic: function() { return d3_ease_cubic; },
- sin: function() { return d3_ease_sin; },
- exp: function() { return d3_ease_exp; },
- circle: function() { return d3_ease_circle; },
- elastic: d3_ease_elastic,
- back: d3_ease_back,
- bounce: function() { return d3_ease_bounce; }
-};
-
-var d3_ease_mode = {
- "in": function(f) { return f; },
- "out": d3_ease_reverse,
- "in-out": d3_ease_reflect,
- "out-in": function(f) { return d3_ease_reflect(d3_ease_reverse(f)); }
-};
-
-d3.ease = function(name) {
- var i = name.indexOf("-"),
- t = i >= 0 ? name.substring(0, i) : name,
- m = i >= 0 ? name.substring(i + 1) : "in";
- return d3_ease_mode[m](d3_ease[t].apply(null, Array.prototype.slice.call(arguments, 1)));
-};
-
-function d3_ease_reverse(f) {
- return function(t) {
- return 1 - f(1 - t);
- };
-}
-
-function d3_ease_reflect(f) {
- return function(t) {
- return .5 * (t < .5 ? f(2 * t) : (2 - f(2 - 2 * t)));
- };
-}
-
-function d3_ease_linear(t) {
- return t;
-}
-
-function d3_ease_poly(e) {
- return function(t) {
- return Math.pow(t, e);
- }
-}
-
-function d3_ease_sin(t) {
- return 1 - Math.cos(t * Math.PI / 2);
-}
-
-function d3_ease_exp(t) {
- return t ? Math.pow(2, 10 * (t - 1)) - 1e-3 : 0;
-}
-
-function d3_ease_circle(t) {
- return 1 - Math.sqrt(1 - t * t);
-}
-
-function d3_ease_elastic(a, p) {
- var s;
- if (arguments.length < 2) p = 0.45;
- if (arguments.length < 1) { a = 1; s = p / 4; }
- else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return function(t) {
- return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
- };
-}
-
-function d3_ease_back(s) {
- if (!s) s = 1.70158;
- return function(t) {
- return t * t * ((s + 1) * t - s);
- };
-}
-
-function d3_ease_bounce(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t
- : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75
- : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375
- : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
-}
-d3.event = null;
-d3.interpolate = function(a, b) {
- if (typeof b == "number") return d3.interpolateNumber(+a, b);
- if (typeof b == "string") {
- return (b in d3_rgb_names) || /^(#|rgb\(|hsl\()/.test(b)
- ? d3.interpolateRgb(String(a), b)
- : d3.interpolateString(String(a), b);
- }
- if (b instanceof Array) return d3.interpolateArray(a, b);
- return d3.interpolateObject(a, b);
-};
-
-d3.interpolateNumber = function(a, b) {
- b -= a;
- return function(t) { return a + b * t; };
-};
-
-d3.interpolateRound = function(a, b) {
- b -= a;
- return function(t) { return Math.round(a + b * t); };
-};
-
-d3.interpolateString = function(a, b) {
- var m, // current match
- i, // current index
- j, // current index (for coallescing)
- s0 = 0, // start index of current string prefix
- s1 = 0, // end index of current string prefix
- s = [], // string constants and placeholders
- q = [], // number interpolators
- n, // q.length
- o;
-
- // Find all numbers in b.
- for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
- if (m.index) s.push(b.substring(s0, s1 = m.index));
- q.push({i: s.length, x: m[0]});
- s.push(null);
- s0 = d3_interpolate_number.lastIndex;
- }
- if (s0 < b.length) s.push(b.substring(s0));
-
- // Find all numbers in a.
- for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
- o = q[i];
- if (o.x == m[0]) { // The numbers match, so coallesce.
- if (o.i) {
- if (s[o.i + 1] == null) { // This match is followed by another number.
- s[o.i - 1] += o.x;
- s.splice(o.i, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- } else { // This match is followed by a string, so coallesce twice.
- s[o.i - 1] += o.x + s[o.i + 1];
- s.splice(o.i, 2);
- for (j = i + 1; j < n; ++j) q[j].i -= 2;
- }
- } else {
- if (s[o.i + 1] == null) { // This match is followed by another number.
- s[o.i] = o.x;
- } else { // This match is followed by a string, so coallesce twice.
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- }
- }
- q.splice(i, 1);
- n--;
- i--;
- } else {
- o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
- }
- }
-
- // Remove any numbers in b not found in a.
- while (i < n) {
- o = q.pop();
- if (s[o.i + 1] == null) { // This match is followed by another number.
- s[o.i] = o.x;
- } else { // This match is followed by a string, so coallesce twice.
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- }
- n--;
- }
-
- // Special optimization for only a single match.
- if (s.length == 1) {
- return s[0] == null ? q[0].x : function() { return b; };
- }
-
- // Otherwise, interpolate each of the numbers and rejoin the string.
- return function(t) {
- for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
-};
-
-d3.interpolateRgb = function(a, b) {
- a = d3.rgb(a);
- b = d3.rgb(b);
- var ar = a.r,
- ag = a.g,
- ab = a.b,
- br = b.r - ar,
- bg = b.g - ag,
- bb = b.b - ab;
- return function(t) {
- return "rgb(" + Math.round(ar + br * t)
- + "," + Math.round(ag + bg * t)
- + "," + Math.round(ab + bb * t)
- + ")";
- };
-};
-
-// interpolates HSL space, but outputs RGB string (for compatibility)
-d3.interpolateHsl = function(a, b) {
- a = d3.hsl(a);
- b = d3.hsl(b);
- var h0 = a.h,
- s0 = a.s,
- l0 = a.l,
- h1 = b.h - h0,
- s1 = b.s - s0,
- l1 = b.l - l0;
- return function(t) {
- return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t).toString();
- };
-};
-
-d3.interpolateArray = function(a, b) {
- var x = [],
- c = [],
- na = a.length,
- nb = b.length,
- n0 = Math.min(a.length, b.length),
- i;
- for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
- for (; i < na; ++i) c[i] = a[i];
- for (; i < nb; ++i) c[i] = b[i];
- return function(t) {
- for (i = 0; i < n0; ++i) c[i] = x[i](t);
- return c;
- };
-};
-
-d3.interpolateObject = function(a, b) {
- var i = {},
- c = {},
- k;
- for (k in a) {
- if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
- } else {
- c[k] = a[k];
- }
- }
- for (k in b) {
- if (!(k in a)) {
- c[k] = b[k];
- }
- }
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
-}
-
-var d3_interpolate_number = /[-+]?(?:\d+\.\d+|\d+\.|\.\d+|\d+)(?:[eE][-]?\d+)?/g,
- d3_interpolate_digits = /[-+]?\d*\.?\d*(?:[eE][-]?\d+)?(.*)/,
- d3_interpolate_rgb = {background: 1, fill: 1, stroke: 1};
-
-function d3_interpolateByName(n) {
- return n in d3_interpolate_rgb || /\bcolor\b/.test(n)
- ? d3.interpolateRgb
- : d3.interpolate;
-}
-/**
- * @param {number=} g
- * @param {number=} b
- */
-d3.rgb = function(r, g, b) {
- return arguments.length == 1
- ? d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb)
- : d3_rgb(~~r, ~~g, ~~b);
-};
-
-function d3_rgb(r, g, b) {
- return {r: r, g: g, b: b, toString: d3_rgb_format};
-}
-
-/** @this d3_rgb */
-function d3_rgb_format() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
-}
-
-function d3_rgb_hex(v) {
- return v < 0x10 ? "0" + v.toString(16) : v.toString(16);
-}
-
-function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, // red channel; int in [0, 255]
- g = 0, // green channel; int in [0, 255]
- b = 0, // blue channel; int in [0, 255]
- m1, // CSS color specification match
- m2, // CSS color specification type (e.g., rgb)
- name;
-
- /* Handle hsl, rgb. */
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl": {
- return hsl(
- parseFloat(m2[0]), // degrees
- parseFloat(m2[1]) / 100, // percentage
- parseFloat(m2[2]) / 100 // percentage
- );
- }
- case "rgb": {
- return rgb(
- d3_rgb_parseNumber(m2[0]),
- d3_rgb_parseNumber(m2[1]),
- d3_rgb_parseNumber(m2[2])
- );
- }
- }
- }
-
- /* Named colors. */
- if (name = d3_rgb_names[format]) return rgb(name.r, name.g, name.b);
-
- /* Hexadecimal colors: #rgb and #rrggbb. */
- if (format != null && format.charAt(0) == "#") {
- if (format.length == 4) {
- r = format.charAt(1); r += r;
- g = format.charAt(2); g += g;
- b = format.charAt(3); b += b;
- } else if (format.length == 7) {
- r = format.substring(1, 3);
- g = format.substring(3, 5);
- b = format.substring(5, 7);
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- }
-
- return rgb(r, g, b);
-}
-
-function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255),
- max = Math.max(r, g, b),
- d = max - min,
- h,
- s,
- l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0);
- else if (g == max) h = (b - r) / d + 2;
- else h = (r - g) / d + 4;
- h *= 60;
- } else {
- s = h = 0;
- }
- return d3_hsl(h, s, l);
-}
-
-function d3_rgb_parseNumber(c) { // either integer or percentage
- var f = parseFloat(c);
- return c.charAt(c.length - 1) == "%" ? Math.round(f * 2.55) : f;
-}
-
-var d3_rgb_names = {
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
-};
-
-for (var d3_rgb_name in d3_rgb_names) {
- d3_rgb_names[d3_rgb_name] = d3_rgb_parse(
- d3_rgb_names[d3_rgb_name],
- d3_rgb,
- d3_hsl_rgb);
-}
-/**
- * @param {number=} s
- * @param {number=} l
- */
-d3.hsl = function(h, s, l) {
- return arguments.length == 1
- ? d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl)
- : d3_hsl(+h, +s, +l);
-};
-
-function d3_hsl(h, s, l) {
- return {h: h, s: s, l: l, toString: d3_hsl_format};
-}
-
-/** @this d3_hsl */
-function d3_hsl_format() {
- return "hsl(" + this.h + "," + this.s * 100 + "%," + this.l * 100 + "%)";
-}
-
-function d3_hsl_rgb(h, s, l) {
- var m1,
- m2;
-
- /* Some simple corrections for h, s and l. */
- h = h % 360; if (h < 0) h += 360;
- s = s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
-
- /* From FvD 13.37, CSS Color Module Level 3 */
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
-
- function v(h) {
- if (h > 360) h -= 360;
- else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
-
- function vv(h) {
- return Math.round(v(h) * 255);
- }
-
- return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
-}
-var d3_select = function(s, n) { return n.querySelector(s); },
- d3_selectAll = function(s, n) { return d3_array(n.querySelectorAll(s)); };
-
-// Use Sizzle, if available.
-if (typeof Sizzle == "function") {
- d3_select = function(s, n) { return Sizzle(s, n)[0]; };
- d3_selectAll = function(s, n) { return Sizzle.uniqueSort(Sizzle(s, n)); };
-}
-
-var d3_root = d3_selection([[document]]);
-d3_root[0].parentNode = document.documentElement;
-
-// TODO fast singleton implementation!
-d3.select = function(selector) {
- return typeof selector == "string"
- ? d3_root.select(selector)
- : d3_selection([[selector]]); // assume node
-};
-
-d3.selectAll = function(selector) {
- return typeof selector == "string"
- ? d3_root.selectAll(selector)
- : d3_selection([d3_array(selector)]); // assume node[]
-};
-
-function d3_selection(groups) {
-
- function select(select) {
- var subgroups = [],
- subgroup,
- subnode,
- group,
- node;
- for (var j = 0, m = groups.length; j < m; j++) {
- group = groups[j];
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- subgroup.parentData = group.parentData;
- for (var i = 0, n = group.length; i < n; i++) {
- if (node = group[i]) {
- subgroup.push(subnode = select(node));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- }
-
- function selectAll(selectAll) {
- var subgroups = [],
- subgroup,
- group,
- node;
- for (var j = 0, m = groups.length; j < m; j++) {
- group = groups[j];
- for (var i = 0, n = group.length; i < n; i++) {
- if (node = group[i]) {
- subgroups.push(subgroup = selectAll(node));
- subgroup.parentNode = node;
- subgroup.parentData = node.__data__;
- }
- }
- }
- return d3_selection(subgroups);
- }
-
- // TODO select(function)?
- groups.select = function(selector) {
- return select(function(node) {
- return d3_select(selector, node);
- });
- };
-
- // TODO selectAll(function)?
- groups.selectAll = function(selector) {
- return selectAll(function(node) {
- return d3_selectAll(selector, node);
- });
- };
-
- // TODO preserve null elements to maintain index?
- groups.filter = function(filter) {
- var subgroups = [],
- subgroup,
- group,
- node;
- for (var j = 0, m = groups.length; j < m; j++) {
- group = groups[j];
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- subgroup.parentData = group.parentData;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
-
- groups.map = function(map) {
- var group,
- node;
- for (var j = 0, m = groups.length; j < m; j++) {
- group = groups[j];
- for (var i = 0, n = group.length; i < n; i++) {
- if (node = group[i]) node.__data__ = map.call(node, node.__data__, i);
- }
- }
- return groups;
- };
-
- // TODO data(null) for clearing data?
- groups.data = function(data, join) {
- var enter = [],
- update = [],
- exit = [];
-
- function bind(group, groupData) {
- var i = 0,
- n = group.length,
- m = groupData.length,
- n0 = Math.min(n, m),
- n1 = Math.max(n, m),
- updateNodes = [],
- enterNodes = [],
- exitNodes = [],
- node,
- nodeData;
-
- function enterNode(data) {
- return {__data__: data};
- }
-
- if (join) {
- var nodeByKey = {},
- exitData = [],
- keys = [],
- key,
- j = groupData.length;
-
- for (i = 0; i < n; i++) {
- key = join.call(node = group[i], node.__data__, i);
- if (key in nodeByKey) {
- exitNodes[j++] = group[i];
- } else {
- nodeByKey[key] = node;
- keys.push(key);
- }
- }
-
- for (i = 0; i < m; i++) {
- node = nodeByKey[key = join.call(groupData, nodeData = groupData[i], i)];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = enterNode(nodeData),
- updateNodes[i] = exitNodes[i] = null;
- }
- delete nodeByKey[key];
- }
-
- for (i = 0; i < n; i++) {
- if (keys[i] in nodeByKey) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (; i < n0; i++) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = enterNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- }
- for (; i < m; i++) {
- enterNodes[i] = enterNode(groupData[i]);
- updateNodes[i] = exitNodes[i] = null;
- }
- for (; i < n1; i++) {
- exitNodes[i] = group[i];
- enterNodes[i] = updateNodes[i] = null;
- }
- }
-
- enterNodes.parentNode
- = updateNodes.parentNode
- = exitNodes.parentNode
- = group.parentNode;
-
- enterNodes.parentData
- = updateNodes.parentData
- = exitNodes.parentData
- = group.parentData;
-
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
-
- var i = -1,
- n = groups.length,
- group;
- if (typeof data == "function") {
- while (++i < n) {
- bind(group = groups[i], data.call(group, group.parentData, i));
- }
- } else {
- while (++i < n) {
- bind(group = groups[i], data);
- }
- }
-
- var selection = d3_selection(update);
- selection.enter = function() {
- return d3_selectionEnter(enter);
- };
- selection.exit = function() {
- return d3_selection(exit);
- };
- return selection;
- };
-
- // TODO mask forEach? or rename for eachData?
- // TODO offer the same semantics for map, reduce, etc.?
- groups.each = function(callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- var group = groups[j];
- for (var i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) callback.call(node, node.__data__, i);
- }
- }
- return groups;
- };
-
- function first(callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- var group = groups[j];
- for (var i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return callback.call(node, node.__data__, i);
- }
- }
- return null;
- }
-
- groups.empty = function() {
- return !first(function() { return true; });
- };
-
- groups.node = function() {
- return first(function() { return this; });
- };
-
- groups.attr = function(name, value) {
- name = d3.ns.qualify(name);
-
- // If no value is specified, return the first value.
- if (arguments.length < 2) {
- return first(name.local
- ? function() { return this.getAttributeNS(name.space, name.local); }
- : function() { return this.getAttribute(name); });
- }
-
- /** @this {Element} */
- function attrNull() {
- this.removeAttribute(name);
- }
-
- /** @this {Element} */
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
-
- /** @this {Element} */
- function attrConstant() {
- this.setAttribute(name, value);
- }
-
- /** @this {Element} */
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
-
- /** @this {Element} */
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name);
- else this.setAttribute(name, x);
- }
-
- /** @this {Element} */
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local);
- else this.setAttributeNS(name.space, name.local, x);
- }
-
- return groups.each(value == null
- ? (name.local ? attrNullNS : attrNull) : (typeof value == "function"
- ? (name.local ? attrFunctionNS : attrFunction)
- : (name.local ? attrConstantNS : attrConstant)));
- };
-
- groups.classed = function(name, value) {
- var re = new RegExp("(^|\\s+)" + d3.requote(name) + "(\\s+|$)", "g");
-
- // If no value is specified, return the first value.
- if (arguments.length < 2) {
- return first(function() {
- re.lastIndex = 0;
- return re.test(this.className);
- });
- }
-
- /** @this {Element} */
- function classedAdd() {
- var classes = this.className;
- re.lastIndex = 0;
- if (!re.test(classes)) {
- this.className = d3_collapse(classes + " " + name);
- }
- }
-
- /** @this {Element} */
- function classedRemove() {
- var classes = d3_collapse(this.className.replace(re, " "));
- this.className = classes.length ? classes : null;
- }
-
- /** @this {Element} */
- function classedFunction() {
- (value.apply(this, arguments)
- ? classedAdd
- : classedRemove).call(this);
- }
-
- return groups.each(typeof value == "function"
- ? classedFunction : value
- ? classedAdd
- : classedRemove);
- };
-
- groups.style = function(name, value, priority) {
- if (arguments.length < 3) priority = null;
-
- // If no value is specified, return the first value.
- if (arguments.length < 2) {
- return first(function() {
- return window.getComputedStyle(this, null).getPropertyValue(name);
- });
- }
-
- /** @this {Element} */
- function styleNull() {
- this.style.removeProperty(name);
- }
-
- /** @this {Element} */
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
-
- /** @this {Element} */
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name);
- else this.style.setProperty(name, x, priority);
- }
-
- return groups.each(value == null
- ? styleNull : (typeof value == "function"
- ? styleFunction : styleConstant));
- };
-
- groups.property = function(name, value) {
- name = d3.ns.qualify(name);
-
- // If no value is specified, return the first value.
- if (arguments.length < 2) {
- return first(function() {
- return this[name];
- });
- }
-
- /** @this {Element} */
- function propertyNull() {
- delete this[name];
- }
-
- /** @this {Element} */
- function propertyConstant() {
- this[name] = value;
- }
-
- /** @this {Element} */
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name];
- else this[name] = x;
- }
-
- return groups.each(value == null
- ? propertyNull : (typeof value == "function"
- ? propertyFunction : propertyConstant));
- };
-
- groups.text = function(value) {
-
- // If no value is specified, return the first value.
- if (arguments.length < 1) {
- return first(function() {
- return this.textContent;
- });
- }
-
- /** @this {Element} */
- function textNull() {
- while (this.lastChild) this.removeChild(this.lastChild);
- }
-
- /** @this {Element} */
- function textConstant() {
- this.appendChild(document.createTextNode(value));
- }
-
- /** @this {Element} */
- function textFunction() {
- var x = value.apply(this, arguments);
- if (x != null) this.appendChild(document.createTextNode(x));
- }
-
- groups.each(textNull);
- return value == null ? groups
- : groups.each(typeof value == "function"
- ? textFunction : textConstant);
- };
-
- groups.html = function(value) {
-
- // If no value is specified, return the first value.
- if (arguments.length < 1) {
- return first(function() {
- return this.innerHTML;
- });
- }
-
- /** @this {Element} */
- function htmlConstant() {
- this.innerHTML = value;
- }
-
- /** @this {Element} */
- function htmlFunction() {
- this.innerHTML = value.apply(this, arguments);
- }
-
- return groups.each(typeof value == "function"
- ? htmlFunction : htmlConstant);
- };
-
- // TODO append(node)?
- // TODO append(function)?
- groups.append = function(name) {
- name = d3.ns.qualify(name);
-
- function append(node) {
- return node.appendChild(document.createElement(name));
- }
-
- function appendNS(node) {
- return node.appendChild(document.createElementNS(name.space, name.local));
- }
-
- return select(name.local ? appendNS : append);
- };
-
- // TODO insert(node, function)?
- // TODO insert(function, string)?
- // TODO insert(function, function)?
- groups.insert = function(name, before) {
- name = d3.ns.qualify(name);
-
- function insert(node) {
- return node.insertBefore(
- document.createElement(name),
- d3_select(before, node));
- }
-
- function insertNS(node) {
- return node.insertBefore(
- document.createElementNS(name.space, name.local),
- d3_select(before, node));
- }
-
- return select(name.local ? insertNS : insert);
- };
-
- // TODO remove(selector)?
- // TODO remove(node)?
- // TODO remove(function)?
- groups.remove = function() {
- return select(function(node) {
- var parent = node.parentNode;
- parent.removeChild(node);
- return parent;
- });
- };
-
- groups.sort = function(comparator) {
- comparator = d3_selection_comparator.apply(this, arguments);
- for (var j = 0, m = groups.length; j < m; j++) {
- var group = groups[j];
- group.sort(comparator);
- for (var i = 1, n = group.length, prev = group[0]; i < n; i++) {
- var node = group[i];
- if (node) {
- if (prev) prev.parentNode.insertBefore(node, prev.nextSibling);
- prev = node;
- }
- }
- }
- return groups;
- };
-
- // type can be namespaced, e.g., "click.foo"
- // listener can be null for removal
- groups.on = function(type, listener) {
-
- // parse the type specifier
- var i = type.indexOf("."),
- typo = i == -1 ? type : type.substring(0, i),
- name = "__on" + type;
-
- // remove the old event listener, and add the new event listener
- return groups.each(function(d, i) {
- if (this[name]) this.removeEventListener(typo, this[name], false);
- if (listener) this.addEventListener(typo, this[name] = l, false);
-
- // wrapped event listener that preserves d, i
- function l(e) {
- var o = d3.event; // Events can be reentrant (e.g., focus).
- d3.event = e;
- try {
- listener.call(this, d, i);
- } finally {
- d3.event = o;
- }
- }
- });
- };
-
- // TODO slice?
-
- groups.transition = function() {
- return d3_transition(groups);
- };
-
- groups.call = d3_call;
-
- return groups;
-}
-
-function d3_selectionEnter(groups) {
-
- function select(select) {
- var subgroups = [],
- subgroup,
- subnode,
- group,
- node;
- for (var j = 0, m = groups.length; j < m; j++) {
- group = groups[j];
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- subgroup.parentData = group.parentData;
- for (var i = 0, n = group.length; i < n; i++) {
- if (node = group[i]) {
- subgroup.push(subnode = select(group.parentNode));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- }
-
- // TODO append(node)?
- // TODO append(function)?
- groups.append = function(name) {
- name = d3.ns.qualify(name);
-
- function append(node) {
- return node.appendChild(document.createElement(name));
- }
-
- function appendNS(node) {
- return node.appendChild(document.createElementNS(name.space, name.local));
- }
-
- return select(name.local ? appendNS : append);
- };
-
- // TODO insert(node, function)?
- // TODO insert(function, string)?
- // TODO insert(function, function)?
- groups.insert = function(name, before) {
- name = d3.ns.qualify(name);
-
- function insert(node) {
- return node.insertBefore(
- document.createElement(name),
- d3_select(before, node));
- }
-
- function insertNS(node) {
- return node.insertBefore(
- document.createElementNS(name.space, name.local),
- d3_select(before, node));
- }
-
- return select(name.local ? insertNS : insert);
- };
-
- return groups;
-}
-
-function d3_selection_comparator(comparator) {
- if (!arguments.length) comparator = d3.ascending;
- return function(a, b) {
- return comparator(a && a.__data__, b && b.__data__);
- };
-}
-d3.transition = d3_root.transition;
-
-var d3_transitionId = 0,
- d3_transitionInheritId = 0;
-
-function d3_transition(groups) {
- var transition = {},
- transitionId = d3_transitionInheritId || ++d3_transitionId,
- tweens = {},
- interpolators = [],
- remove = false,
- event = d3.dispatch("start", "end"),
- stage = [],
- delay = [],
- duration = [],
- durationMax,
- ease = d3.ease("cubic-in-out");
-
- //
- // Be careful with concurrent transitions!
- //
- // Say transition A causes an exit. Before A finishes, a transition B is
- // created, and believes it only needs to do an update, because the elements
- // haven't been removed yet (which happens at the very end of the exit
- // transition).
- //
- // Even worse, what if either transition A or B has a staggered delay? Then,
- // some elements may be removed, while others remain. Transition B does not
- // know to enter the elements because they were still present at the time
- // the transition B was created (but not yet started).
- //
- // To prevent such confusion, we only trigger end events for transitions if
- // the transition ending is the only one scheduled for the given element.
- // Similarly, we only allow one transition to be active for any given
- // element, so that concurrent transitions do not overwrite each other's
- // properties.
- //
- // TODO Support transition namespaces, so that transitions can proceed
- // concurrently on the same element if needed. Hopefully, this is rare!
- //
-
- groups.each(function() {
- (this.__transition__ || (this.__transition__ = {})).owner = transitionId;
- });
-
- function step(elapsed) {
- var clear = true,
- k = -1;
- groups.each(function() {
- if (stage[++k] == 2) return; // ended
- var t = (elapsed - delay[k]) / duration[k],
- tx = this.__transition__,
- te, // ease(t)
- tk, // tween key
- ik = interpolators[k];
-
- // Check if the (un-eased) time is outside the range [0,1].
- if (t < 1) {
- clear = false;
- if (t < 0) return;
- } else {
- t = 1;
- }
-
- // Determine the stage of this transition.
- // 0 - Not yet started.
- // 1 - In progress.
- // 2 - Ended.
- if (stage[k]) {
- if (!tx || tx.active != transitionId) {
- stage[k] = 2;
- return;
- }
- } else if (!tx || tx.active > transitionId) {
- stage[k] = 2;
- return;
- } else {
- stage[k] = 1;
- event.start.dispatch.apply(this, arguments);
- ik = interpolators[k] = {};
- tx.active = transitionId;
- for (tk in tweens) ik[tk] = tweens[tk].apply(this, arguments);
- }
-
- // Apply the interpolators!
- te = ease(t);
- for (tk in tweens) ik[tk].call(this, te);
-
- // Handle ending transitions.
- if (t == 1) {
- stage[k] = 2;
- if (tx.active == transitionId) {
- var owner = tx.owner;
- if (owner == transitionId) {
- delete this.__transition__;
- if (remove) this.parentNode.removeChild(this);
- }
- d3_transitionInheritId = transitionId;
- event.end.dispatch.apply(this, arguments);
- d3_transitionInheritId = 0;
- tx.owner = owner;
- }
- }
- });
- return clear;
- }
-
- transition.delay = function(value) {
- var delayMin = Infinity,
- k = -1;
- if (typeof value == "function") {
- groups.each(function(d, i) {
- var x = delay[++k] = +value.apply(this, arguments);
- if (x < delayMin) delayMin = x;
- });
- } else {
- delayMin = +value;
- groups.each(function(d, i) {
- delay[++k] = delayMin;
- });
- }
- d3_timer(step, delayMin);
- return transition;
- };
-
- transition.duration = function(value) {
- var k = -1;
- if (typeof value == "function") {
- durationMax = 0;
- groups.each(function(d, i) {
- var x = duration[++k] = +value.apply(this, arguments);
- if (x > durationMax) durationMax = x;
- });
- } else {
- durationMax = +value;
- groups.each(function(d, i) {
- duration[++k] = durationMax;
- });
- }
- return transition;
- };
-
- transition.ease = function(value) {
- ease = typeof value == "function" ? value : d3.ease.apply(d3, arguments);
- return transition;
- };
-
- transition.attrTween = function(name, tween) {
-
- /** @this {Element} */
- function attrTween(d, i) {
- var f = tween.call(this, d, i, this.getAttribute(name));
- return function(t) {
- this.setAttribute(name, f(t));
- };
- }
-
- /** @this {Element} */
- function attrTweenNS(d, i) {
- var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
- return function(t) {
- this.setAttributeNS(name.space, name.local, f(t));
- };
- }
-
- tweens["attr." + name] = name.local ? attrTweenNS : attrTween;
- return transition;
- };
-
- transition.attr = function(name, value) {
- return transition.attrTween(name, d3_transitionTween(value));
- };
-
- transition.styleTween = function(name, tween, priority) {
- if (arguments.length < 3) priority = null;
-
- /** @this {Element} */
- function styleTween(d, i) {
- var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
- return function(t) {
- this.style.setProperty(name, f(t), priority);
- };
- }
-
- tweens["style." + name] = styleTween;
- return transition;
- };
-
- transition.style = function(name, value, priority) {
- if (arguments.length < 3) priority = null;
- return transition.styleTween(name, d3_transitionTween(value), priority);
- };
-
- transition.select = function(query) {
- var k, t = d3_transition(groups.select(query)).ease(ease);
- k = -1; t.delay(function(d, i) { return delay[++k]; });
- k = -1; t.duration(function(d, i) { return duration[++k]; });
- return t;
- };
-
- transition.selectAll = function(query) {
- var k, t = d3_transition(groups.selectAll(query)).ease(ease);
- k = -1; t.delay(function(d, i) { return delay[i ? k : ++k]; })
- k = -1; t.duration(function(d, i) { return duration[i ? k : ++k]; });
- return t;
- };
-
- transition.remove = function() {
- remove = true;
- return transition;
- };
-
- transition.each = function(type, listener) {
- event[type].add(listener);
- return transition;
- };
-
- transition.call = d3_call;
-
- return transition.delay(0).duration(250);
-}
-
-function d3_transitionTween(b) {
- return typeof b == "function"
- ? function(d, i, a) { return d3.interpolate(a, String(b.call(this, d, i))); }
- : (b = String(b), function(d, i, a) { return d3.interpolate(a, b); });
-}
-var d3_timer_queue = null,
- d3_timer_timeout = 0,
- d3_timer_interval;
-
-// The timer will continue to fire until callback returns true.
-d3.timer = function(callback) {
- d3_timer(callback, 0);
-};
-
-function d3_timer(callback, delay) {
- var now = Date.now(),
- found = false,
- start = now + delay,
- t0,
- t1 = d3_timer_queue;
-
- if (!isFinite(delay)) return;
-
- // Scan the queue for earliest callback.
- while (t1) {
- if (t1.callback == callback) {
- t1.then = now;
- t1.delay = delay;
- found = true;
- } else {
- var x = t1.then + t1.delay;
- if (x < start) start = x;
- }
- t0 = t1;
- t1 = t1.next;
- }
-
- // Otherwise, add the callback to the queue.
- if (!found) d3_timer_queue = {
- callback: callback,
- then: now,
- delay: delay,
- next: d3_timer_queue
- };
-
- if (!d3_timer_interval) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_start, Math.max(24, start - now));
- }
-}
-
-function d3_timer_start() {
- d3_timer_interval = 1;
- d3_timer_timeout = 0;
- d3_timer_frame(d3_timer_step);
-}
-
-function d3_timer_step() {
- var elapsed,
- now = Date.now(),
- t0 = null,
- t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (elapsed > t1.delay) t1.flush = t1.callback(elapsed);
- t1 = (t0 = t1).next;
- }
- d3_timer_flush();
- if (d3_timer_interval) d3_timer_frame(d3_timer_step);
-}
-
-// Flush after callbacks, to avoid concurrent queue modification.
-function d3_timer_flush() {
- var t0 = null,
- t1 = d3_timer_queue;
- while (t1) {
- t1 = t1.flush
- ? (t0 ? t0.next = t1.next : d3_timer_queue = t1.next)
- : (t0 = t1).next;
- }
- if (!t0) d3_timer_interval = 0;
-}
-
-var d3_timer_frame = window.requestAnimationFrame
- || window.webkitRequestAnimationFrame
- || window.mozRequestAnimationFrame
- || window.oRequestAnimationFrame
- || window.msRequestAnimationFrame
- || function(callback) { setTimeout(callback, 17); };
-d3.scale = {};
-d3.scale.linear = function() {
- var x0 = 0,
- x1 = 1,
- y0 = 0,
- y1 = 1,
- kx = 1, // 1 / (x1 - x0)
- ky = 1, // (x1 - x0) / (y1 - y0)
- interpolate = d3.interpolate,
- i = interpolate(y0, y1);
-
- function scale(x) {
- return i((x - x0) * kx);
- }
-
- // Note: requires range is coercible to number!
- scale.invert = function(y) {
- return (y - y0) * ky + x0;
- };
-
- scale.domain = function(x) {
- if (!arguments.length) return [x0, x1];
- x0 = +x[0];
- x1 = +x[1];
- kx = 1 / (x1 - x0);
- ky = (x1 - x0) / (y1 - y0);
- return scale;
- };
-
- scale.range = function(x) {
- if (!arguments.length) return [y0, y1];
- y0 = x[0];
- y1 = x[1];
- ky = (x1 - x0) / (y1 - y0);
- i = interpolate(y0, y1);
- return scale;
- };
-
- scale.rangeRound = function(x) {
- return scale.range(x).interpolate(d3.interpolateRound);
- };
-
- scale.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- i = (interpolate = x)(y0, y1);
- return scale;
- };
-
- // TODO Dates? Ugh.
- function tickRange(m) {
- var start = Math.min(x0, x1),
- stop = Math.max(x0, x1),
- span = stop - start,
- step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)),
- err = m / (span / step);
-
- // Filter ticks to get closer to the desired count.
- if (err <= .15) step *= 10;
- else if (err <= .35) step *= 5;
- else if (err <= .75) step *= 2;
-
- // Round start and stop values to step interval.
- return {
- start: Math.ceil(start / step) * step,
- stop: Math.floor(stop / step) * step + step * .5, // inclusive
- step: step
- };
- }
-
- scale.ticks = function(m) {
- var range = tickRange(m);
- return d3.range(range.start, range.stop, range.step);
- };
-
- scale.tickFormat = function(m) {
- var n = Math.max(0, -Math.floor(Math.log(tickRange(m).step) / Math.LN10 + .01));
- return d3.format(",." + n + "f");
- };
-
- return scale;
-};
-d3.scale.log = function() {
- var linear = d3.scale.linear(),
- log = d3_scale_log,
- pow = log.pow;
-
- function scale(x) {
- return linear(log(x));
- }
-
- scale.invert = function(x) {
- return pow(linear.invert(x));
- };
-
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(pow);
- log = (x[0] || x[1]) < 0 ? d3_scale_logn : d3_scale_log;
- pow = log.pow;
- linear.domain(x.map(log));
- return scale;
- };
-
- scale.range = d3.rebind(scale, linear.range);
- scale.rangeRound = d3.rebind(scale, linear.rangeRound);
- scale.interpolate = d3.rebind(scale, linear.interpolate);
-
- scale.ticks = function() {
- var d = linear.domain(),
- ticks = [];
- if (d.every(isFinite)) {
- var i = Math.floor(d[0]),
- j = Math.ceil(d[1]),
- u = pow(d[0]),
- v = pow(d[1]);
- if (log === d3_scale_logn) {
- ticks.push(pow(i));
- for (; i++ < j;) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
- } else {
- for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
- ticks.push(pow(i));
- }
- for (i = 0; ticks[i] < u; i++) {} // strip small values
- for (j = ticks.length; ticks[j - 1] > v; j--) {} // strip big values
- ticks = ticks.slice(i, j);
- }
- return ticks;
- };
-
- scale.tickFormat = function() {
- return function(d) { return d.toPrecision(1); };
- };
-
- return scale;
-};
-
-function d3_scale_log(x) {
- return Math.log(x) / Math.LN10;
-}
-
-function d3_scale_logn(x) {
- return -Math.log(-x) / Math.LN10;
-}
-
-d3_scale_log.pow = function(x) {
- return Math.pow(10, x);
-};
-
-d3_scale_logn.pow = function(x) {
- return -Math.pow(10, -x);
-};
-d3.scale.pow = function() {
- var linear = d3.scale.linear(),
- tick = d3.scale.linear(), // TODO better tick formatting...
- exponent = 1,
- powp = Number,
- powb = powp;
-
- function scale(x) {
- return linear(powp(x));
- }
-
- scale.invert = function(x) {
- return powb(linear.invert(x));
- };
-
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(powb);
- var pow = (x[0] || x[1]) < 0 ? d3_scale_pown : d3_scale_pow;
- powp = pow(exponent);
- powb = pow(1 / exponent);
- linear.domain(x.map(powp));
- tick.domain(x);
- return scale;
- };
-
- scale.range = d3.rebind(scale, linear.range);
- scale.rangeRound = d3.rebind(scale, linear.rangeRound);
- scale.interpolate = d3.rebind(scale, linear.interpolate);
- scale.ticks = tick.ticks;
- scale.tickFormat = tick.tickFormat;
-
- scale.exponent = function(x) {
- if (!arguments.length) return exponent;
- var domain = scale.domain();
- exponent = x;
- return scale.domain(domain);
- };
-
- return scale;
-};
-
-function d3_scale_pow(e) {
- return function(x) {
- return Math.pow(x, e);
- };
-}
-
-function d3_scale_pown(e) {
- return function(x) {
- return -Math.pow(-x, e);
- };
-}
-d3.scale.sqrt = function() {
- return d3.scale.pow().exponent(.5);
-};
-d3.scale.ordinal = function() {
- var domain = [],
- index = {},
- range = [],
- rangeBand = 0;
-
- function scale(x) {
- var i = x in index ? index[x] : (index[x] = domain.push(x) - 1);
- return range[i % range.length];
- }
-
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x;
- index = {};
- var i = -1, j = -1, n = domain.length; while (++i < n) {
- x = domain[i];
- if (!(x in index)) index[x] = ++j;
- }
- return scale;
- };
-
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return scale;
- };
-
- scale.rangePoints = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0],
- stop = x[1],
- step = (stop - start) / (domain.length - 1 + padding);
- range = domain.length == 1
- ? [(start + stop) / 2]
- : d3.range(start + step * padding / 2, stop + step / 2, step);
- rangeBand = 0;
- return scale;
- };
-
- scale.rangeBands = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0],
- stop = x[1],
- step = (stop - start) / (domain.length + padding);
- range = d3.range(start + step * padding, stop, step);
- rangeBand = step * (1 - padding);
- return scale;
- };
-
- scale.rangeRoundBands = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0],
- stop = x[1],
- diff = stop - start,
- step = Math.floor(diff / (domain.length + padding)),
- err = diff - (domain.length - padding) * step;
- range = d3.range(start + Math.round(err / 2), stop, step);
- rangeBand = Math.round(step * (1 - padding));
- return scale;
- };
-
- scale.rangeBand = function() {
- return rangeBand;
- };
-
- return scale;
-};
-/*
- * This product includes color specifications and designs developed by Cynthia
- * Brewer (http://colorbrewer.org/). See lib/colorbrewer for more information.
- */
-
-d3.scale.category10 = function() {
- return d3.scale.ordinal().range(d3_category10);
-};
-
-d3.scale.category20 = function() {
- return d3.scale.ordinal().range(d3_category20);
-};
-
-d3.scale.category20b = function() {
- return d3.scale.ordinal().range(d3_category20b);
-};
-
-d3.scale.category20c = function() {
- return d3.scale.ordinal().range(d3_category20c);
-};
-
-var d3_category10 = [
- "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
- "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"
-];
-
-var d3_category20 = [
- "#1f77b4", "#aec7e8",
- "#ff7f0e", "#ffbb78",
- "#2ca02c", "#98df8a",
- "#d62728", "#ff9896",
- "#9467bd", "#c5b0d5",
- "#8c564b", "#c49c94",
- "#e377c2", "#f7b6d2",
- "#7f7f7f", "#c7c7c7",
- "#bcbd22", "#dbdb8d",
- "#17becf", "#9edae5"
-];
-
-var d3_category20b = [
- "#393b79", "#5254a3", "#6b6ecf", "#9c9ede",
- "#637939", "#8ca252", "#b5cf6b", "#cedb9c",
- "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94",
- "#843c39", "#ad494a", "#d6616b", "#e7969c",
- "#7b4173", "#a55194", "#ce6dbd", "#de9ed6"
-];
-
-var d3_category20c = [
- "#3182bd", "#6baed6", "#9ecae1", "#c6dbef",
- "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2",
- "#31a354", "#74c476", "#a1d99b", "#c7e9c0",
- "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb",
- "#636363", "#969696", "#bdbdbd", "#d9d9d9"
-];
-d3.scale.quantile = function() {
- var domain = [],
- range = [],
- thresholds = [];
-
- function rescale() {
- var i = -1,
- n = thresholds.length = range.length,
- k = domain.length / n;
- while (++i < n) thresholds[i] = domain[~~(i * k)];
- }
-
- function quantile(value) {
- if (isNaN(value = +value)) return NaN;
- var low = 0, high = thresholds.length - 1;
- while (low <= high) {
- var mid = (low + high) >> 1, midValue = thresholds[mid];
- if (midValue < value) low = mid + 1;
- else if (midValue > value) high = mid - 1;
- else return mid;
- }
- return high < 0 ? 0 : high;
- }
-
- function scale(x) {
- return range[quantile(x)];
- }
-
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.filter(function(d) { return !isNaN(d); }).sort(d3.ascending);
- rescale();
- return scale;
- };
-
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- rescale();
- return scale;
- };
-
- scale.quantiles = function() {
- return thresholds;
- };
-
- return scale;
-};
-d3.scale.quantize = function() {
- var x0 = 0,
- x1 = 1,
- kx = 2,
- i = 1,
- range = [0, 1];
-
- function scale(x) {
- return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
- }
-
- scale.domain = function(x) {
- if (!arguments.length) return [x0, x1];
- x0 = x[0];
- x1 = x[1];
- kx = range.length / (x1 - x0);
- return scale;
- };
-
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- kx = range.length / (x1 - x0);
- i = range.length - 1;
- return scale;
- };
-
- return scale;
-};
-d3.svg = {};
-d3.svg.arc = function() {
- var innerRadius = d3_svg_arcInnerRadius,
- outerRadius = d3_svg_arcOuterRadius,
- startAngle = d3_svg_arcStartAngle,
- endAngle = d3_svg_arcEndAngle;
-
- function arc() {
- var r0 = innerRadius.apply(this, arguments),
- r1 = outerRadius.apply(this, arguments),
- a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset,
- a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset,
- da = a1 - a0,
- df = da < Math.PI ? "0" : "1",
- c0 = Math.cos(a0),
- s0 = Math.sin(a0),
- c1 = Math.cos(a1),
- s1 = Math.sin(a1);
- return da >= d3_svg_arcMax
- ? (r0
- ? "M0," + r1
- + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1)
- + "A" + r1 + "," + r1 + " 0 1,1 0," + r1
- + "M0," + r0
- + "A" + r0 + "," + r0 + " 0 1,1 0," + (-r0)
- + "A" + r0 + "," + r0 + " 0 1,1 0," + r0
- + "Z"
- : "M0," + r1
- + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1)
- + "A" + r1 + "," + r1 + " 0 1,1 0," + r1
- + "Z")
- : (r0
- ? "M" + r1 * c0 + "," + r1 * s0
- + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1
- + "L" + r0 * c1 + "," + r0 * s1
- + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0
- + "Z"
- : "M" + r1 * c0 + "," + r1 * s0
- + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1
- + "L0,0"
- + "Z");
- }
-
- arc.innerRadius = function(v) {
- if (!arguments.length) return innerRadius;
- innerRadius = d3_functor(v);
- return arc;
- };
-
- arc.outerRadius = function(v) {
- if (!arguments.length) return outerRadius;
- outerRadius = d3_functor(v);
- return arc;
- };
-
- arc.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return arc;
- };
-
- arc.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return arc;
- };
-
- arc.centroid = function() {
- var r = (innerRadius.apply(this, arguments)
- + outerRadius.apply(this, arguments)) / 2,
- a = (startAngle.apply(this, arguments)
- + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
- return [Math.cos(a) * r, Math.sin(a) * r];
- };
-
- return arc;
-};
-
-var d3_svg_arcOffset = -Math.PI / 2,
- d3_svg_arcMax = 2 * Math.PI - 1e-6;
-
-function d3_svg_arcInnerRadius(d) {
- return d.innerRadius;
-}
-
-function d3_svg_arcOuterRadius(d) {
- return d.outerRadius;
-}
-
-function d3_svg_arcStartAngle(d) {
- return d.startAngle;
-}
-
-function d3_svg_arcEndAngle(d) {
- return d.endAngle;
-}
-d3.svg.line = function() {
- var x = d3_svg_lineX,
- y = d3_svg_lineY,
- interpolate = "linear",
- interpolator = d3_svg_lineInterpolators[interpolate],
- tension = .7;
-
- function line(d) {
- return d.length < 1 ? null
- : "M" + interpolator(d3_svg_linePoints(this, d, x, y), tension);
- }
-
- line.x = function(v) {
- if (!arguments.length) return x;
- x = v;
- return line;
- };
-
- line.y = function(v) {
- if (!arguments.length) return y;
- y = v;
- return line;
- };
-
- line.interpolate = function(v) {
- if (!arguments.length) return interpolate;
- interpolator = d3_svg_lineInterpolators[interpolate = v];
- return line;
- };
-
- line.tension = function(v) {
- if (!arguments.length) return tension;
- tension = v;
- return line;
- };
-
- return line;
-};
-
-// Converts the specified array of data into an array of points
-// (x-y tuples), by evaluating the specified `x` and `y` functions on each
-// data point. The `this` context of the evaluated functions is the specified
-// "self" object; each function is passed the current datum and index.
-function d3_svg_linePoints(self, d, x, y) {
- var points = [],
- i = -1,
- n = d.length,
- fx = typeof x == "function",
- fy = typeof y == "function",
- value;
- if (fx && fy) {
- while (++i < n) points.push([
- x.call(self, value = d[i], i),
- y.call(self, value, i)
- ]);
- } else if (fx) {
- while (++i < n) points.push([x.call(self, d[i], i), y]);
- } else if (fy) {
- while (++i < n) points.push([x, y.call(self, d[i], i)]);
- } else {
- while (++i < n) points.push([x, y]);
- }
- return points;
-}
-
-// The default `x` property, which references d[0].
-function d3_svg_lineX(d) {
- return d[0];
-}
-
-// The default `y` property, which references d[1].
-function d3_svg_lineY(d) {
- return d[1];
-}
-
-// The various interpolators supported by the `line` class.
-var d3_svg_lineInterpolators = {
- "linear": d3_svg_lineLinear,
- "step-before": d3_svg_lineStepBefore,
- "step-after": d3_svg_lineStepAfter,
- "basis": d3_svg_lineBasis,
- "basis-closed": d3_svg_lineBasisClosed,
- "cardinal": d3_svg_lineCardinal,
- "cardinal-closed": d3_svg_lineCardinalClosed
-};
-
-// Linear interpolation; generates "L" commands.
-function d3_svg_lineLinear(points) {
- var path = [],
- i = 0,
- n = points.length,
- p = points[0];
- path.push(p[0], ",", p[1]);
- while (++i < n) path.push("L", (p = points[i])[0], ",", p[1]);
- return path.join("");
-}
-
-// Step interpolation; generates "H" and "V" commands.
-function d3_svg_lineStepBefore(points) {
- var path = [],
- i = 0,
- n = points.length,
- p = points[0];
- path.push(p[0], ",", p[1]);
- while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
- return path.join("");
-}
-
-// Step interpolation; generates "H" and "V" commands.
-function d3_svg_lineStepAfter(points) {
- var path = [],
- i = 0,
- n = points.length,
- p = points[0];
- path.push(p[0], ",", p[1]);
- while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
- return path.join("");
-}
-
-// Closed cardinal spline interpolation; generates "C" commands.
-function d3_svg_lineCardinalClosed(points, tension) {
- return points.length < 3
- ? d3_svg_lineLinear(points)
- : points[0] + d3_svg_lineHermite(points,
- d3_svg_lineCardinalTangents([points[points.length - 2]]
- .concat(points, [points[1]]), tension));
-}
-
-// Cardinal spline interpolation; generates "C" commands.
-function d3_svg_lineCardinal(points, tension, closed) {
- return points.length < 3
- ? d3_svg_lineLinear(points)
- : points[0] + d3_svg_lineHermite(points,
- d3_svg_lineCardinalTangents(points, tension));
-}
-
-// Hermite spline construction; generates "C" commands.
-function d3_svg_lineHermite(points, tangents) {
- if (tangents.length < 1
- || (points.length != tangents.length
- && points.length != tangents.length + 2)) {
- return d3_svg_lineLinear(points);
- }
-
- var quad = points.length != tangents.length,
- path = "",
- p0 = points[0],
- p = points[1],
- t0 = tangents[0],
- t = t0,
- pi = 1;
-
- if (quad) {
- path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3)
- + "," + p[0] + "," + p[1];
- p0 = points[1];
- pi = 2;
- }
-
- if (tangents.length > 1) {
- t = tangents[1];
- p = points[pi];
- pi++;
- path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1])
- + "," + (p[0] - t[0]) + "," + (p[1] - t[1])
- + "," + p[0] + "," + p[1];
- for (var i = 2; i < tangents.length; i++, pi++) {
- p = points[pi];
- t = tangents[i];
- path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1])
- + "," + p[0] + "," + p[1];
- }
- }
-
- if (quad) {
- var lp = points[pi];
- path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3)
- + "," + lp[0] + "," + lp[1];
- }
-
- return path;
-}
-
-// Generates tangents for a cardinal spline.
-function d3_svg_lineCardinalTangents(points, tension) {
- var tangents = [],
- a = (1 - tension) / 2,
- p0 = points[0],
- p1 = points[1],
- p2 = points[2],
- i = 2,
- n = points.length;
- while (++i < n) {
- tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]);
- p0 = p1;
- p1 = p2;
- p2 = points[i];
- }
- tangents.push([a * (p2[0] - p0[0]), a * (p2[1] - p0[1])]);
- return tangents;
-}
-
-// Open B-spline interpolation; generates "C" commands.
-function d3_svg_lineBasis(points) {
- if (points.length < 3) return d3_svg_lineLinear(points);
- var path = [],
- i = 1,
- n = points.length,
- pi = points[0],
- x0 = pi[0],
- y0 = pi[1],
- px = [x0, x0, x0, (pi = points[1])[0]],
- py = [y0, y0, y0, pi[1]];
- path.push(x0, ",", y0);
- d3_svg_lineBasisBezier(path, px, py);
- while (++i < n) {
- pi = points[i];
- px.shift(); px.push(pi[0]);
- py.shift(); py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- i = -1;
- while (++i < 2) {
- px.shift(); px.push(pi[0]);
- py.shift(); py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
-}
-
-// Closed B-spline interpolation; generates "C" commands.
-function d3_svg_lineBasisClosed(points) {
- var path,
- i = -1,
- n = points.length,
- m = n + 4,
- pi,
- px = [],
- py = [];
- while (++i < 4) {
- pi = points[i % n];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path = [
- d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",",
- d3_svg_lineDot4(d3_svg_lineBasisBezier3, py)
- ];
- --i; while (++i < m) {
- pi = points[i % n];
- px.shift(); px.push(pi[0]);
- py.shift(); py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
-}
-
-// Returns the dot product of the given four-element vectors.
-function d3_svg_lineDot4(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
-}
-
-// Matrix to transform basis (b-spline) control points to bezier
-// control points. Derived from FvD 11.2.8.
-var d3_svg_lineBasisBezier1 = [0, 2/3, 1/3, 0],
- d3_svg_lineBasisBezier2 = [0, 1/3, 2/3, 0],
- d3_svg_lineBasisBezier3 = [0, 1/6, 2/3, 1/6];
-
-// Pushes a "C" Bézier curve onto the specified path array, given the
-// two specified four-element arrays which define the control points.
-function d3_svg_lineBasisBezier(path, x, y) {
- path.push(
- "C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x),
- ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y),
- ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x),
- ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y),
- ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x),
- ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
-}
-d3.svg.area = function() {
- var x = d3_svg_lineX,
- y0 = d3_svg_areaY0,
- y1 = d3_svg_lineY,
- interpolate = "linear",
- interpolator = d3_svg_lineInterpolators[interpolate],
- tension = .7;
-
- // TODO horizontal / vertical / radial orientation
-
- function area(d) {
- return d.length < 1 ? null
- : "M" + interpolator(d3_svg_linePoints(this, d, x, y1), tension)
- + "L" + interpolator(d3_svg_linePoints(this, d, x, y0).reverse(), tension)
- + "Z";
- }
-
- area.x = function(v) {
- if (!arguments.length) return x;
- x = v;
- return area;
- };
-
- area.y0 = function(v) {
- if (!arguments.length) return y0;
- y0 = v;
- return area;
- };
-
- area.y1 = function(v) {
- if (!arguments.length) return y1;
- y1 = v;
- return area;
- };
-
- area.interpolate = function(v) {
- if (!arguments.length) return interpolate;
- interpolator = d3_svg_lineInterpolators[interpolate = v];
- return area;
- };
-
- area.tension = function(v) {
- if (!arguments.length) return tension;
- tension = v;
- return area;
- };
-
- return area;
-};
-
-function d3_svg_areaY0() {
- return 0;
-}
-d3.svg.chord = function() {
- var source = d3_svg_chordSource,
- target = d3_svg_chordTarget,
- radius = d3_svg_chordRadius,
- startAngle = d3_svg_arcStartAngle,
- endAngle = d3_svg_arcEndAngle;
-
- // TODO Allow control point to be customized.
-
- function chord(d, i) {
- var s = subgroup(this, source, d, i),
- t = subgroup(this, target, d, i);
- return "M" + s.p0
- + arc(s.r, s.p1) + (equals(s, t)
- ? curve(s.r, s.p1, s.r, s.p0)
- : curve(s.r, s.p1, t.r, t.p0)
- + arc(t.r, t.p1)
- + curve(t.r, t.p1, s.r, s.p0))
- + "Z";
- }
-
- function subgroup(self, f, d, i) {
- var subgroup = f.call(self, d, i),
- r = radius.call(self, subgroup, i),
- a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset,
- a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
- return {
- r: r,
- a0: a0,
- a1: a1,
- p0: [r * Math.cos(a0), r * Math.sin(a0)],
- p1: [r * Math.cos(a1), r * Math.sin(a1)]
- };
- }
-
- function equals(a, b) {
- return a.a0 == b.a0 && a.a1 == b.a1;
- }
-
- function arc(r, p) {
- return "A" + r + "," + r + " 0 0,1 " + p;
- }
-
- function curve(r0, p0, r1, p1) {
- return "Q 0,0 " + p1;
- }
-
- chord.radius = function(v) {
- if (!arguments.length) return radius;
- radius = d3_functor(v);
- return chord;
- };
-
- chord.source = function(v) {
- if (!arguments.length) return source;
- source = d3_functor(v);
- return chord;
- };
-
- chord.target = function(v) {
- if (!arguments.length) return target;
- target = d3_functor(v);
- return chord;
- };
-
- chord.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return chord;
- };
-
- chord.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return chord;
- };
-
- return chord;
-};
-
-function d3_svg_chordSource(d) {
- return d.source;
-}
-
-function d3_svg_chordTarget(d) {
- return d.target;
-}
-
-function d3_svg_chordRadius(d) {
- return d.radius;
-}
-
-function d3_svg_chordStartAngle(d) {
- return d.startAngle;
-}
-
-function d3_svg_chordEndAngle(d) {
- return d.endAngle;
-}
-d3.svg.mouse = function(container) {
- var point = (container.ownerSVGElement || container).createSVGPoint();
- if ((d3_mouse_bug44083 < 0) && (window.scrollX || window.scrollY)) {
- var svg = d3.select(document.body)
- .append("svg:svg")
- .style("position", "absolute")
- .style("top", 0)
- .style("left", 0);
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- if (d3_mouse_bug44083) {
- point.x = d3.event.pageX;
- point.y = d3.event.pageY;
- } else {
- point.x = d3.event.clientX;
- point.y = d3.event.clientY;
- }
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [point.x, point.y];
-};
-
-// https://bugs.webkit.org/show_bug.cgi?id=44083
-var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
-d3.svg.symbol = function() {
- var type = d3_svg_symbolType,
- size = d3_svg_symbolSize;
-
- function symbol(d, i) {
- return (d3_svg_symbols[type.call(this, d, i)]
- || d3_svg_symbols.circle)
- (size.call(this, d, i));
- }
-
- symbol.type = function(x) {
- if (!arguments.length) return type;
- type = d3_functor(x);
- return symbol;
- };
-
- // size of symbol in square pixels
- symbol.size = function(x) {
- if (!arguments.length) return size;
- size = d3_functor(x);
- return symbol;
- };
-
- return symbol;
-};
-
-// TODO cross-diagonal?
-d3.svg.symbolTypes = [
- "circle",
- "cross",
- "diamond",
- "square",
- "triangle-down",
- "triangle-up"
-];
-
-function d3_svg_symbolSize() {
- return 64;
-}
-
-function d3_svg_symbolType() {
- return "circle";
-}
-
-var d3_svg_symbols = {
- "circle": function(size) {
- var r = Math.sqrt(size / Math.PI);
- return "M0," + r
- + "A" + r + "," + r + " 0 1,1 0," + (-r)
- + "A" + r + "," + r + " 0 1,1 0," + r
- + "Z";
- },
- "cross": function(size) {
- var r = Math.sqrt(size / 5) / 2;
- return "M" + -3 * r + "," + -r
- + "H" + -r
- + "V" + -3 * r
- + "H" + r
- + "V" + -r
- + "H" + 3 * r
- + "V" + r
- + "H" + r
- + "V" + 3 * r
- + "H" + -r
- + "V" + r
- + "H" + -3 * r
- + "Z";
- },
- "diamond": function(size) {
- var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)),
- rx = ry * d3_svg_symbolTan30;
- return "M0," + -ry
- + "L" + rx + ",0"
- + " 0," + ry
- + " " + -rx + ",0"
- + "Z";
- },
- "square": function(size) {
- var r = Math.sqrt(size) / 2;
- return "M" + -r + "," + -r
- + "L" + r + "," + -r
- + " " + r + "," + r
- + " " + -r + "," + r
- + "Z";
- },
- "triangle-down": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
- ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + ry
- + "L" + rx +"," + -ry
- + " " + -rx + "," + -ry
- + "Z";
- },
- "triangle-up": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3),
- ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + -ry
- + "L" + rx +"," + ry
- + " " + -rx + "," + ry
- + "Z";
- }
-};
-
-var d3_svg_symbolSqrt3 = Math.sqrt(3),
- d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
-})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.layout.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.layout.js
deleted file mode 100644
index abc5ebef..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.layout.js
+++ /dev/null
@@ -1,908 +0,0 @@
-(function(){d3.layout = {};
-d3.layout.chord = function() {
- var chord = {},
- chords,
- groups,
- matrix,
- n,
- padding = 0,
- sortGroups,
- sortSubgroups,
- sortChords;
-
- function relayout() {
- var subgroups = {},
- groupSums = [],
- groupIndex = d3.range(n),
- subgroupIndex = [],
- k,
- x,
- x0,
- i,
- j;
-
- chords = [];
- groups = [];
-
- // Compute the sum.
- k = 0, i = -1; while (++i < n) {
- x = 0, j = -1; while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
-
- // Sort groups…
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
-
- // Sort subgroups…
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
-
- // Convert the sum to scaling factor for [0, 2pi].
- // TODO Allow start and end angle to be specified.
- // TODO Allow padding to be specified as percentage?
- k = (2 * Math.PI - padding * n) / k;
-
- // Compute the start and end angle for each group and subgroup.
- x = 0, i = -1; while (++i < n) {
- x0 = x, j = -1; while (++j < n) {
- var di = groupIndex[i],
- dj = subgroupIndex[i][j],
- v = matrix[di][dj];
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: x,
- endAngle: x += v * k,
- value: v
- };
- }
- groups.push({
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- });
- x += padding;
- }
-
- // Generate chords for each (non-empty) subgroup-subgroup link.
- i = -1; while (++i < n) {
- j = i - 1; while (++j < n) {
- var source = subgroups[i + "-" + j],
- target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push({
- source: source,
- target: target
- })
- }
- }
- }
-
- if (sortChords) resort();
- }
-
- function resort() {
- chords.sort(function(a, b) {
- a = Math.min(a.source.value, a.target.value);
- b = Math.min(b.source.value, b.target.value);
- return sortChords(a, b);
- });
- }
-
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
-
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
-
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
-
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
-
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
-
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
-
- return chord;
-};
-// A rudimentary force layout using Gauss-Seidel.
-d3.layout.force = function() {
- var force = {},
- event = d3.dispatch("tick"),
- size = [1, 1],
- alpha = .5,
- distance = 30,
- interval,
- nodes,
- links,
- distances;
-
- function tick() {
- var n = distances.length,
- i, // current index
- o, // current link
- s, // current source
- t, // current target
- l, // current distance
- x, // x-distance
- y; // y-distance
-
- // gauss-seidel relaxation
- for (i = 0; i < n; ++i) {
- o = distances[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = Math.sqrt(x * x + y * y)) {
- l = alpha / (o.distance * o.distance) * (l - distance * o.distance) / l;
- x *= l;
- y *= l;
- if (!t.fixed) {
- t.x -= x;
- t.y -= y;
- }
- if (!s.fixed) {
- s.x += x;
- s.y += y;
- }
- }
- }
-
- event.tick.dispatch({type: "tick"});
-
- // simulated annealing, basically
- return (alpha *= .99) < .005;
- }
-
- force.on = function(type, listener) {
- event[type].add(listener);
- return force;
- };
-
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
-
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
-
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
-
- force.distance = function(d) {
- if (!arguments.length) return distance;
- distance = d;
- return force;
- };
-
- force.start = function() {
- var i,
- j,
- k,
- n = nodes.length,
- m = links.length,
- w = size[0],
- h = size[1],
- o;
-
- var paths = [];
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- o.x = o.x || Math.random() * w;
- o.y = o.y || Math.random() * h;
- o.fixed = 0;
- paths[i] = [];
- for (j = 0; j < n; ++j) {
- paths[i][j] = Infinity;
- }
- paths[i][i] = 0;
- }
-
- for (i = 0; i < m; ++i) {
- o = links[i];
- paths[o.source][o.target] = 1;
- paths[o.target][o.source] = 1;
- o.source = nodes[o.source];
- o.target = nodes[o.target];
- }
-
- // Floyd-Warshall
- for (k = 0; k < n; ++k) {
- for (i = 0; i < n; ++i) {
- for (j = 0; j < n; ++j) {
- paths[i][j] = Math.min(paths[i][j], paths[i][k] + paths[k][j]);
- }
- }
- }
-
- distances = [];
- for (i = 0; i < n; ++i) {
- for (j = i + 1; j < n; ++j) {
- distances.push({
- source: nodes[i],
- target: nodes[j],
- distance: paths[i][j] * paths[i][j]
- });
- }
- }
-
- distances.sort(function(a, b) {
- return a.distance - b.distance;
- });
-
- d3.timer(tick);
- return force;
- };
-
- force.resume = function() {
- alpha = .1;
- d3.timer(tick);
- return force;
- };
-
- force.stop = function() {
- alpha = 0;
- return force;
- };
-
- // use `node.call(force.drag)` to make nodes draggable
- force.drag = function() {
- var node, element;
-
- this
- .on("mouseover", function(d) { d.fixed = true; })
- .on("mouseout", function(d) { if (d != node) d.fixed = false; })
- .on("mousedown", mousedown);
-
- d3.select(window)
- .on("mousemove", mousemove)
- .on("mouseup", mouseup);
-
- function mousedown(d) {
- (node = d).fixed = true;
- element = this;
- d3.event.preventDefault();
- }
-
- function mousemove() {
- if (!node) return;
- var m = d3.svg.mouse(element);
- node.x = m[0];
- node.y = m[1];
- force.resume(); // restart annealing
- }
-
- function mouseup() {
- if (!node) return;
- mousemove();
- node.fixed = false;
- node = element = null;
- }
-
- return force;
- };
-
- return force;
-};
-d3.layout.partition = function() {
- var hierarchy = d3.layout.hierarchy(),
- size = [1, 1]; // width, height
-
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children) {
- var i = -1,
- n = children.length,
- c,
- d;
- dx /= node.value;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
-
- function depth(node) {
- var children = node.children,
- d = 0;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
-
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
-
- partition.sort = d3.rebind(partition, hierarchy.sort);
- partition.children = d3.rebind(partition, hierarchy.children);
- partition.value = d3.rebind(partition, hierarchy.value);
-
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
-
- return partition;
-};
-d3.layout.pie = function() {
- var value = Number,
- sort = null,
- startAngle = 0,
- endAngle = 2 * Math.PI;
-
- function pie(data, i) {
-
- // Compute the start angle.
- var a = +(typeof startAngle == "function"
- ? startAngle.apply(this, arguments)
- : startAngle);
-
- // Compute the angular range (end - start).
- var k = (typeof endAngle == "function"
- ? endAngle.apply(this, arguments)
- : endAngle) - startAngle;
-
- // Optionally sort the data.
- var index = d3.range(data.length);
- if (sort != null) index.sort(function(i, j) {
- return sort(data[i], data[j]);
- });
-
- // Compute the numeric values for each data element.
- var values = data.map(value);
-
- // Convert k into a scale factor from value to angle, using the sum.
- k /= values.reduce(function(p, d) { return p + d; }, 0);
-
- // Compute the arcs!
- var arcs = index.map(function(i) {
- return {
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
-
- // Return the arcs in the original data's order.
- return data.map(function(d, i) {
- return arcs[index[i]];
- });
- }
-
- /**
- * Specifies the value function *x*, which returns a nonnegative numeric value
- * for each datum. The default value function is `Number`. The value function
- * is passed two arguments: the current datum and the current index.
- */
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
-
- /**
- * Specifies a sort comparison operator *x*. The comparator is passed two data
- * elements from the data array, a and b; it returns a negative value if a is
- * less than b, a positive value if a is greater than b, and zero if a equals
- * b.
- */
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
-
- /**
- * Specifies the overall start angle of the pie chart. Defaults to 0. The
- * start angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
-
- /**
- * Specifies the overall end angle of the pie chart. Defaults to 2Ï€. The
- * end angle can be specified either as a constant or as a function; in the
- * case of a function, it is evaluated once per array (as opposed to per
- * element).
- */
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
-
- return pie;
-};
-// data is two-dimensional array of x,y; we populate y0
-// TODO perhaps make the `x`, `y` and `y0` structure customizable
-d3.layout.stack = function() {
- var order = "default",
- offset = "zero";
-
- function stack(data) {
- var n = data.length,
- m = data[0].length,
- i,
- j,
- y0;
-
- // compute the order of series
- var index = d3_layout_stackOrders[order](data);
-
- // set y0 on the baseline
- d3_layout_stackOffsets[offset](data, index);
-
- // propagate offset to other series
- for (j = 0; j < m; ++j) {
- for (i = 1, y0 = data[index[0]][j].y0; i < n; ++i) {
- data[index[i]][j].y0 = y0 += data[index[i - 1]][j].y;
- }
- }
-
- return data;
- }
-
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = x;
- return stack;
- };
-
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = x;
- return stack;
- };
-
- return stack;
-}
-
-var d3_layout_stackOrders = {
-
- "inside-out": function(data) {
- var n = data.length,
- i,
- j,
- max = data.map(d3_layout_stackMaxIndex),
- sums = data.map(d3_layout_stackReduceSum),
- index = d3.range(n).sort(function(a, b) { return max[a] - max[b]; }),
- top = 0,
- bottom = 0,
- tops = [],
- bottoms = [];
- for (i = 0; i < n; i++) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
-
- "reverse": function(data) {
- return d3.range(data.length).reverse();
- },
-
- "default": function(data) {
- return d3.range(data.length);
- }
-
-};
-
-var d3_layout_stackOffsets = {
-
- "silhouette": function(data, index) {
- var n = data.length,
- m = data[0].length,
- sums = [],
- max = 0,
- i,
- j,
- o;
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j].y;
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0, i = index[0]; j < m; ++j) {
- data[i][j].y0 = (max - sums[j]) / 2;
- }
- },
-
- "wiggle": function(data, index) {
- var n = data.length,
- x = data[0],
- m = x.length,
- max = 0,
- i,
- j,
- k,
- ii,
- ik,
- i0 = index[0],
- s1,
- s2,
- s3,
- dx,
- o,
- o0;
- data[i0][0].y0 = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j].y;
- for (i = 0, s2 = 0, dx = x[j].x - x[j - 1].x; i < n; ++i) {
- for (k = 0, ii = index[i], s3 = (data[ii][j].y - data[ii][j - 1].y) / (2 * dx); k < i; ++k) {
- s3 += (data[ik = index[k]][j].y - data[ik][j - 1].y) / dx;
- }
- s2 += s3 * data[ii][j].y;
- }
- data[i0][j].y0 = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) data[i0][j].y0 -= o0;
- },
-
- "zero": function(data, index) {
- var j = 0,
- m = data[0].length,
- i0 = index[0];
- for (; j < m; ++j) data[i0][j].y0 = 0;
- }
-
-};
-
-function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
-}
-
-function d3_layout_stackMaxIndex(array) {
- var i = 1,
- j = 0,
- v = array[0].y,
- k,
- n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i].y) > v) {
- j = i;
- v = k;
- }
- }
- return j;
-}
-
-function d3_layout_stackSum(p, d) {
- return p + d.y;
-}
-d3.layout.hierarchy = function() {
- var sort = d3_layout_hierarchySort,
- children = d3_layout_hierarchyChildren,
- value = d3_layout_hierarchyValue;
-
- // Recursively compute the node depth and value.
- // Also converts the data representation into a standard hierarchy structure.
- function recurse(data, depth, nodes) {
- var datas = children.call(hierarchy, data, depth),
- node = {depth: depth, data: data};
- nodes.push(node);
- if (datas) {
- var i = -1,
- n = datas.length,
- c = node.children = [],
- v = 0,
- j = depth + 1;
- while (++i < n) {
- d = recurse(datas[i], j, nodes);
- if (d.value > 0) { // ignore NaN, negative, etc.
- c.push(d);
- v += d.value;
- d.parent = node;
- }
- }
- if (sort) c.sort(sort);
- node.value = v;
- } else {
- node.value = value.call(hierarchy, data, depth);
- }
- return node;
- }
-
- // Recursively re-evaluates the node value.
- function revalue(node, depth) {
- var children = node.children,
- v = 0;
- if (children) {
- var i = -1,
- n = children.length,
- j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else {
- v = value.call(hierarchy, node.data, depth);
- }
- return node.value = v;
- }
-
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
-
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
-
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
-
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
-
- // Re-evaluates the `value` property for the specified hierarchy.
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
-
- return hierarchy;
-}
-
-function d3_layout_hierarchyChildren(d) {
- return d.children;
-}
-
-function d3_layout_hierarchyValue(d) {
- return d.value;
-}
-
-function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
-}
-// Squarified Treemaps by Mark Bruls, Kees Huizing, and Jarke J. van Wijk
-d3.layout.treemap = function() {
- var hierarchy = d3.layout.hierarchy(),
- round = Math.round,
- size = [1, 1], // width, height
- sticky = false,
- stickies;
-
- // Recursively compute the node area based on value & scale.
- function scale(node, k) {
- var children = node.children;
- node.area = node.value * k;
- if (children) {
- var i = -1,
- n = children.length;
- while (++i < n) scale(children[i], k);
- }
- }
-
- // Recursively arranges the specified node's children into squarified rows.
- function squarify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- row = [],
- children = node.children.slice(), // copy-on-write
- child,
- best = Infinity, // the best row score so far
- score, // the current row score
- u = Math.min(rect.dx, rect.dy), // initial orientation
- n;
- row.area = 0;
- while ((n = children.length) > 0) {
- row.push(child = children[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) { // continue with this orientation
- children.pop();
- best = score;
- } else { // abort, and try a different orientation
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- node.children.forEach(squarify);
- }
-
- // Recursively resizes the specified node's children into existing rows.
- // Preserves the existing layout!
- function stickify(node) {
- if (!node.children) return;
- var rect = {x: node.x, y: node.y, dx: node.dx, dy: node.dy},
- children = node.children.slice(), // copy-on-write
- child,
- row = [];
- row.area = 0;
- while (child = children.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !children.length);
- row.length = row.area = 0;
- }
- }
- node.children.forEach(stickify);
- }
-
- // Computes the score for the specified row, as the worst aspect ratio.
- function worst(row, u) {
- var s = row.area,
- r,
- rmax = 0,
- rmin = Infinity,
- i = -1,
- n = row.length;
- while (++i < n) {
- r = row[i].area;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return Math.max((u * rmax) / s, s / (u * rmin));
- }
-
- // Positions the specified row of nodes. Modifies `rect`.
- function position(row, u, rect, flush) {
- var i = -1,
- n = row.length,
- x = rect.x,
- y = rect.y,
- v = u ? round(row.area / u) : 0,
- o;
- if (u == rect.dx) { // horizontal subdivision
- if (flush || v > rect.dy) v = rect.dy; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = round(o.area / v);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x; // rounding error
- rect.y += v;
- rect.dy -= v;
- } else { // vertical subdivision
- if (flush || v > rect.dx) v = rect.dx; // over+underflow
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = round(o.area / v);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y; // rounding error
- rect.x += v;
- rect.dx -= v;
- }
- }
-
- function treemap(d) {
- var nodes = stickies || hierarchy(d),
- root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale(root, size[0] * size[1] / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
-
- treemap.sort = d3.rebind(treemap, hierarchy.sort);
- treemap.children = d3.rebind(treemap, hierarchy.children);
- treemap.value = d3.rebind(treemap, hierarchy.value);
-
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
-
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
-
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
-
- return treemap;
-};
-})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.js
deleted file mode 100644
index 714656b3..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.js
+++ /dev/null
@@ -1,7033 +0,0 @@
-(function() {
- function d3_class(ctor, properties) {
- try {
- for (var key in properties) {
- Object.defineProperty(ctor.prototype, key, {
- value: properties[key],
- enumerable: false
- });
- }
- } catch (e) {
- ctor.prototype = properties;
- }
- }
- function d3_arrayCopy(pseudoarray) {
- var i = -1, n = pseudoarray.length, array = [];
- while (++i < n) array.push(pseudoarray[i]);
- return array;
- }
- function d3_arraySlice(pseudoarray) {
- return Array.prototype.slice.call(pseudoarray);
- }
- function d3_Map() {}
- function d3_identity(d) {
- return d;
- }
- function d3_this() {
- return this;
- }
- function d3_true() {
- return true;
- }
- function d3_functor(v) {
- return typeof v === "function" ? v : function() {
- return v;
- };
- }
- function d3_rebind(target, source, method) {
- return function() {
- var value = method.apply(source, arguments);
- return arguments.length ? target : value;
- };
- }
- function d3_number(x) {
- return x != null && !isNaN(x);
- }
- function d3_zipLength(d) {
- return d.length;
- }
- function d3_splitter(d) {
- return d == null;
- }
- function d3_collapse(s) {
- return s.trim().replace(/\s+/g, " ");
- }
- function d3_range_integerScale(x) {
- var k = 1;
- while (x * k % 1) k *= 10;
- return k;
- }
- function d3_dispatch() {}
- function d3_dispatch_event(dispatch) {
- function event() {
- var z = listeners, i = -1, n = z.length, l;
- while (++i < n) if (l = z[i].on) l.apply(this, arguments);
- return dispatch;
- }
- var listeners = [], listenerByName = new d3_Map;
- event.on = function(name, listener) {
- var l = listenerByName.get(name), i;
- if (arguments.length < 2) return l && l.on;
- if (l) {
- l.on = null;
- listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
- listenerByName.remove(name);
- }
- if (listener) listeners.push(listenerByName.set(name, {
- on: listener
- }));
- return dispatch;
- };
- return event;
- }
- function d3_format_precision(x, p) {
- return p - (x ? 1 + Math.floor(Math.log(x + Math.pow(10, 1 + Math.floor(Math.log(x) / Math.LN10) - p)) / Math.LN10) : 1);
- }
- function d3_format_typeDefault(x) {
- return x + "";
- }
- function d3_format_group(value) {
- var i = value.lastIndexOf("."), f = i >= 0 ? value.substring(i) : (i = value.length, ""), t = [];
- while (i > 0) t.push(value.substring(i -= 3, i + 3));
- return t.reverse().join(",") + f;
- }
- function d3_formatPrefix(d, i) {
- var k = Math.pow(10, Math.abs(8 - i) * 3);
- return {
- scale: i > 8 ? function(d) {
- return d / k;
- } : function(d) {
- return d * k;
- },
- symbol: d
- };
- }
- function d3_ease_clamp(f) {
- return function(t) {
- return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
- };
- }
- function d3_ease_reverse(f) {
- return function(t) {
- return 1 - f(1 - t);
- };
- }
- function d3_ease_reflect(f) {
- return function(t) {
- return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
- };
- }
- function d3_ease_identity(t) {
- return t;
- }
- function d3_ease_poly(e) {
- return function(t) {
- return Math.pow(t, e);
- };
- }
- function d3_ease_sin(t) {
- return 1 - Math.cos(t * Math.PI / 2);
- }
- function d3_ease_exp(t) {
- return Math.pow(2, 10 * (t - 1));
- }
- function d3_ease_circle(t) {
- return 1 - Math.sqrt(1 - t * t);
- }
- function d3_ease_elastic(a, p) {
- var s;
- if (arguments.length < 2) p = .45;
- if (arguments.length < 1) {
- a = 1;
- s = p / 4;
- } else s = p / (2 * Math.PI) * Math.asin(1 / a);
- return function(t) {
- return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * Math.PI / p);
- };
- }
- function d3_ease_back(s) {
- if (!s) s = 1.70158;
- return function(t) {
- return t * t * ((s + 1) * t - s);
- };
- }
- function d3_ease_bounce(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
- }
- function d3_eventCancel() {
- d3.event.stopPropagation();
- d3.event.preventDefault();
- }
- function d3_eventSource() {
- var e = d3.event, s;
- while (s = e.sourceEvent) e = s;
- return e;
- }
- function d3_eventDispatch(target) {
- var dispatch = new d3_dispatch, i = 0, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- dispatch.of = function(thiz, argumentz) {
- return function(e1) {
- try {
- var e0 = e1.sourceEvent = d3.event;
- e1.target = target;
- d3.event = e1;
- dispatch[e1.type].apply(thiz, argumentz);
- } finally {
- d3.event = e0;
- }
- };
- };
- return dispatch;
- }
- function d3_transform(m) {
- var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
- if (r0[0] * r1[1] < r1[0] * r0[1]) {
- r0[0] *= -1;
- r0[1] *= -1;
- kx *= -1;
- kz *= -1;
- }
- this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_transformDegrees;
- this.translate = [ m.e, m.f ];
- this.scale = [ kx, ky ];
- this.skew = ky ? Math.atan2(kz, ky) * d3_transformDegrees : 0;
- }
- function d3_transformDot(a, b) {
- return a[0] * b[0] + a[1] * b[1];
- }
- function d3_transformNormalize(a) {
- var k = Math.sqrt(d3_transformDot(a, a));
- if (k) {
- a[0] /= k;
- a[1] /= k;
- }
- return k;
- }
- function d3_transformCombine(a, b, k) {
- a[0] += k * b[0];
- a[1] += k * b[1];
- return a;
- }
- function d3_interpolateByName(name) {
- return name == "transform" ? d3.interpolateTransform : d3.interpolate;
- }
- function d3_uninterpolateNumber(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return (x - a) * b;
- };
- }
- function d3_uninterpolateClamp(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return Math.max(0, Math.min(1, (x - a) * b));
- };
- }
- function d3_rgb(r, g, b) {
- return new d3_Rgb(r, g, b);
- }
- function d3_Rgb(r, g, b) {
- this.r = r;
- this.g = g;
- this.b = b;
- }
- function d3_rgb_hex(v) {
- return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
- }
- function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, g = 0, b = 0, m1, m2, name;
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl":
- {
- return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
- }
- case "rgb":
- {
- return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
- }
- }
- }
- if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);
- if (format != null && format.charAt(0) === "#") {
- if (format.length === 4) {
- r = format.charAt(1);
- r += r;
- g = format.charAt(2);
- g += g;
- b = format.charAt(3);
- b += b;
- } else if (format.length === 7) {
- r = format.substring(1, 3);
- g = format.substring(3, 5);
- b = format.substring(5, 7);
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- }
- return rgb(r, g, b);
- }
- function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
- h *= 60;
- } else {
- s = h = 0;
- }
- return d3_hsl(h, s, l);
- }
- function d3_rgb_lab(r, g, b) {
- r = d3_rgb_xyz(r);
- g = d3_rgb_xyz(g);
- b = d3_rgb_xyz(b);
- var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
- return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
- function d3_rgb_xyz(r) {
- return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
- }
- function d3_rgb_parseNumber(c) {
- var f = parseFloat(c);
- return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
- }
- function d3_hsl(h, s, l) {
- return new d3_Hsl(h, s, l);
- }
- function d3_Hsl(h, s, l) {
- this.h = h;
- this.s = s;
- this.l = l;
- }
- function d3_hsl_rgb(h, s, l) {
- function v(h) {
- if (h > 360) h -= 360; else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
- function vv(h) {
- return Math.round(v(h) * 255);
- }
- var m1, m2;
- h = h % 360;
- if (h < 0) h += 360;
- s = s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
- return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
- }
- function d3_hcl(h, c, l) {
- return new d3_Hcl(h, c, l);
- }
- function d3_Hcl(h, c, l) {
- this.h = h;
- this.c = c;
- this.l = l;
- }
- function d3_hcl_lab(h, c, l) {
- return d3_lab(l, Math.cos(h *= Math.PI / 180) * c, Math.sin(h) * c);
- }
- function d3_lab(l, a, b) {
- return new d3_Lab(l, a, b);
- }
- function d3_Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
- function d3_lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = d3_lab_xyz(x) * d3_lab_X;
- y = d3_lab_xyz(y) * d3_lab_Y;
- z = d3_lab_xyz(z) * d3_lab_Z;
- return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
- }
- function d3_lab_hcl(l, a, b) {
- return d3_hcl(Math.atan2(b, a) / Math.PI * 180, Math.sqrt(a * a + b * b), l);
- }
- function d3_lab_xyz(x) {
- return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
- function d3_xyz_lab(x) {
- return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
- function d3_xyz_rgb(r) {
- return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
- }
- function d3_selection(groups) {
- d3_arraySubclass(groups, d3_selectionPrototype);
- return groups;
- }
- function d3_selection_selector(selector) {
- return function() {
- return d3_select(selector, this);
- };
- }
- function d3_selection_selectorAll(selector) {
- return function() {
- return d3_selectAll(selector, this);
- };
- }
- function d3_selection_attr(name, value) {
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- function attrConstant() {
- this.setAttribute(name, value);
- }
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
- }
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
- }
- name = d3.ns.qualify(name);
- return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
- }
- function d3_selection_classedRe(name) {
- return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
- }
- function d3_selection_classed(name, value) {
- function classedConstant() {
- var i = -1;
- while (++i < n) name[i](this, value);
- }
- function classedFunction() {
- var i = -1, x = value.apply(this, arguments);
- while (++i < n) name[i](this, x);
- }
- name = name.trim().split(/\s+/).map(d3_selection_classedName);
- var n = name.length;
- return typeof value === "function" ? classedFunction : classedConstant;
- }
- function d3_selection_classedName(name) {
- var re = d3_selection_classedRe(name);
- return function(node, value) {
- if (c = node.classList) return value ? c.add(name) : c.remove(name);
- var c = node.className, cb = c.baseVal != null, cv = cb ? c.baseVal : c;
- if (value) {
- re.lastIndex = 0;
- if (!re.test(cv)) {
- cv = d3_collapse(cv + " " + name);
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- } else if (cv) {
- cv = d3_collapse(cv.replace(re, " "));
- if (cb) c.baseVal = cv; else node.className = cv;
- }
- };
- }
- function d3_selection_style(name, value, priority) {
- function styleNull() {
- this.style.removeProperty(name);
- }
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
- }
- return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
- }
- function d3_selection_property(name, value) {
- function propertyNull() {
- delete this[name];
- }
- function propertyConstant() {
- this[name] = value;
- }
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name]; else this[name] = x;
- }
- return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
- }
- function d3_selection_dataNode(data) {
- return {
- __data__: data
- };
- }
- function d3_selection_filter(selector) {
- return function() {
- return d3_selectMatches(this, selector);
- };
- }
- function d3_selection_sortComparator(comparator) {
- if (!arguments.length) comparator = d3.ascending;
- return function(a, b) {
- return comparator(a && a.__data__, b && b.__data__);
- };
- }
- function d3_selection_on(type, listener, capture) {
- function onRemove() {
- var wrapper = this[name];
- if (wrapper) {
- this.removeEventListener(type, wrapper, wrapper.$);
- delete this[name];
- }
- }
- function onAdd() {
- function wrapper(e) {
- var o = d3.event;
- d3.event = e;
- args[0] = node.__data__;
- try {
- listener.apply(node, args);
- } finally {
- d3.event = o;
- }
- }
- var node = this, args = arguments;
- onRemove.call(this);
- this.addEventListener(type, this[name] = wrapper, wrapper.$ = capture);
- wrapper._ = listener;
- }
- var name = "__on" + type, i = type.indexOf(".");
- if (i > 0) type = type.substring(0, i);
- return listener ? onAdd : onRemove;
- }
- function d3_selection_each(groups, callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
- if (node = group[i]) callback(node, i, j);
- }
- }
- return groups;
- }
- function d3_selection_enter(selection) {
- d3_arraySubclass(selection, d3_selection_enterPrototype);
- return selection;
- }
- function d3_transition(groups, id, time) {
- d3_arraySubclass(groups, d3_transitionPrototype);
- var tweens = new d3_Map, event = d3.dispatch("start", "end"), ease = d3_transitionEase;
- groups.id = id;
- groups.time = time;
- groups.tween = function(name, tween) {
- if (arguments.length < 2) return tweens.get(name);
- if (tween == null) tweens.remove(name); else tweens.set(name, tween);
- return groups;
- };
- groups.ease = function(value) {
- if (!arguments.length) return ease;
- ease = typeof value === "function" ? value : d3.ease.apply(d3, arguments);
- return groups;
- };
- groups.each = function(type, listener) {
- if (arguments.length < 2) return d3_transition_each.call(groups, type);
- event.on(type, listener);
- return groups;
- };
- d3.timer(function(elapsed) {
- return d3_selection_each(groups, function(node, i, j) {
- function start(elapsed) {
- if (lock.active > id) return stop();
- lock.active = id;
- tweens.forEach(function(key, value) {
- if (value = value.call(node, d, i)) {
- tweened.push(value);
- }
- });
- event.start.call(node, d, i);
- if (!tick(elapsed)) d3.timer(tick, 0, time);
- return 1;
- }
- function tick(elapsed) {
- if (lock.active !== id) return stop();
- var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
- while (n > 0) {
- tweened[--n].call(node, e);
- }
- if (t >= 1) {
- stop();
- d3_transitionId = id;
- event.end.call(node, d, i);
- d3_transitionId = 0;
- return 1;
- }
- }
- function stop() {
- if (!--lock.count) delete node.__transition__;
- return 1;
- }
- var tweened = [], delay = node.delay, duration = node.duration, lock = (node = node.node).__transition__ || (node.__transition__ = {
- active: 0,
- count: 0
- }), d = node.__data__;
- ++lock.count;
- delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time);
- });
- }, 0, time);
- return groups;
- }
- function d3_transition_each(callback) {
- var id = d3_transitionId, ease = d3_transitionEase, delay = d3_transitionDelay, duration = d3_transitionDuration;
- d3_transitionId = this.id;
- d3_transitionEase = this.ease();
- d3_selection_each(this, function(node, i, j) {
- d3_transitionDelay = node.delay;
- d3_transitionDuration = node.duration;
- callback.call(node = node.node, node.__data__, i, j);
- });
- d3_transitionId = id;
- d3_transitionEase = ease;
- d3_transitionDelay = delay;
- d3_transitionDuration = duration;
- return this;
- }
- function d3_tweenNull(d, i, a) {
- return a != "" && d3_tweenRemove;
- }
- function d3_tweenByName(b, name) {
- return d3.tween(b, d3_interpolateByName(name));
- }
- function d3_timer_step() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- var delay = d3_timer_flush() - now;
- if (delay > 24) {
- if (isFinite(delay)) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_step, delay);
- }
- d3_timer_interval = 0;
- } else {
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- }
- function d3_timer_flush() {
- var t0 = null, t1 = d3_timer_queue, then = Infinity;
- while (t1) {
- if (t1.flush) {
- t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
- } else {
- then = Math.min(then, t1.then + t1.delay);
- t1 = (t0 = t1).next;
- }
- }
- return then;
- }
- function d3_mousePoint(container, e) {
- var svg = container.ownerSVGElement || container;
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- if (d3_mouse_bug44083 < 0 && (window.scrollX || window.scrollY)) {
- svg = d3.select(document.body).append("svg").style("position", "absolute").style("top", 0).style("left", 0);
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- if (d3_mouse_bug44083) {
- point.x = e.pageX;
- point.y = e.pageY;
- } else {
- point.x = e.clientX;
- point.y = e.clientY;
- }
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [ point.x, point.y ];
- }
- var rect = container.getBoundingClientRect();
- return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
- }
- function d3_noop() {}
- function d3_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_scaleRange(scale) {
- return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
- }
- function d3_scale_nice(domain, nice) {
- var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
- if (x1 < x0) {
- dx = i0, i0 = i1, i1 = dx;
- dx = x0, x0 = x1, x1 = dx;
- }
- if (nice = nice(x1 - x0)) {
- domain[i0] = nice.floor(x0);
- domain[i1] = nice.ceil(x1);
- }
- return domain;
- }
- function d3_scale_niceDefault() {
- return Math;
- }
- function d3_scale_linear(domain, range, interpolate, clamp) {
- function rescale() {
- var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
- output = linear(domain, range, uninterpolate, interpolate);
- input = linear(range, domain, uninterpolate, d3.interpolate);
- return scale;
- }
- function scale(x) {
- return output(x);
- }
- var output, input;
- scale.invert = function(y) {
- return input(y);
- };
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(Number);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.rangeRound = function(x) {
- return scale.range(x).interpolate(d3.interpolateRound);
- };
- scale.clamp = function(x) {
- if (!arguments.length) return clamp;
- clamp = x;
- return rescale();
- };
- scale.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x;
- return rescale();
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- scale.nice = function() {
- d3_scale_nice(domain, d3_scale_linearNice);
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_linear(domain, range, interpolate, clamp);
- };
- return rescale();
- }
- function d3_scale_linearRebind(scale, linear) {
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_scale_linearNice(dx) {
- dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
- return dx && {
- floor: function(x) {
- return Math.floor(x / dx) * dx;
- },
- ceil: function(x) {
- return Math.ceil(x / dx) * dx;
- }
- };
- }
- function d3_scale_linearTickRange(domain, m) {
- var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
- if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
- extent[0] = Math.ceil(extent[0] / step) * step;
- extent[1] = Math.floor(extent[1] / step) * step + step * .5;
- extent[2] = step;
- return extent;
- }
- function d3_scale_linearTicks(domain, m) {
- return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
- }
- function d3_scale_linearTickFormat(domain, m) {
- return d3.format(",." + Math.max(0, -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01)) + "f");
- }
- function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
- var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
- return function(x) {
- return i(u(x));
- };
- }
- function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
- var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
- if (domain[k] < domain[0]) {
- domain = domain.slice().reverse();
- range = range.slice().reverse();
- }
- while (++j <= k) {
- u.push(uninterpolate(domain[j - 1], domain[j]));
- i.push(interpolate(range[j - 1], range[j]));
- }
- return function(x) {
- var j = d3.bisect(domain, x, 1, k) - 1;
- return i[j](u[j](x));
- };
- }
- function d3_scale_log(linear, log) {
- function scale(x) {
- return linear(log(x));
- }
- var pow = log.pow;
- scale.invert = function(x) {
- return pow(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(pow);
- log = x[0] < 0 ? d3_scale_logn : d3_scale_logp;
- pow = log.pow;
- linear.domain(x.map(log));
- return scale;
- };
- scale.nice = function() {
- linear.domain(d3_scale_nice(linear.domain(), d3_scale_niceDefault));
- return scale;
- };
- scale.ticks = function() {
- var extent = d3_scaleExtent(linear.domain()), ticks = [];
- if (extent.every(isFinite)) {
- var i = Math.floor(extent[0]), j = Math.ceil(extent[1]), u = pow(extent[0]), v = pow(extent[1]);
- if (log === d3_scale_logn) {
- ticks.push(pow(i));
- for (; i++ < j; ) for (var k = 9; k > 0; k--) ticks.push(pow(i) * k);
- } else {
- for (; i < j; i++) for (var k = 1; k < 10; k++) ticks.push(pow(i) * k);
- ticks.push(pow(i));
- }
- for (i = 0; ticks[i] < u; i++) {}
- for (j = ticks.length; ticks[j - 1] > v; j--) {}
- ticks = ticks.slice(i, j);
- }
- return ticks;
- };
- scale.tickFormat = function(n, format) {
- if (arguments.length < 2) format = d3_scale_logFormat;
- if (arguments.length < 1) return format;
- var k = Math.max(.1, n / scale.ticks().length), f = log === d3_scale_logn ? (e = -1e-12, Math.floor) : (e = 1e-12, Math.ceil), e;
- return function(d) {
- return d / pow(f(log(d) + e)) <= k ? format(d) : "";
- };
- };
- scale.copy = function() {
- return d3_scale_log(linear.copy(), log);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_logp(x) {
- return Math.log(x < 0 ? 0 : x) / Math.LN10;
- }
- function d3_scale_logn(x) {
- return -Math.log(x > 0 ? 0 : -x) / Math.LN10;
- }
- function d3_scale_pow(linear, exponent) {
- function scale(x) {
- return linear(powp(x));
- }
- var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
- scale.invert = function(x) {
- return powb(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(powb);
- linear.domain(x.map(powp));
- return scale;
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(scale.domain(), m);
- };
- scale.tickFormat = function(m) {
- return d3_scale_linearTickFormat(scale.domain(), m);
- };
- scale.nice = function() {
- return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
- };
- scale.exponent = function(x) {
- if (!arguments.length) return exponent;
- var domain = scale.domain();
- powp = d3_scale_powPow(exponent = x);
- powb = d3_scale_powPow(1 / exponent);
- return scale.domain(domain);
- };
- scale.copy = function() {
- return d3_scale_pow(linear.copy(), exponent);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_powPow(e) {
- return function(x) {
- return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
- };
- }
- function d3_scale_ordinal(domain, ranger) {
- function scale(x) {
- return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
- }
- function steps(start, step) {
- return d3.range(domain.length).map(function(i) {
- return start + step * i;
- });
- }
- var index, range, rangeBand;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = [];
- index = new d3_Map;
- var i = -1, n = x.length, xi;
- while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
- return scale[ranger.t].apply(scale, ranger.a);
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- rangeBand = 0;
- ranger = {
- t: "range",
- a: arguments
- };
- return scale;
- };
- scale.rangePoints = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding);
- range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);
- rangeBand = 0;
- ranger = {
- t: "rangePoints",
- a: arguments
- };
- return scale;
- };
- scale.rangeBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
- range = steps(start + step * outerPadding, step);
- if (reverse) range.reverse();
- rangeBand = step * (1 - padding);
- ranger = {
- t: "rangeBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeRoundBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step;
- range = steps(start + Math.round(error / 2), step);
- if (reverse) range.reverse();
- rangeBand = Math.round(step * (1 - padding));
- ranger = {
- t: "rangeRoundBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeBand = function() {
- return rangeBand;
- };
- scale.rangeExtent = function() {
- return d3_scaleExtent(ranger.a[0]);
- };
- scale.copy = function() {
- return d3_scale_ordinal(domain, ranger);
- };
- return scale.domain(domain);
- }
- function d3_scale_quantile(domain, range) {
- function rescale() {
- var k = 0, n = domain.length, q = range.length;
- thresholds = [];
- while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
- return scale;
- }
- function scale(x) {
- if (isNaN(x = +x)) return NaN;
- return range[d3.bisect(thresholds, x)];
- }
- var thresholds;
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.filter(function(d) {
- return !isNaN(d);
- }).sort(d3.ascending);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.quantiles = function() {
- return thresholds;
- };
- scale.copy = function() {
- return d3_scale_quantile(domain, range);
- };
- return rescale();
- }
- function d3_scale_quantize(x0, x1, range) {
- function scale(x) {
- return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
- }
- function rescale() {
- kx = range.length / (x1 - x0);
- i = range.length - 1;
- return scale;
- }
- var kx, i;
- scale.domain = function(x) {
- if (!arguments.length) return [ x0, x1 ];
- x0 = +x[0];
- x1 = +x[x.length - 1];
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_quantize(x0, x1, range);
- };
- return rescale();
- }
- function d3_scale_threshold(domain, range) {
- function scale(x) {
- return range[d3.bisect(domain, x)];
- }
- scale.domain = function(_) {
- if (!arguments.length) return domain;
- domain = _;
- return scale;
- };
- scale.range = function(_) {
- if (!arguments.length) return range;
- range = _;
- return scale;
- };
- scale.copy = function() {
- return d3_scale_threshold(domain, range);
- };
- return scale;
- }
- function d3_scale_identity(domain) {
- function identity(x) {
- return +x;
- }
- identity.invert = identity;
- identity.domain = identity.range = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(identity);
- return identity;
- };
- identity.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- identity.tickFormat = function(m) {
- return d3_scale_linearTickFormat(domain, m);
- };
- identity.copy = function() {
- return d3_scale_identity(domain);
- };
- return identity;
- }
- function d3_svg_arcInnerRadius(d) {
- return d.innerRadius;
- }
- function d3_svg_arcOuterRadius(d) {
- return d.outerRadius;
- }
- function d3_svg_arcStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_arcEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_line(projection) {
- function line(data) {
- function segment() {
- segments.push("M", interpolate(projection(points), tension));
- }
- var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
- } else if (points.length) {
- segment();
- points = [];
- }
- }
- if (points.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
- line.x = function(_) {
- if (!arguments.length) return x;
- x = _;
- return line;
- };
- line.y = function(_) {
- if (!arguments.length) return y;
- y = _;
- return line;
- };
- line.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return line;
- };
- line.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- return line;
- };
- line.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return line;
- };
- return line;
- }
- function d3_svg_lineX(d) {
- return d[0];
- }
- function d3_svg_lineY(d) {
- return d[1];
- }
- function d3_svg_lineLinear(points) {
- return points.join("L");
- }
- function d3_svg_lineLinearClosed(points) {
- return d3_svg_lineLinear(points) + "Z";
- }
- function d3_svg_lineStepBefore(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
- return path.join("");
- }
- function d3_svg_lineStepAfter(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
- return path.join("");
- }
- function d3_svg_lineCardinalOpen(points, tension) {
- return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineCardinalClosed(points, tension) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]), points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
- }
- function d3_svg_lineCardinal(points, tension, closed) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineHermite(points, tangents) {
- if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
- return d3_svg_lineLinear(points);
- }
- var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
- if (quad) {
- path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
- p0 = points[1];
- pi = 2;
- }
- if (tangents.length > 1) {
- t = tangents[1];
- p = points[pi];
- pi++;
- path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- for (var i = 2; i < tangents.length; i++, pi++) {
- p = points[pi];
- t = tangents[i];
- path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- }
- }
- if (quad) {
- var lp = points[pi];
- path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
- }
- return path;
- }
- function d3_svg_lineCardinalTangents(points, tension) {
- var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
- while (++i < n) {
- p0 = p1;
- p1 = p2;
- p2 = points[i];
- tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
- }
- return tangents;
- }
- function d3_svg_lineBasis(points) {
- if (points.length < 3) return d3_svg_lineLinear(points);
- var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0 ];
- d3_svg_lineBasisBezier(path, px, py);
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- i = -1;
- while (++i < 2) {
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisOpen(points) {
- if (points.length < 4) return d3_svg_lineLinear(points);
- var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
- while (++i < 3) {
- pi = points[i];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
- --i;
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisClosed(points) {
- var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
- while (++i < 4) {
- pi = points[i % n];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
- --i;
- while (++i < m) {
- pi = points[i % n];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBundle(points, tension) {
- var n = points.length - 1;
- if (n) {
- var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
- while (++i <= n) {
- p = points[i];
- t = i / n;
- p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
- p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
- }
- }
- return d3_svg_lineBasis(points);
- }
- function d3_svg_lineDot4(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- }
- function d3_svg_lineBasisBezier(path, x, y) {
- path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
- }
- function d3_svg_lineSlope(p0, p1) {
- return (p1[1] - p0[1]) / (p1[0] - p0[0]);
- }
- function d3_svg_lineFiniteDifferences(points) {
- var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
- while (++i < j) {
- m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
- }
- m[i] = d;
- return m;
- }
- function d3_svg_lineMonotoneTangents(points) {
- var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
- while (++i < j) {
- d = d3_svg_lineSlope(points[i], points[i + 1]);
- if (Math.abs(d) < 1e-6) {
- m[i] = m[i + 1] = 0;
- } else {
- a = m[i] / d;
- b = m[i + 1] / d;
- s = a * a + b * b;
- if (s > 9) {
- s = d * 3 / Math.sqrt(s);
- m[i] = s * a;
- m[i + 1] = s * b;
- }
- }
- }
- i = -1;
- while (++i <= j) {
- s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
- tangents.push([ s || 0, m[i] * s || 0 ]);
- }
- return tangents;
- }
- function d3_svg_lineMonotone(points) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
- }
- function d3_svg_lineRadial(points) {
- var point, i = -1, n = points.length, r, a;
- while (++i < n) {
- point = points[i];
- r = point[0];
- a = point[1] + d3_svg_arcOffset;
- point[0] = r * Math.cos(a);
- point[1] = r * Math.sin(a);
- }
- return points;
- }
- function d3_svg_area(projection) {
- function area(data) {
- function segment() {
- segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
- }
- var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
- return x;
- } : d3_functor(x1), fy1 = y0 === y1 ? function() {
- return y;
- } : d3_functor(y1), x, y;
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
- points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
- } else if (points0.length) {
- segment();
- points0 = [];
- points1 = [];
- }
- }
- if (points0.length) segment();
- return segments.length ? segments.join("") : null;
- }
- var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
- area.x = function(_) {
- if (!arguments.length) return x1;
- x0 = x1 = _;
- return area;
- };
- area.x0 = function(_) {
- if (!arguments.length) return x0;
- x0 = _;
- return area;
- };
- area.x1 = function(_) {
- if (!arguments.length) return x1;
- x1 = _;
- return area;
- };
- area.y = function(_) {
- if (!arguments.length) return y1;
- y0 = y1 = _;
- return area;
- };
- area.y0 = function(_) {
- if (!arguments.length) return y0;
- y0 = _;
- return area;
- };
- area.y1 = function(_) {
- if (!arguments.length) return y1;
- y1 = _;
- return area;
- };
- area.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return area;
- };
- area.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- interpolateReverse = interpolate.reverse || interpolate;
- L = interpolate.closed ? "M" : "L";
- return area;
- };
- area.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return area;
- };
- return area;
- }
- function d3_svg_chordSource(d) {
- return d.source;
- }
- function d3_svg_chordTarget(d) {
- return d.target;
- }
- function d3_svg_chordRadius(d) {
- return d.radius;
- }
- function d3_svg_chordStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_chordEndAngle(d) {
- return d.endAngle;
- }
- function d3_svg_diagonalProjection(d) {
- return [ d.x, d.y ];
- }
- function d3_svg_diagonalRadialProjection(projection) {
- return function() {
- var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset;
- return [ r * Math.cos(a), r * Math.sin(a) ];
- };
- }
- function d3_svg_symbolSize() {
- return 64;
- }
- function d3_svg_symbolType() {
- return "circle";
- }
- function d3_svg_symbolCircle(size) {
- var r = Math.sqrt(size / Math.PI);
- return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
- }
- function d3_svg_axisX(selection, x) {
- selection.attr("transform", function(d) {
- return "translate(" + x(d) + ",0)";
- });
- }
- function d3_svg_axisY(selection, y) {
- selection.attr("transform", function(d) {
- return "translate(0," + y(d) + ")";
- });
- }
- function d3_svg_axisSubdivide(scale, ticks, m) {
- subticks = [];
- if (m && ticks.length > 1) {
- var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v;
- while (++i < n) {
- for (j = m; --j > 0; ) {
- if ((v = +ticks[i] - j * d) >= extent[0]) {
- subticks.push(v);
- }
- }
- }
- for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) {
- subticks.push(v);
- }
- }
- return subticks;
- }
- function d3_behavior_zoomDelta() {
- if (!d3_behavior_zoomDiv) {
- d3_behavior_zoomDiv = d3.select("body").append("div").style("visibility", "hidden").style("top", 0).style("height", 0).style("width", 0).style("overflow-y", "scroll").append("div").style("height", "2000px").node().parentNode;
- }
- var e = d3.event, delta;
- try {
- d3_behavior_zoomDiv.scrollTop = 1e3;
- d3_behavior_zoomDiv.dispatchEvent(e);
- delta = 1e3 - d3_behavior_zoomDiv.scrollTop;
- } catch (error) {
- delta = e.wheelDelta || -e.detail * 5;
- }
- return delta;
- }
- function d3_layout_bundlePath(link) {
- var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
- while (start !== lca) {
- start = start.parent;
- points.push(start);
- }
- var k = points.length;
- while (end !== lca) {
- points.splice(k, 0, end);
- end = end.parent;
- }
- return points;
- }
- function d3_layout_bundleAncestors(node) {
- var ancestors = [], parent = node.parent;
- while (parent != null) {
- ancestors.push(node);
- node = parent;
- parent = parent.parent;
- }
- ancestors.push(node);
- return ancestors;
- }
- function d3_layout_bundleLeastCommonAncestor(a, b) {
- if (a === b) return a;
- var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
- while (aNode === bNode) {
- sharedNode = aNode;
- aNode = aNodes.pop();
- bNode = bNodes.pop();
- }
- return sharedNode;
- }
- function d3_layout_forceDragstart(d) {
- d.fixed |= 2;
- }
- function d3_layout_forceDragend(d) {
- d.fixed &= 1;
- }
- function d3_layout_forceMouseover(d) {
- d.fixed |= 4;
- }
- function d3_layout_forceMouseout(d) {
- d.fixed &= 3;
- }
- function d3_layout_forceAccumulate(quad, alpha, charges) {
- var cx = 0, cy = 0;
- quad.charge = 0;
- if (!quad.leaf) {
- var nodes = quad.nodes, n = nodes.length, i = -1, c;
- while (++i < n) {
- c = nodes[i];
- if (c == null) continue;
- d3_layout_forceAccumulate(c, alpha, charges);
- quad.charge += c.charge;
- cx += c.charge * c.cx;
- cy += c.charge * c.cy;
- }
- }
- if (quad.point) {
- if (!quad.leaf) {
- quad.point.x += Math.random() - .5;
- quad.point.y += Math.random() - .5;
- }
- var k = alpha * charges[quad.point.index];
- quad.charge += quad.pointCharge = k;
- cx += k * quad.point.x;
- cy += k * quad.point.y;
- }
- quad.cx = cx / quad.charge;
- quad.cy = cy / quad.charge;
- }
- function d3_layout_forceLinkDistance(link) {
- return 20;
- }
- function d3_layout_forceLinkStrength(link) {
- return 1;
- }
- function d3_layout_stackX(d) {
- return d.x;
- }
- function d3_layout_stackY(d) {
- return d.y;
- }
- function d3_layout_stackOut(d, y0, y) {
- d.y0 = y0;
- d.y = y;
- }
- function d3_layout_stackOrderDefault(data) {
- return d3.range(data.length);
- }
- function d3_layout_stackOffsetZero(data) {
- var j = -1, m = data[0].length, y0 = [];
- while (++j < m) y0[j] = 0;
- return y0;
- }
- function d3_layout_stackMaxIndex(array) {
- var i = 1, j = 0, v = array[0][1], k, n = array.length;
- for (; i < n; ++i) {
- if ((k = array[i][1]) > v) {
- j = i;
- v = k;
- }
- }
- return j;
- }
- function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
- }
- function d3_layout_stackSum(p, d) {
- return p + d[1];
- }
- function d3_layout_histogramBinSturges(range, values) {
- return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
- }
- function d3_layout_histogramBinFixed(range, n) {
- var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
- while (++x <= n) f[x] = m * x + b;
- return f;
- }
- function d3_layout_histogramRange(values) {
- return [ d3.min(values), d3.max(values) ];
- }
- function d3_layout_hierarchyRebind(object, hierarchy) {
- d3.rebind(object, hierarchy, "sort", "children", "value");
- object.links = d3_layout_hierarchyLinks;
- object.nodes = function(d) {
- d3_layout_hierarchyInline = true;
- return (object.nodes = object)(d);
- };
- return object;
- }
- function d3_layout_hierarchyChildren(d) {
- return d.children;
- }
- function d3_layout_hierarchyValue(d) {
- return d.value;
- }
- function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
- }
- function d3_layout_hierarchyLinks(nodes) {
- return d3.merge(nodes.map(function(parent) {
- return (parent.children || []).map(function(child) {
- return {
- source: parent,
- target: child
- };
- });
- }));
- }
- function d3_layout_packSort(a, b) {
- return a.value - b.value;
- }
- function d3_layout_packInsert(a, b) {
- var c = a._pack_next;
- a._pack_next = b;
- b._pack_prev = a;
- b._pack_next = c;
- c._pack_prev = b;
- }
- function d3_layout_packSplice(a, b) {
- a._pack_next = b;
- b._pack_prev = a;
- }
- function d3_layout_packIntersects(a, b) {
- var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
- return dr * dr - dx * dx - dy * dy > .001;
- }
- function d3_layout_packSiblings(node) {
- function bound(node) {
- xMin = Math.min(node.x - node.r, xMin);
- xMax = Math.max(node.x + node.r, xMax);
- yMin = Math.min(node.y - node.r, yMin);
- yMax = Math.max(node.y + node.r, yMax);
- }
- if (!(nodes = node.children) || !(n = nodes.length)) return;
- var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
- nodes.forEach(d3_layout_packLink);
- a = nodes[0];
- a.x = -a.r;
- a.y = 0;
- bound(a);
- if (n > 1) {
- b = nodes[1];
- b.x = b.r;
- b.y = 0;
- bound(b);
- if (n > 2) {
- c = nodes[2];
- d3_layout_packPlace(a, b, c);
- bound(c);
- d3_layout_packInsert(a, c);
- a._pack_prev = c;
- d3_layout_packInsert(c, b);
- b = a._pack_next;
- for (i = 3; i < n; i++) {
- d3_layout_packPlace(a, b, c = nodes[i]);
- var isect = 0, s1 = 1, s2 = 1;
- for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
- if (d3_layout_packIntersects(j, c)) {
- isect = 1;
- break;
- }
- }
- if (isect == 1) {
- for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
- if (d3_layout_packIntersects(k, c)) {
- break;
- }
- }
- }
- if (isect) {
- if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
- i--;
- } else {
- d3_layout_packInsert(a, c);
- b = c;
- bound(c);
- }
- }
- }
- }
- var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
- for (i = 0; i < n; i++) {
- c = nodes[i];
- c.x -= cx;
- c.y -= cy;
- cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
- }
- node.r = cr;
- nodes.forEach(d3_layout_packUnlink);
- }
- function d3_layout_packLink(node) {
- node._pack_next = node._pack_prev = node;
- }
- function d3_layout_packUnlink(node) {
- delete node._pack_next;
- delete node._pack_prev;
- }
- function d3_layout_packTransform(node, x, y, k) {
- var children = node.children;
- node.x = x += k * node.x;
- node.y = y += k * node.y;
- node.r *= k;
- if (children) {
- var i = -1, n = children.length;
- while (++i < n) d3_layout_packTransform(children[i], x, y, k);
- }
- }
- function d3_layout_packPlace(a, b, c) {
- var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
- if (db && (dx || dy)) {
- var da = b.r + c.r, dc = dx * dx + dy * dy;
- da *= da;
- db *= db;
- var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
- c.x = a.x + x * dx + y * dy;
- c.y = a.y + x * dy - y * dx;
- } else {
- c.x = a.x + db;
- c.y = a.y;
- }
- }
- function d3_layout_clusterY(children) {
- return 1 + d3.max(children, function(child) {
- return child.y;
- });
- }
- function d3_layout_clusterX(children) {
- return children.reduce(function(x, child) {
- return x + child.x;
- }, 0) / children.length;
- }
- function d3_layout_clusterLeft(node) {
- var children = node.children;
- return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
- }
- function d3_layout_clusterRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
- }
- function d3_layout_treeSeparation(a, b) {
- return a.parent == b.parent ? 1 : 2;
- }
- function d3_layout_treeLeft(node) {
- var children = node.children;
- return children && children.length ? children[0] : node._tree.thread;
- }
- function d3_layout_treeRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? children[n - 1] : node._tree.thread;
- }
- function d3_layout_treeSearch(node, compare) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, n, i = -1;
- while (++i < n) {
- if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
- node = child;
- }
- }
- }
- return node;
- }
- function d3_layout_treeRightmost(a, b) {
- return a.x - b.x;
- }
- function d3_layout_treeLeftmost(a, b) {
- return b.x - a.x;
- }
- function d3_layout_treeDeepest(a, b) {
- return a.depth - b.depth;
- }
- function d3_layout_treeVisitAfter(node, callback) {
- function visit(node, previousSibling) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, previousChild = null, i = -1, n;
- while (++i < n) {
- child = children[i];
- visit(child, previousChild);
- previousChild = child;
- }
- }
- callback(node, previousSibling);
- }
- visit(node, null);
- }
- function d3_layout_treeShift(node) {
- var shift = 0, change = 0, children = node.children, i = children.length, child;
- while (--i >= 0) {
- child = children[i]._tree;
- child.prelim += shift;
- child.mod += shift;
- shift += child.shift + (change += child.change);
- }
- }
- function d3_layout_treeMove(ancestor, node, shift) {
- ancestor = ancestor._tree;
- node = node._tree;
- var change = shift / (node.number - ancestor.number);
- ancestor.change += change;
- node.change -= change;
- node.shift += shift;
- node.prelim += shift;
- node.mod += shift;
- }
- function d3_layout_treeAncestor(vim, node, ancestor) {
- return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
- }
- function d3_layout_treemapPadNull(node) {
- return {
- x: node.x,
- y: node.y,
- dx: node.dx,
- dy: node.dy
- };
- }
- function d3_layout_treemapPad(node, padding) {
- var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
- if (dx < 0) {
- x += dx / 2;
- dx = 0;
- }
- if (dy < 0) {
- y += dy / 2;
- dy = 0;
- }
- return {
- x: x,
- y: y,
- dx: dx,
- dy: dy
- };
- }
- function d3_dsv(delimiter, mimeType) {
- function dsv(url, callback) {
- d3.text(url, mimeType, function(text) {
- callback(text && dsv.parse(text));
- });
- }
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
- function formatValue(text) {
- return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
- }
- var reParse = new RegExp("\r\n|[" + delimiter + "\r\n]", "g"), reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
- dsv.parse = function(text) {
- var header;
- return dsv.parseRows(text, function(row, i) {
- if (i) {
- var o = {}, j = -1, m = header.length;
- while (++j < m) o[header[j]] = row[j];
- return o;
- } else {
- header = row;
- return null;
- }
- });
- };
- dsv.parseRows = function(text, f) {
- function token() {
- if (reParse.lastIndex >= text.length) return EOF;
- if (eol) {
- eol = false;
- return EOL;
- }
- var j = reParse.lastIndex;
- if (text.charCodeAt(j) === 34) {
- var i = j;
- while (i++ < text.length) {
- if (text.charCodeAt(i) === 34) {
- if (text.charCodeAt(i + 1) !== 34) break;
- i++;
- }
- }
- reParse.lastIndex = i + 2;
- var c = text.charCodeAt(i + 1);
- if (c === 13) {
- eol = true;
- if (text.charCodeAt(i + 2) === 10) reParse.lastIndex++;
- } else if (c === 10) {
- eol = true;
- }
- return text.substring(j + 1, i).replace(/""/g, '"');
- }
- var m = reParse.exec(text);
- if (m) {
- eol = m[0].charCodeAt(0) !== delimiterCode;
- return text.substring(j, m.index);
- }
- reParse.lastIndex = text.length;
- return text.substring(j);
- }
- var EOL = {}, EOF = {}, rows = [], n = 0, t, eol;
- reParse.lastIndex = 0;
- while ((t = token()) !== EOF) {
- var a = [];
- while (t !== EOL && t !== EOF) {
- a.push(t);
- t = token();
- }
- if (f && !(a = f(a, n++))) continue;
- rows.push(a);
- }
- return rows;
- };
- dsv.format = function(rows) {
- return rows.map(formatRow).join("\n");
- };
- return dsv;
- }
- function d3_geo_type(types, defaultValue) {
- return function(object) {
- return object && types.hasOwnProperty(object.type) ? types[object.type](object) : defaultValue;
- };
- }
- function d3_path_circle(radius) {
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + +2 * radius + "z";
- }
- function d3_geo_bounds(o, f) {
- if (d3_geo_boundsTypes.hasOwnProperty(o.type)) d3_geo_boundsTypes[o.type](o, f);
- }
- function d3_geo_boundsFeature(o, f) {
- d3_geo_bounds(o.geometry, f);
- }
- function d3_geo_boundsFeatureCollection(o, f) {
- for (var a = o.features, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i].geometry, f);
- }
- }
- function d3_geo_boundsGeometryCollection(o, f) {
- for (var a = o.geometries, i = 0, n = a.length; i < n; i++) {
- d3_geo_bounds(a[i], f);
- }
- }
- function d3_geo_boundsLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_boundsMultiLineString(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsMultiPolygon(o, f) {
- for (var a = o.coordinates, i = 0, n = a.length; i < n; i++) {
- for (var b = a[i][0], j = 0, m = b.length; j < m; j++) {
- f.apply(null, b[j]);
- }
- }
- }
- function d3_geo_boundsPoint(o, f) {
- f.apply(null, o.coordinates);
- }
- function d3_geo_boundsPolygon(o, f) {
- for (var a = o.coordinates[0], i = 0, n = a.length; i < n; i++) {
- f.apply(null, a[i]);
- }
- }
- function d3_geo_greatArcSource(d) {
- return d.source;
- }
- function d3_geo_greatArcTarget(d) {
- return d.target;
- }
- function d3_geo_greatArcInterpolator() {
- function interpolate(t) {
- var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
- return [ Math.atan2(y, x) / d3_geo_radians, Math.atan2(z, Math.sqrt(x * x + y * y)) / d3_geo_radians ];
- }
- var x0, y0, cy0, sy0, kx0, ky0, x1, y1, cy1, sy1, kx1, ky1, d, k;
- interpolate.distance = function() {
- if (d == null) k = 1 / Math.sin(d = Math.acos(Math.max(-1, Math.min(1, sy0 * sy1 + cy0 * cy1 * Math.cos(x1 - x0)))));
- return d;
- };
- interpolate.source = function(_) {
- var cx0 = Math.cos(x0 = _[0] * d3_geo_radians), sx0 = Math.sin(x0);
- cy0 = Math.cos(y0 = _[1] * d3_geo_radians);
- sy0 = Math.sin(y0);
- kx0 = cy0 * cx0;
- ky0 = cy0 * sx0;
- d = null;
- return interpolate;
- };
- interpolate.target = function(_) {
- var cx1 = Math.cos(x1 = _[0] * d3_geo_radians), sx1 = Math.sin(x1);
- cy1 = Math.cos(y1 = _[1] * d3_geo_radians);
- sy1 = Math.sin(y1);
- kx1 = cy1 * cx1;
- ky1 = cy1 * sx1;
- d = null;
- return interpolate;
- };
- return interpolate;
- }
- function d3_geo_greatArcInterpolate(a, b) {
- var i = d3_geo_greatArcInterpolator().source(a).target(b);
- i.distance();
- return i;
- }
- function d3_geom_contourStart(grid) {
- var x = 0, y = 0;
- while (true) {
- if (grid(x, y)) {
- return [ x, y ];
- }
- if (x === 0) {
- x = y + 1;
- y = 0;
- } else {
- x = x - 1;
- y = y + 1;
- }
- }
- }
- function d3_geom_hullCCW(i1, i2, i3, v) {
- var t, a, b, c, d, e, f;
- t = v[i1];
- a = t[0];
- b = t[1];
- t = v[i2];
- c = t[0];
- d = t[1];
- t = v[i3];
- e = t[0];
- f = t[1];
- return (f - b) * (c - a) - (d - b) * (e - a) > 0;
- }
- function d3_geom_polygonInside(p, a, b) {
- return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
- }
- function d3_geom_polygonIntersect(c, d, a, b) {
- var x1 = c[0], x2 = d[0], x3 = a[0], x4 = b[0], y1 = c[1], y2 = d[1], y3 = a[1], y4 = b[1], x13 = x1 - x3, x21 = x2 - x1, x43 = x4 - x3, y13 = y1 - y3, y21 = y2 - y1, y43 = y4 - y3, ua = (x43 * y13 - y43 * x13) / (y43 * x21 - x43 * y21);
- return [ x1 + ua * x21, y1 + ua * y21 ];
- }
- function d3_voronoi_tessellate(vertices, callback) {
- var Sites = {
- list: vertices.map(function(v, i) {
- return {
- index: i,
- x: v[0],
- y: v[1]
- };
- }).sort(function(a, b) {
- return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0;
- }),
- bottomSite: null
- };
- var EdgeList = {
- list: [],
- leftEnd: null,
- rightEnd: null,
- init: function() {
- EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.leftEnd.r = EdgeList.rightEnd;
- EdgeList.rightEnd.l = EdgeList.leftEnd;
- EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
- },
- createHalfEdge: function(edge, side) {
- return {
- edge: edge,
- side: side,
- vertex: null,
- l: null,
- r: null
- };
- },
- insert: function(lb, he) {
- he.l = lb;
- he.r = lb.r;
- lb.r.l = he;
- lb.r = he;
- },
- leftBound: function(p) {
- var he = EdgeList.leftEnd;
- do {
- he = he.r;
- } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
- he = he.l;
- return he;
- },
- del: function(he) {
- he.l.r = he.r;
- he.r.l = he.l;
- he.edge = null;
- },
- right: function(he) {
- return he.r;
- },
- left: function(he) {
- return he.l;
- },
- leftRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[he.side];
- },
- rightRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[d3_voronoi_opposite[he.side]];
- }
- };
- var Geom = {
- bisect: function(s1, s2) {
- var newEdge = {
- region: {
- l: s1,
- r: s2
- },
- ep: {
- l: null,
- r: null
- }
- };
- var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy;
- newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5;
- if (adx > ady) {
- newEdge.a = 1;
- newEdge.b = dy / dx;
- newEdge.c /= dx;
- } else {
- newEdge.b = 1;
- newEdge.a = dx / dy;
- newEdge.c /= dy;
- }
- return newEdge;
- },
- intersect: function(el1, el2) {
- var e1 = el1.edge, e2 = el2.edge;
- if (!e1 || !e2 || e1.region.r == e2.region.r) {
- return null;
- }
- var d = e1.a * e2.b - e1.b * e2.a;
- if (Math.abs(d) < 1e-10) {
- return null;
- }
- var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e;
- if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) {
- el = el1;
- e = e1;
- } else {
- el = el2;
- e = e2;
- }
- var rightOfSite = xint >= e.region.r.x;
- if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") {
- return null;
- }
- return {
- x: xint,
- y: yint
- };
- },
- rightOf: function(he, p) {
- var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
- if (rightOfSite && he.side === "l") {
- return 1;
- }
- if (!rightOfSite && he.side === "r") {
- return 0;
- }
- if (e.a === 1) {
- var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0;
- if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) {
- above = fast = dyp >= e.b * dxp;
- } else {
- above = p.x + p.y * e.b > e.c;
- if (e.b < 0) {
- above = !above;
- }
- if (!above) {
- fast = 1;
- }
- }
- if (!fast) {
- var dxs = topsite.x - e.region.l.x;
- above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b);
- if (e.b < 0) {
- above = !above;
- }
- }
- } else {
- var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y;
- above = t1 * t1 > t2 * t2 + t3 * t3;
- }
- return he.side === "l" ? above : !above;
- },
- endPoint: function(edge, side, site) {
- edge.ep[side] = site;
- if (!edge.ep[d3_voronoi_opposite[side]]) return;
- callback(edge);
- },
- distance: function(s, t) {
- var dx = s.x - t.x, dy = s.y - t.y;
- return Math.sqrt(dx * dx + dy * dy);
- }
- };
- var EventQueue = {
- list: [],
- insert: function(he, site, offset) {
- he.vertex = site;
- he.ystar = site.y + offset;
- for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) {
- var next = list[i];
- if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) {
- continue;
- } else {
- break;
- }
- }
- list.splice(i, 0, he);
- },
- del: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {}
- ls.splice(i, 1);
- },
- empty: function() {
- return EventQueue.list.length === 0;
- },
- nextEvent: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) {
- if (ls[i] == he) return ls[i + 1];
- }
- return null;
- },
- min: function() {
- var elem = EventQueue.list[0];
- return {
- x: elem.vertex.x,
- y: elem.ystar
- };
- },
- extractMin: function() {
- return EventQueue.list.shift();
- }
- };
- EdgeList.init();
- Sites.bottomSite = Sites.list.shift();
- var newSite = Sites.list.shift(), newIntStar;
- var lbnd, rbnd, llbnd, rrbnd, bisector;
- var bot, top, temp, p, v;
- var e, pm;
- while (true) {
- if (!EventQueue.empty()) {
- newIntStar = EventQueue.min();
- }
- if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) {
- lbnd = EdgeList.leftBound(newSite);
- rbnd = EdgeList.right(lbnd);
- bot = EdgeList.rightRegion(lbnd);
- e = Geom.bisect(bot, newSite);
- bisector = EdgeList.createHalfEdge(e, "l");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(lbnd, bisector);
- if (p) {
- EventQueue.del(lbnd);
- EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
- }
- lbnd = bisector;
- bisector = EdgeList.createHalfEdge(e, "r");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(bisector, rbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, newSite));
- }
- newSite = Sites.list.shift();
- } else if (!EventQueue.empty()) {
- lbnd = EventQueue.extractMin();
- llbnd = EdgeList.left(lbnd);
- rbnd = EdgeList.right(lbnd);
- rrbnd = EdgeList.right(rbnd);
- bot = EdgeList.leftRegion(lbnd);
- top = EdgeList.rightRegion(rbnd);
- v = lbnd.vertex;
- Geom.endPoint(lbnd.edge, lbnd.side, v);
- Geom.endPoint(rbnd.edge, rbnd.side, v);
- EdgeList.del(lbnd);
- EventQueue.del(rbnd);
- EdgeList.del(rbnd);
- pm = "l";
- if (bot.y > top.y) {
- temp = bot;
- bot = top;
- top = temp;
- pm = "r";
- }
- e = Geom.bisect(bot, top);
- bisector = EdgeList.createHalfEdge(e, pm);
- EdgeList.insert(llbnd, bisector);
- Geom.endPoint(e, d3_voronoi_opposite[pm], v);
- p = Geom.intersect(llbnd, bisector);
- if (p) {
- EventQueue.del(llbnd);
- EventQueue.insert(llbnd, p, Geom.distance(p, bot));
- }
- p = Geom.intersect(bisector, rrbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, bot));
- }
- } else {
- break;
- }
- }
- for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) {
- callback(lbnd.edge);
- }
- }
- function d3_geom_quadtreeNode() {
- return {
- leaf: true,
- nodes: [],
- point: null
- };
- }
- function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
- if (!f(node, x1, y1, x2, y2)) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
- if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
- if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
- if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
- if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
- }
- }
- function d3_geom_quadtreePoint(p) {
- return {
- x: p[0],
- y: p[1]
- };
- }
- function d3_time_utc() {
- this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
- }
- function d3_time_formatAbbreviate(name) {
- return name.substring(0, 3);
- }
- function d3_time_parse(date, template, string, j) {
- var c, p, i = 0, n = template.length, m = string.length;
- while (i < n) {
- if (j >= m) return -1;
- c = template.charCodeAt(i++);
- if (c == 37) {
- p = d3_time_parsers[template.charAt(i++)];
- if (!p || (j = p(date, string, j)) < 0) return -1;
- } else if (c != string.charCodeAt(j++)) {
- return -1;
- }
- }
- return j;
- }
- function d3_time_formatRe(names) {
- return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
- }
- function d3_time_formatLookup(names) {
- var map = new d3_Map, i = -1, n = names.length;
- while (++i < n) map.set(names[i].toLowerCase(), i);
- return map;
- }
- function d3_time_parseWeekdayAbbrev(date, string, i) {
- d3_time_dayAbbrevRe.lastIndex = 0;
- var n = d3_time_dayAbbrevRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseWeekday(date, string, i) {
- d3_time_dayRe.lastIndex = 0;
- var n = d3_time_dayRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseMonthAbbrev(date, string, i) {
- d3_time_monthAbbrevRe.lastIndex = 0;
- var n = d3_time_monthAbbrevRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseMonth(date, string, i) {
- d3_time_monthRe.lastIndex = 0;
- var n = d3_time_monthRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseLocaleFull(date, string, i) {
- return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
- }
- function d3_time_parseLocaleDate(date, string, i) {
- return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
- }
- function d3_time_parseLocaleTime(date, string, i) {
- return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
- }
- function d3_time_parseFullYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 4));
- return n ? (date.y = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.y = d3_time_expandYear(+n[0]), i += n[0].length) : -1;
- }
- function d3_time_expandYear(d) {
- return d + (d > 68 ? 1900 : 2e3);
- }
- function d3_time_parseMonthNumber(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.m = n[0] - 1, i += n[0].length) : -1;
- }
- function d3_time_parseDay(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.d = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseHour24(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.H = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMinutes(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.M = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseSeconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.S = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMilliseconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 3));
- return n ? (date.L = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseAmPm(date, string, i) {
- var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());
- return n == null ? -1 : (date.p = n, i);
- }
- function d3_time_zone(d) {
- var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60;
- return zs + d3_time_zfill2(zh) + d3_time_zfill2(zm);
- }
- function d3_time_formatIsoNative(date) {
- return date.toISOString();
- }
- function d3_time_interval(local, step, number) {
- function round(date) {
- var d0 = local(date), d1 = offset(d0, 1);
- return date - d0 < d1 - date ? d0 : d1;
- }
- function ceil(date) {
- step(date = local(new d3_time(date - 1)), 1);
- return date;
- }
- function offset(date, k) {
- step(date = new d3_time(+date), k);
- return date;
- }
- function range(t0, t1, dt) {
- var time = ceil(t0), times = [];
- if (dt > 1) {
- while (time < t1) {
- if (!(number(time) % dt)) times.push(new Date(+time));
- step(time, 1);
- }
- } else {
- while (time < t1) times.push(new Date(+time)), step(time, 1);
- }
- return times;
- }
- function range_utc(t0, t1, dt) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = t0;
- return range(utc, t1, dt);
- } finally {
- d3_time = Date;
- }
- }
- local.floor = local;
- local.round = round;
- local.ceil = ceil;
- local.offset = offset;
- local.range = range;
- var utc = local.utc = d3_time_interval_utc(local);
- utc.floor = utc;
- utc.round = d3_time_interval_utc(round);
- utc.ceil = d3_time_interval_utc(ceil);
- utc.offset = d3_time_interval_utc(offset);
- utc.range = range_utc;
- return local;
- }
- function d3_time_interval_utc(method) {
- return function(date, k) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc;
- utc._ = date;
- return method(utc, k)._;
- } finally {
- d3_time = Date;
- }
- };
- }
- function d3_time_scale(linear, methods, format) {
- function scale(x) {
- return linear(x);
- }
- scale.invert = function(x) {
- return d3_time_scaleDate(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
- linear.domain(x);
- return scale;
- };
- scale.nice = function(m) {
- return scale.domain(d3_scale_nice(scale.domain(), function() {
- return m;
- }));
- };
- scale.ticks = function(m, k) {
- var extent = d3_time_scaleExtent(scale.domain());
- if (typeof m !== "function") {
- var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
- if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
- if (!i) return linear.ticks(m).map(d3_time_scaleDate);
- if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
- m = methods[i];
- k = m[1];
- m = m[0].range;
- }
- return m(extent[0], new Date(+extent[1] + 1), k);
- };
- scale.tickFormat = function() {
- return format;
- };
- scale.copy = function() {
- return d3_time_scale(linear.copy(), methods, format);
- };
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_time_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_time_scaleDate(t) {
- return new Date(t);
- }
- function d3_time_scaleFormat(formats) {
- return function(date) {
- var i = formats.length - 1, f = formats[i];
- while (!f[1](date)) f = formats[--i];
- return f[0](date);
- };
- }
- function d3_time_scaleSetYear(y) {
- var d = new Date(y, 0, 1);
- d.setFullYear(y);
- return d;
- }
- function d3_time_scaleGetYear(d) {
- var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- function d3_time_scaleUTCSetYear(y) {
- var d = new Date(Date.UTC(y, 0, 1));
- d.setUTCFullYear(y);
- return d;
- }
- function d3_time_scaleUTCGetYear(d) {
- var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- if (!Date.now) Date.now = function() {
- return +(new Date);
- };
- try {
- document.createElement("div").style.setProperty("opacity", 0, "");
- } catch (error) {
- var d3_style_prototype = CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
- d3_style_prototype.setProperty = function(name, value, priority) {
- d3_style_setProperty.call(this, name, value + "", priority);
- };
- }
- d3 = {
- version: "2.10.2"
- };
- var d3_array = d3_arraySlice;
- try {
- d3_array(document.documentElement.childNodes)[0].nodeType;
- } catch (e) {
- d3_array = d3_arrayCopy;
- }
- var d3_arraySubclass = [].__proto__ ? function(array, prototype) {
- array.__proto__ = prototype;
- } : function(array, prototype) {
- for (var property in prototype) array[property] = prototype[property];
- };
- d3.map = function(object) {
- var map = new d3_Map;
- for (var key in object) map.set(key, object[key]);
- return map;
- };
- d3_class(d3_Map, {
- has: function(key) {
- return d3_map_prefix + key in this;
- },
- get: function(key) {
- return this[d3_map_prefix + key];
- },
- set: function(key, value) {
- return this[d3_map_prefix + key] = value;
- },
- remove: function(key) {
- key = d3_map_prefix + key;
- return key in this && delete this[key];
- },
- keys: function() {
- var keys = [];
- this.forEach(function(key) {
- keys.push(key);
- });
- return keys;
- },
- values: function() {
- var values = [];
- this.forEach(function(key, value) {
- values.push(value);
- });
- return values;
- },
- entries: function() {
- var entries = [];
- this.forEach(function(key, value) {
- entries.push({
- key: key,
- value: value
- });
- });
- return entries;
- },
- forEach: function(f) {
- for (var key in this) {
- if (key.charCodeAt(0) === d3_map_prefixCode) {
- f.call(this, key.substring(1), this[key]);
- }
- }
- }
- });
- var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
- d3.functor = d3_functor;
- d3.rebind = function(target, source) {
- var i = 1, n = arguments.length, method;
- while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
- return target;
- };
- d3.ascending = function(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- };
- d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
- };
- d3.mean = function(array, f) {
- var n = array.length, a, m = 0, i = -1, j = 0;
- if (arguments.length === 1) {
- while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;
- } else {
- while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;
- }
- return j ? m : undefined;
- };
- d3.median = function(array, f) {
- if (arguments.length > 1) array = array.map(f);
- array = array.filter(d3_number);
- return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;
- };
- d3.min = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && a > b) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
- }
- return a;
- };
- d3.max = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && b > a) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
- }
- return a;
- };
- d3.extent = function(array, f) {
- var i = -1, n = array.length, a, b, c;
- if (arguments.length === 1) {
- while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;
- while (++i < n) if ((b = array[i]) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- } else {
- while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- }
- return [ a, c ];
- };
- d3.random = {
- normal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- return function() {
- var x, y, r;
- do {
- x = Math.random() * 2 - 1;
- y = Math.random() * 2 - 1;
- r = x * x + y * y;
- } while (!r || r > 1);
- return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
- };
- },
- logNormal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- var random = d3.random.normal();
- return function() {
- return Math.exp(µ + σ * random());
- };
- },
- irwinHall: function(m) {
- return function() {
- for (var s = 0, j = 0; j < m; j++) s += Math.random();
- return s / m;
- };
- }
- };
- d3.sum = function(array, f) {
- var s = 0, n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (!isNaN(a = +array[i])) s += a;
- } else {
- while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
- }
- return s;
- };
- d3.quantile = function(values, p) {
- var H = (values.length - 1) * p + 1, h = Math.floor(H), v = values[h - 1], e = H - h;
- return e ? v + e * (values[h] - v) : v;
- };
- d3.transpose = function(matrix) {
- return d3.zip.apply(d3, matrix);
- };
- d3.zip = function() {
- if (!(n = arguments.length)) return [];
- for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
- for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
- zip[j] = arguments[j][i];
- }
- }
- return zips;
- };
- d3.bisector = function(f) {
- return {
- left: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1;
- }
- return lo;
- }
- };
- };
- var d3_bisector = d3.bisector(function(d) {
- return d;
- });
- d3.bisectLeft = d3_bisector.left;
- d3.bisect = d3.bisectRight = d3_bisector.right;
- d3.first = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) > 0) {
- a = b;
- }
- }
- return a;
- };
- d3.last = function(array, f) {
- var i = 0, n = array.length, a = array[0], b;
- if (arguments.length === 1) f = d3.ascending;
- while (++i < n) {
- if (f.call(array, a, b = array[i]) <= 0) {
- a = b;
- }
- }
- return a;
- };
- d3.nest = function() {
- function map(array, depth) {
- if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
- var i = -1, n = array.length, key = keys[depth++], keyValue, object, valuesByKey = new d3_Map, values, o = {};
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
- values.push(object);
- } else {
- valuesByKey.set(keyValue, [ object ]);
- }
- }
- valuesByKey.forEach(function(keyValue, values) {
- o[keyValue] = map(values, depth);
- });
- return o;
- }
- function entries(map, depth) {
- if (depth >= keys.length) return map;
- var a = [], sortKey = sortKeys[depth++], key;
- for (key in map) {
- a.push({
- key: key,
- values: entries(map[key], depth)
- });
- }
- if (sortKey) a.sort(function(a, b) {
- return sortKey(a.key, b.key);
- });
- return a;
- }
- var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
- nest.map = function(array) {
- return map(array, 0);
- };
- nest.entries = function(array) {
- return entries(map(array, 0), 0);
- };
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
- return nest;
- };
- d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
- };
- d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
- };
- d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({
- key: key,
- value: map[key]
- });
- return entries;
- };
- d3.permute = function(array, indexes) {
- var permutes = [], i = -1, n = indexes.length;
- while (++i < n) permutes[i] = array[indexes[i]];
- return permutes;
- };
- d3.merge = function(arrays) {
- return Array.prototype.concat.apply([], arrays);
- };
- d3.split = function(array, f) {
- var arrays = [], values = [], value, i = -1, n = array.length;
- if (arguments.length < 2) f = d3_splitter;
- while (++i < n) {
- if (f.call(values, value = array[i], i)) {
- values = [];
- } else {
- if (!values.length) arrays.push(values);
- values.push(value);
- }
- }
- return arrays;
- };
- d3.range = function(start, stop, step) {
- if (arguments.length < 3) {
- step = 1;
- if (arguments.length < 2) {
- stop = start;
- start = 0;
- }
- }
- if ((stop - start) / step === Infinity) throw new Error("infinite range");
- var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j;
- start *= k, stop *= k, step *= k;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
- return range;
- };
- d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
- };
- var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
- d3.round = function(x, n) {
- return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
- };
- d3.xhr = function(url, mime, callback) {
- var req = new XMLHttpRequest;
- if (arguments.length < 3) callback = mime, mime = null; else if (mime && req.overrideMimeType) req.overrideMimeType(mime);
- req.open("GET", url, true);
- if (mime) req.setRequestHeader("Accept", mime);
- req.onreadystatechange = function() {
- if (req.readyState === 4) {
- var s = req.status;
- callback(!s && req.response || s >= 200 && s < 300 || s === 304 ? req : null);
- }
- };
- req.send(null);
- };
- d3.text = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseText);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- d3.json = function(url, callback) {
- d3.text(url, "application/json", function(text) {
- callback(text ? JSON.parse(text) : null);
- });
- };
- d3.html = function(url, callback) {
- d3.text(url, "text/html", function(text) {
- if (text != null) {
- var range = document.createRange();
- range.selectNode(document.body);
- text = range.createContextualFragment(text);
- }
- callback(text);
- });
- };
- d3.xml = function(url, mime, callback) {
- function ready(req) {
- callback(req && req.responseXML);
- }
- if (arguments.length < 3) {
- callback = mime;
- mime = null;
- }
- d3.xhr(url, mime, ready);
- };
- var d3_nsPrefix = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- };
- d3.ns = {
- prefix: d3_nsPrefix,
- qualify: function(name) {
- var i = name.indexOf(":"), prefix = name;
- if (i >= 0) {
- prefix = name.substring(0, i);
- name = name.substring(i + 1);
- }
- return d3_nsPrefix.hasOwnProperty(prefix) ? {
- space: d3_nsPrefix[prefix],
- local: name
- } : name;
- }
- };
- d3.dispatch = function() {
- var dispatch = new d3_dispatch, i = -1, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- return dispatch;
- };
- d3_dispatch.prototype.on = function(type, listener) {
- var i = type.indexOf("."), name = "";
- if (i > 0) {
- name = type.substring(i + 1);
- type = type.substring(0, i);
- }
- return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
- };
- d3.format = function(specifier) {
- var match = d3_format_re.exec(specifier), fill = match[1] || " ", sign = match[3] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
- if (precision) precision = +precision.substring(1);
- if (zfill) {
- fill = "0";
- if (comma) width -= Math.floor((width - 1) / 4);
- }
- switch (type) {
- case "n":
- comma = true;
- type = "g";
- break;
- case "%":
- scale = 100;
- suffix = "%";
- type = "f";
- break;
- case "p":
- scale = 100;
- suffix = "%";
- type = "r";
- break;
- case "d":
- integer = true;
- precision = 0;
- break;
- case "s":
- scale = -1;
- type = "r";
- break;
- }
- if (type == "r" && !precision) type = "g";
- type = d3_format_types.get(type) || d3_format_typeDefault;
- return function(value) {
- if (integer && value % 1) return "";
- var negative = value < 0 && (value = -value) ? "-" : sign;
- if (scale < 0) {
- var prefix = d3.formatPrefix(value, precision);
- value = prefix.scale(value);
- suffix = prefix.symbol;
- } else {
- value *= scale;
- }
- value = type(value, precision);
- if (zfill) {
- var length = value.length + negative.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- if (comma) value = d3_format_group(value);
- value = negative + value;
- } else {
- if (comma) value = d3_format_group(value);
- value = negative + value;
- var length = value.length;
- if (length < width) value = (new Array(width - length + 1)).join(fill) + value;
- }
- return value + suffix;
- };
- };
- var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/;
- var d3_format_types = d3.map({
- g: function(x, p) {
- return x.toPrecision(p);
- },
- e: function(x, p) {
- return x.toExponential(p);
- },
- f: function(x, p) {
- return x.toFixed(p);
- },
- r: function(x, p) {
- return d3.round(x, p = d3_format_precision(x, p)).toFixed(Math.max(0, Math.min(20, p)));
- }
- });
- var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "μ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
- d3.formatPrefix = function(value, precision) {
- var i = 0;
- if (value) {
- if (value < 0) value *= -1;
- if (precision) value = d3.round(value, d3_format_precision(value, precision));
- i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
- i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));
- }
- return d3_formatPrefixes[8 + i / 3];
- };
- var d3_ease_quad = d3_ease_poly(2), d3_ease_cubic = d3_ease_poly(3), d3_ease_default = function() {
- return d3_ease_identity;
- };
- var d3_ease = d3.map({
- linear: d3_ease_default,
- poly: d3_ease_poly,
- quad: function() {
- return d3_ease_quad;
- },
- cubic: function() {
- return d3_ease_cubic;
- },
- sin: function() {
- return d3_ease_sin;
- },
- exp: function() {
- return d3_ease_exp;
- },
- circle: function() {
- return d3_ease_circle;
- },
- elastic: d3_ease_elastic,
- back: d3_ease_back,
- bounce: function() {
- return d3_ease_bounce;
- }
- });
- var d3_ease_mode = d3.map({
- "in": d3_ease_identity,
- out: d3_ease_reverse,
- "in-out": d3_ease_reflect,
- "out-in": function(f) {
- return d3_ease_reflect(d3_ease_reverse(f));
- }
- });
- d3.ease = function(name) {
- var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in";
- t = d3_ease.get(t) || d3_ease_default;
- m = d3_ease_mode.get(m) || d3_ease_identity;
- return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));
- };
- d3.event = null;
- d3.transform = function(string) {
- var g = document.createElementNS(d3.ns.prefix.svg, "g");
- return (d3.transform = function(string) {
- g.setAttribute("transform", string);
- var t = g.transform.baseVal.consolidate();
- return new d3_transform(t ? t.matrix : d3_transformIdentity);
- })(string);
- };
- d3_transform.prototype.toString = function() {
- return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
- };
- var d3_transformDegrees = 180 / Math.PI, d3_transformIdentity = {
- a: 1,
- b: 0,
- c: 0,
- d: 1,
- e: 0,
- f: 0
- };
- d3.interpolate = function(a, b) {
- var i = d3.interpolators.length, f;
- while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
- return f;
- };
- d3.interpolateNumber = function(a, b) {
- b -= a;
- return function(t) {
- return a + b * t;
- };
- };
- d3.interpolateRound = function(a, b) {
- b -= a;
- return function(t) {
- return Math.round(a + b * t);
- };
- };
- d3.interpolateString = function(a, b) {
- var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
- d3_interpolate_number.lastIndex = 0;
- for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
- if (m.index) s.push(b.substring(s0, s1 = m.index));
- q.push({
- i: s.length,
- x: m[0]
- });
- s.push(null);
- s0 = d3_interpolate_number.lastIndex;
- }
- if (s0 < b.length) s.push(b.substring(s0));
- for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
- o = q[i];
- if (o.x == m[0]) {
- if (o.i) {
- if (s[o.i + 1] == null) {
- s[o.i - 1] += o.x;
- s.splice(o.i, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- } else {
- s[o.i - 1] += o.x + s[o.i + 1];
- s.splice(o.i, 2);
- for (j = i + 1; j < n; ++j) q[j].i -= 2;
- }
- } else {
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- }
- }
- q.splice(i, 1);
- n--;
- i--;
- } else {
- o.x = d3.interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
- }
- }
- while (i < n) {
- o = q.pop();
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- }
- n--;
- }
- if (s.length === 1) {
- return s[0] == null ? q[0].x : function() {
- return b;
- };
- }
- return function(t) {
- for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateTransform = function(a, b) {
- var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
- if (ta[0] != tb[0] || ta[1] != tb[1]) {
- s.push("translate(", null, ",", null, ")");
- q.push({
- i: 1,
- x: d3.interpolateNumber(ta[0], tb[0])
- }, {
- i: 3,
- x: d3.interpolateNumber(ta[1], tb[1])
- });
- } else if (tb[0] || tb[1]) {
- s.push("translate(" + tb + ")");
- } else {
- s.push("");
- }
- if (ra != rb) {
- if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
- q.push({
- i: s.push(s.pop() + "rotate(", null, ")") - 2,
- x: d3.interpolateNumber(ra, rb)
- });
- } else if (rb) {
- s.push(s.pop() + "rotate(" + rb + ")");
- }
- if (wa != wb) {
- q.push({
- i: s.push(s.pop() + "skewX(", null, ")") - 2,
- x: d3.interpolateNumber(wa, wb)
- });
- } else if (wb) {
- s.push(s.pop() + "skewX(" + wb + ")");
- }
- if (ka[0] != kb[0] || ka[1] != kb[1]) {
- n = s.push(s.pop() + "scale(", null, ",", null, ")");
- q.push({
- i: n - 4,
- x: d3.interpolateNumber(ka[0], kb[0])
- }, {
- i: n - 2,
- x: d3.interpolateNumber(ka[1], kb[1])
- });
- } else if (kb[0] != 1 || kb[1] != 1) {
- s.push(s.pop() + "scale(" + kb + ")");
- }
- n = q.length;
- return function(t) {
- var i = -1, o;
- while (++i < n) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- };
- d3.interpolateRgb = function(a, b) {
- a = d3.rgb(a);
- b = d3.rgb(b);
- var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
- return function(t) {
- return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
- };
- };
- d3.interpolateHsl = function(a, b) {
- a = d3.hsl(a);
- b = d3.hsl(b);
- var h0 = a.h, s0 = a.s, l0 = a.l, h1 = b.h - h0, s1 = b.s - s0, l1 = b.l - l0;
- if (h1 > 180) h1 -= 360; else if (h1 < -180) h1 += 360;
- return function(t) {
- return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t) + "";
- };
- };
- d3.interpolateLab = function(a, b) {
- a = d3.lab(a);
- b = d3.lab(b);
- var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
- return function(t) {
- return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- };
- d3.interpolateHcl = function(a, b) {
- a = d3.hcl(a);
- b = d3.hcl(b);
- var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
- return function(t) {
- return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
- };
- };
- d3.interpolateArray = function(a, b) {
- var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
- for (i = 0; i < n0; ++i) x.push(d3.interpolate(a[i], b[i]));
- for (; i < na; ++i) c[i] = a[i];
- for (; i < nb; ++i) c[i] = b[i];
- return function(t) {
- for (i = 0; i < n0; ++i) c[i] = x[i](t);
- return c;
- };
- };
- d3.interpolateObject = function(a, b) {
- var i = {}, c = {}, k;
- for (k in a) {
- if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
- } else {
- c[k] = a[k];
- }
- }
- for (k in b) {
- if (!(k in a)) {
- c[k] = b[k];
- }
- }
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
- };
- var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
- d3.interpolators = [ d3.interpolateObject, function(a, b) {
- return b instanceof Array && d3.interpolateArray(a, b);
- }, function(a, b) {
- return (typeof a === "string" || typeof b === "string") && d3.interpolateString(a + "", b + "");
- }, function(a, b) {
- return (typeof b === "string" ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) : b instanceof d3_Rgb || b instanceof d3_Hsl) && d3.interpolateRgb(a, b);
- }, function(a, b) {
- return !isNaN(a = +a) && !isNaN(b = +b) && d3.interpolateNumber(a, b);
- } ];
- d3.rgb = function(r, g, b) {
- return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b);
- };
- d3_Rgb.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- var r = this.r, g = this.g, b = this.b, i = 30;
- if (!r && !g && !b) return d3_rgb(i, i, i);
- if (r && r < i) r = i;
- if (g && g < i) g = i;
- if (b && b < i) b = i;
- return d3_rgb(Math.min(255, Math.floor(r / k)), Math.min(255, Math.floor(g / k)), Math.min(255, Math.floor(b / k)));
- };
- d3_Rgb.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_rgb(Math.floor(k * this.r), Math.floor(k * this.g), Math.floor(k * this.b));
- };
- d3_Rgb.prototype.hsl = function() {
- return d3_rgb_hsl(this.r, this.g, this.b);
- };
- d3_Rgb.prototype.toString = function() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
- };
- var d3_rgb_names = d3.map({
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- });
- d3_rgb_names.forEach(function(key, value) {
- d3_rgb_names.set(key, d3_rgb_parse(value, d3_rgb, d3_hsl_rgb));
- });
- d3.hsl = function(h, s, l) {
- return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l);
- };
- d3_Hsl.prototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, this.l / k);
- };
- d3_Hsl.prototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, k * this.l);
- };
- d3_Hsl.prototype.rgb = function() {
- return d3_hsl_rgb(this.h, this.s, this.l);
- };
- d3_Hsl.prototype.toString = function() {
- return this.rgb().toString();
- };
- d3.hcl = function(h, c, l) {
- return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l);
- };
- d3_Hcl.prototype.brighter = function(k) {
- return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.darker = function(k) {
- return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_Hcl.prototype.rgb = function() {
- return d3_hcl_lab(this.h, this.c, this.l).rgb();
- };
- d3_Hcl.prototype.toString = function() {
- return this.rgb() + "";
- };
- d3.lab = function(l, a, b) {
- return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b);
- };
- var d3_lab_K = 18;
- var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
- d3_Lab.prototype.brighter = function(k) {
- return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.darker = function(k) {
- return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_Lab.prototype.rgb = function() {
- return d3_lab_rgb(this.l, this.a, this.b);
- };
- d3_Lab.prototype.toString = function() {
- return this.rgb() + "";
- };
- var d3_select = function(s, n) {
- return n.querySelector(s);
- }, d3_selectAll = function(s, n) {
- return n.querySelectorAll(s);
- }, d3_selectRoot = document.documentElement, d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector, d3_selectMatches = function(n, s) {
- return d3_selectMatcher.call(n, s);
- };
- if (typeof Sizzle === "function") {
- d3_select = function(s, n) {
- return Sizzle(s, n)[0] || null;
- };
- d3_selectAll = function(s, n) {
- return Sizzle.uniqueSort(Sizzle(s, n));
- };
- d3_selectMatches = Sizzle.matchesSelector;
- }
- var d3_selectionPrototype = [];
- d3.selection = function() {
- return d3_selectionRoot;
- };
- d3.selection.prototype = d3_selectionPrototype;
- d3_selectionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, group, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(subnode = selector.call(node, node.__data__, i));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));
- subgroup.parentNode = node;
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node();
- name = d3.ns.qualify(name);
- return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
- }
- for (value in name) this.each(d3_selection_attr(value, name[value]));
- return this;
- }
- return this.each(d3_selection_attr(name, value));
- };
- d3_selectionPrototype.classed = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1;
- if (value = node.classList) {
- while (++i < n) if (!value.contains(name[i])) return false;
- } else {
- value = node.className;
- if (value.baseVal != null) value = value.baseVal;
- while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
- }
- return true;
- }
- for (value in name) this.each(d3_selection_classed(value, name[value]));
- return this;
- }
- return this.each(d3_selection_classed(name, value));
- };
- d3_selectionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
- return this;
- }
- if (n < 2) return window.getComputedStyle(this.node(), null).getPropertyValue(name);
- priority = "";
- }
- return this.each(d3_selection_style(name, value, priority));
- };
- d3_selectionPrototype.property = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") return this.node()[name];
- for (value in name) this.each(d3_selection_property(value, name[value]));
- return this;
- }
- return this.each(d3_selection_property(name, value));
- };
- d3_selectionPrototype.text = function(value) {
- return arguments.length < 1 ? this.node().textContent : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- } : value == null ? function() {
- this.textContent = "";
- } : function() {
- this.textContent = value;
- });
- };
- d3_selectionPrototype.html = function(value) {
- return arguments.length < 1 ? this.node().innerHTML : this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- } : value == null ? function() {
- this.innerHTML = "";
- } : function() {
- this.innerHTML = value;
- });
- };
- d3_selectionPrototype.append = function(name) {
- function append() {
- return this.appendChild(document.createElementNS(this.namespaceURI, name));
- }
- function appendNS() {
- return this.appendChild(document.createElementNS(name.space, name.local));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? appendNS : append);
- };
- d3_selectionPrototype.insert = function(name, before) {
- function insert() {
- return this.insertBefore(document.createElementNS(this.namespaceURI, name), d3_select(before, this));
- }
- function insertNS() {
- return this.insertBefore(document.createElementNS(name.space, name.local), d3_select(before, this));
- }
- name = d3.ns.qualify(name);
- return this.select(name.local ? insertNS : insert);
- };
- d3_selectionPrototype.remove = function() {
- return this.each(function() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
- });
- };
- d3_selectionPrototype.data = function(value, key) {
- function bind(group, groupData) {
- var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), n1 = Math.max(n, m), updateNodes = [], enterNodes = [], exitNodes = [], node, nodeData;
- if (key) {
- var nodeByKeyValue = new d3_Map, keyValues = [], keyValue, j = groupData.length;
- for (i = -1; ++i < n; ) {
- keyValue = key.call(node = group[i], node.__data__, i);
- if (nodeByKeyValue.has(keyValue)) {
- exitNodes[j++] = node;
- } else {
- nodeByKeyValue.set(keyValue, node);
- }
- keyValues.push(keyValue);
- }
- for (i = -1; ++i < m; ) {
- keyValue = key.call(groupData, nodeData = groupData[i], i);
- if (nodeByKeyValue.has(keyValue)) {
- updateNodes[i] = node = nodeByKeyValue.get(keyValue);
- node.__data__ = nodeData;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- nodeByKeyValue.remove(keyValue);
- }
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.has(keyValues[i])) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (i = -1; ++i < n0; ) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- enterNodes[i] = exitNodes[i] = null;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- updateNodes[i] = exitNodes[i] = null;
- }
- }
- for (; i < m; ++i) {
- enterNodes[i] = d3_selection_dataNode(groupData[i]);
- updateNodes[i] = exitNodes[i] = null;
- }
- for (; i < n1; ++i) {
- exitNodes[i] = group[i];
- enterNodes[i] = updateNodes[i] = null;
- }
- }
- enterNodes.update = updateNodes;
- enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
- var i = -1, n = this.length, group, node;
- if (!arguments.length) {
- value = new Array(n = (group = this[0]).length);
- while (++i < n) {
- if (node = group[i]) {
- value[i] = node.__data__;
- }
- }
- return value;
- }
- var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
- if (typeof value === "function") {
- while (++i < n) {
- bind(group = this[i], value.call(group, group.parentNode.__data__, i));
- }
- } else {
- while (++i < n) {
- bind(group = this[i], value);
- }
- }
- update.enter = function() {
- return enter;
- };
- update.exit = function() {
- return exit;
- };
- return update;
- };
- d3_selectionPrototype.datum = d3_selectionPrototype.map = function(value) {
- return arguments.length < 1 ? this.property("__data__") : this.property("__data__", value);
- };
- d3_selectionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.order = function() {
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
- return this;
- };
- d3_selectionPrototype.sort = function(comparator) {
- comparator = d3_selection_sortComparator.apply(this, arguments);
- for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
- return this.order();
- };
- d3_selectionPrototype.on = function(type, listener, capture) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof type !== "string") {
- if (n < 2) listener = false;
- for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
- return this;
- }
- if (n < 2) return (n = this.node()["__on" + type]) && n._;
- capture = false;
- }
- return this.each(d3_selection_on(type, listener, capture));
- };
- d3_selectionPrototype.each = function(callback) {
- return d3_selection_each(this, function(node, i, j) {
- callback.call(node, node.__data__, i, j);
- });
- };
- d3_selectionPrototype.call = function(callback) {
- callback.apply(this, (arguments[0] = this, arguments));
- return this;
- };
- d3_selectionPrototype.empty = function() {
- return !this.node();
- };
- d3_selectionPrototype.node = function(callback) {
- for (var j = 0, m = this.length; j < m; j++) {
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return node;
- }
- }
- return null;
- };
- d3_selectionPrototype.transition = function() {
- var subgroups = [], subgroup, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- subgroup.push((node = group[i]) ? {
- node: node,
- delay: d3_transitionDelay,
- duration: d3_transitionDuration
- } : null);
- }
- }
- return d3_transition(subgroups, d3_transitionId || ++d3_transitionNextId, Date.now());
- };
- var d3_selectionRoot = d3_selection([ [ document ] ]);
- d3_selectionRoot[0].parentNode = d3_selectRoot;
- d3.select = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.select(selector) : d3_selection([ [ selector ] ]);
- };
- d3.selectAll = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.selectAll(selector) : d3_selection([ d3_array(selector) ]);
- };
- var d3_selection_enterPrototype = [];
- d3.selection.enter = d3_selection_enter;
- d3.selection.enter.prototype = d3_selection_enterPrototype;
- d3_selection_enterPrototype.append = d3_selectionPrototype.append;
- d3_selection_enterPrototype.insert = d3_selectionPrototype.insert;
- d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
- d3_selection_enterPrototype.node = d3_selectionPrototype.node;
- d3_selection_enterPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, upgroup, group, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- upgroup = (group = this[j]).update;
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- var d3_transitionPrototype = [], d3_transitionNextId = 0, d3_transitionId = 0, d3_transitionDefaultDelay = 0, d3_transitionDefaultDuration = 250, d3_transitionDefaultEase = d3.ease("cubic-in-out"), d3_transitionDelay = d3_transitionDefaultDelay, d3_transitionDuration = d3_transitionDefaultDuration, d3_transitionEase = d3_transitionDefaultEase;
- d3_transitionPrototype.call = d3_selectionPrototype.call;
- d3.transition = function(selection) {
- return arguments.length ? d3_transitionId ? selection.transition() : selection : d3_selectionRoot.transition();
- };
- d3.transition.prototype = d3_transitionPrototype;
- d3_transitionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if ((node = group[i]) && (subnode = selector.call(node.node, node.node.__data__, i))) {
- if ("__data__" in node.node) subnode.__data__ = node.node.__data__;
- subgroup.push({
- node: subnode,
- delay: node.delay,
- duration: node.duration
- });
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, subnodes, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subnodes = selector.call(node.node, node.node.__data__, i);
- subgroups.push(subgroup = []);
- for (var k = -1, o = subnodes.length; ++k < o; ) {
- subgroup.push({
- node: subnodes[k],
- delay: node.delay,
- duration: node.duration
- });
- }
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node.node, node.node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- for (value in name) this.attrTween(value, d3_tweenByName(name[value], value));
- return this;
- }
- return this.attrTween(name, d3_tweenByName(value, name));
- };
- d3_transitionPrototype.attrTween = function(nameNS, tween) {
- function attrTween(d, i) {
- var f = tween.call(this, d, i, this.getAttribute(name));
- return f === d3_tweenRemove ? (this.removeAttribute(name), null) : f && function(t) {
- this.setAttribute(name, f(t));
- };
- }
- function attrTweenNS(d, i) {
- var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
- return f === d3_tweenRemove ? (this.removeAttributeNS(name.space, name.local), null) : f && function(t) {
- this.setAttributeNS(name.space, name.local, f(t));
- };
- }
- var name = d3.ns.qualify(nameNS);
- return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
- };
- d3_transitionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.styleTween(priority, d3_tweenByName(name[priority], priority), value);
- return this;
- }
- priority = "";
- }
- return this.styleTween(name, d3_tweenByName(value, name), priority);
- };
- d3_transitionPrototype.styleTween = function(name, tween, priority) {
- if (arguments.length < 3) priority = "";
- return this.tween("style." + name, function(d, i) {
- var f = tween.call(this, d, i, window.getComputedStyle(this, null).getPropertyValue(name));
- return f === d3_tweenRemove ? (this.style.removeProperty(name), null) : f && function(t) {
- this.style.setProperty(name, f(t), priority);
- };
- });
- };
- d3_transitionPrototype.text = function(value) {
- return this.tween("text", function(d, i) {
- this.textContent = typeof value === "function" ? value.call(this, d, i) : value;
- });
- };
- d3_transitionPrototype.remove = function() {
- return this.each("end.transition", function() {
- var p;
- if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);
- });
- };
- d3_transitionPrototype.delay = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.delay = value.call(node = node.node, node.__data__, i, j) | 0;
- } : (value = value | 0, function(node) {
- node.delay = value;
- }));
- };
- d3_transitionPrototype.duration = function(value) {
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.duration = Math.max(1, value.call(node = node.node, node.__data__, i, j) | 0);
- } : (value = Math.max(1, value | 0), function(node) {
- node.duration = value;
- }));
- };
- d3_transitionPrototype.transition = function() {
- return this.select(d3_this);
- };
- d3.tween = function(b, interpolate) {
- function tweenFunction(d, i, a) {
- var v = b.call(this, d, i);
- return v == null ? a != "" && d3_tweenRemove : a != v && interpolate(a, v);
- }
- function tweenString(d, i, a) {
- return a != b && interpolate(a, b);
- }
- return typeof b === "function" ? tweenFunction : b == null ? d3_tweenNull : (b += "", tweenString);
- };
- var d3_tweenRemove = {};
- var d3_timer_queue = null, d3_timer_interval, d3_timer_timeout;
- d3.timer = function(callback, delay, then) {
- var found = false, t0, t1 = d3_timer_queue;
- if (arguments.length < 3) {
- if (arguments.length < 2) delay = 0; else if (!isFinite(delay)) return;
- then = Date.now();
- }
- while (t1) {
- if (t1.callback === callback) {
- t1.then = then;
- t1.delay = delay;
- found = true;
- break;
- }
- t0 = t1;
- t1 = t1.next;
- }
- if (!found) d3_timer_queue = {
- callback: callback,
- then: then,
- delay: delay,
- next: d3_timer_queue
- };
- if (!d3_timer_interval) {
- d3_timer_timeout = clearTimeout(d3_timer_timeout);
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- };
- d3.timer.flush = function() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (!t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- d3_timer_flush();
- };
- var d3_timer_frame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) {
- setTimeout(callback, 17);
- };
- d3.mouse = function(container) {
- return d3_mousePoint(container, d3_eventSource());
- };
- var d3_mouse_bug44083 = /WebKit/.test(navigator.userAgent) ? -1 : 0;
- d3.touches = function(container, touches) {
- if (arguments.length < 2) touches = d3_eventSource().touches;
- return touches ? d3_array(touches).map(function(touch) {
- var point = d3_mousePoint(container, touch);
- point.identifier = touch.identifier;
- return point;
- }) : [];
- };
- d3.scale = {};
- d3.scale.linear = function() {
- return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3.interpolate, false);
- };
- d3.scale.log = function() {
- return d3_scale_log(d3.scale.linear(), d3_scale_logp);
- };
- var d3_scale_logFormat = d3.format(".0e");
- d3_scale_logp.pow = function(x) {
- return Math.pow(10, x);
- };
- d3_scale_logn.pow = function(x) {
- return -Math.pow(10, -x);
- };
- d3.scale.pow = function() {
- return d3_scale_pow(d3.scale.linear(), 1);
- };
- d3.scale.sqrt = function() {
- return d3.scale.pow().exponent(.5);
- };
- d3.scale.ordinal = function() {
- return d3_scale_ordinal([], {
- t: "range",
- a: [ [] ]
- });
- };
- d3.scale.category10 = function() {
- return d3.scale.ordinal().range(d3_category10);
- };
- d3.scale.category20 = function() {
- return d3.scale.ordinal().range(d3_category20);
- };
- d3.scale.category20b = function() {
- return d3.scale.ordinal().range(d3_category20b);
- };
- d3.scale.category20c = function() {
- return d3.scale.ordinal().range(d3_category20c);
- };
- var d3_category10 = [ "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" ];
- var d3_category20 = [ "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5" ];
- var d3_category20b = [ "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", "#843c39", "#ad494a", "#d6616b", "#e7969c", "#7b4173", "#a55194", "#ce6dbd", "#de9ed6" ];
- var d3_category20c = [ "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", "#31a354", "#74c476", "#a1d99b", "#c7e9c0", "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", "#636363", "#969696", "#bdbdbd", "#d9d9d9" ];
- d3.scale.quantile = function() {
- return d3_scale_quantile([], []);
- };
- d3.scale.quantize = function() {
- return d3_scale_quantize(0, 1, [ 0, 1 ]);
- };
- d3.scale.threshold = function() {
- return d3_scale_threshold([ .5 ], [ 0, 1 ]);
- };
- d3.scale.identity = function() {
- return d3_scale_identity([ 0, 1 ]);
- };
- d3.svg = {};
- d3.svg.arc = function() {
- function arc() {
- var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0, a0 = a1, a1 = da), a1 - a0), df = da < Math.PI ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
- return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
- }
- var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- arc.innerRadius = function(v) {
- if (!arguments.length) return innerRadius;
- innerRadius = d3_functor(v);
- return arc;
- };
- arc.outerRadius = function(v) {
- if (!arguments.length) return outerRadius;
- outerRadius = d3_functor(v);
- return arc;
- };
- arc.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return arc;
- };
- arc.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return arc;
- };
- arc.centroid = function() {
- var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
- return [ Math.cos(a) * r, Math.sin(a) * r ];
- };
- return arc;
- };
- var d3_svg_arcOffset = -Math.PI / 2, d3_svg_arcMax = 2 * Math.PI - 1e-6;
- d3.svg.line = function() {
- return d3_svg_line(d3_identity);
- };
- var d3_svg_lineInterpolators = d3.map({
- linear: d3_svg_lineLinear,
- "linear-closed": d3_svg_lineLinearClosed,
- "step-before": d3_svg_lineStepBefore,
- "step-after": d3_svg_lineStepAfter,
- basis: d3_svg_lineBasis,
- "basis-open": d3_svg_lineBasisOpen,
- "basis-closed": d3_svg_lineBasisClosed,
- bundle: d3_svg_lineBundle,
- cardinal: d3_svg_lineCardinal,
- "cardinal-open": d3_svg_lineCardinalOpen,
- "cardinal-closed": d3_svg_lineCardinalClosed,
- monotone: d3_svg_lineMonotone
- });
- d3_svg_lineInterpolators.forEach(function(key, value) {
- value.key = key;
- value.closed = /-closed$/.test(key);
- });
- var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
- d3.svg.line.radial = function() {
- var line = d3_svg_line(d3_svg_lineRadial);
- line.radius = line.x, delete line.x;
- line.angle = line.y, delete line.y;
- return line;
- };
- d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
- d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
- d3.svg.area = function() {
- return d3_svg_area(d3_identity);
- };
- d3.svg.area.radial = function() {
- var area = d3_svg_area(d3_svg_lineRadial);
- area.radius = area.x, delete area.x;
- area.innerRadius = area.x0, delete area.x0;
- area.outerRadius = area.x1, delete area.x1;
- area.angle = area.y, delete area.y;
- area.startAngle = area.y0, delete area.y0;
- area.endAngle = area.y1, delete area.y1;
- return area;
- };
- d3.svg.chord = function() {
- function chord(d, i) {
- var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
- return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
- }
- function subgroup(self, f, d, i) {
- var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
- return {
- r: r,
- a0: a0,
- a1: a1,
- p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
- p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
- };
- }
- function equals(a, b) {
- return a.a0 == b.a0 && a.a1 == b.a1;
- }
- function arc(r, p, a) {
- return "A" + r + "," + r + " 0 " + +(a > Math.PI) + ",1 " + p;
- }
- function curve(r0, p0, r1, p1) {
- return "Q 0,0 " + p1;
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- chord.radius = function(v) {
- if (!arguments.length) return radius;
- radius = d3_functor(v);
- return chord;
- };
- chord.source = function(v) {
- if (!arguments.length) return source;
- source = d3_functor(v);
- return chord;
- };
- chord.target = function(v) {
- if (!arguments.length) return target;
- target = d3_functor(v);
- return chord;
- };
- chord.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return chord;
- };
- chord.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return chord;
- };
- return chord;
- };
- d3.svg.diagonal = function() {
- function diagonal(d, i) {
- var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
- x: p0.x,
- y: m
- }, {
- x: p3.x,
- y: m
- }, p3 ];
- p = p.map(projection);
- return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
- }
- var source = d3_svg_chordSource, target = d3_svg_chordTarget, projection = d3_svg_diagonalProjection;
- diagonal.source = function(x) {
- if (!arguments.length) return source;
- source = d3_functor(x);
- return diagonal;
- };
- diagonal.target = function(x) {
- if (!arguments.length) return target;
- target = d3_functor(x);
- return diagonal;
- };
- diagonal.projection = function(x) {
- if (!arguments.length) return projection;
- projection = x;
- return diagonal;
- };
- return diagonal;
- };
- d3.svg.diagonal.radial = function() {
- var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
- diagonal.projection = function(x) {
- return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
- };
- return diagonal;
- };
- d3.svg.mouse = d3.mouse;
- d3.svg.touches = d3.touches;
- d3.svg.symbol = function() {
- function symbol(d, i) {
- return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
- }
- var type = d3_svg_symbolType, size = d3_svg_symbolSize;
- symbol.type = function(x) {
- if (!arguments.length) return type;
- type = d3_functor(x);
- return symbol;
- };
- symbol.size = function(x) {
- if (!arguments.length) return size;
- size = d3_functor(x);
- return symbol;
- };
- return symbol;
- };
- var d3_svg_symbols = d3.map({
- circle: d3_svg_symbolCircle,
- cross: function(size) {
- var r = Math.sqrt(size / 5) / 2;
- return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
- },
- diamond: function(size) {
- var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
- return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
- },
- square: function(size) {
- var r = Math.sqrt(size) / 2;
- return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
- },
- "triangle-down": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
- },
- "triangle-up": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
- }
- });
- d3.svg.symbolTypes = d3_svg_symbols.keys();
- var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * Math.PI / 180);
- d3.svg.axis = function() {
- function axis(g) {
- g.each(function() {
- var g = d3.select(this);
- var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
- var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", "g").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
- var tick = g.selectAll("g").data(ticks, String), tickEnter = tick.enter().insert("g", "path").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
- var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathEnter = path.enter().append("path").attr("class", "domain"), pathUpdate = d3.transition(path);
- var scale1 = scale.copy(), scale0 = this.__chart__ || scale1;
- this.__chart__ = scale1;
- tickEnter.append("line").attr("class", "tick");
- tickEnter.append("text");
- var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text");
- switch (orient) {
- case "bottom":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize);
- lineEnter.attr("y2", tickMajorSize);
- textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", 0).attr("y2", tickMajorSize);
- textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- text.attr("dy", ".71em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
- break;
- }
- case "top":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", -tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize);
- lineEnter.attr("y2", -tickMajorSize);
- textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize);
- textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- text.attr("dy", "0em").attr("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
- break;
- }
- case "left":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", -tickMinorSize);
- subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", -tickMajorSize);
- textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "end");
- pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
- break;
- }
- case "right":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", tickMinorSize);
- subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", tickMajorSize);
- textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0);
- text.attr("dy", ".32em").attr("text-anchor", "start");
- pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
- break;
- }
- }
- if (scale.ticks) {
- tickEnter.call(tickTransform, scale0);
- tickUpdate.call(tickTransform, scale1);
- tickExit.call(tickTransform, scale1);
- subtickEnter.call(tickTransform, scale0);
- subtickUpdate.call(tickTransform, scale1);
- subtickExit.call(tickTransform, scale1);
- } else {
- var dx = scale1.rangeBand() / 2, x = function(d) {
- return scale1(d) + dx;
- };
- tickEnter.call(tickTransform, x);
- tickUpdate.call(tickTransform, x);
- }
- });
- }
- var scale = d3.scale.linear(), orient = "bottom", tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
- axis.scale = function(x) {
- if (!arguments.length) return scale;
- scale = x;
- return axis;
- };
- axis.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- return axis;
- };
- axis.ticks = function() {
- if (!arguments.length) return tickArguments_;
- tickArguments_ = arguments;
- return axis;
- };
- axis.tickValues = function(x) {
- if (!arguments.length) return tickValues;
- tickValues = x;
- return axis;
- };
- axis.tickFormat = function(x) {
- if (!arguments.length) return tickFormat_;
- tickFormat_ = x;
- return axis;
- };
- axis.tickSize = function(x, y, z) {
- if (!arguments.length) return tickMajorSize;
- var n = arguments.length - 1;
- tickMajorSize = +x;
- tickMinorSize = n > 1 ? +y : tickMajorSize;
- tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;
- return axis;
- };
- axis.tickPadding = function(x) {
- if (!arguments.length) return tickPadding;
- tickPadding = +x;
- return axis;
- };
- axis.tickSubdivide = function(x) {
- if (!arguments.length) return tickSubdivide;
- tickSubdivide = +x;
- return axis;
- };
- return axis;
- };
- d3.svg.brush = function() {
- function brush(g) {
- g.each(function() {
- var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
- g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
- bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
- fg.enter().append("rect").attr("class", "extent").style("cursor", "move");
- tz.enter().append("g").attr("class", function(d) {
- return "resize " + d;
- }).style("cursor", function(d) {
- return d3_svg_brushCursor[d];
- }).append("rect").attr("x", function(d) {
- return /[ew]$/.test(d) ? -3 : null;
- }).attr("y", function(d) {
- return /^[ns]/.test(d) ? -3 : null;
- }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
- tz.style("display", brush.empty() ? "none" : null);
- tz.exit().remove();
- if (x) {
- e = d3_scaleRange(x);
- bg.attr("x", e[0]).attr("width", e[1] - e[0]);
- redrawX(g);
- }
- if (y) {
- e = d3_scaleRange(y);
- bg.attr("y", e[0]).attr("height", e[1] - e[0]);
- redrawY(g);
- }
- redraw(g);
- });
- }
- function redraw(g) {
- g.selectAll(".resize").attr("transform", function(d) {
- return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")";
- });
- }
- function redrawX(g) {
- g.select(".extent").attr("x", extent[0][0]);
- g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]);
- }
- function redrawY(g) {
- g.select(".extent").attr("y", extent[0][1]);
- g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]);
- }
- function brushstart() {
- function mouse() {
- var touches = d3.event.changedTouches;
- return touches ? d3.touches(target, touches)[0] : d3.mouse(target);
- }
- function keydown() {
- if (d3.event.keyCode == 32) {
- if (!dragging) {
- center = null;
- origin[0] -= extent[1][0];
- origin[1] -= extent[1][1];
- dragging = 2;
- }
- d3_eventCancel();
- }
- }
- function keyup() {
- if (d3.event.keyCode == 32 && dragging == 2) {
- origin[0] += extent[1][0];
- origin[1] += extent[1][1];
- dragging = 0;
- d3_eventCancel();
- }
- }
- function brushmove() {
- var point = mouse(), moved = false;
- if (offset) {
- point[0] += offset[0];
- point[1] += offset[1];
- }
- if (!dragging) {
- if (d3.event.altKey) {
- if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ];
- origin[0] = extent[+(point[0] < center[0])][0];
- origin[1] = extent[+(point[1] < center[1])][1];
- } else center = null;
- }
- if (resizingX && move1(point, x, 0)) {
- redrawX(g);
- moved = true;
- }
- if (resizingY && move1(point, y, 1)) {
- redrawY(g);
- moved = true;
- }
- if (moved) {
- redraw(g);
- event_({
- type: "brush",
- mode: dragging ? "move" : "resize"
- });
- }
- }
- function move1(point, scale, i) {
- var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max;
- if (dragging) {
- r0 -= position;
- r1 -= size + position;
- }
- min = Math.max(r0, Math.min(r1, point[i]));
- if (dragging) {
- max = (min += position) + size;
- } else {
- if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
- if (position < min) {
- max = min;
- min = position;
- } else {
- max = position;
- }
- }
- if (extent[0][i] !== min || extent[1][i] !== max) {
- extentDomain = null;
- extent[0][i] = min;
- extent[1][i] = max;
- return true;
- }
- }
- function brushend() {
- brushmove();
- g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
- d3.select("body").style("cursor", null);
- w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
- event_({
- type: "brushend"
- });
- d3_eventCancel();
- }
- var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), center, origin = mouse(), offset;
- var w = d3.select(window).on("mousemove.brush", brushmove).on("mouseup.brush", brushend).on("touchmove.brush", brushmove).on("touchend.brush", brushend).on("keydown.brush", keydown).on("keyup.brush", keyup);
- if (dragging) {
- origin[0] = extent[0][0] - origin[0];
- origin[1] = extent[0][1] - origin[1];
- } else if (resizing) {
- var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
- offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ];
- origin[0] = extent[ex][0];
- origin[1] = extent[ey][1];
- } else if (d3.event.altKey) center = origin.slice();
- g.style("pointer-events", "none").selectAll(".resize").style("display", null);
- d3.select("body").style("cursor", eventTarget.style("cursor"));
- event_({
- type: "brushstart"
- });
- brushmove();
- d3_eventCancel();
- }
- var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], extentDomain;
- brush.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.extent = function(z) {
- var x0, x1, y0, y1, t;
- if (!arguments.length) {
- z = extentDomain || extent;
- if (x) {
- x0 = z[0][0], x1 = z[1][0];
- if (!extentDomain) {
- x0 = extent[0][0], x1 = extent[1][0];
- if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- }
- }
- if (y) {
- y0 = z[0][1], y1 = z[1][1];
- if (!extentDomain) {
- y0 = extent[0][1], y1 = extent[1][1];
- if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- }
- }
- return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
- }
- extentDomain = [ [ 0, 0 ], [ 0, 0 ] ];
- if (x) {
- x0 = z[0], x1 = z[1];
- if (y) x0 = x0[0], x1 = x1[0];
- extentDomain[0][0] = x0, extentDomain[1][0] = x1;
- if (x.invert) x0 = x(x0), x1 = x(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;
- }
- if (y) {
- y0 = z[0], y1 = z[1];
- if (x) y0 = y0[1], y1 = y1[1];
- extentDomain[0][1] = y0, extentDomain[1][1] = y1;
- if (y.invert) y0 = y(y0), y1 = y(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;
- }
- return brush;
- };
- brush.clear = function() {
- extentDomain = null;
- extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0;
- return brush;
- };
- brush.empty = function() {
- return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1];
- };
- return d3.rebind(brush, event, "on");
- };
- var d3_svg_brushCursor = {
- n: "ns-resize",
- e: "ew-resize",
- s: "ns-resize",
- w: "ew-resize",
- nw: "nwse-resize",
- ne: "nesw-resize",
- se: "nwse-resize",
- sw: "nesw-resize"
- };
- var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
- d3.behavior = {};
- d3.behavior.drag = function() {
- function drag() {
- this.on("mousedown.drag", mousedown).on("touchstart.drag", mousedown);
- }
- function mousedown() {
- function point() {
- var p = target.parentNode;
- return touchId ? d3.touches(p).filter(function(p) {
- return p.identifier === touchId;
- })[0] : d3.mouse(p);
- }
- function dragmove() {
- if (!target.parentNode) return dragend();
- var p = point(), dx = p[0] - origin_[0], dy = p[1] - origin_[1];
- moved |= dx | dy;
- origin_ = p;
- d3_eventCancel();
- event_({
- type: "drag",
- x: p[0] + offset[0],
- y: p[1] + offset[1],
- dx: dx,
- dy: dy
- });
- }
- function dragend() {
- event_({
- type: "dragend"
- });
- if (moved) {
- d3_eventCancel();
- if (d3.event.target === eventTarget) w.on("click.drag", click, true);
- }
- w.on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", null).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", null);
- }
- function click() {
- d3_eventCancel();
- w.on("click.drag", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, touchId = d3.event.touches && d3.event.changedTouches[0].identifier, offset, origin_ = point(), moved = 0;
- var w = d3.select(window).on(touchId ? "touchmove.drag-" + touchId : "mousemove.drag", dragmove).on(touchId ? "touchend.drag-" + touchId : "mouseup.drag", dragend, true);
- if (origin) {
- offset = origin.apply(target, arguments);
- offset = [ offset.x - origin_[0], offset.y - origin_[1] ];
- } else {
- offset = [ 0, 0 ];
- }
- if (!touchId) d3_eventCancel();
- event_({
- type: "dragstart"
- });
- }
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null;
- drag.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return drag;
- };
- return d3.rebind(drag, event, "on");
- };
- d3.behavior.zoom = function() {
- function zoom() {
- this.on("mousedown.zoom", mousedown).on("mousewheel.zoom", mousewheel).on("mousemove.zoom", mousemove).on("DOMMouseScroll.zoom", mousewheel).on("dblclick.zoom", dblclick).on("touchstart.zoom", touchstart).on("touchmove.zoom", touchmove).on("touchend.zoom", touchstart);
- }
- function location(p) {
- return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ];
- }
- function point(l) {
- return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ];
- }
- function scaleTo(s) {
- scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
- }
- function translateTo(p, l) {
- l = point(l);
- translate[0] += p[0] - l[0];
- translate[1] += p[1] - l[1];
- }
- function dispatch(event) {
- if (x1) x1.domain(x0.range().map(function(x) {
- return (x - translate[0]) / scale;
- }).map(x0.invert));
- if (y1) y1.domain(y0.range().map(function(y) {
- return (y - translate[1]) / scale;
- }).map(y0.invert));
- d3.event.preventDefault();
- event({
- type: "zoom",
- scale: scale,
- translate: translate
- });
- }
- function mousedown() {
- function mousemove() {
- moved = 1;
- translateTo(d3.mouse(target), l);
- dispatch(event_);
- }
- function mouseup() {
- if (moved) d3_eventCancel();
- w.on("mousemove.zoom", null).on("mouseup.zoom", null);
- if (moved && d3.event.target === eventTarget) w.on("click.zoom", click, true);
- }
- function click() {
- d3_eventCancel();
- w.on("click.zoom", null);
- }
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, moved = 0, w = d3.select(window).on("mousemove.zoom", mousemove).on("mouseup.zoom", mouseup), l = location(d3.mouse(target));
- window.focus();
- d3_eventCancel();
- }
- function mousewheel() {
- if (!translate0) translate0 = location(d3.mouse(this));
- scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);
- translateTo(d3.mouse(this), translate0);
- dispatch(event.of(this, arguments));
- }
- function mousemove() {
- translate0 = null;
- }
- function dblclick() {
- var p = d3.mouse(this), l = location(p);
- scaleTo(d3.event.shiftKey ? scale / 2 : scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- function touchstart() {
- var touches = d3.touches(this), now = Date.now();
- scale0 = scale;
- translate0 = {};
- touches.forEach(function(t) {
- translate0[t.identifier] = location(t);
- });
- d3_eventCancel();
- if (touches.length === 1) {
- if (now - touchtime < 500) {
- var p = touches[0], l = location(touches[0]);
- scaleTo(scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- touchtime = now;
- }
- }
- function touchmove() {
- var touches = d3.touches(this), p0 = touches[0], l0 = translate0[p0.identifier];
- if (p1 = touches[1]) {
- var p1, l1 = translate0[p1.identifier];
- p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
- l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
- scaleTo(d3.event.scale * scale0);
- }
- translateTo(p0, l0);
- touchtime = null;
- dispatch(event.of(this, arguments));
- }
- var translate = [ 0, 0 ], translate0, scale = 1, scale0, scaleExtent = d3_behavior_zoomInfinity, event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
- zoom.translate = function(x) {
- if (!arguments.length) return translate;
- translate = x.map(Number);
- return zoom;
- };
- zoom.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return zoom;
- };
- zoom.scaleExtent = function(x) {
- if (!arguments.length) return scaleExtent;
- scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);
- return zoom;
- };
- zoom.x = function(z) {
- if (!arguments.length) return x1;
- x1 = z;
- x0 = z.copy();
- return zoom;
- };
- zoom.y = function(z) {
- if (!arguments.length) return y1;
- y1 = z;
- y0 = z.copy();
- return zoom;
- };
- return d3.rebind(zoom, event, "on");
- };
- var d3_behavior_zoomDiv, d3_behavior_zoomInfinity = [ 0, Infinity ];
- d3.layout = {};
- d3.layout.bundle = function() {
- return function(links) {
- var paths = [], i = -1, n = links.length;
- while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
- return paths;
- };
- };
- d3.layout.chord = function() {
- function relayout() {
- var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
- chords = [];
- groups = [];
- k = 0, i = -1;
- while (++i < n) {
- x = 0, j = -1;
- while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
- k = (2 * Math.PI - padding * n) / k;
- x = 0, i = -1;
- while (++i < n) {
- x0 = x, j = -1;
- while (++j < n) {
- var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: a0,
- endAngle: a1,
- value: v
- };
- }
- groups[di] = {
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- };
- x += padding;
- }
- i = -1;
- while (++i < n) {
- j = i - 1;
- while (++j < n) {
- var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push(source.value < target.value ? {
- source: target,
- target: source
- } : {
- source: source,
- target: target
- });
- }
- }
- }
- if (sortChords) resort();
- }
- function resort() {
- chords.sort(function(a, b) {
- return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
- });
- }
- var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
- return chord;
- };
- d3.layout.force = function() {
- function repulse(node) {
- return function(quad, x1, y1, x2, y2) {
- if (quad.point !== node) {
- var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
- if ((x2 - x1) * dn < theta) {
- var k = quad.charge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- return true;
- }
- if (quad.point && isFinite(dn)) {
- var k = quad.pointCharge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- }
- }
- return !quad.charge;
- };
- }
- function dragmove(d) {
- d.px = d3.event.x;
- d.py = d3.event.y;
- force.resume();
- }
- var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, interval, nodes = [], links = [], distances, strengths, charges;
- force.tick = function() {
- if ((alpha *= .99) < .005) {
- event.end({
- type: "end",
- alpha: alpha = 0
- });
- return true;
- }
- var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
- for (i = 0; i < m; ++i) {
- o = links[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = x * x + y * y) {
- l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
- x *= l;
- y *= l;
- t.x -= x * (k = s.weight / (t.weight + s.weight));
- t.y -= y * k;
- s.x += x * (k = 1 - k);
- s.y += y * k;
- }
- }
- if (k = alpha * gravity) {
- x = size[0] / 2;
- y = size[1] / 2;
- i = -1;
- if (k) while (++i < n) {
- o = nodes[i];
- o.x += (x - o.x) * k;
- o.y += (y - o.y) * k;
- }
- }
- if (charge) {
- d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
- i = -1;
- while (++i < n) {
- if (!(o = nodes[i]).fixed) {
- q.visit(repulse(o));
- }
- }
- }
- i = -1;
- while (++i < n) {
- o = nodes[i];
- if (o.fixed) {
- o.x = o.px;
- o.y = o.py;
- } else {
- o.x -= (o.px - (o.px = o.x)) * friction;
- o.y -= (o.py - (o.py = o.y)) * friction;
- }
- }
- event.tick({
- type: "tick",
- alpha: alpha
- });
- };
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
- force.linkDistance = function(x) {
- if (!arguments.length) return linkDistance;
- linkDistance = d3_functor(x);
- return force;
- };
- force.distance = force.linkDistance;
- force.linkStrength = function(x) {
- if (!arguments.length) return linkStrength;
- linkStrength = d3_functor(x);
- return force;
- };
- force.friction = function(x) {
- if (!arguments.length) return friction;
- friction = x;
- return force;
- };
- force.charge = function(x) {
- if (!arguments.length) return charge;
- charge = typeof x === "function" ? x : +x;
- return force;
- };
- force.gravity = function(x) {
- if (!arguments.length) return gravity;
- gravity = x;
- return force;
- };
- force.theta = function(x) {
- if (!arguments.length) return theta;
- theta = x;
- return force;
- };
- force.alpha = function(x) {
- if (!arguments.length) return alpha;
- if (alpha) {
- if (x > 0) alpha = x; else alpha = 0;
- } else if (x > 0) {
- event.start({
- type: "start",
- alpha: alpha = x
- });
- d3.timer(force.tick);
- }
- return force;
- };
- force.start = function() {
- function position(dimension, size) {
- var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
- while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
- return Math.random() * size;
- }
- function neighbor() {
- if (!neighbors) {
- neighbors = [];
- for (j = 0; j < n; ++j) {
- neighbors[j] = [];
- }
- for (j = 0; j < m; ++j) {
- var o = links[j];
- neighbors[o.source.index].push(o.target);
- neighbors[o.target.index].push(o.source);
- }
- }
- return neighbors[i];
- }
- var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
- for (i = 0; i < n; ++i) {
- (o = nodes[i]).index = i;
- o.weight = 0;
- }
- distances = [];
- strengths = [];
- for (i = 0; i < m; ++i) {
- o = links[i];
- if (typeof o.source == "number") o.source = nodes[o.source];
- if (typeof o.target == "number") o.target = nodes[o.target];
- distances[i] = linkDistance.call(this, o, i);
- strengths[i] = linkStrength.call(this, o, i);
- ++o.source.weight;
- ++o.target.weight;
- }
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- if (isNaN(o.x)) o.x = position("x", w);
- if (isNaN(o.y)) o.y = position("y", h);
- if (isNaN(o.px)) o.px = o.x;
- if (isNaN(o.py)) o.py = o.y;
- }
- charges = [];
- if (typeof charge === "function") {
- for (i = 0; i < n; ++i) {
- charges[i] = +charge.call(this, nodes[i], i);
- }
- } else {
- for (i = 0; i < n; ++i) {
- charges[i] = charge;
- }
- }
- return force.resume();
- };
- force.resume = function() {
- return force.alpha(.1);
- };
- force.stop = function() {
- return force.alpha(0);
- };
- force.drag = function() {
- if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart", d3_layout_forceDragstart).on("drag", dragmove).on("dragend", d3_layout_forceDragend);
- this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
- };
- return d3.rebind(force, event, "on");
- };
- d3.layout.partition = function() {
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children && (n = children.length)) {
- var i = -1, n, c, d;
- dx = node.value ? dx / node.value : 0;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
- function depth(node) {
- var children = node.children, d = 0;
- if (children && (n = children.length)) {
- var i = -1, n;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
- return d3_layout_hierarchyRebind(partition, hierarchy);
- };
- d3.layout.pie = function() {
- function pie(data, i) {
- var values = data.map(function(d, i) {
- return +value.call(pie, d, i);
- });
- var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle);
- var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - startAngle) / d3.sum(values);
- var index = d3.range(data.length);
- if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
- return values[j] - values[i];
- } : function(i, j) {
- return sort(data[i], data[j]);
- });
- var arcs = [];
- index.forEach(function(i) {
- var d;
- arcs[i] = {
- data: data[i],
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
- return arcs;
- }
- var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * Math.PI;
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
- return pie;
- };
- var d3_layout_pieSortByValue = {};
- d3.layout.stack = function() {
- function stack(data, index) {
- var series = data.map(function(d, i) {
- return values.call(stack, d, i);
- });
- var points = series.map(function(d, i) {
- return d.map(function(v, i) {
- return [ x.call(stack, v, i), y.call(stack, v, i) ];
- });
- });
- var orders = order.call(stack, points, index);
- series = d3.permute(series, orders);
- points = d3.permute(points, orders);
- var offsets = offset.call(stack, points, index);
- var n = series.length, m = series[0].length, i, j, o;
- for (j = 0; j < m; ++j) {
- out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
- for (i = 1; i < n; ++i) {
- out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
- }
- }
- return data;
- }
- var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
- stack.values = function(x) {
- if (!arguments.length) return values;
- values = x;
- return stack;
- };
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
- return stack;
- };
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
- return stack;
- };
- stack.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return stack;
- };
- stack.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return stack;
- };
- stack.out = function(z) {
- if (!arguments.length) return out;
- out = z;
- return stack;
- };
- return stack;
- };
- var d3_layout_stackOrders = d3.map({
- "inside-out": function(data) {
- var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
- return max[a] - max[b];
- }), top = 0, bottom = 0, tops = [], bottoms = [];
- for (i = 0; i < n; ++i) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
- reverse: function(data) {
- return d3.range(data.length).reverse();
- },
- "default": d3_layout_stackOrderDefault
- });
- var d3_layout_stackOffsets = d3.map({
- silhouette: function(data) {
- var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0; j < m; ++j) {
- y0[j] = (max - sums[j]) / 2;
- }
- return y0;
- },
- wiggle: function(data) {
- var n = data.length, x = data[0], m = x.length, max = 0, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
- y0[0] = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
- for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
- for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
- s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
- }
- s2 += s3 * data[i][j][1];
- }
- y0[j] = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) y0[j] -= o0;
- return y0;
- },
- expand: function(data) {
- var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- },
- zero: d3_layout_stackOffsetZero
- });
- d3.layout.histogram = function() {
- function histogram(data, i) {
- var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
- while (++i < m) {
- bin = bins[i] = [];
- bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
- bin.y = 0;
- }
- if (m > 0) {
- i = -1;
- while (++i < n) {
- x = values[i];
- if (x >= range[0] && x <= range[1]) {
- bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
- bin.y += k;
- bin.push(data[i]);
- }
- }
- }
- return bins;
- }
- var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
- histogram.value = function(x) {
- if (!arguments.length) return valuer;
- valuer = x;
- return histogram;
- };
- histogram.range = function(x) {
- if (!arguments.length) return ranger;
- ranger = d3_functor(x);
- return histogram;
- };
- histogram.bins = function(x) {
- if (!arguments.length) return binner;
- binner = typeof x === "number" ? function(range) {
- return d3_layout_histogramBinFixed(range, x);
- } : d3_functor(x);
- return histogram;
- };
- histogram.frequency = function(x) {
- if (!arguments.length) return frequency;
- frequency = !!x;
- return histogram;
- };
- return histogram;
- };
- d3.layout.hierarchy = function() {
- function recurse(data, depth, nodes) {
- var childs = children.call(hierarchy, data, depth), node = d3_layout_hierarchyInline ? data : {
- data: data
- };
- node.depth = depth;
- nodes.push(node);
- if (childs && (n = childs.length)) {
- var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d;
- while (++i < n) {
- d = recurse(childs[i], j, nodes);
- d.parent = node;
- c.push(d);
- v += d.value;
- }
- if (sort) c.sort(sort);
- if (value) node.value = v;
- } else if (value) {
- node.value = +value.call(hierarchy, data, depth) || 0;
- }
- return node;
- }
- function revalue(node, depth) {
- var children = node.children, v = 0;
- if (children && (n = children.length)) {
- var i = -1, n, j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else if (value) {
- v = +value.call(hierarchy, d3_layout_hierarchyInline ? node : node.data, depth) || 0;
- }
- if (value) node.value = v;
- return v;
- }
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
- var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
- return hierarchy;
- };
- var d3_layout_hierarchyInline = false;
- d3.layout.pack = function() {
- function pack(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- root.x = 0;
- root.y = 0;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r = Math.sqrt(d.value);
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- var w = size[0], h = size[1], k = Math.max(2 * root.r / w, 2 * root.r / h);
- if (padding > 0) {
- var dr = padding * k / 2;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r += dr;
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- d3_layout_treeVisitAfter(root, function(d) {
- d.r -= dr;
- });
- k = Math.max(2 * root.r / w, 2 * root.r / h);
- }
- d3_layout_packTransform(root, w / 2, h / 2, 1 / k);
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ];
- pack.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return pack;
- };
- pack.padding = function(_) {
- if (!arguments.length) return padding;
- padding = +_;
- return pack;
- };
- return d3_layout_hierarchyRebind(pack, hierarchy);
- };
- d3.layout.cluster = function() {
- function cluster(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0, kx, ky;
- d3_layout_treeVisitAfter(root, function(node) {
- var children = node.children;
- if (children && children.length) {
- node.x = d3_layout_clusterX(children);
- node.y = d3_layout_clusterY(children);
- } else {
- node.x = previousNode ? x += separation(node, previousNode) : 0;
- node.y = 0;
- previousNode = node;
- }
- });
- var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- cluster.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return cluster;
- };
- cluster.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return cluster;
- };
- return d3_layout_hierarchyRebind(cluster, hierarchy);
- };
- d3.layout.tree = function() {
- function tree(d, i) {
- function firstWalk(node, previousSibling) {
- var children = node.children, layout = node._tree;
- if (children && (n = children.length)) {
- var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
- while (++i < n) {
- child = children[i];
- firstWalk(child, previousChild);
- ancestor = apportion(child, previousChild, ancestor);
- previousChild = child;
- }
- d3_layout_treeShift(node);
- var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- layout.mod = layout.prelim - midpoint;
- } else {
- layout.prelim = midpoint;
- }
- } else {
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- }
- }
- }
- function secondWalk(node, x) {
- node.x = node._tree.prelim + x;
- var children = node.children;
- if (children && (n = children.length)) {
- var i = -1, n;
- x += node._tree.mod;
- while (++i < n) {
- secondWalk(children[i], x);
- }
- }
- }
- function apportion(node, previousSibling, ancestor) {
- if (previousSibling) {
- var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
- while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
- vom = d3_layout_treeLeft(vom);
- vop = d3_layout_treeRight(vop);
- vop._tree.ancestor = node;
- shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
- if (shift > 0) {
- d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
- sip += shift;
- sop += shift;
- }
- sim += vim._tree.mod;
- sip += vip._tree.mod;
- som += vom._tree.mod;
- sop += vop._tree.mod;
- }
- if (vim && !d3_layout_treeRight(vop)) {
- vop._tree.thread = vim;
- vop._tree.mod += sim - sop;
- }
- if (vip && !d3_layout_treeLeft(vom)) {
- vom._tree.thread = vip;
- vom._tree.mod += sip - som;
- ancestor = node;
- }
- }
- return ancestor;
- }
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- d3_layout_treeVisitAfter(root, function(node, previousSibling) {
- node._tree = {
- ancestor: node,
- prelim: 0,
- mod: 0,
- change: 0,
- shift: 0,
- number: previousSibling ? previousSibling._tree.number + 1 : 0
- };
- });
- firstWalk(root);
- secondWalk(root, -root._tree.prelim);
- var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = node.depth / y1 * size[1];
- delete node._tree;
- });
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- tree.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return tree;
- };
- tree.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return tree;
- };
- return d3_layout_hierarchyRebind(tree, hierarchy);
- };
- d3.layout.treemap = function() {
- function scale(children, k) {
- var i = -1, n = children.length, child, area;
- while (++i < n) {
- area = (child = children[i]).value * (k < 0 ? 0 : k);
- child.area = isNaN(area) || area <= 0 ? 0 : area;
- }
- }
- function squarify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = Math.min(rect.dx, rect.dy), n;
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while ((n = remaining.length) > 0) {
- row.push(child = remaining[n - 1]);
- row.area += child.area;
- if ((score = worst(row, u)) <= best) {
- remaining.pop();
- best = score;
- } else {
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- children.forEach(squarify);
- }
- }
- function stickify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), remaining = children.slice(), child, row = [];
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while (child = remaining.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
- row.length = row.area = 0;
- }
- }
- children.forEach(stickify);
- }
- }
- function worst(row, u) {
- var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
- while (++i < n) {
- if (!(r = row[i].area)) continue;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
- }
- function position(row, u, rect, flush) {
- var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
- if (u == rect.dx) {
- if (flush || v > rect.dy) v = rect.dy;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x;
- rect.y += v;
- rect.dy -= v;
- } else {
- if (flush || v > rect.dx) v = rect.dx;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y;
- rect.x += v;
- rect.dx -= v;
- }
- }
- function treemap(d) {
- var nodes = stickies || hierarchy(d), root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale([ root ], root.dx * root.dy / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
- var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, ratio = .5 * (1 + Math.sqrt(5));
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
- treemap.padding = function(x) {
- function padFunction(node) {
- var p = x.call(treemap, node, node.depth);
- return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
- }
- function padConstant(node) {
- return d3_layout_treemapPad(node, x);
- }
- if (!arguments.length) return padding;
- var type;
- pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ], padConstant) : padConstant;
- return treemap;
- };
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
- treemap.ratio = function(x) {
- if (!arguments.length) return ratio;
- ratio = x;
- return treemap;
- };
- return d3_layout_hierarchyRebind(treemap, hierarchy);
- };
- d3.csv = d3_dsv(",", "text/csv");
- d3.tsv = d3_dsv(" ", "text/tab-separated-values");
- d3.geo = {};
- var d3_geo_radians = Math.PI / 180;
- d3.geo.azimuthal = function() {
- function azimuthal(coordinates) {
- var x1 = coordinates[0] * d3_geo_radians - x0, y1 = coordinates[1] * d3_geo_radians, cx1 = Math.cos(x1), sx1 = Math.sin(x1), cy1 = Math.cos(y1), sy1 = Math.sin(y1), cc = mode !== "orthographic" ? sy0 * sy1 + cy0 * cy1 * cx1 : null, c, k = mode === "stereographic" ? 1 / (1 + cc) : mode === "gnomonic" ? 1 / cc : mode === "equidistant" ? (c = Math.acos(cc), c ? c / Math.sin(c) : 0) : mode === "equalarea" ? Math.sqrt(2 / (1 + cc)) : 1, x = k * cy1 * sx1, y = k * (sy0 * cy1 * cx1 - cy0 * sy1);
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var mode = "orthographic", origin, scale = 200, translate = [ 480, 250 ], x0, y0, cy0, sy0;
- azimuthal.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p = Math.sqrt(x * x + y * y), c = mode === "stereographic" ? 2 * Math.atan(p) : mode === "gnomonic" ? Math.atan(p) : mode === "equidistant" ? p : mode === "equalarea" ? 2 * Math.asin(.5 * p) : Math.asin(p), sc = Math.sin(c), cc = Math.cos(c);
- return [ (x0 + Math.atan2(x * sc, p * cy0 * cc + y * sy0 * sc)) / d3_geo_radians, Math.asin(cc * sy0 - (p ? y * sc * cy0 / p : 0)) / d3_geo_radians ];
- };
- azimuthal.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return azimuthal;
- };
- azimuthal.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- x0 = origin[0] * d3_geo_radians;
- y0 = origin[1] * d3_geo_radians;
- cy0 = Math.cos(y0);
- sy0 = Math.sin(y0);
- return azimuthal;
- };
- azimuthal.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return azimuthal;
- };
- azimuthal.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return azimuthal;
- };
- return azimuthal.origin([ 0, 0 ]);
- };
- d3.geo.albers = function() {
- function albers(coordinates) {
- var t = n * (d3_geo_radians * coordinates[0] - lng0), p = Math.sqrt(C - 2 * n * Math.sin(d3_geo_radians * coordinates[1])) / n;
- return [ scale * p * Math.sin(t) + translate[0], scale * (p * Math.cos(t) - p0) + translate[1] ];
- }
- function reload() {
- var phi1 = d3_geo_radians * parallels[0], phi2 = d3_geo_radians * parallels[1], lat0 = d3_geo_radians * origin[1], s = Math.sin(phi1), c = Math.cos(phi1);
- lng0 = d3_geo_radians * origin[0];
- n = .5 * (s + Math.sin(phi2));
- C = c * c + 2 * n * s;
- p0 = Math.sqrt(C - 2 * n * Math.sin(lat0)) / n;
- return albers;
- }
- var origin = [ -98, 38 ], parallels = [ 29.5, 45.5 ], scale = 1e3, translate = [ 480, 250 ], lng0, n, C, p0;
- albers.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale, p0y = p0 + y, t = Math.atan2(x, p0y), p = Math.sqrt(x * x + p0y * p0y);
- return [ (lng0 + t / n) / d3_geo_radians, Math.asin((C - p * p * n * n) / (2 * n)) / d3_geo_radians ];
- };
- albers.origin = function(x) {
- if (!arguments.length) return origin;
- origin = [ +x[0], +x[1] ];
- return reload();
- };
- albers.parallels = function(x) {
- if (!arguments.length) return parallels;
- parallels = [ +x[0], +x[1] ];
- return reload();
- };
- albers.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return albers;
- };
- albers.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return albers;
- };
- return reload();
- };
- d3.geo.albersUsa = function() {
- function albersUsa(coordinates) {
- var lon = coordinates[0], lat = coordinates[1];
- return (lat > 50 ? alaska : lon < -140 ? hawaii : lat < 21 ? puertoRico : lower48)(coordinates);
- }
- var lower48 = d3.geo.albers();
- var alaska = d3.geo.albers().origin([ -160, 60 ]).parallels([ 55, 65 ]);
- var hawaii = d3.geo.albers().origin([ -160, 20 ]).parallels([ 8, 18 ]);
- var puertoRico = d3.geo.albers().origin([ -60, 10 ]).parallels([ 8, 18 ]);
- albersUsa.scale = function(x) {
- if (!arguments.length) return lower48.scale();
- lower48.scale(x);
- alaska.scale(x * .6);
- hawaii.scale(x);
- puertoRico.scale(x * 1.5);
- return albersUsa.translate(lower48.translate());
- };
- albersUsa.translate = function(x) {
- if (!arguments.length) return lower48.translate();
- var dz = lower48.scale() / 1e3, dx = x[0], dy = x[1];
- lower48.translate(x);
- alaska.translate([ dx - 400 * dz, dy + 170 * dz ]);
- hawaii.translate([ dx - 190 * dz, dy + 200 * dz ]);
- puertoRico.translate([ dx + 580 * dz, dy + 430 * dz ]);
- return albersUsa;
- };
- return albersUsa.scale(lower48.scale());
- };
- d3.geo.bonne = function() {
- function bonne(coordinates) {
- var x = coordinates[0] * d3_geo_radians - x0, y = coordinates[1] * d3_geo_radians - y0;
- if (y1) {
- var p = c1 + y1 - y, E = x * Math.cos(y) / p;
- x = p * Math.sin(E);
- y = p * Math.cos(E) - c1;
- } else {
- x *= Math.cos(y);
- y *= -1;
- }
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 200, translate = [ 480, 250 ], x0, y0, y1, c1;
- bonne.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- if (y1) {
- var c = c1 + y, p = Math.sqrt(x * x + c * c);
- y = c1 + y1 - p;
- x = x0 + p * Math.atan2(x, c) / Math.cos(y);
- } else {
- y *= -1;
- x /= Math.cos(y);
- }
- return [ x / d3_geo_radians, y / d3_geo_radians ];
- };
- bonne.parallel = function(x) {
- if (!arguments.length) return y1 / d3_geo_radians;
- c1 = 1 / Math.tan(y1 = x * d3_geo_radians);
- return bonne;
- };
- bonne.origin = function(x) {
- if (!arguments.length) return [ x0 / d3_geo_radians, y0 / d3_geo_radians ];
- x0 = x[0] * d3_geo_radians;
- y0 = x[1] * d3_geo_radians;
- return bonne;
- };
- bonne.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return bonne;
- };
- bonne.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return bonne;
- };
- return bonne.origin([ 0, 0 ]).parallel(45);
- };
- d3.geo.equirectangular = function() {
- function equirectangular(coordinates) {
- var x = coordinates[0] / 360, y = -coordinates[1] / 360;
- return [ scale * x + translate[0], scale * y + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- equirectangular.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, -360 * y ];
- };
- equirectangular.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return equirectangular;
- };
- equirectangular.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return equirectangular;
- };
- return equirectangular;
- };
- d3.geo.mercator = function() {
- function mercator(coordinates) {
- var x = coordinates[0] / 360, y = -(Math.log(Math.tan(Math.PI / 4 + coordinates[1] * d3_geo_radians / 2)) / d3_geo_radians) / 360;
- return [ scale * x + translate[0], scale * Math.max(-.5, Math.min(.5, y)) + translate[1] ];
- }
- var scale = 500, translate = [ 480, 250 ];
- mercator.invert = function(coordinates) {
- var x = (coordinates[0] - translate[0]) / scale, y = (coordinates[1] - translate[1]) / scale;
- return [ 360 * x, 2 * Math.atan(Math.exp(-360 * y * d3_geo_radians)) / d3_geo_radians - 90 ];
- };
- mercator.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- return mercator;
- };
- mercator.translate = function(x) {
- if (!arguments.length) return translate;
- translate = [ +x[0], +x[1] ];
- return mercator;
- };
- return mercator;
- };
- d3.geo.path = function() {
- function path(d, i) {
- if (typeof pointRadius === "function") pointCircle = d3_path_circle(pointRadius.apply(this, arguments));
- pathType(d);
- var result = buffer.length ? buffer.join("") : null;
- buffer = [];
- return result;
- }
- function project(coordinates) {
- return projection(coordinates).join(",");
- }
- function polygonArea(coordinates) {
- var sum = area(coordinates[0]), i = 0, n = coordinates.length;
- while (++i < n) sum -= area(coordinates[i]);
- return sum;
- }
- function polygonCentroid(coordinates) {
- var polygon = d3.geom.polygon(coordinates[0].map(projection)), area = polygon.area(), centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1), x = centroid[0], y = centroid[1], z = area, i = 0, n = coordinates.length;
- while (++i < n) {
- polygon = d3.geom.polygon(coordinates[i].map(projection));
- area = polygon.area();
- centroid = polygon.centroid(area < 0 ? (area *= -1, 1) : -1);
- x -= centroid[0];
- y -= centroid[1];
- z -= area;
- }
- return [ x, y, 6 * z ];
- }
- function area(coordinates) {
- return Math.abs(d3.geom.polygon(coordinates.map(projection)).area());
- }
- var pointRadius = 4.5, pointCircle = d3_path_circle(pointRadius), projection = d3.geo.albersUsa(), buffer = [];
- var pathType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features, i = -1, n = features.length;
- while (++i < n) buffer.push(pathType(features[i].geometry));
- },
- Feature: function(o) {
- pathType(o.geometry);
- },
- Point: function(o) {
- buffer.push("M", project(o.coordinates), pointCircle);
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) buffer.push("M", project(coordinates[i]), pointCircle);
- },
- LineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length;
- buffer.push("M");
- while (++i < n) buffer.push(project(coordinates[i]), "L");
- buffer.pop();
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer.pop();
- }
- },
- Polygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- if ((m = subcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++j < m) buffer.push(project(subcoordinates[j]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates, i = -1, n = coordinates.length, subcoordinates, j, m, subsubcoordinates, k, p;
- while (++i < n) {
- subcoordinates = coordinates[i];
- j = -1;
- m = subcoordinates.length;
- while (++j < m) {
- subsubcoordinates = subcoordinates[j];
- k = -1;
- if ((p = subsubcoordinates.length - 1) > 0) {
- buffer.push("M");
- while (++k < p) buffer.push(project(subsubcoordinates[k]), "L");
- buffer[buffer.length - 1] = "Z";
- }
- }
- }
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) buffer.push(pathType(geometries[i]));
- }
- });
- var areaType = path.area = d3_geo_type({
- FeatureCollection: function(o) {
- var area = 0, features = o.features, i = -1, n = features.length;
- while (++i < n) area += areaType(features[i]);
- return area;
- },
- Feature: function(o) {
- return areaType(o.geometry);
- },
- Polygon: function(o) {
- return polygonArea(o.coordinates);
- },
- MultiPolygon: function(o) {
- var sum = 0, coordinates = o.coordinates, i = -1, n = coordinates.length;
- while (++i < n) sum += polygonArea(coordinates[i]);
- return sum;
- },
- GeometryCollection: function(o) {
- var sum = 0, geometries = o.geometries, i = -1, n = geometries.length;
- while (++i < n) sum += areaType(geometries[i]);
- return sum;
- }
- }, 0);
- var centroidType = path.centroid = d3_geo_type({
- Feature: function(o) {
- return centroidType(o.geometry);
- },
- Polygon: function(o) {
- var centroid = polygonCentroid(o.coordinates);
- return [ centroid[0] / centroid[2], centroid[1] / centroid[2] ];
- },
- MultiPolygon: function(o) {
- var area = 0, coordinates = o.coordinates, centroid, x = 0, y = 0, z = 0, i = -1, n = coordinates.length;
- while (++i < n) {
- centroid = polygonCentroid(coordinates[i]);
- x += centroid[0];
- y += centroid[1];
- z += centroid[2];
- }
- return [ x / z, y / z ];
- }
- });
- path.projection = function(x) {
- projection = x;
- return path;
- };
- path.pointRadius = function(x) {
- if (typeof x === "function") pointRadius = x; else {
- pointRadius = +x;
- pointCircle = d3_path_circle(pointRadius);
- }
- return path;
- };
- return path;
- };
- d3.geo.bounds = function(feature) {
- var left = Infinity, bottom = Infinity, right = -Infinity, top = -Infinity;
- d3_geo_bounds(feature, function(x, y) {
- if (x < left) left = x;
- if (x > right) right = x;
- if (y < bottom) bottom = y;
- if (y > top) top = y;
- });
- return [ [ left, bottom ], [ right, top ] ];
- };
- var d3_geo_boundsTypes = {
- Feature: d3_geo_boundsFeature,
- FeatureCollection: d3_geo_boundsFeatureCollection,
- GeometryCollection: d3_geo_boundsGeometryCollection,
- LineString: d3_geo_boundsLineString,
- MultiLineString: d3_geo_boundsMultiLineString,
- MultiPoint: d3_geo_boundsLineString,
- MultiPolygon: d3_geo_boundsMultiPolygon,
- Point: d3_geo_boundsPoint,
- Polygon: d3_geo_boundsPolygon
- };
- d3.geo.circle = function() {
- function circle() {}
- function visible(point) {
- return arc.distance(point) < radians;
- }
- function clip(coordinates) {
- var i = -1, n = coordinates.length, clipped = [], p0, p1, p2, d0, d1;
- while (++i < n) {
- d1 = arc.distance(p2 = coordinates[i]);
- if (d1 < radians) {
- if (p1) clipped.push(d3_geo_greatArcInterpolate(p1, p2)((d0 - radians) / (d0 - d1)));
- clipped.push(p2);
- p0 = p1 = null;
- } else {
- p1 = p2;
- if (!p0 && clipped.length) {
- clipped.push(d3_geo_greatArcInterpolate(clipped[clipped.length - 1], p1)((radians - d0) / (d1 - d0)));
- p0 = p1;
- }
- }
- d0 = d1;
- }
- p0 = coordinates[0];
- p1 = clipped[0];
- if (p1 && p2[0] === p0[0] && p2[1] === p0[1] && !(p2[0] === p1[0] && p2[1] === p1[1])) {
- clipped.push(p1);
- }
- return resample(clipped);
- }
- function resample(coordinates) {
- var i = 0, n = coordinates.length, j, m, resampled = n ? [ coordinates[0] ] : coordinates, resamples, origin = arc.source();
- while (++i < n) {
- resamples = arc.source(coordinates[i - 1])(coordinates[i]).coordinates;
- for (j = 0, m = resamples.length; ++j < m; ) resampled.push(resamples[j]);
- }
- arc.source(origin);
- return resampled;
- }
- var origin = [ 0, 0 ], degrees = 90 - .01, radians = degrees * d3_geo_radians, arc = d3.geo.greatArc().source(origin).target(d3_identity);
- circle.clip = function(d) {
- if (typeof origin === "function") arc.source(origin.apply(this, arguments));
- return clipType(d) || null;
- };
- var clipType = d3_geo_type({
- FeatureCollection: function(o) {
- var features = o.features.map(clipType).filter(d3_identity);
- return features && (o = Object.create(o), o.features = features, o);
- },
- Feature: function(o) {
- var geometry = clipType(o.geometry);
- return geometry && (o = Object.create(o), o.geometry = geometry, o);
- },
- Point: function(o) {
- return visible(o.coordinates) && o;
- },
- MultiPoint: function(o) {
- var coordinates = o.coordinates.filter(visible);
- return coordinates.length && {
- type: o.type,
- coordinates: coordinates
- };
- },
- LineString: function(o) {
- var coordinates = clip(o.coordinates);
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiLineString: function(o) {
- var coordinates = o.coordinates.map(clip).filter(function(d) {
- return d.length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- Polygon: function(o) {
- var coordinates = o.coordinates.map(clip);
- return coordinates[0].length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- MultiPolygon: function(o) {
- var coordinates = o.coordinates.map(function(d) {
- return d.map(clip);
- }).filter(function(d) {
- return d[0].length;
- });
- return coordinates.length && (o = Object.create(o), o.coordinates = coordinates, o);
- },
- GeometryCollection: function(o) {
- var geometries = o.geometries.map(clipType).filter(d3_identity);
- return geometries.length && (o = Object.create(o), o.geometries = geometries, o);
- }
- });
- circle.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- if (typeof origin !== "function") arc.source(origin);
- return circle;
- };
- circle.angle = function(x) {
- if (!arguments.length) return degrees;
- radians = (degrees = +x) * d3_geo_radians;
- return circle;
- };
- return d3.rebind(circle, arc, "precision");
- };
- d3.geo.greatArc = function() {
- function greatArc() {
- var d = greatArc.distance.apply(this, arguments), t = 0, dt = precision / d, coordinates = [ p0 ];
- while ((t += dt) < 1) coordinates.push(interpolate(t));
- coordinates.push(p1);
- return {
- type: "LineString",
- coordinates: coordinates
- };
- }
- var source = d3_geo_greatArcSource, p0, target = d3_geo_greatArcTarget, p1, precision = 6 * d3_geo_radians, interpolate = d3_geo_greatArcInterpolator();
- greatArc.distance = function() {
- if (typeof source === "function") interpolate.source(p0 = source.apply(this, arguments));
- if (typeof target === "function") interpolate.target(p1 = target.apply(this, arguments));
- return interpolate.distance();
- };
- greatArc.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- if (typeof source !== "function") interpolate.source(p0 = source);
- return greatArc;
- };
- greatArc.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- if (typeof target !== "function") interpolate.target(p1 = target);
- return greatArc;
- };
- greatArc.precision = function(_) {
- if (!arguments.length) return precision / d3_geo_radians;
- precision = _ * d3_geo_radians;
- return greatArc;
- };
- return greatArc;
- };
- d3.geo.greatCircle = d3.geo.circle;
- d3.geom = {};
- d3.geom.contour = function(grid, start) {
- var s = start || d3_geom_contourStart(grid), c = [], x = s[0], y = s[1], dx = 0, dy = 0, pdx = NaN, pdy = NaN, i = 0;
- do {
- i = 0;
- if (grid(x - 1, y - 1)) i += 1;
- if (grid(x, y - 1)) i += 2;
- if (grid(x - 1, y)) i += 4;
- if (grid(x, y)) i += 8;
- if (i === 6) {
- dx = pdy === -1 ? -1 : 1;
- dy = 0;
- } else if (i === 9) {
- dx = 0;
- dy = pdx === 1 ? -1 : 1;
- } else {
- dx = d3_geom_contourDx[i];
- dy = d3_geom_contourDy[i];
- }
- if (dx != pdx && dy != pdy) {
- c.push([ x, y ]);
- pdx = dx;
- pdy = dy;
- }
- x += dx;
- y += dy;
- } while (s[0] != x || s[1] != y);
- return c;
- };
- var d3_geom_contourDx = [ 1, 0, 1, 1, -1, 0, -1, 1, 0, 0, 0, 0, -1, 0, -1, NaN ], d3_geom_contourDy = [ 0, -1, 0, 0, 0, -1, 0, 0, 1, -1, 1, 1, 0, -1, 0, NaN ];
- d3.geom.hull = function(vertices) {
- if (vertices.length < 3) return [];
- var len = vertices.length, plen = len - 1, points = [], stack = [], i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
- for (i = 1; i < len; ++i) {
- if (vertices[i][1] < vertices[h][1]) {
- h = i;
- } else if (vertices[i][1] == vertices[h][1]) {
- h = vertices[i][0] < vertices[h][0] ? i : h;
- }
- }
- for (i = 0; i < len; ++i) {
- if (i === h) continue;
- y1 = vertices[i][1] - vertices[h][1];
- x1 = vertices[i][0] - vertices[h][0];
- points.push({
- angle: Math.atan2(y1, x1),
- index: i
- });
- }
- points.sort(function(a, b) {
- return a.angle - b.angle;
- });
- a = points[0].angle;
- v = points[0].index;
- u = 0;
- for (i = 1; i < plen; ++i) {
- j = points[i].index;
- if (a == points[i].angle) {
- x1 = vertices[v][0] - vertices[h][0];
- y1 = vertices[v][1] - vertices[h][1];
- x2 = vertices[j][0] - vertices[h][0];
- y2 = vertices[j][1] - vertices[h][1];
- if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
- points[i].index = -1;
- } else {
- points[u].index = -1;
- a = points[i].angle;
- u = i;
- v = j;
- }
- } else {
- a = points[i].angle;
- u = i;
- v = j;
- }
- }
- stack.push(h);
- for (i = 0, j = 0; i < 2; ++j) {
- if (points[j].index !== -1) {
- stack.push(points[j].index);
- i++;
- }
- }
- sp = stack.length;
- for (; j < plen; ++j) {
- if (points[j].index === -1) continue;
- while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
- --sp;
- }
- stack[sp++] = points[j].index;
- }
- var poly = [];
- for (i = 0; i < sp; ++i) {
- poly.push(vertices[stack[i]]);
- }
- return poly;
- };
- d3.geom.polygon = function(coordinates) {
- coordinates.area = function() {
- var i = 0, n = coordinates.length, a = coordinates[n - 1][0] * coordinates[0][1], b = coordinates[n - 1][1] * coordinates[0][0];
- while (++i < n) {
- a += coordinates[i - 1][0] * coordinates[i][1];
- b += coordinates[i - 1][1] * coordinates[i][0];
- }
- return (b - a) * .5;
- };
- coordinates.centroid = function(k) {
- var i = -1, n = coordinates.length, x = 0, y = 0, a, b = coordinates[n - 1], c;
- if (!arguments.length) k = -1 / (6 * coordinates.area());
- while (++i < n) {
- a = b;
- b = coordinates[i];
- c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
- return [ x * k, y * k ];
- };
- coordinates.clip = function(subject) {
- var input, i = -1, n = coordinates.length, j, m, a = coordinates[n - 1], b, c, d;
- while (++i < n) {
- input = subject.slice();
- subject.length = 0;
- b = coordinates[i];
- c = input[(m = input.length) - 1];
- j = -1;
- while (++j < m) {
- d = input[j];
- if (d3_geom_polygonInside(d, a, b)) {
- if (!d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- subject.push(d);
- } else if (d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- c = d;
- }
- a = b;
- }
- return subject;
- };
- return coordinates;
- };
- d3.geom.voronoi = function(vertices) {
- var polygons = vertices.map(function() {
- return [];
- });
- d3_voronoi_tessellate(vertices, function(e) {
- var s1, s2, x1, x2, y1, y2;
- if (e.a === 1 && e.b >= 0) {
- s1 = e.ep.r;
- s2 = e.ep.l;
- } else {
- s1 = e.ep.l;
- s2 = e.ep.r;
- }
- if (e.a === 1) {
- y1 = s1 ? s1.y : -1e6;
- x1 = e.c - e.b * y1;
- y2 = s2 ? s2.y : 1e6;
- x2 = e.c - e.b * y2;
- } else {
- x1 = s1 ? s1.x : -1e6;
- y1 = e.c - e.a * x1;
- x2 = s2 ? s2.x : 1e6;
- y2 = e.c - e.a * x2;
- }
- var v1 = [ x1, y1 ], v2 = [ x2, y2 ];
- polygons[e.region.l.index].push(v1, v2);
- polygons[e.region.r.index].push(v1, v2);
- });
- return polygons.map(function(polygon, i) {
- var cx = vertices[i][0], cy = vertices[i][1];
- polygon.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- return polygon.sort(function(a, b) {
- return a.angle - b.angle;
- }).filter(function(d, i) {
- return !i || d.angle - polygon[i - 1].angle > 1e-10;
- });
- });
- };
- var d3_voronoi_opposite = {
- l: "r",
- r: "l"
- };
- d3.geom.delaunay = function(vertices) {
- var edges = vertices.map(function() {
- return [];
- }), triangles = [];
- d3_voronoi_tessellate(vertices, function(e) {
- edges[e.region.l.index].push(vertices[e.region.r.index]);
- });
- edges.forEach(function(edge, i) {
- var v = vertices[i], cx = v[0], cy = v[1];
- edge.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- edge.sort(function(a, b) {
- return a.angle - b.angle;
- });
- for (var j = 0, m = edge.length - 1; j < m; j++) {
- triangles.push([ v, edge[j], edge[j + 1] ]);
- }
- });
- return triangles;
- };
- d3.geom.quadtree = function(points, x1, y1, x2, y2) {
- function insert(n, p, x1, y1, x2, y2) {
- if (isNaN(p.x) || isNaN(p.y)) return;
- if (n.leaf) {
- var v = n.point;
- if (v) {
- if (Math.abs(v.x - p.x) + Math.abs(v.y - p.y) < .01) {
- insertChild(n, p, x1, y1, x2, y2);
- } else {
- n.point = null;
- insertChild(n, v, x1, y1, x2, y2);
- insertChild(n, p, x1, y1, x2, y2);
- }
- } else {
- n.point = p;
- }
- } else {
- insertChild(n, p, x1, y1, x2, y2);
- }
- }
- function insertChild(n, p, x1, y1, x2, y2) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = p.x >= sx, bottom = p.y >= sy, i = (bottom << 1) + right;
- n.leaf = false;
- n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
- if (right) x1 = sx; else x2 = sx;
- if (bottom) y1 = sy; else y2 = sy;
- insert(n, p, x1, y1, x2, y2);
- }
- var p, i = -1, n = points.length;
- if (n && isNaN(points[0].x)) points = points.map(d3_geom_quadtreePoint);
- if (arguments.length < 5) {
- if (arguments.length === 3) {
- y2 = x2 = y1;
- y1 = x1;
- } else {
- x1 = y1 = Infinity;
- x2 = y2 = -Infinity;
- while (++i < n) {
- p = points[i];
- if (p.x < x1) x1 = p.x;
- if (p.y < y1) y1 = p.y;
- if (p.x > x2) x2 = p.x;
- if (p.y > y2) y2 = p.y;
- }
- var dx = x2 - x1, dy = y2 - y1;
- if (dx > dy) y2 = y1 + dx; else x2 = x1 + dy;
- }
- }
- var root = d3_geom_quadtreeNode();
- root.add = function(p) {
- insert(root, p, x1, y1, x2, y2);
- };
- root.visit = function(f) {
- d3_geom_quadtreeVisit(f, root, x1, y1, x2, y2);
- };
- points.forEach(root.add);
- return root;
- };
- d3.time = {};
- var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
- d3_time_utc.prototype = {
- getDate: function() {
- return this._.getUTCDate();
- },
- getDay: function() {
- return this._.getUTCDay();
- },
- getFullYear: function() {
- return this._.getUTCFullYear();
- },
- getHours: function() {
- return this._.getUTCHours();
- },
- getMilliseconds: function() {
- return this._.getUTCMilliseconds();
- },
- getMinutes: function() {
- return this._.getUTCMinutes();
- },
- getMonth: function() {
- return this._.getUTCMonth();
- },
- getSeconds: function() {
- return this._.getUTCSeconds();
- },
- getTime: function() {
- return this._.getTime();
- },
- getTimezoneOffset: function() {
- return 0;
- },
- valueOf: function() {
- return this._.valueOf();
- },
- setDate: function() {
- d3_time_prototype.setUTCDate.apply(this._, arguments);
- },
- setDay: function() {
- d3_time_prototype.setUTCDay.apply(this._, arguments);
- },
- setFullYear: function() {
- d3_time_prototype.setUTCFullYear.apply(this._, arguments);
- },
- setHours: function() {
- d3_time_prototype.setUTCHours.apply(this._, arguments);
- },
- setMilliseconds: function() {
- d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
- },
- setMinutes: function() {
- d3_time_prototype.setUTCMinutes.apply(this._, arguments);
- },
- setMonth: function() {
- d3_time_prototype.setUTCMonth.apply(this._, arguments);
- },
- setSeconds: function() {
- d3_time_prototype.setUTCSeconds.apply(this._, arguments);
- },
- setTime: function() {
- d3_time_prototype.setTime.apply(this._, arguments);
- }
- };
- var d3_time_prototype = Date.prototype;
- var d3_time_formatDateTime = "%a %b %e %H:%M:%S %Y", d3_time_formatDate = "%m/%d/%y", d3_time_formatTime = "%H:%M:%S";
- var d3_time_days = d3_time_daySymbols, d3_time_dayAbbreviations = d3_time_days.map(d3_time_formatAbbreviate), d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = d3_time_months.map(d3_time_formatAbbreviate);
- d3.time.format = function(template) {
- function format(date) {
- var string = [], i = -1, j = 0, c, f;
- while (++i < n) {
- if (template.charCodeAt(i) == 37) {
- string.push(template.substring(j, i), (f = d3_time_formats[c = template.charAt(++i)]) ? f(date) : c);
- j = i + 1;
- }
- }
- string.push(template.substring(j, i));
- return string.join("");
- }
- var n = template.length;
- format.parse = function(string) {
- var d = {
- y: 1900,
- m: 0,
- d: 1,
- H: 0,
- M: 0,
- S: 0,
- L: 0
- }, i = d3_time_parse(d, template, string, 0);
- if (i != string.length) return null;
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
- var date = new d3_time;
- date.setFullYear(d.y, d.m, d.d);
- date.setHours(d.H, d.M, d.S, d.L);
- return date;
- };
- format.toString = function() {
- return template;
- };
- return format;
- };
- var d3_time_zfill2 = d3.format("02d"), d3_time_zfill3 = d3.format("03d"), d3_time_zfill4 = d3.format("04d"), d3_time_sfill2 = d3.format("2d");
- var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations);
- var d3_time_formats = {
- a: function(d) {
- return d3_time_dayAbbreviations[d.getDay()];
- },
- A: function(d) {
- return d3_time_days[d.getDay()];
- },
- b: function(d) {
- return d3_time_monthAbbreviations[d.getMonth()];
- },
- B: function(d) {
- return d3_time_months[d.getMonth()];
- },
- c: d3.time.format(d3_time_formatDateTime),
- d: function(d) {
- return d3_time_zfill2(d.getDate());
- },
- e: function(d) {
- return d3_time_sfill2(d.getDate());
- },
- H: function(d) {
- return d3_time_zfill2(d.getHours());
- },
- I: function(d) {
- return d3_time_zfill2(d.getHours() % 12 || 12);
- },
- j: function(d) {
- return d3_time_zfill3(1 + d3.time.dayOfYear(d));
- },
- L: function(d) {
- return d3_time_zfill3(d.getMilliseconds());
- },
- m: function(d) {
- return d3_time_zfill2(d.getMonth() + 1);
- },
- M: function(d) {
- return d3_time_zfill2(d.getMinutes());
- },
- p: function(d) {
- return d.getHours() >= 12 ? "PM" : "AM";
- },
- S: function(d) {
- return d3_time_zfill2(d.getSeconds());
- },
- U: function(d) {
- return d3_time_zfill2(d3.time.sundayOfYear(d));
- },
- w: function(d) {
- return d.getDay();
- },
- W: function(d) {
- return d3_time_zfill2(d3.time.mondayOfYear(d));
- },
- x: d3.time.format(d3_time_formatDate),
- X: d3.time.format(d3_time_formatTime),
- y: function(d) {
- return d3_time_zfill2(d.getFullYear() % 100);
- },
- Y: function(d) {
- return d3_time_zfill4(d.getFullYear() % 1e4);
- },
- Z: d3_time_zone,
- "%": function(d) {
- return "%";
- }
- };
- var d3_time_parsers = {
- a: d3_time_parseWeekdayAbbrev,
- A: d3_time_parseWeekday,
- b: d3_time_parseMonthAbbrev,
- B: d3_time_parseMonth,
- c: d3_time_parseLocaleFull,
- d: d3_time_parseDay,
- e: d3_time_parseDay,
- H: d3_time_parseHour24,
- I: d3_time_parseHour24,
- L: d3_time_parseMilliseconds,
- m: d3_time_parseMonthNumber,
- M: d3_time_parseMinutes,
- p: d3_time_parseAmPm,
- S: d3_time_parseSeconds,
- x: d3_time_parseLocaleDate,
- X: d3_time_parseLocaleTime,
- y: d3_time_parseYear,
- Y: d3_time_parseFullYear
- };
- var d3_time_numberRe = /^\s*\d+/;
- var d3_time_amPmLookup = d3.map({
- am: 0,
- pm: 1
- });
- d3.time.format.utc = function(template) {
- function format(date) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time;
- utc._ = date;
- return local(utc);
- } finally {
- d3_time = Date;
- }
- }
- var local = d3.time.format(template);
- format.parse = function(string) {
- try {
- d3_time = d3_time_utc;
- var date = local.parse(string);
- return date && date._;
- } finally {
- d3_time = Date;
- }
- };
- format.toString = local.toString;
- return format;
- };
- var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
- d3.time.format.iso = Date.prototype.toISOString ? d3_time_formatIsoNative : d3_time_formatIso;
- d3_time_formatIsoNative.parse = function(string) {
- var date = new Date(string);
- return isNaN(date) ? null : date;
- };
- d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
- d3.time.second = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 1e3) * 1e3);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 1e3);
- }, function(date) {
- return date.getSeconds();
- });
- d3.time.seconds = d3.time.second.range;
- d3.time.seconds.utc = d3.time.second.utc.range;
- d3.time.minute = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 6e4) * 6e4);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 6e4);
- }, function(date) {
- return date.getMinutes();
- });
- d3.time.minutes = d3.time.minute.range;
- d3.time.minutes.utc = d3.time.minute.utc.range;
- d3.time.hour = d3_time_interval(function(date) {
- var timezone = date.getTimezoneOffset() / 60;
- return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 36e5);
- }, function(date) {
- return date.getHours();
- });
- d3.time.hours = d3.time.hour.range;
- d3.time.hours.utc = d3.time.hour.utc.range;
- d3.time.day = d3_time_interval(function(date) {
- var day = new d3_time(1970, 0);
- day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- return day;
- }, function(date, offset) {
- date.setDate(date.getDate() + offset);
- }, function(date) {
- return date.getDate() - 1;
- });
- d3.time.days = d3.time.day.range;
- d3.time.days.utc = d3.time.day.utc.range;
- d3.time.dayOfYear = function(date) {
- var year = d3.time.year(date);
- return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
- };
- d3_time_daySymbols.forEach(function(day, i) {
- day = day.toLowerCase();
- i = 7 - i;
- var interval = d3.time[day] = d3_time_interval(function(date) {
- (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
- return date;
- }, function(date, offset) {
- date.setDate(date.getDate() + Math.floor(offset) * 7);
- }, function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
- });
- d3.time[day + "s"] = interval.range;
- d3.time[day + "s"].utc = interval.utc.range;
- d3.time[day + "OfYear"] = function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);
- };
- });
- d3.time.week = d3.time.sunday;
- d3.time.weeks = d3.time.sunday.range;
- d3.time.weeks.utc = d3.time.sunday.utc.range;
- d3.time.weekOfYear = d3.time.sundayOfYear;
- d3.time.month = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setDate(1);
- return date;
- }, function(date, offset) {
- date.setMonth(date.getMonth() + offset);
- }, function(date) {
- return date.getMonth();
- });
- d3.time.months = d3.time.month.range;
- d3.time.months.utc = d3.time.month.utc.range;
- d3.time.year = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setMonth(0, 1);
- return date;
- }, function(date, offset) {
- date.setFullYear(date.getFullYear() + offset);
- }, function(date) {
- return date.getFullYear();
- });
- d3.time.years = d3.time.year.range;
- d3.time.years.utc = d3.time.year.utc.range;
- var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
- var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ];
- var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), function(d) {
- return true;
- } ], [ d3.time.format("%B"), function(d) {
- return d.getMonth();
- } ], [ d3.time.format("%b %d"), function(d) {
- return d.getDate() != 1;
- } ], [ d3.time.format("%a %d"), function(d) {
- return d.getDay() && d.getDate() != 1;
- } ], [ d3.time.format("%I %p"), function(d) {
- return d.getHours();
- } ], [ d3.time.format("%I:%M"), function(d) {
- return d.getMinutes();
- } ], [ d3.time.format(":%S"), function(d) {
- return d.getSeconds();
- } ], [ d3.time.format(".%L"), function(d) {
- return d.getMilliseconds();
- } ] ];
- var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
- d3_time_scaleLocalMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
- };
- d3.time.scale = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
- };
- var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
- return [ m[0].utc, m[1] ];
- });
- var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), function(d) {
- return true;
- } ], [ d3.time.format.utc("%B"), function(d) {
- return d.getUTCMonth();
- } ], [ d3.time.format.utc("%b %d"), function(d) {
- return d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%a %d"), function(d) {
- return d.getUTCDay() && d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%I %p"), function(d) {
- return d.getUTCHours();
- } ], [ d3.time.format.utc("%I:%M"), function(d) {
- return d.getUTCMinutes();
- } ], [ d3.time.format.utc(":%S"), function(d) {
- return d.getUTCSeconds();
- } ], [ d3.time.format.utc(".%L"), function(d) {
- return d.getUTCMilliseconds();
- } ] ];
- var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
- d3_time_scaleUTCMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);
- };
- d3.time.scale.utc = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
- };
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.min.js
deleted file mode 100644
index cc47f1ea..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v2.min.js
+++ /dev/null
@@ -1,4 +0,0 @@
-(function(){function e(e,t){try{for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}catch(r){e.prototype=t}}function t(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function n(e){return Array.prototype.slice.call(e)}function r(){}function i(e){return e}function s(){return this}function o(){return!0}function u(e){return typeof e=="function"?e:function(){return e}}function a(e,t,n){return function(){var r=n.apply(t,arguments);return arguments.length?e:r}}function f(e){return e!=null&&!isNaN(e)}function l(e){return e.length}function c(e){return e==null}function h(e){return e.trim().replace(/\s+/g," ")}function p(e){var t=1;while(e*t%1)t*=10;return t}function d(){}function v(e){function t(){var t=n,r=-1,i=t.length,s;while(++r<i)(s=t[r].on)&&s.apply(this,arguments);return e}var n=[],i=new r;return t.on=function(t,r){var s=i.get(t),o;return arguments.length<2?s&&s.on:(s&&(s.on=null,n=n.slice(0,o=n.indexOf(s)).concat(n.slice(o+1)),i.remove(t)),r&&n.push(i.set(t,{on:r})),e)},t}function m(e,t){return t-(e?1+Math.floor(Math.log(e+Math.pow(10,1+Math.floor(Math.log(e)/Math.LN10)-t))/Math.LN10):1)}function g(e){return e+""}function y(e){var t=e.lastIndexOf("."),n=t>=0?e.substring(t):(t=e.length,""),r=[];while(t>0)r.push(e.substring(t-=3,t+3));return r.reverse().join(",")+n}function b(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function w(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function E(e){return function(t){return 1-e(1-t)}}function S(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function x(e){return e}function T(e){return function(t){return Math.pow(t,e)}}function N(e){return 1-Math.cos(e*Math.PI/2)}function C(e){return Math.pow(2,10*(e-1))}function k(e){return 1-Math.sqrt(1-e*e)}function L(e,t){var n;return arguments.length<2&&(t=.45),arguments.length<1?(e=1,n=t/4):n=t/(2*Math.PI)*Math.asin(1/e),function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*Math.PI/t)}}function A(e){return e||(e=1.70158),function(t){return t*t*((e+1)*t-e)}}function O(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function M(){d3.event.stopPropagation(),d3.event.preventDefault()}function _(){var e=d3.event,t;while(t=e.sourceEvent)e=t;return e}function D(e){var t=new d,n=0,r=arguments.length;while(++n<r)t[arguments[n]]=v(t);return t.of=function(n,r){return function(i){try{var s=i.sourceEvent=d3.event;i.target=e,d3.event=i,t[i.type].apply(n,r)}finally{d3.event=s}}},t}function P(e){var t=[e.a,e.b],n=[e.c,e.d],r=B(t),i=H(t,n),s=B(j(n,t,-i))||0;t[0]*n[1]<n[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*fs,this.translate=[e.e,e.f],this.scale=[r,s],this.skew=s?Math.atan2(i,s)*fs:0}function H(e,t){return e[0]*t[0]+e[1]*t[1]}function B(e){var t=Math.sqrt(H(e,e));return t&&(e[0]/=t,e[1]/=t),t}function j(e,t,n){return e[0]+=n*t[0],e[1]+=n*t[1],e}function F(e){return e=="transform"?d3.interpolateTransform:d3.interpolate}function I(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return(n-e)*t}}function q(e,t){return t=t-(e=+e)?1/(t-e):0,function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function R(e,t,n){return new U(e,t,n)}function U(e,t,n){this.r=e,this.g=t,this.b=n}function z(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function W(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(J(u[0]),J(u[1]),J(u[2]))}}return(a=hs.get(e))?t(a.r,a.g,a.b):(e!=null&&e.charAt(0)==="#"&&(e.length===4?(r=e.charAt(1),r+=r,i=e.charAt(2),i+=i,s=e.charAt(3),s+=s):e.length===7&&(r=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7)),r=parseInt(r,16),i=parseInt(i,16),s=parseInt(s,16)),t(r,i,s))}function X(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;return s?(u=a<.5?s/(i+r):s/(2-i-r),e==i?o=(t-n)/s+(t<n?6:0):t==i?o=(n-e)/s+2:o=(e-t)/s+4,o*=60):u=o=0,K(o,u,a)}function V(e,t,n){e=$(e),t=$(t),n=$(n);var r=ot((.4124564*e+.3575761*t+.1804375*n)/ds),i=ot((.2126729*e+.7151522*t+.072175*n)/vs),s=ot((.0193339*e+.119192*t+.9503041*n)/ms);return tt(116*i-16,500*(r-i),200*(i-s))}function $(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function J(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function K(e,t,n){return new Q(e,t,n)}function Q(e,t,n){this.h=e,this.s=t,this.l=n}function G(e,t,n){function r(e){return e>360?e-=360:e<0&&(e+=360),e<60?s+(o-s)*e/60:e<180?o:e<240?s+(o-s)*(240-e)/60:s}function i(e){return Math.round(r(e)*255)}var s,o;return e%=360,e<0&&(e+=360),t=t<0?0:t>1?1:t,n=n<0?0:n>1?1:n,o=n<=.5?n*(1+t):n+t-n*t,s=2*n-o,R(i(e+120),i(e),i(e-120))}function Y(e,t,n){return new Z(e,t,n)}function Z(e,t,n){this.h=e,this.c=t,this.l=n}function et(e,t,n){return tt(n,Math.cos(e*=Math.PI/180)*t,Math.sin(e)*t)}function tt(e,t,n){return new nt(e,t,n)}function nt(e,t,n){this.l=e,this.a=t,this.b=n}function rt(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;return i=st(i)*ds,r=st(r)*vs,s=st(s)*ms,R(ut(3.2404542*i-1.5371385*r-.4985314*s),ut(-0.969266*i+1.8760108*r+.041556*s),ut(.0556434*i-.2040259*r+1.0572252*s))}function it(e,t,n){return Y(Math.atan2(n,t)/Math.PI*180,Math.sqrt(t*t+n*n),e)}function st(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function ot(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function ut(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function at(e){return Ki(e,Ss),e}function ft(e){return function(){return gs(e,this)}}function lt(e){return function(){return ys(e,this)}}function ct(e,t){function n(){this.removeAttribute(e)}function r(){this.removeAttributeNS(e.space,e.local)}function i(){this.setAttribute(e,t)}function s(){this.setAttributeNS(e.space,e.local,t)}function o(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}function u(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}return e=d3.ns.qualify(e),t==null?e.local?r:n:typeof t=="function"?e.local?u:o:e.local?s:i}function ht(e){return new RegExp("(?:^|\\s+)"+d3.requote(e)+"(?:\\s+|$)","g")}function pt(e,t){function n(){var n=-1;while(++n<i)e[n](this,t)}function r(){var n=-1,r=t.apply(this,arguments);while(++n<i)e[n](this,r)}e=e.trim().split(/\s+/).map(dt);var i=e.length;return typeof t=="function"?r:n}function dt(e){var t=ht(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.className,s=i.baseVal!=null,o=s?i.baseVal:i;r?(t.lastIndex=0,t.test(o)||(o=h(o+" "+e),s?i.baseVal=o:n.className=o)):o&&(o=h(o.replace(t," ")),s?i.baseVal=o:n.className=o)}}function vt(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}return t==null?r:typeof t=="function"?s:i}function mt(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}return t==null?n:typeof t=="function"?i:r}function gt(e){return{__data__:e}}function yt(e){return function(){return Es(this,e)}}function bt(e){return arguments.length||(e=d3.ascending),function(t,n){return e(t&&t.__data__,n&&n.__data__)}}function wt(e,t,n){function r(){var t=this[s];t&&(this.removeEventListener(e,t,t.$),delete this[s])}function i(){function i(e){var n=d3.event;d3.event=e,u[0]=o.__data__;try{t.apply(o,u)}finally{d3.event=n}}var o=this,u=arguments;r.call(this),this.addEventListener(e,this[s]=i,i.$=n),i._=t}var s="__on"+e,o=e.indexOf(".");return o>0&&(e=e.substring(0,o)),t?i:r}function Et(e,t){for(var n=0,r=e.length;n<r;n++)for(var i=e[n],s=0,o=i.length,u;s<o;s++)(u=i[s])&&t(u,s,n);return e}function St(e){return Ki(e,Ts),e}function xt(e,t,n){Ki(e,Ns);var i=new r,s=d3.dispatch("start","end"),o=Ds;return e.id=t,e.time=n,e.tween=function(t,n){return arguments.length<2?i.get(t):(n==null?i.remove(t):i.set(t,n),e)},e.ease=function(t){return arguments.length?(o=typeof t=="function"?t:d3.ease.apply(d3,arguments),e):o},e.each=function(t,n){return arguments.length<2?Tt.call(e,t):(s.on(t,n),e)},d3.timer(function(r){return Et(e,function(e,u,a){function f(r){return v.active>t?c():(v.active=t,i.forEach(function(t,n){(n=n.call(e,m,u))&&h.push(n)}),s.start.call(e,m,u),l(r)||d3.timer(l,0,n),1)}function l(n){if(v.active!==t)return c();var r=(n-p)/d,i=o(r),a=h.length;while(a>0)h[--a].call(e,i);if(r>=1)return c(),ks=t,s.end.call(e,m,u),ks=0,1}function c(){return--v.count||delete e.__transition__,1}var h=[],p=e.delay,d=e.duration,v=(e=e.node).__transition__||(e.__transition__={active:0,count:0}),m=e.__data__;++v.count,p<=r?f(r):d3.timer(f,p,n)})},0,n),e}function Tt(e){var t=ks,n=Ds,r=Ms,i=_s;return ks=this.id,Ds=this.ease(),Et(this,function(t,n,r){Ms=t.delay,_s=t.duration,e.call(t=t.node,t.__data__,n,r)}),ks=t,Ds=n,Ms=r,_s=i,this}function Nt(e,t,n){return n!=""&&Ps}function Ct(e,t){return d3.tween(e,F(t))}function kt(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,e>=n.delay&&(n.flush=n.callback(e)),n=n.next;var r=Lt()-t;r>24?(isFinite(r)&&(clearTimeout(js),js=setTimeout(kt,r)),Bs=0):(Bs=1,Fs(kt))}function Lt(){var e=null,t=Hs,n=Infinity;while(t)t.flush?t=e?e.next=t.next:Hs=t.next:(n=Math.min(n,t.then+t.delay),t=(e=t).next);return n}function At(e,t){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Is<0&&(window.scrollX||window.scrollY)){n=d3.select(document.body).append("svg").style("position","absolute").style("top",0).style("left",0);var i=n[0][0].getScreenCTM();Is=!i.f&&!i.e,n.remove()}return Is?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Ot(){}function Mt(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function _t(e){return e.rangeExtent?e.rangeExtent():Mt(e.range())}function Dt(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;s<i&&(o=n,n=r,r=o,o=i,i=s,s=o);if(t=t(s-i))e[n]=t.floor(i),e[r]=t.ceil(s);return e}function Pt(){return Math}function Ht(e,t,n,r){function i(){var i=Math.min(e.length,t.length)>2?Ut:Rt,a=r?q:I;return o=i(e,t,a,n),u=i(t,e,a,d3.interpolate),s}function s(e){return o(e)}var o,u;return s.invert=function(e){return u(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),i()):e},s.range=function(e){return arguments.length?(t=e,i()):t},s.rangeRound=function(e){return s.range(e).interpolate(d3.interpolateRound)},s.clamp=function(e){return arguments.length?(r=e,i()):r},s.interpolate=function(e){return arguments.length?(n=e,i()):n},s.ticks=function(t){return It(e,t)},s.tickFormat=function(t){return qt(e,t)},s.nice=function(){return Dt(e,jt),i()},s.copy=function(){return Ht(e,t,n,r)},i()}function Bt(e,t){return d3.rebind(e,t,"range","rangeRound","interpolate","clamp")}function jt(e){return e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1),e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Ft(e,t){var n=Mt(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;return s<=.15?i*=10:s<=.35?i*=5:s<=.75&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+i*.5,n[2]=i,n}function It(e,t){return d3.range.apply(d3,Ft(e,t))}function qt(e,t){return d3.format(",."+Math.max(0,-Math.floor(Math.log(Ft(e,t)[2])/Math.LN10+.01))+"f")}function Rt(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Ut(e,t,n,r){var i=[],s=[],o=0,u=Math.min(e.length,t.length)-1;e[u]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());while(++o<=u)i.push(n(e[o-1],e[o])),s.push(r(t[o-1],t[o]));return function(t){var n=d3.bisect(e,t,1,u)-1;return s[n](i[n](t))}}function zt(e,t){function n(n){return e(t(n))}var r=t.pow;return n.invert=function(t){return r(e.invert(t))},n.domain=function(i){return arguments.length?(t=i[0]<0?Xt:Wt,r=t.pow,e.domain(i.map(t)),n):e.domain().map(r)},n.nice=function(){return e.domain(Dt(e.domain(),Pt)),n},n.ticks=function(){var n=Mt(e.domain()),i=[];if(n.every(isFinite)){var s=Math.floor(n[0]),o=Math.ceil(n[1]),u=r(n[0]),a=r(n[1]);if(t===Xt){i.push(r(s));for(;s++<o;)for(var f=9;f>0;f--)i.push(r(s)*f)}else{for(;s<o;s++)for(var f=1;f<10;f++)i.push(r(s)*f);i.push(r(s))}for(s=0;i[s]<u;s++);for(o=i.length;i[o-1]>a;o--);i=i.slice(s,o)}return i},n.tickFormat=function(e,i){arguments.length<2&&(i=qs);if(arguments.length<1)return i;var s=Math.max(.1,e/n.ticks().length),o=t===Xt?(u=-1e-12,Math.floor):(u=1e-12,Math.ceil),u;return function(e){return e/r(o(t(e)+u))<=s?i(e):""}},n.copy=function(){return zt(e.copy(),t)},Bt(n,e)}function Wt(e){return Math.log(e<0?0:e)/Math.LN10}function Xt(e){return-Math.log(e>0?0:-e)/Math.LN10}function Vt(e,t){function n(t){return e(r(t))}var r=$t(t),i=$t(1/t);return n.invert=function(t){return i(e.invert(t))},n.domain=function(t){return arguments.length?(e.domain(t.map(r)),n):e.domain().map(i)},n.ticks=function(e){return It(n.domain(),e)},n.tickFormat=function(e){return qt(n.domain(),e)},n.nice=function(){return n.domain(Dt(n.domain(),jt))},n.exponent=function(e){if(!arguments.length)return t;var s=n.domain();return r=$t(t=e),i=$t(1/t),n.domain(s)},n.copy=function(){return Vt(e.copy(),t)},Bt(n,e)}function $t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Jt(e,t){function n(t){return o[((s.get(t)||s.set(t,e.push(t)))-1)%o.length]}function i(t,n){return d3.range(e.length).map(function(e){return t+n*e})}var s,o,u;return n.domain=function(i){if(!arguments.length)return e;e=[],s=new r;var o=-1,u=i.length,a;while(++o<u)s.has(a=i[o])||s.set(a,e.push(a));return n[t.t].apply(n,t.a)},n.range=function(e){return arguments.length?(o=e,u=0,t={t:"range",a:arguments},n):o},n.rangePoints=function(r,s){arguments.length<2&&(s=0);var a=r[0],f=r[1],l=(f-a)/(Math.max(1,e.length-1)+s);return o=i(e.length<2?(a+f)/2:a+l*s/2,l),u=0,t={t:"rangePoints",a:arguments},n},n.rangeBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=(c-l)/(e.length-s+2*a);return o=i(l+h*a,h),f&&o.reverse(),u=h*(1-s),t={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(r,s,a){arguments.length<2&&(s=0),arguments.length<3&&(a=s);var f=r[1]<r[0],l=r[f-0],c=r[1-f],h=Math.floor((c-l)/(e.length-s+2*a)),p=c-l-(e.length-s)*h;return o=i(l+Math.round(p/2),h),f&&o.reverse(),u=Math.round(h*(1-s)),t={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return u},n.rangeExtent=function(){return Mt(t.a[0])},n.copy=function(){return Jt(e,t)},n.domain(e)}function Kt(e,t){function n(){var n=0,s=e.length,o=t.length;i=[];while(++n<o)i[n-1]=d3.quantile(e,n/o);return r}function r(e){return isNaN(e=+e)?NaN:t[d3.bisect(i,e)]}var i;return r.domain=function(t){return arguments.length?(e=t.filter(function(e){return!isNaN(e)}).sort(d3.ascending),n()):e},r.range=function(e){return arguments.length?(t=e,n()):t},r.quantiles=function(){return i},r.copy=function(){return Kt(e,t)},n()}function Qt(e,t,n){function r(t){return n[Math.max(0,Math.min(o,Math.floor(s*(t-e))))]}function i(){return s=n.length/(t-e),o=n.length-1,r}var s,o;return r.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],i()):[e,t]},r.range=function(e){return arguments.length?(n=e,i()):n},r.copy=function(){return Qt(e,t,n)},i()}function Gt(e,t){function n(n){return t[d3.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Gt(e,t)},n}function Yt(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return It(e,t)},t.tickFormat=function(t){return qt(e,t)},t.copy=function(){return Yt(e)},t}function Zt(e){return e.innerRadius}function en(e){return e.outerRadius}function tn(e){return e.startAngle}function nn(e){return e.endAngle}function rn(e){function t(t){function o(){a.push("M",s(e(l),f))}var a=[],l=[],c=-1,h=t.length,p,d=u(n),v=u(r);while(++c<h)i.call(this,p=t[c],c)?l.push([+d.call(this,p,c),+v.call(this,p,c)]):l.length&&(o(),l=[]);return l.length&&o(),a.length?a.join(""):null}var n=sn,r=on,i=o,s=un,a=s.key,f=.7;return t.x=function(e){return arguments.length?(n=e,t):n},t.y=function(e){return arguments.length?(r=e,t):r},t.defined=function(e){return arguments.length?(i=e,t):i},t.interpolate=function(e){return arguments.length?(typeof e=="function"?a=s=e:a=(s=$s.get(e)||un).key,t):a},t.tension=function(e){return arguments.length?(f=e,t):f},t}function sn(e){return e[0]}function on(e){return e[1]}function un(e){return e.join("L")}function an(e){return un(e)+"Z"}function fn(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ln(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function cn(e,t){return e.length<4?un(e):e[1]+dn(e.slice(1,e.length-1),vn(e,t))}function hn(e,t){return e.length<3?un(e):e[0]+dn((e.push(e[0]),e),vn([e[e.length-2]].concat(e,[e[1]]),t))}function pn(e,t,n){return e.length<3?un(e):e[0]+dn(e,vn(e,t))}function dn(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return un(e);var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;n&&(r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1],i=e[1],a=2);if(t.length>1){u=t[1],s=e[a],a++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++)s=e[a],u=t[f],r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function vn(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a)i=s,s=o,o=e[u],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function mn(e){if(e.length<3)return un(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];En(a,o,u);while(++t<n)r=e[t],o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);t=-1;while(++t<2)o.shift(),o.push(r[0]),u.shift(),u.push(r[1]),En(a,o,u);return a.join("")}function gn(e){if(e.length<4)return un(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3)i=e[n],s.push(i[0]),o.push(i[1]);t.push(wn(Qs,s)+","+wn(Qs,o)),--n;while(++n<r)i=e[n],s.shift(),s.push(i[0]),o.shift(),o.push(i[1]),En(t,s,o);return t.join("")}function yn(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4)s=e[n%r],o.push(s[0]),u.push(s[1]);t=[wn(Qs,o),",",wn(Qs,u)],--n;while(++n<i)s=e[n%r],o.shift(),o.push(s[0]),u.shift(),u.push(s[1]),En(t,o,u);return t.join("")}function bn(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n)a=e[u],f=u/n,a[0]=t*a[0]+(1-t)*(r+f*s),a[1]=t*a[1]+(1-t)*(i+f*o)}return mn(e)}function wn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function En(e,t,n){e.push("C",wn(Js,t),",",wn(Js,n),",",wn(Ks,t),",",wn(Ks,n),",",wn(Qs,t),",",wn(Qs,n))}function Sn(e,t){return(t[1]-e[1])/(t[0]-e[0])}function xn(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Sn(i,s);while(++t<n)r[t]=(o+(o=Sn(i=s,s=e[t+1])))/2;return r[t]=o,r}function Tn(e){var t=[],n,r,i,s,o=xn(e),u=-1,a=e.length-1;while(++u<a)n=Sn(e[u],e[u+1]),Math.abs(n)<1e-6?o[u]=o[u+1]=0:(r=o[u]/n,i=o[u+1]/n,s=r*r+i*i,s>9&&(s=n*3/Math.sqrt(s),o[u]=s*r,o[u+1]=s*i));u=-1;while(++u<=a)s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),t.push([s||0,o[u]*s||0]);return t}function Nn(e){return e.length<3?un(e):e[0]+dn(e,Tn(e))}function Cn(e){var t,n=-1,r=e.length,i,s;while(++n<r)t=e[n],i=t[0],s=t[1]+Xs,t[0]=i*Math.cos(s),t[1]=i*Math.sin(s);return e}function kn(e){function t(t){function o(){l.push("M",f(e(v),p),h,c(e(d.reverse()),p),"Z")}var l=[],d=[],v=[],m=-1,g=t.length,y,b=u(n),w=u(i),E=n===r?function(){return x}:u(r),S=i===s?function(){return T}:u(s),x,T;while(++m<g)a.call(this,y=t[m],m)?(d.push([x=+b.call(this,y,m),T=+w.call(this,y,m)]),v.push([+E.call(this,y,m),+S.call(this,y,m)])):d.length&&(o(),d=[],v=[]);return d.length&&o(),l.length?l.join(""):null}var n=sn,r=sn,i=0,s=on,a=o,f=un,l=f.key,c=f,h="L",p=.7;return t.x=function(e){return arguments.length?(n=r=e,t):r},t.x0=function(e){return arguments.length?(n=e,t):n},t.x1=function(e){return arguments.length?(r=e,t):r},t.y=function(e){return arguments.length?(i=s=e,t):s},t.y0=function(e){return arguments.length?(i=e,t):i},t.y1=function(e){return arguments.length?(s=e,t):s},t.defined=function(e){return arguments.length?(a=e,t):a},t.interpolate=function(e){return arguments.length?(typeof e=="function"?l=f=e:l=(f=$s.get(e)||un).key,c=f.reverse||f,h=f.closed?"M":"L",t):l},t.tension=function(e){return arguments.length?(p=e,t):p},t}function Ln(e){return e.source}function An(e){return e.target}function On(e){return e.radius}function Mn(e){return e.startAngle}function _n(e){return e.endAngle}function Dn(e){return[e.x,e.y]}function Pn(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Xs;return[n*Math.cos(r),n*Math.sin(r)]}}function Hn(){return 64}function Bn(){return"circle"}function jn(e){var t=Math.sqrt(e/Math.PI);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Fn(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function In(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function qn(e,t,n){i=[];if(n&&t.length>1){var r=Mt(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o)for(a=n;--a>0;)(f=+t[s]-a*u)>=r[0]&&i.push(f);for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];)i.push(f)}return i}function Rn(){no||(no=d3.select("body").append("div").style("visibility","hidden").style("top",0).style("height",0).style("width",0).style("overflow-y","scroll").append("div").style("height","2000px").node().parentNode);var e=d3.event,t;try{no.scrollTop=1e3,no.dispatchEvent(e),t=1e3-no.scrollTop}catch(n){t=e.wheelDelta||-e.detail*5}return t}function Un(e){var t=e.source,n=e.target,r=Wn(t,n),i=[t];while(t!==r)t=t.parent,i.push(t);var s=i.length;while(n!==r)i.splice(s,0,n),n=n.parent;return i}function zn(e){var t=[],n=e.parent;while(n!=null)t.push(e),e=n,n=n.parent;return t.push(e),t}function Wn(e,t){if(e===t)return e;var n=zn(e),r=zn(t),i=n.pop(),s=r.pop(),o=null;while(i===s)o=i,i=n.pop(),s=r.pop();return o}function Xn(e){e.fixed|=2}function Vn(e){e.fixed&=1}function $n(e){e.fixed|=4}function Jn(e){e.fixed&=3}function Kn(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Kn(a,t,n),e.charge+=a.charge,r+=a.charge*a.cx,i+=a.charge*a.cy}}if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var f=t*n[e.point.index];e.charge+=e.pointCharge=f,r+=f*e.point.x,i+=f*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}function Qn(e){return 20}function Gn(e){return 1}function Yn(e){return e.x}function Zn(e){return e.y}function er(e,t,n){e.y0=t,e.y=n}function tr(e){return d3.range(e.length)}function nr(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function rr(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t)(i=e[t][1])>r&&(n=t,r=i);return n}function ir(e){return e.reduce(sr,0)}function sr(e,t){return e+t[1]}function or(e,t){return ur(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ur(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function ar(e){return[d3.min(e),d3.max(e)]}function fr(e,t){return d3.rebind(e,t,"sort","children","value"),e.links=pr,e.nodes=function(t){return uo=!0,(e.nodes=e)(t)},e}function lr(e){return e.children}function cr(e){return e.value}function hr(e,t){return t.value-e.value}function pr(e){return d3.merge(e.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function dr(e,t){return e.value-t.value}function vr(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function mr(e,t){e._pack_next=t,t._pack_prev=e}function gr(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function yr(e){function t(e){r=Math.min(e.x-e.r,r),i=Math.max(e.x+e.r,i),s=Math.min(e.y-e.r,s),o=Math.max(e.y+e.r,o)}if(!(n=e.children)||!(p=n.length))return;var n,r=Infinity,i=-Infinity,s=Infinity,o=-Infinity,u,a,f,l,c,h,p;n.forEach(br),u=n[0],u.x=-u.r,u.y=0,t(u);if(p>1){a=n[1],a.x=a.r,a.y=0,t(a);if(p>2){f=n[2],Sr(u,a,f),t(f),vr(u,f),u._pack_prev=f,vr(f,a),a=u._pack_next;for(l=3;l<p;l++){Sr(u,a,f=n[l]);var d=0,v=1,m=1;for(c=a._pack_next;c!==a;c=c._pack_next,v++)if(gr(c,f)){d=1;break}if(d==1)for(h=u._pack_prev;h!==c._pack_prev;h=h._pack_prev,m++)if(gr(h,f))break;d?(v<m||v==m&&a.r<u.r?mr(u,a=c):mr(u=h,a),l--):(vr(u,f),a=f,t(f))}}}var g=(r+i)/2,y=(s+o)/2,b=0;for(l=0;l<p;l++)f=n[l],f.x-=g,f.y-=y,b=Math.max(b,f.r+Math.sqrt(f.x*f.x+f.y*f.y));e.r=b,n.forEach(wr)}function br(e){e._pack_next=e._pack_prev=e}function wr(e){delete e._pack_next,delete e._pack_prev}function Er(e,t,n,r){var i=e.children;e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)Er(i[s],t,n,r)}}function Sr(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o,r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s,n.y=e.y+a*s-f*i}else n.x=e.x+r,n.y=e.y}function xr(e){return 1+d3.max(e,function(e){return e.y})}function Tr(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function Nr(e){var t=e.children;return t&&t.length?Nr(t[0]):e}function Cr(e){var t=e.children,n;return t&&(n=t.length)?Cr(t[n-1]):e}function kr(e,t){return e.parent==t.parent?1:2}function Lr(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ar(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Or(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i)t(r=Or(n[s],t),e)>0&&(e=r)}return e}function Mr(e,t){return e.x-t.x}function _r(e,t){return t.x-e.x}function Dr(e,t){return e.depth-t.depth}function Pr(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a)s=i[u],n(s,o),o=s}t(e,r)}n(e,null)}function Hr(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0)s=r[i]._tree,s.prelim+=t,s.mod+=t,t+=s.shift+(n+=s.change)}function Br(e,t,n){e=e._tree,t=t._tree;var r=n/(t.number-e.number);e.change+=r,t.change-=r,t.shift+=n,t.prelim+=n,t.mod+=n}function jr(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function Fr(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Ir(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];return i<0&&(n+=i/2,i=0),s<0&&(r+=s/2,s=0),{x:n,y:r,dx:i,dy:s}}function qr(e,t){function n(e,r){d3.text(e,t,function(e){r(e&&n.parse(e))})}function r(t){return t.map(i).join(e)}function i(e){return o.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var s=new RegExp("\r\n|["+e+"\r\n]","g"),o=new RegExp('["'+e+"\n]"),u=e.charCodeAt(0);return n.parse=function(e){var t;return n.parseRows(e,function(e,n){if(n){var r={},i=-1,s=t.length;while(++i<s)r[t[i]]=e[i];return r}return t=e,null})},n.parseRows=function(e,t){function n(){if(s.lastIndex>=e.length)return i;if(l)return l=!1,r;var t=s.lastIndex;if(e.charCodeAt(t)===34){var n=t;while(n++<e.length)if(e.charCodeAt(n)===34){if(e.charCodeAt(n+1)!==34)break;n++}s.lastIndex=n+2;var o=e.charCodeAt(n+1);return o===13?(l=!0,e.charCodeAt(n+2)===10&&s.lastIndex++):o===10&&(l=!0),e.substring(t+1,n).replace(/""/g,'"')}var a=s.exec(e);return a?(l=a[0].charCodeAt(0)!==u,e.substring(t,a.index)):(s.lastIndex=e.length,e.substring(t))}var r={},i={},o=[],a=0,f,l;s.lastIndex=0;while((f=n())!==i){var c=[];while(f!==r&&f!==i)c.push(f),f=n();if(t&&!(c=t(c,a++)))continue;o.push(c)}return o},n.format=function(e){return e.map(r).join("\n")},n}function Rr(e,t){return function(n){return n&&e.hasOwnProperty(n.type)?e[n.type](n):t}}function Ur(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function zr(e,t){fo.hasOwnProperty(e.type)&&fo[e.type](e,t)}function Wr(e,t){zr(e.geometry,t)}function Xr(e,t){for(var n=e.features,r=0,i=n.length;r<i;r++)zr(n[r].geometry,t)}function Vr(e,t){for(var n=e.geometries,r=0,i=n.length;r<i;r++)zr(n[r],t)}function $r(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Jr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Kr(e,t){for(var n=e.coordinates,r=0,i=n.length;r<i;r++)for(var s=n[r][0],o=0,u=s.length;o<u;o++)t.apply(null,s[o])}function Qr(e,t){t.apply(null,e.coordinates)}function Gr(e,t){for(var n=e.coordinates[0],r=0,i=n.length;r<i;r++)t.apply(null,n[r])}function Yr(e){return e.source}function Zr(e){return e.target}function ei(){function e(e){var t=Math.sin(e*=p)*d,n=Math.sin(p-e)*d,r=n*s+t*c,u=n*o+t*h,a=n*i+t*l;return[Math.atan2(u,r)/ao,Math.atan2(a,Math.sqrt(r*r+u*u))/ao]}var t,n,r,i,s,o,u,a,f,l,c,h,p,d;return e.distance=function(){return p==null&&(d=1/Math.sin(p=Math.acos(Math.max(-1,Math.min(1,i*l+r*f*Math.cos(u-t)))))),p},e.source=function(u){var a=Math.cos(t=u[0]*ao),f=Math.sin(t);return r=Math.cos(n=u[1]*ao),i=Math.sin(n),s=r*a,o=r*f,p=null,e},e.target=function(t){var n=Math.cos(u=t[0]*ao),r=Math.sin(u);return f=Math.cos(a=t[1]*ao),l=Math.sin(a),c=f*n,h=f*r,p=null,e},e}function ti(e,t){var n=ei().source(e).target(t);return n.distance(),n}function ni(e){var t=0,n=0;for(;;){if(e(t,n))return[t,n];t===0?(t=n+1,n=0):(t-=1,n+=1)}}function ri(e,t,n,r){var i,s,o,u,a,f,l;return i=r[e],s=i[0],o=i[1],i=r[t],u=i[0],a=i[1],i=r[n],f=i[0],l=i[1],(l-o)*(u-s)-(a-o)*(f-s)>0}function ii(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function si(e,t,n,r){var i=e[0],s=t[0],o=n[0],u=r[0],a=e[1],f=t[1],l=n[1],c=r[1],h=i-o,p=s-i,d=u-o,v=a-l,m=f-a,g=c-l,y=(d*v-g*h)/(g*p-d*m);return[i+y*p,a+y*m]}function oi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null},r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l"),r.rightEnd=r.createHalfEdge(null,"l"),r.leftEnd.r=r.rightEnd,r.rightEnd.l=r.leftEnd,r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e,t.r=e.r,e.r.l=t,e.r=t},leftBound:function(e){var t=r.leftEnd;do t=t.r;while(t!=r.rightEnd&&i.rightOf(t,e));return t=t.l,t},del:function(e){e.l.r=e.r,e.r.l=e.l,e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[ho[e.side]]}},i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}},r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;return n.c=e.x*r+e.y*i+(r*r+i*i)*.5,s>o?(n.a=1,n.b=i/r,n.c/=r):(n.b=1,n.a=r/i,n.c/=i),n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r)return null;var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10)return null;var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;u.y<a.y||u.y==a.y&&u.x<a.x?(f=e,l=n):(f=t,l=r);var c=s>=l.region.r.x;return c&&f.side==="l"||!c&&f.side==="r"?null:{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l")return 1;if(!i&&e.side==="r")return 0;if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;!i&&n.b<0||i&&n.b>=0?a=u=s>=n.b*o:(a=t.x+t.y*n.b>n.c,n.b<0&&(a=!a),a||(u=1));if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b),n.b<0&&(a=!a)}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[ho[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}},s={list:[],insert:function(e,t,n){e.vertex=t,e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x)continue;break}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t);n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t)if(n[t]==e)return n[t+1];return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init(),n.bottomSite=n.list.shift();var o=n.list.shift(),u,a,f,l,c,h,p,d,v,m,g,y,b;for(;;){s.empty()||(u=s.min());if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x))a=r.leftBound(o),f=r.right(a),p=r.rightRegion(a),y=i.bisect(p,o),h=r.createHalfEdge(y,"l"),r.insert(a,h),m=i.intersect(a,h),m&&(s.del(a),s.insert(a,m,i.distance(m,o))),a=h,h=r.createHalfEdge(y,"r"
-),r.insert(a,h),m=i.intersect(h,f),m&&s.insert(h,m,i.distance(m,o)),o=n.list.shift();else{if(!!s.empty())break;a=s.extractMin(),l=r.left(a),f=r.right(a),c=r.right(f),p=r.leftRegion(a),d=r.rightRegion(f),g=a.vertex,i.endPoint(a.edge,a.side,g),i.endPoint(f.edge,f.side,g),r.del(a),s.del(f),r.del(f),b="l",p.y>d.y&&(v=p,p=d,d=v,b="r"),y=i.bisect(p,d),h=r.createHalfEdge(y,b),r.insert(l,h),i.endPoint(y,ho[b],g),m=i.intersect(l,h),m&&(s.del(l),s.insert(l,m,i.distance(m,p))),m=i.intersect(h,c),m&&s.insert(h,m,i.distance(m,p))}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a))t(a.edge)}function ui(){return{leaf:!0,nodes:[],point:null}}function ai(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;a[0]&&ai(e,a[0],n,r,o,u),a[1]&&ai(e,a[1],o,r,i,u),a[2]&&ai(e,a[2],n,u,o,s),a[3]&&ai(e,a[3],o,u,i,s)}}function fi(e){return{x:e[0],y:e[1]}}function li(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function ci(e){return e.substring(0,3)}function hi(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i==37){s=Ho[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function pi(e){return new RegExp("^(?:"+e.map(d3.requote).join("|")+")","i")}function di(e){var t=new r,n=-1,i=e.length;while(++n<i)t.set(e[n].toLowerCase(),n);return t}function vi(e,t,n){Ao.lastIndex=0;var r=Ao.exec(t.substring(n));return r?n+=r[0].length:-1}function mi(e,t,n){Lo.lastIndex=0;var r=Lo.exec(t.substring(n));return r?n+=r[0].length:-1}function gi(e,t,n){_o.lastIndex=0;var r=_o.exec(t.substring(n));return r?(e.m=Do.get(r[0].toLowerCase()),n+=r[0].length):-1}function yi(e,t,n){Oo.lastIndex=0;var r=Oo.exec(t.substring(n));return r?(e.m=Mo.get(r[0].toLowerCase()),n+=r[0].length):-1}function bi(e,t,n){return hi(e,Po.c.toString(),t,n)}function wi(e,t,n){return hi(e,Po.x.toString(),t,n)}function Ei(e,t,n){return hi(e,Po.X.toString(),t,n)}function Si(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function xi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.y=Ti(+r[0]),n+=r[0].length):-1}function Ti(e){return e+(e>68?1900:2e3)}function Ni(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function Ci(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function ki(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function Li(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function Ai(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function Oi(e,t,n){Bo.lastIndex=0;var r=Bo.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function Mi(e,t,n){var r=jo.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function _i(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+To(r)+To(i)}function Di(e){return e.toISOString()}function Pi(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new po(n-1)),1),n}function s(e,n){return t(e=new po(+e),n),e}function o(e,r,s){var o=i(e),u=[];if(s>1)while(o<r)n(o)%s||u.push(new Date(+o)),t(o,1);else while(o<r)u.push(new Date(+o)),t(o,1);return u}function u(e,t,n){try{po=li;var r=new li;return r._=e,o(r,t,n)}finally{po=Date}}e.floor=e,e.round=r,e.ceil=i,e.offset=s,e.range=o;var a=e.utc=Hi(e);return a.floor=a,a.round=Hi(r),a.ceil=Hi(i),a.offset=Hi(s),a.range=u,e}function Hi(e){return function(t,n){try{po=li;var r=new li;return r._=t,e(r,n)._}finally{po=Date}}}function Bi(e,t,n){function r(t){return e(t)}return r.invert=function(t){return Fi(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(Fi)},r.nice=function(e){return r.domain(Dt(r.domain(),function(){return e}))},r.ticks=function(n,i){var s=ji(r.domain());if(typeof n!="function"){var o=s[1]-s[0],u=o/n,a=d3.bisect(Io,u);if(a==Io.length)return t.year(s,n);if(!a)return e.ticks(n).map(Fi);Math.log(u/Io[a-1])<Math.log(Io[a]/u)&&--a,n=t[a],i=n[1],n=n[0].range}return n(s[0],new Date(+s[1]+1),i)},r.tickFormat=function(){return n},r.copy=function(){return Bi(e.copy(),t,n)},d3.rebind(r,e,"range","rangeRound","interpolate","clamp")}function ji(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Fi(e){return new Date(e)}function Ii(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function qi(e){var t=new Date(e,0,1);return t.setFullYear(e),t}function Ri(e){var t=e.getFullYear(),n=qi(t),r=qi(t+1);return t+(e-n)/(r-n)}function Ui(e){var t=new Date(Date.UTC(e,0,1));return t.setUTCFullYear(e),t}function zi(e){var t=e.getUTCFullYear(),n=Ui(t),r=Ui(t+1);return t+(e-n)/(r-n)}Date.now||(Date.now=function(){return+(new Date)});try{document.createElement("div").style.setProperty("opacity",0,"")}catch(Wi){var Xi=CSSStyleDeclaration.prototype,Vi=Xi.setProperty;Xi.setProperty=function(e,t,n){Vi.call(this,e,t+"",n)}}d3={version:"2.10.2"};var $i=n;try{$i(document.documentElement.childNodes)[0].nodeType}catch(Ji){$i=t}var Ki=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};d3.map=function(e){var t=new r;for(var n in e)t.set(n,e[n]);return t},e(r,{has:function(e){return Qi+e in this},get:function(e){return this[Qi+e]},set:function(e,t){return this[Qi+e]=t},remove:function(e){return e=Qi+e,e in this&&delete this[e]},keys:function(){var e=[];return this.forEach(function(t){e.push(t)}),e},values:function(){var e=[];return this.forEach(function(t,n){e.push(n)}),e},entries:function(){var e=[];return this.forEach(function(t,n){e.push({key:t,value:n})}),e},forEach:function(e){for(var t in this)t.charCodeAt(0)===Gi&&e.call(this,t.substring(1),this[t])}});var Qi="\0",Gi=Qi.charCodeAt(0);d3.functor=u,d3.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=a(e,t,t[i]);return e},d3.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN},d3.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},d3.mean=function(e,t){var n=e.length,r,i=0,s=-1,o=0;if(arguments.length===1)while(++s<n)f(r=e[s])&&(i+=(r-i)/++o);else while(++s<n)f(r=t.call(e,e[s],s))&&(i+=(r-i)/++o);return o?i:undefined},d3.median=function(e,t){return arguments.length>1&&(e=e.map(t)),e=e.filter(f),e.length?d3.quantile(e.sort(d3.ascending),.5):undefined},d3.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&i>s&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&i>s&&(i=s)}return i},d3.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)(s=e[n])!=null&&s>i&&(i=s)}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&s>i&&(i=s)}return i},d3.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)(s=e[n])!=null&&(i>s&&(i=s),o<s&&(o=s))}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)(s=t.call(e,e[n],n))!=null&&(i>s&&(i=s),o<s&&(o=s))}return[i,o]},d3.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=0),function(){var n,r,i;do n=Math.random()*2-1,r=Math.random()*2-1,i=n*n+r*r;while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(e,t){var n=arguments.length;n<2&&(t=1),n<1&&(e=0);var r=d3.random.normal();return function(){return Math.exp(e+t*r())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}},d3.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1)while(++s<r)isNaN(i=+e[s])||(n+=i);else while(++s<r)isNaN(i=+t.call(e,e[s],s))||(n+=i);return n},d3.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=e[r-1],s=n-r;return s?i+s*(e[r]-i):i},d3.transpose=function(e){return d3.zip.apply(d3,e)},d3.zip=function(){if(!(i=arguments.length))return[];for(var e=-1,t=d3.min(arguments,l),n=new Array(t);++e<t;)for(var r=-1,i,s=n[e]=new Array(i);++r<i;)s[r]=arguments[r][e];return n},d3.bisector=function(e){return{left:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;e.call(t,t[s],s)<n?r=s+1:i=s}return r},right:function(t,n,r,i){arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);while(r<i){var s=r+i>>>1;n<e.call(t,t[s],s)?i=s:r=s+1}return r}}};var Yi=d3.bisector(function(e){return e});d3.bisectLeft=Yi.left,d3.bisect=d3.bisectRight=Yi.right,d3.first=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])>0&&(i=s);return i},d3.last=function(e,t){var n=0,r=e.length,i=e[0],s;arguments.length===1&&(t=d3.ascending);while(++n<r)t.call(e,i,s=e[n])<=0&&(i=s);return i},d3.nest=function(){function e(t,s){if(s>=i.length)return u?u.call(n,t):o?t.sort(o):t;var a=-1,f=t.length,l=i[s++],c,h,p=new r,d,v={};while(++a<f)(d=p.get(c=l(h=t[a])))?d.push(h):p.set(c,[h]);return p.forEach(function(t,n){v[t]=e(n,s)}),v}function t(e,n){if(n>=i.length)return e;var r=[],o=s[n++],u;for(u in e)r.push({key:u,values:t(e[u],n)});return o&&r.sort(function(e,t){return o(e.key,t.key)}),r}var n={},i=[],s=[],o,u;return n.map=function(t){return e(t,0)},n.entries=function(n){return t(e(n,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return s[i.length-1]=e,n},n.sortValues=function(e){return o=e,n},n.rollup=function(e){return u=e,n},n},d3.keys=function(e){var t=[];for(var n in e)t.push(n);return t},d3.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},d3.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},d3.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n},d3.merge=function(e){return Array.prototype.concat.apply([],e)},d3.split=function(e,t){var n=[],r=[],i,s=-1,o=e.length;arguments.length<2&&(t=c);while(++s<o)t.call(r,i=e[s],s)?r=[]:(r.length||n.push(r),r.push(i));return n},d3.range=function(e,t,n){arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0));if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=p(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r},d3.requote=function(e){return e.replace(Zi,"\\$&")};var Zi=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;d3.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},d3.xhr=function(e,t,n){var r=new XMLHttpRequest;arguments.length<3?(n=t,t=null):t&&r.overrideMimeType&&r.overrideMimeType(t),r.open("GET",e,!0),t&&r.setRequestHeader("Accept",t),r.onreadystatechange=function(){if(r.readyState===4){var e=r.status;n(!e&&r.response||e>=200&&e<300||e===304?r:null)}},r.send(null)},d3.text=function(e,t,n){function r(e){n(e&&e.responseText)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)},d3.json=function(e,t){d3.text(e,"application/json",function(e){t(e?JSON.parse(e):null)})},d3.html=function(e,t){d3.text(e,"text/html",function(e){if(e!=null){var n=document.createRange();n.selectNode(document.body),e=n.createContextualFragment(e)}t(e)})},d3.xml=function(e,t,n){function r(e){n(e&&e.responseXML)}arguments.length<3&&(n=t,t=null),d3.xhr(e,t,r)};var es={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};d3.ns={prefix:es,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&(n=e.substring(0,t),e=e.substring(t+1)),es.hasOwnProperty(n)?{space:es[n],local:e}:e}},d3.dispatch=function(){var e=new d,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=v(e);return e},d.prototype.on=function(e,t){var n=e.indexOf("."),r="";return n>0&&(r=e.substring(n+1),e=e.substring(0,n)),arguments.length<2?this[e].on(r):this[e].on(r,t)},d3.format=function(e){var t=ts.exec(e),n=t[1]||" ",r=t[3]||"",i=t[5],s=+t[6],o=t[7],u=t[8],a=t[9],f=1,l="",c=!1;u&&(u=+u.substring(1)),i&&(n="0",o&&(s-=Math.floor((s-1)/4)));switch(a){case"n":o=!0,a="g";break;case"%":f=100,l="%",a="f";break;case"p":f=100,l="%",a="r";break;case"d":c=!0,u=0;break;case"s":f=-1,a="r"}return a=="r"&&!u&&(a="g"),a=ns.get(a)||g,function(e){if(c&&e%1)return"";var t=e<0&&(e=-e)?"-":r;if(f<0){var h=d3.formatPrefix(e,u);e=h.scale(e),l=h.symbol}else e*=f;e=a(e,u);if(i){var p=e.length+t.length;p<s&&(e=(new Array(s-p+1)).join(n)+e),o&&(e=y(e)),e=t+e}else{o&&(e=y(e)),e=t+e;var p=e.length;p<s&&(e=(new Array(s-p+1)).join(n)+e)}return e+l}};var ts=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?([0-9]+)?(,)?(\.[0-9]+)?([a-zA-Z%])?/,ns=d3.map({g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return d3.round(e,t=m(e,t)).toFixed(Math.max(0,Math.min(20,t)))}}),rs=["y","z","a","f","p","n","μ","m","","k","M","G","T","P","E","Z","Y"].map(b);d3.formatPrefix=function(e,t){var n=0;return e&&(e<0&&(e*=-1),t&&(e=d3.round(e,m(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n<=0?n+1:n-1)/3)*3))),rs[8+n/3]};var is=T(2),ss=T(3),os=function(){return x},us=d3.map({linear:os,poly:T,quad:function(){return is},cubic:function(){return ss},sin:function(){return N},exp:function(){return C},circle:function(){return k},elastic:L,back:A,bounce:function(){return O}}),as=d3.map({"in":x,out:E,"in-out":S,"out-in":function(e){return S(E(e))}});d3.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";return n=us.get(n)||os,r=as.get(r)||x,w(r(n.apply(null,Array.prototype.slice.call(arguments,1))))},d3.event=null,d3.transform=function(e){var t=document.createElementNS(d3.ns.prefix.svg,"g");return(d3.transform=function(e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate();return new P(n?n.matrix:ls)})(e)},P.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var fs=180/Math.PI,ls={a:1,b:0,c:0,d:1,e:0,f:0};d3.interpolate=function(e,t){var n=d3.interpolators.length,r;while(--n>=0&&!(r=d3.interpolators[n](e,t)));return r},d3.interpolateNumber=function(e,t){return t-=e,function(n){return e+t*n}},d3.interpolateRound=function(e,t){return t-=e,function(n){return Math.round(e+t*n)}},d3.interpolateString=function(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;cs.lastIndex=0;for(r=0;n=cs.exec(t);++r)n.index&&u.push(t.substring(s,o=n.index)),a.push({i:u.length,x:n[0]}),u.push(null),s=cs.lastIndex;s<t.length&&u.push(t.substring(s));for(r=0,f=a.length;(n=cs.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i)if(u[l.i+1]==null){u[l.i-1]+=l.x,u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1],u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}else if(u[l.i+1]==null)u[l.i]=l.x;else{u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}a.splice(r,1),f--,r--}else l.x=d3.interpolateNumber(parseFloat(n[0]),parseFloat(l.x))}while(r<f)l=a.pop(),u[l.i+1]==null?u[l.i]=l.x:(u[l.i]=l.x+u[l.i+1],u.splice(l.i+1,1)),f--;return u.length===1?u[0]==null?a[0].x:function(){return t}:function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}},d3.interpolateTransform=function(e,t){var n=[],r=[],i,s=d3.transform(e),o=d3.transform(t),u=s.translate,a=o.translate,f=s.rotate,l=o.rotate,c=s.skew,h=o.skew,p=s.scale,d=o.scale;return u[0]!=a[0]||u[1]!=a[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:d3.interpolateNumber(u[0],a[0])},{i:3,x:d3.interpolateNumber(u[1],a[1])})):a[0]||a[1]?n.push("translate("+a+")"):n.push(""),f!=l?(f-l>180?l+=360:l-f>180&&(f+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:d3.interpolateNumber(f,l)})):l&&n.push(n.pop()+"rotate("+l+")"),c!=h?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:d3.interpolateNumber(c,h)}):h&&n.push(n.pop()+"skewX("+h+")"),p[0]!=d[0]||p[1]!=d[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:d3.interpolateNumber(p[0],d[0])},{i:i-2,x:d3.interpolateNumber(p[1],d[1])})):(d[0]!=1||d[1]!=1)&&n.push(n.pop()+"scale("+d+")"),i=r.length,function(e){var t=-1,s;while(++t<i)n[(s=r[t]).i]=s.x(e);return n.join("")}},d3.interpolateRgb=function(e,t){e=d3.rgb(e),t=d3.rgb(t);var n=e.r,r=e.g,i=e.b,s=t.r-n,o=t.g-r,u=t.b-i;return function(e){return"#"+z(Math.round(n+s*e))+z(Math.round(r+o*e))+z(Math.round(i+u*e))}},d3.interpolateHsl=function(e,t){e=d3.hsl(e),t=d3.hsl(t);var n=e.h,r=e.s,i=e.l,s=t.h-n,o=t.s-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return G(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateLab=function(e,t){e=d3.lab(e),t=d3.lab(t);var n=e.l,r=e.a,i=e.b,s=t.l-n,o=t.a-r,u=t.b-i;return function(e){return rt(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateHcl=function(e,t){e=d3.hcl(e),t=d3.hcl(t);var n=e.h,r=e.c,i=e.l,s=t.h-n,o=t.c-r,u=t.l-i;return s>180?s-=360:s<-180&&(s+=360),function(e){return et(n+s*e,r+o*e,i+u*e)+""}},d3.interpolateArray=function(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(d3.interpolate(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}},d3.interpolateObject=function(e,t){var n={},r={},i;for(i in e)i in t?n[i]=F(i)(e[i],t[i]):r[i]=e[i];for(i in t)i in e||(r[i]=t[i]);return function(e){for(i in n)r[i]=n[i](e);return r}};var cs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;d3.interpolators=[d3.interpolateObject,function(e,t){return t instanceof Array&&d3.interpolateArray(e,t)},function(e,t){return(typeof e=="string"||typeof t=="string")&&d3.interpolateString(e+"",t+"")},function(e,t){return(typeof t=="string"?hs.has(t)||/^(#|rgb\(|hsl\()/.test(t):t instanceof U||t instanceof Q)&&d3.interpolateRgb(e,t)},function(e,t){return!isNaN(e=+e)&&!isNaN(t=+t)&&d3.interpolateNumber(e,t)}],d3.rgb=function(e,t,n){return arguments.length===1?e instanceof U?R(e.r,e.g,e.b):W(""+e,R,G):R(~~e,~~t,~~n)},U.prototype.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return!t&&!n&&!r?R(i,i,i):(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),R(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e))))},U.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),R(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))},U.prototype.hsl=function(){return X(this.r,this.g,this.b)},U.prototype.toString=function(){return"#"+z(this.r)+z(this.g)+z(this.b)};var hs=d3.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});hs.forEach(function(e,t){hs.set(e,W(t,R,G))}),d3.hsl=function(e,t,n){return arguments.length===1?e instanceof Q?K(e.h,e.s,e.l):W(""+e,X,K):K(+e,+t,+n)},Q.prototype.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,this.l/e)},Q.prototype.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),K(this.h,this.s,e*this.l)},Q.prototype.rgb=function(){return G(this.h,this.s,this.l)},Q.prototype.toString=function(){return this.rgb().toString()},d3.hcl=function(e,t,n){return arguments.length===1?e instanceof Z?Y(e.h,e.c,e.l):e instanceof nt?it(e.l,e.a,e.b):it((e=V((e=d3.rgb(e)).r,e.g,e.b)).l,e.a,e.b):Y(+e,+t,+n)},Z.prototype.brighter=function(e){return Y(this.h,this.c,Math.min(100,this.l+ps*(arguments.length?e:1)))},Z.prototype.darker=function(e){return Y(this.h,this.c,Math.max(0,this.l-ps*(arguments.length?e:1)))},Z.prototype.rgb=function(){return et(this.h,this.c,this.l).rgb()},Z.prototype.toString=function(){return this.rgb()+""},d3.lab=function(e,t,n){return arguments.length===1?e instanceof nt?tt(e.l,e.a,e.b):e instanceof Z?et(e.l,e.c,e.h):V((e=d3.rgb(e)).r,e.g,e.b):tt(+e,+t,+n)};var ps=18,ds=.95047,vs=1,ms=1.08883;nt.prototype.brighter=function(e){return tt(Math.min(100,this.l+ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.darker=function(e){return tt(Math.max(0,this.l-ps*(arguments.length?e:1)),this.a,this.b)},nt.prototype.rgb=function(){return rt(this.l,this.a,this.b)},nt.prototype.toString=function(){return this.rgb()+""};var gs=function(e,t){return t.querySelector(e)},ys=function(e,t){return t.querySelectorAll(e)},bs=document.documentElement,ws=bs.matchesSelector||bs.webkitMatchesSelector||bs.mozMatchesSelector||bs.msMatchesSelector||bs.oMatchesSelector,Es=function(e,t){return ws.call(e,t)};typeof Sizzle=="function"&&(gs=function(e,t){return Sizzle(e,t)[0]||null},ys=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))},Es=Sizzle.matchesSelector);var Ss=[];d3.selection=function(){return xs},d3.selection.prototype=Ss,Ss.select=function(e){var t=[],n,r,i,s;typeof e!="function"&&(e=ft(e));for(var o=-1,u=this.length;++o<u;){t.push(n=[]),n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;)(s=i[a])?(n.push(r=e.call(s,s.__data__,a)),r&&"__data__"in s&&(r.__data__=s.__data__)):n.push(null)}return at(t)},Ss.selectAll=function(e){var t=[],n,r;typeof e!="function"&&(e=lt(e));for(var i=-1,s=this.length;++i<s;)for(var o=this[i],u=-1,a=o.length;++u<a;)if(r=o[u])t.push(n=$i(e.call(r,r.__data__,u))),n.parentNode=r;return at(t)},Ss.attr=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node();return e=d3.ns.qualify(e),e.local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(ct(t,e[t]));return this}return this.each(ct(e,t))},Ss.classed=function(e,t){if(arguments.length<2){if(typeof e=="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return!1}else{t=n.className,t.baseVal!=null&&(t=t.baseVal);while(++i<r)if(!ht(e[i]).test(t))return!1}return!0}for(t in e)this.each(pt(t,e[t]));return this}return this.each(pt(e,t))},Ss.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.each(vt(n,e[n],t));return this}if(r<2)return window.getComputedStyle(this.node(),null).getPropertyValue(e);n=""}return this.each(vt(e,t,n))},Ss.property=function(e,t){if(arguments.length<2){if(typeof e=="string")return this.node()[e];for(t in e)this.each(mt(t,e[t]));return this}return this.each(mt(e,t))},Ss.text=function(e){return arguments.length<1?this.node().textContent:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e})},Ss.html=function(e){return arguments.length<1?this.node().innerHTML:this.each(typeof e=="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e})},Ss.append=function(e){function t(){return this.appendChild(document.createElementNS(this.namespaceURI,e))}function n(){return this.appendChild(document.createElementNS(e.space,e.local))}return e=d3.ns.qualify(e),this.select(e.local?n:t)},Ss.insert=function(e,t){function n(){return this.insertBefore(document.createElementNS(this.namespaceURI,e),gs(t,this))}function r(){return this.insertBefore(document.createElementNS(e.space,e.local),gs(t,this))}return e=d3.ns.qualify(e),this.select(e.local?r:n)},Ss.remove=function(){return this.each(function(){var e=this.parentNode;e&&e.removeChild(this)})},Ss.data=function(e,t){function n(e,n){var i,s=e.length,o=n.length,u=Math.min(s,o),c=Math.max(s,o),h=[],p=[],d=[],v,m;if(t){var g=new r,y=[],b,w=n.length;for(i=-1;++i<s;)b=t.call(v=e[i],v.__data__,i),g.has(b)?d[w++]=v:g.set(b,v),y.push(b);for(i=-1;++i<o;)b=t.call(n,m=n[i],i),g.has(b)?(h[i]=v=g.get(b),v.__data__=m,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null),g.remove(b);for(i=-1;++i<s;)g.has(y[i])&&(d[i]=e[i])}else{for(i=-1;++i<u;)v=e[i],m=n[i],v?(v.__data__=m,h[i]=v,p[i]=d[i]=null):(p[i]=gt(m),h[i]=d[i]=null);for(;i<o;++i)p[i]=gt(n[i]),h[i]=d[i]=null;for(;i<c;++i)d[i]=e[i],p[i]=h[i]=null}p.update=h,p.parentNode=h.parentNode=d.parentNode=e.parentNode,a.push(p),f.push(h),l.push(d)}var i=-1,s=this.length,o,u;if(!arguments.length){e=new Array(s=(o=this[0]).length);while(++i<s)if(u=o[i])e[i]=u.__data__;return e}var a=St([]),f=at([]),l=at([]);if(typeof e=="function")while(++i<s)n(o=this[i],e.call(o,o.parentNode.__data__,i));else while(++i<s)n(o=this[i],e);return f.enter=function(){return a},f.exit=function(){return l},f},Ss.datum=Ss.map=function(e){return arguments.length<1?this.property("__data__"):this.property("__data__",e)},Ss.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]),n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i,i.__data__,u)&&n.push(i)}return at(t)},Ss.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;)if(s=n[r])i&&i!==s.nextSibling&&i.parentNode.insertBefore(s,i),i=s;return this},Ss.sort=function(e){e=bt.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Ss.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t=!1);for(n in e)this.each(wt(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(wt(e,t,n))},Ss.each=function(e){return Et(this,function(t,n,r){e.call(t,t.__data__,n,r)})},Ss.call=function(e){return e.apply(this,(arguments[0]=this,arguments)),this},Ss.empty=function(){return!this.node()},Ss.node=function(e){for(var t=0,n=this.length;t<n;t++)for(var r=this[t],i=0,s=r.length;i<s;i++){var o=r[i];if(o)return o}return null},Ss.transition=function(){var e=[],t,n;for(var r=-1,i=this.length;++r<i;){e.push(t=[]);for(var s=this[r],o=-1,u=s.length;++o<u;)t.push((n=s[o])?{node:n,delay:Ms,duration:_s}:null)}return xt(e,ks||++Cs,Date.now())};var xs=at([[document]]);xs[0].parentNode=bs,d3.select=function(e){return typeof e=="string"?xs.select(e):at([[e]])},d3.selectAll=function(e){return typeof e=="string"?xs.selectAll(e):at([$i(e)])};var Ts=[];d3.selection.enter=St,d3.selection.enter.prototype=Ts,Ts.append=Ss.append,Ts.insert=Ss.insert,Ts.empty=Ss.empty,Ts.node=Ss.node,Ts.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update,t.push(n=[]),n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;)(o=s[f])?(n.push(i[f]=r=e.call(s.parentNode,o.__data__,f)),r.__data__=o.__data__):n.push(null)}return at(t)};var Ns=[],Cs=0,ks=0,Ls=0,As=250,Os=d3.ease("cubic-in-out"),Ms=Ls,_s=As,Ds=Os;Ns.call=Ss.call,d3.transition=function(e){return arguments.length?ks?e.transition():e:xs.transition()},d3.transition.prototype=Ns,Ns.select=function(e){var t=[],n,r,i;typeof e!="function"&&(e=ft(e));for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;)(i=u[a])&&(r=e.call(i.node,i.node.__data__,a))?("__data__"in i.node&&(r.__data__=i.node.__data__),n.push({node:r,delay:i.delay,duration:i.duration})):n.push(null)}return xt(t,this.id,this.time).ease(this.ease())},Ns.selectAll=function(e){var t=[],n,r,i;typeof e!="function"&&(e=lt(e));for(var s=-1,o=this.length;++s<o;)for(var u=this[s],a=-1,f=u.length;++a<f;)if(i=u[a]){r=e.call(i.node,i.node.__data__,a),t.push(n=[]);for(var l=-1,c=r.length;++l<c;)n.push({node:r[l],delay:i.delay,duration:i.duration})}return xt(t,this.id,this.time).ease(this.ease())},Ns.filter=function(e){var t=[],n,r,i;typeof e!="function"&&(e=yt(e));for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++)(i=r[u])&&e.call(i.node,i.node.__data__,u)&&n.push(i)}return xt(t,this.id,this.time).ease(this.ease())},Ns.attr=function(e,t){if(arguments.length<2){for(t in e)this.attrTween(t,Ct(e[t],t));return this}return this.attrTween(e,Ct(t,e))},Ns.attrTween=function(e,t){function n(e,n){var r=t.call(this,e,n,this.getAttribute(i));return r===Ps?(this.removeAttribute(i),null):r&&function(e){this.setAttribute(i,r(e))}}function r(e,n){var r=t.call(this,e,n,this.getAttributeNS(i.space,i.local));return r===Ps?(this.removeAttributeNS(i.space,i.local),null):r&&function(e){this.setAttributeNS(i.space,i.local,r(e))}}var i=d3.ns.qualify(e);return this.tween("attr."+e,i.local?r:n)},Ns.style=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!="string"){r<2&&(t="");for(n in e)this.styleTween(n,Ct(e[n],n),t);return this}n=""}return this.styleTween(e,Ct(t,e),n)},Ns.styleTween=function(e,t,n){return arguments.length<3&&(n=""),this.tween("style."+e,function(r,i){var s=t.call(this,r,i,window.getComputedStyle(this,null).getPropertyValue(e));return s===Ps?(this.style.removeProperty(e),null):s&&function(t){this.style.setProperty(e,s(t),n)}})},Ns.text=function(e){return this.tween("text",function(t,n){this.textContent=typeof e=="function"?e.call(this,t,n):e})},Ns.remove=function(){return this.each("end.transition",function(){var e;!this.__transition__&&(e=this.parentNode)&&e.removeChild(this)})},Ns.delay=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.delay=e.call(t=t.node,t.__data__,n,r)|0}:(e|=0,function(t){t.delay=e}))},Ns.duration=function(e){return Et(this,typeof e=="function"?function(t,n,r){t.duration=Math.max(1,e.call(t=t.node,t.__data__,n,r)|0)}:(e=Math.max(1,e|0),function(t){t.duration=e}))},Ns.transition=function(){return this.select(s)},d3.tween=function(e,t){function n(n,r,i){var s=e.call(this,n,r);return s==null?i!=""&&Ps:i!=s&&t(i,s)}function r(n,r,i){return i!=e&&t(i,e)}return typeof e=="function"?n:e==null?Nt:(e+="",r)};var Ps={},Hs=null,Bs,js;d3.timer=function(e,t,n){var r=!1,i,s=Hs;if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}while(s){if(s.callback===e){s.then=n,s.delay=t,r=!0;break}i=s,s=s.next}r||(Hs={callback:e,then:n,delay:t,next:Hs}),Bs||(js=clearTimeout(js),Bs=1,Fs(kt))},d3.timer.flush=function(){var e,t=Date.now(),n=Hs;while(n)e=t-n.then,n.delay||(n.flush=n.callback(e)),n=n.next;Lt()};var Fs=window.requestAnimationFrame||window.webkitRequestAnimationFrame||
-window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){setTimeout(e,17)};d3.mouse=function(e){return At(e,_())};var Is=/WebKit/.test(navigator.userAgent)?-1:0;d3.touches=function(e,t){return arguments.length<2&&(t=_().touches),t?$i(t).map(function(t){var n=At(e,t);return n.identifier=t.identifier,n}):[]},d3.scale={},d3.scale.linear=function(){return Ht([0,1],[0,1],d3.interpolate,!1)},d3.scale.log=function(){return zt(d3.scale.linear(),Wt)};var qs=d3.format(".0e");Wt.pow=function(e){return Math.pow(10,e)},Xt.pow=function(e){return-Math.pow(10,-e)},d3.scale.pow=function(){return Vt(d3.scale.linear(),1)},d3.scale.sqrt=function(){return d3.scale.pow().exponent(.5)},d3.scale.ordinal=function(){return Jt([],{t:"range",a:[[]]})},d3.scale.category10=function(){return d3.scale.ordinal().range(Rs)},d3.scale.category20=function(){return d3.scale.ordinal().range(Us)},d3.scale.category20b=function(){return d3.scale.ordinal().range(zs)},d3.scale.category20c=function(){return d3.scale.ordinal().range(Ws)};var Rs=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],Us=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"],zs=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"],Ws=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];d3.scale.quantile=function(){return Kt([],[])},d3.scale.quantize=function(){return Qt(0,1,[0,1])},d3.scale.threshold=function(){return Gt([.5],[0,1])},d3.scale.identity=function(){return Yt([0,1])},d3.svg={},d3.svg.arc=function(){function e(){var e=t.apply(this,arguments),s=n.apply(this,arguments),o=r.apply(this,arguments)+Xs,u=i.apply(this,arguments)+Xs,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<Math.PI?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=Vs?e?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+e+"A"+e+","+e+" 0 1,0 0,"+ -e+"A"+e+","+e+" 0 1,0 0,"+e+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":e?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+e*h+","+e*p+"A"+e+","+e+" 0 "+f+",0 "+e*l+","+e*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var t=Zt,n=en,r=tn,i=nn;return e.innerRadius=function(n){return arguments.length?(t=u(n),e):t},e.outerRadius=function(t){return arguments.length?(n=u(t),e):n},e.startAngle=function(t){return arguments.length?(r=u(t),e):r},e.endAngle=function(t){return arguments.length?(i=u(t),e):i},e.centroid=function(){var e=(t.apply(this,arguments)+n.apply(this,arguments))/2,s=(r.apply(this,arguments)+i.apply(this,arguments))/2+Xs;return[Math.cos(s)*e,Math.sin(s)*e]},e};var Xs=-Math.PI/2,Vs=2*Math.PI-1e-6;d3.svg.line=function(){return rn(i)};var $s=d3.map({linear:un,"linear-closed":an,"step-before":fn,"step-after":ln,basis:mn,"basis-open":gn,"basis-closed":yn,bundle:bn,cardinal:pn,"cardinal-open":cn,"cardinal-closed":hn,monotone:Nn});$s.forEach(function(e,t){t.key=e,t.closed=/-closed$/.test(e)});var Js=[0,2/3,1/3,0],Ks=[0,1/3,2/3,0],Qs=[0,1/6,2/3,1/6];d3.svg.line.radial=function(){var e=rn(Cn);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},fn.reverse=ln,ln.reverse=fn,d3.svg.area=function(){return kn(i)},d3.svg.area.radial=function(){var e=kn(Cn);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},d3.svg.chord=function(){function e(e,u){var a=t(this,s,e,u),f=t(this,o,e,u);return"M"+a.p0+r(a.r,a.p1,a.a1-a.a0)+(n(a,f)?i(a.r,a.p1,a.r,a.p0):i(a.r,a.p1,f.r,f.p0)+r(f.r,f.p1,f.a1-f.a0)+i(f.r,f.p1,a.r,a.p0))+"Z"}function t(e,t,n,r){var i=t.call(e,n,r),s=a.call(e,i,r),o=f.call(e,i,r)+Xs,u=l.call(e,i,r)+Xs;return{r:s,a0:o,a1:u,p0:[s*Math.cos(o),s*Math.sin(o)],p1:[s*Math.cos(u),s*Math.sin(u)]}}function n(e,t){return e.a0==t.a0&&e.a1==t.a1}function r(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Math.PI)+",1 "+t}function i(e,t,n,r){return"Q 0,0 "+r}var s=Ln,o=An,a=On,f=tn,l=nn;return e.radius=function(t){return arguments.length?(a=u(t),e):a},e.source=function(t){return arguments.length?(s=u(t),e):s},e.target=function(t){return arguments.length?(o=u(t),e):o},e.startAngle=function(t){return arguments.length?(f=u(t),e):f},e.endAngle=function(t){return arguments.length?(l=u(t),e):l},e},d3.svg.diagonal=function(){function e(e,i){var s=t.call(this,e,i),o=n.call(this,e,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];return a=a.map(r),"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var t=Ln,n=An,r=Dn;return e.source=function(n){return arguments.length?(t=u(n),e):t},e.target=function(t){return arguments.length?(n=u(t),e):n},e.projection=function(t){return arguments.length?(r=t,e):r},e},d3.svg.diagonal.radial=function(){var e=d3.svg.diagonal(),t=Dn,n=e.projection;return e.projection=function(e){return arguments.length?n(Pn(t=e)):t},e},d3.svg.mouse=d3.mouse,d3.svg.touches=d3.touches,d3.svg.symbol=function(){function e(e,r){return(Gs.get(t.call(this,e,r))||jn)(n.call(this,e,r))}var t=Bn,n=Hn;return e.type=function(n){return arguments.length?(t=u(n),e):t},e.size=function(t){return arguments.length?(n=u(t),e):n},e};var Gs=d3.map({circle:jn,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Zs)),n=t*Zs;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Ys),n=t*Ys/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});d3.svg.symbolTypes=Gs.keys();var Ys=Math.sqrt(3),Zs=Math.tan(30*Math.PI/180);d3.svg.axis=function(){function e(e){e.each(function(){var e=d3.select(this),c=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,h=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f,p=qn(t,c,l),d=e.selectAll(".minor").data(p,String),v=d.enter().insert("line","g").attr("class","tick minor").style("opacity",1e-6),m=d3.transition(d.exit()).style("opacity",1e-6).remove(),g=d3.transition(d).style("opacity",1),y=e.selectAll("g").data(c,String),b=y.enter().insert("g","path").style("opacity",1e-6),w=d3.transition(y.exit()).style("opacity",1e-6).remove(),E=d3.transition(y).style("opacity",1),S,x=_t(t),T=e.selectAll(".domain").data([0]),N=T.enter().append("path").attr("class","domain"),C=d3.transition(T),k=t.copy(),L=this.__chart__||k;this.__chart__=k,b.append("line").attr("class","tick"),b.append("text");var A=b.select("line"),O=E.select("line"),M=y.select("text").text(h),_=b.select("text"),D=E.select("text");switch(n){case"bottom":S=Fn,v.attr("y2",i),g.attr("x2",0).attr("y2",i),A.attr("y2",r),_.attr("y",Math.max(r,0)+o),O.attr("x2",0).attr("y2",r),D.attr("x",0).attr("y",Math.max(r,0)+o),M.attr("dy",".71em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+s+"V0H"+x[1]+"V"+s);break;case"top":S=Fn,v.attr("y2",-i),g.attr("x2",0).attr("y2",-i),A.attr("y2",-r),_.attr("y",-(Math.max(r,0)+o)),O.attr("x2",0).attr("y2",-r),D.attr("x",0).attr("y",-(Math.max(r,0)+o)),M.attr("dy","0em").attr("text-anchor","middle"),C.attr("d","M"+x[0]+","+ -s+"V0H"+x[1]+"V"+ -s);break;case"left":S=In,v.attr("x2",-i),g.attr("x2",-i).attr("y2",0),A.attr("x2",-r),_.attr("x",-(Math.max(r,0)+o)),O.attr("x2",-r).attr("y2",0),D.attr("x",-(Math.max(r,0)+o)).attr("y",0),M.attr("dy",".32em").attr("text-anchor","end"),C.attr("d","M"+ -s+","+x[0]+"H0V"+x[1]+"H"+ -s);break;case"right":S=In,v.attr("x2",i),g.attr("x2",i).attr("y2",0),A.attr("x2",r),_.attr("x",Math.max(r,0)+o),O.attr("x2",r).attr("y2",0),D.attr("x",Math.max(r,0)+o).attr("y",0),M.attr("dy",".32em").attr("text-anchor","start"),C.attr("d","M"+s+","+x[0]+"H0V"+x[1]+"H"+s)}if(t.ticks)b.call(S,L),E.call(S,k),w.call(S,k),v.call(S,L),g.call(S,k),m.call(S,k);else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};b.call(S,H),E.call(S,H)}})}var t=d3.scale.linear(),n="bottom",r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;return e.scale=function(n){return arguments.length?(t=n,e):t},e.orient=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return arguments.length?(u=arguments,e):u},e.tickValues=function(t){return arguments.length?(a=t,e):a},e.tickFormat=function(t){return arguments.length?(f=t,e):f},e.tickSize=function(t,n,o){if(!arguments.length)return r;var u=arguments.length-1;return r=+t,i=u>1?+n:r,s=u>0?+arguments[u]:r,e},e.tickPadding=function(t){return arguments.length?(o=+t,e):o},e.tickSubdivide=function(t){return arguments.length?(l=+t,e):l},e},d3.svg.brush=function(){function e(s){s.each(function(){var s=d3.select(this),f=s.selectAll(".background").data([0]),l=s.selectAll(".extent").data([0]),c=s.selectAll(".resize").data(a,String),h;s.style("pointer-events","all").on("mousedown.brush",i).on("touchstart.brush",i),f.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),l.enter().append("rect").attr("class","extent").style("cursor","move"),c.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return eo[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),c.style("display",e.empty()?"none":null),c.exit().remove(),o&&(h=_t(o),f.attr("x",h[0]).attr("width",h[1]-h[0]),n(s)),u&&(h=_t(u),f.attr("y",h[0]).attr("height",h[1]-h[0]),r(s)),t(s)})}function t(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+f[+/e$/.test(e)][0]+","+f[+/^s/.test(e)][1]+")"})}function n(e){e.select(".extent").attr("x",f[0][0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1][0]-f[0][0])}function r(e){e.select(".extent").attr("y",f[0][1]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1][1]-f[0][1])}function i(){function i(){var e=d3.event.changedTouches;return e?d3.touches(v,e)[0]:d3.mouse(v)}function a(){d3.event.keyCode==32&&(S||(x=null,T[0]-=f[1][0],T[1]-=f[1][1],S=2),M())}function c(){d3.event.keyCode==32&&S==2&&(T[0]+=f[1][0],T[1]+=f[1][1],S=0,M())}function h(){var e=i(),s=!1;N&&(e[0]+=N[0],e[1]+=N[1]),S||(d3.event.altKey?(x||(x=[(f[0][0]+f[1][0])/2,(f[0][1]+f[1][1])/2]),T[0]=f[+(e[0]<x[0])][0],T[1]=f[+(e[1]<x[1])][1]):x=null),w&&p(e,o,0)&&(n(y),s=!0),E&&p(e,u,1)&&(r(y),s=!0),s&&(t(y),g({type:"brush",mode:S?"move":"resize"}))}function p(e,t,n){var r=_t(t),i=r[0],s=r[1],o=T[n],u=f[1][n]-f[0][n],a,c;S&&(i-=o,s-=u+o),a=Math.max(i,Math.min(s,e[n])),S?c=(a+=o)+u:(x&&(o=Math.max(i,Math.min(s,2*x[n]-a))),o<a?(c=a,a=o):c=o);if(f[0][n]!==a||f[1][n]!==c)return l=null,f[0][n]=a,f[1][n]=c,!0}function d(){h(),y.style("pointer-events","all").selectAll(".resize").style("display",e.empty()?"none":null),d3.select("body").style("cursor",null),C.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),g({type:"brushend"}),M()}var v=this,m=d3.select(d3.event.target),g=s.of(v,arguments),y=d3.select(v),b=m.datum(),w=!/^(n|s)$/.test(b)&&o,E=!/^(e|w)$/.test(b)&&u,S=m.classed("extent"),x,T=i(),N,C=d3.select(window).on("mousemove.brush",h).on("mouseup.brush",d).on("touchmove.brush",h).on("touchend.brush",d).on("keydown.brush",a).on("keyup.brush",c);if(S)T[0]=f[0][0]-T[0],T[1]=f[0][1]-T[1];else if(b){var k=+/w$/.test(b),L=+/^n/.test(b);N=[f[1-k][0]-T[0],f[1-L][1]-T[1]],T[0]=f[k][0],T[1]=f[L][1]}else d3.event.altKey&&(x=T.slice());y.style("pointer-events","none").selectAll(".resize").style("display",null),d3.select("body").style("cursor",m.style("cursor")),g({type:"brushstart"}),h(),M()}var s=D(e,"brushstart","brush","brushend"),o=null,u=null,a=to[0],f=[[0,0],[0,0]],l;return e.x=function(t){return arguments.length?(o=t,a=to[!o<<1|!u],e):o},e.y=function(t){return arguments.length?(u=t,a=to[!o<<1|!u],e):u},e.extent=function(t){var n,r,i,s,a;return arguments.length?(l=[[0,0],[0,0]],o&&(n=t[0],r=t[1],u&&(n=n[0],r=r[0]),l[0][0]=n,l[1][0]=r,o.invert&&(n=o(n),r=o(r)),r<n&&(a=n,n=r,r=a),f[0][0]=n|0,f[1][0]=r|0),u&&(i=t[0],s=t[1],o&&(i=i[1],s=s[1]),l[0][1]=i,l[1][1]=s,u.invert&&(i=u(i),s=u(s)),s<i&&(a=i,i=s,s=a),f[0][1]=i|0,f[1][1]=s|0),e):(t=l||f,o&&(n=t[0][0],r=t[1][0],l||(n=f[0][0],r=f[1][0],o.invert&&(n=o.invert(n),r=o.invert(r)),r<n&&(a=n,n=r,r=a))),u&&(i=t[0][1],s=t[1][1],l||(i=f[0][1],s=f[1][1],u.invert&&(i=u.invert(i),s=u.invert(s)),s<i&&(a=i,i=s,s=a))),o&&u?[[n,i],[r,s]]:o?[n,r]:u&&[i,s])},e.clear=function(){return l=null,f[0][0]=f[0][1]=f[1][0]=f[1][1]=0,e},e.empty=function(){return o&&f[0][0]===f[1][0]||u&&f[0][1]===f[1][1]},d3.rebind(e,s,"on")};var eo={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},to=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];d3.behavior={},d3.behavior.drag=function(){function e(){this.on("mousedown.drag",t).on("touchstart.drag",t)}function t(){function e(){var e=o.parentNode;return f?d3.touches(e).filter(function(e){return e.identifier===f})[0]:d3.mouse(e)}function t(){if(!o.parentNode)return i();var t=e(),n=t[0]-c[0],r=t[1]-c[1];h|=n|r,c=t,M(),u({type:"drag",x:t[0]+l[0],y:t[1]+l[1],dx:n,dy:r})}function i(){u({type:"dragend"}),h&&(M(),d3.event.target===a&&p.on("click.drag",s,!0)),p.on(f?"touchmove.drag-"+f:"mousemove.drag",null).on(f?"touchend.drag-"+f:"mouseup.drag",null)}function s(){M(),p.on("click.drag",null)}var o=this,u=n.of(o,arguments),a=d3.event.target,f=d3.event.touches&&d3.event.changedTouches[0].identifier,l,c=e(),h=0,p=d3.select(window).on(f?"touchmove.drag-"+f:"mousemove.drag",t).on(f?"touchend.drag-"+f:"mouseup.drag",i,!0);r?(l=r.apply(o,arguments),l=[l.x-c[0],l.y-c[1]]):l=[0,0],f||M(),u({type:"dragstart"})}var n=D(e,"drag","dragstart","dragend"),r=null;return e.origin=function(t){return arguments.length?(r=t,e):r},d3.rebind(e,n,"on")},d3.behavior.zoom=function(){function e(){this.on("mousedown.zoom",o).on("mousewheel.zoom",u).on("mousemove.zoom",a).on("DOMMouseScroll.zoom",u).on("dblclick.zoom",f).on("touchstart.zoom",l).on("touchmove.zoom",c).on("touchend.zoom",l)}function t(e){return[(e[0]-h[0])/d,(e[1]-h[1])/d]}function n(e){return[e[0]*d+h[0],e[1]*d+h[1]]}function r(e){d=Math.max(m[0],Math.min(m[1],e))}function i(e,t){t=n(t),h[0]+=e[0]-t[0],h[1]+=e[1]-t[1]}function s(e){b&&b.domain(y.range().map(function(e){return(e-h[0])/d}).map(y.invert)),E&&E.domain(w.range().map(function(e){return(e-h[1])/d}).map(w.invert)),d3.event.preventDefault(),e({type:"zoom",scale:d,translate:h})}function o(){function e(){f=1,i(d3.mouse(o),c),s(u)}function n(){f&&M(),l.on("mousemove.zoom",null).on("mouseup.zoom",null),f&&d3.event.target===a&&l.on("click.zoom",r,!0)}function r(){M(),l.on("click.zoom",null)}var o=this,u=g.of(o,arguments),a=d3.event.target,f=0,l=d3.select(window).on("mousemove.zoom",e).on("mouseup.zoom",n),c=t(d3.mouse(o));window.focus(),M()}function u(){p||(p=t(d3.mouse(this))),r(Math.pow(2,Rn()*.002)*d),i(d3.mouse(this),p),s(g.of(this,arguments))}function a(){p=null}function f(){var e=d3.mouse(this),n=t(e);r(d3.event.shiftKey?d/2:d*2),i(e,n),s(g.of(this,arguments))}function l(){var e=d3.touches(this),n=Date.now();v=d,p={},e.forEach(function(e){p[e.identifier]=t(e)}),M();if(e.length===1){if(n-S<500){var o=e[0],u=t(e[0]);r(d*2),i(o,u),s(g.of(this,arguments))}S=n}}function c(){var e=d3.touches(this),t=e[0],n=p[t.identifier];if(o=e[1]){var o,u=p[o.identifier];t=[(t[0]+o[0])/2,(t[1]+o[1])/2],n=[(n[0]+u[0])/2,(n[1]+u[1])/2],r(d3.event.scale*v)}i(t,n),S=null,s(g.of(this,arguments))}var h=[0,0],p,d=1,v,m=ro,g=D(e,"zoom"),y,b,w,E,S;return e.translate=function(t){return arguments.length?(h=t.map(Number),e):h},e.scale=function(t){return arguments.length?(d=+t,e):d},e.scaleExtent=function(t){return arguments.length?(m=t==null?ro:t.map(Number),e):m},e.x=function(t){return arguments.length?(b=t,y=t.copy(),e):b},e.y=function(t){return arguments.length?(E=t,w=t.copy(),e):E},d3.rebind(e,g,"on")};var no,ro=[0,Infinity];d3.layout={},d3.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Un(e[n]));return t}},d3.layout.chord=function(){function e(){var e={},n=[],c=d3.range(o),h=[],p,d,v,m,g;r=[],i=[],p=0,m=-1;while(++m<o){d=0,g=-1;while(++g<o)d+=s[m][g];n.push(d),h.push(d3.range(o)),p+=d}a&&c.sort(function(e,t){return a(n[e],n[t])}),f&&h.forEach(function(e,t){e.sort(function(e,n){return f(s[t][e],s[t][n])})}),p=(2*Math.PI-u*o)/p,d=0,m=-1;while(++m<o){v=d,g=-1;while(++g<o){var y=c[m],b=h[y][g],w=s[y][b],E=d,S=d+=w*p;e[y+"-"+b]={index:y,subindex:b,startAngle:E,endAngle:S,value:w}}i[y]={index:y,startAngle:v,endAngle:d,value:(d-v)/p},d+=u}m=-1;while(++m<o){g=m-1;while(++g<o){var x=e[m+"-"+g],T=e[g+"-"+m];(x.value||T.value)&&r.push(x.value<T.value?{source:T,target:x}:{source:x,target:T})}}l&&t()}function t(){r.sort(function(e,t){return l((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var n={},r,i,s,o,u=0,a,f,l;return n.matrix=function(e){return arguments.length?(o=(s=e)&&s.length,r=i=null,n):s},n.padding=function(e){return arguments.length?(u=e,r=i=null,n):u},n.sortGroups=function(e){return arguments.length?(a=e,r=i=null,n):a},n.sortSubgroups=function(e){return arguments.length?(f=e,r=null,n):f},n.sortChords=function(e){return arguments.length?(l=e,r&&t(),n):l},n.chords=function(){return r||e(),r},n.groups=function(){return i||e(),i},n},d3.layout.force=function(){function e(e){return function(t,n,r,i,s){if(t.point!==e){var o=t.cx-e.x,u=t.cy-e.y,a=1/Math.sqrt(o*o+u*u);if((i-n)*a<d){var f=t.charge*a*a;return e.px-=o*f,e.py-=u*f,!0}if(t.point&&isFinite(a)){var f=t.pointCharge*a*a;e.px-=o*f,e.py-=u*f}}return!t.charge}}function t(e){e.px=d3.event.x,e.py=d3.event.y,n.resume()}var n={},r=d3.dispatch("start","tick","end"),s=[1,1],o,a,f=.9,l=Qn,c=Gn,h=-30,p=.1,d=.8,v,m=[],g=[],y,b,w;return n.tick=function(){if((a*=.99)<.005)return r.end({type:"end",alpha:a=0}),!0;var t=m.length,n=g.length,i,o,u,l,c,d,v,E,S;for(o=0;o<n;++o){u=g[o],l=u.source,c=u.target,E=c.x-l.x,S=c.y-l.y;if(d=E*E+S*S)d=a*b[o]*((d=Math.sqrt(d))-y[o])/d,E*=d,S*=d,c.x-=E*(v=l.weight/(c.weight+l.weight)),c.y-=S*v,l.x+=E*(v=1-v),l.y+=S*v}if(v=a*p){E=s[0]/2,S=s[1]/2,o=-1;if(v)while(++o<t)u=m[o],u.x+=(E-u.x)*v,u.y+=(S-u.y)*v}if(h){Kn(i=d3.geom.quadtree(m),a,w),o=-1;while(++o<t)(u=m[o]).fixed||i.visit(e(u))}o=-1;while(++o<t)u=m[o],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*f,u.y-=(u.py-(u.py=u.y))*f);r.tick({type:"tick",alpha:a})},n.nodes=function(e){return arguments.length?(m=e,n):m},n.links=function(e){return arguments.length?(g=e,n):g},n.size=function(e){return arguments.length?(s=e,n):s},n.linkDistance=function(e){return arguments.length?(l=u(e),n):l},n.distance=n.linkDistance,n.linkStrength=function(e){return arguments.length?(c=u(e),n):c},n.friction=function(e){return arguments.length?(f=e,n):f},n.charge=function(e){return arguments.length?(h=typeof e=="function"?e:+e,n):h},n.gravity=function(e){return arguments.length?(p=e,n):p},n.theta=function(e){return arguments.length?(d=e,n):d},n.alpha=function(e){return arguments.length?(a?e>0?a=e:a=0:e>0&&(r.start({type:"start",alpha:a=e}),d3.timer(n.tick)),n):a},n.start=function(){function e(e,n){var i=t(r),s=-1,o=i.length,u;while(++s<o)if(!isNaN(u=i[s][e]))return u;return Math.random()*n}function t(){if(!p){p=[];for(i=0;i<o;++i)p[i]=[];for(i=0;i<u;++i){var e=g[i];p[e.source.index].push(e.target),p[e.target.index].push(e.source)}}return p[r]}var r,i,o=m.length,u=g.length,a=s[0],f=s[1],p,d;for(r=0;r<o;++r)(d=m[r]).index=r,d.weight=0;y=[],b=[];for(r=0;r<u;++r)d=g[r],typeof d.source=="number"&&(d.source=m[d.source]),typeof d.target=="number"&&(d.target=m[d.target]),y[r]=l.call(this,d,r),b[r]=c.call(this,d,r),++d.source.weight,++d.target.weight;for(r=0;r<o;++r)d=m[r],isNaN(d.x)&&(d.x=e("x",a)),isNaN(d.y)&&(d.y=e("y",f)),isNaN(d.px)&&(d.px=d.x),isNaN(d.py)&&(d.py=d.y);w=[];if(typeof h=="function")for(r=0;r<o;++r)w[r]=+h.call(this,m[r],r);else for(r=0;r<o;++r)w[r]=h;return n.resume()},n.resume=function(){return n.alpha(.1)},n.stop=function(){return n.alpha(0)},n.drag=function(){o||(o=d3.behavior.drag().origin(i).on("dragstart",Xn).on("drag",t).on("dragend",Vn)),this.on("mouseover.force",$n).on("mouseout.force",Jn).call(o)},d3.rebind(n,r,"on")},d3.layout.partition=function(){function e(t,n,r,i){var s=t.children;t.x=n,t.y=t.depth*i,t.dx=r,t.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;r=t.value?r/t.value:0;while(++o<u)e(a=s[o],n,f=a.value*r,i),n+=f}}function t(e){var n=e.children,r=0;if(n&&(s=n.length)){var i=-1,s;while(++i<s)r=Math.max(r,t(n[i]))}return 1+r}function n(n,s){var o=r.call(this,n,s);return e(o[0],0,i[0],i[1]/t(o[0])),o}var r=d3.layout.hierarchy(),i=[1,1];return n.size=function(e){return arguments.length?(i=e,n):i},fr(n,r)},d3.layout.pie=function(){function e(s,o){var u=s.map(function(n,r){return+t.call(e,n,r)}),a=+(typeof r=="function"?r.apply(this,arguments):r),f=((typeof i=="function"?i.apply(this,arguments):i)-r)/d3.sum(u),l=d3.range(s.length);n!=null&&l.sort(n===io?function(e,t){return u[t]-u[e]}:function(e,t){return n(s[e],s[t])});var c=[];return l.forEach(function(e){var t;c[e]={data:s[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}}),c}var t=Number,n=io,r=0,i=2*Math.PI;return e.value=function(n){return arguments.length?(t=n,e):t},e.sort=function(t){return arguments.length?(n=t,e):n},e.startAngle=function(t){return arguments.length?(r=t,e):r},e.endAngle=function(t){return arguments.length?(i=t,e):i},e};var io={};d3.layout.stack=function(){function e(i,a){var f=i.map(function(n,r){return t.call(e,n,r)}),l=f.map(function(t,n){return t.map(function(t,n){return[o.call(e,t,n),u.call(e,t,n)]})}),c=n.call(e,l,a);f=d3.permute(f,c),l=d3.permute(l,c);var h=r.call(e,l,a),p=f.length,d=f[0].length,v,m,g;for(m=0;m<d;++m){s.call(e,f[0][m],g=h[m],l[0][m][1]);for(v=1;v<p;++v)s.call(e,f[v][m],g+=l[v-1][m][1],l[v][m][1])}return i}var t=i,n=tr,r=nr,s=er,o=Yn,u=Zn;return e.values=function(n){return arguments.length?(t=n,e):t},e.order=function(t){return arguments.length?(n=typeof t=="function"?t:so.get(t)||tr,e):n},e.offset=function(t){return arguments.length?(r=typeof t=="function"?t:oo.get(t)||nr,e):r},e.x=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(u=t,e):u},e.out=function(t){return arguments.length?(s=t,e):s},e};var so=d3.map({"inside-out":function(e){var t=e.length,n,r,i=e.map(rr),s=e.map(ir),o=d3.range(t).sort(function(e,t){return i[e]-i[t]}),u=0,a=0,f=[],l=[];for(n=0;n<t;++n)r=o[n],u<a?(u+=s[r],f.push(r)):(a+=s[r],l.push(r));return l.reverse().concat(f)},reverse:function(e){return d3.range(e.length).reverse()},"default":tr}),oo=d3.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];u>i&&(i=u),r.push(u)}for(o=0;o<n;++o)a[o]=(i-r[o])/2;return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i=0,s,o,u,a,f,l,c,h,p,d=[];d[0]=h=p=0;for(o=1;o<r;++o){for(s=0,a=0;s<t;++s)a+=e[s][o][1];for(s=0,f=0,c=n[o][0]-n[o-1][0];s<t;++s){for(u=0,l=(e[s][o][1]-e[s][o-1][1])/(2*c);u<s;++u)l+=(e[u][o][1]-e[u][o-1][1])/c;f+=l*e[s][o][1]}d[o]=h-=a?f/a*c:0,h<p&&(p=h)}for(o=0;o<r;++o)d[o]-=p;return d},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:nr});d3.layout.histogram=function(){function e(e,s){var o=[],u=e.map(n,this),a=r.call(this,u,s),f=i.call(this,a,u,s),l,s=-1,c=u.length,h=f.length-1,p=t?1:1/c,d;while(++s<h)l=o[s]=[],l.dx=f[s+1]-(l.x=f[s]),l.y=0;if(h>0){s=-1;while(++s<c)d=u[s],d>=a[0]&&d<=a[1]&&(l=o[d3.bisect(f,d,1,h)-1],l.y+=p,l.push(e[s]))}return o}var t=!0,n=Number,r=ar,i=or;return e.value=function(t){return arguments.length?(n=t,e):n},e.range=function(t){return arguments.length?(r=u(t),e):r},e.bins=function(t){return arguments.length?(i=typeof t=="number"?function(e){return ur(e,t)}:u(t),e):i},e.frequency=function(n){return arguments.length?(t=!!n,e):t},e},d3.layout.hierarchy=function(){function e(t,o,u){var a=i.call(n,t,o),f=uo?t:{data:t};f.depth=o,u.push(f);if(a&&(c=a.length)){var l=-1,c,h=f.children=[],p=0,d=o+1,v;while(++l<c)v=e(a[l],d,u),v.parent=f,h.push(v),p+=v.value;r&&h.sort(r),s&&(f.value=p)}else s&&(f.value=+s.call(n,t,o)||0);return f}function t(e,r){var i=e.children,o=0;if(i&&(a=i.length)){var u=-1,a,f=r+1;while(++u<a)o+=t(i[u],f)}else s&&(o=+s.call(n,uo?e:e.data,r)||0);return s&&(e.value=o),o}function n(t){var n=[];return e(t,0,n),n}var r=hr,i=lr,s=cr;return n.sort=function(e){return arguments.length?(r=e,n):r},n.children=function(e){return arguments.length?(i=e,n):i},n.value=function(e){return arguments.length?(s=e,n):s},n.revalue=function(e){return t(e,0),e},n};var uo=!1;d3.layout.pack=function(){function e(e,i){var s=t.call(this,e,i),o=s[0];o.x=0,o.y=0,Pr(o,function(e){e.r=Math.sqrt(e.value)}),Pr(o,yr);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;Pr(o,function(e){e.r+=l}),Pr(o,yr),Pr(o,function(e){e.r-=l}),f=Math.max(2*o.r/u,2*o.r/a)}return Er(o,u/2,a/2,1/f),s}var t=d3.layout.hierarchy().sort(dr),n=0,r=[1,1];return e.size=function(t){return arguments.length?(r=t,e):r},e.padding=function(t){return arguments.length?(n=+t,e):n},fr(e,t)},d3.layout.cluster=function(){function e(e,i){var s=t.call(this,e,i),o=s[0],u,a=0,f,l;Pr(o,function(e){var t=e.children;t&&t.length?(e.x=Tr(t),e.y=xr(t)):(e.x=u?a+=n(e,u):0,e.y=0,u=e)});var c=Nr(o),h=Cr(o),p=c.x-n(c,h)/2,d=h.x+n(h,c)/2;return Pr(o,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=(1-(o.y?e.y/o.y:1))*r[1]}),s}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.tree=function(){function e(e,i){function s(e,t){var r=e.children,i=e._tree;if(r&&(o=r.length)){var o,a=r[0],f,l=a,c,h=-1;while(++h<o)c=r[h],s(c,f),l=u(c,f,l),f=c;Hr(e);var p=.5*(a._tree.prelim+c._tree.prelim);t?(i.prelim=t._tree.prelim+n(e,t),i.mod=i.prelim-p):i.prelim=p}else t&&(i.prelim=t._tree.prelim+n(e,t))}function o(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i)o(n[r],t)}}function u(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ar(o),i=Lr(i),o&&i)u=Lr(u),s=Ar(s),s._tree.ancestor=e,h=o._tree.prelim+l-i._tree.prelim-a+n(o,i),h>0&&(Br(jr(o,e,r),e,h),a+=h,f+=h),l+=o._tree.mod,a+=i._tree.mod,c+=u._tree.mod,f+=s._tree.mod;o&&!Ar(s)&&(s._tree.thread=o,s._tree.mod+=l-f),i&&!Lr(u)&&(u._tree.thread=i,u._tree.mod+=a-c,r=e)}return r}var a=t.call(this,e,i),f=a[0];Pr(f,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}}),s(f),o(f,-f._tree.prelim);var l=Or(f,_r),c=Or(f,Mr),h=Or(f,Dr),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;return Pr(f,function(e){e.x=(e.x-p)/(d-p)*r[0],e.y=e.depth/v*r[1],delete e._tree}),a}var t=d3.layout.hierarchy().sort(null).value(null),n=kr,r=[1,1];return e.separation=function(t){return arguments.length?(n=t,e):n},e.size=function(t){return arguments.length?(r=t,e):r},fr(e,t)},d3.layout.treemap=function(){function e(e,t){var n=-1,r=e.length,i,s;while(++n<r)s=(i=e[n]).value*(t<0?0:t),i.area=isNaN(s)||s<=0?0:s}function t(n){var s=n.children;if(s&&s.length){var o=l(n),u=[],a=s.slice(),f,c=Infinity,h,p=Math.min(o.dx,o.dy),d;e(a,o.dx*o.dy/n.value),u.area=0;while((d=a.length)>0)u.push(f=a[d-1]),u.area+=f.area,(h=r(u,p))<=c?(a.pop(),c=h):(u.area-=u.pop().area,i(u,p,o,!1),p=Math.min(o.dx,o.dy),u.length=u.area=0,c=Infinity);u.length&&(i(u,p,o,!0),u.length=u.area=0),s.forEach(t)}}function n(t){var r=t.children;if(r&&r.length){var s=l(t),o=r.slice(),u,a=[];e(o,s.dx*s.dy/t.value),a.area=0;while(u=o.pop())a.push(u),a.area+=u.area,u.z!=null&&(i(a,u.z?s.dx:s.dy,s,!o.length),a.length=a.area=0);r.forEach(n)}}function r(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;r<s&&(s=r),r>i&&(i=r)}return n*=n,t*=t,n?Math.max(t*i*p/n,n/(t*s*p)):Infinity}function i(e,t,n,r){var i=-1,s=e.length,o=n.x,a=n.y,f=t?u(e.area/t):0,l;if(t==n.dx){if(r||f>n.dy)f=n.dy;while(++i<s)l=e[i],l.x=o,l.y=a,l.dy=f,o+=l.dx=Math.min(n.x+n.dx-o,f?u(l.area/f):0);l.z=!0,l.dx+=n.x+n.dx-o,n.y+=f,n.dy-=f}else{if(r||f>n.dx)f=n.dx;while(++i<s)l=e[i],l.x=o,l.y=a,l.dx=f,a+=l.dy=Math.min(n.y+n.dy-a,f?u(l.area/f):0);l.z=!1,l.dy+=n.y+n.dy-a,n.x+=f,n.dx-=f}}function s(r){var i=h||o(r),s=i[0];return s.x=0,s.y=0,s.dx=a[0],s.dy=a[1],h&&o.revalue(s),e([s],s.dx*s.dy/s.value),(h?n:t)(s),c&&(h=i),i}var o=d3.layout.hierarchy(),u=Math.round,a=[1,1],f=null,l=Fr,c=!1,h,p=.5*(1+Math.sqrt(5));return s.size=function(e){return arguments.length?(a=e,s):a},s.padding=function(e){function t(t){var n=e.call(s,t,t.depth);return n==null?Fr(t):Ir(t,typeof n=="number"?[n,n,n,n]:n)}function n(t){return Ir(t,e)}if(!arguments.length)return f;var r;return l=(f=e)==null?Fr:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n,s},s.round=function(e){return arguments.length?(u=e?Math.round:Number,s):u!=Number},s.sticky=function(e){return arguments.length?(c=e,h=null,s):c},s.ratio=function(e){return arguments.length?(p=e,s):p},fr(s,o)},d3.csv=qr(",","text/csv"),d3.tsv=qr(" ","text/tab-separated-values"),d3.geo={};var ao=Math.PI/180;d3.geo.azimuthal=function(){function e(e){var n=e[0]*ao-s,o=e[1]*ao,f=Math.cos(n),l=Math.sin(n),c=Math.cos(o),h=Math.sin(o),p=t!=="orthographic"?a*h+u*c*f:null,d,v=t==="stereographic"?1/(1+p):t==="gnomonic"?1/p:t==="equidistant"?(d=Math.acos(p),d?d/Math.sin(d):0):t==="equalarea"?Math.sqrt(2/(1+p)):1,m=v*c*l,g=v*(a*c*f-u*h);return[r*m+i[0],r*g+i[1]]}var t="orthographic",n,r=200,i=[480,250],s,o,u,a;return e.invert=function(e){var n=(e[0]-i[0])/r,o=(e[1]-i[1])/r,f=Math.sqrt(n*n+o*o),l=t==="stereographic"?2*Math.atan(f):t==="gnomonic"?Math.atan(f):t==="equidistant"?f:t==="equalarea"?2*Math.asin(.5*f):Math.asin(f),c=Math.sin(l),h=Math.cos(l);return[(s+Math.atan2(n*c,f*u*h+o*a*c))/ao,Math.asin(h*a-(f?o*c*u/f:0))/ao]},e.mode=function(n){return arguments.length?(t=n+"",e):t},e.origin=function(t){return arguments.length?(n=t,s=n[0]*ao,o=n[1]*ao,u=Math.cos(o),a=Math.sin(o),e):n},e.scale=function(t){return arguments.length?(r=+t,e):r},e.translate=function(t){return arguments.length?(i=[+t[0],+t[1]],e):i},e.origin([0,0])},d3.geo.albers=function(){function e(e){var t=u*(ao*e[0]-o),n=Math.sqrt(a-2*u*Math.sin(ao*e[1]))/u;return[i*n*Math.sin(t)+s[0],i*(n*Math.cos(t)-f)+s[1]]}function t(){var t=ao*r[0],i=ao*r[1],s=ao*n[1],l=Math.sin(t),c=Math.cos(t);return o=ao*n[0],u=.5*(l+Math.sin(i)),a=c*c+2*u*l,f=Math.sqrt(a-2*u*Math.sin(s))/u,e}var n=[-98,38],r=[29.5,45.5],i=1e3,s=[480,250],o,u,a,f;return e.invert=function(e){var t=(e[0]-s[0])/i,n=(e[1]-s[1])/i,r=f+n,l=Math.atan2(t,r),c=Math.sqrt(t*t+r*r);return[(o+l/u)/ao,Math.asin((a-c*c*u*u)/(2*u))/ao]},e.origin=function(e){return arguments.length?(n=[+e[0],+e[1]],t()):n},e.parallels=function(e){return arguments.length?(r=[+e[0],+e[1]],t()):r},e.scale=function(t){return arguments.length?(i=+t,e):i},e.translate=function(t){return arguments.length?(s=[+t[0],+t[1]],e):s},t()},d3.geo.albersUsa=function(){function e(e){var s=e[0],o=e[1];return(o>50?n:s<-140?r:o<21?i:t)(e)}var t=d3.geo.albers(),n=d3.geo.albers().origin([-160,60]).parallels([55,65]),r=d3.geo.albers().origin([-160,20]).parallels([8,18]),i=d3.geo.albers().origin([-60,10]).parallels([8,18]);return e.scale=function(s){return arguments.length?(t.scale(s),n.scale(s*.6),r.scale(s),i.scale(s*1.5),e.translate(t.translate())):t.scale()},e.translate=function(s){if(!arguments.length)return t.translate();var o=t.scale()/1e3,u=s[0],a=s[1];return t.translate(s),n.translate([u-400*o,a+170*o]),r.translate([u-190*o,a+200*o]),i.translate([u+580*o,a+430*o]),e},e.scale(t.scale())},d3.geo.bonne=function(){function e(e){var u=e[0]*ao-r,a=e[1]*ao-i;if(s){var f=o+s-a,l=u*Math.cos(a)/f;u=f*Math.sin(l),a=f*Math.cos(l)-o}else u*=Math.cos(a),a*=-1;return[t*u+n[0],t*a+n[1]]}var t=200,n=[480,250],r,i,s,o;return e.invert=function(e){var i=(e[0]-n[0])/t,u=(e[1]-n[1])/t;if(s){var a=o+u,f=Math.sqrt(i*i+a*a);u=o+s-f,i=r+f*Math.atan2(i,a)/Math.cos(u)}else u*=-1,i/=Math.cos(u);return[i/ao,u/ao]},e.parallel=function(t){return arguments.length?(o=1/Math.tan
-(s=t*ao),e):s/ao},e.origin=function(t){return arguments.length?(r=t[0]*ao,i=t[1]*ao,e):[r/ao,i/ao]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e.origin([0,0]).parallel(45)},d3.geo.equirectangular=function(){function e(e){var r=e[0]/360,i=-e[1]/360;return[t*r+n[0],t*i+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,-360*i]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.mercator=function(){function e(e){var r=e[0]/360,i=-(Math.log(Math.tan(Math.PI/4+e[1]*ao/2))/ao)/360;return[t*r+n[0],t*Math.max(-0.5,Math.min(.5,i))+n[1]]}var t=500,n=[480,250];return e.invert=function(e){var r=(e[0]-n[0])/t,i=(e[1]-n[1])/t;return[360*r,2*Math.atan(Math.exp(-360*i*ao))/ao-90]},e.scale=function(n){return arguments.length?(t=+n,e):t},e.translate=function(t){return arguments.length?(n=[+t[0],+t[1]],e):n},e},d3.geo.path=function(){function e(e,t){typeof s=="function"&&(o=Ur(s.apply(this,arguments))),f(e);var n=a.length?a.join(""):null;return a=[],n}function t(e){return u(e).join(",")}function n(e){var t=i(e[0]),n=0,r=e.length;while(++n<r)t-=i(e[n]);return t}function r(e){var t=d3.geom.polygon(e[0].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i=r[0],s=r[1],o=n,a=0,f=e.length;while(++a<f)t=d3.geom.polygon(e[a].map(u)),n=t.area(),r=t.centroid(n<0?(n*=-1,1):-1),i-=r[0],s-=r[1],o-=n;return[i,s,6*o]}function i(e){return Math.abs(d3.geom.polygon(e.map(u)).area())}var s=4.5,o=Ur(s),u=d3.geo.albersUsa(),a=[],f=Rr({FeatureCollection:function(e){var t=e.features,n=-1,r=t.length;while(++n<r)a.push(f(t[n].geometry))},Feature:function(e){f(e.geometry)},Point:function(e){a.push("M",t(e.coordinates),o)},MultiPoint:function(e){var n=e.coordinates,r=-1,i=n.length;while(++r<i)a.push("M",t(n[r]),o)},LineString:function(e){var n=e.coordinates,r=-1,i=n.length;a.push("M");while(++r<i)a.push(t(n[r]),"L");a.pop()},MultiLineString:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1,u=s.length,a.push("M");while(++o<u)a.push(t(s[o]),"L");a.pop()}},Polygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u;while(++r<i){s=n[r],o=-1;if((u=s.length-1)>0){a.push("M");while(++o<u)a.push(t(s[o]),"L");a[a.length-1]="Z"}}},MultiPolygon:function(e){var n=e.coordinates,r=-1,i=n.length,s,o,u,f,l,c;while(++r<i){s=n[r],o=-1,u=s.length;while(++o<u){f=s[o],l=-1;if((c=f.length-1)>0){a.push("M");while(++l<c)a.push(t(f[l]),"L");a[a.length-1]="Z"}}}},GeometryCollection:function(e){var t=e.geometries,n=-1,r=t.length;while(++n<r)a.push(f(t[n]))}}),l=e.area=Rr({FeatureCollection:function(e){var t=0,n=e.features,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t},Feature:function(e){return l(e.geometry)},Polygon:function(e){return n(e.coordinates)},MultiPolygon:function(e){var t=0,r=e.coordinates,i=-1,s=r.length;while(++i<s)t+=n(r[i]);return t},GeometryCollection:function(e){var t=0,n=e.geometries,r=-1,i=n.length;while(++r<i)t+=l(n[r]);return t}},0),c=e.centroid=Rr({Feature:function(e){return c(e.geometry)},Polygon:function(e){var t=r(e.coordinates);return[t[0]/t[2],t[1]/t[2]]},MultiPolygon:function(e){var t=0,n=e.coordinates,i,s=0,o=0,u=0,a=-1,f=n.length;while(++a<f)i=r(n[a]),s+=i[0],o+=i[1],u+=i[2];return[s/u,o/u]}});return e.projection=function(t){return u=t,e},e.pointRadius=function(t){return typeof t=="function"?s=t:(s=+t,o=Ur(s)),e},e},d3.geo.bounds=function(e){var t=Infinity,n=Infinity,r=-Infinity,i=-Infinity;return zr(e,function(e,s){e<t&&(t=e),e>r&&(r=e),s<n&&(n=s),s>i&&(i=s)}),[[t,n],[r,i]]};var fo={Feature:Wr,FeatureCollection:Xr,GeometryCollection:Vr,LineString:$r,MultiLineString:Jr,MultiPoint:$r,MultiPolygon:Kr,Point:Qr,Polygon:Gr};d3.geo.circle=function(){function e(){}function t(e){return a.distance(e)<u}function n(e){var t=-1,n=e.length,i=[],s,o,f,l,c;while(++t<n)c=a.distance(f=e[t]),c<u?(o&&i.push(ti(o,f)((l-u)/(l-c))),i.push(f),s=o=null):(o=f,!s&&i.length&&(i.push(ti(i[i.length-1],o)((u-l)/(c-l))),s=o)),l=c;return s=e[0],o=i[0],o&&f[0]===s[0]&&f[1]===s[1]&&(f[0]!==o[0]||f[1]!==o[1])&&i.push(o),r(i)}function r(e){var t=0,n=e.length,r,i,s=n?[e[0]]:e,o,u=a.source();while(++t<n){o=a.source(e[t-1])(e[t]).coordinates;for(r=0,i=o.length;++r<i;)s.push(o[r])}return a.source(u),s}var s=[0,0],o=89.99,u=o*ao,a=d3.geo.greatArc().source(s).target(i);e.clip=function(e){return typeof s=="function"&&a.source(s.apply(this,arguments)),f(e)||null};var f=Rr({FeatureCollection:function(e){var t=e.features.map(f).filter(i);return t&&(e=Object.create(e),e.features=t,e)},Feature:function(e){var t=f(e.geometry);return t&&(e=Object.create(e),e.geometry=t,e)},Point:function(e){return t(e.coordinates)&&e},MultiPoint:function(e){var n=e.coordinates.filter(t);return n.length&&{type:e.type,coordinates:n}},LineString:function(e){var t=n(e.coordinates);return t.length&&(e=Object.create(e),e.coordinates=t,e)},MultiLineString:function(e){var t=e.coordinates.map(n).filter(function(e){return e.length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},Polygon:function(e){var t=e.coordinates.map(n);return t[0].length&&(e=Object.create(e),e.coordinates=t,e)},MultiPolygon:function(e){var t=e.coordinates.map(function(e){return e.map(n)}).filter(function(e){return e[0].length});return t.length&&(e=Object.create(e),e.coordinates=t,e)},GeometryCollection:function(e){var t=e.geometries.map(f).filter(i);return t.length&&(e=Object.create(e),e.geometries=t,e)}});return e.origin=function(t){return arguments.length?(s=t,typeof s!="function"&&a.source(s),e):s},e.angle=function(t){return arguments.length?(u=(o=+t)*ao,e):o},d3.rebind(e,a,"precision")},d3.geo.greatArc=function(){function e(){var t=e.distance.apply(this,arguments),r=0,u=s/t,a=[n];while((r+=u)<1)a.push(o(r));return a.push(i),{type:"LineString",coordinates:a}}var t=Yr,n,r=Zr,i,s=6*ao,o=ei();return e.distance=function(){return typeof t=="function"&&o.source(n=t.apply(this,arguments)),typeof r=="function"&&o.target(i=r.apply(this,arguments)),o.distance()},e.source=function(r){return arguments.length?(t=r,typeof t!="function"&&o.source(n=t),e):t},e.target=function(t){return arguments.length?(r=t,typeof r!="function"&&o.target(i=r),e):r},e.precision=function(t){return arguments.length?(s=t*ao,e):s/ao},e},d3.geo.greatCircle=d3.geo.circle,d3.geom={},d3.geom.contour=function(e,t){var n=t||ni(e),r=[],i=n[0],s=n[1],o=0,u=0,a=NaN,f=NaN,l=0;do l=0,e(i-1,s-1)&&(l+=1),e(i,s-1)&&(l+=2),e(i-1,s)&&(l+=4),e(i,s)&&(l+=8),l===6?(o=f===-1?-1:1,u=0):l===9?(o=0,u=a===1?-1:1):(o=lo[l],u=co[l]),o!=a&&u!=f&&(r.push([i,s]),a=o,f=u),i+=o,s+=u;while(n[0]!=i||n[1]!=s);return r};var lo=[1,0,1,1,-1,0,-1,1,0,0,0,0,-1,0,-1,NaN],co=[0,-1,0,0,0,-1,0,0,1,-1,1,1,0,-1,0,NaN];d3.geom.hull=function(e){if(e.length<3)return[];var t=e.length,n=t-1,r=[],i=[],s,o,u=0,a,f,l,c,h,p,d,v;for(s=1;s<t;++s)e[s][1]<e[u][1]?u=s:e[s][1]==e[u][1]&&(u=e[s][0]<e[u][0]?s:u);for(s=0;s<t;++s){if(s===u)continue;f=e[s][1]-e[u][1],a=e[s][0]-e[u][0],r.push({angle:Math.atan2(f,a),index:s})}r.sort(function(e,t){return e.angle-t.angle}),d=r[0].angle,p=r[0].index,h=0;for(s=1;s<n;++s)o=r[s].index,d==r[s].angle?(a=e[p][0]-e[u][0],f=e[p][1]-e[u][1],l=e[o][0]-e[u][0],c=e[o][1]-e[u][1],a*a+f*f>=l*l+c*c?r[s].index=-1:(r[h].index=-1,d=r[s].angle,h=s,p=o)):(d=r[s].angle,h=s,p=o);i.push(u);for(s=0,o=0;s<2;++o)r[o].index!==-1&&(i.push(r[o].index),s++);v=i.length;for(;o<n;++o){if(r[o].index===-1)continue;while(!ri(i[v-2],i[v-1],r[o].index,e))--v;i[v++]=r[o].index}var m=[];for(s=0;s<v;++s)m.push(e[i[s]]);return m},d3.geom.polygon=function(e){return e.area=function(){var t=0,n=e.length,r=e[n-1][0]*e[0][1],i=e[n-1][1]*e[0][0];while(++t<n)r+=e[t-1][0]*e[t][1],i+=e[t-1][1]*e[t][0];return(i-r)*.5},e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;arguments.length||(t=-1/(6*e.area()));while(++n<r)o=u,u=e[n],a=o[0]*u[1]-u[0]*o[1],i+=(o[0]+u[0])*a,s+=(o[1]+u[1])*a;return[i*t,s*t]},e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice(),t.length=0,a=e[r],f=n[(o=n.length)-1],s=-1;while(++s<o)l=n[s],ii(l,u,a)?(ii(f,u,a)||t.push(si(f,l,u,a)),t.push(l)):ii(f,u,a)&&t.push(si(f,l,u,a)),f=l;u=a}return t},e},d3.geom.voronoi=function(e){var t=e.map(function(){return[]});return oi(e,function(e){var n,r,i,s,o,u;e.a===1&&e.b>=0?(n=e.ep.r,r=e.ep.l):(n=e.ep.l,r=e.ep.r),e.a===1?(o=n?n.y:-1e6,i=e.c-e.b*o,u=r?r.y:1e6,s=e.c-e.b*u):(i=n?n.x:-1e6,o=e.c-e.a*i,s=r?r.x:1e6,u=e.c-e.a*s);var a=[i,o],f=[s,u];t[e.region.l.index].push(a,f),t[e.region.r.index].push(a,f)}),t.map(function(t,n){var r=e[n][0],i=e[n][1];return t.forEach(function(e){e.angle=Math.atan2(e[0]-r,e[1]-i)}),t.sort(function(e,t){return e.angle-t.angle}).filter(function(e,n){return!n||e.angle-t[n-1].angle>1e-10})})};var ho={l:"r",r:"l"};d3.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];return oi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])}),t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)}),t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++)n.push([i,t[u],t[u+1]])}),n},d3.geom.quadtree=function(e,t,n,r,i){function s(e,t,n,r,i,s){if(isNaN(t.x)||isNaN(t.y))return;if(e.leaf){var u=e.point;u?Math.abs(u.x-t.x)+Math.abs(u.y-t.y)<.01?o(e,t,n,r,i,s):(e.point=null,o(e,u,n,r,i,s),o(e,t,n,r,i,s)):e.point=t}else o(e,t,n,r,i,s)}function o(e,t,n,r,i,o){var u=(n+i)*.5,a=(r+o)*.5,f=t.x>=u,l=t.y>=a,c=(l<<1)+f;e.leaf=!1,e=e.nodes[c]||(e.nodes[c]=ui()),f?n=u:i=u,l?r=a:o=a,s(e,t,n,r,i,o)}var u,a=-1,f=e.length;f&&isNaN(e[0].x)&&(e=e.map(fi));if(arguments.length<5)if(arguments.length===3)i=r=n,n=t;else{t=n=Infinity,r=i=-Infinity;while(++a<f)u=e[a],u.x<t&&(t=u.x),u.y<n&&(n=u.y),u.x>r&&(r=u.x),u.y>i&&(i=u.y);var l=r-t,c=i-n;l>c?i=n+l:r=t+c}var h=ui();return h.add=function(e){s(h,e,t,n,r,i)},h.visit=function(e){ai(e,h,t,n,r,i)},e.forEach(h.add),h},d3.time={};var po=Date,vo=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];li.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){mo.setUTCDate.apply(this._,arguments)},setDay:function(){mo.setUTCDay.apply(this._,arguments)},setFullYear:function(){mo.setUTCFullYear.apply(this._,arguments)},setHours:function(){mo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){mo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){mo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){mo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){mo.setUTCSeconds.apply(this._,arguments)},setTime:function(){mo.setTime.apply(this._,arguments)}};var mo=Date.prototype,go="%a %b %e %H:%M:%S %Y",yo="%m/%d/%y",bo="%H:%M:%S",wo=vo,Eo=wo.map(ci),So=["January","February","March","April","May","June","July","August","September","October","November","December"],xo=So.map(ci);d3.time.format=function(e){function t(t){var r=[],i=-1,s=0,o,u;while(++i<n)e.charCodeAt(i)==37&&(r.push(e.substring(s,i),(u=Po[o=e.charAt(++i)])?u(t):o),s=i+1);return r.push(e.substring(s,i)),r.join("")}var n=e.length;return t.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=hi(n,e,t,0);if(r!=t.length)return null;"p"in n&&(n.H=n.H%12+n.p*12);var i=new po;return i.setFullYear(n.y,n.m,n.d),i.setHours(n.H,n.M,n.S,n.L),i},t.toString=function(){return e},t};var To=d3.format("02d"),No=d3.format("03d"),Co=d3.format("04d"),ko=d3.format("2d"),Lo=pi(wo),Ao=pi(Eo),Oo=pi(So),Mo=di(So),_o=pi(xo),Do=di(xo),Po={a:function(e){return Eo[e.getDay()]},A:function(e){return wo[e.getDay()]},b:function(e){return xo[e.getMonth()]},B:function(e){return So[e.getMonth()]},c:d3.time.format(go),d:function(e){return To(e.getDate())},e:function(e){return ko(e.getDate())},H:function(e){return To(e.getHours())},I:function(e){return To(e.getHours()%12||12)},j:function(e){return No(1+d3.time.dayOfYear(e))},L:function(e){return No(e.getMilliseconds())},m:function(e){return To(e.getMonth()+1)},M:function(e){return To(e.getMinutes())},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e){return To(e.getSeconds())},U:function(e){return To(d3.time.sundayOfYear(e))},w:function(e){return e.getDay()},W:function(e){return To(d3.time.mondayOfYear(e))},x:d3.time.format(yo),X:d3.time.format(bo),y:function(e){return To(e.getFullYear()%100)},Y:function(e){return Co(e.getFullYear()%1e4)},Z:_i,"%":function(e){return"%"}},Ho={a:vi,A:mi,b:gi,B:yi,c:bi,d:Ci,e:Ci,H:ki,I:ki,L:Oi,m:Ni,M:Li,p:Mi,S:Ai,x:wi,X:Ei,y:xi,Y:Si},Bo=/^\s*\d+/,jo=d3.map({am:0,pm:1});d3.time.format.utc=function(e){function t(e){try{po=li;var t=new po;return t._=e,n(t)}finally{po=Date}}var n=d3.time.format(e);return t.parse=function(e){try{po=li;var t=n.parse(e);return t&&t._}finally{po=Date}},t.toString=n.toString,t};var Fo=d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");d3.time.format.iso=Date.prototype.toISOString?Di:Fo,Di.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},Di.toString=Fo.toString,d3.time.second=Pi(function(e){return new po(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()}),d3.time.seconds=d3.time.second.range,d3.time.seconds.utc=d3.time.second.utc.range,d3.time.minute=Pi(function(e){return new po(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()}),d3.time.minutes=d3.time.minute.range,d3.time.minutes.utc=d3.time.minute.utc.range,d3.time.hour=Pi(function(e){var t=e.getTimezoneOffset()/60;return new po((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()}),d3.time.hours=d3.time.hour.range,d3.time.hours.utc=d3.time.hour.utc.range,d3.time.day=Pi(function(e){var t=new po(1970,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1}),d3.time.days=d3.time.day.range,d3.time.days.utc=d3.time.day.utc.range,d3.time.dayOfYear=function(e){var t=d3.time.year(e);return Math.floor((e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5)},vo.forEach(function(e,t){e=e.toLowerCase(),t=7-t;var n=d3.time[e]=Pi(function(e){return(e=d3.time.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)-(n!==t)});d3.time[e+"s"]=n.range,d3.time[e+"s"].utc=n.utc.range,d3.time[e+"OfYear"]=function(e){var n=d3.time.year(e).getDay();return Math.floor((d3.time.dayOfYear(e)+(n+t)%7)/7)}}),d3.time.week=d3.time.sunday,d3.time.weeks=d3.time.sunday.range,d3.time.weeks.utc=d3.time.sunday.utc.range,d3.time.weekOfYear=d3.time.sundayOfYear,d3.time.month=Pi(function(e){return e=d3.time.day(e),e.setDate(1),e},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()}),d3.time.months=d3.time.month.range,d3.time.months.utc=d3.time.month.utc.range,d3.time.year=Pi(function(e){return e=d3.time.day(e),e.setMonth(0,1),e},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()}),d3.time.years=d3.time.year.range,d3.time.years.utc=d3.time.year.utc.range;var Io=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],qo=[[d3.time.second,1],[d3.time.second,5],[d3.time.second,15],[d3.time.second,30],[d3.time.minute,1],[d3.time.minute,5],[d3.time.minute,15],[d3.time.minute,30],[d3.time.hour,1],[d3.time.hour,3],[d3.time.hour,6],[d3.time.hour,12],[d3.time.day,1],[d3.time.day,2],[d3.time.week,1],[d3.time.month,1],[d3.time.month,3],[d3.time.year,1]],Ro=[[d3.time.format("%Y"),function(e){return!0}],[d3.time.format("%B"),function(e){return e.getMonth()}],[d3.time.format("%b %d"),function(e){return e.getDate()!=1}],[d3.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[d3.time.format("%I %p"),function(e){return e.getHours()}],[d3.time.format("%I:%M"),function(e){return e.getMinutes()}],[d3.time.format(":%S"),function(e){return e.getSeconds()}],[d3.time.format(".%L"),function(e){return e.getMilliseconds()}]],Uo=d3.scale.linear(),zo=Ii(Ro);qo.year=function(e,t){return Uo.domain(e.map(Ri)).ticks(t).map(qi)},d3.time.scale=function(){return Bi(d3.scale.linear(),qo,zo)};var Wo=qo.map(function(e){return[e[0].utc,e[1]]}),Xo=[[d3.time.format.utc("%Y"),function(e){return!0}],[d3.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[d3.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[d3.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[d3.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[d3.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[d3.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[d3.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]],Vo=Ii(Xo);Wo.year=function(e,t){return Uo.domain(e.map(zi)).ticks(t).map(Ui)},d3.time.scale.utc=function(){return Bi(d3.scale.linear(),Wo,Vo)}})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.js
deleted file mode 100644
index bf4a8c10..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.js
+++ /dev/null
@@ -1,8444 +0,0 @@
-d3 = function() {
- var d3 = {
- version: "3.1.5"
- };
- if (!Date.now) Date.now = function() {
- return +new Date();
- };
- var d3_document = document, d3_window = window;
- try {
- d3_document.createElement("div").style.setProperty("opacity", 0, "");
- } catch (error) {
- var d3_style_prototype = d3_window.CSSStyleDeclaration.prototype, d3_style_setProperty = d3_style_prototype.setProperty;
- d3_style_prototype.setProperty = function(name, value, priority) {
- d3_style_setProperty.call(this, name, value + "", priority);
- };
- }
- d3.ascending = function(a, b) {
- return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
- };
- d3.descending = function(a, b) {
- return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
- };
- d3.min = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && a > b) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && a > b) a = b;
- }
- return a;
- };
- d3.max = function(array, f) {
- var i = -1, n = array.length, a, b;
- if (arguments.length === 1) {
- while (++i < n && ((a = array[i]) == null || a != a)) a = undefined;
- while (++i < n) if ((b = array[i]) != null && b > a) a = b;
- } else {
- while (++i < n && ((a = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null && b > a) a = b;
- }
- return a;
- };
- d3.extent = function(array, f) {
- var i = -1, n = array.length, a, b, c;
- if (arguments.length === 1) {
- while (++i < n && ((a = c = array[i]) == null || a != a)) a = c = undefined;
- while (++i < n) if ((b = array[i]) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- } else {
- while (++i < n && ((a = c = f.call(array, array[i], i)) == null || a != a)) a = undefined;
- while (++i < n) if ((b = f.call(array, array[i], i)) != null) {
- if (a > b) a = b;
- if (c < b) c = b;
- }
- }
- return [ a, c ];
- };
- d3.sum = function(array, f) {
- var s = 0, n = array.length, a, i = -1;
- if (arguments.length === 1) {
- while (++i < n) if (!isNaN(a = +array[i])) s += a;
- } else {
- while (++i < n) if (!isNaN(a = +f.call(array, array[i], i))) s += a;
- }
- return s;
- };
- function d3_number(x) {
- return x != null && !isNaN(x);
- }
- d3.mean = function(array, f) {
- var n = array.length, a, m = 0, i = -1, j = 0;
- if (arguments.length === 1) {
- while (++i < n) if (d3_number(a = array[i])) m += (a - m) / ++j;
- } else {
- while (++i < n) if (d3_number(a = f.call(array, array[i], i))) m += (a - m) / ++j;
- }
- return j ? m : undefined;
- };
- d3.quantile = function(values, p) {
- var H = (values.length - 1) * p + 1, h = Math.floor(H), v = +values[h - 1], e = H - h;
- return e ? v + e * (values[h] - v) : v;
- };
- d3.median = function(array, f) {
- if (arguments.length > 1) array = array.map(f);
- array = array.filter(d3_number);
- return array.length ? d3.quantile(array.sort(d3.ascending), .5) : undefined;
- };
- d3.bisector = function(f) {
- return {
- left: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (f.call(a, a[mid], mid) < x) lo = mid + 1; else hi = mid;
- }
- return lo;
- },
- right: function(a, x, lo, hi) {
- if (arguments.length < 3) lo = 0;
- if (arguments.length < 4) hi = a.length;
- while (lo < hi) {
- var mid = lo + hi >>> 1;
- if (x < f.call(a, a[mid], mid)) hi = mid; else lo = mid + 1;
- }
- return lo;
- }
- };
- };
- var d3_bisector = d3.bisector(function(d) {
- return d;
- });
- d3.bisectLeft = d3_bisector.left;
- d3.bisect = d3.bisectRight = d3_bisector.right;
- d3.shuffle = function(array) {
- var m = array.length, t, i;
- while (m) {
- i = Math.random() * m-- | 0;
- t = array[m], array[m] = array[i], array[i] = t;
- }
- return array;
- };
- d3.permute = function(array, indexes) {
- var permutes = [], i = -1, n = indexes.length;
- while (++i < n) permutes[i] = array[indexes[i]];
- return permutes;
- };
- d3.zip = function() {
- if (!(n = arguments.length)) return [];
- for (var i = -1, m = d3.min(arguments, d3_zipLength), zips = new Array(m); ++i < m; ) {
- for (var j = -1, n, zip = zips[i] = new Array(n); ++j < n; ) {
- zip[j] = arguments[j][i];
- }
- }
- return zips;
- };
- function d3_zipLength(d) {
- return d.length;
- }
- d3.transpose = function(matrix) {
- return d3.zip.apply(d3, matrix);
- };
- d3.keys = function(map) {
- var keys = [];
- for (var key in map) keys.push(key);
- return keys;
- };
- d3.values = function(map) {
- var values = [];
- for (var key in map) values.push(map[key]);
- return values;
- };
- d3.entries = function(map) {
- var entries = [];
- for (var key in map) entries.push({
- key: key,
- value: map[key]
- });
- return entries;
- };
- d3.merge = function(arrays) {
- return Array.prototype.concat.apply([], arrays);
- };
- d3.range = function(start, stop, step) {
- if (arguments.length < 3) {
- step = 1;
- if (arguments.length < 2) {
- stop = start;
- start = 0;
- }
- }
- if ((stop - start) / step === Infinity) throw new Error("infinite range");
- var range = [], k = d3_range_integerScale(Math.abs(step)), i = -1, j;
- start *= k, stop *= k, step *= k;
- if (step < 0) while ((j = start + step * ++i) > stop) range.push(j / k); else while ((j = start + step * ++i) < stop) range.push(j / k);
- return range;
- };
- function d3_range_integerScale(x) {
- var k = 1;
- while (x * k % 1) k *= 10;
- return k;
- }
- function d3_class(ctor, properties) {
- try {
- for (var key in properties) {
- Object.defineProperty(ctor.prototype, key, {
- value: properties[key],
- enumerable: false
- });
- }
- } catch (e) {
- ctor.prototype = properties;
- }
- }
- d3.map = function(object) {
- var map = new d3_Map();
- for (var key in object) map.set(key, object[key]);
- return map;
- };
- function d3_Map() {}
- d3_class(d3_Map, {
- has: function(key) {
- return d3_map_prefix + key in this;
- },
- get: function(key) {
- return this[d3_map_prefix + key];
- },
- set: function(key, value) {
- return this[d3_map_prefix + key] = value;
- },
- remove: function(key) {
- key = d3_map_prefix + key;
- return key in this && delete this[key];
- },
- keys: function() {
- var keys = [];
- this.forEach(function(key) {
- keys.push(key);
- });
- return keys;
- },
- values: function() {
- var values = [];
- this.forEach(function(key, value) {
- values.push(value);
- });
- return values;
- },
- entries: function() {
- var entries = [];
- this.forEach(function(key, value) {
- entries.push({
- key: key,
- value: value
- });
- });
- return entries;
- },
- forEach: function(f) {
- for (var key in this) {
- if (key.charCodeAt(0) === d3_map_prefixCode) {
- f.call(this, key.substring(1), this[key]);
- }
- }
- }
- });
- var d3_map_prefix = "\0", d3_map_prefixCode = d3_map_prefix.charCodeAt(0);
- d3.nest = function() {
- var nest = {}, keys = [], sortKeys = [], sortValues, rollup;
- function map(mapType, array, depth) {
- if (depth >= keys.length) return rollup ? rollup.call(nest, array) : sortValues ? array.sort(sortValues) : array;
- var i = -1, n = array.length, key = keys[depth++], keyValue, object, setter, valuesByKey = new d3_Map(), values;
- while (++i < n) {
- if (values = valuesByKey.get(keyValue = key(object = array[i]))) {
- values.push(object);
- } else {
- valuesByKey.set(keyValue, [ object ]);
- }
- }
- if (mapType) {
- object = mapType();
- setter = function(keyValue, values) {
- object.set(keyValue, map(mapType, values, depth));
- };
- } else {
- object = {};
- setter = function(keyValue, values) {
- object[keyValue] = map(mapType, values, depth);
- };
- }
- valuesByKey.forEach(setter);
- return object;
- }
- function entries(map, depth) {
- if (depth >= keys.length) return map;
- var array = [], sortKey = sortKeys[depth++];
- map.forEach(function(key, keyMap) {
- array.push({
- key: key,
- values: entries(keyMap, depth)
- });
- });
- return sortKey ? array.sort(function(a, b) {
- return sortKey(a.key, b.key);
- }) : array;
- }
- nest.map = function(array, mapType) {
- return map(mapType, array, 0);
- };
- nest.entries = function(array) {
- return entries(map(d3.map, array, 0), 0);
- };
- nest.key = function(d) {
- keys.push(d);
- return nest;
- };
- nest.sortKeys = function(order) {
- sortKeys[keys.length - 1] = order;
- return nest;
- };
- nest.sortValues = function(order) {
- sortValues = order;
- return nest;
- };
- nest.rollup = function(f) {
- rollup = f;
- return nest;
- };
- return nest;
- };
- d3.set = function(array) {
- var set = new d3_Set();
- if (array) for (var i = 0; i < array.length; i++) set.add(array[i]);
- return set;
- };
- function d3_Set() {}
- d3_class(d3_Set, {
- has: function(value) {
- return d3_map_prefix + value in this;
- },
- add: function(value) {
- this[d3_map_prefix + value] = true;
- return value;
- },
- remove: function(value) {
- value = d3_map_prefix + value;
- return value in this && delete this[value];
- },
- values: function() {
- var values = [];
- this.forEach(function(value) {
- values.push(value);
- });
- return values;
- },
- forEach: function(f) {
- for (var value in this) {
- if (value.charCodeAt(0) === d3_map_prefixCode) {
- f.call(this, value.substring(1));
- }
- }
- }
- });
- d3.behavior = {};
- d3.rebind = function(target, source) {
- var i = 1, n = arguments.length, method;
- while (++i < n) target[method = arguments[i]] = d3_rebind(target, source, source[method]);
- return target;
- };
- function d3_rebind(target, source, method) {
- return function() {
- var value = method.apply(source, arguments);
- return value === source ? target : value;
- };
- }
- d3.dispatch = function() {
- var dispatch = new d3_dispatch(), i = -1, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- return dispatch;
- };
- function d3_dispatch() {}
- d3_dispatch.prototype.on = function(type, listener) {
- var i = type.indexOf("."), name = "";
- if (i >= 0) {
- name = type.substring(i + 1);
- type = type.substring(0, i);
- }
- if (type) return arguments.length < 2 ? this[type].on(name) : this[type].on(name, listener);
- if (arguments.length === 2) {
- if (listener == null) for (type in this) {
- if (this.hasOwnProperty(type)) this[type].on(name, null);
- }
- return this;
- }
- };
- function d3_dispatch_event(dispatch) {
- var listeners = [], listenerByName = new d3_Map();
- function event() {
- var z = listeners, i = -1, n = z.length, l;
- while (++i < n) if (l = z[i].on) l.apply(this, arguments);
- return dispatch;
- }
- event.on = function(name, listener) {
- var l = listenerByName.get(name), i;
- if (arguments.length < 2) return l && l.on;
- if (l) {
- l.on = null;
- listeners = listeners.slice(0, i = listeners.indexOf(l)).concat(listeners.slice(i + 1));
- listenerByName.remove(name);
- }
- if (listener) listeners.push(listenerByName.set(name, {
- on: listener
- }));
- return dispatch;
- };
- return event;
- }
- d3.event = null;
- function d3_eventCancel() {
- d3.event.stopPropagation();
- d3.event.preventDefault();
- }
- function d3_eventSource() {
- var e = d3.event, s;
- while (s = e.sourceEvent) e = s;
- return e;
- }
- function d3_eventSuppress(target, type) {
- function off() {
- target.on(type, null);
- }
- target.on(type, function() {
- d3_eventCancel();
- off();
- }, true);
- setTimeout(off, 0);
- }
- function d3_eventDispatch(target) {
- var dispatch = new d3_dispatch(), i = 0, n = arguments.length;
- while (++i < n) dispatch[arguments[i]] = d3_dispatch_event(dispatch);
- dispatch.of = function(thiz, argumentz) {
- return function(e1) {
- try {
- var e0 = e1.sourceEvent = d3.event;
- e1.target = target;
- d3.event = e1;
- dispatch[e1.type].apply(thiz, argumentz);
- } finally {
- d3.event = e0;
- }
- };
- };
- return dispatch;
- }
- d3.mouse = function(container) {
- return d3_mousePoint(container, d3_eventSource());
- };
- var d3_mouse_bug44083 = /WebKit/.test(d3_window.navigator.userAgent) ? -1 : 0;
- function d3_mousePoint(container, e) {
- var svg = container.ownerSVGElement || container;
- if (svg.createSVGPoint) {
- var point = svg.createSVGPoint();
- if (d3_mouse_bug44083 < 0 && (d3_window.scrollX || d3_window.scrollY)) {
- svg = d3.select(d3_document.body).append("svg").style("position", "absolute").style("top", 0).style("left", 0);
- var ctm = svg[0][0].getScreenCTM();
- d3_mouse_bug44083 = !(ctm.f || ctm.e);
- svg.remove();
- }
- if (d3_mouse_bug44083) {
- point.x = e.pageX;
- point.y = e.pageY;
- } else {
- point.x = e.clientX;
- point.y = e.clientY;
- }
- point = point.matrixTransform(container.getScreenCTM().inverse());
- return [ point.x, point.y ];
- }
- var rect = container.getBoundingClientRect();
- return [ e.clientX - rect.left - container.clientLeft, e.clientY - rect.top - container.clientTop ];
- }
- var d3_array = d3_arraySlice;
- function d3_arrayCopy(pseudoarray) {
- var i = -1, n = pseudoarray.length, array = [];
- while (++i < n) array.push(pseudoarray[i]);
- return array;
- }
- function d3_arraySlice(pseudoarray) {
- return Array.prototype.slice.call(pseudoarray);
- }
- try {
- d3_array(d3_document.documentElement.childNodes)[0].nodeType;
- } catch (e) {
- d3_array = d3_arrayCopy;
- }
- var d3_arraySubclass = [].__proto__ ? function(array, prototype) {
- array.__proto__ = prototype;
- } : function(array, prototype) {
- for (var property in prototype) array[property] = prototype[property];
- };
- d3.touches = function(container, touches) {
- if (arguments.length < 2) touches = d3_eventSource().touches;
- return touches ? d3_array(touches).map(function(touch) {
- var point = d3_mousePoint(container, touch);
- point.identifier = touch.identifier;
- return point;
- }) : [];
- };
- d3.behavior.drag = function() {
- var event = d3_eventDispatch(drag, "drag", "dragstart", "dragend"), origin = null;
- function drag() {
- this.on("mousedown.drag", mousedown).on("touchstart.drag", mousedown);
- }
- function mousedown() {
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, touchId = d3.event.touches ? d3.event.changedTouches[0].identifier : null, offset, origin_ = point(), moved = 0;
- var w = d3.select(d3_window).on(touchId != null ? "touchmove.drag-" + touchId : "mousemove.drag", dragmove).on(touchId != null ? "touchend.drag-" + touchId : "mouseup.drag", dragend, true);
- if (origin) {
- offset = origin.apply(target, arguments);
- offset = [ offset.x - origin_[0], offset.y - origin_[1] ];
- } else {
- offset = [ 0, 0 ];
- }
- if (touchId == null) d3_eventCancel();
- event_({
- type: "dragstart"
- });
- function point() {
- var p = target.parentNode;
- return touchId != null ? d3.touches(p).filter(function(p) {
- return p.identifier === touchId;
- })[0] : d3.mouse(p);
- }
- function dragmove() {
- if (!target.parentNode) return dragend();
- var p = point(), dx = p[0] - origin_[0], dy = p[1] - origin_[1];
- moved |= dx | dy;
- origin_ = p;
- d3_eventCancel();
- event_({
- type: "drag",
- x: p[0] + offset[0],
- y: p[1] + offset[1],
- dx: dx,
- dy: dy
- });
- }
- function dragend() {
- event_({
- type: "dragend"
- });
- if (moved) {
- d3_eventCancel();
- if (d3.event.target === eventTarget) d3_eventSuppress(w, "click");
- }
- w.on(touchId != null ? "touchmove.drag-" + touchId : "mousemove.drag", null).on(touchId != null ? "touchend.drag-" + touchId : "mouseup.drag", null);
- }
- }
- drag.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return drag;
- };
- return d3.rebind(drag, event, "on");
- };
- function d3_selection(groups) {
- d3_arraySubclass(groups, d3_selectionPrototype);
- return groups;
- }
- var d3_select = function(s, n) {
- return n.querySelector(s);
- }, d3_selectAll = function(s, n) {
- return n.querySelectorAll(s);
- }, d3_selectRoot = d3_document.documentElement, d3_selectMatcher = d3_selectRoot.matchesSelector || d3_selectRoot.webkitMatchesSelector || d3_selectRoot.mozMatchesSelector || d3_selectRoot.msMatchesSelector || d3_selectRoot.oMatchesSelector, d3_selectMatches = function(n, s) {
- return d3_selectMatcher.call(n, s);
- };
- if (typeof Sizzle === "function") {
- d3_select = function(s, n) {
- return Sizzle(s, n)[0] || null;
- };
- d3_selectAll = function(s, n) {
- return Sizzle.uniqueSort(Sizzle(s, n));
- };
- d3_selectMatches = Sizzle.matchesSelector;
- }
- var d3_selectionPrototype = [];
- d3.selection = function() {
- return d3_selectionRoot;
- };
- d3.selection.prototype = d3_selectionPrototype;
- d3_selectionPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, group, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(subnode = selector.call(node, node.__data__, i));
- if (subnode && "__data__" in node) subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- function d3_selection_selector(selector) {
- return function() {
- return d3_select(selector, this);
- };
- }
- d3_selectionPrototype.selectAll = function(selector) {
- var subgroups = [], subgroup, node;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroups.push(subgroup = d3_array(selector.call(node, node.__data__, i)));
- subgroup.parentNode = node;
- }
- }
- }
- return d3_selection(subgroups);
- };
- function d3_selection_selectorAll(selector) {
- return function() {
- return d3_selectAll(selector, this);
- };
- }
- var d3_nsPrefix = {
- svg: "http://www.w3.org/2000/svg",
- xhtml: "http://www.w3.org/1999/xhtml",
- xlink: "http://www.w3.org/1999/xlink",
- xml: "http://www.w3.org/XML/1998/namespace",
- xmlns: "http://www.w3.org/2000/xmlns/"
- };
- d3.ns = {
- prefix: d3_nsPrefix,
- qualify: function(name) {
- var i = name.indexOf(":"), prefix = name;
- if (i >= 0) {
- prefix = name.substring(0, i);
- name = name.substring(i + 1);
- }
- return d3_nsPrefix.hasOwnProperty(prefix) ? {
- space: d3_nsPrefix[prefix],
- local: name
- } : name;
- }
- };
- d3_selectionPrototype.attr = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node();
- name = d3.ns.qualify(name);
- return name.local ? node.getAttributeNS(name.space, name.local) : node.getAttribute(name);
- }
- for (value in name) this.each(d3_selection_attr(value, name[value]));
- return this;
- }
- return this.each(d3_selection_attr(name, value));
- };
- function d3_selection_attr(name, value) {
- name = d3.ns.qualify(name);
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- function attrConstant() {
- this.setAttribute(name, value);
- }
- function attrConstantNS() {
- this.setAttributeNS(name.space, name.local, value);
- }
- function attrFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttribute(name); else this.setAttribute(name, x);
- }
- function attrFunctionNS() {
- var x = value.apply(this, arguments);
- if (x == null) this.removeAttributeNS(name.space, name.local); else this.setAttributeNS(name.space, name.local, x);
- }
- return value == null ? name.local ? attrNullNS : attrNull : typeof value === "function" ? name.local ? attrFunctionNS : attrFunction : name.local ? attrConstantNS : attrConstant;
- }
- function d3_collapse(s) {
- return s.trim().replace(/\s+/g, " ");
- }
- d3.requote = function(s) {
- return s.replace(d3_requote_re, "\\$&");
- };
- var d3_requote_re = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
- d3_selectionPrototype.classed = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") {
- var node = this.node(), n = (name = name.trim().split(/^|\s+/g)).length, i = -1;
- if (value = node.classList) {
- while (++i < n) if (!value.contains(name[i])) return false;
- } else {
- value = node.getAttribute("class");
- while (++i < n) if (!d3_selection_classedRe(name[i]).test(value)) return false;
- }
- return true;
- }
- for (value in name) this.each(d3_selection_classed(value, name[value]));
- return this;
- }
- return this.each(d3_selection_classed(name, value));
- };
- function d3_selection_classedRe(name) {
- return new RegExp("(?:^|\\s+)" + d3.requote(name) + "(?:\\s+|$)", "g");
- }
- function d3_selection_classed(name, value) {
- name = name.trim().split(/\s+/).map(d3_selection_classedName);
- var n = name.length;
- function classedConstant() {
- var i = -1;
- while (++i < n) name[i](this, value);
- }
- function classedFunction() {
- var i = -1, x = value.apply(this, arguments);
- while (++i < n) name[i](this, x);
- }
- return typeof value === "function" ? classedFunction : classedConstant;
- }
- function d3_selection_classedName(name) {
- var re = d3_selection_classedRe(name);
- return function(node, value) {
- if (c = node.classList) return value ? c.add(name) : c.remove(name);
- var c = node.getAttribute("class") || "";
- if (value) {
- re.lastIndex = 0;
- if (!re.test(c)) node.setAttribute("class", d3_collapse(c + " " + name));
- } else {
- node.setAttribute("class", d3_collapse(c.replace(re, " ")));
- }
- };
- }
- d3_selectionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.each(d3_selection_style(priority, name[priority], value));
- return this;
- }
- if (n < 2) return d3_window.getComputedStyle(this.node(), null).getPropertyValue(name);
- priority = "";
- }
- return this.each(d3_selection_style(name, value, priority));
- };
- function d3_selection_style(name, value, priority) {
- function styleNull() {
- this.style.removeProperty(name);
- }
- function styleConstant() {
- this.style.setProperty(name, value, priority);
- }
- function styleFunction() {
- var x = value.apply(this, arguments);
- if (x == null) this.style.removeProperty(name); else this.style.setProperty(name, x, priority);
- }
- return value == null ? styleNull : typeof value === "function" ? styleFunction : styleConstant;
- }
- d3_selectionPrototype.property = function(name, value) {
- if (arguments.length < 2) {
- if (typeof name === "string") return this.node()[name];
- for (value in name) this.each(d3_selection_property(value, name[value]));
- return this;
- }
- return this.each(d3_selection_property(name, value));
- };
- function d3_selection_property(name, value) {
- function propertyNull() {
- delete this[name];
- }
- function propertyConstant() {
- this[name] = value;
- }
- function propertyFunction() {
- var x = value.apply(this, arguments);
- if (x == null) delete this[name]; else this[name] = x;
- }
- return value == null ? propertyNull : typeof value === "function" ? propertyFunction : propertyConstant;
- }
- d3_selectionPrototype.text = function(value) {
- return arguments.length ? this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.textContent = v == null ? "" : v;
- } : value == null ? function() {
- this.textContent = "";
- } : function() {
- this.textContent = value;
- }) : this.node().textContent;
- };
- d3_selectionPrototype.html = function(value) {
- return arguments.length ? this.each(typeof value === "function" ? function() {
- var v = value.apply(this, arguments);
- this.innerHTML = v == null ? "" : v;
- } : value == null ? function() {
- this.innerHTML = "";
- } : function() {
- this.innerHTML = value;
- }) : this.node().innerHTML;
- };
- d3_selectionPrototype.append = function(name) {
- name = d3.ns.qualify(name);
- function append() {
- return this.appendChild(d3_document.createElementNS(this.namespaceURI, name));
- }
- function appendNS() {
- return this.appendChild(d3_document.createElementNS(name.space, name.local));
- }
- return this.select(name.local ? appendNS : append);
- };
- d3_selectionPrototype.insert = function(name, before) {
- name = d3.ns.qualify(name);
- if (typeof before !== "function") before = d3_selection_selector(before);
- function insert(d, i) {
- return this.insertBefore(d3_document.createElementNS(this.namespaceURI, name), before.call(this, d, i));
- }
- function insertNS(d, i) {
- return this.insertBefore(d3_document.createElementNS(name.space, name.local), before.call(this, d, i));
- }
- return this.select(name.local ? insertNS : insert);
- };
- d3_selectionPrototype.remove = function() {
- return this.each(function() {
- var parent = this.parentNode;
- if (parent) parent.removeChild(this);
- });
- };
- d3_selectionPrototype.data = function(value, key) {
- var i = -1, n = this.length, group, node;
- if (!arguments.length) {
- value = new Array(n = (group = this[0]).length);
- while (++i < n) {
- if (node = group[i]) {
- value[i] = node.__data__;
- }
- }
- return value;
- }
- function bind(group, groupData) {
- var i, n = group.length, m = groupData.length, n0 = Math.min(n, m), updateNodes = new Array(m), enterNodes = new Array(m), exitNodes = new Array(n), node, nodeData;
- if (key) {
- var nodeByKeyValue = new d3_Map(), dataByKeyValue = new d3_Map(), keyValues = [], keyValue;
- for (i = -1; ++i < n; ) {
- keyValue = key.call(node = group[i], node.__data__, i);
- if (nodeByKeyValue.has(keyValue)) {
- exitNodes[i] = node;
- } else {
- nodeByKeyValue.set(keyValue, node);
- }
- keyValues.push(keyValue);
- }
- for (i = -1; ++i < m; ) {
- keyValue = key.call(groupData, nodeData = groupData[i], i);
- if (node = nodeByKeyValue.get(keyValue)) {
- updateNodes[i] = node;
- node.__data__ = nodeData;
- } else if (!dataByKeyValue.has(keyValue)) {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- }
- dataByKeyValue.set(keyValue, nodeData);
- nodeByKeyValue.remove(keyValue);
- }
- for (i = -1; ++i < n; ) {
- if (nodeByKeyValue.has(keyValues[i])) {
- exitNodes[i] = group[i];
- }
- }
- } else {
- for (i = -1; ++i < n0; ) {
- node = group[i];
- nodeData = groupData[i];
- if (node) {
- node.__data__ = nodeData;
- updateNodes[i] = node;
- } else {
- enterNodes[i] = d3_selection_dataNode(nodeData);
- }
- }
- for (;i < m; ++i) {
- enterNodes[i] = d3_selection_dataNode(groupData[i]);
- }
- for (;i < n; ++i) {
- exitNodes[i] = group[i];
- }
- }
- enterNodes.update = updateNodes;
- enterNodes.parentNode = updateNodes.parentNode = exitNodes.parentNode = group.parentNode;
- enter.push(enterNodes);
- update.push(updateNodes);
- exit.push(exitNodes);
- }
- var enter = d3_selection_enter([]), update = d3_selection([]), exit = d3_selection([]);
- if (typeof value === "function") {
- while (++i < n) {
- bind(group = this[i], value.call(group, group.parentNode.__data__, i));
- }
- } else {
- while (++i < n) {
- bind(group = this[i], value);
- }
- }
- update.enter = function() {
- return enter;
- };
- update.exit = function() {
- return exit;
- };
- return update;
- };
- function d3_selection_dataNode(data) {
- return {
- __data__: data
- };
- }
- d3_selectionPrototype.datum = function(value) {
- return arguments.length ? this.property("__data__", value) : this.property("__data__");
- };
- d3_selectionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- subgroup.parentNode = (group = this[j]).parentNode;
- for (var i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_selection(subgroups);
- };
- function d3_selection_filter(selector) {
- return function() {
- return d3_selectMatches(this, selector);
- };
- }
- d3_selectionPrototype.order = function() {
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
- if (node = group[i]) {
- if (next && next !== node.nextSibling) next.parentNode.insertBefore(node, next);
- next = node;
- }
- }
- }
- return this;
- };
- d3_selectionPrototype.sort = function(comparator) {
- comparator = d3_selection_sortComparator.apply(this, arguments);
- for (var j = -1, m = this.length; ++j < m; ) this[j].sort(comparator);
- return this.order();
- };
- function d3_selection_sortComparator(comparator) {
- if (!arguments.length) comparator = d3.ascending;
- return function(a, b) {
- return !a - !b || comparator(a.__data__, b.__data__);
- };
- }
- function d3_noop() {}
- d3_selectionPrototype.on = function(type, listener, capture) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof type !== "string") {
- if (n < 2) listener = false;
- for (capture in type) this.each(d3_selection_on(capture, type[capture], listener));
- return this;
- }
- if (n < 2) return (n = this.node()["__on" + type]) && n._;
- capture = false;
- }
- return this.each(d3_selection_on(type, listener, capture));
- };
- function d3_selection_on(type, listener, capture) {
- var name = "__on" + type, i = type.indexOf("."), wrap = d3_selection_onListener;
- if (i > 0) type = type.substring(0, i);
- var filter = d3_selection_onFilters.get(type);
- if (filter) type = filter, wrap = d3_selection_onFilter;
- function onRemove() {
- var l = this[name];
- if (l) {
- this.removeEventListener(type, l, l.$);
- delete this[name];
- }
- }
- function onAdd() {
- var l = wrap(listener, d3_array(arguments));
- onRemove.call(this);
- this.addEventListener(type, this[name] = l, l.$ = capture);
- l._ = listener;
- }
- function removeAll() {
- var re = new RegExp("^__on([^.]+)" + d3.requote(type) + "$"), match;
- for (var name in this) {
- if (match = name.match(re)) {
- var l = this[name];
- this.removeEventListener(match[1], l, l.$);
- delete this[name];
- }
- }
- }
- return i ? listener ? onAdd : onRemove : listener ? d3_noop : removeAll;
- }
- var d3_selection_onFilters = d3.map({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
- });
- d3_selection_onFilters.forEach(function(k) {
- if ("on" + k in d3_document) d3_selection_onFilters.remove(k);
- });
- function d3_selection_onListener(listener, argumentz) {
- return function(e) {
- var o = d3.event;
- d3.event = e;
- argumentz[0] = this.__data__;
- try {
- listener.apply(this, argumentz);
- } finally {
- d3.event = o;
- }
- };
- }
- function d3_selection_onFilter(listener, argumentz) {
- var l = d3_selection_onListener(listener, argumentz);
- return function(e) {
- var target = this, related = e.relatedTarget;
- if (!related || related !== target && !(related.compareDocumentPosition(target) & 8)) {
- l.call(target, e);
- }
- };
- }
- d3_selectionPrototype.each = function(callback) {
- return d3_selection_each(this, function(node, i, j) {
- callback.call(node, node.__data__, i, j);
- });
- };
- function d3_selection_each(groups, callback) {
- for (var j = 0, m = groups.length; j < m; j++) {
- for (var group = groups[j], i = 0, n = group.length, node; i < n; i++) {
- if (node = group[i]) callback(node, i, j);
- }
- }
- return groups;
- }
- d3_selectionPrototype.call = function(callback) {
- var args = d3_array(arguments);
- callback.apply(args[0] = this, args);
- return this;
- };
- d3_selectionPrototype.empty = function() {
- return !this.node();
- };
- d3_selectionPrototype.node = function() {
- for (var j = 0, m = this.length; j < m; j++) {
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- var node = group[i];
- if (node) return node;
- }
- }
- return null;
- };
- function d3_selection_enter(selection) {
- d3_arraySubclass(selection, d3_selection_enterPrototype);
- return selection;
- }
- var d3_selection_enterPrototype = [];
- d3.selection.enter = d3_selection_enter;
- d3.selection.enter.prototype = d3_selection_enterPrototype;
- d3_selection_enterPrototype.append = d3_selectionPrototype.append;
- d3_selection_enterPrototype.insert = d3_selectionPrototype.insert;
- d3_selection_enterPrototype.empty = d3_selectionPrototype.empty;
- d3_selection_enterPrototype.node = d3_selectionPrototype.node;
- d3_selection_enterPrototype.select = function(selector) {
- var subgroups = [], subgroup, subnode, upgroup, group, node;
- for (var j = -1, m = this.length; ++j < m; ) {
- upgroup = (group = this[j]).update;
- subgroups.push(subgroup = []);
- subgroup.parentNode = group.parentNode;
- for (var i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- subgroup.push(upgroup[i] = subnode = selector.call(group.parentNode, node.__data__, i));
- subnode.__data__ = node.__data__;
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_selection(subgroups);
- };
- d3_selectionPrototype.transition = function() {
- var id = d3_transitionInheritId || ++d3_transitionId, subgroups = [], subgroup, node, transition = Object.create(d3_transitionInherit);
- transition.time = Date.now();
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) d3_transitionNode(node, i, id, transition);
- subgroup.push(node);
- }
- }
- return d3_transition(subgroups, id);
- };
- var d3_selectionRoot = d3_selection([ [ d3_document ] ]);
- d3_selectionRoot[0].parentNode = d3_selectRoot;
- d3.select = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.select(selector) : d3_selection([ [ selector ] ]);
- };
- d3.selectAll = function(selector) {
- return typeof selector === "string" ? d3_selectionRoot.selectAll(selector) : d3_selection([ d3_array(selector) ]);
- };
- d3.behavior.zoom = function() {
- var translate = [ 0, 0 ], translate0, scale = 1, scale0, scaleExtent = d3_behavior_zoomInfinity, event = d3_eventDispatch(zoom, "zoom"), x0, x1, y0, y1, touchtime;
- function zoom() {
- this.on("mousedown.zoom", mousedown).on("mousemove.zoom", mousemove).on(d3_behavior_zoomWheel + ".zoom", mousewheel).on("dblclick.zoom", dblclick).on("touchstart.zoom", touchstart).on("touchmove.zoom", touchmove).on("touchend.zoom", touchstart);
- }
- zoom.translate = function(x) {
- if (!arguments.length) return translate;
- translate = x.map(Number);
- rescale();
- return zoom;
- };
- zoom.scale = function(x) {
- if (!arguments.length) return scale;
- scale = +x;
- rescale();
- return zoom;
- };
- zoom.scaleExtent = function(x) {
- if (!arguments.length) return scaleExtent;
- scaleExtent = x == null ? d3_behavior_zoomInfinity : x.map(Number);
- return zoom;
- };
- zoom.x = function(z) {
- if (!arguments.length) return x1;
- x1 = z;
- x0 = z.copy();
- translate = [ 0, 0 ];
- scale = 1;
- return zoom;
- };
- zoom.y = function(z) {
- if (!arguments.length) return y1;
- y1 = z;
- y0 = z.copy();
- translate = [ 0, 0 ];
- scale = 1;
- return zoom;
- };
- function location(p) {
- return [ (p[0] - translate[0]) / scale, (p[1] - translate[1]) / scale ];
- }
- function point(l) {
- return [ l[0] * scale + translate[0], l[1] * scale + translate[1] ];
- }
- function scaleTo(s) {
- scale = Math.max(scaleExtent[0], Math.min(scaleExtent[1], s));
- }
- function translateTo(p, l) {
- l = point(l);
- translate[0] += p[0] - l[0];
- translate[1] += p[1] - l[1];
- }
- function rescale() {
- if (x1) x1.domain(x0.range().map(function(x) {
- return (x - translate[0]) / scale;
- }).map(x0.invert));
- if (y1) y1.domain(y0.range().map(function(y) {
- return (y - translate[1]) / scale;
- }).map(y0.invert));
- }
- function dispatch(event) {
- rescale();
- d3.event.preventDefault();
- event({
- type: "zoom",
- scale: scale,
- translate: translate
- });
- }
- function mousedown() {
- var target = this, event_ = event.of(target, arguments), eventTarget = d3.event.target, moved = 0, w = d3.select(d3_window).on("mousemove.zoom", mousemove).on("mouseup.zoom", mouseup), l = location(d3.mouse(target));
- d3_window.focus();
- d3_eventCancel();
- function mousemove() {
- moved = 1;
- translateTo(d3.mouse(target), l);
- dispatch(event_);
- }
- function mouseup() {
- if (moved) d3_eventCancel();
- w.on("mousemove.zoom", null).on("mouseup.zoom", null);
- if (moved && d3.event.target === eventTarget) d3_eventSuppress(w, "click.zoom");
- }
- }
- function mousewheel() {
- if (!translate0) translate0 = location(d3.mouse(this));
- scaleTo(Math.pow(2, d3_behavior_zoomDelta() * .002) * scale);
- translateTo(d3.mouse(this), translate0);
- dispatch(event.of(this, arguments));
- }
- function mousemove() {
- translate0 = null;
- }
- function dblclick() {
- var p = d3.mouse(this), l = location(p), k = Math.log(scale) / Math.LN2;
- scaleTo(Math.pow(2, d3.event.shiftKey ? Math.ceil(k) - 1 : Math.floor(k) + 1));
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- function touchstart() {
- var touches = d3.touches(this), now = Date.now();
- scale0 = scale;
- translate0 = {};
- touches.forEach(function(t) {
- translate0[t.identifier] = location(t);
- });
- d3_eventCancel();
- if (touches.length === 1) {
- if (now - touchtime < 500) {
- var p = touches[0], l = location(touches[0]);
- scaleTo(scale * 2);
- translateTo(p, l);
- dispatch(event.of(this, arguments));
- }
- touchtime = now;
- }
- }
- function touchmove() {
- var touches = d3.touches(this), p0 = touches[0], l0 = translate0[p0.identifier];
- if (p1 = touches[1]) {
- var p1, l1 = translate0[p1.identifier];
- p0 = [ (p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2 ];
- l0 = [ (l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2 ];
- scaleTo(d3.event.scale * scale0);
- }
- translateTo(p0, l0);
- touchtime = null;
- dispatch(event.of(this, arguments));
- }
- return d3.rebind(zoom, event, "on");
- };
- var d3_behavior_zoomInfinity = [ 0, Infinity ];
- var d3_behavior_zoomDelta, d3_behavior_zoomWheel = "onwheel" in d3_document ? (d3_behavior_zoomDelta = function() {
- return -d3.event.deltaY * (d3.event.deltaMode ? 120 : 1);
- }, "wheel") : "onmousewheel" in d3_document ? (d3_behavior_zoomDelta = function() {
- return d3.event.wheelDelta;
- }, "mousewheel") : (d3_behavior_zoomDelta = function() {
- return -d3.event.detail;
- }, "MozMousePixelScroll");
- function d3_Color() {}
- d3_Color.prototype.toString = function() {
- return this.rgb() + "";
- };
- d3.hsl = function(h, s, l) {
- return arguments.length === 1 ? h instanceof d3_Hsl ? d3_hsl(h.h, h.s, h.l) : d3_rgb_parse("" + h, d3_rgb_hsl, d3_hsl) : d3_hsl(+h, +s, +l);
- };
- function d3_hsl(h, s, l) {
- return new d3_Hsl(h, s, l);
- }
- function d3_Hsl(h, s, l) {
- this.h = h;
- this.s = s;
- this.l = l;
- }
- var d3_hslPrototype = d3_Hsl.prototype = new d3_Color();
- d3_hslPrototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, this.l / k);
- };
- d3_hslPrototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_hsl(this.h, this.s, k * this.l);
- };
- d3_hslPrototype.rgb = function() {
- return d3_hsl_rgb(this.h, this.s, this.l);
- };
- function d3_hsl_rgb(h, s, l) {
- var m1, m2;
- h = h % 360;
- if (h < 0) h += 360;
- s = s < 0 ? 0 : s > 1 ? 1 : s;
- l = l < 0 ? 0 : l > 1 ? 1 : l;
- m2 = l <= .5 ? l * (1 + s) : l + s - l * s;
- m1 = 2 * l - m2;
- function v(h) {
- if (h > 360) h -= 360; else if (h < 0) h += 360;
- if (h < 60) return m1 + (m2 - m1) * h / 60;
- if (h < 180) return m2;
- if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60;
- return m1;
- }
- function vv(h) {
- return Math.round(v(h) * 255);
- }
- return d3_rgb(vv(h + 120), vv(h), vv(h - 120));
- }
- var π = Math.PI, ε = 1e-6, d3_radians = π / 180, d3_degrees = 180 / π;
- function d3_sgn(x) {
- return x > 0 ? 1 : x < 0 ? -1 : 0;
- }
- function d3_acos(x) {
- return Math.acos(Math.max(-1, Math.min(1, x)));
- }
- function d3_asin(x) {
- return x > 1 ? π / 2 : x < -1 ? -π / 2 : Math.asin(x);
- }
- function d3_sinh(x) {
- return (Math.exp(x) - Math.exp(-x)) / 2;
- }
- function d3_cosh(x) {
- return (Math.exp(x) + Math.exp(-x)) / 2;
- }
- function d3_haversin(x) {
- return (x = Math.sin(x / 2)) * x;
- }
- d3.hcl = function(h, c, l) {
- return arguments.length === 1 ? h instanceof d3_Hcl ? d3_hcl(h.h, h.c, h.l) : h instanceof d3_Lab ? d3_lab_hcl(h.l, h.a, h.b) : d3_lab_hcl((h = d3_rgb_lab((h = d3.rgb(h)).r, h.g, h.b)).l, h.a, h.b) : d3_hcl(+h, +c, +l);
- };
- function d3_hcl(h, c, l) {
- return new d3_Hcl(h, c, l);
- }
- function d3_Hcl(h, c, l) {
- this.h = h;
- this.c = c;
- this.l = l;
- }
- var d3_hclPrototype = d3_Hcl.prototype = new d3_Color();
- d3_hclPrototype.brighter = function(k) {
- return d3_hcl(this.h, this.c, Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_hclPrototype.darker = function(k) {
- return d3_hcl(this.h, this.c, Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)));
- };
- d3_hclPrototype.rgb = function() {
- return d3_hcl_lab(this.h, this.c, this.l).rgb();
- };
- function d3_hcl_lab(h, c, l) {
- return d3_lab(l, Math.cos(h *= d3_radians) * c, Math.sin(h) * c);
- }
- d3.lab = function(l, a, b) {
- return arguments.length === 1 ? l instanceof d3_Lab ? d3_lab(l.l, l.a, l.b) : l instanceof d3_Hcl ? d3_hcl_lab(l.l, l.c, l.h) : d3_rgb_lab((l = d3.rgb(l)).r, l.g, l.b) : d3_lab(+l, +a, +b);
- };
- function d3_lab(l, a, b) {
- return new d3_Lab(l, a, b);
- }
- function d3_Lab(l, a, b) {
- this.l = l;
- this.a = a;
- this.b = b;
- }
- var d3_lab_K = 18;
- var d3_lab_X = .95047, d3_lab_Y = 1, d3_lab_Z = 1.08883;
- var d3_labPrototype = d3_Lab.prototype = new d3_Color();
- d3_labPrototype.brighter = function(k) {
- return d3_lab(Math.min(100, this.l + d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_labPrototype.darker = function(k) {
- return d3_lab(Math.max(0, this.l - d3_lab_K * (arguments.length ? k : 1)), this.a, this.b);
- };
- d3_labPrototype.rgb = function() {
- return d3_lab_rgb(this.l, this.a, this.b);
- };
- function d3_lab_rgb(l, a, b) {
- var y = (l + 16) / 116, x = y + a / 500, z = y - b / 200;
- x = d3_lab_xyz(x) * d3_lab_X;
- y = d3_lab_xyz(y) * d3_lab_Y;
- z = d3_lab_xyz(z) * d3_lab_Z;
- return d3_rgb(d3_xyz_rgb(3.2404542 * x - 1.5371385 * y - .4985314 * z), d3_xyz_rgb(-.969266 * x + 1.8760108 * y + .041556 * z), d3_xyz_rgb(.0556434 * x - .2040259 * y + 1.0572252 * z));
- }
- function d3_lab_hcl(l, a, b) {
- return d3_hcl(Math.atan2(b, a) * d3_degrees, Math.sqrt(a * a + b * b), l);
- }
- function d3_lab_xyz(x) {
- return x > .206893034 ? x * x * x : (x - 4 / 29) / 7.787037;
- }
- function d3_xyz_lab(x) {
- return x > .008856 ? Math.pow(x, 1 / 3) : 7.787037 * x + 4 / 29;
- }
- function d3_xyz_rgb(r) {
- return Math.round(255 * (r <= .00304 ? 12.92 * r : 1.055 * Math.pow(r, 1 / 2.4) - .055));
- }
- d3.rgb = function(r, g, b) {
- return arguments.length === 1 ? r instanceof d3_Rgb ? d3_rgb(r.r, r.g, r.b) : d3_rgb_parse("" + r, d3_rgb, d3_hsl_rgb) : d3_rgb(~~r, ~~g, ~~b);
- };
- function d3_rgb(r, g, b) {
- return new d3_Rgb(r, g, b);
- }
- function d3_Rgb(r, g, b) {
- this.r = r;
- this.g = g;
- this.b = b;
- }
- var d3_rgbPrototype = d3_Rgb.prototype = new d3_Color();
- d3_rgbPrototype.brighter = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- var r = this.r, g = this.g, b = this.b, i = 30;
- if (!r && !g && !b) return d3_rgb(i, i, i);
- if (r && r < i) r = i;
- if (g && g < i) g = i;
- if (b && b < i) b = i;
- return d3_rgb(Math.min(255, Math.floor(r / k)), Math.min(255, Math.floor(g / k)), Math.min(255, Math.floor(b / k)));
- };
- d3_rgbPrototype.darker = function(k) {
- k = Math.pow(.7, arguments.length ? k : 1);
- return d3_rgb(Math.floor(k * this.r), Math.floor(k * this.g), Math.floor(k * this.b));
- };
- d3_rgbPrototype.hsl = function() {
- return d3_rgb_hsl(this.r, this.g, this.b);
- };
- d3_rgbPrototype.toString = function() {
- return "#" + d3_rgb_hex(this.r) + d3_rgb_hex(this.g) + d3_rgb_hex(this.b);
- };
- function d3_rgb_hex(v) {
- return v < 16 ? "0" + Math.max(0, v).toString(16) : Math.min(255, v).toString(16);
- }
- function d3_rgb_parse(format, rgb, hsl) {
- var r = 0, g = 0, b = 0, m1, m2, name;
- m1 = /([a-z]+)\((.*)\)/i.exec(format);
- if (m1) {
- m2 = m1[2].split(",");
- switch (m1[1]) {
- case "hsl":
- {
- return hsl(parseFloat(m2[0]), parseFloat(m2[1]) / 100, parseFloat(m2[2]) / 100);
- }
-
- case "rgb":
- {
- return rgb(d3_rgb_parseNumber(m2[0]), d3_rgb_parseNumber(m2[1]), d3_rgb_parseNumber(m2[2]));
- }
- }
- }
- if (name = d3_rgb_names.get(format)) return rgb(name.r, name.g, name.b);
- if (format != null && format.charAt(0) === "#") {
- if (format.length === 4) {
- r = format.charAt(1);
- r += r;
- g = format.charAt(2);
- g += g;
- b = format.charAt(3);
- b += b;
- } else if (format.length === 7) {
- r = format.substring(1, 3);
- g = format.substring(3, 5);
- b = format.substring(5, 7);
- }
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- }
- return rgb(r, g, b);
- }
- function d3_rgb_hsl(r, g, b) {
- var min = Math.min(r /= 255, g /= 255, b /= 255), max = Math.max(r, g, b), d = max - min, h, s, l = (max + min) / 2;
- if (d) {
- s = l < .5 ? d / (max + min) : d / (2 - max - min);
- if (r == max) h = (g - b) / d + (g < b ? 6 : 0); else if (g == max) h = (b - r) / d + 2; else h = (r - g) / d + 4;
- h *= 60;
- } else {
- s = h = 0;
- }
- return d3_hsl(h, s, l);
- }
- function d3_rgb_lab(r, g, b) {
- r = d3_rgb_xyz(r);
- g = d3_rgb_xyz(g);
- b = d3_rgb_xyz(b);
- var x = d3_xyz_lab((.4124564 * r + .3575761 * g + .1804375 * b) / d3_lab_X), y = d3_xyz_lab((.2126729 * r + .7151522 * g + .072175 * b) / d3_lab_Y), z = d3_xyz_lab((.0193339 * r + .119192 * g + .9503041 * b) / d3_lab_Z);
- return d3_lab(116 * y - 16, 500 * (x - y), 200 * (y - z));
- }
- function d3_rgb_xyz(r) {
- return (r /= 255) <= .04045 ? r / 12.92 : Math.pow((r + .055) / 1.055, 2.4);
- }
- function d3_rgb_parseNumber(c) {
- var f = parseFloat(c);
- return c.charAt(c.length - 1) === "%" ? Math.round(f * 2.55) : f;
- }
- var d3_rgb_names = d3.map({
- aliceblue: "#f0f8ff",
- antiquewhite: "#faebd7",
- aqua: "#00ffff",
- aquamarine: "#7fffd4",
- azure: "#f0ffff",
- beige: "#f5f5dc",
- bisque: "#ffe4c4",
- black: "#000000",
- blanchedalmond: "#ffebcd",
- blue: "#0000ff",
- blueviolet: "#8a2be2",
- brown: "#a52a2a",
- burlywood: "#deb887",
- cadetblue: "#5f9ea0",
- chartreuse: "#7fff00",
- chocolate: "#d2691e",
- coral: "#ff7f50",
- cornflowerblue: "#6495ed",
- cornsilk: "#fff8dc",
- crimson: "#dc143c",
- cyan: "#00ffff",
- darkblue: "#00008b",
- darkcyan: "#008b8b",
- darkgoldenrod: "#b8860b",
- darkgray: "#a9a9a9",
- darkgreen: "#006400",
- darkgrey: "#a9a9a9",
- darkkhaki: "#bdb76b",
- darkmagenta: "#8b008b",
- darkolivegreen: "#556b2f",
- darkorange: "#ff8c00",
- darkorchid: "#9932cc",
- darkred: "#8b0000",
- darksalmon: "#e9967a",
- darkseagreen: "#8fbc8f",
- darkslateblue: "#483d8b",
- darkslategray: "#2f4f4f",
- darkslategrey: "#2f4f4f",
- darkturquoise: "#00ced1",
- darkviolet: "#9400d3",
- deeppink: "#ff1493",
- deepskyblue: "#00bfff",
- dimgray: "#696969",
- dimgrey: "#696969",
- dodgerblue: "#1e90ff",
- firebrick: "#b22222",
- floralwhite: "#fffaf0",
- forestgreen: "#228b22",
- fuchsia: "#ff00ff",
- gainsboro: "#dcdcdc",
- ghostwhite: "#f8f8ff",
- gold: "#ffd700",
- goldenrod: "#daa520",
- gray: "#808080",
- green: "#008000",
- greenyellow: "#adff2f",
- grey: "#808080",
- honeydew: "#f0fff0",
- hotpink: "#ff69b4",
- indianred: "#cd5c5c",
- indigo: "#4b0082",
- ivory: "#fffff0",
- khaki: "#f0e68c",
- lavender: "#e6e6fa",
- lavenderblush: "#fff0f5",
- lawngreen: "#7cfc00",
- lemonchiffon: "#fffacd",
- lightblue: "#add8e6",
- lightcoral: "#f08080",
- lightcyan: "#e0ffff",
- lightgoldenrodyellow: "#fafad2",
- lightgray: "#d3d3d3",
- lightgreen: "#90ee90",
- lightgrey: "#d3d3d3",
- lightpink: "#ffb6c1",
- lightsalmon: "#ffa07a",
- lightseagreen: "#20b2aa",
- lightskyblue: "#87cefa",
- lightslategray: "#778899",
- lightslategrey: "#778899",
- lightsteelblue: "#b0c4de",
- lightyellow: "#ffffe0",
- lime: "#00ff00",
- limegreen: "#32cd32",
- linen: "#faf0e6",
- magenta: "#ff00ff",
- maroon: "#800000",
- mediumaquamarine: "#66cdaa",
- mediumblue: "#0000cd",
- mediumorchid: "#ba55d3",
- mediumpurple: "#9370db",
- mediumseagreen: "#3cb371",
- mediumslateblue: "#7b68ee",
- mediumspringgreen: "#00fa9a",
- mediumturquoise: "#48d1cc",
- mediumvioletred: "#c71585",
- midnightblue: "#191970",
- mintcream: "#f5fffa",
- mistyrose: "#ffe4e1",
- moccasin: "#ffe4b5",
- navajowhite: "#ffdead",
- navy: "#000080",
- oldlace: "#fdf5e6",
- olive: "#808000",
- olivedrab: "#6b8e23",
- orange: "#ffa500",
- orangered: "#ff4500",
- orchid: "#da70d6",
- palegoldenrod: "#eee8aa",
- palegreen: "#98fb98",
- paleturquoise: "#afeeee",
- palevioletred: "#db7093",
- papayawhip: "#ffefd5",
- peachpuff: "#ffdab9",
- peru: "#cd853f",
- pink: "#ffc0cb",
- plum: "#dda0dd",
- powderblue: "#b0e0e6",
- purple: "#800080",
- red: "#ff0000",
- rosybrown: "#bc8f8f",
- royalblue: "#4169e1",
- saddlebrown: "#8b4513",
- salmon: "#fa8072",
- sandybrown: "#f4a460",
- seagreen: "#2e8b57",
- seashell: "#fff5ee",
- sienna: "#a0522d",
- silver: "#c0c0c0",
- skyblue: "#87ceeb",
- slateblue: "#6a5acd",
- slategray: "#708090",
- slategrey: "#708090",
- snow: "#fffafa",
- springgreen: "#00ff7f",
- steelblue: "#4682b4",
- tan: "#d2b48c",
- teal: "#008080",
- thistle: "#d8bfd8",
- tomato: "#ff6347",
- turquoise: "#40e0d0",
- violet: "#ee82ee",
- wheat: "#f5deb3",
- white: "#ffffff",
- whitesmoke: "#f5f5f5",
- yellow: "#ffff00",
- yellowgreen: "#9acd32"
- });
- d3_rgb_names.forEach(function(key, value) {
- d3_rgb_names.set(key, d3_rgb_parse(value, d3_rgb, d3_hsl_rgb));
- });
- function d3_functor(v) {
- return typeof v === "function" ? v : function() {
- return v;
- };
- }
- d3.functor = d3_functor;
- function d3_identity(d) {
- return d;
- }
- d3.xhr = function(url, mimeType, callback) {
- var xhr = {}, dispatch = d3.dispatch("progress", "load", "error"), headers = {}, response = d3_identity, request = new (d3_window.XDomainRequest && /^(http(s)?:)?\/\//.test(url) ? XDomainRequest : XMLHttpRequest)();
- "onload" in request ? request.onload = request.onerror = respond : request.onreadystatechange = function() {
- request.readyState > 3 && respond();
- };
- function respond() {
- var s = request.status;
- !s && request.responseText || s >= 200 && s < 300 || s === 304 ? dispatch.load.call(xhr, response.call(xhr, request)) : dispatch.error.call(xhr, request);
- }
- request.onprogress = function(event) {
- var o = d3.event;
- d3.event = event;
- try {
- dispatch.progress.call(xhr, request);
- } finally {
- d3.event = o;
- }
- };
- xhr.header = function(name, value) {
- name = (name + "").toLowerCase();
- if (arguments.length < 2) return headers[name];
- if (value == null) delete headers[name]; else headers[name] = value + "";
- return xhr;
- };
- xhr.mimeType = function(value) {
- if (!arguments.length) return mimeType;
- mimeType = value == null ? null : value + "";
- return xhr;
- };
- xhr.response = function(value) {
- response = value;
- return xhr;
- };
- [ "get", "post" ].forEach(function(method) {
- xhr[method] = function() {
- return xhr.send.apply(xhr, [ method ].concat(d3_array(arguments)));
- };
- });
- xhr.send = function(method, data, callback) {
- if (arguments.length === 2 && typeof data === "function") callback = data, data = null;
- request.open(method, url, true);
- if (mimeType != null && !("accept" in headers)) headers["accept"] = mimeType + ",*/*";
- if (request.setRequestHeader) for (var name in headers) request.setRequestHeader(name, headers[name]);
- if (mimeType != null && request.overrideMimeType) request.overrideMimeType(mimeType);
- if (callback != null) xhr.on("error", callback).on("load", function(request) {
- callback(null, request);
- });
- request.send(data == null ? null : data);
- return xhr;
- };
- xhr.abort = function() {
- request.abort();
- return xhr;
- };
- d3.rebind(xhr, dispatch, "on");
- if (arguments.length === 2 && typeof mimeType === "function") callback = mimeType,
- mimeType = null;
- return callback == null ? xhr : xhr.get(d3_xhr_fixCallback(callback));
- };
- function d3_xhr_fixCallback(callback) {
- return callback.length === 1 ? function(error, request) {
- callback(error == null ? request : null);
- } : callback;
- }
- function d3_dsv(delimiter, mimeType) {
- var reFormat = new RegExp('["' + delimiter + "\n]"), delimiterCode = delimiter.charCodeAt(0);
- function dsv(url, row, callback) {
- if (arguments.length < 3) callback = row, row = null;
- var xhr = d3.xhr(url, mimeType, callback);
- xhr.row = function(_) {
- return arguments.length ? xhr.response((row = _) == null ? response : typedResponse(_)) : row;
- };
- return xhr.row(row);
- }
- function response(request) {
- return dsv.parse(request.responseText);
- }
- function typedResponse(f) {
- return function(request) {
- return dsv.parse(request.responseText, f);
- };
- }
- dsv.parse = function(text, f) {
- var o;
- return dsv.parseRows(text, function(row, i) {
- if (o) return o(row, i - 1);
- var a = new Function("d", "return {" + row.map(function(name, i) {
- return JSON.stringify(name) + ": d[" + i + "]";
- }).join(",") + "}");
- o = f ? function(row, i) {
- return f(a(row), i);
- } : a;
- });
- };
- dsv.parseRows = function(text, f) {
- var EOL = {}, EOF = {}, rows = [], N = text.length, I = 0, n = 0, t, eol;
- function token() {
- if (I >= N) return EOF;
- if (eol) return eol = false, EOL;
- var j = I;
- if (text.charCodeAt(j) === 34) {
- var i = j;
- while (i++ < N) {
- if (text.charCodeAt(i) === 34) {
- if (text.charCodeAt(i + 1) !== 34) break;
- ++i;
- }
- }
- I = i + 2;
- var c = text.charCodeAt(i + 1);
- if (c === 13) {
- eol = true;
- if (text.charCodeAt(i + 2) === 10) ++I;
- } else if (c === 10) {
- eol = true;
- }
- return text.substring(j + 1, i).replace(/""/g, '"');
- }
- while (I < N) {
- var c = text.charCodeAt(I++), k = 1;
- if (c === 10) eol = true; else if (c === 13) {
- eol = true;
- if (text.charCodeAt(I) === 10) ++I, ++k;
- } else if (c !== delimiterCode) continue;
- return text.substring(j, I - k);
- }
- return text.substring(j);
- }
- while ((t = token()) !== EOF) {
- var a = [];
- while (t !== EOL && t !== EOF) {
- a.push(t);
- t = token();
- }
- if (f && !(a = f(a, n++))) continue;
- rows.push(a);
- }
- return rows;
- };
- dsv.format = function(rows) {
- if (Array.isArray(rows[0])) return dsv.formatRows(rows);
- var fieldSet = new d3_Set(), fields = [];
- rows.forEach(function(row) {
- for (var field in row) {
- if (!fieldSet.has(field)) {
- fields.push(fieldSet.add(field));
- }
- }
- });
- return [ fields.map(formatValue).join(delimiter) ].concat(rows.map(function(row) {
- return fields.map(function(field) {
- return formatValue(row[field]);
- }).join(delimiter);
- })).join("\n");
- };
- dsv.formatRows = function(rows) {
- return rows.map(formatRow).join("\n");
- };
- function formatRow(row) {
- return row.map(formatValue).join(delimiter);
- }
- function formatValue(text) {
- return reFormat.test(text) ? '"' + text.replace(/\"/g, '""') + '"' : text;
- }
- return dsv;
- }
- d3.csv = d3_dsv(",", "text/csv");
- d3.tsv = d3_dsv(" ", "text/tab-separated-values");
- var d3_timer_id = 0, d3_timer_byId = {}, d3_timer_queue = null, d3_timer_interval, d3_timer_timeout;
- d3.timer = function(callback, delay, then) {
- if (arguments.length < 3) {
- if (arguments.length < 2) delay = 0; else if (!isFinite(delay)) return;
- then = Date.now();
- }
- var timer = d3_timer_byId[callback.id];
- if (timer && timer.callback === callback) {
- timer.then = then;
- timer.delay = delay;
- } else d3_timer_byId[callback.id = ++d3_timer_id] = d3_timer_queue = {
- callback: callback,
- then: then,
- delay: delay,
- next: d3_timer_queue
- };
- if (!d3_timer_interval) {
- d3_timer_timeout = clearTimeout(d3_timer_timeout);
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- };
- function d3_timer_step() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (elapsed >= t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- var delay = d3_timer_flush() - now;
- if (delay > 24) {
- if (isFinite(delay)) {
- clearTimeout(d3_timer_timeout);
- d3_timer_timeout = setTimeout(d3_timer_step, delay);
- }
- d3_timer_interval = 0;
- } else {
- d3_timer_interval = 1;
- d3_timer_frame(d3_timer_step);
- }
- }
- d3.timer.flush = function() {
- var elapsed, now = Date.now(), t1 = d3_timer_queue;
- while (t1) {
- elapsed = now - t1.then;
- if (!t1.delay) t1.flush = t1.callback(elapsed);
- t1 = t1.next;
- }
- d3_timer_flush();
- };
- function d3_timer_flush() {
- var t0 = null, t1 = d3_timer_queue, then = Infinity;
- while (t1) {
- if (t1.flush) {
- delete d3_timer_byId[t1.callback.id];
- t1 = t0 ? t0.next = t1.next : d3_timer_queue = t1.next;
- } else {
- then = Math.min(then, t1.then + t1.delay);
- t1 = (t0 = t1).next;
- }
- }
- return then;
- }
- var d3_timer_frame = d3_window.requestAnimationFrame || d3_window.webkitRequestAnimationFrame || d3_window.mozRequestAnimationFrame || d3_window.oRequestAnimationFrame || d3_window.msRequestAnimationFrame || function(callback) {
- setTimeout(callback, 17);
- };
- var d3_format_decimalPoint = ".", d3_format_thousandsSeparator = ",", d3_format_grouping = [ 3, 3 ];
- var d3_formatPrefixes = [ "y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y" ].map(d3_formatPrefix);
- d3.formatPrefix = function(value, precision) {
- var i = 0;
- if (value) {
- if (value < 0) value *= -1;
- if (precision) value = d3.round(value, d3_format_precision(value, precision));
- i = 1 + Math.floor(1e-12 + Math.log(value) / Math.LN10);
- i = Math.max(-24, Math.min(24, Math.floor((i <= 0 ? i + 1 : i - 1) / 3) * 3));
- }
- return d3_formatPrefixes[8 + i / 3];
- };
- function d3_formatPrefix(d, i) {
- var k = Math.pow(10, Math.abs(8 - i) * 3);
- return {
- scale: i > 8 ? function(d) {
- return d / k;
- } : function(d) {
- return d * k;
- },
- symbol: d
- };
- }
- d3.round = function(x, n) {
- return n ? Math.round(x * (n = Math.pow(10, n))) / n : Math.round(x);
- };
- d3.format = function(specifier) {
- var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "", basePrefix = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
- if (precision) precision = +precision.substring(1);
- if (zfill || fill === "0" && align === "=") {
- zfill = fill = "0";
- align = "=";
- if (comma) width -= Math.floor((width - 1) / 4);
- }
- switch (type) {
- case "n":
- comma = true;
- type = "g";
- break;
-
- case "%":
- scale = 100;
- suffix = "%";
- type = "f";
- break;
-
- case "p":
- scale = 100;
- suffix = "%";
- type = "r";
- break;
-
- case "b":
- case "o":
- case "x":
- case "X":
- if (basePrefix) basePrefix = "0" + type.toLowerCase();
-
- case "c":
- case "d":
- integer = true;
- precision = 0;
- break;
-
- case "s":
- scale = -1;
- type = "r";
- break;
- }
- if (basePrefix === "#") basePrefix = "";
- if (type == "r" && !precision) type = "g";
- if (precision != null) {
- if (type == "g") precision = Math.max(1, Math.min(21, precision)); else if (type == "e" || type == "f") precision = Math.max(0, Math.min(20, precision));
- }
- type = d3_format_types.get(type) || d3_format_typeDefault;
- var zcomma = zfill && comma;
- return function(value) {
- if (integer && value % 1) return "";
- var negative = value < 0 || value === 0 && 1 / value < 0 ? (value = -value, "-") : sign;
- if (scale < 0) {
- var prefix = d3.formatPrefix(value, precision);
- value = prefix.scale(value);
- suffix = prefix.symbol;
- } else {
- value *= scale;
- }
- value = type(value, precision);
- if (!zfill && comma) value = d3_format_group(value);
- var length = basePrefix.length + value.length + (zcomma ? 0 : negative.length), padding = length < width ? new Array(length = width - length + 1).join(fill) : "";
- if (zcomma) value = d3_format_group(padding + value);
- if (d3_format_decimalPoint) value.replace(".", d3_format_decimalPoint);
- negative += basePrefix;
- return (align === "<" ? negative + value + padding : align === ">" ? padding + negative + value : align === "^" ? padding.substring(0, length >>= 1) + negative + value + padding.substring(length) : negative + (zcomma ? value : padding + value)) + suffix;
- };
- };
- var d3_format_re = /(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;
- var d3_format_types = d3.map({
- b: function(x) {
- return x.toString(2);
- },
- c: function(x) {
- return String.fromCharCode(x);
- },
- o: function(x) {
- return x.toString(8);
- },
- x: function(x) {
- return x.toString(16);
- },
- X: function(x) {
- return x.toString(16).toUpperCase();
- },
- g: function(x, p) {
- return x.toPrecision(p);
- },
- e: function(x, p) {
- return x.toExponential(p);
- },
- f: function(x, p) {
- return x.toFixed(p);
- },
- r: function(x, p) {
- return (x = d3.round(x, d3_format_precision(x, p))).toFixed(Math.max(0, Math.min(20, d3_format_precision(x * (1 + 1e-15), p))));
- }
- });
- function d3_format_precision(x, p) {
- return p - (x ? Math.ceil(Math.log(x) / Math.LN10) : 1);
- }
- function d3_format_typeDefault(x) {
- return x + "";
- }
- var d3_format_group = d3_identity;
- if (d3_format_grouping) {
- var d3_format_groupingLength = d3_format_grouping.length;
- d3_format_group = function(value) {
- var i = value.lastIndexOf("."), f = i >= 0 ? "." + value.substring(i + 1) : (i = value.length,
- ""), t = [], j = 0, g = d3_format_grouping[0];
- while (i > 0 && g > 0) {
- t.push(value.substring(i -= g, i + g));
- g = d3_format_grouping[j = (j + 1) % d3_format_groupingLength];
- }
- return t.reverse().join(d3_format_thousandsSeparator || "") + f;
- };
- }
- d3.geo = {};
- d3.geo.stream = function(object, listener) {
- if (object && d3_geo_streamObjectType.hasOwnProperty(object.type)) {
- d3_geo_streamObjectType[object.type](object, listener);
- } else {
- d3_geo_streamGeometry(object, listener);
- }
- };
- function d3_geo_streamGeometry(geometry, listener) {
- if (geometry && d3_geo_streamGeometryType.hasOwnProperty(geometry.type)) {
- d3_geo_streamGeometryType[geometry.type](geometry, listener);
- }
- }
- var d3_geo_streamObjectType = {
- Feature: function(feature, listener) {
- d3_geo_streamGeometry(feature.geometry, listener);
- },
- FeatureCollection: function(object, listener) {
- var features = object.features, i = -1, n = features.length;
- while (++i < n) d3_geo_streamGeometry(features[i].geometry, listener);
- }
- };
- var d3_geo_streamGeometryType = {
- Sphere: function(object, listener) {
- listener.sphere();
- },
- Point: function(object, listener) {
- var coordinate = object.coordinates;
- listener.point(coordinate[0], coordinate[1]);
- },
- MultiPoint: function(object, listener) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length, coordinate;
- while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]);
- },
- LineString: function(object, listener) {
- d3_geo_streamLine(object.coordinates, listener, 0);
- },
- MultiLineString: function(object, listener) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) d3_geo_streamLine(coordinates[i], listener, 0);
- },
- Polygon: function(object, listener) {
- d3_geo_streamPolygon(object.coordinates, listener);
- },
- MultiPolygon: function(object, listener) {
- var coordinates = object.coordinates, i = -1, n = coordinates.length;
- while (++i < n) d3_geo_streamPolygon(coordinates[i], listener);
- },
- GeometryCollection: function(object, listener) {
- var geometries = object.geometries, i = -1, n = geometries.length;
- while (++i < n) d3_geo_streamGeometry(geometries[i], listener);
- }
- };
- function d3_geo_streamLine(coordinates, listener, closed) {
- var i = -1, n = coordinates.length - closed, coordinate;
- listener.lineStart();
- while (++i < n) coordinate = coordinates[i], listener.point(coordinate[0], coordinate[1]);
- listener.lineEnd();
- }
- function d3_geo_streamPolygon(coordinates, listener) {
- var i = -1, n = coordinates.length;
- listener.polygonStart();
- while (++i < n) d3_geo_streamLine(coordinates[i], listener, 1);
- listener.polygonEnd();
- }
- d3.geo.area = function(object) {
- d3_geo_areaSum = 0;
- d3.geo.stream(object, d3_geo_area);
- return d3_geo_areaSum;
- };
- var d3_geo_areaSum, d3_geo_areaRingU, d3_geo_areaRingV;
- var d3_geo_area = {
- sphere: function() {
- d3_geo_areaSum += 4 * π;
- },
- point: d3_noop,
- lineStart: d3_noop,
- lineEnd: d3_noop,
- polygonStart: function() {
- d3_geo_areaRingU = 1, d3_geo_areaRingV = 0;
- d3_geo_area.lineStart = d3_geo_areaRingStart;
- },
- polygonEnd: function() {
- var area = 2 * Math.atan2(d3_geo_areaRingV, d3_geo_areaRingU);
- d3_geo_areaSum += area < 0 ? 4 * π + area : area;
- d3_geo_area.lineStart = d3_geo_area.lineEnd = d3_geo_area.point = d3_noop;
- }
- };
- function d3_geo_areaRingStart() {
- var λ00, φ00, λ0, cosφ0, sinφ0;
- d3_geo_area.point = function(λ, φ) {
- d3_geo_area.point = nextPoint;
- λ0 = (λ00 = λ) * d3_radians, cosφ0 = Math.cos(φ = (φ00 = φ) * d3_radians / 2 + π / 4),
- sinφ0 = Math.sin(φ);
- };
- function nextPoint(λ, φ) {
- λ *= d3_radians;
- φ = φ * d3_radians / 2 + π / 4;
- var dλ = λ - λ0, cosφ = Math.cos(φ), sinφ = Math.sin(φ), k = sinφ0 * sinφ, u0 = d3_geo_areaRingU, v0 = d3_geo_areaRingV, u = cosφ0 * cosφ + k * Math.cos(dλ), v = k * Math.sin(dλ);
- d3_geo_areaRingU = u0 * u - v0 * v;
- d3_geo_areaRingV = v0 * u + u0 * v;
- λ0 = λ, cosφ0 = cosφ, sinφ0 = sinφ;
- }
- d3_geo_area.lineEnd = function() {
- nextPoint(λ00, φ00);
- };
- }
- d3.geo.bounds = d3_geo_bounds(d3_identity);
- function d3_geo_bounds(projectStream) {
- var x0, y0, x1, y1;
- var bound = {
- point: boundPoint,
- lineStart: d3_noop,
- lineEnd: d3_noop,
- polygonStart: function() {
- bound.lineEnd = boundPolygonLineEnd;
- },
- polygonEnd: function() {
- bound.point = boundPoint;
- }
- };
- function boundPoint(x, y) {
- if (x < x0) x0 = x;
- if (x > x1) x1 = x;
- if (y < y0) y0 = y;
- if (y > y1) y1 = y;
- }
- function boundPolygonLineEnd() {
- bound.point = bound.lineEnd = d3_noop;
- }
- return function(feature) {
- y1 = x1 = -(x0 = y0 = Infinity);
- d3.geo.stream(feature, projectStream(bound));
- return [ [ x0, y0 ], [ x1, y1 ] ];
- };
- }
- d3.geo.centroid = function(object) {
- d3_geo_centroidDimension = d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- d3.geo.stream(object, d3_geo_centroid);
- var m;
- if (d3_geo_centroidW && Math.abs(m = Math.sqrt(d3_geo_centroidX * d3_geo_centroidX + d3_geo_centroidY * d3_geo_centroidY + d3_geo_centroidZ * d3_geo_centroidZ)) > ε) {
- return [ Math.atan2(d3_geo_centroidY, d3_geo_centroidX) * d3_degrees, Math.asin(Math.max(-1, Math.min(1, d3_geo_centroidZ / m))) * d3_degrees ];
- }
- };
- var d3_geo_centroidDimension, d3_geo_centroidW, d3_geo_centroidX, d3_geo_centroidY, d3_geo_centroidZ;
- var d3_geo_centroid = {
- sphere: function() {
- if (d3_geo_centroidDimension < 2) {
- d3_geo_centroidDimension = 2;
- d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- }
- },
- point: d3_geo_centroidPoint,
- lineStart: d3_geo_centroidLineStart,
- lineEnd: d3_geo_centroidLineEnd,
- polygonStart: function() {
- if (d3_geo_centroidDimension < 2) {
- d3_geo_centroidDimension = 2;
- d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- }
- d3_geo_centroid.lineStart = d3_geo_centroidRingStart;
- },
- polygonEnd: function() {
- d3_geo_centroid.lineStart = d3_geo_centroidLineStart;
- }
- };
- function d3_geo_centroidPoint(λ, φ) {
- if (d3_geo_centroidDimension) return;
- ++d3_geo_centroidW;
- λ *= d3_radians;
- var cosφ = Math.cos(φ *= d3_radians);
- d3_geo_centroidX += (cosφ * Math.cos(λ) - d3_geo_centroidX) / d3_geo_centroidW;
- d3_geo_centroidY += (cosφ * Math.sin(λ) - d3_geo_centroidY) / d3_geo_centroidW;
- d3_geo_centroidZ += (Math.sin(φ) - d3_geo_centroidZ) / d3_geo_centroidW;
- }
- function d3_geo_centroidRingStart() {
- var λ00, φ00;
- d3_geo_centroidDimension = 1;
- d3_geo_centroidLineStart();
- d3_geo_centroidDimension = 2;
- var linePoint = d3_geo_centroid.point;
- d3_geo_centroid.point = function(λ, φ) {
- linePoint(λ00 = λ, φ00 = φ);
- };
- d3_geo_centroid.lineEnd = function() {
- d3_geo_centroid.point(λ00, φ00);
- d3_geo_centroidLineEnd();
- d3_geo_centroid.lineEnd = d3_geo_centroidLineEnd;
- };
- }
- function d3_geo_centroidLineStart() {
- var x0, y0, z0;
- if (d3_geo_centroidDimension > 1) return;
- if (d3_geo_centroidDimension < 1) {
- d3_geo_centroidDimension = 1;
- d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- }
- d3_geo_centroid.point = function(λ, φ) {
- λ *= d3_radians;
- var cosφ = Math.cos(φ *= d3_radians);
- x0 = cosφ * Math.cos(λ);
- y0 = cosφ * Math.sin(λ);
- z0 = Math.sin(φ);
- d3_geo_centroid.point = nextPoint;
- };
- function nextPoint(λ, φ) {
- λ *= d3_radians;
- var cosφ = Math.cos(φ *= d3_radians), x = cosφ * Math.cos(λ), y = cosφ * Math.sin(λ), z = Math.sin(φ), w = Math.atan2(Math.sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z);
- d3_geo_centroidW += w;
- d3_geo_centroidX += w * (x0 + (x0 = x));
- d3_geo_centroidY += w * (y0 + (y0 = y));
- d3_geo_centroidZ += w * (z0 + (z0 = z));
- }
- }
- function d3_geo_centroidLineEnd() {
- d3_geo_centroid.point = d3_geo_centroidPoint;
- }
- function d3_geo_cartesian(spherical) {
- var λ = spherical[0], φ = spherical[1], cosφ = Math.cos(φ);
- return [ cosφ * Math.cos(λ), cosφ * Math.sin(λ), Math.sin(φ) ];
- }
- function d3_geo_cartesianDot(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
- }
- function d3_geo_cartesianCross(a, b) {
- return [ a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0] ];
- }
- function d3_geo_cartesianAdd(a, b) {
- a[0] += b[0];
- a[1] += b[1];
- a[2] += b[2];
- }
- function d3_geo_cartesianScale(vector, k) {
- return [ vector[0] * k, vector[1] * k, vector[2] * k ];
- }
- function d3_geo_cartesianNormalize(d) {
- var l = Math.sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]);
- d[0] /= l;
- d[1] /= l;
- d[2] /= l;
- }
- function d3_true() {
- return true;
- }
- function d3_geo_spherical(cartesian) {
- return [ Math.atan2(cartesian[1], cartesian[0]), Math.asin(Math.max(-1, Math.min(1, cartesian[2]))) ];
- }
- function d3_geo_sphericalEqual(a, b) {
- return Math.abs(a[0] - b[0]) < ε && Math.abs(a[1] - b[1]) < ε;
- }
- function d3_geo_clipPolygon(segments, compare, inside, interpolate, listener) {
- var subject = [], clip = [];
- segments.forEach(function(segment) {
- if ((n = segment.length - 1) <= 0) return;
- var n, p0 = segment[0], p1 = segment[n];
- if (d3_geo_sphericalEqual(p0, p1)) {
- listener.lineStart();
- for (var i = 0; i < n; ++i) listener.point((p0 = segment[i])[0], p0[1]);
- listener.lineEnd();
- return;
- }
- var a = {
- point: p0,
- points: segment,
- other: null,
- visited: false,
- entry: true,
- subject: true
- }, b = {
- point: p0,
- points: [ p0 ],
- other: a,
- visited: false,
- entry: false,
- subject: false
- };
- a.other = b;
- subject.push(a);
- clip.push(b);
- a = {
- point: p1,
- points: [ p1 ],
- other: null,
- visited: false,
- entry: false,
- subject: true
- };
- b = {
- point: p1,
- points: [ p1 ],
- other: a,
- visited: false,
- entry: true,
- subject: false
- };
- a.other = b;
- subject.push(a);
- clip.push(b);
- });
- clip.sort(compare);
- d3_geo_clipPolygonLinkCircular(subject);
- d3_geo_clipPolygonLinkCircular(clip);
- if (!subject.length) return;
- if (inside) for (var i = 1, e = !inside(clip[0].point), n = clip.length; i < n; ++i) {
- clip[i].entry = e = !e;
- }
- var start = subject[0], current, points, point;
- while (1) {
- current = start;
- while (current.visited) if ((current = current.next) === start) return;
- points = current.points;
- listener.lineStart();
- do {
- current.visited = current.other.visited = true;
- if (current.entry) {
- if (current.subject) {
- for (var i = 0; i < points.length; i++) listener.point((point = points[i])[0], point[1]);
- } else {
- interpolate(current.point, current.next.point, 1, listener);
- }
- current = current.next;
- } else {
- if (current.subject) {
- points = current.prev.points;
- for (var i = points.length; --i >= 0; ) listener.point((point = points[i])[0], point[1]);
- } else {
- interpolate(current.point, current.prev.point, -1, listener);
- }
- current = current.prev;
- }
- current = current.other;
- points = current.points;
- } while (!current.visited);
- listener.lineEnd();
- }
- }
- function d3_geo_clipPolygonLinkCircular(array) {
- if (!(n = array.length)) return;
- var n, i = 0, a = array[0], b;
- while (++i < n) {
- a.next = b = array[i];
- b.prev = a;
- a = b;
- }
- a.next = b = array[0];
- b.prev = a;
- }
- function d3_geo_clip(pointVisible, clipLine, interpolate) {
- return function(listener) {
- var line = clipLine(listener);
- var clip = {
- point: point,
- lineStart: lineStart,
- lineEnd: lineEnd,
- polygonStart: function() {
- clip.point = pointRing;
- clip.lineStart = ringStart;
- clip.lineEnd = ringEnd;
- invisible = false;
- invisibleArea = visibleArea = 0;
- segments = [];
- listener.polygonStart();
- },
- polygonEnd: function() {
- clip.point = point;
- clip.lineStart = lineStart;
- clip.lineEnd = lineEnd;
- segments = d3.merge(segments);
- if (segments.length) {
- d3_geo_clipPolygon(segments, d3_geo_clipSort, null, interpolate, listener);
- } else if (visibleArea < -ε || invisible && invisibleArea < -ε) {
- listener.lineStart();
- interpolate(null, null, 1, listener);
- listener.lineEnd();
- }
- listener.polygonEnd();
- segments = null;
- },
- sphere: function() {
- listener.polygonStart();
- listener.lineStart();
- interpolate(null, null, 1, listener);
- listener.lineEnd();
- listener.polygonEnd();
- }
- };
- function point(λ, φ) {
- if (pointVisible(λ, φ)) listener.point(λ, φ);
- }
- function pointLine(λ, φ) {
- line.point(λ, φ);
- }
- function lineStart() {
- clip.point = pointLine;
- line.lineStart();
- }
- function lineEnd() {
- clip.point = point;
- line.lineEnd();
- }
- var segments, visibleArea, invisibleArea, invisible;
- var buffer = d3_geo_clipBufferListener(), ringListener = clipLine(buffer), ring;
- function pointRing(λ, φ) {
- ringListener.point(λ, φ);
- ring.push([ λ, φ ]);
- }
- function ringStart() {
- ringListener.lineStart();
- ring = [];
- }
- function ringEnd() {
- pointRing(ring[0][0], ring[0][1]);
- ringListener.lineEnd();
- var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;
- if (!n) {
- invisible = true;
- invisibleArea += d3_geo_clipAreaRing(ring, -1);
- ring = null;
- return;
- }
- ring = null;
- if (clean & 1) {
- segment = ringSegments[0];
- visibleArea += d3_geo_clipAreaRing(segment, 1);
- var n = segment.length - 1, i = -1, point;
- listener.lineStart();
- while (++i < n) listener.point((point = segment[i])[0], point[1]);
- listener.lineEnd();
- return;
- }
- if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
- segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));
- }
- return clip;
- };
- }
- function d3_geo_clipSegmentLength1(segment) {
- return segment.length > 1;
- }
- function d3_geo_clipBufferListener() {
- var lines = [], line;
- return {
- lineStart: function() {
- lines.push(line = []);
- },
- point: function(λ, φ) {
- line.push([ λ, φ ]);
- },
- lineEnd: d3_noop,
- buffer: function() {
- var buffer = lines;
- lines = [];
- line = null;
- return buffer;
- },
- rejoin: function() {
- if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
- }
- };
- }
- function d3_geo_clipAreaRing(ring, invisible) {
- if (!(n = ring.length)) return 0;
- var n, i = 0, area = 0, p = ring[0], λ = p[0], φ = p[1], cosφ = Math.cos(φ), x0 = Math.atan2(invisible * Math.sin(λ) * cosφ, Math.sin(φ)), y0 = 1 - invisible * Math.cos(λ) * cosφ, x1 = x0, x, y;
- while (++i < n) {
- p = ring[i];
- cosφ = Math.cos(φ = p[1]);
- x = Math.atan2(invisible * Math.sin(λ = p[0]) * cosφ, Math.sin(φ));
- y = 1 - invisible * Math.cos(λ) * cosφ;
- if (Math.abs(y0 - 2) < ε && Math.abs(y - 2) < ε) continue;
- if (Math.abs(y) < ε || Math.abs(y0) < ε) {} else if (Math.abs(Math.abs(x - x0) - π) < ε) {
- if (y + y0 > 2) area += 4 * (x - x0);
- } else if (Math.abs(y0 - 2) < ε) area += 4 * (x - x1); else area += ((3 * π + x - x0) % (2 * π) - π) * (y0 + y);
- x1 = x0, x0 = x, y0 = y;
- }
- return area;
- }
- function d3_geo_clipSort(a, b) {
- return ((a = a.point)[0] < 0 ? a[1] - π / 2 - ε : π / 2 - a[1]) - ((b = b.point)[0] < 0 ? b[1] - π / 2 - ε : π / 2 - b[1]);
- }
- var d3_geo_clipAntimeridian = d3_geo_clip(d3_true, d3_geo_clipAntimeridianLine, d3_geo_clipAntimeridianInterpolate);
- function d3_geo_clipAntimeridianLine(listener) {
- var λ0 = NaN, φ0 = NaN, sλ0 = NaN, clean;
- return {
- lineStart: function() {
- listener.lineStart();
- clean = 1;
- },
- point: function(λ1, φ1) {
- var sλ1 = λ1 > 0 ? π : -π, dλ = Math.abs(λ1 - λ0);
- if (Math.abs(dλ - π) < ε) {
- listener.point(λ0, φ0 = (φ0 + φ1) / 2 > 0 ? π / 2 : -π / 2);
- listener.point(sλ0, φ0);
- listener.lineEnd();
- listener.lineStart();
- listener.point(sλ1, φ0);
- listener.point(λ1, φ0);
- clean = 0;
- } else if (sλ0 !== sλ1 && dλ >= π) {
- if (Math.abs(λ0 - sλ0) < ε) λ0 -= sλ0 * ε;
- if (Math.abs(λ1 - sλ1) < ε) λ1 -= sλ1 * ε;
- φ0 = d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1);
- listener.point(sλ0, φ0);
- listener.lineEnd();
- listener.lineStart();
- listener.point(sλ1, φ0);
- clean = 0;
- }
- listener.point(λ0 = λ1, φ0 = φ1);
- sλ0 = sλ1;
- },
- lineEnd: function() {
- listener.lineEnd();
- λ0 = φ0 = NaN;
- },
- clean: function() {
- return 2 - clean;
- }
- };
- }
- function d3_geo_clipAntimeridianIntersect(λ0, φ0, λ1, φ1) {
- var cosφ0, cosφ1, sinλ0_λ1 = Math.sin(λ0 - λ1);
- return Math.abs(sinλ0_λ1) > ε ? Math.atan((Math.sin(φ0) * (cosφ1 = Math.cos(φ1)) * Math.sin(λ1) - Math.sin(φ1) * (cosφ0 = Math.cos(φ0)) * Math.sin(λ0)) / (cosφ0 * cosφ1 * sinλ0_λ1)) : (φ0 + φ1) / 2;
- }
- function d3_geo_clipAntimeridianInterpolate(from, to, direction, listener) {
- var φ;
- if (from == null) {
- φ = direction * π / 2;
- listener.point(-π, φ);
- listener.point(0, φ);
- listener.point(π, φ);
- listener.point(Ï€, 0);
- listener.point(π, -φ);
- listener.point(0, -φ);
- listener.point(-π, -φ);
- listener.point(-Ï€, 0);
- listener.point(-π, φ);
- } else if (Math.abs(from[0] - to[0]) > ε) {
- var s = (from[0] < to[0] ? 1 : -1) * π;
- φ = direction * s / 2;
- listener.point(-s, φ);
- listener.point(0, φ);
- listener.point(s, φ);
- } else {
- listener.point(to[0], to[1]);
- }
- }
- function d3_geo_clipCircle(radius) {
- var cr = Math.cos(radius), smallRadius = cr > 0, notHemisphere = Math.abs(cr) > ε, interpolate = d3_geo_circleInterpolate(radius, 6 * d3_radians);
- return d3_geo_clip(visible, clipLine, interpolate);
- function visible(λ, φ) {
- return Math.cos(λ) * Math.cos(φ) > cr;
- }
- function clipLine(listener) {
- var point0, c0, v0, v00, clean;
- return {
- lineStart: function() {
- v00 = v0 = false;
- clean = 1;
- },
- point: function(λ, φ) {
- var point1 = [ λ, φ ], point2, v = visible(λ, φ), c = smallRadius ? v ? 0 : code(λ, φ) : v ? code(λ + (λ < 0 ? π : -π), φ) : 0;
- if (!point0 && (v00 = v0 = v)) listener.lineStart();
- if (v !== v0) {
- point2 = intersect(point0, point1);
- if (d3_geo_sphericalEqual(point0, point2) || d3_geo_sphericalEqual(point1, point2)) {
- point1[0] += ε;
- point1[1] += ε;
- v = visible(point1[0], point1[1]);
- }
- }
- if (v !== v0) {
- clean = 0;
- if (v) {
- listener.lineStart();
- point2 = intersect(point1, point0);
- listener.point(point2[0], point2[1]);
- } else {
- point2 = intersect(point0, point1);
- listener.point(point2[0], point2[1]);
- listener.lineEnd();
- }
- point0 = point2;
- } else if (notHemisphere && point0 && smallRadius ^ v) {
- var t;
- if (!(c & c0) && (t = intersect(point1, point0, true))) {
- clean = 0;
- if (smallRadius) {
- listener.lineStart();
- listener.point(t[0][0], t[0][1]);
- listener.point(t[1][0], t[1][1]);
- listener.lineEnd();
- } else {
- listener.point(t[1][0], t[1][1]);
- listener.lineEnd();
- listener.lineStart();
- listener.point(t[0][0], t[0][1]);
- }
- }
- }
- if (v && (!point0 || !d3_geo_sphericalEqual(point0, point1))) {
- listener.point(point1[0], point1[1]);
- }
- point0 = point1, v0 = v, c0 = c;
- },
- lineEnd: function() {
- if (v0) listener.lineEnd();
- point0 = null;
- },
- clean: function() {
- return clean | (v00 && v0) << 1;
- }
- };
- }
- function intersect(a, b, two) {
- var pa = d3_geo_cartesian(a), pb = d3_geo_cartesian(b);
- var n1 = [ 1, 0, 0 ], n2 = d3_geo_cartesianCross(pa, pb), n2n2 = d3_geo_cartesianDot(n2, n2), n1n2 = n2[0], determinant = n2n2 - n1n2 * n1n2;
- if (!determinant) return !two && a;
- var c1 = cr * n2n2 / determinant, c2 = -cr * n1n2 / determinant, n1xn2 = d3_geo_cartesianCross(n1, n2), A = d3_geo_cartesianScale(n1, c1), B = d3_geo_cartesianScale(n2, c2);
- d3_geo_cartesianAdd(A, B);
- var u = n1xn2, w = d3_geo_cartesianDot(A, u), uu = d3_geo_cartesianDot(u, u), t2 = w * w - uu * (d3_geo_cartesianDot(A, A) - 1);
- if (t2 < 0) return;
- var t = Math.sqrt(t2), q = d3_geo_cartesianScale(u, (-w - t) / uu);
- d3_geo_cartesianAdd(q, A);
- q = d3_geo_spherical(q);
- if (!two) return q;
- var λ0 = a[0], λ1 = b[0], φ0 = a[1], φ1 = b[1], z;
- if (λ1 < λ0) z = λ0, λ0 = λ1, λ1 = z;
- var δλ = λ1 - λ0, polar = Math.abs(δλ - π) < ε, meridian = polar || δλ < ε;
- if (!polar && φ1 < φ0) z = φ0, φ0 = φ1, φ1 = z;
- if (meridian ? polar ? φ0 + φ1 > 0 ^ q[1] < (Math.abs(q[0] - λ0) < ε ? φ0 : φ1) : φ0 <= q[1] && q[1] <= φ1 : δλ > π ^ (λ0 <= q[0] && q[0] <= λ1)) {
- var q1 = d3_geo_cartesianScale(u, (-w + t) / uu);
- d3_geo_cartesianAdd(q1, A);
- return [ q, d3_geo_spherical(q1) ];
- }
- }
- function code(λ, φ) {
- var r = smallRadius ? radius : π - radius, code = 0;
- if (λ < -r) code |= 1; else if (λ > r) code |= 2;
- if (φ < -r) code |= 4; else if (φ > r) code |= 8;
- return code;
- }
- }
- var d3_geo_clipViewMAX = 1e9;
- function d3_geo_clipView(x0, y0, x1, y1) {
- return function(listener) {
- var listener_ = listener, bufferListener = d3_geo_clipBufferListener(), segments, polygon, ring;
- var clip = {
- point: point,
- lineStart: lineStart,
- lineEnd: lineEnd,
- polygonStart: function() {
- listener = bufferListener;
- segments = [];
- polygon = [];
- },
- polygonEnd: function() {
- listener = listener_;
- if ((segments = d3.merge(segments)).length) {
- listener.polygonStart();
- d3_geo_clipPolygon(segments, compare, inside, interpolate, listener);
- listener.polygonEnd();
- } else if (insidePolygon([ x0, y0 ])) {
- listener.polygonStart(), listener.lineStart();
- interpolate(null, null, 1, listener);
- listener.lineEnd(), listener.polygonEnd();
- }
- segments = polygon = ring = null;
- }
- };
- function inside(point) {
- var a = corner(point, -1), i = insidePolygon([ a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0 ]);
- return i;
- }
- function insidePolygon(p) {
- var wn = 0, n = polygon.length, y = p[1];
- for (var i = 0; i < n; ++i) {
- for (var j = 1, v = polygon[i], m = v.length, a = v[0]; j < m; ++j) {
- b = v[j];
- if (a[1] <= y) {
- if (b[1] > y && isLeft(a, b, p) > 0) ++wn;
- } else {
- if (b[1] <= y && isLeft(a, b, p) < 0) --wn;
- }
- a = b;
- }
- }
- return wn !== 0;
- }
- function isLeft(a, b, c) {
- return (b[0] - a[0]) * (c[1] - a[1]) - (c[0] - a[0]) * (b[1] - a[1]);
- }
- function interpolate(from, to, direction, listener) {
- var a = 0, a1 = 0;
- if (from == null || (a = corner(from, direction)) !== (a1 = corner(to, direction)) || comparePoints(from, to) < 0 ^ direction > 0) {
- do {
- listener.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0);
- } while ((a = (a + direction + 4) % 4) !== a1);
- } else {
- listener.point(to[0], to[1]);
- }
- }
- function visible(x, y) {
- return x0 <= x && x <= x1 && y0 <= y && y <= y1;
- }
- function point(x, y) {
- if (visible(x, y)) listener.point(x, y);
- }
- var x__, y__, v__, x_, y_, v_, first;
- function lineStart() {
- clip.point = linePoint;
- if (polygon) polygon.push(ring = []);
- first = true;
- v_ = false;
- x_ = y_ = NaN;
- }
- function lineEnd() {
- if (segments) {
- linePoint(x__, y__);
- if (v__ && v_) bufferListener.rejoin();
- segments.push(bufferListener.buffer());
- }
- clip.point = point;
- if (v_) listener.lineEnd();
- }
- function linePoint(x, y) {
- x = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, x));
- y = Math.max(-d3_geo_clipViewMAX, Math.min(d3_geo_clipViewMAX, y));
- var v = visible(x, y);
- if (polygon) ring.push([ x, y ]);
- if (first) {
- x__ = x, y__ = y, v__ = v;
- first = false;
- if (v) {
- listener.lineStart();
- listener.point(x, y);
- }
- } else {
- if (v && v_) listener.point(x, y); else {
- var a = [ x_, y_ ], b = [ x, y ];
- if (clipLine(a, b)) {
- if (!v_) {
- listener.lineStart();
- listener.point(a[0], a[1]);
- }
- listener.point(b[0], b[1]);
- if (!v) listener.lineEnd();
- } else {
- listener.lineStart();
- listener.point(x, y);
- }
- }
- }
- x_ = x, y_ = y, v_ = v;
- }
- return clip;
- };
- function corner(p, direction) {
- return Math.abs(p[0] - x0) < ε ? direction > 0 ? 0 : 3 : Math.abs(p[0] - x1) < ε ? direction > 0 ? 2 : 1 : Math.abs(p[1] - y0) < ε ? direction > 0 ? 1 : 0 : direction > 0 ? 3 : 2;
- }
- function compare(a, b) {
- return comparePoints(a.point, b.point);
- }
- function comparePoints(a, b) {
- var ca = corner(a, 1), cb = corner(b, 1);
- return ca !== cb ? ca - cb : ca === 0 ? b[1] - a[1] : ca === 1 ? a[0] - b[0] : ca === 2 ? a[1] - b[1] : b[0] - a[0];
- }
- function clipLine(a, b) {
- var dx = b[0] - a[0], dy = b[1] - a[1], t = [ 0, 1 ];
- if (Math.abs(dx) < ε && Math.abs(dy) < ε) return x0 <= a[0] && a[0] <= x1 && y0 <= a[1] && a[1] <= y1;
- if (d3_geo_clipViewT(x0 - a[0], dx, t) && d3_geo_clipViewT(a[0] - x1, -dx, t) && d3_geo_clipViewT(y0 - a[1], dy, t) && d3_geo_clipViewT(a[1] - y1, -dy, t)) {
- if (t[1] < 1) {
- b[0] = a[0] + t[1] * dx;
- b[1] = a[1] + t[1] * dy;
- }
- if (t[0] > 0) {
- a[0] += t[0] * dx;
- a[1] += t[0] * dy;
- }
- return true;
- }
- return false;
- }
- }
- function d3_geo_clipViewT(num, denominator, t) {
- if (Math.abs(denominator) < ε) return num <= 0;
- var u = num / denominator;
- if (denominator > 0) {
- if (u > t[1]) return false;
- if (u > t[0]) t[0] = u;
- } else {
- if (u < t[0]) return false;
- if (u < t[1]) t[1] = u;
- }
- return true;
- }
- function d3_geo_compose(a, b) {
- function compose(x, y) {
- return x = a(x, y), b(x[0], x[1]);
- }
- if (a.invert && b.invert) compose.invert = function(x, y) {
- return x = b.invert(x, y), x && a.invert(x[0], x[1]);
- };
- return compose;
- }
- function d3_geo_resample(project) {
- var δ2 = .5, maxDepth = 16;
- function resample(stream) {
- var λ0, x0, y0, a0, b0, c0;
- var resample = {
- point: point,
- lineStart: lineStart,
- lineEnd: lineEnd,
- polygonStart: function() {
- stream.polygonStart();
- resample.lineStart = polygonLineStart;
- },
- polygonEnd: function() {
- stream.polygonEnd();
- resample.lineStart = lineStart;
- }
- };
- function point(x, y) {
- x = project(x, y);
- stream.point(x[0], x[1]);
- }
- function lineStart() {
- x0 = NaN;
- resample.point = linePoint;
- stream.lineStart();
- }
- function linePoint(λ, φ) {
- var c = d3_geo_cartesian([ λ, φ ]), p = project(λ, φ);
- resampleLineTo(x0, y0, λ0, a0, b0, c0, x0 = p[0], y0 = p[1], λ0 = λ, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream);
- stream.point(x0, y0);
- }
- function lineEnd() {
- resample.point = point;
- stream.lineEnd();
- }
- function polygonLineStart() {
- var λ00, φ00, x00, y00, a00, b00, c00;
- lineStart();
- resample.point = function(λ, φ) {
- linePoint(λ00 = λ, φ00 = φ), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0;
- resample.point = linePoint;
- };
- resample.lineEnd = function() {
- resampleLineTo(x0, y0, λ0, a0, b0, c0, x00, y00, λ00, a00, b00, c00, maxDepth, stream);
- resample.lineEnd = lineEnd;
- lineEnd();
- };
- }
- return resample;
- }
- function resampleLineTo(x0, y0, λ0, a0, b0, c0, x1, y1, λ1, a1, b1, c1, depth, stream) {
- var dx = x1 - x0, dy = y1 - y0, d2 = dx * dx + dy * dy;
- if (d2 > 4 * δ2 && depth--) {
- var a = a0 + a1, b = b0 + b1, c = c0 + c1, m = Math.sqrt(a * a + b * b + c * c), φ2 = Math.asin(c /= m), λ2 = Math.abs(Math.abs(c) - 1) < ε ? (λ0 + λ1) / 2 : Math.atan2(b, a), p = project(λ2, φ2), x2 = p[0], y2 = p[1], dx2 = x2 - x0, dy2 = y2 - y0, dz = dy * dx2 - dx * dy2;
- if (dz * dz / d2 > δ2 || Math.abs((dx * dx2 + dy * dy2) / d2 - .5) > .3) {
- resampleLineTo(x0, y0, λ0, a0, b0, c0, x2, y2, λ2, a /= m, b /= m, c, depth, stream);
- stream.point(x2, y2);
- resampleLineTo(x2, y2, λ2, a, b, c, x1, y1, λ1, a1, b1, c1, depth, stream);
- }
- }
- }
- resample.precision = function(_) {
- if (!arguments.length) return Math.sqrt(δ2);
- maxDepth = (δ2 = _ * _) > 0 && 16;
- return resample;
- };
- return resample;
- }
- d3.geo.projection = d3_geo_projection;
- d3.geo.projectionMutator = d3_geo_projectionMutator;
- function d3_geo_projection(project) {
- return d3_geo_projectionMutator(function() {
- return project;
- })();
- }
- function d3_geo_projectionMutator(projectAt) {
- var project, rotate, projectRotate, projectResample = d3_geo_resample(function(x, y) {
- x = project(x, y);
- return [ x[0] * k + δx, δy - x[1] * k ];
- }), k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, preclip = d3_geo_clipAntimeridian, postclip = d3_identity, clipAngle = null, clipExtent = null;
- function projection(point) {
- point = projectRotate(point[0] * d3_radians, point[1] * d3_radians);
- return [ point[0] * k + δx, δy - point[1] * k ];
- }
- function invert(point) {
- point = projectRotate.invert((point[0] - δx) / k, (δy - point[1]) / k);
- return point && [ point[0] * d3_degrees, point[1] * d3_degrees ];
- }
- projection.stream = function(stream) {
- return d3_geo_projectionRadiansRotate(rotate, preclip(projectResample(postclip(stream))));
- };
- projection.clipAngle = function(_) {
- if (!arguments.length) return clipAngle;
- preclip = _ == null ? (clipAngle = _, d3_geo_clipAntimeridian) : d3_geo_clipCircle((clipAngle = +_) * d3_radians);
- return projection;
- };
- projection.clipExtent = function(_) {
- if (!arguments.length) return clipExtent;
- clipExtent = _;
- postclip = _ == null ? d3_identity : d3_geo_clipView(_[0][0], _[0][1], _[1][0], _[1][1]);
- return projection;
- };
- projection.scale = function(_) {
- if (!arguments.length) return k;
- k = +_;
- return reset();
- };
- projection.translate = function(_) {
- if (!arguments.length) return [ x, y ];
- x = +_[0];
- y = +_[1];
- return reset();
- };
- projection.center = function(_) {
- if (!arguments.length) return [ λ * d3_degrees, φ * d3_degrees ];
- λ = _[0] % 360 * d3_radians;
- φ = _[1] % 360 * d3_radians;
- return reset();
- };
- projection.rotate = function(_) {
- if (!arguments.length) return [ δλ * d3_degrees, δφ * d3_degrees, δγ * d3_degrees ];
- δλ = _[0] % 360 * d3_radians;
- δφ = _[1] % 360 * d3_radians;
- δγ = _.length > 2 ? _[2] % 360 * d3_radians : 0;
- return reset();
- };
- d3.rebind(projection, projectResample, "precision");
- function reset() {
- projectRotate = d3_geo_compose(rotate = d3_geo_rotation(δλ, δφ, δγ), project);
- var center = project(λ, φ);
- δx = x - center[0] * k;
- δy = y + center[1] * k;
- return projection;
- }
- return function() {
- project = projectAt.apply(this, arguments);
- projection.invert = project.invert && invert;
- return reset();
- };
- }
- function d3_geo_projectionRadiansRotate(rotate, stream) {
- return {
- point: function(x, y) {
- y = rotate(x * d3_radians, y * d3_radians), x = y[0];
- stream.point(x > π ? x - 2 * π : x < -π ? x + 2 * π : x, y[1]);
- },
- sphere: function() {
- stream.sphere();
- },
- lineStart: function() {
- stream.lineStart();
- },
- lineEnd: function() {
- stream.lineEnd();
- },
- polygonStart: function() {
- stream.polygonStart();
- },
- polygonEnd: function() {
- stream.polygonEnd();
- }
- };
- }
- function d3_geo_equirectangular(λ, φ) {
- return [ λ, φ ];
- }
- (d3.geo.equirectangular = function() {
- return d3_geo_projection(d3_geo_equirectangular);
- }).raw = d3_geo_equirectangular.invert = d3_geo_equirectangular;
- d3.geo.rotation = function(rotate) {
- rotate = d3_geo_rotation(rotate[0] % 360 * d3_radians, rotate[1] * d3_radians, rotate.length > 2 ? rotate[2] * d3_radians : 0);
- function forward(coordinates) {
- coordinates = rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
- return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;
- }
- forward.invert = function(coordinates) {
- coordinates = rotate.invert(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
- return coordinates[0] *= d3_degrees, coordinates[1] *= d3_degrees, coordinates;
- };
- return forward;
- };
- function d3_geo_rotation(δλ, δφ, δγ) {
- return δλ ? δφ || δγ ? d3_geo_compose(d3_geo_rotationλ(δλ), d3_geo_rotationφγ(δφ, δγ)) : d3_geo_rotationλ(δλ) : δφ || δγ ? d3_geo_rotationφγ(δφ, δγ) : d3_geo_equirectangular;
- }
- function d3_geo_forwardRotationλ(δλ) {
- return function(λ, φ) {
- return λ += δλ, [ λ > π ? λ - 2 * π : λ < -π ? λ + 2 * π : λ, φ ];
- };
- }
- function d3_geo_rotationλ(δλ) {
- var rotation = d3_geo_forwardRotationλ(δλ);
- rotation.invert = d3_geo_forwardRotationλ(-δλ);
- return rotation;
- }
- function d3_geo_rotationφγ(δφ, δγ) {
- var cosδφ = Math.cos(δφ), sinδφ = Math.sin(δφ), cosδγ = Math.cos(δγ), sinδγ = Math.sin(δγ);
- function rotation(λ, φ) {
- var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδφ + x * sinδφ;
- return [ Math.atan2(y * cosδγ - k * sinδγ, x * cosδφ - z * sinδφ), Math.asin(Math.max(-1, Math.min(1, k * cosδγ + y * sinδγ))) ];
- }
- rotation.invert = function(λ, φ) {
- var cosφ = Math.cos(φ), x = Math.cos(λ) * cosφ, y = Math.sin(λ) * cosφ, z = Math.sin(φ), k = z * cosδγ - y * sinδγ;
- return [ Math.atan2(y * cosδγ + z * sinδγ, x * cosδφ + k * sinδφ), Math.asin(Math.max(-1, Math.min(1, k * cosδφ - x * sinδφ))) ];
- };
- return rotation;
- }
- d3.geo.circle = function() {
- var origin = [ 0, 0 ], angle, precision = 6, interpolate;
- function circle() {
- var center = typeof origin === "function" ? origin.apply(this, arguments) : origin, rotate = d3_geo_rotation(-center[0] * d3_radians, -center[1] * d3_radians, 0).invert, ring = [];
- interpolate(null, null, 1, {
- point: function(x, y) {
- ring.push(x = rotate(x, y));
- x[0] *= d3_degrees, x[1] *= d3_degrees;
- }
- });
- return {
- type: "Polygon",
- coordinates: [ ring ]
- };
- }
- circle.origin = function(x) {
- if (!arguments.length) return origin;
- origin = x;
- return circle;
- };
- circle.angle = function(x) {
- if (!arguments.length) return angle;
- interpolate = d3_geo_circleInterpolate((angle = +x) * d3_radians, precision * d3_radians);
- return circle;
- };
- circle.precision = function(_) {
- if (!arguments.length) return precision;
- interpolate = d3_geo_circleInterpolate(angle * d3_radians, (precision = +_) * d3_radians);
- return circle;
- };
- return circle.angle(90);
- };
- function d3_geo_circleInterpolate(radius, precision) {
- var cr = Math.cos(radius), sr = Math.sin(radius);
- return function(from, to, direction, listener) {
- if (from != null) {
- from = d3_geo_circleAngle(cr, from);
- to = d3_geo_circleAngle(cr, to);
- if (direction > 0 ? from < to : from > to) from += direction * 2 * π;
- } else {
- from = radius + direction * 2 * π;
- to = radius;
- }
- var point;
- for (var step = direction * precision, t = from; direction > 0 ? t > to : t < to; t -= step) {
- listener.point((point = d3_geo_spherical([ cr, -sr * Math.cos(t), -sr * Math.sin(t) ]))[0], point[1]);
- }
- };
- }
- function d3_geo_circleAngle(cr, point) {
- var a = d3_geo_cartesian(point);
- a[0] -= cr;
- d3_geo_cartesianNormalize(a);
- var angle = d3_acos(-a[1]);
- return ((-a[2] < 0 ? -angle : angle) + 2 * Math.PI - ε) % (2 * Math.PI);
- }
- d3.geo.distance = function(a, b) {
- var Δλ = (b[0] - a[0]) * d3_radians, φ0 = a[1] * d3_radians, φ1 = b[1] * d3_radians, sinΔλ = Math.sin(Δλ), cosΔλ = Math.cos(Δλ), sinφ0 = Math.sin(φ0), cosφ0 = Math.cos(φ0), sinφ1 = Math.sin(φ1), cosφ1 = Math.cos(φ1), t;
- return Math.atan2(Math.sqrt((t = cosφ1 * sinΔλ) * t + (t = cosφ0 * sinφ1 - sinφ0 * cosφ1 * cosΔλ) * t), sinφ0 * sinφ1 + cosφ0 * cosφ1 * cosΔλ);
- };
- d3.geo.graticule = function() {
- var x1, x0, X1, X0, y1, y0, Y1, Y0, dx = 10, dy = dx, DX = 90, DY = 360, x, y, X, Y, precision = 2.5;
- function graticule() {
- return {
- type: "MultiLineString",
- coordinates: lines()
- };
- }
- function lines() {
- return d3.range(Math.ceil(X0 / DX) * DX, X1, DX).map(X).concat(d3.range(Math.ceil(Y0 / DY) * DY, Y1, DY).map(Y)).concat(d3.range(Math.ceil(x0 / dx) * dx, x1, dx).filter(function(x) {
- return Math.abs(x % DX) > ε;
- }).map(x)).concat(d3.range(Math.ceil(y0 / dy) * dy, y1, dy).filter(function(y) {
- return Math.abs(y % DY) > ε;
- }).map(y));
- }
- graticule.lines = function() {
- return lines().map(function(coordinates) {
- return {
- type: "LineString",
- coordinates: coordinates
- };
- });
- };
- graticule.outline = function() {
- return {
- type: "Polygon",
- coordinates: [ X(X0).concat(Y(Y1).slice(1), X(X1).reverse().slice(1), Y(Y0).reverse().slice(1)) ]
- };
- };
- graticule.extent = function(_) {
- if (!arguments.length) return graticule.minorExtent();
- return graticule.majorExtent(_).minorExtent(_);
- };
- graticule.majorExtent = function(_) {
- if (!arguments.length) return [ [ X0, Y0 ], [ X1, Y1 ] ];
- X0 = +_[0][0], X1 = +_[1][0];
- Y0 = +_[0][1], Y1 = +_[1][1];
- if (X0 > X1) _ = X0, X0 = X1, X1 = _;
- if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _;
- return graticule.precision(precision);
- };
- graticule.minorExtent = function(_) {
- if (!arguments.length) return [ [ x0, y0 ], [ x1, y1 ] ];
- x0 = +_[0][0], x1 = +_[1][0];
- y0 = +_[0][1], y1 = +_[1][1];
- if (x0 > x1) _ = x0, x0 = x1, x1 = _;
- if (y0 > y1) _ = y0, y0 = y1, y1 = _;
- return graticule.precision(precision);
- };
- graticule.step = function(_) {
- if (!arguments.length) return graticule.minorStep();
- return graticule.majorStep(_).minorStep(_);
- };
- graticule.majorStep = function(_) {
- if (!arguments.length) return [ DX, DY ];
- DX = +_[0], DY = +_[1];
- return graticule;
- };
- graticule.minorStep = function(_) {
- if (!arguments.length) return [ dx, dy ];
- dx = +_[0], dy = +_[1];
- return graticule;
- };
- graticule.precision = function(_) {
- if (!arguments.length) return precision;
- precision = +_;
- x = d3_geo_graticuleX(y0, y1, 90);
- y = d3_geo_graticuleY(x0, x1, precision);
- X = d3_geo_graticuleX(Y0, Y1, 90);
- Y = d3_geo_graticuleY(X0, X1, precision);
- return graticule;
- };
- return graticule.majorExtent([ [ -180, -90 + ε ], [ 180, 90 - ε ] ]).minorExtent([ [ -180, -80 - ε ], [ 180, 80 + ε ] ]);
- };
- function d3_geo_graticuleX(y0, y1, dy) {
- var y = d3.range(y0, y1 - ε, dy).concat(y1);
- return function(x) {
- return y.map(function(y) {
- return [ x, y ];
- });
- };
- }
- function d3_geo_graticuleY(x0, x1, dx) {
- var x = d3.range(x0, x1 - ε, dx).concat(x1);
- return function(y) {
- return x.map(function(x) {
- return [ x, y ];
- });
- };
- }
- function d3_source(d) {
- return d.source;
- }
- function d3_target(d) {
- return d.target;
- }
- d3.geo.greatArc = function() {
- var source = d3_source, source_, target = d3_target, target_;
- function greatArc() {
- return {
- type: "LineString",
- coordinates: [ source_ || source.apply(this, arguments), target_ || target.apply(this, arguments) ]
- };
- }
- greatArc.distance = function() {
- return d3.geo.distance(source_ || source.apply(this, arguments), target_ || target.apply(this, arguments));
- };
- greatArc.source = function(_) {
- if (!arguments.length) return source;
- source = _, source_ = typeof _ === "function" ? null : _;
- return greatArc;
- };
- greatArc.target = function(_) {
- if (!arguments.length) return target;
- target = _, target_ = typeof _ === "function" ? null : _;
- return greatArc;
- };
- greatArc.precision = function() {
- return arguments.length ? greatArc : 0;
- };
- return greatArc;
- };
- d3.geo.interpolate = function(source, target) {
- return d3_geo_interpolate(source[0] * d3_radians, source[1] * d3_radians, target[0] * d3_radians, target[1] * d3_radians);
- };
- function d3_geo_interpolate(x0, y0, x1, y1) {
- var cy0 = Math.cos(y0), sy0 = Math.sin(y0), cy1 = Math.cos(y1), sy1 = Math.sin(y1), kx0 = cy0 * Math.cos(x0), ky0 = cy0 * Math.sin(x0), kx1 = cy1 * Math.cos(x1), ky1 = cy1 * Math.sin(x1), d = 2 * Math.asin(Math.sqrt(d3_haversin(y1 - y0) + cy0 * cy1 * d3_haversin(x1 - x0))), k = 1 / Math.sin(d);
- var interpolate = d ? function(t) {
- var B = Math.sin(t *= d) * k, A = Math.sin(d - t) * k, x = A * kx0 + B * kx1, y = A * ky0 + B * ky1, z = A * sy0 + B * sy1;
- return [ Math.atan2(y, x) * d3_degrees, Math.atan2(z, Math.sqrt(x * x + y * y)) * d3_degrees ];
- } : function() {
- return [ x0 * d3_degrees, y0 * d3_degrees ];
- };
- interpolate.distance = d;
- return interpolate;
- }
- d3.geo.length = function(object) {
- d3_geo_lengthSum = 0;
- d3.geo.stream(object, d3_geo_length);
- return d3_geo_lengthSum;
- };
- var d3_geo_lengthSum;
- var d3_geo_length = {
- sphere: d3_noop,
- point: d3_noop,
- lineStart: d3_geo_lengthLineStart,
- lineEnd: d3_noop,
- polygonStart: d3_noop,
- polygonEnd: d3_noop
- };
- function d3_geo_lengthLineStart() {
- var λ0, sinφ0, cosφ0;
- d3_geo_length.point = function(λ, φ) {
- λ0 = λ * d3_radians, sinφ0 = Math.sin(φ *= d3_radians), cosφ0 = Math.cos(φ);
- d3_geo_length.point = nextPoint;
- };
- d3_geo_length.lineEnd = function() {
- d3_geo_length.point = d3_geo_length.lineEnd = d3_noop;
- };
- function nextPoint(λ, φ) {
- var sinφ = Math.sin(φ *= d3_radians), cosφ = Math.cos(φ), t = Math.abs((λ *= d3_radians) - λ0), cosΔλ = Math.cos(t);
- d3_geo_lengthSum += Math.atan2(Math.sqrt((t = cosφ * Math.sin(t)) * t + (t = cosφ0 * sinφ - sinφ0 * cosφ * cosΔλ) * t), sinφ0 * sinφ + cosφ0 * cosφ * cosΔλ);
- λ0 = λ, sinφ0 = sinφ, cosφ0 = cosφ;
- }
- }
- function d3_geo_conic(projectAt) {
- var φ0 = 0, φ1 = π / 3, m = d3_geo_projectionMutator(projectAt), p = m(φ0, φ1);
- p.parallels = function(_) {
- if (!arguments.length) return [ φ0 / π * 180, φ1 / π * 180 ];
- return m(φ0 = _[0] * π / 180, φ1 = _[1] * π / 180);
- };
- return p;
- }
- function d3_geo_conicEqualArea(φ0, φ1) {
- var sinφ0 = Math.sin(φ0), n = (sinφ0 + Math.sin(φ1)) / 2, C = 1 + sinφ0 * (2 * n - sinφ0), Ï0 = Math.sqrt(C) / n;
- function forward(λ, φ) {
- var Ï = Math.sqrt(C - 2 * n * Math.sin(φ)) / n;
- return [ Ï * Math.sin(λ *= n), Ï0 - Ï * Math.cos(λ) ];
- }
- forward.invert = function(x, y) {
- var Ï0_y = Ï0 - y;
- return [ Math.atan2(x, Ï0_y) / n, Math.asin((C - (x * x + Ï0_y * Ï0_y) * n * n) / (2 * n)) ];
- };
- return forward;
- }
- (d3.geo.conicEqualArea = function() {
- return d3_geo_conic(d3_geo_conicEqualArea);
- }).raw = d3_geo_conicEqualArea;
- d3.geo.albersUsa = function() {
- var lower48 = d3.geo.conicEqualArea().rotate([ 98, 0 ]).center([ 0, 38 ]).parallels([ 29.5, 45.5 ]);
- var alaska = d3.geo.conicEqualArea().rotate([ 160, 0 ]).center([ 0, 60 ]).parallels([ 55, 65 ]);
- var hawaii = d3.geo.conicEqualArea().rotate([ 160, 0 ]).center([ 0, 20 ]).parallels([ 8, 18 ]);
- var puertoRico = d3.geo.conicEqualArea().rotate([ 60, 0 ]).center([ 0, 10 ]).parallels([ 8, 18 ]);
- var alaskaInvert, hawaiiInvert, puertoRicoInvert;
- function albersUsa(coordinates) {
- return projection(coordinates)(coordinates);
- }
- function projection(point) {
- var lon = point[0], lat = point[1];
- return lat > 50 ? alaska : lon < -140 ? hawaii : lat < 21 ? puertoRico : lower48;
- }
- albersUsa.invert = function(coordinates) {
- return alaskaInvert(coordinates) || hawaiiInvert(coordinates) || puertoRicoInvert(coordinates) || lower48.invert(coordinates);
- };
- albersUsa.scale = function(x) {
- if (!arguments.length) return lower48.scale();
- lower48.scale(x);
- alaska.scale(x * .6);
- hawaii.scale(x);
- puertoRico.scale(x * 1.5);
- return albersUsa.translate(lower48.translate());
- };
- albersUsa.translate = function(x) {
- if (!arguments.length) return lower48.translate();
- var dz = lower48.scale(), dx = x[0], dy = x[1];
- lower48.translate(x);
- alaska.translate([ dx - .4 * dz, dy + .17 * dz ]);
- hawaii.translate([ dx - .19 * dz, dy + .2 * dz ]);
- puertoRico.translate([ dx + .58 * dz, dy + .43 * dz ]);
- alaskaInvert = d3_geo_albersUsaInvert(alaska, [ [ -180, 50 ], [ -130, 72 ] ]);
- hawaiiInvert = d3_geo_albersUsaInvert(hawaii, [ [ -164, 18 ], [ -154, 24 ] ]);
- puertoRicoInvert = d3_geo_albersUsaInvert(puertoRico, [ [ -67.5, 17.5 ], [ -65, 19 ] ]);
- return albersUsa;
- };
- return albersUsa.scale(1e3);
- };
- function d3_geo_albersUsaInvert(projection, extent) {
- var a = projection(extent[0]), b = projection([ .5 * (extent[0][0] + extent[1][0]), extent[0][1] ]), c = projection([ extent[1][0], extent[0][1] ]), d = projection(extent[1]);
- var dya = b[1] - a[1], dxa = b[0] - a[0], dyb = c[1] - b[1], dxb = c[0] - b[0];
- var ma = dya / dxa, mb = dyb / dxb;
- var cx = .5 * (ma * mb * (a[1] - c[1]) + mb * (a[0] + b[0]) - ma * (b[0] + c[0])) / (mb - ma), cy = (.5 * (a[0] + b[0]) - cx) / ma + .5 * (a[1] + b[1]);
- var dx0 = d[0] - cx, dy0 = d[1] - cy, dx1 = a[0] - cx, dy1 = a[1] - cy, r0 = dx0 * dx0 + dy0 * dy0, r1 = dx1 * dx1 + dy1 * dy1;
- var a0 = Math.atan2(dy0, dx0), a1 = Math.atan2(dy1, dx1);
- return function(coordinates) {
- var dx = coordinates[0] - cx, dy = coordinates[1] - cy, r = dx * dx + dy * dy, a = Math.atan2(dy, dx);
- if (r0 < r && r < r1 && a0 < a && a < a1) return projection.invert(coordinates);
- };
- }
- var d3_geo_pathAreaSum, d3_geo_pathAreaPolygon, d3_geo_pathArea = {
- point: d3_noop,
- lineStart: d3_noop,
- lineEnd: d3_noop,
- polygonStart: function() {
- d3_geo_pathAreaPolygon = 0;
- d3_geo_pathArea.lineStart = d3_geo_pathAreaRingStart;
- },
- polygonEnd: function() {
- d3_geo_pathArea.lineStart = d3_geo_pathArea.lineEnd = d3_geo_pathArea.point = d3_noop;
- d3_geo_pathAreaSum += Math.abs(d3_geo_pathAreaPolygon / 2);
- }
- };
- function d3_geo_pathAreaRingStart() {
- var x00, y00, x0, y0;
- d3_geo_pathArea.point = function(x, y) {
- d3_geo_pathArea.point = nextPoint;
- x00 = x0 = x, y00 = y0 = y;
- };
- function nextPoint(x, y) {
- d3_geo_pathAreaPolygon += y0 * x - x0 * y;
- x0 = x, y0 = y;
- }
- d3_geo_pathArea.lineEnd = function() {
- nextPoint(x00, y00);
- };
- }
- function d3_geo_pathBuffer() {
- var pointCircle = d3_geo_pathCircle(4.5), buffer = [];
- var stream = {
- point: point,
- lineStart: function() {
- stream.point = pointLineStart;
- },
- lineEnd: lineEnd,
- polygonStart: function() {
- stream.lineEnd = lineEndPolygon;
- },
- polygonEnd: function() {
- stream.lineEnd = lineEnd;
- stream.point = point;
- },
- pointRadius: function(_) {
- pointCircle = d3_geo_pathCircle(_);
- return stream;
- },
- result: function() {
- if (buffer.length) {
- var result = buffer.join("");
- buffer = [];
- return result;
- }
- }
- };
- function point(x, y) {
- buffer.push("M", x, ",", y, pointCircle);
- }
- function pointLineStart(x, y) {
- buffer.push("M", x, ",", y);
- stream.point = pointLine;
- }
- function pointLine(x, y) {
- buffer.push("L", x, ",", y);
- }
- function lineEnd() {
- stream.point = point;
- }
- function lineEndPolygon() {
- buffer.push("Z");
- }
- return stream;
- }
- var d3_geo_pathCentroid = {
- point: d3_geo_pathCentroidPoint,
- lineStart: d3_geo_pathCentroidLineStart,
- lineEnd: d3_geo_pathCentroidLineEnd,
- polygonStart: function() {
- d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidRingStart;
- },
- polygonEnd: function() {
- d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
- d3_geo_pathCentroid.lineStart = d3_geo_pathCentroidLineStart;
- d3_geo_pathCentroid.lineEnd = d3_geo_pathCentroidLineEnd;
- }
- };
- function d3_geo_pathCentroidPoint(x, y) {
- if (d3_geo_centroidDimension) return;
- d3_geo_centroidX += x;
- d3_geo_centroidY += y;
- ++d3_geo_centroidZ;
- }
- function d3_geo_pathCentroidLineStart() {
- var x0, y0;
- if (d3_geo_centroidDimension !== 1) {
- if (d3_geo_centroidDimension < 1) {
- d3_geo_centroidDimension = 1;
- d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- } else return;
- }
- d3_geo_pathCentroid.point = function(x, y) {
- d3_geo_pathCentroid.point = nextPoint;
- x0 = x, y0 = y;
- };
- function nextPoint(x, y) {
- var dx = x - x0, dy = y - y0, z = Math.sqrt(dx * dx + dy * dy);
- d3_geo_centroidX += z * (x0 + x) / 2;
- d3_geo_centroidY += z * (y0 + y) / 2;
- d3_geo_centroidZ += z;
- x0 = x, y0 = y;
- }
- }
- function d3_geo_pathCentroidLineEnd() {
- d3_geo_pathCentroid.point = d3_geo_pathCentroidPoint;
- }
- function d3_geo_pathCentroidRingStart() {
- var x00, y00, x0, y0;
- if (d3_geo_centroidDimension < 2) {
- d3_geo_centroidDimension = 2;
- d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- }
- d3_geo_pathCentroid.point = function(x, y) {
- d3_geo_pathCentroid.point = nextPoint;
- x00 = x0 = x, y00 = y0 = y;
- };
- function nextPoint(x, y) {
- var z = y0 * x - x0 * y;
- d3_geo_centroidX += z * (x0 + x);
- d3_geo_centroidY += z * (y0 + y);
- d3_geo_centroidZ += z * 3;
- x0 = x, y0 = y;
- }
- d3_geo_pathCentroid.lineEnd = function() {
- nextPoint(x00, y00);
- };
- }
- function d3_geo_pathContext(context) {
- var pointRadius = 4.5;
- var stream = {
- point: point,
- lineStart: function() {
- stream.point = pointLineStart;
- },
- lineEnd: lineEnd,
- polygonStart: function() {
- stream.lineEnd = lineEndPolygon;
- },
- polygonEnd: function() {
- stream.lineEnd = lineEnd;
- stream.point = point;
- },
- pointRadius: function(_) {
- pointRadius = _;
- return stream;
- },
- result: d3_noop
- };
- function point(x, y) {
- context.moveTo(x, y);
- context.arc(x, y, pointRadius, 0, 2 * π);
- }
- function pointLineStart(x, y) {
- context.moveTo(x, y);
- stream.point = pointLine;
- }
- function pointLine(x, y) {
- context.lineTo(x, y);
- }
- function lineEnd() {
- stream.point = point;
- }
- function lineEndPolygon() {
- context.closePath();
- }
- return stream;
- }
- d3.geo.path = function() {
- var pointRadius = 4.5, projection, context, projectStream, contextStream;
- function path(object) {
- if (object) d3.geo.stream(object, projectStream(contextStream.pointRadius(typeof pointRadius === "function" ? +pointRadius.apply(this, arguments) : pointRadius)));
- return contextStream.result();
- }
- path.area = function(object) {
- d3_geo_pathAreaSum = 0;
- d3.geo.stream(object, projectStream(d3_geo_pathArea));
- return d3_geo_pathAreaSum;
- };
- path.centroid = function(object) {
- d3_geo_centroidDimension = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0;
- d3.geo.stream(object, projectStream(d3_geo_pathCentroid));
- return d3_geo_centroidZ ? [ d3_geo_centroidX / d3_geo_centroidZ, d3_geo_centroidY / d3_geo_centroidZ ] : undefined;
- };
- path.bounds = function(object) {
- return d3_geo_bounds(projectStream)(object);
- };
- path.projection = function(_) {
- if (!arguments.length) return projection;
- projectStream = (projection = _) ? _.stream || d3_geo_pathProjectStream(_) : d3_identity;
- return path;
- };
- path.context = function(_) {
- if (!arguments.length) return context;
- contextStream = (context = _) == null ? new d3_geo_pathBuffer() : new d3_geo_pathContext(_);
- return path;
- };
- path.pointRadius = function(_) {
- if (!arguments.length) return pointRadius;
- pointRadius = typeof _ === "function" ? _ : +_;
- return path;
- };
- return path.projection(d3.geo.albersUsa()).context(null);
- };
- function d3_geo_pathCircle(radius) {
- return "m0," + radius + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius + "a" + radius + "," + radius + " 0 1,1 0," + +2 * radius + "z";
- }
- function d3_geo_pathProjectStream(project) {
- var resample = d3_geo_resample(function(λ, φ) {
- return project([ λ * d3_degrees, φ * d3_degrees ]);
- });
- return function(stream) {
- stream = resample(stream);
- return {
- point: function(λ, φ) {
- stream.point(λ * d3_radians, φ * d3_radians);
- },
- sphere: function() {
- stream.sphere();
- },
- lineStart: function() {
- stream.lineStart();
- },
- lineEnd: function() {
- stream.lineEnd();
- },
- polygonStart: function() {
- stream.polygonStart();
- },
- polygonEnd: function() {
- stream.polygonEnd();
- }
- };
- };
- }
- d3.geo.albers = function() {
- return d3.geo.conicEqualArea().parallels([ 29.5, 45.5 ]).rotate([ 98, 0 ]).center([ 0, 38 ]).scale(1e3);
- };
- function d3_geo_azimuthal(scale, angle) {
- function azimuthal(λ, φ) {
- var cosλ = Math.cos(λ), cosφ = Math.cos(φ), k = scale(cosλ * cosφ);
- return [ k * cosφ * Math.sin(λ), k * Math.sin(φ) ];
- }
- azimuthal.invert = function(x, y) {
- var Ï = Math.sqrt(x * x + y * y), c = angle(Ï), sinc = Math.sin(c), cosc = Math.cos(c);
- return [ Math.atan2(x * sinc, Ï * cosc), Math.asin(Ï && y * sinc / Ï) ];
- };
- return azimuthal;
- }
- var d3_geo_azimuthalEqualArea = d3_geo_azimuthal(function(cosλcosφ) {
- return Math.sqrt(2 / (1 + cosλcosφ));
- }, function(Ï) {
- return 2 * Math.asin(Ï / 2);
- });
- (d3.geo.azimuthalEqualArea = function() {
- return d3_geo_projection(d3_geo_azimuthalEqualArea);
- }).raw = d3_geo_azimuthalEqualArea;
- var d3_geo_azimuthalEquidistant = d3_geo_azimuthal(function(cosλcosφ) {
- var c = Math.acos(cosλcosφ);
- return c && c / Math.sin(c);
- }, d3_identity);
- (d3.geo.azimuthalEquidistant = function() {
- return d3_geo_projection(d3_geo_azimuthalEquidistant);
- }).raw = d3_geo_azimuthalEquidistant;
- function d3_geo_conicConformal(φ0, φ1) {
- var cosφ0 = Math.cos(φ0), t = function(φ) {
- return Math.tan(π / 4 + φ / 2);
- }, n = φ0 === φ1 ? Math.sin(φ0) : Math.log(cosφ0 / Math.cos(φ1)) / Math.log(t(φ1) / t(φ0)), F = cosφ0 * Math.pow(t(φ0), n) / n;
- if (!n) return d3_geo_mercator;
- function forward(λ, φ) {
- var Ï = Math.abs(Math.abs(φ) - Ï€ / 2) < ε ? 0 : F / Math.pow(t(φ), n);
- return [ Ï * Math.sin(n * λ), F - Ï * Math.cos(n * λ) ];
- }
- forward.invert = function(x, y) {
- var Ï0_y = F - y, Ï = d3_sgn(n) * Math.sqrt(x * x + Ï0_y * Ï0_y);
- return [ Math.atan2(x, Ï0_y) / n, 2 * Math.atan(Math.pow(F / Ï, 1 / n)) - Ï€ / 2 ];
- };
- return forward;
- }
- (d3.geo.conicConformal = function() {
- return d3_geo_conic(d3_geo_conicConformal);
- }).raw = d3_geo_conicConformal;
- function d3_geo_conicEquidistant(φ0, φ1) {
- var cosφ0 = Math.cos(φ0), n = φ0 === φ1 ? Math.sin(φ0) : (cosφ0 - Math.cos(φ1)) / (φ1 - φ0), G = cosφ0 / n + φ0;
- if (Math.abs(n) < ε) return d3_geo_equirectangular;
- function forward(λ, φ) {
- var Ï = G - φ;
- return [ Ï * Math.sin(n * λ), G - Ï * Math.cos(n * λ) ];
- }
- forward.invert = function(x, y) {
- var Ï0_y = G - y;
- return [ Math.atan2(x, Ï0_y) / n, G - d3_sgn(n) * Math.sqrt(x * x + Ï0_y * Ï0_y) ];
- };
- return forward;
- }
- (d3.geo.conicEquidistant = function() {
- return d3_geo_conic(d3_geo_conicEquidistant);
- }).raw = d3_geo_conicEquidistant;
- var d3_geo_gnomonic = d3_geo_azimuthal(function(cosλcosφ) {
- return 1 / cosλcosφ;
- }, Math.atan);
- (d3.geo.gnomonic = function() {
- return d3_geo_projection(d3_geo_gnomonic);
- }).raw = d3_geo_gnomonic;
- function d3_geo_mercator(λ, φ) {
- return [ λ, Math.log(Math.tan(π / 4 + φ / 2)) ];
- }
- d3_geo_mercator.invert = function(x, y) {
- return [ x, 2 * Math.atan(Math.exp(y)) - π / 2 ];
- };
- function d3_geo_mercatorProjection(project) {
- var m = d3_geo_projection(project), scale = m.scale, translate = m.translate, clipExtent = m.clipExtent, clipAuto;
- m.scale = function() {
- var v = scale.apply(m, arguments);
- return v === m ? clipAuto ? m.clipExtent(null) : m : v;
- };
- m.translate = function() {
- var v = translate.apply(m, arguments);
- return v === m ? clipAuto ? m.clipExtent(null) : m : v;
- };
- m.clipExtent = function(_) {
- var v = clipExtent.apply(m, arguments);
- if (v === m) {
- if (clipAuto = _ == null) {
- var k = π * scale(), t = translate();
- clipExtent([ [ t[0] - k, t[1] - k ], [ t[0] + k, t[1] + k ] ]);
- }
- } else if (clipAuto) {
- v = null;
- }
- return v;
- };
- return m.clipExtent(null);
- }
- (d3.geo.mercator = function() {
- return d3_geo_mercatorProjection(d3_geo_mercator);
- }).raw = d3_geo_mercator;
- var d3_geo_orthographic = d3_geo_azimuthal(function() {
- return 1;
- }, Math.asin);
- (d3.geo.orthographic = function() {
- return d3_geo_projection(d3_geo_orthographic);
- }).raw = d3_geo_orthographic;
- var d3_geo_stereographic = d3_geo_azimuthal(function(cosλcosφ) {
- return 1 / (1 + cosλcosφ);
- }, function(Ï) {
- return 2 * Math.atan(Ï);
- });
- (d3.geo.stereographic = function() {
- return d3_geo_projection(d3_geo_stereographic);
- }).raw = d3_geo_stereographic;
- function d3_geo_transverseMercator(λ, φ) {
- var B = Math.cos(φ) * Math.sin(λ);
- return [ Math.log((1 + B) / (1 - B)) / 2, Math.atan2(Math.tan(φ), Math.cos(λ)) ];
- }
- d3_geo_transverseMercator.invert = function(x, y) {
- return [ Math.atan2(d3_sinh(x), Math.cos(y)), d3_asin(Math.sin(y) / d3_cosh(x)) ];
- };
- (d3.geo.transverseMercator = function() {
- return d3_geo_mercatorProjection(d3_geo_transverseMercator);
- }).raw = d3_geo_transverseMercator;
- d3.geom = {};
- d3.svg = {};
- function d3_svg_line(projection) {
- var x = d3_svg_lineX, y = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, tension = .7;
- function line(data) {
- var segments = [], points = [], i = -1, n = data.length, d, fx = d3_functor(x), fy = d3_functor(y);
- function segment() {
- segments.push("M", interpolate(projection(points), tension));
- }
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points.push([ +fx.call(this, d, i), +fy.call(this, d, i) ]);
- } else if (points.length) {
- segment();
- points = [];
- }
- }
- if (points.length) segment();
- return segments.length ? segments.join("") : null;
- }
- line.x = function(_) {
- if (!arguments.length) return x;
- x = _;
- return line;
- };
- line.y = function(_) {
- if (!arguments.length) return y;
- y = _;
- return line;
- };
- line.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return line;
- };
- line.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- return line;
- };
- line.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return line;
- };
- return line;
- }
- d3.svg.line = function() {
- return d3_svg_line(d3_identity);
- };
- function d3_svg_lineX(d) {
- return d[0];
- }
- function d3_svg_lineY(d) {
- return d[1];
- }
- var d3_svg_lineInterpolators = d3.map({
- linear: d3_svg_lineLinear,
- "linear-closed": d3_svg_lineLinearClosed,
- "step-before": d3_svg_lineStepBefore,
- "step-after": d3_svg_lineStepAfter,
- basis: d3_svg_lineBasis,
- "basis-open": d3_svg_lineBasisOpen,
- "basis-closed": d3_svg_lineBasisClosed,
- bundle: d3_svg_lineBundle,
- cardinal: d3_svg_lineCardinal,
- "cardinal-open": d3_svg_lineCardinalOpen,
- "cardinal-closed": d3_svg_lineCardinalClosed,
- monotone: d3_svg_lineMonotone
- });
- d3_svg_lineInterpolators.forEach(function(key, value) {
- value.key = key;
- value.closed = /-closed$/.test(key);
- });
- function d3_svg_lineLinear(points) {
- return points.join("L");
- }
- function d3_svg_lineLinearClosed(points) {
- return d3_svg_lineLinear(points) + "Z";
- }
- function d3_svg_lineStepBefore(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("V", (p = points[i])[1], "H", p[0]);
- return path.join("");
- }
- function d3_svg_lineStepAfter(points) {
- var i = 0, n = points.length, p = points[0], path = [ p[0], ",", p[1] ];
- while (++i < n) path.push("H", (p = points[i])[0], "V", p[1]);
- return path.join("");
- }
- function d3_svg_lineCardinalOpen(points, tension) {
- return points.length < 4 ? d3_svg_lineLinear(points) : points[1] + d3_svg_lineHermite(points.slice(1, points.length - 1), d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineCardinalClosed(points, tension) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite((points.push(points[0]),
- points), d3_svg_lineCardinalTangents([ points[points.length - 2] ].concat(points, [ points[1] ]), tension));
- }
- function d3_svg_lineCardinal(points, tension) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineCardinalTangents(points, tension));
- }
- function d3_svg_lineHermite(points, tangents) {
- if (tangents.length < 1 || points.length != tangents.length && points.length != tangents.length + 2) {
- return d3_svg_lineLinear(points);
- }
- var quad = points.length != tangents.length, path = "", p0 = points[0], p = points[1], t0 = tangents[0], t = t0, pi = 1;
- if (quad) {
- path += "Q" + (p[0] - t0[0] * 2 / 3) + "," + (p[1] - t0[1] * 2 / 3) + "," + p[0] + "," + p[1];
- p0 = points[1];
- pi = 2;
- }
- if (tangents.length > 1) {
- t = tangents[1];
- p = points[pi];
- pi++;
- path += "C" + (p0[0] + t0[0]) + "," + (p0[1] + t0[1]) + "," + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- for (var i = 2; i < tangents.length; i++, pi++) {
- p = points[pi];
- t = tangents[i];
- path += "S" + (p[0] - t[0]) + "," + (p[1] - t[1]) + "," + p[0] + "," + p[1];
- }
- }
- if (quad) {
- var lp = points[pi];
- path += "Q" + (p[0] + t[0] * 2 / 3) + "," + (p[1] + t[1] * 2 / 3) + "," + lp[0] + "," + lp[1];
- }
- return path;
- }
- function d3_svg_lineCardinalTangents(points, tension) {
- var tangents = [], a = (1 - tension) / 2, p0, p1 = points[0], p2 = points[1], i = 1, n = points.length;
- while (++i < n) {
- p0 = p1;
- p1 = p2;
- p2 = points[i];
- tangents.push([ a * (p2[0] - p0[0]), a * (p2[1] - p0[1]) ]);
- }
- return tangents;
- }
- function d3_svg_lineBasis(points) {
- if (points.length < 3) return d3_svg_lineLinear(points);
- var i = 1, n = points.length, pi = points[0], x0 = pi[0], y0 = pi[1], px = [ x0, x0, x0, (pi = points[1])[0] ], py = [ y0, y0, y0, pi[1] ], path = [ x0, ",", y0 ];
- d3_svg_lineBasisBezier(path, px, py);
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- i = -1;
- while (++i < 2) {
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisOpen(points) {
- if (points.length < 4) return d3_svg_lineLinear(points);
- var path = [], i = -1, n = points.length, pi, px = [ 0 ], py = [ 0 ];
- while (++i < 3) {
- pi = points[i];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path.push(d3_svg_lineDot4(d3_svg_lineBasisBezier3, px) + "," + d3_svg_lineDot4(d3_svg_lineBasisBezier3, py));
- --i;
- while (++i < n) {
- pi = points[i];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBasisClosed(points) {
- var path, i = -1, n = points.length, m = n + 4, pi, px = [], py = [];
- while (++i < 4) {
- pi = points[i % n];
- px.push(pi[0]);
- py.push(pi[1]);
- }
- path = [ d3_svg_lineDot4(d3_svg_lineBasisBezier3, px), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, py) ];
- --i;
- while (++i < m) {
- pi = points[i % n];
- px.shift();
- px.push(pi[0]);
- py.shift();
- py.push(pi[1]);
- d3_svg_lineBasisBezier(path, px, py);
- }
- return path.join("");
- }
- function d3_svg_lineBundle(points, tension) {
- var n = points.length - 1;
- if (n) {
- var x0 = points[0][0], y0 = points[0][1], dx = points[n][0] - x0, dy = points[n][1] - y0, i = -1, p, t;
- while (++i <= n) {
- p = points[i];
- t = i / n;
- p[0] = tension * p[0] + (1 - tension) * (x0 + t * dx);
- p[1] = tension * p[1] + (1 - tension) * (y0 + t * dy);
- }
- }
- return d3_svg_lineBasis(points);
- }
- function d3_svg_lineDot4(a, b) {
- return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
- }
- var d3_svg_lineBasisBezier1 = [ 0, 2 / 3, 1 / 3, 0 ], d3_svg_lineBasisBezier2 = [ 0, 1 / 3, 2 / 3, 0 ], d3_svg_lineBasisBezier3 = [ 0, 1 / 6, 2 / 3, 1 / 6 ];
- function d3_svg_lineBasisBezier(path, x, y) {
- path.push("C", d3_svg_lineDot4(d3_svg_lineBasisBezier1, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier1, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier2, y), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, x), ",", d3_svg_lineDot4(d3_svg_lineBasisBezier3, y));
- }
- function d3_svg_lineSlope(p0, p1) {
- return (p1[1] - p0[1]) / (p1[0] - p0[0]);
- }
- function d3_svg_lineFiniteDifferences(points) {
- var i = 0, j = points.length - 1, m = [], p0 = points[0], p1 = points[1], d = m[0] = d3_svg_lineSlope(p0, p1);
- while (++i < j) {
- m[i] = (d + (d = d3_svg_lineSlope(p0 = p1, p1 = points[i + 1]))) / 2;
- }
- m[i] = d;
- return m;
- }
- function d3_svg_lineMonotoneTangents(points) {
- var tangents = [], d, a, b, s, m = d3_svg_lineFiniteDifferences(points), i = -1, j = points.length - 1;
- while (++i < j) {
- d = d3_svg_lineSlope(points[i], points[i + 1]);
- if (Math.abs(d) < 1e-6) {
- m[i] = m[i + 1] = 0;
- } else {
- a = m[i] / d;
- b = m[i + 1] / d;
- s = a * a + b * b;
- if (s > 9) {
- s = d * 3 / Math.sqrt(s);
- m[i] = s * a;
- m[i + 1] = s * b;
- }
- }
- }
- i = -1;
- while (++i <= j) {
- s = (points[Math.min(j, i + 1)][0] - points[Math.max(0, i - 1)][0]) / (6 * (1 + m[i] * m[i]));
- tangents.push([ s || 0, m[i] * s || 0 ]);
- }
- return tangents;
- }
- function d3_svg_lineMonotone(points) {
- return points.length < 3 ? d3_svg_lineLinear(points) : points[0] + d3_svg_lineHermite(points, d3_svg_lineMonotoneTangents(points));
- }
- d3.geom.hull = function(vertices) {
- var x = d3_svg_lineX, y = d3_svg_lineY;
- if (arguments.length) return hull(vertices);
- function hull(data) {
- if (data.length < 3) return [];
- var fx = d3_functor(x), fy = d3_functor(y), n = data.length, vertices, plen = n - 1, points = [], stack = [], d, i, j, h = 0, x1, y1, x2, y2, u, v, a, sp;
- if (fx === d3_svg_lineX && y === d3_svg_lineY) vertices = data; else for (i = 0,
- vertices = []; i < n; ++i) {
- vertices.push([ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]);
- }
- for (i = 1; i < n; ++i) {
- if (vertices[i][1] < vertices[h][1]) {
- h = i;
- } else if (vertices[i][1] == vertices[h][1]) {
- h = vertices[i][0] < vertices[h][0] ? i : h;
- }
- }
- for (i = 0; i < n; ++i) {
- if (i === h) continue;
- y1 = vertices[i][1] - vertices[h][1];
- x1 = vertices[i][0] - vertices[h][0];
- points.push({
- angle: Math.atan2(y1, x1),
- index: i
- });
- }
- points.sort(function(a, b) {
- return a.angle - b.angle;
- });
- a = points[0].angle;
- v = points[0].index;
- u = 0;
- for (i = 1; i < plen; ++i) {
- j = points[i].index;
- if (a == points[i].angle) {
- x1 = vertices[v][0] - vertices[h][0];
- y1 = vertices[v][1] - vertices[h][1];
- x2 = vertices[j][0] - vertices[h][0];
- y2 = vertices[j][1] - vertices[h][1];
- if (x1 * x1 + y1 * y1 >= x2 * x2 + y2 * y2) {
- points[i].index = -1;
- } else {
- points[u].index = -1;
- a = points[i].angle;
- u = i;
- v = j;
- }
- } else {
- a = points[i].angle;
- u = i;
- v = j;
- }
- }
- stack.push(h);
- for (i = 0, j = 0; i < 2; ++j) {
- if (points[j].index !== -1) {
- stack.push(points[j].index);
- i++;
- }
- }
- sp = stack.length;
- for (;j < plen; ++j) {
- if (points[j].index === -1) continue;
- while (!d3_geom_hullCCW(stack[sp - 2], stack[sp - 1], points[j].index, vertices)) {
- --sp;
- }
- stack[sp++] = points[j].index;
- }
- var poly = [];
- for (i = 0; i < sp; ++i) {
- poly.push(data[stack[i]]);
- }
- return poly;
- }
- hull.x = function(_) {
- return arguments.length ? (x = _, hull) : x;
- };
- hull.y = function(_) {
- return arguments.length ? (y = _, hull) : y;
- };
- return hull;
- };
- function d3_geom_hullCCW(i1, i2, i3, v) {
- var t, a, b, c, d, e, f;
- t = v[i1];
- a = t[0];
- b = t[1];
- t = v[i2];
- c = t[0];
- d = t[1];
- t = v[i3];
- e = t[0];
- f = t[1];
- return (f - b) * (c - a) - (d - b) * (e - a) > 0;
- }
- d3.geom.polygon = function(coordinates) {
- coordinates.area = function() {
- var i = 0, n = coordinates.length, area = coordinates[n - 1][1] * coordinates[0][0] - coordinates[n - 1][0] * coordinates[0][1];
- while (++i < n) {
- area += coordinates[i - 1][1] * coordinates[i][0] - coordinates[i - 1][0] * coordinates[i][1];
- }
- return area * .5;
- };
- coordinates.centroid = function(k) {
- var i = -1, n = coordinates.length, x = 0, y = 0, a, b = coordinates[n - 1], c;
- if (!arguments.length) k = -1 / (6 * coordinates.area());
- while (++i < n) {
- a = b;
- b = coordinates[i];
- c = a[0] * b[1] - b[0] * a[1];
- x += (a[0] + b[0]) * c;
- y += (a[1] + b[1]) * c;
- }
- return [ x * k, y * k ];
- };
- coordinates.clip = function(subject) {
- var input, i = -1, n = coordinates.length, j, m, a = coordinates[n - 1], b, c, d;
- while (++i < n) {
- input = subject.slice();
- subject.length = 0;
- b = coordinates[i];
- c = input[(m = input.length) - 1];
- j = -1;
- while (++j < m) {
- d = input[j];
- if (d3_geom_polygonInside(d, a, b)) {
- if (!d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- subject.push(d);
- } else if (d3_geom_polygonInside(c, a, b)) {
- subject.push(d3_geom_polygonIntersect(c, d, a, b));
- }
- c = d;
- }
- a = b;
- }
- return subject;
- };
- return coordinates;
- };
- function d3_geom_polygonInside(p, a, b) {
- return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
- }
- function d3_geom_polygonIntersect(c, d, a, b) {
- var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);
- return [ x1 + ua * x21, y1 + ua * y21 ];
- }
- d3.geom.delaunay = function(vertices) {
- var edges = vertices.map(function() {
- return [];
- }), triangles = [];
- d3_geom_voronoiTessellate(vertices, function(e) {
- edges[e.region.l.index].push(vertices[e.region.r.index]);
- });
- edges.forEach(function(edge, i) {
- var v = vertices[i], cx = v[0], cy = v[1];
- edge.forEach(function(v) {
- v.angle = Math.atan2(v[0] - cx, v[1] - cy);
- });
- edge.sort(function(a, b) {
- return a.angle - b.angle;
- });
- for (var j = 0, m = edge.length - 1; j < m; j++) {
- triangles.push([ v, edge[j], edge[j + 1] ]);
- }
- });
- return triangles;
- };
- d3.geom.voronoi = function(points) {
- var size = null, x = d3_svg_lineX, y = d3_svg_lineY, clip;
- if (arguments.length) return voronoi(points);
- function voronoi(data) {
- var points, polygons = data.map(function() {
- return [];
- }), fx = d3_functor(x), fy = d3_functor(y), d, i, n = data.length, Z = 1e6;
- if (fx === d3_svg_lineX && fy === d3_svg_lineY) points = data; else for (points = [],
- i = 0; i < n; ++i) {
- points.push([ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]);
- }
- d3_geom_voronoiTessellate(points, function(e) {
- var s1, s2, x1, x2, y1, y2;
- if (e.a === 1 && e.b >= 0) {
- s1 = e.ep.r;
- s2 = e.ep.l;
- } else {
- s1 = e.ep.l;
- s2 = e.ep.r;
- }
- if (e.a === 1) {
- y1 = s1 ? s1.y : -Z;
- x1 = e.c - e.b * y1;
- y2 = s2 ? s2.y : Z;
- x2 = e.c - e.b * y2;
- } else {
- x1 = s1 ? s1.x : -Z;
- y1 = e.c - e.a * x1;
- x2 = s2 ? s2.x : Z;
- y2 = e.c - e.a * x2;
- }
- var v1 = [ x1, y1 ], v2 = [ x2, y2 ];
- polygons[e.region.l.index].push(v1, v2);
- polygons[e.region.r.index].push(v1, v2);
- });
- polygons = polygons.map(function(polygon, i) {
- var cx = points[i][0], cy = points[i][1], angle = polygon.map(function(v) {
- return Math.atan2(v[0] - cx, v[1] - cy);
- }), order = d3.range(polygon.length).sort(function(a, b) {
- return angle[a] - angle[b];
- });
- return order.filter(function(d, i) {
- return !i || angle[d] - angle[order[i - 1]] > ε;
- }).map(function(d) {
- return polygon[d];
- });
- });
- polygons.forEach(function(polygon, i) {
- var n = polygon.length;
- if (!n) return polygon.push([ -Z, -Z ], [ -Z, Z ], [ Z, Z ], [ Z, -Z ]);
- if (n > 2) return;
- var p0 = points[i], p1 = polygon[0], p2 = polygon[1], x0 = p0[0], y0 = p0[1], x1 = p1[0], y1 = p1[1], x2 = p2[0], y2 = p2[1], dx = Math.abs(x2 - x1), dy = y2 - y1;
- if (Math.abs(dy) < ε) {
- var y = y0 < y1 ? -Z : Z;
- polygon.push([ -Z, y ], [ Z, y ]);
- } else if (dx < ε) {
- var x = x0 < x1 ? -Z : Z;
- polygon.push([ x, -Z ], [ x, Z ]);
- } else {
- var y = (x2 - x1) * (y1 - y0) < (x1 - x0) * (y2 - y1) ? Z : -Z, z = Math.abs(dy) - dx;
- if (Math.abs(z) < ε) {
- polygon.push([ dy < 0 ? y : -y, y ]);
- } else {
- if (z > 0) y *= -1;
- polygon.push([ -Z, y ], [ Z, y ]);
- }
- }
- });
- if (clip) for (i = 0; i < n; ++i) clip(polygons[i]);
- for (i = 0; i < n; ++i) polygons[i].point = data[i];
- return polygons;
- }
- voronoi.x = function(_) {
- return arguments.length ? (x = _, voronoi) : x;
- };
- voronoi.y = function(_) {
- return arguments.length ? (y = _, voronoi) : y;
- };
- voronoi.size = function(_) {
- if (!arguments.length) return size;
- if (_ == null) {
- clip = null;
- } else {
- size = [ +_[0], +_[1] ];
- clip = d3.geom.polygon([ [ 0, 0 ], [ 0, size[1] ], size, [ size[0], 0 ] ]).clip;
- }
- return voronoi;
- };
- voronoi.links = function(data) {
- var points, graph = data.map(function() {
- return [];
- }), links = [], fx = d3_functor(x), fy = d3_functor(y), d, i, n = data.length;
- if (fx === d3_svg_lineX && fy === d3_svg_lineY) points = data; else for (i = 0; i < n; ++i) {
- points.push([ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ]);
- }
- d3_geom_voronoiTessellate(points, function(e) {
- var l = e.region.l.index, r = e.region.r.index;
- if (graph[l][r]) return;
- graph[l][r] = graph[r][l] = true;
- links.push({
- source: data[l],
- target: data[r]
- });
- });
- return links;
- };
- voronoi.triangles = function(data) {
- if (x === d3_svg_lineX && y === d3_svg_lineY) return d3.geom.delaunay(data);
- var points, point, fx = d3_functor(x), fy = d3_functor(y), d, i, n;
- for (i = 0, points = [], n = data.length; i < n; ++i) {
- point = [ +fx.call(this, d = data[i], i), +fy.call(this, d, i) ];
- point.data = d;
- points.push(point);
- }
- return d3.geom.delaunay(points).map(function(triangle) {
- return triangle.map(function(point) {
- return point.data;
- });
- });
- };
- return voronoi;
- };
- var d3_geom_voronoiOpposite = {
- l: "r",
- r: "l"
- };
- function d3_geom_voronoiTessellate(points, callback) {
- var Sites = {
- list: points.map(function(v, i) {
- return {
- index: i,
- x: v[0],
- y: v[1]
- };
- }).sort(function(a, b) {
- return a.y < b.y ? -1 : a.y > b.y ? 1 : a.x < b.x ? -1 : a.x > b.x ? 1 : 0;
- }),
- bottomSite: null
- };
- var EdgeList = {
- list: [],
- leftEnd: null,
- rightEnd: null,
- init: function() {
- EdgeList.leftEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.rightEnd = EdgeList.createHalfEdge(null, "l");
- EdgeList.leftEnd.r = EdgeList.rightEnd;
- EdgeList.rightEnd.l = EdgeList.leftEnd;
- EdgeList.list.unshift(EdgeList.leftEnd, EdgeList.rightEnd);
- },
- createHalfEdge: function(edge, side) {
- return {
- edge: edge,
- side: side,
- vertex: null,
- l: null,
- r: null
- };
- },
- insert: function(lb, he) {
- he.l = lb;
- he.r = lb.r;
- lb.r.l = he;
- lb.r = he;
- },
- leftBound: function(p) {
- var he = EdgeList.leftEnd;
- do {
- he = he.r;
- } while (he != EdgeList.rightEnd && Geom.rightOf(he, p));
- he = he.l;
- return he;
- },
- del: function(he) {
- he.l.r = he.r;
- he.r.l = he.l;
- he.edge = null;
- },
- right: function(he) {
- return he.r;
- },
- left: function(he) {
- return he.l;
- },
- leftRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[he.side];
- },
- rightRegion: function(he) {
- return he.edge == null ? Sites.bottomSite : he.edge.region[d3_geom_voronoiOpposite[he.side]];
- }
- };
- var Geom = {
- bisect: function(s1, s2) {
- var newEdge = {
- region: {
- l: s1,
- r: s2
- },
- ep: {
- l: null,
- r: null
- }
- };
- var dx = s2.x - s1.x, dy = s2.y - s1.y, adx = dx > 0 ? dx : -dx, ady = dy > 0 ? dy : -dy;
- newEdge.c = s1.x * dx + s1.y * dy + (dx * dx + dy * dy) * .5;
- if (adx > ady) {
- newEdge.a = 1;
- newEdge.b = dy / dx;
- newEdge.c /= dx;
- } else {
- newEdge.b = 1;
- newEdge.a = dx / dy;
- newEdge.c /= dy;
- }
- return newEdge;
- },
- intersect: function(el1, el2) {
- var e1 = el1.edge, e2 = el2.edge;
- if (!e1 || !e2 || e1.region.r == e2.region.r) {
- return null;
- }
- var d = e1.a * e2.b - e1.b * e2.a;
- if (Math.abs(d) < 1e-10) {
- return null;
- }
- var xint = (e1.c * e2.b - e2.c * e1.b) / d, yint = (e2.c * e1.a - e1.c * e2.a) / d, e1r = e1.region.r, e2r = e2.region.r, el, e;
- if (e1r.y < e2r.y || e1r.y == e2r.y && e1r.x < e2r.x) {
- el = el1;
- e = e1;
- } else {
- el = el2;
- e = e2;
- }
- var rightOfSite = xint >= e.region.r.x;
- if (rightOfSite && el.side === "l" || !rightOfSite && el.side === "r") {
- return null;
- }
- return {
- x: xint,
- y: yint
- };
- },
- rightOf: function(he, p) {
- var e = he.edge, topsite = e.region.r, rightOfSite = p.x > topsite.x;
- if (rightOfSite && he.side === "l") {
- return 1;
- }
- if (!rightOfSite && he.side === "r") {
- return 0;
- }
- if (e.a === 1) {
- var dyp = p.y - topsite.y, dxp = p.x - topsite.x, fast = 0, above = 0;
- if (!rightOfSite && e.b < 0 || rightOfSite && e.b >= 0) {
- above = fast = dyp >= e.b * dxp;
- } else {
- above = p.x + p.y * e.b > e.c;
- if (e.b < 0) {
- above = !above;
- }
- if (!above) {
- fast = 1;
- }
- }
- if (!fast) {
- var dxs = topsite.x - e.region.l.x;
- above = e.b * (dxp * dxp - dyp * dyp) < dxs * dyp * (1 + 2 * dxp / dxs + e.b * e.b);
- if (e.b < 0) {
- above = !above;
- }
- }
- } else {
- var yl = e.c - e.a * p.x, t1 = p.y - yl, t2 = p.x - topsite.x, t3 = yl - topsite.y;
- above = t1 * t1 > t2 * t2 + t3 * t3;
- }
- return he.side === "l" ? above : !above;
- },
- endPoint: function(edge, side, site) {
- edge.ep[side] = site;
- if (!edge.ep[d3_geom_voronoiOpposite[side]]) return;
- callback(edge);
- },
- distance: function(s, t) {
- var dx = s.x - t.x, dy = s.y - t.y;
- return Math.sqrt(dx * dx + dy * dy);
- }
- };
- var EventQueue = {
- list: [],
- insert: function(he, site, offset) {
- he.vertex = site;
- he.ystar = site.y + offset;
- for (var i = 0, list = EventQueue.list, l = list.length; i < l; i++) {
- var next = list[i];
- if (he.ystar > next.ystar || he.ystar == next.ystar && site.x > next.vertex.x) {
- continue;
- } else {
- break;
- }
- }
- list.splice(i, 0, he);
- },
- del: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l && ls[i] != he; ++i) {}
- ls.splice(i, 1);
- },
- empty: function() {
- return EventQueue.list.length === 0;
- },
- nextEvent: function(he) {
- for (var i = 0, ls = EventQueue.list, l = ls.length; i < l; ++i) {
- if (ls[i] == he) return ls[i + 1];
- }
- return null;
- },
- min: function() {
- var elem = EventQueue.list[0];
- return {
- x: elem.vertex.x,
- y: elem.ystar
- };
- },
- extractMin: function() {
- return EventQueue.list.shift();
- }
- };
- EdgeList.init();
- Sites.bottomSite = Sites.list.shift();
- var newSite = Sites.list.shift(), newIntStar;
- var lbnd, rbnd, llbnd, rrbnd, bisector;
- var bot, top, temp, p, v;
- var e, pm;
- while (true) {
- if (!EventQueue.empty()) {
- newIntStar = EventQueue.min();
- }
- if (newSite && (EventQueue.empty() || newSite.y < newIntStar.y || newSite.y == newIntStar.y && newSite.x < newIntStar.x)) {
- lbnd = EdgeList.leftBound(newSite);
- rbnd = EdgeList.right(lbnd);
- bot = EdgeList.rightRegion(lbnd);
- e = Geom.bisect(bot, newSite);
- bisector = EdgeList.createHalfEdge(e, "l");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(lbnd, bisector);
- if (p) {
- EventQueue.del(lbnd);
- EventQueue.insert(lbnd, p, Geom.distance(p, newSite));
- }
- lbnd = bisector;
- bisector = EdgeList.createHalfEdge(e, "r");
- EdgeList.insert(lbnd, bisector);
- p = Geom.intersect(bisector, rbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, newSite));
- }
- newSite = Sites.list.shift();
- } else if (!EventQueue.empty()) {
- lbnd = EventQueue.extractMin();
- llbnd = EdgeList.left(lbnd);
- rbnd = EdgeList.right(lbnd);
- rrbnd = EdgeList.right(rbnd);
- bot = EdgeList.leftRegion(lbnd);
- top = EdgeList.rightRegion(rbnd);
- v = lbnd.vertex;
- Geom.endPoint(lbnd.edge, lbnd.side, v);
- Geom.endPoint(rbnd.edge, rbnd.side, v);
- EdgeList.del(lbnd);
- EventQueue.del(rbnd);
- EdgeList.del(rbnd);
- pm = "l";
- if (bot.y > top.y) {
- temp = bot;
- bot = top;
- top = temp;
- pm = "r";
- }
- e = Geom.bisect(bot, top);
- bisector = EdgeList.createHalfEdge(e, pm);
- EdgeList.insert(llbnd, bisector);
- Geom.endPoint(e, d3_geom_voronoiOpposite[pm], v);
- p = Geom.intersect(llbnd, bisector);
- if (p) {
- EventQueue.del(llbnd);
- EventQueue.insert(llbnd, p, Geom.distance(p, bot));
- }
- p = Geom.intersect(bisector, rrbnd);
- if (p) {
- EventQueue.insert(bisector, p, Geom.distance(p, bot));
- }
- } else {
- break;
- }
- }
- for (lbnd = EdgeList.right(EdgeList.leftEnd); lbnd != EdgeList.rightEnd; lbnd = EdgeList.right(lbnd)) {
- callback(lbnd.edge);
- }
- }
- d3.geom.quadtree = function(points, x1, y1, x2, y2) {
- var x = d3_svg_lineX, y = d3_svg_lineY, compat;
- if (compat = arguments.length) {
- x = d3_geom_quadtreeCompatX;
- y = d3_geom_quadtreeCompatY;
- if (compat === 3) {
- y2 = y1;
- x2 = x1;
- y1 = x1 = 0;
- }
- return quadtree(points);
- }
- function quadtree(data) {
- var d, fx = d3_functor(x), fy = d3_functor(y), xs, ys, i, n, x1_, y1_, x2_, y2_;
- if (x1 != null) {
- x1_ = x1, y1_ = y1, x2_ = x2, y2_ = y2;
- } else {
- x2_ = y2_ = -(x1_ = y1_ = Infinity);
- xs = [], ys = [];
- n = data.length;
- if (compat) for (i = 0; i < n; ++i) {
- d = data[i];
- if (d.x < x1_) x1_ = d.x;
- if (d.y < y1_) y1_ = d.y;
- if (d.x > x2_) x2_ = d.x;
- if (d.y > y2_) y2_ = d.y;
- xs.push(d.x);
- ys.push(d.y);
- } else for (i = 0; i < n; ++i) {
- var x_ = +fx(d = data[i], i), y_ = +fy(d, i);
- if (x_ < x1_) x1_ = x_;
- if (y_ < y1_) y1_ = y_;
- if (x_ > x2_) x2_ = x_;
- if (y_ > y2_) y2_ = y_;
- xs.push(x_);
- ys.push(y_);
- }
- }
- var dx = x2_ - x1_, dy = y2_ - y1_;
- if (dx > dy) y2_ = y1_ + dx; else x2_ = x1_ + dy;
- function insert(n, d, x, y, x1, y1, x2, y2) {
- if (isNaN(x) || isNaN(y)) return;
- if (n.leaf) {
- var nx = n.x, ny = n.y;
- if (nx != null) {
- if (Math.abs(nx - x) + Math.abs(ny - y) < .01) {
- insertChild(n, d, x, y, x1, y1, x2, y2);
- } else {
- var nPoint = n.point;
- n.x = n.y = n.point = null;
- insertChild(n, nPoint, nx, ny, x1, y1, x2, y2);
- insertChild(n, d, x, y, x1, y1, x2, y2);
- }
- } else {
- n.x = x, n.y = y, n.point = d;
- }
- } else {
- insertChild(n, d, x, y, x1, y1, x2, y2);
- }
- }
- function insertChild(n, d, x, y, x1, y1, x2, y2) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, right = x >= sx, bottom = y >= sy, i = (bottom << 1) + right;
- n.leaf = false;
- n = n.nodes[i] || (n.nodes[i] = d3_geom_quadtreeNode());
- if (right) x1 = sx; else x2 = sx;
- if (bottom) y1 = sy; else y2 = sy;
- insert(n, d, x, y, x1, y1, x2, y2);
- }
- var root = d3_geom_quadtreeNode();
- root.add = function(d) {
- insert(root, d, +fx(d, ++i), +fy(d, i), x1_, y1_, x2_, y2_);
- };
- root.visit = function(f) {
- d3_geom_quadtreeVisit(f, root, x1_, y1_, x2_, y2_);
- };
- i = -1;
- if (x1 == null) {
- while (++i < n) {
- insert(root, data[i], xs[i], ys[i], x1_, y1_, x2_, y2_);
- }
- --i;
- } else data.forEach(root.add);
- xs = ys = data = d = null;
- return root;
- }
- quadtree.x = function(_) {
- return arguments.length ? (x = _, quadtree) : x;
- };
- quadtree.y = function(_) {
- return arguments.length ? (y = _, quadtree) : y;
- };
- quadtree.size = function(_) {
- if (!arguments.length) return x1 == null ? null : [ x2, y2 ];
- if (_ == null) {
- x1 = y1 = x2 = y2 = null;
- } else {
- x1 = y1 = 0;
- x2 = +_[0], y2 = +_[1];
- }
- return quadtree;
- };
- return quadtree;
- };
- function d3_geom_quadtreeCompatX(d) {
- return d.x;
- }
- function d3_geom_quadtreeCompatY(d) {
- return d.y;
- }
- function d3_geom_quadtreeNode() {
- return {
- leaf: true,
- nodes: [],
- point: null,
- x: null,
- y: null
- };
- }
- function d3_geom_quadtreeVisit(f, node, x1, y1, x2, y2) {
- if (!f(node, x1, y1, x2, y2)) {
- var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5, children = node.nodes;
- if (children[0]) d3_geom_quadtreeVisit(f, children[0], x1, y1, sx, sy);
- if (children[1]) d3_geom_quadtreeVisit(f, children[1], sx, y1, x2, sy);
- if (children[2]) d3_geom_quadtreeVisit(f, children[2], x1, sy, sx, y2);
- if (children[3]) d3_geom_quadtreeVisit(f, children[3], sx, sy, x2, y2);
- }
- }
- d3.interpolateRgb = d3_interpolateRgb;
- function d3_interpolateRgb(a, b) {
- a = d3.rgb(a);
- b = d3.rgb(b);
- var ar = a.r, ag = a.g, ab = a.b, br = b.r - ar, bg = b.g - ag, bb = b.b - ab;
- return function(t) {
- return "#" + d3_rgb_hex(Math.round(ar + br * t)) + d3_rgb_hex(Math.round(ag + bg * t)) + d3_rgb_hex(Math.round(ab + bb * t));
- };
- }
- d3.transform = function(string) {
- var g = d3_document.createElementNS(d3.ns.prefix.svg, "g");
- return (d3.transform = function(string) {
- g.setAttribute("transform", string);
- var t = g.transform.baseVal.consolidate();
- return new d3_transform(t ? t.matrix : d3_transformIdentity);
- })(string);
- };
- function d3_transform(m) {
- var r0 = [ m.a, m.b ], r1 = [ m.c, m.d ], kx = d3_transformNormalize(r0), kz = d3_transformDot(r0, r1), ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz)) || 0;
- if (r0[0] * r1[1] < r1[0] * r0[1]) {
- r0[0] *= -1;
- r0[1] *= -1;
- kx *= -1;
- kz *= -1;
- }
- this.rotate = (kx ? Math.atan2(r0[1], r0[0]) : Math.atan2(-r1[0], r1[1])) * d3_degrees;
- this.translate = [ m.e, m.f ];
- this.scale = [ kx, ky ];
- this.skew = ky ? Math.atan2(kz, ky) * d3_degrees : 0;
- }
- d3_transform.prototype.toString = function() {
- return "translate(" + this.translate + ")rotate(" + this.rotate + ")skewX(" + this.skew + ")scale(" + this.scale + ")";
- };
- function d3_transformDot(a, b) {
- return a[0] * b[0] + a[1] * b[1];
- }
- function d3_transformNormalize(a) {
- var k = Math.sqrt(d3_transformDot(a, a));
- if (k) {
- a[0] /= k;
- a[1] /= k;
- }
- return k;
- }
- function d3_transformCombine(a, b, k) {
- a[0] += k * b[0];
- a[1] += k * b[1];
- return a;
- }
- var d3_transformIdentity = {
- a: 1,
- b: 0,
- c: 0,
- d: 1,
- e: 0,
- f: 0
- };
- d3.interpolateNumber = d3_interpolateNumber;
- function d3_interpolateNumber(a, b) {
- b -= a = +a;
- return function(t) {
- return a + b * t;
- };
- }
- d3.interpolateTransform = d3_interpolateTransform;
- function d3_interpolateTransform(a, b) {
- var s = [], q = [], n, A = d3.transform(a), B = d3.transform(b), ta = A.translate, tb = B.translate, ra = A.rotate, rb = B.rotate, wa = A.skew, wb = B.skew, ka = A.scale, kb = B.scale;
- if (ta[0] != tb[0] || ta[1] != tb[1]) {
- s.push("translate(", null, ",", null, ")");
- q.push({
- i: 1,
- x: d3_interpolateNumber(ta[0], tb[0])
- }, {
- i: 3,
- x: d3_interpolateNumber(ta[1], tb[1])
- });
- } else if (tb[0] || tb[1]) {
- s.push("translate(" + tb + ")");
- } else {
- s.push("");
- }
- if (ra != rb) {
- if (ra - rb > 180) rb += 360; else if (rb - ra > 180) ra += 360;
- q.push({
- i: s.push(s.pop() + "rotate(", null, ")") - 2,
- x: d3_interpolateNumber(ra, rb)
- });
- } else if (rb) {
- s.push(s.pop() + "rotate(" + rb + ")");
- }
- if (wa != wb) {
- q.push({
- i: s.push(s.pop() + "skewX(", null, ")") - 2,
- x: d3_interpolateNumber(wa, wb)
- });
- } else if (wb) {
- s.push(s.pop() + "skewX(" + wb + ")");
- }
- if (ka[0] != kb[0] || ka[1] != kb[1]) {
- n = s.push(s.pop() + "scale(", null, ",", null, ")");
- q.push({
- i: n - 4,
- x: d3_interpolateNumber(ka[0], kb[0])
- }, {
- i: n - 2,
- x: d3_interpolateNumber(ka[1], kb[1])
- });
- } else if (kb[0] != 1 || kb[1] != 1) {
- s.push(s.pop() + "scale(" + kb + ")");
- }
- n = q.length;
- return function(t) {
- var i = -1, o;
- while (++i < n) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- }
- d3.interpolateObject = d3_interpolateObject;
- function d3_interpolateObject(a, b) {
- var i = {}, c = {}, k;
- for (k in a) {
- if (k in b) {
- i[k] = d3_interpolateByName(k)(a[k], b[k]);
- } else {
- c[k] = a[k];
- }
- }
- for (k in b) {
- if (!(k in a)) {
- c[k] = b[k];
- }
- }
- return function(t) {
- for (k in i) c[k] = i[k](t);
- return c;
- };
- }
- d3.interpolateString = d3_interpolateString;
- function d3_interpolateString(a, b) {
- var m, i, j, s0 = 0, s1 = 0, s = [], q = [], n, o;
- a = a + "", b = b + "";
- d3_interpolate_number.lastIndex = 0;
- for (i = 0; m = d3_interpolate_number.exec(b); ++i) {
- if (m.index) s.push(b.substring(s0, s1 = m.index));
- q.push({
- i: s.length,
- x: m[0]
- });
- s.push(null);
- s0 = d3_interpolate_number.lastIndex;
- }
- if (s0 < b.length) s.push(b.substring(s0));
- for (i = 0, n = q.length; (m = d3_interpolate_number.exec(a)) && i < n; ++i) {
- o = q[i];
- if (o.x == m[0]) {
- if (o.i) {
- if (s[o.i + 1] == null) {
- s[o.i - 1] += o.x;
- s.splice(o.i, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- } else {
- s[o.i - 1] += o.x + s[o.i + 1];
- s.splice(o.i, 2);
- for (j = i + 1; j < n; ++j) q[j].i -= 2;
- }
- } else {
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- for (j = i + 1; j < n; ++j) q[j].i--;
- }
- }
- q.splice(i, 1);
- n--;
- i--;
- } else {
- o.x = d3_interpolateNumber(parseFloat(m[0]), parseFloat(o.x));
- }
- }
- while (i < n) {
- o = q.pop();
- if (s[o.i + 1] == null) {
- s[o.i] = o.x;
- } else {
- s[o.i] = o.x + s[o.i + 1];
- s.splice(o.i + 1, 1);
- }
- n--;
- }
- if (s.length === 1) {
- return s[0] == null ? q[0].x : function() {
- return b;
- };
- }
- return function(t) {
- for (i = 0; i < n; ++i) s[(o = q[i]).i] = o.x(t);
- return s.join("");
- };
- }
- var d3_interpolate_number = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
- d3.interpolate = d3_interpolate;
- function d3_interpolate(a, b) {
- var i = d3.interpolators.length, f;
- while (--i >= 0 && !(f = d3.interpolators[i](a, b))) ;
- return f;
- }
- function d3_interpolateByName(name) {
- return name == "transform" ? d3_interpolateTransform : d3_interpolate;
- }
- d3.interpolators = [ function(a, b) {
- var t = typeof b;
- return (t === "string" || t !== typeof a ? d3_rgb_names.has(b) || /^(#|rgb\(|hsl\()/.test(b) ? d3_interpolateRgb : d3_interpolateString : b instanceof d3_Color ? d3_interpolateRgb : t === "object" ? Array.isArray(b) ? d3_interpolateArray : d3_interpolateObject : d3_interpolateNumber)(a, b);
- } ];
- d3.interpolateArray = d3_interpolateArray;
- function d3_interpolateArray(a, b) {
- var x = [], c = [], na = a.length, nb = b.length, n0 = Math.min(a.length, b.length), i;
- for (i = 0; i < n0; ++i) x.push(d3_interpolate(a[i], b[i]));
- for (;i < na; ++i) c[i] = a[i];
- for (;i < nb; ++i) c[i] = b[i];
- return function(t) {
- for (i = 0; i < n0; ++i) c[i] = x[i](t);
- return c;
- };
- }
- var d3_ease_default = function() {
- return d3_identity;
- };
- var d3_ease = d3.map({
- linear: d3_ease_default,
- poly: d3_ease_poly,
- quad: function() {
- return d3_ease_quad;
- },
- cubic: function() {
- return d3_ease_cubic;
- },
- sin: function() {
- return d3_ease_sin;
- },
- exp: function() {
- return d3_ease_exp;
- },
- circle: function() {
- return d3_ease_circle;
- },
- elastic: d3_ease_elastic,
- back: d3_ease_back,
- bounce: function() {
- return d3_ease_bounce;
- }
- });
- var d3_ease_mode = d3.map({
- "in": d3_identity,
- out: d3_ease_reverse,
- "in-out": d3_ease_reflect,
- "out-in": function(f) {
- return d3_ease_reflect(d3_ease_reverse(f));
- }
- });
- d3.ease = function(name) {
- var i = name.indexOf("-"), t = i >= 0 ? name.substring(0, i) : name, m = i >= 0 ? name.substring(i + 1) : "in";
- t = d3_ease.get(t) || d3_ease_default;
- m = d3_ease_mode.get(m) || d3_identity;
- return d3_ease_clamp(m(t.apply(null, Array.prototype.slice.call(arguments, 1))));
- };
- function d3_ease_clamp(f) {
- return function(t) {
- return t <= 0 ? 0 : t >= 1 ? 1 : f(t);
- };
- }
- function d3_ease_reverse(f) {
- return function(t) {
- return 1 - f(1 - t);
- };
- }
- function d3_ease_reflect(f) {
- return function(t) {
- return .5 * (t < .5 ? f(2 * t) : 2 - f(2 - 2 * t));
- };
- }
- function d3_ease_quad(t) {
- return t * t;
- }
- function d3_ease_cubic(t) {
- return t * t * t;
- }
- function d3_ease_cubicInOut(t) {
- if (t <= 0) return 0;
- if (t >= 1) return 1;
- var t2 = t * t, t3 = t2 * t;
- return 4 * (t < .5 ? t3 : 3 * (t - t2) + t3 - .75);
- }
- function d3_ease_poly(e) {
- return function(t) {
- return Math.pow(t, e);
- };
- }
- function d3_ease_sin(t) {
- return 1 - Math.cos(t * π / 2);
- }
- function d3_ease_exp(t) {
- return Math.pow(2, 10 * (t - 1));
- }
- function d3_ease_circle(t) {
- return 1 - Math.sqrt(1 - t * t);
- }
- function d3_ease_elastic(a, p) {
- var s;
- if (arguments.length < 2) p = .45;
- if (arguments.length) s = p / (2 * π) * Math.asin(1 / a); else a = 1, s = p / 4;
- return function(t) {
- return 1 + a * Math.pow(2, 10 * -t) * Math.sin((t - s) * 2 * π / p);
- };
- }
- function d3_ease_back(s) {
- if (!s) s = 1.70158;
- return function(t) {
- return t * t * ((s + 1) * t - s);
- };
- }
- function d3_ease_bounce(t) {
- return t < 1 / 2.75 ? 7.5625 * t * t : t < 2 / 2.75 ? 7.5625 * (t -= 1.5 / 2.75) * t + .75 : t < 2.5 / 2.75 ? 7.5625 * (t -= 2.25 / 2.75) * t + .9375 : 7.5625 * (t -= 2.625 / 2.75) * t + .984375;
- }
- d3.interpolateHcl = d3_interpolateHcl;
- function d3_interpolateHcl(a, b) {
- a = d3.hcl(a);
- b = d3.hcl(b);
- var ah = a.h, ac = a.c, al = a.l, bh = b.h - ah, bc = b.c - ac, bl = b.l - al;
- if (bh > 180) bh -= 360; else if (bh < -180) bh += 360;
- return function(t) {
- return d3_hcl_lab(ah + bh * t, ac + bc * t, al + bl * t) + "";
- };
- }
- d3.interpolateHsl = d3_interpolateHsl;
- function d3_interpolateHsl(a, b) {
- a = d3.hsl(a);
- b = d3.hsl(b);
- var h0 = a.h, s0 = a.s, l0 = a.l, h1 = b.h - h0, s1 = b.s - s0, l1 = b.l - l0;
- if (h1 > 180) h1 -= 360; else if (h1 < -180) h1 += 360;
- return function(t) {
- return d3_hsl_rgb(h0 + h1 * t, s0 + s1 * t, l0 + l1 * t) + "";
- };
- }
- d3.interpolateLab = d3_interpolateLab;
- function d3_interpolateLab(a, b) {
- a = d3.lab(a);
- b = d3.lab(b);
- var al = a.l, aa = a.a, ab = a.b, bl = b.l - al, ba = b.a - aa, bb = b.b - ab;
- return function(t) {
- return d3_lab_rgb(al + bl * t, aa + ba * t, ab + bb * t) + "";
- };
- }
- d3.interpolateRound = d3_interpolateRound;
- function d3_interpolateRound(a, b) {
- b -= a;
- return function(t) {
- return Math.round(a + b * t);
- };
- }
- function d3_uninterpolateNumber(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return (x - a) * b;
- };
- }
- function d3_uninterpolateClamp(a, b) {
- b = b - (a = +a) ? 1 / (b - a) : 0;
- return function(x) {
- return Math.max(0, Math.min(1, (x - a) * b));
- };
- }
- d3.layout = {};
- d3.layout.bundle = function() {
- return function(links) {
- var paths = [], i = -1, n = links.length;
- while (++i < n) paths.push(d3_layout_bundlePath(links[i]));
- return paths;
- };
- };
- function d3_layout_bundlePath(link) {
- var start = link.source, end = link.target, lca = d3_layout_bundleLeastCommonAncestor(start, end), points = [ start ];
- while (start !== lca) {
- start = start.parent;
- points.push(start);
- }
- var k = points.length;
- while (end !== lca) {
- points.splice(k, 0, end);
- end = end.parent;
- }
- return points;
- }
- function d3_layout_bundleAncestors(node) {
- var ancestors = [], parent = node.parent;
- while (parent != null) {
- ancestors.push(node);
- node = parent;
- parent = parent.parent;
- }
- ancestors.push(node);
- return ancestors;
- }
- function d3_layout_bundleLeastCommonAncestor(a, b) {
- if (a === b) return a;
- var aNodes = d3_layout_bundleAncestors(a), bNodes = d3_layout_bundleAncestors(b), aNode = aNodes.pop(), bNode = bNodes.pop(), sharedNode = null;
- while (aNode === bNode) {
- sharedNode = aNode;
- aNode = aNodes.pop();
- bNode = bNodes.pop();
- }
- return sharedNode;
- }
- d3.layout.chord = function() {
- var chord = {}, chords, groups, matrix, n, padding = 0, sortGroups, sortSubgroups, sortChords;
- function relayout() {
- var subgroups = {}, groupSums = [], groupIndex = d3.range(n), subgroupIndex = [], k, x, x0, i, j;
- chords = [];
- groups = [];
- k = 0, i = -1;
- while (++i < n) {
- x = 0, j = -1;
- while (++j < n) {
- x += matrix[i][j];
- }
- groupSums.push(x);
- subgroupIndex.push(d3.range(n));
- k += x;
- }
- if (sortGroups) {
- groupIndex.sort(function(a, b) {
- return sortGroups(groupSums[a], groupSums[b]);
- });
- }
- if (sortSubgroups) {
- subgroupIndex.forEach(function(d, i) {
- d.sort(function(a, b) {
- return sortSubgroups(matrix[i][a], matrix[i][b]);
- });
- });
- }
- k = (2 * π - padding * n) / k;
- x = 0, i = -1;
- while (++i < n) {
- x0 = x, j = -1;
- while (++j < n) {
- var di = groupIndex[i], dj = subgroupIndex[di][j], v = matrix[di][dj], a0 = x, a1 = x += v * k;
- subgroups[di + "-" + dj] = {
- index: di,
- subindex: dj,
- startAngle: a0,
- endAngle: a1,
- value: v
- };
- }
- groups[di] = {
- index: di,
- startAngle: x0,
- endAngle: x,
- value: (x - x0) / k
- };
- x += padding;
- }
- i = -1;
- while (++i < n) {
- j = i - 1;
- while (++j < n) {
- var source = subgroups[i + "-" + j], target = subgroups[j + "-" + i];
- if (source.value || target.value) {
- chords.push(source.value < target.value ? {
- source: target,
- target: source
- } : {
- source: source,
- target: target
- });
- }
- }
- }
- if (sortChords) resort();
- }
- function resort() {
- chords.sort(function(a, b) {
- return sortChords((a.source.value + a.target.value) / 2, (b.source.value + b.target.value) / 2);
- });
- }
- chord.matrix = function(x) {
- if (!arguments.length) return matrix;
- n = (matrix = x) && matrix.length;
- chords = groups = null;
- return chord;
- };
- chord.padding = function(x) {
- if (!arguments.length) return padding;
- padding = x;
- chords = groups = null;
- return chord;
- };
- chord.sortGroups = function(x) {
- if (!arguments.length) return sortGroups;
- sortGroups = x;
- chords = groups = null;
- return chord;
- };
- chord.sortSubgroups = function(x) {
- if (!arguments.length) return sortSubgroups;
- sortSubgroups = x;
- chords = null;
- return chord;
- };
- chord.sortChords = function(x) {
- if (!arguments.length) return sortChords;
- sortChords = x;
- if (chords) resort();
- return chord;
- };
- chord.chords = function() {
- if (!chords) relayout();
- return chords;
- };
- chord.groups = function() {
- if (!groups) relayout();
- return groups;
- };
- return chord;
- };
- d3.layout.force = function() {
- var force = {}, event = d3.dispatch("start", "tick", "end"), size = [ 1, 1 ], drag, alpha, friction = .9, linkDistance = d3_layout_forceLinkDistance, linkStrength = d3_layout_forceLinkStrength, charge = -30, gravity = .1, theta = .8, nodes = [], links = [], distances, strengths, charges;
- function repulse(node) {
- return function(quad, x1, _, x2) {
- if (quad.point !== node) {
- var dx = quad.cx - node.x, dy = quad.cy - node.y, dn = 1 / Math.sqrt(dx * dx + dy * dy);
- if ((x2 - x1) * dn < theta) {
- var k = quad.charge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- return true;
- }
- if (quad.point && isFinite(dn)) {
- var k = quad.pointCharge * dn * dn;
- node.px -= dx * k;
- node.py -= dy * k;
- }
- }
- return !quad.charge;
- };
- }
- force.tick = function() {
- if ((alpha *= .99) < .005) {
- event.end({
- type: "end",
- alpha: alpha = 0
- });
- return true;
- }
- var n = nodes.length, m = links.length, q, i, o, s, t, l, k, x, y;
- for (i = 0; i < m; ++i) {
- o = links[i];
- s = o.source;
- t = o.target;
- x = t.x - s.x;
- y = t.y - s.y;
- if (l = x * x + y * y) {
- l = alpha * strengths[i] * ((l = Math.sqrt(l)) - distances[i]) / l;
- x *= l;
- y *= l;
- t.x -= x * (k = s.weight / (t.weight + s.weight));
- t.y -= y * k;
- s.x += x * (k = 1 - k);
- s.y += y * k;
- }
- }
- if (k = alpha * gravity) {
- x = size[0] / 2;
- y = size[1] / 2;
- i = -1;
- if (k) while (++i < n) {
- o = nodes[i];
- o.x += (x - o.x) * k;
- o.y += (y - o.y) * k;
- }
- }
- if (charge) {
- d3_layout_forceAccumulate(q = d3.geom.quadtree(nodes), alpha, charges);
- i = -1;
- while (++i < n) {
- if (!(o = nodes[i]).fixed) {
- q.visit(repulse(o));
- }
- }
- }
- i = -1;
- while (++i < n) {
- o = nodes[i];
- if (o.fixed) {
- o.x = o.px;
- o.y = o.py;
- } else {
- o.x -= (o.px - (o.px = o.x)) * friction;
- o.y -= (o.py - (o.py = o.y)) * friction;
- }
- }
- event.tick({
- type: "tick",
- alpha: alpha
- });
- };
- force.nodes = function(x) {
- if (!arguments.length) return nodes;
- nodes = x;
- return force;
- };
- force.links = function(x) {
- if (!arguments.length) return links;
- links = x;
- return force;
- };
- force.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return force;
- };
- force.linkDistance = function(x) {
- if (!arguments.length) return linkDistance;
- linkDistance = typeof x === "function" ? x : +x;
- return force;
- };
- force.distance = force.linkDistance;
- force.linkStrength = function(x) {
- if (!arguments.length) return linkStrength;
- linkStrength = typeof x === "function" ? x : +x;
- return force;
- };
- force.friction = function(x) {
- if (!arguments.length) return friction;
- friction = +x;
- return force;
- };
- force.charge = function(x) {
- if (!arguments.length) return charge;
- charge = typeof x === "function" ? x : +x;
- return force;
- };
- force.gravity = function(x) {
- if (!arguments.length) return gravity;
- gravity = +x;
- return force;
- };
- force.theta = function(x) {
- if (!arguments.length) return theta;
- theta = +x;
- return force;
- };
- force.alpha = function(x) {
- if (!arguments.length) return alpha;
- x = +x;
- if (alpha) {
- if (x > 0) alpha = x; else alpha = 0;
- } else if (x > 0) {
- event.start({
- type: "start",
- alpha: alpha = x
- });
- d3.timer(force.tick);
- }
- return force;
- };
- force.start = function() {
- var i, j, n = nodes.length, m = links.length, w = size[0], h = size[1], neighbors, o;
- for (i = 0; i < n; ++i) {
- (o = nodes[i]).index = i;
- o.weight = 0;
- }
- for (i = 0; i < m; ++i) {
- o = links[i];
- if (typeof o.source == "number") o.source = nodes[o.source];
- if (typeof o.target == "number") o.target = nodes[o.target];
- ++o.source.weight;
- ++o.target.weight;
- }
- for (i = 0; i < n; ++i) {
- o = nodes[i];
- if (isNaN(o.x)) o.x = position("x", w);
- if (isNaN(o.y)) o.y = position("y", h);
- if (isNaN(o.px)) o.px = o.x;
- if (isNaN(o.py)) o.py = o.y;
- }
- distances = [];
- if (typeof linkDistance === "function") for (i = 0; i < m; ++i) distances[i] = +linkDistance.call(this, links[i], i); else for (i = 0; i < m; ++i) distances[i] = linkDistance;
- strengths = [];
- if (typeof linkStrength === "function") for (i = 0; i < m; ++i) strengths[i] = +linkStrength.call(this, links[i], i); else for (i = 0; i < m; ++i) strengths[i] = linkStrength;
- charges = [];
- if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;
- function position(dimension, size) {
- var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
- while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
- return Math.random() * size;
- }
- function neighbor() {
- if (!neighbors) {
- neighbors = [];
- for (j = 0; j < n; ++j) {
- neighbors[j] = [];
- }
- for (j = 0; j < m; ++j) {
- var o = links[j];
- neighbors[o.source.index].push(o.target);
- neighbors[o.target.index].push(o.source);
- }
- }
- return neighbors[i];
- }
- return force.resume();
- };
- force.resume = function() {
- return force.alpha(.1);
- };
- force.stop = function() {
- return force.alpha(0);
- };
- force.drag = function() {
- if (!drag) drag = d3.behavior.drag().origin(d3_identity).on("dragstart.force", d3_layout_forceDragstart).on("drag.force", dragmove).on("dragend.force", d3_layout_forceDragend);
- if (!arguments.length) return drag;
- this.on("mouseover.force", d3_layout_forceMouseover).on("mouseout.force", d3_layout_forceMouseout).call(drag);
- };
- function dragmove(d) {
- d.px = d3.event.x, d.py = d3.event.y;
- force.resume();
- }
- return d3.rebind(force, event, "on");
- };
- function d3_layout_forceDragstart(d) {
- d.fixed |= 2;
- }
- function d3_layout_forceDragend(d) {
- d.fixed &= ~6;
- }
- function d3_layout_forceMouseover(d) {
- d.fixed |= 4;
- d.px = d.x, d.py = d.y;
- }
- function d3_layout_forceMouseout(d) {
- d.fixed &= ~4;
- }
- function d3_layout_forceAccumulate(quad, alpha, charges) {
- var cx = 0, cy = 0;
- quad.charge = 0;
- if (!quad.leaf) {
- var nodes = quad.nodes, n = nodes.length, i = -1, c;
- while (++i < n) {
- c = nodes[i];
- if (c == null) continue;
- d3_layout_forceAccumulate(c, alpha, charges);
- quad.charge += c.charge;
- cx += c.charge * c.cx;
- cy += c.charge * c.cy;
- }
- }
- if (quad.point) {
- if (!quad.leaf) {
- quad.point.x += Math.random() - .5;
- quad.point.y += Math.random() - .5;
- }
- var k = alpha * charges[quad.point.index];
- quad.charge += quad.pointCharge = k;
- cx += k * quad.point.x;
- cy += k * quad.point.y;
- }
- quad.cx = cx / quad.charge;
- quad.cy = cy / quad.charge;
- }
- var d3_layout_forceLinkDistance = 20, d3_layout_forceLinkStrength = 1;
- d3.layout.hierarchy = function() {
- var sort = d3_layout_hierarchySort, children = d3_layout_hierarchyChildren, value = d3_layout_hierarchyValue;
- function recurse(node, depth, nodes) {
- var childs = children.call(hierarchy, node, depth);
- node.depth = depth;
- nodes.push(node);
- if (childs && (n = childs.length)) {
- var i = -1, n, c = node.children = [], v = 0, j = depth + 1, d;
- while (++i < n) {
- d = recurse(childs[i], j, nodes);
- d.parent = node;
- c.push(d);
- v += d.value;
- }
- if (sort) c.sort(sort);
- if (value) node.value = v;
- } else if (value) {
- node.value = +value.call(hierarchy, node, depth) || 0;
- }
- return node;
- }
- function revalue(node, depth) {
- var children = node.children, v = 0;
- if (children && (n = children.length)) {
- var i = -1, n, j = depth + 1;
- while (++i < n) v += revalue(children[i], j);
- } else if (value) {
- v = +value.call(hierarchy, node, depth) || 0;
- }
- if (value) node.value = v;
- return v;
- }
- function hierarchy(d) {
- var nodes = [];
- recurse(d, 0, nodes);
- return nodes;
- }
- hierarchy.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return hierarchy;
- };
- hierarchy.children = function(x) {
- if (!arguments.length) return children;
- children = x;
- return hierarchy;
- };
- hierarchy.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return hierarchy;
- };
- hierarchy.revalue = function(root) {
- revalue(root, 0);
- return root;
- };
- return hierarchy;
- };
- function d3_layout_hierarchyRebind(object, hierarchy) {
- d3.rebind(object, hierarchy, "sort", "children", "value");
- object.nodes = object;
- object.links = d3_layout_hierarchyLinks;
- return object;
- }
- function d3_layout_hierarchyChildren(d) {
- return d.children;
- }
- function d3_layout_hierarchyValue(d) {
- return d.value;
- }
- function d3_layout_hierarchySort(a, b) {
- return b.value - a.value;
- }
- function d3_layout_hierarchyLinks(nodes) {
- return d3.merge(nodes.map(function(parent) {
- return (parent.children || []).map(function(child) {
- return {
- source: parent,
- target: child
- };
- });
- }));
- }
- d3.layout.partition = function() {
- var hierarchy = d3.layout.hierarchy(), size = [ 1, 1 ];
- function position(node, x, dx, dy) {
- var children = node.children;
- node.x = x;
- node.y = node.depth * dy;
- node.dx = dx;
- node.dy = dy;
- if (children && (n = children.length)) {
- var i = -1, n, c, d;
- dx = node.value ? dx / node.value : 0;
- while (++i < n) {
- position(c = children[i], x, d = c.value * dx, dy);
- x += d;
- }
- }
- }
- function depth(node) {
- var children = node.children, d = 0;
- if (children && (n = children.length)) {
- var i = -1, n;
- while (++i < n) d = Math.max(d, depth(children[i]));
- }
- return 1 + d;
- }
- function partition(d, i) {
- var nodes = hierarchy.call(this, d, i);
- position(nodes[0], 0, size[0], size[1] / depth(nodes[0]));
- return nodes;
- }
- partition.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return partition;
- };
- return d3_layout_hierarchyRebind(partition, hierarchy);
- };
- d3.layout.pie = function() {
- var value = Number, sort = d3_layout_pieSortByValue, startAngle = 0, endAngle = 2 * π;
- function pie(data) {
- var values = data.map(function(d, i) {
- return +value.call(pie, d, i);
- });
- var a = +(typeof startAngle === "function" ? startAngle.apply(this, arguments) : startAngle);
- var k = ((typeof endAngle === "function" ? endAngle.apply(this, arguments) : endAngle) - a) / d3.sum(values);
- var index = d3.range(data.length);
- if (sort != null) index.sort(sort === d3_layout_pieSortByValue ? function(i, j) {
- return values[j] - values[i];
- } : function(i, j) {
- return sort(data[i], data[j]);
- });
- var arcs = [];
- index.forEach(function(i) {
- var d;
- arcs[i] = {
- data: data[i],
- value: d = values[i],
- startAngle: a,
- endAngle: a += d * k
- };
- });
- return arcs;
- }
- pie.value = function(x) {
- if (!arguments.length) return value;
- value = x;
- return pie;
- };
- pie.sort = function(x) {
- if (!arguments.length) return sort;
- sort = x;
- return pie;
- };
- pie.startAngle = function(x) {
- if (!arguments.length) return startAngle;
- startAngle = x;
- return pie;
- };
- pie.endAngle = function(x) {
- if (!arguments.length) return endAngle;
- endAngle = x;
- return pie;
- };
- return pie;
- };
- var d3_layout_pieSortByValue = {};
- d3.layout.stack = function() {
- var values = d3_identity, order = d3_layout_stackOrderDefault, offset = d3_layout_stackOffsetZero, out = d3_layout_stackOut, x = d3_layout_stackX, y = d3_layout_stackY;
- function stack(data, index) {
- var series = data.map(function(d, i) {
- return values.call(stack, d, i);
- });
- var points = series.map(function(d) {
- return d.map(function(v, i) {
- return [ x.call(stack, v, i), y.call(stack, v, i) ];
- });
- });
- var orders = order.call(stack, points, index);
- series = d3.permute(series, orders);
- points = d3.permute(points, orders);
- var offsets = offset.call(stack, points, index);
- var n = series.length, m = series[0].length, i, j, o;
- for (j = 0; j < m; ++j) {
- out.call(stack, series[0][j], o = offsets[j], points[0][j][1]);
- for (i = 1; i < n; ++i) {
- out.call(stack, series[i][j], o += points[i - 1][j][1], points[i][j][1]);
- }
- }
- return data;
- }
- stack.values = function(x) {
- if (!arguments.length) return values;
- values = x;
- return stack;
- };
- stack.order = function(x) {
- if (!arguments.length) return order;
- order = typeof x === "function" ? x : d3_layout_stackOrders.get(x) || d3_layout_stackOrderDefault;
- return stack;
- };
- stack.offset = function(x) {
- if (!arguments.length) return offset;
- offset = typeof x === "function" ? x : d3_layout_stackOffsets.get(x) || d3_layout_stackOffsetZero;
- return stack;
- };
- stack.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return stack;
- };
- stack.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return stack;
- };
- stack.out = function(z) {
- if (!arguments.length) return out;
- out = z;
- return stack;
- };
- return stack;
- };
- function d3_layout_stackX(d) {
- return d.x;
- }
- function d3_layout_stackY(d) {
- return d.y;
- }
- function d3_layout_stackOut(d, y0, y) {
- d.y0 = y0;
- d.y = y;
- }
- var d3_layout_stackOrders = d3.map({
- "inside-out": function(data) {
- var n = data.length, i, j, max = data.map(d3_layout_stackMaxIndex), sums = data.map(d3_layout_stackReduceSum), index = d3.range(n).sort(function(a, b) {
- return max[a] - max[b];
- }), top = 0, bottom = 0, tops = [], bottoms = [];
- for (i = 0; i < n; ++i) {
- j = index[i];
- if (top < bottom) {
- top += sums[j];
- tops.push(j);
- } else {
- bottom += sums[j];
- bottoms.push(j);
- }
- }
- return bottoms.reverse().concat(tops);
- },
- reverse: function(data) {
- return d3.range(data.length).reverse();
- },
- "default": d3_layout_stackOrderDefault
- });
- var d3_layout_stackOffsets = d3.map({
- silhouette: function(data) {
- var n = data.length, m = data[0].length, sums = [], max = 0, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o > max) max = o;
- sums.push(o);
- }
- for (j = 0; j < m; ++j) {
- y0[j] = (max - sums[j]) / 2;
- }
- return y0;
- },
- wiggle: function(data) {
- var n = data.length, x = data[0], m = x.length, i, j, k, s1, s2, s3, dx, o, o0, y0 = [];
- y0[0] = o = o0 = 0;
- for (j = 1; j < m; ++j) {
- for (i = 0, s1 = 0; i < n; ++i) s1 += data[i][j][1];
- for (i = 0, s2 = 0, dx = x[j][0] - x[j - 1][0]; i < n; ++i) {
- for (k = 0, s3 = (data[i][j][1] - data[i][j - 1][1]) / (2 * dx); k < i; ++k) {
- s3 += (data[k][j][1] - data[k][j - 1][1]) / dx;
- }
- s2 += s3 * data[i][j][1];
- }
- y0[j] = o -= s1 ? s2 / s1 * dx : 0;
- if (o < o0) o0 = o;
- }
- for (j = 0; j < m; ++j) y0[j] -= o0;
- return y0;
- },
- expand: function(data) {
- var n = data.length, m = data[0].length, k = 1 / n, i, j, o, y0 = [];
- for (j = 0; j < m; ++j) {
- for (i = 0, o = 0; i < n; i++) o += data[i][j][1];
- if (o) for (i = 0; i < n; i++) data[i][j][1] /= o; else for (i = 0; i < n; i++) data[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- },
- zero: d3_layout_stackOffsetZero
- });
- function d3_layout_stackOrderDefault(data) {
- return d3.range(data.length);
- }
- function d3_layout_stackOffsetZero(data) {
- var j = -1, m = data[0].length, y0 = [];
- while (++j < m) y0[j] = 0;
- return y0;
- }
- function d3_layout_stackMaxIndex(array) {
- var i = 1, j = 0, v = array[0][1], k, n = array.length;
- for (;i < n; ++i) {
- if ((k = array[i][1]) > v) {
- j = i;
- v = k;
- }
- }
- return j;
- }
- function d3_layout_stackReduceSum(d) {
- return d.reduce(d3_layout_stackSum, 0);
- }
- function d3_layout_stackSum(p, d) {
- return p + d[1];
- }
- d3.layout.histogram = function() {
- var frequency = true, valuer = Number, ranger = d3_layout_histogramRange, binner = d3_layout_histogramBinSturges;
- function histogram(data, i) {
- var bins = [], values = data.map(valuer, this), range = ranger.call(this, values, i), thresholds = binner.call(this, range, values, i), bin, i = -1, n = values.length, m = thresholds.length - 1, k = frequency ? 1 : 1 / n, x;
- while (++i < m) {
- bin = bins[i] = [];
- bin.dx = thresholds[i + 1] - (bin.x = thresholds[i]);
- bin.y = 0;
- }
- if (m > 0) {
- i = -1;
- while (++i < n) {
- x = values[i];
- if (x >= range[0] && x <= range[1]) {
- bin = bins[d3.bisect(thresholds, x, 1, m) - 1];
- bin.y += k;
- bin.push(data[i]);
- }
- }
- }
- return bins;
- }
- histogram.value = function(x) {
- if (!arguments.length) return valuer;
- valuer = x;
- return histogram;
- };
- histogram.range = function(x) {
- if (!arguments.length) return ranger;
- ranger = d3_functor(x);
- return histogram;
- };
- histogram.bins = function(x) {
- if (!arguments.length) return binner;
- binner = typeof x === "number" ? function(range) {
- return d3_layout_histogramBinFixed(range, x);
- } : d3_functor(x);
- return histogram;
- };
- histogram.frequency = function(x) {
- if (!arguments.length) return frequency;
- frequency = !!x;
- return histogram;
- };
- return histogram;
- };
- function d3_layout_histogramBinSturges(range, values) {
- return d3_layout_histogramBinFixed(range, Math.ceil(Math.log(values.length) / Math.LN2 + 1));
- }
- function d3_layout_histogramBinFixed(range, n) {
- var x = -1, b = +range[0], m = (range[1] - b) / n, f = [];
- while (++x <= n) f[x] = m * x + b;
- return f;
- }
- function d3_layout_histogramRange(values) {
- return [ d3.min(values), d3.max(values) ];
- }
- d3.layout.tree = function() {
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- function tree(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- function firstWalk(node, previousSibling) {
- var children = node.children, layout = node._tree;
- if (children && (n = children.length)) {
- var n, firstChild = children[0], previousChild, ancestor = firstChild, child, i = -1;
- while (++i < n) {
- child = children[i];
- firstWalk(child, previousChild);
- ancestor = apportion(child, previousChild, ancestor);
- previousChild = child;
- }
- d3_layout_treeShift(node);
- var midpoint = .5 * (firstChild._tree.prelim + child._tree.prelim);
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- layout.mod = layout.prelim - midpoint;
- } else {
- layout.prelim = midpoint;
- }
- } else {
- if (previousSibling) {
- layout.prelim = previousSibling._tree.prelim + separation(node, previousSibling);
- }
- }
- }
- function secondWalk(node, x) {
- node.x = node._tree.prelim + x;
- var children = node.children;
- if (children && (n = children.length)) {
- var i = -1, n;
- x += node._tree.mod;
- while (++i < n) {
- secondWalk(children[i], x);
- }
- }
- }
- function apportion(node, previousSibling, ancestor) {
- if (previousSibling) {
- var vip = node, vop = node, vim = previousSibling, vom = node.parent.children[0], sip = vip._tree.mod, sop = vop._tree.mod, sim = vim._tree.mod, som = vom._tree.mod, shift;
- while (vim = d3_layout_treeRight(vim), vip = d3_layout_treeLeft(vip), vim && vip) {
- vom = d3_layout_treeLeft(vom);
- vop = d3_layout_treeRight(vop);
- vop._tree.ancestor = node;
- shift = vim._tree.prelim + sim - vip._tree.prelim - sip + separation(vim, vip);
- if (shift > 0) {
- d3_layout_treeMove(d3_layout_treeAncestor(vim, node, ancestor), node, shift);
- sip += shift;
- sop += shift;
- }
- sim += vim._tree.mod;
- sip += vip._tree.mod;
- som += vom._tree.mod;
- sop += vop._tree.mod;
- }
- if (vim && !d3_layout_treeRight(vop)) {
- vop._tree.thread = vim;
- vop._tree.mod += sim - sop;
- }
- if (vip && !d3_layout_treeLeft(vom)) {
- vom._tree.thread = vip;
- vom._tree.mod += sip - som;
- ancestor = node;
- }
- }
- return ancestor;
- }
- d3_layout_treeVisitAfter(root, function(node, previousSibling) {
- node._tree = {
- ancestor: node,
- prelim: 0,
- mod: 0,
- change: 0,
- shift: 0,
- number: previousSibling ? previousSibling._tree.number + 1 : 0
- };
- });
- firstWalk(root);
- secondWalk(root, -root._tree.prelim);
- var left = d3_layout_treeSearch(root, d3_layout_treeLeftmost), right = d3_layout_treeSearch(root, d3_layout_treeRightmost), deep = d3_layout_treeSearch(root, d3_layout_treeDeepest), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2, y1 = deep.depth || 1;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = node.depth / y1 * size[1];
- delete node._tree;
- });
- return nodes;
- }
- tree.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return tree;
- };
- tree.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return tree;
- };
- return d3_layout_hierarchyRebind(tree, hierarchy);
- };
- function d3_layout_treeSeparation(a, b) {
- return a.parent == b.parent ? 1 : 2;
- }
- function d3_layout_treeLeft(node) {
- var children = node.children;
- return children && children.length ? children[0] : node._tree.thread;
- }
- function d3_layout_treeRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? children[n - 1] : node._tree.thread;
- }
- function d3_layout_treeSearch(node, compare) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, n, i = -1;
- while (++i < n) {
- if (compare(child = d3_layout_treeSearch(children[i], compare), node) > 0) {
- node = child;
- }
- }
- }
- return node;
- }
- function d3_layout_treeRightmost(a, b) {
- return a.x - b.x;
- }
- function d3_layout_treeLeftmost(a, b) {
- return b.x - a.x;
- }
- function d3_layout_treeDeepest(a, b) {
- return a.depth - b.depth;
- }
- function d3_layout_treeVisitAfter(node, callback) {
- function visit(node, previousSibling) {
- var children = node.children;
- if (children && (n = children.length)) {
- var child, previousChild = null, i = -1, n;
- while (++i < n) {
- child = children[i];
- visit(child, previousChild);
- previousChild = child;
- }
- }
- callback(node, previousSibling);
- }
- visit(node, null);
- }
- function d3_layout_treeShift(node) {
- var shift = 0, change = 0, children = node.children, i = children.length, child;
- while (--i >= 0) {
- child = children[i]._tree;
- child.prelim += shift;
- child.mod += shift;
- shift += child.shift + (change += child.change);
- }
- }
- function d3_layout_treeMove(ancestor, node, shift) {
- ancestor = ancestor._tree;
- node = node._tree;
- var change = shift / (node.number - ancestor.number);
- ancestor.change += change;
- node.change -= change;
- node.shift += shift;
- node.prelim += shift;
- node.mod += shift;
- }
- function d3_layout_treeAncestor(vim, node, ancestor) {
- return vim._tree.ancestor.parent == node.parent ? vim._tree.ancestor : ancestor;
- }
- d3.layout.pack = function() {
- var hierarchy = d3.layout.hierarchy().sort(d3_layout_packSort), padding = 0, size = [ 1, 1 ];
- function pack(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0];
- root.x = 0;
- root.y = 0;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r = Math.sqrt(d.value);
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- var w = size[0], h = size[1], k = Math.max(2 * root.r / w, 2 * root.r / h);
- if (padding > 0) {
- var dr = padding * k / 2;
- d3_layout_treeVisitAfter(root, function(d) {
- d.r += dr;
- });
- d3_layout_treeVisitAfter(root, d3_layout_packSiblings);
- d3_layout_treeVisitAfter(root, function(d) {
- d.r -= dr;
- });
- k = Math.max(2 * root.r / w, 2 * root.r / h);
- }
- d3_layout_packTransform(root, w / 2, h / 2, 1 / k);
- return nodes;
- }
- pack.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return pack;
- };
- pack.padding = function(_) {
- if (!arguments.length) return padding;
- padding = +_;
- return pack;
- };
- return d3_layout_hierarchyRebind(pack, hierarchy);
- };
- function d3_layout_packSort(a, b) {
- return a.value - b.value;
- }
- function d3_layout_packInsert(a, b) {
- var c = a._pack_next;
- a._pack_next = b;
- b._pack_prev = a;
- b._pack_next = c;
- c._pack_prev = b;
- }
- function d3_layout_packSplice(a, b) {
- a._pack_next = b;
- b._pack_prev = a;
- }
- function d3_layout_packIntersects(a, b) {
- var dx = b.x - a.x, dy = b.y - a.y, dr = a.r + b.r;
- return dr * dr - dx * dx - dy * dy > .001;
- }
- function d3_layout_packSiblings(node) {
- if (!(nodes = node.children) || !(n = nodes.length)) return;
- var nodes, xMin = Infinity, xMax = -Infinity, yMin = Infinity, yMax = -Infinity, a, b, c, i, j, k, n;
- function bound(node) {
- xMin = Math.min(node.x - node.r, xMin);
- xMax = Math.max(node.x + node.r, xMax);
- yMin = Math.min(node.y - node.r, yMin);
- yMax = Math.max(node.y + node.r, yMax);
- }
- nodes.forEach(d3_layout_packLink);
- a = nodes[0];
- a.x = -a.r;
- a.y = 0;
- bound(a);
- if (n > 1) {
- b = nodes[1];
- b.x = b.r;
- b.y = 0;
- bound(b);
- if (n > 2) {
- c = nodes[2];
- d3_layout_packPlace(a, b, c);
- bound(c);
- d3_layout_packInsert(a, c);
- a._pack_prev = c;
- d3_layout_packInsert(c, b);
- b = a._pack_next;
- for (i = 3; i < n; i++) {
- d3_layout_packPlace(a, b, c = nodes[i]);
- var isect = 0, s1 = 1, s2 = 1;
- for (j = b._pack_next; j !== b; j = j._pack_next, s1++) {
- if (d3_layout_packIntersects(j, c)) {
- isect = 1;
- break;
- }
- }
- if (isect == 1) {
- for (k = a._pack_prev; k !== j._pack_prev; k = k._pack_prev, s2++) {
- if (d3_layout_packIntersects(k, c)) {
- break;
- }
- }
- }
- if (isect) {
- if (s1 < s2 || s1 == s2 && b.r < a.r) d3_layout_packSplice(a, b = j); else d3_layout_packSplice(a = k, b);
- i--;
- } else {
- d3_layout_packInsert(a, c);
- b = c;
- bound(c);
- }
- }
- }
- }
- var cx = (xMin + xMax) / 2, cy = (yMin + yMax) / 2, cr = 0;
- for (i = 0; i < n; i++) {
- c = nodes[i];
- c.x -= cx;
- c.y -= cy;
- cr = Math.max(cr, c.r + Math.sqrt(c.x * c.x + c.y * c.y));
- }
- node.r = cr;
- nodes.forEach(d3_layout_packUnlink);
- }
- function d3_layout_packLink(node) {
- node._pack_next = node._pack_prev = node;
- }
- function d3_layout_packUnlink(node) {
- delete node._pack_next;
- delete node._pack_prev;
- }
- function d3_layout_packTransform(node, x, y, k) {
- var children = node.children;
- node.x = x += k * node.x;
- node.y = y += k * node.y;
- node.r *= k;
- if (children) {
- var i = -1, n = children.length;
- while (++i < n) d3_layout_packTransform(children[i], x, y, k);
- }
- }
- function d3_layout_packPlace(a, b, c) {
- var db = a.r + c.r, dx = b.x - a.x, dy = b.y - a.y;
- if (db && (dx || dy)) {
- var da = b.r + c.r, dc = dx * dx + dy * dy;
- da *= da;
- db *= db;
- var x = .5 + (db - da) / (2 * dc), y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
- c.x = a.x + x * dx + y * dy;
- c.y = a.y + x * dy - y * dx;
- } else {
- c.x = a.x + db;
- c.y = a.y;
- }
- }
- d3.layout.cluster = function() {
- var hierarchy = d3.layout.hierarchy().sort(null).value(null), separation = d3_layout_treeSeparation, size = [ 1, 1 ];
- function cluster(d, i) {
- var nodes = hierarchy.call(this, d, i), root = nodes[0], previousNode, x = 0;
- d3_layout_treeVisitAfter(root, function(node) {
- var children = node.children;
- if (children && children.length) {
- node.x = d3_layout_clusterX(children);
- node.y = d3_layout_clusterY(children);
- } else {
- node.x = previousNode ? x += separation(node, previousNode) : 0;
- node.y = 0;
- previousNode = node;
- }
- });
- var left = d3_layout_clusterLeft(root), right = d3_layout_clusterRight(root), x0 = left.x - separation(left, right) / 2, x1 = right.x + separation(right, left) / 2;
- d3_layout_treeVisitAfter(root, function(node) {
- node.x = (node.x - x0) / (x1 - x0) * size[0];
- node.y = (1 - (root.y ? node.y / root.y : 1)) * size[1];
- });
- return nodes;
- }
- cluster.separation = function(x) {
- if (!arguments.length) return separation;
- separation = x;
- return cluster;
- };
- cluster.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return cluster;
- };
- return d3_layout_hierarchyRebind(cluster, hierarchy);
- };
- function d3_layout_clusterY(children) {
- return 1 + d3.max(children, function(child) {
- return child.y;
- });
- }
- function d3_layout_clusterX(children) {
- return children.reduce(function(x, child) {
- return x + child.x;
- }, 0) / children.length;
- }
- function d3_layout_clusterLeft(node) {
- var children = node.children;
- return children && children.length ? d3_layout_clusterLeft(children[0]) : node;
- }
- function d3_layout_clusterRight(node) {
- var children = node.children, n;
- return children && (n = children.length) ? d3_layout_clusterRight(children[n - 1]) : node;
- }
- d3.layout.treemap = function() {
- var hierarchy = d3.layout.hierarchy(), round = Math.round, size = [ 1, 1 ], padding = null, pad = d3_layout_treemapPadNull, sticky = false, stickies, mode = "squarify", ratio = .5 * (1 + Math.sqrt(5));
- function scale(children, k) {
- var i = -1, n = children.length, child, area;
- while (++i < n) {
- area = (child = children[i]).value * (k < 0 ? 0 : k);
- child.area = isNaN(area) || area <= 0 ? 0 : area;
- }
- }
- function squarify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), row = [], remaining = children.slice(), child, best = Infinity, score, u = mode === "slice" ? rect.dx : mode === "dice" ? rect.dy : mode === "slice-dice" ? node.depth & 1 ? rect.dy : rect.dx : Math.min(rect.dx, rect.dy), n;
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while ((n = remaining.length) > 0) {
- row.push(child = remaining[n - 1]);
- row.area += child.area;
- if (mode !== "squarify" || (score = worst(row, u)) <= best) {
- remaining.pop();
- best = score;
- } else {
- row.area -= row.pop().area;
- position(row, u, rect, false);
- u = Math.min(rect.dx, rect.dy);
- row.length = row.area = 0;
- best = Infinity;
- }
- }
- if (row.length) {
- position(row, u, rect, true);
- row.length = row.area = 0;
- }
- children.forEach(squarify);
- }
- }
- function stickify(node) {
- var children = node.children;
- if (children && children.length) {
- var rect = pad(node), remaining = children.slice(), child, row = [];
- scale(remaining, rect.dx * rect.dy / node.value);
- row.area = 0;
- while (child = remaining.pop()) {
- row.push(child);
- row.area += child.area;
- if (child.z != null) {
- position(row, child.z ? rect.dx : rect.dy, rect, !remaining.length);
- row.length = row.area = 0;
- }
- }
- children.forEach(stickify);
- }
- }
- function worst(row, u) {
- var s = row.area, r, rmax = 0, rmin = Infinity, i = -1, n = row.length;
- while (++i < n) {
- if (!(r = row[i].area)) continue;
- if (r < rmin) rmin = r;
- if (r > rmax) rmax = r;
- }
- s *= s;
- u *= u;
- return s ? Math.max(u * rmax * ratio / s, s / (u * rmin * ratio)) : Infinity;
- }
- function position(row, u, rect, flush) {
- var i = -1, n = row.length, x = rect.x, y = rect.y, v = u ? round(row.area / u) : 0, o;
- if (u == rect.dx) {
- if (flush || v > rect.dy) v = rect.dy;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dy = v;
- x += o.dx = Math.min(rect.x + rect.dx - x, v ? round(o.area / v) : 0);
- }
- o.z = true;
- o.dx += rect.x + rect.dx - x;
- rect.y += v;
- rect.dy -= v;
- } else {
- if (flush || v > rect.dx) v = rect.dx;
- while (++i < n) {
- o = row[i];
- o.x = x;
- o.y = y;
- o.dx = v;
- y += o.dy = Math.min(rect.y + rect.dy - y, v ? round(o.area / v) : 0);
- }
- o.z = false;
- o.dy += rect.y + rect.dy - y;
- rect.x += v;
- rect.dx -= v;
- }
- }
- function treemap(d) {
- var nodes = stickies || hierarchy(d), root = nodes[0];
- root.x = 0;
- root.y = 0;
- root.dx = size[0];
- root.dy = size[1];
- if (stickies) hierarchy.revalue(root);
- scale([ root ], root.dx * root.dy / root.value);
- (stickies ? stickify : squarify)(root);
- if (sticky) stickies = nodes;
- return nodes;
- }
- treemap.size = function(x) {
- if (!arguments.length) return size;
- size = x;
- return treemap;
- };
- treemap.padding = function(x) {
- if (!arguments.length) return padding;
- function padFunction(node) {
- var p = x.call(treemap, node, node.depth);
- return p == null ? d3_layout_treemapPadNull(node) : d3_layout_treemapPad(node, typeof p === "number" ? [ p, p, p, p ] : p);
- }
- function padConstant(node) {
- return d3_layout_treemapPad(node, x);
- }
- var type;
- pad = (padding = x) == null ? d3_layout_treemapPadNull : (type = typeof x) === "function" ? padFunction : type === "number" ? (x = [ x, x, x, x ],
- padConstant) : padConstant;
- return treemap;
- };
- treemap.round = function(x) {
- if (!arguments.length) return round != Number;
- round = x ? Math.round : Number;
- return treemap;
- };
- treemap.sticky = function(x) {
- if (!arguments.length) return sticky;
- sticky = x;
- stickies = null;
- return treemap;
- };
- treemap.ratio = function(x) {
- if (!arguments.length) return ratio;
- ratio = x;
- return treemap;
- };
- treemap.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return treemap;
- };
- return d3_layout_hierarchyRebind(treemap, hierarchy);
- };
- function d3_layout_treemapPadNull(node) {
- return {
- x: node.x,
- y: node.y,
- dx: node.dx,
- dy: node.dy
- };
- }
- function d3_layout_treemapPad(node, padding) {
- var x = node.x + padding[3], y = node.y + padding[0], dx = node.dx - padding[1] - padding[3], dy = node.dy - padding[0] - padding[2];
- if (dx < 0) {
- x += dx / 2;
- dx = 0;
- }
- if (dy < 0) {
- y += dy / 2;
- dy = 0;
- }
- return {
- x: x,
- y: y,
- dx: dx,
- dy: dy
- };
- }
- d3.random = {
- normal: function(µ, σ) {
- var n = arguments.length;
- if (n < 2) σ = 1;
- if (n < 1) µ = 0;
- return function() {
- var x, y, r;
- do {
- x = Math.random() * 2 - 1;
- y = Math.random() * 2 - 1;
- r = x * x + y * y;
- } while (!r || r > 1);
- return µ + σ * x * Math.sqrt(-2 * Math.log(r) / r);
- };
- },
- logNormal: function() {
- var random = d3.random.normal.apply(d3, arguments);
- return function() {
- return Math.exp(random());
- };
- },
- irwinHall: function(m) {
- return function() {
- for (var s = 0, j = 0; j < m; j++) s += Math.random();
- return s / m;
- };
- }
- };
- d3.scale = {};
- function d3_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_scaleRange(scale) {
- return scale.rangeExtent ? scale.rangeExtent() : d3_scaleExtent(scale.range());
- }
- function d3_scale_bilinear(domain, range, uninterpolate, interpolate) {
- var u = uninterpolate(domain[0], domain[1]), i = interpolate(range[0], range[1]);
- return function(x) {
- return i(u(x));
- };
- }
- function d3_scale_nice(domain, nice) {
- var i0 = 0, i1 = domain.length - 1, x0 = domain[i0], x1 = domain[i1], dx;
- if (x1 < x0) {
- dx = i0, i0 = i1, i1 = dx;
- dx = x0, x0 = x1, x1 = dx;
- }
- if (nice = nice(x1 - x0)) {
- domain[i0] = nice.floor(x0);
- domain[i1] = nice.ceil(x1);
- }
- return domain;
- }
- function d3_scale_polylinear(domain, range, uninterpolate, interpolate) {
- var u = [], i = [], j = 0, k = Math.min(domain.length, range.length) - 1;
- if (domain[k] < domain[0]) {
- domain = domain.slice().reverse();
- range = range.slice().reverse();
- }
- while (++j <= k) {
- u.push(uninterpolate(domain[j - 1], domain[j]));
- i.push(interpolate(range[j - 1], range[j]));
- }
- return function(x) {
- var j = d3.bisect(domain, x, 1, k) - 1;
- return i[j](u[j](x));
- };
- }
- d3.scale.linear = function() {
- return d3_scale_linear([ 0, 1 ], [ 0, 1 ], d3_interpolate, false);
- };
- function d3_scale_linear(domain, range, interpolate, clamp) {
- var output, input;
- function rescale() {
- var linear = Math.min(domain.length, range.length) > 2 ? d3_scale_polylinear : d3_scale_bilinear, uninterpolate = clamp ? d3_uninterpolateClamp : d3_uninterpolateNumber;
- output = linear(domain, range, uninterpolate, interpolate);
- input = linear(range, domain, uninterpolate, d3_interpolate);
- return scale;
- }
- function scale(x) {
- return output(x);
- }
- scale.invert = function(y) {
- return input(y);
- };
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(Number);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.rangeRound = function(x) {
- return scale.range(x).interpolate(d3_interpolateRound);
- };
- scale.clamp = function(x) {
- if (!arguments.length) return clamp;
- clamp = x;
- return rescale();
- };
- scale.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x;
- return rescale();
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- scale.tickFormat = function(m, format) {
- return d3_scale_linearTickFormat(domain, m, format);
- };
- scale.nice = function() {
- d3_scale_nice(domain, d3_scale_linearNice);
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_linear(domain, range, interpolate, clamp);
- };
- return rescale();
- }
- function d3_scale_linearRebind(scale, linear) {
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_scale_linearNice(dx) {
- dx = Math.pow(10, Math.round(Math.log(dx) / Math.LN10) - 1);
- return dx && {
- floor: function(x) {
- return Math.floor(x / dx) * dx;
- },
- ceil: function(x) {
- return Math.ceil(x / dx) * dx;
- }
- };
- }
- function d3_scale_linearTickRange(domain, m) {
- var extent = d3_scaleExtent(domain), span = extent[1] - extent[0], step = Math.pow(10, Math.floor(Math.log(span / m) / Math.LN10)), err = m / span * step;
- if (err <= .15) step *= 10; else if (err <= .35) step *= 5; else if (err <= .75) step *= 2;
- extent[0] = Math.ceil(extent[0] / step) * step;
- extent[1] = Math.floor(extent[1] / step) * step + step * .5;
- extent[2] = step;
- return extent;
- }
- function d3_scale_linearTicks(domain, m) {
- return d3.range.apply(d3, d3_scale_linearTickRange(domain, m));
- }
- function d3_scale_linearTickFormat(domain, m, format) {
- var precision = -Math.floor(Math.log(d3_scale_linearTickRange(domain, m)[2]) / Math.LN10 + .01);
- return d3.format(format ? format.replace(d3_format_re, function(a, b, c, d, e, f, g, h, i, j) {
- return [ b, c, d, e, f, g, h, i || "." + (precision - (j === "%") * 2), j ].join("");
- }) : ",." + precision + "f");
- }
- d3.scale.log = function() {
- return d3_scale_log(d3.scale.linear().domain([ 0, Math.LN10 ]), 10, d3_scale_logp, d3_scale_powp);
- };
- function d3_scale_log(linear, base, log, pow) {
- function scale(x) {
- return linear(log(x));
- }
- scale.invert = function(x) {
- return pow(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(pow);
- if (x[0] < 0) log = d3_scale_logn, pow = d3_scale_pown; else log = d3_scale_logp,
- pow = d3_scale_powp;
- linear.domain(x.map(log));
- return scale;
- };
- scale.base = function(_) {
- if (!arguments.length) return base;
- base = +_;
- return scale;
- };
- scale.nice = function() {
- linear.domain(d3_scale_nice(linear.domain(), d3_scale_logNice(base)));
- return scale;
- };
- scale.ticks = function() {
- var extent = d3_scaleExtent(linear.domain()), ticks = [];
- if (extent.every(isFinite)) {
- var b = Math.log(base), i = Math.floor(extent[0] / b), j = Math.ceil(extent[1] / b), u = pow(extent[0]), v = pow(extent[1]), n = base % 1 ? 2 : base;
- if (log === d3_scale_logn) {
- ticks.push(-Math.pow(base, -i));
- for (;i++ < j; ) for (var k = n - 1; k > 0; k--) ticks.push(-Math.pow(base, -i) * k);
- } else {
- for (;i < j; i++) for (var k = 1; k < n; k++) ticks.push(Math.pow(base, i) * k);
- ticks.push(Math.pow(base, i));
- }
- for (i = 0; ticks[i] < u; i++) {}
- for (j = ticks.length; ticks[j - 1] > v; j--) {}
- ticks = ticks.slice(i, j);
- }
- return ticks;
- };
- scale.tickFormat = function(n, format) {
- if (arguments.length < 2) format = d3_scale_logFormat;
- if (!arguments.length) return format;
- var b = Math.log(base), k = Math.max(.1, n / scale.ticks().length), f = log === d3_scale_logn ? (e = -1e-12,
- Math.floor) : (e = 1e-12, Math.ceil), e;
- return function(d) {
- return d / pow(b * f(log(d) / b + e)) <= k ? format(d) : "";
- };
- };
- scale.copy = function() {
- return d3_scale_log(linear.copy(), base, log, pow);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- var d3_scale_logFormat = d3.format(".0e");
- function d3_scale_logp(x) {
- return Math.log(x < 0 ? 0 : x);
- }
- function d3_scale_powp(x) {
- return Math.exp(x);
- }
- function d3_scale_logn(x) {
- return -Math.log(x > 0 ? 0 : -x);
- }
- function d3_scale_pown(x) {
- return -Math.exp(-x);
- }
- function d3_scale_logNice(base) {
- base = Math.log(base);
- var nice = {
- floor: function(x) {
- return Math.floor(x / base) * base;
- },
- ceil: function(x) {
- return Math.ceil(x / base) * base;
- }
- };
- return function() {
- return nice;
- };
- }
- d3.scale.pow = function() {
- return d3_scale_pow(d3.scale.linear(), 1);
- };
- function d3_scale_pow(linear, exponent) {
- var powp = d3_scale_powPow(exponent), powb = d3_scale_powPow(1 / exponent);
- function scale(x) {
- return linear(powp(x));
- }
- scale.invert = function(x) {
- return powb(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(powb);
- linear.domain(x.map(powp));
- return scale;
- };
- scale.ticks = function(m) {
- return d3_scale_linearTicks(scale.domain(), m);
- };
- scale.tickFormat = function(m, format) {
- return d3_scale_linearTickFormat(scale.domain(), m, format);
- };
- scale.nice = function() {
- return scale.domain(d3_scale_nice(scale.domain(), d3_scale_linearNice));
- };
- scale.exponent = function(x) {
- if (!arguments.length) return exponent;
- var domain = scale.domain();
- powp = d3_scale_powPow(exponent = x);
- powb = d3_scale_powPow(1 / exponent);
- return scale.domain(domain);
- };
- scale.copy = function() {
- return d3_scale_pow(linear.copy(), exponent);
- };
- return d3_scale_linearRebind(scale, linear);
- }
- function d3_scale_powPow(e) {
- return function(x) {
- return x < 0 ? -Math.pow(-x, e) : Math.pow(x, e);
- };
- }
- d3.scale.sqrt = function() {
- return d3.scale.pow().exponent(.5);
- };
- d3.scale.ordinal = function() {
- return d3_scale_ordinal([], {
- t: "range",
- a: [ [] ]
- });
- };
- function d3_scale_ordinal(domain, ranger) {
- var index, range, rangeBand;
- function scale(x) {
- return range[((index.get(x) || index.set(x, domain.push(x))) - 1) % range.length];
- }
- function steps(start, step) {
- return d3.range(domain.length).map(function(i) {
- return start + step * i;
- });
- }
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = [];
- index = new d3_Map();
- var i = -1, n = x.length, xi;
- while (++i < n) if (!index.has(xi = x[i])) index.set(xi, domain.push(xi));
- return scale[ranger.t].apply(scale, ranger.a);
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- rangeBand = 0;
- ranger = {
- t: "range",
- a: arguments
- };
- return scale;
- };
- scale.rangePoints = function(x, padding) {
- if (arguments.length < 2) padding = 0;
- var start = x[0], stop = x[1], step = (stop - start) / (Math.max(1, domain.length - 1) + padding);
- range = steps(domain.length < 2 ? (start + stop) / 2 : start + step * padding / 2, step);
- rangeBand = 0;
- ranger = {
- t: "rangePoints",
- a: arguments
- };
- return scale;
- };
- scale.rangeBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = (stop - start) / (domain.length - padding + 2 * outerPadding);
- range = steps(start + step * outerPadding, step);
- if (reverse) range.reverse();
- rangeBand = step * (1 - padding);
- ranger = {
- t: "rangeBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeRoundBands = function(x, padding, outerPadding) {
- if (arguments.length < 2) padding = 0;
- if (arguments.length < 3) outerPadding = padding;
- var reverse = x[1] < x[0], start = x[reverse - 0], stop = x[1 - reverse], step = Math.floor((stop - start) / (domain.length - padding + 2 * outerPadding)), error = stop - start - (domain.length - padding) * step;
- range = steps(start + Math.round(error / 2), step);
- if (reverse) range.reverse();
- rangeBand = Math.round(step * (1 - padding));
- ranger = {
- t: "rangeRoundBands",
- a: arguments
- };
- return scale;
- };
- scale.rangeBand = function() {
- //Customized
- if(rangeBand <= 50)
- return rangeBand;
- else
- return 50;
- };
- scale.rangeExtent = function() {
- return d3_scaleExtent(ranger.a[0]);
- };
- scale.copy = function() {
- return d3_scale_ordinal(domain, ranger);
- };
- return scale.domain(domain);
- }
- d3.scale.category10 = function() {
- return d3.scale.ordinal().range(d3_category10);
- };
- d3.scale.category20 = function() {
- return d3.scale.ordinal().range(d3_category20);
- };
- d3.scale.category20b = function() {
- return d3.scale.ordinal().range(d3_category20b);
- };
- d3.scale.category20c = function() {
- return d3.scale.ordinal().range(d3_category20c);
- };
- d3.scale.category50 = function() {
- return d3.scale.ordinal().range(d3_category50);
- };
- var d3_category10 = [ "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf" ];
- var d3_category20 = [ "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5" ];
- var d3_category20b = [ "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#e7ba52", "#e7cb94", "#843c39", "#ad494a", "#d6616b", "#e7969c", "#7b4173", "#a55194", "#ce6dbd", "#de9ed6" ];
- var d3_category20c = [ "#3182bd", "#6baed6", "#9ecae1", "#c6dbef", "#e6550d", "#fd8d3c", "#fdae6b", "#fdd0a2", "#31a354", "#74c476", "#a1d99b", "#c7e9c0", "#756bb1", "#9e9ac8", "#bcbddc", "#dadaeb", "#636363", "#969696", "#bdbdbd", "#d9d9d9" ];
- var d3_category50 = ["#1f77b4", "#ff7f0e", "#2ca02c", "#8c864b", "#9467bd", "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6", "#9edae5", "#393b79", "#5254a3", "#6b6ecf", "#9c9ede", "#637939", "#8ca252", "#b5cf6b", "#cedb9c", "#8c6d31", "#bd9e39", "#aec7e8", "#e7ba52", "#ffbb78", "#e7cb94", "#98df8a", "#843c39", "#ff9896", "#ad494a", "#c5b0d5", "#d6616b", "#c49c94", "#e7969c", "#f7b6d2", "#fd8d3c", "#c7c7c7", "#7b4173", "#dbdb8d", "#a55194", ];
- d3.scale.quantile = function() {
- return d3_scale_quantile([], []);
- };
- function d3_scale_quantile(domain, range) {
- var thresholds;
- function rescale() {
- var k = 0, q = range.length;
- thresholds = [];
- while (++k < q) thresholds[k - 1] = d3.quantile(domain, k / q);
- return scale;
- }
- function scale(x) {
- if (isNaN(x = +x)) return NaN;
- return range[d3.bisect(thresholds, x)];
- }
- scale.domain = function(x) {
- if (!arguments.length) return domain;
- domain = x.filter(function(d) {
- return !isNaN(d);
- }).sort(d3.ascending);
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.quantiles = function() {
- return thresholds;
- };
- scale.copy = function() {
- return d3_scale_quantile(domain, range);
- };
- return rescale();
- }
- d3.scale.quantize = function() {
- return d3_scale_quantize(0, 1, [ 0, 1 ]);
- };
- function d3_scale_quantize(x0, x1, range) {
- var kx, i;
- function scale(x) {
- return range[Math.max(0, Math.min(i, Math.floor(kx * (x - x0))))];
- }
- function rescale() {
- kx = range.length / (x1 - x0);
- i = range.length - 1;
- return scale;
- }
- scale.domain = function(x) {
- if (!arguments.length) return [ x0, x1 ];
- x0 = +x[0];
- x1 = +x[x.length - 1];
- return rescale();
- };
- scale.range = function(x) {
- if (!arguments.length) return range;
- range = x;
- return rescale();
- };
- scale.copy = function() {
- return d3_scale_quantize(x0, x1, range);
- };
- return rescale();
- }
- d3.scale.threshold = function() {
- return d3_scale_threshold([ .5 ], [ 0, 1 ]);
- };
- function d3_scale_threshold(domain, range) {
- function scale(x) {
- return range[d3.bisect(domain, x)];
- }
- scale.domain = function(_) {
- if (!arguments.length) return domain;
- domain = _;
- return scale;
- };
- scale.range = function(_) {
- if (!arguments.length) return range;
- range = _;
- return scale;
- };
- scale.copy = function() {
- return d3_scale_threshold(domain, range);
- };
- return scale;
- }
- d3.scale.identity = function() {
- return d3_scale_identity([ 0, 1 ]);
- };
- function d3_scale_identity(domain) {
- function identity(x) {
- return +x;
- }
- identity.invert = identity;
- identity.domain = identity.range = function(x) {
- if (!arguments.length) return domain;
- domain = x.map(identity);
- return identity;
- };
- identity.ticks = function(m) {
- return d3_scale_linearTicks(domain, m);
- };
- identity.tickFormat = function(m, format) {
- return d3_scale_linearTickFormat(domain, m, format);
- };
- identity.copy = function() {
- return d3_scale_identity(domain);
- };
- return identity;
- }
- d3.svg.arc = function() {
- var innerRadius = d3_svg_arcInnerRadius, outerRadius = d3_svg_arcOuterRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- function arc() {
- var r0 = innerRadius.apply(this, arguments), r1 = outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) + d3_svg_arcOffset, a1 = endAngle.apply(this, arguments) + d3_svg_arcOffset, da = (a1 < a0 && (da = a0,
- a0 = a1, a1 = da), a1 - a0), df = da < π ? "0" : "1", c0 = Math.cos(a0), s0 = Math.sin(a0), c1 = Math.cos(a1), s1 = Math.sin(a1);
- return da >= d3_svg_arcMax ? r0 ? "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "M0," + r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + -r0 + "A" + r0 + "," + r0 + " 0 1,0 0," + r0 + "Z" : "M0," + r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + -r1 + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 + "Z" : r0 ? "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L" + r0 * c1 + "," + r0 * s1 + "A" + r0 + "," + r0 + " 0 " + df + ",0 " + r0 * c0 + "," + r0 * s0 + "Z" : "M" + r1 * c0 + "," + r1 * s0 + "A" + r1 + "," + r1 + " 0 " + df + ",1 " + r1 * c1 + "," + r1 * s1 + "L0,0" + "Z";
- }
- arc.innerRadius = function(v) {
- if (!arguments.length) return innerRadius;
- innerRadius = d3_functor(v);
- return arc;
- };
- arc.outerRadius = function(v) {
- if (!arguments.length) return outerRadius;
- outerRadius = d3_functor(v);
- return arc;
- };
- arc.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return arc;
- };
- arc.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return arc;
- };
- arc.centroid = function() {
- var r = (innerRadius.apply(this, arguments) + outerRadius.apply(this, arguments)) / 2, a = (startAngle.apply(this, arguments) + endAngle.apply(this, arguments)) / 2 + d3_svg_arcOffset;
- return [ Math.cos(a) * r, Math.sin(a) * r ];
- };
- return arc;
- };
- var d3_svg_arcOffset = -π / 2, d3_svg_arcMax = 2 * π - 1e-6;
- function d3_svg_arcInnerRadius(d) {
- return d.innerRadius;
- }
- function d3_svg_arcOuterRadius(d) {
- return d.outerRadius;
- }
- function d3_svg_arcStartAngle(d) {
- return d.startAngle;
- }
- function d3_svg_arcEndAngle(d) {
- return d.endAngle;
- }
- d3.svg.line.radial = function() {
- var line = d3_svg_line(d3_svg_lineRadial);
- line.radius = line.x, delete line.x;
- line.angle = line.y, delete line.y;
- return line;
- };
- function d3_svg_lineRadial(points) {
- var point, i = -1, n = points.length, r, a;
- while (++i < n) {
- point = points[i];
- r = point[0];
- a = point[1] + d3_svg_arcOffset;
- point[0] = r * Math.cos(a);
- point[1] = r * Math.sin(a);
- }
- return points;
- }
- function d3_svg_area(projection) {
- var x0 = d3_svg_lineX, x1 = d3_svg_lineX, y0 = 0, y1 = d3_svg_lineY, defined = d3_true, interpolate = d3_svg_lineLinear, interpolateKey = interpolate.key, interpolateReverse = interpolate, L = "L", tension = .7;
- function area(data) {
- var segments = [], points0 = [], points1 = [], i = -1, n = data.length, d, fx0 = d3_functor(x0), fy0 = d3_functor(y0), fx1 = x0 === x1 ? function() {
- return x;
- } : d3_functor(x1), fy1 = y0 === y1 ? function() {
- return y;
- } : d3_functor(y1), x, y;
- function segment() {
- segments.push("M", interpolate(projection(points1), tension), L, interpolateReverse(projection(points0.reverse()), tension), "Z");
- }
- while (++i < n) {
- if (defined.call(this, d = data[i], i)) {
- points0.push([ x = +fx0.call(this, d, i), y = +fy0.call(this, d, i) ]);
- points1.push([ +fx1.call(this, d, i), +fy1.call(this, d, i) ]);
- } else if (points0.length) {
- segment();
- points0 = [];
- points1 = [];
- }
- }
- if (points0.length) segment();
- return segments.length ? segments.join("") : null;
- }
- area.x = function(_) {
- if (!arguments.length) return x1;
- x0 = x1 = _;
- return area;
- };
- area.x0 = function(_) {
- if (!arguments.length) return x0;
- x0 = _;
- return area;
- };
- area.x1 = function(_) {
- if (!arguments.length) return x1;
- x1 = _;
- return area;
- };
- area.y = function(_) {
- if (!arguments.length) return y1;
- y0 = y1 = _;
- return area;
- };
- area.y0 = function(_) {
- if (!arguments.length) return y0;
- y0 = _;
- return area;
- };
- area.y1 = function(_) {
- if (!arguments.length) return y1;
- y1 = _;
- return area;
- };
- area.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return area;
- };
- area.interpolate = function(_) {
- if (!arguments.length) return interpolateKey;
- if (typeof _ === "function") interpolateKey = interpolate = _; else interpolateKey = (interpolate = d3_svg_lineInterpolators.get(_) || d3_svg_lineLinear).key;
- interpolateReverse = interpolate.reverse || interpolate;
- L = interpolate.closed ? "M" : "L";
- return area;
- };
- area.tension = function(_) {
- if (!arguments.length) return tension;
- tension = _;
- return area;
- };
- return area;
- }
- d3_svg_lineStepBefore.reverse = d3_svg_lineStepAfter;
- d3_svg_lineStepAfter.reverse = d3_svg_lineStepBefore;
- d3.svg.area = function() {
- return d3_svg_area(d3_identity);
- };
- d3.svg.area.radial = function() {
- var area = d3_svg_area(d3_svg_lineRadial);
- area.radius = area.x, delete area.x;
- area.innerRadius = area.x0, delete area.x0;
- area.outerRadius = area.x1, delete area.x1;
- area.angle = area.y, delete area.y;
- area.startAngle = area.y0, delete area.y0;
- area.endAngle = area.y1, delete area.y1;
- return area;
- };
- d3.svg.chord = function() {
- var source = d3_source, target = d3_target, radius = d3_svg_chordRadius, startAngle = d3_svg_arcStartAngle, endAngle = d3_svg_arcEndAngle;
- function chord(d, i) {
- var s = subgroup(this, source, d, i), t = subgroup(this, target, d, i);
- return "M" + s.p0 + arc(s.r, s.p1, s.a1 - s.a0) + (equals(s, t) ? curve(s.r, s.p1, s.r, s.p0) : curve(s.r, s.p1, t.r, t.p0) + arc(t.r, t.p1, t.a1 - t.a0) + curve(t.r, t.p1, s.r, s.p0)) + "Z";
- }
- function subgroup(self, f, d, i) {
- var subgroup = f.call(self, d, i), r = radius.call(self, subgroup, i), a0 = startAngle.call(self, subgroup, i) + d3_svg_arcOffset, a1 = endAngle.call(self, subgroup, i) + d3_svg_arcOffset;
- return {
- r: r,
- a0: a0,
- a1: a1,
- p0: [ r * Math.cos(a0), r * Math.sin(a0) ],
- p1: [ r * Math.cos(a1), r * Math.sin(a1) ]
- };
- }
- function equals(a, b) {
- return a.a0 == b.a0 && a.a1 == b.a1;
- }
- function arc(r, p, a) {
- return "A" + r + "," + r + " 0 " + +(a > π) + ",1 " + p;
- }
- function curve(r0, p0, r1, p1) {
- return "Q 0,0 " + p1;
- }
- chord.radius = function(v) {
- if (!arguments.length) return radius;
- radius = d3_functor(v);
- return chord;
- };
- chord.source = function(v) {
- if (!arguments.length) return source;
- source = d3_functor(v);
- return chord;
- };
- chord.target = function(v) {
- if (!arguments.length) return target;
- target = d3_functor(v);
- return chord;
- };
- chord.startAngle = function(v) {
- if (!arguments.length) return startAngle;
- startAngle = d3_functor(v);
- return chord;
- };
- chord.endAngle = function(v) {
- if (!arguments.length) return endAngle;
- endAngle = d3_functor(v);
- return chord;
- };
- return chord;
- };
- function d3_svg_chordRadius(d) {
- return d.radius;
- }
- d3.svg.diagonal = function() {
- var source = d3_source, target = d3_target, projection = d3_svg_diagonalProjection;
- function diagonal(d, i) {
- var p0 = source.call(this, d, i), p3 = target.call(this, d, i), m = (p0.y + p3.y) / 2, p = [ p0, {
- x: p0.x,
- y: m
- }, {
- x: p3.x,
- y: m
- }, p3 ];
- p = p.map(projection);
- return "M" + p[0] + "C" + p[1] + " " + p[2] + " " + p[3];
- }
- diagonal.source = function(x) {
- if (!arguments.length) return source;
- source = d3_functor(x);
- return diagonal;
- };
- diagonal.target = function(x) {
- if (!arguments.length) return target;
- target = d3_functor(x);
- return diagonal;
- };
- diagonal.projection = function(x) {
- if (!arguments.length) return projection;
- projection = x;
- return diagonal;
- };
- return diagonal;
- };
- function d3_svg_diagonalProjection(d) {
- return [ d.x, d.y ];
- }
- d3.svg.diagonal.radial = function() {
- var diagonal = d3.svg.diagonal(), projection = d3_svg_diagonalProjection, projection_ = diagonal.projection;
- diagonal.projection = function(x) {
- return arguments.length ? projection_(d3_svg_diagonalRadialProjection(projection = x)) : projection;
- };
- return diagonal;
- };
- function d3_svg_diagonalRadialProjection(projection) {
- return function() {
- var d = projection.apply(this, arguments), r = d[0], a = d[1] + d3_svg_arcOffset;
- return [ r * Math.cos(a), r * Math.sin(a) ];
- };
- }
- d3.svg.symbol = function() {
- var type = d3_svg_symbolType, size = d3_svg_symbolSize;
- function symbol(d, i) {
- return (d3_svg_symbols.get(type.call(this, d, i)) || d3_svg_symbolCircle)(size.call(this, d, i));
- }
- symbol.type = function(x) {
- if (!arguments.length) return type;
- type = d3_functor(x);
- return symbol;
- };
- symbol.size = function(x) {
- if (!arguments.length) return size;
- size = d3_functor(x);
- return symbol;
- };
- return symbol;
- };
- function d3_svg_symbolSize() {
- return 64;
- }
- function d3_svg_symbolType() {
- return "circle";
- }
- function d3_svg_symbolCircle(size) {
- var r = Math.sqrt(size / π);
- return "M0," + r + "A" + r + "," + r + " 0 1,1 0," + -r + "A" + r + "," + r + " 0 1,1 0," + r + "Z";
- }
- var d3_svg_symbols = d3.map({
- circle: d3_svg_symbolCircle,
- cross: function(size) {
- var r = Math.sqrt(size / 5) / 2;
- return "M" + -3 * r + "," + -r + "H" + -r + "V" + -3 * r + "H" + r + "V" + -r + "H" + 3 * r + "V" + r + "H" + r + "V" + 3 * r + "H" + -r + "V" + r + "H" + -3 * r + "Z";
- },
- diamond: function(size) {
- var ry = Math.sqrt(size / (2 * d3_svg_symbolTan30)), rx = ry * d3_svg_symbolTan30;
- return "M0," + -ry + "L" + rx + ",0" + " 0," + ry + " " + -rx + ",0" + "Z";
- },
- square: function(size) {
- var r = Math.sqrt(size) / 2;
- return "M" + -r + "," + -r + "L" + r + "," + -r + " " + r + "," + r + " " + -r + "," + r + "Z";
- },
- "triangle-down": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + ry + "L" + rx + "," + -ry + " " + -rx + "," + -ry + "Z";
- },
- "triangle-up": function(size) {
- var rx = Math.sqrt(size / d3_svg_symbolSqrt3), ry = rx * d3_svg_symbolSqrt3 / 2;
- return "M0," + -ry + "L" + rx + "," + ry + " " + -rx + "," + ry + "Z";
- }
- });
- d3.svg.symbolTypes = d3_svg_symbols.keys();
- var d3_svg_symbolSqrt3 = Math.sqrt(3), d3_svg_symbolTan30 = Math.tan(30 * d3_radians);
- function d3_transition(groups, id) {
- d3_arraySubclass(groups, d3_transitionPrototype);
- groups.id = id;
- return groups;
- }
- var d3_transitionPrototype = [], d3_transitionId = 0, d3_transitionInheritId, d3_transitionInherit = {
- ease: d3_ease_cubicInOut,
- delay: 0,
- duration: 250
- };
- d3_transitionPrototype.call = d3_selectionPrototype.call;
- d3_transitionPrototype.empty = d3_selectionPrototype.empty;
- d3_transitionPrototype.node = d3_selectionPrototype.node;
- d3.transition = function(selection) {
- return arguments.length ? d3_transitionInheritId ? selection.transition() : selection : d3_selectionRoot.transition();
- };
- d3.transition.prototype = d3_transitionPrototype;
- d3_transitionPrototype.select = function(selector) {
- var id = this.id, subgroups = [], subgroup, subnode, node;
- if (typeof selector !== "function") selector = d3_selection_selector(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if ((node = group[i]) && (subnode = selector.call(node, node.__data__, i))) {
- if ("__data__" in node) subnode.__data__ = node.__data__;
- d3_transitionNode(subnode, i, id, node.__transition__[id]);
- subgroup.push(subnode);
- } else {
- subgroup.push(null);
- }
- }
- }
- return d3_transition(subgroups, id);
- };
- d3_transitionPrototype.selectAll = function(selector) {
- var id = this.id, subgroups = [], subgroup, subnodes, node, subnode, transition;
- if (typeof selector !== "function") selector = d3_selection_selectorAll(selector);
- for (var j = -1, m = this.length; ++j < m; ) {
- for (var group = this[j], i = -1, n = group.length; ++i < n; ) {
- if (node = group[i]) {
- transition = node.__transition__[id];
- subnodes = selector.call(node, node.__data__, i);
- subgroups.push(subgroup = []);
- for (var k = -1, o = subnodes.length; ++k < o; ) {
- d3_transitionNode(subnode = subnodes[k], k, id, transition);
- subgroup.push(subnode);
- }
- }
- }
- }
- return d3_transition(subgroups, id);
- };
- d3_transitionPrototype.filter = function(filter) {
- var subgroups = [], subgroup, group, node;
- if (typeof filter !== "function") filter = d3_selection_filter(filter);
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- if ((node = group[i]) && filter.call(node, node.__data__, i)) {
- subgroup.push(node);
- }
- }
- }
- return d3_transition(subgroups, this.id, this.time).ease(this.ease());
- };
- d3_transitionPrototype.tween = function(name, tween) {
- var id = this.id;
- if (arguments.length < 2) return this.node().__transition__[id].tween.get(name);
- return d3_selection_each(this, tween == null ? function(node) {
- node.__transition__[id].tween.remove(name);
- } : function(node) {
- node.__transition__[id].tween.set(name, tween);
- });
- };
- function d3_transition_tween(groups, name, value, tween) {
- var id = groups.id;
- return d3_selection_each(groups, typeof value === "function" ? function(node, i, j) {
- node.__transition__[id].tween.set(name, tween(value.call(node, node.__data__, i, j)));
- } : (value = tween(value), function(node) {
- node.__transition__[id].tween.set(name, value);
- }));
- }
- d3_transitionPrototype.attr = function(nameNS, value) {
- if (arguments.length < 2) {
- for (value in nameNS) this.attr(value, nameNS[value]);
- return this;
- }
- var interpolate = d3_interpolateByName(nameNS), name = d3.ns.qualify(nameNS);
- function attrNull() {
- this.removeAttribute(name);
- }
- function attrNullNS() {
- this.removeAttributeNS(name.space, name.local);
- }
- return d3_transition_tween(this, "attr." + nameNS, value, function(b) {
- function attrString() {
- var a = this.getAttribute(name), i;
- return a !== b && (i = interpolate(a, b), function(t) {
- this.setAttribute(name, i(t));
- });
- }
- function attrStringNS() {
- var a = this.getAttributeNS(name.space, name.local), i;
- return a !== b && (i = interpolate(a, b), function(t) {
- this.setAttributeNS(name.space, name.local, i(t));
- });
- }
- return b == null ? name.local ? attrNullNS : attrNull : (b += "", name.local ? attrStringNS : attrString);
- });
- };
- d3_transitionPrototype.attrTween = function(nameNS, tween) {
- var name = d3.ns.qualify(nameNS);
- function attrTween(d, i) {
- var f = tween.call(this, d, i, this.getAttribute(name));
- return f && function(t) {
- this.setAttribute(name, f(t));
- };
- }
- function attrTweenNS(d, i) {
- var f = tween.call(this, d, i, this.getAttributeNS(name.space, name.local));
- return f && function(t) {
- this.setAttributeNS(name.space, name.local, f(t));
- };
- }
- return this.tween("attr." + nameNS, name.local ? attrTweenNS : attrTween);
- };
- d3_transitionPrototype.style = function(name, value, priority) {
- var n = arguments.length;
- if (n < 3) {
- if (typeof name !== "string") {
- if (n < 2) value = "";
- for (priority in name) this.style(priority, name[priority], value);
- return this;
- }
- priority = "";
- }
- var interpolate = d3_interpolateByName(name);
- function styleNull() {
- this.style.removeProperty(name);
- }
- return d3_transition_tween(this, "style." + name, value, function(b) {
- function styleString() {
- var a = d3_window.getComputedStyle(this, null).getPropertyValue(name), i;
- return a !== b && (i = interpolate(a, b), function(t) {
- this.style.setProperty(name, i(t), priority);
- });
- }
- return b == null ? styleNull : (b += "", styleString);
- });
- };
- d3_transitionPrototype.styleTween = function(name, tween, priority) {
- if (arguments.length < 3) priority = "";
- return this.tween("style." + name, function(d, i) {
- var f = tween.call(this, d, i, d3_window.getComputedStyle(this, null).getPropertyValue(name));
- return f && function(t) {
- this.style.setProperty(name, f(t), priority);
- };
- });
- };
- d3_transitionPrototype.text = function(value) {
- return d3_transition_tween(this, "text", value, d3_transition_text);
- };
- function d3_transition_text(b) {
- if (b == null) b = "";
- return function() {
- this.textContent = b;
- };
- }
- d3_transitionPrototype.remove = function() {
- return this.each("end.transition", function() {
- var p;
- if (!this.__transition__ && (p = this.parentNode)) p.removeChild(this);
- });
- };
- d3_transitionPrototype.ease = function(value) {
- var id = this.id;
- if (arguments.length < 1) return this.node().__transition__[id].ease;
- if (typeof value !== "function") value = d3.ease.apply(d3, arguments);
- return d3_selection_each(this, function(node) {
- node.__transition__[id].ease = value;
- });
- };
- d3_transitionPrototype.delay = function(value) {
- var id = this.id;
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.__transition__[id].delay = value.call(node, node.__data__, i, j) | 0;
- } : (value |= 0, function(node) {
- node.__transition__[id].delay = value;
- }));
- };
- d3_transitionPrototype.duration = function(value) {
- var id = this.id;
- return d3_selection_each(this, typeof value === "function" ? function(node, i, j) {
- node.__transition__[id].duration = Math.max(1, value.call(node, node.__data__, i, j) | 0);
- } : (value = Math.max(1, value | 0), function(node) {
- node.__transition__[id].duration = value;
- }));
- };
- d3_transitionPrototype.each = function(type, listener) {
- var id = this.id;
- if (arguments.length < 2) {
- var inherit = d3_transitionInherit, inheritId = d3_transitionInheritId;
- d3_transitionInheritId = id;
- d3_selection_each(this, function(node, i, j) {
- d3_transitionInherit = node.__transition__[id];
- type.call(node, node.__data__, i, j);
- });
- d3_transitionInherit = inherit;
- d3_transitionInheritId = inheritId;
- } else {
- d3_selection_each(this, function(node) {
- node.__transition__[id].event.on(type, listener);
- });
- }
- return this;
- };
- d3_transitionPrototype.transition = function() {
- var id0 = this.id, id1 = ++d3_transitionId, subgroups = [], subgroup, group, node, transition;
- for (var j = 0, m = this.length; j < m; j++) {
- subgroups.push(subgroup = []);
- for (var group = this[j], i = 0, n = group.length; i < n; i++) {
- if (node = group[i]) {
- transition = Object.create(node.__transition__[id0]);
- transition.delay += transition.duration;
- d3_transitionNode(node, i, id1, transition);
- }
- subgroup.push(node);
- }
- }
- return d3_transition(subgroups, id1);
- };
- function d3_transitionNode(node, i, id, inherit) {
- var lock = node.__transition__ || (node.__transition__ = {
- active: 0,
- count: 0
- }), transition = lock[id];
- if (!transition) {
- var time = inherit.time;
- transition = lock[id] = {
- tween: new d3_Map(),
- event: d3.dispatch("start", "end"),
- time: time,
- ease: inherit.ease,
- delay: inherit.delay,
- duration: inherit.duration
- };
- ++lock.count;
- d3.timer(function(elapsed) {
- var d = node.__data__, ease = transition.ease, event = transition.event, delay = transition.delay, duration = transition.duration, tweened = [];
- return delay <= elapsed ? start(elapsed) : d3.timer(start, delay, time), 1;
- function start(elapsed) {
- if (lock.active > id) return stop();
- lock.active = id;
- event.start.call(node, d, i);
- transition.tween.forEach(function(key, value) {
- if (value = value.call(node, d, i)) {
- tweened.push(value);
- }
- });
- if (!tick(elapsed)) d3.timer(tick, 0, time);
- return 1;
- }
- function tick(elapsed) {
- if (lock.active !== id) return stop();
- var t = (elapsed - delay) / duration, e = ease(t), n = tweened.length;
- while (n > 0) {
- tweened[--n].call(node, e);
- }
- if (t >= 1) {
- stop();
- event.end.call(node, d, i);
- return 1;
- }
- }
- function stop() {
- if (--lock.count) delete lock[id]; else delete node.__transition__;
- return 1;
- }
- }, 0, time);
- return transition;
- }
- }
- d3.svg.axis = function() {
- var scale = d3.scale.linear(), orient = d3_svg_axisDefaultOrient, tickMajorSize = 6, tickMinorSize = 6, tickEndSize = 6, tickPadding = 3, tickArguments_ = [ 10 ], tickValues = null, tickFormat_, tickSubdivide = 0;
- function axis(g) {
- g.each(function() {
- var g = d3.select(this);
- var ticks = tickValues == null ? scale.ticks ? scale.ticks.apply(scale, tickArguments_) : scale.domain() : tickValues, tickFormat = tickFormat_ == null ? scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments_) : String : tickFormat_;
- var subticks = d3_svg_axisSubdivide(scale, ticks, tickSubdivide), subtick = g.selectAll(".tick.minor").data(subticks, String), subtickEnter = subtick.enter().insert("line", ".tick").attr("class", "tick minor").style("opacity", 1e-6), subtickExit = d3.transition(subtick.exit()).style("opacity", 1e-6).remove(), subtickUpdate = d3.transition(subtick).style("opacity", 1);
- var tick = g.selectAll(".tick.major").data(ticks, String), tickEnter = tick.enter().insert("g", "path").attr("class", "tick major").style("opacity", 1e-6), tickExit = d3.transition(tick.exit()).style("opacity", 1e-6).remove(), tickUpdate = d3.transition(tick).style("opacity", 1), tickTransform;
- var range = d3_scaleRange(scale), path = g.selectAll(".domain").data([ 0 ]), pathUpdate = (path.enter().append("path").attr("class", "domain"),
- d3.transition(path));
- var scale1 = scale.copy(), scale0 = this.__chart__ || scale1;
- this.__chart__ = scale1;
- tickEnter.append("line");
- tickEnter.append("text");
- var lineEnter = tickEnter.select("line"), lineUpdate = tickUpdate.select("line"), text = tick.select("text").text(tickFormat), textEnter = tickEnter.select("text"), textUpdate = tickUpdate.select("text");
- switch (orient) {
- case "bottom":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", tickMinorSize);
- lineEnter.attr("y2", tickMajorSize);
- textEnter.attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", 0).attr("y2", tickMajorSize);
- textUpdate.attr("x", 0).attr("y", Math.max(tickMajorSize, 0) + tickPadding);
- text.attr("dy", ".71em").style("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + tickEndSize + "V0H" + range[1] + "V" + tickEndSize);
- break;
- }
-
- case "top":
- {
- tickTransform = d3_svg_axisX;
- subtickEnter.attr("y2", -tickMinorSize);
- subtickUpdate.attr("x2", 0).attr("y2", -tickMinorSize);
- lineEnter.attr("y2", -tickMajorSize);
- textEnter.attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", 0).attr("y2", -tickMajorSize);
- textUpdate.attr("x", 0).attr("y", -(Math.max(tickMajorSize, 0) + tickPadding));
- text.attr("dy", "0em").style("text-anchor", "middle");
- pathUpdate.attr("d", "M" + range[0] + "," + -tickEndSize + "V0H" + range[1] + "V" + -tickEndSize);
- break;
- }
-
- case "left":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", -tickMinorSize);
- subtickUpdate.attr("x2", -tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", -tickMajorSize);
- textEnter.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding));
- lineUpdate.attr("x2", -tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", -(Math.max(tickMajorSize, 0) + tickPadding)).attr("y", 0);
- text.attr("dy", ".32em").style("text-anchor", "end");
- pathUpdate.attr("d", "M" + -tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + -tickEndSize);
- break;
- }
-
- case "right":
- {
- tickTransform = d3_svg_axisY;
- subtickEnter.attr("x2", tickMinorSize);
- subtickUpdate.attr("x2", tickMinorSize).attr("y2", 0);
- lineEnter.attr("x2", tickMajorSize);
- textEnter.attr("x", Math.max(tickMajorSize, 0) + tickPadding);
- lineUpdate.attr("x2", tickMajorSize).attr("y2", 0);
- textUpdate.attr("x", Math.max(tickMajorSize, 0) + tickPadding).attr("y", 0);
- text.attr("dy", ".32em").style("text-anchor", "start");
- pathUpdate.attr("d", "M" + tickEndSize + "," + range[0] + "H0V" + range[1] + "H" + tickEndSize);
- break;
- }
- }
- if (scale.ticks) {
- tickEnter.call(tickTransform, scale0);
- tickUpdate.call(tickTransform, scale1);
- tickExit.call(tickTransform, scale1);
- subtickEnter.call(tickTransform, scale0);
- subtickUpdate.call(tickTransform, scale1);
- subtickExit.call(tickTransform, scale1);
- } else {
- var dx = scale1.rangeBand() / 2, x = function(d) {
- return scale1(d) + dx;
- };
- tickEnter.call(tickTransform, x);
- tickUpdate.call(tickTransform, x);
- }
- });
- }
- axis.scale = function(x) {
- if (!arguments.length) return scale;
- scale = x;
- return axis;
- };
- axis.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x in d3_svg_axisOrients ? x + "" : d3_svg_axisDefaultOrient;
- return axis;
- };
- axis.ticks = function() {
- if (!arguments.length) return tickArguments_;
- tickArguments_ = arguments;
- return axis;
- };
- axis.tickValues = function(x) {
- if (!arguments.length) return tickValues;
- tickValues = x;
- return axis;
- };
- axis.tickFormat = function(x) {
- if (!arguments.length) return tickFormat_;
- tickFormat_ = x;
- return axis;
- };
- axis.tickSize = function(x, y) {
- if (!arguments.length) return tickMajorSize;
- var n = arguments.length - 1;
- tickMajorSize = +x;
- tickMinorSize = n > 1 ? +y : tickMajorSize;
- tickEndSize = n > 0 ? +arguments[n] : tickMajorSize;
- return axis;
- };
- axis.tickPadding = function(x) {
- if (!arguments.length) return tickPadding;
- tickPadding = +x;
- return axis;
- };
- axis.tickSubdivide = function(x) {
- if (!arguments.length) return tickSubdivide;
- tickSubdivide = +x;
- return axis;
- };
- return axis;
- };
- var d3_svg_axisDefaultOrient = "bottom", d3_svg_axisOrients = {
- top: 1,
- right: 1,
- bottom: 1,
- left: 1
- };
- function d3_svg_axisX(selection, x) {
- selection.attr("transform", function(d) {
- return "translate(" + x(d) + ",0)";
- });
- }
- function d3_svg_axisY(selection, y) {
- selection.attr("transform", function(d) {
- return "translate(0," + y(d) + ")";
- });
- }
- function d3_svg_axisSubdivide(scale, ticks, m) {
- subticks = [];
- if (m && ticks.length > 1) {
- var extent = d3_scaleExtent(scale.domain()), subticks, i = -1, n = ticks.length, d = (ticks[1] - ticks[0]) / ++m, j, v;
- while (++i < n) {
- for (j = m; --j > 0; ) {
- if ((v = +ticks[i] - j * d) >= extent[0]) {
- subticks.push(v);
- }
- }
- }
- for (--i, j = 0; ++j < m && (v = +ticks[i] + j * d) < extent[1]; ) {
- subticks.push(v);
- }
- }
- return subticks;
- }
- d3.svg.brush = function() {
- var event = d3_eventDispatch(brush, "brushstart", "brush", "brushend"), x = null, y = null, resizes = d3_svg_brushResizes[0], extent = [ [ 0, 0 ], [ 0, 0 ] ], extentDomain;
- function brush(g) {
- g.each(function() {
- var g = d3.select(this), bg = g.selectAll(".background").data([ 0 ]), fg = g.selectAll(".extent").data([ 0 ]), tz = g.selectAll(".resize").data(resizes, String), e;
- g.style("pointer-events", "all").on("mousedown.brush", brushstart).on("touchstart.brush", brushstart);
- bg.enter().append("rect").attr("class", "background").style("visibility", "hidden").style("cursor", "crosshair");
- fg.enter().append("rect").attr("class", "extent").style("cursor", "move");
- tz.enter().append("g").attr("class", function(d) {
- return "resize " + d;
- }).style("cursor", function(d) {
- return d3_svg_brushCursor[d];
- }).append("rect").attr("x", function(d) {
- return /[ew]$/.test(d) ? -3 : null;
- }).attr("y", function(d) {
- return /^[ns]/.test(d) ? -3 : null;
- }).attr("width", 6).attr("height", 6).style("visibility", "hidden");
- tz.style("display", brush.empty() ? "none" : null);
- tz.exit().remove();
- if (x) {
- e = d3_scaleRange(x);
- bg.attr("x", e[0]).attr("width", e[1] - e[0]);
- redrawX(g);
- }
- if (y) {
- e = d3_scaleRange(y);
- bg.attr("y", e[0]).attr("height", e[1] - e[0]);
- redrawY(g);
- }
- redraw(g);
- });
- }
- function redraw(g) {
- g.selectAll(".resize").attr("transform", function(d) {
- return "translate(" + extent[+/e$/.test(d)][0] + "," + extent[+/^s/.test(d)][1] + ")";
- });
- }
- function redrawX(g) {
- g.select(".extent").attr("x", extent[0][0]);
- g.selectAll(".extent,.n>rect,.s>rect").attr("width", extent[1][0] - extent[0][0]);
- }
- function redrawY(g) {
- g.select(".extent").attr("y", extent[0][1]);
- g.selectAll(".extent,.e>rect,.w>rect").attr("height", extent[1][1] - extent[0][1]);
- }
- function brushstart() {
- var target = this, eventTarget = d3.select(d3.event.target), event_ = event.of(target, arguments), g = d3.select(target), resizing = eventTarget.datum(), resizingX = !/^(n|s)$/.test(resizing) && x, resizingY = !/^(e|w)$/.test(resizing) && y, dragging = eventTarget.classed("extent"), center, origin = mouse(), offset;
- var w = d3.select(d3_window).on("mousemove.brush", brushmove).on("mouseup.brush", brushend).on("touchmove.brush", brushmove).on("touchend.brush", brushend).on("keydown.brush", keydown).on("keyup.brush", keyup);
- if (dragging) {
- origin[0] = extent[0][0] - origin[0];
- origin[1] = extent[0][1] - origin[1];
- } else if (resizing) {
- var ex = +/w$/.test(resizing), ey = +/^n/.test(resizing);
- offset = [ extent[1 - ex][0] - origin[0], extent[1 - ey][1] - origin[1] ];
- origin[0] = extent[ex][0];
- origin[1] = extent[ey][1];
- } else if (d3.event.altKey) center = origin.slice();
- g.style("pointer-events", "none").selectAll(".resize").style("display", null);
- d3.select("body").style("cursor", eventTarget.style("cursor"));
- event_({
- type: "brushstart"
- });
- brushmove();
- d3_eventCancel();
- function mouse() {
- var touches = d3.event.changedTouches;
- return touches ? d3.touches(target, touches)[0] : d3.mouse(target);
- }
- function keydown() {
- if (d3.event.keyCode == 32) {
- if (!dragging) {
- center = null;
- origin[0] -= extent[1][0];
- origin[1] -= extent[1][1];
- dragging = 2;
- }
- d3_eventCancel();
- }
- }
- function keyup() {
- if (d3.event.keyCode == 32 && dragging == 2) {
- origin[0] += extent[1][0];
- origin[1] += extent[1][1];
- dragging = 0;
- d3_eventCancel();
- }
- }
- function brushmove() {
- var point = mouse(), moved = false;
- if (offset) {
- point[0] += offset[0];
- point[1] += offset[1];
- }
- if (!dragging) {
- if (d3.event.altKey) {
- if (!center) center = [ (extent[0][0] + extent[1][0]) / 2, (extent[0][1] + extent[1][1]) / 2 ];
- origin[0] = extent[+(point[0] < center[0])][0];
- origin[1] = extent[+(point[1] < center[1])][1];
- } else center = null;
- }
- if (resizingX && move1(point, x, 0)) {
- redrawX(g);
- moved = true;
- }
- if (resizingY && move1(point, y, 1)) {
- redrawY(g);
- moved = true;
- }
- if (moved) {
- redraw(g);
- event_({
- type: "brush",
- mode: dragging ? "move" : "resize"
- });
- }
- }
- function move1(point, scale, i) {
- var range = d3_scaleRange(scale), r0 = range[0], r1 = range[1], position = origin[i], size = extent[1][i] - extent[0][i], min, max;
- if (dragging) {
- r0 -= position;
- r1 -= size + position;
- }
- min = Math.max(r0, Math.min(r1, point[i]));
- if (dragging) {
- max = (min += position) + size;
- } else {
- if (center) position = Math.max(r0, Math.min(r1, 2 * center[i] - min));
- if (position < min) {
- max = min;
- min = position;
- } else {
- max = position;
- }
- }
- if (extent[0][i] !== min || extent[1][i] !== max) {
- extentDomain = null;
- extent[0][i] = min;
- extent[1][i] = max;
- return true;
- }
- }
- function brushend() {
- brushmove();
- g.style("pointer-events", "all").selectAll(".resize").style("display", brush.empty() ? "none" : null);
- d3.select("body").style("cursor", null);
- w.on("mousemove.brush", null).on("mouseup.brush", null).on("touchmove.brush", null).on("touchend.brush", null).on("keydown.brush", null).on("keyup.brush", null);
- event_({
- type: "brushend"
- });
- d3_eventCancel();
- }
- }
- brush.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- resizes = d3_svg_brushResizes[!x << 1 | !y];
- return brush;
- };
- brush.extent = function(z) {
- var x0, x1, y0, y1, t;
- if (!arguments.length) {
- z = extentDomain || extent;
- if (x) {
- x0 = z[0][0], x1 = z[1][0];
- if (!extentDomain) {
- x0 = extent[0][0], x1 = extent[1][0];
- if (x.invert) x0 = x.invert(x0), x1 = x.invert(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- }
- }
- if (y) {
- y0 = z[0][1], y1 = z[1][1];
- if (!extentDomain) {
- y0 = extent[0][1], y1 = extent[1][1];
- if (y.invert) y0 = y.invert(y0), y1 = y.invert(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- }
- }
- return x && y ? [ [ x0, y0 ], [ x1, y1 ] ] : x ? [ x0, x1 ] : y && [ y0, y1 ];
- }
- extentDomain = [ [ 0, 0 ], [ 0, 0 ] ];
- if (x) {
- x0 = z[0], x1 = z[1];
- if (y) x0 = x0[0], x1 = x1[0];
- extentDomain[0][0] = x0, extentDomain[1][0] = x1;
- if (x.invert) x0 = x(x0), x1 = x(x1);
- if (x1 < x0) t = x0, x0 = x1, x1 = t;
- extent[0][0] = x0 | 0, extent[1][0] = x1 | 0;
- }
- if (y) {
- y0 = z[0], y1 = z[1];
- if (x) y0 = y0[1], y1 = y1[1];
- extentDomain[0][1] = y0, extentDomain[1][1] = y1;
- if (y.invert) y0 = y(y0), y1 = y(y1);
- if (y1 < y0) t = y0, y0 = y1, y1 = t;
- extent[0][1] = y0 | 0, extent[1][1] = y1 | 0;
- }
- return brush;
- };
- brush.clear = function() {
- extentDomain = null;
- extent[0][0] = extent[0][1] = extent[1][0] = extent[1][1] = 0;
- return brush;
- };
- brush.empty = function() {
- return x && extent[0][0] === extent[1][0] || y && extent[0][1] === extent[1][1];
- };
- return d3.rebind(brush, event, "on");
- };
- var d3_svg_brushCursor = {
- n: "ns-resize",
- e: "ew-resize",
- s: "ns-resize",
- w: "ew-resize",
- nw: "nwse-resize",
- ne: "nesw-resize",
- se: "nwse-resize",
- sw: "nesw-resize"
- };
- var d3_svg_brushResizes = [ [ "n", "e", "s", "w", "nw", "ne", "se", "sw" ], [ "e", "w" ], [ "n", "s" ], [] ];
- d3.time = {};
- var d3_time = Date, d3_time_daySymbols = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ];
- function d3_time_utc() {
- this._ = new Date(arguments.length > 1 ? Date.UTC.apply(this, arguments) : arguments[0]);
- }
- d3_time_utc.prototype = {
- getDate: function() {
- return this._.getUTCDate();
- },
- getDay: function() {
- return this._.getUTCDay();
- },
- getFullYear: function() {
- return this._.getUTCFullYear();
- },
- getHours: function() {
- return this._.getUTCHours();
- },
- getMilliseconds: function() {
- return this._.getUTCMilliseconds();
- },
- getMinutes: function() {
- return this._.getUTCMinutes();
- },
- getMonth: function() {
- return this._.getUTCMonth();
- },
- getSeconds: function() {
- return this._.getUTCSeconds();
- },
- getTime: function() {
- return this._.getTime();
- },
- getTimezoneOffset: function() {
- return 0;
- },
- valueOf: function() {
- return this._.valueOf();
- },
- setDate: function() {
- d3_time_prototype.setUTCDate.apply(this._, arguments);
- },
- setDay: function() {
- d3_time_prototype.setUTCDay.apply(this._, arguments);
- },
- setFullYear: function() {
- d3_time_prototype.setUTCFullYear.apply(this._, arguments);
- },
- setHours: function() {
- d3_time_prototype.setUTCHours.apply(this._, arguments);
- },
- setMilliseconds: function() {
- d3_time_prototype.setUTCMilliseconds.apply(this._, arguments);
- },
- setMinutes: function() {
- d3_time_prototype.setUTCMinutes.apply(this._, arguments);
- },
- setMonth: function() {
- d3_time_prototype.setUTCMonth.apply(this._, arguments);
- },
- setSeconds: function() {
- d3_time_prototype.setUTCSeconds.apply(this._, arguments);
- },
- setTime: function() {
- d3_time_prototype.setTime.apply(this._, arguments);
- }
- };
- var d3_time_prototype = Date.prototype;
- var d3_time_formatDateTime = "%a %b %e %X %Y", d3_time_formatDate = "%m/%d/%Y", d3_time_formatTime = "%H:%M:%S";
- var d3_time_days = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], d3_time_dayAbbreviations = [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], d3_time_months = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" ], d3_time_monthAbbreviations = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ];
- function d3_time_interval(local, step, number) {
- function round(date) {
- var d0 = local(date), d1 = offset(d0, 1);
- return date - d0 < d1 - date ? d0 : d1;
- }
- function ceil(date) {
- step(date = local(new d3_time(date - 1)), 1);
- return date;
- }
- function offset(date, k) {
- step(date = new d3_time(+date), k);
- return date;
- }
- function range(t0, t1, dt) {
- var time = ceil(t0), times = [];
- if (dt > 1) {
- while (time < t1) {
- if (!(number(time) % dt)) times.push(new Date(+time));
- step(time, 1);
- }
- } else {
- while (time < t1) times.push(new Date(+time)), step(time, 1);
- }
- return times;
- }
- function range_utc(t0, t1, dt) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc();
- utc._ = t0;
- return range(utc, t1, dt);
- } finally {
- d3_time = Date;
- }
- }
- local.floor = local;
- local.round = round;
- local.ceil = ceil;
- local.offset = offset;
- local.range = range;
- var utc = local.utc = d3_time_interval_utc(local);
- utc.floor = utc;
- utc.round = d3_time_interval_utc(round);
- utc.ceil = d3_time_interval_utc(ceil);
- utc.offset = d3_time_interval_utc(offset);
- utc.range = range_utc;
- return local;
- }
- function d3_time_interval_utc(method) {
- return function(date, k) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time_utc();
- utc._ = date;
- return method(utc, k)._;
- } finally {
- d3_time = Date;
- }
- };
- }
- d3.time.year = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setMonth(0, 1);
- return date;
- }, function(date, offset) {
- date.setFullYear(date.getFullYear() + offset);
- }, function(date) {
- return date.getFullYear();
- });
- d3.time.years = d3.time.year.range;
- d3.time.years.utc = d3.time.year.utc.range;
- d3.time.day = d3_time_interval(function(date) {
- var day = new d3_time(1970, 0);
- day.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
- return day;
- }, function(date, offset) {
- date.setDate(date.getDate() + offset);
- }, function(date) {
- return date.getDate() - 1;
- });
- d3.time.days = d3.time.day.range;
- d3.time.days.utc = d3.time.day.utc.range;
- d3.time.dayOfYear = function(date) {
- var year = d3.time.year(date);
- return Math.floor((date - year - (date.getTimezoneOffset() - year.getTimezoneOffset()) * 6e4) / 864e5);
- };
- d3_time_daySymbols.forEach(function(day, i) {
- day = day.toLowerCase();
- i = 7 - i;
- var interval = d3.time[day] = d3_time_interval(function(date) {
- (date = d3.time.day(date)).setDate(date.getDate() - (date.getDay() + i) % 7);
- return date;
- }, function(date, offset) {
- date.setDate(date.getDate() + Math.floor(offset) * 7);
- }, function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7) - (day !== i);
- });
- d3.time[day + "s"] = interval.range;
- d3.time[day + "s"].utc = interval.utc.range;
- d3.time[day + "OfYear"] = function(date) {
- var day = d3.time.year(date).getDay();
- return Math.floor((d3.time.dayOfYear(date) + (day + i) % 7) / 7);
- };
- });
- d3.time.week = d3.time.sunday;
- d3.time.weeks = d3.time.sunday.range;
- d3.time.weeks.utc = d3.time.sunday.utc.range;
- d3.time.weekOfYear = d3.time.sundayOfYear;
- d3.time.format = function(template) {
- var n = template.length;
- function format(date) {
- var string = [], i = -1, j = 0, c, p, f;
- while (++i < n) {
- if (template.charCodeAt(i) === 37) {
- string.push(template.substring(j, i));
- if ((p = d3_time_formatPads[c = template.charAt(++i)]) != null) c = template.charAt(++i);
- if (f = d3_time_formats[c]) c = f(date, p == null ? c === "e" ? " " : "0" : p);
- string.push(c);
- j = i + 1;
- }
- }
- string.push(template.substring(j, i));
- return string.join("");
- }
- format.parse = function(string) {
- var d = {
- y: 1900,
- m: 0,
- d: 1,
- H: 0,
- M: 0,
- S: 0,
- L: 0
- }, i = d3_time_parse(d, template, string, 0);
- if (i != string.length) return null;
- if ("p" in d) d.H = d.H % 12 + d.p * 12;
- var date = new d3_time();
- date.setFullYear(d.y, d.m, d.d);
- date.setHours(d.H, d.M, d.S, d.L);
- return date;
- };
- format.toString = function() {
- return template;
- };
- return format;
- };
- function d3_time_parse(date, template, string, j) {
- var c, p, i = 0, n = template.length, m = string.length;
- while (i < n) {
- if (j >= m) return -1;
- c = template.charCodeAt(i++);
- if (c === 37) {
- p = d3_time_parsers[template.charAt(i++)];
- if (!p || (j = p(date, string, j)) < 0) return -1;
- } else if (c != string.charCodeAt(j++)) {
- return -1;
- }
- }
- return j;
- }
- function d3_time_formatRe(names) {
- return new RegExp("^(?:" + names.map(d3.requote).join("|") + ")", "i");
- }
- function d3_time_formatLookup(names) {
- var map = new d3_Map(), i = -1, n = names.length;
- while (++i < n) map.set(names[i].toLowerCase(), i);
- return map;
- }
- function d3_time_formatPad(value, fill, width) {
- value += "";
- var length = value.length;
- return length < width ? new Array(width - length + 1).join(fill) + value : value;
- }
- var d3_time_dayRe = d3_time_formatRe(d3_time_days), d3_time_dayAbbrevRe = d3_time_formatRe(d3_time_dayAbbreviations), d3_time_monthRe = d3_time_formatRe(d3_time_months), d3_time_monthLookup = d3_time_formatLookup(d3_time_months), d3_time_monthAbbrevRe = d3_time_formatRe(d3_time_monthAbbreviations), d3_time_monthAbbrevLookup = d3_time_formatLookup(d3_time_monthAbbreviations);
- var d3_time_formatPads = {
- "-": "",
- _: " ",
- "0": "0"
- };
- var d3_time_formats = {
- a: function(d) {
- return d3_time_dayAbbreviations[d.getDay()];
- },
- A: function(d) {
- return d3_time_days[d.getDay()];
- },
- b: function(d) {
- return d3_time_monthAbbreviations[d.getMonth()];
- },
- B: function(d) {
- return d3_time_months[d.getMonth()];
- },
- c: d3.time.format(d3_time_formatDateTime),
- d: function(d, p) {
- return d3_time_formatPad(d.getDate(), p, 2);
- },
- e: function(d, p) {
- return d3_time_formatPad(d.getDate(), p, 2);
- },
- H: function(d, p) {
- return d3_time_formatPad(d.getHours(), p, 2);
- },
- I: function(d, p) {
- return d3_time_formatPad(d.getHours() % 12 || 12, p, 2);
- },
- j: function(d, p) {
- return d3_time_formatPad(1 + d3.time.dayOfYear(d), p, 3);
- },
- L: function(d, p) {
- return d3_time_formatPad(d.getMilliseconds(), p, 3);
- },
- m: function(d, p) {
- return d3_time_formatPad(d.getMonth() + 1, p, 2);
- },
- M: function(d, p) {
- return d3_time_formatPad(d.getMinutes(), p, 2);
- },
- p: function(d) {
- return d.getHours() >= 12 ? "PM" : "AM";
- },
- S: function(d, p) {
- return d3_time_formatPad(d.getSeconds(), p, 2);
- },
- U: function(d, p) {
- return d3_time_formatPad(d3.time.sundayOfYear(d), p, 2);
- },
- w: function(d) {
- return d.getDay();
- },
- W: function(d, p) {
- return d3_time_formatPad(d3.time.mondayOfYear(d), p, 2);
- },
- x: d3.time.format(d3_time_formatDate),
- X: d3.time.format(d3_time_formatTime),
- y: function(d, p) {
- return d3_time_formatPad(d.getFullYear() % 100, p, 2);
- },
- Y: function(d, p) {
- return d3_time_formatPad(d.getFullYear() % 1e4, p, 4);
- },
- Z: d3_time_zone,
- "%": function() {
- return "%";
- }
- };
- var d3_time_parsers = {
- a: d3_time_parseWeekdayAbbrev,
- A: d3_time_parseWeekday,
- b: d3_time_parseMonthAbbrev,
- B: d3_time_parseMonth,
- c: d3_time_parseLocaleFull,
- d: d3_time_parseDay,
- e: d3_time_parseDay,
- H: d3_time_parseHour24,
- I: d3_time_parseHour24,
- L: d3_time_parseMilliseconds,
- m: d3_time_parseMonthNumber,
- M: d3_time_parseMinutes,
- p: d3_time_parseAmPm,
- S: d3_time_parseSeconds,
- x: d3_time_parseLocaleDate,
- X: d3_time_parseLocaleTime,
- y: d3_time_parseYear,
- Y: d3_time_parseFullYear
- };
- function d3_time_parseWeekdayAbbrev(date, string, i) {
- d3_time_dayAbbrevRe.lastIndex = 0;
- var n = d3_time_dayAbbrevRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseWeekday(date, string, i) {
- d3_time_dayRe.lastIndex = 0;
- var n = d3_time_dayRe.exec(string.substring(i));
- return n ? i += n[0].length : -1;
- }
- function d3_time_parseMonthAbbrev(date, string, i) {
- d3_time_monthAbbrevRe.lastIndex = 0;
- var n = d3_time_monthAbbrevRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthAbbrevLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseMonth(date, string, i) {
- d3_time_monthRe.lastIndex = 0;
- var n = d3_time_monthRe.exec(string.substring(i));
- return n ? (date.m = d3_time_monthLookup.get(n[0].toLowerCase()), i += n[0].length) : -1;
- }
- function d3_time_parseLocaleFull(date, string, i) {
- return d3_time_parse(date, d3_time_formats.c.toString(), string, i);
- }
- function d3_time_parseLocaleDate(date, string, i) {
- return d3_time_parse(date, d3_time_formats.x.toString(), string, i);
- }
- function d3_time_parseLocaleTime(date, string, i) {
- return d3_time_parse(date, d3_time_formats.X.toString(), string, i);
- }
- function d3_time_parseFullYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 4));
- return n ? (date.y = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseYear(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.y = d3_time_expandYear(+n[0]), i += n[0].length) : -1;
- }
- function d3_time_expandYear(d) {
- return d + (d > 68 ? 1900 : 2e3);
- }
- function d3_time_parseMonthNumber(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.m = n[0] - 1, i += n[0].length) : -1;
- }
- function d3_time_parseDay(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.d = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseHour24(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.H = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMinutes(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.M = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseSeconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 2));
- return n ? (date.S = +n[0], i += n[0].length) : -1;
- }
- function d3_time_parseMilliseconds(date, string, i) {
- d3_time_numberRe.lastIndex = 0;
- var n = d3_time_numberRe.exec(string.substring(i, i + 3));
- return n ? (date.L = +n[0], i += n[0].length) : -1;
- }
- var d3_time_numberRe = /^\s*\d+/;
- function d3_time_parseAmPm(date, string, i) {
- var n = d3_time_amPmLookup.get(string.substring(i, i += 2).toLowerCase());
- return n == null ? -1 : (date.p = n, i);
- }
- var d3_time_amPmLookup = d3.map({
- am: 0,
- pm: 1
- });
- function d3_time_zone(d) {
- var z = d.getTimezoneOffset(), zs = z > 0 ? "-" : "+", zh = ~~(Math.abs(z) / 60), zm = Math.abs(z) % 60;
- return zs + d3_time_formatPad(zh, "0", 2) + d3_time_formatPad(zm, "0", 2);
- }
- d3.time.format.utc = function(template) {
- var local = d3.time.format(template);
- function format(date) {
- try {
- d3_time = d3_time_utc;
- var utc = new d3_time();
- utc._ = date;
- return local(utc);
- } finally {
- d3_time = Date;
- }
- }
- format.parse = function(string) {
- try {
- d3_time = d3_time_utc;
- var date = local.parse(string);
- return date && date._;
- } finally {
- d3_time = Date;
- }
- };
- format.toString = local.toString;
- return format;
- };
- var d3_time_formatIso = d3.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");
- d3.time.format.iso = Date.prototype.toISOString && +new Date("2000-01-01T00:00:00.000Z") ? d3_time_formatIsoNative : d3_time_formatIso;
- function d3_time_formatIsoNative(date) {
- return date.toISOString();
- }
- d3_time_formatIsoNative.parse = function(string) {
- var date = new Date(string);
- return isNaN(date) ? null : date;
- };
- d3_time_formatIsoNative.toString = d3_time_formatIso.toString;
- d3.time.second = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 1e3) * 1e3);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 1e3);
- }, function(date) {
- return date.getSeconds();
- });
- d3.time.seconds = d3.time.second.range;
- d3.time.seconds.utc = d3.time.second.utc.range;
- d3.time.minute = d3_time_interval(function(date) {
- return new d3_time(Math.floor(date / 6e4) * 6e4);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 6e4);
- }, function(date) {
- return date.getMinutes();
- });
- d3.time.minutes = d3.time.minute.range;
- d3.time.minutes.utc = d3.time.minute.utc.range;
- d3.time.hour = d3_time_interval(function(date) {
- var timezone = date.getTimezoneOffset() / 60;
- return new d3_time((Math.floor(date / 36e5 - timezone) + timezone) * 36e5);
- }, function(date, offset) {
- date.setTime(date.getTime() + Math.floor(offset) * 36e5);
- }, function(date) {
- return date.getHours();
- });
- d3.time.hours = d3.time.hour.range;
- d3.time.hours.utc = d3.time.hour.utc.range;
- d3.time.month = d3_time_interval(function(date) {
- date = d3.time.day(date);
- date.setDate(1);
- return date;
- }, function(date, offset) {
- date.setMonth(date.getMonth() + offset);
- }, function(date) {
- return date.getMonth();
- });
- d3.time.months = d3.time.month.range;
- d3.time.months.utc = d3.time.month.utc.range;
- function d3_time_scale(linear, methods, format) {
- function scale(x) {
- return linear(x);
- }
- scale.invert = function(x) {
- return d3_time_scaleDate(linear.invert(x));
- };
- scale.domain = function(x) {
- if (!arguments.length) return linear.domain().map(d3_time_scaleDate);
- linear.domain(x);
- return scale;
- };
- scale.nice = function(m) {
- return scale.domain(d3_scale_nice(scale.domain(), function() {
- return m;
- }));
- };
- scale.ticks = function(m, k) {
- var extent = d3_time_scaleExtent(scale.domain());
- if (typeof m !== "function") {
- var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
- if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
- if (!i) return linear.ticks(m).map(d3_time_scaleDate);
- if (Math.log(target / d3_time_scaleSteps[i - 1]) < Math.log(d3_time_scaleSteps[i] / target)) --i;
- m = methods[i];
- k = m[1];
- m = m[0].range;
- }
- return m(extent[0], new Date(+extent[1] + 1), k);
- };
- scale.tickFormat = function() {
- return format;
- };
- scale.copy = function() {
- return d3_time_scale(linear.copy(), methods, format);
- };
- return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
- }
- function d3_time_scaleExtent(domain) {
- var start = domain[0], stop = domain[domain.length - 1];
- return start < stop ? [ start, stop ] : [ stop, start ];
- }
- function d3_time_scaleDate(t) {
- return new Date(t);
- }
- function d3_time_scaleFormat(formats) {
- return function(date) {
- var i = formats.length - 1, f = formats[i];
- while (!f[1](date)) f = formats[--i];
- return f[0](date);
- };
- }
- function d3_time_scaleSetYear(y) {
- var d = new Date(y, 0, 1);
- d.setFullYear(y);
- return d;
- }
- function d3_time_scaleGetYear(d) {
- var y = d.getFullYear(), d0 = d3_time_scaleSetYear(y), d1 = d3_time_scaleSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- var d3_time_scaleSteps = [ 1e3, 5e3, 15e3, 3e4, 6e4, 3e5, 9e5, 18e5, 36e5, 108e5, 216e5, 432e5, 864e5, 1728e5, 6048e5, 2592e6, 7776e6, 31536e6 ];
- var d3_time_scaleLocalMethods = [ [ d3.time.second, 1 ], [ d3.time.second, 5 ], [ d3.time.second, 15 ], [ d3.time.second, 30 ], [ d3.time.minute, 1 ], [ d3.time.minute, 5 ], [ d3.time.minute, 15 ], [ d3.time.minute, 30 ], [ d3.time.hour, 1 ], [ d3.time.hour, 3 ], [ d3.time.hour, 6 ], [ d3.time.hour, 12 ], [ d3.time.day, 1 ], [ d3.time.day, 2 ], [ d3.time.week, 1 ], [ d3.time.month, 1 ], [ d3.time.month, 3 ], [ d3.time.year, 1 ] ];
- var d3_time_scaleLocalFormats = [ [ d3.time.format("%Y"), d3_true ], [ d3.time.format("%B"), function(d) {
- return d.getMonth();
- } ], [ d3.time.format("%b %d"), function(d) {
- return d.getDate() != 1;
- } ], [ d3.time.format("%a %d"), function(d) {
- return d.getDay() && d.getDate() != 1;
- } ], [ d3.time.format("%I %p"), function(d) {
- return d.getHours();
- } ], [ d3.time.format("%I:%M"), function(d) {
- return d.getMinutes();
- } ], [ d3.time.format(":%S"), function(d) {
- return d.getSeconds();
- } ], [ d3.time.format(".%L"), function(d) {
- return d.getMilliseconds();
- } ] ];
- var d3_time_scaleLinear = d3.scale.linear(), d3_time_scaleLocalFormat = d3_time_scaleFormat(d3_time_scaleLocalFormats);
- d3_time_scaleLocalMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleGetYear)).ticks(m).map(d3_time_scaleSetYear);
- };
- d3.time.scale = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleLocalMethods, d3_time_scaleLocalFormat);
- };
- var d3_time_scaleUTCMethods = d3_time_scaleLocalMethods.map(function(m) {
- return [ m[0].utc, m[1] ];
- });
- var d3_time_scaleUTCFormats = [ [ d3.time.format.utc("%Y"), d3_true ], [ d3.time.format.utc("%B"), function(d) {
- return d.getUTCMonth();
- } ], [ d3.time.format.utc("%b %d"), function(d) {
- return d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%a %d"), function(d) {
- return d.getUTCDay() && d.getUTCDate() != 1;
- } ], [ d3.time.format.utc("%I %p"), function(d) {
- return d.getUTCHours();
- } ], [ d3.time.format.utc("%I:%M"), function(d) {
- return d.getUTCMinutes();
- } ], [ d3.time.format.utc(":%S"), function(d) {
- return d.getUTCSeconds();
- } ], [ d3.time.format.utc(".%L"), function(d) {
- return d.getUTCMilliseconds();
- } ] ];
- var d3_time_scaleUTCFormat = d3_time_scaleFormat(d3_time_scaleUTCFormats);
- function d3_time_scaleUTCSetYear(y) {
- var d = new Date(Date.UTC(y, 0, 1));
- d.setUTCFullYear(y);
- return d;
- }
- function d3_time_scaleUTCGetYear(d) {
- var y = d.getUTCFullYear(), d0 = d3_time_scaleUTCSetYear(y), d1 = d3_time_scaleUTCSetYear(y + 1);
- return y + (d - d0) / (d1 - d0);
- }
- d3_time_scaleUTCMethods.year = function(extent, m) {
- return d3_time_scaleLinear.domain(extent.map(d3_time_scaleUTCGetYear)).ticks(m).map(d3_time_scaleUTCSetYear);
- };
- d3.time.scale.utc = function() {
- return d3_time_scale(d3.scale.linear(), d3_time_scaleUTCMethods, d3_time_scaleUTCFormat);
- };
- d3.text = function() {
- return d3.xhr.apply(d3, arguments).response(d3_text);
- };
- function d3_text(request) {
- return request.responseText;
- }
- d3.json = function(url, callback) {
- return d3.xhr(url, "application/json", callback).response(d3_json);
- };
- function d3_json(request) {
- return JSON.parse(request.responseText);
- }
- d3.html = function(url, callback) {
- return d3.xhr(url, "text/html", callback).response(d3_html);
- };
- function d3_html(request) {
- var range = d3_document.createRange();
- range.selectNode(d3_document.body);
- return range.createContextualFragment(request.responseText);
- }
- d3.xml = function() {
- return d3.xhr.apply(d3, arguments).response(d3_xml);
- };
- function d3_xml(request) {
- return request.responseXML;
- }
- return d3;
-}(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.min.js
deleted file mode 100644
index 7975878f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/d3.v3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-d3=function(){function o(e){return e!=null&&!isNaN(e)}function a(e){return e.length}function f(e){var t=1;while(e*t%1)t*=10;return t}function l(e,t){try{for(var n in t){Object.defineProperty(e.prototype,n,{value:t[n],enumerable:false})}}catch(r){e.prototype=t}}function c(){}function d(){}function v(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function m(){}function g(e){function r(){var n=t,r=-1,i=n.length,s;while(++r<i)if(s=n[r].on)s.apply(this,arguments);return e}var t=[],n=new c;r.on=function(r,i){var s=n.get(r),o;if(arguments.length<2)return s&&s.on;if(s){s.on=null;t=t.slice(0,o=t.indexOf(s)).concat(t.slice(o+1));n.remove(r)}if(i)t.push(n.set(r,{on:i}));return e};return r}function y(){e.event.stopPropagation();e.event.preventDefault()}function w(){var t=e.event,n;while(n=t.sourceEvent)t=n;return t}function E(e,t){function n(){e.on(t,null)}e.on(t,function(){y();n()},true);setTimeout(n,0)}function S(t){var n=new m,r=0,i=arguments.length;while(++r<i)n[arguments[r]]=g(n);n.of=function(r,i){return function(s){try{var o=s.sourceEvent=e.event;s.target=t;e.event=s;n[s.type].apply(r,i)}finally{e.event=o}}};return n}function T(r,i){var s=r.ownerSVGElement||r;if(s.createSVGPoint){var o=s.createSVGPoint();if(x<0&&(n.scrollX||n.scrollY)){s=e.select(t.body).append("svg").style("position","absolute").style("top",0).style("left",0);var u=s[0][0].getScreenCTM();x=!(u.f||u.e);s.remove()}if(x){o.x=i.pageX;o.y=i.pageY}else{o.x=i.clientX;o.y=i.clientY}o=o.matrixTransform(r.getScreenCTM().inverse());return[o.x,o.y]}var a=r.getBoundingClientRect();return[i.clientX-a.left-r.clientLeft,i.clientY-a.top-r.clientTop]}function C(e){var t=-1,n=e.length,r=[];while(++t<n)r.push(e[t]);return r}function k(e){return Array.prototype.slice.call(e)}function O(e){A(e,B);return e}function j(e){return function(){return M(e,this)}}function F(e){return function(){return _(e,this)}}function q(t,n){function r(){this.removeAttribute(t)}function i(){this.removeAttributeNS(t.space,t.local)}function s(){this.setAttribute(t,n)}function o(){this.setAttributeNS(t.space,t.local,n)}function u(){var e=n.apply(this,arguments);if(e==null)this.removeAttribute(t);else this.setAttribute(t,e)}function a(){var e=n.apply(this,arguments);if(e==null)this.removeAttributeNS(t.space,t.local);else this.setAttributeNS(t.space,t.local,e)}t=e.ns.qualify(t);return n==null?t.local?i:r:typeof n==="function"?t.local?a:u:t.local?o:s}function R(e){return e.trim().replace(/\s+/g," ")}function z(t){return new RegExp("(?:^|\\s+)"+e.requote(t)+"(?:\\s+|$)","g")}function W(e,t){function r(){var r=-1;while(++r<n)e[r](this,t)}function i(){var r=-1,i=t.apply(this,arguments);while(++r<n)e[r](this,i)}e=e.trim().split(/\s+/).map(X);var n=e.length;return typeof t==="function"?i:r}function X(e){var t=z(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";if(r){t.lastIndex=0;if(!t.test(i))n.setAttribute("class",R(i+" "+e))}else{n.setAttribute("class",R(i.replace(t," ")))}}}function V(e,t,n){function r(){this.style.removeProperty(e)}function i(){this.style.setProperty(e,t,n)}function s(){var r=t.apply(this,arguments);if(r==null)this.style.removeProperty(e);else this.style.setProperty(e,r,n)}return t==null?r:typeof t==="function"?s:i}function $(e,t){function n(){delete this[e]}function r(){this[e]=t}function i(){var n=t.apply(this,arguments);if(n==null)delete this[e];else this[e]=n}return t==null?n:typeof t==="function"?i:r}function J(e){return{__data__:e}}function K(e){return function(){return H(this,e)}}function Q(t){if(!arguments.length)t=e.ascending;return function(e,n){return!e-!n||t(e.__data__,n.__data__)}}function G(){}function Y(t,n,r){function a(){var e=this[i];if(e){this.removeEventListener(t,e,e.$);delete this[i]}}function f(){var e=o(n,N(arguments));a.call(this);this.addEventListener(t,this[i]=e,e.$=r);e._=n}function l(){var n=new RegExp("^__on([^.]+)"+e.requote(t)+"$"),r;for(var i in this){if(r=i.match(n)){var s=this[i];this.removeEventListener(r[1],s,s.$);delete this[i]}}}var i="__on"+t,s=t.indexOf("."),o=et;if(s>0)t=t.substring(0,s);var u=Z.get(t);if(u)t=u,o=tt;return s?n?f:a:n?G:l}function et(t,n){return function(r){var i=e.event;e.event=r;n[0]=this.__data__;try{t.apply(this,n)}finally{e.event=i}}}function tt(e,t){var n=et(e,t);return function(e){var t=this,r=e.relatedTarget;if(!r||r!==t&&!(r.compareDocumentPosition(t)&8)){n.call(t,e)}}}function nt(e,t){for(var n=0,r=e.length;n<r;n++){for(var i=e[n],s=0,o=i.length,u;s<o;s++){if(u=i[s])t(u,s,n)}}return e}function rt(e){A(e,it);return e}function ft(){}function lt(e,t,n){return new ct(e,t,n)}function ct(e,t,n){this.h=e;this.s=t;this.l=n}function pt(e,t,n){function s(e){if(e>360)e-=360;else if(e<0)e+=360;if(e<60)return r+(i-r)*e/60;if(e<180)return i;if(e<240)return r+(i-r)*(240-e)/60;return r}function o(e){return Math.round(s(e)*255)}var r,i;e=e%360;if(e<0)e+=360;t=t<0?0:t>1?1:t;n=n<0?0:n>1?1:n;i=n<=.5?n*(1+t):n+t-n*t;r=2*n-i;return qt(o(e+120),o(e),o(e-120))}function yt(e){return e>0?1:e<0?-1:0}function bt(e){return Math.acos(Math.max(-1,Math.min(1,e)))}function wt(e){return e>1?dt/2:e<-1?-dt/2:Math.asin(e)}function Et(e){return(Math.exp(e)-Math.exp(-e))/2}function St(e){return(Math.exp(e)+Math.exp(-e))/2}function xt(e){return(e=Math.sin(e/2))*e}function Tt(e,t,n){return new Nt(e,t,n)}function Nt(e,t,n){this.h=e;this.c=t;this.l=n}function kt(e,t,n){return Lt(n,Math.cos(e*=mt)*t,Math.sin(e)*t)}function Lt(e,t,n){return new At(e,t,n)}function At(e,t,n){this.l=e;this.a=t;this.b=n}function Ht(e,t,n){var r=(e+16)/116,i=r+t/500,s=r-n/200;i=jt(i)*Mt;r=jt(r)*_t;s=jt(s)*Dt;return qt(It(3.2404542*i-1.5371385*r-.4985314*s),It(-.969266*i+1.8760108*r+.041556*s),It(.0556434*i-.2040259*r+1.0572252*s))}function Bt(e,t,n){return Tt(Math.atan2(n,t)*gt,Math.sqrt(t*t+n*n),e)}function jt(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function Ft(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function It(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function qt(e,t,n){return new Rt(e,t,n)}function Rt(e,t,n){this.r=e;this.g=t;this.b=n}function zt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function Wt(e,t,n){var r=0,i=0,s=0,o,u,a;o=/([a-z]+)\((.*)\)/i.exec(e);if(o){u=o[2].split(",");switch(o[1]){case"hsl":{return n(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100)};case"rgb":{return t(Jt(u[0]),Jt(u[1]),Jt(u[2]))}}}if(a=Kt.get(e))return t(a.r,a.g,a.b);if(e!=null&&e.charAt(0)==="#"){if(e.length===4){r=e.charAt(1);r+=r;i=e.charAt(2);i+=i;s=e.charAt(3);s+=s}else if(e.length===7){r=e.substring(1,3);i=e.substring(3,5);s=e.substring(5,7)}r=parseInt(r,16);i=parseInt(i,16);s=parseInt(s,16)}return t(r,i,s)}function Xt(e,t,n){var r=Math.min(e/=255,t/=255,n/=255),i=Math.max(e,t,n),s=i-r,o,u,a=(i+r)/2;if(s){u=a<.5?s/(i+r):s/(2-i-r);if(e==i)o=(t-n)/s+(t<n?6:0);else if(t==i)o=(n-e)/s+2;else o=(e-t)/s+4;o*=60}else{u=o=0}return lt(o,u,a)}function Vt(e,t,n){e=$t(e);t=$t(t);n=$t(n);var r=Ft((.4124564*e+.3575761*t+.1804375*n)/Mt),i=Ft((.2126729*e+.7151522*t+.072175*n)/_t),s=Ft((.0193339*e+.119192*t+.9503041*n)/Dt);return Lt(116*i-16,500*(r-i),200*(i-s))}function $t(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jt(e){var t=parseFloat(e);return e.charAt(e.length-1)==="%"?Math.round(t*2.55):t}function Qt(e){return typeof e==="function"?e:function(){return e}}function Gt(e){return e}function Yt(e){return e.length===1?function(t,n){e(t==null?n:null)}:e}function Zt(t,n){function s(t,r,i){if(arguments.length<3)i=r,r=null;var s=e.xhr(t,n,i);s.row=function(e){return arguments.length?s.response((r=e)==null?o:u(e)):r};return s.row(r)}function o(e){return s.parse(e.responseText)}function u(e){return function(t){return s.parse(t.responseText,e)}}function a(e){return e.map(f).join(t)}function f(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}var r=new RegExp('["'+t+"\n]"),i=t.charCodeAt(0);s.parse=function(e,t){var n;return s.parseRows(e,function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map(function(e,t){return JSON.stringify(e)+": d["+t+"]"}).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i})};s.parseRows=function(e,t){function c(){if(u>=o)return r;if(l)return l=false,n;var t=u;if(e.charCodeAt(t)===34){var s=t;while(s++<o){if(e.charCodeAt(s)===34){if(e.charCodeAt(s+1)!==34)break;++s}}u=s+2;var a=e.charCodeAt(s+1);if(a===13){l=true;if(e.charCodeAt(s+2)===10)++u}else if(a===10){l=true}return e.substring(t+1,s).replace(/""/g,'"')}while(u<o){var a=e.charCodeAt(u++),f=1;if(a===10)l=true;else if(a===13){l=true;if(e.charCodeAt(u)===10)++u,++f}else if(a!==i)continue;return e.substring(t,u-f)}return e.substring(t)}var n={},r={},s=[],o=e.length,u=0,a=0,f,l;while((f=c())!==r){var h=[];while(f!==n&&f!==r){h.push(f);f=c()}if(t&&!(h=t(h,a++)))continue;s.push(h)}return s};s.format=function(e){if(Array.isArray(e[0]))return s.formatRows(e);var n=new d,r=[];e.forEach(function(e){for(var t in e){if(!n.has(t)){r.push(n.add(t))}}});return[r.map(f).join(t)].concat(e.map(function(e){return r.map(function(t){return f(e[t])}).join(t)})).join("\n")};s.formatRows=function(e){return e.map(a).join("\n")};return s}function on(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(e>=n.delay)n.flush=n.callback(e);n=n.next}var r=un()-t;if(r>24){if(isFinite(r)){clearTimeout(sn);sn=setTimeout(on,r)}rn=0}else{rn=1;an(on)}}function un(){var e=null,t=nn,n=Infinity;while(t){if(t.flush){delete tn[t.callback.id];t=e?e.next=t.next:nn=t.next}else{n=Math.min(n,t.then+t.delay);t=(e=t).next}}return n}function pn(e,t){var n=Math.pow(10,Math.abs(8-t)*3);return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}function mn(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}function gn(e){return e+""}function wn(e,t){if(e&&Sn.hasOwnProperty(e.type)){Sn[e.type](e,t)}}function xn(e,t,n){var r=-1,i=e.length-n,s;t.lineStart();while(++r<i)s=e[r],t.point(s[0],s[1]);t.lineEnd()}function Tn(e,t){var n=-1,r=e.length;t.polygonStart();while(++n<r)xn(e[n],t,1);t.polygonEnd()}function An(){function s(e,t){e*=mt;t=t*mt/2+dt/4;var s=e-n,o=Math.cos(t),u=Math.sin(t),a=i*u,f=Cn,l=kn,c=r*o+a*Math.cos(s),h=a*Math.sin(s);Cn=f*c-l*h;kn=l*c+f*h;n=e,r=o,i=u}var e,t,n,r,i;Ln.point=function(o,u){Ln.point=s;n=(e=o)*mt,r=Math.cos(u=(t=u)*mt/2+dt/4),i=Math.sin(u)};Ln.lineEnd=function(){s(e,t)}}function On(t){function u(e,t){if(e<n)n=e;if(e>i)i=e;if(t<r)r=t;if(t>s)s=t}function a(){o.point=o.lineEnd=G}var n,r,i,s;var o={point:u,lineStart:G,lineEnd:G,polygonStart:function(){o.lineEnd=a},polygonEnd:function(){o.point=u}};return function(u){s=i=-(n=r=Infinity);e.geo.stream(u,t(o));return[[n,r],[i,s]]}}function jn(e,t){if(Mn)return;++_n;e*=mt;var n=Math.cos(t*=mt);Dn+=(n*Math.cos(e)-Dn)/_n;Pn+=(n*Math.sin(e)-Pn)/_n;Hn+=(Math.sin(t)-Hn)/_n}function Fn(){var e,t;Mn=1;In();Mn=2;var n=Bn.point;Bn.point=function(r,i){n(e=r,t=i)};Bn.lineEnd=function(){Bn.point(e,t);qn();Bn.lineEnd=qn}}function In(){function r(r,i){r*=mt;var s=Math.cos(i*=mt),o=s*Math.cos(r),u=s*Math.sin(r),a=Math.sin(i),f=Math.atan2(Math.sqrt((f=t*a-n*u)*f+(f=n*o-e*a)*f+(f=e*u-t*o)*f),e*o+t*u+n*a);_n+=f;Dn+=f*(e+(e=o));Pn+=f*(t+(t=u));Hn+=f*(n+(n=a))}var e,t,n;if(Mn>1)return;if(Mn<1){Mn=1;_n=Dn=Pn=Hn=0}Bn.point=function(i,s){i*=mt;var o=Math.cos(s*=mt);e=o*Math.cos(i);t=o*Math.sin(i);n=Math.sin(s);Bn.point=r}}function qn(){Bn.point=jn}function Rn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Un(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function zn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Wn(e,t){e[0]+=t[0];e[1]+=t[1];e[2]+=t[2]}function Xn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Vn(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t;e[1]/=t;e[2]/=t}function $n(){return true}function Jn(e){return[Math.atan2(e[1],e[0]),Math.asin(Math.max(-1,Math.min(1,e[2])))]}function Kn(e,t){return Math.abs(e[0]-t[0])<vt&&Math.abs(e[1]-t[1])<vt}function Qn(e,t,n,r,i){var s=[],o=[];e.forEach(function(e){if((t=e.length-1)<=0)return;var t,n=e[0],r=e[t];if(Kn(n,r)){i.lineStart();for(var u=0;u<t;++u)i.point((n=e[u])[0],n[1]);i.lineEnd();return}var a={point:n,points:e,other:null,visited:false,entry:true,subject:true},f={point:n,points:[n],other:a,visited:false,entry:false,subject:false};a.other=f;s.push(a);o.push(f);a={point:r,points:[r],other:null,visited:false,entry:false,subject:true};f={point:r,points:[r],other:a,visited:false,entry:true,subject:false};a.other=f;s.push(a);o.push(f)});o.sort(t);Gn(s);Gn(o);if(!s.length)return;if(n)for(var u=1,a=!n(o[0].point),f=o.length;u<f;++u){o[u].entry=a=!a}var l=s[0],c,h,p;while(1){c=l;while(c.visited)if((c=c.next)===l)return;h=c.points;i.lineStart();do{c.visited=c.other.visited=true;if(c.entry){if(c.subject){for(var u=0;u<h.length;u++)i.point((p=h[u])[0],p[1])}else{r(c.point,c.next.point,1,i)}c=c.next}else{if(c.subject){h=c.prev.points;for(var u=h.length;--u>=0;)i.point((p=h[u])[0],p[1])}else{r(c.point,c.prev.point,-1,i)}c=c.prev}c=c.other;h=c.points}while(!c.visited);i.lineEnd()}}function Gn(e){if(!(t=e.length))return;var t,n=0,r=e[0],i;while(++n<t){r.next=i=e[n];i.prev=r;r=i}r.next=i=e[0];i.prev=r}function Yn(t,n,r){return function(i){function u(e,n){if(t(e,n))i.point(e,n)}function a(e,t){s.point(e,t)}function f(){o.point=a;s.lineStart()}function l(){o.point=u;s.lineEnd()}function y(e,t){m.point(e,t);g.push([e,t])}function b(){m.lineStart();g=[]}function w(){y(g[0][0],g[0][1]);m.lineEnd();var e=m.clean(),t=v.buffer(),n,r=t.length;if(!r){d=true;p+=tr(g,-1);g=null;return}g=null;if(e&1){n=t[0];h+=tr(n,1);var r=n.length-1,s=-1,o;i.lineStart();while(++s<r)i.point((o=n[s])[0],o[1]);i.lineEnd();return}if(r>1&&e&2)t.push(t.pop().concat(t.shift()));c.push(t.filter(Zn))}var s=n(i);var o={point:u,lineStart:f,lineEnd:l,polygonStart:function(){o.point=y;o.lineStart=b;o.lineEnd=w;d=false;p=h=0;c=[];i.polygonStart()},polygonEnd:function(){o.point=u;o.lineStart=f;o.lineEnd=l;c=e.merge(c);if(c.length){Qn(c,nr,null,r,i)}else if(h<-vt||d&&p<-vt){i.lineStart();r(null,null,1,i);i.lineEnd()}i.polygonEnd();c=null},sphere:function(){i.polygonStart();i.lineStart();r(null,null,1,i);i.lineEnd();i.polygonEnd()}};var c,h,p,d;var v=er(),m=n(v),g;return o}}function Zn(e){return e.length>1}function er(){var e=[],t;return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:G,buffer:function(){var n=e;e=[];t=null;return n},rejoin:function(){if(e.length>1)e.push(e.pop().concat(e.shift()))}}}function tr(e,t){if(!(n=e.length))return 0;var n,r=0,i=0,s=e[0],o=s[0],u=s[1],a=Math.cos(u),f=Math.atan2(t*Math.sin(o)*a,Math.sin(u)),l=1-t*Math.cos(o)*a,c=f,h,p;while(++r<n){s=e[r];a=Math.cos(u=s[1]);h=Math.atan2(t*Math.sin(o=s[0])*a,Math.sin(u));p=1-t*Math.cos(o)*a;if(Math.abs(l-2)<vt&&Math.abs(p-2)<vt)continue;if(Math.abs(p)<vt||Math.abs(l)<vt){}else if(Math.abs(Math.abs(h-f)-dt)<vt){if(p+l>2)i+=4*(h-f)}else if(Math.abs(l-2)<vt)i+=4*(h-c);else i+=((3*dt+h-f)%(2*dt)-dt)*(l+p);c=f,f=h,l=p}return i}function nr(e,t){return((e=e.point)[0]<0?e[1]-dt/2-vt:dt/2-e[1])-((t=t.point)[0]<0?t[1]-dt/2-vt:dt/2-t[1])}function ir(e){var t=NaN,n=NaN,r=NaN,i;return{lineStart:function(){e.lineStart();i=1},point:function(s,o){var u=s>0?dt:-dt,a=Math.abs(s-t);if(Math.abs(a-dt)<vt){e.point(t,n=(n+o)/2>0?dt/2:-dt/2);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);e.point(s,n);i=0}else if(r!==u&&a>=dt){if(Math.abs(t-r)<vt)t-=r*vt;if(Math.abs(s-u)<vt)s-=u*vt;n=sr(t,n,s,o);e.point(r,n);e.lineEnd();e.lineStart();e.point(u,n);i=0}e.point(t=s,n=o);r=u},lineEnd:function(){e.lineEnd();t=n=NaN},clean:function(){return 2-i}}}function sr(e,t,n,r){var i,s,o=Math.sin(e-n);return Math.abs(o)>vt?Math.atan((Math.sin(t)*(s=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*s*o)):(t+r)/2}function or(e,t,n,r){var i;if(e==null){i=n*dt/2;r.point(-dt,i);r.point(0,i);r.point(dt,i);r.point(dt,0);r.point(dt,-i);r.point(0,-i);r.point(-dt,-i);r.point(-dt,0);r.point(-dt,i)}else if(Math.abs(e[0]-t[0])>vt){var s=(e[0]<t[0]?1:-1)*dt;i=n*s/2;r.point(-s,i);r.point(0,i);r.point(s,i)}else{r.point(t[0],t[1])}}function ur(e){function s(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e){var t,i,o,f,l;return{lineStart:function(){f=o=false;l=1},point:function(c,h){var p=[c,h],d,v=s(c,h),m=n?v?0:a(c,h):v?a(c+(c<0?dt:-dt),h):0;if(!t&&(f=o=v))e.lineStart();if(v!==o){d=u(t,p);if(Kn(t,d)||Kn(p,d)){p[0]+=vt;p[1]+=vt;v=s(p[0],p[1])}}if(v!==o){l=0;if(v){e.lineStart();d=u(p,t);e.point(d[0],d[1])}else{d=u(t,p);e.point(d[0],d[1]);e.lineEnd()}t=d}else if(r&&t&&n^v){var g;if(!(m&i)&&(g=u(p,t,true))){l=0;if(n){e.lineStart();e.point(g[0][0],g[0][1]);e.point(g[1][0],g[1][1]);e.lineEnd()}else{e.point(g[1][0],g[1][1]);e.lineEnd();e.lineStart();e.point(g[0][0],g[0][1])}}}if(v&&(!t||!Kn(t,p))){e.point(p[0],p[1])}t=p,o=v,i=m},lineEnd:function(){if(o)e.lineEnd();t=null},clean:function(){return l|(f&&o)<<1}}}function u(e,n,r){var i=Rn(e),s=Rn(n);var o=[1,0,0],u=zn(i,s),a=Un(u,u),f=u[0],l=a-f*f;if(!l)return!r&&e;var c=t*a/l,h=-t*f/l,p=zn(o,u),d=Xn(o,c),v=Xn(u,h);Wn(d,v);var m=p,g=Un(d,m),y=Un(m,m),b=g*g-y*(Un(d,d)-1);if(b<0)return;var w=Math.sqrt(b),E=Xn(m,(-g-w)/y);Wn(E,d);E=Jn(E);if(!r)return E;var S=e[0],x=n[0],T=e[1],N=n[1],C;if(x<S)C=S,S=x,x=C;var k=x-S,L=Math.abs(k-dt)<vt,A=L||k<vt;if(!L&&N<T)C=T,T=N,N=C;if(A?L?T+N>0^E[1]<(Math.abs(E[0]-S)<vt?T:N):T<=E[1]&&E[1]<=N:k>dt^(S<=E[0]&&E[0]<=x)){var O=Xn(m,(-g+w)/y);Wn(O,d);return[E,Jn(O)]}}function a(t,r){var i=n?e:dt-e,s=0;if(t<-i)s|=1;else if(t>i)s|=2;if(r<-i)s|=4;else if(r>i)s|=8;return s}var t=Math.cos(e),n=t>0,r=Math.abs(t)>vt,i=Er(e,6*mt);return Yn(s,o,i)}function fr(t,n,r,i){function s(e,i){return Math.abs(e[0]-t)<vt?i>0?0:3:Math.abs(e[0]-r)<vt?i>0?2:1:Math.abs(e[1]-n)<vt?i>0?1:0:i>0?3:2}function o(e,t){return u(e.point,t.point)}function u(e,t){var n=s(e,1),r=s(t,1);return n!==r?n-r:n===0?t[1]-e[1]:n===1?e[0]-t[0]:n===2?e[1]-t[1]:t[0]-e[0]}function a(e,s){var o=s[0]-e[0],u=s[1]-e[1],a=[0,1];if(Math.abs(o)<vt&&Math.abs(u)<vt)return t<=e[0]&&e[0]<=r&&n<=e[1]&&e[1]<=i;if(lr(t-e[0],o,a)&&lr(e[0]-r,-o,a)&&lr(n-e[1],u,a)&&lr(e[1]-i,-u,a)){if(a[1]<1){s[0]=e[0]+a[1]*o;s[1]=e[1]+a[1]*u}if(a[0]>0){e[0]+=a[0]*o;e[1]+=a[0]*u}return true}return false}return function(f){function m(e){var o=s(e,-1),u=g([o===0||o===3?t:r,o>1?i:n]);return u}function g(e){var t=0,n=p.length,r=e[1];for(var i=0;i<n;++i){for(var s=1,o=p[i],u=o.length,a=o[0];s<u;++s){b=o[s];if(a[1]<=r){if(b[1]>r&&y(a,b,e)>0)++t}else{if(b[1]<=r&&y(a,b,e)<0)--t}a=b}}return t!==0}function y(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}function w(e,o,a,f){var l=0,c=0;if(e==null||(l=s(e,a))!==(c=s(o,a))||u(e,o)<0^a>0){do{f.point(l===0||l===3?t:r,l>1?i:n)}while((l=(l+a+4)%4)!==c)}else{f.point(o[0],o[1])}}function E(e,s){return t<=e&&e<=r&&n<=s&&s<=i}function S(e,t){if(E(e,t))f.point(e,t)}function O(){v.point=_;if(p)p.push(d=[]);A=true;L=false;C=k=NaN}function M(){if(h){_(x,T);if(N&&L)c.rejoin();h.push(c.buffer())}v.point=S;if(L)f.lineEnd()}function _(e,t){e=Math.max(-ar,Math.min(ar,e));t=Math.max(-ar,Math.min(ar,t));var n=E(e,t);if(p)d.push([e,t]);if(A){x=e,T=t,N=n;A=false;if(n){f.lineStart();f.point(e,t)}}else{if(n&&L)f.point(e,t);else{var r=[C,k],i=[e,t];if(a(r,i)){if(!L){f.lineStart();f.point(r[0],r[1])}f.point(i[0],i[1]);if(!n)f.lineEnd()}else{f.lineStart();f.point(e,t)}}}C=e,k=t,L=n}var l=f,c=er(),h,p,d;var v={point:S,lineStart:O,lineEnd:M,polygonStart:function(){f=c;h=[];p=[]},polygonEnd:function(){f=l;if((h=e.merge(h)).length){f.polygonStart();Qn(h,o,m,w,f);f.polygonEnd()}else if(g([t,n])){f.polygonStart(),f.lineStart();w(null,null,1,f);f.lineEnd(),f.polygonEnd()}h=p=d=null}};var x,T,N,C,k,L,A;return v}}function lr(e,t,n){if(Math.abs(t)<vt)return e<=0;var r=e/t;if(t>0){if(r>n[1])return false;if(r>n[0])n[0]=r}else{if(r<n[0])return false;if(r<n[1])n[1]=r}return true}function cr(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}if(e.invert&&t.invert)n.invert=function(n,r){return n=t.invert(n,r),n&&e.invert(n[0],n[1])};return n}function hr(e){function r(t){function c(n,r){n=e(n,r);t.point(n[0],n[1])}function h(){s=NaN;l.point=p;t.lineStart()}function p(l,c){var h=Rn([l,c]),p=e(l,c);i(s,o,r,u,a,f,s=p[0],o=p[1],r=l,u=h[0],a=h[1],f=h[2],n,t);t.point(s,o)}function d(){l.point=c;t.lineEnd()}function v(){var e,c,v,m,g,y,b;h();l.point=function(t,n){p(e=t,c=n),v=s,m=o,g=u,y=a,b=f;l.point=p};l.lineEnd=function(){i(s,o,r,u,a,f,v,m,e,g,y,b,n,t);l.lineEnd=d;d()}}var r,s,o,u,a,f;var l={point:c,lineStart:h,lineEnd:d,polygonStart:function(){t.polygonStart();l.lineStart=v},polygonEnd:function(){t.polygonEnd();l.lineStart=h}};return l}function i(n,r,s,o,u,a,f,l,c,h,p,d,v,m){var g=f-n,y=l-r,b=g*g+y*y;if(b>4*t&&v--){var w=o+h,E=u+p,S=a+d,x=Math.sqrt(w*w+E*E+S*S),T=Math.asin(S/=x),N=Math.abs(Math.abs(S)-1)<vt?(s+c)/2:Math.atan2(E,w),C=e(N,T),k=C[0],L=C[1],A=k-n,O=L-r,M=y*A-g*O;if(M*M/b>t||Math.abs((g*A+y*O)/b-.5)>.3){i(n,r,s,o,u,a,k,L,N,w/=x,E/=x,S,v,m);m.point(k,L);i(k,L,N,w,E,S,f,l,c,h,p,d,v,m)}}}var t=.5,n=16;r.precision=function(e){if(!arguments.length)return Math.sqrt(t);n=(t=e*e)>0&&16;return r};return r}function pr(e){return dr(function(){return e})()}function dr(t){function w(e){e=i(e[0]*mt,e[1]*mt);return[e[0]*o+d,v-e[1]*o]}function E(e){e=i.invert((e[0]-d)/o,(v-e[1])/o);return e&&[e[0]*gt,e[1]*gt]}function S(){i=cr(r=gr(c,h,p),n);var e=n(f,l);d=u-e[0]*o;v=a+e[1]*o;return w}var n,r,i,s=hr(function(e,t){e=n(e,t);return[e[0]*o+d,v-e[1]*o]}),o=150,u=480,a=250,f=0,l=0,c=0,h=0,p=0,d,v,m=rr,g=Gt,y=null,b=null;w.stream=function(e){return vr(r,m(s(g(e))))};w.clipAngle=function(e){if(!arguments.length)return y;m=e==null?(y=e,rr):ur((y=+e)*mt);return w};w.clipExtent=function(e){if(!arguments.length)return b;b=e;g=e==null?Gt:fr(e[0][0],e[0][1],e[1][0],e[1][1]);return w};w.scale=function(e){if(!arguments.length)return o;o=+e;return S()};w.translate=function(e){if(!arguments.length)return[u,a];u=+e[0];a=+e[1];return S()};w.center=function(e){if(!arguments.length)return[f*gt,l*gt];f=e[0]%360*mt;l=e[1]%360*mt;return S()};w.rotate=function(e){if(!arguments.length)return[c*gt,h*gt,p*gt];c=e[0]%360*mt;h=e[1]%360*mt;p=e.length>2?e[2]%360*mt:0;return S()};e.rebind(w,s,"precision");return function(){n=t.apply(this,arguments);w.invert=n.invert&&E;return S()}}function vr(e,t){return{point:function(n,r){r=e(n*mt,r*mt),n=r[0];t.point(n>dt?n-2*dt:n<-dt?n+2*dt:n,r[1])},sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function mr(e,t){return[e,t]}function gr(e,t,n){return e?t||n?cr(br(e),wr(t,n)):br(e):t||n?wr(t,n):mr}function yr(e){return function(t,n){return t+=e,[t>dt?t-2*dt:t<-dt?t+2*dt:t,n]}}function br(e){var t=yr(e);t.invert=yr(-e);return t}function wr(e,t){function o(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*n+u*r;return[Math.atan2(a*i-l*s,u*n-f*r),Math.asin(Math.max(-1,Math.min(1,l*i+a*s)))]}var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),s=Math.sin(t);o.invert=function(e,t){var o=Math.cos(t),u=Math.cos(e)*o,a=Math.sin(e)*o,f=Math.sin(t),l=f*i-a*s;return[Math.atan2(a*i+f*s,u*n+l*r),Math.asin(Math.max(-1,Math.min(1,l*n-u*r)))]};return o}function Er(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,s,o,u){if(i!=null){i=Sr(n,i);s=Sr(n,s);if(o>0?i<s:i>s)i+=o*2*dt}else{i=e+o*2*dt;s=e}var a;for(var f=o*t,l=i;o>0?l>s:l<s;l-=f){u.point((a=Jn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],a[1])}}}function Sr(e,t){var n=Rn(t);n[0]-=e;Vn(n);var r=bt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-vt)%(2*Math.PI)}function xr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[e,t]})}}function Tr(t,n,r){var i=e.range(t,n-vt,r).concat(n);return function(e){return i.map(function(t){return[t,e]})}}function Nr(e){return e.source}function Cr(e){return e.target}function kr(e,t,n,r){var i=Math.cos(t),s=Math.sin(t),o=Math.cos(r),u=Math.sin(r),a=i*Math.cos(e),f=i*Math.sin(e),l=o*Math.cos(n),c=o*Math.sin(n),h=2*Math.asin(Math.sqrt(xt(r-t)+i*o*xt(n-e))),p=1/Math.sin(h);var d=h?function(e){var t=Math.sin(e*=h)*p,n=Math.sin(h-e)*p,r=n*a+t*l,i=n*f+t*c,o=n*s+t*u;return[Math.atan2(i,r)*gt,Math.atan2(o,Math.sqrt(r*r+i*i))*gt]}:function(){return[e*gt,t*gt]};d.distance=h;return d}function Or(){function r(r,i){var s=Math.sin(i*=mt),o=Math.cos(i),u=Math.abs((r*=mt)-e),a=Math.cos(u);Lr+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=n*s-t*o*a)*u),t*s+n*o*a);e=r,t=s,n=o}var e,t,n;Ar.point=function(i,s){e=i*mt,t=Math.sin(s*=mt),n=Math.cos(s);Ar.point=r};Ar.lineEnd=function(){Ar.point=Ar.lineEnd=G}}function Mr(e){var t=0,n=dt/3,r=dr(e),i=r(t,n);i.parallels=function(e){if(!arguments.length)return[t/dt*180,n/dt*180];return r(t=e[0]*dt/180,n=e[1]*dt/180)};return i}function _r(e,t){function o(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),s-n*Math.cos(e)]}var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),s=Math.sqrt(i)/r;o.invert=function(e,t){var n=s-t;return[Math.atan2(e,n)/r,Math.asin((i-(e*e+n*n)*r*r)/(2*r))]};return o}function Dr(e,t){var n=e(t[0]),r=e([.5*(t[0][0]+t[1][0]),t[0][1]]),i=e([t[1][0],t[0][1]]),s=e(t[1]);var o=r[1]-n[1],u=r[0]-n[0],a=i[1]-r[1],f=i[0]-r[0];var l=o/u,c=a/f;var h=.5*(l*c*(n[1]-i[1])+c*(n[0]+r[0])-l*(r[0]+i[0]))/(c-l),p=(.5*(n[0]+r[0])-h)/l+.5*(n[1]+r[1]);var d=s[0]-h,v=s[1]-p,m=n[0]-h,g=n[1]-p,y=d*d+v*v,b=m*m+g*g;var w=Math.atan2(v,d),E=Math.atan2(g,m);return function(t){var n=t[0]-h,r=t[1]-p,i=n*n+r*r,s=Math.atan2(r,n);if(y<i&&i<b&&w<s&&s<E)return e.invert(t)}}function jr(){function i(e,t){Hr+=r*e-n*t;n=e,r=t}var e,t,n,r;Br.point=function(s,o){Br.point=i;e=n=s,t=r=o};Br.lineEnd=function(){i(e,t)}}function Fr(){function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r);n.point=s}function s(e,n){t.push("L",e,",",n)}function o(){n.point=r}function u(){t.push("Z")}var e=Xr(4.5),t=[];var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(t){e=Xr(t);return n},result:function(){if(t.length){var e=t.join("");t=[];return e}}};return n}function qr(e,t){if(Mn)return;Dn+=e;Pn+=t;++Hn}function Rr(){function n(n,r){var i=n-e,s=r-t,o=Math.sqrt(i*i+s*s);Dn+=o*(e+n)/2;Pn+=o*(t+r)/2;Hn+=o;e=n,t=r}var e,t;if(Mn!==1){if(Mn<1){Mn=1;Dn=Pn=Hn=0}else return}Ir.point=function(r,i){Ir.point=n;e=r,t=i}}function Ur(){Ir.point=qr}function zr(){function i(e,t){var i=r*e-n*t;Dn+=i*(n+e);Pn+=i*(r+t);Hn+=i*3;n=e,r=t}var e,t,n,r;if(Mn<2){Mn=2;Dn=Pn=Hn=0}Ir.point=function(s,o){Ir.point=i;e=n=s,t=r=o};Ir.lineEnd=function(){i(e,t)}}function Wr(e){function r(n,r){e.moveTo(n,r);e.arc(n,r,t,0,2*dt)}function i(t,r){e.moveTo(t,r);n.point=s}function s(t,n){e.lineTo(t,n)}function o(){n.point=r}function u(){e.closePath()}var t=4.5;var n={point:r,lineStart:function(){n.point=i},lineEnd:o,polygonStart:function(){n.lineEnd=u},polygonEnd:function(){n.lineEnd=o;n.point=r},pointRadius:function(e){t=e;return n},result:G};return n}function Xr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+ -2*e+"a"+e+","+e+" 0 1,1 0,"+ +2*e+"z"}function Vr(e){var t=hr(function(t,n){return e([t*gt,n*gt])});return function(e){e=t(e);return{point:function(t,n){e.point(t*mt,n*mt)},sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}}function $r(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),s=e(r*i);return[s*i*Math.sin(t),s*Math.sin(n)]}n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),s=Math.sin(i),o=Math.cos(i);return[Math.atan2(e*s,r*o),Math.asin(r&&n*s/r)]};return n}function Qr(e,t){function o(e,t){var n=Math.abs(Math.abs(t)-dt/2)<vt?0:s/Math.pow(r(t),i);return[n*Math.sin(i*e),s-n*Math.cos(i*e)]}var n=Math.cos(e),r=function(e){return Math.tan(dt/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),s=n*Math.pow(r(e),i)/i;if(!i)return Zr;o.invert=function(e,t){var n=s-t,r=yt(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(s/r,1/i))-dt/2]};return o}function Gr(e,t){function s(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(Math.abs(r)<vt)return mr;s.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-yt(r)*Math.sqrt(e*e+n*n)]};return s}function Zr(e,t){return[e,Math.log(Math.tan(dt/4+t/2))]}function ei(e){var t=pr(e),n=t.scale,r=t.translate,i=t.clipExtent,s;t.scale=function(){var e=n.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.translate=function(){var e=r.apply(t,arguments);return e===t?s?t.clipExtent(null):t:e};t.clipExtent=function(e){var o=i.apply(t,arguments);if(o===t){if(s=e==null){var u=dt*n(),a=r();i([[a[0]-u,a[1]-u],[a[0]+u,a[1]+u]])}}else if(s){o=null}return o};return t.clipExtent(null)}function ri(e,t){var n=Math.cos(t)*Math.sin(e);return[Math.log((1+n)/(1-n))/2,Math.atan2(Math.tan(t),Math.cos(e))]}function ii(e){function u(s){function d(){u.push("M",i(e(a),o))}var u=[],a=[],f=-1,l=s.length,c,h=Qt(t),p=Qt(n);while(++f<l){if(r.call(this,c=s[f],f)){a.push([+h.call(this,c,f),+p.call(this,c,f)])}else if(a.length){d();a=[]}}if(a.length)d();return u.length?u.join(""):null}var t=si,n=oi,r=$n,i=ai,s=i.key,o=.7;u.x=function(e){if(!arguments.length)return t;t=e;return u};u.y=function(e){if(!arguments.length)return n;n=e;return u};u.defined=function(e){if(!arguments.length)return r;r=e;return u};u.interpolate=function(e){if(!arguments.length)return s;if(typeof e==="function")s=i=e;else s=(i=ui.get(e)||ai).key;return u};u.tension=function(e){if(!arguments.length)return o;o=e;return u};return u}function si(e){return e[0]}function oi(e){return e[1]}function ai(e){return e.join("L")}function fi(e){return ai(e)+"Z"}function li(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ci(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];while(++t<n)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function hi(e,t){return e.length<4?ai(e):e[1]+vi(e.slice(1,e.length-1),mi(e,t))}function pi(e,t){return e.length<3?ai(e):e[0]+vi((e.push(e[0]),e),mi([e[e.length-2]].concat(e,[e[1]]),t))}function di(e,t){return e.length<3?ai(e):e[0]+vi(e,mi(e,t))}function vi(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2){return ai(e)}var n=e.length!=t.length,r="",i=e[0],s=e[1],o=t[0],u=o,a=1;if(n){r+="Q"+(s[0]-o[0]*2/3)+","+(s[1]-o[1]*2/3)+","+s[0]+","+s[1];i=e[1];a=2}if(t.length>1){u=t[1];s=e[a];a++;r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1];for(var f=2;f<t.length;f++,a++){s=e[a];u=t[f];r+="S"+(s[0]-u[0])+","+(s[1]-u[1])+","+s[0]+","+s[1]}}if(n){var l=e[a];r+="Q"+(s[0]+u[0]*2/3)+","+(s[1]+u[1]*2/3)+","+l[0]+","+l[1]}return r}function mi(e,t){var n=[],r=(1-t)/2,i,s=e[0],o=e[1],u=1,a=e.length;while(++u<a){i=s;s=o;o=e[u];n.push([r*(o[0]-i[0]),r*(o[1]-i[1])])}return n}function gi(e){if(e.length<3)return ai(e);var t=1,n=e.length,r=e[0],i=r[0],s=r[1],o=[i,i,i,(r=e[1])[0]],u=[s,s,s,r[1]],a=[i,",",s];Ni(a,o,u);while(++t<n){r=e[t];o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}t=-1;while(++t<2){o.shift();o.push(r[0]);u.shift();u.push(r[1]);Ni(a,o,u)}return a.join("")}function yi(e){if(e.length<4)return ai(e);var t=[],n=-1,r=e.length,i,s=[0],o=[0];while(++n<3){i=e[n];s.push(i[0]);o.push(i[1])}t.push(Ei(Ti,s)+","+Ei(Ti,o));--n;while(++n<r){i=e[n];s.shift();s.push(i[0]);o.shift();o.push(i[1]);Ni(t,s,o)}return t.join("")}function bi(e){var t,n=-1,r=e.length,i=r+4,s,o=[],u=[];while(++n<4){s=e[n%r];o.push(s[0]);u.push(s[1])}t=[Ei(Ti,o),",",Ei(Ti,u)];--n;while(++n<i){s=e[n%r];o.shift();o.push(s[0]);u.shift();u.push(s[1]);Ni(t,o,u)}return t.join("")}function wi(e,t){var n=e.length-1;if(n){var r=e[0][0],i=e[0][1],s=e[n][0]-r,o=e[n][1]-i,u=-1,a,f;while(++u<=n){a=e[u];f=u/n;a[0]=t*a[0]+(1-t)*(r+f*s);a[1]=t*a[1]+(1-t)*(i+f*o)}}return gi(e)}function Ei(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Ni(e,t,n){e.push("C",Ei(Si,t),",",Ei(Si,n),",",Ei(xi,t),",",Ei(xi,n),",",Ei(Ti,t),",",Ei(Ti,n))}function Ci(e,t){return(t[1]-e[1])/(t[0]-e[0])}function ki(e){var t=0,n=e.length-1,r=[],i=e[0],s=e[1],o=r[0]=Ci(i,s);while(++t<n){r[t]=(o+(o=Ci(i=s,s=e[t+1])))/2}r[t]=o;return r}function Li(e){var t=[],n,r,i,s,o=ki(e),u=-1,a=e.length-1;while(++u<a){n=Ci(e[u],e[u+1]);if(Math.abs(n)<1e-6){o[u]=o[u+1]=0}else{r=o[u]/n;i=o[u+1]/n;s=r*r+i*i;if(s>9){s=n*3/Math.sqrt(s);o[u]=s*r;o[u+1]=s*i}}}u=-1;while(++u<=a){s=(e[Math.min(a,u+1)][0]-e[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u]));t.push([s||0,o[u]*s||0])}return t}function Ai(e){return e.length<3?ai(e):e[0]+vi(e,Li(e))}function Oi(e,t,n,r){var i,s,o,u,a,f,l;i=r[e];s=i[0];o=i[1];i=r[t];u=i[0];a=i[1];i=r[n];f=i[0];l=i[1];return(l-o)*(u-s)-(a-o)*(f-s)>0}function Mi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function _i(e,t,n,r){var i=e[0],s=n[0],o=t[0]-i,u=r[0]-s,a=e[1],f=n[1],l=t[1]-a,c=r[1]-f,h=(u*(a-f)-c*(i-s))/(c*o-u*l);return[i+h*o,a+h*l]}function Pi(e,t){var n={list:e.map(function(e,t){return{index:t,x:e[0],y:e[1]}}).sort(function(e,t){return e.y<t.y?-1:e.y>t.y?1:e.x<t.x?-1:e.x>t.x?1:0}),bottomSite:null};var r={list:[],leftEnd:null,rightEnd:null,init:function(){r.leftEnd=r.createHalfEdge(null,"l");r.rightEnd=r.createHalfEdge(null,"l");r.leftEnd.r=r.rightEnd;r.rightEnd.l=r.leftEnd;r.list.unshift(r.leftEnd,r.rightEnd)},createHalfEdge:function(e,t){return{edge:e,side:t,vertex:null,l:null,r:null}},insert:function(e,t){t.l=e;t.r=e.r;e.r.l=t;e.r=t},leftBound:function(e){var t=r.leftEnd;do{t=t.r}while(t!=r.rightEnd&&i.rightOf(t,e));t=t.l;return t},del:function(e){e.l.r=e.r;e.r.l=e.l;e.edge=null},right:function(e){return e.r},left:function(e){return e.l},leftRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[e.side]},rightRegion:function(e){return e.edge==null?n.bottomSite:e.edge.region[Di[e.side]]}};var i={bisect:function(e,t){var n={region:{l:e,r:t},ep:{l:null,r:null}};var r=t.x-e.x,i=t.y-e.y,s=r>0?r:-r,o=i>0?i:-i;n.c=e.x*r+e.y*i+(r*r+i*i)*.5;if(s>o){n.a=1;n.b=i/r;n.c/=r}else{n.b=1;n.a=r/i;n.c/=i}return n},intersect:function(e,t){var n=e.edge,r=t.edge;if(!n||!r||n.region.r==r.region.r){return null}var i=n.a*r.b-n.b*r.a;if(Math.abs(i)<1e-10){return null}var s=(n.c*r.b-r.c*n.b)/i,o=(r.c*n.a-n.c*r.a)/i,u=n.region.r,a=r.region.r,f,l;if(u.y<a.y||u.y==a.y&&u.x<a.x){f=e;l=n}else{f=t;l=r}var c=s>=l.region.r.x;if(c&&f.side==="l"||!c&&f.side==="r"){return null}return{x:s,y:o}},rightOf:function(e,t){var n=e.edge,r=n.region.r,i=t.x>r.x;if(i&&e.side==="l"){return 1}if(!i&&e.side==="r"){return 0}if(n.a===1){var s=t.y-r.y,o=t.x-r.x,u=0,a=0;if(!i&&n.b<0||i&&n.b>=0){a=u=s>=n.b*o}else{a=t.x+t.y*n.b>n.c;if(n.b<0){a=!a}if(!a){u=1}}if(!u){var f=r.x-n.region.l.x;a=n.b*(o*o-s*s)<f*s*(1+2*o/f+n.b*n.b);if(n.b<0){a=!a}}}else{var l=n.c-n.a*t.x,c=t.y-l,h=t.x-r.x,p=l-r.y;a=c*c>h*h+p*p}return e.side==="l"?a:!a},endPoint:function(e,n,r){e.ep[n]=r;if(!e.ep[Di[n]])return;t(e)},distance:function(e,t){var n=e.x-t.x,r=e.y-t.y;return Math.sqrt(n*n+r*r)}};var s={list:[],insert:function(e,t,n){e.vertex=t;e.ystar=t.y+n;for(var r=0,i=s.list,o=i.length;r<o;r++){var u=i[r];if(e.ystar>u.ystar||e.ystar==u.ystar&&t.x>u.vertex.x){continue}else{break}}i.splice(r,0,e)},del:function(e){for(var t=0,n=s.list,r=n.length;t<r&&n[t]!=e;++t){}n.splice(t,1)},empty:function(){return s.list.length===0},nextEvent:function(e){for(var t=0,n=s.list,r=n.length;t<r;++t){if(n[t]==e)return n[t+1]}return null},min:function(){var e=s.list[0];return{x:e.vertex.x,y:e.ystar}},extractMin:function(){return s.list.shift()}};r.init();n.bottomSite=n.list.shift();var o=n.list.shift(),u;var a,f,l,c,h;var p,d,v,m,g;var y,b;while(true){if(!s.empty()){u=s.min()}if(o&&(s.empty()||o.y<u.y||o.y==u.y&&o.x<u.x)){a=r.leftBound(o);f=r.right(a);p=r.rightRegion(a);y=i.bisect(p,o);h=r.createHalfEdge(y,"l");r.insert(a,h);m=i.intersect(a,h);if(m){s.del(a);s.insert(a,m,i.distance(m,o))}a=h;h=r.createHalfEdge(y,"r");r.insert(a,h);m=i.intersect(h,f);if(m){s.insert(h,m,i.distance(m,o))}o=n.list.shift()}else if(!s.empty()){a=s.extractMin();l=r.left(a);f=r.right(a);c=r.right(f);p=r.leftRegion(a);d=r.rightRegion(f);g=a.vertex;i.endPoint(a.edge,a.side,g);i.endPoint(f.edge,f.side,g);r.del(a);s.del(f);r.del(f);b="l";if(p.y>d.y){v=p;p=d;d=v;b="r"}y=i.bisect(p,d);h=r.createHalfEdge(y,b);r.insert(l,h);i.endPoint(y,Di[b],g);m=i.intersect(l,h);if(m){s.del(l);s.insert(l,m,i.distance(m,p))}m=i.intersect(h,c);if(m){s.insert(h,m,i.distance(m,p))}}else{break}}for(a=r.right(r.leftEnd);a!=r.rightEnd;a=r.right(a)){t(a.edge)}}function Hi(e){return e.x}function Bi(e){return e.y}function ji(){return{leaf:true,nodes:[],point:null,x:null,y:null}}function Fi(e,t,n,r,i,s){if(!e(t,n,r,i,s)){var o=(n+i)*.5,u=(r+s)*.5,a=t.nodes;if(a[0])Fi(e,a[0],n,r,o,u);if(a[1])Fi(e,a[1],o,r,i,u);if(a[2])Fi(e,a[2],n,u,o,s);if(a[3])Fi(e,a[3],o,u,i,s)}}function Ii(t,n){t=e.rgb(t);n=e.rgb(n);var r=t.r,i=t.g,s=t.b,o=n.r-r,u=n.g-i,a=n.b-s;return function(e){return"#"+zt(Math.round(r+o*e))+zt(Math.round(i+u*e))+zt(Math.round(s+a*e))}}function qi(e){var t=[e.a,e.b],n=[e.c,e.d],r=Ui(t),i=Ri(t,n),s=Ui(zi(n,t,-i))||0;if(t[0]*n[1]<n[0]*t[1]){t[0]*=-1;t[1]*=-1;r*=-1;i*=-1}this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-n[0],n[1]))*gt;this.translate=[e.e,e.f];this.scale=[r,s];this.skew=s?Math.atan2(i,s)*gt:0}function Ri(e,t){return e[0]*t[0]+e[1]*t[1]}function Ui(e){var t=Math.sqrt(Ri(e,e));if(t){e[0]/=t;e[1]/=t}return t}function zi(e,t,n){e[0]+=n*t[0];e[1]+=n*t[1];return e}function Xi(e,t){t-=e=+e;return function(n){return e+t*n}}function Vi(t,n){var r=[],i=[],s,o=e.transform(t),u=e.transform(n),a=o.translate,f=u.translate,l=o.rotate,c=u.rotate,h=o.skew,p=u.skew,d=o.scale,v=u.scale;if(a[0]!=f[0]||a[1]!=f[1]){r.push("translate(",null,",",null,")");i.push({i:1,x:Xi(a[0],f[0])},{i:3,x:Xi(a[1],f[1])})}else if(f[0]||f[1]){r.push("translate("+f+")")}else{r.push("")}if(l!=c){if(l-c>180)c+=360;else if(c-l>180)l+=360;i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:Xi(l,c)})}else if(c){r.push(r.pop()+"rotate("+c+")")}if(h!=p){i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:Xi(h,p)})}else if(p){r.push(r.pop()+"skewX("+p+")")}if(d[0]!=v[0]||d[1]!=v[1]){s=r.push(r.pop()+"scale(",null,",",null,")");i.push({i:s-4,x:Xi(d[0],v[0])},{i:s-2,x:Xi(d[1],v[1])})}else if(v[0]!=1||v[1]!=1){r.push(r.pop()+"scale("+v+")")}s=i.length;return function(e){var t=-1,n;while(++t<s)r[(n=i[t]).i]=n.x(e);return r.join("")}}function $i(e,t){var n={},r={},i;for(i in e){if(i in t){n[i]=Gi(i)(e[i],t[i])}else{r[i]=e[i]}}for(i in t){if(!(i in e)){r[i]=t[i]}}return function(e){for(i in n)r[i]=n[i](e);return r}}function Ji(e,t){var n,r,i,s=0,o=0,u=[],a=[],f,l;e=e+"",t=t+"";Ki.lastIndex=0;for(r=0;n=Ki.exec(t);++r){if(n.index)u.push(t.substring(s,o=n.index));a.push({i:u.length,x:n[0]});u.push(null);s=Ki.lastIndex}if(s<t.length)u.push(t.substring(s));for(r=0,f=a.length;(n=Ki.exec(e))&&r<f;++r){l=a[r];if(l.x==n[0]){if(l.i){if(u[l.i+1]==null){u[l.i-1]+=l.x;u.splice(l.i,1);for(i=r+1;i<f;++i)a[i].i--}else{u[l.i-1]+=l.x+u[l.i+1];u.splice(l.i,2);for(i=r+1;i<f;++i)a[i].i-=2}}else{if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1);for(i=r+1;i<f;++i)a[i].i--}}a.splice(r,1);f--;r--}else{l.x=Xi(parseFloat(n[0]),parseFloat(l.x))}}while(r<f){l=a.pop();if(u[l.i+1]==null){u[l.i]=l.x}else{u[l.i]=l.x+u[l.i+1];u.splice(l.i+1,1)}f--}if(u.length===1){return u[0]==null?a[0].x:function(){return t}}return function(e){for(r=0;r<f;++r)u[(l=a[r]).i]=l.x(e);return u.join("")}}function Qi(t,n){var r=e.interpolators.length,i;while(--r>=0&&!(i=e.interpolators[r](t,n)));return i}function Gi(e){return e=="transform"?Vi:Qi}function Yi(e,t){var n=[],r=[],i=e.length,s=t.length,o=Math.min(e.length,t.length),u;for(u=0;u<o;++u)n.push(Qi(e[u],t[u]));for(;u<i;++u)r[u]=e[u];for(;u<s;++u)r[u]=t[u];return function(e){for(u=0;u<o;++u)r[u]=n[u](e);return r}}function ns(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function rs(e){return function(t){return 1-e(1-t)}}function is(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function ss(e){return e*e}function os(e){return e*e*e}function us(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function as(e){return function(t){return Math.pow(t,e)}}function fs(e){return 1-Math.cos(e*dt/2)}function ls(e){return Math.pow(2,10*(e-1))}function cs(e){return 1-Math.sqrt(1-e*e)}function hs(e,t){var n;if(arguments.length<2)t=.45;if(arguments.length)n=t/(2*dt)*Math.asin(1/e);else e=1,n=t/4;return function(r){return 1+e*Math.pow(2,10*-r)*Math.sin((r-n)*2*dt/t)}}function ps(e){if(!e)e=1.70158;return function(t){return t*t*((e+1)*t-e)}}function ds(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function vs(t,n){t=e.hcl(t);n=e.hcl(n);var r=t.h,i=t.c,s=t.l,o=n.h-r,u=n.c-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return kt(r+o*e,i+u*e,s+a*e)+""}}function ms(t,n){t=e.hsl(t);n=e.hsl(n);var r=t.h,i=t.s,s=t.l,o=n.h-r,u=n.s-i,a=n.l-s;if(o>180)o-=360;else if(o<-180)o+=360;return function(e){return pt(r+o*e,i+u*e,s+a*e)+""}}function gs(t,n){t=e.lab(t);n=e.lab(n);var r=t.l,i=t.a,s=t.b,o=n.l-r,u=n.a-i,a=n.b-s;return function(e){return Ht(r+o*e,i+u*e,s+a*e)+""}}function ys(e,t){t-=e;return function(n){return Math.round(e+t*n)}}function bs(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return(n-e)*t}}function ws(e,t){t=t-(e=+e)?1/(t-e):0;return function(n){return Math.max(0,Math.min(1,(n-e)*t))}}function Es(e){var t=e.source,n=e.target,r=xs(t,n),i=[t];while(t!==r){t=t.parent;i.push(t)}var s=i.length;while(n!==r){i.splice(s,0,n);n=n.parent}return i}function Ss(e){var t=[],n=e.parent;while(n!=null){t.push(e);e=n;n=n.parent}t.push(e);return t}function xs(e,t){if(e===t)return e;var n=Ss(e),r=Ss(t),i=n.pop(),s=r.pop(),o=null;while(i===s){o=i;i=n.pop();s=r.pop()}return o}function Ts(e){e.fixed|=2}function Ns(e){e.fixed&=~6}function Cs(e){e.fixed|=4;e.px=e.x,e.py=e.y}function ks(e){e.fixed&=~4}function Ls(e,t,n){var r=0,i=0;e.charge=0;if(!e.leaf){var s=e.nodes,o=s.length,u=-1,a;while(++u<o){a=s[u];if(a==null)continue;Ls(a,t,n);e.charge+=a.charge;r+=a.charge*a.cx;i+=a.charge*a.cy}}if(e.point){if(!e.leaf){e.point.x+=Math.random()-.5;e.point.y+=Math.random()-.5}var f=t*n[e.point.index];e.charge+=e.pointCharge=f;r+=f*e.point.x;i+=f*e.point.y}e.cx=r/e.charge;e.cy=i/e.charge}function Ms(t,n){e.rebind(t,n,"sort","children","value");t.nodes=t;t.links=Hs;return t}function _s(e){return e.children}function Ds(e){return e.value}function Ps(e,t){return t.value-e.value}function Hs(t){return e.merge(t.map(function(e){return(e.children||[]).map(function(t){return{source:e,target:t}})}))}function js(e){return e.x}function Fs(e){return e.y}function Is(e,t,n){e.y0=t;e.y=n}function Us(t){return e.range(t.length)}function zs(e){var t=-1,n=e[0].length,r=[];while(++t<n)r[t]=0;return r}function Ws(e){var t=1,n=0,r=e[0][1],i,s=e.length;for(;t<s;++t){if((i=e[t][1])>r){n=t;r=i}}return n}function Xs(e){return e.reduce(Vs,0)}function Vs(e,t){return e+t[1]}function $s(e,t){return Js(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Js(e,t){var n=-1,r=+e[0],i=(e[1]-r)/t,s=[];while(++n<=t)s[n]=i*n+r;return s}function Ks(t){return[e.min(t),e.max(t)]}function Qs(e,t){return e.parent==t.parent?1:2}function Gs(e){var t=e.children;return t&&t.length?t[0]:e._tree.thread}function Ys(e){var t=e.children,n;return t&&(n=t.length)?t[n-1]:e._tree.thread}function Zs(e,t){var n=e.children;if(n&&(i=n.length)){var r,i,s=-1;while(++s<i){if(t(r=Zs(n[s],t),e)>0){e=r}}}return e}function eo(e,t){return e.x-t.x}function to(e,t){return t.x-e.x}function no(e,t){return e.depth-t.depth}function ro(e,t){function n(e,r){var i=e.children;if(i&&(a=i.length)){var s,o=null,u=-1,a;while(++u<a){s=i[u];n(s,o);o=s}}t(e,r)}n(e,null)}function io(e){var t=0,n=0,r=e.children,i=r.length,s;while(--i>=0){s=r[i]._tree;s.prelim+=t;s.mod+=t;t+=s.shift+(n+=s.change)}}function so(e,t,n){e=e._tree;t=t._tree;var r=n/(t.number-e.number);e.change+=r;t.change-=r;t.shift+=n;t.prelim+=n;t.mod+=n}function oo(e,t,n){return e._tree.ancestor.parent==t.parent?e._tree.ancestor:n}function uo(e,t){return e.value-t.value}function ao(e,t){var n=e._pack_next;e._pack_next=t;t._pack_prev=e;t._pack_next=n;n._pack_prev=t}function fo(e,t){e._pack_next=t;t._pack_prev=e}function lo(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return i*i-n*n-r*r>.001}function co(e){function p(e){n=Math.min(e.x-e.r,n);r=Math.max(e.x+e.r,r);i=Math.min(e.y-e.r,i);s=Math.max(e.y+e.r,s)}if(!(t=e.children)||!(h=t.length))return;var t,n=Infinity,r=-Infinity,i=Infinity,s=-Infinity,o,u,a,f,l,c,h;t.forEach(ho);o=t[0];o.x=-o.r;o.y=0;p(o);if(h>1){u=t[1];u.x=u.r;u.y=0;p(u);if(h>2){a=t[2];mo(o,u,a);p(a);ao(o,a);o._pack_prev=a;ao(a,u);u=o._pack_next;for(f=3;f<h;f++){mo(o,u,a=t[f]);var d=0,v=1,m=1;for(l=u._pack_next;l!==u;l=l._pack_next,v++){if(lo(l,a)){d=1;break}}if(d==1){for(c=o._pack_prev;c!==l._pack_prev;c=c._pack_prev,m++){if(lo(c,a)){break}}}if(d){if(v<m||v==m&&u.r<o.r)fo(o,u=l);else fo(o=c,u);f--}else{ao(o,a);u=a;p(a)}}}}var g=(n+r)/2,y=(i+s)/2,b=0;for(f=0;f<h;f++){a=t[f];a.x-=g;a.y-=y;b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y))}e.r=b;t.forEach(po)}function ho(e){e._pack_next=e._pack_prev=e}function po(e){delete e._pack_next;delete e._pack_prev}function vo(e,t,n,r){var i=e.children;e.x=t+=r*e.x;e.y=n+=r*e.y;e.r*=r;if(i){var s=-1,o=i.length;while(++s<o)vo(i[s],t,n,r)}}function mo(e,t,n){var r=e.r+n.r,i=t.x-e.x,s=t.y-e.y;if(r&&(i||s)){var o=t.r+n.r,u=i*i+s*s;o*=o;r*=r;var a=.5+(r-o)/(2*u),f=Math.sqrt(Math.max(0,2*o*(r+u)-(r-=u)*r-o*o))/(2*u);n.x=e.x+a*i+f*s;n.y=e.y+a*s-f*i}else{n.x=e.x+r;n.y=e.y}}function go(t){return 1+e.max(t,function(e){return e.y})}function yo(e){return e.reduce(function(e,t){return e+t.x},0)/e.length}function bo(e){var t=e.children;return t&&t.length?bo(t[0]):e}function wo(e){var t=e.children,n;return t&&(n=t.length)?wo(t[n-1]):e}function Eo(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function So(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],s=e.dy-t[0]-t[2];if(i<0){n+=i/2;i=0}if(s<0){r+=s/2;s=0}return{x:n,y:r,dx:i,dy:s}}function xo(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function To(e){return e.rangeExtent?e.rangeExtent():xo(e.range())}function No(e,t,n,r){var i=n(e[0],e[1]),s=r(t[0],t[1]);return function(e){return s(i(e))}}function Co(e,t){var n=0,r=e.length-1,i=e[n],s=e[r],o;if(s<i){o=n,n=r,r=o;o=i,i=s,s=o}if(t=t(s-i)){e[n]=t.floor(i);e[r]=t.ceil(s)}return e}function ko(t,n,r,i){var s=[],o=[],u=0,a=Math.min(t.length,n.length)-1;if(t[a]<t[0]){t=t.slice().reverse();n=n.slice().reverse()}while(++u<=a){s.push(r(t[u-1],t[u]));o.push(i(n[u-1],n[u]))}return function(n){var r=e.bisect(t,n,1,a)-1;return o[r](s[r](n))}}function Lo(e,t,n,r){function o(){var o=Math.min(e.length,t.length)>2?ko:No,a=r?ws:bs;i=o(e,t,a,n);s=o(t,e,a,Qi);return u}function u(e){return i(e)}var i,s;u.invert=function(e){return s(e)};u.domain=function(t){if(!arguments.length)return e;e=t.map(Number);return o()};u.range=function(e){if(!arguments.length)return t;t=e;return o()};u.rangeRound=function(e){return u.range(e).interpolate(ys)};u.clamp=function(e){if(!arguments.length)return r;r=e;return o()};u.interpolate=function(e){if(!arguments.length)return n;n=e;return o()};u.ticks=function(t){return _o(e,t)};u.tickFormat=function(t,n){return Do(e,t,n)};u.nice=function(){Co(e,Oo);return o()};u.copy=function(){return Lo(e,t,n,r)};return o()}function Ao(t,n){return e.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Oo(e){e=Math.pow(10,Math.round(Math.log(e)/Math.LN10)-1);return e&&{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}}function Mo(e,t){var n=xo(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),s=t/r*i;if(s<=.15)i*=10;else if(s<=.35)i*=5;else if(s<=.75)i*=2;n[0]=Math.ceil(n[0]/i)*i;n[1]=Math.floor(n[1]/i)*i+i*.5;n[2]=i;return n}function _o(t,n){return e.range.apply(e,Mo(t,n))}function Do(t,n,r){var i=-Math.floor(Math.log(Mo(t,n)[2])/Math.LN10+.01);return e.format(r?r.replace(dn,function(e,t,n,r,s,o,u,a,f,l){return[t,n,r,s,o,u,a,f||"."+(i-(l==="%")*2),l].join("")}):",."+i+"f")}function Po(e,t,n,r){function i(t){return e(n(t))}i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);if(t[0]<0)n=Fo,r=Io;else n=Bo,r=jo;e.domain(t.map(n));return i};i.base=function(e){if(!arguments.length)return t;t=+e;return i};i.nice=function(){e.domain(Co(e.domain(),qo(t)));return i};i.ticks=function(){var i=xo(e.domain()),s=[];if(i.every(isFinite)){var o=Math.log(t),u=Math.floor(i[0]/o),a=Math.ceil(i[1]/o),f=r(i[0]),l=r(i[1]),c=t%1?2:t;if(n===Fo){s.push(-Math.pow(t,-u));for(;u++<a;)for(var h=c-1;h>0;h--)s.push(-Math.pow(t,-u)*h)}else{for(;u<a;u++)for(var h=1;h<c;h++)s.push(Math.pow(t,u)*h);s.push(Math.pow(t,u))}for(u=0;s[u]<f;u++){}for(a=s.length;s[a-1]>l;a--){}s=s.slice(u,a)}return s};i.tickFormat=function(e,s){if(arguments.length<2)s=Ho;if(!arguments.length)return s;var o=Math.log(t),u=Math.max(.1,e/i.ticks().length),a=n===Fo?(f=-1e-12,Math.floor):(f=1e-12,Math.ceil),f;return function(e){return e/r(o*a(n(e)/o+f))<=u?s(e):""}};i.copy=function(){return Po(e.copy(),t,n,r)};return Ao(i,e)}function Bo(e){return Math.log(e<0?0:e)}function jo(e){return Math.exp(e)}function Fo(e){return-Math.log(e>0?0:-e)}function Io(e){return-Math.exp(-e)}function qo(e){e=Math.log(e);var t={floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}};return function(){return t}}function Ro(e,t){function i(t){return e(n(t))}var n=Uo(t),r=Uo(1/t);i.invert=function(t){return r(e.invert(t))};i.domain=function(t){if(!arguments.length)return e.domain().map(r);e.domain(t.map(n));return i};i.ticks=function(e){return _o(i.domain(),e)};i.tickFormat=function(e,t){return Do(i.domain(),e,t)};i.nice=function(){return i.domain(Co(i.domain(),Oo))};i.exponent=function(e){if(!arguments.length)return t;var s=i.domain();n=Uo(t=e);r=Uo(1/t);return i.domain(s)};i.copy=function(){return Ro(e.copy(),t)};return Ao(i,e)}function Uo(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function zo(t,n){function o(e){return i[((r.get(e)||r.set(e,t.push(e)))-1)%i.length]}function u(n,r){return e.range(t.length).map(function(e){return n+r*e})}var r,i,s;o.domain=function(e){if(!arguments.length)return t;t=[];r=new c;var i=-1,s=e.length,u;while(++i<s)if(!r.has(u=e[i]))r.set(u,t.push(u));return o[n.t].apply(o,n.a)};o.range=function(e){if(!arguments.length)return i;i=e;s=0;n={t:"range",a:arguments};return o};o.rangePoints=function(e,r){if(arguments.length<2)r=0;var a=e[0],f=e[1],l=(f-a)/(Math.max(1,t.length-1)+r);i=u(t.length<2?(a+f)/2:a+l*r/2,l);s=0;n={t:"rangePoints",a:arguments};return o};o.rangeBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=(c-l)/(t.length-r+2*a);i=u(l+h*a,h);if(f)i.reverse();s=h*(1-r);n={t:"rangeBands",a:arguments};return o};o.rangeRoundBands=function(e,r,a){if(arguments.length<2)r=0;if(arguments.length<3)a=r;var f=e[1]<e[0],l=e[f-0],c=e[1-f],h=Math.floor((c-l)/(t.length-r+2*a)),p=c-l-(t.length-r)*h;i=u(l+Math.round(p/2),h);if(f)i.reverse();s=Math.round(h*(1-r));n={t:"rangeRoundBands",a:arguments};return o};o.rangeBand=function(){if(s<=50)return s;else return 50};o.rangeExtent=function(){return xo(n.a[0])};o.copy=function(){return zo(t,n)};return o.domain(t)}function Ko(t,n){function i(){var i=0,o=n.length;r=[];while(++i<o)r[i-1]=e.quantile(t,i/o);return s}function s(t){if(isNaN(t=+t))return NaN;return n[e.bisect(r,t)]}var r;s.domain=function(n){if(!arguments.length)return t;t=n.filter(function(e){return!isNaN(e)}).sort(e.ascending);return i()};s.range=function(e){if(!arguments.length)return n;n=e;return i()};s.quantiles=function(){return r};s.copy=function(){return Ko(t,n)};return i()}function Qo(e,t,n){function s(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function o(){r=n.length/(t-e);i=n.length-1;return s}var r,i;s.domain=function(n){if(!arguments.length)return[e,t];e=+n[0];t=+n[n.length-1];return o()};s.range=function(e){if(!arguments.length)return n;n=e;return o()};s.copy=function(){return Qo(e,t,n)};return o()}function Go(t,n){function r(r){return n[e.bisect(t,r)]}r.domain=function(e){if(!arguments.length)return t;t=e;return r};r.range=function(e){if(!arguments.length)return n;n=e;return r};r.copy=function(){return Go(t,n)};return r}function Yo(e){function t(e){return+e}t.invert=t;t.domain=t.range=function(n){if(!arguments.length)return e;e=n.map(t);return t};t.ticks=function(t){return _o(e,t)};t.tickFormat=function(t,n){return Do(e,t,n)};t.copy=function(){return Yo(e)};return t}function tu(e){return e.innerRadius}function nu(e){return e.outerRadius}function ru(e){return e.startAngle}function iu(e){return e.endAngle}function su(e){var t,n=-1,r=e.length,i,s;while(++n<r){t=e[n];i=t[0];s=t[1]+Zo;t[0]=i*Math.cos(s);t[1]=i*Math.sin(s)}return e}function ou(e){function c(u){function x(){c.push("M",o(e(p),l),f,a(e(h.reverse()),l),"Z")}var c=[],h=[],p=[],d=-1,v=u.length,m,g=Qt(t),y=Qt(r),b=t===n?function(){return E}:Qt(n),w=r===i?function(){return S}:Qt(i),E,S;while(++d<v){if(s.call(this,m=u[d],d)){h.push([E=+g.call(this,m,d),S=+y.call(this,m,d)]);p.push([+b.call(this,m,d),+w.call(this,m,d)])}else if(h.length){x();h=[];p=[]}}if(h.length)x();return c.length?c.join(""):null}var t=si,n=si,r=0,i=oi,s=$n,o=ai,u=o.key,a=o,f="L",l=.7;c.x=function(e){if(!arguments.length)return n;t=n=e;return c};c.x0=function(e){if(!arguments.length)return t;t=e;return c};c.x1=function(e){if(!arguments.length)return n;n=e;return c};c.y=function(e){if(!arguments.length)return i;r=i=e;return c};c.y0=function(e){if(!arguments.length)return r;r=e;return c};c.y1=function(e){if(!arguments.length)return i;i=e;return c};c.defined=function(e){if(!arguments.length)return s;s=e;return c};c.interpolate=function(e){if(!arguments.length)return u;if(typeof e==="function")u=o=e;else u=(o=ui.get(e)||ai).key;a=o.reverse||o;f=o.closed?"M":"L";return c};c.tension=function(e){if(!arguments.length)return l;l=e;return c};return c}function uu(e){return e.radius}function au(e){return[e.x,e.y]}function fu(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]+Zo;return[n*Math.cos(r),n*Math.sin(r)]}}function lu(){return 64}function cu(){return"circle"}function hu(e){var t=Math.sqrt(e/dt);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+ -t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function mu(e,t){A(e,gu);e.id=t;return e}function Eu(e,t,n,r){var i=e.id;return nt(e,typeof n==="function"?function(e,s,o){e.__transition__[i].tween.set(t,r(n.call(e,e.__data__,s,o)))}:(n=r(n),function(e){e.__transition__[i].tween.set(t,n)}))}function Su(e){if(e==null)e="";return function(){this.textContent=e}}function xu(t,n,r,i){var s=t.__transition__||(t.__transition__={active:0,count:0}),o=s[r];if(!o){var u=i.time;o=s[r]={tween:new c,event:e.dispatch("start","end"),time:u,ease:i.ease,delay:i.delay,duration:i.duration};++s.count;e.timer(function(i){function d(i){if(s.active>r)return m();s.active=r;l.start.call(t,a,n);o.tween.forEach(function(e,r){if(r=r.call(t,a,n)){p.push(r)}});if(!v(i))e.timer(v,0,u);return 1}function v(e){if(s.active!==r)return m();var i=(e-c)/h,o=f(i),u=p.length;while(u>0){p[--u].call(t,o)}if(i>=1){m();l.end.call(t,a,n);return 1}}function m(){if(--s.count)delete s[r];else delete t.__transition__;return 1}var a=t.__data__,f=o.ease,l=o.event,c=o.delay,h=o.duration,p=[];return c<=i?d(i):e.timer(d,c,u),1},0,u);return o}}function Cu(e,t){e.attr("transform",function(e){return"translate("+t(e)+",0)"})}function ku(e,t){e.attr("transform",function(e){return"translate(0,"+t(e)+")"})}function Lu(e,t,n){i=[];if(n&&t.length>1){var r=xo(e.domain()),i,s=-1,o=t.length,u=(t[1]-t[0])/++n,a,f;while(++s<o){for(a=n;--a>0;){if((f=+t[s]-a*u)>=r[0]){i.push(f)}}}for(--s,a=0;++a<n&&(f=+t[s]+a*u)<r[1];){i.push(f)}}return i}function Du(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Uu(e,t,n){function r(t){var n=e(t),r=s(n,1);return t-n<r-t?n:r}function i(n){t(n=e(new Mu(n-1)),1);return n}function s(e,n){t(e=new Mu(+e),n);return e}function o(e,r,s){var o=i(e),u=[];if(s>1){while(o<r){if(!(n(o)%s))u.push(new Date(+o));t(o,1)}}else{while(o<r)u.push(new Date(+o)),t(o,1)}return u}function u(e,t,n){try{Mu=Du;var r=new Du;r._=e;return o(r,t,n)}finally{Mu=Date}}e.floor=e;e.round=r;e.ceil=i;e.offset=s;e.range=o;var a=e.utc=zu(e);a.floor=a;a.round=zu(r);a.ceil=zu(i);a.offset=zu(s);a.range=u;return e}function zu(e){return function(t,n){try{Mu=Du;var r=new Du;r._=t;return e(r,n)._}finally{Mu=Date}}}function Wu(e,t,n,r){var i,s,o=0,u=t.length,a=n.length;while(o<u){if(r>=a)return-1;i=t.charCodeAt(o++);if(i===37){s=na[t.charAt(o++)];if(!s||(r=s(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++)){return-1}}return r}function Xu(t){return new RegExp("^(?:"+t.map(e.requote).join("|")+")","i")}function Vu(e){var t=new c,n=-1,r=e.length;while(++n<r)t.set(e[n].toLowerCase(),n);return t}function $u(e,t,n){e+="";var r=e.length;return r<n?(new Array(n-r+1)).join(t)+e:e}function ra(e,t,n){Ku.lastIndex=0;var r=Ku.exec(t.substring(n));return r?n+=r[0].length:-1}function ia(e,t,n){Ju.lastIndex=0;var r=Ju.exec(t.substring(n));return r?n+=r[0].length:-1}function sa(e,t,n){Yu.lastIndex=0;var r=Yu.exec(t.substring(n));return r?(e.m=Zu.get(r[0].toLowerCase()),n+=r[0].length):-1}function oa(e,t,n){Qu.lastIndex=0;var r=Qu.exec(t.substring(n));return r?(e.m=Gu.get(r[0].toLowerCase()),n+=r[0].length):-1}function ua(e,t,n){return Wu(e,ta.c.toString(),t,n)}function aa(e,t,n){return Wu(e,ta.x.toString(),t,n)}function fa(e,t,n){return Wu(e,ta.X.toString(),t,n)}function la(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+4));return r?(e.y=+r[0],n+=r[0].length):-1}function ca(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.y=ha(+r[0]),n+=r[0].length):-1}function ha(e){return e+(e>68?1900:2e3)}function pa(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.m=r[0]-1,n+=r[0].length):-1}function da(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.d=+r[0],n+=r[0].length):-1}function va(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.H=+r[0],n+=r[0].length):-1}function ma(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.M=+r[0],n+=r[0].length):-1}function ga(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+2));return r?(e.S=+r[0],n+=r[0].length):-1}function ya(e,t,n){ba.lastIndex=0;var r=ba.exec(t.substring(n,n+3));return r?(e.L=+r[0],n+=r[0].length):-1}function wa(e,t,n){var r=Ea.get(t.substring(n,n+=2).toLowerCase());return r==null?-1:(e.p=r,n)}function Sa(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=~~(Math.abs(t)/60),i=Math.abs(t)%60;return n+$u(r,"0",2)+$u(i,"0",2)}function Ta(e){return e.toISOString()}function Na(t,n,r){function i(e){return t(e)}i.invert=function(e){return ka(t.invert(e))};i.domain=function(e){if(!arguments.length)return t.domain().map(ka);t.domain(e);return i};i.nice=function(e){return i.domain(Co(i.domain(),function(){return e}))};i.ticks=function(r,s){var o=Ca(i.domain());if(typeof r!=="function"){var u=o[1]-o[0],a=u/r,f=e.bisect(Ma,a);if(f==Ma.length)return n.year(o,r);if(!f)return t.ticks(r).map(ka);if(Math.log(a/Ma[f-1])<Math.log(Ma[f]/a))--f;r=n[f];s=r[1];r=r[0].range}return r(o[0],new Date(+o[1]+1),s)};i.tickFormat=function(){return r};i.copy=function(){return Na(t.copy(),n,r)};return e.rebind(i,t,"range","rangeRound","interpolate","clamp")}function Ca(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function ka(e){return new Date(e)}function La(e){return function(t){var n=e.length-1,r=e[n];while(!r[1](t))r=e[--n];return r[0](t)}}function Aa(e){var t=new Date(e,0,1);t.setFullYear(e);return t}function Oa(e){var t=e.getFullYear(),n=Aa(t),r=Aa(t+1);return t+(e-n)/(r-n)}function Ia(e){var t=new Date(Date.UTC(e,0,1));t.setUTCFullYear(e);return t}function qa(e){var t=e.getUTCFullYear(),n=Ia(t),r=Ia(t+1);return t+(e-n)/(r-n)}function Ra(e){return e.responseText}function Ua(e){return JSON.parse(e.responseText)}function za(e){var n=t.createRange();n.selectNode(t.body);return n.createContextualFragment(e.responseText)}function Wa(e){return e.responseXML}var e={version:"3.1.5"};if(!Date.now)Date.now=function(){return+(new Date)};var t=document,n=window;try{t.createElement("div").style.setProperty("opacity",0,"")}catch(r){var i=n.CSSStyleDeclaration.prototype,s=i.setProperty;i.setProperty=function(e,t,n){s.call(this,e,t+"",n)}}e.ascending=function(e,t){return e<t?-1:e>t?1:e>=t?0:NaN};e.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN};e.min=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&i>s)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&i>s)i=s}return i};e.max=function(e,t){var n=-1,r=e.length,i,s;if(arguments.length===1){while(++n<r&&((i=e[n])==null||i!=i))i=undefined;while(++n<r)if((s=e[n])!=null&&s>i)i=s}else{while(++n<r&&((i=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null&&s>i)i=s}return i};e.extent=function(e,t){var n=-1,r=e.length,i,s,o;if(arguments.length===1){while(++n<r&&((i=o=e[n])==null||i!=i))i=o=undefined;while(++n<r)if((s=e[n])!=null){if(i>s)i=s;if(o<s)o=s}}else{while(++n<r&&((i=o=t.call(e,e[n],n))==null||i!=i))i=undefined;while(++n<r)if((s=t.call(e,e[n],n))!=null){if(i>s)i=s;if(o<s)o=s}}return[i,o]};e.sum=function(e,t){var n=0,r=e.length,i,s=-1;if(arguments.length===1){while(++s<r)if(!isNaN(i=+e[s]))n+=i}else{while(++s<r)if(!isNaN(i=+t.call(e,e[s],s)))n+=i}return n};e.mean=function(e,t){var n=e.length,r,i=0,s=-1,u=0;if(arguments.length===1){while(++s<n)if(o(r=e[s]))i+=(r-i)/++u}else{while(++s<n)if(o(r=t.call(e,e[s],s)))i+=(r-i)/++u}return u?i:undefined};e.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],s=n-r;return s?i+s*(e[r]-i):i};e.median=function(t,n){if(arguments.length>1)t=t.map(n);t=t.filter(o);return t.length?e.quantile(t.sort(e.ascending),.5):undefined};e.bisector=function(e){return{left:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(e.call(t,t[s],s)<n)r=s+1;else i=s}return r},right:function(t,n,r,i){if(arguments.length<3)r=0;if(arguments.length<4)i=t.length;while(r<i){var s=r+i>>>1;if(n<e.call(t,t[s],s))i=s;else r=s+1}return r}}};var u=e.bisector(function(e){return e});e.bisectLeft=u.left;e.bisect=e.bisectRight=u.right;e.shuffle=function(e){var t=e.length,n,r;while(t){r=Math.random()*t--|0;n=e[t],e[t]=e[r],e[r]=n}return e};e.permute=function(e,t){var n=[],r=-1,i=t.length;while(++r<i)n[r]=e[t[r]];return n};e.zip=function(){if(!(s=arguments.length))return[];for(var t=-1,n=e.min(arguments,a),r=new Array(n);++t<n;){for(var i=-1,s,o=r[t]=new Array(s);++i<s;){o[i]=arguments[i][t]}}return r};e.transpose=function(t){return e.zip.apply(e,t)};e.keys=function(e){var t=[];for(var n in e)t.push(n);return t};e.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t};e.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t};e.merge=function(e){return Array.prototype.concat.apply([],e)};e.range=function(e,t,n){if(arguments.length<3){n=1;if(arguments.length<2){t=e;e=0}}if((t-e)/n===Infinity)throw new Error("infinite range");var r=[],i=f(Math.abs(n)),s=-1,o;e*=i,t*=i,n*=i;if(n<0)while((o=e+n*++s)>t)r.push(o/i);else while((o=e+n*++s)<t)r.push(o/i);return r};e.map=function(e){var t=new c;for(var n in e)t.set(n,e[n]);return t};l(c,{has:function(e){return h+e in this},get:function(e){return this[h+e]},set:function(e,t){return this[h+e]=t},remove:function(e){e=h+e;return e in this&&delete this[e]},keys:function(){var e=[];this.forEach(function(t){e.push(t)});return e},values:function(){var e=[];this.forEach(function(t,n){e.push(n)});return e},entries:function(){var e=[];this.forEach(function(t,n){e.push({key:t,value:n})});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1),this[t])}}}});var h="\0",p=h.charCodeAt(0);e.nest=function(){function o(e,r,u){if(u>=n.length)return s?s.call(t,r):i?r.sort(i):r;var a=-1,f=r.length,l=n[u++],h,p,d,v=new c,m;while(++a<f){if(m=v.get(h=l(p=r[a]))){m.push(p)}else{v.set(h,[p])}}if(e){p=e();d=function(t,n){p.set(t,o(e,n,u))}}else{p={};d=function(t,n){p[t]=o(e,n,u)}}v.forEach(d);return p}function u(e,t){if(t>=n.length)return e;var i=[],s=r[t++];e.forEach(function(e,n){i.push({key:e,values:u(n,t)})});return s?i.sort(function(e,t){return s(e.key,t.key)}):i}var t={},n=[],r=[],i,s;t.map=function(e,t){return o(t,e,0)};t.entries=function(t){return u(o(e.map,t,0),0)};t.key=function(e){n.push(e);return t};t.sortKeys=function(e){r[n.length-1]=e;return t};t.sortValues=function(e){i=e;return t};t.rollup=function(e){s=e;return t};return t};e.set=function(e){var t=new d;if(e)for(var n=0;n<e.length;n++)t.add(e[n]);return t};l(d,{has:function(e){return h+e in this},add:function(e){this[h+e]=true;return e},remove:function(e){e=h+e;return e in this&&delete this[e]},values:function(){var e=[];this.forEach(function(t){e.push(t)});return e},forEach:function(e){for(var t in this){if(t.charCodeAt(0)===p){e.call(this,t.substring(1))}}}});e.behavior={};e.rebind=function(e,t){var n=1,r=arguments.length,i;while(++n<r)e[i=arguments[n]]=v(e,t,t[i]);return e};e.dispatch=function(){var e=new m,t=-1,n=arguments.length;while(++t<n)e[arguments[t]]=g(e);return e};m.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0){r=e.substring(n+1);e=e.substring(0,n)}if(e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(arguments.length===2){if(t==null)for(e in this){if(this.hasOwnProperty(e))this[e].on(r,null)}return this}};e.event=null;e.mouse=function(e){return T(e,w())};var x=/WebKit/.test(n.navigator.userAgent)?-1:0;var N=k;try{N(t.documentElement.childNodes)[0].nodeType}catch(L){N=C}var A=[].__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};e.touches=function(e,t){if(arguments.length<2)t=w().touches;return t?N(t).map(function(t){var n=T(e,t);n.identifier=t.identifier;return n}):[]};e.behavior.drag=function(){function i(){this.on("mousedown.drag",s).on("touchstart.drag",s)}function s(){function h(){var t=i.parentNode;return u!=null?e.touches(t).filter(function(e){return e.identifier===u})[0]:e.mouse(t)}function p(){if(!i.parentNode)return d();var e=h(),t=e[0]-f[0],n=e[1]-f[1];l|=t|n;f=e;y();s({type:"drag",x:e[0]+a[0],y:e[1]+a[1],dx:t,dy:n})}function d(){s({type:"dragend"});if(l){y();if(e.event.target===o)E(c,"click")}c.on(u!=null?"touchmove.drag-"+u:"mousemove.drag",null).on(u!=null?"touchend.drag-"+u:"mouseup.drag",null)}var i=this,s=t.of(i,arguments),o=e.event.target,u=e.event.touches?e.event.changedTouches[0].identifier:null,a,f=h(),l=0;var c=e.select(n).on(u!=null?"touchmove.drag-"+u:"mousemove.drag",p).on(u!=null?"touchend.drag-"+u:"mouseup.drag",d,true);if(r){a=r.apply(i,arguments);a=[a.x-f[0],a.y-f[1]]}else{a=[0,0]}if(u==null)y();s({type:"dragstart"})}var t=S(i,"drag","dragstart","dragend"),r=null;i.origin=function(e){if(!arguments.length)return r;r=e;return i};return e.rebind(i,t,"on")};var M=function(e,t){return t.querySelector(e)},_=function(e,t){return t.querySelectorAll(e)},D=t.documentElement,P=D.matchesSelector||D.webkitMatchesSelector||D.mozMatchesSelector||D.msMatchesSelector||D.oMatchesSelector,H=function(e,t){return P.call(e,t)};if(typeof Sizzle==="function"){M=function(e,t){return Sizzle(e,t)[0]||null};_=function(e,t){return Sizzle.uniqueSort(Sizzle(e,t))};H=Sizzle.matchesSelector}var B=[];e.selection=function(){return st};e.selection.prototype=B;B.select=function(e){var t=[],n,r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){t.push(n=[]);n.parentNode=(i=this[o]).parentNode;for(var a=-1,f=i.length;++a<f;){if(s=i[a]){n.push(r=e.call(s,s.__data__,a));if(r&&"__data__"in s)r.__data__=s.__data__}else{n.push(null)}}}return O(t)};B.selectAll=function(e){var t=[],n,r;if(typeof e!=="function")e=F(e);for(var i=-1,s=this.length;++i<s;){for(var o=this[i],u=-1,a=o.length;++u<a;){if(r=o[u]){t.push(n=N(e.call(r,r.__data__,u)));n.parentNode=r}}}return O(t)};var I={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};e.ns={prefix:I,qualify:function(e){var t=e.indexOf(":"),n=e;if(t>=0){n=e.substring(0,t);e=e.substring(t+1)}return I.hasOwnProperty(n)?{space:I[n],local:e}:e}};B.attr=function(t,n){if(arguments.length<2){if(typeof t==="string"){var r=this.node();t=e.ns.qualify(t);return t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(n in t)this.each(q(n,t[n]));return this}return this.each(q(t,n))};e.requote=function(e){return e.replace(U,"\\$&")};var U=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;B.classed=function(e,t){if(arguments.length<2){if(typeof e==="string"){var n=this.node(),r=(e=e.trim().split(/^|\s+/g)).length,i=-1;if(t=n.classList){while(++i<r)if(!t.contains(e[i]))return false}else{t=n.getAttribute("class");while(++i<r)if(!z(e[i]).test(t))return false}return true}for(t in e)this.each(W(t,e[t]));return this}return this.each(W(e,t))};B.style=function(e,t,r){var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.each(V(r,e[r],t));return this}if(i<2)return n.getComputedStyle(this.node(),null).getPropertyValue(e);r=""}return this.each(V(e,t,r))};B.property=function(e,t){if(arguments.length<2){if(typeof e==="string")return this.node()[e];for(t in e)this.each($(t,e[t]));return this}return this.each($(e,t))};B.text=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}:e==null?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent};B.html=function(e){return arguments.length?this.each(typeof e==="function"?function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}:e==null?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML};B.append=function(n){function r(){return this.appendChild(t.createElementNS(this.namespaceURI,n))}function i(){return this.appendChild(t.createElementNS(n.space,n.local))}n=e.ns.qualify(n);return this.select(n.local?i:r)};B.insert=function(n,r){function i(e,i){return this.insertBefore(t.createElementNS(this.namespaceURI,n),r.call(this,e,i))}function s(e,i){return this.insertBefore(t.createElementNS(n.space,n.local),r.call(this,e,i))}n=e.ns.qualify(n);if(typeof r!=="function")r=j(r);return this.select(n.local?s:i)};B.remove=function(){return this.each(function(){var e=this.parentNode;if(e)e.removeChild(this)})};B.data=function(e,t){function o(e,n){var r,i=e.length,s=n.length,o=Math.min(i,s),l=new Array(s),h=new Array(s),p=new Array(i),d,v;if(t){var m=new c,g=new c,y=[],b;for(r=-1;++r<i;){b=t.call(d=e[r],d.__data__,r);if(m.has(b)){p[r]=d}else{m.set(b,d)}y.push(b)}for(r=-1;++r<s;){b=t.call(n,v=n[r],r);if(d=m.get(b)){l[r]=d;d.__data__=v}else if(!g.has(b)){h[r]=J(v)}g.set(b,v);m.remove(b)}for(r=-1;++r<i;){if(m.has(y[r])){p[r]=e[r]}}}else{for(r=-1;++r<o;){d=e[r];v=n[r];if(d){d.__data__=v;l[r]=d}else{h[r]=J(v)}}for(;r<s;++r){h[r]=J(n[r])}for(;r<i;++r){p[r]=e[r]}}h.update=l;h.parentNode=l.parentNode=p.parentNode=e.parentNode;u.push(h);a.push(l);f.push(p)}var n=-1,r=this.length,i,s;if(!arguments.length){e=new Array(r=(i=this[0]).length);while(++n<r){if(s=i[n]){e[n]=s.__data__}}return e}var u=rt([]),a=O([]),f=O([]);if(typeof e==="function"){while(++n<r){o(i=this[n],e.call(i,i.parentNode.__data__,n))}}else{while(++n<r){o(i=this[n],e)}}a.enter=function(){return u};a.exit=function(){return f};return a};B.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")};B.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);n.parentNode=(r=this[s]).parentNode;for(var u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return O(t)};B.order=function(){for(var e=-1,t=this.length;++e<t;){for(var n=this[e],r=n.length-1,i=n[r],s;--r>=0;){if(s=n[r]){if(i&&i!==s.nextSibling)i.parentNode.insertBefore(s,i);i=s}}}return this};B.sort=function(e){e=Q.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()};B.on=function(e,t,n){var r=arguments.length;if(r<3){if(typeof e!=="string"){if(r<2)t=false;for(n in e)this.each(Y(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=false}return this.each(Y(e,t,n))};var Z=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});Z.forEach(function(e){if("on"+e in t)Z.remove(e)});B.each=function(e){return nt(this,function(t,n,r){e.call(t,t.__data__,n,r)})};B.call=function(e){var t=N(arguments);e.apply(t[0]=this,t);return this};B.empty=function(){return!this.node()};B.node=function(){for(var e=0,t=this.length;e<t;e++){for(var n=this[e],r=0,i=n.length;r<i;r++){var s=n[r];if(s)return s}}return null};var it=[];e.selection.enter=rt;e.selection.enter.prototype=it;it.append=B.append;it.insert=B.insert;it.empty=B.empty;it.node=B.node;it.select=function(e){var t=[],n,r,i,s,o;for(var u=-1,a=this.length;++u<a;){i=(s=this[u]).update;t.push(n=[]);n.parentNode=s.parentNode;for(var f=-1,l=s.length;++f<l;){if(o=s[f]){n.push(i[f]=r=e.call(s.parentNode,o.__data__,f));r.__data__=o.__data__}else{n.push(null)}}}return O(t)};B.transition=function(){var e=bu||++yu,t=[],n,r,i=Object.create(wu);i.time=Date.now();for(var s=-1,o=this.length;++s<o;){t.push(n=[]);for(var u=this[s],a=-1,f=u.length;++a<f;){if(r=u[a])xu(r,a,e,i);n.push(r)}}return mu(t,e)};var st=O([[t]]);st[0].parentNode=D;e.select=function(e){return typeof e==="string"?st.select(e):O([[e]])};e.selectAll=function(e){return typeof e==="string"?st.selectAll(e):O([N(e)])};e.behavior.zoom=function(){function p(){this.on("mousedown.zoom",x).on("mousemove.zoom",N).on(at+".zoom",T).on("dblclick.zoom",C).on("touchstart.zoom",k).on("touchmove.zoom",L).on("touchend.zoom",k)}function d(e){return[(e[0]-t[0])/i,(e[1]-t[1])/i]}function v(e){return[e[0]*i+t[0],e[1]*i+t[1]]}function m(e){i=Math.max(o[0],Math.min(o[1],e))}function g(e,n){n=v(n);t[0]+=e[0]-n[0];t[1]+=e[1]-n[1]}function b(){if(f)f.domain(a.range().map(function(e){return(e-t[0])/i}).map(a.invert));if(c)c.domain(l.range().map(function(e){return(e-t[1])/i}).map(l.invert))}function w(n){b();e.event.preventDefault();n({type:"zoom",scale:i,translate:t})}function x(){function f(){s=1;g(e.mouse(t),a);w(r)}function l(){if(s)y();o.on("mousemove.zoom",null).on("mouseup.zoom",null);if(s&&e.event.target===i)E(o,"click.zoom")}var t=this,r=u.of(t,arguments),i=e.event.target,s=0,o=e.select(n).on("mousemove.zoom",f).on("mouseup.zoom",l),a=d(e.mouse(t));n.focus();y()}function T(){if(!r)r=d(e.mouse(this));m(Math.pow(2,ut()*.002)*i);g(e.mouse(this),r);w(u.of(this,arguments))}function N(){r=null}function C(){var t=e.mouse(this),n=d(t),r=Math.log(i)/Math.LN2;m(Math.pow(2,e.event.shiftKey?Math.ceil(r)-1:Math.floor(r)+1));g(t,n);w(u.of(this,arguments))}function k(){var t=e.touches(this),n=Date.now();s=i;r={};t.forEach(function(e){r[e.identifier]=d(e)});y();if(t.length===1){if(n-h<500){var o=t[0],a=d(t[0]);m(i*2);g(o,a);w(u.of(this,arguments))}h=n}}function L(){var t=e.touches(this),n=t[0],i=r[n.identifier];if(o=t[1]){var o,a=r[o.identifier];n=[(n[0]+o[0])/2,(n[1]+o[1])/2];i=[(i[0]+a[0])/2,(i[1]+a[1])/2];m(e.event.scale*s)}g(n,i);h=null;w(u.of(this,arguments))}var t=[0,0],r,i=1,s,o=ot,u=S(p,"zoom"),a,f,l,c,h;p.translate=function(e){if(!arguments.length)return t;t=e.map(Number);b();return p};p.scale=function(e){if(!arguments.length)return i;i=+e;b();return p};p.scaleExtent=function(e){if(!arguments.length)return o;o=e==null?ot:e.map(Number);return p};p.x=function(e){if(!arguments.length)return f;f=e;a=e.copy();t=[0,0];i=1;return p};p.y=function(e){if(!arguments.length)return c;c=e;l=e.copy();t=[0,0];i=1;return p};return e.rebind(p,u,"on")};var ot=[0,Infinity];var ut,at="onwheel"in t?(ut=function(){return-e.event.deltaY*(e.event.deltaMode?120:1)},"wheel"):"onmousewheel"in t?(ut=function(){return e.event.wheelDelta},"mousewheel"):(ut=function(){return-e.event.detail},"MozMousePixelScroll");ft.prototype.toString=function(){return this.rgb()+""};e.hsl=function(e,t,n){return arguments.length===1?e instanceof ct?lt(e.h,e.s,e.l):Wt(""+e,Xt,lt):lt(+e,+t,+n)};var ht=ct.prototype=new ft;ht.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,this.l/e)};ht.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return lt(this.h,this.s,e*this.l)};ht.rgb=function(){return pt(this.h,this.s,this.l)};var dt=Math.PI,vt=1e-6,mt=dt/180,gt=180/dt;e.hcl=function(t,n,r){return arguments.length===1?t instanceof Nt?Tt(t.h,t.c,t.l):t instanceof At?Bt(t.l,t.a,t.b):Bt((t=Vt((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):Tt(+t,+n,+r)};var Ct=Nt.prototype=new ft;Ct.brighter=function(e){return Tt(this.h,this.c,Math.min(100,this.l+Ot*(arguments.length?e:1)))};Ct.darker=function(e){return Tt(this.h,this.c,Math.max(0,this.l-Ot*(arguments.length?e:1)))};Ct.rgb=function(){return kt(this.h,this.c,this.l).rgb()};e.lab=function(t,n,r){return arguments.length===1?t instanceof At?Lt(t.l,t.a,t.b):t instanceof Nt?kt(t.l,t.c,t.h):Vt((t=e.rgb(t)).r,t.g,t.b):Lt(+t,+n,+r)};var Ot=18;var Mt=.95047,_t=1,Dt=1.08883;var Pt=At.prototype=new ft;Pt.brighter=function(e){return Lt(Math.min(100,this.l+Ot*(arguments.length?e:1)),this.a,this.b)};Pt.darker=function(e){return Lt(Math.max(0,this.l-Ot*(arguments.length?e:1)),this.a,this.b)};Pt.rgb=function(){return Ht(this.l,this.a,this.b)};e.rgb=function(e,t,n){return arguments.length===1?e instanceof Rt?qt(e.r,e.g,e.b):Wt(""+e,qt,pt):qt(~~e,~~t,~~n)};var Ut=Rt.prototype=new ft;Ut.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;if(!t&&!n&&!r)return qt(i,i,i);if(t&&t<i)t=i;if(n&&n<i)n=i;if(r&&r<i)r=i;return qt(Math.min(255,Math.floor(t/e)),Math.min(255,Math.floor(n/e)),Math.min(255,Math.floor(r/e)))};Ut.darker=function(e){e=Math.pow(.7,arguments.length?e:1);return qt(Math.floor(e*this.r),Math.floor(e*this.g),Math.floor(e*this.b))};Ut.hsl=function(){return Xt(this.r,this.g,this.b)};Ut.toString=function(){return"#"+zt(this.r)+zt(this.g)+zt(this.b)};var Kt=e.map({aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"});Kt.forEach(function(e,t){Kt.set(e,Wt(t,qt,pt))});e.functor=Qt;e.xhr=function(t,r,i){function l(){var e=f.status;!e&&f.responseText||e>=200&&e<300||e===304?o.load.call(s,a.call(s,f)):o.error.call(s,f)}var s={},o=e.dispatch("progress","load","error"),u={},a=Gt,f=new(n.XDomainRequest&&/^(http(s)?:)?\/\//.test(t)?XDomainRequest:XMLHttpRequest);"onload"in f?f.onload=f.onerror=l:f.onreadystatechange=function(){f.readyState>3&&l()};f.onprogress=function(t){var n=e.event;e.event=t;try{o.progress.call(s,f)}finally{e.event=n}};s.header=function(e,t){e=(e+"").toLowerCase();if(arguments.length<2)return u[e];if(t==null)delete u[e];else u[e]=t+"";return s};s.mimeType=function(e){if(!arguments.length)return r;r=e==null?null:e+"";return s};s.response=function(e){a=e;return s};["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(N(arguments)))}});s.send=function(e,n,i){if(arguments.length===2&&typeof n==="function")i=n,n=null;f.open(e,t,true);if(r!=null&&!("accept"in u))u["accept"]=r+",*/*";if(f.setRequestHeader)for(var o in u)f.setRequestHeader(o,u[o]);if(r!=null&&f.overrideMimeType)f.overrideMimeType(r);if(i!=null)s.on("error",i).on("load",function(e){i(null,e)});f.send(n==null?null:n);return s};s.abort=function(){f.abort();return s};e.rebind(s,o,"on");if(arguments.length===2&&typeof r==="function")i=r,r=null;return i==null?s:s.get(Yt(i))};e.csv=Zt(",","text/csv");e.tsv=Zt(" ","text/tab-separated-values");var en=0,tn={},nn=null,rn,sn;e.timer=function(e,t,n){if(arguments.length<3){if(arguments.length<2)t=0;else if(!isFinite(t))return;n=Date.now()}var r=tn[e.id];if(r&&r.callback===e){r.then=n;r.delay=t}else tn[e.id=++en]=nn={callback:e,then:n,delay:t,next:nn};if(!rn){sn=clearTimeout(sn);rn=1;an(on)}};e.timer.flush=function(){var e,t=Date.now(),n=nn;while(n){e=t-n.then;if(!n.delay)n.flush=n.callback(e);n=n.next}un()};var an=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(e){setTimeout(e,17)};var fn=".",ln=",",cn=[3,3];var hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(pn);e.formatPrefix=function(t,n){var r=0;if(t){if(t<0)t*=-1;if(n)t=e.round(t,mn(t,n));r=1+Math.floor(1e-12+Math.log(t)/Math.LN10);r=Math.max(-24,Math.min(24,Math.floor((r<=0?r+1:r-1)/3)*3))}return hn[8+r/3]};e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};e.format=function(t){var n=dn.exec(t),r=n[1]||" ",i=n[2]||">",s=n[3]||"",o=n[4]||"",u=n[5],a=+n[6],f=n[7],l=n[8],c=n[9],h=1,p="",d=false;if(l)l=+l.substring(1);if(u||r==="0"&&i==="="){u=r="0";i="=";if(f)a-=Math.floor((a-1)/4)}switch(c){case"n":f=true;c="g";break;case"%":h=100;p="%";c="f";break;case"p":h=100;p="%";c="r";break;case"b":case"o":case"x":case"X":if(o)o="0"+c.toLowerCase();case"c":case"d":d=true;l=0;break;case"s":h=-1;c="r";break}if(o==="#")o="";if(c=="r"&&!l)c="g";if(l!=null){if(c=="g")l=Math.max(1,Math.min(21,l));else if(c=="e"||c=="f")l=Math.max(0,Math.min(20,l))}c=vn.get(c)||gn;var v=u&&f;return function(t){if(d&&t%1)return"";var n=t<0||t===0&&1/t<0?(t=-t,"-"):s;if(h<0){var m=e.formatPrefix(t,l);t=m.scale(t);p=m.symbol}else{t*=h}t=c(t,l);if(!u&&f)t=yn(t);var g=o.length+t.length+(v?0:n.length),y=g<a?(new Array(g=a-g+1)).join(r):"";if(v)t=yn(y+t);if(fn)t.replace(".",fn);n+=o;return(i==="<"?n+t+y:i===">"?y+n+t:i==="^"?y.substring(0,g>>=1)+n+t+y.substring(g):n+(v?t:y+t))+p}};var dn=/(?:([^{])?([<>=^]))?([+\- ])?(#)?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i;var vn=e.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(t,n){return(t=e.round(t,mn(t,n))).toFixed(Math.max(0,Math.min(20,mn(t*(1+1e-15),n))))}});var yn=Gt;if(cn){var bn=cn.length;yn=function(e){var t=e.lastIndexOf("."),n=t>=0?"."+e.substring(t+1):(t=e.length,""),r=[],i=0,s=cn[0];while(t>0&&s>0){r.push(e.substring(t-=s,t+s));s=cn[i=(i+1)%bn]}return r.reverse().join(ln||"")+n}}e.geo={};e.geo.stream=function(e,t){if(e&&En.hasOwnProperty(e.type)){En[e.type](e,t)}else{wn(e,t)}};var En={Feature:function(e,t){wn(e.geometry,t)},FeatureCollection:function(e,t){var n=e.features,r=-1,i=n.length;while(++r<i)wn(n[r].geometry,t)}};var Sn={Sphere:function(e,t){t.sphere()},Point:function(e,t){var n=e.coordinates;t.point(n[0],n[1])},MultiPoint:function(e,t){var n=e.coordinates,r=-1,i=n.length,s;while(++r<i)s=n[r],t.point(s[0],s[1])},LineString:function(e,t){xn(e.coordinates,t,0)},MultiLineString:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)xn(n[r],t,0)},Polygon:function(e,t){Tn(e.coordinates,t)},MultiPolygon:function(e,t){var n=e.coordinates,r=-1,i=n.length;while(++r<i)Tn(n[r],t)},GeometryCollection:function(e,t){var n=e.geometries,r=-1,i=n.length;while(++r<i)wn(n[r],t)}};e.geo.area=function(t){Nn=0;e.geo.stream(t,Ln);return Nn};var Nn,Cn,kn;var Ln={sphere:function(){Nn+=4*dt},point:G,lineStart:G,lineEnd:G,polygonStart:function(){Cn=1,kn=0;Ln.lineStart=An},polygonEnd:function(){var e=2*Math.atan2(kn,Cn);Nn+=e<0?4*dt+e:e;Ln.lineStart=Ln.lineEnd=Ln.point=G}};e.geo.bounds=On(Gt);e.geo.centroid=function(t){Mn=_n=Dn=Pn=Hn=0;e.geo.stream(t,Bn);var n;if(_n&&Math.abs(n=Math.sqrt(Dn*Dn+Pn*Pn+Hn*Hn))>vt){return[Math.atan2(Pn,Dn)*gt,Math.asin(Math.max(-1,Math.min(1,Hn/n)))*gt]}};var Mn,_n,Dn,Pn,Hn;var Bn={sphere:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}},point:jn,lineStart:In,lineEnd:qn,polygonStart:function(){if(Mn<2){Mn=2;_n=Dn=Pn=Hn=0}Bn.lineStart=Fn},polygonEnd:function(){Bn.lineStart=In}};var rr=Yn($n,ir,or);var ar=1e9;e.geo.projection=pr;e.geo.projectionMutator=dr;(e.geo.equirectangular=function(){return pr(mr)}).raw=mr.invert=mr;e.geo.rotation=function(e){function t(t){t=e(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t}e=gr(e[0]%360*mt,e[1]*mt,e.length>2?e[2]*mt:0);t.invert=function(t){t=e.invert(t[0]*mt,t[1]*mt);return t[0]*=gt,t[1]*=gt,t};return t};e.geo.circle=function(){function i(){var t=typeof e==="function"?e.apply(this,arguments):e,n=gr(-t[0]*mt,-t[1]*mt,0).invert,i=[];r(null,null,1,{point:function(e,t){i.push(e=n(e,t));e[0]*=gt,e[1]*=gt}});return{type:"Polygon",coordinates:[i]}}var e=[0,0],t,n=6,r;i.origin=function(t){if(!arguments.length)return e;e=t;return i};i.angle=function(e){if(!arguments.length)return t;r=Er((t=+e)*mt,n*mt);return i};i.precision=function(e){if(!arguments.length)return n;r=Er(t*mt,(n=+e)*mt);return i};return i.angle(90)};e.geo.distance=function(e,t){var n=(t[0]-e[0])*mt,r=e[1]*mt,i=t[1]*mt,s=Math.sin(n),o=Math.cos(n),u=Math.sin(r),a=Math.cos(r),f=Math.sin(i),l=Math.cos(i),c;return Math.atan2(Math.sqrt((c=l*s)*c+(c=a*f-u*l*o)*c),u*f+a*l*o)};e.geo.graticule=function(){function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return e.range(Math.ceil(i/c)*c,r,c).map(v).concat(e.range(Math.ceil(a/h)*h,u,h).map(m)).concat(e.range(Math.ceil(n/f)*f,t,f).filter(function(e){return Math.abs(e%c)>vt}).map(p)).concat(e.range(Math.ceil(o/l)*l,s,l).filter(function(e){return Math.abs(e%h)>vt}).map(d))}var t,n,r,i,s,o,u,a,f=10,l=f,c=90,h=360,p,d,v,m,g=2.5;y.lines=function(){return b().map(function(e){return{type:"LineString",coordinates:e}})};y.outline=function(){return{type:"Polygon",coordinates:[v(i).concat(m(u).slice(1),v(r).reverse().slice(1),m(a).reverse().slice(1))]}};y.extent=function(e){if(!arguments.length)return y.minorExtent();return y.majorExtent(e).minorExtent(e)};y.majorExtent=function(e){if(!arguments.length)return[[i,a],[r,u]];i=+e[0][0],r=+e[1][0];a=+e[0][1],u=+e[1][1];if(i>r)e=i,i=r,r=e;if(a>u)e=a,a=u,u=e;return y.precision(g)};y.minorExtent=function(e){if(!arguments.length)return[[n,o],[t,s]];n=+e[0][0],t=+e[1][0];o=+e[0][1],s=+e[1][1];if(n>t)e=n,n=t,t=e;if(o>s)e=o,o=s,s=e;return y.precision(g)};y.step=function(e){if(!arguments.length)return y.minorStep();return y.majorStep(e).minorStep(e)};y.majorStep=function(e){if(!arguments.length)return[c,h];c=+e[0],h=+e[1];return y};y.minorStep=function(e){if(!arguments.length)return[f,l];f=+e[0],l=+e[1];return y};y.precision=function(e){if(!arguments.length)return g;g=+e;p=xr(o,s,90);d=Tr(n,t,g);v=xr(a,u,90);m=Tr(i,r,g);return y};return y.majorExtent([[-180,-90+vt],[180,90-vt]]).minorExtent([[-180,-80-vt],[180,80+vt]])};e.geo.greatArc=function(){function s(){return{type:"LineString",coordinates:[n||t.apply(this,arguments),i||r.apply(this,arguments)]}}var t=Nr,n,r=Cr,i;s.distance=function(){return e.geo.distance(n||t.apply(this,arguments),i||r.apply(this,arguments))};s.source=function(e){if(!arguments.length)return t;t=e,n=typeof e==="function"?null:e;return s};s.target=function(e){if(!arguments.length)return r;r=e,i=typeof e==="function"?null:e;return s};s.precision=function(){return arguments.length?s:0};return s};e.geo.interpolate=function(e,t){return kr(e[0]*mt,e[1]*mt,t[0]*mt,t[1]*mt)};e.geo.length=function(t){Lr=0;e.geo.stream(t,Ar);return Lr};var Lr;var Ar={sphere:G,point:G,lineStart:Or,lineEnd:G,polygonStart:G,polygonEnd:G};(e.geo.conicEqualArea=function(){return Mr(_r)}).raw=_r;e.geo.albersUsa=function(){function a(e){return f(e)(e)}function f(e){var s=e[0],o=e[1];return o>50?n:s<-140?r:o<21?i:t}var t=e.geo.conicEqualArea().rotate([98,0]).center([0,38]).parallels([29.5,45.5]);var n=e.geo.conicEqualArea().rotate([160,0]).center([0,60]).parallels([55,65]);var r=e.geo.conicEqualArea().rotate([160,0]).center([0,20]).parallels([8,18]);var i=e.geo.conicEqualArea().rotate([60,0]).center([0,10]).parallels([8,18]);var s,o,u;a.invert=function(e){return s(e)||o(e)||u(e)||t.invert(e)};a.scale=function(e){if(!arguments.length)return t.scale();t.scale(e);n.scale(e*.6);r.scale(e);i.scale(e*1.5);return a.translate(t.translate())};a.translate=function(e){if(!arguments.length)return t.translate();var f=t.scale(),l=e[0],c=e[1];t.translate(e);n.translate([l-.4*f,c+.17*f]);r.translate([l-.19*f,c+.2*f]);i.translate([l+.58*f,c+.43*f]);s=Dr(n,[[-180,50],[-130,72]]);o=Dr(r,[[-164,18],[-154,24]]);u=Dr(i,[[-67.5,17.5],[-65,19]]);return a};return a.scale(1e3)};var Pr,Hr,Br={point:G,lineStart:G,lineEnd:G,polygonStart:function(){Hr=0;Br.lineStart=jr},polygonEnd:function(){Br.lineStart=Br.lineEnd=Br.point=G;Pr+=Math.abs(Hr/2)}};var Ir={point:qr,lineStart:Rr,lineEnd:Ur,polygonStart:function(){Ir.lineStart=zr},polygonEnd:function(){Ir.point=qr;Ir.lineStart=Rr;Ir.lineEnd=Ur}};e.geo.path=function(){function o(n){if(n)e.geo.stream(n,i(s.pointRadius(typeof t==="function"?+t.apply(this,arguments):t)));return s.result()}var t=4.5,n,r,i,s;o.area=function(t){Pr=0;e.geo.stream(t,i(Br));return Pr};o.centroid=function(t){Mn=Dn=Pn=Hn=0;e.geo.stream(t,i(Ir));return Hn?[Dn/Hn,Pn/Hn]:undefined};o.bounds=function(e){return On(i)(e)};o.projection=function(e){if(!arguments.length)return n;i=(n=e)?e.stream||Vr(e):Gt;return o};o.context=function(e){if(!arguments.length)return r;s=(r=e)==null?new Fr:new Wr(e);return o};o.pointRadius=function(e){if(!arguments.length)return t;t=typeof e==="function"?e:+e;return o};return o.projection(e.geo.albersUsa()).context(null)};e.geo.albers=function(){return e.geo.conicEqualArea().parallels([29.5,45.5]).rotate([98,0]).center([0,38]).scale(1e3)};var Jr=$r(function(e){return Math.sqrt(2/(1+e))},function(e){return 2*Math.asin(e/2)});(e.geo.azimuthalEqualArea=function(){return pr(Jr)}).raw=Jr;var Kr=$r(function(e){var t=Math.acos(e);return t&&t/Math.sin(t)},Gt);(e.geo.azimuthalEquidistant=function(){return pr(Kr)}).raw=Kr;(e.geo.conicConformal=function(){return Mr(Qr)}).raw=Qr;(e.geo.conicEquidistant=function(){return Mr(Gr)}).raw=Gr;var Yr=$r(function(e){return 1/e},Math.atan);(e.geo.gnomonic=function(){return pr(Yr)}).raw=Yr;Zr.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-dt/2]};(e.geo.mercator=function(){return ei(Zr)}).raw=Zr;var ti=$r(function(){return 1},Math.asin);(e.geo.orthographic=function(){return pr(ti)}).raw=ti;var ni=$r(function(e){return 1/(1+e)},function(e){return 2*Math.atan(e)});(e.geo.stereographic=function(){return pr(ni)}).raw=ni;ri.invert=function(e,t){return[Math.atan2(Et(e),Math.cos(t)),wt(Math.sin(t)/St(e))]};(e.geo.transverseMercator=function(){return ei(ri)}).raw=ri;e.geom={};e.svg={};e.svg.line=function(){return ii(Gt)};var ui=e.map({linear:ai,"linear-closed":fi,"step-before":li,"step-after":ci,basis:gi,"basis-open":yi,"basis-closed":bi,bundle:wi,cardinal:di,"cardinal-open":hi,"cardinal-closed":pi,monotone:Ai});ui.forEach(function(e,t){t.key=e;t.closed=/-closed$/.test(e)});var Si=[0,2/3,1/3,0],xi=[0,1/3,2/3,0],Ti=[0,1/6,2/3,1/6];e.geom.hull=function(e){function r(e){if(e.length<3)return[];var r=Qt(t),i=Qt(n),s=e.length,o,u=s-1,a=[],f=[],l,c,h,p=0,d,v,m,g,y,b,w,E;if(r===si&&n===oi)o=e;else for(c=0,o=[];c<s;++c){o.push([+r.call(this,l=e[c],c),+i.call(this,l,c)])}for(c=1;c<s;++c){if(o[c][1]<o[p][1]){p=c}else if(o[c][1]==o[p][1]){p=o[c][0]<o[p][0]?c:p}}for(c=0;c<s;++c){if(c===p)continue;v=o[c][1]-o[p][1];d=o[c][0]-o[p][0];a.push({angle:Math.atan2(v,d),index:c})}a.sort(function(e,t){return e.angle-t.angle});w=a[0].angle;b=a[0].index;y=0;for(c=1;c<u;++c){h=a[c].index;if(w==a[c].angle){d=o[b][0]-o[p][0];v=o[b][1]-o[p][1];m=o[h][0]-o[p][0];g=o[h][1]-o[p][1];if(d*d+v*v>=m*m+g*g){a[c].index=-1}else{a[y].index=-1;w=a[c].angle;y=c;b=h}}else{w=a[c].angle;y=c;b=h}}f.push(p);for(c=0,h=0;c<2;++h){if(a[h].index!==-1){f.push(a[h].index);c++}}E=f.length;for(;h<u;++h){if(a[h].index===-1)continue;while(!Oi(f[E-2],f[E-1],a[h].index,o)){--E}f[E++]=a[h].index}var S=[];for(c=0;c<E;++c){S.push(e[f[c]])}return S}var t=si,n=oi;if(arguments.length)return r(e);r.x=function(e){return arguments.length?(t=e,r):t};r.y=function(e){return arguments.length?(n=e,r):n};return r};e.geom.polygon=function(e){e.area=function(){var t=0,n=e.length,r=e[n-1][1]*e[0][0]-e[n-1][0]*e[0][1];while(++t<n){r+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1]}return r*.5};e.centroid=function(t){var n=-1,r=e.length,i=0,s=0,o,u=e[r-1],a;if(!arguments.length)t=-1/(6*e.area());while(++n<r){o=u;u=e[n];a=o[0]*u[1]-u[0]*o[1];i+=(o[0]+u[0])*a;s+=(o[1]+u[1])*a}return[i*t,s*t]};e.clip=function(t){var n,r=-1,i=e.length,s,o,u=e[i-1],a,f,l;while(++r<i){n=t.slice();t.length=0;a=e[r];f=n[(o=n.length)-1];s=-1;while(++s<o){l=n[s];if(Mi(l,u,a)){if(!Mi(f,u,a)){t.push(_i(f,l,u,a))}t.push(l)}else if(Mi(f,u,a)){t.push(_i(f,l,u,a))}f=l}u=a}return t};return e};e.geom.delaunay=function(e){var t=e.map(function(){return[]}),n=[];Pi(e,function(n){t[n.region.l.index].push(e[n.region.r.index])});t.forEach(function(t,r){var i=e[r],s=i[0],o=i[1];t.forEach(function(e){e.angle=Math.atan2(e[0]-s,e[1]-o)});t.sort(function(e,t){return e.angle-t.angle});for(var u=0,a=t.length-1;u<a;u++){n.push([i,t[u],t[u+1]])}});return n};e.geom.voronoi=function(t){function o(t){var n,o=t.map(function(){return[]}),u=Qt(r),a=Qt(i),f,l,c=t.length,h=1e6;if(u===si&&a===oi)n=t;else for(n=[],l=0;l<c;++l){n.push([+u.call(this,f=t[l],l),+a.call(this,f,l)])}Pi(n,function(e){var t,n,r,i,s,u;if(e.a===1&&e.b>=0){t=e.ep.r;n=e.ep.l}else{t=e.ep.l;n=e.ep.r}if(e.a===1){s=t?t.y:-h;r=e.c-e.b*s;u=n?n.y:h;i=e.c-e.b*u}else{r=t?t.x:-h;s=e.c-e.a*r;i=n?n.x:h;u=e.c-e.a*i}var a=[r,s],f=[i,u];o[e.region.l.index].push(a,f);o[e.region.r.index].push(a,f)});o=o.map(function(t,r){var i=n[r][0],s=n[r][1],o=t.map(function(e){return Math.atan2(e[0]-i,e[1]-s)}),u=e.range(t.length).sort(function(e,t){return o[e]-o[t]});return u.filter(function(e,t){return!t||o[e]-o[u[t-1]]>vt}).map(function(e){return t[e]})});o.forEach(function(e,t){var r=e.length;if(!r)return e.push([-h,-h],[-h,h],[h,h],[h,-h]);if(r>2)return;var i=n[t],s=e[0],o=e[1],u=i[0],a=i[1],f=s[0],l=s[1],c=o[0],p=o[1],d=Math.abs(c-f),v=p-l;if(Math.abs(v)<vt){var m=a<l?-h:h;e.push([-h,m],[h,m])}else if(d<vt){var g=u<f?-h:h;e.push([g,-h],[g,h])}else{var m=(c-f)*(l-a)<(f-u)*(p-l)?h:-h,y=Math.abs(v)-d;if(Math.abs(y)<vt){e.push([v<0?m:-m,m])}else{if(y>0)m*=-1;e.push([-h,m],[h,m])}}});if(s)for(l=0;l<c;++l)s(o[l]);for(l=0;l<c;++l)o[l].point=t[l];return o}var n=null,r=si,i=oi,s;if(arguments.length)return o(t);o.x=function(e){return arguments.length?(r=e,o):r};o.y=function(e){return arguments.length?(i=e,o):i};o.size=function(t){if(!arguments.length)return n;if(t==null){s=null}else{n=[+t[0],+t[1]];s=e.geom.polygon([[0,0],[0,n[1]],n,[n[0],0]]).clip}return o};o.links=function(e){var t,n=e.map(function(){return[]}),s=[],o=Qt(r),u=Qt(i),a,f,l=e.length;if(o===si&&u===oi)t=e;else for(f=0;f<l;++f){t.push([+o.call(this,a=e[f],f),+u.call(this,a,f)])}Pi(t,function(t){var r=t.region.l.index,i=t.region.r.index;if(n[r][i])return;n[r][i]=n[i][r]=true;s.push({source:e[r],target:e[i]})});return s};o.triangles=function(t){if(r===si&&i===oi)return e.geom.delaunay(t);var n,s,o=Qt(r),u=Qt(i),a,f,l;for(f=0,n=[],l=t.length;f<l;++f){s=[+o.call(this,a=t[f],f),+u.call(this,a,f)];s.data=a;n.push(s)}return e.geom.delaunay(n).map(function(e){return e.map(function(e){return e.data})})};return o};var Di={l:"r",r:"l"};e.geom.quadtree=function(e,t,n,r,i){function a(e){function x(e,t,n,r,i,s,o,u){if(isNaN(n)||isNaN(r))return;if(e.leaf){var a=e.x,f=e.y;if(a!=null){if(Math.abs(a-n)+Math.abs(f-r)<.01){T(e,t,n,r,i,s,o,u)}else{var l=e.point;e.x=e.y=e.point=null;T(e,l,a,f,i,s,o,u);T(e,t,n,r,i,s,o,u)}}else{e.x=n,e.y=r,e.point=t}}else{T(e,t,n,r,i,s,o,u)}}function T(e,t,n,r,i,s,o,u){var a=(i+o)*.5,f=(s+u)*.5,l=n>=a,c=r>=f,h=(c<<1)+l;e.leaf=false;e=e.nodes[h]||(e.nodes[h]=ji());if(l)i=a;else o=a;if(c)s=f;else u=f;x(e,t,n,r,i,s,o,u)}var a,f=Qt(s),l=Qt(o),c,h,p,d,v,m,g,y;if(t!=null){v=t,m=n,g=r,y=i}else{g=y=-(v=m=Infinity);c=[],h=[];d=e.length;if(u)for(p=0;p<d;++p){a=e[p];if(a.x<v)v=a.x;if(a.y<m)m=a.y;if(a.x>g)g=a.x;if(a.y>y)y=a.y;c.push(a.x);h.push(a.y)}else for(p=0;p<d;++p){var b=+f(a=e[p],p),w=+l(a,p);if(b<v)v=b;if(w<m)m=w;if(b>g)g=b;if(w>y)y=w;c.push(b);h.push(w)}}var E=g-v,S=y-m;if(E>S)y=m+E;else g=v+S;var N=ji();N.add=function(e){x(N,e,+f(e,++p),+l(e,p),v,m,g,y)};N.visit=function(e){Fi(e,N,v,m,g,y)};p=-1;if(t==null){while(++p<d){x(N,e[p],c[p],h[p],v,m,g,y)}--p}else e.forEach(N.add);c=h=e=a=null;return N}var s=si,o=oi,u;if(u=arguments.length){s=Hi;o=Bi;if(u===3){i=n;r=t;n=t=0}return a(e)}a.x=function(e){return arguments.length?(s=e,a):s};a.y=function(e){return arguments.length?(o=e,a):o};a.size=function(e){if(!arguments.length)return t==null?null:[r,i];if(e==null){t=n=r=i=null}else{t=n=0;r=+e[0],i=+e[1]}return a};return a};e.interpolateRgb=Ii;e.transform=function(n){var r=t.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate();return new qi(t?t.matrix:Wi)})(n)};qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Wi={a:1,b:0,c:0,d:1,e:0,f:0};e.interpolateNumber=Xi;e.interpolateTransform=Vi;e.interpolateObject=$i;e.interpolateString=Ji;var Ki=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;e.interpolate=Qi;e.interpolators=[function(e,t){var n=typeof t;return(n==="string"||n!==typeof e?Kt.has(t)||/^(#|rgb\(|hsl\()/.test(t)?Ii:Ji:t instanceof ft?Ii:n==="object"?Array.isArray(t)?Yi:$i:Xi)(e,t)}];e.interpolateArray=Yi;var Zi=function(){return Gt};var es=e.map({linear:Zi,poly:as,quad:function(){return ss},cubic:function(){return os},sin:function(){return fs},exp:function(){return ls},circle:function(){return cs},elastic:hs,back:ps,bounce:function(){return ds}});var ts=e.map({"in":Gt,out:rs,"in-out":is,"out-in":function(e){return is(rs(e))}});e.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.substring(0,t):e,r=t>=0?e.substring(t+1):"in";n=es.get(n)||Zi;r=ts.get(r)||Gt;return ns(r(n.apply(null,Array.prototype.slice.call(arguments,1))))};e.interpolateHcl=vs;e.interpolateHsl=ms;e.interpolateLab=gs;e.interpolateRound=ys;e.layout={};e.layout.bundle=function(){return function(e){var t=[],n=-1,r=e.length;while(++n<r)t.push(Es(e[n]));return t}};e.layout.chord=function(){function l(){var t={},l=[],h=e.range(s),p=[],d,v,m,g,y;n=[];r=[];d=0,g=-1;while(++g<s){v=0,y=-1;while(++y<s){v+=i[g][y]}l.push(v);p.push(e.range(s));d+=v}if(u){h.sort(function(e,t){return u(l[e],l[t])})}if(a){p.forEach(function(e,t){e.sort(function(e,n){return a(i[t][e],i[t][n])})})}d=(2*dt-o*s)/d;v=0,g=-1;while(++g<s){m=v,y=-1;while(++y<s){var b=h[g],w=p[b][y],E=i[b][w],S=v,x=v+=E*d;t[b+"-"+w]={index:b,subindex:w,startAngle:S,endAngle:x,value:E}}r[b]={index:b,startAngle:m,endAngle:v,value:(v-m)/d};v+=o}g=-1;while(++g<s){y=g-1;while(++y<s){var T=t[g+"-"+y],N=t[y+"-"+g];if(T.value||N.value){n.push(T.value<N.value?{source:N,target:T}:{source:T,target:N})}}}if(f)c()}function c(){n.sort(function(e,t){return f((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)})}var t={},n,r,i,s,o=0,u,a,f;t.matrix=function(e){if(!arguments.length)return i;s=(i=e)&&i.length;n=r=null;return t};t.padding=function(e){if(!arguments.length)return o;o=e;n=r=null;return t};t.sortGroups=function(e){if(!arguments.length)return u;u=e;n=r=null;return t};t.sortSubgroups=function(e){if(!arguments.length)return a;a=e;n=null;return t};t.sortChords=function(e){if(!arguments.length)return f;f=e;if(n)c();return t};t.chords=function(){if(!n)l();return n};t.groups=function(){if(!r)l();return r};return t};e.layout.force=function(){function g(e){return function(t,n,r,i){if(t.point!==e){var s=t.cx-e.x,o=t.cy-e.y,u=1/Math.sqrt(s*s+o*o);if((i-n)*u<c){var a=t.charge*u*u;e.px-=s*a;e.py-=o*a;return true}if(t.point&&isFinite(u)){var a=t.pointCharge*u*u;e.px-=s*a;e.py-=o*a}}return!t.charge}}function y(n){n.px=e.event.x,n.py=e.event.y;t.resume()}var t={},n=e.dispatch("start","tick","end"),r=[1,1],i,s,o=.9,u=As,a=Os,f=-30,l=.1,c=.8,h=[],p=[],d,v,m;t.tick=function(){if((s*=.99)<.005){n.end({type:"end",alpha:s=0});return true}var t=h.length,i=p.length,u,a,c,y,b,w,E,S,x;for(a=0;a<i;++a){c=p[a];y=c.source;b=c.target;S=b.x-y.x;x=b.y-y.y;if(w=S*S+x*x){w=s*v[a]*((w=Math.sqrt(w))-d[a])/w;S*=w;x*=w;b.x-=S*(E=y.weight/(b.weight+y.weight));b.y-=x*E;y.x+=S*(E=1-E);y.y+=x*E}}if(E=s*l){S=r[0]/2;x=r[1]/2;a=-1;if(E)while(++a<t){c=h[a];c.x+=(S-c.x)*E;c.y+=(x-c.y)*E}}if(f){Ls(u=e.geom.quadtree(h),s,m);a=-1;while(++a<t){if(!(c=h[a]).fixed){u.visit(g(c))}}}a=-1;while(++a<t){c=h[a];if(c.fixed){c.x=c.px;c.y=c.py}else{c.x-=(c.px-(c.px=c.x))*o;c.y-=(c.py-(c.py=c.y))*o}}n.tick({type:"tick",alpha:s})};t.nodes=function(e){if(!arguments.length)return h;h=e;return t};t.links=function(e){if(!arguments.length)return p;p=e;return t};t.size=function(e){if(!arguments.length)return r;r=e;return t};t.linkDistance=function(e){if(!arguments.length)return u;u=typeof e==="function"?e:+e;return t};t.distance=t.linkDistance;t.linkStrength=function(e){if(!arguments.length)return a;a=typeof e==="function"?e:+e;return t};t.friction=function(e){if(!arguments.length)return o;o=+e;return t};t.charge=function(e){if(!arguments.length)return f;f=typeof e==="function"?e:+e;return t};t.gravity=function(e){if(!arguments.length)return l;l=+e;return t};t.theta=function(e){if(!arguments.length)return c;c=+e;return t};t.alpha=function(r){if(!arguments.length)return s;r=+r;if(s){if(r>0)s=r;else s=0}else if(r>0){n.start({type:"start",alpha:s=r});e.timer(t.tick)}return t};t.start=function(){function y(t,n){var r=b(e),i=-1,s=r.length,o;while(++i<s)if(!isNaN(o=r[i][t]))return o;return Math.random()*n}function b(){if(!c){c=[];for(n=0;n<i;++n){c[n]=[]}for(n=0;n<s;++n){var t=p[n];c[t.source.index].push(t.target);c[t.target.index].push(t.source)}}return c[e]}var e,n,i=h.length,s=p.length,o=r[0],l=r[1],c,g;for(e=0;e<i;++e){(g=h[e]).index=e;g.weight=0}for(e=0;e<s;++e){g=p[e];if(typeof g.source=="number")g.source=h[g.source];if(typeof g.target=="number")g.target=h[g.target];++g.source.weight;++g.target.weight}for(e=0;e<i;++e){g=h[e];if(isNaN(g.x))g.x=y("x",o);if(isNaN(g.y))g.y=y("y",l);if(isNaN(g.px))g.px=g.x;if(isNaN(g.py))g.py=g.y}d=[];if(typeof u==="function")for(e=0;e<s;++e)d[e]=+u.call(this,p[e],e);else for(e=0;e<s;++e)d[e]=u;v=[];if(typeof a==="function")for(e=0;e<s;++e)v[e]=+a.call(this,p[e],e);else for(e=0;e<s;++e)v[e]=a;m=[];if(typeof f==="function")for(e=0;e<i;++e)m[e]=+f.call(this,h[e],e);else for(e=0;e<i;++e)m[e]=f;return t.resume()};t.resume=function(){return t.alpha(.1)};t.stop=function(){return t.alpha(0)};t.drag=function(){if(!i)i=e.behavior.drag().origin(Gt).on("dragstart.force",Ts).on("drag.force",y).on("dragend.force",Ns);if(!arguments.length)return i;this.on("mouseover.force",Cs).on("mouseout.force",ks).call(i)};return e.rebind(t,n,"on")};var As=20,Os=1;e.layout.hierarchy=function(){function r(i,o,u){var a=t.call(s,i,o);i.depth=o;u.push(i);if(a&&(l=a.length)){var f=-1,l,c=i.children=[],h=0,p=o+1,d;while(++f<l){d=r(a[f],p,u);d.parent=i;c.push(d);h+=d.value}if(e)c.sort(e);if(n)i.value=h}else if(n){i.value=+n.call(s,i,o)||0}return i}function i(e,t){var r=e.children,o=0;if(r&&(a=r.length)){var u=-1,a,f=t+1;while(++u<a)o+=i(r[u],f)}else if(n){o=+n.call(s,e,t)||0}if(n)e.value=o;return o}function s(e){var t=[];r(e,0,t);return t}var e=Ps,t=_s,n=Ds;s.sort=function(t){if(!arguments.length)return e;e=t;return s};s.children=function(e){if(!arguments.length)return t;t=e;return s};s.value=function(e){if(!arguments.length)return n;n=e;return s};s.revalue=function(e){i(e,0);return e};return s};e.layout.partition=function(){function r(e,t,n,i){var s=e.children;e.x=t;e.y=e.depth*i;e.dx=n;e.dy=i;if(s&&(u=s.length)){var o=-1,u,a,f;n=e.value?n/e.value:0;while(++o<u){r(a=s[o],t,f=a.value*n,i);t+=f}}}function i(e){var t=e.children,n=0;if(t&&(s=t.length)){var r=-1,s;while(++r<s)n=Math.max(n,i(t[r]))}return 1+n}function s(e,s){var o=t.call(this,e,s);r(o[0],0,n[0],n[1]/i(o[0]));return o}var t=e.layout.hierarchy(),n=[1,1];s.size=function(e){if(!arguments.length)return n;n=e;return s};return Ms(s,t)};e.layout.pie=function(){function s(o){var u=o.map(function(e,n){return+t.call(s,e,n)});var a=+(typeof r==="function"?r.apply(this,arguments):r);var f=((typeof i==="function"?i.apply(this,arguments):i)-a)/e.sum(u);var l=e.range(o.length);if(n!=null)l.sort(n===Bs?function(e,t){return u[t]-u[e]}:function(e,t){return n(o[e],o[t])});var c=[];l.forEach(function(e){var t;c[e]={data:o[e],value:t=u[e],startAngle:a,endAngle:a+=t*f}});return c}var t=Number,n=Bs,r=0,i=2*dt;s.value=function(e){if(!arguments.length)return t;t=e;return s};s.sort=function(e){if(!arguments.length)return n;n=e;return s};s.startAngle=function(e){if(!arguments.length)return r;r=e;return s};s.endAngle=function(e){if(!arguments.length)return i;i=e;return s};return s};var Bs={};e.layout.stack=function(){function u(a,f){var l=a.map(function(e,n){return t.call(u,e,n)});var c=l.map(function(e){return e.map(function(e,t){return[s.call(u,e,t),o.call(u,e,t)]})});var h=n.call(u,c,f);l=e.permute(l,h);c=e.permute(c,h);var p=r.call(u,c,f);var d=l.length,v=l[0].length,m,g,y;for(g=0;g<v;++g){i.call(u,l[0][g],y=p[g],c[0][g][1]);for(m=1;m<d;++m){i.call(u,l[m][g],y+=c[m-1][g][1],c[m][g][1])}}return a}var t=Gt,n=Us,r=zs,i=Is,s=js,o=Fs;u.values=function(e){if(!arguments.length)return t;t=e;return u};u.order=function(e){if(!arguments.length)return n;n=typeof e==="function"?e:qs.get(e)||Us;return u};u.offset=function(e){if(!arguments.length)return r;r=typeof e==="function"?e:Rs.get(e)||zs;return u};u.x=function(e){if(!arguments.length)return s;s=e;return u};u.y=function(e){if(!arguments.length)return o;o=e;return u};u.out=function(e){if(!arguments.length)return i;i=e;return u};return u};var qs=e.map({"inside-out":function(t){var n=t.length,r,i,s=t.map(Ws),o=t.map(Xs),u=e.range(n).sort(function(e,t){return s[e]-s[t]}),a=0,f=0,l=[],c=[];for(r=0;r<n;++r){i=u[r];if(a<f){a+=o[i];l.push(i)}else{f+=o[i];c.push(i)}}return c.reverse().concat(l)},reverse:function(t){return e.range(t.length).reverse()},"default":Us});var Rs=e.map({silhouette:function(e){var t=e.length,n=e[0].length,r=[],i=0,s,o,u,a=[];for(o=0;o<n;++o){for(s=0,u=0;s<t;s++)u+=e[s][o][1];if(u>i)i=u;r.push(u)}for(o=0;o<n;++o){a[o]=(i-r[o])/2}return a},wiggle:function(e){var t=e.length,n=e[0],r=n.length,i,s,o,u,a,f,l,c,h,p=[];p[0]=c=h=0;for(s=1;s<r;++s){for(i=0,u=0;i<t;++i)u+=e[i][s][1];for(i=0,a=0,l=n[s][0]-n[s-1][0];i<t;++i){for(o=0,f=(e[i][s][1]-e[i][s-1][1])/(2*l);o<i;++o){f+=(e[o][s][1]-e[o][s-1][1])/l}a+=f*e[i][s][1]}p[s]=c-=u?a/u*l:0;if(c<h)h=c}for(s=0;s<r;++s)p[s]-=h;return p},expand:function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,u=[];for(s=0;s<n;++s){for(i=0,o=0;i<t;i++)o+=e[i][s][1];if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)u[s]=0;return u},zero:zs});e.layout.histogram=function(){function s(s,o){var u=[],a=s.map(n,this),f=r.call(this,a,o),l=i.call(this,f,a,o),c,o=-1,h=a.length,p=l.length-1,d=t?1:1/h,v;while(++o<p){c=u[o]=[];c.dx=l[o+1]-(c.x=l[o]);c.y=0}if(p>0){o=-1;while(++o<h){v=a[o];if(v>=f[0]&&v<=f[1]){c=u[e.bisect(l,v,1,p)-1];c.y+=d;c.push(s[o])}}}return u}var t=true,n=Number,r=Ks,i=$s;s.value=function(e){if(!arguments.length)return n;n=e;return s};s.range=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.bins=function(e){if(!arguments.length)return i;i=typeof e==="number"?function(t){return Js(t,e)}:Qt(e);return s};s.frequency=function(e){if(!arguments.length)return t;t=!!e;return s};return s};e.layout.tree=function(){function i(e,i){function u(e,t){var r=e.children,i=e._tree;if(r&&(s=r.length)){var s,o=r[0],a,l=o,c,h=-1;while(++h<s){c=r[h];u(c,a);l=f(c,a,l);a=c}io(e);var p=.5*(o._tree.prelim+c._tree.prelim);if(t){i.prelim=t._tree.prelim+n(e,t);i.mod=i.prelim-p}else{i.prelim=p}}else{if(t){i.prelim=t._tree.prelim+n(e,t)}}}function a(e,t){e.x=e._tree.prelim+t;var n=e.children;if(n&&(i=n.length)){var r=-1,i;t+=e._tree.mod;while(++r<i){a(n[r],t)}}}function f(e,t,r){if(t){var i=e,s=e,o=t,u=e.parent.children[0],a=i._tree.mod,f=s._tree.mod,l=o._tree.mod,c=u._tree.mod,h;while(o=Ys(o),i=Gs(i),o&&i){u=Gs(u);s=Ys(s);s._tree.ancestor=e;h=o._tree.prelim+l-i._tree.prelim-a+n(o,i);if(h>0){so(oo(o,e,r),e,h);a+=h;f+=h}l+=o._tree.mod;a+=i._tree.mod;c+=u._tree.mod;f+=s._tree.mod}if(o&&!Ys(s)){s._tree.thread=o;s._tree.mod+=l-f}if(i&&!Gs(u)){u._tree.thread=i;u._tree.mod+=a-c;r=e}}return r}var s=t.call(this,e,i),o=s[0];ro(o,function(e,t){e._tree={ancestor:e,prelim:0,mod:0,change:0,shift:0,number:t?t._tree.number+1:0}});u(o);a(o,-o._tree.prelim);var l=Zs(o,to),c=Zs(o,eo),h=Zs(o,no),p=l.x-n(l,c)/2,d=c.x+n(c,l)/2,v=h.depth||1;ro(o,function(e){e.x=(e.x-p)/(d-p)*r[0];e.y=e.depth/v*r[1];delete e._tree});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.pack=function(){function i(e,i){var s=t.call(this,e,i),o=s[0];o.x=0;o.y=0;ro(o,function(e){e.r=Math.sqrt(e.value)});ro(o,co);var u=r[0],a=r[1],f=Math.max(2*o.r/u,2*o.r/a);if(n>0){var l=n*f/2;ro(o,function(e){e.r+=l});ro(o,co);ro(o,function(e){e.r-=l});f=Math.max(2*o.r/u,2*o.r/a)}vo(o,u/2,a/2,1/f);return s}var t=e.layout.hierarchy().sort(uo),n=0,r=[1,1];i.size=function(e){if(!arguments.length)return r;r=e;return i};i.padding=function(e){if(!arguments.length)return n;n=+e;return i};return Ms(i,t)};e.layout.cluster=function(){function i(e,i){var s=t.call(this,e,i),o=s[0],u,a=0;ro(o,function(e){var t=e.children;if(t&&t.length){e.x=yo(t);e.y=go(t)}else{e.x=u?a+=n(e,u):0;e.y=0;u=e}});var f=bo(o),l=wo(o),c=f.x-n(f,l)/2,h=l.x+n(l,f)/2;ro(o,function(e){e.x=(e.x-c)/(h-c)*r[0];e.y=(1-(o.y?e.y/o.y:1))*r[1]});return s}var t=e.layout.hierarchy().sort(null).value(null),n=Qs,r=[1,1];i.separation=function(e){if(!arguments.length)return n;n=e;return i};i.size=function(e){if(!arguments.length)return r;r=e;return i};return Ms(i,t)};e.layout.treemap=function(){function l(e,t){var n=-1,r=e.length,i,s;while(++n<r){s=(i=e[n]).value*(t<0?0:t);i.area=isNaN(s)||s<=0?0:s}}function c(e){var t=e.children;if(t&&t.length){var n=s(e),r=[],i=t.slice(),o,u=Infinity,f,h=a==="slice"?n.dx:a==="dice"?n.dy:a==="slice-dice"?e.depth&1?n.dy:n.dx:Math.min(n.dx,n.dy),v;l(i,n.dx*n.dy/e.value);r.area=0;while((v=i.length)>0){r.push(o=i[v-1]);r.area+=o.area;if(a!=="squarify"||(f=p(r,h))<=u){i.pop();u=f}else{r.area-=r.pop().area;d(r,h,n,false);h=Math.min(n.dx,n.dy);r.length=r.area=0;u=Infinity}}if(r.length){d(r,h,n,true);r.length=r.area=0}t.forEach(c)}}function h(e){var t=e.children;if(t&&t.length){var n=s(e),r=t.slice(),i,o=[];l(r,n.dx*n.dy/e.value);o.area=0;while(i=r.pop()){o.push(i);o.area+=i.area;if(i.z!=null){d(o,i.z?n.dx:n.dy,n,!r.length);o.length=o.area=0}}t.forEach(h)}}function p(e,t){var n=e.area,r,i=0,s=Infinity,o=-1,u=e.length;while(++o<u){if(!(r=e[o].area))continue;if(r<s)s=r;if(r>i)i=r}n*=n;t*=t;return n?Math.max(t*i*f/n,n/(t*s*f)):Infinity}function d(e,t,r,i){var s=-1,o=e.length,u=r.x,a=r.y,f=t?n(e.area/t):0,l;if(t==r.dx){if(i||f>r.dy)f=r.dy;while(++s<o){l=e[s];l.x=u;l.y=a;l.dy=f;u+=l.dx=Math.min(r.x+r.dx-u,f?n(l.area/f):0)}l.z=true;l.dx+=r.x+r.dx-u;r.y+=f;r.dy-=f}else{if(i||f>r.dx)f=r.dx;while(++s<o){l=e[s];l.x=u;l.y=a;l.dx=f;a+=l.dy=Math.min(r.y+r.dy-a,f?n(l.area/f):0)}l.z=false;l.dy+=r.y+r.dy-a;r.x+=f;r.dx-=f}}function v(e){var n=u||t(e),i=n[0];i.x=0;i.y=0;i.dx=r[0];i.dy=r[1];if(u)t.revalue(i);l([i],i.dx*i.dy/i.value);(u?h:c)(i);if(o)u=n;return n}var t=e.layout.hierarchy(),n=Math.round,r=[1,1],i=null,s=Eo,o=false,u,a="squarify",f=.5*(1+Math.sqrt(5));v.size=function(e){if(!arguments.length)return r;r=e;return v};v.padding=function(e){function t(t){var n=e.call(v,t,t.depth);return n==null?Eo(t):So(t,typeof n==="number"?[n,n,n,n]:n)}function n(t){return So(t,e)}if(!arguments.length)return i;var r;s=(i=e)==null?Eo:(r=typeof e)==="function"?t:r==="number"?(e=[e,e,e,e],n):n;return v};v.round=function(e){if(!arguments.length)return n!=Number;n=e?Math.round:Number;return v};v.sticky=function(e){if(!arguments.length)return o;o=e;u=null;return v};v.ratio=function(e){if(!arguments.length)return f;f=e;return v};v.mode=function(e){if(!arguments.length)return a;a=e+"";return v};return Ms(v,t)};e.random={normal:function(e,t){var n=arguments.length;if(n<2)t=1;if(n<1)e=0;return function(){var n,r,i;do{n=Math.random()*2-1;r=Math.random()*2-1;i=n*n+r*r}while(!i||i>1);return e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t/e}}};e.scale={};e.scale.linear=function(){return Lo([0,1],[0,1],Qi,false)};e.scale.log=function(){return Po(e.scale.linear().domain([0,Math.LN10]),10,Bo,jo)};var Ho=e.format(".0e");e.scale.pow=function(){return Ro(e.scale.linear(),1)};e.scale.sqrt=function(){return e.scale.pow().exponent(.5)};e.scale.ordinal=function(){return zo([],{t:"range",a:[[]]})};e.scale.category10=function(){return e.scale.ordinal().range(Wo)};e.scale.category20=function(){return e.scale.ordinal().range(Xo)};e.scale.category20b=function(){return e.scale.ordinal().range(Vo)};e.scale.category20c=function(){return e.scale.ordinal().range($o)};e.scale.category50=function(){return e.scale.ordinal().range(Jo)};var Wo=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Xo=["#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"];var Vo=["#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#e7ba52","#e7cb94","#843c39","#ad494a","#d6616b","#e7969c","#7b4173","#a55194","#ce6dbd","#de9ed6"];var $o=["#3182bd","#6baed6","#9ecae1","#c6dbef","#e6550d","#fd8d3c","#fdae6b","#fdd0a2","#31a354","#74c476","#a1d99b","#c7e9c0","#756bb1","#9e9ac8","#bcbddc","#dadaeb","#636363","#969696","#bdbdbd","#d9d9d9"];var Jo=["#1f77b4","#ff7f0e","#2ca02c","#8c864b","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf","#DC143C","#800080","#0000FF","#008000","#D2691E","#FF0000","#000000","#DB7093","#FF00FF","#7B68EE","#1f77b6","#9edae5","#393b79","#5254a3","#6b6ecf","#9c9ede","#637939","#8ca252","#b5cf6b","#cedb9c","#8c6d31","#bd9e39","#aec7e8","#e7ba52","#ffbb78","#e7cb94","#98df8a","#843c39","#ff9896","#ad494a","#c5b0d5","#d6616b","#c49c94","#e7969c","#f7b6d2","#fd8d3c","#c7c7c7","#7b4173","#dbdb8d","#a55194"];e.scale.quantile=function(){return Ko([],[])};e.scale.quantize=function(){return Qo(0,1,[0,1])};e.scale.threshold=function(){return Go([.5],[0,1])};e.scale.identity=function(){return Yo([0,1])};e.svg.arc=function(){function i(){var i=e.apply(this,arguments),s=t.apply(this,arguments),o=n.apply(this,arguments)+Zo,u=r.apply(this,arguments)+Zo,a=(u<o&&(a=o,o=u,u=a),u-o),f=a<dt?"0":"1",l=Math.cos(o),c=Math.sin(o),h=Math.cos(u),p=Math.sin(u);return a>=eu?i?"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"M0,"+i+"A"+i+","+i+" 0 1,0 0,"+ -i+"A"+i+","+i+" 0 1,0 0,"+i+"Z":"M0,"+s+"A"+s+","+s+" 0 1,1 0,"+ -s+"A"+s+","+s+" 0 1,1 0,"+s+"Z":i?"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L"+i*h+","+i*p+"A"+i+","+i+" 0 "+f+",0 "+i*l+","+i*c+"Z":"M"+s*l+","+s*c+"A"+s+","+s+" 0 "+f+",1 "+s*h+","+s*p+"L0,0"+"Z"}var e=tu,t=nu,n=ru,r=iu;i.innerRadius=function(t){if(!arguments.length)return e;e=Qt(t);return i};i.outerRadius=function(e){if(!arguments.length)return t;t=Qt(e);return i};i.startAngle=function(e){if(!arguments.length)return n;n=Qt(e);return i};i.endAngle=function(e){if(!arguments.length)return r;r=Qt(e);return i};i.centroid=function(){var i=(e.apply(this,arguments)+t.apply(this,arguments))/2,s=(n.apply(this,arguments)+r.apply(this,arguments))/2+Zo;return[Math.cos(s)*i,Math.sin(s)*i]};return i};var Zo=-dt/2,eu=2*dt-1e-6;e.svg.line.radial=function(){var e=ii(su);e.radius=e.x,delete e.x;e.angle=e.y,delete e.y;return e};li.reverse=ci;ci.reverse=li;e.svg.area=function(){return ou(Gt)};e.svg.area.radial=function(){var e=ou(su);e.radius=e.x,delete e.x;e.innerRadius=e.x0,delete e.x0;e.outerRadius=e.x1,delete e.x1;e.angle=e.y,delete e.y;e.startAngle=e.y0,delete e.y0;e.endAngle=e.y1,delete e.y1;return e};e.svg.chord=function(){function s(n,r){var i=o(this,e,n,r),s=o(this,t,n,r);return"M"+i.p0+a(i.r,i.p1,i.a1-i.a0)+(u(i,s)?f(i.r,i.p1,i.r,i.p0):f(i.r,i.p1,s.r,s.p0)+a(s.r,s.p1,s.a1-s.a0)+f(s.r,s.p1,i.r,i.p0))+"Z"}function o(e,t,s,o){var u=t.call(e,s,o),a=n.call(e,u,o),f=r.call(e,u,o)+Zo,l=i.call(e,u,o)+Zo;return{r:a,a0:f,a1:l,p0:[a*Math.cos(f),a*Math.sin(f)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function u(e,t){return e.a0==t.a0&&e.a1==t.a1}function a(e,t,n){return"A"+e+","+e+" 0 "+ +(n>dt)+",1 "+t}function f(e,t,n,r){return"Q 0,0 "+r}var e=Nr,t=Cr,n=uu,r=ru,i=iu;s.radius=function(e){if(!arguments.length)return n;n=Qt(e);return s};s.source=function(t){if(!arguments.length)return e;e=Qt(t);return s};s.target=function(e){if(!arguments.length)return t;t=Qt(e);return s};s.startAngle=function(e){if(!arguments.length)return r;r=Qt(e);return s};s.endAngle=function(e){if(!arguments.length)return i;i=Qt(e);return s};return s};e.svg.diagonal=function(){function r(r,i){var s=e.call(this,r,i),o=t.call(this,r,i),u=(s.y+o.y)/2,a=[s,{x:s.x,y:u},{x:o.x,y:u},o];a=a.map(n);return"M"+a[0]+"C"+a[1]+" "+a[2]+" "+a[3]}var e=Nr,t=Cr,n=au;r.source=function(t){if(!arguments.length)return e;e=Qt(t);return r};r.target=function(e){if(!arguments.length)return t;t=Qt(e);return r};r.projection=function(e){if(!arguments.length)return n;n=e;return r};return r};e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),n=au,r=t.projection;t.projection=function(e){return arguments.length?r(fu(n=e)):n};return t};e.svg.symbol=function(){function n(n,r){return(pu.get(e.call(this,n,r))||hu)(t.call(this,n,r))}var e=cu,t=lu;n.type=function(t){if(!arguments.length)return e;e=Qt(t);return n};n.size=function(e){if(!arguments.length)return t;t=Qt(e);return n};return n};var pu=e.map({circle:hu,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+ -3*t+","+ -t+"H"+ -t+"V"+ -3*t+"H"+t+"V"+ -t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+ -t+"V"+t+"H"+ -3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*vu)),n=t*vu;return"M0,"+ -t+"L"+n+",0"+" 0,"+t+" "+ -n+",0"+"Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+ -t+","+ -t+"L"+t+","+ -t+" "+t+","+t+" "+ -t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+n+"L"+t+","+ -n+" "+ -t+","+ -n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/du),n=t*du/2;return"M0,"+ -n+"L"+t+","+n+" "+ -t+","+n+"Z"}});e.svg.symbolTypes=pu.keys();var du=Math.sqrt(3),vu=Math.tan(30*mt);var gu=[],yu=0,bu,wu={ease:us,delay:0,duration:250};gu.call=B.call;gu.empty=B.empty;gu.node=B.node;e.transition=function(e){return arguments.length?bu?e.transition():e:st.transition()};e.transition.prototype=gu;gu.select=function(e){var t=this.id,n=[],r,i,s;if(typeof e!=="function")e=j(e);for(var o=-1,u=this.length;++o<u;){n.push(r=[]);for(var a=this[o],f=-1,l=a.length;++f<l;){if((s=a[f])&&(i=e.call(s,s.__data__,f))){if("__data__"in s)i.__data__=s.__data__;xu(i,f,t,s.__transition__[t]);r.push(i)}else{r.push(null)}}}return mu(n,t)};gu.selectAll=function(e){var t=this.id,n=[],r,i,s,o,u;if(typeof e!=="function")e=F(e);for(var a=-1,f=this.length;++a<f;){for(var l=this[a],c=-1,h=l.length;++c<h;){if(s=l[c]){u=s.__transition__[t];i=e.call(s,s.__data__,c);n.push(r=[]);for(var p=-1,d=i.length;++p<d;){xu(o=i[p],p,t,u);r.push(o)}}}}return mu(n,t)};gu.filter=function(e){var t=[],n,r,i;if(typeof e!=="function")e=K(e);for(var s=0,o=this.length;s<o;s++){t.push(n=[]);for(var r=this[s],u=0,a=r.length;u<a;u++){if((i=r[u])&&e.call(i,i.__data__,u)){n.push(i)}}}return mu(t,this.id,this.time).ease(this.ease())};gu.tween=function(e,t){var n=this.id;if(arguments.length<2)return this.node().__transition__[n].tween.get(e);return nt(this,t==null?function(t){t.__transition__[n].tween.remove(e)}:function(r){r.__transition__[n].tween.set(e,t)})};gu.attr=function(t,n){function s(){this.removeAttribute(i)}function o(){this.removeAttributeNS(i.space,i.local)}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var r=Gi(t),i=e.ns.qualify(t);return Eu(this,"attr."+t,n,function(e){function t(){var t=this.getAttribute(i),n;return t!==e&&(n=r(t,e),function(e){this.setAttribute(i,n(e))})}function n(){var t=this.getAttributeNS(i.space,i.local),n;return t!==e&&(n=r(t,e),function(e){this.setAttributeNS(i.space,i.local,n(e))})}return e==null?i.local?o:s:(e+="",i.local?n:t)})};gu.attrTween=function(t,n){function i(e,t){var i=n.call(this,e,t,this.getAttribute(r));return i&&function(e){this.setAttribute(r,i(e))}}function s(e,t){var i=n.call(this,e,t,this.getAttributeNS(r.space,r.local));return i&&function(e){this.setAttributeNS(r.space,r.local,i(e))}}var r=e.ns.qualify(t);return this.tween("attr."+t,r.local?s:i)};gu.style=function(e,t,r){function o(){this.style.removeProperty(e)}var i=arguments.length;if(i<3){if(typeof e!=="string"){if(i<2)t="";for(r in e)this.style(r,e[r],t);return this}r=""}var s=Gi(e);return Eu(this,"style."+e,t,function(t){function i(){var i=n.getComputedStyle(this,null).getPropertyValue(e),o;return i!==t&&(o=s(i,t),function(t){this.style.setProperty(e,o(t),r)})}return t==null?o:(t+="",i)})};gu.styleTween=function(e,t,r){if(arguments.length<3)r="";return this.tween("style."+e,function(i,s){var o=t.call(this,i,s,n.getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),r)}})};gu.text=function(e){return Eu(this,"text",e,Su)};gu.remove=function(){return this.each("end.transition",function(){var e;if(!this.__transition__&&(e=this.parentNode))e.removeChild(this)})};gu.ease=function(t){var n=this.id;if(arguments.length<1)return this.node().__transition__[n].ease;if(typeof t!=="function")t=e.ease.apply(e,arguments);return nt(this,function(e){e.__transition__[n].ease=t})};gu.delay=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].delay=e.call(n,n.__data__,r,i)|0}:(e|=0,function(n){n.__transition__[t].delay=e}))};gu.duration=function(e){var t=this.id;return nt(this,typeof e==="function"?function(n,r,i){n.__transition__[t].duration=Math.max(1,e.call(n,n.__data__,r,i)|0)}:(e=Math.max(1,e|0),function(n){n.__transition__[t].duration=e}))};gu.each=function(e,t){var n=this.id;if(arguments.length<2){var r=wu,i=bu;bu=n;nt(this,function(t,r,i){wu=t.__transition__[n];e.call(t,t.__data__,r,i)});wu=r;bu=i}else{nt(this,function(r){r.__transition__[n].event.on(e,t)})}return this};gu.transition=function(){var e=this.id,t=++yu,n=[],r,i,s,o;for(var u=0,a=this.length;u<a;u++){n.push(r=[]);for(var i=this[u],f=0,l=i.length;f<l;f++){if(s=i[f]){o=Object.create(s.__transition__[e]);o.delay+=o.duration;xu(s,f,t,o)}r.push(s)}}return mu(n,t)};e.svg.axis=function(){function c(c){c.each(function(){var c=e.select(this);var h=a==null?t.ticks?t.ticks.apply(t,u):t.domain():a,p=f==null?t.tickFormat?t.tickFormat.apply(t,u):String:f;var d=Lu(t,h,l),v=c.selectAll(".tick.minor").data(d,String),m=v.enter().insert("line",".tick").attr("class","tick minor").style("opacity",1e-6),g=e.transition(v.exit()).style("opacity",1e-6).remove(),y=e.transition(v).style("opacity",1);var b=c.selectAll(".tick.major").data(h,String),w=b.enter().insert("g","path").attr("class","tick major").style("opacity",1e-6),E=e.transition(b.exit()).style("opacity",1e-6).remove(),S=e.transition(b).style("opacity",1),x;var T=To(t),N=c.selectAll(".domain").data([0]),C=(N.enter().append("path").attr("class","domain"),e.transition(N));var k=t.copy(),L=this.__chart__||k;this.__chart__=k;w.append("line");w.append("text");var A=w.select("line"),O=S.select("line"),M=b.select("text").text(p),_=w.select("text"),D=S.select("text");switch(n){case"bottom":{x=Cu;m.attr("y2",i);y.attr("x2",0).attr("y2",i);A.attr("y2",r);_.attr("y",Math.max(r,0)+o);O.attr("x2",0).attr("y2",r);D.attr("x",0).attr("y",Math.max(r,0)+o);M.attr("dy",".71em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+s+"V0H"+T[1]+"V"+s);break};case"top":{x=Cu;m.attr("y2",-i);y.attr("x2",0).attr("y2",-i);A.attr("y2",-r);_.attr("y",-(Math.max(r,0)+o));O.attr("x2",0).attr("y2",-r);D.attr("x",0).attr("y",-(Math.max(r,0)+o));M.attr("dy","0em").style("text-anchor","middle");C.attr("d","M"+T[0]+","+ -s+"V0H"+T[1]+"V"+ -s);break};case"left":{x=ku;m.attr("x2",-i);y.attr("x2",-i).attr("y2",0);A.attr("x2",-r);_.attr("x",-(Math.max(r,0)+o));O.attr("x2",-r).attr("y2",0);D.attr("x",-(Math.max(r,0)+o)).attr("y",0);M.attr("dy",".32em").style("text-anchor","end");C.attr("d","M"+ -s+","+T[0]+"H0V"+T[1]+"H"+ -s);break};case"right":{x=ku;m.attr("x2",i);y.attr("x2",i).attr("y2",0);A.attr("x2",r);_.attr("x",Math.max(r,0)+o);O.attr("x2",r).attr("y2",0);D.attr("x",Math.max(r,0)+o).attr("y",0);M.attr("dy",".32em").style("text-anchor","start");C.attr("d","M"+s+","+T[0]+"H0V"+T[1]+"H"+s);break}}if(t.ticks){w.call(x,L);S.call(x,k);E.call(x,k);m.call(x,L);y.call(x,k);g.call(x,k)}else{var P=k.rangeBand()/2,H=function(e){return k(e)+P};w.call(x,H);S.call(x,H)}})}var t=e.scale.linear(),n=Tu,r=6,i=6,s=6,o=3,u=[10],a=null,f,l=0;c.scale=function(e){if(!arguments.length)return t;t=e;return c};c.orient=function(e){if(!arguments.length)return n;n=e in Nu?e+"":Tu;return c};c.ticks=function(){if(!arguments.length)return u;u=arguments;return c};c.tickValues=function(e){if(!arguments.length)return a;a=e;return c};c.tickFormat=function(e){if(!arguments.length)return f;f=e;return c};c.tickSize=function(e,t){if(!arguments.length)return r;var n=arguments.length-1;r=+e;i=n>1?+t:r;s=n>0?+arguments[n]:r;return c};c.tickPadding=function(e){if(!arguments.length)return o;o=+e;return c};c.tickSubdivide=function(e){if(!arguments.length)return l;l=+e;return c};return c};var Tu="bottom",Nu={top:1,right:1,bottom:1,left:1};e.svg.brush=function(){function a(t){t.each(function(){var t=e.select(this),n=t.selectAll(".background").data([0]),o=t.selectAll(".extent").data([0]),u=t.selectAll(".resize").data(s,String),p;t.style("pointer-events","all").on("mousedown.brush",h).on("touchstart.brush",h);n.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair");o.enter().append("rect").attr("class","extent").style("cursor","move");u.enter().append("g").attr("class",function(e){return"resize "+e}).style("cursor",function(e){return Au[e]}).append("rect").attr("x",function(e){return/[ew]$/.test(e)?-3:null}).attr("y",function(e){return/^[ns]/.test(e)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden");u.style("display",a.empty()?"none":null);u.exit().remove();if(r){p=To(r);n.attr("x",p[0]).attr("width",p[1]-p[0]);l(t)}if(i){p=To(i);n.attr("y",p[0]).attr("height",p[1]-p[0]);c(t)}f(t)})}function f(e){e.selectAll(".resize").attr("transform",function(e){return"translate("+o[+/e$/.test(e)][0]+","+o[+/^s/.test(e)][1]+")"})}function l(e){e.select(".extent").attr("x",o[0][0]);e.selectAll(".extent,.n>rect,.s>rect").attr("width",o[1][0]-o[0][0])}function c(e){e.select(".extent").attr("y",o[0][1]);e.selectAll(".extent,.e>rect,.w>rect").attr("height",o[1][1]-o[0][1])}function h(){function C(){var t=e.event.changedTouches;return t?e.touches(s,t)[0]:e.mouse(s)}function k(){if(e.event.keyCode==32){if(!b){w=null;E[0]-=o[1][0];E[1]-=o[1][1];b=2}y()}}function L(){if(e.event.keyCode==32&&b==2){E[0]+=o[1][0];E[1]+=o[1][1];b=0;y()}}function A(){var t=C(),n=false;if(S){t[0]+=S[0];t[1]+=S[1]}if(!b){if(e.event.altKey){if(!w)w=[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2];E[0]=o[+(t[0]<w[0])][0];E[1]=o[+(t[1]<w[1])][1]}else w=null}if(m&&O(t,r,0)){l(d);n=true}if(g&&O(t,i,1)){c(d);n=true}if(n){f(d);p({type:"brush",mode:b?"move":"resize"})}}function O(e,t,n){var r=To(t),i=r[0],s=r[1],a=E[n],f=o[1][n]-o[0][n],l,c;if(b){i-=a;s-=f+a}l=Math.max(i,Math.min(s,e[n]));if(b){c=(l+=a)+f}else{if(w)a=Math.max(i,Math.min(s,2*w[n]-l));if(a<l){c=l;l=a}else{c=a}}if(o[0][n]!==l||o[1][n]!==c){u=null;o[0][n]=l;o[1][n]=c;return true}}function M(){A();d.style("pointer-events","all").selectAll(".resize").style("display",a.empty()?"none":null);e.select("body").style("cursor",null);x.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null);p({type:"brushend"});y()}var s=this,h=e.select(e.event.target),p=t.of(s,arguments),d=e.select(s),v=h.datum(),m=!/^(n|s)$/.test(v)&&r,g=!/^(e|w)$/.test(v)&&i,b=h.classed("extent"),w,E=C(),S;var x=e.select(n).on("mousemove.brush",A).on("mouseup.brush",M).on("touchmove.brush",A).on("touchend.brush",M).on("keydown.brush",k).on("keyup.brush",L);if(b){E[0]=o[0][0]-E[0];E[1]=o[0][1]-E[1]}else if(v){var T=+/w$/.test(v),N=+/^n/.test(v);S=[o[1-T][0]-E[0],o[1-N][1]-E[1]];E[0]=o[T][0];E[1]=o[N][1]}else if(e.event.altKey)w=E.slice();d.style("pointer-events","none").selectAll(".resize").style("display",null);e.select("body").style("cursor",h.style("cursor"));p({type:"brushstart"});A();y()}var t=S(a,"brushstart","brush","brushend"),r=null,i=null,s=Ou[0],o=[[0,0],[0,0]],u;a.x=function(e){if(!arguments.length)return r;r=e;s=Ou[!r<<1|!i];return a};a.y=function(e){if(!arguments.length)return i;i=e;s=Ou[!r<<1|!i];return a};a.extent=function(e){var t,n,s,f,l;if(!arguments.length){e=u||o;if(r){t=e[0][0],n=e[1][0];if(!u){t=o[0][0],n=o[1][0];if(r.invert)t=r.invert(t),n=r.invert(n);if(n<t)l=t,t=n,n=l}}if(i){s=e[0][1],f=e[1][1];if(!u){s=o[0][1],f=o[1][1];if(i.invert)s=i.invert(s),f=i.invert(f);if(f<s)l=s,s=f,f=l}}return r&&i?[[t,s],[n,f]]:r?[t,n]:i&&[s,f]}u=[[0,0],[0,0]];if(r){t=e[0],n=e[1];if(i)t=t[0],n=n[0];u[0][0]=t,u[1][0]=n;if(r.invert)t=r(t),n=r(n);if(n<t)l=t,t=n,n=l;o[0][0]=t|0,o[1][0]=n|0}if(i){s=e[0],f=e[1];if(r)s=s[1],f=f[1];u[0][1]=s,u[1][1]=f;if(i.invert)s=i(s),f=i(f);if(f<s)l=s,s=f,f=l;o[0][1]=s|0,o[1][1]=f|0}return a};a.clear=function(){u=null;o[0][0]=o[0][1]=o[1][0]=o[1][1]=0;return a};a.empty=function(){return r&&o[0][0]===o[1][0]||i&&o[0][1]===o[1][1]};return e.rebind(a,t,"on")};var Au={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"};var Ou=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];e.time={};var Mu=Date,_u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Du.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){Pu.setUTCDate.apply(this._,arguments)},setDay:function(){Pu.setUTCDay.apply(this._,arguments)},setFullYear:function(){Pu.setUTCFullYear.apply(this._,arguments)},setHours:function(){Pu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Pu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Pu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Pu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Pu.setUTCSeconds.apply(this._,arguments)},setTime:function(){Pu.setTime.apply(this._,arguments)}};var Pu=Date.prototype;var Hu="%a %b %e %X %Y",Bu="%m/%d/%Y",ju="%H:%M:%S";var Fu=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Iu=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],qu=["January","February","March","April","May","June","July","August","September","October","November","December"],Ru=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];e.time.year=Uu(function(t){t=e.time.day(t);t.setMonth(0,1);return t},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e){return e.getFullYear()});e.time.years=e.time.year.range;e.time.years.utc=e.time.year.utc.range;e.time.day=Uu(function(e){var t=new Mu(1970,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate());return t},function(e,t){e.setDate(e.getDate()+t)},function(e){return e.getDate()-1});e.time.days=e.time.day.range;e.time.days.utc=e.time.day.utc.range;e.time.dayOfYear=function(t){var n=e.time.year(t);return Math.floor((t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*6e4)/864e5)};_u.forEach(function(t,n){t=t.toLowerCase();n=7-n;var r=e.time[t]=Uu(function(t){(t=e.time.day(t)).setDate(t.getDate()-(t.getDay()+n)%7);return t},function(e,t){e.setDate(e.getDate()+Math.floor(t)*7)},function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)-(r!==n)});e.time[t+"s"]=r.range;e.time[t+"s"].utc=r.utc.range;e.time[t+"OfYear"]=function(t){var r=e.time.year(t).getDay();return Math.floor((e.time.dayOfYear(t)+(r+n)%7)/7)}});e.time.week=e.time.sunday;e.time.weeks=e.time.sunday.range;e.time.weeks.utc=e.time.sunday.utc.range;e.time.weekOfYear=e.time.sundayOfYear;e.time.format=function(e){function n(n){var r=[],i=-1,s=0,o,u,a;while(++i<t){if(e.charCodeAt(i)===37){r.push(e.substring(s,i));if((u=ea[o=e.charAt(++i)])!=null)o=e.charAt(++i);if(a=ta[o])o=a(n,u==null?o==="e"?" ":"0":u);r.push(o);s=i+1}}r.push(e.substring(s,i));return r.join("")}var t=e.length;n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0},r=Wu(n,e,t,0);if(r!=t.length)return null;if("p"in n)n.H=n.H%12+n.p*12;var i=new Mu;i.setFullYear(n.y,n.m,n.d);i.setHours(n.H,n.M,n.S,n.L);return i};n.toString=function(){return e};return n};var Ju=Xu(Fu),Ku=Xu(Iu),Qu=Xu(qu),Gu=Vu(qu),Yu=Xu(Ru),Zu=Vu(Ru);var ea={"-":"",_:" ",0:"0"};var ta={a:function(e){return Iu[e.getDay()]},A:function(e){return Fu[e.getDay()]},b:function(e){return Ru[e.getMonth()]},B:function(e){return qu[e.getMonth()]},c:e.time.format(Hu),d:function(e,t){return $u(e.getDate(),t,2)},e:function(e,t){return $u(e.getDate(),t,2)},H:function(e,t){return $u(e.getHours(),t,2)},I:function(e,t){return $u(e.getHours()%12||12,t,2)},j:function(t,n){return $u(1+e.time.dayOfYear(t),n,3)},L:function(e,t){return $u(e.getMilliseconds(),t,3)},m:function(e,t){return $u(e.getMonth()+1,t,2)},M:function(e,t){return $u(e.getMinutes(),t,2)},p:function(e){return e.getHours()>=12?"PM":"AM"},S:function(e,t){return $u(e.getSeconds(),t,2)},U:function(t,n){return $u(e.time.sundayOfYear(t),n,2)},w:function(e){return e.getDay()},W:function(t,n){return $u(e.time.mondayOfYear(t),n,2)},x:e.time.format(Bu),X:e.time.format(ju),y:function(e,t){return $u(e.getFullYear()%100,t,2)},Y:function(e,t){return $u(e.getFullYear()%1e4,t,4)},Z:Sa,"%":function(){return"%"}};var na={a:ra,A:ia,b:sa,B:oa,c:ua,d:da,e:da,H:va,I:va,L:ya,m:pa,M:ma,p:wa,S:ga,x:aa,X:fa,y:ca,Y:la};var ba=/^\s*\d+/;var Ea=e.map({am:0,pm:1});e.time.format.utc=function(t){function r(e){try{Mu=Du;var t=new Mu;t._=e;return n(t)}finally{Mu=Date}}var n=e.time.format(t);r.parse=function(e){try{Mu=Du;var t=n.parse(e);return t&&t._}finally{Mu=Date}};r.toString=n.toString;return r};var xa=e.time.format.utc("%Y-%m-%dT%H:%M:%S.%LZ");e.time.format.iso=Date.prototype.toISOString&&+(new Date("2000-01-01T00:00:00.000Z"))?Ta:xa;Ta.parse=function(e){var t=new Date(e);return isNaN(t)?null:t};Ta.toString=xa.toString;e.time.second=Uu(function(e){return new Mu(Math.floor(e/1e3)*1e3)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*1e3)},function(e){return e.getSeconds()});e.time.seconds=e.time.second.range;e.time.seconds.utc=e.time.second.utc.range;e.time.minute=Uu(function(e){return new Mu(Math.floor(e/6e4)*6e4)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*6e4)},function(e){return e.getMinutes()});e.time.minutes=e.time.minute.range;e.time.minutes.utc=e.time.minute.utc.range;e.time.hour=Uu(function(e){var t=e.getTimezoneOffset()/60;return new Mu((Math.floor(e/36e5-t)+t)*36e5)},function(e,t){e.setTime(e.getTime()+Math.floor(t)*36e5)},function(e){return e.getHours()});e.time.hours=e.time.hour.range;e.time.hours.utc=e.time.hour.utc.range;e.time.month=Uu(function(t){t=e.time.day(t);t.setDate(1);return t},function(e,t){e.setMonth(e.getMonth()+t)},function(e){return e.getMonth()});e.time.months=e.time.month.range;e.time.months.utc=e.time.month.utc.range;var Ma=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6];var _a=[[e.time.second,1],[e.time.second,5],[e.time.second,15],[e.time.second,30],[e.time.minute,1],[e.time.minute,5],[e.time.minute,15],[e.time.minute,30],[e.time.hour,1],[e.time.hour,3],[e.time.hour,6],[e.time.hour,12],[e.time.day,1],[e.time.day,2],[e.time.week,1],[e.time.month,1],[e.time.month,3],[e.time.year,1]];var Da=[[e.time.format("%Y"),$n],[e.time.format("%B"),function(e){return e.getMonth()}],[e.time.format("%b %d"),function(e){return e.getDate()!=1}],[e.time.format("%a %d"),function(e){return e.getDay()&&e.getDate()!=1}],[e.time.format("%I %p"),function(e){return e.getHours()}],[e.time.format("%I:%M"),function(e){return e.getMinutes()}],[e.time.format(":%S"),function(e){return e.getSeconds()}],[e.time.format(".%L"),function(e){return e.getMilliseconds()}]];var Pa=e.scale.linear(),Ha=La(Da);_a.year=function(e,t){return Pa.domain(e.map(Oa)).ticks(t).map(Aa)};e.time.scale=function(){return Na(e.scale.linear(),_a,Ha)};var Ba=_a.map(function(e){return[e[0].utc,e[1]]});var ja=[[e.time.format.utc("%Y"),$n],[e.time.format.utc("%B"),function(e){return e.getUTCMonth()}],[e.time.format.utc("%b %d"),function(e){return e.getUTCDate()!=1}],[e.time.format.utc("%a %d"),function(e){return e.getUTCDay()&&e.getUTCDate()!=1}],[e.time.format.utc("%I %p"),function(e){return e.getUTCHours()}],[e.time.format.utc("%I:%M"),function(e){return e.getUTCMinutes()}],[e.time.format.utc(":%S"),function(e){return e.getUTCSeconds()}],[e.time.format.utc(".%L"),function(e){return e.getUTCMilliseconds()}]];var Fa=La(ja);Ba.year=function(e,t){return Pa.domain(e.map(qa)).ticks(t).map(Ia)};e.time.scale.utc=function(){return Na(e.scale.linear(),Ba,Fa)};e.text=function(){return e.xhr.apply(e,arguments).response(Ra)};e.json=function(t,n){return e.xhr(t,"application/json",n).response(Ua)};e.html=function(t,n){return e.xhr(t,"text/html",n).response(za)};e.xml=function(){return e.xhr.apply(e,arguments).response(Wa)};return e}() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/fisheye.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/fisheye.js
deleted file mode 100644
index e1addd7b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/fisheye.js
+++ /dev/null
@@ -1,86 +0,0 @@
-(function() {
- d3.fisheye = {
- scale: function(scaleType) {
- return d3_fisheye_scale(scaleType(), 3, 0);
- },
- circular: function() {
- var radius = 200,
- distortion = 2,
- k0,
- k1,
- focus = [0, 0];
-
- function fisheye(d) {
- var dx = d.x - focus[0],
- dy = d.y - focus[1],
- dd = Math.sqrt(dx * dx + dy * dy);
- if (!dd || dd >= radius) return {x: d.x, y: d.y, z: 1};
- var k = k0 * (1 - Math.exp(-dd * k1)) / dd * .75 + .25;
- return {x: focus[0] + dx * k, y: focus[1] + dy * k, z: Math.min(k, 10)};
- }
-
- function rescale() {
- k0 = Math.exp(distortion);
- k0 = k0 / (k0 - 1) * radius;
- k1 = distortion / radius;
- return fisheye;
- }
-
- fisheye.radius = function(_) {
- if (!arguments.length) return radius;
- radius = +_;
- return rescale();
- };
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return distortion;
- distortion = +_;
- return rescale();
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return focus;
- focus = _;
- return fisheye;
- };
-
- return rescale();
- }
- };
-
- function d3_fisheye_scale(scale, d, a) {
-
- function fisheye(_) {
- var x = scale(_),
- left = x < a,
- v,
- range = d3.extent(scale.range()),
- min = range[0],
- max = range[1],
- m = left ? a - min : max - a;
- if (m == 0) m = max - min;
- return (left ? -1 : 1) * m * (d + 1) / (d + (m / Math.abs(x - a))) + a;
- }
-
- fisheye.distortion = function(_) {
- if (!arguments.length) return d;
- d = +_;
- return fisheye;
- };
-
- fisheye.focus = function(_) {
- if (!arguments.length) return a;
- a = +_;
- return fisheye;
- };
-
- fisheye.copy = function() {
- return d3_fisheye_scale(scale.copy(), d, a);
- };
-
- fisheye.nice = scale.nice;
- fisheye.ticks = scale.ticks;
- fisheye.tickFormat = scale.tickFormat;
- return d3.rebind(fisheye, scale, "domain", "range");
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/hive.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/hive.js
deleted file mode 100644
index 06e53aed..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/hive.js
+++ /dev/null
@@ -1,80 +0,0 @@
-d3.hive = {};
-
-d3.hive.link = function() {
- var source = function(d) { return d.source; },
- target = function(d) { return d.target; },
- angle = function(d) { return d.angle; },
- startRadius = function(d) { return d.radius; },
- endRadius = startRadius,
- arcOffset = -Math.PI / 2;
-
- function link(d, i) {
- var s = node(source, this, d, i),
- t = node(target, this, d, i),
- x;
- if (t.a < s.a) x = t, t = s, s = x;
- if (t.a - s.a > Math.PI) s.a += 2 * Math.PI;
- var a1 = s.a + (t.a - s.a) / 3,
- a2 = t.a - (t.a - s.a) / 3;
- return s.r0 - s.r1 || t.r0 - t.r1
- ? "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "L" + Math.cos(s.a) * s.r1 + "," + Math.sin(s.a) * s.r1
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1
- + "L" + Math.cos(t.a) * t.r0 + "," + Math.sin(t.a) * t.r0
- + "C" + Math.cos(a2) * t.r0 + "," + Math.sin(a2) * t.r0
- + " " + Math.cos(a1) * s.r0 + "," + Math.sin(a1) * s.r0
- + " " + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- : "M" + Math.cos(s.a) * s.r0 + "," + Math.sin(s.a) * s.r0
- + "C" + Math.cos(a1) * s.r1 + "," + Math.sin(a1) * s.r1
- + " " + Math.cos(a2) * t.r1 + "," + Math.sin(a2) * t.r1
- + " " + Math.cos(t.a) * t.r1 + "," + Math.sin(t.a) * t.r1;
- }
-
- function node(method, thiz, d, i) {
- var node = method.call(thiz, d, i),
- a = +(typeof angle === "function" ? angle.call(thiz, node, i) : angle) + arcOffset,
- r0 = +(typeof startRadius === "function" ? startRadius.call(thiz, node, i) : startRadius),
- r1 = (startRadius === endRadius ? r0 : +(typeof endRadius === "function" ? endRadius.call(thiz, node, i) : endRadius));
- return {r0: r0, r1: r1, a: a};
- }
-
- link.source = function(_) {
- if (!arguments.length) return source;
- source = _;
- return link;
- };
-
- link.target = function(_) {
- if (!arguments.length) return target;
- target = _;
- return link;
- };
-
- link.angle = function(_) {
- if (!arguments.length) return angle;
- angle = _;
- return link;
- };
-
- link.radius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = endRadius = _;
- return link;
- };
-
- link.startRadius = function(_) {
- if (!arguments.length) return startRadius;
- startRadius = _;
- return link;
- };
-
- link.endRadius = function(_) {
- if (!arguments.length) return endRadius;
- endRadius = _;
- return link;
- };
-
- return link;
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/horizon.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/horizon.js
deleted file mode 100644
index d84c6567..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/horizon.js
+++ /dev/null
@@ -1,192 +0,0 @@
-(function() {
- d3.horizon = function() {
- var bands = 1, // between 1 and 5, typically
- mode = "offset", // or mirror
- interpolate = "linear", // or basis, monotone, step-before, etc.
- x = d3_horizonX,
- y = d3_horizonY,
- w = 960,
- h = 40,
- duration = 0;
-
- var color = d3.scale.linear()
- .domain([-1, 0, 1])
- .range(["#d62728", "#fff", "#1f77b4"]);
-
- // For each small multiple…
- function horizon(g) {
- g.each(function(d, i) {
- var g = d3.select(this),
- n = 2 * bands + 1,
- xMin = Infinity,
- xMax = -Infinity,
- yMax = -Infinity,
- x0, // old x-scale
- y0, // old y-scale
- id; // unique id for paths
-
- // Compute x- and y-values along with extents.
- var data = d.map(function(d, i) {
- var xv = x.call(this, d, i),
- yv = y.call(this, d, i);
- if (xv < xMin) xMin = xv;
- if (xv > xMax) xMax = xv;
- if (-yv > yMax) yMax = -yv;
- if (yv > yMax) yMax = yv;
- return [xv, yv];
- });
-
- // Compute the new x- and y-scales, and transform.
- var x1 = d3.scale.linear().domain([xMin, xMax]).range([0, w]),
- y1 = d3.scale.linear().domain([0, yMax]).range([0, h * bands]),
- t1 = d3_horizonTransform(bands, h, mode);
-
- // Retrieve the old scales, if this is an update.
- if (this.__chart__) {
- x0 = this.__chart__.x;
- y0 = this.__chart__.y;
- t0 = this.__chart__.t;
- id = this.__chart__.id;
- } else {
- x0 = x1.copy();
- y0 = y1.copy();
- t0 = t1;
- id = ++d3_horizonId;
- }
-
- // We'll use a defs to store the area path and the clip path.
- var defs = g.selectAll("defs")
- .data([null]);
-
- // The clip path is a simple rect.
- defs.enter().append("defs").append("clipPath")
- .attr("id", "d3_horizon_clip" + id)
- .append("rect")
- .attr("width", w)
- .attr("height", h);
-
- defs.select("rect").transition()
- .duration(duration)
- .attr("width", w)
- .attr("height", h);
-
- // We'll use a container to clip all horizon layers at once.
- g.selectAll("g")
- .data([null])
- .enter().append("g")
- .attr("clip-path", "url(#d3_horizon_clip" + id + ")");
-
- // Instantiate each copy of the path with different transforms.
- var path = g.select("g").selectAll("path")
- .data(d3.range(-1, -bands - 1, -1).concat(d3.range(1, bands + 1)), Number);
-
- var d0 = d3_horizonArea
- .interpolate(interpolate)
- .x(function(d) { return x0(d[0]); })
- .y0(h * bands)
- .y1(function(d) { return h * bands - y0(d[1]); })
- (data);
-
- var d1 = d3_horizonArea
- .x(function(d) { return x1(d[0]); })
- .y1(function(d) { return h * bands - y1(d[1]); })
- (data);
-
- path.enter().append("path")
- .style("fill", color)
- .attr("transform", t0)
- .attr("d", d0);
-
- path.transition()
- .duration(duration)
- .style("fill", color)
- .attr("transform", t1)
- .attr("d", d1);
-
- path.exit().transition()
- .duration(duration)
- .attr("transform", t1)
- .attr("d", d1)
- .remove();
-
- // Stash the new scales.
- this.__chart__ = {x: x1, y: y1, t: t1, id: id};
- });
- d3.timer.flush();
- }
-
- horizon.duration = function(x) {
- if (!arguments.length) return duration;
- duration = +x;
- return horizon;
- };
-
- horizon.bands = function(x) {
- if (!arguments.length) return bands;
- bands = +x;
- color.domain([-bands, 0, bands]);
- return horizon;
- };
-
- horizon.mode = function(x) {
- if (!arguments.length) return mode;
- mode = x + "";
- return horizon;
- };
-
- horizon.colors = function(x) {
- if (!arguments.length) return color.range();
- color.range(x);
- return horizon;
- };
-
- horizon.interpolate = function(x) {
- if (!arguments.length) return interpolate;
- interpolate = x + "";
- return horizon;
- };
-
- horizon.x = function(z) {
- if (!arguments.length) return x;
- x = z;
- return horizon;
- };
-
- horizon.y = function(z) {
- if (!arguments.length) return y;
- y = z;
- return horizon;
- };
-
- horizon.width = function(x) {
- if (!arguments.length) return w;
- w = +x;
- return horizon;
- };
-
- horizon.height = function(x) {
- if (!arguments.length) return h;
- h = +x;
- return horizon;
- };
-
- return horizon;
- };
-
- var d3_horizonArea = d3.svg.area(),
- d3_horizonId = 0;
-
- function d3_horizonX(d) {
- return d[0];
- }
-
- function d3_horizonY(d) {
- return d[1];
- }
-
- function d3_horizonTransform(bands, h, mode) {
- return mode == "offset"
- ? function(d) { return "translate(0," + (d + (d < 0) - bands) * h + ")"; }
- : function(d) { return (d < 0 ? "scale(1,-1)" : "") + "translate(0," + (d - bands) * h + ")"; };
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/interactiveLayer.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/interactiveLayer.js
deleted file mode 100644
index 4dfb68dc..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/interactiveLayer.js
+++ /dev/null
@@ -1,251 +0,0 @@
-/* Utility class to handle creation of an interactive layer.
-This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch
-containing the X-coordinate. It can also render a vertical line where the mouse is located.
-
-dispatch.elementMousemove is the important event to latch onto. It is fired whenever the mouse moves over
-the rectangle. The dispatch is given one object which contains the mouseX/Y location.
-It also has 'pointXValue', which is the conversion of mouseX to the x-axis scale.
-*/
-nv.interactiveGuideline = function() {
- "use strict";
- var tooltip = nv.models.tooltip();
- //Public settings
- var width = null
- , height = null
- //Please pass in the bounding chart's top and left margins
- //This is important for calculating the correct mouseX/Y positions.
- , margin = {left: 0, top: 0}
- , xScale = d3.scale.linear()
- , yScale = d3.scale.linear()
- , dispatch = d3.dispatch('elementMousemove', 'elementMouseout','elementDblclick')
- , showGuideLine = true
- , svgContainer = null
- //Must pass in the bounding chart's <svg> container.
- //The mousemove event is attached to this container.
- ;
-
- //Private variables
- var isMSIE = navigator.userAgent.indexOf("MSIE") !== -1 //Check user-agent for Microsoft Internet Explorer.
- ;
-
-
- function layer(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || 960), availableHeight = (height || 400);
-
- var wrap = container.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([data]);
- var wrapEnter = wrap.enter()
- .append("g").attr("class", " nv-wrap nv-interactiveLineLayer");
-
-
- wrapEnter.append("g").attr("class","nv-interactiveGuideLine");
-
- if (!svgContainer) {
- return;
- }
-
- function mouseHandler() {
- var d3mouse = d3.mouse(this);
- var mouseX = d3mouse[0];
- var mouseY = d3mouse[1];
- var subtractMargin = true;
- var mouseOutAnyReason = false;
- if (isMSIE) {
- /*
- D3.js (or maybe SVG.getScreenCTM) has a nasty bug in Internet Explorer 10.
- d3.mouse() returns incorrect X,Y mouse coordinates when mouse moving
- over a rect in IE 10.
- However, d3.event.offsetX/Y also returns the mouse coordinates
- relative to the triggering <rect>. So we use offsetX/Y on IE.
- */
- mouseX = d3.event.offsetX;
- mouseY = d3.event.offsetY;
-
- /*
- On IE, if you attach a mouse event listener to the <svg> container,
- it will actually trigger it for all the child elements (like <path>, <circle>, etc).
- When this happens on IE, the offsetX/Y is set to where ever the child element
- is located.
- As a result, we do NOT need to subtract margins to figure out the mouse X/Y
- position under this scenario. Removing the line below *will* cause
- the interactive layer to not work right on IE.
- */
- if(d3.event.target.tagName !== "svg")
- subtractMargin = false;
-
- if (d3.event.target.className.baseVal.match("nv-legend"))
- mouseOutAnyReason = true;
-
- }
-
- if(subtractMargin) {
- mouseX -= margin.left;
- mouseY -= margin.top;
- }
-
- /* If mouseX/Y is outside of the chart's bounds,
- trigger a mouseOut event.
- */
- if (mouseX < 0 || mouseY < 0
- || mouseX > availableWidth || mouseY > availableHeight
- || (d3.event.relatedTarget && d3.event.relatedTarget.ownerSVGElement === undefined)
- || mouseOutAnyReason
- )
- {
- if (isMSIE) {
- if (d3.event.relatedTarget
- && d3.event.relatedTarget.ownerSVGElement === undefined
- && d3.event.relatedTarget.className.match(tooltip.nvPointerEventsClass)) {
- return;
- }
- }
- dispatch.elementMouseout({
- mouseX: mouseX,
- mouseY: mouseY
- });
- layer.renderGuideLine(null); //hide the guideline
- return;
- }
-
- var pointXValue = xScale.invert(mouseX);
- dispatch.elementMousemove({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
-
- //If user double clicks the layer, fire a elementDblclick dispatch.
- if (d3.event.type === "dblclick") {
- dispatch.elementDblclick({
- mouseX: mouseX,
- mouseY: mouseY,
- pointXValue: pointXValue
- });
- }
- }
-
- svgContainer
- .on("mousemove",mouseHandler, true)
- .on("mouseout" ,mouseHandler,true)
- .on("dblclick" ,mouseHandler)
- ;
-
- //Draws a vertical guideline at the given X postion.
- layer.renderGuideLine = function(x) {
- if (!showGuideLine) return;
- var line = wrap.select(".nv-interactiveGuideLine")
- .selectAll("line")
- .data((x != null) ? [nv.utils.NaNtoZero(x)] : [], String);
-
- line.enter()
- .append("line")
- .attr("class", "nv-guideline")
- .attr("x1", function(d) { return d;})
- .attr("x2", function(d) { return d;})
- .attr("y1", availableHeight)
- .attr("y2",0)
- ;
- line.exit().remove();
-
- }
- });
- }
-
- layer.dispatch = dispatch;
- layer.tooltip = tooltip;
-
- layer.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return layer;
- };
-
- layer.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return layer;
- };
-
- layer.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return layer;
- };
-
- layer.xScale = function(_) {
- if (!arguments.length) return xScale;
- xScale = _;
- return layer;
- };
-
- layer.showGuideLine = function(_) {
- if (!arguments.length) return showGuideLine;
- showGuideLine = _;
- return layer;
- };
-
- layer.svgContainer = function(_) {
- if (!arguments.length) return svgContainer;
- svgContainer = _;
- return layer;
- };
-
-
- return layer;
-};
-
-/* Utility class that uses d3.bisect to find the index in a given array, where a search value can be inserted.
-This is different from normal bisectLeft; this function finds the nearest index to insert the search value.
-
-For instance, lets say your array is [1,2,3,5,10,30], and you search for 28.
-Normal d3.bisectLeft will return 4, because 28 is inserted after the number 10. But interactiveBisect will return 5
-because 28 is closer to 30 than 10.
-
-Unit tests can be found in: interactiveBisectTest.html
-
-Has the following known issues:
- * Will not work if the data points move backwards (ie, 10,9,8,7, etc) or if the data points are in random order.
- * Won't work if there are duplicate x coordinate values.
-*/
-nv.interactiveBisect = function (values, searchVal, xAccessor) {
- "use strict";
- if (! values instanceof Array) return null;
- if (typeof xAccessor !== 'function') xAccessor = function(d,i) { return d.x;}
-
- var bisect = d3.bisector(xAccessor).left;
- var index = d3.max([0, bisect(values,searchVal) - 1]);
- var currentValue = xAccessor(values[index], index);
- if (typeof currentValue === 'undefined') currentValue = index;
-
- if (currentValue === searchVal) return index; //found exact match
-
- var nextIndex = d3.min([index+1, values.length - 1]);
- var nextValue = xAccessor(values[nextIndex], nextIndex);
- if (typeof nextValue === 'undefined') nextValue = nextIndex;
-
- if (Math.abs(nextValue - searchVal) >= Math.abs(currentValue - searchVal))
- return index;
- else
- return nextIndex
-};
-
-/*
-Returns the index in the array "values" that is closest to searchVal.
-Only returns an index if searchVal is within some "threshold".
-Otherwise, returns null.
-*/
-nv.nearestValueIndex = function (values, searchVal, threshold) {
- "use strict";
- var yDistMax = Infinity, indexToHighlight = null;
- values.forEach(function(d,i) {
- var delta = Math.abs(searchVal - d);
- if ( delta <= yDistMax && delta < threshold) {
- yDistMax = delta;
- indexToHighlight = i;
- }
- });
- return indexToHighlight;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/intro.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/intro.js
deleted file mode 100644
index af50383e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/intro.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis-min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis-min.js
deleted file mode 100644
index 1101dde5..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis-min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){function o(d){return d.each(function(d){var o=d3.select(this),p=o.selectAll("g.nv-wrap.nv-axis").data([d]),q=p.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");q.append("g");var s=p.select("g");null!==m?a.ticks(m):("top"==a.orient()||"bottom"==a.orient())&&a.ticks(Math.abs(e.range()[1]-e.range()[0])/100),d3.transition(s).call(a),n=n||a.scale();var t=a.tickFormat();null==t&&(t=n.tickFormat());var u=s.selectAll("text.nv-axislabel").data([f||null]);switch(u.exit().remove(),a.orient()){case"top":u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",0);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+e(a)+",0)"}).select("text").attr("dy","0em").attr("y",-a.tickPadding()).attr("text-anchor","middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate("+e.range()[b]+",0)"})}break;case"bottom":var x=36,y=30,z=s.selectAll("g").select("text");if(i%360){z.each(function(){var c=this.getBBox().width;c>y&&(y=c)});var A=Math.abs(Math.sin(i*Math.PI/180)),x=(A?A*y:y)+30;z.attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i%360>0?"start":"end")}u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor","middle").attr("y",x);var v=2==e.range().length?e.range()[1]:e.range()[e.range().length-1]+(e.range()[1]-e.range()[0]);if(u.attr("x",v/2),g){var w=p.selectAll("g.nv-axisMaxMin").data([e.domain()[0],e.domain()[e.domain().length-1]]);w.enter().append("g").attr("class","nv-axisMaxMin").append("text"),w.exit().remove(),w.attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",a.tickPadding()).attr("transform",function(){return"rotate("+i+" 0,0)"}).attr("text-anchor",i?i%360>0?"start":"end":"middle").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a){return"translate("+(e(a)+(l?e.rangeBand()/2:0))+",0)"})}k&&z.attr("transform",function(a,b){return"translate(0,"+(0==b%2?"0":"12")+")"});break;case"right":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(90)":"").attr("y",j?-Math.max(b.right,c)+30:-10),u.attr("x",j?e.range()[0]/2:a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}break;case"left":if(u.enter().append("text").attr("class","nv-axislabel").attr("text-anchor",j?"middle":"begin").attr("transform",j?"rotate(-90)":"").attr("y",j?-Math.max(b.left,c)+0:-10),u.attr("x",j?-e.range()[0]/2:-a.tickPadding()),g){var w=p.selectAll("g.nv-axisMaxMin").data(e.domain());w.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0),w.exit().remove(),w.attr("transform",function(a){return"translate(0,"+e(a)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-a.tickPadding()).attr("text-anchor","start").text(function(a){var c=t(a);return(""+c).match("NaN")?"":c}),d3.transition(w).attr("transform",function(a,b){return"translate(0,"+e.range()[b]+")"}).select("text").style("opacity",1)}}if(u.text(function(a){return a}),!g||"left"!==a.orient()&&"right"!==a.orient()||(s.selectAll("g").each(function(a){d3.select(this).select("text").attr("opacity",1),(e(a)<e.range()[1]+10||e(a)>e.range()[0]-10)&&((a>1e-10||-1e-10>a)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0))}),e.domain()[0]==e.domain()[1]&&0==e.domain()[0]&&p.selectAll("g.nv-axisMaxMin").style("opacity",function(a,b){return b?0:1})),g&&("top"===a.orient()||"bottom"===a.orient())){var B=[];p.selectAll("g.nv-axisMaxMin").each(function(a,b){try{b?B.push(e(a)-this.getBBox().width-4):B.push(e(a)+this.getBBox().width+4)}catch(c){b?B.push(e(a)-4):B.push(e(a)+4)}}),s.selectAll("g").each(function(a){(e(a)<B[0]||e(a)>B[1])&&(a>1e-10||-1e-10>a?d3.select(this).remove():d3.select(this).select("text").remove())})}h&&s.selectAll("line.tick").filter(function(a){return!parseFloat(Math.round(1e5*a)/1e6)}).classed("zero",!0),n=e.copy()}),o}var a=d3.svg.axis(),b={top:0,right:0,bottom:0,left:0},c=75,d=60,e=d3.scale.linear(),f=null,g=!1,h=!0,i=0,j=!0,k=!1,l=!1,m=null;a.scale(e).orient("bottom").tickFormat(function(a){return a});var n;return o.axis=a,d3.rebind(o,a,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"),d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o.margin=function(a){return arguments.length?(b.top=a.top!==void 0?a.top:b.top,b.right=a.right!==void 0?a.right:b.right,b.bottom=a.bottom!==void 0?a.bottom:b.bottom,b.left=a.left!==void 0?a.left:b.left,o):b},o.width=function(a){return arguments.length?(c=a,o):c},o.ticks=function(a){return arguments.length?(m=a,o):m},o.height=function(a){return arguments.length?(d=a,o):d},o.axisLabel=function(a){return arguments.length?(f=a,o):f},o.showMaxMin=function(a){return arguments.length?(g=a,o):g},o.highlightZero=function(a){return arguments.length?(h=a,o):h},o.scale=function(b){return arguments.length?(e=b,a.scale(e),l="function"==typeof e.rangeBands,d3.rebind(o,e,"domain","range","rangeBand","rangeBands"),o):e},o.rotateYLabel=function(a){return arguments.length?(j=a,o):j},o.rotateLabels=function(a){return arguments.length?(i=a,o):i},o.staggerLabels=function(a){return arguments.length?(k=a,o):k},o}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.js
deleted file mode 100644
index 9895c3f0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.js
+++ /dev/null
@@ -1,470 +0,0 @@
-nv.models.axis = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var axis = d3.svg.axis()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 75 //only used for tickLabel currently
- , height = 60 //only used for tickLabel currently
- , scale = d3.scale.linear()
- , axisLabelText = null
- , showMaxMin = true //TODO: showMaxMin should be disabled on all ordinal scaled axes
- , highlightZero = true
- , rotateLabels = 0
- , rotateYLabel = true
- , staggerLabels = false
- , isOrdinal = false
- , ticks = null
- , logScale = false
- , axisLabelDistance = 12 //The larger this number is, the closer the axis label is to the axis.
- ;
-
- axis
- .scale(scale)
- .orient('bottom')
- .tickFormat(function(d) { return d })
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-axis').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-axis');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- //------------------------------------------------------------
-
-
- if (ticks !== null)
- axis.ticks(ticks);
- else if (axis.orient() == 'top' || axis.orient() == 'bottom')
- axis.ticks(Math.abs(scale.range()[1] - scale.range()[0]) / 100);
-
-
- //TODO: consider calculating width/height based on whether or not label is added, for reference in charts using this component
-
-
- g.transition().call(axis);
-
- scale0 = scale0 || axis.scale();
-
- var fmt = axis.tickFormat();
- if (fmt == null) {
- fmt = scale0.tickFormat();
- }
-
- var axisLabel = g.selectAll('text.nv-axislabel')
- .data([axisLabelText || null]);
- axisLabel.exit().remove();
- switch (axis.orient()) {
- case 'top':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', 0)
- .attr('x', w/2);
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + scale(d) + ',0)'
- })
- .select('text')
- .attr('dy', '0em')
- .attr('y', -axis.tickPadding())
- .attr('text-anchor', 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + scale.range()[i] + ',0)'
- });
- }
- break;
- case 'bottom':
- var xLabelMargin = 36;
- var maxTextWidth = 30;
- var xTicks = g.selectAll('g').select("text");
- if (rotateLabels%360) {
- //Calculate the longest xTick width
- xTicks.each(function(d,i){
- var width = this.getBBox().width;
- if(width > maxTextWidth) maxTextWidth = width;
- });
- //Convert to radians before calculating sin. Add 30 to margin for healthy padding.
- var sin = Math.abs(Math.sin(rotateLabels*Math.PI/180));
- var xLabelMargin = (sin ? sin*maxTextWidth : maxTextWidth)+30;
- //Rotate all xTicks
- xTicks
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels%360 > 0 ? 'start' : 'end');
- }
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- var w = (scale.range().length==2) ? scale.range()[1] : (scale.range()[scale.range().length-1]+(scale.range()[1]-scale.range()[0]));
- axisLabel
- .attr('text-anchor', 'middle')
- .attr('y', xLabelMargin)
- .attr('x', w/2);
- if (showMaxMin) {
- //if (showMaxMin && !isOrdinal) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- //.data(scale.domain())
- .data([scale.domain()[0], scale.domain()[scale.domain().length - 1]]);
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text');
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- })
- .select('text')
- .attr('dy', '.71em')
- .attr('y', axis.tickPadding())
- .attr('transform', function(d,i,j) { return 'rotate(' + rotateLabels + ' 0,0)' })
- .style('text-anchor', rotateLabels ? (rotateLabels%360 > 0 ? 'start' : 'end') : 'middle')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- //return 'translate(' + scale.range()[i] + ',0)'
- //return 'translate(' + scale(d) + ',0)'
- return 'translate(' + (scale(d) + (isOrdinal ? scale.rangeBand() / 2 : 0)) + ',0)'
- });
- }
- if (staggerLabels)
- xTicks
- .attr('transform', function(d,i) { return 'translate(0,' + (i % 2 == 0 ? '0' : '12') + ')' });
-
- break;
- case 'right':
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'begin')
- .attr('transform', rotateYLabel ? 'rotate(90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.right,width) + 12) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (scale.range()[0] / 2) : axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', axis.tickPadding())
- .style('text-anchor', 'start')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- case 'left':
- /*
- //For dynamically placing the label. Can be used with dynamically-sized chart axis margins
- var yTicks = g.selectAll('g').select("text");
- yTicks.each(function(d,i){
- var labelPadding = this.getBBox().width + axis.tickPadding() + 16;
- if(labelPadding > width) width = labelPadding;
- });
- */
- axisLabel.enter().append('text').attr('class', 'nv-axislabel');
- axisLabel
- .style('text-anchor', rotateYLabel ? 'middle' : 'end')
- .attr('transform', rotateYLabel ? 'rotate(-90)' : '')
- .attr('y', rotateYLabel ? (-Math.max(margin.left,width) + axisLabelDistance) : -10) //TODO: consider calculating this based on largest tick width... OR at least expose this on chart
- .attr('x', rotateYLabel ? (-scale.range()[0] / 2) : -axis.tickPadding());
- if (showMaxMin) {
- var axisMaxMin = wrap.selectAll('g.nv-axisMaxMin')
- .data(scale.domain());
- axisMaxMin.enter().append('g').attr('class', 'nv-axisMaxMin').append('text')
- .style('opacity', 0);
- axisMaxMin.exit().remove();
- axisMaxMin
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale0(d) + ')'
- })
- .select('text')
- .attr('dy', '.32em')
- .attr('y', 0)
- .attr('x', -axis.tickPadding())
- .attr('text-anchor', 'end')
- .text(function(d,i) {
- //var v = fmt(d);
- var v = d;
- if(logScale) {
- v = Math.pow(10,v);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else
- v = fmt(v);
- return ('' + v).match('NaN') ? '' : v;
- });
- axisMaxMin.transition()
- .attr('transform', function(d,i) {
- return 'translate(0,' + scale.range()[i] + ')'
- })
- .select('text')
- .style('opacity', 1);
- }
- break;
- }
- axisLabel
- .text(function(d) { return d });
-
-
- if (showMaxMin && (axis.orient() === 'left' || axis.orient() === 'right')) {
- //check if max and min overlap other values, if so, hide the values that overlap
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- d3.select(this).select('text').attr('opacity', 1);
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- v = fmt(v);
- //fmt = d3.format(',.2f');
- //v = fmt(v);
- } else {
- v = fmt(d);
- }
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
- if (scale(d) < scale.range()[1] + 10 || scale(d) > scale.range()[0] - 10) { // 10 is assuming text height is 16... if d is 0, leave it!
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).attr('opacity', 0);
-
- d3.select(this).select('text').attr('opacity', 0); // Don't remove the ZERO line!!
- }
- });
-
- //if Max and Min = 0 only show min, Issue #281
- if (scale.domain()[0] == scale.domain()[1] && scale.domain()[0] == 0)
- wrap.selectAll('g.nv-axisMaxMin')
- .style('opacity', function(d,i) { return !i ? 1 : 0 });
-
- }
-
- if (showMaxMin && (axis.orient() === 'top' || axis.orient() === 'bottom')) {
- var maxMinRange = [];
- wrap.selectAll('g.nv-axisMaxMin')
- .each(function(d,i) {
- try {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - this.getBBox().width - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + this.getBBox().width + 4)
- }catch (err) {
- if (i) // i== 1, max position
- maxMinRange.push(scale(d) - 4) //assuming the max and min labels are as wide as the next tick (with an extra 4 pixels just in case)
- else // i==0, min position
- maxMinRange.push(scale(d) + 4)
- }
- });
- g.selectAll('g') // the g's wrapping each tick
- .each(function(d,i) {
- var v;
- if(logScale) {
- v = Math.pow(10,d);
- //v = fmt(v);
- //fmt = d3.format(',.2f');
- v = fmt(v);
- } else {
- v = fmt(d);
- }
- //alert(v);
-
- //d3.select(this).select('text').text(fmt(Math.pow(10,d)));
- d3.select(this).select('text').text(v);
-
- if (scale(d) < maxMinRange[0] || scale(d) > maxMinRange[1]) {
- if (d > 1e-10 || d < -1e-10) // accounts for minor floating point errors... though could be problematic if the scale is EXTREMELY SMALL
- d3.select(this).remove();
- else
- d3.select(this).select('text').remove(); // Don't remove the ZERO line!!
- }
- });
- }
-
-
- //highlight zero line ... Maybe should not be an option and should just be in CSS?
- if (highlightZero)
- g.selectAll('.tick')
- .filter(function(d) { return !parseFloat(Math.round(d.__data__*100000)/1000000) && (d.__data__ !== undefined) }) //this is because sometimes the 0 tick is a very small fraction, TODO: think of cleaner technique
- .classed('zero', true);
-
- //store old scales for use in transitions on update
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.axis = axis;
-
- d3.rebind(chart, axis, 'orient', 'tickValues', 'tickSubdivide', 'tickSize', 'tickPadding', 'tickFormat');
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands'); //these are also accessible by chart.scale(), but added common ones directly for ease of use
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if(!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- }
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.ticks = function(_) {
- if (!arguments.length) return ticks;
- ticks = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.axisLabel = function(_) {
- if (!arguments.length) return axisLabelText;
- axisLabelText = _;
- return chart;
- }
-
- chart.showMaxMin = function(_) {
- if (!arguments.length) return showMaxMin;
- showMaxMin = _;
- return chart;
- }
-
- chart.logScale = function(_) {
- if (!arguments.length) return logScale;
- logScale = _;
- return chart;
- }
-
- chart.highlightZero = function(_) {
- if (!arguments.length) return highlightZero;
- highlightZero = _;
- return chart;
- }
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- axis.scale(scale);
- isOrdinal = typeof scale.rangeBands === 'function';
- d3.rebind(chart, scale, 'domain', 'range', 'rangeBand', 'rangeBands');
- return chart;
- }
-
- chart.rotateYLabel = function(_) {
- if(!arguments.length) return rotateYLabel;
- rotateYLabel = _;
- return chart;
- }
-
- chart.rotateLabels = function(_) {
- if(!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.axisLabelDistance = function(_) {
- if (!arguments.length) return axisLabelDistance;
- axisLabelDistance = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.min.js
deleted file mode 100644
index 6c8ad6ab..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/axis.min.js
+++ /dev/null
@@ -1 +0,0 @@
-nv.models.axis=function(){"use strict";function m(r){r.each(function(r){var m=d3.select(this);var g=m.selectAll("g.nv-wrap.nv-axis").data([r]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(h!==null)e.ticks(h);else if(e.orient()=="top"||e.orient()=="bottom")e.ticks(Math.abs(i.range()[1]-i.range()[0])/100);w.transition().call(e);v=v||e.scale();var E=e.tickFormat();if(E==null){E=v.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([s||null]);S.exit().remove();switch(e.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+i(e)+",0)"}).select("text").attr("dy","0em").attr("y",-e.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+i.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(a%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(a*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=i.range().length==2?i.range()[1]:i.range()[i.range().length-1]+(i.range()[1]-i.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(o){var T=g.selectAll("g.nv-axisMaxMin").data([i.domain()[0],i.domain()[i.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",e.tickPadding()).attr("transform",function(e,t,n){return"rotate("+a+" 0,0)"}).style("text-anchor",a?a%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(i(e)+(c?i.rangeBand()/2:0))+",0)"})}if(l)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"begin").attr("transform",f?"rotate(90)":"").attr("y",f?-Math.max(t.right,n)+12:-10).attr("x",f?i.range()[0]/2:e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+i(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",e.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",f?"middle":"end").attr("transform",f?"rotate(-90)":"").attr("y",f?-Math.max(t.left,n)+d:-10).attr("x",f?-i.range()[0]/2:-e.tickPadding());if(o){var T=g.selectAll("g.nv-axisMaxMin").data(i.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+v(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-e.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(p){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+i.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(o&&(e.orient()==="left"||e.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<i.range()[1]+10||i(e)>i.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(i.domain()[0]==i.domain()[1]&&i.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(o&&(e.orient()==="top"||e.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(i(e)-this.getBBox().width-4);else A.push(i(e)+this.getBBox().width+4)}catch(n){if(t)A.push(i(e)-4);else A.push(i(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(p){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(i(e)<A[0]||i(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(u)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);v=i.copy()});return m}var e=d3.svg.axis();var t={top:0,right:0,bottom:0,left:0},n=75,r=60,i=d3.scale.linear(),s=null,o=true,u=true,a=0,f=true,l=false,c=false,h=null,p=false,d=12;e.scale(i).orient("bottom").tickFormat(function(e){return e});var v;m.axis=e;d3.rebind(m,e,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(m,i,"domain","range","rangeBand","rangeBands");m.options=nv.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.width=function(e){if(!arguments.length)return n;n=e;return m};m.ticks=function(e){if(!arguments.length)return h;h=e;return m};m.height=function(e){if(!arguments.length)return r;r=e;return m};m.axisLabel=function(e){if(!arguments.length)return s;s=e;return m};m.showMaxMin=function(e){if(!arguments.length)return o;o=e;return m};m.logScale=function(e){if(!arguments.length)return p;p=e;return m};m.highlightZero=function(e){if(!arguments.length)return u;u=e;return m};m.scale=function(t){if(!arguments.length)return i;i=t;e.scale(i);c=typeof i.rangeBands==="function";d3.rebind(m,i,"domain","range","rangeBand","rangeBands");return m};m.rotateYLabel=function(e){if(!arguments.length)return f;f=e;return m};m.rotateLabels=function(e){if(!arguments.length)return a;a=e;return m};m.staggerLabels=function(e){if(!arguments.length)return l;l=e;return m};m.axisLabelDistance=function(e){if(!arguments.length)return d;d=e;return m};return m} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/boilerplate.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/boilerplate.js
deleted file mode 100644
index 3d2360a6..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/boilerplate.js
+++ /dev/null
@@ -1,104 +0,0 @@
-
-nv.models.chartName = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , dispatch = d3.dispatch('stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-chartName').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-chartName');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-mainWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bullet.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bullet.js
deleted file mode 100644
index 9b9bf4d1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bullet.js
+++ /dev/null
@@ -1,385 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-
-nv.models.bullet = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , orient = 'left' // TODO top & bottom
- , reverse = false
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , rangeLabels = function(d) { return d.rangeLabels ? d.rangeLabels : [] }
- , markerLabels = function(d) { return d.markerLabels ? d.markerLabels : [] }
- , measureLabels = function(d) { return d.measureLabels ? d.measureLabels : [] }
- , forceX = [0] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , width = 380
- , height = 30
- , tickFormat = null
- , color = nv.utils.getColor(['#1f77b4'])
- , dispatch = d3.dispatch('elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending),
- rangeLabelz = rangeLabels.call(this, d, i).slice(),
- markerLabelz = markerLabels.call(this, d, i).slice(),
- measureLabelz = measureLabels.call(this, d, i).slice();
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain( d3.extent(d3.merge([forceX, rangez])) )
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
-
- var rangeMin = d3.min(rangez), //rangez[2]
- rangeMax = d3.max(rangez), //rangez[0]
- rangeAvg = rangez[1];
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bullet').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bullet');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMax');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeAvg');
- gEnter.append('rect').attr('class', 'nv-range nv-rangeMin');
- gEnter.append('rect').attr('class', 'nv-measure');
- gEnter.append('path').attr('class', 'nv-markerTriangle');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
- var xp0 = function(d) { return d < 0 ? x0(d) : x0(0) },
- xp1 = function(d) { return d < 0 ? x1(d) : x1(0) };
-
-
- g.select('rect.nv-rangeMax')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax > 0 ? rangeMax : rangeMin))
- .attr('x', xp1(rangeMax > 0 ? rangeMax : rangeMin))
- .datum(rangeMax > 0 ? rangeMax : rangeMin)
- /*
- .attr('x', rangeMin < 0 ?
- rangeMax > 0 ?
- x1(rangeMin)
- : x1(rangeMax)
- : x1(0))
- */
-
- g.select('rect.nv-rangeAvg')
- .attr('height', availableHeight)
- .attr('width', w1(rangeAvg))
- .attr('x', xp1(rangeAvg))
- .datum(rangeAvg)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeMax) - x1(rangeAvg)
- : x1(rangeAvg) - x1(rangeMin))
- .attr('x', rangeMax <= 0 ?
- x1(rangeAvg)
- : x1(rangeMin))
- */
-
- g.select('rect.nv-rangeMin')
- .attr('height', availableHeight)
- .attr('width', w1(rangeMax))
- .attr('x', xp1(rangeMax))
- .attr('width', w1(rangeMax > 0 ? rangeMin : rangeMax))
- .attr('x', xp1(rangeMax > 0 ? rangeMin : rangeMax))
- .datum(rangeMax > 0 ? rangeMin : rangeMax)
- /*
- .attr('width', rangeMax <= 0 ?
- x1(rangeAvg) - x1(rangeMin)
- : x1(rangeMax) - x1(rangeAvg))
- .attr('x', rangeMax <= 0 ?
- x1(rangeMin)
- : x1(rangeAvg))
- */
-
- g.select('rect.nv-measure')
- .style('fill', color)
- .attr('height', availableHeight / 3)
- .attr('y', availableHeight / 3)
- .attr('width', measurez < 0 ?
- x1(0) - x1(measurez[0])
- : x1(measurez[0]) - x1(0))
- .attr('x', xp1(measurez))
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: measurez[0],
- label: measureLabelz[0] || 'Current',
- pos: [x1(measurez[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: measurez[0],
- label: measureLabelz[0] || 'Current'
- })
- })
-
- var h3 = availableHeight / 6;
- if (markerz[0]) {
- g.selectAll('path.nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x1(markerz[0]) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function() {
- dispatch.elementMouseover({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous',
- pos: [x1(markerz[0]), availableHeight/2]
- })
- })
- .on('mouseout', function() {
- dispatch.elementMouseout({
- value: markerz[0],
- label: markerLabelz[0] || 'Previous'
- })
- });
- } else {
- g.selectAll('path.nv-markerTriangle').remove();
- }
-
-
- wrap.selectAll('.nv-range')
- .on('mouseover', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseover({
- value: d,
- label: label,
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- var label = rangeLabelz[i] || (!i ? "Maximum" : i == 1 ? "Mean" : "Minimum");
-
- dispatch.elementMouseout({
- value: d,
- label: label
- })
- })
-
-/* // THIS IS THE PREVIOUS BULLET IMPLEMENTATION, WILL REMOVE SHORTLY
- // Update the range rects.
- var range = g.selectAll('rect.nv-range')
- .data(rangez);
-
- range.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-range nv-s' + i; })
- .attr('width', w0)
- .attr('height', availableHeight)
- .attr('x', reverse ? x0 : 0)
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: (i <= 0) ? 'Maximum' : (i > 1) ? 'Minimum' : 'Mean', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: (i <= 0) ? 'Minimum' : (i >=1) ? 'Maximum' : 'Mean' //TODO: make these labels a variable
- })
- })
-
- d3.transition(range)
- .attr('x', reverse ? x1 : 0)
- .attr('width', w1)
- .attr('height', availableHeight);
-
-
- // Update the measure rects.
- var measure = g.selectAll('rect.nv-measure')
- .data(measurez);
-
- measure.enter().append('rect')
- .attr('class', function(d, i) { return 'nv-measure nv-s' + i; })
- .style('fill', function(d,i) { return color(d,i ) })
- .attr('width', w0)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x0 : 0)
- .attr('y', availableHeight / 3)
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- value: d,
- label: 'Current', //TODO: make these labels a variable
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- value: d,
- label: 'Current' //TODO: make these labels a variable
- })
- })
-
- d3.transition(measure)
- .attr('width', w1)
- .attr('height', availableHeight / 3)
- .attr('x', reverse ? x1 : 0)
- .attr('y', availableHeight / 3);
-
-
-
- // Update the marker lines.
- var marker = g.selectAll('path.nv-markerTriangle')
- .data(markerz);
-
- var h3 = availableHeight / 6;
- marker.enter().append('path')
- .attr('class', 'nv-markerTriangle')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',' + (availableHeight / 2) + ')' })
- .attr('d', 'M0,' + h3 + 'L' + h3 + ',' + (-h3) + ' ' + (-h3) + ',' + (-h3) + 'Z')
- .on('mouseover', function(d,i) {
- dispatch.elementMouseover({
- value: d,
- label: 'Previous',
- pos: [x1(d), availableHeight/2]
- })
- })
- .on('mouseout', function(d,i) {
- dispatch.elementMouseout({
- value: d,
- label: 'Previous'
- })
- });
-
- d3.transition(marker)
- .attr('transform', function(d) { return 'translate(' + (x1(d) - x1(0)) + ',' + (availableHeight / 2) + ')' });
-
- marker.exit().remove();
-*/
-
- });
-
- // d3.timer.flush(); // Not needed?
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(_) {
- if (!arguments.length) return orient;
- orient = _;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(_) {
- if (!arguments.length) return ranges;
- ranges = _;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(_) {
- if (!arguments.length) return markers;
- markers = _;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(_) {
- if (!arguments.length) return measures;
- measures = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(_) {
- if (!arguments.length) return tickFormat;
- tickFormat = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bulletChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bulletChart.js
deleted file mode 100644
index fa5bd596..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/bulletChart.js
+++ /dev/null
@@ -1,343 +0,0 @@
-
-// Chart design based on the recommendations of Stephen Few. Implementation
-// based on the work of Clint Ivy, Jamie Love, and Jason Davies.
-// http://projects.instantcognition.com/protovis/bulletchart/
-nv.models.bulletChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bullet = nv.models.bullet()
- ;
-
- var orient = 'left' // TODO top & bottom
- , reverse = false
- , margin = {top: 5, right: 40, bottom: 20, left: 120}
- , ranges = function(d) { return d.ranges }
- , markers = function(d) { return d.markers }
- , measures = function(d) { return d.measures }
- , width = null
- , height = 55
- , tickFormat = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ) + margin.left,
- top = e.pos[1] + ( offsetElement.offsetTop || 0) + margin.top,
- content = tooltip(e.key, e.label, e.value, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(d, i) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- that = this;
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!d || !ranges.call(this, d, i)) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', 18 + margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var rangez = ranges.call(this, d, i).slice().sort(d3.descending),
- markerz = markers.call(this, d, i).slice().sort(d3.descending),
- measurez = measures.call(this, d, i).slice().sort(d3.descending);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-bulletChart').data([d]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-bulletChart');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bulletWrap');
- gEnter.append('g').attr('class', 'nv-titles');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- // Compute the new x-scale.
- var x1 = d3.scale.linear()
- .domain([0, Math.max(rangez[0], markerz[0], measurez[0])]) // TODO: need to allow forceX and forceY, and xDomain, yDomain
- .range(reverse ? [availableWidth, 0] : [0, availableWidth]);
-
- // Retrieve the old x-scale, if this is an update.
- var x0 = this.__chart__ || d3.scale.linear()
- .domain([0, Infinity])
- .range(x1.range());
-
- // Stash the new scale.
- this.__chart__ = x1;
-
- /*
- // Derive width-scales from the x-scales.
- var w0 = bulletWidth(x0),
- w1 = bulletWidth(x1);
-
- function bulletWidth(x) {
- var x0 = x(0);
- return function(d) {
- return Math.abs(x(d) - x(0));
- };
- }
-
- function bulletTranslate(x) {
- return function(d) {
- return 'translate(' + x(d) + ',0)';
- };
- }
- */
-
- var w0 = function(d) { return Math.abs(x0(d) - x0(0)) }, // TODO: could optimize by precalculating x0(0) and x1(0)
- w1 = function(d) { return Math.abs(x1(d) - x1(0)) };
-
-
- var title = gEnter.select('.nv-titles').append('g')
- .attr('text-anchor', 'end')
- .attr('transform', 'translate(-6,' + (height - margin.top - margin.bottom) / 2 + ')');
- title.append('text')
- .attr('class', 'nv-title')
- .text(function(d) { return d.title; });
-
- title.append('text')
- .attr('class', 'nv-subtitle')
- .attr('dy', '1em')
- .text(function(d) { return d.subtitle; });
-
-
-
- bullet
- .width(availableWidth)
- .height(availableHeight)
-
- var bulletWrap = g.select('.nv-bulletWrap');
-
- d3.transition(bulletWrap).call(bullet);
-
-
-
- // Compute the tick format.
- var format = tickFormat || x1.tickFormat( availableWidth / 100 );
-
- // Update the tick groups.
- var tick = g.selectAll('g.nv-tick')
- .data(x1.ticks( availableWidth / 50 ), function(d) {
- return this.textContent || format(d);
- });
-
- // Initialize the ticks with the old scale, x0.
- var tickEnter = tick.enter().append('g')
- .attr('class', 'nv-tick')
- .attr('transform', function(d) { return 'translate(' + x0(d) + ',0)' })
- .style('opacity', 1e-6);
-
- tickEnter.append('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickEnter.append('text')
- .attr('text-anchor', 'middle')
- .attr('dy', '1em')
- .attr('y', availableHeight * 7 / 6)
- .text(format);
-
-
- // Transition the updating ticks to the new scale, x1.
- var tickUpdate = d3.transition(tick)
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1);
-
- tickUpdate.select('line')
- .attr('y1', availableHeight)
- .attr('y2', availableHeight * 7 / 6);
-
- tickUpdate.select('text')
- .attr('y', availableHeight * 7 / 6);
-
- // Transition the exiting ticks to the new scale, x1.
- d3.transition(tick.exit())
- .attr('transform', function(d) { return 'translate(' + x1(d) + ',0)' })
- .style('opacity', 1e-6)
- .remove();
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- e.key = d.title;
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
- });
-
- d3.timer.flush();
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bullet.dispatch.on('elementMouseover.tooltip', function(e) {
- dispatch.tooltipShow(e);
- });
-
- bullet.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.bullet = bullet;
-
- d3.rebind(chart, bullet, 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- // left, right, top, bottom
- chart.orient = function(x) {
- if (!arguments.length) return orient;
- orient = x;
- reverse = orient == 'right' || orient == 'bottom';
- return chart;
- };
-
- // ranges (bad, satisfactory, good)
- chart.ranges = function(x) {
- if (!arguments.length) return ranges;
- ranges = x;
- return chart;
- };
-
- // markers (previous, goal)
- chart.markers = function(x) {
- if (!arguments.length) return markers;
- markers = x;
- return chart;
- };
-
- // measures (actual, forecast)
- chart.measures = function(x) {
- if (!arguments.length) return measures;
- measures = x;
- return chart;
- };
-
- chart.width = function(x) {
- if (!arguments.length) return width;
- width = x;
- return chart;
- };
-
- chart.height = function(x) {
- if (!arguments.length) return height;
- height = x;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.tickFormat = function(x) {
- if (!arguments.length) return tickFormat;
- tickFormat = x;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-};
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/cumulativeLineChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/cumulativeLineChart.js
deleted file mode 100644
index 00f193cf..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/cumulativeLineChart.js
+++ /dev/null
@@ -1,782 +0,0 @@
-
-nv.models.cumulativeLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 30, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , showControls = true
- , useInteractiveGuideline = false
- , rescaleY = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , id = lines.id()
- , state = { index: 0, rescaleY: rescaleY }
- , defaultState = null
- , noData = 'No Data Available.'
- , average = function(d) { return d.average }
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
- controls.updateState(false);
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var dx = d3.scale.linear()
- , index = {i: 0, x: 0}
- ;
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-/*
- //Moved to see if we can get better behavior to fix issue #315
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- d.x += d3.event.dx;
- d.i = Math.round(dx.invert(d.x));
-
- d3.select(this).attr('transform', 'translate(' + dx(d.i) + ',0)');
- chart.update();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
- chart.update();
- }
-*/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this).classed('nv-chart-' + id, true),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- var indexDrag = d3.behavior.drag()
- .on('dragstart', dragStart)
- .on('drag', dragMove)
- .on('dragend', dragEnd);
-
-
- function dragStart(d,i) {
- d3.select(chart.container)
- .style('cursor', 'ew-resize');
- }
-
- function dragMove(d,i) {
- index.x = d3.event.x;
- index.i = Math.round(dx.invert(index.x));
- updateZero();
- }
-
- function dragEnd(d,i) {
- d3.select(chart.container)
- .style('cursor', 'auto');
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
-
- if (!rescaleY) {
- var seriesDomains = data
- .filter(function(series) { return !series.disabled })
- .map(function(series,i) {
- var initialDomain = d3.extent(series.values, lines.y());
-
- //account for series being disabled when losing 95% or more
- if (initialDomain[0] < -.95) initialDomain[0] = -.95;
-
- return [
- (initialDomain[0] - initialDomain[1]) / (1 + initialDomain[1]),
- (initialDomain[1] - initialDomain[0]) / (1 + initialDomain[0])
- ];
- });
-
- var completeDomain = [
- d3.min(seriesDomains, function(d) { return d[0] }),
- d3.max(seriesDomains, function(d) { return d[1] })
- ]
-
- lines.yDomain(completeDomain);
- } else {
- lines.yDomain(null);
- }
-
-
- dx .domain([0, data[0].values.length - 1]) //Assumes all series have same length
- .range([0, availableWidth])
- .clamp(true);
-
- //------------------------------------------------------------
-
-
- var data = indexify(index.i, data);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
- var interactivePointerEvents = (useInteractiveGuideline) ? "none" : "all";
- var wrap = container.selectAll('g.nv-wrap.nv-cumulativeLine').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-cumulativeLine').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-interactive');
- gEnter.append('g').attr('class', 'nv-x nv-axis').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-background');
- gEnter.append('g').attr('class', 'nv-linesWrap').style("pointer-events",interactivePointerEvents);
- gEnter.append('g').attr('class', 'nv-avgLinesWrap').style("pointer-events","none");
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Re-scale y-axis', disabled: !rescaleY }
- ];
-
- controls.width(140).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- // Show error if series goes below 100%
- var tempDisabled = data.filter(function(d) { return d.tempDisabled });
-
- wrap.select('.tempDisabled').remove(); //clean-up and prevent duplicates
- if (tempDisabled.length) {
- wrap.append('text').attr('class', 'tempDisabled')
- .attr('x', availableWidth / 2)
- .attr('y', '-.71em')
- .style('text-anchor', 'end')
- .text(tempDisabled.map(function(d) { return d.key }).join(', ') + ' values cannot be calculated for this time period.');
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left,top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- gEnter.select('.nv-background')
- .append('rect');
-
- g.select('.nv-background rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- lines
- //.x(function(d) { return d.x })
- .y(function(d) { return d.display.y })
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].tempDisabled; }));
-
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled && !d.tempDisabled }));
-
- //d3.transition(linesWrap).call(lines);
- linesWrap.call(lines);
-
- /*Handle average lines [AN-612] ----------------------------*/
-
- //Store a series index number in the data array.
- data.forEach(function(d,i) {
- d.seriesIndex = i;
- });
-
- var avgLineData = data.filter(function(d) {
- return !d.disabled && !!average(d);
- });
-
- var avgLines = g.select(".nv-avgLinesWrap").selectAll("line")
- .data(avgLineData, function(d) { return d.key; });
-
- var getAvgLineY = function(d) {
- //If average lines go off the svg element, clamp them to the svg bounds.
- var yVal = y(average(d));
- if (yVal < 0) return 0;
- if (yVal > availableHeight) return availableHeight;
- return yVal;
- };
-
- avgLines.enter()
- .append('line')
- .style('stroke-width',2)
- .style('stroke-dasharray','10,10')
- .style('stroke',function (d,i) {
- return lines.color()(d,d.seriesIndex);
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines
- .style('stroke-opacity',function(d){
- //If average lines go offscreen, make them transparent
- var yVal = y(average(d));
- if (yVal < 0 || yVal > availableHeight) return 0;
- return 1;
- })
- .attr('x1',0)
- .attr('x2',availableWidth)
- .attr('y1', getAvgLineY)
- .attr('y2', getAvgLineY);
-
- avgLines.exit().remove();
-
- //Create index line -----------------------------------------
-
- var indexLine = linesWrap.selectAll('.nv-indexLine')
- .data([index]);
- indexLine.enter().append('rect').attr('class', 'nv-indexLine')
- .attr('width', 3)
- .attr('x', -2)
- .attr('fill', 'red')
- .attr('fill-opacity', .5)
- .style("pointer-events","all")
- .call(indexDrag)
-
- indexLine
- .attr('transform', function(d) { return 'translate(' + dx(d.i) + ',0)' })
- .attr('height', availableHeight)
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- //Suggest how many ticks based on the chart width and D3 should listen (70 is the optimal number for MM/DD/YY dates)
- .ticks( Math.min(data[0].values.length,availableWidth/70) )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
-
- function updateZero() {
- indexLine
- .data([index]);
-
- //When dragging the index line, turn off line transitions.
- // Then turn them back on when done dragging.
- var oldDuration = chart.transitionDuration();
- chart.transitionDuration(0);
- chart.update();
- chart.transitionDuration(oldDuration);
- }
-
- g.select('.nv-background rect')
- .on('click', function() {
- index.x = d3.mouse(this)[0];
- index.i = Math.round(dx.invert(index.x));
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- lines.dispatch.on('elementClick', function(e) {
- index.i = e.pointIndex;
- index.x = dx(index.i);
-
- // update state and send stateChange with new index
- state.index = index.i;
- dispatch.stateChange(state);
-
- updateZero();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
- rescaleY = !d.disabled;
-
- state.rescaleY = rescaleY;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
-
-
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
-
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex), pointIndex);
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
-
- if (typeof e.index !== 'undefined') {
- index.i = e.index;
- index.x = dx(index.i);
-
- state.index = e.index;
-
- indexLine
- .data([index]);
- }
-
-
- if (typeof e.rescaleY !== 'undefined') {
- rescaleY = e.rescaleY;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'xScale','yScale', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi','useVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.rescaleY = function(_) {
- if (!arguments.length) return rescaleY;
- rescaleY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.average = function(_) {
- if(!arguments.length) return average;
- average = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- /* Normalize the data according to an index point. */
- function indexify(idx, data) {
- return data.map(function(line, i) {
- if (!line.values) {
- return line;
- }
- var v = lines.y()(line.values[idx], idx);
-
- //TODO: implement check below, and disable series if series loses 100% or more cause divide by 0 issue
- if (v < -.95) {
- //if a series loses more than 100%, calculations fail.. anything close can cause major distortion (but is mathematically correct till it hits 100)
- line.tempDisabled = true;
- return line;
- }
-
- line.tempDisabled = false;
-
- line.values = line.values.map(function(point, pointIndex) {
- point.display = {'y': (lines.y()(point, pointIndex) - v) / (1 + v) };
- return point;
- })
-
- return line;
- })
- }
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBar.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBar.js
deleted file mode 100644
index a20f5829..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBar.js
+++ /dev/null
@@ -1,349 +0,0 @@
-//TODO: consider deprecating by adding necessary features to multiBar model
-nv.models.discreteBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , showValues = false
- , valueFormat = d3.format(',.2f')
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , rectClass = 'discreteBar'
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], .1);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y }).concat(forceY)));
-
-
- // If showValues, pad the Y axis range to account for label height
- if (showValues) y.range(yRange || [availableHeight - (y.domain()[0] < 0 ? 12 : 0), y.domain()[1] > 0 ? 12 : 0]);
- else y.range(yRange || [availableHeight, 0]);
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y.copy().range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discretebar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discretebar');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- //TODO: by definition, the discrete bar should not have multiple groups, will modify/remove later
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + (x(getX(d,i)) + x.rangeBand() * .05 ) + ', ' + y(0) + ')'
- })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (d.series + .5) / data.length), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
- barsEnter.append('rect')
- .attr('height', 0)
- .attr('width', x.rangeBand() * .9 / data.length )
-
- if (showValues) {
- barsEnter.append('text')
- .attr('text-anchor', 'middle')
- ;
-
- bars.select('text')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- .transition()
- .attr('x', x.rangeBand() * .9 / 2)
- .attr('y', function(d,i) { return getY(d,i) < 0 ? y(getY(d,i)) - y(0) + 12 : -4 })
-
- ;
- } else {
- bars.selectAll('text').remove();
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive' })
- .style('fill', function(d,i) { return d.color || color(d,i) })
- .style('stroke', function(d,i) { return d.color || color(d,i) })
- .select('rect')
- .attr('class', rectClass)
- .transition()
- .attr('width', x.rangeBand() * .9 / data.length);
- bars.transition()
- //.delay(function(d,i) { return i * 1200 / data[0].values.length })
- .attr('transform', function(d,i) {
- var left = x(getX(d,i)) + x.rangeBand() * .05,
- top = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 : //make 1 px positive bars show up above y=0
- y(getY(d,i));
-
- return 'translate(' + left + ', ' + top + ')'
- })
- .select('rect')
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y((yDomain && yDomain[0]) || 0)) || 1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.rectClass= function(_) {
- if (!arguments.length) return rectClass;
- rectClass = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBarChart.js
deleted file mode 100644
index 48a48164..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/discreteBarChart.js
+++ /dev/null
@@ -1,333 +0,0 @@
-
-nv.models.discreteBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var discretebar = nv.models.discreteBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- ;
-
- var margin = {top: 15, right: 10, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.getColor()
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , staggerLabels = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x
- , y
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'beforeUpdate')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(discretebar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(discretebar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() {
- dispatch.beforeUpdate();
- container.transition().duration(transitionDuration).call(chart);
- };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = discretebar.xScale();
- y = discretebar.yScale().clamp(true);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-discreteBarWithAxes').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-discreteBarWithAxes').append('g');
- var defsEnter = gEnter.append('defs');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- discretebar
- .width(availableWidth)
- .height(availableHeight);
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(discretebar);
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-x-label-clip-' + discretebar.id())
- .append('rect');
-
- g.select('#nv-x-label-clip-' + discretebar.id() + ' rect')
- .attr('width', x.rangeBand() * (staggerLabels ? 2 : 1))
- .attr('height', 16)
- .attr('x', -x.rangeBand() / (staggerLabels ? 1 : 2 ));
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + (y.range()[0] + ((discretebar.showValues() && y.domain()[0] < 0) ? 16 : 0)) + ')');
- //d3.transition(g.select('.nv-x.nv-axis'))
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- if (staggerLabels) {
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'translate(0,' + (j % 2 == 0 ? '5' : '17') + ')' })
- }
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- discretebar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- discretebar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.discretebar = discretebar;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, discretebar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'id', 'showValues', 'valueFormat');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- discretebar.color(color);
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/distribution.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/distribution.js
deleted file mode 100644
index 62a74655..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/distribution.js
+++ /dev/null
@@ -1,148 +0,0 @@
-
-nv.models.distribution = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 400 //technically width or height depending on x or y....
- , size = 8
- , axis = 'x' // 'x' or 'y'... horizontal or vertical
- , getData = function(d) { return d[axis] } // defaults d.x or d.y
- , color = nv.utils.defaultColor()
- , scale = d3.scale.linear()
- , domain
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var scale0;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableLength = width - (axis === 'x' ? margin.left + margin.right : margin.top + margin.bottom),
- naxis = axis == 'x' ? 'y' : 'x',
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- scale0 = scale0 || scale;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-distribution').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-distribution');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var distWrap = g.selectAll('g.nv-dist')
- .data(function(d) { return d }, function(d) { return d.key });
-
- distWrap.enter().append('g');
- distWrap
- .attr('class', function(d,i) { return 'nv-dist nv-series-' + i })
- .style('stroke', function(d,i) { return color(d, i) });
-
- var dist = distWrap.selectAll('line.nv-dist' + axis)
- .data(function(d) { return d.values })
- dist.enter().append('line')
- .attr(axis + '1', function(d,i) { return scale0(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale0(getData(d,i)) })
- distWrap.exit().selectAll('line.nv-dist' + axis)
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
- .style('stroke-opacity', 0)
- .remove();
- dist
- .attr('class', function(d,i) { return 'nv-dist' + axis + ' nv-dist' + axis + '-' + i })
- .attr(naxis + '1', 0)
- .attr(naxis + '2', size);
- dist
- .transition()
- .attr(axis + '1', function(d,i) { return scale(getData(d,i)) })
- .attr(axis + '2', function(d,i) { return scale(getData(d,i)) })
-
-
- scale0 = scale.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.axis = function(_) {
- if (!arguments.length) return axis;
- axis = _;
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return chart;
- };
-
- chart.getData = function(_) {
- if (!arguments.length) return getData;
- getData = d3.functor(_);
- return chart;
- };
-
- chart.scale = function(_) {
- if (!arguments.length) return scale;
- scale = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBar.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBar.js
deleted file mode 100644
index 2a6c644d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBar.js
+++ /dev/null
@@ -1,331 +0,0 @@
-//TODO: consider deprecating and using multibar with single series for this
-nv.models.historicalBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceX = []
- , forceY = [0]
- , padData = false
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- , interactive = true
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ))
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data[0].values.map(getY).concat(forceY) ))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
-
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBar-' + id).data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBar-' + id);
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-bars');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var bars = wrap.select('.nv-bars').selectAll('.nv-bar')
- .data(function(d) { return d }, function(d,i) {return getX(d,i)});
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- //.attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .attr('x', 0 )
- .attr('y', function(d,i) { return nv.utils.NaNtoZero(y(Math.max(0, getY(d,i)))) })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.abs(y(getY(d,i)) - y(0))) })
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- .on('mouseover', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- if (!interactive) return;
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- if (!interactive) return;
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- if (!interactive) return;
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- bars
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('class', function(d,i,j) { return (getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive') + ' nv-bar-' + j + '-' + i })
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + (x(getX(d,i)) - availableWidth / data[0].values.length * .45) + ',0)'; })
- //TODO: better width calculations that don't assume always uniform data spacing;w
- .attr('width', (availableWidth / data[0].values.length) * .9 );
-
-
- bars.transition()
- .attr('y', function(d,i) {
- var rval = getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i));
- return nv.utils.NaNtoZero(rval);
- })
- .attr('height', function(d,i) { return nv.utils.NaNtoZero(Math.max(Math.abs(y(getY(d,i)) - y(0)),1)) });
-
- });
-
- return chart;
- }
-
- //Create methods to allow outside functions to highlight a specific bar.
- chart.highlightPoint = function(pointIndex, isHoverOver) {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar-0-" + pointIndex)
- .classed("hover", isHoverOver)
- ;
- };
-
- chart.clearHighlights = function() {
- d3.select(".nv-historicalBar-" + id)
- .select(".nv-bars .nv-bar.hover")
- .classed("hover", false)
- ;
- };
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if(!arguments.length) return interactive;
- interactive = false;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBarChart.js
deleted file mode 100644
index a5b4a097..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/historicalBarChart.js
+++ /dev/null
@@ -1,419 +0,0 @@
-
-nv.models.historicalBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
-
- var margin = {top: 30, right: 90, bottom: 50, left: 90}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = false
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient( (rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
-
- // New addition to calculate position if SVG is scaled with viewBox, may move TODO: consider implementing everywhere else
- if (offsetElement) {
- var svg = d3.select(offsetElement).select('svg');
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
- e.pos[0] = e.pos[0] * ratio;
- e.pos[1] = e.pos[1] * ratio;
- }
- }
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(bars.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(bars.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = bars.xScale();
- y = bars.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-historicalBarChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-historicalBarChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(bars);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- selection.transition().call(chart);
- });
-
- legend.dispatch.on('legendDblclick', function(d) {
- //Double clicking should always enable current series, and disabled all others.
- data.forEach(function(d) {
- d.disabled = true;
- });
- d.disabled = false;
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- selection.call(chart);
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.bars = bars;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, bars, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale',
- 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate','highlightPoint','clearHighlights', 'interactive');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/indentedTree.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/indentedTree.js
deleted file mode 100644
index 18c2700f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/indentedTree.js
+++ /dev/null
@@ -1,337 +0,0 @@
-nv.models.indentedTree = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0} //TODO: implement, maybe as margin on the containing div
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor()
- , id = Math.floor(Math.random() * 10000)
- , header = true
- , filterZero = false
- , noData = "No Data Available."
- , childIndent = 20
- , columns = [{key:'key', label: 'Name', type:'text'}] //TODO: consider functions like chart.addColumn, chart.removeColumn, instead of a block like this
- , tableClass = null
- , iconOpen = 'images/grey-plus.png' //TODO: consider removing this and replacing with a '+' or '-' unless user defines images
- , iconClose = 'images/grey-minus.png'
- , dispatch = d3.dispatch('elementClick', 'elementDblclick', 'elementMouseover', 'elementMouseout')
- , getUrl = function(d) { return d.url }
- ;
-
- //============================================================
-
- var idx = 0;
-
- function chart(selection) {
- selection.each(function(data) {
- var depth = 1,
- container = d3.select(this);
-
- var tree = d3.layout.tree()
- .children(function(d) { return d.values })
- .size([height, childIndent]); //Not sure if this is needed now that the result is HTML
-
- chart.update = function() { container.transition().duration(600).call(chart) };
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
- if (!data[0]) data[0] = {key: noData};
-
- //------------------------------------------------------------
-
-
- var nodes = tree.nodes(data[0]);
-
- // nodes.map(function(d) {
- // d.id = i++;
- // })
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('div').data([[nodes]]);
- var wrapEnter = wrap.enter().append('div').attr('class', 'nvd3 nv-wrap nv-indentedtree');
- var tableEnter = wrapEnter.append('table');
- var table = wrap.select('table').attr('width', '100%').attr('class', tableClass);
-
- //------------------------------------------------------------
-
-
- if (header) {
- var thead = tableEnter.append('thead');
-
- var theadRow1 = thead.append('tr');
-
- columns.forEach(function(column) {
- theadRow1
- .append('th')
- .attr('width', column.width ? column.width : '10%')
- .style('text-align', column.type == 'numeric' ? 'right' : 'left')
- .append('span')
- .text(column.label);
- });
- }
-
-
- var tbody = table.selectAll('tbody')
- .data(function(d) { return d });
- tbody.enter().append('tbody');
-
-
-
- //compute max generations
- depth = d3.max(nodes, function(node) { return node.depth });
- tree.size([height, depth * childIndent]); //TODO: see if this is necessary at all
-
-
- // Update the nodes…
- var node = tbody.selectAll('tr')
- // .data(function(d) { return d; }, function(d) { return d.id || (d.id == ++i)});
- .data(function(d) { return d.filter(function(d) { return (filterZero && !d.children) ? filterZero(d) : true; } )}, function(d,i) { return d.id || (d.id || ++idx)});
- //.style('display', 'table-row'); //TODO: see if this does anything
-
- node.exit().remove();
-
- node.select('img.nv-treeicon')
- .attr('src', icon)
- .classed('folded', folded);
-
- var nodeEnter = node.enter().append('tr');
-
-
- columns.forEach(function(column, index) {
-
- var nodeName = nodeEnter.append('td')
- .style('padding-left', function(d) { return (index ? 0 : d.depth * childIndent + 12 + (icon(d) ? 0 : 16)) + 'px' }, 'important') //TODO: check why I did the ternary here
- .style('text-align', column.type == 'numeric' ? 'right' : 'left');
-
-
- if (index == 0) {
- nodeName.append('img')
- .classed('nv-treeicon', true)
- .classed('nv-folded', folded)
- .attr('src', icon)
- .style('width', '14px')
- .style('height', '14px')
- .style('padding', '0 1px')
- .style('display', function(d) { return icon(d) ? 'inline-block' : 'none'; })
- .on('click', click);
- }
-
-
- nodeName.each(function(d) {
- if (!index && getUrl(d))
- d3.select(this)
- .append('a')
- .attr('href',getUrl)
- .attr('class', d3.functor(column.classes))
- .append('span')
- else
- d3.select(this)
- .append('span')
-
- d3.select(this).select('span')
- .attr('class', d3.functor(column.classes) )
- .text(function(d) { return column.format ? column.format(d) :
- (d[column.key] || '-') });
- });
-
- if (column.showCount) {
- nodeName.append('span')
- .attr('class', 'nv-childrenCount');
-
- node.selectAll('span.nv-childrenCount').text(function(d) {
- return ((d.values && d.values.length) || (d._values && d._values.length)) ? //If this is a parent
- '(' + ((d.values && (d.values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length)) //If children are in values check its children and filter
- || (d._values && d._values.filter(function(d) { return filterZero ? filterZero(d) : true; }).length) //Otherwise, do the same, but with the other name, _values...
- || 0) + ')' //This is the catch-all in case there are no children after a filter
- : '' //If this is not a parent, just give an empty string
- });
- }
-
- // if (column.click)
- // nodeName.select('span').on('click', column.click);
-
- });
-
- node
- .order()
- .on('click', function(d) {
- dispatch.elementClick({
- row: this, //TODO: decide whether or not this should be consistent with scatter/line events or should be an html link (a href)
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('dblclick', function(d) {
- dispatch.elementDblclick({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseover', function(d) {
- dispatch.elementMouseover({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- })
- .on('mouseout', function(d) {
- dispatch.elementMouseout({
- row: this,
- data: d,
- pos: [d.x, d.y]
- });
- });
-
-
-
-
- // Toggle children on click.
- function click(d, _, unshift) {
- d3.event.stopPropagation();
-
- if(d3.event.shiftKey && !unshift) {
- //If you shift-click, it'll toggle fold all the children, instead of itself
- d3.event.shiftKey = false;
- d.values && d.values.forEach(function(node){
- if (node.values || node._values) {
- click(node, 0, true);
- }
- });
- return true;
- }
- if(!hasChildren(d)) {
- //download file
- //window.location.href = d.url;
- return true;
- }
- if (d.values) {
- d._values = d.values;
- d.values = null;
- } else {
- d.values = d._values;
- d._values = null;
- }
- chart.update();
- }
-
-
- function icon(d) {
- return (d._values && d._values.length) ? iconOpen : (d.values && d.values.length) ? iconClose : '';
- }
-
- function folded(d) {
- return (d._values && d._values.length);
- }
-
- function hasChildren(d) {
- var values = d.values || d._values;
-
- return (values && values.length);
- }
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.header = function(_) {
- if (!arguments.length) return header;
- header = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.filterZero = function(_) {
- if (!arguments.length) return filterZero;
- filterZero = _;
- return chart;
- };
-
- chart.columns = function(_) {
- if (!arguments.length) return columns;
- columns = _;
- return chart;
- };
-
- chart.tableClass = function(_) {
- if (!arguments.length) return tableClass;
- tableClass = _;
- return chart;
- };
-
- chart.iconOpen = function(_){
- if (!arguments.length) return iconOpen;
- iconOpen = _;
- return chart;
- }
-
- chart.iconClose = function(_){
- if (!arguments.length) return iconClose;
- iconClose = _;
- return chart;
- }
-
- chart.getUrl = function(_){
- if (!arguments.length) return getUrl;
- getUrl = _;
- return chart;
- }
-
- //============================================================
-
-
- return chart;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/legend.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/legend.js
deleted file mode 100644
index 21f9f9a4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/legend.js
+++ /dev/null
@@ -1,270 +0,0 @@
-nv.models.legend = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 5, right: 0, bottom: 5, left: 0}
- , width = 400
- , height = 20
- , getKey = function(d) { return d.key }
- , color = nv.utils.defaultColor()
- , align = true
- , rightAlign = true
- , updateState = true //If true, legend will update data.disabled and trigger a 'stateChange' dispatch.
- , radioButtonMode = false //If true, clicking legend items will cause it to behave like a radio button. (only one can be selected at a time)
- , dispatch = d3.dispatch('legendClick', 'legendDblclick', 'legendMouseover', 'legendMouseout', 'stateChange')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-legend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-legend').append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var series = g.selectAll('.nv-series')
- .data(function(d) { return d });
- var seriesEnter = series.enter().append('g').attr('class', 'nv-series')
- .on('mouseover', function(d,i) {
- dispatch.legendMouseover(d,i); //TODO: Make consistent with other event objects
- })
- .on('mouseout', function(d,i) {
- dispatch.legendMouseout(d,i);
- })
- .on('click', function(d,i) {
- dispatch.legendClick(d,i);
- if (updateState) {
- if (radioButtonMode) {
- //Radio button mode: set every series to disabled,
- // and enable the clicked series.
- data.forEach(function(series) { series.disabled = true});
- d.disabled = false;
- }
- else {
- d.disabled = !d.disabled;
- if (data.every(function(series) { return series.disabled})) {
- //the default behavior of NVD3 legends is, if every single series
- // is disabled, turn all series' back on.
- data.forEach(function(series) { series.disabled = false});
- }
- }
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- })
- .on('dblclick', function(d,i) {
- dispatch.legendDblclick(d,i);
- if (updateState) {
- //the default behavior of NVD3 legends, when double clicking one,
- // is to set all other series' to false, and make the double clicked series enabled.
- data.forEach(function(series) {
- series.disabled = true;
- });
- d.disabled = false;
- dispatch.stateChange({
- disabled: data.map(function(d) { return !!d.disabled })
- });
- }
- });
- seriesEnter.append('circle')
- .style('stroke-width', 2)
- .attr('class','nv-legend-symbol')
- .attr('r', 5);
- seriesEnter.append('text')
- .attr('text-anchor', 'start')
- .attr('class','nv-legend-text')
- .attr('dy', '.32em')
- .attr('dx', '8');
- series.classed('disabled', function(d) { return d.disabled });
- series.exit().remove();
- series.select('circle')
- .style('fill', function(d,i) { return d.color || color(d,i)})
- .style('stroke', function(d,i) { return d.color || color(d, i) });
- series.select('text').text(getKey);
-
-
- //TODO: implement fixed-width and max-width options (max-width is especially useful with the align option)
-
- // NEW ALIGNING CODE, TODO: clean up
- if (align) {
-
- var seriesWidths = [];
- series.each(function(d,i) {
- var legendText = d3.select(this).select('text');
- var nodeTextLength;
- try {
- nodeTextLength = legendText.node().getComputedTextLength();
- }
- catch(e) {
- nodeTextLength = nv.utils.calcApproxTextWidth(legendText);
- }
-
- seriesWidths.push(nodeTextLength + 28); // 28 is ~ the width of the circle plus some padding
- });
-
- var seriesPerRow = 0;
- var legendWidth = 0;
- var columnWidths = [];
-
- while ( legendWidth < availableWidth && seriesPerRow < seriesWidths.length) {
- columnWidths[seriesPerRow] = seriesWidths[seriesPerRow];
- legendWidth += seriesWidths[seriesPerRow++];
- }
- if (seriesPerRow === 0) seriesPerRow = 1; //minimum of one series per row
-
-
- while ( legendWidth > availableWidth && seriesPerRow > 1 ) {
- columnWidths = [];
- seriesPerRow--;
-
- for (var k = 0; k < seriesWidths.length; k++) {
- if (seriesWidths[k] > (columnWidths[k % seriesPerRow] || 0) )
- columnWidths[k % seriesPerRow] = seriesWidths[k];
- }
-
- legendWidth = columnWidths.reduce(function(prev, cur, index, array) {
- return prev + cur;
- });
- }
-
- var xPositions = [];
- for (var i = 0, curX = 0; i < seriesPerRow; i++) {
- xPositions[i] = curX;
- curX += columnWidths[i];
- }
-
- series
- .attr('transform', function(d, i) {
- return 'translate(' + xPositions[i % seriesPerRow] + ',' + (5 + Math.floor(i / seriesPerRow) * 20) + ')';
- });
-
- //position legend as far right as possible within the total width
- if (rightAlign) {
- g.attr('transform', 'translate(' + (width - margin.right - legendWidth) + ',' + margin.top + ')');
- }
- else {
- g.attr('transform', 'translate(0' + ',' + margin.top + ')');
- }
-
- height = margin.top + margin.bottom + (Math.ceil(seriesWidths.length / seriesPerRow) * 20);
-
- } else {
-
- var ypos = 5,
- newxpos = 5,
- maxwidth = 0,
- xpos;
- series
- .attr('transform', function(d, i) {
- var length = d3.select(this).select('text').node().getComputedTextLength() + 28;
- xpos = newxpos;
-
- if (width < margin.left + margin.right + xpos + length) {
- newxpos = xpos = 5;
- ypos += 20;
- }
-
- newxpos += length;
- if (newxpos > maxwidth) maxwidth = newxpos;
-
- return 'translate(' + xpos + ',' + ypos + ')';
- });
-
- //position legend as far right as possible within the total width
- g.attr('transform', 'translate(' + (width - margin.right - maxwidth) + ',' + margin.top + ')');
-
- height = margin.top + margin.bottom + ypos + 15;
-
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.key = function(_) {
- if (!arguments.length) return getKey;
- getKey = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.align = function(_) {
- if (!arguments.length) return align;
- align = _;
- return chart;
- };
-
- chart.rightAlign = function(_) {
- if (!arguments.length) return rightAlign;
- rightAlign = _;
- return chart;
- };
-
- chart.updateState = function(_) {
- if (!arguments.length) return updateState;
- updateState = _;
- return chart;
- };
-
- chart.radioButtonMode = function(_) {
- if (!arguments.length) return radioButtonMode;
- radioButtonMode = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/line.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/line.js
deleted file mode 100644
index 855cc541..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/line.js
+++ /dev/null
@@ -1,284 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- ;
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that returns a color
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , defined = function(d,i) { return !isNaN(getY(d,i)) && getY(d,i) !== null } // allows a line to be not continuous when it is not defined
- , isArea = function(d) { return d.area } // decides if a line is an area or just a line
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , interpolate = "linear" // controls the line interpolation
- ;
-
- scatter
- .size(16) // default size
- .sizeDomain([16,256]) //set to speed up calculation, needs to be unset if there is a custom size accessor
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- var scatterWrap = wrap.select('.nv-scatterWrap');
- //.datum(data); // Data automatically trickles down from the wrap
-
- scatterWrap.transition().call(scatter);
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + scatter.id())
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + scatter.id() + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + scatter.id() + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i)});
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
-
- var areaPaths = groups.selectAll('path.nv-area')
- .data(function(d) { return isArea(d) ? [d] : [] }); // this is done differently than lines because I need to check if series is an area
- areaPaths.enter().append('path')
- .attr('class', 'nv-area')
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .y1(function(d,i) { return y0( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
- groups.exit().selectAll('path.nv-area')
- .remove();
-
- areaPaths
- .transition()
- .attr('d', function(d) {
- return d3.svg.area()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y0(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .y1(function(d,i) { return y( y.domain()[0] <= 0 ? y.domain()[1] >= 0 ? 0 : y.domain()[1] : y.domain()[0] ) })
- //.y1(function(d,i) { return y0(0) }) //assuming 0 is within y domain.. may need to tweak this
- .apply(this, [d.values])
- });
-
-
-
- var linePaths = groups.selectAll('path.nv-line')
- .data(function(d) { return [d.values] });
- linePaths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- );
- groups.exit().selectAll('path.nv-line')
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
- linePaths
- .transition()
- .attr('d',
- d3.svg.line()
- .interpolate(interpolate)
- .defined(defined)
- .x(function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .y(function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- );
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = scatter.dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi', 'clipRadius', 'padData','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- chart.isArea = function(_) {
- if (!arguments.length) return isArea;
- isArea = d3.functor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineChart.js
deleted file mode 100644
index a4ffcf6a..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineChart.js
+++ /dev/null
@@ -1,465 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , x
- , y
- , state = {}
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left:margin.left, top:margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- linesWrap.transition().call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis')
- .transition()
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .transition()
- .call(yAxis);
- }
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- lines.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- lines.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
- allData.push({
- key: series.key,
- value: chart.y()(point, pointIndex),
- color: color(series,series.seriesIndex)
- });
- });
- //Highlight the tooltip entry based on which point the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var domainExtent = Math.abs(chart.yScale().domain()[0] - chart.yScale().domain()[1]);
- var threshold = 0.03 * domainExtent;
- var indexToHighlight = nv.nearestValueIndex(allData.map(function(d){return d.value}),yValue,threshold);
- if (indexToHighlight !== null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(function(d,i) {
- return yAxis.tickFormat()(d);
- })
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- lines.clearHighlights();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.lines = lines;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange'
- , 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'useVoronoi','id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarChart.js
deleted file mode 100644
index 77fcbab7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarChart.js
+++ /dev/null
@@ -1,433 +0,0 @@
-
-nv.models.linePlusBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , bars = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 60, bottom: 50, left: 60}
- , width = null
- , height = null
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , y1
- , y2
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- bars
- .padData(true)
- ;
- lines
- .clipEdge(false)
- .padData(true)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- }
- ;
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- // chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- //x = xAxis.scale();
- x = dataLines.filter(function(d) { return !d.disabled; }).length && dataLines.filter(function(d) { return !d.disabled; })[0].values.length ? lines.xScale() : bars.xScale();
- //x = dataLines.filter(function(d) { return !d.disabled; }).length ? lines.xScale() : bars.xScale(); //old code before change above
- y1 = bars.yScale();
- y2 = lines.yScale();
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y1 nv-axis');
- gEnter.append('g').attr('class', 'nv-y2 nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }))
-
- bars
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }))
-
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}])
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(dataLines[0] && !dataLines[0].disabled ? dataLines : [{values:[]}] );
- //.datum(!dataLines[0].disabled ? dataLines : [{values:dataLines[0].values.map(function(d) { return [d[0], null] }) }] );
-
- d3.transition(barsWrap).call(bars);
- d3.transition(linesWrap).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight / 36 )
- .tickSize(-availableWidth, 0);
-
- d3.transition(g.select('.nv-y1.nv-axis'))
- .style('opacity', dataBars.length ? 1 : 0)
- .call(y1Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + availableWidth + ',0)');
- //.attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- d3.transition(g.select('.nv-y2.nv-axis'))
- .call(y2Axis);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.bars = bars;
- chart.xAxis = xAxis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarWithFocusChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarWithFocusChart.js
deleted file mode 100644
index 2ef31137..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/linePlusBarWithFocusChart.js
+++ /dev/null
@@ -1,658 +0,0 @@
-
-nv.models.linePlusBarWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , bars = nv.models.historicalBar()
- , bars2 = nv.models.historicalBar()
- , xAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y1Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , y3Axis = nv.models.axis()
- , y4Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , width = null
- , height = null
- , height2 = 100
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.defaultColor()
- , showLegend = true
- , extent
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>';
- }
- , x
- , x2
- , y1
- , y2
- , y3
- , y4
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 0
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- y1Axis
- .orient('left')
- ;
- y2Axis
- .orient('right')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y3Axis
- .orient('left')
- ;
- y4Axis
- .orient('right')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- if (extent) {
- e.pointIndex += Math.ceil(extent[0]);
- }
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = (e.series.bar ? y1Axis : y2Axis).tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //------------------------------------------------------------
-
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- var dataBars = data.filter(function(d) { return !d.disabled && d.bar });
- var dataLines = data.filter(function(d) { return !d.bar }); // removed the !d.disabled clause here to fix Issue #240
-
- x = bars.xScale();
- x2 = x2Axis.scale();
- y1 = bars.yScale();
- y2 = lines.yScale();
- y3 = bars2.yScale();
- y4 = lines2.yScale();
-
- var series1 = data
- .filter(function(d) { return !d.disabled && d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- var series2 = data
- .filter(function(d) { return !d.disabled && !d.bar })
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i) }
- })
- });
-
- x .range([0, availableWidth]);
-
- x2 .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-linePlusBar').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-linePlusBar').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y1 nv-axis');
- focusEnter.append('g').attr('class', 'nv-y2 nv-axis');
- focusEnter.append('g').attr('class', 'nv-barsWrap');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y1 nv-axis');
- contextEnter.append('g').attr('class', 'nv-y2 nv-axis');
- contextEnter.append('g').attr('class', 'nv-barsWrap');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.nv-legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.bar ? ' (left axis)' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Context Components
-
- bars2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
- lines2
- .width(availableWidth)
- .height(availableHeight2)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var bars2Wrap = g.select('.nv-context .nv-barsWrap')
- .datum(dataBars.length ? dataBars : [{values:[]}]);
-
- var lines2Wrap = g.select('.nv-context .nv-linesWrap')
- .datum(!dataLines[0].disabled ? dataLines : [{values:[]}]);
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- bars2Wrap.transition().call(bars2);
- lines2Wrap.transition().call(lines2);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', onBrush);
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- //------------------------------------------------------------
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y3.range()[0] + ')');
- g.select('.nv-context .nv-x.nv-axis').transition()
- .call(x2Axis);
-
-
- y3Axis
- .scale(y3)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-context .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0)
- .attr('transform', 'translate(0,' + x2.range()[0] + ')');
-
- g.select('.nv-context .nv-y1.nv-axis').transition()
- .call(y3Axis);
-
-
- y4Axis
- .scale(y4)
- .ticks( availableHeight2 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-context .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x2.range()[1] + ',0)');
-
- g.select('.nv-context .nv-y2.nv-axis').transition()
- .call(y4Axis);
-
- //------------------------------------------------------------
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x2.range()[0],
- rightWidth = x2.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- extent = brush.empty() ? x2.domain() : brush.extent();
-
-
- dispatch.brush({extent: extent, brush: brush});
-
- updateBrushBG();
-
-
- //------------------------------------------------------------
- // Prepare Main (Focus) Bars and Lines
-
- bars
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && data[i].bar }));
-
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled && !data[i].bar }));
-
- var focusBarsWrap = g.select('.nv-focus .nv-barsWrap')
- .datum(!dataBars.length ? [{values:[]}] :
- dataBars
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return bars.x()(d,i) >= extent[0] && bars.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(dataLines[0].disabled ? [{values:[]}] :
- dataLines
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) X Axis
-
- if (dataBars.length) {
- x = bars.xScale();
- } else {
- x = lines.xScale();
- }
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- xAxis.domain([Math.ceil(extent[0]), Math.floor(extent[1])]);
-
- g.select('.nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Update Main (Focus) Bars and Lines
-
- focusBarsWrap.transition().duration(transitionDuration).call(bars);
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup and Update Main (Focus) Y Axes
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y1.range()[0] + ')');
-
-
- y1Axis
- .scale(y1)
- .ticks( availableHeight1 / 36 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-focus .nv-y1.nv-axis')
- .style('opacity', dataBars.length ? 1 : 0);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight1 / 36 )
- .tickSize(dataBars.length ? 0 : -availableWidth, 0); // Show the y2 rules only if y1 has none
-
- g.select('.nv-focus .nv-y2.nv-axis')
- .style('opacity', dataLines.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- g.select('.nv-focus .nv-y1.nv-axis').transition().duration(transitionDuration)
- .call(y1Axis);
- g.select('.nv-focus .nv-y2.nv-axis').transition().duration(transitionDuration)
- .call(y2Axis);
- }
-
- //============================================================
-
- onBrush();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.bars = bars;
- chart.bars2 = bars2;
- chart.xAxis = xAxis;
- chart.x2Axis = x2Axis;
- chart.y1Axis = y1Axis;
- chart.y2Axis = y2Axis;
- chart.y3Axis = y3Axis;
- chart.y4Axis = y4Axis;
-
- d3.rebind(chart, lines, 'defined', 'size', 'clipVoronoi', 'interpolate');
- //TODO: consider rebinding x, y and some other stuff, and simply do soemthign lile bars.x(lines.x()), etc.
- //d3.rebind(chart, lines, 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines.x(_);
- bars.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines.y(_);
- bars.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheye.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheye.js
deleted file mode 100644
index 2b411672..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheye.js
+++ /dev/null
@@ -1,200 +0,0 @@
-
-nv.models.line = function() {
- "use strict";
- //Default Settings
- var margin = {top: 0, right: 0, bottom: 0, left: 0},
- width = 960,
- height = 500,
- color = nv.utils.defaultColor(), // function that returns colors
- id = Math.floor(Math.random() * 10000), //Create semi-unique ID incase user doesn't select one
- getX = function(d) { return d.x }, // accessor to get the x value from a data point
- getY = function(d) { return d.y }, // accessor to get the y value from a data point
- clipEdge = false, // if true, masks lines within x and y scale
- interpolate = "linear"; // controls the line interpolation
-
-
- var scatter = nv.models.scatter()
- .id(id)
- .size(16) // default size
- .sizeDomain([16,256]), //set to speed up calculation, needs to be unset if there is a custom size accessor
- //x = scatter.xScale(),
- //y = scatter.yScale(),
- x, y,
- x0, y0, timeoutID;
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom;
-
- //get the scales inscase scatter scale was set manually
- x = x || scatter.xScale();
- y = y || scatter.yScale();
-
- //store old scales if they exist
- x0 = x0 || x;
- y0 = y0 || y;
-
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-line').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-line');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- wrapEnter.append('g').attr('class', 'nv-scatterWrap');
- var scatterWrap = wrap.select('.nv-scatterWrap').datum(data);
-
- gEnter.append('g').attr('class', 'nv-groups');
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
-
- d3.transition(scatterWrap).call(scatter);
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
- scatterWrap
- .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) })
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5)
-
-
- var paths = groups.selectAll('path')
- .data(function(d, i) { return [d.values] });
- paths.enter().append('path')
- .attr('class', 'nv-line')
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x0(getX(d,i)) })
- .y(function(d,i) { return y0(getY(d,i)) })
- );
- d3.transition(groups.exit().selectAll('path'))
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- )
- .remove(); // redundant? line is already being removed
- d3.transition(paths)
- .attr('d', d3.svg.line()
- .interpolate(interpolate)
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- //store old scales for use in transitions on update, to animate from old to new positions
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = scatter.dispatch;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- scatter.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- scatter.y(_);
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- scatter.color(color);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
-
- chart.defined = function(_) {
- if (!arguments.length) return defined;
- defined = _;
- return chart;
- };
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheyeChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheyeChart.js
deleted file mode 100644
index ad894190..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFisheyeChart.js
+++ /dev/null
@@ -1,297 +0,0 @@
-
-nv.models.lineChart = function() {
- "use strict";
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = nv.utils.defaultColor(),
- width = null,
- height = null,
- showLegend = true,
- showControls = true,
- fisheye = 0,
- pauseFisheye = false,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- noData = "No Data Available."
- ;
-
-
- var x = d3.fisheye.scale(d3.scale.linear).distortion(0);
-
- var lines = nv.models.line().xScale(x),
- //x = lines.xScale(),
- y = lines.yScale(),
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis = nv.models.axis().scale(y).orient('left'),
- legend = nv.models.legend().height(30),
- controls = nv.models.legend().height(30).updateState(false),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart) };
- chart.container = this; // I need a reference to the container in order to have outside code check if the chart is visible or not
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- container.append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('x', availableWidth / 2)
- .attr('y', availableHeight / 2)
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle')
- .text(noData);
- return chart;
- } else {
- container.select('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineChart').append('g');
-
-
- gEnter.append('rect')
- .attr('class', 'nvd3 nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-linesWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
-
- var g = wrap.select('g');
-
-
-
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
-
-
- lines
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
-
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var linesWrap = g.select('.nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(linesWrap).call(lines);
-
-
-
- xAxis
- //.scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
-
- yAxis
- //.scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
-
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye; });
- //g.select('.point-paths').on('mousemove', updateFisheye);
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- //g.select('.background') .style('pointer-events', 'none');
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-background') .style('pointer-events', 'all');
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- x.distortion(fisheye).focus(mouse[0]);
- }
-
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- //scatter.interactive(d.disabled);
- //tooltips = d.disabled;
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
-
- linesWrap.call(lines);
- g.select('.nv-x.nv-axis').call(xAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
- if (tooltips) dispatch.on('tooltipShow', function(e) { showTooltip(e, that.parentNode) } ); // TODO: maybe merge with above?
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- if (tooltips) dispatch.on('tooltipHide', nv.tooltip.cleanup);
-
- });
-
- return chart;
- }
-
-
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, lines, 'defined', 'x', 'y', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFocusChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFocusChart.js
deleted file mode 100644
index 0afd28bd..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/lineWithFocusChart.js
+++ /dev/null
@@ -1,574 +0,0 @@
-nv.models.lineWithFocusChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var lines = nv.models.line()
- , lines2 = nv.models.line()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , x2Axis = nv.models.axis()
- , y2Axis = nv.models.axis()
- , legend = nv.models.legend()
- , brush = d3.svg.brush()
- ;
-
- var margin = {top: 30, right: 30, bottom: 30, left: 60}
- , margin2 = {top: 0, right: 30, bottom: 20, left: 60}
- , color = nv.utils.defaultColor()
- , width = null
- , height = null
- , height2 = 100
- , x
- , y
- , x2
- , y2
- , showLegend = true
- , brushExtent = null
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- }
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'brush')
- , transitionDuration = 250
- ;
-
- lines
- .clipEdge(true)
- ;
- lines2
- .interactive(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(5)
- ;
- yAxis
- .orient('left')
- ;
- x2Axis
- .orient('bottom')
- .tickPadding(5)
- ;
- y2Axis
- .orient('left')
- ;
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(lines.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, null, null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2,
- availableHeight2 = height2 - margin2.top - margin2.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight1 / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = lines.xScale();
- y = lines.yScale();
- x2 = lines2.xScale();
- y2 = lines2.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-lineWithFocusChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-lineWithFocusChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- var focusEnter = gEnter.append('g').attr('class', 'nv-focus');
- focusEnter.append('g').attr('class', 'nv-x nv-axis');
- focusEnter.append('g').attr('class', 'nv-y nv-axis');
- focusEnter.append('g').attr('class', 'nv-linesWrap');
-
- var contextEnter = gEnter.append('g').attr('class', 'nv-context');
- contextEnter.append('g').attr('class', 'nv-x nv-axis');
- contextEnter.append('g').attr('class', 'nv-y nv-axis');
- contextEnter.append('g').attr('class', 'nv-linesWrap');
- contextEnter.append('g').attr('class', 'nv-brushBackground');
- contextEnter.append('g').attr('class', 'nv-x nv-brush');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight1 = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom - height2;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- lines
- .width(availableWidth)
- .height(availableHeight1)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- lines2
- .defined(lines.defined())
- .width(availableWidth)
- .height(availableHeight2)
- .color(
- data
- .map(function(d,i) {
- return d.color || color(d, i);
- })
- .filter(function(d,i) {
- return !data[i].disabled;
- })
- );
-
- g.select('.nv-context')
- .attr('transform', 'translate(0,' + ( availableHeight1 + margin.bottom + margin2.top) + ')')
-
- var contextLinesWrap = g.select('.nv-context .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(contextLinesWrap).call(lines2);
-
- //------------------------------------------------------------
-
-
- /*
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(focusLinesWrap).call(lines);
- */
-
-
- //------------------------------------------------------------
- // Setup Main (Focus) Axes
-
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight1, 0);
-
- yAxis
- .scale(y)
- .ticks( availableHeight1 / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-focus .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight1 + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Brush
-
- brush
- .x(x2)
- .on('brush', function() {
- //When brushing, turn off transitions because chart needs to change immediately.
- var oldTransition = chart.transitionDuration();
- chart.transitionDuration(0);
- onBrush();
- chart.transitionDuration(oldTransition);
- });
-
- if (brushExtent) brush.extent(brushExtent);
-
- var brushBG = g.select('.nv-brushBackground').selectAll('g')
- .data([brushExtent || brush.extent()])
-
- var brushBGenter = brushBG.enter()
- .append('g');
-
- brushBGenter.append('rect')
- .attr('class', 'left')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- brushBGenter.append('rect')
- .attr('class', 'right')
- .attr('x', 0)
- .attr('y', 0)
- .attr('height', availableHeight2);
-
- var gBrush = g.select('.nv-x.nv-brush')
- .call(brush);
- gBrush.selectAll('rect')
- //.attr('y', -5)
- .attr('height', availableHeight2);
- gBrush.selectAll('.resize').append('path').attr('d', resizePath);
-
- onBrush();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Secondary (Context) Axes
-
- x2Axis
- .scale(x2)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight2, 0);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
- d3.transition(g.select('.nv-context .nv-x.nv-axis'))
- .call(x2Axis);
-
-
- y2Axis
- .scale(y2)
- .ticks( availableHeight2 / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-context .nv-y.nv-axis'))
- .call(y2Axis);
-
- g.select('.nv-context .nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y2.range()[0] + ')');
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- //============================================================
-
-
- //============================================================
- // Functions
- //------------------------------------------------------------
-
- // Taken from crossfilter (http://square.github.com/crossfilter/)
- function resizePath(d) {
- var e = +(d == 'e'),
- x = e ? 1 : -1,
- y = availableHeight2 / 3;
- return 'M' + (.5 * x) + ',' + y
- + 'A6,6 0 0 ' + e + ' ' + (6.5 * x) + ',' + (y + 6)
- + 'V' + (2 * y - 6)
- + 'A6,6 0 0 ' + e + ' ' + (.5 * x) + ',' + (2 * y)
- + 'Z'
- + 'M' + (2.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8)
- + 'M' + (4.5 * x) + ',' + (y + 8)
- + 'V' + (2 * y - 8);
- }
-
-
- function updateBrushBG() {
- if (!brush.empty()) brush.extent(brushExtent);
- brushBG
- .data([brush.empty() ? x2.domain() : brushExtent])
- .each(function(d,i) {
- var leftWidth = x2(d[0]) - x.range()[0],
- rightWidth = x.range()[1] - x2(d[1]);
- d3.select(this).select('.left')
- .attr('width', leftWidth < 0 ? 0 : leftWidth);
-
- d3.select(this).select('.right')
- .attr('x', x2(d[1]))
- .attr('width', rightWidth < 0 ? 0 : rightWidth);
- });
- }
-
-
- function onBrush() {
- brushExtent = brush.empty() ? null : brush.extent();
- var extent = brush.empty() ? x2.domain() : brush.extent();
-
- //The brush extent cannot be less than one. If it is, don't update the line chart.
- if (Math.abs(extent[0] - extent[1]) <= 1) {
- return;
- }
-
- dispatch.brush({extent: extent, brush: brush});
-
-
- updateBrushBG();
-
- // Update Main (Focus)
- var focusLinesWrap = g.select('.nv-focus .nv-linesWrap')
- .datum(
- data
- .filter(function(d) { return !d.disabled })
- .map(function(d,i) {
- return {
- key: d.key,
- values: d.values.filter(function(d,i) {
- return lines.x()(d,i) >= extent[0] && lines.x()(d,i) <= extent[1];
- })
- }
- })
- );
- focusLinesWrap.transition().duration(transitionDuration).call(lines);
-
-
- // Update Main (Focus) Axes
- g.select('.nv-focus .nv-x.nv-axis').transition().duration(transitionDuration)
- .call(xAxis);
- g.select('.nv-focus .nv-y.nv-axis').transition().duration(transitionDuration)
- .call(yAxis);
- }
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.legend = legend;
- chart.lines = lines;
- chart.lines2 = lines2;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.x2Axis = x2Axis;
- chart.y2Axis = y2Axis;
-
- d3.rebind(chart, lines, 'defined', 'isArea', 'size', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'interactive', 'clipEdge', 'clipVoronoi', 'id');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return lines.x;
- lines.x(_);
- lines2.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return lines.y;
- lines.y(_);
- lines2.y(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.margin2 = function(_) {
- if (!arguments.length) return margin2;
- margin2 = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.height2 = function(_) {
- if (!arguments.length) return height2;
- height2 = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color =nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return lines.interpolate();
- lines.interpolate(_);
- lines2.interpolate(_);
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- // Chart has multiple similar Axes, to prevent code duplication, probably need to link all axis functions manually like below
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xAxis.tickFormat();
- xAxis.tickFormat(_);
- x2Axis.tickFormat(_);
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yAxis.tickFormat();
- yAxis.tickFormat(_);
- y2Axis.tickFormat(_);
- return chart;
- };
-
- chart.brushExtent = function(_) {
- if (!arguments.length) return brushExtent;
- brushExtent = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBar.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBar.js
deleted file mode 100644
index 1085919b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBar.js
+++ /dev/null
@@ -1,461 +0,0 @@
-
-nv.models.multiBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , stackOffset = 'zero' // options include 'silhouette', 'wiggle', 'expand', 'zero', or a custom function
- , color = nv.utils.defaultColor()
- , hideable = false
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , groupSpacing = 0.1
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if(hideable && data.length) hideable = [{
- values: data[0].values.map(function(d) {
- return {
- x: d.x,
- y: 0,
- series: d.series,
- size: 0.01
- };}
- )}];
-
- if (stacked)
- data = d3.layout.stack()
- .offset(stackOffset)
- .values(function(d){ return d.values })
- .y(getY)
- (!data.length && hideable ? hideable : data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = f.size + posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableWidth], groupSpacing);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y1 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 : d.y1 + d.y ) : d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .transition()
- .selectAll('rect.nv-bar')
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups
- .transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return (hideable && !data.length) ? hideable.values : d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (j * x.rangeBand() / data.length )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) )
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- ;
- bars
- .style('fill', function(d,i,j){ return color(d, j, i); })
- .style('stroke', function(d,i,j){ return color(d, j, i); })
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .transition()
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
-
- if (stacked)
- bars.transition()
- .delay(function(d,i) {
-
- return i * delay / data[0].values.length;
- })
- .attr('y', function(d,i) {
-
- return y((stacked ? d.y1 : 0));
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0))),1);
- })
- .attr('x', function(d,i) {
- return stacked ? 0 : (d.series * x.rangeBand() / data.length )
- })
- .attr('width', x.rangeBand() / (stacked ? 1 : data.length) );
- else
- bars.transition()
- .delay(function(d,i) {
- return i * delay/ data[0].values.length;
- })
- .attr('x', function(d,i) {
- return d.series * x.rangeBand() / data.length
- })
- .attr('width', x.rangeBand() / data.length)
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(0) - y(getY(d,i)) < 1 ?
- y(0) - 1 :
- y(getY(d,i)) || 0;
- })
- .attr('height', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1) || 0;
- });
-
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.stackOffset = function(_) {
- if (!arguments.length) return stackOffset;
- stackOffset = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.hideable = function(_) {
- if (!arguments.length) return hideable;
- hideable = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.groupSpacing = function(_) {
- if (!arguments.length) return groupSpacing;
- groupSpacing = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarChart.js
deleted file mode 100644
index 0323063f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarChart.js
+++ /dev/null
@@ -1,524 +0,0 @@
-
-nv.models.multiBarChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBar()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , reduceXTicks = true // if false a tick will show for every data point
- , staggerLabels = false
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: false }
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(true)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (staggerLabels) {
- var getTranslate = function(x,y) {
- return "translate(" + x + "," + y + ")";
- };
-
- var staggerUp = 5, staggerDown = 17; //pixels to stagger by
- // Issue #140
- xTicks
- .selectAll("text")
- .attr('transform', function(d,i,j) {
- return getTranslate(0, (j % 2 == 0 ? staggerUp : staggerDown));
- });
-
- var totalInBetweenTicks = d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;
- g.selectAll(".nv-x.nv-axis .nv-axisMaxMin text")
- .attr("transform", function(d,i) {
- return getTranslate(0, (i === 0 || totalInBetweenTicks % 2 !== 0) ? staggerDown : staggerUp);
- });
- }
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('.tick text')
- .attr('transform', 'rotate(' + rotateLabels + ' 0,0)')
- .style('text-anchor', rotateLabels > 0 ? 'start' : 'end');
-
- g.select('.nv-x.nv-axis').selectAll('g.nv-axisMaxMin text')
- .style('opacity', 1);
- }
-
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
- }
-
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge',
- 'id', 'stacked', 'stackOffset', 'delay', 'barColor','groupSpacing');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.staggerLabels = function(_) {
- if (!arguments.length) return staggerLabels;
- staggerLabels = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontal.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontal.js
deleted file mode 100644
index d16d4605..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontal.js
+++ /dev/null
@@ -1,424 +0,0 @@
-
-nv.models.multiBarHorizontal = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.ordinal()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , color = nv.utils.defaultColor()
- , barColor = null // adding the ability to set the color for each rather than the whole group
- , disabled // used in conjunction with barColor to communicate from multiBarHorizontalChart what series are disabled
- , stacked = false
- , showValues = false
- , valuePadding = 60
- , valueFormat = d3.format(',.2f')
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
-
-
- //------------------------------------------------------------
- // HACK for negative value stacking
- if (stacked)
- data[0].values.map(function(d,i) {
- var posBase = 0, negBase = 0;
- data.map(function(d) {
- var f = d.values[i]
- f.size = Math.abs(f.y);
- if (f.y<0) {
- f.y1 = negBase - f.size;
- negBase = negBase - f.size;
- } else
- {
- f.y1 = posBase;
- posBase = posBase + f.size;
- }
- });
- });
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0, y1: d.y1 }
- })
- });
-
- x .domain(xDomain || d3.merge(seriesData).map(function(d) { return d.x }))
- .rangeBands(xRange || [0, availableHeight], .1);
-
- //y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return stacked ? (d.y > 0 ? d.y1 + d.y : d.y1 ) : d.y }).concat(forceY)))
-
- if (showValues && !stacked)
- y.range(yRange || [(y.domain()[0] < 0 ? valuePadding : 0), availableWidth - (y.domain()[1] > 0 ? valuePadding : 0) ]);
- else
- y.range(yRange || [0, availableWidth]);
-
- x0 = x0 || x;
- y0 = y0 || d3.scale.linear().domain(y.domain()).range([y(0),y(0)]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-multibarHorizontal').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibarHorizontal');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d,i) { return i });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit().transition()
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- groups.transition()
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('g.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
-
- var barsEnter = bars.enter().append('g')
- .attr('transform', function(d,i,j) {
- return 'translate(' + y0(stacked ? d.y0 : 0) + ',' + (stacked ? 0 : (j * x.rangeBand() / data.length ) + x(getX(d,i))) + ')'
- });
-
- barsEnter.append('rect')
- .attr('width', 0)
- .attr('height', x.rangeBand() / (stacked ? 1 : data.length) )
-
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [ y(getY(d,i) + (stacked ? d.y0 : 0)), x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length) ],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (x.rangeBand() * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
-
-
- barsEnter.append('text');
-
- if (showValues && !stacked) {
- bars.select('text')
- .attr('text-anchor', function(d,i) { return getY(d,i) < 0 ? 'end' : 'start' })
- .attr('y', x.rangeBand() / (data.length * 2))
- .attr('dy', '.32em')
- .text(function(d,i) { return valueFormat(getY(d,i)) })
- bars.transition()
- .select('text')
- .attr('x', function(d,i) { return getY(d,i) < 0 ? -4 : y(getY(d,i)) - y(0) + 4 })
- } else {
- bars.selectAll('text').text('');
- }
-
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
-
- if (barColor) {
- if (!disabled) disabled = data.map(function() { return true });
- bars
- .style('fill', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); })
- .style('stroke', function(d,i,j) { return d3.rgb(barColor(d,i)).darker( disabled.map(function(d,i) { return i }).filter(function(d,i){ return !disabled[i] })[j] ).toString(); });
- }
-
- if (stacked)
- bars.transition()
- .attr('transform', function(d,i) {
- return 'translate(' + y(d.y1) + ',' + x(getX(d,i)) + ')'
- })
- .select('rect')
- .attr('width', function(d,i) {
- return Math.abs(y(getY(d,i) + d.y0) - y(d.y0))
- })
- .attr('height', x.rangeBand() );
- else
- bars.transition()
- .attr('transform', function(d,i) {
- //TODO: stacked must be all positive or all negative, not both?
- return 'translate(' +
- (getY(d,i) < 0 ? y(getY(d,i)) : y(0))
- + ',' +
- (d.series * x.rangeBand() / data.length
- +
- x(getX(d,i)) )
- + ')'
- })
- .select('rect')
- .attr('height', x.rangeBand() / data.length )
- .attr('width', function(d,i) {
- return Math.max(Math.abs(y(getY(d,i)) - y(0)),1)
- });
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.barColor = function(_) {
- if (!arguments.length) return barColor;
- barColor = nv.utils.getColor(_);
- return chart;
- };
-
- chart.disabled = function(_) {
- if (!arguments.length) return disabled;
- disabled = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- chart.showValues = function(_) {
- if (!arguments.length) return showValues;
- showValues = _;
- return chart;
- };
-
- chart.valueFormat= function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.valuePadding = function(_) {
- if (!arguments.length) return valuePadding;
- valuePadding = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontalChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontalChart.js
deleted file mode 100644
index 02aa6fa4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarHorizontalChart.js
+++ /dev/null
@@ -1,434 +0,0 @@
-
-nv.models.multiBarHorizontalChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarHorizontal()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend().height(30)
- , controls = nv.models.legend().height(30)
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , stacked = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + ' - ' + x + '</h3>' +
- '<p>' + y + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , state = { stacked: stacked }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = function() { return showControls ? 180 : 0 }
- , transitionDuration = 250
- ;
-
- multibar
- .stacked(stacked)
- ;
- xAxis
- .orient('left')
- .tickPadding(5)
- .highlightZero(false)
- .showMaxMin(false)
- .tickFormat(function(d) { return d })
- ;
- yAxis
- .orient('bottom')
- .tickFormat(d3.format(',.1f'))
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'e' : 'w', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart) };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarHorizontalChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarHorizontalChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth - controlWidth());
-
- if (multibar.barColor())
- data.forEach(function(series,i) {
- series.color = d3.rgb('#ccc').darker(i * 1.5).toString();
- })
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + controlWidth() + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(controlWidth()).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .disabled(data.map(function(series) { return series.disabled }))
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- barsWrap.transition().call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks( availableHeight / 24 )
- .tickSize(-availableWidth, 0);
-
- g.select('.nv-x.nv-axis').transition()
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
-
- yAxis
- .scale(y)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-y.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- g.select('.nv-y.nv-axis').transition()
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- state.stacked = multibar.stacked();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.stacked !== 'undefined') {
- multibar.stacked(e.stacked);
- state.stacked = e.stacked;
- }
-
- selection.call(chart);
- });
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'delay', 'showValues', 'valueFormat', 'stacked', 'barColor');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeries.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeries.js
deleted file mode 100644
index abc062c3..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeries.js
+++ /dev/null
@@ -1,384 +0,0 @@
-nv.models.multiBarTimeSeries = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , x = d3.time.scale()
- , y = d3.scale.linear()
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , forceY = [0] // 0 is forced by default.. this makes sense for the majority of bar graphs... user can always do chart.forceY([]) to remove
- , clipEdge = true
- , stacked = false
- , color = nv.utils.defaultColor()
- , delay = 1200
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0 //used to store previous scales
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- if (stacked)
- data = d3.layout.stack()
- .offset('zero')
- .values(function(d){ return d.values })
- .y(getY)
- (data);
-
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain) ? [] : // if we know xDomain and yDomain, no need to calculate
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), y0: d.y0 }
- })
- });
-
- x .domain(xDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.x })))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(d3.merge(seriesData).map(function(d) { return d.y + (stacked ? d.y0 : 0) }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multibar').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multibar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-groups');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- d3.transition(groups.exit())
- //.style('stroke-opacity', 1e-6)
- //.style('fill-opacity', 1e-6)
- .selectAll('rect.nv-bar')
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('y', function(d) { return stacked ? y0(d.y0) : y0(0) })
- .attr('height', 0)
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover })
- .style('fill', function(d,i){ return color(d, i) })
- .style('stroke', function(d,i){ return color(d, i) });
- d3.transition(groups)
- .style('stroke-opacity', 1)
- .style('fill-opacity', .75);
-
-
- var bars = groups.selectAll('rect.nv-bar')
- .data(function(d) { return d.values });
-
- bars.exit().remove();
-
- var maxElements = 0;
- for(var ei=0; ei<seriesData.length; ei+=1) {
- maxElements = Math.max(seriesData[ei].length, maxElements);
- }
-
- var bandWidth = (availableWidth / maxElements)-0.1;
- var barWidth = bandWidth / data.length;
-
- var barsEnter = bars.enter().append('rect')
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('x', function(d,i,j) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('y', function(d) { return y0(stacked ? d.y0 : 0) })
- .attr('height', 0)
- .attr('width', stacked ? bandWidth : barWidth );
- bars
- .on('mouseover', function(d,i) { //TODO: figure out why j works above, but not here
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- value: getY(d,i),
- point: d,
- series: data[d.series],
- pos: [x(getX(d,i)) + (barWidth * (stacked ? data.length / 2 : d.series + .5) / data.length), y(getY(d,i) + (stacked ? d.y0 : 0))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: d.series,
- e: d3.event
- });
- d3.event.stopPropagation();
- });
- bars
- .attr('class', function(d,i) { return getY(d,i) < 0 ? 'nv-bar negative' : 'nv-bar positive'})
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',0)'; })
- if (stacked)
- d3.transition(bars)
- .delay(function(d,i) { return i * delay / data[0].values.length })
- .attr('y', function(d,i) {
- return y(getY(d,i) + (stacked ? d.y0 : 0));
- })
- .attr('height', function(d,i) {
- return Math.abs(y(d.y + (stacked ? d.y0 : 0)) - y((stacked ? d.y0 : 0)))
- })
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('x', function(d,i) {
- return stacked ? 0 : (i * bandWidth) + ( j * barWidth )
- })
- .attr('width', stacked ? bandWidth : barWidth );
- })
- else
- d3.transition(bars)
- .delay(function(d,i) { return i * delay/ data[0].values.length })
- .attr('x', function(d,i) {
- return d.series * barWidth
- })
- .attr('width', barWidth)
- .each('end', function() {
- d3.transition(d3.select(this))
- .attr('y', function(d,i) {
- return getY(d,i) < 0 ?
- y(0) :
- y(getY(d,i))
- })
- .attr('height', function(d,i) {
- return Math.abs(y(getY(d,i)) - y(0))
- });
- })
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.stacked = function(_) {
- if (!arguments.length) return stacked;
- stacked = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.delay = function(_) {
- if (!arguments.length) return delay;
- delay = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeriesChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeriesChart.js
deleted file mode 100644
index 5aebafa7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiBarTimeSeriesChart.js
+++ /dev/null
@@ -1,405 +0,0 @@
-nv.models.multiBarTimeSeriesChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var multibar = nv.models.multiBarTimeSeries()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , showControls = true
- , showLegend = true
- , reduceXTicks = true // if false a tick will show for every data point
- , rotateLabels = 0
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide')
- ;
-
- multibar
- .stacked(false)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(7)
- .highlightZero(false)
- .showMaxMin(false)
- ;
- yAxis
- .orient('left')
- .tickFormat(d3.format(',.1f'))
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(multibar.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(multibar.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { selection.transition().call(chart) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = multibar.xScale();
- y = multibar.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-multiBarWithLegend').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-multiBarWithLegend').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-barsWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width(availableWidth / 2);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- { key: 'Grouped', disabled: multibar.stacked() },
- { key: 'Stacked', disabled: !multibar.stacked() }
- ];
-
- controls.width(180).color(['#444', '#444', '#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- multibar
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
-
- var barsWrap = g.select('.nv-barsWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
-
- d3.transition(barsWrap).call(multibar);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- xAxis
- .scale(x)
- .ticks(availableWidth / 100)
- .tickSize(-availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')');
- d3.transition(g.select('.nv-x.nv-axis'))
- .call(xAxis);
-
- var xTicks = g.select('.nv-x.nv-axis > g').selectAll('g');
-
- xTicks
- .selectAll('line, text')
- .style('opacity', 1)
-
- if (reduceXTicks)
- xTicks
- .filter(function(d,i) {
- return i % Math.ceil(data[0].values.length / (availableWidth / 100)) !== 0;
- })
- .selectAll('text, line')
- .style('opacity', 0);
-
- if(rotateLabels)
- xTicks
- .selectAll('text')
- .attr('transform', function(d,i,j) { return 'rotate('+rotateLabels+' 0,0)' })
- .attr('text-transform', rotateLabels > 0 ? 'start' : 'end');
-
- yAxis
- .scale(y)
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.nv-y.nv-axis'))
- .call(yAxis);
-
- //------------------------------------------------------------
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- legend.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- if (!data.filter(function(d) { return !d.disabled }).length) {
- data.map(function(d) {
- d.disabled = false;
- wrap.selectAll('.nv-series').classed('disabled', false);
- return d;
- });
- }
-
- selection.transition().call(chart);
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- switch (d.key) {
- case 'Grouped':
- multibar.stacked(false);
- break;
- case 'Stacked':
- multibar.stacked(true);
- break;
- }
-
- selection.transition().call(chart);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode)
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- multibar.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- multibar.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.multibar = multibar;
- chart.legend = legend;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
-
- d3.rebind(chart, multibar, 'x', 'y', 'xDomain', 'yDomain', 'xRange', 'yRange', 'forceX', 'forceY', 'clipEdge', 'id', 'stacked', 'delay');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.reduceXTicks= function(_) {
- if (!arguments.length) return reduceXTicks;
- reduceXTicks = _;
- return chart;
- };
-
- chart.rotateLabels = function(_) {
- if (!arguments.length) return rotateLabels;
- rotateLabels = _;
- return chart;
- }
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiChart.js
deleted file mode 100644
index e3e2c5e8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/multiChart.js
+++ /dev/null
@@ -1,452 +0,0 @@
-nv.models.multiChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 30, right: 20, bottom: 50, left: 60},
- color = d3.scale.category20().range(),
- width = null,
- height = null,
- showLegend = true,
- tooltips = true,
- tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' at ' + x + '</p>'
- },
- x,
- y,
- yDomain1,
- yDomain2
- ; //can be accessed via chart.lines.[x/y]Scale()
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x = d3.scale.linear(),
- yScale1 = d3.scale.linear(),
- yScale2 = d3.scale.linear(),
-
- lines1 = nv.models.line().yScale(yScale1),
- lines2 = nv.models.line().yScale(yScale2),
-
- bars1 = nv.models.multiBar().stacked(false).yScale(yScale1),
- bars2 = nv.models.multiBar().stacked(false).yScale(yScale2),
-
- stack1 = nv.models.stackedArea().yScale(yScale1),
- stack2 = nv.models.stackedArea().yScale(yScale2),
-
- xAxis = nv.models.axis().scale(x).orient('bottom').tickPadding(5),
- yAxis1 = nv.models.axis().scale(yScale1).orient('left'),
- yAxis2 = nv.models.axis().scale(yScale2).orient('right'),
-
- legend = nv.models.legend().height(30),
- dispatch = d3.dispatch('tooltipShow', 'tooltipHide');
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(lines1.x()(e.point, e.pointIndex)),
- y = ((e.series.yAxis == 2) ? yAxis2 : yAxis1).tickFormat()(lines1.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, undefined, undefined, offsetElement.offsetParent);
- };
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- var dataLines1 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 1})
- var dataLines2 = data.filter(function(d) {return !d.disabled && d.type == 'line' && d.yAxis == 2})
- var dataBars1 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 1})
- var dataBars2 = data.filter(function(d) {return !d.disabled && d.type == 'bar' && d.yAxis == 2})
- var dataStack1 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 1})
- var dataStack2 = data.filter(function(d) {return !d.disabled && d.type == 'area' && d.yAxis == 2})
-
- var series1 = data.filter(function(d) {return !d.disabled && d.yAxis == 1})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- var series2 = data.filter(function(d) {return !d.disabled && d.yAxis == 2})
- .map(function(d) {
- return d.values.map(function(d,i) {
- return { x: d.x, y: d.y }
- })
- })
-
- x .domain(d3.extent(d3.merge(series1.concat(series2)), function(d) { return d.x } ))
- .range([0, availableWidth]);
-
- var wrap = container.selectAll('g.wrap.multiChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'wrap nvd3 multiChart').append('g');
-
- gEnter.append('g').attr('class', 'x axis');
- gEnter.append('g').attr('class', 'y1 axis');
- gEnter.append('g').attr('class', 'y2 axis');
- gEnter.append('g').attr('class', 'lines1Wrap');
- gEnter.append('g').attr('class', 'lines2Wrap');
- gEnter.append('g').attr('class', 'bars1Wrap');
- gEnter.append('g').attr('class', 'bars2Wrap');
- gEnter.append('g').attr('class', 'stack1Wrap');
- gEnter.append('g').attr('class', 'stack2Wrap');
- gEnter.append('g').attr('class', 'legendWrap');
-
- var g = wrap.select('g');
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- g.select('.legendWrap')
- .datum(data.map(function(series) {
- series.originalKey = series.originalKey === undefined ? series.key : series.originalKey;
- series.key = series.originalKey + (series.yAxis == 1 ? '' : ' (right axis)');
- return series;
- }))
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.legendWrap')
- .attr('transform', 'translate(' + ( availableWidth / 2 ) + ',' + (-margin.top) +')');
- }
-
-
- lines1
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'line'}));
-
- lines2
- .width(availableWidth)
- .height(availableHeight)
- .interpolate("monotone")
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'line'}));
-
- bars1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'bar'}));
-
- bars2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'bar'}));
-
- stack1
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 1 && data[i].type == 'area'}));
-
- stack2
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color[i % color.length];
- }).filter(function(d,i) { return !data[i].disabled && data[i].yAxis == 2 && data[i].type == 'area'}));
-
- g.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- var lines1Wrap = g.select('.lines1Wrap')
- .datum(dataLines1)
- var bars1Wrap = g.select('.bars1Wrap')
- .datum(dataBars1)
- var stack1Wrap = g.select('.stack1Wrap')
- .datum(dataStack1)
-
- var lines2Wrap = g.select('.lines2Wrap')
- .datum(dataLines2)
- var bars2Wrap = g.select('.bars2Wrap')
- .datum(dataBars2)
- var stack2Wrap = g.select('.stack2Wrap')
- .datum(dataStack2)
-
- var extraValue1 = dataStack1.length ? dataStack1.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
- var extraValue2 = dataStack2.length ? dataStack2.map(function(a){return a.values}).reduce(function(a,b){
- return a.map(function(aVal,i){return {x: aVal.x, y: aVal.y + b[i].y}})
- }).concat([{x:0, y:0}]) : []
-
- yScale1 .domain(yDomain1 || d3.extent(d3.merge(series1).concat(extraValue1), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- yScale2 .domain(yDomain2 || d3.extent(d3.merge(series2).concat(extraValue2), function(d) { return d.y } ))
- .range([0, availableHeight])
-
- lines1.yDomain(yScale1.domain())
- bars1.yDomain(yScale1.domain())
- stack1.yDomain(yScale1.domain())
-
- lines2.yDomain(yScale2.domain())
- bars2.yDomain(yScale2.domain())
- stack2.yDomain(yScale2.domain())
-
- if(dataStack1.length){d3.transition(stack1Wrap).call(stack1);}
- if(dataStack2.length){d3.transition(stack2Wrap).call(stack2);}
-
- if(dataBars1.length){d3.transition(bars1Wrap).call(bars1);}
- if(dataBars2.length){d3.transition(bars2Wrap).call(bars2);}
-
- if(dataLines1.length){d3.transition(lines1Wrap).call(lines1);}
- if(dataLines2.length){d3.transition(lines2Wrap).call(lines2);}
-
-
-
- xAxis
- .ticks( availableWidth / 100 )
- .tickSize(-availableHeight, 0);
-
- g.select('.x.axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
- d3.transition(g.select('.x.axis'))
- .call(xAxis);
-
- yAxis1
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
-
- d3.transition(g.select('.y1.axis'))
- .call(yAxis1);
-
- yAxis2
- .ticks( availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- d3.transition(g.select('.y2.axis'))
- .call(yAxis2);
-
- g.select('.y2.axis')
- .style('opacity', series2.length ? 1 : 0)
- .attr('transform', 'translate(' + x.range()[1] + ',0)');
-
- legend.dispatch.on('stateChange', function(newState) {
- chart.update();
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- bars2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- bars2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack1.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack1.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack1.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- stack2.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- if (!Math.round(stack2.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stack2.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines1.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines1.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- lines2.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- lines2.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
-
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.lines1 = lines1;
- chart.lines2 = lines2;
- chart.bars1 = bars1;
- chart.bars2 = bars2;
- chart.stack1 = stack1;
- chart.stack2 = stack2;
- chart.xAxis = xAxis;
- chart.yAxis1 = yAxis1;
- chart.yAxis2 = yAxis2;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- lines1.x(_);
- bars1.x(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- lines1.y(_);
- bars1.y(_);
- return chart;
- };
-
- chart.yDomain1 = function(_) {
- if (!arguments.length) return yDomain1;
- yDomain1 = _;
- return chart;
- };
-
- chart.yDomain2 = function(_) {
- if (!arguments.length) return yDomain2;
- yDomain2 = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin = _;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = _;
- legend.color(_);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- return chart;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/ohlcBar.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/ohlcBar.js
deleted file mode 100644
index 46f2b60c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/ohlcBar.js
+++ /dev/null
@@ -1,380 +0,0 @@
-
-nv.models.ohlcBar = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getOpen = function(d) { return d.open }
- , getClose = function(d) { return d.close }
- , getHigh = function(d) { return d.high }
- , getLow = function(d) { return d.low }
- , forceX = []
- , forceY = []
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , clipEdge = true
- , color = nv.utils.defaultColor()
- , xDomain
- , yDomain
- , xRange
- , yRange
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- //TODO: store old scales for transitions
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data[0].values.map(getX).concat(forceX) ));
-
- if (padData)
- x.range(xRange || [availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || [
- d3.min(data[0].values.map(getLow).concat(forceY)),
- d3.max(data[0].values.map(getHigh).concat(forceY))
- ])
- .range(yRange || [availableHeight, 0]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] + y.domain()[0] * 0.01, y.domain()[1] - y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = d3.select(this).selectAll('g.nv-wrap.nv-ohlcBar').data([data[0].values]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-ohlcBar');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-ticks');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-chart-clip-path-' + id)
- .append('rect');
-
- wrap.select('#nv-chart-clip-path-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-chart-clip-path-' + id + ')' : '');
-
-
-
- var ticks = wrap.select('.nv-ticks').selectAll('.nv-tick')
- .data(function(d) { return d });
-
- ticks.exit().remove();
-
-
- var ticksEnter = ticks.enter().append('path')
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i)) - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- //.attr('fill', function(d,i) { return color[0]; })
- //.attr('stroke', function(d,i) { return color[0]; })
- //.attr('x', 0 )
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- point: d,
- series: data[0],
- pos: [x(getX(d,i)), y(getY(d,i))], // TODO: Figure out why the value appears to be shifted
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
-
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- point: d,
- series: data[0],
- pointIndex: i,
- seriesIndex: 0,
- e: d3.event
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- //label: d[label],
- value: getY(d,i),
- data: d,
- index: i,
- pos: [x(getX(d,i)), y(getY(d,i))],
- e: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- ticks
- .attr('class', function(d,i,j) { return (getOpen(d,i) > getClose(d,i) ? 'nv-tick negative' : 'nv-tick positive') + ' nv-tick-' + j + '-' + i })
- d3.transition(ticks)
- .attr('transform', function(d,i) { return 'translate(' + x(getX(d,i)) + ',' + y(getHigh(d,i)) + ')'; })
- .attr('d', function(d,i) {
- var w = (availableWidth / data[0].values.length) * .9;
- return 'm0,0l0,'
- + (y(getOpen(d,i))
- - y(getHigh(d,i)))
- + 'l'
- + (-w/2)
- + ',0l'
- + (w/2)
- + ',0l0,'
- + (y(getLow(d,i))
- - y(getOpen(d,i)))
- + 'l0,'
- + (y(getClose(d,i))
- - y(getLow(d,i)))
- + 'l'
- + (w/2)
- + ',0l'
- + (-w/2)
- + ',0z';
- })
- //.attr('width', (availableWidth / data[0].values.length) * .9 )
-
-
- //d3.transition(ticks)
- //.attr('y', function(d,i) { return y(Math.max(0, getY(d,i))) })
- //.attr('height', function(d,i) { return Math.abs(y(getY(d,i)) - y(0)) });
- //.order(); // not sure if this makes any sense for this model
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = _;
- return chart;
- };
-
- chart.open = function(_) {
- if (!arguments.length) return getOpen;
- getOpen = _;
- return chart;
- };
-
- chart.close = function(_) {
- if (!arguments.length) return getClose;
- getClose = _;
- return chart;
- };
-
- chart.high = function(_) {
- if (!arguments.length) return getHigh;
- getHigh = _;
- return chart;
- };
-
- chart.low = function(_) {
- if (!arguments.length) return getLow;
- getLow = _;
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/parallelCoordinates.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/parallelCoordinates.js
deleted file mode 100644
index 107154f7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/parallelCoordinates.js
+++ /dev/null
@@ -1,239 +0,0 @@
-
-//Code adapted from Jason Davies' "Parallel Coordinates"
-// http://bl.ocks.org/jasondavies/1341281
-
-nv.models.parallelCoordinates = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
-
- var margin = {top: 30, right: 10, bottom: 10, left: 10}
- , width = 960
- , height = 500
- , x = d3.scale.ordinal()
- , y = {}
- , dimensions = []
- , color = nv.utils.getColor(d3.scale.category20c().range())
- , axisLabel = function(d) { return d; }
- , filters = []
- , active = []
- , dispatch = d3.dispatch('brush')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- active = data; //set all active before first brush call
-
- chart.update = function() { }; //This is a placeholder until this chart is made resizeable
-
- //------------------------------------------------------------
- // Setup Scales
-
- x
- .rangePoints([0, availableWidth], 1)
- .domain(dimensions);
-
- // Extract the list of dimensions and create a scale for each.
- dimensions.forEach(function(d) {
- y[d] = d3.scale.linear()
- .domain(d3.extent(data, function(p) { return +p[d]; }))
- .range([availableHeight, 0]);
-
- y[d].brush = d3.svg.brush().y(y[d]).on('brush', brush);
-
- return d != 'name';
- })
-
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-parallelCoordinates').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-parallelCoordinates');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- gEnter.append('g').attr('class', 'nv-parallelCoordinatesWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- var line = d3.svg.line(),
- axis = d3.svg.axis().orient('left'),
- background,
- foreground;
-
-
- // Add grey background lines for context.
- background = gEnter.append('g')
- .attr('class', 'background')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add blue foreground lines for focus.
- foreground = gEnter.append('g')
- .attr('class', 'foreground')
- .selectAll('path')
- .data(data)
- .enter().append('path')
- .attr('d', path)
- ;
-
- // Add a group element for each dimension.
- var dimension = g.selectAll('.dimension')
- .data(dimensions)
- .enter().append('g')
- .attr('class', 'dimension')
- .attr('transform', function(d) { return 'translate(' + x(d) + ',0)'; });
-
- // Add an axis and title.
- dimension.append('g')
- .attr('class', 'axis')
- .each(function(d) { d3.select(this).call(axis.scale(y[d])); })
- .append('text')
- .attr('text-anchor', 'middle')
- .attr('y', -9)
- .text(String);
-
- // Add and store a brush for each axis.
- dimension.append('g')
- .attr('class', 'brush')
- .each(function(d) { d3.select(this).call(y[d].brush); })
- .selectAll('rect')
- .attr('x', -8)
- .attr('width', 16);
-
-
- // Returns the path for a given data point.
- function path(d) {
- return line(dimensions.map(function(p) { return [x(p), y[p](d[p])]; }));
- }
-
- // Handles a brush event, toggling the display of foreground lines.
- function brush() {
- var actives = dimensions.filter(function(p) { return !y[p].brush.empty(); }),
- extents = actives.map(function(p) { return y[p].brush.extent(); });
-
- filters = []; //erase current filters
- actives.forEach(function(d,i) {
- filters[i] = {
- dimension: d,
- extent: extents[i]
- }
- });
-
- active = []; //erase current active list
- foreground.style('display', function(d) {
- var isActive = actives.every(function(p, i) {
- return extents[i][0] <= d[p] && d[p] <= extents[i][1];
- });
- if (isActive) active.push(d);
- return isActive ? null : 'none';
- });
-
- dispatch.brush({
- filters: filters,
- active: active
- });
-
- }
-
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_)
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.dimensions = function(_) {
- if (!arguments.length) return dimensions;
- dimensions = _;
- return chart;
- };
-
- chart.filters = function() {
- return filters;
- };
-
- chart.active = function() {
- return active;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js
deleted file mode 100644
index 2099c8f3..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js
+++ /dev/null
@@ -1,400 +0,0 @@
-nv.models.pie = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelType = "key"
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data(data);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc);
- //.attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return Math.round(percent*1001/10)+"%";
- /*var labelTypes = {
- "key" : getX(d.data),
- "value": getY(d.data),
- "percent": d3.format('%')(percent)
- };
- return (d.value && percent > labelThreshold) ? labelTypes[labelType] : '';
- */
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- nv.log("pie.values() is no longer supported.");
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.labelType = function(_) {
- if (!arguments.length) return labelType;
- labelType = _;
- labelType = labelType || "key";
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js.bak b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js.bak
deleted file mode 100644
index aac835d2..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pie.js.bak
+++ /dev/null
@@ -1,400 +0,0 @@
-nv.models.pie = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 500
- , height = 500
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , getDescription = function(d) { return d.description }
- , id = Math.floor(Math.random() * 10000) //Create semi-unique ID in case user doesn't select one
- , color = nv.utils.defaultColor()
- , valueFormat = d3.format(',.2f')
- , showLabels = true
- , pieLabelsOutside = true
- , donutLabelsOutside = false
- , labelType = "key"
- , labelThreshold = .02 //if slice percentage is under this, don't show label
- , donut = false
- , labelSunbeamLayout = false
- , startAngle = false
- , endAngle = false
- , donutRatio = 0.5
- , dispatch = d3.dispatch('chartClick', 'elementClick', 'elementDblClick', 'elementMouseover', 'elementMouseout')
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- radius = Math.min(availableWidth, availableHeight) / 2,
- arcRadius = radius-(radius / 5),
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- //var wrap = container.selectAll('.nv-wrap.nv-pie').data([data]);
- var wrap = container.selectAll('.nv-wrap.nv-pie').data(data);
- var wrapEnter = wrap.enter().append('g').attr('class','nvd3 nv-wrap nv-pie nv-chart-' + id);
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pie');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
- g.select('.nv-pie').attr('transform', 'translate(' + availableWidth / 2 + ',' + availableHeight / 2 + ')');
-
- //------------------------------------------------------------
-
-
- container
- .on('click', function(d,i) {
- dispatch.chartClick({
- data: d,
- index: i,
- pos: d3.event,
- id: id
- });
- });
-
-
- var arc = d3.svg.arc()
- .outerRadius(arcRadius);
-
- if (startAngle) arc.startAngle(startAngle)
- if (endAngle) arc.endAngle(endAngle);
- if (donut) arc.innerRadius(radius * donutRatio);
-
- // Setup the Pie chart and choose the data element
- var pie = d3.layout.pie()
- .sort(null)
- .value(function(d) { return d.disabled ? 0 : getY(d) });
-
- var slices = wrap.select('.nv-pie').selectAll('.nv-slice')
- .data(pie);
-
- slices.exit().remove();
-
- var ae = slices.enter().append('g')
- .attr('class', 'nv-slice')
- .on('mouseover', function(d,i){
- d3.select(this).classed('hover', true);
- dispatch.elementMouseover({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- pointIndex: i,
- pos: [d3.event.pageX, d3.event.pageY],
- id: id
- });
- })
- .on('mouseout', function(d,i){
- d3.select(this).classed('hover', false);
- dispatch.elementMouseout({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- id: id
- });
- })
- .on('click', function(d,i) {
- dispatch.elementClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- })
- .on('dblclick', function(d,i) {
- dispatch.elementDblClick({
- label: getX(d.data),
- value: getY(d.data),
- point: d.data,
- index: i,
- pos: d3.event,
- id: id
- });
- d3.event.stopPropagation();
- });
-
- slices
- .attr('fill', function(d,i) { return color(d, i); })
- .attr('stroke', function(d,i) { return color(d, i); });
-
- var paths = ae.append('path')
- .each(function(d) { this._current = d; });
- //.attr('d', arc);
-
- d3.transition(slices.select('path'))
- .attr('d', arc)
- .attrTween('d', arcTween);
-
- if (showLabels) {
- // This does the normal label
- var labelsArc = d3.svg.arc().innerRadius(0);
-
- if (pieLabelsOutside){ labelsArc = arc; }
-
- if (donutLabelsOutside) { labelsArc = d3.svg.arc().outerRadius(arc.outerRadius()); }
-
- ae.append("g").classed("nv-label", true)
- .each(function(d, i) {
- var group = d3.select(this);
-
- group
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- group.append('rect')
- .style('stroke', '#fff')
- .style('fill', '#fff')
- .attr("rx", 3)
- .attr("ry", 3);
-
- group.append('text')
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .style('fill', '#000')
-
-
- });
-
- slices.select(".nv-label").transition()
- .attr('transform', function(d) {
- if (labelSunbeamLayout) {
- d.outerRadius = arcRadius + 10; // Set Outer Coordinate
- d.innerRadius = arcRadius + 15; // Set Inner Coordinate
- var rotateAngle = (d.startAngle + d.endAngle) / 2 * (180 / Math.PI);
- if ((d.startAngle+d.endAngle)/2 < Math.PI) {
- rotateAngle -= 90;
- } else {
- rotateAngle += 90;
- }
- return 'translate(' + labelsArc.centroid(d) + ') rotate(' + rotateAngle + ')';
- } else {
- d.outerRadius = radius + 10; // Set Outer Coordinate
- d.innerRadius = radius + 15; // Set Inner Coordinate
- return 'translate(' + labelsArc.centroid(d) + ')'
- }
- });
-
- slices.each(function(d, i) {
- var slice = d3.select(this);
-
- slice
- .select(".nv-label text")
- .style('text-anchor', labelSunbeamLayout ? ((d.startAngle + d.endAngle) / 2 < Math.PI ? 'start' : 'end') : 'middle') //center the text on it's origin or begin/end if orthogonal aligned
- .text(function(d, i) {
- var percent = (d.endAngle - d.startAngle) / (2 * Math.PI);
- return Math.round(percent*1001/10)+"%";
- /*var labelTypes = {
- "key" : getX(d.data),
- "value": getY(d.data),
- "percent": d3.format('%')(percent)
- };
- return (d.value && percent > labelThreshold) ? labelTypes[labelType] : '';
- */
- });
-
- var textBox = slice.select('text').node().getBBox();
- slice.select(".nv-label rect")
- .attr("width", textBox.width + 10)
- .attr("height", textBox.height + 10)
- .attr("transform", function() {
- return "translate(" + [textBox.x - 5, textBox.y - 5] + ")";
- });
- });
- }
-
-
- // Computes the angle of an arc, converting from radians to degrees.
- function angle(d) {
- var a = (d.startAngle + d.endAngle) * 90 / Math.PI - 90;
- return a > 90 ? a - 180 : a;
- }
-
- function arcTween(a) {
- a.endAngle = isNaN(a.endAngle) ? 0 : a.endAngle;
- a.startAngle = isNaN(a.startAngle) ? 0 : a.startAngle;
- if (!donut) a.innerRadius = 0;
- var i = d3.interpolate(this._current, a);
- this._current = i(0);
- return function(t) {
- return arc(i(t));
- };
- }
-
- function tweenPie(b) {
- b.innerRadius = 0;
- var i = d3.interpolate({startAngle: 0, endAngle: 0}, b);
- return function(t) {
- return arc(i(t));
- };
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.values = function(_) {
- nv.log("pie.values() is no longer supported.");
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = _;
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.description = function(_) {
- if (!arguments.length) return getDescription;
- getDescription = _;
- return chart;
- };
-
- chart.showLabels = function(_) {
- if (!arguments.length) return showLabels;
- showLabels = _;
- return chart;
- };
-
- chart.labelSunbeamLayout = function(_) {
- if (!arguments.length) return labelSunbeamLayout;
- labelSunbeamLayout = _;
- return chart;
- };
-
- chart.donutLabelsOutside = function(_) {
- if (!arguments.length) return donutLabelsOutside;
- donutLabelsOutside = _;
- return chart;
- };
-
- chart.pieLabelsOutside = function(_) {
- if (!arguments.length) return pieLabelsOutside;
- pieLabelsOutside = _;
- return chart;
- };
-
- chart.labelType = function(_) {
- if (!arguments.length) return labelType;
- labelType = _;
- labelType = labelType || "key";
- return chart;
- };
-
- chart.donut = function(_) {
- if (!arguments.length) return donut;
- donut = _;
- return chart;
- };
-
- chart.donutRatio = function(_) {
- if (!arguments.length) return donutRatio;
- donutRatio = _;
- return chart;
- };
-
- chart.startAngle = function(_) {
- if (!arguments.length) return startAngle;
- startAngle = _;
- return chart;
- };
-
- chart.endAngle = function(_) {
- if (!arguments.length) return endAngle;
- endAngle = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.valueFormat = function(_) {
- if (!arguments.length) return valueFormat;
- valueFormat = _;
- return chart;
- };
-
- chart.labelThreshold = function(_) {
- if (!arguments.length) return labelThreshold;
- labelThreshold = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pieChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pieChart.js
deleted file mode 100644
index b4303fd6..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/pieChart.js
+++ /dev/null
@@ -1,292 +0,0 @@
-nv.models.pieChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var pie = nv.models.pie()
- , legend = nv.models.legend()
- ;
-
- var margin = {top: 30, right: 20, bottom: 20, left: 20}
- , width = null
- , height = null
- , showLegend = true
- , color = nv.utils.defaultColor()
- , tooltips = false
- , tooltip = function(key, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + '</p>'
- }
- , state = {}
- , defaultState = null
- , noData = "No Data Available."
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var tooltipLabel = pie.description()(e.point) || pie.x()(e.point)
- var left = e.pos[0] + ( (offsetElement && offsetElement.offsetLeft) || 0 ),
- top = e.pos[1] + ( (offsetElement && offsetElement.offsetTop) || 0),
- y = pie.valueFormat()(pie.y()(e.point)),
- content = tooltip(tooltipLabel, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-pieChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-pieChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-pieWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend
- .width( availableWidth )
- .key(pie.x());
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- pie
- .width(availableWidth)
- .height(availableHeight);
-
-
- var pieWrap = g.select('.nv-pieWrap')
- .datum([data]);
-
- d3.transition(pieWrap).call(pie);
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- /*legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });*/
-
- pie.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- });
-
- return chart;
- }
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- pie.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.legend = legend;
- chart.dispatch = dispatch;
- chart.pie = pie;
-
- d3.rebind(chart, pie, 'valueFormat', 'values', 'x', 'y', 'description', 'id', 'showLabels', 'donutLabelsOutside', 'pieLabelsOutside', 'labelType', 'donut', 'donutRatio', 'labelThreshold');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- pie.color(color);
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatter.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatter.js
deleted file mode 100644
index 16cbee65..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatter.js
+++ /dev/null
@@ -1,674 +0,0 @@
-
-nv.models.scatter = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // chooses color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't select one
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , z = d3.scale.linear() //linear because d3.svg.shape.size is treated as area
- , getX = function(d) { return d.x } // accessor to get the x value
- , getY = function(d) { return d.y } // accessor to get the y value
- , getSize = function(d) { return d.size || 1} // accessor to get the point size
- , getShape = function(d) { return d.shape || 'circle' } // accessor to get point shape
- , onlyCircles = true // Set to false to use shapes
- , forceX = [] // List of numbers to Force into the X scale (ie. 0, or a max / min, etc.)
- , forceY = [] // List of numbers to Force into the Y scale
- , forceSize = [] // List of numbers to Force into the Size scale
- , interactive = true // If true, plots a voronoi overlay for advanced point intersection
- , pointKey = null
- , pointActive = function(d) { return !d.notActive } // any points that return false will be filtered out
- , padData = false // If true, adds half a data points width to front and back, for lining up a line chart with a bar chart
- , padDataOuter = .1 //outerPadding to imitate ordinal scale outer padding
- , clipEdge = false // if true, masks points within x and y scale
- , clipVoronoi = true // if true, masks each point with a circle... can turn off to slightly increase performance
- , clipRadius = function() { return 25 } // function to get the radius for voronoi point clips
- , xDomain = null // Override x domain (skips the calculation from data)
- , yDomain = null // Override y domain
- , xRange = null // Override x range
- , yRange = null // Override y range
- , sizeDomain = null // Override point size domain
- , sizeRange = null
- , singlePoint = false
- , dispatch = d3.dispatch('elementClick', 'elementMouseover', 'elementMouseout')
- , useVoronoi = true
- ;
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0, z0 // used to store previous scales
- , timeoutID
- , needsUpdate = false // Flag for when the points are visually updating, but the interactive layer is behind, to disable tooltips
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //add series index to each data point for reference
- data.forEach(function(series, i) {
- series.values.forEach(function(point) {
- point.series = i;
- });
- });
-
- //------------------------------------------------------------
- // Setup Scales
-
- // remap and flatten the data for use in calculating the scales' domains
- var seriesData = (xDomain && yDomain && sizeDomain) ? [] : // if we know xDomain and yDomain and sizeDomain, no need to calculate.... if Size is constant remember to set sizeDomain to speed up performance
- d3.merge(
- data.map(function(d) {
- return d.values.map(function(d,i) {
- return { x: getX(d,i), y: getY(d,i), size: getSize(d,i) }
- })
- })
- );
-
- x .domain(xDomain || d3.extent(seriesData.map(function(d) { return d.x; }).concat(forceX)))
-
- if (padData && data[0])
- x.range(xRange || [(availableWidth * padDataOuter + availableWidth) / (2 *data[0].values.length), availableWidth - availableWidth * (1 + padDataOuter) / (2 * data[0].values.length) ]);
- //x.range([availableWidth * .5 / data[0].values.length, availableWidth * (data[0].values.length - .5) / data[0].values.length ]);
- else
- x.range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(seriesData.map(function(d) { return d.y }).concat(forceY)))
- .range(yRange || [availableHeight, 0]);
-
- z .domain(sizeDomain || d3.extent(seriesData.map(function(d) { return d.size }).concat(forceSize)))
- .range(sizeRange || [16, 256]);
-
- // If scale's domain don't have a range, slightly adjust to make one... so a chart can show a single data point
- if (x.domain()[0] === x.domain()[1] || y.domain()[0] === y.domain()[1]) singlePoint = true;
- if (x.domain()[0] === x.domain()[1])
- x.domain()[0] ?
- x.domain([x.domain()[0] - x.domain()[0] * 0.01, x.domain()[1] + x.domain()[1] * 0.01])
- : x.domain([-1,1]);
-
- if (y.domain()[0] === y.domain()[1])
- y.domain()[0] ?
- y.domain([y.domain()[0] - y.domain()[0] * 0.01, y.domain()[1] + y.domain()[1] * 0.01])
- : y.domain([-1,1]);
-
- if ( isNaN(x.domain()[0])) {
- x.domain([-1,1]);
- }
-
- if ( isNaN(y.domain()[0])) {
- y.domain([-1,1]);
- }
-
-
- x0 = x0 || x;
- y0 = y0 || y;
- z0 = z0 || z;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatter').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatter nv-chart-' + id + (singlePoint ? ' nv-single-point' : ''));
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-groups');
- gEnter.append('g').attr('class', 'nv-point-paths');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
-
- function updateInteractiveLayer() {
-
- if (!interactive) return false;
-
- var eventElements;
-
- var vertices = d3.merge(data.map(function(group, groupIndex) {
- return group.values
- .map(function(point, pointIndex) {
- // *Adding noise to make duplicates very unlikely
- // *Injecting series and point index for reference
- /* *Adding a 'jitter' to the points, because there's an issue in d3.geom.voronoi.
- */
- var pX = getX(point,pointIndex);
- var pY = getY(point,pointIndex);
-
- return [x(pX)+ Math.random() * 1e-7,
- y(pY)+ Math.random() * 1e-7,
- groupIndex,
- pointIndex, point]; //temp hack to add noise untill I think of a better way so there are no duplicates
- })
- .filter(function(pointArray, pointIndex) {
- return pointActive(pointArray[4], pointIndex); // Issue #237.. move filter to after map, so pointIndex is correct!
- })
- })
- );
-
-
-
- //inject series and point index for reference into voronoi
- if (useVoronoi === true) {
-
- if (clipVoronoi) {
- var pointClipsEnter = wrap.select('defs').selectAll('.nv-point-clips')
- .data([id])
- .enter();
-
- pointClipsEnter.append('clipPath')
- .attr('class', 'nv-point-clips')
- .attr('id', 'nv-points-clip-' + id);
-
- var pointClips = wrap.select('#nv-points-clip-' + id).selectAll('circle')
- .data(vertices);
- pointClips.enter().append('circle')
- .attr('r', clipRadius);
- pointClips.exit().remove();
- pointClips
- .attr('cx', function(d) { return d[0] })
- .attr('cy', function(d) { return d[1] });
-
- wrap.select('.nv-point-paths')
- .attr('clip-path', 'url(#nv-points-clip-' + id + ')');
- }
-
-
- if(vertices.length) {
- // Issue #283 - Adding 2 dummy points to the voronoi b/c voronoi requires min 3 points to work
- vertices.push([x.range()[0] - 20, y.range()[0] - 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] + 20, null, null]);
- vertices.push([x.range()[0] - 20, y.range()[0] + 20, null, null]);
- vertices.push([x.range()[1] + 20, y.range()[1] - 20, null, null]);
- }
-
- var bounds = d3.geom.polygon([
- [-10,-10],
- [-10,height + 10],
- [width + 10,height + 10],
- [width + 10,-10]
- ]);
-
- var voronoi = d3.geom.voronoi(vertices).map(function(d, i) {
- return {
- 'data': bounds.clip(d),
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
-
-
- var pointPaths = wrap.select('.nv-point-paths').selectAll('path')
- .data(voronoi);
- pointPaths.enter().append('path')
- .attr('class', function(d,i) { return 'nv-path-'+i; });
- pointPaths.exit().remove();
- pointPaths
- .attr('d', function(d) {
- if (d.data.length === 0)
- return 'M 0 0'
- else
- return 'M' + d.data.join('L') + 'Z';
- });
-
- var mouseEventCallback = function(d,mDispatch) {
- if (needsUpdate) return 0;
- var series = data[d.series];
- if (typeof series === 'undefined') return;
-
- var point = series.values[d.point];
-
- mDispatch({
- point: point,
- series: series,
- pos: [x(getX(point, d.point)) + margin.left, y(getY(point, d.point)) + margin.top],
- seriesIndex: d.series,
- pointIndex: d.point
- });
- };
-
- pointPaths
- .on('click', function(d) {
- mouseEventCallback(d, dispatch.elementClick);
- })
- .on('mouseover', function(d) {
- mouseEventCallback(d, dispatch.elementMouseover);
- })
- .on('mouseout', function(d, i) {
- mouseEventCallback(d, dispatch.elementMouseout);
- });
-
-
- } else {
- /*
- // bring data in form needed for click handlers
- var dataWithPoints = vertices.map(function(d, i) {
- return {
- 'data': d,
- 'series': vertices[i][2],
- 'point': vertices[i][3]
- }
- });
- */
-
- // add event handlers to points instead voronoi paths
- wrap.select('.nv-groups').selectAll('.nv-group')
- .selectAll('.nv-point')
- //.data(dataWithPoints)
- //.style('pointer-events', 'auto') // recativate events, disabled by css
- .on('click', function(d,i) {
- //nv.log('test', d, i);
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementClick({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseover', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseover({
- point: point,
- series: series,
- pos: [x(getX(point, i)) + margin.left, y(getY(point, i)) + margin.top],
- seriesIndex: d.series,
- pointIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- if (needsUpdate || !data[d.series]) return 0; //check if this is a dummy point
- var series = data[d.series],
- point = series.values[i];
-
- dispatch.elementMouseout({
- point: point,
- series: series,
- seriesIndex: d.series,
- pointIndex: i
- });
- });
- }
-
- needsUpdate = false;
- }
-
- needsUpdate = true;
-
- var groups = wrap.select('.nv-groups').selectAll('.nv-group')
- .data(function(d) { return d }, function(d) { return d.key });
- groups.enter().append('g')
- .style('stroke-opacity', 1e-6)
- .style('fill-opacity', 1e-6);
- groups.exit()
- .remove();
- groups
- .attr('class', function(d,i) { return 'nv-group nv-series-' + i })
- .classed('hover', function(d) { return d.hover });
- groups
- .transition()
- .style('fill', function(d,i) { return color(d, i) })
- .style('stroke', function(d,i) { return color(d, i) })
- .style('stroke-opacity', 1)
- .style('fill-opacity', .5);
-
-
- if (onlyCircles) {
-
- var points = groups.selectAll('circle.nv-point')
- .data(function(d) { return d.values }, pointKey);
- points.enter().append('circle')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x0(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y0(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
- points.exit().remove();
- groups.exit().selectAll('path.nv-point').transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('cx', function(d,i) { return nv.utils.NaNtoZero(x(getX(d,i))) })
- .attr('cy', function(d,i) { return nv.utils.NaNtoZero(y(getY(d,i))) })
- .attr('r', function(d,i) { return Math.sqrt(z(getSize(d,i))/Math.PI) });
-
- } else {
-
- var points = groups.selectAll('path.nv-point')
- .data(function(d) { return d.values });
- points.enter().append('path')
- .style('fill', function (d,i) { return d.color })
- .style('stroke', function (d,i) { return d.color })
- .attr('transform', function(d,i) {
- return 'translate(' + x0(getX(d,i)) + ',' + y0(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- points.exit().remove();
- groups.exit().selectAll('path.nv-point')
- .transition()
- .attr('transform', function(d,i) {
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .remove();
- points.each(function(d,i) {
- d3.select(this)
- .classed('nv-point', true)
- .classed('nv-point-' + i, true)
- .classed('hover',false)
- ;
- });
- points.transition()
- .attr('transform', function(d,i) {
- //nv.log(d,i,getX(d,i), x(getX(d,i)));
- return 'translate(' + x(getX(d,i)) + ',' + y(getY(d,i)) + ')'
- })
- .attr('d',
- d3.svg.symbol()
- .type(getShape)
- .size(function(d,i) { return z(getSize(d,i)) })
- );
- }
-
-
- // Delay updating the invisible interactive layer for smoother animation
- clearTimeout(timeoutID); // stop repeat calls to updateInteractiveLayer
- timeoutID = setTimeout(updateInteractiveLayer, 300);
- //updateInteractiveLayer();
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
- z0 = z.copy();
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
- chart.clearHighlights = function() {
- //Remove the 'hover' class from all highlighted points.
- d3.selectAll(".nv-chart-" + id + " .nv-point.hover").classed("hover",false);
- };
-
- chart.highlightPoint = function(seriesIndex,pointIndex,isHoverOver) {
- d3.select(".nv-chart-" + id + " .nv-series-" + seriesIndex + " .nv-point-" + pointIndex)
- .classed("hover",isHoverOver);
- };
-
-
- dispatch.on('elementMouseover.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,true);
- });
-
- dispatch.on('elementMouseout.point', function(d) {
- if (interactive) chart.highlightPoint(d.seriesIndex,d.pointIndex,false);
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.size = function(_) {
- if (!arguments.length) return getSize;
- getSize = d3.functor(_);
- return chart;
- };
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.zScale = function(_) {
- if (!arguments.length) return z;
- z = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.sizeDomain = function(_) {
- if (!arguments.length) return sizeDomain;
- sizeDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.sizeRange = function(_) {
- if (!arguments.length) return sizeRange;
- sizeRange = _;
- return chart;
- };
-
- chart.forceX = function(_) {
- if (!arguments.length) return forceX;
- forceX = _;
- return chart;
- };
-
- chart.forceY = function(_) {
- if (!arguments.length) return forceY;
- forceY = _;
- return chart;
- };
-
- chart.forceSize = function(_) {
- if (!arguments.length) return forceSize;
- forceSize = _;
- return chart;
- };
-
- chart.interactive = function(_) {
- if (!arguments.length) return interactive;
- interactive = _;
- return chart;
- };
-
- chart.pointKey = function(_) {
- if (!arguments.length) return pointKey;
- pointKey = _;
- return chart;
- };
-
- chart.pointActive = function(_) {
- if (!arguments.length) return pointActive;
- pointActive = _;
- return chart;
- };
-
- chart.padData = function(_) {
- if (!arguments.length) return padData;
- padData = _;
- return chart;
- };
-
- chart.padDataOuter = function(_) {
- if (!arguments.length) return padDataOuter;
- padDataOuter = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.clipVoronoi= function(_) {
- if (!arguments.length) return clipVoronoi;
- clipVoronoi = _;
- return chart;
- };
-
- chart.useVoronoi= function(_) {
- if (!arguments.length) return useVoronoi;
- useVoronoi = _;
- if (useVoronoi === false) {
- clipVoronoi = false;
- }
- return chart;
- };
-
- chart.clipRadius = function(_) {
- if (!arguments.length) return clipRadius;
- clipRadius = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.shape = function(_) {
- if (!arguments.length) return getShape;
- getShape = _;
- return chart;
- };
-
- chart.onlyCircles = function(_) {
- if (!arguments.length) return onlyCircles;
- onlyCircles = _;
- return chart;
- };
-
- chart.id = function(_) {
- if (!arguments.length) return id;
- id = _;
- return chart;
- };
-
- chart.singlePoint = function(_) {
- if (!arguments.length) return singlePoint;
- singlePoint = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterChart.js
deleted file mode 100644
index 65b6e387..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterChart.js
+++ /dev/null
@@ -1,628 +0,0 @@
-nv.models.scatterChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , xPadding = 0
- , yPadding = 0
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = null
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
-
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background');
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth / 2 : availableWidth;
- legend.width(legendWidth);
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth - legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
-
- if (xPadding !== 0)
- scatter.xDomain(null);
-
- if (yPadding !== 0)
- scatter.yDomain(null);
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- //Adjust for x and y padding
- if (xPadding !== 0) {
- var xRange = x.domain()[1] - x.domain()[0];
- scatter.xDomain([x.domain()[0] - (xPadding * xRange), x.domain()[1] + (xPadding * xRange)]);
- }
-
- if (yPadding !== 0) {
- var yRange = y.domain()[1] - y.domain()[0];
- scatter.yDomain([y.domain()[0] - (yPadding * yRange), y.domain()[1] + (yPadding * yRange)]);
- }
-
- //Only need to update the scatter again if x/yPadding changed the domain.
- if (yPadding !== 0 || xPadding !== 0) {
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() && xAxis.ticks().length ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
-
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() && yAxis.ticks().length ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform',
- 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', function(d,i) { return e.pos[1] - availableHeight;});
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.xPadding = function(_) {
- if (!arguments.length) return xPadding;
- xPadding = _;
- return chart;
- };
-
- chart.yPadding = function(_) {
- if (!arguments.length) return yPadding;
- yPadding = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterPlusLineChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterPlusLineChart.js
deleted file mode 100644
index 23c87853..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/scatterPlusLineChart.js
+++ /dev/null
@@ -1,620 +0,0 @@
-
-nv.models.scatterPlusLineChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var scatter = nv.models.scatter()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , distX = nv.models.distribution()
- , distY = nv.models.distribution()
- ;
-
- var margin = {top: 30, right: 20, bottom: 50, left: 75}
- , width = null
- , height = null
- , color = nv.utils.defaultColor()
- , x = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.xScale()
- , y = d3.fisheye ? d3.fisheye.scale(d3.scale.linear).distortion(0) : scatter.yScale()
- , showDistX = false
- , showDistY = false
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , showControls = !!d3.fisheye
- , fisheye = 0
- , pauseFisheye = false
- , tooltips = true
- , tooltipX = function(key, x, y) { return '<strong>' + x + '</strong>' }
- , tooltipY = function(key, x, y) { return '<strong>' + y + '</strong>' }
- , tooltip = function(key, x, y, date) { return '<h3>' + key + '</h3>'
- + '<p>' + date + '</p>' }
- , state = {}
- , defaultState = null
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , noData = "No Data Available."
- , transitionDuration = 250
- ;
-
- scatter
- .xScale(x)
- .yScale(y)
- ;
- xAxis
- .orient('bottom')
- .tickPadding(10)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- .tickPadding(10)
- ;
- distX
- .axis('x')
- ;
- distY
- .axis('y')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var x0, y0;
-
- var showTooltip = function(e, offsetElement) {
- //TODO: make tooltip style an option between single or dual on axes (maybe on all charts with axes?)
-
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- leftX = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- topX = y.range()[0] + margin.top + ( offsetElement.offsetTop || 0),
- leftY = x.range()[0] + margin.left + ( offsetElement.offsetLeft || 0 ),
- topY = e.pos[1] + ( offsetElement.offsetTop || 0),
- xVal = xAxis.tickFormat()(scatter.x()(e.point, e.pointIndex)),
- yVal = yAxis.tickFormat()(scatter.y()(e.point, e.pointIndex));
-
- if( tooltipX != null )
- nv.tooltip.show([leftX, topX], tooltipX(e.series.key, xVal, yVal, e, chart), 'n', 1, offsetElement, 'x-nvtooltip');
- if( tooltipY != null )
- nv.tooltip.show([leftY, topY], tooltipY(e.series.key, xVal, yVal, e, chart), 'e', 1, offsetElement, 'y-nvtooltip');
- if( tooltip != null )
- nv.tooltip.show([left, top], tooltip(e.series.key, xVal, yVal, e.point.tooltip, e, chart), e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- var controlsData = [
- { key: 'Magnify', disabled: true }
- ];
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display noData message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- x0 = x0 || x;
- y0 = y0 || y;
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-scatterChart').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-scatterChart nv-chart-' + scatter.id());
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g')
-
- // background for pointer events
- gEnter.append('rect').attr('class', 'nvd3 nv-background').style("pointer-events","none");
-
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
- gEnter.append('g').attr('class', 'nv-regressionLinesWrap');
- gEnter.append('g').attr('class', 'nv-distWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- legend.width( availableWidth / 2 );
-
- wrap.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- wrap.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth / 2) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- controls.width(180).color(['#444']);
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .attr('transform', 'translate(0,' + (-margin.top) +')')
- .call(controls);
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }))
-
- wrap.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- wrap.select('.nv-regressionLinesWrap')
- .attr('clip-path', 'url(#nv-edge-clip-' + scatter.id() + ')');
-
- var regWrap = wrap.select('.nv-regressionLinesWrap').selectAll('.nv-regLines')
- .data(function(d) {return d });
-
- regWrap.enter().append('g').attr('class', 'nv-regLines');
-
- var regLine = regWrap.selectAll('.nv-regLine').data(function(d){return [d]});
- var regLineEnter = regLine.enter()
- .append('line').attr('class', 'nv-regLine')
- .style('stroke-opacity', 0);
-
- regLine
- .transition()
- .attr('x1', x.range()[0])
- .attr('x2', x.range()[1])
- .attr('y1', function(d,i) {return y(x.domain()[0] * d.slope + d.intercept) })
- .attr('y2', function(d,i) { return y(x.domain()[1] * d.slope + d.intercept) })
- .style('stroke', function(d,i,j) { return color(d,j) })
- .style('stroke-opacity', function(d,i) {
- return (d.disabled || typeof d.slope === 'undefined' || typeof d.intercept === 'undefined') ? 0 : 1
- });
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( xAxis.ticks() ? xAxis.ticks() : availableWidth / 100 )
- .tickSize( -availableHeight , 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks( yAxis.ticks() ? yAxis.ticks() : availableHeight / 36 )
- .tickSize( -availableWidth, 0);
-
- g.select('.nv-y.nv-axis')
- .call(yAxis);
- }
-
-
- if (showDistX) {
- distX
- .getData(scatter.x())
- .scale(x)
- .width(availableWidth)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionX');
- g.select('.nv-distributionX')
- .attr('transform', 'translate(0,' + y.range()[0] + ')')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- }
-
- if (showDistY) {
- distY
- .getData(scatter.y())
- .scale(y)
- .width(availableHeight)
- .color(data.map(function(d,i) {
- return d.color || color(d, i);
- }).filter(function(d,i) { return !data[i].disabled }));
- gEnter.select('.nv-distWrap').append('g')
- .attr('class', 'nv-distributionY');
- g.select('.nv-distributionY')
- .attr('transform', 'translate(' + (rightAlignYAxis ? availableWidth : -distY.size() ) + ',0)')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
- //------------------------------------------------------------
-
-
-
-
- if (d3.fisheye) {
- g.select('.nv-background')
- .attr('width', availableWidth)
- .attr('height', availableHeight)
- ;
-
- g.select('.nv-background').on('mousemove', updateFisheye);
- g.select('.nv-background').on('click', function() { pauseFisheye = !pauseFisheye;});
- scatter.dispatch.on('elementClick.freezeFisheye', function() {
- pauseFisheye = !pauseFisheye;
- });
- }
-
-
- function updateFisheye() {
- if (pauseFisheye) {
- g.select('.nv-point-paths').style('pointer-events', 'all');
- return false;
- }
-
- g.select('.nv-point-paths').style('pointer-events', 'none' );
-
- var mouse = d3.mouse(this);
- x.distortion(fisheye).focus(mouse[0]);
- y.distortion(fisheye).focus(mouse[1]);
-
- g.select('.nv-scatterWrap')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(scatter);
-
- if (showXAxis)
- g.select('.nv-x.nv-axis').call(xAxis);
-
- if (showYAxis)
- g.select('.nv-y.nv-axis').call(yAxis);
-
- g.select('.nv-distributionX')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distX);
- g.select('.nv-distributionY')
- .datum(data.filter(function(d) { return !d.disabled }))
- .call(distY);
- }
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- controls.dispatch.on('legendClick', function(d,i) {
- d.disabled = !d.disabled;
-
- fisheye = d.disabled ? 0 : 2.5;
- g.select('.nv-background') .style('pointer-events', d.disabled ? 'none' : 'all');
- g.select('.nv-point-paths').style('pointer-events', d.disabled ? 'all' : 'none' );
-
- if (d.disabled) {
- x.distortion(fisheye).focus(0);
- y.distortion(fisheye).focus(0);
-
- g.select('.nv-scatterWrap').call(scatter);
- g.select('.nv-x.nv-axis').call(xAxis);
- g.select('.nv-y.nv-axis').call(yAxis);
- } else {
- pauseFisheye = false;
- }
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state = newState;
- dispatch.stateChange(state);
- chart.update();
- });
-
-
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', e.pos[1] - availableHeight);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', e.pos[0] + distX.size());
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top];
- dispatch.tooltipShow(e);
- });
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- chart.update();
- });
-
- //============================================================
-
-
- //store old scales for use in transitions on update
- x0 = x.copy();
- y0 = y.copy();
-
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
-
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-distx-' + e.pointIndex)
- .attr('y1', 0);
- d3.select('.nv-chart-' + scatter.id() + ' .nv-series-' + e.seriesIndex + ' .nv-disty-' + e.pointIndex)
- .attr('x2', distY.size());
- });
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.scatter = scatter;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.distX = distX;
- chart.distY = distY;
-
- d3.rebind(chart, scatter, 'id', 'interactive', 'pointActive', 'x', 'y', 'shape', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'sizeRange', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'clipRadius', 'useVoronoi');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- distX.color(color);
- distY.color(color);
- return chart;
- };
-
- chart.showDistX = function(_) {
- if (!arguments.length) return showDistX;
- showDistX = _;
- return chart;
- };
-
- chart.showDistY = function(_) {
- if (!arguments.length) return showDistY;
- showDistY = _;
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.fisheye = function(_) {
- if (!arguments.length) return fisheye;
- fisheye = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltipXContent = function(_) {
- if (!arguments.length) return tooltipX;
- tooltipX = _;
- return chart;
- };
-
- chart.tooltipYContent = function(_) {
- if (!arguments.length) return tooltipY;
- tooltipY = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparkline.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparkline.js
deleted file mode 100644
index e4c2e87b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparkline.js
+++ /dev/null
@@ -1,194 +0,0 @@
-
-nv.models.sparkline = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 2, right: 0, bottom: 2, left: 0}
- , width = 400
- , height = 32
- , animate = true
- , x = d3.scale.linear()
- , y = d3.scale.linear()
- , getX = function(d) { return d.x }
- , getY = function(d) { return d.y }
- , color = nv.utils.getColor(['#000'])
- , xDomain
- , yDomain
- , xRange
- , yRange
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x .domain(xDomain || d3.extent(data, getX ))
- .range(xRange || [0, availableWidth]);
-
- y .domain(yDomain || d3.extent(data, getY ))
- .range(yRange || [availableHeight, 0]);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparkline').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparkline');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')')
-
- //------------------------------------------------------------
-
-
- var paths = wrap.selectAll('path')
- .data(function(d) { return [d] });
- paths.enter().append('path');
- paths.exit().remove();
- paths
- .style('stroke', function(d,i) { return d.color || color(d, i) })
- .attr('d', d3.svg.line()
- .x(function(d,i) { return x(getX(d,i)) })
- .y(function(d,i) { return y(getY(d,i)) })
- );
-
-
- // TODO: Add CURRENT data point (Need Min, Mac, Current / Most recent)
- var points = wrap.selectAll('circle.nv-point')
- .data(function(data) {
- var yValues = data.map(function(d, i) { return getY(d,i); });
- function pointIndex(index) {
- if (index != -1) {
- var result = data[index];
- result.pointIndex = index;
- return result;
- } else {
- return null;
- }
- }
- var maxPoint = pointIndex(yValues.lastIndexOf(y.domain()[1])),
- minPoint = pointIndex(yValues.indexOf(y.domain()[0])),
- currentPoint = pointIndex(yValues.length - 1);
- return [minPoint, maxPoint, currentPoint].filter(function (d) {return d != null;});
- });
- points.enter().append('circle');
- points.exit().remove();
- points
- .attr('cx', function(d,i) { return x(getX(d,d.pointIndex)) })
- .attr('cy', function(d,i) { return y(getY(d,d.pointIndex)) })
- .attr('r', 2)
- .attr('class', function(d,i) {
- return getX(d, d.pointIndex) == x.domain()[1] ? 'nv-point nv-currentValue' :
- getY(d, d.pointIndex) == y.domain()[0] ? 'nv-point nv-minValue' : 'nv-point nv-maxValue'
- });
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- };
-
- chart.xScale = function(_) {
- if (!arguments.length) return x;
- x = _;
- return chart;
- };
-
- chart.yScale = function(_) {
- if (!arguments.length) return y;
- y = _;
- return chart;
- };
-
- chart.xDomain = function(_) {
- if (!arguments.length) return xDomain;
- xDomain = _;
- return chart;
- };
-
- chart.yDomain = function(_) {
- if (!arguments.length) return yDomain;
- yDomain = _;
- return chart;
- };
-
- chart.xRange = function(_) {
- if (!arguments.length) return xRange;
- xRange = _;
- return chart;
- };
-
- chart.yRange = function(_) {
- if (!arguments.length) return yRange;
- yRange = _;
- return chart;
- };
-
- chart.animate = function(_) {
- if (!arguments.length) return animate;
- animate = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparklinePlus.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparklinePlus.js
deleted file mode 100644
index 1535f8af..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/sparklinePlus.js
+++ /dev/null
@@ -1,295 +0,0 @@
-
-nv.models.sparklinePlus = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var sparkline = nv.models.sparkline();
-
- var margin = {top: 15, right: 100, bottom: 10, left: 50}
- , width = null
- , height = null
- , x
- , y
- , index = []
- , paused = false
- , xTickFormat = d3.format(',r')
- , yTickFormat = d3.format(',.2f')
- , showValue = true
- , alignValue = true
- , rightAlignValue = false
- , noData = "No Data Available."
- ;
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this);
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
-
-
- chart.update = function() { chart(selection) };
- chart.container = this;
-
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- var currentValue = sparkline.y()(data[data.length-1], data.length-1);
-
- //------------------------------------------------------------
-
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = sparkline.xScale();
- y = sparkline.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-sparklineplus').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-sparklineplus');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-sparklineWrap');
- gEnter.append('g').attr('class', 'nv-valueWrap');
- gEnter.append('g').attr('class', 'nv-hoverArea');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- var sparklineWrap = g.select('.nv-sparklineWrap');
-
- sparkline
- .width(availableWidth)
- .height(availableHeight);
-
- sparklineWrap
- .call(sparkline);
-
- //------------------------------------------------------------
-
-
- var valueWrap = g.select('.nv-valueWrap');
-
- var value = valueWrap.selectAll('.nv-currentValue')
- .data([currentValue]);
-
- value.enter().append('text').attr('class', 'nv-currentValue')
- .attr('dx', rightAlignValue ? -8 : 8)
- .attr('dy', '.9em')
- .style('text-anchor', rightAlignValue ? 'end' : 'start');
-
- value
- .attr('x', availableWidth + (rightAlignValue ? margin.right : 0))
- .attr('y', alignValue ? function(d) { return y(d) } : 0)
- .style('fill', sparkline.color()(data[data.length-1], data.length-1))
- .text(yTickFormat(currentValue));
-
-
-
- gEnter.select('.nv-hoverArea').append('rect')
- .on('mousemove', sparklineHover)
- .on('click', function() { paused = !paused })
- .on('mouseout', function() { index = []; updateValueLine(); });
- //.on('mouseout', function() { index = null; updateValueLine(); });
-
- g.select('.nv-hoverArea rect')
- .attr('transform', function(d) { return 'translate(' + -margin.left + ',' + -margin.top + ')' })
- .attr('width', availableWidth + margin.left + margin.right)
- .attr('height', availableHeight + margin.top);
-
-
-
- function updateValueLine() { //index is currently global (within the chart), may or may not keep it that way
- if (paused) return;
-
- var hoverValue = g.selectAll('.nv-hoverValue').data(index)
-
- var hoverEnter = hoverValue.enter()
- .append('g').attr('class', 'nv-hoverValue')
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0);
-
- hoverValue.exit()
- .transition().duration(250)
- .style('stroke-opacity', 0)
- .style('fill-opacity', 0)
- .remove();
-
- hoverValue
- .attr('transform', function(d) { return 'translate(' + x(sparkline.x()(data[d],d)) + ',0)' })
- .transition().duration(250)
- .style('stroke-opacity', 1)
- .style('fill-opacity', 1);
-
- if (!index.length) return;
-
- hoverEnter.append('line')
- .attr('x1', 0)
- .attr('y1', -margin.top)
- .attr('x2', 0)
- .attr('y2', availableHeight);
-
-
- hoverEnter.append('text').attr('class', 'nv-xValue')
- .attr('x', -6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'end')
- .attr('dy', '.9em')
-
-
- g.select('.nv-hoverValue .nv-xValue')
- .text(xTickFormat(sparkline.x()(data[index[0]], index[0])));
-
- hoverEnter.append('text').attr('class', 'nv-yValue')
- .attr('x', 6)
- .attr('y', -margin.top)
- .attr('text-anchor', 'start')
- .attr('dy', '.9em')
-
- g.select('.nv-hoverValue .nv-yValue')
- .text(yTickFormat(sparkline.y()(data[index[0]], index[0])));
-
- }
-
-
- function sparklineHover() {
- if (paused) return;
-
- var pos = d3.mouse(this)[0] - margin.left;
-
- function getClosestIndex(data, x) {
- var distance = Math.abs(sparkline.x()(data[0], 0) - x);
- var closestIndex = 0;
- for (var i = 0; i < data.length; i++){
- if (Math.abs(sparkline.x()(data[i], i) - x) < distance) {
- distance = Math.abs(sparkline.x()(data[i], i) - x);
- closestIndex = i;
- }
- }
- return closestIndex;
- }
-
- index = [getClosestIndex(data, Math.round(x.invert(pos)))];
-
- updateValueLine();
- }
-
- });
-
- return chart;
- }
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.sparkline = sparkline;
-
- d3.rebind(chart, sparkline, 'x', 'y', 'xScale', 'yScale', 'color');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.xTickFormat = function(_) {
- if (!arguments.length) return xTickFormat;
- xTickFormat = _;
- return chart;
- };
-
- chart.yTickFormat = function(_) {
- if (!arguments.length) return yTickFormat;
- yTickFormat = _;
- return chart;
- };
-
- chart.showValue = function(_) {
- if (!arguments.length) return showValue;
- showValue = _;
- return chart;
- };
-
- chart.alignValue = function(_) {
- if (!arguments.length) return alignValue;
- alignValue = _;
- return chart;
- };
-
- chart.rightAlignValue = function(_) {
- if (!arguments.length) return rightAlignValue;
- rightAlignValue = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedArea.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedArea.js
deleted file mode 100644
index eefeb8fb..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedArea.js
+++ /dev/null
@@ -1,368 +0,0 @@
-
-nv.models.stackedArea = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var margin = {top: 0, right: 0, bottom: 0, left: 0}
- , width = 960
- , height = 500
- , color = nv.utils.defaultColor() // a function that computes the color
- , id = Math.floor(Math.random() * 100000) //Create semi-unique ID incase user doesn't selet one
- , getX = function(d) { return d.x } // accessor to get the x value from a data point
- , getY = function(d) { return d.y } // accessor to get the y value from a data point
- , style = 'stack'
- , offset = 'zero'
- , order = 'default'
- , interpolate = 'linear' // controls the line interpolation
- , clipEdge = false // if true, masks lines within x and y scale
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , scatter = nv.models.scatter()
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'areaClick', 'areaMouseover', 'areaMouseout')
- ;
-
- scatter
- .size(2.2) // default size
- .sizeDomain([2.2,2.2]) // all the same size by default
- ;
-
- /************************************
- * offset:
- * 'wiggle' (stream)
- * 'zero' (stacked)
- * 'expand' (normalize to 100%)
- * 'silhouette' (simple centered)
- *
- * order:
- * 'inside-out' (stream)
- * 'default' (input order)
- ************************************/
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var availableWidth = width - margin.left - margin.right,
- availableHeight = height - margin.top - margin.bottom,
- container = d3.select(this);
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = scatter.xScale();
- y = scatter.yScale();
-
- //------------------------------------------------------------
-
- var dataRaw = data;
- // Injecting point index into each point because d3.layout.stack().out does not give index
- data.forEach(function(aseries, i) {
- aseries.seriesIndex = i;
- aseries.values = aseries.values.map(function(d, j) {
- d.index = j;
- d.seriesIndex = i;
- return d;
- });
- });
-
- var dataFiltered = data.filter(function(series) {
- return !series.disabled;
- });
-
- data = d3.layout.stack()
- .order(order)
- .offset(offset)
- .values(function(d) { return d.values }) //TODO: make values customizeable in EVERY model in this fashion
- .x(getX)
- .y(getY)
- .out(function(d, y0, y) {
- var yHeight = (getY(d) === 0) ? 0 : y;
- d.display = {
- y: yHeight,
- y0: y0
- };
- })
- (dataFiltered);
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedarea').data([data]);
- var wrapEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedarea');
- var defsEnter = wrapEnter.append('defs');
- var gEnter = wrapEnter.append('g');
- var g = wrap.select('g');
-
- gEnter.append('g').attr('class', 'nv-areaWrap');
- gEnter.append('g').attr('class', 'nv-scatterWrap');
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- //------------------------------------------------------------
-
-
- scatter
- .width(availableWidth)
- .height(availableHeight)
- .x(getX)
- .y(function(d) { return d.display.y + d.display.y0 })
- .forceY([0])
- .color(data.map(function(d,i) {
- return d.color || color(d, d.seriesIndex);
- }));
-
-
- var scatterWrap = g.select('.nv-scatterWrap')
- .datum(data);
-
- scatterWrap.call(scatter);
-
- defsEnter.append('clipPath')
- .attr('id', 'nv-edge-clip-' + id)
- .append('rect');
-
- wrap.select('#nv-edge-clip-' + id + ' rect')
- .attr('width', availableWidth)
- .attr('height', availableHeight);
-
- g .attr('clip-path', clipEdge ? 'url(#nv-edge-clip-' + id + ')' : '');
-
- var area = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) {
- return y(d.display.y0)
- })
- .y1(function(d) {
- return y(d.display.y + d.display.y0)
- })
- .interpolate(interpolate);
-
- var zeroArea = d3.svg.area()
- .x(function(d,i) { return x(getX(d,i)) })
- .y0(function(d) { return y(d.display.y0) })
- .y1(function(d) { return y(d.display.y0) });
-
-
- var path = g.select('.nv-areaWrap').selectAll('path.nv-area')
- .data(function(d) { return d });
-
- path.enter().append('path').attr('class', function(d,i) { return 'nv-area nv-area-' + i })
- .attr('d', function(d,i){
- return zeroArea(d.values, d.seriesIndex);
- })
- .on('mouseover', function(d,i) {
- d3.select(this).classed('hover', true);
- dispatch.areaMouseover({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('mouseout', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaMouseout({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- .on('click', function(d,i) {
- d3.select(this).classed('hover', false);
- dispatch.areaClick({
- point: d,
- series: d.key,
- pos: [d3.event.pageX, d3.event.pageY],
- seriesIndex: i
- });
- })
- path.exit().transition()
- .attr('d', function(d,i) { return zeroArea(d.values,i) })
- .remove();
- path
- .style('fill', function(d,i){
- return d.color || color(d, d.seriesIndex)
- })
- .style('stroke', function(d,i){ return d.color || color(d, d.seriesIndex) });
- path.transition()
- .attr('d', function(d,i) {
- return area(d.values,i)
- });
-
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementMouseover.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', true);
- });
- scatter.dispatch.on('elementMouseout.area', function(e) {
- g.select('.nv-chart-' + id + ' .nv-area-' + e.seriesIndex).classed('hover', false);
- });
-
- //============================================================
- //Special offset functions
- chart.d3_stackedOffset_stackPercent = function(stackData) {
- var n = stackData.length, //How many series
- m = stackData[0].length, //how many points per series
- k = 1 / n,
- i,
- j,
- o,
- y0 = [];
-
- for (j = 0; j < m; ++j) { //Looping through all points
- for (i = 0, o = 0; i < dataRaw.length; i++) //looping through series'
- o += getY(dataRaw[i].values[j]) //total value of all points at a certian point in time.
-
- if (o) for (i = 0; i < n; i++)
- stackData[i][j][1] /= o;
- else
- for (i = 0; i < n; i++)
- stackData[i][j][1] = k;
- }
- for (j = 0; j < m; ++j) y0[j] = 0;
- return y0;
- };
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- scatter.dispatch.on('elementClick.area', function(e) {
- dispatch.areaClick(e);
- })
- scatter.dispatch.on('elementMouseover.tooltip', function(e) {
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
- scatter.dispatch.on('elementMouseout.tooltip', function(e) {
- dispatch.tooltipHide(e);
- });
-
- //============================================================
-
- //============================================================
- // Global getters and setters
- //------------------------------------------------------------
-
- chart.dispatch = dispatch;
- chart.scatter = scatter;
-
- d3.rebind(chart, scatter, 'interactive', 'size', 'xScale', 'yScale', 'zScale', 'xDomain', 'yDomain', 'xRange', 'yRange',
- 'sizeDomain', 'forceX', 'forceY', 'forceSize', 'clipVoronoi', 'useVoronoi','clipRadius','highlightPoint','clearHighlights');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.x = function(_) {
- if (!arguments.length) return getX;
- getX = d3.functor(_);
- return chart;
- };
-
- chart.y = function(_) {
- if (!arguments.length) return getY;
- getY = d3.functor(_);
- return chart;
- }
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.clipEdge = function(_) {
- if (!arguments.length) return clipEdge;
- clipEdge = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- return chart;
- };
-
- chart.offset = function(_) {
- if (!arguments.length) return offset;
- offset = _;
- return chart;
- };
-
- chart.order = function(_) {
- if (!arguments.length) return order;
- order = _;
- return chart;
- };
-
- //shortcut for offset + order
- chart.style = function(_) {
- if (!arguments.length) return style;
- style = _;
-
- switch (style) {
- case 'stack':
- chart.offset('zero');
- chart.order('default');
- break;
- case 'stream':
- chart.offset('wiggle');
- chart.order('inside-out');
- break;
- case 'stream-center':
- chart.offset('silhouette');
- chart.order('inside-out');
- break;
- case 'expand':
- chart.offset('expand');
- chart.order('default');
- break;
- case 'stack_percent':
- chart.offset(chart.d3_stackedOffset_stackPercent);
- chart.order('default');
- break;
- }
-
- return chart;
- };
-
- chart.interpolate = function(_) {
- if (!arguments.length) return interpolate;
- interpolate = _;
- return chart;
- };
- //============================================================
-
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedAreaChart.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedAreaChart.js
deleted file mode 100644
index a036b8b0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/models/stackedAreaChart.js
+++ /dev/null
@@ -1,629 +0,0 @@
-
-nv.models.stackedAreaChart = function() {
- "use strict";
- //============================================================
- // Public Variables with Default Settings
- //------------------------------------------------------------
-
- var stacked = nv.models.stackedArea()
- , xAxis = nv.models.axis()
- , yAxis = nv.models.axis()
- , legend = nv.models.legend()
- , controls = nv.models.legend()
- , interactiveLayer = nv.interactiveGuideline()
- ;
-
- var margin = {top: 30, right: 25, bottom: 50, left: 60}
- , width = null
- , height = null
- , color = nv.utils.defaultColor() // a function that takes in d, i and returns color
- , showControls = true
- , showLegend = true
- , showXAxis = true
- , showYAxis = true
- , rightAlignYAxis = false
- , useInteractiveGuideline = false
- , tooltips = true
- , tooltip = function(key, x, y, e, graph) {
- return '<h3>' + key + '</h3>' +
- '<p>' + y + ' on ' + x + '</p>'
- }
- , x //can be accessed via chart.xScale()
- , y //can be accessed via chart.yScale()
- , yAxisTickFormat = d3.format(',.2f')
- , state = { style: stacked.style() }
- , defaultState = null
- , noData = 'No Data Available.'
- , dispatch = d3.dispatch('tooltipShow', 'tooltipHide', 'stateChange', 'changeState')
- , controlWidth = 250
- , cData = ['Stacked','Stream','Expanded']
- , controlLabels = {}
- , transitionDuration = 250
- ;
-
- xAxis
- .orient('bottom')
- .tickPadding(7)
- ;
- yAxis
- .orient((rightAlignYAxis) ? 'right' : 'left')
- ;
-
- controls.updateState(false);
- //============================================================
-
-
- //============================================================
- // Private Variables
- //------------------------------------------------------------
-
- var showTooltip = function(e, offsetElement) {
- var left = e.pos[0] + ( offsetElement.offsetLeft || 0 ),
- top = e.pos[1] + ( offsetElement.offsetTop || 0),
- x = xAxis.tickFormat()(stacked.x()(e.point, e.pointIndex)),
- y = yAxis.tickFormat()(stacked.y()(e.point, e.pointIndex)),
- content = tooltip(e.series.key, x, y, e, chart);
-
- nv.tooltip.show([left, top], content, e.value < 0 ? 'n' : 's', null, offsetElement);
- };
-
- //============================================================
-
-
- function chart(selection) {
- selection.each(function(data) {
- var container = d3.select(this),
- that = this;
-
- var availableWidth = (width || parseInt(container.style('width')) || 960)
- - margin.left - margin.right,
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
-
- chart.update = function() { container.transition().duration(transitionDuration).call(chart); };
- chart.container = this;
-
- //set state.disabled
- state.disabled = data.map(function(d) { return !!d.disabled });
-
- if (!defaultState) {
- var key;
- defaultState = {};
- for (key in state) {
- if (state[key] instanceof Array)
- defaultState[key] = state[key].slice(0);
- else
- defaultState[key] = state[key];
- }
- }
-
- //------------------------------------------------------------
- // Display No Data message if there's nothing to show.
-
- if (!data || !data.length || !data.filter(function(d) { return d.values.length }).length) {
- var noDataText = container.selectAll('.nv-noData').data([noData]);
-
- noDataText.enter().append('text')
- .attr('class', 'nvd3 nv-noData')
- .attr('dy', '-.7em')
- .style('text-anchor', 'middle');
-
- noDataText
- .attr('x', margin.left + availableWidth / 2)
- .attr('y', margin.top + availableHeight / 2)
- .text(function(d) { return d });
-
- return chart;
- } else {
- container.selectAll('.nv-noData').remove();
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Scales
-
- x = stacked.xScale();
- y = stacked.yScale();
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup containers and skeleton of chart
-
- var wrap = container.selectAll('g.nv-wrap.nv-stackedAreaChart').data([data]);
- var gEnter = wrap.enter().append('g').attr('class', 'nvd3 nv-wrap nv-stackedAreaChart').append('g');
- var g = wrap.select('g');
-
- gEnter.append("rect").style("opacity",0);
- gEnter.append('g').attr('class', 'nv-x nv-axis');
- gEnter.append('g').attr('class', 'nv-y nv-axis');
- gEnter.append('g').attr('class', 'nv-stackedWrap');
- gEnter.append('g').attr('class', 'nv-legendWrap');
- gEnter.append('g').attr('class', 'nv-controlsWrap');
- gEnter.append('g').attr('class', 'nv-interactive');
-
- g.select("rect").attr("width",availableWidth).attr("height",availableHeight);
- //------------------------------------------------------------
- // Legend
-
- if (showLegend) {
- var legendWidth = (showControls) ? availableWidth - controlWidth : availableWidth;
- legend
- .width(legendWidth);
-
- g.select('.nv-legendWrap')
- .datum(data)
- .call(legend);
-
- if ( margin.top != legend.height()) {
- margin.top = legend.height();
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
- g.select('.nv-legendWrap')
- .attr('transform', 'translate(' + (availableWidth-legendWidth) + ',' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Controls
-
- if (showControls) {
- var controlsData = [
- {
- key: controlLabels.stacked || 'Stacked',
- metaKey: 'Stacked',
- disabled: stacked.style() != 'stack',
- style: 'stack'
- },
- {
- key: controlLabels.stream || 'Stream',
- metaKey: 'Stream',
- disabled: stacked.style() != 'stream',
- style: 'stream'
- },
- {
- key: controlLabels.expanded || 'Expanded',
- metaKey: 'Expanded',
- disabled: stacked.style() != 'expand',
- style: 'expand'
- },
- {
- key: controlLabels.stack_percent || 'Stack %',
- metaKey: 'Stack_Percent',
- disabled: stacked.style() != 'stack_percent',
- style: 'stack_percent'
- }
- ];
-
- controlWidth = (cData.length/3) * 260;
-
- controlsData = controlsData.filter(function(d) {
- return cData.indexOf(d.metaKey) !== -1;
- })
-
- controls
- .width( controlWidth )
- .color(['#444', '#444', '#444']);
-
- g.select('.nv-controlsWrap')
- .datum(controlsData)
- .call(controls);
-
-
- if ( margin.top != Math.max(controls.height(), legend.height()) ) {
- margin.top = Math.max(controls.height(), legend.height());
- availableHeight = (height || parseInt(container.style('height')) || 400)
- - margin.top - margin.bottom;
- }
-
-
- g.select('.nv-controlsWrap')
- .attr('transform', 'translate(0,' + (-margin.top) +')');
- }
-
- //------------------------------------------------------------
-
-
- wrap.attr('transform', 'translate(' + margin.left + ',' + margin.top + ')');
-
- if (rightAlignYAxis) {
- g.select(".nv-y.nv-axis")
- .attr("transform", "translate(" + availableWidth + ",0)");
- }
-
- //------------------------------------------------------------
- // Main Chart Component(s)
-
- //------------------------------------------------------------
- //Set up interactive layer
- if (useInteractiveGuideline) {
- interactiveLayer
- .width(availableWidth)
- .height(availableHeight)
- .margin({left: margin.left, top: margin.top})
- .svgContainer(container)
- .xScale(x);
- wrap.select(".nv-interactive").call(interactiveLayer);
- }
-
- stacked
- .width(availableWidth)
- .height(availableHeight)
-
- var stackedWrap = g.select('.nv-stackedWrap')
- .datum(data);
-
- stackedWrap.transition().call(stacked);
-
- //------------------------------------------------------------
-
-
- //------------------------------------------------------------
- // Setup Axes
-
- if (showXAxis) {
- xAxis
- .scale(x)
- .ticks( availableWidth / 100 )
- .tickSize( -availableHeight, 0);
-
- g.select('.nv-x.nv-axis')
- .attr('transform', 'translate(0,' + availableHeight + ')');
-
- g.select('.nv-x.nv-axis')
- .transition().duration(0)
- .call(xAxis);
- }
-
- if (showYAxis) {
- yAxis
- .scale(y)
- .ticks(stacked.offset() == 'wiggle' ? 0 : availableHeight / 36)
- .tickSize(-availableWidth, 0)
- .setTickFormat( (stacked.style() == 'expand' || stacked.style() == 'stack_percent')
- ? d3.format('%') : yAxisTickFormat);
-
- g.select('.nv-y.nv-axis')
- .transition().duration(0)
- .call(yAxis);
- }
-
- //------------------------------------------------------------
-
-
- //============================================================
- // Event Handling/Dispatching (in chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('areaClick.toggle', function(e) {
- if (data.filter(function(d) { return !d.disabled }).length === 1)
- data.forEach(function(d) {
- d.disabled = false;
- });
- else
- data.forEach(function(d,i) {
- d.disabled = (i != e.seriesIndex);
- });
-
- state.disabled = data.map(function(d) { return !!d.disabled });
- dispatch.stateChange(state);
-
- chart.update();
- });
-
- legend.dispatch.on('stateChange', function(newState) {
- state.disabled = newState.disabled;
- dispatch.stateChange(state);
- chart.update();
- });
-
- controls.dispatch.on('legendClick', function(d,i) {
- if (!d.disabled) return;
-
- controlsData = controlsData.map(function(s) {
- s.disabled = true;
- return s;
- });
- d.disabled = false;
-
- stacked.style(d.style);
-
-
- state.style = stacked.style();
- dispatch.stateChange(state);
-
- chart.update();
- });
-
-
- interactiveLayer.dispatch.on('elementMousemove', function(e) {
- stacked.clearHighlights();
- var singlePoint, pointIndex, pointXLocation, allData = [];
- data
- .filter(function(series, i) {
- series.seriesIndex = i;
- return !series.disabled;
- })
- .forEach(function(series,i) {
- pointIndex = nv.interactiveBisect(series.values, e.pointXValue, chart.x());
- stacked.highlightPoint(i, pointIndex, true);
- var point = series.values[pointIndex];
- if (typeof point === 'undefined') return;
- if (typeof singlePoint === 'undefined') singlePoint = point;
- if (typeof pointXLocation === 'undefined') pointXLocation = chart.xScale()(chart.x()(point,pointIndex));
-
- //If we are in 'expand' mode, use the stacked percent value instead of raw value.
- var tooltipValue = (stacked.style() == 'expand') ? point.display.y : chart.y()(point,pointIndex);
- allData.push({
- key: series.key,
- value: tooltipValue,
- color: color(series,series.seriesIndex),
- stackedValue: point.display
- });
- });
-
- allData.reverse();
-
- //Highlight the tooltip entry based on which stack the mouse is closest to.
- if (allData.length > 2) {
- var yValue = chart.yScale().invert(e.mouseY);
- var yDistMax = Infinity, indexToHighlight = null;
- allData.forEach(function(series,i) {
- if ( yValue >= series.stackedValue.y0 && yValue <= (series.stackedValue.y0 + series.stackedValue.y))
- {
- indexToHighlight = i;
- return;
- }
- });
- if (indexToHighlight != null)
- allData[indexToHighlight].highlight = true;
- }
-
- var xValue = xAxis.tickFormat()(chart.x()(singlePoint,pointIndex));
-
- //If we are in 'expand' mode, force the format to be a percentage.
- var valueFormatter = (stacked.style() == 'expand') ?
- function(d,i) {return d3.format(".1%")(d);} :
- function(d,i) {return yAxis.tickFormat()(d); };
- interactiveLayer.tooltip
- .position({left: pointXLocation + margin.left, top: e.mouseY + margin.top})
- .chartContainer(that.parentNode)
- .enabled(tooltips)
- .valueFormatter(valueFormatter)
- .data(
- {
- value: xValue,
- series: allData
- }
- )();
-
- interactiveLayer.renderGuideLine(pointXLocation);
-
- });
-
- interactiveLayer.dispatch.on("elementMouseout",function(e) {
- dispatch.tooltipHide();
- stacked.clearHighlights();
- });
-
-
- dispatch.on('tooltipShow', function(e) {
- if (tooltips) showTooltip(e, that.parentNode);
- });
-
- // Update chart from a state object passed to event handler
- dispatch.on('changeState', function(e) {
-
- if (typeof e.disabled !== 'undefined') {
- data.forEach(function(series,i) {
- series.disabled = e.disabled[i];
- });
-
- state.disabled = e.disabled;
- }
-
- if (typeof e.style !== 'undefined') {
- stacked.style(e.style);
- }
-
- chart.update();
- });
-
- });
-
-
- return chart;
- }
-
-
- //============================================================
- // Event Handling/Dispatching (out of chart's scope)
- //------------------------------------------------------------
-
- stacked.dispatch.on('tooltipShow', function(e) {
- //disable tooltips when value ~= 0
- //// TODO: consider removing points from voronoi that have 0 value instead of this hack
- /*
- if (!Math.round(stacked.y()(e.point) * 100)) { // 100 will not be good for very small numbers... will have to think about making this valu dynamic, based on data range
- setTimeout(function() { d3.selectAll('.point.hover').classed('hover', false) }, 0);
- return false;
- }
- */
-
- e.pos = [e.pos[0] + margin.left, e.pos[1] + margin.top],
- dispatch.tooltipShow(e);
- });
-
- stacked.dispatch.on('tooltipHide', function(e) {
- dispatch.tooltipHide(e);
- });
-
- dispatch.on('tooltipHide', function() {
- if (tooltips) nv.tooltip.cleanup();
- });
-
- //============================================================
-
-
- //============================================================
- // Expose Public Variables
- //------------------------------------------------------------
-
- // expose chart's sub-components
- chart.dispatch = dispatch;
- chart.stacked = stacked;
- chart.legend = legend;
- chart.controls = controls;
- chart.xAxis = xAxis;
- chart.yAxis = yAxis;
- chart.interactiveLayer = interactiveLayer;
-
- d3.rebind(chart, stacked, 'x', 'y', 'size', 'xScale', 'yScale', 'xDomain', 'yDomain', 'xRange', 'yRange', 'sizeDomain', 'interactive', 'useVoronoi', 'offset', 'order', 'style', 'clipEdge', 'forceX', 'forceY', 'forceSize', 'interpolate');
-
- chart.options = nv.utils.optionsFunc.bind(chart);
-
- chart.margin = function(_) {
- if (!arguments.length) return margin;
- margin.top = typeof _.top != 'undefined' ? _.top : margin.top;
- margin.right = typeof _.right != 'undefined' ? _.right : margin.right;
- margin.bottom = typeof _.bottom != 'undefined' ? _.bottom : margin.bottom;
- margin.left = typeof _.left != 'undefined' ? _.left : margin.left;
- return chart;
- };
-
- chart.width = function(_) {
- if (!arguments.length) return width;
- width = _;
- return chart;
- };
-
- chart.height = function(_) {
- if (!arguments.length) return height;
- height = _;
- return chart;
- };
-
- chart.color = function(_) {
- if (!arguments.length) return color;
- color = nv.utils.getColor(_);
- legend.color(color);
- stacked.color(color);
- return chart;
- };
-
- chart.showControls = function(_) {
- if (!arguments.length) return showControls;
- showControls = _;
- return chart;
- };
-
- chart.showLegend = function(_) {
- if (!arguments.length) return showLegend;
- showLegend = _;
- return chart;
- };
-
- chart.showXAxis = function(_) {
- if (!arguments.length) return showXAxis;
- showXAxis = _;
- return chart;
- };
-
- chart.showYAxis = function(_) {
- if (!arguments.length) return showYAxis;
- showYAxis = _;
- return chart;
- };
-
- chart.rightAlignYAxis = function(_) {
- if(!arguments.length) return rightAlignYAxis;
- rightAlignYAxis = _;
- yAxis.orient( (_) ? 'right' : 'left');
- return chart;
- };
-
- chart.useInteractiveGuideline = function(_) {
- if(!arguments.length) return useInteractiveGuideline;
- useInteractiveGuideline = _;
- if (_ === true) {
- chart.interactive(false);
- chart.useVoronoi(false);
- }
- return chart;
- };
-
- chart.tooltip = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.tooltips = function(_) {
- if (!arguments.length) return tooltips;
- tooltips = _;
- return chart;
- };
-
- chart.tooltipContent = function(_) {
- if (!arguments.length) return tooltip;
- tooltip = _;
- return chart;
- };
-
- chart.state = function(_) {
- if (!arguments.length) return state;
- state = _;
- return chart;
- };
-
- chart.defaultState = function(_) {
- if (!arguments.length) return defaultState;
- defaultState = _;
- return chart;
- };
-
- chart.noData = function(_) {
- if (!arguments.length) return noData;
- noData = _;
- return chart;
- };
-
- chart.transitionDuration = function(_) {
- if (!arguments.length) return transitionDuration;
- transitionDuration = _;
- return chart;
- };
-
- chart.controlsData = function(_) {
- if (!arguments.length) return cData;
- cData = _;
- return chart;
- };
-
- chart.controlLabels = function(_) {
- if (!arguments.length) return controlLabels;
- if (typeof _ !== 'object') return controlLabels;
- controlLabels = _;
- return chart;
- };
-
- yAxis.setTickFormat = yAxis.tickFormat;
-
- yAxis.tickFormat = function(_) {
- if (!arguments.length) return yAxisTickFormat;
- yAxisTickFormat = _;
- return yAxis;
- };
-
-
- //============================================================
-
- return chart;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/nv.d3.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/nv.d3.min.js
deleted file mode 100644
index 892379c4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/nv.d3.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(){function t(e,t){return(new Date(t,e+1,0)).getDate()}function n(e,t,n){return function(r,i,s){var o=e(r),u=[];if(o<r)t(o);if(s>1){while(o<i){var a=new Date(+o);if(n(a)%s===0)u.push(a);t(o)}}else{while(o<i){u.push(new Date(+o));t(o)}}return u}}var e=window.nv||{};e.version="1.1.13b";e.dev=true;window.nv=e;e.tooltip={};e.utils=e.utils||{};e.models={};e.charts={};e.graphs=[];e.logs={};e.dispatch=d3.dispatch("render_start","render_end");if(e.dev){e.dispatch.on("render_start",function(t){e.logs.startTime=+(new Date)});e.dispatch.on("render_end",function(t){e.logs.endTime=+(new Date);e.logs.totalTime=e.logs.endTime-e.logs.startTime;e.log("total",e.logs.totalTime)})}e.log=function(){if(e.dev&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(e.dev&&typeof console.log=="function"&&Function.prototype.bind){var t=Function.prototype.bind.call(console.log,console);t.apply(console,arguments)}return arguments[arguments.length-1]};e.render=function(n){n=n||1;e.render.active=true;e.dispatch.render_start();setTimeout(function(){var t,r;for(var i=0;i<n&&(r=e.render.queue[i]);i++){t=r.generate();if(typeof r.callback==typeof Function)r.callback(t);e.graphs.push(t)}e.render.queue.splice(0,i);if(e.render.queue.length)setTimeout(arguments.callee,0);else{e.render.active=false;e.dispatch.render_end()}},0)};e.render.active=false;e.render.queue=[];e.addGraph=function(t){if(typeof arguments[0]===typeof Function)t={generate:arguments[0],callback:arguments[1]};e.render.queue.push(t);if(!e.render.active)e.render()};e.identity=function(e){return e};e.strip=function(e){return e.replace(/(\s|&)/g,"")};d3.time.monthEnd=function(e){return new Date(e.getFullYear(),e.getMonth(),0)};d3.time.monthEnds=n(d3.time.monthEnd,function(e){e.setUTCDate(e.getUTCDate()+1);e.setDate(t(e.getMonth()+1,e.getFullYear()))},function(e){return e.getMonth()});e.interactiveGuideline=function(){"use strict";function c(o){o.each(function(o){function g(){var e=d3.mouse(this);var n=e[0];var r=e[1];var o=true;var a=false;if(l){n=d3.event.offsetX;r=d3.event.offsetY;if(d3.event.target.tagName!=="svg")o=false;if(d3.event.target.className.baseVal.match("nv-legend"))a=true}if(o){n-=i.left;r-=i.top}if(n<0||r<0||n>p||r>d||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined||a){if(l){if(d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===undefined&&d3.event.relatedTarget.className.match(t.nvPointerEventsClass)){return}}u.elementMouseout({mouseX:n,mouseY:r});c.renderGuideLine(null);return}var f=s.invert(n);u.elementMousemove({mouseX:n,mouseY:r,pointXValue:f});if(d3.event.type==="dblclick"){u.elementDblclick({mouseX:n,mouseY:r,pointXValue:f})}}var h=d3.select(this);var p=n||960,d=r||400;var v=h.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([o]);var m=v.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");m.append("g").attr("class","nv-interactiveGuideLine");if(!f){return}f.on("mousemove",g,true).on("mouseout",g,true).on("dblclick",g);c.renderGuideLine=function(t){if(!a)return;var n=v.select(".nv-interactiveGuideLine").selectAll("line").data(t!=null?[e.utils.NaNtoZero(t)]:[],String);n.enter().append("line").attr("class","nv-guideline").attr("x1",function(e){return e}).attr("x2",function(e){return e}).attr("y1",d).attr("y2",0);n.exit().remove()}})}var t=e.models.tooltip();var n=null,r=null,i={left:0,top:0},s=d3.scale.linear(),o=d3.scale.linear(),u=d3.dispatch("elementMousemove","elementMouseout","elementDblclick"),a=true,f=null;var l=navigator.userAgent.indexOf("MSIE")!==-1;c.dispatch=u;c.tooltip=t;c.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.left=typeof e.left!="undefined"?e.left:i.left;return c};c.width=function(e){if(!arguments.length)return n;n=e;return c};c.height=function(e){if(!arguments.length)return r;r=e;return c};c.xScale=function(e){if(!arguments.length)return s;s=e;return c};c.showGuideLine=function(e){if(!arguments.length)return a;a=e;return c};c.svgContainer=function(e){if(!arguments.length)return f;f=e;return c};return c};e.interactiveBisect=function(e,t,n){"use strict";if(!e instanceof Array)return null;if(typeof n!=="function")n=function(e,t){return e.x};var r=d3.bisector(n).left;var i=d3.max([0,r(e,t)-1]);var s=n(e[i],i);if(typeof s==="undefined")s=i;if(s===t)return i;var o=d3.min([i+1,e.length-1]);var u=n(e[o],o);if(typeof u==="undefined")u=o;if(Math.abs(u-t)>=Math.abs(s-t))return i;else return o};e.nearestValueIndex=function(e,t,n){"use strict";var r=Infinity,i=null;e.forEach(function(e,s){var o=Math.abs(t-e);if(o<=r&&o<n){r=o;i=s}});return i};(function(){"use strict";window.nv.tooltip={};window.nv.models.tooltip=function(){function y(){if(a){var e=d3.select(a);if(e.node().tagName!=="svg"){e=e.select("svg")}var t=e.node()?e.attr("viewBox"):null;if(t){t=t.split(" ");var n=parseInt(e.style("width"))/t[2];l.left=l.left*n;l.top=l.top*n}}}function b(e){var t;if(a)t=d3.select(a);else t=d3.select("body");var n=t.select(".nvtooltip");if(n.node()===null){n=t.append("div").attr("class","nvtooltip "+(u?u:"xy-tooltip")).attr("id",h)}n.node().innerHTML=e;n.style("top",0).style("left",0).style("opacity",0);n.selectAll("div, table, td, tr").classed(p,true);n.classed(p,true);return n.node()}function w(){if(!c)return;if(!g(n))return;y();var t=l.left;var u=o!=null?o:l.top;var h=b(m(n));f=h;if(a){var p=a.getElementsByTagName("svg")[0];var d=p?p.getBoundingClientRect():a.getBoundingClientRect();var v={left:0,top:0};if(p){var E=p.getBoundingClientRect();var S=a.getBoundingClientRect();var x=E.top;if(x<0){var T=a.getBoundingClientRect();x=Math.abs(x)>T.height?0:x}v.top=Math.abs(x-S.top);v.left=Math.abs(E.left-S.left)}t+=a.offsetLeft+v.left-2*a.scrollLeft;u+=a.offsetTop+v.top-2*a.scrollTop}if(s&&s>0){u=Math.floor(u/s)*s}e.tooltip.calcTooltipPosition([t,u],r,i,h);return w}var t=null,n=null,r="w",i=50,s=25,o=null,u=null,a=null,f=null,l={left:null,top:null},c=true,h="nvtooltip-"+Math.floor(Math.random()*1e5);var p="nv-pointer-events-none";var d=function(e,t){return e};var v=function(e){return e};var m=function(e){if(t!=null)return t;if(e==null)return"";var n=d3.select(document.createElement("table"));var r=n.selectAll("thead").data([e]).enter().append("thead");r.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",true).html(v(e.value));var i=n.selectAll("tbody").data([e]).enter().append("tbody");var s=i.selectAll("tr").data(function(e){return e.series}).enter().append("tr").classed("highlight",function(e){return e.highlight});s.append("td").classed("legend-color-guide",true).append("div").style("background-color",function(e){return e.color});s.append("td").classed("key",true).html(function(e){return e.key});s.append("td").classed("value",true).html(function(e,t){return d(e.value,t)});s.selectAll("td").each(function(e){if(e.highlight){var t=d3.scale.linear().domain([0,1]).range(["#fff",e.color]);var n=.6;d3.select(this).style("border-bottom-color",t(n)).style("border-top-color",t(n))}});var o=n.node().outerHTML;if(e.footer!==undefined)o+="<div class='footer'>"+e.footer+"</div>";return o};var g=function(e){if(e&&e.series&&e.series.length>0)return true;return false};w.nvPointerEventsClass=p;w.content=function(e){if(!arguments.length)return t;t=e;return w};w.tooltipElem=function(){return f};w.contentGenerator=function(e){if(!arguments.length)return m;if(typeof e==="function"){m=e}return w};w.data=function(e){if(!arguments.length)return n;n=e;return w};w.gravity=function(e){if(!arguments.length)return r;r=e;return w};w.distance=function(e){if(!arguments.length)return i;i=e;return w};w.snapDistance=function(e){if(!arguments.length)return s;s=e;return w};w.classes=function(e){if(!arguments.length)return u;u=e;return w};w.chartContainer=function(e){if(!arguments.length)return a;a=e;return w};w.position=function(e){if(!arguments.length)return l;l.left=typeof e.left!=="undefined"?e.left:l.left;l.top=typeof e.top!=="undefined"?e.top:l.top;return w};w.fixedTop=function(e){if(!arguments.length)return o;o=e;return w};w.enabled=function(e){if(!arguments.length)return c;c=e;return w};w.valueFormatter=function(e){if(!arguments.length)return d;if(typeof e==="function"){d=e}return w};w.headerFormatter=function(e){if(!arguments.length)return v;if(typeof e==="function"){v=e}return w};w.id=function(){return h};return w};e.tooltip.show=function(t,n,r,i,s,o){var u=document.createElement("div");u.className="nvtooltip "+(o?o:"xy-tooltip");var a=s;if(!s||s.tagName.match(/g|svg/i)){a=document.getElementsByTagName("body")[0]}u.style.left=0;u.style.top=0;u.style.opacity=0;u.innerHTML=n;a.appendChild(u);if(s){t[0]=t[0]-s.scrollLeft;t[1]=t[1]-s.scrollTop}e.tooltip.calcTooltipPosition(t,r,i,u)};e.tooltip.findFirstNonSVGParent=function(e){while(e.tagName.match(/^g|svg$/i)!==null){e=e.parentNode}return e};e.tooltip.findTotalOffsetTop=function(e,t){var n=t;do{if(!isNaN(e.offsetTop)){n+=e.offsetTop}}while(e=e.offsetParent);return n};e.tooltip.findTotalOffsetLeft=function(e,t){var n=t;do{if(!isNaN(e.offsetLeft)){n+=e.offsetLeft}}while(e=e.offsetParent);return n};e.tooltip.calcTooltipPosition=function(t,n,r,i){var s=parseInt(i.offsetHeight),o=parseInt(i.offsetWidth),u=e.utils.windowSize().width,a=e.utils.windowSize().height,f=window.pageYOffset,l=window.pageXOffset,c,h;a=window.innerWidth>=document.body.scrollWidth?a:a-16;u=window.innerHeight>=document.body.scrollHeight?u:u-16;n=n||"s";r=r||20;var p=function(t){return e.tooltip.findTotalOffsetTop(t,h)};var d=function(t){return e.tooltip.findTotalOffsetLeft(t,c)};switch(n){case"e":c=t[0]-o-r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v<l)c=t[0]+r>l?t[0]+r:l-v+c;if(m<f)h=f-m+h;if(m+s>f+a)h=f+a-m+h-s;break;case"w":c=t[0]+r;h=t[1]-s/2;var v=d(i);var m=p(i);if(v+o>u)c=t[0]-o-r;if(m<f)h=f+5;if(m+s>f+a)h=f+a-m+h-s;break;case"n":c=t[0]-o/2-5;h=t[1]+r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(m+s>f+a)h=f+a-m+h-s;break;case"s":c=t[0]-o/2;h=t[1]-s-r;var v=d(i);var m=p(i);if(v<l)c=l+5;if(v+o>u)c=c-o/2+5;if(f>m)h=f;break;case"none":c=t[0];h=t[1]-r;var v=d(i);var m=p(i);break}i.style.left=c+"px";i.style.top=h+"px";i.style.opacity=1;i.style.position="absolute";return i};e.tooltip.cleanup=function(){var e=document.getElementsByClassName("nvtooltip");var t=[];while(e.length){t.push(e[0]);e[0].style.transitionDelay="0 !important";e[0].style.opacity=0;e[0].className="nvtooltip-pending-removal"}setTimeout(function(){while(t.length){var e=t.pop();e.parentNode.removeChild(e)}},500)}})();e.utils.windowSize=function(){var e={width:640,height:480};if(document.body&&document.body.offsetWidth){e.width=document.body.offsetWidth;e.height=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){e.width=document.documentElement.offsetWidth;e.height=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){e.width=window.innerWidth;e.height=window.innerHeight}return e};e.utils.windowResize=function(e){if(e===undefined)return;var t=window.onresize;window.onresize=function(n){if(typeof t=="function")t(n);e(n)}};e.utils.getColor=function(t){if(!arguments.length)return e.utils.defaultColor();if(Object.prototype.toString.call(t)==="[object Array]")return function(e,n){return e.color||t[n%t.length]};else return t};e.utils.defaultColor=function(){var e=d3.scale.category20().range();return function(t,n){return t.color||e[n%e.length]}};e.utils.customTheme=function(e,t,n){t=t||function(e){return e.key};n=n||d3.scale.category20().range();var r=n.length;return function(i,s){var o=t(i);if(!r)r=n.length;if(typeof e[o]!=="undefined")return typeof e[o]==="function"?e[o]():e[o];else return n[--r]}};e.utils.pjax=function(t,n){function r(r){d3.html(r,function(r){var i=d3.select(n).node();i.parentNode.replaceChild(d3.select(r).select(n).node(),i);e.utils.pjax(t,n)})}d3.selectAll(t).on("click",function(){history.pushState(this.href,this.textContent,this.href);r(this.href);d3.event.preventDefault()});d3.select(window).on("popstate",function(){if(d3.event.state)r(d3.event.state)})};e.utils.calcApproxTextWidth=function(e){if(e instanceof d3.selection){var t=parseInt(e.style("font-size").replace("px",""));var n=e.text().length;return n*t*.5}return 0};e.utils.NaNtoZero=function(e){if(typeof e!=="number"||isNaN(e)||e===null||e===Infinity)return 0;return e};e.utils.optionsFunc=function(e){if(e){d3.map(e).forEach(function(e,t){if(typeof this[e]==="function"){this[e](t)}}.bind(this))}return this};e.models.axis=function(){"use strict";function g(e){e.each(function(e){var i=d3.select(this);var g=i.selectAll("g.nv-wrap.nv-axis").data([e]);var y=g.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");var b=y.append("g");var w=g.select("g");if(p!==null)t.ticks(p);else if(t.orient()=="top"||t.orient()=="bottom")t.ticks(Math.abs(s.range()[1]-s.range()[0])/100);w.transition().call(t);m=m||t.scale();var E=t.tickFormat();if(E==null){E=m.tickFormat()}var S=w.selectAll("text.nv-axislabel").data([o||null]);S.exit().remove();switch(t.orient()){case"top":S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",0).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+s(e)+",0)"}).select("text").attr("dy","0em").attr("y",-t.tickPadding()).attr("text-anchor","middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+s.range()[t]+",0)"})}break;case"bottom":var N=36;var C=30;var k=w.selectAll("g").select("text");if(f%360){k.each(function(e,t){var n=this.getBBox().width;if(n>C)C=n});var L=Math.abs(Math.sin(f*Math.PI/180));var N=(L?L*C:C)+30;k.attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f%360>0?"start":"end")}S.enter().append("text").attr("class","nv-axislabel");var x=s.range().length==2?s.range()[1]:s.range()[s.range().length-1]+(s.range()[1]-s.range()[0]);S.attr("text-anchor","middle").attr("y",N).attr("x",x/2);if(u){var T=g.selectAll("g.nv-axisMaxMin").data([s.domain()[0],s.domain()[s.domain().length-1]]);T.enter().append("g").attr("class","nv-axisMaxMin").append("text");T.exit().remove();T.attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",t.tickPadding()).attr("transform",function(e,t,n){return"rotate("+f+" 0,0)"}).style("text-anchor",f?f%360>0?"start":"end":"middle").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate("+(s(e)+(h?s.rangeBand()/2:0))+",0)"})}if(c)k.attr("transform",function(e,t){return"translate(0,"+(t%2==0?"0":"12")+")"});break;case"right":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"begin").attr("transform",l?"rotate(90)":"").attr("y",l?-Math.max(n.right,r)+12:-10).attr("x",l?s.range()[0]/2:t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+s(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",t.tickPadding()).style("text-anchor","start").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break;case"left":S.enter().append("text").attr("class","nv-axislabel");S.style("text-anchor",l?"middle":"end").attr("transform",l?"rotate(-90)":"").attr("y",l?-Math.max(n.left,r)+v:-10).attr("x",l?-s.range()[0]/2:-t.tickPadding());if(u){var T=g.selectAll("g.nv-axisMaxMin").data(s.domain());T.enter().append("g").attr("class","nv-axisMaxMin").append("text").style("opacity",0);T.exit().remove();T.attr("transform",function(e,t){return"translate(0,"+m(e)+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-t.tickPadding()).attr("text-anchor","end").text(function(e,t){var n=e;if(d){n=Math.pow(10,n);n=E(n)}else n=E(n);return(""+n).match("NaN")?"":n});T.transition().attr("transform",function(e,t){return"translate(0,"+s.range()[t]+")"}).select("text").style("opacity",1)}break}S.text(function(e){return e});if(u&&(t.orient()==="left"||t.orient()==="right")){w.selectAll("g").each(function(e,t){d3.select(this).select("text").attr("opacity",1);var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<s.range()[1]+10||s(e)>s.range()[0]-10){if(e>1e-10||e<-1e-10)d3.select(this).attr("opacity",0);d3.select(this).select("text").attr("opacity",0)}});if(s.domain()[0]==s.domain()[1]&&s.domain()[0]==0)g.selectAll("g.nv-axisMaxMin").style("opacity",function(e,t){return!t?1:0})}if(u&&(t.orient()==="top"||t.orient()==="bottom")){var A=[];g.selectAll("g.nv-axisMaxMin").each(function(e,t){try{if(t)A.push(s(e)-this.getBBox().width-4);else A.push(s(e)+this.getBBox().width+4)}catch(n){if(t)A.push(s(e)-4);else A.push(s(e)+4)}});w.selectAll("g").each(function(e,t){var n;if(d){n=Math.pow(10,e);n=E(n)}else{n=E(e)}d3.select(this).select("text").text(n);if(s(e)<A[0]||s(e)>A[1]){if(e>1e-10||e<-1e-10)d3.select(this).remove();else d3.select(this).select("text").remove()}})}if(a)w.selectAll(".tick").filter(function(e){return!parseFloat(Math.round(e.__data__*1e5)/1e6)&&e.__data__!==undefined}).classed("zero",true);m=s.copy()});return g}var t=d3.svg.axis();var n={top:0,right:0,bottom:0,left:0},r=75,i=60,s=d3.scale.linear(),o=null,u=true,a=true,f=0,l=true,c=false,h=false,p=null,d=false,v=12;t.scale(s).orient("bottom").tickFormat(function(e){return e});var m;g.axis=t;d3.rebind(g,t,"orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat");d3.rebind(g,s,"domain","range","rangeBand","rangeBands");g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return g};g.width=function(e){if(!arguments.length)return r;r=e;return g};g.ticks=function(e){if(!arguments.length)return p;p=e;return g};g.height=function(e){if(!arguments.length)return i;i=e;return g};g.axisLabel=function(e){if(!arguments.length)return o;o=e;return g};g.showMaxMin=function(e){if(!arguments.length)return u;u=e;return g};g.logScale=function(e){if(!arguments.length)return d;d=e;return g};g.highlightZero=function(e){if(!arguments.length)return a;a=e;return g};g.scale=function(e){if(!arguments.length)return s;s=e;t.scale(s);h=typeof s.rangeBands==="function";d3.rebind(g,s,"domain","range","rangeBand","rangeBands");return g};g.rotateYLabel=function(e){if(!arguments.length)return l;l=e;return g};g.rotateLabels=function(e){if(!arguments.length)return f;f=e;return g};g.staggerLabels=function(e){if(!arguments.length)return c;c=e;return g};g.axisLabelDistance=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.bullet=function(){"use strict";function m(e){e.each(function(e,n){var p=c-t.left-t.right,m=h-t.top-t.bottom,g=d3.select(this);var y=i.call(this,e,n).slice().sort(d3.descending),b=s.call(this,e,n).slice().sort(d3.descending),w=o.call(this,e,n).slice().sort(d3.descending),E=u.call(this,e,n).slice(),S=a.call(this,e,n).slice(),x=f.call(this,e,n).slice();var T=d3.scale.linear().domain(d3.extent(d3.merge([l,y]))).range(r?[p,0]:[0,p]);var N=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(T.range());this.__chart__=T;var C=d3.min(y),k=d3.max(y),L=y[1];var A=g.selectAll("g.nv-wrap.nv-bullet").data([e]);var O=A.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet");var M=O.append("g");var _=A.select("g");M.append("rect").attr("class","nv-range nv-rangeMax");M.append("rect").attr("class","nv-range nv-rangeAvg");M.append("rect").attr("class","nv-range nv-rangeMin");M.append("rect").attr("class","nv-measure");M.append("path").attr("class","nv-markerTriangle");A.attr("transform","translate("+t.left+","+t.top+")");var D=function(e){return Math.abs(N(e)-N(0))},P=function(e){return Math.abs(T(e)-T(0))};var H=function(e){return e<0?N(e):N(0)},B=function(e){return e<0?T(e):T(0)};_.select("rect.nv-rangeMax").attr("height",m).attr("width",P(k>0?k:C)).attr("x",B(k>0?k:C)).datum(k>0?k:C);_.select("rect.nv-rangeAvg").attr("height",m).attr("width",P(L)).attr("x",B(L)).datum(L);_.select("rect.nv-rangeMin").attr("height",m).attr("width",P(k)).attr("x",B(k)).attr("width",P(k>0?C:k)).attr("x",B(k>0?C:k)).datum(k>0?C:k);_.select("rect.nv-measure").style("fill",d).attr("height",m/3).attr("y",m/3).attr("width",w<0?T(0)-T(w[0]):T(w[0])-T(0)).attr("x",B(w)).on("mouseover",function(){v.elementMouseover({value:w[0],label:x[0]||"Current",pos:[T(w[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:w[0],label:x[0]||"Current"})});var j=m/6;if(b[0]){_.selectAll("path.nv-markerTriangle").attr("transform",function(e){return"translate("+T(b[0])+","+m/2+")"}).attr("d","M0,"+j+"L"+j+","+ -j+" "+ -j+","+ -j+"Z").on("mouseover",function(){v.elementMouseover({value:b[0],label:S[0]||"Previous",pos:[T(b[0]),m/2]})}).on("mouseout",function(){v.elementMouseout({value:b[0],label:S[0]||"Previous"})})}else{_.selectAll("path.nv-markerTriangle").remove()}A.selectAll(".nv-range").on("mouseover",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseover({value:e,label:n,pos:[T(e),m/2]})}).on("mouseout",function(e,t){var n=E[t]||(!t?"Maximum":t==1?"Mean":"Minimum");v.elementMouseout({value:e,label:n})})});return m}var t={top:0,right:0,bottom:0,left:0},n="left",r=false,i=function(e){return e.ranges},s=function(e){return e.markers},o=function(e){return e.measures},u=function(e){return e.rangeLabels?e.rangeLabels:[]},a=function(e){return e.markerLabels?e.markerLabels:[]},f=function(e){return e.measureLabels?e.measureLabels:[]},l=[0],c=380,h=30,p=null,d=e.utils.getColor(["#1f77b4"]),v=d3.dispatch("elementMouseover","elementMouseout");m.dispatch=v;m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return i;i=e;return m};m.markers=function(e){if(!arguments.length)return s;s=e;return m};m.measures=function(e){if(!arguments.length)return o;o=e;return m};m.forceX=function(e){if(!arguments.length)return l;l=e;return m};m.width=function(e){if(!arguments.length)return c;c=e;return m};m.height=function(e){if(!arguments.length)return h;h=e;return m};m.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return m};m.tickFormat=function(e){if(!arguments.length)return p;p=e;return m};m.color=function(t){if(!arguments.length)return d;d=e.utils.getColor(t);return m};return m};e.models.bulletChart=function(){"use strict";function m(e){e.each(function(n,h){var g=d3.select(this);var y=(a||parseInt(g.style("width"))||960)-i.left-i.right,b=f-i.top-i.bottom,w=this;m.update=function(){m(e)};m.container=this;if(!n||!s.call(this,n,h)){var E=g.selectAll(".nv-noData").data([p]);E.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");E.attr("x",i.left+y/2).attr("y",18+i.top+b/2).text(function(e){return e});return m}else{g.selectAll(".nv-noData").remove()}var S=s.call(this,n,h).slice().sort(d3.descending),x=o.call(this,n,h).slice().sort(d3.descending),T=u.call(this,n,h).slice().sort(d3.descending);var N=g.selectAll("g.nv-wrap.nv-bulletChart").data([n]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-bulletWrap");k.append("g").attr("class","nv-titles");N.attr("transform","translate("+i.left+","+i.top+")");var A=d3.scale.linear().domain([0,Math.max(S[0],x[0],T[0])]).range(r?[y,0]:[0,y]);var O=this.__chart__||d3.scale.linear().domain([0,Infinity]).range(A.range());this.__chart__=A;var M=function(e){return Math.abs(O(e)-O(0))},_=function(e){return Math.abs(A(e)-A(0))};var D=k.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(f-i.top-i.bottom)/2+")");D.append("text").attr("class","nv-title").text(function(e){return e.title});D.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(e){return e.subtitle});t.width(y).height(b);var P=L.select(".nv-bulletWrap");d3.transition(P).call(t);var H=l||A.tickFormat(y/100);var B=L.selectAll("g.nv-tick").data(A.ticks(y/50),function(e){return this.textContent||H(e)});var j=B.enter().append("g").attr("class","nv-tick").attr("transform",function(e){return"translate("+O(e)+",0)"}).style("opacity",1e-6);j.append("line").attr("y1",b).attr("y2",b*7/6);j.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",b*7/6).text(H);var F=d3.transition(B).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1);F.select("line").attr("y1",b).attr("y2",b*7/6);F.select("text").attr("y",b*7/6);d3.transition(B.exit()).attr("transform",function(e){return"translate("+A(e)+",0)"}).style("opacity",1e-6).remove();d.on("tooltipShow",function(e){e.key=n.title;if(c)v(e,w.parentNode)})});d3.timer.flush();return m}var t=e.models.bullet();var n="left",r=false,i={top:5,right:40,bottom:20,left:120},s=function(e){return e.ranges},o=function(e){return e.markers},u=function(e){return e.measures},a=null,f=55,l=null,c=true,h=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},p="No Data Available.",d=d3.dispatch("tooltipShow","tooltipHide");var v=function(t,n){var r=t.pos[0]+(n.offsetLeft||0)+i.left,s=t.pos[1]+(n.offsetTop||0)+i.top,o=h(t.key,t.label,t.value,t,m);e.tooltip.show([r,s],o,t.value<0?"e":"w",null,n)};t.dispatch.on("elementMouseover.tooltip",function(e){d.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){d.tooltipHide(e)});d.on("tooltipHide",function(){if(c)e.tooltip.cleanup()});m.dispatch=d;m.bullet=t;d3.rebind(m,t,"color");m.options=e.utils.optionsFunc.bind(m);m.orient=function(e){if(!arguments.length)return n;n=e;r=n=="right"||n=="bottom";return m};m.ranges=function(e){if(!arguments.length)return s;s=e;return m};m.markers=function(e){if(!arguments.length)return o;o=e;return m};m.measures=function(e){if(!arguments.length)return u;u=e;return m};m.width=function(e){if(!arguments.length)return a;a=e;return m};m.height=function(e){if(!arguments.length)return f;f=e;return m};m.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return m};m.tickFormat=function(e){if(!arguments.length)return l;l=e;return m};m.tooltips=function(e){if(!arguments.length)return c;c=e;return m};m.tooltipContent=function(e){if(!arguments.length)return h;h=e;return m};m.noData=function(e){if(!arguments.length)return p;p=e;return m};return m};e.models.cumulativeLineChart=function(){"use strict";function _(b){b.each(function(b){function q(e,t){d3.select(_.container).style("cursor","ew-resize")}function R(e,t){O.x=d3.event.x;O.i=Math.round(A.invert(O.x));rt()}function U(e,t){d3.select(_.container).style("cursor","auto");x.index=O.i;k.stateChange(x)}function rt(){nt.data([O]);var e=_.transitionDuration();_.transitionDuration(0);_.update();_.transitionDuration(e)}var P=d3.select(this).classed("nv-chart-"+S,true),H=this;var B=(f||parseInt(P.style("width"))||960)-u.left-u.right,j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom;_.update=function(){P.transition().duration(L).call(_)};_.container=this;x.disabled=b.map(function(e){return!!e.disabled});if(!T){var F;T={};for(F in x){if(x[F]instanceof Array)T[F]=x[F].slice(0);else T[F]=x[F]}}var I=d3.behavior.drag().on("dragstart",q).on("drag",R).on("dragend",U);if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var z=P.selectAll(".nv-noData").data([N]);z.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");z.attr("x",u.left+B/2).attr("y",u.top+j/2).text(function(e){return e});return _}else{P.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();if(!y){var W=b.filter(function(e){return!e.disabled}).map(function(e,n){var r=d3.extent(e.values,t.y());if(r[0]<-.95)r[0]=-.95;return[(r[0]-r[1])/(1+r[1]),(r[1]-r[0])/(1+r[0])]});var X=[d3.min(W,function(e){return e[0]}),d3.max(W,function(e){return e[1]})];t.yDomain(X)}else{t.yDomain(null)}A.domain([0,b[0].values.length-1]).range([0,B]).clamp(true);var b=D(O.i,b);var V=g?"none":"all";var $=P.selectAll("g.nv-wrap.nv-cumulativeLine").data([b]);var J=$.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g");var K=$.select("g");J.append("g").attr("class","nv-interactive");J.append("g").attr("class","nv-x nv-axis").style("pointer-events","none");J.append("g").attr("class","nv-y nv-axis");J.append("g").attr("class","nv-background");J.append("g").attr("class","nv-linesWrap").style("pointer-events",V);J.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none");J.append("g").attr("class","nv-legendWrap");J.append("g").attr("class","nv-controlsWrap");if(c){i.width(B);K.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();j=(l||parseInt(P.style("height"))||400)-u.top-u.bottom}K.select(".nv-legendWrap").attr("transform","translate(0,"+ -u.top+")")}if(m){var Q=[{key:"Re-scale y-axis",disabled:!y}];s.width(140).color(["#444","#444","#444"]);K.select(".nv-controlsWrap").datum(Q).attr("transform","translate(0,"+ -u.top+")").call(s)}$.attr("transform","translate("+u.left+","+u.top+")");if(d){K.select(".nv-y.nv-axis").attr("transform","translate("+B+",0)")}var G=b.filter(function(e){return e.tempDisabled});$.select(".tempDisabled").remove();if(G.length){$.append("text").attr("class","tempDisabled").attr("x",B/2).attr("y","-.71em").style("text-anchor","end").text(G.map(function(e){return e.key}).join(", ")+" values cannot be calculated for this time period.")}if(g){o.width(B).height(j).margin({left:u.left,top:u.top}).svgContainer(P).xScale(w);$.select(".nv-interactive").call(o)}J.select(".nv-background").append("rect");K.select(".nv-background rect").attr("width",B).attr("height",j);t.y(function(e){return e.display.y}).width(B).height(j).color(b.map(function(e,t){return e.color||a(e,t)}).filter(function(e,t){return!b[t].disabled&&!b[t].tempDisabled}));var Y=K.select(".nv-linesWrap").datum(b.filter(function(e){return!e.disabled&&!e.tempDisabled}));Y.call(t);b.forEach(function(e,t){e.seriesIndex=t});var Z=b.filter(function(e){return!e.disabled&&!!C(e)});var et=K.select(".nv-avgLinesWrap").selectAll("line").data(Z,function(e){return e.key});var tt=function(e){var t=E(C(e));if(t<0)return 0;if(t>j)return j;return t};et.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(e,n){return t.color()(e,e.seriesIndex)}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.style("stroke-opacity",function(e){var t=E(C(e));if(t<0||t>j)return 0;return 1}).attr("x1",0).attr("x2",B).attr("y1",tt).attr("y2",tt);et.exit().remove();var nt=Y.selectAll(".nv-indexLine").data([O]);nt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(I);nt.attr("transform",function(e){return"translate("+A(e.i)+",0)"}).attr("height",j);if(h){n.scale(w).ticks(Math.min(b[0].values.length,B/70)).tickSize(-j,0);K.select(".nv-x.nv-axis").attr("transform","translate(0,"+E.range()[0]+")");d3.transition(K.select(".nv-x.nv-axis")).call(n)}if(p){r.scale(E).ticks(j/36).tickSize(-B,0);d3.transition(K.select(".nv-y.nv-axis")).call(r)}K.select(".nv-background rect").on("click",function(){O.x=d3.mouse(this)[0];O.i=Math.round(A.invert(O.x));x.index=O.i;k.stateChange(x);rt()});t.dispatch.on("elementClick",function(e){O.i=e.pointIndex;O.x=A(O.i);x.index=O.i;k.stateChange(x);rt()});s.dispatch.on("legendClick",function(e,t){e.disabled=!e.disabled;y=!e.disabled;x.rescaleY=y;k.stateChange(x);_.update()});i.dispatch.on("stateChange",function(e){x.disabled=e.disabled;k.stateChange(x);_.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,f,l,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,_.x());t.highlightPoint(r,f,true);var o=n.values[f];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof l==="undefined")l=_.xScale()(_.x()(o,f));c.push({key:n.key,value:_.y()(o,f),color:a(n,n.seriesIndex)})});if(c.length>2){var h=_.yScale().invert(i.mouseY);var p=Math.abs(_.yScale().domain()[0]-_.yScale().domain()[1]);var d=.03*p;var m=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(m!==null)c[m].highlight=true}var g=n.tickFormat()(_.x()(s,f),f);o.tooltip.position({left:l+u.left,top:i.mouseY+u.top}).chartContainer(H.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:g,series:c})();o.renderGuideLine(l)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(v)M(e,H.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});x.disabled=e.disabled}if(typeof e.index!=="undefined"){O.i=e.index;O.x=A(O.i);x.index=e.index;nt.data([O])}if(typeof e.rescaleY!=="undefined"){y=e.rescaleY}_.update()})});return _}function D(e,n){return n.map(function(n,r){if(!n.values){return n}var i=t.y()(n.values[e],e);if(i<-.95){n.tempDisabled=true;return n}n.tempDisabled=false;n.values=n.values.map(function(e,n){e.display={y:(t.y()(e,n)-i)/(1+i)};return e});return n})}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:30,bottom:50,left:60},a=e.utils.defaultColor(),f=null,l=null,c=true,h=true,p=true,d=false,v=true,m=true,g=false,y=true,b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},w,E,S=t.id(),x={index:0,rescaleY:y},T=null,N="No Data Available.",C=function(e){return e.average},k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250;n.orient("bottom").tickPadding(7);r.orient(d?"right":"left");s.updateState(false);var A=d3.scale.linear(),O={i:0,x:0};var M=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=b(i.series.key,a,f,i,_);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});_.dispatch=k;_.lines=t;_.legend=i;_.xAxis=n;_.yAxis=r;_.interactiveLayer=o;d3.rebind(_,t,"defined","isArea","x","y","xScale","yScale","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id");_.options=e.utils.optionsFunc.bind(_);_.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return _};_.width=function(e){if(!arguments.length)return f;f=e;return _};_.height=function(e){if(!arguments.length)return l;l=e;return _};_.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);i.color(a);return _};_.rescaleY=function(e){if(!arguments.length)return y;y=e;return _};_.showControls=function(e){if(!arguments.length)return m;m=e;return _};_.useInteractiveGuideline=function(e){if(!arguments.length)return g;g=e;if(e===true){_.interactive(false);_.useVoronoi(false)}return _};_.showLegend=function(e){if(!arguments.length)return c;c=e;return _};_.showXAxis=function(e){if(!arguments.length)return h;h=e;return _};_.showYAxis=function(e){if(!arguments.length)return p;p=e;return _};_.rightAlignYAxis=function(e){if(!arguments.length)return d;d=e;r.orient(e?"right":"left");return _};_.tooltips=function(e){if(!arguments.length)return v;v=e;return _};_.tooltipContent=function(e){if(!arguments.length)return b;b=e;return _};_.state=function(e){if(!arguments.length)return x;x=e;return _};_.defaultState=function(e){if(!arguments.length)return T;T=e;return _};_.noData=function(e){if(!arguments.length)return N;N=e;return _};_.average=function(e){if(!arguments.length)return C;C=e;return _};_.transitionDuration=function(e){if(!arguments.length)return L;L=e;return _};return _};e.models.discreteBar=function(){"use strict";function E(e){e.each(function(e){var i=n-t.left-t.right,E=r-t.top-t.bottom,S=d3.select(this);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});var T=p&&d?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0}})});s.domain(p||d3.merge(T).map(function(e){return e.x})).rangeBands(v||[0,i],.1);o.domain(d||d3.extent(d3.merge(T).map(function(e){return e.y}).concat(f)));if(c)o.range(m||[E-(o.domain()[0]<0?12:0),o.domain()[1]>0?12:0]);else o.range(m||[E,0]);b=b||s;w=w||o.copy().range([o(0),o(0)]);var N=S.selectAll("g.nv-wrap.nv-discretebar").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar");var k=C.append("g");var L=N.select("g");k.append("g").attr("class","nv-groups");N.attr("transform","translate("+t.left+","+t.top+")");var A=N.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});A.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);A.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();A.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});A.transition().style("stroke-opacity",1).style("fill-opacity",.75);var O=A.selectAll("g.nv-bar").data(function(e){return e.values});O.exit().remove();var M=O.enter().append("g").attr("transform",function(e,t,n){return"translate("+(s(u(e,t))+s.rangeBand()*.05)+", "+o(0)+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);g.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);g.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){g.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){g.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(t.series+.5)/e.length,o(a(t,n))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});M.append("rect").attr("height",0).attr("width",s.rangeBand()*.9/e.length);if(c){M.append("text").attr("text-anchor","middle");O.select("text").text(function(e,t){return h(a(e,t))}).transition().attr("x",s.rangeBand()*.9/2).attr("y",function(e,t){return a(e,t)<0?o(a(e,t))-o(0)+12:-4})}else{O.selectAll("text").remove()}O.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(e,t){return e.color||l(e,t)}).style("stroke",function(e,t){return e.color||l(e,t)}).select("rect").attr("class",y).transition().attr("width",s.rangeBand()*.9/e.length);O.transition().attr("transform",function(e,t){var n=s(u(e,t))+s.rangeBand()*.05,r=a(e,t)<0?o(0):o(0)-o(a(e,t))<1?o(0)-1:o(a(e,t));return"translate("+n+", "+r+")"}).select("rect").attr("height",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(d&&d[0]||0))||1)});b=s.copy();w=o.copy()});return E}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=false,h=d3.format(",.2f"),p,d,v,m,g=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),y="discreteBar";var b,w;E.dispatch=g;E.options=e.utils.optionsFunc.bind(E);E.x=function(e){if(!arguments.length)return u;u=e;return E};E.y=function(e){if(!arguments.length)return a;a=e;return E};E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.xScale=function(e){if(!arguments.length)return s;s=e;return E};E.yScale=function(e){if(!arguments.length)return o;o=e;return E};E.xDomain=function(e){if(!arguments.length)return p;p=e;return E};E.yDomain=function(e){if(!arguments.length)return d;d=e;return E};E.xRange=function(e){if(!arguments.length)return v;v=e;return E};E.yRange=function(e){if(!arguments.length)return m;m=e;return E};E.forceY=function(e){if(!arguments.length)return f;f=e;return E};E.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return E};E.id=function(e){if(!arguments.length)return i;i=e;return E};E.showValues=function(e){if(!arguments.length)return c;c=e;return E};E.valueFormat=function(e){if(!arguments.length)return h;h=e;return E};E.rectClass=function(e){if(!arguments.length)return y;y=e;return E};return E};e.models.discreteBarChart=function(){"use strict";function w(e){e.each(function(e){var u=d3.select(this),p=this;var E=(s||parseInt(u.style("width"))||960)-i.left-i.right,S=(o||parseInt(u.style("height"))||400)-i.top-i.bottom;w.update=function(){g.beforeUpdate();u.transition().duration(y).call(w)};w.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var T=u.selectAll(".nv-noData").data([m]);T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");T.attr("x",i.left+E/2).attr("y",i.top+S/2).text(function(e){return e});return w}else{u.selectAll(".nv-noData").remove()}d=t.xScale();v=t.yScale().clamp(true);var N=u.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([e]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g");var k=C.append("defs");var L=N.select("g");C.append("g").attr("class","nv-x nv-axis");C.append("g").attr("class","nv-y nv-axis");C.append("g").attr("class","nv-barsWrap");L.attr("transform","translate("+i.left+","+i.top+")");if(l){L.select(".nv-y.nv-axis").attr("transform","translate("+E+",0)")}t.width(E).height(S);var A=L.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));A.transition().call(t);k.append("clipPath").attr("id","nv-x-label-clip-"+t.id()).append("rect");L.select("#nv-x-label-clip-"+t.id()+" rect").attr("width",d.rangeBand()*(c?2:1)).attr("height",16).attr("x",-d.rangeBand()/(c?1:2));if(a){n.scale(d).ticks(E/100).tickSize(-S,0);L.select(".nv-x.nv-axis").attr("transform","translate(0,"+(v.range()[0]+(t.showValues()&&v.domain()[0]<0?16:0))+")");L.select(".nv-x.nv-axis").transition().call(n);var O=L.select(".nv-x.nv-axis").selectAll("g");if(c){O.selectAll("text").attr("transform",function(e,t,n){return"translate(0,"+(n%2==0?"5":"17")+")"})}}if(f){r.scale(v).ticks(S/36).tickSize(-E,0);L.select(".nv-y.nv-axis").transition().call(r)}g.on("tooltipShow",function(e){if(h)b(e,p.parentNode)})});return w}var t=e.models.discreteBar(),n=e.models.axis(),r=e.models.axis();var i={top:15,right:10,bottom:50,left:60},s=null,o=null,u=e.utils.getColor(),a=true,f=true,l=false,c=false,h=true,p=function(e,t,n,r,i){return"<h3>"+t+"</h3>"+"<p>"+n+"</p>"},d,v,m="No Data Available.",g=d3.dispatch("tooltipShow","tooltipHide","beforeUpdate"),y=250;n.orient("bottom").highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient(l?"right":"left").tickFormat(d3.format(",.1f"));var b=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=p(i.series.key,a,f,i,w);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+i.left,e.pos[1]+i.top];g.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});g.on("tooltipHide",function(){if(h)e.tooltip.cleanup()});w.dispatch=g;w.discretebar=t;w.xAxis=n;w.yAxis=r;d3.rebind(w,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","id","showValues","valueFormat");w.options=e.utils.optionsFunc.bind(w);w.margin=function(e){if(!arguments.length)return i;i.top=typeof e.top!="undefined"?e.top:i.top;i.right=typeof e.right!="undefined"?e.right:i.right;i.bottom=typeof e.bottom!="undefined"?e.bottom:i.bottom;i.left=typeof e.left!="undefined"?e.left:i.left;return w};w.width=function(e){if(!arguments.length)return s;s=e;return w};w.height=function(e){if(!arguments.length)return o;o=e;return w};w.color=function(n){if(!arguments.length)return u;u=e.utils.getColor(n);t.color(u);return w};w.showXAxis=function(e){if(!arguments.length)return a;a=e;return w};w.showYAxis=function(e){if(!arguments.length)return f;f=e;return w};w.rightAlignYAxis=function(e){if(!arguments.length)return l;l=e;r.orient(e?"right":"left");return w};w.staggerLabels=function(e){if(!arguments.length)return c;c=e;return w};w.tooltips=function(e){if(!arguments.length)return h;h=e;return w};w.tooltipContent=function(e){if(!arguments.length)return p;p=e;return w};w.noData=function(e){if(!arguments.length)return m;m=e;return w};w.transitionDuration=function(e){if(!arguments.length)return y;y=e;return w};return w};e.models.distribution=function(){"use strict";function l(e){e.each(function(e){var a=n-(i==="x"?t.left+t.right:t.top+t.bottom),l=i=="x"?"y":"x",c=d3.select(this);f=f||u;var h=c.selectAll("g.nv-distribution").data([e]);var p=h.enter().append("g").attr("class","nvd3 nv-distribution");var d=p.append("g");var v=h.select("g");h.attr("transform","translate("+t.left+","+t.top+")");var m=v.selectAll("g.nv-dist").data(function(e){return e},function(e){return e.key});m.enter().append("g");m.attr("class",function(e,t){return"nv-dist nv-series-"+t}).style("stroke",function(e,t){return o(e,t)});var g=m.selectAll("line.nv-dist"+i).data(function(e){return e.values});g.enter().append("line").attr(i+"1",function(e,t){return f(s(e,t))}).attr(i+"2",function(e,t){return f(s(e,t))});m.exit().selectAll("line.nv-dist"+i).transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))}).style("stroke-opacity",0).remove();g.attr("class",function(e,t){return"nv-dist"+i+" nv-dist"+i+"-"+t}).attr(l+"1",0).attr(l+"2",r);g.transition().attr(i+"1",function(e,t){return u(s(e,t))}).attr(i+"2",function(e,t){return u(s(e,t))});f=u.copy()});return l}var t={top:0,right:0,bottom:0,left:0},n=400,r=8,i="x",s=function(e){return e[i]},o=e.utils.defaultColor(),u=d3.scale.linear(),a;var f;l.options=e.utils.optionsFunc.bind(l);l.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return l};l.width=function(e){if(!arguments.length)return n;n=e;return l};l.axis=function(e){if(!arguments.length)return i;i=e;return l};l.size=function(e){if(!arguments.length)return r;r=e;return l};l.getData=function(e){if(!arguments.length)return s;s=d3.functor(e);return l};l.scale=function(e){if(!arguments.length)return u;u=e;return l};l.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);return l};return l};e.models.historicalBar=function(){"use strict";function w(E){E.each(function(w){var E=n-t.left-t.right,S=r-t.top-t.bottom,T=d3.select(this);s.domain(d||d3.extent(w[0].values.map(u).concat(f)));if(c)s.range(m||[E*.5/w[0].values.length,E*(w[0].values.length-.5)/w[0].values.length]);else s.range(m||[0,E]);o.domain(v||d3.extent(w[0].values.map(a).concat(l))).range(g||[S,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=T.selectAll("g.nv-wrap.nv-historicalBar-"+i).data([w[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+i);var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-bars");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){y.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",E).attr("height",S);A.attr("clip-path",h?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-bars").selectAll(".nv-bar").data(function(e){return e},function(e,t){return u(e,t)});O.exit().remove();var M=O.enter().append("rect").attr("x",0).attr("y",function(t,n){return e.utils.NaNtoZero(o(Math.max(0,a(t,n))))}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.abs(o(a(t,n))-o(0)))}).attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).on("mouseover",function(e,t){if(!b)return;d3.select(this).classed("hover",true);y.elementMouseover({point:e,series:w[0],pos:[s(u(e,t)),o(a(e,t))],pointIndex:t,seriesIndex:0,e:d3.event})}).on("mouseout",function(e,t){if(!b)return;d3.select(this).classed("hover",false);y.elementMouseout({point:e,series:w[0],pointIndex:t,seriesIndex:0,e:d3.event})}).on("click",function(e,t){if(!b)return;y.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){if(!b)return;y.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("fill",function(e,t){return p(e,t)}).attr("class",function(e,t,n){return(a(e,t)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+n+"-"+t}).transition().attr("transform",function(e,t){return"translate("+(s(u(e,t))-E/w[0].values.length*.45)+",0)"}).attr("width",E/w[0].values.length*.9);O.transition().attr("y",function(t,n){var r=a(t,n)<0?o(0):o(0)-o(a(t,n))<1?o(0)-1:o(a(t,n));return e.utils.NaNtoZero(r)}).attr("height",function(t,n){return e.utils.NaNtoZero(Math.max(Math.abs(o(a(t,n))-o(0)),1))})});return w}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[],l=[0],c=false,h=true,p=e.utils.defaultColor(),d,v,m,g,y=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout"),b=true;w.highlightPoint=function(e,t){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar-0-"+e).classed("hover",t)};w.clearHighlights=function(){d3.select(".nv-historicalBar-"+i).select(".nv-bars .nv-bar.hover").classed("hover",false)};w.dispatch=y;w.options=e.utils.optionsFunc.bind(w);w.x=function(e){if(!arguments.length)return u;u=e;return w};w.y=function(e){if(!arguments.length)return a;a=e;return w};w.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return w};w.width=function(e){if(!arguments.length)return n;n=e;return w};w.height=function(e){if(!arguments.length)return r;r=e;return w};w.xScale=function(e){if(!arguments.length)return s;s=e;return w};w.yScale=function(e){if(!arguments.length)return o;o=e;return w};w.xDomain=function(e){if(!arguments.length)return d;d=e;return w};w.yDomain=function(e){if(!arguments.length)return v;v=e;return w};w.xRange=function(e){if(!arguments.length)return m;m=e;return w};w.yRange=function(e){if(!arguments.length)return g;g=e;return w};w.forceX=function(e){if(!arguments.length)return f;f=e;return w};w.forceY=function(e){if(!arguments.length)return l;l=e;return w};w.padData=function(e){if(!arguments.length)return c;c=e;return w};w.clipEdge=function(e){if(!arguments.length)return h;h=e;return w};w.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return w};w.id=function(e){if(!arguments.length)return i;i=e;return w};w.interactive=function(e){if(!arguments.length)return b;b=false;return w};return w};e.models.historicalBarChart=function(){"use strict";function x(e){e.each(function(d){var T=d3.select(this),N=this;var C=(u||parseInt(T.style("width"))||960)-s.left-s.right,k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom;x.update=function(){T.transition().duration(E).call(x)};x.container=this;g.disabled=d.map(function(e){return!!e.disabled});if(!y){var L;y={};for(L in g){if(g[L]instanceof Array)y[L]=g[L].slice(0);else y[L]=g[L]}}if(!d||!d.length||!d.filter(function(e){return e.values.length}).length){var A=T.selectAll(".nv-noData").data([b]);A.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");A.attr("x",s.left+C/2).attr("y",s.top+k/2).text(function(e){return e});return x}else{T.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();var O=T.selectAll("g.nv-wrap.nv-historicalBarChart").data([d]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-legendWrap");if(f){i.width(C);_.select(".nv-legendWrap").datum(d).call(i);if(s.top!=i.height()){s.top=i.height();k=(a||parseInt(T.style("height"))||400)-s.top-s.bottom}O.select(".nv-legendWrap").attr("transform","translate(0,"+ -s.top+")")}O.attr("transform","translate("+s.left+","+s.top+")");if(h){_.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}t.width(C).height(k).color(d.map(function(e,t){return e.color||o(e,t)}).filter(function(e,t){return!d[t].disabled}));var D=_.select(".nv-barsWrap").datum(d.filter(function(e){return!e.disabled}));D.transition().call(t);if(l){n.scale(v).tickSize(-k,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+m.range()[0]+")");_.select(".nv-x.nv-axis").transition().call(n)}if(c){r.scale(m).ticks(k/36).tickSize(-C,0);_.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("legendClick",function(t,n){t.disabled=!t.disabled;if(!d.filter(function(e){return!e.disabled}).length){d.map(function(e){e.disabled=false;O.selectAll(".nv-series").classed("disabled",false);return e})}g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);e.transition().call(x)});i.dispatch.on("legendDblclick",function(e){d.forEach(function(e){e.disabled=true});e.disabled=false;g.disabled=d.map(function(e){return!!e.disabled});w.stateChange(g);x.update()});w.on("tooltipShow",function(e){if(p)S(e,N.parentNode)});w.on("changeState",function(t){if(typeof t.disabled!=="undefined"){d.forEach(function(e,n){e.disabled=t.disabled[n]});g.disabled=t.disabled}e.call(x)})});return x}var t=e.models.historicalBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend();var s={top:30,right:90,bottom:50,left:90},o=e.utils.defaultColor(),u=null,a=null,f=false,l=true,c=true,h=false,p=true,d=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},v,m,g={},y=null,b="No Data Available.",w=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),E=250;n.orient("bottom").tickPadding(7);r.orient(h?"right":"left");var S=function(i,s){if(s){var o=d3.select(s).select("svg");var u=o.node()?o.attr("viewBox"):null;if(u){u=u.split(" ");var a=parseInt(o.style("width"))/u[2];i.pos[0]=i.pos[0]*a;i.pos[1]=i.pos[1]*a}}var f=i.pos[0]+(s.offsetLeft||0),l=i.pos[1]+(s.offsetTop||0),c=n.tickFormat()(t.x()(i.point,i.pointIndex)),h=r.tickFormat()(t.y()(i.point,i.pointIndex)),p=d(i.series.key,c,h,i,x);e.tooltip.show([f,l],p,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+s.left,e.pos[1]+s.top];w.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){w.tooltipHide(e)});w.on("tooltipHide",function(){if(p)e.tooltip.cleanup()});x.dispatch=w;x.bars=t;x.legend=i;x.xAxis=n;x.yAxis=r;d3.rebind(x,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id","interpolate","highlightPoint","clearHighlights","interactive");x.options=e.utils.optionsFunc.bind(x);x.margin=function(e){if(!arguments.length)return s;s.top=typeof e.top!="undefined"?e.top:s.top;s.right=typeof e.right!="undefined"?e.right:s.right;s.bottom=typeof e.bottom!="undefined"?e.bottom:s.bottom;s.left=typeof e.left!="undefined"?e.left:s.left;return x};x.width=function(e){if(!arguments.length)return u;u=e;return x};x.height=function(e){if(!arguments.length)return a;a=e;return x};x.color=function(t){if(!arguments.length)return o;o=e.utils.getColor(t);i.color(o);return x};x.showLegend=function(e){if(!arguments.length)return f;f=e;return x};x.showXAxis=function(e){if(!arguments.length)return l;l=e;return x};x.showYAxis=function(e){if(!arguments.length)return c;c=e;return x};x.rightAlignYAxis=function(e){if(!arguments.length)return h;h=e;r.orient(e?"right":"left");return x};x.tooltips=function(e){if(!arguments.length)return p;p=e;return x};x.tooltipContent=function(e){if(!arguments.length)return d;d=e;return x};x.state=function(e){if(!arguments.length)return g;g=e;return x};x.defaultState=function(e){if(!arguments.length)return y;y=e;return x};x.noData=function(e){if(!arguments.length)return b;b=e;return x};x.transitionDuration=function(e){if(!arguments.length)return E;E=e;return x};return x};e.models.indentedTree=function(){"use strict";function g(e){e.each(function(e){function k(e,t,n){d3.event.stopPropagation();if(d3.event.shiftKey&&!n){d3.event.shiftKey=false;e.values&&e.values.forEach(function(e){if(e.values||e._values){k(e,0,true)}});return true}if(!O(e)){return true}if(e.values){e._values=e.values;e.values=null}else{e.values=e._values;e._values=null}g.update()}function L(e){return e._values&&e._values.length?h:e.values&&e.values.length?p:""}function A(e){return e._values&&e._values.length}function O(e){var t=e.values||e._values;return t&&t.length}var t=1,n=d3.select(this);var i=d3.layout.tree().children(function(e){return e.values}).size([r,f]);g.update=function(){n.transition().duration(600).call(g)};if(!e[0])e[0]={key:a};var s=i.nodes(e[0]);var y=d3.select(this).selectAll("div").data([[s]]);var b=y.enter().append("div").attr("class","nvd3 nv-wrap nv-indentedtree");var w=b.append("table");var E=y.select("table").attr("width","100%").attr("class",c);if(o){var S=w.append("thead");var x=S.append("tr");l.forEach(function(e){x.append("th").attr("width",e.width?e.width:"10%").style("text-align",e.type=="numeric"?"right":"left").append("span").text(e.label)})}var T=E.selectAll("tbody").data(function(e){return e});T.enter().append("tbody");t=d3.max(s,function(e){return e.depth});i.size([r,t*f]);var N=T.selectAll("tr").data(function(e){return e.filter(function(e){return u&&!e.children?u(e):true})},function(e,t){return e.id||e.id||++m});N.exit().remove();N.select("img.nv-treeicon").attr("src",L).classed("folded",A);var C=N.enter().append("tr");l.forEach(function(e,t){var n=C.append("td").style("padding-left",function(e){return(t?0:e.depth*f+12+(L(e)?0:16))+"px"},"important").style("text-align",e.type=="numeric"?"right":"left");if(t==0){n.append("img").classed("nv-treeicon",true).classed("nv-folded",A).attr("src",L).style("width","14px").style("height","14px").style("padding","0 1px").style("display",function(e){return L(e)?"inline-block":"none"}).on("click",k)}n.each(function(n){if(!t&&v(n))d3.select(this).append("a").attr("href",v).attr("class",d3.functor(e.classes)).append("span");else d3.select(this).append("span");d3.select(this).select("span").attr("class",d3.functor(e.classes)).text(function(t){return e.format?e.format(t):t[e.key]||"-"})});if(e.showCount){n.append("span").attr("class","nv-childrenCount");N.selectAll("span.nv-childrenCount").text(function(e){return e.values&&e.values.length||e._values&&e._values.length?"("+(e.values&&e.values.filter(function(e){return u?u(e):true}).length||e._values&&e._values.filter(function(e){return u?u(e):true}).length||0)+")":""})}});N.order().on("click",function(e){d.elementClick({row:this,data:e,pos:[e.x,e.y]})}).on("dblclick",function(e){d.elementDblclick({row:this,data:e,pos:[e.x,e.y]})}).on("mouseover",function(e){d.elementMouseover({row:this,data:e,pos:[e.x,e.y]})}).on("mouseout",function(e){d.elementMouseout({row:this,data:e,pos:[e.x,e.y]})})});return g}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e4),o=true,u=false,a="No Data Available.",f=20,l=[{key:"key",label:"Name",type:"text"}],c=null,h="images/grey-plus.png",p="images/grey-minus.png",d=d3.dispatch("elementClick","elementDblclick","elementMouseover","elementMouseout"),v=function(e){return e.url};var m=0;g.options=e.utils.optionsFunc.bind(g);g.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return g};g.width=function(e){if(!arguments.length)return n;n=e;return g};g.height=function(e){if(!arguments.length)return r;r=e;return g};g.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);scatter.color(i);return g};g.id=function(e){if(!arguments.length)return s;s=e;return g};g.header=function(e){if(!arguments.length)return o;o=e;return g};g.noData=function(e){if(!arguments.length)return a;a=e;return g};g.filterZero=function(e){if(!arguments.length)return u;u=e;return g};g.columns=function(e){if(!arguments.length)return l;l=e;return g};g.tableClass=function(e){if(!arguments.length)return c;c=e;return g};g.iconOpen=function(e){if(!arguments.length)return h;h=e;return g};g.iconClose=function(e){if(!arguments.length)return p;p=e;return g};g.getUrl=function(e){if(!arguments.length)return v;v=e;return g};return g};e.models.legend=function(){"use strict";function h(p){p.each(function(h){var p=n-t.left-t.right,d=d3.select(this);var v=d.selectAll("g.nv-legend").data([h]);var m=v.enter().append("g").attr("class","nvd3 nv-legend").append("g");var g=v.select("g");v.attr("transform","translate("+t.left+","+t.top+")");var y=g.selectAll(".nv-series").data(function(e){return e});var b=y.enter().append("g").attr("class","nv-series").on("mouseover",function(e,t){l.legendMouseover(e,t)}).on("mouseout",function(e,t){l.legendMouseout(e,t)}).on("click",function(e,t){if(!c){l.legendClick(e,t);if(a){if(f){h.forEach(function(e){e.disabled=true});e.disabled=false}else{e.disabled=!e.disabled;if(h.every(function(e){return e.disabled})){h.forEach(function(e){e.disabled=false})}}l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}}).on("dblclick",function(e,t){if(!c){l.legendDblclick(e,t);if(a){h.forEach(function(e){e.disabled=true});e.disabled=false;l.stateChange({disabled:h.map(function(e){return!!e.disabled})})}}});b.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5);b.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");y.classed("disabled",function(e){return e.disabled});y.exit().remove();y.select("circle").style("fill",function(e,t){return e.color||s(e,t)}).style("stroke",function(e,t){return e.color||s(e,t)});y.select("text").text(i);if(o){var w=[];y.each(function(t,n){var r=d3.select(this).select("text");var i=r.node().getComputedTextLength()||e.utils.calcApproxTextWidth(r);w.push(i+28)});var E=0;var S=0;var x=[];while(S<p&&E<w.length){x[E]=w[E];S+=w[E++]}if(E===0)E=1;while(S>p&&E>1){x=[];E--;for(var T=0;T<w.length;T++){if(w[T]>(x[T%E]||0))x[T%E]=w[T]}S=x.reduce(function(e,t,n,r){return e+t})}var N=[];for(var C=0,k=0;C<E;C++){N[C]=k;k+=x[C]}y.attr("transform",function(e,t){return"translate("+N[t%E]+","+(5+Math.floor(t/E)*20)+")"});if(u){g.attr("transform","translate("+(n-t.right-S)+","+t.top+")")}else{g.attr("transform","translate(0"+","+t.top+")")}r=t.top+t.bottom+Math.ceil(w.length/E)*20}else{var L=5,A=5,O=0,M;y.attr("transform",function(e,r){var i=d3.select(this).select("text").node().getComputedTextLength()+28;M=A;if(n<t.left+t.right+M+i){A=M=5;L+=20}A+=i;if(A>O)O=A;return"translate("+M+","+L+")"});g.attr("transform","translate("+(n-t.right-O)+","+t.top+")");r=t.top+t.bottom+L+15}});return h}var t={top:5,right:0,bottom:5,left:0},n=400,r=20,i=function(e){return e.key},s=e.utils.defaultColor(),o=true,u=true,a=true,f=false,l=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),c=false;h.dispatch=l;h.options=e.utils.optionsFunc.bind(h);h.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return h};h.width=function(e){if(!arguments.length)return n;n=e;return h};h.height=function(e){if(!arguments.length)return r;r=e;return h};h.key=function(e){if(!arguments.length)return i;i=e;return h};h.color=function(t){if(!arguments.length)return s;s=e.utils.getColor(t);return h};h.align=function(e){if(!arguments.length)return o;o=e;return h};h.rightAlign=function(e){if(!arguments.length)return u;u=e;return h};h.dualaxis=function(e){if(!arguments.length)return c;c=e;return h};h.updateState=function(e){if(!arguments.length)return a;a=e;return h};h.radioButtonMode=function(e){if(!arguments.length)return f;f=e;return h};return h};e.models.line=function(){"use strict";function m(g){g.each(function(m){var g=r-n.left-n.right,b=i-n.top-n.bottom,w=d3.select(this);c=t.xScale();h=t.yScale();d=d||c;v=v||h;var E=w.selectAll("g.nv-wrap.nv-line").data([m]);var S=E.enter().append("g").attr("class","nvd3 nv-wrap nv-line");var T=S.append("defs");var N=S.append("g");var C=E.select("g");N.append("g").attr("class","nv-groups");N.append("g").attr("class","nv-scatterWrap");E.attr("transform","translate("+n.left+","+n.top+")");t.width(g).height(b);var k=E.select(".nv-scatterWrap");k.transition().call(t);T.append("clipPath").attr("id","nv-edge-clip-"+t.id()).append("rect");E.select("#nv-edge-clip-"+t.id()+" rect").attr("width",g).attr("height",b);C.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");k.attr("clip-path",l?"url(#nv-edge-clip-"+t.id()+")":"");var L=E.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});L.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);L.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();L.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return s(e,t)}).style("stroke",function(e,t){return s(e,t)});L.transition().style("stroke-opacity",1).style("fill-opacity",.5);var A=L.selectAll("path.nv-area").data(function(e){return f(e)?[e]:[]});A.enter().append("path").attr("class","nv-area").attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}).y1(function(e,t){return v(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});L.exit().selectAll("path.nv-area").remove();A.transition().attr("d",function(t){return d3.svg.area().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y0(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}).y1(function(e,t){return h(h.domain()[0]<=0?h.domain()[1]>=0?0:h.domain()[1]:h.domain()[0])}).apply(this,[t.values])});var O=L.selectAll("path.nv-line").data(function(e){return[e.values]});O.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(d(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(v(u(t,n)))}));L.exit().selectAll("path.nv-line").transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));O.transition().attr("d",d3.svg.line().interpolate(p).defined(a).x(function(t,n){return e.utils.NaNtoZero(c(o(t,n)))}).y(function(t,n){return e.utils.NaNtoZero(h(u(t,n)))}));d=c.copy();v=h.copy()});return m}var t=e.models.scatter();var n={top:0,right:0,bottom:0,left:0},r=960,i=500,s=e.utils.defaultColor(),o=function(e){return e.x},u=function(e){return e.y},a=function(e,t){return!isNaN(u(e,t))&&u(e,t)!==null},f=function(e){return e.area},l=false,c,h,p="linear";t.size(16).sizeDomain([16,256]);var d,v;m.dispatch=t.dispatch;m.scatter=t;d3.rebind(m,t,"id","interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","padData","highlightPoint","clearHighlights");m.options=e.utils.optionsFunc.bind(m);m.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return m};m.width=function(e){if(!arguments.length)return r;r=e;return m};m.height=function(e){if(!arguments.length)return i;i=e;return m};m.x=function(e){if(!arguments.length)return o;o=e;t.x(e);return m};m.y=function(e){if(!arguments.length)return u;u=e;t.y(e);return m};m.clipEdge=function(e){if(!arguments.length)return l;l=e;return m};m.color=function(n){if(!arguments.length)return s;s=e.utils.getColor(n);t.color(s);return m};m.interpolate=function(e){if(!arguments.length)return p;p=e;return m};m.defined=function(e){if(!arguments.length)return a;a=e;return m};m.isArea=function(e){if(!arguments.length)return f;f=d3.functor(e);return m};return m};e.models.lineChart=function(){"use strict";function N(m){m.each(function(m){var C=d3.select(this),k=this;var L=(a||parseInt(C.style("width"))||960)-o.left-o.right,A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom;N.update=function(){C.transition().duration(x).call(N)};N.container=this;b.disabled=m.map(function(e){return!!e.disabled});if(!w){var O;w={};for(O in b){if(b[O]instanceof Array)w[O]=b[O].slice(0);else w[O]=b[O]}}if(!m||!m.length||!m.filter(function(e){return e.values.length}).length){var M=C.selectAll(".nv-noData").data([E]);M.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");M.attr("x",o.left+L/2).attr("y",o.top+A/2).text(function(e){return e});return N}else{C.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var _=C.selectAll("g.nv-wrap.nv-lineChart").data([m]);var D=_.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g");var P=_.select("g");D.append("rect").style("opacity",0);D.append("g").attr("class","nv-x nv-axis");D.append("g").attr("class","nv-y nv-axis");D.append("g").attr("class","nv-linesWrap");D.append("g").attr("class","nv-legendWrap");D.append("g").attr("class","nv-interactive");P.select("rect").attr("width",L).attr("height",A);if(l){i.width(L);P.select(".nv-legendWrap").datum(m).call(i);if(o.top!=i.height()){o.top=i.height();A=(f||parseInt(C.style("height"))||400)-o.top-o.bottom}_.select(".nv-legendWrap").attr("transform","translate(0,"+ -o.top+")")}_.attr("transform","translate("+o.left+","+o.top+")");if(p){P.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}if(d){s.width(L).height(A).margin({left:o.left,top:o.top}).svgContainer(C).xScale(g);_.select(".nv-interactive").call(s)}t.width(L).height(A).color(m.map(function(e,t){return e.color||u(e,t)}).filter(function(e,t){return!m[t].disabled}));var H=P.select(".nv-linesWrap").datum(m.filter(function(e){return!e.disabled}));H.transition().call(t);if(c){n.scale(g).ticks(L/100).tickSize(-A,0);P.select(".nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");P.select(".nv-x.nv-axis").transition().call(n)}if(h){r.scale(y).ticks(A/36).tickSize(-L,0);P.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);N.update()});s.dispatch.on("elementMousemove",function(i){t.clearHighlights();var a,f,l,c=[];m.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){f=e.interactiveBisect(n.values,i.pointXValue,N.x());t.highlightPoint(r,f,true);var s=n.values[f];if(typeof s==="undefined")return;if(typeof a==="undefined")a=s;if(typeof l==="undefined")l=N.xScale()(N.x()(s,f));c.push({key:n.key,value:N.y()(s,f),color:u(n,n.seriesIndex)})});if(c.length>2){var h=N.yScale().invert(i.mouseY);var p=Math.abs(N.yScale().domain()[0]-N.yScale().domain()[1]);var d=.03*p;var g=e.nearestValueIndex(c.map(function(e){return e.value}),h,d);if(g!==null)c[g].highlight=true}var y=n.tickFormat()(N.x()(a,f));s.tooltip.position({left:l+o.left,top:i.mouseY+o.top}).chartContainer(k.parentNode).enabled(v).valueFormatter(function(e,t){return r.tickFormat()(e)}).data({value:y,series:c})();s.renderGuideLine(l)});s.dispatch.on("elementMouseout",function(e){S.tooltipHide();t.clearHighlights()});S.on("tooltipShow",function(e){if(v)T(e,k.parentNode)});S.on("changeState",function(e){if(typeof e.disabled!=="undefined"){m.forEach(function(t,n){t.disabled=e.disabled[n]});b.disabled=e.disabled}N.update()})});return N}var t=e.models.line(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.interactiveGuideline();var o={top:30,right:20,bottom:50,left:60},u=e.utils.defaultColor(),a=null,f=null,l=true,c=true,h=true,p=false,d=false,v=true,m=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=250;n.orient("bottom").tickPadding(7);r.orient(p?"right":"left");var T=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=m(i.series.key,a,f,i,N);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(v)e.tooltip.cleanup()});N.dispatch=S;N.lines=t;N.legend=i;N.xAxis=n;N.yAxis=r;N.interactiveLayer=s;d3.rebind(N,t,"defined","isArea","x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","useVoronoi","id","interpolate");N.options=e.utils.optionsFunc.bind(N);N.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return N};N.width=function(e){if(!arguments.length)return a;a=e;return N};N.height=function(e){if(!arguments.length)return f;f=e;return N};N.color=function(t){if(!arguments.length)return u;u=e.utils.getColor(t);i.color(u);return N};N.showLegend=function(e){if(!arguments.length)return l;l=e;return N};N.showXAxis=function(e){if(!arguments.length)return c;c=e;return N};N.showYAxis=function(e){if(!arguments.length)return h;h=e;return N};N.rightAlignYAxis=function(e){if(!arguments.length)return p;p=e;r.orient(e?"right":"left");return N};N.useInteractiveGuideline=function(e){if(!arguments.length)return d;d=e;if(e===true){N.interactive(false);N.useVoronoi(false)}return N};N.tooltips=function(e){if(!arguments.length)return v;v=e;return N};N.tooltipContent=function(e){if(!arguments.length)return m;m=e;return N};N.state=function(e){if(!arguments.length)return b;b=e;return N};N.defaultState=function(e){if(!arguments.length)return w;w=e;return N};N.noData=function(e){if(!arguments.length)return E;E=e;return N};N.transitionDuration=function(e){if(!arguments.length)return x;x=e;return N};return N};e.models.linePlusBarChart=function(){"use strict";function T(e){e.each(function(e){var l=d3.select(this),c=this;var v=(a||parseInt(l.style("width"))||960)-u.left-u.right,N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom;T.update=function(){l.transition().call(T)};b.disabled=e.map(function(e){return!!e.disabled});if(!w){var C;w={};for(C in b){if(b[C]instanceof Array)w[C]=b[C].slice(0);else w[C]=b[C]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var k=l.selectAll(".nv-noData").data([E]);k.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");k.attr("x",u.left+v/2).attr("y",u.top+N/2).text(function(e){return e});return T}else{l.selectAll(".nv-noData").remove()}var L=e.filter(function(e){return!e.disabled&&e.bar});var A=e.filter(function(e){return!e.bar});m=A.filter(function(e){return!e.disabled}).length&&A.filter(function(e){return!e.disabled})[0].values.length?t.xScale():n.xScale();g=n.yScale();y=t.yScale();var O=d3.select(this).selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var _=O.select("g");M.append("g").attr("class","nv-x nv-axis");M.append("g").attr("class","nv-y1 nv-axis");M.append("g").attr("class","nv-y2 nv-axis");M.append("g").attr("class","nv-barsWrap");M.append("g").attr("class","nv-linesWrap");M.append("g").attr("class","nv-legendWrap");if(p){o.width(v/2);_.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(o);if(u.top!=o.height()){u.top=o.height();N=(f||parseInt(l.style("height"))||400)-u.top-u.bottom}_.select(".nv-legendWrap").attr("transform","translate("+v/2+","+ -u.top+")")}O.attr("transform","translate("+u.left+","+u.top+")");t.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));n.width(v).height(N).color(e.map(function(e,t){return e.color||h(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));var D=_.select(".nv-barsWrap").datum(L.length?L:[{values:[]}]);var P=_.select(".nv-linesWrap").datum(A[0]&&!A[0].disabled?A:[{values:[]}]);d3.transition(D).call(n);d3.transition(P).call(t);r.scale(m).ticks(v/100).tickSize(-N,0);_.select(".nv-x.nv-axis").attr("transform","translate(0,"+g.range()[0]+")");d3.transition(_.select(".nv-x.nv-axis")).call(r);i.scale(g).ticks(N/36).tickSize(-v,0);d3.transition(_.select(".nv-y1.nv-axis")).style("opacity",L.length?1:0).call(i);s.scale(y).ticks(N/36).tickSize(L.length?0:-v,0);_.select(".nv-y2.nv-axis").style("opacity",A.length?1:0).attr("transform","translate("+v+",0)");d3.transition(_.select(".nv-y2.nv-axis")).call(s);o.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);T.update()});S.on("tooltipShow",function(e){if(d)x(e,c.parentNode)});S.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});b.disabled=t.disabled}T.update()})});return T}var t=e.models.line(),n=e.models.historicalBar(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.legend();var u={top:30,right:60,bottom:50,left:60},a=null,f=null,l=function(e){return e.x},c=function(e){return e.y},h=e.utils.defaultColor(),p=true,d=true,v=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},m,g,y,b={},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");n.padData(true);t.clipEdge(false).padData(true);r.orient("bottom").tickPadding(7).highlightZero(false);i.orient("left");s.orient("right");var x=function(n,o){var u=n.pos[0]+(o.offsetLeft||0),a=n.pos[1]+(o.offsetTop||0),f=r.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?i:s).tickFormat()(t.y()(n.point,n.pointIndex)),c=v(n.series.key,f,l,n,T);e.tooltip.show([u,a],c,n.value<0?"n":"s",null,o)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});n.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top];S.tooltipShow(e)});n.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});T.dispatch=S;T.legend=o;T.lines=t;T.bars=n;T.xAxis=r;T.y1Axis=i;T.y2Axis=s;d3.rebind(T,t,"defined","size","clipVoronoi","interpolate");T.options=e.utils.optionsFunc.bind(T);T.x=function(e){if(!arguments.length)return l;l=e;t.x(e);n.x(e);return T};T.y=function(e){if(!arguments.length)return c;c=e;t.y(e);n.y(e);return T};T.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return T};T.width=function(e){if(!arguments.length)return a;a=e;return T};T.height=function(e){if(!arguments.length)return f;f=e;return T};T.color=function(t){if(!arguments.length)return h;h=e.utils.getColor(t);o.color(h);return T};T.showLegend=function(e){if(!arguments.length)return p;p=e;return T};T.tooltips=function(e){if(!arguments.length)return d;d=e;return T};T.tooltipContent=function(e){if(!arguments.length)return v;v=e;return T};T.state=function(e){if(!arguments.length)return b;b=e;return T};T.defaultState=function(e){if(!arguments.length)return w;w=e;return T};T.noData=function(e){if(!arguments.length)return E;E=e;return T};return T};e.models.lineWithFocusChart=function(){"use strict";function k(e){e.each(function(e){function U(e){var t=+(e=="e"),n=t?1:-1,r=M/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function z(){if(!a.empty())a.extent(w);I.data([a.empty()?g.domain():w]).each(function(e,t){var n=g(e[0])-v.range()[0],r=v.range()[1]-g(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",g(e[1])).attr("width",r<0?0:r)})}function W(){w=a.empty()?null:a.extent();var n=a.empty()?g.domain():a.extent();if(Math.abs(n[0]-n[1])<=1){return}T.brush({extent:n,brush:a});z();var s=H.select(".nv-focus .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}).map(function(e,r){return{key:e.key,values:e.values.filter(function(e,r){return t.x()(e,r)>=n[0]&&t.x()(e,r)<=n[1]})}}));s.transition().duration(N).call(t);H.select(".nv-focus .nv-x.nv-axis").transition().duration(N).call(r);H.select(".nv-focus .nv-y.nv-axis").transition().duration(N).call(i)}var S=d3.select(this),L=this;var A=(h||parseInt(S.style("width"))||960)-f.left-f.right,O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d,M=d-l.top-l.bottom;k.update=function(){S.transition().duration(N).call(k)};k.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var _=S.selectAll(".nv-noData").data([x]);_.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");_.attr("x",f.left+A/2).attr("y",f.top+O/2).text(function(e){return e});return k}else{S.selectAll(".nv-noData").remove()}v=t.xScale();m=t.yScale();g=n.xScale();y=n.yScale();var D=S.selectAll("g.nv-wrap.nv-lineWithFocusChart").data([e]);var P=D.enter().append("g").attr("class","nvd3 nv-wrap nv-lineWithFocusChart").append("g");var H=D.select("g");P.append("g").attr("class","nv-legendWrap");var B=P.append("g").attr("class","nv-focus");B.append("g").attr("class","nv-x nv-axis");B.append("g").attr("class","nv-y nv-axis");B.append("g").attr("class","nv-linesWrap");var j=P.append("g").attr("class","nv-context");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-linesWrap");j.append("g").attr("class","nv-brushBackground");j.append("g").attr("class","nv-x nv-brush");if(b){u.width(A);H.select(".nv-legendWrap").datum(e).call(u);if(f.top!=u.height()){f.top=u.height();O=(p||parseInt(S.style("height"))||400)-f.top-f.bottom-d}H.select(".nv-legendWrap").attr("transform","translate(0,"+ -f.top+")")}D.attr("transform","translate("+f.left+","+f.top+")");t.width(A).height(O).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));n.defined(t.defined()).width(A).height(M).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));H.select(".nv-context").attr("transform","translate(0,"+(O+f.bottom+l.top)+")");var F=H.select(".nv-context .nv-linesWrap").datum(e.filter(function(e){return!e.disabled}));d3.transition(F).call(n);r.scale(v).ticks(A/100).tickSize(-O,0);i.scale(m).ticks(O/36).tickSize(-A,0);H.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+O+")");a.x(g).on("brush",function(){var e=k.transitionDuration();k.transitionDuration(0);W();k.transitionDuration(e)});if(w)a.extent(w);var I=H.select(".nv-brushBackground").selectAll("g").data([w||a.extent()]);var q=I.enter().append("g");q.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",M);q.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",M);var R=H.select(".nv-x.nv-brush").call(a);R.selectAll("rect").attr("height",M);R.selectAll(".resize").append("path").attr("d",U);W();s.scale(g).ticks(A/100).tickSize(-M,0);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");d3.transition(H.select(".nv-context .nv-x.nv-axis")).call(s);o.scale(y).ticks(M/36).tickSize(-A,0);d3.transition(H.select(".nv-context .nv-y.nv-axis")).call(o);H.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+y.range()[0]+")");u.dispatch.on("stateChange",function(e){k.update()});T.on("tooltipShow",function(e){if(E)C(e,L.parentNode)})});return k}var t=e.models.line(),n=e.models.line(),r=e.models.axis(),i=e.models.axis(),s=e.models.axis(),o=e.models.axis(),u=e.models.legend(),a=d3.svg.brush();var f={top:30,right:30,bottom:30,left:60},l={top:0,right:30,bottom:20,left:60},c=e.utils.defaultColor(),h=null,p=null,d=100,v,m,g,y,b=true,w=null,E=true,S=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},x="No Data Available.",T=d3.dispatch("tooltipShow","tooltipHide","brush"),N=250;t.clipEdge(true);n.interactive(false);r.orient("bottom").tickPadding(5);i.orient("left");s.orient("bottom").tickPadding(5);o.orient("left");var C=function(n,s){var o=n.pos[0]+(s.offsetLeft||0),u=n.pos[1]+(s.offsetTop||0),a=r.tickFormat()(t.x()(n.point,n.pointIndex)),f=i.tickFormat()(t.y()(n.point,n.pointIndex)),l=S(n.series.key,a,f,n,k);e.tooltip.show([o,u],l,null,null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+f.left,e.pos[1]+f.top];T.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){T.tooltipHide(e)});T.on("tooltipHide",function(){if(E)e.tooltip.cleanup()});k.dispatch=T;k.legend=u;k.lines=t;k.lines2=n;k.xAxis=r;k.yAxis=i;k.x2Axis=s;k.y2Axis=o;d3.rebind(k,t,"defined","isArea","size","xDomain","yDomain","xRange","yRange","forceX","forceY","interactive","clipEdge","clipVoronoi","id");k.options=e.utils.optionsFunc.bind(k);k.x=function(e){if(!arguments.length)return t.x;t.x(e);n.x(e);return k};k.y=function(e){if(!arguments.length)return t.y;t.y(e);n.y(e);return k};k.margin=function(e){if(!arguments.length)return f;f.top=typeof e.top!="undefined"?e.top:f.top;f.right=typeof e.right!="undefined"?e.right:f.right;f.bottom=typeof e.bottom!="undefined"?e.bottom:f.bottom;f.left=typeof e.left!="undefined"?e.left:f.left;return k};k.margin2=function(e){if(!arguments.length)return l;l=e;return k};k.width=function(e){if(!arguments.length)return h;h=e;return k};k.height=function(e){if(!arguments.length)return p;p=e;return k};k.height2=function(e){if(!arguments.length)return d;d=e;return k};k.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);u.color(c);return k};k.showLegend=function(e){if(!arguments.length)return b;b=e;return k};k.tooltips=function(e){if(!arguments.length)return E;E=e;return k};k.tooltipContent=function(e){if(!arguments.length)return S;S=e;return k};k.interpolate=function(e){if(!arguments.length)return t.interpolate();t.interpolate(e);n.interpolate(e);return k};k.noData=function(e){if(!arguments.length)return x;x=e;return k};k.xTickFormat=function(e){if(!arguments.length)return r.tickFormat();r.tickFormat(e);s.tickFormat(e);return k};k.yTickFormat=function(e){if(!arguments.length)return i.tickFormat();i.tickFormat(e);o.tickFormat(e);return k};k.brushExtent=function(e){if(!arguments.length)return w;w=e;return k};k.transitionDuration=function(e){if(!arguments.length)return N;N=e;return k};return k};e.models.linePlusBarWithFocusChart=function(){"use strict";function B(e){e.each(function(e){function nt(e){var t=+(e=="e"),n=t?1:-1,r=q/3;return"M"+.5*n+","+r+"A6,6 0 0 "+t+" "+6.5*n+","+(r+6)+"V"+(2*r-6)+"A6,6 0 0 "+t+" "+.5*n+","+2*r+"Z"+"M"+2.5*n+","+(r+8)+"V"+(2*r-8)+"M"+4.5*n+","+(r+8)+"V"+(2*r-8)}function rt(){if(!h.empty())h.extent(x);Z.data([h.empty()?k.domain():x]).each(function(e,t){var n=k(e[0])-k.range()[0],r=k.range()[1]-k(e[1]);d3.select(this).select(".left").attr("width",n<0?0:n);d3.select(this).select(".right").attr("x",k(e[1])).attr("width",r<0?0:r)})}function it(){x=h.empty()?null:h.extent();S=h.empty()?k.domain():h.extent();D.brush({extent:S,brush:h});rt();r.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));t.width(F).height(I).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var n=J.select(".nv-focus .nv-barsWrap").datum(!U.length?[{values:[]}]:U.map(function(e,t){return{key:e.key,values:e.values.filter(function(e,t){return r.x()(e,t)>=S[0]&&r.x()(e,t)<=S[1]})}}));var i=J.select(".nv-focus .nv-linesWrap").datum(z[0].disabled?[{values:[]}]:z.map(function(e,n){return{key:e.key,values:e.values.filter(function(e,n){return t.x()(e,n)>=S[0]&&t.x()(e,n)<=S[1]})}}));if(U.length){C=r.xScale()}else{C=t.xScale()}s.scale(C).ticks(F/100).tickSize(-I,0);s.domain([Math.ceil(S[0]),Math.floor(S[1])]);J.select(".nv-x.nv-axis").transition().duration(P).call(s);n.transition().duration(P).call(r);i.transition().duration(P).call(t);J.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+L.range()[0]+")");u.scale(L).ticks(I/36).tickSize(-F,0);J.select(".nv-focus .nv-y1.nv-axis").style("opacity",U.length?1:0);a.scale(A).ticks(I/36).tickSize(U.length?0:-F,0);J.select(".nv-focus .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+C.range()[1]+",0)");J.select(".nv-focus .nv-y1.nv-axis").transition().duration(P).call(u);J.select(".nv-focus .nv-y2.nv-axis").transition().duration(P).call(a)}var N=d3.select(this),j=this;var F=(v||parseInt(N.style("width"))||960)-p.left-p.right,I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g,q=g-d.top-d.bottom;B.update=function(){N.transition().duration(P).call(B)};B.container=this;if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=N.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",p.left+F/2).attr("y",p.top+I/2).text(function(e){return e});return B}else{N.selectAll(".nv-noData").remove()}var U=e.filter(function(e){return!e.disabled&&e.bar});var z=e.filter(function(e){return!e.bar});C=r.xScale();k=o.scale();L=r.yScale();A=t.yScale();O=i.yScale();M=n.yScale();var W=e.filter(function(e){return!e.disabled&&e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});var X=e.filter(function(e){return!e.disabled&&!e.bar}).map(function(e){return e.values.map(function(e,t){return{x:y(e,t),y:b(e,t)}})});C.range([0,F]);k.domain(d3.extent(d3.merge(W.concat(X)),function(e){return e.x})).range([0,F]);var V=N.selectAll("g.nv-wrap.nv-linePlusBar").data([e]);var $=V.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g");var J=V.select("g");$.append("g").attr("class","nv-legendWrap");var K=$.append("g").attr("class","nv-focus");K.append("g").attr("class","nv-x nv-axis");K.append("g").attr("class","nv-y1 nv-axis");K.append("g").attr("class","nv-y2 nv-axis");K.append("g").attr("class","nv-barsWrap");K.append("g").attr("class","nv-linesWrap");var Q=$.append("g").attr("class","nv-context");Q.append("g").attr("class","nv-x nv-axis");Q.append("g").attr("class","nv-y1 nv-axis");Q.append("g").attr("class","nv-y2 nv-axis");Q.append("g").attr("class","nv-barsWrap");Q.append("g").attr("class","nv-linesWrap");Q.append("g").attr("class","nv-brushBackground");Q.append("g").attr("class","nv-x nv-brush");if(E){c.width(F/2);J.select(".nv-legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.bar?" (left axis)":" (right axis)");return e})).call(c);if(p.top!=c.height()){p.top=c.height();I=(m||parseInt(N.style("height"))||400)-p.top-p.bottom-g}J.select(".nv-legendWrap").attr("transform","translate("+F/2+","+ -p.top+")")}V.attr("transform","translate("+p.left+","+p.top+")");i.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&e[n].bar}));n.width(F).height(q).color(e.map(function(e,t){return e.color||w(e,t)}).filter(function(t,n){return!e[n].disabled&&!e[n].bar}));var G=J.select(".nv-context .nv-barsWrap").datum(U.length?U:[{values:[]}]);var Y=J.select(".nv-context .nv-linesWrap").datum(!z[0].disabled?z:[{values:[]}]);J.select(".nv-context").attr("transform","translate(0,"+(I+p.bottom+d.top)+")");G.transition().call(i);Y.transition().call(n);h.x(k).on("brush",it);if(x)h.extent(x);var Z=J.select(".nv-brushBackground").selectAll("g").data([x||h.extent()]);var et=Z.enter().append("g");et.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",q);et.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",q);var tt=J.select(".nv-x.nv-brush").call(h);tt.selectAll("rect").attr("height",q);tt.selectAll(".resize").append("path").attr("d",nt);o.ticks(F/100).tickSize(-q,0);J.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+O.range()[0]+")");J.select(".nv-context .nv-x.nv-axis").transition().call(o);f.scale(O).ticks(q/36).tickSize(-F,0);J.select(".nv-context .nv-y1.nv-axis").style("opacity",U.length?1:0).attr("transform","translate(0,"+k.range()[0]+")");J.select(".nv-context .nv-y1.nv-axis").transition().call(f);l.scale(M).ticks(q/36).tickSize(U.length?0:-F,0);J.select(".nv-context .nv-y2.nv-axis").style("opacity",z.length?1:0).attr("transform","translate("+k.range()[1]+",0)");J.select(".nv-context .nv-y2.nv-axis").transition().call(l);c.dispatch.on("stateChange",function(e){B.update()});D.on("tooltipShow",function(e){if(T)H(e,j.parentNode)});it()});return B}var t=e.models.line(),n=e.models.line(),r=e.models.historicalBar(),i=e.models.historicalBar(),s=e.models.axis(),o=e.models.axis(),u=e.models.axis(),a=e.models.axis(),f=e.models.axis(),l=e.models.axis(),c=e.models.legend(),h=d3.svg.brush();var p={top:30,right:30,bottom:30,left:60},d={top:0,right:30,bottom:20,left:60},v=null,m=null,g=100,y=function(e){return e.x},b=function(e){return e.y},w=e.utils.defaultColor(),E=true,S,x=null,T=true,N=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},C,k,L,A,O,M,_="No Data Available.",D=d3.dispatch("tooltipShow","tooltipHide","brush"),P=0;t.clipEdge(true);n.interactive(false);s.orient("bottom").tickPadding(5);u.orient("left");a.orient("right");o.orient("bottom").tickPadding(5);f.orient("left");l.orient("right");var H=function(n,r){if(S){n.pointIndex+=Math.ceil(S[0])}var i=n.pos[0]+(r.offsetLeft||0),o=n.pos[1]+(r.offsetTop||0),f=s.tickFormat()(t.x()(n.point,n.pointIndex)),l=(n.series.bar?u:a).tickFormat()(t.y()(n.point,n.pointIndex)),c=N(n.series.key,f,l,n,B);e.tooltip.show([i,o],c,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});r.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+p.left,e.pos[1]+p.top];D.tooltipShow(e)});r.dispatch.on("elementMouseout.tooltip",function(e){D.tooltipHide(e)});D.on("tooltipHide",function(){if(T)e.tooltip.cleanup()});B.dispatch=D;B.legend=c;B.lines=t;B.lines2=n;B.bars=r;B.bars2=i;B.xAxis=s;B.x2Axis=o;B.y1Axis=u;B.y2Axis=a;B.y3Axis=f;B.y4Axis=l;d3.rebind(B,t,"defined","size","clipVoronoi","interpolate");B.options=e.utils.optionsFunc.bind(B);B.x=function(e){if(!arguments.length)return y;y=e;t.x(e);r.x(e);return B};B.y=function(e){if(!arguments.length)return b;b=e;t.y(e);r.y(e);return B};B.margin=function(e){if(!arguments.length)return p;p.top=typeof e.top!="undefined"?e.top:p.top;p.right=typeof e.right!="undefined"?e.right:p.right;p.bottom=typeof e.bottom!="undefined"?e.bottom:p.bottom;p.left=typeof e.left!="undefined"?e.left:p.left;return B};B.width=function(e){if(!arguments.length)return v;v=e;return B};B.height=function(e){if(!arguments.length)return m;m=e;return B};B.color=function(t){if(!arguments.length)return w;w=e.utils.getColor(t);c.color(w);return B};B.showLegend=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipContent=function(e){if(!arguments.length)return N;N=e;return B};B.noData=function(e){if(!arguments.length)return _;_=e;return B};B.brushExtent=function(e){if(!arguments.length)return x;x=e;return B};return B};e.models.multiBar=function(){"use strict";function C(e){e.each(function(e){var C=n-t.left-t.right,k=r-t.top-t.bottom,L=d3.select(this);if(d&&e.length)d=[{values:e[0].values.map(function(e){return{x:e.x,y:0,series:e.series,size:.01}})}];if(c)e=d3.layout.stack().offset(h).values(function(e){return e.values}).y(a)(!e.length&&d?d:e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(c)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i;i=i-t.size}else{t.y1=t.size+r;r=r+t.size}})});var A=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});i.domain(y||d3.merge(A).map(function(e){return e.x})).rangeBands(w||[0,C],S);s.domain(b||d3.extent(d3.merge(A).map(function(e){return c?e.y>0?e.y1:e.y1+e.y:e.y}).concat(f))).range(E||[k,0]);if(i.domain()[0]===i.domain()[1])i.domain()[0]?i.domain([i.domain()[0]-i.domain()[0]*.01,i.domain()[1]+i.domain()[1]*.01]):i.domain([-1,1]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]+s.domain()[0]*.01,s.domain()[1]-s.domain()[1]*.01]):s.domain([-1,1]);T=T||i;N=N||s;var O=L.selectAll("g.nv-wrap.nv-multibar").data([e]);var M=O.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar");var _=M.append("defs");var D=M.append("g");var P=O.select("g");D.append("g").attr("class","nv-groups");O.attr("transform","translate("+t.left+","+t.top+")");_.append("clipPath").attr("id","nv-edge-clip-"+o).append("rect");O.select("#nv-edge-clip-"+o+" rect").attr("width",C).attr("height",k);P.attr("clip-path",l?"url(#nv-edge-clip-"+o+")":"");var H=O.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});H.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);H.exit().transition().selectAll("rect.nv-bar").delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e){return c?N(e.y0):N(0)}).attr("height",0).remove();H.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return p(e,t)}).style("stroke",function(e,t){return p(e,t)});H.transition().style("stroke-opacity",1).style("fill-opacity",.75);var B=H.selectAll("rect.nv-bar").data(function(t){return d&&!e.length?d.values:t.values});B.exit().remove();var j=B.enter().append("rect").attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(t,n,r){return c?0:r*i.rangeBand()/e.length}).attr("y",function(e){return N(c?e.y0:0)}).attr("height",0).attr("width",i.rangeBand()/(c?1:e.length)).attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});B.style("fill",function(e,t,n){return p(e,n,t)}).style("stroke",function(e,t,n){return p(e,n,t)}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);x.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);x.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){x.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){x.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[i(u(t,n))+i.rangeBand()*(c?e.length/2:t.series+.5)/e.length,s(a(t,n)+(c?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});B.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"}).transition().attr("transform",function(e,t){return"translate("+i(u(e,t))+",0)"});if(v){if(!m)m=e.map(function(){return true});B.style("fill",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(v(e,t)).darker(m.map(function(e,t){return t}).filter(function(e,t){return!m[t]})[n]).toString()})}if(c)B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("y",function(e,t){return s(c?e.y1:0)}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(e.y+(c?e.y0:0))-s(c?e.y0:0)),1)}).attr("x",function(t,n){return c?0:t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/(c?1:e.length));else B.transition().delay(function(t,n){return n*g/e[0].values.length}).attr("x",function(t,n){return t.series*i.rangeBand()/e.length}).attr("width",i.rangeBand()/e.length).attr("y",function(e,t){return a(e,t)<0?s(0):s(0)-s(a(e,t))<1?s(0)-1:s(a(e,t))||0}).attr("height",function(e,t){if(e.y==null)return 0;return Math.max(Math.abs(s(a(e,t))-s(0)),1)||0});T=i.copy();N=s.copy()});return C}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=d3.scale.ordinal(),s=d3.scale.linear(),o=Math.floor(Math.random()*1e4),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=true,c=false,h="zero",p=e.utils.defaultColor(),d=false,v=null,m,g=1200,y,b,w,E,S=.1,x=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var T,N;C.dispatch=x;C.options=e.utils.optionsFunc.bind(C);C.x=function(e){if(!arguments.length)return u;u=e;return C};C.y=function(e){if(!arguments.length)return a;a=e;return C};C.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return C};C.width=function(e){if(!arguments.length)return n;n=e;return C};C.height=function(e){if(!arguments.length)return r;r=e;return C};C.xScale=function(e){if(!arguments.length)return i;i=e;return C};C.yScale=function(e){if(!arguments.length)return s;s=e;return C};C.xDomain=function(e){if(!arguments.length)return y;y=e;return C};C.yDomain=function(e){if(!arguments.length)return b;b=e;return C};C.xRange=function(e){if(!arguments.length)return w;w=e;return C};C.yRange=function(e){if(!arguments.length)return E;E=e;return C};C.forceY=function(e){if(!arguments.length)return f;f=e;return C};C.stacked=function(e){if(!arguments.length)return c;c=e;return C};C.stackOffset=function(e){if(!arguments.length)return h;h=e;return C};C.clipEdge=function(e){if(!arguments.length)return l;l=e;return C};C.color=function(t){if(!arguments.length)return p;p=e.utils.getColor(t);return C};C.barColor=function(t){if(!arguments.length)return v;v=e.utils.getColor(t);return C};C.disabled=function(e){if(!arguments.length)return m;m=e;return C};C.id=function(e){if(!arguments.length)return o;o=e;return C};C.hideable=function(e){if(!arguments.length)return d;d=e;return C};C.delay=function(e){if(!arguments.length)return g;g=e;return C};C.groupSpacing=function(e){if(!arguments.length)return S;S=e;return C};return C};e.models.multiBarChart=function(){"use strict";function M(e){e.each(function(e){var h=d3.select(this),E=this;var _=(u||parseInt(h.style("width"))||960)-o.left-o.right,D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom;M.update=function(){h.transition().duration(A).call(M)};M.container=this;if(w=="right")_=_-250;T.disabled=e.map(function(e){return!!e.disabled});if(!N){var P;N={};for(P in T){if(T[P]instanceof Array)N[P]=T[P].slice(0);else N[P]=T[P]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var H=h.selectAll(".nv-noData").data([C]);H.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");H.attr("x",o.left+_/2).attr("y",o.top+D/2).text(function(e){return e});return M}else{h.selectAll(".nv-noData").remove()}S=t.xScale();x=t.yScale();var B=h.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([e]);var j=B.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g");var F=B.select("g");j.append("g").attr("class","nv-x nv-axis");j.append("g").attr("class","nv-y nv-axis");j.append("g").attr("class","nv-barsWrap");j.append("g").attr("class","nv-legendWrap");j.append("g").attr("class","nv-controlsWrap");if(c){i.width(_-L());if(t.barColor())e.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});F.select(".nv-legendWrap").datum(e).call(i);if(o.top!=i.height()){o.top=i.height();D=(a||parseInt(h.style("height"))||400)-o.top-o.bottom}if(w=="right"){F.select(".nv-legendWrap").attr("transform","translate("+_+","+(-o.top+20+30)+")")}else{F.select(".nv-legendWrap").attr("transform","translate("+L()+","+ -o.top+")")}}if(l){var I=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(L()).color(["#444","#444","#444"]);F.select(".nv-controlsWrap").datum(I).call(s);if(w=="right"){F.select(".nv-controlsWrap").attr("transform","translate("+_+","+(-o.top+20)+")")}else{F.select(".nv-controlsWrap").attr("transform","translate("+0+","+ -o.top+")")}}B.attr("transform","translate("+o.left+","+o.top+")");if(v){F.select(".nv-y.nv-axis").attr("transform","translate("+_+",0)")}t.disabled(e.map(function(e){return e.disabled})).width(_).height(D).color(e.map(function(e,t){return e.color||f(e,t)}).filter(function(t,n){return!e[n].disabled}));var q=F.select(".nv-barsWrap").datum(e.filter(function(e){return!e.disabled}));q.transition().call(t);if(p){n.scale(S).ticks(_/100).tickSize(-D,0);F.select(".nv-x.nv-axis").attr("transform","translate(0,"+x.range()[0]+")");F.select(".nv-x.nv-axis").transition().call(n);var R=F.select(".nv-x.nv-axis > g").selectAll("g");R.selectAll("line, text").style("opacity",1);if(g){var U=function(e,t){return"translate("+e+","+t+")"};var z=5,W=17;R.selectAll("text").attr("transform",function(e,t,n){return U(0,n%2==0?z:W)});var X=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;F.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(e,t){return U(0,t===0||X%2!==0?W:z)})}if(m)R.filter(function(t,n){return n%Math.ceil(e[0].values.length/(_/100))!==0}).selectAll("text, line").style("opacity",0);if(y)R.selectAll(".tick text").attr("transform","rotate("+y+" 0,0)").style("text-anchor",y>0?"start":"end");F.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}if(d){r.scale(x).ticks(D/36).tickSize(-_,0);F.select(".nv-y.nv-axis").transition().call(r)}i.dispatch.on("stateChange",function(e){T=e;k.stateChange(T);M.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;I=I.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}T.stacked=t.stacked();k.stateChange(T);M.update()});k.on("tooltipShow",function(e){if(b)O(e,E.parentNode)});k.on("changeState",function(n){if(typeof n.disabled!=="undefined"){e.forEach(function(e,t){e.disabled=n.disabled[t]});T.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);T.stacked=n.stacked}M.update()})});return M}var t=e.models.multiBar(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend();var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=true,d=true,v=false,m=true,g=false,y=0,b=true,w="top",E=function(e,t,n,r,i,s){if(s){var o=d3.format(",.2f");return"<h3>"+e+"</h3>"+"<p>"+o(Math.pow(10,n))+" on "+t+"</p>"}else{return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"}},S,x,T={stacked:false},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=function(){return l?180:0},A=250;t.stacked(false);n.orient("bottom").tickPadding(7).highlightZero(true).showMaxMin(false).tickFormat(function(e){return e});r.orient(v?"right":"left").tickFormat(d3.format(",.1f"));s.updateState(false);var O=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),a=n.tickFormat()(t.x()(i.point,i.pointIndex)),f=r.tickFormat()(t.y()(i.point,i.pointIndex)),l=E(i.series.key,a,f,i,M,h);e.tooltip.show([o,u],l,i.value<0?"n":"s",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];k.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(b)e.tooltip.cleanup()});M.dispatch=k;M.multibar=t;M.legend=i;M.xAxis=n;M.yAxis=r;d3.rebind(M,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","stacked","stackOffset","delay","barColor","groupSpacing");M.options=e.utils.optionsFunc.bind(M);M.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return M};M.width=function(e){if(!arguments.length)return u;u=e;return M};M.height=function(e){if(!arguments.length)return a;a=e;return M};M.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return M};M.showControls=function(e){if(!arguments.length)return l;l=e;return M};M.showLegend=function(e){if(!arguments.length)return c;c=e;return M};M.logScale=function(e){if(!arguments.length)return h;h=e;return M};M.showXAxis=function(e){if(!arguments.length)return p;p=e;return M};M.showYAxis=function(e){if(!arguments.length)return d;d=e;return M};M.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return M};M.reduceXTicks=function(e){if(!arguments.length)return m;m=e;return M};M.rotateLabels=function(e){if(!arguments.length)return y;y=e;return M};M.staggerLabels=function(e){if(!arguments.length)return g;g=e;return M};M.tooltip=function(e){if(!arguments.length)return E;E=e;return M};M.tooltips=function(e){if(!arguments.length)return b;b=e;return M};M.legendPos=function(e){if(!arguments.length)return w;w=e;return M};M.tooltipContent=function(e){if(!arguments.length)return E;E=e;return M};M.state=function(e){if(!arguments.length)return T;T=e;return M};M.defaultState=function(e){if(!arguments.length)return N;N=e;return M};M.noData=function(e){if(!arguments.length)return C;C=e;return M};M.transitionDuration=function(e){if(!arguments.length)return A;A=e;return M};return M};e.models.multiBarHorizontal=function(){"use strict";function N(e){e.each(function(e){var i=n-t.left-t.right,g=r-t.top-t.bottom,N=d3.select(this);if(p)e=d3.layout.stack().offset("zero").values(function(e){return e.values}).y(a)(e);e=e.map(function(e,t){e.values=e.values.map(function(e){e.series=t;return e});return e});if(p)e[0].values.map(function(t,n){var r=0,i=0;e.map(function(e){var t=e.values[n];t.size=Math.abs(t.y);if(t.y<0){t.y1=i-t.size;i=i-t.size}else{t.y1=r;r=r+t.size}})});var C=y&&b?[]:e.map(function(e){return e.values.map(function(e,t){return{x:u(e,t),y:a(e,t),y0:e.y0,y1:e.y1}})});s.domain(y||d3.merge(C).map(function(e){return e.x})).rangeBands(w||[0,g],.1);o.domain(b||d3.extent(d3.merge(C).map(function(e){return p?e.y>0?e.y1+e.y:e.y1:e.y}).concat(f)));if(d&&!p)o.range(E||[o.domain()[0]<0?v:0,i-(o.domain()[1]>0?v:0)]);else o.range(E||[0,i]);x=x||s;T=T||d3.scale.linear().domain(o.domain()).range([o(0),o(0)]);var k=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([e]);var L=k.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");var A=L.append("defs");var O=L.append("g");var M=k.select("g");O.append("g").attr("class","nv-groups");k.attr("transform","translate("+t.left+","+t.top+")");var _=k.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e,t){return t});_.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);_.exit().transition().style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove();_.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover}).style("fill",function(e,t){return l(e,t)}).style("stroke",function(e,t){return l(e,t)});_.transition().style("stroke-opacity",1).style("fill-opacity",.75);var D=_.selectAll("g.nv-bar").data(function(e){return e.values});D.exit().remove();var P=D.enter().append("g").attr("transform",function(t,n,r){return"translate("+T(p?t.y0:0)+","+(p?0:r*s.rangeBand()/e.length+s(u(t,n)))+")"});P.append("rect").attr("width",0).attr("height",s.rangeBand()/(p?1:e.length));D.on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({value:a(t,n),point:t,series:e[t.series],pos:[o(a(t,n)+(p?t.y0:0)),s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({value:a(t,n),point:t,series:e[t.series],pointIndex:n,seriesIndex:t.series,e:d3.event})}).on("click",function(t,n){S.elementClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()}).on("dblclick",function(t,n){S.elementDblClick({value:a(t,n),point:t,series:e[t.series],pos:[s(u(t,n))+s.rangeBand()*(p?e.length/2:t.series+.5)/e.length,o(a(t,n)+(p?t.y0:0))],pointIndex:n,seriesIndex:t.series,e:d3.event});d3.event.stopPropagation()});P.append("text");if(d&&!p){D.select("text").attr("text-anchor",function(e,t){return a(e,t)<0?"end":"start"}).attr("y",s.rangeBand()/(e.length*2)).attr("dy",".32em").text(function(e,t){return m(a(e,t))});D.transition().select("text").attr("x",function(e,t){return a(e,t)<0?-4:o(a(e,t))-o(0)+4})}else{D.selectAll("text").text("")}D.attr("class",function(e,t){return a(e,t)<0?"nv-bar negative":"nv-bar positive"});if(c){if(!h)h=e.map(function(){return true});D.style("fill",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()}).style("stroke",function(e,t,n){return d3.rgb(c(e,t)).darker(h.map(function(e,t){return t}).filter(function(e,t){return!h[t]})[n]).toString()})}if(p)D.transition().attr("transform",function(e,t){return"translate("+o(e.y1)+","+s(u(e,t))+")"}).select("rect").attr("width",function(e,t){return Math.abs(o(a(e,t)+e.y0)-o(e.y0))}).attr("height",s.rangeBand());else D.transition().attr("transform",function(t,n){return"translate("+(a(t,n)<0?o(a(t,n)):o(0))+","+(t.series*s.rangeBand()/e.length+s(u(t,n)))+")"}).select("rect").attr("height",s.rangeBand()/e.length).attr("width",function(e,t){return Math.max(Math.abs(o(a(e,t))-o(0)),1)});x=s.copy();T=o.copy()});return N}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.ordinal(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=[0],l=e.utils.defaultColor(),c=null,h,p=false,d=false,v=60,m=d3.format(",.2f"),g=1200,y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");var x,T;N.dispatch=S;N.options=e.utils.optionsFunc.bind(N);N.x=function(e){if(!arguments.length)return u;u=e;return N};N.y=function(e){if(!arguments.length)return a;a=e;return N};N.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return N};N.width=function(e){if(!arguments.length)return n;n=e;return N};N.height=function(e){if(!arguments.length)return r;r=e;return N};N.xScale=function(e){if(!arguments.length)return s;s=e;return N};N.yScale=function(e){if(!arguments.length)return o;o=e;return N};N.xDomain=function(e){if(!arguments.length)return y;y=e;return N};N.yDomain=function(e){if(!arguments.length)return b;b=e;return N};N.xRange=function(e){if(!arguments.length)return w;w=e;return N};N.yRange=function(e){if(!arguments.length)return E;E=e;return N};N.forceY=function(e){if(!arguments.length)return f;f=e;return N};N.stacked=function(e){if(!arguments.length)return p;p=e;return N};N.color=function(t){if(!arguments.length)return l;l=e.utils.getColor(t);return N};N.barColor=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);return N};N.disabled=function(e){if(!arguments.length)return h;h=e;return N};N.id=function(e){if(!arguments.length)return i;i=e;return N};N.delay=function(e){if(!arguments.length)return g;g=e;return N};N.showValues=function(e){if(!arguments.length)return d;d=e;return N};N.valueFormat=function(e){if(!arguments.length)return m;m=e;return N};N.valuePadding=function(e){if(!arguments.length)return v;v=e;return N};return N};e.models.multiBarHorizontalChart=function(){"use strict";function C(e){e.each(function(h){var p=d3.select(this),m=this;var k=(u||parseInt(p.style("width"))||960)-o.left-o.right,L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom;C.update=function(){p.transition().duration(T).call(C)};C.container=this;if(v=="right")k=k-250;b.disabled=h.map(function(e){return!!e.disabled});if(!w){var A;w={};for(A in b){if(b[A]instanceof Array)w[A]=b[A].slice(0);else w[A]=b[A]}}if(!h||!h.length||!h.filter(function(e){return e.values.length}).length){var O=p.selectAll(".nv-noData").data([E]);O.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");O.attr("x",o.left+k/2).attr("y",o.top+L/2).text(function(e){return e});return C}else{p.selectAll(".nv-noData").remove()}g=t.xScale();y=t.yScale();var M=p.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([h]);var _=M.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g");var D=M.select("g");_.append("g").attr("class","nv-x nv-axis");_.append("g").attr("class","nv-y nv-axis");_.append("g").attr("class","nv-barsWrap");_.append("g").attr("class","nv-legendWrap");_.append("g").attr("class","nv-controlsWrap");if(c){i.width(k-x());if(t.barColor())h.forEach(function(e,t){e.color=d3.rgb("#ccc").darker(t*1.5).toString()});D.select(".nv-legendWrap").datum(h).call(i);if(o.top!=i.height()){o.top=i.height();L=(a||parseInt(p.style("height"))||400)-o.top-o.bottom}if(v=="right"){D.select(".nv-legendWrap").attr("transform","translate("+x()+","+20+")")}else{D.select(".nv-legendWrap").attr("transform","translate("+x()+","+ -o.top+")")}}if(l){var P=[{key:"Grouped",disabled:t.stacked()},{key:"Stacked",disabled:!t.stacked()}];s.width(x()).color(["#444","#444","#444"]);D.select(".nv-controlsWrap").datum(P).attr("transform","translate(0,"+ -o.top+")").call(s)}M.attr("transform","translate("+o.left+","+o.top+")");t.disabled(h.map(function(e){return e.disabled})).width(k).height(L).color(h.map(function(e,t){return e.color||f(e,t)}).filter(function(e,t){return!h[t].disabled}));var H=D.select(".nv-barsWrap").datum(h.filter(function(e){return!e.disabled}));H.transition().call(t);n.scale(g).ticks(L/24).tickSize(-k,0);D.select(".nv-x.nv-axis").transition().call(n);var B=D.select(".nv-x.nv-axis").selectAll("g");B.selectAll("line, text").style("opacity",1);r.scale(y).ticks(k/100).tickSize(-L,0);D.select(".nv-y.nv-axis").attr("transform","translate(0,"+L+")");D.select(".nv-y.nv-axis").transition().call(r);i.dispatch.on("stateChange",function(e){b=e;S.stateChange(b);C.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;P=P.map(function(e){e.disabled=true;return e});e.disabled=false;switch(e.key){case"Grouped":t.stacked(false);break;case"Stacked":t.stacked(true);break}b.stacked=t.stacked();S.stateChange(b);C.update()});S.on("tooltipShow",function(e){if(d)N(e,m.parentNode)});S.on("changeState",function(n){if(typeof n.disabled!=="undefined"){h.forEach(function(e,t){e.disabled=n.disabled[t]});b.disabled=n.disabled}if(typeof n.stacked!=="undefined"){t.stacked(n.stacked);b.stacked=n.stacked}e.call(C)})});return C}var t=e.models.multiBarHorizontal(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend().height(30),s=e.models.legend().height(30);var o={top:30,right:20,bottom:50,left:60},u=null,a=null,f=e.utils.defaultColor(),l=true,c=true,h=false,p=false,d=true,v="top",m=function(e,t,n,i,s,o){if(o){return"<h3>"+e+" - "+t+"</h3>"+"<p>"+r.tickFormat()(Math.pow(10,n))+"</p>"}else{return"<h3>"+e+" - "+t+"</h3>"+"<p>"+n+"</p>"}},g,y,b={stacked:p},w=null,E="No Data Available.",S=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),x=function(){return l?180:0},T=250;t.stacked(p);n.orient("left").tickPadding(5).highlightZero(false).showMaxMin(false).tickFormat(function(e){return e});r.orient("bottom").tickFormat(d3.format(",.1f"));s.updateState(false);var N=function(i,s){var o=0;if(i.pos[0]>=200)o=200;else o=i.pos[0];if(h)l=t.y()(i.point,i.pointIndex);else l=r.tickFormat()(t.y()(i.point,i.pointIndex));var u=o+(s.offsetLeft||0),a=i.pos[1]+(s.offsetTop||0),f=n.tickFormat()(t.x()(i.point,i.pointIndex)),l=r.tickFormat()(t.y()(i.point,i.pointIndex)),c=m(i.series.key,f,l,i,C,h);e.tooltip.show([u,a],c,i.value<0?"e":"w",null,s)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+o.left,e.pos[1]+o.top];S.tooltipShow(e)});t.dispatch.on("elementMouseout.tooltip",function(e){S.tooltipHide(e)});S.on("tooltipHide",function(){if(d)e.tooltip.cleanup()});C.dispatch=S;C.multibar=t;C.legend=i;C.xAxis=n;C.yAxis=r;d3.rebind(C,t,"x","y","xDomain","yDomain","xRange","yRange","forceX","forceY","clipEdge","id","delay","showValues","valueFormat","stacked","barColor");C.options=e.utils.optionsFunc.bind(C);C.margin=function(e){if(!arguments.length)return o;o.top=typeof e.top!="undefined"?e.top:o.top;o.right=typeof e.right!="undefined"?e.right:o.right;o.bottom=typeof e.bottom!="undefined"?e.bottom:o.bottom;o.left=typeof e.left!="undefined"?e.left:o.left;return C};C.width=function(e){if(!arguments.length)return u;u=e;return C};C.height=function(e){if(!arguments.length)return a;a=e;return C};C.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);i.color(f);return C};C.showControls=function(e){if(!arguments.length)return l;l=e;return C};C.showLegend=function(e){if(!arguments.length)return c;c=e;return C};C.logScale=function(e){if(!arguments.length)return h;h=e;return C};C.tooltip=function(e){if(!arguments.length)return m;m=e;return C};C.tooltips=function(e){if(!arguments.length)return d;d=e;return C};C.legendPos=function(e){if(!arguments.length)return v;v=e;return C};C.tooltipContent=function(e){if(!arguments.length)return m;m=e;return C};C.state=function(e){if(!arguments.length)return b;b=e;return C};C.defaultState=function(e){if(!arguments.length)return w;w=e;return C};C.noData=function(e){if(!arguments.length)return E;E=e;return C};C.transitionDuration=function(e){if(!arguments.length)return T;T=e;return C};return C};e.models.multiChart=function(){"use strict";function L(e){e.each(function(e){var f=d3.select(this),c=this;L.update=function(){f.transition().call(L)};L.container=this;var h=(r||parseInt(f.style("width"))||960)-t.left-t.right,p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom;if(a=="right")h=h-250;var A=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==1});var O=e.filter(function(e){return!e.disabled&&e.type=="line"&&e.yAxis==2});var M=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==1});var _=e.filter(function(e){return!e.disabled&&e.type=="bar"&&e.yAxis==2});var D=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==1});var P=e.filter(function(e){return!e.disabled&&e.type=="area"&&e.yAxis==2});var H=e.filter(function(e){return!e.disabled&&e.yAxis==1}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});var B=e.filter(function(e){return!e.disabled&&e.yAxis==2}).map(function(e){return e.values.map(function(e,t){return{x:e.x,y:e.y}})});l.domain(d3.extent(d3.merge(H.concat(B)),function(e){return e.x})).range([0,h]);var j=f.selectAll("g.wrap.multiChart").data([e]);var F=j.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");F.append("g").attr("class","x axis");F.append("g").attr("class","y1 axis");F.append("g").attr("class","y2 axis");F.append("g").attr("class","lines1Wrap");F.append("g").attr("class","lines2Wrap");F.append("g").attr("class","bars1Wrap");F.append("g").attr("class","bars2Wrap");F.append("g").attr("class","stack1Wrap");F.append("g").attr("class","stack2Wrap");F.append("g").attr("class","legendWrap");var I=j.select("g");if(s){N.width(h/2);I.select(".legendWrap").datum(e.map(function(e){e.originalKey=e.originalKey===undefined?e.key:e.originalKey;e.key=e.originalKey+(e.yAxis==1?"":" (right axis)");return e})).call(N);if(t.top!=N.height()){t.top=N.height();p=(i||parseInt(f.style("height"))||400)-t.top-t.bottom}if(a=="right"){I.select(".legendWrap").attr("transform","translate("+h+","+20+")")}else{I.select(".legendWrap").attr("transform","translate("+h/2+","+ -t.top+")")}}m.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="line"}));g.width(h).height(p).interpolate("monotone").color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="line"}));y.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="bar"}));b.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="bar"}));w.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==1&&e[n].type=="area"}));E.width(h).height(p).color(e.map(function(e,t){return e.color||n[t%n.length]}).filter(function(t,n){return!e[n].disabled&&e[n].yAxis==2&&e[n].type=="area"}));if(a=="right"){I.attr("transform","translate("+t.left+","+"20"+")")}else{I.attr("transform","translate("+t.left+","+t.top+")")}var q=I.select(".lines1Wrap").datum(A);var R=I.select(".bars1Wrap").datum(M);var U=I.select(".stack1Wrap").datum(D);var z=I.select(".lines2Wrap").datum(O);var W=I.select(".bars2Wrap").datum(_);var X=I.select(".stack2Wrap").datum(P);var V=D.length?D.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];var $=P.length?P.map(function(e){return e.values}).reduce(function(e,t){return e.map(function(e,n){return{x:e.x,y:e.y+t[n].y}})}).concat([{x:0,y:0}]):[];d.domain(d3.extent(d3.extent(d3.merge(H).concat(V),function(e){return e.y}).concat(m.forceY()))).range([0,p]);v.domain(d3.extent(d3.extent(d3.merge(B).concat($),function(e){return e.y}).concat(g.forceY()))).range([0,p]);m.yDomain(d.domain());y.yDomain(d.domain());w.yDomain(d.domain());g.yDomain(v.domain());b.yDomain(v.domain());E.yDomain(v.domain());if(D.length){d3.transition(U).call(w)}if(P.length){d3.transition(X).call(E)}if(M.length){d3.transition(R).call(y)}if(_.length){d3.transition(W).call(b)}if(A.length){d3.transition(q).call(m)}if(O.length){d3.transition(z).call(g)}S.ticks(h/100).tickSize(-p,0);I.select(".x.axis").attr("transform","translate(0,"+p+")");d3.transition(I.select(".x.axis")).call(S);x.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y1.axis")).call(x);T.ticks(p/36).tickSize(-h,0);d3.transition(I.select(".y2.axis")).call(T);I.select(".y2.axis").style("opacity",B.length?1:0).attr("transform","translate("+l.range()[1]+",0)");N.dispatch.on("stateChange",function(e){L.update()});if(u){N.dualaxis(true)}else{N.dualaxis(false)}C.on("tooltipShow",function(e){if(o)k(e,c.parentNode)})});return L}var t={top:30,right:20,bottom:50,left:60},n=d3.scale.category20().range(),r=null,i=null,s=true,o=true,u=false,a="top",f=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" at "+t+"</p>"},l,c,h,p;var l=d3.scale.linear(),d=d3.scale.linear(),v=d3.scale.linear(),m=e.models.line().yScale(d),g=e.models.line().yScale(v),y=e.models.multiBar().stacked(false).yScale(d),b=e.models.multiBar().stacked(false).yScale(v),w=e.models.stackedArea().yScale(d),E=e.models.stackedArea().yScale(v),S=e.models.axis().scale(l).orient("bottom").tickPadding(5),x=e.models.axis().scale(d).orient("left"),T=e.models.axis().scale(v).orient("right"),N=e.models.legend().height(30),C=d3.dispatch("tooltipShow","tooltipHide");var k=function(t,n){var r=t.pos[0]+(n.offsetLeft||0),i=t.pos[1]+(n.offsetTop||0),s=S.tickFormat()(m.x()(t.point,t.pointIndex)),o=(t.series.yAxis==2?T:x).tickFormat()(m.y()(t.point,t.pointIndex)),u=f(t.series.key,s,o,t,L);e.tooltip.show([r,i],u,undefined,undefined,n.offsetParent)};m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});y.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});y.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});b.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});b.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});w.dispatch.on("tooltipShow",function(e){if(!Math.round(w.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});w.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});E.dispatch.on("tooltipShow",function(e){if(!Math.round(E.y()(e.point)*100)){setTimeout(function(){d3.selectAll(".point.hover").classed("hover",false)},0);return false}e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],C.tooltipShow(e)});E.dispatch.on("tooltipHide",function(e){C.tooltipHide(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});g.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top];C.tooltipShow(e)});g.dispatch.on("elementMouseout.tooltip",function(e){C.tooltipHide(e)});C.on("tooltipHide",function(){if(o)e.tooltip.cleanup()});L.dispatch=C;L.lines1=m;L.lines2=g;L.bars1=y;L.bars2=b;L.stack1=w;L.stack2=E;L.xAxis=S;L.yAxis1=x;L.yAxis2=T;L.options=e.utils.optionsFunc.bind(L);L.x=function(e){if(!arguments.length)return getX;getX=e;m.x(e);y.x(e);return L};L.y=function(e){if(!arguments.length)return getY;getY=e;m.y(e);y.y(e);return L};L.yDomain1=function(e){if(!arguments.length)return h;h=e;return L};L.yDomain2=function(e){if(!arguments.length)return p;p=e;return L};L.margin=function(e){if(!arguments.length)return t;t=e;return L};L.width=function(e){if(!arguments.length)return r;r=e;return L};L.height=function(e){if(!arguments.length)return i;i=e;return L};L.color=function(e){if(!arguments.length)return n;n=e;N.color(e);return L};L.showLegend=function(e){if(!arguments.length)return s;s=e;return L};L.tooltips=function(e){if(!arguments.length)return o;o=e;return L};L.dualaxis=function(e){if(!arguments.length)return u;u=e;return L};L.legendPos=function(e){if(!arguments.length)return a;a=e;return L};L.tooltipContent=function(e){if(!arguments.length)return f;f=e;return L};return L};e.models.ohlcBar=function(){"use strict";function x(e){e.each(function(e){var g=n-t.left-t.right,x=r-t.top-t.bottom,T=d3.select(this);s.domain(y||d3.extent(e[0].values.map(u).concat(p)));if(v)s.range(w||[g*.5/e[0].values.length,g*(e[0].values.length-.5)/e[0].values.length]);else s.range(w||[0,g]);o.domain(b||[d3.min(e[0].values.map(h).concat(d)),d3.max(e[0].values.map(c).concat(d))]).range(E||[x,0]);if(s.domain()[0]===s.domain()[1])s.domain()[0]?s.domain([s.domain()[0]-s.domain()[0]*.01,s.domain()[1]+s.domain()[1]*.01]):s.domain([-1,1]);if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]+o.domain()[0]*.01,o.domain()[1]-o.domain()[1]*.01]):o.domain([-1,1]);var N=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([e[0].values]);var C=N.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar");var k=C.append("defs");var L=C.append("g");var A=N.select("g");L.append("g").attr("class","nv-ticks");N.attr("transform","translate("+t.left+","+t.top+")");T.on("click",function(e,t){S.chartClick({data:e,index:t,pos:d3.event,id:i})});k.append("clipPath").attr("id","nv-chart-clip-path-"+i).append("rect");N.select("#nv-chart-clip-path-"+i+" rect").attr("width",g).attr("height",x);A.attr("clip-path",m?"url(#nv-chart-clip-path-"+i+")":"");var O=N.select(".nv-ticks").selectAll(".nv-tick").data(function(e){return e});O.exit().remove();var M=O.enter().append("path").attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"}).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).on("mouseover",function(t,n){d3.select(this).classed("hover",true);S.elementMouseover({point:t,series:e[0],pos:[s(u(t,n)),o(a(t,n))],pointIndex:n,seriesIndex:0,e:d3.event})}).on("mouseout",function(t,n){d3.select(this).classed("hover",false);S.elementMouseout({point:t,series:e[0],pointIndex:n,seriesIndex:0,e:d3.event})}).on("click",function(e,t){S.elementClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()}).on("dblclick",function(e,t){S.elementDblClick({value:a(e,t),data:e,index:t,pos:[s(u(e,t)),o(a(e,t))],e:d3.event,id:i});d3.event.stopPropagation()});O.attr("class",function(e,t,n){return(f(e,t)>l(e,t)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+n+"-"+t});d3.transition(O).attr("transform",function(e,t){return"translate("+s(u(e,t))+","+o(c(e,t))+")"}).attr("d",function(t,n){var r=g/e[0].values.length*.9;return"m0,0l0,"+(o(f(t,n))-o(c(t,n)))+"l"+ -r/2+",0l"+r/2+",0l0,"+(o(h(t,n))-o(f(t,n)))+"l0,"+(o(l(t,n))-o(h(t,n)))+"l"+r/2+",0l"+ -r/2+",0z"})});return x}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=Math.floor(Math.random()*1e4),s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=function(e){return e.open},l=function(e){return e.close},c=function(e){return e.high},h=function(e){return e.low},p=[],d=[],v=false,m=true,g=e.utils.defaultColor(),y,b,w,E,S=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");x.dispatch=S;x.options=e.utils.optionsFunc.bind(x);x.x=function(e){if(!arguments.length)return u;u=e;return x};x.y=function(e){if(!arguments.length)return a;a=e;return x};x.open=function(e){if(!arguments.length)return f;f=e;return x};x.close=function(e){if(!arguments.length)return l;l=e;return x};x.high=function(e){if(!arguments.length)return c;c=e;return x};x.low=function(e){if(!arguments.length)return h;h=e;return x};x.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return x};x.width=function(e){if(!arguments.length)return n;n=e;return x};x.height=function(e){if(!arguments.length)return r;r=e;return x};x.xScale=function(e){if(!arguments.length)return s;s=e;return x};x.yScale=function(e){if(!arguments.length)return o;o=e;return x};x.xDomain=function(e){if(!arguments.length)return y;y=e;return x};x.yDomain=function(e){if(!arguments.length)return b;b=e;return x};x.xRange=function(e){if(!arguments.length)return w;w=e;return x};x.yRange=function(e){if(!arguments.length)return E;E=e;return x};x.forceX=function(e){if(!arguments.length)return p;p=e;return x};x.forceY=function(e){if(!arguments.length)return d;d=e;return x};x.padData=function(e){if(!arguments.length)return v;v=e;return x};x.clipEdge=function(e){if(!arguments.length)return m;m=e;return x};x.color=function(t){if(!arguments.length)return g;g=e.utils.getColor(t);return x};x.id=function(e){if(!arguments.length)return i;i=e;return x};return x};e.models.pie=function(){"use strict";function E(e){e.each(function(e){function P(e){var t=(e.startAngle+e.endAngle)*90/Math.PI-90;return t>90?t-180:t}function H(e){e.endAngle=isNaN(e.endAngle)?0:e.endAngle;e.startAngle=isNaN(e.startAngle)?0:e.startAngle;if(!v)e.innerRadius=0;var t=d3.interpolate(this._current,e);this._current=t(0);return function(e){return L(t(e))}}function B(e){e.innerRadius=0;var t=d3.interpolate({startAngle:0,endAngle:0},e);return function(e){return L(t(e))}}var o=n-t.left-t.right,f=r-t.top-t.bottom,E=Math.min(o,f)/2,S=E-E/5,x=d3.select(this);var T=x.selectAll(".nv-wrap.nv-pie").data(e);var N=T.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+u);var C=N.append("g");var k=T.select("g");C.append("g").attr("class","nv-pie");T.attr("transform","translate("+t.left+","+t.top+")");k.select(".nv-pie").attr("transform","translate("+o/2+","+f/2+")");x.on("click",function(e,t){w.chartClick({data:e,index:t,pos:d3.event,id:u})});var L=d3.svg.arc().outerRadius(S);if(g)L.startAngle(g);if(y)L.endAngle(y);if(v)L.innerRadius(E*b);var A=d3.layout.pie().sort(null).value(function(e){return e.disabled?0:s(e)});var O=T.select(".nv-pie").selectAll(".nv-slice").data(A);O.exit().remove();var M=O.enter().append("g").attr("class","nv-slice").on("mouseover",function(e,t){d3.select(this).classed("hover",true);w.elementMouseover({label:i(e.data),value:s(e.data),point:e.data,pointIndex:t,pos:[d3.event.pageX,d3.event.pageY],id:u})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);w.elementMouseout({label:i(e.data),value:s(e.data),point:e.data,index:t,id:u})}).on("click",function(e,t){w.elementClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()}).on("dblclick",function(e,t){w.elementDblClick({label:i(e.data),value:s(e.data),point:e.data,index:t,pos:d3.event,id:u});d3.event.stopPropagation()});O.attr("fill",function(e,t){return a(e,t)}).attr("stroke",function(e,t){return a(e,t)});var _=M.append("path").each(function(e){this._current=e});d3.transition(O.select("path")).attr("d",L).attrTween("d",H);if(l){var D=d3.svg.arc().innerRadius(0);if(c){D=L}if(h){D=d3.svg.arc().outerRadius(L.outerRadius())}M.append("g").classed("nv-label",true).each(function(e,t){var n=d3.select(this);n.attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});n.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3);n.append("text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});O.select(".nv-label").transition().attr("transform",function(e){if(m){e.outerRadius=S+10;e.innerRadius=S+15;var t=(e.startAngle+e.endAngle)/2*(180/Math.PI);if((e.startAngle+e.endAngle)/2<Math.PI){t-=90}else{t+=90}return"translate("+D.centroid(e)+") rotate("+t+")"}else{e.outerRadius=E+10;e.innerRadius=E+15;return"translate("+D.centroid(e)+")"}});O.each(function(e,t){var n=d3.select(this);n.select(".nv-label text").style("text-anchor",m?(e.startAngle+e.endAngle)/2<Math.PI?"start":"end":"middle").text(function(e,t){var n=(e.endAngle-e.startAngle)/(2*Math.PI);var r={key:i(e.data),value:s(e.data),percent:d3.format("%")(n)};return e.value&&n>d?r[p]:""});var r=n.select("text").node().getBBox();n.select(".nv-label rect").attr("width",r.width+10).attr("height",r.height+10).attr("transform",function(){return"translate("+[r.x-5,r.y-5]+")"})})}});return E}var t={top:0,right:0,bottom:0,left:0},n=500,r=500,i=function(e){return e.x},s=function(e){return e.y},o=function(e){return e.description},u=Math.floor(Math.random()*1e4),a=e.utils.defaultColor(),f=d3.format(",.2f"),l=true,c=true,h=false,p="key",d=.02,v=false,m=false,g=false,y=false,b=.5,w=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout");E.dispatch=w;E.options=e.utils.optionsFunc.bind(E);E.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return E};E.width=function(e){if(!arguments.length)return n;n=e;return E};E.height=function(e){if(!arguments.length)return r;r=e;return E};E.values=function(t){e.log("pie.values() is no longer supported.");return E};E.x=function(e){if(!arguments.length)return i;i=e;return E};E.y=function(e){if(!arguments.length)return s;s=d3.functor(e);return E};E.description=function(e){if(!arguments.length)return o;o=e;return E};E.showLabels=function(e){if(!arguments.length)return l;l=e;return E};E.labelSunbeamLayout=function(e){if(!arguments.length)return m;m=e;return E};E.donutLabelsOutside=function(e){if(!arguments.length)return h;h=e;return E};E.pieLabelsOutside=function(e){if(!arguments.length)return c;c=e;return E};E.labelType=function(e){if(!arguments.length)return p;p=e;p=p||"key";return E};E.donut=function(e){if(!arguments.length)return v;v=e;return E};E.donutRatio=function(e){if(!arguments.length)return b;b=e;return E};E.startAngle=function(e){if(!arguments.length)return g;g=e;return E};E.endAngle=function(e){if(!arguments.length)return y;y=e;return E};E.id=function(e){if(!arguments.length)return u;u=e;return E};E.color=function(t){if(!arguments.length)return a;a=e.utils.getColor(t);return E};E.valueFormat=function(e){if(!arguments.length)return f;f=e;return E};E.labelThreshold=function(e){if(!arguments.length)return d;d=e;return E};return E};e.models.pieChart=function(){"use strict";function v(e){e.each(function(e){var u=d3.select(this),a=this;var f=(i||parseInt(u.style("width"))||960)-r.left-r.right,d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom;v.update=function(){u.transition().call(v)};v.container=this;l.disabled=e.map(function(e){return!!e.disabled});if(!c){var m;c={};for(m in l){if(l[m]instanceof Array)c[m]=l[m].slice(0);else c[m]=l[m]}}if(!e||!e.length){var g=u.selectAll(".nv-noData").data([h]);g.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");g.attr("x",r.left+f/2).attr("y",r.top+d/2).text(function(e){return e});return v}else{u.selectAll(".nv-noData").remove()}var y=u.selectAll("g.nv-wrap.nv-pieChart").data([e]);var b=y.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g");var w=y.select("g");b.append("g").attr("class","nv-pieWrap");b.append("g").attr("class","nv-legendWrap");if(o){n.width(f).key(t.x());y.select(".nv-legendWrap").datum(e).call(n);if(r.top!=n.height()){r.top=n.height();d=(s||parseInt(u.style("height"))||400)-r.top-r.bottom}y.select(".nv-legendWrap").attr("transform","translate(0,"+ -r.top+")")}y.attr("transform","translate("+r.left+","+r.top+")");t.width(f).height(d);var E=w.select(".nv-pieWrap").datum([e]);d3.transition(E).call(t);n.dispatch.on("stateChange",function(e){l=e;p.stateChange(l);v.update()});t.dispatch.on("elementMouseout.tooltip",function(e){p.tooltipHide(e)});p.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});l.disabled=t.disabled}v.update()})});return v}var t=e.models.pie(),n=e.models.legend();var r={top:30,right:20,bottom:20,left:20},i=null,s=null,o=true,u=e.utils.defaultColor(),a=true,f=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+t+"</p>"},l={},c=null,h="No Data Available.",p=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState");var d=function(n,r){var i=t.description()(n.point)||t.x()(n.point);var s=n.pos[0]+(r&&r.offsetLeft||0),o=n.pos[1]+(r&&r.offsetTop||0),u=t.valueFormat()(t.y()(n.point)),a=f(i,u,n,v);e.tooltip.show([s,o],a,n.value<0?"n":"s",null,r)};t.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+r.left,e.pos[1]+r.top];p.tooltipShow(e)});p.on("tooltipShow",function(e){if(a)d(e)});p.on("tooltipHide",function(){if(a)e.tooltip.cleanup()});v.legend=n;v.dispatch=p;v.pie=t;d3.rebind(v,t,"valueFormat","values","x","y","description","id","showLabels","donutLabelsOutside","pieLabelsOutside","labelType","donut","donutRatio","labelThreshold");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return r;r.top=typeof e.top!="undefined"?e.top:r.top;r.right=typeof e.right!="undefined"?e.right:r.right;r.bottom=typeof e.bottom!="undefined"?e.bottom:r.bottom;r.left=typeof e.left!="undefined"?e.left:r.left;return v};v.width=function(e){if(!arguments.length)return i;i=e;return v};v.height=function(e){if(!arguments.length)return s;s=e;return v};v.color=function(r){if(!arguments.length)return u;u=e.utils.getColor(r);n.color(u);t.color(u);return v};v.showLegend=function(e){if(!arguments.length)return o;o=e;return v};v.tooltips=function(e){if(!arguments.length)return a;a=e;return v};v.tooltipContent=function(e){if(!arguments.length)return f;f=e;return v};v.state=function(e){if(!arguments.length)return l;l=e;return v};v.defaultState=function(e){if(!arguments.length)return c;c=e;return v};v.noData=function(e){if(!arguments.length)return h;h=e;return v};return v};e.models.scatter=function(){"use strict";function I(q){q.each(function(I){function Q(){if(!g)return false;var e;var i=d3.merge(I.map(function(e,t){return e.values.map(function(e,n){var r=f(e,n);var i=l(e,n);return[o(r)+Math.random()*1e-7,u(i)+Math.random()*1e-7,t,n,e]}).filter(function(e,t){return b(e[4],t)})}));if(D===true){if(x){var a=X.select("defs").selectAll(".nv-point-clips").data([s]).enter();a.append("clipPath").attr("class","nv-point-clips").attr("id","nv-points-clip-"+s);var c=X.select("#nv-points-clip-"+s).selectAll("circle").data(i);c.enter().append("circle").attr("r",T);c.exit().remove();c.attr("cx",function(e){return e[0]}).attr("cy",function(e){return e[1]});X.select(".nv-point-paths").attr("clip-path","url(#nv-points-clip-"+s+")")}if(i.length){i.push([o.range()[0]-20,u.range()[0]-20,null,null]);i.push([o.range()[1]+20,u.range()[1]+20,null,null]);i.push([o.range()[0]-20,u.range()[0]+20,null,null]);i.push([o.range()[1]+20,u.range()[1]-20,null,null])}var h=d3.geom.polygon([[-10,-10],[-10,r+10],[n+10,r+10],[n+10,-10]]);var p=d3.geom.voronoi(i).map(function(e,t){return{data:h.clip(e),series:i[t][2],point:i[t][3]}});var d=X.select(".nv-point-paths").selectAll("path").data(p);d.enter().append("path").attr("class",function(e,t){return"nv-path-"+t});d.exit().remove();d.attr("d",function(e){if(e.data.length===0)return"M 0 0";else return"M"+e.data.join("L")+"Z"});var v=function(e,n){if(F)return 0;var r=I[e.series];if(typeof r==="undefined")return;var i=r.values[e.point];n({point:i,series:r,pos:[o(f(i,e.point))+t.left,u(l(i,e.point))+t.top],seriesIndex:e.series,pointIndex:e.point})};d.on("click",function(e){v(e,_.elementClick)}).on("mouseover",function(e){v(e,_.elementMouseover)}).on("mouseout",function(e,t){v(e,_.elementMouseout)})}else{X.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementClick({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseover",function(e,n){if(F||!I[e.series])return 0;var r=I[e.series],i=r.values[n];_.elementMouseover({point:i,series:r,pos:[o(f(i,n))+t.left,u(l(i,n))+t.top],seriesIndex:e.series,pointIndex:n})}).on("mouseout",function(e,t){if(F||!I[e.series])return 0;var n=I[e.series],r=n.values[t];_.elementMouseout({point:r,series:n,seriesIndex:e.series,pointIndex:t})})}F=false}var q=n-t.left-t.right,R=r-t.top-t.bottom,U=d3.select(this);I.forEach(function(e,t){e.values.forEach(function(e){e.series=t})});var W=N&&C&&A?[]:d3.merge(I.map(function(e){return e.values.map(function(e,t){return{x:f(e,t),y:l(e,t),size:c(e,t)}})}));o.domain(N||d3.extent(W.map(function(e){return e.x}).concat(d)));if(w&&I[0])o.range(k||[(q*E+q)/(2*I[0].values.length),q-q*(1+E)/(2*I[0].values.length)]);else o.range(k||[0,q]);u.domain(C||d3.extent(W.map(function(e){return e.y}).concat(v))).range(L||[R,0]);a.domain(A||d3.extent(W.map(function(e){return e.size}).concat(m))).range(O||[16,256]);if(o.domain()[0]===o.domain()[1]||u.domain()[0]===u.domain()[1])M=true;if(o.domain()[0]===o.domain()[1])o.domain()[0]?o.domain([o.domain()[0]-o.domain()[0]*.01,o.domain()[1]+o.domain()[1]*.01]):o.domain([-1,1]);if(u.domain()[0]===u.domain()[1])u.domain()[0]?u.domain([u.domain()[0]-u.domain()[0]*.01,u.domain()[1]+u.domain()[1]*.01]):u.domain([-1,1]);if(isNaN(o.domain()[0])){o.domain([-1,1])}if(isNaN(u.domain()[0])){u.domain([-1,1])}P=P||o;H=H||u;B=B||a;var X=U.selectAll("g.nv-wrap.nv-scatter").data([I]);var V=X.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+s+(M?" nv-single-point":""));var $=V.append("defs");var J=V.append("g");var K=X.select("g");J.append("g").attr("class","nv-groups");J.append("g").attr("class","nv-point-paths");X.attr("transform","translate("+t.left+","+t.top+")");$.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");X.select("#nv-edge-clip-"+s+" rect").attr("width",q).attr("height",R);K.attr("clip-path",S?"url(#nv-edge-clip-"+s+")":"");F=true;var G=X.select(".nv-groups").selectAll(".nv-group").data(function(e){return e},function(e){return e.key});G.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);G.exit().remove();G.attr("class",function(e,t){return"nv-group nv-series-"+t}).classed("hover",function(e){return e.hover});G.transition().style("fill",function(e,t){return i(e,t)}).style("stroke",function(e,t){return i(e,t)}).style("stroke-opacity",1).style("fill-opacity",.5);if(p){var Y=G.selectAll("circle.nv-point").data(function(e){return e.values},y);Y.enter().append("circle").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("cx",function(t,n){return e.utils.NaNtoZero(P(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(H(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)});Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("cx",function(t,n){return e.utils.NaNtoZero(o(f(t,n)))}).attr("cy",function(t,n){return e.utils.NaNtoZero(u(l(t,n)))}).attr("r",function(e,t){return Math.sqrt(a(c(e,t))/Math.PI)})}else{var Y=G.selectAll("path.nv-point").data(function(e){return e.values});Y.enter().append("path").style("fill",function(e,t){return e.color}).style("stroke",function(e,t){return e.color}).attr("transform",function(e,t){return"translate("+P(f(e,t))+","+H(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}));Y.exit().remove();G.exit().selectAll("path.nv-point").transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).remove();Y.each(function(e,t){d3.select(this).classed("nv-point",true).classed("nv-point-"+t,true).classed("hover",false)});Y.transition().attr("transform",function(e,t){return"translate("+o(f(e,t))+","+u(l(e,t))+")"}).attr("d",d3.svg.symbol().type(h).size(function(e,t){return a(c(e,t))}))}clearTimeout(j);j=setTimeout(Q,300);P=o.copy();H=u.copy();B=a.copy()});return I}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=d3.scale.linear(),u=d3.scale.linear(),a=d3.scale.linear(),f=function(e){return e.x},l=function(e){return e.y},c=function(e){return e.size||1},h=function(e){return e.shape||"circle"},p=true,d=[],v=[],m=[],g=true,y=null,b=function(e){return!e.notActive},w=false,E=.1,S=false,x=true,T=function(){return 25},N=null,C=null,k=null,L=null,A=null,O=null,M=false,_=d3.dispatch("elementClick","elementMouseover","elementMouseout"),D=true;var P,H,B,j,F=false;I.clearHighlights=function(){d3.selectAll(".nv-chart-"+s+" .nv-point.hover").classed("hover",false)};I.highlightPoint=function(e,t,n){d3.select(".nv-chart-"+s+" .nv-series-"+e+" .nv-point-"+t).classed("hover",n)};_.on("elementMouseover.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,true)});_.on("elementMouseout.point",function(e){if(g)I.highlightPoint(e.seriesIndex,e.pointIndex,false)});I.dispatch=_;I.options=e.utils.optionsFunc.bind(I);I.x=function(e){if(!arguments.length)return f;f=d3.functor(e);return I};I.y=function(e){if(!arguments.length)return l;l=d3.functor(e);return I};I.size=function(e){if(!arguments.length)return c;c=d3.functor(e);return I};I.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return I};I.width=function(e){if(!arguments.length)return n;n=e;return I};I.height=function(e){if(!arguments.length)return r;r=e;return I};I.xScale=function(e){if(!arguments.length)return o;o=e;return I};I.yScale=function(e){if(!arguments.length)return u;u=e;return I};I.zScale=function(e){if(!arguments.length)return a;a=e;return I};I.xDomain=function(e){if(!arguments.length)return N;N=e;return I};I.yDomain=function(e){if(!arguments.length)return C;C=e;return I};I.sizeDomain=function(e){if(!arguments.length)return A;A=e;return I};I.xRange=function(e){if(!arguments.length)return k;k=e;return I};I.yRange=function(e){if(!arguments.length)return L;L=e;return I};I.sizeRange=function(e){if(!arguments.length)return O;O=e;return I};I.forceX=function(e){if(!arguments.length)return d;d=e;return I};I.forceY=function(e){if(!arguments.length)return v;v=e;return I};I.forceSize=function(e){if(!arguments.length)return m;m=e;return I};I.interactive=function(e){if(!arguments.length)return g;g=e;return I};I.pointKey=function(e){if(!arguments.length)return y;y=e;return I};I.pointActive=function(e){if(!arguments.length)return b;b=e;return I};I.padData=function(e){if(!arguments.length)return w;w=e;return I};I.padDataOuter=function(e){if(!arguments.length)return E;E=e;return I};I.clipEdge=function(e){if(!arguments.length)return S;S=e;return I};I.clipVoronoi=function(e){if(!arguments.length)return x;x=e;return I};I.useVoronoi=function(e){if(!arguments.length)return D;D=e;if(D===false){x=false}return I};I.clipRadius=function(e){if(!arguments.length)return T;T=e;return I};I.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return I};I.shape=function(e){if(!arguments.length)return h;h=e;return I};I.onlyCircles=function(e){if(!arguments.length)return p;p=e;return I};I.id=function(e){if(!arguments.length)return s;s=e;return I};I.singlePoint=function(e){if(!arguments.length)return M;M=e;return I};return I};e.models.scatterChart=function(){"use strict";function F(e){e.each(function(e){function K(){if(T){X.select(".nv-point-paths").style("pointer-events","all");return false}X.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(x).focus(i[0]);p.distortion(x).focus(i[1]);X.select(".nv-scatterWrap").call(t);if(b)X.select(".nv-x.nv-axis").call(n);if(w)X.select(".nv-y.nv-axis").call(r);X.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);X.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var C=d3.select(this),k=this;var L=(f||parseInt(C.style("width"))||960)-a.left-a.right,I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom;F.update=function(){C.transition().duration(D).call(F)};F.container=this;A.disabled=e.map(function(e){return!!e.disabled});if(!O){var q;O={};for(q in A){if(A[q]instanceof Array)O[q]=A[q].slice(0);else O[q]=A[q]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var R=C.selectAll(".nv-noData").data([_]);R.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");R.attr("x",a.left+L/2).attr("y",a.top+I/2).text(function(e){return e});return F}else{C.selectAll(".nv-noData").remove()}P=P||h;H=H||p;var U=C.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var z=U.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var W=z.append("g");var X=U.select("g");W.append("rect").attr("class","nvd3 nv-background");W.append("g").attr("class","nv-x nv-axis");W.append("g").attr("class","nv-y nv-axis");W.append("g").attr("class","nv-scatterWrap");W.append("g").attr("class","nv-distWrap");W.append("g").attr("class","nv-legendWrap");W.append("g").attr("class","nv-controlsWrap");if(y){var V=S?L/2:L;i.width(V);U.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();I=(l||parseInt(C.style("height"))||400)-a.top-a.bottom}U.select(".nv-legendWrap").attr("transform","translate("+(L-V)+","+ -a.top+")")}if(S){s.width(180).color(["#444"]);X.select(".nv-controlsWrap").datum(j).attr("transform","translate(0,"+ -a.top+")").call(s)}U.attr("transform","translate("+a.left+","+a.top+")");if(E){X.select(".nv-y.nv-axis").attr("transform","translate("+L+",0)")}t.width(L).height(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));if(d!==0)t.xDomain(null);if(v!==0)t.yDomain(null);U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(d!==0){var $=h.domain()[1]-h.domain()[0];t.xDomain([h.domain()[0]-d*$,h.domain()[1]+d*$])}if(v!==0){var J=p.domain()[1]-p.domain()[0];t.yDomain([p.domain()[0]-v*J,p.domain()[1]+v*J])}if(v!==0||d!==0){U.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t)}if(b){n.scale(h).ticks(n.ticks()&&n.ticks().length?n.ticks():L/100).tickSize(-I,0);X.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(w){r.scale(p).ticks(r.ticks()&&r.ticks().length?r.ticks():I/36).tickSize(-L,0);X.select(".nv-y.nv-axis").call(r)}if(m){o.getData(t.x()).scale(h).width(L).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionX");X.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(g){u.getData(t.y()).scale(p).width(I).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));W.select(".nv-distWrap").append("g").attr("class","nv-distributionY");X.select(".nv-distributionY").attr("transform","translate("+(E?L:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){X.select(".nv-background").attr("width",L).attr("height",I);X.select(".nv-background").on("mousemove",K);X.select(".nv-background").on("click",function(){T=!T});t.dispatch.on("elementClick.freezeFisheye",function(){T=!T})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;x=e.disabled?0:2.5;X.select(".nv-background").style("pointer-events",e.disabled?"none":"all");X.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(x).focus(0);p.distortion(x).focus(0);X.select(".nv-scatterWrap").call(t);X.select(".nv-x.nv-axis").call(n);X.select(".nv-y.nv-axis").call(r)}else{T=false}F.update()});i.dispatch.on("stateChange",function(e){A.disabled=e.disabled;M.stateChange(A);F.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",function(t,n){return e.pos[1]-I});d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];M.tooltipShow(e)});M.on("tooltipShow",function(e){if(N)B(e,k.parentNode)});M.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});A.disabled=t.disabled}F.update()});P=h.copy();H=p.copy()});return F}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=0,v=0,m=false,g=false,y=true,b=true,w=true,E=false,S=!!d3.fisheye,x=0,T=false,N=true,C=function(e,t,n){return"<strong>"+t+"</strong>"},k=function(e,t,n){return"<strong>"+n+"</strong>"},L=null,A={},O=null,M=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),_="No Data Available.",D=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(E?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var P,H;var B=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(C!=null)e.tooltip.show([f,l],C(i.series.key,v,m,i,F),"n",1,s,"x-nvtooltip");if(k!=null)e.tooltip.show([c,d],k(i.series.key,v,m,i,F),"e",1,s,"y-nvtooltip");if(L!=null)e.tooltip.show([o,u],L(i.series.key,v,m,i,F),i.value<0?"n":"s",null,s)};var j=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){M.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});M.on("tooltipHide",function(){if(N)e.tooltip.cleanup()});F.dispatch=M;F.scatter=t;F.legend=i;F.controls=s;F.xAxis=n;F.yAxis=r;F.distX=o;F.distY=u;d3.rebind(F,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");F.options=e.utils.optionsFunc.bind(F);F.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return F};F.width=function(e){if(!arguments.length)return f;f=e;return F};F.height=function(e){if(!arguments.length)return l;l=e;return F};F.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return F};F.showDistX=function(e){if(!arguments.length)return m;m=e;return F};F.showDistY=function(e){if(!arguments.length)return g;g=e;return F};F.showControls=function(e){if(!arguments.length)return S;S=e;return F};F.showLegend=function(e){if(!arguments.length)return y;y=e;return F};F.showXAxis=function(e){if(!arguments.length)return b;b=e;return F};F.showYAxis=function(e){if(!arguments.length)return w;w=e;return F};F.rightAlignYAxis=function(e){if(!arguments.length)return E;E=e;r.orient(e?"right":"left");return F};F.fisheye=function(e){if(!arguments.length)return x;x=e;return F};F.xPadding=function(e){if(!arguments.length)return d;d=e;return F};F.yPadding=function(e){if(!arguments.length)return v;v=e;return F};F.tooltips=function(e){if(!arguments.length)return N;N=e;return F};F.tooltipContent=function(e){if(!arguments.length)return L;L=e;return F};F.tooltipXContent=function(e){if(!arguments.length)return C;C=e;return F};F.tooltipYContent=function(e){if(!arguments.length)return k;k=e;return F};F.state=function(e){if(!arguments.length)return A;A=e;return F};F.defaultState=function(e){if(!arguments.length)return O;O=e;return F};F.noData=function(e){if(!arguments.length)return _;_=e;return F};F.transitionDuration=function(e){if(!arguments.length)return D;D=e;return F};return F};e.models.scatterPlusLineChart=function(){"use strict";function B(e){e.each(function(e){function $(){if(S){z.select(".nv-point-paths").style("pointer-events","all");return false}z.select(".nv-point-paths").style("pointer-events","none");var i=d3.mouse(this);h.distortion(E).focus(i[0]);p.distortion(E).focus(i[1]);z.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);if(g)z.select(".nv-x.nv-axis").call(n);if(y)z.select(".nv-y.nv-axis").call(r);z.select(".nv-distributionX").datum(e.filter(function(e){return!e.disabled})).call(o);z.select(".nv-distributionY").datum(e.filter(function(e){return!e.disabled})).call(u)}var T=d3.select(this),N=this;var C=(f||parseInt(T.style("width"))||960)-a.left-a.right,j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom;B.update=function(){T.transition().duration(M).call(B)};B.container=this;k.disabled=e.map(function(e){return!!e.disabled});if(!L){var F;L={};for(F in k){if(k[F]instanceof Array)L[F]=k[F].slice(0);else L[F]=k[F]}}if(!e||!e.length||!e.filter(function(e){return e.values.length}).length){var I=T.selectAll(".nv-noData").data([O]);I.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");I.attr("x",a.left+C/2).attr("y",a.top+j/2).text(function(e){return e});return B}else{T.selectAll(".nv-noData").remove()}h=t.xScale();p=t.yScale();_=_||h;D=D||p;var q=T.selectAll("g.nv-wrap.nv-scatterChart").data([e]);var R=q.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+t.id());var U=R.append("g");var z=q.select("g");U.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none");U.append("g").attr("class","nv-x nv-axis");U.append("g").attr("class","nv-y nv-axis");U.append("g").attr("class","nv-scatterWrap");U.append("g").attr("class","nv-regressionLinesWrap");U.append("g").attr("class","nv-distWrap");U.append("g").attr("class","nv-legendWrap");U.append("g").attr("class","nv-controlsWrap");q.attr("transform","translate("+a.left+","+a.top+")");if(b){z.select(".nv-y.nv-axis").attr("transform","translate("+C+",0)")}if(m){i.width(C/2);q.select(".nv-legendWrap").datum(e).call(i);if(a.top!=i.height()){a.top=i.height();j=(l||parseInt(T.style("height"))||400)-a.top-a.bottom}q.select(".nv-legendWrap").attr("transform","translate("+C/2+","+ -a.top+")")}if(w){s.width(180).color(["#444"]);z.select(".nv-controlsWrap").datum(H).attr("transform","translate(0,"+ -a.top+")").call(s)}t.width(C).height(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));q.select(".nv-scatterWrap").datum(e.filter(function(e){return!e.disabled})).call(t);q.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+t.id()+")");var W=q.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(e){return e});W.enter().append("g").attr("class","nv-regLines");var X=W.selectAll(".nv-regLine").data(function(e){return[e]});var V=X.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0);X.transition().attr("x1",h.range()[0]).attr("x2",h.range()[1]).attr("y1",function(e,t){return p(h.domain()[0]*e.slope+e.intercept)}).attr("y2",function(e,t){return p(h.domain()[1]*e.slope+e.intercept)}).style("stroke",function(e,t,n){return c(e,n)}).style("stroke-opacity",function(e,t){return e.disabled||typeof e.slope==="undefined"||typeof e.intercept==="undefined"?0:1});if(g){n.scale(h).ticks(n.ticks()?n.ticks():C/100).tickSize(-j,0);z.select(".nv-x.nv-axis").attr("transform","translate(0,"+p.range()[0]+")").call(n)}if(y){r.scale(p).ticks(r.ticks()?r.ticks():j/36).tickSize(-C,0);z.select(".nv-y.nv-axis").call(r)}if(d){o.getData(t.x()).scale(h).width(C).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionX");z.select(".nv-distributionX").attr("transform","translate(0,"+p.range()[0]+")").datum(e.filter(function(e){return!e.disabled})).call(o)}if(v){u.getData(t.y()).scale(p).width(j).color(e.map(function(e,t){return e.color||c(e,t)}).filter(function(t,n){return!e[n].disabled}));U.select(".nv-distWrap").append("g").attr("class","nv-distributionY");z.select(".nv-distributionY").attr("transform","translate("+(b?C:-u.size())+",0)").datum(e.filter(function(e){return!e.disabled})).call(u)}if(d3.fisheye){z.select(".nv-background").attr("width",C).attr("height",j);z.select(".nv-background").on("mousemove",$);z.select(".nv-background").on("click",function(){S=!S});t.dispatch.on("elementClick.freezeFisheye",function(){S=!S})}s.dispatch.on("legendClick",function(e,i){e.disabled=!e.disabled;E=e.disabled?0:2.5;z.select(".nv-background").style("pointer-events",e.disabled?"none":"all");z.select(".nv-point-paths").style("pointer-events",e.disabled?"all":"none");if(e.disabled){h.distortion(E).focus(0);p.distortion(E).focus(0);z.select(".nv-scatterWrap").call(t);z.select(".nv-x.nv-axis").call(n);z.select(".nv-y.nv-axis").call(r)}else{S=false}B.update()});i.dispatch.on("stateChange",function(e){k=e;A.stateChange(k);B.update()});t.dispatch.on("elementMouseover.tooltip",function(e){d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",e.pos[1]-j);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",e.pos[0]+o.size());e.pos=[e.pos[0]+a.left,e.pos[1]+a.top];A.tooltipShow(e)});A.on("tooltipShow",function(e){if(x)P(e,N.parentNode)});A.on("changeState",function(t){if(typeof t.disabled!=="undefined"){e.forEach(function(e,n){e.disabled=t.disabled[n]});k.disabled=t.disabled}B.update()});_=h.copy();D=p.copy()});return B}var t=e.models.scatter(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.models.distribution(),u=e.models.distribution();var a={top:30,right:20,bottom:50,left:75},f=null,l=null,c=e.utils.defaultColor(),h=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.xScale(),p=d3.fisheye?d3.fisheye.scale(d3.scale.linear).distortion(0):t.yScale(),d=false,v=false,m=true,g=true,y=true,b=false,w=!!d3.fisheye,E=0,S=false,x=true,T=function(e,t,n){return"<strong>"+t+"</strong>"},N=function(e,t,n){return"<strong>"+n+"</strong>"},C=function(e,t,n,r){return"<h3>"+e+"</h3>"+"<p>"+r+"</p>"},k={},L=null,A=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),O="No Data Available.",M=250;t.xScale(h).yScale(p);n.orient("bottom").tickPadding(10);r.orient(b?"right":"left").tickPadding(10);o.axis("x");u.axis("y");s.updateState(false);var _,D;var P=function(i,s){var o=i.pos[0]+(s.offsetLeft||0),u=i.pos[1]+(s.offsetTop||0),f=i.pos[0]+(s.offsetLeft||0),l=p.range()[0]+a.top+(s.offsetTop||0),c=h.range()[0]+a.left+(s.offsetLeft||0),d=i.pos[1]+(s.offsetTop||0),v=n.tickFormat()(t.x()(i.point,i.pointIndex)),m=r.tickFormat()(t.y()(i.point,i.pointIndex));if(T!=null)e.tooltip.show([f,l],T(i.series.key,v,m,i,B),"n",1,s,"x-nvtooltip");if(N!=null)e.tooltip.show([c,d],N(i.series.key,v,m,i,B),"e",1,s,"y-nvtooltip");if(C!=null)e.tooltip.show([o,u],C(i.series.key,v,m,i.point.tooltip,i,B),i.value<0?"n":"s",null,s)};var H=[{key:"Magnify",disabled:true}];t.dispatch.on("elementMouseout.tooltip",function(e){A.tooltipHide(e);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-distx-"+e.pointIndex).attr("y1",0);d3.select(".nv-chart-"+t.id()+" .nv-series-"+e.seriesIndex+" .nv-disty-"+e.pointIndex).attr("x2",u.size())});A.on("tooltipHide",function(){if(x)e.tooltip.cleanup()});B.dispatch=A;B.scatter=t;B.legend=i;B.controls=s;B.xAxis=n;B.yAxis=r;B.distX=o;B.distY=u;d3.rebind(B,t,"id","interactive","pointActive","x","y","shape","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","sizeRange","forceX","forceY","forceSize","clipVoronoi","clipRadius","useVoronoi");B.options=e.utils.optionsFunc.bind(B);B.margin=function(e){if(!arguments.length)return a;a.top=typeof e.top!="undefined"?e.top:a.top;a.right=typeof e.right!="undefined"?e.right:a.right;a.bottom=typeof e.bottom!="undefined"?e.bottom:a.bottom;a.left=typeof e.left!="undefined"?e.left:a.left;return B};B.width=function(e){if(!arguments.length)return f;f=e;return B};B.height=function(e){if(!arguments.length)return l;l=e;return B};B.color=function(t){if(!arguments.length)return c;c=e.utils.getColor(t);i.color(c);o.color(c);u.color(c);return B};B.showDistX=function(e){if(!arguments.length)return d;d=e;return B};B.showDistY=function(e){if(!arguments.length)return v;v=e;return B};B.showControls=function(e){if(!arguments.length)return w;w=e;return B};B.showLegend=function(e){if(!arguments.length)return m;m=e;return B};B.showXAxis=function(e){if(!arguments.length)return g;g=e;return B};B.showYAxis=function(e){if(!arguments.length)return y;y=e;return B};B.rightAlignYAxis=function(e){if(!arguments.length)return b;b=e;r.orient(e?"right":"left");return B};B.fisheye=function(e){if(!arguments.length)return E;E=e;return B};B.tooltips=function(e){if(!arguments.length)return x;x=e;return B};B.tooltipContent=function(e){if(!arguments.length)return C;C=e;return B};B.tooltipXContent=function(e){if(!arguments.length)return T;T=e;return B};B.tooltipYContent=function(e){if(!arguments.length)return N;N=e;return B};B.state=function(e){if(!arguments.length)return k;k=e;return B};B.defaultState=function(e){if(!arguments.length)return L;L=e;return B};B.noData=function(e){if(!arguments.length)return O;O=e;return B};B.transitionDuration=function(e){if(!arguments.length)return M;M=e;return B};return B};e.models.sparkline=function(){"use strict";function d(e){e.each(function(e){var i=n-t.left-t.right,d=r-t.top-t.bottom,v=d3.select(this);s.domain(l||d3.extent(e,u)).range(h||[0,i]);o.domain(c||d3.extent(e,a)).range(p||[d,0]);var m=v.selectAll("g.nv-wrap.nv-sparkline").data([e]);var g=m.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");var b=g.append("g");var w=m.select("g");m.attr("transform","translate("+t.left+","+t.top+")");var E=m.selectAll("path").data(function(e){return[e]});E.enter().append("path");E.exit().remove();E.style("stroke",function(e,t){return e.color||f(e,t)}).attr("d",d3.svg.line().x(function(e,t){return s(u(e,t))}).y(function(e,t){return o(a(e,t))}));var S=m.selectAll("circle.nv-point").data(function(e){function n(t){if(t!=-1){var n=e[t];n.pointIndex=t;return n}else{return null}}var t=e.map(function(e,t){return a(e,t)});var r=n(t.lastIndexOf(o.domain()[1])),i=n(t.indexOf(o.domain()[0])),s=n(t.length-1);return[i,r,s].filter(function(e){return e!=null})});S.enter().append("circle");S.exit().remove();S.attr("cx",function(e,t){return s(u(e,e.pointIndex))}).attr("cy",function(e,t){return o(a(e,e.pointIndex))}).attr("r",2).attr("class",function(e,t){return u(e,e.pointIndex)==s.domain()[1]?"nv-point nv-currentValue":a(e,e.pointIndex)==o.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})});return d}var t={top:2,right:0,bottom:2,left:0},n=400,r=32,i=true,s=d3.scale.linear(),o=d3.scale.linear(),u=function(e){return e.x},a=function(e){return e.y},f=e.utils.getColor(["#000"]),l,c,h,p;d.options=e.utils.optionsFunc.bind(d);d.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return d};d.width=function(e){if(!arguments.length)return n;n=e;return d};d.height=function(e){if(!arguments.length)return r;r=e;return d};d.x=function(e){if(!arguments.length)return u;u=d3.functor(e);return d};d.y=function(e){if(!arguments.length)return a;a=d3.functor(e);return d};d.xScale=function(e){if(!arguments.length)return s;s=e;return d};d.yScale=function(e){if(!arguments.length)return o;o=e;return d};d.xDomain=function(e){if(!arguments.length)return l;l=e;return d};d.yDomain=function(e){if(!arguments.length)return c;c=e;return d};d.xRange=function(e){if(!arguments.length)return h;h=e;return d};d.yRange=function(e){if(!arguments.length)return p;p=e;return d};d.animate=function(e){if(!arguments.length)return i;i=e;return d};d.color=function(t){if(!arguments.length)return f;f=e.utils.getColor(t);return d};return d};e.models.sparklinePlus=function(){"use strict";function v(e){e.each(function(c){function O(){if(a)return;var e=C.selectAll(".nv-hoverValue").data(u);var r=e.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);e.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove();e.attr("transform",function(e){return"translate("+s(t.x()(c[e],e))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1);if(!u.length)return;r.append("line").attr("x1",0).attr("y1",-n.top).attr("x2",0).attr("y2",b);r.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-n.top).attr("text-anchor","end").attr("dy",".9em");C.select(".nv-hoverValue .nv-xValue").text(f(t.x()(c[u[0]],u[0])));r.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-n.top).attr("text-anchor","start").attr("dy",".9em");C.select(".nv-hoverValue .nv-yValue").text(l(t.y()(c[u[0]],u[0])))}function M(){function r(e,n){var r=Math.abs(t.x()(e[0],0)-n);var i=0;for(var s=0;s<e.length;s++){if(Math.abs(t.x()(e[s],s)-n)<r){r=Math.abs(t.x()(e[s],s)-n);i=s}}return i}if(a)return;var e=d3.mouse(this)[0]-n.left;u=[r(c,Math.round(s.invert(e)))];O()}var m=d3.select(this);var g=(r||parseInt(m.style("width"))||960)-n.left-n.right,b=(i||parseInt(m.style("height"))||400)-n.top-n.bottom;v.update=function(){v(e)};v.container=this;if(!c||!c.length){var w=m.selectAll(".nv-noData").data([d]);w.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");w.attr("x",n.left+g/2).attr("y",n.top+b/2).text(function(e){return e});return v}else{m.selectAll(".nv-noData").remove()}var E=t.y()(c[c.length-1],c.length-1);s=t.xScale();o=t.yScale();var S=m.selectAll("g.nv-wrap.nv-sparklineplus").data([c]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus");var N=T.append("g");var C=S.select("g");N.append("g").attr("class","nv-sparklineWrap");N.append("g").attr("class","nv-valueWrap");N.append("g").attr("class","nv-hoverArea");S.attr("transform","translate("+n.left+","+n.top+")");var k=C.select(".nv-sparklineWrap");t.width(g).height(b);k.call(t);var L=C.select(".nv-valueWrap");var A=L.selectAll(".nv-currentValue").data([E]);A.enter().append("text").attr("class","nv-currentValue").attr("dx",p?-8:8).attr("dy",".9em").style("text-anchor",p?"end":"start");A.attr("x",g+(p?n.right:0)).attr("y",h?function(e){return o(e)}:0).style("fill",t.color()(c[c.length-1],c.length-1)).text(l(E));N.select(".nv-hoverArea").append("rect").on("mousemove",M).on("click",function(){a=!a}).on("mouseout",function(){u=[];O()});C.select(".nv-hoverArea rect").attr("transform",function(e){return"translate("+ -n.left+","+ -n.top+")"}).attr("width",g+n.left+n.right).attr("height",b+n.top)});return v}var t=e.models.sparkline();var n={top:15,right:100,bottom:10,left:50},r=null,i=null,s,o,u=[],a=false,f=d3.format(",r"),l=d3.format(",.2f"),c=true,h=true,p=false,d="No Data Available.";v.sparkline=t;d3.rebind(v,t,"x","y","xScale","yScale","color");v.options=e.utils.optionsFunc.bind(v);v.margin=function(e){if(!arguments.length)return n;n.top=typeof e.top!="undefined"?e.top:n.top;n.right=typeof e.right!="undefined"?e.right:n.right;n.bottom=typeof e.bottom!="undefined"?e.bottom:n.bottom;n.left=typeof e.left!="undefined"?e.left:n.left;return v};v.width=function(e){if(!arguments.length)return r;r=e;return v};v.height=function(e){if(!arguments.length)return i;i=e;return v};v.xTickFormat=function(e){if(!arguments.length)return f;f=e;return v};v.yTickFormat=function(e){if(!arguments.length)return l;l=e;return v};v.showValue=function(e){if(!arguments.length)return c;c=e;return v};v.alignValue=function(e){if(!arguments.length)return h;h=e;return v};v.rightAlignValue=function(e){if(!arguments.length)return p;p=e;return v};v.noData=function(e){if(!arguments.length)return d;d=e;return v};return v};e.models.stackedArea=function(){"use strict";function y(e){e.each(function(e){var a=n-t.left-t.right,v=r-t.top-t.bottom,b=d3.select(this);p=m.xScale();d=m.yScale();var w=e;e=e.map(function(e,t){e.seriesIndex=t;e.values=e.values.map(function(e,n){e.index=n;e.seriesIndex=t;return e});return e});var E=e.filter(function(e){return!e.disabled});e=d3.layout.stack().order(l).offset(f).values(function(e){return e.values}).x(o).y(u).out(function(e,t,n){var r=u(e)===0?0:n;e.display={y:r,y0:t}})(E);var S=b.selectAll("g.nv-wrap.nv-stackedarea").data([e]);var T=S.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea");var N=T.append("defs");var C=T.append("g");var k=S.select("g");C.append("g").attr("class","nv-areaWrap");C.append("g").attr("class","nv-scatterWrap");S.attr("transform","translate("+t.left+","+t.top+")");m.width(a).height(v).x(o).y(function(e){return e.display.y+e.display.y0}).forceY([0]).color(e.map(function(e,t){return e.color||i(e,e.seriesIndex)}));var L=k.select(".nv-scatterWrap").datum(e);L.call(m);N.append("clipPath").attr("id","nv-edge-clip-"+s).append("rect");S.select("#nv-edge-clip-"+s+" rect").attr("width",a).attr("height",v);k.attr("clip-path",h?"url(#nv-edge-clip-"+s+")":"");var A=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y+e.display.y0)}).interpolate(c);var O=d3.svg.area().x(function(e,t){return p(o(e,t))}).y0(function(e){return d(e.display.y0)}).y1(function(e){return d(e.display.y0)});var M=k.select(".nv-areaWrap").selectAll("path.nv-area").data(function(e){return e});M.enter().append("path").attr("class",function(e,t){return"nv-area nv-area-"+t}).attr("d",function(e,t){return O(e.values,e.seriesIndex)}).on("mouseover",function(e,t){d3.select(this).classed("hover",true);g.areaMouseover({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("mouseout",function(e,t){d3.select(this).classed("hover",false);g.areaMouseout({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})}).on("click",function(e,t){d3.select(this).classed("hover",false);g.areaClick({point:e,series:e.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:t})});M.exit().transition().attr("d",function(e,t){return O(e.values,t)}).remove();M.style("fill",function(e,t){return e.color||i(e,e.seriesIndex)}).style("stroke",function(e,t){return e.color||i(e,e.seriesIndex)});M.transition().attr("d",function(e,t){return A(e.values,t)});m.dispatch.on("elementMouseover.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",true)});m.dispatch.on("elementMouseout.area",function(e){k.select(".nv-chart-"+s+" .nv-area-"+e.seriesIndex).classed("hover",false)});y.d3_stackedOffset_stackPercent=function(e){var t=e.length,n=e[0].length,r=1/t,i,s,o,a=[];for(s=0;s<n;++s){for(i=0,o=0;i<w.length;i++)o+=u(w[i].values[s]);if(o)for(i=0;i<t;i++)e[i][s][1]/=o;else for(i=0;i<t;i++)e[i][s][1]=r}for(s=0;s<n;++s)a[s]=0;return a}});return y}var t={top:0,right:0,bottom:0,left:0},n=960,r=500,i=e.utils.defaultColor(),s=Math.floor(Math.random()*1e5),o=function(e){return e.x},u=function(e){return e.y},a="stack",f="zero",l="default",c="linear",h=false,p,d,v=d3.format(",.3f"),m=e.models.scatter(),g=d3.dispatch("tooltipShow","tooltipHide","areaClick","areaMouseover","areaMouseout");m.size(2.2).sizeDomain([2.2,2.2]);m.dispatch.on("elementClick.area",function(e){g.areaClick(e)});m.dispatch.on("elementMouseover.tooltip",function(e){e.pos=[e.pos[0]+t.left,e.pos[1]+t.top],g.tooltipShow(e)});m.dispatch.on("elementMouseout.tooltip",function(e){g.tooltipHide(e)});y.dispatch=g;y.scatter=m;d3.rebind(y,m,"interactive","size","xScale","yScale","zScale","xDomain","yDomain","xRange","yRange","sizeDomain","forceX","forceY","forceSize","clipVoronoi","useVoronoi","clipRadius","highlightPoint","clearHighlights");y.options=e.utils.optionsFunc.bind(y);y.x=function(e){if(!arguments.length)return o;o=d3.functor(e);return y};y.y=function(e){if(!arguments.length)return u;u=d3.functor(e);return y};y.margin=function(e){if(!arguments.length)return t;t.top=typeof e.top!="undefined"?e.top:t.top;t.right=typeof e.right!="undefined"?e.right:t.right;t.bottom=typeof e.bottom!="undefined"?e.bottom:t.bottom;t.left=typeof e.left!="undefined"?e.left:t.left;return y};y.width=function(e){if(!arguments.length)return n;n=e;return y};y.height=function(e){if(!arguments.length)return r;r=e;return y};y.clipEdge=function(e){if(!arguments.length)return h;h=e;return y};y.color=function(t){if(!arguments.length)return i;i=e.utils.getColor(t);return y};y.offset=function(e){if(!arguments.length)return f;f=e;return y};y.order=function(e){if(!arguments.length)return l;l=e;return y};y.style=function(e){if(!arguments.length)return a;a=e;switch(a){case"stack":y.offset("zero");y.order("default");break;case"stream":y.offset("wiggle");y.order("inside-out");break;case"stream-center":y.offset("silhouette");y.order("inside-out");break;case"expand":y.offset("expand");y.order("default");break;case"stack_percent":y.offset(y.d3_stackedOffset_stackPercent);y.order("default");break}return y};y.interpolate=function(e){if(!arguments.length)return c;c=e;return y};return y};e.models.stackedAreaChart=function(){"use strict";function D(b){b.each(function(b){var x=d3.select(this),P=this;var H=(a||parseInt(x.style("width"))||960)-u.left-u.right,B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom;D.update=function(){x.transition().duration(M).call(D)};D.container=this;if(y=="right")H=H-250;T.disabled=b.map(function(e){return!!e.disabled});if(!N){var j;N={};for(j in T){if(T[j]instanceof Array)N[j]=T[j].slice(0);else N[j]=T[j]}}if(!b||!b.length||!b.filter(function(e){return e.values.length}).length){var F=x.selectAll(".nv-noData").data([C]);F.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle");F.attr("x",u.left+H/2).attr("y",u.top+B/2).text(function(e){return e});return D}else{x.selectAll(".nv-noData").remove()}w=t.xScale();E=t.yScale();var I=x.selectAll("g.nv-wrap.nv-stackedAreaChart").data([b]);var q=I.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g");var R=I.select("g");q.append("rect").style("opacity",0);q.append("g").attr("class","nv-x nv-axis");q.append("g").attr("class","nv-y nv-axis");q.append("g").attr("class","nv-stackedWrap");q.append("g").attr("class","nv-legendWrap");q.append("g").attr("class","nv-controlsWrap");q.append("g").attr("class","nv-interactive");R.select("rect").attr("width",H).attr("height",B);if(h){var U=c?H-L:H;i.width(U);R.select(".nv-legendWrap").datum(b).call(i);if(u.top!=i.height()){u.top=i.height();B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}if(y=="right"){R.select(".nv-legendWrap").attr("transform","translate("+H+","+20+")")}else{R.select(".nv-legendWrap").attr("transform","translate("+(H-U)+","+ -u.top+")")}}if(c){var z=[{key:O.stacked||"Stacked",metaKey:"Stacked",disabled:t.style()!="stack",style:"stack"},{key:O.stream||"Stream",metaKey:"Stream",disabled:t.style()!="stream",style:"stream"},{key:O.expanded||"Expanded",metaKey:"Expanded",disabled:t.style()!="expand",style:"expand"},{key:O.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:t.style()!="stack_percent",style:"stack_percent"}];L=A.length/3*260;z=z.filter(function(e){return A.indexOf(e.metaKey)!==-1});s.width(L).color(["#444","#444","#444"]);R.select(".nv-controlsWrap").datum(z).call(s);if(u.top!=Math.max(s.height(),i.height())){u.top=Math.max(s.height(),i.height());B=(f||parseInt(x.style("height"))||400)-u.top-u.bottom}R.select(".nv-controlsWrap").attr("transform","translate(0,"+ -u.top+")")}I.attr("transform","translate("+u.left+","+u.top+")");if(v){R.select(".nv-y.nv-axis").attr("transform","translate("+H+",0)")}if(m){o.width(H).height(B).margin({left:u.left,top:u.top}).svgContainer(x).xScale(w);I.select(".nv-interactive").call(o)}t.width(H).height(B);var W=R.select(".nv-stackedWrap").datum(b);W.transition().call(t);if(p){n.scale(w).ticks(H/100).tickSize(-B,0);R.select(".nv-x.nv-axis").attr("transform","translate(0,"+B+")");R.select(".nv-x.nv-axis").transition().duration(0).call(n)}if(d){r.scale(E).ticks(t.offset()=="wiggle"?0:B/36).tickSize(-H,0).setTickFormat(t.style()=="expand"||t.style()=="stack_percent"?d3.format("%"):S);R.select(".nv-y.nv-axis").transition().duration(0).call(r)}t.dispatch.on("areaClick.toggle",function(e){if(b.filter(function(e){return!e.disabled}).length===1)b=b.map(function(e){e.disabled=false;return e});else b=b.map(function(t,n){t.disabled=n!=e.seriesIndex;return t});T.disabled=b.map(function(e){return!!e.disabled});k.stateChange(T);D.update()});i.dispatch.on("stateChange",function(e){T.disabled=e.disabled;k.stateChange(T);D.update()});s.dispatch.on("legendClick",function(e,n){if(!e.disabled)return;z=z.map(function(e){e.disabled=true;return e});e.disabled=false;t.style(e.style);T.style=t.style();k.stateChange(T);D.update()});o.dispatch.on("elementMousemove",function(i){t.clearHighlights();var s,a,f,c=[];b.filter(function(e,t){e.seriesIndex=t;return!e.disabled}).forEach(function(n,r){a=e.interactiveBisect(n.values,i.pointXValue,D.x());t.highlightPoint(r,a,true);var o=n.values[a];if(typeof o==="undefined")return;if(typeof s==="undefined")s=o;if(typeof f==="undefined")f=D.xScale()(D.x()(o,a));var u=t.style()=="expand"?o.display.y:D.y()(o,a);c.push({key:n.key,value:u,color:l(n,n.seriesIndex),stackedValue:o.display})});c.reverse();if(c.length>2){var h=D.yScale().invert(i.mouseY);var p=Infinity,d=null;c.forEach(function(e,t){if(h>=e.stackedValue.y0&&h<=e.stackedValue.y0+e.stackedValue.y){d=t;return}});if(d!=null)c[d].highlight=true}var v=n.tickFormat()(D.x()(s,a));var m=t.style()=="expand"?function(e,t){return d3.format(".1%")(e)}:function(e,t){return r.tickFormat()(e)};o.tooltip.position({left:f+u.left,top:i.mouseY+u.top}).chartContainer(P.parentNode).enabled(g).valueFormatter(m).data({value:v,series:c})();o.renderGuideLine(f)});o.dispatch.on("elementMouseout",function(e){k.tooltipHide();t.clearHighlights()});k.on("tooltipShow",function(e){if(g)_(e,P.parentNode)});k.on("changeState",function(e){if(typeof e.disabled!=="undefined"){b.forEach(function(t,n){t.disabled=e.disabled[n]});T.disabled=e.disabled}if(typeof e.style!=="undefined"){t.style(e.style)}D.update()})});return D}var t=e.models.stackedArea(),n=e.models.axis(),r=e.models.axis(),i=e.models.legend(),s=e.models.legend(),o=e.interactiveGuideline();var u={top:30,right:25,bottom:50,left:60},a=null,f=null,l=e.utils.defaultColor(),c=true,h=true,p=true,d=true,v=false,m=false,g=true,y="top",b=function(e,t,n,r,i){return"<h3>"+e+"</h3>"+"<p>"+n+" on "+t+"</p>"},w,E,S=d3.format(",.2f"),x=d3.format(",.3f"),T={style:t.style()},N=null,C="No Data Available.",k=d3.dispatch("tooltipShow","tooltipHide","stateChange","changeState"),L=250,A=["Stacked","Stream","Expanded"],O={},M=250;n.orient("bottom").tickPadding(7);r.orient(v?"right":"left");s.updateState(false);var _=function(r,i){var s=r.pos[0]+(i.offsetLeft||0),o=r.pos[1]+(i.offsetTop||0),u=n.tickFormat()(t.x()(r.point,r.pointIndex)),a=x(t.y()(r.point,r.pointIndex)),f=b(r.series.key,u,a,r,D);e.tooltip.show([s,o],f,r.value<0?"n":"s",null,i)};t.dispatch.on("tooltipShow",function(e){e.pos=[e.pos[0]+u.left,e.pos[1]+u.top],k.tooltipShow(e)});t.dispatch.on("tooltipHide",function(e){k.tooltipHide(e)});k.on("tooltipHide",function(){if(g)e.tooltip.cleanup()});D.dispatch=k;D.stacked=t;D.legend=i;D.controls=s;D.xAxis=n;D.yAxis=r;D.interactiveLayer=o;d3.rebind(D,t,"x","y","size","xScale","yScale","xDomain","yDomain","xRange","yRange","sizeDomain","interactive","useVoronoi","offset","order","style","clipEdge","forceX","forceY","forceSize","interpolate");D.options=e.utils.optionsFunc.bind(D);D.margin=function(e){if(!arguments.length)return u;u.top=typeof e.top!="undefined"?e.top:u.top;u.right=typeof e.right!="undefined"?e.right:u.right;u.bottom=typeof e.bottom!="undefined"?e.bottom:u.bottom;u.left=typeof e.left!="undefined"?e.left:u.left;return D};D.width=function(e){if(!arguments.length)return a;a=e;return D};D.height=function(e){if(!arguments.length)return f;f=e;return D};D.color=function(n){if(!arguments.length)return l;l=e.utils.getColor(n);i.color(l);t.color(l);return D};D.showControls=function(e){if(!arguments.length)return c;c=e;return D};D.showLegend=function(e){if(!arguments.length)return h;h=e;return D};D.showXAxis=function(e){if(!arguments.length)return p;p=e;return D};D.showYAxis=function(e){if(!arguments.length)return d;d=e;return D};D.rightAlignYAxis=function(e){if(!arguments.length)return v;v=e;r.orient(e?"right":"left");return D};D.useInteractiveGuideline=function(e){if(!arguments.length)return m;m=e;if(e===true){D.interactive(false);D.useVoronoi(false)}return D};D.tooltip=function(e){if(!arguments.length)return b;b=e;return D};D.tooltips=function(e){if(!arguments.length)return g;g=e;return D};D.legendPos=function(e){if(!arguments.length)return y;y=e;return D};D.tooltipContent=function(e){if(!arguments.length)return b;b=e;return D};D.yAxisTooltipFormat=function(e){if(!arguments.length)return x;x=e;return D};D.state=function(e){if(!arguments.length)return T;T=e;return D};D.defaultState=function(e){if(!arguments.length)return N;N=e;return D};D.noData=function(e){if(!arguments.length)return C;C=e;return D};D.transitionDuration=function(e){if(!arguments.length)return M;M=e;return D};D.controlsData=function(e){if(!arguments.length)return A;A=e;return D};D.controlLabels=function(e){if(!arguments.length)return O;if(typeof e!=="object")return O;O=e;return D};r.setTickFormat=r.tickFormat;r.tickFormat=function(e){if(!arguments.length)return S;S=e;return r};return D}})() \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/outro.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/outro.js
deleted file mode 100644
index 158693a0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/outro.js
+++ /dev/null
@@ -1 +0,0 @@
-})(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/sankey.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/sankey.js
deleted file mode 100644
index c3bc59fb..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/sankey.js
+++ /dev/null
@@ -1,292 +0,0 @@
-d3.sankey = function() {
- var sankey = {},
- nodeWidth = 24,
- nodePadding = 8,
- size = [1, 1],
- nodes = [],
- links = [];
-
- sankey.nodeWidth = function(_) {
- if (!arguments.length) return nodeWidth;
- nodeWidth = +_;
- return sankey;
- };
-
- sankey.nodePadding = function(_) {
- if (!arguments.length) return nodePadding;
- nodePadding = +_;
- return sankey;
- };
-
- sankey.nodes = function(_) {
- if (!arguments.length) return nodes;
- nodes = _;
- return sankey;
- };
-
- sankey.links = function(_) {
- if (!arguments.length) return links;
- links = _;
- return sankey;
- };
-
- sankey.size = function(_) {
- if (!arguments.length) return size;
- size = _;
- return sankey;
- };
-
- sankey.layout = function(iterations) {
- computeNodeLinks();
- computeNodeValues();
- computeNodeBreadths();
- computeNodeDepths(iterations);
- computeLinkDepths();
- return sankey;
- };
-
- sankey.relayout = function() {
- computeLinkDepths();
- return sankey;
- };
-
- sankey.link = function() {
- var curvature = .5;
-
- function link(d) {
- var x0 = d.source.x + d.source.dx,
- x1 = d.target.x,
- xi = d3.interpolateNumber(x0, x1),
- x2 = xi(curvature),
- x3 = xi(1 - curvature),
- y0 = d.source.y + d.sy + d.dy / 2,
- y1 = d.target.y + d.ty + d.dy / 2;
- return "M" + x0 + "," + y0
- + "C" + x2 + "," + y0
- + " " + x3 + "," + y1
- + " " + x1 + "," + y1;
- }
-
- link.curvature = function(_) {
- if (!arguments.length) return curvature;
- curvature = +_;
- return link;
- };
-
- return link;
- };
-
- // Populate the sourceLinks and targetLinks for each node.
- // Also, if the source and target are not objects, assume they are indices.
- function computeNodeLinks() {
- nodes.forEach(function(node) {
- node.sourceLinks = [];
- node.targetLinks = [];
- });
- links.forEach(function(link) {
- var source = link.source,
- target = link.target;
- if (typeof source === "number") source = link.source = nodes[link.source];
- if (typeof target === "number") target = link.target = nodes[link.target];
- source.sourceLinks.push(link);
- target.targetLinks.push(link);
- });
- }
-
- // Compute the value (size) of each node by summing the associated links.
- function computeNodeValues() {
- nodes.forEach(function(node) {
- node.value = Math.max(
- d3.sum(node.sourceLinks, value),
- d3.sum(node.targetLinks, value)
- );
- });
- }
-
- // Iteratively assign the breadth (x-position) for each node.
- // Nodes are assigned the maximum breadth of incoming neighbors plus one;
- // nodes with no incoming links are assigned breadth zero, while
- // nodes with no outgoing links are assigned the maximum breadth.
- function computeNodeBreadths() {
- var remainingNodes = nodes,
- nextNodes,
- x = 0;
-
- while (remainingNodes.length) {
- nextNodes = [];
- remainingNodes.forEach(function(node) {
- node.x = x;
- node.dx = nodeWidth;
- node.sourceLinks.forEach(function(link) {
- nextNodes.push(link.target);
- });
- });
- remainingNodes = nextNodes;
- ++x;
- }
-
- //
- moveSinksRight(x);
- scaleNodeBreadths((size[0] - nodeWidth) / (x - 1));
- }
-
- function moveSourcesRight() {
- nodes.forEach(function(node) {
- if (!node.targetLinks.length) {
- node.x = d3.min(node.sourceLinks, function(d) { return d.target.x; }) - 1;
- }
- });
- }
-
- function moveSinksRight(x) {
- nodes.forEach(function(node) {
- if (!node.sourceLinks.length) {
- node.x = x - 1;
- }
- });
- }
-
- function scaleNodeBreadths(kx) {
- nodes.forEach(function(node) {
- node.x *= kx;
- });
- }
-
- function computeNodeDepths(iterations) {
- var nodesByBreadth = d3.nest()
- .key(function(d) { return d.x; })
- .sortKeys(d3.ascending)
- .entries(nodes)
- .map(function(d) { return d.values; });
-
- //
- initializeNodeDepth();
- resolveCollisions();
- for (var alpha = 1; iterations > 0; --iterations) {
- relaxRightToLeft(alpha *= .99);
- resolveCollisions();
- relaxLeftToRight(alpha);
- resolveCollisions();
- }
-
- function initializeNodeDepth() {
- var ky = d3.min(nodesByBreadth, function(nodes) {
- return (size[1] - (nodes.length - 1) * nodePadding) / d3.sum(nodes, value);
- });
-
- nodesByBreadth.forEach(function(nodes) {
- nodes.forEach(function(node, i) {
- node.y = i;
- node.dy = node.value * ky;
- });
- });
-
- links.forEach(function(link) {
- link.dy = link.value * ky;
- });
- }
-
- function relaxLeftToRight(alpha) {
- nodesByBreadth.forEach(function(nodes, breadth) {
- nodes.forEach(function(node) {
- if (node.targetLinks.length) {
- var y = d3.sum(node.targetLinks, weightedSource) / d3.sum(node.targetLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedSource(link) {
- return center(link.source) * link.value;
- }
- }
-
- function relaxRightToLeft(alpha) {
- nodesByBreadth.slice().reverse().forEach(function(nodes) {
- nodes.forEach(function(node) {
- if (node.sourceLinks.length) {
- var y = d3.sum(node.sourceLinks, weightedTarget) / d3.sum(node.sourceLinks, value);
- node.y += (y - center(node)) * alpha;
- }
- });
- });
-
- function weightedTarget(link) {
- return center(link.target) * link.value;
- }
- }
-
- function resolveCollisions() {
- nodesByBreadth.forEach(function(nodes) {
- var node,
- dy,
- y0 = 0,
- n = nodes.length,
- i;
-
- // Push any overlapping nodes down.
- nodes.sort(ascendingDepth);
- for (i = 0; i < n; ++i) {
- node = nodes[i];
- dy = y0 - node.y;
- if (dy > 0) node.y += dy;
- y0 = node.y + node.dy + nodePadding;
- }
-
- // If the bottommost node goes outside the bounds, push it back up.
- dy = y0 - nodePadding - size[1];
- if (dy > 0) {
- y0 = node.y -= dy;
-
- // Push any overlapping nodes back up.
- for (i = n - 2; i >= 0; --i) {
- node = nodes[i];
- dy = node.y + node.dy + nodePadding - y0;
- if (dy > 0) node.y -= dy;
- y0 = node.y;
- }
- }
- });
- }
-
- function ascendingDepth(a, b) {
- return a.y - b.y;
- }
- }
-
- function computeLinkDepths() {
- nodes.forEach(function(node) {
- node.sourceLinks.sort(ascendingTargetDepth);
- node.targetLinks.sort(ascendingSourceDepth);
- });
- nodes.forEach(function(node) {
- var sy = 0, ty = 0;
- node.sourceLinks.forEach(function(link) {
- link.sy = sy;
- sy += link.dy;
- });
- node.targetLinks.forEach(function(link) {
- link.ty = ty;
- ty += link.dy;
- });
- });
-
- function ascendingSourceDepth(a, b) {
- return a.source.y - b.source.y;
- }
-
- function ascendingTargetDepth(a, b) {
- return a.target.y - b.target.y;
- }
- }
-
- function center(node) {
- return node.y + node.dy / 2;
- }
-
- function value(link) {
- return link.value;
- }
-
- return sankey;
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/tooltip.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/tooltip.js
deleted file mode 100644
index 46e5a816..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/tooltip.js
+++ /dev/null
@@ -1,490 +0,0 @@
-/* Tooltip rendering model for nvd3 charts.
-window.nv.models.tooltip is the updated,new way to render tooltips.
-
-window.nv.tooltip.show is the old tooltip code.
-window.nv.tooltip.* also has various helper methods.
-*/
-(function() {
- "use strict";
- window.nv.tooltip = {};
-
- /* Model which can be instantiated to handle tooltip rendering.
- Example usage:
- var tip = nv.models.tooltip().gravity('w').distance(23)
- .data(myDataObject);
-
- tip(); //just invoke the returned function to render tooltip.
- */
- window.nv.models.tooltip = function() {
- var content = null //HTML contents of the tooltip. If null, the content is generated via the data variable.
- , data = null /* Tooltip data. If data is given in the proper format, a consistent tooltip is generated.
- Format of data:
- {
- key: "Date",
- value: "August 2009",
- series: [
- {
- key: "Series 1",
- value: "Value 1",
- color: "#000"
- },
- {
- key: "Series 2",
- value: "Value 2",
- color: "#00f"
- }
- ]
-
- }
-
- */
- , gravity = 'w' //Can be 'n','s','e','w'. Determines how tooltip is positioned.
- , distance = 50 //Distance to offset tooltip from the mouse location.
- , snapDistance = 25 //Tolerance allowed before tooltip is moved from its current position (creates 'snapping' effect)
- , fixedTop = null //If not null, this fixes the top position of the tooltip.
- , classes = null //Attaches additional CSS classes to the tooltip DIV that is created.
- , chartContainer = null //Parent DIV, of the SVG Container that holds the chart.
- , tooltipElem = null //actual DOM element representing the tooltip.
- , position = {left: null, top: null} //Relative position of the tooltip inside chartContainer.
- , enabled = true //True -> tooltips are rendered. False -> don't render tooltips.
- //Generates a unique id when you create a new tooltip() object
- , id = "nvtooltip-" + Math.floor(Math.random() * 100000)
- ;
-
- //CSS class to specify whether element should not have mouse events.
- var nvPointerEventsClass = "nv-pointer-events-none";
-
- //Format function for the tooltip values column
- var valueFormatter = function(d,i) {
- return d;
- };
-
- //Format function for the tooltip header value.
- var headerFormatter = function(d) {
- return d;
- };
-
- //By default, the tooltip model renders a beautiful table inside a DIV.
- //You can override this function if a custom tooltip is desired.
- var contentGenerator = function(d) {
- if (content != null) return content;
-
- if (d == null) return '';
-
- var table = d3.select(document.createElement("table"));
- var theadEnter = table.selectAll("thead")
- .data([d])
- .enter().append("thead");
- theadEnter.append("tr")
- .append("td")
- .attr("colspan",3)
- .append("strong")
- .classed("x-value",true)
- .html(headerFormatter(d.value));
-
- var tbodyEnter = table.selectAll("tbody")
- .data([d])
- .enter().append("tbody");
- var trowEnter = tbodyEnter.selectAll("tr")
- .data(function(p) { return p.series})
- .enter()
- .append("tr")
- .classed("highlight", function(p) { return p.highlight})
- ;
-
- trowEnter.append("td")
- .classed("legend-color-guide",true)
- .append("div")
- .style("background-color", function(p) { return p.color});
- trowEnter.append("td")
- .classed("key",true)
- .html(function(p) {return p.key});
- trowEnter.append("td")
- .classed("value",true)
- .html(function(p,i) { return valueFormatter(p.value,i) });
-
-
- trowEnter.selectAll("td").each(function(p) {
- if (p.highlight) {
- var opacityScale = d3.scale.linear().domain([0,1]).range(["#fff",p.color]);
- var opacity = 0.6;
- d3.select(this)
- .style("border-bottom-color", opacityScale(opacity))
- .style("border-top-color", opacityScale(opacity))
- ;
- }
- });
-
- var html = table.node().outerHTML;
- if (d.footer !== undefined)
- html += "<div class='footer'>" + d.footer + "</div>";
- return html;
-
- };
-
- var dataSeriesExists = function(d) {
- if (d && d.series && d.series.length > 0) return true;
-
- return false;
- };
-
- //In situations where the chart is in a 'viewBox', re-position the tooltip based on how far chart is zoomed.
- function convertViewBoxRatio() {
- if (chartContainer) {
- var svg = d3.select(chartContainer);
- if (svg.node().tagName !== "svg") {
- svg = svg.select("svg");
- }
- var viewBox = (svg.node()) ? svg.attr('viewBox') : null;
- if (viewBox) {
- viewBox = viewBox.split(' ');
- var ratio = parseInt(svg.style('width')) / viewBox[2];
-
- position.left = position.left * ratio;
- position.top = position.top * ratio;
- }
- }
- }
-
- //Creates new tooltip container, or uses existing one on DOM.
- function getTooltipContainer(newContent) {
- var body;
- if (chartContainer)
- body = d3.select(chartContainer);
- else
- body = d3.select("body");
-
- var container = body.select(".nvtooltip");
- if (container.node() === null) {
- //Create new tooltip div if it doesn't exist on DOM.
- container = body.append("div")
- .attr("class", "nvtooltip " + (classes? classes: "xy-tooltip"))
- .attr("id",id)
- ;
- }
-
-
- container.node().innerHTML = newContent;
- container.style("top",0).style("left",0).style("opacity",0);
- container.selectAll("div, table, td, tr").classed(nvPointerEventsClass,true)
- container.classed(nvPointerEventsClass,true);
- return container.node();
- }
-
-
-
- //Draw the tooltip onto the DOM.
- function nvtooltip() {
- if (!enabled) return;
- if (!dataSeriesExists(data)) return;
-
- convertViewBoxRatio();
-
- var left = position.left;
- var top = (fixedTop != null) ? fixedTop : position.top;
- var container = getTooltipContainer(contentGenerator(data));
- tooltipElem = container;
- if (chartContainer) {
- var svgComp = chartContainer.getElementsByTagName("svg")[0];
- var boundRect = (svgComp) ? svgComp.getBoundingClientRect() : chartContainer.getBoundingClientRect();
- var svgOffset = {left:0,top:0};
- if (svgComp) {
- var svgBound = svgComp.getBoundingClientRect();
- var chartBound = chartContainer.getBoundingClientRect();
- var svgBoundTop = svgBound.top;
-
- //Defensive code. Sometimes, svgBoundTop can be a really negative
- // number, like -134254. That's a bug.
- // If such a number is found, use zero instead. FireFox bug only
- if (svgBoundTop < 0) {
- var containerBound = chartContainer.getBoundingClientRect();
- svgBoundTop = (Math.abs(svgBoundTop) > containerBound.height) ? 0 : svgBoundTop;
- }
- svgOffset.top = Math.abs(svgBoundTop - chartBound.top);
- svgOffset.left = Math.abs(svgBound.left - chartBound.left);
- }
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- //You need to also add any offset between the <svg> element and its containing <div>
- //Finally, add any offset of the containing <div> on the whole page.
- left += chartContainer.offsetLeft + svgOffset.left - 2*chartContainer.scrollLeft;
- top += chartContainer.offsetTop + svgOffset.top - 2*chartContainer.scrollTop;
- }
-
- if (snapDistance && snapDistance > 0) {
- top = Math.floor(top/snapDistance) * snapDistance;
- }
-
- nv.tooltip.calcTooltipPosition([left,top], gravity, distance, container);
- return nvtooltip;
- };
-
- nvtooltip.nvPointerEventsClass = nvPointerEventsClass;
-
- nvtooltip.content = function(_) {
- if (!arguments.length) return content;
- content = _;
- return nvtooltip;
- };
-
- //Returns tooltipElem...not able to set it.
- nvtooltip.tooltipElem = function() {
- return tooltipElem;
- };
-
- nvtooltip.contentGenerator = function(_) {
- if (!arguments.length) return contentGenerator;
- if (typeof _ === 'function') {
- contentGenerator = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.data = function(_) {
- if (!arguments.length) return data;
- data = _;
- return nvtooltip;
- };
-
- nvtooltip.gravity = function(_) {
- if (!arguments.length) return gravity;
- gravity = _;
- return nvtooltip;
- };
-
- nvtooltip.distance = function(_) {
- if (!arguments.length) return distance;
- distance = _;
- return nvtooltip;
- };
-
- nvtooltip.snapDistance = function(_) {
- if (!arguments.length) return snapDistance;
- snapDistance = _;
- return nvtooltip;
- };
-
- nvtooltip.classes = function(_) {
- if (!arguments.length) return classes;
- classes = _;
- return nvtooltip;
- };
-
- nvtooltip.chartContainer = function(_) {
- if (!arguments.length) return chartContainer;
- chartContainer = _;
- return nvtooltip;
- };
-
- nvtooltip.position = function(_) {
- if (!arguments.length) return position;
- position.left = (typeof _.left !== 'undefined') ? _.left : position.left;
- position.top = (typeof _.top !== 'undefined') ? _.top : position.top;
- return nvtooltip;
- };
-
- nvtooltip.fixedTop = function(_) {
- if (!arguments.length) return fixedTop;
- fixedTop = _;
- return nvtooltip;
- };
-
- nvtooltip.enabled = function(_) {
- if (!arguments.length) return enabled;
- enabled = _;
- return nvtooltip;
- };
-
- nvtooltip.valueFormatter = function(_) {
- if (!arguments.length) return valueFormatter;
- if (typeof _ === 'function') {
- valueFormatter = _;
- }
- return nvtooltip;
- };
-
- nvtooltip.headerFormatter = function(_) {
- if (!arguments.length) return headerFormatter;
- if (typeof _ === 'function') {
- headerFormatter = _;
- }
- return nvtooltip;
- };
-
- //id() is a read-only function. You can't use it to set the id.
- nvtooltip.id = function() {
- return id;
- };
-
-
- return nvtooltip;
- };
-
-
- //Original tooltip.show function. Kept for backward compatibility.
- // pos = [left,top]
- nv.tooltip.show = function(pos, content, gravity, dist, parentContainer, classes) {
-
- //Create new tooltip div if it doesn't exist on DOM.
- var container = document.createElement('div');
- container.className = 'nvtooltip ' + (classes ? classes : 'xy-tooltip');
-
- var body = parentContainer;
- if ( !parentContainer || parentContainer.tagName.match(/g|svg/i)) {
- //If the parent element is an SVG element, place tooltip in the <body> element.
- body = document.getElementsByTagName('body')[0];
- }
-
- container.style.left = 0;
- container.style.top = 0;
- container.style.opacity = 0;
- container.innerHTML = content;
- body.appendChild(container);
-
- //If the parent container is an overflow <div> with scrollbars, subtract the scroll offsets.
- if (parentContainer) {
- pos[0] = pos[0] - parentContainer.scrollLeft;
- pos[1] = pos[1] - parentContainer.scrollTop;
- }
- nv.tooltip.calcTooltipPosition(pos, gravity, dist, container);
- };
-
- //Looks up the ancestry of a DOM element, and returns the first NON-svg node.
- nv.tooltip.findFirstNonSVGParent = function(Elem) {
- while(Elem.tagName.match(/^g|svg$/i) !== null) {
- Elem = Elem.parentNode;
- }
- return Elem;
- };
-
- //Finds the total offsetTop of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetTop = function ( Elem, initialTop ) {
- var offsetTop = initialTop;
-
- do {
- if( !isNaN( Elem.offsetTop ) ) {
- offsetTop += (Elem.offsetTop);
- }
- } while( Elem = Elem.offsetParent );
- return offsetTop;
- };
-
- //Finds the total offsetLeft of a given DOM element.
- //Looks up the entire ancestry of an element, up to the first relatively positioned element.
- nv.tooltip.findTotalOffsetLeft = function ( Elem, initialLeft) {
- var offsetLeft = initialLeft;
-
- do {
- if( !isNaN( Elem.offsetLeft ) ) {
- offsetLeft += (Elem.offsetLeft);
- }
- } while( Elem = Elem.offsetParent );
- return offsetLeft;
- };
-
- //Global utility function to render a tooltip on the DOM.
- //pos = [left,top] coordinates of where to place the tooltip, relative to the SVG chart container.
- //gravity = how to orient the tooltip
- //dist = how far away from the mouse to place tooltip
- //container = tooltip DIV
- nv.tooltip.calcTooltipPosition = function(pos, gravity, dist, container) {
-
- var height = parseInt(container.offsetHeight),
- width = parseInt(container.offsetWidth),
- windowWidth = nv.utils.windowSize().width,
- windowHeight = nv.utils.windowSize().height,
- scrollTop = window.pageYOffset,
- scrollLeft = window.pageXOffset,
- left, top;
-
- windowHeight = window.innerWidth >= document.body.scrollWidth ? windowHeight : windowHeight - 16;
- windowWidth = window.innerHeight >= document.body.scrollHeight ? windowWidth : windowWidth - 16;
-
- gravity = gravity || 's';
- dist = dist || 20;
-
- var tooltipTop = function ( Elem ) {
- return nv.tooltip.findTotalOffsetTop(Elem, top);
- };
-
- var tooltipLeft = function ( Elem ) {
- return nv.tooltip.findTotalOffsetLeft(Elem,left);
- };
-
- switch (gravity) {
- case 'e':
- left = pos[0] - width - dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = pos[0] + dist > scrollLeft ? pos[0] + dist : scrollLeft - tLeft + left;
- if (tTop < scrollTop) top = scrollTop - tTop + top;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'w':
- left = pos[0] + dist;
- top = pos[1] - (height / 2);
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft + width > windowWidth) left = pos[0] - width - dist;
- if (tTop < scrollTop) top = scrollTop + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 'n':
- left = pos[0] - (width / 2) - 5;
- top = pos[1] + dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (tTop + height > scrollTop + windowHeight) top = scrollTop + windowHeight - tTop + top - height;
- break;
- case 's':
- left = pos[0] - (width / 2);
- top = pos[1] - height - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- if (tLeft < scrollLeft) left = scrollLeft + 5;
- if (tLeft + width > windowWidth) left = left - width/2 + 5;
- if (scrollTop > tTop) top = scrollTop;
- break;
- case 'none':
- left = pos[0];
- top = pos[1] - dist;
- var tLeft = tooltipLeft(container);
- var tTop = tooltipTop(container);
- break;
- }
-
-
- container.style.left = left+'px';
- container.style.top = top+'px';
- container.style.opacity = 1;
- container.style.position = 'absolute';
-
- return container;
- };
-
- //Global utility function to remove tooltips from the DOM.
- nv.tooltip.cleanup = function() {
-
- // Find the tooltips, mark them for removal by this class (so others cleanups won't find it)
- var tooltips = document.getElementsByClassName('nvtooltip');
- var purging = [];
- while(tooltips.length) {
- purging.push(tooltips[0]);
- tooltips[0].style.transitionDelay = '0 !important';
- tooltips[0].style.opacity = 0;
- tooltips[0].className = 'nvtooltip-pending-removal';
- }
-
- setTimeout(function() {
-
- while (purging.length) {
- var removeMe = purging.pop();
- removeMe.parentNode.removeChild(removeMe);
- }
- }, 500);
- };
-
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/utils.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/utils.js
deleted file mode 100644
index 7b99e1da..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/d3/js/utils.js
+++ /dev/null
@@ -1,152 +0,0 @@
-
-nv.utils.windowSize = function() {
- // Sane defaults
- var size = {width: 640, height: 480};
-
- // Earlier IE uses Doc.body
- if (document.body && document.body.offsetWidth) {
- size.width = document.body.offsetWidth;
- size.height = document.body.offsetHeight;
- }
-
- // IE can use depending on mode it is in
- if (document.compatMode=='CSS1Compat' &&
- document.documentElement &&
- document.documentElement.offsetWidth ) {
- size.width = document.documentElement.offsetWidth;
- size.height = document.documentElement.offsetHeight;
- }
-
- // Most recent browsers use
- if (window.innerWidth && window.innerHeight) {
- size.width = window.innerWidth;
- size.height = window.innerHeight;
- }
- return (size);
-};
-
-
-
-// Easy way to bind multiple functions to window.onresize
-// TODO: give a way to remove a function after its bound, other than removing all of them
-nv.utils.windowResize = function(fun){
- if (fun === undefined) return;
- var oldresize = window.onresize;
-
- window.onresize = function(e) {
- if (typeof oldresize == 'function') oldresize(e);
- fun(e);
- }
-}
-
-// Backwards compatible way to implement more d3-like coloring of graphs.
-// If passed an array, wrap it in a function which implements the old default
-// behavior
-nv.utils.getColor = function(color) {
- if (!arguments.length) return nv.utils.defaultColor(); //if you pass in nothing, get default colors back
-
- if( Object.prototype.toString.call( color ) === '[object Array]' )
- return function(d, i) { return d.color || color[i % color.length]; };
- else
- return color;
- //can't really help it if someone passes rubbish as color
-}
-
-// Default color chooser uses the index of an object as before.
-nv.utils.defaultColor = function() {
- var colors = d3.scale.category20().range();
- return function(d, i) { return d.color || colors[i % colors.length] };
-}
-
-
-// Returns a color function that takes the result of 'getKey' for each series and
-// looks for a corresponding color from the dictionary,
-nv.utils.customTheme = function(dictionary, getKey, defaultColors) {
- getKey = getKey || function(series) { return series.key }; // use default series.key if getKey is undefined
- defaultColors = defaultColors || d3.scale.category20().range(); //default color function
-
- var defIndex = defaultColors.length; //current default color (going in reverse)
-
- return function(series, index) {
- var key = getKey(series);
-
- if (!defIndex) defIndex = defaultColors.length; //used all the default colors, start over
-
- if (typeof dictionary[key] !== "undefined")
- return (typeof dictionary[key] === "function") ? dictionary[key]() : dictionary[key];
- else
- return defaultColors[--defIndex]; // no match in dictionary, use default color
- }
-}
-
-
-
-// From the PJAX example on d3js.org, while this is not really directly needed
-// it's a very cool method for doing pjax, I may expand upon it a little bit,
-// open to suggestions on anything that may be useful
-nv.utils.pjax = function(links, content) {
- d3.selectAll(links).on("click", function() {
- history.pushState(this.href, this.textContent, this.href);
- load(this.href);
- d3.event.preventDefault();
- });
-
- function load(href) {
- d3.html(href, function(fragment) {
- var target = d3.select(content).node();
- target.parentNode.replaceChild(d3.select(fragment).select(content).node(), target);
- nv.utils.pjax(links, content);
- });
- }
-
- d3.select(window).on("popstate", function() {
- if (d3.event.state) load(d3.event.state);
- });
-}
-
-/* For situations where we want to approximate the width in pixels for an SVG:text element.
-Most common instance is when the element is in a display:none; container.
-Forumla is : text.length * font-size * constant_factor
-*/
-nv.utils.calcApproxTextWidth = function (svgTextElem) {
- if (svgTextElem instanceof d3.selection) {
- var fontSize = parseInt(svgTextElem.style("font-size").replace("px",""));
- var textLength = svgTextElem.text().length;
-
- return textLength * fontSize * 0.5;
- }
- return 0;
-};
-
-/* Numbers that are undefined, null or NaN, convert them to zeros.
-*/
-nv.utils.NaNtoZero = function(n) {
- if (typeof n !== 'number'
- || isNaN(n)
- || n === null
- || n === Infinity) return 0;
-
- return n;
-};
-
-/*
-Snippet of code you can insert into each nv.models.* to give you the ability to
-do things like:
-chart.options({
- showXAxis: true,
- tooltips: true
-});
-
-To enable in the chart:
-chart.options = nv.utils.optionsFunc.bind(chart);
-*/
-nv.utils.optionsFunc = function(args) {
- if (args) {
- d3.map(args).forEach((function(key,value) {
- if (typeof this[key] === "function") {
- this[key](value);
- }
- }).bind(this));
- }
- return this;
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dashed-canvas.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dashed-canvas.js
deleted file mode 100644
index cec77298..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dashed-canvas.js
+++ /dev/null
@@ -1,176 +0,0 @@
-/**
- * @license
- * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview Adds support for dashed lines to the HTML5 canvas.
- *
- * Usage:
- * var ctx = canvas.getContext("2d");
- * ctx.installPattern([10, 5]) // draw 10 pixels, skip 5 pixels, repeat.
- * ctx.beginPath();
- * ctx.moveTo(100, 100); // start the first line segment.
- * ctx.lineTo(150, 200);
- * ctx.lineTo(200, 100);
- * ctx.moveTo(300, 150); // start a second, unconnected line
- * ctx.lineTo(400, 250);
- * ...
- * ctx.stroke(); // draw the dashed line.
- * ctx.uninstallPattern();
- *
- * This is designed to leave the canvas untouched when it's not used.
- * If you never install a pattern, or call uninstallPattern(), then the canvas
- * will be exactly as it would have if you'd never used this library. The only
- * difference from the standard canvas will be the "installPattern" method of
- * the drawing context.
- */
-
-/**
- * Change the stroking style of the canvas drawing context from a solid line to
- * a pattern (e.g. dashes, dash-dot-dash, etc.)
- *
- * Once you've installed the pattern, you can draw with it by using the
- * beginPath(), moveTo(), lineTo() and stroke() method calls. Note that some
- * more advanced methods (e.g. quadraticCurveTo() and bezierCurveTo()) are not
- * supported. See file overview for a working example.
- *
- * Side effects of calling this method include adding an "isPatternInstalled"
- * property and "uninstallPattern" method to this particular canvas context.
- * You must call uninstallPattern() before calling installPattern() again.
- *
- * @param {Array.<number>} pattern A description of the stroke pattern. Even
- * indices indicate a draw and odd indices indicate a gap (in pixels). The
- * array should have a even length as any odd lengthed array could be expressed
- * as a smaller even length array.
- */
-CanvasRenderingContext2D.prototype.installPattern = function(pattern) {
- "use strict";
-
- if (typeof(this.isPatternInstalled) !== 'undefined') {
- throw "Must un-install old line pattern before installing a new one.";
- }
- this.isPatternInstalled = true;
-
- var dashedLineToHistory = [0, 0];
-
- // list of connected line segements:
- // [ [x1, y1], ..., [xn, yn] ], [ [x1, y1], ..., [xn, yn] ]
- var segments = [];
-
- // Stash away copies of the unmodified line-drawing functions.
- var realBeginPath = this.beginPath;
- var realLineTo = this.lineTo;
- var realMoveTo = this.moveTo;
- var realStroke = this.stroke;
-
- /** @type {function()|undefined} */
- this.uninstallPattern = function() {
- this.beginPath = realBeginPath;
- this.lineTo = realLineTo;
- this.moveTo = realMoveTo;
- this.stroke = realStroke;
- this.uninstallPattern = undefined;
- this.isPatternInstalled = undefined;
- };
-
- // Keep our own copies of the line segments as they're drawn.
- this.beginPath = function() {
- segments = [];
- realBeginPath.call(this);
- };
- this.moveTo = function(x, y) {
- segments.push([[x, y]]);
- realMoveTo.call(this, x, y);
- };
- this.lineTo = function(x, y) {
- var last = segments[segments.length - 1];
- last.push([x, y]);
- };
-
- this.stroke = function() {
- if (segments.length === 0) {
- // Maybe the user is drawing something other than a line.
- // TODO(danvk): test this case.
- realStroke.call(this);
- return;
- }
-
- for (var i = 0; i < segments.length; i++) {
- var seg = segments[i];
- var x1 = seg[0][0], y1 = seg[0][1];
- for (var j = 1; j < seg.length; j++) {
- // Draw a dashed line from (x1, y1) - (x2, y2)
- var x2 = seg[j][0], y2 = seg[j][1];
- this.save();
-
- // Calculate transformation parameters
- var dx = (x2-x1);
- var dy = (y2-y1);
- var len = Math.sqrt(dx*dx + dy*dy);
- var rot = Math.atan2(dy, dx);
-
- // Set transformation
- this.translate(x1, y1);
- realMoveTo.call(this, 0, 0);
- this.rotate(rot);
-
- // Set last pattern index we used for this pattern.
- var patternIndex = dashedLineToHistory[0];
- var x = 0;
- while (len > x) {
- // Get the length of the pattern segment we are dealing with.
- var segment = pattern[patternIndex];
- // If our last draw didn't complete the pattern segment all the way
- // we will try to finish it. Otherwise we will try to do the whole
- // segment.
- if (dashedLineToHistory[1]) {
- x += dashedLineToHistory[1];
- } else {
- x += segment;
- }
-
- if (x > len) {
- // We were unable to complete this pattern index all the way, keep
- // where we are the history so our next draw continues where we
- // left off in the pattern.
- dashedLineToHistory = [patternIndex, x-len];
- x = len;
- } else {
- // We completed this patternIndex, we put in the history that we
- // are on the beginning of the next segment.
- dashedLineToHistory = [(patternIndex+1)%pattern.length, 0];
- }
-
- // We do a line on a even pattern index and just move on a odd
- // pattern index. The move is the empty space in the dash.
- if (patternIndex % 2 === 0) {
- realLineTo.call(this, x, 0);
- } else {
- realMoveTo.call(this, x, 0);
- }
-
- // If we are not done, next loop process the next pattern segment, or
- // the first segment again if we are at the end of the pattern.
- patternIndex = (patternIndex+1) % pattern.length;
- }
-
- this.restore();
- x1 = x2, y1 = y2;
- }
- }
- realStroke.call(this);
- segments = [];
- };
-};
-
-/**
- * Removes the previously-installed pattern.
- * You must call installPattern() before calling this. You can install at most
- * one pattern at a time--there is no pattern stack.
- */
-CanvasRenderingContext2D.prototype.uninstallPattern = function() {
- // This will be replaced by a non-error version when a pattern is installed.
- throw "Must install a line pattern before uninstalling it.";
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/data.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/data.js
deleted file mode 100644
index d92a6339..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/data.js
+++ /dev/null
@@ -1,63 +0,0 @@
-function StubbedData() {
-return "" +
-"Date,A,B\n" +
-"20061001,3.01953818828,0.7212041046,2.18487394958,0.599318549691\n" +
-"20061002,3.63321799308,0.778297234566,1.69491525424,0.531417655826\n" +
-"20061003,2.44328097731,0.644967734352,2.51256281407,0.640539070386\n" +
-"20061004,3.52733686067,0.774700921683,2.68456375839,0.66207105053\n" +
-"20061005,3.28719723183,0.741636245748,2.35294117647,0.621407707226\n" +
-"20061006,1.58450704225,0.523967868159,3.78657487091,0.791868460623\n" +
-"20061007,5.32859680284,0.946589405904,4.0404040404,0.807910739509\n" +
-"20061008,2.64084507042,0.672799548916,2.37288135593,0.626609885481\n" +
-"20061009,2.26480836237,0.620990945917,3.5413153457,0.75897176848\n" +
-"20061010,3.29289428076,0.74289969528,2.02702702703,0.579191340004\n" +
-"20061011,2.7633851468,0.681234043829,1.1744966443,0.4413034044\n" +
-"20061012,3.28719723183,0.741636245748,3.37268128162,0.741327769578\n" +
-"20061013,1.77304964539,0.55569466381,1.85810810811,0.555011329732\n" +
-"20061014,3.39892665474,0.7664008338,1.67224080268,0.524368852929\n" +
-"20061015,2.65017667845,0.675144574777,3.35570469799,0.737661045752\n" +
-"20061016,3.63951473137,0.779620631266,2.34899328859,0.620377617453\n" +
-"20061017,2.25694444444,0.618859623032,1.68067226891,0.526990133716\n" +
-"20061018,4.47504302926,0.857766274964,2.51677852349,0.641599927369\n" +
-"20061019,2.44755244755,0.646081155692,1.68067226891,0.526990133716\n" +
-"20061020,3.67775831874,0.787656442774,3.066439523,0.711598843969\n" +
-"20061021,3.94265232975,0.823839169829,3.85906040268,0.788990618726\n" +
-"20061022,2.59067357513,0.660187558973,3.71621621622,0.777438794254\n" +
-"20061023,4.33275563258,0.847570482324,3.85906040268,0.788990618726\n" +
-"20061024,3.10344827586,0.720049610821,2.84280936455,0.679611549697\n" +
-"20061025,1.40350877193,0.492720767725,2.7027027027,0.666482380968\n" +
-"20061026,1.95035460993,0.582291234145,2.36486486486,0.624518599275\n" +
-"20061027,2.30905861456,0.632980642182,2.03045685279,0.580161203819\n" +
-"20061028,4.09252669039,0.835706590809,2.87648054146,0.68754192469\n" +
-"20061029,2.66903914591,0.679883997626,2.02360876897,0.578224712918\n" +
-"20061030,4.74516695958,0.89127787497,4.36241610738,0.836670992529\n" +
-"20061031,2.78260869565,0.685905251933,3.20945945946,0.724388507178\n" +
-"20061101,1.5873015873,0.524884521441,1.51260504202,0.500373860545\n" +
-"20061102,2.78745644599,0.687083077461,2.0202020202,0.57726130639\n" +
-"20061103,5.11463844797,0.925157232782,2.68907563025,0.663168401088\n" +
-"20061104,4.9001814882,0.919644816432,3.07692307692,0.713993047527\n" +
-"20061105,5.13274336283,0.928343545136,3.55329949239,0.761492892041\n" +
-"20061106,1.92644483363,0.575222935029,2.35294117647,0.621407707226\n" +
-"20061107,2.46478873239,0.650573541306,1.52027027027,0.502889967904\n" +
-"20061108,2.13523131673,0.609772022763,2.6981450253,0.665374048085\n" +
-"20061109,3.88007054674,0.811026422222,2.72572402044,0.672079879106\n" +
-"20061110,2.63620386643,0.671633132526,3.71621621622,0.777438794254\n" +
-"20061111,3.69718309859,0.791736755355,3.0303030303,0.703344064467\n" +
-"20061112,3.83944153578,0.802703592906,4.05405405405,0.81058250986\n" +
-"20061113,2.47787610619,0.653984033555,2.20338983051,0.604340313133\n" +
-"20061114,1.77304964539,0.55569466381,2.22222222222,0.60944692682\n" +
-"20061115,2.30088495575,0.630766388737,0.843170320405,0.375484163785\n" +
-"20061116,1.57894736842,0.522144132232,2.19594594595,0.602321544724\n" +
-"20061118,2.45183887916,0.647198426991,1.69491525424,0.531417655826\n" +
-"20061119,3.52733686067,0.774700921683,1.85185185185,0.55316023504\n" +
-"20061120,2.97723292469,0.711254751484,2.6981450253,0.665374048085\n" +
-"20061121,2.29681978799,0.629665059963,2.01680672269,0.576301104352\n" +
-"20061122,3.01418439716,0.719945245328,2.5466893039,0.649125445325\n" +
-"20061123,3.78378378378,0.809917534069,2.6936026936,0.664269394219\n" +
-"20061124,3.18584070796,0.738851643987,2.01005025126,0.57439025002\n" +
-"20061125,2.83185840708,0.697868332879,3.066439523,0.711598843969\n" +
-"20061126,3.01953818828,0.7212041046,2.53378378378,0.645878720149\n" +
-"20061127,2.81195079086,0.693033387099,1.51006711409,0.499540743312\n" +
-"20061128,2.97723292469,0.711254751484,2.54237288136,0.648039583782\n" +
-"20061129,1.41093474427,0.495309102312,3.02013422819,0.701020603129";
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-canvas.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-canvas.js
deleted file mode 100644
index cba4f449..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-canvas.js
+++ /dev/null
@@ -1,816 +0,0 @@
-/**
- * @license
- * Copyright 2006 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview Based on PlotKit.CanvasRenderer, but modified to meet the
- * needs of dygraphs.
- *
- * In particular, support for:
- * - grid overlays
- * - error bars
- * - dygraphs attribute system
- */
-
-/**
- * The DygraphCanvasRenderer class does the actual rendering of the chart onto
- * a canvas. It's based on PlotKit.CanvasRenderer.
- * @param {Object} element The canvas to attach to
- * @param {Object} elementContext The 2d context of the canvas (injected so it
- * can be mocked for testing.)
- * @param {Layout} layout The DygraphLayout object for this graph.
- * @constructor
- */
-
-/*jshint globalstrict: true */
-/*global Dygraph:false,RGBColorParser:false */
-"use strict";
-
-
-/**
- * @constructor
- *
- * This gets called when there are "new points" to chart. This is generally the
- * case when the underlying data being charted has changed. It is _not_ called
- * in the common case that the user has zoomed or is panning the view.
- *
- * The chart canvas has already been created by the Dygraph object. The
- * renderer simply gets a drawing context.
- *
- * @param {Dygraph} dygraph The chart to which this renderer belongs.
- * @param {HTMLCanvasElement} element The &lt;canvas&gt; DOM element on which to draw.
- * @param {CanvasRenderingContext2D} elementContext The drawing context.
- * @param {DygraphLayout} layout The chart's DygraphLayout object.
- *
- * TODO(danvk): remove the elementContext property.
- */
-var DygraphCanvasRenderer = function(dygraph, element, elementContext, layout) {
- this.dygraph_ = dygraph;
-
- this.layout = layout;
- this.element = element;
- this.elementContext = elementContext;
- this.container = this.element.parentNode;
-
- this.height = this.element.height;
- this.width = this.element.width;
-
- // --- check whether everything is ok before we return
- // NOTE(konigsberg): isIE is never defined in this object. Bug of some sort.
- if (!this.isIE && !(DygraphCanvasRenderer.isSupported(this.element)))
- throw "Canvas is not supported.";
-
- // internal state
- this.area = layout.getPlotArea();
- this.container.style.position = "relative";
- this.container.style.width = this.width + "px";
-
- // Set up a clipping area for the canvas (and the interaction canvas).
- // This ensures that we don't overdraw.
- if (this.dygraph_.isUsingExcanvas_) {
- this._createIEClipArea();
- } else {
- // on Android 3 and 4, setting a clipping area on a canvas prevents it from
- // displaying anything.
- if (!Dygraph.isAndroid()) {
- var ctx = this.dygraph_.canvas_ctx_;
- ctx.beginPath();
- ctx.rect(this.area.x, this.area.y, this.area.w, this.area.h);
- ctx.clip();
-
- ctx = this.dygraph_.hidden_ctx_;
- ctx.beginPath();
- ctx.rect(this.area.x, this.area.y, this.area.w, this.area.h);
- ctx.clip();
- }
- }
-};
-
-/**
- * This just forwards to dygraph.attr_.
- * TODO(danvk): remove this?
- * @private
- */
-DygraphCanvasRenderer.prototype.attr_ = function(name, opt_seriesName) {
- return this.dygraph_.attr_(name, opt_seriesName);
-};
-
-/**
- * Clears out all chart content and DOM elements.
- * This is called immediately before render() on every frame, including
- * during zooms and pans.
- * @private
- */
-DygraphCanvasRenderer.prototype.clear = function() {
- var context;
- if (this.isIE) {
- // VML takes a while to start up, so we just poll every this.IEDelay
- try {
- if (this.clearDelay) {
- this.clearDelay.cancel();
- this.clearDelay = null;
- }
- context = this.elementContext;
- }
- catch (e) {
- // TODO(danvk): this is broken, since MochiKit.Async is gone.
- // this.clearDelay = MochiKit.Async.wait(this.IEDelay);
- // this.clearDelay.addCallback(bind(this.clear, this));
- return;
- }
- }
-
- context = this.elementContext;
- context.clearRect(0, 0, this.width, this.height);
-};
-
-/**
- * Checks whether the browser supports the &lt;canvas&gt; tag.
- * @private
- */
-DygraphCanvasRenderer.isSupported = function(canvasName) {
- var canvas = null;
- try {
- if (typeof(canvasName) == 'undefined' || canvasName === null) {
- canvas = document.createElement("canvas");
- } else {
- canvas = canvasName;
- }
- canvas.getContext("2d");
- }
- catch (e) {
- var ie = navigator.appVersion.match(/MSIE (\d\.\d)/);
- var opera = (navigator.userAgent.toLowerCase().indexOf("opera") != -1);
- if ((!ie) || (ie[1] < 6) || (opera))
- return false;
- return true;
- }
- return true;
-};
-
-/**
- * This method is responsible for drawing everything on the chart, including
- * lines, error bars, fills and axes.
- * It is called immediately after clear() on every frame, including during pans
- * and zooms.
- * @private
- */
-DygraphCanvasRenderer.prototype.render = function() {
- // attaches point.canvas{x,y}
- this._updatePoints();
-
- // actually draws the chart.
- this._renderLineChart();
-};
-
-DygraphCanvasRenderer.prototype._createIEClipArea = function() {
- var className = 'dygraph-clip-div';
- var graphDiv = this.dygraph_.graphDiv;
-
- // Remove old clip divs.
- for (var i = graphDiv.childNodes.length-1; i >= 0; i--) {
- if (graphDiv.childNodes[i].className == className) {
- graphDiv.removeChild(graphDiv.childNodes[i]);
- }
- }
-
- // Determine background color to give clip divs.
- var backgroundColor = document.bgColor;
- var element = this.dygraph_.graphDiv;
- while (element != document) {
- var bgcolor = element.currentStyle.backgroundColor;
- if (bgcolor && bgcolor != 'transparent') {
- backgroundColor = bgcolor;
- break;
- }
- element = element.parentNode;
- }
-
- function createClipDiv(area) {
- if (area.w === 0 || area.h === 0) {
- return;
- }
- var elem = document.createElement('div');
- elem.className = className;
- elem.style.backgroundColor = backgroundColor;
- elem.style.position = 'absolute';
- elem.style.left = area.x + 'px';
- elem.style.top = area.y + 'px';
- elem.style.width = area.w + 'px';
- elem.style.height = area.h + 'px';
- graphDiv.appendChild(elem);
- }
-
- var plotArea = this.area;
- // Left side
- createClipDiv({
- x:0, y:0,
- w:plotArea.x,
- h:this.height
- });
-
- // Top
- createClipDiv({
- x: plotArea.x, y: 0,
- w: this.width - plotArea.x,
- h: plotArea.y
- });
-
- // Right side
- createClipDiv({
- x: plotArea.x + plotArea.w, y: 0,
- w: this.width-plotArea.x - plotArea.w,
- h: this.height
- });
-
- // Bottom
- createClipDiv({
- x: plotArea.x,
- y: plotArea.y + plotArea.h,
- w: this.width - plotArea.x,
- h: this.height - plotArea.h - plotArea.y
- });
-};
-
-
-/**
- * Returns a predicate to be used with an iterator, which will
- * iterate over points appropriately, depending on whether
- * connectSeparatedPoints is true. When it's false, the predicate will
- * skip over points with missing yVals.
- */
-DygraphCanvasRenderer._getIteratorPredicate = function(connectSeparatedPoints) {
- return connectSeparatedPoints ?
- DygraphCanvasRenderer._predicateThatSkipsEmptyPoints :
- null;
-};
-
-DygraphCanvasRenderer._predicateThatSkipsEmptyPoints =
- function(array, idx) {
- return array[idx].yval !== null;
-};
-
-/**
- * Draws a line with the styles passed in and calls all the drawPointCallbacks.
- * @param {Object} e The dictionary passed to the plotter function.
- * @private
- */
-DygraphCanvasRenderer._drawStyledLine = function(e,
- color, strokeWidth, strokePattern, drawPoints,
- drawPointCallback, pointSize) {
- var g = e.dygraph;
- // TODO(konigsberg): Compute attributes outside this method call.
- var stepPlot = g.getOption("stepPlot", e.setName);
-
- if (!Dygraph.isArrayLike(strokePattern)) {
- strokePattern = null;
- }
-
- var drawGapPoints = g.getOption('drawGapEdgePoints', e.setName);
-
- var points = e.points;
- var iter = Dygraph.createIterator(points, 0, points.length,
- DygraphCanvasRenderer._getIteratorPredicate(
- g.getOption("connectSeparatedPoints"))); // TODO(danvk): per-series?
-
- var stroking = strokePattern && (strokePattern.length >= 2);
-
- var ctx = e.drawingContext;
- ctx.save();
- if (stroking) {
- ctx.installPattern(strokePattern);
- }
-
- var pointsOnLine = DygraphCanvasRenderer._drawSeries(
- e, iter, strokeWidth, pointSize, drawPoints, drawGapPoints, stepPlot, color);
- DygraphCanvasRenderer._drawPointsOnLine(
- e, pointsOnLine, drawPointCallback, color, pointSize);
-
- if (stroking) {
- ctx.uninstallPattern();
- }
-
- ctx.restore();
-};
-
-/**
- * This does the actual drawing of lines on the canvas, for just one series.
- * Returns a list of [canvasx, canvasy] pairs for points for which a
- * drawPointCallback should be fired. These include isolated points, or all
- * points if drawPoints=true.
- * @param {Object} e The dictionary passed to the plotter function.
- * @private
- */
-DygraphCanvasRenderer._drawSeries = function(e,
- iter, strokeWidth, pointSize, drawPoints, drawGapPoints, stepPlot, color) {
-
- var prevCanvasX = null;
- var prevCanvasY = null;
- var nextCanvasY = null;
- var isIsolated; // true if this point is isolated (no line segments)
- var point; // the point being processed in the while loop
- var pointsOnLine = []; // Array of [canvasx, canvasy] pairs.
- var first = true; // the first cycle through the while loop
-
- var ctx = e.drawingContext;
- ctx.beginPath();
- ctx.strokeStyle = color;
- ctx.lineWidth = strokeWidth;
-
- // NOTE: we break the iterator's encapsulation here for about a 25% speedup.
- var arr = iter.array_;
- var limit = iter.end_;
- var predicate = iter.predicate_;
-
- for (var i = iter.start_; i < limit; i++) {
- point = arr[i];
- if (predicate) {
- while (i < limit && !predicate(arr, i)) {
- i++;
- }
- if (i == limit) break;
- point = arr[i];
- }
-
- if (point.canvasy === null || point.canvasy != point.canvasy) {
- if (stepPlot && prevCanvasX !== null) {
- // Draw a horizontal line to the start of the missing data
- ctx.moveTo(prevCanvasX, prevCanvasY);
- ctx.lineTo(point.canvasx, prevCanvasY);
- }
- prevCanvasX = prevCanvasY = null;
- } else {
- isIsolated = false;
- if (drawGapPoints || !prevCanvasX) {
- iter.nextIdx_ = i;
- iter.next();
- nextCanvasY = iter.hasNext ? iter.peek.canvasy : null;
-
- var isNextCanvasYNullOrNaN = nextCanvasY === null ||
- nextCanvasY != nextCanvasY;
- isIsolated = (!prevCanvasX && isNextCanvasYNullOrNaN);
- if (drawGapPoints) {
- // Also consider a point to be "isolated" if it's adjacent to a
- // null point, excluding the graph edges.
- if ((!first && !prevCanvasX) ||
- (iter.hasNext && isNextCanvasYNullOrNaN)) {
- isIsolated = true;
- }
- }
- }
-
- if (prevCanvasX !== null) {
- if (strokeWidth) {
- if (stepPlot) {
- ctx.moveTo(prevCanvasX, prevCanvasY);
- ctx.lineTo(point.canvasx, prevCanvasY);
- }
-
- ctx.lineTo(point.canvasx, point.canvasy);
- }
- } else {
- ctx.moveTo(point.canvasx, point.canvasy);
- }
- if (drawPoints || isIsolated) {
- pointsOnLine.push([point.canvasx, point.canvasy, point.idx]);
- }
- prevCanvasX = point.canvasx;
- prevCanvasY = point.canvasy;
- }
- first = false;
- }
- ctx.stroke();
- return pointsOnLine;
-};
-
-/**
- * This fires the drawPointCallback functions, which draw dots on the points by
- * default. This gets used when the "drawPoints" option is set, or when there
- * are isolated points.
- * @param {Object} e The dictionary passed to the plotter function.
- * @private
- */
-DygraphCanvasRenderer._drawPointsOnLine = function(
- e, pointsOnLine, drawPointCallback, color, pointSize) {
- var ctx = e.drawingContext;
- for (var idx = 0; idx < pointsOnLine.length; idx++) {
- var cb = pointsOnLine[idx];
- ctx.save();
- drawPointCallback(
- e.dygraph, e.setName, ctx, cb[0], cb[1], color, pointSize, cb[2]);
- ctx.restore();
- }
-};
-
-/**
- * Attaches canvas coordinates to the points array.
- * @private
- */
-DygraphCanvasRenderer.prototype._updatePoints = function() {
- // Update Points
- // TODO(danvk): here
- //
- // TODO(bhs): this loop is a hot-spot for high-point-count charts. These
- // transformations can be pushed into the canvas via linear transformation
- // matrices.
- // NOTE(danvk): this is trickier than it sounds at first. The transformation
- // needs to be done before the .moveTo() and .lineTo() calls, but must be
- // undone before the .stroke() call to ensure that the stroke width is
- // unaffected. An alternative is to reduce the stroke width in the
- // transformed coordinate space, but you can't specify different values for
- // each dimension (as you can with .scale()). The speedup here is ~12%.
- var sets = this.layout.points;
- for (var i = sets.length; i--;) {
- var points = sets[i];
- for (var j = points.length; j--;) {
- var point = points[j];
- point.canvasx = this.area.w * point.x + this.area.x;
- point.canvasy = this.area.h * point.y + this.area.y;
- }
- }
-};
-
-/**
- * Add canvas Actually draw the lines chart, including error bars.
- *
- * This function can only be called if DygraphLayout's points array has been
- * updated with canvas{x,y} attributes, i.e. by
- * DygraphCanvasRenderer._updatePoints.
- *
- * @param {string=} opt_seriesName when specified, only that series will
- * be drawn. (This is used for expedited redrawing with highlightSeriesOpts)
- * @param {CanvasRenderingContext2D} opt_ctx when specified, the drawing
- * context. However, lines are typically drawn on the object's
- * elementContext.
- * @private
- */
-DygraphCanvasRenderer.prototype._renderLineChart = function(opt_seriesName, opt_ctx) {
- var ctx = opt_ctx || this.elementContext;
- var i;
-
- var sets = this.layout.points;
- var setNames = this.layout.setNames;
- var setName;
-
- this.colors = this.dygraph_.colorsMap_;
-
- // Determine which series have specialized plotters.
- var plotter_attr = this.attr_("plotter");
- var plotters = plotter_attr;
- if (!Dygraph.isArrayLike(plotters)) {
- plotters = [plotters];
- }
-
- var setPlotters = {}; // series name -> plotter fn.
- for (i = 0; i < setNames.length; i++) {
- setName = setNames[i];
- var setPlotter = this.attr_("plotter", setName);
- if (setPlotter == plotter_attr) continue; // not specialized.
-
- setPlotters[setName] = setPlotter;
- }
-
- for (i = 0; i < plotters.length; i++) {
- var plotter = plotters[i];
- var is_last = (i == plotters.length - 1);
-
- for (var j = 0; j < sets.length; j++) {
- setName = setNames[j];
- if (opt_seriesName && setName != opt_seriesName) continue;
-
- var points = sets[j];
-
- // Only throw in the specialized plotters on the last iteration.
- var p = plotter;
- if (setName in setPlotters) {
- if (is_last) {
- p = setPlotters[setName];
- } else {
- // Don't use the standard plotters in this case.
- continue;
- }
- }
-
- var color = this.colors[setName];
- var strokeWidth = this.dygraph_.getOption("strokeWidth", setName);
-
- ctx.save();
- ctx.strokeStyle = color;
- ctx.lineWidth = strokeWidth;
- p({
- points: points,
- setName: setName,
- drawingContext: ctx,
- color: color,
- strokeWidth: strokeWidth,
- dygraph: this.dygraph_,
- axis: this.dygraph_.axisPropertiesForSeries(setName),
- plotArea: this.area,
- seriesIndex: j,
- seriesCount: sets.length,
- singleSeriesName: opt_seriesName,
- allSeriesPoints: sets
- });
- ctx.restore();
- }
- }
-};
-
-/**
- * Standard plotters. These may be used by clients via Dygraph.Plotters.
- * See comments there for more details.
- */
-DygraphCanvasRenderer._Plotters = {
- linePlotter: function(e) {
- DygraphCanvasRenderer._linePlotter(e);
- },
-
- fillPlotter: function(e) {
- DygraphCanvasRenderer._fillPlotter(e);
- },
-
- errorPlotter: function(e) {
- DygraphCanvasRenderer._errorPlotter(e);
- }
-};
-
-/**
- * Plotter which draws the central lines for a series.
- * @private
- */
-DygraphCanvasRenderer._linePlotter = function(e) {
- var g = e.dygraph;
- var setName = e.setName;
- var strokeWidth = e.strokeWidth;
-
- // TODO(danvk): Check if there's any performance impact of just calling
- // getOption() inside of _drawStyledLine. Passing in so many parameters makes
- // this code a bit nasty.
- var borderWidth = g.getOption("strokeBorderWidth", setName);
- var drawPointCallback = g.getOption("drawPointCallback", setName) ||
- Dygraph.Circles.DEFAULT;
- var strokePattern = g.getOption("strokePattern", setName);
- var drawPoints = g.getOption("drawPoints", setName);
- var pointSize = g.getOption("pointSize", setName);
-
- if (borderWidth && strokeWidth) {
- DygraphCanvasRenderer._drawStyledLine(e,
- g.getOption("strokeBorderColor", setName),
- strokeWidth + 2 * borderWidth,
- strokePattern,
- drawPoints,
- drawPointCallback,
- pointSize
- );
- }
-
- DygraphCanvasRenderer._drawStyledLine(e,
- e.color,
- strokeWidth,
- strokePattern,
- drawPoints,
- drawPointCallback,
- pointSize
- );
-};
-
-/**
- * Draws the shaded error bars/confidence intervals for each series.
- * This happens before the center lines are drawn, since the center lines
- * need to be drawn on top of the error bars for all series.
- * @private
- */
-DygraphCanvasRenderer._errorPlotter = function(e) {
- var g = e.dygraph;
- var setName = e.setName;
- var errorBars = g.getOption("errorBars") || g.getOption("customBars");
- if (!errorBars) return;
-
- var fillGraph = g.getOption("fillGraph", setName);
- if (fillGraph) {
- g.warn("Can't use fillGraph option with error bars");
- }
-
- var ctx = e.drawingContext;
- var color = e.color;
- var fillAlpha = g.getOption('fillAlpha', setName);
- var stepPlot = g.getOption("stepPlot", setName);
- var points = e.points;
-
- var iter = Dygraph.createIterator(points, 0, points.length,
- DygraphCanvasRenderer._getIteratorPredicate(
- g.getOption("connectSeparatedPoints")));
-
- var newYs;
-
- // setup graphics context
- var prevX = NaN;
- var prevY = NaN;
- var prevYs = [-1, -1];
- // should be same color as the lines but only 15% opaque.
- var rgb = new RGBColorParser(color);
- var err_color =
- 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + fillAlpha + ')';
- ctx.fillStyle = err_color;
- ctx.beginPath();
-
- var isNullUndefinedOrNaN = function(x) {
- return (x === null ||
- x === undefined ||
- isNaN(x));
- };
-
- while (iter.hasNext) {
- var point = iter.next();
- if ((!stepPlot && isNullUndefinedOrNaN(point.y)) ||
- (stepPlot && !isNaN(prevY) && isNullUndefinedOrNaN(prevY))) {
- prevX = NaN;
- continue;
- }
-
- if (stepPlot) {
- newYs = [ point.y_bottom, point.y_top ];
- prevY = point.y;
- } else {
- newYs = [ point.y_bottom, point.y_top ];
- }
- newYs[0] = e.plotArea.h * newYs[0] + e.plotArea.y;
- newYs[1] = e.plotArea.h * newYs[1] + e.plotArea.y;
- if (!isNaN(prevX)) {
- if (stepPlot) {
- ctx.moveTo(prevX, prevYs[0]);
- ctx.lineTo(point.canvasx, prevYs[0]);
- ctx.lineTo(point.canvasx, prevYs[1]);
- } else {
- ctx.moveTo(prevX, prevYs[0]);
- ctx.lineTo(point.canvasx, newYs[0]);
- ctx.lineTo(point.canvasx, newYs[1]);
- }
- ctx.lineTo(prevX, prevYs[1]);
- ctx.closePath();
- }
- prevYs = newYs;
- prevX = point.canvasx;
- }
- ctx.fill();
-};
-
-/**
- * Draws the shaded regions when "fillGraph" is set. Not to be confused with
- * error bars.
- *
- * For stacked charts, it's more convenient to handle all the series
- * simultaneously. So this plotter plots all the points on the first series
- * it's asked to draw, then ignores all the other series.
- *
- * @private
- */
-DygraphCanvasRenderer._fillPlotter = function(e) {
- // Skip if we're drawing a single series for interactive highlight overlay.
- if (e.singleSeriesName) return;
-
- // We'll handle all the series at once, not one-by-one.
- if (e.seriesIndex !== 0) return;
-
- var g = e.dygraph;
- var setNames = g.getLabels().slice(1); // remove x-axis
-
- // getLabels() includes names for invisible series, which are not included in
- // allSeriesPoints. We remove those to make the two match.
- // TODO(danvk): provide a simpler way to get this information.
- for (var i = setNames.length; i >= 0; i--) {
- if (!g.visibility()[i]) setNames.splice(i, 1);
- }
-
- var anySeriesFilled = (function() {
- for (var i = 0; i < setNames.length; i++) {
- if (g.getOption("fillGraph", setNames[i])) return true;
- }
- return false;
- })();
-
- if (!anySeriesFilled) return;
-
- var ctx = e.drawingContext;
- var area = e.plotArea;
- var sets = e.allSeriesPoints;
- var setCount = sets.length;
-
- var fillAlpha = g.getOption('fillAlpha');
- var stackedGraph = g.getOption("stackedGraph");
- var colors = g.getColors();
-
- // For stacked graphs, track the baseline for filling.
- //
- // The filled areas below graph lines are trapezoids with two
- // vertical edges. The top edge is the line segment being drawn, and
- // the baseline is the bottom edge. Each baseline corresponds to the
- // top line segment from the previous stacked line. In the case of
- // step plots, the trapezoids are rectangles.
- var baseline = {};
- var currBaseline;
- var prevStepPlot; // for different line drawing modes (line/step) per series
-
- // process sets in reverse order (needed for stacked graphs)
- for (var setIdx = setCount - 1; setIdx >= 0; setIdx--) {
- var setName = setNames[setIdx];
- if (!g.getOption('fillGraph', setName)) continue;
-
- var stepPlot = g.getOption('stepPlot', setName);
- var color = colors[setIdx];
- var axis = g.axisPropertiesForSeries(setName);
- var axisY = 1.0 + axis.minyval * axis.yscale;
- if (axisY < 0.0) axisY = 0.0;
- else if (axisY > 1.0) axisY = 1.0;
- axisY = area.h * axisY + area.y;
-
- var points = sets[setIdx];
- var iter = Dygraph.createIterator(points, 0, points.length,
- DygraphCanvasRenderer._getIteratorPredicate(
- g.getOption("connectSeparatedPoints")));
-
- // setup graphics context
- var prevX = NaN;
- var prevYs = [-1, -1];
- var newYs;
- // should be same color as the lines but only 15% opaque.
- var rgb = new RGBColorParser(color);
- var err_color =
- 'rgba(' + rgb.r + ',' + rgb.g + ',' + rgb.b + ',' + fillAlpha + ')';
- ctx.fillStyle = err_color;
- ctx.beginPath();
- var last_x, is_first = true;
- while (iter.hasNext) {
- var point = iter.next();
- if (!Dygraph.isOK(point.y)) {
- prevX = NaN;
- if (point.y_stacked !== null && !isNaN(point.y_stacked)) {
- baseline[point.canvasx] = area.h * point.y_stacked + area.y;
- }
- continue;
- }
- if (stackedGraph) {
- if (!is_first && last_x == point.xval) {
- continue;
- } else {
- is_first = false;
- last_x = point.xval;
- }
-
- currBaseline = baseline[point.canvasx];
- var lastY;
- if (currBaseline === undefined) {
- lastY = axisY;
- } else {
- if(prevStepPlot) {
- lastY = currBaseline[0];
- } else {
- lastY = currBaseline;
- }
- }
- newYs = [ point.canvasy, lastY ];
-
- if(stepPlot) {
- // Step plots must keep track of the top and bottom of
- // the baseline at each point.
- if(prevYs[0] === -1) {
- baseline[point.canvasx] = [ point.canvasy, axisY ];
- } else {
- baseline[point.canvasx] = [ point.canvasy, prevYs[0] ];
- }
- } else {
- baseline[point.canvasx] = point.canvasy;
- }
-
- } else {
- newYs = [ point.canvasy, axisY ];
- }
- if (!isNaN(prevX)) {
- ctx.moveTo(prevX, prevYs[0]);
-
- // Move to top fill point
- if (stepPlot) {
- ctx.lineTo(point.canvasx, prevYs[0]);
- } else {
- ctx.lineTo(point.canvasx, newYs[0]);
- }
- // Move to bottom fill point
- if (prevStepPlot && currBaseline) {
- // Draw to the bottom of the baseline
- ctx.lineTo(point.canvasx, currBaseline[1]);
- } else {
- ctx.lineTo(point.canvasx, newYs[1]);
- }
-
- ctx.lineTo(prevX, prevYs[1]);
- ctx.closePath();
- }
- prevYs = newYs;
- prevX = point.canvasx;
- }
- prevStepPlot = stepPlot;
- ctx.fill();
- }
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined.js
deleted file mode 100644
index 4f864538..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! @license Copyright 2011 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */
-Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b};"use strict";function RGBColorParser(f){this.ok=false;if(f.charAt(0)=="#"){f=f.substr(1,6)}f=f.replace(/ /g,"");f=f.toLowerCase();var b={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var g in b){if(f==g){f=b[g]}}var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var c=0;c<e.length;c++){var j=e[c].re;var a=e[c].process;var h=j.exec(f);if(h){var d=a(h);this.r=d[0];this.g=d[1];this.b=d[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var l=this.r.toString(16);var k=this.g.toString(16);var i=this.b.toString(16);if(l.length==1){l="0"+l}if(k.length==1){k="0"+k}if(i.length==1){i="0"+i}return"#"+l+k+i}}function printStackTrace(b){b=b||{guess:true};var c=b.e||null,e=!!b.guess;var d=new printStackTrace.implementation(),a=d.run(c);return(e)?d.guessAnonymousFunctions(a):a}printStackTrace.implementation=function(){};printStackTrace.implementation.prototype={run:function(a,b){a=a||this.createException();b=b||this.mode(a);if(b==="other"){return this.other(arguments.callee)}else{return this[b](a)}},createException:function(){try{this.undef()}catch(a){return a}},mode:function(a){if(a["arguments"]&&a.stack){return"chrome"}else{if(typeof a.message==="string"&&typeof window!=="undefined"&&window.opera){if(!a.stacktrace){return"opera9"}if(a.message.indexOf("\n")>-1&&a.message.split("\n").length>a.stacktrace.split("\n").length){return"opera9"}if(!a.stack){return"opera10a"}if(a.stacktrace.indexOf("called from line")<0){return"opera10b"}return"opera11"}else{if(a.stack){return"firefox"}}}return"other"},instrumentFunction:function(b,d,e){b=b||window;var a=b[d];b[d]=function c(){e.call(this,printStackTrace().slice(4));return b[d]._instrumented.apply(this,arguments)};b[d]._instrumented=a},deinstrumentFunction:function(a,b){if(a[b].constructor===Function&&a[b]._instrumented&&a[b]._instrumented.constructor===Function){a[b]=a[b]._instrumented}},chrome:function(b){var a=(b.stack+"\n").replace(/^\S[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}()@$1$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm,"{anonymous}()@$1").split("\n");a.pop();return a},firefox:function(a){return a.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^\(/gm,"{anonymous}(").split("\n")},opera11:function(g){var a="{anonymous}",h=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/;var k=g.stacktrace.split("\n"),l=[];for(var c=0,f=k.length;c<f;c+=2){var d=h.exec(k[c]);if(d){var j=d[4]+":"+d[1]+":"+d[2];var b=d[3]||"global code";b=b.replace(/<anonymous function: (\S+)>/,"$1").replace(/<anonymous function>/,a);l.push(b+"@"+j+" -- "+k[c+1].replace(/^\s+/,""))}}return l},opera10b:function(g){var a="{anonymous}",h=/^(.*)@(.+):(\d+)$/;var j=g.stacktrace.split("\n"),k=[];for(var c=0,f=j.length;c<f;c++){var d=h.exec(j[c]);if(d){var b=d[1]?(d[1]+"()"):"global code";k.push(b+"@"+d[2]+":"+d[3])}}return k},opera10a:function(g){var a="{anonymous}",h=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;var j=g.stacktrace.split("\n"),k=[];for(var c=0,f=j.length;c<f;c+=2){var d=h.exec(j[c]);if(d){var b=d[3]||a;k.push(b+"()@"+d[2]+":"+d[1]+" -- "+j[c+1].replace(/^\s+/,""))}}return k},opera9:function(j){var d="{anonymous}",h=/Line (\d+).*script (?:in )?(\S+)/i;var c=j.message.split("\n"),b=[];for(var g=2,a=c.length;g<a;g+=2){var f=h.exec(c[g]);if(f){b.push(d+"()@"+f[2]+":"+f[1]+" -- "+c[g+1].replace(/^\s+/,""))}}return b},other:function(g){var b="{anonymous}",f=/function\s*([\w\-$]+)?\s*\(/i,a=[],d,c,e=10;while(g&&a.length<e){d=f.test(g.toString())?RegExp.$1||b:b;c=Array.prototype.slice.call(g["arguments"]||[]);a[a.length]=d+"("+this.stringifyArguments(c)+")";g=g.caller}return a},stringifyArguments:function(c){var b=[];var e=Array.prototype.slice;for(var d=0;d<c.length;++d){var a=c[d];if(a===undefined){b[d]="undefined"}else{if(a===null){b[d]="null"}else{if(a.constructor){if(a.constructor===Array){if(a.length<3){b[d]="["+this.stringifyArguments(a)+"]"}else{b[d]="["+this.stringifyArguments(e.call(a,0,1))+"..."+this.stringifyArguments(e.call(a,-1))+"]"}}else{if(a.constructor===Object){b[d]="#object"}else{if(a.constructor===Function){b[d]="#function"}else{if(a.constructor===String){b[d]='"'+a+'"'}else{if(a.constructor===Number){b[d]=a}}}}}}}}}return b.join(",")},sourceCache:{},ajax:function(a){var b=this.createXMLHTTPObject();if(b){try{b.open("GET",a,false);b.send(null);return b.responseText}catch(c){}}return""},createXMLHTTPObject:function(){var c,a=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];for(var b=0;b<a.length;b++){try{c=a[b]();this.createXMLHTTPObject=a[b];return c}catch(d){}}},isSameDomain:function(a){return a.indexOf(location.hostname)!==-1},getSource:function(a){if(!(a in this.sourceCache)){this.sourceCache[a]=this.ajax(a).split("\n")}return this.sourceCache[a]},guessAnonymousFunctions:function(k){for(var g=0;g<k.length;++g){var f=/\{anonymous\}\(.*\)@(.*)/,l=/^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,b=k[g],c=f.exec(b);if(c){var e=l.exec(c[1]),d=e[1],a=e[2],j=e[3]||0;if(d&&this.isSameDomain(d)&&a){var h=this.guessAnonymousFunction(d,a,j);k[g]=b.replace("{anonymous}",h)}}}return k},guessAnonymousFunction:function(c,f,a){var b;try{b=this.findFunctionName(this.getSource(c),f)}catch(d){b="getSource failed with url: "+c+", exception: "+d.toString()}return b},findFunctionName:function(a,e){var g=/function\s+([^(]*?)\s*\(([^)]*)\)/;var k=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/;var h=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/;var b="",l,j=Math.min(e,20),d,c;for(var f=0;f<j;++f){l=a[e-f-1];c=l.indexOf("//");if(c>=0){l=l.substr(0,c)}if(l){b=l+b;d=k.exec(b);if(d&&d[1]){return d[1]}d=g.exec(b);if(d&&d[1]){return d[1]}d=h.exec(b);if(d&&d[1]){return d[1]}}}return"(?)"}};CanvasRenderingContext2D.prototype.installPattern=function(e){if(typeof(this.isPatternInstalled)!=="undefined"){throw"Must un-install old line pattern before installing a new one."}this.isPatternInstalled=true;var g=[0,0];var b=[];var f=this.beginPath;var d=this.lineTo;var c=this.moveTo;var a=this.stroke;this.uninstallPattern=function(){this.beginPath=f;this.lineTo=d;this.moveTo=c;this.stroke=a;this.uninstallPattern=undefined;this.isPatternInstalled=undefined};this.beginPath=function(){b=[];f.call(this)};this.moveTo=function(h,i){b.push([[h,i]]);c.call(this,h,i)};this.lineTo=function(h,j){var i=b[b.length-1];i.push([h,j])};this.stroke=function(){if(b.length===0){a.call(this);return}for(var p=0;p<b.length;p++){var o=b[p];var l=o[0][0],u=o[0][1];for(var n=1;n<o.length;n++){var h=o[n][0],s=o[n][1];this.save();var w=(h-l);var v=(s-u);var r=Math.sqrt(w*w+v*v);var k=Math.atan2(v,w);this.translate(l,u);c.call(this,0,0);this.rotate(k);var m=g[0];var t=0;while(r>t){var q=e[m];if(g[1]){t+=g[1]}else{t+=q}if(t>r){g=[m,t-r];t=r}else{g=[(m+1)%e.length,0]}if(m%2===0){d.call(this,t,0)}else{c.call(this,t,0)}m=(m+1)%e.length}this.restore();l=h,u=s}}a.call(this);b=[]}};CanvasRenderingContext2D.prototype.uninstallPattern=function(){throw"Must install a line pattern before uninstalling it."};var DygraphOptions=(function(){var a=function(b){this.dygraph_=b;this.yAxes_=[];this.xAxis_={};this.series_={};this.global_=this.dygraph_.attrs_;this.user_=this.dygraph_.user_attrs_||{};this.labels_=[];this.highlightSeries_=this.get("highlightSeriesOpts")||{};this.reparseSeries()};a.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1};a.axisToIndex_=function(b){if(typeof(b)=="string"){if(a.AXIS_STRING_MAPPINGS_.hasOwnProperty(b)){return a.AXIS_STRING_MAPPINGS_[b]}throw"Unknown axis : "+b}if(typeof(b)=="number"){if(b===0||b===1){return b}throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(b){throw"Unknown axis : "+b}return 0};a.prototype.reparseSeries=function(){var g=this.get("labels");if(!g){return}this.labels_=g.slice(1);this.yAxes_=[{series:[],options:{}}];this.xAxis_={options:{}};this.series_={};var h=!this.user_.series;if(h){var c=0;for(var j=0;j<this.labels_.length;j++){var i=this.labels_[j];var e=this.user_[i]||{};var b=0;var d=e.axis;if(typeof(d)=="object"){b=++c;this.yAxes_[b]={series:[i],options:d}}if(!d){this.yAxes_[0].series.push(i)}this.series_[i]={idx:j,yAxis:b,options:e}}for(var j=0;j<this.labels_.length;j++){var i=this.labels_[j];var e=this.series_[i]["options"];var d=e.axis;if(typeof(d)=="string"){if(!this.series_.hasOwnProperty(d)){Dygraph.error("Series "+i+" wants to share a y-axis with series "+d+", which does not define its own axis.");return}var b=this.series_[d].yAxis;this.series_[i].yAxis=b;this.yAxes_[b].series.push(i)}}}else{for(var j=0;j<this.labels_.length;j++){var i=this.labels_[j];var e=this.user_.series[i]||{};var b=a.axisToIndex_(e.axis);this.series_[i]={idx:j,yAxis:b,options:e};if(!this.yAxes_[b]){this.yAxes_[b]={series:[i],options:{}}}else{this.yAxes_[b].series.push(i)}}}var f=this.user_.axes||{};Dygraph.update(this.yAxes_[0].options,f.y||{});if(this.yAxes_.length>1){Dygraph.update(this.yAxes_[1].options,f.y2||{})}Dygraph.update(this.xAxis_.options,f.x||{})};a.prototype.get=function(c){var b=this.getGlobalUser_(c);if(b!==null){return b}return this.getGlobalDefault_(c)};a.prototype.getGlobalUser_=function(b){if(this.user_.hasOwnProperty(b)){return this.user_[b]}return null};a.prototype.getGlobalDefault_=function(b){if(this.global_.hasOwnProperty(b)){return this.global_[b]}if(Dygraph.DEFAULT_ATTRS.hasOwnProperty(b)){return Dygraph.DEFAULT_ATTRS[b]}return null};a.prototype.getForAxis=function(d,e){var f;var i;if(typeof(e)=="number"){f=e;i=f===0?"y":"y2"}else{if(e=="y1"){e="y"}if(e=="y"){f=0}else{if(e=="y2"){f=1}else{if(e=="x"){f=-1}else{throw"Unknown axis "+e}}}i=e}var g=(f==-1)?this.xAxis_:this.yAxes_[f];if(g){var h=g.options;if(h.hasOwnProperty(d)){return h[d]}}var c=this.getGlobalUser_(d);if(c!==null){return c}var b=Dygraph.DEFAULT_ATTRS.axes[i];if(b.hasOwnProperty(d)){return b[d]}return this.getGlobalDefault_(d)};a.prototype.getForSeries=function(c,e){if(e===this.dygraph_.getHighlightSeries()){if(this.highlightSeries_.hasOwnProperty(c)){return this.highlightSeries_[c]}}if(!this.series_.hasOwnProperty(e)){throw"Unknown series: "+e}var d=this.series_[e];var b=d.options;if(b.hasOwnProperty(c)){return b[c]}return this.getForAxis(c,d.yAxis)};a.prototype.numAxes=function(){return this.yAxes_.length};a.prototype.axisForSeries=function(b){return this.series_[b].yAxis};a.prototype.axisOptions=function(b){return this.yAxes_[b].options};a.prototype.seriesForAxis=function(b){return this.yAxes_[b].series};a.prototype.seriesNames=function(){return this.labels_};return a})();"use strict";var DygraphLayout=function(a){this.dygraph_=a;this.points=[];this.setNames=[];this.annotations=[];this.yAxes_=null;this.xTicks_=null;this.yTicks_=null};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.points.push(b);this.setNames.push(a)};DygraphLayout.prototype.getPlotArea=function(){return this.area_};DygraphLayout.prototype.computePlotArea=function(){var a={x:0,y:0};a.w=this.dygraph_.width_-a.x-this.attr_("rightGap");a.h=this.dygraph_.height_;var b={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(c){var d={x:a.x,y:a.y,w:c,h:a.h};a.x+=c;a.w-=c;return d},reserveSpaceRight:function(c){var d={x:a.x+a.w-c,y:a.y,w:c,h:a.h};a.w-=c;return d},reserveSpaceTop:function(c){var d={x:a.x,y:a.y,w:a.w,h:c};a.y+=c;a.h-=c;return d},reserveSpaceBottom:function(c){var d={x:a.x,y:a.y+a.h-c,w:a.w,h:c};a.h-=c;return d},chartRect:function(){return{x:a.x,y:a.y,w:a.w,h:a.h}}};this.dygraph_.cascadeEvents_("layout",b);this.area_=a};DygraphLayout.prototype.setAnnotations=function(d){this.annotations=[];var e=this.attr_("xValueParser")||function(a){return a};for(var c=0;c<d.length;c++){var b={};if(!d[c].xval&&d[c].x===undefined){this.dygraph_.error("Annotations must have an 'x' property");return}if(d[c].icon&&!(d[c].hasOwnProperty("width")&&d[c].hasOwnProperty("height"))){this.dygraph_.error("Must set width and height when setting annotation.icon property");return}Dygraph.update(b,d[c]);if(!b.xval){b.xval=e(b.x)}this.annotations.push(b)}};DygraphLayout.prototype.setXTicks=function(a){this.xTicks_=a};DygraphLayout.prototype.setYAxes=function(a){this.yAxes_=a};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks();this._evaluateAnnotations()};DygraphLayout.prototype._evaluateLimits=function(){var a=this.dygraph_.xAxisRange();this.minxval=a[0];this.maxxval=a[1];var d=a[1]-a[0];this.xscale=(d!==0?1/d:1);for(var b=0;b<this.yAxes_.length;b++){var c=this.yAxes_[b];c.minyval=c.computedValueRange[0];c.maxyval=c.computedValueRange[1];c.yrange=c.maxyval-c.minyval;c.yscale=(c.yrange!==0?1/c.yrange:1);if(c.g.attr_("logscale")){c.ylogrange=Dygraph.log10(c.maxyval)-Dygraph.log10(c.minyval);c.ylogscale=(c.ylogrange!==0?1/c.ylogrange:1);if(!isFinite(c.ylogrange)||isNaN(c.ylogrange)){c.g.error("axis "+b+" of graph at "+c.g+" can't be displayed in log scale for range ["+c.minyval+" - "+c.maxyval+"]")}}}};DygraphLayout._calcYNormal=function(b,c,a){if(a){return 1-((Dygraph.log10(c)-Dygraph.log10(b.minyval))*b.ylogscale)}else{return 1-((c-b.minyval)*b.yscale)}};DygraphLayout.prototype._evaluateLineCharts=function(){var c=this.attr_("connectSeparatedPoints");var k=this.attr_("stackedGraph");var e=this.attr_("errorBars")||this.attr_("customBars");for(var a=0;a<this.points.length;a++){var l=this.points[a];var f=this.setNames[a];var b=this.dygraph_.axisPropertiesForSeries(f);var g=this.dygraph_.attributes_.getForSeries("logscale",f);for(var d=0;d<l.length;d++){var i=l[d];i.x=(i.xval-this.minxval)*this.xscale;var h=i.yval;if(k){i.y_stacked=DygraphLayout._calcYNormal(b,i.yval_stacked,g);if(h!==null&&!isNaN(h)){h=i.yval_stacked}}if(h===null){h=NaN;if(!c){i.yval=NaN}}i.y=DygraphLayout._calcYNormal(b,h,g);if(e){i.y_top=DygraphLayout._calcYNormal(b,h-i.yval_minus,g);i.y_bottom=DygraphLayout._calcYNormal(b,h+i.yval_plus,g)}}}};DygraphLayout.parseFloat_=function(a){if(a===null){return NaN}return a};DygraphLayout.prototype._evaluateLineTicks=function(){var d,c,b,f;this.xticks=[];for(d=0;d<this.xTicks_.length;d++){c=this.xTicks_[d];b=c.label;f=this.xscale*(c.v-this.minxval);if((f>=0)&&(f<=1)){this.xticks.push([f,b])}}this.yticks=[];for(d=0;d<this.yAxes_.length;d++){var e=this.yAxes_[d];for(var a=0;a<e.ticks.length;a++){c=e.ticks[a];b=c.label;f=this.dygraph_.toPercentYCoord(c.v,d);if((f>=0)&&(f<=1)){this.yticks.push([d,f,b])}}}};DygraphLayout.prototype._evaluateAnnotations=function(){var d;var g={};for(d=0;d<this.annotations.length;d++){var b=this.annotations[d];g[b.xval+","+b.series]=b}this.annotated_points=[];if(!this.annotations||!this.annotations.length){return}for(var h=0;h<this.points.length;h++){var e=this.points[h];for(d=0;d<e.length;d++){var f=e[d];var c=f.xval+","+f.name;if(c in g){f.annotation=g[c];this.annotated_points.push(f)}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.points;delete this.setNames;delete this.setPointsLengths;delete this.setPointsOffsets;this.points=[];this.setNames=[];this.setPointsLengths=[];this.setPointsOffsets=[]};"use strict";var DygraphCanvasRenderer=function(d,c,b,e){this.dygraph_=d;this.layout=e;this.element=c;this.elementContext=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.area=e.getPlotArea();this.container.style.position="relative";this.container.style.width=this.width+"px";if(this.dygraph_.isUsingExcanvas_){this._createIEClipArea()}else{if(!Dygraph.isAndroid()){var a=this.dygraph_.canvas_ctx_;a.beginPath();a.rect(this.area.x,this.area.y,this.area.w,this.area.h);a.clip();a=this.dygraph_.hidden_ctx_;a.beginPath();a.rect(this.area.x,this.area.y,this.area.w,this.area.h);a.clip()}}};DygraphCanvasRenderer.prototype.attr_=function(a,b){return this.dygraph_.attr_(a,b)};DygraphCanvasRenderer.prototype.clear=function(){var a;if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}a=this.elementContext}catch(b){return}}a=this.elementContext;a.clearRect(0,0,this.width,this.height)};DygraphCanvasRenderer.isSupported=function(f){var b=null;try{if(typeof(f)=="undefined"||f===null){b=document.createElement("canvas")}else{b=f}b.getContext("2d")}catch(c){var d=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!d)||(d[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){this._updatePoints();this._renderLineChart()};DygraphCanvasRenderer.prototype._createIEClipArea=function(){var g="dygraph-clip-div";var f=this.dygraph_.graphDiv;for(var e=f.childNodes.length-1;e>=0;e--){if(f.childNodes[e].className==g){f.removeChild(f.childNodes[e])}}var c=document.bgColor;var d=this.dygraph_.graphDiv;while(d!=document){var a=d.currentStyle.backgroundColor;if(a&&a!="transparent"){c=a;break}d=d.parentNode}function b(j){if(j.w===0||j.h===0){return}var i=document.createElement("div");i.className=g;i.style.backgroundColor=c;i.style.position="absolute";i.style.left=j.x+"px";i.style.top=j.y+"px";i.style.width=j.w+"px";i.style.height=j.h+"px";f.appendChild(i)}var h=this.area;b({x:0,y:0,w:h.x,h:this.height});b({x:h.x,y:0,w:this.width-h.x,h:h.y});b({x:h.x+h.w,y:0,w:this.width-h.x-h.w,h:this.height});b({x:h.x,y:h.y+h.h,w:this.width-h.x,h:this.height-h.h-h.y})};DygraphCanvasRenderer._getIteratorPredicate=function(a){return a?DygraphCanvasRenderer._predicateThatSkipsEmptyPoints:null};DygraphCanvasRenderer._predicateThatSkipsEmptyPoints=function(b,a){return b[a].yval!==null};DygraphCanvasRenderer._drawStyledLine=function(i,a,m,q,f,n,d){var h=i.dygraph;var c=h.getOption("stepPlot",i.setName);if(!Dygraph.isArrayLike(q)){q=null}var l=h.getOption("drawGapEdgePoints",i.setName);var o=i.points;var k=Dygraph.createIterator(o,0,o.length,DygraphCanvasRenderer._getIteratorPredicate(h.getOption("connectSeparatedPoints")));var j=q&&(q.length>=2);var p=i.drawingContext;p.save();if(j){p.installPattern(q)}var b=DygraphCanvasRenderer._drawSeries(i,k,m,d,f,l,c,a);DygraphCanvasRenderer._drawPointsOnLine(i,b,n,a,d);if(j){p.uninstallPattern()}p.restore()};DygraphCanvasRenderer._drawSeries=function(v,t,m,h,p,s,g,q){var b=null;var w=null;var k=null;var j;var o;var l=[];var f=true;var n=v.drawingContext;n.beginPath();n.strokeStyle=q;n.lineWidth=m;var c=t.array_;var u=t.end_;var a=t.predicate_;for(var r=t.start_;r<u;r++){o=c[r];if(a){while(r<u&&!a(c,r)){r++}if(r==u){break}o=c[r]}if(o.canvasy===null||o.canvasy!=o.canvasy){if(g&&b!==null){n.moveTo(b,w);n.lineTo(o.canvasx,w)}b=w=null}else{j=false;if(s||!b){t.nextIdx_=r;t.next();k=t.hasNext?t.peek.canvasy:null;var d=k===null||k!=k;j=(!b&&d);if(s){if((!f&&!b)||(t.hasNext&&d)){j=true}}}if(b!==null){if(m){if(g){n.moveTo(b,w);n.lineTo(o.canvasx,w)}n.lineTo(o.canvasx,o.canvasy)}}else{n.moveTo(o.canvasx,o.canvasy)}if(p||j){l.push([o.canvasx,o.canvasy,o.idx])}b=o.canvasx;w=o.canvasy}f=false}n.stroke();return l};DygraphCanvasRenderer._drawPointsOnLine=function(h,i,f,d,g){var c=h.drawingContext;for(var b=0;b<i.length;b++){var a=i[b];c.save();f(h.dygraph,h.setName,c,a[0],a[1],d,g,a[2]);c.restore()}};DygraphCanvasRenderer.prototype._updatePoints=function(){var e=this.layout.points;for(var c=e.length;c--;){var d=e[c];for(var b=d.length;b--;){var a=d[b];a.canvasx=this.area.w*a.x+this.area.x;a.canvasy=this.area.h*a.y+this.area.y}}};DygraphCanvasRenderer.prototype._renderLineChart=function(g,u){var h=u||this.elementContext;var n;var a=this.layout.points;var s=this.layout.setNames;var b;this.colors=this.dygraph_.colorsMap_;var o=this.attr_("plotter");var f=o;if(!Dygraph.isArrayLike(f)){f=[f]}var c={};for(n=0;n<s.length;n++){b=s[n];var t=this.attr_("plotter",b);if(t==o){continue}c[b]=t}for(n=0;n<f.length;n++){var r=f[n];var q=(n==f.length-1);for(var l=0;l<a.length;l++){b=s[l];if(g&&b!=g){continue}var m=a[l];var e=r;if(b in c){if(q){e=c[b]}else{continue}}var k=this.colors[b];var d=this.dygraph_.getOption("strokeWidth",b);h.save();h.strokeStyle=k;h.lineWidth=d;e({points:m,setName:b,drawingContext:h,color:k,strokeWidth:d,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(b),plotArea:this.area,seriesIndex:l,seriesCount:a.length,singleSeriesName:g,allSeriesPoints:a});h.restore()}}};DygraphCanvasRenderer._Plotters={linePlotter:function(a){DygraphCanvasRenderer._linePlotter(a)},fillPlotter:function(a){DygraphCanvasRenderer._fillPlotter(a)},errorPlotter:function(a){DygraphCanvasRenderer._errorPlotter(a)}};DygraphCanvasRenderer._linePlotter=function(f){var d=f.dygraph;var h=f.setName;var i=f.strokeWidth;var a=d.getOption("strokeBorderWidth",h);var j=d.getOption("drawPointCallback",h)||Dygraph.Circles.DEFAULT;var k=d.getOption("strokePattern",h);var c=d.getOption("drawPoints",h);var b=d.getOption("pointSize",h);if(a&&i){DygraphCanvasRenderer._drawStyledLine(f,d.getOption("strokeBorderColor",h),i+2*a,k,c,j,b)}DygraphCanvasRenderer._drawStyledLine(f,f.color,i,k,c,j,b)};DygraphCanvasRenderer._errorPlotter=function(s){var r=s.dygraph;var f=s.setName;var t=r.getOption("errorBars")||r.getOption("customBars");if(!t){return}var k=r.getOption("fillGraph",f);if(k){r.warn("Can't use fillGraph option with error bars")}var m=s.drawingContext;var n=s.color;var o=r.getOption("fillAlpha",f);var i=r.getOption("stepPlot",f);var p=s.points;var q=Dygraph.createIterator(p,0,p.length,DygraphCanvasRenderer._getIteratorPredicate(r.getOption("connectSeparatedPoints")));var j;var h=NaN;var c=NaN;var d=[-1,-1];var a=new RGBColorParser(n);var u="rgba("+a.r+","+a.g+","+a.b+","+o+")";m.fillStyle=u;m.beginPath();var b=function(e){return(e===null||e===undefined||isNaN(e))};while(q.hasNext){var l=q.next();if((!i&&b(l.y))||(i&&!isNaN(c)&&b(c))){h=NaN;continue}if(i){j=[l.y_bottom,l.y_top];c=l.y}else{j=[l.y_bottom,l.y_top]}j[0]=s.plotArea.h*j[0]+s.plotArea.y;j[1]=s.plotArea.h*j[1]+s.plotArea.y;if(!isNaN(h)){if(i){m.moveTo(h,d[0]);m.lineTo(l.canvasx,d[0]);m.lineTo(l.canvasx,d[1])}else{m.moveTo(h,d[0]);m.lineTo(l.canvasx,j[0]);m.lineTo(l.canvasx,j[1])}m.lineTo(h,d[1]);m.closePath()}d=j;h=l.canvasx}m.fill()};DygraphCanvasRenderer._fillPlotter=function(F){if(F.singleSeriesName){return}if(F.seriesIndex!==0){return}var D=F.dygraph;var I=D.getLabels().slice(1);for(var C=I.length;C>=0;C--){if(!D.visibility()[C]){I.splice(C,1)}}var h=(function(){for(var e=0;e<I.length;e++){if(D.getOption("fillGraph",I[e])){return true}}return false})();if(!h){return}var w=F.drawingContext;var E=F.plotArea;var c=F.allSeriesPoints;var z=c.length;var y=D.getOption("fillAlpha");var k=D.getOption("stackedGraph");var q=D.getColors();var s={};var a;var r;for(var u=z-1;u>=0;u--){var n=I[u];if(!D.getOption("fillGraph",n)){continue}var p=D.getOption("stepPlot",n);var x=q[u];var f=D.axisPropertiesForSeries(n);var d=1+f.minyval*f.yscale;if(d<0){d=0}else{if(d>1){d=1}}d=E.h*d+E.y;var B=c[u];var A=Dygraph.createIterator(B,0,B.length,DygraphCanvasRenderer._getIteratorPredicate(D.getOption("connectSeparatedPoints")));var m=NaN;var l=[-1,-1];var t;var b=new RGBColorParser(x);var H="rgba("+b.r+","+b.g+","+b.b+","+y+")";w.fillStyle=H;w.beginPath();var j,G=true;while(A.hasNext){var v=A.next();if(!Dygraph.isOK(v.y)){m=NaN;if(v.y_stacked!==null&&!isNaN(v.y_stacked)){s[v.canvasx]=E.h*v.y_stacked+E.y}continue}if(k){if(!G&&j==v.xval){continue}else{G=false;j=v.xval}a=s[v.canvasx];var o;if(a===undefined){o=d}else{if(r){o=a[0]}else{o=a}}t=[v.canvasy,o];if(p){if(l[0]===-1){s[v.canvasx]=[v.canvasy,d]}else{s[v.canvasx]=[v.canvasy,l[0]]}}else{s[v.canvasx]=v.canvasy}}else{t=[v.canvasy,d]}if(!isNaN(m)){w.moveTo(m,l[0]);if(p){w.lineTo(v.canvasx,l[0])}else{w.lineTo(v.canvasx,t[0])}if(r&&a){w.lineTo(v.canvasx,a[1])}else{w.lineTo(v.canvasx,t[1])}w.lineTo(m,l[1]);w.closePath()}l=t;m=v.canvasx}r=p;w.fill()}};"use strict";var Dygraph=function(d,c,b,a){this.is_initial_draw_=true;this.readyFns_=[];if(a!==undefined){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(d,c,b,a)}else{this.__init__(d,c,b)}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.0.0";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.ANIMATION_STEPS=12;Dygraph.ANIMATION_DURATION=200;Dygraph.KMB_LABELS=["K","M","B","T","Q"];Dygraph.KMG2_BIG_LABELS=["k","M","G","T","P","E","Z","Y"];Dygraph.KMG2_SMALL_LABELS=["m","u","n","p","f","a","z","y"];Dygraph.numberValueFormatter=function(s,a,u,l){var e=a("sigFigs");if(e!==null){return Dygraph.floatFormat(s,e)}var c=a("digitsAfterDecimal");var o=a("maxNumberWidth");var b=a("labelsKMB");var r=a("labelsKMG2");var q;if(s!==0&&(Math.abs(s)>=Math.pow(10,o)||Math.abs(s)<Math.pow(10,-c))){q=s.toExponential(c)}else{q=""+Dygraph.round_(s,c)}if(b||r){var f;var t=[];var m=[];if(b){f=1000;t=Dygraph.KMB_LABELS}if(r){if(b){Dygraph.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}f=1024;t=Dygraph.KMG2_BIG_LABELS;m=Dygraph.KMG2_SMALL_LABELS}var p=Math.abs(s);var d=Dygraph.pow(f,t.length);for(var h=t.length-1;h>=0;h--,d/=f){if(p>=d){q=Dygraph.round_(s/d,c)+t[h];break}}if(r){var i=String(s.toExponential()).split("e-");if(i.length===2&&i[1]>=3&&i[1]<=24){if(i[1]%3>0){q=Dygraph.round_(i[0]/Dygraph.pow(10,(i[1]%3)),c)}else{q=Number(i[0]).toFixed(2)}q+=m[Math.floor(i[1]/3)-1]}}}return q};Dygraph.numberAxisLabelFormatter=function(a,d,c,b){return Dygraph.numberValueFormatter(a,c,b)};Dygraph.dateString_=function(e){var i=Dygraph.zeropad;var h=new Date(e);var f=""+h.getFullYear();var g=i(h.getMonth()+1);var a=i(h.getDate());var c="";var b=h.getHours()*3600+h.getMinutes()*60+h.getSeconds();if(b){c=" "+Dygraph.hmsString_(e)}return f+"/"+g+"/"+a+c};Dygraph.dateAxisFormatter=function(b,c){if(c>=Dygraph.DECADAL){return b.strftime("%Y")}else{if(c>=Dygraph.MONTHLY){return b.strftime("%b %y")}else{var a=b.getHours()*3600+b.getMinutes()*60+b.getSeconds()+b.getMilliseconds();if(a===0||c>=Dygraph.DAILY){return new Date(b.getTime()+3600*1000).strftime("%d%b")}else{return Dygraph.hmsString_(b.getTime())}}}};Dygraph.Plotters=DygraphCanvasRenderer._Plotters;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:0.5,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsShowZeroValues:true,labelsKMB:false,labelsKMG2:false,showLabelsOnHighlight:true,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueParser:Dygraph.dateParser,delimiter:",",sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,connectSeparatedPoints:false,stackedGraph:false,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:true,legend:"onmouseover",stepPlot:false,avoidMinZero:false,xRangePad:0,yRangePad:null,drawAxesAtZero:false,titleHeight:28,xLabelHeight:18,yLabelWidth:18,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.3,gridLineWidth:0.3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",interactionModel:null,animatedZooms:false,showRangeSelector:false,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillColor:"#A7B1C4",plotter:[Dygraph.Plotters.fillPlotter,Dygraph.Plotters.errorPlotter,Dygraph.Plotters.linePlotter],plugins:[],axes:{x:{pixelsPerLabel:60,axisLabelFormatter:Dygraph.dateAxisFormatter,valueFormatter:Dygraph.dateString_,drawGrid:true,independentTicks:true,ticker:null},y:{pixelsPerLabel:30,valueFormatter:Dygraph.numberValueFormatter,axisLabelFormatter:Dygraph.numberAxisLabelFormatter,drawGrid:true,independentTicks:true,ticker:null},y2:{pixelsPerLabel:30,valueFormatter:Dygraph.numberValueFormatter,axisLabelFormatter:Dygraph.numberAxisLabelFormatter,drawGrid:false,independentTicks:false,ticker:null}}};Dygraph.HORIZONTAL=1;Dygraph.VERTICAL=2;Dygraph.PLUGINS=[];Dygraph.addedAnnotationCSS=false;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!==null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(a,c,l){if(/MSIE/.test(navigator.userAgent)&&!window.opera&&typeof(G_vmlCanvasManager)!="undefined"&&document.readyState!="complete"){var o=this;setTimeout(function(){o.__init__(a,c,l)},100);return}if(l===null||l===undefined){l={}}l=Dygraph.mapLegacyOptions_(l);if(typeof(a)=="string"){a=document.getElementById(a)}if(!a){Dygraph.error("Constructing dygraph with a non-existent div!");return}this.isUsingExcanvas_=typeof(G_vmlCanvasManager)!="undefined";this.maindiv_=a;this.file_=c;this.rollPeriod_=l.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=l.fractions||false;this.dateWindow_=l.dateWindow||null;this.annotations_=[];this.zoomed_x_=false;this.zoomed_y_=false;a.innerHTML="";if(a.style.width===""&&l.width){a.style.width=l.width+"px"}if(a.style.height===""&&l.height){a.style.height=l.height+"px"}if(a.style.height===""&&a.clientHeight===0){a.style.height=Dygraph.DEFAULT_HEIGHT+"px";if(a.style.width===""){a.style.width=Dygraph.DEFAULT_WIDTH+"px"}}this.width_=a.clientWidth||l.width||0;this.height_=a.clientHeight||l.height||0;if(l.stackedGraph){l.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,l);this.attrs_={};Dygraph.updateDeep(this.attrs_,Dygraph.DEFAULT_ATTRS);this.boundaryIds_=[];this.setIndexByName_={};this.datasetIndex_=[];this.registeredEvents_=[];this.eventListeners_={};this.attributes_=new DygraphOptions(this);this.createInterface_();this.plugins_=[];var d=Dygraph.PLUGINS.concat(this.getOption("plugins"));for(var g=0;g<d.length;g++){var k=d[g];var f=new k();var j={plugin:f,events:{},options:{},pluginOptions:{}};var b=f.activate(this);for(var h in b){j.events[h]=b[h]}this.plugins_.push(j)}for(var g=0;g<this.plugins_.length;g++){var n=this.plugins_[g];for(var h in n.events){if(!n.events.hasOwnProperty(h)){continue}var m=n.events[h];var e=[n.plugin,m];if(!(h in this.eventListeners_)){this.eventListeners_[h]=[e]}else{this.eventListeners_[h].push(e)}}}this.createDragInterface_();this.start_()};Dygraph.prototype.cascadeEvents_=function(c,b){if(!(c in this.eventListeners_)){return true}var g={dygraph:this,cancelable:false,defaultPrevented:false,preventDefault:function(){if(!g.cancelable){throw"Cannot call preventDefault on non-cancelable event."}g.defaultPrevented=true},propagationStopped:false,stopPropagation:function(){g.propagationStopped=true}};Dygraph.update(g,b);var a=this.eventListeners_[c];if(a){for(var d=a.length-1;d>=0;d--){var f=a[d][0];var h=a[d][1];h.call(f,g);if(g.propagationStopped){break}}}return g.defaultPrevented};Dygraph.prototype.isZoomed=function(a){if(a===null||a===undefined){return this.zoomed_x_||this.zoomed_y_}if(a==="x"){return this.zoomed_x_}if(a==="y"){return this.zoomed_y_}throw"axis parameter is ["+a+"] must be null, 'x' or 'y'."};Dygraph.prototype.toString=function(){var a=this.maindiv_;var b=(a&&a.id)?a.id:a;return"[Dygraph "+b+"]"};Dygraph.prototype.attr_=function(b,a){return a?this.attributes_.getForSeries(b,a):this.attributes_.get(b)};Dygraph.prototype.getOption=function(a,b){return this.attr_(a,b)};Dygraph.prototype.getOptionForAxis=function(a,b){return this.attributes_.getForAxis(a,b)};Dygraph.prototype.optionsViewForAxis_=function(b){var a=this;return function(c){var d=a.user_attrs_.axes;if(d&&d[b]&&d[b].hasOwnProperty(c)){return d[b][c]}if(typeof(a.user_attrs_[c])!="undefined"){return a.user_attrs_[c]}d=a.attrs_.axes;if(d&&d[b]&&d[b].hasOwnProperty(c)){return d[b][c]}if(b=="y"&&a.axes_[0].hasOwnProperty(c)){return a.axes_[0][c]}else{if(b=="y2"&&a.axes_[1].hasOwnProperty(c)){return a.axes_[1][c]}}return a.attr_(c)}};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()};Dygraph.prototype.xAxisExtremes=function(){var d=this.attr_("xRangePad")/this.plotter_.area.w;if(this.numRows()===0){return[0-d,1+d]}var c=this.rawData_[0][0];var b=this.rawData_[this.rawData_.length-1][0];if(d){var a=b-c;c-=a*d;b+=a*d}return[c,b]};Dygraph.prototype.yAxisRange=function(a){if(typeof(a)=="undefined"){a=0}if(a<0||a>=this.axes_.length){return null}var b=this.axes_[a];return[b.computedValueRange[0],b.computedValueRange[1]]};Dygraph.prototype.yAxisRanges=function(){var a=[];for(var b=0;b<this.axes_.length;b++){a.push(this.yAxisRange(b))}return a};Dygraph.prototype.toDomCoords=function(a,c,b){return[this.toDomXCoord(a),this.toDomYCoord(c,b)]};Dygraph.prototype.toDomXCoord=function(b){if(b===null){return null}var c=this.plotter_.area;var a=this.xAxisRange();return c.x+(b-a[0])/(a[1]-a[0])*c.w};Dygraph.prototype.toDomYCoord=function(d,a){var c=this.toPercentYCoord(d,a);if(c===null){return null}var b=this.plotter_.area;return b.y+c*b.h};Dygraph.prototype.toDataCoords=function(a,c,b){return[this.toDataXCoord(a),this.toDataYCoord(c,b)]};Dygraph.prototype.toDataXCoord=function(b){if(b===null){return null}var c=this.plotter_.area;var a=this.xAxisRange();return a[0]+(b-c.x)/c.w*(a[1]-a[0])};Dygraph.prototype.toDataYCoord=function(h,b){if(h===null){return null}var c=this.plotter_.area;var g=this.yAxisRange(b);if(typeof(b)=="undefined"){b=0}if(!this.axes_[b].logscale){return g[0]+(c.y+c.h-h)/c.h*(g[1]-g[0])}else{var f=(h-c.y)/c.h;var a=Dygraph.log10(g[1]);var e=a-(f*(a-Dygraph.log10(g[0])));var d=Math.pow(Dygraph.LOG_SCALE,e);return d}};Dygraph.prototype.toPercentYCoord=function(f,c){if(f===null){return null}if(typeof(c)=="undefined"){c=0}var e=this.yAxisRange(c);var d;var b=this.attributes_.getForAxis("logscale",c);if(!b){d=(e[1]-f)/(e[1]-e[0])}else{var a=Dygraph.log10(e[1]);d=(a-Dygraph.log10(f))/(a-Dygraph.log10(e[0]))}return d};Dygraph.prototype.toPercentXCoord=function(b){if(b===null){return null}var a=this.xAxisRange();return(b-a[0])/(a[1]-a[0])};Dygraph.prototype.numColumns=function(){if(!this.rawData_){return 0}return this.rawData_[0]?this.rawData_[0].length:this.attr_("labels").length};Dygraph.prototype.numRows=function(){if(!this.rawData_){return 0}return this.rawData_.length};Dygraph.prototype.getValue=function(b,a){if(b<0||b>this.rawData_.length){return null}if(a<0||a>this.rawData_[b].length){return null}return this.rawData_[b][a]};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.textAlign="left";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.hidden_=this.createPlotKitCanvas_(this.canvas_);this.resizeElements_();this.canvas_ctx_=Dygraph.getContext(this.canvas_);this.hidden_ctx_=Dygraph.getContext(this.hidden_);this.graphDiv.appendChild(this.hidden_);this.graphDiv.appendChild(this.canvas_);this.mouseEventElement_=this.createMouseEventElement_();this.layout_=new DygraphLayout(this);var b=this;this.mouseMoveHandler_=function(c){b.mouseMove_(c)};this.mouseOutHandler_=function(f){var d=f.target||f.fromElement;var c=f.relatedTarget||f.toElement;if(Dygraph.isNodeContainedBy(d,b.graphDiv)&&!Dygraph.isNodeContainedBy(c,b.graphDiv)){b.mouseOut_(f)}};this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_);this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_);if(!this.resizeHandler_){this.resizeHandler_=function(c){b.resize()};this.addAndTrackEvent(window,"resize",this.resizeHandler_)}};Dygraph.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.hidden_.width=this.width_;this.hidden_.height=this.height_;this.hidden_.style.width=this.width_+"px";this.hidden_.style.height=this.height_+"px"};Dygraph.prototype.destroy=function(){this.canvas_ctx_.restore();this.hidden_ctx_.restore();var a=function(c){while(c.hasChildNodes()){a(c.firstChild);c.removeChild(c.firstChild)}};this.removeTrackedEvents_();Dygraph.removeEvent(window,"mouseout",this.mouseOutHandler_);Dygraph.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_);Dygraph.removeEvent(window,"resize",this.resizeHandler_);this.resizeHandler_=null;a(this.maindiv_);var b=function(c){for(var d in c){if(typeof(c[d])==="object"){c[d]=null}}};b(this.layout_);b(this.plotter_);b(this)};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";return b};Dygraph.prototype.createMouseEventElement_=function(){if(this.isUsingExcanvas_){var a=document.createElement("div");a.style.position="absolute";a.style.backgroundColor="white";a.style.filter="alpha(opacity=0)";a.style.width=this.width_+"px";a.style.height=this.height_+"px";this.graphDiv.appendChild(a);return a}else{return this.canvas_}};Dygraph.prototype.setColors_=function(){var g=this.getLabels();var e=g.length-1;this.colors_=[];this.colorsMap_={};var a=this.attr_("colors");var d;if(!a){var c=this.attr_("colorSaturation")||1;var b=this.attr_("colorValue")||0.5;var k=Math.ceil(e/2);for(d=1;d<=e;d++){if(!this.visibility()[d-1]){continue}var h=d%2?Math.ceil(d/2):(k+d/2);var f=(1*h/(1+e));var j=Dygraph.hsvToRGB(f,c,b);this.colors_.push(j);this.colorsMap_[g[d]]=j}}else{for(d=0;d<e;d++){if(!this.visibility()[d]){continue}var j=a[d%a.length];this.colors_.push(j);this.colorsMap_[g[1+d]]=j}}};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.prototype.getPropertiesForSeries=function(c){var a=-1;var d=this.getLabels();for(var b=1;b<d.length;b++){if(d[b]==c){a=b;break}}if(a==-1){return null}return{name:c,column:a,visible:this.visibility()[a-1],color:this.colorsMap_[c],axis:1+this.attributes_.axisForSeries(c)}};Dygraph.prototype.createRollInterface_=function(){if(!this.roller_){this.roller_=document.createElement("input");this.roller_.type="text";this.roller_.style.display="none";this.graphDiv.appendChild(this.roller_)}var e=this.attr_("showRoller")?"block":"none";var d=this.plotter_.area;var b={position:"absolute",zIndex:10,top:(d.y+d.h-25)+"px",left:(d.x+1)+"px",display:e};this.roller_.size="2";this.roller_.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){this.roller_.style[a]=b[a]}}var c=this;this.roller_.onchange=function(){c.adjustRoll(c.roller_.value)}};Dygraph.prototype.dragGetX_=function(b,a){return Dygraph.pageX(b)-a.px};Dygraph.prototype.dragGetY_=function(b,a){return Dygraph.pageY(b)-a.py};Dygraph.prototype.createDragInterface_=function(){var c={isZooming:false,isPanning:false,is2DPan:false,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:false,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new Dygraph.IFrameTarp(),initializeMouseDown:function(j,i,h){if(j.preventDefault){j.preventDefault()}else{j.returnValue=false;j.cancelBubble=true}h.px=Dygraph.findPosX(i.canvas_);h.py=Dygraph.findPosY(i.canvas_);h.dragStartX=i.dragGetX_(j,h);h.dragStartY=i.dragGetY_(j,h);h.cancelNextDblclick=false;h.tarp.cover()}};var f=this.attr_("interactionModel");var b=this;var e=function(g){return function(h){g(h,b,c)}};for(var a in f){if(!f.hasOwnProperty(a)){continue}this.addAndTrackEvent(this.mouseEventElement_,a,e(f[a]))}var d=function(h){if(c.isZooming||c.isPanning){c.isZooming=false;c.dragStartX=null;c.dragStartY=null}if(c.isPanning){c.isPanning=false;c.draggingDate=null;c.dateRange=null;for(var g=0;g<b.axes_.length;g++){delete b.axes_[g].draggingValue;delete b.axes_[g].dragValueRange}}c.tarp.uncover()};this.addAndTrackEvent(document,"mouseup",d)};Dygraph.prototype.drawZoomRect_=function(e,c,i,b,g,a,f,d){var h=this.canvas_ctx_;if(a==Dygraph.HORIZONTAL){h.clearRect(Math.min(c,f),this.layout_.getPlotArea().y,Math.abs(c-f),this.layout_.getPlotArea().h)}else{if(a==Dygraph.VERTICAL){h.clearRect(this.layout_.getPlotArea().x,Math.min(b,d),this.layout_.getPlotArea().w,Math.abs(b-d))}}if(e==Dygraph.HORIZONTAL){if(i&&c){h.fillStyle="rgba(128,128,128,0.33)";h.fillRect(Math.min(c,i),this.layout_.getPlotArea().y,Math.abs(i-c),this.layout_.getPlotArea().h)}}else{if(e==Dygraph.VERTICAL){if(g&&b){h.fillStyle="rgba(128,128,128,0.33)";h.fillRect(this.layout_.getPlotArea().x,Math.min(b,g),this.layout_.getPlotArea().w,Math.abs(g-b))}}}if(this.isUsingExcanvas_){this.currentZoomRectArgs_=[e,c,i,b,g,0,0,0]}};Dygraph.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null;this.canvas_ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height)};Dygraph.prototype.doZoomX_=function(c,a){this.currentZoomRectArgs_=null;var b=this.toDataXCoord(c);var d=this.toDataXCoord(a);this.doZoomXDates_(b,d)};Dygraph.zoomAnimationFunction=function(c,b){var a=1.5;return(1-Math.pow(a,-c))/(1-Math.pow(a,-b))};Dygraph.prototype.doZoomXDates_=function(c,e){var a=this.xAxisRange();var d=[c,e];this.zoomed_x_=true;var b=this;this.doAnimatedZoom(a,d,null,null,function(){if(b.attr_("zoomCallback")){b.attr_("zoomCallback")(c,e,b.yAxisRanges())}})};Dygraph.prototype.doZoomY_=function(h,f){this.currentZoomRectArgs_=null;var c=this.yAxisRanges();var b=[];for(var e=0;e<this.axes_.length;e++){var d=this.toDataYCoord(h,e);var a=this.toDataYCoord(f,e);b.push([a,d])}this.zoomed_y_=true;var g=this;this.doAnimatedZoom(null,null,c,b,function(){if(g.attr_("zoomCallback")){var i=g.xAxisRange();g.attr_("zoomCallback")(i[0],i[1],g.yAxisRanges())}})};Dygraph.prototype.resetZoom=function(){var c=false,d=false,a=false;if(this.dateWindow_!==null){c=true;d=true}for(var g=0;g<this.axes_.length;g++){if(typeof(this.axes_[g].valueWindow)!=="undefined"&&this.axes_[g].valueWindow!==null){c=true;a=true}}this.clearSelection();if(c){this.zoomed_x_=false;this.zoomed_y_=false;var f=this.rawData_[0][0];var b=this.rawData_[this.rawData_.length-1][0];if(!this.attr_("animatedZooms")){this.dateWindow_=null;for(g=0;g<this.axes_.length;g++){if(this.axes_[g].valueWindow!==null){delete this.axes_[g].valueWindow}}this.drawGraph_();if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,b,this.yAxisRanges())}return}var l=null,m=null,k=null,h=null;if(d){l=this.xAxisRange();m=[f,b]}if(a){k=this.yAxisRanges();var n=this.gatherDatasets_(this.rolledSeries_,null);var o=n.extremes;this.computeYAxisRanges_(o);h=[];for(g=0;g<this.axes_.length;g++){var e=this.axes_[g];h.push((e.valueRange!==null&&e.valueRange!==undefined)?e.valueRange:e.extremeRange)}}var j=this;this.doAnimatedZoom(l,m,k,h,function(){j.dateWindow_=null;for(var p=0;p<j.axes_.length;p++){if(j.axes_[p].valueWindow!==null){delete j.axes_[p].valueWindow}}if(j.attr_("zoomCallback")){j.attr_("zoomCallback")(f,b,j.yAxisRanges())}})}};Dygraph.prototype.doAnimatedZoom=function(a,e,b,c,m){var i=this.attr_("animatedZooms")?Dygraph.ANIMATION_STEPS:1;var l=[];var k=[];var f,d;if(a!==null&&e!==null){for(f=1;f<=i;f++){d=Dygraph.zoomAnimationFunction(f,i);l[f-1]=[a[0]*(1-d)+d*e[0],a[1]*(1-d)+d*e[1]]}}if(b!==null&&c!==null){for(f=1;f<=i;f++){d=Dygraph.zoomAnimationFunction(f,i);var n=[];for(var g=0;g<this.axes_.length;g++){n.push([b[g][0]*(1-d)+d*c[g][0],b[g][1]*(1-d)+d*c[g][1]])}k[f-1]=n}}var h=this;Dygraph.repeatAndCleanup(function(p){if(k.length){for(var o=0;o<h.axes_.length;o++){var j=k[p][o];h.axes_[o].valueWindow=[j[0],j[1]]}}if(l.length){h.dateWindow_=l[p]}h.drawGraph_()},i,Dygraph.ANIMATION_DURATION/i,m)};Dygraph.prototype.getArea=function(){return this.plotter_.area};Dygraph.prototype.eventToDomCoords=function(c){if(c.offsetX&&c.offsetY){return[c.offsetX,c.offsetY]}else{var b=Dygraph.pageX(c)-Dygraph.findPosX(this.mouseEventElement_);var a=Dygraph.pageY(c)-Dygraph.findPosY(this.mouseEventElement_);return[b,a]}};Dygraph.prototype.findClosestRow=function(a){var g=Infinity;var h=-1;var e=this.layout_.points;for(var c=0;c<e.length;c++){var l=e[c];var d=l.length;for(var b=0;b<d;b++){var k=l[b];if(!Dygraph.isValidPoint(k,true)){continue}var f=Math.abs(k.canvasx-a);if(f<g){g=f;h=k.idx}}}return h};Dygraph.prototype.findClosestPoint=function(f,e){var k=Infinity;var h,o,n,l,d,c,j;for(var b=this.layout_.points.length-1;b>=0;--b){var m=this.layout_.points[b];for(var g=0;g<m.length;++g){l=m[g];if(!Dygraph.isValidPoint(l)){continue}o=l.canvasx-f;n=l.canvasy-e;h=o*o+n*n;if(h<k){k=h;d=l;c=b;j=l.idx}}}var a=this.layout_.setNames[c];return{row:j,seriesName:a,point:d}};Dygraph.prototype.findStackedPoint=function(i,h){var p=this.findClosestRow(i);var f,c;for(var d=0;d<this.layout_.points.length;++d){var g=this.getLeftBoundary_(d);var e=p-g;var l=this.layout_.points[d];if(e>=l.length){continue}var m=l[e];if(!Dygraph.isValidPoint(m)){continue}var j=m.canvasy;if(i>m.canvasx&&e+1<l.length){var k=l[e+1];if(Dygraph.isValidPoint(k)){var o=k.canvasx-m.canvasx;if(o>0){var a=(i-m.canvasx)/o;j+=a*(k.canvasy-m.canvasy)}}}else{if(i<m.canvasx&&e>0){var n=l[e-1];if(Dygraph.isValidPoint(n)){var o=m.canvasx-n.canvasx;if(o>0){var a=(m.canvasx-i)/o;j+=a*(n.canvasy-m.canvasy)}}}}if(d===0||j<h){f=m;c=d}}var b=this.layout_.setNames[c];return{row:p,seriesName:b,point:f}};Dygraph.prototype.mouseMove_=function(b){var h=this.layout_.points;if(h===undefined||h===null){return}var e=this.eventToDomCoords(b);var a=e[0];var j=e[1];var f=this.attr_("highlightSeriesOpts");var d=false;if(f&&!this.isSeriesLocked()){var c;if(this.attr_("stackedGraph")){c=this.findStackedPoint(a,j)}else{c=this.findClosestPoint(a,j)}d=this.setSelection(c.row,c.seriesName)}else{var g=this.findClosestRow(a);d=this.setSelection(g)}var i=this.attr_("highlightCallback");if(i&&d){i(b,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}};Dygraph.prototype.getLeftBoundary_=function(b){if(this.boundaryIds_[b]){return this.boundaryIds_[b][0]}else{for(var a=0;a<this.boundaryIds_.length;a++){if(this.boundaryIds_[a]!==undefined){return this.boundaryIds_[a][0]}}return 0}};Dygraph.prototype.animateSelection_=function(f){var e=10;var c=30;if(this.fadeLevel===undefined){this.fadeLevel=0}if(this.animateId===undefined){this.animateId=0}var g=this.fadeLevel;var b=f<0?g:e-g;if(b<=0){if(this.fadeLevel){this.updateSelection_(1)}return}var a=++this.animateId;var d=this;Dygraph.repeatAndCleanup(function(h){if(d.animateId!=a){return}d.fadeLevel+=f;if(d.fadeLevel===0){d.clearSelection()}else{d.updateSelection_(d.fadeLevel/e)}},b,c,function(){})};Dygraph.prototype.updateSelection_=function(d){this.cascadeEvents_("select",{selectedX:this.lastx_,selectedPoints:this.selPoints_});var h;var n=this.canvas_ctx_;if(this.attr_("highlightSeriesOpts")){n.clearRect(0,0,this.width_,this.height_);var f=1-this.attr_("highlightSeriesBackgroundAlpha");if(f){var g=true;if(g){if(d===undefined){this.animateSelection_(1);return}f*=d}n.fillStyle="rgba(255,255,255,"+f+")";n.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,n)}else{if(this.previousVerticalX_>=0){var j=0;var k=this.attr_("labels");for(h=1;h<k.length;h++){var c=this.attr_("highlightCircleSize",k[h]);if(c>j){j=c}}var l=this.previousVerticalX_;n.clearRect(l-j-1,0,2*j+2,this.height_)}}if(this.isUsingExcanvas_&&this.currentZoomRectArgs_){Dygraph.prototype.drawZoomRect_.apply(this,this.currentZoomRectArgs_)}if(this.selPoints_.length>0){var b=this.selPoints_[0].canvasx;n.save();for(h=0;h<this.selPoints_.length;h++){var o=this.selPoints_[h];if(!Dygraph.isOK(o.canvasy)){continue}var a=this.attr_("highlightCircleSize",o.name);var m=this.attr_("drawHighlightPointCallback",o.name);var e=this.plotter_.colors[o.name];if(!m){m=Dygraph.Circles.DEFAULT}n.lineWidth=this.attr_("strokeWidth",o.name);n.strokeStyle=e;n.fillStyle=e;m(this.g,o.name,n,b,o.canvasy,e,a,o.idx)}n.restore();this.previousVerticalX_=b}};Dygraph.prototype.setSelection=function(f,h,g){this.selPoints_=[];var e=false;if(f!==false&&f>=0){if(f!=this.lastRow_){e=true}this.lastRow_=f;for(var d=0;d<this.layout_.points.length;++d){var b=this.layout_.points[d];var c=f-this.getLeftBoundary_(d);if(c<b.length){var a=b[c];if(a.yval!==null){this.selPoints_.push(a)}}}}else{if(this.lastRow_>=0){e=true}this.lastRow_=-1}if(this.selPoints_.length){this.lastx_=this.selPoints_[0].xval}else{this.lastx_=-1}if(h!==undefined){if(this.highlightSet_!==h){e=true}this.highlightSet_=h}if(g!==undefined){this.lockedSet_=g}if(e){this.updateSelection_(undefined)}return e};Dygraph.prototype.mouseOut_=function(a){if(this.attr_("unhighlightCallback")){this.attr_("unhighlightCallback")(a)}if(this.attr_("hideOverlayOnMouseOut")&&!this.lockedSet_){this.clearSelection()}};Dygraph.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{});this.lockedSet_=false;if(this.fadeLevel){this.animateSelection_(-1);return}this.canvas_ctx_.clearRect(0,0,this.width_,this.height_);this.fadeLevel=0;this.selPoints_=[];this.lastx_=-1;this.lastRow_=-1;this.highlightSet_=null};Dygraph.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1){return -1}for(var c=0;c<this.layout_.points.length;c++){var a=this.layout_.points[c];for(var b=0;b<a.length;b++){if(a[b].x==this.selPoints_[0].x){return a[b].idx}}}return -1};Dygraph.prototype.getHighlightSeries=function(){return this.highlightSet_};Dygraph.prototype.isSeriesLocked=function(){return this.lockedSet_};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.predraw_()};Dygraph.prototype.addXTicks_=function(){var a;if(this.dateWindow_){a=[this.dateWindow_[0],this.dateWindow_[1]]}else{a=this.xAxisExtremes()}var c=this.optionsViewForAxis_("x");var b=c("ticker")(a[0],a[1],this.width_,c,this);this.layout_.setXTicks(b)};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null,c,g;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(c=0;c<d.length;c++){g=d[c][1][0];if(g===null||isNaN(g)){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f===null||e>f){f=e}if(h===null||a<h){h=a}}}else{for(c=0;c<d.length;c++){g=d[c][1];if(g===null||isNaN(g)){continue}if(f===null||g>f){f=g}if(h===null||g<h){h=g}}}return[h,f]};Dygraph.prototype.predraw_=function(){var e=new Date();this.layout_.computePlotArea();this.computeYAxes_();if(this.plotter_){this.cascadeEvents_("clearChart");this.plotter_.clear()}if(!this.is_initial_draw_){this.canvas_ctx_.restore();this.hidden_ctx_.restore()}this.canvas_ctx_.save();this.hidden_ctx_.save();this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.hidden_ctx_,this.layout_);this.createRollInterface_();this.cascadeEvents_("predraw");this.rolledSeries_=[null];for(var c=1;c<this.numColumns();c++){var d=this.attr_("logscale");var b=this.extractSeries_(this.rawData_,c,d);b=this.rollingAverage(b,this.rollPeriod_);this.rolledSeries_.push(b)}this.drawGraph_();var a=new Date();this.drawingTimeMs_=(a-e)};Dygraph.PointType=undefined;Dygraph.seriesToPoints_=function(b,j,d,f){var h=[];for(var c=0;c<b.length;++c){var k=b[c];var a=j?k[1][0]:k[1];var e=a===null?null:DygraphLayout.parseFloat_(a);var g={x:NaN,y:NaN,xval:DygraphLayout.parseFloat_(k[0]),yval:e,name:d,idx:c+f};if(j){g.y_top=NaN;g.y_bottom=NaN;g.yval_minus=DygraphLayout.parseFloat_(k[1][1]);g.yval_plus=DygraphLayout.parseFloat_(k[1][2])}h.push(g)}return h};Dygraph.stackPoints_=function(m,l,o,f){var h=null;var d=null;var g=null;var c=-1;var k=function(i){if(c>=i){return}for(var p=i;p<m.length;++p){g=null;if(!isNaN(m[p].yval)&&m[p].yval!==null){c=p;g=m[p];break}}};for(var b=0;b<m.length;++b){var j=m[b];var n=j.xval;if(l[n]===undefined){l[n]=0}var e=j.yval;if(isNaN(e)||e===null){k(b);if(d&&g&&f!="none"){e=d.yval+(g.yval-d.yval)*((n-d.xval)/(g.xval-d.xval))}else{if(d&&f=="all"){e=d.yval}else{if(g&&f=="all"){e=g.yval}else{e=0}}}}else{d=j}var a=l[n];if(h!=n){a+=e;l[n]=a}h=n;j.yval_stacked=a;if(a>o[1]){o[1]=a}if(a<o[0]){o[0]=a}}};Dygraph.prototype.gatherDatasets_=function(w,f){var s=[];var t=[];var q=[];var a={};var u,r;var x=this.attr_("errorBars");var h=this.attr_("customBars");var p=x||h;var b=function(i){if(!p){return i[1]===null}else{return h?i[1][1]===null:x?i[1][0]===null:false}};var n=w.length-1;var l;for(u=n;u>=1;u--){if(!this.visibility()[u-1]){continue}if(f){l=w[u];var z=f[0];var j=f[1];var g=null,y=null;for(r=0;r<l.length;r++){if(l[r][0]>=z&&g===null){g=r}if(l[r][0]<=j){y=r}}if(g===null){g=0}var e=g;var d=true;while(d&&e>0){e--;d=b(l[e])}if(y===null){y=l.length-1}var c=y;d=true;while(d&&c<l.length-1){c++;d=b(l[c])}if(e!==g){g=e}if(c!==y){y=c}s[u-1]=[g,y];l=l.slice(g,y+1)}else{l=w[u];s[u-1]=[0,l.length-1]}var v=this.attr_("labels")[u];var o=this.extremeValues_(l);var m=Dygraph.seriesToPoints_(l,p,v,s[u-1][0]);if(this.attr_("stackedGraph")){Dygraph.stackPoints_(m,q,o,this.attr_("stackedGraphNaNFill"))}a[v]=o;t[u]=m}return{points:t,extremes:a,boundaryIds:s}};Dygraph.prototype.drawGraph_=function(){var a=new Date();var d=this.is_initial_draw_;this.is_initial_draw_=false;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var j=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_);var h=j.points;var k=j.extremes;this.boundaryIds_=j.boundaryIds;this.setIndexByName_={};var g=this.attr_("labels");if(g.length>0){this.setIndexByName_[g[0]]=0}var e=0;for(var f=1;f<h.length;f++){this.setIndexByName_[g[f]]=f;if(!this.visibility()[f-1]){continue}this.layout_.addDataset(g[f],h[f]);this.datasetIndex_[f]=e++}this.computeYAxisRanges_(k);this.layout_.setYAxes(this.axes_);this.addXTicks_();var b=this.zoomed_x_;this.zoomed_x_=b;this.layout_.evaluate();this.renderGraph_(d);if(this.attr_("timingName")){var c=new Date();Dygraph.info(this.attr_("timingName")+" - drawGraph: "+(c-a)+"ms")}};Dygraph.prototype.renderGraph_=function(b){this.cascadeEvents_("clearChart");this.plotter_.clear();if(this.attr_("underlayCallback")){this.attr_("underlayCallback")(this.hidden_ctx_,this.layout_.getPlotArea(),this,this)}var c={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_("willDrawChart",c);this.plotter_.render();this.cascadeEvents_("didDrawChart",c);this.lastRow_=-1;this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this,b)}if(b){this.readyFired_=true;while(this.readyFns_.length>0){var a=this.readyFns_.pop();a(this)}}};Dygraph.prototype.computeYAxes_=function(){var b,d,c,f,a;if(this.axes_!==undefined&&this.user_attrs_.hasOwnProperty("valueRange")===false){b=[];for(c=0;c<this.axes_.length;c++){b.push(this.axes_[c].valueWindow)}}this.axes_=[];for(d=0;d<this.attributes_.numAxes();d++){f={g:this};Dygraph.update(f,this.attributes_.axisOptions(d));this.axes_[d]=f}a=this.attr_("valueRange");if(a){this.axes_[0].valueRange=a}if(b!==undefined){var e=Math.min(b.length,this.axes_.length);for(c=0;c<e;c++){this.axes_[c].valueWindow=b[c]}}for(d=0;d<this.axes_.length;d++){if(d===0){f=this.optionsViewForAxis_("y"+(d?"2":""));a=f("valueRange");if(a){this.axes_[d].valueRange=a}}else{var g=this.user_attrs_.axes;if(g&&g.y2){a=g.y2.valueRange;if(a){this.axes_[d].valueRange=a}}}}};Dygraph.prototype.numAxes=function(){return this.attributes_.numAxes()};Dygraph.prototype.axisPropertiesForSeries=function(a){return this.axes_[this.attributes_.axisForSeries(a)]};Dygraph.prototype.computeYAxisRanges_=function(a){var g=function(i){return isNaN(parseFloat(i))};var q=this.attributes_.numAxes();var b,x,o,B;var p;for(var y=0;y<q;y++){var c=this.axes_[y];var C=this.attributes_.getForAxis("logscale",y);var G=this.attributes_.getForAxis("includeZero",y);var l=this.attributes_.getForAxis("independentTicks",y);o=this.attributes_.seriesForAxis(y);b=true;B=0.1;if(this.attr_("yRangePad")!==null){b=false;B=this.attr_("yRangePad")/this.plotter_.area.h}if(o.length===0){c.extremeRange=[0,1]}else{var D=Infinity;var A=-Infinity;var t,s;for(var w=0;w<o.length;w++){if(!a.hasOwnProperty(o[w])){continue}t=a[o[w]][0];if(t!==null){D=Math.min(t,D)}s=a[o[w]][1];if(s!==null){A=Math.max(s,A)}}if(G&&!C){if(D>0){D=0}if(A<0){A=0}}if(D==Infinity){D=0}if(A==-Infinity){A=1}x=A-D;if(x===0){if(A!==0){x=Math.abs(A)}else{A=1;x=1}}var h,H;if(C){if(b){h=A+B*x;H=D}else{var E=Math.exp(Math.log(x)*B);h=A*E;H=D/E}}else{h=A+B*x;H=D-B*x;if(b&&!this.attr_("avoidMinZero")){if(H<0&&D>=0){H=0}if(h>0&&A<=0){h=0}}}c.extremeRange=[H,h]}if(c.valueWindow){c.computedValueRange=[c.valueWindow[0],c.valueWindow[1]]}else{if(c.valueRange){var e=g(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0];var d=g(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];if(!b){if(c.logscale){var E=Math.exp(Math.log(x)*B);e*=E;d/=E}else{x=d-e;e-=x*B;d+=x*B}}c.computedValueRange=[e,d]}else{c.computedValueRange=c.extremeRange}}if(l){c.independentTicks=l;var r=this.optionsViewForAxis_("y"+(y?"2":""));var F=r("ticker");c.ticks=F(c.computedValueRange[0],c.computedValueRange[1],this.height_,r,this);if(!p){p=c}}}if(p===undefined){throw ('Configuration Error: At least one axis has to have the "independentTicks" option activated.')}for(var y=0;y<q;y++){var c=this.axes_[y];if(!c.independentTicks){var r=this.optionsViewForAxis_("y"+(y?"2":""));var F=r("ticker");var m=p.ticks;var n=p.computedValueRange[1]-p.computedValueRange[0];var I=c.computedValueRange[1]-c.computedValueRange[0];var f=[];for(var v=0;v<m.length;v++){var u=(m[v].v-p.computedValueRange[0])/n;var z=c.computedValueRange[0]+u*I;f.push(z)}c.ticks=F(c.computedValueRange[0],c.computedValueRange[1],this.height_,r,this,f)}}};Dygraph.prototype.extractSeries_=function(a,f,c){var g=[];var h=this.attr_("errorBars");var e=this.attr_("customBars");for(var d=0;d<a.length;d++){var l=a[d][0];var m=a[d][f];if(c){if(h||e){for(var b=0;b<m.length;b++){if(m[b]<=0){m=null;break}}}else{if(m<=0){m=null}}}if(m!==null){g.push([l,m])}else{g.push([l,h?[null,null]:e?[null,null,null]:m])}}return g};Dygraph.prototype.rollingAverage=function(l,d){d=Math.min(d,l.length);var b=[];var t=this.attr_("sigma");var G,o,z,x,m,c,F,A;if(this.fractions_){var k=0;var h=0;var e=100;for(z=0;z<l.length;z++){k+=l[z][1][0];h+=l[z][1][1];if(z-d>=0){k-=l[z-d][1][0];h-=l[z-d][1][1]}var C=l[z][0];var w=h?k/h:0;if(this.attr_("errorBars")){if(this.attr_("wilsonInterval")){if(h){var s=w<0?0:w,u=h;var B=t*Math.sqrt(s*(1-s)/u+t*t/(4*u*u));var a=1+t*t/h;G=(s+t*t/(2*h)-B)/a;o=(s+t*t/(2*h)+B)/a;b[z]=[C,[s*e,(s-G)*e,(o-s)*e]]}else{b[z]=[C,[0,0,0]]}}else{A=h?t*Math.sqrt(w*(1-w)/h):1;b[z]=[C,[e*w,e*A,e*A]]}}else{b[z]=[C,e*w]}}}else{if(this.attr_("customBars")){G=0;var D=0;o=0;var g=0;for(z=0;z<l.length;z++){var E=l[z][1];m=E[1];b[z]=[l[z][0],[m,m-E[0],E[2]-m]];if(m!==null&&!isNaN(m)){G+=E[0];D+=m;o+=E[2];g+=1}if(z-d>=0){var r=l[z-d];if(r[1][1]!==null&&!isNaN(r[1][1])){G-=r[1][0];D-=r[1][1];o-=r[1][2];g-=1}}if(g){b[z]=[l[z][0],[1*D/g,1*(D-G)/g,1*(o-D)/g]]}else{b[z]=[l[z][0],[null,null,null]]}}}else{if(!this.attr_("errorBars")){if(d==1){return l}for(z=0;z<l.length;z++){c=0;F=0;for(x=Math.max(0,z-d+1);x<z+1;x++){m=l[x][1];if(m===null||isNaN(m)){continue}F++;c+=l[x][1]}if(F){b[z]=[l[z][0],c/F]}else{b[z]=[l[z][0],null]}}}else{for(z=0;z<l.length;z++){c=0;var f=0;F=0;for(x=Math.max(0,z-d+1);x<z+1;x++){m=l[x][1][0];if(m===null||isNaN(m)){continue}F++;c+=l[x][1][0];f+=Math.pow(l[x][1][1],2)}if(F){A=Math.sqrt(f)/F;b[z]=[l[z][0],[c/F,t*A,t*A]]}else{var q=(d==1)?l[z][1][0]:null;b[z]=[l[z][0],[q,q,q]]}}}}}return b};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;var c=b.indexOf("-");if((c>0&&(b[c-1]!="e"&&b[c-1]!="E"))||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}this.setXAxisOptions_(a)};Dygraph.prototype.setXAxisOptions_=function(a){if(a){this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.axes.x.valueFormatter=Dygraph.dateString_;this.attrs_.axes.x.ticker=Dygraph.dateTicker;this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter}else{this.attrs_.xValueParser=function(b){return parseFloat(b)};this.attrs_.axes.x.valueFormatter=function(b){return b};this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks;this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}};Dygraph.prototype.parseFloat_=function(a,c,b){var e=parseFloat(a);if(!isNaN(e)){return e}if(/^ *$/.test(a)){return null}if(/^ *nan *$/i.test(a)){return NaN}var d="Unable to parse '"+a+"' as a number";if(b!==null&&c!==null){d+=" on line "+(1+c)+" ('"+b+"') of CSV."}this.error(d);return null};Dygraph.prototype.parseCSV_=function(t){var r=[];var s=Dygraph.detectLineDelimiter(t);var a=t.split(s||"\n");var g,k;var p=this.attr_("delimiter");if(a[0].indexOf(p)==-1&&a[0].indexOf("\t")>=0){p="\t"}var b=0;if(!("labels" in this.user_attrs_)){b=1;this.attrs_.labels=a[0].split(p);this.attributes_.reparseSeries()}var o=0;var m;var q=false;var c=this.attr_("labels").length;var f=false;for(var l=b;l<a.length;l++){var e=a[l];o=l;if(e.length===0){continue}if(e[0]=="#"){continue}var d=e.split(p);if(d.length<2){continue}var h=[];if(!q){this.detectTypeFromString_(d[0]);m=this.attr_("xValueParser");q=true}h[0]=m(d[0],this);if(this.fractions_){for(k=1;k<d.length;k++){g=d[k].split("/");if(g.length!=2){this.error('Expected fractional "num/den" values in CSV data but found a value \''+d[k]+"' on line "+(1+l)+" ('"+e+"') which is not of this form.");h[k]=[0,0]}else{h[k]=[this.parseFloat_(g[0],l,e),this.parseFloat_(g[1],l,e)]}}}else{if(this.attr_("errorBars")){if(d.length%2!=1){this.error("Expected alternating (value, stdev.) pairs in CSV data but line "+(1+l)+" has an odd number of values ("+(d.length-1)+"): '"+e+"'")}for(k=1;k<d.length;k+=2){h[(k+1)/2]=[this.parseFloat_(d[k],l,e),this.parseFloat_(d[k+1],l,e)]}}else{if(this.attr_("customBars")){for(k=1;k<d.length;k++){var u=d[k];if(/^ *$/.test(u)){h[k]=[null,null,null]}else{g=u.split(";");if(g.length==3){h[k]=[this.parseFloat_(g[0],l,e),this.parseFloat_(g[1],l,e),this.parseFloat_(g[2],l,e)]}else{this.warn('When using customBars, values must be either blank or "low;center;high" tuples (got "'+u+'" on line '+(1+l))}}}}else{for(k=1;k<d.length;k++){h[k]=this.parseFloat_(d[k],l,e)}}}}if(r.length>0&&h[0]<r[r.length-1][0]){f=true}if(h.length!=c){this.error("Number of columns in line "+l+" ("+h.length+") does not agree with number of labels ("+c+") "+e)}if(l===0&&this.attr_("labels")){var n=true;for(k=0;n&&k<h.length;k++){if(h[k]){n=false}}if(n){this.warn("The dygraphs 'labels' option is set, but the first row of CSV data ('"+e+"') appears to also contain labels. Will drop the CSV labels and use the option labels.");continue}}r.push(h)}if(f){this.warn("CSV is out of order; order it correctly to speed loading.");r.sort(function(j,i){return j[0]-i[0]})}return r};Dygraph.prototype.parseArray_=function(c){if(c.length===0){this.error("Can't plot empty data set");return null}if(c[0].length===0){this.error("Data set cannot contain an empty row");return null}var a;if(this.attr_("labels")===null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(a=1;a<c[0].length;a++){this.attrs_.labels.push("Y"+a)}this.attributes_.reparseSeries()}else{var b=this.attr_("labels");if(b.length!=c[0].length){this.error("Mismatch between number of labels ("+b+") and number of columns in array ("+c[0].length+")");return null}}if(Dygraph.isDateLike(c[0][0])){this.attrs_.axes.x.valueFormatter=Dygraph.dateString_;this.attrs_.axes.x.ticker=Dygraph.dateTicker;this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter;var d=Dygraph.clone(c);for(a=0;a<c.length;a++){if(d[a].length===0){this.error("Row "+(1+a)+" of data is empty");return null}if(d[a][0]===null||typeof(d[a][0].getTime)!="function"||isNaN(d[a][0].getTime())){this.error("x value in row "+(1+a)+" is not a Date");return null}d[a][0]=d[a][0].getTime()}return d}else{this.attrs_.axes.x.valueFormatter=function(e){return e};this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks;this.attrs_.axes.x.axisLabelFormatter=Dygraph.numberAxisLabelFormatter;return c}};Dygraph.prototype.parseDataTable_=function(w){var d=function(i){var j=String.fromCharCode(65+i%26);i=Math.floor(i/26);while(i>0){j=String.fromCharCode(65+(i-1)%26)+j.toLowerCase();i=Math.floor((i-1)/26)}return j};var h=w.getNumberOfColumns();var g=w.getNumberOfRows();var f=w.getColumnType(0);if(f=="date"||f=="datetime"){this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.axes.x.valueFormatter=Dygraph.dateString_;this.attrs_.axes.x.ticker=Dygraph.dateTicker;this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter}else{if(f=="number"){this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.axes.x.valueFormatter=function(i){return i};this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks;this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+f+"')");return null}}var m=[];var t={};var s=false;var q,o;for(q=1;q<h;q++){var b=w.getColumnType(q);if(b=="number"){m.push(q)}else{if(b=="string"&&this.attr_("displayAnnotations")){var r=m[m.length-1];if(!t.hasOwnProperty(r)){t[r]=[q]}else{t[r].push(q)}s=true}else{this.error("Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true")}}}var u=[w.getColumnLabel(0)];for(q=0;q<m.length;q++){u.push(w.getColumnLabel(m[q]));if(this.attr_("errorBars")){q+=1}}this.attrs_.labels=u;h=u.length;var v=[];var l=false;var a=[];for(q=0;q<g;q++){var e=[];if(typeof(w.getValue(q,0))==="undefined"||w.getValue(q,0)===null){this.warn("Ignoring row "+q+" of DataTable because of undefined or null first column.");continue}if(f=="date"||f=="datetime"){e.push(w.getValue(q,0).getTime())}else{e.push(w.getValue(q,0))}if(!this.attr_("errorBars")){for(o=0;o<m.length;o++){var c=m[o];e.push(w.getValue(q,c));if(s&&t.hasOwnProperty(c)&&w.getValue(q,t[c][0])!==null){var p={};p.series=w.getColumnLabel(c);p.xval=e[0];p.shortText=d(a.length);p.text="";for(var n=0;n<t[c].length;n++){if(n){p.text+="\n"}p.text+=w.getValue(q,t[c][n])}a.push(p)}}for(o=0;o<e.length;o++){if(!isFinite(e[o])){e[o]=null}}}else{for(o=0;o<h-1;o++){e.push([w.getValue(q,1+2*o),w.getValue(q,2+2*o)])}}if(v.length>0&&e[0]<v[v.length-1][0]){l=true}v.push(e)}if(l){this.warn("DataTable is out of order; order it correctly to speed loading.");v.sort(function(j,i){return j[0]-i[0]})}this.rawData_=v;if(a.length>0){this.setAnnotations(a,true)}this.attributes_.reparseSeries()};Dygraph.prototype.start_=function(){var d=this.file_;if(typeof d=="function"){d=d()}if(Dygraph.isArrayLike(d)){this.rawData_=this.parseArray_(d);this.predraw_()}else{if(typeof d=="object"&&typeof d.getColumnRange=="function"){this.parseDataTable_(d);this.predraw_()}else{if(typeof d=="string"){var c=Dygraph.detectLineDelimiter(d);if(c){this.loadedEvent_(d)}else{var b;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{b=new ActiveXObject("Microsoft.XMLHTTP")}var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status===200||b.status===0){a.loadedEvent_(b.responseText)}}};b.open("GET",d,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof d))}}}};Dygraph.prototype.updateOptions=function(e,b){if(typeof(b)=="undefined"){b=false}var d=e.file;var c=Dygraph.mapLegacyOptions_(e);if("rollPeriod" in c){this.rollPeriod_=c.rollPeriod}if("dateWindow" in c){this.dateWindow_=c.dateWindow;if(!("isZoomedIgnoreProgrammaticZoom" in c)){this.zoomed_x_=(c.dateWindow!==null)}}if("valueRange" in c&&!("isZoomedIgnoreProgrammaticZoom" in c)){this.zoomed_y_=(c.valueRange!==null)}var a=Dygraph.isPixelChangingOptionList(this.attr_("labels"),c);Dygraph.updateDeep(this.user_attrs_,c);this.attributes_.reparseSeries();if(d){this.file_=d;if(!b){this.start_()}}else{if(!b){if(a){this.predraw_()}else{this.renderGraph_(false)}}}};Dygraph.mapLegacyOptions_=function(c){var a={};for(var b in c){if(b=="file"){continue}if(c.hasOwnProperty(b)){a[b]=c[b]}}var e=function(g,f,h){if(!a.axes){a.axes={}}if(!a.axes[g]){a.axes[g]={}}a.axes[g][f]=h};var d=function(f,g,h){if(typeof(c[f])!="undefined"){Dygraph.warn("Option "+f+" is deprecated. Use the "+h+" option for the "+g+" axis instead. (e.g. { axes : { "+g+" : { "+h+" : ... } } } (see http://dygraphs.com/per-axis.html for more information.");e(g,h,c[f]);delete a[f]}};d("xValueFormatter","x","valueFormatter");d("pixelsPerXLabel","x","pixelsPerLabel");d("xAxisLabelFormatter","x","axisLabelFormatter");d("xTicker","x","ticker");d("yValueFormatter","y","valueFormatter");d("pixelsPerYLabel","y","pixelsPerLabel");d("yAxisLabelFormatter","y","axisLabelFormatter");d("yTicker","y","ticker");return a};Dygraph.prototype.resize=function(d,b){if(this.resize_lock){return}this.resize_lock=true;if((d===null)!=(b===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");d=b=null}var a=this.width_;var c=this.height_;if(d){this.maindiv_.style.width=d+"px";this.maindiv_.style.height=b+"px";this.width_=d;this.height_=b}else{this.width_=this.maindiv_.clientWidth;this.height_=this.maindiv_.clientHeight}if(a!=this.width_||c!=this.height_){this.resizeElements_();this.predraw_()}this.resize_lock=false};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.predraw_()};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.numColumns()-1){this.attrs_.visibility.push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0||b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.predraw_()}};Dygraph.prototype.size=function(){return{width:this.width_,height:this.height_}};Dygraph.prototype.setAnnotations=function(b,a){Dygraph.addAnnotationRule();this.annotations_=b;if(!this.layout_){this.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html");return}this.layout_.setAnnotations(this.annotations_);if(!a){this.predraw_()}};Dygraph.prototype.annotations=function(){return this.annotations_};Dygraph.prototype.getLabels=function(){var a=this.attr_("labels");return a?a.slice():null};Dygraph.prototype.indexFromSetName=function(a){return this.setIndexByName_[a]};Dygraph.prototype.ready=function(a){if(this.is_initial_draw_){this.readyFns_.push(a)}else{a(this)}};Dygraph.addAnnotationRule=function(){if(Dygraph.addedAnnotationCSS){return}var f="border: 1px solid black; background-color: white; text-align: center;";var e=document.createElement("style");e.type="text/css";document.getElementsByTagName("head")[0].appendChild(e);for(var b=0;b<document.styleSheets.length;b++){if(document.styleSheets[b].disabled){continue}var d=document.styleSheets[b];try{if(d.insertRule){var a=d.cssRules?d.cssRules.length:0;d.insertRule(".dygraphDefaultAnnotation { "+f+" }",a)}else{if(d.addRule){d.addRule(".dygraphDefaultAnnotation",f)}}Dygraph.addedAnnotationCSS=true;return}catch(c){}}this.warn("Unable to add default annotation CSS rule; display may be off.")};var DateGraph=Dygraph;"use strict";Dygraph.LOG_SCALE=10;Dygraph.LN_TEN=Math.log(Dygraph.LOG_SCALE);Dygraph.log10=function(a){return Math.log(a)/Dygraph.LN_TEN};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.LOG_STACK_TRACES=false;Dygraph.DOTTED_LINE=[2,2];Dygraph.DASHED_LINE=[7,3];Dygraph.DOT_DASH_LINE=[7,2,2,2];Dygraph.log=function(c,g){var b;if(typeof(printStackTrace)!="undefined"){try{b=printStackTrace({guess:false});while(b[0].indexOf("stacktrace")!=-1){b.splice(0,1)}b.splice(0,2);for(var d=0;d<b.length;d++){b[d]=b[d].replace(/\([^)]*\/(.*)\)/,"@$1").replace(/\@.*\/([^\/]*)/,"@$1").replace("[object Object].","")}var j=b.splice(0,1)[0];g+=" ("+j.replace(/^.*@ ?/,"")+")"}catch(h){}}if(typeof(window.console)!="undefined"){var a=window.console;var f=function(e,k,i){if(k&&typeof(k)=="function"){k.call(e,i)}else{e.log(i)}};switch(c){case Dygraph.DEBUG:f(a,a.debug,"dygraphs: "+g);break;case Dygraph.INFO:f(a,a.info,"dygraphs: "+g);break;case Dygraph.WARNING:f(a,a.warn,"dygraphs: "+g);break;case Dygraph.ERROR:f(a,a.error,"dygraphs: "+g);break}}if(Dygraph.LOG_STACK_TRACES){window.console.log(b.join("\n"))}};Dygraph.info=function(a){Dygraph.log(Dygraph.INFO,a)};Dygraph.prototype.info=Dygraph.info;Dygraph.warn=function(a){Dygraph.log(Dygraph.WARNING,a)};Dygraph.prototype.warn=Dygraph.warn;Dygraph.error=function(a){Dygraph.log(Dygraph.ERROR,a)};Dygraph.prototype.error=Dygraph.error;Dygraph.getContext=function(a){return(a.getContext("2d"))};Dygraph.addEvent=function addEvent(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false)}else{c[b+a]=function(){a(window.event)};c.attachEvent("on"+b,c[b+a])}};Dygraph.prototype.addAndTrackEvent=function(c,b,a){Dygraph.addEvent(c,b,a);this.registeredEvents_.push({elem:c,type:b,fn:a})};Dygraph.removeEvent=function(c,b,a){if(c.removeEventListener){c.removeEventListener(b,a,false)}else{try{c.detachEvent("on"+b,c[b+a])}catch(d){}c[b+a]=null}};Dygraph.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_){for(var a=0;a<this.registeredEvents_.length;a++){var b=this.registeredEvents_[a];Dygraph.removeEvent(b.elem,b.type,b.fn)}}this.registeredEvents_=[]};Dygraph.cancelEvent=function(a){a=a?a:window.event;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}a.cancelBubble=true;a.cancel=true;a.returnValue=false;return false};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.findPosX=function(c){var d=0;if(c.offsetParent){var a=c;while(1){var b="0";if(window.getComputedStyle){b=window.getComputedStyle(a,null).borderLeft||"0"}d+=parseInt(b,10);d+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(c.x){d+=c.x}}while(c&&c!=document.body){d-=c.scrollLeft;c=c.parentNode}return d};Dygraph.findPosY=function(c){var b=0;if(c.offsetParent){var a=c;while(1){var d="0";if(window.getComputedStyle){d=window.getComputedStyle(a,null).borderTop||"0"}b+=parseInt(d,10);b+=a.offsetTop;if(!a.offsetParent){break}a=a.offsetParent}}else{if(c.y){b+=c.y}}while(c&&c!=document.body){b-=c.scrollTop;c=c.parentNode}return b};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document.documentElement;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document.documentElement;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.isOK=function(a){return !!a&&!isNaN(a)};Dygraph.isValidPoint=function(b,a){if(!b){return false}if(b.yval===null){return false}if(b.x===null||b.x===undefined){return false}if(b.y===null||b.y===undefined){return false}if(isNaN(b.x)||(!a&&isNaN(b.y))){return false}return true};Dygraph.floatFormat=function(a,b){var c=Math.min(Math.max(1,b||2),21);return(Math.abs(a)<0.001&&a!==0)?a.toExponential(c-1):a.toPrecision(c)};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.binarySearch=function(a,d,i,e,b){if(e===null||e===undefined||b===null||b===undefined){e=0;b=d.length-1}if(e>b){return -1}if(i===null||i===undefined){i=0}var h=function(j){return j>=0&&j<d.length};var g=parseInt((e+b)/2,10);var c=d[g];var f;if(c==a){return g}else{if(c>a){if(i>0){f=g-1;if(h(f)&&d[f]<a){return g}}return Dygraph.binarySearch(a,d,i,e,g-1)}else{if(c<a){if(i<0){f=g+1;if(h(f)&&d[f]>a){return g}}return Dygraph.binarySearch(a,d,i,g+1,b)}}}return -1};Dygraph.dateParser=function(a){var b;var c;if(a.search("-")==-1||a.search("T")!=-1||a.search("Z")!=-1){c=Dygraph.dateStrToMillis(a);if(c&&!isNaN(c)){return c}}if(a.search("-")!=-1){b=a.replace("-","/","g");while(b.search("-")!=-1){b=b.replace("-","/")}c=Dygraph.dateStrToMillis(b)}else{if(a.length==8){b=a.substr(0,4)+"/"+a.substr(4,2)+"/"+a.substr(6,2);c=Dygraph.dateStrToMillis(b)}else{c=Dygraph.dateStrToMillis(a)}}if(!c||isNaN(c)){Dygraph.error("Couldn't parse "+a+" as a date")}return c};Dygraph.dateStrToMillis=function(a){return new Date(a).getTime()};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.updateDeep=function(b,d){function c(e){return(typeof Node==="object"?e instanceof Node:typeof e==="object"&&typeof e.nodeType==="number"&&typeof e.nodeName==="string")}if(typeof(d)!="undefined"&&d!==null){for(var a in d){if(d.hasOwnProperty(a)){if(d[a]===null){b[a]=null}else{if(Dygraph.isArrayLike(d[a])){b[a]=d[a].slice()}else{if(c(d[a])){b[a]=d[a]}else{if(typeof(d[a])=="object"){if(typeof(b[a])!="object"||b[a]===null){b[a]={}}Dygraph.updateDeep(b[a],d[a])}else{b[a]=d[a]}}}}}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.createCanvas=function(){var a=document.createElement("canvas");var b=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(b&&(typeof(G_vmlCanvasManager)!="undefined")){a=G_vmlCanvasManager.initElement((a))}return a};Dygraph.isAndroid=function(){return(/Android/).test(navigator.userAgent)};Dygraph.Iterator=function(d,c,b,a){c=c||0;b=b||d.length;this.hasNext=true;this.peek=null;this.start_=c;this.array_=d;this.predicate_=a;this.end_=Math.min(d.length,c+b);this.nextIdx_=c-1;this.next()};Dygraph.Iterator.prototype.next=function(){if(!this.hasNext){return null}var c=this.peek;var b=this.nextIdx_+1;var a=false;while(b<this.end_){if(!this.predicate_||this.predicate_(this.array_,b)){this.peek=this.array_[b];a=true;break}b++}this.nextIdx_=b;if(!a){this.hasNext=false;this.peek=null}return c};Dygraph.createIterator=function(d,c,b,a){return new Dygraph.Iterator(d,c,b,a)};Dygraph.requestAnimFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1000/60)}})();Dygraph.repeatAndCleanup=function(h,g,f,a){var i=0;var d;var b=new Date().getTime();h(i);if(g==1){a();return}var e=g-1;(function c(){if(i>=g){return}Dygraph.requestAnimFrame.call(window,function(){var l=new Date().getTime();var j=l-b;d=i;i=Math.floor(j/f);var k=i-d;var m=(i+k)>e;if(m||(i>=e)){h(e);a()}else{if(k!==0){h(i)}c()}})})()};Dygraph.isPixelChangingOptionList=function(h,e){var d={annotationClickHandler:true,annotationDblClickHandler:true,annotationMouseOutHandler:true,annotationMouseOverHandler:true,axisLabelColor:true,axisLineColor:true,axisLineWidth:true,clickCallback:true,digitsAfterDecimal:true,drawCallback:true,drawHighlightPointCallback:true,drawPoints:true,drawPointCallback:true,drawXGrid:true,drawYGrid:true,fillAlpha:true,gridLineColor:true,gridLineWidth:true,hideOverlayOnMouseOut:true,highlightCallback:true,highlightCircleSize:true,interactionModel:true,isZoomedIgnoreProgrammaticZoom:true,labelsDiv:true,labelsDivStyles:true,labelsDivWidth:true,labelsKMB:true,labelsKMG2:true,labelsSeparateLines:true,labelsShowZeroValues:true,legend:true,maxNumberWidth:true,panEdgeFraction:true,pixelsPerYLabel:true,pointClickCallback:true,pointSize:true,rangeSelectorPlotFillColor:true,rangeSelectorPlotStrokeColor:true,showLabelsOnHighlight:true,showRoller:true,sigFigs:true,strokeWidth:true,underlayCallback:true,unhighlightCallback:true,xAxisLabelFormatter:true,xTicker:true,xValueFormatter:true,yAxisLabelFormatter:true,yValueFormatter:true,zoomCallback:true};var a=false;var b={};if(h){for(var f=1;f<h.length;f++){b[h[f]]=true}}for(var g in e){if(a){break}if(e.hasOwnProperty(g)){if(b[g]){for(var c in e[g]){if(a){break}if(e[g].hasOwnProperty(c)&&!d[c]){a=true}}}else{if(!d[g]){a=true}}}}return a};Dygraph.compareArrays=function(c,b){if(!Dygraph.isArrayLike(c)||!Dygraph.isArrayLike(b)){return false}if(c.length!==b.length){return false}for(var a=0;a<c.length;a++){if(c[a]!==b[a]){return false}}return true};Dygraph.regularShape_=function(o,c,i,f,e,a,n){a=a||0;n=n||Math.PI*2/c;o.beginPath();var g=a;var d=g;var h=function(){var p=f+(Math.sin(d)*i);var q=e+(-Math.cos(d)*i);return[p,q]};var b=h();var l=b[0];var j=b[1];o.moveTo(l,j);for(var m=0;m<c;m++){d=(m==c-1)?g:(d+n);var k=h();o.lineTo(k[0],k[1])}o.fill();o.stroke()};Dygraph.shapeFunction_=function(b,a,c){return function(j,i,f,e,k,h,d){f.strokeStyle=h;f.fillStyle="white";Dygraph.regularShape_(f,b,d,e,k,a,c)}};Dygraph.Circles={DEFAULT:function(h,f,b,e,d,c,a){b.beginPath();b.fillStyle=c;b.arc(e,d,a,0,2*Math.PI,false);b.fill()},TRIANGLE:Dygraph.shapeFunction_(3),SQUARE:Dygraph.shapeFunction_(4,Math.PI/4),DIAMOND:Dygraph.shapeFunction_(4),PENTAGON:Dygraph.shapeFunction_(5),HEXAGON:Dygraph.shapeFunction_(6),CIRCLE:function(f,e,c,b,h,d,a){c.beginPath();c.strokeStyle=d;c.fillStyle="white";c.arc(b,h,a,0,2*Math.PI,false);c.fill();c.stroke()},STAR:Dygraph.shapeFunction_(5,0,4*Math.PI/5),PLUS:function(f,e,c,b,h,d,a){c.strokeStyle=d;c.beginPath();c.moveTo(b+a,h);c.lineTo(b-a,h);c.closePath();c.stroke();c.beginPath();c.moveTo(b,h+a);c.lineTo(b,h-a);c.closePath();c.stroke()},EX:function(f,e,c,b,h,d,a){c.strokeStyle=d;c.beginPath();c.moveTo(b+a,h+a);c.lineTo(b-a,h-a);c.closePath();c.stroke();c.beginPath();c.moveTo(b+a,h-a);c.lineTo(b-a,h+a);c.closePath();c.stroke()}};Dygraph.IFrameTarp=function(){this.tarps=[]};Dygraph.IFrameTarp.prototype.cover=function(){var f=document.getElementsByTagName("iframe");for(var c=0;c<f.length;c++){var e=f[c];var b=Dygraph.findPosX(e),h=Dygraph.findPosY(e),d=e.offsetWidth,a=e.offsetHeight;var g=document.createElement("div");g.style.position="absolute";g.style.left=b+"px";g.style.top=h+"px";g.style.width=d+"px";g.style.height=a+"px";g.style.zIndex=999;document.body.appendChild(g);this.tarps.push(g)}};Dygraph.IFrameTarp.prototype.uncover=function(){for(var a=0;a<this.tarps.length;a++){this.tarps[a].parentNode.removeChild(this.tarps[a])}this.tarps=[]};Dygraph.detectLineDelimiter=function(c){for(var a=0;a<c.length;a++){var b=c.charAt(a);if(b==="\r"){if(((a+1)<c.length)&&(c.charAt(a+1)==="\n")){return"\r\n"}return b}if(b==="\n"){if(((a+1)<c.length)&&(c.charAt(a+1)==="\r")){return"\n\r"}return b}}return null};Dygraph.isNodeContainedBy=function(b,a){if(a===null||b===null){return false}var c=(b);while(c&&c!==a){c=c.parentNode}return(c===a)};Dygraph.pow=function(a,b){if(b<0){return 1/Math.pow(a,-b)}return Math.pow(a,b)};Dygraph.dateSetters={ms:Date.prototype.setMilliseconds,s:Date.prototype.setSeconds,m:Date.prototype.setMinutes,h:Date.prototype.setHours};Dygraph.setDateSameTZ=function(c,b){var f=c.getTimezoneOffset();for(var a in b){if(!b.hasOwnProperty(a)){continue}var e=Dygraph.dateSetters[a];if(!e){throw"Invalid setter: "+a}e.call(c,b[a]);if(c.getTimezoneOffset()!=f){c.setTime(c.getTime()+(f-c.getTimezoneOffset())*60*1000)}}};"use strict";Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";if(typeof(this.date_graph)!="undefined"){this.date_graph.destroy()}this.date_graph=new Dygraph(this.container,b,a)};Dygraph.GVizChart.prototype.setSelection=function(b){var a=false;if(b.length){a=b[0].row}this.date_graph.setSelection(a)};Dygraph.GVizChart.prototype.getSelection=function(){var b=[];var d=this.date_graph.getSelection();if(d<0){return b}var a=this.date_graph.layout_.points;for(var c=0;c<a.length;++c){b.push({row:d,column:c+1})}return b};"use strict";Dygraph.Interaction={};Dygraph.Interaction.startPan=function(o,t,c){var r,b;c.isPanning=true;var k=t.xAxisRange();c.dateRange=k[1]-k[0];c.initialLeftmostDate=k[0];c.xUnitsPerPixel=c.dateRange/(t.plotter_.area.w-1);if(t.attr_("panEdgeFraction")){var x=t.width_*t.attr_("panEdgeFraction");var d=t.xAxisExtremes();var j=t.toDomXCoord(d[0])-x;var l=t.toDomXCoord(d[1])+x;var u=t.toDataXCoord(j);var w=t.toDataXCoord(l);c.boundedDates=[u,w];var f=[];var a=t.height_*t.attr_("panEdgeFraction");for(r=0;r<t.axes_.length;r++){b=t.axes_[r];var p=b.extremeRange;var q=t.toDomYCoord(p[0],r)+a;var s=t.toDomYCoord(p[1],r)-a;var n=t.toDataYCoord(q,r);var e=t.toDataYCoord(s,r);f[r]=[n,e]}c.boundedValues=f}c.is2DPan=false;c.axes=[];for(r=0;r<t.axes_.length;r++){b=t.axes_[r];var h={};var m=t.yAxisRange(r);var v=t.attributes_.getForAxis("logscale",r);if(v){h.initialTopValue=Dygraph.log10(m[1]);h.dragValueRange=Dygraph.log10(m[1])-Dygraph.log10(m[0])}else{h.initialTopValue=m[1];h.dragValueRange=m[1]-m[0]}h.unitsPerPixel=h.dragValueRange/(t.plotter_.area.h-1);c.axes.push(h);if(b.valueWindow||b.valueRange){c.is2DPan=true}}};Dygraph.Interaction.movePan=function(b,k,c){c.dragEndX=k.dragGetX_(b,c);c.dragEndY=k.dragGetY_(b,c);var h=c.initialLeftmostDate-(c.dragEndX-c.dragStartX)*c.xUnitsPerPixel;if(c.boundedDates){h=Math.max(h,c.boundedDates[0])}var a=h+c.dateRange;if(c.boundedDates){if(a>c.boundedDates[1]){h=h-(a-c.boundedDates[1]);a=h+c.dateRange}}k.dateWindow_=[h,a];if(c.is2DPan){var d=c.dragEndY-c.dragStartY;for(var j=0;j<k.axes_.length;j++){var e=k.axes_[j];var o=c.axes[j];var p=d*o.unitsPerPixel;var f=c.boundedValues?c.boundedValues[j]:null;var l=o.initialTopValue+p;if(f){l=Math.min(l,f[1])}var n=l-o.dragValueRange;if(f){if(n<f[0]){l=l-(n-f[0]);n=l-o.dragValueRange}}var m=k.attributes_.getForAxis("logscale",j);if(m){e.valueWindow=[Math.pow(Dygraph.LOG_SCALE,n),Math.pow(Dygraph.LOG_SCALE,l)]}else{e.valueWindow=[n,l]}}}k.drawGraph_(false)};Dygraph.Interaction.endPan=function(c,b,a){a.dragEndX=b.dragGetX_(c,a);a.dragEndY=b.dragGetY_(c,a);var e=Math.abs(a.dragEndX-a.dragStartX);var d=Math.abs(a.dragEndY-a.dragStartY);if(e<2&&d<2&&b.lastx_!==undefined&&b.lastx_!=-1){Dygraph.Interaction.treatMouseOpAsClick(b,c,a)}a.isPanning=false;a.is2DPan=false;a.initialLeftmostDate=null;a.dateRange=null;a.valueRange=null;a.boundedDates=null;a.boundedValues=null;a.axes=null};Dygraph.Interaction.startZoom=function(c,b,a){a.isZooming=true;a.zoomMoved=false};Dygraph.Interaction.moveZoom=function(c,b,a){a.zoomMoved=true;a.dragEndX=b.dragGetX_(c,a);a.dragEndY=b.dragGetY_(c,a);var e=Math.abs(a.dragStartX-a.dragEndX);var d=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=(e<d/2)?Dygraph.VERTICAL:Dygraph.HORIZONTAL;b.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY);a.prevEndX=a.dragEndX;a.prevEndY=a.dragEndY;a.prevDragDirection=a.dragDirection};Dygraph.Interaction.treatMouseOpAsClick=function(f,b,d){var k=f.attr_("clickCallback");var n=f.attr_("pointClickCallback");var j=null;if(n){var l=-1;var m=Number.MAX_VALUE;for(var e=0;e<f.selPoints_.length;e++){var c=f.selPoints_[e];var a=Math.pow(c.canvasx-d.dragEndX,2)+Math.pow(c.canvasy-d.dragEndY,2);if(!isNaN(a)&&(l==-1||a<m)){m=a;l=e}}var h=f.attr_("highlightCircleSize")+2;if(m<=h*h){j=f.selPoints_[l]}}if(j){n(b,j)}if(k){k(b,f.lastx_,f.selPoints_)}};Dygraph.Interaction.endZoom=function(c,i,e){e.isZooming=false;e.dragEndX=i.dragGetX_(c,e);e.dragEndY=i.dragGetY_(c,e);var h=Math.abs(e.dragEndX-e.dragStartX);var d=Math.abs(e.dragEndY-e.dragStartY);if(h<2&&d<2&&i.lastx_!==undefined&&i.lastx_!=-1){Dygraph.Interaction.treatMouseOpAsClick(i,c,e)}var b=i.getArea();if(h>=10&&e.dragDirection==Dygraph.HORIZONTAL){var f=Math.min(e.dragStartX,e.dragEndX),k=Math.max(e.dragStartX,e.dragEndX);f=Math.max(f,b.x);k=Math.min(k,b.x+b.w);if(f<k){i.doZoomX_(f,k)}e.cancelNextDblclick=true}else{if(d>=10&&e.dragDirection==Dygraph.VERTICAL){var j=Math.min(e.dragStartY,e.dragEndY),a=Math.max(e.dragStartY,e.dragEndY);j=Math.max(j,b.y);a=Math.min(a,b.y+b.h);if(j<a){i.doZoomY_(j,a)}e.cancelNextDblclick=true}else{if(e.zoomMoved){i.clearZoomRect_()}}}e.dragStartX=null;e.dragStartY=null};Dygraph.Interaction.startTouch=function(f,e,d){f.preventDefault();if(f.touches.length>1){d.startTimeForDoubleTapMs=null}var h=[];for(var c=0;c<f.touches.length;c++){var b=f.touches[c];h.push({pageX:b.pageX,pageY:b.pageY,dataX:e.toDataXCoord(b.pageX),dataY:e.toDataYCoord(b.pageY)})}d.initialTouches=h;if(h.length==1){d.initialPinchCenter=h[0];d.touchDirections={x:true,y:true}}else{if(h.length>=2){d.initialPinchCenter={pageX:0.5*(h[0].pageX+h[1].pageX),pageY:0.5*(h[0].pageY+h[1].pageY),dataX:0.5*(h[0].dataX+h[1].dataX),dataY:0.5*(h[0].dataY+h[1].dataY)};var a=180/Math.PI*Math.atan2(d.initialPinchCenter.pageY-h[0].pageY,h[0].pageX-d.initialPinchCenter.pageX);a=Math.abs(a);if(a>90){a=90-a}d.touchDirections={x:(a<(90-45/2)),y:(a>45/2)}}}d.initialRange={x:e.xAxisRange(),y:e.yAxisRange()}};Dygraph.Interaction.moveTouch=function(n,q,d){d.startTimeForDoubleTapMs=null;var p,l=[];for(p=0;p<n.touches.length;p++){var k=n.touches[p];l.push({pageX:k.pageX,pageY:k.pageY})}var a=d.initialTouches;var h;var j=d.initialPinchCenter;if(l.length==1){h=l[0]}else{h={pageX:0.5*(l[0].pageX+l[1].pageX),pageY:0.5*(l[0].pageY+l[1].pageY)}}var m={pageX:h.pageX-j.pageX,pageY:h.pageY-j.pageY};var f=d.initialRange.x[1]-d.initialRange.x[0];var o=d.initialRange.y[0]-d.initialRange.y[1];m.dataX=(m.pageX/q.plotter_.area.w)*f;m.dataY=(m.pageY/q.plotter_.area.h)*o;var w,c;if(l.length==1){w=1;c=1}else{if(l.length>=2){var e=(a[1].pageX-j.pageX);w=(l[1].pageX-h.pageX)/e;var v=(a[1].pageY-j.pageY);c=(l[1].pageY-h.pageY)/v}}w=Math.min(8,Math.max(0.125,w));c=Math.min(8,Math.max(0.125,c));var u=false;if(d.touchDirections.x){q.dateWindow_=[j.dataX-m.dataX+(d.initialRange.x[0]-j.dataX)/w,j.dataX-m.dataX+(d.initialRange.x[1]-j.dataX)/w];u=true}if(d.touchDirections.y){for(p=0;p<1;p++){var b=q.axes_[p];var s=q.attributes_.getForAxis("logscale",p);if(s){}else{b.valueWindow=[j.dataY-m.dataY+(d.initialRange.y[0]-j.dataY)/c,j.dataY-m.dataY+(d.initialRange.y[1]-j.dataY)/c];u=true}}}q.drawGraph_(false);if(u&&l.length>1&&q.attr_("zoomCallback")){var r=q.xAxisRange();q.attr_("zoomCallback")(r[0],r[1],q.yAxisRanges())}};Dygraph.Interaction.endTouch=function(e,d,c){if(e.touches.length!==0){Dygraph.Interaction.startTouch(e,d,c)}else{if(e.changedTouches.length==1){var a=new Date().getTime();var b=e.changedTouches[0];if(c.startTimeForDoubleTapMs&&a-c.startTimeForDoubleTapMs<500&&c.doubleTapX&&Math.abs(c.doubleTapX-b.screenX)<50&&c.doubleTapY&&Math.abs(c.doubleTapY-b.screenY)<50){d.resetZoom()}else{c.startTimeForDoubleTapMs=a;c.doubleTapX=b.screenX;c.doubleTapY=b.screenY}}}};Dygraph.Interaction.defaultModel={mousedown:function(c,b,a){if(c.button&&c.button==2){return}a.initializeMouseDown(c,b,a);if(c.altKey||c.shiftKey){Dygraph.startPan(c,b,a)}else{Dygraph.startZoom(c,b,a)}},mousemove:function(c,b,a){if(a.isZooming){Dygraph.moveZoom(c,b,a)}else{if(a.isPanning){Dygraph.movePan(c,b,a)}}},mouseup:function(c,b,a){if(a.isZooming){Dygraph.endZoom(c,b,a)}else{if(a.isPanning){Dygraph.endPan(c,b,a)}}},touchstart:function(c,b,a){Dygraph.Interaction.startTouch(c,b,a)},touchmove:function(c,b,a){Dygraph.Interaction.moveTouch(c,b,a)},touchend:function(c,b,a){Dygraph.Interaction.endTouch(c,b,a)},mouseout:function(c,b,a){if(a.isZooming){a.dragEndX=null;a.dragEndY=null;b.clearZoomRect_()}},dblclick:function(c,b,a){if(a.cancelNextDblclick){a.cancelNextDblclick=false;return}if(c.altKey||c.shiftKey){return}b.resetZoom()}};Dygraph.DEFAULT_ATTRS.interactionModel=Dygraph.Interaction.defaultModel;Dygraph.defaultInteractionModel=Dygraph.Interaction.defaultModel;Dygraph.endZoom=Dygraph.Interaction.endZoom;Dygraph.moveZoom=Dygraph.Interaction.moveZoom;Dygraph.startZoom=Dygraph.Interaction.startZoom;Dygraph.endPan=Dygraph.Interaction.endPan;Dygraph.movePan=Dygraph.Interaction.movePan;Dygraph.startPan=Dygraph.Interaction.startPan;Dygraph.Interaction.nonInteractiveModel_={mousedown:function(c,b,a){a.initializeMouseDown(c,b,a)},mouseup:function(c,b,a){a.dragEndX=b.dragGetX_(c,a);a.dragEndY=b.dragGetY_(c,a);var e=Math.abs(a.dragEndX-a.dragStartX);var d=Math.abs(a.dragEndY-a.dragStartY);if(e<2&&d<2&&b.lastx_!==undefined&&b.lastx_!=-1){Dygraph.Interaction.treatMouseOpAsClick(b,c,a)}}};Dygraph.Interaction.dragIsPanInteractionModel={mousedown:function(c,b,a){a.initializeMouseDown(c,b,a);Dygraph.startPan(c,b,a)},mousemove:function(c,b,a){if(a.isPanning){Dygraph.movePan(c,b,a)}},mouseup:function(c,b,a){if(a.isPanning){Dygraph.endPan(c,b,a)}}};"use strict";Dygraph.TickList=undefined;Dygraph.Ticker=undefined;Dygraph.numericLinearTicks=function(d,c,i,g,f,h){var e=function(a){if(a==="logscale"){return false}return g(a)};return Dygraph.numericTicks(d,c,i,e,f,h)};Dygraph.numericTicks=function(F,E,u,p,d,q){var z=(p("pixelsPerLabel"));var G=[];var C,A,t,y;if(q){for(C=0;C<q.length;C++){G.push({v:q[C]})}}else{if(p("logscale")){y=Math.floor(u/z);var l=Dygraph.binarySearch(F,Dygraph.PREFERRED_LOG_TICK_VALUES,1);var H=Dygraph.binarySearch(E,Dygraph.PREFERRED_LOG_TICK_VALUES,-1);if(l==-1){l=0}if(H==-1){H=Dygraph.PREFERRED_LOG_TICK_VALUES.length-1}var s=null;if(H-l>=y/4){for(var r=H;r>=l;r--){var m=Dygraph.PREFERRED_LOG_TICK_VALUES[r];var k=Math.log(m/F)/Math.log(E/F)*u;var D={v:m};if(s===null){s={tickValue:m,pixel_coord:k}}else{if(Math.abs(k-s.pixel_coord)>=z){s={tickValue:m,pixel_coord:k}}else{D.label=""}}G.push(D)}G.reverse()}}if(G.length===0){var g=p("labelsKMG2");var n,h;if(g){n=[1,2,4,8,16,32,64,128,256];h=16}else{n=[1,2,5,10,20,50,100];h=10}var w=Math.ceil(u/z);var o=Math.abs(E-F)/w;var v=Math.floor(Math.log(o)/Math.log(h));var f=Math.pow(h,v);var I,x,c,e;for(A=0;A<n.length;A++){I=f*n[A];x=Math.floor(F/I)*I;c=Math.ceil(E/I)*I;y=Math.abs(c-x)/I;e=u/y;if(e>z){break}}if(x>c){I*=-1}for(C=0;C<y;C++){t=x+C*I;G.push({v:t})}}}var B=(p("axisLabelFormatter"));for(C=0;C<G.length;C++){if(G[C].label!==undefined){continue}G[C].label=B(G[C].v,0,p,d)}return G};Dygraph.dateTicker=function(e,c,i,g,f,h){var d=Dygraph.pickDateTickGranularity(e,c,i,g);if(d>=0){return Dygraph.getDateAxis(e,c,d,g,f)}else{return[]}};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.CENTENNIAL=20;Dygraph.NUM_GRANULARITIES=21;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.LONG_TICK_PLACEMENTS=[];Dygraph.LONG_TICK_PLACEMENTS[Dygraph.MONTHLY]={months:[0,1,2,3,4,5,6,7,8,9,10,11],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.QUARTERLY]={months:[0,3,6,9],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.BIANNUAL]={months:[0,6],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.ANNUAL]={months:[0],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.DECADAL]={months:[0],year_mod:10};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.CENTENNIAL]={months:[0],year_mod:100};Dygraph.PREFERRED_LOG_TICK_VALUES=function(){var c=[];for(var b=-39;b<=39;b++){var a=Math.pow(10,b);for(var d=1;d<=9;d++){var e=a*d;c.push(e)}}return c}();Dygraph.pickDateTickGranularity=function(d,c,j,h){var g=(h("pixelsPerLabel"));for(var f=0;f<Dygraph.NUM_GRANULARITIES;f++){var e=Dygraph.numDateTicks(d,c,f);if(j/e>=g){return f}}return -1};Dygraph.numDateTicks=function(e,b,f){if(f<Dygraph.MONTHLY){var g=Dygraph.SHORT_SPACINGS[f];return Math.floor(0.5+1*(b-e)/g)}else{var d=Dygraph.LONG_TICK_PLACEMENTS[f];var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d.months.length/d.year_mod)}};Dygraph.getDateAxis=function(p,l,a,n,z){var w=(n("axisLabelFormatter"));var C=[];var m;if(a<Dygraph.MONTHLY){var c=Dygraph.SHORT_SPACINGS[a];var y=c/1000;var A=new Date(p);Dygraph.setDateSameTZ(A,{ms:0});var h;if(y<=60){h=A.getSeconds();Dygraph.setDateSameTZ(A,{s:h-h%y})}else{Dygraph.setDateSameTZ(A,{s:0});y/=60;if(y<=60){h=A.getMinutes();Dygraph.setDateSameTZ(A,{m:h-h%y})}else{Dygraph.setDateSameTZ(A,{m:0});y/=60;if(y<=24){h=A.getHours();A.setHours(h-h%y)}else{A.setHours(0);y/=24;if(y==7){A.setDate(A.getDate()-A.getDay())}}}}p=A.getTime();var B=new Date(p).getTimezoneOffset();var e=(c>=Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]);for(m=p;m<=l;m+=c){A=new Date(m);if(e&&A.getTimezoneOffset()!=B){var k=A.getTimezoneOffset()-B;m+=k*60*1000;A=new Date(m);B=A.getTimezoneOffset();if(new Date(m+c).getTimezoneOffset()!=B){m+=c;A=new Date(m);B=A.getTimezoneOffset()}}C.push({v:m,label:w(A,a,n,z)})}}else{var f;var r=1;if(a<Dygraph.NUM_GRANULARITIES){f=Dygraph.LONG_TICK_PLACEMENTS[a].months;r=Dygraph.LONG_TICK_PLACEMENTS[a].year_mod}else{Dygraph.warn("Span of dates is too long")}var v=new Date(p).getFullYear();var q=new Date(l).getFullYear();var b=Dygraph.zeropad;for(var u=v;u<=q;u++){if(u%r!==0){continue}for(var s=0;s<f.length;s++){var o=u+"/"+b(1+f[s])+"/01";m=Dygraph.dateStrToMillis(o);if(m<p||m>l){continue}C.push({v:m,label:w(new Date(m),a,n,z)})}}}return C};if(Dygraph&&Dygraph.DEFAULT_ATTRS&&Dygraph.DEFAULT_ATTRS.axes&&Dygraph.DEFAULT_ATTRS.axes["x"]&&Dygraph.DEFAULT_ATTRS.axes["y"]&&Dygraph.DEFAULT_ATTRS.axes["y2"]){Dygraph.DEFAULT_ATTRS.axes["x"]["ticker"]=Dygraph.dateTicker;Dygraph.DEFAULT_ATTRS.axes["y"]["ticker"]=Dygraph.numericTicks;Dygraph.DEFAULT_ATTRS.axes["y2"]["ticker"]=Dygraph.numericTicks}Dygraph.Plugins={};Dygraph.Plugins.Annotations=(function(){var a=function(){this.annotations_=[]};a.prototype.toString=function(){return"Annotations Plugin"};a.prototype.activate=function(b){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}};a.prototype.detachLabels=function(){for(var c=0;c<this.annotations_.length;c++){var b=this.annotations_[c];if(b.parentNode){b.parentNode.removeChild(b)}this.annotations_[c]=null}this.annotations_=[]};a.prototype.clearChart=function(b){this.detachLabels()};a.prototype.didDrawChart=function(v){var t=v.dygraph;var r=t.layout_.annotated_points;if(!r||r.length===0){return}var h=v.canvas.parentNode;var x={position:"absolute",fontSize:t.getOption("axisLabelFontSize")+"px",zIndex:10,overflow:"hidden"};var b=function(e,g,i){return function(y){var p=i.annotation;if(p.hasOwnProperty(e)){p[e](p,i,t,y)}else{if(t.getOption(g)){t.getOption(g)(p,i,t,y)}}}};var u=v.dygraph.plotter_.area;var q={};for(var s=0;s<r.length;s++){var l=r[s];if(l.canvasx<u.x||l.canvasx>u.x+u.w||l.canvasy<u.y||l.canvasy>u.y+u.h){continue}var w=l.annotation;var n=6;if(w.hasOwnProperty("tickHeight")){n=w.tickHeight}var j=document.createElement("div");for(var A in x){if(x.hasOwnProperty(A)){j.style[A]=x[A]}}if(!w.hasOwnProperty("icon")){j.className="dygraphDefaultAnnotation"}if(w.hasOwnProperty("cssClass")){j.className+=" "+w.cssClass}var m=w.hasOwnProperty("width")?w.width:16;var k=w.hasOwnProperty("height")?w.height:16;if(w.hasOwnProperty("icon")){var z=document.createElement("img");z.src=w.icon;z.width=m;z.height=k;j.appendChild(z)}else{if(l.annotation.hasOwnProperty("shortText")){j.appendChild(document.createTextNode(l.annotation.shortText))}}var c=l.canvasx-m/2;j.style.left=c+"px";var f=0;if(w.attachAtBottom){var d=(u.y+u.h-k-n);if(q[c]){d-=q[c]}else{q[c]=0}q[c]+=(n+k);f=d}else{f=l.canvasy-k-n}j.style.top=f+"px";j.style.width=m+"px";j.style.height=k+"px";j.title=l.annotation.text;j.style.color=t.colorsMap_[l.name];j.style.borderColor=t.colorsMap_[l.name];w.div=j;t.addAndTrackEvent(j,"click",b("clickHandler","annotationClickHandler",l,this));t.addAndTrackEvent(j,"mouseover",b("mouseOverHandler","annotationMouseOverHandler",l,this));t.addAndTrackEvent(j,"mouseout",b("mouseOutHandler","annotationMouseOutHandler",l,this));t.addAndTrackEvent(j,"dblclick",b("dblClickHandler","annotationDblClickHandler",l,this));h.appendChild(j);this.annotations_.push(j);var o=v.drawingContext;o.save();o.strokeStyle=t.colorsMap_[l.name];o.beginPath();if(!w.attachAtBottom){o.moveTo(l.canvasx,l.canvasy);o.lineTo(l.canvasx,l.canvasy-2-n)}else{var d=f+k;o.moveTo(l.canvasx,d);o.lineTo(l.canvasx,d+n)}o.closePath();o.stroke();o.restore()}};a.prototype.destroy=function(){this.detachLabels()};return a})();Dygraph.Plugins.Axes=(function(){var a=function(){this.xlabels_=[];this.ylabels_=[]};a.prototype.toString=function(){return"Axes Plugin"};a.prototype.activate=function(b){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}};a.prototype.layout=function(f){var d=f.dygraph;if(d.getOption("drawYAxis")){var b=d.getOption("yAxisLabelWidth")+2*d.getOption("axisTickSize");f.reserveSpaceLeft(b)}if(d.getOption("drawXAxis")){var c;if(d.getOption("xAxisHeight")){c=d.getOption("xAxisHeight")}else{c=d.getOptionForAxis("axisLabelFontSize","x")+2*d.getOption("axisTickSize")}f.reserveSpaceBottom(c)}if(d.numAxes()==2){if(d.getOption("drawYAxis")){var b=d.getOption("yAxisLabelWidth")+2*d.getOption("axisTickSize");f.reserveSpaceRight(b)}}else{if(d.numAxes()>2){d.error("Only two y-axes are supported at this time. (Trying to use "+d.numAxes()+")")}}};a.prototype.detachLabels=function(){function b(d){for(var c=0;c<d.length;c++){var e=d[c];if(e.parentNode){e.parentNode.removeChild(e)}}}b(this.xlabels_);b(this.ylabels_);this.xlabels_=[];this.ylabels_=[]};a.prototype.clearChart=function(b){this.detachLabels()};a.prototype.willDrawChart=function(H){var F=H.dygraph;if(!F.getOption("drawXAxis")&&!F.getOption("drawYAxis")){return}function B(e){return Math.round(e)+0.5}function A(e){return Math.round(e)-0.5}var j=H.drawingContext;var v=H.canvas.parentNode;var J=H.canvas.width;var d=H.canvas.height;var s,u,t,E,D;var C=function(e){return{position:"absolute",fontSize:F.getOptionForAxis("axisLabelFontSize",e)+"px",zIndex:10,color:F.getOptionForAxis("axisLabelColor",e),width:F.getOption("axisLabelWidth")+"px",lineHeight:"normal",overflow:"hidden"}};var p={x:C("x"),y:C("y"),y2:C("y2")};var m=function(g,x,y){var K=document.createElement("div");var e=p[y=="y2"?"y2":x];for(var r in e){if(e.hasOwnProperty(r)){K.style[r]=e[r]}}var i=document.createElement("div");i.className="dygraph-axis-label dygraph-axis-label-"+x+(y?" dygraph-axis-label-"+y:"");i.innerHTML=g;K.appendChild(i);return K};j.save();var I=F.layout_;var G=H.dygraph.plotter_.area;if(F.getOption("drawYAxis")){if(I.yticks&&I.yticks.length>0){var h=F.numAxes();for(D=0;D<I.yticks.length;D++){E=I.yticks[D];if(typeof(E)=="function"){return}u=G.x;var o=1;var f="y1";if(E[0]==1){u=G.x+G.w;o=-1;f="y2"}var k=F.getOptionForAxis("axisLabelFontSize",f);t=G.y+E[1]*G.h;s=m(E[2],"y",h==2?f:null);var z=(t-k/2);if(z<0){z=0}if(z+k+3>d){s.style.bottom="0px"}else{s.style.top=z+"px"}if(E[0]===0){s.style.left=(G.x-F.getOption("yAxisLabelWidth")-F.getOption("axisTickSize"))+"px";s.style.textAlign="right"}else{if(E[0]==1){s.style.left=(G.x+G.w+F.getOption("axisTickSize"))+"px";s.style.textAlign="left"}}s.style.width=F.getOption("yAxisLabelWidth")+"px";v.appendChild(s);this.ylabels_.push(s)}var n=this.ylabels_[0];var k=F.getOptionForAxis("axisLabelFontSize","y");var q=parseInt(n.style.top,10)+k;if(q>d-k){n.style.top=(parseInt(n.style.top,10)-k/2)+"px"}}var c;if(F.getOption("drawAxesAtZero")){var w=F.toPercentXCoord(0);if(w>1||w<0||isNaN(w)){w=0}c=B(G.x+w*G.w)}else{c=B(G.x)}j.strokeStyle=F.getOptionForAxis("axisLineColor","y");j.lineWidth=F.getOptionForAxis("axisLineWidth","y");j.beginPath();j.moveTo(c,A(G.y));j.lineTo(c,A(G.y+G.h));j.closePath();j.stroke();if(F.numAxes()==2){j.strokeStyle=F.getOptionForAxis("axisLineColor","y2");j.lineWidth=F.getOptionForAxis("axisLineWidth","y2");j.beginPath();j.moveTo(A(G.x+G.w),A(G.y));j.lineTo(A(G.x+G.w),A(G.y+G.h));j.closePath();j.stroke()}}if(F.getOption("drawXAxis")){if(I.xticks){for(D=0;D<I.xticks.length;D++){E=I.xticks[D];u=G.x+E[0]*G.w;t=G.y+G.h;s=m(E[1],"x");s.style.textAlign="center";s.style.top=(t+F.getOption("axisTickSize"))+"px";var l=(u-F.getOption("axisLabelWidth")/2);if(l+F.getOption("axisLabelWidth")>J){l=J-F.getOption("xAxisLabelWidth");s.style.textAlign="right"}if(l<0){l=0;s.style.textAlign="left"}s.style.left=l+"px";s.style.width=F.getOption("xAxisLabelWidth")+"px";v.appendChild(s);this.xlabels_.push(s)}}j.strokeStyle=F.getOptionForAxis("axisLineColor","x");j.lineWidth=F.getOptionForAxis("axisLineWidth","x");j.beginPath();var b;if(F.getOption("drawAxesAtZero")){var w=F.toPercentYCoord(0,0);if(w>1||w<0){w=1}b=A(G.y+w*G.h)}else{b=A(G.y+G.h)}j.moveTo(B(G.x),b);j.lineTo(B(G.x+G.w),b);j.closePath();j.stroke()}j.restore()};return a})();Dygraph.Plugins.ChartLabels=(function(){var c=function(){this.title_div_=null;this.xlabel_div_=null;this.ylabel_div_=null;this.y2label_div_=null};c.prototype.toString=function(){return"ChartLabels Plugin"};c.prototype.activate=function(d){return{layout:this.layout,didDrawChart:this.didDrawChart}};var b=function(d){var e=document.createElement("div");e.style.position="absolute";e.style.left=d.x+"px";e.style.top=d.y+"px";e.style.width=d.w+"px";e.style.height=d.h+"px";return e};c.prototype.detachLabels_=function(){var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_];for(var d=0;d<e.length;d++){var f=e[d];if(!f){continue}if(f.parentNode){f.parentNode.removeChild(f)}}this.title_div_=null;this.xlabel_div_=null;this.ylabel_div_=null;this.y2label_div_=null};var a=function(l,i,f,h,j){var d=document.createElement("div");d.style.position="absolute";if(f==1){d.style.left="0px"}else{d.style.left=i.x+"px"}d.style.top=i.y+"px";d.style.width=i.w+"px";d.style.height=i.h+"px";d.style.fontSize=(l.getOption("yLabelWidth")-2)+"px";var m=document.createElement("div");m.style.position="absolute";m.style.width=i.h+"px";m.style.height=i.w+"px";m.style.top=(i.h/2-i.w/2)+"px";m.style.left=(i.w/2-i.h/2)+"px";m.style.textAlign="center";var e="rotate("+(f==1?"-":"")+"90deg)";m.style.transform=e;m.style.WebkitTransform=e;m.style.MozTransform=e;m.style.OTransform=e;m.style.msTransform=e;if(typeof(document.documentMode)!=="undefined"&&document.documentMode<9){m.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+(f==1?"3":"1")+")";m.style.left="0px";m.style.top="0px"}var k=document.createElement("div");k.className=h;k.innerHTML=j;m.appendChild(k);d.appendChild(m);return d};c.prototype.layout=function(k){this.detachLabels_();var i=k.dygraph;var m=k.chart_div;if(i.getOption("title")){var d=k.reserveSpaceTop(i.getOption("titleHeight"));this.title_div_=b(d);this.title_div_.style.textAlign="center";this.title_div_.style.fontSize=(i.getOption("titleHeight")-8)+"px";this.title_div_.style.fontWeight="bold";this.title_div_.style.zIndex=10;var f=document.createElement("div");f.className="dygraph-label dygraph-title";f.innerHTML=i.getOption("title");this.title_div_.appendChild(f);m.appendChild(this.title_div_)}if(i.getOption("xlabel")){var j=k.reserveSpaceBottom(i.getOption("xLabelHeight"));this.xlabel_div_=b(j);this.xlabel_div_.style.textAlign="center";this.xlabel_div_.style.fontSize=(i.getOption("xLabelHeight")-2)+"px";var f=document.createElement("div");f.className="dygraph-label dygraph-xlabel";f.innerHTML=i.getOption("xlabel");this.xlabel_div_.appendChild(f);m.appendChild(this.xlabel_div_)}if(i.getOption("ylabel")){var h=k.reserveSpaceLeft(0);this.ylabel_div_=a(i,h,1,"dygraph-label dygraph-ylabel",i.getOption("ylabel"));m.appendChild(this.ylabel_div_)}if(i.getOption("y2label")&&i.numAxes()==2){var l=k.reserveSpaceRight(0);this.y2label_div_=a(i,l,2,"dygraph-label dygraph-y2label",i.getOption("y2label"));m.appendChild(this.y2label_div_)}};c.prototype.didDrawChart=function(f){var d=f.dygraph;if(this.title_div_){this.title_div_.children[0].innerHTML=d.getOption("title")}if(this.xlabel_div_){this.xlabel_div_.children[0].innerHTML=d.getOption("xlabel")}if(this.ylabel_div_){this.ylabel_div_.children[0].children[0].innerHTML=d.getOption("ylabel")}if(this.y2label_div_){this.y2label_div_.children[0].children[0].innerHTML=d.getOption("y2label")}};c.prototype.clearChart=function(){};c.prototype.destroy=function(){this.detachLabels_()};return c})();Dygraph.Plugins.Grid=(function(){var a=function(){};a.prototype.toString=function(){return"Gridline Plugin"};a.prototype.activate=function(b){return{willDrawChart:this.willDrawChart}};a.prototype.willDrawChart=function(s){var q=s.dygraph;var l=s.drawingContext;var t=q.layout_;var r=s.dygraph.plotter_.area;function k(e){return Math.round(e)+0.5}function j(e){return Math.round(e)-0.5}var h,f,p,u;if(q.getOption("drawYGrid")){var o=["y","y2"];var m=[],v=[],b=[],n=[],d=[];for(var p=0;p<o.length;p++){b[p]=q.getOptionForAxis("drawGrid",o[p]);if(b[p]){m[p]=q.getOptionForAxis("gridLineColor",o[p]);v[p]=q.getOptionForAxis("gridLineWidth",o[p]);d[p]=q.getOptionForAxis("gridLinePattern",o[p]);n[p]=d[p]&&(d[p].length>=2)}}u=t.yticks;l.save();for(p=0;p<u.length;p++){var c=u[p][0];if(b[c]){if(n[c]){l.installPattern(d[c])}l.strokeStyle=m[c];l.lineWidth=v[c];h=k(r.x);f=j(r.y+u[p][1]*r.h);l.beginPath();l.moveTo(h,f);l.lineTo(h+r.w,f);l.closePath();l.stroke();if(n[c]){l.uninstallPattern()}}}l.restore()}if(q.getOption("drawXGrid")&&q.getOptionForAxis("drawGrid","x")){u=t.xticks;l.save();var d=q.getOptionForAxis("gridLinePattern","x");var n=d&&(d.length>=2);if(n){l.installPattern(d)}l.strokeStyle=q.getOptionForAxis("gridLineColor","x");l.lineWidth=q.getOptionForAxis("gridLineWidth","x");for(p=0;p<u.length;p++){h=k(r.x+u[p][0]*r.w);f=j(r.y+r.h);l.beginPath();l.moveTo(h,f);l.lineTo(h,r.y);l.closePath();l.stroke()}if(n){l.uninstallPattern()}l.restore()}};a.prototype.destroy=function(){};return a})();Dygraph.Plugins.Legend=(function(){var c=function(){this.legend_div_=null;this.is_generated_div_=false};c.prototype.toString=function(){return"Legend Plugin"};var a,d;c.prototype.activate=function(j){var m;var f=j.getOption("labelsDivWidth");var l=j.getOption("labelsDiv");if(l&&null!==l){if(typeof(l)=="string"||l instanceof String){m=document.getElementById(l)}else{m=l}}else{var i={position:"absolute",fontSize:"14px",zIndex:10,width:f+"px",top:"0px",left:(j.size().width-f-2)+"px",background:"white",lineHeight:"normal",textAlign:"left",overflow:"hidden"};Dygraph.update(i,j.getOption("labelsDivStyles"));m=document.createElement("div");m.className="dygraph-legend";for(var h in i){if(!i.hasOwnProperty(h)){continue}try{m.style[h]=i[h]}catch(k){this.warn("You are using unsupported css properties for your browser in labelsDivStyles")}}j.graphDiv.appendChild(m);this.is_generated_div_=true}this.legend_div_=m;this.one_em_width_=10;return{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var b=function(g){var f=document.createElement("span");f.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;");g.appendChild(f);var e=f.offsetWidth;g.removeChild(f);return e};c.prototype.select=function(i){var h=i.selectedX;var g=i.selectedPoints;var f=a(i.dygraph,h,g,this.one_em_width_);this.legend_div_.innerHTML=f};c.prototype.deselect=function(h){var f=b(this.legend_div_);this.one_em_width_=f;var g=a(h.dygraph,undefined,undefined,f);this.legend_div_.innerHTML=g};c.prototype.didDrawChart=function(f){this.deselect(f)};c.prototype.predraw=function(h){if(!this.is_generated_div_){return}h.dygraph.graphDiv.appendChild(this.legend_div_);var g=h.dygraph.plotter_.area;var f=h.dygraph.getOption("labelsDivWidth");this.legend_div_.style.left=g.x+g.w-f-1+"px";this.legend_div_.style.top=g.y+"px";this.legend_div_.style.width=f+"px"};c.prototype.destroy=function(){this.legend_div_=null};a=function(w,p,l,f){if(w.getOption("showLabelsOnHighlight")!==true){return""}var r,C,u,s,m;var z=w.getLabels();if(typeof(p)==="undefined"){if(w.getOption("legend")!="always"){return""}C=w.getOption("labelsSeparateLines");r="";for(u=1;u<z.length;u++){var q=w.getPropertiesForSeries(z[u]);if(!q.visible){continue}if(r!==""){r+=(C?"<br/>":" ")}m=w.getOption("strokePattern",z[u]);s=d(m,q.color,f);r+="<span style='font-weight: bold; color: "+q.color+";'>"+s+" "+z[u]+"</span>"}return r}var A=w.optionsViewForAxis_("x");var o=A("valueFormatter");r=o(p,A,z[0],w);if(r!==""){r+=":"}var v=[];var j=w.numAxes();for(u=0;u<j;u++){v[u]=w.optionsViewForAxis_("y"+(u?1+u:""))}var k=w.getOption("labelsShowZeroValues");C=w.getOption("labelsSeparateLines");var B=w.getHighlightSeries();for(u=0;u<l.length;u++){var t=l[u];if(t.yval===0&&!k){continue}if(!Dygraph.isOK(t.canvasy)){continue}if(C){r+="<br/>"}var q=w.getPropertiesForSeries(t.name);var n=v[q.axis-1];var y=n("valueFormatter");var e=y(t.yval,n,t.name,w);var h=(t.name==B)?" class='highlight'":"";r+="<span"+h+"> <b><span style='color: "+q.color+";'>"+t.name+"</span></b>:&nbsp;"+e+"</span>"}return r};d=function(s,h,r){var e=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(e){return"&mdash;"}if(!s||s.length<=1){return'<div style="display: inline-block; position: relative; bottom: .5ex; padding-left: 1em; height: 1px; border-bottom: 2px solid '+h+';"></div>'}var l,k,f,o;var g=0,q=0;var p=[];var n;for(l=0;l<=s.length;l++){g+=s[l%s.length]}n=Math.floor(r/(g-s[0]));if(n>1){for(l=0;l<s.length;l++){p[l]=s[l]/r}q=p.length}else{n=1;for(l=0;l<s.length;l++){p[l]=s[l]/g}q=p.length+1}var m="";for(k=0;k<n;k++){for(l=0;l<q;l+=2){f=p[l%p.length];if(l<s.length){o=p[(l+1)%p.length]}else{o=0}m+='<div style="display: inline-block; position: relative; bottom: .5ex; margin-right: '+o+"em; padding-left: "+f+"em; height: 1px; border-bottom: 2px solid "+h+';"></div>'}}return m};return c})();Dygraph.Plugins.RangeSelector=(function(){var a=function(){this.isIE_=/MSIE/.test(navigator.userAgent)&&!window.opera;this.hasTouchInterface_=typeof(TouchEvent)!="undefined";this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion);this.interfaceCreated_=false};a.prototype.toString=function(){return"RangeSelector Plugin"};a.prototype.activate=function(b){this.dygraph_=b;this.isUsingExcanvas_=b.isUsingExcanvas_;if(this.getOption_("showRangeSelector")){this.createInterface_()}return{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}};a.prototype.destroy=function(){this.bgcanvas_=null;this.fgcanvas_=null;this.leftZoomHandle_=null;this.rightZoomHandle_=null;this.iePanOverlay_=null};a.prototype.getOption_=function(b){return this.dygraph_.getOption(b)};a.prototype.setDefaultOption_=function(b,c){return this.dygraph_.attrs_[b]=c};a.prototype.createInterface_=function(){this.createCanvases_();if(this.isUsingExcanvas_){this.createIEPanOverlay_()}this.createZoomHandles_();this.initInteraction_();if(this.getOption_("animatedZooms")){this.dygraph_.warn("Animated zooms and range selector are not compatible; disabling animatedZooms.");this.dygraph_.updateOptions({animatedZooms:false},true)}this.interfaceCreated_=true;this.addToGraph_()};a.prototype.addToGraph_=function(){var b=this.graphDiv_=this.dygraph_.graphDiv;b.appendChild(this.bgcanvas_);b.appendChild(this.fgcanvas_);b.appendChild(this.leftZoomHandle_);b.appendChild(this.rightZoomHandle_)};a.prototype.removeFromGraph_=function(){var b=this.graphDiv_;b.removeChild(this.bgcanvas_);b.removeChild(this.fgcanvas_);b.removeChild(this.leftZoomHandle_);b.removeChild(this.rightZoomHandle_);this.graphDiv_=null};a.prototype.reserveSpace_=function(b){if(this.getOption_("showRangeSelector")){b.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)}};a.prototype.renderStaticLayer_=function(){if(!this.updateVisibility_()){return}this.resize_();this.drawStaticLayer_()};a.prototype.renderInteractiveLayer_=function(){if(!this.updateVisibility_()||this.isChangingRange_){return}this.placeZoomHandles_();this.drawInteractiveLayer_()};a.prototype.updateVisibility_=function(){var b=this.getOption_("showRangeSelector");if(b){if(!this.interfaceCreated_){this.createInterface_()}else{if(!this.graphDiv_||!this.graphDiv_.parentNode){this.addToGraph_()}}}else{if(this.graphDiv_){this.removeFromGraph_();var c=this.dygraph_;setTimeout(function(){c.width_=0;c.resize()},1)}}return b};a.prototype.resize_=function(){function d(e,f){e.style.top=f.y+"px";e.style.left=f.x+"px";e.width=f.w;e.height=f.h;e.style.width=e.width+"px";e.style.height=e.height+"px"}var c=this.dygraph_.layout_.getPlotArea();var b=0;if(this.getOption_("drawXAxis")){b=this.getOption_("xAxisHeight")||(this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize"))}this.canvasRect_={x:c.x,y:c.y+c.h+b+4,w:c.w,h:this.getOption_("rangeSelectorHeight")};d(this.bgcanvas_,this.canvasRect_);d(this.fgcanvas_,this.canvasRect_)};a.prototype.createCanvases_=function(){this.bgcanvas_=Dygraph.createCanvas();this.bgcanvas_.className="dygraph-rangesel-bgcanvas";this.bgcanvas_.style.position="absolute";this.bgcanvas_.style.zIndex=9;this.bgcanvas_ctx_=Dygraph.getContext(this.bgcanvas_);this.fgcanvas_=Dygraph.createCanvas();this.fgcanvas_.className="dygraph-rangesel-fgcanvas";this.fgcanvas_.style.position="absolute";this.fgcanvas_.style.zIndex=9;this.fgcanvas_.style.cursor="default";this.fgcanvas_ctx_=Dygraph.getContext(this.fgcanvas_)};a.prototype.createIEPanOverlay_=function(){this.iePanOverlay_=document.createElement("div");this.iePanOverlay_.style.position="absolute";this.iePanOverlay_.style.backgroundColor="white";this.iePanOverlay_.style.filter="alpha(opacity=0)";this.iePanOverlay_.style.display="none";this.iePanOverlay_.style.cursor="move";this.fgcanvas_.appendChild(this.iePanOverlay_)};a.prototype.createZoomHandles_=function(){var b=new Image();b.className="dygraph-rangesel-zoomhandle";b.style.position="absolute";b.style.zIndex=10;b.style.visibility="hidden";b.style.cursor="col-resize";if(/MSIE 7/.test(navigator.userAgent)){b.width=7;b.height=14;b.style.backgroundColor="white";b.style.border="1px solid #333333"}else{b.width=9;b.height=16;b.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII="}if(this.isMobileDevice_){b.width*=2;b.height*=2}this.leftZoomHandle_=b;this.rightZoomHandle_=b.cloneNode(false)};a.prototype.initInteraction_=function(){var o=this;var i=this.isIE_?document:window;var u=0;var v=null;var s=false;var d=false;var g=!this.isMobileDevice_&&!this.isUsingExcanvas_;var k=new Dygraph.IFrameTarp();var p,f,r,j,w,h,x,t,q,c,l;var e,n,m;p=function(C){var B=o.dygraph_.xAxisExtremes();var z=(B[1]-B[0])/o.canvasRect_.w;var A=B[0]+(C.leftHandlePos-o.canvasRect_.x)*z;var y=B[0]+(C.rightHandlePos-o.canvasRect_.x)*z;return[A,y]};f=function(y){Dygraph.cancelEvent(y);s=true;u=y.clientX;v=y.target?y.target:y.srcElement;if(y.type==="mousedown"||y.type==="dragstart"){Dygraph.addEvent(i,"mousemove",r);Dygraph.addEvent(i,"mouseup",j)}o.fgcanvas_.style.cursor="col-resize";k.cover();return true};r=function(C){if(!s){return false}Dygraph.cancelEvent(C);var z=C.clientX-u;if(Math.abs(z)<4){return true}u=C.clientX;var B=o.getZoomHandleStatus_();var y;if(v==o.leftZoomHandle_){y=B.leftHandlePos+z;y=Math.min(y,B.rightHandlePos-v.width-3);y=Math.max(y,o.canvasRect_.x)}else{y=B.rightHandlePos+z;y=Math.min(y,o.canvasRect_.x+o.canvasRect_.w);y=Math.max(y,B.leftHandlePos+v.width+3)}var A=v.width/2;v.style.left=(y-A)+"px";o.drawInteractiveLayer_();if(g){w()}return true};j=function(y){if(!s){return false}s=false;k.uncover();Dygraph.removeEvent(i,"mousemove",r);Dygraph.removeEvent(i,"mouseup",j);o.fgcanvas_.style.cursor="default";if(!g){w()}return true};w=function(){try{var z=o.getZoomHandleStatus_();o.isChangingRange_=true;if(!z.isZoomed){o.dygraph_.resetZoom()}else{var y=p(z);o.dygraph_.doZoomXDates_(y[0],y[1])}}finally{o.isChangingRange_=false}};h=function(A){if(o.isUsingExcanvas_){return A.srcElement==o.iePanOverlay_}else{var z=o.leftZoomHandle_.getBoundingClientRect();var y=z.left+z.width/2;z=o.rightZoomHandle_.getBoundingClientRect();var B=z.left+z.width/2;return(A.clientX>y&&A.clientX<B)}};x=function(y){if(!d&&h(y)&&o.getZoomHandleStatus_().isZoomed){Dygraph.cancelEvent(y);d=true;u=y.clientX;if(y.type==="mousedown"){Dygraph.addEvent(i,"mousemove",t);Dygraph.addEvent(i,"mouseup",q)}return true}return false};t=function(C){if(!d){return false}Dygraph.cancelEvent(C);var z=C.clientX-u;if(Math.abs(z)<4){return true}u=C.clientX;var B=o.getZoomHandleStatus_();var E=B.leftHandlePos;var y=B.rightHandlePos;var D=y-E;if(E+z<=o.canvasRect_.x){E=o.canvasRect_.x;y=E+D}else{if(y+z>=o.canvasRect_.x+o.canvasRect_.w){y=o.canvasRect_.x+o.canvasRect_.w;E=y-D}else{E+=z;y+=z}}var A=o.leftZoomHandle_.width/2;o.leftZoomHandle_.style.left=(E-A)+"px";o.rightZoomHandle_.style.left=(y-A)+"px";o.drawInteractiveLayer_();if(g){c()}return true};q=function(y){if(!d){return false}d=false;Dygraph.removeEvent(i,"mousemove",t);Dygraph.removeEvent(i,"mouseup",q);if(!g){c()}return true};c=function(){try{o.isChangingRange_=true;o.dygraph_.dateWindow_=p(o.getZoomHandleStatus_());o.dygraph_.drawGraph_(false)}finally{o.isChangingRange_=false}};l=function(y){if(s||d){return}var z=h(y)?"move":"default";if(z!=o.fgcanvas_.style.cursor){o.fgcanvas_.style.cursor=z}};e=function(y){if(y.type=="touchstart"&&y.targetTouches.length==1){if(f(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{if(y.type=="touchmove"&&y.targetTouches.length==1){if(r(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{j(y)}}};n=function(y){if(y.type=="touchstart"&&y.targetTouches.length==1){if(x(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{if(y.type=="touchmove"&&y.targetTouches.length==1){if(t(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{q(y)}}};m=function(B,A){var z=["touchstart","touchend","touchmove","touchcancel"];for(var y=0;y<z.length;y++){o.dygraph_.addAndTrackEvent(B,z[y],A)}};this.setDefaultOption_("interactionModel",Dygraph.Interaction.dragIsPanInteractionModel);this.setDefaultOption_("panEdgeFraction",0.0001);var b=window.opera?"mousedown":"dragstart";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,b,f);this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,b,f);if(this.isUsingExcanvas_){this.dygraph_.addAndTrackEvent(this.iePanOverlay_,"mousedown",x)}else{this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousedown",x);this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousemove",l)}if(this.hasTouchInterface_){m(this.leftZoomHandle_,e);m(this.rightZoomHandle_,e);m(this.fgcanvas_,n)}};a.prototype.drawStaticLayer_=function(){var b=this.bgcanvas_ctx_;b.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(c){Dygraph.warn(c)}var d=0.5;this.bgcanvas_ctx_.lineWidth=1;b.strokeStyle="gray";b.beginPath();b.moveTo(d,d);b.lineTo(d,this.canvasRect_.h-d);b.lineTo(this.canvasRect_.w-d,this.canvasRect_.h-d);b.lineTo(this.canvasRect_.w-d,d);b.stroke()};a.prototype.drawMiniPlot_=function(){var f=this.getOption_("rangeSelectorPlotFillColor");var r=this.getOption_("rangeSelectorPlotStrokeColor");if(!f&&!r){return}var j=this.getOption_("stepPlot");var v=this.computeCombinedSeriesAndLimits_();var q=v.yMax-v.yMin;var p=this.bgcanvas_ctx_;var n=0.5;var e=this.dygraph_.xAxisExtremes();var o=Math.max(e[1]-e[0],1e-30);var g=(this.canvasRect_.w-n)/o;var u=(this.canvasRect_.h-n)/q;var t=this.canvasRect_.w-n;var b=this.canvasRect_.h-n;var d=null,c=null;p.beginPath();p.moveTo(n,b);for(var s=0;s<v.data.length;s++){var h=v.data[s];var l=((h[0]!==null)?((h[0]-e[0])*g):NaN);var k=((h[1]!==null)?(b-(h[1]-v.yMin)*u):NaN);if(isFinite(l)&&isFinite(k)){if(d===null){p.lineTo(l,b)}else{if(j){p.lineTo(l,c)}}p.lineTo(l,k);d=l;c=k}else{if(d!==null){if(j){p.lineTo(l,c);p.lineTo(l,b)}else{p.lineTo(d,b)}}d=c=null}}p.lineTo(t,b);p.closePath();if(f){var m=this.bgcanvas_ctx_.createLinearGradient(0,0,0,b);m.addColorStop(0,"white");m.addColorStop(1,f);this.bgcanvas_ctx_.fillStyle=m;p.fill()}if(r){this.bgcanvas_ctx_.strokeStyle=r;this.bgcanvas_ctx_.lineWidth=1.5;p.stroke()}};a.prototype.computeCombinedSeriesAndLimits_=function(){var v=this.dygraph_.rawData_;var u=this.getOption_("logscale");var q=[];var d;var h;var m;var t,s,r;var e,g;for(t=0;t<v.length;t++){if(v[t].length>1&&v[t][1]!==null){m=typeof v[t][1]!="number";if(m){d=[];h=[];for(r=0;r<v[t][1].length;r++){d.push(0);h.push(0)}}break}}for(t=0;t<v.length;t++){var l=v[t];e=l[0];if(m){for(r=0;r<d.length;r++){d[r]=h[r]=0}}else{d=h=0}for(s=1;s<l.length;s++){if(this.dygraph_.visibility()[s-1]){var n;if(m){for(r=0;r<d.length;r++){n=l[s][r];if(n===null||isNaN(n)){continue}d[r]+=n;h[r]++}}else{n=l[s];if(n===null||isNaN(n)){continue}d+=n;h++}}}if(m){for(r=0;r<d.length;r++){d[r]/=h[r]}g=d.slice(0)}else{g=d/h}q.push([e,g])}q=this.dygraph_.rollingAverage(q,this.dygraph_.rollPeriod_);if(typeof q[0][1]!="number"){for(t=0;t<q.length;t++){g=q[t][1];q[t][1]=g[0]}}var b=Number.MAX_VALUE;var c=-Number.MAX_VALUE;for(t=0;t<q.length;t++){g=q[t][1];if(g!==null&&isFinite(g)&&(!u||g>0)){b=Math.min(b,g);c=Math.max(c,g)}}var o=0.25;if(u){c=Dygraph.log10(c);c+=c*o;b=Dygraph.log10(b);for(t=0;t<q.length;t++){q[t][1]=Dygraph.log10(q[t][1])}}else{var f;var p=c-b;if(p<=Number.MIN_VALUE){f=c*o}else{f=p*o}c+=f;b-=f}return{data:q,yMin:b,yMax:c}};a.prototype.placeZoomHandles_=function(){var h=this.dygraph_.xAxisExtremes();var b=this.dygraph_.xAxisRange();var c=h[1]-h[0];var j=Math.max(0,(b[0]-h[0])/c);var f=Math.max(0,(h[1]-b[1])/c);var i=this.canvasRect_.x+this.canvasRect_.w*j;var e=this.canvasRect_.x+this.canvasRect_.w*(1-f);var d=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2);var g=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=(i-g)+"px";this.leftZoomHandle_.style.top=d+"px";this.rightZoomHandle_.style.left=(e-g)+"px";this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top;this.leftZoomHandle_.style.visibility="visible";this.rightZoomHandle_.style.visibility="visible"};a.prototype.drawInteractiveLayer_=function(){var c=this.fgcanvas_ctx_;c.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var f=1;var e=this.canvasRect_.w-f;var b=this.canvasRect_.h-f;var h=this.getZoomHandleStatus_();c.strokeStyle="black";if(!h.isZoomed){c.beginPath();c.moveTo(f,f);c.lineTo(f,b);c.lineTo(e,b);c.lineTo(e,f);c.stroke();if(this.iePanOverlay_){this.iePanOverlay_.style.display="none"}}else{var g=Math.max(f,h.leftHandlePos-this.canvasRect_.x);var d=Math.min(e,h.rightHandlePos-this.canvasRect_.x);c.fillStyle="rgba(240, 240, 240, 0.6)";c.fillRect(0,0,g,this.canvasRect_.h);c.fillRect(d,0,this.canvasRect_.w-d,this.canvasRect_.h);c.beginPath();c.moveTo(f,f);c.lineTo(g,f);c.lineTo(g,b);c.lineTo(d,b);c.lineTo(d,f);c.lineTo(e,f);c.stroke();if(this.isUsingExcanvas_){this.iePanOverlay_.style.width=(d-g)+"px";this.iePanOverlay_.style.left=g+"px";this.iePanOverlay_.style.height=b+"px";this.iePanOverlay_.style.display="inline"}}};a.prototype.getZoomHandleStatus_=function(){var c=this.leftZoomHandle_.width/2;var d=parseFloat(this.leftZoomHandle_.style.left)+c;var b=parseFloat(this.rightZoomHandle_.style.left)+c;return{leftHandlePos:d,rightHandlePos:b,isZoomed:(d-1>this.canvasRect_.x||b+1<this.canvasRect_.x+this.canvasRect_.w)}};return a})();Dygraph.PLUGINS.push(Dygraph.Plugins.Legend,Dygraph.Plugins.Axes,Dygraph.Plugins.RangeSelector,Dygraph.Plugins.ChartLabels,Dygraph.Plugins.Annotations,Dygraph.Plugins.Grid); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined_bak_color.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined_bak_color.js
deleted file mode 100644
index 2f7b14b8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-combined_bak_color.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! @license Copyright 2011 Dan Vanderkam (danvdk@gmail.com) MIT-licensed (http://opensource.org/licenses/MIT) */
-Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(a,c,b){if(typeof(b)=="undefined"){b=10}for(;parseInt(a,10)<b&&b>1;b/=10){a=c.toString()+a}return a.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(a){return Date.ext.locales[a.locale].a[a.getDay()]},A:function(a){return Date.ext.locales[a.locale].A[a.getDay()]},b:function(a){return Date.ext.locales[a.locale].b[a.getMonth()]},B:function(a){return Date.ext.locales[a.locale].B[a.getMonth()]},c:"toLocaleString",C:function(a){return Date.ext.util.xPad(parseInt(a.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(a){return Date.ext.util.xPad(parseInt(Date.ext.util.G(a)/100,10),0)},G:function(c){var e=c.getFullYear();var b=parseInt(Date.ext.formats.V(c),10);var a=parseInt(Date.ext.formats.W(c),10);if(a>b){e++}else{if(a===0&&b>=52){e--}}return e},H:["getHours","0"],I:function(b){var a=b.getHours()%12;return Date.ext.util.xPad(a===0?12:a,0)},j:function(c){var a=c-new Date(""+c.getFullYear()+"/1/1 GMT");a+=c.getTimezoneOffset()*60000;var b=parseInt(a/60000/60/24,10)+1;return Date.ext.util.xPad(b,0,100)},m:function(a){return Date.ext.util.xPad(a.getMonth()+1,0)},M:["getMinutes","0"],p:function(a){return Date.ext.locales[a.locale].p[a.getHours()>=12?1:0]},P:function(a){return Date.ext.locales[a.locale].P[a.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(a){var b=a.getDay();return b===0?7:b},U:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=6-e.getDay();var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0)},V:function(e){var c=parseInt(Date.ext.formats.W(e),10);var a=(new Date(""+e.getFullYear()+"/1/1")).getDay();var b=c+(a>4||a<=1?0:1);if(b==53&&(new Date(""+e.getFullYear()+"/12/31")).getDay()<4){b=1}else{if(b===0){b=Date.ext.formats.V(new Date(""+(e.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(b,0)},w:"getDay",W:function(e){var a=parseInt(Date.ext.formats.j(e),10);var c=7-Date.ext.formats.u(e);var b=parseInt((a+c)/7,10);return Date.ext.util.xPad(b,0,10)},y:function(a){return Date.ext.util.xPad(a.getFullYear()%100,0)},Y:"getFullYear",z:function(c){var b=c.getTimezoneOffset();var a=Date.ext.util.xPad(parseInt(Math.abs(b/60),10),0);var e=Date.ext.util.xPad(b%60,0);return(b>0?"-":"+")+a+e},Z:function(a){return a.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(a){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(a){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var c=this;while(a.match(/%[cDhnrRtTxXzZ]/)){a=a.replace(/%([cDhnrRtTxXzZ])/g,function(e,d){var g=Date.ext.aggregates[d];return(g=="locale"?Date.ext.locales[c.locale][d]:g)})}var b=a.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(e,d){var g=Date.ext.formats[d];if(typeof(g)=="string"){return c[g]()}else{if(typeof(g)=="function"){return g.call(c,c)}else{if(typeof(g)=="object"&&typeof(g[0])=="string"){return Date.ext.util.xPad(c[g[0]](),g[1])}else{return d}}}});c=null;return b};"use strict";function RGBColorParser(f){this.ok=false;if(f.charAt(0)=="#"){f=f.substr(1,6)}f=f.replace(/ /g,"");f=f.toLowerCase();var b={dodgerBlue:"#1f77b4",vividOrange:"#ff7f0e",forestGreen:"#2ca02c",greenishRed:"#8c864b",desaturatedViolet:"#9467bd",darkModerateRed:"#8c564b",softPink:"#e377c2",darkGray:"#7f7f7f",strongYellow:"#bcbd22",strongCyan:"#17becf",vividRed:"#dc143c",darkMagenta:"#800080",blue:"#0000FF",darkLimeGreen:"#008000",reddishOrange:"#D2691E",red:"#FF0000",black:"#000000",pink:"#DB7093",pureMagenta:"#FF00FF",softBlue:"#7B68EE",strongBlue:"#1f77b6",verySoftCyan:"#9edae5",darkBlue:"#393b79",darkModerateBlue:"#5254a3",slightlyDesaturatedBlue:"#6b6ecf",verySoftBlue:"#9c9ede",darkGreen:"#637939",darkModerateGreen:"#8ca252",slightlyDesaturatedGreen:"#b5cf6b",desaturatedGreen:"#cedb9c",aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};for(var g in b){if(f==g){f=b[g]}}var e=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(i){return[parseInt(i[1]),parseInt(i[2]),parseInt(i[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(i){return[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(i){return[parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16)]}}];for(var c=0;c<e.length;c++){var j=e[c].re;var a=e[c].process;var h=j.exec(f);if(h){var d=a(h);this.r=d[0];this.g=d[1];this.b=d[2];this.ok=true}}this.r=(this.r<0||isNaN(this.r))?0:((this.r>255)?255:this.r);this.g=(this.g<0||isNaN(this.g))?0:((this.g>255)?255:this.g);this.b=(this.b<0||isNaN(this.b))?0:((this.b>255)?255:this.b);this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"};this.toHex=function(){var l=this.r.toString(16);var k=this.g.toString(16);var i=this.b.toString(16);if(l.length==1){l="0"+l}if(k.length==1){k="0"+k}if(i.length==1){i="0"+i}return"#"+l+k+i}}function printStackTrace(b){b=b||{guess:true};var c=b.e||null,e=!!b.guess;var d=new printStackTrace.implementation(),a=d.run(c);return(e)?d.guessAnonymousFunctions(a):a}printStackTrace.implementation=function(){};printStackTrace.implementation.prototype={run:function(a,b){a=a||this.createException();b=b||this.mode(a);if(b==="other"){return this.other(arguments.callee)}else{return this[b](a)}},createException:function(){try{this.undef()}catch(a){return a}},mode:function(a){if(a["arguments"]&&a.stack){return"chrome"}else{if(typeof a.message==="string"&&typeof window!=="undefined"&&window.opera){if(!a.stacktrace){return"opera9"}if(a.message.indexOf("\n")>-1&&a.message.split("\n").length>a.stacktrace.split("\n").length){return"opera9"}if(!a.stack){return"opera10a"}if(a.stacktrace.indexOf("called from line")<0){return"opera10b"}return"opera11"}else{if(a.stack){return"firefox"}}}return"other"},instrumentFunction:function(b,d,e){b=b||window;var a=b[d];b[d]=function c(){e.call(this,printStackTrace().slice(4));return b[d]._instrumented.apply(this,arguments)};b[d]._instrumented=a},deinstrumentFunction:function(a,b){if(a[b].constructor===Function&&a[b]._instrumented&&a[b]._instrumented.constructor===Function){a[b]=a[b]._instrumented}},chrome:function(b){var a=(b.stack+"\n").replace(/^\S[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^([^\(]+?)([\n$])/gm,"{anonymous}()@$1$2").replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm,"{anonymous}()@$1").split("\n");a.pop();return a},firefox:function(a){return a.stack.replace(/(?:\n@:0)?\s+$/m,"").replace(/^\(/gm,"{anonymous}(").split("\n")},opera11:function(g){var a="{anonymous}",h=/^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/;var k=g.stacktrace.split("\n"),l=[];for(var c=0,f=k.length;c<f;c+=2){var d=h.exec(k[c]);if(d){var j=d[4]+":"+d[1]+":"+d[2];var b=d[3]||"global code";b=b.replace(/<anonymous function: (\S+)>/,"$1").replace(/<anonymous function>/,a);l.push(b+"@"+j+" -- "+k[c+1].replace(/^\s+/,""))}}return l},opera10b:function(g){var a="{anonymous}",h=/^(.*)@(.+):(\d+)$/;var j=g.stacktrace.split("\n"),k=[];for(var c=0,f=j.length;c<f;c++){var d=h.exec(j[c]);if(d){var b=d[1]?(d[1]+"()"):"global code";k.push(b+"@"+d[2]+":"+d[3])}}return k},opera10a:function(g){var a="{anonymous}",h=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;var j=g.stacktrace.split("\n"),k=[];for(var c=0,f=j.length;c<f;c+=2){var d=h.exec(j[c]);if(d){var b=d[3]||a;k.push(b+"()@"+d[2]+":"+d[1]+" -- "+j[c+1].replace(/^\s+/,""))}}return k},opera9:function(j){var d="{anonymous}",h=/Line (\d+).*script (?:in )?(\S+)/i;var c=j.message.split("\n"),b=[];for(var g=2,a=c.length;g<a;g+=2){var f=h.exec(c[g]);if(f){b.push(d+"()@"+f[2]+":"+f[1]+" -- "+c[g+1].replace(/^\s+/,""))}}return b},other:function(g){var b="{anonymous}",f=/function\s*([\w\-$]+)?\s*\(/i,a=[],d,c,e=10;while(g&&a.length<e){d=f.test(g.toString())?RegExp.$1||b:b;c=Array.prototype.slice.call(g["arguments"]||[]);a[a.length]=d+"("+this.stringifyArguments(c)+")";g=g.caller}return a},stringifyArguments:function(c){var b=[];var e=Array.prototype.slice;for(var d=0;d<c.length;++d){var a=c[d];if(a===undefined){b[d]="undefined"}else{if(a===null){b[d]="null"}else{if(a.constructor){if(a.constructor===Array){if(a.length<3){b[d]="["+this.stringifyArguments(a)+"]"}else{b[d]="["+this.stringifyArguments(e.call(a,0,1))+"..."+this.stringifyArguments(e.call(a,-1))+"]"}}else{if(a.constructor===Object){b[d]="#object"}else{if(a.constructor===Function){b[d]="#function"}else{if(a.constructor===String){b[d]='"'+a+'"'}else{if(a.constructor===Number){b[d]=a}}}}}}}}}return b.join(",")},sourceCache:{},ajax:function(a){var b=this.createXMLHTTPObject();if(b){try{b.open("GET",a,false);b.send(null);return b.responseText}catch(c){}}return""},createXMLHTTPObject:function(){var c,a=[function(){return new XMLHttpRequest()},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}];for(var b=0;b<a.length;b++){try{c=a[b]();this.createXMLHTTPObject=a[b];return c}catch(d){}}},isSameDomain:function(a){return a.indexOf(location.hostname)!==-1},getSource:function(a){if(!(a in this.sourceCache)){this.sourceCache[a]=this.ajax(a).split("\n")}return this.sourceCache[a]},guessAnonymousFunctions:function(k){for(var g=0;g<k.length;++g){var f=/\{anonymous\}\(.*\)@(.*)/,l=/^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,b=k[g],c=f.exec(b);if(c){var e=l.exec(c[1]),d=e[1],a=e[2],j=e[3]||0;if(d&&this.isSameDomain(d)&&a){var h=this.guessAnonymousFunction(d,a,j);k[g]=b.replace("{anonymous}",h)}}}return k},guessAnonymousFunction:function(c,f,a){var b;try{b=this.findFunctionName(this.getSource(c),f)}catch(d){b="getSource failed with url: "+c+", exception: "+d.toString()}return b},findFunctionName:function(a,e){var g=/function\s+([^(]*?)\s*\(([^)]*)\)/;var k=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/;var h=/['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/;var b="",l,j=Math.min(e,20),d,c;for(var f=0;f<j;++f){l=a[e-f-1];c=l.indexOf("//");if(c>=0){l=l.substr(0,c)}if(l){b=l+b;d=k.exec(b);if(d&&d[1]){return d[1]}d=g.exec(b);if(d&&d[1]){return d[1]}d=h.exec(b);if(d&&d[1]){return d[1]}}}return"(?)"}};CanvasRenderingContext2D.prototype.installPattern=function(e){if(typeof(this.isPatternInstalled)!=="undefined"){throw"Must un-install old line pattern before installing a new one."}this.isPatternInstalled=true;var g=[0,0];var b=[];var f=this.beginPath;var d=this.lineTo;var c=this.moveTo;var a=this.stroke;this.uninstallPattern=function(){this.beginPath=f;this.lineTo=d;this.moveTo=c;this.stroke=a;this.uninstallPattern=undefined;this.isPatternInstalled=undefined};this.beginPath=function(){b=[];f.call(this)};this.moveTo=function(h,i){b.push([[h,i]]);c.call(this,h,i)};this.lineTo=function(h,j){var i=b[b.length-1];i.push([h,j])};this.stroke=function(){if(b.length===0){a.call(this);return}for(var p=0;p<b.length;p++){var o=b[p];var l=o[0][0],u=o[0][1];for(var n=1;n<o.length;n++){var h=o[n][0],s=o[n][1];this.save();var w=(h-l);var v=(s-u);var r=Math.sqrt(w*w+v*v);var k=Math.atan2(v,w);this.translate(l,u);c.call(this,0,0);this.rotate(k);var m=g[0];var t=0;while(r>t){var q=e[m];if(g[1]){t+=g[1]}else{t+=q}if(t>r){g=[m,t-r];t=r}else{g=[(m+1)%e.length,0]}if(m%2===0){d.call(this,t,0)}else{c.call(this,t,0)}m=(m+1)%e.length}this.restore();l=h,u=s}}a.call(this);b=[]}};CanvasRenderingContext2D.prototype.uninstallPattern=function(){throw"Must install a line pattern before uninstalling it."};var DygraphOptions=(function(){var a=function(b){this.dygraph_=b;this.yAxes_=[];this.xAxis_={};this.series_={};this.global_=this.dygraph_.attrs_;this.user_=this.dygraph_.user_attrs_||{};this.labels_=[];this.highlightSeries_=this.get("highlightSeriesOpts")||{};this.reparseSeries()};a.AXIS_STRING_MAPPINGS_={y:0,Y:0,y1:0,Y1:0,y2:1,Y2:1};a.axisToIndex_=function(b){if(typeof(b)=="string"){if(a.AXIS_STRING_MAPPINGS_.hasOwnProperty(b)){return a.AXIS_STRING_MAPPINGS_[b]}throw"Unknown axis : "+b}if(typeof(b)=="number"){if(b===0||b===1){return b}throw"Dygraphs only supports two y-axes, indexed from 0-1."}if(b){throw"Unknown axis : "+b}return 0};a.prototype.reparseSeries=function(){var g=this.get("labels");if(!g){return}this.labels_=g.slice(1);this.yAxes_=[{series:[],options:{}}];this.xAxis_={options:{}};this.series_={};var h=!this.user_.series;if(h){var c=0;for(var j=0;j<this.labels_.length;j++){var i=this.labels_[j];var e=this.user_[i]||{};var b=0;var d=e.axis;if(typeof(d)=="object"){b=++c;this.yAxes_[b]={series:[i],options:d}}if(!d){this.yAxes_[0].series.push(i)}this.series_[i]={idx:j,yAxis:b,options:e}}for(var j=0;j<this.labels_.length;j++){var i=this.labels_[j];var e=this.series_[i]["options"];var d=e.axis;if(typeof(d)=="string"){if(!this.series_.hasOwnProperty(d)){Dygraph.error("Series "+i+" wants to share a y-axis with series "+d+", which does not define its own axis.");return}var b=this.series_[d].yAxis;this.series_[i].yAxis=b;this.yAxes_[b].series.push(i)}}}else{for(var j=0;j<this.labels_.length;j++){var i=this.labels_[j];var e=this.user_.series[i]||{};var b=a.axisToIndex_(e.axis);this.series_[i]={idx:j,yAxis:b,options:e};if(!this.yAxes_[b]){this.yAxes_[b]={series:[i],options:{}}}else{this.yAxes_[b].series.push(i)}}}var f=this.user_.axes||{};Dygraph.update(this.yAxes_[0].options,f.y||{});if(this.yAxes_.length>1){Dygraph.update(this.yAxes_[1].options,f.y2||{})}Dygraph.update(this.xAxis_.options,f.x||{})};a.prototype.get=function(c){var b=this.getGlobalUser_(c);if(b!==null){return b}return this.getGlobalDefault_(c)};a.prototype.getGlobalUser_=function(b){if(this.user_.hasOwnProperty(b)){return this.user_[b]}return null};a.prototype.getGlobalDefault_=function(b){if(this.global_.hasOwnProperty(b)){return this.global_[b]}if(Dygraph.DEFAULT_ATTRS.hasOwnProperty(b)){return Dygraph.DEFAULT_ATTRS[b]}return null};a.prototype.getForAxis=function(d,e){var f;var i;if(typeof(e)=="number"){f=e;i=f===0?"y":"y2"}else{if(e=="y1"){e="y"}if(e=="y"){f=0}else{if(e=="y2"){f=1}else{if(e=="x"){f=-1}else{throw"Unknown axis "+e}}}i=e}var g=(f==-1)?this.xAxis_:this.yAxes_[f];if(g){var h=g.options;if(h.hasOwnProperty(d)){return h[d]}}var c=this.getGlobalUser_(d);if(c!==null){return c}var b=Dygraph.DEFAULT_ATTRS.axes[i];if(b.hasOwnProperty(d)){return b[d]}return this.getGlobalDefault_(d)};a.prototype.getForSeries=function(c,e){if(e===this.dygraph_.getHighlightSeries()){if(this.highlightSeries_.hasOwnProperty(c)){return this.highlightSeries_[c]}}if(!this.series_.hasOwnProperty(e)){throw"Unknown series: "+e}var d=this.series_[e];var b=d.options;if(b.hasOwnProperty(c)){return b[c]}return this.getForAxis(c,d.yAxis)};a.prototype.numAxes=function(){return this.yAxes_.length};a.prototype.axisForSeries=function(b){return this.series_[b].yAxis};a.prototype.axisOptions=function(b){return this.yAxes_[b].options};a.prototype.seriesForAxis=function(b){return this.yAxes_[b].series};a.prototype.seriesNames=function(){return this.labels_};return a})();"use strict";var DygraphLayout=function(a){this.dygraph_=a;this.points=[];this.setNames=[];this.annotations=[];this.yAxes_=null;this.xTicks_=null;this.yTicks_=null};DygraphLayout.prototype.attr_=function(a){return this.dygraph_.attr_(a)};DygraphLayout.prototype.addDataset=function(a,b){this.points.push(b);this.setNames.push(a)};DygraphLayout.prototype.getPlotArea=function(){return this.area_};DygraphLayout.prototype.computePlotArea=function(){var a={x:0,y:0};a.w=this.dygraph_.width_-a.x-this.attr_("rightGap");a.h=this.dygraph_.height_;var b={chart_div:this.dygraph_.graphDiv,reserveSpaceLeft:function(c){var d={x:a.x,y:a.y,w:c,h:a.h};a.x+=c;a.w-=c;return d},reserveSpaceRight:function(c){var d={x:a.x+a.w-c,y:a.y,w:c,h:a.h};a.w-=c;return d},reserveSpaceTop:function(c){var d={x:a.x,y:a.y,w:a.w,h:c};a.y+=c;a.h-=c;return d},reserveSpaceBottom:function(c){var d={x:a.x,y:a.y+a.h-c,w:a.w,h:c};a.h-=c;return d},chartRect:function(){return{x:a.x,y:a.y,w:a.w,h:a.h}}};this.dygraph_.cascadeEvents_("layout",b);this.area_=a};DygraphLayout.prototype.setAnnotations=function(d){this.annotations=[];var e=this.attr_("xValueParser")||function(a){return a};for(var c=0;c<d.length;c++){var b={};if(!d[c].xval&&d[c].x===undefined){this.dygraph_.error("Annotations must have an 'x' property");return}if(d[c].icon&&!(d[c].hasOwnProperty("width")&&d[c].hasOwnProperty("height"))){this.dygraph_.error("Must set width and height when setting annotation.icon property");return}Dygraph.update(b,d[c]);if(!b.xval){b.xval=e(b.x)}this.annotations.push(b)}};DygraphLayout.prototype.setXTicks=function(a){this.xTicks_=a};DygraphLayout.prototype.setYAxes=function(a){this.yAxes_=a};DygraphLayout.prototype.evaluate=function(){this._evaluateLimits();this._evaluateLineCharts();this._evaluateLineTicks();this._evaluateAnnotations()};DygraphLayout.prototype._evaluateLimits=function(){var a=this.dygraph_.xAxisRange();this.minxval=a[0];this.maxxval=a[1];var d=a[1]-a[0];this.xscale=(d!==0?1/d:1);for(var b=0;b<this.yAxes_.length;b++){var c=this.yAxes_[b];c.minyval=c.computedValueRange[0];c.maxyval=c.computedValueRange[1];c.yrange=c.maxyval-c.minyval;c.yscale=(c.yrange!==0?1/c.yrange:1);if(c.g.attr_("logscale")){c.ylogrange=Dygraph.log10(c.maxyval)-Dygraph.log10(c.minyval);c.ylogscale=(c.ylogrange!==0?1/c.ylogrange:1);if(!isFinite(c.ylogrange)||isNaN(c.ylogrange)){c.g.error("axis "+b+" of graph at "+c.g+" can't be displayed in log scale for range ["+c.minyval+" - "+c.maxyval+"]")}}}};DygraphLayout._calcYNormal=function(b,c,a){if(a){return 1-((Dygraph.log10(c)-Dygraph.log10(b.minyval))*b.ylogscale)}else{return 1-((c-b.minyval)*b.yscale)}};DygraphLayout.prototype._evaluateLineCharts=function(){var c=this.attr_("connectSeparatedPoints");var k=this.attr_("stackedGraph");var e=this.attr_("errorBars")||this.attr_("customBars");for(var a=0;a<this.points.length;a++){var l=this.points[a];var f=this.setNames[a];var b=this.dygraph_.axisPropertiesForSeries(f);var g=this.dygraph_.attributes_.getForSeries("logscale",f);for(var d=0;d<l.length;d++){var i=l[d];i.x=(i.xval-this.minxval)*this.xscale;var h=i.yval;if(k){i.y_stacked=DygraphLayout._calcYNormal(b,i.yval_stacked,g);if(h!==null&&!isNaN(h)){h=i.yval_stacked}}if(h===null){h=NaN;if(!c){i.yval=NaN}}i.y=DygraphLayout._calcYNormal(b,h,g);if(e){i.y_top=DygraphLayout._calcYNormal(b,h-i.yval_minus,g);i.y_bottom=DygraphLayout._calcYNormal(b,h+i.yval_plus,g)}}}};DygraphLayout.parseFloat_=function(a){if(a===null){return NaN}return a};DygraphLayout.prototype._evaluateLineTicks=function(){var d,c,b,f;this.xticks=[];for(d=0;d<this.xTicks_.length;d++){c=this.xTicks_[d];b=c.label;f=this.xscale*(c.v-this.minxval);if((f>=0)&&(f<=1)){this.xticks.push([f,b])}}this.yticks=[];for(d=0;d<this.yAxes_.length;d++){var e=this.yAxes_[d];for(var a=0;a<e.ticks.length;a++){c=e.ticks[a];b=c.label;f=this.dygraph_.toPercentYCoord(c.v,d);if((f>=0)&&(f<=1)){this.yticks.push([d,f,b])}}}};DygraphLayout.prototype._evaluateAnnotations=function(){var d;var g={};for(d=0;d<this.annotations.length;d++){var b=this.annotations[d];g[b.xval+","+b.series]=b}this.annotated_points=[];if(!this.annotations||!this.annotations.length){return}for(var h=0;h<this.points.length;h++){var e=this.points[h];for(d=0;d<e.length;d++){var f=e[d];var c=f.xval+","+f.name;if(c in g){f.annotation=g[c];this.annotated_points.push(f)}}}};DygraphLayout.prototype.removeAllDatasets=function(){delete this.points;delete this.setNames;delete this.setPointsLengths;delete this.setPointsOffsets;this.points=[];this.setNames=[];this.setPointsLengths=[];this.setPointsOffsets=[]};"use strict";var DygraphCanvasRenderer=function(d,c,b,e){this.dygraph_=d;this.layout=e;this.element=c;this.elementContext=b;this.container=this.element.parentNode;this.height=this.element.height;this.width=this.element.width;if(!this.isIE&&!(DygraphCanvasRenderer.isSupported(this.element))){throw"Canvas is not supported."}this.area=e.getPlotArea();this.container.style.position="relative";this.container.style.width=this.width+"px";if(this.dygraph_.isUsingExcanvas_){this._createIEClipArea()}else{if(!Dygraph.isAndroid()){var a=this.dygraph_.canvas_ctx_;a.beginPath();a.rect(this.area.x,this.area.y,this.area.w,this.area.h);a.clip();a=this.dygraph_.hidden_ctx_;a.beginPath();a.rect(this.area.x,this.area.y,this.area.w,this.area.h);a.clip()}}};DygraphCanvasRenderer.prototype.attr_=function(a,b){return this.dygraph_.attr_(a,b)};DygraphCanvasRenderer.prototype.clear=function(){var a;if(this.isIE){try{if(this.clearDelay){this.clearDelay.cancel();this.clearDelay=null}a=this.elementContext}catch(b){return}}a=this.elementContext;a.clearRect(0,0,this.width,this.height)};DygraphCanvasRenderer.isSupported=function(f){var b=null;try{if(typeof(f)=="undefined"||f===null){b=document.createElement("canvas")}else{b=f}b.getContext("2d")}catch(c){var d=navigator.appVersion.match(/MSIE (\d\.\d)/);var a=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);if((!d)||(d[1]<6)||(a)){return false}return true}return true};DygraphCanvasRenderer.prototype.render=function(){this._updatePoints();this._renderLineChart()};DygraphCanvasRenderer.prototype._createIEClipArea=function(){var g="dygraph-clip-div";var f=this.dygraph_.graphDiv;for(var e=f.childNodes.length-1;e>=0;e--){if(f.childNodes[e].className==g){f.removeChild(f.childNodes[e])}}var c=document.bgColor;var d=this.dygraph_.graphDiv;while(d!=document){var a=d.currentStyle.backgroundColor;if(a&&a!="transparent"){c=a;break}d=d.parentNode}function b(j){if(j.w===0||j.h===0){return}var i=document.createElement("div");i.className=g;i.style.backgroundColor=c;i.style.position="absolute";i.style.left=j.x+"px";i.style.top=j.y+"px";i.style.width=j.w+"px";i.style.height=j.h+"px";f.appendChild(i)}var h=this.area;b({x:0,y:0,w:h.x,h:this.height});b({x:h.x,y:0,w:this.width-h.x,h:h.y});b({x:h.x+h.w,y:0,w:this.width-h.x-h.w,h:this.height});b({x:h.x,y:h.y+h.h,w:this.width-h.x,h:this.height-h.h-h.y})};DygraphCanvasRenderer._getIteratorPredicate=function(a){return a?DygraphCanvasRenderer._predicateThatSkipsEmptyPoints:null};DygraphCanvasRenderer._predicateThatSkipsEmptyPoints=function(b,a){return b[a].yval!==null};DygraphCanvasRenderer._drawStyledLine=function(i,a,m,q,f,n,d){var h=i.dygraph;var c=h.getOption("stepPlot",i.setName);if(!Dygraph.isArrayLike(q)){q=null}var l=h.getOption("drawGapEdgePoints",i.setName);var o=i.points;var k=Dygraph.createIterator(o,0,o.length,DygraphCanvasRenderer._getIteratorPredicate(h.getOption("connectSeparatedPoints")));var j=q&&(q.length>=2);var p=i.drawingContext;p.save();if(j){p.installPattern(q)}var b=DygraphCanvasRenderer._drawSeries(i,k,m,d,f,l,c,a);DygraphCanvasRenderer._drawPointsOnLine(i,b,n,a,d);if(j){p.uninstallPattern()}p.restore()};DygraphCanvasRenderer._drawSeries=function(v,t,m,h,p,s,g,q){var b=null;var w=null;var k=null;var j;var o;var l=[];var f=true;var n=v.drawingContext;n.beginPath();n.strokeStyle=q;n.lineWidth=m;var c=t.array_;var u=t.end_;var a=t.predicate_;for(var r=t.start_;r<u;r++){o=c[r];if(a){while(r<u&&!a(c,r)){r++}if(r==u){break}o=c[r]}if(o.canvasy===null||o.canvasy!=o.canvasy){if(g&&b!==null){n.moveTo(b,w);n.lineTo(o.canvasx,w)}b=w=null}else{j=false;if(s||!b){t.nextIdx_=r;t.next();k=t.hasNext?t.peek.canvasy:null;var d=k===null||k!=k;j=(!b&&d);if(s){if((!f&&!b)||(t.hasNext&&d)){j=true}}}if(b!==null){if(m){if(g){n.moveTo(b,w);n.lineTo(o.canvasx,w)}n.lineTo(o.canvasx,o.canvasy)}}else{n.moveTo(o.canvasx,o.canvasy)}if(p||j){l.push([o.canvasx,o.canvasy,o.idx])}b=o.canvasx;w=o.canvasy}f=false}n.stroke();return l};DygraphCanvasRenderer._drawPointsOnLine=function(h,i,f,d,g){var c=h.drawingContext;for(var b=0;b<i.length;b++){var a=i[b];c.save();f(h.dygraph,h.setName,c,a[0],a[1],d,g,a[2]);c.restore()}};DygraphCanvasRenderer.prototype._updatePoints=function(){var e=this.layout.points;for(var c=e.length;c--;){var d=e[c];for(var b=d.length;b--;){var a=d[b];a.canvasx=this.area.w*a.x+this.area.x;a.canvasy=this.area.h*a.y+this.area.y}}};DygraphCanvasRenderer.prototype._renderLineChart=function(g,u){var h=u||this.elementContext;var n;var a=this.layout.points;var s=this.layout.setNames;var b;this.colors=this.dygraph_.colorsMap_;var o=this.attr_("plotter");var f=o;if(!Dygraph.isArrayLike(f)){f=[f]}var c={};for(n=0;n<s.length;n++){b=s[n];var t=this.attr_("plotter",b);if(t==o){continue}c[b]=t}for(n=0;n<f.length;n++){var r=f[n];var q=(n==f.length-1);for(var l=0;l<a.length;l++){b=s[l];if(g&&b!=g){continue}var m=a[l];var e=r;if(b in c){if(q){e=c[b]}else{continue}}var k=this.colors[b];var d=this.dygraph_.getOption("strokeWidth",b);h.save();h.strokeStyle=k;h.lineWidth=d;e({points:m,setName:b,drawingContext:h,color:k,strokeWidth:d,dygraph:this.dygraph_,axis:this.dygraph_.axisPropertiesForSeries(b),plotArea:this.area,seriesIndex:l,seriesCount:a.length,singleSeriesName:g,allSeriesPoints:a});h.restore()}}};DygraphCanvasRenderer._Plotters={linePlotter:function(a){DygraphCanvasRenderer._linePlotter(a)},fillPlotter:function(a){DygraphCanvasRenderer._fillPlotter(a)},errorPlotter:function(a){DygraphCanvasRenderer._errorPlotter(a)}};DygraphCanvasRenderer._linePlotter=function(f){var d=f.dygraph;var h=f.setName;var i=f.strokeWidth;var a=d.getOption("strokeBorderWidth",h);var j=d.getOption("drawPointCallback",h)||Dygraph.Circles.DEFAULT;var k=d.getOption("strokePattern",h);var c=d.getOption("drawPoints",h);var b=d.getOption("pointSize",h);if(a&&i){DygraphCanvasRenderer._drawStyledLine(f,d.getOption("strokeBorderColor",h),i+2*a,k,c,j,b)}DygraphCanvasRenderer._drawStyledLine(f,f.color,i,k,c,j,b)};DygraphCanvasRenderer._errorPlotter=function(s){var r=s.dygraph;var f=s.setName;var t=r.getOption("errorBars")||r.getOption("customBars");if(!t){return}var k=r.getOption("fillGraph",f);if(k){r.warn("Can't use fillGraph option with error bars")}var m=s.drawingContext;var n=s.color;var o=r.getOption("fillAlpha",f);var i=r.getOption("stepPlot",f);var p=s.points;var q=Dygraph.createIterator(p,0,p.length,DygraphCanvasRenderer._getIteratorPredicate(r.getOption("connectSeparatedPoints")));var j;var h=NaN;var c=NaN;var d=[-1,-1];var a=new RGBColorParser(n);var u="rgba("+a.r+","+a.g+","+a.b+","+o+")";m.fillStyle=u;m.beginPath();var b=function(e){return(e===null||e===undefined||isNaN(e))};while(q.hasNext){var l=q.next();if((!i&&b(l.y))||(i&&!isNaN(c)&&b(c))){h=NaN;continue}if(i){j=[l.y_bottom,l.y_top];c=l.y}else{j=[l.y_bottom,l.y_top]}j[0]=s.plotArea.h*j[0]+s.plotArea.y;j[1]=s.plotArea.h*j[1]+s.plotArea.y;if(!isNaN(h)){if(i){m.moveTo(h,d[0]);m.lineTo(l.canvasx,d[0]);m.lineTo(l.canvasx,d[1])}else{m.moveTo(h,d[0]);m.lineTo(l.canvasx,j[0]);m.lineTo(l.canvasx,j[1])}m.lineTo(h,d[1]);m.closePath()}d=j;h=l.canvasx}m.fill()};DygraphCanvasRenderer._fillPlotter=function(F){if(F.singleSeriesName){return}if(F.seriesIndex!==0){return}var D=F.dygraph;var I=D.getLabels().slice(1);for(var C=I.length;C>=0;C--){if(!D.visibility()[C]){I.splice(C,1)}}var h=(function(){for(var e=0;e<I.length;e++){if(D.getOption("fillGraph",I[e])){return true}}return false})();if(!h){return}var w=F.drawingContext;var E=F.plotArea;var c=F.allSeriesPoints;var z=c.length;var y=D.getOption("fillAlpha");var k=D.getOption("stackedGraph");var q=D.getColors();var s={};var a;var r;for(var u=z-1;u>=0;u--){var n=I[u];if(!D.getOption("fillGraph",n)){continue}var p=D.getOption("stepPlot",n);var x=q[u];var f=D.axisPropertiesForSeries(n);var d=1+f.minyval*f.yscale;if(d<0){d=0}else{if(d>1){d=1}}d=E.h*d+E.y;var B=c[u];var A=Dygraph.createIterator(B,0,B.length,DygraphCanvasRenderer._getIteratorPredicate(D.getOption("connectSeparatedPoints")));var m=NaN;var l=[-1,-1];var t;var b=new RGBColorParser(x);var H="rgba("+b.r+","+b.g+","+b.b+","+y+")";w.fillStyle=H;w.beginPath();var j,G=true;while(A.hasNext){var v=A.next();if(!Dygraph.isOK(v.y)){m=NaN;if(v.y_stacked!==null&&!isNaN(v.y_stacked)){s[v.canvasx]=E.h*v.y_stacked+E.y}continue}if(k){if(!G&&j==v.xval){continue}else{G=false;j=v.xval}a=s[v.canvasx];var o;if(a===undefined){o=d}else{if(r){o=a[0]}else{o=a}}t=[v.canvasy,o];if(p){if(l[0]===-1){s[v.canvasx]=[v.canvasy,d]}else{s[v.canvasx]=[v.canvasy,l[0]]}}else{s[v.canvasx]=v.canvasy}}else{t=[v.canvasy,d]}if(!isNaN(m)){w.moveTo(m,l[0]);if(p){w.lineTo(v.canvasx,l[0])}else{w.lineTo(v.canvasx,t[0])}if(r&&a){w.lineTo(v.canvasx,a[1])}else{w.lineTo(v.canvasx,t[1])}w.lineTo(m,l[1]);w.closePath()}l=t;m=v.canvasx}r=p;w.fill()}};"use strict";var Dygraph=function(d,c,b,a){this.is_initial_draw_=true;this.readyFns_=[];if(a!==undefined){this.warn("Using deprecated four-argument dygraph constructor");this.__old_init__(d,c,b,a)}else{this.__init__(d,c,b)}};Dygraph.NAME="Dygraph";Dygraph.VERSION="1.0.0";Dygraph.__repr__=function(){return"["+this.NAME+" "+this.VERSION+"]"};Dygraph.toString=function(){return this.__repr__()};Dygraph.DEFAULT_ROLL_PERIOD=1;Dygraph.DEFAULT_WIDTH=480;Dygraph.DEFAULT_HEIGHT=320;Dygraph.ANIMATION_STEPS=12;Dygraph.ANIMATION_DURATION=200;Dygraph.KMB_LABELS=["K","M","B","T","Q"];Dygraph.KMG2_BIG_LABELS=["k","M","G","T","P","E","Z","Y"];Dygraph.KMG2_SMALL_LABELS=["m","u","n","p","f","a","z","y"];Dygraph.numberValueFormatter=function(s,a,u,l){var e=a("sigFigs");if(e!==null){return Dygraph.floatFormat(s,e)}var c=a("digitsAfterDecimal");var o=a("maxNumberWidth");var b=a("labelsKMB");var r=a("labelsKMG2");var q;if(s!==0&&(Math.abs(s)>=Math.pow(10,o)||Math.abs(s)<Math.pow(10,-c))){q=s.toExponential(c)}else{q=""+Dygraph.round_(s,c)}if(b||r){var f;var t=[];var m=[];if(b){f=1000;t=Dygraph.KMB_LABELS}if(r){if(b){Dygraph.warn("Setting both labelsKMB and labelsKMG2. Pick one!")}f=1024;t=Dygraph.KMG2_BIG_LABELS;m=Dygraph.KMG2_SMALL_LABELS}var p=Math.abs(s);var d=Dygraph.pow(f,t.length);for(var h=t.length-1;h>=0;h--,d/=f){if(p>=d){q=Dygraph.round_(s/d,c)+t[h];break}}if(r){var i=String(s.toExponential()).split("e-");if(i.length===2&&i[1]>=3&&i[1]<=24){if(i[1]%3>0){q=Dygraph.round_(i[0]/Dygraph.pow(10,(i[1]%3)),c)}else{q=Number(i[0]).toFixed(2)}q+=m[Math.floor(i[1]/3)-1]}}}return q};Dygraph.numberAxisLabelFormatter=function(a,d,c,b){return Dygraph.numberValueFormatter(a,c,b)};Dygraph.dateString_=function(e){var i=Dygraph.zeropad;var h=new Date(e);var f=""+h.getFullYear();var g=i(h.getMonth()+1);var a=i(h.getDate());var c="";var b=h.getHours()*3600+h.getMinutes()*60+h.getSeconds();if(b){c=" "+Dygraph.hmsString_(e)}return f+"/"+g+"/"+a+c};Dygraph.dateAxisFormatter=function(b,c){if(c>=Dygraph.DECADAL){return b.strftime("%Y")}else{if(c>=Dygraph.MONTHLY){return b.strftime("%b %y")}else{var a=b.getHours()*3600+b.getMinutes()*60+b.getSeconds()+b.getMilliseconds();if(a===0||c>=Dygraph.DAILY){return new Date(b.getTime()+3600*1000).strftime("%d%b")}else{return Dygraph.hmsString_(b.getTime())}}}};Dygraph.Plotters=DygraphCanvasRenderer._Plotters;Dygraph.DEFAULT_ATTRS={highlightCircleSize:3,highlightSeriesOpts:null,highlightSeriesBackgroundAlpha:0.5,labelsDivWidth:250,labelsDivStyles:{},labelsSeparateLines:false,labelsShowZeroValues:true,labelsKMB:false,labelsKMG2:false,showLabelsOnHighlight:true,digitsAfterDecimal:2,maxNumberWidth:6,sigFigs:null,strokeWidth:1,strokeBorderWidth:0,strokeBorderColor:"white",axisTickSize:3,axisLabelFontSize:14,xAxisLabelWidth:50,yAxisLabelWidth:50,rightGap:5,showRoller:false,xValueParser:Dygraph.dateParser,delimiter:",",sigma:2,errorBars:false,fractions:false,wilsonInterval:true,customBars:false,fillGraph:false,fillAlpha:0.15,connectSeparatedPoints:false,stackedGraph:false,stackedGraphNaNFill:"all",hideOverlayOnMouseOut:true,legend:"onmouseover",stepPlot:false,avoidMinZero:false,xRangePad:0,yRangePad:null,drawAxesAtZero:false,titleHeight:28,xLabelHeight:18,yLabelWidth:18,drawXAxis:true,drawYAxis:true,axisLineColor:"black",axisLineWidth:0.3,gridLineWidth:0.3,axisLabelColor:"black",axisLabelFont:"Arial",axisLabelWidth:50,drawYGrid:true,drawXGrid:true,gridLineColor:"rgb(128,128,128)",interactionModel:null,animatedZooms:false,showRangeSelector:false,rangeSelectorHeight:40,rangeSelectorPlotStrokeColor:"#808FAB",rangeSelectorPlotFillColor:"#A7B1C4",plotter:[Dygraph.Plotters.fillPlotter,Dygraph.Plotters.errorPlotter,Dygraph.Plotters.linePlotter],plugins:[],axes:{x:{pixelsPerLabel:60,axisLabelFormatter:Dygraph.dateAxisFormatter,valueFormatter:Dygraph.dateString_,drawGrid:true,independentTicks:true,ticker:null},y:{pixelsPerLabel:30,valueFormatter:Dygraph.numberValueFormatter,axisLabelFormatter:Dygraph.numberAxisLabelFormatter,drawGrid:true,independentTicks:true,ticker:null},y2:{pixelsPerLabel:30,valueFormatter:Dygraph.numberValueFormatter,axisLabelFormatter:Dygraph.numberAxisLabelFormatter,drawGrid:false,independentTicks:false,ticker:null}}};Dygraph.HORIZONTAL=1;Dygraph.VERTICAL=2;Dygraph.PLUGINS=[];Dygraph.addedAnnotationCSS=false;Dygraph.prototype.__old_init__=function(f,d,e,b){if(e!==null){var a=["Date"];for(var c=0;c<e.length;c++){a.push(e[c])}Dygraph.update(b,{labels:a})}this.__init__(f,d,b)};Dygraph.prototype.__init__=function(a,c,l){if(/MSIE/.test(navigator.userAgent)&&!window.opera&&typeof(G_vmlCanvasManager)!="undefined"&&document.readyState!="complete"){var o=this;setTimeout(function(){o.__init__(a,c,l)},100);return}if(l===null||l===undefined){l={}}l=Dygraph.mapLegacyOptions_(l);if(typeof(a)=="string"){a=document.getElementById(a)}if(!a){Dygraph.error("Constructing dygraph with a non-existent div!");return}this.isUsingExcanvas_=typeof(G_vmlCanvasManager)!="undefined";this.maindiv_=a;this.file_=c;this.rollPeriod_=l.rollPeriod||Dygraph.DEFAULT_ROLL_PERIOD;this.previousVerticalX_=-1;this.fractions_=l.fractions||false;this.dateWindow_=l.dateWindow||null;this.annotations_=[];this.zoomed_x_=false;this.zoomed_y_=false;a.innerHTML="";if(a.style.width===""&&l.width){a.style.width=l.width+"px"}if(a.style.height===""&&l.height){a.style.height=l.height+"px"}if(a.style.height===""&&a.clientHeight===0){a.style.height=Dygraph.DEFAULT_HEIGHT+"px";if(a.style.width===""){a.style.width=Dygraph.DEFAULT_WIDTH+"px"}}this.width_=a.clientWidth||l.width||0;this.height_=a.clientHeight||l.height||0;if(l.stackedGraph){l.fillGraph=true}this.user_attrs_={};Dygraph.update(this.user_attrs_,l);this.attrs_={};Dygraph.updateDeep(this.attrs_,Dygraph.DEFAULT_ATTRS);this.boundaryIds_=[];this.setIndexByName_={};this.datasetIndex_=[];this.registeredEvents_=[];this.eventListeners_={};this.attributes_=new DygraphOptions(this);this.createInterface_();this.plugins_=[];var d=Dygraph.PLUGINS.concat(this.getOption("plugins"));for(var g=0;g<d.length;g++){var k=d[g];var f=new k();var j={plugin:f,events:{},options:{},pluginOptions:{}};var b=f.activate(this);for(var h in b){j.events[h]=b[h]}this.plugins_.push(j)}for(var g=0;g<this.plugins_.length;g++){var n=this.plugins_[g];for(var h in n.events){if(!n.events.hasOwnProperty(h)){continue}var m=n.events[h];var e=[n.plugin,m];if(!(h in this.eventListeners_)){this.eventListeners_[h]=[e]}else{this.eventListeners_[h].push(e)}}}this.createDragInterface_();this.start_()};Dygraph.prototype.cascadeEvents_=function(c,b){if(!(c in this.eventListeners_)){return true}var g={dygraph:this,cancelable:false,defaultPrevented:false,preventDefault:function(){if(!g.cancelable){throw"Cannot call preventDefault on non-cancelable event."}g.defaultPrevented=true},propagationStopped:false,stopPropagation:function(){g.propagationStopped=true}};Dygraph.update(g,b);var a=this.eventListeners_[c];if(a){for(var d=a.length-1;d>=0;d--){var f=a[d][0];var h=a[d][1];h.call(f,g);if(g.propagationStopped){break}}}return g.defaultPrevented};Dygraph.prototype.isZoomed=function(a){if(a===null||a===undefined){return this.zoomed_x_||this.zoomed_y_}if(a==="x"){return this.zoomed_x_}if(a==="y"){return this.zoomed_y_}throw"axis parameter is ["+a+"] must be null, 'x' or 'y'."};Dygraph.prototype.toString=function(){var a=this.maindiv_;var b=(a&&a.id)?a.id:a;return"[Dygraph "+b+"]"};Dygraph.prototype.attr_=function(b,a){return a?this.attributes_.getForSeries(b,a):this.attributes_.get(b)};Dygraph.prototype.getOption=function(a,b){return this.attr_(a,b)};Dygraph.prototype.getOptionForAxis=function(a,b){return this.attributes_.getForAxis(a,b)};Dygraph.prototype.optionsViewForAxis_=function(b){var a=this;return function(c){var d=a.user_attrs_.axes;if(d&&d[b]&&d[b].hasOwnProperty(c)){return d[b][c]}if(typeof(a.user_attrs_[c])!="undefined"){return a.user_attrs_[c]}d=a.attrs_.axes;if(d&&d[b]&&d[b].hasOwnProperty(c)){return d[b][c]}if(b=="y"&&a.axes_[0].hasOwnProperty(c)){return a.axes_[0][c]}else{if(b=="y2"&&a.axes_[1].hasOwnProperty(c)){return a.axes_[1][c]}}return a.attr_(c)}};Dygraph.prototype.rollPeriod=function(){return this.rollPeriod_};Dygraph.prototype.xAxisRange=function(){return this.dateWindow_?this.dateWindow_:this.xAxisExtremes()};Dygraph.prototype.xAxisExtremes=function(){var d=this.attr_("xRangePad")/this.plotter_.area.w;if(this.numRows()===0){return[0-d,1+d]}var c=this.rawData_[0][0];var b=this.rawData_[this.rawData_.length-1][0];if(d){var a=b-c;c-=a*d;b+=a*d}return[c,b]};Dygraph.prototype.yAxisRange=function(a){if(typeof(a)=="undefined"){a=0}if(a<0||a>=this.axes_.length){return null}var b=this.axes_[a];return[b.computedValueRange[0],b.computedValueRange[1]]};Dygraph.prototype.yAxisRanges=function(){var a=[];for(var b=0;b<this.axes_.length;b++){a.push(this.yAxisRange(b))}return a};Dygraph.prototype.toDomCoords=function(a,c,b){return[this.toDomXCoord(a),this.toDomYCoord(c,b)]};Dygraph.prototype.toDomXCoord=function(b){if(b===null){return null}var c=this.plotter_.area;var a=this.xAxisRange();return c.x+(b-a[0])/(a[1]-a[0])*c.w};Dygraph.prototype.toDomYCoord=function(d,a){var c=this.toPercentYCoord(d,a);if(c===null){return null}var b=this.plotter_.area;return b.y+c*b.h};Dygraph.prototype.toDataCoords=function(a,c,b){return[this.toDataXCoord(a),this.toDataYCoord(c,b)]};Dygraph.prototype.toDataXCoord=function(b){if(b===null){return null}var c=this.plotter_.area;var a=this.xAxisRange();return a[0]+(b-c.x)/c.w*(a[1]-a[0])};Dygraph.prototype.toDataYCoord=function(h,b){if(h===null){return null}var c=this.plotter_.area;var g=this.yAxisRange(b);if(typeof(b)=="undefined"){b=0}if(!this.axes_[b].logscale){return g[0]+(c.y+c.h-h)/c.h*(g[1]-g[0])}else{var f=(h-c.y)/c.h;var a=Dygraph.log10(g[1]);var e=a-(f*(a-Dygraph.log10(g[0])));var d=Math.pow(Dygraph.LOG_SCALE,e);return d}};Dygraph.prototype.toPercentYCoord=function(f,c){if(f===null){return null}if(typeof(c)=="undefined"){c=0}var e=this.yAxisRange(c);var d;var b=this.attributes_.getForAxis("logscale",c);if(!b){d=(e[1]-f)/(e[1]-e[0])}else{var a=Dygraph.log10(e[1]);d=(a-Dygraph.log10(f))/(a-Dygraph.log10(e[0]))}return d};Dygraph.prototype.toPercentXCoord=function(b){if(b===null){return null}var a=this.xAxisRange();return(b-a[0])/(a[1]-a[0])};Dygraph.prototype.numColumns=function(){if(!this.rawData_){return 0}return this.rawData_[0]?this.rawData_[0].length:this.attr_("labels").length};Dygraph.prototype.numRows=function(){if(!this.rawData_){return 0}return this.rawData_.length};Dygraph.prototype.getValue=function(b,a){if(b<0||b>this.rawData_.length){return null}if(a<0||a>this.rawData_[b].length){return null}return this.rawData_[b][a]};Dygraph.prototype.createInterface_=function(){var a=this.maindiv_;this.graphDiv=document.createElement("div");this.graphDiv.style.textAlign="left";a.appendChild(this.graphDiv);this.canvas_=Dygraph.createCanvas();this.canvas_.style.position="absolute";this.hidden_=this.createPlotKitCanvas_(this.canvas_);this.resizeElements_();this.canvas_ctx_=Dygraph.getContext(this.canvas_);this.hidden_ctx_=Dygraph.getContext(this.hidden_);this.graphDiv.appendChild(this.hidden_);this.graphDiv.appendChild(this.canvas_);this.mouseEventElement_=this.createMouseEventElement_();this.layout_=new DygraphLayout(this);var b=this;this.mouseMoveHandler_=function(c){b.mouseMove_(c)};this.mouseOutHandler_=function(f){var d=f.target||f.fromElement;var c=f.relatedTarget||f.toElement;if(Dygraph.isNodeContainedBy(d,b.graphDiv)&&!Dygraph.isNodeContainedBy(c,b.graphDiv)){b.mouseOut_(f)}};this.addAndTrackEvent(window,"mouseout",this.mouseOutHandler_);this.addAndTrackEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_);if(!this.resizeHandler_){this.resizeHandler_=function(c){b.resize()};this.addAndTrackEvent(window,"resize",this.resizeHandler_)}};Dygraph.prototype.resizeElements_=function(){this.graphDiv.style.width=this.width_+"px";this.graphDiv.style.height=this.height_+"px";this.canvas_.width=this.width_;this.canvas_.height=this.height_;this.canvas_.style.width=this.width_+"px";this.canvas_.style.height=this.height_+"px";this.hidden_.width=this.width_;this.hidden_.height=this.height_;this.hidden_.style.width=this.width_+"px";this.hidden_.style.height=this.height_+"px"};Dygraph.prototype.destroy=function(){this.canvas_ctx_.restore();this.hidden_ctx_.restore();var a=function(c){while(c.hasChildNodes()){a(c.firstChild);c.removeChild(c.firstChild)}};this.removeTrackedEvents_();Dygraph.removeEvent(window,"mouseout",this.mouseOutHandler_);Dygraph.removeEvent(this.mouseEventElement_,"mousemove",this.mouseMoveHandler_);Dygraph.removeEvent(window,"resize",this.resizeHandler_);this.resizeHandler_=null;a(this.maindiv_);var b=function(c){for(var d in c){if(typeof(c[d])==="object"){c[d]=null}}};b(this.layout_);b(this.plotter_);b(this)};Dygraph.prototype.createPlotKitCanvas_=function(a){var b=Dygraph.createCanvas();b.style.position="absolute";b.style.top=a.style.top;b.style.left=a.style.left;b.width=this.width_;b.height=this.height_;b.style.width=this.width_+"px";b.style.height=this.height_+"px";return b};Dygraph.prototype.createMouseEventElement_=function(){if(this.isUsingExcanvas_){var a=document.createElement("div");a.style.position="absolute";a.style.backgroundColor="white";a.style.filter="alpha(opacity=0)";a.style.width=this.width_+"px";a.style.height=this.height_+"px";this.graphDiv.appendChild(a);return a}else{return this.canvas_}};Dygraph.prototype.setColors_=function(){var g=this.getLabels();var e=g.length-1;this.colors_=[];this.colorsMap_={};var a=this.attr_("colors");var d;if(!a){var c=this.attr_("colorSaturation")||1;var b=this.attr_("colorValue")||0.5;var k=Math.ceil(e/2);for(d=1;d<=e;d++){if(!this.visibility()[d-1]){continue}var h=d%2?Math.ceil(d/2):(k+d/2);var f=(1*h/(1+e));var j=Dygraph.hsvToRGB(f,c,b);this.colors_.push(j);this.colorsMap_[g[d]]=j}}else{for(d=0;d<e;d++){if(!this.visibility()[d]){continue}var j=a[d%a.length];this.colors_.push(j);this.colorsMap_[g[1+d]]=j}}};Dygraph.prototype.getColors=function(){return this.colors_};Dygraph.prototype.getPropertiesForSeries=function(c){var a=-1;var d=this.getLabels();for(var b=1;b<d.length;b++){if(d[b]==c){a=b;break}}if(a==-1){return null}return{name:c,column:a,visible:this.visibility()[a-1],color:this.colorsMap_[c],axis:1+this.attributes_.axisForSeries(c)}};Dygraph.prototype.createRollInterface_=function(){if(!this.roller_){this.roller_=document.createElement("input");this.roller_.type="text";this.roller_.style.display="none";this.graphDiv.appendChild(this.roller_)}var e=this.attr_("showRoller")?"block":"none";var d=this.plotter_.area;var b={position:"absolute",zIndex:10,top:(d.y+d.h-25)+"px",left:(d.x+1)+"px",display:e};this.roller_.size="2";this.roller_.value=this.rollPeriod_;for(var a in b){if(b.hasOwnProperty(a)){this.roller_.style[a]=b[a]}}var c=this;this.roller_.onchange=function(){c.adjustRoll(c.roller_.value)}};Dygraph.prototype.dragGetX_=function(b,a){return Dygraph.pageX(b)-a.px};Dygraph.prototype.dragGetY_=function(b,a){return Dygraph.pageY(b)-a.py};Dygraph.prototype.createDragInterface_=function(){var c={isZooming:false,isPanning:false,is2DPan:false,dragStartX:null,dragStartY:null,dragEndX:null,dragEndY:null,dragDirection:null,prevEndX:null,prevEndY:null,prevDragDirection:null,cancelNextDblclick:false,initialLeftmostDate:null,xUnitsPerPixel:null,dateRange:null,px:0,py:0,boundedDates:null,boundedValues:null,tarp:new Dygraph.IFrameTarp(),initializeMouseDown:function(j,i,h){if(j.preventDefault){j.preventDefault()}else{j.returnValue=false;j.cancelBubble=true}h.px=Dygraph.findPosX(i.canvas_);h.py=Dygraph.findPosY(i.canvas_);h.dragStartX=i.dragGetX_(j,h);h.dragStartY=i.dragGetY_(j,h);h.cancelNextDblclick=false;h.tarp.cover()}};var f=this.attr_("interactionModel");var b=this;var e=function(g){return function(h){g(h,b,c)}};for(var a in f){if(!f.hasOwnProperty(a)){continue}this.addAndTrackEvent(this.mouseEventElement_,a,e(f[a]))}var d=function(h){if(c.isZooming||c.isPanning){c.isZooming=false;c.dragStartX=null;c.dragStartY=null}if(c.isPanning){c.isPanning=false;c.draggingDate=null;c.dateRange=null;for(var g=0;g<b.axes_.length;g++){delete b.axes_[g].draggingValue;delete b.axes_[g].dragValueRange}}c.tarp.uncover()};this.addAndTrackEvent(document,"mouseup",d)};Dygraph.prototype.drawZoomRect_=function(e,c,i,b,g,a,f,d){var h=this.canvas_ctx_;if(a==Dygraph.HORIZONTAL){h.clearRect(Math.min(c,f),this.layout_.getPlotArea().y,Math.abs(c-f),this.layout_.getPlotArea().h)}else{if(a==Dygraph.VERTICAL){h.clearRect(this.layout_.getPlotArea().x,Math.min(b,d),this.layout_.getPlotArea().w,Math.abs(b-d))}}if(e==Dygraph.HORIZONTAL){if(i&&c){h.fillStyle="rgba(128,128,128,0.33)";h.fillRect(Math.min(c,i),this.layout_.getPlotArea().y,Math.abs(i-c),this.layout_.getPlotArea().h)}}else{if(e==Dygraph.VERTICAL){if(g&&b){h.fillStyle="rgba(128,128,128,0.33)";h.fillRect(this.layout_.getPlotArea().x,Math.min(b,g),this.layout_.getPlotArea().w,Math.abs(g-b))}}}if(this.isUsingExcanvas_){this.currentZoomRectArgs_=[e,c,i,b,g,0,0,0]}};Dygraph.prototype.clearZoomRect_=function(){this.currentZoomRectArgs_=null;this.canvas_ctx_.clearRect(0,0,this.canvas_.width,this.canvas_.height)};Dygraph.prototype.doZoomX_=function(c,a){this.currentZoomRectArgs_=null;var b=this.toDataXCoord(c);var d=this.toDataXCoord(a);this.doZoomXDates_(b,d)};Dygraph.zoomAnimationFunction=function(c,b){var a=1.5;return(1-Math.pow(a,-c))/(1-Math.pow(a,-b))};Dygraph.prototype.doZoomXDates_=function(c,e){var a=this.xAxisRange();var d=[c,e];this.zoomed_x_=true;var b=this;this.doAnimatedZoom(a,d,null,null,function(){if(b.attr_("zoomCallback")){b.attr_("zoomCallback")(c,e,b.yAxisRanges())}})};Dygraph.prototype.doZoomY_=function(h,f){this.currentZoomRectArgs_=null;var c=this.yAxisRanges();var b=[];for(var e=0;e<this.axes_.length;e++){var d=this.toDataYCoord(h,e);var a=this.toDataYCoord(f,e);b.push([a,d])}this.zoomed_y_=true;var g=this;this.doAnimatedZoom(null,null,c,b,function(){if(g.attr_("zoomCallback")){var i=g.xAxisRange();g.attr_("zoomCallback")(i[0],i[1],g.yAxisRanges())}})};Dygraph.prototype.resetZoom=function(){var c=false,d=false,a=false;if(this.dateWindow_!==null){c=true;d=true}for(var g=0;g<this.axes_.length;g++){if(typeof(this.axes_[g].valueWindow)!=="undefined"&&this.axes_[g].valueWindow!==null){c=true;a=true}}this.clearSelection();if(c){this.zoomed_x_=false;this.zoomed_y_=false;var f=this.rawData_[0][0];var b=this.rawData_[this.rawData_.length-1][0];if(!this.attr_("animatedZooms")){this.dateWindow_=null;for(g=0;g<this.axes_.length;g++){if(this.axes_[g].valueWindow!==null){delete this.axes_[g].valueWindow}}this.drawGraph_();if(this.attr_("zoomCallback")){this.attr_("zoomCallback")(f,b,this.yAxisRanges())}return}var l=null,m=null,k=null,h=null;if(d){l=this.xAxisRange();m=[f,b]}if(a){k=this.yAxisRanges();var n=this.gatherDatasets_(this.rolledSeries_,null);var o=n.extremes;this.computeYAxisRanges_(o);h=[];for(g=0;g<this.axes_.length;g++){var e=this.axes_[g];h.push((e.valueRange!==null&&e.valueRange!==undefined)?e.valueRange:e.extremeRange)}}var j=this;this.doAnimatedZoom(l,m,k,h,function(){j.dateWindow_=null;for(var p=0;p<j.axes_.length;p++){if(j.axes_[p].valueWindow!==null){delete j.axes_[p].valueWindow}}if(j.attr_("zoomCallback")){j.attr_("zoomCallback")(f,b,j.yAxisRanges())}})}};Dygraph.prototype.doAnimatedZoom=function(a,e,b,c,m){var i=this.attr_("animatedZooms")?Dygraph.ANIMATION_STEPS:1;var l=[];var k=[];var f,d;if(a!==null&&e!==null){for(f=1;f<=i;f++){d=Dygraph.zoomAnimationFunction(f,i);l[f-1]=[a[0]*(1-d)+d*e[0],a[1]*(1-d)+d*e[1]]}}if(b!==null&&c!==null){for(f=1;f<=i;f++){d=Dygraph.zoomAnimationFunction(f,i);var n=[];for(var g=0;g<this.axes_.length;g++){n.push([b[g][0]*(1-d)+d*c[g][0],b[g][1]*(1-d)+d*c[g][1]])}k[f-1]=n}}var h=this;Dygraph.repeatAndCleanup(function(p){if(k.length){for(var o=0;o<h.axes_.length;o++){var j=k[p][o];h.axes_[o].valueWindow=[j[0],j[1]]}}if(l.length){h.dateWindow_=l[p]}h.drawGraph_()},i,Dygraph.ANIMATION_DURATION/i,m)};Dygraph.prototype.getArea=function(){return this.plotter_.area};Dygraph.prototype.eventToDomCoords=function(c){if(c.offsetX&&c.offsetY){return[c.offsetX,c.offsetY]}else{var b=Dygraph.pageX(c)-Dygraph.findPosX(this.mouseEventElement_);var a=Dygraph.pageY(c)-Dygraph.findPosY(this.mouseEventElement_);return[b,a]}};Dygraph.prototype.findClosestRow=function(a){var g=Infinity;var h=-1;var e=this.layout_.points;for(var c=0;c<e.length;c++){var l=e[c];var d=l.length;for(var b=0;b<d;b++){var k=l[b];if(!Dygraph.isValidPoint(k,true)){continue}var f=Math.abs(k.canvasx-a);if(f<g){g=f;h=k.idx}}}return h};Dygraph.prototype.findClosestPoint=function(f,e){var k=Infinity;var h,o,n,l,d,c,j;for(var b=this.layout_.points.length-1;b>=0;--b){var m=this.layout_.points[b];for(var g=0;g<m.length;++g){l=m[g];if(!Dygraph.isValidPoint(l)){continue}o=l.canvasx-f;n=l.canvasy-e;h=o*o+n*n;if(h<k){k=h;d=l;c=b;j=l.idx}}}var a=this.layout_.setNames[c];return{row:j,seriesName:a,point:d}};Dygraph.prototype.findStackedPoint=function(i,h){var p=this.findClosestRow(i);var f,c;for(var d=0;d<this.layout_.points.length;++d){var g=this.getLeftBoundary_(d);var e=p-g;var l=this.layout_.points[d];if(e>=l.length){continue}var m=l[e];if(!Dygraph.isValidPoint(m)){continue}var j=m.canvasy;if(i>m.canvasx&&e+1<l.length){var k=l[e+1];if(Dygraph.isValidPoint(k)){var o=k.canvasx-m.canvasx;if(o>0){var a=(i-m.canvasx)/o;j+=a*(k.canvasy-m.canvasy)}}}else{if(i<m.canvasx&&e>0){var n=l[e-1];if(Dygraph.isValidPoint(n)){var o=m.canvasx-n.canvasx;if(o>0){var a=(m.canvasx-i)/o;j+=a*(n.canvasy-m.canvasy)}}}}if(d===0||j<h){f=m;c=d}}var b=this.layout_.setNames[c];return{row:p,seriesName:b,point:f}};Dygraph.prototype.mouseMove_=function(b){var h=this.layout_.points;if(h===undefined||h===null){return}var e=this.eventToDomCoords(b);var a=e[0];var j=e[1];var f=this.attr_("highlightSeriesOpts");var d=false;if(f&&!this.isSeriesLocked()){var c;if(this.attr_("stackedGraph")){c=this.findStackedPoint(a,j)}else{c=this.findClosestPoint(a,j)}d=this.setSelection(c.row,c.seriesName)}else{var g=this.findClosestRow(a);d=this.setSelection(g)}var i=this.attr_("highlightCallback");if(i&&d){i(b,this.lastx_,this.selPoints_,this.lastRow_,this.highlightSet_)}};Dygraph.prototype.getLeftBoundary_=function(b){if(this.boundaryIds_[b]){return this.boundaryIds_[b][0]}else{for(var a=0;a<this.boundaryIds_.length;a++){if(this.boundaryIds_[a]!==undefined){return this.boundaryIds_[a][0]}}return 0}};Dygraph.prototype.animateSelection_=function(f){var e=10;var c=30;if(this.fadeLevel===undefined){this.fadeLevel=0}if(this.animateId===undefined){this.animateId=0}var g=this.fadeLevel;var b=f<0?g:e-g;if(b<=0){if(this.fadeLevel){this.updateSelection_(1)}return}var a=++this.animateId;var d=this;Dygraph.repeatAndCleanup(function(h){if(d.animateId!=a){return}d.fadeLevel+=f;if(d.fadeLevel===0){d.clearSelection()}else{d.updateSelection_(d.fadeLevel/e)}},b,c,function(){})};Dygraph.prototype.updateSelection_=function(d){this.cascadeEvents_("select",{selectedX:this.lastx_,selectedPoints:this.selPoints_});var h;var n=this.canvas_ctx_;if(this.attr_("highlightSeriesOpts")){n.clearRect(0,0,this.width_,this.height_);var f=1-this.attr_("highlightSeriesBackgroundAlpha");if(f){var g=true;if(g){if(d===undefined){this.animateSelection_(1);return}f*=d}n.fillStyle="rgba(255,255,255,"+f+")";n.fillRect(0,0,this.width_,this.height_)}this.plotter_._renderLineChart(this.highlightSet_,n)}else{if(this.previousVerticalX_>=0){var j=0;var k=this.attr_("labels");for(h=1;h<k.length;h++){var c=this.attr_("highlightCircleSize",k[h]);if(c>j){j=c}}var l=this.previousVerticalX_;n.clearRect(l-j-1,0,2*j+2,this.height_)}}if(this.isUsingExcanvas_&&this.currentZoomRectArgs_){Dygraph.prototype.drawZoomRect_.apply(this,this.currentZoomRectArgs_)}if(this.selPoints_.length>0){var b=this.selPoints_[0].canvasx;n.save();for(h=0;h<this.selPoints_.length;h++){var o=this.selPoints_[h];if(!Dygraph.isOK(o.canvasy)){continue}var a=this.attr_("highlightCircleSize",o.name);var m=this.attr_("drawHighlightPointCallback",o.name);var e=this.plotter_.colors[o.name];if(!m){m=Dygraph.Circles.DEFAULT}n.lineWidth=this.attr_("strokeWidth",o.name);n.strokeStyle=e;n.fillStyle=e;m(this.g,o.name,n,b,o.canvasy,e,a,o.idx)}n.restore();this.previousVerticalX_=b}};Dygraph.prototype.setSelection=function(f,h,g){this.selPoints_=[];var e=false;if(f!==false&&f>=0){if(f!=this.lastRow_){e=true}this.lastRow_=f;for(var d=0;d<this.layout_.points.length;++d){var b=this.layout_.points[d];var c=f-this.getLeftBoundary_(d);if(c<b.length){var a=b[c];if(a.yval!==null){this.selPoints_.push(a)}}}}else{if(this.lastRow_>=0){e=true}this.lastRow_=-1}if(this.selPoints_.length){this.lastx_=this.selPoints_[0].xval}else{this.lastx_=-1}if(h!==undefined){if(this.highlightSet_!==h){e=true}this.highlightSet_=h}if(g!==undefined){this.lockedSet_=g}if(e){this.updateSelection_(undefined)}return e};Dygraph.prototype.mouseOut_=function(a){if(this.attr_("unhighlightCallback")){this.attr_("unhighlightCallback")(a)}if(this.attr_("hideOverlayOnMouseOut")&&!this.lockedSet_){this.clearSelection()}};Dygraph.prototype.clearSelection=function(){this.cascadeEvents_("deselect",{});this.lockedSet_=false;if(this.fadeLevel){this.animateSelection_(-1);return}this.canvas_ctx_.clearRect(0,0,this.width_,this.height_);this.fadeLevel=0;this.selPoints_=[];this.lastx_=-1;this.lastRow_=-1;this.highlightSet_=null};Dygraph.prototype.getSelection=function(){if(!this.selPoints_||this.selPoints_.length<1){return -1}for(var c=0;c<this.layout_.points.length;c++){var a=this.layout_.points[c];for(var b=0;b<a.length;b++){if(a[b].x==this.selPoints_[0].x){return a[b].idx}}}return -1};Dygraph.prototype.getHighlightSeries=function(){return this.highlightSet_};Dygraph.prototype.isSeriesLocked=function(){return this.lockedSet_};Dygraph.prototype.loadedEvent_=function(a){this.rawData_=this.parseCSV_(a);this.predraw_()};Dygraph.prototype.addXTicks_=function(){var a;if(this.dateWindow_){a=[this.dateWindow_[0],this.dateWindow_[1]]}else{a=this.xAxisExtremes()}var c=this.optionsViewForAxis_("x");var b=c("ticker")(a[0],a[1],this.width_,c,this);this.layout_.setXTicks(b)};Dygraph.prototype.extremeValues_=function(d){var h=null,f=null,c,g;var b=this.attr_("errorBars")||this.attr_("customBars");if(b){for(c=0;c<d.length;c++){g=d[c][1][0];if(g===null||isNaN(g)){continue}var a=g-d[c][1][1];var e=g+d[c][1][2];if(a>g){a=g}if(e<g){e=g}if(f===null||e>f){f=e}if(h===null||a<h){h=a}}}else{for(c=0;c<d.length;c++){g=d[c][1];if(g===null||isNaN(g)){continue}if(f===null||g>f){f=g}if(h===null||g<h){h=g}}}return[h,f]};Dygraph.prototype.predraw_=function(){var e=new Date();this.layout_.computePlotArea();this.computeYAxes_();if(this.plotter_){this.cascadeEvents_("clearChart");this.plotter_.clear()}if(!this.is_initial_draw_){this.canvas_ctx_.restore();this.hidden_ctx_.restore()}this.canvas_ctx_.save();this.hidden_ctx_.save();this.plotter_=new DygraphCanvasRenderer(this,this.hidden_,this.hidden_ctx_,this.layout_);this.createRollInterface_();this.cascadeEvents_("predraw");this.rolledSeries_=[null];for(var c=1;c<this.numColumns();c++){var d=this.attr_("logscale");var b=this.extractSeries_(this.rawData_,c,d);b=this.rollingAverage(b,this.rollPeriod_);this.rolledSeries_.push(b)}this.drawGraph_();var a=new Date();this.drawingTimeMs_=(a-e)};Dygraph.PointType=undefined;Dygraph.seriesToPoints_=function(b,j,d,f){var h=[];for(var c=0;c<b.length;++c){var k=b[c];var a=j?k[1][0]:k[1];var e=a===null?null:DygraphLayout.parseFloat_(a);var g={x:NaN,y:NaN,xval:DygraphLayout.parseFloat_(k[0]),yval:e,name:d,idx:c+f};if(j){g.y_top=NaN;g.y_bottom=NaN;g.yval_minus=DygraphLayout.parseFloat_(k[1][1]);g.yval_plus=DygraphLayout.parseFloat_(k[1][2])}h.push(g)}return h};Dygraph.stackPoints_=function(m,l,o,f){var h=null;var d=null;var g=null;var c=-1;var k=function(i){if(c>=i){return}for(var p=i;p<m.length;++p){g=null;if(!isNaN(m[p].yval)&&m[p].yval!==null){c=p;g=m[p];break}}};for(var b=0;b<m.length;++b){var j=m[b];var n=j.xval;if(l[n]===undefined){l[n]=0}var e=j.yval;if(isNaN(e)||e===null){k(b);if(d&&g&&f!="none"){e=d.yval+(g.yval-d.yval)*((n-d.xval)/(g.xval-d.xval))}else{if(d&&f=="all"){e=d.yval}else{if(g&&f=="all"){e=g.yval}else{e=0}}}}else{d=j}var a=l[n];if(h!=n){a+=e;l[n]=a}h=n;j.yval_stacked=a;if(a>o[1]){o[1]=a}if(a<o[0]){o[0]=a}}};Dygraph.prototype.gatherDatasets_=function(w,f){var s=[];var t=[];var q=[];var a={};var u,r;var x=this.attr_("errorBars");var h=this.attr_("customBars");var p=x||h;var b=function(i){if(!p){return i[1]===null}else{return h?i[1][1]===null:x?i[1][0]===null:false}};var n=w.length-1;var l;for(u=n;u>=1;u--){if(!this.visibility()[u-1]){continue}if(f){l=w[u];var z=f[0];var j=f[1];var g=null,y=null;for(r=0;r<l.length;r++){if(l[r][0]>=z&&g===null){g=r}if(l[r][0]<=j){y=r}}if(g===null){g=0}var e=g;var d=true;while(d&&e>0){e--;d=b(l[e])}if(y===null){y=l.length-1}var c=y;d=true;while(d&&c<l.length-1){c++;d=b(l[c])}if(e!==g){g=e}if(c!==y){y=c}s[u-1]=[g,y];l=l.slice(g,y+1)}else{l=w[u];s[u-1]=[0,l.length-1]}var v=this.attr_("labels")[u];var o=this.extremeValues_(l);var m=Dygraph.seriesToPoints_(l,p,v,s[u-1][0]);if(this.attr_("stackedGraph")){Dygraph.stackPoints_(m,q,o,this.attr_("stackedGraphNaNFill"))}a[v]=o;t[u]=m}return{points:t,extremes:a,boundaryIds:s}};Dygraph.prototype.drawGraph_=function(){var a=new Date();var d=this.is_initial_draw_;this.is_initial_draw_=false;this.layout_.removeAllDatasets();this.setColors_();this.attrs_.pointSize=0.5*this.attr_("highlightCircleSize");var j=this.gatherDatasets_(this.rolledSeries_,this.dateWindow_);var h=j.points;var k=j.extremes;this.boundaryIds_=j.boundaryIds;this.setIndexByName_={};var g=this.attr_("labels");if(g.length>0){this.setIndexByName_[g[0]]=0}var e=0;for(var f=1;f<h.length;f++){this.setIndexByName_[g[f]]=f;if(!this.visibility()[f-1]){continue}this.layout_.addDataset(g[f],h[f]);this.datasetIndex_[f]=e++}this.computeYAxisRanges_(k);this.layout_.setYAxes(this.axes_);this.addXTicks_();var b=this.zoomed_x_;this.zoomed_x_=b;this.layout_.evaluate();this.renderGraph_(d);if(this.attr_("timingName")){var c=new Date();Dygraph.info(this.attr_("timingName")+" - drawGraph: "+(c-a)+"ms")}};Dygraph.prototype.renderGraph_=function(b){this.cascadeEvents_("clearChart");this.plotter_.clear();if(this.attr_("underlayCallback")){this.attr_("underlayCallback")(this.hidden_ctx_,this.layout_.getPlotArea(),this,this)}var c={canvas:this.hidden_,drawingContext:this.hidden_ctx_};this.cascadeEvents_("willDrawChart",c);this.plotter_.render();this.cascadeEvents_("didDrawChart",c);this.lastRow_=-1;this.canvas_.getContext("2d").clearRect(0,0,this.canvas_.width,this.canvas_.height);if(this.attr_("drawCallback")!==null){this.attr_("drawCallback")(this,b)}if(b){this.readyFired_=true;while(this.readyFns_.length>0){var a=this.readyFns_.pop();a(this)}}};Dygraph.prototype.computeYAxes_=function(){var b,d,c,f,a;if(this.axes_!==undefined&&this.user_attrs_.hasOwnProperty("valueRange")===false){b=[];for(c=0;c<this.axes_.length;c++){b.push(this.axes_[c].valueWindow)}}this.axes_=[];for(d=0;d<this.attributes_.numAxes();d++){f={g:this};Dygraph.update(f,this.attributes_.axisOptions(d));this.axes_[d]=f}a=this.attr_("valueRange");if(a){this.axes_[0].valueRange=a}if(b!==undefined){var e=Math.min(b.length,this.axes_.length);for(c=0;c<e;c++){this.axes_[c].valueWindow=b[c]}}for(d=0;d<this.axes_.length;d++){if(d===0){f=this.optionsViewForAxis_("y"+(d?"2":""));a=f("valueRange");if(a){this.axes_[d].valueRange=a}}else{var g=this.user_attrs_.axes;if(g&&g.y2){a=g.y2.valueRange;if(a){this.axes_[d].valueRange=a}}}}};Dygraph.prototype.numAxes=function(){return this.attributes_.numAxes()};Dygraph.prototype.axisPropertiesForSeries=function(a){return this.axes_[this.attributes_.axisForSeries(a)]};Dygraph.prototype.computeYAxisRanges_=function(a){var g=function(i){return isNaN(parseFloat(i))};var q=this.attributes_.numAxes();var b,x,o,B;var p;for(var y=0;y<q;y++){var c=this.axes_[y];var C=this.attributes_.getForAxis("logscale",y);var G=this.attributes_.getForAxis("includeZero",y);var l=this.attributes_.getForAxis("independentTicks",y);o=this.attributes_.seriesForAxis(y);b=true;B=0.1;if(this.attr_("yRangePad")!==null){b=false;B=this.attr_("yRangePad")/this.plotter_.area.h}if(o.length===0){c.extremeRange=[0,1]}else{var D=Infinity;var A=-Infinity;var t,s;for(var w=0;w<o.length;w++){if(!a.hasOwnProperty(o[w])){continue}t=a[o[w]][0];if(t!==null){D=Math.min(t,D)}s=a[o[w]][1];if(s!==null){A=Math.max(s,A)}}if(G&&!C){if(D>0){D=0}if(A<0){A=0}}if(D==Infinity){D=0}if(A==-Infinity){A=1}x=A-D;if(x===0){if(A!==0){x=Math.abs(A)}else{A=1;x=1}}var h,H;if(C){if(b){h=A+B*x;H=D}else{var E=Math.exp(Math.log(x)*B);h=A*E;H=D/E}}else{h=A+B*x;H=D-B*x;if(b&&!this.attr_("avoidMinZero")){if(H<0&&D>=0){H=0}if(h>0&&A<=0){h=0}}}c.extremeRange=[H,h]}if(c.valueWindow){c.computedValueRange=[c.valueWindow[0],c.valueWindow[1]]}else{if(c.valueRange){var e=g(c.valueRange[0])?c.extremeRange[0]:c.valueRange[0];var d=g(c.valueRange[1])?c.extremeRange[1]:c.valueRange[1];if(!b){if(c.logscale){var E=Math.exp(Math.log(x)*B);e*=E;d/=E}else{x=d-e;e-=x*B;d+=x*B}}c.computedValueRange=[e,d]}else{c.computedValueRange=c.extremeRange}}if(l){c.independentTicks=l;var r=this.optionsViewForAxis_("y"+(y?"2":""));var F=r("ticker");c.ticks=F(c.computedValueRange[0],c.computedValueRange[1],this.height_,r,this);if(!p){p=c}}}if(p===undefined){throw ('Configuration Error: At least one axis has to have the "independentTicks" option activated.')}for(var y=0;y<q;y++){var c=this.axes_[y];if(!c.independentTicks){var r=this.optionsViewForAxis_("y"+(y?"2":""));var F=r("ticker");var m=p.ticks;var n=p.computedValueRange[1]-p.computedValueRange[0];var I=c.computedValueRange[1]-c.computedValueRange[0];var f=[];for(var v=0;v<m.length;v++){var u=(m[v].v-p.computedValueRange[0])/n;var z=c.computedValueRange[0]+u*I;f.push(z)}c.ticks=F(c.computedValueRange[0],c.computedValueRange[1],this.height_,r,this,f)}}};Dygraph.prototype.extractSeries_=function(a,f,c){var g=[];var h=this.attr_("errorBars");var e=this.attr_("customBars");for(var d=0;d<a.length;d++){var l=a[d][0];var m=a[d][f];if(c){if(h||e){for(var b=0;b<m.length;b++){if(m[b]<=0){m=null;break}}}else{if(m<=0){m=null}}}if(m!==null){g.push([l,m])}else{g.push([l,h?[null,null]:e?[null,null,null]:m])}}return g};Dygraph.prototype.rollingAverage=function(l,d){d=Math.min(d,l.length);var b=[];var t=this.attr_("sigma");var G,o,z,x,m,c,F,A;if(this.fractions_){var k=0;var h=0;var e=100;for(z=0;z<l.length;z++){k+=l[z][1][0];h+=l[z][1][1];if(z-d>=0){k-=l[z-d][1][0];h-=l[z-d][1][1]}var C=l[z][0];var w=h?k/h:0;if(this.attr_("errorBars")){if(this.attr_("wilsonInterval")){if(h){var s=w<0?0:w,u=h;var B=t*Math.sqrt(s*(1-s)/u+t*t/(4*u*u));var a=1+t*t/h;G=(s+t*t/(2*h)-B)/a;o=(s+t*t/(2*h)+B)/a;b[z]=[C,[s*e,(s-G)*e,(o-s)*e]]}else{b[z]=[C,[0,0,0]]}}else{A=h?t*Math.sqrt(w*(1-w)/h):1;b[z]=[C,[e*w,e*A,e*A]]}}else{b[z]=[C,e*w]}}}else{if(this.attr_("customBars")){G=0;var D=0;o=0;var g=0;for(z=0;z<l.length;z++){var E=l[z][1];m=E[1];b[z]=[l[z][0],[m,m-E[0],E[2]-m]];if(m!==null&&!isNaN(m)){G+=E[0];D+=m;o+=E[2];g+=1}if(z-d>=0){var r=l[z-d];if(r[1][1]!==null&&!isNaN(r[1][1])){G-=r[1][0];D-=r[1][1];o-=r[1][2];g-=1}}if(g){b[z]=[l[z][0],[1*D/g,1*(D-G)/g,1*(o-D)/g]]}else{b[z]=[l[z][0],[null,null,null]]}}}else{if(!this.attr_("errorBars")){if(d==1){return l}for(z=0;z<l.length;z++){c=0;F=0;for(x=Math.max(0,z-d+1);x<z+1;x++){m=l[x][1];if(m===null||isNaN(m)){continue}F++;c+=l[x][1]}if(F){b[z]=[l[z][0],c/F]}else{b[z]=[l[z][0],null]}}}else{for(z=0;z<l.length;z++){c=0;var f=0;F=0;for(x=Math.max(0,z-d+1);x<z+1;x++){m=l[x][1][0];if(m===null||isNaN(m)){continue}F++;c+=l[x][1][0];f+=Math.pow(l[x][1][1],2)}if(F){A=Math.sqrt(f)/F;b[z]=[l[z][0],[c/F,t*A,t*A]]}else{var q=(d==1)?l[z][1][0]:null;b[z]=[l[z][0],[q,q,q]]}}}}}return b};Dygraph.prototype.detectTypeFromString_=function(b){var a=false;var c=b.indexOf("-");if((c>0&&(b[c-1]!="e"&&b[c-1]!="E"))||b.indexOf("/")>=0||isNaN(parseFloat(b))){a=true}else{if(b.length==8&&b>"19700101"&&b<"20371231"){a=true}}this.setXAxisOptions_(a)};Dygraph.prototype.setXAxisOptions_=function(a){if(a){this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.axes.x.valueFormatter=Dygraph.dateString_;this.attrs_.axes.x.ticker=Dygraph.dateTicker;this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter}else{this.attrs_.xValueParser=function(b){return parseFloat(b)};this.attrs_.axes.x.valueFormatter=function(b){return b};this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks;this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}};Dygraph.prototype.parseFloat_=function(a,c,b){var e=parseFloat(a);if(!isNaN(e)){return e}if(/^ *$/.test(a)){return null}if(/^ *nan *$/i.test(a)){return NaN}var d="Unable to parse '"+a+"' as a number";if(b!==null&&c!==null){d+=" on line "+(1+c)+" ('"+b+"') of CSV."}this.error(d);return null};Dygraph.prototype.parseCSV_=function(t){var r=[];var s=Dygraph.detectLineDelimiter(t);var a=t.split(s||"\n");var g,k;var p=this.attr_("delimiter");if(a[0].indexOf(p)==-1&&a[0].indexOf("\t")>=0){p="\t"}var b=0;if(!("labels" in this.user_attrs_)){b=1;this.attrs_.labels=a[0].split(p);this.attributes_.reparseSeries()}var o=0;var m;var q=false;var c=this.attr_("labels").length;var f=false;for(var l=b;l<a.length;l++){var e=a[l];o=l;if(e.length===0){continue}if(e[0]=="#"){continue}var d=e.split(p);if(d.length<2){continue}var h=[];if(!q){this.detectTypeFromString_(d[0]);m=this.attr_("xValueParser");q=true}h[0]=m(d[0],this);if(this.fractions_){for(k=1;k<d.length;k++){g=d[k].split("/");if(g.length!=2){this.error('Expected fractional "num/den" values in CSV data but found a value \''+d[k]+"' on line "+(1+l)+" ('"+e+"') which is not of this form.");h[k]=[0,0]}else{h[k]=[this.parseFloat_(g[0],l,e),this.parseFloat_(g[1],l,e)]}}}else{if(this.attr_("errorBars")){if(d.length%2!=1){this.error("Expected alternating (value, stdev.) pairs in CSV data but line "+(1+l)+" has an odd number of values ("+(d.length-1)+"): '"+e+"'")}for(k=1;k<d.length;k+=2){h[(k+1)/2]=[this.parseFloat_(d[k],l,e),this.parseFloat_(d[k+1],l,e)]}}else{if(this.attr_("customBars")){for(k=1;k<d.length;k++){var u=d[k];if(/^ *$/.test(u)){h[k]=[null,null,null]}else{g=u.split(";");if(g.length==3){h[k]=[this.parseFloat_(g[0],l,e),this.parseFloat_(g[1],l,e),this.parseFloat_(g[2],l,e)]}else{this.warn('When using customBars, values must be either blank or "low;center;high" tuples (got "'+u+'" on line '+(1+l))}}}}else{for(k=1;k<d.length;k++){h[k]=this.parseFloat_(d[k],l,e)}}}}if(r.length>0&&h[0]<r[r.length-1][0]){f=true}if(h.length!=c){this.error("Number of columns in line "+l+" ("+h.length+") does not agree with number of labels ("+c+") "+e)}if(l===0&&this.attr_("labels")){var n=true;for(k=0;n&&k<h.length;k++){if(h[k]){n=false}}if(n){this.warn("The dygraphs 'labels' option is set, but the first row of CSV data ('"+e+"') appears to also contain labels. Will drop the CSV labels and use the option labels.");continue}}r.push(h)}if(f){this.warn("CSV is out of order; order it correctly to speed loading.");r.sort(function(j,i){return j[0]-i[0]})}return r};Dygraph.prototype.parseArray_=function(c){if(c.length===0){this.error("Can't plot empty data set");return null}if(c[0].length===0){this.error("Data set cannot contain an empty row");return null}var a;if(this.attr_("labels")===null){this.warn("Using default labels. Set labels explicitly via 'labels' in the options parameter");this.attrs_.labels=["X"];for(a=1;a<c[0].length;a++){this.attrs_.labels.push("Y"+a)}this.attributes_.reparseSeries()}else{var b=this.attr_("labels");if(b.length!=c[0].length){this.error("Mismatch between number of labels ("+b+") and number of columns in array ("+c[0].length+")");return null}}if(Dygraph.isDateLike(c[0][0])){this.attrs_.axes.x.valueFormatter=Dygraph.dateString_;this.attrs_.axes.x.ticker=Dygraph.dateTicker;this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter;var d=Dygraph.clone(c);for(a=0;a<c.length;a++){if(d[a].length===0){this.error("Row "+(1+a)+" of data is empty");return null}if(d[a][0]===null||typeof(d[a][0].getTime)!="function"||isNaN(d[a][0].getTime())){this.error("x value in row "+(1+a)+" is not a Date");return null}d[a][0]=d[a][0].getTime()}return d}else{this.attrs_.axes.x.valueFormatter=function(e){return e};this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks;this.attrs_.axes.x.axisLabelFormatter=Dygraph.numberAxisLabelFormatter;return c}};Dygraph.prototype.parseDataTable_=function(w){var d=function(i){var j=String.fromCharCode(65+i%26);i=Math.floor(i/26);while(i>0){j=String.fromCharCode(65+(i-1)%26)+j.toLowerCase();i=Math.floor((i-1)/26)}return j};var h=w.getNumberOfColumns();var g=w.getNumberOfRows();var f=w.getColumnType(0);if(f=="date"||f=="datetime"){this.attrs_.xValueParser=Dygraph.dateParser;this.attrs_.axes.x.valueFormatter=Dygraph.dateString_;this.attrs_.axes.x.ticker=Dygraph.dateTicker;this.attrs_.axes.x.axisLabelFormatter=Dygraph.dateAxisFormatter}else{if(f=="number"){this.attrs_.xValueParser=function(i){return parseFloat(i)};this.attrs_.axes.x.valueFormatter=function(i){return i};this.attrs_.axes.x.ticker=Dygraph.numericLinearTicks;this.attrs_.axes.x.axisLabelFormatter=this.attrs_.axes.x.valueFormatter}else{this.error("only 'date', 'datetime' and 'number' types are supported for column 1 of DataTable input (Got '"+f+"')");return null}}var m=[];var t={};var s=false;var q,o;for(q=1;q<h;q++){var b=w.getColumnType(q);if(b=="number"){m.push(q)}else{if(b=="string"&&this.attr_("displayAnnotations")){var r=m[m.length-1];if(!t.hasOwnProperty(r)){t[r]=[q]}else{t[r].push(q)}s=true}else{this.error("Only 'number' is supported as a dependent type with Gviz. 'string' is only supported if displayAnnotations is true")}}}var u=[w.getColumnLabel(0)];for(q=0;q<m.length;q++){u.push(w.getColumnLabel(m[q]));if(this.attr_("errorBars")){q+=1}}this.attrs_.labels=u;h=u.length;var v=[];var l=false;var a=[];for(q=0;q<g;q++){var e=[];if(typeof(w.getValue(q,0))==="undefined"||w.getValue(q,0)===null){this.warn("Ignoring row "+q+" of DataTable because of undefined or null first column.");continue}if(f=="date"||f=="datetime"){e.push(w.getValue(q,0).getTime())}else{e.push(w.getValue(q,0))}if(!this.attr_("errorBars")){for(o=0;o<m.length;o++){var c=m[o];e.push(w.getValue(q,c));if(s&&t.hasOwnProperty(c)&&w.getValue(q,t[c][0])!==null){var p={};p.series=w.getColumnLabel(c);p.xval=e[0];p.shortText=d(a.length);p.text="";for(var n=0;n<t[c].length;n++){if(n){p.text+="\n"}p.text+=w.getValue(q,t[c][n])}a.push(p)}}for(o=0;o<e.length;o++){if(!isFinite(e[o])){e[o]=null}}}else{for(o=0;o<h-1;o++){e.push([w.getValue(q,1+2*o),w.getValue(q,2+2*o)])}}if(v.length>0&&e[0]<v[v.length-1][0]){l=true}v.push(e)}if(l){this.warn("DataTable is out of order; order it correctly to speed loading.");v.sort(function(j,i){return j[0]-i[0]})}this.rawData_=v;if(a.length>0){this.setAnnotations(a,true)}this.attributes_.reparseSeries()};Dygraph.prototype.start_=function(){var d=this.file_;if(typeof d=="function"){d=d()}if(Dygraph.isArrayLike(d)){this.rawData_=this.parseArray_(d);this.predraw_()}else{if(typeof d=="object"&&typeof d.getColumnRange=="function"){this.parseDataTable_(d);this.predraw_()}else{if(typeof d=="string"){var c=Dygraph.detectLineDelimiter(d);if(c){this.loadedEvent_(d)}else{var b;if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{b=new ActiveXObject("Microsoft.XMLHTTP")}var a=this;b.onreadystatechange=function(){if(b.readyState==4){if(b.status===200||b.status===0){a.loadedEvent_(b.responseText)}}};b.open("GET",d,true);b.send(null)}}else{this.error("Unknown data format: "+(typeof d))}}}};Dygraph.prototype.updateOptions=function(e,b){if(typeof(b)=="undefined"){b=false}var d=e.file;var c=Dygraph.mapLegacyOptions_(e);if("rollPeriod" in c){this.rollPeriod_=c.rollPeriod}if("dateWindow" in c){this.dateWindow_=c.dateWindow;if(!("isZoomedIgnoreProgrammaticZoom" in c)){this.zoomed_x_=(c.dateWindow!==null)}}if("valueRange" in c&&!("isZoomedIgnoreProgrammaticZoom" in c)){this.zoomed_y_=(c.valueRange!==null)}var a=Dygraph.isPixelChangingOptionList(this.attr_("labels"),c);Dygraph.updateDeep(this.user_attrs_,c);this.attributes_.reparseSeries();if(d){this.file_=d;if(!b){this.start_()}}else{if(!b){if(a){this.predraw_()}else{this.renderGraph_(false)}}}};Dygraph.mapLegacyOptions_=function(c){var a={};for(var b in c){if(b=="file"){continue}if(c.hasOwnProperty(b)){a[b]=c[b]}}var e=function(g,f,h){if(!a.axes){a.axes={}}if(!a.axes[g]){a.axes[g]={}}a.axes[g][f]=h};var d=function(f,g,h){if(typeof(c[f])!="undefined"){Dygraph.warn("Option "+f+" is deprecated. Use the "+h+" option for the "+g+" axis instead. (e.g. { axes : { "+g+" : { "+h+" : ... } } } (see http://dygraphs.com/per-axis.html for more information.");e(g,h,c[f]);delete a[f]}};d("xValueFormatter","x","valueFormatter");d("pixelsPerXLabel","x","pixelsPerLabel");d("xAxisLabelFormatter","x","axisLabelFormatter");d("xTicker","x","ticker");d("yValueFormatter","y","valueFormatter");d("pixelsPerYLabel","y","pixelsPerLabel");d("yAxisLabelFormatter","y","axisLabelFormatter");d("yTicker","y","ticker");return a};Dygraph.prototype.resize=function(d,b){if(this.resize_lock){return}this.resize_lock=true;if((d===null)!=(b===null)){this.warn("Dygraph.resize() should be called with zero parameters or two non-NULL parameters. Pretending it was zero.");d=b=null}var a=this.width_;var c=this.height_;if(d){this.maindiv_.style.width=d+"px";this.maindiv_.style.height=b+"px";this.width_=d;this.height_=b}else{this.width_=this.maindiv_.clientWidth;this.height_=this.maindiv_.clientHeight}if(a!=this.width_||c!=this.height_){this.resizeElements_();this.predraw_()}this.resize_lock=false};Dygraph.prototype.adjustRoll=function(a){this.rollPeriod_=a;this.predraw_()};Dygraph.prototype.visibility=function(){if(!this.attr_("visibility")){this.attrs_.visibility=[]}while(this.attr_("visibility").length<this.numColumns()-1){this.attrs_.visibility.push(true)}return this.attr_("visibility")};Dygraph.prototype.setVisibility=function(b,c){var a=this.visibility();if(b<0||b>=a.length){this.warn("invalid series number in setVisibility: "+b)}else{a[b]=c;this.predraw_()}};Dygraph.prototype.size=function(){return{width:this.width_,height:this.height_}};Dygraph.prototype.setAnnotations=function(b,a){Dygraph.addAnnotationRule();this.annotations_=b;if(!this.layout_){this.warn("Tried to setAnnotations before dygraph was ready. Try setting them in a ready() block. See dygraphs.com/tests/annotation.html");return}this.layout_.setAnnotations(this.annotations_);if(!a){this.predraw_()}};Dygraph.prototype.annotations=function(){return this.annotations_};Dygraph.prototype.getLabels=function(){var a=this.attr_("labels");return a?a.slice():null};Dygraph.prototype.indexFromSetName=function(a){return this.setIndexByName_[a]};Dygraph.prototype.ready=function(a){if(this.is_initial_draw_){this.readyFns_.push(a)}else{a(this)}};Dygraph.addAnnotationRule=function(){if(Dygraph.addedAnnotationCSS){return}var f="border: 1px solid black; background-color: white; text-align: center;";var e=document.createElement("style");e.type="text/css";document.getElementsByTagName("head")[0].appendChild(e);for(var b=0;b<document.styleSheets.length;b++){if(document.styleSheets[b].disabled){continue}var d=document.styleSheets[b];try{if(d.insertRule){var a=d.cssRules?d.cssRules.length:0;d.insertRule(".dygraphDefaultAnnotation { "+f+" }",a)}else{if(d.addRule){d.addRule(".dygraphDefaultAnnotation",f)}}Dygraph.addedAnnotationCSS=true;return}catch(c){}}this.warn("Unable to add default annotation CSS rule; display may be off.")};var DateGraph=Dygraph;"use strict";Dygraph.LOG_SCALE=10;Dygraph.LN_TEN=Math.log(Dygraph.LOG_SCALE);Dygraph.log10=function(a){return Math.log(a)/Dygraph.LN_TEN};Dygraph.DEBUG=1;Dygraph.INFO=2;Dygraph.WARNING=3;Dygraph.ERROR=3;Dygraph.LOG_STACK_TRACES=false;Dygraph.DOTTED_LINE=[2,2];Dygraph.DASHED_LINE=[7,3];Dygraph.DOT_DASH_LINE=[7,2,2,2];Dygraph.log=function(c,g){var b;if(typeof(printStackTrace)!="undefined"){try{b=printStackTrace({guess:false});while(b[0].indexOf("stacktrace")!=-1){b.splice(0,1)}b.splice(0,2);for(var d=0;d<b.length;d++){b[d]=b[d].replace(/\([^)]*\/(.*)\)/,"@$1").replace(/\@.*\/([^\/]*)/,"@$1").replace("[object Object].","")}var j=b.splice(0,1)[0];g+=" ("+j.replace(/^.*@ ?/,"")+")"}catch(h){}}if(typeof(window.console)!="undefined"){var a=window.console;var f=function(e,k,i){if(k&&typeof(k)=="function"){k.call(e,i)}else{e.log(i)}};switch(c){case Dygraph.DEBUG:f(a,a.debug,"dygraphs: "+g);break;case Dygraph.INFO:f(a,a.info,"dygraphs: "+g);break;case Dygraph.WARNING:f(a,a.warn,"dygraphs: "+g);break;case Dygraph.ERROR:f(a,a.error,"dygraphs: "+g);break}}if(Dygraph.LOG_STACK_TRACES){window.console.log(b.join("\n"))}};Dygraph.info=function(a){Dygraph.log(Dygraph.INFO,a)};Dygraph.prototype.info=Dygraph.info;Dygraph.warn=function(a){Dygraph.log(Dygraph.WARNING,a)};Dygraph.prototype.warn=Dygraph.warn;Dygraph.error=function(a){Dygraph.log(Dygraph.ERROR,a)};Dygraph.prototype.error=Dygraph.error;Dygraph.getContext=function(a){return(a.getContext("2d"))};Dygraph.addEvent=function addEvent(c,b,a){if(c.addEventListener){c.addEventListener(b,a,false)}else{c[b+a]=function(){a(window.event)};c.attachEvent("on"+b,c[b+a])}};Dygraph.prototype.addAndTrackEvent=function(c,b,a){Dygraph.addEvent(c,b,a);this.registeredEvents_.push({elem:c,type:b,fn:a})};Dygraph.removeEvent=function(c,b,a){if(c.removeEventListener){c.removeEventListener(b,a,false)}else{try{c.detachEvent("on"+b,c[b+a])}catch(d){}c[b+a]=null}};Dygraph.prototype.removeTrackedEvents_=function(){if(this.registeredEvents_){for(var a=0;a<this.registeredEvents_.length;a++){var b=this.registeredEvents_[a];Dygraph.removeEvent(b.elem,b.type,b.fn)}}this.registeredEvents_=[]};Dygraph.cancelEvent=function(a){a=a?a:window.event;if(a.stopPropagation){a.stopPropagation()}if(a.preventDefault){a.preventDefault()}a.cancelBubble=true;a.cancel=true;a.returnValue=false;return false};Dygraph.hsvToRGB=function(h,g,k){var c;var d;var l;if(g===0){c=k;d=k;l=k}else{var e=Math.floor(h*6);var j=(h*6)-e;var b=k*(1-g);var a=k*(1-(g*j));var m=k*(1-(g*(1-j)));switch(e){case 1:c=a;d=k;l=b;break;case 2:c=b;d=k;l=m;break;case 3:c=b;d=a;l=k;break;case 4:c=m;d=b;l=k;break;case 5:c=k;d=b;l=a;break;case 6:case 0:c=k;d=m;l=b;break}}c=Math.floor(255*c+0.5);d=Math.floor(255*d+0.5);l=Math.floor(255*l+0.5);return"rgb("+c+","+d+","+l+")"};Dygraph.findPosX=function(c){var d=0;if(c.offsetParent){var a=c;while(1){var b="0";if(window.getComputedStyle){b=window.getComputedStyle(a,null).borderLeft||"0"}d+=parseInt(b,10);d+=a.offsetLeft;if(!a.offsetParent){break}a=a.offsetParent}}else{if(c.x){d+=c.x}}while(c&&c!=document.body){d-=c.scrollLeft;c=c.parentNode}return d};Dygraph.findPosY=function(c){var b=0;if(c.offsetParent){var a=c;while(1){var d="0";if(window.getComputedStyle){d=window.getComputedStyle(a,null).borderTop||"0"}b+=parseInt(d,10);b+=a.offsetTop;if(!a.offsetParent){break}a=a.offsetParent}}else{if(c.y){b+=c.y}}while(c&&c!=document.body){b-=c.scrollTop;c=c.parentNode}return b};Dygraph.pageX=function(c){if(c.pageX){return(!c.pageX||c.pageX<0)?0:c.pageX}else{var d=document.documentElement;var a=document.body;return c.clientX+(d.scrollLeft||a.scrollLeft)-(d.clientLeft||0)}};Dygraph.pageY=function(c){if(c.pageY){return(!c.pageY||c.pageY<0)?0:c.pageY}else{var d=document.documentElement;var a=document.body;return c.clientY+(d.scrollTop||a.scrollTop)-(d.clientTop||0)}};Dygraph.isOK=function(a){return !!a&&!isNaN(a)};Dygraph.isValidPoint=function(b,a){if(!b){return false}if(b.yval===null){return false}if(b.x===null||b.x===undefined){return false}if(b.y===null||b.y===undefined){return false}if(isNaN(b.x)||(!a&&isNaN(b.y))){return false}return true};Dygraph.floatFormat=function(a,b){var c=Math.min(Math.max(1,b||2),21);return(Math.abs(a)<0.001&&a!==0)?a.toExponential(c-1):a.toPrecision(c)};Dygraph.zeropad=function(a){if(a<10){return"0"+a}else{return""+a}};Dygraph.hmsString_=function(a){var c=Dygraph.zeropad;var b=new Date(a);if(b.getSeconds()){return c(b.getHours())+":"+c(b.getMinutes())+":"+c(b.getSeconds())}else{return c(b.getHours())+":"+c(b.getMinutes())}};Dygraph.round_=function(c,b){var a=Math.pow(10,b);return Math.round(c*a)/a};Dygraph.binarySearch=function(a,d,i,e,b){if(e===null||e===undefined||b===null||b===undefined){e=0;b=d.length-1}if(e>b){return -1}if(i===null||i===undefined){i=0}var h=function(j){return j>=0&&j<d.length};var g=parseInt((e+b)/2,10);var c=d[g];var f;if(c==a){return g}else{if(c>a){if(i>0){f=g-1;if(h(f)&&d[f]<a){return g}}return Dygraph.binarySearch(a,d,i,e,g-1)}else{if(c<a){if(i<0){f=g+1;if(h(f)&&d[f]>a){return g}}return Dygraph.binarySearch(a,d,i,g+1,b)}}}return -1};Dygraph.dateParser=function(a){var b;var c;if(a.search("-")==-1||a.search("T")!=-1||a.search("Z")!=-1){c=Dygraph.dateStrToMillis(a);if(c&&!isNaN(c)){return c}}if(a.search("-")!=-1){b=a.replace("-","/","g");while(b.search("-")!=-1){b=b.replace("-","/")}c=Dygraph.dateStrToMillis(b)}else{if(a.length==8){b=a.substr(0,4)+"/"+a.substr(4,2)+"/"+a.substr(6,2);c=Dygraph.dateStrToMillis(b)}else{c=Dygraph.dateStrToMillis(a)}}if(!c||isNaN(c)){Dygraph.error("Couldn't parse "+a+" as a date")}return c};Dygraph.dateStrToMillis=function(a){return new Date(a).getTime()};Dygraph.update=function(b,c){if(typeof(c)!="undefined"&&c!==null){for(var a in c){if(c.hasOwnProperty(a)){b[a]=c[a]}}}return b};Dygraph.updateDeep=function(b,d){function c(e){return(typeof Node==="object"?e instanceof Node:typeof e==="object"&&typeof e.nodeType==="number"&&typeof e.nodeName==="string")}if(typeof(d)!="undefined"&&d!==null){for(var a in d){if(d.hasOwnProperty(a)){if(d[a]===null){b[a]=null}else{if(Dygraph.isArrayLike(d[a])){b[a]=d[a].slice()}else{if(c(d[a])){b[a]=d[a]}else{if(typeof(d[a])=="object"){if(typeof(b[a])!="object"||b[a]===null){b[a]={}}Dygraph.updateDeep(b[a],d[a])}else{b[a]=d[a]}}}}}}}return b};Dygraph.isArrayLike=function(b){var a=typeof(b);if((a!="object"&&!(a=="function"&&typeof(b.item)=="function"))||b===null||typeof(b.length)!="number"||b.nodeType===3){return false}return true};Dygraph.isDateLike=function(a){if(typeof(a)!="object"||a===null||typeof(a.getTime)!="function"){return false}return true};Dygraph.clone=function(c){var b=[];for(var a=0;a<c.length;a++){if(Dygraph.isArrayLike(c[a])){b.push(Dygraph.clone(c[a]))}else{b.push(c[a])}}return b};Dygraph.createCanvas=function(){var a=document.createElement("canvas");var b=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(b&&(typeof(G_vmlCanvasManager)!="undefined")){a=G_vmlCanvasManager.initElement((a))}return a};Dygraph.isAndroid=function(){return(/Android/).test(navigator.userAgent)};Dygraph.Iterator=function(d,c,b,a){c=c||0;b=b||d.length;this.hasNext=true;this.peek=null;this.start_=c;this.array_=d;this.predicate_=a;this.end_=Math.min(d.length,c+b);this.nextIdx_=c-1;this.next()};Dygraph.Iterator.prototype.next=function(){if(!this.hasNext){return null}var c=this.peek;var b=this.nextIdx_+1;var a=false;while(b<this.end_){if(!this.predicate_||this.predicate_(this.array_,b)){this.peek=this.array_[b];a=true;break}b++}this.nextIdx_=b;if(!a){this.hasNext=false;this.peek=null}return c};Dygraph.createIterator=function(d,c,b,a){return new Dygraph.Iterator(d,c,b,a)};Dygraph.requestAnimFrame=(function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1000/60)}})();Dygraph.repeatAndCleanup=function(h,g,f,a){var i=0;var d;var b=new Date().getTime();h(i);if(g==1){a();return}var e=g-1;(function c(){if(i>=g){return}Dygraph.requestAnimFrame.call(window,function(){var l=new Date().getTime();var j=l-b;d=i;i=Math.floor(j/f);var k=i-d;var m=(i+k)>e;if(m||(i>=e)){h(e);a()}else{if(k!==0){h(i)}c()}})})()};Dygraph.isPixelChangingOptionList=function(h,e){var d={annotationClickHandler:true,annotationDblClickHandler:true,annotationMouseOutHandler:true,annotationMouseOverHandler:true,axisLabelColor:true,axisLineColor:true,axisLineWidth:true,clickCallback:true,digitsAfterDecimal:true,drawCallback:true,drawHighlightPointCallback:true,drawPoints:true,drawPointCallback:true,drawXGrid:true,drawYGrid:true,fillAlpha:true,gridLineColor:true,gridLineWidth:true,hideOverlayOnMouseOut:true,highlightCallback:true,highlightCircleSize:true,interactionModel:true,isZoomedIgnoreProgrammaticZoom:true,labelsDiv:true,labelsDivStyles:true,labelsDivWidth:true,labelsKMB:true,labelsKMG2:true,labelsSeparateLines:true,labelsShowZeroValues:true,legend:true,maxNumberWidth:true,panEdgeFraction:true,pixelsPerYLabel:true,pointClickCallback:true,pointSize:true,rangeSelectorPlotFillColor:true,rangeSelectorPlotStrokeColor:true,showLabelsOnHighlight:true,showRoller:true,sigFigs:true,strokeWidth:true,underlayCallback:true,unhighlightCallback:true,xAxisLabelFormatter:true,xTicker:true,xValueFormatter:true,yAxisLabelFormatter:true,yValueFormatter:true,zoomCallback:true};var a=false;var b={};if(h){for(var f=1;f<h.length;f++){b[h[f]]=true}}for(var g in e){if(a){break}if(e.hasOwnProperty(g)){if(b[g]){for(var c in e[g]){if(a){break}if(e[g].hasOwnProperty(c)&&!d[c]){a=true}}}else{if(!d[g]){a=true}}}}return a};Dygraph.compareArrays=function(c,b){if(!Dygraph.isArrayLike(c)||!Dygraph.isArrayLike(b)){return false}if(c.length!==b.length){return false}for(var a=0;a<c.length;a++){if(c[a]!==b[a]){return false}}return true};Dygraph.regularShape_=function(o,c,i,f,e,a,n){a=a||0;n=n||Math.PI*2/c;o.beginPath();var g=a;var d=g;var h=function(){var p=f+(Math.sin(d)*i);var q=e+(-Math.cos(d)*i);return[p,q]};var b=h();var l=b[0];var j=b[1];o.moveTo(l,j);for(var m=0;m<c;m++){d=(m==c-1)?g:(d+n);var k=h();o.lineTo(k[0],k[1])}o.fill();o.stroke()};Dygraph.shapeFunction_=function(b,a,c){return function(j,i,f,e,k,h,d){f.strokeStyle=h;f.fillStyle="white";Dygraph.regularShape_(f,b,d,e,k,a,c)}};Dygraph.Circles={DEFAULT:function(h,f,b,e,d,c,a){b.beginPath();b.fillStyle=c;b.arc(e,d,a,0,2*Math.PI,false);b.fill()},TRIANGLE:Dygraph.shapeFunction_(3),SQUARE:Dygraph.shapeFunction_(4,Math.PI/4),DIAMOND:Dygraph.shapeFunction_(4),PENTAGON:Dygraph.shapeFunction_(5),HEXAGON:Dygraph.shapeFunction_(6),CIRCLE:function(f,e,c,b,h,d,a){c.beginPath();c.strokeStyle=d;c.fillStyle="white";c.arc(b,h,a,0,2*Math.PI,false);c.fill();c.stroke()},STAR:Dygraph.shapeFunction_(5,0,4*Math.PI/5),PLUS:function(f,e,c,b,h,d,a){c.strokeStyle=d;c.beginPath();c.moveTo(b+a,h);c.lineTo(b-a,h);c.closePath();c.stroke();c.beginPath();c.moveTo(b,h+a);c.lineTo(b,h-a);c.closePath();c.stroke()},EX:function(f,e,c,b,h,d,a){c.strokeStyle=d;c.beginPath();c.moveTo(b+a,h+a);c.lineTo(b-a,h-a);c.closePath();c.stroke();c.beginPath();c.moveTo(b+a,h-a);c.lineTo(b-a,h+a);c.closePath();c.stroke()}};Dygraph.IFrameTarp=function(){this.tarps=[]};Dygraph.IFrameTarp.prototype.cover=function(){var f=document.getElementsByTagName("iframe");for(var c=0;c<f.length;c++){var e=f[c];var b=Dygraph.findPosX(e),h=Dygraph.findPosY(e),d=e.offsetWidth,a=e.offsetHeight;var g=document.createElement("div");g.style.position="absolute";g.style.left=b+"px";g.style.top=h+"px";g.style.width=d+"px";g.style.height=a+"px";g.style.zIndex=999;document.body.appendChild(g);this.tarps.push(g)}};Dygraph.IFrameTarp.prototype.uncover=function(){for(var a=0;a<this.tarps.length;a++){this.tarps[a].parentNode.removeChild(this.tarps[a])}this.tarps=[]};Dygraph.detectLineDelimiter=function(c){for(var a=0;a<c.length;a++){var b=c.charAt(a);if(b==="\r"){if(((a+1)<c.length)&&(c.charAt(a+1)==="\n")){return"\r\n"}return b}if(b==="\n"){if(((a+1)<c.length)&&(c.charAt(a+1)==="\r")){return"\n\r"}return b}}return null};Dygraph.isNodeContainedBy=function(b,a){if(a===null||b===null){return false}var c=(b);while(c&&c!==a){c=c.parentNode}return(c===a)};Dygraph.pow=function(a,b){if(b<0){return 1/Math.pow(a,-b)}return Math.pow(a,b)};Dygraph.dateSetters={ms:Date.prototype.setMilliseconds,s:Date.prototype.setSeconds,m:Date.prototype.setMinutes,h:Date.prototype.setHours};Dygraph.setDateSameTZ=function(c,b){var f=c.getTimezoneOffset();for(var a in b){if(!b.hasOwnProperty(a)){continue}var e=Dygraph.dateSetters[a];if(!e){throw"Invalid setter: "+a}e.call(c,b[a]);if(c.getTimezoneOffset()!=f){c.setTime(c.getTime()+(f-c.getTimezoneOffset())*60*1000)}}};"use strict";Dygraph.GVizChart=function(a){this.container=a};Dygraph.GVizChart.prototype.draw=function(b,a){this.container.innerHTML="";if(typeof(this.date_graph)!="undefined"){this.date_graph.destroy()}this.date_graph=new Dygraph(this.container,b,a)};Dygraph.GVizChart.prototype.setSelection=function(b){var a=false;if(b.length){a=b[0].row}this.date_graph.setSelection(a)};Dygraph.GVizChart.prototype.getSelection=function(){var b=[];var d=this.date_graph.getSelection();if(d<0){return b}var a=this.date_graph.layout_.points;for(var c=0;c<a.length;++c){b.push({row:d,column:c+1})}return b};"use strict";Dygraph.Interaction={};Dygraph.Interaction.startPan=function(o,t,c){var r,b;c.isPanning=true;var k=t.xAxisRange();c.dateRange=k[1]-k[0];c.initialLeftmostDate=k[0];c.xUnitsPerPixel=c.dateRange/(t.plotter_.area.w-1);if(t.attr_("panEdgeFraction")){var x=t.width_*t.attr_("panEdgeFraction");var d=t.xAxisExtremes();var j=t.toDomXCoord(d[0])-x;var l=t.toDomXCoord(d[1])+x;var u=t.toDataXCoord(j);var w=t.toDataXCoord(l);c.boundedDates=[u,w];var f=[];var a=t.height_*t.attr_("panEdgeFraction");for(r=0;r<t.axes_.length;r++){b=t.axes_[r];var p=b.extremeRange;var q=t.toDomYCoord(p[0],r)+a;var s=t.toDomYCoord(p[1],r)-a;var n=t.toDataYCoord(q,r);var e=t.toDataYCoord(s,r);f[r]=[n,e]}c.boundedValues=f}c.is2DPan=false;c.axes=[];for(r=0;r<t.axes_.length;r++){b=t.axes_[r];var h={};var m=t.yAxisRange(r);var v=t.attributes_.getForAxis("logscale",r);if(v){h.initialTopValue=Dygraph.log10(m[1]);h.dragValueRange=Dygraph.log10(m[1])-Dygraph.log10(m[0])}else{h.initialTopValue=m[1];h.dragValueRange=m[1]-m[0]}h.unitsPerPixel=h.dragValueRange/(t.plotter_.area.h-1);c.axes.push(h);if(b.valueWindow||b.valueRange){c.is2DPan=true}}};Dygraph.Interaction.movePan=function(b,k,c){c.dragEndX=k.dragGetX_(b,c);c.dragEndY=k.dragGetY_(b,c);var h=c.initialLeftmostDate-(c.dragEndX-c.dragStartX)*c.xUnitsPerPixel;if(c.boundedDates){h=Math.max(h,c.boundedDates[0])}var a=h+c.dateRange;if(c.boundedDates){if(a>c.boundedDates[1]){h=h-(a-c.boundedDates[1]);a=h+c.dateRange}}k.dateWindow_=[h,a];if(c.is2DPan){var d=c.dragEndY-c.dragStartY;for(var j=0;j<k.axes_.length;j++){var e=k.axes_[j];var o=c.axes[j];var p=d*o.unitsPerPixel;var f=c.boundedValues?c.boundedValues[j]:null;var l=o.initialTopValue+p;if(f){l=Math.min(l,f[1])}var n=l-o.dragValueRange;if(f){if(n<f[0]){l=l-(n-f[0]);n=l-o.dragValueRange}}var m=k.attributes_.getForAxis("logscale",j);if(m){e.valueWindow=[Math.pow(Dygraph.LOG_SCALE,n),Math.pow(Dygraph.LOG_SCALE,l)]}else{e.valueWindow=[n,l]}}}k.drawGraph_(false)};Dygraph.Interaction.endPan=function(c,b,a){a.dragEndX=b.dragGetX_(c,a);a.dragEndY=b.dragGetY_(c,a);var e=Math.abs(a.dragEndX-a.dragStartX);var d=Math.abs(a.dragEndY-a.dragStartY);if(e<2&&d<2&&b.lastx_!==undefined&&b.lastx_!=-1){Dygraph.Interaction.treatMouseOpAsClick(b,c,a)}a.isPanning=false;a.is2DPan=false;a.initialLeftmostDate=null;a.dateRange=null;a.valueRange=null;a.boundedDates=null;a.boundedValues=null;a.axes=null};Dygraph.Interaction.startZoom=function(c,b,a){a.isZooming=true;a.zoomMoved=false};Dygraph.Interaction.moveZoom=function(c,b,a){a.zoomMoved=true;a.dragEndX=b.dragGetX_(c,a);a.dragEndY=b.dragGetY_(c,a);var e=Math.abs(a.dragStartX-a.dragEndX);var d=Math.abs(a.dragStartY-a.dragEndY);a.dragDirection=(e<d/2)?Dygraph.VERTICAL:Dygraph.HORIZONTAL;b.drawZoomRect_(a.dragDirection,a.dragStartX,a.dragEndX,a.dragStartY,a.dragEndY,a.prevDragDirection,a.prevEndX,a.prevEndY);a.prevEndX=a.dragEndX;a.prevEndY=a.dragEndY;a.prevDragDirection=a.dragDirection};Dygraph.Interaction.treatMouseOpAsClick=function(f,b,d){var k=f.attr_("clickCallback");var n=f.attr_("pointClickCallback");var j=null;if(n){var l=-1;var m=Number.MAX_VALUE;for(var e=0;e<f.selPoints_.length;e++){var c=f.selPoints_[e];var a=Math.pow(c.canvasx-d.dragEndX,2)+Math.pow(c.canvasy-d.dragEndY,2);if(!isNaN(a)&&(l==-1||a<m)){m=a;l=e}}var h=f.attr_("highlightCircleSize")+2;if(m<=h*h){j=f.selPoints_[l]}}if(j){n(b,j)}if(k){k(b,f.lastx_,f.selPoints_)}};Dygraph.Interaction.endZoom=function(c,i,e){e.isZooming=false;e.dragEndX=i.dragGetX_(c,e);e.dragEndY=i.dragGetY_(c,e);var h=Math.abs(e.dragEndX-e.dragStartX);var d=Math.abs(e.dragEndY-e.dragStartY);if(h<2&&d<2&&i.lastx_!==undefined&&i.lastx_!=-1){Dygraph.Interaction.treatMouseOpAsClick(i,c,e)}var b=i.getArea();if(h>=10&&e.dragDirection==Dygraph.HORIZONTAL){var f=Math.min(e.dragStartX,e.dragEndX),k=Math.max(e.dragStartX,e.dragEndX);f=Math.max(f,b.x);k=Math.min(k,b.x+b.w);if(f<k){i.doZoomX_(f,k)}e.cancelNextDblclick=true}else{if(d>=10&&e.dragDirection==Dygraph.VERTICAL){var j=Math.min(e.dragStartY,e.dragEndY),a=Math.max(e.dragStartY,e.dragEndY);j=Math.max(j,b.y);a=Math.min(a,b.y+b.h);if(j<a){i.doZoomY_(j,a)}e.cancelNextDblclick=true}else{if(e.zoomMoved){i.clearZoomRect_()}}}e.dragStartX=null;e.dragStartY=null};Dygraph.Interaction.startTouch=function(f,e,d){f.preventDefault();if(f.touches.length>1){d.startTimeForDoubleTapMs=null}var h=[];for(var c=0;c<f.touches.length;c++){var b=f.touches[c];h.push({pageX:b.pageX,pageY:b.pageY,dataX:e.toDataXCoord(b.pageX),dataY:e.toDataYCoord(b.pageY)})}d.initialTouches=h;if(h.length==1){d.initialPinchCenter=h[0];d.touchDirections={x:true,y:true}}else{if(h.length>=2){d.initialPinchCenter={pageX:0.5*(h[0].pageX+h[1].pageX),pageY:0.5*(h[0].pageY+h[1].pageY),dataX:0.5*(h[0].dataX+h[1].dataX),dataY:0.5*(h[0].dataY+h[1].dataY)};var a=180/Math.PI*Math.atan2(d.initialPinchCenter.pageY-h[0].pageY,h[0].pageX-d.initialPinchCenter.pageX);a=Math.abs(a);if(a>90){a=90-a}d.touchDirections={x:(a<(90-45/2)),y:(a>45/2)}}}d.initialRange={x:e.xAxisRange(),y:e.yAxisRange()}};Dygraph.Interaction.moveTouch=function(n,q,d){d.startTimeForDoubleTapMs=null;var p,l=[];for(p=0;p<n.touches.length;p++){var k=n.touches[p];l.push({pageX:k.pageX,pageY:k.pageY})}var a=d.initialTouches;var h;var j=d.initialPinchCenter;if(l.length==1){h=l[0]}else{h={pageX:0.5*(l[0].pageX+l[1].pageX),pageY:0.5*(l[0].pageY+l[1].pageY)}}var m={pageX:h.pageX-j.pageX,pageY:h.pageY-j.pageY};var f=d.initialRange.x[1]-d.initialRange.x[0];var o=d.initialRange.y[0]-d.initialRange.y[1];m.dataX=(m.pageX/q.plotter_.area.w)*f;m.dataY=(m.pageY/q.plotter_.area.h)*o;var w,c;if(l.length==1){w=1;c=1}else{if(l.length>=2){var e=(a[1].pageX-j.pageX);w=(l[1].pageX-h.pageX)/e;var v=(a[1].pageY-j.pageY);c=(l[1].pageY-h.pageY)/v}}w=Math.min(8,Math.max(0.125,w));c=Math.min(8,Math.max(0.125,c));var u=false;if(d.touchDirections.x){q.dateWindow_=[j.dataX-m.dataX+(d.initialRange.x[0]-j.dataX)/w,j.dataX-m.dataX+(d.initialRange.x[1]-j.dataX)/w];u=true}if(d.touchDirections.y){for(p=0;p<1;p++){var b=q.axes_[p];var s=q.attributes_.getForAxis("logscale",p);if(s){}else{b.valueWindow=[j.dataY-m.dataY+(d.initialRange.y[0]-j.dataY)/c,j.dataY-m.dataY+(d.initialRange.y[1]-j.dataY)/c];u=true}}}q.drawGraph_(false);if(u&&l.length>1&&q.attr_("zoomCallback")){var r=q.xAxisRange();q.attr_("zoomCallback")(r[0],r[1],q.yAxisRanges())}};Dygraph.Interaction.endTouch=function(e,d,c){if(e.touches.length!==0){Dygraph.Interaction.startTouch(e,d,c)}else{if(e.changedTouches.length==1){var a=new Date().getTime();var b=e.changedTouches[0];if(c.startTimeForDoubleTapMs&&a-c.startTimeForDoubleTapMs<500&&c.doubleTapX&&Math.abs(c.doubleTapX-b.screenX)<50&&c.doubleTapY&&Math.abs(c.doubleTapY-b.screenY)<50){d.resetZoom()}else{c.startTimeForDoubleTapMs=a;c.doubleTapX=b.screenX;c.doubleTapY=b.screenY}}}};Dygraph.Interaction.defaultModel={mousedown:function(c,b,a){if(c.button&&c.button==2){return}a.initializeMouseDown(c,b,a);if(c.altKey||c.shiftKey){Dygraph.startPan(c,b,a)}else{Dygraph.startZoom(c,b,a)}},mousemove:function(c,b,a){if(a.isZooming){Dygraph.moveZoom(c,b,a)}else{if(a.isPanning){Dygraph.movePan(c,b,a)}}},mouseup:function(c,b,a){if(a.isZooming){Dygraph.endZoom(c,b,a)}else{if(a.isPanning){Dygraph.endPan(c,b,a)}}},touchstart:function(c,b,a){Dygraph.Interaction.startTouch(c,b,a)},touchmove:function(c,b,a){Dygraph.Interaction.moveTouch(c,b,a)},touchend:function(c,b,a){Dygraph.Interaction.endTouch(c,b,a)},mouseout:function(c,b,a){if(a.isZooming){a.dragEndX=null;a.dragEndY=null;b.clearZoomRect_()}},dblclick:function(c,b,a){if(a.cancelNextDblclick){a.cancelNextDblclick=false;return}if(c.altKey||c.shiftKey){return}b.resetZoom()}};Dygraph.DEFAULT_ATTRS.interactionModel=Dygraph.Interaction.defaultModel;Dygraph.defaultInteractionModel=Dygraph.Interaction.defaultModel;Dygraph.endZoom=Dygraph.Interaction.endZoom;Dygraph.moveZoom=Dygraph.Interaction.moveZoom;Dygraph.startZoom=Dygraph.Interaction.startZoom;Dygraph.endPan=Dygraph.Interaction.endPan;Dygraph.movePan=Dygraph.Interaction.movePan;Dygraph.startPan=Dygraph.Interaction.startPan;Dygraph.Interaction.nonInteractiveModel_={mousedown:function(c,b,a){a.initializeMouseDown(c,b,a)},mouseup:function(c,b,a){a.dragEndX=b.dragGetX_(c,a);a.dragEndY=b.dragGetY_(c,a);var e=Math.abs(a.dragEndX-a.dragStartX);var d=Math.abs(a.dragEndY-a.dragStartY);if(e<2&&d<2&&b.lastx_!==undefined&&b.lastx_!=-1){Dygraph.Interaction.treatMouseOpAsClick(b,c,a)}}};Dygraph.Interaction.dragIsPanInteractionModel={mousedown:function(c,b,a){a.initializeMouseDown(c,b,a);Dygraph.startPan(c,b,a)},mousemove:function(c,b,a){if(a.isPanning){Dygraph.movePan(c,b,a)}},mouseup:function(c,b,a){if(a.isPanning){Dygraph.endPan(c,b,a)}}};"use strict";Dygraph.TickList=undefined;Dygraph.Ticker=undefined;Dygraph.numericLinearTicks=function(d,c,i,g,f,h){var e=function(a){if(a==="logscale"){return false}return g(a)};return Dygraph.numericTicks(d,c,i,e,f,h)};Dygraph.numericTicks=function(F,E,u,p,d,q){var z=(p("pixelsPerLabel"));var G=[];var C,A,t,y;if(q){for(C=0;C<q.length;C++){G.push({v:q[C]})}}else{if(p("logscale")){y=Math.floor(u/z);var l=Dygraph.binarySearch(F,Dygraph.PREFERRED_LOG_TICK_VALUES,1);var H=Dygraph.binarySearch(E,Dygraph.PREFERRED_LOG_TICK_VALUES,-1);if(l==-1){l=0}if(H==-1){H=Dygraph.PREFERRED_LOG_TICK_VALUES.length-1}var s=null;if(H-l>=y/4){for(var r=H;r>=l;r--){var m=Dygraph.PREFERRED_LOG_TICK_VALUES[r];var k=Math.log(m/F)/Math.log(E/F)*u;var D={v:m};if(s===null){s={tickValue:m,pixel_coord:k}}else{if(Math.abs(k-s.pixel_coord)>=z){s={tickValue:m,pixel_coord:k}}else{D.label=""}}G.push(D)}G.reverse()}}if(G.length===0){var g=p("labelsKMG2");var n,h;if(g){n=[1,2,4,8,16,32,64,128,256];h=16}else{n=[1,2,5,10,20,50,100];h=10}var w=Math.ceil(u/z);var o=Math.abs(E-F)/w;var v=Math.floor(Math.log(o)/Math.log(h));var f=Math.pow(h,v);var I,x,c,e;for(A=0;A<n.length;A++){I=f*n[A];x=Math.floor(F/I)*I;c=Math.ceil(E/I)*I;y=Math.abs(c-x)/I;e=u/y;if(e>z){break}}if(x>c){I*=-1}for(C=0;C<y;C++){t=x+C*I;G.push({v:t})}}}var B=(p("axisLabelFormatter"));for(C=0;C<G.length;C++){if(G[C].label!==undefined){continue}G[C].label=B(G[C].v,0,p,d)}return G};Dygraph.dateTicker=function(e,c,i,g,f,h){var d=Dygraph.pickDateTickGranularity(e,c,i,g);if(d>=0){return Dygraph.getDateAxis(e,c,d,g,f)}else{return[]}};Dygraph.SECONDLY=0;Dygraph.TWO_SECONDLY=1;Dygraph.FIVE_SECONDLY=2;Dygraph.TEN_SECONDLY=3;Dygraph.THIRTY_SECONDLY=4;Dygraph.MINUTELY=5;Dygraph.TWO_MINUTELY=6;Dygraph.FIVE_MINUTELY=7;Dygraph.TEN_MINUTELY=8;Dygraph.THIRTY_MINUTELY=9;Dygraph.HOURLY=10;Dygraph.TWO_HOURLY=11;Dygraph.SIX_HOURLY=12;Dygraph.DAILY=13;Dygraph.WEEKLY=14;Dygraph.MONTHLY=15;Dygraph.QUARTERLY=16;Dygraph.BIANNUAL=17;Dygraph.ANNUAL=18;Dygraph.DECADAL=19;Dygraph.CENTENNIAL=20;Dygraph.NUM_GRANULARITIES=21;Dygraph.SHORT_SPACINGS=[];Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY]=1000*1;Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY]=1000*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY]=1000*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY]=1000*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY]=1000*30;Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY]=1000*60;Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY]=1000*60*2;Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY]=1000*60*5;Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY]=1000*60*10;Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY]=1000*60*30;Dygraph.SHORT_SPACINGS[Dygraph.HOURLY]=1000*3600;Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]=1000*3600*2;Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY]=1000*3600*6;Dygraph.SHORT_SPACINGS[Dygraph.DAILY]=1000*86400;Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY]=1000*604800;Dygraph.LONG_TICK_PLACEMENTS=[];Dygraph.LONG_TICK_PLACEMENTS[Dygraph.MONTHLY]={months:[0,1,2,3,4,5,6,7,8,9,10,11],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.QUARTERLY]={months:[0,3,6,9],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.BIANNUAL]={months:[0,6],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.ANNUAL]={months:[0],year_mod:1};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.DECADAL]={months:[0],year_mod:10};Dygraph.LONG_TICK_PLACEMENTS[Dygraph.CENTENNIAL]={months:[0],year_mod:100};Dygraph.PREFERRED_LOG_TICK_VALUES=function(){var c=[];for(var b=-39;b<=39;b++){var a=Math.pow(10,b);for(var d=1;d<=9;d++){var e=a*d;c.push(e)}}return c}();Dygraph.pickDateTickGranularity=function(d,c,j,h){var g=(h("pixelsPerLabel"));for(var f=0;f<Dygraph.NUM_GRANULARITIES;f++){var e=Dygraph.numDateTicks(d,c,f);if(j/e>=g){return f}}return -1};Dygraph.numDateTicks=function(e,b,f){if(f<Dygraph.MONTHLY){var g=Dygraph.SHORT_SPACINGS[f];return Math.floor(0.5+1*(b-e)/g)}else{var d=Dygraph.LONG_TICK_PLACEMENTS[f];var c=365.2524*24*3600*1000;var a=1*(b-e)/c;return Math.floor(0.5+1*a*d.months.length/d.year_mod)}};Dygraph.getDateAxis=function(p,l,a,n,z){var w=(n("axisLabelFormatter"));var C=[];var m;if(a<Dygraph.MONTHLY){var c=Dygraph.SHORT_SPACINGS[a];var y=c/1000;var A=new Date(p);Dygraph.setDateSameTZ(A,{ms:0});var h;if(y<=60){h=A.getSeconds();Dygraph.setDateSameTZ(A,{s:h-h%y})}else{Dygraph.setDateSameTZ(A,{s:0});y/=60;if(y<=60){h=A.getMinutes();Dygraph.setDateSameTZ(A,{m:h-h%y})}else{Dygraph.setDateSameTZ(A,{m:0});y/=60;if(y<=24){h=A.getHours();A.setHours(h-h%y)}else{A.setHours(0);y/=24;if(y==7){A.setDate(A.getDate()-A.getDay())}}}}p=A.getTime();var B=new Date(p).getTimezoneOffset();var e=(c>=Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]);for(m=p;m<=l;m+=c){A=new Date(m);if(e&&A.getTimezoneOffset()!=B){var k=A.getTimezoneOffset()-B;m+=k*60*1000;A=new Date(m);B=A.getTimezoneOffset();if(new Date(m+c).getTimezoneOffset()!=B){m+=c;A=new Date(m);B=A.getTimezoneOffset()}}C.push({v:m,label:w(A,a,n,z)})}}else{var f;var r=1;if(a<Dygraph.NUM_GRANULARITIES){f=Dygraph.LONG_TICK_PLACEMENTS[a].months;r=Dygraph.LONG_TICK_PLACEMENTS[a].year_mod}else{Dygraph.warn("Span of dates is too long")}var v=new Date(p).getFullYear();var q=new Date(l).getFullYear();var b=Dygraph.zeropad;for(var u=v;u<=q;u++){if(u%r!==0){continue}for(var s=0;s<f.length;s++){var o=u+"/"+b(1+f[s])+"/01";m=Dygraph.dateStrToMillis(o);if(m<p||m>l){continue}C.push({v:m,label:w(new Date(m),a,n,z)})}}}return C};if(Dygraph&&Dygraph.DEFAULT_ATTRS&&Dygraph.DEFAULT_ATTRS.axes&&Dygraph.DEFAULT_ATTRS.axes["x"]&&Dygraph.DEFAULT_ATTRS.axes["y"]&&Dygraph.DEFAULT_ATTRS.axes["y2"]){Dygraph.DEFAULT_ATTRS.axes["x"]["ticker"]=Dygraph.dateTicker;Dygraph.DEFAULT_ATTRS.axes["y"]["ticker"]=Dygraph.numericTicks;Dygraph.DEFAULT_ATTRS.axes["y2"]["ticker"]=Dygraph.numericTicks}Dygraph.Plugins={};Dygraph.Plugins.Annotations=(function(){var a=function(){this.annotations_=[]};a.prototype.toString=function(){return"Annotations Plugin"};a.prototype.activate=function(b){return{clearChart:this.clearChart,didDrawChart:this.didDrawChart}};a.prototype.detachLabels=function(){for(var c=0;c<this.annotations_.length;c++){var b=this.annotations_[c];if(b.parentNode){b.parentNode.removeChild(b)}this.annotations_[c]=null}this.annotations_=[]};a.prototype.clearChart=function(b){this.detachLabels()};a.prototype.didDrawChart=function(v){var t=v.dygraph;var r=t.layout_.annotated_points;if(!r||r.length===0){return}var h=v.canvas.parentNode;var x={position:"absolute",fontSize:t.getOption("axisLabelFontSize")+"px",zIndex:10,overflow:"hidden"};var b=function(e,g,i){return function(y){var p=i.annotation;if(p.hasOwnProperty(e)){p[e](p,i,t,y)}else{if(t.getOption(g)){t.getOption(g)(p,i,t,y)}}}};var u=v.dygraph.plotter_.area;var q={};for(var s=0;s<r.length;s++){var l=r[s];if(l.canvasx<u.x||l.canvasx>u.x+u.w||l.canvasy<u.y||l.canvasy>u.y+u.h){continue}var w=l.annotation;var n=6;if(w.hasOwnProperty("tickHeight")){n=w.tickHeight}var j=document.createElement("div");for(var A in x){if(x.hasOwnProperty(A)){j.style[A]=x[A]}}if(!w.hasOwnProperty("icon")){j.className="dygraphDefaultAnnotation"}if(w.hasOwnProperty("cssClass")){j.className+=" "+w.cssClass}var m=w.hasOwnProperty("width")?w.width:16;var k=w.hasOwnProperty("height")?w.height:16;if(w.hasOwnProperty("icon")){var z=document.createElement("img");z.src=w.icon;z.width=m;z.height=k;j.appendChild(z)}else{if(l.annotation.hasOwnProperty("shortText")){j.appendChild(document.createTextNode(l.annotation.shortText))}}var c=l.canvasx-m/2;j.style.left=c+"px";var f=0;if(w.attachAtBottom){var d=(u.y+u.h-k-n);if(q[c]){d-=q[c]}else{q[c]=0}q[c]+=(n+k);f=d}else{f=l.canvasy-k-n}j.style.top=f+"px";j.style.width=m+"px";j.style.height=k+"px";j.title=l.annotation.text;j.style.color=t.colorsMap_[l.name];j.style.borderColor=t.colorsMap_[l.name];w.div=j;t.addAndTrackEvent(j,"click",b("clickHandler","annotationClickHandler",l,this));t.addAndTrackEvent(j,"mouseover",b("mouseOverHandler","annotationMouseOverHandler",l,this));t.addAndTrackEvent(j,"mouseout",b("mouseOutHandler","annotationMouseOutHandler",l,this));t.addAndTrackEvent(j,"dblclick",b("dblClickHandler","annotationDblClickHandler",l,this));h.appendChild(j);this.annotations_.push(j);var o=v.drawingContext;o.save();o.strokeStyle=t.colorsMap_[l.name];o.beginPath();if(!w.attachAtBottom){o.moveTo(l.canvasx,l.canvasy);o.lineTo(l.canvasx,l.canvasy-2-n)}else{var d=f+k;o.moveTo(l.canvasx,d);o.lineTo(l.canvasx,d+n)}o.closePath();o.stroke();o.restore()}};a.prototype.destroy=function(){this.detachLabels()};return a})();Dygraph.Plugins.Axes=(function(){var a=function(){this.xlabels_=[];this.ylabels_=[]};a.prototype.toString=function(){return"Axes Plugin"};a.prototype.activate=function(b){return{layout:this.layout,clearChart:this.clearChart,willDrawChart:this.willDrawChart}};a.prototype.layout=function(f){var d=f.dygraph;if(d.getOption("drawYAxis")){var b=d.getOption("yAxisLabelWidth")+2*d.getOption("axisTickSize");f.reserveSpaceLeft(b)}if(d.getOption("drawXAxis")){var c;if(d.getOption("xAxisHeight")){c=d.getOption("xAxisHeight")}else{c=d.getOptionForAxis("axisLabelFontSize","x")+2*d.getOption("axisTickSize")}f.reserveSpaceBottom(c)}if(d.numAxes()==2){if(d.getOption("drawYAxis")){var b=d.getOption("yAxisLabelWidth")+2*d.getOption("axisTickSize");f.reserveSpaceRight(b)}}else{if(d.numAxes()>2){d.error("Only two y-axes are supported at this time. (Trying to use "+d.numAxes()+")")}}};a.prototype.detachLabels=function(){function b(d){for(var c=0;c<d.length;c++){var e=d[c];if(e.parentNode){e.parentNode.removeChild(e)}}}b(this.xlabels_);b(this.ylabels_);this.xlabels_=[];this.ylabels_=[]};a.prototype.clearChart=function(b){this.detachLabels()};a.prototype.willDrawChart=function(H){var F=H.dygraph;if(!F.getOption("drawXAxis")&&!F.getOption("drawYAxis")){return}function B(e){return Math.round(e)+0.5}function A(e){return Math.round(e)-0.5}var j=H.drawingContext;var v=H.canvas.parentNode;var J=H.canvas.width;var d=H.canvas.height;var s,u,t,E,D;var C=function(e){return{position:"absolute",fontSize:F.getOptionForAxis("axisLabelFontSize",e)+"px",zIndex:10,color:F.getOptionForAxis("axisLabelColor",e),width:F.getOption("axisLabelWidth")+"px",lineHeight:"normal",overflow:"hidden"}};var p={x:C("x"),y:C("y"),y2:C("y2")};var m=function(g,x,y){var K=document.createElement("div");var e=p[y=="y2"?"y2":x];for(var r in e){if(e.hasOwnProperty(r)){K.style[r]=e[r]}}var i=document.createElement("div");i.className="dygraph-axis-label dygraph-axis-label-"+x+(y?" dygraph-axis-label-"+y:"");i.innerHTML=g;K.appendChild(i);return K};j.save();var I=F.layout_;var G=H.dygraph.plotter_.area;if(F.getOption("drawYAxis")){if(I.yticks&&I.yticks.length>0){var h=F.numAxes();for(D=0;D<I.yticks.length;D++){E=I.yticks[D];if(typeof(E)=="function"){return}u=G.x;var o=1;var f="y1";if(E[0]==1){u=G.x+G.w;o=-1;f="y2"}var k=F.getOptionForAxis("axisLabelFontSize",f);t=G.y+E[1]*G.h;s=m(E[2],"y",h==2?f:null);var z=(t-k/2);if(z<0){z=0}if(z+k+3>d){s.style.bottom="0px"}else{s.style.top=z+"px"}if(E[0]===0){s.style.left=(G.x-F.getOption("yAxisLabelWidth")-F.getOption("axisTickSize"))+"px";s.style.textAlign="right"}else{if(E[0]==1){s.style.left=(G.x+G.w+F.getOption("axisTickSize"))+"px";s.style.textAlign="left"}}s.style.width=F.getOption("yAxisLabelWidth")+"px";v.appendChild(s);this.ylabels_.push(s)}var n=this.ylabels_[0];var k=F.getOptionForAxis("axisLabelFontSize","y");var q=parseInt(n.style.top,10)+k;if(q>d-k){n.style.top=(parseInt(n.style.top,10)-k/2)+"px"}}var c;if(F.getOption("drawAxesAtZero")){var w=F.toPercentXCoord(0);if(w>1||w<0||isNaN(w)){w=0}c=B(G.x+w*G.w)}else{c=B(G.x)}j.strokeStyle=F.getOptionForAxis("axisLineColor","y");j.lineWidth=F.getOptionForAxis("axisLineWidth","y");j.beginPath();j.moveTo(c,A(G.y));j.lineTo(c,A(G.y+G.h));j.closePath();j.stroke();if(F.numAxes()==2){j.strokeStyle=F.getOptionForAxis("axisLineColor","y2");j.lineWidth=F.getOptionForAxis("axisLineWidth","y2");j.beginPath();j.moveTo(A(G.x+G.w),A(G.y));j.lineTo(A(G.x+G.w),A(G.y+G.h));j.closePath();j.stroke()}}if(F.getOption("drawXAxis")){if(I.xticks){for(D=0;D<I.xticks.length;D++){E=I.xticks[D];u=G.x+E[0]*G.w;t=G.y+G.h;s=m(E[1],"x");s.style.textAlign="center";s.style.top=(t+F.getOption("axisTickSize"))+"px";var l=(u-F.getOption("axisLabelWidth")/2);if(l+F.getOption("axisLabelWidth")>J){l=J-F.getOption("xAxisLabelWidth");s.style.textAlign="right"}if(l<0){l=0;s.style.textAlign="left"}s.style.left=l+"px";s.style.width=F.getOption("xAxisLabelWidth")+"px";v.appendChild(s);this.xlabels_.push(s)}}j.strokeStyle=F.getOptionForAxis("axisLineColor","x");j.lineWidth=F.getOptionForAxis("axisLineWidth","x");j.beginPath();var b;if(F.getOption("drawAxesAtZero")){var w=F.toPercentYCoord(0,0);if(w>1||w<0){w=1}b=A(G.y+w*G.h)}else{b=A(G.y+G.h)}j.moveTo(B(G.x),b);j.lineTo(B(G.x+G.w),b);j.closePath();j.stroke()}j.restore()};return a})();Dygraph.Plugins.ChartLabels=(function(){var c=function(){this.title_div_=null;this.xlabel_div_=null;this.ylabel_div_=null;this.y2label_div_=null};c.prototype.toString=function(){return"ChartLabels Plugin"};c.prototype.activate=function(d){return{layout:this.layout,didDrawChart:this.didDrawChart}};var b=function(d){var e=document.createElement("div");e.style.position="absolute";e.style.left=d.x+"px";e.style.top=d.y+"px";e.style.width=d.w+"px";e.style.height=d.h+"px";return e};c.prototype.detachLabels_=function(){var e=[this.title_div_,this.xlabel_div_,this.ylabel_div_,this.y2label_div_];for(var d=0;d<e.length;d++){var f=e[d];if(!f){continue}if(f.parentNode){f.parentNode.removeChild(f)}}this.title_div_=null;this.xlabel_div_=null;this.ylabel_div_=null;this.y2label_div_=null};var a=function(l,i,f,h,j){var d=document.createElement("div");d.style.position="absolute";if(f==1){d.style.left="0px"}else{d.style.left=i.x+"px"}d.style.top=i.y+"px";d.style.width=i.w+"px";d.style.height=i.h+"px";d.style.fontSize=(l.getOption("yLabelWidth")-2)+"px";var m=document.createElement("div");m.style.position="absolute";m.style.width=i.h+"px";m.style.height=i.w+"px";m.style.top=(i.h/2-i.w/2)+"px";m.style.left=(i.w/2-i.h/2)+"px";m.style.textAlign="center";var e="rotate("+(f==1?"-":"")+"90deg)";m.style.transform=e;m.style.WebkitTransform=e;m.style.MozTransform=e;m.style.OTransform=e;m.style.msTransform=e;if(typeof(document.documentMode)!=="undefined"&&document.documentMode<9){m.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+(f==1?"3":"1")+")";m.style.left="0px";m.style.top="0px"}var k=document.createElement("div");k.className=h;k.innerHTML=j;m.appendChild(k);d.appendChild(m);return d};c.prototype.layout=function(k){this.detachLabels_();var i=k.dygraph;var m=k.chart_div;if(i.getOption("title")){var d=k.reserveSpaceTop(i.getOption("titleHeight"));this.title_div_=b(d);this.title_div_.style.textAlign="center";this.title_div_.style.fontSize=(i.getOption("titleHeight")-8)+"px";this.title_div_.style.fontWeight="bold";this.title_div_.style.zIndex=10;var f=document.createElement("div");f.className="dygraph-label dygraph-title";f.innerHTML=i.getOption("title");this.title_div_.appendChild(f);m.appendChild(this.title_div_)}if(i.getOption("xlabel")){var j=k.reserveSpaceBottom(i.getOption("xLabelHeight"));this.xlabel_div_=b(j);this.xlabel_div_.style.textAlign="center";this.xlabel_div_.style.fontSize=(i.getOption("xLabelHeight")-2)+"px";var f=document.createElement("div");f.className="dygraph-label dygraph-xlabel";f.innerHTML=i.getOption("xlabel");this.xlabel_div_.appendChild(f);m.appendChild(this.xlabel_div_)}if(i.getOption("ylabel")){var h=k.reserveSpaceLeft(0);this.ylabel_div_=a(i,h,1,"dygraph-label dygraph-ylabel",i.getOption("ylabel"));m.appendChild(this.ylabel_div_)}if(i.getOption("y2label")&&i.numAxes()==2){var l=k.reserveSpaceRight(0);this.y2label_div_=a(i,l,2,"dygraph-label dygraph-y2label",i.getOption("y2label"));m.appendChild(this.y2label_div_)}};c.prototype.didDrawChart=function(f){var d=f.dygraph;if(this.title_div_){this.title_div_.children[0].innerHTML=d.getOption("title")}if(this.xlabel_div_){this.xlabel_div_.children[0].innerHTML=d.getOption("xlabel")}if(this.ylabel_div_){this.ylabel_div_.children[0].children[0].innerHTML=d.getOption("ylabel")}if(this.y2label_div_){this.y2label_div_.children[0].children[0].innerHTML=d.getOption("y2label")}};c.prototype.clearChart=function(){};c.prototype.destroy=function(){this.detachLabels_()};return c})();Dygraph.Plugins.Grid=(function(){var a=function(){};a.prototype.toString=function(){return"Gridline Plugin"};a.prototype.activate=function(b){return{willDrawChart:this.willDrawChart}};a.prototype.willDrawChart=function(s){var q=s.dygraph;var l=s.drawingContext;var t=q.layout_;var r=s.dygraph.plotter_.area;function k(e){return Math.round(e)+0.5}function j(e){return Math.round(e)-0.5}var h,f,p,u;if(q.getOption("drawYGrid")){var o=["y","y2"];var m=[],v=[],b=[],n=[],d=[];for(var p=0;p<o.length;p++){b[p]=q.getOptionForAxis("drawGrid",o[p]);if(b[p]){m[p]=q.getOptionForAxis("gridLineColor",o[p]);v[p]=q.getOptionForAxis("gridLineWidth",o[p]);d[p]=q.getOptionForAxis("gridLinePattern",o[p]);n[p]=d[p]&&(d[p].length>=2)}}u=t.yticks;l.save();for(p=0;p<u.length;p++){var c=u[p][0];if(b[c]){if(n[c]){l.installPattern(d[c])}l.strokeStyle=m[c];l.lineWidth=v[c];h=k(r.x);f=j(r.y+u[p][1]*r.h);l.beginPath();l.moveTo(h,f);l.lineTo(h+r.w,f);l.closePath();l.stroke();if(n[c]){l.uninstallPattern()}}}l.restore()}if(q.getOption("drawXGrid")&&q.getOptionForAxis("drawGrid","x")){u=t.xticks;l.save();var d=q.getOptionForAxis("gridLinePattern","x");var n=d&&(d.length>=2);if(n){l.installPattern(d)}l.strokeStyle=q.getOptionForAxis("gridLineColor","x");l.lineWidth=q.getOptionForAxis("gridLineWidth","x");for(p=0;p<u.length;p++){h=k(r.x+u[p][0]*r.w);f=j(r.y+r.h);l.beginPath();l.moveTo(h,f);l.lineTo(h,r.y);l.closePath();l.stroke()}if(n){l.uninstallPattern()}l.restore()}};a.prototype.destroy=function(){};return a})();Dygraph.Plugins.Legend=(function(){var c=function(){this.legend_div_=null;this.is_generated_div_=false};c.prototype.toString=function(){return"Legend Plugin"};var a,d;c.prototype.activate=function(j){var m;var f=j.getOption("labelsDivWidth");var l=j.getOption("labelsDiv");if(l&&null!==l){if(typeof(l)=="string"||l instanceof String){m=document.getElementById(l)}else{m=l}}else{var i={position:"absolute",fontSize:"14px",zIndex:10,width:f+"px",top:"0px",left:(j.size().width-f-2)+"px",background:"white",lineHeight:"normal",textAlign:"left",overflow:"hidden"};Dygraph.update(i,j.getOption("labelsDivStyles"));m=document.createElement("div");m.className="dygraph-legend";for(var h in i){if(!i.hasOwnProperty(h)){continue}try{m.style[h]=i[h]}catch(k){this.warn("You are using unsupported css properties for your browser in labelsDivStyles")}}j.graphDiv.appendChild(m);this.is_generated_div_=true}this.legend_div_=m;this.one_em_width_=10;return{select:this.select,deselect:this.deselect,predraw:this.predraw,didDrawChart:this.didDrawChart}};var b=function(g){var f=document.createElement("span");f.setAttribute("style","margin: 0; padding: 0 0 0 1em; border: 0;");g.appendChild(f);var e=f.offsetWidth;g.removeChild(f);return e};c.prototype.select=function(i){var h=i.selectedX;var g=i.selectedPoints;var f=a(i.dygraph,h,g,this.one_em_width_);this.legend_div_.innerHTML=f};c.prototype.deselect=function(h){var f=b(this.legend_div_);this.one_em_width_=f;var g=a(h.dygraph,undefined,undefined,f);this.legend_div_.innerHTML=g};c.prototype.didDrawChart=function(f){this.deselect(f)};c.prototype.predraw=function(h){if(!this.is_generated_div_){return}h.dygraph.graphDiv.appendChild(this.legend_div_);var g=h.dygraph.plotter_.area;var f=h.dygraph.getOption("labelsDivWidth");this.legend_div_.style.left=g.x+g.w-f-1+"px";this.legend_div_.style.top=g.y+"px";this.legend_div_.style.width=f+"px"};c.prototype.destroy=function(){this.legend_div_=null};a=function(w,p,l,f){if(w.getOption("showLabelsOnHighlight")!==true){return""}var r,C,u,s,m;var z=w.getLabels();if(typeof(p)==="undefined"){if(w.getOption("legend")!="always"){return""}C=w.getOption("labelsSeparateLines");r="";for(u=1;u<z.length;u++){var q=w.getPropertiesForSeries(z[u]);if(!q.visible){continue}if(r!==""){r+=(C?"<br/>":" ")}m=w.getOption("strokePattern",z[u]);s=d(m,q.color,f);r+="<span style='font-weight: bold; color: "+q.color+";'>"+s+" "+z[u]+"</span>"}return r}var A=w.optionsViewForAxis_("x");var o=A("valueFormatter");r=o(p,A,z[0],w);if(r!==""){r+=":"}var v=[];var j=w.numAxes();for(u=0;u<j;u++){v[u]=w.optionsViewForAxis_("y"+(u?1+u:""))}var k=w.getOption("labelsShowZeroValues");C=w.getOption("labelsSeparateLines");var B=w.getHighlightSeries();for(u=0;u<l.length;u++){var t=l[u];if(t.yval===0&&!k){continue}if(!Dygraph.isOK(t.canvasy)){continue}if(C){r+="<br/>"}var q=w.getPropertiesForSeries(t.name);var n=v[q.axis-1];var y=n("valueFormatter");var e=y(t.yval,n,t.name,w);var h=(t.name==B)?" class='highlight'":"";r+="<span"+h+"> <b><span style='color: "+q.color+";'>"+t.name+"</span></b>:&nbsp;"+e+"</span>"}return r};d=function(s,h,r){var e=(/MSIE/.test(navigator.userAgent)&&!window.opera);if(e){return"&mdash;"}if(!s||s.length<=1){return'<div style="display: inline-block; position: relative; bottom: .5ex; padding-left: 1em; height: 1px; border-bottom: 2px solid '+h+';"></div>'}var l,k,f,o;var g=0,q=0;var p=[];var n;for(l=0;l<=s.length;l++){g+=s[l%s.length]}n=Math.floor(r/(g-s[0]));if(n>1){for(l=0;l<s.length;l++){p[l]=s[l]/r}q=p.length}else{n=1;for(l=0;l<s.length;l++){p[l]=s[l]/g}q=p.length+1}var m="";for(k=0;k<n;k++){for(l=0;l<q;l+=2){f=p[l%p.length];if(l<s.length){o=p[(l+1)%p.length]}else{o=0}m+='<div style="display: inline-block; position: relative; bottom: .5ex; margin-right: '+o+"em; padding-left: "+f+"em; height: 1px; border-bottom: 2px solid "+h+';"></div>'}}return m};return c})();Dygraph.Plugins.RangeSelector=(function(){var a=function(){this.isIE_=/MSIE/.test(navigator.userAgent)&&!window.opera;this.hasTouchInterface_=typeof(TouchEvent)!="undefined";this.isMobileDevice_=/mobile|android/gi.test(navigator.appVersion);this.interfaceCreated_=false};a.prototype.toString=function(){return"RangeSelector Plugin"};a.prototype.activate=function(b){this.dygraph_=b;this.isUsingExcanvas_=b.isUsingExcanvas_;if(this.getOption_("showRangeSelector")){this.createInterface_()}return{layout:this.reserveSpace_,predraw:this.renderStaticLayer_,didDrawChart:this.renderInteractiveLayer_}};a.prototype.destroy=function(){this.bgcanvas_=null;this.fgcanvas_=null;this.leftZoomHandle_=null;this.rightZoomHandle_=null;this.iePanOverlay_=null};a.prototype.getOption_=function(b){return this.dygraph_.getOption(b)};a.prototype.setDefaultOption_=function(b,c){return this.dygraph_.attrs_[b]=c};a.prototype.createInterface_=function(){this.createCanvases_();if(this.isUsingExcanvas_){this.createIEPanOverlay_()}this.createZoomHandles_();this.initInteraction_();if(this.getOption_("animatedZooms")){this.dygraph_.warn("Animated zooms and range selector are not compatible; disabling animatedZooms.");this.dygraph_.updateOptions({animatedZooms:false},true)}this.interfaceCreated_=true;this.addToGraph_()};a.prototype.addToGraph_=function(){var b=this.graphDiv_=this.dygraph_.graphDiv;b.appendChild(this.bgcanvas_);b.appendChild(this.fgcanvas_);b.appendChild(this.leftZoomHandle_);b.appendChild(this.rightZoomHandle_)};a.prototype.removeFromGraph_=function(){var b=this.graphDiv_;b.removeChild(this.bgcanvas_);b.removeChild(this.fgcanvas_);b.removeChild(this.leftZoomHandle_);b.removeChild(this.rightZoomHandle_);this.graphDiv_=null};a.prototype.reserveSpace_=function(b){if(this.getOption_("showRangeSelector")){b.reserveSpaceBottom(this.getOption_("rangeSelectorHeight")+4)}};a.prototype.renderStaticLayer_=function(){if(!this.updateVisibility_()){return}this.resize_();this.drawStaticLayer_()};a.prototype.renderInteractiveLayer_=function(){if(!this.updateVisibility_()||this.isChangingRange_){return}this.placeZoomHandles_();this.drawInteractiveLayer_()};a.prototype.updateVisibility_=function(){var b=this.getOption_("showRangeSelector");if(b){if(!this.interfaceCreated_){this.createInterface_()}else{if(!this.graphDiv_||!this.graphDiv_.parentNode){this.addToGraph_()}}}else{if(this.graphDiv_){this.removeFromGraph_();var c=this.dygraph_;setTimeout(function(){c.width_=0;c.resize()},1)}}return b};a.prototype.resize_=function(){function d(e,f){e.style.top=f.y+"px";e.style.left=f.x+"px";e.width=f.w;e.height=f.h;e.style.width=e.width+"px";e.style.height=e.height+"px"}var c=this.dygraph_.layout_.getPlotArea();var b=0;if(this.getOption_("drawXAxis")){b=this.getOption_("xAxisHeight")||(this.getOption_("axisLabelFontSize")+2*this.getOption_("axisTickSize"))}this.canvasRect_={x:c.x,y:c.y+c.h+b+4,w:c.w,h:this.getOption_("rangeSelectorHeight")};d(this.bgcanvas_,this.canvasRect_);d(this.fgcanvas_,this.canvasRect_)};a.prototype.createCanvases_=function(){this.bgcanvas_=Dygraph.createCanvas();this.bgcanvas_.className="dygraph-rangesel-bgcanvas";this.bgcanvas_.style.position="absolute";this.bgcanvas_.style.zIndex=9;this.bgcanvas_ctx_=Dygraph.getContext(this.bgcanvas_);this.fgcanvas_=Dygraph.createCanvas();this.fgcanvas_.className="dygraph-rangesel-fgcanvas";this.fgcanvas_.style.position="absolute";this.fgcanvas_.style.zIndex=9;this.fgcanvas_.style.cursor="default";this.fgcanvas_ctx_=Dygraph.getContext(this.fgcanvas_)};a.prototype.createIEPanOverlay_=function(){this.iePanOverlay_=document.createElement("div");this.iePanOverlay_.style.position="absolute";this.iePanOverlay_.style.backgroundColor="white";this.iePanOverlay_.style.filter="alpha(opacity=0)";this.iePanOverlay_.style.display="none";this.iePanOverlay_.style.cursor="move";this.fgcanvas_.appendChild(this.iePanOverlay_)};a.prototype.createZoomHandles_=function(){var b=new Image();b.className="dygraph-rangesel-zoomhandle";b.style.position="absolute";b.style.zIndex=10;b.style.visibility="hidden";b.style.cursor="col-resize";if(/MSIE 7/.test(navigator.userAgent)){b.width=7;b.height=14;b.style.backgroundColor="white";b.style.border="1px solid #333333"}else{b.width=9;b.height=16;b.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII="}if(this.isMobileDevice_){b.width*=2;b.height*=2}this.leftZoomHandle_=b;this.rightZoomHandle_=b.cloneNode(false)};a.prototype.initInteraction_=function(){var o=this;var i=this.isIE_?document:window;var u=0;var v=null;var s=false;var d=false;var g=!this.isMobileDevice_&&!this.isUsingExcanvas_;var k=new Dygraph.IFrameTarp();var p,f,r,j,w,h,x,t,q,c,l;var e,n,m;p=function(C){var B=o.dygraph_.xAxisExtremes();var z=(B[1]-B[0])/o.canvasRect_.w;var A=B[0]+(C.leftHandlePos-o.canvasRect_.x)*z;var y=B[0]+(C.rightHandlePos-o.canvasRect_.x)*z;return[A,y]};f=function(y){Dygraph.cancelEvent(y);s=true;u=y.clientX;v=y.target?y.target:y.srcElement;if(y.type==="mousedown"||y.type==="dragstart"){Dygraph.addEvent(i,"mousemove",r);Dygraph.addEvent(i,"mouseup",j)}o.fgcanvas_.style.cursor="col-resize";k.cover();return true};r=function(C){if(!s){return false}Dygraph.cancelEvent(C);var z=C.clientX-u;if(Math.abs(z)<4){return true}u=C.clientX;var B=o.getZoomHandleStatus_();var y;if(v==o.leftZoomHandle_){y=B.leftHandlePos+z;y=Math.min(y,B.rightHandlePos-v.width-3);y=Math.max(y,o.canvasRect_.x)}else{y=B.rightHandlePos+z;y=Math.min(y,o.canvasRect_.x+o.canvasRect_.w);y=Math.max(y,B.leftHandlePos+v.width+3)}var A=v.width/2;v.style.left=(y-A)+"px";o.drawInteractiveLayer_();if(g){w()}return true};j=function(y){if(!s){return false}s=false;k.uncover();Dygraph.removeEvent(i,"mousemove",r);Dygraph.removeEvent(i,"mouseup",j);o.fgcanvas_.style.cursor="default";if(!g){w()}return true};w=function(){try{var z=o.getZoomHandleStatus_();o.isChangingRange_=true;if(!z.isZoomed){o.dygraph_.resetZoom()}else{var y=p(z);o.dygraph_.doZoomXDates_(y[0],y[1])}}finally{o.isChangingRange_=false}};h=function(A){if(o.isUsingExcanvas_){return A.srcElement==o.iePanOverlay_}else{var z=o.leftZoomHandle_.getBoundingClientRect();var y=z.left+z.width/2;z=o.rightZoomHandle_.getBoundingClientRect();var B=z.left+z.width/2;return(A.clientX>y&&A.clientX<B)}};x=function(y){if(!d&&h(y)&&o.getZoomHandleStatus_().isZoomed){Dygraph.cancelEvent(y);d=true;u=y.clientX;if(y.type==="mousedown"){Dygraph.addEvent(i,"mousemove",t);Dygraph.addEvent(i,"mouseup",q)}return true}return false};t=function(C){if(!d){return false}Dygraph.cancelEvent(C);var z=C.clientX-u;if(Math.abs(z)<4){return true}u=C.clientX;var B=o.getZoomHandleStatus_();var E=B.leftHandlePos;var y=B.rightHandlePos;var D=y-E;if(E+z<=o.canvasRect_.x){E=o.canvasRect_.x;y=E+D}else{if(y+z>=o.canvasRect_.x+o.canvasRect_.w){y=o.canvasRect_.x+o.canvasRect_.w;E=y-D}else{E+=z;y+=z}}var A=o.leftZoomHandle_.width/2;o.leftZoomHandle_.style.left=(E-A)+"px";o.rightZoomHandle_.style.left=(y-A)+"px";o.drawInteractiveLayer_();if(g){c()}return true};q=function(y){if(!d){return false}d=false;Dygraph.removeEvent(i,"mousemove",t);Dygraph.removeEvent(i,"mouseup",q);if(!g){c()}return true};c=function(){try{o.isChangingRange_=true;o.dygraph_.dateWindow_=p(o.getZoomHandleStatus_());o.dygraph_.drawGraph_(false)}finally{o.isChangingRange_=false}};l=function(y){if(s||d){return}var z=h(y)?"move":"default";if(z!=o.fgcanvas_.style.cursor){o.fgcanvas_.style.cursor=z}};e=function(y){if(y.type=="touchstart"&&y.targetTouches.length==1){if(f(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{if(y.type=="touchmove"&&y.targetTouches.length==1){if(r(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{j(y)}}};n=function(y){if(y.type=="touchstart"&&y.targetTouches.length==1){if(x(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{if(y.type=="touchmove"&&y.targetTouches.length==1){if(t(y.targetTouches[0])){Dygraph.cancelEvent(y)}}else{q(y)}}};m=function(B,A){var z=["touchstart","touchend","touchmove","touchcancel"];for(var y=0;y<z.length;y++){o.dygraph_.addAndTrackEvent(B,z[y],A)}};this.setDefaultOption_("interactionModel",Dygraph.Interaction.dragIsPanInteractionModel);this.setDefaultOption_("panEdgeFraction",0.0001);var b=window.opera?"mousedown":"dragstart";this.dygraph_.addAndTrackEvent(this.leftZoomHandle_,b,f);this.dygraph_.addAndTrackEvent(this.rightZoomHandle_,b,f);if(this.isUsingExcanvas_){this.dygraph_.addAndTrackEvent(this.iePanOverlay_,"mousedown",x)}else{this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousedown",x);this.dygraph_.addAndTrackEvent(this.fgcanvas_,"mousemove",l)}if(this.hasTouchInterface_){m(this.leftZoomHandle_,e);m(this.rightZoomHandle_,e);m(this.fgcanvas_,n)}};a.prototype.drawStaticLayer_=function(){var b=this.bgcanvas_ctx_;b.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);try{this.drawMiniPlot_()}catch(c){Dygraph.warn(c)}var d=0.5;this.bgcanvas_ctx_.lineWidth=1;b.strokeStyle="gray";b.beginPath();b.moveTo(d,d);b.lineTo(d,this.canvasRect_.h-d);b.lineTo(this.canvasRect_.w-d,this.canvasRect_.h-d);b.lineTo(this.canvasRect_.w-d,d);b.stroke()};a.prototype.drawMiniPlot_=function(){var f=this.getOption_("rangeSelectorPlotFillColor");var r=this.getOption_("rangeSelectorPlotStrokeColor");if(!f&&!r){return}var j=this.getOption_("stepPlot");var v=this.computeCombinedSeriesAndLimits_();var q=v.yMax-v.yMin;var p=this.bgcanvas_ctx_;var n=0.5;var e=this.dygraph_.xAxisExtremes();var o=Math.max(e[1]-e[0],1e-30);var g=(this.canvasRect_.w-n)/o;var u=(this.canvasRect_.h-n)/q;var t=this.canvasRect_.w-n;var b=this.canvasRect_.h-n;var d=null,c=null;p.beginPath();p.moveTo(n,b);for(var s=0;s<v.data.length;s++){var h=v.data[s];var l=((h[0]!==null)?((h[0]-e[0])*g):NaN);var k=((h[1]!==null)?(b-(h[1]-v.yMin)*u):NaN);if(isFinite(l)&&isFinite(k)){if(d===null){p.lineTo(l,b)}else{if(j){p.lineTo(l,c)}}p.lineTo(l,k);d=l;c=k}else{if(d!==null){if(j){p.lineTo(l,c);p.lineTo(l,b)}else{p.lineTo(d,b)}}d=c=null}}p.lineTo(t,b);p.closePath();if(f){var m=this.bgcanvas_ctx_.createLinearGradient(0,0,0,b);m.addColorStop(0,"white");m.addColorStop(1,f);this.bgcanvas_ctx_.fillStyle=m;p.fill()}if(r){this.bgcanvas_ctx_.strokeStyle=r;this.bgcanvas_ctx_.lineWidth=1.5;p.stroke()}};a.prototype.computeCombinedSeriesAndLimits_=function(){var v=this.dygraph_.rawData_;var u=this.getOption_("logscale");var q=[];var d;var h;var m;var t,s,r;var e,g;for(t=0;t<v.length;t++){if(v[t].length>1&&v[t][1]!==null){m=typeof v[t][1]!="number";if(m){d=[];h=[];for(r=0;r<v[t][1].length;r++){d.push(0);h.push(0)}}break}}for(t=0;t<v.length;t++){var l=v[t];e=l[0];if(m){for(r=0;r<d.length;r++){d[r]=h[r]=0}}else{d=h=0}for(s=1;s<l.length;s++){if(this.dygraph_.visibility()[s-1]){var n;if(m){for(r=0;r<d.length;r++){n=l[s][r];if(n===null||isNaN(n)){continue}d[r]+=n;h[r]++}}else{n=l[s];if(n===null||isNaN(n)){continue}d+=n;h++}}}if(m){for(r=0;r<d.length;r++){d[r]/=h[r]}g=d.slice(0)}else{g=d/h}q.push([e,g])}q=this.dygraph_.rollingAverage(q,this.dygraph_.rollPeriod_);if(typeof q[0][1]!="number"){for(t=0;t<q.length;t++){g=q[t][1];q[t][1]=g[0]}}var b=Number.MAX_VALUE;var c=-Number.MAX_VALUE;for(t=0;t<q.length;t++){g=q[t][1];if(g!==null&&isFinite(g)&&(!u||g>0)){b=Math.min(b,g);c=Math.max(c,g)}}var o=0.25;if(u){c=Dygraph.log10(c);c+=c*o;b=Dygraph.log10(b);for(t=0;t<q.length;t++){q[t][1]=Dygraph.log10(q[t][1])}}else{var f;var p=c-b;if(p<=Number.MIN_VALUE){f=c*o}else{f=p*o}c+=f;b-=f}return{data:q,yMin:b,yMax:c}};a.prototype.placeZoomHandles_=function(){var h=this.dygraph_.xAxisExtremes();var b=this.dygraph_.xAxisRange();var c=h[1]-h[0];var j=Math.max(0,(b[0]-h[0])/c);var f=Math.max(0,(h[1]-b[1])/c);var i=this.canvasRect_.x+this.canvasRect_.w*j;var e=this.canvasRect_.x+this.canvasRect_.w*(1-f);var d=Math.max(this.canvasRect_.y,this.canvasRect_.y+(this.canvasRect_.h-this.leftZoomHandle_.height)/2);var g=this.leftZoomHandle_.width/2;this.leftZoomHandle_.style.left=(i-g)+"px";this.leftZoomHandle_.style.top=d+"px";this.rightZoomHandle_.style.left=(e-g)+"px";this.rightZoomHandle_.style.top=this.leftZoomHandle_.style.top;this.leftZoomHandle_.style.visibility="visible";this.rightZoomHandle_.style.visibility="visible"};a.prototype.drawInteractiveLayer_=function(){var c=this.fgcanvas_ctx_;c.clearRect(0,0,this.canvasRect_.w,this.canvasRect_.h);var f=1;var e=this.canvasRect_.w-f;var b=this.canvasRect_.h-f;var h=this.getZoomHandleStatus_();c.strokeStyle="black";if(!h.isZoomed){c.beginPath();c.moveTo(f,f);c.lineTo(f,b);c.lineTo(e,b);c.lineTo(e,f);c.stroke();if(this.iePanOverlay_){this.iePanOverlay_.style.display="none"}}else{var g=Math.max(f,h.leftHandlePos-this.canvasRect_.x);var d=Math.min(e,h.rightHandlePos-this.canvasRect_.x);c.fillStyle="rgba(240, 240, 240, 0.6)";c.fillRect(0,0,g,this.canvasRect_.h);c.fillRect(d,0,this.canvasRect_.w-d,this.canvasRect_.h);c.beginPath();c.moveTo(f,f);c.lineTo(g,f);c.lineTo(g,b);c.lineTo(d,b);c.lineTo(d,f);c.lineTo(e,f);c.stroke();if(this.isUsingExcanvas_){this.iePanOverlay_.style.width=(d-g)+"px";this.iePanOverlay_.style.left=g+"px";this.iePanOverlay_.style.height=b+"px";this.iePanOverlay_.style.display="inline"}}};a.prototype.getZoomHandleStatus_=function(){var c=this.leftZoomHandle_.width/2;var d=parseFloat(this.leftZoomHandle_.style.left)+c;var b=parseFloat(this.rightZoomHandle_.style.left)+c;return{leftHandlePos:d,rightHandlePos:b,isZoomed:(d-1>this.canvasRect_.x||b+1<this.canvasRect_.x+this.canvasRect_.w)}};return a})();Dygraph.PLUGINS.push(Dygraph.Plugins.Legend,Dygraph.Plugins.Axes,Dygraph.Plugins.RangeSelector,Dygraph.Plugins.ChartLabels,Dygraph.Plugins.Annotations,Dygraph.Plugins.Grid); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-dev.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-dev.js
deleted file mode 100644
index c06d23d5..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-dev.js
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-// A dygraph "auto-loader".
-
-// Check where this script was sourced from. If it was sourced from
-// '../dygraph-dev.js', then we should source all the other scripts with the
-// same relative path ('../dygraph.js', '../dygraph-canvas.js', ...)
-(function() {
- var src=document.getElementsByTagName('script');
- var script = src[src.length-1].getAttribute("src");
-
- // This list needs to be kept in sync w/ the one in generate-combined.sh
- // and the one in jsTestDriver.conf.
- var source_files = [
- "strftime/strftime-min.js",
- "rgbcolor/rgbcolor.js",
- "stacktrace.js",
- "dashed-canvas.js",
- "dygraph-options.js",
- "dygraph-layout.js",
- "dygraph-canvas.js",
- "dygraph.js",
- "dygraph-utils.js",
- "dygraph-gviz.js",
- "dygraph-interaction-model.js",
- "dygraph-tickers.js",
- "dygraph-plugin-base.js",
- "plugins/annotations.js",
- "plugins/axes.js",
- "plugins/chart-labels.js",
- "plugins/grid.js",
- "plugins/legend.js",
- "plugins/range-selector.js",
- "dygraph-plugin-install.js",
- "dygraph-options-reference.js" // Shouldn't be included in generate-combined.sh
- ];
-
- for (var i = 0; i < source_files.length; i++) {
- document.write('<script type="text/javascript" src="' + script.replace('dygraph-dev.js', source_files[i]) + '"></script>\n');
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-externs.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-externs.js
deleted file mode 100644
index ed5de4c1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-externs.js
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * @param {Object} dict
- * @return {!Array.<string>}
- */
-function printStackTrace(dict) {}
-
-
-/**
- * @constructor
- */
-function G_vmlCanvasManager() {}
-
-/**
- * @param {!HTMLCanvasElement} canvas
- */
-G_vmlCanvasManager.initElement = function(canvas) {};
-
-// For IE
-/**
- * @param {string} type
- * @param {Object} fn
- */
-Element.prototype.detachEvent = function(type, fn) {};
-
-
-/**
- * @typedef {function(
- * (number|Date),
- * number,
- * function(string):*,
- * (Dygraph|undefined)
- * ):string}
- */
-var AxisLabelFormatter;
-
-
-/**
- * @typedef {function(number,function(string),Dygraph):string}
- */
-var ValueFormatter;
-
-
-/**
- * @typedef {Array.<Array.<string|number|Array.<number>>>}
- */
-var DygraphDataArray;
-
-/**
- * @constructor
- */
-function GVizDataTable() {}
-
-// TODO(danvk): move the Dygraph definitions out of here once I closure-ify dygraphs.js
-/**
- * @param {!HTMLDivElement|string} div
- * @param {DygraphDataArray|
- * GVizDataTable|
- * string|
- * function():(DygraphDataArray|GVizDataTable|string)} file
- * @param {Object} attrs
- * @constructor
- */
-function Dygraph(div, file, attrs) {}
-
-/**
- * @constructor
- */
-function DygraphLayout() {}
-
-/**
- * @type {Array}
- */
-DygraphLayout.prototype.datasets;
-
-// TODO: DygraphOptions should not reach inside Dygraph private data like this.
-/** @type {Object} */
-Dygraph.prototype.attrs_;
-/** @type {Object} */
-Dygraph.prototype.user_attrs_;
-
-/**
- * @type {DygraphLayout}
- */
-Dygraph.prototype.layout_;
-
-/** @type {function(): string} */
-Dygraph.prototype.getHighlightSeries;
-
-/** @type {Array.<{elem:Element,type:string,fn:function(!Event):(boolean|undefined|null)}>} */
-Dygraph.prototype.registeredEvents_;
-
-/** @type {{axes: Object}} */
-Dygraph.DEFAULT_ATTRS;
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-gviz.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-gviz.js
deleted file mode 100644
index 988e0ace..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-gviz.js
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview A wrapper around the Dygraph class which implements the
- * interface for a GViz (aka Google Visualization API) visualization.
- * It is designed to be a drop-in replacement for Google's AnnotatedTimeline,
- * so the documentation at
- * http://code.google.com/apis/chart/interactive/docs/gallery/annotatedtimeline.html
- * translates over directly.
- *
- * For a full demo, see:
- * - http://dygraphs.com/tests/gviz.html
- * - http://dygraphs.com/tests/annotation-gviz.html
- */
-
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-"use strict";
-
-/**
- * A wrapper around Dygraph that implements the gviz API.
- * @param {!HTMLDivElement} container The DOM object the visualization should
- * live in.
- * @constructor
- */
-Dygraph.GVizChart = function(container) {
- this.container = container;
-};
-
-/**
- * @param {GVizDataTable} data
- * @param {Object.<*>} options
- */
-Dygraph.GVizChart.prototype.draw = function(data, options) {
- // Clear out any existing dygraph.
- // TODO(danvk): would it make more sense to simply redraw using the current
- // date_graph object?
- this.container.innerHTML = '';
- if (typeof(this.date_graph) != 'undefined') {
- this.date_graph.destroy();
- }
-
- this.date_graph = new Dygraph(this.container, data, options);
-};
-
-/**
- * Google charts compatible setSelection
- * Only row selection is supported, all points in the row will be highlighted
- * @param {Array.<{row:number}>} selection_array array of the selected cells
- * @public
- */
-Dygraph.GVizChart.prototype.setSelection = function(selection_array) {
- var row = false;
- if (selection_array.length) {
- row = selection_array[0].row;
- }
- this.date_graph.setSelection(row);
-};
-
-/**
- * Google charts compatible getSelection implementation
- * @return {Array.<{row:number,column:number}>} array of the selected cells
- * @public
- */
-Dygraph.GVizChart.prototype.getSelection = function() {
- var selection = [];
-
- var row = this.date_graph.getSelection();
-
- if (row < 0) return selection;
-
- var points = this.date_graph.layout_.points;
- for (var setIdx = 0; setIdx < points.length; ++setIdx) {
- selection.push({row: row, column: setIdx + 1});
- }
-
- return selection;
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-interaction-model.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-interaction-model.js
deleted file mode 100644
index 2af345c7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-interaction-model.js
+++ /dev/null
@@ -1,676 +0,0 @@
-/**
- * @license
- * Copyright 2011 Robert Konigsberg (konigsberg@google.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview The default interaction model for Dygraphs. This is kept out
- * of dygraph.js for better navigability.
- * @author Robert Konigsberg (konigsberg@google.com)
- */
-
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-"use strict";
-
-/**
- * A collection of functions to facilitate build custom interaction models.
- * @class
- */
-Dygraph.Interaction = {};
-
-/**
- * Called in response to an interaction model operation that
- * should start the default panning behavior.
- *
- * It's used in the default callback for "mousedown" operations.
- * Custom interaction model builders can use it to provide the default
- * panning behavior.
- *
- * @param {Event} event the event object which led to the startPan call.
- * @param {Dygraph} g The dygraph on which to act.
- * @param {Object} context The dragging context object (with
- * dragStartX/dragStartY/etc. properties). This function modifies the
- * context.
- */
-Dygraph.Interaction.startPan = function(event, g, context) {
- var i, axis;
- context.isPanning = true;
- var xRange = g.xAxisRange();
- context.dateRange = xRange[1] - xRange[0];
- context.initialLeftmostDate = xRange[0];
- context.xUnitsPerPixel = context.dateRange / (g.plotter_.area.w - 1);
-
- if (g.attr_("panEdgeFraction")) {
- var maxXPixelsToDraw = g.width_ * g.attr_("panEdgeFraction");
- var xExtremes = g.xAxisExtremes(); // I REALLY WANT TO CALL THIS xTremes!
-
- var boundedLeftX = g.toDomXCoord(xExtremes[0]) - maxXPixelsToDraw;
- var boundedRightX = g.toDomXCoord(xExtremes[1]) + maxXPixelsToDraw;
-
- var boundedLeftDate = g.toDataXCoord(boundedLeftX);
- var boundedRightDate = g.toDataXCoord(boundedRightX);
- context.boundedDates = [boundedLeftDate, boundedRightDate];
-
- var boundedValues = [];
- var maxYPixelsToDraw = g.height_ * g.attr_("panEdgeFraction");
-
- for (i = 0; i < g.axes_.length; i++) {
- axis = g.axes_[i];
- var yExtremes = axis.extremeRange;
-
- var boundedTopY = g.toDomYCoord(yExtremes[0], i) + maxYPixelsToDraw;
- var boundedBottomY = g.toDomYCoord(yExtremes[1], i) - maxYPixelsToDraw;
-
- var boundedTopValue = g.toDataYCoord(boundedTopY, i);
- var boundedBottomValue = g.toDataYCoord(boundedBottomY, i);
-
- boundedValues[i] = [boundedTopValue, boundedBottomValue];
- }
- context.boundedValues = boundedValues;
- }
-
- // Record the range of each y-axis at the start of the drag.
- // If any axis has a valueRange or valueWindow, then we want a 2D pan.
- // We can't store data directly in g.axes_, because it does not belong to us
- // and could change out from under us during a pan (say if there's a data
- // update).
- context.is2DPan = false;
- context.axes = [];
- for (i = 0; i < g.axes_.length; i++) {
- axis = g.axes_[i];
- var axis_data = {};
- var yRange = g.yAxisRange(i);
- // TODO(konigsberg): These values should be in |context|.
- // In log scale, initialTopValue, dragValueRange and unitsPerPixel are log scale.
- var logscale = g.attributes_.getForAxis("logscale", i);
- if (logscale) {
- axis_data.initialTopValue = Dygraph.log10(yRange[1]);
- axis_data.dragValueRange = Dygraph.log10(yRange[1]) - Dygraph.log10(yRange[0]);
- } else {
- axis_data.initialTopValue = yRange[1];
- axis_data.dragValueRange = yRange[1] - yRange[0];
- }
- axis_data.unitsPerPixel = axis_data.dragValueRange / (g.plotter_.area.h - 1);
- context.axes.push(axis_data);
-
- // While calculating axes, set 2dpan.
- if (axis.valueWindow || axis.valueRange) context.is2DPan = true;
- }
-};
-
-/**
- * Called in response to an interaction model operation that
- * responds to an event that pans the view.
- *
- * It's used in the default callback for "mousemove" operations.
- * Custom interaction model builders can use it to provide the default
- * panning behavior.
- *
- * @param {Event} event the event object which led to the movePan call.
- * @param {Dygraph} g The dygraph on which to act.
- * @param {Object} context The dragging context object (with
- * dragStartX/dragStartY/etc. properties). This function modifies the
- * context.
- */
-Dygraph.Interaction.movePan = function(event, g, context) {
- context.dragEndX = g.dragGetX_(event, context);
- context.dragEndY = g.dragGetY_(event, context);
-
- var minDate = context.initialLeftmostDate -
- (context.dragEndX - context.dragStartX) * context.xUnitsPerPixel;
- if (context.boundedDates) {
- minDate = Math.max(minDate, context.boundedDates[0]);
- }
- var maxDate = minDate + context.dateRange;
- if (context.boundedDates) {
- if (maxDate > context.boundedDates[1]) {
- // Adjust minDate, and recompute maxDate.
- minDate = minDate - (maxDate - context.boundedDates[1]);
- maxDate = minDate + context.dateRange;
- }
- }
-
- g.dateWindow_ = [minDate, maxDate];
-
- // y-axis scaling is automatic unless this is a full 2D pan.
- if (context.is2DPan) {
-
- var pixelsDragged = context.dragEndY - context.dragStartY;
-
- // Adjust each axis appropriately.
- for (var i = 0; i < g.axes_.length; i++) {
- var axis = g.axes_[i];
- var axis_data = context.axes[i];
- var unitsDragged = pixelsDragged * axis_data.unitsPerPixel;
-
- var boundedValue = context.boundedValues ? context.boundedValues[i] : null;
-
- // In log scale, maxValue and minValue are the logs of those values.
- var maxValue = axis_data.initialTopValue + unitsDragged;
- if (boundedValue) {
- maxValue = Math.min(maxValue, boundedValue[1]);
- }
- var minValue = maxValue - axis_data.dragValueRange;
- if (boundedValue) {
- if (minValue < boundedValue[0]) {
- // Adjust maxValue, and recompute minValue.
- maxValue = maxValue - (minValue - boundedValue[0]);
- minValue = maxValue - axis_data.dragValueRange;
- }
- }
- var logscale = g.attributes_.getForAxis("logscale", i);
- if (logscale) {
- axis.valueWindow = [ Math.pow(Dygraph.LOG_SCALE, minValue),
- Math.pow(Dygraph.LOG_SCALE, maxValue) ];
- } else {
- axis.valueWindow = [ minValue, maxValue ];
- }
- }
- }
-
- g.drawGraph_(false);
-};
-
-/**
- * Called in response to an interaction model operation that
- * responds to an event that ends panning.
- *
- * It's used in the default callback for "mouseup" operations.
- * Custom interaction model builders can use it to provide the default
- * panning behavior.
- *
- * @param {Event} event the event object which led to the endPan call.
- * @param {Dygraph} g The dygraph on which to act.
- * @param {Object} context The dragging context object (with
- * dragStartX/dragStartY/etc. properties). This function modifies the
- * context.
- */
-Dygraph.Interaction.endPan = function(event, g, context) {
- context.dragEndX = g.dragGetX_(event, context);
- context.dragEndY = g.dragGetY_(event, context);
-
- var regionWidth = Math.abs(context.dragEndX - context.dragStartX);
- var regionHeight = Math.abs(context.dragEndY - context.dragStartY);
-
- if (regionWidth < 2 && regionHeight < 2 &&
- g.lastx_ !== undefined && g.lastx_ != -1) {
- Dygraph.Interaction.treatMouseOpAsClick(g, event, context);
- }
-
- // TODO(konigsberg): mouseup should just delete the
- // context object, and mousedown should create a new one.
- context.isPanning = false;
- context.is2DPan = false;
- context.initialLeftmostDate = null;
- context.dateRange = null;
- context.valueRange = null;
- context.boundedDates = null;
- context.boundedValues = null;
- context.axes = null;
-};
-
-/**
- * Called in response to an interaction model operation that
- * responds to an event that starts zooming.
- *
- * It's used in the default callback for "mousedown" operations.
- * Custom interaction model builders can use it to provide the default
- * zooming behavior.
- *
- * @param {Event} event the event object which led to the startZoom call.
- * @param {Dygraph} g The dygraph on which to act.
- * @param {Object} context The dragging context object (with
- * dragStartX/dragStartY/etc. properties). This function modifies the
- * context.
- */
-Dygraph.Interaction.startZoom = function(event, g, context) {
- context.isZooming = true;
- context.zoomMoved = false;
-};
-
-/**
- * Called in response to an interaction model operation that
- * responds to an event that defines zoom boundaries.
- *
- * It's used in the default callback for "mousemove" operations.
- * Custom interaction model builders can use it to provide the default
- * zooming behavior.
- *
- * @param {Event} event the event object which led to the moveZoom call.
- * @param {Dygraph} g The dygraph on which to act.
- * @param {Object} context The dragging context object (with
- * dragStartX/dragStartY/etc. properties). This function modifies the
- * context.
- */
-Dygraph.Interaction.moveZoom = function(event, g, context) {
- context.zoomMoved = true;
- context.dragEndX = g.dragGetX_(event, context);
- context.dragEndY = g.dragGetY_(event, context);
-
- var xDelta = Math.abs(context.dragStartX - context.dragEndX);
- var yDelta = Math.abs(context.dragStartY - context.dragEndY);
-
- // drag direction threshold for y axis is twice as large as x axis
- context.dragDirection = (xDelta < yDelta / 2) ? Dygraph.VERTICAL : Dygraph.HORIZONTAL;
-
- g.drawZoomRect_(
- context.dragDirection,
- context.dragStartX,
- context.dragEndX,
- context.dragStartY,
- context.dragEndY,
- context.prevDragDirection,
- context.prevEndX,
- context.prevEndY);
-
- context.prevEndX = context.dragEndX;
- context.prevEndY = context.dragEndY;
- context.prevDragDirection = context.dragDirection;
-};
-
-/**
- * @param {Dygraph} g
- * @param {Event} event
- * @param {Object} context
- */
-Dygraph.Interaction.treatMouseOpAsClick = function(g, event, context) {
- var clickCallback = g.attr_('clickCallback');
- var pointClickCallback = g.attr_('pointClickCallback');
-
- var selectedPoint = null;
-
- // Find out if the click occurs on a point. This only matters if there's a
- // pointClickCallback.
- if (pointClickCallback) {
- var closestIdx = -1;
- var closestDistance = Number.MAX_VALUE;
-
- // check if the click was on a particular point.
- for (var i = 0; i < g.selPoints_.length; i++) {
- var p = g.selPoints_[i];
- var distance = Math.pow(p.canvasx - context.dragEndX, 2) +
- Math.pow(p.canvasy - context.dragEndY, 2);
- if (!isNaN(distance) &&
- (closestIdx == -1 || distance < closestDistance)) {
- closestDistance = distance;
- closestIdx = i;
- }
- }
-
- // Allow any click within two pixels of the dot.
- var radius = g.attr_('highlightCircleSize') + 2;
- if (closestDistance <= radius * radius) {
- selectedPoint = g.selPoints_[closestIdx];
- }
- }
-
- if (selectedPoint) {
- pointClickCallback(event, selectedPoint);
- }
-
- // TODO(danvk): pass along more info about the points, e.g. 'x'
- if (clickCallback) {
- clickCallback(event, g.lastx_, g.selPoints_);
- }
-};
-
-/**
- * Called in response to an interaction model operation that
- * responds to an event that performs a zoom based on previously defined
- * bounds..
- *
- * It's used in the default callback for "mouseup" operations.
- * Custom interaction model builders can use it to provide the default
- * zooming behavior.
- *
- * @param {Event} event the event object which led to the endZoom call.
- * @param {Dygraph} g The dygraph on which to end the zoom.
- * @param {Object} context The dragging context object (with
- * dragStartX/dragStartY/etc. properties). This function modifies the
- * context.
- */
-Dygraph.Interaction.endZoom = function(event, g, context) {
- context.isZooming = false;
- context.dragEndX = g.dragGetX_(event, context);
- context.dragEndY = g.dragGetY_(event, context);
- var regionWidth = Math.abs(context.dragEndX - context.dragStartX);
- var regionHeight = Math.abs(context.dragEndY - context.dragStartY);
-
- if (regionWidth < 2 && regionHeight < 2 &&
- g.lastx_ !== undefined && g.lastx_ != -1) {
- Dygraph.Interaction.treatMouseOpAsClick(g, event, context);
- }
-
- // The zoom rectangle is visibly clipped to the plot area, so its behavior
- // should be as well.
- // See http://code.google.com/p/dygraphs/issues/detail?id=280
- var plotArea = g.getArea();
- if (regionWidth >= 10 && context.dragDirection == Dygraph.HORIZONTAL) {
- var left = Math.min(context.dragStartX, context.dragEndX),
- right = Math.max(context.dragStartX, context.dragEndX);
- left = Math.max(left, plotArea.x);
- right = Math.min(right, plotArea.x + plotArea.w);
- if (left < right) {
- g.doZoomX_(left, right);
- }
- context.cancelNextDblclick = true;
- } else if (regionHeight >= 10 && context.dragDirection == Dygraph.VERTICAL) {
- var top = Math.min(context.dragStartY, context.dragEndY),
- bottom = Math.max(context.dragStartY, context.dragEndY);
- top = Math.max(top, plotArea.y);
- bottom = Math.min(bottom, plotArea.y + plotArea.h);
- if (top < bottom) {
- g.doZoomY_(top, bottom);
- }
- context.cancelNextDblclick = true;
- } else {
- if (context.zoomMoved) g.clearZoomRect_();
- }
- context.dragStartX = null;
- context.dragStartY = null;
-};
-
-/**
- * @private
- */
-Dygraph.Interaction.startTouch = function(event, g, context) {
- event.preventDefault(); // touch browsers are all nice.
- if (event.touches.length > 1) {
- // If the user ever puts two fingers down, it's not a double tap.
- context.startTimeForDoubleTapMs = null;
- }
-
- var touches = [];
- for (var i = 0; i < event.touches.length; i++) {
- var t = event.touches[i];
- // we dispense with 'dragGetX_' because all touchBrowsers support pageX
- touches.push({
- pageX: t.pageX,
- pageY: t.pageY,
- dataX: g.toDataXCoord(t.pageX),
- dataY: g.toDataYCoord(t.pageY)
- // identifier: t.identifier
- });
- }
- context.initialTouches = touches;
-
- if (touches.length == 1) {
- // This is just a swipe.
- context.initialPinchCenter = touches[0];
- context.touchDirections = { x: true, y: true };
- } else if (touches.length >= 2) {
- // It's become a pinch!
- // In case there are 3+ touches, we ignore all but the "first" two.
-
- // only screen coordinates can be averaged (data coords could be log scale).
- context.initialPinchCenter = {
- pageX: 0.5 * (touches[0].pageX + touches[1].pageX),
- pageY: 0.5 * (touches[0].pageY + touches[1].pageY),
-
- // TODO(danvk): remove
- dataX: 0.5 * (touches[0].dataX + touches[1].dataX),
- dataY: 0.5 * (touches[0].dataY + touches[1].dataY)
- };
-
- // Make pinches in a 45-degree swath around either axis 1-dimensional zooms.
- var initialAngle = 180 / Math.PI * Math.atan2(
- context.initialPinchCenter.pageY - touches[0].pageY,
- touches[0].pageX - context.initialPinchCenter.pageX);
-
- // use symmetry to get it into the first quadrant.
- initialAngle = Math.abs(initialAngle);
- if (initialAngle > 90) initialAngle = 90 - initialAngle;
-
- context.touchDirections = {
- x: (initialAngle < (90 - 45/2)),
- y: (initialAngle > 45/2)
- };
- }
-
- // save the full x & y ranges.
- context.initialRange = {
- x: g.xAxisRange(),
- y: g.yAxisRange()
- };
-};
-
-/**
- * @private
- */
-Dygraph.Interaction.moveTouch = function(event, g, context) {
- // If the tap moves, then it's definitely not part of a double-tap.
- context.startTimeForDoubleTapMs = null;
-
- var i, touches = [];
- for (i = 0; i < event.touches.length; i++) {
- var t = event.touches[i];
- touches.push({
- pageX: t.pageX,
- pageY: t.pageY
- });
- }
- var initialTouches = context.initialTouches;
-
- var c_now;
-
- // old and new centers.
- var c_init = context.initialPinchCenter;
- if (touches.length == 1) {
- c_now = touches[0];
- } else {
- c_now = {
- pageX: 0.5 * (touches[0].pageX + touches[1].pageX),
- pageY: 0.5 * (touches[0].pageY + touches[1].pageY)
- };
- }
-
- // this is the "swipe" component
- // we toss it out for now, but could use it in the future.
- var swipe = {
- pageX: c_now.pageX - c_init.pageX,
- pageY: c_now.pageY - c_init.pageY
- };
- var dataWidth = context.initialRange.x[1] - context.initialRange.x[0];
- var dataHeight = context.initialRange.y[0] - context.initialRange.y[1];
- swipe.dataX = (swipe.pageX / g.plotter_.area.w) * dataWidth;
- swipe.dataY = (swipe.pageY / g.plotter_.area.h) * dataHeight;
- var xScale, yScale;
-
- // The residual bits are usually split into scale & rotate bits, but we split
- // them into x-scale and y-scale bits.
- if (touches.length == 1) {
- xScale = 1.0;
- yScale = 1.0;
- } else if (touches.length >= 2) {
- var initHalfWidth = (initialTouches[1].pageX - c_init.pageX);
- xScale = (touches[1].pageX - c_now.pageX) / initHalfWidth;
-
- var initHalfHeight = (initialTouches[1].pageY - c_init.pageY);
- yScale = (touches[1].pageY - c_now.pageY) / initHalfHeight;
- }
-
- // Clip scaling to [1/8, 8] to prevent too much blowup.
- xScale = Math.min(8, Math.max(0.125, xScale));
- yScale = Math.min(8, Math.max(0.125, yScale));
-
- var didZoom = false;
- if (context.touchDirections.x) {
- g.dateWindow_ = [
- c_init.dataX - swipe.dataX + (context.initialRange.x[0] - c_init.dataX) / xScale,
- c_init.dataX - swipe.dataX + (context.initialRange.x[1] - c_init.dataX) / xScale
- ];
- didZoom = true;
- }
-
- if (context.touchDirections.y) {
- for (i = 0; i < 1 /*g.axes_.length*/; i++) {
- var axis = g.axes_[i];
- var logscale = g.attributes_.getForAxis("logscale", i);
- if (logscale) {
- // TODO(danvk): implement
- } else {
- axis.valueWindow = [
- c_init.dataY - swipe.dataY + (context.initialRange.y[0] - c_init.dataY) / yScale,
- c_init.dataY - swipe.dataY + (context.initialRange.y[1] - c_init.dataY) / yScale
- ];
- didZoom = true;
- }
- }
- }
-
- g.drawGraph_(false);
-
- // We only call zoomCallback on zooms, not pans, to mirror desktop behavior.
- if (didZoom && touches.length > 1 && g.attr_('zoomCallback')) {
- var viewWindow = g.xAxisRange();
- g.attr_("zoomCallback")(viewWindow[0], viewWindow[1], g.yAxisRanges());
- }
-};
-
-/**
- * @private
- */
-Dygraph.Interaction.endTouch = function(event, g, context) {
- if (event.touches.length !== 0) {
- // this is effectively a "reset"
- Dygraph.Interaction.startTouch(event, g, context);
- } else if (event.changedTouches.length == 1) {
- // Could be part of a "double tap"
- // The heuristic here is that it's a double-tap if the two touchend events
- // occur within 500ms and within a 50x50 pixel box.
- var now = new Date().getTime();
- var t = event.changedTouches[0];
- if (context.startTimeForDoubleTapMs &&
- now - context.startTimeForDoubleTapMs < 500 &&
- context.doubleTapX && Math.abs(context.doubleTapX - t.screenX) < 50 &&
- context.doubleTapY && Math.abs(context.doubleTapY - t.screenY) < 50) {
- g.resetZoom();
- } else {
- context.startTimeForDoubleTapMs = now;
- context.doubleTapX = t.screenX;
- context.doubleTapY = t.screenY;
- }
- }
-};
-
-/**
- * Default interation model for dygraphs. You can refer to specific elements of
- * this when constructing your own interaction model, e.g.:
- * g.updateOptions( {
- * interactionModel: {
- * mousedown: Dygraph.defaultInteractionModel.mousedown
- * }
- * } );
- */
-Dygraph.Interaction.defaultModel = {
- // Track the beginning of drag events
- mousedown: function(event, g, context) {
- // Right-click should not initiate a zoom.
- if (event.button && event.button == 2) return;
-
- context.initializeMouseDown(event, g, context);
-
- if (event.altKey || event.shiftKey) {
- Dygraph.startPan(event, g, context);
- } else {
- Dygraph.startZoom(event, g, context);
- }
- },
-
- // Draw zoom rectangles when the mouse is down and the user moves around
- mousemove: function(event, g, context) {
- if (context.isZooming) {
- Dygraph.moveZoom(event, g, context);
- } else if (context.isPanning) {
- Dygraph.movePan(event, g, context);
- }
- },
-
- mouseup: function(event, g, context) {
- if (context.isZooming) {
- Dygraph.endZoom(event, g, context);
- } else if (context.isPanning) {
- Dygraph.endPan(event, g, context);
- }
- },
-
- touchstart: function(event, g, context) {
- Dygraph.Interaction.startTouch(event, g, context);
- },
- touchmove: function(event, g, context) {
- Dygraph.Interaction.moveTouch(event, g, context);
- },
- touchend: function(event, g, context) {
- Dygraph.Interaction.endTouch(event, g, context);
- },
-
- // Temporarily cancel the dragging event when the mouse leaves the graph
- mouseout: function(event, g, context) {
- if (context.isZooming) {
- context.dragEndX = null;
- context.dragEndY = null;
- g.clearZoomRect_();
- }
- },
-
- // Disable zooming out if panning.
- dblclick: function(event, g, context) {
- if (context.cancelNextDblclick) {
- context.cancelNextDblclick = false;
- return;
- }
- if (event.altKey || event.shiftKey) {
- return;
- }
- g.resetZoom();
- }
-};
-
-Dygraph.DEFAULT_ATTRS.interactionModel = Dygraph.Interaction.defaultModel;
-
-// old ways of accessing these methods/properties
-Dygraph.defaultInteractionModel = Dygraph.Interaction.defaultModel;
-Dygraph.endZoom = Dygraph.Interaction.endZoom;
-Dygraph.moveZoom = Dygraph.Interaction.moveZoom;
-Dygraph.startZoom = Dygraph.Interaction.startZoom;
-Dygraph.endPan = Dygraph.Interaction.endPan;
-Dygraph.movePan = Dygraph.Interaction.movePan;
-Dygraph.startPan = Dygraph.Interaction.startPan;
-
-Dygraph.Interaction.nonInteractiveModel_ = {
- mousedown: function(event, g, context) {
- context.initializeMouseDown(event, g, context);
- },
- mouseup: function(event, g, context) {
- // TODO(danvk): this logic is repeated in Dygraph.Interaction.endZoom
- context.dragEndX = g.dragGetX_(event, context);
- context.dragEndY = g.dragGetY_(event, context);
- var regionWidth = Math.abs(context.dragEndX - context.dragStartX);
- var regionHeight = Math.abs(context.dragEndY - context.dragStartY);
-
- if (regionWidth < 2 && regionHeight < 2 &&
- g.lastx_ !== undefined && g.lastx_ != -1) {
- Dygraph.Interaction.treatMouseOpAsClick(g, event, context);
- }
- }
-};
-
-// Default interaction model when using the range selector.
-Dygraph.Interaction.dragIsPanInteractionModel = {
- mousedown: function(event, g, context) {
- context.initializeMouseDown(event, g, context);
- Dygraph.startPan(event, g, context);
- },
- mousemove: function(event, g, context) {
- if (context.isPanning) {
- Dygraph.movePan(event, g, context);
- }
- },
- mouseup: function(event, g, context) {
- if (context.isPanning) {
- Dygraph.endPan(event, g, context);
- }
- }
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-layout.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-layout.js
deleted file mode 100644
index e766e8f5..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-layout.js
+++ /dev/null
@@ -1,349 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview Based on PlotKitLayout, but modified to meet the needs of
- * dygraphs.
- */
-
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-"use strict";
-
-/**
- * Creates a new DygraphLayout object.
- *
- * This class contains all the data to be charted.
- * It uses data coordinates, but also records the chart range (in data
- * coordinates) and hence is able to calculate percentage positions ('In this
- * view, Point A lies 25% down the x-axis.')
- *
- * Two things that it does not do are:
- * 1. Record pixel coordinates for anything.
- * 2. (oddly) determine anything about the layout of chart elements.
- *
- * The naming is a vestige of Dygraph's original PlotKit roots.
- *
- * @constructor
- */
-var DygraphLayout = function(dygraph) {
- this.dygraph_ = dygraph;
- /**
- * Array of points for each series.
- *
- * [series index][row index in series] = |Point| structure,
- * where series index refers to visible series only, and the
- * point index is for the reduced set of points for the current
- * zoom region (including one point just outside the window).
- * All points in the same row index share the same X value.
- *
- * @type {Array.<Array.<Dygraph.PointType>>}
- */
- this.points = [];
- this.setNames = [];
- this.annotations = [];
- this.yAxes_ = null;
-
- // TODO(danvk): it's odd that xTicks_ and yTicks_ are inputs, but xticks and
- // yticks are outputs. Clean this up.
- this.xTicks_ = null;
- this.yTicks_ = null;
-};
-
-DygraphLayout.prototype.attr_ = function(name) {
- return this.dygraph_.attr_(name);
-};
-
-/**
- * Add points for a single series.
- *
- * @param {string} setname Name of the series.
- * @param {Array.<Dygraph.PointType>} set_xy Points for the series.
- */
-DygraphLayout.prototype.addDataset = function(setname, set_xy) {
- this.points.push(set_xy);
- this.setNames.push(setname);
-};
-
-/**
- * Returns the box which the chart should be drawn in. This is the canvas's
- * box, less space needed for the axis and chart labels.
- *
- * @return {{x: number, y: number, w: number, h: number}}
- */
-DygraphLayout.prototype.getPlotArea = function() {
- return this.area_;
-};
-
-// Compute the box which the chart should be drawn in. This is the canvas's
-// box, less space needed for axis, chart labels, and other plug-ins.
-// NOTE: This should only be called by Dygraph.predraw_().
-DygraphLayout.prototype.computePlotArea = function() {
- var area = {
- // TODO(danvk): per-axis setting.
- x: 0,
- y: 0
- };
-
- area.w = this.dygraph_.width_ - area.x - this.attr_('rightGap');
- area.h = this.dygraph_.height_;
-
- // Let plugins reserve space.
- var e = {
- chart_div: this.dygraph_.graphDiv,
- reserveSpaceLeft: function(px) {
- var r = {
- x: area.x,
- y: area.y,
- w: px,
- h: area.h
- };
- area.x += px;
- area.w -= px;
- return r;
- },
- reserveSpaceRight: function(px) {
- var r = {
- x: area.x + area.w - px,
- y: area.y,
- w: px,
- h: area.h
- };
- area.w -= px;
- return r;
- },
- reserveSpaceTop: function(px) {
- var r = {
- x: area.x,
- y: area.y,
- w: area.w,
- h: px
- };
- area.y += px;
- area.h -= px;
- return r;
- },
- reserveSpaceBottom: function(px) {
- var r = {
- x: area.x,
- y: area.y + area.h - px,
- w: area.w,
- h: px
- };
- area.h -= px;
- return r;
- },
- chartRect: function() {
- return {x:area.x, y:area.y, w:area.w, h:area.h};
- }
- };
- this.dygraph_.cascadeEvents_('layout', e);
-
- this.area_ = area;
-};
-
-DygraphLayout.prototype.setAnnotations = function(ann) {
- // The Dygraph object's annotations aren't parsed. We parse them here and
- // save a copy. If there is no parser, then the user must be using raw format.
- this.annotations = [];
- var parse = this.attr_('xValueParser') || function(x) { return x; };
- for (var i = 0; i < ann.length; i++) {
- var a = {};
- if (!ann[i].xval && ann[i].x === undefined) {
- this.dygraph_.error("Annotations must have an 'x' property");
- return;
- }
- if (ann[i].icon &&
- !(ann[i].hasOwnProperty('width') &&
- ann[i].hasOwnProperty('height'))) {
- this.dygraph_.error("Must set width and height when setting " +
- "annotation.icon property");
- return;
- }
- Dygraph.update(a, ann[i]);
- if (!a.xval) a.xval = parse(a.x);
- this.annotations.push(a);
- }
-};
-
-DygraphLayout.prototype.setXTicks = function(xTicks) {
- this.xTicks_ = xTicks;
-};
-
-// TODO(danvk): add this to the Dygraph object's API or move it into Layout.
-DygraphLayout.prototype.setYAxes = function (yAxes) {
- this.yAxes_ = yAxes;
-};
-
-DygraphLayout.prototype.evaluate = function() {
- this._evaluateLimits();
- this._evaluateLineCharts();
- this._evaluateLineTicks();
- this._evaluateAnnotations();
-};
-
-DygraphLayout.prototype._evaluateLimits = function() {
- var xlimits = this.dygraph_.xAxisRange();
- this.minxval = xlimits[0];
- this.maxxval = xlimits[1];
- var xrange = xlimits[1] - xlimits[0];
- this.xscale = (xrange !== 0 ? 1 / xrange : 1.0);
-
- for (var i = 0; i < this.yAxes_.length; i++) {
- var axis = this.yAxes_[i];
- axis.minyval = axis.computedValueRange[0];
- axis.maxyval = axis.computedValueRange[1];
- axis.yrange = axis.maxyval - axis.minyval;
- axis.yscale = (axis.yrange !== 0 ? 1.0 / axis.yrange : 1.0);
-
- if (axis.g.attr_("logscale")) {
- axis.ylogrange = Dygraph.log10(axis.maxyval) - Dygraph.log10(axis.minyval);
- axis.ylogscale = (axis.ylogrange !== 0 ? 1.0 / axis.ylogrange : 1.0);
- if (!isFinite(axis.ylogrange) || isNaN(axis.ylogrange)) {
- axis.g.error('axis ' + i + ' of graph at ' + axis.g +
- ' can\'t be displayed in log scale for range [' +
- axis.minyval + ' - ' + axis.maxyval + ']');
- }
- }
- }
-};
-
-DygraphLayout._calcYNormal = function(axis, value, logscale) {
- if (logscale) {
- return 1.0 - ((Dygraph.log10(value) - Dygraph.log10(axis.minyval)) * axis.ylogscale);
- } else {
- return 1.0 - ((value - axis.minyval) * axis.yscale);
- }
-};
-
-DygraphLayout.prototype._evaluateLineCharts = function() {
- var connectSeparated = this.attr_('connectSeparatedPoints');
- var isStacked = this.attr_("stackedGraph");
- var hasBars = this.attr_('errorBars') || this.attr_('customBars');
-
- for (var setIdx = 0; setIdx < this.points.length; setIdx++) {
- var points = this.points[setIdx];
- var setName = this.setNames[setIdx];
- var axis = this.dygraph_.axisPropertiesForSeries(setName);
- // TODO (konigsberg): use optionsForAxis instead.
- var logscale = this.dygraph_.attributes_.getForSeries("logscale", setName);
-
- for (var j = 0; j < points.length; j++) {
- var point = points[j];
-
- // Range from 0-1 where 0 represents left and 1 represents right.
- point.x = (point.xval - this.minxval) * this.xscale;
- // Range from 0-1 where 0 represents top and 1 represents bottom
- var yval = point.yval;
- if (isStacked) {
- point.y_stacked = DygraphLayout._calcYNormal(
- axis, point.yval_stacked, logscale);
- if (yval !== null && !isNaN(yval)) {
- yval = point.yval_stacked;
- }
- }
- if (yval === null) {
- yval = NaN;
- if (!connectSeparated) {
- point.yval = NaN;
- }
- }
- point.y = DygraphLayout._calcYNormal(axis, yval, logscale);
-
- if (hasBars) {
- point.y_top = DygraphLayout._calcYNormal(
- axis, yval - point.yval_minus, logscale);
- point.y_bottom = DygraphLayout._calcYNormal(
- axis, yval + point.yval_plus, logscale);
- }
- }
- }
-};
-
-/**
- * Optimized replacement for parseFloat, which was way too slow when almost
- * all values were type number, with few edge cases, none of which were strings.
- */
-DygraphLayout.parseFloat_ = function(val) {
- // parseFloat(null) is NaN
- if (val === null) {
- return NaN;
- }
-
- // Assume it's a number or NaN. If it's something else, I'll be shocked.
- return val;
-};
-
-DygraphLayout.prototype._evaluateLineTicks = function() {
- var i, tick, label, pos;
- this.xticks = [];
- for (i = 0; i < this.xTicks_.length; i++) {
- tick = this.xTicks_[i];
- label = tick.label;
- pos = this.xscale * (tick.v - this.minxval);
- if ((pos >= 0.0) && (pos <= 1.0)) {
- this.xticks.push([pos, label]);
- }
- }
-
- this.yticks = [];
- for (i = 0; i < this.yAxes_.length; i++ ) {
- var axis = this.yAxes_[i];
- for (var j = 0; j < axis.ticks.length; j++) {
- tick = axis.ticks[j];
- label = tick.label;
- pos = this.dygraph_.toPercentYCoord(tick.v, i);
- if ((pos >= 0.0) && (pos <= 1.0)) {
- this.yticks.push([i, pos, label]);
- }
- }
- }
-};
-
-DygraphLayout.prototype._evaluateAnnotations = function() {
- // Add the annotations to the point to which they belong.
- // Make a map from (setName, xval) to annotation for quick lookups.
- var i;
- var annotations = {};
- for (i = 0; i < this.annotations.length; i++) {
- var a = this.annotations[i];
- annotations[a.xval + "," + a.series] = a;
- }
-
- this.annotated_points = [];
-
- // Exit the function early if there are no annotations.
- if (!this.annotations || !this.annotations.length) {
- return;
- }
-
- // TODO(antrob): loop through annotations not points.
- for (var setIdx = 0; setIdx < this.points.length; setIdx++) {
- var points = this.points[setIdx];
- for (i = 0; i < points.length; i++) {
- var p = points[i];
- var k = p.xval + "," + p.name;
- if (k in annotations) {
- p.annotation = annotations[k];
- this.annotated_points.push(p);
- }
- }
- }
-};
-
-/**
- * Convenience function to remove all the data sets from a graph
- */
-DygraphLayout.prototype.removeAllDatasets = function() {
- delete this.points;
- delete this.setNames;
- delete this.setPointsLengths;
- delete this.setPointsOffsets;
- this.points = [];
- this.setNames = [];
- this.setPointsLengths = [];
- this.setPointsOffsets = [];
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options-reference.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options-reference.js
deleted file mode 100644
index 64e738d4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options-reference.js
+++ /dev/null
@@ -1,867 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-
-// NOTE: in addition to parsing as JS, this snippet is expected to be valid
-// JSON. This assumption cannot be checked in JS, but it will be checked when
-// documentation is generated by the generate-documentation.py script. For the
-// most part, this just means that you should always use double quotes.
-Dygraph.OPTIONS_REFERENCE = // <JSON>
-{
- "xValueParser": {
- "default": "parseFloat() or Date.parse()*",
- "labels": ["CSV parsing"],
- "type": "function(str) -> number",
- "description": "A function which parses x-values (i.e. the dependent series). Must return a number, even when the values are dates. In this case, millis since epoch are used. This is used primarily for parsing CSV data. *=Dygraphs is slightly more accepting in the dates which it will parse. See code for details."
- },
- "stackedGraph": {
- "default": "false",
- "labels": ["Data Line display"],
- "type": "boolean",
- "description": "If set, stack series on top of one another rather than drawing them independently. The first series specified in the input data will wind up on top of the chart and the last will be on bottom. NaN values are drawn as white areas without a line on top, see stackedGraphNaNFill for details."
- },
- "stackedGraphNaNFill": {
- "default": "all",
- "labels": ["Data Line display"],
- "type": "string",
- "description": "Controls handling of NaN values inside a stacked graph. NaN values are interpolated/extended for stacking purposes, but the actual point value remains NaN in the legend display. Valid option values are \"all\" (interpolate internally, repeat leftmost and rightmost value as needed), \"inside\" (interpolate internally only, use zero outside leftmost and rightmost value), and \"none\" (treat NaN as zero everywhere)."
- },
- "pointSize": {
- "default": "1",
- "labels": ["Data Line display"],
- "type": "integer",
- "description": "The size of the dot to draw on each point in pixels (see drawPoints). A dot is always drawn when a point is \"isolated\", i.e. there is a missing point on either side of it. This also controls the size of those dots."
- },
- "labelsDivStyles": {
- "default": "null",
- "labels": ["Legend"],
- "type": "{}",
- "description": "Additional styles to apply to the currently-highlighted points div. For example, { 'fontWeight': 'bold' } will make the labels bold. In general, it is better to use CSS to style the .dygraph-legend class than to use this property."
- },
- "drawPoints": {
- "default": "false",
- "labels": ["Data Line display"],
- "type": "boolean",
- "description": "Draw a small dot at each point, in addition to a line going through the point. This makes the individual data points easier to see, but can increase visual clutter in the chart. The small dot can be replaced with a custom rendering by supplying a <a href='#drawPointCallback'>drawPointCallback</a>."
- },
- "drawGapEdgePoints": {
- "default": "false",
- "labels": ["Data Line display"],
- "type": "boolean",
- "description": "Draw points at the edges of gaps in the data. This improves visibility of small data segments or other data irregularities."
- },
- "drawPointCallback": {
- "default": "null",
- "labels": ["Data Line display"],
- "type": "function(g, seriesName, canvasContext, cx, cy, color, pointSize)",
- "parameters": [
- [ "g" , "the reference graph" ],
- [ "seriesName" , "the name of the series" ],
- [ "canvasContext" , "the canvas to draw on" ],
- [ "cx" , "center x coordinate" ],
- [ "cy" , "center y coordinate" ],
- [ "color" , "series color" ],
- [ "pointSize" , "the radius of the image." ],
- [ "idx" , "the row-index of the point in the data."]
- ],
- "description": "Draw a custom item when drawPoints is enabled. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy). Also see <a href='#drawHighlightPointCallback'>drawHighlightPointCallback</a>"
- },
- "height": {
- "default": "320",
- "labels": ["Overall display"],
- "type": "integer",
- "description": "Height, in pixels, of the chart. If the container div has been explicitly sized, this will be ignored."
- },
- "zoomCallback": {
- "default": "null",
- "labels": ["Callbacks"],
- "type": "function(minDate, maxDate, yRanges)",
- "parameters": [
- [ "minDate" , "milliseconds since epoch" ],
- [ "maxDate" , "milliseconds since epoch." ],
- [ "yRanges" , "is an array of [bottom, top] pairs, one for each y-axis." ]
- ],
- "description": "A function to call when the zoom window is changed (either by zooming in or out)."
- },
- "pointClickCallback": {
- "snippet": "function(e, point){<br>&nbsp;&nbsp;alert(point);<br>}",
- "default": "null",
- "labels": ["Callbacks", "Interactive Elements"],
- "type": "function(e, point)",
- "parameters": [
- [ "e" , "the event object for the click" ],
- [ "point" , "the point that was clicked See <a href='#point_properties'>Point properties</a> for details" ]
- ],
- "description": "A function to call when a data point is clicked. and the point that was clicked."
- },
- "colors": {
- "default": "(see description)",
- "labels": ["Data Series Colors"],
- "type": "array<string>",
- "example": "['red', '#00FF00']",
- "description": "List of colors for the data series. These can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\", etc. If not specified, equally-spaced points around a color wheel are used."
- },
- "connectSeparatedPoints": {
- "default": "false",
- "labels": ["Data Line display"],
- "type": "boolean",
- "description": "Usually, when Dygraphs encounters a missing value in a data series, it interprets this as a gap and draws it as such. If, instead, the missing values represents an x-value for which only a different series has data, then you'll want to connect the dots by setting this to true. To explicitly include a gap with this option set, use a value of NaN."
- },
- "highlightCallback": {
- "default": "null",
- "labels": ["Callbacks"],
- "type": "function(event, x, points, row, seriesName)",
- "description": "When set, this callback gets called every time a new point is highlighted.",
- "parameters": [
- ["event", "the JavaScript mousemove event"],
- ["x", "the x-coordinate of the highlighted points"],
- ["points", "an array of highlighted points: <code>[ {name: 'series', yval: y-value}, &hellip; ]</code>"],
- ["row", "integer index of the highlighted row in the data table, starting from 0"],
- ["seriesName", "name of the highlighted series, only present if highlightSeriesOpts is set."]
- ]
- },
- "drawHighlightPointCallback": {
- "default": "null",
- "labels": ["Data Line display"],
- "type": "function(g, seriesName, canvasContext, cx, cy, color, pointSize)",
- "parameters": [
- [ "g" , "the reference graph" ],
- [ "seriesName" , "the name of the series" ],
- [ "canvasContext" , "the canvas to draw on" ],
- [ "cx" , "center x coordinate" ],
- [ "cy" , "center y coordinate" ],
- [ "color" , "series color" ],
- [ "pointSize" , "the radius of the image." ],
- [ "idx" , "the row-index of the point in the data."]
- ],
- "description": "Draw a custom item when a point is highlighted. Default is a small dot matching the series color. This method should constrain drawing to within pointSize pixels from (cx, cy) Also see <a href='#drawPointCallback'>drawPointCallback</a>"
- },
- "highlightSeriesOpts": {
- "default": "null",
- "labels": ["Interactive Elements"],
- "type": "Object",
- "description": "When set, the options from this object are applied to the timeseries closest to the mouse pointer for interactive highlighting. See also 'highlightCallback'. Example: highlightSeriesOpts: { strokeWidth: 3 }."
- },
- "highlightSeriesBackgroundAlpha": {
- "default": "0.5",
- "labels": ["Interactive Elements"],
- "type": "float",
- "description": "Fade the background while highlighting series. 1=fully visible background (disable fading), 0=hiddden background (show highlighted series only)."
- },
- "includeZero": {
- "default": "false",
- "labels": ["Axis display"],
- "type": "boolean",
- "description": "Usually, dygraphs will use the range of the data plus some padding to set the range of the y-axis. If this option is set, the y-axis will always include zero, typically as the lowest value. This can be used to avoid exaggerating the variance in the data"
- },
- "rollPeriod": {
- "default": "1",
- "labels": ["Error Bars", "Rolling Averages"],
- "type": "integer &gt;= 1",
- "description": "Number of days over which to average data. Discussed extensively above."
- },
- "unhighlightCallback": {
- "default": "null",
- "labels": ["Callbacks"],
- "type": "function(event)",
- "parameters": [
- [ "event" , "the mouse event" ]
- ],
- "description": "When set, this callback gets called every time the user stops highlighting any point by mousing out of the graph."
- },
- "axisTickSize": {
- "default": "3.0",
- "labels": ["Axis display"],
- "type": "number",
- "description": "The size of the line to display next to each tick mark on x- or y-axes."
- },
- "labelsSeparateLines": {
- "default": "false",
- "labels": ["Legend"],
- "type": "boolean",
- "description": "Put <code>&lt;br/&gt;</code> between lines in the label string. Often used in conjunction with <strong>labelsDiv</strong>."
- },
- "xValueFormatter": {
- "default": "",
- "labels": ["Deprecated"],
- "type": "",
- "description": "Prefer axes: { x: { valueFormatter } }"
- },
- "valueFormatter": {
- "default": "Depends on the type of your data.",
- "labels": ["Legend", "Value display/formatting"],
- "type": "function(num or millis, opts, dygraph)",
- "description": "Function to provide a custom display format for the values displayed on mouseover. This does not affect the values that appear on tick marks next to the axes. To format those, see axisLabelFormatter. This is usually set on a <a href='per-axis.html'>per-axis</a> basis. For date axes, you can call new Date(millis) to get a Date object. opts is a function you can call to access various options (e.g. opts('labelsKMB'))."
- },
- "pixelsPerYLabel": {
- "default": "",
- "labels": ["Deprecated"],
- "type": "integer",
- "description": "Prefer axes: { y: { pixelsPerLabel } }"
- },
- "annotationMouseOverHandler": {
- "default": "null",
- "labels": ["Annotations"],
- "type": "function(annotation, point, dygraph, event)",
- "description": "If provided, this function is called whenever the user mouses over an annotation."
- },
- "annotationMouseOutHandler": {
- "default": "null",
- "labels": ["Annotations"],
- "type": "function(annotation, point, dygraph, event)",
- "parameters": [
- [ "annotation" , "the annotation left" ],
- [ "point" , "the point associated with the annotation" ],
- [ "dygraph" , "the reference graph" ],
- [ "event" , "the mouse event" ]
- ],
- "description": "If provided, this function is called whenever the user mouses out of an annotation."
- },
- "annotationClickHandler": {
- "default": "null",
- "labels": ["Annotations"],
- "type": "function(annotation, point, dygraph, event)",
- "parameters": [
- [ "annotation" , "the annotation left" ],
- [ "point" , "the point associated with the annotation" ],
- [ "dygraph" , "the reference graph" ],
- [ "event" , "the mouse event" ]
- ],
- "description": "If provided, this function is called whenever the user clicks on an annotation."
- },
- "annotationDblClickHandler": {
- "default": "null",
- "labels": ["Annotations"],
- "type": "function(annotation, point, dygraph, event)",
- "parameters": [
- [ "annotation" , "the annotation left" ],
- [ "point" , "the point associated with the annotation" ],
- [ "dygraph" , "the reference graph" ],
- [ "event" , "the mouse event" ]
- ],
- "description": "If provided, this function is called whenever the user double-clicks on an annotation."
- },
- "drawCallback": {
- "default": "null",
- "labels": ["Callbacks"],
- "type": "function(dygraph, is_initial)",
- "parameters": [
- [ "dygraph" , "The graph being drawn" ],
- [ "is_initial" , "True if this is the initial draw, false for subsequent draws." ]
- ],
- "description": "When set, this callback gets called every time the dygraph is drawn. This includes the initial draw, after zooming and repeatedly while panning."
- },
- "labelsKMG2": {
- "default": "false",
- "labels": ["Value display/formatting"],
- "type": "boolean",
- "description": "Show k/M/G for kilo/Mega/Giga on y-axis. This is different than <code>labelsKMB</code> in that it uses base 2, not 10."
- },
- "delimiter": {
- "default": ",",
- "labels": ["CSV parsing"],
- "type": "string",
- "description": "The delimiter to look for when separating fields of a CSV file. Setting this to a tab is not usually necessary, since tab-delimited data is auto-detected."
- },
- "axisLabelFontSize": {
- "default": "14",
- "labels": ["Axis display"],
- "type": "integer",
- "description": "Size of the font (in pixels) to use in the axis labels, both x- and y-axis."
- },
- "underlayCallback": {
- "default": "null",
- "labels": ["Callbacks"],
- "type": "function(context, area, dygraph)",
- "parameters": [
- [ "context" , "the canvas drawing context on which to draw" ],
- [ "area" , "An object with {x,y,w,h} properties describing the drawing area." ],
- [ "dygraph" , "the reference graph" ]
- ],
- "description": "When set, this callback gets called before the chart is drawn. It details on how to use this."
- },
- "width": {
- "default": "480",
- "labels": ["Overall display"],
- "type": "integer",
- "description": "Width, in pixels, of the chart. If the container div has been explicitly sized, this will be ignored."
- },
- "interactionModel": {
- "default": "...",
- "labels": ["Interactive Elements"],
- "type": "Object",
- "description": "TODO(konigsberg): document this"
- },
- "ticker": {
- "default": "Dygraph.dateTicker or Dygraph.numericTicks",
- "labels": ["Axis display"],
- "type": "function(min, max, pixels, opts, dygraph, vals) -> [{v: ..., label: ...}, ...]",
- "parameters": [
- [ "min" , "" ],
- [ "max" , "" ],
- [ "pixels" , "" ],
- [ "opts" , "" ],
- [ "dygraph" , "the reference graph" ],
- [ "vals" , "" ]
- ],
- "description": "This lets you specify an arbitrary function to generate tick marks on an axis. The tick marks are an array of (value, label) pairs. The built-in functions go to great lengths to choose good tick marks so, if you set this option, you'll most likely want to call one of them and modify the result. See dygraph-tickers.js for an extensive discussion. This is set on a <a href='per-axis.html'>per-axis</a> basis."
- },
- "xAxisLabelWidth": {
- "default": "50",
- "labels": ["Axis display"],
- "type": "integer",
- "description": "Width, in pixels, of the x-axis labels."
- },
- "xAxisHeight": {
- "default": "(null)",
- "labels": ["Axis display"],
- "type": "integer",
- "description": "Height, in pixels, of the x-axis. If not set explicitly, this is computed based on axisLabelFontSize and axisTickSize."
- },
- "showLabelsOnHighlight": {
- "default": "true",
- "labels": ["Interactive Elements", "Legend"],
- "type": "boolean",
- "description": "Whether to show the legend upon mouseover."
- },
- "axis": {
- "default": "(none)",
- "labels": ["Axis display"],
- "type": "string or object",
- "description": "Set to either an object ({}) filled with options for this axis or to the name of an existing data series with its own axis to re-use that axis. See tests for usage."
- },
- "pixelsPerXLabel": {
- "default": "",
- "labels": ["Deprecated"],
- "type": "integer",
- "description": "Prefer axes { x: { pixelsPerLabel } }"
- },
- "pixelsPerLabel": {
- "default": "60 (x-axis) or 30 (y-axes)",
- "labels": ["Axis display", "Grid"],
- "type": "integer",
- "description": "Number of pixels to require between each x- and y-label. Larger values will yield a sparser axis with fewer ticks. This is set on a <a href='per-axis.html'>per-axis</a> basis."
- },
- "labelsDiv": {
- "default": "null",
- "labels": ["Legend"],
- "type": "DOM element or string",
- "example": "<code style='font-size: small'>document.getElementById('foo')</code>or<code>'foo'",
- "description": "Show data labels in an external div, rather than on the graph. This value can either be a div element or a div id."
- },
- "fractions": {
- "default": "false",
- "labels": ["CSV parsing", "Error Bars"],
- "type": "boolean",
- "description": "When set, attempt to parse each cell in the CSV file as \"a/b\", where a and b are integers. The ratio will be plotted. This allows computation of Wilson confidence intervals (see below)."
- },
- "logscale": {
- "default": "false",
- "labels": ["Axis display"],
- "type": "boolean",
- "description": "When set for a y-axis, the graph shows that axis in log scale. Any values less than or equal to zero are not displayed.\n\nNot compatible with showZero, and ignores connectSeparatedPoints. Also, showing log scale with valueRanges that are less than zero will result in an unviewable graph."
- },
- "strokeWidth": {
- "default": "1.0",
- "labels": ["Data Line display"],
- "type": "float",
- "example": "0.5, 2.0",
- "description": "The width of the lines connecting data points. This can be used to increase the contrast or some graphs."
- },
- "strokePattern": {
- "default": "null",
- "labels": ["Data Line display"],
- "type": "array<integer>",
- "example": "[10, 2, 5, 2]",
- "description": "A custom pattern array where the even index is a draw and odd is a space in pixels. If null then it draws a solid line. The array should have a even length as any odd lengthed array could be expressed as a smaller even length array. This is used to create dashed lines."
- },
- "strokeBorderWidth": {
- "default": "null",
- "labels": ["Data Line display"],
- "type": "float",
- "example": "1.0",
- "description": "Draw a border around graph lines to make crossing lines more easily distinguishable. Useful for graphs with many lines."
- },
- "strokeBorderColor": {
- "default": "white",
- "labels": ["Data Line display"],
- "type": "string",
- "example": "red, #ccffdd",
- "description": "Color for the line border used if strokeBorderWidth is set."
- },
- "wilsonInterval": {
- "default": "true",
- "labels": ["Error Bars"],
- "type": "boolean",
- "description": "Use in conjunction with the \"fractions\" option. Instead of plotting +/- N standard deviations, dygraphs will compute a Wilson confidence interval and plot that. This has more reasonable behavior for ratios close to 0 or 1."
- },
- "fillGraph": {
- "default": "false",
- "labels": ["Data Line display"],
- "type": "boolean",
- "description": "Should the area underneath the graph be filled? This option is not compatible with error bars. This may be set on a <a href='per-axis.html'>per-series</a> basis."
- },
- "highlightCircleSize": {
- "default": "3",
- "labels": ["Interactive Elements"],
- "type": "integer",
- "description": "The size in pixels of the dot drawn over highlighted points."
- },
- "gridLineColor": {
- "default": "rgb(128,128,128)",
- "labels": ["Grid"],
- "type": "red, blue",
- "description": "The color of the gridlines. This may be set on a per-axis basis to define each axis' grid separately."
- },
- "visibility": {
- "default": "[true, true, ...]",
- "labels": ["Data Line display"],
- "type": "Array of booleans",
- "description": "Which series should initially be visible? Once the Dygraph has been constructed, you can access and modify the visibility of each series using the <code>visibility</code> and <code>setVisibility</code> methods."
- },
- "valueRange": {
- "default": "Full range of the input is shown",
- "labels": ["Axis display"],
- "type": "Array of two numbers",
- "example": "[10, 110]",
- "description": "Explicitly set the vertical range of the graph to [low, high]. This may be set on a per-axis basis to define each y-axis separately. If either limit is unspecified, it will be calculated automatically (e.g. [null, 30] to automatically calculate just the lower bound)"
- },
- "labelsDivWidth": {
- "default": "250",
- "labels": ["Legend"],
- "type": "integer",
- "description": "Width (in pixels) of the div which shows information on the currently-highlighted points."
- },
- "colorSaturation": {
- "default": "1.0",
- "labels": ["Data Series Colors"],
- "type": "float (0.0 - 1.0)",
- "description": "If <strong>colors</strong> is not specified, saturation of the automatically-generated data series colors."
- },
- "yAxisLabelWidth": {
- "default": "50",
- "labels": ["Axis display"],
- "type": "integer",
- "description": "Width, in pixels, of the y-axis labels. This also affects the amount of space available for a y-axis chart label."
- },
- "hideOverlayOnMouseOut": {
- "default": "true",
- "labels": ["Interactive Elements", "Legend"],
- "type": "boolean",
- "description": "Whether to hide the legend when the mouse leaves the chart area."
- },
- "yValueFormatter": {
- "default": "",
- "labels": ["Deprecated"],
- "type": "",
- "description": "Prefer axes: { y: { valueFormatter } }"
- },
- "legend": {
- "default": "onmouseover",
- "labels": ["Legend"],
- "type": "string",
- "description": "When to display the legend. By default, it only appears when a user mouses over the chart. Set it to \"always\" to always display a legend of some sort."
- },
- "labelsShowZeroValues": {
- "default": "true",
- "labels": ["Legend"],
- "type": "boolean",
- "description": "Show zero value labels in the labelsDiv."
- },
- "stepPlot": {
- "default": "false",
- "labels": ["Data Line display"],
- "type": "boolean",
- "description": "When set, display the graph as a step plot instead of a line plot. This option may either be set for the whole graph or for single series."
- },
- "labelsKMB": {
- "default": "false",
- "labels": ["Value display/formatting"],
- "type": "boolean",
- "description": "Show K/M/B for thousands/millions/billions on y-axis."
- },
- "rightGap": {
- "default": "5",
- "labels": ["Overall display"],
- "type": "integer",
- "description": "Number of pixels to leave blank at the right edge of the Dygraph. This makes it easier to highlight the right-most data point."
- },
- "avoidMinZero": {
- "default": "false",
- "labels": ["Deprecated"],
- "type": "boolean",
- "description": "Deprecated, please use yRangePad instead. When set, the heuristic that fixes the Y axis at zero for a data set with the minimum Y value of zero is disabled. \nThis is particularly useful for data sets that contain many zero values, especially for step plots which may otherwise have lines not visible running along the bottom axis."
- },
- "drawAxesAtZero": {
- "default": "false",
- "labels": ["Axis display"],
- "type": "boolean",
- "description": "When set, draw the X axis at the Y=0 position and the Y axis at the X=0 position if those positions are inside the graph's visible area. Otherwise, draw the axes at the bottom or left graph edge as usual."
- },
- "xRangePad": {
- "default": "0",
- "labels": ["Axis display"],
- "type": "float",
- "description": "Add the specified amount of extra space (in pixels) around the X-axis value range to ensure points at the edges remain visible."
- },
- "yRangePad": {
- "default": "null",
- "labels": ["Axis display"],
- "type": "float",
- "description": "If set, add the specified amount of extra space (in pixels) around the Y-axis value range to ensure points at the edges remain visible. If unset, use the traditional Y padding algorithm."
- },
- "xAxisLabelFormatter": {
- "default": "",
- "labels": ["Deprecated"],
- "type": "",
- "description": "Prefer axes { x: { axisLabelFormatter } }"
- },
- "axisLabelFormatter": {
- "default": "Depends on the data type",
- "labels": ["Axis display"],
- "type": "function(number or Date, granularity, opts, dygraph)",
- "parameters": [
- [ "number or date" , "Either a number (for a numeric axis) or a Date object (for a date axis)" ],
- [ "granularity" , "specifies how fine-grained the axis is. For date axes, this is a reference to the time granularity enumeration, defined in dygraph-tickers.js, e.g. Dygraph.WEEKLY." ],
- [ "opts" , "a function which provides access to various options on the dygraph, e.g. opts('labelsKMB')." ],
- [ "dygraph" , "the referenced graph" ]
- ],
- "description": "Function to call to format the tick values that appear along an axis. This is usually set on a <a href='per-axis.html'>per-axis</a> basis."
- },
- "clickCallback": {
- "snippet": "function(e, date_millis){<br>&nbsp;&nbsp;alert(new Date(date_millis));<br>}",
- "default": "null",
- "labels": ["Callbacks"],
- "type": "function(e, x, points)",
- "parameters": [
- [ "e" , "The event object for the click" ],
- [ "x" , "The x value that was clicked (for dates, this is milliseconds since epoch)" ],
- [ "points" , "The closest points along that date. See <a href='#point_properties'>Point properties</a> for details." ]
- ],
- "description": "A function to call when the canvas is clicked."
- },
- "yAxisLabelFormatter": {
- "default": "",
- "labels": ["Deprecated"],
- "type": "",
- "description": "Prefer axes: { y: { axisLabelFormatter } }"
- },
- "labels": {
- "default": "[\"X\", \"Y1\", \"Y2\", ...]*",
- "labels": ["Legend"],
- "type": "array<string>",
- "description": "A name for each data series, including the independent (X) series. For CSV files and DataTable objections, this is determined by context. For raw data, this must be specified. If it is not, default values are supplied and a warning is logged."
- },
- "dateWindow": {
- "default": "Full range of the input is shown",
- "labels": ["Axis display"],
- "type": "Array of two Dates or numbers",
- "example": "[<br>&nbsp;&nbsp;Date.parse('2006-01-01'),<br>&nbsp;&nbsp;(new Date()).valueOf()<br>]",
- "description": "Initially zoom in on a section of the graph. Is of the form [earliest, latest], where earliest/latest are milliseconds since epoch. If the data for the x-axis is numeric, the values in dateWindow must also be numbers."
- },
- "showRoller": {
- "default": "false",
- "labels": ["Interactive Elements", "Rolling Averages"],
- "type": "boolean",
- "description": "If the rolling average period text box should be shown."
- },
- "sigma": {
- "default": "2.0",
- "labels": ["Error Bars"],
- "type": "float",
- "description": "When errorBars is set, shade this many standard deviations above/below each point."
- },
- "customBars": {
- "default": "false",
- "labels": ["CSV parsing", "Error Bars"],
- "type": "boolean",
- "description": "When set, parse each CSV cell as \"low;middle;high\". Error bars will be drawn for each point between low and high, with the series itself going through middle."
- },
- "colorValue": {
- "default": "1.0",
- "labels": ["Data Series Colors"],
- "type": "float (0.0 - 1.0)",
- "description": "If colors is not specified, value of the data series colors, as in hue/saturation/value. (0.0-1.0, default 0.5)"
- },
- "errorBars": {
- "default": "false",
- "labels": ["CSV parsing", "Error Bars"],
- "type": "boolean",
- "description": "Does the data contain standard deviations? Setting this to true alters the input format (see above)."
- },
- "displayAnnotations": {
- "default": "false",
- "labels": ["Annotations"],
- "type": "boolean",
- "description": "Only applies when Dygraphs is used as a GViz chart. Causes string columns following a data series to be interpreted as annotations on points in that series. This is the same format used by Google's AnnotatedTimeLine chart."
- },
- "panEdgeFraction": {
- "default": "null",
- "labels": ["Axis display", "Interactive Elements"],
- "type": "float",
- "description": "A value representing the farthest a graph may be panned, in percent of the display. For example, a value of 0.1 means that the graph can only be panned 10% pased the edges of the displayed values. null means no bounds."
- },
- "title": {
- "labels": ["Chart labels"],
- "type": "string",
- "default": "null",
- "description": "Text to display above the chart. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-title' classes."
- },
- "titleHeight": {
- "default": "18",
- "labels": ["Chart labels"],
- "type": "integer",
- "description": "Height of the chart title, in pixels. This also controls the default font size of the title. If you style the title on your own, this controls how much space is set aside above the chart for the title's div."
- },
- "xlabel": {
- "labels": ["Chart labels"],
- "type": "string",
- "default": "null",
- "description": "Text to display below the chart's x-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-xlabel' classes."
- },
- "xLabelHeight": {
- "labels": ["Chart labels"],
- "type": "integer",
- "default": "18",
- "description": "Height of the x-axis label, in pixels. This also controls the default font size of the x-axis label. If you style the label on your own, this controls how much space is set aside below the chart for the x-axis label's div."
- },
- "ylabel": {
- "labels": ["Chart labels"],
- "type": "string",
- "default": "null",
- "description": "Text to display to the left of the chart's y-axis. You can supply any HTML for this value, not just text. If you wish to style it using CSS, use the 'dygraph-label' or 'dygraph-ylabel' classes. The text will be rotated 90 degrees by default, so CSS rules may behave in unintuitive ways. No additional space is set aside for a y-axis label. If you need more space, increase the width of the y-axis tick labels using the yAxisLabelWidth option. If you need a wider div for the y-axis label, either style it that way with CSS (but remember that it's rotated, so width is controlled by the 'height' property) or set the yLabelWidth option."
- },
- "y2label": {
- "labels": ["Chart labels"],
- "type": "string",
- "default": "null",
- "description": "Text to display to the right of the chart's secondary y-axis. This label is only displayed if a secondary y-axis is present. See <a href='http://dygraphs.com/tests/two-axes.html'>this test</a> for an example of how to do this. The comments for the 'ylabel' option generally apply here as well. This label gets a 'dygraph-y2label' instead of a 'dygraph-ylabel' class."
- },
- "yLabelWidth": {
- "labels": ["Chart labels"],
- "type": "integer",
- "default": "18",
- "description": "Width of the div which contains the y-axis label. Since the y-axis label appears rotated 90 degrees, this actually affects the height of its div."
- },
- "isZoomedIgnoreProgrammaticZoom" : {
- "default": "false",
- "labels": ["Zooming"],
- "type": "boolean",
- "description" : "When this option is passed to updateOptions() along with either the <code>dateWindow</code> or <code>valueRange</code> options, the zoom flags are not changed to reflect a zoomed state. This is primarily useful for when the display area of a chart is changed programmatically and also where manual zooming is allowed and use is made of the <code>isZoomed</code> method to determine this."
- },
- "drawXGrid": {
- "default": "true",
- "labels": ["Grid","Deprecated"],
- "type": "boolean",
- "description" : "Use the per-axis option drawGrid instead. Whether to display vertical gridlines under the chart."
- },
- "drawYGrid": {
- "default": "true",
- "labels": ["Grid","Deprecated"],
- "type": "boolean",
- "description" : "Use the per-axis option drawGrid instead. Whether to display horizontal gridlines under the chart."
- },
- "drawGrid": {
- "default": "true for x and y, false for y2",
- "labels": ["Grid"],
- "type": "boolean",
- "description" : "Whether to display gridlines in the chart. This may be set on a per-axis basis to define the visibility of each axis' grid separately."
- },
- "independentTicks": {
- "default": "true for y, false for y2",
- "labels": ["Axis display", "Grid"],
- "type": "boolean",
- "description" : "Only valid for y and y2, has no effect on x: This option defines whether the y axes should align their ticks or if they should be independent. Possible combinations: 1.) y=true, y2=false (default): y is the primary axis and the y2 ticks are aligned to the the ones of y. (only 1 grid) 2.) y=false, y2=true: y2 is the primary axis and the y ticks are aligned to the the ones of y2. (only 1 grid) 3.) y=true, y2=true: Both axis are independent and have their own ticks. (2 grids) 4.) y=false, y2=false: Invalid configuration causes an error."
- },
- "drawXAxis": {
- "default": "true",
- "labels": ["Axis display"],
- "type": "boolean",
- "description" : "Whether to draw the x-axis. Setting this to false also prevents x-axis ticks from being drawn and reclaims the space for the chart grid/lines."
- },
- "drawYAxis": {
- "default": "true",
- "labels": ["Axis display"],
- "type": "boolean",
- "description" : "Whether to draw the y-axis. Setting this to false also prevents y-axis ticks from being drawn and reclaims the space for the chart grid/lines."
- },
- "gridLineWidth": {
- "default": "0.3",
- "labels": ["Grid"],
- "type": "float",
- "description" : "Thickness (in pixels) of the gridlines drawn under the chart. The vertical/horizontal gridlines can be turned off entirely by using the drawXGrid and drawYGrid options. This may be set on a per-axis basis to define each axis' grid separately."
- },
- "axisLineWidth": {
- "default": "0.3",
- "labels": ["Axis display"],
- "type": "float",
- "description" : "Thickness (in pixels) of the x- and y-axis lines."
- },
- "axisLineColor": {
- "default": "black",
- "labels": ["Axis display"],
- "type": "string",
- "description" : "Color of the x- and y-axis lines. Accepts any value which the HTML canvas strokeStyle attribute understands, e.g. 'black' or 'rgb(0, 100, 255)'."
- },
- "fillAlpha": {
- "default": "0.15",
- "labels": ["Error Bars", "Data Series Colors"],
- "type": "float (0.0 - 1.0)",
- "description" : "Error bars (or custom bars) for each series are drawn in the same color as the series, but with partial transparency. This sets the transparency. A value of 0.0 means that the error bars will not be drawn, whereas a value of 1.0 means that the error bars will be as dark as the line for the series itself. This can be used to produce chart lines whose thickness varies at each point."
- },
- "axisLabelColor": {
- "default": "black",
- "labels": ["Axis display"],
- "type": "string",
- "description" : "Color for x- and y-axis labels. This is a CSS color string."
- },
- "axisLabelWidth": {
- "default": "50",
- "labels": ["Axis display", "Chart labels"],
- "type": "integer",
- "description" : "Width (in pixels) of the containing divs for x- and y-axis labels. For the y-axis, this also controls "
- },
- "sigFigs" : {
- "default": "null",
- "labels": ["Value display/formatting"],
- "type": "integer",
- "description": "By default, dygraphs displays numbers with a fixed number of digits after the decimal point. If you'd prefer to have a fixed number of significant figures, set this option to that number of sig figs. A value of 2, for instance, would cause 1 to be display as 1.0 and 1234 to be displayed as 1.23e+3."
- },
- "digitsAfterDecimal" : {
- "default": "2",
- "labels": ["Value display/formatting"],
- "type": "integer",
- "description": "Unless it's run in scientific mode (see the <code>sigFigs</code> option), dygraphs displays numbers with <code>digitsAfterDecimal</code> digits after the decimal point. Trailing zeros are not displayed, so with a value of 2 you'll get '0', '0.1', '0.12', '123.45' but not '123.456' (it will be rounded to '123.46'). Numbers with absolute value less than 0.1^digitsAfterDecimal (i.e. those which would show up as '0.00') will be displayed in scientific notation."
- },
- "maxNumberWidth" : {
- "default": "6",
- "labels": ["Value display/formatting"],
- "type": "integer",
- "description": "When displaying numbers in normal (not scientific) mode, large numbers will be displayed with many trailing zeros (e.g. 100000000 instead of 1e9). This can lead to unwieldy y-axis labels. If there are more than <code>maxNumberWidth</code> digits to the left of the decimal in a number, dygraphs will switch to scientific notation, even when not operating in scientific mode. If you'd like to see all those digits, set this to something large, like 20 or 30."
- },
- "file": {
- "default": "(set when constructed)",
- "labels": ["Data"],
- "type": "string (URL of CSV or CSV), GViz DataTable or 2D Array",
- "description": "Sets the data being displayed in the chart. This can only be set when calling updateOptions; it cannot be set from the constructor. For a full description of valid data formats, see the <a href='http://dygraphs.com/data.html'>Data Formats</a> page."
- },
- "timingName": {
- "default": "null",
- "labels": [ "Debugging" ],
- "type": "string",
- "description": "Set this option to log timing information. The value of the option will be logged along with the timimg, so that you can distinguish multiple dygraphs on the same page."
- },
- "showRangeSelector": {
- "default": "false",
- "labels": ["Interactive Elements"],
- "type": "boolean",
- "description": "Show or hide the range selector widget."
- },
- "rangeSelectorHeight": {
- "default": "40",
- "labels": ["Interactive Elements"],
- "type": "integer",
- "description": "Height, in pixels, of the range selector widget. This option can only be specified at Dygraph creation time."
- },
- "rangeSelectorPlotStrokeColor": {
- "default": "#808FAB",
- "labels": ["Interactive Elements"],
- "type": "string",
- "description": "The range selector mini plot stroke color. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\". You can also specify null or \"\" to turn off stroke."
- },
- "rangeSelectorPlotFillColor": {
- "default": "#A7B1C4",
- "labels": ["Interactive Elements"],
- "type": "string",
- "description": "The range selector mini plot fill color. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\". You can also specify null or \"\" to turn off fill."
- },
- "animatedZooms": {
- "default": "false",
- "labels": ["Interactive Elements"],
- "type": "boolean",
- "description": "Set this option to animate the transition between zoom windows. Applies to programmatic and interactive zooms. Note that if you also set a drawCallback, it will be called several times on each zoom. If you set a zoomCallback, it will only be called after the animation is complete."
- },
- "plotter": {
- "default": "[DygraphCanvasRenderer.Plotters.fillPlotter, DygraphCanvasRenderer.Plotters.errorPlotter, DygraphCanvasRenderer.Plotters.linePlotter]",
- "labels": ["Data Line display"],
- "type": "array or function",
- "description": "A function (or array of functions) which plot each data series on the chart. TODO(danvk): more details! May be set per-series."
- },
- "series": {
- "default": "null",
- "labels": ["Series"],
- "type": "Object",
- "description": "Defines per-series options. Its keys match the y-axis label names, and the values are dictionaries themselves that contain options specific to that series. When this option is missing, it falls back on the old-style of per-series options comingled with global options."
- },
- "plugins": {
- "default": "[]",
- "labels": ["Configuration"],
- "type": "Array<plugin>",
- "description": "Defines per-graph plug-ins. Useful for per-graph customization"
- }
-}
-; // </JSON>
-// NOTE: in addition to parsing as JS, this snippet is expected to be valid
-// JSON. This assumption cannot be checked in JS, but it will be checked when
-// documentation is generated by the generate-documentation.py script. For the
-// most part, this just means that you should always use double quotes.
-
-// Do a quick sanity check on the options reference.
-(function() {
- "use strict";
- var warn = function(msg) { if (window.console) window.console.warn(msg); };
- var flds = ['type', 'default', 'description'];
- var valid_cats = [
- 'Annotations',
- 'Axis display',
- 'Chart labels',
- 'CSV parsing',
- 'Callbacks',
- 'Data',
- 'Data Line display',
- 'Data Series Colors',
- 'Error Bars',
- 'Grid',
- 'Interactive Elements',
- 'Legend',
- 'Overall display',
- 'Rolling Averages',
- 'Series',
- 'Value display/formatting',
- 'Zooming',
- 'Debugging',
- 'Configuration',
- 'Deprecated'
- ];
- var i;
- var cats = {};
- for (i = 0; i < valid_cats.length; i++) cats[valid_cats[i]] = true;
-
- for (var k in Dygraph.OPTIONS_REFERENCE) {
- if (!Dygraph.OPTIONS_REFERENCE.hasOwnProperty(k)) continue;
- var op = Dygraph.OPTIONS_REFERENCE[k];
- for (i = 0; i < flds.length; i++) {
- if (!op.hasOwnProperty(flds[i])) {
- warn('Option ' + k + ' missing "' + flds[i] + '" property');
- } else if (typeof(op[flds[i]]) != 'string') {
- warn(k + '.' + flds[i] + ' must be of type string');
- }
- }
- var labels = op.labels;
- if (typeof(labels) !== 'object') {
- warn('Option "' + k + '" is missing a "labels": [...] option');
- } else {
- for (i = 0; i < labels.length; i++) {
- if (!cats.hasOwnProperty(labels[i])) {
- warn('Option "' + k + '" has label "' + labels[i] +
- '", which is invalid.');
- }
- }
- }
- }
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options.js
deleted file mode 100644
index 0f90086c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-options.js
+++ /dev/null
@@ -1,384 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview DygraphOptions is responsible for parsing and returning information about options.
- *
- * Still tightly coupled to Dygraphs, we could remove some of that, you know.
- */
-
-var DygraphOptions = (function() {
-
-/*jshint sub:true */
-/*global Dygraph:false */
-"use strict";
-
-/*
- * Interesting member variables: (REMOVING THIS LIST AS I CLOSURIZE)
- * global_ - global attributes (common among all graphs, AIUI)
- * user - attributes set by the user
- * series_ - { seriesName -> { idx, yAxis, options }}
- */
-
-/**
- * This parses attributes into an object that can be easily queried.
- *
- * It doesn't necessarily mean that all options are available, specifically
- * if labels are not yet available, since those drive details of the per-series
- * and per-axis options.
- *
- * @param {Dygraph} dygraph The chart to which these options belong.
- * @constructor
- */
-var DygraphOptions = function(dygraph) {
- /**
- * The dygraph.
- * @type {!Dygraph}
- */
- this.dygraph_ = dygraph;
-
- /**
- * Array of axis index to { series : [ series names ] , options : { axis-specific options. }
- * @type {Array.<{series : Array.<string>, options : Object}>} @private
- */
- this.yAxes_ = [];
-
- /**
- * Contains x-axis specific options, which are stored in the options key.
- * This matches the yAxes_ object structure (by being a dictionary with an
- * options element) allowing for shared code.
- * @type {options: Object} @private
- */
- this.xAxis_ = {};
- this.series_ = {};
-
- // Once these two objects are initialized, you can call get();
- this.global_ = this.dygraph_.attrs_;
- this.user_ = this.dygraph_.user_attrs_ || {};
-
- /**
- * A list of series in columnar order.
- * @type {Array.<string>}
- */
- this.labels_ = [];
-
- this.highlightSeries_ = this.get("highlightSeriesOpts") || {};
- this.reparseSeries();
-};
-
-/**
- * Not optimal, but does the trick when you're only using two axes.
- * If we move to more axes, this can just become a function.
- *
- * @type {Object.<number>}
- * @private
- */
-DygraphOptions.AXIS_STRING_MAPPINGS_ = {
- 'y' : 0,
- 'Y' : 0,
- 'y1' : 0,
- 'Y1' : 0,
- 'y2' : 1,
- 'Y2' : 1
-};
-
-/**
- * @param {string|number} axis
- * @private
- */
-DygraphOptions.axisToIndex_ = function(axis) {
- if (typeof(axis) == "string") {
- if (DygraphOptions.AXIS_STRING_MAPPINGS_.hasOwnProperty(axis)) {
- return DygraphOptions.AXIS_STRING_MAPPINGS_[axis];
- }
- throw "Unknown axis : " + axis;
- }
- if (typeof(axis) == "number") {
- if (axis === 0 || axis === 1) {
- return axis;
- }
- throw "Dygraphs only supports two y-axes, indexed from 0-1.";
- }
- if (axis) {
- throw "Unknown axis : " + axis;
- }
- // No axis specification means axis 0.
- return 0;
-};
-
-/**
- * Reparses options that are all related to series. This typically occurs when
- * options are either updated, or source data has been made available.
- *
- * TODO(konigsberg): The method name is kind of weak; fix.
- */
-DygraphOptions.prototype.reparseSeries = function() {
- var labels = this.get("labels");
- if (!labels) {
- return; // -- can't do more for now, will parse after getting the labels.
- }
-
- this.labels_ = labels.slice(1);
-
- this.yAxes_ = [ { series : [], options : {}} ]; // Always one axis at least.
- this.xAxis_ = { options : {} };
- this.series_ = {};
-
- // Traditionally, per-series options were specified right up there with the options. For instance
- // {
- // labels: [ "X", "foo", "bar" ],
- // pointSize: 3,
- // foo : {}, // options for foo
- // bar : {} // options for bar
- // }
- //
- // Moving forward, series really should be specified in the series element, separating them.
- // like so:
- //
- // {
- // labels: [ "X", "foo", "bar" ],
- // pointSize: 3,
- // series : {
- // foo : {}, // options for foo
- // bar : {} // options for bar
- // }
- // }
- //
- // So, if series is found, it's expected to contain per-series data, otherwise we fall
- // back.
- var oldStyleSeries = !this.user_["series"];
-
- if (oldStyleSeries) {
- var axisId = 0; // 0-offset; there's always one.
- // Go through once, add all the series, and for those with {} axis options, add a new axis.
- for (var idx = 0; idx < this.labels_.length; idx++) {
- var seriesName = this.labels_[idx];
-
- var optionsForSeries = this.user_[seriesName] || {};
-
- var yAxis = 0;
- var axis = optionsForSeries["axis"];
- if (typeof(axis) == 'object') {
- yAxis = ++axisId;
- this.yAxes_[yAxis] = { series : [ seriesName ], options : axis };
- }
-
- // Associate series without axis options with axis 0.
- if (!axis) { // undefined
- this.yAxes_[0].series.push(seriesName);
- }
-
- this.series_[seriesName] = { idx: idx, yAxis: yAxis, options : optionsForSeries };
- }
-
- // Go through one more time and assign series to an axis defined by another
- // series, e.g. { 'Y1: { axis: {} }, 'Y2': { axis: 'Y1' } }
- for (var idx = 0; idx < this.labels_.length; idx++) {
- var seriesName = this.labels_[idx];
- var optionsForSeries = this.series_[seriesName]["options"];
- var axis = optionsForSeries["axis"];
-
- if (typeof(axis) == 'string') {
- if (!this.series_.hasOwnProperty(axis)) {
- Dygraph.error("Series " + seriesName + " wants to share a y-axis with " +
- "series " + axis + ", which does not define its own axis.");
- return;
- }
- var yAxis = this.series_[axis].yAxis;
- this.series_[seriesName].yAxis = yAxis;
- this.yAxes_[yAxis].series.push(seriesName);
- }
- }
- } else {
- for (var idx = 0; idx < this.labels_.length; idx++) {
- var seriesName = this.labels_[idx];
- var optionsForSeries = this.user_.series[seriesName] || {};
- var yAxis = DygraphOptions.axisToIndex_(optionsForSeries["axis"]);
-
- this.series_[seriesName] = {
- idx: idx,
- yAxis: yAxis,
- options : optionsForSeries };
-
- if (!this.yAxes_[yAxis]) {
- this.yAxes_[yAxis] = { series : [ seriesName ], options : {} };
- } else {
- this.yAxes_[yAxis].series.push(seriesName);
- }
- }
- }
-
- var axis_opts = this.user_["axes"] || {};
- Dygraph.update(this.yAxes_[0].options, axis_opts["y"] || {});
- if (this.yAxes_.length > 1) {
- Dygraph.update(this.yAxes_[1].options, axis_opts["y2"] || {});
- }
- Dygraph.update(this.xAxis_.options, axis_opts["x"] || {});
-};
-
-/**
- * Get a global value.
- *
- * @param {string} name the name of the option.
- */
-DygraphOptions.prototype.get = function(name) {
- var result = this.getGlobalUser_(name);
- if (result !== null) {
- return result;
- }
- return this.getGlobalDefault_(name);
-};
-
-DygraphOptions.prototype.getGlobalUser_ = function(name) {
- if (this.user_.hasOwnProperty(name)) {
- return this.user_[name];
- }
- return null;
-};
-
-DygraphOptions.prototype.getGlobalDefault_ = function(name) {
- if (this.global_.hasOwnProperty(name)) {
- return this.global_[name];
- }
- if (Dygraph.DEFAULT_ATTRS.hasOwnProperty(name)) {
- return Dygraph.DEFAULT_ATTRS[name];
- }
- return null;
-};
-
-/**
- * Get a value for a specific axis. If there is no specific value for the axis,
- * the global value is returned.
- *
- * @param {string} name the name of the option.
- * @param {string|number} axis the axis to search. Can be the string representation
- * ("y", "y2") or the axis number (0, 1).
- */
-DygraphOptions.prototype.getForAxis = function(name, axis) {
- var axisIdx;
- var axisString;
-
- // Since axis can be a number or a string, straighten everything out here.
- if (typeof(axis) == 'number') {
- axisIdx = axis;
- axisString = axisIdx === 0 ? "y" : "y2";
- } else {
- if (axis == "y1") { axis = "y"; } // Standardize on 'y'. Is this bad? I think so.
- if (axis == "y") {
- axisIdx = 0;
- } else if (axis == "y2") {
- axisIdx = 1;
- } else if (axis == "x") {
- axisIdx = -1; // simply a placeholder for below.
- } else {
- throw "Unknown axis " + axis;
- }
- axisString = axis;
- }
-
- var userAxis = (axisIdx == -1) ? this.xAxis_ : this.yAxes_[axisIdx];
-
- // Search the user-specified axis option first.
- if (userAxis) { // This condition could be removed if we always set up this.yAxes_ for y2.
- var axisOptions = userAxis.options;
- if (axisOptions.hasOwnProperty(name)) {
- return axisOptions[name];
- }
- }
-
- // User-specified global options second.
- var result = this.getGlobalUser_(name);
- if (result !== null) {
- return result;
- }
-
- // Default axis options third.
- var defaultAxisOptions = Dygraph.DEFAULT_ATTRS.axes[axisString];
- if (defaultAxisOptions.hasOwnProperty(name)) {
- return defaultAxisOptions[name];
- }
-
- // Default global options last.
- return this.getGlobalDefault_(name);
-};
-
-/**
- * Get a value for a specific series. If there is no specific value for the series,
- * the value for the axis is returned (and afterwards, the global value.)
- *
- * @param {string} name the name of the option.
- * @param {string} series the series to search.
- */
-DygraphOptions.prototype.getForSeries = function(name, series) {
- // Honors indexes as series.
- if (series === this.dygraph_.getHighlightSeries()) {
- if (this.highlightSeries_.hasOwnProperty(name)) {
- return this.highlightSeries_[name];
- }
- }
-
- if (!this.series_.hasOwnProperty(series)) {
- throw "Unknown series: " + series;
- }
-
- var seriesObj = this.series_[series];
- var seriesOptions = seriesObj["options"];
- if (seriesOptions.hasOwnProperty(name)) {
- return seriesOptions[name];
- }
-
- return this.getForAxis(name, seriesObj["yAxis"]);
-};
-
-/**
- * Returns the number of y-axes on the chart.
- * @return {number} the number of axes.
- */
-DygraphOptions.prototype.numAxes = function() {
- return this.yAxes_.length;
-};
-
-/**
- * Return the y-axis for a given series, specified by name.
- */
-DygraphOptions.prototype.axisForSeries = function(series) {
- return this.series_[series].yAxis;
-};
-
-/**
- * Returns the options for the specified axis.
- */
-// TODO(konigsberg): this is y-axis specific. Support the x axis.
-DygraphOptions.prototype.axisOptions = function(yAxis) {
- return this.yAxes_[yAxis].options;
-};
-
-/**
- * Return the series associated with an axis.
- */
-DygraphOptions.prototype.seriesForAxis = function(yAxis) {
- return this.yAxes_[yAxis].series;
-};
-
-/**
- * Return the list of all series, in their columnar order.
- */
-DygraphOptions.prototype.seriesNames = function() {
- return this.labels_;
-};
-
-/* Are we using this? */
-/**
- * Return the index of the specified series.
- * @param {string} series the series name.
- */
-DygraphOptions.prototype.indexOfSeries = function(series) {
- return this.series_[series].idx;
-};
-
-return DygraphOptions;
-
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-base.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-base.js
deleted file mode 100644
index 7f758a9a..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-base.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/*global Dygraph:false */
-
-// Namespace for plugins. Load this before plugins/*.js files.
-Dygraph.Plugins = {};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-install.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-install.js
deleted file mode 100644
index 806a9274..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-plugin-install.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/*global Dygraph:false */
-
-// This file defines the ordering of the plugins.
-//
-// The ordering is from most-general to most-specific.
-// This means that, in an event cascade, plugins which have registered for that
-// event will be called in reverse order.
-//
-// This is most relevant for plugins which register a layout event, e.g.
-// Axes, Legend and ChartLabels.
-
-Dygraph.PLUGINS.push(
- Dygraph.Plugins.Legend,
- Dygraph.Plugins.Axes,
- Dygraph.Plugins.RangeSelector, // Has to be before ChartLabels so that its callbacks are called after ChartLabels' callbacks.
- Dygraph.Plugins.ChartLabels,
- Dygraph.Plugins.Annotations,
- Dygraph.Plugins.Grid
-);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-tickers.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-tickers.js
deleted file mode 100644
index f4778b12..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-tickers.js
+++ /dev/null
@@ -1,487 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview Description of this file.
- * @author danvk@google.com (Dan Vanderkam)
- *
- * A ticker is a function with the following interface:
- *
- * function(a, b, pixels, options_view, dygraph, forced_values);
- * -> [ { v: tick1_v, label: tick1_label[, label_v: label_v1] },
- * { v: tick2_v, label: tick2_label[, label_v: label_v2] },
- * ...
- * ]
- *
- * The returned value is called a "tick list".
- *
- * Arguments
- * ---------
- *
- * [a, b] is the range of the axis for which ticks are being generated. For a
- * numeric axis, these will simply be numbers. For a date axis, these will be
- * millis since epoch (convertable to Date objects using "new Date(a)" and "new
- * Date(b)").
- *
- * opts provides access to chart- and axis-specific options. It can be used to
- * access number/date formatting code/options, check for a log scale, etc.
- *
- * pixels is the length of the axis in pixels. opts('pixelsPerLabel') is the
- * minimum amount of space to be allotted to each label. For instance, if
- * pixels=400 and opts('pixelsPerLabel')=40 then the ticker should return
- * between zero and ten (400/40) ticks.
- *
- * dygraph is the Dygraph object for which an axis is being constructed.
- *
- * forced_values is used for secondary y-axes. The tick positions are typically
- * set by the primary y-axis, so the secondary y-axis has no choice in where to
- * put these. It simply has to generate labels for these data values.
- *
- * Tick lists
- * ----------
- * Typically a tick will have both a grid/tick line and a label at one end of
- * that line (at the bottom for an x-axis, at left or right for the y-axis).
- *
- * A tick may be missing one of these two components:
- * - If "label_v" is specified instead of "v", then there will be no tick or
- * gridline, just a label.
- * - Similarly, if "label" is not specified, then there will be a gridline
- * without a label.
- *
- * This flexibility is useful in a few situations:
- * - For log scales, some of the tick lines may be too close to all have labels.
- * - For date scales where years are being displayed, it is desirable to display
- * tick marks at the beginnings of years but labels (e.g. "2006") in the
- * middle of the years.
- */
-
-/*jshint globalstrict:true, sub:true */
-/*global Dygraph:false */
-"use strict";
-
-/** @typedef {Array.<{v:number, label:string, label_v:(string|undefined)}>} */
-Dygraph.TickList = undefined; // the ' = undefined' keeps jshint happy.
-
-/** @typedef {function(
- * number,
- * number,
- * number,
- * function(string):*,
- * Dygraph=,
- * Array.<number>=
- * ): Dygraph.TickList}
- */
-Dygraph.Ticker = undefined; // the ' = undefined' keeps jshint happy.
-
-/** @type {Dygraph.Ticker} */
-Dygraph.numericLinearTicks = function(a, b, pixels, opts, dygraph, vals) {
- var nonLogscaleOpts = function(opt) {
- if (opt === 'logscale') return false;
- return opts(opt);
- };
- return Dygraph.numericTicks(a, b, pixels, nonLogscaleOpts, dygraph, vals);
-};
-
-/** @type {Dygraph.Ticker} */
-Dygraph.numericTicks = function(a, b, pixels, opts, dygraph, vals) {
- var pixels_per_tick = /** @type{number} */(opts('pixelsPerLabel'));
- var ticks = [];
- var i, j, tickV, nTicks;
- if (vals) {
- for (i = 0; i < vals.length; i++) {
- ticks.push({v: vals[i]});
- }
- } else {
- // TODO(danvk): factor this log-scale block out into a separate function.
- if (opts("logscale")) {
- nTicks = Math.floor(pixels / pixels_per_tick);
- var minIdx = Dygraph.binarySearch(a, Dygraph.PREFERRED_LOG_TICK_VALUES, 1);
- var maxIdx = Dygraph.binarySearch(b, Dygraph.PREFERRED_LOG_TICK_VALUES, -1);
- if (minIdx == -1) {
- minIdx = 0;
- }
- if (maxIdx == -1) {
- maxIdx = Dygraph.PREFERRED_LOG_TICK_VALUES.length - 1;
- }
- // Count the number of tick values would appear, if we can get at least
- // nTicks / 4 accept them.
- var lastDisplayed = null;
- if (maxIdx - minIdx >= nTicks / 4) {
- for (var idx = maxIdx; idx >= minIdx; idx--) {
- var tickValue = Dygraph.PREFERRED_LOG_TICK_VALUES[idx];
- var pixel_coord = Math.log(tickValue / a) / Math.log(b / a) * pixels;
- var tick = { v: tickValue };
- if (lastDisplayed === null) {
- lastDisplayed = {
- tickValue : tickValue,
- pixel_coord : pixel_coord
- };
- } else {
- if (Math.abs(pixel_coord - lastDisplayed.pixel_coord) >= pixels_per_tick) {
- lastDisplayed = {
- tickValue : tickValue,
- pixel_coord : pixel_coord
- };
- } else {
- tick.label = "";
- }
- }
- ticks.push(tick);
- }
- // Since we went in backwards order.
- ticks.reverse();
- }
- }
-
- // ticks.length won't be 0 if the log scale function finds values to insert.
- if (ticks.length === 0) {
- // Basic idea:
- // Try labels every 1, 2, 5, 10, 20, 50, 100, etc.
- // Calculate the resulting tick spacing (i.e. this.height_ / nTicks).
- // The first spacing greater than pixelsPerYLabel is what we use.
- // TODO(danvk): version that works on a log scale.
- var kmg2 = opts("labelsKMG2");
- var mults, base;
- if (kmg2) {
- mults = [1, 2, 4, 8, 16, 32, 64, 128, 256];
- base = 16;
- } else {
- mults = [1, 2, 5, 10, 20, 50, 100];
- base = 10;
- }
-
- // Get the maximum number of permitted ticks based on the
- // graph's pixel size and pixels_per_tick setting.
- var max_ticks = Math.ceil(pixels / pixels_per_tick);
-
- // Now calculate the data unit equivalent of this tick spacing.
- // Use abs() since graphs may have a reversed Y axis.
- var units_per_tick = Math.abs(b - a) / max_ticks;
-
- // Based on this, get a starting scale which is the largest
- // integer power of the chosen base (10 or 16) that still remains
- // below the requested pixels_per_tick spacing.
- var base_power = Math.floor(Math.log(units_per_tick) / Math.log(base));
- var base_scale = Math.pow(base, base_power);
-
- // Now try multiples of the starting scale until we find one
- // that results in tick marks spaced sufficiently far apart.
- // The "mults" array should cover the range 1 .. base^2 to
- // adjust for rounding and edge effects.
- var scale, low_val, high_val, spacing;
- for (j = 0; j < mults.length; j++) {
- scale = base_scale * mults[j];
- low_val = Math.floor(a / scale) * scale;
- high_val = Math.ceil(b / scale) * scale;
- nTicks = Math.abs(high_val - low_val) / scale;
- spacing = pixels / nTicks;
- if (spacing > pixels_per_tick) break;
- }
-
- // Construct the set of ticks.
- // Allow reverse y-axis if it's explicitly requested.
- if (low_val > high_val) scale *= -1;
- for (i = 0; i < nTicks; i++) {
- tickV = low_val + i * scale;
- ticks.push( {v: tickV} );
- }
- }
- }
-
- var formatter = /**@type{AxisLabelFormatter}*/(opts('axisLabelFormatter'));
-
- // Add labels to the ticks.
- for (i = 0; i < ticks.length; i++) {
- if (ticks[i].label !== undefined) continue; // Use current label.
- // TODO(danvk): set granularity to something appropriate here.
- ticks[i].label = formatter(ticks[i].v, 0, opts, dygraph);
- }
-
- return ticks;
-};
-
-
-/** @type {Dygraph.Ticker} */
-Dygraph.dateTicker = function(a, b, pixels, opts, dygraph, vals) {
- var chosen = Dygraph.pickDateTickGranularity(a, b, pixels, opts);
-
- if (chosen >= 0) {
- return Dygraph.getDateAxis(a, b, chosen, opts, dygraph);
- } else {
- // this can happen if self.width_ is zero.
- return [];
- }
-};
-
-// Time granularity enumeration
-// TODO(danvk): make this an @enum
-Dygraph.SECONDLY = 0;
-Dygraph.TWO_SECONDLY = 1;
-Dygraph.FIVE_SECONDLY = 2;
-Dygraph.TEN_SECONDLY = 3;
-Dygraph.THIRTY_SECONDLY = 4;
-Dygraph.MINUTELY = 5;
-Dygraph.TWO_MINUTELY = 6;
-Dygraph.FIVE_MINUTELY = 7;
-Dygraph.TEN_MINUTELY = 8;
-Dygraph.THIRTY_MINUTELY = 9;
-Dygraph.HOURLY = 10;
-Dygraph.TWO_HOURLY = 11;
-Dygraph.SIX_HOURLY = 12;
-Dygraph.DAILY = 13;
-Dygraph.WEEKLY = 14;
-Dygraph.MONTHLY = 15;
-Dygraph.QUARTERLY = 16;
-Dygraph.BIANNUAL = 17;
-Dygraph.ANNUAL = 18;
-Dygraph.DECADAL = 19;
-Dygraph.CENTENNIAL = 20;
-Dygraph.NUM_GRANULARITIES = 21;
-
-/** @type {Array.<number>} */
-Dygraph.SHORT_SPACINGS = [];
-Dygraph.SHORT_SPACINGS[Dygraph.SECONDLY] = 1000 * 1;
-Dygraph.SHORT_SPACINGS[Dygraph.TWO_SECONDLY] = 1000 * 2;
-Dygraph.SHORT_SPACINGS[Dygraph.FIVE_SECONDLY] = 1000 * 5;
-Dygraph.SHORT_SPACINGS[Dygraph.TEN_SECONDLY] = 1000 * 10;
-Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_SECONDLY] = 1000 * 30;
-Dygraph.SHORT_SPACINGS[Dygraph.MINUTELY] = 1000 * 60;
-Dygraph.SHORT_SPACINGS[Dygraph.TWO_MINUTELY] = 1000 * 60 * 2;
-Dygraph.SHORT_SPACINGS[Dygraph.FIVE_MINUTELY] = 1000 * 60 * 5;
-Dygraph.SHORT_SPACINGS[Dygraph.TEN_MINUTELY] = 1000 * 60 * 10;
-Dygraph.SHORT_SPACINGS[Dygraph.THIRTY_MINUTELY] = 1000 * 60 * 30;
-Dygraph.SHORT_SPACINGS[Dygraph.HOURLY] = 1000 * 3600;
-Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY] = 1000 * 3600 * 2;
-Dygraph.SHORT_SPACINGS[Dygraph.SIX_HOURLY] = 1000 * 3600 * 6;
-Dygraph.SHORT_SPACINGS[Dygraph.DAILY] = 1000 * 86400;
-Dygraph.SHORT_SPACINGS[Dygraph.WEEKLY] = 1000 * 604800;
-
-/**
- * A collection of objects specifying where it is acceptable to place tick
- * marks for granularities larger than WEEKLY.
- * 'months' is an array of month indexes on which to place tick marks.
- * 'year_mod' ticks are placed when year % year_mod = 0.
- * @type {Array.<Object>}
- */
-Dygraph.LONG_TICK_PLACEMENTS = [];
-Dygraph.LONG_TICK_PLACEMENTS[Dygraph.MONTHLY] = {
- months : [0,1,2,3,4,5,6,7,8,9,10,11],
- year_mod : 1
-};
-Dygraph.LONG_TICK_PLACEMENTS[Dygraph.QUARTERLY] = {
- months: [0,3,6,9],
- year_mod: 1
-};
-Dygraph.LONG_TICK_PLACEMENTS[Dygraph.BIANNUAL] = {
- months: [0,6],
- year_mod: 1
-};
-Dygraph.LONG_TICK_PLACEMENTS[Dygraph.ANNUAL] = {
- months: [0],
- year_mod: 1
-};
-Dygraph.LONG_TICK_PLACEMENTS[Dygraph.DECADAL] = {
- months: [0],
- year_mod: 10
-};
-Dygraph.LONG_TICK_PLACEMENTS[Dygraph.CENTENNIAL] = {
- months: [0],
- year_mod: 100
-};
-
-/**
- * This is a list of human-friendly values at which to show tick marks on a log
- * scale. It is k * 10^n, where k=1..9 and n=-39..+39, so:
- * ..., 1, 2, 3, 4, 5, ..., 9, 10, 20, 30, ..., 90, 100, 200, 300, ...
- * NOTE: this assumes that Dygraph.LOG_SCALE = 10.
- * @type {Array.<number>}
- */
-Dygraph.PREFERRED_LOG_TICK_VALUES = function() {
- var vals = [];
- for (var power = -39; power <= 39; power++) {
- var range = Math.pow(10, power);
- for (var mult = 1; mult <= 9; mult++) {
- var val = range * mult;
- vals.push(val);
- }
- }
- return vals;
-}();
-
-/**
- * Determine the correct granularity of ticks on a date axis.
- *
- * @param {number} a Left edge of the chart (ms)
- * @param {number} b Right edge of the chart (ms)
- * @param {number} pixels Size of the chart in the relevant dimension (width).
- * @param {function(string):*} opts Function mapping from option name ->
- * value.
- * @return {number} The appropriate axis granularity for this chart. See the
- * enumeration of possible values in dygraph-tickers.js.
- */
-Dygraph.pickDateTickGranularity = function(a, b, pixels, opts) {
- var pixels_per_tick = /** @type{number} */(opts('pixelsPerLabel'));
- for (var i = 0; i < Dygraph.NUM_GRANULARITIES; i++) {
- var num_ticks = Dygraph.numDateTicks(a, b, i);
- if (pixels / num_ticks >= pixels_per_tick) {
- return i;
- }
- }
- return -1;
-};
-
-/**
- * @param {number} start_time
- * @param {number} end_time
- * @param {number} granularity (one of the granularities enumerated above)
- * @return {number} Number of ticks that would result.
- */
-Dygraph.numDateTicks = function(start_time, end_time, granularity) {
- if (granularity < Dygraph.MONTHLY) {
- // Generate one tick mark for every fixed interval of time.
- var spacing = Dygraph.SHORT_SPACINGS[granularity];
- return Math.floor(0.5 + 1.0 * (end_time - start_time) / spacing);
- } else {
- var tickPlacement = Dygraph.LONG_TICK_PLACEMENTS[granularity];
-
- var msInYear = 365.2524 * 24 * 3600 * 1000;
- var num_years = 1.0 * (end_time - start_time) / msInYear;
- return Math.floor(0.5 + 1.0 * num_years * tickPlacement.months.length / tickPlacement.year_mod);
- }
-};
-
-/**
- * @param {number} start_time
- * @param {number} end_time
- * @param {number} granularity (one of the granularities enumerated above)
- * @param {function(string):*} opts Function mapping from option name -&gt; value.
- * @param {Dygraph=} dg
- * @return {!Dygraph.TickList}
- */
-Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) {
- var formatter = /** @type{AxisLabelFormatter} */(
- opts("axisLabelFormatter"));
- var ticks = [];
- var t;
-
- if (granularity < Dygraph.MONTHLY) {
- // Generate one tick mark for every fixed interval of time.
- var spacing = Dygraph.SHORT_SPACINGS[granularity];
-
- // Find a time less than start_time which occurs on a "nice" time boundary
- // for this granularity.
- var g = spacing / 1000;
- var d = new Date(start_time);
- Dygraph.setDateSameTZ(d, {ms: 0});
-
- var x;
- if (g <= 60) { // seconds
- x = d.getSeconds();
- Dygraph.setDateSameTZ(d, {s: x - x % g});
- } else {
- Dygraph.setDateSameTZ(d, {s: 0});
- g /= 60;
- if (g <= 60) { // minutes
- x = d.getMinutes();
- Dygraph.setDateSameTZ(d, {m: x - x % g});
- } else {
- Dygraph.setDateSameTZ(d, {m: 0});
- g /= 60;
-
- if (g <= 24) { // days
- x = d.getHours();
- d.setHours(x - x % g);
- } else {
- d.setHours(0);
- g /= 24;
-
- if (g == 7) { // one week
- d.setDate(d.getDate() - d.getDay());
- }
- }
- }
- }
- start_time = d.getTime();
-
- // For spacings coarser than two-hourly, we want to ignore daylight
- // savings transitions to get consistent ticks. For finer-grained ticks,
- // it's essential to show the DST transition in all its messiness.
- var start_offset_min = new Date(start_time).getTimezoneOffset();
- var check_dst = (spacing >= Dygraph.SHORT_SPACINGS[Dygraph.TWO_HOURLY]);
-
- for (t = start_time; t <= end_time; t += spacing) {
- d = new Date(t);
-
- // This ensures that we stay on the same hourly "rhythm" across
- // daylight savings transitions. Without this, the ticks could get off
- // by an hour. See tests/daylight-savings.html or issue 147.
- if (check_dst && d.getTimezoneOffset() != start_offset_min) {
- var delta_min = d.getTimezoneOffset() - start_offset_min;
- t += delta_min * 60 * 1000;
- d = new Date(t);
- start_offset_min = d.getTimezoneOffset();
-
- // Check whether we've backed into the previous timezone again.
- // This can happen during a "spring forward" transition. In this case,
- // it's best to skip this tick altogether (we may be shooting for a
- // non-existent time like the 2AM that's skipped) and go to the next
- // one.
- if (new Date(t + spacing).getTimezoneOffset() != start_offset_min) {
- t += spacing;
- d = new Date(t);
- start_offset_min = d.getTimezoneOffset();
- }
- }
-
- ticks.push({ v:t,
- label: formatter(d, granularity, opts, dg)
- });
- }
- } else {
- // Display a tick mark on the first of a set of months of each year.
- // Years get a tick mark iff y % year_mod == 0. This is useful for
- // displaying a tick mark once every 10 years, say, on long time scales.
- var months;
- var year_mod = 1; // e.g. to only print one point every 10 years.
-
- if (granularity < Dygraph.NUM_GRANULARITIES) {
- months = Dygraph.LONG_TICK_PLACEMENTS[granularity].months;
- year_mod = Dygraph.LONG_TICK_PLACEMENTS[granularity].year_mod;
- } else {
- Dygraph.warn("Span of dates is too long");
- }
-
- var start_year = new Date(start_time).getFullYear();
- var end_year = new Date(end_time).getFullYear();
- var zeropad = Dygraph.zeropad;
- for (var i = start_year; i <= end_year; i++) {
- if (i % year_mod !== 0) continue;
- for (var j = 0; j < months.length; j++) {
- var date_str = i + "/" + zeropad(1 + months[j]) + "/01";
- t = Dygraph.dateStrToMillis(date_str);
- if (t < start_time || t > end_time) continue;
- ticks.push({ v:t,
- label: formatter(new Date(t), granularity, opts, dg)
- });
- }
- }
- }
-
- return ticks;
-};
-
-// These are set here so that this file can be included after dygraph.js
-// or independently.
-if (Dygraph &&
- Dygraph.DEFAULT_ATTRS &&
- Dygraph.DEFAULT_ATTRS['axes'] &&
- Dygraph.DEFAULT_ATTRS['axes']['x'] &&
- Dygraph.DEFAULT_ATTRS['axes']['y'] &&
- Dygraph.DEFAULT_ATTRS['axes']['y2']) {
- Dygraph.DEFAULT_ATTRS['axes']['x']['ticker'] = Dygraph.dateTicker;
- Dygraph.DEFAULT_ATTRS['axes']['y']['ticker'] = Dygraph.numericTicks;
- Dygraph.DEFAULT_ATTRS['axes']['y2']['ticker'] = Dygraph.numericTicks;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-utils.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-utils.js
deleted file mode 100644
index 1ec1795d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph-utils.js
+++ /dev/null
@@ -1,1305 +0,0 @@
-/**
- * @license
- * Copyright 2011 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview This file contains utility functions used by dygraphs. These
- * are typically static (i.e. not related to any particular dygraph). Examples
- * include date/time formatting functions, basic algorithms (e.g. binary
- * search) and generic DOM-manipulation functions.
- */
-
-/*jshint globalstrict: true */
-/*global Dygraph:false, G_vmlCanvasManager:false, Node:false, printStackTrace: false */
-"use strict";
-
-Dygraph.LOG_SCALE = 10;
-Dygraph.LN_TEN = Math.log(Dygraph.LOG_SCALE);
-
-/**
- * @private
- * @param {number} x
- * @return {number}
- */
-Dygraph.log10 = function(x) {
- return Math.log(x) / Dygraph.LN_TEN;
-};
-
-// Various logging levels.
-Dygraph.DEBUG = 1;
-Dygraph.INFO = 2;
-Dygraph.WARNING = 3;
-Dygraph.ERROR = 3;
-
-// Set this to log stack traces on warnings, etc.
-// This requires stacktrace.js, which is up to you to provide.
-// A copy can be found in the dygraphs repo, or at
-// https://github.com/eriwen/javascript-stacktrace
-Dygraph.LOG_STACK_TRACES = false;
-
-/** A dotted line stroke pattern. */
-Dygraph.DOTTED_LINE = [2, 2];
-/** A dashed line stroke pattern. */
-Dygraph.DASHED_LINE = [7, 3];
-/** A dot dash stroke pattern. */
-Dygraph.DOT_DASH_LINE = [7, 2, 2, 2];
-
-/**
- * Log an error on the JS console at the given severity.
- * @param {number} severity One of Dygraph.{DEBUG,INFO,WARNING,ERROR}
- * @param {string} message The message to log.
- * @private
- */
-Dygraph.log = function(severity, message) {
- var st;
- if (typeof(printStackTrace) != 'undefined') {
- try {
- // Remove uninteresting bits: logging functions and paths.
- st = printStackTrace({guess:false});
- while (st[0].indexOf("stacktrace") != -1) {
- st.splice(0, 1);
- }
-
- st.splice(0, 2);
- for (var i = 0; i < st.length; i++) {
- st[i] = st[i].replace(/\([^)]*\/(.*)\)/, '@$1')
- .replace(/\@.*\/([^\/]*)/, '@$1')
- .replace('[object Object].', '');
- }
- var top_msg = st.splice(0, 1)[0];
- message += ' (' + top_msg.replace(/^.*@ ?/, '') + ')';
- } catch(e) {
- // Oh well, it was worth a shot!
- }
- }
-
- if (typeof(window.console) != 'undefined') {
- // In older versions of Firefox, only console.log is defined.
- var console = window.console;
- var log = function(console, method, msg) {
- if (method && typeof(method) == 'function') {
- method.call(console, msg);
- } else {
- console.log(msg);
- }
- };
-
- switch (severity) {
- case Dygraph.DEBUG:
- log(console, console.debug, 'dygraphs: ' + message);
- break;
- case Dygraph.INFO:
- log(console, console.info, 'dygraphs: ' + message);
- break;
- case Dygraph.WARNING:
- log(console, console.warn, 'dygraphs: ' + message);
- break;
- case Dygraph.ERROR:
- log(console, console.error, 'dygraphs: ' + message);
- break;
- }
- }
-
- if (Dygraph.LOG_STACK_TRACES) {
- window.console.log(st.join('\n'));
- }
-};
-
-/**
- * @param {string} message
- * @private
- */
-Dygraph.info = function(message) {
- Dygraph.log(Dygraph.INFO, message);
-};
-/**
- * @param {string} message
- * @private
- */
-Dygraph.prototype.info = Dygraph.info;
-
-/**
- * @param {string} message
- * @private
- */
-Dygraph.warn = function(message) {
- Dygraph.log(Dygraph.WARNING, message);
-};
-/**
- * @param {string} message
- * @private
- */
-Dygraph.prototype.warn = Dygraph.warn;
-
-/**
- * @param {string} message
- */
-Dygraph.error = function(message) {
- Dygraph.log(Dygraph.ERROR, message);
-};
-/**
- * @param {string} message
- * @private
- */
-Dygraph.prototype.error = Dygraph.error;
-
-/**
- * Return the 2d context for a dygraph canvas.
- *
- * This method is only exposed for the sake of replacing the function in
- * automated tests, e.g.
- *
- * var oldFunc = Dygraph.getContext();
- * Dygraph.getContext = function(canvas) {
- * var realContext = oldFunc(canvas);
- * return new Proxy(realContext);
- * };
- * @param {!HTMLCanvasElement} canvas
- * @return {!CanvasRenderingContext2D}
- * @private
- */
-Dygraph.getContext = function(canvas) {
- return /** @type{!CanvasRenderingContext2D}*/(canvas.getContext("2d"));
-};
-
-/**
- * Add an event handler. This smooths a difference between IE and the rest of
- * the world.
- * @param { !Element } elem The element to add the event to.
- * @param { string } type The type of the event, e.g. 'click' or 'mousemove'.
- * @param { function(Event):(boolean|undefined) } fn The function to call
- * on the event. The function takes one parameter: the event object.
- * @private
- */
-Dygraph.addEvent = function addEvent(elem, type, fn) {
- if (elem.addEventListener) {
- elem.addEventListener(type, fn, false);
- } else {
- elem[type+fn] = function(){fn(window.event);};
- elem.attachEvent('on'+type, elem[type+fn]);
- }
-};
-
-/**
- * Add an event handler. This event handler is kept until the graph is
- * destroyed with a call to graph.destroy().
- *
- * @param { !Element } elem The element to add the event to.
- * @param { string } type The type of the event, e.g. 'click' or 'mousemove'.
- * @param { function(Event):(boolean|undefined) } fn The function to call
- * on the event. The function takes one parameter: the event object.
- * @private
- */
-Dygraph.prototype.addAndTrackEvent = function(elem, type, fn) {
- Dygraph.addEvent(elem, type, fn);
- this.registeredEvents_.push({ elem : elem, type : type, fn : fn });
-};
-
-/**
- * Remove an event handler. This smooths a difference between IE and the rest
- * of the world.
- * @param {!Element} elem The element to add the event to.
- * @param {string} type The type of the event, e.g. 'click' or 'mousemove'.
- * @param {function(Event):(boolean|undefined)} fn The function to call
- * on the event. The function takes one parameter: the event object.
- * @private
- */
-Dygraph.removeEvent = function(elem, type, fn) {
- if (elem.removeEventListener) {
- elem.removeEventListener(type, fn, false);
- } else {
- try {
- elem.detachEvent('on'+type, elem[type+fn]);
- } catch(e) {
- // We only detach event listeners on a "best effort" basis in IE. See:
- // http://stackoverflow.com/questions/2553632/detachevent-not-working-with-named-inline-functions
- }
- elem[type+fn] = null;
- }
-};
-
-Dygraph.prototype.removeTrackedEvents_ = function() {
- if (this.registeredEvents_) {
- for (var idx = 0; idx < this.registeredEvents_.length; idx++) {
- var reg = this.registeredEvents_[idx];
- Dygraph.removeEvent(reg.elem, reg.type, reg.fn);
- }
- }
-
- this.registeredEvents_ = [];
-};
-
-/**
- * Cancels further processing of an event. This is useful to prevent default
- * browser actions, e.g. highlighting text on a double-click.
- * Based on the article at
- * http://www.switchonthecode.com/tutorials/javascript-tutorial-the-scroll-wheel
- * @param { !Event } e The event whose normal behavior should be canceled.
- * @private
- */
-Dygraph.cancelEvent = function(e) {
- e = e ? e : window.event;
- if (e.stopPropagation) {
- e.stopPropagation();
- }
- if (e.preventDefault) {
- e.preventDefault();
- }
- e.cancelBubble = true;
- e.cancel = true;
- e.returnValue = false;
- return false;
-};
-
-/**
- * Convert hsv values to an rgb(r,g,b) string. Taken from MochiKit.Color. This
- * is used to generate default series colors which are evenly spaced on the
- * color wheel.
- * @param { number } hue Range is 0.0-1.0.
- * @param { number } saturation Range is 0.0-1.0.
- * @param { number } value Range is 0.0-1.0.
- * @return { string } "rgb(r,g,b)" where r, g and b range from 0-255.
- * @private
- */
-Dygraph.hsvToRGB = function (hue, saturation, value) {
- var red;
- var green;
- var blue;
- if (saturation === 0) {
- red = value;
- green = value;
- blue = value;
- } else {
- var i = Math.floor(hue * 6);
- var f = (hue * 6) - i;
- var p = value * (1 - saturation);
- var q = value * (1 - (saturation * f));
- var t = value * (1 - (saturation * (1 - f)));
- switch (i) {
- case 1: red = q; green = value; blue = p; break;
- case 2: red = p; green = value; blue = t; break;
- case 3: red = p; green = q; blue = value; break;
- case 4: red = t; green = p; blue = value; break;
- case 5: red = value; green = p; blue = q; break;
- case 6: // fall through
- case 0: red = value; green = t; blue = p; break;
- }
- }
- red = Math.floor(255 * red + 0.5);
- green = Math.floor(255 * green + 0.5);
- blue = Math.floor(255 * blue + 0.5);
- return 'rgb(' + red + ',' + green + ',' + blue + ')';
-};
-
-// The following functions are from quirksmode.org with a modification for Safari from
-// http://blog.firetree.net/2005/07/04/javascript-find-position/
-// http://www.quirksmode.org/js/findpos.html
-// ... and modifications to support scrolling divs.
-
-/**
- * Find the x-coordinate of the supplied object relative to the left side
- * of the page.
- * TODO(danvk): change obj type from Node -&gt; !Node
- * @param {Node} obj
- * @return {number}
- * @private
- */
-Dygraph.findPosX = function(obj) {
- var curleft = 0;
- if(obj.offsetParent) {
- var copyObj = obj;
- while(1) {
- // NOTE: the if statement here is for IE8.
- var borderLeft = "0";
- if (window.getComputedStyle) {
- borderLeft = window.getComputedStyle(copyObj, null).borderLeft || "0";
- }
- curleft += parseInt(borderLeft, 10) ;
- curleft += copyObj.offsetLeft;
- if(!copyObj.offsetParent) {
- break;
- }
- copyObj = copyObj.offsetParent;
- }
- } else if(obj.x) {
- curleft += obj.x;
- }
- // This handles the case where the object is inside a scrolled div.
- while(obj && obj != document.body) {
- curleft -= obj.scrollLeft;
- obj = obj.parentNode;
- }
- return curleft;
-};
-
-/**
- * Find the y-coordinate of the supplied object relative to the top of the
- * page.
- * TODO(danvk): change obj type from Node -&gt; !Node
- * TODO(danvk): consolidate with findPosX and return an {x, y} object.
- * @param {Node} obj
- * @return {number}
- * @private
- */
-Dygraph.findPosY = function(obj) {
- var curtop = 0;
- if(obj.offsetParent) {
- var copyObj = obj;
- while(1) {
- // NOTE: the if statement here is for IE8.
- var borderTop = "0";
- if (window.getComputedStyle) {
- borderTop = window.getComputedStyle(copyObj, null).borderTop || "0";
- }
- curtop += parseInt(borderTop, 10) ;
- curtop += copyObj.offsetTop;
- if(!copyObj.offsetParent) {
- break;
- }
- copyObj = copyObj.offsetParent;
- }
- } else if(obj.y) {
- curtop += obj.y;
- }
- // This handles the case where the object is inside a scrolled div.
- while(obj && obj != document.body) {
- curtop -= obj.scrollTop;
- obj = obj.parentNode;
- }
- return curtop;
-};
-
-/**
- * Returns the x-coordinate of the event in a coordinate system where the
- * top-left corner of the page (not the window) is (0,0).
- * Taken from MochiKit.Signal
- * @param {!Event} e
- * @return {number}
- * @private
- */
-Dygraph.pageX = function(e) {
- if (e.pageX) {
- return (!e.pageX || e.pageX < 0) ? 0 : e.pageX;
- } else {
- var de = document.documentElement;
- var b = document.body;
- return e.clientX +
- (de.scrollLeft || b.scrollLeft) -
- (de.clientLeft || 0);
- }
-};
-
-/**
- * Returns the y-coordinate of the event in a coordinate system where the
- * top-left corner of the page (not the window) is (0,0).
- * Taken from MochiKit.Signal
- * @param {!Event} e
- * @return {number}
- * @private
- */
-Dygraph.pageY = function(e) {
- if (e.pageY) {
- return (!e.pageY || e.pageY < 0) ? 0 : e.pageY;
- } else {
- var de = document.documentElement;
- var b = document.body;
- return e.clientY +
- (de.scrollTop || b.scrollTop) -
- (de.clientTop || 0);
- }
-};
-
-/**
- * This returns true unless the parameter is 0, null, undefined or NaN.
- * TODO(danvk): rename this function to something like 'isNonZeroNan'.
- *
- * @param {number} x The number to consider.
- * @return {boolean} Whether the number is zero or NaN.
- * @private
- */
-Dygraph.isOK = function(x) {
- return !!x && !isNaN(x);
-};
-
-/**
- * @param { {x:?number,y:?number,yval:?number} } p The point to consider, valid
- * points are {x, y} objects
- * @param { boolean } allowNaNY Treat point with y=NaN as valid
- * @return { boolean } Whether the point has numeric x and y.
- * @private
- */
-Dygraph.isValidPoint = function(p, allowNaNY) {
- if (!p) return false; // null or undefined object
- if (p.yval === null) return false; // missing point
- if (p.x === null || p.x === undefined) return false;
- if (p.y === null || p.y === undefined) return false;
- if (isNaN(p.x) || (!allowNaNY && isNaN(p.y))) return false;
- return true;
-};
-
-/**
- * Number formatting function which mimicks the behavior of %g in printf, i.e.
- * either exponential or fixed format (without trailing 0s) is used depending on
- * the length of the generated string. The advantage of this format is that
- * there is a predictable upper bound on the resulting string length,
- * significant figures are not dropped, and normal numbers are not displayed in
- * exponential notation.
- *
- * NOTE: JavaScript's native toPrecision() is NOT a drop-in replacement for %g.
- * It creates strings which are too long for absolute values between 10^-4 and
- * 10^-6, e.g. '0.00001' instead of '1e-5'. See tests/number-format.html for
- * output examples.
- *
- * @param {number} x The number to format
- * @param {number=} opt_precision The precision to use, default 2.
- * @return {string} A string formatted like %g in printf. The max generated
- * string length should be precision + 6 (e.g 1.123e+300).
- */
-Dygraph.floatFormat = function(x, opt_precision) {
- // Avoid invalid precision values; [1, 21] is the valid range.
- var p = Math.min(Math.max(1, opt_precision || 2), 21);
-
- // This is deceptively simple. The actual algorithm comes from:
- //
- // Max allowed length = p + 4
- // where 4 comes from 'e+n' and '.'.
- //
- // Length of fixed format = 2 + y + p
- // where 2 comes from '0.' and y = # of leading zeroes.
- //
- // Equating the two and solving for y yields y = 2, or 0.00xxxx which is
- // 1.0e-3.
- //
- // Since the behavior of toPrecision() is identical for larger numbers, we
- // don't have to worry about the other bound.
- //
- // Finally, the argument for toExponential() is the number of trailing digits,
- // so we take off 1 for the value before the '.'.
- return (Math.abs(x) < 1.0e-3 && x !== 0.0) ?
- x.toExponential(p - 1) : x.toPrecision(p);
-};
-
-/**
- * Converts '9' to '09' (useful for dates)
- * @param {number} x
- * @return {string}
- * @private
- */
-Dygraph.zeropad = function(x) {
- if (x < 10) return "0" + x; else return "" + x;
-};
-
-/**
- * Return a string version of the hours, minutes and seconds portion of a date.
- *
- * @param {number} date The JavaScript date (ms since epoch)
- * @return {string} A time of the form "HH:MM:SS"
- * @private
- */
-Dygraph.hmsString_ = function(date) {
- var zeropad = Dygraph.zeropad;
- var d = new Date(date);
- if (d.getSeconds()) {
- return zeropad(d.getHours()) + ":" +
- zeropad(d.getMinutes()) + ":" +
- zeropad(d.getSeconds());
- } else {
- return zeropad(d.getHours()) + ":" + zeropad(d.getMinutes());
- }
-};
-
-/**
- * Round a number to the specified number of digits past the decimal point.
- * @param {number} num The number to round
- * @param {number} places The number of decimals to which to round
- * @return {number} The rounded number
- * @private
- */
-Dygraph.round_ = function(num, places) {
- var shift = Math.pow(10, places);
- return Math.round(num * shift)/shift;
-};
-
-/**
- * Implementation of binary search over an array.
- * Currently does not work when val is outside the range of arry's values.
- * @param {number} val the value to search for
- * @param {Array.<number>} arry is the value over which to search
- * @param {number} abs If abs > 0, find the lowest entry greater than val
- * If abs < 0, find the highest entry less than val.
- * If abs == 0, find the entry that equals val.
- * @param {number=} low The first index in arry to consider (optional)
- * @param {number=} high The last index in arry to consider (optional)
- * @return {number} Index of the element, or -1 if it isn't found.
- * @private
- */
-Dygraph.binarySearch = function(val, arry, abs, low, high) {
- if (low === null || low === undefined ||
- high === null || high === undefined) {
- low = 0;
- high = arry.length - 1;
- }
- if (low > high) {
- return -1;
- }
- if (abs === null || abs === undefined) {
- abs = 0;
- }
- var validIndex = function(idx) {
- return idx >= 0 && idx < arry.length;
- };
- var mid = parseInt((low + high) / 2, 10);
- var element = arry[mid];
- var idx;
- if (element == val) {
- return mid;
- } else if (element > val) {
- if (abs > 0) {
- // Accept if element > val, but also if prior element < val.
- idx = mid - 1;
- if (validIndex(idx) && arry[idx] < val) {
- return mid;
- }
- }
- return Dygraph.binarySearch(val, arry, abs, low, mid - 1);
- } else if (element < val) {
- if (abs < 0) {
- // Accept if element < val, but also if prior element > val.
- idx = mid + 1;
- if (validIndex(idx) && arry[idx] > val) {
- return mid;
- }
- }
- return Dygraph.binarySearch(val, arry, abs, mid + 1, high);
- }
- return -1; // can't actually happen, but makes closure compiler happy
-};
-
-/**
- * Parses a date, returning the number of milliseconds since epoch. This can be
- * passed in as an xValueParser in the Dygraph constructor.
- * TODO(danvk): enumerate formats that this understands.
- *
- * @param {string} dateStr A date in a variety of possible string formats.
- * @return {number} Milliseconds since epoch.
- * @private
- */
-Dygraph.dateParser = function(dateStr) {
- var dateStrSlashed;
- var d;
-
- // Let the system try the format first, with one caveat:
- // YYYY-MM-DD[ HH:MM:SS] is interpreted as UTC by a variety of browsers.
- // dygraphs displays dates in local time, so this will result in surprising
- // inconsistencies. But if you specify "T" or "Z" (i.e. YYYY-MM-DDTHH:MM:SS),
- // then you probably know what you're doing, so we'll let you go ahead.
- // Issue: http://code.google.com/p/dygraphs/issues/detail?id=255
- if (dateStr.search("-") == -1 ||
- dateStr.search("T") != -1 || dateStr.search("Z") != -1) {
- d = Dygraph.dateStrToMillis(dateStr);
- if (d && !isNaN(d)) return d;
- }
-
- if (dateStr.search("-") != -1) { // e.g. '2009-7-12' or '2009-07-12'
- dateStrSlashed = dateStr.replace("-", "/", "g");
- while (dateStrSlashed.search("-") != -1) {
- dateStrSlashed = dateStrSlashed.replace("-", "/");
- }
- d = Dygraph.dateStrToMillis(dateStrSlashed);
- } else if (dateStr.length == 8) { // e.g. '20090712'
- // TODO(danvk): remove support for this format. It's confusing.
- dateStrSlashed = dateStr.substr(0,4) + "/" + dateStr.substr(4,2) + "/" +
- dateStr.substr(6,2);
- d = Dygraph.dateStrToMillis(dateStrSlashed);
- } else {
- // Any format that Date.parse will accept, e.g. "2009/07/12" or
- // "2009/07/12 12:34:56"
- d = Dygraph.dateStrToMillis(dateStr);
- }
-
- if (!d || isNaN(d)) {
- Dygraph.error("Couldn't parse " + dateStr + " as a date");
- }
- return d;
-};
-
-/**
- * This is identical to JavaScript's built-in Date.parse() method, except that
- * it doesn't get replaced with an incompatible method by aggressive JS
- * libraries like MooTools or Joomla.
- * @param {string} str The date string, e.g. "2011/05/06"
- * @return {number} millis since epoch
- * @private
- */
-Dygraph.dateStrToMillis = function(str) {
- return new Date(str).getTime();
-};
-
-// These functions are all based on MochiKit.
-/**
- * Copies all the properties from o to self.
- *
- * @param {!Object} self
- * @param {!Object} o
- * @return {!Object}
- */
-Dygraph.update = function(self, o) {
- if (typeof(o) != 'undefined' && o !== null) {
- for (var k in o) {
- if (o.hasOwnProperty(k)) {
- self[k] = o[k];
- }
- }
- }
- return self;
-};
-
-/**
- * Copies all the properties from o to self.
- *
- * @param {!Object} self
- * @param {!Object} o
- * @return {!Object}
- * @private
- */
-Dygraph.updateDeep = function (self, o) {
- // Taken from http://stackoverflow.com/questions/384286/javascript-isdom-how-do-you-check-if-a-javascript-object-is-a-dom-object
- function isNode(o) {
- return (
- typeof Node === "object" ? o instanceof Node :
- typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName==="string"
- );
- }
-
- if (typeof(o) != 'undefined' && o !== null) {
- for (var k in o) {
- if (o.hasOwnProperty(k)) {
- if (o[k] === null) {
- self[k] = null;
- } else if (Dygraph.isArrayLike(o[k])) {
- self[k] = o[k].slice();
- } else if (isNode(o[k])) {
- // DOM objects are shallowly-copied.
- self[k] = o[k];
- } else if (typeof(o[k]) == 'object') {
- if (typeof(self[k]) != 'object' || self[k] === null) {
- self[k] = {};
- }
- Dygraph.updateDeep(self[k], o[k]);
- } else {
- self[k] = o[k];
- }
- }
- }
- }
- return self;
-};
-
-/**
- * @param {Object} o
- * @return {boolean}
- * @private
- */
-Dygraph.isArrayLike = function(o) {
- var typ = typeof(o);
- if (
- (typ != 'object' && !(typ == 'function' &&
- typeof(o.item) == 'function')) ||
- o === null ||
- typeof(o.length) != 'number' ||
- o.nodeType === 3
- ) {
- return false;
- }
- return true;
-};
-
-/**
- * @param {Object} o
- * @return {boolean}
- * @private
- */
-Dygraph.isDateLike = function (o) {
- if (typeof(o) != "object" || o === null ||
- typeof(o.getTime) != 'function') {
- return false;
- }
- return true;
-};
-
-/**
- * Note: this only seems to work for arrays.
- * @param {!Array} o
- * @return {!Array}
- * @private
- */
-Dygraph.clone = function(o) {
- // TODO(danvk): figure out how MochiKit's version works
- var r = [];
- for (var i = 0; i < o.length; i++) {
- if (Dygraph.isArrayLike(o[i])) {
- r.push(Dygraph.clone(o[i]));
- } else {
- r.push(o[i]);
- }
- }
- return r;
-};
-
-/**
- * Create a new canvas element. This is more complex than a simple
- * document.createElement("canvas") because of IE and excanvas.
- *
- * @return {!HTMLCanvasElement}
- * @private
- */
-Dygraph.createCanvas = function() {
- var canvas = document.createElement("canvas");
-
- var isIE = (/MSIE/.test(navigator.userAgent) && !window.opera);
- if (isIE && (typeof(G_vmlCanvasManager) != 'undefined')) {
- canvas = G_vmlCanvasManager.initElement(
- /**@type{!HTMLCanvasElement}*/(canvas));
- }
-
- return canvas;
-};
-
-/**
- * Checks whether the user is on an Android browser.
- * Android does not fully support the <canvas> tag, e.g. w/r/t/ clipping.
- * @return {boolean}
- * @private
- */
-Dygraph.isAndroid = function() {
- return (/Android/).test(navigator.userAgent);
-};
-
-
-/**
- * TODO(danvk): use @template here when it's better supported for classes.
- * @param {!Array} array
- * @param {number} start
- * @param {number} length
- * @param {function(!Array,?):boolean=} predicate
- * @constructor
- */
-Dygraph.Iterator = function(array, start, length, predicate) {
- start = start || 0;
- length = length || array.length;
- this.hasNext = true; // Use to identify if there's another element.
- this.peek = null; // Use for look-ahead
- this.start_ = start;
- this.array_ = array;
- this.predicate_ = predicate;
- this.end_ = Math.min(array.length, start + length);
- this.nextIdx_ = start - 1; // use -1 so initial advance works.
- this.next(); // ignoring result.
-};
-
-/**
- * @return {Object}
- */
-Dygraph.Iterator.prototype.next = function() {
- if (!this.hasNext) {
- return null;
- }
- var obj = this.peek;
-
- var nextIdx = this.nextIdx_ + 1;
- var found = false;
- while (nextIdx < this.end_) {
- if (!this.predicate_ || this.predicate_(this.array_, nextIdx)) {
- this.peek = this.array_[nextIdx];
- found = true;
- break;
- }
- nextIdx++;
- }
- this.nextIdx_ = nextIdx;
- if (!found) {
- this.hasNext = false;
- this.peek = null;
- }
- return obj;
-};
-
-/**
- * Returns a new iterator over array, between indexes start and
- * start + length, and only returns entries that pass the accept function
- *
- * @param {!Array} array the array to iterate over.
- * @param {number} start the first index to iterate over, 0 if absent.
- * @param {number} length the number of elements in the array to iterate over.
- * This, along with start, defines a slice of the array, and so length
- * doesn't imply the number of elements in the iterator when accept doesn't
- * always accept all values. array.length when absent.
- * @param {function(?):boolean=} opt_predicate a function that takes
- * parameters array and idx, which returns true when the element should be
- * returned. If omitted, all elements are accepted.
- * @private
- */
-Dygraph.createIterator = function(array, start, length, opt_predicate) {
- return new Dygraph.Iterator(array, start, length, opt_predicate);
-};
-
-// Shim layer with setTimeout fallback.
-// From: http://paulirish.com/2011/requestanimationframe-for-smart-animating/
-// Should be called with the window context:
-// Dygraph.requestAnimFrame.call(window, function() {})
-Dygraph.requestAnimFrame = (function() {
- return window.requestAnimationFrame ||
- window.webkitRequestAnimationFrame ||
- window.mozRequestAnimationFrame ||
- window.oRequestAnimationFrame ||
- window.msRequestAnimationFrame ||
- function (callback) {
- window.setTimeout(callback, 1000 / 60);
- };
-})();
-
-/**
- * Call a function at most maxFrames times at an attempted interval of
- * framePeriodInMillis, then call a cleanup function once. repeatFn is called
- * once immediately, then at most (maxFrames - 1) times asynchronously. If
- * maxFrames==1, then cleanup_fn() is also called synchronously. This function
- * is used to sequence animation.
- * @param {function(number)} repeatFn Called repeatedly -- takes the frame
- * number (from 0 to maxFrames-1) as an argument.
- * @param {number} maxFrames The max number of times to call repeatFn
- * @param {number} framePeriodInMillis Max requested time between frames.
- * @param {function()} cleanupFn A function to call after all repeatFn calls.
- * @private
- */
-Dygraph.repeatAndCleanup = function(repeatFn, maxFrames, framePeriodInMillis,
- cleanupFn) {
- var frameNumber = 0;
- var previousFrameNumber;
- var startTime = new Date().getTime();
- repeatFn(frameNumber);
- if (maxFrames == 1) {
- cleanupFn();
- return;
- }
- var maxFrameArg = maxFrames - 1;
-
- (function loop() {
- if (frameNumber >= maxFrames) return;
- Dygraph.requestAnimFrame.call(window, function() {
- // Determine which frame to draw based on the delay so far. Will skip
- // frames if necessary.
- var currentTime = new Date().getTime();
- var delayInMillis = currentTime - startTime;
- previousFrameNumber = frameNumber;
- frameNumber = Math.floor(delayInMillis / framePeriodInMillis);
- var frameDelta = frameNumber - previousFrameNumber;
- // If we predict that the subsequent repeatFn call will overshoot our
- // total frame target, so our last call will cause a stutter, then jump to
- // the last call immediately. If we're going to cause a stutter, better
- // to do it faster than slower.
- var predictOvershootStutter = (frameNumber + frameDelta) > maxFrameArg;
- if (predictOvershootStutter || (frameNumber >= maxFrameArg)) {
- repeatFn(maxFrameArg); // Ensure final call with maxFrameArg.
- cleanupFn();
- } else {
- if (frameDelta !== 0) { // Don't call repeatFn with duplicate frames.
- repeatFn(frameNumber);
- }
- loop();
- }
- });
- })();
-};
-
-/**
- * This function will scan the option list and determine if they
- * require us to recalculate the pixel positions of each point.
- * @param {!Array.<string>} labels a list of options to check.
- * @param {!Object} attrs
- * @return {boolean} true if the graph needs new points else false.
- * @private
- */
-Dygraph.isPixelChangingOptionList = function(labels, attrs) {
- // A whitelist of options that do not change pixel positions.
- var pixelSafeOptions = {
- 'annotationClickHandler': true,
- 'annotationDblClickHandler': true,
- 'annotationMouseOutHandler': true,
- 'annotationMouseOverHandler': true,
- 'axisLabelColor': true,
- 'axisLineColor': true,
- 'axisLineWidth': true,
- 'clickCallback': true,
- 'digitsAfterDecimal': true,
- 'drawCallback': true,
- 'drawHighlightPointCallback': true,
- 'drawPoints': true,
- 'drawPointCallback': true,
- 'drawXGrid': true,
- 'drawYGrid': true,
- 'fillAlpha': true,
- 'gridLineColor': true,
- 'gridLineWidth': true,
- 'hideOverlayOnMouseOut': true,
- 'highlightCallback': true,
- 'highlightCircleSize': true,
- 'interactionModel': true,
- 'isZoomedIgnoreProgrammaticZoom': true,
- 'labelsDiv': true,
- 'labelsDivStyles': true,
- 'labelsDivWidth': true,
- 'labelsKMB': true,
- 'labelsKMG2': true,
- 'labelsSeparateLines': true,
- 'labelsShowZeroValues': true,
- 'legend': true,
- 'maxNumberWidth': true,
- 'panEdgeFraction': true,
- 'pixelsPerYLabel': true,
- 'pointClickCallback': true,
- 'pointSize': true,
- 'rangeSelectorPlotFillColor': true,
- 'rangeSelectorPlotStrokeColor': true,
- 'showLabelsOnHighlight': true,
- 'showRoller': true,
- 'sigFigs': true,
- 'strokeWidth': true,
- 'underlayCallback': true,
- 'unhighlightCallback': true,
- 'xAxisLabelFormatter': true,
- 'xTicker': true,
- 'xValueFormatter': true,
- 'yAxisLabelFormatter': true,
- 'yValueFormatter': true,
- 'zoomCallback': true
- };
-
- // Assume that we do not require new points.
- // This will change to true if we actually do need new points.
- var requiresNewPoints = false;
-
- // Create a dictionary of series names for faster lookup.
- // If there are no labels, then the dictionary stays empty.
- var seriesNamesDictionary = { };
- if (labels) {
- for (var i = 1; i < labels.length; i++) {
- seriesNamesDictionary[labels[i]] = true;
- }
- }
-
- // Iterate through the list of updated options.
- for (var property in attrs) {
- // Break early if we already know we need new points from a previous option.
- if (requiresNewPoints) {
- break;
- }
- if (attrs.hasOwnProperty(property)) {
- // Find out of this field is actually a series specific options list.
- if (seriesNamesDictionary[property]) {
- // This property value is a list of options for this series.
- // If any of these sub properties are not pixel safe, set the flag.
- for (var subProperty in attrs[property]) {
- // Break early if we already know we need new points from a previous option.
- if (requiresNewPoints) {
- break;
- }
- if (attrs[property].hasOwnProperty(subProperty) && !pixelSafeOptions[subProperty]) {
- requiresNewPoints = true;
- }
- }
- // If this was not a series specific option list, check if its a pixel changing property.
- } else if (!pixelSafeOptions[property]) {
- requiresNewPoints = true;
- }
- }
- }
-
- return requiresNewPoints;
-};
-
-/**
- * Compares two arrays to see if they are equal. If either parameter is not an
- * array it will return false. Does a shallow compare
- * Dygraph.compareArrays([[1,2], [3, 4]], [[1,2], [3,4]]) === false.
- * @param {!Array.<T>} array1 first array
- * @param {!Array.<T>} array2 second array
- * @return {boolean} True if both parameters are arrays, and contents are equal.
- * @template T
- */
-Dygraph.compareArrays = function(array1, array2) {
- if (!Dygraph.isArrayLike(array1) || !Dygraph.isArrayLike(array2)) {
- return false;
- }
- if (array1.length !== array2.length) {
- return false;
- }
- for (var i = 0; i < array1.length; i++) {
- if (array1[i] !== array2[i]) {
- return false;
- }
- }
- return true;
-};
-
-/**
- * @param {!CanvasRenderingContext2D} ctx the canvas context
- * @param {number} sides the number of sides in the shape.
- * @param {number} radius the radius of the image.
- * @param {number} cx center x coordate
- * @param {number} cy center y coordinate
- * @param {number=} rotationRadians the shift of the initial angle, in radians.
- * @param {number=} delta the angle shift for each line. If missing, creates a
- * regular polygon.
- * @private
- */
-Dygraph.regularShape_ = function(
- ctx, sides, radius, cx, cy, rotationRadians, delta) {
- rotationRadians = rotationRadians || 0;
- delta = delta || Math.PI * 2 / sides;
-
- ctx.beginPath();
- var initialAngle = rotationRadians;
- var angle = initialAngle;
-
- var computeCoordinates = function() {
- var x = cx + (Math.sin(angle) * radius);
- var y = cy + (-Math.cos(angle) * radius);
- return [x, y];
- };
-
- var initialCoordinates = computeCoordinates();
- var x = initialCoordinates[0];
- var y = initialCoordinates[1];
- ctx.moveTo(x, y);
-
- for (var idx = 0; idx < sides; idx++) {
- angle = (idx == sides - 1) ? initialAngle : (angle + delta);
- var coords = computeCoordinates();
- ctx.lineTo(coords[0], coords[1]);
- }
- ctx.fill();
- ctx.stroke();
-};
-
-/**
- * TODO(danvk): be more specific on the return type.
- * @param {number} sides
- * @param {number=} rotationRadians
- * @param {number=} delta
- * @return {Function}
- * @private
- */
-Dygraph.shapeFunction_ = function(sides, rotationRadians, delta) {
- return function(g, name, ctx, cx, cy, color, radius) {
- ctx.strokeStyle = color;
- ctx.fillStyle = "white";
- Dygraph.regularShape_(ctx, sides, radius, cx, cy, rotationRadians, delta);
- };
-};
-
-Dygraph.Circles = {
- DEFAULT : function(g, name, ctx, canvasx, canvasy, color, radius) {
- ctx.beginPath();
- ctx.fillStyle = color;
- ctx.arc(canvasx, canvasy, radius, 0, 2 * Math.PI, false);
- ctx.fill();
- },
- TRIANGLE : Dygraph.shapeFunction_(3),
- SQUARE : Dygraph.shapeFunction_(4, Math.PI / 4),
- DIAMOND : Dygraph.shapeFunction_(4),
- PENTAGON : Dygraph.shapeFunction_(5),
- HEXAGON : Dygraph.shapeFunction_(6),
- CIRCLE : function(g, name, ctx, cx, cy, color, radius) {
- ctx.beginPath();
- ctx.strokeStyle = color;
- ctx.fillStyle = "white";
- ctx.arc(cx, cy, radius, 0, 2 * Math.PI, false);
- ctx.fill();
- ctx.stroke();
- },
- STAR : Dygraph.shapeFunction_(5, 0, 4 * Math.PI / 5),
- PLUS : function(g, name, ctx, cx, cy, color, radius) {
- ctx.strokeStyle = color;
-
- ctx.beginPath();
- ctx.moveTo(cx + radius, cy);
- ctx.lineTo(cx - radius, cy);
- ctx.closePath();
- ctx.stroke();
-
- ctx.beginPath();
- ctx.moveTo(cx, cy + radius);
- ctx.lineTo(cx, cy - radius);
- ctx.closePath();
- ctx.stroke();
- },
- EX : function(g, name, ctx, cx, cy, color, radius) {
- ctx.strokeStyle = color;
-
- ctx.beginPath();
- ctx.moveTo(cx + radius, cy + radius);
- ctx.lineTo(cx - radius, cy - radius);
- ctx.closePath();
- ctx.stroke();
-
- ctx.beginPath();
- ctx.moveTo(cx + radius, cy - radius);
- ctx.lineTo(cx - radius, cy + radius);
- ctx.closePath();
- ctx.stroke();
- }
-};
-
-/**
- * To create a "drag" interaction, you typically register a mousedown event
- * handler on the element where the drag begins. In that handler, you register a
- * mouseup handler on the window to determine when the mouse is released,
- * wherever that release happens. This works well, except when the user releases
- * the mouse over an off-domain iframe. In that case, the mouseup event is
- * handled by the iframe and never bubbles up to the window handler.
- *
- * To deal with this issue, we cover iframes with high z-index divs to make sure
- * they don't capture mouseup.
- *
- * Usage:
- * element.addEventListener('mousedown', function() {
- * var tarper = new Dygraph.IFrameTarp();
- * tarper.cover();
- * var mouseUpHandler = function() {
- * ...
- * window.removeEventListener(mouseUpHandler);
- * tarper.uncover();
- * };
- * window.addEventListener('mouseup', mouseUpHandler);
- * };
- *
- * @constructor
- */
-Dygraph.IFrameTarp = function() {
- /** @type {Array.<!HTMLDivElement>} */
- this.tarps = [];
-};
-
-/**
- * Find all the iframes in the document and cover them with high z-index
- * transparent divs.
- */
-Dygraph.IFrameTarp.prototype.cover = function() {
- var iframes = document.getElementsByTagName("iframe");
- for (var i = 0; i < iframes.length; i++) {
- var iframe = iframes[i];
- var x = Dygraph.findPosX(iframe),
- y = Dygraph.findPosY(iframe),
- width = iframe.offsetWidth,
- height = iframe.offsetHeight;
-
- var div = document.createElement("div");
- div.style.position = "absolute";
- div.style.left = x + 'px';
- div.style.top = y + 'px';
- div.style.width = width + 'px';
- div.style.height = height + 'px';
- div.style.zIndex = 999;
- document.body.appendChild(div);
- this.tarps.push(div);
- }
-};
-
-/**
- * Remove all the iframe covers. You should call this in a mouseup handler.
- */
-Dygraph.IFrameTarp.prototype.uncover = function() {
- for (var i = 0; i < this.tarps.length; i++) {
- this.tarps[i].parentNode.removeChild(this.tarps[i]);
- }
- this.tarps = [];
-};
-
-/**
- * Determine whether |data| is delimited by CR, CRLF, LF, LFCR.
- * @param {string} data
- * @return {?string} the delimiter that was detected (or null on failure).
- */
-Dygraph.detectLineDelimiter = function(data) {
- for (var i = 0; i < data.length; i++) {
- var code = data.charAt(i);
- if (code === '\r') {
- // Might actually be "\r\n".
- if (((i + 1) < data.length) && (data.charAt(i + 1) === '\n')) {
- return '\r\n';
- }
- return code;
- }
- if (code === '\n') {
- // Might actually be "\n\r".
- if (((i + 1) < data.length) && (data.charAt(i + 1) === '\r')) {
- return '\n\r';
- }
- return code;
- }
- }
-
- return null;
-};
-
-/**
- * Is one node contained by another?
- * @param {Node} containee The contained node.
- * @param {Node} container The container node.
- * @return {boolean} Whether containee is inside (or equal to) container.
- * @private
- */
-Dygraph.isNodeContainedBy = function(containee, container) {
- if (container === null || containee === null) {
- return false;
- }
- var containeeNode = /** @type {Node} */ (containee);
- while (containeeNode && containeeNode !== container) {
- containeeNode = containeeNode.parentNode;
- }
- return (containeeNode === container);
-};
-
-
-// This masks some numeric issues in older versions of Firefox,
-// where 1.0/Math.pow(10,2) != Math.pow(10,-2).
-/** @type {function(number,number):number} */
-Dygraph.pow = function(base, exp) {
- if (exp < 0) {
- return 1.0 / Math.pow(base, -exp);
- }
- return Math.pow(base, exp);
-};
-
-// For Dygraph.setDateSameTZ, below.
-Dygraph.dateSetters = {
- ms: Date.prototype.setMilliseconds,
- s: Date.prototype.setSeconds,
- m: Date.prototype.setMinutes,
- h: Date.prototype.setHours
-};
-
-/**
- * This is like calling d.setSeconds(), d.setMinutes(), etc, except that it
- * adjusts for time zone changes to keep the date/time parts consistent.
- *
- * For example, d.getSeconds(), d.getMinutes() and d.getHours() will all be
- * the same before/after you call setDateSameTZ(d, {ms: 0}). The same is not
- * true if you call d.setMilliseconds(0).
- *
- * @type {function(!Date, Object.<number>)}
- */
-Dygraph.setDateSameTZ = function(d, parts) {
- var tz = d.getTimezoneOffset();
- for (var k in parts) {
- if (!parts.hasOwnProperty(k)) continue;
- var setter = Dygraph.dateSetters[k];
- if (!setter) throw "Invalid setter: " + k;
- setter.call(d, parts[k]);
- if (d.getTimezoneOffset() != tz) {
- d.setTime(d.getTime() + (tz - d.getTimezoneOffset()) * 60 * 1000);
- }
- }
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph.js
deleted file mode 100644
index 1ee711ca..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/dygraph.js
+++ /dev/null
@@ -1,3857 +0,0 @@
-/**
- * @license
- * Copyright 2006 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/**
- * @fileoverview Creates an interactive, zoomable graph based on a CSV file or
- * string. Dygraph can handle multiple series with or without error bars. The
- * date/value ranges will be automatically set. Dygraph uses the
- * &lt;canvas&gt; tag, so it only works in FF1.5+.
- * @author danvdk@gmail.com (Dan Vanderkam)
-
- Usage:
- <div id="graphdiv" style="width:800px; height:500px;"></div>
- <script type="text/javascript">
- new Dygraph(document.getElementById("graphdiv"),
- "datafile.csv", // CSV file with headers
- { }); // options
- </script>
-
- The CSV file is of the form
-
- Date,SeriesA,SeriesB,SeriesC
- YYYYMMDD,A1,B1,C1
- YYYYMMDD,A2,B2,C2
-
- If the 'errorBars' option is set in the constructor, the input should be of
- the form
- Date,SeriesA,SeriesB,...
- YYYYMMDD,A1,sigmaA1,B1,sigmaB1,...
- YYYYMMDD,A2,sigmaA2,B2,sigmaB2,...
-
- If the 'fractions' option is set, the input should be of the form:
-
- Date,SeriesA,SeriesB,...
- YYYYMMDD,A1/B1,A2/B2,...
- YYYYMMDD,A1/B1,A2/B2,...
-
- And error bars will be calculated automatically using a binomial distribution.
-
- For further documentation and examples, see http://dygraphs.com/
-
- */
-
-/*jshint globalstrict: true */
-/*global DygraphLayout:false, DygraphCanvasRenderer:false, DygraphOptions:false, G_vmlCanvasManager:false */
-"use strict";
-
-/**
- * Creates an interactive, zoomable chart.
- *
- * @constructor
- * @param {div | String} div A div or the id of a div into which to construct
- * the chart.
- * @param {String | Function} file A file containing CSV data or a function
- * that returns this data. The most basic expected format for each line is
- * "YYYY/MM/DD,val1,val2,...". For more information, see
- * http://dygraphs.com/data.html.
- * @param {Object} attrs Various other attributes, e.g. errorBars determines
- * whether the input data contains error ranges. For a complete list of
- * options, see http://dygraphs.com/options.html.
- */
-var Dygraph = function(div, data, opts, opt_fourth_param) {
- if (opt_fourth_param !== undefined) {
- // Old versions of dygraphs took in the series labels as a constructor
- // parameter. This doesn't make sense anymore, but it's easy to continue
- // to support this usage.
- this.warn("Using deprecated four-argument dygraph constructor");
- this.__old_init__(div, data, opts, opt_fourth_param);
- } else {
- this.__init__(div, data, opts);
- }
-};
-
-Dygraph.NAME = "Dygraph";
-Dygraph.VERSION = "1.2";
-Dygraph.__repr__ = function() {
- return "[" + this.NAME + " " + this.VERSION + "]";
-};
-
-/**
- * Returns information about the Dygraph class.
- */
-Dygraph.toString = function() {
- return this.__repr__();
-};
-
-// Various default values
-Dygraph.DEFAULT_ROLL_PERIOD = 1;
-Dygraph.DEFAULT_WIDTH = 480;
-Dygraph.DEFAULT_HEIGHT = 320;
-
-// For max 60 Hz. animation:
-Dygraph.ANIMATION_STEPS = 12;
-Dygraph.ANIMATION_DURATION = 200;
-
-// Label constants for the labelsKMB and labelsKMG2 options.
-// (i.e. '100000' -> '100K')
-Dygraph.KMB_LABELS = [ 'K', 'M', 'B', 'T', 'Q' ];
-Dygraph.KMG2_BIG_LABELS = [ 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y' ];
-Dygraph.KMG2_SMALL_LABELS = [ 'm', 'u', 'n', 'p', 'f', 'a', 'z', 'y' ];
-
-// These are defined before DEFAULT_ATTRS so that it can refer to them.
-/**
- * @private
- * Return a string version of a number. This respects the digitsAfterDecimal
- * and maxNumberWidth options.
- * @param {Number} x The number to be formatted
- * @param {Dygraph} opts An options view
- * @param {String} name The name of the point's data series
- * @param {Dygraph} g The dygraph object
- */
-Dygraph.numberValueFormatter = function(x, opts, pt, g) {
- var sigFigs = opts('sigFigs');
-
- if (sigFigs !== null) {
- // User has opted for a fixed number of significant figures.
- return Dygraph.floatFormat(x, sigFigs);
- }
-
- var digits = opts('digitsAfterDecimal');
- var maxNumberWidth = opts('maxNumberWidth');
-
- var kmb = opts('labelsKMB');
- var kmg2 = opts('labelsKMG2');
-
- var label;
-
- // switch to scientific notation if we underflow or overflow fixed display.
- if (x !== 0.0 &&
- (Math.abs(x) >= Math.pow(10, maxNumberWidth) ||
- Math.abs(x) < Math.pow(10, -digits))) {
- label = x.toExponential(digits);
- } else {
- label = '' + Dygraph.round_(x, digits);
- }
-
- if (kmb || kmg2) {
- var k;
- var k_labels = [];
- var m_labels = [];
- if (kmb) {
- k = 1000;
- k_labels = Dygraph.KMB_LABELS;
- }
- if (kmg2) {
- if (kmb) Dygraph.warn("Setting both labelsKMB and labelsKMG2. Pick one!");
- k = 1024;
- k_labels = Dygraph.KMG2_BIG_LABELS;
- m_labels = Dygraph.KMG2_SMALL_LABELS;
- }
-
- var absx = Math.abs(x);
- var n = Dygraph.pow(k, k_labels.length);
- for (var j = k_labels.length - 1; j >= 0; j--, n /= k) {
- if (absx >= n) {
- label = Dygraph.round_(x / n, digits) + k_labels[j];
- break;
- }
- }
- if (kmg2) {
- // TODO(danvk): clean up this logic. Why so different than kmb?
- var x_parts = String(x.toExponential()).split('e-');
- if (x_parts.length === 2 && x_parts[1] >= 3 && x_parts[1] <= 24) {
- if (x_parts[1] % 3 > 0) {
- label = Dygraph.round_(x_parts[0] /
- Dygraph.pow(10, (x_parts[1] % 3)),
- digits);
- } else {
- label = Number(x_parts[0]).toFixed(2);
- }
- label += m_labels[Math.floor(x_parts[1] / 3) - 1];
- }
- }
- }
-
- return label;
-};
-
-/**
- * variant for use as an axisLabelFormatter.
- * @private
- */
-Dygraph.numberAxisLabelFormatter = function(x, granularity, opts, g) {
- return Dygraph.numberValueFormatter(x, opts, g);
-};
-
-/**
- * Convert a JS date (millis since epoch) to YYYY/MM/DD
- * @param {Number} date The JavaScript date (ms since epoch)
- * @return {String} A date of the form "YYYY/MM/DD"
- * @private
- */
-Dygraph.dateString_ = function(date) {
- var zeropad = Dygraph.zeropad;
- var d = new Date(date);
-
- // Get the year:
- var year = "" + d.getFullYear();
- // Get a 0 padded month string
- var month = zeropad(d.getMonth() + 1); //months are 0-offset, sigh
- // Get a 0 padded day string
- var day = zeropad(d.getDate());
-
- var ret = "";
- var frac = d.getHours() * 3600 + d.getMinutes() * 60 + d.getSeconds();
- if (frac) ret = " " + Dygraph.hmsString_(date);
-
- return year + "/" + month + "/" + day + ret;
-};
-
-/**
- * Convert a JS date to a string appropriate to display on an axis that
- * is displaying values at the stated granularity.
- * @param {Date} date The date to format
- * @param {Number} granularity One of the Dygraph granularity constants
- * @return {String} The formatted date
- * @private
- */
-Dygraph.dateAxisFormatter = function(date, granularity) {
- if (granularity >= Dygraph.DECADAL) {
- return date.strftime('%Y');
- } else if (granularity >= Dygraph.MONTHLY) {
- return date.strftime('%b %y');
- } else {
- var frac = date.getHours() * 3600 + date.getMinutes() * 60 + date.getSeconds() + date.getMilliseconds();
- if (frac === 0 || granularity >= Dygraph.DAILY) {
- return new Date(date.getTime() + 3600*1000).strftime('%d%b');
- } else {
- return Dygraph.hmsString_(date.getTime());
- }
- }
-};
-
-/**
- * Standard plotters. These may be used by clients.
- * Available plotters are:
- * - Dygraph.Plotters.linePlotter: draws central lines (most common)
- * - Dygraph.Plotters.errorPlotter: draws error bars
- * - Dygraph.Plotters.fillPlotter: draws fills under lines (used with fillGraph)
- *
- * By default, the plotter is [fillPlotter, errorPlotter, linePlotter].
- * This causes all the lines to be drawn over all the fills/error bars.
- */
-Dygraph.Plotters = DygraphCanvasRenderer._Plotters;
-
-
-// Default attribute values.
-Dygraph.DEFAULT_ATTRS = {
- highlightCircleSize: 3,
- highlightSeriesOpts: null,
- highlightSeriesBackgroundAlpha: 0.5,
-
- labelsDivWidth: 250,
- labelsDivStyles: {
- // TODO(danvk): move defaults from createStatusMessage_ here.
- },
- labelsSeparateLines: false,
- labelsShowZeroValues: true,
- labelsKMB: false,
- labelsKMG2: false,
- showLabelsOnHighlight: true,
-
- digitsAfterDecimal: 2,
- maxNumberWidth: 6,
- sigFigs: null,
-
- strokeWidth: 1.0,
- strokeBorderWidth: 0,
- strokeBorderColor: "white",
-
- axisTickSize: 3,
- axisLabelFontSize: 14,
- xAxisLabelWidth: 50,
- yAxisLabelWidth: 50,
- rightGap: 5,
-
- showRoller: false,
- xValueParser: Dygraph.dateParser,
-
- delimiter: ',',
-
- sigma: 2.0,
- errorBars: false,
- fractions: false,
- wilsonInterval: true, // only relevant if fractions is true
- customBars: false,
- fillGraph: false,
- fillAlpha: 0.15,
- connectSeparatedPoints: false,
-
- stackedGraph: false,
- stackedGraphNaNFill: 'all',
- hideOverlayOnMouseOut: true,
-
- // TODO(danvk): support 'onmouseover' and 'never', and remove synonyms.
- legend: 'onmouseover', // the only relevant value at the moment is 'always'.
-
- stepPlot: false,
- avoidMinZero: false,
- xRangePad: 0,
- yRangePad: null,
- drawAxesAtZero: false,
-
- // Sizes of the various chart labels.
- titleHeight: 28,
- xLabelHeight: 18,
- yLabelWidth: 18,
-
- drawXAxis: true,
- drawYAxis: true,
- axisLineColor: "black",
- axisLineWidth: 0.3,
- gridLineWidth: 0.3,
- axisLabelColor: "black",
- axisLabelFont: "Arial", // TODO(danvk): is this implemented?
- axisLabelWidth: 50,
- drawYGrid: true,
- drawXGrid: true,
- gridLineColor: "rgb(128,128,128)",
-
- interactionModel: null, // will be set to Dygraph.Interaction.defaultModel
- animatedZooms: false, // (for now)
-
- // Range selector options
- showRangeSelector: false,
- rangeSelectorHeight: 40,
- rangeSelectorPlotStrokeColor: "#808FAB",
- rangeSelectorPlotFillColor: "#A7B1C4",
-
- // The ordering here ensures that central lines always appear above any
- // fill bars/error bars.
- plotter: [
- Dygraph.Plotters.fillPlotter,
- Dygraph.Plotters.errorPlotter,
- Dygraph.Plotters.linePlotter
- ],
-
- plugins: [ ],
-
- // per-axis options
- axes: {
- x: {
- pixelsPerLabel: 60,
- axisLabelFormatter: Dygraph.dateAxisFormatter,
- valueFormatter: Dygraph.dateString_,
- drawGrid: true,
- independentTicks: true,
- ticker: null // will be set in dygraph-tickers.js
- },
- y: {
- pixelsPerLabel: 30,
- valueFormatter: Dygraph.numberValueFormatter,
- axisLabelFormatter: Dygraph.numberAxisLabelFormatter,
- drawGrid: true,
- independentTicks: true,
- ticker: null // will be set in dygraph-tickers.js
- },
- y2: {
- pixelsPerLabel: 30,
- valueFormatter: Dygraph.numberValueFormatter,
- axisLabelFormatter: Dygraph.numberAxisLabelFormatter,
- drawGrid: false,
- independentTicks: false,
- ticker: null // will be set in dygraph-tickers.js
- }
- }
-};
-
-// Directions for panning and zooming. Use bit operations when combined
-// values are possible.
-Dygraph.HORIZONTAL = 1;
-Dygraph.VERTICAL = 2;
-
-// Installed plugins, in order of precedence (most-general to most-specific).
-// Plugins are installed after they are defined, in plugins/install.js.
-Dygraph.PLUGINS = [
-];
-
-// Used for initializing annotation CSS rules only once.
-Dygraph.addedAnnotationCSS = false;
-
-Dygraph.prototype.__old_init__ = function(div, file, labels, attrs) {
- // Labels is no longer a constructor parameter, since it's typically set
- // directly from the data source. It also conains a name for the x-axis,
- // which the previous constructor form did not.
- if (labels !== null) {
- var new_labels = ["Date"];
- for (var i = 0; i < labels.length; i++) new_labels.push(labels[i]);
- Dygraph.update(attrs, { 'labels': new_labels });
- }
- this.__init__(div, file, attrs);
-};
-
-/**
- * Initializes the Dygraph. This creates a new DIV and constructs the PlotKit
- * and context &lt;canvas&gt; inside of it. See the constructor for details.
- * on the parameters.
- * @param {Element} div the Element to render the graph into.
- * @param {String | Function} file Source data
- * @param {Object} attrs Miscellaneous other options
- * @private
- */
-Dygraph.prototype.__init__ = function(div, file, attrs) {
- // Hack for IE: if we're using excanvas and the document hasn't finished
- // loading yet (and hence may not have initialized whatever it needs to
- // initialize), then keep calling this routine periodically until it has.
- if (/MSIE/.test(navigator.userAgent) && !window.opera &&
- typeof(G_vmlCanvasManager) != 'undefined' &&
- document.readyState != 'complete') {
- var self = this;
- setTimeout(function() { self.__init__(div, file, attrs); }, 100);
- return;
- }
-
- // Support two-argument constructor
- if (attrs === null || attrs === undefined) { attrs = {}; }
-
- attrs = Dygraph.mapLegacyOptions_(attrs);
-
- if (typeof(div) == 'string') {
- div = document.getElementById(div);
- }
-
- if (!div) {
- Dygraph.error("Constructing dygraph with a non-existent div!");
- return;
- }
-
- this.isUsingExcanvas_ = typeof(G_vmlCanvasManager) != 'undefined';
-
- // Copy the important bits into the object
- // TODO(danvk): most of these should just stay in the attrs_ dictionary.
- this.maindiv_ = div;
- this.file_ = file;
- this.rollPeriod_ = attrs.rollPeriod || Dygraph.DEFAULT_ROLL_PERIOD;
- this.previousVerticalX_ = -1;
- this.fractions_ = attrs.fractions || false;
- this.dateWindow_ = attrs.dateWindow || null;
-
- this.is_initial_draw_ = true;
- this.annotations_ = [];
-
- // Zoomed indicators - These indicate when the graph has been zoomed and on what axis.
- this.zoomed_x_ = false;
- this.zoomed_y_ = false;
-
- // Clear the div. This ensure that, if multiple dygraphs are passed the same
- // div, then only one will be drawn.
- div.innerHTML = "";
-
- // For historical reasons, the 'width' and 'height' options trump all CSS
- // rules _except_ for an explicit 'width' or 'height' on the div.
- // As an added convenience, if the div has zero height (like <div></div> does
- // without any styles), then we use a default height/width.
- if (div.style.width === '' && attrs.width) {
- div.style.width = attrs.width + "px";
- }
- if (div.style.height === '' && attrs.height) {
- div.style.height = attrs.height + "px";
- }
- if (div.style.height === '' && div.clientHeight === 0) {
- div.style.height = Dygraph.DEFAULT_HEIGHT + "px";
- if (div.style.width === '') {
- div.style.width = Dygraph.DEFAULT_WIDTH + "px";
- }
- }
- // These will be zero if the dygraph's div is hidden. In that case,
- // use the user-specified attributes if present. If not, use zero
- // and assume the user will call resize to fix things later.
- this.width_ = div.clientWidth || attrs.width || 0;
- this.height_ = div.clientHeight || attrs.height || 0;
-
- // TODO(danvk): set fillGraph to be part of attrs_ here, not user_attrs_.
- if (attrs.stackedGraph) {
- attrs.fillGraph = true;
- // TODO(nikhilk): Add any other stackedGraph checks here.
- }
-
- // DEPRECATION WARNING: All option processing should be moved from
- // attrs_ and user_attrs_ to options_, which holds all this information.
- //
- // Dygraphs has many options, some of which interact with one another.
- // To keep track of everything, we maintain two sets of options:
- //
- // this.user_attrs_ only options explicitly set by the user.
- // this.attrs_ defaults, options derived from user_attrs_, data.
- //
- // Options are then accessed this.attr_('attr'), which first looks at
- // user_attrs_ and then computed attrs_. This way Dygraphs can set intelligent
- // defaults without overriding behavior that the user specifically asks for.
- this.user_attrs_ = {};
- Dygraph.update(this.user_attrs_, attrs);
-
- // This sequence ensures that Dygraph.DEFAULT_ATTRS is never modified.
- this.attrs_ = {};
- Dygraph.updateDeep(this.attrs_, Dygraph.DEFAULT_ATTRS);
-
- this.boundaryIds_ = [];
- this.setIndexByName_ = {};
- this.datasetIndex_ = [];
-
- this.registeredEvents_ = [];
- this.eventListeners_ = {};
-
- this.attributes_ = new DygraphOptions(this);
-
- // Create the containing DIV and other interactive elements
- this.createInterface_();
-
- // Activate plugins.
- this.plugins_ = [];
- var plugins = Dygraph.PLUGINS.concat(this.getOption('plugins'));
- for (var i = 0; i < plugins.length; i++) {
- var Plugin = plugins[i];
- var pluginInstance = new Plugin();
- var pluginDict = {
- plugin: pluginInstance,
- events: {},
- options: {},
- pluginOptions: {}
- };
-
- var handlers = pluginInstance.activate(this);
- for (var eventName in handlers) {
- // TODO(danvk): validate eventName.
- pluginDict.events[eventName] = handlers[eventName];
- }
-
- this.plugins_.push(pluginDict);
- }
-
- // At this point, plugins can no longer register event handlers.
- // Construct a map from event -> ordered list of [callback, plugin].
- for (var i = 0; i < this.plugins_.length; i++) {
- var plugin_dict = this.plugins_[i];
- for (var eventName in plugin_dict.events) {
- if (!plugin_dict.events.hasOwnProperty(eventName)) continue;
- var callback = plugin_dict.events[eventName];
-
- var pair = [plugin_dict.plugin, callback];
- if (!(eventName in this.eventListeners_)) {
- this.eventListeners_[eventName] = [pair];
- } else {
- this.eventListeners_[eventName].push(pair);
- }
- }
- }
-
- this.createDragInterface_();
-
- this.start_();
-};
-
-/**
- * Triggers a cascade of events to the various plugins which are interested in them.
- * Returns true if the "default behavior" should be performed, i.e. if none of
- * the event listeners called event.preventDefault().
- * @private
- */
-Dygraph.prototype.cascadeEvents_ = function(name, extra_props) {
- if (!(name in this.eventListeners_)) return true;
-
- // QUESTION: can we use objects & prototypes to speed this up?
- var e = {
- dygraph: this,
- cancelable: false,
- defaultPrevented: false,
- preventDefault: function() {
- if (!e.cancelable) throw "Cannot call preventDefault on non-cancelable event.";
- e.defaultPrevented = true;
- },
- propagationStopped: false,
- stopPropagation: function() {
- e.propagationStopped = true;
- }
- };
- Dygraph.update(e, extra_props);
-
- var callback_plugin_pairs = this.eventListeners_[name];
- if (callback_plugin_pairs) {
- for (var i = callback_plugin_pairs.length - 1; i >= 0; i--) {
- var plugin = callback_plugin_pairs[i][0];
- var callback = callback_plugin_pairs[i][1];
- callback.call(plugin, e);
- if (e.propagationStopped) break;
- }
- }
- return e.defaultPrevented;
-};
-
-/**
- * Returns the zoomed status of the chart for one or both axes.
- *
- * Axis is an optional parameter. Can be set to 'x' or 'y'.
- *
- * The zoomed status for an axis is set whenever a user zooms using the mouse
- * or when the dateWindow or valueRange are updated (unless the
- * isZoomedIgnoreProgrammaticZoom option is also specified).
- */
-Dygraph.prototype.isZoomed = function(axis) {
- if (axis === null || axis === undefined) {
- return this.zoomed_x_ || this.zoomed_y_;
- }
- if (axis === 'x') return this.zoomed_x_;
- if (axis === 'y') return this.zoomed_y_;
- throw "axis parameter is [" + axis + "] must be null, 'x' or 'y'.";
-};
-
-/**
- * Returns information about the Dygraph object, including its containing ID.
- */
-Dygraph.prototype.toString = function() {
- var maindiv = this.maindiv_;
- var id = (maindiv && maindiv.id) ? maindiv.id : maindiv;
- return "[Dygraph " + id + "]";
-};
-
-/**
- * @private
- * Returns the value of an option. This may be set by the user (either in the
- * constructor or by calling updateOptions) or by dygraphs, and may be set to a
- * per-series value.
- * @param { String } name The name of the option, e.g. 'rollPeriod'.
- * @param { String } [seriesName] The name of the series to which the option
- * will be applied. If no per-series value of this option is available, then
- * the global value is returned. This is optional.
- * @return { ... } The value of the option.
- */
-Dygraph.prototype.attr_ = function(name, seriesName) {
-// <REMOVE_FOR_COMBINED>
- if (typeof(Dygraph.OPTIONS_REFERENCE) === 'undefined') {
- this.error('Must include options reference JS for testing');
- } else if (!Dygraph.OPTIONS_REFERENCE.hasOwnProperty(name)) {
- this.error('Dygraphs is using property ' + name + ', which has no entry ' +
- 'in the Dygraphs.OPTIONS_REFERENCE listing.');
- // Only log this error once.
- Dygraph.OPTIONS_REFERENCE[name] = true;
- }
-// </REMOVE_FOR_COMBINED>
- return seriesName ? this.attributes_.getForSeries(name, seriesName) : this.attributes_.get(name);
-};
-
-/**
- * Returns the current value for an option, as set in the constructor or via
- * updateOptions. You may pass in an (optional) series name to get per-series
- * values for the option.
- *
- * All values returned by this method should be considered immutable. If you
- * modify them, there is no guarantee that the changes will be honored or that
- * dygraphs will remain in a consistent state. If you want to modify an option,
- * use updateOptions() instead.
- *
- * @param { String } name The name of the option (e.g. 'strokeWidth')
- * @param { String } [opt_seriesName] Series name to get per-series values.
- * @return { ... } The value of the option.
- */
-Dygraph.prototype.getOption = function(name, opt_seriesName) {
- return this.attr_(name, opt_seriesName);
-};
-
-Dygraph.prototype.getOptionForAxis = function(name, axis) {
- return this.attributes_.getForAxis(name, axis);
-};
-
-/**
- * @private
- * @param String} axis The name of the axis (i.e. 'x', 'y' or 'y2')
- * @return { ... } A function mapping string -> option value
- */
-Dygraph.prototype.optionsViewForAxis_ = function(axis) {
- var self = this;
- return function(opt) {
- var axis_opts = self.user_attrs_.axes;
- if (axis_opts && axis_opts[axis] && axis_opts[axis].hasOwnProperty(opt)) {
- return axis_opts[axis][opt];
- }
- // user-specified attributes always trump defaults, even if they're less
- // specific.
- if (typeof(self.user_attrs_[opt]) != 'undefined') {
- return self.user_attrs_[opt];
- }
-
- axis_opts = self.attrs_.axes;
- if (axis_opts && axis_opts[axis] && axis_opts[axis].hasOwnProperty(opt)) {
- return axis_opts[axis][opt];
- }
- // check old-style axis options
- // TODO(danvk): add a deprecation warning if either of these match.
- if (axis == 'y' && self.axes_[0].hasOwnProperty(opt)) {
- return self.axes_[0][opt];
- } else if (axis == 'y2' && self.axes_[1].hasOwnProperty(opt)) {
- return self.axes_[1][opt];
- }
- return self.attr_(opt);
- };
-};
-
-/**
- * Returns the current rolling period, as set by the user or an option.
- * @return {Number} The number of points in the rolling window
- */
-Dygraph.prototype.rollPeriod = function() {
- return this.rollPeriod_;
-};
-
-/**
- * Returns the currently-visible x-range. This can be affected by zooming,
- * panning or a call to updateOptions.
- * Returns a two-element array: [left, right].
- * If the Dygraph has dates on the x-axis, these will be millis since epoch.
- */
-Dygraph.prototype.xAxisRange = function() {
- return this.dateWindow_ ? this.dateWindow_ : this.xAxisExtremes();
-};
-
-/**
- * Returns the lower- and upper-bound x-axis values of the
- * data set.
- */
-Dygraph.prototype.xAxisExtremes = function() {
- var pad = this.attr_('xRangePad') / this.plotter_.area.w;
- if (this.numRows() === 0) {
- return [0 - pad, 1 + pad];
- }
- var left = this.rawData_[0][0];
- var right = this.rawData_[this.rawData_.length - 1][0];
- if (pad) {
- // Must keep this in sync with dygraph-layout _evaluateLimits()
- var range = right - left;
- left -= range * pad;
- right += range * pad;
- }
- return [left, right];
-};
-
-/**
- * Returns the currently-visible y-range for an axis. This can be affected by
- * zooming, panning or a call to updateOptions. Axis indices are zero-based. If
- * called with no arguments, returns the range of the first axis.
- * Returns a two-element array: [bottom, top].
- */
-Dygraph.prototype.yAxisRange = function(idx) {
- if (typeof(idx) == "undefined") idx = 0;
- if (idx < 0 || idx >= this.axes_.length) {
- return null;
- }
- var axis = this.axes_[idx];
- return [ axis.computedValueRange[0], axis.computedValueRange[1] ];
-};
-
-/**
- * Returns the currently-visible y-ranges for each axis. This can be affected by
- * zooming, panning, calls to updateOptions, etc.
- * Returns an array of [bottom, top] pairs, one for each y-axis.
- */
-Dygraph.prototype.yAxisRanges = function() {
- var ret = [];
- for (var i = 0; i < this.axes_.length; i++) {
- ret.push(this.yAxisRange(i));
- }
- return ret;
-};
-
-// TODO(danvk): use these functions throughout dygraphs.
-/**
- * Convert from data coordinates to canvas/div X/Y coordinates.
- * If specified, do this conversion for the coordinate system of a particular
- * axis. Uses the first axis by default.
- * Returns a two-element array: [X, Y]
- *
- * Note: use toDomXCoord instead of toDomCoords(x, null) and use toDomYCoord
- * instead of toDomCoords(null, y, axis).
- */
-Dygraph.prototype.toDomCoords = function(x, y, axis) {
- return [ this.toDomXCoord(x), this.toDomYCoord(y, axis) ];
-};
-
-/**
- * Convert from data x coordinates to canvas/div X coordinate.
- * If specified, do this conversion for the coordinate system of a particular
- * axis.
- * Returns a single value or null if x is null.
- */
-Dygraph.prototype.toDomXCoord = function(x) {
- if (x === null) {
- return null;
- }
-
- var area = this.plotter_.area;
- var xRange = this.xAxisRange();
- return area.x + (x - xRange[0]) / (xRange[1] - xRange[0]) * area.w;
-};
-
-/**
- * Convert from data x coordinates to canvas/div Y coordinate and optional
- * axis. Uses the first axis by default.
- *
- * returns a single value or null if y is null.
- */
-Dygraph.prototype.toDomYCoord = function(y, axis) {
- var pct = this.toPercentYCoord(y, axis);
-
- if (pct === null) {
- return null;
- }
- var area = this.plotter_.area;
- return area.y + pct * area.h;
-};
-
-/**
- * Convert from canvas/div coords to data coordinates.
- * If specified, do this conversion for the coordinate system of a particular
- * axis. Uses the first axis by default.
- * Returns a two-element array: [X, Y].
- *
- * Note: use toDataXCoord instead of toDataCoords(x, null) and use toDataYCoord
- * instead of toDataCoords(null, y, axis).
- */
-Dygraph.prototype.toDataCoords = function(x, y, axis) {
- return [ this.toDataXCoord(x), this.toDataYCoord(y, axis) ];
-};
-
-/**
- * Convert from canvas/div x coordinate to data coordinate.
- *
- * If x is null, this returns null.
- */
-Dygraph.prototype.toDataXCoord = function(x) {
- if (x === null) {
- return null;
- }
-
- var area = this.plotter_.area;
- var xRange = this.xAxisRange();
- return xRange[0] + (x - area.x) / area.w * (xRange[1] - xRange[0]);
-};
-
-/**
- * Convert from canvas/div y coord to value.
- *
- * If y is null, this returns null.
- * if axis is null, this uses the first axis.
- */
-Dygraph.prototype.toDataYCoord = function(y, axis) {
- if (y === null) {
- return null;
- }
-
- var area = this.plotter_.area;
- var yRange = this.yAxisRange(axis);
-
- if (typeof(axis) == "undefined") axis = 0;
- if (!this.axes_[axis].logscale) {
- return yRange[0] + (area.y + area.h - y) / area.h * (yRange[1] - yRange[0]);
- } else {
- // Computing the inverse of toDomCoord.
- var pct = (y - area.y) / area.h;
-
- // Computing the inverse of toPercentYCoord. The function was arrived at with
- // the following steps:
- //
- // Original calcuation:
- // pct = (logr1 - Dygraph.log10(y)) / (logr1 - Dygraph.log10(yRange[0]));
- //
- // Move denominator to both sides:
- // pct * (logr1 - Dygraph.log10(yRange[0])) = logr1 - Dygraph.log10(y);
- //
- // subtract logr1, and take the negative value.
- // logr1 - (pct * (logr1 - Dygraph.log10(yRange[0]))) = Dygraph.log10(y);
- //
- // Swap both sides of the equation, and we can compute the log of the
- // return value. Which means we just need to use that as the exponent in
- // e^exponent.
- // Dygraph.log10(y) = logr1 - (pct * (logr1 - Dygraph.log10(yRange[0])));
-
- var logr1 = Dygraph.log10(yRange[1]);
- var exponent = logr1 - (pct * (logr1 - Dygraph.log10(yRange[0])));
- var value = Math.pow(Dygraph.LOG_SCALE, exponent);
- return value;
- }
-};
-
-/**
- * Converts a y for an axis to a percentage from the top to the
- * bottom of the drawing area.
- *
- * If the coordinate represents a value visible on the canvas, then
- * the value will be between 0 and 1, where 0 is the top of the canvas.
- * However, this method will return values outside the range, as
- * values can fall outside the canvas.
- *
- * If y is null, this returns null.
- * if axis is null, this uses the first axis.
- *
- * @param { Number } y The data y-coordinate.
- * @param { Number } [axis] The axis number on which the data coordinate lives.
- * @return { Number } A fraction in [0, 1] where 0 = the top edge.
- */
-Dygraph.prototype.toPercentYCoord = function(y, axis) {
- if (y === null) {
- return null;
- }
- if (typeof(axis) == "undefined") axis = 0;
-
- var yRange = this.yAxisRange(axis);
-
- var pct;
- var logscale = this.attributes_.getForAxis("logscale", axis);
- if (!logscale) {
- // yRange[1] - y is unit distance from the bottom.
- // yRange[1] - yRange[0] is the scale of the range.
- // (yRange[1] - y) / (yRange[1] - yRange[0]) is the % from the bottom.
- pct = (yRange[1] - y) / (yRange[1] - yRange[0]);
- } else {
- var logr1 = Dygraph.log10(yRange[1]);
- pct = (logr1 - Dygraph.log10(y)) / (logr1 - Dygraph.log10(yRange[0]));
- }
- return pct;
-};
-
-/**
- * Converts an x value to a percentage from the left to the right of
- * the drawing area.
- *
- * If the coordinate represents a value visible on the canvas, then
- * the value will be between 0 and 1, where 0 is the left of the canvas.
- * However, this method will return values outside the range, as
- * values can fall outside the canvas.
- *
- * If x is null, this returns null.
- * @param { Number } x The data x-coordinate.
- * @return { Number } A fraction in [0, 1] where 0 = the left edge.
- */
-Dygraph.prototype.toPercentXCoord = function(x) {
- if (x === null) {
- return null;
- }
-
- var xRange = this.xAxisRange();
- return (x - xRange[0]) / (xRange[1] - xRange[0]);
-};
-
-/**
- * Returns the number of columns (including the independent variable).
- * @return { Integer } The number of columns.
- */
-Dygraph.prototype.numColumns = function() {
- if (!this.rawData_) return 0;
- return this.rawData_[0] ? this.rawData_[0].length : this.attr_("labels").length;
-};
-
-/**
- * Returns the number of rows (excluding any header/label row).
- * @return { Integer } The number of rows, less any header.
- */
-Dygraph.prototype.numRows = function() {
- if (!this.rawData_) return 0;
- return this.rawData_.length;
-};
-
-/**
- * Returns the value in the given row and column. If the row and column exceed
- * the bounds on the data, returns null. Also returns null if the value is
- * missing.
- * @param { Number} row The row number of the data (0-based). Row 0 is the
- * first row of data, not a header row.
- * @param { Number} col The column number of the data (0-based)
- * @return { Number } The value in the specified cell or null if the row/col
- * were out of range.
- */
-Dygraph.prototype.getValue = function(row, col) {
- if (row < 0 || row > this.rawData_.length) return null;
- if (col < 0 || col > this.rawData_[row].length) return null;
-
- return this.rawData_[row][col];
-};
-
-/**
- * Generates interface elements for the Dygraph: a containing div, a div to
- * display the current point, and a textbox to adjust the rolling average
- * period. Also creates the Renderer/Layout elements.
- * @private
- */
-Dygraph.prototype.createInterface_ = function() {
- // Create the all-enclosing graph div
- var enclosing = this.maindiv_;
-
- this.graphDiv = document.createElement("div");
-
- // TODO(danvk): any other styles that are useful to set here?
- this.graphDiv.style.textAlign = 'left'; // This is a CSS "reset"
- enclosing.appendChild(this.graphDiv);
-
- // Create the canvas for interactive parts of the chart.
- this.canvas_ = Dygraph.createCanvas();
- this.canvas_.style.position = "absolute";
-
- // ... and for static parts of the chart.
- this.hidden_ = this.createPlotKitCanvas_(this.canvas_);
-
- this.resizeElements_();
-
- this.canvas_ctx_ = Dygraph.getContext(this.canvas_);
- this.hidden_ctx_ = Dygraph.getContext(this.hidden_);
-
- // The interactive parts of the graph are drawn on top of the chart.
- this.graphDiv.appendChild(this.hidden_);
- this.graphDiv.appendChild(this.canvas_);
- this.mouseEventElement_ = this.createMouseEventElement_();
-
- // Create the grapher
- this.layout_ = new DygraphLayout(this);
-
- var dygraph = this;
-
- this.mouseMoveHandler_ = function(e) {
- dygraph.mouseMove_(e);
- };
-
- this.mouseOutHandler_ = function(e) {
- // The mouse has left the chart if:
- // 1. e.target is inside the chart
- // 2. e.relatedTarget is outside the chart
- var target = e.target || e.fromElement;
- var relatedTarget = e.relatedTarget || e.toElement;
- if (Dygraph.isNodeContainedBy(target, dygraph.graphDiv) &&
- !Dygraph.isNodeContainedBy(relatedTarget, dygraph.graphDiv)) {
- dygraph.mouseOut_(e);
- }
- };
-
- this.addAndTrackEvent(window, 'mouseout', this.mouseOutHandler_);
- this.addAndTrackEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler_);
-
- // Don't recreate and register the resize handler on subsequent calls.
- // This happens when the graph is resized.
- if (!this.resizeHandler_) {
- this.resizeHandler_ = function(e) {
- dygraph.resize();
- };
-
- // Update when the window is resized.
- // TODO(danvk): drop frames depending on complexity of the chart.
- this.addAndTrackEvent(window, 'resize', this.resizeHandler_);
- }
-};
-
-Dygraph.prototype.resizeElements_ = function() {
- this.graphDiv.style.width = this.width_ + "px";
- this.graphDiv.style.height = this.height_ + "px";
- this.canvas_.width = this.width_;
- this.canvas_.height = this.height_;
- this.canvas_.style.width = this.width_ + "px"; // for IE
- this.canvas_.style.height = this.height_ + "px"; // for IE
- this.hidden_.width = this.width_;
- this.hidden_.height = this.height_;
- this.hidden_.style.width = this.width_ + "px"; // for IE
- this.hidden_.style.height = this.height_ + "px"; // for IE
-};
-
-/**
- * Detach DOM elements in the dygraph and null out all data references.
- * Calling this when you're done with a dygraph can dramatically reduce memory
- * usage. See, e.g., the tests/perf.html example.
- */
-Dygraph.prototype.destroy = function() {
- this.canvas_ctx_.restore();
- this.hidden_ctx_.restore();
-
- var removeRecursive = function(node) {
- while (node.hasChildNodes()) {
- removeRecursive(node.firstChild);
- node.removeChild(node.firstChild);
- }
- };
-
- this.removeTrackedEvents_();
-
- // remove mouse event handlers (This may not be necessary anymore)
- Dygraph.removeEvent(window, 'mouseout', this.mouseOutHandler_);
- Dygraph.removeEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler_);
-
- // remove window handlers
- Dygraph.removeEvent(window,'resize',this.resizeHandler_);
- this.resizeHandler_ = null;
-
- removeRecursive(this.maindiv_);
-
- var nullOut = function(obj) {
- for (var n in obj) {
- if (typeof(obj[n]) === 'object') {
- obj[n] = null;
- }
- }
- };
- // These may not all be necessary, but it can't hurt...
- nullOut(this.layout_);
- nullOut(this.plotter_);
- nullOut(this);
-};
-
-/**
- * Creates the canvas on which the chart will be drawn. Only the Renderer ever
- * draws on this particular canvas. All Dygraph work (i.e. drawing hover dots
- * or the zoom rectangles) is done on this.canvas_.
- * @param {Object} canvas The Dygraph canvas over which to overlay the plot
- * @return {Object} The newly-created canvas
- * @private
- */
-Dygraph.prototype.createPlotKitCanvas_ = function(canvas) {
- var h = Dygraph.createCanvas();
- h.style.position = "absolute";
- // TODO(danvk): h should be offset from canvas. canvas needs to include
- // some extra area to make it easier to zoom in on the far left and far
- // right. h needs to be precisely the plot area, so that clipping occurs.
- h.style.top = canvas.style.top;
- h.style.left = canvas.style.left;
- h.width = this.width_;
- h.height = this.height_;
- h.style.width = this.width_ + "px"; // for IE
- h.style.height = this.height_ + "px"; // for IE
- return h;
-};
-
-/**
- * Creates an overlay element used to handle mouse events.
- * @return {Object} The mouse event element.
- * @private
- */
-Dygraph.prototype.createMouseEventElement_ = function() {
- if (this.isUsingExcanvas_) {
- var elem = document.createElement("div");
- elem.style.position = 'absolute';
- elem.style.backgroundColor = 'white';
- elem.style.filter = 'alpha(opacity=0)';
- elem.style.width = this.width_ + "px";
- elem.style.height = this.height_ + "px";
- this.graphDiv.appendChild(elem);
- return elem;
- } else {
- return this.canvas_;
- }
-};
-
-/**
- * Generate a set of distinct colors for the data series. This is done with a
- * color wheel. Saturation/Value are customizable, and the hue is
- * equally-spaced around the color wheel. If a custom set of colors is
- * specified, that is used instead.
- * @private
- */
-Dygraph.prototype.setColors_ = function() {
- var labels = this.getLabels();
- var num = labels.length - 1;
- this.colors_ = [];
- this.colorsMap_ = {};
- var colors = this.attr_('colors');
- var i;
- if (!colors) {
- var sat = this.attr_('colorSaturation') || 1.0;
- var val = this.attr_('colorValue') || 0.5;
- var half = Math.ceil(num / 2);
- for (i = 1; i <= num; i++) {
- if (!this.visibility()[i-1]) continue;
- // alternate colors for high contrast.
- var idx = i % 2 ? Math.ceil(i / 2) : (half + i / 2);
- var hue = (1.0 * idx/ (1 + num));
- var colorStr = Dygraph.hsvToRGB(hue, sat, val);
- this.colors_.push(colorStr);
- this.colorsMap_[labels[i]] = colorStr;
- }
- } else {
- for (i = 0; i < num; i++) {
- if (!this.visibility()[i]) continue;
- var colorStr = colors[i % colors.length];
- this.colors_.push(colorStr);
- this.colorsMap_[labels[1 + i]] = colorStr;
- }
- }
-};
-
-/**
- * Return the list of colors. This is either the list of colors passed in the
- * attributes or the autogenerated list of rgb(r,g,b) strings.
- * This does not return colors for invisible series.
- * @return {Array<string>} The list of colors.
- */
-Dygraph.prototype.getColors = function() {
- return this.colors_;
-};
-
-/**
- * Returns a few attributes of a series, i.e. its color, its visibility, which
- * axis it's assigned to, and its column in the original data.
- * Returns null if the series does not exist.
- * Otherwise, returns an object with column, visibility, color and axis properties.
- * The "axis" property will be set to 1 for y1 and 2 for y2.
- * The "column" property can be fed back into getValue(row, column) to get
- * values for this series.
- */
-Dygraph.prototype.getPropertiesForSeries = function(series_name) {
- var idx = -1;
- var labels = this.getLabels();
- for (var i = 1; i < labels.length; i++) {
- if (labels[i] == series_name) {
- idx = i;
- break;
- }
- }
- if (idx == -1) return null;
-
- return {
- name: series_name,
- column: idx,
- visible: this.visibility()[idx - 1],
- color: this.colorsMap_[series_name],
- axis: 1 + this.attributes_.axisForSeries(series_name)
- };
-};
-
-/**
- * Create the text box to adjust the averaging period
- * @private
- */
-Dygraph.prototype.createRollInterface_ = function() {
- // Create a roller if one doesn't exist already.
- if (!this.roller_) {
- this.roller_ = document.createElement("input");
- this.roller_.type = "text";
- this.roller_.style.display = "none";
- this.graphDiv.appendChild(this.roller_);
- }
-
- var display = this.attr_('showRoller') ? 'block' : 'none';
-
- var area = this.plotter_.area;
- var textAttr = { "position": "absolute",
- "zIndex": 10,
- "top": (area.y + area.h - 25) + "px",
- "left": (area.x + 1) + "px",
- "display": display
- };
- this.roller_.size = "2";
- this.roller_.value = this.rollPeriod_;
- for (var name in textAttr) {
- if (textAttr.hasOwnProperty(name)) {
- this.roller_.style[name] = textAttr[name];
- }
- }
-
- var dygraph = this;
- this.roller_.onchange = function() { dygraph.adjustRoll(dygraph.roller_.value); };
-};
-
-/**
- * @private
- * Converts page the x-coordinate of the event to pixel x-coordinates on the
- * canvas (i.e. DOM Coords).
- */
-Dygraph.prototype.dragGetX_ = function(e, context) {
- return Dygraph.pageX(e) - context.px;
-};
-
-/**
- * @private
- * Converts page the y-coordinate of the event to pixel y-coordinates on the
- * canvas (i.e. DOM Coords).
- */
-Dygraph.prototype.dragGetY_ = function(e, context) {
- return Dygraph.pageY(e) - context.py;
-};
-
-/**
- * Set up all the mouse handlers needed to capture dragging behavior for zoom
- * events.
- * @private
- */
-Dygraph.prototype.createDragInterface_ = function() {
- var context = {
- // Tracks whether the mouse is down right now
- isZooming: false,
- isPanning: false, // is this drag part of a pan?
- is2DPan: false, // if so, is that pan 1- or 2-dimensional?
- dragStartX: null, // pixel coordinates
- dragStartY: null, // pixel coordinates
- dragEndX: null, // pixel coordinates
- dragEndY: null, // pixel coordinates
- dragDirection: null,
- prevEndX: null, // pixel coordinates
- prevEndY: null, // pixel coordinates
- prevDragDirection: null,
- cancelNextDblclick: false, // see comment in dygraph-interaction-model.js
-
- // The value on the left side of the graph when a pan operation starts.
- initialLeftmostDate: null,
-
- // The number of units each pixel spans. (This won't be valid for log
- // scales)
- xUnitsPerPixel: null,
-
- // TODO(danvk): update this comment
- // The range in second/value units that the viewport encompasses during a
- // panning operation.
- dateRange: null,
-
- // Top-left corner of the canvas, in DOM coords
- // TODO(konigsberg): Rename topLeftCanvasX, topLeftCanvasY.
- px: 0,
- py: 0,
-
- // Values for use with panEdgeFraction, which limit how far outside the
- // graph's data boundaries it can be panned.
- boundedDates: null, // [minDate, maxDate]
- boundedValues: null, // [[minValue, maxValue] ...]
-
- // We cover iframes during mouse interactions. See comments in
- // dygraph-utils.js for more info on why this is a good idea.
- tarp: new Dygraph.IFrameTarp(),
-
- // contextB is the same thing as this context object but renamed.
- initializeMouseDown: function(event, g, contextB) {
- // prevents mouse drags from selecting page text.
- if (event.preventDefault) {
- event.preventDefault(); // Firefox, Chrome, etc.
- } else {
- event.returnValue = false; // IE
- event.cancelBubble = true;
- }
-
- contextB.px = Dygraph.findPosX(g.canvas_);
- contextB.py = Dygraph.findPosY(g.canvas_);
- contextB.dragStartX = g.dragGetX_(event, contextB);
- contextB.dragStartY = g.dragGetY_(event, contextB);
- contextB.cancelNextDblclick = false;
- contextB.tarp.cover();
- }
- };
-
- var interactionModel = this.attr_("interactionModel");
-
- // Self is the graph.
- var self = this;
-
- // Function that binds the graph and context to the handler.
- var bindHandler = function(handler) {
- return function(event) {
- handler(event, self, context);
- };
- };
-
- for (var eventName in interactionModel) {
- if (!interactionModel.hasOwnProperty(eventName)) continue;
- this.addAndTrackEvent(this.mouseEventElement_, eventName,
- bindHandler(interactionModel[eventName]));
- }
-
- // If the user releases the mouse button during a drag, but not over the
- // canvas, then it doesn't count as a zooming action.
- var mouseUpHandler = function(event) {
- if (context.isZooming || context.isPanning) {
- context.isZooming = false;
- context.dragStartX = null;
- context.dragStartY = null;
- }
-
- if (context.isPanning) {
- context.isPanning = false;
- context.draggingDate = null;
- context.dateRange = null;
- for (var i = 0; i < self.axes_.length; i++) {
- delete self.axes_[i].draggingValue;
- delete self.axes_[i].dragValueRange;
- }
- }
-
- context.tarp.uncover();
- };
-
- this.addAndTrackEvent(document, 'mouseup', mouseUpHandler);
-};
-
-/**
- * Draw a gray zoom rectangle over the desired area of the canvas. Also clears
- * up any previous zoom rectangles that were drawn. This could be optimized to
- * avoid extra redrawing, but it's tricky to avoid interactions with the status
- * dots.
- *
- * @param {Number} direction the direction of the zoom rectangle. Acceptable
- * values are Dygraph.HORIZONTAL and Dygraph.VERTICAL.
- * @param {Number} startX The X position where the drag started, in canvas
- * coordinates.
- * @param {Number} endX The current X position of the drag, in canvas coords.
- * @param {Number} startY The Y position where the drag started, in canvas
- * coordinates.
- * @param {Number} endY The current Y position of the drag, in canvas coords.
- * @param {Number} prevDirection the value of direction on the previous call to
- * this function. Used to avoid excess redrawing
- * @param {Number} prevEndX The value of endX on the previous call to this
- * function. Used to avoid excess redrawing
- * @param {Number} prevEndY The value of endY on the previous call to this
- * function. Used to avoid excess redrawing
- * @private
- */
-Dygraph.prototype.drawZoomRect_ = function(direction, startX, endX, startY,
- endY, prevDirection, prevEndX,
- prevEndY) {
- var ctx = this.canvas_ctx_;
-
- // Clean up from the previous rect if necessary
- if (prevDirection == Dygraph.HORIZONTAL) {
- ctx.clearRect(Math.min(startX, prevEndX), this.layout_.getPlotArea().y,
- Math.abs(startX - prevEndX), this.layout_.getPlotArea().h);
- } else if (prevDirection == Dygraph.VERTICAL) {
- ctx.clearRect(this.layout_.getPlotArea().x, Math.min(startY, prevEndY),
- this.layout_.getPlotArea().w, Math.abs(startY - prevEndY));
- }
-
- // Draw a light-grey rectangle to show the new viewing area
- if (direction == Dygraph.HORIZONTAL) {
- if (endX && startX) {
- ctx.fillStyle = "rgba(128,128,128,0.33)";
- ctx.fillRect(Math.min(startX, endX), this.layout_.getPlotArea().y,
- Math.abs(endX - startX), this.layout_.getPlotArea().h);
- }
- } else if (direction == Dygraph.VERTICAL) {
- if (endY && startY) {
- ctx.fillStyle = "rgba(128,128,128,0.33)";
- ctx.fillRect(this.layout_.getPlotArea().x, Math.min(startY, endY),
- this.layout_.getPlotArea().w, Math.abs(endY - startY));
- }
- }
-
- if (this.isUsingExcanvas_) {
- this.currentZoomRectArgs_ = [direction, startX, endX, startY, endY, 0, 0, 0];
- }
-};
-
-/**
- * Clear the zoom rectangle (and perform no zoom).
- * @private
- */
-Dygraph.prototype.clearZoomRect_ = function() {
- this.currentZoomRectArgs_ = null;
- this.canvas_ctx_.clearRect(0, 0, this.canvas_.width, this.canvas_.height);
-};
-
-/**
- * Zoom to something containing [lowX, highX]. These are pixel coordinates in
- * the canvas. The exact zoom window may be slightly larger if there are no data
- * points near lowX or highX. Don't confuse this function with doZoomXDates,
- * which accepts dates that match the raw data. This function redraws the graph.
- *
- * @param {Number} lowX The leftmost pixel value that should be visible.
- * @param {Number} highX The rightmost pixel value that should be visible.
- * @private
- */
-Dygraph.prototype.doZoomX_ = function(lowX, highX) {
- this.currentZoomRectArgs_ = null;
- // Find the earliest and latest dates contained in this canvasx range.
- // Convert the call to date ranges of the raw data.
- var minDate = this.toDataXCoord(lowX);
- var maxDate = this.toDataXCoord(highX);
- this.doZoomXDates_(minDate, maxDate);
-};
-
-/**
- * Transition function to use in animations. Returns values between 0.0
- * (totally old values) and 1.0 (totally new values) for each frame.
- * @private
- */
-Dygraph.zoomAnimationFunction = function(frame, numFrames) {
- var k = 1.5;
- return (1.0 - Math.pow(k, -frame)) / (1.0 - Math.pow(k, -numFrames));
-};
-
-/**
- * Zoom to something containing [minDate, maxDate] values. Don't confuse this
- * method with doZoomX which accepts pixel coordinates. This function redraws
- * the graph.
- *
- * @param {Number} minDate The minimum date that should be visible.
- * @param {Number} maxDate The maximum date that should be visible.
- * @private
- */
-Dygraph.prototype.doZoomXDates_ = function(minDate, maxDate) {
- // TODO(danvk): when yAxisRange is null (i.e. "fit to data", the animation
- // can produce strange effects. Rather than the y-axis transitioning slowly
- // between values, it can jerk around.)
- var old_window = this.xAxisRange();
- var new_window = [minDate, maxDate];
- this.zoomed_x_ = true;
- var that = this;
- this.doAnimatedZoom(old_window, new_window, null, null, function() {
- if (that.attr_("zoomCallback")) {
- that.attr_("zoomCallback")(minDate, maxDate, that.yAxisRanges());
- }
- });
-};
-
-/**
- * Zoom to something containing [lowY, highY]. These are pixel coordinates in
- * the canvas. This function redraws the graph.
- *
- * @param {Number} lowY The topmost pixel value that should be visible.
- * @param {Number} highY The lowest pixel value that should be visible.
- * @private
- */
-Dygraph.prototype.doZoomY_ = function(lowY, highY) {
- this.currentZoomRectArgs_ = null;
- // Find the highest and lowest values in pixel range for each axis.
- // Note that lowY (in pixels) corresponds to the max Value (in data coords).
- // This is because pixels increase as you go down on the screen, whereas data
- // coordinates increase as you go up the screen.
- var oldValueRanges = this.yAxisRanges();
- var newValueRanges = [];
- for (var i = 0; i < this.axes_.length; i++) {
- var hi = this.toDataYCoord(lowY, i);
- var low = this.toDataYCoord(highY, i);
- newValueRanges.push([low, hi]);
- }
-
- this.zoomed_y_ = true;
- var that = this;
- this.doAnimatedZoom(null, null, oldValueRanges, newValueRanges, function() {
- if (that.attr_("zoomCallback")) {
- var xRange = that.xAxisRange();
- that.attr_("zoomCallback")(xRange[0], xRange[1], that.yAxisRanges());
- }
- });
-};
-
-/**
- * Reset the zoom to the original view coordinates. This is the same as
- * double-clicking on the graph.
- */
-Dygraph.prototype.resetZoom = function() {
- var dirty = false, dirtyX = false, dirtyY = false;
- if (this.dateWindow_ !== null) {
- dirty = true;
- dirtyX = true;
- }
-
- for (var i = 0; i < this.axes_.length; i++) {
- if (typeof(this.axes_[i].valueWindow) !== 'undefined' && this.axes_[i].valueWindow !== null) {
- dirty = true;
- dirtyY = true;
- }
- }
-
- // Clear any selection, since it's likely to be drawn in the wrong place.
- this.clearSelection();
-
- if (dirty) {
- this.zoomed_x_ = false;
- this.zoomed_y_ = false;
-
- var minDate = this.rawData_[0][0];
- var maxDate = this.rawData_[this.rawData_.length - 1][0];
-
- // With only one frame, don't bother calculating extreme ranges.
- // TODO(danvk): merge this block w/ the code below.
- if (!this.attr_("animatedZooms")) {
- this.dateWindow_ = null;
- for (i = 0; i < this.axes_.length; i++) {
- if (this.axes_[i].valueWindow !== null) {
- delete this.axes_[i].valueWindow;
- }
- }
- this.drawGraph_();
- if (this.attr_("zoomCallback")) {
- this.attr_("zoomCallback")(minDate, maxDate, this.yAxisRanges());
- }
- return;
- }
-
- var oldWindow=null, newWindow=null, oldValueRanges=null, newValueRanges=null;
- if (dirtyX) {
- oldWindow = this.xAxisRange();
- newWindow = [minDate, maxDate];
- }
-
- if (dirtyY) {
- oldValueRanges = this.yAxisRanges();
- // TODO(danvk): this is pretty inefficient
- var packed = this.gatherDatasets_(this.rolledSeries_, null);
- var extremes = packed.extremes;
-
- // this has the side-effect of modifying this.axes_.
- // this doesn't make much sense in this context, but it's convenient (we
- // need this.axes_[*].extremeValues) and not harmful since we'll be
- // calling drawGraph_ shortly, which clobbers these values.
- this.computeYAxisRanges_(extremes);
-
- newValueRanges = [];
- for (i = 0; i < this.axes_.length; i++) {
- var axis = this.axes_[i];
- newValueRanges.push((axis.valueRange !== null &&
- axis.valueRange !== undefined) ?
- axis.valueRange : axis.extremeRange);
- }
- }
-
- var that = this;
- this.doAnimatedZoom(oldWindow, newWindow, oldValueRanges, newValueRanges,
- function() {
- that.dateWindow_ = null;
- for (var i = 0; i < that.axes_.length; i++) {
- if (that.axes_[i].valueWindow !== null) {
- delete that.axes_[i].valueWindow;
- }
- }
- if (that.attr_("zoomCallback")) {
- that.attr_("zoomCallback")(minDate, maxDate, that.yAxisRanges());
- }
- });
- }
-};
-
-/**
- * Combined animation logic for all zoom functions.
- * either the x parameters or y parameters may be null.
- * @private
- */
-Dygraph.prototype.doAnimatedZoom = function(oldXRange, newXRange, oldYRanges, newYRanges, callback) {
- var steps = this.attr_("animatedZooms") ? Dygraph.ANIMATION_STEPS : 1;
-
- var windows = [];
- var valueRanges = [];
- var step, frac;
-
- if (oldXRange !== null && newXRange !== null) {
- for (step = 1; step <= steps; step++) {
- frac = Dygraph.zoomAnimationFunction(step, steps);
- windows[step-1] = [oldXRange[0]*(1-frac) + frac*newXRange[0],
- oldXRange[1]*(1-frac) + frac*newXRange[1]];
- }
- }
-
- if (oldYRanges !== null && newYRanges !== null) {
- for (step = 1; step <= steps; step++) {
- frac = Dygraph.zoomAnimationFunction(step, steps);
- var thisRange = [];
- for (var j = 0; j < this.axes_.length; j++) {
- thisRange.push([oldYRanges[j][0]*(1-frac) + frac*newYRanges[j][0],
- oldYRanges[j][1]*(1-frac) + frac*newYRanges[j][1]]);
- }
- valueRanges[step-1] = thisRange;
- }
- }
-
- var that = this;
- Dygraph.repeatAndCleanup(function(step) {
- if (valueRanges.length) {
- for (var i = 0; i < that.axes_.length; i++) {
- var w = valueRanges[step][i];
- that.axes_[i].valueWindow = [w[0], w[1]];
- }
- }
- if (windows.length) {
- that.dateWindow_ = windows[step];
- }
- that.drawGraph_();
- }, steps, Dygraph.ANIMATION_DURATION / steps, callback);
-};
-
-/**
- * Get the current graph's area object.
- *
- * Returns: {x, y, w, h}
- */
-Dygraph.prototype.getArea = function() {
- return this.plotter_.area;
-};
-
-/**
- * Convert a mouse event to DOM coordinates relative to the graph origin.
- *
- * Returns a two-element array: [X, Y].
- */
-Dygraph.prototype.eventToDomCoords = function(event) {
- if (event.offsetX && event.offsetY) {
- return [ event.offsetX, event.offsetY ];
- } else {
- var canvasx = Dygraph.pageX(event) - Dygraph.findPosX(this.mouseEventElement_);
- var canvasy = Dygraph.pageY(event) - Dygraph.findPosY(this.mouseEventElement_);
- return [canvasx, canvasy];
- }
-};
-
-/**
- * Given a canvas X coordinate, find the closest row.
- * @param {Number} domX graph-relative DOM X coordinate
- * Returns: row number, integer
- * @private
- */
-Dygraph.prototype.findClosestRow = function(domX) {
- var minDistX = Infinity;
- var closestRow = -1;
- var sets = this.layout_.points;
- for (var i = 0; i < sets.length; i++) {
- var points = sets[i];
- var len = points.length;
- for (var j = 0; j < len; j++) {
- var point = points[j];
- if (!Dygraph.isValidPoint(point, true)) continue;
- var dist = Math.abs(point.canvasx - domX);
- if (dist < minDistX) {
- minDistX = dist;
- closestRow = point.idx;
- }
- }
- }
-
- return closestRow;
-};
-
-/**
- * Given canvas X,Y coordinates, find the closest point.
- *
- * This finds the individual data point across all visible series
- * that's closest to the supplied DOM coordinates using the standard
- * Euclidean X,Y distance.
- *
- * @param {Number} domX graph-relative DOM X coordinate
- * @param {Number} domY graph-relative DOM Y coordinate
- * Returns: {row, seriesName, point}
- * @private
- */
-Dygraph.prototype.findClosestPoint = function(domX, domY) {
- var minDist = Infinity;
- var dist, dx, dy, point, closestPoint, closestSeries, closestRow;
- for ( var setIdx = this.layout_.points.length - 1 ; setIdx >= 0 ; --setIdx ) {
- var points = this.layout_.points[setIdx];
- for (var i = 0; i < points.length; ++i) {
- point = points[i];
- if (!Dygraph.isValidPoint(point)) continue;
- dx = point.canvasx - domX;
- dy = point.canvasy - domY;
- dist = dx * dx + dy * dy;
- if (dist < minDist) {
- minDist = dist;
- closestPoint = point;
- closestSeries = setIdx;
- closestRow = point.idx;
- }
- }
- }
- var name = this.layout_.setNames[closestSeries];
- return {
- row: closestRow,
- seriesName: name,
- point: closestPoint
- };
-};
-
-/**
- * Given canvas X,Y coordinates, find the touched area in a stacked graph.
- *
- * This first finds the X data point closest to the supplied DOM X coordinate,
- * then finds the series which puts the Y coordinate on top of its filled area,
- * using linear interpolation between adjacent point pairs.
- *
- * @param {Number} domX graph-relative DOM X coordinate
- * @param {Number} domY graph-relative DOM Y coordinate
- * Returns: {row, seriesName, point}
- * @private
- */
-Dygraph.prototype.findStackedPoint = function(domX, domY) {
- var row = this.findClosestRow(domX);
- var closestPoint, closestSeries;
- for (var setIdx = 0; setIdx < this.layout_.points.length; ++setIdx) {
- var boundary = this.getLeftBoundary_(setIdx);
- var rowIdx = row - boundary;
- var points = this.layout_.points[setIdx];
- if (rowIdx >= points.length) continue;
- var p1 = points[rowIdx];
- if (!Dygraph.isValidPoint(p1)) continue;
- var py = p1.canvasy;
- if (domX > p1.canvasx && rowIdx + 1 < points.length) {
- // interpolate series Y value using next point
- var p2 = points[rowIdx + 1];
- if (Dygraph.isValidPoint(p2)) {
- var dx = p2.canvasx - p1.canvasx;
- if (dx > 0) {
- var r = (domX - p1.canvasx) / dx;
- py += r * (p2.canvasy - p1.canvasy);
- }
- }
- } else if (domX < p1.canvasx && rowIdx > 0) {
- // interpolate series Y value using previous point
- var p0 = points[rowIdx - 1];
- if (Dygraph.isValidPoint(p0)) {
- var dx = p1.canvasx - p0.canvasx;
- if (dx > 0) {
- var r = (p1.canvasx - domX) / dx;
- py += r * (p0.canvasy - p1.canvasy);
- }
- }
- }
- // Stop if the point (domX, py) is above this series' upper edge
- if (setIdx === 0 || py < domY) {
- closestPoint = p1;
- closestSeries = setIdx;
- }
- }
- var name = this.layout_.setNames[closestSeries];
- return {
- row: row,
- seriesName: name,
- point: closestPoint
- };
-};
-
-/**
- * When the mouse moves in the canvas, display information about a nearby data
- * point and draw dots over those points in the data series. This function
- * takes care of cleanup of previously-drawn dots.
- * @param {Object} event The mousemove event from the browser.
- * @private
- */
-Dygraph.prototype.mouseMove_ = function(event) {
- // This prevents JS errors when mousing over the canvas before data loads.
- var points = this.layout_.points;
- if (points === undefined || points === null) return;
-
- var canvasCoords = this.eventToDomCoords(event);
- var canvasx = canvasCoords[0];
- var canvasy = canvasCoords[1];
-
- var highlightSeriesOpts = this.attr_("highlightSeriesOpts");
- var selectionChanged = false;
- if (highlightSeriesOpts && !this.isSeriesLocked()) {
- var closest;
- if (this.attr_("stackedGraph")) {
- closest = this.findStackedPoint(canvasx, canvasy);
- } else {
- closest = this.findClosestPoint(canvasx, canvasy);
- }
- selectionChanged = this.setSelection(closest.row, closest.seriesName);
- } else {
- var idx = this.findClosestRow(canvasx);
- selectionChanged = this.setSelection(idx);
- }
-
- var callback = this.attr_("highlightCallback");
- if (callback && selectionChanged) {
- callback(event,
- this.lastx_,
- this.selPoints_,
- this.lastRow_,
- this.highlightSet_);
- }
-};
-
-/**
- * Fetch left offset from the specified set index or if not passed, the
- * first defined boundaryIds record (see bug #236).
- * @private
- */
-Dygraph.prototype.getLeftBoundary_ = function(setIdx) {
- if (this.boundaryIds_[setIdx]) {
- return this.boundaryIds_[setIdx][0];
- } else {
- for (var i = 0; i < this.boundaryIds_.length; i++) {
- if (this.boundaryIds_[i] !== undefined) {
- return this.boundaryIds_[i][0];
- }
- }
- return 0;
- }
-};
-
-Dygraph.prototype.animateSelection_ = function(direction) {
- var totalSteps = 10;
- var millis = 30;
- if (this.fadeLevel === undefined) this.fadeLevel = 0;
- if (this.animateId === undefined) this.animateId = 0;
- var start = this.fadeLevel;
- var steps = direction < 0 ? start : totalSteps - start;
- if (steps <= 0) {
- if (this.fadeLevel) {
- this.updateSelection_(1.0);
- }
- return;
- }
-
- var thisId = ++this.animateId;
- var that = this;
- Dygraph.repeatAndCleanup(
- function(n) {
- // ignore simultaneous animations
- if (that.animateId != thisId) return;
-
- that.fadeLevel += direction;
- if (that.fadeLevel === 0) {
- that.clearSelection();
- } else {
- that.updateSelection_(that.fadeLevel / totalSteps);
- }
- },
- steps, millis, function() {});
-};
-
-/**
- * Draw dots over the selectied points in the data series. This function
- * takes care of cleanup of previously-drawn dots.
- * @private
- */
-Dygraph.prototype.updateSelection_ = function(opt_animFraction) {
- /*var defaultPrevented = */
- this.cascadeEvents_('select', {
- selectedX: this.lastx_,
- selectedPoints: this.selPoints_
- });
- // TODO(danvk): use defaultPrevented here?
-
- // Clear the previously drawn vertical, if there is one
- var i;
- var ctx = this.canvas_ctx_;
- if (this.attr_('highlightSeriesOpts')) {
- ctx.clearRect(0, 0, this.width_, this.height_);
- var alpha = 1.0 - this.attr_('highlightSeriesBackgroundAlpha');
- if (alpha) {
- // Activating background fade includes an animation effect for a gradual
- // fade. TODO(klausw): make this independently configurable if it causes
- // issues? Use a shared preference to control animations?
- var animateBackgroundFade = true;
- if (animateBackgroundFade) {
- if (opt_animFraction === undefined) {
- // start a new animation
- this.animateSelection_(1);
- return;
- }
- alpha *= opt_animFraction;
- }
- ctx.fillStyle = 'rgba(255,255,255,' + alpha + ')';
- ctx.fillRect(0, 0, this.width_, this.height_);
- }
-
- // Redraw only the highlighted series in the interactive canvas (not the
- // static plot canvas, which is where series are usually drawn).
- this.plotter_._renderLineChart(this.highlightSet_, ctx);
- } else if (this.previousVerticalX_ >= 0) {
- // Determine the maximum highlight circle size.
- var maxCircleSize = 0;
- var labels = this.attr_('labels');
- for (i = 1; i < labels.length; i++) {
- var r = this.attr_('highlightCircleSize', labels[i]);
- if (r > maxCircleSize) maxCircleSize = r;
- }
- var px = this.previousVerticalX_;
- ctx.clearRect(px - maxCircleSize - 1, 0,
- 2 * maxCircleSize + 2, this.height_);
- }
-
- if (this.isUsingExcanvas_ && this.currentZoomRectArgs_) {
- Dygraph.prototype.drawZoomRect_.apply(this, this.currentZoomRectArgs_);
- }
-
- if (this.selPoints_.length > 0) {
- // Draw colored circles over the center of each selected point
- var canvasx = this.selPoints_[0].canvasx;
- ctx.save();
- for (i = 0; i < this.selPoints_.length; i++) {
- var pt = this.selPoints_[i];
- if (!Dygraph.isOK(pt.canvasy)) continue;
-
- var circleSize = this.attr_('highlightCircleSize', pt.name);
- var callback = this.attr_("drawHighlightPointCallback", pt.name);
- var color = this.plotter_.colors[pt.name];
- if (!callback) {
- callback = Dygraph.Circles.DEFAULT;
- }
- ctx.lineWidth = this.attr_('strokeWidth', pt.name);
- ctx.strokeStyle = color;
- ctx.fillStyle = color;
- callback(this.g, pt.name, ctx, canvasx, pt.canvasy,
- color, circleSize, pt.idx);
- }
- ctx.restore();
-
- this.previousVerticalX_ = canvasx;
- }
-};
-
-/**
- * Manually set the selected points and display information about them in the
- * legend. The selection can be cleared using clearSelection() and queried
- * using getSelection().
- * @param { Integer } row number that should be highlighted (i.e. appear with
- * hover dots on the chart). Set to false to clear any selection.
- * @param { seriesName } optional series name to highlight that series with the
- * the highlightSeriesOpts setting.
- * @param { locked } optional If true, keep seriesName selected when mousing
- * over the graph, disabling closest-series highlighting. Call clearSelection()
- * to unlock it.
- */
-Dygraph.prototype.setSelection = function(row, opt_seriesName, opt_locked) {
- // Extract the points we've selected
- this.selPoints_ = [];
-
- var changed = false;
- if (row !== false && row >= 0) {
- if (row != this.lastRow_) changed = true;
- this.lastRow_ = row;
- for (var setIdx = 0; setIdx < this.layout_.points.length; ++setIdx) {
- var points = this.layout_.points[setIdx];
- var setRow = row - this.getLeftBoundary_(setIdx);
- if (setRow < points.length) {
- var point = points[setRow];
- if (point.yval !== null) this.selPoints_.push(point);
- }
- }
- } else {
- if (this.lastRow_ >= 0) changed = true;
- this.lastRow_ = -1;
- }
-
- if (this.selPoints_.length) {
- this.lastx_ = this.selPoints_[0].xval;
- } else {
- this.lastx_ = -1;
- }
-
- if (opt_seriesName !== undefined) {
- if (this.highlightSet_ !== opt_seriesName) changed = true;
- this.highlightSet_ = opt_seriesName;
- }
-
- if (opt_locked !== undefined) {
- this.lockedSet_ = opt_locked;
- }
-
- if (changed) {
- this.updateSelection_(undefined);
- }
- return changed;
-};
-
-/**
- * The mouse has left the canvas. Clear out whatever artifacts remain
- * @param {Object} event the mouseout event from the browser.
- * @private
- */
-Dygraph.prototype.mouseOut_ = function(event) {
- if (this.attr_("unhighlightCallback")) {
- this.attr_("unhighlightCallback")(event);
- }
-
- if (this.attr_("hideOverlayOnMouseOut") && !this.lockedSet_) {
- this.clearSelection();
- }
-};
-
-/**
- * Clears the current selection (i.e. points that were highlighted by moving
- * the mouse over the chart).
- */
-Dygraph.prototype.clearSelection = function() {
- this.cascadeEvents_('deselect', {});
-
- this.lockedSet_ = false;
- // Get rid of the overlay data
- if (this.fadeLevel) {
- this.animateSelection_(-1);
- return;
- }
- this.canvas_ctx_.clearRect(0, 0, this.width_, this.height_);
- this.fadeLevel = 0;
- this.selPoints_ = [];
- this.lastx_ = -1;
- this.lastRow_ = -1;
- this.highlightSet_ = null;
-};
-
-/**
- * Returns the number of the currently selected row. To get data for this row,
- * you can use the getValue method.
- * @return { Integer } row number, or -1 if nothing is selected
- */
-Dygraph.prototype.getSelection = function() {
- if (!this.selPoints_ || this.selPoints_.length < 1) {
- return -1;
- }
-
- for (var setIdx = 0; setIdx < this.layout_.points.length; setIdx++) {
- var points = this.layout_.points[setIdx];
- for (var row = 0; row < points.length; row++) {
- if (points[row].x == this.selPoints_[0].x) {
- return points[row].idx;
- }
- }
- }
- return -1;
-};
-
-/**
- * Returns the name of the currently-highlighted series.
- * Only available when the highlightSeriesOpts option is in use.
- */
-Dygraph.prototype.getHighlightSeries = function() {
- return this.highlightSet_;
-};
-
-/**
- * Returns true if the currently-highlighted series was locked
- * via setSelection(..., seriesName, true).
- */
-Dygraph.prototype.isSeriesLocked = function() {
- return this.lockedSet_;
-};
-
-/**
- * Fires when there's data available to be graphed.
- * @param {String} data Raw CSV data to be plotted
- * @private
- */
-Dygraph.prototype.loadedEvent_ = function(data) {
- this.rawData_ = this.parseCSV_(data);
- this.predraw_();
-};
-
-/**
- * Add ticks on the x-axis representing years, months, quarters, weeks, or days
- * @private
- */
-Dygraph.prototype.addXTicks_ = function() {
- // Determine the correct ticks scale on the x-axis: quarterly, monthly, ...
- var range;
- if (this.dateWindow_) {
- range = [this.dateWindow_[0], this.dateWindow_[1]];
- } else {
- range = this.xAxisExtremes();
- }
-
- var xAxisOptionsView = this.optionsViewForAxis_('x');
- var xTicks = xAxisOptionsView('ticker')(
- range[0],
- range[1],
- this.width_, // TODO(danvk): should be area.width
- xAxisOptionsView,
- this);
- // var msg = 'ticker(' + range[0] + ', ' + range[1] + ', ' + this.width_ + ', ' + this.attr_('pixelsPerXLabel') + ') -> ' + JSON.stringify(xTicks);
- // console.log(msg);
- this.layout_.setXTicks(xTicks);
-};
-
-/**
- * @private
- * Computes the range of the data series (including confidence intervals).
- * @param { [Array] } series either [ [x1, y1], [x2, y2], ... ] or
- * [ [x1, [y1, dev_low, dev_high]], [x2, [y2, dev_low, dev_high]], ...
- * @return [low, high]
- */
-Dygraph.prototype.extremeValues_ = function(series) {
- var minY = null, maxY = null, j, y;
-
- var bars = this.attr_("errorBars") || this.attr_("customBars");
- if (bars) {
- // With custom bars, maxY is the max of the high values.
- for (j = 0; j < series.length; j++) {
- y = series[j][1][0];
- if (y === null || isNaN(y)) continue;
- var low = y - series[j][1][1];
- var high = y + series[j][1][2];
- if (low > y) low = y; // this can happen with custom bars,
- if (high < y) high = y; // e.g. in tests/custom-bars.html
- if (maxY === null || high > maxY) {
- maxY = high;
- }
- if (minY === null || low < minY) {
- minY = low;
- }
- }
- } else {
- for (j = 0; j < series.length; j++) {
- y = series[j][1];
- if (y === null || isNaN(y)) continue;
- if (maxY === null || y > maxY) {
- maxY = y;
- }
- if (minY === null || y < minY) {
- minY = y;
- }
- }
- }
-
- return [minY, maxY];
-};
-
-/**
- * @private
- * This function is called once when the chart's data is changed or the options
- * dictionary is updated. It is _not_ called when the user pans or zooms. The
- * idea is that values derived from the chart's data can be computed here,
- * rather than every time the chart is drawn. This includes things like the
- * number of axes, rolling averages, etc.
- */
-Dygraph.prototype.predraw_ = function() {
- var start = new Date();
-
- this.layout_.computePlotArea();
-
- // TODO(danvk): move more computations out of drawGraph_ and into here.
- this.computeYAxes_();
-
- // Create a new plotter.
- if (this.plotter_) {
- this.cascadeEvents_('clearChart');
- this.plotter_.clear();
- }
-
- if (!this.is_initial_draw_) {
- this.canvas_ctx_.restore();
- this.hidden_ctx_.restore();
- }
-
- this.canvas_ctx_.save();
- this.hidden_ctx_.save();
-
- this.plotter_ = new DygraphCanvasRenderer(this,
- this.hidden_,
- this.hidden_ctx_,
- this.layout_);
-
- // The roller sits in the bottom left corner of the chart. We don't know where
- // this will be until the options are available, so it's positioned here.
- this.createRollInterface_();
-
- this.cascadeEvents_('predraw');
-
- // Convert the raw data (a 2D array) into the internal format and compute
- // rolling averages.
- this.rolledSeries_ = [null]; // x-axis is the first series and it's special
- for (var i = 1; i < this.numColumns(); i++) {
- // var logScale = this.attr_('logscale', i); // TODO(klausw): this looks wrong // konigsberg thinks so too.
- var logScale = this.attr_('logscale');
- var series = this.extractSeries_(this.rawData_, i, logScale);
- series = this.rollingAverage(series, this.rollPeriod_);
- this.rolledSeries_.push(series);
- }
-
- // If the data or options have changed, then we'd better redraw.
- this.drawGraph_();
-
- // This is used to determine whether to do various animations.
- var end = new Date();
- this.drawingTimeMs_ = (end - start);
-};
-
-/**
- * Point structure.
- *
- * xval_* and yval_* are the original unscaled data values,
- * while x_* and y_* are scaled to the range (0.0-1.0) for plotting.
- * yval_stacked is the cumulative Y value used for stacking graphs,
- * and bottom/top/minus/plus are used for error bar graphs.
- *
- * @typedef {{
- * idx: number,
- * name: string,
- * x: ?number,
- * xval: ?number,
- * y_bottom: ?number,
- * y: ?number,
- * y_stacked: ?number,
- * y_top: ?number,
- * yval_minus: ?number,
- * yval: ?number,
- * yval_plus: ?number,
- * yval_stacked
- * }}
- */
-Dygraph.PointType = undefined;
-
-// TODO(bhs): these loops are a hot-spot for high-point-count charts. In fact,
-// on chrome+linux, they are 6 times more expensive than iterating through the
-// points and drawing the lines. The brunt of the cost comes from allocating
-// the |point| structures.
-/**
- * Converts a series to a Point array.
- *
- * @param {Array.<Array.<(?number|Array<?number>)>} series Array where
- * series[row] = [x,y] or [x, [y, err]] or [x, [y, yplus, yminus]].
- * @param {boolean} bars True if error bars or custom bars are being drawn.
- * @param {string} setName Name of the series.
- * @param {number} boundaryIdStart Index offset of the first point, equal to
- * the number of skipped points left of the date window minimum (if any).
- * @return {Array.<Dygraph.PointType>} List of points for this series.
- */
-Dygraph.seriesToPoints_ = function(series, bars, setName, boundaryIdStart) {
- var points = [];
- for (var i = 0; i < series.length; ++i) {
- var item = series[i];
- var yraw = bars ? item[1][0] : item[1];
- var yval = yraw === null ? null : DygraphLayout.parseFloat_(yraw);
- var point = {
- x: NaN,
- y: NaN,
- xval: DygraphLayout.parseFloat_(item[0]),
- yval: yval,
- name: setName, // TODO(danvk): is this really necessary?
- idx: i + boundaryIdStart
- };
-
- if (bars) {
- point.y_top = NaN;
- point.y_bottom = NaN;
- point.yval_minus = DygraphLayout.parseFloat_(item[1][1]);
- point.yval_plus = DygraphLayout.parseFloat_(item[1][2]);
- }
- points.push(point);
- }
- return points;
-};
-
-
-/**
- * Calculates point stacking for stackedGraph=true.
- *
- * For stacking purposes, interpolate or extend neighboring data across
- * NaN values based on stackedGraphNaNFill settings. This is for display
- * only, the underlying data value as shown in the legend remains NaN.
- *
- * @param {Array.<Dygraph.PointType>} points Point array for a single series.
- * Updates each Point's yval_stacked property.
- * @param {Array.<number>} cumulativeYval Accumulated top-of-graph stacked Y
- * values for the series seen so far. Index is the row number. Updated
- * based on the current series's values.
- * @param {Array.<number>} seriesExtremes Min and max values, updated
- * to reflect the stacked values.
- * @param {string} fillMethod Interpolation method, one of 'all', 'inside', or
- * 'none'.
- */
-Dygraph.stackPoints_ = function(
- points, cumulativeYval, seriesExtremes, fillMethod) {
- var lastXval = null;
- var prevPoint = null;
- var nextPoint = null;
- var nextPointIdx = -1;
-
- // Find the next stackable point starting from the given index.
- var updateNextPoint = function(idx) {
- // If we've previously found a non-NaN point and haven't gone past it yet,
- // just use that.
- if (nextPointIdx >= idx) return;
-
- // We haven't found a non-NaN point yet or have moved past it,
- // look towards the right to find a non-NaN point.
- for (var j = idx; j < points.length; ++j) {
- // Clear out a previously-found point (if any) since it's no longer
- // valid, we shouldn't use it for interpolation anymore.
- nextPoint = null;
- if (!isNaN(points[j].yval) && points[j].yval !== null) {
- nextPointIdx = j;
- nextPoint = points[j];
- break;
- }
- }
- };
-
- for (var i = 0; i < points.length; ++i) {
- var point = points[i];
- var xval = point.xval;
- if (cumulativeYval[xval] === undefined) {
- cumulativeYval[xval] = 0;
- }
-
- var actualYval = point.yval;
- if (isNaN(actualYval) || actualYval === null) {
- // Interpolate/extend for stacking purposes if possible.
- updateNextPoint(i);
- if (prevPoint && nextPoint && fillMethod != 'none') {
- // Use linear interpolation between prevPoint and nextPoint.
- actualYval = prevPoint.yval + (nextPoint.yval - prevPoint.yval) *
- ((xval - prevPoint.xval) / (nextPoint.xval - prevPoint.xval));
- } else if (prevPoint && fillMethod == 'all') {
- actualYval = prevPoint.yval;
- } else if (nextPoint && fillMethod == 'all') {
- actualYval = nextPoint.yval;
- } else {
- actualYval = 0;
- }
- } else {
- prevPoint = point;
- }
-
- var stackedYval = cumulativeYval[xval];
- if (lastXval != xval) {
- // If an x-value is repeated, we ignore the duplicates.
- stackedYval += actualYval;
- cumulativeYval[xval] = stackedYval;
- }
- lastXval = xval;
-
- point.yval_stacked = stackedYval;
-
- if (stackedYval > seriesExtremes[1]) {
- seriesExtremes[1] = stackedYval;
- }
- if (stackedYval < seriesExtremes[0]) {
- seriesExtremes[0] = stackedYval;
- }
- }
-};
-
-
-/**
- * Loop over all fields and create datasets, calculating extreme y-values for
- * each series and extreme x-indices as we go.
- *
- * dateWindow is passed in as an explicit parameter so that we can compute
- * extreme values "speculatively", i.e. without actually setting state on the
- * dygraph.
- *
- * @param {Array.<Array.<Array.<(number|Array<number>)>>} rolledSeries, where
- * rolledSeries[seriesIndex][row] = raw point, where
- * seriesIndex is the column number starting with 1, and
- * rawPoint is [x,y] or [x, [y, err]] or [x, [y, yminus, yplus]].
- * @param {?Array.<number>} dateWindow [xmin, xmax] pair, or null.
- * @return {{
- * points: Array.<Array.<Dygraph.PointType>>,
- * seriesExtremes: Array.<Array.<number>>,
- * boundaryIds: Array.<number>}}
- * @private
- */
-Dygraph.prototype.gatherDatasets_ = function(rolledSeries, dateWindow) {
- var boundaryIds = [];
- var points = [];
- var cumulativeYval = []; // For stacked series.
- var extremes = {}; // series name -> [low, high]
- var i, k;
- var errorBars = this.attr_("errorBars");
- var customBars = this.attr_("customBars");
- var bars = errorBars || customBars;
- var isValueNull = function(sample) {
- if (!bars) {
- return sample[1] === null;
- } else {
- return customBars ? sample[1][1] === null :
- errorBars ? sample[1][0] === null : false;
- }
- };
-
- // Loop over the fields (series). Go from the last to the first,
- // because if they're stacked that's how we accumulate the values.
- var num_series = rolledSeries.length - 1;
- var series;
- for (i = num_series; i >= 1; i--) {
- if (!this.visibility()[i - 1]) continue;
-
- // Prune down to the desired range, if necessary (for zooming)
- // Because there can be lines going to points outside of the visible area,
- // we actually prune to visible points, plus one on either side.
- if (dateWindow) {
- series = rolledSeries[i];
- var low = dateWindow[0];
- var high = dateWindow[1];
-
- // TODO(danvk): do binary search instead of linear search.
- // TODO(danvk): pass firstIdx and lastIdx directly to the renderer.
- var firstIdx = null, lastIdx = null;
- for (k = 0; k < series.length; k++) {
- if (series[k][0] >= low && firstIdx === null) {
- firstIdx = k;
- }
- if (series[k][0] <= high) {
- lastIdx = k;
- }
- }
-
- if (firstIdx === null) firstIdx = 0;
- var correctedFirstIdx = firstIdx;
- var isInvalidValue = true;
- while (isInvalidValue && correctedFirstIdx > 0) {
- correctedFirstIdx--;
- isInvalidValue = isValueNull(series[correctedFirstIdx]);
- }
-
- if (lastIdx === null) lastIdx = series.length - 1;
- var correctedLastIdx = lastIdx;
- isInvalidValue = true;
- while (isInvalidValue && correctedLastIdx < series.length - 1) {
- correctedLastIdx++;
- isInvalidValue = isValueNull(series[correctedLastIdx]);
- }
-
-
- if (correctedFirstIdx!==firstIdx) {
- firstIdx = correctedFirstIdx;
- }
- if (correctedLastIdx !== lastIdx) {
- lastIdx = correctedLastIdx;
- }
-
- boundaryIds[i-1] = [firstIdx, lastIdx];
-
- // .slice's end is exclusive, we want to include lastIdx.
- series = series.slice(firstIdx, lastIdx + 1);
- } else {
- series = rolledSeries[i];
- boundaryIds[i-1] = [0, series.length-1];
- }
-
- var seriesName = this.attr_("labels")[i];
- var seriesExtremes = this.extremeValues_(series);
-
- var seriesPoints = Dygraph.seriesToPoints_(
- series, bars, seriesName, boundaryIds[i-1][0]);
-
- if (this.attr_("stackedGraph")) {
- Dygraph.stackPoints_(seriesPoints, cumulativeYval, seriesExtremes,
- this.attr_("stackedGraphNaNFill"));
- }
-
- extremes[seriesName] = seriesExtremes;
- points[i] = seriesPoints;
- }
-
- return { points: points, extremes: extremes, boundaryIds: boundaryIds };
-};
-
-/**
- * Update the graph with new data. This method is called when the viewing area
- * has changed. If the underlying data or options have changed, predraw_ will
- * be called before drawGraph_ is called.
- *
- * @private
- */
-Dygraph.prototype.drawGraph_ = function() {
- var start = new Date();
-
- // This is used to set the second parameter to drawCallback, below.
- var is_initial_draw = this.is_initial_draw_;
- this.is_initial_draw_ = false;
-
- this.layout_.removeAllDatasets();
- this.setColors_();
- this.attrs_.pointSize = 0.5 * this.attr_('highlightCircleSize');
-
- var packed = this.gatherDatasets_(this.rolledSeries_, this.dateWindow_);
- var points = packed.points;
- var extremes = packed.extremes;
- this.boundaryIds_ = packed.boundaryIds;
-
- this.setIndexByName_ = {};
- var labels = this.attr_("labels");
- if (labels.length > 0) {
- this.setIndexByName_[labels[0]] = 0;
- }
- var dataIdx = 0;
- for (var i = 1; i < points.length; i++) {
- this.setIndexByName_[labels[i]] = i;
- if (!this.visibility()[i - 1]) continue;
- this.layout_.addDataset(labels[i], points[i]);
- this.datasetIndex_[i] = dataIdx++;
- }
-
- this.computeYAxisRanges_(extremes);
- this.layout_.setYAxes(this.axes_);
-
- this.addXTicks_();
-
- // Save the X axis zoomed status as the updateOptions call will tend to set it erroneously
- var tmp_zoomed_x = this.zoomed_x_;
- // Tell PlotKit to use this new data and render itself
- this.zoomed_x_ = tmp_zoomed_x;
- this.layout_.evaluate();
- this.renderGraph_(is_initial_draw);
-
- if (this.attr_("timingName")) {
- var end = new Date();
- Dygraph.info(this.attr_("timingName") + " - drawGraph: " + (end - start) + "ms");
- }
-};
-
-/**
- * This does the work of drawing the chart. It assumes that the layout and axis
- * scales have already been set (e.g. by predraw_).
- *
- * @private
- */
-Dygraph.prototype.renderGraph_ = function(is_initial_draw) {
- this.cascadeEvents_('clearChart');
- this.plotter_.clear();
-
- if (this.attr_('underlayCallback')) {
- // NOTE: we pass the dygraph object to this callback twice to avoid breaking
- // users who expect a deprecated form of this callback.
- this.attr_('underlayCallback')(
- this.hidden_ctx_, this.layout_.getPlotArea(), this, this);
- }
-
- var e = {
- canvas: this.hidden_,
- drawingContext: this.hidden_ctx_
- };
- this.cascadeEvents_('willDrawChart', e);
- this.plotter_.render();
- this.cascadeEvents_('didDrawChart', e);
- this.lastRow_ = -1; // because plugins/legend.js clears the legend
-
- // TODO(danvk): is this a performance bottleneck when panning?
- // The interaction canvas should already be empty in that situation.
- this.canvas_.getContext('2d').clearRect(0, 0, this.canvas_.width,
- this.canvas_.height);
-
- if (this.attr_("drawCallback") !== null) {
- this.attr_("drawCallback")(this, is_initial_draw);
- }
-};
-
-/**
- * @private
- * Determine properties of the y-axes which are independent of the data
- * currently being displayed. This includes things like the number of axes and
- * the style of the axes. It does not include the range of each axis and its
- * tick marks.
- * This fills in this.axes_.
- * axes_ = [ { options } ]
- * indices are into the axes_ array.
- */
-Dygraph.prototype.computeYAxes_ = function() {
- // Preserve valueWindow settings if they exist, and if the user hasn't
- // specified a new valueRange.
- var valueWindows, axis, index, opts, v;
- if (this.axes_ !== undefined && this.user_attrs_.hasOwnProperty("valueRange") === false) {
- valueWindows = [];
- for (index = 0; index < this.axes_.length; index++) {
- valueWindows.push(this.axes_[index].valueWindow);
- }
- }
-
- // this.axes_ doesn't match this.attributes_.axes_.options. It's used for
- // data computation as well as options storage.
- // Go through once and add all the axes.
- this.axes_ = [];
-
- for (axis = 0; axis < this.attributes_.numAxes(); axis++) {
- // Add a new axis, making a copy of its per-axis options.
- opts = { g : this };
- Dygraph.update(opts, this.attributes_.axisOptions(axis));
- this.axes_[axis] = opts;
- }
-
-
- // Copy global valueRange option over to the first axis.
- // NOTE(konigsberg): Are these two statements necessary?
- // I tried removing it. The automated tests pass, and manually
- // messing with tests/zoom.html showed no trouble.
- v = this.attr_('valueRange');
- if (v) this.axes_[0].valueRange = v;
-
- if (valueWindows !== undefined) {
- // Restore valueWindow settings.
-
- // When going from two axes back to one, we only restore
- // one axis.
- var idxCount = Math.min(valueWindows.length, this.axes_.length);
-
- for (index = 0; index < idxCount; index++) {
- this.axes_[index].valueWindow = valueWindows[index];
- }
- }
-
- for (axis = 0; axis < this.axes_.length; axis++) {
- if (axis === 0) {
- opts = this.optionsViewForAxis_('y' + (axis ? '2' : ''));
- v = opts("valueRange");
- if (v) this.axes_[axis].valueRange = v;
- } else { // To keep old behavior
- var axes = this.user_attrs_.axes;
- if (axes && axes.y2) {
- v = axes.y2.valueRange;
- if (v) this.axes_[axis].valueRange = v;
- }
- }
- }
-};
-
-/**
- * Returns the number of y-axes on the chart.
- * @return {Number} the number of axes.
- */
-Dygraph.prototype.numAxes = function() {
- return this.attributes_.numAxes();
-};
-
-/**
- * @private
- * Returns axis properties for the given series.
- * @param { String } setName The name of the series for which to get axis
- * properties, e.g. 'Y1'.
- * @return { Object } The axis properties.
- */
-Dygraph.prototype.axisPropertiesForSeries = function(series) {
- // TODO(danvk): handle errors.
- return this.axes_[this.attributes_.axisForSeries(series)];
-};
-
-/**
- * @private
- * Determine the value range and tick marks for each axis.
- * @param {Object} extremes A mapping from seriesName -> [low, high]
- * This fills in the valueRange and ticks fields in each entry of this.axes_.
- */
-Dygraph.prototype.computeYAxisRanges_ = function(extremes) {
- var isNullUndefinedOrNaN = function(num) {
- return isNaN(parseFloat(num));
- };
- var numAxes = this.attributes_.numAxes();
- var ypadCompat, span, series, ypad;
-
- var p_axis;
-
- // Compute extreme values, a span and tick marks for each axis.
- for (var i = 0; i < numAxes; i++) {
- var axis = this.axes_[i];
- var logscale = this.attributes_.getForAxis("logscale", i);
- var includeZero = this.attributes_.getForAxis("includeZero", i);
- var independentTicks = this.attributes_.getForAxis("independentTicks", i);
- series = this.attributes_.seriesForAxis(i);
-
- // Add some padding. This supports two Y padding operation modes:
- //
- // - backwards compatible (yRangePad not set):
- // 10% padding for automatic Y ranges, but not for user-supplied
- // ranges, and move a close-to-zero edge to zero except if
- // avoidMinZero is set, since drawing at the edge results in
- // invisible lines. Unfortunately lines drawn at the edge of a
- // user-supplied range will still be invisible. If logscale is
- // set, add a variable amount of padding at the top but
- // none at the bottom.
- //
- // - new-style (yRangePad set by the user):
- // always add the specified Y padding.
- //
- ypadCompat = true;
- ypad = 0.1; // add 10%
- if (this.attr_('yRangePad') !== null) {
- ypadCompat = false;
- // Convert pixel padding to ratio
- ypad = this.attr_('yRangePad') / this.plotter_.area.h;
- }
-
- if (series.length === 0) {
- // If no series are defined or visible then use a reasonable default
- axis.extremeRange = [0, 1];
- } else {
- // Calculate the extremes of extremes.
- var minY = Infinity; // extremes[series[0]][0];
- var maxY = -Infinity; // extremes[series[0]][1];
- var extremeMinY, extremeMaxY;
-
- for (var j = 0; j < series.length; j++) {
- // this skips invisible series
- if (!extremes.hasOwnProperty(series[j])) continue;
-
- // Only use valid extremes to stop null data series' from corrupting the scale.
- extremeMinY = extremes[series[j]][0];
- if (extremeMinY !== null) {
- minY = Math.min(extremeMinY, minY);
- }
- extremeMaxY = extremes[series[j]][1];
- if (extremeMaxY !== null) {
- maxY = Math.max(extremeMaxY, maxY);
- }
- }
-
- // Include zero if requested by the user.
- if (includeZero && !logscale) {
- if (minY > 0) minY = 0;
- if (maxY < 0) maxY = 0;
- }
-
- // Ensure we have a valid scale, otherwise default to [0, 1] for safety.
- if (minY == Infinity) minY = 0;
- if (maxY == -Infinity) maxY = 1;
-
- span = maxY - minY;
- // special case: if we have no sense of scale, center on the sole value.
- if (span === 0) {
- if (maxY !== 0) {
- span = Math.abs(maxY);
- } else {
- // ... and if the sole value is zero, use range 0-1.
- maxY = 1;
- span = 1;
- }
- }
-
- var maxAxisY, minAxisY;
- if (logscale) {
- if (ypadCompat) {
- maxAxisY = maxY + ypad * span;
- minAxisY = minY;
- } else {
- var logpad = Math.exp(Math.log(span) * ypad);
- maxAxisY = maxY * logpad;
- minAxisY = minY / logpad;
- }
- } else {
- maxAxisY = maxY + ypad * span;
- minAxisY = minY - ypad * span;
-
- // Backwards-compatible behavior: Move the span to start or end at zero if it's
- // close to zero, but not if avoidMinZero is set.
- if (ypadCompat && !this.attr_("avoidMinZero")) {
- if (minAxisY < 0 && minY >= 0) minAxisY = 0;
- if (maxAxisY > 0 && maxY <= 0) maxAxisY = 0;
- }
- }
- axis.extremeRange = [minAxisY, maxAxisY];
- }
- if (axis.valueWindow) {
- // This is only set if the user has zoomed on the y-axis. It is never set
- // by a user. It takes precedence over axis.valueRange because, if you set
- // valueRange, you'd still expect to be able to pan.
- axis.computedValueRange = [axis.valueWindow[0], axis.valueWindow[1]];
- } else if (axis.valueRange) {
- // This is a user-set value range for this axis.
- var y0 = isNullUndefinedOrNaN(axis.valueRange[0]) ? axis.extremeRange[0] : axis.valueRange[0];
- var y1 = isNullUndefinedOrNaN(axis.valueRange[1]) ? axis.extremeRange[1] : axis.valueRange[1];
- if (!ypadCompat) {
- if (axis.logscale) {
- var logpad = Math.exp(Math.log(span) * ypad);
- y0 *= logpad;
- y1 /= logpad;
- } else {
- span = y1 - y0;
- y0 -= span * ypad;
- y1 += span * ypad;
- }
- }
- axis.computedValueRange = [y0, y1];
- } else {
- axis.computedValueRange = axis.extremeRange;
- }
-
-
- if (independentTicks) {
- axis.independentTicks = independentTicks;
- var opts = this.optionsViewForAxis_('y' + (i ? '2' : ''));
- var ticker = opts('ticker');
- axis.ticks = ticker(axis.computedValueRange[0],
- axis.computedValueRange[1],
- this.height_, // TODO(danvk): should be area.height
- opts,
- this);
- // Define the first independent axis as primary axis.
- if (!p_axis) p_axis = axis;
- }
- }
- if (p_axis === undefined) {
- throw ("Configuration Error: At least one axis has to have the \"independentTicks\" option activated.");
- }
- // Add ticks. By default, all axes inherit the tick positions of the
- // primary axis. However, if an axis is specifically marked as having
- // independent ticks, then that is permissible as well.
- for (var i = 0; i < numAxes; i++) {
- var axis = this.axes_[i];
-
- if (!axis.independentTicks) {
- var opts = this.optionsViewForAxis_('y' + (i ? '2' : ''));
- var ticker = opts('ticker');
- var p_ticks = p_axis.ticks;
- var p_scale = p_axis.computedValueRange[1] - p_axis.computedValueRange[0];
- var scale = axis.computedValueRange[1] - axis.computedValueRange[0];
- var tick_values = [];
- for (var k = 0; k < p_ticks.length; k++) {
- var y_frac = (p_ticks[k].v - p_axis.computedValueRange[0]) / p_scale;
- var y_val = axis.computedValueRange[0] + y_frac * scale;
- tick_values.push(y_val);
- }
-
- axis.ticks = ticker(axis.computedValueRange[0],
- axis.computedValueRange[1],
- this.height_, // TODO(danvk): should be area.height
- opts,
- this,
- tick_values);
- }
- }
-};
-
-/**
- * Extracts one series from the raw data (a 2D array) into an array of (date,
- * value) tuples.
- *
- * This is where undesirable points (i.e. negative values on log scales and
- * missing values through which we wish to connect lines) are dropped.
- * TODO(danvk): the "missing values" bit above doesn't seem right.
- *
- * @private
- * @param {Array.<Array.<(number|Array<Number>)>>} rawData Input data. Rectangular
- * grid of points, where rawData[row][0] is the X value for the row,
- * and rawData[row][i] is the Y data for series #i.
- * @param {number} i Series index, starting from 1.
- * @param {boolean} logScale True if using logarithmic Y scale.
- * @return {Array.<Array.<(?number|Array<?number>)>} Series array, where
- * series[row] = [x,y] or [x, [y, err]] or [x, [y, yplus, yminus]].
- */
-Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) {
- // TODO(danvk): pre-allocate series here.
- var series = [];
- var errorBars = this.attr_("errorBars");
- var customBars = this.attr_("customBars");
- for (var j = 0; j < rawData.length; j++) {
- var x = rawData[j][0];
- var point = rawData[j][i];
- if (logScale) {
- // On the log scale, points less than zero do not exist.
- // This will create a gap in the chart.
- if (errorBars || customBars) {
- // point.length is either 2 (errorBars) or 3 (customBars)
- for (var k = 0; k < point.length; k++) {
- if (point[k] <= 0) {
- point = null;
- break;
- }
- }
- } else if (point <= 0) {
- point = null;
- }
- }
- // Fix null points to fit the display type standard.
- if (point !== null) {
- series.push([x, point]);
- } else {
- series.push([x, errorBars ? [null, null] : customBars ? [null, null, null] : point]);
- }
- }
- return series;
-};
-
-/**
- * @private
- * Calculates the rolling average of a data set.
- * If originalData is [label, val], rolls the average of those.
- * If originalData is [label, [, it's interpreted as [value, stddev]
- * and the roll is returned in the same form, with appropriately reduced
- * stddev for each value.
- * Note that this is where fractional input (i.e. '5/10') is converted into
- * decimal values.
- * @param {Array} originalData The data in the appropriate format (see above)
- * @param {Number} rollPeriod The number of points over which to average the
- * data
- */
-Dygraph.prototype.rollingAverage = function(originalData, rollPeriod) {
- rollPeriod = Math.min(rollPeriod, originalData.length);
- var rollingData = [];
- var sigma = this.attr_("sigma");
-
- var low, high, i, j, y, sum, num_ok, stddev;
- if (this.fractions_) {
- var num = 0;
- var den = 0; // numerator/denominator
- var mult = 100.0;
- for (i = 0; i < originalData.length; i++) {
- num += originalData[i][1][0];
- den += originalData[i][1][1];
- if (i - rollPeriod >= 0) {
- num -= originalData[i - rollPeriod][1][0];
- den -= originalData[i - rollPeriod][1][1];
- }
-
- var date = originalData[i][0];
- var value = den ? num / den : 0.0;
- if (this.attr_("errorBars")) {
- if (this.attr_("wilsonInterval")) {
- // For more details on this confidence interval, see:
- // http://en.wikipedia.org/wiki/Binomial_confidence_interval
- if (den) {
- var p = value < 0 ? 0 : value, n = den;
- var pm = sigma * Math.sqrt(p*(1-p)/n + sigma*sigma/(4*n*n));
- var denom = 1 + sigma * sigma / den;
- low = (p + sigma * sigma / (2 * den) - pm) / denom;
- high = (p + sigma * sigma / (2 * den) + pm) / denom;
- rollingData[i] = [date,
- [p * mult, (p - low) * mult, (high - p) * mult]];
- } else {
- rollingData[i] = [date, [0, 0, 0]];
- }
- } else {
- stddev = den ? sigma * Math.sqrt(value * (1 - value) / den) : 1.0;
- rollingData[i] = [date, [mult * value, mult * stddev, mult * stddev]];
- }
- } else {
- rollingData[i] = [date, mult * value];
- }
- }
- } else if (this.attr_("customBars")) {
- low = 0;
- var mid = 0;
- high = 0;
- var count = 0;
- for (i = 0; i < originalData.length; i++) {
- var data = originalData[i][1];
- y = data[1];
- rollingData[i] = [originalData[i][0], [y, y - data[0], data[2] - y]];
-
- if (y !== null && !isNaN(y)) {
- low += data[0];
- mid += y;
- high += data[2];
- count += 1;
- }
- if (i - rollPeriod >= 0) {
- var prev = originalData[i - rollPeriod];
- if (prev[1][1] !== null && !isNaN(prev[1][1])) {
- low -= prev[1][0];
- mid -= prev[1][1];
- high -= prev[1][2];
- count -= 1;
- }
- }
- if (count) {
- rollingData[i] = [originalData[i][0], [ 1.0 * mid / count,
- 1.0 * (mid - low) / count,
- 1.0 * (high - mid) / count ]];
- } else {
- rollingData[i] = [originalData[i][0], [null, null, null]];
- }
- }
- } else {
- // Calculate the rolling average for the first rollPeriod - 1 points where
- // there is not enough data to roll over the full number of points
- if (!this.attr_("errorBars")) {
- if (rollPeriod == 1) {
- return originalData;
- }
-
- for (i = 0; i < originalData.length; i++) {
- sum = 0;
- num_ok = 0;
- for (j = Math.max(0, i - rollPeriod + 1); j < i + 1; j++) {
- y = originalData[j][1];
- if (y === null || isNaN(y)) continue;
- num_ok++;
- sum += originalData[j][1];
- }
- if (num_ok) {
- rollingData[i] = [originalData[i][0], sum / num_ok];
- } else {
- rollingData[i] = [originalData[i][0], null];
- }
- }
-
- } else {
- for (i = 0; i < originalData.length; i++) {
- sum = 0;
- var variance = 0;
- num_ok = 0;
- for (j = Math.max(0, i - rollPeriod + 1); j < i + 1; j++) {
- y = originalData[j][1][0];
- if (y === null || isNaN(y)) continue;
- num_ok++;
- sum += originalData[j][1][0];
- variance += Math.pow(originalData[j][1][1], 2);
- }
- if (num_ok) {
- stddev = Math.sqrt(variance) / num_ok;
- rollingData[i] = [originalData[i][0],
- [sum / num_ok, sigma * stddev, sigma * stddev]];
- } else {
- // This explicitly preserves NaNs to aid with "independent series".
- // See testRollingAveragePreservesNaNs.
- var v = (rollPeriod == 1) ? originalData[i][1][0] : null;
- rollingData[i] = [originalData[i][0], [v, v, v]];
- }
- }
- }
- }
-
- return rollingData;
-};
-
-/**
- * Detects the type of the str (date or numeric) and sets the various
- * formatting attributes in this.attrs_ based on this type.
- * @param {String} str An x value.
- * @private
- */
-Dygraph.prototype.detectTypeFromString_ = function(str) {
- var isDate = false;
- var dashPos = str.indexOf('-'); // could be 2006-01-01 _or_ 1.0e-2
- if ((dashPos > 0 && (str[dashPos-1] != 'e' && str[dashPos-1] != 'E')) ||
- str.indexOf('/') >= 0 ||
- isNaN(parseFloat(str))) {
- isDate = true;
- } else if (str.length == 8 && str > '19700101' && str < '20371231') {
- // TODO(danvk): remove support for this format.
- isDate = true;
- }
-
- this.setXAxisOptions_(isDate);
-};
-
-Dygraph.prototype.setXAxisOptions_ = function(isDate) {
- if (isDate) {
- this.attrs_.xValueParser = Dygraph.dateParser;
- this.attrs_.axes.x.valueFormatter = Dygraph.dateString_;
- this.attrs_.axes.x.ticker = Dygraph.dateTicker;
- this.attrs_.axes.x.axisLabelFormatter = Dygraph.dateAxisFormatter;
- } else {
- /** @private (shut up, jsdoc!) */
- this.attrs_.xValueParser = function(x) { return parseFloat(x); };
- // TODO(danvk): use Dygraph.numberValueFormatter here?
- /** @private (shut up, jsdoc!) */
- this.attrs_.axes.x.valueFormatter = function(x) { return x; };
- this.attrs_.axes.x.ticker = Dygraph.numericLinearTicks;
- this.attrs_.axes.x.axisLabelFormatter = this.attrs_.axes.x.valueFormatter;
- }
-};
-
-/**
- * Parses the value as a floating point number. This is like the parseFloat()
- * built-in, but with a few differences:
- * - the empty string is parsed as null, rather than NaN.
- * - if the string cannot be parsed at all, an error is logged.
- * If the string can't be parsed, this method returns null.
- * @param {String} x The string to be parsed
- * @param {Number} opt_line_no The line number from which the string comes.
- * @param {String} opt_line The text of the line from which the string comes.
- * @private
- */
-
-// Parse the x as a float or return null if it's not a number.
-Dygraph.prototype.parseFloat_ = function(x, opt_line_no, opt_line) {
- var val = parseFloat(x);
- if (!isNaN(val)) return val;
-
- // Try to figure out what happeend.
- // If the value is the empty string, parse it as null.
- if (/^ *$/.test(x)) return null;
-
- // If it was actually "NaN", return it as NaN.
- if (/^ *nan *$/i.test(x)) return NaN;
-
- // Looks like a parsing error.
- var msg = "Unable to parse '" + x + "' as a number";
- if (opt_line !== null && opt_line_no !== null) {
- msg += " on line " + (1+opt_line_no) + " ('" + opt_line + "') of CSV.";
- }
- this.error(msg);
-
- return null;
-};
-
-/**
- * @private
- * Parses a string in a special csv format. We expect a csv file where each
- * line is a date point, and the first field in each line is the date string.
- * We also expect that all remaining fields represent series.
- * if the errorBars attribute is set, then interpret the fields as:
- * date, series1, stddev1, series2, stddev2, ...
- * @param {[Object]} data See above.
- *
- * @return [Object] An array with one entry for each row. These entries
- * are an array of cells in that row. The first entry is the parsed x-value for
- * the row. The second, third, etc. are the y-values. These can take on one of
- * three forms, depending on the CSV and constructor parameters:
- * 1. numeric value
- * 2. [ value, stddev ]
- * 3. [ low value, center value, high value ]
- */
-Dygraph.prototype.parseCSV_ = function(data) {
- var ret = [];
- var line_delimiter = Dygraph.detectLineDelimiter(data);
- var lines = data.split(line_delimiter || "\n");
- var vals, j;
-
- // Use the default delimiter or fall back to a tab if that makes sense.
- var delim = this.attr_('delimiter');
- if (lines[0].indexOf(delim) == -1 && lines[0].indexOf('\t') >= 0) {
- delim = '\t';
- }
-
- var start = 0;
- if (!('labels' in this.user_attrs_)) {
- // User hasn't explicitly set labels, so they're (presumably) in the CSV.
- start = 1;
- this.attrs_.labels = lines[0].split(delim); // NOTE: _not_ user_attrs_.
- this.attributes_.reparseSeries();
- }
- var line_no = 0;
-
- var xParser;
- var defaultParserSet = false; // attempt to auto-detect x value type
- var expectedCols = this.attr_("labels").length;
- var outOfOrder = false;
- for (var i = start; i < lines.length; i++) {
- var line = lines[i];
- line_no = i;
- if (line.length === 0) continue; // skip blank lines
- if (line[0] == '#') continue; // skip comment lines
- var inFields = line.split(delim);
- if (inFields.length < 2) continue;
-
- var fields = [];
- if (!defaultParserSet) {
- this.detectTypeFromString_(inFields[0]);
- xParser = this.attr_("xValueParser");
- defaultParserSet = true;
- }
- fields[0] = xParser(inFields[0], this);
-
- // If fractions are expected, parse the numbers as "A/B"
- if (this.fractions_) {
- for (j = 1; j < inFields.length; j++) {
- // TODO(danvk): figure out an appropriate way to flag parse errors.
- vals = inFields[j].split("/");
- if (vals.length != 2) {
- this.error('Expected fractional "num/den" values in CSV data ' +
- "but found a value '" + inFields[j] + "' on line " +
- (1 + i) + " ('" + line + "') which is not of this form.");
- fields[j] = [0, 0];
- } else {
- fields[j] = [this.parseFloat_(vals[0], i, line),
- this.parseFloat_(vals[1], i, line)];
- }
- }
- } else if (this.attr_("errorBars")) {
- // If there are error bars, values are (value, stddev) pairs
- if (inFields.length % 2 != 1) {
- this.error('Expected alternating (value, stdev.) pairs in CSV data ' +
- 'but line ' + (1 + i) + ' has an odd number of values (' +
- (inFields.length - 1) + "): '" + line + "'");
- }
- for (j = 1; j < inFields.length; j += 2) {
- fields[(j + 1) / 2] = [this.parseFloat_(inFields[j], i, line),
- this.parseFloat_(inFields[j + 1], i, line)];
- }
- } else if (this.attr_("customBars")) {
- // Bars are a low;center;high tuple
- for (j = 1; j < inFields.length; j++) {
- var val = inFields[j];
- if (/^ *$/.test(val)) {
- fields[j] = [null, null, null];
- } else {
- vals = val.split(";");
- if (vals.length == 3) {
- fields[j] = [ this.parseFloat_(vals[0], i, line),
- this.parseFloat_(vals[1], i, line),
- this.parseFloat_(vals[2], i, line) ];
- } else {
- this.warn('When using customBars, values must be either blank ' +
- 'or "low;center;high" tuples (got "' + val +
- '" on line ' + (1+i));
- }
- }
- }
- } else {
- // Values are just numbers
- for (j = 1; j < inFields.length; j++) {
- fields[j] = this.parseFloat_(inFields[j], i, line);
- }
- }
- if (ret.length > 0 && fields[0] < ret[ret.length - 1][0]) {
- outOfOrder = true;
- }
-
- if (fields.length != expectedCols) {
- this.error("Number of columns in line " + i + " (" + fields.length +
- ") does not agree with number of labels (" + expectedCols +
- ") " + line);
- }
-
- // If the user specified the 'labels' option and none of the cells of the
- // first row parsed correctly, then they probably double-specified the
- // labels. We go with the values set in the option, discard this row and
- // log a warning to the JS console.
- if (i === 0 && this.attr_('labels')) {
- var all_null = true;
- for (j = 0; all_null && j < fields.length; j++) {
- if (fields[j]) all_null = false;
- }
- if (all_null) {
- this.warn("The dygraphs 'labels' option is set, but the first row of " +
- "CSV data ('" + line + "') appears to also contain labels. " +
- "Will drop the CSV labels and use the option labels.");
- continue;
- }
- }
- ret.push(fields);
- }
-
- if (outOfOrder) {
- this.warn("CSV is out of order; order it correctly to speed loading.");
- ret.sort(function(a,b) { return a[0] - b[0]; });
- }
-
- return ret;
-};
-
-/**
- * @private
- * The user has provided their data as a pre-packaged JS array. If the x values
- * are numeric, this is the same as dygraphs' internal format. If the x values
- * are dates, we need to convert them from Date objects to ms since epoch.
- * @param {[Object]} data
- * @return {[Object]} data with numeric x values.
- */
-Dygraph.prototype.parseArray_ = function(data) {
- // Peek at the first x value to see if it's numeric.
- if (data.length === 0) {
- this.error("Can't plot empty data set");
- return null;
- }
- if (data[0].length === 0) {
- this.error("Data set cannot contain an empty row");
- return null;
- }
-
- var i;
- if (this.attr_("labels") === null) {
- this.warn("Using default labels. Set labels explicitly via 'labels' " +
- "in the options parameter");
- this.attrs_.labels = [ "X" ];
- for (i = 1; i < data[0].length; i++) {
- this.attrs_.labels.push("Y" + i); // Not user_attrs_.
- }
- this.attributes_.reparseSeries();
- } else {
- var num_labels = this.attr_("labels");
- if (num_labels.length != data[0].length) {
- this.error("Mismatch between number of labels (" + num_labels +
- ") and number of columns in array (" + data[0].length + ")");
- return null;
- }
- }
-
- if (Dygraph.isDateLike(data[0][0])) {
- // Some intelligent defaults for a date x-axis.
- this.attrs_.axes.x.valueFormatter = Dygraph.dateString_;
- this.attrs_.axes.x.ticker = Dygraph.dateTicker;
- this.attrs_.axes.x.axisLabelFormatter = Dygraph.dateAxisFormatter;
-
- // Assume they're all dates.
- var parsedData = Dygraph.clone(data);
- for (i = 0; i < data.length; i++) {
- if (parsedData[i].length === 0) {
- this.error("Row " + (1 + i) + " of data is empty");
- return null;
- }
- if (parsedData[i][0] === null ||
- typeof(parsedData[i][0].getTime) != 'function' ||
- isNaN(parsedData[i][0].getTime())) {
- this.error("x value in row " + (1 + i) + " is not a Date");
- return null;
- }
- parsedData[i][0] = parsedData[i][0].getTime();
- }
- return parsedData;
- } else {
- // Some intelligent defaults for a numeric x-axis.
- /** @private (shut up, jsdoc!) */
- this.attrs_.axes.x.valueFormatter = function(x) { return x; };
- this.attrs_.axes.x.ticker = Dygraph.numericLinearTicks;
- this.attrs_.axes.x.axisLabelFormatter = Dygraph.numberAxisLabelFormatter;
- return data;
- }
-};
-
-/**
- * Parses a DataTable object from gviz.
- * The data is expected to have a first column that is either a date or a
- * number. All subsequent columns must be numbers. If there is a clear mismatch
- * between this.xValueParser_ and the type of the first column, it will be
- * fixed. Fills out rawData_.
- * @param {[Object]} data See above.
- * @private
- */
-Dygraph.prototype.parseDataTable_ = function(data) {
- var shortTextForAnnotationNum = function(num) {
- // converts [0-9]+ [A-Z][a-z]*
- // example: 0=A, 1=B, 25=Z, 26=Aa, 27=Ab
- // and continues like.. Ba Bb .. Za .. Zz..Aaa...Zzz Aaaa Zzzz
- var shortText = String.fromCharCode(65 /* A */ + num % 26);
- num = Math.floor(num / 26);
- while ( num > 0 ) {
- shortText = String.fromCharCode(65 /* A */ + (num - 1) % 26 ) + shortText.toLowerCase();
- num = Math.floor((num - 1) / 26);
- }
- return shortText;
- };
-
- var cols = data.getNumberOfColumns();
- var rows = data.getNumberOfRows();
-
- var indepType = data.getColumnType(0);
- if (indepType == 'date' || indepType == 'datetime') {
- this.attrs_.xValueParser = Dygraph.dateParser;
- this.attrs_.axes.x.valueFormatter = Dygraph.dateString_;
- this.attrs_.axes.x.ticker = Dygraph.dateTicker;
- this.attrs_.axes.x.axisLabelFormatter = Dygraph.dateAxisFormatter;
- } else if (indepType == 'number') {
- this.attrs_.xValueParser = function(x) { return parseFloat(x); };
- this.attrs_.axes.x.valueFormatter = function(x) { return x; };
- this.attrs_.axes.x.ticker = Dygraph.numericLinearTicks;
- this.attrs_.axes.x.axisLabelFormatter = this.attrs_.axes.x.valueFormatter;
- } else {
- this.error("only 'date', 'datetime' and 'number' types are supported for " +
- "column 1 of DataTable input (Got '" + indepType + "')");
- return null;
- }
-
- // Array of the column indices which contain data (and not annotations).
- var colIdx = [];
- var annotationCols = {}; // data index -> [annotation cols]
- var hasAnnotations = false;
- var i, j;
- for (i = 1; i < cols; i++) {
- var type = data.getColumnType(i);
- if (type == 'number') {
- colIdx.push(i);
- } else if (type == 'string' && this.attr_('displayAnnotations')) {
- // This is OK -- it's an annotation column.
- var dataIdx = colIdx[colIdx.length - 1];
- if (!annotationCols.hasOwnProperty(dataIdx)) {
- annotationCols[dataIdx] = [i];
- } else {
- annotationCols[dataIdx].push(i);
- }
- hasAnnotations = true;
- } else {
- this.error("Only 'number' is supported as a dependent type with Gviz." +
- " 'string' is only supported if displayAnnotations is true");
- }
- }
-
- // Read column labels
- // TODO(danvk): add support back for errorBars
- var labels = [data.getColumnLabel(0)];
- for (i = 0; i < colIdx.length; i++) {
- labels.push(data.getColumnLabel(colIdx[i]));
- if (this.attr_("errorBars")) i += 1;
- }
- this.attrs_.labels = labels;
- cols = labels.length;
-
- var ret = [];
- var outOfOrder = false;
- var annotations = [];
- for (i = 0; i < rows; i++) {
- var row = [];
- if (typeof(data.getValue(i, 0)) === 'undefined' ||
- data.getValue(i, 0) === null) {
- this.warn("Ignoring row " + i +
- " of DataTable because of undefined or null first column.");
- continue;
- }
-
- if (indepType == 'date' || indepType == 'datetime') {
- row.push(data.getValue(i, 0).getTime());
- } else {
- row.push(data.getValue(i, 0));
- }
- if (!this.attr_("errorBars")) {
- for (j = 0; j < colIdx.length; j++) {
- var col = colIdx[j];
- row.push(data.getValue(i, col));
- if (hasAnnotations &&
- annotationCols.hasOwnProperty(col) &&
- data.getValue(i, annotationCols[col][0]) !== null) {
- var ann = {};
- ann.series = data.getColumnLabel(col);
- ann.xval = row[0];
- ann.shortText = shortTextForAnnotationNum(annotations.length);
- ann.text = '';
- for (var k = 0; k < annotationCols[col].length; k++) {
- if (k) ann.text += "\n";
- ann.text += data.getValue(i, annotationCols[col][k]);
- }
- annotations.push(ann);
- }
- }
-
- // Strip out infinities, which give dygraphs problems later on.
- for (j = 0; j < row.length; j++) {
- if (!isFinite(row[j])) row[j] = null;
- }
- } else {
- for (j = 0; j < cols - 1; j++) {
- row.push([ data.getValue(i, 1 + 2 * j), data.getValue(i, 2 + 2 * j) ]);
- }
- }
- if (ret.length > 0 && row[0] < ret[ret.length - 1][0]) {
- outOfOrder = true;
- }
- ret.push(row);
- }
-
- if (outOfOrder) {
- this.warn("DataTable is out of order; order it correctly to speed loading.");
- ret.sort(function(a,b) { return a[0] - b[0]; });
- }
- this.rawData_ = ret;
-
- if (annotations.length > 0) {
- this.setAnnotations(annotations, true);
- }
- this.attributes_.reparseSeries();
-};
-
-/**
- * Get the CSV data. If it's in a function, call that function. If it's in a
- * file, do an XMLHttpRequest to get it.
- * @private
- */
-Dygraph.prototype.start_ = function() {
- var data = this.file_;
-
- // Functions can return references of all other types.
- if (typeof data == 'function') {
- data = data();
- }
-
- if (Dygraph.isArrayLike(data)) {
- this.rawData_ = this.parseArray_(data);
- this.predraw_();
- } else if (typeof data == 'object' &&
- typeof data.getColumnRange == 'function') {
- // must be a DataTable from gviz.
- this.parseDataTable_(data);
- this.predraw_();
- } else if (typeof data == 'string') {
- // Heuristic: a newline means it's CSV data. Otherwise it's an URL.
- var line_delimiter = Dygraph.detectLineDelimiter(data);
- if (line_delimiter) {
- this.loadedEvent_(data);
- } else {
- var req = new XMLHttpRequest();
- var caller = this;
- req.onreadystatechange = function () {
- if (req.readyState == 4) {
- if (req.status === 200 || // Normal http
- req.status === 0) { // Chrome w/ --allow-file-access-from-files
- caller.loadedEvent_(req.responseText);
- }
- }
- };
-
- req.open("GET", data, true);
- req.send(null);
- }
- } else {
- this.error("Unknown data format: " + (typeof data));
- }
-};
-
-/**
- * Changes various properties of the graph. These can include:
- * <ul>
- * <li>file: changes the source data for the graph</li>
- * <li>errorBars: changes whether the data contains stddev</li>
- * </ul>
- *
- * There's a huge variety of options that can be passed to this method. For a
- * full list, see http://dygraphs.com/options.html.
- *
- * @param {Object} attrs The new properties and values
- * @param {Boolean} [block_redraw] Usually the chart is redrawn after every
- * call to updateOptions(). If you know better, you can pass true to explicitly
- * block the redraw. This can be useful for chaining updateOptions() calls,
- * avoiding the occasional infinite loop and preventing redraws when it's not
- * necessary (e.g. when updating a callback).
- */
-Dygraph.prototype.updateOptions = function(input_attrs, block_redraw) {
- if (typeof(block_redraw) == 'undefined') block_redraw = false;
-
- // mapLegacyOptions_ drops the "file" parameter as a convenience to us.
- var file = input_attrs.file;
- var attrs = Dygraph.mapLegacyOptions_(input_attrs);
-
- // TODO(danvk): this is a mess. Move these options into attr_.
- if ('rollPeriod' in attrs) {
- this.rollPeriod_ = attrs.rollPeriod;
- }
- if ('dateWindow' in attrs) {
- this.dateWindow_ = attrs.dateWindow;
- if (!('isZoomedIgnoreProgrammaticZoom' in attrs)) {
- this.zoomed_x_ = (attrs.dateWindow !== null);
- }
- }
- if ('valueRange' in attrs && !('isZoomedIgnoreProgrammaticZoom' in attrs)) {
- this.zoomed_y_ = (attrs.valueRange !== null);
- }
-
- // TODO(danvk): validate per-series options.
- // Supported:
- // strokeWidth
- // pointSize
- // drawPoints
- // highlightCircleSize
-
- // Check if this set options will require new points.
- var requiresNewPoints = Dygraph.isPixelChangingOptionList(this.attr_("labels"), attrs);
-
- Dygraph.updateDeep(this.user_attrs_, attrs);
-
- this.attributes_.reparseSeries();
-
- if (file) {
- this.file_ = file;
- if (!block_redraw) this.start_();
- } else {
- if (!block_redraw) {
- if (requiresNewPoints) {
- this.predraw_();
- } else {
- this.renderGraph_(false);
- }
- }
- }
-};
-
-/**
- * Returns a copy of the options with deprecated names converted into current
- * names. Also drops the (potentially-large) 'file' attribute. If the caller is
- * interested in that, they should save a copy before calling this.
- * @private
- */
-Dygraph.mapLegacyOptions_ = function(attrs) {
- var my_attrs = {};
- for (var k in attrs) {
- if (k == 'file') continue;
- if (attrs.hasOwnProperty(k)) my_attrs[k] = attrs[k];
- }
-
- var set = function(axis, opt, value) {
- if (!my_attrs.axes) my_attrs.axes = {};
- if (!my_attrs.axes[axis]) my_attrs.axes[axis] = {};
- my_attrs.axes[axis][opt] = value;
- };
- var map = function(opt, axis, new_opt) {
- if (typeof(attrs[opt]) != 'undefined') {
- Dygraph.warn("Option " + opt + " is deprecated. Use the " +
- new_opt + " option for the " + axis + " axis instead. " +
- "(e.g. { axes : { " + axis + " : { " + new_opt + " : ... } } } " +
- "(see http://dygraphs.com/per-axis.html for more information.");
- set(axis, new_opt, attrs[opt]);
- delete my_attrs[opt];
- }
- };
-
- // This maps, e.g., xValueFormater -> axes: { x: { valueFormatter: ... } }
- map('xValueFormatter', 'x', 'valueFormatter');
- map('pixelsPerXLabel', 'x', 'pixelsPerLabel');
- map('xAxisLabelFormatter', 'x', 'axisLabelFormatter');
- map('xTicker', 'x', 'ticker');
- map('yValueFormatter', 'y', 'valueFormatter');
- map('pixelsPerYLabel', 'y', 'pixelsPerLabel');
- map('yAxisLabelFormatter', 'y', 'axisLabelFormatter');
- map('yTicker', 'y', 'ticker');
- return my_attrs;
-};
-
-/**
- * Resizes the dygraph. If no parameters are specified, resizes to fill the
- * containing div (which has presumably changed size since the dygraph was
- * instantiated. If the width/height are specified, the div will be resized.
- *
- * This is far more efficient than destroying and re-instantiating a
- * Dygraph, since it doesn't have to reparse the underlying data.
- *
- * @param {Number} [width] Width (in pixels)
- * @param {Number} [height] Height (in pixels)
- */
-Dygraph.prototype.resize = function(width, height) {
- if (this.resize_lock) {
- return;
- }
- this.resize_lock = true;
-
- if ((width === null) != (height === null)) {
- this.warn("Dygraph.resize() should be called with zero parameters or " +
- "two non-NULL parameters. Pretending it was zero.");
- width = height = null;
- }
-
- var old_width = this.width_;
- var old_height = this.height_;
-
- if (width) {
- this.maindiv_.style.width = width + "px";
- this.maindiv_.style.height = height + "px";
- this.width_ = width;
- this.height_ = height;
- } else {
- this.width_ = this.maindiv_.clientWidth;
- this.height_ = this.maindiv_.clientHeight;
- }
-
- if (old_width != this.width_ || old_height != this.height_) {
- // Resizing a canvas erases it, even when the size doesn't change, so
- // any resize needs to be followed by a redraw.
- this.resizeElements_();
- this.predraw_();
- }
-
- this.resize_lock = false;
-};
-
-/**
- * Adjusts the number of points in the rolling average. Updates the graph to
- * reflect the new averaging period.
- * @param {Number} length Number of points over which to average the data.
- */
-Dygraph.prototype.adjustRoll = function(length) {
- this.rollPeriod_ = length;
- this.predraw_();
-};
-
-/**
- * Returns a boolean array of visibility statuses.
- */
-Dygraph.prototype.visibility = function() {
- // Do lazy-initialization, so that this happens after we know the number of
- // data series.
- if (!this.attr_("visibility")) {
- this.attrs_.visibility = [];
- }
- // TODO(danvk): it looks like this could go into an infinite loop w/ user_attrs.
- while (this.attr_("visibility").length < this.numColumns() - 1) {
- this.attrs_.visibility.push(true);
- }
- return this.attr_("visibility");
-};
-
-/**
- * Changes the visiblity of a series.
- */
-Dygraph.prototype.setVisibility = function(num, value) {
- var x = this.visibility();
- if (num < 0 || num >= x.length) {
- this.warn("invalid series number in setVisibility: " + num);
- } else {
- x[num] = value;
- this.predraw_();
- }
-};
-
-/**
- * How large of an area will the dygraph render itself in?
- * This is used for testing.
- * @return A {width: w, height: h} object.
- * @private
- */
-Dygraph.prototype.size = function() {
- return { width: this.width_, height: this.height_ };
-};
-
-/**
- * Update the list of annotations and redraw the chart.
- * See dygraphs.com/annotations.html for more info on how to use annotations.
- * @param ann {Array} An array of annotation objects.
- * @param suppressDraw {Boolean} Set to "true" to block chart redraw (optional).
- */
-Dygraph.prototype.setAnnotations = function(ann, suppressDraw) {
- // Only add the annotation CSS rule once we know it will be used.
- Dygraph.addAnnotationRule();
- this.annotations_ = ann;
- if (!this.layout_) {
- this.warn("Tried to setAnnotations before dygraph was ready. " +
- "Try setting them in a drawCallback. See " +
- "dygraphs.com/tests/annotation.html");
- return;
- }
-
- this.layout_.setAnnotations(this.annotations_);
- if (!suppressDraw) {
- this.predraw_();
- }
-};
-
-/**
- * Return the list of annotations.
- */
-Dygraph.prototype.annotations = function() {
- return this.annotations_;
-};
-
-/**
- * Get the list of label names for this graph. The first column is the
- * x-axis, so the data series names start at index 1.
- *
- * Returns null when labels have not yet been defined.
- */
-Dygraph.prototype.getLabels = function() {
- var labels = this.attr_("labels");
- return labels ? labels.slice() : null;
-};
-
-/**
- * Get the index of a series (column) given its name. The first column is the
- * x-axis, so the data series start with index 1.
- */
-Dygraph.prototype.indexFromSetName = function(name) {
- return this.setIndexByName_[name];
-};
-
-/**
- * Get the internal dataset index given its name. These are numbered starting from 0,
- * and only count visible sets.
- * @private
- */
-Dygraph.prototype.datasetIndexFromSetName_ = function(name) {
- return this.datasetIndex_[this.indexFromSetName(name)];
-};
-
-/**
- * @private
- * Adds a default style for the annotation CSS classes to the document. This is
- * only executed when annotations are actually used. It is designed to only be
- * called once -- all calls after the first will return immediately.
- */
-Dygraph.addAnnotationRule = function() {
- // TODO(danvk): move this function into plugins/annotations.js?
- if (Dygraph.addedAnnotationCSS) return;
-
- var rule = "border: 1px solid black; " +
- "background-color: white; " +
- "text-align: center;";
-
- var styleSheetElement = document.createElement("style");
- styleSheetElement.type = "text/css";
- document.getElementsByTagName("head")[0].appendChild(styleSheetElement);
-
- // Find the first style sheet that we can access.
- // We may not add a rule to a style sheet from another domain for security
- // reasons. This sometimes comes up when using gviz, since the Google gviz JS
- // adds its own style sheets from google.com.
- for (var i = 0; i < document.styleSheets.length; i++) {
- if (document.styleSheets[i].disabled) continue;
- var mysheet = document.styleSheets[i];
- try {
- if (mysheet.insertRule) { // Firefox
- var idx = mysheet.cssRules ? mysheet.cssRules.length : 0;
- mysheet.insertRule(".dygraphDefaultAnnotation { " + rule + " }", idx);
- } else if (mysheet.addRule) { // IE
- mysheet.addRule(".dygraphDefaultAnnotation", rule);
- }
- Dygraph.addedAnnotationCSS = true;
- return;
- } catch(err) {
- // Was likely a security exception.
- }
- }
-
- this.warn("Unable to add default annotation CSS rule; display may be off.");
-};
-
-// Older pages may still use this name.
-var DateGraph = Dygraph;
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/excanvas.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/excanvas.js
deleted file mode 100644
index 367764b4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/excanvas.js
+++ /dev/null
@@ -1,924 +0,0 @@
-// Copyright 2006 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-// Known Issues:
-//
-// * Patterns are not implemented.
-// * Radial gradient are not implemented. The VML version of these look very
-// different from the canvas one.
-// * Clipping paths are not implemented.
-// * Coordsize. The width and height attribute have higher priority than the
-// width and height style values which isn't correct.
-// * Painting mode isn't implemented.
-// * Canvas width/height should is using content-box by default. IE in
-// Quirks mode will draw the canvas using border-box. Either change your
-// doctype to HTML5
-// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
-// or use Box Sizing Behavior from WebFX
-// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
-// * Non uniform scaling does not correctly scale strokes.
-// * Optimize. There is always room for speed improvements.
-
-// Only add this code if we do not already have a canvas implementation
-if (!document.createElement('canvas').getContext) {
-
-(function() {
-
- // alias some functions to make (compiled) code shorter
- var m = Math;
- var mr = m.round;
- var ms = m.sin;
- var mc = m.cos;
- var abs = m.abs;
- var sqrt = m.sqrt;
-
- // this is used for sub pixel precision
- var Z = 10;
- var Z2 = Z / 2;
-
- /**
- * This funtion is assigned to the <canvas> elements as element.getContext().
- * @this {HTMLElement}
- * @return {CanvasRenderingContext2D_}
- */
- function getContext() {
- return this.context_ ||
- (this.context_ = new CanvasRenderingContext2D_(this));
- }
-
- var slice = Array.prototype.slice;
-
- /**
- * Binds a function to an object. The returned function will always use the
- * passed in {@code obj} as {@code this}.
- *
- * Example:
- *
- * g = bind(f, obj, a, b)
- * g(c, d) // will do f.call(obj, a, b, c, d)
- *
- * @param {Function} f The function to bind the object to
- * @param {Object} obj The object that should act as this when the function
- * is called
- * @param {*} var_args Rest arguments that will be used as the initial
- * arguments when the function is called
- * @return {Function} A new function that has bound this
- */
- function bind(f, obj, var_args) {
- var a = slice.call(arguments, 2);
- return function() {
- return f.apply(obj, a.concat(slice.call(arguments)));
- };
- }
-
- var G_vmlCanvasManager_ = {
- init: function(opt_doc) {
- if (/MSIE/.test(navigator.userAgent) && !window.opera) {
- var doc = opt_doc || document;
- // Create a dummy element so that IE will allow canvas elements to be
- // recognized.
- doc.createElement('canvas');
- doc.attachEvent('onreadystatechange', bind(this.init_, this, doc));
- }
- },
-
- init_: function(doc) {
- // create xmlns
- if (!doc.namespaces['g_vml_']) {
- doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml',
- '#default#VML');
-
- }
- if (!doc.namespaces['g_o_']) {
- doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office',
- '#default#VML');
- }
-
- // Setup default CSS. Only add one style sheet per document
- if (!doc.styleSheets['ex_canvas_']) {
- var ss = doc.createStyleSheet();
- ss.owningElement.id = 'ex_canvas_';
- ss.cssText = 'canvas{display:inline-block;overflow:hidden;' +
- // default size is 300x150 in Gecko and Opera
- 'text-align:left;width:300px;height:150px}' +
- 'g_vml_\\:*{behavior:url(#default#VML)}' +
- 'g_o_\\:*{behavior:url(#default#VML)}';
-
- }
-
- // find all canvas elements
- var els = doc.getElementsByTagName('canvas');
- for (var i = 0; i < els.length; i++) {
- this.initElement(els[i]);
- }
- },
-
- /**
- * Public initializes a canvas element so that it can be used as canvas
- * element from now on. This is called automatically before the page is
- * loaded but if you are creating elements using createElement you need to
- * make sure this is called on the element.
- * @param {HTMLElement} el The canvas element to initialize.
- * @return {HTMLElement} the element that was created.
- */
- initElement: function(el) {
- if (!el.getContext) {
-
- el.getContext = getContext;
-
- // Remove fallback content. There is no way to hide text nodes so we
- // just remove all childNodes. We could hide all elements and remove
- // text nodes but who really cares about the fallback content.
- el.innerHTML = '';
-
- // do not use inline function because that will leak memory
- el.attachEvent('onpropertychange', onPropertyChange);
- el.attachEvent('onresize', onResize);
-
- var attrs = el.attributes;
- if (attrs.width && attrs.width.specified) {
- // TODO: use runtimeStyle and coordsize
- // el.getContext().setWidth_(attrs.width.nodeValue);
- el.style.width = attrs.width.nodeValue + 'px';
- } else {
- el.width = el.clientWidth;
- }
- if (attrs.height && attrs.height.specified) {
- // TODO: use runtimeStyle and coordsize
- // el.getContext().setHeight_(attrs.height.nodeValue);
- el.style.height = attrs.height.nodeValue + 'px';
- } else {
- el.height = el.clientHeight;
- }
- //el.getContext().setCoordsize_()
- }
- return el;
- }
- };
-
- function onPropertyChange(e) {
- var el = e.srcElement;
-
- switch (e.propertyName) {
- case 'width':
- el.style.width = el.attributes.width.nodeValue + 'px';
- el.getContext().clearRect();
- break;
- case 'height':
- el.style.height = el.attributes.height.nodeValue + 'px';
- el.getContext().clearRect();
- break;
- }
- }
-
- function onResize(e) {
- var el = e.srcElement;
- if (el.firstChild) {
- el.firstChild.style.width = el.clientWidth + 'px';
- el.firstChild.style.height = el.clientHeight + 'px';
- }
- }
-
- G_vmlCanvasManager_.init();
-
- // precompute "00" to "FF"
- var dec2hex = [];
- for (var i = 0; i < 16; i++) {
- for (var j = 0; j < 16; j++) {
- dec2hex[i * 16 + j] = i.toString(16) + j.toString(16);
- }
- }
-
- function createMatrixIdentity() {
- return [
- [1, 0, 0],
- [0, 1, 0],
- [0, 0, 1]
- ];
- }
-
- function matrixMultiply(m1, m2) {
- var result = createMatrixIdentity();
-
- for (var x = 0; x < 3; x++) {
- for (var y = 0; y < 3; y++) {
- var sum = 0;
-
- for (var z = 0; z < 3; z++) {
- sum += m1[x][z] * m2[z][y];
- }
-
- result[x][y] = sum;
- }
- }
- return result;
- }
-
- function copyState(o1, o2) {
- o2.fillStyle = o1.fillStyle;
- o2.lineCap = o1.lineCap;
- o2.lineJoin = o1.lineJoin;
- o2.lineWidth = o1.lineWidth;
- o2.miterLimit = o1.miterLimit;
- o2.shadowBlur = o1.shadowBlur;
- o2.shadowColor = o1.shadowColor;
- o2.shadowOffsetX = o1.shadowOffsetX;
- o2.shadowOffsetY = o1.shadowOffsetY;
- o2.strokeStyle = o1.strokeStyle;
- o2.globalAlpha = o1.globalAlpha;
- o2.arcScaleX_ = o1.arcScaleX_;
- o2.arcScaleY_ = o1.arcScaleY_;
- o2.lineScale_ = o1.lineScale_;
- }
-
- function processStyle(styleString) {
- var str, alpha = 1;
-
- styleString = String(styleString);
- if (styleString.substring(0, 3) == 'rgb') {
- var start = styleString.indexOf('(', 3);
- var end = styleString.indexOf(')', start + 1);
- var guts = styleString.substring(start + 1, end).split(',');
-
- str = '#';
- for (var i = 0; i < 3; i++) {
- str += dec2hex[Number(guts[i])];
- }
-
- if (guts.length == 4 && styleString.substr(3, 1) == 'a') {
- alpha = guts[3];
- }
- } else {
- str = styleString;
- }
-
- return {color: str, alpha: alpha};
- }
-
- function processLineCap(lineCap) {
- switch (lineCap) {
- case 'butt':
- return 'flat';
- case 'round':
- return 'round';
- case 'square':
- default:
- return 'square';
- }
- }
-
- /**
- * This class implements CanvasRenderingContext2D interface as described by
- * the WHATWG.
- * @param {HTMLElement} surfaceElement The element that the 2D context should
- * be associated with
- */
- function CanvasRenderingContext2D_(surfaceElement) {
- this.m_ = createMatrixIdentity();
-
- this.mStack_ = [];
- this.aStack_ = [];
- this.currentPath_ = [];
-
- // Canvas context properties
- this.strokeStyle = '#000';
- this.fillStyle = '#000';
-
- this.lineWidth = 1;
- this.lineJoin = 'miter';
- this.lineCap = 'butt';
- this.miterLimit = Z * 1;
- this.globalAlpha = 1;
- this.canvas = surfaceElement;
-
- var el = surfaceElement.ownerDocument.createElement('div');
- el.style.width = surfaceElement.clientWidth + 'px';
- el.style.height = surfaceElement.clientHeight + 'px';
- el.style.overflow = 'hidden';
- el.style.position = 'absolute';
- surfaceElement.appendChild(el);
-
- this.element_ = el;
- this.arcScaleX_ = 1;
- this.arcScaleY_ = 1;
- this.lineScale_ = 1;
- }
-
- var contextPrototype = CanvasRenderingContext2D_.prototype;
- contextPrototype.clearRect = function() {
- this.element_.innerHTML = '';
- };
-
- contextPrototype.beginPath = function() {
- // TODO: Branch current matrix so that save/restore has no effect
- // as per safari docs.
- this.currentPath_ = [];
- };
-
- contextPrototype.moveTo = function(aX, aY) {
- var p = this.getCoords_(aX, aY);
- this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y});
- this.currentX_ = p.x;
- this.currentY_ = p.y;
- };
-
- contextPrototype.lineTo = function(aX, aY) {
- var p = this.getCoords_(aX, aY);
- this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y});
-
- this.currentX_ = p.x;
- this.currentY_ = p.y;
- };
-
- contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
- aCP2x, aCP2y,
- aX, aY) {
- var p = this.getCoords_(aX, aY);
- var cp1 = this.getCoords_(aCP1x, aCP1y);
- var cp2 = this.getCoords_(aCP2x, aCP2y);
- bezierCurveTo(this, cp1, cp2, p);
- };
-
- // Helper function that takes the already fixed cordinates.
- function bezierCurveTo(self, cp1, cp2, p) {
- self.currentPath_.push({
- type: 'bezierCurveTo',
- cp1x: cp1.x,
- cp1y: cp1.y,
- cp2x: cp2.x,
- cp2y: cp2.y,
- x: p.x,
- y: p.y
- });
- self.currentX_ = p.x;
- self.currentY_ = p.y;
- }
-
- contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
- // the following is lifted almost directly from
- // http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
-
- var cp = this.getCoords_(aCPx, aCPy);
- var p = this.getCoords_(aX, aY);
-
- var cp1 = {
- x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_),
- y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_)
- };
- var cp2 = {
- x: cp1.x + (p.x - this.currentX_) / 3.0,
- y: cp1.y + (p.y - this.currentY_) / 3.0
- };
-
- bezierCurveTo(this, cp1, cp2, p);
- };
-
- contextPrototype.arc = function(aX, aY, aRadius,
- aStartAngle, aEndAngle, aClockwise) {
- aRadius *= Z;
- var arcType = aClockwise ? 'at' : 'wa';
-
- var xStart = aX + mc(aStartAngle) * aRadius - Z2;
- var yStart = aY + ms(aStartAngle) * aRadius - Z2;
-
- var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
- var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
-
- // IE won't render arches drawn counter clockwise if xStart == xEnd.
- if (xStart == xEnd && !aClockwise) {
- xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
- // that can be represented in binary
- }
-
- var p = this.getCoords_(aX, aY);
- var pStart = this.getCoords_(xStart, yStart);
- var pEnd = this.getCoords_(xEnd, yEnd);
-
- this.currentPath_.push({type: arcType,
- x: p.x,
- y: p.y,
- radius: aRadius,
- xStart: pStart.x,
- yStart: pStart.y,
- xEnd: pEnd.x,
- yEnd: pEnd.y});
-
- };
-
- contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- };
-
- contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
- var oldPath = this.currentPath_;
- this.beginPath();
-
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- this.stroke();
-
- this.currentPath_ = oldPath;
- };
-
- contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
- var oldPath = this.currentPath_;
- this.beginPath();
-
- this.moveTo(aX, aY);
- this.lineTo(aX + aWidth, aY);
- this.lineTo(aX + aWidth, aY + aHeight);
- this.lineTo(aX, aY + aHeight);
- this.closePath();
- this.fill();
-
- this.currentPath_ = oldPath;
- };
-
- contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
- var gradient = new CanvasGradient_('gradient');
- gradient.x0_ = aX0;
- gradient.y0_ = aY0;
- gradient.x1_ = aX1;
- gradient.y1_ = aY1;
- return gradient;
- };
-
- contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
- aX1, aY1, aR1) {
- var gradient = new CanvasGradient_('gradientradial');
- gradient.x0_ = aX0;
- gradient.y0_ = aY0;
- gradient.r0_ = aR0;
- gradient.x1_ = aX1;
- gradient.y1_ = aY1;
- gradient.r1_ = aR1;
- return gradient;
- };
-
- contextPrototype.drawImage = function(image, var_args) {
- var dx, dy, dw, dh, sx, sy, sw, sh;
-
- // to find the original width we overide the width and height
- var oldRuntimeWidth = image.runtimeStyle.width;
- var oldRuntimeHeight = image.runtimeStyle.height;
- image.runtimeStyle.width = 'auto';
- image.runtimeStyle.height = 'auto';
-
- // get the original size
- var w = image.width;
- var h = image.height;
-
- // and remove overides
- image.runtimeStyle.width = oldRuntimeWidth;
- image.runtimeStyle.height = oldRuntimeHeight;
-
- if (arguments.length == 3) {
- dx = arguments[1];
- dy = arguments[2];
- sx = sy = 0;
- sw = dw = w;
- sh = dh = h;
- } else if (arguments.length == 5) {
- dx = arguments[1];
- dy = arguments[2];
- dw = arguments[3];
- dh = arguments[4];
- sx = sy = 0;
- sw = w;
- sh = h;
- } else if (arguments.length == 9) {
- sx = arguments[1];
- sy = arguments[2];
- sw = arguments[3];
- sh = arguments[4];
- dx = arguments[5];
- dy = arguments[6];
- dw = arguments[7];
- dh = arguments[8];
- } else {
- throw Error('Invalid number of arguments');
- }
-
- var d = this.getCoords_(dx, dy);
-
- var w2 = sw / 2;
- var h2 = sh / 2;
-
- var vmlStr = [];
-
- var W = 10;
- var H = 10;
-
- // For some reason that I've now forgotten, using divs didn't work
- vmlStr.push(' <g_vml_:group',
- ' coordsize="', Z * W, ',', Z * H, '"',
- ' coordorigin="0,0"' ,
- ' style="width:', W, 'px;height:', H, 'px;position:absolute;');
-
- // If filters are necessary (rotation exists), create them
- // filters are bog-slow, so only create them if abbsolutely necessary
- // The following check doesn't account for skews (which don't exist
- // in the canvas spec (yet) anyway.
-
- if (this.m_[0][0] != 1 || this.m_[0][1]) {
- var filter = [];
-
- // Note the 12/21 reversal
- filter.push('M11=', this.m_[0][0], ',',
- 'M12=', this.m_[1][0], ',',
- 'M21=', this.m_[0][1], ',',
- 'M22=', this.m_[1][1], ',',
- 'Dx=', mr(d.x / Z), ',',
- 'Dy=', mr(d.y / Z), '');
-
- // Bounding box calculation (need to minimize displayed area so that
- // filters don't waste time on unused pixels.
- var max = d;
- var c2 = this.getCoords_(dx + dw, dy);
- var c3 = this.getCoords_(dx, dy + dh);
- var c4 = this.getCoords_(dx + dw, dy + dh);
-
- max.x = m.max(max.x, c2.x, c3.x, c4.x);
- max.y = m.max(max.y, c2.y, c3.y, c4.y);
-
- vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z),
- 'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(',
- filter.join(''), ", sizingmethod='clip');")
- } else {
- vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;');
- }
-
- vmlStr.push(' ">' ,
- '<g_vml_:image src="', image.src, '"',
- ' style="width:', Z * dw, 'px;',
- ' height:', Z * dh, 'px;"',
- ' cropleft="', sx / w, '"',
- ' croptop="', sy / h, '"',
- ' cropright="', (w - sx - sw) / w, '"',
- ' cropbottom="', (h - sy - sh) / h, '"',
- ' />',
- '</g_vml_:group>');
-
- this.element_.insertAdjacentHTML('BeforeEnd',
- vmlStr.join(''));
- };
-
- contextPrototype.stroke = function(aFill) {
- var lineStr = [];
- var lineOpen = false;
- var a = processStyle(aFill ? this.fillStyle : this.strokeStyle);
- var color = a.color;
- var opacity = a.alpha * this.globalAlpha;
-
- var W = 10;
- var H = 10;
-
- lineStr.push('<g_vml_:shape',
- ' filled="', !!aFill, '"',
- ' style="position:absolute;width:', W, 'px;height:', H, 'px;"',
- ' coordorigin="0 0" coordsize="', Z * W, ' ', Z * H, '"',
- ' stroked="', !aFill, '"',
- ' path="');
-
- var newSeq = false;
- var min = {x: null, y: null};
- var max = {x: null, y: null};
-
- for (var i = 0; i < this.currentPath_.length; i++) {
- var p = this.currentPath_[i];
- var c;
-
- switch (p.type) {
- case 'moveTo':
- c = p;
- lineStr.push(' m ', mr(p.x), ',', mr(p.y));
- break;
- case 'lineTo':
- lineStr.push(' l ', mr(p.x), ',', mr(p.y));
- break;
- case 'close':
- lineStr.push(' x ');
- p = null;
- break;
- case 'bezierCurveTo':
- lineStr.push(' c ',
- mr(p.cp1x), ',', mr(p.cp1y), ',',
- mr(p.cp2x), ',', mr(p.cp2y), ',',
- mr(p.x), ',', mr(p.y));
- break;
- case 'at':
- case 'wa':
- lineStr.push(' ', p.type, ' ',
- mr(p.x - this.arcScaleX_ * p.radius), ',',
- mr(p.y - this.arcScaleY_ * p.radius), ' ',
- mr(p.x + this.arcScaleX_ * p.radius), ',',
- mr(p.y + this.arcScaleY_ * p.radius), ' ',
- mr(p.xStart), ',', mr(p.yStart), ' ',
- mr(p.xEnd), ',', mr(p.yEnd));
- break;
- }
-
-
- // TODO: Following is broken for curves due to
- // move to proper paths.
-
- // Figure out dimensions so we can do gradient fills
- // properly
- if (p) {
- if (min.x == null || p.x < min.x) {
- min.x = p.x;
- }
- if (max.x == null || p.x > max.x) {
- max.x = p.x;
- }
- if (min.y == null || p.y < min.y) {
- min.y = p.y;
- }
- if (max.y == null || p.y > max.y) {
- max.y = p.y;
- }
- }
- }
- lineStr.push(' ">');
-
- if (!aFill) {
- var lineWidth = this.lineScale_ * this.lineWidth;
-
- // VML cannot correctly render a line if the width is less than 1px.
- // In that case, we dilute the color to make the line look thinner.
- if (lineWidth < 1) {
- opacity *= lineWidth;
- }
-
- lineStr.push(
- '<g_vml_:stroke',
- ' opacity="', opacity, '"',
- ' joinstyle="', this.lineJoin, '"',
- ' miterlimit="', this.miterLimit, '"',
- ' endcap="', processLineCap(this.lineCap), '"',
- ' weight="', lineWidth, 'px"',
- ' color="', color, '" />'
- );
- } else if (typeof this.fillStyle == 'object') {
- var fillStyle = this.fillStyle;
- var angle = 0;
- var focus = {x: 0, y: 0};
-
- // additional offset
- var shift = 0;
- // scale factor for offset
- var expansion = 1;
-
- if (fillStyle.type_ == 'gradient') {
- var x0 = fillStyle.x0_ / this.arcScaleX_;
- var y0 = fillStyle.y0_ / this.arcScaleY_;
- var x1 = fillStyle.x1_ / this.arcScaleX_;
- var y1 = fillStyle.y1_ / this.arcScaleY_;
- var p0 = this.getCoords_(x0, y0);
- var p1 = this.getCoords_(x1, y1);
- var dx = p1.x - p0.x;
- var dy = p1.y - p0.y;
- angle = Math.atan2(dx, dy) * 180 / Math.PI;
-
- // The angle should be a non-negative number.
- if (angle < 0) {
- angle += 360;
- }
-
- // Very small angles produce an unexpected result because they are
- // converted to a scientific notation string.
- if (angle < 1e-6) {
- angle = 0;
- }
- } else {
- var p0 = this.getCoords_(fillStyle.x0_, fillStyle.y0_);
- var width = max.x - min.x;
- var height = max.y - min.y;
- focus = {
- x: (p0.x - min.x) / width,
- y: (p0.y - min.y) / height
- };
-
- width /= this.arcScaleX_ * Z;
- height /= this.arcScaleY_ * Z;
- var dimension = m.max(width, height);
- shift = 2 * fillStyle.r0_ / dimension;
- expansion = 2 * fillStyle.r1_ / dimension - shift;
- }
-
- // We need to sort the color stops in ascending order by offset,
- // otherwise IE won't interpret it correctly.
- var stops = fillStyle.colors_;
- stops.sort(function(cs1, cs2) {
- return cs1.offset - cs2.offset;
- });
-
- var length = stops.length;
- var color1 = stops[0].color;
- var color2 = stops[length - 1].color;
- var opacity1 = stops[0].alpha * this.globalAlpha;
- var opacity2 = stops[length - 1].alpha * this.globalAlpha;
-
- var colors = [];
- for (var i = 0; i < length; i++) {
- var stop = stops[i];
- colors.push(stop.offset * expansion + shift + ' ' + stop.color);
- }
-
- // When colors attribute is used, the meanings of opacity and o:opacity2
- // are reversed.
- lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"',
- ' method="none" focus="100%"',
- ' color="', color1, '"',
- ' color2="', color2, '"',
- ' colors="', colors.join(','), '"',
- ' opacity="', opacity2, '"',
- ' g_o_:opacity2="', opacity1, '"',
- ' angle="', angle, '"',
- ' focusposition="', focus.x, ',', focus.y, '" />');
- } else {
- lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity,
- '" />');
- }
-
- lineStr.push('</g_vml_:shape>');
-
- this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
- };
-
- contextPrototype.fill = function() {
- this.stroke(true);
- }
-
- contextPrototype.closePath = function() {
- this.currentPath_.push({type: 'close'});
- };
-
- /**
- * @private
- */
- contextPrototype.getCoords_ = function(aX, aY) {
- var m = this.m_;
- return {
- x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2,
- y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
- }
- };
-
- contextPrototype.save = function() {
- var o = {};
- copyState(this, o);
- this.aStack_.push(o);
- this.mStack_.push(this.m_);
- this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
- };
-
- contextPrototype.restore = function() {
- copyState(this.aStack_.pop(), this);
- this.m_ = this.mStack_.pop();
- };
-
- function matrixIsFinite(m) {
- for (var j = 0; j < 3; j++) {
- for (var k = 0; k < 2; k++) {
- if (!isFinite(m[j][k]) || isNaN(m[j][k])) {
- return false;
- }
- }
- }
- return true;
- }
-
- function setM(ctx, m, updateLineScale) {
- if (!matrixIsFinite(m)) {
- return;
- }
- ctx.m_ = m;
-
- if (updateLineScale) {
- // Get the line scale.
- // Determinant of this.m_ means how much the area is enlarged by the
- // transformation. So its square root can be used as a scale factor
- // for width.
- var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
- ctx.lineScale_ = sqrt(abs(det));
- }
- }
-
- contextPrototype.translate = function(aX, aY) {
- var m1 = [
- [1, 0, 0],
- [0, 1, 0],
- [aX, aY, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), false);
- };
-
- contextPrototype.rotate = function(aRot) {
- var c = mc(aRot);
- var s = ms(aRot);
-
- var m1 = [
- [c, s, 0],
- [-s, c, 0],
- [0, 0, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), false);
- };
-
- contextPrototype.scale = function(aX, aY) {
- this.arcScaleX_ *= aX;
- this.arcScaleY_ *= aY;
- var m1 = [
- [aX, 0, 0],
- [0, aY, 0],
- [0, 0, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), true);
- };
-
- contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) {
- var m1 = [
- [m11, m12, 0],
- [m21, m22, 0],
- [dx, dy, 1]
- ];
-
- setM(this, matrixMultiply(m1, this.m_), true);
- };
-
- contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
- var m = [
- [m11, m12, 0],
- [m21, m22, 0],
- [dx, dy, 1]
- ];
-
- setM(this, m, true);
- };
-
- /******** STUBS ********/
- contextPrototype.clip = function() {
- // TODO: Implement
- };
-
- contextPrototype.arcTo = function() {
- // TODO: Implement
- };
-
- contextPrototype.createPattern = function() {
- return new CanvasPattern_;
- };
-
- // Gradient / Pattern Stubs
- function CanvasGradient_(aType) {
- this.type_ = aType;
- this.x0_ = 0;
- this.y0_ = 0;
- this.r0_ = 0;
- this.x1_ = 0;
- this.y1_ = 0;
- this.r1_ = 0;
- this.colors_ = [];
- }
-
- CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
- aColor = processStyle(aColor);
- this.colors_.push({offset: aOffset,
- color: aColor.color,
- alpha: aColor.alpha});
- };
-
- function CanvasPattern_() {}
-
- // set up externs
- G_vmlCanvasManager = G_vmlCanvasManager_;
- CanvasRenderingContext2D = CanvasRenderingContext2D_;
- CanvasGradient = CanvasGradient_;
- CanvasPattern = CanvasPattern_;
-
-})();
-
-} // if
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.js
deleted file mode 100644
index 23847845..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.js
+++ /dev/null
@@ -1,333 +0,0 @@
- function moveV3(event, g, context) {
- if (context.isPanning) {
- Dygraph.movePan(event, g, context);
- } else if (context.isZooming) {
- Dygraph.moveZoom(event, g, context);
- }
- }
-
- function upV3(event, g, context) {
- if (context.isPanning) {
- Dygraph.endPan(event, g, context);
- } else if (context.isZooming) {
- Dygraph.endZoom(event, g, context);
- }
- }
-
-// Take the offset of a mouse event on the dygraph canvas and
-// convert it to a pair of percentages from the bottom left.
-// (Not top left, bottom is where the lower value is.)
-function offsetToPercentage(g, offsetX, offsetY) {
- // This is calculating the pixel offset of the leftmost date.
- var xOffset = g.toDomCoords(g.xAxisRange()[0], null)[0];
- var yar0 = g.yAxisRange(0);
-
- // This is calculating the pixel of the higest value. (Top pixel)
- var yOffset = g.toDomCoords(null, yar0[1])[1];
-
- // x y w and h are relative to the corner of the drawing area,
- // so that the upper corner of the drawing area is (0, 0).
- var x = offsetX - xOffset;
- var y = offsetY - yOffset;
-
- // This is computing the rightmost pixel, effectively defining the
- // width.
- var w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset;
-
- // This is computing the lowest pixel, effectively defining the height.
- var h = g.toDomCoords(null, yar0[0])[1] - yOffset;
-
- // Percentage from the left.
- var xPct = w == 0 ? 0 : (x / w);
- // Percentage from the top.
- var yPct = h == 0 ? 0 : (y / h);
-
- // The (1-) part below changes it from "% distance down from the top"
- // to "% distance up from the bottom".
- return [xPct, (1-yPct)];
-}
-
-function dblClickV3(event, g, context) {
- // Reducing by 20% makes it 80% the original size, which means
- // to restore to original size it must grow by 25%
- /*
- if (!(event.offsetX && event.offsetY)){
- event.offsetX = event.layerX - event.target.offsetLeft;
- event.offsetY = event.layerY - event.target.offsetTop;
- }
-
- var percentages = offsetToPercentage(g, event.offsetX, event.offsetY);
- var xPct = percentages[0];
- var yPct = percentages[1];
-
- if (event.ctrlKey) {
- zoom(g, -.25, xPct, yPct);
- } else {
- zoom(g, +.2, xPct, yPct);
- }
- */
- restorePositioning(g);
-}
-
-var lastClickedGraph = null;
-
-function clickV3(event, g, context) {
- lastClickedGraph = g;
- Dygraph.cancelEvent(event);
-}
-
-function scrollV3(event, g, context) {
- if (lastClickedGraph != g) {
- return;
- }
- var normal = event.detail ? event.detail * -1 : event.wheelDelta / 40;
- // For me the normalized value shows 0.075 for one click. If I took
- // that verbatim, it would be a 7.5%.
- var percentage = normal / 50;
-
- if (!(event.offsetX && event.offsetY)){
- event.offsetX = event.layerX - event.target.offsetLeft;
- event.offsetY = event.layerY - event.target.offsetTop;
- }
-
- var percentages = offsetToPercentage(g, event.offsetX, event.offsetY);
- var xPct = percentages[0];
- var yPct = percentages[1];
-
- zoom(g, percentage, xPct, yPct);
- Dygraph.cancelEvent(event);
-}
-
-// Adjusts [x, y] toward each other by zoomInPercentage%
-// Split it so the left/bottom axis gets xBias/yBias of that change and
-// tight/top gets (1-xBias)/(1-yBias) of that change.
-//
-// If a bias is missing it splits it down the middle.
-function zoom(g, zoomInPercentage, xBias, yBias) {
- xBias = xBias || 0.5;
- yBias = yBias || 0.5;
- function adjustAxis(axis, zoomInPercentage, bias) {
- var delta = axis[1] - axis[0];
- var increment = delta * zoomInPercentage;
- var foo = [increment * bias, increment * (1-bias)];
- return [ axis[0] + foo[0], axis[1] - foo[1] ];
- }
- var yAxes = g.yAxisRanges();
- var newYAxes = [];
- for (var i = 0; i < yAxes.length; i++) {
- newYAxes[i] = adjustAxis(yAxes[i], zoomInPercentage, yBias);
- }
-
- g.updateOptions({
- dateWindow: adjustAxis(g.xAxisRange(), zoomInPercentage, xBias),
- valueRange: newYAxes[0]
- });
-}
-
-function restorePositioning(g) {
- g.updateOptions({
- dateWindow: null,
- valueRange: null
- });
-}
-
-function zoom_custom(res) {
- var w = g.xAxisRange();
- desired_range = [w[0] - res * 1000, w[0] ];
- animate();
-}
-
-function reset() {
- desired_range = orig_range;
- animate();
-}
-
-var click = 0;
-var desired_range = null;
-function approach_range() {
- if (!desired_range) return;
- // go halfway there
- var range = g.xAxisRange();
- if (Math.abs(desired_range[0] - range[0]) < 60 &&
- Math.abs(desired_range[1] - range[1]) < 60) {
- if(desired_range[0]>=orig_range[0])
- g.updateOptions({dateWindow: desired_range});
- else {
- g.updateOptions({dateWindow: orig_range});
- click = 8;
- }
- // (do not set another timeout.)
- } else {
- var new_range;
- new_range = [0.5 * (desired_range[0] + range[0]),
- 0.5 * (desired_range[1] + range[1])];
- g.updateOptions({dateWindow: new_range});
- animate();
- }
-}
-
-function animate() {
- setTimeout(approach_range, 50);
-}
-
-
-var v4Active = false;
-var v4Canvas = null;
-
-function downV4(event, g, context) {
- context.initializeMouseDown(event, g, context);
-
- Dygraph.Interaction.startTouch(event, g, context);
-
- Dygraph.Interaction.moveTouch(event, g, context);
-
- Dygraph.Interaction.endTouch(event, g, context);
-
- v4Active = true;
- moveV4(event, g, context); // in case the mouse went down on a data point.
-}
-
-var processed = [];
-
-function moveV4(event, g, context) {
- var RANGE = 7;
-
- if (v4Active) {
- var graphPos = Dygraph.findPos(g.graphDiv);
- var canvasx = Dygraph.pageX(event) - graphPos.x;
- var canvasy = Dygraph.pageY(event) - graphPos.y;
-
- var rows = g.numRows();
- // Row layout:
- // [date, [val1, stdev1], [val2, stdev2]]
- for (var row = 0; row < rows; row++) {
- var date = g.getValue(row, 0);
- var x = g.toDomCoords(date, null)[0];
- var diff = Math.abs(canvasx - x);
- if (diff < RANGE) {
- for (var col = 1; col < 3; col++) {
- // TODO(konigsberg): these will throw exceptions as data is removed.
- var vals = g.getValue(row, col);
- if (vals == null) { continue; }
- var val = vals[0];
- var y = g.toDomCoords(null, val)[1];
- var diff2 = Math.abs(canvasy - y);
- if (diff2 < RANGE) {
- var found = false;
- for (var i in processed) {
- var stored = processed[i];
- if(stored[0] == row && stored[1] == col) {
- found = true;
- break;
- }
- }
- if (!found) {
- //processed.push([row, col]);
- //drawV4(x, y);
- }
- return;
- }
- }
- }
- }
- }
-}
-
-function upV4(event, g, context) {
- if (v4Active) {
- v4Active = false;
- }
-}
-
-function dblClickV4(event, g, context) {
- restorePositioning(g);
-}
-
-function drawV4(x, y) {
- var ctx = v4Canvas;
-
- ctx.strokeStyle = "#000000";
- //ctx.fillStyle = "#FFFF00";
- ctx.fillStyle = "#FF0000";
- ctx.beginPath();
- ctx.arc(x,y,5,0,Math.PI*2,true);
- ctx.closePath();
- ctx.stroke();
- ctx.fill();
-}
-
-function captureCanvas(canvas, area, g) {
- v4Canvas = canvas;
-}
-
-function newDygraphTouchstart(event, g, context) {
-// This right here is what prevents IOS from doing its own zoom/touch behavior
-// It stops the node from being selected too
-event.preventDefault(); // touch browsers are all nice.
-
-if (event.touches.length > 1) {
-// If the user ever puts two fingers down, it's not a double tap.
-context.startTimeForDoubleTapMs = null;
-}
-
-var touches = [];
-for (var i = 0; i < event.touches.length; i++) {
-var t = event.touches[i];
-// we dispense with 'dragGetX_' because all touchBrowsers support pageX
-touches.push({
-pageX: t.pageX,
-pageY: t.pageY,
-dataX: g.toDataXCoord(t.pageX),
-dataY: g.toDataYCoord(t.pageY)
-// identifier: t.identifier
-});
-}
-context.initialTouches = touches;
-
-if (touches.length == 1) {
-// This is just a swipe.
-context.initialPinchCenter = touches[0];
-context.touchDirections = { x: true, y: true };
-
-// ADDITION - this needs to select the points
-//var closestTouchP = g.findClosestPoint(touches[0].pageX,touches[0].pageY);
-//if(closestTouchP) {
-//var selectionChanged = g.setSelection(closestTouchP.row, closestTouchP.seriesName);
-//}
-g.mouseMove_(event);
-
-} else if (touches.length >= 2) {
-// It's become a pinch!
-// In case there are 3+ touches, we ignore all but the "first" two.
-
-// only screen coordinates can be averaged (data coords could be log scale).
-context.initialPinchCenter = {
-pageX: 0.5 * (touches[0].pageX + touches[1].pageX),
-pageY: 0.5 * (touches[0].pageY + touches[1].pageY),
-
-// TODO(danvk): remove
-dataX: 0.5 * (touches[0].dataX + touches[1].dataX),
-dataY: 0.5 * (touches[0].dataY + touches[1].dataY)
-};
-
-// Make pinches in a 45-degree swath around either axis 1-dimensional zooms.
-var initialAngle = 180 / Math.PI * Math.atan2(
-context.initialPinchCenter.pageY - touches[0].pageY,
-touches[0].pageX - context.initialPinchCenter.pageX);
-
-// use symmetry to get it into the first quadrant.
-initialAngle = Math.abs(initialAngle);
-if (initialAngle > 90) initialAngle = 90 - initialAngle;
-
-context.touchDirections = {
-x: (initialAngle < (90 - 45/2)),
-y: (initialAngle > 45/2)
-};
-}
-
-// save the full x & y ranges.
-context.initialRange = {
-x: g.xAxisRange(),
-y: g.yAxisRange()
-};
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.min.js
deleted file mode 100644
index e3f736a8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function moveV3(e,t,n){if(n.isPanning){Dygraph.movePan(e,t,n)}else if(n.isZooming){Dygraph.moveZoom(e,t,n)}}function upV3(e,t,n){if(n.isPanning){Dygraph.endPan(e,t,n)}else if(n.isZooming){Dygraph.endZoom(e,t,n)}}function offsetToPercentage(e,t,n){var r=e.toDomCoords(e.xAxisRange()[0],null)[0];var i=e.yAxisRange(0);var s=e.toDomCoords(null,i[1])[1];var o=t-r;var u=n-s;var a=e.toDomCoords(e.xAxisRange()[1],null)[0]-r;var f=e.toDomCoords(null,i[0])[1]-s;var l=a==0?0:o/a;var c=f==0?0:u/f;return[l,1-c]}function dblClickV3(e,t,n){restorePositioning(t)}function clickV3(e,t,n){lastClickedGraph=t;Dygraph.cancelEvent(e)}function scrollV3(e,t,n){if(lastClickedGraph!=t){return}var r=e.detail?e.detail*-1:e.wheelDelta/40;var i=r/50;if(!(e.offsetX&&e.offsetY)){e.offsetX=e.layerX-e.target.offsetLeft;e.offsetY=e.layerY-e.target.offsetTop}var s=offsetToPercentage(t,e.offsetX,e.offsetY);var o=s[0];var u=s[1];zoom(t,i,o,u);Dygraph.cancelEvent(e)}function zoom(e,t,n,r){function i(e,t,n){var r=e[1]-e[0];var i=r*t;var s=[i*n,i*(1-n)];return[e[0]+s[0],e[1]-s[1]]}n=n||.5;r=r||.5;var s=e.yAxisRanges();var o=[];for(var u=0;u<s.length;u++){o[u]=i(s[u],t,r)}e.updateOptions({dateWindow:i(e.xAxisRange(),t,n),valueRange:o[0]})}function restorePositioning(e){e.updateOptions({dateWindow:null,valueRange:null})}function zoom_custom(e){var t=g.xAxisRange();desired_range=[t[0]-e*1e3,t[0]];animate()}function reset(){desired_range=orig_range;animate()}function approach_range(){if(!desired_range)return;var e=g.xAxisRange();if(Math.abs(desired_range[0]-e[0])<60&&Math.abs(desired_range[1]-e[1])<60){if(desired_range[0]>=orig_range[0])g.updateOptions({dateWindow:desired_range});else{g.updateOptions({dateWindow:orig_range});click=8}}else{var t;t=[.5*(desired_range[0]+e[0]),.5*(desired_range[1]+e[1])];g.updateOptions({dateWindow:t});animate()}}function animate(){setTimeout(approach_range,50)}function downV4(e,t,n){n.initializeMouseDown(e,t,n);Dygraph.Interaction.startTouch(e,t,n);Dygraph.Interaction.moveTouch(e,t,n);Dygraph.Interaction.endTouch(e,t,n);v4Active=true;moveV4(e,t,n)}function moveV4(e,t,n){var r=7;if(v4Active){var i=Dygraph.findPos(t.graphDiv);var s=Dygraph.pageX(e)-i.x;var o=Dygraph.pageY(e)-i.y;var u=t.numRows();for(var a=0;a<u;a++){var f=t.getValue(a,0);var l=t.toDomCoords(f,null)[0];var c=Math.abs(s-l);if(c<r){for(var h=1;h<3;h++){var p=t.getValue(a,h);if(p==null){continue}var d=p[0];var v=t.toDomCoords(null,d)[1];var m=Math.abs(o-v);if(m<r){var g=false;for(var y in processed){var b=processed[y];if(b[0]==a&&b[1]==h){g=true;break}}if(!g){}return}}}}}}function upV4(e,t,n){if(v4Active){v4Active=false}}function dblClickV4(e,t,n){restorePositioning(t)}function drawV4(e,t){var n=v4Canvas;n.strokeStyle="#000000";n.fillStyle="#FF0000";n.beginPath();n.arc(e,t,5,0,Math.PI*2,true);n.closePath();n.stroke();n.fill()}function captureCanvas(e,t,n){v4Canvas=e}function newDygraphTouchstart(e,t,n){e.preventDefault();if(e.touches.length>1){n.startTimeForDoubleTapMs=null}var r=[];for(var i=0;i<e.touches.length;i++){var s=e.touches[i];r.push({pageX:s.pageX,pageY:s.pageY,dataX:t.toDataXCoord(s.pageX),dataY:t.toDataYCoord(s.pageY)})}n.initialTouches=r;if(r.length==1){n.initialPinchCenter=r[0];n.touchDirections={x:true,y:true};t.mouseMove_(e)}else if(r.length>=2){n.initialPinchCenter={pageX:.5*(r[0].pageX+r[1].pageX),pageY:.5*(r[0].pageY+r[1].pageY),dataX:.5*(r[0].dataX+r[1].dataX),dataY:.5*(r[0].dataY+r[1].dataY)};var o=180/Math.PI*Math.atan2(n.initialPinchCenter.pageY-r[0].pageY,r[0].pageX-n.initialPinchCenter.pageX);o=Math.abs(o);if(o>90)o=90-o;n.touchDirections={x:o<90-45/2,y:o>45/2}}n.initialRange={x:t.xAxisRange(),y:t.yAxisRange()}}var lastClickedGraph=null;var click=0;var desired_range=null;var v4Active=false;var v4Canvas=null;var processed=[]; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction_sun.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction_sun.js
deleted file mode 100644
index 92a0dbd7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/interaction_sun.js
+++ /dev/null
@@ -1,303 +0,0 @@
-// Code for a variety of interaction models. Used in interaction.html, but split out from
-// that file so they can be tested in isolation.
-//
-function downV3(event, g, context) {
- context.initializeMouseDown(event, g, context);
- if (event.altKey || event.shiftKey) {
- Dygraph.startZoom(event, g, context);
- } else {
- Dygraph.startPan(event, g, context);
- }
-}
-
-function moveV3(event, g, context) {
- if (context.isPanning) {
- Dygraph.movePan(event, g, context);
- } else if (context.isZooming) {
- Dygraph.moveZoom(event, g, context);
- }
-}
-
-function upV3(event, g, context) {
- if (context.isPanning) {
- Dygraph.endPan(event, g, context);
- } else if (context.isZooming) {
- Dygraph.endZoom(event, g, context);
- }
-}
-
-// Take the offset of a mouse event on the dygraph canvas and
-// convert it to a pair of percentages from the bottom left.
-// (Not top left, bottom is where the lower value is.)
-function offsetToPercentage(g, offsetX, offsetY) {
- // This is calculating the pixel offset of the leftmost date.
- var xOffset = g.toDomCoords(g.xAxisRange()[0], null)[0];
- var yar0 = g.yAxisRange(0);
-
- // This is calculating the pixel of the higest value. (Top pixel)
- var yOffset = g.toDomCoords(null, yar0[1])[1];
-
- // x y w and h are relative to the corner of the drawing area,
- // so that the upper corner of the drawing area is (0, 0).
- var x = offsetX - xOffset;
- var y = offsetY - yOffset;
-
- // This is computing the rightmost pixel, effectively defining the
- // width.
- var w = g.toDomCoords(g.xAxisRange()[1], null)[0] - xOffset;
-
- // This is computing the lowest pixel, effectively defining the height.
- var h = g.toDomCoords(null, yar0[0])[1] - yOffset;
-
- // Percentage from the left.
- var xPct = w == 0 ? 0 : (x / w);
- // Percentage from the top.
- var yPct = h == 0 ? 0 : (y / h);
-
- // The (1-) part below changes it from "% distance down from the top"
- // to "% distance up from the bottom".
- return [xPct, (1-yPct)];
-}
-
-function dblClickV3(event, g, context) {
- // Reducing by 20% makes it 80% the original size, which means
- // to restore to original size it must grow by 25%
-
- if (!(event.offsetX && event.offsetY)){
- event.offsetX = event.layerX - event.target.offsetLeft;
- event.offsetY = event.layerY - event.target.offsetTop;
- }
-
- var percentages = offsetToPercentage(g, event.offsetX, event.offsetY);
- var xPct = percentages[0];
- var yPct = percentages[1];
-
- if (event.ctrlKey) {
- zoom(g, -.25, xPct, yPct);
- } else {
- zoom(g, +.2, xPct, yPct);
- }
-}
-
-var lastClickedGraph = null;
-
-function clickV3(event, g, context) {
- lastClickedGraph = g;
- Dygraph.cancelEvent(event);
-}
-
-function scrollV3(event, g, context) {
- if (lastClickedGraph != g) {
- return;
- }
- var normal = event.detail ? event.detail * -1 : event.wheelDelta / 40;
- // For me the normalized value shows 0.075 for one click. If I took
- // that verbatim, it would be a 7.5%.
- var percentage = normal / 50;
-
- if (!(event.offsetX && event.offsetY)){
- event.offsetX = event.layerX - event.target.offsetLeft;
- event.offsetY = event.layerY - event.target.offsetTop;
- }
-
- var percentages = offsetToPercentage(g, event.offsetX, event.offsetY);
- var xPct = percentages[0];
- var yPct = percentages[1];
-
- zoom(g, percentage, xPct, yPct);
- Dygraph.cancelEvent(event);
-}
-
-// Adjusts [x, y] toward each other by zoomInPercentage%
-// Split it so the left/bottom axis gets xBias/yBias of that change and
-// tight/top gets (1-xBias)/(1-yBias) of that change.
-//
-// If a bias is missing it splits it down the middle.
-function zoom(g, zoomInPercentage, xBias, yBias) {
- xBias = xBias || 0.5;
- yBias = yBias || 0.5;
- function adjustAxis(axis, zoomInPercentage, bias) {
- var delta = axis[1] - axis[0];
- var increment = delta * zoomInPercentage;
- var foo = [increment * bias, increment * (1-bias)];
- return [ axis[0] + foo[0], axis[1] - foo[1] ];
- }
- var yAxes = g.yAxisRanges();
- var newYAxes = [];
- for (var i = 0; i < yAxes.length; i++) {
- newYAxes[i] = adjustAxis(yAxes[i], zoomInPercentage, yBias);
- }
-
- g.updateOptions({
- dateWindow: adjustAxis(g.xAxisRange(), zoomInPercentage, xBias),
- valueRange: newYAxes[0]
- });
-}
-
-var v4Active = false;
-var v4Canvas = null;
-
-function downV4(event, g, context) {
- context.initializeMouseDown(event, g, context);
-
- Dygraph.Interaction.startTouch(event, g, context);
-
- Dygraph.Interaction.moveTouch(event, g, context);
-
- Dygraph.Interaction.endTouch(event, g, context);
-
- v4Active = true;
- moveV4(event, g, context); // in case the mouse went down on a data point.
-}
-
-var processed = [];
-
-function moveV4(event, g, context) {
- var RANGE = 7;
-
- if (v4Active) {
- var graphPos = Dygraph.findPos(g.graphDiv);
- var canvasx = Dygraph.pageX(event) - graphPos.x;
- var canvasy = Dygraph.pageY(event) - graphPos.y;
-
- var rows = g.numRows();
- // Row layout:
- // [date, [val1, stdev1], [val2, stdev2]]
- for (var row = 0; row < rows; row++) {
- var date = g.getValue(row, 0);
- var x = g.toDomCoords(date, null)[0];
- var diff = Math.abs(canvasx - x);
- if (diff < RANGE) {
- for (var col = 1; col < 3; col++) {
- // TODO(konigsberg): these will throw exceptions as data is removed.
- var vals = g.getValue(row, col);
- if (vals == null) { continue; }
- var val = vals[0];
- var y = g.toDomCoords(null, val)[1];
- var diff2 = Math.abs(canvasy - y);
- if (diff2 < RANGE) {
- var found = false;
- for (var i in processed) {
- var stored = processed[i];
- if(stored[0] == row && stored[1] == col) {
- found = true;
- break;
- }
- }
- if (!found) {
- //processed.push([row, col]);
- //drawV4(x, y);
- }
- return;
- }
- }
- }
- }
- }
-}
-
-function upV4(event, g, context) {
- if (v4Active) {
- v4Active = false;
- }
-}
-
-function dblClickV4(event, g, context) {
- restorePositioning(g);
-}
-
-function drawV4(x, y) {
- var ctx = v4Canvas;
-
- ctx.strokeStyle = "#000000";
- //ctx.fillStyle = "#FFFF00";
- ctx.fillStyle = "#FF0000";
- ctx.beginPath();
- ctx.arc(x,y,5,0,Math.PI*2,true);
- ctx.closePath();
- ctx.stroke();
- ctx.fill();
-}
-
-function captureCanvas(canvas, area, g) {
- v4Canvas = canvas;
-}
-
-function restorePositioning(g) {
- g.updateOptions({
- dateWindow: null,
- valueRange: null
- });
-}
-
-function newDygraphTouchstart(event, g, context) {
-// This right here is what prevents IOS from doing its own zoom/touch behavior
-// It stops the node from being selected too
-event.preventDefault(); // touch browsers are all nice.
-
-if (event.touches.length > 1) {
-// If the user ever puts two fingers down, it's not a double tap.
-context.startTimeForDoubleTapMs = null;
-}
-
-var touches = [];
-for (var i = 0; i < event.touches.length; i++) {
-var t = event.touches[i];
-// we dispense with 'dragGetX_' because all touchBrowsers support pageX
-touches.push({
-pageX: t.pageX,
-pageY: t.pageY,
-dataX: g.toDataXCoord(t.pageX),
-dataY: g.toDataYCoord(t.pageY)
-// identifier: t.identifier
-});
-}
-context.initialTouches = touches;
-
-if (touches.length == 1) {
-// This is just a swipe.
-context.initialPinchCenter = touches[0];
-context.touchDirections = { x: true, y: true };
-
-// ADDITION - this needs to select the points
-//var closestTouchP = g.findClosestPoint(touches[0].pageX,touches[0].pageY);
-//if(closestTouchP) {
-//var selectionChanged = g.setSelection(closestTouchP.row, closestTouchP.seriesName);
-//}
-g.mouseMove_(event);
-
-} else if (touches.length >= 2) {
-// It's become a pinch!
-// In case there are 3+ touches, we ignore all but the "first" two.
-
-// only screen coordinates can be averaged (data coords could be log scale).
-context.initialPinchCenter = {
-pageX: 0.5 * (touches[0].pageX + touches[1].pageX),
-pageY: 0.5 * (touches[0].pageY + touches[1].pageY),
-
-// TODO(danvk): remove
-dataX: 0.5 * (touches[0].dataX + touches[1].dataX),
-dataY: 0.5 * (touches[0].dataY + touches[1].dataY)
-};
-
-// Make pinches in a 45-degree swath around either axis 1-dimensional zooms.
-var initialAngle = 180 / Math.PI * Math.atan2(
-context.initialPinchCenter.pageY - touches[0].pageY,
-touches[0].pageX - context.initialPinchCenter.pageX);
-
-// use symmetry to get it into the first quadrant.
-initialAngle = Math.abs(initialAngle);
-if (initialAngle > 90) initialAngle = 90 - initialAngle;
-
-context.touchDirections = {
-x: (initialAngle < (90 - 45/2)),
-y: (initialAngle > 45/2)
-};
-}
-
-// save the full x & y ranges.
-context.initialRange = {
-x: g.xAxisRange(),
-y: g.yAxisRange()
-};
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/moment.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/moment.min.js
deleted file mode 100644
index 62b1697b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/moment.min.js
+++ /dev/null
@@ -1,6 +0,0 @@
-// moment.js
-// version : 2.1.0
-// author : Tim Wood
-// license : MIT
-// momentjs.com
-!function(t){function e(t,e){return function(n){return u(t.call(this,n),e)}}function n(t,e){return function(n){return this.lang().ordinal(t.call(this,n),e)}}function s(){}function i(t){a(this,t)}function r(t){var e=t.years||t.year||t.y||0,n=t.months||t.month||t.M||0,s=t.weeks||t.week||t.w||0,i=t.days||t.day||t.d||0,r=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,o=t.seconds||t.second||t.s||0,u=t.milliseconds||t.millisecond||t.ms||0;this._input=t,this._milliseconds=u+1e3*o+6e4*a+36e5*r,this._days=i+7*s,this._months=n+12*e,this._data={},this._bubble()}function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function o(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";n.length<e;)n="0"+n;return n}function h(t,e,n,s){var i,r,a=e._milliseconds,o=e._days,u=e._months;a&&t._d.setTime(+t._d+a*n),(o||u)&&(i=t.minute(),r=t.hour()),o&&t.date(t.date()+o*n),u&&t.month(t.month()+u*n),a&&!s&&H.updateOffset(t),(o||u)&&(t.minute(i),t.hour(r))}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t,e){var n,s=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),r=0;for(n=0;s>n;n++)~~t[n]!==~~e[n]&&r++;return r+i}function f(t){return t?ie[t]||t.toLowerCase().replace(/(.)s$/,"$1"):t}function l(t,e){return e.abbr=t,x[t]||(x[t]=new s),x[t].set(e),x[t]}function _(t){if(!t)return H.fn._lang;if(!x[t]&&A)try{require("./lang/"+t)}catch(e){return H.fn._lang}return x[t]}function m(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,s=t.match(E);for(e=0,n=s.length;n>e;e++)s[e]=ue[s[e]]?ue[s[e]]:m(s[e]);return function(i){var r="";for(e=0;n>e;e++)r+=s[e]instanceof Function?s[e].call(i,t):s[e];return r}}function M(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var s=5;s--&&N.test(e);)e=e.replace(N,n);return re[e]||(re[e]=y(e)),re[e](t)}function g(t,e){switch(t){case"DDDD":return V;case"YYYY":return X;case"YYYYY":return $;case"S":case"SS":case"SSS":case"DDD":return I;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return R;case"a":case"A":return _(e._l)._meridiemParse;case"X":return B;case"Z":case"ZZ":return j;case"T":return q;case"MM":case"DD":case"YY":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":return J;default:return new RegExp(t.replace("\\",""))}}function p(t){var e=(j.exec(t)||[])[0],n=(e+"").match(ee)||["-",0,0],s=+(60*n[1])+~~n[2];return"+"===n[0]?-s:s}function D(t,e,n){var s,i=n._a;switch(t){case"M":case"MM":i[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":s=_(n._l).monthsParse(e),null!=s?i[1]=s:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(i[2]=~~e);break;case"YY":i[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~e;break;case"a":case"A":n._isPm=_(n._l).isPM(e);break;case"H":case"HH":case"h":case"hh":i[3]=~~e;break;case"m":case"mm":i[4]=~~e;break;case"s":case"ss":i[5]=~~e;break;case"S":case"SS":case"SSS":i[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=p(e)}null==e&&(n._isValid=!1)}function Y(t){var e,n,s=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];s[3]+=~~((t._tzm||0)/60),s[4]+=~~((t._tzm||0)%60),n=new Date(0),t._useUTC?(n.setUTCFullYear(s[0],s[1],s[2]),n.setUTCHours(s[3],s[4],s[5],s[6])):(n.setFullYear(s[0],s[1],s[2]),n.setHours(s[3],s[4],s[5],s[6])),t._d=n}}function w(t){var e,n,s=t._f.match(E),i=t._i;for(t._a=[],e=0;e<s.length;e++)n=(g(s[e],t).exec(i)||[])[0],n&&(i=i.slice(i.indexOf(n)+n.length)),ue[s[e]]&&D(s[e],n,t);i&&(t._il=i),t._isPm&&t._a[3]<12&&(t._a[3]+=12),t._isPm===!1&&12===t._a[3]&&(t._a[3]=0),Y(t)}function k(t){var e,n,s,r,o,u=99;for(r=0;r<t._f.length;r++)e=a({},t),e._f=t._f[r],w(e),n=new i(e),o=c(e._a,n.toArray()),n._il&&(o+=n._il.length),u>o&&(u=o,s=n);a(t,s)}function v(t){var e,n=t._i,s=K.exec(n);if(s){for(t._f="YYYY-MM-DD"+(s[2]||" "),e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}j.exec(n)&&(t._f+=" Z"),w(t)}else t._d=new Date(n)}function T(e){var n=e._i,s=G.exec(n);n===t?e._d=new Date:s?e._d=new Date(+s[1]):"string"==typeof n?v(e):d(n)?(e._a=n.slice(0),Y(e)):e._d=n instanceof Date?new Date(+n):new Date(n)}function b(t,e,n,s,i){return i.relativeTime(e||1,!!n,t,s)}function S(t,e,n){var s=W(Math.abs(t)/1e3),i=W(s/60),r=W(i/60),a=W(r/24),o=W(a/365),u=45>s&&["s",s]||1===i&&["m"]||45>i&&["mm",i]||1===r&&["h"]||22>r&&["hh",r]||1===a&&["d"]||25>=a&&["dd",a]||45>=a&&["M"]||345>a&&["MM",W(a/30)]||1===o&&["y"]||["yy",o];return u[2]=e,u[3]=t>0,u[4]=n,b.apply({},u)}function F(t,e,n){var s,i=n-e,r=n-t.day();return r>i&&(r-=7),i-7>r&&(r+=7),s=H(t).add("d",r),{week:Math.ceil(s.dayOfYear()/7),year:s.year()}}function O(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=_().preparse(e)),H.isMoment(e)?(t=a({},e),t._d=new Date(+e._d)):n?d(n)?k(t):w(t):T(t),new i(t))}function z(t,e){H.fn[t]=H.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),H.updateOffset(this),this):this._d["get"+n+e]()}}function C(t){H.duration.fn[t]=function(){return this._data[t]}}function L(t,e){H.duration.fn["as"+t]=function(){return+this/e}}for(var H,P,U="2.1.0",W=Math.round,x={},A="undefined"!=typeof module&&module.exports,G=/^\/?Date\((\-?\d+)/i,Z=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,E=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,J=/\d\d?/,I=/\d{1,3}/,V=/\d{3}/,X=/\d{1,4}/,$=/[+\-]?\d{1,6}/,R=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j=/Z|[\+\-]\d\d:?\d\d/i,q=/T/i,B=/[\+\-]?\d+(\.\d{1,3})?/,K=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,Q="YYYY-MM-DDTHH:mm:ssZ",te=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],ee=/([\+\-]|\d\d)/gi,ne="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),se={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ie={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},re={},ae="DDD w W M D d".split(" "),oe="M D H h m s w W".split(" "),ue={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},gg:function(){return u(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return u(this.weekYear(),5)},GG:function(){return u(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return u(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ae.length;)P=ae.pop(),ue[P+"o"]=n(ue[P],P);for(;oe.length;)P=oe.pop(),ue[P+P]=e(ue[P],2);for(ue.DDDD=e(ue.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,s;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=H([2e3,e]),s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(s.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,s;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=H([2e3,1]).day(e),s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(s.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,s){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,s):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return F(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},H=function(t,e,n){return O({_i:t,_f:e,_l:n,_isUTC:!1})},H.utc=function(t,e,n){return O({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},H.unix=function(t){return H(1e3*t)},H.duration=function(t,e){var n,s,i=H.isDuration(t),a="number"==typeof t,o=i?t._input:a?{}:t,u=Z.exec(t);return a?e?o[e]=t:o.milliseconds=t:u&&(n="-"===u[1]?-1:1,o={y:0,d:~~u[2]*n,h:~~u[3]*n,m:~~u[4]*n,s:~~u[5]*n,ms:~~u[6]*n}),s=new r(o),i&&t.hasOwnProperty("_lang")&&(s._lang=t._lang),s},H.version=U,H.defaultFormat=Q,H.updateOffset=function(){},H.lang=function(t,e){return t?(e?l(t,e):x[t]||_(t),H.duration.fn._lang=H.fn._lang=_(t),void 0):H.fn._lang._abbr},H.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),_(t)},H.isMoment=function(t){return t instanceof i},H.isDuration=function(t){return t instanceof r},H.fn=i.prototype={clone:function(){return H(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return M(H(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!c(this._a,(this._isUTC?H.utc(this._a):H(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(t){var e=M(this,t||H.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,-1),this},diff:function(t,e,n){var s,i,r=this._isUTC?H(t).zone(this._offset||0):H(t).local(),a=6e4*(this.zone()-r.zone());return e=f(e),"year"===e||"month"===e?(s=432e5*(this.daysInMonth()+r.daysInMonth()),i=12*(this.year()-r.year())+(this.month()-r.month()),i+=(this-H(this).startOf("month")-(r-H(r).startOf("month")))/s,i-=6e4*(this.zone()-H(this).startOf("month").zone()-(r.zone()-H(r).startOf("month").zone()))/s,"year"===e&&(i/=12)):(s=this-r,i="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-a)/864e5:"week"===e?(s-a)/6048e5:s),n?i:o(i)},from:function(t,e){return H.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(H(),t)},calendar:function(){var t=this.diff(H().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?"string"==typeof t&&(t=this.lang().weekdaysParse(t),"number"!=typeof t)?this:this.add({d:t-e}):e},month:function(t){var e,n=this._isUTC?"UTC":"";return null!=t?"string"==typeof t&&(t=this.lang().monthsParse(t),"number"!=typeof t)?this:(e=this.date(),this.date(1),this._d["set"+n+"Month"](t),this.date(Math.min(e,this.daysInMonth())),H.updateOffset(this),this):this._d["get"+n+"Month"]()},startOf:function(t){switch(t=f(t)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),this},endOf:function(t){return this.startOf(t).add(t,1).subtract("ms",1)},isAfter:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)>+H(t).startOf(e)},isBefore:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)<+H(t).startOf(e)},isSame:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)===+H(t).startOf(e)},min:function(t){return t=H.apply(null,arguments),this>t?this:t},max:function(t){return t=H.apply(null,arguments),t>this?this:t},zone:function(t){var e=this._offset||0;return null==t?this._isUTC?e:this._d.getTimezoneOffset():("string"==typeof t&&(t=p(t)),Math.abs(t)<16&&(t=60*t),this._offset=t,this._isUTC=!0,e!==t&&h(this,H.duration(e-t,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return H.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=W((H(this).startOf("day")-H(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},weekYear:function(t){var e=F(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==t?e:this.add("y",t-e)},isoWeekYear:function(t){var e=F(this,1,4).year;return null==t?e:this.add("y",t-e)},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},isoWeek:function(t){var e=F(this,1,4).week;return null==t?e:this.add("d",7*(t-e))},weekday:function(t){var e=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==t?e:this.add("d",t-e)},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},lang:function(e){return e===t?this._lang:(this._lang=_(e),this)}},P=0;P<ne.length;P++)z(ne[P].toLowerCase().replace(/s$/,""),ne[P]);z("year","FullYear"),H.fn.days=H.fn.day,H.fn.months=H.fn.month,H.fn.weeks=H.fn.week,H.fn.isoWeeks=H.fn.isoWeek,H.fn.toJSON=H.fn.toISOString,H.duration.fn=r.prototype={_bubble:function(){var t,e,n,s,i=this._milliseconds,r=this._days,a=this._months,u=this._data;u.milliseconds=i%1e3,t=o(i/1e3),u.seconds=t%60,e=o(t/60),u.minutes=e%60,n=o(e/60),u.hours=n%24,r+=o(n/24),u.days=r%30,a+=o(r/30),u.months=a%12,s=o(a/12),u.years=s},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*~~(this._months/12)},humanize:function(t){var e=+this,n=S(e,!t,this.lang());return t&&(n=this.lang().pastFuture(e,n)),this.lang().postformat(n)},add:function(t,e){var n=H.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=H.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=f(t),this[t.toLowerCase()+"s"]()},as:function(t){return t=f(t),this["as"+t.charAt(0).toUpperCase()+t.slice(1)+"s"]()},lang:H.fn.lang};for(P in se)se.hasOwnProperty(P)&&(L(P,se[P]),C(P.toLowerCase()));L("Weeks",6048e5),H.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},H.lang("en",{ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),A&&(module.exports=H),"undefined"==typeof ender&&(this.moment=H),"function"==typeof define&&define.amd&&define("moment",[],function(){return H})}.call(this); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-driver.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-driver.js
deleted file mode 100644
index 22f46870..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-driver.js
+++ /dev/null
@@ -1,206 +0,0 @@
-// Invoke via: ./test.sh
-//
-// or phantomjs phantom-driver.js [testCase.test]
-//
-// For more on phantomjs, visit www.phantomjs.org.
-
-var RunAllAutoTests = function(done_callback) {
-
-var page = require('webpage').create();
-
-// NOTE: Cannot include '#' or '?' in this URL.
-var url = 'auto_tests/misc/local.html';
-
-// NOTE: changing the line below to this:
-// page.open(url, function(status)) {
-// makes phantomjs hang.
-page.open(url, function(status) {
- if (status !== 'success') {
- console.warn('Page status: ' + status);
- console.log(page);
- phantom.exit();
- }
-
- var testCase, test;
- var verbose = false;
- var optIdx = 0;
- if (phantom.args.length > 0 && phantom.args[0] === "--verbose") {
- verbose = true;
- optIdx = 1;
- }
- if (phantom.args.length == optIdx + 1) {
- var parts = phantom.args[optIdx].split('.');
- if (2 != parts.length) {
- console.warn('Usage: phantomjs phantom-driver.js [--verbose] [testCase.test]');
- phantom.exit();
- }
- testCase = parts[0];
- test = parts[1];
- }
-
- var loggingOn = false;
-
- page.onConsoleMessage = function (msg) {
- if (msg == 'Running ' + test) {
- loggingOn = true;
- } else if (msg.substr(0, 'Running'.length) == 'Running') {
- loggingOn = false;
- }
- if (verbose || loggingOn) console.log(msg);
- };
-
- page.onError = function (msg, trace) {
- console.log(msg);
- trace.forEach(function(item) {
- console.log(' ', item.file, ':', item.line);
- })
- };
-
- var results;
-
- // Run all tests.
- var start = new Date().getTime();
- results = page.evaluate(function() {
- var num_passing = 0, num_failing = 0;
- var failures = [];
- // Phantom doesn't like stacktrace.js using the "arguments" object
- // in stacktrace.js, which it interprets in strict mode.
- printStackTrace = undefined;
-
- jstestdriver.attachListener({
- finish : function(tc, name, result, e) {
- console.log("Result:", tc.name, name, result, e);
- if (result) {
- // console.log(testCase + '.' + test + ' passed');
- num_passing++;
- } else {
- num_failing++;
- failures.push(tc.name + '.' + name);
- }
- }
- });
- var testCases = getAllTestCases();
- for (var idx in testCases) {
- var entry = testCases[idx];
-
- var prototype = entry.testCase;
- var tc = new entry.testCase();
- var result = tc.runAllTests();
- }
- return {
- num_passing : num_passing,
- num_failing : num_failing,
- failures : failures
- };
- });
- var end = new Date().getTime();
- var elapsed = (end - start) / 1000;
-
- console.log('Ran ' + (results.num_passing + results.num_failing) + ' tests in ' + elapsed + 's.');
- console.log(results.num_passing + ' test(s) passed');
- console.log(results.num_failing + ' test(s) failed:');
- for (var i = 0; i < results.failures.length; i++) {
- // TODO(danvk): print an auto_test/misc/local URL that runs this test.
- console.log(' ' + results.failures[i] + ' failed.');
- }
-
- done_callback(results.num_failing, results.num_passing);
-});
-
-};
-
-// Load all "tests/" pages.
-var LoadAllManualTests = function(totally_done_callback) {
-
-var fs = require('fs');
-var tests = fs.list('tests');
-var pages = [];
-
-function make_barrier_closure(n, fn) {
- var calls = 0;
- return function() {
- calls++;
- if (calls == n) {
- fn();
- } else {
- // console.log('' + calls + ' done, ' + (n - calls) + ' remain');
- }
- };
-}
-
-var tasks = [];
-for (var i = 0; i < tests.length; i++) {
- if (tests[i].substr(-5) != '.html') continue;
- tasks.push(tests[i]);
-}
-tasks = [ 'independent-series.html' ];
-
-var loaded_page = make_barrier_closure(tasks.length, function() {
- // Wait 2 secs to allow JS errors to happen after page load.
- setTimeout(function() {
- var success = 0, failures = 0;
- for (var i = 0; i < pages.length; i++) {
- if (pages[i].success && !pages[i].hasErrors) {
- success++;
- } else {
- failures++;
- }
- }
- console.log('Successfully loaded ' + success + ' / ' +
- (success + failures) + ' test pages.');
- totally_done_callback(failures, success);
- }, 2000);
-});
-
-
-for (var i = 0; i < tasks.length; i++) {
- var url = 'file://' + fs.absolute('tests/' + tasks[i]);
- pages.push(function(path, url) {
- var page = require('webpage').create();
- page.success = false;
- page.hasErrors = false;
- page.onError = function (msg, trace) {
- console.log(path + ': ' + msg);
- page.hasErrors = true;
- trace.forEach(function(item) {
- console.log(' ', item.file, ':', item.line);
- });
- };
- page.onLoadFinished = function(status) {
- if (status == 'success') {
- page.success = true;
- }
- if (!page.done) loaded_page();
- page.done = true;
- };
- page.open(url);
- return page;
- }(tasks[i], url));
-}
-
-};
-
-
-// First run all auto_tests.
-// If they all pass, load the manual tests.
-RunAllAutoTests(function(num_failing, num_passing) {
- if (num_failing !== 0) {
- console.log('FAIL');
- phantom.exit();
- } else {
- console.log('PASS');
- }
- phantom.exit();
-
- // This is not yet reliable enough to be useful:
- /*
- LoadAllManualTests(function(failing, passing) {
- if (failing !== 0) {
- console.log('FAIL');
- } else {
- console.log('PASS');
- }
- phantom.exit();
- });
- */
-});
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-perf.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-perf.js
deleted file mode 100644
index b98c3f03..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/phantom-perf.js
+++ /dev/null
@@ -1,94 +0,0 @@
-// dygraphs command-line performance benchmark.
-//
-// Invoke as:
-//
-// phantomjs phantom-perf.js 1000 100 5
-//
-// If the test succeeds, it will print out something like:
-//
-// 1000/100/5: 1309.4+/-43.4 ms (1284, 1245, 1336, 1346, 1336)
-//
-// This is mean +/- standard deviation, followed by a list of the individual
-// times for each repetition, in milliseconds.
-
-var system = require('system'),
- fs = require('fs');
-
-var tmpfile = "tmp-dygraph-test-params.js";
-var url = 'tests/dygraph-many-points-benchmark.html';
-
-function fail(msg){
- console.warn(msg);
- phantom.exit(1);
-}
-
-function assert(condition, msg){
- if (condition) return;
- fail(msg);
-}
-
-var config_file_template =
- "document.getElementById('points').value = (points);\n" +
- "document.getElementById('series').value = (series);\n" +
- "document.getElementById('repetitions').value = (repetitions);\n";
-
-var RunBenchmark = function(points, series, repetitions, done_callback) {
- var page = require('webpage').create();
-
- // page.evalute() is seriously locked down.
- // This was the only way I could find to pass the parameters to the page.
- fs.write(tmpfile,
- config_file_template
- .replace("(points)", points)
- .replace("(series)", series)
- .replace("(repetitions)", repetitions),
- "w");
-
- page.open(url, function(status) {
- if (status !== 'success') {
- console.warn('Page status: ' + status);
- console.log(page);
- phantom.exit();
- }
-
- assert(page.injectJs(tmpfile), "Unable to inject JS.");
- fs.remove(tmpfile);
-
- var start = new Date().getTime();
- var rep_times = page.evaluate(function() {
- var rep_times = updatePlot();
- return rep_times;
- });
- var end = new Date().getTime();
- var elapsed = (end - start) / 1000;
- done_callback(rep_times);
- });
-};
-
-
-var points, series, repetitions;
-if (4 != system.args.length) {
- console.warn('Usage: phantomjs phantom-driver.js (points) (series) (repititions)');
- phantom.exit();
-}
-
-points = parseInt(system.args[1]);
-series = parseInt(system.args[2]);
-repetitions = parseInt(system.args[3]);
-assert(points != null, "Couldn't parse " + system.args[1]);
-assert(series != null, "Couldn't parse " + system.args[2]);
-assert(repetitions != null, "Couldn't parse " + system.args[3]);
-
-
-RunBenchmark(points, series, repetitions, function(rep_times) {
- var mean = 0.0, std = 0.0;
- rep_times.forEach(function(x) { mean += x; } );
- mean /= rep_times.length;
- rep_times.forEach(function(x) { std += Math.pow(x - mean, 2); });
- std = Math.sqrt(std / (rep_times.length - 1));
-
- console.log(points + '/' + series + '/' + repetitions + ': ' +
- mean.toFixed(1) + '+/-' + std.toFixed(1) + ' ms (' +
- rep_times.join(', ') + ')');
- phantom.exit();
-});
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/README b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/README
deleted file mode 100644
index f216545b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/README
+++ /dev/null
@@ -1,113 +0,0 @@
-dygraphs plugins
-----------------
-
-A single dygraph is actually a collection of dygraphs plugins, each responsible
-for some portion of the chart: the plot area, the axes, the legend, the labels,
-etc.
-
-This forces the dygraphs code to be more modular and encourages better APIs.
-
-The "legend" plugin (plugins/legend.js) can be used as a template for new
-plugins.
-
-Here is a simplified version of it, with comments to explain the plugin
-lifecycle and APIs:
-
-----------------
-
-// (standard JavaScript library wrapper; prevents polluting global namespace)
-Dygraph.Plugins.Legend = (function() {
-
-// Plugin constructor. This is invoked once for every chart which uses the
-// plugin. You can't actually access the Dygraph object at this point, so the
-// initialization you do here shouldn't be chart-specific. (For that, use
-// the activate() method).
-var legend = function() {
- this.div_ = null;
-};
-
-// Plugins are expected to implement this method for debugging purposes.
-legend.toString = function() {
- return "Legend";
-};
-
-// This is called once the dygraph is ready. The chart data may not be
-// available yet, but the options specified in the constructor are.
-//
-// Proper tasks to do here include:
-// - Reading your own options
-// - DOM manipulation
-// - Registering event listeners
-//
-// "dygraph" is the Dygraph object for which this instance is being activated.
-// "registerer" allows you to register event listeners.
-legend.prototype.activate = function(dygraph, registerer) {
- // Create the legend div and attach it to the chart DOM.
- this.div_ = document.createElement("div");
- dygraph.graphDiv.appendChild(this.div_);
-
- // Add event listeners. These will be called whenever points are selected
- // (i.e. you hover over them) or deselected (i.e. you mouse away from the
- // chart). This is your only chance to register event listeners! Once this
- // method returns, the gig is up.
- registerer.addEventListener('select', legend.select);
- registerer.addEventListener('deselect', legend.deselect);
-};
-
-// The functions called by event listeners all take a single parameter, an
-// event object. This contains properties relevant to the particular event, but
-// you can always assume that it has:
-//
-// 1. A "dygraph" parameter which is a reference to the chart on which the
-// event took place.
-// 2. A "stopPropagation" method, which you can call to prevent the event from
-// being seen by any other plugins after you. This effectively cancels the
-// event.
-// 3. A "preventDefault" method, which prevents dygraphs from performing the
-// default action associated with this event.
-//
-legend.select = function(e) {
- // These are two of the properties specific to the "select" event object:
- var xValue = e.selectedX;
- var points = e.selectedPoints;
-
- var html = xValue + ':';
- for (var i = 0; i < points.length; i++) {
- var point = points[i];
- html += ' ' + point.name + ':' + point.yval;
- }
-
- // In an event listener, "this" refers to your plugin object.
- this.div_.innerHTML = html;
-};
-
-// This clears out the legend when the user mouses away from the chart.
-legend.deselect = function(e) {
- this.div_.innerHTML = '';
-};
-
-return legend;
-})();
-
-----------------
-
-Plugin Events Reference:
-
-- predraw
-- clearChart
-- drawChart
-- select
-- deselect
-
-TODO(danvk): document all event properties for each event.
-
-
-Special methods:
-- (constructor)
-- activate
-- destroy
-
-
-----------------
-
-Notes on plugin registration and event cascade ordering/behavior.
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/annotations.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/annotations.js
deleted file mode 100644
index 85761040..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/annotations.js
+++ /dev/null
@@ -1,182 +0,0 @@
-/**
- * @license
- * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/*global Dygraph:false */
-
-Dygraph.Plugins.Annotations = (function() {
-
-"use strict";
-
-/**
-Current bits of jankiness:
-- Uses dygraph.layout_ to get the parsed annotations.
-- Uses dygraph.plotter_.area
-
-It would be nice if the plugin didn't require so much special support inside
-the core dygraphs classes, but annotations involve quite a bit of parsing and
-layout.
-
-TODO(danvk): cache DOM elements.
-
-*/
-
-var annotations = function() {
- this.annotations_ = [];
-};
-
-annotations.prototype.toString = function() {
- return "Annotations Plugin";
-};
-
-annotations.prototype.activate = function(g) {
- return {
- clearChart: this.clearChart,
- didDrawChart: this.didDrawChart
- };
-};
-
-annotations.prototype.detachLabels = function() {
- for (var i = 0; i < this.annotations_.length; i++) {
- var a = this.annotations_[i];
- if (a.parentNode) a.parentNode.removeChild(a);
- this.annotations_[i] = null;
- }
- this.annotations_ = [];
-};
-
-annotations.prototype.clearChart = function(e) {
- this.detachLabels();
-};
-
-annotations.prototype.didDrawChart = function(e) {
- var g = e.dygraph;
-
- // Early out in the (common) case of zero annotations.
- var points = g.layout_.annotated_points;
- if (!points || points.length === 0) return;
-
- var containerDiv = e.canvas.parentNode;
- var annotationStyle = {
- "position": "absolute",
- "fontSize": g.getOption('axisLabelFontSize') + "px",
- "zIndex": 10,
- "overflow": "hidden"
- };
-
- var bindEvt = function(eventName, classEventName, pt) {
- return function(annotation_event) {
- var a = pt.annotation;
- if (a.hasOwnProperty(eventName)) {
- a[eventName](a, pt, g, annotation_event);
- } else if (g.getOption(classEventName)) {
- g.getOption(classEventName)(a, pt, g, annotation_event );
- }
- };
- };
-
- // Add the annotations one-by-one.
- var area = e.dygraph.plotter_.area;
-
- // x-coord to sum of previous annotation's heights (used for stacking).
- var xToUsedHeight = {};
-
- for (var i = 0; i < points.length; i++) {
- var p = points[i];
- if (p.canvasx < area.x || p.canvasx > area.x + area.w ||
- p.canvasy < area.y || p.canvasy > area.y + area.h) {
- continue;
- }
-
- var a = p.annotation;
- var tick_height = 6;
- if (a.hasOwnProperty("tickHeight")) {
- tick_height = a.tickHeight;
- }
-
- var div = document.createElement("div");
- for (var name in annotationStyle) {
- if (annotationStyle.hasOwnProperty(name)) {
- div.style[name] = annotationStyle[name];
- }
- }
- if (!a.hasOwnProperty('icon')) {
- div.className = "dygraphDefaultAnnotation";
- }
- if (a.hasOwnProperty('cssClass')) {
- div.className += " " + a.cssClass;
- }
-
- var width = a.hasOwnProperty('width') ? a.width : 16;
- var height = a.hasOwnProperty('height') ? a.height : 16;
- if (a.hasOwnProperty('icon')) {
- var img = document.createElement("img");
- img.src = a.icon;
- img.width = width;
- img.height = height;
- div.appendChild(img);
- } else if (p.annotation.hasOwnProperty('shortText')) {
- div.appendChild(document.createTextNode(p.annotation.shortText));
- }
- var left = p.canvasx - width / 2;
- div.style.left = left + "px";
- var divTop = 0;
- if (a.attachAtBottom) {
- var y = (area.y + area.h - height - tick_height);
- if (xToUsedHeight[left]) {
- y -= xToUsedHeight[left];
- } else {
- xToUsedHeight[left] = 0;
- }
- xToUsedHeight[left] += (tick_height + height);
- divTop = y;
- } else {
- divTop = p.canvasy - height - tick_height;
- }
- div.style.top = divTop + "px";
- div.style.width = width + "px";
- div.style.height = height + "px";
- div.title = p.annotation.text;
- div.style.color = g.colorsMap_[p.name];
- div.style.borderColor = g.colorsMap_[p.name];
- a.div = div;
-
- g.addAndTrackEvent(div, 'click',
- bindEvt('clickHandler', 'annotationClickHandler', p, this));
- g.addAndTrackEvent(div, 'mouseover',
- bindEvt('mouseOverHandler', 'annotationMouseOverHandler', p, this));
- g.addAndTrackEvent(div, 'mouseout',
- bindEvt('mouseOutHandler', 'annotationMouseOutHandler', p, this));
- g.addAndTrackEvent(div, 'dblclick',
- bindEvt('dblClickHandler', 'annotationDblClickHandler', p, this));
-
- containerDiv.appendChild(div);
- this.annotations_.push(div);
-
- var ctx = e.drawingContext;
- ctx.save();
- ctx.strokeStyle = g.colorsMap_[p.name];
- ctx.beginPath();
- if (!a.attachAtBottom) {
- ctx.moveTo(p.canvasx, p.canvasy);
- ctx.lineTo(p.canvasx, p.canvasy - 2 - tick_height);
- } else {
- var y = divTop + height;
- ctx.moveTo(p.canvasx, y);
- ctx.lineTo(p.canvasx, y + tick_height);
- }
- ctx.closePath();
- ctx.stroke();
- ctx.restore();
- }
-};
-
-annotations.prototype.destroy = function() {
- this.detachLabels();
-};
-
-return annotations;
-
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/axes.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/axes.js
deleted file mode 100644
index cacda86e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/axes.js
+++ /dev/null
@@ -1,315 +0,0 @@
-/**
- * @license
- * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-
-/*global Dygraph:false */
-
-Dygraph.Plugins.Axes = (function() {
-
-"use strict";
-
-/*
-Bits of jankiness:
-- Direct layout access
-- Direct area access
-- Should include calculation of ticks, not just the drawing.
-
-Options left to make axis-friendly.
- ('axisTickSize')
- ('drawAxesAtZero')
- ('xAxisHeight')
-
-These too. What is the difference between axisLablelWidth and {x,y}AxisLabelWidth?
- ('axisLabelWidth')
- ('xAxisLabelWidth')
- ('yAxisLabelWidth')
-*/
-
-/**
- * Draws the axes. This includes the labels on the x- and y-axes, as well
- * as the tick marks on the axes.
- * It does _not_ draw the grid lines which span the entire chart.
- */
-var axes = function() {
- this.xlabels_ = [];
- this.ylabels_ = [];
-};
-
-axes.prototype.toString = function() {
- return "Axes Plugin";
-};
-
-axes.prototype.activate = function(g) {
- return {
- layout: this.layout,
- clearChart: this.clearChart,
- willDrawChart: this.willDrawChart
- };
-};
-
-axes.prototype.layout = function(e) {
- var g = e.dygraph;
-
- if (g.getOption('drawYAxis')) {
- var w = g.getOption('yAxisLabelWidth') + 2 * g.getOption('axisTickSize');
- e.reserveSpaceLeft(w);
- }
-
- if (g.getOption('drawXAxis')) {
- var h;
- // NOTE: I think this is probably broken now, since g.getOption() now
- // hits the dictionary. (That is, g.getOption('xAxisHeight') now always
- // has a value.)
- if (g.getOption('xAxisHeight')) {
- h = g.getOption('xAxisHeight');
- } else {
- h = g.getOptionForAxis('axisLabelFontSize', 'x') + 2 * g.getOption('axisTickSize');
- }
- e.reserveSpaceBottom(h);
- }
-
- if (g.numAxes() == 2) {
- // TODO(danvk): introduce a 'drawAxis' per-axis property.
- if (g.getOption('drawYAxis')) {
- // TODO(danvk): per-axis setting.
- var w = g.getOption('yAxisLabelWidth') + 2 * g.getOption('axisTickSize');
- e.reserveSpaceRight(w);
- }
- } else if (g.numAxes() > 2) {
- g.error("Only two y-axes are supported at this time. (Trying " +
- "to use " + g.numAxes() + ")");
- }
-};
-
-axes.prototype.detachLabels = function() {
- function removeArray(ary) {
- for (var i = 0; i < ary.length; i++) {
- var el = ary[i];
- if (el.parentNode) el.parentNode.removeChild(el);
- }
- }
-
- removeArray(this.xlabels_);
- removeArray(this.ylabels_);
- this.xlabels_ = [];
- this.ylabels_ = [];
-};
-
-axes.prototype.clearChart = function(e) {
- this.detachLabels();
-};
-
-axes.prototype.willDrawChart = function(e) {
- var g = e.dygraph;
- if (!g.getOption('drawXAxis') && !g.getOption('drawYAxis')) return;
-
- // Round pixels to half-integer boundaries for crisper drawing.
- function halfUp(x) { return Math.round(x) + 0.5; }
- function halfDown(y){ return Math.round(y) - 0.5; }
-
- var context = e.drawingContext;
- var containerDiv = e.canvas.parentNode;
- var canvasWidth = e.canvas.width;
- var canvasHeight = e.canvas.height;
-
- var label, x, y, tick, i;
-
- var makeLabelStyle = function(axis) {
- return {
- position: "absolute",
- fontSize: g.getOptionForAxis('axisLabelFontSize', axis) + "px",
- zIndex: 10,
- color: g.getOptionForAxis('axisLabelColor', axis),
- width: g.getOption('axisLabelWidth') + "px",
- // height: g.getOptionForAxis('axisLabelFontSize', 'x') + 2 + "px",
- lineHeight: "normal", // Something other than "normal" line-height screws up label positioning.
- overflow: "hidden"
- };
- };
-
- var labelStyles = {
- x : makeLabelStyle('x'),
- y : makeLabelStyle('y'),
- y2 : makeLabelStyle('y2')
- };
-
- var makeDiv = function(txt, axis, prec_axis) {
- /*
- * This seems to be called with the following three sets of axis/prec_axis:
- * x: undefined
- * y: y1
- * y: y2
- */
- var div = document.createElement("div");
- var labelStyle = labelStyles[prec_axis == 'y2' ? 'y2' : axis];
- for (var name in labelStyle) {
- if (labelStyle.hasOwnProperty(name)) {
- div.style[name] = labelStyle[name];
- }
- }
- var inner_div = document.createElement("div");
- inner_div.className = 'dygraph-axis-label' +
- ' dygraph-axis-label-' + axis +
- (prec_axis ? ' dygraph-axis-label-' + prec_axis : '');
- inner_div.innerHTML = txt;
- div.appendChild(inner_div);
- return div;
- };
-
- // axis lines
- context.save();
-
- var layout = g.layout_;
- var area = e.dygraph.plotter_.area;
-
- if (g.getOption('drawYAxis')) {
- if (layout.yticks && layout.yticks.length > 0) {
- var num_axes = g.numAxes();
- for (i = 0; i < layout.yticks.length; i++) {
- tick = layout.yticks[i];
- if (typeof(tick) == "function") return;
- x = area.x;
- var sgn = 1;
- var prec_axis = 'y1';
- if (tick[0] == 1) { // right-side y-axis
- x = area.x + area.w;
- sgn = -1;
- prec_axis = 'y2';
- }
- var fontSize = g.getOptionForAxis('axisLabelFontSize', prec_axis);
- y = area.y + tick[1] * area.h;
-
- /* Tick marks are currently clipped, so don't bother drawing them.
- context.beginPath();
- context.moveTo(halfUp(x), halfDown(y));
- context.lineTo(halfUp(x - sgn * this.attr_('axisTickSize')), halfDown(y));
- context.closePath();
- context.stroke();
- */
-
- label = makeDiv(tick[2], 'y', num_axes == 2 ? prec_axis : null);
- var top = (y - fontSize / 2);
- if (top < 0) top = 0;
-
- if (top + fontSize + 3 > canvasHeight) {
- label.style.bottom = "0px";
- } else {
- label.style.top = top + "px";
- }
- if (tick[0] === 0) {
- label.style.left = (area.x - g.getOption('yAxisLabelWidth') - g.getOption('axisTickSize')) + "px";
- label.style.textAlign = "right";
- } else if (tick[0] == 1) {
- label.style.left = (area.x + area.w +
- g.getOption('axisTickSize')) + "px";
- label.style.textAlign = "left";
- }
- label.style.width = g.getOption('yAxisLabelWidth') + "px";
- containerDiv.appendChild(label);
- this.ylabels_.push(label);
- }
-
- // The lowest tick on the y-axis often overlaps with the leftmost
- // tick on the x-axis. Shift the bottom tick up a little bit to
- // compensate if necessary.
- var bottomTick = this.ylabels_[0];
- // Interested in the y2 axis also?
- var fontSize = g.getOptionForAxis('axisLabelFontSize', "y");
- var bottom = parseInt(bottomTick.style.top, 10) + fontSize;
- if (bottom > canvasHeight - fontSize) {
- bottomTick.style.top = (parseInt(bottomTick.style.top, 10) -
- fontSize / 2) + "px";
- }
- }
-
- // draw a vertical line on the left to separate the chart from the labels.
- var axisX;
- if (g.getOption('drawAxesAtZero')) {
- var r = g.toPercentXCoord(0);
- if (r > 1 || r < 0 || isNaN(r)) r = 0;
- axisX = halfUp(area.x + r * area.w);
- } else {
- axisX = halfUp(area.x);
- }
-
- context.strokeStyle = g.getOptionForAxis('axisLineColor', 'y');
- context.lineWidth = g.getOptionForAxis('axisLineWidth', 'y');
-
- context.beginPath();
- context.moveTo(axisX, halfDown(area.y));
- context.lineTo(axisX, halfDown(area.y + area.h));
- context.closePath();
- context.stroke();
-
- // if there's a secondary y-axis, draw a vertical line for that, too.
- if (g.numAxes() == 2) {
- context.strokeStyle = g.getOptionForAxis('axisLineColor', 'y2');
- context.lineWidth = g.getOptionForAxis('axisLineWidth', 'y2');
- context.beginPath();
- context.moveTo(halfDown(area.x + area.w), halfDown(area.y));
- context.lineTo(halfDown(area.x + area.w), halfDown(area.y + area.h));
- context.closePath();
- context.stroke();
- }
- }
-
- if (g.getOption('drawXAxis')) {
- if (layout.xticks) {
- for (i = 0; i < layout.xticks.length; i++) {
- tick = layout.xticks[i];
- x = area.x + tick[0] * area.w;
- y = area.y + area.h;
-
- /* Tick marks are currently clipped, so don't bother drawing them.
- context.beginPath();
- context.moveTo(halfUp(x), halfDown(y));
- context.lineTo(halfUp(x), halfDown(y + this.attr_('axisTickSize')));
- context.closePath();
- context.stroke();
- */
-
- label = makeDiv(tick[1], 'x');
- label.style.textAlign = "center";
- label.style.top = (y + g.getOption('axisTickSize')) + 'px';
-
- var left = (x - g.getOption('axisLabelWidth')/2);
- if (left + g.getOption('axisLabelWidth') > canvasWidth) {
- left = canvasWidth - g.getOption('xAxisLabelWidth');
- label.style.textAlign = "right";
- }
- if (left < 0) {
- left = 0;
- label.style.textAlign = "left";
- }
-
- label.style.left = left + "px";
- label.style.width = g.getOption('xAxisLabelWidth') + "px";
- containerDiv.appendChild(label);
- this.xlabels_.push(label);
- }
- }
-
- context.strokeStyle = g.getOptionForAxis('axisLineColor', 'x');
- context.lineWidth = g.getOptionForAxis('axisLineWidth', 'x');
- context.beginPath();
- var axisY;
- if (g.getOption('drawAxesAtZero')) {
- var r = g.toPercentYCoord(0, 0);
- if (r > 1 || r < 0) r = 1;
- axisY = halfDown(area.y + r * area.h);
- } else {
- axisY = halfDown(area.y + area.h);
- }
- context.moveTo(halfUp(area.x), axisY);
- context.lineTo(halfUp(area.x + area.w), axisY);
- context.closePath();
- context.stroke();
- }
-
- context.restore();
-};
-
-return axes;
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/chart-labels.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/chart-labels.js
deleted file mode 100644
index da231d80..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/chart-labels.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * @license
- * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-/*global Dygraph:false */
-
-Dygraph.Plugins.ChartLabels = (function() {
-
-"use strict";
-
-// TODO(danvk): move chart label options out of dygraphs and into the plugin.
-// TODO(danvk): only tear down & rebuild the DIVs when it's necessary.
-
-var chart_labels = function() {
- this.title_div_ = null;
- this.xlabel_div_ = null;
- this.ylabel_div_ = null;
- this.y2label_div_ = null;
-};
-
-chart_labels.prototype.toString = function() {
- return "ChartLabels Plugin";
-};
-
-chart_labels.prototype.activate = function(g) {
- return {
- layout: this.layout,
- // clearChart: this.clearChart,
- didDrawChart: this.didDrawChart
- };
-};
-
-// QUESTION: should there be a plugin-utils.js?
-var createDivInRect = function(r) {
- var div = document.createElement('div');
- div.style.position = 'absolute';
- div.style.left = r.x + 'px';
- div.style.top = r.y + 'px';
- div.style.width = r.w + 'px';
- div.style.height = r.h + 'px';
- return div;
-};
-
-// Detach and null out any existing nodes.
-chart_labels.prototype.detachLabels_ = function() {
- var els = [ this.title_div_,
- this.xlabel_div_,
- this.ylabel_div_,
- this.y2label_div_ ];
- for (var i = 0; i < els.length; i++) {
- var el = els[i];
- if (!el) continue;
- if (el.parentNode) el.parentNode.removeChild(el);
- }
-
- this.title_div_ = null;
- this.xlabel_div_ = null;
- this.ylabel_div_ = null;
- this.y2label_div_ = null;
-};
-
-var createRotatedDiv = function(g, box, axis, classes, html) {
- // TODO(danvk): is this outer div actually necessary?
- var div = document.createElement("div");
- div.style.position = 'absolute';
- if (axis == 1) {
- // NOTE: this is cheating. Should be positioned relative to the box.
- div.style.left = '0px';
- } else {
- div.style.left = box.x + 'px';
- }
- div.style.top = box.y + 'px';
- div.style.width = box.w + 'px';
- div.style.height = box.h + 'px';
- div.style.fontSize = (g.getOption('yLabelWidth') - 2) + 'px';
-
- var inner_div = document.createElement("div");
- inner_div.style.position = 'absolute';
- inner_div.style.width = box.h + 'px';
- inner_div.style.height = box.w + 'px';
- inner_div.style.top = (box.h / 2 - box.w / 2) + 'px';
- inner_div.style.left = (box.w / 2 - box.h / 2) + 'px';
- inner_div.style.textAlign = 'center';
-
- // CSS rotation is an HTML5 feature which is not standardized. Hence every
- // browser has its own name for the CSS style.
- var val = 'rotate(' + (axis == 1 ? '-' : '') + '90deg)';
- inner_div.style.transform = val; // HTML5
- inner_div.style.WebkitTransform = val; // Safari/Chrome
- inner_div.style.MozTransform = val; // Firefox
- inner_div.style.OTransform = val; // Opera
- inner_div.style.msTransform = val; // IE9
-
- if (typeof(document.documentMode) !== 'undefined' &&
- document.documentMode < 9) {
- // We're dealing w/ an old version of IE, so we have to rotate the text
- // using a BasicImage transform. This uses a different origin of rotation
- // than HTML5 rotation (top left of div vs. its center).
- inner_div.style.filter =
- 'progid:DXImageTransform.Microsoft.BasicImage(rotation=' +
- (axis == 1 ? '3' : '1') + ')';
- inner_div.style.left = '0px';
- inner_div.style.top = '0px';
- }
-
- var class_div = document.createElement("div");
- class_div.className = classes;
- class_div.innerHTML = html;
-
- inner_div.appendChild(class_div);
- div.appendChild(inner_div);
- return div;
-};
-
-chart_labels.prototype.layout = function(e) {
- this.detachLabels_();
-
- var g = e.dygraph;
- var div = e.chart_div;
- if (g.getOption('title')) {
- // QUESTION: should this return an absolutely-positioned div instead?
- var title_rect = e.reserveSpaceTop(g.getOption('titleHeight'));
- this.title_div_ = createDivInRect(title_rect);
- this.title_div_.style.textAlign = 'center';
- this.title_div_.style.fontSize = (g.getOption('titleHeight') - 8) + 'px';
- this.title_div_.style.fontWeight = 'bold';
- this.title_div_.style.zIndex = 10;
-
- var class_div = document.createElement("div");
- class_div.className = 'dygraph-label dygraph-title';
- class_div.innerHTML = g.getOption('title');
- this.title_div_.appendChild(class_div);
- div.appendChild(this.title_div_);
- }
-
- if (g.getOption('xlabel')) {
- var x_rect = e.reserveSpaceBottom(g.getOption('xLabelHeight'));
- this.xlabel_div_ = createDivInRect(x_rect);
- this.xlabel_div_.style.textAlign = 'center';
- this.xlabel_div_.style.fontSize = (g.getOption('xLabelHeight') - 2) + 'px';
-
- var class_div = document.createElement("div");
- class_div.className = 'dygraph-label dygraph-xlabel';
- class_div.innerHTML = g.getOption('xlabel');
- this.xlabel_div_.appendChild(class_div);
- div.appendChild(this.xlabel_div_);
- }
-
- if (g.getOption('ylabel')) {
- // It would make sense to shift the chart here to make room for the y-axis
- // label, but the default yAxisLabelWidth is large enough that this results
- // in overly-padded charts. The y-axis label should fit fine. If it
- // doesn't, the yAxisLabelWidth option can be increased.
- var y_rect = e.reserveSpaceLeft(0);
-
- this.ylabel_div_ = createRotatedDiv(
- g, y_rect,
- 1, // primary (left) y-axis
- 'dygraph-label dygraph-ylabel',
- g.getOption('ylabel'));
- div.appendChild(this.ylabel_div_);
- }
-
- if (g.getOption('y2label') && g.numAxes() == 2) {
- // same logic applies here as for ylabel.
- var y2_rect = e.reserveSpaceRight(0);
- this.y2label_div_ = createRotatedDiv(
- g, y2_rect,
- 2, // secondary (right) y-axis
- 'dygraph-label dygraph-y2label',
- g.getOption('y2label'));
- div.appendChild(this.y2label_div_);
- }
-};
-
-chart_labels.prototype.didDrawChart = function(e) {
- var g = e.dygraph;
- if (this.title_div_) {
- this.title_div_.children[0].innerHTML = g.getOption('title');
- }
- if (this.xlabel_div_) {
- this.xlabel_div_.children[0].innerHTML = g.getOption('xlabel');
- }
- if (this.ylabel_div_) {
- this.ylabel_div_.children[0].children[0].innerHTML = g.getOption('ylabel');
- }
- if (this.y2label_div_) {
- this.y2label_div_.children[0].children[0].innerHTML = g.getOption('y2label');
- }
-};
-
-chart_labels.prototype.clearChart = function() {
-};
-
-chart_labels.prototype.destroy = function() {
- this.detachLabels_();
-};
-
-
-return chart_labels;
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/grid.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/grid.js
deleted file mode 100644
index 425d93f6..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/grid.js
+++ /dev/null
@@ -1,124 +0,0 @@
-/**
- * @license
- * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-/*global Dygraph:false */
-
-Dygraph.Plugins.Grid = (function() {
-
-/*
-
-Current bits of jankiness:
-- Direct layout access
-- Direct area access
-
-*/
-
-"use strict";
-
-
-/**
- * Draws the gridlines, i.e. the gray horizontal & vertical lines running the
- * length of the chart.
- *
- * @constructor
- */
-var grid = function() {
-};
-
-grid.prototype.toString = function() {
- return "Gridline Plugin";
-};
-
-grid.prototype.activate = function(g) {
- return {
- willDrawChart: this.willDrawChart
- };
-};
-
-grid.prototype.willDrawChart = function(e) {
- // Draw the new X/Y grid. Lines appear crisper when pixels are rounded to
- // half-integers. This prevents them from drawing in two rows/cols.
- var g = e.dygraph;
- var ctx = e.drawingContext;
- var layout = g.layout_;
- var area = e.dygraph.plotter_.area;
-
- function halfUp(x) { return Math.round(x) + 0.5; }
- function halfDown(y){ return Math.round(y) - 0.5; }
-
- var x, y, i, ticks;
- if (g.getOption('drawYGrid')) {
- var axes = ["y", "y2"];
- var strokeStyles = [], lineWidths = [], drawGrid = [], stroking = [], strokePattern = [];
- for (var i = 0; i < axes.length; i++) {
- drawGrid[i] = g.getOptionForAxis("drawGrid", axes[i]);
- if (drawGrid[i]) {
- strokeStyles[i] = g.getOptionForAxis('gridLineColor', axes[i]);
- lineWidths[i] = g.getOptionForAxis('gridLineWidth', axes[i]);
- strokePattern[i] = g.getOptionForAxis('gridLinePattern', axes[i]);
- stroking[i] = strokePattern[i] && (strokePattern[i].length >= 2);
- }
- }
- ticks = layout.yticks;
- ctx.save();
- // draw grids for the different y axes
- for (i = 0; i < ticks.length; i++) {
- var axis = ticks[i][0];
- if(drawGrid[axis]) {
- if (stroking[axis]) {
- ctx.installPattern(strokePattern[axis]);
- }
- ctx.strokeStyle = strokeStyles[axis];
- ctx.lineWidth = lineWidths[axis];
-
- x = halfUp(area.x);
- y = halfDown(area.y + ticks[i][1] * area.h);
- ctx.beginPath();
- ctx.moveTo(x, y);
- ctx.lineTo(x + area.w, y);
- ctx.closePath();
- ctx.stroke();
-
- if (stroking[axis]) {
- ctx.uninstallPattern();
- }
- }
- }
- ctx.restore();
- }
-
- // draw grid for x axis
- if (g.getOption('drawXGrid') && g.getOptionForAxis("drawGrid", 'x')) {
- ticks = layout.xticks;
- ctx.save();
- var strokePattern = g.getOptionForAxis('gridLinePattern', 'x');
- var stroking = strokePattern && (strokePattern.length >= 2);
- if (stroking) {
- ctx.installPattern(strokePattern);
- }
- ctx.strokeStyle = g.getOptionForAxis('gridLineColor', 'x');
- ctx.lineWidth = g.getOptionForAxis('gridLineWidth', 'x');
- for (i = 0; i < ticks.length; i++) {
- x = halfUp(area.x + ticks[i][0] * area.w);
- y = halfDown(area.y + area.h);
- ctx.beginPath();
- ctx.moveTo(x, y);
- ctx.lineTo(x, area.y);
- ctx.closePath();
- ctx.stroke();
- }
- if (stroking) {
- ctx.uninstallPattern();
- }
- ctx.restore();
- }
-};
-
-grid.prototype.destroy = function() {
-};
-
-return grid;
-
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/legend.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/legend.js
deleted file mode 100644
index 7406f82a..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/legend.js
+++ /dev/null
@@ -1,332 +0,0 @@
-/**
- * @license
- * Copyright 2012 Dan Vanderkam (danvdk@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-/*global Dygraph:false */
-
-Dygraph.Plugins.Legend = (function() {
-/*
-
-Current bits of jankiness:
-- Uses two private APIs:
- 1. Dygraph.optionsViewForAxis_
- 2. dygraph.plotter_.area
-- Registers for a "predraw" event, which should be renamed.
-- I call calculateEmWidthInDiv more often than needed.
-
-*/
-
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-"use strict";
-
-
-/**
- * Creates the legend, which appears when the user hovers over the chart.
- * The legend can be either a user-specified or generated div.
- *
- * @constructor
- */
-var legend = function() {
- this.legend_div_ = null;
- this.is_generated_div_ = false; // do we own this div, or was it user-specified?
-};
-
-legend.prototype.toString = function() {
- return "Legend Plugin";
-};
-
-// (defined below)
-var generateLegendHTML, generateLegendDashHTML;
-
-/**
- * This is called during the dygraph constructor, after options have been set
- * but before the data is available.
- *
- * Proper tasks to do here include:
- * - Reading your own options
- * - DOM manipulation
- * - Registering event listeners
- *
- * @param {Dygraph} g Graph instance.
- * @return {object.<string, function(ev)>} Mapping of event names to callbacks.
- */
-legend.prototype.activate = function(g) {
- var div;
- var divWidth = g.getOption('labelsDivWidth');
-
- var userLabelsDiv = g.getOption('labelsDiv');
- if (userLabelsDiv && null !== userLabelsDiv) {
- if (typeof(userLabelsDiv) == "string" || userLabelsDiv instanceof String) {
- div = document.getElementById(userLabelsDiv);
- } else {
- div = userLabelsDiv;
- }
- } else {
- // Default legend styles. These can be overridden in CSS by adding
- // "!important" after your rule, e.g. "left: 30px !important;"
- var messagestyle = {
- "position": "absolute",
- "fontSize": "14px",
- "zIndex": 10,
- "width": divWidth + "px",
- "top": "0px",
- "left": (g.size().width - divWidth - 2) + "px",
- "background": "white",
- "lineHeight": "normal",
- "textAlign": "left",
- "overflow": "hidden"};
-
- // TODO(danvk): get rid of labelsDivStyles? CSS is better.
- Dygraph.update(messagestyle, g.getOption('labelsDivStyles'));
- div = document.createElement("div");
- div.className = "dygraph-legend";
- for (var name in messagestyle) {
- if (!messagestyle.hasOwnProperty(name)) continue;
-
- try {
- div.style[name] = messagestyle[name];
- } catch (e) {
- this.warn("You are using unsupported css properties for your " +
- "browser in labelsDivStyles");
- }
- }
-
- // TODO(danvk): come up with a cleaner way to expose this.
- g.graphDiv.appendChild(div);
- this.is_generated_div_ = true;
- }
-
- this.legend_div_ = div;
- this.one_em_width_ = 10; // just a guess, will be updated.
-
- return {
- select: this.select,
- deselect: this.deselect,
- // TODO(danvk): rethink the name "predraw" before we commit to it in any API.
- predraw: this.predraw,
- didDrawChart: this.didDrawChart
- };
-};
-
-// Needed for dashed lines.
-var calculateEmWidthInDiv = function(div) {
- var sizeSpan = document.createElement('span');
- sizeSpan.setAttribute('style', 'margin: 0; padding: 0 0 0 1em; border: 0;');
- div.appendChild(sizeSpan);
- var oneEmWidth=sizeSpan.offsetWidth;
- div.removeChild(sizeSpan);
- return oneEmWidth;
-};
-
-legend.prototype.select = function(e) {
- var xValue = e.selectedX;
- var points = e.selectedPoints;
-
- var html = generateLegendHTML(e.dygraph, xValue, points, this.one_em_width_);
- this.legend_div_.innerHTML = html;
-};
-
-legend.prototype.deselect = function(e) {
- // Have to do this every time, since styles might have changed.
- var oneEmWidth = calculateEmWidthInDiv(this.legend_div_);
- this.one_em_width_ = oneEmWidth;
-
- var html = generateLegendHTML(e.dygraph, undefined, undefined, oneEmWidth);
- this.legend_div_.innerHTML = html;
-};
-
-legend.prototype.didDrawChart = function(e) {
- this.deselect(e);
-};
-
-// Right edge should be flush with the right edge of the charting area (which
-// may not be the same as the right edge of the div, if we have two y-axes.
-// TODO(danvk): is any of this really necessary? Could just set "right" in "activate".
-/**
- * Position the labels div so that:
- * - its right edge is flush with the right edge of the charting area
- * - its top edge is flush with the top edge of the charting area
- * @private
- */
-legend.prototype.predraw = function(e) {
- // Don't touch a user-specified labelsDiv.
- if (!this.is_generated_div_) return;
-
- // TODO(danvk): only use real APIs for this.
- e.dygraph.graphDiv.appendChild(this.legend_div_);
- var area = e.dygraph.plotter_.area;
- var labelsDivWidth = e.dygraph.getOption("labelsDivWidth");
- this.legend_div_.style.left = area.x + area.w - labelsDivWidth - 1 + "px";
- this.legend_div_.style.top = area.y + "px";
- this.legend_div_.style.width = labelsDivWidth + "px";
-};
-
-/**
- * Called when dygraph.destroy() is called.
- * You should null out any references and detach any DOM elements.
- */
-legend.prototype.destroy = function() {
- this.legend_div_ = null;
-};
-
-/**
- * @private
- * Generates HTML for the legend which is displayed when hovering over the
- * chart. If no selected points are specified, a default legend is returned
- * (this may just be the empty string).
- * @param { Number } [x] The x-value of the selected points.
- * @param { [Object] } [sel_points] List of selected points for the given
- * x-value. Should have properties like 'name', 'yval' and 'canvasy'.
- * @param { Number } [oneEmWidth] The pixel width for 1em in the legend. Only
- * relevant when displaying a legend with no selection (i.e. {legend:
- * 'always'}) and with dashed lines.
- */
-generateLegendHTML = function(g, x, sel_points, oneEmWidth) {
- // TODO(danvk): deprecate this option in place of {legend: 'never'}
- if (g.getOption('showLabelsOnHighlight') !== true) return '';
-
- // If no points are selected, we display a default legend. Traditionally,
- // this has been blank. But a better default would be a conventional legend,
- // which provides essential information for a non-interactive chart.
- var html, sepLines, i, dash, strokePattern;
- var labels = g.getLabels();
-
- if (typeof(x) === 'undefined') {
- if (g.getOption('legend') != 'always') {
- return '';
- }
-
- sepLines = g.getOption('labelsSeparateLines');
- html = '';
- for (i = 1; i < labels.length; i++) {
- var series = g.getPropertiesForSeries(labels[i]);
- if (!series.visible) continue;
-
- if (html !== '') html += (sepLines ? '<br/>' : ' ');
- strokePattern = g.getOption("strokePattern", labels[i]);
- dash = generateLegendDashHTML(strokePattern, series.color, oneEmWidth);
- html += "<span style='font-weight: bold; color: " + series.color + ";'>" +
- dash + " " + labels[i] + "</span>";
- }
- return html;
- }
-
- // TODO(danvk): remove this use of a private API
- var xOptView = g.optionsViewForAxis_('x');
- var xvf = xOptView('valueFormatter');
- html = xvf(x, xOptView, labels[0], g);
- if (html !== '') {
- html += ':';
- }
-
- var yOptViews = [];
- var num_axes = g.numAxes();
- for (i = 0; i < num_axes; i++) {
- // TODO(danvk): remove this use of a private API
- yOptViews[i] = g.optionsViewForAxis_('y' + (i ? 1 + i : ''));
- }
- var showZeros = g.getOption("labelsShowZeroValues");
- sepLines = g.getOption("labelsSeparateLines");
- var highlightSeries = g.getHighlightSeries();
- for (i = 0; i < sel_points.length; i++) {
- var pt = sel_points[i];
- if (pt.yval === 0 && !showZeros) continue;
- if (!Dygraph.isOK(pt.canvasy)) continue;
- if (sepLines) html += "<br/>";
-
- var series = g.getPropertiesForSeries(pt.name);
- var yOptView = yOptViews[series.axis - 1];
- var fmtFunc = yOptView('valueFormatter');
- var yval = fmtFunc(pt.yval, yOptView, pt.name, g);
-
- var cls = (pt.name == highlightSeries) ? " class='highlight'" : "";
-
- // TODO(danvk): use a template string here and make it an attribute.
- html += "<span" + cls + ">" + " <b><span style='color: " + series.color + ";'>" +
- pt.name + "</span></b>:&nbsp;" + yval + "</span>";
- }
- return html;
-};
-
-
-/**
- * Generates html for the "dash" displayed on the legend when using "legend: always".
- * In particular, this works for dashed lines with any stroke pattern. It will
- * try to scale the pattern to fit in 1em width. Or if small enough repeat the
- * pattern for 1em width.
- *
- * @param strokePattern The pattern
- * @param color The color of the series.
- * @param oneEmWidth The width in pixels of 1em in the legend.
- * @private
- */
-generateLegendDashHTML = function(strokePattern, color, oneEmWidth) {
- // IE 7,8 fail at these divs, so they get boring legend, have not tested 9.
- var isIE = (/MSIE/.test(navigator.userAgent) && !window.opera);
- if (isIE) return "&mdash;";
-
- // Easy, common case: a solid line
- if (!strokePattern || strokePattern.length <= 1) {
- return "<div style=\"display: inline-block; position: relative; " +
- "bottom: .5ex; padding-left: 1em; height: 1px; " +
- "border-bottom: 2px solid " + color + ";\"></div>";
- }
-
- var i, j, paddingLeft, marginRight;
- var strokePixelLength = 0, segmentLoop = 0;
- var normalizedPattern = [];
- var loop;
-
- // Compute the length of the pixels including the first segment twice,
- // since we repeat it.
- for (i = 0; i <= strokePattern.length; i++) {
- strokePixelLength += strokePattern[i%strokePattern.length];
- }
-
- // See if we can loop the pattern by itself at least twice.
- loop = Math.floor(oneEmWidth/(strokePixelLength-strokePattern[0]));
- if (loop > 1) {
- // This pattern fits at least two times, no scaling just convert to em;
- for (i = 0; i < strokePattern.length; i++) {
- normalizedPattern[i] = strokePattern[i]/oneEmWidth;
- }
- // Since we are repeating the pattern, we don't worry about repeating the
- // first segment in one draw.
- segmentLoop = normalizedPattern.length;
- } else {
- // If the pattern doesn't fit in the legend we scale it to fit.
- loop = 1;
- for (i = 0; i < strokePattern.length; i++) {
- normalizedPattern[i] = strokePattern[i]/strokePixelLength;
- }
- // For the scaled patterns we do redraw the first segment.
- segmentLoop = normalizedPattern.length+1;
- }
-
- // Now make the pattern.
- var dash = "";
- for (j = 0; j < loop; j++) {
- for (i = 0; i < segmentLoop; i+=2) {
- // The padding is the drawn segment.
- paddingLeft = normalizedPattern[i%normalizedPattern.length];
- if (i < strokePattern.length) {
- // The margin is the space segment.
- marginRight = normalizedPattern[(i+1)%normalizedPattern.length];
- } else {
- // The repeated first segment has no right margin.
- marginRight = 0;
- }
- dash += "<div style=\"display: inline-block; position: relative; " +
- "bottom: .5ex; margin-right: " + marginRight + "em; padding-left: " +
- paddingLeft + "em; height: 1px; border-bottom: 2px solid " + color +
- ";\"></div>";
- }
- }
- return dash;
-};
-
-
-return legend;
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/range-selector.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/range-selector.js
deleted file mode 100644
index 089e64aa..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/plugins/range-selector.js
+++ /dev/null
@@ -1,852 +0,0 @@
-/**
- * @license
- * Copyright 2011 Paul Felix (paul.eric.felix@gmail.com)
- * MIT-licensed (http://opensource.org/licenses/MIT)
- */
-/*global Dygraph:false,TouchEvent:false */
-
-/**
- * @fileoverview This file contains the RangeSelector plugin used to provide
- * a timeline range selector widget for dygraphs.
- */
-
-Dygraph.Plugins.RangeSelector = (function() {
-
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-"use strict";
-
-var rangeSelector = function() {
- this.isIE_ = /MSIE/.test(navigator.userAgent) && !window.opera;
- this.hasTouchInterface_ = typeof(TouchEvent) != 'undefined';
- this.isMobileDevice_ = /mobile|android/gi.test(navigator.appVersion);
- this.interfaceCreated_ = false;
-};
-
-rangeSelector.prototype.toString = function() {
- return "RangeSelector Plugin";
-};
-
-rangeSelector.prototype.activate = function(dygraph) {
- this.dygraph_ = dygraph;
- this.isUsingExcanvas_ = dygraph.isUsingExcanvas_;
- if (this.getOption_('showRangeSelector')) {
- this.createInterface_();
- }
- return {
- layout: this.reserveSpace_,
- predraw: this.renderStaticLayer_,
- didDrawChart: this.renderInteractiveLayer_
- };
-};
-
-rangeSelector.prototype.destroy = function() {
- this.bgcanvas_ = null;
- this.fgcanvas_ = null;
- this.leftZoomHandle_ = null;
- this.rightZoomHandle_ = null;
- this.iePanOverlay_ = null;
-};
-
-//------------------------------------------------------------------
-// Private methods
-//------------------------------------------------------------------
-
-rangeSelector.prototype.getOption_ = function(name) {
- return this.dygraph_.getOption(name);
-};
-
-rangeSelector.prototype.setDefaultOption_ = function(name, value) {
- return this.dygraph_.attrs_[name] = value;
-};
-
-/**
- * @private
- * Creates the range selector elements and adds them to the graph.
- */
-rangeSelector.prototype.createInterface_ = function() {
- this.createCanvases_();
- if (this.isUsingExcanvas_) {
- this.createIEPanOverlay_();
- }
- this.createZoomHandles_();
- this.initInteraction_();
-
- // Range selector and animatedZooms have a bad interaction. See issue 359.
- if (this.getOption_('animatedZooms')) {
- this.dygraph_.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.');
- this.dygraph_.updateOptions({animatedZooms: false}, true);
- }
-
- this.interfaceCreated_ = true;
- this.addToGraph_();
-};
-
-/**
- * @private
- * Adds the range selector to the graph.
- */
-rangeSelector.prototype.addToGraph_ = function() {
- var graphDiv = this.graphDiv_ = this.dygraph_.graphDiv;
- graphDiv.appendChild(this.bgcanvas_);
- graphDiv.appendChild(this.fgcanvas_);
- graphDiv.appendChild(this.leftZoomHandle_);
- graphDiv.appendChild(this.rightZoomHandle_);
-};
-
-/**
- * @private
- * Removes the range selector from the graph.
- */
-rangeSelector.prototype.removeFromGraph_ = function() {
- var graphDiv = this.graphDiv_;
- graphDiv.removeChild(this.bgcanvas_);
- graphDiv.removeChild(this.fgcanvas_);
- graphDiv.removeChild(this.leftZoomHandle_);
- graphDiv.removeChild(this.rightZoomHandle_);
- this.graphDiv_ = null;
-};
-
-/**
- * @private
- * Called by Layout to allow range selector to reserve its space.
- */
-rangeSelector.prototype.reserveSpace_ = function(e) {
- if (this.getOption_('showRangeSelector')) {
- e.reserveSpaceBottom(this.getOption_('rangeSelectorHeight') + 4);
- }
-};
-
-/**
- * @private
- * Renders the static portion of the range selector at the predraw stage.
- */
-rangeSelector.prototype.renderStaticLayer_ = function() {
- if (!this.updateVisibility_()) {
- return;
- }
- this.resize_();
- this.drawStaticLayer_();
-};
-
-/**
- * @private
- * Renders the interactive portion of the range selector after the chart has been drawn.
- */
-rangeSelector.prototype.renderInteractiveLayer_ = function() {
- if (!this.updateVisibility_() || this.isChangingRange_) {
- return;
- }
- this.placeZoomHandles_();
- this.drawInteractiveLayer_();
-};
-
-/**
- * @private
- * Check to see if the range selector is enabled/disabled and update visibility accordingly.
- */
-rangeSelector.prototype.updateVisibility_ = function() {
- var enabled = this.getOption_('showRangeSelector');
- if (enabled) {
- if (!this.interfaceCreated_) {
- this.createInterface_();
- } else if (!this.graphDiv_ || !this.graphDiv_.parentNode) {
- this.addToGraph_();
- }
- } else if (this.graphDiv_) {
- this.removeFromGraph_();
- var dygraph = this.dygraph_;
- setTimeout(function() { dygraph.width_ = 0; dygraph.resize(); }, 1);
- }
- return enabled;
-};
-
-/**
- * @private
- * Resizes the range selector.
- */
-rangeSelector.prototype.resize_ = function() {
- function setElementRect(canvas, rect) {
- canvas.style.top = rect.y + 'px';
- canvas.style.left = rect.x + 'px';
- canvas.width = rect.w;
- canvas.height = rect.h;
- canvas.style.width = canvas.width + 'px'; // for IE
- canvas.style.height = canvas.height + 'px'; // for IE
- }
-
- var plotArea = this.dygraph_.layout_.getPlotArea();
-
- var xAxisLabelHeight = 0;
- if(this.getOption_('drawXAxis')){
- xAxisLabelHeight = this.getOption_('xAxisHeight') || (this.getOption_('axisLabelFontSize') + 2 * this.getOption_('axisTickSize'));
- }
- this.canvasRect_ = {
- x: plotArea.x,
- y: plotArea.y + plotArea.h + xAxisLabelHeight + 4,
- w: plotArea.w,
- h: this.getOption_('rangeSelectorHeight')
- };
-
- setElementRect(this.bgcanvas_, this.canvasRect_);
- setElementRect(this.fgcanvas_, this.canvasRect_);
-};
-
-/**
- * @private
- * Creates the background and foreground canvases.
- */
-rangeSelector.prototype.createCanvases_ = function() {
- this.bgcanvas_ = Dygraph.createCanvas();
- this.bgcanvas_.className = 'dygraph-rangesel-bgcanvas';
- this.bgcanvas_.style.position = 'absolute';
- this.bgcanvas_.style.zIndex = 9;
- this.bgcanvas_ctx_ = Dygraph.getContext(this.bgcanvas_);
-
- this.fgcanvas_ = Dygraph.createCanvas();
- this.fgcanvas_.className = 'dygraph-rangesel-fgcanvas';
- this.fgcanvas_.style.position = 'absolute';
- this.fgcanvas_.style.zIndex = 9;
- this.fgcanvas_.style.cursor = 'default';
- this.fgcanvas_ctx_ = Dygraph.getContext(this.fgcanvas_);
-};
-
-/**
- * @private
- * Creates overlay divs for IE/Excanvas so that mouse events are handled properly.
- */
-rangeSelector.prototype.createIEPanOverlay_ = function() {
- this.iePanOverlay_ = document.createElement("div");
- this.iePanOverlay_.style.position = 'absolute';
- this.iePanOverlay_.style.backgroundColor = 'white';
- this.iePanOverlay_.style.filter = 'alpha(opacity=0)';
- this.iePanOverlay_.style.display = 'none';
- this.iePanOverlay_.style.cursor = 'move';
- this.fgcanvas_.appendChild(this.iePanOverlay_);
-};
-
-/**
- * @private
- * Creates the zoom handle elements.
- */
-rangeSelector.prototype.createZoomHandles_ = function() {
- var img = new Image();
- img.className = 'dygraph-rangesel-zoomhandle';
- img.style.position = 'absolute';
- img.style.zIndex = 10;
- img.style.visibility = 'hidden'; // Initially hidden so they don't show up in the wrong place.
- img.style.cursor = 'col-resize';
-
- if (/MSIE 7/.test(navigator.userAgent)) { // IE7 doesn't support embedded src data.
- img.width = 7;
- img.height = 14;
- img.style.backgroundColor = 'white';
- img.style.border = '1px solid #333333'; // Just show box in IE7.
- } else {
- img.width = 9;
- img.height = 16;
- img.src = 'data:image/png;base64,' +
-'iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAA' +
-'zwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENv' +
-'bW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl' +
-'6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7s' +
-'qSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII=';
- }
-
- if (this.isMobileDevice_) {
- img.width *= 2;
- img.height *= 2;
- }
-
- this.leftZoomHandle_ = img;
- this.rightZoomHandle_ = img.cloneNode(false);
-};
-
-/**
- * @private
- * Sets up the interaction for the range selector.
- */
-rangeSelector.prototype.initInteraction_ = function() {
- var self = this;
- var topElem = this.isIE_ ? document : window;
- var clientXLast = 0;
- var handle = null;
- var isZooming = false;
- var isPanning = false;
- var dynamic = !this.isMobileDevice_ && !this.isUsingExcanvas_;
-
- // We cover iframes during mouse interactions. See comments in
- // dygraph-utils.js for more info on why this is a good idea.
- var tarp = new Dygraph.IFrameTarp();
-
- // functions, defined below. Defining them this way (rather than with
- // "function foo() {...}" makes JSHint happy.
- var toXDataWindow, onZoomStart, onZoom, onZoomEnd, doZoom, isMouseInPanZone,
- onPanStart, onPan, onPanEnd, doPan, onCanvasHover;
-
- // Touch event functions
- var onZoomHandleTouchEvent, onCanvasTouchEvent, addTouchEvents;
-
- toXDataWindow = function(zoomHandleStatus) {
- var xDataLimits = self.dygraph_.xAxisExtremes();
- var fact = (xDataLimits[1] - xDataLimits[0])/self.canvasRect_.w;
- var xDataMin = xDataLimits[0] + (zoomHandleStatus.leftHandlePos - self.canvasRect_.x)*fact;
- var xDataMax = xDataLimits[0] + (zoomHandleStatus.rightHandlePos - self.canvasRect_.x)*fact;
- return [xDataMin, xDataMax];
- };
-
- onZoomStart = function(e) {
- Dygraph.cancelEvent(e);
- isZooming = true;
- clientXLast = e.clientX;
- handle = e.target ? e.target : e.srcElement;
- if (e.type === 'mousedown' || e.type === 'dragstart') {
- // These events are removed manually.
- Dygraph.addEvent(topElem, 'mousemove', onZoom);
- Dygraph.addEvent(topElem, 'mouseup', onZoomEnd);
- }
- self.fgcanvas_.style.cursor = 'col-resize';
- tarp.cover();
- return true;
- };
-
- onZoom = function(e) {
- if (!isZooming) {
- return false;
- }
- Dygraph.cancelEvent(e);
-
- var delX = e.clientX - clientXLast;
- if (Math.abs(delX) < 4) {
- return true;
- }
- clientXLast = e.clientX;
-
- // Move handle.
- var zoomHandleStatus = self.getZoomHandleStatus_();
- var newPos;
- if (handle == self.leftZoomHandle_) {
- newPos = zoomHandleStatus.leftHandlePos + delX;
- newPos = Math.min(newPos, zoomHandleStatus.rightHandlePos - handle.width - 3);
- newPos = Math.max(newPos, self.canvasRect_.x);
- } else {
- newPos = zoomHandleStatus.rightHandlePos + delX;
- newPos = Math.min(newPos, self.canvasRect_.x + self.canvasRect_.w);
- newPos = Math.max(newPos, zoomHandleStatus.leftHandlePos + handle.width + 3);
- }
- var halfHandleWidth = handle.width/2;
- handle.style.left = (newPos - halfHandleWidth) + 'px';
- self.drawInteractiveLayer_();
-
- // Zoom on the fly (if not using excanvas).
- if (dynamic) {
- doZoom();
- }
- return true;
- };
-
- onZoomEnd = function(e) {
- if (!isZooming) {
- return false;
- }
- isZooming = false;
- tarp.uncover();
- Dygraph.removeEvent(topElem, 'mousemove', onZoom);
- Dygraph.removeEvent(topElem, 'mouseup', onZoomEnd);
- self.fgcanvas_.style.cursor = 'default';
-
- // If using excanvas, Zoom now.
- if (!dynamic) {
- doZoom();
- }
- return true;
- };
-
- doZoom = function() {
- try {
- var zoomHandleStatus = self.getZoomHandleStatus_();
- self.isChangingRange_ = true;
- if (!zoomHandleStatus.isZoomed) {
- self.dygraph_.resetZoom();
- } else {
- var xDataWindow = toXDataWindow(zoomHandleStatus);
- self.dygraph_.doZoomXDates_(xDataWindow[0], xDataWindow[1]);
- }
- } finally {
- self.isChangingRange_ = false;
- }
- };
-
- isMouseInPanZone = function(e) {
- if (self.isUsingExcanvas_) {
- return e.srcElement == self.iePanOverlay_;
- } else {
- var rect = self.leftZoomHandle_.getBoundingClientRect();
- var leftHandleClientX = rect.left + rect.width/2;
- rect = self.rightZoomHandle_.getBoundingClientRect();
- var rightHandleClientX = rect.left + rect.width/2;
- return (e.clientX > leftHandleClientX && e.clientX < rightHandleClientX);
- }
- };
-
- onPanStart = function(e) {
- if (!isPanning && isMouseInPanZone(e) && self.getZoomHandleStatus_().isZoomed) {
- Dygraph.cancelEvent(e);
- isPanning = true;
- clientXLast = e.clientX;
- if (e.type === 'mousedown') {
- // These events are removed manually.
- Dygraph.addEvent(topElem, 'mousemove', onPan);
- Dygraph.addEvent(topElem, 'mouseup', onPanEnd);
- }
- return true;
- }
- return false;
- };
-
- onPan = function(e) {
- if (!isPanning) {
- return false;
- }
- Dygraph.cancelEvent(e);
-
- var delX = e.clientX - clientXLast;
- if (Math.abs(delX) < 4) {
- return true;
- }
- clientXLast = e.clientX;
-
- // Move range view
- var zoomHandleStatus = self.getZoomHandleStatus_();
- var leftHandlePos = zoomHandleStatus.leftHandlePos;
- var rightHandlePos = zoomHandleStatus.rightHandlePos;
- var rangeSize = rightHandlePos - leftHandlePos;
- if (leftHandlePos + delX <= self.canvasRect_.x) {
- leftHandlePos = self.canvasRect_.x;
- rightHandlePos = leftHandlePos + rangeSize;
- } else if (rightHandlePos + delX >= self.canvasRect_.x + self.canvasRect_.w) {
- rightHandlePos = self.canvasRect_.x + self.canvasRect_.w;
- leftHandlePos = rightHandlePos - rangeSize;
- } else {
- leftHandlePos += delX;
- rightHandlePos += delX;
- }
- var halfHandleWidth = self.leftZoomHandle_.width/2;
- self.leftZoomHandle_.style.left = (leftHandlePos - halfHandleWidth) + 'px';
- self.rightZoomHandle_.style.left = (rightHandlePos - halfHandleWidth) + 'px';
- self.drawInteractiveLayer_();
-
- // Do pan on the fly (if not using excanvas).
- if (dynamic) {
- doPan();
- }
- return true;
- };
-
- onPanEnd = function(e) {
- if (!isPanning) {
- return false;
- }
- isPanning = false;
- Dygraph.removeEvent(topElem, 'mousemove', onPan);
- Dygraph.removeEvent(topElem, 'mouseup', onPanEnd);
- // If using excanvas, do pan now.
- if (!dynamic) {
- doPan();
- }
- return true;
- };
-
- doPan = function() {
- try {
- self.isChangingRange_ = true;
- self.dygraph_.dateWindow_ = toXDataWindow(self.getZoomHandleStatus_());
- self.dygraph_.drawGraph_(false);
- } finally {
- self.isChangingRange_ = false;
- }
- };
-
- onCanvasHover = function(e) {
- if (isZooming || isPanning) {
- return;
- }
- var cursor = isMouseInPanZone(e) ? 'move' : 'default';
- if (cursor != self.fgcanvas_.style.cursor) {
- self.fgcanvas_.style.cursor = cursor;
- }
- };
-
- onZoomHandleTouchEvent = function(e) {
- if (e.type == 'touchstart' && e.targetTouches.length == 1) {
- if (onZoomStart(e.targetTouches[0])) {
- Dygraph.cancelEvent(e);
- }
- } else if (e.type == 'touchmove' && e.targetTouches.length == 1) {
- if (onZoom(e.targetTouches[0])) {
- Dygraph.cancelEvent(e);
- }
- } else {
- onZoomEnd(e);
- }
- };
-
- onCanvasTouchEvent = function(e) {
- if (e.type == 'touchstart' && e.targetTouches.length == 1) {
- if (onPanStart(e.targetTouches[0])) {
- Dygraph.cancelEvent(e);
- }
- } else if (e.type == 'touchmove' && e.targetTouches.length == 1) {
- if (onPan(e.targetTouches[0])) {
- Dygraph.cancelEvent(e);
- }
- } else {
- onPanEnd(e);
- }
- };
-
- addTouchEvents = function(elem, fn) {
- var types = ['touchstart', 'touchend', 'touchmove', 'touchcancel'];
- for (var i = 0; i < types.length; i++) {
- self.dygraph_.addAndTrackEvent(elem, types[i], fn);
- }
- };
-
- this.setDefaultOption_('interactionModel', Dygraph.Interaction.dragIsPanInteractionModel);
- this.setDefaultOption_('panEdgeFraction', 0.0001);
-
- var dragStartEvent = window.opera ? 'mousedown' : 'dragstart';
- this.dygraph_.addAndTrackEvent(this.leftZoomHandle_, dragStartEvent, onZoomStart);
- this.dygraph_.addAndTrackEvent(this.rightZoomHandle_, dragStartEvent, onZoomStart);
-
- if (this.isUsingExcanvas_) {
- this.dygraph_.addAndTrackEvent(this.iePanOverlay_, 'mousedown', onPanStart);
- } else {
- this.dygraph_.addAndTrackEvent(this.fgcanvas_, 'mousedown', onPanStart);
- this.dygraph_.addAndTrackEvent(this.fgcanvas_, 'mousemove', onCanvasHover);
- }
-
- // Touch events
- if (this.hasTouchInterface_) {
- addTouchEvents(this.leftZoomHandle_, onZoomHandleTouchEvent);
- addTouchEvents(this.rightZoomHandle_, onZoomHandleTouchEvent);
- addTouchEvents(this.fgcanvas_, onCanvasTouchEvent);
- }
-};
-
-/**
- * @private
- * Draws the static layer in the background canvas.
- */
-rangeSelector.prototype.drawStaticLayer_ = function() {
- var ctx = this.bgcanvas_ctx_;
- ctx.clearRect(0, 0, this.canvasRect_.w, this.canvasRect_.h);
- try {
- this.drawMiniPlot_();
- } catch(ex) {
- Dygraph.warn(ex);
- }
-
- var margin = 0.5;
- this.bgcanvas_ctx_.lineWidth = 1;
- ctx.strokeStyle = 'gray';
- ctx.beginPath();
- ctx.moveTo(margin, margin);
- ctx.lineTo(margin, this.canvasRect_.h-margin);
- ctx.lineTo(this.canvasRect_.w-margin, this.canvasRect_.h-margin);
- ctx.lineTo(this.canvasRect_.w-margin, margin);
- ctx.stroke();
-};
-
-
-/**
- * @private
- * Draws the mini plot in the background canvas.
- */
-rangeSelector.prototype.drawMiniPlot_ = function() {
- var fillStyle = this.getOption_('rangeSelectorPlotFillColor');
- var strokeStyle = this.getOption_('rangeSelectorPlotStrokeColor');
- if (!fillStyle && !strokeStyle) {
- return;
- }
-
- var stepPlot = this.getOption_('stepPlot');
-
- var combinedSeriesData = this.computeCombinedSeriesAndLimits_();
- var yRange = combinedSeriesData.yMax - combinedSeriesData.yMin;
-
- // Draw the mini plot.
- var ctx = this.bgcanvas_ctx_;
- var margin = 0.5;
-
- var xExtremes = this.dygraph_.xAxisExtremes();
- var xRange = Math.max(xExtremes[1] - xExtremes[0], 1.e-30);
- var xFact = (this.canvasRect_.w - margin)/xRange;
- var yFact = (this.canvasRect_.h - margin)/yRange;
- var canvasWidth = this.canvasRect_.w - margin;
- var canvasHeight = this.canvasRect_.h - margin;
-
- var prevX = null, prevY = null;
-
- ctx.beginPath();
- ctx.moveTo(margin, canvasHeight);
- for (var i = 0; i < combinedSeriesData.data.length; i++) {
- var dataPoint = combinedSeriesData.data[i];
- var x = ((dataPoint[0] !== null) ? ((dataPoint[0] - xExtremes[0])*xFact) : NaN);
- var y = ((dataPoint[1] !== null) ? (canvasHeight - (dataPoint[1] - combinedSeriesData.yMin)*yFact) : NaN);
- if (isFinite(x) && isFinite(y)) {
- if(prevX === null) {
- ctx.lineTo(x, canvasHeight);
- }
- else if (stepPlot) {
- ctx.lineTo(x, prevY);
- }
- ctx.lineTo(x, y);
- prevX = x;
- prevY = y;
- }
- else {
- if(prevX !== null) {
- if (stepPlot) {
- ctx.lineTo(x, prevY);
- ctx.lineTo(x, canvasHeight);
- }
- else {
- ctx.lineTo(prevX, canvasHeight);
- }
- }
- prevX = prevY = null;
- }
- }
- ctx.lineTo(canvasWidth, canvasHeight);
- ctx.closePath();
-
- if (fillStyle) {
- var lingrad = this.bgcanvas_ctx_.createLinearGradient(0, 0, 0, canvasHeight);
- lingrad.addColorStop(0, 'white');
- lingrad.addColorStop(1, fillStyle);
- this.bgcanvas_ctx_.fillStyle = lingrad;
- ctx.fill();
- }
-
- if (strokeStyle) {
- this.bgcanvas_ctx_.strokeStyle = strokeStyle;
- this.bgcanvas_ctx_.lineWidth = 1.5;
- ctx.stroke();
- }
-};
-
-/**
- * @private
- * Computes and returns the combinded series data along with min/max for the mini plot.
- * @return {Object} An object containing combinded series array, ymin, ymax.
- */
-rangeSelector.prototype.computeCombinedSeriesAndLimits_ = function() {
- var data = this.dygraph_.rawData_;
- var logscale = this.getOption_('logscale');
-
- // Create a combined series (average of all series values).
- var combinedSeries = [];
- var sum;
- var count;
- var mutipleValues;
- var i, j, k;
- var xVal, yVal;
-
- // Find out if data has multiple values per datapoint.
- // Go to first data point that actually has values (see http://code.google.com/p/dygraphs/issues/detail?id=246)
- for (i = 0; i < data.length; i++) {
- if (data[i].length > 1 && data[i][1] !== null) {
- mutipleValues = typeof data[i][1] != 'number';
- if (mutipleValues) {
- sum = [];
- count = [];
- for (k = 0; k < data[i][1].length; k++) {
- sum.push(0);
- count.push(0);
- }
- }
- break;
- }
- }
-
- for (i = 0; i < data.length; i++) {
- var dataPoint = data[i];
- xVal = dataPoint[0];
-
- if (mutipleValues) {
- for (k = 0; k < sum.length; k++) {
- sum[k] = count[k] = 0;
- }
- } else {
- sum = count = 0;
- }
-
- for (j = 1; j < dataPoint.length; j++) {
- if (this.dygraph_.visibility()[j-1]) {
- var y;
- if (mutipleValues) {
- for (k = 0; k < sum.length; k++) {
- y = dataPoint[j][k];
- if (y === null || isNaN(y)) continue;
- sum[k] += y;
- count[k]++;
- }
- } else {
- y = dataPoint[j];
- if (y === null || isNaN(y)) continue;
- sum += y;
- count++;
- }
- }
- }
-
- if (mutipleValues) {
- for (k = 0; k < sum.length; k++) {
- sum[k] /= count[k];
- }
- yVal = sum.slice(0);
- } else {
- yVal = sum/count;
- }
-
- combinedSeries.push([xVal, yVal]);
- }
-
- // Account for roll period, fractions.
- combinedSeries = this.dygraph_.rollingAverage(combinedSeries, this.dygraph_.rollPeriod_);
-
- if (typeof combinedSeries[0][1] != 'number') {
- for (i = 0; i < combinedSeries.length; i++) {
- yVal = combinedSeries[i][1];
- combinedSeries[i][1] = yVal[0];
- }
- }
-
- // Compute the y range.
- var yMin = Number.MAX_VALUE;
- var yMax = -Number.MAX_VALUE;
- for (i = 0; i < combinedSeries.length; i++) {
- yVal = combinedSeries[i][1];
- if (yVal !== null && isFinite(yVal) && (!logscale || yVal > 0)) {
- yMin = Math.min(yMin, yVal);
- yMax = Math.max(yMax, yVal);
- }
- }
-
- // Convert Y data to log scale if needed.
- // Also, expand the Y range to compress the mini plot a little.
- var extraPercent = 0.25;
- if (logscale) {
- yMax = Dygraph.log10(yMax);
- yMax += yMax*extraPercent;
- yMin = Dygraph.log10(yMin);
- for (i = 0; i < combinedSeries.length; i++) {
- combinedSeries[i][1] = Dygraph.log10(combinedSeries[i][1]);
- }
- } else {
- var yExtra;
- var yRange = yMax - yMin;
- if (yRange <= Number.MIN_VALUE) {
- yExtra = yMax*extraPercent;
- } else {
- yExtra = yRange*extraPercent;
- }
- yMax += yExtra;
- yMin -= yExtra;
- }
-
- return {data: combinedSeries, yMin: yMin, yMax: yMax};
-};
-
-/**
- * @private
- * Places the zoom handles in the proper position based on the current X data window.
- */
-rangeSelector.prototype.placeZoomHandles_ = function() {
- var xExtremes = this.dygraph_.xAxisExtremes();
- var xWindowLimits = this.dygraph_.xAxisRange();
- var xRange = xExtremes[1] - xExtremes[0];
- var leftPercent = Math.max(0, (xWindowLimits[0] - xExtremes[0])/xRange);
- var rightPercent = Math.max(0, (xExtremes[1] - xWindowLimits[1])/xRange);
- var leftCoord = this.canvasRect_.x + this.canvasRect_.w*leftPercent;
- var rightCoord = this.canvasRect_.x + this.canvasRect_.w*(1 - rightPercent);
- var handleTop = Math.max(this.canvasRect_.y, this.canvasRect_.y + (this.canvasRect_.h - this.leftZoomHandle_.height)/2);
- var halfHandleWidth = this.leftZoomHandle_.width/2;
- this.leftZoomHandle_.style.left = (leftCoord - halfHandleWidth) + 'px';
- this.leftZoomHandle_.style.top = handleTop + 'px';
- this.rightZoomHandle_.style.left = (rightCoord - halfHandleWidth) + 'px';
- this.rightZoomHandle_.style.top = this.leftZoomHandle_.style.top;
-
- this.leftZoomHandle_.style.visibility = 'visible';
- this.rightZoomHandle_.style.visibility = 'visible';
-};
-
-/**
- * @private
- * Draws the interactive layer in the foreground canvas.
- */
-rangeSelector.prototype.drawInteractiveLayer_ = function() {
- var ctx = this.fgcanvas_ctx_;
- ctx.clearRect(0, 0, this.canvasRect_.w, this.canvasRect_.h);
- var margin = 1;
- var width = this.canvasRect_.w - margin;
- var height = this.canvasRect_.h - margin;
- var zoomHandleStatus = this.getZoomHandleStatus_();
-
- ctx.strokeStyle = 'black';
- if (!zoomHandleStatus.isZoomed) {
- ctx.beginPath();
- ctx.moveTo(margin, margin);
- ctx.lineTo(margin, height);
- ctx.lineTo(width, height);
- ctx.lineTo(width, margin);
- ctx.stroke();
- if (this.iePanOverlay_) {
- this.iePanOverlay_.style.display = 'none';
- }
- } else {
- var leftHandleCanvasPos = Math.max(margin, zoomHandleStatus.leftHandlePos - this.canvasRect_.x);
- var rightHandleCanvasPos = Math.min(width, zoomHandleStatus.rightHandlePos - this.canvasRect_.x);
-
- ctx.fillStyle = 'rgba(240, 240, 240, 0.6)';
- ctx.fillRect(0, 0, leftHandleCanvasPos, this.canvasRect_.h);
- ctx.fillRect(rightHandleCanvasPos, 0, this.canvasRect_.w - rightHandleCanvasPos, this.canvasRect_.h);
-
- ctx.beginPath();
- ctx.moveTo(margin, margin);
- ctx.lineTo(leftHandleCanvasPos, margin);
- ctx.lineTo(leftHandleCanvasPos, height);
- ctx.lineTo(rightHandleCanvasPos, height);
- ctx.lineTo(rightHandleCanvasPos, margin);
- ctx.lineTo(width, margin);
- ctx.stroke();
-
- if (this.isUsingExcanvas_) {
- this.iePanOverlay_.style.width = (rightHandleCanvasPos - leftHandleCanvasPos) + 'px';
- this.iePanOverlay_.style.left = leftHandleCanvasPos + 'px';
- this.iePanOverlay_.style.height = height + 'px';
- this.iePanOverlay_.style.display = 'inline';
- }
- }
-};
-
-/**
- * @private
- * Returns the current zoom handle position information.
- * @return {Object} The zoom handle status.
- */
-rangeSelector.prototype.getZoomHandleStatus_ = function() {
- var halfHandleWidth = this.leftZoomHandle_.width/2;
- var leftHandlePos = parseFloat(this.leftZoomHandle_.style.left) + halfHandleWidth;
- var rightHandlePos = parseFloat(this.rightZoomHandle_.style.left) + halfHandleWidth;
- return {
- leftHandlePos: leftHandlePos,
- rightHandlePos: rightHandlePos,
- isZoomed: (leftHandlePos - 1 > this.canvasRect_.x || rightHandlePos + 1 < this.canvasRect_.x+this.canvasRect_.w)
- };
-};
-
-return rangeSelector;
-
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/rgbcolor/rgbcolor.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/rgbcolor/rgbcolor.js
deleted file mode 100644
index 5a882446..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/rgbcolor/rgbcolor.js
+++ /dev/null
@@ -1,257 +0,0 @@
-/**
- * A class to parse color values
- *
- * NOTE: modified by danvk. I removed the "getHelpXML" function to reduce the
- * file size, added "use strict" and a few "var" declarations where needed.
- *
- * Modifications by adilh:
- * Original "RGBColor" function name collides with:
- * http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-RGBColor
- * so renamed to "RGBColorParser"
- *
- * @author Stoyan Stefanov <sstoo@gmail.com>
- * @link http://www.phpied.com/rgb-color-parser-in-javascript/
- * @license Use it if you like it
- */
-"use strict";
-
-function RGBColorParser(color_string)
-{
- this.ok = false;
-
- // strip any leading #
- if (color_string.charAt(0) == '#') { // remove # if any
- color_string = color_string.substr(1,6);
- }
-
- color_string = color_string.replace(/ /g,'');
- color_string = color_string.toLowerCase();
-
- // before getting into regexps, try simple matches
- // and overwrite the input
- var simple_colors = {
- aliceblue: 'f0f8ff',
- antiquewhite: 'faebd7',
- aqua: '00ffff',
- aquamarine: '7fffd4',
- azure: 'f0ffff',
- beige: 'f5f5dc',
- bisque: 'ffe4c4',
- black: '000000',
- blanchedalmond: 'ffebcd',
- blue: '0000ff',
- blueviolet: '8a2be2',
- brown: 'a52a2a',
- burlywood: 'deb887',
- cadetblue: '5f9ea0',
- chartreuse: '7fff00',
- chocolate: 'd2691e',
- coral: 'ff7f50',
- cornflowerblue: '6495ed',
- cornsilk: 'fff8dc',
- crimson: 'dc143c',
- cyan: '00ffff',
- darkblue: '00008b',
- darkcyan: '008b8b',
- darkgoldenrod: 'b8860b',
- darkgray: 'a9a9a9',
- darkgreen: '006400',
- darkkhaki: 'bdb76b',
- darkmagenta: '8b008b',
- darkolivegreen: '556b2f',
- darkorange: 'ff8c00',
- darkorchid: '9932cc',
- darkred: '8b0000',
- darksalmon: 'e9967a',
- darkseagreen: '8fbc8f',
- darkslateblue: '483d8b',
- darkslategray: '2f4f4f',
- darkturquoise: '00ced1',
- darkviolet: '9400d3',
- deeppink: 'ff1493',
- deepskyblue: '00bfff',
- dimgray: '696969',
- dodgerblue: '1e90ff',
- feldspar: 'd19275',
- firebrick: 'b22222',
- floralwhite: 'fffaf0',
- forestgreen: '228b22',
- fuchsia: 'ff00ff',
- gainsboro: 'dcdcdc',
- ghostwhite: 'f8f8ff',
- gold: 'ffd700',
- goldenrod: 'daa520',
- gray: '808080',
- green: '008000',
- greenyellow: 'adff2f',
- honeydew: 'f0fff0',
- hotpink: 'ff69b4',
- indianred : 'cd5c5c',
- indigo : '4b0082',
- ivory: 'fffff0',
- khaki: 'f0e68c',
- lavender: 'e6e6fa',
- lavenderblush: 'fff0f5',
- lawngreen: '7cfc00',
- lemonchiffon: 'fffacd',
- lightblue: 'add8e6',
- lightcoral: 'f08080',
- lightcyan: 'e0ffff',
- lightgoldenrodyellow: 'fafad2',
- lightgrey: 'd3d3d3',
- lightgreen: '90ee90',
- lightpink: 'ffb6c1',
- lightsalmon: 'ffa07a',
- lightseagreen: '20b2aa',
- lightskyblue: '87cefa',
- lightslateblue: '8470ff',
- lightslategray: '778899',
- lightsteelblue: 'b0c4de',
- lightyellow: 'ffffe0',
- lime: '00ff00',
- limegreen: '32cd32',
- linen: 'faf0e6',
- magenta: 'ff00ff',
- maroon: '800000',
- mediumaquamarine: '66cdaa',
- mediumblue: '0000cd',
- mediumorchid: 'ba55d3',
- mediumpurple: '9370d8',
- mediumseagreen: '3cb371',
- mediumslateblue: '7b68ee',
- mediumspringgreen: '00fa9a',
- mediumturquoise: '48d1cc',
- mediumvioletred: 'c71585',
- midnightblue: '191970',
- mintcream: 'f5fffa',
- mistyrose: 'ffe4e1',
- moccasin: 'ffe4b5',
- navajowhite: 'ffdead',
- navy: '000080',
- oldlace: 'fdf5e6',
- olive: '808000',
- olivedrab: '6b8e23',
- orange: 'ffa500',
- orangered: 'ff4500',
- orchid: 'da70d6',
- palegoldenrod: 'eee8aa',
- palegreen: '98fb98',
- paleturquoise: 'afeeee',
- palevioletred: 'd87093',
- papayawhip: 'ffefd5',
- peachpuff: 'ffdab9',
- peru: 'cd853f',
- pink: 'ffc0cb',
- plum: 'dda0dd',
- powderblue: 'b0e0e6',
- purple: '800080',
- red: 'ff0000',
- rosybrown: 'bc8f8f',
- royalblue: '4169e1',
- saddlebrown: '8b4513',
- salmon: 'fa8072',
- sandybrown: 'f4a460',
- seagreen: '2e8b57',
- seashell: 'fff5ee',
- sienna: 'a0522d',
- silver: 'c0c0c0',
- skyblue: '87ceeb',
- slateblue: '6a5acd',
- slategray: '708090',
- snow: 'fffafa',
- springgreen: '00ff7f',
- steelblue: '4682b4',
- tan: 'd2b48c',
- teal: '008080',
- thistle: 'd8bfd8',
- tomato: 'ff6347',
- turquoise: '40e0d0',
- violet: 'ee82ee',
- violetred: 'd02090',
- wheat: 'f5deb3',
- white: 'ffffff',
- whitesmoke: 'f5f5f5',
- yellow: 'ffff00',
- yellowgreen: '9acd32'
- };
- for (var key in simple_colors) {
- if (color_string == key) {
- color_string = simple_colors[key];
- }
- }
- // emd of simple type-in colors
-
- // array of color definition objects
- var color_defs = [
- {
- re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
- example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],
- process: function (bits){
- return [
- parseInt(bits[1]),
- parseInt(bits[2]),
- parseInt(bits[3])
- ];
- }
- },
- {
- re: /^(\w{2})(\w{2})(\w{2})$/,
- example: ['#00ff00', '336699'],
- process: function (bits){
- return [
- parseInt(bits[1], 16),
- parseInt(bits[2], 16),
- parseInt(bits[3], 16)
- ];
- }
- },
- {
- re: /^(\w{1})(\w{1})(\w{1})$/,
- example: ['#fb0', 'f0f'],
- process: function (bits){
- return [
- parseInt(bits[1] + bits[1], 16),
- parseInt(bits[2] + bits[2], 16),
- parseInt(bits[3] + bits[3], 16)
- ];
- }
- }
- ];
-
- // search through the definitions to find a match
- for (var i = 0; i < color_defs.length; i++) {
- var re = color_defs[i].re;
- var processor = color_defs[i].process;
- var bits = re.exec(color_string);
- if (bits) {
- var channels = processor(bits);
- this.r = channels[0];
- this.g = channels[1];
- this.b = channels[2];
- this.ok = true;
- }
-
- }
-
- // validate/cleanup values
- this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);
- this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);
- this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);
-
- // some getters
- this.toRGB = function () {
- return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';
- }
- this.toHex = function () {
- var r = this.r.toString(16);
- var g = this.g.toString(16);
- var b = this.b.toString(16);
- if (r.length == 1) r = '0' + r;
- if (g.length == 1) g = '0' + g;
- if (b.length == 1) b = '0' + b;
- return '#' + r + g + b;
- }
-
-
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/stacktrace.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/stacktrace.js
deleted file mode 100644
index 4d0384d1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/stacktrace.js
+++ /dev/null
@@ -1,411 +0,0 @@
-// Domain Public by Eric Wendelin http://eriwen.com/ (2008)
-// Luke Smith http://lucassmith.name/ (2008)
-// Loic Dachary <loic@dachary.org> (2008)
-// Johan Euphrosine <proppy@aminche.com> (2008)
-// Oyvind Sean Kinsey http://kinsey.no/blog (2010)
-// Victor Homyakov <victor-homyakov@users.sourceforge.net> (2010)
-
-/**
- * Main function giving a function stack trace with a forced or passed in Error
- *
- * @cfg {Error} e The error to create a stacktrace from (optional)
- * @cfg {Boolean} guess If we should try to resolve the names of anonymous functions
- * @return {Array} of Strings with functions, lines, files, and arguments where possible
- */
-function printStackTrace(options) {
- options = options || {guess: true};
- var ex = options.e || null, guess = !!options.guess;
- var p = new printStackTrace.implementation(), result = p.run(ex);
- return (guess) ? p.guessAnonymousFunctions(result) : result;
-}
-
-printStackTrace.implementation = function() {
-};
-
-printStackTrace.implementation.prototype = {
- /**
- * @param {Error} ex The error to create a stacktrace from (optional)
- * @param {String} mode Forced mode (optional, mostly for unit tests)
- */
- run: function(ex, mode) {
- ex = ex || this.createException();
- // examine exception properties w/o debugger
- //for (var prop in ex) {alert("Ex['" + prop + "']=" + ex[prop]);}
- mode = mode || this.mode(ex);
- if (mode === 'other') {
- return this.other(arguments.callee);
- } else {
- return this[mode](ex);
- }
- },
-
- createException: function() {
- try {
- this.undef();
- } catch (e) {
- return e;
- }
- },
-
- /**
- * Mode could differ for different exception, e.g.
- * exceptions in Chrome may or may not have arguments or stack.
- *
- * @return {String} mode of operation for the exception
- */
- mode: function(e) {
- if (e['arguments'] && e.stack) {
- return 'chrome';
- } else if (typeof e.message === 'string' && typeof window !== 'undefined' && window.opera) {
- // e.message.indexOf("Backtrace:") > -1 -> opera
- // !e.stacktrace -> opera
- if (!e.stacktrace) {
- return 'opera9'; // use e.message
- }
- // 'opera#sourceloc' in e -> opera9, opera10a
- if (e.message.indexOf('\n') > -1 && e.message.split('\n').length > e.stacktrace.split('\n').length) {
- return 'opera9'; // use e.message
- }
- // e.stacktrace && !e.stack -> opera10a
- if (!e.stack) {
- return 'opera10a'; // use e.stacktrace
- }
- // e.stacktrace && e.stack -> opera10b
- if (e.stacktrace.indexOf("called from line") < 0) {
- return 'opera10b'; // use e.stacktrace, format differs from 'opera10a'
- }
- // e.stacktrace && e.stack -> opera11
- return 'opera11'; // use e.stacktrace, format differs from 'opera10a', 'opera10b'
- } else if (e.stack) {
- return 'firefox';
- }
- return 'other';
- },
-
- /**
- * Given a context, function name, and callback function, overwrite it so that it calls
- * printStackTrace() first with a callback and then runs the rest of the body.
- *
- * @param {Object} context of execution (e.g. window)
- * @param {String} functionName to instrument
- * @param {Function} function to call with a stack trace on invocation
- */
- instrumentFunction: function(context, functionName, callback) {
- context = context || window;
- var original = context[functionName];
- context[functionName] = function instrumented() {
- callback.call(this, printStackTrace().slice(4));
- return context[functionName]._instrumented.apply(this, arguments);
- };
- context[functionName]._instrumented = original;
- },
-
- /**
- * Given a context and function name of a function that has been
- * instrumented, revert the function to it's original (non-instrumented)
- * state.
- *
- * @param {Object} context of execution (e.g. window)
- * @param {String} functionName to de-instrument
- */
- deinstrumentFunction: function(context, functionName) {
- if (context[functionName].constructor === Function &&
- context[functionName]._instrumented &&
- context[functionName]._instrumented.constructor === Function) {
- context[functionName] = context[functionName]._instrumented;
- }
- },
-
- /**
- * Given an Error object, return a formatted Array based on Chrome's stack string.
- *
- * @param e - Error object to inspect
- * @return Array<String> of function calls, files and line numbers
- */
- chrome: function(e) {
- var stack = (e.stack + '\n').replace(/^\S[^\(]+?[\n$]/gm, '').
- replace(/^\s+at\s+/gm, '').
- replace(/^([^\(]+?)([\n$])/gm, '{anonymous}()@$1$2').
- replace(/^Object.<anonymous>\s*\(([^\)]+)\)/gm, '{anonymous}()@$1').split('\n');
- stack.pop();
- return stack;
- },
-
- /**
- * Given an Error object, return a formatted Array based on Firefox's stack string.
- *
- * @param e - Error object to inspect
- * @return Array<String> of function calls, files and line numbers
- */
- firefox: function(e) {
- return e.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n');
- },
-
- opera11: function(e) {
- // "Error thrown at line 42, column 12 in <anonymous function>() in file://localhost/G:/js/stacktrace.js:\n"
- // "Error thrown at line 42, column 12 in <anonymous function: createException>() in file://localhost/G:/js/stacktrace.js:\n"
- // "called from line 7, column 4 in bar(n) in file://localhost/G:/js/test/functional/testcase1.html:\n"
- // "called from line 15, column 3 in file://localhost/G:/js/test/functional/testcase1.html:\n"
- var ANON = '{anonymous}', lineRE = /^.*line (\d+), column (\d+)(?: in (.+))? in (\S+):$/;
- var lines = e.stacktrace.split('\n'), result = [];
-
- for (var i = 0, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- var location = match[4] + ':' + match[1] + ':' + match[2];
- var fnName = match[3] || "global code";
- fnName = fnName.replace(/<anonymous function: (\S+)>/, "$1").replace(/<anonymous function>/, ANON);
- result.push(fnName + '@' + location + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
- }
- }
-
- return result;
- },
-
- opera10b: function(e) {
- // "<anonymous function: run>([arguments not available])@file://localhost/G:/js/stacktrace.js:27\n" +
- // "printStackTrace([arguments not available])@file://localhost/G:/js/stacktrace.js:18\n" +
- // "@file://localhost/G:/js/test/functional/testcase1.html:15"
- var ANON = '{anonymous}', lineRE = /^(.*)@(.+):(\d+)$/;
- var lines = e.stacktrace.split('\n'), result = [];
-
- for (var i = 0, len = lines.length; i < len; i++) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- var fnName = match[1]? (match[1] + '()') : "global code";
- result.push(fnName + '@' + match[2] + ':' + match[3]);
- }
- }
-
- return result;
- },
-
- /**
- * Given an Error object, return a formatted Array based on Opera 10's stacktrace string.
- *
- * @param e - Error object to inspect
- * @return Array<String> of function calls, files and line numbers
- */
- opera10a: function(e) {
- // " Line 27 of linked script file://localhost/G:/js/stacktrace.js\n"
- // " Line 11 of inline#1 script in file://localhost/G:/js/test/functional/testcase1.html: In function foo\n"
- var ANON = '{anonymous}', lineRE = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i;
- var lines = e.stacktrace.split('\n'), result = [];
-
- for (var i = 0, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- var fnName = match[3] || ANON;
- result.push(fnName + '()@' + match[2] + ':' + match[1] + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
- }
- }
-
- return result;
- },
-
- // Opera 7.x-9.2x only!
- opera9: function(e) {
- // " Line 43 of linked script file://localhost/G:/js/stacktrace.js\n"
- // " Line 7 of inline#1 script in file://localhost/G:/js/test/functional/testcase1.html\n"
- var ANON = '{anonymous}', lineRE = /Line (\d+).*script (?:in )?(\S+)/i;
- var lines = e.message.split('\n'), result = [];
-
- for (var i = 2, len = lines.length; i < len; i += 2) {
- var match = lineRE.exec(lines[i]);
- if (match) {
- result.push(ANON + '()@' + match[2] + ':' + match[1] + ' -- ' + lines[i + 1].replace(/^\s+/, ''));
- }
- }
-
- return result;
- },
-
- // Safari, IE, and others
- other: function(curr) {
- var ANON = '{anonymous}', fnRE = /function\s*([\w\-$]+)?\s*\(/i, stack = [], fn, args, maxStackSize = 10;
- while (curr && stack.length < maxStackSize) {
- fn = fnRE.test(curr.toString()) ? RegExp.$1 || ANON : ANON;
- args = Array.prototype.slice.call(curr['arguments'] || []);
- stack[stack.length] = fn + '(' + this.stringifyArguments(args) + ')';
- curr = curr.caller;
- }
- return stack;
- },
-
- /**
- * Given arguments array as a String, subsituting type names for non-string types.
- *
- * @param {Arguments} object
- * @return {Array} of Strings with stringified arguments
- */
- stringifyArguments: function(args) {
- var result = [];
- var slice = Array.prototype.slice;
- for (var i = 0; i < args.length; ++i) {
- var arg = args[i];
- if (arg === undefined) {
- result[i] = 'undefined';
- } else if (arg === null) {
- result[i] = 'null';
- } else if (arg.constructor) {
- if (arg.constructor === Array) {
- if (arg.length < 3) {
- result[i] = '[' + this.stringifyArguments(arg) + ']';
- } else {
- result[i] = '[' + this.stringifyArguments(slice.call(arg, 0, 1)) + '...' + this.stringifyArguments(slice.call(arg, -1)) + ']';
- }
- } else if (arg.constructor === Object) {
- result[i] = '#object';
- } else if (arg.constructor === Function) {
- result[i] = '#function';
- } else if (arg.constructor === String) {
- result[i] = '"' + arg + '"';
- } else if (arg.constructor === Number) {
- result[i] = arg;
- }
- }
- }
- return result.join(',');
- },
-
- sourceCache: {},
-
- /**
- * @return the text from a given URL
- */
- ajax: function(url) {
- var req = this.createXMLHTTPObject();
- if (req) {
- try {
- req.open('GET', url, false);
- req.send(null);
- return req.responseText;
- } catch (e) {
- }
- }
- return '';
- },
-
- /**
- * Try XHR methods in order and store XHR factory.
- *
- * @return <Function> XHR function or equivalent
- */
- createXMLHTTPObject: function() {
- var xmlhttp, XMLHttpFactories = [
- function() {
- return new XMLHttpRequest();
- }, function() {
- return new ActiveXObject('Msxml2.XMLHTTP');
- }, function() {
- return new ActiveXObject('Msxml3.XMLHTTP');
- }, function() {
- return new ActiveXObject('Microsoft.XMLHTTP');
- }
- ];
- for (var i = 0; i < XMLHttpFactories.length; i++) {
- try {
- xmlhttp = XMLHttpFactories[i]();
- // Use memoization to cache the factory
- this.createXMLHTTPObject = XMLHttpFactories[i];
- return xmlhttp;
- } catch (e) {
- }
- }
- },
-
- /**
- * Given a URL, check if it is in the same domain (so we can get the source
- * via Ajax).
- *
- * @param url <String> source url
- * @return False if we need a cross-domain request
- */
- isSameDomain: function(url) {
- return url.indexOf(location.hostname) !== -1;
- },
-
- /**
- * Get source code from given URL if in the same domain.
- *
- * @param url <String> JS source URL
- * @return <Array> Array of source code lines
- */
- getSource: function(url) {
- // TODO reuse source from script tags?
- if (!(url in this.sourceCache)) {
- this.sourceCache[url] = this.ajax(url).split('\n');
- }
- return this.sourceCache[url];
- },
-
- guessAnonymousFunctions: function(stack) {
- for (var i = 0; i < stack.length; ++i) {
- var reStack = /\{anonymous\}\(.*\)@(.*)/,
- reRef = /^(.*?)(?::(\d+))(?::(\d+))?(?: -- .+)?$/,
- frame = stack[i], ref = reStack.exec(frame);
-
- if (ref) {
- var m = reRef.exec(ref[1]), file = m[1],
- lineno = m[2], charno = m[3] || 0;
- if (file && this.isSameDomain(file) && lineno) {
- var functionName = this.guessAnonymousFunction(file, lineno, charno);
- stack[i] = frame.replace('{anonymous}', functionName);
- }
- }
- }
- return stack;
- },
-
- guessAnonymousFunction: function(url, lineNo, charNo) {
- var ret;
- try {
- ret = this.findFunctionName(this.getSource(url), lineNo);
- } catch (e) {
- ret = 'getSource failed with url: ' + url + ', exception: ' + e.toString();
- }
- return ret;
- },
-
- findFunctionName: function(source, lineNo) {
- // FIXME findFunctionName fails for compressed source
- // (more than one function on the same line)
- // TODO use captured args
- // function {name}({args}) m[1]=name m[2]=args
- var reFunctionDeclaration = /function\s+([^(]*?)\s*\(([^)]*)\)/;
- // {name} = function ({args}) TODO args capture
- // /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function(?:[^(]*)/
- var reFunctionExpression = /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*function\b/;
- // {name} = eval()
- var reFunctionEvaluation = /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(?:eval|new Function)\b/;
- // Walk backwards in the source lines until we find
- // the line which matches one of the patterns above
- var code = "", line, maxLines = Math.min(lineNo, 20), m, commentPos;
- for (var i = 0; i < maxLines; ++i) {
- // lineNo is 1-based, source[] is 0-based
- line = source[lineNo - i - 1];
- commentPos = line.indexOf('//');
- if (commentPos >= 0) {
- line = line.substr(0, commentPos);
- }
- // TODO check other types of comments? Commented code may lead to false positive
- if (line) {
- code = line + code;
- m = reFunctionExpression.exec(code);
- if (m && m[1]) {
- return m[1];
- }
- m = reFunctionDeclaration.exec(code);
- if (m && m[1]) {
- //return m[1] + "(" + (m[2] || "") + ")";
- return m[1];
- }
- m = reFunctionEvaluation.exec(code);
- if (m && m[1]) {
- return m[1];
- }
- }
- }
- return '(?)';
- }
-};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/Doxyfile b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/Doxyfile
deleted file mode 100644
index 26ac5a53..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/Doxyfile
+++ /dev/null
@@ -1,243 +0,0 @@
-# Doxyfile 1.5.3
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-DOXYFILE_ENCODING = UTF-8
-PROJECT_NAME = strftime
-PROJECT_NUMBER = 1.3
-OUTPUT_DIRECTORY = /home/philip/public_html/hacks/strftime/docs/
-CREATE_SUBDIRS = NO
-OUTPUT_LANGUAGE = English
-BRIEF_MEMBER_DESC = YES
-REPEAT_BRIEF = YES
-ABBREVIATE_BRIEF = "The $name class " \
- "The $name widget " \
- "The $name file " \
- is \
- provides \
- specifies \
- contains \
- represents \
- a \
- an \
- the
-ALWAYS_DETAILED_SEC = NO
-INLINE_INHERITED_MEMB = NO
-FULL_PATH_NAMES = YES
-STRIP_FROM_PATH = /home/philip/public_html/hacks/strftime/
-STRIP_FROM_INC_PATH =
-SHORT_NAMES = NO
-JAVADOC_AUTOBRIEF = NO
-QT_AUTOBRIEF = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP = NO
-INHERIT_DOCS = YES
-SEPARATE_MEMBER_PAGES = NO
-TAB_SIZE = 8
-ALIASES =
-OPTIMIZE_OUTPUT_FOR_C = NO
-OPTIMIZE_OUTPUT_JAVA = NO
-BUILTIN_STL_SUPPORT = NO
-CPP_CLI_SUPPORT = NO
-DISTRIBUTE_GROUP_DOC = NO
-SUBGROUPING = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL = NO
-EXTRACT_PRIVATE = NO
-EXTRACT_STATIC = NO
-EXTRACT_LOCAL_CLASSES = YES
-EXTRACT_LOCAL_METHODS = NO
-EXTRACT_ANON_NSPACES = NO
-HIDE_UNDOC_MEMBERS = YES
-HIDE_UNDOC_CLASSES = YES
-HIDE_FRIEND_COMPOUNDS = NO
-HIDE_IN_BODY_DOCS = NO
-INTERNAL_DOCS = NO
-CASE_SENSE_NAMES = YES
-HIDE_SCOPE_NAMES = NO
-SHOW_INCLUDE_FILES = YES
-INLINE_INFO = YES
-SORT_MEMBER_DOCS = YES
-SORT_BRIEF_DOCS = NO
-SORT_BY_SCOPE_NAME = NO
-GENERATE_TODOLIST = YES
-GENERATE_TESTLIST = YES
-GENERATE_BUGLIST = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS =
-MAX_INITIALIZER_LINES = 30
-SHOW_USED_FILES = NO
-SHOW_DIRECTORIES = NO
-FILE_VERSION_FILTER =
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET = NO
-WARNINGS = YES
-WARN_IF_UNDOCUMENTED = YES
-WARN_IF_DOC_ERROR = YES
-WARN_NO_PARAMDOC = NO
-WARN_FORMAT = "$file:$line: $text "
-WARN_LOGFILE =
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT = /home/philip/public_html/hacks/strftime
-INPUT_ENCODING = UTF-8
-FILE_PATTERNS = *.js
-RECURSIVE = NO
-EXCLUDE =
-EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS =
-EXCLUDE_SYMBOLS =
-EXAMPLE_PATH = .
-EXAMPLE_PATTERNS = *
-EXAMPLE_RECURSIVE = NO
-IMAGE_PATH =
-INPUT_FILTER =
-FILTER_PATTERNS =
-FILTER_SOURCE_FILES = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER = YES
-INLINE_SOURCES = YES
-STRIP_CODE_COMMENTS = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION = YES
-REFERENCES_LINK_SOURCE = YES
-USE_HTAGS = NO
-VERBATIM_HEADERS = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX = YES
-COLS_IN_ALPHA_INDEX = 5
-IGNORE_PREFIX = Date \
- Date.ext \
- Date.prototype
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML = YES
-HTML_OUTPUT = html
-HTML_FILE_EXTENSION = .html
-HTML_HEADER =
-HTML_FOOTER =
-HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
-GENERATE_HTMLHELP = NO
-HTML_DYNAMIC_SECTIONS = NO
-CHM_FILE =
-HHC_LOCATION =
-GENERATE_CHI = NO
-BINARY_TOC = NO
-TOC_EXPAND = NO
-DISABLE_INDEX = NO
-ENUM_VALUES_PER_LINE = 4
-GENERATE_TREEVIEW = NO
-TREEVIEW_WIDTH = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX = YES
-LATEX_OUTPUT = latex
-LATEX_CMD_NAME = latex
-MAKEINDEX_CMD_NAME = makeindex
-COMPACT_LATEX = NO
-PAPER_TYPE = a4wide
-EXTRA_PACKAGES =
-LATEX_HEADER =
-PDF_HYPERLINKS = YES
-USE_PDFLATEX = YES
-LATEX_BATCHMODE = NO
-LATEX_HIDE_INDICES = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF = NO
-RTF_OUTPUT = rtf
-COMPACT_RTF = NO
-RTF_HYPERLINKS = NO
-RTF_STYLESHEET_FILE =
-RTF_EXTENSIONS_FILE =
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN = NO
-MAN_OUTPUT = man
-MAN_EXTENSION = .3
-MAN_LINKS = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML = NO
-XML_OUTPUT = xml
-XML_SCHEMA =
-XML_DTD =
-XML_PROGRAMLISTING = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD = NO
-PERLMOD_LATEX = NO
-PERLMOD_PRETTY = YES
-PERLMOD_MAKEVAR_PREFIX =
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING = YES
-MACRO_EXPANSION = NO
-EXPAND_ONLY_PREDEF = NO
-SEARCH_INCLUDES = YES
-INCLUDE_PATH =
-INCLUDE_FILE_PATTERNS =
-PREDEFINED =
-EXPAND_AS_DEFINED =
-SKIP_FUNCTION_MACROS = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-TAGFILES =
-GENERATE_TAGFILE =
-ALLEXTERNALS = NO
-EXTERNAL_GROUPS = YES
-PERL_PATH = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS = NO
-MSCGEN_PATH =
-HIDE_UNDOC_RELATIONS = YES
-HAVE_DOT = YES
-CLASS_GRAPH = YES
-COLLABORATION_GRAPH = YES
-GROUP_GRAPHS = YES
-UML_LOOK = NO
-TEMPLATE_RELATIONS = NO
-INCLUDE_GRAPH = YES
-INCLUDED_BY_GRAPH = YES
-CALL_GRAPH = YES
-CALLER_GRAPH = NO
-GRAPHICAL_HIERARCHY = YES
-DIRECTORY_GRAPH = YES
-DOT_IMAGE_FORMAT = png
-DOT_PATH =
-DOTFILE_DIRS =
-DOT_GRAPH_MAX_NODES = 50
-MAX_DOT_GRAPH_DEPTH = 1000
-DOT_TRANSPARENT = NO
-DOT_MULTI_TARGETS = NO
-GENERATE_LEGEND = YES
-DOT_CLEANUP = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine
-#---------------------------------------------------------------------------
-SEARCHENGINE = YES
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime-min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime-min.js
deleted file mode 100644
index 8207714e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime-min.js
+++ /dev/null
@@ -1 +0,0 @@
-Date.ext={};Date.ext.util={};Date.ext.util.xPad=function(x,pad,r){if(typeof (r)=="undefined"){r=10}for(;parseInt(x,10)<r&&r>1;r/=10){x=pad.toString()+x}return x.toString()};Date.prototype.locale="en-GB";if(document.getElementsByTagName("html")&&document.getElementsByTagName("html")[0].lang){Date.prototype.locale=document.getElementsByTagName("html")[0].lang}Date.ext.locales={};Date.ext.locales.en={a:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],A:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],b:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],B:["January","February","March","April","May","June","July","August","September","October","November","December"],c:"%a %d %b %Y %T %Z",p:["AM","PM"],P:["am","pm"],x:"%d/%m/%y",X:"%T"};Date.ext.locales["en-US"]=Date.ext.locales.en;Date.ext.locales["en-US"].c="%a %d %b %Y %r %Z";Date.ext.locales["en-US"].x="%D";Date.ext.locales["en-US"].X="%r";Date.ext.locales["en-GB"]=Date.ext.locales.en;Date.ext.locales["en-AU"]=Date.ext.locales["en-GB"];Date.ext.formats={a:function(d){return Date.ext.locales[d.locale].a[d.getDay()]},A:function(d){return Date.ext.locales[d.locale].A[d.getDay()]},b:function(d){return Date.ext.locales[d.locale].b[d.getMonth()]},B:function(d){return Date.ext.locales[d.locale].B[d.getMonth()]},c:"toLocaleString",C:function(d){return Date.ext.util.xPad(parseInt(d.getFullYear()/100,10),0)},d:["getDate","0"],e:["getDate"," "],g:function(d){return Date.ext.util.xPad(parseInt(Date.ext.util.G(d)/100,10),0)},G:function(d){var y=d.getFullYear();var V=parseInt(Date.ext.formats.V(d),10);var W=parseInt(Date.ext.formats.W(d),10);if(W>V){y++}else{if(W===0&&V>=52){y--}}return y},H:["getHours","0"],I:function(d){var I=d.getHours()%12;return Date.ext.util.xPad(I===0?12:I,0)},j:function(d){var ms=d-new Date(""+d.getFullYear()+"/1/1 GMT");ms+=d.getTimezoneOffset()*60000;var doy=parseInt(ms/60000/60/24,10)+1;return Date.ext.util.xPad(doy,0,100)},m:function(d){return Date.ext.util.xPad(d.getMonth()+1,0)},M:["getMinutes","0"],p:function(d){return Date.ext.locales[d.locale].p[d.getHours()>=12?1:0]},P:function(d){return Date.ext.locales[d.locale].P[d.getHours()>=12?1:0]},S:["getSeconds","0"],u:function(d){var dow=d.getDay();return dow===0?7:dow},U:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=6-d.getDay();var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0)},V:function(d){var woy=parseInt(Date.ext.formats.W(d),10);var dow1_1=(new Date(""+d.getFullYear()+"/1/1")).getDay();var idow=woy+(dow1_1>4||dow1_1<=1?0:1);if(idow==53&&(new Date(""+d.getFullYear()+"/12/31")).getDay()<4){idow=1}else{if(idow===0){idow=Date.ext.formats.V(new Date(""+(d.getFullYear()-1)+"/12/31"))}}return Date.ext.util.xPad(idow,0)},w:"getDay",W:function(d){var doy=parseInt(Date.ext.formats.j(d),10);var rdow=7-Date.ext.formats.u(d);var woy=parseInt((doy+rdow)/7,10);return Date.ext.util.xPad(woy,0,10)},y:function(d){return Date.ext.util.xPad(d.getFullYear()%100,0)},Y:"getFullYear",z:function(d){var o=d.getTimezoneOffset();var H=Date.ext.util.xPad(parseInt(Math.abs(o/60),10),0);var M=Date.ext.util.xPad(o%60,0);return(o>0?"-":"+")+H+M},Z:function(d){return d.toString().replace(/^.*\(([^)]+)\)$/,"$1")},"%":function(d){return"%"}};Date.ext.aggregates={c:"locale",D:"%m/%d/%y",h:"%b",n:"\n",r:"%I:%M:%S %p",R:"%H:%M",t:"\t",T:"%H:%M:%S",x:"locale",X:"locale"};Date.ext.aggregates.z=Date.ext.formats.z(new Date());Date.ext.aggregates.Z=Date.ext.formats.Z(new Date());Date.ext.unsupported={};Date.prototype.strftime=function(fmt){if(!(this.locale in Date.ext.locales)){if(this.locale.replace(/-[a-zA-Z]+$/,"") in Date.ext.locales){this.locale=this.locale.replace(/-[a-zA-Z]+$/,"")}else{this.locale="en-GB"}}var d=this;while(fmt.match(/%[cDhnrRtTxXzZ]/)){fmt=fmt.replace(/%([cDhnrRtTxXzZ])/g,function(m0,m1){var f=Date.ext.aggregates[m1];return(f=="locale"?Date.ext.locales[d.locale][m1]:f)})}var str=fmt.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g,function(m0,m1){var f=Date.ext.formats[m1];if(typeof (f)=="string"){return d[f]()}else{if(typeof (f)=="function"){return f.call(d,d)}else{if(typeof (f)=="object"&&typeof (f[0])=="string"){return Date.ext.util.xPad(d[f[0]](),f[1])}else{return m1}}}});d=null;return str};
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime.js
deleted file mode 100644
index d622df9e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/dy3/js/strftime/strftime.js
+++ /dev/null
@@ -1,731 +0,0 @@
-/*
- strftime for Javascript
- Copyright (c) 2008, Philip S Tellis <philip@bluesmoon.info>
- All rights reserved.
-
- This code is distributed under the terms of the BSD licence
-
- Redistribution and use of this software in source and binary forms, with or without modification,
- are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice, this list of conditions
- and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list of
- conditions and the following disclaimer in the documentation and/or other materials provided
- with the distribution.
- * The names of the contributors to this file may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/**
- * \file strftime.js
- * \author Philip S Tellis \<philip@bluesmoon.info\>
- * \version 1.3
- * \date 2008/06
- * \brief Javascript implementation of strftime
- *
- * Implements strftime for the Date object in javascript based on the PHP implementation described at
- * http://www.php.net/strftime This is in turn based on the Open Group specification defined
- * at http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html This implementation does not
- * include modified conversion specifiers (i.e., Ex and Ox)
- *
- * The following format specifiers are supported:
- *
- * \copydoc formats
- *
- * \%a, \%A, \%b and \%B should be localised for non-English locales.
- *
- * \par Usage:
- * This library may be used as follows:
- * \code
- * var d = new Date();
- *
- * var ymd = d.strftime('%Y/%m/%d');
- * var iso = d.strftime('%Y-%m-%dT%H:%M:%S%z');
- *
- * \endcode
- *
- * \sa \link Date.prototype.strftime Date.strftime \endlink for a description of each of the supported format specifiers
- * \sa Date.ext.locales for localisation information
- * \sa http://www.php.net/strftime for the PHP implementation which is the basis for this
- * \sa http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html for feedback
- */
-
-//! Date extension object - all supporting objects go in here.
-Date.ext = {};
-
-//! Utility methods
-Date.ext.util = {};
-
-/**
-\brief Left pad a number with something
-\details Takes a number and pads it to the left with the passed in pad character
-\param x The number to pad
-\param pad The string to pad with
-\param r [optional] Upper limit for pad. A value of 10 pads to 2 digits, a value of 100 pads to 3 digits.
- Default is 10.
-
-\return The number left padded with the pad character. This function returns a string and not a number.
-*/
-Date.ext.util.xPad=function(x, pad, r)
-{
- if(typeof(r) == 'undefined')
- {
- r=10;
- }
- for( ; parseInt(x, 10)<r && r>1; r/=10)
- x = pad.toString() + x;
- return x.toString();
-};
-
-/**
-\brief Currently selected locale.
-\details
-The locale for a specific date object may be changed using \code Date.locale = "new-locale"; \endcode
-The default will be based on the lang attribute of the HTML tag of your document
-*/
-Date.prototype.locale = 'en-GB';
-//! \cond FALSE
-if(document.getElementsByTagName('html') && document.getElementsByTagName('html')[0].lang)
-{
- Date.prototype.locale = document.getElementsByTagName('html')[0].lang;
-}
-//! \endcond
-
-/**
-\brief Localised strings for days of the week and months of the year.
-\details
-To create your own local strings, add a locale object to the locales object.
-The key of your object should be the same as your locale name. For example:
- en-US,
- fr,
- fr-CH,
- de-DE
-Names are case sensitive and are described at http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
-Your locale object must contain the following keys:
-\param a Short names of days of week starting with Sunday
-\param A Long names days of week starting with Sunday
-\param b Short names of months of the year starting with January
-\param B Long names of months of the year starting with February
-\param c The preferred date and time representation in your locale
-\param p AM or PM in your locale
-\param P am or pm in your locale
-\param x The preferred date representation for the current locale without the time.
-\param X The preferred time representation for the current locale without the date.
-
-\sa Date.ext.locales.en for a sample implementation
-\sa \ref localisation for detailed documentation on localising strftime for your own locale
-*/
-Date.ext.locales = { };
-
-/**
- * \brief Localised strings for English (British).
- * \details
- * This will be used for any of the English dialects unless overridden by a country specific one.
- * This is the default locale if none specified
- */
-Date.ext.locales.en = {
- a: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
- A: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
- b: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
- B: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
- c: '%a %d %b %Y %T %Z',
- p: ['AM', 'PM'],
- P: ['am', 'pm'],
- x: '%d/%m/%y',
- X: '%T'
-};
-
-//! \cond FALSE
-// Localised strings for US English
-Date.ext.locales['en-US'] = Date.ext.locales.en;
-Date.ext.locales['en-US'].c = '%a %d %b %Y %r %Z';
-Date.ext.locales['en-US'].x = '%D';
-Date.ext.locales['en-US'].X = '%r';
-
-// Localised strings for British English
-Date.ext.locales['en-GB'] = Date.ext.locales.en;
-
-// Localised strings for Australian English
-Date.ext.locales['en-AU'] = Date.ext.locales['en-GB'];
-//! \endcond
-
-//! \brief List of supported format specifiers.
-/**
- * \details
- * \arg \%a - abbreviated weekday name according to the current locale
- * \arg \%A - full weekday name according to the current locale
- * \arg \%b - abbreviated month name according to the current locale
- * \arg \%B - full month name according to the current locale
- * \arg \%c - preferred date and time representation for the current locale
- * \arg \%C - century number (the year divided by 100 and truncated to an integer, range 00 to 99)
- * \arg \%d - day of the month as a decimal number (range 01 to 31)
- * \arg \%D - same as %m/%d/%y
- * \arg \%e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31')
- * \arg \%g - like %G, but without the century
- * \arg \%G - The 4-digit year corresponding to the ISO week number
- * \arg \%h - same as %b
- * \arg \%H - hour as a decimal number using a 24-hour clock (range 00 to 23)
- * \arg \%I - hour as a decimal number using a 12-hour clock (range 01 to 12)
- * \arg \%j - day of the year as a decimal number (range 001 to 366)
- * \arg \%m - month as a decimal number (range 01 to 12)
- * \arg \%M - minute as a decimal number
- * \arg \%n - newline character
- * \arg \%p - either `AM' or `PM' according to the given time value, or the corresponding strings for the current locale
- * \arg \%P - like %p, but lower case
- * \arg \%r - time in a.m. and p.m. notation equal to %I:%M:%S %p
- * \arg \%R - time in 24 hour notation equal to %H:%M
- * \arg \%S - second as a decimal number
- * \arg \%t - tab character
- * \arg \%T - current time, equal to %H:%M:%S
- * \arg \%u - weekday as a decimal number [1,7], with 1 representing Monday
- * \arg \%U - week number of the current year as a decimal number, starting with
- * the first Sunday as the first day of the first week
- * \arg \%V - The ISO 8601:1988 week number of the current year as a decimal number,
- * range 01 to 53, where week 1 is the first week that has at least 4 days
- * in the current year, and with Monday as the first day of the week.
- * \arg \%w - day of the week as a decimal, Sunday being 0
- * \arg \%W - week number of the current year as a decimal number, starting with the
- * first Monday as the first day of the first week
- * \arg \%x - preferred date representation for the current locale without the time
- * \arg \%X - preferred time representation for the current locale without the date
- * \arg \%y - year as a decimal number without a century (range 00 to 99)
- * \arg \%Y - year as a decimal number including the century
- * \arg \%z - numerical time zone representation
- * \arg \%Z - time zone name or abbreviation
- * \arg \%% - a literal `\%' character
- */
-Date.ext.formats = {
- a: function(d) { return Date.ext.locales[d.locale].a[d.getDay()]; },
- A: function(d) { return Date.ext.locales[d.locale].A[d.getDay()]; },
- b: function(d) { return Date.ext.locales[d.locale].b[d.getMonth()]; },
- B: function(d) { return Date.ext.locales[d.locale].B[d.getMonth()]; },
- c: 'toLocaleString',
- C: function(d) { return Date.ext.util.xPad(parseInt(d.getFullYear()/100, 10), 0); },
- d: ['getDate', '0'],
- e: ['getDate', ' '],
- g: function(d) { return Date.ext.util.xPad(parseInt(Date.ext.util.G(d)/100, 10), 0); },
- G: function(d) {
- var y = d.getFullYear();
- var V = parseInt(Date.ext.formats.V(d), 10);
- var W = parseInt(Date.ext.formats.W(d), 10);
-
- if(W > V) {
- y++;
- } else if(W===0 && V>=52) {
- y--;
- }
-
- return y;
- },
- H: ['getHours', '0'],
- I: function(d) { var I=d.getHours()%12; return Date.ext.util.xPad(I===0?12:I, 0); },
- j: function(d) {
- var ms = d - new Date('' + d.getFullYear() + '/1/1 GMT');
- ms += d.getTimezoneOffset()*60000;
- var doy = parseInt(ms/60000/60/24, 10)+1;
- return Date.ext.util.xPad(doy, 0, 100);
- },
- m: function(d) { return Date.ext.util.xPad(d.getMonth()+1, 0); },
- M: ['getMinutes', '0'],
- p: function(d) { return Date.ext.locales[d.locale].p[d.getHours() >= 12 ? 1 : 0 ]; },
- P: function(d) { return Date.ext.locales[d.locale].P[d.getHours() >= 12 ? 1 : 0 ]; },
- S: ['getSeconds', '0'],
- u: function(d) { var dow = d.getDay(); return dow===0?7:dow; },
- U: function(d) {
- var doy = parseInt(Date.ext.formats.j(d), 10);
- var rdow = 6-d.getDay();
- var woy = parseInt((doy+rdow)/7, 10);
- return Date.ext.util.xPad(woy, 0);
- },
- V: function(d) {
- var woy = parseInt(Date.ext.formats.W(d), 10);
- var dow1_1 = (new Date('' + d.getFullYear() + '/1/1')).getDay();
- // First week is 01 and not 00 as in the case of %U and %W,
- // so we add 1 to the final result except if day 1 of the year
- // is a Monday (then %W returns 01).
- // We also need to subtract 1 if the day 1 of the year is
- // Friday-Sunday, so the resulting equation becomes:
- var idow = woy + (dow1_1 > 4 || dow1_1 <= 1 ? 0 : 1);
- if(idow == 53 && (new Date('' + d.getFullYear() + '/12/31')).getDay() < 4)
- {
- idow = 1;
- }
- else if(idow === 0)
- {
- idow = Date.ext.formats.V(new Date('' + (d.getFullYear()-1) + '/12/31'));
- }
-
- return Date.ext.util.xPad(idow, 0);
- },
- w: 'getDay',
- W: function(d) {
- var doy = parseInt(Date.ext.formats.j(d), 10);
- var rdow = 7-Date.ext.formats.u(d);
- var woy = parseInt((doy+rdow)/7, 10);
- return Date.ext.util.xPad(woy, 0, 10);
- },
- y: function(d) { return Date.ext.util.xPad(d.getFullYear()%100, 0); },
- Y: 'getFullYear',
- z: function(d) {
- var o = d.getTimezoneOffset();
- var H = Date.ext.util.xPad(parseInt(Math.abs(o/60), 10), 0);
- var M = Date.ext.util.xPad(o%60, 0);
- return (o>0?'-':'+') + H + M;
- },
- Z: function(d) { return d.toString().replace(/^.*\(([^)]+)\)$/, '$1'); },
- '%': function(d) { return '%'; }
-};
-
-/**
-\brief List of aggregate format specifiers.
-\details
-Aggregate format specifiers map to a combination of basic format specifiers.
-These are implemented in terms of Date.ext.formats.
-
-A format specifier that maps to 'locale' is read from Date.ext.locales[current-locale].
-
-\sa Date.ext.formats
-*/
-Date.ext.aggregates = {
- c: 'locale',
- D: '%m/%d/%y',
- h: '%b',
- n: '\n',
- r: '%I:%M:%S %p',
- R: '%H:%M',
- t: '\t',
- T: '%H:%M:%S',
- x: 'locale',
- X: 'locale'
-};
-
-//! \cond FALSE
-// Cache timezone values because they will never change for a given JS instance
-Date.ext.aggregates.z = Date.ext.formats.z(new Date());
-Date.ext.aggregates.Z = Date.ext.formats.Z(new Date());
-//! \endcond
-
-//! List of unsupported format specifiers.
-/**
- * \details
- * All format specifiers supported by the PHP implementation are supported by
- * this javascript implementation.
- */
-Date.ext.unsupported = { };
-
-
-/**
- * \brief Formats the date according to the specified format.
- * \param fmt The format to format the date in. This may be a combination of the following:
- * \copydoc formats
- *
- * \return A string representation of the date formatted based on the passed in parameter
- * \sa http://www.php.net/strftime for documentation on format specifiers
-*/
-Date.prototype.strftime=function(fmt)
-{
- // Fix locale if declared locale hasn't been defined
- // After the first call this condition should never be entered unless someone changes the locale
- if(!(this.locale in Date.ext.locales))
- {
- if(this.locale.replace(/-[a-zA-Z]+$/, '') in Date.ext.locales)
- {
- this.locale = this.locale.replace(/-[a-zA-Z]+$/, '');
- }
- else
- {
- this.locale = 'en-GB';
- }
- }
-
- var d = this;
- // First replace aggregates
- while(fmt.match(/%[cDhnrRtTxXzZ]/))
- {
- fmt = fmt.replace(/%([cDhnrRtTxXzZ])/g, function(m0, m1)
- {
- var f = Date.ext.aggregates[m1];
- return (f == 'locale' ? Date.ext.locales[d.locale][m1] : f);
- });
- }
-
-
- // Now replace formats - we need a closure so that the date object gets passed through
- var str = fmt.replace(/%([aAbBCdegGHIjmMpPSuUVwWyY%])/g, function(m0, m1)
- {
- var f = Date.ext.formats[m1];
- if(typeof(f) == 'string') {
- return d[f]();
- } else if(typeof(f) == 'function') {
- return f.call(d, d);
- } else if(typeof(f) == 'object' && typeof(f[0]) == 'string') {
- return Date.ext.util.xPad(d[f[0]](), f[1]);
- } else {
- return m1;
- }
- });
- d=null;
- return str;
-};
-
-/**
- * \mainpage strftime for Javascript
- *
- * \section toc Table of Contents
- * - \ref intro_sec
- * - <a class="el" href="strftime.js">Download full source</a> / <a class="el" href="strftime-min.js">minified</a>
- * - \subpage usage
- * - \subpage format_specifiers
- * - \subpage localisation
- * - \link strftime.js API Documentation \endlink
- * - \subpage demo
- * - \subpage changelog
- * - \subpage faq
- * - <a class="el" href="http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html">Feedback</a>
- * - \subpage copyright_licence
- *
- * \section intro_sec Introduction
- *
- * C and PHP developers have had access to a built in strftime function for a long time.
- * This function is an easy way to format dates and times for various display needs.
- *
- * This library brings the flexibility of strftime to the javascript Date object
- *
- * Use this library if you frequently need to format dates in javascript in a variety of ways. For example,
- * if you have PHP code that writes out formatted dates, and want to mimic the functionality using
- * progressively enhanced javascript, then this library can do exactly what you want.
- *
- *
- *
- *
- * \page usage Example usage
- *
- * \section usage_sec Usage
- * This library may be used as follows:
- * \code
- * var d = new Date();
- *
- * var ymd = d.strftime('%Y/%m/%d');
- * var iso = d.strftime('%Y-%m-%dT%H:%M:%S%z');
- *
- * \endcode
- *
- * \subsection examples Examples
- *
- * To get the current time in hours and minutes:
- * \code
- * var d = new Date();
- * d.strftime("%H:%M");
- * \endcode
- *
- * To get the current time with seconds in AM/PM notation:
- * \code
- * var d = new Date();
- * d.strftime("%r");
- * \endcode
- *
- * To get the year and day of the year for August 23, 2009:
- * \code
- * var d = new Date('2009/8/23');
- * d.strftime("%Y-%j");
- * \endcode
- *
- * \section demo_sec Demo
- *
- * Try your own examples on the \subpage demo page. You can use any of the supported
- * \subpage format_specifiers.
- *
- *
- *
- *
- * \page localisation Localisation
- * You can localise strftime by implementing the short and long forms for days of the
- * week and months of the year, and the localised aggregates for the preferred date
- * and time representation for your locale. You need to add your locale to the
- * Date.ext.locales object.
- *
- * \section localising_fr Localising for french
- *
- * For example, this is how we'd add French language strings to the locales object:
- * \dontinclude index.html
- * \skip Generic french
- * \until };
- * The % format specifiers are all defined in \ref formats. You can use any of those.
- *
- * This locale definition may be included in your own source file, or in the HTML file
- * including \c strftime.js, however it must be defined \em after including \c strftime.js
- *
- * The above definition includes generic french strings and formats that are used in France.
- * Other french speaking countries may have other representations for dates and times, so we
- * need to override this for them. For example, Canadian french uses a Y-m-d date format,
- * while French french uses d.m.Y. We fix this by defining Canadian french to be the same
- * as generic french, and then override the format specifiers for \c x for the \c fr-CA locale:
- * \until End french
- *
- * You can now use any of the French locales at any time by setting \link Date.prototype.locale Date.locale \endlink
- * to \c "fr", \c "fr-FR", \c "fr-CA", or any other french dialect:
- * \code
- * var d = new Date("2008/04/22");
- * d.locale = "fr";
- *
- * d.strftime("%A, %d %B == %x");
- * \endcode
- * will return:
- * \code
- * mardi, 22 avril == 22.04.2008
- * \endcode
- * While changing the locale to "fr-CA":
- * \code
- * d.locale = "fr-CA";
- *
- * d.strftime("%A, %d %B == %x");
- * \endcode
- * will return:
- * \code
- * mardi, 22 avril == 2008-04-22
- * \endcode
- *
- * You can use any of the format specifiers defined at \ref formats
- *
- * The locale for all dates defaults to the value of the \c lang attribute of your HTML document if
- * it is set, or to \c "en" otherwise.
- * \note
- * Your locale definitions \b MUST be added to the locale object before calling
- * \link Date.prototype.strftime Date.strftime \endlink.
- *
- * \sa \ref formats for a list of format specifiers that can be used in your definitions
- * for c, x and X.
- *
- * \section locale_names Locale names
- *
- * Locale names are defined in RFC 1766. Typically, a locale would be a two letter ISO639
- * defined language code and an optional ISO3166 defined country code separated by a -
- *
- * eg: fr-FR, de-DE, hi-IN
- *
- * \sa http://www.ietf.org/rfc/rfc1766.txt
- * \sa http://www.loc.gov/standards/iso639-2/php/code_list.php
- * \sa http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm
- *
- * \section locale_fallback Locale fallbacks
- *
- * If a locale object corresponding to the fully specified locale isn't found, an attempt will be made
- * to fall back to the two letter language code. If a locale object corresponding to that isn't found
- * either, then the locale will fall back to \c "en". No warning will be issued.
- *
- * For example, if we define a locale for de:
- * \until };
- * Then set the locale to \c "de-DE":
- * \code
- * d.locale = "de-DE";
- *
- * d.strftime("%a, %d %b");
- * \endcode
- * In this case, the \c "de" locale will be used since \c "de-DE" has not been defined:
- * \code
- * Di, 22 Apr
- * \endcode
- *
- * Swiss german will return the same since it will also fall back to \c "de":
- * \code
- * d.locale = "de-CH";
- *
- * d.strftime("%a, %d %b");
- * \endcode
- * \code
- * Di, 22 Apr
- * \endcode
- *
- * We need to override the \c a specifier for Swiss german, since it's different from German german:
- * \until End german
- * We now get the correct results:
- * \code
- * d.locale = "de-CH";
- *
- * d.strftime("%a, %d %b");
- * \endcode
- * \code
- * Die, 22 Apr
- * \endcode
- *
- * \section builtin_locales Built in locales
- *
- * This library comes with pre-defined locales for en, en-GB, en-US and en-AU.
- *
- *
- *
- *
- * \page format_specifiers Format specifiers
- *
- * \section specifiers Format specifiers
- * strftime has several format specifiers defined by the Open group at
- * http://www.opengroup.org/onlinepubs/007908799/xsh/strftime.html
- *
- * PHP added a few of its own, defined at http://www.php.net/strftime
- *
- * This javascript implementation supports all the PHP specifiers
- *
- * \subsection supp Supported format specifiers:
- * \copydoc formats
- *
- * \subsection unsupportedformats Unsupported format specifiers:
- * \copydoc unsupported
- *
- *
- *
- *
- * \page demo strftime demo
- * <div style="float:right;width:45%;">
- * \copydoc formats
- * </div>
- * \htmlinclude index.html
- *
- *
- *
- *
- * \page faq FAQ
- *
- * \section how_tos Usage
- *
- * \subsection howtouse Is there a manual on how to use this library?
- *
- * Yes, see \ref usage
- *
- * \subsection wheretoget Where can I get a minified version of this library?
- *
- * The minified version is available <a href="strftime-min.js" title="Minified strftime.js">here</a>.
- *
- * \subsection which_specifiers Which format specifiers are supported?
- *
- * See \ref format_specifiers
- *
- * \section whys Why?
- *
- * \subsection why_lib Why this library?
- *
- * I've used the strftime function in C, PHP and the Unix shell, and found it very useful
- * to do date formatting. When I needed to do date formatting in javascript, I decided
- * that it made the most sense to just reuse what I'm already familiar with.
- *
- * \subsection why_another Why another strftime implementation for Javascript?
- *
- * Yes, there are other strftime implementations for Javascript, but I saw problems with
- * all of them that meant I couldn't use them directly. Some implementations had bad
- * designs. For example, iterating through all possible specifiers and scanning the string
- * for them. Others were tied to specific libraries like prototype.
- *
- * Trying to extend any of the existing implementations would have required only slightly
- * less effort than writing this from scratch. In the end it took me just about 3 hours
- * to write the code and about 6 hours battling with doxygen to write these docs.
- *
- * I also had an idea of how I wanted to implement this, so decided to try it.
- *
- * \subsection why_extend_date Why extend the Date class rather than subclass it?
- *
- * I tried subclassing Date and failed. I didn't want to waste time on figuring
- * out if there was a problem in my code or if it just wasn't possible. Adding to the
- * Date.prototype worked well, so I stuck with it.
- *
- * I did have some worries because of the way for..in loops got messed up after json.js added
- * to the Object.prototype, but that isn't an issue here since {} is not a subclass of Date.
- *
- * My last doubt was about the Date.ext namespace that I created. I still don't like this,
- * but I felt that \c ext at least makes clear that this is external or an extension.
- *
- * It's quite possible that some future version of javascript will add an \c ext or a \c locale
- * or a \c strftime property/method to the Date class, but this library should probably
- * check for capabilities before doing what it does.
- *
- * \section curiosity Curiosity
- *
- * \subsection how_big How big is the code?
- *
- * \arg 26K bytes with documentation
- * \arg 4242 bytes minified using <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a>
- * \arg 1477 bytes minified and gzipped
- *
- * \subsection how_long How long did it take to write this?
- *
- * 15 minutes for the idea while I was composing this blog post:
- * http://tech.bluesmoon.info/2008/04/javascript-date-functions.html
- *
- * 3 hours in one evening to write v1.0 of the code and 6 hours the same
- * night to write the docs and this manual. As you can tell, I'm fairly
- * sleepy.
- *
- * Versions 1.1 and 1.2 were done in a couple of hours each, and version 1.3
- * in under one hour.
- *
- * \section contributing Contributing
- *
- * \subsection how_to_rfe How can I request features or make suggestions?
- *
- * You can leave a comment on my blog post about this library here:
- * http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html
- *
- * \subsection how_to_contribute Can I/How can I contribute code to this library?
- *
- * Yes, that would be very nice, thank you. You can do various things. You can make changes
- * to the library, and make a diff against the current file and mail me that diff at
- * philip@bluesmoon.info, or you could just host the new file on your own servers and add
- * your name to the copyright list at the top stating which parts you've added.
- *
- * If you do mail me a diff, let me know how you'd like to be listed in the copyright section.
- *
- * \subsection copyright_signover Who owns the copyright on contributed code?
- *
- * The contributor retains copyright on contributed code.
- *
- * In some cases I may use contributed code as a template and write the code myself. In this
- * case I'll give the contributor credit for the idea, but will not add their name to the
- * copyright holders list.
- *
- *
- *
- *
- * \page copyright_licence Copyright & Licence
- *
- * \section copyright Copyright
- * \dontinclude strftime.js
- * \skip Copyright
- * \until rights
- *
- * \section licence Licence
- * \skip This code
- * \until SUCH DAMAGE.
- *
- *
- *
- * \page changelog ChangeLog
- *
- * \par 1.3 - 2008/06/17:
- * - Fixed padding issue with negative timezone offsets in %r
- * reported and fixed by Mikko <mikko.heimola@iki.fi>
- * - Added support for %P
- * - Internationalised %r, %p and %P
- *
- * \par 1.2 - 2008/04/27:
- * - Fixed support for c (previously it just returned toLocaleString())
- * - Add support for c, x and X
- * - Add locales for en-GB, en-US and en-AU
- * - Make en-GB the default locale (previous was en)
- * - Added more localisation docs
- *
- * \par 1.1 - 2008/04/27:
- * - Fix bug in xPad which wasn't padding more than a single digit
- * - Fix bug in j which had an off by one error for days after March 10th because of daylight savings
- * - Add support for g, G, U, V and W
- *
- * \par 1.0 - 2008/04/22:
- * - Initial release with support for a, A, b, B, c, C, d, D, e, H, I, j, m, M, p, r, R, S, t, T, u, w, y, Y, z, Z, and %
- */
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/date_time_picker.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/date_time_picker.css
deleted file mode 100644
index a44c3560..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/date_time_picker.css
+++ /dev/null
@@ -1,557 +0,0 @@
-/**
- * @license angular-circular-timepicker version: 0.1.0
- * Copyright 2016 sidaudhi.com, Inc. http://www.sidaudhi.com
- * License: MIT
- *
- * @author Siddharth Audhinarayanan
- * @since 2016-Jan-31
- */
-
-.datetimepicker {
- font-family: Arial;
-}
-
-.datetimepicker div,
-.datetimepicker span,
-.datetimepicker object,
-.datetimepicker iframe,
-.datetimepicker h1,
-.datetimepicker h2,
-.datetimepicker h3,
-.datetimepicker h4,
-.datetimepicker h5,
-.datetimepicker h6,
-.datetimepicker p,
-.datetimepicker pre,
-.datetimepicker a,
-.datetimepicker abbr,
-.datetimepicker acronym,
-.datetimepicker address,
-.datetimepicker code,
-.datetimepicker del,
-.datetimepicker dfn,
-.datetimepicker em,
-.datetimepicker img,
-.datetimepicker dl,
-.datetimepicker dt,
-.datetimepicker dd,
-.datetimepicker ol,
-.datetimepicker ul,
-.datetimepicker li,
-.datetimepicker fieldset,
-.datetimepicker form,
-.datetimepicker label,
-.datetimepicker legend,
-.datetimepicker caption,
-.datetimepicker tbody,
-.datetimepicker tfoot,
-.datetimepicker thead,
-.datetimepicker tr {
- margin: 0;
- padding: 0;
- border: 0;
- outline: 0;
- font-weight: inherit;
- font-style: inherit;
- font-family: inherit;
- font-size: 100%;
- vertical-align: baseline;
-}
-
-.datetimepicker table {
- border-collapse: separate;
- border-spacing: 0;
- vertical-align: middle;
-}
-
-.datetimepicker caption,
-.datetimepicker th,
-.datetimepicker td {
- text-align: left;
- font-weight: normal;
- vertical-align: middle;
-}
-
-.datetimepicker a img {
- border: none;
-}
-
-.datetimepicker .left {
- float: left;
-}
-
-.datetimepicker .right {
- float: right;
-}
-
-.datetimepicker .datetimepicker-display {
- padding: 6px 12px;
- border: 1px solid rgba(0,0,0,0.15);
- font-size: 15px;
- min-height: 34px;
-}
-
-.datetimepicker .datetimepicker-toggle {
- float: right;
- padding: 7px;
- border: 0px;
- cursor: pointer;
-}
-
-.datetimepicker .datetimepicker-modal {
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- background-color: rgba(0,0,0,0.5);
- position: fixed;
- z-index: 990;
-}
-
-.datetimepicker .datetimepicker-close {
- position: fixed;
- right: 10px;
- top: 5px;
- color: #fff;
- font-size: 24px;
- cursor: pointer;
- z-index: 999;
-}
-
-.datetimepicker .datetimepicker-preview {
- padding: 5px;
- text-align: center;
- cursor: pointer;
- font-size: 18px;
- background-color: #0574AC;
- color: #fff;
-}
-
-.datetimepicker .datetimepicker-content {
- min-height: 300px;
- background-color: #fff;
- border: 1px solid rgba(0,0,0,0.15);
- border-top: 0px;
- position: relative;
- width: 290px;
- z-index: 998;
-}
-
-.datetimepicker .datetimepicker-content.datetimepicker-absolute {
- position: fixed;
- top: calc(30% - 100px);
- left: calc(50% - 145px);
- border: 0px;
- -webkit-box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
- box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);
-}
-
-.datetimepicker .datetimepicker-content .datetimepicker-tabs {
- background-color: #0574AC;
-}
-
-.datetimepicker .datetimepicker-content .datetimepicker-tabs .datetimepicker-tab {
- width: 50%;
- display: inline-block;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- padding: 5px;
- text-align: center;
- font-size: 13px;
- text-transform: uppercase;
- color: #fff;
- cursor: pointer;
- background-color: #f3f3f4;
- color: #0574AC;
-}
-
-.datetimepicker .datetimepicker-content .datetimepicker-tabs .datetimepicker-tab.active {
- background-color: #0574AC;
- color: #f3f3f4;
- font-weight: bold;
-}
-
-.datetimepicker .datetimepicker-content .datetimepicker-month {
- border-bottom: 1px solid rgba(0,0,0,0.2);
- background-color: #fff;
-}
-
-.datetimepicker .datetimepicker-content .datetimepicker-month .datetimepicker-current-month {
- text-align: center;
- padding: 10px 10px;
-}
-
-.datetimepicker .datetimepicker-calendar {
- text-align: center;
- padding: 10px 0px;
-}
-
-.datetimepicker .datetimepicker-calendar .datetimepicker-day {
- width: 38px;
- display: inline-block;
- text-align: center;
- padding: 10px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- font-weight: bold;
- color: #0574AC;
- font-size: 15px;
-}
-
-.datetimepicker .datetimepicker-calendar .datetimepicker-day.datetimepicker-leading-day,
-.datetimepicker .datetimepicker-calendar .datetimepicker-day.datetimepicker-trailing-day {
- font-weight: normal;
- color: rgba(0,0,0,0.25);
-}
-
-.datetimepicker .datetimepicker-calendar .datetimepicker-day.datetimepicker-active-day {
- font-weight: normal;
- color: rgba(0,0,0,0.75);
- font-size: 14px;
-}
-
-.datetimepicker .datetimepicker-calendar .datetimepicker-day.datetimepicker-active-day.selected,
-.datetimepicker .datetimepicker-calendar .datetimepicker-day.datetimepicker-active-day:hover {
- color: #fff;
- background-color: #0574AC;
- cursor: pointer;
-}
-
-.datetimepicker .time-circle-outer {
- width: 240px;
- height: 240px;
- border: 3px dashed rgba(0,0,0,0.1);
- -webkit-border-radius: 50%;
- border-radius: 50%;
- margin: 30px auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- position: relative;
-}
-
-.datetimepicker .time-circle-outer .time-circle-center {
- position: absolute;
- top: calc(50% - 10px);
- left: calc(50% - 10px);
- width: 20px;
- height: 20px;
- background-color: #0574AC;
- -webkit-border-radius: 50%;
- border-radius: 50%;
-}
-
-.datetimepicker .time-circle-outer .time-meridian {
- position: absolute;
- top: -70px;
- width: 30px;
- height: 30px;
- padding: 7px 5px;
- -webkit-border-radius: 50%;
- border-radius: 50%;
- font-size: 13px;
- font-weight: bold;
- cursor: pointer;
- color: #0574AC;
- text-align: center;
-}
-
-.datetimepicker .time-circle-outer .time-meridian.time-left {
- left: -15px;
-}
-
-.datetimepicker .time-circle-outer .time-meridian.time-right {
- right: -15px;
-}
-
-.datetimepicker .time-circle-outer .time-meridian.selected {
- background-color: #0574AC;
- color: #fff;
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand {
- width: 6px;
- height: 82px;
- position: absolute;
- left: calc(50% - 3px);
- top: calc(50% - 82px);
- -webkit-transform-origin: 50% 100%;
- -moz-transform-origin: 50% 100%;
- -o-transform-origin: 50% 100%;
- -ms-transform-origin: 50% 100%;
- transform-origin: 50% 100%;
- background-color: #0574AC;
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-1 {
- -webkit-transform: rotate(30deg);
- -moz-transform: rotate(30deg);
- -o-transform: rotate(30deg);
- -ms-transform: rotate(30deg);
- transform: rotate(30deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-2 {
- -webkit-transform: rotate(60deg);
- -moz-transform: rotate(60deg);
- -o-transform: rotate(60deg);
- -ms-transform: rotate(60deg);
- transform: rotate(60deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-3 {
- -webkit-transform: rotate(90deg);
- -moz-transform: rotate(90deg);
- -o-transform: rotate(90deg);
- -ms-transform: rotate(90deg);
- transform: rotate(90deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-4 {
- -webkit-transform: rotate(120deg);
- -moz-transform: rotate(120deg);
- -o-transform: rotate(120deg);
- -ms-transform: rotate(120deg);
- transform: rotate(120deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-5 {
- -webkit-transform: rotate(150deg);
- -moz-transform: rotate(150deg);
- -o-transform: rotate(150deg);
- -ms-transform: rotate(150deg);
- transform: rotate(150deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-6 {
- -webkit-transform: rotate(180deg);
- -moz-transform: rotate(180deg);
- -o-transform: rotate(180deg);
- -ms-transform: rotate(180deg);
- transform: rotate(180deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-7 {
- -webkit-transform: rotate(210deg);
- -moz-transform: rotate(210deg);
- -o-transform: rotate(210deg);
- -ms-transform: rotate(210deg);
- transform: rotate(210deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-8 {
- -webkit-transform: rotate(240deg);
- -moz-transform: rotate(240deg);
- -o-transform: rotate(240deg);
- -ms-transform: rotate(240deg);
- transform: rotate(240deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-9 {
- -webkit-transform: rotate(270deg);
- -moz-transform: rotate(270deg);
- -o-transform: rotate(270deg);
- -ms-transform: rotate(270deg);
- transform: rotate(270deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-10 {
- -webkit-transform: rotate(300deg);
- -moz-transform: rotate(300deg);
- -o-transform: rotate(300deg);
- -ms-transform: rotate(300deg);
- transform: rotate(300deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-11 {
- -webkit-transform: rotate(330deg);
- -moz-transform: rotate(330deg);
- -o-transform: rotate(330deg);
- -ms-transform: rotate(330deg);
- transform: rotate(330deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand.deg-12 {
- -webkit-transform: rotate(360deg);
- -moz-transform: rotate(360deg);
- -o-transform: rotate(360deg);
- -ms-transform: rotate(360deg);
- transform: rotate(360deg);
-}
-
-.datetimepicker .time-circle-outer .time-circle-hand-large {
- height: 120px;
- top: calc(50% - 120px);
-}
-
-.datetimepicker .time-circle-outer .time {
- position: absolute;
- margin-top: -15px;
- margin-left: -15px;
- background-color: #b4b4b4;
- -webkit-border-radius: 50%;
- border-radius: 50%;
- padding: 5px;
- height: 28px;
- width: 28px;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- text-align: center;
- font-size: 13px;
- cursor: pointer;
- color: rgba(0,0,0,0.75);
-}
-
-.datetimepicker .time-circle-outer .time:hover,
-.datetimepicker .time-circle-outer .time.selected {
- background-color: #0574AC;
- color: #fff;
-}
-
-.datetimepicker .time-circle-outer .time-1 {
- left: calc(50% + 60px);
- top: 16.076951545867374px;
-}
-
-.datetimepicker .time-circle-outer .time-2 {
- left: calc(50% + 103.92304845413263px);
- top: 60px;
-}
-
-.datetimepicker .time-circle-outer .time-3 {
- left: calc(50% + 120px);
- top: 120px;
-}
-
-.datetimepicker .time-circle-outer .time-4 {
- left: calc(50% + 103.92304845413263px);
- top: 180px;
-}
-
-.datetimepicker .time-circle-outer .time-5 {
- left: calc(50% + 60px);
- top: 223.92304845413264px;
-}
-
-.datetimepicker .time-circle-outer .time-6 {
- left: 50%;
- top: 240px;
-}
-
-.datetimepicker .time-circle-outer .time-11 {
- left: calc(50% - 60px);
- top: 16.076951545867374px;
-}
-
-.datetimepicker .time-circle-outer .time-10 {
- left: calc(50% - 103.92304845413263px);
- top: 60px;
-}
-
-.datetimepicker .time-circle-outer .time-9 {
- left: calc(50% - 120px);
- top: 120px;
-}
-
-.datetimepicker .time-circle-outer .time-8 {
- left: calc(50% - 103.92304845413263px);
- top: 180px;
-}
-
-.datetimepicker .time-circle-outer .time-7 {
- left: calc(50% - 60px);
- top: 223.92304845413264px;
-}
-
-.datetimepicker .time-circle-outer .time-12 {
- left: 50%;
- top: 0px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner {
- width: 164px;
- height: 164px;
- border: 3px dashed rgba(0,0,0,0.1);
- -webkit-border-radius: 50%;
- border-radius: 50%;
- margin: 35px auto;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- position: relative;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-1 {
- left: calc(50% + 41px);
- top: 10.985916889676034px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-2 {
- left: calc(50% + 71.01408311032397px);
- top: 41px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-3 {
- left: calc(50% + 82px);
- top: 82px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-4 {
- left: calc(50% + 71.01408311032397px);
- top: 123px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-5 {
- left: calc(50% + 41px);
- top: 153.01408311032395px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-6 {
- left: 50%;
- top: 164px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-11 {
- left: calc(50% - 41px);
- top: 10.985916889676034px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-10 {
- left: calc(50% - 71.01408311032397px);
- top: 41px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-9 {
- left: calc(50% - 82px);
- top: 82px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-8 {
- left: calc(50% - 71.01408311032397px);
- top: 123px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-7 {
- left: calc(50% - 41px);
- top: 153.01408311032395px;
-}
-
-.datetimepicker .time-circle-outer .time-circle-inner .time-12 {
- left: 50%;
- top: 0px;
-}
-
-.datetimepicker .datetimepicker-action {
- cursor: pointer;
- font-weight: bold;
- line-height: 18px;
- padding: 10px 10px;
-}
-
-.datetimepicker .datetimepicker-action:hover {
- background-color: rgba(5, 116, 172, 1);
- cursor: pointer;
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/dynamicform.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/dynamicform.js
deleted file mode 100644
index e711f414..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/dynamicform.js
+++ /dev/null
@@ -1,112 +0,0 @@
-angular.module('quantum')
- .directive('formBuilder', ['$q', '$parse', '$http', '$templateCache', '$compile', '$document', '$timeout', function ($q, $parse, $http, $templateCache, $compile, $document, $timeout) {
- return {
- restrict: 'E', // supports using directive as element only
- scope:{
- ngModel: '=',
- ngFormFields: '=',
- ngNumFormCols: '=',
- ngTriggerMethod: '=',
- ngShowFieldId: '='
- },
- link: function ($scope, element, attrs) {
- $scope.element=element;
- $scope.datetimeformat = "MM/dd/yyyy hh:mm a";
-
- $scope.buildField = function (field, parentElement) {
- var x = '';
- if(field.visible) {
- if (field.fieldType === 'LIST_MULTI_SELECT') {
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br>'+
- '<div class="select2-container ebz-listbox form-field" style="height:100px;" tabindex="0" >'+
- '<label ng-repeat="item in ngModel.'+field.fieldId+'" style="display:block;">'+
- '<input type="checkbox" style="margin-top: 10px;" ng-model="item.defaultValue" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-checkbox title="{{item.title}}"/> {{item.title}}<br/>'+
- '</label>'+
- '</div>');
- } else if (field.fieldType === 'LIST_BOX') {
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <div class="form-field" att-select="formFieldLuValues.'+field.fieldId+'" ng-model="ngModel.'+field.fieldId+'" ng-change="triggerFormFields('+field.triggerOtherFormFields+')"></div>');
- } else if((field.fieldType === 'text' || field.fieldType === 'TEXT') && field.validationType === 'DATE'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input id="'+field.fieldId+'" type="text" ng-model="ngModel.'+field.fieldId+'" tabindex="0" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-datepicker>');
- } else if((field.fieldType === 'text' || field.fieldType === 'TEXT') && field.validationType === 'TIMESTAMP_MIN'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input id="'+field.fieldId+'" type="text" date-format="datetimeformat" ng-model="ngModel.'+field.fieldId+'" tabindex="0" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-date-time-picker>');
- } else if(field.fieldType === 'text' || field.fieldType === 'TEXT'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input type="text" class="form-field" ng-model="ngModel.'+field.fieldId+'" maxlength="'+field.length+'" ng-blur="triggerFormFields('+field.triggerOtherFormFields+')" />');
- } else if(field.fieldType === 'CHECK_BOX'){
- x = angular.element('<label><i>'+field.fieldDisplayName+'<span ng-show="ngShowFieldId"> [ '+field.fieldId+' ] </span>:</i></label><br> <input type="checkbox" ng-model="ngModel.'+field.fieldId+'" tabindex="0" ng-change="triggerFormFields('+field.triggerOtherFormFields+')" att-checkbox>');
- }
- }
- parentElement.append(x);
- $compile(x)($scope);
- };
- $scope.buildForm = function() {
- // create elements <table> and a <tbody>
- var tbl = angular.element("<table></table>");
- var tblBody = angular.element("<tbody></tbody>");
- var row = angular.element("<tr></tr>");
-
- var ngFormFieldsLength = $scope.ngFormFields.length;
-
- for (var j = 0; j < ngFormFieldsLength; j++) {
- var cell = angular.element("<td style='padding: 5px;'></td>");
- $scope.buildField($scope.ngFormFields[j],cell);
- row.append(cell);
-
- if((j!=0 && (j+1)%$scope.ngNumFormCols==0) || j==(ngFormFieldsLength-1)){
- tblBody.append(row);
- row = angular.element("<tr></tr>");
- }
- }
- tbl.append(tblBody);
- angular.element($scope.element).html('');
- $scope.element.append(tbl);
- };
-
-
- $scope.formFieldLuValues = {};
- $scope.getEBZFormat = function() {
- if($scope.ngFormFields && $scope.ngFormFields.length>0){
- $scope.ngFormFields.forEach(function(formField) {
- if(formField.fieldType === 'LIST_MULTI_SELECT') {
- $scope.ngModel[formField.fieldId]= [];
- if(formField.formFieldValues && formField.formFieldValues.length>0){
- formField.formFieldValues.forEach(function(entry,i) {
- $scope.ngModel[formField.fieldId].push({ index: i, value: entry.id, title: entry.name, defaultValue: entry.defaultValue});
- });
- }
- } else if(formField.fieldType==='LIST_BOX') {
- $scope.formFieldLuValues[formField.fieldId]= [];
- if(formField.formFieldValues && formField.formFieldValues.length>0){
- formField.formFieldValues.forEach(function(entry,i) {
- $scope.formFieldLuValues[formField.fieldId].push({ index: i, value: entry.id, title: entry.name});
- if(entry.defaultValue){
- $scope.ngModel[formField.fieldId]={ index: i, value: entry.id, title: entry.name};
- }
- });
- }
- } else if(formField.fieldType === 'text' || formField.fieldType === 'TEXT' ||
- formField.validationType === 'DATE' || formField.validationType === 'TIMESTAMP_MIN') {
- if(formField.formFieldValues && formField.formFieldValues.length>0){
- $scope.ngModel[formField.fieldId]=formField.formFieldValues[0].id;
- }
- }
- });
- }
- };
-
- $scope.$watch("ngFormFields",function(newValue,oldValue) {
- if($scope.ngFormFields){
- $scope.getEBZFormat();
- $scope.buildForm();
- }
- });
-
- $scope.triggerFormFields = function(triggerFlag) {
- if(triggerFlag){
- $scope.element.html('Loading...');
- $scope.ngTriggerMethod();
- }
- };
-
- }
- };
- }]);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/moment.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/moment.js
deleted file mode 100644
index b5f0b364..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/moment.js
+++ /dev/null
@@ -1,3688 +0,0 @@
-//! moment.js
-//! version : 2.12.0
-//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
-//! license : MIT
-//! momentjs.com
-
-;(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
- typeof define === 'function' && define.amd ? define(factory) :
- global.moment = factory()
-}(this, function () { 'use strict';
-
- var hookCallback;
-
- function utils_hooks__hooks () {
- return hookCallback.apply(null, arguments);
- }
-
- // This is done to register the method called with moment()
- // without creating circular dependencies.
- function setHookCallback (callback) {
- hookCallback = callback;
- }
-
- function isArray(input) {
- return input instanceof Array || Object.prototype.toString.call(input) === '[object Array]';
- }
-
- function isDate(input) {
- return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';
- }
-
- function map(arr, fn) {
- var res = [], i;
- for (i = 0; i < arr.length; ++i) {
- res.push(fn(arr[i], i));
- }
- return res;
- }
-
- function hasOwnProp(a, b) {
- return Object.prototype.hasOwnProperty.call(a, b);
- }
-
- function extend(a, b) {
- for (var i in b) {
- if (hasOwnProp(b, i)) {
- a[i] = b[i];
- }
- }
-
- if (hasOwnProp(b, 'toString')) {
- a.toString = b.toString;
- }
-
- if (hasOwnProp(b, 'valueOf')) {
- a.valueOf = b.valueOf;
- }
-
- return a;
- }
-
- function create_utc__createUTC (input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, true).utc();
- }
-
- function defaultParsingFlags() {
- // We need to deep clone this object.
- return {
- empty : false,
- unusedTokens : [],
- unusedInput : [],
- overflow : -2,
- charsLeftOver : 0,
- nullInput : false,
- invalidMonth : null,
- invalidFormat : false,
- userInvalidated : false,
- iso : false
- };
- }
-
- function getParsingFlags(m) {
- if (m._pf == null) {
- m._pf = defaultParsingFlags();
- }
- return m._pf;
- }
-
- function valid__isValid(m) {
- if (m._isValid == null) {
- var flags = getParsingFlags(m);
- m._isValid = !isNaN(m._d.getTime()) &&
- flags.overflow < 0 &&
- !flags.empty &&
- !flags.invalidMonth &&
- !flags.invalidWeekday &&
- !flags.nullInput &&
- !flags.invalidFormat &&
- !flags.userInvalidated;
-
- if (m._strict) {
- m._isValid = m._isValid &&
- flags.charsLeftOver === 0 &&
- flags.unusedTokens.length === 0 &&
- flags.bigHour === undefined;
- }
- }
- return m._isValid;
- }
-
- function valid__createInvalid (flags) {
- var m = create_utc__createUTC(NaN);
- if (flags != null) {
- extend(getParsingFlags(m), flags);
- }
- else {
- getParsingFlags(m).userInvalidated = true;
- }
-
- return m;
- }
-
- function isUndefined(input) {
- return input === void 0;
- }
-
- // Plugins that add properties should also add the key here (null value),
- // so we can properly clone ourselves.
- var momentProperties = utils_hooks__hooks.momentProperties = [];
-
- function copyConfig(to, from) {
- var i, prop, val;
-
- if (!isUndefined(from._isAMomentObject)) {
- to._isAMomentObject = from._isAMomentObject;
- }
- if (!isUndefined(from._i)) {
- to._i = from._i;
- }
- if (!isUndefined(from._f)) {
- to._f = from._f;
- }
- if (!isUndefined(from._l)) {
- to._l = from._l;
- }
- if (!isUndefined(from._strict)) {
- to._strict = from._strict;
- }
- if (!isUndefined(from._tzm)) {
- to._tzm = from._tzm;
- }
- if (!isUndefined(from._isUTC)) {
- to._isUTC = from._isUTC;
- }
- if (!isUndefined(from._offset)) {
- to._offset = from._offset;
- }
- if (!isUndefined(from._pf)) {
- to._pf = getParsingFlags(from);
- }
- if (!isUndefined(from._locale)) {
- to._locale = from._locale;
- }
-
- if (momentProperties.length > 0) {
- for (i in momentProperties) {
- prop = momentProperties[i];
- val = from[prop];
- if (!isUndefined(val)) {
- to[prop] = val;
- }
- }
- }
-
- return to;
- }
-
- var updateInProgress = false;
-
- // Moment prototype object
- function Moment(config) {
- copyConfig(this, config);
- this._d = new Date(config._d != null ? config._d.getTime() : NaN);
- // Prevent infinite loop in case updateOffset creates new moment
- // objects.
- if (updateInProgress === false) {
- updateInProgress = true;
- utils_hooks__hooks.updateOffset(this);
- updateInProgress = false;
- }
- }
-
- function isMoment (obj) {
- return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);
- }
-
- function absFloor (number) {
- if (number < 0) {
- return Math.ceil(number);
- } else {
- return Math.floor(number);
- }
- }
-
- function toInt(argumentForCoercion) {
- var coercedNumber = +argumentForCoercion,
- value = 0;
-
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
- value = absFloor(coercedNumber);
- }
-
- return value;
- }
-
- // compare two arrays, return the number of differences
- function compareArrays(array1, array2, dontConvert) {
- var len = Math.min(array1.length, array2.length),
- lengthDiff = Math.abs(array1.length - array2.length),
- diffs = 0,
- i;
- for (i = 0; i < len; i++) {
- if ((dontConvert && array1[i] !== array2[i]) ||
- (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {
- diffs++;
- }
- }
- return diffs + lengthDiff;
- }
-
- function warn(msg) {
- if (utils_hooks__hooks.suppressDeprecationWarnings === false &&
- (typeof console !== 'undefined') && console.warn) {
- console.warn('Deprecation warning: ' + msg);
- }
- }
-
- function deprecate(msg, fn) {
- var firstTime = true;
-
- return extend(function () {
- if (firstTime) {
- warn(msg + '\nArguments: ' + Array.prototype.slice.call(arguments).join(', ') + '\n' + (new Error()).stack);
- firstTime = false;
- }
- return fn.apply(this, arguments);
- }, fn);
- }
-
- var deprecations = {};
-
- function deprecateSimple(name, msg) {
- if (!deprecations[name]) {
- warn(msg);
- deprecations[name] = true;
- }
- }
-
- utils_hooks__hooks.suppressDeprecationWarnings = false;
-
- function isFunction(input) {
- return input instanceof Function || Object.prototype.toString.call(input) === '[object Function]';
- }
-
- function isObject(input) {
- return Object.prototype.toString.call(input) === '[object Object]';
- }
-
- function locale_set__set (config) {
- var prop, i;
- for (i in config) {
- prop = config[i];
- if (isFunction(prop)) {
- this[i] = prop;
- } else {
- this['_' + i] = prop;
- }
- }
- this._config = config;
- // Lenient ordinal parsing accepts just a number in addition to
- // number + (possibly) stuff coming from _ordinalParseLenient.
- this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\d{1,2}/).source);
- }
-
- function mergeConfigs(parentConfig, childConfig) {
- var res = extend({}, parentConfig), prop;
- for (prop in childConfig) {
- if (hasOwnProp(childConfig, prop)) {
- if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
- res[prop] = {};
- extend(res[prop], parentConfig[prop]);
- extend(res[prop], childConfig[prop]);
- } else if (childConfig[prop] != null) {
- res[prop] = childConfig[prop];
- } else {
- delete res[prop];
- }
- }
- }
- return res;
- }
-
- function Locale(config) {
- if (config != null) {
- this.set(config);
- }
- }
-
- // internal storage for locale config files
- var locales = {};
- var globalLocale;
-
- function normalizeLocale(key) {
- return key ? key.toLowerCase().replace('_', '-') : key;
- }
-
- // pick the locale from the array
- // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
- // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
- function chooseLocale(names) {
- var i = 0, j, next, locale, split;
-
- while (i < names.length) {
- split = normalizeLocale(names[i]).split('-');
- j = split.length;
- next = normalizeLocale(names[i + 1]);
- next = next ? next.split('-') : null;
- while (j > 0) {
- locale = loadLocale(split.slice(0, j).join('-'));
- if (locale) {
- return locale;
- }
- if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {
- //the next array item is better than a shallower substring of this one
- break;
- }
- j--;
- }
- i++;
- }
- return null;
- }
-
- function loadLocale(name) {
- var oldLocale = null;
- // TODO: Find a better way to register and load all the locales in Node
- if (!locales[name] && (typeof module !== 'undefined') &&
- module && module.exports) {
- try {
- oldLocale = globalLocale._abbr;
- require('./locale/' + name);
- // because defineLocale currently also sets the global locale, we
- // want to undo that for lazy loaded locales
- locale_locales__getSetGlobalLocale(oldLocale);
- } catch (e) { }
- }
- return locales[name];
- }
-
- // This function will load locale and then set the global locale. If
- // no arguments are passed in, it will simply return the current global
- // locale key.
- function locale_locales__getSetGlobalLocale (key, values) {
- var data;
- if (key) {
- if (isUndefined(values)) {
- data = locale_locales__getLocale(key);
- }
- else {
- data = defineLocale(key, values);
- }
-
- if (data) {
- // moment.duration._locale = moment._locale = data;
- globalLocale = data;
- }
- }
-
- return globalLocale._abbr;
- }
-
- function defineLocale (name, config) {
- if (config !== null) {
- config.abbr = name;
- if (locales[name] != null) {
- deprecateSimple('defineLocaleOverride',
- 'use moment.updateLocale(localeName, config) to change ' +
- 'an existing locale. moment.defineLocale(localeName, ' +
- 'config) should only be used for creating a new locale');
- config = mergeConfigs(locales[name]._config, config);
- } else if (config.parentLocale != null) {
- if (locales[config.parentLocale] != null) {
- config = mergeConfigs(locales[config.parentLocale]._config, config);
- } else {
- // treat as if there is no base config
- deprecateSimple('parentLocaleUndefined',
- 'specified parentLocale is not defined yet');
- }
- }
- locales[name] = new Locale(config);
-
- // backwards compat for now: also set the locale
- locale_locales__getSetGlobalLocale(name);
-
- return locales[name];
- } else {
- // useful for testing
- delete locales[name];
- return null;
- }
- }
-
- function updateLocale(name, config) {
- if (config != null) {
- var locale;
- if (locales[name] != null) {
- config = mergeConfigs(locales[name]._config, config);
- }
- locale = new Locale(config);
- locale.parentLocale = locales[name];
- locales[name] = locale;
-
- // backwards compat for now: also set the locale
- locale_locales__getSetGlobalLocale(name);
- } else {
- // pass null for config to unupdate, useful for tests
- if (locales[name] != null) {
- if (locales[name].parentLocale != null) {
- locales[name] = locales[name].parentLocale;
- } else if (locales[name] != null) {
- delete locales[name];
- }
- }
- }
- return locales[name];
- }
-
- // returns locale data
- function locale_locales__getLocale (key) {
- var locale;
-
- if (key && key._locale && key._locale._abbr) {
- key = key._locale._abbr;
- }
-
- if (!key) {
- return globalLocale;
- }
-
- if (!isArray(key)) {
- //short-circuit everything else
- locale = loadLocale(key);
- if (locale) {
- return locale;
- }
- key = [key];
- }
-
- return chooseLocale(key);
- }
-
- function locale_locales__listLocales() {
- return Object.keys(locales);
- }
-
- var aliases = {};
-
- function addUnitAlias (unit, shorthand) {
- var lowerCase = unit.toLowerCase();
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
- }
-
- function normalizeUnits(units) {
- return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
- }
-
- function normalizeObjectUnits(inputObject) {
- var normalizedInput = {},
- normalizedProp,
- prop;
-
- for (prop in inputObject) {
- if (hasOwnProp(inputObject, prop)) {
- normalizedProp = normalizeUnits(prop);
- if (normalizedProp) {
- normalizedInput[normalizedProp] = inputObject[prop];
- }
- }
- }
-
- return normalizedInput;
- }
-
- function makeGetSet (unit, keepTime) {
- return function (value) {
- if (value != null) {
- get_set__set(this, unit, value);
- utils_hooks__hooks.updateOffset(this, keepTime);
- return this;
- } else {
- return get_set__get(this, unit);
- }
- };
- }
-
- function get_set__get (mom, unit) {
- return mom.isValid() ?
- mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
- }
-
- function get_set__set (mom, unit, value) {
- if (mom.isValid()) {
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
- }
- }
-
- // MOMENTS
-
- function getSet (units, value) {
- var unit;
- if (typeof units === 'object') {
- for (unit in units) {
- this.set(unit, units[unit]);
- }
- } else {
- units = normalizeUnits(units);
- if (isFunction(this[units])) {
- return this[units](value);
- }
- }
- return this;
- }
-
- function zeroFill(number, targetLength, forceSign) {
- var absNumber = '' + Math.abs(number),
- zerosToFill = targetLength - absNumber.length,
- sign = number >= 0;
- return (sign ? (forceSign ? '+' : '') : '-') +
- Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
- }
-
- var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;
-
- var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g;
-
- var formatFunctions = {};
-
- var formatTokenFunctions = {};
-
- // token: 'M'
- // padded: ['MM', 2]
- // ordinal: 'Mo'
- // callback: function () { this.month() + 1 }
- function addFormatToken (token, padded, ordinal, callback) {
- var func = callback;
- if (typeof callback === 'string') {
- func = function () {
- return this[callback]();
- };
- }
- if (token) {
- formatTokenFunctions[token] = func;
- }
- if (padded) {
- formatTokenFunctions[padded[0]] = function () {
- return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
- };
- }
- if (ordinal) {
- formatTokenFunctions[ordinal] = function () {
- return this.localeData().ordinal(func.apply(this, arguments), token);
- };
- }
- }
-
- function removeFormattingTokens(input) {
- if (input.match(/\[[\s\S]/)) {
- return input.replace(/^\[|\]$/g, '');
- }
- return input.replace(/\\/g, '');
- }
-
- function makeFormatFunction(format) {
- var array = format.match(formattingTokens), i, length;
-
- for (i = 0, length = array.length; i < length; i++) {
- if (formatTokenFunctions[array[i]]) {
- array[i] = formatTokenFunctions[array[i]];
- } else {
- array[i] = removeFormattingTokens(array[i]);
- }
- }
-
- return function (mom) {
- var output = '';
- for (i = 0; i < length; i++) {
- output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];
- }
- return output;
- };
- }
-
- // format date using native date object
- function formatMoment(m, format) {
- if (!m.isValid()) {
- return m.localeData().invalidDate();
- }
-
- format = expandFormat(format, m.localeData());
- formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);
-
- return formatFunctions[format](m);
- }
-
- function expandFormat(format, locale) {
- var i = 5;
-
- function replaceLongDateFormatTokens(input) {
- return locale.longDateFormat(input) || input;
- }
-
- localFormattingTokens.lastIndex = 0;
- while (i >= 0 && localFormattingTokens.test(format)) {
- format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
- localFormattingTokens.lastIndex = 0;
- i -= 1;
- }
-
- return format;
- }
-
- var match1 = /\d/; // 0 - 9
- var match2 = /\d\d/; // 00 - 99
- var match3 = /\d{3}/; // 000 - 999
- var match4 = /\d{4}/; // 0000 - 9999
- var match6 = /[+-]?\d{6}/; // -999999 - 999999
- var match1to2 = /\d\d?/; // 0 - 99
- var match3to4 = /\d\d\d\d?/; // 999 - 9999
- var match5to6 = /\d\d\d\d\d\d?/; // 99999 - 999999
- var match1to3 = /\d{1,3}/; // 0 - 999
- var match1to4 = /\d{1,4}/; // 0 - 9999
- var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999
-
- var matchUnsigned = /\d+/; // 0 - inf
- var matchSigned = /[+-]?\d+/; // -inf - inf
-
- var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z
- var matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi; // +00 -00 +00:00 -00:00 +0000 -0000 or Z
-
- var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123
-
- // any word (or two) characters or numbers including two/three word month in arabic.
- // includes scottish gaelic two word and hyphenated months
- var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i;
-
-
- var regexes = {};
-
- function addRegexToken (token, regex, strictRegex) {
- regexes[token] = isFunction(regex) ? regex : function (isStrict, localeData) {
- return (isStrict && strictRegex) ? strictRegex : regex;
- };
- }
-
- function getParseRegexForToken (token, config) {
- if (!hasOwnProp(regexes, token)) {
- return new RegExp(unescapeFormat(token));
- }
-
- return regexes[token](config._strict, config._locale);
- }
-
- // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
- function unescapeFormat(s) {
- return regexEscape(s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
- return p1 || p2 || p3 || p4;
- }));
- }
-
- function regexEscape(s) {
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
- }
-
- var tokens = {};
-
- function addParseToken (token, callback) {
- var i, func = callback;
- if (typeof token === 'string') {
- token = [token];
- }
- if (typeof callback === 'number') {
- func = function (input, array) {
- array[callback] = toInt(input);
- };
- }
- for (i = 0; i < token.length; i++) {
- tokens[token[i]] = func;
- }
- }
-
- function addWeekParseToken (token, callback) {
- addParseToken(token, function (input, array, config, token) {
- config._w = config._w || {};
- callback(input, config._w, config, token);
- });
- }
-
- function addTimeToArrayFromToken(token, input, config) {
- if (input != null && hasOwnProp(tokens, token)) {
- tokens[token](input, config._a, config, token);
- }
- }
-
- var YEAR = 0;
- var MONTH = 1;
- var DATE = 2;
- var HOUR = 3;
- var MINUTE = 4;
- var SECOND = 5;
- var MILLISECOND = 6;
- var WEEK = 7;
- var WEEKDAY = 8;
-
- function daysInMonth(year, month) {
- return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
- }
-
- // FORMATTING
-
- addFormatToken('M', ['MM', 2], 'Mo', function () {
- return this.month() + 1;
- });
-
- addFormatToken('MMM', 0, 0, function (format) {
- return this.localeData().monthsShort(this, format);
- });
-
- addFormatToken('MMMM', 0, 0, function (format) {
- return this.localeData().months(this, format);
- });
-
- // ALIASES
-
- addUnitAlias('month', 'M');
-
- // PARSING
-
- addRegexToken('M', match1to2);
- addRegexToken('MM', match1to2, match2);
- addRegexToken('MMM', function (isStrict, locale) {
- return locale.monthsShortRegex(isStrict);
- });
- addRegexToken('MMMM', function (isStrict, locale) {
- return locale.monthsRegex(isStrict);
- });
-
- addParseToken(['M', 'MM'], function (input, array) {
- array[MONTH] = toInt(input) - 1;
- });
-
- addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
- var month = config._locale.monthsParse(input, token, config._strict);
- // if we didn't find a month name, mark the date as invalid.
- if (month != null) {
- array[MONTH] = month;
- } else {
- getParsingFlags(config).invalidMonth = input;
- }
- });
-
- // LOCALES
-
- var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/;
- var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');
- function localeMonths (m, format) {
- return isArray(this._months) ? this._months[m.month()] :
- this._months[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
- }
-
- var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');
- function localeMonthsShort (m, format) {
- return isArray(this._monthsShort) ? this._monthsShort[m.month()] :
- this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()];
- }
-
- function localeMonthsParse (monthName, format, strict) {
- var i, mom, regex;
-
- if (!this._monthsParse) {
- this._monthsParse = [];
- this._longMonthsParse = [];
- this._shortMonthsParse = [];
- }
-
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = create_utc__createUTC([2000, i]);
- if (strict && !this._longMonthsParse[i]) {
- this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');
- this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');
- }
- if (!strict && !this._monthsParse[i]) {
- regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
- this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {
- return i;
- } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {
- return i;
- } else if (!strict && this._monthsParse[i].test(monthName)) {
- return i;
- }
- }
- }
-
- // MOMENTS
-
- function setMonth (mom, value) {
- var dayOfMonth;
-
- if (!mom.isValid()) {
- // No op
- return mom;
- }
-
- if (typeof value === 'string') {
- if (/^\d+$/.test(value)) {
- value = toInt(value);
- } else {
- value = mom.localeData().monthsParse(value);
- // TODO: Another silent failure?
- if (typeof value !== 'number') {
- return mom;
- }
- }
- }
-
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
- return mom;
- }
-
- function getSetMonth (value) {
- if (value != null) {
- setMonth(this, value);
- utils_hooks__hooks.updateOffset(this, true);
- return this;
- } else {
- return get_set__get(this, 'Month');
- }
- }
-
- function getDaysInMonth () {
- return daysInMonth(this.year(), this.month());
- }
-
- var defaultMonthsShortRegex = matchWord;
- function monthsShortRegex (isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsShortStrictRegex;
- } else {
- return this._monthsShortRegex;
- }
- } else {
- return this._monthsShortStrictRegex && isStrict ?
- this._monthsShortStrictRegex : this._monthsShortRegex;
- }
- }
-
- var defaultMonthsRegex = matchWord;
- function monthsRegex (isStrict) {
- if (this._monthsParseExact) {
- if (!hasOwnProp(this, '_monthsRegex')) {
- computeMonthsParse.call(this);
- }
- if (isStrict) {
- return this._monthsStrictRegex;
- } else {
- return this._monthsRegex;
- }
- } else {
- return this._monthsStrictRegex && isStrict ?
- this._monthsStrictRegex : this._monthsRegex;
- }
- }
-
- function computeMonthsParse () {
- function cmpLenRev(a, b) {
- return b.length - a.length;
- }
-
- var shortPieces = [], longPieces = [], mixedPieces = [],
- i, mom;
- for (i = 0; i < 12; i++) {
- // make the regex if we don't have it already
- mom = create_utc__createUTC([2000, i]);
- shortPieces.push(this.monthsShort(mom, ''));
- longPieces.push(this.months(mom, ''));
- mixedPieces.push(this.months(mom, ''));
- mixedPieces.push(this.monthsShort(mom, ''));
- }
- // Sorting makes sure if one month (or abbr) is a prefix of another it
- // will match the longer piece.
- shortPieces.sort(cmpLenRev);
- longPieces.sort(cmpLenRev);
- mixedPieces.sort(cmpLenRev);
- for (i = 0; i < 12; i++) {
- shortPieces[i] = regexEscape(shortPieces[i]);
- longPieces[i] = regexEscape(longPieces[i]);
- mixedPieces[i] = regexEscape(mixedPieces[i]);
- }
-
- this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
- this._monthsShortRegex = this._monthsRegex;
- this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')$', 'i');
- this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')$', 'i');
- }
-
- function checkOverflow (m) {
- var overflow;
- var a = m._a;
-
- if (a && getParsingFlags(m).overflow === -2) {
- overflow =
- a[MONTH] < 0 || a[MONTH] > 11 ? MONTH :
- a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE :
- a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :
- a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE :
- a[SECOND] < 0 || a[SECOND] > 59 ? SECOND :
- a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :
- -1;
-
- if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
- overflow = DATE;
- }
- if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
- overflow = WEEK;
- }
- if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
- overflow = WEEKDAY;
- }
-
- getParsingFlags(m).overflow = overflow;
- }
-
- return m;
- }
-
- // iso 8601 regex
- // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
- var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
- var basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/;
-
- var tzRegex = /Z|[+-]\d\d(?::?\d\d)?/;
-
- var isoDates = [
- ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
- ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
- ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
- ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
- ['YYYY-DDD', /\d{4}-\d{3}/],
- ['YYYY-MM', /\d{4}-\d\d/, false],
- ['YYYYYYMMDD', /[+-]\d{10}/],
- ['YYYYMMDD', /\d{8}/],
- // YYYYMM is NOT allowed by the standard
- ['GGGG[W]WWE', /\d{4}W\d{3}/],
- ['GGGG[W]WW', /\d{4}W\d{2}/, false],
- ['YYYYDDD', /\d{7}/]
- ];
-
- // iso time formats and regexes
- var isoTimes = [
- ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
- ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
- ['HH:mm:ss', /\d\d:\d\d:\d\d/],
- ['HH:mm', /\d\d:\d\d/],
- ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
- ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
- ['HHmmss', /\d\d\d\d\d\d/],
- ['HHmm', /\d\d\d\d/],
- ['HH', /\d\d/]
- ];
-
- var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i;
-
- // date from iso format
- function configFromISO(config) {
- var i, l,
- string = config._i,
- match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
- allowTime, dateFormat, timeFormat, tzFormat;
-
- if (match) {
- getParsingFlags(config).iso = true;
-
- for (i = 0, l = isoDates.length; i < l; i++) {
- if (isoDates[i][1].exec(match[1])) {
- dateFormat = isoDates[i][0];
- allowTime = isoDates[i][2] !== false;
- break;
- }
- }
- if (dateFormat == null) {
- config._isValid = false;
- return;
- }
- if (match[3]) {
- for (i = 0, l = isoTimes.length; i < l; i++) {
- if (isoTimes[i][1].exec(match[3])) {
- // match[2] should be 'T' or space
- timeFormat = (match[2] || ' ') + isoTimes[i][0];
- break;
- }
- }
- if (timeFormat == null) {
- config._isValid = false;
- return;
- }
- }
- if (!allowTime && timeFormat != null) {
- config._isValid = false;
- return;
- }
- if (match[4]) {
- if (tzRegex.exec(match[4])) {
- tzFormat = 'Z';
- } else {
- config._isValid = false;
- return;
- }
- }
- config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
- configFromStringAndFormat(config);
- } else {
- config._isValid = false;
- }
- }
-
- // date from iso format or fallback
- function configFromString(config) {
- var matched = aspNetJsonRegex.exec(config._i);
-
- if (matched !== null) {
- config._d = new Date(+matched[1]);
- return;
- }
-
- configFromISO(config);
- if (config._isValid === false) {
- delete config._isValid;
- utils_hooks__hooks.createFromInputFallback(config);
- }
- }
-
- utils_hooks__hooks.createFromInputFallback = deprecate(
- 'moment construction falls back to js Date. This is ' +
- 'discouraged and will be removed in upcoming major ' +
- 'release. Please refer to ' +
- 'https://github.com/moment/moment/issues/1407 for more info.',
- function (config) {
- config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
- }
- );
-
- function createDate (y, m, d, h, M, s, ms) {
- //can't just apply() to create a date:
- //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply
- var date = new Date(y, m, d, h, M, s, ms);
-
- //the date constructor remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getFullYear())) {
- date.setFullYear(y);
- }
- return date;
- }
-
- function createUTCDate (y) {
- var date = new Date(Date.UTC.apply(null, arguments));
-
- //the Date.UTC function remaps years 0-99 to 1900-1999
- if (y < 100 && y >= 0 && isFinite(date.getUTCFullYear())) {
- date.setUTCFullYear(y);
- }
- return date;
- }
-
- // FORMATTING
-
- addFormatToken('Y', 0, 0, function () {
- var y = this.year();
- return y <= 9999 ? '' + y : '+' + y;
- });
-
- addFormatToken(0, ['YY', 2], 0, function () {
- return this.year() % 100;
- });
-
- addFormatToken(0, ['YYYY', 4], 0, 'year');
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
-
- // ALIASES
-
- addUnitAlias('year', 'y');
-
- // PARSING
-
- addRegexToken('Y', matchSigned);
- addRegexToken('YY', match1to2, match2);
- addRegexToken('YYYY', match1to4, match4);
- addRegexToken('YYYYY', match1to6, match6);
- addRegexToken('YYYYYY', match1to6, match6);
-
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
- addParseToken('YYYY', function (input, array) {
- array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);
- });
- addParseToken('YY', function (input, array) {
- array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);
- });
- addParseToken('Y', function (input, array) {
- array[YEAR] = parseInt(input, 10);
- });
-
- // HELPERS
-
- function daysInYear(year) {
- return isLeapYear(year) ? 366 : 365;
- }
-
- function isLeapYear(year) {
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
- }
-
- // HOOKS
-
- utils_hooks__hooks.parseTwoDigitYear = function (input) {
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
- };
-
- // MOMENTS
-
- var getSetYear = makeGetSet('FullYear', false);
-
- function getIsLeapYear () {
- return isLeapYear(this.year());
- }
-
- // start-of-first-week - start-of-year
- function firstWeekOffset(year, dow, doy) {
- var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
- fwd = 7 + dow - doy,
- // first-week day local weekday -- which local weekday is fwd
- fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
-
- return -fwdlw + fwd - 1;
- }
-
- //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
- function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
- var localWeekday = (7 + weekday - dow) % 7,
- weekOffset = firstWeekOffset(year, dow, doy),
- dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
- resYear, resDayOfYear;
-
- if (dayOfYear <= 0) {
- resYear = year - 1;
- resDayOfYear = daysInYear(resYear) + dayOfYear;
- } else if (dayOfYear > daysInYear(year)) {
- resYear = year + 1;
- resDayOfYear = dayOfYear - daysInYear(year);
- } else {
- resYear = year;
- resDayOfYear = dayOfYear;
- }
-
- return {
- year: resYear,
- dayOfYear: resDayOfYear
- };
- }
-
- function weekOfYear(mom, dow, doy) {
- var weekOffset = firstWeekOffset(mom.year(), dow, doy),
- week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
- resWeek, resYear;
-
- if (week < 1) {
- resYear = mom.year() - 1;
- resWeek = week + weeksInYear(resYear, dow, doy);
- } else if (week > weeksInYear(mom.year(), dow, doy)) {
- resWeek = week - weeksInYear(mom.year(), dow, doy);
- resYear = mom.year() + 1;
- } else {
- resYear = mom.year();
- resWeek = week;
- }
-
- return {
- week: resWeek,
- year: resYear
- };
- }
-
- function weeksInYear(year, dow, doy) {
- var weekOffset = firstWeekOffset(year, dow, doy),
- weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
- return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
- }
-
- // Pick the first defined of two or three arguments.
- function defaults(a, b, c) {
- if (a != null) {
- return a;
- }
- if (b != null) {
- return b;
- }
- return c;
- }
-
- function currentDateArray(config) {
- // hooks is actually the exported moment object
- var nowValue = new Date(utils_hooks__hooks.now());
- if (config._useUTC) {
- return [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()];
- }
- return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
- }
-
- // convert an array to a date.
- // the array should mirror the parameters below
- // note: all values past the year are optional and will default to the lowest possible value.
- // [year, month, day , hour, minute, second, millisecond]
- function configFromArray (config) {
- var i, date, input = [], currentDate, yearToUse;
-
- if (config._d) {
- return;
- }
-
- currentDate = currentDateArray(config);
-
- //compute day of the year from weeks and weekdays
- if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
- dayOfYearFromWeekInfo(config);
- }
-
- //if the day of the year is set, figure out what it is
- if (config._dayOfYear) {
- yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
-
- if (config._dayOfYear > daysInYear(yearToUse)) {
- getParsingFlags(config)._overflowDayOfYear = true;
- }
-
- date = createUTCDate(yearToUse, 0, config._dayOfYear);
- config._a[MONTH] = date.getUTCMonth();
- config._a[DATE] = date.getUTCDate();
- }
-
- // Default to current date.
- // * if no year, month, day of month are given, default to today
- // * if day of month is given, default month and year
- // * if month is given, default only year
- // * if year is given, don't default anything
- for (i = 0; i < 3 && config._a[i] == null; ++i) {
- config._a[i] = input[i] = currentDate[i];
- }
-
- // Zero out whatever was not defaulted, including time
- for (; i < 7; i++) {
- config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];
- }
-
- // Check for 24:00:00.000
- if (config._a[HOUR] === 24 &&
- config._a[MINUTE] === 0 &&
- config._a[SECOND] === 0 &&
- config._a[MILLISECOND] === 0) {
- config._nextDay = true;
- config._a[HOUR] = 0;
- }
-
- config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);
- // Apply timezone offset from input. The actual utcOffset can be changed
- // with parseZone.
- if (config._tzm != null) {
- config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
- }
-
- if (config._nextDay) {
- config._a[HOUR] = 24;
- }
- }
-
- function dayOfYearFromWeekInfo(config) {
- var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow;
-
- w = config._w;
- if (w.GG != null || w.W != null || w.E != null) {
- dow = 1;
- doy = 4;
-
- // TODO: We need to take the current isoWeekYear, but that depends on
- // how we interpret now (local, utc, fixed offset). So create
- // a now version of current config (take local/utc/offset flags, and
- // create now).
- weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);
- week = defaults(w.W, 1);
- weekday = defaults(w.E, 1);
- if (weekday < 1 || weekday > 7) {
- weekdayOverflow = true;
- }
- } else {
- dow = config._locale._week.dow;
- doy = config._locale._week.doy;
-
- weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);
- week = defaults(w.w, 1);
-
- if (w.d != null) {
- // weekday -- low day numbers are considered next week
- weekday = w.d;
- if (weekday < 0 || weekday > 6) {
- weekdayOverflow = true;
- }
- } else if (w.e != null) {
- // local weekday -- counting starts from begining of week
- weekday = w.e + dow;
- if (w.e < 0 || w.e > 6) {
- weekdayOverflow = true;
- }
- } else {
- // default to begining of week
- weekday = dow;
- }
- }
- if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
- getParsingFlags(config)._overflowWeeks = true;
- } else if (weekdayOverflow != null) {
- getParsingFlags(config)._overflowWeekday = true;
- } else {
- temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
- config._a[YEAR] = temp.year;
- config._dayOfYear = temp.dayOfYear;
- }
- }
-
- // constant that refers to the ISO standard
- utils_hooks__hooks.ISO_8601 = function () {};
-
- // date from string and format string
- function configFromStringAndFormat(config) {
- // TODO: Move this to another part of the creation flow to prevent circular deps
- if (config._f === utils_hooks__hooks.ISO_8601) {
- configFromISO(config);
- return;
- }
-
- config._a = [];
- getParsingFlags(config).empty = true;
-
- // This array is used to make a Date, either with `new Date` or `Date.UTC`
- var string = '' + config._i,
- i, parsedInput, tokens, token, skipped,
- stringLength = string.length,
- totalParsedInputLength = 0;
-
- tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
-
- for (i = 0; i < tokens.length; i++) {
- token = tokens[i];
- parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
- // console.log('token', token, 'parsedInput', parsedInput,
- // 'regex', getParseRegexForToken(token, config));
- if (parsedInput) {
- skipped = string.substr(0, string.indexOf(parsedInput));
- if (skipped.length > 0) {
- getParsingFlags(config).unusedInput.push(skipped);
- }
- string = string.slice(string.indexOf(parsedInput) + parsedInput.length);
- totalParsedInputLength += parsedInput.length;
- }
- // don't parse if it's not a known token
- if (formatTokenFunctions[token]) {
- if (parsedInput) {
- getParsingFlags(config).empty = false;
- }
- else {
- getParsingFlags(config).unusedTokens.push(token);
- }
- addTimeToArrayFromToken(token, parsedInput, config);
- }
- else if (config._strict && !parsedInput) {
- getParsingFlags(config).unusedTokens.push(token);
- }
- }
-
- // add remaining unparsed input length to the string
- getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
- if (string.length > 0) {
- getParsingFlags(config).unusedInput.push(string);
- }
-
- // clear _12h flag if hour is <= 12
- if (getParsingFlags(config).bigHour === true &&
- config._a[HOUR] <= 12 &&
- config._a[HOUR] > 0) {
- getParsingFlags(config).bigHour = undefined;
- }
- // handle meridiem
- config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);
-
- configFromArray(config);
- checkOverflow(config);
- }
-
-
- function meridiemFixWrap (locale, hour, meridiem) {
- var isPm;
-
- if (meridiem == null) {
- // nothing to do
- return hour;
- }
- if (locale.meridiemHour != null) {
- return locale.meridiemHour(hour, meridiem);
- } else if (locale.isPM != null) {
- // Fallback
- isPm = locale.isPM(meridiem);
- if (isPm && hour < 12) {
- hour += 12;
- }
- if (!isPm && hour === 12) {
- hour = 0;
- }
- return hour;
- } else {
- // this is not supposed to happen
- return hour;
- }
- }
-
- // date from string and array of format strings
- function configFromStringAndArray(config) {
- var tempConfig,
- bestMoment,
-
- scoreToBeat,
- i,
- currentScore;
-
- if (config._f.length === 0) {
- getParsingFlags(config).invalidFormat = true;
- config._d = new Date(NaN);
- return;
- }
-
- for (i = 0; i < config._f.length; i++) {
- currentScore = 0;
- tempConfig = copyConfig({}, config);
- if (config._useUTC != null) {
- tempConfig._useUTC = config._useUTC;
- }
- tempConfig._f = config._f[i];
- configFromStringAndFormat(tempConfig);
-
- if (!valid__isValid(tempConfig)) {
- continue;
- }
-
- // if there is any input that was not parsed add a penalty for that format
- currentScore += getParsingFlags(tempConfig).charsLeftOver;
-
- //or tokens
- currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
-
- getParsingFlags(tempConfig).score = currentScore;
-
- if (scoreToBeat == null || currentScore < scoreToBeat) {
- scoreToBeat = currentScore;
- bestMoment = tempConfig;
- }
- }
-
- extend(config, bestMoment || tempConfig);
- }
-
- function configFromObject(config) {
- if (config._d) {
- return;
- }
-
- var i = normalizeObjectUnits(config._i);
- config._a = map([i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond], function (obj) {
- return obj && parseInt(obj, 10);
- });
-
- configFromArray(config);
- }
-
- function createFromConfig (config) {
- var res = new Moment(checkOverflow(prepareConfig(config)));
- if (res._nextDay) {
- // Adding is smart enough around DST
- res.add(1, 'd');
- res._nextDay = undefined;
- }
-
- return res;
- }
-
- function prepareConfig (config) {
- var input = config._i,
- format = config._f;
-
- config._locale = config._locale || locale_locales__getLocale(config._l);
-
- if (input === null || (format === undefined && input === '')) {
- return valid__createInvalid({nullInput: true});
- }
-
- if (typeof input === 'string') {
- config._i = input = config._locale.preparse(input);
- }
-
- if (isMoment(input)) {
- return new Moment(checkOverflow(input));
- } else if (isArray(format)) {
- configFromStringAndArray(config);
- } else if (format) {
- configFromStringAndFormat(config);
- } else if (isDate(input)) {
- config._d = input;
- } else {
- configFromInput(config);
- }
-
- if (!valid__isValid(config)) {
- config._d = null;
- }
-
- return config;
- }
-
- function configFromInput(config) {
- var input = config._i;
- if (input === undefined) {
- config._d = new Date(utils_hooks__hooks.now());
- } else if (isDate(input)) {
- config._d = new Date(+input);
- } else if (typeof input === 'string') {
- configFromString(config);
- } else if (isArray(input)) {
- config._a = map(input.slice(0), function (obj) {
- return parseInt(obj, 10);
- });
- configFromArray(config);
- } else if (typeof(input) === 'object') {
- configFromObject(config);
- } else if (typeof(input) === 'number') {
- // from milliseconds
- config._d = new Date(input);
- } else {
- utils_hooks__hooks.createFromInputFallback(config);
- }
- }
-
- function createLocalOrUTC (input, format, locale, strict, isUTC) {
- var c = {};
-
- if (typeof(locale) === 'boolean') {
- strict = locale;
- locale = undefined;
- }
- // object construction must be done this way.
- // https://github.com/moment/moment/issues/1423
- c._isAMomentObject = true;
- c._useUTC = c._isUTC = isUTC;
- c._l = locale;
- c._i = input;
- c._f = format;
- c._strict = strict;
-
- return createFromConfig(c);
- }
-
- function local__createLocal (input, format, locale, strict) {
- return createLocalOrUTC(input, format, locale, strict, false);
- }
-
- var prototypeMin = deprecate(
- 'moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',
- function () {
- var other = local__createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other < this ? this : other;
- } else {
- return valid__createInvalid();
- }
- }
- );
-
- var prototypeMax = deprecate(
- 'moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',
- function () {
- var other = local__createLocal.apply(null, arguments);
- if (this.isValid() && other.isValid()) {
- return other > this ? this : other;
- } else {
- return valid__createInvalid();
- }
- }
- );
-
- // Pick a moment m from moments so that m[fn](other) is true for all
- // other. This relies on the function fn to be transitive.
- //
- // moments should either be an array of moment objects or an array, whose
- // first element is an array of moment objects.
- function pickBy(fn, moments) {
- var res, i;
- if (moments.length === 1 && isArray(moments[0])) {
- moments = moments[0];
- }
- if (!moments.length) {
- return local__createLocal();
- }
- res = moments[0];
- for (i = 1; i < moments.length; ++i) {
- if (!moments[i].isValid() || moments[i][fn](res)) {
- res = moments[i];
- }
- }
- return res;
- }
-
- // TODO: Use [].sort instead?
- function min () {
- var args = [].slice.call(arguments, 0);
-
- return pickBy('isBefore', args);
- }
-
- function max () {
- var args = [].slice.call(arguments, 0);
-
- return pickBy('isAfter', args);
- }
-
- var now = function () {
- return Date.now ? Date.now() : +(new Date());
- };
-
- function Duration (duration) {
- var normalizedInput = normalizeObjectUnits(duration),
- years = normalizedInput.year || 0,
- quarters = normalizedInput.quarter || 0,
- months = normalizedInput.month || 0,
- weeks = normalizedInput.week || 0,
- days = normalizedInput.day || 0,
- hours = normalizedInput.hour || 0,
- minutes = normalizedInput.minute || 0,
- seconds = normalizedInput.second || 0,
- milliseconds = normalizedInput.millisecond || 0;
-
- // representation for dateAddRemove
- this._milliseconds = +milliseconds +
- seconds * 1e3 + // 1000
- minutes * 6e4 + // 1000 * 60
- hours * 36e5; // 1000 * 60 * 60
- // Because of dateAddRemove treats 24 hours as different from a
- // day when working around DST, we need to store them separately
- this._days = +days +
- weeks * 7;
- // It is impossible translate months into days without knowing
- // which months you are are talking about, so we have to store
- // it separately.
- this._months = +months +
- quarters * 3 +
- years * 12;
-
- this._data = {};
-
- this._locale = locale_locales__getLocale();
-
- this._bubble();
- }
-
- function isDuration (obj) {
- return obj instanceof Duration;
- }
-
- // FORMATTING
-
- function offset (token, separator) {
- addFormatToken(token, 0, 0, function () {
- var offset = this.utcOffset();
- var sign = '+';
- if (offset < 0) {
- offset = -offset;
- sign = '-';
- }
- return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);
- });
- }
-
- offset('Z', ':');
- offset('ZZ', '');
-
- // PARSING
-
- addRegexToken('Z', matchShortOffset);
- addRegexToken('ZZ', matchShortOffset);
- addParseToken(['Z', 'ZZ'], function (input, array, config) {
- config._useUTC = true;
- config._tzm = offsetFromString(matchShortOffset, input);
- });
-
- // HELPERS
-
- // timezone chunker
- // '+10:00' > ['10', '00']
- // '-1530' > ['-15', '30']
- var chunkOffset = /([\+\-]|\d\d)/gi;
-
- function offsetFromString(matcher, string) {
- var matches = ((string || '').match(matcher) || []);
- var chunk = matches[matches.length - 1] || [];
- var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
- var minutes = +(parts[1] * 60) + toInt(parts[2]);
-
- return parts[0] === '+' ? minutes : -minutes;
- }
-
- // Return a moment from input, that is local/utc/zone equivalent to model.
- function cloneWithOffset(input, model) {
- var res, diff;
- if (model._isUTC) {
- res = model.clone();
- diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);
- // Use low-level api, because this fn is low-level api.
- res._d.setTime(+res._d + diff);
- utils_hooks__hooks.updateOffset(res, false);
- return res;
- } else {
- return local__createLocal(input).local();
- }
- }
-
- function getDateOffset (m) {
- // On Firefox.24 Date#getTimezoneOffset returns a floating point.
- // https://github.com/moment/moment/pull/1871
- return -Math.round(m._d.getTimezoneOffset() / 15) * 15;
- }
-
- // HOOKS
-
- // This function will be called whenever a moment is mutated.
- // It is intended to keep the offset in sync with the timezone.
- utils_hooks__hooks.updateOffset = function () {};
-
- // MOMENTS
-
- // keepLocalTime = true means only change the timezone, without
- // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
- // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
- // +0200, so we adjust the time as needed, to be valid.
- //
- // Keeping the time actually adds/subtracts (one hour)
- // from the actual represented time. That is why we call updateOffset
- // a second time. In case it wants us to change the offset again
- // _changeInProgress == true case, then we have to adjust, because
- // there is no such time in the given timezone.
- function getSetOffset (input, keepLocalTime) {
- var offset = this._offset || 0,
- localAdjust;
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- if (input != null) {
- if (typeof input === 'string') {
- input = offsetFromString(matchShortOffset, input);
- } else if (Math.abs(input) < 16) {
- input = input * 60;
- }
- if (!this._isUTC && keepLocalTime) {
- localAdjust = getDateOffset(this);
- }
- this._offset = input;
- this._isUTC = true;
- if (localAdjust != null) {
- this.add(localAdjust, 'm');
- }
- if (offset !== input) {
- if (!keepLocalTime || this._changeInProgress) {
- add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);
- } else if (!this._changeInProgress) {
- this._changeInProgress = true;
- utils_hooks__hooks.updateOffset(this, true);
- this._changeInProgress = null;
- }
- }
- return this;
- } else {
- return this._isUTC ? offset : getDateOffset(this);
- }
- }
-
- function getSetZone (input, keepLocalTime) {
- if (input != null) {
- if (typeof input !== 'string') {
- input = -input;
- }
-
- this.utcOffset(input, keepLocalTime);
-
- return this;
- } else {
- return -this.utcOffset();
- }
- }
-
- function setOffsetToUTC (keepLocalTime) {
- return this.utcOffset(0, keepLocalTime);
- }
-
- function setOffsetToLocal (keepLocalTime) {
- if (this._isUTC) {
- this.utcOffset(0, keepLocalTime);
- this._isUTC = false;
-
- if (keepLocalTime) {
- this.subtract(getDateOffset(this), 'm');
- }
- }
- return this;
- }
-
- function setOffsetToParsedOffset () {
- if (this._tzm) {
- this.utcOffset(this._tzm);
- } else if (typeof this._i === 'string') {
- this.utcOffset(offsetFromString(matchOffset, this._i));
- }
- return this;
- }
-
- function hasAlignedHourOffset (input) {
- if (!this.isValid()) {
- return false;
- }
- input = input ? local__createLocal(input).utcOffset() : 0;
-
- return (this.utcOffset() - input) % 60 === 0;
- }
-
- function isDaylightSavingTime () {
- return (
- this.utcOffset() > this.clone().month(0).utcOffset() ||
- this.utcOffset() > this.clone().month(5).utcOffset()
- );
- }
-
- function isDaylightSavingTimeShifted () {
- if (!isUndefined(this._isDSTShifted)) {
- return this._isDSTShifted;
- }
-
- var c = {};
-
- copyConfig(c, this);
- c = prepareConfig(c);
-
- if (c._a) {
- var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);
- this._isDSTShifted = this.isValid() &&
- compareArrays(c._a, other.toArray()) > 0;
- } else {
- this._isDSTShifted = false;
- }
-
- return this._isDSTShifted;
- }
-
- function isLocal () {
- return this.isValid() ? !this._isUTC : false;
- }
-
- function isUtcOffset () {
- return this.isValid() ? this._isUTC : false;
- }
-
- function isUtc () {
- return this.isValid() ? this._isUTC && this._offset === 0 : false;
- }
-
- // ASP.NET json date format regex
- var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/;
-
- // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
- // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
- // and further modified to allow for strings containing both week and day
- var isoRegex = /^(-)?P(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)W)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?$/;
-
- function create__createDuration (input, key) {
- var duration = input,
- // matching against regexp is expensive, do it on demand
- match = null,
- sign,
- ret,
- diffRes;
-
- if (isDuration(input)) {
- duration = {
- ms : input._milliseconds,
- d : input._days,
- M : input._months
- };
- } else if (typeof input === 'number') {
- duration = {};
- if (key) {
- duration[key] = input;
- } else {
- duration.milliseconds = input;
- }
- } else if (!!(match = aspNetRegex.exec(input))) {
- sign = (match[1] === '-') ? -1 : 1;
- duration = {
- y : 0,
- d : toInt(match[DATE]) * sign,
- h : toInt(match[HOUR]) * sign,
- m : toInt(match[MINUTE]) * sign,
- s : toInt(match[SECOND]) * sign,
- ms : toInt(match[MILLISECOND]) * sign
- };
- } else if (!!(match = isoRegex.exec(input))) {
- sign = (match[1] === '-') ? -1 : 1;
- duration = {
- y : parseIso(match[2], sign),
- M : parseIso(match[3], sign),
- w : parseIso(match[4], sign),
- d : parseIso(match[5], sign),
- h : parseIso(match[6], sign),
- m : parseIso(match[7], sign),
- s : parseIso(match[8], sign)
- };
- } else if (duration == null) {// checks for null or undefined
- duration = {};
- } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {
- diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));
-
- duration = {};
- duration.ms = diffRes.milliseconds;
- duration.M = diffRes.months;
- }
-
- ret = new Duration(duration);
-
- if (isDuration(input) && hasOwnProp(input, '_locale')) {
- ret._locale = input._locale;
- }
-
- return ret;
- }
-
- create__createDuration.fn = Duration.prototype;
-
- function parseIso (inp, sign) {
- // We'd normally use ~~inp for this, but unfortunately it also
- // converts floats to ints.
- // inp may be undefined, so careful calling replace on it.
- var res = inp && parseFloat(inp.replace(',', '.'));
- // apply sign while we're at it
- return (isNaN(res) ? 0 : res) * sign;
- }
-
- function positiveMomentsDifference(base, other) {
- var res = {milliseconds: 0, months: 0};
-
- res.months = other.month() - base.month() +
- (other.year() - base.year()) * 12;
- if (base.clone().add(res.months, 'M').isAfter(other)) {
- --res.months;
- }
-
- res.milliseconds = +other - +(base.clone().add(res.months, 'M'));
-
- return res;
- }
-
- function momentsDifference(base, other) {
- var res;
- if (!(base.isValid() && other.isValid())) {
- return {milliseconds: 0, months: 0};
- }
-
- other = cloneWithOffset(other, base);
- if (base.isBefore(other)) {
- res = positiveMomentsDifference(base, other);
- } else {
- res = positiveMomentsDifference(other, base);
- res.milliseconds = -res.milliseconds;
- res.months = -res.months;
- }
-
- return res;
- }
-
- function absRound (number) {
- if (number < 0) {
- return Math.round(-1 * number) * -1;
- } else {
- return Math.round(number);
- }
- }
-
- // TODO: remove 'name' arg after deprecation is removed
- function createAdder(direction, name) {
- return function (val, period) {
- var dur, tmp;
- //invert the arguments, but complain about it
- if (period !== null && !isNaN(+period)) {
- deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');
- tmp = val; val = period; period = tmp;
- }
-
- val = typeof val === 'string' ? +val : val;
- dur = create__createDuration(val, period);
- add_subtract__addSubtract(this, dur, direction);
- return this;
- };
- }
-
- function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {
- var milliseconds = duration._milliseconds,
- days = absRound(duration._days),
- months = absRound(duration._months);
-
- if (!mom.isValid()) {
- // No op
- return;
- }
-
- updateOffset = updateOffset == null ? true : updateOffset;
-
- if (milliseconds) {
- mom._d.setTime(+mom._d + milliseconds * isAdding);
- }
- if (days) {
- get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);
- }
- if (months) {
- setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);
- }
- if (updateOffset) {
- utils_hooks__hooks.updateOffset(mom, days || months);
- }
- }
-
- var add_subtract__add = createAdder(1, 'add');
- var add_subtract__subtract = createAdder(-1, 'subtract');
-
- function moment_calendar__calendar (time, formats) {
- // We want to compare the start of today, vs this.
- // Getting start-of-today depends on whether we're local/utc/offset or not.
- var now = time || local__createLocal(),
- sod = cloneWithOffset(now, this).startOf('day'),
- diff = this.diff(sod, 'days', true),
- format = diff < -6 ? 'sameElse' :
- diff < -1 ? 'lastWeek' :
- diff < 0 ? 'lastDay' :
- diff < 1 ? 'sameDay' :
- diff < 2 ? 'nextDay' :
- diff < 7 ? 'nextWeek' : 'sameElse';
-
- var output = formats && (isFunction(formats[format]) ? formats[format]() : formats[format]);
-
- return this.format(output || this.localeData().calendar(format, this, local__createLocal(now)));
- }
-
- function clone () {
- return new Moment(this);
- }
-
- function isAfter (input, units) {
- var localInput = isMoment(input) ? input : local__createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
- if (units === 'millisecond') {
- return +this > +localInput;
- } else {
- return +localInput < +this.clone().startOf(units);
- }
- }
-
- function isBefore (input, units) {
- var localInput = isMoment(input) ? input : local__createLocal(input);
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(!isUndefined(units) ? units : 'millisecond');
- if (units === 'millisecond') {
- return +this < +localInput;
- } else {
- return +this.clone().endOf(units) < +localInput;
- }
- }
-
- function isBetween (from, to, units) {
- return this.isAfter(from, units) && this.isBefore(to, units);
- }
-
- function isSame (input, units) {
- var localInput = isMoment(input) ? input : local__createLocal(input),
- inputMs;
- if (!(this.isValid() && localInput.isValid())) {
- return false;
- }
- units = normalizeUnits(units || 'millisecond');
- if (units === 'millisecond') {
- return +this === +localInput;
- } else {
- inputMs = +localInput;
- return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));
- }
- }
-
- function isSameOrAfter (input, units) {
- return this.isSame(input, units) || this.isAfter(input,units);
- }
-
- function isSameOrBefore (input, units) {
- return this.isSame(input, units) || this.isBefore(input,units);
- }
-
- function diff (input, units, asFloat) {
- var that,
- zoneDelta,
- delta, output;
-
- if (!this.isValid()) {
- return NaN;
- }
-
- that = cloneWithOffset(input, this);
-
- if (!that.isValid()) {
- return NaN;
- }
-
- zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
-
- units = normalizeUnits(units);
-
- if (units === 'year' || units === 'month' || units === 'quarter') {
- output = monthDiff(this, that);
- if (units === 'quarter') {
- output = output / 3;
- } else if (units === 'year') {
- output = output / 12;
- }
- } else {
- delta = this - that;
- output = units === 'second' ? delta / 1e3 : // 1000
- units === 'minute' ? delta / 6e4 : // 1000 * 60
- units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60
- units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst
- units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst
- delta;
- }
- return asFloat ? output : absFloor(output);
- }
-
- function monthDiff (a, b) {
- // difference in months
- var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),
- // b is in (anchor - 1 month, anchor + 1 month)
- anchor = a.clone().add(wholeMonthDiff, 'months'),
- anchor2, adjust;
-
- if (b - anchor < 0) {
- anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor - anchor2);
- } else {
- anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
- // linear across the month
- adjust = (b - anchor) / (anchor2 - anchor);
- }
-
- return -(wholeMonthDiff + adjust);
- }
-
- utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
-
- function toString () {
- return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
- }
-
- function moment_format__toISOString () {
- var m = this.clone().utc();
- if (0 < m.year() && m.year() <= 9999) {
- if (isFunction(Date.prototype.toISOString)) {
- // native implementation is ~50x faster, use it when we can
- return this.toDate().toISOString();
- } else {
- return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
- }
- } else {
- return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');
- }
- }
-
- function format (inputString) {
- var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);
- return this.localeData().postformat(output);
- }
-
- function from (time, withoutSuffix) {
- if (this.isValid() &&
- ((isMoment(time) && time.isValid()) ||
- local__createLocal(time).isValid())) {
- return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
- }
-
- function fromNow (withoutSuffix) {
- return this.from(local__createLocal(), withoutSuffix);
- }
-
- function to (time, withoutSuffix) {
- if (this.isValid() &&
- ((isMoment(time) && time.isValid()) ||
- local__createLocal(time).isValid())) {
- return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);
- } else {
- return this.localeData().invalidDate();
- }
- }
-
- function toNow (withoutSuffix) {
- return this.to(local__createLocal(), withoutSuffix);
- }
-
- // If passed a locale key, it will set the locale for this
- // instance. Otherwise, it will return the locale configuration
- // variables for this instance.
- function locale (key) {
- var newLocaleData;
-
- if (key === undefined) {
- return this._locale._abbr;
- } else {
- newLocaleData = locale_locales__getLocale(key);
- if (newLocaleData != null) {
- this._locale = newLocaleData;
- }
- return this;
- }
- }
-
- var lang = deprecate(
- 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
- function (key) {
- if (key === undefined) {
- return this.localeData();
- } else {
- return this.locale(key);
- }
- }
- );
-
- function localeData () {
- return this._locale;
- }
-
- function startOf (units) {
- units = normalizeUnits(units);
- // the following switch intentionally omits break keywords
- // to utilize falling through the cases.
- switch (units) {
- case 'year':
- this.month(0);
- /* falls through */
- case 'quarter':
- case 'month':
- this.date(1);
- /* falls through */
- case 'week':
- case 'isoWeek':
- case 'day':
- this.hours(0);
- /* falls through */
- case 'hour':
- this.minutes(0);
- /* falls through */
- case 'minute':
- this.seconds(0);
- /* falls through */
- case 'second':
- this.milliseconds(0);
- }
-
- // weeks are a special case
- if (units === 'week') {
- this.weekday(0);
- }
- if (units === 'isoWeek') {
- this.isoWeekday(1);
- }
-
- // quarters are also special
- if (units === 'quarter') {
- this.month(Math.floor(this.month() / 3) * 3);
- }
-
- return this;
- }
-
- function endOf (units) {
- units = normalizeUnits(units);
- if (units === undefined || units === 'millisecond') {
- return this;
- }
- return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');
- }
-
- function to_type__valueOf () {
- return +this._d - ((this._offset || 0) * 60000);
- }
-
- function unix () {
- return Math.floor(+this / 1000);
- }
-
- function toDate () {
- return this._offset ? new Date(+this) : this._d;
- }
-
- function toArray () {
- var m = this;
- return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];
- }
-
- function toObject () {
- var m = this;
- return {
- years: m.year(),
- months: m.month(),
- date: m.date(),
- hours: m.hours(),
- minutes: m.minutes(),
- seconds: m.seconds(),
- milliseconds: m.milliseconds()
- };
- }
-
- function toJSON () {
- // new Date(NaN).toJSON() === null
- return this.isValid() ? this.toISOString() : null;
- }
-
- function moment_valid__isValid () {
- return valid__isValid(this);
- }
-
- function parsingFlags () {
- return extend({}, getParsingFlags(this));
- }
-
- function invalidAt () {
- return getParsingFlags(this).overflow;
- }
-
- function creationData() {
- return {
- input: this._i,
- format: this._f,
- locale: this._locale,
- isUTC: this._isUTC,
- strict: this._strict
- };
- }
-
- // FORMATTING
-
- addFormatToken(0, ['gg', 2], 0, function () {
- return this.weekYear() % 100;
- });
-
- addFormatToken(0, ['GG', 2], 0, function () {
- return this.isoWeekYear() % 100;
- });
-
- function addWeekYearFormatToken (token, getter) {
- addFormatToken(0, [token, token.length], 0, getter);
- }
-
- addWeekYearFormatToken('gggg', 'weekYear');
- addWeekYearFormatToken('ggggg', 'weekYear');
- addWeekYearFormatToken('GGGG', 'isoWeekYear');
- addWeekYearFormatToken('GGGGG', 'isoWeekYear');
-
- // ALIASES
-
- addUnitAlias('weekYear', 'gg');
- addUnitAlias('isoWeekYear', 'GG');
-
- // PARSING
-
- addRegexToken('G', matchSigned);
- addRegexToken('g', matchSigned);
- addRegexToken('GG', match1to2, match2);
- addRegexToken('gg', match1to2, match2);
- addRegexToken('GGGG', match1to4, match4);
- addRegexToken('gggg', match1to4, match4);
- addRegexToken('GGGGG', match1to6, match6);
- addRegexToken('ggggg', match1to6, match6);
-
- addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
- week[token.substr(0, 2)] = toInt(input);
- });
-
- addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
- week[token] = utils_hooks__hooks.parseTwoDigitYear(input);
- });
-
- // MOMENTS
-
- function getSetWeekYear (input) {
- return getSetWeekYearHelper.call(this,
- input,
- this.week(),
- this.weekday(),
- this.localeData()._week.dow,
- this.localeData()._week.doy);
- }
-
- function getSetISOWeekYear (input) {
- return getSetWeekYearHelper.call(this,
- input, this.isoWeek(), this.isoWeekday(), 1, 4);
- }
-
- function getISOWeeksInYear () {
- return weeksInYear(this.year(), 1, 4);
- }
-
- function getWeeksInYear () {
- var weekInfo = this.localeData()._week;
- return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
- }
-
- function getSetWeekYearHelper(input, week, weekday, dow, doy) {
- var weeksTarget;
- if (input == null) {
- return weekOfYear(this, dow, doy).year;
- } else {
- weeksTarget = weeksInYear(input, dow, doy);
- if (week > weeksTarget) {
- week = weeksTarget;
- }
- return setWeekAll.call(this, input, week, weekday, dow, doy);
- }
- }
-
- function setWeekAll(weekYear, week, weekday, dow, doy) {
- var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
- date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
-
- this.year(date.getUTCFullYear());
- this.month(date.getUTCMonth());
- this.date(date.getUTCDate());
- return this;
- }
-
- // FORMATTING
-
- addFormatToken('Q', 0, 'Qo', 'quarter');
-
- // ALIASES
-
- addUnitAlias('quarter', 'Q');
-
- // PARSING
-
- addRegexToken('Q', match1);
- addParseToken('Q', function (input, array) {
- array[MONTH] = (toInt(input) - 1) * 3;
- });
-
- // MOMENTS
-
- function getSetQuarter (input) {
- return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
- }
-
- // FORMATTING
-
- addFormatToken('w', ['ww', 2], 'wo', 'week');
- addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
-
- // ALIASES
-
- addUnitAlias('week', 'w');
- addUnitAlias('isoWeek', 'W');
-
- // PARSING
-
- addRegexToken('w', match1to2);
- addRegexToken('ww', match1to2, match2);
- addRegexToken('W', match1to2);
- addRegexToken('WW', match1to2, match2);
-
- addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
- week[token.substr(0, 1)] = toInt(input);
- });
-
- // HELPERS
-
- // LOCALES
-
- function localeWeek (mom) {
- return weekOfYear(mom, this._week.dow, this._week.doy).week;
- }
-
- var defaultLocaleWeek = {
- dow : 0, // Sunday is the first day of the week.
- doy : 6 // The week that contains Jan 1st is the first week of the year.
- };
-
- function localeFirstDayOfWeek () {
- return this._week.dow;
- }
-
- function localeFirstDayOfYear () {
- return this._week.doy;
- }
-
- // MOMENTS
-
- function getSetWeek (input) {
- var week = this.localeData().week(this);
- return input == null ? week : this.add((input - week) * 7, 'd');
- }
-
- function getSetISOWeek (input) {
- var week = weekOfYear(this, 1, 4).week;
- return input == null ? week : this.add((input - week) * 7, 'd');
- }
-
- // FORMATTING
-
- addFormatToken('D', ['DD', 2], 'Do', 'date');
-
- // ALIASES
-
- addUnitAlias('date', 'D');
-
- // PARSING
-
- addRegexToken('D', match1to2);
- addRegexToken('DD', match1to2, match2);
- addRegexToken('Do', function (isStrict, locale) {
- return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;
- });
-
- addParseToken(['D', 'DD'], DATE);
- addParseToken('Do', function (input, array) {
- array[DATE] = toInt(input.match(match1to2)[0], 10);
- });
-
- // MOMENTS
-
- var getSetDayOfMonth = makeGetSet('Date', true);
-
- // FORMATTING
-
- addFormatToken('d', 0, 'do', 'day');
-
- addFormatToken('dd', 0, 0, function (format) {
- return this.localeData().weekdaysMin(this, format);
- });
-
- addFormatToken('ddd', 0, 0, function (format) {
- return this.localeData().weekdaysShort(this, format);
- });
-
- addFormatToken('dddd', 0, 0, function (format) {
- return this.localeData().weekdays(this, format);
- });
-
- addFormatToken('e', 0, 0, 'weekday');
- addFormatToken('E', 0, 0, 'isoWeekday');
-
- // ALIASES
-
- addUnitAlias('day', 'd');
- addUnitAlias('weekday', 'e');
- addUnitAlias('isoWeekday', 'E');
-
- // PARSING
-
- addRegexToken('d', match1to2);
- addRegexToken('e', match1to2);
- addRegexToken('E', match1to2);
- addRegexToken('dd', matchWord);
- addRegexToken('ddd', matchWord);
- addRegexToken('dddd', matchWord);
-
- addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
- var weekday = config._locale.weekdaysParse(input, token, config._strict);
- // if we didn't get a weekday name, mark the date as invalid
- if (weekday != null) {
- week.d = weekday;
- } else {
- getParsingFlags(config).invalidWeekday = input;
- }
- });
-
- addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
- week[token] = toInt(input);
- });
-
- // HELPERS
-
- function parseWeekday(input, locale) {
- if (typeof input !== 'string') {
- return input;
- }
-
- if (!isNaN(input)) {
- return parseInt(input, 10);
- }
-
- input = locale.weekdaysParse(input);
- if (typeof input === 'number') {
- return input;
- }
-
- return null;
- }
-
- // LOCALES
-
- var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');
- function localeWeekdays (m, format) {
- return isArray(this._weekdays) ? this._weekdays[m.day()] :
- this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()];
- }
-
- var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');
- function localeWeekdaysShort (m) {
- return this._weekdaysShort[m.day()];
- }
-
- var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');
- function localeWeekdaysMin (m) {
- return this._weekdaysMin[m.day()];
- }
-
- function localeWeekdaysParse (weekdayName, format, strict) {
- var i, mom, regex;
-
- if (!this._weekdaysParse) {
- this._weekdaysParse = [];
- this._minWeekdaysParse = [];
- this._shortWeekdaysParse = [];
- this._fullWeekdaysParse = [];
- }
-
- for (i = 0; i < 7; i++) {
- // make the regex if we don't have it already
-
- mom = local__createLocal([2000, 1]).day(i);
- if (strict && !this._fullWeekdaysParse[i]) {
- this._fullWeekdaysParse[i] = new RegExp('^' + this.weekdays(mom, '').replace('.', '\.?') + '$', 'i');
- this._shortWeekdaysParse[i] = new RegExp('^' + this.weekdaysShort(mom, '').replace('.', '\.?') + '$', 'i');
- this._minWeekdaysParse[i] = new RegExp('^' + this.weekdaysMin(mom, '').replace('.', '\.?') + '$', 'i');
- }
- if (!this._weekdaysParse[i]) {
- regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');
- this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
- }
- // test the regex
- if (strict && format === 'dddd' && this._fullWeekdaysParse[i].test(weekdayName)) {
- return i;
- } else if (strict && format === 'ddd' && this._shortWeekdaysParse[i].test(weekdayName)) {
- return i;
- } else if (strict && format === 'dd' && this._minWeekdaysParse[i].test(weekdayName)) {
- return i;
- } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
- return i;
- }
- }
- }
-
- // MOMENTS
-
- function getSetDayOfWeek (input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
- if (input != null) {
- input = parseWeekday(input, this.localeData());
- return this.add(input - day, 'd');
- } else {
- return day;
- }
- }
-
- function getSetLocaleDayOfWeek (input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
- return input == null ? weekday : this.add(input - weekday, 'd');
- }
-
- function getSetISODayOfWeek (input) {
- if (!this.isValid()) {
- return input != null ? this : NaN;
- }
- // behaves the same as moment#day except
- // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
- // as a setter, sunday should belong to the previous week.
- return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);
- }
-
- // FORMATTING
-
- addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
-
- // ALIASES
-
- addUnitAlias('dayOfYear', 'DDD');
-
- // PARSING
-
- addRegexToken('DDD', match1to3);
- addRegexToken('DDDD', match3);
- addParseToken(['DDD', 'DDDD'], function (input, array, config) {
- config._dayOfYear = toInt(input);
- });
-
- // HELPERS
-
- // MOMENTS
-
- function getSetDayOfYear (input) {
- var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;
- return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');
- }
-
- // FORMATTING
-
- function hFormat() {
- return this.hours() % 12 || 12;
- }
-
- addFormatToken('H', ['HH', 2], 0, 'hour');
- addFormatToken('h', ['hh', 2], 0, hFormat);
-
- addFormatToken('hmm', 0, 0, function () {
- return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
- });
-
- addFormatToken('hmmss', 0, 0, function () {
- return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2);
- });
-
- addFormatToken('Hmm', 0, 0, function () {
- return '' + this.hours() + zeroFill(this.minutes(), 2);
- });
-
- addFormatToken('Hmmss', 0, 0, function () {
- return '' + this.hours() + zeroFill(this.minutes(), 2) +
- zeroFill(this.seconds(), 2);
- });
-
- function meridiem (token, lowercase) {
- addFormatToken(token, 0, 0, function () {
- return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);
- });
- }
-
- meridiem('a', true);
- meridiem('A', false);
-
- // ALIASES
-
- addUnitAlias('hour', 'h');
-
- // PARSING
-
- function matchMeridiem (isStrict, locale) {
- return locale._meridiemParse;
- }
-
- addRegexToken('a', matchMeridiem);
- addRegexToken('A', matchMeridiem);
- addRegexToken('H', match1to2);
- addRegexToken('h', match1to2);
- addRegexToken('HH', match1to2, match2);
- addRegexToken('hh', match1to2, match2);
-
- addRegexToken('hmm', match3to4);
- addRegexToken('hmmss', match5to6);
- addRegexToken('Hmm', match3to4);
- addRegexToken('Hmmss', match5to6);
-
- addParseToken(['H', 'HH'], HOUR);
- addParseToken(['a', 'A'], function (input, array, config) {
- config._isPm = config._locale.isPM(input);
- config._meridiem = input;
- });
- addParseToken(['h', 'hh'], function (input, array, config) {
- array[HOUR] = toInt(input);
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('hmmss', function (input, array, config) {
- var pos1 = input.length - 4;
- var pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- getParsingFlags(config).bigHour = true;
- });
- addParseToken('Hmm', function (input, array, config) {
- var pos = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos));
- array[MINUTE] = toInt(input.substr(pos));
- });
- addParseToken('Hmmss', function (input, array, config) {
- var pos1 = input.length - 4;
- var pos2 = input.length - 2;
- array[HOUR] = toInt(input.substr(0, pos1));
- array[MINUTE] = toInt(input.substr(pos1, 2));
- array[SECOND] = toInt(input.substr(pos2));
- });
-
- // LOCALES
-
- function localeIsPM (input) {
- // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
- // Using charAt should be more compatible.
- return ((input + '').toLowerCase().charAt(0) === 'p');
- }
-
- var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i;
- function localeMeridiem (hours, minutes, isLower) {
- if (hours > 11) {
- return isLower ? 'pm' : 'PM';
- } else {
- return isLower ? 'am' : 'AM';
- }
- }
-
-
- // MOMENTS
-
- // Setting the hour should keep the time, because the user explicitly
- // specified which hour he wants. So trying to maintain the same hour (in
- // a new timezone) makes sense. Adding/subtracting hours does not follow
- // this rule.
- var getSetHour = makeGetSet('Hours', true);
-
- // FORMATTING
-
- addFormatToken('m', ['mm', 2], 0, 'minute');
-
- // ALIASES
-
- addUnitAlias('minute', 'm');
-
- // PARSING
-
- addRegexToken('m', match1to2);
- addRegexToken('mm', match1to2, match2);
- addParseToken(['m', 'mm'], MINUTE);
-
- // MOMENTS
-
- var getSetMinute = makeGetSet('Minutes', false);
-
- // FORMATTING
-
- addFormatToken('s', ['ss', 2], 0, 'second');
-
- // ALIASES
-
- addUnitAlias('second', 's');
-
- // PARSING
-
- addRegexToken('s', match1to2);
- addRegexToken('ss', match1to2, match2);
- addParseToken(['s', 'ss'], SECOND);
-
- // MOMENTS
-
- var getSetSecond = makeGetSet('Seconds', false);
-
- // FORMATTING
-
- addFormatToken('S', 0, 0, function () {
- return ~~(this.millisecond() / 100);
- });
-
- addFormatToken(0, ['SS', 2], 0, function () {
- return ~~(this.millisecond() / 10);
- });
-
- addFormatToken(0, ['SSS', 3], 0, 'millisecond');
- addFormatToken(0, ['SSSS', 4], 0, function () {
- return this.millisecond() * 10;
- });
- addFormatToken(0, ['SSSSS', 5], 0, function () {
- return this.millisecond() * 100;
- });
- addFormatToken(0, ['SSSSSS', 6], 0, function () {
- return this.millisecond() * 1000;
- });
- addFormatToken(0, ['SSSSSSS', 7], 0, function () {
- return this.millisecond() * 10000;
- });
- addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
- return this.millisecond() * 100000;
- });
- addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
- return this.millisecond() * 1000000;
- });
-
-
- // ALIASES
-
- addUnitAlias('millisecond', 'ms');
-
- // PARSING
-
- addRegexToken('S', match1to3, match1);
- addRegexToken('SS', match1to3, match2);
- addRegexToken('SSS', match1to3, match3);
-
- var token;
- for (token = 'SSSS'; token.length <= 9; token += 'S') {
- addRegexToken(token, matchUnsigned);
- }
-
- function parseMs(input, array) {
- array[MILLISECOND] = toInt(('0.' + input) * 1000);
- }
-
- for (token = 'S'; token.length <= 9; token += 'S') {
- addParseToken(token, parseMs);
- }
- // MOMENTS
-
- var getSetMillisecond = makeGetSet('Milliseconds', false);
-
- // FORMATTING
-
- addFormatToken('z', 0, 0, 'zoneAbbr');
- addFormatToken('zz', 0, 0, 'zoneName');
-
- // MOMENTS
-
- function getZoneAbbr () {
- return this._isUTC ? 'UTC' : '';
- }
-
- function getZoneName () {
- return this._isUTC ? 'Coordinated Universal Time' : '';
- }
-
- var momentPrototype__proto = Moment.prototype;
-
- momentPrototype__proto.add = add_subtract__add;
- momentPrototype__proto.calendar = moment_calendar__calendar;
- momentPrototype__proto.clone = clone;
- momentPrototype__proto.diff = diff;
- momentPrototype__proto.endOf = endOf;
- momentPrototype__proto.format = format;
- momentPrototype__proto.from = from;
- momentPrototype__proto.fromNow = fromNow;
- momentPrototype__proto.to = to;
- momentPrototype__proto.toNow = toNow;
- momentPrototype__proto.get = getSet;
- momentPrototype__proto.invalidAt = invalidAt;
- momentPrototype__proto.isAfter = isAfter;
- momentPrototype__proto.isBefore = isBefore;
- momentPrototype__proto.isBetween = isBetween;
- momentPrototype__proto.isSame = isSame;
- momentPrototype__proto.isSameOrAfter = isSameOrAfter;
- momentPrototype__proto.isSameOrBefore = isSameOrBefore;
- momentPrototype__proto.isValid = moment_valid__isValid;
- momentPrototype__proto.lang = lang;
- momentPrototype__proto.locale = locale;
- momentPrototype__proto.localeData = localeData;
- momentPrototype__proto.max = prototypeMax;
- momentPrototype__proto.min = prototypeMin;
- momentPrototype__proto.parsingFlags = parsingFlags;
- momentPrototype__proto.set = getSet;
- momentPrototype__proto.startOf = startOf;
- momentPrototype__proto.subtract = add_subtract__subtract;
- momentPrototype__proto.toArray = toArray;
- momentPrototype__proto.toObject = toObject;
- momentPrototype__proto.toDate = toDate;
- momentPrototype__proto.toISOString = moment_format__toISOString;
- momentPrototype__proto.toJSON = toJSON;
- momentPrototype__proto.toString = toString;
- momentPrototype__proto.unix = unix;
- momentPrototype__proto.valueOf = to_type__valueOf;
- momentPrototype__proto.creationData = creationData;
-
- // Year
- momentPrototype__proto.year = getSetYear;
- momentPrototype__proto.isLeapYear = getIsLeapYear;
-
- // Week Year
- momentPrototype__proto.weekYear = getSetWeekYear;
- momentPrototype__proto.isoWeekYear = getSetISOWeekYear;
-
- // Quarter
- momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;
-
- // Month
- momentPrototype__proto.month = getSetMonth;
- momentPrototype__proto.daysInMonth = getDaysInMonth;
-
- // Week
- momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek;
- momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek;
- momentPrototype__proto.weeksInYear = getWeeksInYear;
- momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;
-
- // Day
- momentPrototype__proto.date = getSetDayOfMonth;
- momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek;
- momentPrototype__proto.weekday = getSetLocaleDayOfWeek;
- momentPrototype__proto.isoWeekday = getSetISODayOfWeek;
- momentPrototype__proto.dayOfYear = getSetDayOfYear;
-
- // Hour
- momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;
-
- // Minute
- momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;
-
- // Second
- momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;
-
- // Millisecond
- momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;
-
- // Offset
- momentPrototype__proto.utcOffset = getSetOffset;
- momentPrototype__proto.utc = setOffsetToUTC;
- momentPrototype__proto.local = setOffsetToLocal;
- momentPrototype__proto.parseZone = setOffsetToParsedOffset;
- momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;
- momentPrototype__proto.isDST = isDaylightSavingTime;
- momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted;
- momentPrototype__proto.isLocal = isLocal;
- momentPrototype__proto.isUtcOffset = isUtcOffset;
- momentPrototype__proto.isUtc = isUtc;
- momentPrototype__proto.isUTC = isUtc;
-
- // Timezone
- momentPrototype__proto.zoneAbbr = getZoneAbbr;
- momentPrototype__proto.zoneName = getZoneName;
-
- // Deprecations
- momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);
- momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);
- momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear);
- momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);
-
- var momentPrototype = momentPrototype__proto;
-
- function moment__createUnix (input) {
- return local__createLocal(input * 1000);
- }
-
- function moment__createInZone () {
- return local__createLocal.apply(null, arguments).parseZone();
- }
-
- var defaultCalendar = {
- sameDay : '[Today at] LT',
- nextDay : '[Tomorrow at] LT',
- nextWeek : 'dddd [at] LT',
- lastDay : '[Yesterday at] LT',
- lastWeek : '[Last] dddd [at] LT',
- sameElse : 'L'
- };
-
- function locale_calendar__calendar (key, mom, now) {
- var output = this._calendar[key];
- return isFunction(output) ? output.call(mom, now) : output;
- }
-
- var defaultLongDateFormat = {
- LTS : 'h:mm:ss A',
- LT : 'h:mm A',
- L : 'MM/DD/YYYY',
- LL : 'MMMM D, YYYY',
- LLL : 'MMMM D, YYYY h:mm A',
- LLLL : 'dddd, MMMM D, YYYY h:mm A'
- };
-
- function longDateFormat (key) {
- var format = this._longDateFormat[key],
- formatUpper = this._longDateFormat[key.toUpperCase()];
-
- if (format || !formatUpper) {
- return format;
- }
-
- this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
- return val.slice(1);
- });
-
- return this._longDateFormat[key];
- }
-
- var defaultInvalidDate = 'Invalid date';
-
- function invalidDate () {
- return this._invalidDate;
- }
-
- var defaultOrdinal = '%d';
- var defaultOrdinalParse = /\d{1,2}/;
-
- function ordinal (number) {
- return this._ordinal.replace('%d', number);
- }
-
- function preParsePostFormat (string) {
- return string;
- }
-
- var defaultRelativeTime = {
- future : 'in %s',
- past : '%s ago',
- s : 'a few seconds',
- m : 'a minute',
- mm : '%d minutes',
- h : 'an hour',
- hh : '%d hours',
- d : 'a day',
- dd : '%d days',
- M : 'a month',
- MM : '%d months',
- y : 'a year',
- yy : '%d years'
- };
-
- function relative__relativeTime (number, withoutSuffix, string, isFuture) {
- var output = this._relativeTime[string];
- return (isFunction(output)) ?
- output(number, withoutSuffix, string, isFuture) :
- output.replace(/%d/i, number);
- }
-
- function pastFuture (diff, output) {
- var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
- return isFunction(format) ? format(output) : format.replace(/%s/i, output);
- }
-
- var prototype__proto = Locale.prototype;
-
- prototype__proto._calendar = defaultCalendar;
- prototype__proto.calendar = locale_calendar__calendar;
- prototype__proto._longDateFormat = defaultLongDateFormat;
- prototype__proto.longDateFormat = longDateFormat;
- prototype__proto._invalidDate = defaultInvalidDate;
- prototype__proto.invalidDate = invalidDate;
- prototype__proto._ordinal = defaultOrdinal;
- prototype__proto.ordinal = ordinal;
- prototype__proto._ordinalParse = defaultOrdinalParse;
- prototype__proto.preparse = preParsePostFormat;
- prototype__proto.postformat = preParsePostFormat;
- prototype__proto._relativeTime = defaultRelativeTime;
- prototype__proto.relativeTime = relative__relativeTime;
- prototype__proto.pastFuture = pastFuture;
- prototype__proto.set = locale_set__set;
-
- // Month
- prototype__proto.months = localeMonths;
- prototype__proto._months = defaultLocaleMonths;
- prototype__proto.monthsShort = localeMonthsShort;
- prototype__proto._monthsShort = defaultLocaleMonthsShort;
- prototype__proto.monthsParse = localeMonthsParse;
- prototype__proto._monthsRegex = defaultMonthsRegex;
- prototype__proto.monthsRegex = monthsRegex;
- prototype__proto._monthsShortRegex = defaultMonthsShortRegex;
- prototype__proto.monthsShortRegex = monthsShortRegex;
-
- // Week
- prototype__proto.week = localeWeek;
- prototype__proto._week = defaultLocaleWeek;
- prototype__proto.firstDayOfYear = localeFirstDayOfYear;
- prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;
-
- // Day of Week
- prototype__proto.weekdays = localeWeekdays;
- prototype__proto._weekdays = defaultLocaleWeekdays;
- prototype__proto.weekdaysMin = localeWeekdaysMin;
- prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin;
- prototype__proto.weekdaysShort = localeWeekdaysShort;
- prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;
- prototype__proto.weekdaysParse = localeWeekdaysParse;
-
- // Hours
- prototype__proto.isPM = localeIsPM;
- prototype__proto._meridiemParse = defaultLocaleMeridiemParse;
- prototype__proto.meridiem = localeMeridiem;
-
- function lists__get (format, index, field, setter) {
- var locale = locale_locales__getLocale();
- var utc = create_utc__createUTC().set(setter, index);
- return locale[field](utc, format);
- }
-
- function list (format, index, field, count, setter) {
- if (typeof format === 'number') {
- index = format;
- format = undefined;
- }
-
- format = format || '';
-
- if (index != null) {
- return lists__get(format, index, field, setter);
- }
-
- var i;
- var out = [];
- for (i = 0; i < count; i++) {
- out[i] = lists__get(format, i, field, setter);
- }
- return out;
- }
-
- function lists__listMonths (format, index) {
- return list(format, index, 'months', 12, 'month');
- }
-
- function lists__listMonthsShort (format, index) {
- return list(format, index, 'monthsShort', 12, 'month');
- }
-
- function lists__listWeekdays (format, index) {
- return list(format, index, 'weekdays', 7, 'day');
- }
-
- function lists__listWeekdaysShort (format, index) {
- return list(format, index, 'weekdaysShort', 7, 'day');
- }
-
- function lists__listWeekdaysMin (format, index) {
- return list(format, index, 'weekdaysMin', 7, 'day');
- }
-
- locale_locales__getSetGlobalLocale('en', {
- ordinalParse: /\d{1,2}(th|st|nd|rd)/,
- ordinal : function (number) {
- var b = number % 10,
- output = (toInt(number % 100 / 10) === 1) ? 'th' :
- (b === 1) ? 'st' :
- (b === 2) ? 'nd' :
- (b === 3) ? 'rd' : 'th';
- return number + output;
- }
- });
-
- // Side effect imports
- utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);
- utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);
-
- var mathAbs = Math.abs;
-
- function duration_abs__abs () {
- var data = this._data;
-
- this._milliseconds = mathAbs(this._milliseconds);
- this._days = mathAbs(this._days);
- this._months = mathAbs(this._months);
-
- data.milliseconds = mathAbs(data.milliseconds);
- data.seconds = mathAbs(data.seconds);
- data.minutes = mathAbs(data.minutes);
- data.hours = mathAbs(data.hours);
- data.months = mathAbs(data.months);
- data.years = mathAbs(data.years);
-
- return this;
- }
-
- function duration_add_subtract__addSubtract (duration, input, value, direction) {
- var other = create__createDuration(input, value);
-
- duration._milliseconds += direction * other._milliseconds;
- duration._days += direction * other._days;
- duration._months += direction * other._months;
-
- return duration._bubble();
- }
-
- // supports only 2.0-style add(1, 's') or add(duration)
- function duration_add_subtract__add (input, value) {
- return duration_add_subtract__addSubtract(this, input, value, 1);
- }
-
- // supports only 2.0-style subtract(1, 's') or subtract(duration)
- function duration_add_subtract__subtract (input, value) {
- return duration_add_subtract__addSubtract(this, input, value, -1);
- }
-
- function absCeil (number) {
- if (number < 0) {
- return Math.floor(number);
- } else {
- return Math.ceil(number);
- }
- }
-
- function bubble () {
- var milliseconds = this._milliseconds;
- var days = this._days;
- var months = this._months;
- var data = this._data;
- var seconds, minutes, hours, years, monthsFromDays;
-
- // if we have a mix of positive and negative values, bubble down first
- // check: https://github.com/moment/moment/issues/2166
- if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||
- (milliseconds <= 0 && days <= 0 && months <= 0))) {
- milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
- days = 0;
- months = 0;
- }
-
- // The following code bubbles up values, see the tests for
- // examples of what that means.
- data.milliseconds = milliseconds % 1000;
-
- seconds = absFloor(milliseconds / 1000);
- data.seconds = seconds % 60;
-
- minutes = absFloor(seconds / 60);
- data.minutes = minutes % 60;
-
- hours = absFloor(minutes / 60);
- data.hours = hours % 24;
-
- days += absFloor(hours / 24);
-
- // convert days to months
- monthsFromDays = absFloor(daysToMonths(days));
- months += monthsFromDays;
- days -= absCeil(monthsToDays(monthsFromDays));
-
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
-
- data.days = days;
- data.months = months;
- data.years = years;
-
- return this;
- }
-
- function daysToMonths (days) {
- // 400 years have 146097 days (taking into account leap year rules)
- // 400 years have 12 months === 4800
- return days * 4800 / 146097;
- }
-
- function monthsToDays (months) {
- // the reverse of daysToMonths
- return months * 146097 / 4800;
- }
-
- function as (units) {
- var days;
- var months;
- var milliseconds = this._milliseconds;
-
- units = normalizeUnits(units);
-
- if (units === 'month' || units === 'year') {
- days = this._days + milliseconds / 864e5;
- months = this._months + daysToMonths(days);
- return units === 'month' ? months : months / 12;
- } else {
- // handle milliseconds separately because of floating point math errors (issue #1867)
- days = this._days + Math.round(monthsToDays(this._months));
- switch (units) {
- case 'week' : return days / 7 + milliseconds / 6048e5;
- case 'day' : return days + milliseconds / 864e5;
- case 'hour' : return days * 24 + milliseconds / 36e5;
- case 'minute' : return days * 1440 + milliseconds / 6e4;
- case 'second' : return days * 86400 + milliseconds / 1000;
- // Math.floor prevents floating point math errors here
- case 'millisecond': return Math.floor(days * 864e5) + milliseconds;
- default: throw new Error('Unknown unit ' + units);
- }
- }
- }
-
- // TODO: Use this.as('ms')?
- function duration_as__valueOf () {
- return (
- this._milliseconds +
- this._days * 864e5 +
- (this._months % 12) * 2592e6 +
- toInt(this._months / 12) * 31536e6
- );
- }
-
- function makeAs (alias) {
- return function () {
- return this.as(alias);
- };
- }
-
- var asMilliseconds = makeAs('ms');
- var asSeconds = makeAs('s');
- var asMinutes = makeAs('m');
- var asHours = makeAs('h');
- var asDays = makeAs('d');
- var asWeeks = makeAs('w');
- var asMonths = makeAs('M');
- var asYears = makeAs('y');
-
- function duration_get__get (units) {
- units = normalizeUnits(units);
- return this[units + 's']();
- }
-
- function makeGetter(name) {
- return function () {
- return this._data[name];
- };
- }
-
- var milliseconds = makeGetter('milliseconds');
- var seconds = makeGetter('seconds');
- var minutes = makeGetter('minutes');
- var hours = makeGetter('hours');
- var days = makeGetter('days');
- var months = makeGetter('months');
- var years = makeGetter('years');
-
- function weeks () {
- return absFloor(this.days() / 7);
- }
-
- var round = Math.round;
- var thresholds = {
- s: 45, // seconds to minute
- m: 45, // minutes to hour
- h: 22, // hours to day
- d: 26, // days to month
- M: 11 // months to year
- };
-
- // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
- function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
- return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
- }
-
- function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {
- var duration = create__createDuration(posNegDuration).abs();
- var seconds = round(duration.as('s'));
- var minutes = round(duration.as('m'));
- var hours = round(duration.as('h'));
- var days = round(duration.as('d'));
- var months = round(duration.as('M'));
- var years = round(duration.as('y'));
-
- var a = seconds < thresholds.s && ['s', seconds] ||
- minutes <= 1 && ['m'] ||
- minutes < thresholds.m && ['mm', minutes] ||
- hours <= 1 && ['h'] ||
- hours < thresholds.h && ['hh', hours] ||
- days <= 1 && ['d'] ||
- days < thresholds.d && ['dd', days] ||
- months <= 1 && ['M'] ||
- months < thresholds.M && ['MM', months] ||
- years <= 1 && ['y'] || ['yy', years];
-
- a[2] = withoutSuffix;
- a[3] = +posNegDuration > 0;
- a[4] = locale;
- return substituteTimeAgo.apply(null, a);
- }
-
- // This function allows you to set a threshold for relative time strings
- function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {
- if (thresholds[threshold] === undefined) {
- return false;
- }
- if (limit === undefined) {
- return thresholds[threshold];
- }
- thresholds[threshold] = limit;
- return true;
- }
-
- function humanize (withSuffix) {
- var locale = this.localeData();
- var output = duration_humanize__relativeTime(this, !withSuffix, locale);
-
- if (withSuffix) {
- output = locale.pastFuture(+this, output);
- }
-
- return locale.postformat(output);
- }
-
- var iso_string__abs = Math.abs;
-
- function iso_string__toISOString() {
- // for ISO strings we do not use the normal bubbling rules:
- // * milliseconds bubble up until they become hours
- // * days do not bubble at all
- // * months bubble up until they become years
- // This is because there is no context-free conversion between hours and days
- // (think of clock changes)
- // and also not between days and months (28-31 days per month)
- var seconds = iso_string__abs(this._milliseconds) / 1000;
- var days = iso_string__abs(this._days);
- var months = iso_string__abs(this._months);
- var minutes, hours, years;
-
- // 3600 seconds -> 60 minutes -> 1 hour
- minutes = absFloor(seconds / 60);
- hours = absFloor(minutes / 60);
- seconds %= 60;
- minutes %= 60;
-
- // 12 months -> 1 year
- years = absFloor(months / 12);
- months %= 12;
-
-
- // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
- var Y = years;
- var M = months;
- var D = days;
- var h = hours;
- var m = minutes;
- var s = seconds;
- var total = this.asSeconds();
-
- if (!total) {
- // this is the same as C#'s (Noda) and python (isodate)...
- // but not other JS (goog.date)
- return 'P0D';
- }
-
- return (total < 0 ? '-' : '') +
- 'P' +
- (Y ? Y + 'Y' : '') +
- (M ? M + 'M' : '') +
- (D ? D + 'D' : '') +
- ((h || m || s) ? 'T' : '') +
- (h ? h + 'H' : '') +
- (m ? m + 'M' : '') +
- (s ? s + 'S' : '');
- }
-
- var duration_prototype__proto = Duration.prototype;
-
- duration_prototype__proto.abs = duration_abs__abs;
- duration_prototype__proto.add = duration_add_subtract__add;
- duration_prototype__proto.subtract = duration_add_subtract__subtract;
- duration_prototype__proto.as = as;
- duration_prototype__proto.asMilliseconds = asMilliseconds;
- duration_prototype__proto.asSeconds = asSeconds;
- duration_prototype__proto.asMinutes = asMinutes;
- duration_prototype__proto.asHours = asHours;
- duration_prototype__proto.asDays = asDays;
- duration_prototype__proto.asWeeks = asWeeks;
- duration_prototype__proto.asMonths = asMonths;
- duration_prototype__proto.asYears = asYears;
- duration_prototype__proto.valueOf = duration_as__valueOf;
- duration_prototype__proto._bubble = bubble;
- duration_prototype__proto.get = duration_get__get;
- duration_prototype__proto.milliseconds = milliseconds;
- duration_prototype__proto.seconds = seconds;
- duration_prototype__proto.minutes = minutes;
- duration_prototype__proto.hours = hours;
- duration_prototype__proto.days = days;
- duration_prototype__proto.weeks = weeks;
- duration_prototype__proto.months = months;
- duration_prototype__proto.years = years;
- duration_prototype__proto.humanize = humanize;
- duration_prototype__proto.toISOString = iso_string__toISOString;
- duration_prototype__proto.toString = iso_string__toISOString;
- duration_prototype__proto.toJSON = iso_string__toISOString;
- duration_prototype__proto.locale = locale;
- duration_prototype__proto.localeData = localeData;
-
- // Deprecations
- duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);
- duration_prototype__proto.lang = lang;
-
- // Side effect imports
-
- // FORMATTING
-
- addFormatToken('X', 0, 0, 'unix');
- addFormatToken('x', 0, 0, 'valueOf');
-
- // PARSING
-
- addRegexToken('x', matchSigned);
- addRegexToken('X', matchTimestamp);
- addParseToken('X', function (input, array, config) {
- config._d = new Date(parseFloat(input, 10) * 1000);
- });
- addParseToken('x', function (input, array, config) {
- config._d = new Date(toInt(input));
- });
-
- // Side effect imports
-
-
- utils_hooks__hooks.version = '2.12.0';
-
- setHookCallback(local__createLocal);
-
- utils_hooks__hooks.fn = momentPrototype;
- utils_hooks__hooks.min = min;
- utils_hooks__hooks.max = max;
- utils_hooks__hooks.now = now;
- utils_hooks__hooks.utc = create_utc__createUTC;
- utils_hooks__hooks.unix = moment__createUnix;
- utils_hooks__hooks.months = lists__listMonths;
- utils_hooks__hooks.isDate = isDate;
- utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale;
- utils_hooks__hooks.invalid = valid__createInvalid;
- utils_hooks__hooks.duration = create__createDuration;
- utils_hooks__hooks.isMoment = isMoment;
- utils_hooks__hooks.weekdays = lists__listWeekdays;
- utils_hooks__hooks.parseZone = moment__createInZone;
- utils_hooks__hooks.localeData = locale_locales__getLocale;
- utils_hooks__hooks.isDuration = isDuration;
- utils_hooks__hooks.monthsShort = lists__listMonthsShort;
- utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin;
- utils_hooks__hooks.defineLocale = defineLocale;
- utils_hooks__hooks.updateLocale = updateLocale;
- utils_hooks__hooks.locales = locale_locales__listLocales;
- utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort;
- utils_hooks__hooks.normalizeUnits = normalizeUnits;
- utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;
- utils_hooks__hooks.prototype = momentPrototype;
-
- var _moment = utils_hooks__hooks;
-
- return _moment;
-
-})); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/multiselect.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/multiselect.js
deleted file mode 100644
index eda8da08..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/multiselect.js
+++ /dev/null
@@ -1,62 +0,0 @@
-'use strict';
-
-angular.module('quantum').directive('dropdownMultiselect', ['$document', function($document){
- return {
- restrict: 'E',
- scope:{
- model: '=ngModel',
- options: '='
- },
- template: "<div class='btn-group ng-isolate-scope buttons-dropdown--small' data-ng-class='{open: open}'>"+
- "<a class='button btn buttons-dropdown__split button--secondary' data-ng-click='open=!open;' style='border-right:none;'>Multi-Select</a>"+
- "<a class='button buttons-dropdown__drop dropdown-toggle button--secondary' data-ng-click='open=!open;' style='border-left:none;color:#067ab4'></a>"+
- "<ul class='dropdown-menu' aria-labelledby='dropdownMenu'>" +
- "<li><a data-ng-click='selectAll()'><i class='icon-included-checkmark'></i> Check All</a></li>" +
- "<li><a data-ng-click='deselectAll();'><i class='icon-erase'></i> Uncheck All</a></li>" +
- "<li class='divider'></li>" +
- "<li data-ng-repeat='option in options'> <a data-ng-click='setSelectedItem()'>{{option.title}}<span data-ng-class='isChecked(option.value)'></span></a></li>" +
- "</ul>" +
- "</div>" ,
- link: function($scope,element,attr){
-
- $scope.$watch("options",function(newValue,oldValue) {
- $scope.model = [];
- });
-
- $scope.selectAll = function () {
- $scope.model = _.pluck($scope.options, 'value');
- };
- $scope.deselectAll = function() {
- $scope.model=[];
- };
- $scope.setSelectedItem = function(){
- var value = this.option.value;
- if (_.contains($scope.model, value)) {
- $scope.model = _.without($scope.model, value);
- } else {
- $scope.model.push(value);
- }
- return false;
- };
- $scope.isChecked = function (value) {
- if (_.contains($scope.model, value)) {
- return 'icon-included-checkmark pull-right';
- }
- return false;
- };
-
- $document.bind('click', function(event){
- var isClickedElementChildOfPopup = element
- .find(event.target)
- .length > 0;
-
- if (isClickedElementChildOfPopup)
- return;
-
- $scope.open = false;
- $scope.$apply();
- });
-
- }
- };
-}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/quick_links.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/quick_links.js
deleted file mode 100644
index 81e8276e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/quick_links.js
+++ /dev/null
@@ -1,33 +0,0 @@
-'use strict';
-angular.module('quantum').directive('quickLinks', ['$http','$window', function($http,$window){
- return {
- restrict: 'E',
- scope:{
- ngModel: '='
- },
- template: "<div att-links-list class='att-accordion'>" +
- "<a ng-repeat='quickLink in quickLinks' class='att-accordion__group' att-links-list-item href='' ng-click='openLink(quickLink.reportURL)'>{{quickLink.reportName}}<span ng-show='quickLink.showDescr'> - {{quickLink.reportDescr}}</span></a>" +
- "<a ng-repeat='quickLink in ngModel' class='att-accordion__group' att-links-list-item href='' ng-click='openLink(quickLink.reportURL)'>{{quickLink.reportName}}<span ng-show='quickLink.showDescr'> - {{quickLink.reportDescr}}</span></a>" +
- "</div>",
- link: function($scope,element,attr){
- $scope.ngDisplayType=attr.ngDisplayType;
- $scope.popUpWindowSize = "top=" + ((screen.height*.2)/2) + ",left=" + ((screen.width*.05)/2) + ",width="+(screen.width-(screen.width*.06))+",height="+(screen.height-(screen.height*.25));
-
- $scope.openLink = function(url){
- if($scope.ngDisplayType){
- if($scope.ngDisplayType=='1'){
- $window.open(url,'_self');
- }else if($scope.ngDisplayType=='2'){
- $window.open(url, '_blank');
- }else if($scope.ngDisplayType=='3'){
- $window.open(url, '', $scope.popUpWindowSize);
- }
- }
- };
-
- $http.get('raptor.htm?action=quicklinks.json&quick_links_menu_id='+attr.ngMenuId).then(function(result){
- $scope.quickLinks=result.data;
- });
- }
- };
-}]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.html b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.html
deleted file mode 100644
index 35fad2b4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.html
+++ /dev/null
@@ -1,313 +0,0 @@
-<div style="color:#2ca02c" ng-show="successSubmit">Your configurations have been successfully submitted</div>
-
-<div style="min-height:500px" data-ng-init="init()">
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Chart Type</label><BR>
- <div class="form-field" att-select="chartTypes" ng-model="reportRunJson.chartTypeJSON" placeholder="Select an Option" show-input-filter="true" ng-change="actionClicked()"></div>
- </div>
-
-
- <div class="fn-ebz-container" style="position:relative; top: -8px;">
- <label class="fn-ebz-text-label">Animate</label><BR>
- <div><input type="checkbox" ng-model="reportRunJson.animation" att-checkbox data-ng-value="true"></div>
- </div>
- <BR>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Width (Px)</label><BR>
- <input type="text" name="chartWidth" maxlength=4 only-digits ng-model="reportRunJson.width" style="width:80px"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Height (Px)</label><BR>
- <input type="text" name="chartHeight" maxlength=4 only-digits ng-model="reportRunJson.height" style="width:80px"/>
- </div>
- <BR>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Title</label><BR>
- <span><input name="tle" type="radio" ng-model="reportRunJson.showTitle" data-ng-value="true"/>Show</span>
- <span><input name="tle" type="radio" ng-model="reportRunJson.showTitle" data-ng-value="false"/>Hide</span>
- </div>
- <BR>
-
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Domain Axis</label><BR>
- <div class="form-field" att-select="reportRunJson.chartColumnJSONList" ng-model="reportRunJson.domainAxisJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Category</label><BR>
- <div class="form-field" att-select="reportRunJson.chartColumnJSONList" ng-model="reportRunJson.categoryAxisJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
- <BR>
-
-<div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
-<div ng-repeat="rangeReport in reportRunJson.rangeAxisList">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Range Axis</label><BR>
- <div class="form-field" att-select="reportRunJson.chartColumnJSONList"
- ng-model="rangeReport.rangeAxisLabelJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Y Axis</label><BR>
- <input id="yaxs" type="text" name="yAxis" maxlength=50 ng-model=rangeReport.rangeYAxis style="width:100px"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Chart Title</label><BR>
- <input type="text" name="chartTitle" maxlength=50 ng-model="rangeReport.rangeChartGroup" style="width:200px"/>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Color</label><BR>
- <div class="form-field" att-select="rangeColors" ng-model="rangeReport.rangeColorJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Line Type</label><BR>
- <div class="form-field" att-select="lineTypes" ng-model="rangeReport.rangeLineTypeJSON" placeholder="Select an Option" show-input-filter="true"></div>
- </div>
-
- <div class="fn-ebz-container" ng-show="reportRunJson.chartTypeJSON.value=='FlexTimeChart' ||
- reportRunJson.chartTypeJSON.value=='AnnotationChart'" style="position:relative; top: -8px;">
- <label class="fn-ebz-text-label">Area</label><BR>
- <input type="checkbox" ng-model="rangeReport.showAsArea" att-checkbox data-ng-value="true">
- </div>
-
- <div class="fn-ebz-container" style="position:relative; top: 25px;">
- <a href="javascript:void(0)" ng-show="{{$index==0}}" style="float: right;" att-button btn-type="secondary" size="small" att-accessibility-click="13,32"
- ng-click="addRangeAxisRow(rangeReport);" >Add</a>
- <a href="javascript:void(0)" ng-show="{{$index>0}}" style="float: right;" att-button btn-type="secondary" size="small" att-accessibility-click="13,32" ng-click="removeRangeAxisRow($index);" >
- Remove</a>
- </div>
- </div>
- </div>
- </div>
- <BR>
-
-<accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="additionalOptions" heading="Additional Options" child-length="10">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Primary Axis Label</label><BR>
- <input type="text" name="prAxis" maxlength=50 ng-model="reportRunJson.primaryAxisLabel" style="width:210px"/>
- </div>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Secondary Axis Label</label><BR>
- <input type="text" name="secAxis" maxlength=75 ng-model="reportRunJson.secondaryAxisLabel" style="width:210px"/>
- </div>
- <BR>
- <div class="fn-ebz-container" >
- <label class="fn-ebz-text-label">Range Axis Minimum Range</label><BR>
- <input type="text" name="rAxisMinRange" only-digits ng-model="reportRunJson.minRange" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Maximum Range</label><BR>
- <input type="text" name="rAxisMaxRange" only-digits ng-model="reportRunJson.maxRange" ng-maxLength="35" style="width:210px"/>
- </div><BR>
- </accordion-group>
-</accordion>
-
-
-
-
-<div ng-show="reportRunJson.chartTypeJSON.value=='BarChart3D'">
-
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accBar" heading="Bar Chart Options" child-length="10">
-
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div class="fn-ebz-container" style="position:relative;margin:10px;" >
- <label class="fn-ebz-text-label">Orientation</label><BR>
- <span><input name="orient" type="radio" ng-model="reportRunJson.barChartOptions.verticalOrientation" data-ng-value="true"/>Vertical</span>
- <span><input name="orient" type="radio" ng-model="reportRunJson.barChartOptions.verticalOrientation" data-ng-value="false"/>Horizontal</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Stacked</label><BR>
- <span><input name="stack" type="radio" ng-model="reportRunJson.barChartOptions.stackedChart" data-ng-value="true"/>Yes</span>
- <span><input name="stack" type="radio" ng-model="reportRunJson.barChartOptions.stackedChart" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Show Controls</label><BR>
- <span><input name="shwcontrol" type="radio" ng-model="reportRunJson.barChartOptions.displayBarControls" data-ng-value="true"/>Yes</span>
- <span><input name="shwcontrol" type="radio" ng-model="reportRunJson.barChartOptions.displayBarControls" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">XAxis Date Type</label><BR>
- <span><input name="xAxisDtype" type="radio" ng-model="reportRunJson.barChartOptions.xAxisDateType" data-ng-value="true"/>Yes</span>
- <span><input name="xAxisDtype" type="radio" ng-model="reportRunJson.barChartOptions.xAxisDateType" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Display less XAxis tickers</label><BR>
- <span><input name="xTicker" type="radio" ng-model="reportRunJson.barChartOptions.minimizeXAxisTickers" data-ng-value="true"/>Yes</span>
- <span><input name="xTicker" type="radio" ng-model="reportRunJson.barChartOptions.minimizeXAxisTickers" data-ng-value="false"/>No</span>
- </div><BR>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Is Time Axis?</label><BR>
- <span><input name="timeAxis" type="radio" ng-model="reportRunJson.barChartOptions.timeAxis" data-ng-value="true"/>Yes</span>
- <span><input name="timeAxis" type="radio" ng-model="reportRunJson.barChartOptions.timeAxis" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Log Scale (Y Axis)</label><BR>
- <span><input type="checkbox" ng-model="reportRunJson.barChartOptions.yAxisLogScale" att-checkbox data-ng-value="true"></span>
-
- </div>
- </div>
-
- </accordion-group>
-</accordion>
-</div>
-
- <div ng-show="reportRunJson.chartTypeJSON.value=='TimeSeriesChart'">
- <!-- <div class="fn-ebz-text-label"><b>Time Series Chart Options</b></div><BR> -->
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accTimeChart" heading="Time Series Chart Options" child-length="10">
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Render as</label><BR>
- <span><input name="renderAs" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.lineChartRenderer" value="line"/>Line</span>
- <span><input name="orient" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.lineChartRenderer" value="area"/>Area</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">X Axis Label</label><BR>
- <span><input type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.showXAxisLabel" att-checkbox data-ng-value="true"></span>
- </div><BR>
-
- <div class="fn-ebz-container" style="position:relative;bottom:10px;">
- <label class="fn-ebz-text-label">X Axis <br>Tickers</label><BR>
- <span style="position:relative;top:10px;"><input type="checkbox" ng-model="reportRunJson.timeSeriesChartOptions.addXAxisTicker" att-checkbox data-ng-value="true"></span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:20px;">
- <label class="fn-ebz-text-label">Is Time Axis?</label><BR>
- <span><input name="timeAxisChart" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.nonTimeAxis" data-ng-value="true"/>Yes</span>
- <span><input name="timeAxisChart" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.nonTimeAxis" data-ng-value="false"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Multi Series?</label><BR>
- <span><input name="mSeries" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.multiSeries" data-ng-value="true"/>Yes</span>
- <span><input name="mSeries" type="radio" ng-model="reportRunJson.timeSeriesChartOptions.multiSeries" data-ng-value="false"/>No</span>
- </div>
- </div>
- </div>
-
- </accordion-group>
- </accordion>
-
- </div>
-
- <div ng-show="reportRunJson.chartTypeJSON.value=='FlexTimeChart'">
-
-
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accFlexTimeChart" heading="Flex Time Series Chart Options" child-length="10">
-
- <!-- <div class="fn-ebz-text-label"><b>Flex Time Series Chart Options</b></div><BR> -->
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Zoom-In Window</label><BR>
- <span><input type="text" name="zWindow" only-digits maxlength=3 ng-model="reportRunJson.flexTimeSeriesChartOptions.zoomIn"></span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Time Axis Type</label><BR>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="weekly"/>Weekly</span>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="daily"/>Daily</span>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="hourly"/>Hourly</span>
- <span><input name="timeAxisType" type="radio" ng-model="reportRunJson.flexTimeSeriesChartOptions.timeAxisType" value="30min"/>30 Min</span>
- </div>
- </div>
- </div>
- </accordion-group>
- </accordion>
-
- </div>
-
-
-
-
-
-
-
- <!-- <div class="fn-ebz-text-label"><b>Common Options</b></div><BR> -->
-
- <accordion close-others="true" css="att-accordion--no-box">
- <accordion-group id="accCommonOptions" heading="Common Options" child-length="10">
-
- <div style="border:2px;border-style:solid;border-color:#808080;margin-bottom:9px">
- <div style="margin-left:5px">
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Legend Angle</label><BR>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="up45"/>up 45&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="up90"/>up 90&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="down45"/>down 45&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="down90"/>down 90&deg;</span>
- <span><input name="langle" type="radio" ng-model="reportRunJson.commonChartOptions.legendLabelAngle" value="standard"/>Standard</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:15px;">
- <label class="fn-ebz-text-label">Legend Position</label><BR>
- <span><input name="lgPosition" type="radio" ng-model="reportRunJson.commonChartOptions.legendPosition" value="top"/>Top</span>
- <span><input name="lgPosition" type="radio" ng-model="reportRunJson.commonChartOptions.legendPosition" value="bottom"/>Bottom</span>
- </div><BR>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Legend</label><BR>
- <span><input name="lgd" type="radio" ng-model="reportRunJson.commonChartOptions.hideLegend" data-ng-value="false"/>Yes</span>
- <span><input name="lgd" type="radio" ng-model="reportRunJson.commonChartOptions.hideLegend" data-ng-value="true"/>No</span>
- </div>
-
- <div class="fn-ebz-container" style="position:relative;margin:10px;">
- <label class="fn-ebz-text-label">Animation</label><BR>
- <span><input name="anmtate" type="radio" ng-model="reportRunJson.commonChartOptions.animateAnimatedChart" data-ng-value="true" />Yes</span>
- <span><input name="anmtate" type="radio" ng-model="reportRunJson.commonChartOptions.animateAnimatedChart" data-ng-value="false"/>No</span>
- </div><BR>
-
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Top Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.topMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.topMargin" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Bottom Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.bottomMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.bottomMargin" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Left Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.leftMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.leftMargin" style="width:210px"/>
- </div>
- <div class="fn-ebz-container">
- <label class="fn-ebz-text-label">Right Margin</label><BR>
- <input type="text" name="reportRunJson.commonChartOptions.rightMargin" only-digits maxlength=3 ng-model="reportRunJson.commonChartOptions.rightMargin" style="width:210px">
- </div><BR>
- </div>
- </div>
- </accordion-group>
-</accordion>
- <br/><br/>
- <a href="javascript:void(0)" att-button btn-type="primary" att-accessibility-click="13,32" ng-click="saveChartData();">Save</a>
- <a href="report#/report_run/c_master={{reportRunJson.reportID}}&refresh=Y" att-button btn-type="primary" att-accessibility-click="13,32">Run</a>
-
-
-
-
-
-</div>
-
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.js
deleted file mode 100644
index 7fc167c1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_chart_wizard.js
+++ /dev/null
@@ -1,671 +0,0 @@
-app.controller('ChartController', function ($scope, $rootScope, $timeout, $window, $http, $routeParams,modalService) {
- //$scope.test="1223";
- //alert($scope.chartType.value);
-
- $scope.populateChrtWzdFields = function() {
-
- $scope.reportRunJson = {};
- // console.log($routeParams.reportId);
- $http.get("raptor.htm?action=chart.json&c_master="+$routeParams.reportId).then(function (response) {
- //$scope.myData = JSON.stringify(response.data);
- // response.data.rangeAxisList[0].rangeColorJSON = {};
- $scope.reportRunJson = response.data;
- // $scope.chrtheight = $scope.reportRunJson.height;
- // console.log(JSON.stringify($scope.reportRunJson));
- /* if ($scope.reportRunJson.showTitle==false)
- $scope.reportRunJson.showTitle="false";
- else
- $scope.reportRunJson.showTitle="true"; */
-
- console.log($scope.reportRunJson);
-
-
-
-
-
- //Set chart type
- if ($scope.reportRunJson.chartTypeJSON) {
- var chrtTypeValue = $scope.reportRunJson.chartTypeJSON.value;
- for(var i = 0; i < $scope.chartTypes.length; i++) {
- var obj = $scope.chartTypes[i];
- //console.log(obj.id);
- if ($scope.chartTypes[i].value==chrtTypeValue) {
- $scope.reportRunJson.chartTypeJSON.index=$scope.chartTypes[i].index;
- $scope.reportRunJson.chartTypeJSON.title=$scope.chartTypes[i].title;
- }
-
- }
- }
-
- //Set Domain Axis
- if ($scope.reportRunJson.domainAxisJSON) {
- var domaninAxisValue = $scope.reportRunJson.domainAxisJSON.value;
- for(var i = 0; i < $scope.reportRunJson.chartColumnJSONList.length; i++) {
- if ($scope.reportRunJson.chartColumnJSONList[i].value==domaninAxisValue) {
- $scope.reportRunJson.domainAxisJSON.index=$scope.reportRunJson.chartColumnJSONList[i].index;
- $scope.reportRunJson.domainAxisJSON.title=$scope.reportRunJson.chartColumnJSONList[i].title;
- }
-
- }
- }
-
- //Set Category
- if ($scope.reportRunJson.categoryAxisJSON) {
- var categoryAxisValue = $scope.reportRunJson.categoryAxisJSON.value;
- for(var i = 0; i < $scope.reportRunJson.chartColumnJSONList.length; i++) {
- if ($scope.reportRunJson.chartColumnJSONList[i].value==categoryAxisValue) {
- $scope.reportRunJson.categoryAxisJSON.index=$scope.reportRunJson.chartColumnJSONList[i].index;
- $scope.reportRunJson.categoryAxisJSON.title=$scope.reportRunJson.chartColumnJSONList[i].title;
- }
-
- }
- }
-
- //Set range axis label
- if ($scope.reportRunJson.rangeAxisList) {
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
-
- if ($scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON) {
- var rangeAxisLabelValue = $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.value;
- for(var i = 0; i < $scope.reportRunJson.chartColumnJSONList.length; i++) {
- if ($scope.reportRunJson.chartColumnJSONList[i].value==rangeAxisLabelValue) {
- $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.index=$scope.reportRunJson.chartColumnJSONList[i].index;
- $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.title=$scope.reportRunJson.chartColumnJSONList[i].title;
- }
-
- }
- }
- }
- }
-
-
- //set range linetype
- if ($scope.reportRunJson.rangeAxisList) {
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
- if ($scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON != null && $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.value != ""
- && $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.value != null) {
- var lineTypeValue = $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.value;
- for(var i = 0; i < $scope.lineTypes.length; i++) {
- if ($scope.lineTypes[i].value==lineTypeValue) {
- $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.index=$scope.lineTypes[i].index;
- $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON.title=$scope.lineTypes[i].title;
- }
-
- }
- } else {
- $scope.reportRunJson.rangeAxisList[j].rangeLineTypeJSON = null;
- }
- }
-
- }
- //set range color
- if ($scope.reportRunJson.rangeAxisList) {
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
- if ($scope.reportRunJson.rangeAxisList[j].rangeColorJSON != null && $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.value != ""
- && $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.value != null) {
- var colorValue = $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.value;
-
- for(var i = 0; i < $scope.rangeColors.length; i++) {
-
- if ($scope.rangeColors[i].value==colorValue) {
- $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.index=$scope.rangeColors[i].index;
- $scope.reportRunJson.rangeAxisList[j].rangeColorJSON.title=$scope.rangeColors[i].title;
- }
- }
- }else {
- $scope.reportRunJson.rangeAxisList[j].rangeColorJSON = null;
- }
- }
- }
-
-
-
-
- /* var data = $.param({
- json: JSON.stringify($scope.reportRunJson)
- });
- console.log(data);
- $http.post("/ecomp-sdk-app/testraptorchart", JSON.stringify($scope.reportRunJson)).success(function(data, status) {
- console.log(data);
- console.log(status);
-
- })*/
-
- });
-
-
- /* $scope.chrtwidth = $scope.reportRunJson.width;
-
- $scope.chrtheight = $scope.reportRunJson.height;
- $scope.title="false";
- $scope.domainAxes = $scope.reportRunJson.chartColumnJSONList;
- $scope.categories = $scope.reportRunJson.chartColumnJSONList;
- $scope.rangeAxes = $scope.reportRunJson.chartColumnJSONList; */
-
- // $scope.Color = $scope.rangeColors;
- // $scope.lineType = $scope.lineTypes;
- // $scope.praxis = $scope.reportRunJson.primaryAxisLabel;
- // $scope.secaxis = $scope.reportRunJson.secondaryAxisLabel;
- // $scope.raxisminrange = $scope.reportRunJson.minRange;
- // $scope.raxismaxrange = $scope.reportRunJson.maxRange;
- // $scope.reportRunJson.legendangle = "up_45";
- $scope.legend = "true";
- // $scope.animate = "true";
- // $scope.topmargin = $scope.reportRunJson.topMargin;
- // $scope.bottommargin = $scope.reportRunJson.bottomMargin;
- // $scope.leftmargin = $scope.reportRunJson.leftMargin;
- // $scope.rightmargin = $scope.reportRunJson.rightMargin;
- // $scope.tt1=false;
-
-
-
- }
-
- $scope.saveChartData = function() {
- //console.log(JSON.stringify($scope.reportRunJson));
-
- //Converting string variables to numbers
- $scope.reportRunJson.commonChartOptions.rightMargin = Number($scope.reportRunJson.commonChartOptions.rightMargin);
- $scope.reportRunJson.commonChartOptions.topMargin = Number($scope.reportRunJson.commonChartOptions.topMargin);
- $scope.reportRunJson.commonChartOptions.bottomMargin = Number($scope.reportRunJson.commonChartOptions.bottomMargin);
- $scope.reportRunJson.commonChartOptions.leftMargin = Number($scope.reportRunJson.commonChartOptions.leftMargin);
-
- //Concatenate range Y axis with range label with pipe delimiter
- /* if ($scope.reportRunJson.rangeAxisList) {
-
- for(var j = 0; j < $scope.reportRunJson.rangeAxisList.length; j++) {
-
- if ($scope.reportRunJson.rangeAxisList[j].rangeYAxis) {
- if ($scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON != "" && $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON != null) {
- $scope.reportRunJson.rangeAxisList[j].rangeYAxis =
- $scope.reportRunJson.rangeAxisList[j].rangeYAxis + "|"+ $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.value;
-
- //document.getElementById('yaxs').value = $scope.reportRunJson.rangeAxisList[j].rangeYAxis.substring(0,$scope.reportRunJson.rangeAxisList[j].rangeYAxis.indexOf('|'));
- }
- } else {
- if ($scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON != "" && $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON != null)
- $scope.reportRunJson.rangeAxisList[j].rangeYAxis = "|"+ $scope.reportRunJson.rangeAxisList[j].rangeAxisLabelJSON.value;
-
- }
- }
-
-
- }*/
-
- if ($scope.reportRunJson.categoryAxisJSON == "") {
- console.log('Inside categoryAxisJSON value');
- $scope.reportRunJson.categoryAxisJSON = {};
- $scope.reportRunJson.categoryAxisJSON.value = -1;
- console.log('$scope.reportRunJson.categoryAxisJSON',$scope.reportRunJson.categoryAxisJSON);
- }
-
-
- $http.post("save_chart", JSON.stringify($scope.reportRunJson)).success(function(data, status) {
- // console.log(data);
- // console.log(status);
- $scope.successSubmit=true;
- // modalService.showSuccess("Success","Chart Wizard details have been successfully submitted.");
- // saveProfile();
-
- })
-
-
- /* $http.post("/ecomp-sdk-app/testraptorchart", $scope.reportRunJson).then(function(response) {
- console.log(response.data);
- console.log(response.status);
-
- });*/
- }
-
- //$scope.samplearray = ["abc","test"];
-
-
- $scope.addRangeAxisRow = function (rangeaxisitem) {
-
-
-
-
- $scope.reportRunJson.rangeAxisList.push({
-
- /* "rangeColor":{
- "index":0,
- "value":rangeaxisitem.rangeColor.value,
- "title":rangeaxisitem.rangeColor.title
-
- },
- "rangeLineType":{
- "index":0,
- "value":rangeaxisitem.rangeLineType.value,
- "title":rangeaxisitem.rangeLineType.title
-
- },
- "rangeaxisLabel":{
- "index":0,
- "value":rangeaxisitem.rangeaxisLabel.value,
- "title":rangeaxisitem.rangeaxisLabel.value
-
- },
- "YAxis":"",
- "chartTitle":""*/
- });
- // alert($scope.reportRunJson.rangeAxisList.length);
- console.log($scope.reportRunJson.rangeAxisList);
-
- };
-
- $scope.removeRangeAxisRow = function (index) {
- $scope.reportRunJson.rangeAxisList.splice(index, 1);
- //console.log($scope.hardCodeReport.rangeAxisList)
- };
-
-
-
- /*$scope.saveProfile = function() {
- var uuu = "profile/saveProfile?profile_id=" + $scope.profileId;;
- var postData={profile: $scope.profile,
- selectedCountry:$scope.selectedCountry!=null?$scope.selectedCountry.value:"",
- selectedState:$scope.stateList.selected!=null?$scope.stateList.selected.value:"",
- selectedTimeZone:$scope.selectedTimeZone!=null?$scope.selectedTimeZone.value:""
- };
- $.ajax({
- type : 'POST',
- url : uuu,
- dataType: 'json',
- contentType: 'application/json',
- data: JSON.stringify(postData),
- success : function(data){
- modalService.showSuccess("Success","Update Successful.");
- },
- error : function(data){
- modalService.showFailure("Fail","Error while saving.");
- }
- });
- };*/
-
-
- /* $scope.actionClicked = function(){
-
- if ($scope.chartType=="Bar Chart") {
- $scope.tt1=true;
- } else if ($scope.chartType=="Time Series/Area Chart") {
- $scope.tt2=true;
- }else
- // $scope.tt3=true;
- };*/
-
- $scope.init = function () {
- // console.time("In init");
- if ($scope) {
- $scope.populateChrtWzdFields();
- // $scope.saveChartData();
- }
-
- };
-
-
- /*$scope.accgroups = [
- {
- title: "Accordion Item #1",
- content:"Unit test me bro! Proin eu quam malesuada, accumsan velit eu, tristique orci. Donec neque nisl, dignissim ut hendrerit sit amet, tempor id erat. Donec fermentum commodo semper. Sed lectus odio, egestas non volutpat eu, venenatis eu turpis. Donec eget fringilla lorem. Fusce sit amet semper velit. ",
- open: false
- },
- {
- title: "Accordion Item #2",
- content: "Lint me too! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eleifend aliquam eros quis fringilla. Integer eu justo turpis. Nam mauris augue, posuere interdum dignissim sed, tempor sit amet neque. In nec tortor id nibh sollicitudin aliquam sit amet ac augue",
- open: false
- },
- {
- title: "Accordion Item #3",
- content: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi eleifend aliquam eros quis fringilla. Integer eu justo turpis. Nam mauris augue, posuere interdum dignissim sed, tempor sit amet neque. In nec tortor id nibh sollicitudin aliquam sit amet ac augue",
- open: false
- }
- ];*/
-
- $scope.domainItems = [{title:"Domain Axis1", content:"Test1", open: false},{title:"Domain Axis2", content:"Test2", open: false}];
-
- $scope.chartTypes = [
- {index: 0, value: 'BarChart3D', title: 'Bar Chart'},
- {index: 1, value: 'TimeSeriesChart', title: 'Time Series/Area Chart'},
- {index: 2, value: 'PieChart', title: 'Pie Chart'},
- {index: 3, value: 'AnnotationChart', title: 'Annotation Chart'},
- {index: 4, value: 'FlexTimeChart', title: 'Flexible Time Chart'}
- ];
-
- /* $scope.domainAxes = [
- {index: 0, value: 'scenario_name', title: 'scenario_name'},
- {index: 1, value: 'total_traffic_in_PB', title: 'Total Traffic in PB'},
- {index: 2, value: 'Avg Utilization Day', title: 'Avg Utilization Day'}
-
- ];*/
-
- $scope.categories = [
- {index: 0, value: 'scenario_name', title: 'scenario_name'},
- {index: 1, value: 'total_traffic_in_PB', title: 'Total Traffic in PB'},
- {index: 2, value: 'Avg Utilization Day', title: 'Avg Utilization Day'}
-
- ];
-
- $scope.rangeColors = [
-
- {index: 0, value: "#1f77b4",title: "Dodger Blue"},
- {index: 1, value: "#ff7f0e",title: "Vivid orange"},
- {index: 2, value: "#2ca02c",title: "Forest Green"},
- {index: 3, value: "#8c864b",title: "Greenish Red"},
- {index: 4, value: "#9467bd",title: "Desaturated violet"},
- {index: 5, value: "#8c564b",title: "Dark moderate red"},
- {index: 6, value: "#e377c2",title: "Soft pink"},
- {index: 7, value: "#7f7f7f",title: "Dark gray"},
- {index: 8, value: "#bcbd22",title: "Strong yellow"},
- {index: 9, value: "#17becf",title: "Strong cyan"},
- {index: 10, value: "#dc143c",title: "Vivid red"},
- {index: 11, value: "#800080",title: "Dark magenta"},
- {index: 12, value: "#0000FF",title: "Blue"},
- {index: 13, value: "#008000",title: "Dark lime green"},
- {index: 14, value: "#D2691E",title: "Reddish Orange"},
- {index: 15, value: "#FF0000",title: "Red"},
- {index: 16, value: "#000000",title: "Black"},
- {index: 17, value: "#DB7093",title: "Pink"},
- {index: 18, value: "#FF00FF",title: "Pure Magenta"},
- {index: 19, value: "#7B68EE",title: "Soft blue"},
- {index: 20, value: "#1f77b6",title: "Strong blue"},
- {index: 21, value: "#9edae5",title: "Very soft cyan"},
- {index: 22, value: "#393b79",title: "Dark Blue"},
- {index: 23, value: "#5254a3",title: "Dark moderate Blue"},
- {index: 24, value: "#6b6ecf",title: "Slightly desaturated blue"},
- {index: 25, value: "#9c9ede",title: "Very soft blue"},
- {index: 26, value: "#637939",title: "Dark Green"},
- {index: 27, value: "#8ca252",title: "Dark moderate green"},
- {index: 28, value: "#b5cf6b",title: "Slightly desaturated green"},
- {index: 29, value: "#cedb9c",title: "Desaturated Green"},
-
- /* Old Colors */
- {index: 30, value: "#00FFFF",title: "Aqua"},
- {index: 31, value: "#000000",title: "Black"},
- {index: 32, value: "#0000FF",title: "Blue"},
- {index: 33, value: "#FF00FF",title: "Fuchsia"},
- {index: 34, value: "#808080",title: "Gray"},
- {index: 35, value: "#008000",title: "Green"},
- {index: 36, value: "#00FF00",title: "Lime"},
- {index: 37, value: "#800000",title: "Maroon"},
- {index: 38, value: "#000080",title: "Navy"},
- {index: 39, value: "#808000",title: "Olive"},
- {index: 40, value: "#FF9900",title: "Orange"},
- {index: 41, value: "#800080",title: "Purple"},
- {index: 42, value: "#FF0000",title: "Red"},
- {index: 43, value: "#C0C0C0",title: "Silver"},
- {index: 44, value: "#008080",title: "Teal"},
- {index: 45, value: "#FFFFFF",title: "White"},
- {index: 46, value: "#FFFF00",title: "Yellow"}
- ];
-
-
- $scope.lineTypes = [
- {index: 0, value: 'default', title: 'Default'},
- {index: 1, value: 'dotted_lines', title: 'Dotted Lines'},
- {index: 2, value: 'dashed_lines', title: 'Dashed Lines'}
-
- ];
-
-
- $scope.hardCodeReport= {
- "reportID":"3356",
- "reportName":"Test: Line Chart",
- "reportDescr":"",
- "reportTitle":"",
- "reportSubTitle":"",
- "formFieldList":[
-
- ],
- "chartColumnJSONList":[
- {
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"056"
- },
- {
- "index":1,
- "value":"ut1",
- "title":"util_perc",
- "$$hashKey":"057"
- }
- ],
- "formfield_comments":null,
- "totalRows":0,
- "chartSqlWhole":"SELECT traffic_date tr0, traffic_date tr0_1,util_perc ut1, 1 FROM portal.demo_util_chart ORDER BY 1",
- "chartAvailable":true,
- "chartType":{"index": "", "value": "Bar Chart", "title": ""},
- "width":"700",
- "height":"420",
- "animation":false,
- "rotateLabels":"90",
- "staggerLabels":false,
- "showTitle":"false",
- "domainAxis":{
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"11H"
- },
-
- "categoryAxis":{
- "index":1,
- "value":"ut1",
- "title":"util_perc",
- "$$hashKey":"11I"
- },
-
- "hasCategoryAxis":false,
- "rangeAxisList":[
- {
-
- "rangeColor":{
- "index":"",
- "value":"#bcbd22",
- "title":""
-
- },
-
- "rangeLineType":{
- "index":"",
- "value":"dotted_lines",
- "title":""
-
-
- },
-
- "rangeAxisLabel":{
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"056"
- },
- "YAxis":"10",
- "chartTitle":"test"
- },
- {
-
- "rangeColor":{
- "index":"",
- "value":"#2ca02c",
- "title":""
-
- },
-
- "rangeLineType":{
- "index":"",
- "value":"dashed_lines",
- "title":""
-
-
- },
-
- "rangeAxisLabel":{
- "index":0,
- "value":"tr0",
- "title":"traffic_date",
- "$$hashKey":"056"
- },
- "YAxis":"10",
- "chartTitle":"test"
- }
-
-
- ],
-
- "primaryAxisLabel":"testlabel",
- "secondaryAxisLabel":"testseclabel",
- "minRange":"10",
- "maxRange":"20",
- "topMargin":"6",
- "bottomMargin":"5",
- "leftMargin":"4",
- "rightMargin":"3"
- };
-
- var colorValue = $scope.hardCodeReport.rangeAxisList[0].rangeColor.value;
-
- //console.log($scope.hardCodeReport.chartType);
-
- // prefill range color
- /* for(var i = 0; i < $scope.rangeColors.length; i++) {
- var obj = $scope.rangeColors[i];
- //console.log(obj.id);
- if ($scope.rangeColors[i].value==colorValue) {
- $scope.hardCodeReport.rangeAxisList[0].rangeColor.index=$scope.rangeColors[i].index;
- $scope.hardCodeReport.rangeAxisList[0].rangeColor.title=$scope.rangeColors[i].title;
- }
-
- }*/
-
- //prefill chart type
-
-// console.log($scope.hardCodeReport.chartType);
-
-// console.log($scope.hardCodeReport.chartType);
-
- // console.log($scope.hardCodeReport.rangeAxisList);
- //prefill rangle line type
- /* for(var j = 0; j < $scope.hardCodeReport.rangeAxisList.length; j++) {
-
- var lineTypeValue = $scope.hardCodeReport.rangeAxisList[j].rangeLineType.value;
- for(var i = 0; i < $scope.lineTypes.length; i++) {
- var obj = $scope.lineTypes[i];
- //console.log(obj.id);
- if ($scope.lineTypes[i].value==lineTypeValue) {
- $scope.hardCodeReport.rangeAxisList[j].rangeLineType.index=$scope.lineTypes[i].index;
- $scope.hardCodeReport.rangeAxisList[j].rangeLineType.title=$scope.lineTypes[i].title;
- }
-
- }
- }*/
-// console.log($scope.hardCodeReport.rangeAxisList);
-
-
-
-
- // console.log($scope.hardCodeReport.rangeAxisList[0].rangeColor);
- /* $scope.hardCodeReport.rangeAxisList[0].rangeColor.index=4;
- $scope.hardCodeReport.rangeAxisList[0].rangeColor.title="Desaturated violet";*/
-
-
- //console.log($scope.hardCodeReport);
-
-
-
-
-
- /*$scope.reportRunJson =
- {
- "reportID":"3356",
- "reportName":"Test: Line Chart",
- "reportDescr":"",
- "reportTitle":"",
- "reportSubTitle":"",
- "formFieldList":[
-
- ],
- "chartColumnJSONList":[
- {
- "index":0,
- "value":"tr0",
- "title":"traffic_date"
- },
- {
- "index":1,
- "value":"ut1",
- "title":"util_perc"
- }
- ],
- "formfield_comments":null,
- "totalRows":0,
- "chartSqlWhole":"SELECT traffic_date tr0, traffic_date tr0_1,util_perc ut1, 1 FROM portal.demo_util_chart ORDER BY 1",
- "chartAvailable":true,
- "chartType":"TimeSeriesChart",
- "width":"700",
- "height":"420",
- "animation":false,
- "rotateLabels":"90",
- "staggerLabels":false,
- "showTitle":false,
- "domainAxis":"tr0",
- "categoryAxis":null,
- "hasCategoryAxis":false,
- "rangeAxisList":[
- {
- "YAxis":"",
- "chartTitle":""
- }
- ],
- "primaryAxisLabel":"",
- "secondaryAxisLabel":"",
- "minRange":"",
- "maxRange":"",
- "topMargin":"",
- "bottomMargin":"",
- "leftMargin":"",
- "rightMargin":"3"
- }; */
- $timeout(function() {
- $rootScope.isViewRendering = false;
- });
-
-
-});
-
-app.directive('onlyDigits', function () {
-
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function (scope, element, attrs, ngModel) {
- if (!ngModel) return;
- ngModel.$parsers.unshift(function (inputValue) {
- var digits = inputValue.split('').filter(function (s) { return (!isNaN(s) && s != ' '); }).join('');
- ngModel.$viewValue = digits;
- ngModel.$render();
- return digits;
- });
- }
- };
-});
-
-app.directive('onlyCharacters', function () {
-
- return {
- restrict: 'A',
- require: '?ngModel',
- link: function (scope, element, attrs, ngModel) {
- if (!ngModel) return;
- ngModel.$parsers.unshift(function (inputValue) {
- var digits = inputValue.split('').filter(function (s) { return (isNaN(s) && s != ' '); }).join('');
- ngModel.$viewValue = digits;
- ngModel.$render();
- return digits;
- });
- }
- };
-});
-
-
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.html b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.html
deleted file mode 100644
index 1041d8b1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<style>
-.grid {
- width: 100%;
- height: 400;
-}
-.no-rows {
- position: absolute;
- top: 0;
- bottom: 0;
- width: 100%;
- background: rgba(0, 0, 0, 0.4);
-}
-
-.no-rows .msg {
- opacity: 1;
- position: absolute;
- top: 20%;
- left: 20%;
- width: 60%;
- height: 50%;
- line-height: 200%;
- background-color: #eee;
- border-radius: 4px;
- border: 1px solid #555;
- text-align: center;
- font-size: 24px;
- display: table;
-}
-
-.no-rows .msg span {
- display: table-cell;
- vertical-align: middle;
-}
-.grid .ui-grid-header-cell {
- text-align:center;
-}
-</style>
-
-<div>
- <!-- <h1 class="heading2">{{reportData.reportName}} -->
- <h1 class="heading2">{{reportData.reportHeading}}
- <a ng-href="{{reportEditURL}}" ng-show="reportData.allowEdit" class="icon-edit" style="font-size:20px;"></a>
-
- &nbsp;&nbsp;&nbsp;<a ng-href="{{reportChartURL}}" ng-show="reportData.allowEdit && reportData.chartWizardAvailable" class="icon-bar-chart-vertical" style="font-size:20px;"></a>
- &nbsp;&nbsp;&nbsp;<span ng-show="reportData.allowEdit && showFormFields" ><input type="checkbox" ng-model="showFormFieldIds" ng-true-value="Hide_IDs" ng-false-value="Show_IDs" att-toggle-main></span>
-
- <!-- &nbsp;&nbsp;&nbsp;<a ng-href="{{reportChartURLNew}}" ng-show="reportData.allowEdit" class="icon-bar-chart-horizontal" style="font-size:20px;"></a> -->
- </h1>
-
- <h3 class="heading3">{{reportData.reportSubTitle}} </h3>
-
- <div ng-show="isInProgress" style="font-size:50px;color:#2ca02c">Loading...</div>
-
- <form ng-show="showFormFields" class="row section-row" style="margin: 10px">
- <form-builder ng-form-fields="reportData.formFieldList" ng-show-field-id="showFormFieldIds" ng-num-form-cols="reportData.numFormCols" ng-model="formFieldSelectedValues" ng-trigger-method="triggerOtherFormFields"></form-builder>
- <br><br>
- <button type="submit" ng-click="runReport()" att-button btn-type="primary" size="small" title='run'>Run</button>
- </form>
- <a type="submit" ng-show="showBackButton" style="margin: 10px" ng-href="report.htm#/report_run/{{parentReportUrlParams}}" att-button btn-type="primary" size="small" title='Back'>Back</a>
- <iframe id="chartiframe" ng-show="showChart" width="100%" height="450px" style="border: none" scrolling="no"></iframe>
- <div id="errorDiv"></div>
- <div ng-if="showGrid">
- <div id="grid1" ui-grid="gridOptions" ui-grid-pagination ui-grid-pinning ui-grid-resize-columns class="grid" style="height: {{gridHeight}}">
- <div class="no-rows" ng-show="!gridOptions.data.length">
- <div class="msg">
- <span>{{reportData.message}}</span>
- </div>
- </div>
- </div>
- </div>
- <!-- <a type="submit" ng-show="showBackButton" style="margin: 10px" ng-href="report.htm#/report_run/{{parentReportUrlParams}}" att-button btn-type="primary" size="small" title='Back'>Back</a> -->
-</div>
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.js
deleted file mode 100644
index 436dedd0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_run.js
+++ /dev/null
@@ -1,322 +0,0 @@
-app.controller("reportRunController", ['$scope','$rootScope','$routeParams','$http','dateFilter', '$window', '$timeout', 'rowSorter',
- function ($scope,$rootScope,$routeParams,$http,dateFilter,$window,$timeout,rowSorter) {
- $scope.dateformat = "MM/dd/yyyy";
- $scope.datetimeformat = "MM/dd/yyyy hh:mm a";
- $scope.showFormFields = false;
- $scope.showGrid = false;
- $scope.showChart = false;
- $scope.showBackButton = false;
- $scope.reportData = {};
- $scope.reportData.allowEdit = false;
- $scope.formFieldSelectedValues = {};
- $scope.showFormFieldIds = false;
-
- $scope.isInProgress = true;
-
- if($routeParams.reportUrlParams.indexOf("parent___params===")>-1) {
- $scope.showBackButton = true;
- $scope.parentReportUrlParams = $routeParams.reportUrlParams.substring($routeParams.reportUrlParams.indexOf("parent___params===")+18);
- $scope.currentReportUrlParams = $routeParams.reportUrlParams.substring(0,$routeParams.reportUrlParams.indexOf("parent___params==="));
- } else {
- $scope.currentReportUrlParams = $routeParams.reportUrlParams;
- }
- console.log($routeParams.reportUrlParams);
- var parseQueryString = function( queryString ) {
- var params = {}, queries, temp, i, l;
- // Split into key/value pairs
- queries = queryString.split("&");
- // Convert the array of strings into an object
- for ( i = 0, l = queries.length; i < l; i++ ) {
- temp = queries[i].split('=');
- //console.log(temp[0]);
- //console.log(temp[0] != "refresh");
- if(temp[0] && temp[0] != "refresh")
- params[temp[0]] = temp[1];
- }
- return params;
- };
-
- var convertQueryString = function(queryString) {
- var keys = ""; var str = "";
- keys = Object.keys(queryString);
- //console.log(keys);
- for ( i = 0, l = keys.length; i < l; i++ ) {
- str += keys[i]+"="+queryString[keys[i]] + "&";
-
- }
- return str;
- //queryString =
- }
-
-
-
-
- $scope.urlParams = parseQueryString($scope.currentReportUrlParams);
-
- $scope.reportChartURL = 'report#/report_chart_wizard/'+$scope.urlParams.c_master;
-
- $scope.reportEditURL = 'report_wizard.htm?action=report.edit&c_master='+$scope.urlParams.c_master;
-
-
- $http.get('raptor.htm?action=report.run.container&'+$scope.currentReportUrlParams).then(
- function(response){
- console.log(response);
- $scope.isInProgress = false;
- $scope.reportData = response.data;
- console.log('reportData report run container response',$scope.reportData);
- if ($scope.reportData.reportTitle) {
- $scope.reportData.reportHeading = $scope.reportData.reportTitle;
- if ($scope.reportData.reportSubTitle) {
- $scope.reportData.reportSubTitle = $scope.reportData.reportSubTitle;
- }
- }
- else
- $scope.reportData.reportHeading = $scope.reportData.reportName;
- if(!$scope.urlParams.hideChart && $scope.reportData.chartAvailable && $scope.reportData.totalRows>1){
- console.log('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams));
- $http.get('raptor.htm?action=chart.run&'+convertQueryString($scope.urlParams)).then(
- function(response){
- $scope.showChart = true;
- document.getElementById('chartiframe').contentWindow.document.write(response.data);
- document.getElementById('chartiframe').contentWindow.document.close();
- });
- }
-
- if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields){
- $scope.showFormFields = true;
- }
- });
- $scope.getFormFieldSelectedValuesAsURL = function(){
- var formFieldsUrl = '';
- $scope.reportData.formFieldList.forEach(function(formField) {
- if(formField.fieldType==='LIST_BOX') {
- if($scope.formFieldSelectedValues && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId].value != '') {
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId].value+'&';
- }
- } else if(formField.fieldType==='LIST_MULTI_SELECT') {
- if($scope.formFieldSelectedValues[formField.fieldId].length >0) {
- for (var i = 0; i < $scope.formFieldSelectedValues[formField.fieldId].length; i++) {
- if($scope.formFieldSelectedValues[formField.fieldId][i].defaultValue){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId][i].value+'&';
- }
- }
- }
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && formField.validationType === 'DATE'){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+dateFilter($scope.formFieldSelectedValues[formField.fieldId],$scope.dateformat)+'&';
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && formField.validationType === 'TIMESTAMP_MIN'){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+dateFilter($scope.formFieldSelectedValues[formField.fieldId],$scope.datetimeformat)+'&';
- } else if((formField.fieldType === 'text' || formField.fieldType === 'TEXT') && $scope.formFieldSelectedValues[formField.fieldId] && $scope.formFieldSelectedValues[formField.fieldId] != ''){
- formFieldsUrl = formFieldsUrl+formField.fieldId+'='+$scope.formFieldSelectedValues[formField.fieldId]+'&';
- }
- });
- return formFieldsUrl;
-
- }
-
- $scope.runReport = function(pagination){
- var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL();
- /*if ($scope.reportData.reportTitle)
- $scope.reportData.reportHeading = $scope.reportData.reportTitle;
- else
- $scope.reportData.reportHeading = $scope.reportData.reportName;*/
-
- console.log("pagination");
- if(!pagination) {
- //console.log("refreshed ...");
- $scope.gridOptions.pageNumber = 1;
- paginationOptions.pageNumber = 1;
- paginationOptions.pageSize = $scope.reportData.pageSize;
- //console.log($scope.gridOptions);
- $scope.gridOptions.paginationCurrentPage = 1;
- $scope.gridOptions.paginationPageSizes= [$scope.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.reportData.pageSize;
- if($scope.reportData.totalRows<14){
- $scope.gridHeight = ($scope.reportData.totalRows+7)*30+'px';
- } else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = $scope.reportData.totalRows;
- $scope.gridOptions.data= $scope.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= $scope.reportData.reportName;
-
- }
- $scope.currentReportUrlParams = 'c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'&display_content=Y&r_page='+(paginationOptions.pageNumber-1);
- console.log('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=report.run.container&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'refresh=Y&display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- function(response){
- $scope.reportData = response.data;
- if ($scope.reportData.reportTitle) {
- $scope.reportData.reportHeading = $scope.reportData.reportTitle;
- if ($scope.reportData.reportSubTitle) {
- $scope.reportData.reportSubTitle = $scope.reportData.reportSubTitle;
- }
- }
- else
- $scope.reportData.reportHeading = $scope.reportData.reportName;
-
- if($scope.reportData.errormessage) {
- //console.log($scope.reportData);
- var stacktraceFP = $scope.reportData.stacktrace.substring(0, $scope.reportData.stacktrace.indexOf(":")+1);
- document.getElementById('errorDiv').innerHTML = stacktraceFP + " " + $scope.reportData.errormessage;
- //console.log(document.getElementById('errorDiv').innerHtml);
- //console.log(stacktraceFP + " " + $scope.reportData.errormessage);
- }
- if(!pagination) {
- if(!$scope.urlParams.hideChart && $scope.reportData.chartAvailable && $scope.reportData.totalRows>1){
- console.log('raptor.htm?action=chart.run&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1));
- $http.get('raptor.htm?action=chart.run&c_master='+$scope.urlParams.c_master+'&'+formFieldsUrl+'display_content=Y&r_page='+(paginationOptions.pageNumber-1)).then(
- function(response) {
- console.log(response.data);
- $scope.showChart = true;
- console.log('response.data',response.data);
- document.getElementById('chartiframe').contentWindow.document.write(response.data);
- document.getElementById('chartiframe').contentWindow.document.close();
- });
- } else {
- $scope.showChart = false;
- }
- }
- if($scope.reportData.displayForm && $scope.reportData.formFieldList && $scope.reportData.formFieldList.length>0 && !$scope.urlParams.hideFormFields && !$scope.reportData.hideFormFieldsAfterRun){
- $scope.showFormFields = true;
- } else {
- $scope.showFormFields = false;
- }
- });
- };
-
- var paginationOptions = {
- pageNumber: 1,
- pageSize: 5,
- sort: null
- };
-
- $scope.gridOptions = {
- pageNumber: 1,
- sort : null,
- paginationPageSizes: [5],
- paginationPageSize: 5,
- useExternalPagination: true,
- columnDefs: [],
- data: [],
- enableGridMenu: true,
- enableSelectAll: true,
- gridMenuCustomItems : [
- { title : 'All Reports',
- action : function($event) {
- $window.open('report.htm','_self');
- }, order : 210 },
- { title : 'Edit Report',
- action : function($event) {
- $window.open($scope.reportEditURL,'_self');
- }, order : 211 },
- { title : 'Export All data as Excel 2007',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.excel2007.session','_self');
- }, order : 212 },
- { title : 'Export All data as Excel',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.excel.session','_self');
- }, order : 213 },
- { title : 'Export All data as CSV',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.csv.session','_self');
- }, order : 214 },
- { title : 'Export All data as PDF',
- action : function($event) {
- $window.open('raptor.htm?c_master='+$scope.reportData.reportID+'&r_action=report.download.pdf.session','_self');
- }, order : 215 } ],
- exporterMenuPdf: false,
- exporterMenuCsv: false,
- exporterCsvFilename: 'myFile.csv',
- exporterPdfDefaultStyle: {fontSize: 9},
- exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
- exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
- exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
- exporterPdfFooter: function ( currentPage, pageCount ) {
- return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
- },
- exporterPdfCustomFormatter: function ( docDefinition ) {
- docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
- docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
- return docDefinition;
- },
- exporterPdfOrientation: 'portrait',
- exporterPdfPageSize: 'LETTER',
- exporterPdfMaxGridWidth: 500,
- exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
- onRegisterApi: function(gridApi) {
- $scope.gridApi = gridApi;
- gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
- paginationOptions.pageNumber = newPage;
- paginationOptions.pageSize = pageSize;
- $scope.runReport(true);
- });
- }
- };
-
- $scope.uiGridRefresh = function(){
- var columnDefsArray = [];
- var columnFreezeEndColumn = $scope.reportData.colIdxTobeFreezed;
- var doColumnNeedToFreeze = false;
- if(columnFreezeEndColumn && columnFreezeEndColumn.length>0) {
- doColumnNeedToFreeze = true;
- }
- $scope.reportData.reportDataColumns.forEach(function(entry) {
- var tempColumnDef = { displayName: entry.columnTitle, field: entry.colId, enableSorting: entry.sortable,
- sortingAlgorithm: function(a, b) {
- return rowSorter.sortAlpha(a.displayValue, b.displayValue);
- },
- cellTemplate: '<div class="ui-grid-cell-contents" style="text-align:{{COL_FIELD.alignment}};" title="TOOLTIP"> '+
- ' <div ng-if="!COL_FIELD.drillDownURL || COL_FIELD.drillDownURL==\'\'">{{COL_FIELD.displayValue}}</div>' +
- ' <a ng-if="COL_FIELD.drillDownURL && COL_FIELD.drillDownURL!=\'\'" ng-href="{{COL_FIELD.drillDownURL}}&parent___params==={{grid.appScope.currentReportUrlParams}}" >{{COL_FIELD.displayValue}}</a>' +
- '</div>'};
- if(entry.columnWidth && entry.columnWidth!='null' && entry.columnWidth!='pxpx' && entry.columnWidth!='nullpx' && entry.columnWidth!='nullpxpx'){
- tempColumnDef['minWidth'] = entry.columnWidth.substring(0, entry.columnWidth.length - 2);
- } else {
- tempColumnDef['minWidth'] = '100';
- }
- if(doColumnNeedToFreeze) {
- tempColumnDef['pinnedLeft']= true;
- if(columnFreezeEndColumn === entry.colId){
- doColumnNeedToFreeze = false;
- }
- }
- columnDefsArray.push(tempColumnDef);
- });
-
- $scope.gridOptions.paginationPageSizes= [$scope.reportData.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.reportData.pageSize;
- if($scope.reportData.totalRows<14){
- $scope.gridHeight = ($scope.reportData.totalRows+5)*30+'px';
- }else{
- $scope.gridHeight = '400px';
- }
- $scope.gridOptions.totalItems = $scope.reportData.totalRows;
- $scope.gridOptions.columnDefs= columnDefsArray;
- $scope.gridOptions.data= $scope.reportData.reportDataRows;
- $scope.gridOptions.exporterPdfHeader.text= $scope.reportData.reportName;
- };
-
- $scope.$watch("reportData",function(newValue,oldValue) {
- if(!$scope.urlParams.hideGrid){
- if($scope.reportData){
- if($scope.reportData.displayData && $scope.reportData.reportDataColumns){
- $scope.showGrid = true;
- $scope.uiGridRefresh();
- }
- }
- }
- });
-
- $scope.triggerOtherFormFields = function(){
- console.log("report_run");
- var formFieldsUrl = $scope.getFormFieldSelectedValuesAsURL();
- $http.get('raptor.htm?action=report.formfields.run.container&c_master='+$scope.reportData.reportID+'&'+formFieldsUrl).then(
- function(response){
- $scope.reportData = response.data;
- });
- };
- $timeout(function() {
- $rootScope.isViewRendering = false;
- });
-}]);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.html b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.html
deleted file mode 100644
index 37b388ff..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<style>
-.grid {
- width: 100%;
- height: 400px;
-}
-.grid .ui-grid-header-cell {
- text-align:center;
-}
-.icon-add-widget:before {
- content: "\e717";
-}
-</style>
-<h1 class="heading1">Report search</h1>
-<br>
-<div >
-<label class="pull-left" style="margin-top: 10px;margin-right: 5px;">Report Id:</label>
-<div class="form-field form-field__glued pull-left size-onefifth" style="width: 13% !important;">
- <div att-search="operatorsRepId" ng-model="operatorRepId" placeholder="Select"></div>
-</div>
-<div class="form-field form-field__glued pull-left size-onefifth" style="width:13% !important;">
- <input ng-model="reportId" type="text" placeholder="Search value?" style="border-radius:0px 5px 5px 0px">
-</div>
-
-<label class="pull-left" style="margin-top: 10px;margin-left: 40px;margin-right: 5px;">Report Name:</label>
-<div class="form-field form-field__glued pull-left size-onefifth" style="width: 13% !important;">
- <div att-search="operatorsRepName" ng-model="operatorRepName" placeholder="Select"></div>
-</div>
-<div class="form-field form-field__glued pull-left size-onefifth" style="width:13% !important;">
- <input ng-model="reportName" type="text" placeholder="Search value?" style="border-radius:0px 5px 5px 0px">
-</div>
-<button type="submit" ng-click="runReport()" att-button btn-type="primary" style="margin-top: 10px;margin-left: 40px;" size="small" title='Submit'>Submit</button>
-
-</div>
-<br>
-<div id="grid1" ui-grid="gridOptions" ui-grid-pagination ui-grid-resize-columns class="grid"></div>
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.js
deleted file mode 100644
index afea176c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/ebz/report_search.js
+++ /dev/null
@@ -1,136 +0,0 @@
-app.controller("reportSearchController", ['$scope','$rootScope','$http','$timeout',function ($scope,$rootScope,$http,$timeout) {
-
- $http.get('raptor.htm?action=report.search.execute&r_page=0').then(
- function(result){$scope.searchdData = result.data;
- });
-
- $scope.runReport = function(){
- var searchParams = '';
- if($scope.reportId && $scope.reportId!=''){
- searchParams = '&rep_id='+$scope.reportId+'&rep_id_options='+$scope.operatorRepId.index;
- }
- if($scope.reportName && $scope.reportName!=''){
- searchParams = searchParams+'&rep_name='+$scope.reportName+'&rep_name_options='+$scope.operatorRepName.index;
- }
-
- console.log('raptor.htm?action=report.search.execute&r_page='+(paginationOptions.pageNumber-1)+searchParams);
- $http.get('raptor.htm?action=report.search.execute&r_page='+(paginationOptions.pageNumber-1)+searchParams).then(
- function(result){$scope.searchdData = result.data;
- });
- //quantum/raptor.htm?action=report.search.execute&rep_id=1000&rep_id_options=2&rep_name=cross&rep_name_options=2
- };
-
-
- var paginationOptions = {
- pageNumber: 1,
- pageSize: 5,
- sort: null
- };
-
- $scope.gridOptions = {
- paginationPageSizes: [5],
- paginationPageSize: 5,
- useExternalPagination: true,
- columnDefs: [],
- data: [],
- enableGridMenu: true,
- enableSelectAll: true,
- exporterMenuPdf: false,
- exporterMenuCsv: false,
- exporterCsvFilename: 'myFile.csv',
- exporterPdfDefaultStyle: {fontSize: 9},
- exporterPdfTableStyle: {margin: [30, 30, 30, 30]},
- exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'},
- exporterPdfHeader: { text: "My Header", style: 'headerStyle' },
- exporterPdfFooter: function ( currentPage, pageCount ) {
- return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' };
- },
- exporterPdfCustomFormatter: function ( docDefinition ) {
- docDefinition.styles.headerStyle = { fontSize: 22, bold: true };
- docDefinition.styles.footerStyle = { fontSize: 10, bold: true };
- return docDefinition;
- },
- exporterPdfOrientation: 'portrait',
- exporterPdfPageSize: 'LETTER',
- exporterPdfMaxGridWidth: 500,
- exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")),
- onRegisterApi: function(gridApi) {
- $scope.gridApi = gridApi;
- gridApi.pagination.on.paginationChanged($scope, function (newPage, pageSize) {
- paginationOptions.pageNumber = newPage;
- paginationOptions.pageSize = pageSize;
- $scope.runReport();
- });
- }
- };
-
-
- var getPage = function() {
- $scope.gridOptions.columnDefs = [];
- $scope.searchdData.columns[0].forEach(function(entry) {
- if(entry.columnTitle=='Run'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId+'==drillDownLink', enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="#/report_run/{{COL_FIELD.substr(39)}}" class="icon-play" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Edit'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId+'==drillDownLink', enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="{{COL_FIELD}}" class="icon-edit" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Delete'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId+'==drillDownLink', enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a href="" ng-click="grid.appScope.deleteReport(COL_FIELD,row)" class="icon-trash" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Copy'){
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId+'==drillDownLink', enableSorting: false,
- cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="{{COL_FIELD}}" class="icon-plans" style="font-size:20px;"></a></div>'
- });
- } else if(entry.columnTitle=='Schedule'){
- //$scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId+'==drillDownLink',
- // cellTemplate: '<div class="ui-grid-cell-contents"><a ng-href="{{COL_FIELD}}" class="full-linear-icon-calendar" style="font-size:20px;font-weight: bold;"></a></div>'
- //});
- } else if(entry.columnTitle=='No'){
- } else {
- $scope.gridOptions.columnDefs.push({ displayName: entry.columnTitle, field: entry.columnId+'==displayValue'});
- }
- });
- $scope.gridOptions.data = $scope.searchdData.rows[0];
- $scope.gridOptions.paginationPageSizes= [$scope.searchdData.metaReport.pageSize];
- $scope.gridOptions.paginationPageSize= $scope.searchdData.metaReport.pageSize;
- $scope.gridOptions.totalItems = $scope.searchdData.metaReport.totalSize;
- };
-
- $scope.$watch("searchdData",function(newValue,oldValue) {
- if($scope.searchdData){
- getPage();
- }
- });
-
- $scope.operatorsRepId = [{index: 0, value: 'Equal To', title: 'Equal To', alias:'Equal To'},
- {index: 1, value: 'Less Than', title: 'Less Than', alias:'Less Than'},
- {index: 2, value: 'Greater Than', title: 'Greater Than', alias:'Greater Than'}];
- $scope.operatorsRepName = [{index: 0, value: 'Starts With', title: 'Starts With', alias:'Starts With'},
- {index:1, value: 'Ends With', title: 'Ends With', alias:'Ends With'},
- {index: 2, value: 'Contains', title: 'Contains', alias:'Contains'}];
-
- $scope.deleteReport = function(reportDeleteUrl,row) {
- if (confirm("Please confirm: Are you sure you want to delete report #" + reportDeleteUrl.substr(41) + "?")) {
- $http.get(reportDeleteUrl).then(
- function(result){
- if(result.data=='deleted:true'){
- var index = $scope.gridOptions.data.indexOf(row.entity);
- $scope.gridOptions.data.splice(index, 1);
- alert("Report deleted.");
- } else {
- alert("Report not deleted.");
- }
- }
- );
- }
- };
-
- $timeout(function() {
- $rootScope.isViewRendering = false;
- });
-
-
-}]);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/cingular_button.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/cingular_button.js
deleted file mode 100644
index 9a053183..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/cingular_button.js
+++ /dev/null
@@ -1,217 +0,0 @@
-function CingularButton() {
-}
-
-CingularButton.prototype = new GControl();
-
-CingularButton.globals = {
- listOptionContainer: null,
- listOptionVisible: false
-};
-
-CingularButton.prototype.initialize = function(map) {
- var globals = CingularButton.globals;
- var cbContainer;
- var listOptionContainer;
- var button;
- var buttonText;
-
- cbContainer = document.createElement("div");
- cbContainer.style.zIndex = "150";
-
- listOptionContainer = document.createElement("div");
- this.setMenuContainerStyle(listOptionContainer);
- this.initializeMonthListMenu(listOptionContainer);
-
- //create button
- var gmwButtonContainer = document.createElement("div");
-
- button = document.createElement("div");
- button.appendChild(document.createTextNode("Previous"));
- gmwButtonContainer.appendChild(button);
- NovaButton.prototype.setButtonStyle(button, true);
- GEvent.addDomListener(button, "click", previousMonthClickEvent);
-
- button = document.createElement("div");
- button.appendChild(document.createTextNode("2008/01"));
- button.id = "currentMonthDiv";
- gmwButtonContainer.appendChild(button);
- NovaButton.prototype.setButtonStyle(button, true);
- GEvent.addDomListener(button, "click", currentMonthClickEvent);
-
- button = document.createElement("div");
- button.appendChild(document.createTextNode("Next"));
- gmwButtonContainer.appendChild(button);
- NovaButton.prototype.setButtonStyle(button, true);
- GEvent.addDomListener(button, "click", nextMonthClickEvent);
-
- cbContainer.appendChild(gmwButtonContainer);
- cbContainer.appendChild(listOptionContainer);
-
- map.getContainer().appendChild(cbContainer);
-
- //set global variables
- globals.listOptionContainer = listOptionContainer;
- return cbContainer;
-}
-
-CingularButton.prototype.getDefaultPosition = function() {
- return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(5, 30));
-}
-
-CingularButton.prototype.initializeMonthListMenu = function(container) {
- var menuUL = container.appendChild(document.createElement("ul"));
- this.setMenuStyle(menuUL);
-
- var minMonth = 1;
- var minYear = 2008;
-
- var maxMonth = 12;
- var maxYear = 2010;
-
- for (currentYear = minYear; currentYear <= maxYear; currentYear++) {
- for (currentMonth = minMonth; currentMonth <= maxMonth; currentMonth++) {
- var menuItem = document.createElement("li");
- this.setMenuItemStyle(menuItem);
-
- if (currentMonth < 10) {
- menuItem.appendChild(document.createTextNode(currentYear + "/0" + currentMonth));
- menuItem.id = currentYear + "/0" + currentMonth;
- }
- else {
- menuItem.appendChild(document.createTextNode(currentYear + "/" + currentMonth));
- menuItem.id = currentYear + "/" + currentMonth;
- }
-
- GEvent.addDomListener(menuItem, "click", menuItemOnClick);
- GEvent.addDomListener(menuItem, "mouseover", menuItemOnMouseOver);
- GEvent.addDomListener(menuItem, "mouseout", menuItemOnMouseOut);
- menuUL.appendChild(menuItem);
- }
- }
-}
-
-CingularButton.prototype.showListOption = function(posX, posY) {
- var global = CingularButton.globals;
-
- //position the menu at the given location
- if(typeof posX == "number") {
- global.listOptionContainer.style.left = posX + "px";
- }
-
- if(typeof posY == "number") {
- global.listOptionContainer.style.top = posY + "px";
- }
-
- //display the menu
- global.listOptionContainer.style.display = "block";
-}
-
-CingularButton.prototype.setButtonStyle = function(button) {
- button.style.color = "black";
- button.style.backgroundColor = "white";
- button.style.fontFamily = "Verdana";
- button.style.fontSize = "12px";
- button.style.fontWeight= "normal";
- button.style.border = "1px solid gray";
- button.style.padding = "0px";
- button.style.marginBottom = "0px";
- button.style.textAlign = "center";
- button.style.width = "7em";
- button.style.height = "15px";
- button.style.cursor = "pointer";
-
- if(button.addEventListener) {
- button.style.cssFloat = "left";
- }
- else {
- button.style.styleFloat = "left";
- }
-}
-
-CingularButton.prototype.setMenuContainerStyle = function(menuContainer) {
- menuContainer.style.position = "absolute";
- menuContainer.style.overflow = "auto";
- menuContainer.style.height = "200px";
- menuContainer.style.display = "none";
- menuContainer.style.background = "#FFFFF0";
-}
-
-CingularButton.prototype.setMenuStyle = function(menu) {
- menu.style.margin = "2";
- menu.style.width = "100px";
- menu.style.padding = "0px 30px 0px 0px";
- menu.style.listStyleType= "none";
- menu.style.background = "#FFFFF0";
-}
-
-CingularButton.prototype.setMenuItemStyle = function(menuItem) {
- menuItem.style.padding = "4px 3px 4px 33px";
- menuItem.style.fontFamily = "Vardana, Arial, Helvetica, sans-serif";
- menuItem.style.fontSize = "10pt";
- menuItem.style.color = "#333";
- menuItem.style.cursor = "default";
- menuItem.style.background = "no-repeat left center";
-}
-
-var previousMonthClickEvent = function() {
- updateImage(-1);
- NovaButton.prototype.initializeLayerDiv(NovaButton.globals.layerOptionContainer);
-}
-
-var nextMonthClickEvent = function() {
- updateImage(1);
- NovaButton.prototype.initializeLayerDiv(NovaButton.globals.layerOptionContainer);
-}
-
-function currentMonthClickEvent(e) {
- if (CingularButton.globals.listOptionVisible) {
- CingularButton.globals.listOptionVisible = false;
- CingularButton.globals.listOptionContainer.style.display = "none";
- return;
- }
-
- if (NovaButton.globals.layerOptionContainer.style.display != "none"){
- NovaButton.prototype.showLayerClickEvent();
- }
- if (NovaButton.globals.searchOptionContainer.style.display != "none"){
- NovaButton.prototype.searchClickEvent();
- }
-
- if (!e) {
- e = window.event;
- }
-
- e.cancelBubble = true;
-
- if (e.stopPropagation) {
- e.stopPropagation();
- }
-
- var posX = this.offsetLeft;
- var posY = this.offsetTop;
-
- CingularButton.prototype.showListOption(posX, posY + this.offsetHeight);
- CingularButton.globals.listOptionVisible = true;
-}
-
-function menuItemOnClick() {
- updateImage(this.id);
- CingularButton.globals.listOptionVisible = false;
- CingularButton.globals.listOptionContainer.style.display = "none";
- NovaButton.prototype.initializeLayerDiv(NovaButton.globals.layerOptionContainer);
-}
-
-
-function menuItemOnMouseOver() {
- this.style.padding = "3px 2px 3px 32px";
- this.style.color = "#000";
- this.style.border = "1px solid #06C";
- this.style.backgroundColor = "#fec";
-}
-
-function menuItemOnMouseOut() {
- this.style.padding = "4px 3px 4px 33px";
- this.style.color = "#333";
- this.style.border = "none";
- this.style.backgroundColor = "";
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/drupal.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/drupal.js
deleted file mode 100644
index cb605f9b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/drupal.js
+++ /dev/null
@@ -1,1018 +0,0 @@
-// $Id: jquery.js,v 1.12.2.3 2008/06/25 09:38:39 goba Exp $
-
-/*
- * jQuery 1.2.6 - New Wave Javascript
- *
- * Copyright (c) 2008 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * Date: 2008-05-24 14:22:17 -0400 (Sat, 24 May 2008)
- * Rev: 5685
- */
-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(H(){J w=1b.4M,3m$=1b.$;J D=1b.4M=1b.$=H(a,b){I 2B D.17.5j(a,b)};J u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/,62=/^.[^:#\\[\\.]*$/,12;D.17=D.44={5j:H(d,b){d=d||S;G(d.16){7[0]=d;7.K=1;I 7}G(1j d=="23"){J c=u.2D(d);G(c&&(c[1]||!b)){G(c[1])d=D.4h([c[1]],b);N{J a=S.61(c[3]);G(a){G(a.2v!=c[3])I D().2q(d);I D(a)}d=[]}}N I D(b).2q(d)}N G(D.1D(d))I D(S)[D.17.27?"27":"43"](d);I 7.6Y(D.2d(d))},5w:"1.2.6",8G:H(){I 7.K},K:0,3p:H(a){I a==12?D.2d(7):7[a]},2I:H(b){J a=D(b);a.5n=7;I a},6Y:H(a){7.K=0;2p.44.1p.1w(7,a);I 7},P:H(a,b){I D.P(7,a,b)},5i:H(b){J a=-1;I D.2L(b&&b.5w?b[0]:b,7)},1K:H(c,a,b){J d=c;G(c.1q==56)G(a===12)I 7[0]&&D[b||"1K"](7[0],c);N{d={};d[c]=a}I 7.P(H(i){R(c 1n d)D.1K(b?7.V:7,c,D.1i(7,d[c],b,i,c))})},1g:H(b,a){G((b==\'2h\'||b==\'1Z\')&&3d(a)<0)a=12;I 7.1K(b,a,"2a")},1r:H(b){G(1j b!="49"&&b!=U)I 7.4E().3v((7[0]&&7[0].2z||S).5F(b));J a="";D.P(b||7,H(){D.P(7.3t,H(){G(7.16!=8)a+=7.16!=1?7.76:D.17.1r([7])})});I a},5z:H(b){G(7[0])D(b,7[0].2z).5y().39(7[0]).2l(H(){J a=7;1B(a.1x)a=a.1x;I a}).3v(7);I 7},8Y:H(a){I 7.P(H(){D(7).6Q().5z(a)})},8R:H(a){I 7.P(H(){D(7).5z(a)})},3v:H(){I 7.3W(19,M,Q,H(a){G(7.16==1)7.3U(a)})},6F:H(){I 7.3W(19,M,M,H(a){G(7.16==1)7.39(a,7.1x)})},6E:H(){I 7.3W(19,Q,Q,H(a){7.1d.39(a,7)})},5q:H(){I 7.3W(19,Q,M,H(a){7.1d.39(a,7.2H)})},3l:H(){I 7.5n||D([])},2q:H(b){J c=D.2l(7,H(a){I D.2q(b,a)});I 7.2I(/[^+>] [^+>]/.11(b)||b.1h("..")>-1?D.4r(c):c)},5y:H(e){J f=7.2l(H(){G(D.14.1f&&!D.4n(7)){J a=7.6o(M),5h=S.3h("1v");5h.3U(a);I D.4h([5h.4H])[0]}N I 7.6o(M)});J d=f.2q("*").5c().P(H(){G(7[E]!=12)7[E]=U});G(e===M)7.2q("*").5c().P(H(i){G(7.16==3)I;J c=D.L(7,"3w");R(J a 1n c)R(J b 1n c[a])D.W.1e(d[i],a,c[a][b],c[a][b].L)});I f},1E:H(b){I 7.2I(D.1D(b)&&D.3C(7,H(a,i){I b.1k(a,i)})||D.3g(b,7))},4Y:H(b){G(b.1q==56)G(62.11(b))I 7.2I(D.3g(b,7,M));N b=D.3g(b,7);J a=b.K&&b[b.K-1]!==12&&!b.16;I 7.1E(H(){I a?D.2L(7,b)<0:7!=b})},1e:H(a){I 7.2I(D.4r(D.2R(7.3p(),1j a==\'23\'?D(a):D.2d(a))))},3F:H(a){I!!a&&D.3g(a,7).K>0},7T:H(a){I 7.3F("."+a)},6e:H(b){G(b==12){G(7.K){J c=7[0];G(D.Y(c,"2A")){J e=c.64,63=[],15=c.15,2V=c.O=="2A-2V";G(e<0)I U;R(J i=2V?e:0,2f=2V?e+1:15.K;i<2f;i++){J d=15[i];G(d.2W){b=D.14.1f&&!d.at.2x.an?d.1r:d.2x;G(2V)I b;63.1p(b)}}I 63}N I(7[0].2x||"").1o(/\\r/g,"")}I 12}G(b.1q==4L)b+=\'\';I 7.P(H(){G(7.16!=1)I;G(b.1q==2p&&/5O|5L/.11(7.O))7.4J=(D.2L(7.2x,b)>=0||D.2L(7.34,b)>=0);N G(D.Y(7,"2A")){J a=D.2d(b);D("9R",7).P(H(){7.2W=(D.2L(7.2x,a)>=0||D.2L(7.1r,a)>=0)});G(!a.K)7.64=-1}N 7.2x=b})},2K:H(a){I a==12?(7[0]?7[0].4H:U):7.4E().3v(a)},7b:H(a){I 7.5q(a).21()},79:H(i){I 7.3s(i,i+1)},3s:H(){I 7.2I(2p.44.3s.1w(7,19))},2l:H(b){I 7.2I(D.2l(7,H(a,i){I b.1k(a,i,a)}))},5c:H(){I 7.1e(7.5n)},L:H(d,b){J a=d.1R(".");a[1]=a[1]?"."+a[1]:"";G(b===12){J c=7.5C("9z"+a[1]+"!",[a[0]]);G(c===12&&7.K)c=D.L(7[0],d);I c===12&&a[1]?7.L(a[0]):c}N I 7.1P("9u"+a[1]+"!",[a[0],b]).P(H(){D.L(7,d,b)})},3b:H(a){I 7.P(H(){D.3b(7,a)})},3W:H(g,f,h,d){J e=7.K>1,3x;I 7.P(H(){G(!3x){3x=D.4h(g,7.2z);G(h)3x.9o()}J b=7;G(f&&D.Y(7,"1T")&&D.Y(3x[0],"4F"))b=7.3H("22")[0]||7.3U(7.2z.3h("22"));J c=D([]);D.P(3x,H(){J a=e?D(7).5y(M)[0]:7;G(D.Y(a,"1m"))c=c.1e(a);N{G(a.16==1)c=c.1e(D("1m",a).21());d.1k(b,a)}});c.P(6T)})}};D.17.5j.44=D.17;H 6T(i,a){G(a.4d)D.3Y({1a:a.4d,31:Q,1O:"1m"});N D.5u(a.1r||a.6O||a.4H||"");G(a.1d)a.1d.37(a)}H 1z(){I+2B 8J}D.1l=D.17.1l=H(){J b=19[0]||{},i=1,K=19.K,4x=Q,15;G(b.1q==8I){4x=b;b=19[1]||{};i=2}G(1j b!="49"&&1j b!="H")b={};G(K==i){b=7;--i}R(;i<K;i++)G((15=19[i])!=U)R(J c 1n 15){J a=b[c],2w=15[c];G(b===2w)6M;G(4x&&2w&&1j 2w=="49"&&!2w.16)b[c]=D.1l(4x,a||(2w.K!=U?[]:{}),2w);N G(2w!==12)b[c]=2w}I b};J E="4M"+1z(),6K=0,5r={},6G=/z-?5i|8B-?8A|1y|6B|8v-?1Z/i,3P=S.3P||{};D.1l({8u:H(a){1b.$=3m$;G(a)1b.4M=w;I D},1D:H(a){I!!a&&1j a!="23"&&!a.Y&&a.1q!=2p&&/^[\\s[]?H/.11(a+"")},4n:H(a){I a.1C&&!a.1c||a.2j&&a.2z&&!a.2z.1c},5u:H(a){a=D.3k(a);G(a){J b=S.3H("6w")[0]||S.1C,1m=S.3h("1m");1m.O="1r/4t";G(D.14.1f)1m.1r=a;N 1m.3U(S.5F(a));b.39(1m,b.1x);b.37(1m)}},Y:H(b,a){I b.Y&&b.Y.2r()==a.2r()},1Y:{},L:H(c,d,b){c=c==1b?5r:c;J a=c[E];G(!a)a=c[E]=++6K;G(d&&!D.1Y[a])D.1Y[a]={};G(b!==12)D.1Y[a][d]=b;I d?D.1Y[a][d]:a},3b:H(c,b){c=c==1b?5r:c;J a=c[E];G(b){G(D.1Y[a]){2U D.1Y[a][b];b="";R(b 1n D.1Y[a])1X;G(!b)D.3b(c)}}N{1U{2U c[E]}1V(e){G(c.5l)c.5l(E)}2U D.1Y[a]}},P:H(d,a,c){J e,i=0,K=d.K;G(c){G(K==12){R(e 1n d)G(a.1w(d[e],c)===Q)1X}N R(;i<K;)G(a.1w(d[i++],c)===Q)1X}N{G(K==12){R(e 1n d)G(a.1k(d[e],e,d[e])===Q)1X}N R(J b=d[0];i<K&&a.1k(b,i,b)!==Q;b=d[++i]){}}I d},1i:H(b,a,c,i,d){G(D.1D(a))a=a.1k(b,i);I a&&a.1q==4L&&c=="2a"&&!6G.11(d)?a+"2X":a},1F:{1e:H(c,b){D.P((b||"").1R(/\\s+/),H(i,a){G(c.16==1&&!D.1F.3T(c.1F,a))c.1F+=(c.1F?" ":"")+a})},21:H(c,b){G(c.16==1)c.1F=b!=12?D.3C(c.1F.1R(/\\s+/),H(a){I!D.1F.3T(b,a)}).6s(" "):""},3T:H(b,a){I D.2L(a,(b.1F||b).6r().1R(/\\s+/))>-1}},6q:H(b,c,a){J e={};R(J d 1n c){e[d]=b.V[d];b.V[d]=c[d]}a.1k(b);R(J d 1n c)b.V[d]=e[d]},1g:H(d,e,c){G(e=="2h"||e=="1Z"){J b,3X={30:"5x",5g:"1G",18:"3I"},35=e=="2h"?["5e","6k"]:["5G","6i"];H 5b(){b=e=="2h"?d.8f:d.8c;J a=0,2C=0;D.P(35,H(){a+=3d(D.2a(d,"57"+7,M))||0;2C+=3d(D.2a(d,"2C"+7+"4b",M))||0});b-=29.83(a+2C)}G(D(d).3F(":4j"))5b();N D.6q(d,3X,5b);I 29.2f(0,b)}I D.2a(d,e,c)},2a:H(f,l,k){J e,V=f.V;H 3E(b){G(!D.14.2k)I Q;J a=3P.54(b,U);I!a||a.52("3E")==""}G(l=="1y"&&D.14.1f){e=D.1K(V,"1y");I e==""?"1":e}G(D.14.2G&&l=="18"){J d=V.50;V.50="0 7Y 7W";V.50=d}G(l.1I(/4i/i))l=y;G(!k&&V&&V[l])e=V[l];N G(3P.54){G(l.1I(/4i/i))l="4i";l=l.1o(/([A-Z])/g,"-$1").3y();J c=3P.54(f,U);G(c&&!3E(f))e=c.52(l);N{J g=[],2E=[],a=f,i=0;R(;a&&3E(a);a=a.1d)2E.6h(a);R(;i<2E.K;i++)G(3E(2E[i])){g[i]=2E[i].V.18;2E[i].V.18="3I"}e=l=="18"&&g[2E.K-1]!=U?"2F":(c&&c.52(l))||"";R(i=0;i<g.K;i++)G(g[i]!=U)2E[i].V.18=g[i]}G(l=="1y"&&e=="")e="1"}N G(f.4g){J h=l.1o(/\\-(\\w)/g,H(a,b){I b.2r()});e=f.4g[l]||f.4g[h];G(!/^\\d+(2X)?$/i.11(e)&&/^\\d/.11(e)){J j=V.1A,66=f.65.1A;f.65.1A=f.4g.1A;V.1A=e||0;e=V.aM+"2X";V.1A=j;f.65.1A=66}}I e},4h:H(l,h){J k=[];h=h||S;G(1j h.3h==\'12\')h=h.2z||h[0]&&h[0].2z||S;D.P(l,H(i,d){G(!d)I;G(d.1q==4L)d+=\'\';G(1j d=="23"){d=d.1o(/(<(\\w+)[^>]*?)\\/>/g,H(b,a,c){I c.1I(/^(aK|4f|7E|aG|4T|7A|aB|3n|az|ay|av)$/i)?b:a+"></"+c+">"});J f=D.3k(d).3y(),1v=h.3h("1v");J e=!f.1h("<au")&&[1,"<2A 7w=\'7w\'>","</2A>"]||!f.1h("<ar")&&[1,"<7v>","</7v>"]||f.1I(/^<(aq|22|am|ak|ai)/)&&[1,"<1T>","</1T>"]||!f.1h("<4F")&&[2,"<1T><22>","</22></1T>"]||(!f.1h("<af")||!f.1h("<ad"))&&[3,"<1T><22><4F>","</4F></22></1T>"]||!f.1h("<7E")&&[2,"<1T><22></22><7q>","</7q></1T>"]||D.14.1f&&[1,"1v<1v>","</1v>"]||[0,"",""];1v.4H=e[1]+d+e[2];1B(e[0]--)1v=1v.5T;G(D.14.1f){J g=!f.1h("<1T")&&f.1h("<22")<0?1v.1x&&1v.1x.3t:e[1]=="<1T>"&&f.1h("<22")<0?1v.3t:[];R(J j=g.K-1;j>=0;--j)G(D.Y(g[j],"22")&&!g[j].3t.K)g[j].1d.37(g[j]);G(/^\\s/.11(d))1v.39(h.5F(d.1I(/^\\s*/)[0]),1v.1x)}d=D.2d(1v.3t)}G(d.K===0&&(!D.Y(d,"3V")&&!D.Y(d,"2A")))I;G(d[0]==12||D.Y(d,"3V")||d.15)k.1p(d);N k=D.2R(k,d)});I k},1K:H(d,f,c){G(!d||d.16==3||d.16==8)I 12;J e=!D.4n(d),40=c!==12,1f=D.14.1f;f=e&&D.3X[f]||f;G(d.2j){J g=/5Q|4d|V/.11(f);G(f=="2W"&&D.14.2k)d.1d.64;G(f 1n d&&e&&!g){G(40){G(f=="O"&&D.Y(d,"4T")&&d.1d)7p"O a3 a1\'t 9V 9U";d[f]=c}G(D.Y(d,"3V")&&d.7i(f))I d.7i(f).76;I d[f]}G(1f&&e&&f=="V")I D.1K(d.V,"9T",c);G(40)d.9Q(f,""+c);J h=1f&&e&&g?d.4G(f,2):d.4G(f);I h===U?12:h}G(1f&&f=="1y"){G(40){d.6B=1;d.1E=(d.1E||"").1o(/7f\\([^)]*\\)/,"")+(3r(c)+\'\'=="9L"?"":"7f(1y="+c*7a+")")}I d.1E&&d.1E.1h("1y=")>=0?(3d(d.1E.1I(/1y=([^)]*)/)[1])/7a)+\'\':""}f=f.1o(/-([a-z])/9H,H(a,b){I b.2r()});G(40)d[f]=c;I d[f]},3k:H(a){I(a||"").1o(/^\\s+|\\s+$/g,"")},2d:H(b){J a=[];G(b!=U){J i=b.K;G(i==U||b.1R||b.4I||b.1k)a[0]=b;N 1B(i)a[--i]=b[i]}I a},2L:H(b,a){R(J i=0,K=a.K;i<K;i++)G(a[i]===b)I i;I-1},2R:H(a,b){J i=0,T,2S=a.K;G(D.14.1f){1B(T=b[i++])G(T.16!=8)a[2S++]=T}N 1B(T=b[i++])a[2S++]=T;I a},4r:H(a){J c=[],2o={};1U{R(J i=0,K=a.K;i<K;i++){J b=D.L(a[i]);G(!2o[b]){2o[b]=M;c.1p(a[i])}}}1V(e){c=a}I c},3C:H(c,a,d){J b=[];R(J i=0,K=c.K;i<K;i++)G(!d!=!a(c[i],i))b.1p(c[i]);I b},2l:H(d,a){J c=[];R(J i=0,K=d.K;i<K;i++){J b=a(d[i],i);G(b!=U)c[c.K]=b}I c.7d.1w([],c)}});J v=9B.9A.3y();D.14={5B:(v.1I(/.+(?:9y|9x|9w|9v)[\\/: ]([\\d.]+)/)||[])[1],2k:/75/.11(v),2G:/2G/.11(v),1f:/1f/.11(v)&&!/2G/.11(v),42:/42/.11(v)&&!/(9s|75)/.11(v)};J y=D.14.1f?"7o":"72";D.1l({71:!D.14.1f||S.70=="6Z",3X:{"R":"9n","9k":"1F","4i":y,72:y,7o:y,9h:"9f",9e:"9d",9b:"99"}});D.P({6W:H(a){I a.1d},97:H(a){I D.4S(a,"1d")},95:H(a){I D.3a(a,2,"2H")},91:H(a){I D.3a(a,2,"4l")},8Z:H(a){I D.4S(a,"2H")},8X:H(a){I D.4S(a,"4l")},8W:H(a){I D.5v(a.1d.1x,a)},8V:H(a){I D.5v(a.1x)},6Q:H(a){I D.Y(a,"8U")?a.8T||a.8S.S:D.2d(a.3t)}},H(c,d){D.17[c]=H(b){J a=D.2l(7,d);G(b&&1j b=="23")a=D.3g(b,a);I 7.2I(D.4r(a))}});D.P({6P:"3v",8Q:"6F",39:"6E",8P:"5q",8O:"7b"},H(c,b){D.17[c]=H(){J a=19;I 7.P(H(){R(J i=0,K=a.K;i<K;i++)D(a[i])[b](7)})}});D.P({8N:H(a){D.1K(7,a,"");G(7.16==1)7.5l(a)},8M:H(a){D.1F.1e(7,a)},8L:H(a){D.1F.21(7,a)},8K:H(a){D.1F[D.1F.3T(7,a)?"21":"1e"](7,a)},21:H(a){G(!a||D.1E(a,[7]).r.K){D("*",7).1e(7).P(H(){D.W.21(7);D.3b(7)});G(7.1d)7.1d.37(7)}},4E:H(){D(">*",7).21();1B(7.1x)7.37(7.1x)}},H(a,b){D.17[a]=H(){I 7.P(b,19)}});D.P(["6N","4b"],H(i,c){J b=c.3y();D.17[b]=H(a){I 7[0]==1b?D.14.2G&&S.1c["5t"+c]||D.14.2k&&1b["5s"+c]||S.70=="6Z"&&S.1C["5t"+c]||S.1c["5t"+c]:7[0]==S?29.2f(29.2f(S.1c["4y"+c],S.1C["4y"+c]),29.2f(S.1c["2i"+c],S.1C["2i"+c])):a==12?(7.K?D.1g(7[0],b):U):7.1g(b,a.1q==56?a:a+"2X")}});H 25(a,b){I a[0]&&3r(D.2a(a[0],b,M),10)||0}J C=D.14.2k&&3r(D.14.5B)<8H?"(?:[\\\\w*3m-]|\\\\\\\\.)":"(?:[\\\\w\\8F-\\8E*3m-]|\\\\\\\\.)",6L=2B 4v("^>\\\\s*("+C+"+)"),6J=2B 4v("^("+C+"+)(#)("+C+"+)"),6I=2B 4v("^([#.]?)("+C+"*)");D.1l({6H:{"":H(a,i,m){I m[2]=="*"||D.Y(a,m[2])},"#":H(a,i,m){I a.4G("2v")==m[2]},":":{8D:H(a,i,m){I i<m[3]-0},8C:H(a,i,m){I i>m[3]-0},3a:H(a,i,m){I m[3]-0==i},79:H(a,i,m){I m[3]-0==i},3o:H(a,i){I i==0},3S:H(a,i,m,r){I i==r.K-1},6D:H(a,i){I i%2==0},6C:H(a,i){I i%2},"3o-4u":H(a){I a.1d.3H("*")[0]==a},"3S-4u":H(a){I D.3a(a.1d.5T,1,"4l")==a},"8z-4u":H(a){I!D.3a(a.1d.5T,2,"4l")},6W:H(a){I a.1x},4E:H(a){I!a.1x},8y:H(a,i,m){I(a.6O||a.8x||D(a).1r()||"").1h(m[3])>=0},4j:H(a){I"1G"!=a.O&&D.1g(a,"18")!="2F"&&D.1g(a,"5g")!="1G"},1G:H(a){I"1G"==a.O||D.1g(a,"18")=="2F"||D.1g(a,"5g")=="1G"},8w:H(a){I!a.3R},3R:H(a){I a.3R},4J:H(a){I a.4J},2W:H(a){I a.2W||D.1K(a,"2W")},1r:H(a){I"1r"==a.O},5O:H(a){I"5O"==a.O},5L:H(a){I"5L"==a.O},5p:H(a){I"5p"==a.O},3Q:H(a){I"3Q"==a.O},5o:H(a){I"5o"==a.O},6A:H(a){I"6A"==a.O},6z:H(a){I"6z"==a.O},2s:H(a){I"2s"==a.O||D.Y(a,"2s")},4T:H(a){I/4T|2A|6y|2s/i.11(a.Y)},3T:H(a,i,m){I D.2q(m[3],a).K},8t:H(a){I/h\\d/i.11(a.Y)},8s:H(a){I D.3C(D.3O,H(b){I a==b.T}).K}}},6x:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,2B 4v("^([:.#]*)("+C+"+)")],3g:H(a,c,b){J d,1t=[];1B(a&&a!=d){d=a;J f=D.1E(a,c,b);a=f.t.1o(/^\\s*,\\s*/,"");1t=b?c=f.r:D.2R(1t,f.r)}I 1t},2q:H(t,o){G(1j t!="23")I[t];G(o&&o.16!=1&&o.16!=9)I[];o=o||S;J d=[o],2o=[],3S,Y;1B(t&&3S!=t){J r=[];3S=t;t=D.3k(t);J l=Q,3j=6L,m=3j.2D(t);G(m){Y=m[1].2r();R(J i=0;d[i];i++)R(J c=d[i].1x;c;c=c.2H)G(c.16==1&&(Y=="*"||c.Y.2r()==Y))r.1p(c);d=r;t=t.1o(3j,"");G(t.1h(" ")==0)6M;l=M}N{3j=/^([>+~])\\s*(\\w*)/i;G((m=3j.2D(t))!=U){r=[];J k={};Y=m[2].2r();m=m[1];R(J j=0,3i=d.K;j<3i;j++){J n=m=="~"||m=="+"?d[j].2H:d[j].1x;R(;n;n=n.2H)G(n.16==1){J g=D.L(n);G(m=="~"&&k[g])1X;G(!Y||n.Y.2r()==Y){G(m=="~")k[g]=M;r.1p(n)}G(m=="+")1X}}d=r;t=D.3k(t.1o(3j,""));l=M}}G(t&&!l){G(!t.1h(",")){G(o==d[0])d.4s();2o=D.2R(2o,d);r=d=[o];t=" "+t.6v(1,t.K)}N{J h=6J;J m=h.2D(t);G(m){m=[0,m[2],m[3],m[1]]}N{h=6I;m=h.2D(t)}m[2]=m[2].1o(/\\\\/g,"");J f=d[d.K-1];G(m[1]=="#"&&f&&f.61&&!D.4n(f)){J p=f.61(m[2]);G((D.14.1f||D.14.2G)&&p&&1j p.2v=="23"&&p.2v!=m[2])p=D(\'[@2v="\'+m[2]+\'"]\',f)[0];d=r=p&&(!m[3]||D.Y(p,m[3]))?[p]:[]}N{R(J i=0;d[i];i++){J a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];G(a=="*"&&d[i].Y.3y()=="49")a="3n";r=D.2R(r,d[i].3H(a))}G(m[1]==".")r=D.5m(r,m[2]);G(m[1]=="#"){J e=[];R(J i=0;r[i];i++)G(r[i].4G("2v")==m[2]){e=[r[i]];1X}r=e}d=r}t=t.1o(h,"")}}G(t){J b=D.1E(t,r);d=r=b.r;t=D.3k(b.t)}}G(t)d=[];G(d&&o==d[0])d.4s();2o=D.2R(2o,d);I 2o},5m:H(r,m,a){m=" "+m+" ";J c=[];R(J i=0;r[i];i++){J b=(" "+r[i].1F+" ").1h(m)>=0;G(!a&&b||a&&!b)c.1p(r[i])}I c},1E:H(t,r,h){J d;1B(t&&t!=d){d=t;J p=D.6x,m;R(J i=0;p[i];i++){m=p[i].2D(t);G(m){t=t.8r(m[0].K);m[2]=m[2].1o(/\\\\/g,"");1X}}G(!m)1X;G(m[1]==":"&&m[2]=="4Y")r=62.11(m[3])?D.1E(m[3],r,M).r:D(r).4Y(m[3]);N G(m[1]==".")r=D.5m(r,m[2],h);N G(m[1]=="["){J g=[],O=m[3];R(J i=0,3i=r.K;i<3i;i++){J a=r[i],z=a[D.3X[m[2]]||m[2]];G(z==U||/5Q|4d|2W/.11(m[2]))z=D.1K(a,m[2])||\'\';G((O==""&&!!z||O=="="&&z==m[5]||O=="!="&&z!=m[5]||O=="^="&&z&&!z.1h(m[5])||O=="$="&&z.6v(z.K-m[5].K)==m[5]||(O=="*="||O=="~=")&&z.1h(m[5])>=0)^h)g.1p(a)}r=g}N G(m[1]==":"&&m[2]=="3a-4u"){J e={},g=[],11=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2D(m[3]=="6D"&&"2n"||m[3]=="6C"&&"2n+1"||!/\\D/.11(m[3])&&"8q+"+m[3]||m[3]),3o=(11[1]+(11[2]||1))-0,d=11[3]-0;R(J i=0,3i=r.K;i<3i;i++){J j=r[i],1d=j.1d,2v=D.L(1d);G(!e[2v]){J c=1;R(J n=1d.1x;n;n=n.2H)G(n.16==1)n.4q=c++;e[2v]=M}J b=Q;G(3o==0){G(j.4q==d)b=M}N G((j.4q-d)%3o==0&&(j.4q-d)/3o>=0)b=M;G(b^h)g.1p(j)}r=g}N{J f=D.6H[m[1]];G(1j f=="49")f=f[m[2]];G(1j f=="23")f=6u("Q||H(a,i){I "+f+";}");r=D.3C(r,H(a,i){I f(a,i,m,r)},h)}}I{r:r,t:t}},4S:H(b,c){J a=[],1t=b[c];1B(1t&&1t!=S){G(1t.16==1)a.1p(1t);1t=1t[c]}I a},3a:H(a,e,c,b){e=e||1;J d=0;R(;a;a=a[c])G(a.16==1&&++d==e)1X;I a},5v:H(n,a){J r=[];R(;n;n=n.2H){G(n.16==1&&n!=a)r.1p(n)}I r}});D.W={1e:H(f,i,g,e){G(f.16==3||f.16==8)I;G(D.14.1f&&f.4I)f=1b;G(!g.24)g.24=7.24++;G(e!=12){J h=g;g=7.3M(h,H(){I h.1w(7,19)});g.L=e}J j=D.L(f,"3w")||D.L(f,"3w",{}),1H=D.L(f,"1H")||D.L(f,"1H",H(){G(1j D!="12"&&!D.W.5k)I D.W.1H.1w(19.3L.T,19)});1H.T=f;D.P(i.1R(/\\s+/),H(c,b){J a=b.1R(".");b=a[0];g.O=a[1];J d=j[b];G(!d){d=j[b]={};G(!D.W.2t[b]||D.W.2t[b].4p.1k(f)===Q){G(f.3K)f.3K(b,1H,Q);N G(f.6t)f.6t("4o"+b,1H)}}d[g.24]=g;D.W.26[b]=M});f=U},24:1,26:{},21:H(e,h,f){G(e.16==3||e.16==8)I;J i=D.L(e,"3w"),1L,5i;G(i){G(h==12||(1j h=="23"&&h.8p(0)=="."))R(J g 1n i)7.21(e,g+(h||""));N{G(h.O){f=h.2y;h=h.O}D.P(h.1R(/\\s+/),H(b,a){J c=a.1R(".");a=c[0];G(i[a]){G(f)2U i[a][f.24];N R(f 1n i[a])G(!c[1]||i[a][f].O==c[1])2U i[a][f];R(1L 1n i[a])1X;G(!1L){G(!D.W.2t[a]||D.W.2t[a].4A.1k(e)===Q){G(e.6p)e.6p(a,D.L(e,"1H"),Q);N G(e.6n)e.6n("4o"+a,D.L(e,"1H"))}1L=U;2U i[a]}}})}R(1L 1n i)1X;G(!1L){J d=D.L(e,"1H");G(d)d.T=U;D.3b(e,"3w");D.3b(e,"1H")}}},1P:H(h,c,f,g,i){c=D.2d(c);G(h.1h("!")>=0){h=h.3s(0,-1);J a=M}G(!f){G(7.26[h])D("*").1e([1b,S]).1P(h,c)}N{G(f.16==3||f.16==8)I 12;J b,1L,17=D.1D(f[h]||U),W=!c[0]||!c[0].32;G(W){c.6h({O:h,2J:f,32:H(){},3J:H(){},4C:1z()});c[0][E]=M}c[0].O=h;G(a)c[0].6m=M;J d=D.L(f,"1H");G(d)b=d.1w(f,c);G((!17||(D.Y(f,\'a\')&&h=="4V"))&&f["4o"+h]&&f["4o"+h].1w(f,c)===Q)b=Q;G(W)c.4s();G(i&&D.1D(i)){1L=i.1w(f,b==U?c:c.7d(b));G(1L!==12)b=1L}G(17&&g!==Q&&b!==Q&&!(D.Y(f,\'a\')&&h=="4V")){7.5k=M;1U{f[h]()}1V(e){}}7.5k=Q}I b},1H:H(b){J a,1L,38,5f,4m;b=19[0]=D.W.6l(b||1b.W);38=b.O.1R(".");b.O=38[0];38=38[1];5f=!38&&!b.6m;4m=(D.L(7,"3w")||{})[b.O];R(J j 1n 4m){J c=4m[j];G(5f||c.O==38){b.2y=c;b.L=c.L;1L=c.1w(7,19);G(a!==Q)a=1L;G(1L===Q){b.32();b.3J()}}}I a},6l:H(b){G(b[E]==M)I b;J d=b;b={8o:d};J c="8n 8m 8l 8k 2s 8j 47 5d 6j 5E 8i L 8h 8g 4K 2y 5a 59 8e 8b 58 6f 8a 88 4k 87 86 84 6d 2J 4C 6c O 82 81 35".1R(" ");R(J i=c.K;i;i--)b[c[i]]=d[c[i]];b[E]=M;b.32=H(){G(d.32)d.32();d.80=Q};b.3J=H(){G(d.3J)d.3J();d.7Z=M};b.4C=b.4C||1z();G(!b.2J)b.2J=b.6d||S;G(b.2J.16==3)b.2J=b.2J.1d;G(!b.4k&&b.4K)b.4k=b.4K==b.2J?b.6c:b.4K;G(b.58==U&&b.5d!=U){J a=S.1C,1c=S.1c;b.58=b.5d+(a&&a.2e||1c&&1c.2e||0)-(a.6b||0);b.6f=b.6j+(a&&a.2c||1c&&1c.2c||0)-(a.6a||0)}G(!b.35&&((b.47||b.47===0)?b.47:b.5a))b.35=b.47||b.5a;G(!b.59&&b.5E)b.59=b.5E;G(!b.35&&b.2s)b.35=(b.2s&1?1:(b.2s&2?3:(b.2s&4?2:0)));I b},3M:H(a,b){b.24=a.24=a.24||b.24||7.24++;I b},2t:{27:{4p:H(){55();I},4A:H(){I}},3D:{4p:H(){G(D.14.1f)I Q;D(7).2O("53",D.W.2t.3D.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("53",D.W.2t.3D.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3D";I D.W.1H.1w(7,19)}},3N:{4p:H(){G(D.14.1f)I Q;D(7).2O("51",D.W.2t.3N.2y);I M},4A:H(){G(D.14.1f)I Q;D(7).4e("51",D.W.2t.3N.2y);I M},2y:H(a){G(F(a,7))I M;a.O="3N";I D.W.1H.1w(7,19)}}}};D.17.1l({2O:H(c,a,b){I c=="4X"?7.2V(c,a,b):7.P(H(){D.W.1e(7,c,b||a,b&&a)})},2V:H(d,b,c){J e=D.W.3M(c||b,H(a){D(7).4e(a,e);I(c||b).1w(7,19)});I 7.P(H(){D.W.1e(7,d,e,c&&b)})},4e:H(a,b){I 7.P(H(){D.W.21(7,a,b)})},1P:H(c,a,b){I 7.P(H(){D.W.1P(c,a,7,M,b)})},5C:H(c,a,b){I 7[0]&&D.W.1P(c,a,7[0],Q,b)},2m:H(b){J c=19,i=1;1B(i<c.K)D.W.3M(b,c[i++]);I 7.4V(D.W.3M(b,H(a){7.4Z=(7.4Z||0)%i;a.32();I c[7.4Z++].1w(7,19)||Q}))},7X:H(a,b){I 7.2O(\'3D\',a).2O(\'3N\',b)},27:H(a){55();G(D.2Q)a.1k(S,D);N D.3A.1p(H(){I a.1k(7,D)});I 7}});D.1l({2Q:Q,3A:[],27:H(){G(!D.2Q){D.2Q=M;G(D.3A){D.P(D.3A,H(){7.1k(S)});D.3A=U}D(S).5C("27")}}});J x=Q;H 55(){G(x)I;x=M;G(S.3K&&!D.14.2G)S.3K("69",D.27,Q);G(D.14.1f&&1b==1S)(H(){G(D.2Q)I;1U{S.1C.7V("1A")}1V(3e){3B(19.3L,0);I}D.27()})();G(D.14.2G)S.3K("69",H(){G(D.2Q)I;R(J i=0;i<S.4W.K;i++)G(S.4W[i].3R){3B(19.3L,0);I}D.27()},Q);G(D.14.2k){J a;(H(){G(D.2Q)I;G(S.3f!="68"&&S.3f!="1J"){3B(19.3L,0);I}G(a===12)a=D("V, 7A[7U=7S]").K;G(S.4W.K!=a){3B(19.3L,0);I}D.27()})()}D.W.1e(1b,"43",D.27)}D.P(("7R,7Q,43,85,4y,4X,4V,7P,"+"7O,7N,89,53,51,7M,2A,"+"5o,7L,7K,8d,3e").1R(","),H(i,b){D.17[b]=H(a){I a?7.2O(b,a):7.1P(b)}});J F=H(a,c){J b=a.4k;1B(b&&b!=c)1U{b=b.1d}1V(3e){b=c}I b==c};D(1b).2O("4X",H(){D("*").1e(S).4e()});D.17.1l({67:D.17.43,43:H(g,d,c){G(1j g!=\'23\')I 7.67(g);J e=g.1h(" ");G(e>=0){J i=g.3s(e,g.K);g=g.3s(0,e)}c=c||H(){};J f="2P";G(d)G(D.1D(d)){c=d;d=U}N{d=D.3n(d);f="6g"}J h=7;D.3Y({1a:g,O:f,1O:"2K",L:d,1J:H(a,b){G(b=="1W"||b=="7J")h.2K(i?D("<1v/>").3v(a.4U.1o(/<1m(.|\\s)*?\\/1m>/g,"")).2q(i):a.4U);h.P(c,[a.4U,b,a])}});I 7},aL:H(){I D.3n(7.7I())},7I:H(){I 7.2l(H(){I D.Y(7,"3V")?D.2d(7.aH):7}).1E(H(){I 7.34&&!7.3R&&(7.4J||/2A|6y/i.11(7.Y)||/1r|1G|3Q/i.11(7.O))}).2l(H(i,c){J b=D(7).6e();I b==U?U:b.1q==2p?D.2l(b,H(a,i){I{34:c.34,2x:a}}):{34:c.34,2x:b}}).3p()}});D.P("7H,7G,7F,7D,7C,7B".1R(","),H(i,o){D.17[o]=H(f){I 7.2O(o,f)}});J B=1z();D.1l({3p:H(d,b,a,c){G(D.1D(b)){a=b;b=U}I D.3Y({O:"2P",1a:d,L:b,1W:a,1O:c})},aE:H(b,a){I D.3p(b,U,a,"1m")},aD:H(c,b,a){I D.3p(c,b,a,"3z")},aC:H(d,b,a,c){G(D.1D(b)){a=b;b={}}I D.3Y({O:"6g",1a:d,L:b,1W:a,1O:c})},aA:H(a){D.1l(D.60,a)},60:{1a:5Z.5Q,26:M,O:"2P",2T:0,7z:"4R/x-ax-3V-aw",7x:M,31:M,L:U,5Y:U,3Q:U,4Q:{2N:"4R/2N, 1r/2N",2K:"1r/2K",1m:"1r/4t, 4R/4t",3z:"4R/3z, 1r/4t",1r:"1r/as",4w:"*/*"}},4z:{},3Y:H(s){s=D.1l(M,s,D.1l(M,{},D.60,s));J g,2Z=/=\\?(&|$)/g,1u,L,O=s.O.2r();G(s.L&&s.7x&&1j s.L!="23")s.L=D.3n(s.L);G(s.1O=="4P"){G(O=="2P"){G(!s.1a.1I(2Z))s.1a+=(s.1a.1I(/\\?/)?"&":"?")+(s.4P||"7u")+"=?"}N G(!s.L||!s.L.1I(2Z))s.L=(s.L?s.L+"&":"")+(s.4P||"7u")+"=?";s.1O="3z"}G(s.1O=="3z"&&(s.L&&s.L.1I(2Z)||s.1a.1I(2Z))){g="4P"+B++;G(s.L)s.L=(s.L+"").1o(2Z,"="+g+"$1");s.1a=s.1a.1o(2Z,"="+g+"$1");s.1O="1m";1b[g]=H(a){L=a;1W();1J();1b[g]=12;1U{2U 1b[g]}1V(e){}G(i)i.37(h)}}G(s.1O=="1m"&&s.1Y==U)s.1Y=Q;G(s.1Y===Q&&O=="2P"){J j=1z();J k=s.1a.1o(/(\\?|&)3m=.*?(&|$)/,"$ap="+j+"$2");s.1a=k+((k==s.1a)?(s.1a.1I(/\\?/)?"&":"?")+"3m="+j:"")}G(s.L&&O=="2P"){s.1a+=(s.1a.1I(/\\?/)?"&":"?")+s.L;s.L=U}G(s.26&&!D.4O++)D.W.1P("7H");J n=/^(?:\\w+:)?\\/\\/([^\\/?#]+)/;G(s.1O=="1m"&&O=="2P"&&n.11(s.1a)&&n.2D(s.1a)[1]!=5Z.al){J i=S.3H("6w")[0];J h=S.3h("1m");h.4d=s.1a;G(s.7t)h.aj=s.7t;G(!g){J l=Q;h.ah=h.ag=H(){G(!l&&(!7.3f||7.3f=="68"||7.3f=="1J")){l=M;1W();1J();i.37(h)}}}i.3U(h);I 12}J m=Q;J c=1b.7s?2B 7s("ae.ac"):2B 7r();G(s.5Y)c.6R(O,s.1a,s.31,s.5Y,s.3Q);N c.6R(O,s.1a,s.31);1U{G(s.L)c.4B("ab-aa",s.7z);G(s.5S)c.4B("a9-5R-a8",D.4z[s.1a]||"a7, a6 a5 a4 5N:5N:5N a2");c.4B("X-9Z-9Y","7r");c.4B("9W",s.1O&&s.4Q[s.1O]?s.4Q[s.1O]+", */*":s.4Q.4w)}1V(e){}G(s.7m&&s.7m(c,s)===Q){s.26&&D.4O--;c.7l();I Q}G(s.26)D.W.1P("7B",[c,s]);J d=H(a){G(!m&&c&&(c.3f==4||a=="2T")){m=M;G(f){7k(f);f=U}1u=a=="2T"&&"2T"||!D.7j(c)&&"3e"||s.5S&&D.7h(c,s.1a)&&"7J"||"1W";G(1u=="1W"){1U{L=D.6X(c,s.1O,s.9S)}1V(e){1u="5J"}}G(1u=="1W"){J b;1U{b=c.5I("7g-5R")}1V(e){}G(s.5S&&b)D.4z[s.1a]=b;G(!g)1W()}N D.5H(s,c,1u);1J();G(s.31)c=U}};G(s.31){J f=4I(d,13);G(s.2T>0)3B(H(){G(c){c.7l();G(!m)d("2T")}},s.2T)}1U{c.9P(s.L)}1V(e){D.5H(s,c,U,e)}G(!s.31)d();H 1W(){G(s.1W)s.1W(L,1u);G(s.26)D.W.1P("7C",[c,s])}H 1J(){G(s.1J)s.1J(c,1u);G(s.26)D.W.1P("7F",[c,s]);G(s.26&&!--D.4O)D.W.1P("7G")}I c},5H:H(s,a,b,e){G(s.3e)s.3e(a,b,e);G(s.26)D.W.1P("7D",[a,s,e])},4O:0,7j:H(a){1U{I!a.1u&&5Z.9O=="5p:"||(a.1u>=7e&&a.1u<9N)||a.1u==7c||a.1u==9K||D.14.2k&&a.1u==12}1V(e){}I Q},7h:H(a,c){1U{J b=a.5I("7g-5R");I a.1u==7c||b==D.4z[c]||D.14.2k&&a.1u==12}1V(e){}I Q},6X:H(a,c,b){J d=a.5I("9J-O"),2N=c=="2N"||!c&&d&&d.1h("2N")>=0,L=2N?a.9I:a.4U;G(2N&&L.1C.2j=="5J")7p"5J";G(b)L=b(L,c);G(c=="1m")D.5u(L);G(c=="3z")L=6u("("+L+")");I L},3n:H(a){J s=[];G(a.1q==2p||a.5w)D.P(a,H(){s.1p(3u(7.34)+"="+3u(7.2x))});N R(J j 1n a)G(a[j]&&a[j].1q==2p)D.P(a[j],H(){s.1p(3u(j)+"="+3u(7))});N s.1p(3u(j)+"="+3u(D.1D(a[j])?a[j]():a[j]));I s.6s("&").1o(/%20/g,"+")}});D.17.1l({1N:H(c,b){I c?7.2g({1Z:"1N",2h:"1N",1y:"1N"},c,b):7.1E(":1G").P(H(){7.V.18=7.5D||"";G(D.1g(7,"18")=="2F"){J a=D("<"+7.2j+" />").6P("1c");7.V.18=a.1g("18");G(7.V.18=="2F")7.V.18="3I";a.21()}}).3l()},1M:H(b,a){I b?7.2g({1Z:"1M",2h:"1M",1y:"1M"},b,a):7.1E(":4j").P(H(){7.5D=7.5D||D.1g(7,"18");7.V.18="2F"}).3l()},78:D.17.2m,2m:H(a,b){I D.1D(a)&&D.1D(b)?7.78.1w(7,19):a?7.2g({1Z:"2m",2h:"2m",1y:"2m"},a,b):7.P(H(){D(7)[D(7).3F(":1G")?"1N":"1M"]()})},9G:H(b,a){I 7.2g({1Z:"1N"},b,a)},9F:H(b,a){I 7.2g({1Z:"1M"},b,a)},9E:H(b,a){I 7.2g({1Z:"2m"},b,a)},9D:H(b,a){I 7.2g({1y:"1N"},b,a)},9M:H(b,a){I 7.2g({1y:"1M"},b,a)},9C:H(c,a,b){I 7.2g({1y:a},c,b)},2g:H(k,j,i,g){J h=D.77(j,i,g);I 7[h.36===Q?"P":"36"](H(){G(7.16!=1)I Q;J f=D.1l({},h),p,1G=D(7).3F(":1G"),46=7;R(p 1n k){G(k[p]=="1M"&&1G||k[p]=="1N"&&!1G)I f.1J.1k(7);G(p=="1Z"||p=="2h"){f.18=D.1g(7,"18");f.33=7.V.33}}G(f.33!=U)7.V.33="1G";f.45=D.1l({},k);D.P(k,H(c,a){J e=2B D.28(46,f,c);G(/2m|1N|1M/.11(a))e[a=="2m"?1G?"1N":"1M":a](k);N{J b=a.6r().1I(/^([+-]=)?([\\d+-.]+)(.*)$/),2b=e.1t(M)||0;G(b){J d=3d(b[2]),2M=b[3]||"2X";G(2M!="2X"){46.V[c]=(d||1)+2M;2b=((d||1)/e.1t(M))*2b;46.V[c]=2b+2M}G(b[1])d=((b[1]=="-="?-1:1)*d)+2b;e.3G(2b,d,2M)}N e.3G(2b,a,"")}});I M})},36:H(a,b){G(D.1D(a)||(a&&a.1q==2p)){b=a;a="28"}G(!a||(1j a=="23"&&!b))I A(7[0],a);I 7.P(H(){G(b.1q==2p)A(7,a,b);N{A(7,a).1p(b);G(A(7,a).K==1)b.1k(7)}})},9X:H(b,c){J a=D.3O;G(b)7.36([]);7.P(H(){R(J i=a.K-1;i>=0;i--)G(a[i].T==7){G(c)a[i](M);a.7n(i,1)}});G(!c)7.5A();I 7}});J A=H(b,c,a){G(b){c=c||"28";J q=D.L(b,c+"36");G(!q||a)q=D.L(b,c+"36",D.2d(a))}I q};D.17.5A=H(a){a=a||"28";I 7.P(H(){J q=A(7,a);q.4s();G(q.K)q[0].1k(7)})};D.1l({77:H(b,a,c){J d=b&&b.1q==a0?b:{1J:c||!c&&a||D.1D(b)&&b,2u:b,41:c&&a||a&&a.1q!=9t&&a};d.2u=(d.2u&&d.2u.1q==4L?d.2u:D.28.5K[d.2u])||D.28.5K.74;d.5M=d.1J;d.1J=H(){G(d.36!==Q)D(7).5A();G(D.1D(d.5M))d.5M.1k(7)};I d},41:{73:H(p,n,b,a){I b+a*p},5P:H(p,n,b,a){I((-29.9r(p*29.9q)/2)+0.5)*a+b}},3O:[],48:U,28:H(b,c,a){7.15=c;7.T=b;7.1i=a;G(!c.3Z)c.3Z={}}});D.28.44={4D:H(){G(7.15.2Y)7.15.2Y.1k(7.T,7.1z,7);(D.28.2Y[7.1i]||D.28.2Y.4w)(7);G(7.1i=="1Z"||7.1i=="2h")7.T.V.18="3I"},1t:H(a){G(7.T[7.1i]!=U&&7.T.V[7.1i]==U)I 7.T[7.1i];J r=3d(D.1g(7.T,7.1i,a));I r&&r>-9p?r:3d(D.2a(7.T,7.1i))||0},3G:H(c,b,d){7.5V=1z();7.2b=c;7.3l=b;7.2M=d||7.2M||"2X";7.1z=7.2b;7.2S=7.4N=0;7.4D();J e=7;H t(a){I e.2Y(a)}t.T=7.T;D.3O.1p(t);G(D.48==U){D.48=4I(H(){J a=D.3O;R(J i=0;i<a.K;i++)G(!a[i]())a.7n(i--,1);G(!a.K){7k(D.48);D.48=U}},13)}},1N:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1N=M;7.3G(0,7.1t());G(7.1i=="2h"||7.1i=="1Z")7.T.V[7.1i]="9m";D(7.T).1N()},1M:H(){7.15.3Z[7.1i]=D.1K(7.T.V,7.1i);7.15.1M=M;7.3G(7.1t(),0)},2Y:H(a){J t=1z();G(a||t>7.15.2u+7.5V){7.1z=7.3l;7.2S=7.4N=1;7.4D();7.15.45[7.1i]=M;J b=M;R(J i 1n 7.15.45)G(7.15.45[i]!==M)b=Q;G(b){G(7.15.18!=U){7.T.V.33=7.15.33;7.T.V.18=7.15.18;G(D.1g(7.T,"18")=="2F")7.T.V.18="3I"}G(7.15.1M)7.T.V.18="2F";G(7.15.1M||7.15.1N)R(J p 1n 7.15.45)D.1K(7.T.V,p,7.15.3Z[p])}G(b)7.15.1J.1k(7.T);I Q}N{J n=t-7.5V;7.4N=n/7.15.2u;7.2S=D.41[7.15.41||(D.41.5P?"5P":"73")](7.4N,n,0,1,7.15.2u);7.1z=7.2b+((7.3l-7.2b)*7.2S);7.4D()}I M}};D.1l(D.28,{5K:{9l:9j,9i:7e,74:9g},2Y:{2e:H(a){a.T.2e=a.1z},2c:H(a){a.T.2c=a.1z},1y:H(a){D.1K(a.T.V,"1y",a.1z)},4w:H(a){a.T.V[a.1i]=a.1z+a.2M}}});D.17.2i=H(){J b=0,1S=0,T=7[0],3q;G(T)ao(D.14){J d=T.1d,4a=T,1s=T.1s,1Q=T.2z,5U=2k&&3r(5B)<9c&&!/9a/i.11(v),1g=D.2a,3c=1g(T,"30")=="3c";G(T.7y){J c=T.7y();1e(c.1A+29.2f(1Q.1C.2e,1Q.1c.2e),c.1S+29.2f(1Q.1C.2c,1Q.1c.2c));1e(-1Q.1C.6b,-1Q.1C.6a)}N{1e(T.5X,T.5W);1B(1s){1e(1s.5X,1s.5W);G(42&&!/^t(98|d|h)$/i.11(1s.2j)||2k&&!5U)2C(1s);G(!3c&&1g(1s,"30")=="3c")3c=M;4a=/^1c$/i.11(1s.2j)?4a:1s;1s=1s.1s}1B(d&&d.2j&&!/^1c|2K$/i.11(d.2j)){G(!/^96|1T.*$/i.11(1g(d,"18")))1e(-d.2e,-d.2c);G(42&&1g(d,"33")!="4j")2C(d);d=d.1d}G((5U&&(3c||1g(4a,"30")=="5x"))||(42&&1g(4a,"30")!="5x"))1e(-1Q.1c.5X,-1Q.1c.5W);G(3c)1e(29.2f(1Q.1C.2e,1Q.1c.2e),29.2f(1Q.1C.2c,1Q.1c.2c))}3q={1S:1S,1A:b}}H 2C(a){1e(D.2a(a,"6V",M),D.2a(a,"6U",M))}H 1e(l,t){b+=3r(l,10)||0;1S+=3r(t,10)||0}I 3q};D.17.1l({30:H(){J a=0,1S=0,3q;G(7[0]){J b=7.1s(),2i=7.2i(),4c=/^1c|2K$/i.11(b[0].2j)?{1S:0,1A:0}:b.2i();2i.1S-=25(7,\'94\');2i.1A-=25(7,\'aF\');4c.1S+=25(b,\'6U\');4c.1A+=25(b,\'6V\');3q={1S:2i.1S-4c.1S,1A:2i.1A-4c.1A}}I 3q},1s:H(){J a=7[0].1s;1B(a&&(!/^1c|2K$/i.11(a.2j)&&D.1g(a,\'30\')==\'93\'))a=a.1s;I D(a)}});D.P([\'5e\',\'5G\'],H(i,b){J c=\'4y\'+b;D.17[c]=H(a){G(!7[0])I;I a!=12?7.P(H(){7==1b||7==S?1b.92(!i?a:D(1b).2e(),i?a:D(1b).2c()):7[c]=a}):7[0]==1b||7[0]==S?46[i?\'aI\':\'aJ\']||D.71&&S.1C[c]||S.1c[c]:7[0][c]}});D.P(["6N","4b"],H(i,b){J c=i?"5e":"5G",4f=i?"6k":"6i";D.17["5s"+b]=H(){I 7[b.3y()]()+25(7,"57"+c)+25(7,"57"+4f)};D.17["90"+b]=H(a){I 7["5s"+b]()+25(7,"2C"+c+"4b")+25(7,"2C"+4f+"4b")+(a?25(7,"6S"+c)+25(7,"6S"+4f):0)}})})();',62,669,'|||||||this|||||||||||||||||||||||||||||||||||if|function|return|var|length|data|true|else|type|each|false|for|document|elem|null|style|event||nodeName|||test|undefined||browser|options|nodeType|fn|display|arguments|url|window|body|parentNode|add|msie|css|indexOf|prop|typeof|call|extend|script|in|replace|push|constructor|text|offsetParent|cur|status|div|apply|firstChild|opacity|now|left|while|documentElement|isFunction|filter|className|hidden|handle|match|complete|attr|ret|hide|show|dataType|trigger|doc|split|top|table|try|catch|success|break|cache|height||remove|tbody|string|guid|num|global|ready|fx|Math|curCSS|start|scrollTop|makeArray|scrollLeft|max|animate|width|offset|tagName|safari|map|toggle||done|Array|find|toUpperCase|button|special|duration|id|copy|value|handler|ownerDocument|select|new|border|exec|stack|none|opera|nextSibling|pushStack|target|html|inArray|unit|xml|bind|GET|isReady|merge|pos|timeout|delete|one|selected|px|step|jsre|position|async|preventDefault|overflow|name|which|queue|removeChild|namespace|insertBefore|nth|removeData|fixed|parseFloat|error|readyState|multiFilter|createElement|rl|re|trim|end|_|param|first|get|results|parseInt|slice|childNodes|encodeURIComponent|append|events|elems|toLowerCase|json|readyList|setTimeout|grep|mouseenter|color|is|custom|getElementsByTagName|block|stopPropagation|addEventListener|callee|proxy|mouseleave|timers|defaultView|password|disabled|last|has|appendChild|form|domManip|props|ajax|orig|set|easing|mozilla|load|prototype|curAnim|self|charCode|timerId|object|offsetChild|Width|parentOffset|src|unbind|br|currentStyle|clean|float|visible|relatedTarget|previousSibling|handlers|isXMLDoc|on|setup|nodeIndex|unique|shift|javascript|child|RegExp|_default|deep|scroll|lastModified|teardown|setRequestHeader|timeStamp|update|empty|tr|getAttribute|innerHTML|setInterval|checked|fromElement|Number|jQuery|state|active|jsonp|accepts|application|dir|input|responseText|click|styleSheets|unload|not|lastToggle|outline|mouseout|getPropertyValue|mouseover|getComputedStyle|bindReady|String|padding|pageX|metaKey|keyCode|getWH|andSelf|clientX|Left|all|visibility|container|index|init|triggered|removeAttribute|classFilter|prevObject|submit|file|after|windowData|inner|client|globalEval|sibling|jquery|absolute|clone|wrapAll|dequeue|version|triggerHandler|oldblock|ctrlKey|createTextNode|Top|handleError|getResponseHeader|parsererror|speeds|checkbox|old|00|radio|swing|href|Modified|ifModified|lastChild|safari2|startTime|offsetTop|offsetLeft|username|location|ajaxSettings|getElementById|isSimple|values|selectedIndex|runtimeStyle|rsLeft|_load|loaded|DOMContentLoaded|clientTop|clientLeft|toElement|srcElement|val|pageY|POST|unshift|Bottom|clientY|Right|fix|exclusive|detachEvent|cloneNode|removeEventListener|swap|toString|join|attachEvent|eval|substr|head|parse|textarea|reset|image|zoom|odd|even|before|prepend|exclude|expr|quickClass|quickID|uuid|quickChild|continue|Height|textContent|appendTo|contents|open|margin|evalScript|borderTopWidth|borderLeftWidth|parent|httpData|setArray|CSS1Compat|compatMode|boxModel|cssFloat|linear|def|webkit|nodeValue|speed|_toggle|eq|100|replaceWith|304|concat|200|alpha|Last|httpNotModified|getAttributeNode|httpSuccess|clearInterval|abort|beforeSend|splice|styleFloat|throw|colgroup|XMLHttpRequest|ActiveXObject|scriptCharset|callback|fieldset|multiple|processData|getBoundingClientRect|contentType|link|ajaxSend|ajaxSuccess|ajaxError|col|ajaxComplete|ajaxStop|ajaxStart|serializeArray|notmodified|keypress|keydown|change|mouseup|mousedown|dblclick|focus|blur|stylesheet|hasClass|rel|doScroll|black|hover|solid|cancelBubble|returnValue|wheelDelta|view|round|shiftKey|resize|screenY|screenX|relatedNode|mousemove|prevValue|originalTarget|offsetHeight|keyup|newValue|offsetWidth|eventPhase|detail|currentTarget|cancelable|bubbles|attrName|attrChange|altKey|originalEvent|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|font|gt|lt|uFFFF|u0128|size|417|Boolean|Date|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|wrap|contentWindow|contentDocument|iframe|children|siblings|prevAll|wrapInner|nextAll|outer|prev|scrollTo|static|marginTop|next|inline|parents|able|cellSpacing|adobeair|cellspacing|522|maxLength|maxlength|readOnly|400|readonly|fast|600|class|slow|1px|htmlFor|reverse|10000|PI|cos|compatible|Function|setData|ie|ra|it|rv|getData|userAgent|navigator|fadeTo|fadeIn|slideToggle|slideUp|slideDown|ig|responseXML|content|1223|NaN|fadeOut|300|protocol|send|setAttribute|option|dataFilter|cssText|changed|be|Accept|stop|With|Requested|Object|can|GMT|property|1970|Jan|01|Thu|Since|If|Type|Content|XMLHTTP|th|Microsoft|td|onreadystatechange|onload|cap|charset|colg|host|tfoot|specified|with|1_|thead|leg|plain|attributes|opt|embed|urlencoded|www|area|hr|ajaxSetup|meta|post|getJSON|getScript|marginLeft|img|elements|pageYOffset|pageXOffset|abbr|serialize|pixelLeft'.split('|'),0,{}));
-// $Id: drupal.js,v 1.41.2.4 2009/07/21 08:59:10 goba Exp $
-
-var Drupal = Drupal || { 'settings': {}, 'behaviors': {}, 'themes': {}, 'locale': {} };
-
-/**
- * Set the variable that indicates if JavaScript behaviors should be applied
- */
-Drupal.jsEnabled = document.getElementsByTagName && document.createElement && document.createTextNode && document.documentElement && document.getElementById;
-
-/**
- * Attach all registered behaviors to a page element.
- *
- * Behaviors are event-triggered actions that attach to page elements, enhancing
- * default non-Javascript UIs. Behaviors are registered in the Drupal.behaviors
- * object as follows:
- * @code
- * Drupal.behaviors.behaviorName = function () {
- * ...
- * };
- * @endcode
- *
- * Drupal.attachBehaviors is added below to the jQuery ready event and so
- * runs on initial page load. Developers implementing AHAH/AJAX in their
- * solutions should also call this function after new page content has been
- * loaded, feeding in an element to be processed, in order to attach all
- * behaviors to the new content.
- *
- * Behaviors should use a class in the form behaviorName-processed to ensure
- * the behavior is attached only once to a given element. (Doing so enables
- * the reprocessing of given elements, which may be needed on occasion despite
- * the ability to limit behavior attachment to a particular element.)
- *
- * @param context
- * An element to attach behaviors to. If none is given, the document element
- * is used.
- */
-Drupal.attachBehaviors = function(context) {
- context = context || document;
- if (Drupal.jsEnabled) {
- // Execute all of them.
- jQuery.each(Drupal.behaviors, function() {
- this(context);
- });
- }
-};
-
-/**
- * Encode special characters in a plain-text string for display as HTML.
- */
-Drupal.checkPlain = function(str) {
- str = String(str);
- var replace = { '&': '&amp;', '"': '&quot;', '<': '&lt;', '>': '&gt;' };
- for (var character in replace) {
- var regex = new RegExp(character, 'g');
- str = str.replace(regex, replace[character]);
- }
- return str;
-};
-
-/**
- * Translate strings to the page language or a given language.
- *
- * See the documentation of the server-side t() function for further details.
- *
- * @param str
- * A string containing the English string to translate.
- * @param args
- * An object of replacements pairs to make after translation. Incidences
- * of any key in this array are replaced with the corresponding value.
- * Based on the first character of the key, the value is escaped and/or themed:
- * - !variable: inserted as is
- * - @variable: escape plain text to HTML (Drupal.checkPlain)
- * - %variable: escape text and theme as a placeholder for user-submitted
- * content (checkPlain + Drupal.theme('placeholder'))
- * @return
- * The translated string.
- */
-Drupal.t = function(str, args) {
- // Fetch the localized version of the string.
- if (Drupal.locale.strings && Drupal.locale.strings[str]) {
- str = Drupal.locale.strings[str];
- }
-
- if (args) {
- // Transform arguments before inserting them
- for (var key in args) {
- switch (key.charAt(0)) {
- // Escaped only
- case '@':
- args[key] = Drupal.checkPlain(args[key]);
- break;
- // Pass-through
- case '!':
- break;
- // Escaped and placeholder
- case '%':
- default:
- args[key] = Drupal.theme('placeholder', args[key]);
- break;
- }
- str = str.replace(key, args[key]);
- }
- }
- return str;
-};
-
-/**
- * Format a string containing a count of items.
- *
- * This function ensures that the string is pluralized correctly. Since Drupal.t() is
- * called by this function, make sure not to pass already-localized strings to it.
- *
- * See the documentation of the server-side format_plural() function for further details.
- *
- * @param count
- * The item count to display.
- * @param singular
- * The string for the singular case. Please make sure it is clear this is
- * singular, to ease translation (e.g. use "1 new comment" instead of "1 new").
- * Do not use @count in the singular string.
- * @param plural
- * The string for the plural case. Please make sure it is clear this is plural,
- * to ease translation. Use @count in place of the item count, as in "@count
- * new comments".
- * @param args
- * An object of replacements pairs to make after translation. Incidences
- * of any key in this array are replaced with the corresponding value.
- * Based on the first character of the key, the value is escaped and/or themed:
- * - !variable: inserted as is
- * - @variable: escape plain text to HTML (Drupal.checkPlain)
- * - %variable: escape text and theme as a placeholder for user-submitted
- * content (checkPlain + Drupal.theme('placeholder'))
- * Note that you do not need to include @count in this array.
- * This replacement is done automatically for the plural case.
- * @return
- * A translated string.
- */
-Drupal.formatPlural = function(count, singular, plural, args) {
- var args = args || {};
- args['@count'] = count;
- // Determine the index of the plural form.
- var index = Drupal.locale.pluralFormula ? Drupal.locale.pluralFormula(args['@count']) : ((args['@count'] == 1) ? 0 : 1);
-
- if (index == 0) {
- return Drupal.t(singular, args);
- }
- else if (index == 1) {
- return Drupal.t(plural, args);
- }
- else {
- args['@count['+ index +']'] = args['@count'];
- delete args['@count'];
- return Drupal.t(plural.replace('@count', '@count['+ index +']'));
- }
-};
-
-/**
- * Generate the themed representation of a Drupal object.
- *
- * All requests for themed output must go through this function. It examines
- * the request and routes it to the appropriate theme function. If the current
- * theme does not provide an override function, the generic theme function is
- * called.
- *
- * For example, to retrieve the HTML that is output by theme_placeholder(text),
- * call Drupal.theme('placeholder', text).
- *
- * @param func
- * The name of the theme function to call.
- * @param ...
- * Additional arguments to pass along to the theme function.
- * @return
- * Any data the theme function returns. This could be a plain HTML string,
- * but also a complex object.
- */
-Drupal.theme = function(func) {
- for (var i = 1, args = []; i < arguments.length; i++) {
- args.push(arguments[i]);
- }
-
- return (Drupal.theme[func] || Drupal.theme.prototype[func]).apply(this, args);
-};
-
-/**
- * Parse a JSON response.
- *
- * The result is either the JSON object, or an object with 'status' 0 and 'data' an error message.
- */
-Drupal.parseJson = function (data) {
- if ((data.substring(0, 1) != '{') && (data.substring(0, 1) != '[')) {
- return { status: 0, data: data.length ? data : Drupal.t('Unspecified error') };
- }
- return eval('(' + data + ');');
-};
-
-/**
- * Freeze the current body height (as minimum height). Used to prevent
- * unnecessary upwards scrolling when doing DOM manipulations.
- */
-Drupal.freezeHeight = function () {
- Drupal.unfreezeHeight();
- var div = document.createElement('div');
- $(div).css({
- position: 'absolute',
- top: '0px',
- left: '0px',
- width: '1px',
- height: $('body').css('height')
- }).attr('id', 'freeze-height');
- $('body').append(div);
-};
-
-/**
- * Unfreeze the body height
- */
-Drupal.unfreezeHeight = function () {
- $('#freeze-height').remove();
-};
-
-/**
- * Wrapper around encodeURIComponent() which avoids Apache quirks (equivalent of
- * drupal_urlencode() in PHP). This function should only be used on paths, not
- * on query string arguments.
- */
-Drupal.encodeURIComponent = function (item, uri) {
- uri = uri || location.href;
- item = encodeURIComponent(item).replace(/%2F/g, '/');
- return (uri.indexOf('?q=') != -1) ? item : item.replace(/%26/g, '%2526').replace(/%23/g, '%2523').replace(/\/\//g, '/%252F');
-};
-
-/**
- * Get the text selection in a textarea.
- */
-Drupal.getSelection = function (element) {
- if (typeof(element.selectionStart) != 'number' && document.selection) {
- // The current selection
- var range1 = document.selection.createRange();
- var range2 = range1.duplicate();
- // Select all text.
- range2.moveToElementText(element);
- // Now move 'dummy' end point to end point of original range.
- range2.setEndPoint('EndToEnd', range1);
- // Now we can calculate start and end points.
- var start = range2.text.length - range1.text.length;
- var end = start + range1.text.length;
- return { 'start': start, 'end': end };
- }
- return { 'start': element.selectionStart, 'end': element.selectionEnd };
-};
-
-/**
- * Build an error message from ahah response.
- */
-Drupal.ahahError = function(xmlhttp, uri) {
- if (xmlhttp.status == 200) {
- if (jQuery.trim($(xmlhttp.responseText).text())) {
- var message = Drupal.t("An error occurred. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText });
- }
- else {
- var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri, '@text': xmlhttp.responseText });
- }
- }
- else {
- var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status });
- }
- return message;
-}
-
-// Global Killswitch on the <html> element
-if (Drupal.jsEnabled) {
- // Global Killswitch on the <html> element
- $(document.documentElement).addClass('js');
- // 'js enabled' cookie
- document.cookie = 'has_js=1; path=/';
- // Attach all behaviors.
- $(document).ready(function() {
- Drupal.attachBehaviors(this);
- });
-}
-
-/**
- * The default themes.
- */
-Drupal.theme.prototype = {
-
- /**
- * Formats text for emphasized display in a placeholder inside a sentence.
- *
- * @param str
- * The text to format (plain-text).
- * @return
- * The formatted text (html).
- */
- placeholder: function(str) {
- return '<em>' + Drupal.checkPlain(str) + '</em>';
- }
-};
-;
-// $Id: googleanalytics.js,v 1.9.2.4 2010/09/19 11:39:20 hass Exp $
-
-$(document).ready(function() {
-
- // Attach onclick event to document only and catch clicks on all elements.
- $(document.body).click(function(event) {
- // Catch only the first parent link of a clicked element.
- $(event.target).parents("a:first,area:first").andSelf().filter("a,area").each(function() {
-
- var ga = Drupal.settings.googleanalytics;
- // Expression to check for absolute internal links.
- var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
- // Expression to check for special links like gotwo.module /go/* links.
- var isInternalSpecial = new RegExp("(\/go\/.*)$", "i");
- // Expression to check for download links.
- var isDownload = new RegExp("\\.(" + ga.trackDownloadExtensions + ")$", "i");
-
- // Is the clicked URL internal?
- if (isInternal.test(this.href)) {
- // Is download tracking activated and the file extension configured for download tracking?
- if (ga.trackDownload && isDownload.test(this.href)) {
- // Download link clicked.
- var extension = isDownload.exec(this.href);
- _gaq.push(["_trackEvent", "Downloads", extension[1].toUpperCase(), this.href.replace(isInternal, '')]);
- }
- else if (isInternalSpecial.test(this.href)) {
- // Keep the internal URL for Google Analytics website overlay intact.
- _gaq.push(["_trackPageview", this.href.replace(isInternal, '')]);
- }
- }
- else {
- if (ga.trackMailto && $(this).is("a[href^=mailto:],area[href^=mailto:]")) {
- // Mailto link clicked.
- _gaq.push(["_trackEvent", "Mails", "Click", this.href.substring(7)]);
- }
- else if (ga.trackOutgoing && this.href) {
- // External link clicked.
- _gaq.push(["_trackEvent", "Outgoing links", "Click", this.href]);
- }
- }
-
- });
- });
-});
-;
-(function () {
- function latitudeToMercator(latitude) {
- return Math.log(Math.tan(latitude * Math.PI / 180) + 1 / Math.cos(latitude * Math.PI / 180));
- }
-
- Drupal.html5UserGeolocationLongitudeToPx = function (longitude, leftLongitude, width) {
- return (longitude - leftLongitude + 360) / 360 % 1 * width;
- }
-
- Drupal.html5UserGeolocationLatitudeToPx = function (latitude, topLatitude, bottomLatitude, height) {
- return (latitudeToMercator(latitude) - latitudeToMercator(bottomLatitude))
- / (latitudeToMercator(topLatitude) - latitudeToMercator(bottomLatitude))
- * height;
- }
-
- function plot() {
- var $map = $('#html5-user-geolocation-map'),
- latitude = $('#edit-html5-user-geolocation-latitude').attr('value'),
- longitude = $('#edit-html5-user-geolocation-longitude').attr('value');
-
- if (latitude == 0 && longitude == 0) {
- return;
- }
-
- // Plot coords
- $('#html5-user-geolocation-map .dot').css({
- left: '' + Drupal.html5UserGeolocationLongitudeToPx(longitude, -168, $map.width()) + 'px',
- bottom: '' + Drupal.html5UserGeolocationLatitudeToPx(latitude, 78, -58, $map.height()) + 'px'
- }).show();
-
- // Show precision
- $map.siblings('.description').find('span').html(
- (Math.acos(
- Math.sin(latitude * Math.PI / 180)
- * Math.sin((latitude) * Math.PI / 180)
- + Math.cos(latitude * Math.PI / 180)
- * Math.cos((latitude) * Math.PI / 180)
- * Math.cos(Math.pow(10, -1 * Drupal.settings.html5UserGeolocationPrecision) * Math.PI / 180)
- ) * 6371).toPrecision(3)
- );
- }
-
- function getLocation() {
- if ($('#edit-html5-user-geolocation-save').attr('checked')) {
- var $busy = $('#html5-user-geolocation-messages-wrapper .geolocating');
- $('#html5-user-geolocation-map-wrapper').slideDown('fast');
-
- // Get position
- $busy.show();
- navigator.geolocation.getCurrentPosition(function (position) {
- // Save coords
- $('#edit-html5-user-geolocation-latitude').attr('value', position.coords.latitude);
- $('#edit-html5-user-geolocation-longitude').attr('value', position.coords.longitude);
-
- plot();
- $busy.hide();
- }, function () { // getCurrentPosition error callback
- $('#edit-html5-user-geolocation-save').attr('checked', false).change();
- },
- {
- maximumAge: Infinity
- });
- }
- else { // Location not checked
- $('#html5-user-geolocation-map-wrapper').slideUp('fast');
- }
- }
-
- Drupal.behaviors.html5UserGeolocation = function (context) {
- if (navigator.geolocation) {
- $('#user-profile-form #edit-html5-user-geolocation-save:not(.html5-user-geolocation-processed)', context)
- .addClass('html5-user-geolocation-processed')
- .change(function () {
- getLocation();
- })
- .each(function () {
- $('#html5-user-geolocation-messages-wrapper .not-supported').hide();
- if ($('#edit-html5-user-geolocation-save').attr('checked')) {
- $('#html5-user-geolocation-map-wrapper').slideDown('fast');
- plot();
- }
- getLocation();
- });
- }
- else { // HTML5 Geolocation not supported
- $('#edit-html5-user-geolocation-save').attr('disabled', true);
- }
- };
-}());
-;
-Drupal.behaviors.drupalorgSetHome = function () {
- $('#drupalorg-set-home:not(.drupalorg-set-home-processed)')
- .addClass('drupalorg-set-home-processed')
- .each(function () {
- var $this = $(this);
- // Click triggers form submit
- $('a', $this).click(function () {
- $('input[type=submit]', $this).click();
- return false;
- });
- });
-};
-
-Drupal.behaviors.drupalorgSearch = function () {
- $('body.page-search #content-top-region form:not(.drupalorgSearch-processed)').addClass('drupalorgSearch-processed').each(function () {
- var $this = $(this);
- $this.find('select').change(function () {
- $this.submit();
- });
- });
-};
-;
-// $Id: base.js,v 1.11.2.1 2010/03/10 20:08:58 merlinofchaos Exp $
-/**
- * @file base.js
- *
- * Some basic behaviors and utility functions for Views.
- */
-
-Drupal.Views = {};
-
-/**
- * jQuery UI tabs, Views integration component
- */
-Drupal.behaviors.viewsTabs = function (context) {
- $('#views-tabset:not(.views-processed)').addClass('views-processed').each(function() {
- new Drupal.Views.Tabs($(this), {selectedClass: 'active'});
- });
-
- $('a.views-remove-link')
- .addClass('views-processed')
- .click(function() {
- var id = $(this).attr('id').replace('views-remove-link-', '');
- $('#views-row-' + id).hide();
- $('#views-removed-' + id).attr('checked', true);
- return false;
- });
-}
-
-/**
- * For IE, attach some javascript so that our hovers do what they're supposed
- * to do.
- */
-Drupal.behaviors.viewsHoverlinks = function() {
- if ($.browser.msie) {
- // If IE, attach a hover event so we can see our admin links.
- $("div.view:not(.views-hover-processed)").addClass('views-hover-processed').hover(
- function() {
- $('div.views-hide', this).addClass("views-hide-hover"); return true;
- },
- function(){
- $('div.views-hide', this).removeClass("views-hide-hover"); return true;
- }
- );
- $("div.views-admin-links:not(.views-hover-processed)")
- .addClass('views-hover-processed')
- .hover(
- function() {
- $(this).addClass("views-admin-links-hover"); return true;
- },
- function(){
- $(this).removeClass("views-admin-links-hover"); return true;
- }
- );
- }
-}
-
-/**
- * Helper function to parse a querystring.
- */
-Drupal.Views.parseQueryString = function (query) {
- var args = {};
- var pos = query.indexOf('?');
- if (pos != -1) {
- query = query.substring(pos + 1);
- }
- var pairs = query.split('&');
- for(var i in pairs) {
- var pair = pairs[i].split('=');
- // Ignore the 'q' path argument, if present.
- if (pair[0] != 'q' && pair[1]) {
- args[pair[0]] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
- }
- }
- return args;
-};
-
-/**
- * Helper function to return a view's arguments based on a path.
- */
-Drupal.Views.parseViewArgs = function (href, viewPath) {
- var returnObj = {};
- var path = Drupal.Views.getPath(href);
- // Ensure we have a correct path.
- if (viewPath && path.substring(0, viewPath.length + 1) == viewPath + '/') {
- var args = decodeURIComponent(path.substring(viewPath.length + 1, path.length));
- returnObj.view_args = args;
- returnObj.view_path = path;
- }
- return returnObj;
-};
-
-/**
- * Strip off the protocol plus domain from an href.
- */
-Drupal.Views.pathPortion = function (href) {
- // Remove e.g. http://example.com if present.
- var protocol = window.location.protocol;
- if (href.substring(0, protocol.length) == protocol) {
- // 2 is the length of the '//' that normally follows the protocol
- href = href.substring(href.indexOf('/', protocol.length + 2));
- }
- return href;
-};
-
-/**
- * Return the Drupal path portion of an href.
- */
-Drupal.Views.getPath = function (href) {
- href = Drupal.Views.pathPortion(href);
- href = href.substring(Drupal.settings.basePath.length, href.length);
- // 3 is the length of the '?q=' added to the url without clean urls.
- if (href.substring(0, 3) == '?q=') {
- href = href.substring(3, href.length);
- }
- var chars = ['#', '?', '&'];
- for (i in chars) {
- if (href.indexOf(chars[i]) > -1) {
- href = href.substr(0, href.indexOf(chars[i]));
- }
- }
- return href;
-};
-;
-// $Id: dependent.js,v 1.9.2.1 2009/11/18 02:43:47 merlinofchaos Exp $
-/**
- * @file dependent.js
- *
- * Written by dmitrig01 (Dmitri Gaskin) for Views; this provides dependent
- * visibility for form items in Views' ajax forms.
- *
- * To your $form item definition add:
- * - '#process' => array('views_process_dependency'),
- * - Add '#dependency' => array('id-of-form-item' => array(list, of, values, that,
- make, this, item, show),
- *
- * Special considerations:
- * - radios are harder. Because Drupal doesn't give radio groups individual ids,
- * use 'radio:name-of-radio'
- *
- * - Checkboxes don't have their own id, so you need to add one in a div
- * around the checkboxes via #prefix and #suffix. You actually need to add TWO
- * divs because it's the parent that gets hidden. Also be sure to retain the
- * 'expand_checkboxes' in the #process array, because the views process will
- * override it.
- */
-
-Drupal.Views = Drupal.Views || {};
-
-Drupal.Views.dependent = { bindings: {}, activeBindings: {}, activeTriggers: [] };
-
-Drupal.Views.dependent.inArray = function(array, search_term) {
- var i = array.length;
- if (i > 0) {
- do {
- if (array[i] == search_term) {
- return true;
- }
- } while (i--);
- }
- return false;
-}
-
-
-Drupal.Views.dependent.autoAttach = function() {
- // Clear active bindings and triggers.
- for (i in Drupal.Views.dependent.activeTriggers) {
- jQuery(Drupal.Views.dependent.activeTriggers[i]).unbind('change');
- }
- Drupal.Views.dependent.activeTriggers = [];
- Drupal.Views.dependent.activeBindings = {};
- Drupal.Views.dependent.bindings = {};
-
- if (!Drupal.settings.viewsAjax) {
- return;
- }
-
- // Iterate through all relationships
- for (id in Drupal.settings.viewsAjax.formRelationships) {
-
- // Drupal.Views.dependent.activeBindings[id] is a boolean,
- // whether the binding is active or not. Defaults to no.
- Drupal.Views.dependent.activeBindings[id] = 0;
- // Iterate through all possible values
- for(bind_id in Drupal.settings.viewsAjax.formRelationships[id].values) {
- // This creates a backward relationship. The bind_id is the ID
- // of the element which needs to change in order for the id to hide or become shown.
- // The id is the ID of the item which will be conditionally hidden or shown.
- // Here we're setting the bindings for the bind
- // id to be an empty array if it doesn't already have bindings to it
- if (!Drupal.Views.dependent.bindings[bind_id]) {
- Drupal.Views.dependent.bindings[bind_id] = [];
- }
- // Add this ID
- Drupal.Views.dependent.bindings[bind_id].push(id);
- // Big long if statement.
- // Drupal.settings.viewsAjax.formRelationships[id].values[bind_id] holds the possible values
-
- if (bind_id.substring(0, 6) == 'radio:') {
- var trigger_id = "input[name='" + bind_id.substring(6) + "']";
- }
- else {
- var trigger_id = '#' + bind_id;
- }
-
- Drupal.Views.dependent.activeTriggers.push(trigger_id);
-
- if (jQuery(trigger_id).attr('type') == 'checkbox') {
- $(trigger_id).parent().addClass('hidden-options');
- }
-
- var getValue = function(item, trigger) {
- if (item.substring(0, 6) == 'radio:') {
- var val = jQuery(trigger + ':checked').val();
- }
- else {
- switch (jQuery(trigger).attr('type')) {
- case 'checkbox':
- var val = jQuery(trigger).attr('checked') || 0;
-
- if (val) {
- $(trigger).parent().removeClass('hidden-options').addClass('expanded-options');
- }
- else {
- $(trigger).parent().removeClass('expanded-options').addClass('hidden-options');
- }
-
- break;
- default:
- var val = jQuery(trigger).val();
- }
- }
- return val;
- }
-
- var setChangeTrigger = function(trigger_id, bind_id) {
- // Triggered when change() is clicked.
- var changeTrigger = function() {
- var val = getValue(bind_id, trigger_id);
-
- for (i in Drupal.Views.dependent.bindings[bind_id]) {
- var id = Drupal.Views.dependent.bindings[bind_id][i];
-
- // Fix numerous errors
- if (typeof id != 'string') {
- continue;
- }
-
- // This bit had to be rewritten a bit because two properties on the
- // same set caused the counter to go up and up and up.
- if (!Drupal.Views.dependent.activeBindings[id]) {
- Drupal.Views.dependent.activeBindings[id] = {};
- }
-
- if (Drupal.Views.dependent.inArray(Drupal.settings.viewsAjax.formRelationships[id].values[bind_id], val)) {
- Drupal.Views.dependent.activeBindings[id][bind_id] = 'bind';
- }
- else {
- delete Drupal.Views.dependent.activeBindings[id][bind_id];
- }
-
- var len = 0;
- for (i in Drupal.Views.dependent.activeBindings[id]) {
- len++;
- }
-
- var object = jQuery('#' + id + '-wrapper');
- if (!object.size()) {
- object = jQuery('#' + id).parent();
- }
-
- var rel_num = Drupal.settings.viewsAjax.formRelationships[id].num;
- if (typeof rel_num === 'object') {
- rel_num = Drupal.settings.viewsAjax.formRelationships[id].num[0];
- }
-
- if (rel_num <= len) {
- // Show if the element if criteria is matched
- object.show(0);
- object.addClass('dependent-options');
- }
- else {
- // Otherwise hide
- object.hide(0);
- }
- }
- }
-
- jQuery(trigger_id).change(function() {
- // Trigger the internal change function
- // the attr('id') is used because closures are more confusing
- changeTrigger(trigger_id, bind_id);
- });
- // Trigger initial reaction
- changeTrigger(trigger_id, bind_id);
- }
- setChangeTrigger(trigger_id, bind_id);
- }
- }
-}
-
-Drupal.behaviors.viewsDependent = function (context) {
- Drupal.Views.dependent.autoAttach();
-
- // Really large sets of fields are too slow with the above method, so this
- // is a sort of hacked one that's faster but much less flexible.
- $("select.views-master-dependent:not(.views-processed)")
- .addClass('views-processed')
- .change(function() {
- var val = $(this).val();
- if (val == 'all') {
- $('.views-dependent-all').show(0);
- }
- else {
- $('.views-dependent-all').hide(0);
- $('.views-dependent-' + val).show(0);
- }
- })
- .trigger('change');
-}
-;
-// $Id: tableheader.js,v 1.16.2.2 2009/03/30 12:48:09 goba Exp $
-
-Drupal.tableHeaderDoScroll = function() {
- if (typeof(Drupal.tableHeaderOnScroll)=='function') {
- Drupal.tableHeaderOnScroll();
- }
-};
-
-Drupal.behaviors.tableHeader = function (context) {
- // This breaks in anything less than IE 7. Prevent it from running.
- if (jQuery.browser.msie && parseInt(jQuery.browser.version, 10) < 7) {
- return;
- }
-
- // Keep track of all cloned table headers.
- var headers = [];
-
- $('table.sticky-enabled thead:not(.tableHeader-processed)', context).each(function () {
- // Clone thead so it inherits original jQuery properties.
- var headerClone = $(this).clone(true).insertBefore(this.parentNode).wrap('<table class="sticky-header"></table>').parent().css({
- position: 'fixed',
- top: '0px'
- });
-
- headerClone = $(headerClone)[0];
- headers.push(headerClone);
-
- // Store parent table.
- var table = $(this).parent('table')[0];
- headerClone.table = table;
- // Finish initialzing header positioning.
- tracker(headerClone);
-
- $(table).addClass('sticky-table');
- $(this).addClass('tableHeader-processed');
- });
-
- // Define the anchor holding var.
- var prevAnchor = '';
-
- // Track positioning and visibility.
- function tracker(e) {
- // Save positioning data.
- var viewHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
- if (e.viewHeight != viewHeight) {
- e.viewHeight = viewHeight;
- e.vPosition = $(e.table).offset().top - 4;
- e.hPosition = $(e.table).offset().left;
- e.vLength = e.table.clientHeight - 100;
- // Resize header and its cell widths.
- var parentCell = $('th', e.table);
- $('th', e).each(function(index) {
- var cellWidth = parentCell.eq(index).css('width');
- // Exception for IE7.
- if (cellWidth == 'auto') {
- cellWidth = parentCell.get(index).clientWidth +'px';
- }
- $(this).css('width', cellWidth);
- });
- $(e).css('width', $(e.table).css('width'));
- }
-
- // Track horizontal positioning relative to the viewport and set visibility.
- var hScroll = document.documentElement.scrollLeft || document.body.scrollLeft;
- var vOffset = (document.documentElement.scrollTop || document.body.scrollTop) - e.vPosition;
- var visState = (vOffset > 0 && vOffset < e.vLength) ? 'visible' : 'hidden';
- $(e).css({left: -hScroll + e.hPosition +'px', visibility: visState});
-
- // Check the previous anchor to see if we need to scroll to make room for the header.
- // Get the height of the header table and scroll up that amount.
- if (prevAnchor != location.hash) {
- if (location.hash != '') {
- var offset = $('td' + location.hash).offset();
- if (offset) {
- var top = offset.top;
- var scrollLocation = top - $(e).height();
- $('body, html').scrollTop(scrollLocation);
- }
- }
- prevAnchor = location.hash;
- }
- }
-
- // Only attach to scrollbars once, even if Drupal.attachBehaviors is called
- // multiple times.
- if (!$('body').hasClass('tableHeader-processed')) {
- $('body').addClass('tableHeader-processed');
- $(window).scroll(Drupal.tableHeaderDoScroll);
- $(document.documentElement).scroll(Drupal.tableHeaderDoScroll);
- }
-
- // Track scrolling.
- Drupal.tableHeaderOnScroll = function() {
- $(headers).each(function () {
- tracker(this);
- });
- };
-
- // Track resizing.
- var time = null;
- var resize = function () {
- // Ensure minimum time between adjustments.
- if (time) {
- return;
- }
- time = setTimeout(function () {
- $('table.sticky-header').each(function () {
- // Force cell width calculation.
- this.viewHeight = 0;
- tracker(this);
- });
- // Reset timer
- time = null;
- }, 250);
- };
- $(window).resize(resize);
-};
-;
-// $Id: collapse.js,v 1.17 2008/01/29 10:58:25 goba Exp $
-
-/**
- * Toggle the visibility of a fieldset using smooth animations
- */
-Drupal.toggleFieldset = function(fieldset) {
- if ($(fieldset).is('.collapsed')) {
- // Action div containers are processed separately because of a IE bug
- // that alters the default submit button behavior.
- var content = $('> div:not(.action)', fieldset);
- $(fieldset).removeClass('collapsed');
- content.hide();
- content.slideDown( {
- duration: 'fast',
- easing: 'linear',
- complete: function() {
- Drupal.collapseScrollIntoView(this.parentNode);
- this.parentNode.animating = false;
- $('div.action', fieldset).show();
- },
- step: function() {
- // Scroll the fieldset into view
- Drupal.collapseScrollIntoView(this.parentNode);
- }
- });
- }
- else {
- $('div.action', fieldset).hide();
- var content = $('> div:not(.action)', fieldset).slideUp('fast', function() {
- $(this.parentNode).addClass('collapsed');
- this.parentNode.animating = false;
- });
- }
-};
-
-/**
- * Scroll a given fieldset into view as much as possible.
- */
-Drupal.collapseScrollIntoView = function (node) {
- var h = self.innerHeight || document.documentElement.clientHeight || $('body')[0].clientHeight || 0;
- var offset = self.pageYOffset || document.documentElement.scrollTop || $('body')[0].scrollTop || 0;
- var posY = $(node).offset().top;
- var fudge = 55;
- if (posY + node.offsetHeight + fudge > h + offset) {
- if (node.offsetHeight > h) {
- window.scrollTo(0, posY);
- } else {
- window.scrollTo(0, posY + node.offsetHeight - h + fudge);
- }
- }
-};
-
-Drupal.behaviors.collapse = function (context) {
- $('fieldset.collapsible > legend:not(.collapse-processed)', context).each(function() {
- var fieldset = $(this.parentNode);
- // Expand if there are errors inside
- if ($('input.error, textarea.error, select.error', fieldset).size() > 0) {
- fieldset.removeClass('collapsed');
- }
-
- // Turn the legend into a clickable link and wrap the contents of the fieldset
- // in a div for easier animation
- var text = this.innerHTML;
- $(this).empty().append($('<a href="#">'+ text +'</a>').click(function() {
- var fieldset = $(this).parents('fieldset:first')[0];
- // Don't animate multiple times
- if (!fieldset.animating) {
- fieldset.animating = true;
- Drupal.toggleFieldset(fieldset);
- }
- return false;
- }))
- .after($('<div class="fieldset-wrapper"></div>')
- .append(fieldset.children(':not(legend):not(.action)')))
- .addClass('collapse-processed');
- });
-};
-;
-Drupal.behaviors.Drupalorg = function () {
- var $element = $('body:not(.drupalorg-front) #edit-search-theme-form-1'),
- value = Drupal.t('Search Drupal.org');
-
- // Add focus/blur label behavior to search box.
- $element.bind('focus', function () {
- if ($element.val() === value) {
- $element.val('').addClass('has-value');
- }
- });
- $element.bind('blur', function () {
- if ($element.val() === '' || $element.val() === value) {
- $element.val(value).removeClass('has-value');
- }
- else {
- $element.addClass('has-value');
- }
- });
- $element.trigger('blur');
-
- // Move right column out of the way of wide tables used on API.drupal.org and
- // forums.
- if ($('#column-left.grid-8').length === 1) {
- var delta = 0;
- $('#column-left table').each(function() {
- delta = Math.max(delta, $(this).width());
- });
- delta -= $('#column-left').width();
- if (delta > 0) {
- $('#page-inner').width($('#page-inner').width() + delta);
- $('#column-left').width($('#column-left').width() + delta);
- }
- }
-};
-;
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/editabledropdown.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/editabledropdown.js
deleted file mode 100644
index 6511d8a0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/editabledropdown.js
+++ /dev/null
@@ -1,363 +0,0 @@
-//Common functions for all dropdowns
- /*----------------------------------------------
- The Common function used for all dropdowns are:
- -----------------------------------------------
- -- function fnKeyDownHandler(getdropdown, e)
- -- function fnLeftToRight(getdropdown)
- -- function fnRightToLeft(getdropdown)
- -- function fnDelete(getdropdown)
- -- function FindKeyCode(e)
- -- function FindKeyChar(e)
- -- function fnSanityCheck(getdropdown)
-
- --------------------------- */
-
- function fnKeyDownHandler(getdropdown, e) {
-
- fnSanityCheck(getdropdown);
-
- // Press [ <- ] and [ -> ] arrow keys on the keyboard to change alignment/flow.
- // ...go to Start : Press [ <- ] Arrow Key
- // ...go to End : Press [ -> ] Arrow Key
- // (this is useful when the edited-text content exceeds the ListBox-fixed-width)
- // This works best on Internet Explorer, and not on Netscape
-
- var vEventKeyCode = FindKeyCode(e);
- // Press left/right arrow keys
- if(vEventKeyCode == 37) {
- fnLeftToRight(getdropdown);
- }
- if(vEventKeyCode == 39) {
- fnRightToLeft(getdropdown);
- }
-
- // Delete key pressed
- if(vEventKeyCode == 46) {
- fnDelete(getdropdown);
- }
-
- // backspace key pressed
- if(vEventKeyCode == 8 || vEventKeyCode==127) {
- if(e.which) { //Netscape
- //e.which = ''; //this property has only a getter.
- } else { //Internet Explorer
- //To prevent backspace from activating the -Back- button of the browser
- e.keyCode = '';
- if(window.event.keyCode) {
- window.event.keyCode = '';
- }
- }
- return true;
- }
- // Tab key pressed, use code below to reorient to Left-To-Right flow, if needed
- //if(vEventKeyCode == 9)
- //{
- // fnLeftToRight(getdropdown);
- //}
- } // function fnKeyDownHandler
-
- function fnLeftToRight(getdropdown) {
- getdropdown.style.direction = "ltr";
- } //function fnLeftToRight
-
- function fnRightToLeft(getdropdown) {
- getdropdown.style.direction = "rtl";
- } //function fnRightToLeft
-
- function fnDelete(getdropdown) {
- if(getdropdown.options.length != 0) { // if dropdown is not empty
- if (getdropdown.options.selectedIndex == vEditableOptionIndex_A) { // if option the Editable field
- getdropdown.options[getdropdown.options.selectedIndex].text = '';
- //getdropdown.options[getdropdown.options.selectedIndex].value = ''; //Use this line only if want to change the internal value too; else this line is not required.
- }
- }
- } // function fnDelete
-
-
- /*
- Since Internet Explorer and Netscape have different
- ways of returning the key code, displaying keys
- browser-independently is a bit harder.
- However, you can create a script that displays keys
- for either browser.
- The following function will display each key
- in the status line:
-
- The "FindKey.." function receives the "event" object
- from the event handler and stores it in the variable "e".
- It checks whether the "e.which" property exists (for Netscape),
- and stores it in the "keycode" variable if present.
- Otherwise, it assumes the browser is Internet Explorer
- and assigns to keycode the "e.keyCode" property.
- */
-
- function FindKeyCode(e) {
- if(e.which) {
- keycode=e.which; //Netscape
- } else {
- keycode=e.keyCode; //Internet Explorer
- }
- //alert("FindKeyCode"+ keycode);
- return keycode;
- } // function FindKeyCode
-
- function FindKeyChar(e) {
- keycode = FindKeyCode(e);
- if((keycode==8)||(keycode==127)) {
- character="backspace"
- }
- else if((keycode==46)) {
- character="delete"
- }
- else {
- character=String.fromCharCode(keycode);
- }
- //alert("FindKey"+ character);
- return character;
- } // function FindKeyChar
-
- function fnSanityCheck(getdropdown) {
- if(vEditableOptionIndex_A>(getdropdown.options.length-1)) {
- alert("PROGRAMMING ERROR: The value of variable vEditableOptionIndex_... cannot be greater than (length of dropdown - 1)");
- return false;
- }
- }
-
- //Dropdown specific functions, which manipulate dropdown specific global variables
-
- /*----------------------------------------------
- Dropdown specific global variables are:
- -----------------------------------------------
- 1) vEditableOptionIndex_A --> this needs to be set by Programmer!! See explanation.
- 2) vEditableOptionText_A --> this needs to be set by Programmer!! See explanation.
- 3) vPreviousSelectIndex_A
- 4) vSelectIndex_A
- 5) vSelectChange_A
-
- --------------------------- */
-
- /*----------------------------------------------
- The dropdown specific functions
- (which manipulate dropdown specific global variables)
- used by all dropdowns are:
- -----------------------------------------------
- 1) function fnChangeHandler_A(getdropdown)
- 2) function fnKeyPressHandler_A(getdropdown, e)
- 3) function fnKeyUpHandler_A(getdropdown, e)
-
- --------------------------- */
-
- /*------------------------------------------------
- IMPORTANT: Global Variable required to be SET by programmer
- -------------------------- */
-
- var vEditableOptionIndex_A = 0;
-
- // Give Index of Editable option in the dropdown.
- // For eg.
- // if first option is editable then vEditableOptionIndex_A = 0;
- // if second option is editable then vEditableOptionIndex_A = 1;
- // if third option is editable then vEditableOptionIndex_A = 2;
- // if last option is editable then vEditableOptionIndex_A = (length of dropdown - 1).
- // Note: the value of vEditableOptionIndex_A cannot be greater than (length of dropdown - 1)
-
- var vEditableOptionText_A = "Custom";
-
- // Give the default text of the Editable option in the dropdown.
- // For eg.
- // if the editable option is <option ...>--?--</option>,
- // then set vEditableOptionText_A = "--?--";
-
- /*------------------------------------------------
- Global Variables required for
- fnChangeHandler_A(), fnKeyPressHandler_A() and fnKeyUpHandler_A()
- for Editable Dropdowns
- -------------------------- */
-
- var vPreviousSelectIndex_A = 0;
- // Contains the Previously Selected Index, set to 0 by default
-
- var vSelectIndex_A = 0;
- // Contains the Currently Selected Index, set to 0 by default
-
- var vSelectChange_A = 'MANUAL_CLICK';
- // Indicates whether Change in dropdown selected option
- // was due to a Manual Click
- // or due to System properties of dropdown.
-
- // vSelectChange_A = 'MANUAL_CLICK' indicates that
- // the jump to a non-editable option in the dropdown was due
- // to a Manual click (i.e.,changed on purpose by user).
-
- // vSelectChange_A = 'AUTO_SYSTEM' indicates that
- // the jump to a non-editable option was due to System properties of dropdown
- // (i.e.,user did not change the option in the dropdown;
- // instead an automatic jump happened due to inbuilt
- // dropdown properties of browser on typing of a character )
-
- /*------------------------------------------------
- Functions required for Editable Dropdowns
- -------------------------- */
-
- function fnChangeHandler_A(getdropdown, e) {
- fnSanityCheck(getdropdown);
-
- vPreviousSelectIndex_A = vSelectIndex_A;
- // Contains the Previously Selected Index
-
- vSelectIndex_A = getdropdown.options.selectedIndex;
- // Contains the Currently Selected Index
-
- if ((vPreviousSelectIndex_A == (vEditableOptionIndex_A)) && (vSelectIndex_A != (vEditableOptionIndex_A))&&(vSelectChange_A != 'MANUAL_CLICK')) { // To Set value of Index variables -
- getdropdown[(vEditableOptionIndex_A)].selected=true;
- vPreviousSelectIndex_A = vSelectIndex_A;
- vSelectIndex_A = getdropdown.options.selectedIndex;
- vSelectChange_A = 'MANUAL_CLICK';
- // Indicates that the Change in dropdown selected
- // option was due to a Manual Click
- }
- } // function fnChangeHandler_A
-
- function fnKeyPressHandler_A(getdropdown, e) {
- fnSanityCheck(getdropdown);
-
- keycode = FindKeyCode(e);
- keychar = FindKeyChar(e);
-
- // Check for allowable Characters
- // The various characters allowable for entry into Editable option..
- // may be customized by minor modifications in the code (if condition below)
- // (you need to know the keycode/ASCII value of the character to be allowed/disallowed.
- // -
-
- if ((keycode>47 && keycode<59)||(keycode>62 && keycode<127) ||(keycode==32)) {
- var vAllowableCharacter = "yes";
- }
- else {
- var vAllowableCharacter = "no";
- }
-
- //alert(window); alert(window.event);
-
- if(getdropdown.options.length != 0) {
- // if dropdown is not empty
- if (getdropdown.options.selectedIndex == (vEditableOptionIndex_A)) {
- // if selected option the Editable option of the dropdown
-
- var vEditString = getdropdown[vEditableOptionIndex_A].text;
-
- // make Editable option Null if it is being edited for the first time
- if((vAllowableCharacter == "yes")||(keychar=="backspace")) {
- if (vEditString == vEditableOptionText_A)
- vEditString = "";
- }
- if (keychar=="backspace") {
- // To handle backspace -
- vEditString = vEditString.substring(0,vEditString.length-1);
- // Decrease length of string by one from right
-
- vSelectChange_A = 'MANUAL_CLICK';
- // Indicates that the Change in dropdown selected
- // option was due to a Manual Click
-
- }
- //alert("EditString2:"+vEditString);
-
- if (vAllowableCharacter == "yes") {
- // To handle addition of a character -
- vEditString+=String.fromCharCode(keycode);
- // Concatenate Enter character to Editable string
-
- // The following portion handles the "automatic Jump" bug
- // The "automatic Jump" bug (Description):
- // If a alphabet is entered (while editing)
- // ...which is contained as a first character in one of the read-only options
- // ..the focus automatically "jumps" to the read-only option
- // (-- this is a common property of normal dropdowns
- // ..but..is undesirable while editing).
-
- var i=0;
- var vEnteredChar = String.fromCharCode(keycode);
- var vUpperCaseEnteredChar = vEnteredChar;
- var vLowerCaseEnteredChar = vEnteredChar;
-
-
- if(((keycode)>=97)&&((keycode)<=122))
- // if vEnteredChar lowercase
- vUpperCaseEnteredChar = String.fromCharCode(keycode - 32);
- // This is UpperCase
-
-
- if(((keycode)>=65)&&((keycode)<=90))
- // if vEnteredChar is UpperCase
- vLowerCaseEnteredChar = String.fromCharCode(keycode + 32);
- // This is lowercase
-
- if(e.which) { //For Netscape
- // Compare the typed character (into the editable option)
- // with the first character of all the other
- // options (non-editable).
-
- // To note if the jump to the non-editable option was due
- // to a Manual click (i.e.,changed on purpose by user)
- // or due to System properties of dropdown
- // (i.e.,user did not change the option in the dropdown;
- // instead an automatic jump happened due to inbuilt
- // dropdown properties of browser on typing of a character )
-
- for (i=0;i<=(getdropdown.options.length-1);i++)
- {
- if(i!=vEditableOptionIndex_A)
- {
- var vReadOnlyString = getdropdown[i].text;
- var vFirstChar = vReadOnlyString.substring(0,1);
- if((vFirstChar == vUpperCaseEnteredChar)||(vFirstChar == vLowerCaseEnteredChar))
- {
- vSelectChange_A = 'AUTO_SYSTEM';
- // Indicates that the Change in dropdown selected
- // option was due to System properties of dropdown
- break;
- }
- else
- {
- vSelectChange_A = 'MANUAL_CLICK';
- // Indicates that the Change in dropdown selected
- // option was due to a Manual Click
- }
- }
- }
- }
- }
-
- // Set the new edited string into the Editable option
- getdropdown.options[vEditableOptionIndex_A].text = vEditString;
- //getdropdown.options[vEditableOptionIndex_A].value = vEditString; //Use this line only if want to change the internal value too; else this line is not required.
-
- return false;
- }
- }
- return true;
- }
-
- function fnKeyUpHandler_A(getdropdown, e) {
- fnSanityCheck(getdropdown);
-
- if(e.which) { // Netscape
- if(vSelectChange_A == 'AUTO_SYSTEM') {
- // if editable dropdown option jumped while editing
- // (due to typing of a character which is the first character of some other option)
- // then go back to the editable option.
- getdropdown[(vEditableOptionIndex_A)].selected=true;
- }
-
- var vEventKeyCode = FindKeyCode(e);
- // if [ <- ] or [ -> ] arrow keys are pressed, select the editable option
- if((vEventKeyCode == 37)||(vEventKeyCode == 39)) {
- getdropdown[vEditableOptionIndex_A].selected=true;
- }
- }
- }
-
-/*-------------------------------------------------------------------------------------------- */
-
-<!--end of script for dropdown lstDropDown_A --> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/gmap.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/gmap.js
deleted file mode 100644
index ba214f61..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/gmap.js
+++ /dev/null
@@ -1,634 +0,0 @@
-var map;
-var popupTable;
-var networkOverlay;
-var selectedNetworkOverlay;
-var flashTimeout;
-//var infoDiv;
-var mainInfoDiv;
-var locationInfoDiv;
-var loadingAnimationDiv;
-var geocoder;
-var addressMarker;
-var popupDiv;
-//var novaButton;
-
-function novaMapInit() {
- if (GBrowserIsCompatible()) {
- var dmap = document.getElementById("map");
- map = new GMap2(dmap);
- var defaultCenterLongitude = document.getElementById("defaultCenterLongitude").value;
- var defaultCenterLatitude = document.getElementById("defaultCenterLatitude").value;
- var defaultZoomLevel = document.getElementById("defaultZoomLevel").value * 1;
-
- map.setCenter(new GLatLng(defaultCenterLatitude, defaultCenterLongitude), defaultZoomLevel);
-
- map.enableScrollWheelZoom();
- map.enableContinuousZoom();
- map.addControl(new GLargeMapControl());
- map.addControl(new GMapTypeControl());
-
- geocoder = new GClientGeocoder();
-
- GEvent.addListener(map, "dragend", mapDragEnd);
- GEvent.addListener(map, "zoomend", mapZoomChanged);
- GEvent.addListener(map, "click", mapClicked);
- GEvent.addListener(map, "moveend", mapMoveEnd)
- GEvent.addListener(map, "singlerightclick", mapRightClicked);
- GEvent.addListener(map, "mousemove", function(latlng) {
- locationInfoDiv.innerHTML = latlng.lng().toFixed(3) + ", " + latlng.lat().toFixed(3);
- });
-
- var n = document.getElementById("popupmenudiv2");
- popupDiv = n.cloneNode(true);
- map.getContainer().appendChild(popupDiv);
-
- popupTable = document.getElementById("popupmenudivtb");
-
- // detail info div
- /*infoDiv = document.createElement("div");
- infoDiv.style.display = "none";
- infoDiv.style.position = "absolute";
- infoDiv.style.overflow = "auto";
- infoDiv.style.top = "0px";
- infoDiv.style.left = "0px";
- infoDiv.style.zIndex = "1001";
- infoDiv.style.border = "1px outset #000";
- infoDiv.style.background = "#C6DEFF";
- infoDiv.style.height = "150px";
- infoDiv.style.width = "300px";
- infoDiv.align = "center";*/
-
- mainInfoDiv = document.createElement("div");
- mainInfoDiv.style.display = "none";
- mainInfoDiv.style.position = "absolute";
- mainInfoDiv.style.overflow = "auto";
- mainInfoDiv.style.top = "0px";
- mainInfoDiv.style.left = "0px";
- mainInfoDiv.style.zIndex = "1001";
- mainInfoDiv.style.border = "1px outset #000";
- mainInfoDiv.style.background = "#C6DEFF";
- mainInfoDiv.style.height = "150px";
- mainInfoDiv.style.width = "300px";
- mainInfoDiv.align = "center";
-
- //mainInfoDiv = infoDiv.appendChild(document.createElement("div"));
- mainInfoDiv.style.overflow = "auto";
- mainInfoDiv.style.height = "150px";
- mainInfoDiv.style.width = "300px";
- //mainInfoDiv.align = "center";
-
- /*var closeInfoDiv = infoDiv.appendChild(document.createElement("div"));
- closeInfoDiv.appendChild(document.createTextNode("Close"));
-
- closeInfoDiv.style.background = "#FFFFF0";
- closeInfoDiv.style.color = "black";
- closeInfoDiv.style.fontFamily = "Verdana";
- closeInfoDiv.style.fontSize = "12px";
- closeInfoDiv.style.fontWeight= "bold";
- closeInfoDiv.style.border = "2px solid black";
- closeInfoDiv.style.padding = "0px";
- closeInfoDiv.style.marginBottom = "0px";
- closeInfoDiv.style.textAlign = "center";
- closeInfoDiv.style.width = "80px";
- closeInfoDiv.style.height = "15px";
- closeInfoDiv.style.cursor = "pointer";
-
- GEvent.addDomListener(closeInfoDiv, "click", function() {
- infoDiv.style.display = "none";
- }); */
-
- // longitude latitude div
- var locationInfoWidth = 200;
- var locationInfoHeight = 15;
- locationInfoDiv = document.createElement("div");
- locationInfoDiv.style.display = "inline";
- locationInfoDiv.style.position = "absolute";
- locationInfoDiv.style.zIndex = "1";
- locationInfoDiv.style.height = locationInfoHeight + "px";
- locationInfoDiv.style.width = locationInfoWidth + "px";
- locationInfoDiv.align = "center";
- locationInfoDiv.style.color = "#4CC417";
- locationInfoDiv.style.fontWeight = "bold";
- locationInfoDiv.appendChild(document.createTextNode("Longitude Latitude"));
-
- var mapWidth = map.getSize().width;
- var mapHeight = map.getSize().height;
-
- locationInfoDiv.style.top = (mapHeight - locationInfoHeight - 5) + "px";
- locationInfoDiv.style.left = (mapWidth / 2 - locationInfoWidth / 2) + "px";
-
- // loading image animation
- loadingAnimationDiv = document.createElement("div");
- loadingAnimationDiv.style.position = "absolute";
- loadingAnimationDiv.style.zIndex = "100000";
- loadingAnimationDiv.style.display = "none";
- loadingAnimationDiv.style.width = "50px";
- loadingAnimationDiv.style.height = "50px";
- loadingAnimationDiv.style.top = (mapHeight / 2 - 50 / 2) + "px";
- loadingAnimationDiv.style.left = (mapWidth / 2 - 50 / 2) + "px";
- var imgDiv = loadingAnimationDiv.appendChild(document.createElement("img"));
- imgDiv.src = document.getElementById("imgFolder").value + "loading.gif";
-
-
- //map.getContainer().appendChild(infoDiv);
- map.getContainer().appendChild(mainInfoDiv);
- map.getContainer().appendChild(locationInfoDiv);
- map.getContainer().appendChild(loadingAnimationDiv);
- updateImage(0);
- }
-}
-
-function mapRightClicked(point, src) {
- var latlng = map.fromContainerPixelToLatLng(new GPoint(point.x , point.y));
- alert(latlng.lng() + ", " + latlng.lat());
-}
-/*
-function searchObject(searchInput, searchType, exactMatch, clickX, clickY) {
- loadingAnimationDiv.style.display = "inline";
- var baseURL = document.getElementById("baseURL").value;
- //var url = baseURL + "/gmap_controller.htm?action=searchObject";
- //var url = baseURL + "report.gmap.search_object";
- var url = baseURL + "/gmapservlet?action=searchObject&nextpage=report.gmap.search_object";
- url += "&search_input=" + searchInput;
- url += "&search_type=" + searchType;
- url += "&exact_match=" + exactMatch;
- url += "&object_type=CELLSITE";
-
- if (clickX == null || clickY == null) {
- var mapWidth = map.getSize().width;
- var mapHeight = map.getSize().height;
- clickX = mapWidth / 2;
- clickY = mapHeight / 2;
- }
-
- url += "&client_x=" + clickX;
- url += "&client_y=" + clickY;
-
- new Ajax.Request(url, {
- method: 'get',
- onSuccess: function(transport) {
- loadingAnimationDiv.style.display = "none";
- var jsonData = transport.responseText.evalJSON();
- var list = jsonData.list;
-
- if (list == null) {
- alert("Not found");
- }
- else {
- if (list.length == 1) {
- var longitude = list[0].longitude;
- var latitude = list[0].latitude;
- map.setCenter(new GLatLng(latitude, longitude));
- updateImage(0);
- }
- else {
- for (var i = popupTable.childNodes.length - 1; i >= 0; i--) {
- popupTable.removeChild(popupTable.lastChild);
- }
-
- for (var i = 0; i < list.length; i++) {
- var tr = popupTable.appendChild(document.createElement("tr"));
- var td = tr.appendChild(document.createElement("td"));
- td.appendChild(document.createTextNode(list[i].type + "(" + list[i].numberOfT1 +
- "): " + list[i].id));
- td.style.border = "solid";
- td.style.borderWidth = "thin";
- td.style.borderRight = "none";
- td.style.borderLeft = "none";
-
- if (i == 0) {
- td.style.borderTop = "none";
- }
-
- if (i == list.length - 1) {
- td.style.borderBottom = "none";
- }
-
- td.style.color = "#0000FF";
- td.style.background = "#FFFFF0";
- td.style.fontSize = "12px";
- td.font = "Arial,Helvetica,sans-serif";
- td.id = list[i].latitude + ">>" + list[i].longitude;
-
- td.onmouseover = function(e) {
- this.style.background = "#0000FF";
- this.style.color = "#FFFFF0";
- }
-
- td.onmouseout = function(e) {
- this.style.background = "#FFFFF0";
- this.style.color = "#0000FF";
- }
-
- td.onclick = function(e) {
- //var popupDiv = document.getElementById("popupmenudiv");
- popupDiv.style.display = "none";
- var latitudeLongitude = this.id.split(">>");
- var latlng = new GLatLng(latitudeLongitude[0], latitudeLongitude[1]);
- map.setCenter(latlng);
- updateImage(0);
- }
- }
-
- //var popupDiv = document.getElementById("popupmenudiv");
- popupDiv.style.display = "";
-
- var textWidth = popupDiv.offsetWidth;
- var textHeight = popupDiv.offsetHeight;
-
- if (textHeight >= 200) {
- popupDiv.style.overflow = "auto";
- popupDiv.style.height = "200px";
- textHeight = 200;
- }
-
- if (textWidth >= 250) {
- popupDiv.style.width = "250px";
- //textWidth = 250;
- }
-
- var clientX = jsonData.clientX;
- var clientY = jsonData.clientY;
-
- if ((clientX * 1 + textWidth + 20) >= screen.availWidth) {
- clientX = clientX - textWidth - 20;
- }
-
- if ((clientY * 1 + textHeight) >= document.getElementById("map").offsetHeight) {
- clientY = document.getElementById("map").offsetHeight - textHeight;
-
- }
-
- popupDiv.style.top = clientY + "px";
- popupDiv.style.left = clientX + "px";
- }
- }
- }
- });
-}
-*/
-function getInfo(info, x, y) {
- var baseURL = document.getElementById("baseURL").value;
- //var url = baseURL + "/gmap_controller.htm?action=getInfo";
- //var url = baseURL + "report.gmap.get_info";
- var url = baseURL + "/gmapservlet?action=getInfo&nextpage=report.gmap.get_info";
- url += "&info=" + info;
- url += "&client_x=" + x;
- url += "&client_y=" + y;
-
- new Ajax.Request(url, {
- method: 'get',
- onSuccess: function(transport) {
- var jsonData = transport.responseText.evalJSON();
- var clientX = jsonData.clientX;
- var clientY = jsonData.clientY;
- var attributes = jsonData.attributes;
-
- for (var i = mainInfoDiv.childNodes.length - 1; i >= 0; i--) {
- mainInfoDiv.removeChild(mainInfoDiv.lastChild);
- }
-
- mainInfoDiv.align="left";
- var menuUL = mainInfoDiv.appendChild(document.createElement("ul"));
- var menuItem = document.createElement("li");
- menuItem.appendChild(document.createTextNode("Row : " + jsonData.id));
- menuUL.appendChild(menuItem);
-
- menuItem = document.createElement("li");
- menuItem.appendChild(document.createTextNode("Longitude: " + jsonData.longitude));
- menuUL.appendChild(menuItem);
-
- menuItem = document.createElement("li");
- menuItem.appendChild(document.createTextNode("Latitude: " + jsonData.latitude));
- menuUL.appendChild(menuItem);
-
- var table = mainInfoDiv.appendChild(document.createElement("table"));
- table.width="100%";
- table.align="left";
- var tbody = table.appendChild(document.createElement("tbody"));
- //tbody.style.borderCollapse = "collapse";
- //var tr = tbody.appendChild(document.createElement("tr"));
- var td;
- for (var i = 0; i < attributes.length ; i++) {
- tr = tbody.appendChild(document.createElement("tr"));
- td = tr.appendChild(document.createElement("td"));
- td.align="left";
- td.width="25%"
- td.style.padding = "2px";
- td.appendChild(document.createTextNode(attributes[i].key));
- td = tr.appendChild(document.createElement("td"));
- td.style.padding = "2px";
- td.appendChild(document.createTextNode(attributes[i].value));
- }
-
- var textWidth = 300;
- var textHeight = 150 + 15;
-
- if ((clientX * 1 + textWidth + 20) >= screen.availWidth) {
- clientX = clientX - textWidth - 20;
- }
-
- if ((clientY * 1 + textHeight) >= document.getElementById("map").offsetHeight) {
- clientY = document.getElementById("map").offsetHeight - textHeight;
- }
-
- mainInfoDiv.style.top = clientY + "px";
- mainInfoDiv.style.left = clientX + "px";
- mainInfoDiv.style.display = "inline";
- }
- });
-}
-
-function mapClicked(overlay, latlng, overlaylatlng) {
- var baseURL = document.getElementById("baseURL").value;
- //var url = baseURL + "/gmap_controller.htm?action=singleLeftClick";
- //var url = baseURL + "report.gmap.single_left_click";
- var url = baseURL + "/gmapservlet?action=singleLeftClick&nextpage=report.gmap.single_left_click";
- var mapSize = map.getSize();
- var mapBounds = map.getBounds();
- var pointSW = mapBounds.getSouthWest();
- var pointNE = mapBounds.getNorthEast();
- url += "&click_longitude=" + latlng.lng();
- url += "&click_latitude=" + latlng.lat();
- url += "&zoom_level=" + map.getZoom();
- url += "&map_size=" + mapSize.width + "," + mapSize.height;
- url += "&map_bounds=" + pointSW.lng() + "," + pointSW.lat() + "," + pointNE.lng() + "," + pointNE.lat();
- var point = map.fromLatLngToContainerPixel(latlng);
- var clickX = point.x;
- var clickY = point.y;
- url += "&client_x=" + clickX;
- url += "&client_y=" + clickY;
-
- //document.getElementById("popupmenudiv").style.display = "none";
- popupDiv.style.display="none";
- mainInfoDiv.style.display="none";
- new Ajax.Request(url, {
- method: 'get',
- onSuccess: function(transport) {
- var jsonData = transport.responseText.evalJSON();
- var list = jsonData.list;
- var selectedImageURL = jsonData.selectedImageURL;
- var legendImageURL = jsonData.legendImageURL;
- //alert(legendImageURL);
- if (legendImageURL != null) {
- repaintLegend(legendImageURL);
- }
-
- if (list != null) {
- for (var i = popupTable.childNodes.length - 1; i >= 0; i--) {
- popupTable.removeChild(popupTable.lastChild);
- }
-
- for (var i = 0; i < list.length; i++) {
- var tr = popupTable.appendChild(document.createElement("tr"));
- var td = tr.appendChild(document.createElement("td"));
- td.appendChild(document.createTextNode("Row : " + list[i].id));
- td.style.border = "solid";
- td.style.borderWidth = "thin";
- td.style.borderRight = "none";
- td.style.borderLeft = "none";
-
- if (i == 0) {
- td.style.borderTop = "none";
- }
-
- if (i == list.length - 1) {
- td.style.borderBottom = "none";
- }
-
- td.style.color = "#0000FF";
- td.style.background = "#FFFFF0";
- td.style.fontSize = "12px";
- td.font = "Arial,Helvetica,sans-serif";
- td.id = jsonData.type + ">>" + list[i].id + ">>" + list[i].type;
-
- td.onmouseover = function(e) {
- this.style.background = "#0000FF";
- this.style.color = "#FFFFF0";
- }
-
- td.onmouseout = function(e) {
- this.style.background = "#FFFFF0";
- this.style.color = "#0000FF";
- }
-
- td.onclick = function(e) {
- //var popupDiv = document.getElementById("popupmenudiv");
- getInfo(this.id, clickX, clickY);
-
- popupDiv.style.display = "none";
- }
- }
-
- //var popupDiv = document.getElementById("popupmenudiv");
- popupDiv.style.display = "";
-
- var textWidth = popupDiv.offsetWidth;
- var textHeight = popupDiv.offsetHeight;
-
- if (textHeight >= 200) {
- popupDiv.style.overflow = "auto";
- popupDiv.style.height = "200px";
- textHeight = 200;
- }
-
- if (textWidth >= 250) {
- popupDiv.style.width = "250px";
- //textWidth = 250;
- }
-
- var clientX = jsonData.clientX;
- var clientY = jsonData.clientY;
-
- if ((clientX * 1 + textWidth + 20) >= screen.availWidth) {
- clientX = clientX - textWidth - 20;
- }
-
- if ((clientY * 1 + textHeight) >= document.getElementById("map").offsetHeight) {
- clientY = document.getElementById("map").offsetHeight - textHeight;
-
- }
-
- popupDiv.style.top = clientY + "px";
- popupDiv.style.left = clientX + "px";
- }
- else if (selectedImageURL != null) {
- repaintSelected(selectedImageURL);
- }
- }
- });
-}
-
-//new changes
-
-function mapMoveEnd() {
- if (networkOverlay != null) {
- map.removeOverlay(networkOverlay);
- networkOverlay = null;
- }
-
-
- updateImage(0);
-}
-
-function mapDragEnd() {
-}
-
-function mapZoomChanged(oldZoomLevel, newZoomLevel) {
-}
-/*
-function updateSelectedImage() {
- var baseURL = document.getElementById("baseURL").value;
- var url = baseURL + "/gmap_controller.htm?action=nova.gmap.fetch.selected.image";
- var mapSize = map.getSize();
- var mapBounds = map.getBounds();
- var pointSW = mapBounds.getSouthWest();
- var pointNE = mapBounds.getNorthEast();
- url += "&zoomLevel=" + map.getZoom();
- url += "&mapSize=" + mapSize.width + "," + mapSize.height;
- url += "&mapBounds=" + pointSW.lng() + "," + pointSW.lat() + "," + pointNE.lng() + "," + pointNE.lat();
-
- new Ajax.Request(url, {
- method: 'get',
- asynchronous: false,
- onSuccess: function(transport) {
- var url = transport.responseXML.getElementsByTagName("image-url")[0].childNodes[0].nodeValue;
-
- if (url != null) {
- repaintSelected(url);
- }
- }
- });
-}
-*/
-
-function updateImage(incDecValue) {
- //alert();
- loadingAnimationDiv.style.display = "inline";
- var baseURL = document.getElementById("baseURL").value;
- //var url = baseURL + "/gmap_controller.htm?action=getImage";
- //var url = baseURL + "report.gmap.get_image";
- var url = baseURL + "/gmapservlet?action=getImage&nextpage=report.gmap.get_image";
- var mapSize = map.getSize();
- var mapBounds = map.getBounds();
- var pointSW = mapBounds.getSouthWest();
- var pointNE = mapBounds.getNorthEast();
- url += "&zoom_level=" + map.getZoom();
- url += "&map_size=" + mapSize.width + "," + mapSize.height;
- url += "&map_bounds=" + pointSW.lng() + "," + pointSW.lat() + "," + pointNE.lng() + "," + pointNE.lat();
- url += "&increment_decrement_value=" + incDecValue;
- url += "&selected_layer_list=" + document.getElementById("selectedLayerList").value;
- url += "&color_list=" + document.getElementById("colorList").value;
- var randomNumber = Math.floor(Math.random() * 5000000)
- url += "&dummy=" + randomNumber;
-
- //disableUserInput();
- new Ajax.Request(url, {
- method: 'get',
- onSuccess: function(transport) {
-
- loadingAnimationDiv.style.display = "none";
- var jsonData = transport.responseText.evalJSON();
- var imageURL = jsonData.imageURL;
- var legendImageURL = jsonData.legendImageURL;
- var selectedImageURL = jsonData.selectedImageURL;
- var currentMonth = jsonData.currentMonth;
- var colorList = jsonData.colorList;
- var selectedLayerList = jsonData.selectedLayerList;
-
- if (legendImageURL != null) {
- repaintLegend(legendImageURL);
- }
- if (imageURL != null) {
- repaint(imageURL);
- }
-
- if (selectedImageURL != null) {
- repaintSelected(selectedImageURL);
- }
-
- if (currentMonth != null) {
- document.getElementById("currentMonthDiv").innerHTML = currentMonth;
- }
-
- if (colorList != null) {
- document.getElementById("colorList").value = colorList;
- document.getElementById("selectedLayerList").value = selectedLayerList;
- NovaButton.prototype.initializeLayerDiv(NovaButton.globals.layerOptionContainer);
- }
-
-
- }
- });
-}
-
- function repaintLegend(url) {
- var mapLegend = document.getElementById("mapLegend");
- var legendImg = document.getElementById("legendImg");
-
- mapLegend.removeChild(legendImg);
- var newpic=document.createElement('img');
- newpic.src=url;
- newpic.id="legendImg";
- //alert(url);
- mapLegend.appendChild(newpic);
-
- }
-
-
-function repaint(url) {
- if (networkOverlay != null) {
- map.removeOverlay(networkOverlay);
- }
-
- networkOverlay = new ProjectedOverlay(url, map.getBounds()) ;
- map.addOverlay(networkOverlay);
-}
-
-function repaintSelected(url) {
- var mapBounds = map.getBounds();
- var pointSW = mapBounds.getSouthWest();
- var pointNE = mapBounds.getNorthEast();
-
- if (selectedNetworkOverlay != null) {
- map.removeOverlay(selectedNetworkOverlay);
- }
-
- selectedNetworkOverlay = new GGroundOverlay(url, new GLatLngBounds(pointSW, pointNE)) ;
- map.addOverlay(selectedNetworkOverlay);
-
- if (flashTimeout != null) {
- clearTimeout(flashTimeout);
- }
-
- flashImage();
-}
-
-function flashImage() {
- if (selectedNetworkOverlay.isHidden()) {
- selectedNetworkOverlay.show();
- }
- else {
- selectedNetworkOverlay.hide();
- }
-
- flashTimeout = setTimeout(flashImage, 500);
-}
-
-function disableUserInput() {
- map.disableDragging();
- map.disableDoubleClickZoom();
- map.disableScrollWheelZoom();
- map.disableContinuousZoom();
-}
-
-function enableUserInput() {
- map.enableDragging();
- map.enableDoubleClickZoom();
- map.enableScrollWheelZoom();
- map.enableContinuousZoom();
-}
-
-String.prototype.trim = function() {
- return this.replace(/^\s+|\s+$/g, "");
-} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.js
deleted file mode 100644
index 462cde56..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.js
+++ /dev/null
@@ -1,4376 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.3.2
- * http://jquery.com/
- *
- * Copyright (c) 2009 John Resig
- * Dual licensed under the MIT and GPL licenses.
- * http://docs.jquery.com/License
- *
- * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
- * Revision: 6246
- */
-(function(){
-
-var
- // Will speed up references to window, and allows munging its name.
- window = this,
- // Will speed up references to undefined, and allows munging its name.
- undefined,
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- jQuery = window.jQuery = window.$ = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context );
- },
-
- // A simple way to check for HTML strings or ID strings
- // (both of which we optimize for)
- quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
- // Is it a simple selector
- isSimple = /^.[^:#\[\.,]*$/;
-
-jQuery.fn = jQuery.prototype = {
- init: function( selector, context ) {
- // Make sure that a selection was provided
- selector = selector || document;
-
- // Handle $(DOMElement)
- if ( selector.nodeType ) {
- this[0] = selector;
- this.length = 1;
- this.context = selector;
- return this;
- }
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- // Are we dealing with HTML string or an ID?
- var match = quickExpr.exec( selector );
-
- // Verify a match, and that no context was specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] )
- selector = jQuery.clean( [ match[1] ], context );
-
- // HANDLE: $("#id")
- else {
- var elem = document.getElementById( match[3] );
-
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem && elem.id != match[3] )
- return jQuery().find( selector );
-
- // Otherwise, we inject the element directly into the jQuery object
- var ret = jQuery( elem || [] );
- ret.context = document;
- ret.selector = selector;
- return ret;
- }
-
- // HANDLE: $(expr, [context])
- // (which is just equivalent to: $(content).find(expr)
- } else
- return jQuery( context ).find( selector );
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) )
- return jQuery( document ).ready( selector );
-
- // Make sure that old selector state is passed along
- if ( selector.selector && selector.context ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return this.setArray(jQuery.isArray( selector ) ?
- selector :
- jQuery.makeArray(selector));
- },
-
- // Start with an empty selector
- selector: "",
-
- // The current version of jQuery being used
- jquery: "1.3.2",
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num === undefined ?
-
- // Return a 'clean' array
- Array.prototype.slice.call( this ) :
-
- // Return just the object
- this[ num ];
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems, name, selector ) {
- // Build a new jQuery matched element set
- var ret = jQuery( elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
-
- ret.context = this.context;
-
- if ( name === "find" )
- ret.selector = this.selector + (this.selector ? " " : "") + selector;
- else if ( name )
- ret.selector = this.selector + "." + name + "(" + selector + ")";
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Force the current matched set of elements to become
- // the specified array of elements (destroying the stack in the process)
- // You should use pushStack() in order to do this, but maintain the stack
- setArray: function( elems ) {
- // Resetting the length to 0, then using the native Array push
- // is a super-fast way to populate an object with array-like properties
- this.length = 0;
- Array.prototype.push.apply( this, elems );
-
- return this;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem && elem.jquery ? elem[0] : elem
- , this );
- },
-
- attr: function( name, value, type ) {
- var options = name;
-
- // Look for the case where we're accessing a style value
- if ( typeof name === "string" )
- if ( value === undefined )
- return this[0] && jQuery[ type || "attr" ]( this[0], name );
-
- else {
- options = {};
- options[ name ] = value;
- }
-
- // Check to see if we're setting style values
- return this.each(function(i){
- // Set all the styles
- for ( name in options )
- jQuery.attr(
- type ?
- this.style :
- this,
- name, jQuery.prop( this, options[ name ], type, i, name )
- );
- });
- },
-
- css: function( key, value ) {
- // ignore negative width and height values
- if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )
- value = undefined;
- return this.attr( key, value, "curCSS" );
- },
-
- text: function( text ) {
- if ( typeof text !== "object" && text != null )
- return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
-
- var ret = "";
-
- jQuery.each( text || this, function(){
- jQuery.each( this.childNodes, function(){
- if ( this.nodeType != 8 )
- ret += this.nodeType != 1 ?
- this.nodeValue :
- jQuery.fn.text( [ this ] );
- });
- });
-
- return ret;
- },
-
- wrapAll: function( html ) {
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).clone();
-
- if ( this[0].parentNode )
- wrap.insertBefore( this[0] );
-
- wrap.map(function(){
- var elem = this;
-
- while ( elem.firstChild )
- elem = elem.firstChild;
-
- return elem;
- }).append(this);
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- return this.each(function(){
- jQuery( this ).contents().wrapAll( html );
- });
- },
-
- wrap: function( html ) {
- return this.each(function(){
- jQuery( this ).wrapAll( html );
- });
- },
-
- append: function() {
- return this.domManip(arguments, true, function(elem){
- if (this.nodeType == 1)
- this.appendChild( elem );
- });
- },
-
- prepend: function() {
- return this.domManip(arguments, true, function(elem){
- if (this.nodeType == 1)
- this.insertBefore( elem, this.firstChild );
- });
- },
-
- before: function() {
- return this.domManip(arguments, false, function(elem){
- this.parentNode.insertBefore( elem, this );
- });
- },
-
- after: function() {
- return this.domManip(arguments, false, function(elem){
- this.parentNode.insertBefore( elem, this.nextSibling );
- });
- },
-
- end: function() {
- return this.prevObject || jQuery( [] );
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: [].push,
- sort: [].sort,
- splice: [].splice,
-
- find: function( selector ) {
- if ( this.length === 1 ) {
- var ret = this.pushStack( [], "find", selector );
- ret.length = 0;
- jQuery.find( selector, this[0], ret );
- return ret;
- } else {
- return this.pushStack( jQuery.unique(jQuery.map(this, function(elem){
- return jQuery.find( selector, elem );
- })), "find", selector );
- }
- },
-
- clone: function( events ) {
- // Do the clone
- var ret = this.map(function(){
- if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
- // IE copies events bound via attachEvent when
- // using cloneNode. Calling detachEvent on the
- // clone will also remove the events from the orignal
- // In order to get around this, we use innerHTML.
- // Unfortunately, this means some modifications to
- // attributes in IE that are actually only stored
- // as properties will not be copied (such as the
- // the name attribute on an input).
- var html = this.outerHTML;
- if ( !html ) {
- var div = this.ownerDocument.createElement("div");
- div.appendChild( this.cloneNode(true) );
- html = div.innerHTML;
- }
-
- return jQuery.clean([html.replace(/ jQuery\d+="(?:\d+|null)"/g, "").replace(/^\s*/, "")])[0];
- } else
- return this.cloneNode(true);
- });
-
- // Copy the events from the original to the clone
- if ( events === true ) {
- var orig = this.find("*").andSelf(), i = 0;
-
- ret.find("*").andSelf().each(function(){
- if ( this.nodeName !== orig[i].nodeName )
- return;
-
- var events = jQuery.data( orig[i], "events" );
-
- for ( var type in events ) {
- for ( var handler in events[ type ] ) {
- jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );
- }
- }
-
- i++;
- });
- }
-
- // Return the cloned set
- return ret;
- },
-
- filter: function( selector ) {
- return this.pushStack(
- jQuery.isFunction( selector ) &&
- jQuery.grep(this, function(elem, i){
- return selector.call( elem, i );
- }) ||
-
- jQuery.multiFilter( selector, jQuery.grep(this, function(elem){
- return elem.nodeType === 1;
- }) ), "filter", selector );
- },
-
- closest: function( selector ) {
- var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,
- closer = 0;
-
- return this.map(function(){
- var cur = this;
- while ( cur && cur.ownerDocument ) {
- if ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {
- jQuery.data(cur, "closest", closer);
- return cur;
- }
- cur = cur.parentNode;
- closer++;
- }
- });
- },
-
- not: function( selector ) {
- if ( typeof selector === "string" )
- // test special case where just one selector is passed in
- if ( isSimple.test( selector ) )
- return this.pushStack( jQuery.multiFilter( selector, this, true ), "not", selector );
- else
- selector = jQuery.multiFilter( selector, this );
-
- var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;
- return this.filter(function() {
- return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;
- });
- },
-
- add: function( selector ) {
- return this.pushStack( jQuery.unique( jQuery.merge(
- this.get(),
- typeof selector === "string" ?
- jQuery( selector ) :
- jQuery.makeArray( selector )
- )));
- },
-
- is: function( selector ) {
- return !!selector && jQuery.multiFilter( selector, this ).length > 0;
- },
-
- hasClass: function( selector ) {
- return !!selector && this.is( "." + selector );
- },
-
- val: function( value ) {
- if ( value === undefined ) {
- var elem = this[0];
-
- if ( elem ) {
- if( jQuery.nodeName( elem, 'option' ) )
- return (elem.attributes.value || {}).specified ? elem.value : elem.text;
-
- // We need to handle select boxes special
- if ( jQuery.nodeName( elem, "select" ) ) {
- var index = elem.selectedIndex,
- values = [],
- options = elem.options,
- one = elem.type == "select-one";
-
- // Nothing was selected
- if ( index < 0 )
- return null;
-
- // Loop through all the selected options
- for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {
- var option = options[ i ];
-
- if ( option.selected ) {
- // Get the specifc value for the option
- value = jQuery(option).val();
-
- // We don't need an array for one selects
- if ( one )
- return value;
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- }
-
- // Everything else, we just grab the value
- return (elem.value || "").replace(/\r/g, "");
-
- }
-
- return undefined;
- }
-
- if ( typeof value === "number" )
- value += '';
-
- return this.each(function(){
- if ( this.nodeType != 1 )
- return;
-
- if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
- this.checked = (jQuery.inArray(this.value, value) >= 0 ||
- jQuery.inArray(this.name, value) >= 0);
-
- else if ( jQuery.nodeName( this, "select" ) ) {
- var values = jQuery.makeArray(value);
-
- jQuery( "option", this ).each(function(){
- this.selected = (jQuery.inArray( this.value, values ) >= 0 ||
- jQuery.inArray( this.text, values ) >= 0);
- });
-
- if ( !values.length )
- this.selectedIndex = -1;
-
- } else
- this.value = value;
- });
- },
-
- html: function( value ) {
- return value === undefined ?
- (this[0] ?
- this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g, "") :
- null) :
- this.empty().append( value );
- },
-
- replaceWith: function( value ) {
- return this.after( value ).remove();
- },
-
- eq: function( i ) {
- return this.slice( i, +i + 1 );
- },
-
- slice: function() {
- return this.pushStack( Array.prototype.slice.apply( this, arguments ),
- "slice", Array.prototype.slice.call(arguments).join(",") );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function(elem, i){
- return callback.call( elem, i, elem );
- }));
- },
-
- andSelf: function() {
- return this.add( this.prevObject );
- },
-
- domManip: function( args, table, callback ) {
- if ( this[0] ) {
- var fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),
- scripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),
- first = fragment.firstChild;
-
- if ( first )
- for ( var i = 0, l = this.length; i < l; i++ )
- callback.call( root(this[i], first), this.length > 1 || i > 0 ?
- fragment.cloneNode(true) : fragment );
-
- if ( scripts )
- jQuery.each( scripts, evalScript );
- }
-
- return this;
-
- function root( elem, cur ) {
- return table && jQuery.nodeName(elem, "table") && jQuery.nodeName(cur, "tr") ?
- (elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild(elem.ownerDocument.createElement("tbody"))) :
- elem;
- }
- }
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-function evalScript( i, elem ) {
- if ( elem.src )
- jQuery.ajax({
- url: elem.src,
- async: false,
- dataType: "script"
- });
-
- else
- jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" );
-
- if ( elem.parentNode )
- elem.parentNode.removeChild( elem );
-}
-
-function now(){
- return +new Date;
-}
-
-jQuery.extend = jQuery.fn.extend = function() {
- // copy reference to target object
- var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) )
- target = {};
-
- // extend jQuery itself if only one argument is passed
- if ( length == i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ )
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null )
- // Extend the base object
- for ( var name in options ) {
- var src = target[ name ], copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy )
- continue;
-
- // Recurse if we're merging object values
- if ( deep && copy && typeof copy === "object" && !copy.nodeType )
- target[ name ] = jQuery.extend( deep,
- // Never move original objects, clone them
- src || ( copy.length != null ? [ ] : { } )
- , copy );
-
- // Don't bring in undefined values
- else if ( copy !== undefined )
- target[ name ] = copy;
-
- }
-
- // Return the modified object
- return target;
-};
-
-// exclude the following css properties to add px
-var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,
- // cache defaultView
- defaultView = document.defaultView || {},
- toString = Object.prototype.toString;
-
-jQuery.extend({
- noConflict: function( deep ) {
- window.$ = _$;
-
- if ( deep )
- window.jQuery = _jQuery;
-
- return jQuery;
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return toString.call(obj) === "[object Function]";
- },
-
- isArray: function( obj ) {
- return toString.call(obj) === "[object Array]";
- },
-
- // check if an element is in a (or is an) XML document
- isXMLDoc: function( elem ) {
- return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
- !!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );
- },
-
- // Evalulates a script in a global context
- globalEval: function( data ) {
- if ( data && /\S/.test(data) ) {
- // Inspired by code by Andrea Giammarchi
- // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
- var head = document.getElementsByTagName("head")[0] || document.documentElement,
- script = document.createElement("script");
-
- script.type = "text/javascript";
- if ( jQuery.support.scriptEval )
- script.appendChild( document.createTextNode( data ) );
- else
- script.text = data;
-
- // Use insertBefore instead of appendChild to circumvent an IE6 bug.
- // This arises when a base node is used (#2709).
- head.insertBefore( script, head.firstChild );
- head.removeChild( script );
- }
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();
- },
-
- // args is for internal usage only
- each: function( object, callback, args ) {
- var name, i = 0, length = object.length;
-
- if ( args ) {
- if ( length === undefined ) {
- for ( name in object )
- if ( callback.apply( object[ name ], args ) === false )
- break;
- } else
- for ( ; i < length; )
- if ( callback.apply( object[ i++ ], args ) === false )
- break;
-
- // A special, fast, case for the most common use of each
- } else {
- if ( length === undefined ) {
- for ( name in object )
- if ( callback.call( object[ name ], name, object[ name ] ) === false )
- break;
- } else
- for ( var value = object[0];
- i < length && callback.call( value, i, value ) !== false; value = object[++i] ){}
- }
-
- return object;
- },
-
- prop: function( elem, value, type, i, name ) {
- // Handle executable functions
- if ( jQuery.isFunction( value ) )
- value = value.call( elem, i );
-
- // Handle passing in a number to a CSS property
- return typeof value === "number" && type == "curCSS" && !exclude.test( name ) ?
- value + "px" :
- value;
- },
-
- className: {
- // internal only, use addClass("class")
- add: function( elem, classNames ) {
- jQuery.each((classNames || "").split(/\s+/), function(i, className){
- if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )
- elem.className += (elem.className ? " " : "") + className;
- });
- },
-
- // internal only, use removeClass("class")
- remove: function( elem, classNames ) {
- if (elem.nodeType == 1)
- elem.className = classNames !== undefined ?
- jQuery.grep(elem.className.split(/\s+/), function(className){
- return !jQuery.className.has( classNames, className );
- }).join(" ") :
- "";
- },
-
- // internal only, use hasClass("class")
- has: function( elem, className ) {
- return elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1;
- }
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations
- swap: function( elem, options, callback ) {
- var old = {};
- // Remember the old values, and insert the new ones
- for ( var name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- callback.call( elem );
-
- // Revert the old values
- for ( var name in options )
- elem.style[ name ] = old[ name ];
- },
-
- css: function( elem, name, force, extra ) {
- if ( name == "width" || name == "height" ) {
- var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ];
-
- function getWH() {
- val = name == "width" ? elem.offsetWidth : elem.offsetHeight;
-
- if ( extra === "border" )
- return;
-
- jQuery.each( which, function() {
- if ( !extra )
- val -= parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0;
- if ( extra === "margin" )
- val += parseFloat(jQuery.curCSS( elem, "margin" + this, true)) || 0;
- else
- val -= parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0;
- });
- }
-
- if ( elem.offsetWidth !== 0 )
- getWH();
- else
- jQuery.swap( elem, props, getWH );
-
- return Math.max(0, Math.round(val));
- }
-
- return jQuery.curCSS( elem, name, force );
- },
-
- curCSS: function( elem, name, force ) {
- var ret, style = elem.style;
-
- // We need to handle opacity special in IE
- if ( name == "opacity" && !jQuery.support.opacity ) {
- ret = jQuery.attr( style, "opacity" );
-
- return ret == "" ?
- "1" :
- ret;
- }
-
- // Make sure we're using the right name for getting the float value
- if ( name.match( /float/i ) )
- name = styleFloat;
-
- if ( !force && style && style[ name ] )
- ret = style[ name ];
-
- else if ( defaultView.getComputedStyle ) {
-
- // Only "float" is needed here
- if ( name.match( /float/i ) )
- name = "float";
-
- name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase();
-
- var computedStyle = defaultView.getComputedStyle( elem, null );
-
- if ( computedStyle )
- ret = computedStyle.getPropertyValue( name );
-
- // We should always get a number back from opacity
- if ( name == "opacity" && ret == "" )
- ret = "1";
-
- } else if ( elem.currentStyle ) {
- var camelCase = name.replace(/\-(\w)/g, function(all, letter){
- return letter.toUpperCase();
- });
-
- ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) {
- // Remember the original values
- var left = style.left, rsLeft = elem.runtimeStyle.left;
-
- // Put in the new values to get a computed value out
- elem.runtimeStyle.left = elem.currentStyle.left;
- style.left = ret || 0;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- elem.runtimeStyle.left = rsLeft;
- }
- }
-
- return ret;
- },
-
- clean: function( elems, context, fragment ) {
- context = context || document;
-
- // !context.createElement fails in IE with an error but returns typeof 'object'
- if ( typeof context.createElement === "undefined" )
- context = context.ownerDocument || context[0] && context[0].ownerDocument || document;
-
- // If a single string is passed in and it's a single tag
- // just do a createElement and skip the rest
- if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
- var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
- if ( match )
- return [ context.createElement( match[1] ) ];
- }
-
- var ret = [], scripts = [], div = context.createElement("div");
-
- jQuery.each(elems, function(i, elem){
- if ( typeof elem === "number" )
- elem += '';
-
- if ( !elem )
- return;
-
- // Convert html string into DOM nodes
- if ( typeof elem === "string" ) {
- // Fix "XHTML"-style tags in all browsers
- elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){
- return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?
- all :
- front + "></" + tag + ">";
- });
-
- // Trim whitespace, otherwise indexOf won't work as expected
- var tags = elem.replace(/^\s+/, "").substring(0, 10).toLowerCase();
-
- var wrap =
- // option or optgroup
- !tags.indexOf("<opt") &&
- [ 1, "<select multiple='multiple'>", "</select>" ] ||
-
- !tags.indexOf("<leg") &&
- [ 1, "<fieldset>", "</fieldset>" ] ||
-
- tags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
- [ 1, "<table>", "</table>" ] ||
-
- !tags.indexOf("<tr") &&
- [ 2, "<table><tbody>", "</tbody></table>" ] ||
-
- // <thead> matched above
- (!tags.indexOf("<td") || !tags.indexOf("<th")) &&
- [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ] ||
-
- !tags.indexOf("<col") &&
- [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ] ||
-
- // IE can't serialize <link> and <script> tags normally
- !jQuery.support.htmlSerialize &&
- [ 1, "div<div>", "</div>" ] ||
-
- [ 0, "", "" ];
-
- // Go to html and back, then peel off extra wrappers
- div.innerHTML = wrap[1] + elem + wrap[2];
-
- // Move to the right depth
- while ( wrap[0]-- )
- div = div.lastChild;
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- var hasBody = /<tbody/i.test(elem),
- tbody = !tags.indexOf("<table") && !hasBody ?
- div.firstChild && div.firstChild.childNodes :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] == "<table>" && !hasBody ?
- div.childNodes :
- [];
-
- for ( var j = tbody.length - 1; j >= 0 ; --j )
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length )
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
-
- }
-
- // IE completely kills leading whitespace when innerHTML is used
- if ( !jQuery.support.leadingWhitespace && /^\s/.test( elem ) )
- div.insertBefore( context.createTextNode( elem.match(/^\s*/)[0] ), div.firstChild );
-
- elem = jQuery.makeArray( div.childNodes );
- }
-
- if ( elem.nodeType )
- ret.push( elem );
- else
- ret = jQuery.merge( ret, elem );
-
- });
-
- if ( fragment ) {
- for ( var i = 0; ret[i]; i++ ) {
- if ( jQuery.nodeName( ret[i], "script" ) && (!ret[i].type || ret[i].type.toLowerCase() === "text/javascript") ) {
- scripts.push( ret[i].parentNode ? ret[i].parentNode.removeChild( ret[i] ) : ret[i] );
- } else {
- if ( ret[i].nodeType === 1 )
- ret.splice.apply( ret, [i + 1, 0].concat(jQuery.makeArray(ret[i].getElementsByTagName("script"))) );
- fragment.appendChild( ret[i] );
- }
- }
-
- return scripts;
- }
-
- return ret;
- },
-
- attr: function( elem, name, value ) {
- // don't set attributes on text and comment nodes
- if (!elem || elem.nodeType == 3 || elem.nodeType == 8)
- return undefined;
-
- var notxml = !jQuery.isXMLDoc( elem ),
- // Whether we are setting (or getting)
- set = value !== undefined;
-
- // Try to normalize/fix the name
- name = notxml && jQuery.props[ name ] || name;
-
- // Only do all the following if this is a node (faster for style)
- // IE elem.getAttribute passes even for style
- if ( elem.tagName ) {
-
- // These attributes require special treatment
- var special = /href|src|style/.test( name );
-
- // Safari mis-reports the default selected property of a hidden option
- // Accessing the parent's selectedIndex property fixes it
- if ( name == "selected" && elem.parentNode )
- elem.parentNode.selectedIndex;
-
- // If applicable, access the attribute via the DOM 0 way
- if ( name in elem && notxml && !special ) {
- if ( set ){
- // We can't allow the type property to be changed (since it causes problems in IE)
- if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
- throw "type property can't be changed";
-
- elem[ name ] = value;
- }
-
- // browsers index elements by id/name on forms, give priority to attributes.
- if( jQuery.nodeName( elem, "form" ) && elem.getAttributeNode(name) )
- return elem.getAttributeNode( name ).nodeValue;
-
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- if ( name == "tabIndex" ) {
- var attributeNode = elem.getAttributeNode( "tabIndex" );
- return attributeNode && attributeNode.specified
- ? attributeNode.value
- : elem.nodeName.match(/(button|input|object|select|textarea)/i)
- ? 0
- : elem.nodeName.match(/^(a|area)$/i) && elem.href
- ? 0
- : undefined;
- }
-
- return elem[ name ];
- }
-
- if ( !jQuery.support.style && notxml && name == "style" )
- return jQuery.attr( elem.style, "cssText", value );
-
- if ( set )
- // convert the value to a string (all browsers do this but IE) see #1070
- elem.setAttribute( name, "" + value );
-
- var attr = !jQuery.support.hrefNormalized && notxml && special
- // Some attributes require a special call on IE
- ? elem.getAttribute( name, 2 )
- : elem.getAttribute( name );
-
- // Non-existent attributes return null, we normalize to undefined
- return attr === null ? undefined : attr;
- }
-
- // elem is actually elem.style ... set the style
-
- // IE uses filters for opacity
- if ( !jQuery.support.opacity && name == "opacity" ) {
- if ( set ) {
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- elem.zoom = 1;
-
- // Set the alpha filter to set the opacity
- elem.filter = (elem.filter || "").replace( /alpha\([^)]*\)/, "" ) +
- (parseInt( value ) + '' == "NaN" ? "" : "alpha(opacity=" + value * 100 + ")");
- }
-
- return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
- (parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
- "";
- }
-
- name = name.replace(/-([a-z])/ig, function(all, letter){
- return letter.toUpperCase();
- });
-
- if ( set )
- elem[ name ] = value;
-
- return elem[ name ];
- },
-
- trim: function( text ) {
- return (text || "").replace( /^\s+|\s+$/g, "" );
- },
-
- makeArray: function( array ) {
- var ret = [];
-
- if( array != null ){
- var i = array.length;
- // The window, strings (and functions) also have 'length'
- if( i == null || typeof array === "string" || jQuery.isFunction(array) || array.setInterval )
- ret[0] = array;
- else
- while( i )
- ret[--i] = array[i];
- }
-
- return ret;
- },
-
- inArray: function( elem, array ) {
- for ( var i = 0, length = array.length; i < length; i++ )
- // Use === because on IE, window == document
- if ( array[ i ] === elem )
- return i;
-
- return -1;
- },
-
- merge: function( first, second ) {
- // We have to loop this way because IE & Opera overwrite the length
- // expando of getElementsByTagName
- var i = 0, elem, pos = first.length;
- // Also, we need to make sure that the correct elements are being returned
- // (IE returns comment nodes in a '*' query)
- if ( !jQuery.support.getAll ) {
- while ( (elem = second[ i++ ]) != null )
- if ( elem.nodeType != 8 )
- first[ pos++ ] = elem;
-
- } else
- while ( (elem = second[ i++ ]) != null )
- first[ pos++ ] = elem;
-
- return first;
- },
-
- unique: function( array ) {
- var ret = [], done = {};
-
- try {
-
- for ( var i = 0, length = array.length; i < length; i++ ) {
- var id = jQuery.data( array[ i ] );
-
- if ( !done[ id ] ) {
- done[ id ] = true;
- ret.push( array[ i ] );
- }
- }
-
- } catch( e ) {
- ret = array;
- }
-
- return ret;
- },
-
- grep: function( elems, callback, inv ) {
- var ret = [];
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( var i = 0, length = elems.length; i < length; i++ )
- if ( !inv != !callback( elems[ i ], i ) )
- ret.push( elems[ i ] );
-
- return ret;
- },
-
- map: function( elems, callback ) {
- var ret = [];
-
- // Go through the array, translating each of the items to their
- // new value (or values).
- for ( var i = 0, length = elems.length; i < length; i++ ) {
- var value = callback( elems[ i ], i );
-
- if ( value != null )
- ret[ ret.length ] = value;
- }
-
- return ret.concat.apply( [], ret );
- }
-});
-
-// Use of jQuery.browser is deprecated.
-// It's included for backwards compatibility and plugins,
-// although they should work to migrate away.
-
-var userAgent = navigator.userAgent.toLowerCase();
-
-// Figure out what browser is being used
-jQuery.browser = {
- version: (userAgent.match( /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/ ) || [0,'0'])[1],
- safari: /webkit/.test( userAgent ),
- opera: /opera/.test( userAgent ),
- msie: /msie/.test( userAgent ) && !/opera/.test( userAgent ),
- mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
-};
-
-jQuery.each({
- parent: function(elem){return elem.parentNode;},
- parents: function(elem){return jQuery.dir(elem,"parentNode");},
- next: function(elem){return jQuery.nth(elem,2,"nextSibling");},
- prev: function(elem){return jQuery.nth(elem,2,"previousSibling");},
- nextAll: function(elem){return jQuery.dir(elem,"nextSibling");},
- prevAll: function(elem){return jQuery.dir(elem,"previousSibling");},
- siblings: function(elem){return jQuery.sibling(elem.parentNode.firstChild,elem);},
- children: function(elem){return jQuery.sibling(elem.firstChild);},
- contents: function(elem){return jQuery.nodeName(elem,"iframe")?elem.contentDocument||elem.contentWindow.document:jQuery.makeArray(elem.childNodes);}
-}, function(name, fn){
- jQuery.fn[ name ] = function( selector ) {
- var ret = jQuery.map( this, fn );
-
- if ( selector && typeof selector == "string" )
- ret = jQuery.multiFilter( selector, ret );
-
- return this.pushStack( jQuery.unique( ret ), name, selector );
- };
-});
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function(name, original){
- jQuery.fn[ name ] = function( selector ) {
- var ret = [], insert = jQuery( selector );
-
- for ( var i = 0, l = insert.length; i < l; i++ ) {
- var elems = (i > 0 ? this.clone(true) : this).get();
- jQuery.fn[ original ].apply( jQuery(insert[i]), elems );
- ret = ret.concat( elems );
- }
-
- return this.pushStack( ret, name, selector );
- };
-});
-
-jQuery.each({
- removeAttr: function( name ) {
- jQuery.attr( this, name, "" );
- if (this.nodeType == 1)
- this.removeAttribute( name );
- },
-
- addClass: function( classNames ) {
- jQuery.className.add( this, classNames );
- },
-
- removeClass: function( classNames ) {
- jQuery.className.remove( this, classNames );
- },
-
- toggleClass: function( classNames, state ) {
- if( typeof state !== "boolean" )
- state = !jQuery.className.has( this, classNames );
- jQuery.className[ state ? "add" : "remove" ]( this, classNames );
- },
-
- remove: function( selector ) {
- if ( !selector || jQuery.filter( selector, [ this ] ).length ) {
- // Prevent memory leaks
- jQuery( "*", this ).add([this]).each(function(){
- jQuery.event.remove(this);
- jQuery.removeData(this);
- });
- if (this.parentNode)
- this.parentNode.removeChild( this );
- }
- },
-
- empty: function() {
- // Remove element nodes and prevent memory leaks
- jQuery(this).children().remove();
-
- // Remove any remaining nodes
- while ( this.firstChild )
- this.removeChild( this.firstChild );
- }
-}, function(name, fn){
- jQuery.fn[ name ] = function(){
- return this.each( fn, arguments );
- };
-});
-
-// Helper function used by the dimensions and offset modules
-function num(elem, prop) {
- return elem[0] && parseInt( jQuery.curCSS(elem[0], prop, true), 10 ) || 0;
-}
-var expando = "jQuery" + now(), uuid = 0, windowData = {};
-
-jQuery.extend({
- cache: {},
-
- data: function( elem, name, data ) {
- elem = elem == window ?
- windowData :
- elem;
-
- var id = elem[ expando ];
-
- // Compute a unique ID for the element
- if ( !id )
- id = elem[ expando ] = ++uuid;
-
- // Only generate the data cache if we're
- // trying to access or manipulate it
- if ( name && !jQuery.cache[ id ] )
- jQuery.cache[ id ] = {};
-
- // Prevent overriding the named cache with undefined values
- if ( data !== undefined )
- jQuery.cache[ id ][ name ] = data;
-
- // Return the named cache data, or the ID for the element
- return name ?
- jQuery.cache[ id ][ name ] :
- id;
- },
-
- removeData: function( elem, name ) {
- elem = elem == window ?
- windowData :
- elem;
-
- var id = elem[ expando ];
-
- // If we want to remove a specific section of the element's data
- if ( name ) {
- if ( jQuery.cache[ id ] ) {
- // Remove the section of cache data
- delete jQuery.cache[ id ][ name ];
-
- // If we've removed all the data, remove the element's cache
- name = "";
-
- for ( name in jQuery.cache[ id ] )
- break;
-
- if ( !name )
- jQuery.removeData( elem );
- }
-
- // Otherwise, we want to remove all of the element's data
- } else {
- // Clean up the element expando
- try {
- delete elem[ expando ];
- } catch(e){
- // IE has trouble directly removing the expando
- // but it's ok with using removeAttribute
- if ( elem.removeAttribute )
- elem.removeAttribute( expando );
- }
-
- // Completely remove the data cache
- delete jQuery.cache[ id ];
- }
- },
- queue: function( elem, type, data ) {
- if ( elem ){
-
- type = (type || "fx") + "queue";
-
- var q = jQuery.data( elem, type );
-
- if ( !q || jQuery.isArray(data) )
- q = jQuery.data( elem, type, jQuery.makeArray(data) );
- else if( data )
- q.push( data );
-
- }
- return q;
- },
-
- dequeue: function( elem, type ){
- var queue = jQuery.queue( elem, type ),
- fn = queue.shift();
-
- if( !type || type === "fx" )
- fn = queue[0];
-
- if( fn !== undefined )
- fn.call(elem);
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ){
- var parts = key.split(".");
- parts[1] = parts[1] ? "." + parts[1] : "";
-
- if ( value === undefined ) {
- var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]);
-
- if ( data === undefined && this.length )
- data = jQuery.data( this[0], key );
-
- return data === undefined && parts[1] ?
- this.data( parts[0] ) :
- data;
- } else
- return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){
- jQuery.data( this, key, value );
- });
- },
-
- removeData: function( key ){
- return this.each(function(){
- jQuery.removeData( this, key );
- });
- },
- queue: function(type, data){
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- }
-
- if ( data === undefined )
- return jQuery.queue( this[0], type );
-
- return this.each(function(){
- var queue = jQuery.queue( this, type, data );
-
- if( type == "fx" && queue.length == 1 )
- queue[0].call(this);
- });
- },
- dequeue: function(type){
- return this.each(function(){
- jQuery.dequeue( this, type );
- });
- }
-});/*!
- * Sizzle CSS Selector Engine - v0.9.3
- * Copyright 2009, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- * More information: http://sizzlejs.com/
- */
-(function(){
-
-var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,
- done = 0,
- toString = Object.prototype.toString;
-
-var Sizzle = function(selector, context, results, seed) {
- results = results || [];
- context = context || document;
-
- if ( context.nodeType !== 1 && context.nodeType !== 9 )
- return [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- var parts = [], m, set, checkSet, check, mode, extra, prune = true;
-
- // Reset the position of the chunker regexp (start from head)
- chunker.lastIndex = 0;
-
- while ( (m = chunker.exec(selector)) !== null ) {
- parts.push( m[1] );
-
- if ( m[2] ) {
- extra = RegExp.rightContext;
- break;
- }
- }
-
- if ( parts.length > 1 && origPOS.exec( selector ) ) {
- if ( parts.length === 2 && Expr.relative[ parts[0] ] ) {
- set = posProcess( parts[0] + parts[1], context );
- } else {
- set = Expr.relative[ parts[0] ] ?
- [ context ] :
- Sizzle( parts.shift(), context );
-
- while ( parts.length ) {
- selector = parts.shift();
-
- if ( Expr.relative[ selector ] )
- selector += parts.shift();
-
- set = posProcess( selector, set );
- }
- }
- } else {
- var ret = seed ?
- { expr: parts.pop(), set: makeArray(seed) } :
- Sizzle.find( parts.pop(), parts.length === 1 && context.parentNode ? context.parentNode : context, isXML(context) );
- set = Sizzle.filter( ret.expr, ret.set );
-
- if ( parts.length > 0 ) {
- checkSet = makeArray(set);
- } else {
- prune = false;
- }
-
- while ( parts.length ) {
- var cur = parts.pop(), pop = cur;
-
- if ( !Expr.relative[ cur ] ) {
- cur = "";
- } else {
- pop = parts.pop();
- }
-
- if ( pop == null ) {
- pop = context;
- }
-
- Expr.relative[ cur ]( checkSet, pop, isXML(context) );
- }
- }
-
- if ( !checkSet ) {
- checkSet = set;
- }
-
- if ( !checkSet ) {
- throw "Syntax error, unrecognized expression: " + (cur || selector);
- }
-
- if ( toString.call(checkSet) === "[object Array]" ) {
- if ( !prune ) {
- results.push.apply( results, checkSet );
- } else if ( context.nodeType === 1 ) {
- for ( var i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && contains(context, checkSet[i])) ) {
- results.push( set[i] );
- }
- }
- } else {
- for ( var i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && checkSet[i].nodeType === 1 ) {
- results.push( set[i] );
- }
- }
- }
- } else {
- makeArray( checkSet, results );
- }
-
- if ( extra ) {
- Sizzle( extra, context, results, seed );
-
- if ( sortOrder ) {
- hasDuplicate = false;
- results.sort(sortOrder);
-
- if ( hasDuplicate ) {
- for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[i-1] ) {
- results.splice(i--, 1);
- }
- }
- }
- }
- }
-
- return results;
-};
-
-Sizzle.matches = function(expr, set){
- return Sizzle(expr, null, null, set);
-};
-
-Sizzle.find = function(expr, context, isXML){
- var set, match;
-
- if ( !expr ) {
- return [];
- }
-
- for ( var i = 0, l = Expr.order.length; i < l; i++ ) {
- var type = Expr.order[i], match;
-
- if ( (match = Expr.match[ type ].exec( expr )) ) {
- var left = RegExp.leftContext;
-
- if ( left.substr( left.length - 1 ) !== "\\" ) {
- match[1] = (match[1] || "").replace(/\\/g, "");
- set = Expr.find[ type ]( match, context, isXML );
- if ( set != null ) {
- expr = expr.replace( Expr.match[ type ], "" );
- break;
- }
- }
- }
- }
-
- if ( !set ) {
- set = context.getElementsByTagName("*");
- }
-
- return {set: set, expr: expr};
-};
-
-Sizzle.filter = function(expr, set, inplace, not){
- var old = expr, result = [], curLoop = set, match, anyFound,
- isXMLFilter = set && set[0] && isXML(set[0]);
-
- while ( expr && set.length ) {
- for ( var type in Expr.filter ) {
- if ( (match = Expr.match[ type ].exec( expr )) != null ) {
- var filter = Expr.filter[ type ], found, item;
- anyFound = false;
-
- if ( curLoop == result ) {
- result = [];
- }
-
- if ( Expr.preFilter[ type ] ) {
- match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter );
-
- if ( !match ) {
- anyFound = found = true;
- } else if ( match === true ) {
- continue;
- }
- }
-
- if ( match ) {
- for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
- if ( item ) {
- found = filter( item, match, i, curLoop );
- var pass = not ^ !!found;
-
- if ( inplace && found != null ) {
- if ( pass ) {
- anyFound = true;
- } else {
- curLoop[i] = false;
- }
- } else if ( pass ) {
- result.push( item );
- anyFound = true;
- }
- }
- }
- }
-
- if ( found !== undefined ) {
- if ( !inplace ) {
- curLoop = result;
- }
-
- expr = expr.replace( Expr.match[ type ], "" );
-
- if ( !anyFound ) {
- return [];
- }
-
- break;
- }
- }
- }
-
- // Improper expression
- if ( expr == old ) {
- if ( anyFound == null ) {
- throw "Syntax error, unrecognized expression: " + expr;
- } else {
- break;
- }
- }
-
- old = expr;
- }
-
- return curLoop;
-};
-
-var Expr = Sizzle.selectors = {
- order: [ "ID", "NAME", "TAG" ],
- match: {
- ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
- CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/,
- NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/,
- ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
- TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/,
- CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,
- POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,
- PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/
- },
- attrMap: {
- "class": "className",
- "for": "htmlFor"
- },
- attrHandle: {
- href: function(elem){
- return elem.getAttribute("href");
- }
- },
- relative: {
- "+": function(checkSet, part, isXML){
- var isPartStr = typeof part === "string",
- isTag = isPartStr && !/\W/.test(part),
- isPartStrNotTag = isPartStr && !isTag;
-
- if ( isTag && !isXML ) {
- part = part.toUpperCase();
- }
-
- for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) {
- if ( (elem = checkSet[i]) ) {
- while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {}
-
- checkSet[i] = isPartStrNotTag || elem && elem.nodeName === part ?
- elem || false :
- elem === part;
- }
- }
-
- if ( isPartStrNotTag ) {
- Sizzle.filter( part, checkSet, true );
- }
- },
- ">": function(checkSet, part, isXML){
- var isPartStr = typeof part === "string";
-
- if ( isPartStr && !/\W/.test(part) ) {
- part = isXML ? part : part.toUpperCase();
-
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
- if ( elem ) {
- var parent = elem.parentNode;
- checkSet[i] = parent.nodeName === part ? parent : false;
- }
- }
- } else {
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
- if ( elem ) {
- checkSet[i] = isPartStr ?
- elem.parentNode :
- elem.parentNode === part;
- }
- }
-
- if ( isPartStr ) {
- Sizzle.filter( part, checkSet, true );
- }
- }
- },
- "": function(checkSet, part, isXML){
- var doneName = done++, checkFn = dirCheck;
-
- if ( !part.match(/\W/) ) {
- var nodeCheck = part = isXML ? part : part.toUpperCase();
- checkFn = dirNodeCheck;
- }
-
- checkFn("parentNode", part, doneName, checkSet, nodeCheck, isXML);
- },
- "~": function(checkSet, part, isXML){
- var doneName = done++, checkFn = dirCheck;
-
- if ( typeof part === "string" && !part.match(/\W/) ) {
- var nodeCheck = part = isXML ? part : part.toUpperCase();
- checkFn = dirNodeCheck;
- }
-
- checkFn("previousSibling", part, doneName, checkSet, nodeCheck, isXML);
- }
- },
- find: {
- ID: function(match, context, isXML){
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
- return m ? [m] : [];
- }
- },
- NAME: function(match, context, isXML){
- if ( typeof context.getElementsByName !== "undefined" ) {
- var ret = [], results = context.getElementsByName(match[1]);
-
- for ( var i = 0, l = results.length; i < l; i++ ) {
- if ( results[i].getAttribute("name") === match[1] ) {
- ret.push( results[i] );
- }
- }
-
- return ret.length === 0 ? null : ret;
- }
- },
- TAG: function(match, context){
- return context.getElementsByTagName(match[1]);
- }
- },
- preFilter: {
- CLASS: function(match, curLoop, inplace, result, not, isXML){
- match = " " + match[1].replace(/\\/g, "") + " ";
-
- if ( isXML ) {
- return match;
- }
-
- for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) {
- if ( elem ) {
- if ( not ^ (elem.className && (" " + elem.className + " ").indexOf(match) >= 0) ) {
- if ( !inplace )
- result.push( elem );
- } else if ( inplace ) {
- curLoop[i] = false;
- }
- }
- }
-
- return false;
- },
- ID: function(match){
- return match[1].replace(/\\/g, "");
- },
- TAG: function(match, curLoop){
- for ( var i = 0; curLoop[i] === false; i++ ){}
- return curLoop[i] && isXML(curLoop[i]) ? match[1] : match[1].toUpperCase();
- },
- CHILD: function(match){
- if ( match[1] == "nth" ) {
- // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6'
- var test = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(
- match[2] == "even" && "2n" || match[2] == "odd" && "2n+1" ||
- !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]);
-
- // calculate the numbers (first)n+(last) including if they are negative
- match[2] = (test[1] + (test[2] || 1)) - 0;
- match[3] = test[3] - 0;
- }
-
- // TODO: Move to normal caching system
- match[0] = done++;
-
- return match;
- },
- ATTR: function(match, curLoop, inplace, result, not, isXML){
- var name = match[1].replace(/\\/g, "");
-
- if ( !isXML && Expr.attrMap[name] ) {
- match[1] = Expr.attrMap[name];
- }
-
- if ( match[2] === "~=" ) {
- match[4] = " " + match[4] + " ";
- }
-
- return match;
- },
- PSEUDO: function(match, curLoop, inplace, result, not){
- if ( match[1] === "not" ) {
- // If we're dealing with a complex expression, or a simple one
- if ( match[3].match(chunker).length > 1 || /^\w/.test(match[3]) ) {
- match[3] = Sizzle(match[3], null, null, curLoop);
- } else {
- var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not);
- if ( !inplace ) {
- result.push.apply( result, ret );
- }
- return false;
- }
- } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) {
- return true;
- }
-
- return match;
- },
- POS: function(match){
- match.unshift( true );
- return match;
- }
- },
- filters: {
- enabled: function(elem){
- return elem.disabled === false && elem.type !== "hidden";
- },
- disabled: function(elem){
- return elem.disabled === true;
- },
- checked: function(elem){
- return elem.checked === true;
- },
- selected: function(elem){
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- elem.parentNode.selectedIndex;
- return elem.selected === true;
- },
- parent: function(elem){
- return !!elem.firstChild;
- },
- empty: function(elem){
- return !elem.firstChild;
- },
- has: function(elem, i, match){
- return !!Sizzle( match[3], elem ).length;
- },
- header: function(elem){
- return /h\d/i.test( elem.nodeName );
- },
- text: function(elem){
- return "text" === elem.type;
- },
- radio: function(elem){
- return "radio" === elem.type;
- },
- checkbox: function(elem){
- return "checkbox" === elem.type;
- },
- file: function(elem){
- return "file" === elem.type;
- },
- password: function(elem){
- return "password" === elem.type;
- },
- submit: function(elem){
- return "submit" === elem.type;
- },
- image: function(elem){
- return "image" === elem.type;
- },
- reset: function(elem){
- return "reset" === elem.type;
- },
- button: function(elem){
- return "button" === elem.type || elem.nodeName.toUpperCase() === "BUTTON";
- },
- input: function(elem){
- return /input|select|textarea|button/i.test(elem.nodeName);
- }
- },
- setFilters: {
- first: function(elem, i){
- return i === 0;
- },
- last: function(elem, i, match, array){
- return i === array.length - 1;
- },
- even: function(elem, i){
- return i % 2 === 0;
- },
- odd: function(elem, i){
- return i % 2 === 1;
- },
- lt: function(elem, i, match){
- return i < match[3] - 0;
- },
- gt: function(elem, i, match){
- return i > match[3] - 0;
- },
- nth: function(elem, i, match){
- return match[3] - 0 == i;
- },
- eq: function(elem, i, match){
- return match[3] - 0 == i;
- }
- },
- filter: {
- PSEUDO: function(elem, match, i, array){
- var name = match[1], filter = Expr.filters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
- } else if ( name === "contains" ) {
- return (elem.textContent || elem.innerText || "").indexOf(match[3]) >= 0;
- } else if ( name === "not" ) {
- var not = match[3];
-
- for ( var i = 0, l = not.length; i < l; i++ ) {
- if ( not[i] === elem ) {
- return false;
- }
- }
-
- return true;
- }
- },
- CHILD: function(elem, match){
- var type = match[1], node = elem;
- switch (type) {
- case 'only':
- case 'first':
- while (node = node.previousSibling) {
- if ( node.nodeType === 1 ) return false;
- }
- if ( type == 'first') return true;
- node = elem;
- case 'last':
- while (node = node.nextSibling) {
- if ( node.nodeType === 1 ) return false;
- }
- return true;
- case 'nth':
- var first = match[2], last = match[3];
-
- if ( first == 1 && last == 0 ) {
- return true;
- }
-
- var doneName = match[0],
- parent = elem.parentNode;
-
- if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) {
- var count = 0;
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
- if ( node.nodeType === 1 ) {
- node.nodeIndex = ++count;
- }
- }
- parent.sizcache = doneName;
- }
-
- var diff = elem.nodeIndex - last;
- if ( first == 0 ) {
- return diff == 0;
- } else {
- return ( diff % first == 0 && diff / first >= 0 );
- }
- }
- },
- ID: function(elem, match){
- return elem.nodeType === 1 && elem.getAttribute("id") === match;
- },
- TAG: function(elem, match){
- return (match === "*" && elem.nodeType === 1) || elem.nodeName === match;
- },
- CLASS: function(elem, match){
- return (" " + (elem.className || elem.getAttribute("class")) + " ")
- .indexOf( match ) > -1;
- },
- ATTR: function(elem, match){
- var name = match[1],
- result = Expr.attrHandle[ name ] ?
- Expr.attrHandle[ name ]( elem ) :
- elem[ name ] != null ?
- elem[ name ] :
- elem.getAttribute( name ),
- value = result + "",
- type = match[2],
- check = match[4];
-
- return result == null ?
- type === "!=" :
- type === "=" ?
- value === check :
- type === "*=" ?
- value.indexOf(check) >= 0 :
- type === "~=" ?
- (" " + value + " ").indexOf(check) >= 0 :
- !check ?
- value && result !== false :
- type === "!=" ?
- value != check :
- type === "^=" ?
- value.indexOf(check) === 0 :
- type === "$=" ?
- value.substr(value.length - check.length) === check :
- type === "|=" ?
- value === check || value.substr(0, check.length + 1) === check + "-" :
- false;
- },
- POS: function(elem, match, i, array){
- var name = match[2], filter = Expr.setFilters[ name ];
-
- if ( filter ) {
- return filter( elem, i, match, array );
- }
- }
- }
-};
-
-var origPOS = Expr.match.POS;
-
-for ( var type in Expr.match ) {
- Expr.match[ type ] = RegExp( Expr.match[ type ].source + /(?![^\[]*\])(?![^\(]*\))/.source );
-}
-
-var makeArray = function(array, results) {
- array = Array.prototype.slice.call( array );
-
- if ( results ) {
- results.push.apply( results, array );
- return results;
- }
-
- return array;
-};
-
-// Perform a simple check to determine if the browser is capable of
-// converting a NodeList to an array using builtin methods.
-try {
- Array.prototype.slice.call( document.documentElement.childNodes );
-
-// Provide a fallback method if it does not work
-} catch(e){
- makeArray = function(array, results) {
- var ret = results || [];
-
- if ( toString.call(array) === "[object Array]" ) {
- Array.prototype.push.apply( ret, array );
- } else {
- if ( typeof array.length === "number" ) {
- for ( var i = 0, l = array.length; i < l; i++ ) {
- ret.push( array[i] );
- }
- } else {
- for ( var i = 0; array[i]; i++ ) {
- ret.push( array[i] );
- }
- }
- }
-
- return ret;
- };
-}
-
-var sortOrder;
-
-if ( document.documentElement.compareDocumentPosition ) {
- sortOrder = function( a, b ) {
- var ret = a.compareDocumentPosition(b) & 4 ? -1 : a === b ? 0 : 1;
- if ( ret === 0 ) {
- hasDuplicate = true;
- }
- return ret;
- };
-} else if ( "sourceIndex" in document.documentElement ) {
- sortOrder = function( a, b ) {
- var ret = a.sourceIndex - b.sourceIndex;
- if ( ret === 0 ) {
- hasDuplicate = true;
- }
- return ret;
- };
-} else if ( document.createRange ) {
- sortOrder = function( a, b ) {
- var aRange = a.ownerDocument.createRange(), bRange = b.ownerDocument.createRange();
- aRange.selectNode(a);
- aRange.collapse(true);
- bRange.selectNode(b);
- bRange.collapse(true);
- var ret = aRange.compareBoundaryPoints(Range.START_TO_END, bRange);
- if ( ret === 0 ) {
- hasDuplicate = true;
- }
- return ret;
- };
-}
-
-// Check to see if the browser returns elements by name when
-// querying by getElementById (and provide a workaround)
-(function(){
- // We're going to inject a fake input element with a specified name
- var form = document.createElement("form"),
- id = "script" + (new Date).getTime();
- form.innerHTML = "<input name='" + id + "'/>";
-
- // Inject it into the root element, check its status, and remove it quickly
- var root = document.documentElement;
- root.insertBefore( form, root.firstChild );
-
- // The workaround has to do additional checks after a getElementById
- // Which slows things down for other browsers (hence the branching)
- if ( !!document.getElementById( id ) ) {
- Expr.find.ID = function(match, context, isXML){
- if ( typeof context.getElementById !== "undefined" && !isXML ) {
- var m = context.getElementById(match[1]);
- return m ? m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? [m] : undefined : [];
- }
- };
-
- Expr.filter.ID = function(elem, match){
- var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
- return elem.nodeType === 1 && node && node.nodeValue === match;
- };
- }
-
- root.removeChild( form );
-})();
-
-(function(){
- // Check to see if the browser returns only elements
- // when doing getElementsByTagName("*")
-
- // Create a fake element
- var div = document.createElement("div");
- div.appendChild( document.createComment("") );
-
- // Make sure no comments are found
- if ( div.getElementsByTagName("*").length > 0 ) {
- Expr.find.TAG = function(match, context){
- var results = context.getElementsByTagName(match[1]);
-
- // Filter out possible comments
- if ( match[1] === "*" ) {
- var tmp = [];
-
- for ( var i = 0; results[i]; i++ ) {
- if ( results[i].nodeType === 1 ) {
- tmp.push( results[i] );
- }
- }
-
- results = tmp;
- }
-
- return results;
- };
- }
-
- // Check to see if an attribute returns normalized href attributes
- div.innerHTML = "<a href='#'></a>";
- if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" &&
- div.firstChild.getAttribute("href") !== "#" ) {
- Expr.attrHandle.href = function(elem){
- return elem.getAttribute("href", 2);
- };
- }
-})();
-
-if ( document.querySelectorAll ) (function(){
- var oldSizzle = Sizzle, div = document.createElement("div");
- div.innerHTML = "<p class='TEST'></p>";
-
- // Safari can't handle uppercase or unicode characters when
- // in quirks mode.
- if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) {
- return;
- }
-
- Sizzle = function(query, context, extra, seed){
- context = context || document;
-
- // Only use querySelectorAll on non-XML documents
- // (ID selectors don't work in non-HTML documents)
- if ( !seed && context.nodeType === 9 && !isXML(context) ) {
- try {
- return makeArray( context.querySelectorAll(query), extra );
- } catch(e){}
- }
-
- return oldSizzle(query, context, extra, seed);
- };
-
- Sizzle.find = oldSizzle.find;
- Sizzle.filter = oldSizzle.filter;
- Sizzle.selectors = oldSizzle.selectors;
- Sizzle.matches = oldSizzle.matches;
-})();
-
-if ( document.getElementsByClassName && document.documentElement.getElementsByClassName ) (function(){
- var div = document.createElement("div");
- div.innerHTML = "<div class='test e'></div><div class='test'></div>";
-
- // Opera can't find a second classname (in 9.6)
- if ( div.getElementsByClassName("e").length === 0 )
- return;
-
- // Safari caches class attributes, doesn't catch changes (in 3.2)
- div.lastChild.className = "e";
-
- if ( div.getElementsByClassName("e").length === 1 )
- return;
-
- Expr.order.splice(1, 0, "CLASS");
- Expr.find.CLASS = function(match, context, isXML) {
- if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) {
- return context.getElementsByClassName(match[1]);
- }
- };
-})();
-
-function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- var sibDir = dir == "previousSibling" && !isXML;
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
- if ( elem ) {
- if ( sibDir && elem.nodeType === 1 ){
- elem.sizcache = doneName;
- elem.sizset = i;
- }
- elem = elem[dir];
- var match = false;
-
- while ( elem ) {
- if ( elem.sizcache === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 && !isXML ){
- elem.sizcache = doneName;
- elem.sizset = i;
- }
-
- if ( elem.nodeName === cur ) {
- match = elem;
- break;
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) {
- var sibDir = dir == "previousSibling" && !isXML;
- for ( var i = 0, l = checkSet.length; i < l; i++ ) {
- var elem = checkSet[i];
- if ( elem ) {
- if ( sibDir && elem.nodeType === 1 ) {
- elem.sizcache = doneName;
- elem.sizset = i;
- }
- elem = elem[dir];
- var match = false;
-
- while ( elem ) {
- if ( elem.sizcache === doneName ) {
- match = checkSet[elem.sizset];
- break;
- }
-
- if ( elem.nodeType === 1 ) {
- if ( !isXML ) {
- elem.sizcache = doneName;
- elem.sizset = i;
- }
- if ( typeof cur !== "string" ) {
- if ( elem === cur ) {
- match = true;
- break;
- }
-
- } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) {
- match = elem;
- break;
- }
- }
-
- elem = elem[dir];
- }
-
- checkSet[i] = match;
- }
- }
-}
-
-var contains = document.compareDocumentPosition ? function(a, b){
- return a.compareDocumentPosition(b) & 16;
-} : function(a, b){
- return a !== b && (a.contains ? a.contains(b) : true);
-};
-
-var isXML = function(elem){
- return elem.nodeType === 9 && elem.documentElement.nodeName !== "HTML" ||
- !!elem.ownerDocument && isXML( elem.ownerDocument );
-};
-
-var posProcess = function(selector, context){
- var tmpSet = [], later = "", match,
- root = context.nodeType ? [context] : context;
-
- // Position selectors must be done after the filter
- // And so must :not(positional) so we move all PSEUDOs to the end
- while ( (match = Expr.match.PSEUDO.exec( selector )) ) {
- later += match[0];
- selector = selector.replace( Expr.match.PSEUDO, "" );
- }
-
- selector = Expr.relative[selector] ? selector + "*" : selector;
-
- for ( var i = 0, l = root.length; i < l; i++ ) {
- Sizzle( selector, root[i], tmpSet );
- }
-
- return Sizzle.filter( later, tmpSet );
-};
-
-// EXPOSE
-jQuery.find = Sizzle;
-jQuery.filter = Sizzle.filter;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.filters;
-
-Sizzle.selectors.filters.hidden = function(elem){
- return elem.offsetWidth === 0 || elem.offsetHeight === 0;
-};
-
-Sizzle.selectors.filters.visible = function(elem){
- return elem.offsetWidth > 0 || elem.offsetHeight > 0;
-};
-
-Sizzle.selectors.filters.animated = function(elem){
- return jQuery.grep(jQuery.timers, function(fn){
- return elem === fn.elem;
- }).length;
-};
-
-jQuery.multiFilter = function( expr, elems, not ) {
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return Sizzle.matches(expr, elems);
-};
-
-jQuery.dir = function( elem, dir ){
- var matched = [], cur = elem[dir];
- while ( cur && cur != document ) {
- if ( cur.nodeType == 1 )
- matched.push( cur );
- cur = cur[dir];
- }
- return matched;
-};
-
-jQuery.nth = function(cur, result, dir, elem){
- result = result || 1;
- var num = 0;
-
- for ( ; cur; cur = cur[dir] )
- if ( cur.nodeType == 1 && ++num == result )
- break;
-
- return cur;
-};
-
-jQuery.sibling = function(n, elem){
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType == 1 && n != elem )
- r.push( n );
- }
-
- return r;
-};
-
-return;
-
-window.Sizzle = Sizzle;
-
-})();
-/*
- * A number of helper functions used for managing events.
- * Many of the ideas behind this code originated from
- * Dean Edwards' addEvent library.
- */
-jQuery.event = {
-
- // Bind an event to an element
- // Original by Dean Edwards
- add: function(elem, types, handler, data) {
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
- return;
-
- // For whatever reason, IE has trouble passing the window object
- // around, causing it to be cloned in the process
- if ( elem.setInterval && elem != window )
- elem = window;
-
- // Make sure that the function being executed has a unique ID
- if ( !handler.guid )
- handler.guid = this.guid++;
-
- // if data is passed, bind to handler
- if ( data !== undefined ) {
- // Create temporary function pointer to original handler
- var fn = handler;
-
- // Create unique handler function, wrapped around original handler
- handler = this.proxy( fn );
-
- // Store data in unique handler
- handler.data = data;
- }
-
- // Init the element's event structure
- var events = jQuery.data(elem, "events") || jQuery.data(elem, "events", {}),
- handle = jQuery.data(elem, "handle") || jQuery.data(elem, "handle", function(){
- // Handle the second event of a trigger and when
- // an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && !jQuery.event.triggered ?
- jQuery.event.handle.apply(arguments.callee.elem, arguments) :
- undefined;
- });
- // Add elem as a property of the handle function
- // This is to prevent a memory leak with non-native
- // event in IE.
- handle.elem = elem;
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- jQuery.each(types.split(/\s+/), function(index, type) {
- // Namespaced event handlers
- var namespaces = type.split(".");
- type = namespaces.shift();
- handler.type = namespaces.slice().sort().join(".");
-
- // Get the current list of functions bound to this event
- var handlers = events[type];
-
- if ( jQuery.event.specialAll[type] )
- jQuery.event.specialAll[type].setup.call(elem, data, namespaces);
-
- // Init the event handler queue
- if (!handlers) {
- handlers = events[type] = {};
-
- // Check for a special event handler
- // Only use addEventListener/attachEvent if the special
- // events handler returns false
- if ( !jQuery.event.special[type] || jQuery.event.special[type].setup.call(elem, data, namespaces) === false ) {
- // Bind the global event handler to the element
- if (elem.addEventListener)
- elem.addEventListener(type, handle, false);
- else if (elem.attachEvent)
- elem.attachEvent("on" + type, handle);
- }
- }
-
- // Add the function to the element's handler list
- handlers[handler.guid] = handler;
-
- // Keep track of which events have been used, for global triggering
- jQuery.event.global[type] = true;
- });
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- guid: 1,
- global: {},
-
- // Detach an event or set of events from an element
- remove: function(elem, types, handler) {
- // don't do events on text and comment nodes
- if ( elem.nodeType == 3 || elem.nodeType == 8 )
- return;
-
- var events = jQuery.data(elem, "events"), ret, index;
-
- if ( events ) {
- // Unbind all events for the element
- if ( types === undefined || (typeof types === "string" && types.charAt(0) == ".") )
- for ( var type in events )
- this.remove( elem, type + (types || "") );
- else {
- // types is actually an event object here
- if ( types.type ) {
- handler = types.handler;
- types = types.type;
- }
-
- // Handle multiple events seperated by a space
- // jQuery(...).unbind("mouseover mouseout", fn);
- jQuery.each(types.split(/\s+/), function(index, type){
- // Namespaced event handlers
- var namespaces = type.split(".");
- type = namespaces.shift();
- var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
-
- if ( events[type] ) {
- // remove the given handler for the given type
- if ( handler )
- delete events[type][handler.guid];
-
- // remove all handlers for the given type
- else
- for ( var handle in events[type] )
- // Handle the removal of namespaced events
- if ( namespace.test(events[type][handle].type) )
- delete events[type][handle];
-
- if ( jQuery.event.specialAll[type] )
- jQuery.event.specialAll[type].teardown.call(elem, namespaces);
-
- // remove generic event handler if no more handlers exist
- for ( ret in events[type] ) break;
- if ( !ret ) {
- if ( !jQuery.event.special[type] || jQuery.event.special[type].teardown.call(elem, namespaces) === false ) {
- if (elem.removeEventListener)
- elem.removeEventListener(type, jQuery.data(elem, "handle"), false);
- else if (elem.detachEvent)
- elem.detachEvent("on" + type, jQuery.data(elem, "handle"));
- }
- ret = null;
- delete events[type];
- }
- }
- });
- }
-
- // Remove the expando if it's no longer used
- for ( ret in events ) break;
- if ( !ret ) {
- var handle = jQuery.data( elem, "handle" );
- if ( handle ) handle.elem = null;
- jQuery.removeData( elem, "events" );
- jQuery.removeData( elem, "handle" );
- }
- }
- },
-
- // bubbling is internal
- trigger: function( event, data, elem, bubbling ) {
- // Event object or event type
- var type = event.type || event;
-
- if( !bubbling ){
- event = typeof event === "object" ?
- // jQuery.Event object
- event[expando] ? event :
- // Object literal
- jQuery.extend( jQuery.Event(type), event ) :
- // Just the event type (string)
- jQuery.Event(type);
-
- if ( type.indexOf("!") >= 0 ) {
- event.type = type = type.slice(0, -1);
- event.exclusive = true;
- }
-
- // Handle a global trigger
- if ( !elem ) {
- // Don't bubble custom events when global (to avoid too much overhead)
- event.stopPropagation();
- // Only trigger if we've ever bound an event for it
- if ( this.global[type] )
- jQuery.each( jQuery.cache, function(){
- if ( this.events && this.events[type] )
- jQuery.event.trigger( event, data, this.handle.elem );
- });
- }
-
- // Handle triggering a single element
-
- // don't do events on text and comment nodes
- if ( !elem || elem.nodeType == 3 || elem.nodeType == 8 )
- return undefined;
-
- // Clean up in case it is reused
- event.result = undefined;
- event.target = elem;
-
- // Clone the incoming data, if any
- data = jQuery.makeArray(data);
- data.unshift( event );
- }
-
- event.currentTarget = elem;
-
- // Trigger the event, it is assumed that "handle" is a function
- var handle = jQuery.data(elem, "handle");
- if ( handle )
- handle.apply( elem, data );
-
- // Handle triggering native .onfoo handlers (and on links since we don't call .click() for links)
- if ( (!elem[type] || (jQuery.nodeName(elem, 'a') && type == "click")) && elem["on"+type] && elem["on"+type].apply( elem, data ) === false )
- event.result = false;
-
- // Trigger the native events (except for clicks on links)
- if ( !bubbling && elem[type] && !event.isDefaultPrevented() && !(jQuery.nodeName(elem, 'a') && type == "click") ) {
- this.triggered = true;
- try {
- elem[ type ]();
- // prevent IE from throwing an error for some hidden elements
- } catch (e) {}
- }
-
- this.triggered = false;
-
- if ( !event.isPropagationStopped() ) {
- var parent = elem.parentNode || elem.ownerDocument;
- if ( parent )
- jQuery.event.trigger(event, data, parent, true);
- }
- },
-
- handle: function(event) {
- // returned undefined or false
- var all, handlers;
-
- event = arguments[0] = jQuery.event.fix( event || window.event );
- event.currentTarget = this;
-
- // Namespaced event handlers
- var namespaces = event.type.split(".");
- event.type = namespaces.shift();
-
- // Cache this now, all = true means, any handler
- all = !namespaces.length && !event.exclusive;
-
- var namespace = RegExp("(^|\\.)" + namespaces.slice().sort().join(".*\\.") + "(\\.|$)");
-
- handlers = ( jQuery.data(this, "events") || {} )[event.type];
-
- for ( var j in handlers ) {
- var handler = handlers[j];
-
- // Filter the functions by class
- if ( all || namespace.test(handler.type) ) {
- // Pass in a reference to the handler function itself
- // So that we can later remove it
- event.handler = handler;
- event.data = handler.data;
-
- var ret = handler.apply(this, arguments);
-
- if( ret !== undefined ){
- event.result = ret;
- if ( ret === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
-
- if( event.isImmediatePropagationStopped() )
- break;
-
- }
- }
- },
-
- props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-
- fix: function(event) {
- if ( event[expando] )
- return event;
-
- // store a copy of the original event object
- // and "clone" to set read-only properties
- var originalEvent = event;
- event = jQuery.Event( originalEvent );
-
- for ( var i = this.props.length, prop; i; ){
- prop = this.props[ --i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Fix target property, if necessary
- if ( !event.target )
- event.target = event.srcElement || document; // Fixes #1925 where srcElement might not be defined either
-
- // check if target is a textnode (safari)
- if ( event.target.nodeType == 3 )
- event.target = event.target.parentNode;
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && event.fromElement )
- event.relatedTarget = event.fromElement == event.target ? event.toElement : event.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && event.clientX != null ) {
- var doc = document.documentElement, body = document.body;
- event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc.clientLeft || 0);
- event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc.clientTop || 0);
- }
-
- // Add which for key events
- if ( !event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode) )
- event.which = event.charCode || event.keyCode;
-
- // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs)
- if ( !event.metaKey && event.ctrlKey )
- event.metaKey = event.ctrlKey;
-
- // Add which for click: 1 == left; 2 == middle; 3 == right
- // Note: button is not normalized, so don't use it
- if ( !event.which && event.button )
- event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) ));
-
- return event;
- },
-
- proxy: function( fn, proxy ){
- proxy = proxy || function(){ return fn.apply(this, arguments); };
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || proxy.guid || this.guid++;
- // So proxy can be declared as an argument
- return proxy;
- },
-
- special: {
- ready: {
- // Make sure the ready event is setup
- setup: bindReady,
- teardown: function() {}
- }
- },
-
- specialAll: {
- live: {
- setup: function( selector, namespaces ){
- jQuery.event.add( this, namespaces[0], liveHandler );
- },
- teardown: function( namespaces ){
- if ( namespaces.length ) {
- var remove = 0, name = RegExp("(^|\\.)" + namespaces[0] + "(\\.|$)");
-
- jQuery.each( (jQuery.data(this, "events").live || {}), function(){
- if ( name.test(this.type) )
- remove++;
- });
-
- if ( remove < 1 )
- jQuery.event.remove( this, namespaces[0], liveHandler );
- }
- }
- }
- }
-};
-
-jQuery.Event = function( src ){
- // Allow instantiation without the 'new' keyword
- if( !this.preventDefault )
- return new jQuery.Event(src);
-
- // Event object
- if( src && src.type ){
- this.originalEvent = src;
- this.type = src.type;
- // Event type
- }else
- this.type = src;
-
- // timeStamp is buggy for some events on Firefox(#3843)
- // So we won't rely on the native value
- this.timeStamp = now();
-
- // Mark it as fixed
- this[expando] = true;
-};
-
-function returnFalse(){
- return false;
-}
-function returnTrue(){
- return true;
-}
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- preventDefault: function() {
- this.isDefaultPrevented = returnTrue;
-
- var e = this.originalEvent;
- if( !e )
- return;
- // if preventDefault exists run it on the original event
- if (e.preventDefault)
- e.preventDefault();
- // otherwise set the returnValue property of the original event to false (IE)
- e.returnValue = false;
- },
- stopPropagation: function() {
- this.isPropagationStopped = returnTrue;
-
- var e = this.originalEvent;
- if( !e )
- return;
- // if stopPropagation exists run it on the original event
- if (e.stopPropagation)
- e.stopPropagation();
- // otherwise set the cancelBubble property of the original event to true (IE)
- e.cancelBubble = true;
- },
- stopImmediatePropagation:function(){
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- },
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse
-};
-// Checks if an event happened on an element within another element
-// Used in jQuery.event.special.mouseenter and mouseleave handlers
-var withinElement = function(event) {
- // Check if mouse(over|out) are still within the same parent element
- var parent = event.relatedTarget;
- // Traverse up the tree
- while ( parent && parent != this )
- try { parent = parent.parentNode; }
- catch(e) { parent = this; }
-
- if( parent != this ){
- // set the correct event type
- event.type = event.data;
- // handle event if we actually just moused on to a non sub-element
- jQuery.event.handle.apply( this, arguments );
- }
-};
-
-jQuery.each({
- mouseover: 'mouseenter',
- mouseout: 'mouseleave'
-}, function( orig, fix ){
- jQuery.event.special[ fix ] = {
- setup: function(){
- jQuery.event.add( this, orig, withinElement, fix );
- },
- teardown: function(){
- jQuery.event.remove( this, orig, withinElement );
- }
- };
-});
-
-jQuery.fn.extend({
- bind: function( type, data, fn ) {
- return type == "unload" ? this.one(type, data, fn) : this.each(function(){
- jQuery.event.add( this, type, fn || data, fn && data );
- });
- },
-
- one: function( type, data, fn ) {
- var one = jQuery.event.proxy( fn || data, function(event) {
- jQuery(this).unbind(event, one);
- return (fn || data).apply( this, arguments );
- });
- return this.each(function(){
- jQuery.event.add( this, type, one, fn && data);
- });
- },
-
- unbind: function( type, fn ) {
- return this.each(function(){
- jQuery.event.remove( this, type, fn );
- });
- },
-
- trigger: function( type, data ) {
- return this.each(function(){
- jQuery.event.trigger( type, data, this );
- });
- },
-
- triggerHandler: function( type, data ) {
- if( this[0] ){
- var event = jQuery.Event(type);
- event.preventDefault();
- event.stopPropagation();
- jQuery.event.trigger( event, data, this[0] );
- return event.result;
- }
- },
-
- toggle: function( fn ) {
- // Save reference to arguments for access in closure
- var args = arguments, i = 1;
-
- // link all the functions, so any of them can unbind this click handler
- while( i < args.length )
- jQuery.event.proxy( fn, args[i++] );
-
- return this.click( jQuery.event.proxy( fn, function(event) {
- // Figure out which function to execute
- this.lastToggle = ( this.lastToggle || 0 ) % i;
-
- // Make sure that clicks stop
- event.preventDefault();
-
- // and execute the function
- return args[ this.lastToggle++ ].apply( this, arguments ) || false;
- }));
- },
-
- hover: function(fnOver, fnOut) {
- return this.mouseenter(fnOver).mouseleave(fnOut);
- },
-
- ready: function(fn) {
- // Attach the listeners
- bindReady();
-
- // If the DOM is already ready
- if ( jQuery.isReady )
- // Execute the function immediately
- fn.call( document, jQuery );
-
- // Otherwise, remember the function for later
- else
- // Add the function to the wait list
- jQuery.readyList.push( fn );
-
- return this;
- },
-
- live: function( type, fn ){
- var proxy = jQuery.event.proxy( fn );
- proxy.guid += this.selector + type;
-
- jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );
-
- return this;
- },
-
- die: function( type, fn ){
- jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
- return this;
- }
-});
-
-function liveHandler( event ){
- var check = RegExp("(^|\\.)" + event.type + "(\\.|$)"),
- stop = true,
- elems = [];
-
- jQuery.each(jQuery.data(this, "events").live || [], function(i, fn){
- if ( check.test(fn.type) ) {
- var elem = jQuery(event.target).closest(fn.data)[0];
- if ( elem )
- elems.push({ elem: elem, fn: fn });
- }
- });
-
- elems.sort(function(a,b) {
- return jQuery.data(a.elem, "closest") - jQuery.data(b.elem, "closest");
- });
-
- jQuery.each(elems, function(){
- if ( this.fn.call(this.elem, event, this.fn.data) === false )
- return (stop = false);
- });
-
- return stop;
-}
-
-function liveConvert(type, selector){
- return ["live", type, selector.replace(/\./g, "`").replace(/ /g, "|")].join(".");
-}
-
-jQuery.extend({
- isReady: false,
- readyList: [],
- // Handle when the DOM is ready
- ready: function() {
- // Make sure that the DOM is not already loaded
- if ( !jQuery.isReady ) {
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If there are functions bound, to execute
- if ( jQuery.readyList ) {
- // Execute all of them
- jQuery.each( jQuery.readyList, function(){
- this.call( document, jQuery );
- });
-
- // Reset the list of functions
- jQuery.readyList = null;
- }
-
- // Trigger any bound ready events
- jQuery(document).triggerHandler("ready");
- }
- }
-});
-
-var readyBound = false;
-
-function bindReady(){
- if ( readyBound ) return;
- readyBound = true;
-
- // Mozilla, Opera and webkit nightlies currently support this event
- if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", function(){
- document.removeEventListener( "DOMContentLoaded", arguments.callee, false );
- jQuery.ready();
- }, false );
-
- // If IE event model is used
- } else if ( document.attachEvent ) {
- // ensure firing before onload,
- // maybe late but safe also for iframes
- document.attachEvent("onreadystatechange", function(){
- if ( document.readyState === "complete" ) {
- document.detachEvent( "onreadystatechange", arguments.callee );
- jQuery.ready();
- }
- });
-
- // If IE and not an iframe
- // continually check to see if the document is ready
- if ( document.documentElement.doScroll && window == window.top ) (function(){
- if ( jQuery.isReady ) return;
-
- try {
- // If IE is used, use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- document.documentElement.doScroll("left");
- } catch( error ) {
- setTimeout( arguments.callee, 0 );
- return;
- }
-
- // and execute any waiting functions
- jQuery.ready();
- })();
- }
-
- // A fallback to window.onload, that will always work
- jQuery.event.add( window, "load", jQuery.ready );
-}
-
-jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
- "mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave," +
- "change,select,submit,keydown,keypress,keyup,error").split(","), function(i, name){
-
- // Handle event binding
- jQuery.fn[name] = function(fn){
- return fn ? this.bind(name, fn) : this.trigger(name);
- };
-});
-
-// Prevent memory leaks in IE
-// And prevent errors on refresh with events like mouseover in other browsers
-// Window isn't included so as not to unbind existing unload events
-jQuery( window ).bind( 'unload', function(){
- for ( var id in jQuery.cache )
- // Skip the window
- if ( id != 1 && jQuery.cache[ id ].handle )
- jQuery.event.remove( jQuery.cache[ id ].handle.elem );
-});
-(function(){
-
- jQuery.support = {};
-
- var root = document.documentElement,
- script = document.createElement("script"),
- div = document.createElement("div"),
- id = "script" + (new Date).getTime();
-
- div.style.display = "none";
- div.innerHTML = ' <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>';
-
- var all = div.getElementsByTagName("*"),
- a = div.getElementsByTagName("a")[0];
-
- // Can't get basic test support
- if ( !all || !all.length || !a ) {
- return;
- }
-
- jQuery.support = {
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType == 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that you can get all elements in an <object> element
- // IE 7 always returns no results
- objectAll: !!div.getElementsByTagName("object")[0]
- .getElementsByTagName("*").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText insted)
- style: /red/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: a.getAttribute("href") === "/a",
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- opacity: a.style.opacity === "0.5",
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Will be defined later
- scriptEval: false,
- noCloneEvent: true,
- boxModel: null
- };
-
- script.type = "text/javascript";
- try {
- script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
- } catch(e){}
-
- root.insertBefore( script, root.firstChild );
-
- // Make sure that the execution of code works by injecting a script
- // tag with appendChild/createTextNode
- // (IE doesn't support this, fails, and uses .text instead)
- if ( window[ id ] ) {
- jQuery.support.scriptEval = true;
- delete window[ id ];
- }
-
- root.removeChild( script );
-
- if ( div.attachEvent && div.fireEvent ) {
- div.attachEvent("onclick", function(){
- // Cloning a node shouldn't copy over any
- // bound event handlers (IE does this)
- jQuery.support.noCloneEvent = false;
- div.detachEvent("onclick", arguments.callee);
- });
- div.cloneNode(true).fireEvent("onclick");
- }
-
- // Figure out if the W3C box model works as expected
- // document.body must exist before we can do this
- jQuery(function(){
- var div = document.createElement("div");
- div.style.width = div.style.paddingLeft = "1px";
-
- document.body.appendChild( div );
- jQuery.boxModel = jQuery.support.boxModel = div.offsetWidth === 2;
- document.body.removeChild( div ).style.display = 'none';
- });
-})();
-
-var styleFloat = jQuery.support.cssFloat ? "cssFloat" : "styleFloat";
-
-jQuery.props = {
- "for": "htmlFor",
- "class": "className",
- "float": styleFloat,
- cssFloat: styleFloat,
- styleFloat: styleFloat,
- readonly: "readOnly",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- rowspan: "rowSpan",
- tabindex: "tabIndex"
-};
-jQuery.fn.extend({
- // Keep a copy of the old load
- _load: jQuery.fn.load,
-
- load: function( url, params, callback ) {
- if ( typeof url !== "string" )
- return this._load( url );
-
- var off = url.indexOf(" ");
- if ( off >= 0 ) {
- var selector = url.slice(off, url.length);
- url = url.slice(0, off);
- }
-
- // Default to a GET request
- var type = "GET";
-
- // If the second parameter was provided
- if ( params )
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
- // We assume that it's the callback
- callback = params;
- params = null;
-
- // Otherwise, build a param string
- } else if( typeof params === "object" ) {
- params = jQuery.param( params );
- type = "POST";
- }
-
- var self = this;
-
- // Request the remote document
- jQuery.ajax({
- url: url,
- type: type,
- dataType: "html",
- data: params,
- complete: function(res, status){
- // If successful, inject the HTML into all the matched elements
- if ( status == "success" || status == "notmodified" )
- // See if a selector was specified
- self.html( selector ?
- // Create a dummy div to hold the results
- jQuery("<div/>")
- // inject the contents of the document in, removing the scripts
- // to avoid any 'Permission Denied' errors in IE
- .append(res.responseText.replace(/<script(.|\s)*?\/script>/g, ""))
-
- // Locate the specified elements
- .find(selector) :
-
- // If not, just inject the full result
- res.responseText );
-
- if( callback )
- self.each( callback, [res.responseText, status, res] );
- }
- });
- return this;
- },
-
- serialize: function() {
- return jQuery.param(this.serializeArray());
- },
- serializeArray: function() {
- return this.map(function(){
- return this.elements ? jQuery.makeArray(this.elements) : this;
- })
- .filter(function(){
- return this.name && !this.disabled &&
- (this.checked || /select|textarea/i.test(this.nodeName) ||
- /text|hidden|password|search/i.test(this.type));
- })
- .map(function(i, elem){
- var val = jQuery(this).val();
- return val == null ? null :
- jQuery.isArray(val) ?
- jQuery.map( val, function(val, i){
- return {name: elem.name, value: val};
- }) :
- {name: elem.name, value: val};
- }).get();
- }
-});
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( "ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(i,o){
- jQuery.fn[o] = function(f){
- return this.bind(o, f);
- };
-});
-
-var jsc = now();
-
-jQuery.extend({
-
- get: function( url, data, callback, type ) {
- // shift arguments if data argument was ommited
- if ( jQuery.isFunction( data ) ) {
- callback = data;
- data = null;
- }
-
- return jQuery.ajax({
- type: "GET",
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- },
-
- getScript: function( url, callback ) {
- return jQuery.get(url, null, callback, "script");
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get(url, data, callback, "json");
- },
-
- post: function( url, data, callback, type ) {
- if ( jQuery.isFunction( data ) ) {
- callback = data;
- data = {};
- }
-
- return jQuery.ajax({
- type: "POST",
- url: url,
- data: data,
- success: callback,
- dataType: type
- });
- },
-
- ajaxSetup: function( settings ) {
- jQuery.extend( jQuery.ajaxSettings, settings );
- },
-
- ajaxSettings: {
- url: location.href,
- global: true,
- type: "GET",
- contentType: "application/x-www-form-urlencoded",
- processData: true,
- async: true,
- /*
- timeout: 0,
- data: null,
- username: null,
- password: null,
- */
- // Create the request object; Microsoft failed to properly
- // implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
- // This function can be overriden by calling jQuery.ajaxSetup
- xhr:function(){
- return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
- },
- accepts: {
- xml: "application/xml, text/xml",
- html: "text/html",
- script: "text/javascript, application/javascript",
- json: "application/json, text/javascript",
- text: "text/plain",
- _default: "*/*"
- }
- },
-
- // Last-Modified header cache for next request
- lastModified: {},
-
- ajax: function( s ) {
- // Extend the settings, but re-extend 's' so that it can be
- // checked again later (in the test suite, specifically)
- s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
-
- var jsonp, jsre = /=\?(&|$)/g, status, data,
- type = s.type.toUpperCase();
-
- // convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" )
- s.data = jQuery.param(s.data);
-
- // Handle JSONP Parameter Callbacks
- if ( s.dataType == "jsonp" ) {
- if ( type == "GET" ) {
- if ( !s.url.match(jsre) )
- s.url += (s.url.match(/\?/) ? "&" : "?") + (s.jsonp || "callback") + "=?";
- } else if ( !s.data || !s.data.match(jsre) )
- s.data = (s.data ? s.data + "&" : "") + (s.jsonp || "callback") + "=?";
- s.dataType = "json";
- }
-
- // Build temporary JSONP function
- if ( s.dataType == "json" && (s.data && s.data.match(jsre) || s.url.match(jsre)) ) {
- jsonp = "jsonp" + jsc++;
-
- // Replace the =? sequence both in the query string and the data
- if ( s.data )
- s.data = (s.data + "").replace(jsre, "=" + jsonp + "$1");
- s.url = s.url.replace(jsre, "=" + jsonp + "$1");
-
- // We need to make sure
- // that a JSONP style response is executed properly
- s.dataType = "script";
-
- // Handle JSONP-style loading
- window[ jsonp ] = function(tmp){
- data = tmp;
- success();
- complete();
- // Garbage collect
- window[ jsonp ] = undefined;
- try{ delete window[ jsonp ]; } catch(e){}
- if ( head )
- head.removeChild( script );
- };
- }
-
- if ( s.dataType == "script" && s.cache == null )
- s.cache = false;
-
- if ( s.cache === false && type == "GET" ) {
- var ts = now();
- // try replacing _= if it is there
- var ret = s.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + ts + "$2");
- // if nothing was replaced, add timestamp to the end
- s.url = ret + ((ret == s.url) ? (s.url.match(/\?/) ? "&" : "?") + "_=" + ts : "");
- }
-
- // If data is available, append data to url for get requests
- if ( s.data && type == "GET" ) {
- s.url += (s.url.match(/\?/) ? "&" : "?") + s.data;
-
- // IE likes to send both get and post data, prevent this
- s.data = null;
- }
-
- // Watch for a new set of requests
- if ( s.global && ! jQuery.active++ )
- jQuery.event.trigger( "ajaxStart" );
-
- // Matches an absolute URL, and saves the domain
- var parts = /^(\w+:)?\/\/([^\/?#]+)/.exec( s.url );
-
- // If we're requesting a remote document
- // and trying to load JSON or Script with a GET
- if ( s.dataType == "script" && type == "GET" && parts
- && ( parts[1] && parts[1] != location.protocol || parts[2] != location.host )){
-
- var head = document.getElementsByTagName("head")[0];
- var script = document.createElement("script");
- script.src = s.url;
- if (s.scriptCharset)
- script.charset = s.scriptCharset;
-
- // Handle Script loading
- if ( !jsonp ) {
- var done = false;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function(){
- if ( !done && (!this.readyState ||
- this.readyState == "loaded" || this.readyState == "complete") ) {
- done = true;
- success();
- complete();
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
- head.removeChild( script );
- }
- };
- }
-
- head.appendChild(script);
-
- // We handle everything using the script element injection
- return undefined;
- }
-
- var requestDone = false;
-
- // Create the request object
- var xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if( s.username )
- xhr.open(type, s.url, s.async, s.username, s.password);
- else
- xhr.open(type, s.url, s.async);
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- // Set the correct header, if data is being sent
- if ( s.data )
- xhr.setRequestHeader("Content-Type", s.contentType);
-
- // Set the If-Modified-Since header, if ifModified mode.
- if ( s.ifModified )
- xhr.setRequestHeader("If-Modified-Since",
- jQuery.lastModified[s.url] || "Thu, 01 Jan 1970 00:00:00 GMT" );
-
- // Set header so the called script knows that it's an XMLHttpRequest
- xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest");
-
- // Set the Accepts header for the server, depending on the dataType
- xhr.setRequestHeader("Accept", s.dataType && s.accepts[ s.dataType ] ?
- s.accepts[ s.dataType ] + ", */*" :
- s.accepts._default );
- } catch(e){}
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && s.beforeSend(xhr, s) === false ) {
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active )
- jQuery.event.trigger( "ajaxStop" );
- // close opended socket
- xhr.abort();
- return false;
- }
-
- if ( s.global )
- jQuery.event.trigger("ajaxSend", [xhr, s]);
-
- // Wait for a response to come back
- var onreadystatechange = function(isTimeout){
- // The request was aborted, clear the interval and decrement jQuery.active
- if (xhr.readyState == 0) {
- if (ival) {
- // clear poll interval
- clearInterval(ival);
- ival = null;
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active )
- jQuery.event.trigger( "ajaxStop" );
- }
- // The transfer is complete and the data is available, or the request timed out
- } else if ( !requestDone && xhr && (xhr.readyState == 4 || isTimeout == "timeout") ) {
- requestDone = true;
-
- // clear poll interval
- if (ival) {
- clearInterval(ival);
- ival = null;
- }
-
- status = isTimeout == "timeout" ? "timeout" :
- !jQuery.httpSuccess( xhr ) ? "error" :
- s.ifModified && jQuery.httpNotModified( xhr, s.url ) ? "notmodified" :
- "success";
-
- if ( status == "success" ) {
- // Watch for, and catch, XML document parse errors
- try {
- // process the data (runs the xml through httpData regardless of callback)
- data = jQuery.httpData( xhr, s.dataType, s );
- } catch(e) {
- status = "parsererror";
- }
- }
-
- // Make sure that the request was successful or notmodified
- if ( status == "success" ) {
- // Cache Last-Modified header, if ifModified mode.
- var modRes;
- try {
- modRes = xhr.getResponseHeader("Last-Modified");
- } catch(e) {} // swallow exception thrown by FF if header is not available
-
- if ( s.ifModified && modRes )
- jQuery.lastModified[s.url] = modRes;
-
- // JSONP handles its own success callback
- if ( !jsonp )
- success();
- } else
- jQuery.handleError(s, xhr, status);
-
- // Fire the complete handlers
- complete();
-
- if ( isTimeout )
- xhr.abort();
-
- // Stop memory leaks
- if ( s.async )
- xhr = null;
- }
- };
-
- if ( s.async ) {
- // don't attach the handler to the request, just poll it instead
- var ival = setInterval(onreadystatechange, 13);
-
- // Timeout checker
- if ( s.timeout > 0 )
- setTimeout(function(){
- // Check to see if the request is still happening
- if ( xhr && !requestDone )
- onreadystatechange( "timeout" );
- }, s.timeout);
- }
-
- // Send the data
- try {
- xhr.send(s.data);
- } catch(e) {
- jQuery.handleError(s, xhr, null, e);
- }
-
- // firefox 1.5 doesn't fire statechange for sync requests
- if ( !s.async )
- onreadystatechange();
-
- function success(){
- // If a local callback was specified, fire it and pass it the data
- if ( s.success )
- s.success( data, status );
-
- // Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxSuccess", [xhr, s] );
- }
-
- function complete(){
- // Process result
- if ( s.complete )
- s.complete(xhr, status);
-
- // The request was completed
- if ( s.global )
- jQuery.event.trigger( "ajaxComplete", [xhr, s] );
-
- // Handle the global AJAX counter
- if ( s.global && ! --jQuery.active )
- jQuery.event.trigger( "ajaxStop" );
- }
-
- // return XMLHttpRequest to allow aborting the request etc.
- return xhr;
- },
-
- handleError: function( s, xhr, status, e ) {
- // If a local callback was specified, fire it
- if ( s.error ) s.error( xhr, status, e );
-
- // Fire the global callback
- if ( s.global )
- jQuery.event.trigger( "ajaxError", [xhr, s, e] );
- },
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Determines if an XMLHttpRequest was successful or not
- httpSuccess: function( xhr ) {
- try {
- // IE error sometimes returns 1223 when it should be 204 so treat it as success, see #1450
- return !xhr.status && location.protocol == "file:" ||
- ( xhr.status >= 200 && xhr.status < 300 ) || xhr.status == 304 || xhr.status == 1223;
- } catch(e){}
- return false;
- },
-
- // Determines if an XMLHttpRequest returns NotModified
- httpNotModified: function( xhr, url ) {
- try {
- var xhrRes = xhr.getResponseHeader("Last-Modified");
-
- // Firefox always returns 200. check Last-Modified date
- return xhr.status == 304 || xhrRes == jQuery.lastModified[url];
- } catch(e){}
- return false;
- },
-
- httpData: function( xhr, type, s ) {
- var ct = xhr.getResponseHeader("content-type"),
- xml = type == "xml" || !type && ct && ct.indexOf("xml") >= 0,
- data = xml ? xhr.responseXML : xhr.responseText;
-
- if ( xml && data.documentElement.tagName == "parsererror" )
- throw "parsererror";
-
- // Allow a pre-filtering function to sanitize the response
- // s != null is checked to keep backwards compatibility
- if( s && s.dataFilter )
- data = s.dataFilter( data, type );
-
- // The filter can actually parse the response
- if( typeof data === "string" ){
-
- // If the type is "script", eval it in global context
- if ( type == "script" )
- jQuery.globalEval( data );
-
- // Get the JavaScript object, if JSON is used.
- if ( type == "json" )
- data = window["eval"]("(" + data + ")");
- }
-
- return data;
- },
-
- // Serialize an array of form elements or a set of
- // key/values into a query string
- param: function( a ) {
- var s = [ ];
-
- function add( key, value ){
- s[ s.length ] = encodeURIComponent(key) + '=' + encodeURIComponent(value);
- };
-
- // If an array was passed in, assume that it is an array
- // of form elements
- if ( jQuery.isArray(a) || a.jquery )
- // Serialize the form elements
- jQuery.each( a, function(){
- add( this.name, this.value );
- });
-
- // Otherwise, assume that it's an object of key/value pairs
- else
- // Serialize the key/values
- for ( var j in a )
- // If the value is an array then the key names need to be repeated
- if ( jQuery.isArray(a[j]) )
- jQuery.each( a[j], function(){
- add( j, this );
- });
- else
- add( j, jQuery.isFunction(a[j]) ? a[j]() : a[j] );
-
- // Return the resulting serialization
- return s.join("&").replace(/%20/g, "+");
- }
-
-});
-var elemdisplay = {},
- timerId,
- fxAttrs = [
- // height animations
- [ "height", "marginTop", "marginBottom", "paddingTop", "paddingBottom" ],
- // width animations
- [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
- // opacity animations
- [ "opacity" ]
- ];
-
-function genFx( type, num ){
- var obj = {};
- jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function(){
- obj[ this ] = type;
- });
- return obj;
-}
-
-jQuery.fn.extend({
- show: function(speed,callback){
- if ( speed ) {
- return this.animate( genFx("show", 3), speed, callback);
- } else {
- for ( var i = 0, l = this.length; i < l; i++ ){
- var old = jQuery.data(this[i], "olddisplay");
-
- this[i].style.display = old || "";
-
- if ( jQuery.css(this[i], "display") === "none" ) {
- var tagName = this[i].tagName, display;
-
- if ( elemdisplay[ tagName ] ) {
- display = elemdisplay[ tagName ];
- } else {
- var elem = jQuery("<" + tagName + " />").appendTo("body");
-
- display = elem.css("display");
- if ( display === "none" )
- display = "block";
-
- elem.remove();
-
- elemdisplay[ tagName ] = display;
- }
-
- jQuery.data(this[i], "olddisplay", display);
- }
- }
-
- // Set the display of the elements in a second loop
- // to avoid the constant reflow
- for ( var i = 0, l = this.length; i < l; i++ ){
- this[i].style.display = jQuery.data(this[i], "olddisplay") || "";
- }
-
- return this;
- }
- },
-
- hide: function(speed,callback){
- if ( speed ) {
- return this.animate( genFx("hide", 3), speed, callback);
- } else {
- for ( var i = 0, l = this.length; i < l; i++ ){
- var old = jQuery.data(this[i], "olddisplay");
- if ( !old && old !== "none" )
- jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
- }
-
- // Set the display of the elements in a second loop
- // to avoid the constant reflow
- for ( var i = 0, l = this.length; i < l; i++ ){
- this[i].style.display = "none";
- }
-
- return this;
- }
- },
-
- // Save the old toggle function
- _toggle: jQuery.fn.toggle,
-
- toggle: function( fn, fn2 ){
- var bool = typeof fn === "boolean";
-
- return jQuery.isFunction(fn) && jQuery.isFunction(fn2) ?
- this._toggle.apply( this, arguments ) :
- fn == null || bool ?
- this.each(function(){
- var state = bool ? fn : jQuery(this).is(":hidden");
- jQuery(this)[ state ? "show" : "hide" ]();
- }) :
- this.animate(genFx("toggle", 3), fn, fn2);
- },
-
- fadeTo: function(speed,to,callback){
- return this.animate({opacity: to}, speed, callback);
- },
-
- animate: function( prop, speed, easing, callback ) {
- var optall = jQuery.speed(speed, easing, callback);
-
- return this[ optall.queue === false ? "each" : "queue" ](function(){
-
- var opt = jQuery.extend({}, optall), p,
- hidden = this.nodeType == 1 && jQuery(this).is(":hidden"),
- self = this;
-
- for ( p in prop ) {
- if ( prop[p] == "hide" && hidden || prop[p] == "show" && !hidden )
- return opt.complete.call(this);
-
- if ( ( p == "height" || p == "width" ) && this.style ) {
- // Store display property
- opt.display = jQuery.css(this, "display");
-
- // Make sure that nothing sneaks out
- opt.overflow = this.style.overflow;
- }
- }
-
- if ( opt.overflow != null )
- this.style.overflow = "hidden";
-
- opt.curAnim = jQuery.extend({}, prop);
-
- jQuery.each( prop, function(name, val){
- var e = new jQuery.fx( self, opt, name );
-
- if ( /toggle|show|hide/.test(val) )
- e[ val == "toggle" ? hidden ? "show" : "hide" : val ]( prop );
- else {
- var parts = val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),
- start = e.cur(true) || 0;
-
- if ( parts ) {
- var end = parseFloat(parts[2]),
- unit = parts[3] || "px";
-
- // We need to compute starting value
- if ( unit != "px" ) {
- self.style[ name ] = (end || 1) + unit;
- start = ((end || 1) / e.cur(true)) * start;
- self.style[ name ] = start + unit;
- }
-
- // If a +=/-= token was provided, we're doing a relative animation
- if ( parts[1] )
- end = ((parts[1] == "-=" ? -1 : 1) * end) + start;
-
- e.custom( start, end, unit );
- } else
- e.custom( start, val, "" );
- }
- });
-
- // For JS strict compliance
- return true;
- });
- },
-
- stop: function(clearQueue, gotoEnd){
- var timers = jQuery.timers;
-
- if (clearQueue)
- this.queue([]);
-
- this.each(function(){
- // go in reverse order so anything added to the queue during the loop is ignored
- for ( var i = timers.length - 1; i >= 0; i-- )
- if ( timers[i].elem == this ) {
- if (gotoEnd)
- // force the next step to be the last
- timers[i](true);
- timers.splice(i, 1);
- }
- });
-
- // start the next in the queue if the last step wasn't forced
- if (!gotoEnd)
- this.dequeue();
-
- return this;
- }
-
-});
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show", 1),
- slideUp: genFx("hide", 1),
- slideToggle: genFx("toggle", 1),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" }
-}, function( name, props ){
- jQuery.fn[ name ] = function( speed, callback ){
- return this.animate( props, speed, callback );
- };
-});
-
-jQuery.extend({
-
- speed: function(speed, easing, fn) {
- var opt = typeof speed === "object" ? speed : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction(easing) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- jQuery.fx.speeds[opt.duration] || jQuery.fx.speeds._default;
-
- // Queueing
- opt.old = opt.complete;
- opt.complete = function(){
- if ( opt.queue !== false )
- jQuery(this).dequeue();
- if ( jQuery.isFunction( opt.old ) )
- opt.old.call( this );
- };
-
- return opt;
- },
-
- easing: {
- linear: function( p, n, firstNum, diff ) {
- return firstNum + diff * p;
- },
- swing: function( p, n, firstNum, diff ) {
- return ((-Math.cos(p*Math.PI)/2) + 0.5) * diff + firstNum;
- }
- },
-
- timers: [],
-
- fx: function( elem, options, prop ){
- this.options = options;
- this.elem = elem;
- this.prop = prop;
-
- if ( !options.orig )
- options.orig = {};
- }
-
-});
-
-jQuery.fx.prototype = {
-
- // Simple function for setting a style value
- update: function(){
- if ( this.options.step )
- this.options.step.call( this.elem, this.now, this );
-
- (jQuery.fx.step[this.prop] || jQuery.fx.step._default)( this );
-
- // Set display property to block for height/width animations
- if ( ( this.prop == "height" || this.prop == "width" ) && this.elem.style )
- this.elem.style.display = "block";
- },
-
- // Get the current size
- cur: function(force){
- if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) )
- return this.elem[ this.prop ];
-
- var r = parseFloat(jQuery.css(this.elem, this.prop, force));
- return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
- },
-
- // Start an animation from one number to another
- custom: function(from, to, unit){
- this.startTime = now();
- this.start = from;
- this.end = to;
- this.unit = unit || this.unit || "px";
- this.now = this.start;
- this.pos = this.state = 0;
-
- var self = this;
- function t(gotoEnd){
- return self.step(gotoEnd);
- }
-
- t.elem = this.elem;
-
- if ( t() && jQuery.timers.push(t) && !timerId ) {
- timerId = setInterval(function(){
- var timers = jQuery.timers;
-
- for ( var i = 0; i < timers.length; i++ )
- if ( !timers[i]() )
- timers.splice(i--, 1);
-
- if ( !timers.length ) {
- clearInterval( timerId );
- timerId = undefined;
- }
- }, 13);
- }
- },
-
- // Simple 'show' function
- show: function(){
- // Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
- this.options.show = true;
-
- // Begin the animation
- // Make sure that we start at a small width/height to avoid any
- // flash of content
- this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur());
-
- // Start by showing the element
- jQuery(this.elem).show();
- },
-
- // Simple 'hide' function
- hide: function(){
- // Remember where we started, so that we can go back to it later
- this.options.orig[this.prop] = jQuery.attr( this.elem.style, this.prop );
- this.options.hide = true;
-
- // Begin the animation
- this.custom(this.cur(), 0);
- },
-
- // Each step of an animation
- step: function(gotoEnd){
- var t = now();
-
- if ( gotoEnd || t >= this.options.duration + this.startTime ) {
- this.now = this.end;
- this.pos = this.state = 1;
- this.update();
-
- this.options.curAnim[ this.prop ] = true;
-
- var done = true;
- for ( var i in this.options.curAnim )
- if ( this.options.curAnim[i] !== true )
- done = false;
-
- if ( done ) {
- if ( this.options.display != null ) {
- // Reset the overflow
- this.elem.style.overflow = this.options.overflow;
-
- // Reset the display
- this.elem.style.display = this.options.display;
- if ( jQuery.css(this.elem, "display") == "none" )
- this.elem.style.display = "block";
- }
-
- // Hide the element if the "hide" operation was done
- if ( this.options.hide )
- jQuery(this.elem).hide();
-
- // Reset the properties, if the item has been hidden or shown
- if ( this.options.hide || this.options.show )
- for ( var p in this.options.curAnim )
- jQuery.attr(this.elem.style, p, this.options.orig[p]);
-
- // Execute the complete function
- this.options.complete.call( this.elem );
- }
-
- return false;
- } else {
- var n = t - this.startTime;
- this.state = n / this.options.duration;
-
- // Perform the easing function, defaults to swing
- this.pos = jQuery.easing[this.options.easing || (jQuery.easing.swing ? "swing" : "linear")](this.state, n, 0, 1, this.options.duration);
- this.now = this.start + ((this.end - this.start) * this.pos);
-
- // Perform the next step of the animation
- this.update();
- }
-
- return true;
- }
-
-};
-
-jQuery.extend( jQuery.fx, {
- speeds:{
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
- },
- step: {
-
- opacity: function(fx){
- jQuery.attr(fx.elem.style, "opacity", fx.now);
- },
-
- _default: function(fx){
- if ( fx.elem.style && fx.elem.style[ fx.prop ] != null )
- fx.elem.style[ fx.prop ] = fx.now + fx.unit;
- else
- fx.elem[ fx.prop ] = fx.now;
- }
- }
-});
-if ( document.documentElement["getBoundingClientRect"] )
- jQuery.fn.offset = function() {
- if ( !this[0] ) return { top: 0, left: 0 };
- if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
- var box = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
- clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,
- top = box.top + (self.pageYOffset || jQuery.boxModel && docElem.scrollTop || body.scrollTop ) - clientTop,
- left = box.left + (self.pageXOffset || jQuery.boxModel && docElem.scrollLeft || body.scrollLeft) - clientLeft;
- return { top: top, left: left };
- };
-else
- jQuery.fn.offset = function() {
- if ( !this[0] ) return { top: 0, left: 0 };
- if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
- jQuery.offset.initialized || jQuery.offset.initialize();
-
- var elem = this[0], offsetParent = elem.offsetParent, prevOffsetParent = elem,
- doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
- body = doc.body, defaultView = doc.defaultView,
- prevComputedStyle = defaultView.getComputedStyle(elem, null),
- top = elem.offsetTop, left = elem.offsetLeft;
-
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
- computedStyle = defaultView.getComputedStyle(elem, null);
- top -= elem.scrollTop, left -= elem.scrollLeft;
- if ( elem === offsetParent ) {
- top += elem.offsetTop, left += elem.offsetLeft;
- if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
- top += parseInt( computedStyle.borderTopWidth, 10) || 0,
- left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
- prevOffsetParent = offsetParent, offsetParent = elem.offsetParent;
- }
- if ( jQuery.offset.subtractsBorderForOverflowNotVisible && computedStyle.overflow !== "visible" )
- top += parseInt( computedStyle.borderTopWidth, 10) || 0,
- left += parseInt( computedStyle.borderLeftWidth, 10) || 0;
- prevComputedStyle = computedStyle;
- }
-
- if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
- top += body.offsetTop,
- left += body.offsetLeft;
-
- if ( prevComputedStyle.position === "fixed" )
- top += Math.max(docElem.scrollTop, body.scrollTop),
- left += Math.max(docElem.scrollLeft, body.scrollLeft);
-
- return { top: top, left: left };
- };
-
-jQuery.offset = {
- initialize: function() {
- if ( this.initialized ) return;
- var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
- html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>';
-
- rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
- for ( prop in rules ) container.style[prop] = rules[prop];
-
- container.innerHTML = html;
- body.insertBefore(container, body.firstChild);
- innerDiv = container.firstChild, checkDiv = innerDiv.firstChild, td = innerDiv.nextSibling.firstChild.firstChild;
-
- this.doesNotAddBorder = (checkDiv.offsetTop !== 5);
- this.doesAddBorderForTableAndCells = (td.offsetTop === 5);
-
- innerDiv.style.overflow = 'hidden', innerDiv.style.position = 'relative';
- this.subtractsBorderForOverflowNotVisible = (checkDiv.offsetTop === -5);
-
- body.style.marginTop = '1px';
- this.doesNotIncludeMarginInBodyOffset = (body.offsetTop === 0);
- body.style.marginTop = bodyMarginTop;
-
- body.removeChild(container);
- this.initialized = true;
- },
-
- bodyOffset: function(body) {
- jQuery.offset.initialized || jQuery.offset.initialize();
- var top = body.offsetTop, left = body.offsetLeft;
- if ( jQuery.offset.doesNotIncludeMarginInBodyOffset )
- top += parseInt( jQuery.curCSS(body, 'marginTop', true), 10 ) || 0,
- left += parseInt( jQuery.curCSS(body, 'marginLeft', true), 10 ) || 0;
- return { top: top, left: left };
- }
-};
-
-
-jQuery.fn.extend({
- position: function() {
- var left = 0, top = 0, results;
-
- if ( this[0] ) {
- // Get *real* offsetParent
- var offsetParent = this.offsetParent(),
-
- // Get correct offsets
- offset = this.offset(),
- parentOffset = /^body|html$/i.test(offsetParent[0].tagName) ? { top: 0, left: 0 } : offsetParent.offset();
-
- // Subtract element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- offset.top -= num( this, 'marginTop' );
- offset.left -= num( this, 'marginLeft' );
-
- // Add offsetParent borders
- parentOffset.top += num( offsetParent, 'borderTopWidth' );
- parentOffset.left += num( offsetParent, 'borderLeftWidth' );
-
- // Subtract the two offsets
- results = {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
- }
-
- return results;
- },
-
- offsetParent: function() {
- var offsetParent = this[0].offsetParent || document.body;
- while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && jQuery.css(offsetParent, 'position') == 'static') )
- offsetParent = offsetParent.offsetParent;
- return jQuery(offsetParent);
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( ['Left', 'Top'], function(i, name) {
- var method = 'scroll' + name;
-
- jQuery.fn[ method ] = function(val) {
- if (!this[0]) return null;
-
- return val !== undefined ?
-
- // Set the scroll offset
- this.each(function() {
- this == window || this == document ?
- window.scrollTo(
- !i ? val : jQuery(window).scrollLeft(),
- i ? val : jQuery(window).scrollTop()
- ) :
- this[ method ] = val;
- }) :
-
- // Return the scroll offset
- this[0] == window || this[0] == document ?
- self[ i ? 'pageYOffset' : 'pageXOffset' ] ||
- jQuery.boxModel && document.documentElement[ method ] ||
- document.body[ method ] :
- this[0][ method ];
- };
-});
-// Create innerHeight, innerWidth, outerHeight and outerWidth methods
-jQuery.each([ "Height", "Width" ], function(i, name){
-
- var tl = i ? "Left" : "Top", // top or left
- br = i ? "Right" : "Bottom", // bottom or right
- lower = name.toLowerCase();
-
- // innerHeight and innerWidth
- jQuery.fn["inner" + name] = function(){
- return this[0] ?
- jQuery.css( this[0], lower, false, "padding" ) :
- null;
- };
-
- // outerHeight and outerWidth
- jQuery.fn["outer" + name] = function(margin) {
- return this[0] ?
- jQuery.css( this[0], lower, false, margin ? "margin" : "border" ) :
- null;
- };
-
- var type = name.toLowerCase();
-
- jQuery.fn[ type ] = function( size ) {
- // Get window width or height
- return this[0] == window ?
- // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
- document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] ||
- document.body[ "client" + name ] :
-
- // Get document width or height
- this[0] == document ?
- // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
- Math.max(
- document.documentElement["client" + name],
- document.body["scroll" + name], document.documentElement["scroll" + name],
- document.body["offset" + name], document.documentElement["offset" + name]
- ) :
-
- // Get or set width or height on the element
- size === undefined ?
- // Get width or height on the element
- (this.length ? jQuery.css( this[0], type ) : null) :
-
- // Set the width or height on the element (default to pixels if value is unitless)
- this.css( type, typeof size === "string" ? size : size + "px" );
- };
-
-});
-})();
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.min.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.min.js
deleted file mode 100644
index 7c243080..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/jquery.min.js
+++ /dev/null
@@ -1,154 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.4.2
- * http://jquery.com/
- *
- * Copyright 2010, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2010, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Sat Feb 13 22:33:48 2010 -0500
- */
-(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
-e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
-j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
-"&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
-true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
-Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
-(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
-a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
-"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
-function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
-c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
-L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
-"isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
-a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
-d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
-a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
-!c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
-true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
-var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
-parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
-false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
-s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
-applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
-else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
-a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
-w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
-cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
-i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
-" ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
-this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
-e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
-c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
-a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
-function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
-k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
-C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
-null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
-e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
-f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
-if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
-fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
-d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
-"events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
-a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
-isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
-{setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
-if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
-e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
-"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
-d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
-!a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
-toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
-u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
-function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
-if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
-e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
-t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
-g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
-for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
-1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
-CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
-relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
-l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
-h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
-CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
-g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
-text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
-setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
-h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
-m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
-"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
-h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
-!h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
-h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
-q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
-if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
-(function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
-function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
-gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
-c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
-{},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
-"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
-d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
-a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
-1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
-a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
-c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
-wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
-prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
-this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
-return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
-""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
-this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
-u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
-1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
-return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
-""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
-c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
-c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
-function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
-Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
-"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
-a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
-a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
-"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
-serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
-function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
-global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
-e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
-"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
-false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
-false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
-c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
-d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
-g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
-1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
-"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
-if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
-this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
-"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
-animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
-j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
-this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
-"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
-c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
-this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
-this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
-e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
-c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
-function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
-this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
-k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
-f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
-a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
-c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
-d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
-"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
-e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/label_quantum.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/label_quantum.js
deleted file mode 100644
index 6e07cbc1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/label_quantum.js
+++ /dev/null
@@ -1,5 +0,0 @@
-zk.afterLoad("zul.wgt", function () {
- zul.wgt.Label.prototype.getEncodedText = function() {
- return zUtl.encodeXML(this._value, {multiline:this._multiline,pre:this._pre, maxlength: this._maxlength}).replace(/_nl_/g, "<br />");
- }
-}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/nova_button.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/nova_button.js
deleted file mode 100644
index 75dc28a1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/nova_button.js
+++ /dev/null
@@ -1,1184 +0,0 @@
-function NovaButton() {
-
-}
-
-NovaButton.prototype = new GControl();
-
-NovaButton.globals = {
- currentButton: null,
- layerOptionContainer: null,
- layerOptionVisible: false,
- searchOptionContainer: null,
- searchOptionVisible: false,
- //new changes
- searchResultContainer: null,
- //new changes
- searchTabSelected: null,
- map: null,
- originalLayerState: null
-};
-
-NovaButton.globals.dragzoom = {
- cornerTopDiv: null,
- cornerRightDiv: null,
- cornerBottomDiv: null,
- cornerLeftDiv: null,
- mapPosition: null,
- outlineDiv: null,
- mapWidth: 0,
- mapHeight: 0,
- mapRatio: 0,
- startX: 0,
- startY: 0,
- zoomArea: null,
- moving: false
-};
-
-// Creates a one DIV for each of the buttons and places them in a container
-// DIV which is returned as our control element.
-NovaButton.prototype.initialize = function(map) {
- var container = document.createElement("div");
- container.style.zIndex = "150";
- var that = this;
-
- // "Cursor" button
- var cursorDiv = document.createElement("div");
- cursorDiv.id = "cursorDiv";
- NovaButton.globals.currentButton = "cursorDiv";
- this.setButtonStyle(cursorDiv, true);
- cursorDiv.style.fontWeight = "bold";
- cursorDiv.appendChild(document.createTextNode("Cursor"));
- GEvent.addDomListener(cursorDiv, "click", function() {
- var globals = NovaButton.globals;
- if (globals.currentButton == "cursorDiv") {
- return;
- }
-
- this.style.fontWeight = "bold";
- globals.currentButton = "cursorDiv";
- if (!map.draggingEnabled()) {
- map.enableDragging();
- }
- document.getElementById("detailDiv").style.fontWeight = "normal";
- document.getElementById("zoomRectangleDiv").style.fontWeight = "normal";
-
- that.resetDragZoom();
- });
-
- // "detail" button
- var detailDiv = document.createElement("div");
- detailDiv.id = "detailDiv";
- this.setButtonStyle(detailDiv, true);
- detailDiv.appendChild(document.createTextNode("Detail"));
- GEvent.addDomListener(detailDiv, "click", function() {
- var globals = NovaButton.globals;
- if (globals.currentButton == "detailDiv") {
- return;
- }
-
- this.style.fontWeight = "bold";
- globals.currentButton = "detailDiv";
- if (map.draggingEnabled()) {
- map.disableDragging();
- }
- document.getElementById("cursorDiv").style.fontWeight = "normal";
- document.getElementById("zoomRectangleDiv").style.fontWeight = "normal";
-
- that.resetDragZoom();
- });
-
- // zoom rectangle button
- var zoomRectangleDiv = document.createElement("div");
- zoomRectangleDiv.id = "zoomRectangleDiv";
- this.setButtonStyle(zoomRectangleDiv, true);
- zoomRectangleDiv.appendChild(document.createTextNode("Zoom Rect."));
- GEvent.addDomListener(zoomRectangleDiv, "click", function() {
- var globals = NovaButton.globals;
- if (globals.currentButton == "zoomRectangleDiv") {
- return;
- }
-
- this.style.fontWeight = "bold";
- globals.currentButton = "zoomRectangleDiv";
-
- if (map.draggingEnabled()) {
- map.disableDragging();
- }
- document.getElementById("cursorDiv").style.fontWeight = "normal";
- document.getElementById("detailDiv").style.fontWeight = "normal";
-
- that.initCover();
- });
-
- // "Zoom In" button
- var zoomInDiv = document.createElement("div");
- this.setButtonStyle(zoomInDiv, true);
- zoomInDiv.appendChild(document.createTextNode("Zoom In"));
- // The "true" argument in the zoomIn() method allows continuous zooming
- GEvent.addDomListener(zoomInDiv, "click", function() {
- //map.zoomIn(null,null,true);
- map.zoomIn();
- });
-
- // "Zoom Out" button
- var zoomOutDiv = document.createElement("div");
- this.setButtonStyle(zoomOutDiv, true);
- zoomOutDiv.style.borderTop = 0+'px';
- zoomOutDiv.appendChild(document.createTextNode("Zoom Out"));
- // The "true" argument in the zoomOut() method allows continuous zooming
- GEvent.addDomListener(zoomOutDiv, "click", function() {
- //map.zoomOut(null,true);
- map.zoomOut();
- });
-
- // "Default View" button
- var defaultViewDiv = document.createElement("div");
- this.setButtonStyle(defaultViewDiv, true);
- defaultViewDiv.appendChild(document.createTextNode("Default View"));
- GEvent.addDomListener(defaultViewDiv, "click", function(e) {
- that.defaultViewClickEvent();
- });
-
- // "layer" button
- var showLayerDiv = document.createElement("div");
- this.setButtonStyle(showLayerDiv, true);
- showLayerDiv.appendChild(document.createTextNode("Layers"));
- GEvent.addDomListener(showLayerDiv, "click", function(e) {
- that.showLayerClickEvent(e);
- });
-
- // initialize layer option
- var layerOptionContainer = document.createElement("div");
- this.setMenuContainerStyle(layerOptionContainer);
- this.initializeLayerDiv(layerOptionContainer);
-
- // "search" button
- var searchDiv = document.createElement("div");
- this.setButtonStyle(searchDiv, true);
- searchDiv.appendChild(document.createTextNode("Search"));
- GEvent.addDomListener(searchDiv, "click", function(e) {
- that.searchClickEvent(e);
- });
-
- var searchOptionContainer = document.createElement("div");
- searchOptionContainer.style.position = "absolute";
- searchOptionContainer.style.left = "100px";
- searchOptionContainer.style.top = "100px";
- searchOptionContainer.style.display = "none";
- this.initializeSearchDiv(searchOptionContainer);
-
- var buttonContainer = document.createElement("div");
- buttonContainer.appendChild(cursorDiv);
- buttonContainer.appendChild(detailDiv);
- //buttonContainer.appendChild(zoomRectangleDiv);
- //buttonContainer.appendChild(zoomInDiv);
- //buttonContainer.appendChild(zoomOutDiv);
- //buttonContainer.appendChild(defaultViewDiv);
- //buttonContainer.appendChild(showLayerDiv);
- //buttonContainer.appendChild(searchDiv);
-
- // zoom area div
- var zoomAreaDiv = document.createElement("div");
- this.setZoomAreaStyle(zoomAreaDiv);
- var DIVS_TO_CREATE = ['outlineDiv', 'cornerTopDiv', 'cornerLeftDiv', 'cornerRightDiv', 'cornerBottomDiv'];
- for (var i=0; i<DIVS_TO_CREATE.length; i++) {
- var id = DIVS_TO_CREATE[i];
- var div = document.createElement("div");
- div.style.position = "absolute";
- div.style.display = "none";
- zoomAreaDiv.appendChild(div);
- NovaButton.globals.dragzoom[id] = div;
- }
-
- GEvent.addDomListener(zoomAreaDiv, 'mousedown', function(e) {
- that.mouseDown(e);
- });
- GEvent.addDomListener(document, 'mousemove', function(e) {
- that.mouseMove(e);
- });
- GEvent.addDomListener(document, 'mouseup', function(e) {
- that.mouseUp(e);
- });
-
- // assign global variable
- NovaButton.globals.layerOptionContainer = layerOptionContainer;
- NovaButton.globals.map = map;
- NovaButton.globals.dragzoom.zoomArea = zoomAreaDiv;
- NovaButton.globals.dragzoom.mapPosition = NovaButtonUtils.getElementPosition(map.getContainer());
- NovaButton.globals.searchOptionContainer = searchOptionContainer;
- this.setDimensions();
-
- zoomAreaDiv.onselectstart = function() {return false;};
-
- //styles
- this.initZoomAreaStyles();
-
- container.appendChild(buttonContainer);
- map.getContainer().appendChild(container);
- //map.getContainer().appendChild(layerOptionContainer);
- //map.getContainer().appendChild(searchOptionContainer);
- document.body.appendChild(layerOptionContainer);
- document.body.appendChild(searchOptionContainer);
- map.getContainer().appendChild(zoomAreaDiv);
-
- return container;
-}
-
-// The control will appear in the top left corner of the map with 5 pixels of padding.
-NovaButton.prototype.getDefaultPosition = function() {
- return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(70, 5));
-}
-
-NovaButton.prototype.setSearchResultStyle = function(container) {
- container.style.width = "300px";
- container.style.height = "150px";
- container.style.background = "#FFFFF0";
- container.style.fontFamily = "Verdana";
- container.style.fontSize = "12px";
- container.style.position = "absolute";
- container.style.border = "1px solid black";
- container.style.top = "201px";
- container.style.left = "0px";
- container.style.display = "none";
- container.style.overflow = "auto";
- container.align = "left";
-}
-
-// Sets the proper CSS for the given button element.
-NovaButton.prototype.setButtonStyle = function(button, horizontalAlign) {
- button.style.color = "black";
- button.style.backgroundColor = "white";
- button.style.fontFamily = "Verdana";
- button.style.fontSize = "12px";
- button.style.fontWeight= "normal";
- button.style.border = "1px solid gray";
- button.style.padding = "0px";
- button.style.marginBottom = "0px";
- button.style.textAlign = "center";
- button.style.width = "80px";
- button.style.height = "15px";
- button.style.cursor = "pointer";
- //button.style.zIndex = "200";
-
- if (horizontalAlign) {
- if(button.addEventListener) {
- button.style.cssFloat = "left" ;
- }
- else {
- button.style.styleFloat = "left" ;
- }
- }
-}
-
-NovaButton.prototype.setTabHeaderStyle = function(header) {
- //header.style.position = "absolute";
- //header.style.zIndex = "2";
- header.align = "left";
-}
-
-NovaButton.prototype.setTabButtonStyle = function(tab) {
- tab.style.padding = "3px 5px 3px 5px";
- tab.style.fontFamily = "Verdana";
- tab.style.fontSize = "12px";
- tab.style.textAlign = "center";
- tab.style.width = "7em";
- tab.style.height = "15px";
- tab.style.cursor = "pointer";
- tab.style.background = "#C6DEFF";
-
- if(tab.addEventListener) {
- tab.style.cssFloat = "left" ;
- }
- else {
- tab.style.styleFloat = "left" ;
- }
-}
-
-NovaButton.prototype.setTabBodyStyle = function(body) {
- body.style.width = "400px";
- body.style.height = "150px";
- body.style.background = "#FFFFF0";
- body.style.fontFamily = "Verdana";
- body.style.fontSize = "12px";
- //body.style.zIndex = "1";
- body.style.padding = "3px 5px 3px 5px";
- body.style.top = "20px";
- body.style.left = "0px";
- body.style.position = "absolute";
- body.style.display = "none";
- body.align = "left";
-}
-
-NovaButton.prototype.setTabFooterStyle = function(footer) {
- footer.style.width = "400px";
- footer.style.height = "20px";
- footer.align = "center";
- footer.style.padding = "3px 5px 3px 5px";
- footer.style.background = "#FFFFF0";
- footer.style.position = "absolute";
- footer.style.top = "175px";
- footer.style.left = "0";
-}
-
-NovaButton.prototype.tabMouseOver = function(e) {
- var tab = Event.element(e);
- tab.style.background = "#ADDFFF";
-}
-
-NovaButton.prototype.tabMouseOut = function(e) {
- var tab = Event.element(e);
- tab.style.background = "#C6DEFF";
-}
-
-NovaButton.prototype.tabClickEvent = function(e) {
- var tab = Event.element(e);
-
- if (tab.id == NovaButton.globals.searchTabSelected) {
- return false;
- }
-
- NovaButton.globals.searchTabSelected = tab.id;
- tab.style.fontWeight = "bold";
-
- if (tab.id == "nodeTab") {
- document.getElementById("nodeBody").style.display = "inline";
- document.getElementById("addressBody").style.display = "none";
- document.getElementById("addressTab").style.fontWeight = "normal";
- }
- else {
- document.getElementById("addressBody").style.display = "inline";
- document.getElementById("nodeBody").style.display = "none";
- document.getElementById("nodeTab").style.fontWeight = "normal";
- }
-}
-
-NovaButton.prototype.initializeSearchDiv = function(searchOptionContainer) {
- var header = document.createElement("div");
- this.setTabHeaderStyle(header);
- var that = this;
-
- var nodeTab = header.appendChild(document.createElement("div"));
- nodeTab.id = "nodeTab";
- this.setTabButtonStyle(nodeTab);
- nodeTab.appendChild(document.createTextNode("Node"));
- GEvent.addDomListener(nodeTab, "mouseover", function(e) {
- that.tabMouseOver(e);
- });
- GEvent.addDomListener(nodeTab, "mouseout", function(e) {
- that.tabMouseOut(e);
- });
- GEvent.addDomListener(nodeTab, "click", function(e) {
- that.tabClickEvent(e);
- });
-
- var addressTab = header.appendChild(document.createElement("div"));
- addressTab.id = "addressTab";
- this.setTabButtonStyle(addressTab);
- addressTab.appendChild(document.createTextNode("Address"));
- GEvent.addDomListener(addressTab, "mouseover", function(e) {
- that.tabMouseOver(e);
- });
- GEvent.addDomListener(addressTab, "mouseout", function(e) {
- that.tabMouseOut(e);
- });
- GEvent.addDomListener(addressTab, "click", function(e) {
- that.tabClickEvent(e);
- });
-
- var body = document.createElement("div");
- var nodeBody = body.appendChild(document.createElement("div"));
- nodeBody.id = "nodeBody";
- this.setTabBodyStyle(nodeBody);
- this.initializeNodeBody(nodeBody);
-
- var addressBody = body.appendChild(document.createElement("div"));
- addressBody.id = "addressBody";
- this.setTabBodyStyle(addressBody);
- this.initializeAddressBody(addressBody);
-
- //new changes
- var searchResultContainer = body.appendChild(document.createElement("div"));
- searchResultContainer.style.opacity = "0.8";
- searchResultContainer.style.filter = 'alpha(opacity=' + (0.6 * 100) + ')';
- this.setSearchResultStyle(searchResultContainer);
- //new changes
-
- var footer = document.createElement("div");
- this.setTabFooterStyle(footer);
- var buttonDiv = footer.appendChild(document.createElement("div"));
- this.setButtonStyle(buttonDiv, false);
- buttonDiv.appendChild(document.createTextNode("Submit"));
- GEvent.addDomListener(buttonDiv, "click", function(e) {
- that.submitSearchClickEvent(e);
- });
-
- searchOptionContainer.appendChild(header);
- searchOptionContainer.appendChild(body);
- searchOptionContainer.appendChild(footer);
- //searchOptionContainer.appendChild(nodeBody);
- //searchOptionContainer.appendChild(addressBody);
-
- // default tab
- nodeTab.style.fontWeight = "bold";
- nodeBody.style.display = "inline";
- NovaButton.globals.searchTabSelected = "nodeTab";
- //new changes
- NovaButton.globals.searchResultContainer = searchResultContainer;
- //new chjanges
-}
-
-NovaButton.prototype.initializeNodeBody = function(nodeBody) {
- var searchByNodeId = document.createElement("input");
- searchByNodeId.type = "radio";
- searchByNodeId.defaultChecked = true;
- searchByNodeId.name = "nodeGroup";
- searchByNodeId.id = "searchByNodeId";
- searchByNodeId.value = "searchByNodeId";
- searchByNodeId.onclick = function () {
- searchByLocation.checked = false;
- searchByNodeId.checked = true;
- };
- nodeBody.appendChild(searchByNodeId);
- nodeBody.appendChild(document.createTextNode("Node ID"));
- nodeBody.appendChild(document.createElement("br"));
-
- var searchByLocation = document.createElement("input");
- searchByLocation.type = "radio";
- searchByLocation.defaultChecked = false;
- searchByLocation.name = "nodeGroup";
- searchByLocation.id = "searchByLocation";
- searchByLocation.value = "searchByLocation";
- // ie bug
- searchByLocation.onclick = function () {
- searchByLocation.checked = true;
- searchByNodeId.checked = false;
- };
- nodeBody.appendChild(searchByLocation);
- nodeBody.appendChild(document.createTextNode("Node Location"));
- nodeBody.appendChild(document.createElement("br"));
- nodeBody.appendChild(document.createElement("br"));
-
- var exactMatchSearch = document.createElement("input");
- exactMatchSearch.type = "checkbox";
- exactMatchSearch.id = "exactMatch";
- nodeBody.appendChild(exactMatchSearch);
- nodeBody.appendChild(document.createTextNode("Exact Match"));
- nodeBody.appendChild(document.createElement("br"));
-
- var searchInput = document.createElement("input");
- searchInput.id = "nodeSearchInput";
- searchInput.setAttribute("type", "text");
- searchInput.setAttribute("size", "60");
-
- nodeBody.appendChild(searchInput);
-}
-
-NovaButton.prototype.initializeAddressBody = function(addressBody) {
- var addressLabel = addressBody.appendChild(document.createElement("div"));
- addressLabel.appendChild(document.createTextNode("Enter address (e.g. 180 park ave, florham park, nj 07932)"));
-
- var searchInput = document.createElement("input");
- searchInput.id = "addressSearchInput";
- searchInput.setAttribute("type", "text");
- searchInput.setAttribute("size", "60");
-
- addressBody.appendChild(searchInput);
-}
-
-//new changes start
-NovaButton.prototype.setSearchResult = function(jsonData) {
- var resultContainer = NovaButton.globals.searchResultContainer;
- for (var i = resultContainer.childNodes.length - 1; i >= 0; i--) {
- resultContainer.removeChild(resultContainer.lastChild);
- }
-
- var table = resultContainer.appendChild(document.createElement("table"));
- var tbody = table.appendChild(document.createElement("tbody"));
- var list = jsonData.list;
-
- if (list == null) {
- var tr = tbody.appendChild(document.createElement("tr"));
- var td = tr.appendChild(document.createElement("td"));
- td.appendChild(document.createTextNode("Not Found"));
- td.style.fontSize = "12px";
- td.style.textDecoration = "none";
- td.font = "Arial,Helvetica,sans-serif";
- td.style.fontWeight = "normal";
- }
- else {
- for (var i = 0; i < list.length; i++) {
- var tr = tbody.appendChild(document.createElement("tr"));
- var td = tr.appendChild(document.createElement("td"));
-
- td.appendChild(document.createTextNode(list[i].type + "(" + list[i].numberOfT1 +
- "): " + list[i].id));
- td.style.fontSize = "12px";
- td.style.textDecoration = "underline";
- td.style.color = "blue";
- td.style.fontWeight = "normal";
- td.style.cursor = "pointer";
- td.font = "Arial,Helvetica,sans-serif";
- td.id = list[i].latitude + ">>" + list[i].longitude;
-
- td.onmouseover = function() {
- this.style.fontWeight = "bold";
- }
-
- td.onmouseout = function() {
- this.style.fontWeight = "normal";
- }
-
- td.onclick = function() {
- this.style.color = "red";
- var latitudeLongitude = this.id.split(">>");
- var latlng = new GLatLng(latitudeLongitude[0], latitudeLongitude[1]);
- map.setCenter(latlng, 17);
- updateImage(0);
- }
- }
- }
-
- resultContainer.style.display = "";
-}
-//new changes end
-NovaButton.prototype.initializeLayerDiv = function(layerDiv) {
- for (var i = layerDiv.childNodes.length - 1; i >= 0; i--) {
- layerDiv.removeChild(layerDiv.lastChild);
- }
-
- var colorList = document.getElementById("colorList").value;
- var selectedLayerList = document.getElementById("selectedLayerList").value;
- var colorArray = colorList.split("~!");
- var selectedColorArray = selectedLayerList.split("~!");
- //layerDiv.style.background = "white";
- var table = layerDiv.appendChild(document.createElement("table"));
- table.width="100%";
- table.height="100%";
- //this.setMenuStyle(table);
- /****Creating the data table****/
- var tbody = table.appendChild(document.createElement("tbody"));
- var tr;
- var td;
- var originalLayerState = new Array();
- for (i = 0; i < colorArray.length; i++) {
- tr = tbody.appendChild(document.createElement("tr"));
- tr.style.height="20px";
- var colorItem = colorArray[i].split(",");
-
- td = tr.appendChild(document.createElement("td"));
- var chkbox = document.createElement("input");
- chkbox.type="checkbox";
- chkbox.name = "" + colorItem[0] + "chk";
- chkbox.value = colorItem[0];
- chkbox.id = colorItem[0] + "chk";
- if (this.checkIfColorSelected(selectedColorArray, colorItem[0]) == true){
- chkbox.defaultChecked=true;
- originalLayerState[i] = "true," + colorArray[i];
- }
- else {
- originalLayerState[i] = "false," + colorArray[i];
- }
- td.appendChild(chkbox);
-
- td = tr.appendChild(document.createElement("td"));
- td.width="75%";
- td.appendChild(document.createTextNode(colorItem[0]));
- td.style.fontFamily = "Verdana";
- td.style.fontSize = "12px";
-
- td = tr.appendChild(document.createElement("td"));
- td.width="10%";
- //td.style.background = colorItem[1];
- td.innerHTML="<input type='text' id='" + colorItem[0] + "colorbx' value='" + colorItem[1] + "' size='6' style='background-color:#" + colorItem[1] + "' background-color='#" + colorItem[1] + "' onclick='openPicker(\"" + colorItem[0] + "colorbx\")'/>"
- tbody.appendChild(tr);
- }
-
- NovaButton.globals.originalLayerState = originalLayerState;
-
- /**to get rid of extra space**/
- /*var layerHeight = layerDiv.style.height.substring(0, layerDiv.style.height.length -2);
- if (colorArray.length * 30 < layerHeight){
- tr = tbody.appendChild(document.createElement("tr"));
- tr.height= (layerHeight - (colorArray.length * 40 ) ) + "px";
- td = tr.appendChild(document.createElement("td"));
- }*/
-
-
- tr = tbody.appendChild(document.createElement("tr"));
- tr.vAlign="bottom";
- tr.style.height="20px";
- td = tr.appendChild(document.createElement("td"));
- td.colSpan="3";
- var buttonTable = td.appendChild(document.createElement("table"));
- buttonTable.height="100%";
- buttonTable.width="100%";
-
- var buttonBody = buttonTable.appendChild(document.createElement("tbody"));
- tr = buttonBody.appendChild(document.createElement("tr"));
- td = tr.appendChild(document.createElement("td"));
- td.width="20%";
- td = tr.appendChild(document.createElement("td"));
- td.appendChild(document.createTextNode("OK"));
- td.onclick = function ()
- {
- var selectedLayers = "";
- var colorList = "";
- var changed = false;
- var originalLayerState = NovaButton.globals.originalLayerState;
- //saving the user selected choices
- for (i = 0; i < colorArray.length; i++) {
- var colorItem = colorArray[i].split(",");
- //saving the selected layers
- var temp; // variable to hold changes value
- if (document.getElementById("" + colorItem[0] + "chk").checked == true){
- selectedLayers = selectedLayers + "~!" + colorItem[0];
- temp = "true," + colorItem[0];
- }
- else {
- temp = "false," + colorItem[0];
- }
- //saving the colours of all the layers
- var userSelectedColor = document.getElementById("" + colorItem[0] + "colorbx").value;
- if (userSelectedColor.charAt(0) == '#') {
- userSelectedColor = userSelectedColor.substring(1);
- }
- colorList = colorList + "~!" + colorItem[0] + "," + userSelectedColor;
- temp = temp + "," + userSelectedColor;
-
- //check to see if there is anything change and update
- // originalLayerState to reflect the changes
- if (changed) {
- originalLayerState[i] = temp;
- }
- else if (originalLayerState[i] != temp) {
- changed = true;
- originalLayerState[i] = temp;
- }
- }
- selectedLayers = selectedLayers.substring(2, selectedLayers.length);
- colorList = colorList.substring(2, colorList.length);
- document.getElementById("selectedLayerList").value = selectedLayers;
- document.getElementById("colorList").value = colorList;
-
- // update if there is anything change
- if (changed) {
- updateImage(0);
- }
-
- //to remove the layer
- NovaButton.prototype.showLayerClickEvent();
- };
- td.width="25%";
- this.setButtonStyle(td, true);
- td.style.cursor = "hand";
-
- td = tr.appendChild(document.createElement("td"));
- td.appendChild(document.createTextNode("Cancel"));
- td.width="25%";
- this.setButtonStyle(td, true);
- td.style.cursor = "hand";
- td.onclick = function ()
- {
- //remove all the contents
- layerDiv.innerHTML="";
- //re-initiate the layers to original values
- NovaButton.prototype.initializeLayerDiv(layerDiv);
- NovaButton.prototype.showLayerClickEvent();
- };
- td = tr.appendChild(document.createElement("td"));
- td.width="10%";
-
-}
-
-NovaButton.prototype.checkIfColorSelected= function(selectedColorArray, colorItem) {
- for (j = 0; j < selectedColorArray.length; j++) {
- if (selectedColorArray[j] == colorItem){
- return true;
- }
- }
- return false;
-}
-
-NovaButton.prototype.setMenuContainerStyle = function(menuContainer) {
- menuContainer.style.position = "absolute";
- menuContainer.style.background = "#FFFFF0"
- menuContainer.style.overflow = "auto";
- menuContainer.style.scrolling="yes";
- menuContainer.style.display = "none";
- menuContainer.style.width = "300px";
- menuContainer.style.height = "300px";
-}
-
-NovaButton.prototype.setMenuStyle = function(menu) {
- menu.style.width = "300px";
- menu.style.height = "300px";
- menu.style.background = "#FFF";
-}
-
-NovaButton.prototype.setMenuItemStyle = function(menuItem) {
- menuItem.style.padding = "4px 3px 4px 33px";
- menuItem.style.fontFamily = "Vardana, Arial, Helvetica, sans-serif" ;
- menuItem.style.fontSize = "10pt";
- menuItem.style.color = "#333" ;
- menuItem.style.cursor = "default" ;
- menuItem.style.background = "no-repeat left center" ;
-}
-
-NovaButton.prototype.showLayerOption = function(posX, posY) {
- var globals = NovaButton.globals;
-
- //position the menu at the given location
- if(typeof posX == "number") {
- globals.layerOptionContainer.style.left = posX + "px";
- }
-
- if(typeof posY == "number") {
- globals.layerOptionContainer.style.top = posY + "px";
- }
- //new chanes start
- var resultContainer = globals.searchResultContainer;
- resultContainer.style.display = "none";
- //nw changes end
- //display the menu
- globals.layerOptionContainer.style.display = "block";
-}
-
-NovaButton.prototype.showSearchOption = function(posX, posY) {
- var globals = NovaButton.globals;
-
- //position the menu at the given location
- if(typeof posX == "number") {
- globals.searchOptionContainer.style.left = posX + "px";
- }
-
- if(typeof posY == "number") {
- globals.searchOptionContainer.style.top = posY + "px";
- }
-
- //display the menu
- globals.searchOptionContainer.style.display = "inline";
-}
-
-NovaButton.prototype.defaultViewClickEvent = function() {
- var defaultZoomLevel = document.getElementById("defaultZoomLevel").value * 1;
- map.setCenter(new GLatLng(document.getElementById("defaultCenterLatitude").value,
- document.getElementById("defaultCenterLongitude").value),
- defaultZoomLevel);
- updateImage(0);
-}
-
-NovaButton.prototype.showLayerClickEvent = function(e) {
- if (NovaButton.globals.layerOptionVisible) {
- //to remove the color picker
- cancel();
- NovaButton.globals.layerOptionVisible = false;
- NovaButton.globals.layerOptionContainer.style.display = "none";
- return;
- }
-
- if (NovaButton.globals.searchOptionContainer.style.display != "none"){
- NovaButton.prototype.searchClickEvent();
- }
- if (CingularButton.globals.listOptionContainer.style.display != "none"){
- currentMonthClickEvent();
- }
-
- if (!e) {
- e = window.event;
- }
-
- e.cancelBubble = true;
-
- if (e.stopPropagation) {
- e.stopPropagation();
- }
-
- var button = Event.element(e);
- var posX = button.offsetLeft;
- var posY = button.offsetTop;
- this.showLayerOption(posX, posY + button.offsetHeight);
- NovaButton.globals.layerOptionVisible = true;
-}
-
-NovaButton.prototype.searchClickEvent = function(e) {
- if (NovaButton.globals.searchOptionVisible) {
- NovaButton.globals.searchOptionVisible = false;
- NovaButton.globals.searchOptionContainer.style.display = "none";
- return;
- }
-
- if (NovaButton.globals.layerOptionContainer.style.display != "none"){
- NovaButton.prototype.showLayerClickEvent();
- }
- if (CingularButton.globals.listOptionContainer.style.display != "none"){
- currentMonthClickEvent();
- }
-
- if (!e) {
- e = window.event;
- }
-
- e.cancelBubble = true;
-
- if (e.stopPropagation) {
- e.stopPropagation();
- }
-
- var button = Event.element(e);
- var posX = button.offsetLeft;
- var posY = button.offsetTop;
- this.showSearchOption(posX, posY + button.offsetHeight + 3);
- NovaButton.globals.searchOptionVisible = true;
-}
-
-NovaButton.prototype.submitSearchClickEvent = function(e) {
- if (NovaButton.globals.searchTabSelected == "nodeTab") {
- var input = document.getElementById("nodeSearchInput").value.trim();
-
- if (input.length == 0) {
- alert("Input field required");
- return;
- }
-
- var searchType;
- // ie bug
- var searchByNodeId = document.getElementById("searchByNodeId");
-
- if (searchByNodeId.checked) {
- searchType = searchByNodeId.value;
- }
- else {
- searchType = document.getElementById("searchByLocation").value;
- }
-
- var checkbox = document.getElementById("exactMatch");
-
- searchObject(input, searchType, checkbox.checked, e.clientX, e.clientY);
- }
- else {
- var address = document.getElementById("addressSearchInput").value.trim();
-
- if (address.length == 0) {
- alert("Address field required");
- return;
- }
-
- geocoder.getLatLng(
- address,
- function(ll) {
- if (ll != null) {
- if (addressMarker == null) {
- addressMarker = new GMarker(ll);
- map.addOverlay(addressMarker);
- GEvent.addListener(addressMarker, "click", marker_onclick);
- }
- else {
- addressMarker.setLatLng(ll);
- }
-
- map.setCenter(ll);
- updateImage(0);
- }
- }
- );
- }
-
- this.searchClickEvent(e);
-}
-
-function marker_onclick() {
- map.removeOverlay(addressMarker);
- addressMarker = null;
-}
-
-// start drag zoom function
-NovaButton.prototype.initCover = function() {
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- dragZoomGlobals.mapPosition = NovaButtonUtils.getElementPosition(NovaButton.globals.map.getContainer());
- this.setDimensions();
-
- dragZoomGlobals.zoomArea.style.display = "block";
- dragZoomGlobals.zoomArea.style.background = "#000";
-
- dragZoomGlobals.outlineDiv.style.width = "0px";
- dragZoomGlobals.outlineDiv.style.height = "0px";
-};
-
-NovaButton.prototype.initZoomAreaStyles = function(){
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- dragZoomGlobals.zoomArea.style.background = "#000";
- dragZoomGlobals.zoomArea.style.opacity = "0.2";
- dragZoomGlobals.zoomArea.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerTopDiv.style.background = "#000";
- dragZoomGlobals.cornerTopDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerTopDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerRightDiv.style.background = "#000";
- dragZoomGlobals.cornerRightDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerRightDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerBottomDiv.style.background = "#000";
- dragZoomGlobals.cornerBottomDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerBottomDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerLeftDiv.style.background = "#000";
- dragZoomGlobals.cornerLeftDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerLeftDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.outlineDiv.style.border = "2px solid blue";
-};
-
-NovaButton.prototype.resetDragZoom = function() {
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- dragZoomGlobals.zoomArea.style.display = "none";
- dragZoomGlobals.zoomArea.style.opacity = "0.2";
- dragZoomGlobals.zoomArea.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerTopDiv.style.display = "none";
- dragZoomGlobals.cornerTopDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerTopDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerRightDiv.style.display = "none";
- dragZoomGlobals.cornerRightDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerRightDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerBottomDiv.style.display = "none";
- dragZoomGlobals.cornerBottomDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerBottomDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.cornerLeftDiv.style.display = "none";
- dragZoomGlobals.cornerLeftDiv.style.opacity = "0.2";
- dragZoomGlobals.cornerLeftDiv.style.filter = 'alpha(opacity=' + (0.2 * 100) + ')';
-
- dragZoomGlobals.outlineDiv.style.display = 'none';
-};
-
-NovaButton.prototype.setZoomAreaStyle = function(zoomArea) {
- zoomArea.style.position = "absolute";
- zoomArea.style.display = "none";
- zoomArea.style.overflow = "hidden";
- zoomArea.style.cursor = "crosshair";
- zoomArea.style.zIndex = "101";
-}
-
-NovaButton.prototype.getRectangle = function(startX, startY, pos){
- var left = false;
- var top = false;
- var dX = pos.left - startX;
- var dY = pos.top - startY;
- if (dX < 0) {
- dX = dX * -1;
- left = true;
- }
- if (dY < 0) {
- dY = dY * -1;
- top = true;
- }
- delta = dX > dY ? dX : dY;
-
- return {
- startX: startX,
- startY: startY,
- endX: startX + dX,
- endY: startY + dY,
- width: dX,
- height: dY,
- left:left,
- top:top
- }
-};
-
-NovaButton.prototype.mouseDown = function(e) {
- if (NovaButton.globals.currentButton != "zoomRectangleDiv") {
- return;
- }
-
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- var pos = this.getRelPos(e);
- dragZoomGlobals.startX = pos.left;
- dragZoomGlobals.startY = pos.top;
-
- dragZoomGlobals.zoomArea.style.background = "transparent";
- dragZoomGlobals.zoomArea.style.opacity = "1";
- dragZoomGlobals.zoomArea.style.filter = 'alpha(opacity=100)';
-
- dragZoomGlobals.outlineDiv.style.left = dragZoomGlobals.startX + "px";
- dragZoomGlobals.outlineDiv.style.top = dragZoomGlobals.startY + "px";
- dragZoomGlobals.outlineDiv.style.display = "block";
- dragZoomGlobals.outlineDiv.style.width = "1px";
- dragZoomGlobals.outlineDiv.style.height = "1px";
-
- dragZoomGlobals.cornerTopDiv.style.top = (dragZoomGlobals.startY - dragZoomGlobals.mapHeight) + 'px';
- dragZoomGlobals.cornerTopDiv.style.display ='block';
- dragZoomGlobals.cornerLeftDiv.style.left = (dragZoomGlobals.startX - dragZoomGlobals.mapWidth) +'px';
- dragZoomGlobals.cornerLeftDiv.style.top = dragZoomGlobals.startY + 'px';
- dragZoomGlobals.cornerLeftDiv.style.display = 'block';
-
- dragZoomGlobals.cornerRightDiv.style.left = dragZoomGlobals.startX + 'px';
- dragZoomGlobals.cornerRightDiv.style.top = dragZoomGlobals.startY + 'px';
- dragZoomGlobals.cornerRightDiv.style.display = 'block';
- dragZoomGlobals.cornerBottomDiv.style.left = dragZoomGlobals.startX + 'px';
- dragZoomGlobals.cornerBottomDiv.style.top = dragZoomGlobals.startY + 'px';
- dragZoomGlobals.cornerBottomDiv.style.width = '0px';
- dragZoomGlobals.cornerBottomDiv.style.display = 'block';
-
- dragZoomGlobals.moving = true;
-
- return false;
-}
-
-NovaButton.prototype.mouseMove = function(e) {
- var dragZoomGlobals = NovaButton.globals.dragzoom;
-
- if(dragZoomGlobals.moving) {
- var pos = this.getRelPos(e);
- var rect = this.getRectangle(dragZoomGlobals.startX, dragZoomGlobals.startY, pos);
-
- if (rect.left) {
- addX = -rect.width;
- } else {
- addX = 0;
- }
-
- if (rect.top) {
- addY = -rect.height;
- } else {
- addY = 0;
- }
-
- dragZoomGlobals.outlineDiv.style.left = dragZoomGlobals.startX + addX + "px";
- dragZoomGlobals.outlineDiv.style.top = dragZoomGlobals.startY + addY + "px";
- dragZoomGlobals.outlineDiv.style.display = "block";
- dragZoomGlobals.outlineDiv.style.width = rect.width + "px";
- dragZoomGlobals.outlineDiv.style.height = rect.height + "px";
-
- dragZoomGlobals.cornerTopDiv.style.height = ((dragZoomGlobals.startY + addY) - (dragZoomGlobals.startY - dragZoomGlobals.mapHeight)) + 'px';
- dragZoomGlobals.cornerLeftDiv.style.top = (dragZoomGlobals.startY + addY) + 'px';
- dragZoomGlobals.cornerLeftDiv.style.width = ((dragZoomGlobals.startX + addX) - (dragZoomGlobals.startX - dragZoomGlobals.mapWidth)) + 'px';
- dragZoomGlobals.cornerRightDiv.style.top = dragZoomGlobals.cornerLeftDiv.style.top;
- dragZoomGlobals.cornerRightDiv.style.left = (dragZoomGlobals.startX + addX + rect.width + 4) + 'px';
- dragZoomGlobals.cornerBottomDiv.style.top = (dragZoomGlobals.startY + addY + rect.height + 4) + 'px';
- dragZoomGlobals.cornerBottomDiv.style.left = (dragZoomGlobals.startX - dragZoomGlobals.mapWidth + ((dragZoomGlobals.startX + addX) - (dragZoomGlobals.startX - dragZoomGlobals.mapWidth))) + 'px';
- dragZoomGlobals.cornerBottomDiv.style.width = (rect.width + 4) + 'px';
-
- return false;
- }
-}
-
-NovaButton.prototype.mouseUp = function(e) {
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- var map = NovaButton.globals.map;
-
- if (dragZoomGlobals.moving) {
- var pos = this.getRelPos(e);
- dragZoomGlobals.moving = false;
-
- var rect = this.getRectangle(dragZoomGlobals.startX, dragZoomGlobals.startY, pos);
-
- if (rect.left) {
- rect.endX = rect.startX - rect.width;
- }
-
- if (rect.top) {
- rect.endY = rect.startY - rect.height;
- }
-
- this.resetDragZoom();
-
- if (rect.width >= 0 && rect.height >= 0) {
- var nwpx = new GPoint(rect.startX, rect.startY);
- var nepx = new GPoint(rect.endX, rect.startY);
- var sepx = new GPoint(rect.endX, rect.endY);
- var swpx = new GPoint(rect.startX, rect.endY);
- var nw = NovaButton.globals.map.fromContainerPixelToLatLng(nwpx);
- var ne = NovaButton.globals.map.fromContainerPixelToLatLng(nepx);
- var se = NovaButton.globals.map.fromContainerPixelToLatLng(sepx);
- var sw = NovaButton.globals.map.fromContainerPixelToLatLng(swpx);
-
- var zoomAreaPoly = new GPolyline([nw, ne, se, sw, nw], "blue", 3, .4);
- var polyBounds = zoomAreaPoly.getBounds();
- var ne = polyBounds.getNorthEast();
- var sw = polyBounds.getSouthWest();
- var se = new GLatLng(sw.lat(), ne.lng());
- var nw = new GLatLng(ne.lat(), sw.lng());
- var zoomLevel = map.getBoundsZoomLevel(polyBounds);
- var center = polyBounds.getCenter();
- map.setCenter(center, zoomLevel);
- }
-
- this.initCover();
- }
-}
-
-NovaButton.prototype.setDimensions = function() {
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- var mapSize = NovaButton.globals.map.getSize();
- dragZoomGlobals.mapWidth = mapSize.width;
- dragZoomGlobals.mapHeight = mapSize.height;
- dragZoomGlobals.mapRatio = dragZoomGlobals.mapHeight / dragZoomGlobals.mapWidth;
- // set left:0px in next <div>s in case we inherit text-align:center from map <div> in IE.
- dragZoomGlobals.zoomArea.style.top = "0px";
- dragZoomGlobals.zoomArea.style.left = "0px";
- dragZoomGlobals.zoomArea.style.width = dragZoomGlobals.mapWidth + "px";
- dragZoomGlobals.zoomArea.style.height = dragZoomGlobals.mapHeight + "px";
-
- dragZoomGlobals.cornerTopDiv.style.top = "0px";
- dragZoomGlobals.cornerTopDiv.style.left = "0px";
- dragZoomGlobals.cornerTopDiv.style.width = dragZoomGlobals.mapWidth + "px";
- dragZoomGlobals.cornerTopDiv.style.height = dragZoomGlobals.mapHeight + "px";
-
- dragZoomGlobals.cornerRightDiv.style.top = "0px";
- dragZoomGlobals.cornerRightDiv.style.left = "0px";
- dragZoomGlobals.cornerRightDiv.style.width = dragZoomGlobals.mapWidth + "px";
- dragZoomGlobals.cornerRightDiv.style.height = dragZoomGlobals.mapHeight + "px";
-
- dragZoomGlobals.cornerBottomDiv.style.top = "0px";
- dragZoomGlobals.cornerBottomDiv.style.left = "0px";
- dragZoomGlobals.cornerBottomDiv.style.width = dragZoomGlobals.mapWidth + "px";
- dragZoomGlobals.cornerBottomDiv.style.height = dragZoomGlobals.mapHeight + "px";
-
- dragZoomGlobals.cornerLeftDiv.style.top = "0px";
- dragZoomGlobals.cornerLeftDiv.style.left = "0px";
- dragZoomGlobals.cornerLeftDiv.style.width = dragZoomGlobals.mapWidth + "px";
- dragZoomGlobals.cornerLeftDiv.style.height = dragZoomGlobals.mapHeight + "px";
-};
-
-NovaButton.prototype.getRelPos = function(e) {
- var pos = NovaButtonUtils.getMousePosition(e);
- var dragZoomGlobals = NovaButton.globals.dragzoom;
- return {top: (pos.top - dragZoomGlobals.mapPosition.top),
- left: (pos.left - dragZoomGlobals.mapPosition.left)};
-};
-// end drag zoom function
-
-var NovaButtonUtils = {
-};
-
-NovaButtonUtils.getElementPosition = function(element) {
- var leftPos = element.offsetLeft; // initialize var to store calculations
- var topPos = element.offsetTop; // initialize var to store calculations
- var parElement = element.offsetParent; // identify first offset parent element
- while (parElement != null ) { // move up through element hierarchy
- leftPos += parElement.offsetLeft; // appending left offset of each parent
- topPos += parElement.offsetTop;
- parElement = parElement.offsetParent; // until no more offset parents exist
- }
- return {left: leftPos, top: topPos};
-};
-
-NovaButtonUtils.getMousePosition = function(e) {
- var posX = 0;
- var posY = 0;
- if (!e) var e = window.event;
- if (e.pageX || e.pageY) {
- posX = e.pageX;
- posY = e.pageY;
- } else if (e.clientX || e.clientY){
- posX = e.clientX +
- (document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft);
- posY = e.clientY +
- (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop);
- }
- return {left: posX, top: posY};
-}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/other_scripts.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/other_scripts.js
deleted file mode 100644
index e45b97f9..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/other_scripts.js
+++ /dev/null
@@ -1,331 +0,0 @@
-//Reusable Asset Library - CSS Positioning Version (v3.3)
-//Release Date: 1/26/07
-
-
-//begin: quick help =======================================
-var uitmpl_qhId;
-var uitmpl_cookieVal;
-var qhRule;
-var qhCookie;
-
-//sets cookie value and qhId
-qhCookie=document.cookie;
-var pos=qhCookie.indexOf("qhId=");
-
-if(pos==-1){
-document.cookie="qhId=0";
-uitmpl_qhId="0";
-qhCookie=document.cookie;
-pos=qhCookie.indexOf("qhId=");
-}
-//reads cookie if value is present and sets qhId accordingly
-var start=pos+5;
-var end=qhCookie.indexOf(";", start);
-if (end==-1) end=qhCookie.length;
-uitmpl_cookieVal=qhCookie.substring(start,end);
-if(uitmpl_cookieVal!=0){
- uitmpl_qhId=1;
-}else{
-uitmpl_qhId=0;
-}
-
-
-//loops through all qh divs and toggles display based on qhId
-function uitmpl_qhPageInit(){
-var getTag = document.getElementsByTagName("div");
- for (i=0;i<getTag.length;i++){
- if (getTag[i].className=="mQH"){
- getTag[i].style.display=(uitmpl_qhId!="0")?"block":"none";
- //getTag[i].onmouseover="alert('foo')";
- }
- }
- //changes instruction in help menu if menu exists
- if (uitmpl_qhId==1&&document.getElementById("shHd")){
- document.getElementById("shHd").innerHTML = "Hide";
- }
-}
-
-function uitmpl_qhPageToggle(){
-//change instruction in help menu
-var getCurrent = document.getElementById("shHd").innerHTML;
-var setCurrent = (getCurrent=="Show")?"Hide":"Show";
-document.getElementById("shHd").innerHTML = setCurrent;
-//change cookie value
-document.cookie = (setCurrent=="Show")?"qhId=0":"qhId=1";
-//change qhId value
-uitmpl_qhId = (setCurrent=="Show")?"0":"1";
-//rerun page init
-uitmpl_qhPageInit();
-}
-
-//individual quick help toggle
-function uitmpl_qh(obj){
- var state = document.getElementById(obj).style.display;
- document.getElementById(obj).style.display=(state!="block")?"block":"none";
-
-}
-//end: quick help =======================================
-
-//begin: error validation =======================================
-//string validation
-function uitmpl_errStrVal(obj, errId){
- var x=obj.value;
- var regExp = {
- number:/(^\d+$)|(^\d+\.\d+$)/,
- email:/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
- //phone:/(^\d+$)|(^\d+\.\d+$)/,
- //time:/(^\d+$)|(^\d+\.\d+$)/
- };
-
- var alrtStr = {
- number:"Please input a valid number!",
- email:"Please input a valid email address!",
- date:"That date is invalid. Please try again."
- //phone:"Please input a valid phone number!",
- //time:"Please input a valid time!"
- };
-
- var getReg = eval("regExp."+errId);
- var getAlrt = eval("alrtStr."+errId);
-
- //Number----------------------------------------------------------
- if (errId=="number"&&!x.match(getReg)){
- alert(getAlrt);
- obj.focus();
- obj.select();
- }
- //Email-----------------------------------------------------------
- else if (errId=="email"&&!x.match(getReg)){
- alert(getAlrt);
- obj.focus();
- obj.select();
- }
- //Date------------------------------------------------------------
- if (errId=="date"&&!uitmpl_chkdate(obj)){
- alert(getAlrt);
- obj.focus();
- obj.select();
- }
-}
-
-//supplemental date check function
-function uitmpl_chkdate(objName) {
-var strDatestyle = "US"; //United States date style
-//var strDatestyle = "EU"; //European date style
-var strDate;
-var strDateArray;
-var strDay;
-var strMonth;
-var strYear;
-var intday;
-var intMonth;
-var intYear;
-var booFound = false;
-
-var datefield = objName;
-var strSeparatorArray = new Array("-"," ","/",".");
-var intElementNr;
-var err = 0;
-var strMonthArray = new Array(12);
-strMonthArray[0] = "Jan";
-strMonthArray[1] = "Feb";
-strMonthArray[2] = "Mar";
-strMonthArray[3] = "Apr";
-strMonthArray[4] = "May";
-strMonthArray[5] = "Jun";
-strMonthArray[6] = "Jul";
-strMonthArray[7] = "Aug";
-strMonthArray[8] = "Sep";
-strMonthArray[9] = "Oct";
-strMonthArray[10] = "Nov";
-strMonthArray[11] = "Dec";
-strDate = datefield.value;
-if (strDate.length < 1) {
-return true;
-}
-for (intElementNr = 0; intElementNr < strSeparatorArray.length; intElementNr++) {
-if (strDate.indexOf(strSeparatorArray[intElementNr]) != -1) {
-strDateArray = strDate.split(strSeparatorArray[intElementNr]);
-if (strDateArray.length != 3) {
-err = 1;
-return false;
-}
-else {
-strDay = strDateArray[0];
-strMonth = strDateArray[1];
-strYear = strDateArray[2];
-}
-booFound = true;
- }
-}
-if (booFound == false) {
-if (strDate.length>5) {
-strDay = strDate.substr(0, 2);
-strMonth = strDate.substr(2, 2);
-strYear = strDate.substr(4);
- }
-}
-if (strYear.length == 2) {
-strYear = '20' + strYear;
-}
-// US style
-if (strDatestyle == "US") {
-strTemp = strDay;
-strDay = strMonth;
-strMonth = strTemp;
-}
-intday = parseInt(strDay, 10);
-if (isNaN(intday)) {
-err = 2;
-return false;
-}
-intMonth = parseInt(strMonth, 10);
-if (isNaN(intMonth)) {
-for (i = 0;i<12;i++) {
-if (strMonth.toUpperCase() == strMonthArray[i].toUpperCase()) {
-intMonth = i+1;
-strMonth = strMonthArray[i];
-i = 12;
- }
-}
-if (isNaN(intMonth)) {
-err = 3;
-return false;
- }
-}
-intYear = parseInt(strYear, 10);
-if (isNaN(intYear)) {
-err = 4;
-return false;
-}
-if (intMonth>12 || intMonth<1) {
-err = 5;
-return false;
-}
-if ((intMonth == 1 || intMonth == 3 || intMonth == 5 || intMonth == 7 || intMonth == 8 || intMonth == 10 || intMonth == 12) && (intday > 31 || intday < 1)) {
-err = 6;
-return false;
-}
-if ((intMonth == 4 || intMonth == 6 || intMonth == 9 || intMonth == 11) && (intday > 30 || intday < 1)) {
-err = 7;
-return false;
-}
-if (intMonth == 2) {
-if (intday < 1) {
-err = 8;
-return false;
-}
-if (LeapYear(intYear) == true) {
-if (intday > 29) {
-err = 9;
-return false;
-}
-}
-else {
-if (intday > 28) {
-err = 10;
-return false;
-}
-}
-}
-//if (strDatestyle == "US") {
-//datefield.value = strMonthArray[intMonth-1] + " " + intday+" " + strYear;
-//}
-//else {
-//datefield.value = intday + " " + strMonthArray[intMonth-1] + " " + strYear;
-//}
-return true;
-}
-function LeapYear(intYear) {
-if (intYear % 100 == 0) {
-if (intYear % 400 == 0) { return true; }
-}
-else {
-if ((intYear % 4) == 0) { return true; }
-}
-return false;
-}
-
-//range validation
-function uitmpl_errRangeVal(obj, minNum, maxNum){
-if (obj.value>=minNum&&obj.value<=maxNum||obj.value==""){
-return true;
-}else{
-alert("Please input a number within the range of "+minNum+" and "+maxNum+"!");
-obj.focus();
-obj.select();
-}
-}
-
-//end: error validation =======================================
-//begin: popup windows =======================================
-function uitmpl_popUpReg(url) {
- window.open(url);
-}
-function uitmpl_popUpConfig(url, name, w, h, sc, rsz) {
- var features = "width="+w+",height="+h+",scrollbars="+sc+",resizable="+rsz+"menubar=0,status=1";
- var newWin = window.open(url, name, features);
- newWin.focus();
-//popups from nav links:
-}
-
-
-function uitmpl_contact(){
- uitmpl_popUpReg("");
-}
-function uitmpl_bizDirect(){
- uitmpl_popUpReg("");
-}
-
-//function uitmpl_closeApp(){
-//if(window.confirm("You did NOT save your data. Do you want to close 'application name' without saving your data?")) {
-//window.close();
-
-function uitmpl_closeApp(name){
-if (name != "") {
-var cAppName=name;
-}
-else {
-var cAppName="the current application";
-}
-if(window.confirm("You did NOT save your data. Do you want to close\n" + cAppName + " without saving your data?")) {
-window.close();
-}
-}
-//end: popup windows =======================================
-
-
-
-
-
-//Select all checkboxes on a form=====================================
-function uitmpl_chkBoxSelect(formName,btnOn,btnOff) {
-
- document.getElementById(btnOff).style.display = "block";
- document.getElementById(btnOn).style.display = "none";
-
- var f = formName;
- for (i=0; i < f.elements.length; i++) {
- if (f.elements[i].type=="checkbox") {
- var e = f.elements[i];
- e.checked = true;
- }
- }
-}
-
-
-//Clear all checkboxes on a form======================================
-function uitmpl_chkBoxClear(formName,btnOn, btnOff) {
-
- document.getElementById(btnOff).style.display = "none";
- document.getElementById(btnOn).style.display = "block";
-
- var f = formName;
- for (i=0; i < f.elements.length; i++) {
- if (f.elements[i].type=="checkbox") {
- var e = f.elements[i];
- e.checked = false;
- }
- }
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/persist_table_header.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/persist_table_header.js
deleted file mode 100644
index 2c90306f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/persist_table_header.js
+++ /dev/null
@@ -1,47 +0,0 @@
- function UpdateTableHeaders() {
- $("div.divTableWithFloatingHeader").each(function() {
- var originalHeaderRow = $(".tableFloatingHeaderOriginal", this);
- var floatingHeaderRow = $(".tableFloatingHeader", this);
- var offset = $(this).offset();
- var scrollTop = $(window).scrollTop();
- if ((scrollTop > offset.top) && (scrollTop < offset.top + $(this).height())) {
- floatingHeaderRow.css("visibility", "visible");
- floatingHeaderRow.css("top", Math.min(scrollTop - offset.top, $(this).height() - floatingHeaderRow.height()) + "px");
- floatingHeaderRow.css("z-index", "20");
-
- // Copy cell widths from original header
- $("th", floatingHeaderRow).each(function(index) {
- var cellWidth = $("th", originalHeaderRow).eq(index).css('width');
- $(this).css('width', cellWidth);
- });
-
- // Copy row width from whole table
- floatingHeaderRow.css("width", $(this).css("width"));
- }
- else {
- floatingHeaderRow.css("visibility", "hidden");
- floatingHeaderRow.css("top", "0px");
- }
- });
- }
-
- $(document).ready(function() {
- $("table.tableWithFloatingHeader").each(function() {
- $(this).wrap("<div class=\"divTableWithFloatingHeader\" style=\"position:relative\"></div>");
-
- var originalHeaderRow = $("tr:first", this)
- originalHeaderRow.before(originalHeaderRow.clone());
- var clonedHeaderRow = $("tr:first", this)
-
- clonedHeaderRow.addClass("tableFloatingHeader");
- clonedHeaderRow.css("position", "absolute");
- clonedHeaderRow.css("top", "0px");
- clonedHeaderRow.css("left", $(this).css("margin-left"));
- clonedHeaderRow.css("visibility", "hidden");
-
- originalHeaderRow.addClass("tableFloatingHeaderOriginal");
- });
- UpdateTableHeaders();
- $(window.parent).scroll(UpdateTableHeaders);
- $(window.parent).resize(UpdateTableHeaders);
- }); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/prototype-1.6.0.3.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/prototype-1.6.0.3.js
deleted file mode 100644
index dfe8ab4e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/prototype-1.6.0.3.js
+++ /dev/null
@@ -1,4320 +0,0 @@
-/* Prototype JavaScript framework, version 1.6.0.3
- * (c) 2005-2008 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-
-var Prototype = {
- Version: '1.6.0.3',
-
- Browser: {
- IE: !!(window.attachEvent &&
- navigator.userAgent.indexOf('Opera') === -1),
- Opera: navigator.userAgent.indexOf('Opera') > -1,
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 &&
- navigator.userAgent.indexOf('KHTML') === -1,
- MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
- },
-
- BrowserFeatures: {
- XPath: !!document.evaluate,
- SelectorsAPI: !!document.querySelector,
- ElementExtensions: !!window.HTMLElement,
- SpecificElementExtensions:
- document.createElement('div')['__proto__'] &&
- document.createElement('div')['__proto__'] !==
- document.createElement('form')['__proto__']
- },
-
- ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
- JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
-
- emptyFunction: function() { },
- K: function(x) { return x }
-};
-
-if (Prototype.Browser.MobileSafari)
- Prototype.BrowserFeatures.SpecificElementExtensions = false;
-
-
-/* Based on Alex Arnell's inheritance implementation. */
-var Class = {
- create: function() {
- var parent = null, properties = $A(arguments);
- if (Object.isFunction(properties[0]))
- parent = properties.shift();
-
- function klass() {
- this.initialize.apply(this, arguments);
- }
-
- Object.extend(klass, Class.Methods);
- klass.superclass = parent;
- klass.subclasses = [];
-
- if (parent) {
- var subclass = function() { };
- subclass.prototype = parent.prototype;
- klass.prototype = new subclass;
- parent.subclasses.push(klass);
- }
-
- for (var i = 0; i < properties.length; i++)
- klass.addMethods(properties[i]);
-
- if (!klass.prototype.initialize)
- klass.prototype.initialize = Prototype.emptyFunction;
-
- klass.prototype.constructor = klass;
-
- return klass;
- }
-};
-
-Class.Methods = {
- addMethods: function(source) {
- var ancestor = this.superclass && this.superclass.prototype;
- var properties = Object.keys(source);
-
- if (!Object.keys({ toString: true }).length)
- properties.push("toString", "valueOf");
-
- for (var i = 0, length = properties.length; i < length; i++) {
- var property = properties[i], value = source[property];
- if (ancestor && Object.isFunction(value) &&
- value.argumentNames().first() == "$super") {
- var method = value;
- value = (function(m) {
- return function() { return ancestor[m].apply(this, arguments) };
- })(property).wrap(method);
-
- value.valueOf = method.valueOf.bind(method);
- value.toString = method.toString.bind(method);
- }
- this.prototype[property] = value;
- }
-
- return this;
- }
-};
-
-var Abstract = { };
-
-Object.extend = function(destination, source) {
- for (var property in source)
- destination[property] = source[property];
- return destination;
-};
-
-Object.extend(Object, {
- inspect: function(object) {
- try {
- if (Object.isUndefined(object)) return 'undefined';
- if (object === null) return 'null';
- return object.inspect ? object.inspect() : String(object);
- } catch (e) {
- if (e instanceof RangeError) return '...';
- throw e;
- }
- },
-
- toJSON: function(object) {
- var type = typeof object;
- switch (type) {
- case 'undefined':
- case 'function':
- case 'unknown': return;
- case 'boolean': return object.toString();
- }
-
- if (object === null) return 'null';
- if (object.toJSON) return object.toJSON();
- if (Object.isElement(object)) return;
-
- var results = [];
- for (var property in object) {
- var value = Object.toJSON(object[property]);
- if (!Object.isUndefined(value))
- results.push(property.toJSON() + ': ' + value);
- }
-
- return '{' + results.join(', ') + '}';
- },
-
- toQueryString: function(object) {
- return $H(object).toQueryString();
- },
-
- toHTML: function(object) {
- return object && object.toHTML ? object.toHTML() : String.interpret(object);
- },
-
- keys: function(object) {
- var keys = [];
- for (var property in object)
- keys.push(property);
- return keys;
- },
-
- values: function(object) {
- var values = [];
- for (var property in object)
- values.push(object[property]);
- return values;
- },
-
- clone: function(object) {
- return Object.extend({ }, object);
- },
-
- isElement: function(object) {
- return !!(object && object.nodeType == 1);
- },
-
- isArray: function(object) {
- return object != null && typeof object == "object" &&
- 'splice' in object && 'join' in object;
- },
-
- isHash: function(object) {
- return object instanceof Hash;
- },
-
- isFunction: function(object) {
- return typeof object == "function";
- },
-
- isString: function(object) {
- return typeof object == "string";
- },
-
- isNumber: function(object) {
- return typeof object == "number";
- },
-
- isUndefined: function(object) {
- return typeof object == "undefined";
- }
-});
-
-Object.extend(Function.prototype, {
- argumentNames: function() {
- var names = this.toString().match(/^[\s\(]*function[^(]*\(([^\)]*)\)/)[1]
- .replace(/\s+/g, '').split(',');
- return names.length == 1 && !names[0] ? [] : names;
- },
-
- bind: function() {
- if (arguments.length < 2 && Object.isUndefined(arguments[0])) return this;
- var __method = this, args = $A(arguments), object = args.shift();
- return function() {
- return __method.apply(object, args.concat($A(arguments)));
- }
- },
-
- bindAsEventListener: function() {
- var __method = this, args = $A(arguments), object = args.shift();
- return function(event) {
- return __method.apply(object, [event || window.event].concat(args));
- }
- },
-
- curry: function() {
- if (!arguments.length) return this;
- var __method = this, args = $A(arguments);
- return function() {
- return __method.apply(this, args.concat($A(arguments)));
- }
- },
-
- delay: function() {
- var __method = this, args = $A(arguments), timeout = args.shift() * 1000;
- return window.setTimeout(function() {
- return __method.apply(__method, args);
- }, timeout);
- },
-
- defer: function() {
- var args = [0.01].concat($A(arguments));
- return this.delay.apply(this, args);
- },
-
- wrap: function(wrapper) {
- var __method = this;
- return function() {
- return wrapper.apply(this, [__method.bind(this)].concat($A(arguments)));
- }
- },
-
- methodize: function() {
- if (this._methodized) return this._methodized;
- var __method = this;
- return this._methodized = function() {
- return __method.apply(null, [this].concat($A(arguments)));
- };
- }
-});
-
-Date.prototype.toJSON = function() {
- return '"' + this.getUTCFullYear() + '-' +
- (this.getUTCMonth() + 1).toPaddedString(2) + '-' +
- this.getUTCDate().toPaddedString(2) + 'T' +
- this.getUTCHours().toPaddedString(2) + ':' +
- this.getUTCMinutes().toPaddedString(2) + ':' +
- this.getUTCSeconds().toPaddedString(2) + 'Z"';
-};
-
-var Try = {
- these: function() {
- var returnValue;
-
- for (var i = 0, length = arguments.length; i < length; i++) {
- var lambda = arguments[i];
- try {
- returnValue = lambda();
- break;
- } catch (e) { }
- }
-
- return returnValue;
- }
-};
-
-RegExp.prototype.match = RegExp.prototype.test;
-
-RegExp.escape = function(str) {
- return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1');
-};
-
-/*--------------------------------------------------------------------------*/
-
-var PeriodicalExecuter = Class.create({
- initialize: function(callback, frequency) {
- this.callback = callback;
- this.frequency = frequency;
- this.currentlyExecuting = false;
-
- this.registerCallback();
- },
-
- registerCallback: function() {
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- execute: function() {
- this.callback(this);
- },
-
- stop: function() {
- if (!this.timer) return;
- clearInterval(this.timer);
- this.timer = null;
- },
-
- onTimerEvent: function() {
- if (!this.currentlyExecuting) {
- try {
- this.currentlyExecuting = true;
- this.execute();
- } finally {
- this.currentlyExecuting = false;
- }
- }
- }
-});
-Object.extend(String, {
- interpret: function(value) {
- return value == null ? '' : String(value);
- },
- specialChar: {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '\\': '\\\\'
- }
-});
-
-Object.extend(String.prototype, {
- gsub: function(pattern, replacement) {
- var result = '', source = this, match;
- replacement = arguments.callee.prepareReplacement(replacement);
-
- while (source.length > 0) {
- if (match = source.match(pattern)) {
- result += source.slice(0, match.index);
- result += String.interpret(replacement(match));
- source = source.slice(match.index + match[0].length);
- } else {
- result += source, source = '';
- }
- }
- return result;
- },
-
- sub: function(pattern, replacement, count) {
- replacement = this.gsub.prepareReplacement(replacement);
- count = Object.isUndefined(count) ? 1 : count;
-
- return this.gsub(pattern, function(match) {
- if (--count < 0) return match[0];
- return replacement(match);
- });
- },
-
- scan: function(pattern, iterator) {
- this.gsub(pattern, iterator);
- return String(this);
- },
-
- truncate: function(length, truncation) {
- length = length || 30;
- truncation = Object.isUndefined(truncation) ? '...' : truncation;
- return this.length > length ?
- this.slice(0, length - truncation.length) + truncation : String(this);
- },
-
- strip: function() {
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
- },
-
- stripTags: function() {
- return this.replace(/<\/?[^>]+>/gi, '');
- },
-
- stripScripts: function() {
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
- },
-
- extractScripts: function() {
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
- var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
- return (this.match(matchAll) || []).map(function(scriptTag) {
- return (scriptTag.match(matchOne) || ['', ''])[1];
- });
- },
-
- evalScripts: function() {
- return this.extractScripts().map(function(script) { return eval(script) });
- },
-
- escapeHTML: function() {
- var self = arguments.callee;
- self.text.data = this;
- return self.div.innerHTML;
- },
-
- unescapeHTML: function() {
- var div = new Element('div');
- div.innerHTML = this.stripTags();
- return div.childNodes[0] ? (div.childNodes.length > 1 ?
- $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
- div.childNodes[0].nodeValue) : '';
- },
-
- toQueryParams: function(separator) {
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
- if (!match) return { };
-
- return match[1].split(separator || '&').inject({ }, function(hash, pair) {
- if ((pair = pair.split('='))[0]) {
- var key = decodeURIComponent(pair.shift());
- var value = pair.length > 1 ? pair.join('=') : pair[0];
- if (value != undefined) value = decodeURIComponent(value);
-
- if (key in hash) {
- if (!Object.isArray(hash[key])) hash[key] = [hash[key]];
- hash[key].push(value);
- }
- else hash[key] = value;
- }
- return hash;
- });
- },
-
- toArray: function() {
- return this.split('');
- },
-
- succ: function() {
- return this.slice(0, this.length - 1) +
- String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
- },
-
- times: function(count) {
- return count < 1 ? '' : new Array(count + 1).join(this);
- },
-
- camelize: function() {
- var parts = this.split('-'), len = parts.length;
- if (len == 1) return parts[0];
-
- var camelized = this.charAt(0) == '-'
- ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
- : parts[0];
-
- for (var i = 1; i < len; i++)
- camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
-
- return camelized;
- },
-
- capitalize: function() {
- return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
- },
-
- underscore: function() {
- return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
- },
-
- dasherize: function() {
- return this.gsub(/_/,'-');
- },
-
- inspect: function(useDoubleQuotes) {
- var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
- var character = String.specialChar[match[0]];
- return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
- });
- if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
- return "'" + escapedString.replace(/'/g, '\\\'') + "'";
- },
-
- toJSON: function() {
- return this.inspect(true);
- },
-
- unfilterJSON: function(filter) {
- return this.sub(filter || Prototype.JSONFilter, '#{1}');
- },
-
- isJSON: function() {
- var str = this;
- if (str.blank()) return false;
- str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
- return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
- },
-
- evalJSON: function(sanitize) {
- var json = this.unfilterJSON();
- try {
- if (!sanitize || json.isJSON()) return eval('(' + json + ')');
- } catch (e) { }
- throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
- },
-
- include: function(pattern) {
- return this.indexOf(pattern) > -1;
- },
-
- startsWith: function(pattern) {
- return this.indexOf(pattern) === 0;
- },
-
- endsWith: function(pattern) {
- var d = this.length - pattern.length;
- return d >= 0 && this.lastIndexOf(pattern) === d;
- },
-
- empty: function() {
- return this == '';
- },
-
- blank: function() {
- return /^\s*$/.test(this);
- },
-
- interpolate: function(object, pattern) {
- return new Template(this, pattern).evaluate(object);
- }
-});
-
-if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
- escapeHTML: function() {
- return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
- },
- unescapeHTML: function() {
- return this.stripTags().replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
- }
-});
-
-String.prototype.gsub.prepareReplacement = function(replacement) {
- if (Object.isFunction(replacement)) return replacement;
- var template = new Template(replacement);
- return function(match) { return template.evaluate(match) };
-};
-
-String.prototype.parseQuery = String.prototype.toQueryParams;
-
-Object.extend(String.prototype.escapeHTML, {
- div: document.createElement('div'),
- text: document.createTextNode('')
-});
-
-String.prototype.escapeHTML.div.appendChild(String.prototype.escapeHTML.text);
-
-var Template = Class.create({
- initialize: function(template, pattern) {
- this.template = template.toString();
- this.pattern = pattern || Template.Pattern;
- },
-
- evaluate: function(object) {
- if (Object.isFunction(object.toTemplateReplacements))
- object = object.toTemplateReplacements();
-
- return this.template.gsub(this.pattern, function(match) {
- if (object == null) return '';
-
- var before = match[1] || '';
- if (before == '\\') return match[2];
-
- var ctx = object, expr = match[3];
- var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/;
- match = pattern.exec(expr);
- if (match == null) return before;
-
- while (match != null) {
- var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1];
- ctx = ctx[comp];
- if (null == ctx || '' == match[3]) break;
- expr = expr.substring('[' == match[3] ? match[1].length : match[0].length);
- match = pattern.exec(expr);
- }
-
- return before + String.interpret(ctx);
- });
- }
-});
-Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-
-var $break = { };
-
-var Enumerable = {
- each: function(iterator, context) {
- var index = 0;
- try {
- this._each(function(value) {
- iterator.call(context, value, index++);
- });
- } catch (e) {
- if (e != $break) throw e;
- }
- return this;
- },
-
- eachSlice: function(number, iterator, context) {
- var index = -number, slices = [], array = this.toArray();
- if (number < 1) return array;
- while ((index += number) < array.length)
- slices.push(array.slice(index, index+number));
- return slices.collect(iterator, context);
- },
-
- all: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result = true;
- this.each(function(value, index) {
- result = result && !!iterator.call(context, value, index);
- if (!result) throw $break;
- });
- return result;
- },
-
- any: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result = false;
- this.each(function(value, index) {
- if (result = !!iterator.call(context, value, index))
- throw $break;
- });
- return result;
- },
-
- collect: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var results = [];
- this.each(function(value, index) {
- results.push(iterator.call(context, value, index));
- });
- return results;
- },
-
- detect: function(iterator, context) {
- var result;
- this.each(function(value, index) {
- if (iterator.call(context, value, index)) {
- result = value;
- throw $break;
- }
- });
- return result;
- },
-
- findAll: function(iterator, context) {
- var results = [];
- this.each(function(value, index) {
- if (iterator.call(context, value, index))
- results.push(value);
- });
- return results;
- },
-
- grep: function(filter, iterator, context) {
- iterator = iterator || Prototype.K;
- var results = [];
-
- if (Object.isString(filter))
- filter = new RegExp(filter);
-
- this.each(function(value, index) {
- if (filter.match(value))
- results.push(iterator.call(context, value, index));
- });
- return results;
- },
-
- include: function(object) {
- if (Object.isFunction(this.indexOf))
- if (this.indexOf(object) != -1) return true;
-
- var found = false;
- this.each(function(value) {
- if (value == object) {
- found = true;
- throw $break;
- }
- });
- return found;
- },
-
- inGroupsOf: function(number, fillWith) {
- fillWith = Object.isUndefined(fillWith) ? null : fillWith;
- return this.eachSlice(number, function(slice) {
- while(slice.length < number) slice.push(fillWith);
- return slice;
- });
- },
-
- inject: function(memo, iterator, context) {
- this.each(function(value, index) {
- memo = iterator.call(context, memo, value, index);
- });
- return memo;
- },
-
- invoke: function(method) {
- var args = $A(arguments).slice(1);
- return this.map(function(value) {
- return value[method].apply(value, args);
- });
- },
-
- max: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result;
- this.each(function(value, index) {
- value = iterator.call(context, value, index);
- if (result == null || value >= result)
- result = value;
- });
- return result;
- },
-
- min: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var result;
- this.each(function(value, index) {
- value = iterator.call(context, value, index);
- if (result == null || value < result)
- result = value;
- });
- return result;
- },
-
- partition: function(iterator, context) {
- iterator = iterator || Prototype.K;
- var trues = [], falses = [];
- this.each(function(value, index) {
- (iterator.call(context, value, index) ?
- trues : falses).push(value);
- });
- return [trues, falses];
- },
-
- pluck: function(property) {
- var results = [];
- this.each(function(value) {
- results.push(value[property]);
- });
- return results;
- },
-
- reject: function(iterator, context) {
- var results = [];
- this.each(function(value, index) {
- if (!iterator.call(context, value, index))
- results.push(value);
- });
- return results;
- },
-
- sortBy: function(iterator, context) {
- return this.map(function(value, index) {
- return {
- value: value,
- criteria: iterator.call(context, value, index)
- };
- }).sort(function(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }).pluck('value');
- },
-
- toArray: function() {
- return this.map();
- },
-
- zip: function() {
- var iterator = Prototype.K, args = $A(arguments);
- if (Object.isFunction(args.last()))
- iterator = args.pop();
-
- var collections = [this].concat(args).map($A);
- return this.map(function(value, index) {
- return iterator(collections.pluck(index));
- });
- },
-
- size: function() {
- return this.toArray().length;
- },
-
- inspect: function() {
- return '#<Enumerable:' + this.toArray().inspect() + '>';
- }
-};
-
-Object.extend(Enumerable, {
- map: Enumerable.collect,
- find: Enumerable.detect,
- select: Enumerable.findAll,
- filter: Enumerable.findAll,
- member: Enumerable.include,
- entries: Enumerable.toArray,
- every: Enumerable.all,
- some: Enumerable.any
-});
-function $A(iterable) {
- if (!iterable) return [];
- if (iterable.toArray) return iterable.toArray();
- var length = iterable.length || 0, results = new Array(length);
- while (length--) results[length] = iterable[length];
- return results;
-}
-
-if (Prototype.Browser.WebKit) {
- $A = function(iterable) {
- if (!iterable) return [];
- // In Safari, only use the `toArray` method if it's not a NodeList.
- // A NodeList is a function, has an function `item` property, and a numeric
- // `length` property. Adapted from Google Doctype.
- if (!(typeof iterable === 'function' && typeof iterable.length ===
- 'number' && typeof iterable.item === 'function') && iterable.toArray)
- return iterable.toArray();
- var length = iterable.length || 0, results = new Array(length);
- while (length--) results[length] = iterable[length];
- return results;
- };
-}
-
-Array.from = $A;
-
-Object.extend(Array.prototype, Enumerable);
-
-if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse;
-
-Object.extend(Array.prototype, {
- _each: function(iterator) {
- for (var i = 0, length = this.length; i < length; i++)
- iterator(this[i]);
- },
-
- clear: function() {
- this.length = 0;
- return this;
- },
-
- first: function() {
- return this[0];
- },
-
- last: function() {
- return this[this.length - 1];
- },
-
- compact: function() {
- return this.select(function(value) {
- return value != null;
- });
- },
-
- flatten: function() {
- return this.inject([], function(array, value) {
- return array.concat(Object.isArray(value) ?
- value.flatten() : [value]);
- });
- },
-
- without: function() {
- var values = $A(arguments);
- return this.select(function(value) {
- return !values.include(value);
- });
- },
-
- reverse: function(inline) {
- return (inline !== false ? this : this.toArray())._reverse();
- },
-
- reduce: function() {
- return this.length > 1 ? this : this[0];
- },
-
- uniq: function(sorted) {
- return this.inject([], function(array, value, index) {
- if (0 == index || (sorted ? array.last() != value : !array.include(value)))
- array.push(value);
- return array;
- });
- },
-
- intersect: function(array) {
- return this.uniq().findAll(function(item) {
- return array.detect(function(value) { return item === value });
- });
- },
-
- clone: function() {
- return [].concat(this);
- },
-
- size: function() {
- return this.length;
- },
-
- inspect: function() {
- return '[' + this.map(Object.inspect).join(', ') + ']';
- },
-
- toJSON: function() {
- var results = [];
- this.each(function(object) {
- var value = Object.toJSON(object);
- if (!Object.isUndefined(value)) results.push(value);
- });
- return '[' + results.join(', ') + ']';
- }
-});
-
-// use native browser JS 1.6 implementation if available
-if (Object.isFunction(Array.prototype.forEach))
- Array.prototype._each = Array.prototype.forEach;
-
-if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) {
- i || (i = 0);
- var length = this.length;
- if (i < 0) i = length + i;
- for (; i < length; i++)
- if (this[i] === item) return i;
- return -1;
-};
-
-if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) {
- i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1;
- var n = this.slice(0, i).reverse().indexOf(item);
- return (n < 0) ? n : i - n - 1;
-};
-
-Array.prototype.toArray = Array.prototype.clone;
-
-function $w(string) {
- if (!Object.isString(string)) return [];
- string = string.strip();
- return string ? string.split(/\s+/) : [];
-}
-
-if (Prototype.Browser.Opera){
- Array.prototype.concat = function() {
- var array = [];
- for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
- for (var i = 0, length = arguments.length; i < length; i++) {
- if (Object.isArray(arguments[i])) {
- for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
- array.push(arguments[i][j]);
- } else {
- array.push(arguments[i]);
- }
- }
- return array;
- };
-}
-Object.extend(Number.prototype, {
- toColorPart: function() {
- return this.toPaddedString(2, 16);
- },
-
- succ: function() {
- return this + 1;
- },
-
- times: function(iterator, context) {
- $R(0, this, true).each(iterator, context);
- return this;
- },
-
- toPaddedString: function(length, radix) {
- var string = this.toString(radix || 10);
- return '0'.times(length - string.length) + string;
- },
-
- toJSON: function() {
- return isFinite(this) ? this.toString() : 'null';
- }
-});
-
-$w('abs round ceil floor').each(function(method){
- Number.prototype[method] = Math[method].methodize();
-});
-function $H(object) {
- return new Hash(object);
-};
-
-var Hash = Class.create(Enumerable, (function() {
-
- function toQueryPair(key, value) {
- if (Object.isUndefined(value)) return key;
- return key + '=' + encodeURIComponent(String.interpret(value));
- }
-
- return {
- initialize: function(object) {
- this._object = Object.isHash(object) ? object.toObject() : Object.clone(object);
- },
-
- _each: function(iterator) {
- for (var key in this._object) {
- var value = this._object[key], pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
- },
-
- set: function(key, value) {
- return this._object[key] = value;
- },
-
- get: function(key) {
- // simulating poorly supported hasOwnProperty
- if (this._object[key] !== Object.prototype[key])
- return this._object[key];
- },
-
- unset: function(key) {
- var value = this._object[key];
- delete this._object[key];
- return value;
- },
-
- toObject: function() {
- return Object.clone(this._object);
- },
-
- keys: function() {
- return this.pluck('key');
- },
-
- values: function() {
- return this.pluck('value');
- },
-
- index: function(value) {
- var match = this.detect(function(pair) {
- return pair.value === value;
- });
- return match && match.key;
- },
-
- merge: function(object) {
- return this.clone().update(object);
- },
-
- update: function(object) {
- return new Hash(object).inject(this, function(result, pair) {
- result.set(pair.key, pair.value);
- return result;
- });
- },
-
- toQueryString: function() {
- return this.inject([], function(results, pair) {
- var key = encodeURIComponent(pair.key), values = pair.value;
-
- if (values && typeof values == 'object') {
- if (Object.isArray(values))
- return results.concat(values.map(toQueryPair.curry(key)));
- } else results.push(toQueryPair(key, values));
- return results;
- }).join('&');
- },
-
- inspect: function() {
- return '#<Hash:{' + this.map(function(pair) {
- return pair.map(Object.inspect).join(': ');
- }).join(', ') + '}>';
- },
-
- toJSON: function() {
- return Object.toJSON(this.toObject());
- },
-
- clone: function() {
- return new Hash(this);
- }
- }
-})());
-
-Hash.prototype.toTemplateReplacements = Hash.prototype.toObject;
-Hash.from = $H;
-var ObjectRange = Class.create(Enumerable, {
- initialize: function(start, end, exclusive) {
- this.start = start;
- this.end = end;
- this.exclusive = exclusive;
- },
-
- _each: function(iterator) {
- var value = this.start;
- while (this.include(value)) {
- iterator(value);
- value = value.succ();
- }
- },
-
- include: function(value) {
- if (value < this.start)
- return false;
- if (this.exclusive)
- return value < this.end;
- return value <= this.end;
- }
-});
-
-var $R = function(start, end, exclusive) {
- return new ObjectRange(start, end, exclusive);
-};
-
-var Ajax = {
- getTransport: function() {
- return Try.these(
- function() {return new XMLHttpRequest()},
- function() {return new ActiveXObject('Msxml2.XMLHTTP')},
- function() {return new ActiveXObject('Microsoft.XMLHTTP')}
- ) || false;
- },
-
- activeRequestCount: 0
-};
-
-Ajax.Responders = {
- responders: [],
-
- _each: function(iterator) {
- this.responders._each(iterator);
- },
-
- register: function(responder) {
- if (!this.include(responder))
- this.responders.push(responder);
- },
-
- unregister: function(responder) {
- this.responders = this.responders.without(responder);
- },
-
- dispatch: function(callback, request, transport, json) {
- this.each(function(responder) {
- if (Object.isFunction(responder[callback])) {
- try {
- responder[callback].apply(responder, [request, transport, json]);
- } catch (e) { }
- }
- });
- }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
- onCreate: function() { Ajax.activeRequestCount++ },
- onComplete: function() { Ajax.activeRequestCount-- }
-});
-
-Ajax.Base = Class.create({
- initialize: function(options) {
- this.options = {
- method: 'post',
- asynchronous: true,
- contentType: 'application/x-www-form-urlencoded',
- encoding: 'UTF-8',
- parameters: '',
- evalJSON: true,
- evalJS: true
- };
- Object.extend(this.options, options || { });
-
- this.options.method = this.options.method.toLowerCase();
-
- if (Object.isString(this.options.parameters))
- this.options.parameters = this.options.parameters.toQueryParams();
- else if (Object.isHash(this.options.parameters))
- this.options.parameters = this.options.parameters.toObject();
- }
-});
-
-Ajax.Request = Class.create(Ajax.Base, {
- _complete: false,
-
- initialize: function($super, url, options) {
- $super(options);
- this.transport = Ajax.getTransport();
- this.request(url);
- },
-
- request: function(url) {
- this.url = url;
- this.method = this.options.method;
- var params = Object.clone(this.options.parameters);
-
- if (!['get', 'post'].include(this.method)) {
- // simulate other verbs over post
- params['_method'] = this.method;
- this.method = 'post';
- }
-
- this.parameters = params;
-
- if (params = Object.toQueryString(params)) {
- // when GET, append parameters to URL
- if (this.method == 'get')
- this.url += (this.url.include('?') ? '&' : '?') + params;
- else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
- params += '&_=';
- }
-
- try {
- var response = new Ajax.Response(this);
- if (this.options.onCreate) this.options.onCreate(response);
- Ajax.Responders.dispatch('onCreate', this, response);
-
- this.transport.open(this.method.toUpperCase(), this.url,
- this.options.asynchronous);
-
- if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1);
-
- this.transport.onreadystatechange = this.onStateChange.bind(this);
- this.setRequestHeaders();
-
- this.body = this.method == 'post' ? (this.options.postBody || params) : null;
- this.transport.send(this.body);
-
- /* Force Firefox to handle ready state 4 for synchronous requests */
- if (!this.options.asynchronous && this.transport.overrideMimeType)
- this.onStateChange();
-
- }
- catch (e) {
- this.dispatchException(e);
- }
- },
-
- onStateChange: function() {
- var readyState = this.transport.readyState;
- if (readyState > 1 && !((readyState == 4) && this._complete))
- this.respondToReadyState(this.transport.readyState);
- },
-
- setRequestHeaders: function() {
- var headers = {
- 'X-Requested-With': 'XMLHttpRequest',
- 'X-Prototype-Version': Prototype.Version,
- 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
- };
-
- if (this.method == 'post') {
- headers['Content-type'] = this.options.contentType +
- (this.options.encoding ? '; charset=' + this.options.encoding : '');
-
- /* Force "Connection: close" for older Mozilla browsers to work
- * around a bug where XMLHttpRequest sends an incorrect
- * Content-length header. See Mozilla Bugzilla #246651.
- */
- if (this.transport.overrideMimeType &&
- (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
- headers['Connection'] = 'close';
- }
-
- // user-defined headers
- if (typeof this.options.requestHeaders == 'object') {
- var extras = this.options.requestHeaders;
-
- if (Object.isFunction(extras.push))
- for (var i = 0, length = extras.length; i < length; i += 2)
- headers[extras[i]] = extras[i+1];
- else
- $H(extras).each(function(pair) { headers[pair.key] = pair.value });
- }
-
- for (var name in headers)
- this.transport.setRequestHeader(name, headers[name]);
- },
-
- success: function() {
- var status = this.getStatus();
- return !status || (status >= 200 && status < 300);
- },
-
- getStatus: function() {
- try {
- return this.transport.status || 0;
- } catch (e) { return 0 }
- },
-
- respondToReadyState: function(readyState) {
- var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this);
-
- if (state == 'Complete') {
- try {
- this._complete = true;
- (this.options['on' + response.status]
- || this.options['on' + (this.success() ? 'Success' : 'Failure')]
- || Prototype.emptyFunction)(response, response.headerJSON);
- } catch (e) {
- this.dispatchException(e);
- }
-
- var contentType = response.getHeader('Content-type');
- if (this.options.evalJS == 'force'
- || (this.options.evalJS && this.isSameOrigin() && contentType
- && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i)))
- this.evalResponse();
- }
-
- try {
- (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON);
- Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON);
- } catch (e) {
- this.dispatchException(e);
- }
-
- if (state == 'Complete') {
- // avoid memory leak in MSIE: clean up
- this.transport.onreadystatechange = Prototype.emptyFunction;
- }
- },
-
- isSameOrigin: function() {
- var m = this.url.match(/^\s*https?:\/\/[^\/]*/);
- return !m || (m[0] == '#{protocol}//#{domain}#{port}'.interpolate({
- protocol: location.protocol,
- domain: document.domain,
- port: location.port ? ':' + location.port : ''
- }));
- },
-
- getHeader: function(name) {
- try {
- return this.transport.getResponseHeader(name) || null;
- } catch (e) { return null }
- },
-
- evalResponse: function() {
- try {
- return eval((this.transport.responseText || '').unfilterJSON());
- } catch (e) {
- this.dispatchException(e);
- }
- },
-
- dispatchException: function(exception) {
- (this.options.onException || Prototype.emptyFunction)(this, exception);
- Ajax.Responders.dispatch('onException', this, exception);
- }
-});
-
-Ajax.Request.Events =
- ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-Ajax.Response = Class.create({
- initialize: function(request){
- this.request = request;
- var transport = this.transport = request.transport,
- readyState = this.readyState = transport.readyState;
-
- if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) {
- this.status = this.getStatus();
- this.statusText = this.getStatusText();
- this.responseText = String.interpret(transport.responseText);
- this.headerJSON = this._getHeaderJSON();
- }
-
- if(readyState == 4) {
- var xml = transport.responseXML;
- this.responseXML = Object.isUndefined(xml) ? null : xml;
- this.responseJSON = this._getResponseJSON();
- }
- },
-
- status: 0,
- statusText: '',
-
- getStatus: Ajax.Request.prototype.getStatus,
-
- getStatusText: function() {
- try {
- return this.transport.statusText || '';
- } catch (e) { return '' }
- },
-
- getHeader: Ajax.Request.prototype.getHeader,
-
- getAllHeaders: function() {
- try {
- return this.getAllResponseHeaders();
- } catch (e) { return null }
- },
-
- getResponseHeader: function(name) {
- return this.transport.getResponseHeader(name);
- },
-
- getAllResponseHeaders: function() {
- return this.transport.getAllResponseHeaders();
- },
-
- _getHeaderJSON: function() {
- var json = this.getHeader('X-JSON');
- if (!json) return null;
- json = decodeURIComponent(escape(json));
- try {
- return json.evalJSON(this.request.options.sanitizeJSON ||
- !this.request.isSameOrigin());
- } catch (e) {
- this.request.dispatchException(e);
- }
- },
-
- _getResponseJSON: function() {
- var options = this.request.options;
- if (!options.evalJSON || (options.evalJSON != 'force' &&
- !(this.getHeader('Content-type') || '').include('application/json')) ||
- this.responseText.blank())
- return null;
- try {
- return this.responseText.evalJSON(options.sanitizeJSON ||
- !this.request.isSameOrigin());
- } catch (e) {
- this.request.dispatchException(e);
- }
- }
-});
-
-Ajax.Updater = Class.create(Ajax.Request, {
- initialize: function($super, container, url, options) {
- this.container = {
- success: (container.success || container),
- failure: (container.failure || (container.success ? null : container))
- };
-
- options = Object.clone(options);
- var onComplete = options.onComplete;
- options.onComplete = (function(response, json) {
- this.updateContent(response.responseText);
- if (Object.isFunction(onComplete)) onComplete(response, json);
- }).bind(this);
-
- $super(url, options);
- },
-
- updateContent: function(responseText) {
- var receiver = this.container[this.success() ? 'success' : 'failure'],
- options = this.options;
-
- if (!options.evalScripts) responseText = responseText.stripScripts();
-
- if (receiver = $(receiver)) {
- if (options.insertion) {
- if (Object.isString(options.insertion)) {
- var insertion = { }; insertion[options.insertion] = responseText;
- receiver.insert(insertion);
- }
- else options.insertion(receiver, responseText);
- }
- else receiver.update(responseText);
- }
- }
-});
-
-Ajax.PeriodicalUpdater = Class.create(Ajax.Base, {
- initialize: function($super, container, url, options) {
- $super(options);
- this.onComplete = this.options.onComplete;
-
- this.frequency = (this.options.frequency || 2);
- this.decay = (this.options.decay || 1);
-
- this.updater = { };
- this.container = container;
- this.url = url;
-
- this.start();
- },
-
- start: function() {
- this.options.onComplete = this.updateComplete.bind(this);
- this.onTimerEvent();
- },
-
- stop: function() {
- this.updater.options.onComplete = undefined;
- clearTimeout(this.timer);
- (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
- },
-
- updateComplete: function(response) {
- if (this.options.decay) {
- this.decay = (response.responseText == this.lastText ?
- this.decay * this.options.decay : 1);
-
- this.lastText = response.responseText;
- }
- this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency);
- },
-
- onTimerEvent: function() {
- this.updater = new Ajax.Updater(this.container, this.url, this.options);
- }
-});
-function $(element) {
- if (arguments.length > 1) {
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
- elements.push($(arguments[i]));
- return elements;
- }
- if (Object.isString(element))
- element = document.getElementById(element);
- return Element.extend(element);
-}
-
-if (Prototype.BrowserFeatures.XPath) {
- document._getElementsByXPath = function(expression, parentElement) {
- var results = [];
- var query = document.evaluate(expression, $(parentElement) || document,
- null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
- for (var i = 0, length = query.snapshotLength; i < length; i++)
- results.push(Element.extend(query.snapshotItem(i)));
- return results;
- };
-}
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Node) var Node = { };
-
-if (!Node.ELEMENT_NODE) {
- // DOM level 2 ECMAScript Language Binding
- Object.extend(Node, {
- ELEMENT_NODE: 1,
- ATTRIBUTE_NODE: 2,
- TEXT_NODE: 3,
- CDATA_SECTION_NODE: 4,
- ENTITY_REFERENCE_NODE: 5,
- ENTITY_NODE: 6,
- PROCESSING_INSTRUCTION_NODE: 7,
- COMMENT_NODE: 8,
- DOCUMENT_NODE: 9,
- DOCUMENT_TYPE_NODE: 10,
- DOCUMENT_FRAGMENT_NODE: 11,
- NOTATION_NODE: 12
- });
-}
-
-(function() {
- var element = this.Element;
- this.Element = function(tagName, attributes) {
- attributes = attributes || { };
- tagName = tagName.toLowerCase();
- var cache = Element.cache;
- if (Prototype.Browser.IE && attributes.name) {
- tagName = '<' + tagName + ' name="' + attributes.name + '">';
- delete attributes.name;
- return Element.writeAttribute(document.createElement(tagName), attributes);
- }
- if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName));
- return Element.writeAttribute(cache[tagName].cloneNode(false), attributes);
- };
- Object.extend(this.Element, element || { });
- if (element) this.Element.prototype = element.prototype;
-}).call(window);
-
-Element.cache = { };
-
-Element.Methods = {
- visible: function(element) {
- return $(element).style.display != 'none';
- },
-
- toggle: function(element) {
- element = $(element);
- Element[Element.visible(element) ? 'hide' : 'show'](element);
- return element;
- },
-
- hide: function(element) {
- element = $(element);
- element.style.display = 'none';
- return element;
- },
-
- show: function(element) {
- element = $(element);
- element.style.display = '';
- return element;
- },
-
- remove: function(element) {
- element = $(element);
- element.parentNode.removeChild(element);
- return element;
- },
-
- update: function(element, content) {
- element = $(element);
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) return element.update().insert(content);
- content = Object.toHTML(content);
- element.innerHTML = content.stripScripts();
- content.evalScripts.bind(content).defer();
- return element;
- },
-
- replace: function(element, content) {
- element = $(element);
- if (content && content.toElement) content = content.toElement();
- else if (!Object.isElement(content)) {
- content = Object.toHTML(content);
- var range = element.ownerDocument.createRange();
- range.selectNode(element);
- content.evalScripts.bind(content).defer();
- content = range.createContextualFragment(content.stripScripts());
- }
- element.parentNode.replaceChild(content, element);
- return element;
- },
-
- insert: function(element, insertions) {
- element = $(element);
-
- if (Object.isString(insertions) || Object.isNumber(insertions) ||
- Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))
- insertions = {bottom:insertions};
-
- var content, insert, tagName, childNodes;
-
- for (var position in insertions) {
- content = insertions[position];
- position = position.toLowerCase();
- insert = Element._insertionTranslations[position];
-
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) {
- insert(element, content);
- continue;
- }
-
- content = Object.toHTML(content);
-
- tagName = ((position == 'before' || position == 'after')
- ? element.parentNode : element).tagName.toUpperCase();
-
- childNodes = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
-
- if (position == 'top' || position == 'after') childNodes.reverse();
- childNodes.each(insert.curry(element));
-
- content.evalScripts.bind(content).defer();
- }
-
- return element;
- },
-
- wrap: function(element, wrapper, attributes) {
- element = $(element);
- if (Object.isElement(wrapper))
- $(wrapper).writeAttribute(attributes || { });
- else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes);
- else wrapper = new Element('div', wrapper);
- if (element.parentNode)
- element.parentNode.replaceChild(wrapper, element);
- wrapper.appendChild(element);
- return wrapper;
- },
-
- inspect: function(element) {
- element = $(element);
- var result = '<' + element.tagName.toLowerCase();
- $H({'id': 'id', 'className': 'class'}).each(function(pair) {
- var property = pair.first(), attribute = pair.last();
- var value = (element[property] || '').toString();
- if (value) result += ' ' + attribute + '=' + value.inspect(true);
- });
- return result + '>';
- },
-
- recursivelyCollect: function(element, property) {
- element = $(element);
- var elements = [];
- while (element = element[property])
- if (element.nodeType == 1)
- elements.push(Element.extend(element));
- return elements;
- },
-
- ancestors: function(element) {
- return $(element).recursivelyCollect('parentNode');
- },
-
- descendants: function(element) {
- return $(element).select("*");
- },
-
- firstDescendant: function(element) {
- element = $(element).firstChild;
- while (element && element.nodeType != 1) element = element.nextSibling;
- return $(element);
- },
-
- immediateDescendants: function(element) {
- if (!(element = $(element).firstChild)) return [];
- while (element && element.nodeType != 1) element = element.nextSibling;
- if (element) return [element].concat($(element).nextSiblings());
- return [];
- },
-
- previousSiblings: function(element) {
- return $(element).recursivelyCollect('previousSibling');
- },
-
- nextSiblings: function(element) {
- return $(element).recursivelyCollect('nextSibling');
- },
-
- siblings: function(element) {
- element = $(element);
- return element.previousSiblings().reverse().concat(element.nextSiblings());
- },
-
- match: function(element, selector) {
- if (Object.isString(selector))
- selector = new Selector(selector);
- return selector.match($(element));
- },
-
- up: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(element.parentNode);
- var ancestors = element.ancestors();
- return Object.isNumber(expression) ? ancestors[expression] :
- Selector.findElement(ancestors, expression, index);
- },
-
- down: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return element.firstDescendant();
- return Object.isNumber(expression) ? element.descendants()[expression] :
- Element.select(element, expression)[index || 0];
- },
-
- previous: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
- var previousSiblings = element.previousSiblings();
- return Object.isNumber(expression) ? previousSiblings[expression] :
- Selector.findElement(previousSiblings, expression, index);
- },
-
- next: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
- var nextSiblings = element.nextSiblings();
- return Object.isNumber(expression) ? nextSiblings[expression] :
- Selector.findElement(nextSiblings, expression, index);
- },
-
- select: function() {
- var args = $A(arguments), element = $(args.shift());
- return Selector.findChildElements(element, args);
- },
-
- adjacent: function() {
- var args = $A(arguments), element = $(args.shift());
- return Selector.findChildElements(element.parentNode, args).without(element);
- },
-
- identify: function(element) {
- element = $(element);
- var id = element.readAttribute('id'), self = arguments.callee;
- if (id) return id;
- do { id = 'anonymous_element_' + self.counter++ } while ($(id));
- element.writeAttribute('id', id);
- return id;
- },
-
- readAttribute: function(element, name) {
- element = $(element);
- if (Prototype.Browser.IE) {
- var t = Element._attributeTranslations.read;
- if (t.values[name]) return t.values[name](element, name);
- if (t.names[name]) name = t.names[name];
- if (name.include(':')) {
- return (!element.attributes || !element.attributes[name]) ? null :
- element.attributes[name].value;
- }
- }
- return element.getAttribute(name);
- },
-
- writeAttribute: function(element, name, value) {
- element = $(element);
- var attributes = { }, t = Element._attributeTranslations.write;
-
- if (typeof name == 'object') attributes = name;
- else attributes[name] = Object.isUndefined(value) ? true : value;
-
- for (var attr in attributes) {
- name = t.names[attr] || attr;
- value = attributes[attr];
- if (t.values[attr]) name = t.values[attr](element, value);
- if (value === false || value === null)
- element.removeAttribute(name);
- else if (value === true)
- element.setAttribute(name, name);
- else element.setAttribute(name, value);
- }
- return element;
- },
-
- getHeight: function(element) {
- return $(element).getDimensions().height;
- },
-
- getWidth: function(element) {
- return $(element).getDimensions().width;
- },
-
- classNames: function(element) {
- return new Element.ClassNames(element);
- },
-
- hasClassName: function(element, className) {
- if (!(element = $(element))) return;
- var elementClassName = element.className;
- return (elementClassName.length > 0 && (elementClassName == className ||
- new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName)));
- },
-
- addClassName: function(element, className) {
- if (!(element = $(element))) return;
- if (!element.hasClassName(className))
- element.className += (element.className ? ' ' : '') + className;
- return element;
- },
-
- removeClassName: function(element, className) {
- if (!(element = $(element))) return;
- element.className = element.className.replace(
- new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip();
- return element;
- },
-
- toggleClassName: function(element, className) {
- if (!(element = $(element))) return;
- return element[element.hasClassName(className) ?
- 'removeClassName' : 'addClassName'](className);
- },
-
- // removes whitespace-only text node children
- cleanWhitespace: function(element) {
- element = $(element);
- var node = element.firstChild;
- while (node) {
- var nextNode = node.nextSibling;
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
- element.removeChild(node);
- node = nextNode;
- }
- return element;
- },
-
- empty: function(element) {
- return $(element).innerHTML.blank();
- },
-
- descendantOf: function(element, ancestor) {
- element = $(element), ancestor = $(ancestor);
-
- if (element.compareDocumentPosition)
- return (element.compareDocumentPosition(ancestor) & 8) === 8;
-
- if (ancestor.contains)
- return ancestor.contains(element) && ancestor !== element;
-
- while (element = element.parentNode)
- if (element == ancestor) return true;
-
- return false;
- },
-
- scrollTo: function(element) {
- element = $(element);
- var pos = element.cumulativeOffset();
- window.scrollTo(pos[0], pos[1]);
- return element;
- },
-
- getStyle: function(element, style) {
- element = $(element);
- style = style == 'float' ? 'cssFloat' : style.camelize();
- var value = element.style[style];
- if (!value || value == 'auto') {
- var css = document.defaultView.getComputedStyle(element, null);
- value = css ? css[style] : null;
- }
- if (style == 'opacity') return value ? parseFloat(value) : 1.0;
- return value == 'auto' ? null : value;
- },
-
- getOpacity: function(element) {
- return $(element).getStyle('opacity');
- },
-
- setStyle: function(element, styles) {
- element = $(element);
- var elementStyle = element.style, match;
- if (Object.isString(styles)) {
- element.style.cssText += ';' + styles;
- return styles.include('opacity') ?
- element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
- }
- for (var property in styles)
- if (property == 'opacity') element.setOpacity(styles[property]);
- else
- elementStyle[(property == 'float' || property == 'cssFloat') ?
- (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') :
- property] = styles[property];
-
- return element;
- },
-
- setOpacity: function(element, value) {
- element = $(element);
- element.style.opacity = (value == 1 || value === '') ? '' :
- (value < 0.00001) ? 0 : value;
- return element;
- },
-
- getDimensions: function(element) {
- element = $(element);
- var display = element.getStyle('display');
- if (display != 'none' && display != null) // Safari bug
- return {width: element.offsetWidth, height: element.offsetHeight};
-
- // All *Width and *Height properties give 0 on elements with display none,
- // so enable the element temporarily
- var els = element.style;
- var originalVisibility = els.visibility;
- var originalPosition = els.position;
- var originalDisplay = els.display;
- els.visibility = 'hidden';
- els.position = 'absolute';
- els.display = 'block';
- var originalWidth = element.clientWidth;
- var originalHeight = element.clientHeight;
- els.display = originalDisplay;
- els.position = originalPosition;
- els.visibility = originalVisibility;
- return {width: originalWidth, height: originalHeight};
- },
-
- makePositioned: function(element) {
- element = $(element);
- var pos = Element.getStyle(element, 'position');
- if (pos == 'static' || !pos) {
- element._madePositioned = true;
- element.style.position = 'relative';
- // Opera returns the offset relative to the positioning context, when an
- // element is position relative but top and left have not been defined
- if (Prototype.Browser.Opera) {
- element.style.top = 0;
- element.style.left = 0;
- }
- }
- return element;
- },
-
- undoPositioned: function(element) {
- element = $(element);
- if (element._madePositioned) {
- element._madePositioned = undefined;
- element.style.position =
- element.style.top =
- element.style.left =
- element.style.bottom =
- element.style.right = '';
- }
- return element;
- },
-
- makeClipping: function(element) {
- element = $(element);
- if (element._overflow) return element;
- element._overflow = Element.getStyle(element, 'overflow') || 'auto';
- if (element._overflow !== 'hidden')
- element.style.overflow = 'hidden';
- return element;
- },
-
- undoClipping: function(element) {
- element = $(element);
- if (!element._overflow) return element;
- element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
- element._overflow = null;
- return element;
- },
-
- cumulativeOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- } while (element);
- return Element._returnOffset(valueL, valueT);
- },
-
- positionedOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- if (element) {
- if (element.tagName.toUpperCase() == 'BODY') break;
- var p = Element.getStyle(element, 'position');
- if (p !== 'static') break;
- }
- } while (element);
- return Element._returnOffset(valueL, valueT);
- },
-
- absolutize: function(element) {
- element = $(element);
- if (element.getStyle('position') == 'absolute') return element;
- // Position.prepare(); // To be done manually by Scripty when it needs it.
-
- var offsets = element.positionedOffset();
- var top = offsets[1];
- var left = offsets[0];
- var width = element.clientWidth;
- var height = element.clientHeight;
-
- element._originalLeft = left - parseFloat(element.style.left || 0);
- element._originalTop = top - parseFloat(element.style.top || 0);
- element._originalWidth = element.style.width;
- element._originalHeight = element.style.height;
-
- element.style.position = 'absolute';
- element.style.top = top + 'px';
- element.style.left = left + 'px';
- element.style.width = width + 'px';
- element.style.height = height + 'px';
- return element;
- },
-
- relativize: function(element) {
- element = $(element);
- if (element.getStyle('position') == 'relative') return element;
- // Position.prepare(); // To be done manually by Scripty when it needs it.
-
- element.style.position = 'relative';
- var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
- var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
-
- element.style.top = top + 'px';
- element.style.left = left + 'px';
- element.style.height = element._originalHeight;
- element.style.width = element._originalWidth;
- return element;
- },
-
- cumulativeScrollOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.scrollTop || 0;
- valueL += element.scrollLeft || 0;
- element = element.parentNode;
- } while (element);
- return Element._returnOffset(valueL, valueT);
- },
-
- getOffsetParent: function(element) {
- if (element.offsetParent) return $(element.offsetParent);
- if (element == document.body) return $(element);
-
- while ((element = element.parentNode) && element != document.body)
- if (Element.getStyle(element, 'position') != 'static')
- return $(element);
-
- return $(document.body);
- },
-
- viewportOffset: function(forElement) {
- var valueT = 0, valueL = 0;
-
- var element = forElement;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
-
- // Safari fix
- if (element.offsetParent == document.body &&
- Element.getStyle(element, 'position') == 'absolute') break;
-
- } while (element = element.offsetParent);
-
- element = forElement;
- do {
- if (!Prototype.Browser.Opera || (element.tagName && (element.tagName.toUpperCase() == 'BODY'))) {
- valueT -= element.scrollTop || 0;
- valueL -= element.scrollLeft || 0;
- }
- } while (element = element.parentNode);
-
- return Element._returnOffset(valueL, valueT);
- },
-
- clonePosition: function(element, source) {
- var options = Object.extend({
- setLeft: true,
- setTop: true,
- setWidth: true,
- setHeight: true,
- offsetTop: 0,
- offsetLeft: 0
- }, arguments[2] || { });
-
- // find page position of source
- source = $(source);
- var p = source.viewportOffset();
-
- // find coordinate system to use
- element = $(element);
- var delta = [0, 0];
- var parent = null;
- // delta [0,0] will do fine with position: fixed elements,
- // position:absolute needs offsetParent deltas
- if (Element.getStyle(element, 'position') == 'absolute') {
- parent = element.getOffsetParent();
- delta = parent.viewportOffset();
- }
-
- // correct by body offsets (fixes Safari)
- if (parent == document.body) {
- delta[0] -= document.body.offsetLeft;
- delta[1] -= document.body.offsetTop;
- }
-
- // set position
- if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
- if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
- if (options.setWidth) element.style.width = source.offsetWidth + 'px';
- if (options.setHeight) element.style.height = source.offsetHeight + 'px';
- return element;
- }
-};
-
-Element.Methods.identify.counter = 1;
-
-Object.extend(Element.Methods, {
- getElementsBySelector: Element.Methods.select,
- childElements: Element.Methods.immediateDescendants
-});
-
-Element._attributeTranslations = {
- write: {
- names: {
- className: 'class',
- htmlFor: 'for'
- },
- values: { }
- }
-};
-
-if (Prototype.Browser.Opera) {
- Element.Methods.getStyle = Element.Methods.getStyle.wrap(
- function(proceed, element, style) {
- switch (style) {
- case 'left': case 'top': case 'right': case 'bottom':
- if (proceed(element, 'position') === 'static') return null;
- case 'height': case 'width':
- // returns '0px' for hidden elements; we want it to return null
- if (!Element.visible(element)) return null;
-
- // returns the border-box dimensions rather than the content-box
- // dimensions, so we subtract padding and borders from the value
- var dim = parseInt(proceed(element, style), 10);
-
- if (dim !== element['offset' + style.capitalize()])
- return dim + 'px';
-
- var properties;
- if (style === 'height') {
- properties = ['border-top-width', 'padding-top',
- 'padding-bottom', 'border-bottom-width'];
- }
- else {
- properties = ['border-left-width', 'padding-left',
- 'padding-right', 'border-right-width'];
- }
- return properties.inject(dim, function(memo, property) {
- var val = proceed(element, property);
- return val === null ? memo : memo - parseInt(val, 10);
- }) + 'px';
- default: return proceed(element, style);
- }
- }
- );
-
- Element.Methods.readAttribute = Element.Methods.readAttribute.wrap(
- function(proceed, element, attribute) {
- if (attribute === 'title') return element.title;
- return proceed(element, attribute);
- }
- );
-}
-
-else if (Prototype.Browser.IE) {
- // IE doesn't report offsets correctly for static elements, so we change them
- // to "relative" to get the values, then change them back.
- Element.Methods.getOffsetParent = Element.Methods.getOffsetParent.wrap(
- function(proceed, element) {
- element = $(element);
- // IE throws an error if element is not in document
- try { element.offsetParent }
- catch(e) { return $(document.body) }
- var position = element.getStyle('position');
- if (position !== 'static') return proceed(element);
- element.setStyle({ position: 'relative' });
- var value = proceed(element);
- element.setStyle({ position: position });
- return value;
- }
- );
-
- $w('positionedOffset viewportOffset').each(function(method) {
- Element.Methods[method] = Element.Methods[method].wrap(
- function(proceed, element) {
- element = $(element);
- try { element.offsetParent }
- catch(e) { return Element._returnOffset(0,0) }
- var position = element.getStyle('position');
- if (position !== 'static') return proceed(element);
- // Trigger hasLayout on the offset parent so that IE6 reports
- // accurate offsetTop and offsetLeft values for position: fixed.
- var offsetParent = element.getOffsetParent();
- if (offsetParent && offsetParent.getStyle('position') === 'fixed')
- offsetParent.setStyle({ zoom: 1 });
- element.setStyle({ position: 'relative' });
- var value = proceed(element);
- element.setStyle({ position: position });
- return value;
- }
- );
- });
-
- Element.Methods.cumulativeOffset = Element.Methods.cumulativeOffset.wrap(
- function(proceed, element) {
- try { element.offsetParent }
- catch(e) { return Element._returnOffset(0,0) }
- return proceed(element);
- }
- );
-
- Element.Methods.getStyle = function(element, style) {
- element = $(element);
- style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
- var value = element.style[style];
- if (!value && element.currentStyle) value = element.currentStyle[style];
-
- if (style == 'opacity') {
- if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
- if (value[1]) return parseFloat(value[1]) / 100;
- return 1.0;
- }
-
- if (value == 'auto') {
- if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
- return element['offset' + style.capitalize()] + 'px';
- return null;
- }
- return value;
- };
-
- Element.Methods.setOpacity = function(element, value) {
- function stripAlpha(filter){
- return filter.replace(/alpha\([^\)]*\)/gi,'');
- }
- element = $(element);
- var currentStyle = element.currentStyle;
- if ((currentStyle && !currentStyle.hasLayout) ||
- (!currentStyle && element.style.zoom == 'normal'))
- element.style.zoom = 1;
-
- var filter = element.getStyle('filter'), style = element.style;
- if (value == 1 || value === '') {
- (filter = stripAlpha(filter)) ?
- style.filter = filter : style.removeAttribute('filter');
- return element;
- } else if (value < 0.00001) value = 0;
- style.filter = stripAlpha(filter) +
- 'alpha(opacity=' + (value * 100) + ')';
- return element;
- };
-
- Element._attributeTranslations = {
- read: {
- names: {
- 'class': 'className',
- 'for': 'htmlFor'
- },
- values: {
- _getAttr: function(element, attribute) {
- return element.getAttribute(attribute, 2);
- },
- _getAttrNode: function(element, attribute) {
- var node = element.getAttributeNode(attribute);
- return node ? node.value : "";
- },
- _getEv: function(element, attribute) {
- attribute = element.getAttribute(attribute);
- return attribute ? attribute.toString().slice(23, -2) : null;
- },
- _flag: function(element, attribute) {
- return $(element).hasAttribute(attribute) ? attribute : null;
- },
- style: function(element) {
- return element.style.cssText.toLowerCase();
- },
- title: function(element) {
- return element.title;
- }
- }
- }
- };
-
- Element._attributeTranslations.write = {
- names: Object.extend({
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing'
- }, Element._attributeTranslations.read.names),
- values: {
- checked: function(element, value) {
- element.checked = !!value;
- },
-
- style: function(element, value) {
- element.style.cssText = value ? value : '';
- }
- }
- };
-
- Element._attributeTranslations.has = {};
-
- $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' +
- 'encType maxLength readOnly longDesc frameBorder').each(function(attr) {
- Element._attributeTranslations.write.names[attr.toLowerCase()] = attr;
- Element._attributeTranslations.has[attr.toLowerCase()] = attr;
- });
-
- (function(v) {
- Object.extend(v, {
- href: v._getAttr,
- src: v._getAttr,
- type: v._getAttr,
- action: v._getAttrNode,
- disabled: v._flag,
- checked: v._flag,
- readonly: v._flag,
- multiple: v._flag,
- onload: v._getEv,
- onunload: v._getEv,
- onclick: v._getEv,
- ondblclick: v._getEv,
- onmousedown: v._getEv,
- onmouseup: v._getEv,
- onmouseover: v._getEv,
- onmousemove: v._getEv,
- onmouseout: v._getEv,
- onfocus: v._getEv,
- onblur: v._getEv,
- onkeypress: v._getEv,
- onkeydown: v._getEv,
- onkeyup: v._getEv,
- onsubmit: v._getEv,
- onreset: v._getEv,
- onselect: v._getEv,
- onchange: v._getEv
- });
- })(Element._attributeTranslations.read.values);
-}
-
-else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) {
- Element.Methods.setOpacity = function(element, value) {
- element = $(element);
- element.style.opacity = (value == 1) ? 0.999999 :
- (value === '') ? '' : (value < 0.00001) ? 0 : value;
- return element;
- };
-}
-
-else if (Prototype.Browser.WebKit) {
- Element.Methods.setOpacity = function(element, value) {
- element = $(element);
- element.style.opacity = (value == 1 || value === '') ? '' :
- (value < 0.00001) ? 0 : value;
-
- if (value == 1)
- if(element.tagName.toUpperCase() == 'IMG' && element.width) {
- element.width++; element.width--;
- } else try {
- var n = document.createTextNode(' ');
- element.appendChild(n);
- element.removeChild(n);
- } catch (e) { }
-
- return element;
- };
-
- // Safari returns margins on body which is incorrect if the child is absolutely
- // positioned. For performance reasons, redefine Element#cumulativeOffset for
- // KHTML/WebKit only.
- Element.Methods.cumulativeOffset = function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- if (element.offsetParent == document.body)
- if (Element.getStyle(element, 'position') == 'absolute') break;
-
- element = element.offsetParent;
- } while (element);
-
- return Element._returnOffset(valueL, valueT);
- };
-}
-
-if (Prototype.Browser.IE || Prototype.Browser.Opera) {
- // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements
- Element.Methods.update = function(element, content) {
- element = $(element);
-
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) return element.update().insert(content);
-
- content = Object.toHTML(content);
- var tagName = element.tagName.toUpperCase();
-
- if (tagName in Element._insertionTranslations.tags) {
- $A(element.childNodes).each(function(node) { element.removeChild(node) });
- Element._getContentFromAnonymousElement(tagName, content.stripScripts())
- .each(function(node) { element.appendChild(node) });
- }
- else element.innerHTML = content.stripScripts();
-
- content.evalScripts.bind(content).defer();
- return element;
- };
-}
-
-if ('outerHTML' in document.createElement('div')) {
- Element.Methods.replace = function(element, content) {
- element = $(element);
-
- if (content && content.toElement) content = content.toElement();
- if (Object.isElement(content)) {
- element.parentNode.replaceChild(content, element);
- return element;
- }
-
- content = Object.toHTML(content);
- var parent = element.parentNode, tagName = parent.tagName.toUpperCase();
-
- if (Element._insertionTranslations.tags[tagName]) {
- var nextSibling = element.next();
- var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());
- parent.removeChild(element);
- if (nextSibling)
- fragments.each(function(node) { parent.insertBefore(node, nextSibling) });
- else
- fragments.each(function(node) { parent.appendChild(node) });
- }
- else element.outerHTML = content.stripScripts();
-
- content.evalScripts.bind(content).defer();
- return element;
- };
-}
-
-Element._returnOffset = function(l, t) {
- var result = [l, t];
- result.left = l;
- result.top = t;
- return result;
-};
-
-Element._getContentFromAnonymousElement = function(tagName, html) {
- var div = new Element('div'), t = Element._insertionTranslations.tags[tagName];
- if (t) {
- div.innerHTML = t[0] + html + t[1];
- t[2].times(function() { div = div.firstChild });
- } else div.innerHTML = html;
- return $A(div.childNodes);
-};
-
-Element._insertionTranslations = {
- before: function(element, node) {
- element.parentNode.insertBefore(node, element);
- },
- top: function(element, node) {
- element.insertBefore(node, element.firstChild);
- },
- bottom: function(element, node) {
- element.appendChild(node);
- },
- after: function(element, node) {
- element.parentNode.insertBefore(node, element.nextSibling);
- },
- tags: {
- TABLE: ['<table>', '</table>', 1],
- TBODY: ['<table><tbody>', '</tbody></table>', 2],
- TR: ['<table><tbody><tr>', '</tr></tbody></table>', 3],
- TD: ['<table><tbody><tr><td>', '</td></tr></tbody></table>', 4],
- SELECT: ['<select>', '</select>', 1]
- }
-};
-
-(function() {
- Object.extend(this.tags, {
- THEAD: this.tags.TBODY,
- TFOOT: this.tags.TBODY,
- TH: this.tags.TD
- });
-}).call(Element._insertionTranslations);
-
-Element.Methods.Simulated = {
- hasAttribute: function(element, attribute) {
- attribute = Element._attributeTranslations.has[attribute] || attribute;
- var node = $(element).getAttributeNode(attribute);
- return !!(node && node.specified);
- }
-};
-
-Element.Methods.ByTag = { };
-
-Object.extend(Element, Element.Methods);
-
-if (!Prototype.BrowserFeatures.ElementExtensions &&
- document.createElement('div')['__proto__']) {
- window.HTMLElement = { };
- window.HTMLElement.prototype = document.createElement('div')['__proto__'];
- Prototype.BrowserFeatures.ElementExtensions = true;
-}
-
-Element.extend = (function() {
- if (Prototype.BrowserFeatures.SpecificElementExtensions)
- return Prototype.K;
-
- var Methods = { }, ByTag = Element.Methods.ByTag;
-
- var extend = Object.extend(function(element) {
- if (!element || element._extendedByPrototype ||
- element.nodeType != 1 || element == window) return element;
-
- var methods = Object.clone(Methods),
- tagName = element.tagName.toUpperCase(), property, value;
-
- // extend methods for specific tags
- if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]);
-
- for (property in methods) {
- value = methods[property];
- if (Object.isFunction(value) && !(property in element))
- element[property] = value.methodize();
- }
-
- element._extendedByPrototype = Prototype.emptyFunction;
- return element;
-
- }, {
- refresh: function() {
- // extend methods for all tags (Safari doesn't need this)
- if (!Prototype.BrowserFeatures.ElementExtensions) {
- Object.extend(Methods, Element.Methods);
- Object.extend(Methods, Element.Methods.Simulated);
- }
- }
- });
-
- extend.refresh();
- return extend;
-})();
-
-Element.hasAttribute = function(element, attribute) {
- if (element.hasAttribute) return element.hasAttribute(attribute);
- return Element.Methods.Simulated.hasAttribute(element, attribute);
-};
-
-Element.addMethods = function(methods) {
- var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
-
- if (!methods) {
- Object.extend(Form, Form.Methods);
- Object.extend(Form.Element, Form.Element.Methods);
- Object.extend(Element.Methods.ByTag, {
- "FORM": Object.clone(Form.Methods),
- "INPUT": Object.clone(Form.Element.Methods),
- "SELECT": Object.clone(Form.Element.Methods),
- "TEXTAREA": Object.clone(Form.Element.Methods)
- });
- }
-
- if (arguments.length == 2) {
- var tagName = methods;
- methods = arguments[1];
- }
-
- if (!tagName) Object.extend(Element.Methods, methods || { });
- else {
- if (Object.isArray(tagName)) tagName.each(extend);
- else extend(tagName);
- }
-
- function extend(tagName) {
- tagName = tagName.toUpperCase();
- if (!Element.Methods.ByTag[tagName])
- Element.Methods.ByTag[tagName] = { };
- Object.extend(Element.Methods.ByTag[tagName], methods);
- }
-
- function copy(methods, destination, onlyIfAbsent) {
- onlyIfAbsent = onlyIfAbsent || false;
- for (var property in methods) {
- var value = methods[property];
- if (!Object.isFunction(value)) continue;
- if (!onlyIfAbsent || !(property in destination))
- destination[property] = value.methodize();
- }
- }
-
- function findDOMClass(tagName) {
- var klass;
- var trans = {
- "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
- "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
- "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
- "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
- "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
- "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
- "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
- "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
- "FrameSet", "IFRAME": "IFrame"
- };
- if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
- if (window[klass]) return window[klass];
- klass = 'HTML' + tagName + 'Element';
- if (window[klass]) return window[klass];
- klass = 'HTML' + tagName.capitalize() + 'Element';
- if (window[klass]) return window[klass];
-
- window[klass] = { };
- window[klass].prototype = document.createElement(tagName)['__proto__'];
- return window[klass];
- }
-
- if (F.ElementExtensions) {
- copy(Element.Methods, HTMLElement.prototype);
- copy(Element.Methods.Simulated, HTMLElement.prototype, true);
- }
-
- if (F.SpecificElementExtensions) {
- for (var tag in Element.Methods.ByTag) {
- var klass = findDOMClass(tag);
- if (Object.isUndefined(klass)) continue;
- copy(T[tag], klass.prototype);
- }
- }
-
- Object.extend(Element, Element.Methods);
- delete Element.ByTag;
-
- if (Element.extend.refresh) Element.extend.refresh();
- Element.cache = { };
-};
-
-document.viewport = {
- getDimensions: function() {
- var dimensions = { }, B = Prototype.Browser;
- $w('width height').each(function(d) {
- var D = d.capitalize();
- if (B.WebKit && !document.evaluate) {
- // Safari <3.0 needs self.innerWidth/Height
- dimensions[d] = self['inner' + D];
- } else if (B.Opera && parseFloat(window.opera.version()) < 9.5) {
- // Opera <9.5 needs document.body.clientWidth/Height
- dimensions[d] = document.body['client' + D]
- } else {
- dimensions[d] = document.documentElement['client' + D];
- }
- });
- return dimensions;
- },
-
- getWidth: function() {
- return this.getDimensions().width;
- },
-
- getHeight: function() {
- return this.getDimensions().height;
- },
-
- getScrollOffsets: function() {
- return Element._returnOffset(
- window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft,
- window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop);
- }
-};
-/* Portions of the Selector class are derived from Jack Slocum's DomQuery,
- * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
- * license. Please see http://www.yui-ext.com/ for more information. */
-
-var Selector = Class.create({
- initialize: function(expression) {
- this.expression = expression.strip();
-
- if (this.shouldUseSelectorsAPI()) {
- this.mode = 'selectorsAPI';
- } else if (this.shouldUseXPath()) {
- this.mode = 'xpath';
- this.compileXPathMatcher();
- } else {
- this.mode = "normal";
- this.compileMatcher();
- }
-
- },
-
- shouldUseXPath: function() {
- if (!Prototype.BrowserFeatures.XPath) return false;
-
- var e = this.expression;
-
- // Safari 3 chokes on :*-of-type and :empty
- if (Prototype.Browser.WebKit &&
- (e.include("-of-type") || e.include(":empty")))
- return false;
-
- // XPath can't do namespaced attributes, nor can it read
- // the "checked" property from DOM nodes
- if ((/(\[[\w-]*?:|:checked)/).test(e))
- return false;
-
- return true;
- },
-
- shouldUseSelectorsAPI: function() {
- if (!Prototype.BrowserFeatures.SelectorsAPI) return false;
-
- if (!Selector._div) Selector._div = new Element('div');
-
- // Make sure the browser treats the selector as valid. Test on an
- // isolated element to minimize cost of this check.
- try {
- Selector._div.querySelector(this.expression);
- } catch(e) {
- return false;
- }
-
- return true;
- },
-
- compileMatcher: function() {
- var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
- c = Selector.criteria, le, p, m;
-
- if (Selector._cache[e]) {
- this.matcher = Selector._cache[e];
- return;
- }
-
- this.matcher = ["this.matcher = function(root) {",
- "var r = root, h = Selector.handlers, c = false, n;"];
-
- while (e && le != e && (/\S/).test(e)) {
- le = e;
- for (var i in ps) {
- p = ps[i];
- if (m = e.match(p)) {
- this.matcher.push(Object.isFunction(c[i]) ? c[i](m) :
- new Template(c[i]).evaluate(m));
- e = e.replace(m[0], '');
- break;
- }
- }
- }
-
- this.matcher.push("return h.unique(n);\n}");
- eval(this.matcher.join('\n'));
- Selector._cache[this.expression] = this.matcher;
- },
-
- compileXPathMatcher: function() {
- var e = this.expression, ps = Selector.patterns,
- x = Selector.xpath, le, m;
-
- if (Selector._cache[e]) {
- this.xpath = Selector._cache[e]; return;
- }
-
- this.matcher = ['.//*'];
- while (e && le != e && (/\S/).test(e)) {
- le = e;
- for (var i in ps) {
- if (m = e.match(ps[i])) {
- this.matcher.push(Object.isFunction(x[i]) ? x[i](m) :
- new Template(x[i]).evaluate(m));
- e = e.replace(m[0], '');
- break;
- }
- }
- }
-
- this.xpath = this.matcher.join('');
- Selector._cache[this.expression] = this.xpath;
- },
-
- findElements: function(root) {
- root = root || document;
- var e = this.expression, results;
-
- switch (this.mode) {
- case 'selectorsAPI':
- // querySelectorAll queries document-wide, then filters to descendants
- // of the context element. That's not what we want.
- // Add an explicit context to the selector if necessary.
- if (root !== document) {
- var oldId = root.id, id = $(root).identify();
- e = "#" + id + " " + e;
- }
-
- results = $A(root.querySelectorAll(e)).map(Element.extend);
- root.id = oldId;
-
- return results;
- case 'xpath':
- return document._getElementsByXPath(this.xpath, root);
- default:
- return this.matcher(root);
- }
- },
-
- match: function(element) {
- this.tokens = [];
-
- var e = this.expression, ps = Selector.patterns, as = Selector.assertions;
- var le, p, m;
-
- while (e && le !== e && (/\S/).test(e)) {
- le = e;
- for (var i in ps) {
- p = ps[i];
- if (m = e.match(p)) {
- // use the Selector.assertions methods unless the selector
- // is too complex.
- if (as[i]) {
- this.tokens.push([i, Object.clone(m)]);
- e = e.replace(m[0], '');
- } else {
- // reluctantly do a document-wide search
- // and look for a match in the array
- return this.findElements(document).include(element);
- }
- }
- }
- }
-
- var match = true, name, matches;
- for (var i = 0, token; token = this.tokens[i]; i++) {
- name = token[0], matches = token[1];
- if (!Selector.assertions[name](element, matches)) {
- match = false; break;
- }
- }
-
- return match;
- },
-
- toString: function() {
- return this.expression;
- },
-
- inspect: function() {
- return "#<Selector:" + this.expression.inspect() + ">";
- }
-});
-
-Object.extend(Selector, {
- _cache: { },
-
- xpath: {
- descendant: "//*",
- child: "/*",
- adjacent: "/following-sibling::*[1]",
- laterSibling: '/following-sibling::*',
- tagName: function(m) {
- if (m[1] == '*') return '';
- return "[local-name()='" + m[1].toLowerCase() +
- "' or local-name()='" + m[1].toUpperCase() + "']";
- },
- className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
- id: "[@id='#{1}']",
- attrPresence: function(m) {
- m[1] = m[1].toLowerCase();
- return new Template("[@#{1}]").evaluate(m);
- },
- attr: function(m) {
- m[1] = m[1].toLowerCase();
- m[3] = m[5] || m[6];
- return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
- },
- pseudo: function(m) {
- var h = Selector.xpath.pseudos[m[1]];
- if (!h) return '';
- if (Object.isFunction(h)) return h(m);
- return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
- },
- operators: {
- '=': "[@#{1}='#{3}']",
- '!=': "[@#{1}!='#{3}']",
- '^=': "[starts-with(@#{1}, '#{3}')]",
- '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
- '*=': "[contains(@#{1}, '#{3}')]",
- '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
- '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
- },
- pseudos: {
- 'first-child': '[not(preceding-sibling::*)]',
- 'last-child': '[not(following-sibling::*)]',
- 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
- 'empty': "[count(*) = 0 and (count(text()) = 0)]",
- 'checked': "[@checked]",
- 'disabled': "[(@disabled) and (@type!='hidden')]",
- 'enabled': "[not(@disabled) and (@type!='hidden')]",
- 'not': function(m) {
- var e = m[6], p = Selector.patterns,
- x = Selector.xpath, le, v;
-
- var exclusion = [];
- while (e && le != e && (/\S/).test(e)) {
- le = e;
- for (var i in p) {
- if (m = e.match(p[i])) {
- v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m);
- exclusion.push("(" + v.substring(1, v.length - 1) + ")");
- e = e.replace(m[0], '');
- break;
- }
- }
- }
- return "[not(" + exclusion.join(" and ") + ")]";
- },
- 'nth-child': function(m) {
- return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
- },
- 'nth-last-child': function(m) {
- return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
- },
- 'nth-of-type': function(m) {
- return Selector.xpath.pseudos.nth("position() ", m);
- },
- 'nth-last-of-type': function(m) {
- return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
- },
- 'first-of-type': function(m) {
- m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
- },
- 'last-of-type': function(m) {
- m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
- },
- 'only-of-type': function(m) {
- var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
- },
- nth: function(fragment, m) {
- var mm, formula = m[6], predicate;
- if (formula == 'even') formula = '2n+0';
- if (formula == 'odd') formula = '2n+1';
- if (mm = formula.match(/^(\d+)$/)) // digit only
- return '[' + fragment + "= " + mm[1] + ']';
- if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
- if (mm[1] == "-") mm[1] = -1;
- var a = mm[1] ? Number(mm[1]) : 1;
- var b = mm[2] ? Number(mm[2]) : 0;
- predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
- "((#{fragment} - #{b}) div #{a} >= 0)]";
- return new Template(predicate).evaluate({
- fragment: fragment, a: a, b: b });
- }
- }
- }
- },
-
- criteria: {
- tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
- className: 'n = h.className(n, r, "#{1}", c); c = false;',
- id: 'n = h.id(n, r, "#{1}", c); c = false;',
- attrPresence: 'n = h.attrPresence(n, r, "#{1}", c); c = false;',
- attr: function(m) {
- m[3] = (m[5] || m[6]);
- return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}", c); c = false;').evaluate(m);
- },
- pseudo: function(m) {
- if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
- return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
- },
- descendant: 'c = "descendant";',
- child: 'c = "child";',
- adjacent: 'c = "adjacent";',
- laterSibling: 'c = "laterSibling";'
- },
-
- patterns: {
- // combinators must be listed first
- // (and descendant needs to be last combinator)
- laterSibling: /^\s*~\s*/,
- child: /^\s*>\s*/,
- adjacent: /^\s*\+\s*/,
- descendant: /^\s/,
-
- // selectors follow
- tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
- id: /^#([\w\-\*]+)(\b|$)/,
- className: /^\.([\w\-\*]+)(\b|$)/,
- pseudo:
-/^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s|[:+~>]))/,
- attrPresence: /^\[((?:[\w]+:)?[\w]+)\]/,
- attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/
- },
-
- // for Selector.match and Element#match
- assertions: {
- tagName: function(element, matches) {
- return matches[1].toUpperCase() == element.tagName.toUpperCase();
- },
-
- className: function(element, matches) {
- return Element.hasClassName(element, matches[1]);
- },
-
- id: function(element, matches) {
- return element.id === matches[1];
- },
-
- attrPresence: function(element, matches) {
- return Element.hasAttribute(element, matches[1]);
- },
-
- attr: function(element, matches) {
- var nodeValue = Element.readAttribute(element, matches[1]);
- return nodeValue && Selector.operators[matches[2]](nodeValue, matches[5] || matches[6]);
- }
- },
-
- handlers: {
- // UTILITY FUNCTIONS
- // joins two collections
- concat: function(a, b) {
- for (var i = 0, node; node = b[i]; i++)
- a.push(node);
- return a;
- },
-
- // marks an array of nodes for counting
- mark: function(nodes) {
- var _true = Prototype.emptyFunction;
- for (var i = 0, node; node = nodes[i]; i++)
- node._countedByPrototype = _true;
- return nodes;
- },
-
- unmark: function(nodes) {
- for (var i = 0, node; node = nodes[i]; i++)
- node._countedByPrototype = undefined;
- return nodes;
- },
-
- // mark each child node with its position (for nth calls)
- // "ofType" flag indicates whether we're indexing for nth-of-type
- // rather than nth-child
- index: function(parentNode, reverse, ofType) {
- parentNode._countedByPrototype = Prototype.emptyFunction;
- if (reverse) {
- for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
- var node = nodes[i];
- if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
- }
- } else {
- for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
- if (node.nodeType == 1 && (!ofType || node._countedByPrototype)) node.nodeIndex = j++;
- }
- },
-
- // filters out duplicates and extends all nodes
- unique: function(nodes) {
- if (nodes.length == 0) return nodes;
- var results = [], n;
- for (var i = 0, l = nodes.length; i < l; i++)
- if (!(n = nodes[i])._countedByPrototype) {
- n._countedByPrototype = Prototype.emptyFunction;
- results.push(Element.extend(n));
- }
- return Selector.handlers.unmark(results);
- },
-
- // COMBINATOR FUNCTIONS
- descendant: function(nodes) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- h.concat(results, node.getElementsByTagName('*'));
- return results;
- },
-
- child: function(nodes) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- for (var j = 0, child; child = node.childNodes[j]; j++)
- if (child.nodeType == 1 && child.tagName != '!') results.push(child);
- }
- return results;
- },
-
- adjacent: function(nodes) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- var next = this.nextElementSibling(node);
- if (next) results.push(next);
- }
- return results;
- },
-
- laterSibling: function(nodes) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- h.concat(results, Element.nextSiblings(node));
- return results;
- },
-
- nextElementSibling: function(node) {
- while (node = node.nextSibling)
- if (node.nodeType == 1) return node;
- return null;
- },
-
- previousElementSibling: function(node) {
- while (node = node.previousSibling)
- if (node.nodeType == 1) return node;
- return null;
- },
-
- // TOKEN FUNCTIONS
- tagName: function(nodes, root, tagName, combinator) {
- var uTagName = tagName.toUpperCase();
- var results = [], h = Selector.handlers;
- if (nodes) {
- if (combinator) {
- // fastlane for ordinary descendant combinators
- if (combinator == "descendant") {
- for (var i = 0, node; node = nodes[i]; i++)
- h.concat(results, node.getElementsByTagName(tagName));
- return results;
- } else nodes = this[combinator](nodes);
- if (tagName == "*") return nodes;
- }
- for (var i = 0, node; node = nodes[i]; i++)
- if (node.tagName.toUpperCase() === uTagName) results.push(node);
- return results;
- } else return root.getElementsByTagName(tagName);
- },
-
- id: function(nodes, root, id, combinator) {
- var targetNode = $(id), h = Selector.handlers;
- if (!targetNode) return [];
- if (!nodes && root == document) return [targetNode];
- if (nodes) {
- if (combinator) {
- if (combinator == 'child') {
- for (var i = 0, node; node = nodes[i]; i++)
- if (targetNode.parentNode == node) return [targetNode];
- } else if (combinator == 'descendant') {
- for (var i = 0, node; node = nodes[i]; i++)
- if (Element.descendantOf(targetNode, node)) return [targetNode];
- } else if (combinator == 'adjacent') {
- for (var i = 0, node; node = nodes[i]; i++)
- if (Selector.handlers.previousElementSibling(targetNode) == node)
- return [targetNode];
- } else nodes = h[combinator](nodes);
- }
- for (var i = 0, node; node = nodes[i]; i++)
- if (node == targetNode) return [targetNode];
- return [];
- }
- return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
- },
-
- className: function(nodes, root, className, combinator) {
- if (nodes && combinator) nodes = this[combinator](nodes);
- return Selector.handlers.byClassName(nodes, root, className);
- },
-
- byClassName: function(nodes, root, className) {
- if (!nodes) nodes = Selector.handlers.descendant([root]);
- var needle = ' ' + className + ' ';
- for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
- nodeClassName = node.className;
- if (nodeClassName.length == 0) continue;
- if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
- results.push(node);
- }
- return results;
- },
-
- attrPresence: function(nodes, root, attr, combinator) {
- if (!nodes) nodes = root.getElementsByTagName("*");
- if (nodes && combinator) nodes = this[combinator](nodes);
- var results = [];
- for (var i = 0, node; node = nodes[i]; i++)
- if (Element.hasAttribute(node, attr)) results.push(node);
- return results;
- },
-
- attr: function(nodes, root, attr, value, operator, combinator) {
- if (!nodes) nodes = root.getElementsByTagName("*");
- if (nodes && combinator) nodes = this[combinator](nodes);
- var handler = Selector.operators[operator], results = [];
- for (var i = 0, node; node = nodes[i]; i++) {
- var nodeValue = Element.readAttribute(node, attr);
- if (nodeValue === null) continue;
- if (handler(nodeValue, value)) results.push(node);
- }
- return results;
- },
-
- pseudo: function(nodes, name, value, root, combinator) {
- if (nodes && combinator) nodes = this[combinator](nodes);
- if (!nodes) nodes = root.getElementsByTagName("*");
- return Selector.pseudos[name](nodes, value, root);
- }
- },
-
- pseudos: {
- 'first-child': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- if (Selector.handlers.previousElementSibling(node)) continue;
- results.push(node);
- }
- return results;
- },
- 'last-child': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- if (Selector.handlers.nextElementSibling(node)) continue;
- results.push(node);
- }
- return results;
- },
- 'only-child': function(nodes, value, root) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
- results.push(node);
- return results;
- },
- 'nth-child': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root);
- },
- 'nth-last-child': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root, true);
- },
- 'nth-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root, false, true);
- },
- 'nth-last-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root, true, true);
- },
- 'first-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, "1", root, false, true);
- },
- 'last-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, "1", root, true, true);
- },
- 'only-of-type': function(nodes, formula, root) {
- var p = Selector.pseudos;
- return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
- },
-
- // handles the an+b logic
- getIndices: function(a, b, total) {
- if (a == 0) return b > 0 ? [b] : [];
- return $R(1, total).inject([], function(memo, i) {
- if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
- return memo;
- });
- },
-
- // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
- nth: function(nodes, formula, root, reverse, ofType) {
- if (nodes.length == 0) return [];
- if (formula == 'even') formula = '2n+0';
- if (formula == 'odd') formula = '2n+1';
- var h = Selector.handlers, results = [], indexed = [], m;
- h.mark(nodes);
- for (var i = 0, node; node = nodes[i]; i++) {
- if (!node.parentNode._countedByPrototype) {
- h.index(node.parentNode, reverse, ofType);
- indexed.push(node.parentNode);
- }
- }
- if (formula.match(/^\d+$/)) { // just a number
- formula = Number(formula);
- for (var i = 0, node; node = nodes[i]; i++)
- if (node.nodeIndex == formula) results.push(node);
- } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
- if (m[1] == "-") m[1] = -1;
- var a = m[1] ? Number(m[1]) : 1;
- var b = m[2] ? Number(m[2]) : 0;
- var indices = Selector.pseudos.getIndices(a, b, nodes.length);
- for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
- for (var j = 0; j < l; j++)
- if (node.nodeIndex == indices[j]) results.push(node);
- }
- }
- h.unmark(nodes);
- h.unmark(indexed);
- return results;
- },
-
- 'empty': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- // IE treats comments as element nodes
- if (node.tagName == '!' || node.firstChild) continue;
- results.push(node);
- }
- return results;
- },
-
- 'not': function(nodes, selector, root) {
- var h = Selector.handlers, selectorType, m;
- var exclusions = new Selector(selector).findElements(root);
- h.mark(exclusions);
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!node._countedByPrototype) results.push(node);
- h.unmark(exclusions);
- return results;
- },
-
- 'enabled': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!node.disabled && (!node.type || node.type !== 'hidden'))
- results.push(node);
- return results;
- },
-
- 'disabled': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (node.disabled) results.push(node);
- return results;
- },
-
- 'checked': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (node.checked) results.push(node);
- return results;
- }
- },
-
- operators: {
- '=': function(nv, v) { return nv == v; },
- '!=': function(nv, v) { return nv != v; },
- '^=': function(nv, v) { return nv == v || nv && nv.startsWith(v); },
- '$=': function(nv, v) { return nv == v || nv && nv.endsWith(v); },
- '*=': function(nv, v) { return nv == v || nv && nv.include(v); },
- '$=': function(nv, v) { return nv.endsWith(v); },
- '*=': function(nv, v) { return nv.include(v); },
- '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
- '|=': function(nv, v) { return ('-' + (nv || "").toUpperCase() +
- '-').include('-' + (v || "").toUpperCase() + '-'); }
- },
-
- split: function(expression) {
- var expressions = [];
- expression.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
- expressions.push(m[1].strip());
- });
- return expressions;
- },
-
- matchElements: function(elements, expression) {
- var matches = $$(expression), h = Selector.handlers;
- h.mark(matches);
- for (var i = 0, results = [], element; element = elements[i]; i++)
- if (element._countedByPrototype) results.push(element);
- h.unmark(matches);
- return results;
- },
-
- findElement: function(elements, expression, index) {
- if (Object.isNumber(expression)) {
- index = expression; expression = false;
- }
- return Selector.matchElements(elements, expression || '*')[index || 0];
- },
-
- findChildElements: function(element, expressions) {
- expressions = Selector.split(expressions.join(','));
- var results = [], h = Selector.handlers;
- for (var i = 0, l = expressions.length, selector; i < l; i++) {
- selector = new Selector(expressions[i].strip());
- h.concat(results, selector.findElements(element));
- }
- return (l > 1) ? h.unique(results) : results;
- }
-});
-
-if (Prototype.Browser.IE) {
- Object.extend(Selector.handlers, {
- // IE returns comment nodes on getElementsByTagName("*").
- // Filter them out.
- concat: function(a, b) {
- for (var i = 0, node; node = b[i]; i++)
- if (node.tagName !== "!") a.push(node);
- return a;
- },
-
- // IE improperly serializes _countedByPrototype in (inner|outer)HTML.
- unmark: function(nodes) {
- for (var i = 0, node; node = nodes[i]; i++)
- node.removeAttribute('_countedByPrototype');
- return nodes;
- }
- });
-}
-
-function $$() {
- return Selector.findChildElements(document, $A(arguments));
-}
-var Form = {
- reset: function(form) {
- $(form).reset();
- return form;
- },
-
- serializeElements: function(elements, options) {
- if (typeof options != 'object') options = { hash: !!options };
- else if (Object.isUndefined(options.hash)) options.hash = true;
- var key, value, submitted = false, submit = options.submit;
-
- var data = elements.inject({ }, function(result, element) {
- if (!element.disabled && element.name) {
- key = element.name; value = $(element).getValue();
- if (value != null && element.type != 'file' && (element.type != 'submit' || (!submitted &&
- submit !== false && (!submit || key == submit) && (submitted = true)))) {
- if (key in result) {
- // a key is already present; construct an array of values
- if (!Object.isArray(result[key])) result[key] = [result[key]];
- result[key].push(value);
- }
- else result[key] = value;
- }
- }
- return result;
- });
-
- return options.hash ? data : Object.toQueryString(data);
- }
-};
-
-Form.Methods = {
- serialize: function(form, options) {
- return Form.serializeElements(Form.getElements(form), options);
- },
-
- getElements: function(form) {
- return $A($(form).getElementsByTagName('*')).inject([],
- function(elements, child) {
- if (Form.Element.Serializers[child.tagName.toLowerCase()])
- elements.push(Element.extend(child));
- return elements;
- }
- );
- },
-
- getInputs: function(form, typeName, name) {
- form = $(form);
- var inputs = form.getElementsByTagName('input');
-
- if (!typeName && !name) return $A(inputs).map(Element.extend);
-
- for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
- var input = inputs[i];
- if ((typeName && input.type != typeName) || (name && input.name != name))
- continue;
- matchingInputs.push(Element.extend(input));
- }
-
- return matchingInputs;
- },
-
- disable: function(form) {
- form = $(form);
- Form.getElements(form).invoke('disable');
- return form;
- },
-
- enable: function(form) {
- form = $(form);
- Form.getElements(form).invoke('enable');
- return form;
- },
-
- findFirstElement: function(form) {
- var elements = $(form).getElements().findAll(function(element) {
- return 'hidden' != element.type && !element.disabled;
- });
- var firstByIndex = elements.findAll(function(element) {
- return element.hasAttribute('tabIndex') && element.tabIndex >= 0;
- }).sortBy(function(element) { return element.tabIndex }).first();
-
- return firstByIndex ? firstByIndex : elements.find(function(element) {
- return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
- });
- },
-
- focusFirstElement: function(form) {
- form = $(form);
- form.findFirstElement().activate();
- return form;
- },
-
- request: function(form, options) {
- form = $(form), options = Object.clone(options || { });
-
- var params = options.parameters, action = form.readAttribute('action') || '';
- if (action.blank()) action = window.location.href;
- options.parameters = form.serialize(true);
-
- if (params) {
- if (Object.isString(params)) params = params.toQueryParams();
- Object.extend(options.parameters, params);
- }
-
- if (form.hasAttribute('method') && !options.method)
- options.method = form.method;
-
- return new Ajax.Request(action, options);
- }
-};
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element = {
- focus: function(element) {
- $(element).focus();
- return element;
- },
-
- select: function(element) {
- $(element).select();
- return element;
- }
-};
-
-Form.Element.Methods = {
- serialize: function(element) {
- element = $(element);
- if (!element.disabled && element.name) {
- var value = element.getValue();
- if (value != undefined) {
- var pair = { };
- pair[element.name] = value;
- return Object.toQueryString(pair);
- }
- }
- return '';
- },
-
- getValue: function(element) {
- element = $(element);
- var method = element.tagName.toLowerCase();
- return Form.Element.Serializers[method](element);
- },
-
- setValue: function(element, value) {
- element = $(element);
- var method = element.tagName.toLowerCase();
- Form.Element.Serializers[method](element, value);
- return element;
- },
-
- clear: function(element) {
- $(element).value = '';
- return element;
- },
-
- present: function(element) {
- return $(element).value != '';
- },
-
- activate: function(element) {
- element = $(element);
- try {
- element.focus();
- if (element.select && (element.tagName.toLowerCase() != 'input' ||
- !['button', 'reset', 'submit'].include(element.type)))
- element.select();
- } catch (e) { }
- return element;
- },
-
- disable: function(element) {
- element = $(element);
- element.disabled = true;
- return element;
- },
-
- enable: function(element) {
- element = $(element);
- element.disabled = false;
- return element;
- }
-};
-
-/*--------------------------------------------------------------------------*/
-
-var Field = Form.Element;
-var $F = Form.Element.Methods.getValue;
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element.Serializers = {
- input: function(element, value) {
- switch (element.type.toLowerCase()) {
- case 'checkbox':
- case 'radio':
- return Form.Element.Serializers.inputSelector(element, value);
- default:
- return Form.Element.Serializers.textarea(element, value);
- }
- },
-
- inputSelector: function(element, value) {
- if (Object.isUndefined(value)) return element.checked ? element.value : null;
- else element.checked = !!value;
- },
-
- textarea: function(element, value) {
- if (Object.isUndefined(value)) return element.value;
- else element.value = value;
- },
-
- select: function(element, value) {
- if (Object.isUndefined(value))
- return this[element.type == 'select-one' ?
- 'selectOne' : 'selectMany'](element);
- else {
- var opt, currentValue, single = !Object.isArray(value);
- for (var i = 0, length = element.length; i < length; i++) {
- opt = element.options[i];
- currentValue = this.optionValue(opt);
- if (single) {
- if (currentValue == value) {
- opt.selected = true;
- return;
- }
- }
- else opt.selected = value.include(currentValue);
- }
- }
- },
-
- selectOne: function(element) {
- var index = element.selectedIndex;
- return index >= 0 ? this.optionValue(element.options[index]) : null;
- },
-
- selectMany: function(element) {
- var values, length = element.length;
- if (!length) return null;
-
- for (var i = 0, values = []; i < length; i++) {
- var opt = element.options[i];
- if (opt.selected) values.push(this.optionValue(opt));
- }
- return values;
- },
-
- optionValue: function(opt) {
- // extend element because hasAttribute may not be native
- return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
- }
-};
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.TimedObserver = Class.create(PeriodicalExecuter, {
- initialize: function($super, element, frequency, callback) {
- $super(callback, frequency);
- this.element = $(element);
- this.lastValue = this.getValue();
- },
-
- execute: function() {
- var value = this.getValue();
- if (Object.isString(this.lastValue) && Object.isString(value) ?
- this.lastValue != value : String(this.lastValue) != String(value)) {
- this.callback(this.element, value);
- this.lastValue = value;
- }
- }
-});
-
-Form.Element.Observer = Class.create(Abstract.TimedObserver, {
- getValue: function() {
- return Form.Element.getValue(this.element);
- }
-});
-
-Form.Observer = Class.create(Abstract.TimedObserver, {
- getValue: function() {
- return Form.serialize(this.element);
- }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.EventObserver = Class.create({
- initialize: function(element, callback) {
- this.element = $(element);
- this.callback = callback;
-
- this.lastValue = this.getValue();
- if (this.element.tagName.toLowerCase() == 'form')
- this.registerFormCallbacks();
- else
- this.registerCallback(this.element);
- },
-
- onElementEvent: function() {
- var value = this.getValue();
- if (this.lastValue != value) {
- this.callback(this.element, value);
- this.lastValue = value;
- }
- },
-
- registerFormCallbacks: function() {
- Form.getElements(this.element).each(this.registerCallback, this);
- },
-
- registerCallback: function(element) {
- if (element.type) {
- switch (element.type.toLowerCase()) {
- case 'checkbox':
- case 'radio':
- Event.observe(element, 'click', this.onElementEvent.bind(this));
- break;
- default:
- Event.observe(element, 'change', this.onElementEvent.bind(this));
- break;
- }
- }
- }
-});
-
-Form.Element.EventObserver = Class.create(Abstract.EventObserver, {
- getValue: function() {
- return Form.Element.getValue(this.element);
- }
-});
-
-Form.EventObserver = Class.create(Abstract.EventObserver, {
- getValue: function() {
- return Form.serialize(this.element);
- }
-});
-if (!window.Event) var Event = { };
-
-Object.extend(Event, {
- KEY_BACKSPACE: 8,
- KEY_TAB: 9,
- KEY_RETURN: 13,
- KEY_ESC: 27,
- KEY_LEFT: 37,
- KEY_UP: 38,
- KEY_RIGHT: 39,
- KEY_DOWN: 40,
- KEY_DELETE: 46,
- KEY_HOME: 36,
- KEY_END: 35,
- KEY_PAGEUP: 33,
- KEY_PAGEDOWN: 34,
- KEY_INSERT: 45,
-
- cache: { },
-
- relatedTarget: function(event) {
- var element;
- switch(event.type) {
- case 'mouseover': element = event.fromElement; break;
- case 'mouseout': element = event.toElement; break;
- default: return null;
- }
- return Element.extend(element);
- }
-});
-
-Event.Methods = (function() {
- var isButton;
-
- if (Prototype.Browser.IE) {
- var buttonMap = { 0: 1, 1: 4, 2: 2 };
- isButton = function(event, code) {
- return event.button == buttonMap[code];
- };
-
- } else if (Prototype.Browser.WebKit) {
- isButton = function(event, code) {
- switch (code) {
- case 0: return event.which == 1 && !event.metaKey;
- case 1: return event.which == 1 && event.metaKey;
- default: return false;
- }
- };
-
- } else {
- isButton = function(event, code) {
- return event.which ? (event.which === code + 1) : (event.button === code);
- };
- }
-
- return {
- isLeftClick: function(event) { return isButton(event, 0) },
- isMiddleClick: function(event) { return isButton(event, 1) },
- isRightClick: function(event) { return isButton(event, 2) },
-
- element: function(event) {
- event = Event.extend(event);
-
- var node = event.target,
- type = event.type,
- currentTarget = event.currentTarget;
-
- if (currentTarget && currentTarget.tagName) {
- // Firefox screws up the "click" event when moving between radio buttons
- // via arrow keys. It also screws up the "load" and "error" events on images,
- // reporting the document as the target instead of the original image.
- if (type === 'load' || type === 'error' ||
- (type === 'click' && currentTarget.tagName.toLowerCase() === 'input'
- && currentTarget.type === 'radio'))
- node = currentTarget;
- }
- if (node.nodeType == Node.TEXT_NODE) node = node.parentNode;
- return Element.extend(node);
- },
-
- findElement: function(event, expression) {
- var element = Event.element(event);
- if (!expression) return element;
- var elements = [element].concat(element.ancestors());
- return Selector.findElement(elements, expression, 0);
- },
-
- pointer: function(event) {
- var docElement = document.documentElement,
- body = document.body || { scrollLeft: 0, scrollTop: 0 };
- return {
- x: event.pageX || (event.clientX +
- (docElement.scrollLeft || body.scrollLeft) -
- (docElement.clientLeft || 0)),
- y: event.pageY || (event.clientY +
- (docElement.scrollTop || body.scrollTop) -
- (docElement.clientTop || 0))
- };
- },
-
- pointerX: function(event) { return Event.pointer(event).x },
- pointerY: function(event) { return Event.pointer(event).y },
-
- stop: function(event) {
- Event.extend(event);
- event.preventDefault();
- event.stopPropagation();
- event.stopped = true;
- }
- };
-})();
-
-Event.extend = (function() {
- var methods = Object.keys(Event.Methods).inject({ }, function(m, name) {
- m[name] = Event.Methods[name].methodize();
- return m;
- });
-
- if (Prototype.Browser.IE) {
- Object.extend(methods, {
- stopPropagation: function() { this.cancelBubble = true },
- preventDefault: function() { this.returnValue = false },
- inspect: function() { return "[object Event]" }
- });
-
- return function(event) {
- if (!event) return false;
- if (event._extendedByPrototype) return event;
-
- event._extendedByPrototype = Prototype.emptyFunction;
- var pointer = Event.pointer(event);
- Object.extend(event, {
- target: event.srcElement,
- relatedTarget: Event.relatedTarget(event),
- pageX: pointer.x,
- pageY: pointer.y
- });
- return Object.extend(event, methods);
- };
-
- } else {
- Event.prototype = Event.prototype || document.createEvent("HTMLEvents")['__proto__'];
- Object.extend(Event.prototype, methods);
- return Prototype.K;
- }
-})();
-
-Object.extend(Event, (function() {
- var cache = Event.cache;
-
- function getEventID(element) {
- if (element._prototypeEventID) return element._prototypeEventID[0];
- arguments.callee.id = arguments.callee.id || 1;
- return element._prototypeEventID = [++arguments.callee.id];
- }
-
- function getDOMEventName(eventName) {
- if (eventName && eventName.include(':')) return "dataavailable";
- return eventName;
- }
-
- function getCacheForID(id) {
- return cache[id] = cache[id] || { };
- }
-
- function getWrappersForEventName(id, eventName) {
- var c = getCacheForID(id);
- return c[eventName] = c[eventName] || [];
- }
-
- function createWrapper(element, eventName, handler) {
- var id = getEventID(element);
- var c = getWrappersForEventName(id, eventName);
- if (c.pluck("handler").include(handler)) return false;
-
- var wrapper = function(event) {
- if (!Event || !Event.extend ||
- (event.eventName && event.eventName != eventName))
- return false;
-
- Event.extend(event);
- handler.call(element, event);
- };
-
- wrapper.handler = handler;
- c.push(wrapper);
- return wrapper;
- }
-
- function findWrapper(id, eventName, handler) {
- var c = getWrappersForEventName(id, eventName);
- return c.find(function(wrapper) { return wrapper.handler == handler });
- }
-
- function destroyWrapper(id, eventName, handler) {
- var c = getCacheForID(id);
- if (!c[eventName]) return false;
- c[eventName] = c[eventName].without(findWrapper(id, eventName, handler));
- }
-
- function destroyCache() {
- for (var id in cache)
- for (var eventName in cache[id])
- cache[id][eventName] = null;
- }
-
-
- // Internet Explorer needs to remove event handlers on page unload
- // in order to avoid memory leaks.
- if (window.attachEvent) {
- window.attachEvent("onunload", destroyCache);
- }
-
- // Safari has a dummy event handler on page unload so that it won't
- // use its bfcache. Safari <= 3.1 has an issue with restoring the "document"
- // object when page is returned to via the back button using its bfcache.
- if (Prototype.Browser.WebKit) {
- window.addEventListener('unload', Prototype.emptyFunction, false);
- }
-
- return {
- observe: function(element, eventName, handler) {
- element = $(element);
- var name = getDOMEventName(eventName);
-
- var wrapper = createWrapper(element, eventName, handler);
- if (!wrapper) return element;
-
- if (element.addEventListener) {
- element.addEventListener(name, wrapper, false);
- } else {
- element.attachEvent("on" + name, wrapper);
- }
-
- return element;
- },
-
- stopObserving: function(element, eventName, handler) {
- element = $(element);
- var id = getEventID(element), name = getDOMEventName(eventName);
-
- if (!handler && eventName) {
- getWrappersForEventName(id, eventName).each(function(wrapper) {
- element.stopObserving(eventName, wrapper.handler);
- });
- return element;
-
- } else if (!eventName) {
- Object.keys(getCacheForID(id)).each(function(eventName) {
- element.stopObserving(eventName);
- });
- return element;
- }
-
- var wrapper = findWrapper(id, eventName, handler);
- if (!wrapper) return element;
-
- if (element.removeEventListener) {
- element.removeEventListener(name, wrapper, false);
- } else {
- element.detachEvent("on" + name, wrapper);
- }
-
- destroyWrapper(id, eventName, handler);
-
- return element;
- },
-
- fire: function(element, eventName, memo) {
- element = $(element);
- if (element == document && document.createEvent && !element.dispatchEvent)
- element = document.documentElement;
-
- var event;
- if (document.createEvent) {
- event = document.createEvent("HTMLEvents");
- event.initEvent("dataavailable", true, true);
- } else {
- event = document.createEventObject();
- event.eventType = "ondataavailable";
- }
-
- event.eventName = eventName;
- event.memo = memo || { };
-
- if (document.createEvent) {
- element.dispatchEvent(event);
- } else {
- element.fireEvent(event.eventType, event);
- }
-
- return Event.extend(event);
- }
- };
-})());
-
-Object.extend(Event, Event.Methods);
-
-Element.addMethods({
- fire: Event.fire,
- observe: Event.observe,
- stopObserving: Event.stopObserving
-});
-
-Object.extend(document, {
- fire: Element.Methods.fire.methodize(),
- observe: Element.Methods.observe.methodize(),
- stopObserving: Element.Methods.stopObserving.methodize(),
- loaded: false
-});
-
-(function() {
- /* Support for the DOMContentLoaded event is based on work by Dan Webb,
- Matthias Miller, Dean Edwards and John Resig. */
-
- var timer;
-
- function fireContentLoadedEvent() {
- if (document.loaded) return;
- if (timer) window.clearInterval(timer);
- document.fire("dom:loaded");
- document.loaded = true;
- }
-
- if (document.addEventListener) {
- if (Prototype.Browser.WebKit) {
- timer = window.setInterval(function() {
- if (/loaded|complete/.test(document.readyState))
- fireContentLoadedEvent();
- }, 0);
-
- Event.observe(window, "load", fireContentLoadedEvent);
-
- } else {
- document.addEventListener("DOMContentLoaded",
- fireContentLoadedEvent, false);
- }
-
- } else {
- document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");
- $("__onDOMContentLoaded").onreadystatechange = function() {
- if (this.readyState == "complete") {
- this.onreadystatechange = null;
- fireContentLoadedEvent();
- }
- };
- }
-})();
-/*------------------------------- DEPRECATED -------------------------------*/
-
-Hash.toQueryString = Object.toQueryString;
-
-var Toggle = { display: Element.toggle };
-
-Element.Methods.childOf = Element.Methods.descendantOf;
-
-var Insertion = {
- Before: function(element, content) {
- return Element.insert(element, {before:content});
- },
-
- Top: function(element, content) {
- return Element.insert(element, {top:content});
- },
-
- Bottom: function(element, content) {
- return Element.insert(element, {bottom:content});
- },
-
- After: function(element, content) {
- return Element.insert(element, {after:content});
- }
-};
-
-var $continue = new Error('"throw $continue" is deprecated, use "return" instead');
-
-// This should be moved to script.aculo.us; notice the deprecated methods
-// further below, that map to the newer Element methods.
-var Position = {
- // set to true if needed, warning: firefox performance problems
- // NOT neeeded for page scrolling, only if draggable contained in
- // scrollable elements
- includeScrollOffsets: false,
-
- // must be called before calling withinIncludingScrolloffset, every time the
- // page is scrolled
- prepare: function() {
- this.deltaX = window.pageXOffset
- || document.documentElement.scrollLeft
- || document.body.scrollLeft
- || 0;
- this.deltaY = window.pageYOffset
- || document.documentElement.scrollTop
- || document.body.scrollTop
- || 0;
- },
-
- // caches x/y coordinate pair to use with overlap
- within: function(element, x, y) {
- if (this.includeScrollOffsets)
- return this.withinIncludingScrolloffsets(element, x, y);
- this.xcomp = x;
- this.ycomp = y;
- this.offset = Element.cumulativeOffset(element);
-
- return (y >= this.offset[1] &&
- y < this.offset[1] + element.offsetHeight &&
- x >= this.offset[0] &&
- x < this.offset[0] + element.offsetWidth);
- },
-
- withinIncludingScrolloffsets: function(element, x, y) {
- var offsetcache = Element.cumulativeScrollOffset(element);
-
- this.xcomp = x + offsetcache[0] - this.deltaX;
- this.ycomp = y + offsetcache[1] - this.deltaY;
- this.offset = Element.cumulativeOffset(element);
-
- return (this.ycomp >= this.offset[1] &&
- this.ycomp < this.offset[1] + element.offsetHeight &&
- this.xcomp >= this.offset[0] &&
- this.xcomp < this.offset[0] + element.offsetWidth);
- },
-
- // within must be called directly before
- overlap: function(mode, element) {
- if (!mode) return 0;
- if (mode == 'vertical')
- return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
- element.offsetHeight;
- if (mode == 'horizontal')
- return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
- element.offsetWidth;
- },
-
- // Deprecation layer -- use newer Element methods now (1.5.2).
-
- cumulativeOffset: Element.Methods.cumulativeOffset,
-
- positionedOffset: Element.Methods.positionedOffset,
-
- absolutize: function(element) {
- Position.prepare();
- return Element.absolutize(element);
- },
-
- relativize: function(element) {
- Position.prepare();
- return Element.relativize(element);
- },
-
- realOffset: Element.Methods.cumulativeScrollOffset,
-
- offsetParent: Element.Methods.getOffsetParent,
-
- page: Element.Methods.viewportOffset,
-
- clone: function(source, target, options) {
- options = options || { };
- return Element.clonePosition(target, source, options);
- }
-};
-
-/*--------------------------------------------------------------------------*/
-
-if (!document.getElementsByClassName) document.getElementsByClassName = function(instanceMethods){
- function iter(name) {
- return name.blank() ? null : "[contains(concat(' ', @class, ' '), ' " + name + " ')]";
- }
-
- instanceMethods.getElementsByClassName = Prototype.BrowserFeatures.XPath ?
- function(element, className) {
- className = className.toString().strip();
- var cond = /\s/.test(className) ? $w(className).map(iter).join('') : iter(className);
- return cond ? document._getElementsByXPath('.//*' + cond, element) : [];
- } : function(element, className) {
- className = className.toString().strip();
- var elements = [], classNames = (/\s/.test(className) ? $w(className) : null);
- if (!classNames && !className) return elements;
-
- var nodes = $(element).getElementsByTagName('*');
- className = ' ' + className + ' ';
-
- for (var i = 0, child, cn; child = nodes[i]; i++) {
- if (child.className && (cn = ' ' + child.className + ' ') && (cn.include(className) ||
- (classNames && classNames.all(function(name) {
- return !name.toString().blank() && cn.include(' ' + name + ' ');
- }))))
- elements.push(Element.extend(child));
- }
- return elements;
- };
-
- return function(className, parentElement) {
- return $(parentElement || document.body).getElementsByClassName(className);
- };
-}(Element.Methods);
-
-/*--------------------------------------------------------------------------*/
-
-Element.ClassNames = Class.create();
-Element.ClassNames.prototype = {
- initialize: function(element) {
- this.element = $(element);
- },
-
- _each: function(iterator) {
- this.element.className.split(/\s+/).select(function(name) {
- return name.length > 0;
- })._each(iterator);
- },
-
- set: function(className) {
- this.element.className = className;
- },
-
- add: function(classNameToAdd) {
- if (this.include(classNameToAdd)) return;
- this.set($A(this).concat(classNameToAdd).join(' '));
- },
-
- remove: function(classNameToRemove) {
- if (!this.include(classNameToRemove)) return;
- this.set($A(this).without(classNameToRemove).join(' '));
- },
-
- toString: function() {
- return $A(this).join(' ');
- }
-};
-
-Object.extend(Element.ClassNames.prototype, Enumerable);
-
-/*--------------------------------------------------------------------------*/
-
-Element.addMethods(); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/raptor.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/raptor.js
deleted file mode 100644
index a13e77c8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/raptor.js
+++ /dev/null
@@ -1,314 +0,0 @@
-function grayOut(vis, options) {
- // Pass true to gray out screen, false to ungray
- // options are optional. This is a JSON object with the following (optional) properties
- // opacity:0-100 // Lower number = less grayout higher = more of a blackout
- // zindex: # // HTML elements with a higher zindex appear on top of the gray out
- // bgcolor: (#xxxxxx) // Standard RGB Hex color code
- // grayOut(true, {'zindex':'50', 'bgcolor':'#0000FF', 'opacity':'70'});
- // Because options is JSON opacity/zindex/bgcolor are all optional and can appear
- // in any order. Pass only the properties you need to set.
- var options = options || {};
- var zindex = options.zindex || 50;
- var opacity = options.opacity || 20;
- var opaque = (opacity / 100);
- var bgcolor = options.bgcolor || '#000000';
- var dark=document.getElementById('darkenScreenObject');
- //var tbody = document.getElementsByTagName("body")[0];
- var tbody = document.body;
- var myAjax = document.getElementById('AjaxLoading');
-
- if (!dark) {
- // The dark layer doesn't exist, it's never been created. So we'll
- // create it here and apply some basic styles.
- // If you are getting errors in IE see: http://support.microsoft.com/default.aspx/kb/927917
- var tnode = document.createElement('div'); // Create the layer.
- tnode.style.position='absolute'; // Position absolutely
- tnode.style.top='0px'; // In the top
- tnode.style.left='0px'; // Left corner of the page
- tnode.style.overflow='hidden'; // Try to avoid making scroll bars
- tnode.style.display='none'; // Start out Hidden
- tnode.id='darkenScreenObject'; // Name it so we can find it later
- tbody.appendChild(tnode); // Add it to the web page
- dark=document.getElementById('darkenScreenObject'); // Get the object.
- }
- if (vis) {
- // Calculate the page width and height
- if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) ) {
- var pageWidth = document.body.scrollWidth+'px';
- var pageHeight = document.body.scrollHeight+'px';
- } else if( document.body.offsetWidth ) {
- var pageWidth = document.body.offsetWidth+'px';
- var pageHeight = document.body.offsetHeight+'px';
- } else {
- var pageWidth='100%';
- var pageHeight='100%';
- }
- //set the shader to cover the entire page and make it visible.
- dark.style.opacity=opaque;
- dark.style.MozOpacity=opaque;
- dark.style.filter='alpha(opacity='+opacity+')';
- dark.style.zIndex=zindex;
- dark.style.backgroundColor=bgcolor;
- dark.style.width= pageWidth;
- dark.style.height= pageHeight;
- dark.style.display='block';
- //MyAjax
-
- /* Display the "Loading" box */
- var tnode = document.createElement('div'); // Create the layer.
- tnode.style.position='absolute'; // Position absolutely
- tnode.style.top='0px'; // In the top
- tnode.style.left='0px'; // Left corner of the page
- tnode.style.overflow='hidden'; // Try to avoid making scroll bars
- tnode.style.display='none'; // Start out Hidden
- tnode.id='AjaxLoading'; // Name it so we can find it later
- tbody.appendChild(tnode); // Add it to the web page
- myAjax=document.getElementById('AjaxLoading'); // Get the object.
-
- // Content
- // Reset the opacity options. Want this on top
- var loadingOptions = loadingOptions || {};
- var zindex = loadingOptions.zindex || 100;
- var opacity = loadingOptions.opacity || 100;
- var opaque = (opacity / 100);
- var bgcolor = loadingOptions.bgcolor || '#FFFFFF';
-
- myAjax.style.opacity=opaque;
- myAjax.style.MozOpacity=opaque;
- myAjax.style.filter='alpha(opacity='+opacity+')';
- myAjax.style.zIndex=zindex;
-
- myAjax.style.height= '40px';
- myAjax.style.padding = '3px';
- myAjax.style.fontSize = '14px';
- myAjax.style.width = '100px';
- myAjax.style.textAlign = 'center';
- myAjax.style.left = '45%';
- myAjax.style.top = '5%';
- myAjax.style.position = 'absolute';
- myAjax.style.border = '2px solid #666';
- myAjax.style.backgroundColor = bgcolor;
-
- myAjax.innerHTML='Loading <img src="static/fusion/raptor/images/progress.gif" id="wait" />';
- myAjax.style.display='block';
-
- } else {
- if(dark) dark.style.display='none';
- if(myAjax) myAjax.style.display='none';
- }
-}
-function checkDate(dateStr, isOptional) {
- if(dateStr.charAt(0) == '[' && dateStr.charAt(dateStr.length-1) == ']')
- return true;
- if(dateStr=="")
- return isOptional;
-
- if((dateStr.length<6)||(dateStr.length>10))
- return false;
-
- if(dateStr.charAt(1)=='/') {
- dmonth = parseInt(dateStr.substr(0,1));
- dateStr = dateStr.substr(2,dateStr.length-2);
- } else {
- //For some strange reason "08" is parsed as 0, so I remove leading 0-s
- if(dateStr.charAt(0)=='0')
- dmonth = parseInt(dateStr.substr(1,1));
- else
- dmonth = parseInt(dateStr.substr(0,2));
- dateStr = dateStr.substr(3,dateStr.length-3);
- }
-
- if(dateStr.charAt(1)=='/') {
- dday = parseInt(dateStr.substr(0,1));
- dateStr = dateStr.substr(2,dateStr.length-2);
- } else {
- //For some strange reason "08" is parsed as 0, so I remove leading 0-s
- if(dateStr.charAt(0)=='0')
- dday = parseInt(dateStr.substr(1,1));
- else
- dday = parseInt(dateStr.substr(0,2));
- dateStr = dateStr.substr(3,dateStr.length-3);
- }
-
- if(dateStr.length==2) {
- if (parseInt(dateStr)>50)
- dateStr="19"+dateStr;
- else
- dateStr="20"+dateStr;
- }
- dyear = parseInt(dateStr);
- //alert("day: "+dday+", month: "+dmonth+", year: "+dyear);
- if((dyear<1990)||(dyear>2090)||(dmonth<1)||(dmonth>12)||(dday<1)||
- (dday>((dmonth==2)?(((dyear % 4 == 0) && ((!(dyear % 100 == 0))||(dyear % 400 == 0)))?29:28):(((dmonth==1)||(dmonth==3)||(dmonth==5)||(dmonth==7)||(dmonth==8)||(dmonth==10)||(dmonth==12))?31:30))))
- return false;
-
- return true;
-} // checkDate
-
-function validateNumber(numValue, mustBeInteger, mustBePositive) {
- var decimalPointFound = false;
- for(var i=0; i<numValue.length; i++) {
- var ch = numValue.charAt(i);
-
- if(ch=='0'||ch=='1'||ch=='2'||ch=='3'||ch=='4'||ch=='5'||ch=='6'||ch=='7'||ch=='8'||ch=='9') {
- // Valid character - do nothing
- } else if(ch=='-') {
- if(mustBePositive||i>0)
- return false;
- } else if(ch=='.') {
- if(mustBeInteger||decimalPointFound)
- return false;
- else
- decimalPointFound = true;
- } else
- // Invalid character
- return false;
- } // for
-
- return true;
-} // validateNumber
-
-function checkInteger(numValue) {
- return validateNumber(numValue, true, false);
-} // checkInteger
-
-function checkNonNegativeInteger(numValue) {
- return validateNumber(numValue, true, true);
-} // checkNonNegativeInteger
-
-function checkPositiveInteger(numValue) {
- if(! checkNonNegativeInteger(numValue))
- return false;
-
- if(parseInt(numValue)==0)
- return false;
-
- return true;
-} // checkPositiveInteger
-
-function checkFloat(numValue) {
- return validateNumber(numValue, false, false);
-} // checkFloat
-
-function checkNonNegativeFloat(numValue) {
- return validateNumber(numValue, false, true);
-} // checkNonNegativeFloat
-
-function checkPositiveFloat(numValue) {
- if(! checkNonNegativeFloat(numValue))
- return false;
-
- if(parseFloat(numValue)<0.001&&parseFloat(numValue)>-0.001)
- return false;
-
- return true;
-} // checkPositiveFloat
-
-function getDocHeight(doc) {
-var docHt = 0, sh, oh;
-if (doc.height) docHt = doc.height;
-else if (doc.body) {
-if (doc.body.scrollHeight) docHt = sh = doc.body.scrollHeight;
-if (doc.body.offsetHeight) docHt = oh = doc.body.offsetHeight;
-if (sh && oh) docHt = Math.max(sh, oh);
-}
-return docHt;
-}
-
-function getDocWidth(doc)
-{
- var docWd = 0, sh, oh;
- if (doc.width)
- docWd = doc.width;
- else if (doc.body)
- {
- if (doc.body.scrollWidth)
- docWd = sh = doc.body.scrollWidth;
- if (doc.body.offsetWidth)
- docWd = oh = doc.body.offsetWidth;
- if (sh && oh)
- docWd = Math.max(sh, oh);
- }
- return docWd;
-}
-
-
-function setIframeHeight(iframeName)
-{
- var oldY = document.body.scrollTop;
- var iframeWin = window.frames[iframeName];
- var iframeEl = document.getElementById? document.getElementById(iframeName): document.all? document.all[iframeName]: null;
- if ( iframeEl && iframeWin ) {
- iframeEl.style.height = "auto";
- // helps resize (for some) if new doc shorter than previous
- var docHt = getDocHeight(iframeWin.document);
- var docWd = getDocWidth(iframeWin.document);
- // need to add to height to be sure it will all show
- if (docHt)
- iframeEl.style.height = docHt + 1 + "px";
- if (docWd)
- iframeEl.style.width = docWd + 1 + "px";
- }
- if (oldY != null && oldY != 'undefined')
- document.body.scrollTop = oldY;
-}
-
-function resizeFrames(){
- var isFolderAllowed = arguments[0];
- if (isFolderAllowed == null || isFolderAllowed == 'true'){
- if (document.getElementById('scrollableTable') && document.body.offsetHeight > 195)
- document.getElementById('scrollableTable').style.height=document.body.offsetHeight - 185;
- if (document.getElementById('contentDiv') && document.body.offsetHeight > 145)
- document.getElementById('contentDiv').style.height=document.body.offsetHeight - 135;
- if (document.getElementById('content_Iframe') && document.body.offsetHeight > 145)
- document.getElementById('content_Iframe').height=document.body.offsetHeight - 135;
-
- }else{
- setIframeHeight('content_Iframe');
- }
-}
-
-function resizeWindow() {
- var isFolderAllowed = arguments[0];
- if (isFolderAllowed != null)
- resizeFrames(isFolderAllowed);
- else
- resizeFrames(false);
-}
-
-/**
-* Usage : var myObje = $('theIdOfTheElementYouWantToGet');
-* Simple gives you the element. Avoids using document.getElementById();
-*/
- var $;
- if (!$ && document.getElementById) {
- $ = function() {
- var elements = new Array();
- for (var i = 0; i < arguments.length; i++) {
- var element = arguments[i];
- if (typeof element == 'string') {
- element = document.getElementById(element);
- }
- if (arguments.length == 1) {
- return element;
- }
- elements.push(element);
- }
- return elements;
- }
- } else if (!$ && document.all) {
- $ = function() {
- var elements = new Array();
- for (var i = 0; i < arguments.length; i++) {
- var element = arguments[i];
- if (typeof element == 'string') {
- element = document.all[element];
- }
- if (arguments.length == 1) {
- return element;
- }
- elements.push(element);
- }
- return elements;
- }
- }
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/script.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/js/script.js
deleted file mode 100644
index ea153016..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/js/script.js
+++ /dev/null
@@ -1,482 +0,0 @@
-// A few configuration settings
-var CROSSHAIRS_LOCATION = 'static/fusion/raptor/images/crosshairs.png';
-var HUE_SLIDER_LOCATION = 'static/fusion/raptor/images/h.png';
-var HUE_SLIDER_ARROWS_LOCATION = 'static/fusion/raptor/images/position.png';
-var SAT_VAL_SQUARE_LOCATION = 'static/fusion/raptor/images/sv.png';
-
-// Here are some boring utility functions. The real code comes later.
-
-function hexToRgb(hex_string, default_)
-{
- if (default_ == undefined)
- {
- default_ = null;
- }
-
- if (hex_string.substr(0, 1) == '#')
- {
- hex_string = hex_string.substr(1);
- }
-
- var r;
- var g;
- var b;
- if (hex_string.length == 3)
- {
- r = hex_string.substr(0, 1);
- r += r;
- g = hex_string.substr(1, 1);
- g += g;
- b = hex_string.substr(2, 1);
- b += b;
- }
- else if (hex_string.length == 6)
- {
- r = hex_string.substr(0, 2);
- g = hex_string.substr(2, 2);
- b = hex_string.substr(4, 2);
- }
- else
- {
- return default_;
- }
-
- r = parseInt(r, 16);
- g = parseInt(g, 16);
- b = parseInt(b, 16);
- if (isNaN(r) || isNaN(g) || isNaN(b))
- {
- return default_;
- }
- else
- {
- return {r: r / 255, g: g / 255, b: b / 255};
- }
-}
-
-function rgbToHex(r, g, b, includeHash)
-{
- r = Math.round(r * 255);
- g = Math.round(g * 255);
- b = Math.round(b * 255);
- if (includeHash == undefined)
- {
- includeHash = true;
- }
-
- r = r.toString(16);
- if (r.length == 1)
- {
- r = '0' + r;
- }
- g = g.toString(16);
- if (g.length == 1)
- {
- g = '0' + g;
- }
- b = b.toString(16);
- if (b.length == 1)
- {
- b = '0' + b;
- }
- return ((includeHash ? '#' : '') + r + g + b).toUpperCase();
-}
-
-var arVersion = navigator.appVersion.split("MSIE");
-var version = parseFloat(arVersion[1]);
-
-function fixPNG(myImage)
-{
- if ((version >= 5.5) && (version < 7) && (document.body.filters))
- {
- var node = document.createElement('span');
- node.id = myImage.id;
- node.className = myImage.className;
- node.title = myImage.title;
- node.style.cssText = myImage.style.cssText;
- node.style.setAttribute('filter', "progid:DXImageTransform.Microsoft.AlphaImageLoader"
- + "(src=\'" + myImage.src + "\', sizingMethod='scale')");
- node.style.fontSize = '0';
- node.style.width = myImage.width.toString() + 'px';
- node.style.height = myImage.height.toString() + 'px';
- node.style.display = 'inline-block';
- return node;
- }
- else
- {
- return myImage.cloneNode(false);
- }
-}
-
-function trackDrag(node, handler)
-{
- function fixCoords(x, y)
- {
- var nodePageCoords = pageCoords(node);
- x = (x - nodePageCoords.x) + document.documentElement.scrollLeft;
- y = (y - nodePageCoords.y) + document.documentElement.scrollTop;
- if (x < 0) x = 0;
- if (y < 0) y = 0;
- if (x > node.offsetWidth - 1) x = node.offsetWidth - 1;
- if (y > node.offsetHeight - 1) y = node.offsetHeight - 1;
- return {x: x, y: y};
- }
- function mouseDown(ev)
- {
- var coords = fixCoords(ev.clientX, ev.clientY);
- var lastX = coords.x;
- var lastY = coords.y;
- handler(coords.x, coords.y);
-
- function moveHandler(ev)
- {
- var coords = fixCoords(ev.clientX, ev.clientY);
- if (coords.x != lastX || coords.y != lastY)
- {
- lastX = coords.x;
- lastY = coords.y;
- handler(coords.x, coords.y);
- }
- }
- function upHandler(ev)
- {
- myRemoveEventListener(document, 'mouseup', upHandler);
- myRemoveEventListener(document, 'mousemove', moveHandler);
- myAddEventListener(node, 'mousedown', mouseDown);
- }
- myAddEventListener(document, 'mouseup', upHandler);
- myAddEventListener(document, 'mousemove', moveHandler);
- myRemoveEventListener(node, 'mousedown', mouseDown);
- if (ev.preventDefault) ev.preventDefault();
- }
- myAddEventListener(node, 'mousedown', mouseDown);
- node.onmousedown = function(e) { return false; };
- node.onselectstart = function(e) { return false; };
- node.ondragstart = function(e) { return false; };
-}
-
-var eventListeners = [];
-
-function findEventListener(node, event, handler)
-{
- var i;
- for (i in eventListeners)
- {
- if (eventListeners[i].node == node && eventListeners[i].event == event
- && eventListeners[i].handler == handler)
- {
- return i;
- }
- }
- return null;
-}
-function myAddEventListener(node, event, handler)
-{
- if (findEventListener(node, event, handler) != null)
- {
- return;
- }
-
- if (!node.addEventListener)
- {
- node.attachEvent('on' + event, handler);
- }
- else
- {
- node.addEventListener(event, handler, false);
- }
-
- eventListeners.push({node: node, event: event, handler: handler});
-}
-
-function removeEventListenerIndex(index)
-{
- var eventListener = eventListeners[index];
- delete eventListeners[index];
-
- if (!eventListener.node.removeEventListener)
- {
- eventListener.node.detachEvent('on' + eventListener.event,
- eventListener.handler);
- }
- else
- {
- eventListener.node.removeEventListener(eventListener.event,
- eventListener.handler, false);
- }
-}
-
-function myRemoveEventListener(node, event, handler)
-{
- removeEventListenerIndex(findEventListener(node, event, handler));
-}
-
-function cleanupEventListeners()
-{
- var i;
- for (i = eventListeners.length; i > 0; i--)
- {
- if (eventListeners[i] != undefined)
- {
- removeEventListenerIndex(i);
- }
- }
-}
-myAddEventListener(window, 'unload', cleanupEventListeners);
-
-// This copyright statement applies to the following two functions,
-// which are taken from MochiKit.
-//
-// Copyright 2005 Bob Ippolito <bob@redivi.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject
-// to the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-function hsvToRgb(hue, saturation, value)
-{
- var red;
- var green;
- var blue;
- if (value == 0.0)
- {
- red = 0;
- green = 0;
- blue = 0;
- }
- else
- {
- var i = Math.floor(hue * 6);
- var f = (hue * 6) - i;
- var p = value * (1 - saturation);
- var q = value * (1 - (saturation * f));
- var t = value * (1 - (saturation * (1 - f)));
- switch (i)
- {
- case 1: red = q; green = value; blue = p; break;
- case 2: red = p; green = value; blue = t; break;
- case 3: red = p; green = q; blue = value; break;
- case 4: red = t; green = p; blue = value; break;
- case 5: red = value; green = p; blue = q; break;
- case 6: // fall through
- case 0: red = value; green = t; blue = p; break;
- }
- }
- return {r: red, g: green, b: blue};
-}
-
-function rgbToHsv(red, green, blue)
-{
- var max = Math.max(Math.max(red, green), blue);
- var min = Math.min(Math.min(red, green), blue);
- var hue;
- var saturation;
- var value = max;
- if (min == max)
- {
- hue = 0;
- saturation = 0;
- }
- else
- {
- var delta = (max - min);
- saturation = delta / max;
- if (red == max)
- {
- hue = (green - blue) / delta;
- }
- else if (green == max)
- {
- hue = 2 + ((blue - red) / delta);
- }
- else
- {
- hue = 4 + ((red - green) / delta);
- }
- hue /= 6;
- if (hue < 0)
- {
- hue += 1;
- }
- if (hue > 1)
- {
- hue -= 1;
- }
- }
- return {
- h: hue,
- s: saturation,
- v: value
- };
-}
-
-function pageCoords(node)
-{
- var x = node.offsetLeft;
- var y = node.offsetTop;
- var parent = node.offsetParent;
- while (parent != null)
- {
- x += parent.offsetLeft;
- y += parent.offsetTop;
- parent = parent.offsetParent;
- }
- return {x: x, y: y};
-}
-
-// The real code begins here.
-var huePositionImg = document.createElement('img');
-huePositionImg.galleryImg = false;
-huePositionImg.width = 35;
-huePositionImg.height = 11;
-huePositionImg.src = HUE_SLIDER_ARROWS_LOCATION;
-huePositionImg.style.position = 'absolute';
-
-var hueSelectorImg = document.createElement('img');
-hueSelectorImg.galleryImg = false;
-hueSelectorImg.width = 35;
-hueSelectorImg.height = 200;
-hueSelectorImg.src = HUE_SLIDER_LOCATION;
-hueSelectorImg.style.display = 'block';
-
-var satValImg = document.createElement('img');
-satValImg.galleryImg = false;
-satValImg.width = 200;
-satValImg.height = 200;
-satValImg.src = SAT_VAL_SQUARE_LOCATION;
-satValImg.style.display = 'block';
-
-var crossHairsImg = document.createElement('img');
-crossHairsImg.galleryImg = false;
-crossHairsImg.width = 21;
-crossHairsImg.height = 21;
-crossHairsImg.src = CROSSHAIRS_LOCATION;
-crossHairsImg.style.position = 'absolute';
-
-function makeColorSelector(inputBox)
-{
- var rgb, hsv
-
- function colorChanged()
- {
- var hex = rgbToHex(rgb.r, rgb.g, rgb.b);
- var hueRgb = hsvToRgb(hsv.h, 1, 1);
- var hueHex = rgbToHex(hueRgb.r, hueRgb.g, hueRgb.b);
- previewDiv.style.background = hex;
- inputBox.value = hex;
- satValDiv.style.background = hueHex;
- crossHairs.style.left = ((hsv.v*199)-10).toString() + 'px';
- crossHairs.style.top = (((1-hsv.s)*199)-10).toString() + 'px';
- huePos.style.top = ((hsv.h*199)-5).toString() + 'px';
- }
- function rgbChanged()
- {
- hsv = rgbToHsv(rgb.r, rgb.g, rgb.b);
- colorChanged();
- }
- function hsvChanged()
- {
- rgb = hsvToRgb(hsv.h, hsv.s, hsv.v);
- colorChanged();
- }
-
- var colorSelectorDiv = document.createElement('div');
- colorSelectorDiv.style.padding = '15px';
- colorSelectorDiv.style.position = 'relative';
- colorSelectorDiv.style.height = '275px';
- colorSelectorDiv.style.width = '250px';
-
- var satValDiv = document.createElement('div');
- satValDiv.style.position = 'relative';
- satValDiv.style.width = '200px';
- satValDiv.style.height = '200px';
- var newSatValImg = fixPNG(satValImg);
- satValDiv.appendChild(newSatValImg);
- var crossHairs = crossHairsImg.cloneNode(false);
- satValDiv.appendChild(crossHairs);
- function satValDragged(x, y)
- {
- hsv.s = 1-(y/199);
- hsv.v = (x/199);
- hsvChanged();
- }
- trackDrag(satValDiv, satValDragged)
- colorSelectorDiv.appendChild(satValDiv);
-
- var hueDiv = document.createElement('div');
- hueDiv.style.position = 'absolute';
- hueDiv.style.left = '230px';
- hueDiv.style.top = '15px';
- hueDiv.style.width = '35px';
- hueDiv.style.height = '200px';
- var huePos = fixPNG(huePositionImg);
- hueDiv.appendChild(hueSelectorImg.cloneNode(false));
- hueDiv.appendChild(huePos);
- function hueDragged(x, y)
- {
- hsv.h = y/199;
- hsvChanged();
- }
- trackDrag(hueDiv, hueDragged);
- colorSelectorDiv.appendChild(hueDiv);
-
- var previewDiv = document.createElement('div');
- previewDiv.style.height = '50px'
- previewDiv.style.width = '50px';
- previewDiv.style.position = 'absolute';
- previewDiv.style.top = '225px';
- previewDiv.style.left = '15px';
- previewDiv.style.border = '1px solid black';
- colorSelectorDiv.appendChild(previewDiv);
-
- function inputBoxChanged()
- {
- rgb = hexToRgb(inputBox.value, {r: 0, g: 0, b: 0});
- rgbChanged();
- }
- myAddEventListener(inputBox, 'change', inputBoxChanged);
- inputBox.size = 8;
- inputBox.style.position = 'absolute';
- inputBox.style.right = '15px';
- inputBox.style.top = (225 + (25 - (inputBox.offsetHeight/2))).toString() + 'px';
- colorSelectorDiv.appendChild(inputBox);
-
- inputBoxChanged();
-
- return colorSelectorDiv;
-}
-
-function makeColorSelectors(ev)
-{
- var inputNodes = document.getElementsByTagName('input');
- var i;
- for (i = 0; i < inputNodes.length; i++)
- {
- var node = inputNodes[i];
- if (node.className != 'color')
- {
- continue;
- }
- var parent = node.parentNode;
- var prevNode = node.previousSibling;
- var selector = makeColorSelector(node);
- parent.insertBefore(selector, (prevNode ? prevNode.nextSibling : null));
- }
-}
-
-myAddEventListener(window, 'load', makeColorSelectors);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.css b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.css
deleted file mode 100644
index 7f542422..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.css
+++ /dev/null
@@ -1,1971 +0,0 @@
-/*!
- * ui-grid - v3.0.7 - 2015-10-06
- * Copyright (c) 2015 ; License: MIT
- */
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- content: " ";
- display: table;
-}
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- clear: both;
-}
-.ui-grid {
- border: 0px solid #d4d4d4;
- box-sizing: content-box;
- -webkit-border-radius: 0px;
- -moz-border-radius: 0px;
- border-radius: 0px;
- -webkit-transform: translateZ(0);
- -moz-transform: translateZ(0);
- -o-transform: translateZ(0);
- -ms-transform: translateZ(0);
- transform: translateZ(0);
-}
-.ui-grid-vertical-bar {
- position: absolute;
- right: 0;
- width: 0;
-}
-.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,
-.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- width: 1px;
-}
-.ui-grid-scrollbar-placeholder {
- background-color: transparent;
-}
-.ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-header-cell:last-child .ui-grid-vertical-bar {
- right: -1px;
- width: 1px;
- background-color: #d4d4d4;
-}
-.ui-grid-clearfix:before,
-.ui-grid-clearfix:after {
- content: "";
- display: table;
-}
-.ui-grid-clearfix:after {
- clear: both;
-}
-.ui-grid-invisible {
- visibility: hidden;
-}
-.ui-grid-contents-wrapper {
- position: relative;
- height: 100%;
- width: 100%;
-}
-.ui-grid-sr-only {
- position: absolute;
- width: 1px;
- height: 1px;
- margin: -1px;
- padding: 0;
- overflow: hidden;
- clip: rect(0, 0, 0, 0);
- border: 0;
-}
-.ui-grid-top-panel-background {
- background: #f2f2f2;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
-}
-.ui-grid-header {
- border-bottom: 0px solid #d4d4d4;
- box-sizing: border-box;
-}
-.ui-grid-top-panel {
- position: relative;
- overflow: hidden;
- font-weight: bold;
- background: #f2f2f2;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- -webkit-border-top-right-radius: -1px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: -1px;
- -moz-border-radius-topright: -1px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: -1px;
- border-top-right-radius: -1px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: -1px;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-.ui-grid-header-viewport {
- overflow: hidden;
-}
-.ui-grid-header-canvas:before,
-.ui-grid-header-canvas:after {
- content: "";
- display: table;
- line-height: 0;
-}
-.ui-grid-header-canvas:after {
- clear: both;
-}
-.ui-grid-header-cell-wrapper {
- position: relative;
- display: table;
- box-sizing: border-box;
- height: 100%;
-}
-.ui-grid-header-cell-row {
- display: table-row;
- position: relative;
-}
-.ui-grid-header-cell {
- position: relative;
- box-sizing: border-box;
- background-color: #666;
- color: #fff;
- border-right: 1px solid;
- border-color: #aaa;
- display: table-cell;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- width: 0;
-}
-.ui-grid-header-cell:last-child {
- border-right: 0;
-}
-.ui-grid-header-cell .sortable {
- cursor: pointer;
-}
-.ui-grid-header-cell .ui-grid-sort-priority-number {
- margin-left: -8px;
-}
-.ui-grid-header .ui-grid-vertical-bar {
- top: 0;
- bottom: 0;
-}
-.ui-grid-column-menu-button {
- position: absolute;
- right: 1px;
- top: 0;
-}
-.ui-grid-column-menu-button .ui-grid-icon-angle-down {
- vertical-align: sub;
-}
-.ui-grid-column-menu-button-last-col {
- margin-right: 25px;
-}
-.ui-grid-column-menu {
- position: absolute;
-}
-/* Slide up/down animations */
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transition: all 0.05s linear;
- -moz-transition: all 0.05s linear;
- -o-transition: all 0.05s linear;
- transition: all 0.05s linear;
- display: block !important;
-}
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transform: translateY(-100%);
- -moz-transform: translateY(-100%);
- -o-transform: translateY(-100%);
- -ms-transform: translateY(-100%);
- transform: translateY(-100%);
-}
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-column-menu .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active {
- -webkit-transform: translateY(0);
- -moz-transform: translateY(0);
- -o-transform: translateY(0);
- -ms-transform: translateY(0);
- transform: translateY(0);
-}
-/* Slide up/down animations */
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transition: all 0.05s linear;
- -moz-transition: all 0.05s linear;
- -o-transition: all 0.05s linear;
- transition: all 0.05s linear;
- display: block !important;
-}
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add.ng-hide-add-active,
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove {
- -webkit-transform: translateY(-100%);
- -moz-transform: translateY(-100%);
- -o-transform: translateY(-100%);
- -ms-transform: translateY(-100%);
- transform: translateY(-100%);
-}
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-add,
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid.ng-hide-remove.ng-hide-remove-active {
- -webkit-transform: translateY(0);
- -moz-transform: translateY(0);
- -o-transform: translateY(0);
- -ms-transform: translateY(0);
- transform: translateY(0);
-}
-.ui-grid-filter-container {
- padding: 4px 10px;
- position: relative;
-}
-.ui-grid-filter-container .ui-grid-filter-button {
- position: absolute;
- top: 0;
- bottom: 0;
- right: 0;
-}
-.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] {
- position: absolute;
- top: 50%;
- line-height: 32px;
- margin-top: -16px;
- right: 10px;
- opacity: 0.66;
-}
-.ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"]:hover {
- opacity: 1;
-}
-.ui-grid-filter-container .ui-grid-filter-button-select {
- position: absolute;
- top: 0;
- bottom: 0;
- right: 0;
-}
-.ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"] {
- position: absolute;
- top: 50%;
- line-height: 32px;
- margin-top: -16px;
- right: 0px;
- opacity: 0.66;
-}
-.ui-grid-filter-container .ui-grid-filter-button-select [class^="ui-grid-icon"]:hover {
- opacity: 1;
-}
-input[type="text"].ui-grid-filter-input {
- padding: 0;
- margin: 0;
- border: 0;
- width: 100%;
- border: 1px solid #d4d4d4;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-input[type="text"].ui-grid-filter-input:hover {
- border: 1px solid #d4d4d4;
-}
-select.ui-grid-filter-select {
- padding: 0;
- margin: 0;
- border: 0;
- width: 90%;
- border: 1px solid #d4d4d4;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-select.ui-grid-filter-select:hover {
- border: 1px solid #d4d4d4;
-}
-.ui-grid-filter-cancel-button-hidden select.ui-grid-filter-select {
- width: 100%;
-}
-.ui-grid-render-container {
- position: inherit;
- -webkit-border-top-right-radius: 0;
- -webkit-border-bottom-right-radius: 0px;
- -webkit-border-bottom-left-radius: 0px;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0;
- -moz-border-radius-bottomright: 0px;
- -moz-border-radius-bottomleft: 0px;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0px;
- border-bottom-left-radius: 0px;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-.ui-grid-render-container:focus {
- outline: none;
-}
-.ui-grid-viewport {
- min-height: 20px;
- position: relative;
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
-}
-.ui-grid-viewport:focus {
- outline: none !important;
-}
-.ui-grid-canvas {
- position: relative;
- padding-top: 0px;
-}
-.ui-grid-row:nth-child(odd) .ui-grid-cell {
- background-color: #f2f2f2;
-}
-.ui-grid-row:nth-child(even) .ui-grid-cell {
- background-color: #fff;
-}
-.ui-grid-row:last-child .ui-grid-cell {
- border-bottom-color: #aaa;
- border-bottom-style: solid;
-}
-.ui-grid-no-row-overlay {
- position: absolute;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- margin: 10%;
- background: #f2f2f2;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #d4d4d4;
- font-size: 2em;
- text-align: center;
-}
-.ui-grid-no-row-overlay > * {
- position: absolute;
- display: table;
- margin: auto 0;
- width: 100%;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- opacity: 0.66;
-}
-.ui-grid-cell {
- overflow: hidden;
- float: left;
- background-color: inherit;
- border-right: 1px solid;
- border-bottom: 1px solid;
- border-color: #aaa;
- box-sizing: border-box;
-}
-.ui-grid-cell:last-child {
- border-right: 0;
-}
-.ui-grid-cell-contents {
- padding: 5px;
- -moz-box-sizing: border-box;
- -webkit-box-sizing: border-box;
- box-sizing: border-box;
- white-space: nowrap;
- -ms-text-overflow: ellipsis;
- -o-text-overflow: ellipsis;
- text-overflow: ellipsis;
- overflow: hidden;
- height: 100%;
-}
-.ui-grid-cell-contents-hidden {
- visibility: hidden;
- width: 0;
- height: 0;
- display: none;
-}
-.ui-grid-row .ui-grid-cell.ui-grid-row-header-cell {
- background-color: #f0f0ee;
- border-bottom: solid 1px #aaa;
-}
-.ui-grid-footer-panel-background {
- background: #f2f2f2;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
-}
-.ui-grid-footer-panel {
- position: relative;
- border-bottom: 1px solid #aaa;
- border-top: 1px solid #aaa;
- overflow: hidden;
- font-weight: bold;
- background: #f2f2f2;
- background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(1, #ffffff));
- background: -ms-linear-gradient(bottom, #eeeeee, #ffffff);
- background: -moz-linear-gradient(center bottom, #eeeeee 0%, #ffffff 100%);
- background: -o-linear-gradient(#ffffff, #eeeeee);
- filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
- -webkit-border-top-right-radius: -1px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: -1px;
- -moz-border-radius-topright: -1px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: -1px;
- border-top-right-radius: -1px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: -1px;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-.ui-grid-grid-footer {
- float: left;
- width: 100%;
-}
-.ui-grid-footer-viewport {
- overflow: hidden;
-}
-.ui-grid-footer-canvas {
- position: relative;
-}
-.ui-grid-footer-canvas:before,
-.ui-grid-footer-canvas:after {
- content: "";
- display: table;
- line-height: 0;
-}
-.ui-grid-footer-canvas:after {
- clear: both;
-}
-.ui-grid-footer-cell-wrapper {
- position: relative;
- display: table;
- box-sizing: border-box;
- height: 100%;
-}
-.ui-grid-footer-cell-row {
- display: table-row;
-}
-.ui-grid-footer-cell {
- overflow: hidden;
- background-color: inherit;
- border-bottom: 1px solid;
- border-right: 1px solid;
- border-color: #aaa;
- box-sizing: border-box;
- display: table-cell;
-}
-.ui-grid-footer-cell:last-child {
- border-right: 0;
-}
-input[type="text"].ui-grid-filter-input {
- padding: 0;
- margin: 0;
- border: 0;
- width: 100%;
- border: 1px solid #d4d4d4;
- -webkit-border-top-right-radius: 0px;
- -webkit-border-bottom-right-radius: 0;
- -webkit-border-bottom-left-radius: 0;
- -webkit-border-top-left-radius: 0;
- -moz-border-radius-topright: 0px;
- -moz-border-radius-bottomright: 0;
- -moz-border-radius-bottomleft: 0;
- -moz-border-radius-topleft: 0;
- border-top-right-radius: 0px;
- border-bottom-right-radius: 0;
- border-bottom-left-radius: 0;
- border-top-left-radius: 0;
- -moz-background-clip: padding-box;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
-}
-input[type="text"].ui-grid-filter-input:hover {
- border: 1px solid #d4d4d4;
-}
-.ui-grid-menu-button {
- z-index: 2;
- position: absolute;
- right: 0;
- top: 0;
- background: #666;
- border-left: 1px solid #aaa;
- cursor: pointer;
- height: 30px;
- font-weight: normal;
-}
-.ui-grid-menu-button .ui-grid-icon-container {
- margin-top: 3px;
-}
-.ui-grid-menu-button .ui-grid-menu {
- right: 0;
-}
-.ui-grid-menu-button .ui-grid-menu .ui-grid-menu-mid {
- overflow: scroll;
- max-height: 300px;
- border: 1px solid #d4d4d4;
-}
-.ui-grid-menu {
- z-index: 2;
- position: absolute;
- padding: 0 10px 20px 10px;
- cursor: pointer;
- box-sizing: border-box;
-}
-.ui-grid-menu .ui-grid-menu-inner {
- background: #f2f2f2;
- border: 1px solid #d4d4d4;
- position: relative;
- white-space: nowrap;
- -webkit-border-radius: 0px;
- -moz-border-radius: 0px;
- border-radius: 0px;
- -webkit-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), inset 0 12px 12px -14px rgba(0, 0, 0, 0.2);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- position: absolute;
- right: 0px;
- top: 0px;
- display: inline-block;
- margin-bottom: 0;
- font-weight: normal;
- text-align: center;
- vertical-align: middle;
- touch-action: manipulation;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- white-space: nowrap;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- border-radius: 4px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- padding: 1px 1px;
- font-size: 10px;
- line-height: 1;
- border-radius: 2px;
- color: transparent;
- background-color: transparent;
- border-color: transparent;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- color: #333333;
- text-decoration: none;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active {
- outline: 0;
- background-image: none;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled],
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- cursor: not-allowed;
- opacity: 0.65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,
-fieldset[disabled] a.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- pointer-events: none;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:hover,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active:focus,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active.focus,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus {
- color: transparent;
- background-color: rgba(0, 0, 0, 0);
- border-color: rgba(0, 0, 0, 0);
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active,
-.open > .dropdown-toggle.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button {
- background-image: none;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled],
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:hover,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:hover,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:focus,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].focus,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.focus,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled]:active,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button:active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.disabled.active,
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button[disabled].active,
-fieldset[disabled] .ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button.active {
- background-color: transparent;
- border-color: transparent;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button .badge {
- color: transparent;
- background-color: transparent;
-}
-.ui-grid-menu .ui-grid-menu-inner .ui-grid-menu-close-button > i {
- opacity: 0.75;
- color: black;
-}
-.ui-grid-menu .ui-grid-menu-inner ul {
- margin: 0;
- padding: 0;
- list-style-type: none;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li {
- padding: 0px;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li button {
- min-width: 100%;
- padding: 8px;
- text-align: left;
- background: transparent;
- border: none;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li button:hover,
-.ui-grid-menu .ui-grid-menu-inner ul li button:focus {
- -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
-}
-.ui-grid-menu .ui-grid-menu-inner ul li button.ui-grid-menu-item-active {
- -webkit-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- -moz-box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
- background-color: #cecece;
-}
-.ui-grid-menu .ui-grid-menu-inner ul li:not(:last-child) > button {
- border-bottom: 1px solid #aaa;
-}
-.ui-grid-sortarrow {
- right: 5px;
- position: absolute;
- width: 20px;
- top: 0;
- bottom: 0;
- background-position: center;
-}
-.ui-grid-sortarrow.down {
- -webkit-transform: rotate(180deg);
- -moz-transform: rotate(180deg);
- -o-transform: rotate(180deg);
- -ms-transform: rotate(180deg);
- transform: rotate(180deg);
-}
-@font-face {
- font-family: 'ui-grid';
- src: url('ui-grid.eot');
- src: url('ui-grid.eot#iefix') format('embedded-opentype'), url('ui-grid.woff') format('woff'), url('ui-grid.ttf') format('truetype'), url('ui-grid.svg?#ui-grid') format('svg');
- font-weight: normal;
- font-style: normal;
-}
-/* Chrome hack: SVG is rendered more smooth in Windozze. 100% magic, uncomment if you need it. */
-/* Note, that will break hinting! In other OS-es font will be not as sharp as it could be */
-/*
-@media screen and (-webkit-min-device-pixel-ratio:0) {
- @font-face {
- font-family: 'ui-grid';
- src: url('../font/ui-grid.svg?12312827#ui-grid') format('svg');
- }
-}
-*/
-[class^="ui-grid-icon"]:before,
-[class*=" ui-grid-icon"]:before {
- font-family: "ui-grid";
- font-style: normal;
- font-weight: normal;
- speak: none;
- display: inline-block;
- text-decoration: inherit;
- width: 1em;
- margin-right: .2em;
- text-align: center;
- /* opacity: .8; */
- /* For safety - reset parent styles, that can break glyph codes*/
- font-variant: normal;
- text-transform: none;
- /* fix buttons height, for twitter bootstrap */
- line-height: 1em;
- /* Animation center compensation - margins should be symmetric */
- /* remove if not needed */
- margin-left: .2em;
- /* you can be more comfortable with increased icons size */
- /* font-size: 120%; */
- /* Uncomment for 3D effect */
- /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */
-}
-.ui-grid-icon-blank::before {
- width: 1em;
- content: ' ';
-}
-/*
-* RTL Styles
-*/
-.ui-grid[dir=rtl] .ui-grid-header-cell,
-.ui-grid[dir=rtl] .ui-grid-footer-cell,
-.ui-grid[dir=rtl] .ui-grid-cell {
- float: right !important;
-}
-.ui-grid[dir=rtl] .ui-grid-column-menu-button {
- position: absolute;
- left: 1px;
- top: 0;
- right: inherit;
-}
-.ui-grid[dir=rtl] .ui-grid-cell:first-child,
-.ui-grid[dir=rtl] .ui-grid-header-cell:first-child,
-.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child {
- border-right: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-cell:last-child,
-.ui-grid[dir=rtl] .ui-grid-header-cell:last-child {
- border-bottom: 1px solid #aaa;
- border-right: 1px solid #aaa;
- border-left: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-header-cell:first-child .ui-grid-vertical-bar,
-.ui-grid[dir=rtl] .ui-grid-footer-cell:first-child .ui-grid-vertical-bar,
-.ui-grid[dir=rtl] .ui-grid-cell:first-child .ui-grid-vertical-bar {
- width: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-menu-button {
- z-index: 2;
- position: absolute;
- left: 0;
- right: auto;
- background: #f2f2f2;
- border: 1px solid #d4d4d4;
- cursor: pointer;
- min-height: 27px;
- font-weight: normal;
-}
-.ui-grid[dir=rtl] .ui-grid-menu-button .ui-grid-menu {
- left: 0;
- right: auto;
-}
-.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button {
- right: initial;
- left: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-filter-container .ui-grid-filter-button [class^="ui-grid-icon"] {
- right: initial;
- left: 10px;
-}
-/*
- Animation example, for spinners
-*/
-.ui-grid-animate-spin {
- -moz-animation: ui-grid-spin 2s infinite linear;
- -o-animation: ui-grid-spin 2s infinite linear;
- -webkit-animation: ui-grid-spin 2s infinite linear;
- animation: ui-grid-spin 2s infinite linear;
- display: inline-block;
-}
-@-moz-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@-webkit-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@-o-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@-ms-keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-@keyframes ui-grid-spin {
- 0% {
- -moz-transform: rotate(0deg);
- -o-transform: rotate(0deg);
- -webkit-transform: rotate(0deg);
- transform: rotate(0deg);
- }
- 100% {
- -moz-transform: rotate(359deg);
- -o-transform: rotate(359deg);
- -webkit-transform: rotate(359deg);
- transform: rotate(359deg);
- }
-}
-/*---------------------------------------------------
- LESS Elements 0.9
- ---------------------------------------------------
- A set of useful LESS mixins
- More info at: http://lesselements.com
- ---------------------------------------------------*/
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- content: " ";
- display: table;
-}
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- clear: both;
-}
-.ui-grid-cell-focus {
- outline: 0;
- background-color: #b3c4c7;
-}
-.ui-grid-focuser {
- position: absolute;
- left: 0px;
- top: 0px;
- z-index: -1;
- width: 100%;
- height: 100%;
-}
-.ui-grid-focuser:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.ui-grid-offscreen {
- display: block;
- position: absolute;
- left: -10000px;
- top: -10000px;
- clip: rect(0px, 0px, 0px, 0px);
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-div.ui-grid-cell input {
- border-radius: inherit;
- padding: 0;
- width: 100%;
- color: inherit;
- height: auto;
- font: inherit;
- outline: none;
-}
-div.ui-grid-cell input:focus {
- color: inherit;
- outline: none;
-}
-div.ui-grid-cell input[type="checkbox"] {
- margin: 9px 0 0 6px;
- width: auto;
-}
-div.ui-grid-cell input.ng-invalid {
- border: 1px solid #fc8f8f;
-}
-div.ui-grid-cell input.ng-valid {
- border: 1px solid #d4d4d4;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.expandableRow .ui-grid-row:nth-child(odd) .ui-grid-cell {
- background-color: #f2f2f2;
-}
-.expandableRow .ui-grid-row:nth-child(even) .ui-grid-cell {
- background-color: #fff;
-}
-.ui-grid-cell.ui-grid-disable-selection.ui-grid-row-header-cell {
- pointer-events: none;
-}
-.ui-grid-expandable-buttons-cell i {
- pointer-events: all;
-}
-.scrollFiller {
- float: left;
- border: 1px solid #d4d4d4;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-tree-header-row {
- font-weight: bold !important;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.movingColumn {
- position: absolute;
- top: 0;
- border: 1px solid #d4d4d4;
- box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.2);
-}
-.movingColumn .ui-grid-icon-angle-down {
- display: none;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/*---------------------------------------------------
- LESS Elements 0.9
- ---------------------------------------------------
- A set of useful LESS mixins
- More info at: http://lesselements.com
- ---------------------------------------------------*/
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:before,
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:before,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:before,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- content: " ";
- display: table;
-}
-#ui-grid-twbs #ui-grid-twbs .form-horizontal .form-group:after,
-#ui-grid-twbs #ui-grid-twbs .btn-toolbar:after,
-#ui-grid-twbs #ui-grid-twbs .btn-group-vertical > .btn-group:after {
- clear: both;
-}
-.ui-grid-pager-panel {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- padding-top: 3px;
- padding-bottom: 3px;
-}
-.ui-grid-pager-container {
- float: left;
-}
-.ui-grid-pager-control {
- margin-right: 10px;
- margin-left: 10px;
- min-width: 135px;
- float: left;
-}
-.ui-grid-pager-control button {
- height: 25px;
- min-width: 26px;
- display: inline-block;
- margin-bottom: 0;
- font-weight: normal;
- text-align: center;
- vertical-align: middle;
- touch-action: manipulation;
- cursor: pointer;
- background-image: none;
- border: 1px solid transparent;
- white-space: nowrap;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- border-radius: 4px;
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- color: #eeeeee;
- background-color: #f2f2f2;
- border-color: #cccccc;
-}
-.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button:active:focus,
-.ui-grid-pager-control button.active:focus,
-.ui-grid-pager-control button.focus,
-.ui-grid-pager-control button:active.focus,
-.ui-grid-pager-control button.active.focus {
- outline: thin dotted;
- outline: 5px auto -webkit-focus-ring-color;
- outline-offset: -2px;
-}
-.ui-grid-pager-control button:hover,
-.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button.focus {
- color: #333333;
- text-decoration: none;
-}
-.ui-grid-pager-control button:active,
-.ui-grid-pager-control button.active {
- outline: 0;
- background-image: none;
- -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
- box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
-}
-.ui-grid-pager-control button.disabled,
-.ui-grid-pager-control button[disabled],
-fieldset[disabled] .ui-grid-pager-control button {
- cursor: not-allowed;
- opacity: 0.65;
- filter: alpha(opacity=65);
- -webkit-box-shadow: none;
- box-shadow: none;
-}
-a.ui-grid-pager-control button.disabled,
-fieldset[disabled] a.ui-grid-pager-control button {
- pointer-events: none;
-}
-.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button.focus {
- color: #eeeeee;
- background-color: #dadada;
- border-color: #8c8c8c;
-}
-.ui-grid-pager-control button:hover {
- color: #eeeeee;
- background-color: #dadada;
- border-color: #adadad;
-}
-.ui-grid-pager-control button:active,
-.ui-grid-pager-control button.active,
-.open > .dropdown-toggle.ui-grid-pager-control button {
- color: #eeeeee;
- background-color: #dadada;
- border-color: #adadad;
-}
-.ui-grid-pager-control button:active:hover,
-.ui-grid-pager-control button.active:hover,
-.open > .dropdown-toggle.ui-grid-pager-control button:hover,
-.ui-grid-pager-control button:active:focus,
-.ui-grid-pager-control button.active:focus,
-.open > .dropdown-toggle.ui-grid-pager-control button:focus,
-.ui-grid-pager-control button:active.focus,
-.ui-grid-pager-control button.active.focus,
-.open > .dropdown-toggle.ui-grid-pager-control button.focus {
- color: #eeeeee;
- background-color: #c8c8c8;
- border-color: #8c8c8c;
-}
-.ui-grid-pager-control button:active,
-.ui-grid-pager-control button.active,
-.open > .dropdown-toggle.ui-grid-pager-control button {
- background-image: none;
-}
-.ui-grid-pager-control button.disabled,
-.ui-grid-pager-control button[disabled],
-fieldset[disabled] .ui-grid-pager-control button,
-.ui-grid-pager-control button.disabled:hover,
-.ui-grid-pager-control button[disabled]:hover,
-fieldset[disabled] .ui-grid-pager-control button:hover,
-.ui-grid-pager-control button.disabled:focus,
-.ui-grid-pager-control button[disabled]:focus,
-fieldset[disabled] .ui-grid-pager-control button:focus,
-.ui-grid-pager-control button.disabled.focus,
-.ui-grid-pager-control button[disabled].focus,
-fieldset[disabled] .ui-grid-pager-control button.focus,
-.ui-grid-pager-control button.disabled:active,
-.ui-grid-pager-control button[disabled]:active,
-fieldset[disabled] .ui-grid-pager-control button:active,
-.ui-grid-pager-control button.disabled.active,
-.ui-grid-pager-control button[disabled].active,
-fieldset[disabled] .ui-grid-pager-control button.active {
- background-color: #f2f2f2;
- border-color: #cccccc;
-}
-.ui-grid-pager-control button .badge {
- color: #f2f2f2;
- background-color: #eeeeee;
-}
-.ui-grid-pager-control input {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555555;
- background-color: #ffffff;
- background-image: none;
- border: 1px solid #cccccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
- display: inline;
- height: 26px;
- width: 50px;
- vertical-align: top;
-}
-.ui-grid-pager-control input:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.ui-grid-pager-control input::-moz-placeholder {
- color: #999999;
- opacity: 1;
-}
-.ui-grid-pager-control input:-ms-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-control input::-webkit-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-control input[disabled],
-.ui-grid-pager-control input[readonly],
-fieldset[disabled] .ui-grid-pager-control input {
- background-color: #eeeeee;
- opacity: 1;
-}
-.ui-grid-pager-control input[disabled],
-fieldset[disabled] .ui-grid-pager-control input {
- cursor: not-allowed;
-}
-textarea.ui-grid-pager-control input {
- height: auto;
-}
-select.ui-grid-pager-control input {
- height: 30px;
- line-height: 30px;
-}
-textarea.ui-grid-pager-control input,
-select[multiple].ui-grid-pager-control input {
- height: auto;
-}
-.ui-grid-pager-control .ui-grid-pager-max-pages-number {
- vertical-align: bottom;
-}
-.ui-grid-pager-control .ui-grid-pager-max-pages-number > * {
- vertical-align: middle;
-}
-.ui-grid-pager-control .first-bar {
- width: 10px;
- border-left: 2px solid #4d4d4d;
- margin-top: -6px;
- height: 12px;
- margin-left: -3px;
-}
-.ui-grid-pager-control .first-triangle {
- width: 0;
- height: 0;
- border-style: solid;
- border-width: 5px 8.7px 5px 0;
- border-color: transparent #4d4d4d transparent transparent;
- margin-left: 2px;
-}
-.ui-grid-pager-control .next-triangle {
- margin-left: 1px;
-}
-.ui-grid-pager-control .prev-triangle {
- margin-left: 0;
-}
-.ui-grid-pager-control .last-triangle {
- width: 0;
- height: 0;
- border-style: solid;
- border-width: 5px 0 5px 8.7px;
- border-color: transparent transparent transparent #4d4d4d;
- margin-left: -1px;
-}
-.ui-grid-pager-control .last-bar {
- width: 10px;
- border-left: 2px solid #4d4d4d;
- margin-top: -6px;
- height: 12px;
- margin-left: 1px;
-}
-.ui-grid-pager-row-count-picker {
- float: left;
-}
-.ui-grid-pager-row-count-picker select {
- display: block;
- width: 100%;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555555;
- background-color: #ffffff;
- background-image: none;
- border: 1px solid #cccccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
- -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
- height: 30px;
- padding: 5px 10px;
- font-size: 12px;
- line-height: 1.5;
- border-radius: 3px;
- height: 26px;
- width: 67px;
- display: inline;
-}
-.ui-grid-pager-row-count-picker select:focus {
- border-color: #66afe9;
- outline: 0;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
-}
-.ui-grid-pager-row-count-picker select::-moz-placeholder {
- color: #999999;
- opacity: 1;
-}
-.ui-grid-pager-row-count-picker select:-ms-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-row-count-picker select::-webkit-input-placeholder {
- color: #999999;
-}
-.ui-grid-pager-row-count-picker select[disabled],
-.ui-grid-pager-row-count-picker select[readonly],
-fieldset[disabled] .ui-grid-pager-row-count-picker select {
- background-color: #eeeeee;
- opacity: 1;
-}
-.ui-grid-pager-row-count-picker select[disabled],
-fieldset[disabled] .ui-grid-pager-row-count-picker select {
- cursor: not-allowed;
-}
-textarea.ui-grid-pager-row-count-picker select {
- height: auto;
-}
-select.ui-grid-pager-row-count-picker select {
- height: 30px;
- line-height: 30px;
-}
-textarea.ui-grid-pager-row-count-picker select,
-select[multiple].ui-grid-pager-row-count-picker select {
- height: auto;
-}
-.ui-grid-pager-row-count-picker .ui-grid-pager-row-count-label {
- margin-top: 3px;
-}
-.ui-grid-pager-count-container {
- float: right;
- margin-top: 4px;
- min-width: 50px;
-}
-.ui-grid-pager-count-container .ui-grid-pager-count {
- margin-right: 10px;
- margin-left: 10px;
- float: right;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-pinned-container {
- position: absolute;
- display: inline;
- top: 0;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left {
- float: left;
- left: 0;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right {
- float: right;
- right: 0;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child {
- box-sizing: border-box;
- border-width: 1px;
- border-bottom-color: #aaa;
- border-right-color: #aaa;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:last-child {
- box-sizing: border-box;
- border-bottom: 1px solid;
- border-right: 1px solid;
- border-width: 1px;
- border-bottom-color: #aaa;
- border-right-color: #aaa;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar,
-.ui-grid-pinned-container .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- width: 1px;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-left .ui-grid-header-cell:last-child .ui-grid-vertical-bar {
- right: -1px;
- width: 1px;
- background-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:first-child {
- box-sizing: border-box;
- border-left: 1px solid;
- border-width: 1px;
- border-left-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-cell:first-child {
- box-sizing: border-box;
- border-left: 1px solid;
- border-width: 1px;
- border-left-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:not(:first-child) .ui-grid-vertical-bar,
-.ui-grid-pinned-container .ui-grid-cell:not(:first-child) .ui-grid-vertical-bar {
- width: 1px;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-header-cell:not(:first-child) .ui-grid-vertical-bar {
- background-color: #d4d4d4;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-right .ui-grid-cell:not(:last-child) .ui-grid-vertical-bar {
- background-color: #aeaeae;
-}
-.ui-grid-pinned-container.ui-grid-pinned-container-first .ui-grid-header-cell:first-child .ui-grid-vertical-bar {
- left: -1px;
- width: 1px;
- background-color: #aeaeae;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-column-resizer {
- top: 0;
- bottom: 0;
- width: 5px;
- position: absolute;
- cursor: col-resize;
-}
-.ui-grid-column-resizer.left {
- left: 0;
-}
-.ui-grid-column-resizer.right {
- right: 0;
-}
-.ui-grid-header-cell:last-child .ui-grid-column-resizer.right {
- border-right: 1px solid #aaa;
-}
-.ui-grid[dir=rtl] .ui-grid-header-cell:last-child .ui-grid-column-resizer.right {
- border-right: 0;
-}
-.ui-grid[dir=rtl] .ui-grid-header-cell:last-child .ui-grid-column-resizer.left {
- border-left: 1px solid #d4d4d4;
-}
-.ui-grid.column-resizing {
- cursor: col-resize;
-}
-.ui-grid.column-resizing .ui-grid-resize-overlay {
- position: absolute;
- top: 0;
- height: 100%;
- width: 1px;
- background-color: #aeaeae;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-row-saving .ui-grid-cell {
- color: #848484 !important;
-}
-.ui-grid-row-dirty .ui-grid-cell {
- color: #610b38;
-}
-.ui-grid-row-error .ui-grid-cell {
- color: #ff0000 !important;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-row.ui-grid-row-selected > [ui-grid-row] > .ui-grid-cell {
- background-color: #c9dde1;
-}
-.ui-grid-disable-selection {
- -webkit-touch-callout: none;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- cursor: default;
-}
-.ui-grid-selection-row-header-buttons {
- cursor: pointer;
- opacity: 0.1;
-}
-.ui-grid-selection-row-header-buttons.ui-grid-row-selected {
- opacity: 1;
-}
-.ui-grid-selection-row-header-buttons.ui-grid-all-selected {
- opacity: 1;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-tree-row-header-buttons.ui-grid-tree-header {
- cursor: pointer;
- opacity: 1;
-}
-
-/* This file contains variable declarations (do not remove this line) */
-/*-- VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-/**
-* @section Grid styles
-*/
-/**
-* @section Header styles
-*/
-/** @description Colors for header gradient */
-/**
-* @section Grid body styles
-*/
-/** @description Colors used for row alternation */
-/**
-* @section Sort arrow colors
-*/
-/**
-* @section Scrollbar styles
-*/
-/**
-* @section font library path
-*/
-/*-- END VARIABLES (DO NOT REMOVE THESE COMMENTS) --*/
-.ui-grid-tree-header-row {
- font-weight: bold !important;
-}
-
-.ui-grid-icon-plus-squared:before {
- content: '\c350';
-}
-/* 'ì' */
-.ui-grid-icon-minus-squared:before {
- content: '\c351';
-}
-/* 'ì‘' */
-.ui-grid-icon-search:before {
- content: '\c352';
-}
-/* 'ì’' */
-.ui-grid-icon-cancel:before {
- content: '\c353';
-}
-/* 'ì“' */
-.ui-grid-icon-info-circled:before {
- content: '\c354';
-}
-/* 'ì”' */
-.ui-grid-icon-lock:before {
- content: '\c355';
-}
-/* 'ì•' */
-.ui-grid-icon-lock-open:before {
- content: '\c356';
-}
-/* 'ì–' */
-.ui-grid-icon-pencil:before {
- content: '\c357';
-}
-/* 'ì—' */
-.ui-grid-icon-down-dir:before {
- content: '\c358';
-}
-/* 'ì˜' */
-.ui-grid-icon-up-dir:before {
- content: '\c359';
-}
-/* 'ì™' */
-.ui-grid-icon-left-dir:before {
- content: '\c35a';
-}
-/* 'ìš' */
-.ui-grid-icon-right-dir:before {
- content: '\c35b';
-}
-/* 'ì›' */
-.ui-grid-icon-left-open:before {
- content: '\c35c';
-}
-/* 'ìœ' */
-.ui-grid-icon-right-open:before {
- content: '\c35d';
-}
-/* 'ì' */
-.ui-grid-icon-angle-down:before {
- content: '\c35e';
-}
-/* 'ìž' */
-.ui-grid-icon-filter:before {
- content: '\c35f';
-}
-/* 'ìŸ' */
-.ui-grid-icon-sort-alt-up:before {
- content: '\c360';
-}
-/* 'ì ' */
-.ui-grid-icon-sort-alt-down:before {
- content: '\c361';
-}
-/* 'ì¡' */
-.ui-grid-icon-ok:before {
- content: '\c362';
-}
-/* 'ì¢' */
-.ui-grid-icon-menu:before {
- content: '\c363';
- color: #fff;
-}
-/* 'ì£' */
-.ui-grid-icon-indent-left:before {
- content: '\e800';
-}
-/* 'î €' */
-.ui-grid-icon-indent-right:before {
- content: '\e801';
-}
-/* 'î ' */
-.ui-grid-icon-spin5:before {
- content: '\ea61';
-}
-/* 'î©¡' */
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.eot b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.eot
deleted file mode 100644
index 15e42a56..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.eot
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.js
deleted file mode 100644
index 80f2293d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.js
+++ /dev/null
@@ -1,26735 +0,0 @@
-/*!
- * ui-grid - v3.0.7 - 2015-10-06
- * Copyright (c) 2015 ; License: MIT
- */
-
-(function () {
- 'use strict';
- angular.module('ui.grid.i18n', []);
- angular.module('ui.grid', ['ui.grid.i18n']);
-})();
-(function () {
- 'use strict';
- angular.module('ui.grid').constant('uiGridConstants', {
- LOG_DEBUG_MESSAGES: true,
- LOG_WARN_MESSAGES: true,
- LOG_ERROR_MESSAGES: true,
- CUSTOM_FILTERS: /CUSTOM_FILTERS/g,
- COL_FIELD: /COL_FIELD/g,
- MODEL_COL_FIELD: /MODEL_COL_FIELD/g,
- TOOLTIP: /title=\"TOOLTIP\"/g,
- DISPLAY_CELL_TEMPLATE: /DISPLAY_CELL_TEMPLATE/g,
- TEMPLATE_REGEXP: /<.+>/,
- FUNC_REGEXP: /(\([^)]*\))?$/,
- DOT_REGEXP: /\./g,
- APOS_REGEXP: /'/g,
- BRACKET_REGEXP: /^(.*)((?:\s*\[\s*\d+\s*\]\s*)|(?:\s*\[\s*"(?:[^"\\]|\\.)*"\s*\]\s*)|(?:\s*\[\s*'(?:[^'\\]|\\.)*'\s*\]\s*))(.*)$/,
- COL_CLASS_PREFIX: 'ui-grid-col',
- events: {
- GRID_SCROLL: 'uiGridScroll',
- COLUMN_MENU_SHOWN: 'uiGridColMenuShown',
- ITEM_DRAGGING: 'uiGridItemDragStart', // For any item being dragged
- COLUMN_HEADER_CLICK: 'uiGridColumnHeaderClick'
- },
- // copied from http://www.lsauer.com/2011/08/javascript-keymap-keycodes-in-json.html
- keymap: {
- TAB: 9,
- STRG: 17,
- CAPSLOCK: 20,
- CTRL: 17,
- CTRLRIGHT: 18,
- CTRLR: 18,
- SHIFT: 16,
- RETURN: 13,
- ENTER: 13,
- BACKSPACE: 8,
- BCKSP: 8,
- ALT: 18,
- ALTR: 17,
- ALTRIGHT: 17,
- SPACE: 32,
- WIN: 91,
- MAC: 91,
- FN: null,
- PG_UP: 33,
- PG_DOWN: 34,
- UP: 38,
- DOWN: 40,
- LEFT: 37,
- RIGHT: 39,
- ESC: 27,
- DEL: 46,
- F1: 112,
- F2: 113,
- F3: 114,
- F4: 115,
- F5: 116,
- F6: 117,
- F7: 118,
- F8: 119,
- F9: 120,
- F10: 121,
- F11: 122,
- F12: 123
- },
- ASC: 'asc',
- DESC: 'desc',
- filter: {
- STARTS_WITH: 2,
- ENDS_WITH: 4,
- EXACT: 8,
- CONTAINS: 16,
- GREATER_THAN: 32,
- GREATER_THAN_OR_EQUAL: 64,
- LESS_THAN: 128,
- LESS_THAN_OR_EQUAL: 256,
- NOT_EQUAL: 512,
- SELECT: 'select',
- INPUT: 'input'
- },
-
- aggregationTypes: {
- sum: 2,
- count: 4,
- avg: 8,
- min: 16,
- max: 32
- },
-
- // TODO(c0bra): Create full list of these somehow. NOTE: do any allow a space before or after them?
- CURRENCY_SYMBOLS: ['ƒ', '$', '£', '$', '¤', '¥', '៛', '₩', '₱', '฿', '₫'],
-
- scrollDirection: {
- UP: 'up',
- DOWN: 'down',
- LEFT: 'left',
- RIGHT: 'right',
- NONE: 'none'
-
- },
-
- dataChange: {
- ALL: 'all',
- EDIT: 'edit',
- ROW: 'row',
- COLUMN: 'column',
- OPTIONS: 'options'
- },
- scrollbars: {
- NEVER: 0,
- ALWAYS: 1
- //WHEN_NEEDED: 2
- }
- });
-
-})();
-angular.module('ui.grid').directive('uiGridCell', ['$compile', '$parse', 'gridUtil', 'uiGridConstants', function ($compile, $parse, gridUtil, uiGridConstants) {
- var uiGridCell = {
- priority: 0,
- scope: false,
- require: '?^uiGrid',
- compile: function() {
- return {
- pre: function($scope, $elm, $attrs, uiGridCtrl) {
- function compileTemplate() {
- var compiledElementFn = $scope.col.compiledElementFn;
-
- compiledElementFn($scope, function(clonedElement, scope) {
- $elm.append(clonedElement);
- });
- }
-
- // If the grid controller is present, use it to get the compiled cell template function
- if (uiGridCtrl && $scope.col.compiledElementFn) {
- compileTemplate();
- }
- // No controller, compile the element manually (for unit tests)
- else {
- if ( uiGridCtrl && !$scope.col.compiledElementFn ){
- // gridUtil.logError('Render has been called before precompile. Please log a ui-grid issue');
-
- $scope.col.getCompiledElementFn()
- .then(function (compiledElementFn) {
- compiledElementFn($scope, function(clonedElement, scope) {
- $elm.append(clonedElement);
- });
- });
- }
- else {
- var html = $scope.col.cellTemplate
- .replace(uiGridConstants.MODEL_COL_FIELD, 'row.entity.' + gridUtil.preEval($scope.col.field))
- .replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)');
-
- var cellElement = $compile(html)($scope);
- $elm.append(cellElement);
- }
- }
- },
- post: function($scope, $elm, $attrs, uiGridCtrl) {
- var initColClass = $scope.col.getColClass(false);
- $elm.addClass(initColClass);
-
- var classAdded;
- var updateClass = function( grid ){
- var contents = $elm;
- if ( classAdded ){
- contents.removeClass( classAdded );
- classAdded = null;
- }
-
- if (angular.isFunction($scope.col.cellClass)) {
- classAdded = $scope.col.cellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex);
- }
- else {
- classAdded = $scope.col.cellClass;
- }
- contents.addClass(classAdded);
- };
-
- if ($scope.col.cellClass) {
- updateClass();
- }
-
- // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN, uiGridConstants.dataChange.EDIT]);
-
- // watch the col and row to see if they change - which would indicate that we've scrolled or sorted or otherwise
- // changed the row/col that this cell relates to, and we need to re-evaluate cell classes and maybe other things
- var cellChangeFunction = function( n, o ){
- if ( n !== o ) {
- if ( classAdded || $scope.col.cellClass ){
- updateClass();
- }
-
- // See if the column's internal class has changed
- var newColClass = $scope.col.getColClass(false);
- if (newColClass !== initColClass) {
- $elm.removeClass(initColClass);
- $elm.addClass(newColClass);
- initColClass = newColClass;
- }
- }
- };
-
- // TODO(c0bra): Turn this into a deep array watch
-/* shouldn't be needed any more given track by col.name
- var colWatchDereg = $scope.$watch( 'col', cellChangeFunction );
-*/
- var rowWatchDereg = $scope.$watch( 'row', cellChangeFunction );
-
-
- var deregisterFunction = function() {
- dataChangeDereg();
-// colWatchDereg();
- rowWatchDereg();
- };
-
- $scope.$on( '$destroy', deregisterFunction );
- $elm.on( '$destroy', deregisterFunction );
- }
- };
- }
- };
-
- return uiGridCell;
-}]);
-
-
-(function(){
-
-angular.module('ui.grid')
-.service('uiGridColumnMenuService', [ 'i18nService', 'uiGridConstants', 'gridUtil',
-function ( i18nService, uiGridConstants, gridUtil ) {
-/**
- * @ngdoc service
- * @name ui.grid.service:uiGridColumnMenuService
- *
- * @description Services for working with column menus, factored out
- * to make the code easier to understand
- */
-
- var service = {
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name initialize
- * @description Sets defaults, puts a reference to the $scope on
- * the uiGridController
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {controller} uiGridCtrl the uiGridController for the grid
- * we're on
- *
- */
- initialize: function( $scope, uiGridCtrl ){
- $scope.grid = uiGridCtrl.grid;
-
- // Store a reference to this link/controller in the main uiGrid controller
- // to allow showMenu later
- uiGridCtrl.columnMenuScope = $scope;
-
- // Save whether we're shown or not so the columns can check
- $scope.menuShown = false;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name setColMenuItemWatch
- * @description Setup a watch on $scope.col.menuItems, and update
- * menuItems based on this. $scope.col needs to be set by the column
- * before calling the menu.
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {controller} uiGridCtrl the uiGridController for the grid
- * we're on
- *
- */
- setColMenuItemWatch: function ( $scope ){
- var deregFunction = $scope.$watch('col.menuItems', function (n, o) {
- if (typeof(n) !== 'undefined' && n && angular.isArray(n)) {
- n.forEach(function (item) {
- if (typeof(item.context) === 'undefined' || !item.context) {
- item.context = {};
- }
- item.context.col = $scope.col;
- });
-
- $scope.menuItems = $scope.defaultMenuItems.concat(n);
- }
- else {
- $scope.menuItems = $scope.defaultMenuItems;
- }
- });
-
- $scope.$on( '$destroy', deregFunction );
- },
-
-
- /**
- * @ngdoc boolean
- * @name enableSorting
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) True by default. When enabled, this setting adds sort
- * widgets to the column header, allowing sorting of the data in the individual column.
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name sortable
- * @description determines whether this column is sortable
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- sortable: function( $scope ) {
- if ( $scope.grid.options.enableSorting && typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.enableSorting) {
- return true;
- }
- else {
- return false;
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name isActiveSort
- * @description determines whether the requested sort direction is current active, to
- * allow highlighting in the menu
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {string} direction the direction that we'd have selected for us to be active
- *
- */
- isActiveSort: function( $scope, direction ){
- return (typeof($scope.col) !== 'undefined' && typeof($scope.col.sort) !== 'undefined' &&
- typeof($scope.col.sort.direction) !== 'undefined' && $scope.col.sort.direction === direction);
-
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name suppressRemoveSort
- * @description determines whether we should suppress the removeSort option
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- suppressRemoveSort: function( $scope ) {
- if ($scope.col && $scope.col.suppressRemoveSort) {
- return true;
- }
- else {
- return false;
- }
- },
-
-
- /**
- * @ngdoc boolean
- * @name enableHiding
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) True by default. When set to false, this setting prevents a user from hiding the column
- * using the column menu or the grid menu.
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name hideable
- * @description determines whether a column can be hidden, by checking the enableHiding columnDef option
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- hideable: function( $scope ) {
- if (typeof($scope.col) !== 'undefined' && $scope.col && $scope.col.colDef && $scope.col.colDef.enableHiding === false ) {
- return false;
- }
- else {
- return true;
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name getDefaultMenuItems
- * @description returns the default menu items for a column menu
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- *
- */
- getDefaultMenuItems: function( $scope ){
- return [
- {
- title: i18nService.getSafeText('sort.ascending'),
- icon: 'ui-grid-icon-sort-alt-up',
- action: function($event) {
- $event.stopPropagation();
- $scope.sortColumn($event, uiGridConstants.ASC);
- },
- shown: function () {
- return service.sortable( $scope );
- },
- active: function() {
- return service.isActiveSort( $scope, uiGridConstants.ASC);
- }
- },
- {
- title: i18nService.getSafeText('sort.descending'),
- icon: 'ui-grid-icon-sort-alt-down',
- action: function($event) {
- $event.stopPropagation();
- $scope.sortColumn($event, uiGridConstants.DESC);
- },
- shown: function() {
- return service.sortable( $scope );
- },
- active: function() {
- return service.isActiveSort( $scope, uiGridConstants.DESC);
- }
- },
- {
- title: i18nService.getSafeText('sort.remove'),
- icon: 'ui-grid-icon-cancel',
- action: function ($event) {
- $event.stopPropagation();
- $scope.unsortColumn();
- },
- shown: function() {
- return service.sortable( $scope ) &&
- typeof($scope.col) !== 'undefined' && (typeof($scope.col.sort) !== 'undefined' &&
- typeof($scope.col.sort.direction) !== 'undefined') && $scope.col.sort.direction !== null &&
- !service.suppressRemoveSort( $scope );
- }
- },
- {
- title: i18nService.getSafeText('column.hide'),
- icon: 'ui-grid-icon-cancel',
- shown: function() {
- return service.hideable( $scope );
- },
- action: function ($event) {
- $event.stopPropagation();
- $scope.hideColumn();
- }
- },
- {
- title: i18nService.getSafeText('columnMenu.close'),
- screenReaderOnly: true,
- shown: function(){
- return true;
- },
- action: function($event){
- $event.stopPropagation();
- }
- }
- ];
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name getColumnElementPosition
- * @description gets the position information needed to place the column
- * menu below the column header
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {GridCol} column the column we want to position below
- * @param {element} $columnElement the column element we want to position below
- * @returns {hash} containing left, top, offset, height, width
- *
- */
- getColumnElementPosition: function( $scope, column, $columnElement ){
- var positionData = {};
- positionData.left = $columnElement[0].offsetLeft;
- positionData.top = $columnElement[0].offsetTop;
- positionData.parentLeft = $columnElement[0].offsetParent.offsetLeft;
-
- // Get the grid scrollLeft
- positionData.offset = 0;
- if (column.grid.options.offsetLeft) {
- positionData.offset = column.grid.options.offsetLeft;
- }
-
- positionData.height = gridUtil.elementHeight($columnElement, true);
- positionData.width = gridUtil.elementWidth($columnElement, true);
-
- return positionData;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:uiGridColumnMenuService
- * @name repositionMenu
- * @description Reposition the menu below the new column. If the menu has no child nodes
- * (i.e. it's not currently visible) then we guess it's width at 100, we'll be called again
- * later to fix it
- * @param {$scope} $scope the $scope from the uiGridColumnMenu
- * @param {GridCol} column the column we want to position below
- * @param {hash} positionData a hash containing left, top, offset, height, width
- * @param {element} $elm the column menu element that we want to reposition
- * @param {element} $columnElement the column element that we want to reposition underneath
- *
- */
- repositionMenu: function( $scope, column, positionData, $elm, $columnElement ) {
- var menu = $elm[0].querySelectorAll('.ui-grid-menu');
- var containerId = column.renderContainer ? column.renderContainer : 'body';
- var renderContainer = column.grid.renderContainers[containerId];
-
- // It's possible that the render container of the column we're attaching to is
- // offset from the grid (i.e. pinned containers), we need to get the difference in the offsetLeft
- // between the render container and the grid
- var renderContainerElm = gridUtil.closestElm($columnElement, '.ui-grid-render-container');
- var renderContainerOffset = renderContainerElm.getBoundingClientRect().left - $scope.grid.element[0].getBoundingClientRect().left;
-
- var containerScrollLeft = renderContainerElm.querySelectorAll('.ui-grid-viewport')[0].scrollLeft;
-
- // default value the last width for _this_ column, otherwise last width for _any_ column, otherwise default to 170
- var myWidth = column.lastMenuWidth ? column.lastMenuWidth : ( $scope.lastMenuWidth ? $scope.lastMenuWidth : 170);
- var paddingRight = column.lastMenuPaddingRight ? column.lastMenuPaddingRight : ( $scope.lastMenuPaddingRight ? $scope.lastMenuPaddingRight : 10);
-
- if ( menu.length !== 0 ){
- var mid = menu[0].querySelectorAll('.ui-grid-menu-mid');
- if ( mid.length !== 0 && !angular.element(mid).hasClass('ng-hide') ) {
- myWidth = gridUtil.elementWidth(menu, true);
- $scope.lastMenuWidth = myWidth;
- column.lastMenuWidth = myWidth;
-
- // TODO(c0bra): use padding-left/padding-right based on document direction (ltr/rtl), place menu on proper side
- // Get the column menu right padding
- paddingRight = parseInt(gridUtil.getStyles(angular.element(menu)[0])['paddingRight'], 10);
- $scope.lastMenuPaddingRight = paddingRight;
- column.lastMenuPaddingRight = paddingRight;
- }
- }
-
- var left = positionData.left + renderContainerOffset - containerScrollLeft + positionData.parentLeft + positionData.width - myWidth + paddingRight;
- if (left < positionData.offset){
- left = positionData.offset;
- }
-
- $elm.css('left', left + 'px');
- $elm.css('top', (positionData.top + positionData.height) + 'px');
- }
-
- };
-
- return service;
-}])
-
-
-.directive('uiGridColumnMenu', ['$timeout', 'gridUtil', 'uiGridConstants', 'uiGridColumnMenuService', '$document',
-function ($timeout, gridUtil, uiGridConstants, uiGridColumnMenuService, $document) {
-/**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridColumnMenu
- * @description Provides the column menu framework, leverages uiGridMenu underneath
- *
- */
-
- var uiGridColumnMenu = {
- priority: 0,
- scope: true,
- require: '^uiGrid',
- templateUrl: 'ui-grid/uiGridColumnMenu',
- replace: true,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var self = this;
-
- uiGridColumnMenuService.initialize( $scope, uiGridCtrl );
-
- $scope.defaultMenuItems = uiGridColumnMenuService.getDefaultMenuItems( $scope );
-
- // Set the menu items for use with the column menu. The user can later add additional items via the watch
- $scope.menuItems = $scope.defaultMenuItems;
- uiGridColumnMenuService.setColMenuItemWatch( $scope );
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.directive:uiGridColumnMenu
- * @name showMenu
- * @description Shows the column menu. If the menu is already displayed it
- * calls the menu to ask it to hide (it will animate), then it repositions the menu
- * to the right place whilst hidden (it will make an assumption on menu width),
- * then it asks the menu to show (it will animate), then it repositions the menu again
- * once we can calculate it's size.
- * @param {GridCol} column the column we want to position below
- * @param {element} $columnElement the column element we want to position below
- */
- $scope.showMenu = function(column, $columnElement, event) {
- // Swap to this column
- $scope.col = column;
-
- // Get the position information for the column element
- var colElementPosition = uiGridColumnMenuService.getColumnElementPosition( $scope, column, $columnElement );
-
- if ($scope.menuShown) {
- // we want to hide, then reposition, then show, but we want to wait for animations
- // we set a variable, and then rely on the menu-hidden event to call the reposition and show
- $scope.colElement = $columnElement;
- $scope.colElementPosition = colElementPosition;
- $scope.hideThenShow = true;
-
- $scope.$broadcast('hide-menu', { originalEvent: event });
- } else {
- self.shown = $scope.menuShown = true;
- uiGridColumnMenuService.repositionMenu( $scope, column, colElementPosition, $elm, $columnElement );
-
- $scope.colElement = $columnElement;
- $scope.colElementPosition = colElementPosition;
- $scope.$broadcast('show-menu', { originalEvent: event });
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.directive:uiGridColumnMenu
- * @name hideMenu
- * @description Hides the column menu.
- * @param {boolean} broadcastTrigger true if we were triggered by a broadcast
- * from the menu itself - in which case don't broadcast again as we'll get
- * an infinite loop
- */
- $scope.hideMenu = function( broadcastTrigger ) {
- $scope.menuShown = false;
- if ( !broadcastTrigger ){
- $scope.$broadcast('hide-menu');
- }
- };
-
-
- $scope.$on('menu-hidden', function() {
- if ( $scope.hideThenShow ){
- delete $scope.hideThenShow;
-
- uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement );
- $scope.$broadcast('show-menu');
-
- $scope.menuShown = true;
- } else {
- $scope.hideMenu( true );
-
- if ($scope.col) {
- //Focus on the menu button
- gridUtil.focus.bySelector($document, '.ui-grid-header-cell.' + $scope.col.getColClass()+ ' .ui-grid-column-menu-button', $scope.col.grid, false);
- }
- }
- });
-
- $scope.$on('menu-shown', function() {
- $timeout( function() {
- uiGridColumnMenuService.repositionMenu( $scope, $scope.col, $scope.colElementPosition, $elm, $scope.colElement );
- delete $scope.colElementPosition;
- delete $scope.columnElement;
- }, 200);
- });
-
-
- /* Column methods */
- $scope.sortColumn = function (event, dir) {
- event.stopPropagation();
-
- $scope.grid.sortColumn($scope.col, dir, true)
- .then(function () {
- $scope.grid.refresh();
- $scope.hideMenu();
- });
- };
-
- $scope.unsortColumn = function () {
- $scope.col.unsort();
-
- $scope.grid.refresh();
- $scope.hideMenu();
- };
-
- //Since we are hiding this column the default hide action will fail so we need to focus somewhere else.
- var setFocusOnHideColumn = function(){
- $timeout(function(){
- // Get the UID of the first
- var focusToGridMenu = function(){
- return gridUtil.focus.byId('grid-menu', $scope.grid);
- };
-
- var thisIndex;
- $scope.grid.columns.some(function(element, index){
- if (angular.equals(element, $scope.col)) {
- thisIndex = index;
- return true;
- }
- });
-
- var previousVisibleCol;
- // Try and find the next lower or nearest column to focus on
- $scope.grid.columns.some(function(element, index){
- if (!element.visible){
- return false;
- } // This columns index is below the current column index
- else if ( index < thisIndex){
- previousVisibleCol = element;
- } // This elements index is above this column index and we haven't found one that is lower
- else if ( index > thisIndex && !previousVisibleCol) {
- // This is the next best thing
- previousVisibleCol = element;
- // We've found one so use it.
- return true;
- } // We've reached an element with an index above this column and the previousVisibleCol variable has been set
- else if (index > thisIndex && previousVisibleCol) {
- // We are done.
- return true;
- }
- });
- // If found then focus on it
- if (previousVisibleCol){
- var colClass = previousVisibleCol.getColClass();
- gridUtil.focus.bySelector($document, '.ui-grid-header-cell.' + colClass+ ' .ui-grid-header-cell-primary-focus', true).then(angular.noop, function(reason){
- if (reason !== 'canceled'){ // If this is canceled then don't perform the action
- //The fallback action is to focus on the grid menu
- return focusToGridMenu();
- }
- });
- } else {
- // Fallback action to focus on the grid menu
- focusToGridMenu();
- }
- });
- };
-
- $scope.hideColumn = function () {
- $scope.col.colDef.visible = false;
- $scope.col.visible = false;
-
- $scope.grid.queueGridRefresh();
- $scope.hideMenu();
- $scope.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- $scope.grid.api.core.raise.columnVisibilityChanged( $scope.col );
-
- // We are hiding so the default action of focusing on the button that opened this menu will fail.
- setFocusOnHideColumn();
- };
- },
-
-
-
- controller: ['$scope', function ($scope) {
- var self = this;
-
- $scope.$watch('menuItems', function (n, o) {
- self.menuItems = n;
- });
- }]
- };
-
- return uiGridColumnMenu;
-
-}]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridFilter', ['$compile', '$templateCache', 'i18nService', 'gridUtil', function ($compile, $templateCache, i18nService, gridUtil) {
-
- return {
- compile: function() {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- $scope.col.updateFilters = function( filterable ){
- $elm.children().remove();
- if ( filterable ){
- var template = $scope.col.filterHeaderTemplate;
-
- $elm.append($compile(template)($scope));
- }
- };
-
- $scope.$on( '$destroy', function() {
- delete $scope.col.updateFilters;
- });
- },
- post: function ($scope, $elm, $attrs, controllers){
- $scope.aria = i18nService.getSafeText('headerCell.aria');
- $scope.removeFilter = function(colFilter, index){
- colFilter.term = null;
- //Set the focus to the filter input after the action disables the button
- gridUtil.focus.bySelector($elm, '.ui-grid-filter-input-' + index);
- };
- }
- };
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridFooterCell', ['$timeout', 'gridUtil', 'uiGridConstants', '$compile',
- function ($timeout, gridUtil, uiGridConstants, $compile) {
- var uiGridFooterCell = {
- priority: 0,
- scope: {
- col: '=',
- row: '=',
- renderIndex: '='
- },
- replace: true,
- require: '^uiGrid',
- compile: function compile(tElement, tAttrs, transclude) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var cellFooter = $compile($scope.col.footerCellTemplate)($scope);
- $elm.append(cellFooter);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- //$elm.addClass($scope.col.getColClass(false));
- $scope.grid = uiGridCtrl.grid;
-
- var initColClass = $scope.col.getColClass(false);
- $elm.addClass(initColClass);
-
- // apply any footerCellClass
- var classAdded;
- var updateClass = function( grid ){
- var contents = $elm;
- if ( classAdded ){
- contents.removeClass( classAdded );
- classAdded = null;
- }
-
- if (angular.isFunction($scope.col.footerCellClass)) {
- classAdded = $scope.col.footerCellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex);
- }
- else {
- classAdded = $scope.col.footerCellClass;
- }
- contents.addClass(classAdded);
- };
-
- if ($scope.col.footerCellClass) {
- updateClass();
- }
-
- $scope.col.updateAggregationValue();
-
- // Watch for column changes so we can alter the col cell class properly
-/* shouldn't be needed any more, given track by col.name
- $scope.$watch('col', function (n, o) {
- if (n !== o) {
- // See if the column's internal class has changed
- var newColClass = $scope.col.getColClass(false);
- if (newColClass !== initColClass) {
- $elm.removeClass(initColClass);
- $elm.addClass(newColClass);
- initColClass = newColClass;
- }
- }
- });
-*/
-
-
- // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( updateClass, [uiGridConstants.dataChange.COLUMN]);
- // listen for visible rows change and update aggregation values
- $scope.grid.api.core.on.rowsRendered( $scope, $scope.col.updateAggregationValue );
- $scope.grid.api.core.on.rowsRendered( $scope, updateClass );
- $scope.$on( '$destroy', dataChangeDereg );
- }
- };
- }
- };
-
- return uiGridFooterCell;
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridFooter', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($templateCache, $compile, uiGridConstants, gridUtil, $timeout) {
-
- return {
- restrict: 'EA',
- replace: true,
- // priority: 1000,
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: true,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- $scope.grid = uiGridCtrl.grid;
- $scope.colContainer = containerCtrl.colContainer;
-
- containerCtrl.footer = $elm;
-
- var footerTemplate = $scope.grid.options.footerTemplate;
- gridUtil.getTemplate(footerTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.append(newElm);
-
- if (containerCtrl) {
- // Inject a reference to the footer viewport (if it exists) into the grid controller for use in the horizontal scroll handler below
- var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0];
-
- if (footerViewport) {
- containerCtrl.footerViewport = footerViewport;
- }
- }
- });
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- // gridUtil.logDebug('ui-grid-footer link');
-
- var grid = uiGridCtrl.grid;
-
- // Don't animate footer cells
- gridUtil.disableAnimations($elm);
-
- containerCtrl.footer = $elm;
-
- var footerViewport = $elm[0].getElementsByClassName('ui-grid-footer-viewport')[0];
- if (footerViewport) {
- containerCtrl.footerViewport = footerViewport;
- }
- }
- };
- }
- };
- }]);
-
-})();
-(function () {
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridGridFooter', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', function ($templateCache, $compile, uiGridConstants, gridUtil, $timeout) {
-
- return {
- restrict: 'EA',
- replace: true,
- // priority: 1000,
- require: '^uiGrid',
- scope: true,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- $scope.grid = uiGridCtrl.grid;
-
-
-
- var footerTemplate = $scope.grid.options.gridFooterTemplate;
- gridUtil.getTemplate(footerTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.append(newElm);
- });
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
-
- }
- };
- }
- };
- }]);
-
-})();
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridGroupPanel', ["$compile", "uiGridConstants", "gridUtil", function($compile, uiGridConstants, gridUtil) {
- var defaultTemplate = 'ui-grid/ui-grid-group-panel';
-
- return {
- restrict: 'EA',
- replace: true,
- require: '?^uiGrid',
- scope: false,
- compile: function($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var groupPanelTemplate = $scope.grid.options.groupPanelTemplate || defaultTemplate;
-
- gridUtil.getTemplate(groupPanelTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.append(newElm);
- });
- },
-
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- $elm.bind('$destroy', function() {
- // scrollUnbinder();
- });
- }
- };
- }
- };
- }]);
-
-})();
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridHeaderCell', ['$compile', '$timeout', '$window', '$document', 'gridUtil', 'uiGridConstants', 'ScrollEvent', 'i18nService',
- function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, ScrollEvent, i18nService) {
- // Do stuff after mouse has been down this many ms on the header cell
- var mousedownTimeout = 500;
- var changeModeTimeout = 500; // length of time between a touch event and a mouse event being recognised again, and vice versa
-
- var uiGridHeaderCell = {
- priority: 0,
- scope: {
- col: '=',
- row: '=',
- renderIndex: '='
- },
- require: ['^uiGrid', '^uiGridRenderContainer'],
- replace: true,
- compile: function() {
- return {
- pre: function ($scope, $elm, $attrs) {
- var cellHeader = $compile($scope.col.headerCellTemplate)($scope);
- $elm.append(cellHeader);
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var renderContainerCtrl = controllers[1];
-
- $scope.i18n = {
- headerCell: i18nService.getSafeText('headerCell'),
- sort: i18nService.getSafeText('sort')
- };
- $scope.getSortDirectionAriaLabel = function(){
- var col = $scope.col;
- //Trying to recreate this sort of thing but it was getting messy having it in the template.
- //Sort direction {{col.sort.direction == asc ? 'ascending' : ( col.sort.direction == desc ? 'descending':'none')}}. {{col.sort.priority ? {{columnPriorityText}} {{col.sort.priority}} : ''}
- var sortDirectionText = col.sort.direction === uiGridConstants.ASC ? $scope.i18n.sort.ascending : ( col.sort.direction === uiGridConstants.DESC ? $scope.i18n.sort.descending : $scope.i18n.sort.none);
- var label = sortDirectionText;
- //Append the priority if it exists
- if (col.sort.priority) {
- label = label + '. ' + $scope.i18n.headerCell.priority + ' ' + col.sort.priority;
- }
- return label;
- };
-
- $scope.grid = uiGridCtrl.grid;
-
- $scope.renderContainer = uiGridCtrl.grid.renderContainers[renderContainerCtrl.containerId];
-
- var initColClass = $scope.col.getColClass(false);
- $elm.addClass(initColClass);
-
- // Hide the menu by default
- $scope.menuShown = false;
-
- // Put asc and desc sort directions in scope
- $scope.asc = uiGridConstants.ASC;
- $scope.desc = uiGridConstants.DESC;
-
- // Store a reference to menu element
- var $colMenu = angular.element( $elm[0].querySelectorAll('.ui-grid-header-cell-menu') );
-
- var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') );
-
-
- // apply any headerCellClass
- var classAdded;
- var previousMouseX;
-
- // filter watchers
- var filterDeregisters = [];
-
-
- /*
- * Our basic approach here for event handlers is that we listen for a down event (mousedown or touchstart).
- * Once we have a down event, we need to work out whether we have a click, a drag, or a
- * hold. A click would sort the grid (if sortable). A drag would be used by moveable, so
- * we ignore it. A hold would open the menu.
- *
- * So, on down event, we put in place handlers for move and up events, and a timer. If the
- * timer expires before we see a move or up, then we have a long press and hence a column menu open.
- * If the up happens before the timer, then we have a click, and we sort if the column is sortable.
- * If a move happens before the timer, then we are doing column move, so we do nothing, the moveable feature
- * will handle it.
- *
- * To deal with touch enabled devices that also have mice, we only create our handlers when
- * we get the down event, and we create the corresponding handlers - if we're touchstart then
- * we get touchmove and touchend, if we're mousedown then we get mousemove and mouseup.
- *
- * We also suppress the click action whilst this is happening - otherwise after the mouseup there
- * will be a click event and that can cause the column menu to close
- *
- */
-
- $scope.downFn = function( event ){
- event.stopPropagation();
-
- if (typeof(event.originalEvent) !== 'undefined' && event.originalEvent !== undefined) {
- event = event.originalEvent;
- }
-
- // Don't show the menu if it's not the left button
- if (event.button && event.button !== 0) {
- return;
- }
- previousMouseX = event.pageX;
-
- $scope.mousedownStartTime = (new Date()).getTime();
- $scope.mousedownTimeout = $timeout(function() { }, mousedownTimeout);
-
- $scope.mousedownTimeout.then(function () {
- if ( $scope.colMenu ) {
- uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm, event);
- }
- });
-
- uiGridCtrl.fireEvent(uiGridConstants.events.COLUMN_HEADER_CLICK, {event: event, columnName: $scope.col.colDef.name});
-
- $scope.offAllEvents();
- if ( event.type === 'touchstart'){
- $document.on('touchend', $scope.upFn);
- $document.on('touchmove', $scope.moveFn);
- } else if ( event.type === 'mousedown' ){
- $document.on('mouseup', $scope.upFn);
- $document.on('mousemove', $scope.moveFn);
- }
- };
-
- $scope.upFn = function( event ){
- event.stopPropagation();
- $timeout.cancel($scope.mousedownTimeout);
- $scope.offAllEvents();
- $scope.onDownEvents(event.type);
-
- var mousedownEndTime = (new Date()).getTime();
- var mousedownTime = mousedownEndTime - $scope.mousedownStartTime;
-
- if (mousedownTime > mousedownTimeout) {
- // long click, handled above with mousedown
- }
- else {
- // short click
- if ( $scope.sortable ){
- $scope.handleClick(event);
- }
- }
- };
-
- $scope.moveFn = function( event ){
- // Chrome is known to fire some bogus move events.
- var changeValue = event.pageX - previousMouseX;
- if ( changeValue === 0 ){ return; }
-
- // we're a move, so do nothing and leave for column move (if enabled) to take over
- $timeout.cancel($scope.mousedownTimeout);
- $scope.offAllEvents();
- $scope.onDownEvents(event.type);
- };
-
- $scope.clickFn = function ( event ){
- event.stopPropagation();
- $contentsElm.off('click', $scope.clickFn);
- };
-
-
- $scope.offAllEvents = function(){
- $contentsElm.off('touchstart', $scope.downFn);
- $contentsElm.off('mousedown', $scope.downFn);
-
- $document.off('touchend', $scope.upFn);
- $document.off('mouseup', $scope.upFn);
-
- $document.off('touchmove', $scope.moveFn);
- $document.off('mousemove', $scope.moveFn);
-
- $contentsElm.off('click', $scope.clickFn);
- };
-
- $scope.onDownEvents = function( type ){
- // If there is a previous event, then wait a while before
- // activating the other mode - i.e. if the last event was a touch event then
- // don't enable mouse events for a wee while (500ms or so)
- // Avoids problems with devices that emulate mouse events when you have touch events
-
- switch (type){
- case 'touchmove':
- case 'touchend':
- $contentsElm.on('click', $scope.clickFn);
- $contentsElm.on('touchstart', $scope.downFn);
- $timeout(function(){
- $contentsElm.on('mousedown', $scope.downFn);
- }, changeModeTimeout);
- break;
- case 'mousemove':
- case 'mouseup':
- $contentsElm.on('click', $scope.clickFn);
- $contentsElm.on('mousedown', $scope.downFn);
- $timeout(function(){
- $contentsElm.on('touchstart', $scope.downFn);
- }, changeModeTimeout);
- break;
- default:
- $contentsElm.on('click', $scope.clickFn);
- $contentsElm.on('touchstart', $scope.downFn);
- $contentsElm.on('mousedown', $scope.downFn);
- }
- };
-
-
- var updateHeaderOptions = function( grid ){
- var contents = $elm;
- if ( classAdded ){
- contents.removeClass( classAdded );
- classAdded = null;
- }
-
- if (angular.isFunction($scope.col.headerCellClass)) {
- classAdded = $scope.col.headerCellClass($scope.grid, $scope.row, $scope.col, $scope.rowRenderIndex, $scope.colRenderIndex);
- }
- else {
- classAdded = $scope.col.headerCellClass;
- }
- contents.addClass(classAdded);
-
- var rightMostContainer = $scope.grid.renderContainers['right'] ? $scope.grid.renderContainers['right'] : $scope.grid.renderContainers['body'];
- $scope.isLastCol = ( $scope.col === rightMostContainer.visibleColumnCache[ rightMostContainer.visibleColumnCache.length - 1 ] );
-
- // Figure out whether this column is sortable or not
- if (uiGridCtrl.grid.options.enableSorting && $scope.col.enableSorting) {
- $scope.sortable = true;
- }
- else {
- $scope.sortable = false;
- }
-
- // Figure out whether this column is filterable or not
- var oldFilterable = $scope.filterable;
- if (uiGridCtrl.grid.options.enableFiltering && $scope.col.enableFiltering) {
- $scope.filterable = true;
- }
- else {
- $scope.filterable = false;
- }
-
- if ( oldFilterable !== $scope.filterable){
- if ( typeof($scope.col.updateFilters) !== 'undefined' ){
- $scope.col.updateFilters($scope.filterable);
- }
-
- // if column is filterable add a filter watcher
- if ($scope.filterable) {
- $scope.col.filters.forEach( function(filter, i) {
- filterDeregisters.push($scope.$watch('col.filters[' + i + '].term', function(n, o) {
- if (n !== o) {
- uiGridCtrl.grid.api.core.raise.filterChanged();
- uiGridCtrl.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- uiGridCtrl.grid.queueGridRefresh();
- }
- }));
- });
- $scope.$on('$destroy', function() {
- filterDeregisters.forEach( function(filterDeregister) {
- filterDeregister();
- });
- });
- } else {
- filterDeregisters.forEach( function(filterDeregister) {
- filterDeregister();
- });
- }
-
- }
-
- // figure out whether we support column menus
- if ($scope.col.grid.options && $scope.col.grid.options.enableColumnMenus !== false &&
- $scope.col.colDef && $scope.col.colDef.enableColumnMenu !== false){
- $scope.colMenu = true;
- } else {
- $scope.colMenu = false;
- }
-
- /**
- * @ngdoc property
- * @name enableColumnMenu
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description if column menus are enabled, controls the column menus for this specific
- * column (i.e. if gridOptions.enableColumnMenus, then you can control column menus
- * using this option. If gridOptions.enableColumnMenus === false then you get no column
- * menus irrespective of the value of this option ). Defaults to true.
- *
- */
- /**
- * @ngdoc property
- * @name enableColumnMenus
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Override for column menus everywhere - if set to false then you get no
- * column menus. Defaults to true.
- *
- */
-
- $scope.offAllEvents();
-
- if ($scope.sortable || $scope.colMenu) {
- $scope.onDownEvents();
-
- $scope.$on('$destroy', function () {
- $scope.offAllEvents();
- });
- }
- };
-
-/*
- $scope.$watch('col', function (n, o) {
- if (n !== o) {
- // See if the column's internal class has changed
- var newColClass = $scope.col.getColClass(false);
- if (newColClass !== initColClass) {
- $elm.removeClass(initColClass);
- $elm.addClass(newColClass);
- initColClass = newColClass;
- }
- }
- });
-*/
- updateHeaderOptions();
-
- // Register a data change watch that would get triggered whenever someone edits a cell or modifies column defs
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( updateHeaderOptions, [uiGridConstants.dataChange.COLUMN]);
-
- $scope.$on( '$destroy', dataChangeDereg );
-
- $scope.handleClick = function(event) {
- // If the shift key is being held down, add this column to the sort
- var add = false;
- if (event.shiftKey) {
- add = true;
- }
-
- // Sort this column then rebuild the grid's rows
- uiGridCtrl.grid.sortColumn($scope.col, add)
- .then(function () {
- if (uiGridCtrl.columnMenuScope) { uiGridCtrl.columnMenuScope.hideMenu(); }
- uiGridCtrl.grid.refresh();
- });
- };
-
-
- $scope.toggleMenu = function(event) {
- event.stopPropagation();
-
- // If the menu is already showing...
- if (uiGridCtrl.columnMenuScope.menuShown) {
- // ... and we're the column the menu is on...
- if (uiGridCtrl.columnMenuScope.col === $scope.col) {
- // ... hide it
- uiGridCtrl.columnMenuScope.hideMenu();
- }
- // ... and we're NOT the column the menu is on
- else {
- // ... move the menu to our column
- uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm);
- }
- }
- // If the menu is NOT showing
- else {
- // ... show it on our column
- uiGridCtrl.columnMenuScope.showMenu($scope.col, $elm);
- }
- };
- }
- };
- }
- };
-
- return uiGridHeaderCell;
- }]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridHeader', ['$templateCache', '$compile', 'uiGridConstants', 'gridUtil', '$timeout', 'ScrollEvent',
- function($templateCache, $compile, uiGridConstants, gridUtil, $timeout, ScrollEvent) {
- var defaultTemplate = 'ui-grid/ui-grid-header';
- var emptyTemplate = 'ui-grid/ui-grid-no-header';
-
- return {
- restrict: 'EA',
- // templateUrl: 'ui-grid/ui-grid-header',
- replace: true,
- // priority: 1000,
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: true,
- compile: function($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- $scope.grid = uiGridCtrl.grid;
- $scope.colContainer = containerCtrl.colContainer;
-
- updateHeaderReferences();
-
- var headerTemplate;
- if (!$scope.grid.options.showHeader) {
- headerTemplate = emptyTemplate;
- }
- else {
- headerTemplate = ($scope.grid.options.headerTemplate) ? $scope.grid.options.headerTemplate : defaultTemplate;
- }
-
- gridUtil.getTemplate(headerTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.replaceWith(newElm);
-
- // And update $elm to be the new element
- $elm = newElm;
-
- updateHeaderReferences();
-
- if (containerCtrl) {
- // Inject a reference to the header viewport (if it exists) into the grid controller for use in the horizontal scroll handler below
- var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0];
-
-
- if (headerViewport) {
- containerCtrl.headerViewport = headerViewport;
- angular.element(headerViewport).on('scroll', scrollHandler);
- $scope.$on('$destroy', function () {
- angular.element(headerViewport).off('scroll', scrollHandler);
- });
- }
- }
-
- $scope.grid.queueRefresh();
- });
-
- function updateHeaderReferences() {
- containerCtrl.header = containerCtrl.colContainer.header = $elm;
-
- var headerCanvases = $elm[0].getElementsByClassName('ui-grid-header-canvas');
-
- if (headerCanvases.length > 0) {
- containerCtrl.headerCanvas = containerCtrl.colContainer.headerCanvas = headerCanvases[0];
- }
- else {
- containerCtrl.headerCanvas = null;
- }
- }
-
- function scrollHandler(evt) {
- if (uiGridCtrl.grid.isScrollingHorizontally) {
- return;
- }
- var newScrollLeft = gridUtil.normalizeScrollLeft(containerCtrl.headerViewport, uiGridCtrl.grid);
- var horizScrollPercentage = containerCtrl.colContainer.scrollHorizontal(newScrollLeft);
-
- var scrollEvent = new ScrollEvent(uiGridCtrl.grid, null, containerCtrl.colContainer, ScrollEvent.Sources.ViewPortScroll);
- scrollEvent.newScrollLeft = newScrollLeft;
- if ( horizScrollPercentage > -1 ){
- scrollEvent.x = { percentage: horizScrollPercentage };
- }
-
- uiGridCtrl.grid.scrollContainers(null, scrollEvent);
- }
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- // gridUtil.logDebug('ui-grid-header link');
-
- var grid = uiGridCtrl.grid;
-
- // Don't animate header cells
- gridUtil.disableAnimations($elm);
-
- function updateColumnWidths() {
- // this styleBuilder always runs after the renderContainer, so we can rely on the column widths
- // already being populated correctly
-
- var columnCache = containerCtrl.colContainer.visibleColumnCache;
-
- // Build the CSS
- // uiGridCtrl.grid.columns.forEach(function (column) {
- var ret = '';
- var canvasWidth = 0;
- columnCache.forEach(function (column) {
- ret = ret + column.getColClassDefinition();
- canvasWidth += column.drawnWidth;
- });
-
- containerCtrl.colContainer.canvasWidth = canvasWidth;
-
- // Return the styles back to buildStyles which pops them into the `customStyles` scope variable
- return ret;
- }
-
- containerCtrl.header = $elm;
-
- var headerViewport = $elm[0].getElementsByClassName('ui-grid-header-viewport')[0];
- if (headerViewport) {
- containerCtrl.headerViewport = headerViewport;
- }
-
- //todo: remove this if by injecting gridCtrl into unit tests
- if (uiGridCtrl) {
- uiGridCtrl.grid.registerStyleComputation({
- priority: 15,
- func: updateColumnWidths
- });
- }
- }
- };
- }
- };
- }]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.service('uiGridGridMenuService', [ 'gridUtil', 'i18nService', 'uiGridConstants', function( gridUtil, i18nService, uiGridConstants ) {
- /**
- * @ngdoc service
- * @name ui.grid.gridMenuService
- *
- * @description Methods for working with the grid menu
- */
-
- var service = {
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name initialize
- * @description Sets up the gridMenu. Most importantly, sets our
- * scope onto the grid object as grid.gridMenuScope, allowing us
- * to operate when passed only the grid. Second most importantly,
- * we register the 'addToGridMenu' and 'removeFromGridMenu' methods
- * on the core api.
- * @param {$scope} $scope the scope of this gridMenu
- * @param {Grid} grid the grid to which this gridMenu is associated
- */
- initialize: function( $scope, grid ){
- grid.gridMenuScope = $scope;
- $scope.grid = grid;
- $scope.registeredMenuItems = [];
-
- // not certain this is needed, but would be bad to create a memory leak
- $scope.$on('$destroy', function() {
- if ( $scope.grid && $scope.grid.gridMenuScope ){
- $scope.grid.gridMenuScope = null;
- }
- if ( $scope.grid ){
- $scope.grid = null;
- }
- if ( $scope.registeredMenuItems ){
- $scope.registeredMenuItems = null;
- }
- });
-
- $scope.registeredMenuItems = [];
-
- /**
- * @ngdoc function
- * @name addToGridMenu
- * @methodOf ui.grid.core.api:PublicApi
- * @description add items to the grid menu. Used by features
- * to add their menu items if they are enabled, can also be used by
- * end users to add menu items. This method has the advantage of allowing
- * remove again, which can simplify management of which items are included
- * in the menu when. (Noting that in most cases the shown and active functions
- * provide a better way to handle visibility of menu items)
- * @param {Grid} grid the grid on which we are acting
- * @param {array} items menu items in the format as described in the tutorial, with
- * the added note that if you want to use remove you must also specify an `id` field,
- * which is provided when you want to remove an item. The id should be unique.
- *
- */
- grid.api.registerMethod( 'core', 'addToGridMenu', service.addToGridMenu );
-
- /**
- * @ngdoc function
- * @name removeFromGridMenu
- * @methodOf ui.grid.core.api:PublicApi
- * @description Remove an item from the grid menu based on a provided id. Assumes
- * that the id is unique, removes only the last instance of that id. Does nothing if
- * the specified id is not found
- * @param {Grid} grid the grid on which we are acting
- * @param {string} id the id we'd like to remove from the menu
- *
- */
- grid.api.registerMethod( 'core', 'removeFromGridMenu', service.removeFromGridMenu );
- },
-
-
- /**
- * @ngdoc function
- * @name addToGridMenu
- * @propertyOf ui.grid.gridMenuService
- * @description add items to the grid menu. Used by features
- * to add their menu items if they are enabled, can also be used by
- * end users to add menu items. This method has the advantage of allowing
- * remove again, which can simplify management of which items are included
- * in the menu when. (Noting that in most cases the shown and active functions
- * provide a better way to handle visibility of menu items)
- * @param {Grid} grid the grid on which we are acting
- * @param {array} items menu items in the format as described in the tutorial, with
- * the added note that if you want to use remove you must also specify an `id` field,
- * which is provided when you want to remove an item. The id should be unique.
- *
- */
- addToGridMenu: function( grid, menuItems ) {
- if ( !angular.isArray( menuItems ) ) {
- gridUtil.logError( 'addToGridMenu: menuItems must be an array, and is not, not adding any items');
- } else {
- if ( grid.gridMenuScope ){
- grid.gridMenuScope.registeredMenuItems = grid.gridMenuScope.registeredMenuItems ? grid.gridMenuScope.registeredMenuItems : [];
- grid.gridMenuScope.registeredMenuItems = grid.gridMenuScope.registeredMenuItems.concat( menuItems );
- } else {
- gridUtil.logError( 'Asked to addToGridMenu, but gridMenuScope not present. Timing issue? Please log issue with ui-grid');
- }
- }
- },
-
-
- /**
- * @ngdoc function
- * @name removeFromGridMenu
- * @methodOf ui.grid.gridMenuService
- * @description Remove an item from the grid menu based on a provided id. Assumes
- * that the id is unique, removes only the last instance of that id. Does nothing if
- * the specified id is not found. If there is no gridMenuScope or registeredMenuItems
- * then do nothing silently - the desired result is those menu items not be present and they
- * aren't.
- * @param {Grid} grid the grid on which we are acting
- * @param {string} id the id we'd like to remove from the menu
- *
- */
- removeFromGridMenu: function( grid, id ){
- var foundIndex = -1;
-
- if ( grid && grid.gridMenuScope ){
- grid.gridMenuScope.registeredMenuItems.forEach( function( value, index ) {
- if ( value.id === id ){
- if (foundIndex > -1) {
- gridUtil.logError( 'removeFromGridMenu: found multiple items with the same id, removing only the last' );
- } else {
-
- foundIndex = index;
- }
- }
- });
- }
-
- if ( foundIndex > -1 ){
- grid.gridMenuScope.registeredMenuItems.splice( foundIndex, 1 );
- }
- },
-
-
- /**
- * @ngdoc array
- * @name gridMenuCustomItems
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) An array of menu items that should be added to
- * the gridMenu. Follow the format documented in the tutorial for column
- * menu customisation. The context provided to the action function will
- * include context.grid. An alternative if working with dynamic menus is to use the
- * provided api - core.addToGridMenu and core.removeFromGridMenu, which handles
- * some of the management of items for you.
- *
- */
- /**
- * @ngdoc boolean
- * @name gridMenuShowHideColumns
- * @propertyOf ui.grid.class:GridOptions
- * @description true by default, whether the grid menu should allow hide/show
- * of columns
- *
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name getMenuItems
- * @description Decides the menu items to show in the menu. This is a
- * combination of:
- *
- * - the default menu items that are always included,
- * - any menu items that have been provided through the addMenuItem api. These
- * are typically added by features within the grid
- * - any menu items included in grid.options.gridMenuCustomItems. These can be
- * changed dynamically, as they're always recalculated whenever we show the
- * menu
- * @param {$scope} $scope the scope of this gridMenu, from which we can find all
- * the information that we need
- * @returns {array} an array of menu items that can be shown
- */
- getMenuItems: function( $scope ) {
- var menuItems = [
- // this is where we add any menu items we want to always include
- ];
-
- if ( $scope.grid.options.gridMenuCustomItems ){
- if ( !angular.isArray( $scope.grid.options.gridMenuCustomItems ) ){
- gridUtil.logError( 'gridOptions.gridMenuCustomItems must be an array, and is not');
- } else {
- menuItems = menuItems.concat( $scope.grid.options.gridMenuCustomItems );
- }
- }
-
- var clearFilters = [{
- title: i18nService.getSafeText('gridMenu.clearAllFilters'),
- action: function ($event) {
- $scope.grid.clearAllFilters(undefined, true, undefined);
- },
- shown: function() {
- return $scope.grid.options.enableFiltering;
- },
- order: 100
- }];
- menuItems = menuItems.concat( clearFilters );
-
- menuItems = menuItems.concat( $scope.registeredMenuItems );
-
- if ( $scope.grid.options.gridMenuShowHideColumns !== false ){
- menuItems = menuItems.concat( service.showHideColumns( $scope ) );
- }
-
- menuItems.sort(function(a, b){
- return a.order - b.order;
- });
-
- return menuItems;
- },
-
-
- /**
- * @ngdoc array
- * @name gridMenuTitleFilter
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) A function that takes a title string
- * (usually the col.displayName), and converts it into a display value. The function
- * must return either a string or a promise.
- *
- * Used for internationalization of the grid menu column names - for angular-translate
- * you can pass $translate as the function, for i18nService you can pass getSafeText as the
- * function
- * @example
- * <pre>
- * gridOptions = {
- * gridMenuTitleFilter: $translate
- * }
- * </pre>
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name showHideColumns
- * @description Adds two menu items for each of the columns in columnDefs. One
- * menu item for hide, one menu item for show. Each is visible when appropriate
- * (show when column is not visible, hide when column is visible). Each toggles
- * the visible property on the columnDef using toggleColumnVisibility
- * @param {$scope} $scope of a gridMenu, which contains a reference to the grid
- */
- showHideColumns: function( $scope ){
- var showHideColumns = [];
- if ( !$scope.grid.options.columnDefs || $scope.grid.options.columnDefs.length === 0 || $scope.grid.columns.length === 0 ) {
- return showHideColumns;
- }
-
- // add header for columns
- showHideColumns.push({
- title: i18nService.getSafeText('gridMenu.columns'),
- order: 300
- });
-
- $scope.grid.options.gridMenuTitleFilter = $scope.grid.options.gridMenuTitleFilter ? $scope.grid.options.gridMenuTitleFilter : function( title ) { return title; };
-
- $scope.grid.options.columnDefs.forEach( function( colDef, index ){
- if ( colDef.enableHiding !== false ){
- // add hide menu item - shows an OK icon as we only show when column is already visible
- var menuItem = {
- icon: 'ui-grid-icon-ok',
- action: function($event) {
- $event.stopPropagation();
- service.toggleColumnVisibility( this.context.gridCol );
- },
- shown: function() {
- return this.context.gridCol.colDef.visible === true || this.context.gridCol.colDef.visible === undefined;
- },
- context: { gridCol: $scope.grid.getColumn(colDef.name || colDef.field) },
- leaveOpen: true,
- order: 301 + index * 2
- };
- service.setMenuItemTitle( menuItem, colDef, $scope.grid );
- showHideColumns.push( menuItem );
-
- // add show menu item - shows no icon as we only show when column is invisible
- menuItem = {
- icon: 'ui-grid-icon-cancel',
- action: function($event) {
- $event.stopPropagation();
- service.toggleColumnVisibility( this.context.gridCol );
- },
- shown: function() {
- return !(this.context.gridCol.colDef.visible === true || this.context.gridCol.colDef.visible === undefined);
- },
- context: { gridCol: $scope.grid.getColumn(colDef.name || colDef.field) },
- leaveOpen: true,
- order: 301 + index * 2 + 1
- };
- service.setMenuItemTitle( menuItem, colDef, $scope.grid );
- showHideColumns.push( menuItem );
- }
- });
- return showHideColumns;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name setMenuItemTitle
- * @description Handles the response from gridMenuTitleFilter, adding it directly to the menu
- * item if it returns a string, otherwise waiting for the promise to resolve or reject then
- * putting the result into the title
- * @param {object} menuItem the menuItem we want to put the title on
- * @param {object} colDef the colDef from which we can get displayName, name or field
- * @param {Grid} grid the grid, from which we can get the options.gridMenuTitleFilter
- *
- */
- setMenuItemTitle: function( menuItem, colDef, grid ){
- var title = grid.options.gridMenuTitleFilter( colDef.displayName || gridUtil.readableColumnName(colDef.name) || colDef.field );
-
- if ( typeof(title) === 'string' ){
- menuItem.title = title;
- } else if ( title.then ){
- // must be a promise
- menuItem.title = "";
- title.then( function( successValue ) {
- menuItem.title = successValue;
- }, function( errorValue ) {
- menuItem.title = errorValue;
- });
- } else {
- gridUtil.logError('Expected gridMenuTitleFilter to return a string or a promise, it has returned neither, bad config');
- menuItem.title = 'badconfig';
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.gridMenuService
- * @name toggleColumnVisibility
- * @description Toggles the visibility of an individual column. Expects to be
- * provided a context that has on it a gridColumn, which is the column that
- * we'll operate upon. We change the visibility, and refresh the grid as appropriate
- * @param {GridCol} gridCol the column that we want to toggle
- *
- */
- toggleColumnVisibility: function( gridCol ) {
- gridCol.colDef.visible = !( gridCol.colDef.visible === true || gridCol.colDef.visible === undefined );
-
- gridCol.grid.refresh();
- gridCol.grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- gridCol.grid.api.core.raise.columnVisibilityChanged( gridCol );
- }
- };
-
- return service;
-}])
-
-
-
-.directive('uiGridMenuButton', ['gridUtil', 'uiGridConstants', 'uiGridGridMenuService', 'i18nService',
-function (gridUtil, uiGridConstants, uiGridGridMenuService, i18nService) {
-
- return {
- priority: 0,
- scope: true,
- require: ['^uiGrid'],
- templateUrl: 'ui-grid/ui-grid-menu-button',
- replace: true,
-
- link: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
-
- // For the aria label
- $scope.i18n = {
- aria: i18nService.getSafeText('gridMenu.aria')
- };
-
- uiGridGridMenuService.initialize($scope, uiGridCtrl.grid);
-
- $scope.shown = false;
-
- $scope.toggleMenu = function () {
- if ( $scope.shown ){
- $scope.$broadcast('hide-menu');
- $scope.shown = false;
- } else {
- $scope.menuItems = uiGridGridMenuService.getMenuItems( $scope );
- $scope.$broadcast('show-menu');
- $scope.shown = true;
- }
- };
-
- $scope.$on('menu-hidden', function() {
- $scope.shown = false;
- gridUtil.focus.bySelector($elm, '.ui-grid-icon-container');
- });
- }
- };
-
-}]);
-
-})();
-
-(function(){
-
-/**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridMenu
- * @element style
- * @restrict A
- *
- * @description
- * Allows us to interpolate expressions in `<style>` elements. Angular doesn't do this by default as it can/will/might? break in IE8.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
-
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <div ui-grid-menu shown="true" ></div>
- </div>
- </doc:source>
- <doc:scenario>
- </doc:scenario>
- </doc:example>
- */
-angular.module('ui.grid')
-
-.directive('uiGridMenu', ['$compile', '$timeout', '$window', '$document', 'gridUtil', 'uiGridConstants', 'i18nService',
-function ($compile, $timeout, $window, $document, gridUtil, uiGridConstants, i18nService) {
- var uiGridMenu = {
- priority: 0,
- scope: {
- // shown: '&',
- menuItems: '=',
- autoHide: '=?'
- },
- require: '?^uiGrid',
- templateUrl: 'ui-grid/uiGridMenu',
- replace: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var self = this;
- var menuMid;
- var $animate;
-
- $scope.i18n = {
- close: i18nService.getSafeText('columnMenu.close')
- };
-
- // *** Show/Hide functions ******
- self.showMenu = $scope.showMenu = function(event, args) {
- if ( !$scope.shown ){
-
- /*
- * In order to animate cleanly we remove the ng-if, wait a digest cycle, then
- * animate the removal of the ng-hide. We can't successfully (so far as I can tell)
- * animate removal of the ng-if, as the menu items aren't there yet. And we don't want
- * to rely on ng-show only, as that leaves elements in the DOM that are needlessly evaluated
- * on scroll events.
- *
- * Note when testing animation that animations don't run on the tutorials. When debugging it looks
- * like they do, but angular has a default $animate provider that is just a stub, and that's what's
- * being called. ALso don't be fooled by the fact that your browser has actually loaded the
- * angular-translate.js, it's not using it. You need to test animations in an external application.
- */
- $scope.shown = true;
-
- $timeout( function() {
- $scope.shownMid = true;
- $scope.$emit('menu-shown');
- });
- } else if ( !$scope.shownMid ) {
- // we're probably doing a hide then show, so we don't need to wait for ng-if
- $scope.shownMid = true;
- $scope.$emit('menu-shown');
- }
-
- var docEventType = 'click';
- if (args && args.originalEvent && args.originalEvent.type && args.originalEvent.type === 'touchstart') {
- docEventType = args.originalEvent.type;
- }
-
- // Turn off an existing document click handler
- angular.element(document).off('click touchstart', applyHideMenu);
-
- // Turn on the document click handler, but in a timeout so it doesn't apply to THIS click if there is one
- $timeout(function() {
- angular.element(document).on(docEventType, applyHideMenu);
- });
- //automatically set the focus to the first button element in the now open menu.
- gridUtil.focus.bySelector($elm, 'button[type=button]', true);
- };
-
-
- self.hideMenu = $scope.hideMenu = function(event, args) {
- if ( $scope.shown ){
- /*
- * In order to animate cleanly we animate the addition of ng-hide, then use a $timeout to
- * set the ng-if (shown = false) after the animation runs. In theory we can cascade off the
- * callback on the addClass method, but it is very unreliable with unit tests for no discernable reason.
- *
- * The user may have clicked on the menu again whilst
- * we're waiting, so we check that the mid isn't shown before applying the ng-if.
- */
- $scope.shownMid = false;
- $timeout( function() {
- if ( !$scope.shownMid ){
- $scope.shown = false;
- $scope.$emit('menu-hidden');
- }
- }, 200);
- }
-
- angular.element(document).off('click touchstart', applyHideMenu);
- };
-
- $scope.$on('hide-menu', function (event, args) {
- $scope.hideMenu(event, args);
- });
-
- $scope.$on('show-menu', function (event, args) {
- $scope.showMenu(event, args);
- });
-
-
- // *** Auto hide when click elsewhere ******
- var applyHideMenu = function(){
- if ($scope.shown) {
- $scope.$apply(function () {
- $scope.hideMenu();
- });
- }
- };
-
- if (typeof($scope.autoHide) === 'undefined' || $scope.autoHide === undefined) {
- $scope.autoHide = true;
- }
-
- if ($scope.autoHide) {
- angular.element($window).on('resize', applyHideMenu);
- }
-
- $scope.$on('$destroy', function () {
- angular.element(document).off('click touchstart', applyHideMenu);
- });
-
-
- $scope.$on('$destroy', function() {
- angular.element($window).off('resize', applyHideMenu);
- });
-
- if (uiGridCtrl) {
- $scope.$on('$destroy', uiGridCtrl.grid.api.core.on.scrollBegin($scope, applyHideMenu ));
- }
-
- $scope.$on('$destroy', $scope.$on(uiGridConstants.events.ITEM_DRAGGING, applyHideMenu ));
- },
-
-
- controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {
- var self = this;
- }]
- };
-
- return uiGridMenu;
-}])
-
-.directive('uiGridMenuItem', ['gridUtil', '$compile', 'i18nService', function (gridUtil, $compile, i18nService) {
- var uiGridMenuItem = {
- priority: 0,
- scope: {
- name: '=',
- active: '=',
- action: '=',
- icon: '=',
- shown: '=',
- context: '=',
- templateUrl: '=',
- leaveOpen: '=',
- screenReaderOnly: '='
- },
- require: ['?^uiGrid', '^uiGridMenu'],
- templateUrl: 'ui-grid/uiGridMenuItem',
- replace: false,
- compile: function($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- uiGridMenuCtrl = controllers[1];
-
- if ($scope.templateUrl) {
- gridUtil.getTemplate($scope.templateUrl)
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
- $elm.replaceWith(newElm);
- });
- }
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- uiGridMenuCtrl = controllers[1];
-
- // TODO(c0bra): validate that shown and active are functions if they're defined. An exception is already thrown above this though
- // if (typeof($scope.shown) !== 'undefined' && $scope.shown && typeof($scope.shown) !== 'function') {
- // throw new TypeError("$scope.shown is defined but not a function");
- // }
- if (typeof($scope.shown) === 'undefined' || $scope.shown === null) {
- $scope.shown = function() { return true; };
- }
-
- $scope.itemShown = function () {
- var context = {};
- if ($scope.context) {
- context.context = $scope.context;
- }
-
- if (typeof(uiGridCtrl) !== 'undefined' && uiGridCtrl) {
- context.grid = uiGridCtrl.grid;
- }
-
- return $scope.shown.call(context);
- };
-
- $scope.itemAction = function($event,title) {
- gridUtil.logDebug('itemAction');
- $event.stopPropagation();
-
- if (typeof($scope.action) === 'function') {
- var context = {};
-
- if ($scope.context) {
- context.context = $scope.context;
- }
-
- // Add the grid to the function call context if the uiGrid controller is present
- if (typeof(uiGridCtrl) !== 'undefined' && uiGridCtrl) {
- context.grid = uiGridCtrl.grid;
- }
-
- $scope.action.call(context, $event, title);
-
- if ( !$scope.leaveOpen ){
- $scope.$emit('hide-menu');
- } else {
- /*
- * XXX: Fix after column refactor
- * Ideally the focus would remain on the item.
- * However, since there are two menu items that have their 'show' property toggled instead. This is a quick fix.
- */
- gridUtil.focus.bySelector(angular.element(gridUtil.closestElm($elm, ".ui-grid-menu-items")), 'button[type=button]', true);
- }
- }
- };
-
- $scope.i18n = i18nService.get();
- }
- };
- }
- };
-
- return uiGridMenuItem;
-}]);
-
-})();
-
-(function(){
- 'use strict';
- /**
- * @ngdoc overview
- * @name ui.grid.directive:uiGridOneBind
- * @summary A group of directives that provide a one time bind to a dom element.
- * @description A group of directives that provide a one time bind to a dom element.
- * As one time bindings are not supported in Angular 1.2.* this directive provdes this capability.
- * This is done to reduce the number of watchers on the dom.
- * <br/>
- * <h2>Short Example ({@link ui.grid.directive:uiGridOneBindSrc ui-grid-one-bind-src})</h2>
- * <pre>
- <div ng-init="imageName = 'myImageDir.jpg'">
- <img ui-grid-one-bind-src="imageName"></img>
- </div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="imageName = 'myImageDir.jpg'">
- <img ui-grid-one-bind-src="imageName" src="myImageDir.jpg"></img>
- </div>
- </pre>
- </br>
- <h2>Short Example ({@link ui.grid.directive:uiGridOneBindText ui-grid-one-bind-text})</h2>
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-text="text"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-text="text">Add this text</div>
- </pre>
- </br>
- * <b>Note:</b> This behavior is slightly different for the {@link ui.grid.directive:uiGridOneBindIdGrid uiGridOneBindIdGrid}
- * and {@link ui.grid.directive:uiGridOneBindAriaLabelledbyGrid uiGridOneBindAriaLabelledbyGrid} directives.
- *
- */
- //https://github.com/joshkurz/Black-Belt-AngularJS-Directives/blob/master/directives/Optimization/oneBind.js
- var oneBinders = angular.module('ui.grid');
- angular.forEach([
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindSrc
- * @memberof ui.grid.directive:uiGridOneBind
- * @element img
- * @restrict A
- * @param {String} uiGridOneBindSrc The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the src dom tag.
- *
- */
- {tag: 'Src', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindText
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindText The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the text dom tag.
- */
- {tag: 'Text', method: 'text'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindHref
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindHref The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the href dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Href', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindClass
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindClass The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @param {Object} uiGridOneBindClass The object that you want to bind. At least one of the values in the object must be something other than null or undefined for the watcher to be removed.
- * this is to prevent the watcher from being removed before the scope is initialized.
- * @param {Array} uiGridOneBindClass An array of classes to bind to this element.
- * @description One time binding for the class dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Class', method: 'addClass'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindHtml
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindHtml The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the html method on a dom element. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Html', method: 'html'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAlt
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAlt The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the alt dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Alt', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindStyle
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindStyle The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the style dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Style', method: 'css'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindValue
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindValue The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the value dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Value', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindId
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindId The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the value dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Id', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindIdGrid
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindIdGrid The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the id dom tag.
- * <h1>Important Note!</h1>
- * If the id tag passed as a parameter does <b>not</b> contain the grid id as a substring
- * then the directive will search the scope and the parent controller (if it is a uiGridController) for the grid.id value.
- * If this value is found then it is appended to the begining of the id tag. If the grid is not found then the directive throws an error.
- * This is done in order to ensure uniqueness of id tags across the grid.
- * This is to prevent two grids in the same document having duplicate id tags.
- */
- {tag: 'Id', directiveName:'IdGrid', method: 'attr', appendGridId: true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindTitle
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindTitle The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the title dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- */
- {tag: 'Title', method: 'attr'},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaLabel
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAriaLabel The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-label dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- *<br/>
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-aria-label="text"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="text='Add this text'" ui-grid-one-bind-aria-label="text" aria-label="Add this text"></div>
- </pre>
- */
- {tag: 'Label', method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaLabelledby
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAriaLabelledby The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-labelledby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby="anId"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby="anId" aria-labelledby="gridID32"></div>
- </pre>
- */
- {tag: 'Labelledby', method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaLabelledbyGrid
- * @element div
- * @restrict A
- * @param {String} uiGridOneBindAriaLabelledbyGrid The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-labelledby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- * Works somewhat like {@link ui.grid.directive:uiGridOneBindIdGrid} however this one supports a list of ids (seperated by a space) and will dynamically add the
- * grid id to each one.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby-grid="anId"></div>
- </pre>
- * Will become ([grid.id] will be replaced by the actual grid id):
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-labelledby-grid="anId" aria-labelledby-Grid="[grid.id]-gridID32"></div>
- </pre>
- */
- {tag: 'Labelledby', directiveName:'LabelledbyGrid', appendGridId:true, method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaDescribedby
- * @element ANY
- * @restrict A
- * @param {String} uiGridOneBindAriaDescribedby The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-describedby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby="anId"></div>
- </pre>
- * Will become:
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby="anId" aria-describedby="gridID32"></div>
- </pre>
- */
- {tag: 'Describedby', method: 'attr', aria:true},
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridOneBindAriaDescribedbyGrid
- * @element ANY
- * @restrict A
- * @param {String} uiGridOneBindAriaDescribedbyGrid The angular string you want to bind. Does not support interpolation. Don't use <code>{{scopeElt}}</code> instead use <code>scopeElt</code>.
- * @description One time binding for the aria-labelledby dom tag. For more information see {@link ui.grid.directive:uiGridOneBind}.
- * Works somewhat like {@link ui.grid.directive:uiGridOneBindIdGrid} however this one supports a list of ids (seperated by a space) and will dynamically add the
- * grid id to each one.
- *<br/>
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby-grid="anId"></div>
- </pre>
- * Will become ([grid.id] will be replaced by the actual grid id):
- * <pre>
- <div ng-init="anId = 'gridID32'" ui-grid-one-bind-aria-describedby-grid="anId" aria-describedby="[grid.id]-gridID32"></div>
- </pre>
- */
- {tag: 'Describedby', directiveName:'DescribedbyGrid', appendGridId:true, method: 'attr', aria:true}],
- function(v){
-
- var baseDirectiveName = 'uiGridOneBind';
- //If it is an aria tag then append the aria label seperately
- //This is done because the aria tags are formatted aria-* and the directive name can't have a '-' character in it.
- //If the diretiveName has to be overridden then it does so here. This is because the tag being modified and the directive sometimes don't match up.
- var directiveName = (v.aria ? baseDirectiveName + 'Aria' : baseDirectiveName) + (v.directiveName ? v.directiveName : v.tag);
- oneBinders.directive(directiveName, ['gridUtil', function(gridUtil){
- return {
- restrict: 'A',
- require: ['?uiGrid','?^uiGrid'],
- link: function(scope, iElement, iAttrs, controllers){
- /* Appends the grid id to the beginnig of the value. */
- var appendGridId = function(val){
- var grid; //Get an instance of the grid if its available
- //If its available in the scope then we don't need to try to find it elsewhere
- if (scope.grid) {
- grid = scope.grid;
- }
- //Another possible location to try to find the grid
- else if (scope.col && scope.col.grid){
- grid = scope.col.grid;
- }
- //Last ditch effort: Search through the provided controllers.
- else if (!controllers.some( //Go through the controllers till one has the element we need
- function(controller){
- if (controller && controller.grid) {
- grid = controller.grid;
- return true; //We've found the grid
- }
- })){
- //We tried our best to find it for you
- gridUtil.logError("["+directiveName+"] A valid grid could not be found to bind id. Are you using this directive " +
- "within the correct scope? Trying to generate id: [gridID]-" + val);
- throw new Error("No valid grid could be found");
- }
-
- if (grid){
- var idRegex = new RegExp(grid.id.toString());
- //If the grid id hasn't been appended already in the template declaration
- if (!idRegex.test(val)){
- val = grid.id.toString() + '-' + val;
- }
- }
- return val;
- };
-
- // The watch returns a function to remove itself.
- var rmWatcher = scope.$watch(iAttrs[directiveName], function(newV){
- if (newV){
- //If we are trying to add an id element then we also apply the grid id if it isn't already there
- if (v.appendGridId) {
- var newIdString = null;
- //Append the id to all of the new ids.
- angular.forEach( newV.split(' '), function(s){
- newIdString = (newIdString ? (newIdString + ' ') : '') + appendGridId(s);
- });
- newV = newIdString;
- }
-
- // Append this newValue to the dom element.
- switch (v.method) {
- case 'attr': //The attr method takes two paraams the tag and the value
- if (v.aria) {
- //If it is an aria element then append the aria prefix
- iElement[v.method]('aria-' + v.tag.toLowerCase(),newV);
- } else {
- iElement[v.method](v.tag.toLowerCase(),newV);
- }
- break;
- case 'addClass':
- //Pulled from https://github.com/Pasvaz/bindonce/blob/master/bindonce.js
- if (angular.isObject(newV) && !angular.isArray(newV)) {
- var results = [];
- var nonNullFound = false; //We don't want to remove the binding unless the key is actually defined
- angular.forEach(newV, function (value, index) {
- if (value !== null && typeof(value) !== "undefined"){
- nonNullFound = true; //A non null value for a key was found so the object must have been initialized
- if (value) {results.push(index);}
- }
- });
- //A non null value for a key wasn't found so assume that the scope values haven't been fully initialized
- if (!nonNullFound){
- return; // If not initialized then the watcher should not be removed yet.
- }
- newV = results;
- }
-
- if (newV) {
- iElement.addClass(angular.isArray(newV) ? newV.join(' ') : newV);
- } else {
- return;
- }
- break;
- default:
- iElement[v.method](newV);
- break;
- }
-
- //Removes the watcher on itself after the bind
- rmWatcher();
- }
- // True ensures that equality is determined using angular.equals instead of ===
- }, true); //End rm watchers
- } //End compile function
- }; //End directive return
- } // End directive function
- ]); //End directive
- }); // End angular foreach
-})();
-
-(function () {
- 'use strict';
-
- var module = angular.module('ui.grid');
-
- module.directive('uiGridRenderContainer', ['$timeout', '$document', 'uiGridConstants', 'gridUtil', 'ScrollEvent',
- function($timeout, $document, uiGridConstants, gridUtil, ScrollEvent) {
- return {
- replace: true,
- transclude: true,
- templateUrl: 'ui-grid/uiGridRenderContainer',
- require: ['^uiGrid', 'uiGridRenderContainer'],
- scope: {
- containerId: '=',
- rowContainerName: '=',
- colContainerName: '=',
- bindScrollHorizontal: '=',
- bindScrollVertical: '=',
- enableVerticalScrollbar: '=',
- enableHorizontalScrollbar: '='
- },
- controller: 'uiGridRenderContainer as RenderContainer',
- compile: function () {
- return {
- pre: function prelink($scope, $elm, $attrs, controllers) {
-
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
- var grid = $scope.grid = uiGridCtrl.grid;
-
- // Verify that the render container for this element exists
- if (!$scope.rowContainerName) {
- throw "No row render container name specified";
- }
- if (!$scope.colContainerName) {
- throw "No column render container name specified";
- }
-
- if (!grid.renderContainers[$scope.rowContainerName]) {
- throw "Row render container '" + $scope.rowContainerName + "' is not registered.";
- }
- if (!grid.renderContainers[$scope.colContainerName]) {
- throw "Column render container '" + $scope.colContainerName + "' is not registered.";
- }
-
- var rowContainer = $scope.rowContainer = grid.renderContainers[$scope.rowContainerName];
- var colContainer = $scope.colContainer = grid.renderContainers[$scope.colContainerName];
-
- containerCtrl.containerId = $scope.containerId;
- containerCtrl.rowContainer = rowContainer;
- containerCtrl.colContainer = colContainer;
- },
- post: function postlink($scope, $elm, $attrs, controllers) {
-
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- var grid = uiGridCtrl.grid;
- var rowContainer = containerCtrl.rowContainer;
- var colContainer = containerCtrl.colContainer;
- var scrollTop = null;
- var scrollLeft = null;
-
-
- var renderContainer = grid.renderContainers[$scope.containerId];
-
- // Put the container name on this element as a class
- $elm.addClass('ui-grid-render-container-' + $scope.containerId);
-
- // Scroll the render container viewport when the mousewheel is used
- gridUtil.on.mousewheel($elm, function (event) {
- var scrollEvent = new ScrollEvent(grid, rowContainer, colContainer, ScrollEvent.Sources.RenderContainerMouseWheel);
- if (event.deltaY !== 0) {
- var scrollYAmount = event.deltaY * -1 * event.deltaFactor;
-
- scrollTop = containerCtrl.viewport[0].scrollTop;
-
- // Get the scroll percentage
- scrollEvent.verticalScrollLength = rowContainer.getVerticalScrollLength();
- var scrollYPercentage = (scrollTop + scrollYAmount) / scrollEvent.verticalScrollLength;
-
- // If we should be scrolled 100%, make sure the scrollTop matches the maximum scroll length
- // Viewports that have "overflow: hidden" don't let the mousewheel scroll all the way to the bottom without this check
- if (scrollYPercentage >= 1 && scrollTop < scrollEvent.verticalScrollLength) {
- containerCtrl.viewport[0].scrollTop = scrollEvent.verticalScrollLength;
- }
-
- // Keep scrollPercentage within the range 0-1.
- if (scrollYPercentage < 0) { scrollYPercentage = 0; }
- else if (scrollYPercentage > 1) { scrollYPercentage = 1; }
-
- scrollEvent.y = { percentage: scrollYPercentage, pixels: scrollYAmount };
- }
- if (event.deltaX !== 0) {
- var scrollXAmount = event.deltaX * event.deltaFactor;
-
- // Get the scroll percentage
- scrollLeft = gridUtil.normalizeScrollLeft(containerCtrl.viewport, grid);
- scrollEvent.horizontalScrollLength = (colContainer.getCanvasWidth() - colContainer.getViewportWidth());
- var scrollXPercentage = (scrollLeft + scrollXAmount) / scrollEvent.horizontalScrollLength;
-
- // Keep scrollPercentage within the range 0-1.
- if (scrollXPercentage < 0) { scrollXPercentage = 0; }
- else if (scrollXPercentage > 1) { scrollXPercentage = 1; }
-
- scrollEvent.x = { percentage: scrollXPercentage, pixels: scrollXAmount };
- }
-
- // Let the parent container scroll if the grid is already at the top/bottom
- if ((event.deltaY !== 0 && (scrollEvent.atTop(scrollTop) || scrollEvent.atBottom(scrollTop))) ||
- (event.deltaX !== 0 && (scrollEvent.atLeft(scrollLeft) || scrollEvent.atRight(scrollLeft)))) {
- //parent controller scrolls
- }
- else {
- event.preventDefault();
- event.stopPropagation();
- scrollEvent.fireThrottledScrollingEvent('', scrollEvent);
- }
-
- });
-
- $elm.bind('$destroy', function() {
- $elm.unbind('keydown');
-
- ['touchstart', 'touchmove', 'touchend','keydown', 'wheel', 'mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'].forEach(function (eventName) {
- $elm.unbind(eventName);
- });
- });
-
- // TODO(c0bra): Handle resizing the inner canvas based on the number of elements
- function update() {
- var ret = '';
-
- var canvasWidth = colContainer.canvasWidth;
- var viewportWidth = colContainer.getViewportWidth();
-
- var canvasHeight = rowContainer.getCanvasHeight();
-
- //add additional height for scrollbar on left and right container
- //if ($scope.containerId !== 'body') {
- // canvasHeight -= grid.scrollbarHeight;
- //}
-
- var viewportHeight = rowContainer.getViewportHeight();
- //shorten the height to make room for a scrollbar placeholder
- if (colContainer.needsHScrollbarPlaceholder()) {
- viewportHeight -= grid.scrollbarHeight;
- }
-
- var headerViewportWidth,
- footerViewportWidth;
- headerViewportWidth = footerViewportWidth = colContainer.getHeaderViewportWidth();
-
- // Set canvas dimensions
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-canvas { width: ' + canvasWidth + 'px; height: ' + canvasHeight + 'px; }';
-
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-canvas { width: ' + (canvasWidth + grid.scrollbarWidth) + 'px; }';
-
- if (renderContainer.explicitHeaderCanvasHeight) {
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-canvas { height: ' + renderContainer.explicitHeaderCanvasHeight + 'px; }';
- }
- else {
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-canvas { height: inherit; }';
- }
-
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-viewport { width: ' + viewportWidth + 'px; height: ' + viewportHeight + 'px; }';
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-header-viewport { width: ' + headerViewportWidth + 'px; }';
-
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-footer-canvas { width: ' + (canvasWidth + grid.scrollbarWidth) + 'px; }';
- ret += '\n .grid' + uiGridCtrl.grid.id + ' .ui-grid-render-container-' + $scope.containerId + ' .ui-grid-footer-viewport { width: ' + footerViewportWidth + 'px; }';
-
- return ret;
- }
-
- uiGridCtrl.grid.registerStyleComputation({
- priority: 6,
- func: update
- });
- }
- };
- }
- };
-
- }]);
-
- module.controller('uiGridRenderContainer', ['$scope', 'gridUtil', function ($scope, gridUtil) {
-
- }]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridRow', ['gridUtil', function(gridUtil) {
- return {
- replace: true,
- // priority: 2001,
- // templateUrl: 'ui-grid/ui-grid-row',
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: {
- row: '=uiGridRow',
- //rowRenderIndex is added to scope to give the true visual index of the row to any directives that need it
- rowRenderIndex: '='
- },
- compile: function() {
- return {
- pre: function($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- var grid = uiGridCtrl.grid;
-
- $scope.grid = uiGridCtrl.grid;
- $scope.colContainer = containerCtrl.colContainer;
-
- // Function for attaching the template to this scope
- var clonedElement, cloneScope;
- function compileTemplate() {
- $scope.row.getRowTemplateFn.then(function (compiledElementFn) {
- // var compiledElementFn = $scope.row.compiledElementFn;
-
- // Create a new scope for the contents of this row, so we can destroy it later if need be
- var newScope = $scope.$new();
-
- compiledElementFn(newScope, function (newElm, scope) {
- // If we already have a cloned element, we need to remove it and destroy its scope
- if (clonedElement) {
- clonedElement.remove();
- cloneScope.$destroy();
- }
-
- // Empty the row and append the new element
- $elm.empty().append(newElm);
-
- // Save the new cloned element and scope
- clonedElement = newElm;
- cloneScope = newScope;
- });
- });
- }
-
- // Initially attach the compiled template to this scope
- compileTemplate();
-
- // If the row's compiled element function changes, we need to replace this element's contents with the new compiled template
- $scope.$watch('row.getRowTemplateFn', function (newFunc, oldFunc) {
- if (newFunc !== oldFunc) {
- compileTemplate();
- }
- });
- },
- post: function($scope, $elm, $attrs, controllers) {
-
- }
- };
- }
- };
- }]);
-
-})();
-(function(){
-// 'use strict';
-
- /**
- * @ngdoc directive
- * @name ui.grid.directive:uiGridStyle
- * @element style
- * @restrict A
- *
- * @description
- * Allows us to interpolate expressions in `<style>` elements. Angular doesn't do this by default as it can/will/might? break in IE8.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.myStyle = '.blah { border: 1px solid }';
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <style ui-grid-style>{{ myStyle }}</style>
- <span class="blah">I am in a box.</span>
- </div>
- </doc:source>
- <doc:scenario>
- it('should apply the right class to the element', function () {
- element(by.css('.blah')).getCssValue('border-top-width')
- .then(function(c) {
- expect(c).toContain('1px');
- });
- });
- </doc:scenario>
- </doc:example>
- */
-
-
- angular.module('ui.grid').directive('uiGridStyle', ['gridUtil', '$interpolate', function(gridUtil, $interpolate) {
- return {
- // restrict: 'A',
- // priority: 1000,
- // require: '?^uiGrid',
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- // gridUtil.logDebug('ui-grid-style link');
- // if (uiGridCtrl === undefined) {
- // gridUtil.logWarn('[ui-grid-style link] uiGridCtrl is undefined!');
- // }
-
- var interpolateFn = $interpolate($elm.text(), true);
-
- if (interpolateFn) {
- $scope.$watch(interpolateFn, function(value) {
- $elm.text(value);
- });
- }
-
- // uiGridCtrl.recalcRowStyles = function() {
- // var offset = (scope.options.offsetTop || 0) - (scope.options.excessRows * scope.options.rowHeight);
- // var rowHeight = scope.options.rowHeight;
-
- // var ret = '';
- // var rowStyleCount = uiGridCtrl.minRowsToRender() + (scope.options.excessRows * 2);
- // for (var i = 1; i <= rowStyleCount; i++) {
- // ret = ret + ' .grid' + scope.gridId + ' .ui-grid-row:nth-child(' + i + ') { top: ' + offset + 'px; }';
- // offset = offset + rowHeight;
- // }
-
- // scope.rowStyles = ret;
- // };
-
- // uiGridCtrl.styleComputions.push(uiGridCtrl.recalcRowStyles);
-
- }
- };
- }]);
-
-})();
-
-(function(){
- 'use strict';
-
- angular.module('ui.grid').directive('uiGridViewport', ['gridUtil','ScrollEvent','uiGridConstants', '$log',
- function(gridUtil, ScrollEvent, uiGridConstants, $log) {
- return {
- replace: true,
- scope: {},
- controllerAs: 'Viewport',
- templateUrl: 'ui-grid/uiGridViewport',
- require: ['^uiGrid', '^uiGridRenderContainer'],
- link: function($scope, $elm, $attrs, controllers) {
- // gridUtil.logDebug('viewport post-link');
-
- var uiGridCtrl = controllers[0];
- var containerCtrl = controllers[1];
-
- $scope.containerCtrl = containerCtrl;
-
- var rowContainer = containerCtrl.rowContainer;
- var colContainer = containerCtrl.colContainer;
-
- var grid = uiGridCtrl.grid;
-
- $scope.grid = uiGridCtrl.grid;
-
- // Put the containers in scope so we can get rows and columns from them
- $scope.rowContainer = containerCtrl.rowContainer;
- $scope.colContainer = containerCtrl.colContainer;
-
- // Register this viewport with its container
- containerCtrl.viewport = $elm;
-
-
- $elm.on('scroll', scrollHandler);
-
- var ignoreScroll = false;
-
- function scrollHandler(evt) {
- //Leaving in this commented code in case it can someday be used
- //It does improve performance, but because the horizontal scroll is normalized,
- // using this code will lead to the column header getting slightly out of line with columns
- //
- //if (ignoreScroll && (grid.isScrollingHorizontally || grid.isScrollingHorizontally)) {
- // //don't ask for scrollTop if we just set it
- // ignoreScroll = false;
- // return;
- //}
- //ignoreScroll = true;
-
- var newScrollTop = $elm[0].scrollTop;
- var newScrollLeft = gridUtil.normalizeScrollLeft($elm, grid);
-
- var vertScrollPercentage = rowContainer.scrollVertical(newScrollTop);
- var horizScrollPercentage = colContainer.scrollHorizontal(newScrollLeft);
-
- var scrollEvent = new ScrollEvent(grid, rowContainer, colContainer, ScrollEvent.Sources.ViewPortScroll);
- scrollEvent.newScrollLeft = newScrollLeft;
- scrollEvent.newScrollTop = newScrollTop;
- if ( horizScrollPercentage > -1 ){
- scrollEvent.x = { percentage: horizScrollPercentage };
- }
-
- if ( vertScrollPercentage > -1 ){
- scrollEvent.y = { percentage: vertScrollPercentage };
- }
-
- grid.scrollContainers($scope.$parent.containerId, scrollEvent);
- }
-
- if ($scope.$parent.bindScrollVertical) {
- grid.addVerticalScrollSync($scope.$parent.containerId, syncVerticalScroll);
- }
-
- if ($scope.$parent.bindScrollHorizontal) {
- grid.addHorizontalScrollSync($scope.$parent.containerId, syncHorizontalScroll);
- grid.addHorizontalScrollSync($scope.$parent.containerId + 'header', syncHorizontalHeader);
- grid.addHorizontalScrollSync($scope.$parent.containerId + 'footer', syncHorizontalFooter);
- }
-
- function syncVerticalScroll(scrollEvent){
- containerCtrl.prevScrollArgs = scrollEvent;
- var newScrollTop = scrollEvent.getNewScrollTop(rowContainer,containerCtrl.viewport);
- $elm[0].scrollTop = newScrollTop;
-
- }
-
- function syncHorizontalScroll(scrollEvent){
- containerCtrl.prevScrollArgs = scrollEvent;
- var newScrollLeft = scrollEvent.getNewScrollLeft(colContainer, containerCtrl.viewport);
- $elm[0].scrollLeft = gridUtil.denormalizeScrollLeft(containerCtrl.viewport,newScrollLeft, grid);
- }
-
- function syncHorizontalHeader(scrollEvent){
- var newScrollLeft = scrollEvent.getNewScrollLeft(colContainer, containerCtrl.viewport);
- if (containerCtrl.headerViewport) {
- containerCtrl.headerViewport.scrollLeft = gridUtil.denormalizeScrollLeft(containerCtrl.viewport,newScrollLeft, grid);
- }
- }
-
- function syncHorizontalFooter(scrollEvent){
- var newScrollLeft = scrollEvent.getNewScrollLeft(colContainer, containerCtrl.viewport);
- if (containerCtrl.footerViewport) {
- containerCtrl.footerViewport.scrollLeft = gridUtil.denormalizeScrollLeft(containerCtrl.viewport,newScrollLeft, grid);
- }
- }
-
-
- },
- controller: ['$scope', function ($scope) {
- this.rowStyle = function (index) {
- var rowContainer = $scope.rowContainer;
- var colContainer = $scope.colContainer;
-
- var styles = {};
-
- if (index === 0 && rowContainer.currentTopRow !== 0) {
- // The row offset-top is just the height of the rows above the current top-most row, which are no longer rendered
- var hiddenRowWidth = (rowContainer.currentTopRow) * rowContainer.grid.options.rowHeight;
-
- // return { 'margin-top': hiddenRowWidth + 'px' };
- styles['margin-top'] = hiddenRowWidth + 'px';
- }
-
- if (colContainer.currentFirstColumn !== 0) {
- if (colContainer.grid.isRTL()) {
- styles['margin-right'] = colContainer.columnOffset + 'px';
- }
- else {
- styles['margin-left'] = colContainer.columnOffset + 'px';
- }
- }
-
- return styles;
- };
- }]
- };
- }
- ]);
-
-})();
-
-(function() {
-
-angular.module('ui.grid')
-.directive('uiGridVisible', function uiGridVisibleAction() {
- return function ($scope, $elm, $attr) {
- $scope.$watch($attr.uiGridVisible, function (visible) {
- // $elm.css('visibility', visible ? 'visible' : 'hidden');
- $elm[visible ? 'removeClass' : 'addClass']('ui-grid-invisible');
- });
- };
-});
-
-})();
-(function () {
- 'use strict';
-
- angular.module('ui.grid').controller('uiGridController', ['$scope', '$element', '$attrs', 'gridUtil', '$q', 'uiGridConstants',
- '$templateCache', 'gridClassFactory', '$timeout', '$parse', '$compile',
- function ($scope, $elm, $attrs, gridUtil, $q, uiGridConstants,
- $templateCache, gridClassFactory, $timeout, $parse, $compile) {
- // gridUtil.logDebug('ui-grid controller');
-
- var self = this;
-
- self.grid = gridClassFactory.createGrid($scope.uiGrid);
-
- //assign $scope.$parent if appScope not already assigned
- self.grid.appScope = self.grid.appScope || $scope.$parent;
-
- $elm.addClass('grid' + self.grid.id);
- self.grid.rtl = gridUtil.getStyles($elm[0])['direction'] === 'rtl';
-
-
- // angular.extend(self.grid.options, );
-
- //all properties of grid are available on scope
- $scope.grid = self.grid;
-
- if ($attrs.uiGridColumns) {
- $attrs.$observe('uiGridColumns', function(value) {
- self.grid.options.columnDefs = value;
- self.grid.buildColumns()
- .then(function(){
- self.grid.preCompileCellTemplates();
-
- self.grid.refreshCanvas(true);
- });
- });
- }
-
-
- // if fastWatch is set we watch only the length and the reference, not every individual object
- var deregFunctions = [];
- if (self.grid.options.fastWatch) {
- self.uiGrid = $scope.uiGrid;
- if (angular.isString($scope.uiGrid.data)) {
- deregFunctions.push( $scope.$parent.$watch($scope.uiGrid.data, dataWatchFunction) );
- deregFunctions.push( $scope.$parent.$watch(function() {
- if ( self.grid.appScope[$scope.uiGrid.data] ){
- return self.grid.appScope[$scope.uiGrid.data].length;
- } else {
- return undefined;
- }
- }, dataWatchFunction) );
- } else {
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data; }, dataWatchFunction) );
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.data.length; }, dataWatchFunction) );
- }
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction) );
- deregFunctions.push( $scope.$parent.$watch(function() { return $scope.uiGrid.columnDefs.length; }, columnDefsWatchFunction) );
- } else {
- if (angular.isString($scope.uiGrid.data)) {
- deregFunctions.push( $scope.$parent.$watchCollection($scope.uiGrid.data, dataWatchFunction) );
- } else {
- deregFunctions.push( $scope.$parent.$watchCollection(function() { return $scope.uiGrid.data; }, dataWatchFunction) );
- }
- deregFunctions.push( $scope.$parent.$watchCollection(function() { return $scope.uiGrid.columnDefs; }, columnDefsWatchFunction) );
- }
-
-
- function columnDefsWatchFunction(n, o) {
- if (n && n !== o) {
- self.grid.options.columnDefs = n;
- self.grid.buildColumns({ orderByColumnDefs: true })
- .then(function(){
-
- self.grid.preCompileCellTemplates();
-
- self.grid.callDataChangeCallbacks(uiGridConstants.dataChange.COLUMN);
- });
- }
- }
-
- function dataWatchFunction(newData) {
- // gridUtil.logDebug('dataWatch fired');
- var promises = [];
-
- if ( self.grid.options.fastWatch ){
- if (angular.isString($scope.uiGrid.data)) {
- newData = self.grid.appScope[$scope.uiGrid.data];
- } else {
- newData = $scope.uiGrid.data;
- }
- }
-
- if (newData) {
- // columns length is greater than the number of row header columns, which don't count because they're created automatically
- var hasColumns = self.grid.columns.length > (self.grid.rowHeaderColumns ? self.grid.rowHeaderColumns.length : 0);
-
- if (
- // If we have no columns
- !hasColumns &&
- // ... and we don't have a ui-grid-columns attribute, which would define columns for us
- !$attrs.uiGridColumns &&
- // ... and we have no pre-defined columns
- self.grid.options.columnDefs.length === 0 &&
- // ... but we DO have data
- newData.length > 0
- ) {
- // ... then build the column definitions from the data that we have
- self.grid.buildColumnDefsFromData(newData);
- }
-
- // If we haven't built columns before and either have some columns defined or some data defined
- if (!hasColumns && (self.grid.options.columnDefs.length > 0 || newData.length > 0)) {
- // Build the column set, then pre-compile the column cell templates
- promises.push(self.grid.buildColumns()
- .then(function() {
- self.grid.preCompileCellTemplates();
- }));
- }
-
- $q.all(promises).then(function() {
- self.grid.modifyRows(newData)
- .then(function () {
- // if (self.viewport) {
- self.grid.redrawInPlace(true);
- // }
-
- $scope.$evalAsync(function() {
- self.grid.refreshCanvas(true);
- self.grid.callDataChangeCallbacks(uiGridConstants.dataChange.ROW);
- });
- });
- });
- }
- }
-
- var styleWatchDereg = $scope.$watch(function () { return self.grid.styleComputations; }, function() {
- self.grid.refreshCanvas(true);
- });
-
- $scope.$on('$destroy', function() {
- deregFunctions.forEach( function( deregFn ){ deregFn(); });
- styleWatchDereg();
- });
-
- self.fireEvent = function(eventName, args) {
- // Add the grid to the event arguments if it's not there
- if (typeof(args) === 'undefined' || args === undefined) {
- args = {};
- }
-
- if (typeof(args.grid) === 'undefined' || args.grid === undefined) {
- args.grid = self.grid;
- }
-
- $scope.$broadcast(eventName, args);
- };
-
- self.innerCompile = function innerCompile(elm) {
- $compile(elm)($scope);
- };
-
- }]);
-
-/**
- * @ngdoc directive
- * @name ui.grid.directive:uiGrid
- * @element div
- * @restrict EA
- * @param {Object} uiGrid Options for the grid to use
- *
- * @description Create a very basic grid.
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data }"></div>
- </div>
- </file>
- </example>
- */
-angular.module('ui.grid').directive('uiGrid', uiGridDirective);
-
-uiGridDirective.$inject = ['$compile', '$templateCache', '$timeout', '$window', 'gridUtil', 'uiGridConstants'];
-function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil, uiGridConstants) {
- return {
- templateUrl: 'ui-grid/ui-grid',
- scope: {
- uiGrid: '='
- },
- replace: true,
- transclude: true,
- controller: 'uiGridController',
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- var grid = uiGridCtrl.grid;
- // Initialize scrollbars (TODO: move to controller??)
- uiGridCtrl.scrollbars = [];
- grid.element = $elm;
-
-
- // See if the grid has a rendered width, if not, wait a bit and try again
- var sizeCheckInterval = 100; // ms
- var maxSizeChecks = 20; // 2 seconds total
- var sizeChecks = 0;
-
- // Setup (event listeners) the grid
- setup();
-
- // And initialize it
- init();
-
- // Mark rendering complete so API events can happen
- grid.renderingComplete();
-
- // If the grid doesn't have size currently, wait for a bit to see if it gets size
- checkSize();
-
- /*-- Methods --*/
-
- function checkSize() {
- // If the grid has no width and we haven't checked more than <maxSizeChecks> times, check again in <sizeCheckInterval> milliseconds
- if ($elm[0].offsetWidth <= 0 && sizeChecks < maxSizeChecks) {
- setTimeout(checkSize, sizeCheckInterval);
- sizeChecks++;
- }
- else {
- $timeout(init);
- }
- }
-
- // Setup event listeners and watchers
- function setup() {
- // Bind to window resize events
- angular.element($window).on('resize', gridResize);
-
- // Unbind from window resize events when the grid is destroyed
- $elm.on('$destroy', function () {
- angular.element($window).off('resize', gridResize);
- });
-
- // If we add a left container after render, we need to watch and react
- $scope.$watch(function () { return grid.hasLeftContainer();}, function (newValue, oldValue) {
- if (newValue === oldValue) {
- return;
- }
- grid.refreshCanvas(true);
- });
-
- // If we add a right container after render, we need to watch and react
- $scope.$watch(function () { return grid.hasRightContainer();}, function (newValue, oldValue) {
- if (newValue === oldValue) {
- return;
- }
- grid.refreshCanvas(true);
- });
- }
-
- // Initialize the directive
- function init() {
- grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm);
-
- // Default canvasWidth to the grid width, in case we don't get any column definitions to calculate it from
- grid.canvasWidth = uiGridCtrl.grid.gridWidth;
-
- grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
-
- // If the grid isn't tall enough to fit a single row, it's kind of useless. Resize it to fit a minimum number of rows
- if (grid.gridHeight < grid.options.rowHeight && grid.options.enableMinHeightCheck) {
- autoAdjustHeight();
- }
-
- // Run initial canvas refresh
- grid.refreshCanvas(true);
- }
-
- // Set the grid's height ourselves in the case that its height would be unusably small
- function autoAdjustHeight() {
- // Figure out the new height
- var contentHeight = grid.options.minRowsToShow * grid.options.rowHeight;
- var headerHeight = grid.options.showHeader ? grid.options.headerRowHeight : 0;
- var footerHeight = grid.calcFooterHeight();
-
- var scrollbarHeight = 0;
- if (grid.options.enableHorizontalScrollbar === uiGridConstants.scrollbars.ALWAYS) {
- scrollbarHeight = gridUtil.getScrollbarWidth();
- }
-
- var maxNumberOfFilters = 0;
- // Calculates the maximum number of filters in the columns
- angular.forEach(grid.options.columnDefs, function(col) {
- if (col.hasOwnProperty('filter')) {
- if (maxNumberOfFilters < 1) {
- maxNumberOfFilters = 1;
- }
- }
- else if (col.hasOwnProperty('filters')) {
- if (maxNumberOfFilters < col.filters.length) {
- maxNumberOfFilters = col.filters.length;
- }
- }
- });
-
- if (grid.options.enableFiltering) {
- var allColumnsHaveFilteringTurnedOff = grid.options.columnDefs.every(function(col) {
- return col.enableFiltering === false;
- });
-
- if (!allColumnsHaveFilteringTurnedOff) {
- maxNumberOfFilters++;
- }
- }
-
- var filterHeight = maxNumberOfFilters * headerHeight;
-
- var newHeight = headerHeight + contentHeight + footerHeight + scrollbarHeight + filterHeight;
-
- $elm.css('height', newHeight + 'px');
-
- grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
- }
-
- // Resize the grid on window resize events
- function gridResize($event) {
- grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm);
- grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm);
-
- grid.refreshCanvas(true);
- }
- }
- };
- }
- };
-}
-
-})();
-
-(function(){
- 'use strict';
-
- // TODO: rename this file to ui-grid-pinned-container.js
-
- angular.module('ui.grid').directive('uiGridPinnedContainer', ['gridUtil', function (gridUtil) {
- return {
- restrict: 'EA',
- replace: true,
- template: '<div class="ui-grid-pinned-container"><div ui-grid-render-container container-id="side" row-container-name="\'body\'" col-container-name="side" bind-scroll-vertical="true" class="{{ side }} ui-grid-render-container-{{ side }}"></div></div>',
- scope: {
- side: '=uiGridPinnedContainer'
- },
- require: '^uiGrid',
- compile: function compile() {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- // gridUtil.logDebug('ui-grid-pinned-container ' + $scope.side + ' link');
-
- var grid = uiGridCtrl.grid;
-
- var myWidth = 0;
-
- $elm.addClass('ui-grid-pinned-container-' + $scope.side);
-
- // Monkey-patch the viewport width function
- if ($scope.side === 'left' || $scope.side === 'right') {
- grid.renderContainers[$scope.side].getViewportWidth = monkeyPatchedGetViewportWidth;
- }
-
- function monkeyPatchedGetViewportWidth() {
- /*jshint validthis: true */
- var self = this;
-
- var viewportWidth = 0;
- self.visibleColumnCache.forEach(function (column) {
- viewportWidth += column.drawnWidth;
- });
-
- var adjustment = self.getViewportAdjustment();
-
- viewportWidth = viewportWidth + adjustment.width;
-
- return viewportWidth;
- }
-
- function updateContainerWidth() {
- if ($scope.side === 'left' || $scope.side === 'right') {
- var cols = grid.renderContainers[$scope.side].visibleColumnCache;
- var width = 0;
- for (var i = 0; i < cols.length; i++) {
- var col = cols[i];
- width += col.drawnWidth || col.width || 0;
- }
-
- return width;
- }
- }
-
- function updateContainerDimensions() {
- var ret = '';
-
- // Column containers
- if ($scope.side === 'left' || $scope.side === 'right') {
- myWidth = updateContainerWidth();
-
- // gridUtil.logDebug('myWidth', myWidth);
-
- // TODO(c0bra): Subtract sum of col widths from grid viewport width and update it
- $elm.attr('style', null);
-
- // var myHeight = grid.renderContainers.body.getViewportHeight(); // + grid.horizontalScrollbarHeight;
-
- ret += '.grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ', .grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.side + ' .ui-grid-render-container-' + $scope.side + ' .ui-grid-viewport { width: ' + myWidth + 'px; } ';
- }
-
- return ret;
- }
-
- grid.renderContainers.body.registerViewportAdjuster(function (adjustment) {
- myWidth = updateContainerWidth();
-
- // Subtract our own width
- adjustment.width -= myWidth;
- adjustment.side = $scope.side;
-
- return adjustment;
- });
-
- // Register style computation to adjust for columns in `side`'s render container
- grid.registerStyleComputation({
- priority: 15,
- func: updateContainerDimensions
- });
- }
- };
- }
- };
- }]);
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.factory('Grid', ['$q', '$compile', '$parse', 'gridUtil', 'uiGridConstants', 'GridOptions', 'GridColumn', 'GridRow', 'GridApi', 'rowSorter', 'rowSearcher', 'GridRenderContainer', '$timeout','ScrollEvent',
- function($q, $compile, $parse, gridUtil, uiGridConstants, GridOptions, GridColumn, GridRow, GridApi, rowSorter, rowSearcher, GridRenderContainer, $timeout, ScrollEvent) {
-
- /**
- * @ngdoc object
- * @name ui.grid.core.api:PublicApi
- * @description Public Api for the core grid features
- *
- */
-
- /**
- * @ngdoc function
- * @name ui.grid.class:Grid
- * @description Grid is the main viewModel. Any properties or methods needed to maintain state are defined in
- * this prototype. One instance of Grid is created per Grid directive instance.
- * @param {object} options Object map of options to pass into the grid. An 'id' property is expected.
- */
- var Grid = function Grid(options) {
- var self = this;
- // Get the id out of the options, then remove it
- if (options !== undefined && typeof(options.id) !== 'undefined' && options.id) {
- if (!/^[_a-zA-Z0-9-]+$/.test(options.id)) {
- throw new Error("Grid id '" + options.id + '" is invalid. It must follow CSS selector syntax rules.');
- }
- }
- else {
- throw new Error('No ID provided. An ID must be given when creating a grid.');
- }
-
- self.id = options.id;
- delete options.id;
-
- // Get default options
- self.options = GridOptions.initialize( options );
-
- /**
- * @ngdoc object
- * @name appScope
- * @propertyOf ui.grid.class:Grid
- * @description reference to the application scope (the parent scope of the ui-grid element). Assigned in ui-grid controller
- * <br/>
- * use gridOptions.appScopeProvider to override the default assignment of $scope.$parent with any reference
- */
- self.appScope = self.options.appScopeProvider;
-
- self.headerHeight = self.options.headerRowHeight;
-
-
- /**
- * @ngdoc object
- * @name footerHeight
- * @propertyOf ui.grid.class:Grid
- * @description returns the total footer height gridFooter + columnFooter
- */
- self.footerHeight = self.calcFooterHeight();
-
-
- /**
- * @ngdoc object
- * @name columnFooterHeight
- * @propertyOf ui.grid.class:Grid
- * @description returns the total column footer height
- */
- self.columnFooterHeight = self.calcColumnFooterHeight();
-
- self.rtl = false;
- self.gridHeight = 0;
- self.gridWidth = 0;
- self.columnBuilders = [];
- self.rowBuilders = [];
- self.rowsProcessors = [];
- self.columnsProcessors = [];
- self.styleComputations = [];
- self.viewportAdjusters = [];
- self.rowHeaderColumns = [];
- self.dataChangeCallbacks = {};
- self.verticalScrollSyncCallBackFns = {};
- self.horizontalScrollSyncCallBackFns = {};
-
- // self.visibleRowCache = [];
-
- // Set of 'render' containers for self grid, which can render sets of rows
- self.renderContainers = {};
-
- // Create a
- self.renderContainers.body = new GridRenderContainer('body', self);
-
- self.cellValueGetterCache = {};
-
- // Cached function to use with custom row templates
- self.getRowTemplateFn = null;
-
-
- //representation of the rows on the grid.
- //these are wrapped references to the actual data rows (options.data)
- self.rows = [];
-
- //represents the columns on the grid
- self.columns = [];
-
- /**
- * @ngdoc boolean
- * @name isScrollingVertically
- * @propertyOf ui.grid.class:Grid
- * @description set to true when Grid is scrolling vertically. Set to false via debounced method
- */
- self.isScrollingVertically = false;
-
- /**
- * @ngdoc boolean
- * @name isScrollingHorizontally
- * @propertyOf ui.grid.class:Grid
- * @description set to true when Grid is scrolling horizontally. Set to false via debounced method
- */
- self.isScrollingHorizontally = false;
-
- /**
- * @ngdoc property
- * @name scrollDirection
- * @propertyOf ui.grid.class:Grid
- * @description set one of the uiGridConstants.scrollDirection values (UP, DOWN, LEFT, RIGHT, NONE), which tells
- * us which direction we are scrolling. Set to NONE via debounced method
- */
- self.scrollDirection = uiGridConstants.scrollDirection.NONE;
-
- //if true, grid will not respond to any scroll events
- self.disableScrolling = false;
-
-
- function vertical (scrollEvent) {
- self.isScrollingVertically = false;
- self.api.core.raise.scrollEnd(scrollEvent);
- self.scrollDirection = uiGridConstants.scrollDirection.NONE;
- }
-
- var debouncedVertical = gridUtil.debounce(vertical, self.options.scrollDebounce);
- var debouncedVerticalMinDelay = gridUtil.debounce(vertical, 0);
-
- function horizontal (scrollEvent) {
- self.isScrollingHorizontally = false;
- self.api.core.raise.scrollEnd(scrollEvent);
- self.scrollDirection = uiGridConstants.scrollDirection.NONE;
- }
-
- var debouncedHorizontal = gridUtil.debounce(horizontal, self.options.scrollDebounce);
- var debouncedHorizontalMinDelay = gridUtil.debounce(horizontal, 0);
-
-
- /**
- * @ngdoc function
- * @name flagScrollingVertically
- * @methodOf ui.grid.class:Grid
- * @description sets isScrollingVertically to true and sets it to false in a debounced function
- */
- self.flagScrollingVertically = function(scrollEvent) {
- if (!self.isScrollingVertically && !self.isScrollingHorizontally) {
- self.api.core.raise.scrollBegin(scrollEvent);
- }
- self.isScrollingVertically = true;
- if (self.options.scrollDebounce === 0 || !scrollEvent.withDelay) {
- debouncedVerticalMinDelay(scrollEvent);
- }
- else {
- debouncedVertical(scrollEvent);
- }
- };
-
- /**
- * @ngdoc function
- * @name flagScrollingHorizontally
- * @methodOf ui.grid.class:Grid
- * @description sets isScrollingHorizontally to true and sets it to false in a debounced function
- */
- self.flagScrollingHorizontally = function(scrollEvent) {
- if (!self.isScrollingVertically && !self.isScrollingHorizontally) {
- self.api.core.raise.scrollBegin(scrollEvent);
- }
- self.isScrollingHorizontally = true;
- if (self.options.scrollDebounce === 0 || !scrollEvent.withDelay) {
- debouncedHorizontalMinDelay(scrollEvent);
- }
- else {
- debouncedHorizontal(scrollEvent);
- }
- };
-
- self.scrollbarHeight = 0;
- self.scrollbarWidth = 0;
- if (self.options.enableHorizontalScrollbar === uiGridConstants.scrollbars.ALWAYS) {
- self.scrollbarHeight = gridUtil.getScrollbarWidth();
- }
-
- if (self.options.enableVerticalScrollbar === uiGridConstants.scrollbars.ALWAYS) {
- self.scrollbarWidth = gridUtil.getScrollbarWidth();
- }
-
-
-
- self.api = new GridApi(self);
-
- /**
- * @ngdoc function
- * @name refresh
- * @methodOf ui.grid.core.api:PublicApi
- * @description Refresh the rendered grid on screen.
- * The refresh method re-runs both the columnProcessors and the
- * rowProcessors, as well as calling refreshCanvas to update all
- * the grid sizing. In general you should prefer to use queueGridRefresh
- * instead, which is basically a debounced version of refresh.
- *
- * If you only want to resize the grid, not regenerate all the rows
- * and columns, you should consider directly calling refreshCanvas instead.
- *
- */
- self.api.registerMethod( 'core', 'refresh', this.refresh );
-
- /**
- * @ngdoc function
- * @name queueGridRefresh
- * @methodOf ui.grid.core.api:PublicApi
- * @description Request a refresh of the rendered grid on screen, if multiple
- * calls to queueGridRefresh are made within a digest cycle only one will execute.
- * The refresh method re-runs both the columnProcessors and the
- * rowProcessors, as well as calling refreshCanvas to update all
- * the grid sizing. In general you should prefer to use queueGridRefresh
- * instead, which is basically a debounced version of refresh.
- *
- */
- self.api.registerMethod( 'core', 'queueGridRefresh', this.queueGridRefresh );
-
- /**
- * @ngdoc function
- * @name refreshRows
- * @methodOf ui.grid.core.api:PublicApi
- * @description Runs only the rowProcessors, columns remain as they were.
- * It then calls redrawInPlace and refreshCanvas, which adjust the grid sizing.
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- self.api.registerMethod( 'core', 'refreshRows', this.refreshRows );
-
- /**
- * @ngdoc function
- * @name queueRefresh
- * @methodOf ui.grid.core.api:PublicApi
- * @description Requests execution of refreshCanvas, if multiple requests are made
- * during a digest cycle only one will run. RefreshCanvas updates the grid sizing.
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- self.api.registerMethod( 'core', 'queueRefresh', this.queueRefresh );
-
- /**
- * @ngdoc function
- * @name handleWindowResize
- * @methodOf ui.grid.core.api:PublicApi
- * @description Trigger a grid resize, normally this would be picked
- * up by a watch on window size, but in some circumstances it is necessary
- * to call this manually
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- self.api.registerMethod( 'core', 'handleWindowResize', this.handleWindowResize );
-
-
- /**
- * @ngdoc function
- * @name addRowHeaderColumn
- * @methodOf ui.grid.core.api:PublicApi
- * @description adds a row header column to the grid
- * @param {object} column def
- *
- */
- self.api.registerMethod( 'core', 'addRowHeaderColumn', this.addRowHeaderColumn );
-
- /**
- * @ngdoc function
- * @name scrollToIfNecessary
- * @methodOf ui.grid.core.api:PublicApi
- * @description Scrolls the grid to make a certain row and column combo visible,
- * in the case that it is not completely visible on the screen already.
- * @param {GridRow} gridRow row to make visible
- * @param {GridCol} gridCol column to make visible
- * @returns {promise} a promise that is resolved when scrolling is complete
- *
- */
- self.api.registerMethod( 'core', 'scrollToIfNecessary', function(gridRow, gridCol) { return self.scrollToIfNecessary(gridRow, gridCol);} );
-
- /**
- * @ngdoc function
- * @name scrollTo
- * @methodOf ui.grid.core.api:PublicApi
- * @description Scroll the grid such that the specified
- * row and column is in view
- * @param {object} rowEntity gridOptions.data[] array instance to make visible
- * @param {object} colDef to make visible
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- self.api.registerMethod( 'core', 'scrollTo', function (rowEntity, colDef) { return self.scrollTo(rowEntity, colDef);} );
-
- /**
- * @ngdoc function
- * @name registerRowsProcessor
- * @methodOf ui.grid.core.api:PublicApi
- * @description
- * Register a "rows processor" function. When the rows are updated,
- * the grid calls each registered "rows processor", which has a chance
- * to alter the set of rows (sorting, etc) as long as the count is not
- * modified.
- *
- * @param {function(renderedRowsToProcess, columns )} processorFunction rows processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and must
- * return the updated rows list, which is passed to the next processor in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject rows processors at intermediate priorities. Lower priority rowsProcessors run earlier.
- *
- * At present allRowsVisible is running at 50, sort manipulations running at 60-65, filter is running at 100,
- * sort is at 200, grouping and treeview at 400-410, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- */
- self.api.registerMethod( 'core', 'registerRowsProcessor', this.registerRowsProcessor );
-
- /**
- * @ngdoc function
- * @name registerColumnsProcessor
- * @methodOf ui.grid.core.api:PublicApi
- * @description
- * Register a "columns processor" function. When the columns are updated,
- * the grid calls each registered "columns processor", which has a chance
- * to alter the set of columns as long as the count is not
- * modified.
- *
- * @param {function(renderedColumnsToProcess, rows )} processorFunction columns processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and must
- * return the updated columns list, which is passed to the next processor in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject columns processors at intermediate priorities. Lower priority columnsProcessors run earlier.
- *
- * At present allRowsVisible is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- */
- self.api.registerMethod( 'core', 'registerColumnsProcessor', this.registerColumnsProcessor );
-
-
-
- /**
- * @ngdoc function
- * @name sortHandleNulls
- * @methodOf ui.grid.core.api:PublicApi
- * @description A null handling method that can be used when building custom sort
- * functions
- * @example
- * <pre>
- * mySortFn = function(a, b) {
- * var nulls = $scope.gridApi.core.sortHandleNulls(a, b);
- * if ( nulls !== null ){
- * return nulls;
- * } else {
- * // your code for sorting here
- * };
- * </pre>
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} null if there were no nulls/undefineds, otherwise returns
- * a sort value that should be passed back from the sort function
- *
- */
- self.api.registerMethod( 'core', 'sortHandleNulls', rowSorter.handleNulls );
-
-
- /**
- * @ngdoc function
- * @name sortChanged
- * @methodOf ui.grid.core.api:PublicApi
- * @description The sort criteria on one or more columns has
- * changed. Provides as parameters the grid and the output of
- * getColumnSorting, which is an array of gridColumns
- * that have sorting on them, sorted in priority order.
- *
- * @param {$scope} scope The scope of the controller. This is used to deregister this event when the scope is destroyed.
- * @param {Function} callBack Will be called when the event is emited. The function passes back an array of columns with
- * sorts on them, in priority order.
- *
- * @example
- * <pre>
- * gridApi.core.on.sortChanged( $scope, function(sortColumns){
- * // do something
- * });
- * </pre>
- */
- self.api.registerEvent( 'core', 'sortChanged' );
-
- /**
- * @ngdoc function
- * @name columnVisibilityChanged
- * @methodOf ui.grid.core.api:PublicApi
- * @description The visibility of a column has changed,
- * the column itself is passed out as a parameter of the event.
- *
- * @param {$scope} scope The scope of the controller. This is used to deregister this event when the scope is destroyed.
- * @param {Function} callBack Will be called when the event is emited. The function passes back the GridCol that has changed.
- *
- * @example
- * <pre>
- * gridApi.core.on.columnVisibilityChanged( $scope, function (column) {
- * // do something
- * } );
- * </pre>
- */
- self.api.registerEvent( 'core', 'columnVisibilityChanged' );
-
- /**
- * @ngdoc method
- * @name notifyDataChange
- * @methodOf ui.grid.core.api:PublicApi
- * @description Notify the grid that a data or config change has occurred,
- * where that change isn't something the grid was otherwise noticing. This
- * might be particularly relevant where you've changed values within the data
- * and you'd like cell classes to be re-evaluated, or changed config within
- * the columnDef and you'd like headerCellClasses to be re-evaluated.
- * @param {string} type one of the
- * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN), which tells
- * us which refreshes to fire.
- *
- */
- self.api.registerMethod( 'core', 'notifyDataChange', this.notifyDataChange );
-
- /**
- * @ngdoc method
- * @name clearAllFilters
- * @methodOf ui.grid.core.api:PublicApi
- * @description Clears all filters and optionally refreshes the visible rows.
- * @param {object} refreshRows Defaults to true.
- * @param {object} clearConditions Defaults to false.
- * @param {object} clearFlags Defaults to false.
- * @returns {promise} If `refreshRows` is true, returns a promise of the rows refreshing.
- */
- self.api.registerMethod('core', 'clearAllFilters', this.clearAllFilters);
-
- self.registerDataChangeCallback( self.columnRefreshCallback, [uiGridConstants.dataChange.COLUMN]);
- self.registerDataChangeCallback( self.processRowsCallback, [uiGridConstants.dataChange.EDIT]);
- self.registerDataChangeCallback( self.updateFooterHeightCallback, [uiGridConstants.dataChange.OPTIONS]);
-
- self.registerStyleComputation({
- priority: 10,
- func: self.getFooterStyles
- });
- };
-
- Grid.prototype.calcFooterHeight = function () {
- if (!this.hasFooter()) {
- return 0;
- }
-
- var height = 0;
- if (this.options.showGridFooter) {
- height += this.options.gridFooterHeight;
- }
-
- height += this.calcColumnFooterHeight();
-
- return height;
- };
-
- Grid.prototype.calcColumnFooterHeight = function () {
- var height = 0;
-
- if (this.options.showColumnFooter) {
- height += this.options.columnFooterHeight;
- }
-
- return height;
- };
-
- Grid.prototype.getFooterStyles = function () {
- var style = '.grid' + this.id + ' .ui-grid-footer-aggregates-row { height: ' + this.options.columnFooterHeight + 'px; }';
- style += ' .grid' + this.id + ' .ui-grid-footer-info { height: ' + this.options.gridFooterHeight + 'px; }';
- return style;
- };
-
- Grid.prototype.hasFooter = function () {
- return this.options.showGridFooter || this.options.showColumnFooter;
- };
-
- /**
- * @ngdoc function
- * @name isRTL
- * @methodOf ui.grid.class:Grid
- * @description Returns true if grid is RightToLeft
- */
- Grid.prototype.isRTL = function () {
- return this.rtl;
- };
-
-
- /**
- * @ngdoc function
- * @name registerColumnBuilder
- * @methodOf ui.grid.class:Grid
- * @description When the build creates columns from column definitions, the columnbuilders will be called to add
- * additional properties to the column.
- * @param {function(colDef, col, gridOptions)} columnBuilder function to be called
- */
- Grid.prototype.registerColumnBuilder = function registerColumnBuilder(columnBuilder) {
- this.columnBuilders.push(columnBuilder);
- };
-
- /**
- * @ngdoc function
- * @name buildColumnDefsFromData
- * @methodOf ui.grid.class:Grid
- * @description Populates columnDefs from the provided data
- * @param {function(colDef, col, gridOptions)} rowBuilder function to be called
- */
- Grid.prototype.buildColumnDefsFromData = function (dataRows){
- this.options.columnDefs = gridUtil.getColumnsFromData(dataRows, this.options.excludeProperties);
- };
-
- /**
- * @ngdoc function
- * @name registerRowBuilder
- * @methodOf ui.grid.class:Grid
- * @description When the build creates rows from gridOptions.data, the rowBuilders will be called to add
- * additional properties to the row.
- * @param {function(row, gridOptions)} rowBuilder function to be called
- */
- Grid.prototype.registerRowBuilder = function registerRowBuilder(rowBuilder) {
- this.rowBuilders.push(rowBuilder);
- };
-
-
- /**
- * @ngdoc function
- * @name registerDataChangeCallback
- * @methodOf ui.grid.class:Grid
- * @description When a data change occurs, the data change callbacks of the specified type
- * will be called. The rules are:
- *
- * - when the data watch fires, that is considered a ROW change (the data watch only notices
- * added or removed rows)
- * - when the api is called to inform us of a change, the declared type of that change is used
- * - when a cell edit completes, the EDIT callbacks are triggered
- * - when the columnDef watch fires, the COLUMN callbacks are triggered
- * - when the options watch fires, the OPTIONS callbacks are triggered
- *
- * For a given event:
- * - ALL calls ROW, EDIT, COLUMN, OPTIONS and ALL callbacks
- * - ROW calls ROW and ALL callbacks
- * - EDIT calls EDIT and ALL callbacks
- * - COLUMN calls COLUMN and ALL callbacks
- * - OPTIONS calls OPTIONS and ALL callbacks
- *
- * @param {function(grid)} callback function to be called
- * @param {array} types the types of data change you want to be informed of. Values from
- * the uiGridConstants.dataChange values ( ALL, EDIT, ROW, COLUMN, OPTIONS ). Optional and defaults to
- * ALL
- * @returns {function} deregister function - a function that can be called to deregister this callback
- */
- Grid.prototype.registerDataChangeCallback = function registerDataChangeCallback(callback, types, _this) {
- var uid = gridUtil.nextUid();
- if ( !types ){
- types = [uiGridConstants.dataChange.ALL];
- }
- if ( !Array.isArray(types)){
- gridUtil.logError("Expected types to be an array or null in registerDataChangeCallback, value passed was: " + types );
- }
- this.dataChangeCallbacks[uid] = { callback: callback, types: types, _this:_this };
-
- var self = this;
- var deregisterFunction = function() {
- delete self.dataChangeCallbacks[uid];
- };
- return deregisterFunction;
- };
-
- /**
- * @ngdoc function
- * @name callDataChangeCallbacks
- * @methodOf ui.grid.class:Grid
- * @description Calls the callbacks based on the type of data change that
- * has occurred. Always calls the ALL callbacks, calls the ROW, EDIT, COLUMN and OPTIONS callbacks if the
- * event type is matching, or if the type is ALL.
- * @param {number} type the type of event that occurred - one of the
- * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN, OPTIONS)
- */
- Grid.prototype.callDataChangeCallbacks = function callDataChangeCallbacks(type, options) {
- angular.forEach( this.dataChangeCallbacks, function( callback, uid ){
- if ( callback.types.indexOf( uiGridConstants.dataChange.ALL ) !== -1 ||
- callback.types.indexOf( type ) !== -1 ||
- type === uiGridConstants.dataChange.ALL ) {
- if (callback._this) {
- callback.callback.apply(callback._this,this);
- }
- else {
- callback.callback( this );
- }
- }
- }, this);
- };
-
- /**
- * @ngdoc function
- * @name notifyDataChange
- * @methodOf ui.grid.class:Grid
- * @description Notifies us that a data change has occurred, used in the public
- * api for users to tell us when they've changed data or some other event that
- * our watches cannot pick up
- * @param {string} type the type of event that occurred - one of the
- * uiGridConstants.dataChange values (ALL, ROW, EDIT, COLUMN)
- */
- Grid.prototype.notifyDataChange = function notifyDataChange(type) {
- var constants = uiGridConstants.dataChange;
- if ( type === constants.ALL ||
- type === constants.COLUMN ||
- type === constants.EDIT ||
- type === constants.ROW ||
- type === constants.OPTIONS ){
- this.callDataChangeCallbacks( type );
- } else {
- gridUtil.logError("Notified of a data change, but the type was not recognised, so no action taken, type was: " + type);
- }
- };
-
-
- /**
- * @ngdoc function
- * @name columnRefreshCallback
- * @methodOf ui.grid.class:Grid
- * @description refreshes the grid when a column refresh
- * is notified, which triggers handling of the visible flag.
- * This is called on uiGridConstants.dataChange.COLUMN, and is
- * registered as a dataChangeCallback in grid.js
- * @param {string} name column name
- */
- Grid.prototype.columnRefreshCallback = function columnRefreshCallback( grid ){
- grid.buildColumns();
- grid.queueGridRefresh();
- };
-
-
- /**
- * @ngdoc function
- * @name processRowsCallback
- * @methodOf ui.grid.class:Grid
- * @description calls the row processors, specifically
- * intended to reset the sorting when an edit is called,
- * registered as a dataChangeCallback on uiGridConstants.dataChange.EDIT
- * @param {string} name column name
- */
- Grid.prototype.processRowsCallback = function processRowsCallback( grid ){
- grid.queueGridRefresh();
- };
-
-
- /**
- * @ngdoc function
- * @name updateFooterHeightCallback
- * @methodOf ui.grid.class:Grid
- * @description recalculates the footer height,
- * registered as a dataChangeCallback on uiGridConstants.dataChange.OPTIONS
- * @param {string} name column name
- */
- Grid.prototype.updateFooterHeightCallback = function updateFooterHeightCallback( grid ){
- grid.footerHeight = grid.calcFooterHeight();
- grid.columnFooterHeight = grid.calcColumnFooterHeight();
- };
-
-
- /**
- * @ngdoc function
- * @name getColumn
- * @methodOf ui.grid.class:Grid
- * @description returns a grid column for the column name
- * @param {string} name column name
- */
- Grid.prototype.getColumn = function getColumn(name) {
- var columns = this.columns.filter(function (column) {
- return column.colDef.name === name;
- });
- return columns.length > 0 ? columns[0] : null;
- };
-
- /**
- * @ngdoc function
- * @name getColDef
- * @methodOf ui.grid.class:Grid
- * @description returns a grid colDef for the column name
- * @param {string} name column.field
- */
- Grid.prototype.getColDef = function getColDef(name) {
- var colDefs = this.options.columnDefs.filter(function (colDef) {
- return colDef.name === name;
- });
- return colDefs.length > 0 ? colDefs[0] : null;
- };
-
- /**
- * @ngdoc function
- * @name assignTypes
- * @methodOf ui.grid.class:Grid
- * @description uses the first row of data to assign colDef.type for any types not defined.
- */
- /**
- * @ngdoc property
- * @name type
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description the type of the column, used in sorting. If not provided then the
- * grid will guess the type. Add this only if the grid guessing is not to your
- * satisfaction. One of:
- * - 'string'
- * - 'boolean'
- * - 'number'
- * - 'date'
- * - 'object'
- * - 'numberStr'
- * Note that if you choose date, your dates should be in a javascript date type
- *
- */
- Grid.prototype.assignTypes = function(){
- var self = this;
- self.options.columnDefs.forEach(function (colDef, index) {
-
- //Assign colDef type if not specified
- if (!colDef.type) {
- var col = new GridColumn(colDef, index, self);
- var firstRow = self.rows.length > 0 ? self.rows[0] : null;
- if (firstRow) {
- colDef.type = gridUtil.guessType(self.getCellValue(firstRow, col));
- }
- else {
- colDef.type = 'string';
- }
- }
- });
- };
-
-
- /**
- * @ngdoc function
- * @name isRowHeaderColumn
- * @methodOf ui.grid.class:Grid
- * @description returns true if the column is a row Header
- * @param {object} column column
- */
- Grid.prototype.isRowHeaderColumn = function isRowHeaderColumn(column) {
- return this.rowHeaderColumns.indexOf(column) !== -1;
- };
-
- /**
- * @ngdoc function
- * @name addRowHeaderColumn
- * @methodOf ui.grid.class:Grid
- * @description adds a row header column to the grid
- * @param {object} column def
- */
- Grid.prototype.addRowHeaderColumn = function addRowHeaderColumn(colDef) {
- var self = this;
- var rowHeaderCol = new GridColumn(colDef, gridUtil.nextUid(), self);
- rowHeaderCol.isRowHeader = true;
- if (self.isRTL()) {
- self.createRightContainer();
- rowHeaderCol.renderContainer = 'right';
- }
- else {
- self.createLeftContainer();
- rowHeaderCol.renderContainer = 'left';
- }
-
- // relies on the default column builder being first in array, as it is instantiated
- // as part of grid creation
- self.columnBuilders[0](colDef,rowHeaderCol,self.options)
- .then(function(){
- rowHeaderCol.enableFiltering = false;
- rowHeaderCol.enableSorting = false;
- rowHeaderCol.enableHiding = false;
- self.rowHeaderColumns.push(rowHeaderCol);
- self.buildColumns()
- .then( function() {
- self.preCompileCellTemplates();
- self.queueGridRefresh();
- });
- });
- };
-
- /**
- * @ngdoc function
- * @name getOnlyDataColumns
- * @methodOf ui.grid.class:Grid
- * @description returns all columns except for rowHeader columns
- */
- Grid.prototype.getOnlyDataColumns = function getOnlyDataColumns() {
- var self = this;
- var cols = [];
- self.columns.forEach(function (col) {
- if (self.rowHeaderColumns.indexOf(col) === -1) {
- cols.push(col);
- }
- });
- return cols;
- };
-
- /**
- * @ngdoc function
- * @name buildColumns
- * @methodOf ui.grid.class:Grid
- * @description creates GridColumn objects from the columnDefinition. Calls each registered
- * columnBuilder to further process the column
- * @param {object} options An object contains options to use when building columns
- *
- * * **orderByColumnDefs**: defaults to **false**. When true, `buildColumns` will reorder existing columns according to the order within the column definitions.
- *
- * @returns {Promise} a promise to load any needed column resources
- */
- Grid.prototype.buildColumns = function buildColumns(opts) {
- var options = {
- orderByColumnDefs: false
- };
-
- angular.extend(options, opts);
-
- // gridUtil.logDebug('buildColumns');
- var self = this;
- var builderPromises = [];
- var headerOffset = self.rowHeaderColumns.length;
- var i;
-
- // Remove any columns for which a columnDef cannot be found
- // Deliberately don't use forEach, as it doesn't like splice being called in the middle
- // Also don't cache columns.length, as it will change during this operation
- for (i = 0; i < self.columns.length; i++){
- if (!self.getColDef(self.columns[i].name)) {
- self.columns.splice(i, 1);
- i--;
- }
- }
-
- //add row header columns to the grid columns array _after_ columns without columnDefs have been removed
- self.rowHeaderColumns.forEach(function (rowHeaderColumn) {
- self.columns.unshift(rowHeaderColumn);
- });
-
-
- // look at each column def, and update column properties to match. If the column def
- // doesn't have a column, then splice in a new gridCol
- self.options.columnDefs.forEach(function (colDef, index) {
- self.preprocessColDef(colDef);
- var col = self.getColumn(colDef.name);
-
- if (!col) {
- col = new GridColumn(colDef, gridUtil.nextUid(), self);
- self.columns.splice(index + headerOffset, 0, col);
- }
- else {
- // tell updateColumnDef that the column was pre-existing
- col.updateColumnDef(colDef, false);
- }
-
- self.columnBuilders.forEach(function (builder) {
- builderPromises.push(builder.call(self, colDef, col, self.options));
- });
- });
-
- /*** Reorder columns if necessary ***/
- if (!!options.orderByColumnDefs) {
- // Create a shallow copy of the columns as a cache
- var columnCache = self.columns.slice(0);
-
- // We need to allow for the "row headers" when mapping from the column defs array to the columns array
- // If we have a row header in columns[0] and don't account for it we'll overwrite it with the column in columnDefs[0]
-
- // Go through all the column defs, use the shorter of columns length and colDefs.length because if a user has given two columns the same name then
- // columns will be shorter than columnDefs. In this situation we'll avoid an error, but the user will still get an unexpected result
- var len = Math.min(self.options.columnDefs.length, self.columns.length);
- for (i = 0; i < len; i++) {
- // If the column at this index has a different name than the column at the same index in the column defs...
- if (self.columns[i + headerOffset].name !== self.options.columnDefs[i].name) {
- // Replace the one in the cache with the appropriate column
- columnCache[i + headerOffset] = self.getColumn(self.options.columnDefs[i].name);
- }
- else {
- // Otherwise just copy over the one from the initial columns
- columnCache[i + headerOffset] = self.columns[i + headerOffset];
- }
- }
-
- // Empty out the columns array, non-destructively
- self.columns.length = 0;
-
- // And splice in the updated, ordered columns from the cache
- Array.prototype.splice.apply(self.columns, [0, 0].concat(columnCache));
- }
-
- return $q.all(builderPromises).then(function(){
- if (self.rows.length > 0){
- self.assignTypes();
- }
- });
- };
-
-/**
- * @ngdoc function
- * @name preCompileCellTemplates
- * @methodOf ui.grid.class:Grid
- * @description precompiles all cell templates
- */
- Grid.prototype.preCompileCellTemplates = function() {
- var self = this;
-
- var preCompileTemplate = function( col ) {
- var html = col.cellTemplate.replace(uiGridConstants.MODEL_COL_FIELD, self.getQualifiedColField(col));
- html = html.replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)');
-
- var compiledElementFn = $compile(html);
- col.compiledElementFn = compiledElementFn;
-
- if (col.compiledElementFnDefer) {
- col.compiledElementFnDefer.resolve(col.compiledElementFn);
- }
- };
-
- this.columns.forEach(function (col) {
- if ( col.cellTemplate ){
- preCompileTemplate( col );
- } else if ( col.cellTemplatePromise ){
- col.cellTemplatePromise.then( function() {
- preCompileTemplate( col );
- });
- }
- });
- };
-
- /**
- * @ngdoc function
- * @name getGridQualifiedColField
- * @methodOf ui.grid.class:Grid
- * @description Returns the $parse-able accessor for a column within its $scope
- * @param {GridColumn} col col object
- */
- Grid.prototype.getQualifiedColField = function (col) {
- return 'row.entity.' + gridUtil.preEval(col.field);
- };
-
- /**
- * @ngdoc function
- * @name createLeftContainer
- * @methodOf ui.grid.class:Grid
- * @description creates the left render container if it doesn't already exist
- */
- Grid.prototype.createLeftContainer = function() {
- if (!this.hasLeftContainer()) {
- this.renderContainers.left = new GridRenderContainer('left', this, { disableColumnOffset: true });
- }
- };
-
- /**
- * @ngdoc function
- * @name createRightContainer
- * @methodOf ui.grid.class:Grid
- * @description creates the right render container if it doesn't already exist
- */
- Grid.prototype.createRightContainer = function() {
- if (!this.hasRightContainer()) {
- this.renderContainers.right = new GridRenderContainer('right', this, { disableColumnOffset: true });
- }
- };
-
- /**
- * @ngdoc function
- * @name hasLeftContainer
- * @methodOf ui.grid.class:Grid
- * @description returns true if leftContainer exists
- */
- Grid.prototype.hasLeftContainer = function() {
- return this.renderContainers.left !== undefined;
- };
-
- /**
- * @ngdoc function
- * @name hasRightContainer
- * @methodOf ui.grid.class:Grid
- * @description returns true if rightContainer exists
- */
- Grid.prototype.hasRightContainer = function() {
- return this.renderContainers.right !== undefined;
- };
-
-
- /**
- * undocumented function
- * @name preprocessColDef
- * @methodOf ui.grid.class:Grid
- * @description defaults the name property from field to maintain backwards compatibility with 2.x
- * validates that name or field is present
- */
- Grid.prototype.preprocessColDef = function preprocessColDef(colDef) {
- var self = this;
-
- if (!colDef.field && !colDef.name) {
- throw new Error('colDef.name or colDef.field property is required');
- }
-
- //maintain backwards compatibility with 2.x
- //field was required in 2.x. now name is required
- if (colDef.name === undefined && colDef.field !== undefined) {
- // See if the column name already exists:
- var newName = colDef.field,
- counter = 2;
- while (self.getColumn(newName)) {
- newName = colDef.field + counter.toString();
- counter++;
- }
- colDef.name = newName;
- }
- };
-
- // Return a list of items that exist in the `n` array but not the `o` array. Uses optional property accessors passed as third & fourth parameters
- Grid.prototype.newInN = function newInN(o, n, oAccessor, nAccessor) {
- var self = this;
-
- var t = [];
- for (var i = 0; i < n.length; i++) {
- var nV = nAccessor ? n[i][nAccessor] : n[i];
-
- var found = false;
- for (var j = 0; j < o.length; j++) {
- var oV = oAccessor ? o[j][oAccessor] : o[j];
- if (self.options.rowEquality(nV, oV)) {
- found = true;
- break;
- }
- }
- if (!found) {
- t.push(nV);
- }
- }
-
- return t;
- };
-
- /**
- * @ngdoc function
- * @name getRow
- * @methodOf ui.grid.class:Grid
- * @description returns the GridRow that contains the rowEntity
- * @param {object} rowEntity the gridOptions.data array element instance
- * @param {array} rows [optional] the rows to look in - if not provided then
- * looks in grid.rows
- */
- Grid.prototype.getRow = function getRow(rowEntity, lookInRows) {
- var self = this;
-
- lookInRows = typeof(lookInRows) === 'undefined' ? self.rows : lookInRows;
-
- var rows = lookInRows.filter(function (row) {
- return self.options.rowEquality(row.entity, rowEntity);
- });
- return rows.length > 0 ? rows[0] : null;
- };
-
-
- /**
- * @ngdoc function
- * @name modifyRows
- * @methodOf ui.grid.class:Grid
- * @description creates or removes GridRow objects from the newRawData array. Calls each registered
- * rowBuilder to further process the row
- * @param {array} newRawData Modified set of data
- *
- * This method aims to achieve three things:
- * 1. the resulting rows array is in the same order as the newRawData, we'll call
- * rowsProcessors immediately after to sort the data anyway
- * 2. if we have row hashing available, we try to use the rowHash to find the row
- * 3. no memory leaks - rows that are no longer in newRawData need to be garbage collected
- *
- * The basic logic flow makes use of the newRawData, oldRows and oldHash, and creates
- * the newRows and newHash
- *
- * ```
- * newRawData.forEach newEntity
- * if (hashing enabled)
- * check oldHash for newEntity
- * else
- * look for old row directly in oldRows
- * if !oldRowFound // must be a new row
- * create newRow
- * append to the newRows and add to newHash
- * run the processors
- * ```
- *
- * Rows are identified using the hashKey if configured. If not configured, then rows
- * are identified using the gridOptions.rowEquality function
- *
- * This method is useful when trying to select rows immediately after loading data without
- * using a $timeout/$interval, e.g.:
- *
- * $scope.gridOptions.data = someData;
- * $scope.gridApi.grid.modifyRows($scope.gridOptions.data);
- * $scope.gridApi.selection.selectRow($scope.gridOptions.data[0]);
- *
- * OR to persist row selection after data update (e.g. rows selected, new data loaded, want
- * originally selected rows to be re-selected))
- */
- Grid.prototype.modifyRows = function modifyRows(newRawData) {
- var self = this;
- var oldRows = self.rows.slice(0);
- var oldRowHash = self.rowHashMap || self.createRowHashMap();
- self.rowHashMap = self.createRowHashMap();
- self.rows.length = 0;
-
- newRawData.forEach( function( newEntity, i ) {
- var newRow;
- if ( self.options.enableRowHashing ){
- // if hashing is enabled, then this row will be in the hash if we already know about it
- newRow = oldRowHash.get( newEntity );
- } else {
- // otherwise, manually search the oldRows to see if we can find this row
- newRow = self.getRow(newEntity, oldRows);
- }
-
- // if we didn't find the row, it must be new, so create it
- if ( !newRow ){
- newRow = self.processRowBuilders(new GridRow(newEntity, i, self));
- }
-
- self.rows.push( newRow );
- self.rowHashMap.put( newEntity, newRow );
- });
-
- self.assignTypes();
-
- var p1 = $q.when(self.processRowsProcessors(self.rows))
- .then(function (renderableRows) {
- return self.setVisibleRows(renderableRows);
- });
-
- var p2 = $q.when(self.processColumnsProcessors(self.columns))
- .then(function (renderableColumns) {
- return self.setVisibleColumns(renderableColumns);
- });
-
- return $q.all([p1, p2]);
- };
-
-
- /**
- * Private Undocumented Method
- * @name addRows
- * @methodOf ui.grid.class:Grid
- * @description adds the newRawData array of rows to the grid and calls all registered
- * rowBuilders. this keyword will reference the grid
- */
- Grid.prototype.addRows = function addRows(newRawData) {
- var self = this;
-
- var existingRowCount = self.rows.length;
- for (var i = 0; i < newRawData.length; i++) {
- var newRow = self.processRowBuilders(new GridRow(newRawData[i], i + existingRowCount, self));
-
- if (self.options.enableRowHashing) {
- var found = self.rowHashMap.get(newRow.entity);
- if (found) {
- found.row = newRow;
- }
- }
-
- self.rows.push(newRow);
- }
- };
-
- /**
- * @ngdoc function
- * @name processRowBuilders
- * @methodOf ui.grid.class:Grid
- * @description processes all RowBuilders for the gridRow
- * @param {GridRow} gridRow reference to gridRow
- * @returns {GridRow} the gridRow with all additional behavior added
- */
- Grid.prototype.processRowBuilders = function processRowBuilders(gridRow) {
- var self = this;
-
- self.rowBuilders.forEach(function (builder) {
- builder.call(self, gridRow, self.options);
- });
-
- return gridRow;
- };
-
- /**
- * @ngdoc function
- * @name registerStyleComputation
- * @methodOf ui.grid.class:Grid
- * @description registered a styleComputation function
- *
- * If the function returns a value it will be appended into the grid's `<style>` block
- * @param {function($scope)} styleComputation function
- */
- Grid.prototype.registerStyleComputation = function registerStyleComputation(styleComputationInfo) {
- this.styleComputations.push(styleComputationInfo);
- };
-
-
- // NOTE (c0bra): We already have rowBuilders. I think these do exactly the same thing...
- // Grid.prototype.registerRowFilter = function(filter) {
- // // TODO(c0bra): validate filter?
-
- // this.rowFilters.push(filter);
- // };
-
- // Grid.prototype.removeRowFilter = function(filter) {
- // var idx = this.rowFilters.indexOf(filter);
-
- // if (typeof(idx) !== 'undefined' && idx !== undefined) {
- // this.rowFilters.slice(idx, 1);
- // }
- // };
-
- // Grid.prototype.processRowFilters = function(rows) {
- // var self = this;
- // self.rowFilters.forEach(function (filter) {
- // filter.call(self, rows);
- // });
- // };
-
-
- /**
- * @ngdoc function
- * @name registerRowsProcessor
- * @methodOf ui.grid.class:Grid
- * @description
- *
- * Register a "rows processor" function. When the rows are updated,
- * the grid calls each registered "rows processor", which has a chance
- * to alter the set of rows (sorting, etc) as long as the count is not
- * modified.
- *
- * @param {function(renderedRowsToProcess, columns )} processorFunction rows processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and must
- * return the updated rows list, which is passed to the next processor in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject rows processors at intermediate priorities. Lower priority rowsProcessors run earlier.
- *
- * At present all rows visible is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- *
- */
- Grid.prototype.registerRowsProcessor = function registerRowsProcessor(processor, priority) {
- if (!angular.isFunction(processor)) {
- throw 'Attempt to register non-function rows processor: ' + processor;
- }
-
- this.rowsProcessors.push({processor: processor, priority: priority});
- this.rowsProcessors.sort(function sortByPriority( a, b ){
- return a.priority - b.priority;
- });
- };
-
- /**
- * @ngdoc function
- * @name removeRowsProcessor
- * @methodOf ui.grid.class:Grid
- * @param {function(renderableRows)} rows processor function
- * @description Remove a registered rows processor
- */
- Grid.prototype.removeRowsProcessor = function removeRowsProcessor(processor) {
- var idx = -1;
- this.rowsProcessors.forEach(function(rowsProcessor, index){
- if ( rowsProcessor.processor === processor ){
- idx = index;
- }
- });
-
- if ( idx !== -1 ) {
- this.rowsProcessors.splice(idx, 1);
- }
- };
-
- /**
- * Private Undocumented Method
- * @name processRowsProcessors
- * @methodOf ui.grid.class:Grid
- * @param {Array[GridRow]} The array of "renderable" rows
- * @param {Array[GridColumn]} The array of columns
- * @description Run all the registered rows processors on the array of renderable rows
- */
- Grid.prototype.processRowsProcessors = function processRowsProcessors(renderableRows) {
- var self = this;
-
- // Create a shallow copy of the rows so that we can safely sort them without altering the original grid.rows sort order
- var myRenderableRows = renderableRows.slice(0);
-
- // Return myRenderableRows with no processing if we have no rows processors
- if (self.rowsProcessors.length === 0) {
- return $q.when(myRenderableRows);
- }
-
- // Counter for iterating through rows processors
- var i = 0;
-
- // Promise for when we're done with all the processors
- var finished = $q.defer();
-
- // This function will call the processor in self.rowsProcessors at index 'i', and then
- // when done will call the next processor in the list, using the output from the processor
- // at i as the argument for 'renderedRowsToProcess' on the next iteration.
- //
- // If we're at the end of the list of processors, we resolve our 'finished' callback with
- // the result.
- function startProcessor(i, renderedRowsToProcess) {
- // Get the processor at 'i'
- var processor = self.rowsProcessors[i].processor;
-
- // Call the processor, passing in the rows to process and the current columns
- // (note: it's wrapped in $q.when() in case the processor does not return a promise)
- return $q.when( processor.call(self, renderedRowsToProcess, self.columns) )
- .then(function handleProcessedRows(processedRows) {
- // Check for errors
- if (!processedRows) {
- throw "Processor at index " + i + " did not return a set of renderable rows";
- }
-
- if (!angular.isArray(processedRows)) {
- throw "Processor at index " + i + " did not return an array";
- }
-
- // Processor is done, increment the counter
- i++;
-
- // If we're not done with the processors, call the next one
- if (i <= self.rowsProcessors.length - 1) {
- return startProcessor(i, processedRows);
- }
- // We're done! Resolve the 'finished' promise
- else {
- finished.resolve(processedRows);
- }
- });
- }
-
- // Start on the first processor
- startProcessor(0, myRenderableRows);
-
- return finished.promise;
- };
-
- Grid.prototype.setVisibleRows = function setVisibleRows(rows) {
- var self = this;
-
- // Reset all the render container row caches
- for (var i in self.renderContainers) {
- var container = self.renderContainers[i];
-
- container.canvasHeightShouldUpdate = true;
-
- if ( typeof(container.visibleRowCache) === 'undefined' ){
- container.visibleRowCache = [];
- } else {
- container.visibleRowCache.length = 0;
- }
- }
-
- // rows.forEach(function (row) {
- for (var ri = 0; ri < rows.length; ri++) {
- var row = rows[ri];
-
- var targetContainer = (typeof(row.renderContainer) !== 'undefined' && row.renderContainer) ? row.renderContainer : 'body';
-
- // If the row is visible
- if (row.visible) {
- self.renderContainers[targetContainer].visibleRowCache.push(row);
- }
- }
- self.api.core.raise.rowsRendered(this.api);
- };
-
- /**
- * @ngdoc function
- * @name registerColumnsProcessor
- * @methodOf ui.grid.class:Grid
- * @param {function(renderedColumnsToProcess, rows)} columnProcessor column processor function, which
- * is run in the context of the grid (i.e. this for the function will be the grid), and
- * which must return an updated renderedColumnsToProcess which can be passed to the next processor
- * in the chain
- * @param {number} priority the priority of this processor. In general we try to do them in 100s to leave room
- * for other people to inject columns processors at intermediate priorities. Lower priority columnsProcessors run earlier.
- *
- * At present all rows visible is running at 50, filter is running at 100, sort is at 200, grouping at 400, selectable rows at 500, pagination at 900 (pagination will generally want to be last)
- * @description
-
- Register a "columns processor" function. When the columns are updated,
- the grid calls each registered "columns processor", which has a chance
- to alter the set of columns, as long as the count is not modified.
- */
- Grid.prototype.registerColumnsProcessor = function registerColumnsProcessor(processor, priority) {
- if (!angular.isFunction(processor)) {
- throw 'Attempt to register non-function rows processor: ' + processor;
- }
-
- this.columnsProcessors.push({processor: processor, priority: priority});
- this.columnsProcessors.sort(function sortByPriority( a, b ){
- return a.priority - b.priority;
- });
- };
-
- Grid.prototype.removeColumnsProcessor = function removeColumnsProcessor(processor) {
- var idx = this.columnsProcessors.indexOf(processor);
-
- if (typeof(idx) !== 'undefined' && idx !== undefined) {
- this.columnsProcessors.splice(idx, 1);
- }
- };
-
- Grid.prototype.processColumnsProcessors = function processColumnsProcessors(renderableColumns) {
- var self = this;
-
- // Create a shallow copy of the rows so that we can safely sort them without altering the original grid.rows sort order
- var myRenderableColumns = renderableColumns.slice(0);
-
- // Return myRenderableRows with no processing if we have no rows processors
- if (self.columnsProcessors.length === 0) {
- return $q.when(myRenderableColumns);
- }
-
- // Counter for iterating through rows processors
- var i = 0;
-
- // Promise for when we're done with all the processors
- var finished = $q.defer();
-
- // This function will call the processor in self.rowsProcessors at index 'i', and then
- // when done will call the next processor in the list, using the output from the processor
- // at i as the argument for 'renderedRowsToProcess' on the next iteration.
- //
- // If we're at the end of the list of processors, we resolve our 'finished' callback with
- // the result.
- function startProcessor(i, renderedColumnsToProcess) {
- // Get the processor at 'i'
- var processor = self.columnsProcessors[i].processor;
-
- // Call the processor, passing in the rows to process and the current columns
- // (note: it's wrapped in $q.when() in case the processor does not return a promise)
- return $q.when( processor.call(self, renderedColumnsToProcess, self.rows) )
- .then(function handleProcessedRows(processedColumns) {
- // Check for errors
- if (!processedColumns) {
- throw "Processor at index " + i + " did not return a set of renderable rows";
- }
-
- if (!angular.isArray(processedColumns)) {
- throw "Processor at index " + i + " did not return an array";
- }
-
- // Processor is done, increment the counter
- i++;
-
- // If we're not done with the processors, call the next one
- if (i <= self.columnsProcessors.length - 1) {
- return startProcessor(i, myRenderableColumns);
- }
- // We're done! Resolve the 'finished' promise
- else {
- finished.resolve(myRenderableColumns);
- }
- });
- }
-
- // Start on the first processor
- startProcessor(0, myRenderableColumns);
-
- return finished.promise;
- };
-
- Grid.prototype.setVisibleColumns = function setVisibleColumns(columns) {
- // gridUtil.logDebug('setVisibleColumns');
-
- var self = this;
-
- // Reset all the render container row caches
- for (var i in self.renderContainers) {
- var container = self.renderContainers[i];
-
- container.visibleColumnCache.length = 0;
- }
-
- for (var ci = 0; ci < columns.length; ci++) {
- var column = columns[ci];
-
- // If the column is visible
- if (column.visible) {
- // If the column has a container specified
- if (typeof(column.renderContainer) !== 'undefined' && column.renderContainer) {
- self.renderContainers[column.renderContainer].visibleColumnCache.push(column);
- }
- // If not, put it into the body container
- else {
- self.renderContainers.body.visibleColumnCache.push(column);
- }
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name handleWindowResize
- * @methodOf ui.grid.class:Grid
- * @description Triggered when the browser window resizes; automatically resizes the grid
- */
- Grid.prototype.handleWindowResize = function handleWindowResize($event) {
- var self = this;
-
- self.gridWidth = gridUtil.elementWidth(self.element);
- self.gridHeight = gridUtil.elementHeight(self.element);
-
- self.queueRefresh();
- };
-
- /**
- * @ngdoc function
- * @name queueRefresh
- * @methodOf ui.grid.class:Grid
- * @description queues a grid refreshCanvas, a way of debouncing all the refreshes we might otherwise issue
- */
- Grid.prototype.queueRefresh = function queueRefresh() {
- var self = this;
-
- if (self.refreshCanceller) {
- $timeout.cancel(self.refreshCanceller);
- }
-
- self.refreshCanceller = $timeout(function () {
- self.refreshCanvas(true);
- });
-
- self.refreshCanceller.then(function () {
- self.refreshCanceller = null;
- });
-
- return self.refreshCanceller;
- };
-
-
- /**
- * @ngdoc function
- * @name queueGridRefresh
- * @methodOf ui.grid.class:Grid
- * @description queues a grid refresh, a way of debouncing all the refreshes we might otherwise issue
- */
- Grid.prototype.queueGridRefresh = function queueGridRefresh() {
- var self = this;
-
- if (self.gridRefreshCanceller) {
- $timeout.cancel(self.gridRefreshCanceller);
- }
-
- self.gridRefreshCanceller = $timeout(function () {
- self.refresh(true);
- });
-
- self.gridRefreshCanceller.then(function () {
- self.gridRefreshCanceller = null;
- });
-
- return self.gridRefreshCanceller;
- };
-
-
- /**
- * @ngdoc function
- * @name updateCanvasHeight
- * @methodOf ui.grid.class:Grid
- * @description flags all render containers to update their canvas height
- */
- Grid.prototype.updateCanvasHeight = function updateCanvasHeight() {
- var self = this;
-
- for (var containerId in self.renderContainers) {
- if (self.renderContainers.hasOwnProperty(containerId)) {
- var container = self.renderContainers[containerId];
- container.canvasHeightShouldUpdate = true;
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name buildStyles
- * @methodOf ui.grid.class:Grid
- * @description calls each styleComputation function
- */
- // TODO: this used to take $scope, but couldn't see that it was used
- Grid.prototype.buildStyles = function buildStyles() {
- // gridUtil.logDebug('buildStyles');
-
- var self = this;
-
- self.customStyles = '';
-
- self.styleComputations
- .sort(function(a, b) {
- if (a.priority === null) { return 1; }
- if (b.priority === null) { return -1; }
- if (a.priority === null && b.priority === null) { return 0; }
- return a.priority - b.priority;
- })
- .forEach(function (compInfo) {
- // this used to provide $scope as a second parameter, but I couldn't find any
- // style builders that used it, so removed it as part of moving to grid from controller
- var ret = compInfo.func.call(self);
-
- if (angular.isString(ret)) {
- self.customStyles += '\n' + ret;
- }
- });
- };
-
-
- Grid.prototype.minColumnsToRender = function minColumnsToRender() {
- var self = this;
- var viewport = this.getViewportWidth();
-
- var min = 0;
- var totalWidth = 0;
- self.columns.forEach(function(col, i) {
- if (totalWidth < viewport) {
- totalWidth += col.drawnWidth;
- min++;
- }
- else {
- var currWidth = 0;
- for (var j = i; j >= i - min; j--) {
- currWidth += self.columns[j].drawnWidth;
- }
- if (currWidth < viewport) {
- min++;
- }
- }
- });
-
- return min;
- };
-
- Grid.prototype.getBodyHeight = function getBodyHeight() {
- // Start with the viewportHeight
- var bodyHeight = this.getViewportHeight();
-
- // Add the horizontal scrollbar height if there is one
- //if (typeof(this.horizontalScrollbarHeight) !== 'undefined' && this.horizontalScrollbarHeight !== undefined && this.horizontalScrollbarHeight > 0) {
- // bodyHeight = bodyHeight + this.horizontalScrollbarHeight;
- //}
-
- return bodyHeight;
- };
-
- // NOTE: viewport drawable height is the height of the grid minus the header row height (including any border)
- // TODO(c0bra): account for footer height
- Grid.prototype.getViewportHeight = function getViewportHeight() {
- var self = this;
-
- var viewPortHeight = this.gridHeight - this.headerHeight - this.footerHeight;
-
- // Account for native horizontal scrollbar, if present
- //if (typeof(this.horizontalScrollbarHeight) !== 'undefined' && this.horizontalScrollbarHeight !== undefined && this.horizontalScrollbarHeight > 0) {
- // viewPortHeight = viewPortHeight - this.horizontalScrollbarHeight;
- //}
-
- var adjustment = self.getViewportAdjustment();
-
- viewPortHeight = viewPortHeight + adjustment.height;
-
- //gridUtil.logDebug('viewPortHeight', viewPortHeight);
-
- return viewPortHeight;
- };
-
- Grid.prototype.getViewportWidth = function getViewportWidth() {
- var self = this;
-
- var viewPortWidth = this.gridWidth;
-
- //if (typeof(this.verticalScrollbarWidth) !== 'undefined' && this.verticalScrollbarWidth !== undefined && this.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth - this.verticalScrollbarWidth;
- //}
-
- var adjustment = self.getViewportAdjustment();
-
- viewPortWidth = viewPortWidth + adjustment.width;
-
- //gridUtil.logDebug('getviewPortWidth', viewPortWidth);
-
- return viewPortWidth;
- };
-
- Grid.prototype.getHeaderViewportWidth = function getHeaderViewportWidth() {
- var viewPortWidth = this.getViewportWidth();
-
- //if (typeof(this.verticalScrollbarWidth) !== 'undefined' && this.verticalScrollbarWidth !== undefined && this.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth + this.verticalScrollbarWidth;
- //}
-
- return viewPortWidth;
- };
-
- Grid.prototype.addVerticalScrollSync = function (containerId, callBackFn) {
- this.verticalScrollSyncCallBackFns[containerId] = callBackFn;
- };
-
- Grid.prototype.addHorizontalScrollSync = function (containerId, callBackFn) {
- this.horizontalScrollSyncCallBackFns[containerId] = callBackFn;
- };
-
-/**
- * Scroll needed containers by calling their ScrollSyncs
- * @param sourceContainerId the containerId that has already set it's top/left.
- * can be empty string which means all containers need to set top/left
- * @param scrollEvent
- */
- Grid.prototype.scrollContainers = function (sourceContainerId, scrollEvent) {
-
- if (scrollEvent.y) {
- //default for no container Id (ex. mousewheel means that all containers must set scrollTop/Left)
- var verts = ['body','left', 'right'];
-
- this.flagScrollingVertically(scrollEvent);
-
- if (sourceContainerId === 'body') {
- verts = ['left', 'right'];
- }
- else if (sourceContainerId === 'left') {
- verts = ['body', 'right'];
- }
- else if (sourceContainerId === 'right') {
- verts = ['body', 'left'];
- }
-
- for (var i = 0; i < verts.length; i++) {
- var id = verts[i];
- if (this.verticalScrollSyncCallBackFns[id]) {
- this.verticalScrollSyncCallBackFns[id](scrollEvent);
- }
- }
-
- }
-
- if (scrollEvent.x) {
- //default for no container Id (ex. mousewheel means that all containers must set scrollTop/Left)
- var horizs = ['body','bodyheader', 'bodyfooter'];
-
- this.flagScrollingHorizontally(scrollEvent);
- if (sourceContainerId === 'body') {
- horizs = ['bodyheader', 'bodyfooter'];
- }
-
- for (var j = 0; j < horizs.length; j++) {
- var idh = horizs[j];
- if (this.horizontalScrollSyncCallBackFns[idh]) {
- this.horizontalScrollSyncCallBackFns[idh](scrollEvent);
- }
- }
-
- }
-
- };
-
- Grid.prototype.registerViewportAdjuster = function registerViewportAdjuster(func) {
- this.viewportAdjusters.push(func);
- };
-
- Grid.prototype.removeViewportAdjuster = function registerViewportAdjuster(func) {
- var idx = this.viewportAdjusters.indexOf(func);
-
- if (typeof(idx) !== 'undefined' && idx !== undefined) {
- this.viewportAdjusters.splice(idx, 1);
- }
- };
-
- Grid.prototype.getViewportAdjustment = function getViewportAdjustment() {
- var self = this;
-
- var adjustment = { height: 0, width: 0 };
-
- self.viewportAdjusters.forEach(function (func) {
- adjustment = func.call(this, adjustment);
- });
-
- return adjustment;
- };
-
- Grid.prototype.getVisibleRowCount = function getVisibleRowCount() {
- // var count = 0;
-
- // this.rows.forEach(function (row) {
- // if (row.visible) {
- // count++;
- // }
- // });
-
- // return this.visibleRowCache.length;
- return this.renderContainers.body.visibleRowCache.length;
- };
-
- Grid.prototype.getVisibleRows = function getVisibleRows() {
- return this.renderContainers.body.visibleRowCache;
- };
-
- Grid.prototype.getVisibleColumnCount = function getVisibleColumnCount() {
- // var count = 0;
-
- // this.rows.forEach(function (row) {
- // if (row.visible) {
- // count++;
- // }
- // });
-
- // return this.visibleRowCache.length;
- return this.renderContainers.body.visibleColumnCache.length;
- };
-
-
- Grid.prototype.searchRows = function searchRows(renderableRows) {
- return rowSearcher.search(this, renderableRows, this.columns);
- };
-
- Grid.prototype.sortByColumn = function sortByColumn(renderableRows) {
- return rowSorter.sort(this, renderableRows, this.columns);
- };
-
- /**
- * @ngdoc function
- * @name getCellValue
- * @methodOf ui.grid.class:Grid
- * @description Gets the value of a cell for a particular row and column
- * @param {GridRow} row Row to access
- * @param {GridColumn} col Column to access
- */
- Grid.prototype.getCellValue = function getCellValue(row, col){
- if ( typeof(row.entity[ '$$' + col.uid ]) !== 'undefined' ) {
- return row.entity[ '$$' + col.uid].rendered;
- } else if (this.options.flatEntityAccess && typeof(col.field) !== 'undefined' ){
- return row.entity[col.field];
- } else {
- if (!col.cellValueGetterCache) {
- col.cellValueGetterCache = $parse(row.getEntityQualifiedColField(col));
- }
-
- return col.cellValueGetterCache(row);
- }
- };
-
- /**
- * @ngdoc function
- * @name getCellDisplayValue
- * @methodOf ui.grid.class:Grid
- * @description Gets the displayed value of a cell after applying any the `cellFilter`
- * @param {GridRow} row Row to access
- * @param {GridColumn} col Column to access
- */
- Grid.prototype.getCellDisplayValue = function getCellDisplayValue(row, col) {
- if ( !col.cellDisplayGetterCache ) {
- var custom_filter = col.cellFilter ? " | " + col.cellFilter : "";
-
- if (typeof(row.entity['$$' + col.uid]) !== 'undefined') {
- col.cellDisplayGetterCache = $parse(row.entity['$$' + col.uid].rendered + custom_filter);
- } else if (this.options.flatEntityAccess && typeof(col.field) !== 'undefined') {
- col.cellDisplayGetterCache = $parse(row.entity[col.field] + custom_filter);
- } else {
- col.cellDisplayGetterCache = $parse(row.getEntityQualifiedColField(col) + custom_filter);
- }
- }
-
- return col.cellDisplayGetterCache(row);
- };
-
-
- Grid.prototype.getNextColumnSortPriority = function getNextColumnSortPriority() {
- var self = this,
- p = 0;
-
- self.columns.forEach(function (col) {
- if (col.sort && col.sort.priority && col.sort.priority > p) {
- p = col.sort.priority;
- }
- });
-
- return p + 1;
- };
-
- /**
- * @ngdoc function
- * @name resetColumnSorting
- * @methodOf ui.grid.class:Grid
- * @description Return the columns that the grid is currently being sorted by
- * @param {GridColumn} [excludedColumn] Optional GridColumn to exclude from having its sorting reset
- */
- Grid.prototype.resetColumnSorting = function resetColumnSorting(excludeCol) {
- var self = this;
-
- self.columns.forEach(function (col) {
- if (col !== excludeCol && !col.suppressRemoveSort) {
- col.sort = {};
- }
- });
- };
-
- /**
- * @ngdoc function
- * @name getColumnSorting
- * @methodOf ui.grid.class:Grid
- * @description Return the columns that the grid is currently being sorted by
- * @returns {Array[GridColumn]} An array of GridColumn objects
- */
- Grid.prototype.getColumnSorting = function getColumnSorting() {
- var self = this;
-
- var sortedCols = [], myCols;
-
- // Iterate through all the columns, sorted by priority
- // Make local copy of column list, because sorting is in-place and we do not want to
- // change the original sequence of columns
- myCols = self.columns.slice(0);
- myCols.sort(rowSorter.prioritySort).forEach(function (col) {
- if (col.sort && typeof(col.sort.direction) !== 'undefined' && col.sort.direction && (col.sort.direction === uiGridConstants.ASC || col.sort.direction === uiGridConstants.DESC)) {
- sortedCols.push(col);
- }
- });
-
- return sortedCols;
- };
-
- /**
- * @ngdoc function
- * @name sortColumn
- * @methodOf ui.grid.class:Grid
- * @description Set the sorting on a given column, optionally resetting any existing sorting on the Grid.
- * Emits the sortChanged event whenever the sort criteria are changed.
- * @param {GridColumn} column Column to set the sorting on
- * @param {uiGridConstants.ASC|uiGridConstants.DESC} [direction] Direction to sort by, either descending or ascending.
- * If not provided, the column will iterate through the sort directions
- * specified in the {@link ui.grid.class:GridOptions.columnDef#sortDirectionCycle sortDirectionCycle} attribute.
- * @param {boolean} [add] Add this column to the sorting. If not provided or set to `false`, the Grid will reset any existing sorting and sort
- * by this column only
- * @returns {Promise} A resolved promise that supplies the column.
- */
-
- Grid.prototype.sortColumn = function sortColumn(column, directionOrAdd, add) {
- var self = this,
- direction = null;
-
- if (typeof(column) === 'undefined' || !column) {
- throw new Error('No column parameter provided');
- }
-
- // Second argument can either be a direction or whether to add this column to the existing sort.
- // If it's a boolean, it's an add, otherwise, it's a direction
- if (typeof(directionOrAdd) === 'boolean') {
- add = directionOrAdd;
- }
- else {
- direction = directionOrAdd;
- }
-
- if (!add) {
- self.resetColumnSorting(column);
- column.sort.priority = 0;
- // Get the actual priority since there may be columns which have suppressRemoveSort set
- column.sort.priority = self.getNextColumnSortPriority();
- }
- else if (!column.sort.priority){
- column.sort.priority = self.getNextColumnSortPriority();
- }
-
- if (!direction) {
- // Find the current position in the cycle (or -1).
- var i = column.sortDirectionCycle.indexOf(column.sort.direction ? column.sort.direction : null);
- // Proceed to the next position in the cycle (or start at the beginning).
- i = (i+1) % column.sortDirectionCycle.length;
- // If suppressRemoveSort is set, and the next position in the cycle would
- // remove the sort, skip it.
- if (column.colDef && column.suppressRemoveSort && !column.sortDirectionCycle[i]) {
- i = (i+1) % column.sortDirectionCycle.length;
- }
-
- if (column.sortDirectionCycle[i]) {
- column.sort.direction = column.sortDirectionCycle[i];
- } else {
- column.sort = {};
- }
- }
- else {
- column.sort.direction = direction;
- }
-
- self.api.core.raise.sortChanged( self, self.getColumnSorting() );
-
- return $q.when(column);
- };
-
- /**
- * communicate to outside world that we are done with initial rendering
- */
- Grid.prototype.renderingComplete = function(){
- if (angular.isFunction(this.options.onRegisterApi)) {
- this.options.onRegisterApi(this.api);
- }
- this.api.core.raise.renderingComplete( this.api );
- };
-
- Grid.prototype.createRowHashMap = function createRowHashMap() {
- var self = this;
-
- var hashMap = new RowHashMap();
- hashMap.grid = self;
-
- return hashMap;
- };
-
-
- /**
- * @ngdoc function
- * @name refresh
- * @methodOf ui.grid.class:Grid
- * @description Refresh the rendered grid on screen.
- * @param {boolean} [rowsAltered] Optional flag for refreshing when the number of rows has changed.
- */
- Grid.prototype.refresh = function refresh(rowsAltered) {
- var self = this;
-
- var p1 = self.processRowsProcessors(self.rows).then(function (renderableRows) {
- self.setVisibleRows(renderableRows);
- });
-
- var p2 = self.processColumnsProcessors(self.columns).then(function (renderableColumns) {
- self.setVisibleColumns(renderableColumns);
- });
-
- return $q.all([p1, p2]).then(function () {
- self.redrawInPlace(rowsAltered);
-
- self.refreshCanvas(true);
- });
- };
-
- /**
- * @ngdoc function
- * @name refreshRows
- * @methodOf ui.grid.class:Grid
- * @description Refresh the rendered rows on screen? Note: not functional at present
- * @returns {promise} promise that is resolved when render completes?
- *
- */
- Grid.prototype.refreshRows = function refreshRows() {
- var self = this;
-
- return self.processRowsProcessors(self.rows)
- .then(function (renderableRows) {
- self.setVisibleRows(renderableRows);
-
- self.redrawInPlace();
-
- self.refreshCanvas( true );
- });
- };
-
- /**
- * @ngdoc function
- * @name refreshCanvas
- * @methodOf ui.grid.class:Grid
- * @description Builds all styles and recalculates much of the grid sizing
- * @param {object} buildStyles optional parameter. Use TBD
- * @returns {promise} promise that is resolved when the canvas
- * has been refreshed
- *
- */
- Grid.prototype.refreshCanvas = function(buildStyles) {
- var self = this;
-
- if (buildStyles) {
- self.buildStyles();
- }
-
- var p = $q.defer();
-
- // Get all the header heights
- var containerHeadersToRecalc = [];
- for (var containerId in self.renderContainers) {
- if (self.renderContainers.hasOwnProperty(containerId)) {
- var container = self.renderContainers[containerId];
-
- // Skip containers that have no canvasWidth set yet
- if (container.canvasWidth === null || isNaN(container.canvasWidth)) {
- continue;
- }
-
- if (container.header || container.headerCanvas) {
- container.explicitHeaderHeight = container.explicitHeaderHeight || null;
- container.explicitHeaderCanvasHeight = container.explicitHeaderCanvasHeight || null;
-
- containerHeadersToRecalc.push(container);
- }
- }
- }
-
- /*
- *
- * Here we loop through the headers, measuring each element as well as any header "canvas" it has within it.
- *
- * If any header is less than the largest header height, it will be resized to that so that we don't have headers
- * with different heights, which looks like a rendering problem
- *
- * We'll do the same thing with the header canvases, and give the header CELLS an explicit height if their canvas
- * is smaller than the largest canvas height. That was header cells without extra controls like filtering don't
- * appear shorter than other cells.
- *
- */
- if (containerHeadersToRecalc.length > 0) {
- // Build the styles without the explicit header heights
- if (buildStyles) {
- self.buildStyles();
- }
-
- // Putting in a timeout as it's not calculating after the grid element is rendered and filled out
- $timeout(function() {
- // var oldHeaderHeight = self.grid.headerHeight;
- // self.grid.headerHeight = gridUtil.outerElementHeight(self.header);
-
- var rebuildStyles = false;
-
- // Get all the header heights
- var maxHeaderHeight = 0;
- var maxHeaderCanvasHeight = 0;
- var i, container;
- var getHeight = function(oldVal, newVal){
- if ( oldVal !== newVal){
- rebuildStyles = true;
- }
- return newVal;
- };
- for (i = 0; i < containerHeadersToRecalc.length; i++) {
- container = containerHeadersToRecalc[i];
-
- // Skip containers that have no canvasWidth set yet
- if (container.canvasWidth === null || isNaN(container.canvasWidth)) {
- continue;
- }
-
- if (container.header) {
- var headerHeight = container.headerHeight = getHeight(container.headerHeight, parseInt(gridUtil.outerElementHeight(container.header), 10));
-
- // Get the "inner" header height, that is the height minus the top and bottom borders, if present. We'll use it to make sure all the headers have a consistent height
- var topBorder = gridUtil.getBorderSize(container.header, 'top');
- var bottomBorder = gridUtil.getBorderSize(container.header, 'bottom');
- var innerHeaderHeight = parseInt(headerHeight - topBorder - bottomBorder, 10);
-
- innerHeaderHeight = innerHeaderHeight < 0 ? 0 : innerHeaderHeight;
-
- container.innerHeaderHeight = innerHeaderHeight;
-
- // If the header doesn't have an explicit height set, save the largest header height for use later
- // Explicit header heights are based off of the max we are calculating here. We never want to base the max on something we're setting explicitly
- if (!container.explicitHeaderHeight && innerHeaderHeight > maxHeaderHeight) {
- maxHeaderHeight = innerHeaderHeight;
- }
- }
-
- if (container.headerCanvas) {
- var headerCanvasHeight = container.headerCanvasHeight = getHeight(container.headerCanvasHeight, parseInt(gridUtil.outerElementHeight(container.headerCanvas), 10));
-
-
- // If the header doesn't have an explicit canvas height, save the largest header canvas height for use later
- // Explicit header heights are based off of the max we are calculating here. We never want to base the max on something we're setting explicitly
- if (!container.explicitHeaderCanvasHeight && headerCanvasHeight > maxHeaderCanvasHeight) {
- maxHeaderCanvasHeight = headerCanvasHeight;
- }
- }
- }
-
- // Go through all the headers
- for (i = 0; i < containerHeadersToRecalc.length; i++) {
- container = containerHeadersToRecalc[i];
-
- /* If:
- 1. We have a max header height
- 2. This container has a header height defined
- 3. And either this container has an explicit header height set, OR its header height is less than the max
-
- then:
-
- Give this container's header an explicit height so it will line up with the tallest header
- */
- if (
- maxHeaderHeight > 0 && typeof(container.headerHeight) !== 'undefined' && container.headerHeight !== null &&
- (container.explicitHeaderHeight || container.headerHeight < maxHeaderHeight)
- ) {
- container.explicitHeaderHeight = getHeight(container.explicitHeaderHeight, maxHeaderHeight);
- }
-
- // Do the same as above except for the header canvas
- if (
- maxHeaderCanvasHeight > 0 && typeof(container.headerCanvasHeight) !== 'undefined' && container.headerCanvasHeight !== null &&
- (container.explicitHeaderCanvasHeight || container.headerCanvasHeight < maxHeaderCanvasHeight)
- ) {
- container.explicitHeaderCanvasHeight = getHeight(container.explicitHeaderCanvasHeight, maxHeaderCanvasHeight);
- }
- }
-
- // Rebuild styles if the header height has changed
- // The header height is used in body/viewport calculations and those are then used in other styles so we need it to be available
- if (buildStyles && rebuildStyles) {
- self.buildStyles();
- }
-
- p.resolve();
- });
- }
- else {
- // Timeout still needs to be here to trigger digest after styles have been rebuilt
- $timeout(function() {
- p.resolve();
- });
- }
-
- return p.promise;
- };
-
-
- /**
- * @ngdoc function
- * @name redrawCanvas
- * @methodOf ui.grid.class:Grid
- * @description Redraw the rows and columns based on our current scroll position
- * @param {boolean} [rowsAdded] Optional to indicate rows are added and the scroll percentage must be recalculated
- *
- */
- Grid.prototype.redrawInPlace = function redrawInPlace(rowsAdded) {
- // gridUtil.logDebug('redrawInPlace');
-
- var self = this;
-
- for (var i in self.renderContainers) {
- var container = self.renderContainers[i];
-
- // gridUtil.logDebug('redrawing container', i);
-
- if (rowsAdded) {
- container.adjustRows(container.prevScrollTop, null);
- container.adjustColumns(container.prevScrollLeft, null);
- }
- else {
- container.adjustRows(null, container.prevScrolltopPercentage);
- container.adjustColumns(null, container.prevScrollleftPercentage);
- }
- }
- };
-
- /**
- * @ngdoc function
- * @name hasLeftContainerColumns
- * @methodOf ui.grid.class:Grid
- * @description returns true if leftContainer has columns
- */
- Grid.prototype.hasLeftContainerColumns = function () {
- return this.hasLeftContainer() && this.renderContainers.left.renderedColumns.length > 0;
- };
-
- /**
- * @ngdoc function
- * @name hasRightContainerColumns
- * @methodOf ui.grid.class:Grid
- * @description returns true if rightContainer has columns
- */
- Grid.prototype.hasRightContainerColumns = function () {
- return this.hasRightContainer() && this.renderContainers.right.renderedColumns.length > 0;
- };
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:Grid
- * @name scrollToIfNecessary
- * @description Scrolls the grid to make a certain row and column combo visible,
- * in the case that it is not completely visible on the screen already.
- * @param {GridRow} gridRow row to make visible
- * @param {GridCol} gridCol column to make visible
- * @returns {promise} a promise that is resolved when scrolling is complete
- */
- Grid.prototype.scrollToIfNecessary = function (gridRow, gridCol) {
- var self = this;
-
- var scrollEvent = new ScrollEvent(self, 'uiGrid.scrollToIfNecessary');
-
- // Alias the visible row and column caches
- var visRowCache = self.renderContainers.body.visibleRowCache;
- var visColCache = self.renderContainers.body.visibleColumnCache;
-
- /*-- Get the top, left, right, and bottom "scrolled" edges of the grid --*/
-
- // The top boundary is the current Y scroll position PLUS the header height, because the header can obscure rows when the grid is scrolled downwards
- var topBound = self.renderContainers.body.prevScrollTop + self.headerHeight;
-
- // Don't the let top boundary be less than 0
- topBound = (topBound < 0) ? 0 : topBound;
-
- // The left boundary is the current X scroll position
- var leftBound = self.renderContainers.body.prevScrollLeft;
-
- // The bottom boundary is the current Y scroll position, plus the height of the grid, but minus the header height.
- // Basically this is the viewport height added on to the scroll position
- var bottomBound = self.renderContainers.body.prevScrollTop + self.gridHeight - self.renderContainers.body.headerHeight - self.footerHeight - self.scrollbarWidth;
-
- // If there's a horizontal scrollbar, remove its height from the bottom boundary, otherwise we'll be letting it obscure rows
- //if (self.horizontalScrollbarHeight) {
- // bottomBound = bottomBound - self.horizontalScrollbarHeight;
- //}
-
- // The right position is the current X scroll position minus the grid width
- var rightBound = self.renderContainers.body.prevScrollLeft + Math.ceil(self.renderContainers.body.getViewportWidth());
-
- // If there's a vertical scrollbar, subtract it from the right boundary or we'll allow it to obscure cells
- //if (self.verticalScrollbarWidth) {
- // rightBound = rightBound - self.verticalScrollbarWidth;
- //}
-
- // We were given a row to scroll to
- if (gridRow !== null) {
- // This is the index of the row we want to scroll to, within the list of rows that can be visible
- var seekRowIndex = visRowCache.indexOf(gridRow);
-
- // Total vertical scroll length of the grid
- var scrollLength = (self.renderContainers.body.getCanvasHeight() - self.renderContainers.body.getViewportHeight());
-
- // Add the height of the native horizontal scrollbar to the scroll length, if it's there. Otherwise it will mask over the final row
- //if (self.horizontalScrollbarHeight && self.horizontalScrollbarHeight > 0) {
- // scrollLength = scrollLength + self.horizontalScrollbarHeight;
- //}
-
- // This is the minimum amount of pixels we need to scroll vertical in order to see this row.
- var pixelsToSeeRow = ((seekRowIndex + 1) * self.options.rowHeight);
-
- // Don't let the pixels required to see the row be less than zero
- pixelsToSeeRow = (pixelsToSeeRow < 0) ? 0 : pixelsToSeeRow;
-
- var scrollPixels, percentage;
-
- // If the scroll position we need to see the row is LESS than the top boundary, i.e. obscured above the top of the self...
- if (pixelsToSeeRow < topBound) {
- // Get the different between the top boundary and the required scroll position and subtract it from the current scroll position\
- // to get the full position we need
- scrollPixels = self.renderContainers.body.prevScrollTop - (topBound - pixelsToSeeRow);
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- percentage = scrollPixels / scrollLength;
- scrollEvent.y = { percentage: percentage };
- }
- // Otherwise if the scroll position we need to see the row is MORE than the bottom boundary, i.e. obscured below the bottom of the self...
- else if (pixelsToSeeRow > bottomBound) {
- // Get the different between the bottom boundary and the required scroll position and add it to the current scroll position
- // to get the full position we need
- scrollPixels = pixelsToSeeRow - bottomBound + self.renderContainers.body.prevScrollTop;
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- percentage = scrollPixels / scrollLength;
- scrollEvent.y = { percentage: percentage };
- }
- }
-
- // We were given a column to scroll to
- if (gridCol !== null) {
- // This is the index of the row we want to scroll to, within the list of rows that can be visible
- var seekColumnIndex = visColCache.indexOf(gridCol);
-
- // Total vertical scroll length of the grid
- var horizScrollLength = (self.renderContainers.body.getCanvasWidth() - self.renderContainers.body.getViewportWidth());
-
- // Add the height of the native horizontal scrollbar to the scroll length, if it's there. Otherwise it will mask over the final row
- // if (self.verticalScrollbarWidth && self.verticalScrollbarWidth > 0) {
- // horizScrollLength = horizScrollLength + self.verticalScrollbarWidth;
- // }
-
- // This is the minimum amount of pixels we need to scroll vertical in order to see this column
- var columnLeftEdge = 0;
- for (var i = 0; i < seekColumnIndex; i++) {
- var col = visColCache[i];
- columnLeftEdge += col.drawnWidth;
- }
- columnLeftEdge = (columnLeftEdge < 0) ? 0 : columnLeftEdge;
-
- var columnRightEdge = columnLeftEdge + gridCol.drawnWidth;
-
- // Don't let the pixels required to see the column be less than zero
- columnRightEdge = (columnRightEdge < 0) ? 0 : columnRightEdge;
-
- var horizScrollPixels, horizPercentage;
-
- // If the scroll position we need to see the row is LESS than the top boundary, i.e. obscured above the top of the self...
- if (columnLeftEdge < leftBound) {
- // Get the different between the top boundary and the required scroll position and subtract it from the current scroll position\
- // to get the full position we need
- horizScrollPixels = self.renderContainers.body.prevScrollLeft - (leftBound - columnLeftEdge);
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- horizPercentage = horizScrollPixels / horizScrollLength;
- horizPercentage = (horizPercentage > 1) ? 1 : horizPercentage;
- scrollEvent.x = { percentage: horizPercentage };
- }
- // Otherwise if the scroll position we need to see the row is MORE than the bottom boundary, i.e. obscured below the bottom of the self...
- else if (columnRightEdge > rightBound) {
- // Get the different between the bottom boundary and the required scroll position and add it to the current scroll position
- // to get the full position we need
- horizScrollPixels = columnRightEdge - rightBound + self.renderContainers.body.prevScrollLeft;
-
- // Turn the scroll position into a percentage and make it an argument for a scroll event
- horizPercentage = horizScrollPixels / horizScrollLength;
- horizPercentage = (horizPercentage > 1) ? 1 : horizPercentage;
- scrollEvent.x = { percentage: horizPercentage };
- }
- }
-
- var deferred = $q.defer();
-
- // If we need to scroll on either the x or y axes, fire a scroll event
- if (scrollEvent.y || scrollEvent.x) {
- scrollEvent.withDelay = false;
- self.scrollContainers('',scrollEvent);
- var dereg = self.api.core.on.scrollEnd(null,function() {
- deferred.resolve(scrollEvent);
- dereg();
- });
- }
- else {
- deferred.resolve();
- }
-
- return deferred.promise;
- };
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:Grid
- * @name scrollTo
- * @description Scroll the grid such that the specified
- * row and column is in view
- * @param {object} rowEntity gridOptions.data[] array instance to make visible
- * @param {object} colDef to make visible
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- Grid.prototype.scrollTo = function (rowEntity, colDef) {
- var gridRow = null, gridCol = null;
-
- if (rowEntity !== null && typeof(rowEntity) !== 'undefined' ) {
- gridRow = this.getRow(rowEntity);
- }
-
- if (colDef !== null && typeof(colDef) !== 'undefined' ) {
- gridCol = this.getColumn(colDef.name ? colDef.name : colDef.field);
- }
- return this.scrollToIfNecessary(gridRow, gridCol);
- };
-
- /**
- * @ngdoc function
- * @name clearAllFilters
- * @methodOf ui.grid.class:Grid
- * @description Clears all filters and optionally refreshes the visible rows.
- * @param {object} refreshRows Defaults to true.
- * @param {object} clearConditions Defaults to false.
- * @param {object} clearFlags Defaults to false.
- * @returns {promise} If `refreshRows` is true, returns a promise of the rows refreshing.
- */
- Grid.prototype.clearAllFilters = function clearAllFilters(refreshRows, clearConditions, clearFlags) {
- // Default `refreshRows` to true because it will be the most commonly desired behaviour.
- if (refreshRows === undefined) {
- refreshRows = true;
- }
- if (clearConditions === undefined) {
- clearConditions = false;
- }
- if (clearFlags === undefined) {
- clearFlags = false;
- }
-
- this.columns.forEach(function(column) {
- column.filters.forEach(function(filter) {
- filter.term = undefined;
-
- if (clearConditions) {
- filter.condition = undefined;
- }
-
- if (clearFlags) {
- filter.flags = undefined;
- }
- });
- });
-
- if (refreshRows) {
- return this.refreshRows();
- }
- };
-
-
- // Blatantly stolen from Angular as it isn't exposed (yet? 2.0?)
- function RowHashMap() {}
-
- RowHashMap.prototype = {
- /**
- * Store key value pair
- * @param key key to store can be any type
- * @param value value to store can be any type
- */
- put: function(key, value) {
- this[this.grid.options.rowIdentity(key)] = value;
- },
-
- /**
- * @param key
- * @returns {Object} the value for the key
- */
- get: function(key) {
- return this[this.grid.options.rowIdentity(key)];
- },
-
- /**
- * Remove the key/value pair
- * @param key
- */
- remove: function(key) {
- var value = this[key = this.grid.options.rowIdentity(key)];
- delete this[key];
- return value;
- }
- };
-
-
-
- return Grid;
-
-}]);
-
-})();
-
-(function () {
-
- angular.module('ui.grid')
- .factory('GridApi', ['$q', '$rootScope', 'gridUtil', 'uiGridConstants', 'GridRow', 'uiGridGridMenuService',
- function ($q, $rootScope, gridUtil, uiGridConstants, GridRow, uiGridGridMenuService) {
- /**
- * @ngdoc function
- * @name ui.grid.class:GridApi
- * @description GridApi provides the ability to register public methods events inside the grid and allow
- * for other components to use the api via featureName.raise.methodName and featureName.on.eventName(function(args){}.
- * <br/>
- * To listen to events, you must add a callback to gridOptions.onRegisterApi
- * <pre>
- * $scope.gridOptions.onRegisterApi = function(gridApi){
- * gridApi.cellNav.on.navigate($scope,function(newRowCol, oldRowCol){
- * $log.log('navigation event');
- * });
- * };
- * </pre>
- * @param {object} grid grid that owns api
- */
- var GridApi = function GridApi(grid) {
- this.grid = grid;
- this.listeners = [];
-
- /**
- * @ngdoc function
- * @name renderingComplete
- * @methodOf ui.grid.core.api:PublicApi
- * @description Rendering is complete, called at the same
- * time as `onRegisterApi`, but provides a way to obtain
- * that same event within features without stopping end
- * users from getting at the onRegisterApi method.
- *
- * Included in gridApi so that it's always there - otherwise
- * there is still a timing problem with when a feature can
- * call this.
- *
- * @param {GridApi} gridApi the grid api, as normally
- * returned in the onRegisterApi method
- *
- * @example
- * <pre>
- * gridApi.core.on.renderingComplete( grid );
- * </pre>
- */
- this.registerEvent( 'core', 'renderingComplete' );
-
- /**
- * @ngdoc event
- * @name filterChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised after the filter is changed. The nature
- * of the watch expression doesn't allow notification of what changed,
- * so the receiver of this event will need to re-extract the filter
- * conditions from the columns.
- *
- */
- this.registerEvent( 'core', 'filterChanged' );
-
- /**
- * @ngdoc function
- * @name setRowInvisible
- * @methodOf ui.grid.core.api:PublicApi
- * @description Sets an override on the row to make it always invisible,
- * which will override any filtering or other visibility calculations.
- * If the row is currently visible then sets it to invisible and calls
- * both grid refresh and emits the rowsVisibleChanged event
- * @param {object} rowEntity gridOptions.data[] array instance
- */
- this.registerMethod( 'core', 'setRowInvisible', GridRow.prototype.setRowInvisible );
-
- /**
- * @ngdoc function
- * @name clearRowInvisible
- * @methodOf ui.grid.core.api:PublicApi
- * @description Clears any override on visibility for the row so that it returns to
- * using normal filtering and other visibility calculations.
- * If the row is currently invisible then sets it to visible and calls
- * both grid refresh and emits the rowsVisibleChanged event
- * TODO: if a filter is active then we can't just set it to visible?
- * @param {object} rowEntity gridOptions.data[] array instance
- */
- this.registerMethod( 'core', 'clearRowInvisible', GridRow.prototype.clearRowInvisible );
-
- /**
- * @ngdoc function
- * @name getVisibleRows
- * @methodOf ui.grid.core.api:PublicApi
- * @description Returns all visible rows
- * @param {Grid} grid the grid you want to get visible rows from
- * @returns {array} an array of gridRow
- */
- this.registerMethod( 'core', 'getVisibleRows', this.grid.getVisibleRows );
-
- /**
- * @ngdoc event
- * @name rowsVisibleChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised after the rows that are visible
- * change. The filtering is zero-based, so it isn't possible
- * to say which rows changed (unlike in the selection feature).
- * We can plausibly know which row was changed when setRowInvisible
- * is called, but in that situation the user already knows which row
- * they changed. When a filter runs we don't know what changed,
- * and that is the one that would have been useful.
- *
- */
- this.registerEvent( 'core', 'rowsVisibleChanged' );
-
- /**
- * @ngdoc event
- * @name rowsRendered
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised after the cache of visible rows is changed.
- */
- this.registerEvent( 'core', 'rowsRendered' );
-
-
- /**
- * @ngdoc event
- * @name scrollBegin
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when scroll begins. Is throttled, so won't be raised too frequently
- */
- this.registerEvent( 'core', 'scrollBegin' );
-
- /**
- * @ngdoc event
- * @name scrollEnd
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when scroll has finished. Is throttled, so won't be raised too frequently
- */
- this.registerEvent( 'core', 'scrollEnd' );
-
- /**
- * @ngdoc event
- * @name canvasHeightChanged
- * @eventOf ui.grid.core.api:PublicApi
- * @description is raised when the canvas height has changed
- * <br/>
- * arguments: oldHeight, newHeight
- */
- this.registerEvent( 'core', 'canvasHeightChanged');
- };
-
- /**
- * @ngdoc function
- * @name ui.grid.class:suppressEvents
- * @methodOf ui.grid.class:GridApi
- * @description Used to execute a function while disabling the specified event listeners.
- * Disables the listenerFunctions, executes the callbackFn, and then enables
- * the listenerFunctions again
- * @param {object} listenerFuncs listenerFunc or array of listenerFuncs to suppress. These must be the same
- * functions that were used in the .on.eventName method
- * @param {object} callBackFn function to execute
- * @example
- * <pre>
- * var navigate = function (newRowCol, oldRowCol){
- * //do something on navigate
- * }
- *
- * gridApi.cellNav.on.navigate(scope,navigate);
- *
- *
- * //call the scrollTo event and suppress our navigate listener
- * //scrollTo will still raise the event for other listeners
- * gridApi.suppressEvents(navigate, function(){
- * gridApi.cellNav.scrollTo(aRow, aCol);
- * });
- *
- * </pre>
- */
- GridApi.prototype.suppressEvents = function (listenerFuncs, callBackFn) {
- var self = this;
- var listeners = angular.isArray(listenerFuncs) ? listenerFuncs : [listenerFuncs];
-
- //find all registered listeners
- var foundListeners = self.listeners.filter(function(listener) {
- return listeners.some(function(l) {
- return listener.handler === l;
- });
- });
-
- //deregister all the listeners
- foundListeners.forEach(function(l){
- l.dereg();
- });
-
- callBackFn();
-
- //reregister all the listeners
- foundListeners.forEach(function(l){
- l.dereg = registerEventWithAngular(l.eventId, l.handler, self.grid, l._this);
- });
-
- };
-
- /**
- * @ngdoc function
- * @name registerEvent
- * @methodOf ui.grid.class:GridApi
- * @description Registers a new event for the given feature. The event will get a
- * .raise and .on prepended to it
- * <br>
- * .raise.eventName() - takes no arguments
- * <br/>
- * <br/>
- * .on.eventName(scope, callBackFn, _this)
- * <br/>
- * scope - a scope reference to add a deregister call to the scopes .$on('destroy'). Scope is optional and can be a null value,
- * but in this case you must deregister it yourself via the returned deregister function
- * <br/>
- * callBackFn - The function to call
- * <br/>
- * _this - optional this context variable for callbackFn. If omitted, grid.api will be used for the context
- * <br/>
- * .on.eventName returns a dereg funtion that will remove the listener. It's not necessary to use it as the listener
- * will be removed when the scope is destroyed.
- * @param {string} featureName name of the feature that raises the event
- * @param {string} eventName name of the event
- */
- GridApi.prototype.registerEvent = function (featureName, eventName) {
- var self = this;
- if (!self[featureName]) {
- self[featureName] = {};
- }
-
- var feature = self[featureName];
- if (!feature.on) {
- feature.on = {};
- feature.raise = {};
- }
-
- var eventId = self.grid.id + featureName + eventName;
-
- // gridUtil.logDebug('Creating raise event method ' + featureName + '.raise.' + eventName);
- feature.raise[eventName] = function () {
- $rootScope.$emit.apply($rootScope, [eventId].concat(Array.prototype.slice.call(arguments)));
- };
-
- // gridUtil.logDebug('Creating on event method ' + featureName + '.on.' + eventName);
- feature.on[eventName] = function (scope, handler, _this) {
- if ( scope !== null && typeof(scope.$on) === 'undefined' ){
- gridUtil.logError('asked to listen on ' + featureName + '.on.' + eventName + ' but scope wasn\'t passed in the input parameters. It is legitimate to pass null, but you\'ve passed something else, so you probably forgot to provide scope rather than did it deliberately, not registering');
- return;
- }
- var deregAngularOn = registerEventWithAngular(eventId, handler, self.grid, _this);
-
- //track our listener so we can turn off and on
- var listener = {handler: handler, dereg: deregAngularOn, eventId: eventId, scope: scope, _this:_this};
- self.listeners.push(listener);
-
- var removeListener = function(){
- listener.dereg();
- var index = self.listeners.indexOf(listener);
- self.listeners.splice(index,1);
- };
-
- //destroy tracking when scope is destroyed
- if (scope) {
- scope.$on('$destroy', function() {
- removeListener();
- });
- }
-
-
- return removeListener;
- };
- };
-
- function registerEventWithAngular(eventId, handler, grid, _this) {
- return $rootScope.$on(eventId, function (event) {
- var args = Array.prototype.slice.call(arguments);
- args.splice(0, 1); //remove evt argument
- handler.apply(_this ? _this : grid.api, args);
- });
- }
-
- /**
- * @ngdoc function
- * @name registerEventsFromObject
- * @methodOf ui.grid.class:GridApi
- * @description Registers features and events from a simple objectMap.
- * eventObjectMap must be in this format (multiple features allowed)
- * <pre>
- * {featureName:
- * {
- * eventNameOne:function(args){},
- * eventNameTwo:function(args){}
- * }
- * }
- * </pre>
- * @param {object} eventObjectMap map of feature/event names
- */
- GridApi.prototype.registerEventsFromObject = function (eventObjectMap) {
- var self = this;
- var features = [];
- angular.forEach(eventObjectMap, function (featProp, featPropName) {
- var feature = {name: featPropName, events: []};
- angular.forEach(featProp, function (prop, propName) {
- feature.events.push(propName);
- });
- features.push(feature);
- });
-
- features.forEach(function (feature) {
- feature.events.forEach(function (event) {
- self.registerEvent(feature.name, event);
- });
- });
-
- };
-
- /**
- * @ngdoc function
- * @name registerMethod
- * @methodOf ui.grid.class:GridApi
- * @description Registers a new event for the given feature
- * @param {string} featureName name of the feature
- * @param {string} methodName name of the method
- * @param {object} callBackFn function to execute
- * @param {object} _this binds callBackFn 'this' to _this. Defaults to gridApi.grid
- */
- GridApi.prototype.registerMethod = function (featureName, methodName, callBackFn, _this) {
- if (!this[featureName]) {
- this[featureName] = {};
- }
-
- var feature = this[featureName];
-
- feature[methodName] = gridUtil.createBoundedWrapper(_this || this.grid, callBackFn);
- };
-
- /**
- * @ngdoc function
- * @name registerMethodsFromObject
- * @methodOf ui.grid.class:GridApi
- * @description Registers features and methods from a simple objectMap.
- * eventObjectMap must be in this format (multiple features allowed)
- * <br>
- * {featureName:
- * {
- * methodNameOne:function(args){},
- * methodNameTwo:function(args){}
- * }
- * @param {object} eventObjectMap map of feature/event names
- * @param {object} _this binds this to _this for all functions. Defaults to gridApi.grid
- */
- GridApi.prototype.registerMethodsFromObject = function (methodMap, _this) {
- var self = this;
- var features = [];
- angular.forEach(methodMap, function (featProp, featPropName) {
- var feature = {name: featPropName, methods: []};
- angular.forEach(featProp, function (prop, propName) {
- feature.methods.push({name: propName, fn: prop});
- });
- features.push(feature);
- });
-
- features.forEach(function (feature) {
- feature.methods.forEach(function (method) {
- self.registerMethod(feature.name, method.name, method.fn, _this);
- });
- });
-
- };
-
- return GridApi;
-
- }]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.factory('GridColumn', ['gridUtil', 'uiGridConstants', 'i18nService', function(gridUtil, uiGridConstants, i18nService) {
-
- /**
- * ******************************************************************************************
- * PaulL1: Ugly hack here in documentation. These properties are clearly properties of GridColumn,
- * and need to be noted as such for those extending and building ui-grid itself.
- * However, from an end-developer perspective, they interact with all these through columnDefs,
- * and they really need to be documented there. I feel like they're relatively static, and
- * I can't find an elegant way for ngDoc to reference to both....so I've duplicated each
- * comment block. Ugh.
- *
- */
-
- /**
- * @ngdoc property
- * @name name
- * @propertyOf ui.grid.class:GridColumn
- * @description (mandatory) each column should have a name, although for backward
- * compatibility with 2.x name can be omitted if field is present
- *
- */
-
- /**
- * @ngdoc property
- * @name name
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (mandatory) each column should have a name, although for backward
- * compatibility with 2.x name can be omitted if field is present
- *
- */
-
- /**
- * @ngdoc property
- * @name displayName
- * @propertyOf ui.grid.class:GridColumn
- * @description Column name that will be shown in the header. If displayName is not
- * provided then one is generated using the name.
- *
- */
-
- /**
- * @ngdoc property
- * @name displayName
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Column name that will be shown in the header. If displayName is not
- * provided then one is generated using the name.
- *
- */
-
- /**
- * @ngdoc property
- * @name field
- * @propertyOf ui.grid.class:GridColumn
- * @description field must be provided if you wish to bind to a
- * property in the data source. Should be an angular expression that evaluates against grid.options.data
- * array element. Can be a complex expression: <code>employee.address.city</code>, or can be a function: <code>employee.getFullAddress()</code>.
- * See the angular docs on binding expressions.
- *
- */
-
- /**
- * @ngdoc property
- * @name field
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description field must be provided if you wish to bind to a
- * property in the data source. Should be an angular expression that evaluates against grid.options.data
- * array element. Can be a complex expression: <code>employee.address.city</code>, or can be a function: <code>employee.getFullAddress()</code>. * See the angular docs on binding expressions. *
- */
-
- /**
- * @ngdoc property
- * @name filter
- * @propertyOf ui.grid.class:GridColumn
- * @description Filter on this column.
- * @example
- * <pre>{ term: 'text', condition: uiGridConstants.filter.STARTS_WITH, placeholder: 'type to filter...', ariaLabel: 'Filter for text', flags: { caseSensitive: false }, type: uiGridConstants.filter.SELECT, [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ] }</pre>
- *
- */
-
- /**
- * @ngdoc object
- * @name ui.grid.class:GridColumn
- * @description Represents the viewModel for each column. Any state or methods needed for a Grid Column
- * are defined on this prototype
- * @param {ColumnDef} colDef the column def to associate with this column
- * @param {number} uid the unique and immutable uid we'd like to allocate to this column
- * @param {Grid} grid the grid we'd like to create this column in
- */
- function GridColumn(colDef, uid, grid) {
- var self = this;
-
- self.grid = grid;
- self.uid = uid;
-
- self.updateColumnDef(colDef, true);
-
- /**
- * @ngdoc function
- * @name hideColumn
- * @methodOf ui.grid.class:GridColumn
- * @description Hides the column by setting colDef.visible = false
- */
- GridColumn.prototype.hideColumn = function() {
- this.colDef.visible = false;
- };
-
- self.aggregationValue = undefined;
-
- // The footer cell registers to listen for the rowsRendered event, and calls this. Needed to be
- // in something with a scope so that the dereg would get called
- self.updateAggregationValue = function() {
-
- // gridUtil.logDebug('getAggregationValue for Column ' + self.colDef.name);
-
- /**
- * @ngdoc property
- * @name aggregationType
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description The aggregation that you'd like to show in the columnFooter for this
- * column. Valid values are in uiGridConstants, and currently include `uiGridConstants.aggregationTypes.count`,
- * `uiGridConstants.aggregationTypes.sum`, `uiGridConstants.aggregationTypes.avg`, `uiGridConstants.aggregationTypes.min`,
- * `uiGridConstants.aggregationTypes.max`.
- *
- * You can also provide a function as the aggregation type, in this case your function needs to accept the full
- * set of visible rows, and return a value that should be shown
- */
- if (!self.aggregationType) {
- self.aggregationValue = undefined;
- return;
- }
-
- var result = 0;
- var visibleRows = self.grid.getVisibleRows();
-
- var cellValues = function(){
- var values = [];
- visibleRows.forEach(function (row) {
- var cellValue = self.grid.getCellValue(row, self);
- var cellNumber = Number(cellValue);
- if (!isNaN(cellNumber)) {
- values.push(cellNumber);
- }
- });
- return values;
- };
-
- if (angular.isFunction(self.aggregationType)) {
- self.aggregationValue = self.aggregationType(visibleRows, self);
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.count) {
- self.aggregationValue = self.grid.getVisibleRowCount();
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.sum) {
- cellValues().forEach(function (value) {
- result += value;
- });
- self.aggregationValue = result;
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.avg) {
- cellValues().forEach(function (value) {
- result += value;
- });
- result = result / cellValues().length;
- self.aggregationValue = result;
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.min) {
- self.aggregationValue = Math.min.apply(null, cellValues());
- }
- else if (self.aggregationType === uiGridConstants.aggregationTypes.max) {
- self.aggregationValue = Math.max.apply(null, cellValues());
- }
- else {
- self.aggregationValue = '\u00A0';
- }
- };
-
-// var throttledUpdateAggregationValue = gridUtil.throttle(updateAggregationValue, self.grid.options.aggregationCalcThrottle, { trailing: true, context: self.name });
-
- /**
- * @ngdoc function
- * @name getAggregationValue
- * @methodOf ui.grid.class:GridColumn
- * @description gets the aggregation value based on the aggregation type for this column.
- * Debounced using scrollDebounce option setting
- */
- this.getAggregationValue = function() {
-// if (!self.grid.isScrollingVertically && !self.grid.isScrollingHorizontally) {
-// throttledUpdateAggregationValue();
-// }
-
- return self.aggregationValue;
- };
- }
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:GridColumn
- * @name setPropertyOrDefault
- * @description Sets a property on the column using the passed in columnDef, and
- * setting the defaultValue if the value cannot be found on the colDef
- * @param {ColumnDef} colDef the column def to look in for the property value
- * @param {string} propName the property name we'd like to set
- * @param {object} defaultValue the value to use if the colDef doesn't provide the setting
- */
- GridColumn.prototype.setPropertyOrDefault = function (colDef, propName, defaultValue) {
- var self = this;
-
- // Use the column definition filter if we were passed it
- if (typeof(colDef[propName]) !== 'undefined' && colDef[propName]) {
- self[propName] = colDef[propName];
- }
- // Otherwise use our own if it's set
- else if (typeof(self[propName]) !== 'undefined') {
- self[propName] = self[propName];
- }
- // Default to empty object for the filter
- else {
- self[propName] = defaultValue ? defaultValue : {};
- }
- };
-
-
-
- /**
- * @ngdoc property
- * @name width
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets the column width. Can be either
- * a number or a percentage, or an * for auto.
- * @example
- * <pre> $scope.gridOptions.columnDefs = [ { field: 'field1', width: 100},
- * { field: 'field2', width: '20%'},
- * { field: 'field3', width: '*' }]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name minWidth
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets the minimum column width. Should be a number.
- * @example
- * <pre> $scope.gridOptions.columnDefs = [ { field: 'field1', minWidth: 100}]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name maxWidth
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets the maximum column width. Should be a number.
- * @example
- * <pre> $scope.gridOptions.columnDefs = [ { field: 'field1', maxWidth: 100}]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name visible
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description sets whether or not the column is visible
- * </br>Default is true
- * @example
- * <pre> $scope.gridOptions.columnDefs = [
- * { field: 'field1', visible: true},
- * { field: 'field2', visible: false }
- * ]; </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @name sort
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description An object of sort information, attributes are:
- *
- * - direction: values are uiGridConstants.ASC or uiGridConstants.DESC
- * - ignoreSort: if set to true this sort is ignored (used by tree to manipulate the sort functionality)
- * - priority: says what order to sort the columns in (lower priority gets sorted first).
- * @example
- * <pre>
- * $scope.gridOptions.columnDefs = [{
- * field: 'field1',
- * sort: {
- * direction: uiGridConstants.ASC,
- * ignoreSort: true,
- * priority: 0
- * }
- * }];
- * </pre>
- */
-
-
- /**
- * @ngdoc property
- * @name sortingAlgorithm
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Algorithm to use for sorting this column. Takes 'a' and 'b' parameters
- * like any normal sorting function with additional 'rowA', 'rowB', and 'direction' parameters
- * that are the row objects and the current direction of the sort respectively.
- *
- */
-
- /**
- * @ngdoc array
- * @name filters
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Specify multiple filter fields.
- * @example
- * <pre>$scope.gridOptions.columnDefs = [
- * {
- * field: 'field1', filters: [
- * {
- * term: 'aa',
- * condition: uiGridConstants.filter.STARTS_WITH,
- * placeholder: 'starts with...',
- * ariaLabel: 'Filter for field1',
- * flags: { caseSensitive: false },
- * type: uiGridConstants.filter.SELECT,
- * selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ]
- * },
- * {
- * condition: uiGridConstants.filter.ENDS_WITH,
- * placeholder: 'ends with...'
- * }
- * ]
- * }
- * ]; </pre>
- *
- *
- */
-
- /**
- * @ngdoc array
- * @name filters
- * @propertyOf ui.grid.class:GridColumn
- * @description Filters for this column. Includes 'term' property bound to filter input elements.
- * @example
- * <pre>[
- * {
- * term: 'foo', // ngModel for <input>
- * condition: uiGridConstants.filter.STARTS_WITH,
- * placeholder: 'starts with...',
- * ariaLabel: 'Filter for foo',
- * flags: { caseSensitive: false },
- * type: uiGridConstants.filter.SELECT,
- * selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ]
- * },
- * {
- * term: 'baz',
- * condition: uiGridConstants.filter.ENDS_WITH,
- * placeholder: 'ends with...'
- * }
- * ] </pre>
- *
- *
- */
-
- /**
- * @ngdoc array
- * @name menuItems
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description used to add menu items to a column. Refer to the tutorial on this
- * functionality. A number of settings are supported:
- *
- * - title: controls the title that is displayed in the menu
- * - icon: the icon shown alongside that title
- * - action: the method to call when the menu is clicked
- * - shown: a function to evaluate to determine whether or not to show the item
- * - active: a function to evaluate to determine whether or not the item is currently selected
- * - context: context to pass to the action function, available in this.context in your handler
- * - leaveOpen: if set to true, the menu should stay open after the action, defaults to false
- * @example
- * <pre> $scope.gridOptions.columnDefs = [
- * { field: 'field1', menuItems: [
- * {
- * title: 'Outer Scope Alert',
- * icon: 'ui-grid-icon-info-circled',
- * action: function($event) {
- * this.context.blargh(); // $scope.blargh() would work too, this is just an example
- * },
- * shown: function() { return true; },
- * active: function() { return true; },
- * context: $scope
- * },
- * {
- * title: 'Grid ID',
- * action: function() {
- * alert('Grid ID: ' + this.grid.id);
- * }
- * }
- * ] }]; </pre>
- *
- */
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:GridColumn
- * @name updateColumnDef
- * @description Moves settings from the columnDef down onto the column,
- * and sets properties as appropriate
- * @param {ColumnDef} colDef the column def to look in for the property value
- * @param {boolean} isNew whether the column is being newly created, if not
- * we're updating an existing column, and some items such as the sort shouldn't
- * be copied down
- */
- GridColumn.prototype.updateColumnDef = function(colDef, isNew) {
- var self = this;
-
- self.colDef = colDef;
-
- if (colDef.name === undefined) {
- throw new Error('colDef.name is required for column at index ' + self.grid.options.columnDefs.indexOf(colDef));
- }
-
- self.displayName = (colDef.displayName === undefined) ? gridUtil.readableColumnName(colDef.name) : colDef.displayName;
-
- if (!angular.isNumber(self.width) || !self.hasCustomWidth || colDef.allowCustomWidthOverride) {
- var colDefWidth = colDef.width;
- var parseErrorMsg = "Cannot parse column width '" + colDefWidth + "' for column named '" + colDef.name + "'";
- self.hasCustomWidth = false;
-
- if (!angular.isString(colDefWidth) && !angular.isNumber(colDefWidth)) {
- self.width = '*';
- } else if (angular.isString(colDefWidth)) {
- // See if it ends with a percent
- if (gridUtil.endsWith(colDefWidth, '%')) {
- // If so we should be able to parse the non-percent-sign part to a number
- var percentStr = colDefWidth.replace(/%/g, '');
- var percent = parseInt(percentStr, 10);
- if (isNaN(percent)) {
- throw new Error(parseErrorMsg);
- }
- self.width = colDefWidth;
- }
- // And see if it's a number string
- else if (colDefWidth.match(/^(\d+)$/)) {
- self.width = parseInt(colDefWidth.match(/^(\d+)$/)[1], 10);
- }
- // Otherwise it should be a string of asterisks
- else if (colDefWidth.match(/^\*+$/)) {
- self.width = colDefWidth;
- }
- // No idea, throw an Error
- else {
- throw new Error(parseErrorMsg);
- }
- }
- // Is a number, use it as the width
- else {
- self.width = colDefWidth;
- }
- }
-
- ['minWidth', 'maxWidth'].forEach(function (name) {
- var minOrMaxWidth = colDef[name];
- var parseErrorMsg = "Cannot parse column " + name + " '" + minOrMaxWidth + "' for column named '" + colDef.name + "'";
-
- if (!angular.isString(minOrMaxWidth) && !angular.isNumber(minOrMaxWidth)) {
- //Sets default minWidth and maxWidth values
- self[name] = ((name === 'minWidth') ? 30 : 9000);
- } else if (angular.isString(minOrMaxWidth)) {
- if (minOrMaxWidth.match(/^(\d+)$/)) {
- self[name] = parseInt(minOrMaxWidth.match(/^(\d+)$/)[1], 10);
- } else {
- throw new Error(parseErrorMsg);
- }
- } else {
- self[name] = minOrMaxWidth;
- }
- });
-
- //use field if it is defined; name if it is not
- self.field = (colDef.field === undefined) ? colDef.name : colDef.field;
-
- if ( typeof( self.field ) !== 'string' ){
- gridUtil.logError( 'Field is not a string, this is likely to break the code, Field is: ' + self.field );
- }
-
- self.name = colDef.name;
-
- // Use colDef.displayName as long as it's not undefined, otherwise default to the field name
- self.displayName = (colDef.displayName === undefined) ? gridUtil.readableColumnName(colDef.name) : colDef.displayName;
-
- //self.originalIndex = index;
-
- self.aggregationType = angular.isDefined(colDef.aggregationType) ? colDef.aggregationType : null;
- self.footerCellTemplate = angular.isDefined(colDef.footerCellTemplate) ? colDef.footerCellTemplate : null;
-
- /**
- * @ngdoc property
- * @name cellTooltip
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Whether or not to show a tooltip when a user hovers over the cell.
- * If set to false, no tooltip. If true, the cell value is shown in the tooltip (useful
- * if you have long values in your cells), if a function then that function is called
- * passing in the row and the col `cellTooltip( row, col )`, and the return value is shown in the tooltip,
- * if it is a static string then displays that static string.
- *
- * Defaults to false
- *
- */
- if ( typeof(colDef.cellTooltip) === 'undefined' || colDef.cellTooltip === false ) {
- self.cellTooltip = false;
- } else if ( colDef.cellTooltip === true ){
- self.cellTooltip = function(row, col) {
- return self.grid.getCellValue( row, col );
- };
- } else if (typeof(colDef.cellTooltip) === 'function' ){
- self.cellTooltip = colDef.cellTooltip;
- } else {
- self.cellTooltip = function ( row, col ){
- return col.colDef.cellTooltip;
- };
- }
-
- /**
- * @ngdoc property
- * @name headerTooltip
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Whether or not to show a tooltip when a user hovers over the header cell.
- * If set to false, no tooltip. If true, the displayName is shown in the tooltip (useful
- * if you have long values in your headers), if a function then that function is called
- * passing in the row and the col `headerTooltip( col )`, and the return value is shown in the tooltip,
- * if a static string then shows that static string.
- *
- * Defaults to false
- *
- */
- if ( typeof(colDef.headerTooltip) === 'undefined' || colDef.headerTooltip === false ) {
- self.headerTooltip = false;
- } else if ( colDef.headerTooltip === true ){
- self.headerTooltip = function(col) {
- return col.displayName;
- };
- } else if (typeof(colDef.headerTooltip) === 'function' ){
- self.headerTooltip = colDef.headerTooltip;
- } else {
- self.headerTooltip = function ( col ) {
- return col.colDef.headerTooltip;
- };
- }
-
-
- /**
- * @ngdoc property
- * @name footerCellClass
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description footerCellClass can be a string specifying the class to append to a cell
- * or it can be a function(row,rowRenderIndex, col, colRenderIndex) that returns a class name
- *
- */
- self.footerCellClass = colDef.footerCellClass;
-
- /**
- * @ngdoc property
- * @name cellClass
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description cellClass can be a string specifying the class to append to a cell
- * or it can be a function(row,rowRenderIndex, col, colRenderIndex) that returns a class name
- *
- */
- self.cellClass = colDef.cellClass;
-
- /**
- * @ngdoc property
- * @name headerCellClass
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description headerCellClass can be a string specifying the class to append to a cell
- * or it can be a function(row,rowRenderIndex, col, colRenderIndex) that returns a class name
- *
- */
- self.headerCellClass = colDef.headerCellClass;
-
- /**
- * @ngdoc property
- * @name cellFilter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description cellFilter is a filter to apply to the content of each cell
- * @example
- * <pre>
- * gridOptions.columnDefs[0].cellFilter = 'date'
- *
- */
- self.cellFilter = colDef.cellFilter ? colDef.cellFilter : "";
-
- /**
- * @ngdoc boolean
- * @name sortCellFiltered
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) False by default. When `true` uiGrid will apply the cellFilter before
- * sorting the data. Note that when using this option uiGrid will assume that the displayed value is
- * a string, and use the {@link ui.grid.class:RowSorter#sortAlpha sortAlpha} `sortFn`. It is possible
- * to return a non-string value from an angularjs filter, in which case you should define a {@link ui.grid.class:GridOptions.columnDef#sortingAlgorithm sortingAlgorithm}
- * for the column which hanldes the returned type. You may specify one of the `sortingAlgorithms`
- * found in the {@link ui.grid.RowSorter rowSorter} service.
- */
- self.sortCellFiltered = colDef.sortCellFiltered ? true : false;
-
- /**
- * @ngdoc boolean
- * @name filterCellFiltered
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) False by default. When `true` uiGrid will apply the cellFilter before
- * applying "search" `filters`.
- */
- self.filterCellFiltered = colDef.filterCellFiltered ? true : false;
-
- /**
- * @ngdoc property
- * @name headerCellFilter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description headerCellFilter is a filter to apply to the content of the column header
- * @example
- * <pre>
- * gridOptions.columnDefs[0].headerCellFilter = 'translate'
- *
- */
- self.headerCellFilter = colDef.headerCellFilter ? colDef.headerCellFilter : "";
-
- /**
- * @ngdoc property
- * @name footerCellFilter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description footerCellFilter is a filter to apply to the content of the column footer
- * @example
- * <pre>
- * gridOptions.columnDefs[0].footerCellFilter = 'date'
- *
- */
- self.footerCellFilter = colDef.footerCellFilter ? colDef.footerCellFilter : "";
-
- self.visible = gridUtil.isNullOrUndefined(colDef.visible) || colDef.visible;
-
- self.headerClass = colDef.headerClass;
- //self.cursor = self.sortable ? 'pointer' : 'default';
-
- // Turn on sorting by default
- self.enableSorting = typeof(colDef.enableSorting) !== 'undefined' ? colDef.enableSorting : true;
- self.sortingAlgorithm = colDef.sortingAlgorithm;
-
- /**
- * @ngdoc property
- * @name sortDirectionCycle
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) An array of sort directions, specifying the order that they
- * should cycle through as the user repeatedly clicks on the column heading.
- * The default is `[null, uiGridConstants.ASC, uiGridConstants.DESC]`. Null
- * refers to the unsorted state. This does not affect the initial sort
- * direction; use the {@link ui.grid.class:GridOptions.columnDef#sort sort}
- * property for that. If
- * {@link ui.grid.class:GridOptions.columnDef#suppressRemoveSort suppressRemoveSort}
- * is also set, the unsorted state will be skipped even if it is listed here.
- * Each direction may not appear in the list more than once (e.g. `[ASC,
- * DESC, DESC]` is not allowed), and the list may not be empty.
- */
- self.sortDirectionCycle = typeof(colDef.sortDirectionCycle) !== 'undefined' ?
- colDef.sortDirectionCycle :
- [null, uiGridConstants.ASC, uiGridConstants.DESC];
-
- /**
- * @ngdoc boolean
- * @name suppressRemoveSort
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description (optional) False by default. When enabled, this setting hides the removeSort option
- * in the menu, and prevents users from manually removing the sort
- */
- if ( typeof(self.suppressRemoveSort) === 'undefined'){
- self.suppressRemoveSort = typeof(colDef.suppressRemoveSort) !== 'undefined' ? colDef.suppressRemoveSort : false;
- }
-
- /**
- * @ngdoc property
- * @name enableFiltering
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description turn off filtering for an individual column, where
- * you've turned on filtering for the overall grid
- * @example
- * <pre>
- * gridOptions.columnDefs[0].enableFiltering = false;
- *
- */
- // Turn on filtering by default (it's disabled by default at the Grid level)
- self.enableFiltering = typeof(colDef.enableFiltering) !== 'undefined' ? colDef.enableFiltering : true;
-
- // self.menuItems = colDef.menuItems;
- self.setPropertyOrDefault(colDef, 'menuItems', []);
-
- // Use the column definition sort if we were passed it, but only if this is a newly added column
- if ( isNew ){
- self.setPropertyOrDefault(colDef, 'sort');
- }
-
- // Set up default filters array for when one is not provided.
- // In other words, this (in column def):
- //
- // filter: { term: 'something', flags: {}, condition: [CONDITION] }
- //
- // is just shorthand for this:
- //
- // filters: [{ term: 'something', flags: {}, condition: [CONDITION] }]
- //
- var defaultFilters = [];
- if (colDef.filter) {
- defaultFilters.push(colDef.filter);
- }
- else if ( colDef.filters ){
- defaultFilters = colDef.filters;
- } else {
- // Add an empty filter definition object, which will
- // translate to a guessed condition and no pre-populated
- // value for the filter <input>.
- defaultFilters.push({});
- }
-
- /**
- * @ngdoc property
- * @name filter
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description Specify a single filter field on this column.
- *
- * A filter consists of a condition, a term, and a placeholder:
- *
- * - condition defines how rows are chosen as matching the filter term. This can be set to
- * one of the constants in uiGridConstants.filter, or you can supply a custom filter function
- * that gets passed the following arguments: [searchTerm, cellValue, row, column].
- * - term: If set, the filter field will be pre-populated
- * with this value.
- * - placeholder: String that will be set to the `<input>.placeholder` attribute.
- * - ariaLabel: String that will be set to the `<input>.ariaLabel` attribute. This is what is read as a label to screen reader users.
- * - noTerm: set this to true if you have defined a custom function in condition, and
- * your custom function doesn't require a term (so it can run even when the term is null)
- * - flags: only flag currently available is `caseSensitive`, set to false if you don't want
- * case sensitive matching
- * - type: defaults to uiGridConstants.filter.INPUT, which gives a text box. If set to uiGridConstants.filter.SELECT
- * then a select box will be shown with options selectOptions
- * - selectOptions: options in the format `[ { value: 1, label: 'male' }]`. No i18n filter is provided, you need
- * to perform the i18n on the values before you provide them
- * - disableCancelFilterButton: defaults to false. If set to true then the 'x' button that cancels/clears the filter
- * will not be shown.
- * @example
- * <pre>$scope.gridOptions.columnDefs = [
- * {
- * field: 'field1',
- * filter: {
- * term: 'xx',
- * condition: uiGridConstants.filter.STARTS_WITH,
- * placeholder: 'starts with...',
- * ariaLabel: 'Starts with filter for field1',
- * flags: { caseSensitive: false },
- * type: uiGridConstants.filter.SELECT,
- * selectOptions: [ { value: 1, label: 'male' }, { value: 2, label: 'female' } ],
- * disableCancelFilterButton: true
- * }
- * }
- * ]; </pre>
- *
- */
-
- /*
-
-
- /*
-
- self.filters = [
- {
- term: 'search term'
- condition: uiGridConstants.filter.CONTAINS,
- placeholder: 'my placeholder',
- ariaLabel: 'Starts with filter for field1',
- flags: {
- caseSensitive: true
- }
- }
- ]
-
- */
-
- // Only set filter if this is a newly added column, if we're updating an existing
- // column then we don't want to put the default filter back if the user may have already
- // removed it.
- // However, we do want to keep the settings if they change, just not the term
- if ( isNew ) {
- self.setPropertyOrDefault(colDef, 'filter');
- self.setPropertyOrDefault(colDef, 'filters', defaultFilters);
- } else if ( self.filters.length === defaultFilters.length ) {
- self.filters.forEach( function( filter, index ){
- if (typeof(defaultFilters[index].placeholder) !== 'undefined') {
- filter.placeholder = defaultFilters[index].placeholder;
- }
- if (typeof(defaultFilters[index].ariaLabel) !== 'undefined') {
- filter.ariaLabel = defaultFilters[index].ariaLabel;
- }
- if (typeof(defaultFilters[index].flags) !== 'undefined') {
- filter.flags = defaultFilters[index].flags;
- }
- if (typeof(defaultFilters[index].type) !== 'undefined') {
- filter.type = defaultFilters[index].type;
- }
- if (typeof(defaultFilters[index].selectOptions) !== 'undefined') {
- filter.selectOptions = defaultFilters[index].selectOptions;
- }
- });
- }
-
- // Remove this column from the grid sorting, include inside build columns so has
- // access to self - all seems a bit dodgy but doesn't work otherwise so have left
- // as is
- GridColumn.prototype.unsort = function () {
- this.sort = {};
- self.grid.api.core.raise.sortChanged( self.grid, self.grid.getColumnSorting() );
- };
-
- };
-
-
- /**
- * @ngdoc function
- * @name getColClass
- * @methodOf ui.grid.class:GridColumn
- * @description Returns the class name for the column
- * @param {bool} prefixDot if true, will return .className instead of className
- */
- GridColumn.prototype.getColClass = function (prefixDot) {
- var cls = uiGridConstants.COL_CLASS_PREFIX + this.uid;
-
- return prefixDot ? '.' + cls : cls;
- };
-
- /**
- * @ngdoc function
- * @name isPinnedLeft
- * @methodOf ui.grid.class:GridColumn
- * @description Returns true if column is in the left render container
- */
- GridColumn.prototype.isPinnedLeft = function () {
- return this.renderContainer === 'left';
- };
-
- /**
- * @ngdoc function
- * @name isPinnedRight
- * @methodOf ui.grid.class:GridColumn
- * @description Returns true if column is in the right render container
- */
- GridColumn.prototype.isPinnedRight = function () {
- return this.renderContainer === 'right';
- };
-
-
- /**
- * @ngdoc function
- * @name getColClassDefinition
- * @methodOf ui.grid.class:GridColumn
- * @description Returns the class definition for th column
- */
- GridColumn.prototype.getColClassDefinition = function () {
- return ' .grid' + this.grid.id + ' ' + this.getColClass(true) + ' { min-width: ' + this.drawnWidth + 'px; max-width: ' + this.drawnWidth + 'px; }';
- };
-
- /**
- * @ngdoc function
- * @name getRenderContainer
- * @methodOf ui.grid.class:GridColumn
- * @description Returns the render container object that this column belongs to.
- *
- * Columns will be default be in the `body` render container if they aren't allocated to one specifically.
- */
- GridColumn.prototype.getRenderContainer = function getRenderContainer() {
- var self = this;
-
- var containerId = self.renderContainer;
-
- if (containerId === null || containerId === '' || containerId === undefined) {
- containerId = 'body';
- }
-
- return self.grid.renderContainers[containerId];
- };
-
- /**
- * @ngdoc function
- * @name showColumn
- * @methodOf ui.grid.class:GridColumn
- * @description Makes the column visible by setting colDef.visible = true
- */
- GridColumn.prototype.showColumn = function() {
- this.colDef.visible = true;
- };
-
-
- /**
- * @ngdoc property
- * @name aggregationHideLabel
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description defaults to false, if set to true hides the label text
- * in the aggregation footer, so only the value is displayed.
- *
- */
- /**
- * @ngdoc function
- * @name getAggregationText
- * @methodOf ui.grid.class:GridColumn
- * @description Gets the aggregation label from colDef.aggregationLabel if
- * specified or by using i18n, including deciding whether or not to display
- * based on colDef.aggregationHideLabel.
- *
- * @param {string} label the i18n lookup value to use for the column label
- *
- */
- GridColumn.prototype.getAggregationText = function () {
- var self = this;
- if ( self.colDef.aggregationHideLabel ){
- return '';
- }
- else if ( self.colDef.aggregationLabel ) {
- return self.colDef.aggregationLabel;
- }
- else {
- switch ( self.colDef.aggregationType ){
- case uiGridConstants.aggregationTypes.count:
- return i18nService.getSafeText('aggregation.count');
- case uiGridConstants.aggregationTypes.sum:
- return i18nService.getSafeText('aggregation.sum');
- case uiGridConstants.aggregationTypes.avg:
- return i18nService.getSafeText('aggregation.avg');
- case uiGridConstants.aggregationTypes.min:
- return i18nService.getSafeText('aggregation.min');
- case uiGridConstants.aggregationTypes.max:
- return i18nService.getSafeText('aggregation.max');
- default:
- return '';
- }
- }
- };
-
- GridColumn.prototype.getCellTemplate = function () {
- var self = this;
-
- return self.cellTemplatePromise;
- };
-
- GridColumn.prototype.getCompiledElementFn = function () {
- var self = this;
-
- return self.compiledElementFnDefer.promise;
- };
-
- return GridColumn;
-}]);
-
-})();
-
- (function(){
-
-angular.module('ui.grid')
-.factory('GridOptions', ['gridUtil','uiGridConstants', function(gridUtil,uiGridConstants) {
-
- /**
- * @ngdoc function
- * @name ui.grid.class:GridOptions
- * @description Default GridOptions class. GridOptions are defined by the application developer and overlaid
- * over this object. Setting gridOptions within your controller is the most common method for an application
- * developer to configure the behaviour of their ui-grid
- *
- * @example To define your gridOptions within your controller:
- * <pre>$scope.gridOptions = {
- * data: $scope.myData,
- * columnDefs: [
- * { name: 'field1', displayName: 'pretty display name' },
- * { name: 'field2', visible: false }
- * ]
- * };</pre>
- *
- * You can then use this within your html template, when you define your grid:
- * <pre>&lt;div ui-grid="gridOptions"&gt;&lt;/div&gt;</pre>
- *
- * To provide default options for all of the grids within your application, use an angular
- * decorator to modify the GridOptions factory.
- * <pre>
- * app.config(function($provide){
- * $provide.decorator('GridOptions',function($delegate){
- * var gridOptions;
- * gridOptions = angular.copy($delegate);
- * gridOptions.initialize = function(options) {
- * var initOptions;
- * initOptions = $delegate.initialize(options);
- * initOptions.enableColumnMenus = false;
- * return initOptions;
- * };
- * return gridOptions;
- * });
- * });
- * </pre>
- */
- return {
- initialize: function( baseOptions ){
- /**
- * @ngdoc function
- * @name onRegisterApi
- * @propertyOf ui.grid.class:GridOptions
- * @description A callback that returns the gridApi once the grid is instantiated, which is
- * then used to interact with the grid programatically.
- *
- * Note that the gridApi.core.renderingComplete event is identical to this
- * callback, but has the advantage that it can be called from multiple places
- * if needed
- *
- * @example
- * <pre>
- * $scope.gridOptions.onRegisterApi = function ( gridApi ) {
- * $scope.gridApi = gridApi;
- * $scope.gridApi.selection.selectAllRows( $scope.gridApi.grid );
- * };
- * </pre>
- *
- */
- baseOptions.onRegisterApi = baseOptions.onRegisterApi || angular.noop();
-
- /**
- * @ngdoc object
- * @name data
- * @propertyOf ui.grid.class:GridOptions
- * @description (mandatory) Array of data to be rendered into the grid, providing the data source or data binding for
- * the grid.
- *
- * Most commonly the data is an array of objects, where each object has a number of attributes.
- * Each attribute automatically becomes a column in your grid. This array could, for example, be sourced from
- * an angularJS $resource query request. The array can also contain complex objects, refer the binding tutorial
- * for examples of that.
- *
- * The most flexible usage is to set your data on $scope:
- *
- * `$scope.data = data;`
- *
- * And then direct the grid to resolve whatever is in $scope.data:
- *
- * `$scope.gridOptions.data = 'data';`
- *
- * This is the most flexible approach as it allows you to replace $scope.data whenever you feel like it without
- * getting pointer issues.
- *
- * Alternatively you can directly set the data array:
- *
- * `$scope.gridOptions.data = [ ];`
- * or
- *
- * `$http.get('/data/100.json')
- * .success(function(data) {
- * $scope.myData = data;
- * $scope.gridOptions.data = $scope.myData;
- * });`
- *
- * Where you do this, you need to take care in updating the data - you can't just update `$scope.myData` to some other
- * array, you need to update $scope.gridOptions.data to point to that new array as well.
- *
- */
- baseOptions.data = baseOptions.data || [];
-
- /**
- * @ngdoc array
- * @name columnDefs
- * @propertyOf ui.grid.class:GridOptions
- * @description Array of columnDef objects. Only required property is name.
- * The individual options available in columnDefs are documented in the
- * {@link ui.grid.class:GridOptions.columnDef columnDef} section
- * </br>_field property can be used in place of name for backwards compatibility with 2.x_
- * @example
- *
- * <pre>var columnDefs = [{name:'field1'}, {name:'field2'}];</pre>
- *
- */
- baseOptions.columnDefs = baseOptions.columnDefs || [];
-
- /**
- * @ngdoc object
- * @name ui.grid.class:GridOptions.columnDef
- * @description Definition / configuration of an individual column, which would typically be
- * one of many column definitions within the gridOptions.columnDefs array
- * @example
- * <pre>{name:'field1', field: 'field1', filter: { term: 'xxx' }}</pre>
- *
- */
-
-
- /**
- * @ngdoc array
- * @name excludeProperties
- * @propertyOf ui.grid.class:GridOptions
- * @description Array of property names in data to ignore when auto-generating column names. Provides the
- * inverse of columnDefs - columnDefs is a list of columns to include, excludeProperties is a list of columns
- * to exclude.
- *
- * If columnDefs is defined, this will be ignored.
- *
- * Defaults to ['$$hashKey']
- */
-
- baseOptions.excludeProperties = baseOptions.excludeProperties || ['$$hashKey'];
-
- /**
- * @ngdoc boolean
- * @name enableRowHashing
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, this setting allows uiGrid to add
- * `$$hashKey`-type properties (similar to Angular) to elements in the `data` array. This allows
- * the grid to maintain state while vastly speeding up the process of altering `data` by adding/moving/removing rows.
- *
- * Note that this DOES add properties to your data that you may not want, but they are stripped out when using `angular.toJson()`. IF
- * you do not want this at all you can disable this setting but you will take a performance hit if you are using large numbers of rows
- * and are altering the data set often.
- */
- baseOptions.enableRowHashing = baseOptions.enableRowHashing !== false;
-
- /**
- * @ngdoc function
- * @name rowIdentity
- * @methodOf ui.grid.class:GridOptions
- * @description This function is used to get and, if necessary, set the value uniquely identifying this row (i.e. if an identity is not present it will set one).
- *
- * By default it returns the `$$hashKey` property if it exists. If it doesn't it uses gridUtil.nextUid() to generate one
- */
- baseOptions.rowIdentity = baseOptions.rowIdentity || function rowIdentity(row) {
- return gridUtil.hashKey(row);
- };
-
- /**
- * @ngdoc function
- * @name getRowIdentity
- * @methodOf ui.grid.class:GridOptions
- * @description This function returns the identity value uniquely identifying this row, if one is not present it does not set it.
- *
- * By default it returns the `$$hashKey` property but can be overridden to use any property or set of properties you want.
- */
- baseOptions.getRowIdentity = baseOptions.getRowIdentity || function getRowIdentity(row) {
- return row.$$hashKey;
- };
-
- /**
- * @ngdoc property
- * @name flatEntityAccess
- * @propertyOf ui.grid.class:GridOptions
- * @description Set to true if your columns are all related directly to fields in a flat object structure - i.e.
- * each of your columns associate directly with a property on each of the entities in your data array.
- *
- * In that situation we can avoid all the logic associated with complex binding to functions or to properties of sub-objects,
- * which can provide a significant speed improvement with large data sets when filtering or sorting.
- *
- * By default false
- */
- baseOptions.flatEntityAccess = baseOptions.flatEntityAccess === true;
-
- /**
- * @ngdoc property
- * @name showHeader
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When set to false, this setting will replace the
- * standard header template with '<div></div>', resulting in no header being shown.
- */
- baseOptions.showHeader = typeof(baseOptions.showHeader) !== "undefined" ? baseOptions.showHeader : true;
-
- /* (NOTE): Don't show this in the docs. We only use it internally
- * @ngdoc property
- * @name headerRowHeight
- * @propertyOf ui.grid.class:GridOptions
- * @description The height of the header in pixels, defaults to 30
- *
- */
- if (!baseOptions.showHeader) {
- baseOptions.headerRowHeight = 0;
- }
- else {
- baseOptions.headerRowHeight = typeof(baseOptions.headerRowHeight) !== "undefined" ? baseOptions.headerRowHeight : 30;
- }
-
- /**
- * @ngdoc property
- * @name rowHeight
- * @propertyOf ui.grid.class:GridOptions
- * @description The height of the row in pixels, defaults to 30
- *
- */
- baseOptions.rowHeight = baseOptions.rowHeight || 30;
-
- /**
- * @ngdoc integer
- * @name minRowsToShow
- * @propertyOf ui.grid.class:GridOptions
- * @description Minimum number of rows to show when the grid doesn't have a defined height. Defaults to "10".
- */
- baseOptions.minRowsToShow = typeof(baseOptions.minRowsToShow) !== "undefined" ? baseOptions.minRowsToShow : 10;
-
- /**
- * @ngdoc property
- * @name showGridFooter
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether or not to show the footer, defaults to false
- * The footer display Total Rows and Visible Rows (filtered rows)
- */
- baseOptions.showGridFooter = baseOptions.showGridFooter === true;
-
- /**
- * @ngdoc property
- * @name showColumnFooter
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether or not to show the column footer, defaults to false
- * The column footer displays column aggregates
- */
- baseOptions.showColumnFooter = baseOptions.showColumnFooter === true;
-
- /**
- * @ngdoc property
- * @name columnFooterHeight
- * @propertyOf ui.grid.class:GridOptions
- * @description The height of the footer rows (column footer and grid footer) in pixels
- *
- */
- baseOptions.columnFooterHeight = typeof(baseOptions.columnFooterHeight) !== "undefined" ? baseOptions.columnFooterHeight : 30;
- baseOptions.gridFooterHeight = typeof(baseOptions.gridFooterHeight) !== "undefined" ? baseOptions.gridFooterHeight : 30;
-
- baseOptions.columnWidth = typeof(baseOptions.columnWidth) !== "undefined" ? baseOptions.columnWidth : 50;
-
- /**
- * @ngdoc property
- * @name maxVisibleColumnCount
- * @propertyOf ui.grid.class:GridOptions
- * @description Defaults to 200
- *
- */
- baseOptions.maxVisibleColumnCount = typeof(baseOptions.maxVisibleColumnCount) !== "undefined" ? baseOptions.maxVisibleColumnCount : 200;
-
- /**
- * @ngdoc property
- * @name virtualizationThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Turn virtualization on when number of data elements goes over this number, defaults to 20
- */
- baseOptions.virtualizationThreshold = typeof(baseOptions.virtualizationThreshold) !== "undefined" ? baseOptions.virtualizationThreshold : 20;
-
- /**
- * @ngdoc property
- * @name columnVirtualizationThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Turn virtualization on when number of columns goes over this number, defaults to 10
- */
- baseOptions.columnVirtualizationThreshold = typeof(baseOptions.columnVirtualizationThreshold) !== "undefined" ? baseOptions.columnVirtualizationThreshold : 10;
-
- /**
- * @ngdoc property
- * @name excessRows
- * @propertyOf ui.grid.class:GridOptions
- * @description Extra rows to to render outside of the viewport, which helps with smoothness of scrolling.
- * Defaults to 4
- */
- baseOptions.excessRows = typeof(baseOptions.excessRows) !== "undefined" ? baseOptions.excessRows : 4;
- /**
- * @ngdoc property
- * @name scrollThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Defaults to 4
- */
- baseOptions.scrollThreshold = typeof(baseOptions.scrollThreshold) !== "undefined" ? baseOptions.scrollThreshold : 4;
-
- /**
- * @ngdoc property
- * @name excessColumns
- * @propertyOf ui.grid.class:GridOptions
- * @description Extra columns to to render outside of the viewport, which helps with smoothness of scrolling.
- * Defaults to 4
- */
- baseOptions.excessColumns = typeof(baseOptions.excessColumns) !== "undefined" ? baseOptions.excessColumns : 4;
- /**
- * @ngdoc property
- * @name horizontalScrollThreshold
- * @propertyOf ui.grid.class:GridOptions
- * @description Defaults to 4
- */
- baseOptions.horizontalScrollThreshold = typeof(baseOptions.horizontalScrollThreshold) !== "undefined" ? baseOptions.horizontalScrollThreshold : 2;
-
-
- /**
- * @ngdoc property
- * @name aggregationCalcThrottle
- * @propertyOf ui.grid.class:GridOptions
- * @description Default time in milliseconds to throttle aggregation calcuations, defaults to 500ms
- */
- baseOptions.aggregationCalcThrottle = typeof(baseOptions.aggregationCalcThrottle) !== "undefined" ? baseOptions.aggregationCalcThrottle : 500;
-
- /**
- * @ngdoc property
- * @name wheelScrollThrottle
- * @propertyOf ui.grid.class:GridOptions
- * @description Default time in milliseconds to throttle scroll events to, defaults to 70ms
- */
- baseOptions.wheelScrollThrottle = typeof(baseOptions.wheelScrollThrottle) !== "undefined" ? baseOptions.wheelScrollThrottle : 70;
-
-
- /**
- * @ngdoc property
- * @name scrollDebounce
- * @propertyOf ui.grid.class:GridOptions
- * @description Default time in milliseconds to debounce scroll events, defaults to 300ms
- */
- baseOptions.scrollDebounce = typeof(baseOptions.scrollDebounce) !== "undefined" ? baseOptions.scrollDebounce : 300;
-
- /**
- * @ngdoc boolean
- * @name enableSorting
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, this setting adds sort
- * widgets to the column headers, allowing sorting of the data for the entire grid.
- * Sorting can then be disabled on individual columns using the columnDefs.
- */
- baseOptions.enableSorting = baseOptions.enableSorting !== false;
-
- /**
- * @ngdoc boolean
- * @name enableFiltering
- * @propertyOf ui.grid.class:GridOptions
- * @description False by default. When enabled, this setting adds filter
- * boxes to each column header, allowing filtering within the column for the entire grid.
- * Filtering can then be disabled on individual columns using the columnDefs.
- */
- baseOptions.enableFiltering = baseOptions.enableFiltering === true;
-
- /**
- * @ngdoc boolean
- * @name enableColumnMenus
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, this setting displays a column
- * menu within each column.
- */
- baseOptions.enableColumnMenus = baseOptions.enableColumnMenus !== false;
-
- /**
- * @ngdoc boolean
- * @name enableVerticalScrollbar
- * @propertyOf ui.grid.class:GridOptions
- * @description uiGridConstants.scrollbars.ALWAYS by default. This settings controls the vertical scrollbar for the grid.
- * Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER
- */
- baseOptions.enableVerticalScrollbar = typeof(baseOptions.enableVerticalScrollbar) !== "undefined" ? baseOptions.enableVerticalScrollbar : uiGridConstants.scrollbars.ALWAYS;
-
- /**
- * @ngdoc boolean
- * @name enableHorizontalScrollbar
- * @propertyOf ui.grid.class:GridOptions
- * @description uiGridConstants.scrollbars.ALWAYS by default. This settings controls the horizontal scrollbar for the grid.
- * Supported values: uiGridConstants.scrollbars.ALWAYS, uiGridConstants.scrollbars.NEVER
- */
- baseOptions.enableHorizontalScrollbar = typeof(baseOptions.enableHorizontalScrollbar) !== "undefined" ? baseOptions.enableHorizontalScrollbar : uiGridConstants.scrollbars.ALWAYS;
-
- /**
- * @ngdoc boolean
- * @name enableMinHeightCheck
- * @propertyOf ui.grid.class:GridOptions
- * @description True by default. When enabled, a newly initialized grid will check to see if it is tall enough to display
- * at least one row of data. If the grid is not tall enough, it will resize the DOM element to display minRowsToShow number
- * of rows.
- */
- baseOptions.enableMinHeightCheck = baseOptions.enableMinHeightCheck !== false;
-
- /**
- * @ngdoc boolean
- * @name minimumColumnSize
- * @propertyOf ui.grid.class:GridOptions
- * @description Columns can't be smaller than this, defaults to 10 pixels
- */
- baseOptions.minimumColumnSize = typeof(baseOptions.minimumColumnSize) !== "undefined" ? baseOptions.minimumColumnSize : 10;
-
- /**
- * @ngdoc function
- * @name rowEquality
- * @methodOf ui.grid.class:GridOptions
- * @description By default, rows are compared using object equality. This option can be overridden
- * to compare on any data item property or function
- * @param {object} entityA First Data Item to compare
- * @param {object} entityB Second Data Item to compare
- */
- baseOptions.rowEquality = baseOptions.rowEquality || function(entityA, entityB) {
- return entityA === entityB;
- };
-
- /**
- * @ngdoc string
- * @name headerTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description Null by default. When provided, this setting uses a custom header
- * template, rather than the default template. Can be set to either the name of a template file:
- * <pre> $scope.gridOptions.headerTemplate = 'header_template.html';</pre>
- * inline html
- * <pre> $scope.gridOptions.headerTemplate = '<div class="ui-grid-top-panel" style="text-align: center">I am a Custom Grid Header</div>'</pre>
- * or the id of a precompiled template (TBD how to use this).
- * </br>Refer to the custom header tutorial for more information.
- * If you want no header at all, you can set to an empty div:
- * <pre> $scope.gridOptions.headerTemplate = '<div></div>';</pre>
- *
- * If you want to only have a static header, then you can set to static content. If
- * you want to tailor the existing column headers, then you should look at the
- * current 'ui-grid-header.html' template in github as your starting point.
- *
- */
- baseOptions.headerTemplate = baseOptions.headerTemplate || null;
-
- /**
- * @ngdoc string
- * @name footerTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) ui-grid/ui-grid-footer by default. This footer shows the per-column
- * aggregation totals.
- * When provided, this setting uses a custom footer template. Can be set to either the name of a template file 'footer_template.html', inline html
- * <pre>'<div class="ui-grid-bottom-panel" style="text-align: center">I am a Custom Grid Footer</div>'</pre>, or the id
- * of a precompiled template (TBD how to use this). Refer to the custom footer tutorial for more information.
- */
- baseOptions.footerTemplate = baseOptions.footerTemplate || 'ui-grid/ui-grid-footer';
-
- /**
- * @ngdoc string
- * @name gridFooterTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description (optional) ui-grid/ui-grid-grid-footer by default. This template by default shows the
- * total items at the bottom of the grid, and the selected items if selection is enabled.
- */
- baseOptions.gridFooterTemplate = baseOptions.gridFooterTemplate || 'ui-grid/ui-grid-grid-footer';
-
- /**
- * @ngdoc string
- * @name rowTemplate
- * @propertyOf ui.grid.class:GridOptions
- * @description 'ui-grid/ui-grid-row' by default. When provided, this setting uses a
- * custom row template. Can be set to either the name of a template file:
- * <pre> $scope.gridOptions.rowTemplate = 'row_template.html';</pre>
- * inline html
- * <pre> $scope.gridOptions.rowTemplate = '<div style="background-color: aquamarine" ng-click="grid.appScope.fnOne(row)" ng-repeat="col in colContainer.renderedColumns track by col.colDef.name" class="ui-grid-cell" ui-grid-cell></div>';</pre>
- * or the id of a precompiled template (TBD how to use this) can be provided.
- * </br>Refer to the custom row template tutorial for more information.
- */
- baseOptions.rowTemplate = baseOptions.rowTemplate || 'ui-grid/ui-grid-row';
-
- /**
- * @ngdoc object
- * @name appScopeProvider
- * @propertyOf ui.grid.class:GridOptions
- * @description by default, the parent scope of the ui-grid element will be assigned to grid.appScope
- * this property allows you to assign any reference you want to grid.appScope
- */
- baseOptions.appScopeProvider = baseOptions.appScopeProvider || null;
-
- return baseOptions;
- }
- };
-
-
-}]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-
- /**
- * @ngdoc function
- * @name ui.grid.class:GridRenderContainer
- * @description The grid has render containers, allowing the ability to have pinned columns. If the grid
- * is right-to-left then there may be a right render container, if left-to-right then there may
- * be a left render container. There is always a body render container.
- * @param {string} name The name of the render container ('body', 'left', or 'right')
- * @param {Grid} grid the grid the render container is in
- * @param {object} options the render container options
- */
-.factory('GridRenderContainer', ['gridUtil', 'uiGridConstants', function(gridUtil, uiGridConstants) {
- function GridRenderContainer(name, grid, options) {
- var self = this;
-
- // if (gridUtil.type(grid) !== 'Grid') {
- // throw new Error('Grid argument is not a Grid object');
- // }
-
- self.name = name;
-
- self.grid = grid;
-
- // self.rowCache = [];
- // self.columnCache = [];
-
- self.visibleRowCache = [];
- self.visibleColumnCache = [];
-
- self.renderedRows = [];
- self.renderedColumns = [];
-
- self.prevScrollTop = 0;
- self.prevScrolltopPercentage = 0;
- self.prevRowScrollIndex = 0;
-
- self.prevScrollLeft = 0;
- self.prevScrollleftPercentage = 0;
- self.prevColumnScrollIndex = 0;
-
- self.columnStyles = "";
-
- self.viewportAdjusters = [];
-
- /**
- * @ngdoc boolean
- * @name hasHScrollbar
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description flag to signal that container has a horizontal scrollbar
- */
- self.hasHScrollbar = false;
-
- /**
- * @ngdoc boolean
- * @name hasVScrollbar
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description flag to signal that container has a vertical scrollbar
- */
- self.hasVScrollbar = false;
-
- /**
- * @ngdoc boolean
- * @name canvasHeightShouldUpdate
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description flag to signal that container should recalculate the canvas size
- */
- self.canvasHeightShouldUpdate = true;
-
- /**
- * @ngdoc boolean
- * @name canvasHeight
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description last calculated canvas height value
- */
- self.$$canvasHeight = 0;
-
- if (options && angular.isObject(options)) {
- angular.extend(self, options);
- }
-
- grid.registerStyleComputation({
- priority: 5,
- func: function () {
- self.updateColumnWidths();
- return self.columnStyles;
- }
- });
- }
-
-
- GridRenderContainer.prototype.reset = function reset() {
- // this.rowCache.length = 0;
- // this.columnCache.length = 0;
-
- this.visibleColumnCache.length = 0;
- this.visibleRowCache.length = 0;
-
- this.renderedRows.length = 0;
- this.renderedColumns.length = 0;
- };
-
- // TODO(c0bra): calculate size?? Should this be in a stackable directive?
-
-
- GridRenderContainer.prototype.containsColumn = function (col) {
- return this.visibleColumnCache.indexOf(col) !== -1;
- };
-
- GridRenderContainer.prototype.minRowsToRender = function minRowsToRender() {
- var self = this;
- var minRows = 0;
- var rowAddedHeight = 0;
- var viewPortHeight = self.getViewportHeight();
- for (var i = self.visibleRowCache.length - 1; rowAddedHeight < viewPortHeight && i >= 0; i--) {
- rowAddedHeight += self.visibleRowCache[i].height;
- minRows++;
- }
- return minRows;
- };
-
- GridRenderContainer.prototype.minColumnsToRender = function minColumnsToRender() {
- var self = this;
- var viewportWidth = this.getViewportWidth();
-
- var min = 0;
- var totalWidth = 0;
- // self.columns.forEach(function(col, i) {
- for (var i = 0; i < self.visibleColumnCache.length; i++) {
- var col = self.visibleColumnCache[i];
-
- if (totalWidth < viewportWidth) {
- totalWidth += col.drawnWidth ? col.drawnWidth : 0;
- min++;
- }
- else {
- var currWidth = 0;
- for (var j = i; j >= i - min; j--) {
- currWidth += self.visibleColumnCache[j].drawnWidth ? self.visibleColumnCache[j].drawnWidth : 0;
- }
- if (currWidth < viewportWidth) {
- min++;
- }
- }
- }
-
- return min;
- };
-
- GridRenderContainer.prototype.getVisibleRowCount = function getVisibleRowCount() {
- return this.visibleRowCache.length;
- };
-
- /**
- * @ngdoc function
- * @name registerViewportAdjuster
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Registers an adjuster to the render container's available width or height. Adjusters are used
- * to tell the render container that there is something else consuming space, and to adjust it's size
- * appropriately.
- * @param {function} func the adjuster function we want to register
- */
-
- GridRenderContainer.prototype.registerViewportAdjuster = function registerViewportAdjuster(func) {
- this.viewportAdjusters.push(func);
- };
-
- /**
- * @ngdoc function
- * @name removeViewportAdjuster
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Removes an adjuster, should be used when your element is destroyed
- * @param {function} func the adjuster function we want to remove
- */
- GridRenderContainer.prototype.removeViewportAdjuster = function removeViewportAdjuster(func) {
- var idx = this.viewportAdjusters.indexOf(func);
-
- if (idx > -1) {
- this.viewportAdjusters.splice(idx, 1);
- }
- };
-
- /**
- * @ngdoc function
- * @name getViewportAdjustment
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Gets the adjustment based on the viewportAdjusters.
- * @returns {object} a hash of { height: x, width: y }. Usually the values will be negative
- */
- GridRenderContainer.prototype.getViewportAdjustment = function getViewportAdjustment() {
- var self = this;
-
- var adjustment = { height: 0, width: 0 };
-
- self.viewportAdjusters.forEach(function (func) {
- adjustment = func.call(this, adjustment);
- });
-
- return adjustment;
- };
-
- GridRenderContainer.prototype.getMargin = function getMargin(side) {
- var self = this;
-
- var amount = 0;
-
- self.viewportAdjusters.forEach(function (func) {
- var adjustment = func.call(this, { height: 0, width: 0 });
-
- if (adjustment.side && adjustment.side === side) {
- amount += adjustment.width * -1;
- }
- });
-
- return amount;
- };
-
- GridRenderContainer.prototype.getViewportHeight = function getViewportHeight() {
- var self = this;
-
- var headerHeight = (self.headerHeight) ? self.headerHeight : self.grid.headerHeight;
-
- var viewPortHeight = self.grid.gridHeight - headerHeight - self.grid.footerHeight;
-
-
- var adjustment = self.getViewportAdjustment();
-
- viewPortHeight = viewPortHeight + adjustment.height;
-
- return viewPortHeight;
- };
-
- GridRenderContainer.prototype.getViewportWidth = function getViewportWidth() {
- var self = this;
-
- var viewportWidth = self.grid.gridWidth;
-
- //if (typeof(self.grid.verticalScrollbarWidth) !== 'undefined' && self.grid.verticalScrollbarWidth !== undefined && self.grid.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth - self.grid.verticalScrollbarWidth;
- //}
-
- // var viewportWidth = 0;\
- // self.visibleColumnCache.forEach(function (column) {
- // viewportWidth += column.drawnWidth;
- // });
-
- var adjustment = self.getViewportAdjustment();
-
- viewportWidth = viewportWidth + adjustment.width;
-
- return viewportWidth;
- };
-
- GridRenderContainer.prototype.getHeaderViewportWidth = function getHeaderViewportWidth() {
- var self = this;
-
- var viewportWidth = this.getViewportWidth();
-
- //if (typeof(self.grid.verticalScrollbarWidth) !== 'undefined' && self.grid.verticalScrollbarWidth !== undefined && self.grid.verticalScrollbarWidth > 0) {
- // viewPortWidth = viewPortWidth + self.grid.verticalScrollbarWidth;
- //}
-
- // var adjustment = self.getViewportAdjustment();
- // viewPortWidth = viewPortWidth + adjustment.width;
-
- return viewportWidth;
- };
-
-
- /**
- * @ngdoc function
- * @name getCanvasHeight
- * @methodOf ui.grid.class:GridRenderContainer
- * @description Returns the total canvas height. Only recalculates if canvasHeightShouldUpdate = false
- * @returns {number} total height of all the visible rows in the container
- */
- GridRenderContainer.prototype.getCanvasHeight = function getCanvasHeight() {
- var self = this;
-
- if (!self.canvasHeightShouldUpdate) {
- return self.$$canvasHeight;
- }
-
- var oldCanvasHeight = self.$$canvasHeight;
-
- self.$$canvasHeight = 0;
-
- self.visibleRowCache.forEach(function(row){
- self.$$canvasHeight += row.height;
- });
-
-
- self.canvasHeightShouldUpdate = false;
-
- self.grid.api.core.raise.canvasHeightChanged(oldCanvasHeight, self.$$canvasHeight);
-
- return self.$$canvasHeight;
- };
-
- GridRenderContainer.prototype.getVerticalScrollLength = function getVerticalScrollLength() {
- return this.getCanvasHeight() - this.getViewportHeight() + this.grid.scrollbarHeight;
- };
-
- GridRenderContainer.prototype.getCanvasWidth = function getCanvasWidth() {
- var self = this;
-
- var ret = self.canvasWidth;
-
- return ret;
- };
-
- GridRenderContainer.prototype.setRenderedRows = function setRenderedRows(newRows) {
- this.renderedRows.length = newRows.length;
- for (var i = 0; i < newRows.length; i++) {
- this.renderedRows[i] = newRows[i];
- }
- };
-
- GridRenderContainer.prototype.setRenderedColumns = function setRenderedColumns(newColumns) {
- var self = this;
-
- // OLD:
- this.renderedColumns.length = newColumns.length;
- for (var i = 0; i < newColumns.length; i++) {
- this.renderedColumns[i] = newColumns[i];
- }
-
- this.updateColumnOffset();
- };
-
- GridRenderContainer.prototype.updateColumnOffset = function updateColumnOffset() {
- // Calculate the width of the columns on the left side that are no longer rendered.
- // That will be the offset for the columns as we scroll horizontally.
- var hiddenColumnsWidth = 0;
- for (var i = 0; i < this.currentFirstColumn; i++) {
- hiddenColumnsWidth += this.visibleColumnCache[i].drawnWidth;
- }
-
- this.columnOffset = hiddenColumnsWidth;
- };
-
- GridRenderContainer.prototype.scrollVertical = function (newScrollTop) {
- var vertScrollPercentage = -1;
-
- if (newScrollTop !== this.prevScrollTop) {
- var yDiff = newScrollTop - this.prevScrollTop;
-
- if (yDiff > 0 ) { this.grid.scrollDirection = uiGridConstants.scrollDirection.DOWN; }
- if (yDiff < 0 ) { this.grid.scrollDirection = uiGridConstants.scrollDirection.UP; }
-
- var vertScrollLength = this.getVerticalScrollLength();
-
- vertScrollPercentage = newScrollTop / vertScrollLength;
-
- // console.log('vert', vertScrollPercentage, newScrollTop, vertScrollLength);
-
- if (vertScrollPercentage > 1) { vertScrollPercentage = 1; }
- if (vertScrollPercentage < 0) { vertScrollPercentage = 0; }
-
- this.adjustScrollVertical(newScrollTop, vertScrollPercentage);
- return vertScrollPercentage;
- }
- };
-
- GridRenderContainer.prototype.scrollHorizontal = function(newScrollLeft){
- var horizScrollPercentage = -1;
-
- // Handle RTL here
-
- if (newScrollLeft !== this.prevScrollLeft) {
- var xDiff = newScrollLeft - this.prevScrollLeft;
-
- if (xDiff > 0) { this.grid.scrollDirection = uiGridConstants.scrollDirection.RIGHT; }
- if (xDiff < 0) { this.grid.scrollDirection = uiGridConstants.scrollDirection.LEFT; }
-
- var horizScrollLength = (this.canvasWidth - this.getViewportWidth());
- if (horizScrollLength !== 0) {
- horizScrollPercentage = newScrollLeft / horizScrollLength;
- }
- else {
- horizScrollPercentage = 0;
- }
-
- this.adjustScrollHorizontal(newScrollLeft, horizScrollPercentage);
- return horizScrollPercentage;
- }
- };
-
- GridRenderContainer.prototype.adjustScrollVertical = function adjustScrollVertical(scrollTop, scrollPercentage, force) {
- if (this.prevScrollTop === scrollTop && !force) {
- return;
- }
-
- if (typeof(scrollTop) === 'undefined' || scrollTop === undefined || scrollTop === null) {
- scrollTop = (this.getCanvasHeight() - this.getViewportHeight()) * scrollPercentage;
- }
-
- this.adjustRows(scrollTop, scrollPercentage, false);
-
- this.prevScrollTop = scrollTop;
- this.prevScrolltopPercentage = scrollPercentage;
-
- this.grid.queueRefresh();
- };
-
- GridRenderContainer.prototype.adjustScrollHorizontal = function adjustScrollHorizontal(scrollLeft, scrollPercentage, force) {
- if (this.prevScrollLeft === scrollLeft && !force) {
- return;
- }
-
- if (typeof(scrollLeft) === 'undefined' || scrollLeft === undefined || scrollLeft === null) {
- scrollLeft = (this.getCanvasWidth() - this.getViewportWidth()) * scrollPercentage;
- }
-
- this.adjustColumns(scrollLeft, scrollPercentage);
-
- this.prevScrollLeft = scrollLeft;
- this.prevScrollleftPercentage = scrollPercentage;
-
- this.grid.queueRefresh();
- };
-
- GridRenderContainer.prototype.adjustRows = function adjustRows(scrollTop, scrollPercentage, postDataLoaded) {
- var self = this;
-
- var minRows = self.minRowsToRender();
-
- var rowCache = self.visibleRowCache;
-
- var maxRowIndex = rowCache.length - minRows;
-
- // console.log('scroll%1', scrollPercentage);
-
- // Calculate the scroll percentage according to the scrollTop location, if no percentage was provided
- if ((typeof(scrollPercentage) === 'undefined' || scrollPercentage === null) && scrollTop) {
- scrollPercentage = scrollTop / self.getVerticalScrollLength();
- }
-
- var rowIndex = Math.ceil(Math.min(maxRowIndex, maxRowIndex * scrollPercentage));
-
- // console.log('maxRowIndex / scroll%', maxRowIndex, scrollPercentage, rowIndex);
-
- // Define a max row index that we can't scroll past
- if (rowIndex > maxRowIndex) {
- rowIndex = maxRowIndex;
- }
-
- var newRange = [];
- if (rowCache.length > self.grid.options.virtualizationThreshold) {
- if (!(typeof(scrollTop) === 'undefined' || scrollTop === null)) {
- // Have we hit the threshold going down?
- if ( !self.grid.suppressParentScrollDown && self.prevScrollTop < scrollTop && rowIndex < self.prevRowScrollIndex + self.grid.options.scrollThreshold && rowIndex < maxRowIndex) {
- return;
- }
- //Have we hit the threshold going up?
- if ( !self.grid.suppressParentScrollUp && self.prevScrollTop > scrollTop && rowIndex > self.prevRowScrollIndex - self.grid.options.scrollThreshold && rowIndex < maxRowIndex) {
- return;
- }
- }
- var rangeStart = {};
- var rangeEnd = {};
-
- rangeStart = Math.max(0, rowIndex - self.grid.options.excessRows);
- rangeEnd = Math.min(rowCache.length, rowIndex + minRows + self.grid.options.excessRows);
-
- newRange = [rangeStart, rangeEnd];
- }
- else {
- var maxLen = self.visibleRowCache.length;
- newRange = [0, Math.max(maxLen, minRows + self.grid.options.excessRows)];
- }
-
- self.updateViewableRowRange(newRange);
-
- self.prevRowScrollIndex = rowIndex;
- };
-
- GridRenderContainer.prototype.adjustColumns = function adjustColumns(scrollLeft, scrollPercentage) {
- var self = this;
-
- var minCols = self.minColumnsToRender();
-
- var columnCache = self.visibleColumnCache;
- var maxColumnIndex = columnCache.length - minCols;
-
- // Calculate the scroll percentage according to the scrollLeft location, if no percentage was provided
- if ((typeof(scrollPercentage) === 'undefined' || scrollPercentage === null) && scrollLeft) {
- var horizScrollLength = (self.getCanvasWidth() - self.getViewportWidth());
- scrollPercentage = scrollLeft / horizScrollLength;
- }
-
- var colIndex = Math.ceil(Math.min(maxColumnIndex, maxColumnIndex * scrollPercentage));
-
- // Define a max row index that we can't scroll past
- if (colIndex > maxColumnIndex) {
- colIndex = maxColumnIndex;
- }
-
- var newRange = [];
- if (columnCache.length > self.grid.options.columnVirtualizationThreshold && self.getCanvasWidth() > self.getViewportWidth()) {
- /* Commented the following lines because otherwise the moved column wasn't visible immediately on the new position
- * in the case of many columns with horizontal scroll, one had to scroll left or right and then return in order to see it
- // Have we hit the threshold going down?
- if (self.prevScrollLeft < scrollLeft && colIndex < self.prevColumnScrollIndex + self.grid.options.horizontalScrollThreshold && colIndex < maxColumnIndex) {
- return;
- }
- //Have we hit the threshold going up?
- if (self.prevScrollLeft > scrollLeft && colIndex > self.prevColumnScrollIndex - self.grid.options.horizontalScrollThreshold && colIndex < maxColumnIndex) {
- return;
- }*/
-
- var rangeStart = Math.max(0, colIndex - self.grid.options.excessColumns);
- var rangeEnd = Math.min(columnCache.length, colIndex + minCols + self.grid.options.excessColumns);
-
- newRange = [rangeStart, rangeEnd];
- }
- else {
- var maxLen = self.visibleColumnCache.length;
-
- newRange = [0, Math.max(maxLen, minCols + self.grid.options.excessColumns)];
- }
-
- self.updateViewableColumnRange(newRange);
-
- self.prevColumnScrollIndex = colIndex;
- };
-
- // Method for updating the visible rows
- GridRenderContainer.prototype.updateViewableRowRange = function updateViewableRowRange(renderedRange) {
- // Slice out the range of rows from the data
- // var rowArr = uiGridCtrl.grid.rows.slice(renderedRange[0], renderedRange[1]);
- var rowArr = this.visibleRowCache.slice(renderedRange[0], renderedRange[1]);
-
- // Define the top-most rendered row
- this.currentTopRow = renderedRange[0];
-
- this.setRenderedRows(rowArr);
- };
-
- // Method for updating the visible columns
- GridRenderContainer.prototype.updateViewableColumnRange = function updateViewableColumnRange(renderedRange) {
- // Slice out the range of rows from the data
- // var columnArr = uiGridCtrl.grid.columns.slice(renderedRange[0], renderedRange[1]);
- var columnArr = this.visibleColumnCache.slice(renderedRange[0], renderedRange[1]);
-
- // Define the left-most rendered columns
- this.currentFirstColumn = renderedRange[0];
-
- this.setRenderedColumns(columnArr);
- };
-
- GridRenderContainer.prototype.headerCellWrapperStyle = function () {
- var self = this;
-
- if (self.currentFirstColumn !== 0) {
- var offset = self.columnOffset;
-
- if (self.grid.isRTL()) {
- return { 'margin-right': offset + 'px' };
- }
- else {
- return { 'margin-left': offset + 'px' };
- }
- }
-
- return null;
- };
-
- /**
- * @ngdoc boolean
- * @name updateColumnWidths
- * @propertyOf ui.grid.class:GridRenderContainer
- * @description Determine the appropriate column width of each column across all render containers.
- *
- * Column width is easy when each column has a specified width. When columns are variable width (i.e.
- * have an * or % of the viewport) then we try to calculate so that things fit in. The problem is that
- * we have multiple render containers, and we don't want one render container to just take the whole viewport
- * when it doesn't need to - we want things to balance out across the render containers.
- *
- * To do this, we use this method to calculate all the renderContainers, recognising that in a given render
- * cycle it'll get called once per render container, so it needs to return the same values each time.
- *
- * The constraints on this method are therefore:
- * - must return the same value when called multiple times, to do this it needs to rely on properties of the
- * columns, but not properties that change when this is called (so it shouldn't rely on drawnWidth)
- *
- * The general logic of this method is:
- * - calculate our total available width
- * - look at all the columns across all render containers, and work out which have widths and which have
- * constraints such as % or * or something else
- * - for those with *, count the total number of * we see and add it onto a running total, add this column to an * array
- * - for those with a %, allocate the % as a percentage of the viewport, having consideration of min and max
- * - for those with manual width (in pixels) we set the drawnWidth to the specified width
- * - we end up with an asterisks array still to process
- * - we look at our remaining width. If it's greater than zero, we divide it up among the asterisk columns, then process
- * them for min and max width constraints
- * - if it's zero or less, we set the asterisk columns to their minimum widths
- * - we use parseInt quite a bit, as we try to make all our column widths integers
- */
- GridRenderContainer.prototype.updateColumnWidths = function () {
- var self = this;
-
- var asterisksArray = [],
- asteriskNum = 0,
- usedWidthSum = 0,
- ret = '';
-
- // Get the width of the viewport
- var availableWidth = self.grid.getViewportWidth() - self.grid.scrollbarWidth;
-
- // get all the columns across all render containers, we have to calculate them all or one render container
- // could consume the whole viewport
- var columnCache = [];
- angular.forEach(self.grid.renderContainers, function( container, name){
- columnCache = columnCache.concat(container.visibleColumnCache);
- });
-
- // look at each column, process any manual values or %, put the * into an array to look at later
- columnCache.forEach(function(column, i) {
- var width = 0;
- // Skip hidden columns
- if (!column.visible) { return; }
-
- if (angular.isNumber(column.width)) {
- // pixel width, set to this value
- width = parseInt(column.width, 10);
- usedWidthSum = usedWidthSum + width;
- column.drawnWidth = width;
-
- } else if (gridUtil.endsWith(column.width, "%")) {
- // percentage width, set to percentage of the viewport
- width = parseInt(parseInt(column.width.replace(/%/g, ''), 10) / 100 * availableWidth);
-
- if ( width > column.maxWidth ){
- width = column.maxWidth;
- }
-
- if ( width < column.minWidth ){
- width = column.minWidth;
- }
-
- usedWidthSum = usedWidthSum + width;
- column.drawnWidth = width;
- } else if (angular.isString(column.width) && column.width.indexOf('*') !== -1) {
- // is an asterisk column, the gridColumn already checked the string consists only of '****'
- asteriskNum = asteriskNum + column.width.length;
- asterisksArray.push(column);
- }
- });
-
- // Get the remaining width (available width subtracted by the used widths sum)
- var remainingWidth = availableWidth - usedWidthSum;
-
- var i, column, colWidth;
-
- if (asterisksArray.length > 0) {
- // the width that each asterisk value would be assigned (this can be negative)
- var asteriskVal = remainingWidth / asteriskNum;
-
- asterisksArray.forEach(function( column ){
- var width = parseInt(column.width.length * asteriskVal, 10);
-
- if ( width > column.maxWidth ){
- width = column.maxWidth;
- }
-
- if ( width < column.minWidth ){
- width = column.minWidth;
- }
-
- usedWidthSum = usedWidthSum + width;
- column.drawnWidth = width;
- });
- }
-
- // If the grid width didn't divide evenly into the column widths and we have pixels left over, or our
- // calculated widths would have the grid narrower than the available space,
- // dole the remainder out one by one to make everything fit
- var processColumnUpwards = function(column){
- if ( column.drawnWidth < column.maxWidth && leftoverWidth > 0) {
- column.drawnWidth++;
- usedWidthSum++;
- leftoverWidth--;
- columnsToChange = true;
- }
- };
-
- var leftoverWidth = availableWidth - usedWidthSum;
- var columnsToChange = true;
-
- while (leftoverWidth > 0 && columnsToChange) {
- columnsToChange = false;
- asterisksArray.forEach(processColumnUpwards);
- }
-
- // We can end up with too much width even though some columns aren't at their max width, in this situation
- // we can trim the columns a little
- var processColumnDownwards = function(column){
- if ( column.drawnWidth > column.minWidth && excessWidth > 0) {
- column.drawnWidth--;
- usedWidthSum--;
- excessWidth--;
- columnsToChange = true;
- }
- };
-
- var excessWidth = usedWidthSum - availableWidth;
- columnsToChange = true;
-
- while (excessWidth > 0 && columnsToChange) {
- columnsToChange = false;
- asterisksArray.forEach(processColumnDownwards);
- }
-
-
- // all that was across all the renderContainers, now we need to work out what that calculation decided for
- // our renderContainer
- var canvasWidth = 0;
- self.visibleColumnCache.forEach(function(column){
- if ( column.visible ){
- canvasWidth = canvasWidth + column.drawnWidth;
- }
- });
-
- // Build the CSS
- columnCache.forEach(function (column) {
- ret = ret + column.getColClassDefinition();
- });
-
- self.canvasWidth = canvasWidth;
-
- // Return the styles back to buildStyles which pops them into the `customStyles` scope variable
- // return ret;
-
- // Set this render container's column styles so they can be used in style computation
- this.columnStyles = ret;
- };
-
- GridRenderContainer.prototype.needsHScrollbarPlaceholder = function () {
- return this.grid.options.enableHorizontalScrollbar && !this.hasHScrollbar && !this.grid.disableScrolling;
- };
-
- GridRenderContainer.prototype.getViewportStyle = function () {
- var self = this;
- var styles = {};
-
- self.hasHScrollbar = false;
- self.hasVScrollbar = false;
-
- if (self.grid.disableScrolling) {
- styles['overflow-x'] = 'hidden';
- styles['overflow-y'] = 'hidden';
- return styles;
- }
-
- if (self.name === 'body') {
- self.hasHScrollbar = self.grid.options.enableHorizontalScrollbar !== uiGridConstants.scrollbars.NEVER;
- if (!self.grid.isRTL()) {
- if (!self.grid.hasRightContainerColumns()) {
- self.hasVScrollbar = self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER;
- }
- }
- else {
- if (!self.grid.hasLeftContainerColumns()) {
- self.hasVScrollbar = self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER;
- }
- }
- }
- else if (self.name === 'left') {
- self.hasVScrollbar = self.grid.isRTL() ? self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER : false;
- }
- else {
- self.hasVScrollbar = !self.grid.isRTL() ? self.grid.options.enableVerticalScrollbar !== uiGridConstants.scrollbars.NEVER : false;
- }
-
- styles['overflow-x'] = self.hasHScrollbar ? 'scroll' : 'hidden';
- styles['overflow-y'] = self.hasVScrollbar ? 'scroll' : 'hidden';
-
-
- return styles;
-
-
- };
-
- return GridRenderContainer;
-}]);
-
-})();
-
-(function(){
-
-angular.module('ui.grid')
-.factory('GridRow', ['gridUtil', function(gridUtil) {
-
- /**
- * @ngdoc function
- * @name ui.grid.class:GridRow
- * @description GridRow is the viewModel for one logical row on the grid. A grid Row is not necessarily a one-to-one
- * relation to gridOptions.data.
- * @param {object} entity the array item from GridOptions.data
- * @param {number} index the current position of the row in the array
- * @param {Grid} reference to the parent grid
- */
- function GridRow(entity, index, grid) {
-
- /**
- * @ngdoc object
- * @name grid
- * @propertyOf ui.grid.class:GridRow
- * @description A reference back to the grid
- */
- this.grid = grid;
-
- /**
- * @ngdoc object
- * @name entity
- * @propertyOf ui.grid.class:GridRow
- * @description A reference to an item in gridOptions.data[]
- */
- this.entity = entity;
-
- /**
- * @ngdoc object
- * @name uid
- * @propertyOf ui.grid.class:GridRow
- * @description UniqueId of row
- */
- this.uid = gridUtil.nextUid();
-
- /**
- * @ngdoc object
- * @name visible
- * @propertyOf ui.grid.class:GridRow
- * @description If true, the row will be rendered
- */
- // Default to true
- this.visible = true;
-
-
- this.$$height = grid.options.rowHeight;
-
- }
-
- /**
- * @ngdoc object
- * @name height
- * @propertyOf ui.grid.class:GridRow
- * @description height of each individual row. changing the height will flag all
- * row renderContainers to recalculate their canvas height
- */
- Object.defineProperty(GridRow.prototype, 'height', {
- get: function() {
- return this.$$height;
- },
- set: function(height) {
- if (height !== this.$$height) {
- this.grid.updateCanvasHeight();
- this.$$height = height;
- }
- }
- });
-
- /**
- * @ngdoc function
- * @name getQualifiedColField
- * @methodOf ui.grid.class:GridRow
- * @description returns the qualified field name as it exists on scope
- * ie: row.entity.fieldA
- * @param {GridCol} col column instance
- * @returns {string} resulting name that can be evaluated on scope
- */
- GridRow.prototype.getQualifiedColField = function(col) {
- return 'row.' + this.getEntityQualifiedColField(col);
- };
-
- /**
- * @ngdoc function
- * @name getEntityQualifiedColField
- * @methodOf ui.grid.class:GridRow
- * @description returns the qualified field name minus the row path
- * ie: entity.fieldA
- * @param {GridCol} col column instance
- * @returns {string} resulting name that can be evaluated against a row
- */
- GridRow.prototype.getEntityQualifiedColField = function(col) {
- return gridUtil.preEval('entity.' + col.field);
- };
-
-
- /**
- * @ngdoc function
- * @name setRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Sets an override on the row that forces it to always
- * be invisible. Emits the rowsVisibleChanged event if it changed the row visibility.
- *
- * This method can be called from the api, passing in the gridRow we want
- * altered. It should really work by calling gridRow.setRowInvisible, but that's
- * not the way I coded it, and too late to change now. Changed to just call
- * the internal function row.setThisRowInvisible().
- *
- * @param {GridRow} row the row we want to set to invisible
- *
- */
- GridRow.prototype.setRowInvisible = function ( row ) {
- if (row && row.setThisRowInvisible){
- row.setThisRowInvisible( 'user' );
- }
- };
-
-
- /**
- * @ngdoc function
- * @name clearRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Clears an override on the row that forces it to always
- * be invisible. Emits the rowsVisibleChanged event if it changed the row visibility.
- *
- * This method can be called from the api, passing in the gridRow we want
- * altered. It should really work by calling gridRow.clearRowInvisible, but that's
- * not the way I coded it, and too late to change now. Changed to just call
- * the internal function row.clearThisRowInvisible().
- *
- * @param {GridRow} row the row we want to clear the invisible flag
- *
- */
- GridRow.prototype.clearRowInvisible = function ( row ) {
- if (row && row.clearThisRowInvisible){
- row.clearThisRowInvisible( 'user' );
- }
- };
-
-
- /**
- * @ngdoc function
- * @name setThisRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Sets an override on the row that forces it to always
- * be invisible. Emits the rowsVisibleChanged event if it changed the row visibility
- *
- * @param {string} reason the reason (usually the module) for the row to be invisible.
- * E.g. grouping, user, filter
- * @param {boolean} fromRowsProcessor whether we were called from a rowsProcessor, passed through to evaluateRowVisibility
- */
- GridRow.prototype.setThisRowInvisible = function ( reason, fromRowsProcessor ) {
- if ( !this.invisibleReason ){
- this.invisibleReason = {};
- }
- this.invisibleReason[reason] = true;
- this.evaluateRowVisibility( fromRowsProcessor);
- };
-
-
- /**
- * @ngdoc function
- * @name clearRowInvisible
- * @methodOf ui.grid.class:GridRow
- * @description Clears any override on the row visibility, returning it
- * to normal visibility calculations. Emits the rowsVisibleChanged
- * event
- *
- * @param {string} reason the reason (usually the module) for the row to be invisible.
- * E.g. grouping, user, filter
- * @param {boolean} fromRowsProcessor whether we were called from a rowsProcessor, passed through to evaluateRowVisibility
- */
- GridRow.prototype.clearThisRowInvisible = function ( reason, fromRowsProcessor ) {
- if (typeof(this.invisibleReason) !== 'undefined' ) {
- delete this.invisibleReason[reason];
- }
- this.evaluateRowVisibility( fromRowsProcessor );
- };
-
-
- /**
- * @ngdoc function
- * @name evaluateRowVisibility
- * @methodOf ui.grid.class:GridRow
- * @description Determines whether the row should be visible based on invisibleReason,
- * and if it changes the row visibility, then emits the rowsVisibleChanged event.
- *
- * Queues a grid refresh, but doesn't call it directly to avoid hitting lots of grid refreshes.
- * @param {boolean} fromRowProcessor if true, then it won't raise events or queue the refresh, the
- * row processor does that already
- */
- GridRow.prototype.evaluateRowVisibility = function ( fromRowProcessor ) {
- var newVisibility = true;
- if ( typeof(this.invisibleReason) !== 'undefined' ){
- angular.forEach(this.invisibleReason, function( value, key ){
- if ( value ){
- newVisibility = false;
- }
- });
- }
-
- if ( typeof(this.visible) === 'undefined' || this.visible !== newVisibility ){
- this.visible = newVisibility;
- if ( !fromRowProcessor ){
- this.grid.queueGridRefresh();
- this.grid.api.core.raise.rowsVisibleChanged(this);
- }
- }
- };
-
-
- return GridRow;
-}]);
-
-})();
-
-(function(){
- 'use strict';
- /**
- * @ngdoc object
- * @name ui.grid.class:GridRowColumn
- * @param {GridRow} row The row for this pair
- * @param {GridColumn} column The column for this pair
- * @description A row and column pair that represents the intersection of these two entities.
- * Must be instantiated as a constructor using the `new` keyword.
- */
- angular.module('ui.grid')
- .factory('GridRowColumn', ['$parse', '$filter',
- function GridRowColumnFactory($parse, $filter){
- var GridRowColumn = function GridRowColumn(row, col) {
- if ( !(this instanceof GridRowColumn)){
- throw "Using GridRowColumn as a function insead of as a constructor. Must be called with `new` keyword";
- }
-
- /**
- * @ngdoc object
- * @name row
- * @propertyOf ui.grid.class:GridRowColumn
- * @description {@link ui.grid.class:GridRow }
- */
- this.row = row;
- /**
- * @ngdoc object
- * @name col
- * @propertyOf ui.grid.class:GridRowColumn
- * @description {@link ui.grid.class:GridColumn }
- */
- this.col = col;
- };
-
- /**
- * @ngdoc function
- * @name getIntersectionValueRaw
- * @methodOf ui.grid.class:GridRowColumn
- * @description Gets the intersection of where the row and column meet.
- * @returns {String|Number|Object} The value from the grid data that this GridRowColumn points too.
- * If the column has a cellFilter this will NOT return the filtered value.
- */
- GridRowColumn.prototype.getIntersectionValueRaw = function(){
- var getter = $parse(this.row.getEntityQualifiedColField(this.col));
- var context = this.row;
- return getter(context);
- };
- /**
- * @ngdoc function
- * @name getIntersectionValueFiltered
- * @methodOf ui.grid.class:GridRowColumn
- * @description Gets the intersection of where the row and column meet.
- * @returns {String|Number|Object} The value from the grid data that this GridRowColumn points too.
- * If the column has a cellFilter this will also apply the filter to it and return the value that the filter displays.
- */
- GridRowColumn.prototype.getIntersectionValueFiltered = function(){
- var value = this.getIntersectionValueRaw();
- if (this.col.cellFilter && this.col.cellFilter !== ''){
- var getFilterIfExists = function(filterName){
- try {
- return $filter(filterName);
- } catch (e){
- return null;
- }
- };
- var filter = getFilterIfExists(this.col.cellFilter);
- if (filter) { // Check if this is filter name or a filter string
- value = filter(value);
- } else { // We have the template version of a filter so we need to parse it apart
- // Get the filter params out using a regex
- // Test out this regex here https://regex101.com/r/rC5eR5/2
- var re = /([^:]*):([^:]*):?([\s\S]+)?/;
- var matches;
- if ((matches = re.exec(this.col.cellFilter)) !== null) {
- // View your result using the matches-variable.
- // eg matches[0] etc.
- value = $filter(matches[1])(value, matches[2], matches[3]);
- }
- }
- }
- return value;
- };
- return GridRowColumn;
- }
- ]);
-})();
-
-(function () {
- angular.module('ui.grid')
- .factory('ScrollEvent', ['gridUtil', function (gridUtil) {
-
- /**
- * @ngdoc function
- * @name ui.grid.class:ScrollEvent
- * @description Model for all scrollEvents
- * @param {Grid} grid that owns the scroll event
- * @param {GridRenderContainer} sourceRowContainer that owns the scroll event. Can be null
- * @param {GridRenderContainer} sourceColContainer that owns the scroll event. Can be null
- * @param {string} source the source of the event - from uiGridConstants.scrollEventSources or a string value of directive/service/factory.functionName
- */
- function ScrollEvent(grid, sourceRowContainer, sourceColContainer, source) {
- var self = this;
- if (!grid) {
- throw new Error("grid argument is required");
- }
-
- /**
- * @ngdoc object
- * @name grid
- * @propertyOf ui.grid.class:ScrollEvent
- * @description A reference back to the grid
- */
- self.grid = grid;
-
-
-
- /**
- * @ngdoc object
- * @name source
- * @propertyOf ui.grid.class:ScrollEvent
- * @description the source of the scroll event. limited to values from uiGridConstants.scrollEventSources
- */
- self.source = source;
-
-
- /**
- * @ngdoc object
- * @name noDelay
- * @propertyOf ui.grid.class:ScrollEvent
- * @description most scroll events from the mouse or trackpad require delay to operate properly
- * set to false to eliminate delay. Useful for scroll events that the grid causes, such as scrolling to make a row visible.
- */
- self.withDelay = true;
-
- self.sourceRowContainer = sourceRowContainer;
- self.sourceColContainer = sourceColContainer;
-
- self.newScrollLeft = null;
- self.newScrollTop = null;
- self.x = null;
- self.y = null;
-
- self.verticalScrollLength = -9999999;
- self.horizontalScrollLength = -999999;
-
-
- /**
- * @ngdoc function
- * @name fireThrottledScrollingEvent
- * @methodOf ui.grid.class:ScrollEvent
- * @description fires a throttled event using grid.api.core.raise.scrollEvent
- */
- self.fireThrottledScrollingEvent = gridUtil.throttle(function(sourceContainerId) {
- self.grid.scrollContainers(sourceContainerId, self);
- }, self.grid.options.wheelScrollThrottle, {trailing: true});
-
- }
-
-
- /**
- * @ngdoc function
- * @name getNewScrollLeft
- * @methodOf ui.grid.class:ScrollEvent
- * @description returns newScrollLeft property if available; calculates a new value if it isn't
- */
- ScrollEvent.prototype.getNewScrollLeft = function(colContainer, viewport){
- var self = this;
-
- if (!self.newScrollLeft){
- var scrollWidth = (colContainer.getCanvasWidth() - colContainer.getViewportWidth());
-
- var oldScrollLeft = gridUtil.normalizeScrollLeft(viewport, self.grid);
-
- var scrollXPercentage;
- if (typeof(self.x.percentage) !== 'undefined' && self.x.percentage !== undefined) {
- scrollXPercentage = self.x.percentage;
- }
- else if (typeof(self.x.pixels) !== 'undefined' && self.x.pixels !== undefined) {
- scrollXPercentage = self.x.percentage = (oldScrollLeft + self.x.pixels) / scrollWidth;
- }
- else {
- throw new Error("No percentage or pixel value provided for scroll event X axis");
- }
-
- return Math.max(0, scrollXPercentage * scrollWidth);
- }
-
- return self.newScrollLeft;
- };
-
-
- /**
- * @ngdoc function
- * @name getNewScrollTop
- * @methodOf ui.grid.class:ScrollEvent
- * @description returns newScrollTop property if available; calculates a new value if it isn't
- */
- ScrollEvent.prototype.getNewScrollTop = function(rowContainer, viewport){
- var self = this;
-
-
- if (!self.newScrollTop){
- var scrollLength = rowContainer.getVerticalScrollLength();
-
- var oldScrollTop = viewport[0].scrollTop;
-
- var scrollYPercentage;
- if (typeof(self.y.percentage) !== 'undefined' && self.y.percentage !== undefined) {
- scrollYPercentage = self.y.percentage;
- }
- else if (typeof(self.y.pixels) !== 'undefined' && self.y.pixels !== undefined) {
- scrollYPercentage = self.y.percentage = (oldScrollTop + self.y.pixels) / scrollLength;
- }
- else {
- throw new Error("No percentage or pixel value provided for scroll event Y axis");
- }
-
- return Math.max(0, scrollYPercentage * scrollLength);
- }
-
- return self.newScrollTop;
- };
-
- ScrollEvent.prototype.atTop = function(scrollTop) {
- return (this.y && (this.y.percentage === 0 || this.verticalScrollLength < 0) && scrollTop === 0);
- };
-
- ScrollEvent.prototype.atBottom = function(scrollTop) {
- return (this.y && (this.y.percentage === 1 || this.verticalScrollLength === 0) && scrollTop > 0);
- };
-
- ScrollEvent.prototype.atLeft = function(scrollLeft) {
- return (this.x && (this.x.percentage === 0 || this.horizontalScrollLength < 0) && scrollLeft === 0);
- };
-
- ScrollEvent.prototype.atRight = function(scrollLeft) {
- return (this.x && (this.x.percentage === 1 || this.horizontalScrollLength ===0) && scrollLeft > 0);
- };
-
-
- ScrollEvent.Sources = {
- ViewPortScroll: 'ViewPortScroll',
- RenderContainerMouseWheel: 'RenderContainerMouseWheel',
- RenderContainerTouchMove: 'RenderContainerTouchMove',
- Other: 99
- };
-
- return ScrollEvent;
- }]);
-
-
-
-})();
-
-(function () {
- 'use strict';
- /**
- * @ngdoc object
- * @name ui.grid.service:gridClassFactory
- *
- * @description factory to return dom specific instances of a grid
- *
- */
- angular.module('ui.grid').service('gridClassFactory', ['gridUtil', '$q', '$compile', '$templateCache', 'uiGridConstants', 'Grid', 'GridColumn', 'GridRow',
- function (gridUtil, $q, $compile, $templateCache, uiGridConstants, Grid, GridColumn, GridRow) {
-
- var service = {
- /**
- * @ngdoc method
- * @name createGrid
- * @methodOf ui.grid.service:gridClassFactory
- * @description Creates a new grid instance. Each instance will have a unique id
- * @param {object} options An object map of options to pass into the created grid instance.
- * @returns {Grid} grid
- */
- createGrid : function(options) {
- options = (typeof(options) !== 'undefined') ? options : {};
- options.id = gridUtil.newId();
- var grid = new Grid(options);
-
- // NOTE/TODO: rowTemplate should always be defined...
- if (grid.options.rowTemplate) {
- var rowTemplateFnPromise = $q.defer();
- grid.getRowTemplateFn = rowTemplateFnPromise.promise;
-
- gridUtil.getTemplate(grid.options.rowTemplate)
- .then(
- function (template) {
- var rowTemplateFn = $compile(template);
- rowTemplateFnPromise.resolve(rowTemplateFn);
- },
- function (res) {
- // Todo handle response error here?
- throw new Error("Couldn't fetch/use row template '" + grid.options.rowTemplate + "'");
- });
- }
-
- grid.registerColumnBuilder(service.defaultColumnBuilder);
-
- // Row builder for custom row templates
- grid.registerRowBuilder(service.rowTemplateAssigner);
-
- // Reset all rows to visible initially
- grid.registerRowsProcessor(function allRowsVisible(rows) {
- rows.forEach(function (row) {
- row.evaluateRowVisibility( true );
- }, 50);
-
- return rows;
- });
-
- grid.registerColumnsProcessor(function allColumnsVisible(columns) {
- columns.forEach(function (column) {
- column.visible = true;
- });
-
- return columns;
- }, 50);
-
- grid.registerColumnsProcessor(function(renderableColumns) {
- renderableColumns.forEach(function (column) {
- if (column.colDef.visible === false) {
- column.visible = false;
- }
- });
-
- return renderableColumns;
- }, 50);
-
-
- grid.registerRowsProcessor(grid.searchRows, 100);
-
- // Register the default row processor, it sorts rows by selected columns
- if (grid.options.externalSort && angular.isFunction(grid.options.externalSort)) {
- grid.registerRowsProcessor(grid.options.externalSort, 200);
- }
- else {
- grid.registerRowsProcessor(grid.sortByColumn, 200);
- }
-
- return grid;
- },
-
- /**
- * @ngdoc function
- * @name defaultColumnBuilder
- * @methodOf ui.grid.service:gridClassFactory
- * @description Processes designTime column definitions and applies them to col for the
- * core grid features
- * @param {object} colDef reference to column definition
- * @param {GridColumn} col reference to gridCol
- * @param {object} gridOptions reference to grid options
- */
- defaultColumnBuilder: function (colDef, col, gridOptions) {
-
- var templateGetPromises = [];
-
- // Abstracts the standard template processing we do for every template type.
- var processTemplate = function( templateType, providedType, defaultTemplate, filterType, tooltipType ) {
- if ( !colDef[templateType] ){
- col[providedType] = defaultTemplate;
- } else {
- col[providedType] = colDef[templateType];
- }
-
- templateGetPromises.push(gridUtil.getTemplate(col[providedType])
- .then(
- function (template) {
- if ( angular.isFunction(template) ) { template = template(); }
- var tooltipCall = ( tooltipType === 'cellTooltip' ) ? 'col.cellTooltip(row,col)' : 'col.headerTooltip(col)';
- if ( tooltipType && col[tooltipType] === false ){
- template = template.replace(uiGridConstants.TOOLTIP, '');
- } else if ( tooltipType && col[tooltipType] ){
- template = template.replace(uiGridConstants.TOOLTIP, 'title="{{' + tooltipCall + ' CUSTOM_FILTERS }}"');
- }
-
- if ( filterType ){
- col[templateType] = template.replace(uiGridConstants.CUSTOM_FILTERS, function() {
- return col[filterType] ? "|" + col[filterType] : "";
- });
- } else {
- col[templateType] = template;
- }
- },
- function (res) {
- throw new Error("Couldn't fetch/use colDef." + templateType + " '" + colDef[templateType] + "'");
- })
- );
-
- };
-
-
- /**
- * @ngdoc property
- * @name cellTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for each cell in this column. The default
- * is ui-grid/uiGridCell. If you are using the cellNav feature, this template
- * must contain a div that can receive focus.
- *
- */
- processTemplate( 'cellTemplate', 'providedCellTemplate', 'ui-grid/uiGridCell', 'cellFilter', 'cellTooltip' );
- col.cellTemplatePromise = templateGetPromises[0];
-
- /**
- * @ngdoc property
- * @name headerCellTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for the header for this column. The default
- * is ui-grid/uiGridHeaderCell
- *
- */
- processTemplate( 'headerCellTemplate', 'providedHeaderCellTemplate', 'ui-grid/uiGridHeaderCell', 'headerCellFilter', 'headerTooltip' );
-
- /**
- * @ngdoc property
- * @name footerCellTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for the footer for this column. The default
- * is ui-grid/uiGridFooterCell
- *
- */
- processTemplate( 'footerCellTemplate', 'providedFooterCellTemplate', 'ui-grid/uiGridFooterCell', 'footerCellFilter' );
-
- /**
- * @ngdoc property
- * @name filterHeaderTemplate
- * @propertyOf ui.grid.class:GridOptions.columnDef
- * @description a custom template for the filter input. The default is ui-grid/ui-grid-filter
- *
- */
- processTemplate( 'filterHeaderTemplate', 'providedFilterHeaderTemplate', 'ui-grid/ui-grid-filter' );
-
- // Create a promise for the compiled element function
- col.compiledElementFnDefer = $q.defer();
-
- return $q.all(templateGetPromises);
- },
-
-
- rowTemplateAssigner: function rowTemplateAssigner(row) {
- var grid = this;
-
- // Row has no template assigned to it
- if (!row.rowTemplate) {
- // Use the default row template from the grid
- row.rowTemplate = grid.options.rowTemplate;
-
- // Use the grid's function for fetching the compiled row template function
- row.getRowTemplateFn = grid.getRowTemplateFn;
- }
- // Row has its own template assigned
- else {
- // Create a promise for the compiled row template function
- var perRowTemplateFnPromise = $q.defer();
- row.getRowTemplateFn = perRowTemplateFnPromise.promise;
-
- // Get the row template
- gridUtil.getTemplate(row.rowTemplate)
- .then(function (template) {
- // Compile the template
- var rowTemplateFn = $compile(template);
-
- // Resolve the compiled template function promise
- perRowTemplateFnPromise.resolve(rowTemplateFn);
- },
- function (res) {
- // Todo handle response error here?
- throw new Error("Couldn't fetch/use row template '" + row.rowTemplate + "'");
- });
- }
-
- return row.getRowTemplateFn;
- }
- };
-
- //class definitions (moved to separate factories)
-
- return service;
- }]);
-
-})();
-
-(function() {
-
-var module = angular.module('ui.grid');
-
-function escapeRegExp(str) {
- return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
-}
-
-
-/**
- * @ngdoc service
- * @name ui.grid.service:rowSearcher
- *
- * @description Service for searching/filtering rows based on column value conditions.
- */
-module.service('rowSearcher', ['gridUtil', 'uiGridConstants', function (gridUtil, uiGridConstants) {
- var defaultCondition = uiGridConstants.filter.CONTAINS;
-
- var rowSearcher = {};
-
- /**
- * @ngdoc function
- * @name getTerm
- * @methodOf ui.grid.service:rowSearcher
- * @description Get the term from a filter
- * Trims leading and trailing whitespace
- * @param {object} filter object to use
- * @returns {object} Parsed term
- */
- rowSearcher.getTerm = function getTerm(filter) {
- if (typeof(filter.term) === 'undefined') { return filter.term; }
-
- var term = filter.term;
-
- // Strip leading and trailing whitespace if the term is a string
- if (typeof(term) === 'string') {
- term = term.trim();
- }
-
- return term;
- };
-
- /**
- * @ngdoc function
- * @name stripTerm
- * @methodOf ui.grid.service:rowSearcher
- * @description Remove leading and trailing asterisk (*) from the filter's term
- * @param {object} filter object to use
- * @returns {uiGridConstants.filter<int>} Value representing the condition constant value
- */
- rowSearcher.stripTerm = function stripTerm(filter) {
- var term = rowSearcher.getTerm(filter);
-
- if (typeof(term) === 'string') {
- return escapeRegExp(term.replace(/(^\*|\*$)/g, ''));
- }
- else {
- return term;
- }
- };
-
-
- /**
- * @ngdoc function
- * @name guessCondition
- * @methodOf ui.grid.service:rowSearcher
- * @description Guess the condition for a filter based on its term
- * <br>
- * Defaults to STARTS_WITH. Uses CONTAINS for strings beginning and ending with *s (*bob*).
- * Uses STARTS_WITH for strings ending with * (bo*). Uses ENDS_WITH for strings starting with * (*ob).
- * @param {object} filter object to use
- * @returns {uiGridConstants.filter<int>} Value representing the condition constant value
- */
- rowSearcher.guessCondition = function guessCondition(filter) {
- if (typeof(filter.term) === 'undefined' || !filter.term) {
- return defaultCondition;
- }
-
- var term = rowSearcher.getTerm(filter);
-
- if (/\*/.test(term)) {
- var regexpFlags = '';
- if (!filter.flags || !filter.flags.caseSensitive) {
- regexpFlags += 'i';
- }
-
- var reText = term.replace(/(\\)?\*/g, function ($0, $1) { return $1 ? $0 : '[\\s\\S]*?'; });
- return new RegExp('^' + reText + '$', regexpFlags);
- }
- // Otherwise default to default condition
- else {
- return defaultCondition;
- }
- };
-
-
- /**
- * @ngdoc function
- * @name setupFilters
- * @methodOf ui.grid.service:rowSearcher
- * @description For a given columns filters (either col.filters, or [col.filter] can be passed in),
- * do all the parsing and pre-processing and store that data into a new filters object. The object
- * has the condition, the flags, the stripped term, and a parsed reg exp if there was one.
- *
- * We could use a forEach in here, since it's much less performance sensitive, but since we're using
- * for loops everywhere else in this module...
- *
- * @param {array} filters the filters from the column (col.filters or [col.filter])
- * @returns {array} An array of parsed/preprocessed filters
- */
- rowSearcher.setupFilters = function setupFilters( filters ){
- var newFilters = [];
-
- var filtersLength = filters.length;
- for ( var i = 0; i < filtersLength; i++ ){
- var filter = filters[i];
-
- if ( filter.noTerm || !gridUtil.isNullOrUndefined(filter.term) ){
- var newFilter = {};
-
- var regexpFlags = '';
- if (!filter.flags || !filter.flags.caseSensitive) {
- regexpFlags += 'i';
- }
-
- if ( !gridUtil.isNullOrUndefined(filter.term) ){
- // it is possible to have noTerm. We don't need to copy that across, it was just a flag to avoid
- // getting the filter ignored if the filter was a function that didn't use a term
- newFilter.term = rowSearcher.stripTerm(filter);
- }
-
- if ( filter.condition ){
- newFilter.condition = filter.condition;
- } else {
- newFilter.condition = rowSearcher.guessCondition(filter);
- }
-
- newFilter.flags = angular.extend( { caseSensitive: false, date: false }, filter.flags );
-
- if (newFilter.condition === uiGridConstants.filter.STARTS_WITH) {
- newFilter.startswithRE = new RegExp('^' + newFilter.term, regexpFlags);
- }
-
- if (newFilter.condition === uiGridConstants.filter.ENDS_WITH) {
- newFilter.endswithRE = new RegExp(newFilter.term + '$', regexpFlags);
- }
-
- if (newFilter.condition === uiGridConstants.filter.CONTAINS) {
- newFilter.containsRE = new RegExp(newFilter.term, regexpFlags);
- }
-
- if (newFilter.condition === uiGridConstants.filter.EXACT) {
- newFilter.exactRE = new RegExp('^' + newFilter.term + '$', regexpFlags);
- }
-
- newFilters.push(newFilter);
- }
- }
- return newFilters;
- };
-
-
- /**
- * @ngdoc function
- * @name runColumnFilter
- * @methodOf ui.grid.service:rowSearcher
- * @description Runs a single pre-parsed filter against a cell, returning true
- * if the cell matches that one filter.
- *
- * @param {Grid} grid the grid we're working against
- * @param {GridRow} row the row we're matching against
- * @param {GridCol} column the column that we're working against
- * @param {object} filter the specific, preparsed, filter that we want to test
- * @returns {boolean} true if we match (row stays visible)
- */
- rowSearcher.runColumnFilter = function runColumnFilter(grid, row, column, filter) {
- // Cache typeof condition
- var conditionType = typeof(filter.condition);
-
- // Term to search for.
- var term = filter.term;
-
- // Get the column value for this row
- var value;
- if ( column.filterCellFiltered ){
- value = grid.getCellDisplayValue(row, column);
- } else {
- value = grid.getCellValue(row, column);
- }
-
-
- // If the filter's condition is a RegExp, then use it
- if (filter.condition instanceof RegExp) {
- return filter.condition.test(value);
- }
-
- // If the filter's condition is a function, run it
- if (conditionType === 'function') {
- return filter.condition(term, value, row, column);
- }
-
- if (filter.startswithRE) {
- return filter.startswithRE.test(value);
- }
-
- if (filter.endswithRE) {
- return filter.endswithRE.test(value);
- }
-
- if (filter.containsRE) {
- return filter.containsRE.test(value);
- }
-
- if (filter.exactRE) {
- return filter.exactRE.test(value);
- }
-
- if (filter.condition === uiGridConstants.filter.NOT_EQUAL) {
- var regex = new RegExp('^' + term + '$');
- return !regex.exec(value);
- }
-
- if (typeof(value) === 'number' && typeof(term) === 'string' ){
- // if the term has a decimal in it, it comes through as '9\.4', we need to take out the \
- // the same for negative numbers
- // TODO: I suspect the right answer is to look at escapeRegExp at the top of this code file, maybe it's not needed?
- var tempFloat = parseFloat(term.replace(/\\\./,'.').replace(/\\\-/,'-'));
- if (!isNaN(tempFloat)) {
- term = tempFloat;
- }
- }
-
- if (filter.flags.date === true) {
- value = new Date(value);
- // If the term has a dash in it, it comes through as '\-' -- we need to take out the '\'.
- term = new Date(term.replace(/\\/g, ''));
- }
-
- if (filter.condition === uiGridConstants.filter.GREATER_THAN) {
- return (value > term);
- }
-
- if (filter.condition === uiGridConstants.filter.GREATER_THAN_OR_EQUAL) {
- return (value >= term);
- }
-
- if (filter.condition === uiGridConstants.filter.LESS_THAN) {
- return (value < term);
- }
-
- if (filter.condition === uiGridConstants.filter.LESS_THAN_OR_EQUAL) {
- return (value <= term);
- }
-
- return true;
- };
-
-
- /**
- * @ngdoc boolean
- * @name useExternalFiltering
- * @propertyOf ui.grid.class:GridOptions
- * @description False by default. When enabled, this setting suppresses the internal filtering.
- * All UI logic will still operate, allowing filter conditions to be set and modified.
- *
- * The external filter logic can listen for the `filterChange` event, which fires whenever
- * a filter has been adjusted.
- */
- /**
- * @ngdoc function
- * @name searchColumn
- * @methodOf ui.grid.service:rowSearcher
- * @description Process provided filters on provided column against a given row. If the row meets
- * the conditions on all the filters, return true.
- * @param {Grid} grid Grid to search in
- * @param {GridRow} row Row to search on
- * @param {GridCol} column Column with the filters to use
- * @param {array} filters array of pre-parsed/preprocessed filters to apply
- * @returns {boolean} Whether the column matches or not.
- */
- rowSearcher.searchColumn = function searchColumn(grid, row, column, filters) {
- if (grid.options.useExternalFiltering) {
- return true;
- }
-
- var filtersLength = filters.length;
- for (var i = 0; i < filtersLength; i++) {
- var filter = filters[i];
-
- var ret = rowSearcher.runColumnFilter(grid, row, column, filter);
- if (!ret) {
- return false;
- }
- }
-
- return true;
- };
-
-
- /**
- * @ngdoc function
- * @name search
- * @methodOf ui.grid.service:rowSearcher
- * @description Run a search across the given rows and columns, marking any rows that don't
- * match the stored col.filters or col.filter as invisible.
- * @param {Grid} grid Grid instance to search inside
- * @param {Array[GridRow]} rows GridRows to filter
- * @param {Array[GridColumn]} columns GridColumns with filters to process
- */
- rowSearcher.search = function search(grid, rows, columns) {
- /*
- * Added performance optimisations into this code base, as this logic creates deeply nested
- * loops and is therefore very performance sensitive. In particular, avoiding forEach as
- * this impacts some browser optimisers (particularly Chrome), using iterators instead
- */
-
- // Don't do anything if we weren't passed any rows
- if (!rows) {
- return;
- }
-
- // don't filter if filtering currently disabled
- if (!grid.options.enableFiltering){
- return rows;
- }
-
- // Build list of filters to apply
- var filterData = [];
-
- var colsLength = columns.length;
-
- var hasTerm = function( filters ) {
- var hasTerm = false;
-
- filters.forEach( function (filter) {
- if ( !gridUtil.isNullOrUndefined(filter.term) && filter.term !== '' || filter.noTerm ){
- hasTerm = true;
- }
- });
-
- return hasTerm;
- };
-
- for (var i = 0; i < colsLength; i++) {
- var col = columns[i];
-
- if (typeof(col.filters) !== 'undefined' && hasTerm(col.filters) ) {
- filterData.push( { col: col, filters: rowSearcher.setupFilters(col.filters) } );
- }
- }
-
- if (filterData.length > 0) {
- // define functions outside the loop, performance optimisation
- var foreachRow = function(grid, row, col, filters){
- if ( row.visible && !rowSearcher.searchColumn(grid, row, col, filters) ) {
- row.visible = false;
- }
- };
-
- var foreachFilterCol = function(grid, filterData){
- var rowsLength = rows.length;
- for ( var i = 0; i < rowsLength; i++){
- foreachRow(grid, rows[i], filterData.col, filterData.filters);
- }
- };
-
- // nested loop itself - foreachFilterCol, which in turn calls foreachRow
- var filterDataLength = filterData.length;
- for ( var j = 0; j < filterDataLength; j++){
- foreachFilterCol( grid, filterData[j] );
- }
-
- if (grid.api.core.raise.rowsVisibleChanged) {
- grid.api.core.raise.rowsVisibleChanged();
- }
-
- // drop any invisible rows
- // keeping these, as needed with filtering for trees - we have to come back and make parent nodes visible if child nodes are selected in the filter
- // rows = rows.filter(function(row){ return row.visible; });
-
- }
-
- return rows;
- };
-
- return rowSearcher;
-}]);
-
-})();
-
-(function() {
-
-var module = angular.module('ui.grid');
-
-/**
- * @ngdoc object
- * @name ui.grid.class:RowSorter
- * @description RowSorter provides the default sorting mechanisms,
- * including guessing column types and applying appropriate sort
- * algorithms
- *
- */
-
-module.service('rowSorter', ['$parse', 'uiGridConstants', function ($parse, uiGridConstants) {
- var currencyRegexStr =
- '(' +
- uiGridConstants.CURRENCY_SYMBOLS
- .map(function (a) { return '\\' + a; }) // Escape all the currency symbols ($ at least will jack up this regex)
- .join('|') + // Join all the symbols together with |s
- ')?';
-
- // /^[-+]?[£$¤¥]?[\d,.]+%?$/
- var numberStrRegex = new RegExp('^[-+]?' + currencyRegexStr + '[\\d,.]+' + currencyRegexStr + '%?$');
-
- var rowSorter = {
- // Cache of sorting functions. Once we create them, we don't want to keep re-doing it
- // this takes a piece of data from the cell and tries to determine its type and what sorting
- // function to use for it
- colSortFnCache: {}
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name guessSortFn
- * @description Assigns a sort function to use based on the itemType in the column
- * @param {string} itemType one of 'number', 'boolean', 'string', 'date', 'object'. And
- * error will be thrown for any other type.
- * @returns {function} a sort function that will sort that type
- */
- rowSorter.guessSortFn = function guessSortFn(itemType) {
- switch (itemType) {
- case "number":
- return rowSorter.sortNumber;
- case "numberStr":
- return rowSorter.sortNumberStr;
- case "boolean":
- return rowSorter.sortBool;
- case "string":
- return rowSorter.sortAlpha;
- case "date":
- return rowSorter.sortDate;
- case "object":
- return rowSorter.basicSort;
- default:
- throw new Error('No sorting function found for type:' + itemType);
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name handleNulls
- * @description Sorts nulls and undefined to the bottom (top when
- * descending). Called by each of the internal sorters before
- * attempting to sort. Note that this method is available on the core api
- * via gridApi.core.sortHandleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} null if there were no nulls/undefineds, otherwise returns
- * a sort value that should be passed back from the sort function
- */
- rowSorter.handleNulls = function handleNulls(a, b) {
- // We want to allow zero values and false values to be evaluated in the sort function
- if ((!a && a !== 0 && a !== false) || (!b && b !== 0 && b !== false)) {
- // We want to force nulls and such to the bottom when we sort... which effectively is "greater than"
- if ((!a && a !== 0 && a !== false) && (!b && b !== 0 && b !== false)) {
- return 0;
- }
- else if (!a && a !== 0 && a !== false) {
- return 1;
- }
- else if (!b && b !== 0 && b !== false) {
- return -1;
- }
- }
- return null;
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name basicSort
- * @description Sorts any values that provide the < method, including strings
- * or numbers. Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.basicSort = function basicSort(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- if (a === b) {
- return 0;
- }
- if (a < b) {
- return -1;
- }
- return 1;
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name sortNumber
- * @description Sorts numerical values. Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortNumber = function sortNumber(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- return a - b;
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name sortNumberStr
- * @description Sorts numerical values that are stored in a string (i.e. parses them to numbers first).
- * Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortNumberStr = function sortNumberStr(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- var numA, // The parsed number form of 'a'
- numB, // The parsed number form of 'b'
- badA = false,
- badB = false;
-
- // Try to parse 'a' to a float
- numA = parseFloat(a.replace(/[^0-9.-]/g, ''));
-
- // If 'a' couldn't be parsed to float, flag it as bad
- if (isNaN(numA)) {
- badA = true;
- }
-
- // Try to parse 'b' to a float
- numB = parseFloat(b.replace(/[^0-9.-]/g, ''));
-
- // If 'b' couldn't be parsed to float, flag it as bad
- if (isNaN(numB)) {
- badB = true;
- }
-
- // We want bad ones to get pushed to the bottom... which effectively is "greater than"
- if (badA && badB) {
- return 0;
- }
-
- if (badA) {
- return 1;
- }
-
- if (badB) {
- return -1;
- }
-
- return numA - numB;
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name sortAlpha
- * @description Sorts string values. Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortAlpha = function sortAlpha(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- var strA = a.toString().toLowerCase(),
- strB = b.toString().toLowerCase();
-
- return strA === strB ? 0 : (strA < strB ? -1 : 1);
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name sortDate
- * @description Sorts date values. Handles nulls and undefined through calling handleNulls.
- * Handles date strings by converting to Date object if not already an instance of Date
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortDate = function sortDate(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- if (!(a instanceof Date)) {
- a = new Date(a);
- }
- if (!(b instanceof Date)){
- b = new Date(b);
- }
- var timeA = a.getTime(),
- timeB = b.getTime();
-
- return timeA === timeB ? 0 : (timeA < timeB ? -1 : 1);
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name sortBool
- * @description Sorts boolean values, true is considered larger than false.
- * Handles nulls and undefined through calling handleNulls
- * @param {object} a sort value a
- * @param {object} b sort value b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.sortBool = function sortBool(a, b) {
- var nulls = rowSorter.handleNulls(a, b);
- if ( nulls !== null ){
- return nulls;
- } else {
- if (a && b) {
- return 0;
- }
-
- if (!a && !b) {
- return 0;
- }
- else {
- return a ? 1 : -1;
- }
- }
- };
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name getSortFn
- * @description Get the sort function for the column. Looks first in
- * rowSorter.colSortFnCache using the column name, failing that it
- * looks at col.sortingAlgorithm (and puts it in the cache), failing that
- * it guesses the sort algorithm based on the data type.
- *
- * The cache currently seems a bit pointless, as none of the work we do is
- * processor intensive enough to need caching. Presumably in future we might
- * inspect the row data itself to guess the sort function, and in that case
- * it would make sense to have a cache, the infrastructure is in place to allow
- * that.
- *
- * @param {Grid} grid the grid to consider
- * @param {GridCol} col the column to find a function for
- * @param {array} rows an array of grid rows. Currently unused, but presumably in future
- * we might inspect the rows themselves to decide what sort of data might be there
- * @returns {function} the sort function chosen for the column
- */
- rowSorter.getSortFn = function getSortFn(grid, col, rows) {
- var sortFn, item;
-
- // See if we already figured out what to use to sort the column and have it in the cache
- if (rowSorter.colSortFnCache[col.colDef.name]) {
- sortFn = rowSorter.colSortFnCache[col.colDef.name];
- }
- // If the column has its OWN sorting algorithm, use that
- else if (col.sortingAlgorithm !== undefined) {
- sortFn = col.sortingAlgorithm;
- rowSorter.colSortFnCache[col.colDef.name] = col.sortingAlgorithm;
- }
- // Always default to sortAlpha when sorting after a cellFilter
- else if ( col.sortCellFiltered && col.cellFilter ){
- sortFn = rowSorter.sortAlpha;
- rowSorter.colSortFnCache[col.colDef.name] = sortFn;
- }
- // Try and guess what sort function to use
- else {
- // Guess the sort function
- sortFn = rowSorter.guessSortFn(col.colDef.type);
-
- // If we found a sort function, cache it
- if (sortFn) {
- rowSorter.colSortFnCache[col.colDef.name] = sortFn;
- }
- else {
- // We assign the alpha sort because anything that is null/undefined will never get passed to
- // the actual sorting function. It will get caught in our null check and returned to be sorted
- // down to the bottom
- sortFn = rowSorter.sortAlpha;
- }
- }
-
- return sortFn;
- };
-
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name prioritySort
- * @description Used where multiple columns are present in the sort criteria,
- * we determine which column should take precedence in the sort by sorting
- * the columns based on their sort.priority
- *
- * @param {gridColumn} a column a
- * @param {gridColumn} b column b
- * @returns {number} normal sort function, returns -ve, 0, +ve
- */
- rowSorter.prioritySort = function (a, b) {
- // Both columns have a sort priority
- if (a.sort.priority !== undefined && b.sort.priority !== undefined) {
- // A is higher priority
- if (a.sort.priority < b.sort.priority) {
- return -1;
- }
- // Equal
- else if (a.sort.priority === b.sort.priority) {
- return 0;
- }
- // B is higher
- else {
- return 1;
- }
- }
- // Only A has a priority
- else if (a.sort.priority || a.sort.priority === 0) {
- return -1;
- }
- // Only B has a priority
- else if (b.sort.priority || b.sort.priority === 0) {
- return 1;
- }
- // Neither has a priority
- else {
- return 0;
- }
- };
-
-
- /**
- * @ngdoc object
- * @name useExternalSorting
- * @propertyOf ui.grid.class:GridOptions
- * @description Prevents the internal sorting from executing. Events will
- * still be fired when the sort changes, and the sort information on
- * the columns will be updated, allowing an external sorter (for example,
- * server sorting) to be implemented. Defaults to false.
- *
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.class:RowSorter
- * @name sort
- * @description sorts the grid
- * @param {Object} grid the grid itself
- * @param {array} rows the rows to be sorted
- * @param {array} columns the columns in which to look
- * for sort criteria
- * @returns {array} sorted rows
- */
- rowSorter.sort = function rowSorterSort(grid, rows, columns) {
- // first make sure we are even supposed to do work
- if (!rows) {
- return;
- }
-
- if (grid.options.useExternalSorting){
- return rows;
- }
-
- // Build the list of columns to sort by
- var sortCols = [];
- columns.forEach(function (col) {
- if (col.sort && !col.sort.ignoreSort && col.sort.direction && (col.sort.direction === uiGridConstants.ASC || col.sort.direction === uiGridConstants.DESC)) {
- sortCols.push(col);
- }
- });
-
- // Sort the "sort columns" by their sort priority
- sortCols = sortCols.sort(rowSorter.prioritySort);
-
- // Now rows to sort by, maintain original order
- if (sortCols.length === 0) {
- return rows;
- }
-
- // Re-usable variables
- var col, direction;
-
- // put a custom index field on each row, used to make a stable sort out of unstable sorts (e.g. Chrome)
- var setIndex = function( row, idx ){
- row.entity.$$uiGridIndex = idx;
- };
- rows.forEach(setIndex);
-
- // IE9-11 HACK.... the 'rows' variable would be empty where we call rowSorter.getSortFn(...) below. We have to use a separate reference
- // var d = data.slice(0);
- var r = rows.slice(0);
-
- // Now actually sort the data
- var rowSortFn = function (rowA, rowB) {
- var tem = 0,
- idx = 0,
- sortFn;
-
- while (tem === 0 && idx < sortCols.length) {
- // grab the metadata for the rest of the logic
- col = sortCols[idx];
- direction = sortCols[idx].sort.direction;
-
- sortFn = rowSorter.getSortFn(grid, col, r);
-
- var propA, propB;
-
- if ( col.sortCellFiltered ){
- propA = grid.getCellDisplayValue(rowA, col);
- propB = grid.getCellDisplayValue(rowB, col);
- } else {
- propA = grid.getCellValue(rowA, col);
- propB = grid.getCellValue(rowB, col);
- }
-
- tem = sortFn(propA, propB, rowA, rowB, direction);
-
- idx++;
- }
-
- // Chrome doesn't implement a stable sort function. If our sort returns 0
- // (i.e. the items are equal), and we're at the last sort column in the list,
- // then return the previous order using our custom
- // index variable
- if (tem === 0 ) {
- return rowA.entity.$$uiGridIndex - rowB.entity.$$uiGridIndex;
- }
-
- // Made it this far, we don't have to worry about null & undefined
- if (direction === uiGridConstants.ASC) {
- return tem;
- } else {
- return 0 - tem;
- }
- };
-
- var newRows = rows.sort(rowSortFn);
-
- // remove the custom index field on each row, used to make a stable sort out of unstable sorts (e.g. Chrome)
- var clearIndex = function( row, idx ){
- delete row.entity.$$uiGridIndex;
- };
- rows.forEach(clearIndex);
-
- return newRows;
- };
-
- return rowSorter;
-}]);
-
-})();
-
-(function() {
-
-var module = angular.module('ui.grid');
-
-var bindPolyfill;
-if (typeof Function.prototype.bind !== "function") {
- bindPolyfill = function() {
- var slice = Array.prototype.slice;
- return function(context) {
- var fn = this,
- args = slice.call(arguments, 1);
- if (args.length) {
- return function() {
- return arguments.length ? fn.apply(context, args.concat(slice.call(arguments))) : fn.apply(context, args);
- };
- }
- return function() {
- return arguments.length ? fn.apply(context, arguments) : fn.call(context);
- };
- };
- };
-}
-
-function getStyles (elem) {
- var e = elem;
- if (typeof(e.length) !== 'undefined' && e.length) {
- e = elem[0];
- }
-
- return e.ownerDocument.defaultView.getComputedStyle(e, null);
-}
-
-var rnumnonpx = new RegExp( "^(" + (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source + ")(?!px)[a-z%]+$", "i" ),
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(block|none|table(?!-c[ea]).+)/,
- cssShow = { position: "absolute", visibility: "hidden", display: "block" };
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? 'border' : 'content' ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === 'width' ? 1 : 0,
-
- val = 0;
-
- var sides = ['Top', 'Right', 'Bottom', 'Left'];
-
- for ( ; i < 4; i += 2 ) {
- var side = sides[i];
- // dump('side', side);
-
- // both box models exclude margin, so add it if we want it
- if ( extra === 'margin' ) {
- var marg = parseFloat(styles[extra + side]);
- if (!isNaN(marg)) {
- val += marg;
- }
- }
- // dump('val1', val);
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === 'content' ) {
- var padd = parseFloat(styles['padding' + side]);
- if (!isNaN(padd)) {
- val -= padd;
- // dump('val2', val);
- }
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== 'margin' ) {
- var bordermarg = parseFloat(styles['border' + side + 'Width']);
- if (!isNaN(bordermarg)) {
- val -= bordermarg;
- // dump('val3', val);
- }
- }
- }
- else {
- // at this point, extra isn't content, so add padding
- var nocontentPad = parseFloat(styles['padding' + side]);
- if (!isNaN(nocontentPad)) {
- val += nocontentPad;
- // dump('val4', val);
- }
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== 'padding') {
- var nocontentnopad = parseFloat(styles['border' + side + 'Width']);
- if (!isNaN(nocontentnopad)) {
- val += nocontentnopad;
- // dump('val5', val);
- }
- }
- }
- }
-
- // dump('augVal', val);
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val, // = name === 'width' ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles(elem),
- isBorderBox = styles['boxSizing'] === 'border-box';
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = styles[name];
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox &&
- ( true || val === elem.style[ name ] ); // use 'true' instead of 'support.boxSizingReliable()'
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- var ret = ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- );
-
- // dump('ret', ret, val);
- return ret;
-}
-
-function getLineHeight(elm) {
- elm = angular.element(elm)[0];
- var parent = elm.parentElement;
-
- if (!parent) {
- parent = document.getElementsByTagName('body')[0];
- }
-
- return parseInt( getStyles(parent).fontSize ) || parseInt( getStyles(elm).fontSize ) || 16;
-}
-
-var uid = ['0', '0', '0', '0'];
-var uidPrefix = 'uiGrid-';
-
-/**
- * @ngdoc service
- * @name ui.grid.service:GridUtil
- *
- * @description Grid utility functions
- */
-module.service('gridUtil', ['$log', '$window', '$document', '$http', '$templateCache', '$timeout', '$interval', '$injector', '$q', '$interpolate', 'uiGridConstants',
- function ($log, $window, $document, $http, $templateCache, $timeout, $interval, $injector, $q, $interpolate, uiGridConstants) {
- var s = {
-
- augmentWidthOrHeight: augmentWidthOrHeight,
-
- getStyles: getStyles,
-
- /**
- * @ngdoc method
- * @name createBoundedWrapper
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {object} Object to bind 'this' to
- * @param {method} Method to bind
- * @returns {Function} The wrapper that performs the binding
- *
- * @description
- * Binds given method to given object.
- *
- * By means of a wrapper, ensures that ``method`` is always bound to
- * ``object`` regardless of its calling environment.
- * Iow, inside ``method``, ``this`` always points to ``object``.
- *
- * See http://alistapart.com/article/getoutbindingsituations
- *
- */
- createBoundedWrapper: function(object, method) {
- return function() {
- return method.apply(object, arguments);
- };
- },
-
-
- /**
- * @ngdoc method
- * @name readableColumnName
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {string} columnName Column name as a string
- * @returns {string} Column name appropriately capitalized and split apart
- *
- @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid']);
-
- app.controller('MainCtrl', ['$scope', 'gridUtil', function ($scope, gridUtil) {
- $scope.name = 'firstName';
- $scope.columnName = function(name) {
- return gridUtil.readableColumnName(name);
- };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <strong>Column name:</strong> <input ng-model="name" />
- <br>
- <strong>Output:</strong> <span ng-bind="columnName(name)"></span>
- </div>
- </file>
- </example>
- */
- readableColumnName: function (columnName) {
- // Convert underscores to spaces
- if (typeof(columnName) === 'undefined' || columnName === undefined || columnName === null) { return columnName; }
-
- if (typeof(columnName) !== 'string') {
- columnName = String(columnName);
- }
-
- return columnName.replace(/_+/g, ' ')
- // Replace a completely all-capsed word with a first-letter-capitalized version
- .replace(/^[A-Z]+$/, function (match) {
- return angular.lowercase(angular.uppercase(match.charAt(0)) + match.slice(1));
- })
- // Capitalize the first letter of words
- .replace(/([\w\u00C0-\u017F]+)/g, function (match) {
- return angular.uppercase(match.charAt(0)) + match.slice(1);
- })
- // Put a space in between words that have partial capilizations (i.e. 'firstName' becomes 'First Name')
- // .replace(/([A-Z]|[A-Z]\w+)([A-Z])/g, "$1 $2");
- // .replace(/(\w+?|\w)([A-Z])/g, "$1 $2");
- .replace(/(\w+?(?=[A-Z]))/g, '$1 ');
- },
-
- /**
- * @ngdoc method
- * @name getColumnsFromData
- * @methodOf ui.grid.service:GridUtil
- * @description Return a list of column names, given a data set
- *
- * @param {string} data Data array for grid
- * @returns {Object} Column definitions with field accessor and column name
- *
- * @example
- <pre>
- var data = [
- { firstName: 'Bob', lastName: 'Jones' },
- { firstName: 'Frank', lastName: 'Smith' }
- ];
-
- var columnDefs = GridUtil.getColumnsFromData(data, excludeProperties);
-
- columnDefs == [
- {
- field: 'firstName',
- name: 'First Name'
- },
- {
- field: 'lastName',
- name: 'Last Name'
- }
- ];
- </pre>
- */
- getColumnsFromData: function (data, excludeProperties) {
- var columnDefs = [];
-
- if (!data || typeof(data[0]) === 'undefined' || data[0] === undefined) { return []; }
- if (angular.isUndefined(excludeProperties)) { excludeProperties = []; }
-
- var item = data[0];
-
- angular.forEach(item,function (prop, propName) {
- if ( excludeProperties.indexOf(propName) === -1){
- columnDefs.push({
- name: propName
- });
- }
- });
-
- return columnDefs;
- },
-
- /**
- * @ngdoc method
- * @name newId
- * @methodOf ui.grid.service:GridUtil
- * @description Return a unique ID string
- *
- * @returns {string} Unique string
- *
- * @example
- <pre>
- var id = GridUtil.newId();
-
- # 1387305700482;
- </pre>
- */
- newId: (function() {
- var seedId = new Date().getTime();
- return function() {
- return seedId += 1;
- };
- })(),
-
-
- /**
- * @ngdoc method
- * @name getTemplate
- * @methodOf ui.grid.service:GridUtil
- * @description Get's template from cache / element / url
- *
- * @param {string|element|promise} Either a string representing the template id, a string representing the template url,
- * an jQuery/Angualr element, or a promise that returns the template contents to use.
- * @returns {object} a promise resolving to template contents
- *
- * @example
- <pre>
- GridUtil.getTemplate(url).then(function (contents) {
- alert(contents);
- })
- </pre>
- */
- getTemplate: function (template) {
- // Try to fetch the template out of the templateCache
- if ($templateCache.get(template)) {
- return s.postProcessTemplate($templateCache.get(template));
- }
-
- // See if the template is itself a promise
- if (template.hasOwnProperty('then')) {
- return template.then(s.postProcessTemplate);
- }
-
- // If the template is an element, return the element
- try {
- if (angular.element(template).length > 0) {
- return $q.when(template).then(s.postProcessTemplate);
- }
- }
- catch (err){
- //do nothing; not valid html
- }
-
- s.logDebug('fetching url', template);
-
- // Default to trying to fetch the template as a url with $http
- return $http({ method: 'GET', url: template})
- .then(
- function (result) {
- var templateHtml = result.data.trim();
- //put in templateCache for next call
- $templateCache.put(template, templateHtml);
- return templateHtml;
- },
- function (err) {
- throw new Error("Could not get template " + template + ": " + err);
- }
- )
- .then(s.postProcessTemplate);
- },
-
- //
- postProcessTemplate: function (template) {
- var startSym = $interpolate.startSymbol(),
- endSym = $interpolate.endSymbol();
-
- // If either of the interpolation symbols have been changed, we need to alter this template
- if (startSym !== '{{' || endSym !== '}}') {
- template = template.replace(/\{\{/g, startSym);
- template = template.replace(/\}\}/g, endSym);
- }
-
- return $q.when(template);
- },
-
- /**
- * @ngdoc method
- * @name guessType
- * @methodOf ui.grid.service:GridUtil
- * @description guesses the type of an argument
- *
- * @param {string/number/bool/object} item variable to examine
- * @returns {string} one of the following
- * - 'string'
- * - 'boolean'
- * - 'number'
- * - 'date'
- * - 'object'
- */
- guessType : function (item) {
- var itemType = typeof(item);
-
- // Check for numbers and booleans
- switch (itemType) {
- case "number":
- case "boolean":
- case "string":
- return itemType;
- default:
- if (angular.isDate(item)) {
- return "date";
- }
- return "object";
- }
- },
-
-
- /**
- * @ngdoc method
- * @name elementWidth
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element DOM element
- * @param {string} [extra] Optional modifier for calculation. Use 'margin' to account for margins on element
- *
- * @returns {number} Element width in pixels, accounting for any borders, etc.
- */
- elementWidth: function (elem) {
-
- },
-
- /**
- * @ngdoc method
- * @name elementHeight
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element DOM element
- * @param {string} [extra] Optional modifier for calculation. Use 'margin' to account for margins on element
- *
- * @returns {number} Element height in pixels, accounting for any borders, etc.
- */
- elementHeight: function (elem) {
-
- },
-
- // Thanks to http://stackoverflow.com/a/13382873/888165
- getScrollbarWidth: function() {
- var outer = document.createElement("div");
- outer.style.visibility = "hidden";
- outer.style.width = "100px";
- outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps
-
- document.body.appendChild(outer);
-
- var widthNoScroll = outer.offsetWidth;
- // force scrollbars
- outer.style.overflow = "scroll";
-
- // add innerdiv
- var inner = document.createElement("div");
- inner.style.width = "100%";
- outer.appendChild(inner);
-
- var widthWithScroll = inner.offsetWidth;
-
- // remove divs
- outer.parentNode.removeChild(outer);
-
- return widthNoScroll - widthWithScroll;
- },
-
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- },
-
- fakeElement: function( elem, options, callback, args ) {
- var ret, name,
- newElement = angular.element(elem).clone()[0];
-
- for ( name in options ) {
- newElement.style[ name ] = options[ name ];
- }
-
- angular.element(document.body).append(newElement);
-
- ret = callback.call( newElement, newElement );
-
- angular.element(newElement).remove();
-
- return ret;
- },
-
- /**
- * @ngdoc method
- * @name normalizeWheelEvent
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {event} event A mouse wheel event
- *
- * @returns {event} A normalized event
- *
- * @description
- * Given an event from this list:
- *
- * `wheel, mousewheel, DomMouseScroll, MozMousePixelScroll`
- *
- * "normalize" it
- * so that it stays consistent no matter what browser it comes from (i.e. scale it correctly and make sure the direction is right.)
- */
- normalizeWheelEvent: function (event) {
- // var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'];
- // var toBind = 'onwheel' in document || document.documentMode >= 9 ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'];
- var lowestDelta, lowestDeltaXY;
-
- var orgEvent = event || window.event,
- args = [].slice.call(arguments, 1),
- delta = 0,
- deltaX = 0,
- deltaY = 0,
- absDelta = 0,
- absDeltaXY = 0,
- fn;
-
- // event = $.event.fix(orgEvent);
- // event.type = 'mousewheel';
-
- // NOTE: jQuery masks the event and stores it in the event as originalEvent
- if (orgEvent.originalEvent) {
- orgEvent = orgEvent.originalEvent;
- }
-
- // Old school scrollwheel delta
- if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta; }
- if ( orgEvent.detail ) { delta = orgEvent.detail * -1; }
-
- // At a minimum, setup the deltaY to be delta
- deltaY = delta;
-
- // Firefox < 17 related to DOMMouseScroll event
- if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
- deltaY = 0;
- deltaX = delta * -1;
- }
-
- // New school wheel delta (wheel event)
- if ( orgEvent.deltaY ) {
- deltaY = orgEvent.deltaY * -1;
- delta = deltaY;
- }
- if ( orgEvent.deltaX ) {
- deltaX = orgEvent.deltaX;
- delta = deltaX * -1;
- }
-
- // Webkit
- if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY; }
- if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = orgEvent.wheelDeltaX; }
-
- // Look for lowest delta to normalize the delta values
- absDelta = Math.abs(delta);
- if ( !lowestDelta || absDelta < lowestDelta ) { lowestDelta = absDelta; }
- absDeltaXY = Math.max(Math.abs(deltaY), Math.abs(deltaX));
- if ( !lowestDeltaXY || absDeltaXY < lowestDeltaXY ) { lowestDeltaXY = absDeltaXY; }
-
- // Get a whole value for the deltas
- fn = delta > 0 ? 'floor' : 'ceil';
- delta = Math[fn](delta / lowestDelta);
- deltaX = Math[fn](deltaX / lowestDeltaXY);
- deltaY = Math[fn](deltaY / lowestDeltaXY);
-
- return {
- delta: delta,
- deltaX: deltaX,
- deltaY: deltaY
- };
- },
-
- // Stolen from Modernizr
- // TODO: make this, and everythign that flows from it, robust
- //http://www.stucox.com/blog/you-cant-detect-a-touchscreen/
- isTouchEnabled: function() {
- var bool;
-
- if (('ontouchstart' in $window) || $window.DocumentTouch && $document instanceof DocumentTouch) {
- bool = true;
- }
-
- return bool;
- },
-
- isNullOrUndefined: function(obj) {
- if (obj === undefined || obj === null) {
- return true;
- }
- return false;
- },
-
- endsWith: function(str, suffix) {
- if (!str || !suffix || typeof str !== "string") {
- return false;
- }
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- },
-
- arrayContainsObjectWithProperty: function(array, propertyName, propertyValue) {
- var found = false;
- angular.forEach(array, function (object) {
- if (object[propertyName] === propertyValue) {
- found = true;
- }
- });
- return found;
- },
-
- //// Shim requestAnimationFrame
- //requestAnimationFrame: $window.requestAnimationFrame && $window.requestAnimationFrame.bind($window) ||
- // $window.webkitRequestAnimationFrame && $window.webkitRequestAnimationFrame.bind($window) ||
- // function(fn) {
- // return $timeout(fn, 10, false);
- // },
-
- numericAndNullSort: function (a, b) {
- if (a === null) { return 1; }
- if (b === null) { return -1; }
- if (a === null && b === null) { return 0; }
- return a - b;
- },
-
- // Disable ngAnimate animations on an element
- disableAnimations: function (element) {
- var $animate;
- try {
- $animate = $injector.get('$animate');
- // See: http://brianhann.com/angular-1-4-breaking-changes-to-be-aware-of/#animate
- if (angular.version.major > 1 || (angular.version.major === 1 && angular.version.minor >= 4)) {
- $animate.enabled(element, false);
- } else {
- $animate.enabled(false, element);
- }
- }
- catch (e) {}
- },
-
- enableAnimations: function (element) {
- var $animate;
- try {
- $animate = $injector.get('$animate');
- // See: http://brianhann.com/angular-1-4-breaking-changes-to-be-aware-of/#animate
- if (angular.version.major > 1 || (angular.version.major === 1 && angular.version.minor >= 4)) {
- $animate.enabled(element, true);
- } else {
- $animate.enabled(true, element);
- }
- return $animate;
- }
- catch (e) {}
- },
-
- // Blatantly stolen from Angular as it isn't exposed (yet. 2.0 maybe?)
- nextUid: function nextUid() {
- var index = uid.length;
- var digit;
-
- while (index) {
- index--;
- digit = uid[index].charCodeAt(0);
- if (digit === 57 /*'9'*/) {
- uid[index] = 'A';
- return uidPrefix + uid.join('');
- }
- if (digit === 90 /*'Z'*/) {
- uid[index] = '0';
- } else {
- uid[index] = String.fromCharCode(digit + 1);
- return uidPrefix + uid.join('');
- }
- }
- uid.unshift('0');
-
- return uidPrefix + uid.join('');
- },
-
- // Blatantly stolen from Angular as it isn't exposed (yet. 2.0 maybe?)
- hashKey: function hashKey(obj) {
- var objType = typeof obj,
- key;
-
- if (objType === 'object' && obj !== null) {
- if (typeof (key = obj.$$hashKey) === 'function') {
- // must invoke on object to keep the right this
- key = obj.$$hashKey();
- }
- else if (typeof(obj.$$hashKey) !== 'undefined' && obj.$$hashKey) {
- key = obj.$$hashKey;
- }
- else if (key === undefined) {
- key = obj.$$hashKey = s.nextUid();
- }
- }
- else {
- key = obj;
- }
-
- return objType + ':' + key;
- },
-
- resetUids: function () {
- uid = ['0', '0', '0'];
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil
- * @name logError
- * @description wraps the $log method, allowing us to choose different
- * treatment within ui-grid if we so desired. At present we only log
- * error messages if uiGridConstants.LOG_ERROR_MESSAGES is set to true
- * @param {string} logMessage message to be logged to the console
- *
- */
- logError: function( logMessage ){
- if ( uiGridConstants.LOG_ERROR_MESSAGES ){
- $log.error( logMessage );
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil
- * @name logWarn
- * @description wraps the $log method, allowing us to choose different
- * treatment within ui-grid if we so desired. At present we only log
- * warning messages if uiGridConstants.LOG_WARN_MESSAGES is set to true
- * @param {string} logMessage message to be logged to the console
- *
- */
- logWarn: function( logMessage ){
- if ( uiGridConstants.LOG_WARN_MESSAGES ){
- $log.warn( logMessage );
- }
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil
- * @name logDebug
- * @description wraps the $log method, allowing us to choose different
- * treatment within ui-grid if we so desired. At present we only log
- * debug messages if uiGridConstants.LOG_DEBUG_MESSAGES is set to true
- *
- */
- logDebug: function() {
- if ( uiGridConstants.LOG_DEBUG_MESSAGES ){
- $log.debug.apply($log, arguments);
- }
- }
-
- };
-
- /**
- * @ngdoc object
- * @name focus
- * @propertyOf ui.grid.service:GridUtil
- * @description Provies a set of methods to set the document focus inside the grid.
- * See {@link ui.grid.service:GridUtil.focus} for more information.
- */
-
- /**
- * @ngdoc object
- * @name ui.grid.service:GridUtil.focus
- * @description Provies a set of methods to set the document focus inside the grid.
- * Timeouts are utilized to ensure that the focus is invoked after any other event has been triggered.
- * e.g. click events that need to run before the focus or
- * inputs elements that are in a disabled state but are enabled when those events
- * are triggered.
- */
- s.focus = {
- queue: [],
- //http://stackoverflow.com/questions/25596399/set-element-focus-in-angular-way
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil.focus
- * @name byId
- * @description Sets the focus of the document to the given id value.
- * If provided with the grid object it will automatically append the grid id.
- * This is done to encourage unique dom id's as it allows for multiple grids on a
- * page.
- * @param {String} id the id of the dom element to set the focus on
- * @param {Object=} Grid the grid object for this grid instance. See: {@link ui.grid.class:Grid}
- * @param {Number} Grid.id the unique id for this grid. Already set on an initialized grid object.
- * @returns {Promise} The `$timeout` promise that will be resolved once focus is set. If another focus is requested before this request is evaluated.
- * then the promise will fail with the `'canceled'` reason.
- */
- byId: function (id, Grid) {
- this._purgeQueue();
- var promise = $timeout(function() {
- var elementID = (Grid && Grid.id ? Grid.id + '-' : '') + id;
- var element = $window.document.getElementById(elementID);
- if (element) {
- element.focus();
- } else {
- s.logWarn('[focus.byId] Element id ' + elementID + ' was not found.');
- }
- });
- this.queue.push(promise);
- return promise;
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil.focus
- * @name byElement
- * @description Sets the focus of the document to the given dom element.
- * @param {(element|angular.element)} element the DOM element to set the focus on
- * @returns {Promise} The `$timeout` promise that will be resolved once focus is set. If another focus is requested before this request is evaluated.
- * then the promise will fail with the `'canceled'` reason.
- */
- byElement: function(element){
- if (!angular.isElement(element)){
- s.logWarn("Trying to focus on an element that isn\'t an element.");
- return $q.reject('not-element');
- }
- element = angular.element(element);
- this._purgeQueue();
- var promise = $timeout(function(){
- if (element){
- element[0].focus();
- }
- });
- this.queue.push(promise);
- return promise;
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.service:GridUtil.focus
- * @name bySelector
- * @description Sets the focus of the document to the given dom element.
- * @param {(element|angular.element)} parentElement the parent/ancestor of the dom element that you are selecting using the query selector
- * @param {String} querySelector finds the dom element using the {@link http://www.w3schools.com/jsref/met_document_queryselector.asp querySelector}
- * @param {boolean} [aSync=false] If true then the selector will be querried inside of a timeout. Otherwise the selector will be querried imidately
- * then the focus will be called.
- * @returns {Promise} The `$timeout` promise that will be resolved once focus is set. If another focus is requested before this request is evaluated.
- * then the promise will fail with the `'canceled'` reason.
- */
- bySelector: function(parentElement, querySelector, aSync){
- var self = this;
- if (!angular.isElement(parentElement)){
- throw new Error("The parent element is not an element.");
- }
- // Ensure that this is an angular element.
- // It is fine if this is already an angular element.
- parentElement = angular.element(parentElement);
- var focusBySelector = function(){
- var element = parentElement[0].querySelector(querySelector);
- return self.byElement(element);
- };
- this._purgeQueue();
- if (aSync){ //Do this asynchronysly
- var promise = $timeout(focusBySelector);
- this.queue.push($timeout(focusBySelector));
- return promise;
- } else {
- return focusBySelector();
- }
- },
- _purgeQueue: function(){
- this.queue.forEach(function(element){
- $timeout.cancel(element);
- });
- this.queue = [];
- }
- };
-
-
- ['width', 'height'].forEach(function (name) {
- var capsName = angular.uppercase(name.charAt(0)) + name.substr(1);
- s['element' + capsName] = function (elem, extra) {
- var e = elem;
- if (e && typeof(e.length) !== 'undefined' && e.length) {
- e = elem[0];
- }
-
- if (e) {
- var styles = getStyles(e);
- return e.offsetWidth === 0 && rdisplayswap.test(styles.display) ?
- s.swap(e, cssShow, function() {
- return getWidthOrHeight(e, name, extra );
- }) :
- getWidthOrHeight( e, name, extra );
- }
- else {
- return null;
- }
- };
-
- s['outerElement' + capsName] = function (elem, margin) {
- return elem ? s['element' + capsName].call(this, elem, margin ? 'margin' : 'border') : null;
- };
- });
-
- // http://stackoverflow.com/a/24107550/888165
- s.closestElm = function closestElm(el, selector) {
- if (typeof(el.length) !== 'undefined' && el.length) {
- el = el[0];
- }
-
- var matchesFn;
-
- // find vendor prefix
- ['matches','webkitMatchesSelector','mozMatchesSelector','msMatchesSelector','oMatchesSelector'].some(function(fn) {
- if (typeof document.body[fn] === 'function') {
- matchesFn = fn;
- return true;
- }
- return false;
- });
-
- // traverse parents
- var parent;
- while (el !== null) {
- parent = el.parentElement;
- if (parent !== null && parent[matchesFn](selector)) {
- return parent;
- }
- el = parent;
- }
-
- return null;
- };
-
- s.type = function (obj) {
- var text = Function.prototype.toString.call(obj.constructor);
- return text.match(/function (.*?)\(/)[1];
- };
-
- s.getBorderSize = function getBorderSize(elem, borderType) {
- if (typeof(elem.length) !== 'undefined' && elem.length) {
- elem = elem[0];
- }
-
- var styles = getStyles(elem);
-
- // If a specific border is supplied, like 'top', read the 'borderTop' style property
- if (borderType) {
- borderType = 'border' + borderType.charAt(0).toUpperCase() + borderType.slice(1);
- }
- else {
- borderType = 'border';
- }
-
- borderType += 'Width';
-
- var val = parseInt(styles[borderType], 10);
-
- if (isNaN(val)) {
- return 0;
- }
- else {
- return val;
- }
- };
-
- // http://stackoverflow.com/a/22948274/888165
- // TODO: Opera? Mobile?
- s.detectBrowser = function detectBrowser() {
- var userAgent = $window.navigator.userAgent;
-
- var browsers = {chrome: /chrome/i, safari: /safari/i, firefox: /firefox/i, ie: /internet explorer|trident\//i};
-
- for (var key in browsers) {
- if (browsers[key].test(userAgent)) {
- return key;
- }
- }
-
- return 'unknown';
- };
-
- // Borrowed from https://github.com/othree/jquery.rtl-scroll-type
- // Determine the scroll "type" this browser is using for RTL
- s.rtlScrollType = function rtlScrollType() {
- if (rtlScrollType.type) {
- return rtlScrollType.type;
- }
-
- var definer = angular.element('<div dir="rtl" style="font-size: 14px; width: 1px; height: 1px; position: absolute; top: -1000px; overflow: scroll">A</div>')[0],
- type = 'reverse';
-
- document.body.appendChild(definer);
-
- if (definer.scrollLeft > 0) {
- type = 'default';
- }
- else {
- definer.scrollLeft = 1;
- if (definer.scrollLeft === 0) {
- type = 'negative';
- }
- }
-
- angular.element(definer).remove();
- rtlScrollType.type = type;
-
- return type;
- };
-
- /**
- * @ngdoc method
- * @name normalizeScrollLeft
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element The element to get the `scrollLeft` from.
- * @param {grid} grid - grid used to normalize (uses the rtl property)
- *
- * @returns {number} A normalized scrollLeft value for the current browser.
- *
- * @description
- * Browsers currently handle RTL in different ways, resulting in inconsistent scrollLeft values. This method normalizes them
- */
- s.normalizeScrollLeft = function normalizeScrollLeft(element, grid) {
- if (typeof(element.length) !== 'undefined' && element.length) {
- element = element[0];
- }
-
- var scrollLeft = element.scrollLeft;
-
- if (grid.isRTL()) {
- switch (s.rtlScrollType()) {
- case 'default':
- return element.scrollWidth - scrollLeft - element.clientWidth;
- case 'negative':
- return Math.abs(scrollLeft);
- case 'reverse':
- return scrollLeft;
- }
- }
-
- return scrollLeft;
- };
-
- /**
- * @ngdoc method
- * @name denormalizeScrollLeft
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {element} element The element to normalize the `scrollLeft` value for
- * @param {number} scrollLeft The `scrollLeft` value to denormalize.
- * @param {grid} grid The grid that owns the scroll event.
- *
- * @returns {number} A normalized scrollLeft value for the current browser.
- *
- * @description
- * Browsers currently handle RTL in different ways, resulting in inconsistent scrollLeft values. This method denormalizes a value for the current browser.
- */
- s.denormalizeScrollLeft = function denormalizeScrollLeft(element, scrollLeft, grid) {
- if (typeof(element.length) !== 'undefined' && element.length) {
- element = element[0];
- }
-
- if (grid.isRTL()) {
- switch (s.rtlScrollType()) {
- case 'default':
- // Get the max scroll for the element
- var maxScrollLeft = element.scrollWidth - element.clientWidth;
-
- // Subtract the current scroll amount from the max scroll
- return maxScrollLeft - scrollLeft;
- case 'negative':
- return scrollLeft * -1;
- case 'reverse':
- return scrollLeft;
- }
- }
-
- return scrollLeft;
- };
-
- /**
- * @ngdoc method
- * @name preEval
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {string} path Path to evaluate
- *
- * @returns {string} A path that is normalized.
- *
- * @description
- * Takes a field path and converts it to bracket notation to allow for special characters in path
- * @example
- * <pre>
- * gridUtil.preEval('property') == 'property'
- * gridUtil.preEval('nested.deep.prop-erty') = "nested['deep']['prop-erty']"
- * </pre>
- */
- s.preEval = function (path) {
- var m = uiGridConstants.BRACKET_REGEXP.exec(path);
- if (m) {
- return (m[1] ? s.preEval(m[1]) : m[1]) + m[2] + (m[3] ? s.preEval(m[3]) : m[3]);
- } else {
- path = path.replace(uiGridConstants.APOS_REGEXP, '\\\'');
- var parts = path.split(uiGridConstants.DOT_REGEXP);
- var preparsed = [parts.shift()]; // first item must be var notation, thus skip
- angular.forEach(parts, function (part) {
- preparsed.push(part.replace(uiGridConstants.FUNC_REGEXP, '\']$1'));
- });
- return preparsed.join('[\'');
- }
- };
-
- /**
- * @ngdoc method
- * @name debounce
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {function} func function to debounce
- * @param {number} wait milliseconds to delay
- * @param {boolean} immediate execute before delay
- *
- * @returns {function} A function that can be executed as debounced function
- *
- * @description
- * Copied from https://github.com/shahata/angular-debounce
- * Takes a function, decorates it to execute only 1 time after multiple calls, and returns the decorated function
- * @example
- * <pre>
- * var debouncedFunc = gridUtil.debounce(function(){alert('debounced');}, 500);
- * debouncedFunc();
- * debouncedFunc();
- * debouncedFunc();
- * </pre>
- */
- s.debounce = function (func, wait, immediate) {
- var timeout, args, context, result;
- function debounce() {
- /* jshint validthis:true */
- context = this;
- args = arguments;
- var later = function () {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- }
- };
- var callNow = immediate && !timeout;
- if (timeout) {
- $timeout.cancel(timeout);
- }
- timeout = $timeout(later, wait);
- if (callNow) {
- result = func.apply(context, args);
- }
- return result;
- }
- debounce.cancel = function () {
- $timeout.cancel(timeout);
- timeout = null;
- };
- return debounce;
- };
-
- /**
- * @ngdoc method
- * @name throttle
- * @methodOf ui.grid.service:GridUtil
- *
- * @param {function} func function to throttle
- * @param {number} wait milliseconds to delay after first trigger
- * @param {Object} params to use in throttle.
- *
- * @returns {function} A function that can be executed as throttled function
- *
- * @description
- * Adapted from debounce function (above)
- * Potential keys for Params Object are:
- * trailing (bool) - whether to trigger after throttle time ends if called multiple times
- * Updated to use $interval rather than $timeout, as protractor (e2e tests) is able to work with $interval,
- * but not with $timeout
- *
- * Note that when using throttle, you need to use throttle to create a new function upfront, then use the function
- * return from that call each time you need to call throttle. If you call throttle itself repeatedly, the lastCall
- * variable will get overwritten and the throttling won't work
- *
- * @example
- * <pre>
- * var throttledFunc = gridUtil.throttle(function(){console.log('throttled');}, 500, {trailing: true});
- * throttledFunc(); //=> logs throttled
- * throttledFunc(); //=> queues attempt to log throttled for ~500ms (since trailing param is truthy)
- * throttledFunc(); //=> updates arguments to keep most-recent request, but does not do anything else.
- * </pre>
- */
- s.throttle = function(func, wait, options){
- options = options || {};
- var lastCall = 0, queued = null, context, args;
-
- function runFunc(endDate){
- lastCall = +new Date();
- func.apply(context, args);
- $interval(function(){ queued = null; }, 0, 1);
- }
-
- return function(){
- /* jshint validthis:true */
- context = this;
- args = arguments;
- if (queued === null){
- var sinceLast = +new Date() - lastCall;
- if (sinceLast > wait){
- runFunc();
- }
- else if (options.trailing){
- queued = $interval(runFunc, wait - sinceLast, 1);
- }
- }
- };
- };
-
- s.on = {};
- s.off = {};
- s._events = {};
-
- s.addOff = function (eventName) {
- s.off[eventName] = function (elm, fn) {
- var idx = s._events[eventName].indexOf(fn);
- if (idx > 0) {
- s._events[eventName].removeAt(idx);
- }
- };
- };
-
- var mouseWheeltoBind = ( 'onwheel' in document || document.documentMode >= 9 ) ? ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
- nullLowestDeltaTimeout,
- lowestDelta;
-
- s.on.mousewheel = function (elm, fn) {
- if (!elm || !fn) { return; }
-
- var $elm = angular.element(elm);
-
- // Store the line height and page height for this particular element
- $elm.data('mousewheel-line-height', getLineHeight($elm));
- $elm.data('mousewheel-page-height', s.elementHeight($elm));
- if (!$elm.data('mousewheel-callbacks')) { $elm.data('mousewheel-callbacks', {}); }
-
- var cbs = $elm.data('mousewheel-callbacks');
- cbs[fn] = (Function.prototype.bind || bindPolyfill).call(mousewheelHandler, $elm[0], fn);
-
- // Bind all the mousew heel events
- for ( var i = mouseWheeltoBind.length; i; ) {
- $elm.on(mouseWheeltoBind[--i], cbs[fn]);
- }
- };
- s.off.mousewheel = function (elm, fn) {
- var $elm = angular.element(elm);
-
- var cbs = $elm.data('mousewheel-callbacks');
- var handler = cbs[fn];
-
- if (handler) {
- for ( var i = mouseWheeltoBind.length; i; ) {
- $elm.off(mouseWheeltoBind[--i], handler);
- }
- }
-
- delete cbs[fn];
-
- if (Object.keys(cbs).length === 0) {
- $elm.removeData('mousewheel-line-height');
- $elm.removeData('mousewheel-page-height');
- $elm.removeData('mousewheel-callbacks');
- }
- };
-
- function mousewheelHandler(fn, event) {
- var $elm = angular.element(this);
-
- var delta = 0,
- deltaX = 0,
- deltaY = 0,
- absDelta = 0,
- offsetX = 0,
- offsetY = 0;
-
- // jQuery masks events
- if (event.originalEvent) { event = event.originalEvent; }
-
- if ( 'detail' in event ) { deltaY = event.detail * -1; }
- if ( 'wheelDelta' in event ) { deltaY = event.wheelDelta; }
- if ( 'wheelDeltaY' in event ) { deltaY = event.wheelDeltaY; }
- if ( 'wheelDeltaX' in event ) { deltaX = event.wheelDeltaX * -1; }
-
- // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
- if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {
- deltaX = deltaY * -1;
- deltaY = 0;
- }
-
- // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
- delta = deltaY === 0 ? deltaX : deltaY;
-
- // New school wheel delta (wheel event)
- if ( 'deltaY' in event ) {
- deltaY = event.deltaY * -1;
- delta = deltaY;
- }
- if ( 'deltaX' in event ) {
- deltaX = event.deltaX;
- if ( deltaY === 0 ) { delta = deltaX * -1; }
- }
-
- // No change actually happened, no reason to go any further
- if ( deltaY === 0 && deltaX === 0 ) { return; }
-
- // Need to convert lines and pages to pixels if we aren't already in pixels
- // There are three delta modes:
- // * deltaMode 0 is by pixels, nothing to do
- // * deltaMode 1 is by lines
- // * deltaMode 2 is by pages
- if ( event.deltaMode === 1 ) {
- var lineHeight = $elm.data('mousewheel-line-height');
- delta *= lineHeight;
- deltaY *= lineHeight;
- deltaX *= lineHeight;
- }
- else if ( event.deltaMode === 2 ) {
- var pageHeight = $elm.data('mousewheel-page-height');
- delta *= pageHeight;
- deltaY *= pageHeight;
- deltaX *= pageHeight;
- }
-
- // Store lowest absolute delta to normalize the delta values
- absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
-
- if ( !lowestDelta || absDelta < lowestDelta ) {
- lowestDelta = absDelta;
-
- // Adjust older deltas if necessary
- if ( shouldAdjustOldDeltas(event, absDelta) ) {
- lowestDelta /= 40;
- }
- }
-
- // Get a whole, normalized value for the deltas
- delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
- deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
- deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
-
- event.deltaMode = 0;
-
- // Normalise offsetX and offsetY properties
- // if ($elm[0].getBoundingClientRect ) {
- // var boundingRect = $(elm)[0].getBoundingClientRect();
- // offsetX = event.clientX - boundingRect.left;
- // offsetY = event.clientY - boundingRect.top;
- // }
-
- // event.deltaX = deltaX;
- // event.deltaY = deltaY;
- // event.deltaFactor = lowestDelta;
-
- var newEvent = {
- originalEvent: event,
- deltaX: deltaX,
- deltaY: deltaY,
- deltaFactor: lowestDelta,
- preventDefault: function () { event.preventDefault(); },
- stopPropagation: function () { event.stopPropagation(); }
- };
-
- // Clearout lowestDelta after sometime to better
- // handle multiple device types that give
- // a different lowestDelta
- // Ex: trackpad = 3 and mouse wheel = 120
- if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
- nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
-
- fn.call($elm[0], newEvent);
- }
-
- function nullLowestDelta() {
- lowestDelta = null;
- }
-
- function shouldAdjustOldDeltas(orgEvent, absDelta) {
- // If this is an older event and the delta is divisable by 120,
- // then we are assuming that the browser is treating this as an
- // older mouse wheel event and that we should divide the deltas
- // by 40 to try and get a more usable deltaFactor.
- // Side note, this actually impacts the reported scroll distance
- // in older browsers and can cause scrolling to be slower than native.
- // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
- return orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
- }
-
- return s;
-}]);
-
-// Add 'px' to the end of a number string if it doesn't have it already
-module.filter('px', function() {
- return function(str) {
- if (str.match(/^[\d\.]+$/)) {
- return str + 'px';
- }
- else {
- return str;
- }
- };
-});
-
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- var lang = {
- aggregate: {
- label: 'položky'
- },
- groupPanel: {
- description: 'Přesuňte záhlaví zde pro vytvoření skupiny dle sloupce.'
- },
- search: {
- placeholder: 'Hledat...',
- showingItems: 'Zobrazuji položky:',
- selectedItems: 'Vybrané položky:',
- totalItems: 'Celkem položek:',
- size: 'Velikost strany:',
- first: 'První strana',
- next: 'Další strana',
- previous: 'Předchozí strana',
- last: 'Poslední strana'
- },
- menu: {
- text: 'Vyberte sloupec:'
- },
- sort: {
- ascending: 'Seřadit od A-Z',
- descending: 'Seřadit od Z-A',
- remove: 'Odebrat seřazení'
- },
- column: {
- hide: 'Schovat sloupec'
- },
- aggregation: {
- count: 'celkem řádků: ',
- sum: 'celkem: ',
- avg: 'avg: ',
- min: 'min.: ',
- max: 'max.: '
- },
- pinning: {
- pinLeft: 'Zamknout vlevo',
- pinRight: 'Zamknout vpravo',
- unpin: 'Odemknout'
- },
- gridMenu: {
- columns: 'Sloupce:',
- importerTitle: 'Importovat soubor',
- exporterAllAsCsv: 'Exportovat všechna data do csv',
- exporterVisibleAsCsv: 'Exportovat viditelná data do csv',
- exporterSelectedAsCsv: 'Exportovat vybraná data do csv',
- exporterAllAsPdf: 'Exportovat všechna data do pdf',
- exporterVisibleAsPdf: 'Exportovat viditelná data do pdf',
- exporterSelectedAsPdf: 'Exportovat vybraná data do pdf',
- clearAllFilters: 'Odstranit všechny filtry'
- },
- importer: {
- noHeaders: 'Názvy sloupců se nepodařilo získat, obsahuje soubor záhlaví?',
- noObjects: 'Data se nepodařilo zpracovat, obsahuje soubor řádky mimo záhlaví?',
- invalidCsv: 'Soubor nelze zpracovat, jedná se o CSV?',
- invalidJson: 'Soubor nelze zpracovat, je to JSON?',
- jsonNotArray: 'Soubor musí obsahovat json. UkonÄuji..'
- },
- pagination: {
- sizes: 'položek na stránku',
- totalItems: 'položek'
- },
- grouping: {
- group: 'Seskupit',
- ungroup: 'Odebrat seskupení',
- aggregate_count: 'Agregace: Count',
- aggregate_sum: 'Agregace: Sum',
- aggregate_max: 'Agregace: Max',
- aggregate_min: 'Agregace: Min',
- aggregate_avg: 'Agregace: Avg',
- aggregate_remove: 'Agregace: Odebrat'
- }
- };
-
- // support varianty of different czech keys.
- $delegate.add('cs', lang);
- $delegate.add('cz', lang);
- $delegate.add('cs-cz', lang);
- $delegate.add('cs-CZ', lang);
- return $delegate;
- }]);
- }]);
-})();
-
-(function(){
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('da', {
- aggregate:{
- label: 'artikler'
- },
- groupPanel:{
- description: 'Grupér rækker udfra en kolonne ved at trække dens overskift hertil.'
- },
- search:{
- placeholder: 'Søg...',
- showingItems: 'Viste rækker:',
- selectedItems: 'Valgte rækker:',
- totalItems: 'Rækker totalt:',
- size: 'Side størrelse:',
- first: 'Første side',
- next: 'Næste side',
- previous: 'Forrige side',
- last: 'Sidste side'
- },
- menu:{
- text: 'Vælg kolonner:'
- },
- column: {
- hide: 'Skjul kolonne'
- },
- aggregation: {
- count: 'samlede rækker: ',
- sum: 'smalede: ',
- avg: 'gns: ',
- min: 'min: ',
- max: 'max: '
- },
- gridMenu: {
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function ($provide) {
- $provide.decorator('i18nService', ['$delegate', function ($delegate) {
- $delegate.add('de', {
- aggregate: {
- label: 'Eintrag'
- },
- groupPanel: {
- description: 'Ziehen Sie eine Spaltenüberschrift hierhin, um nach dieser Spalte zu gruppieren.'
- },
- search: {
- placeholder: 'Suche...',
- showingItems: 'Zeige Einträge:',
- selectedItems: 'Ausgewählte Einträge:',
- totalItems: 'Einträge gesamt:',
- size: 'Einträge pro Seite:',
- first: 'Erste Seite',
- next: 'Nächste Seite',
- previous: 'Vorherige Seite',
- last: 'Letzte Seite'
- },
- menu: {
- text: 'Spalten auswählen:'
- },
- sort: {
- ascending: 'aufsteigend sortieren',
- descending: 'absteigend sortieren',
- remove: 'Sortierung zurücksetzen'
- },
- column: {
- hide: 'Spalte ausblenden'
- },
- aggregation: {
- count: 'Zeilen insgesamt: ',
- sum: 'gesamt: ',
- avg: 'Durchschnitt: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Links anheften',
- pinRight: 'Rechts anheften',
- unpin: 'Lösen'
- },
- gridMenu: {
- columns: 'Spalten:',
- importerTitle: 'Datei importieren',
- exporterAllAsCsv: 'Alle Daten als CSV exportieren',
- exporterVisibleAsCsv: 'sichtbare Daten als CSV exportieren',
- exporterSelectedAsCsv: 'markierte Daten als CSV exportieren',
- exporterAllAsPdf: 'Alle Daten als PDF exportieren',
- exporterVisibleAsPdf: 'sichtbare Daten als PDF exportieren',
- exporterSelectedAsPdf: 'markierte Daten als CSV exportieren',
- clearAllFilters: 'Alle filter reinigen'
- },
- importer: {
- noHeaders: 'Es konnten keine Spaltennamen ermittelt werden. Sind in der Datei Spaltendefinitionen enthalten?',
- noObjects: 'Es konnten keine Zeileninformationen gelesen werden, Sind in der Datei außer den Spaltendefinitionen auch Daten enthalten?',
- invalidCsv: 'Die Datei konnte nicht eingelesen werden, ist es eine gültige CSV-Datei?',
- invalidJson: 'Die Datei konnte nicht eingelesen werden. Enthält sie gültiges JSON?',
- jsonNotArray: 'Die importierte JSON-Datei muß ein Array enthalten. Breche Import ab.'
- },
- pagination: {
- sizes: 'Einträge pro Seite',
- totalItems: 'Einträge'
- },
- grouping: {
- group: 'Gruppieren',
- ungroup: 'Gruppierung aufheben',
- aggregate_count: 'Agg: Anzahl',
- aggregate_sum: 'Agg: Summe',
- aggregate_max: 'Agg: Maximum',
- aggregate_min: 'Agg: Minimum',
- aggregate_avg: 'Agg: Mittelwert',
- aggregate_remove: 'Aggregation entfernen'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('en', {
- headerCell: {
- aria: {
- defaultFilterLabel: 'Filter for column',
- removeFilter: 'Remove Filter',
- columnMenuButtonLabel: 'Column Menu'
- },
- priority: 'Priority:',
- filterLabel: "Filter for column: "
- },
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Drag a column header here and drop it to group by that column.'
- },
- search: {
- placeholder: 'Search...',
- showingItems: 'Showing Items:',
- selectedItems: 'Selected Items:',
- totalItems: 'Total Items:',
- size: 'Page Size:',
- first: 'First Page',
- next: 'Next Page',
- previous: 'Previous Page',
- last: 'Last Page'
- },
- menu: {
- text: 'Choose Columns:'
- },
- sort: {
- ascending: 'Sort Ascending',
- descending: 'Sort Descending',
- none: 'Sort None',
- remove: 'Remove Sort'
- },
- column: {
- hide: 'Hide Column'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Pin Left',
- pinRight: 'Pin Right',
- unpin: 'Unpin'
- },
- columnMenu: {
- close: 'Close'
- },
- gridMenu: {
- aria: {
- buttonLabel: 'Grid Menu'
- },
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- },
- pagination: {
- aria: {
- pageToFirst: 'Page to first',
- pageBack: 'Page back',
- pageSelected: 'Selected page',
- pageForward: 'Page forward',
- pageToLast: 'Page to last'
- },
- sizes: 'items per page',
- totalItems: 'items',
- through: 'through',
- of: 'of'
- },
- grouping: {
- group: 'Group',
- ungroup: 'Ungroup',
- aggregate_count: 'Agg: Count',
- aggregate_sum: 'Agg: Sum',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Avg',
- aggregate_remove: 'Agg: Remove'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('es', {
- aggregate: {
- label: 'Artículos'
- },
- groupPanel: {
- description: 'Arrastre un encabezado de columna aquí y suéltelo para agrupar por esa columna.'
- },
- search: {
- placeholder: 'Buscar...',
- showingItems: 'Artículos Mostrados:',
- selectedItems: 'Artículos Seleccionados:',
- totalItems: 'Artículos Totales:',
- size: 'Tamaño de Página:',
- first: 'Primera Página',
- next: 'Página Siguiente',
- previous: 'Página Anterior',
- last: 'Última Página'
- },
- menu: {
- text: 'Elegir columnas:'
- },
- sort: {
- ascending: 'Orden Ascendente',
- descending: 'Orden Descendente',
- remove: 'Sin Ordenar'
- },
- column: {
- hide: 'Ocultar la columna'
- },
- aggregation: {
- count: 'filas totales: ',
- sum: 'total: ',
- avg: 'media: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Fijar a la Izquierda',
- pinRight: 'Fijar a la Derecha',
- unpin: 'Quitar Fijación'
- },
- gridMenu: {
- columns: 'Columnas:',
- importerTitle: 'Importar archivo',
- exporterAllAsCsv: 'Exportar todo como csv',
- exporterVisibleAsCsv: 'Exportar vista como csv',
- exporterSelectedAsCsv: 'Exportar selección como csv',
- exporterAllAsPdf: 'Exportar todo como pdf',
- exporterVisibleAsPdf: 'Exportar vista como pdf',
- exporterSelectedAsPdf: 'Exportar selección como pdf',
- clearAllFilters: 'Limpiar todos los filtros'
- },
- importer: {
- noHeaders: 'No fue posible derivar los nombres de las columnas, ¿tiene encabezados el archivo?',
- noObjects: 'No fue posible obtener registros, ¿contiene datos el archivo, aparte de los encabezados?',
- invalidCsv: 'No fue posible procesar el archivo, ¿es un CSV válido?',
- invalidJson: 'No fue posible procesar el archivo, ¿es un Json válido?',
- jsonNotArray: 'El archivo json importado debe contener un array, abortando.'
- },
- pagination: {
- sizes: 'registros por página',
- totalItems: 'registros',
- of: 'de'
- },
- grouping: {
- group: 'Agrupar',
- ungroup: 'Desagrupar',
- aggregate_count: 'Agr: Cont',
- aggregate_sum: 'Agr: Sum',
- aggregate_max: 'Agr: Máx',
- aggregate_min: 'Agr: Min',
- aggregate_avg: 'Agr: Prom',
- aggregate_remove: 'Agr: Quitar'
- }
- });
- return $delegate;
- }]);
-}]);
-})();
-
-/**
- * Translated by: R. Salarmehr
- * M. Hosseynzade
- * Using Vajje.com online dictionary.
- */
-(function () {
- angular.module('ui.grid').config(['$provide', function ($provide) {
- $provide.decorator('i18nService', ['$delegate', function ($delegate) {
- $delegate.add('fa', {
- aggregate: {
- label: 'قلم'
- },
- groupPanel: {
- description: 'عنوان یک ستون را بگیر و به گروهی از آن ستون رها کن.'
- },
- search: {
- placeholder: 'جستجو...',
- showingItems: 'نمایش اقلام:',
- selectedItems: 'قلم\u200cهای انتخاب شده:',
- totalItems: 'مجموع اقلام:',
- size: 'اندازه\u200cÛŒ صÙحه:',
- first: 'اولین صÙحه',
- next: 'صÙحه\u200cÛŒ\u200cبعدی',
- previous: 'صÙحه\u200cÛŒ\u200c قبلی',
- last: 'آخرین صÙحه'
- },
- menu: {
- text: 'ستون\u200cهای انتخابی:'
- },
- sort: {
- ascending: 'ترتیب صعودی',
- descending: 'ترتیب نزولی',
- remove: 'حذ٠مرتب کردن'
- },
- column: {
- hide: 'پنهان\u200cکردن ستون'
- },
- aggregation: {
- count: 'تعداد: ',
- sum: 'مجموع: ',
- avg: 'میانگین: ',
- min: 'کمترین: ',
- max: 'بیشترین: '
- },
- pinning: {
- pinLeft: 'پین کردن سمت چپ',
- pinRight: 'پین کردن سمت راست',
- unpin: 'حذ٠پین'
- },
- gridMenu: {
- columns: 'ستون\u200cها:',
- importerTitle: 'وارد کردن Ùایل',
- exporterAllAsCsv: 'خروجی تمام داده\u200cها در Ùایل csv',
- exporterVisibleAsCsv: 'خروجی داده\u200cهای قابل مشاهده در Ùایل csv',
- exporterSelectedAsCsv: 'خروجی داده\u200cهای انتخاب\u200cشده در Ùایل csv',
- exporterAllAsPdf: 'خروجی تمام داده\u200cها در Ùایل pdf',
- exporterVisibleAsPdf: 'خروجی داده\u200cهای قابل مشاهده در Ùایل pdf',
- exporterSelectedAsPdf: 'خروجی داده\u200cهای انتخاب\u200cشده در Ùایل pdf',
- clearAllFilters: 'پاک کردن تمام Ùیلتر'
- },
- importer: {
- noHeaders: 'نام ستون قابل استخراج نیست. آیا Ùایل عنوان دارد؟',
- noObjects: 'اشیا قابل استخراج نیستند. آیا به جز عنوان\u200cها در Ùایل داده وجود دارد؟',
- invalidCsv: 'Ùایل قابل پردازش نیست. آیا Ùرمت csv معتبر است؟',
- invalidJson: 'Ùایل قابل پردازش نیست. آیا Ùرمت json معتبر است؟',
- jsonNotArray: 'Ùایل json وارد شده باید حاوی آرایه باشد. عملیات ساقط شد.'
- },
- pagination: {
- sizes: 'اقلام در هر صÙحه',
- totalItems: 'اقلام',
- of: 'از'
- },
- grouping: {
- group: 'گروه\u200cبندی',
- ungroup: 'حذ٠گروه\u200cبندی',
- aggregate_count: 'Agg: تعداد',
- aggregate_sum: 'Agg: جمع',
- aggregate_max: 'Agg: بیشینه',
- aggregate_min: 'Agg: کمینه',
- aggregate_avg: 'Agg: میانگین',
- aggregate_remove: 'Agg: حذÙ'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('fi', {
- aggregate: {
- label: 'rivit'
- },
- groupPanel: {
- description: 'Raahaa ja pudota otsikko tähän ryhmittääksesi sarakkeen mukaan.'
- },
- search: {
- placeholder: 'Hae...',
- showingItems: 'Näytetään rivejä:',
- selectedItems: 'Valitut rivit:',
- totalItems: 'Rivejä yht.:',
- size: 'Näytä:',
- first: 'Ensimmäinen sivu',
- next: 'Seuraava sivu',
- previous: 'Edellinen sivu',
- last: 'Viimeinen sivu'
- },
- menu: {
- text: 'Valitse sarakkeet:'
- },
- sort: {
- ascending: 'Järjestä nouseva',
- descending: 'Järjestä laskeva',
- remove: 'Poista järjestys'
- },
- column: {
- hide: 'Piilota sarake'
- },
- aggregation: {
- count: 'Rivejä yht.: ',
- sum: 'Summa: ',
- avg: 'K.a.: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Lukitse vasemmalle',
- pinRight: 'Lukitse oikealle',
- unpin: 'Poista lukitus'
- },
- gridMenu: {
- columns: 'Sarakkeet:',
- importerTitle: 'Tuo tiedosto',
- exporterAllAsCsv: 'Vie tiedot csv-muodossa',
- exporterVisibleAsCsv: 'Vie näkyvä tieto csv-muodossa',
- exporterSelectedAsCsv: 'Vie valittu tieto csv-muodossa',
- exporterAllAsPdf: 'Vie tiedot pdf-muodossa',
- exporterVisibleAsPdf: 'Vie näkyvä tieto pdf-muodossa',
- exporterSelectedAsPdf: 'Vie valittu tieto pdf-muodossa',
- clearAllFilters: 'Puhdista kaikki suodattimet'
- },
- importer: {
- noHeaders: 'Sarakkeen nimiä ei voitu päätellä, onko tiedostossa otsikkoriviä?',
- noObjects: 'Tietoja ei voitu lukea, onko tiedostossa muuta kuin otsikkot?',
- invalidCsv: 'Tiedostoa ei voitu käsitellä, oliko se CSV-muodossa?',
- invalidJson: 'Tiedostoa ei voitu käsitellä, oliko se JSON-muodossa?',
- jsonNotArray: 'Tiedosto ei sisältänyt taulukkoa, lopetetaan.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('fr', {
- aggregate: {
- label: 'éléments'
- },
- groupPanel: {
- description: 'Faites glisser une en-tête de colonne ici pour créer un groupe de colonnes.'
- },
- search: {
- placeholder: 'Recherche...',
- showingItems: 'Affichage des éléments :',
- selectedItems: 'Éléments sélectionnés :',
- totalItems: 'Nombre total d\'éléments:',
- size: 'Taille de page:',
- first: 'Première page',
- next: 'Page Suivante',
- previous: 'Page précédente',
- last: 'Dernière page'
- },
- menu: {
- text: 'Choisir des colonnes :'
- },
- sort: {
- ascending: 'Trier par ordre croissant',
- descending: 'Trier par ordre décroissant',
- remove: 'Enlever le tri'
- },
- column: {
- hide: 'Cacher la colonne'
- },
- aggregation: {
- count: 'lignes totales: ',
- sum: 'total: ',
- avg: 'moy: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Épingler à gauche',
- pinRight: 'Épingler à droite',
- unpin: 'Détacher'
- },
- gridMenu: {
- columns: 'Colonnes:',
- importerTitle: 'Importer un fichier',
- exporterAllAsCsv: 'Exporter toutes les données en CSV',
- exporterVisibleAsCsv: 'Exporter les données visibles en CSV',
- exporterSelectedAsCsv: 'Exporter les données sélectionnées en CSV',
- exporterAllAsPdf: 'Exporter toutes les données en PDF',
- exporterVisibleAsPdf: 'Exporter les données visibles en PDF',
- exporterSelectedAsPdf: 'Exporter les données sélectionnées en PDF',
- clearAllFilters: 'Nettoyez tous les filtres'
- },
- importer: {
- noHeaders: 'Impossible de déterminer le nom des colonnes, le fichier possède-t-il une en-tête ?',
- noObjects: 'Aucun objet trouvé, le fichier possède-t-il des données autres que l\'en-tête ?',
- invalidCsv: 'Le fichier n\'a pas pu être traité, le CSV est-il valide ?',
- invalidJson: 'Le fichier n\'a pas pu être traité, le JSON est-il valide ?',
- jsonNotArray: 'Le fichier JSON importé doit contenir un tableau, abandon.'
- },
- pagination: {
- sizes: 'éléments par page',
- totalItems: 'éléments',
- of: 'sur'
- },
- grouping: {
- group: 'Grouper',
- ungroup: 'Dégrouper',
- aggregate_count: 'Agg: Compte',
- aggregate_sum: 'Agg: Somme',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Moy',
- aggregate_remove: 'Agg: Retirer'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function ($provide) {
- $provide.decorator('i18nService', ['$delegate', function ($delegate) {
- $delegate.add('he', {
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'גרור עמודה לכ×ן ושחרר בכדי לקבץ עמודה זו.'
- },
- search: {
- placeholder: 'חפש...',
- showingItems: 'מציג:',
- selectedItems: 'סה"כ נבחרו:',
- totalItems: 'סה"כ רשומות:',
- size: 'תוצ×ות בדף:',
- first: 'דף ר×שון',
- next: 'דף הב×',
- previous: 'דף קוד×',
- last: 'דף ×חרון'
- },
- menu: {
- text: 'בחר עמודות:'
- },
- sort: {
- ascending: 'סדר עולה',
- descending: 'סדר יורד',
- remove: 'בטל'
- },
- column: {
- hide: 'טור הסתר'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- gridMenu: {
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clean all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('hy', {
- aggregate: {
- label: 'Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€'
- },
- groupPanel: {
- description: 'Ô¸Õ½Õ¿ Õ½ÕµÕ¡Õ¶ Õ­Õ´Õ¢Õ¡Õ¾Õ¸Ö€Õ¥Õ¬Õ¸Ö‚ Õ°Õ¡Õ´Õ¡Ö€ Ö„Õ¡Õ·Õ¥Ö„ Ö‡ Õ£ÖÕ¥Ö„ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Õ«Ö€Õ¶ Õ¡ÕµÕ½Õ¿Õ¥Õ²Ö‰'
- },
- search: {
- placeholder: 'Õ“Õ¶Õ¿Ö€Õ¸Ö‚Õ´...',
- showingItems: 'Õ‘Õ¸Ö‚ÖÕ¡Õ¤Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ',
- selectedItems: 'Ô¸Õ¶Õ¿Ö€Õ¾Õ¡Õ®:',
- totalItems: 'Ô¸Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨Õ',
- size: 'ÕÕ¸Õ²Õ¥Ö€Õ« Ö„Õ¡Õ¶Õ¡Õ¯Õ¨ Õ§Õ»Õ¸Ö‚Õ´Õ',
- first: 'Ô±Õ¼Õ¡Õ»Õ«Õ¶ Õ§Õ»',
- next: 'Õ€Õ¡Õ»Õ¸Ö€Õ¤ Õ§Õ»',
- previous: 'Õ†Õ¡Õ­Õ¸Ö€Õ¤ Õ§Õ»',
- last: 'ÕŽÕ¥Ö€Õ»Õ«Õ¶ Õ§Õ»'
- },
- menu: {
- text: 'Ô¸Õ¶Õ¿Ö€Õ¥Õ¬ Õ½ÕµÕ¸Ö‚Õ¶Õ¥Ö€Õ¨:'
- },
- sort: {
- ascending: 'Ô±Õ³Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¸Õ¾',
- descending: 'Õ†Õ¾Õ¡Õ¦Õ´Õ¡Õ¶ Õ¯Õ¡Ö€Õ£Õ¸Õ¾',
- remove: 'Õ€Õ¡Õ¶Õ¥Õ¬ '
- },
- column: {
- hide: 'Ô¹Õ¡Ö„ÖÕ¶Õ¥Õ¬ Õ½ÕµÕ¸Ö‚Õ¶Õ¨'
- },
- aggregation: {
- count: 'Õ¨Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨ Õ¿Õ¸Õ²Õ ',
- sum: 'Õ¨Õ¶Õ¤Õ¡Õ´Õ¥Õ¶Õ¨Õ ',
- avg: 'Õ´Õ«Õ»Õ«Õ¶Õ ',
- min: 'Õ´Õ«Õ¶Õ ',
- max: 'Õ´Õ¡Ö„Õ½Õ '
- },
- pinning: {
- pinLeft: 'Ô¿ÕºÖÕ¶Õ¥Õ¬ Õ±Õ¡Õ­ Õ¯Õ¸Õ²Õ´Õ¸Ö‚Õ´',
- pinRight: 'Ô¿ÕºÖÕ¶Õ¥Õ¬ Õ¡Õ» Õ¯Õ¸Õ²Õ´Õ¸Ö‚Õ´',
- unpin: 'Ô±Ö€Õ±Õ¡Õ¯Õ¥Õ¬'
- },
- gridMenu: {
- columns: 'ÕÕµÕ¸Ö‚Õ¶Õ¥Ö€:',
- importerTitle: 'Õ†Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¥Õ¬ Ö†Õ¡ÕµÕ¬',
- exporterAllAsCsv: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¡Õ´Õ¢Õ¸Õ²Õ»Õ¨ CSV',
- exporterVisibleAsCsv: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¥Ö€Ö‡Õ¡ÖÕ¸Õ² Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ CSV',
- exporterSelectedAsCsv: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ CSV',
- exporterAllAsPdf: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ PDF',
- exporterVisibleAsPdf: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¥Ö€Ö‡Õ¡ÖÕ¸Õ² Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ PDF',
- exporterSelectedAsPdf: 'Ô±Ö€Õ¿Õ¡Õ°Õ¡Õ¶Õ¥Õ¬ Õ¨Õ¶Õ¿Ö€Õ¾Õ¡Õ® Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨ PDF',
- clearAllFilters: 'Õ„Õ¡Ö„Ö€Õ¥Õ¬ Õ¢Õ¸Õ¬Õ¸Ö€ Ö†Õ«Õ¬Õ¿Ö€Õ¥Ö€Õ¨'
- },
- importer: {
- noHeaders: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ¸Ö€Õ¸Õ·Õ¥Õ¬ Õ½ÕµÕ¡Õ¶ Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ¥Ö€Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Ö†Õ¡ÕµÕ¬Õ¨ Õ¸Ö‚Õ¶Õ« Õ¾Õ¥Ö€Õ¶Õ¡Õ£Ö€Õ¥Ö€Ö‰',
- noObjects: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ¯Õ¡Ö€Õ¤Õ¡Õ¬ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Ö†Õ¡ÕµÕ¬Õ¸Ö‚Õ´ Õ¯Õ¡Õ¶ Õ¿Õ¾ÕµÕ¡Õ¬Õ¶Õ¥Ö€Ö‰',
- invalidCsv: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ´Õ·Õ¡Õ¯Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Õ¡ÕµÕ¶ Õ¾Õ¡Õ¾Õ¥Ö€ CSV Õ§Ö‰',
- invalidJson: 'Õ€Õ¶Õ¡Ö€Õ¡Õ¾Õ¸Ö€ Õ¹Õ¥Õ²Õ¡Õ¾ Õ´Õ·Õ¡Õ¯Õ¥Õ¬ Ö†Õ¡ÕµÕ¬Õ¨Ö‰ Ô±Ö€Õ¤ÕµÕ¸ÕžÖ„ Õ¡ÕµÕ¶ Õ¾Õ¡Õ¾Õ¥Ö€ Json Õ§Ö‰',
- jsonNotArray: 'Õ†Õ¥Ö€Õ´Õ¸Ö‚Õ®Õ¾Õ¡Õ® json Ö†Õ¡ÕµÕ¬Õ¨ ÕºÕ¥Õ¿Ö„ Õ§ ÕºÕ¡Ö€Õ¸Ö‚Õ¶Õ¡Õ¯Õ« Õ¦Õ¡Õ¶Õ£Õ¾Õ¡Õ®, Õ¯Õ¡Õ½Õ¥ÖÕ¾Õ¸Ö‚Õ´ Õ§Ö‰'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('it', {
- aggregate: {
- label: 'elementi'
- },
- groupPanel: {
- description: 'Trascina un\'intestazione all\'interno del gruppo della colonna.'
- },
- search: {
- placeholder: 'Ricerca...',
- showingItems: 'Mostra:',
- selectedItems: 'Selezionati:',
- totalItems: 'Totali:',
- size: 'Tot Pagine:',
- first: 'Prima',
- next: 'Prossima',
- previous: 'Precedente',
- last: 'Ultima'
- },
- menu: {
- text: 'Scegli le colonne:'
- },
- sort: {
- ascending: 'Asc.',
- descending: 'Desc.',
- remove: 'Annulla ordinamento'
- },
- column: {
- hide: 'Nascondi'
- },
- aggregation: {
- count: 'righe totali: ',
- sum: 'tot: ',
- avg: 'media: ',
- min: 'minimo: ',
- max: 'massimo: '
- },
- pinning: {
- pinLeft: 'Blocca a sx',
- pinRight: 'Blocca a dx',
- unpin: 'Blocca in alto'
- },
- gridMenu: {
- columns: 'Colonne:',
- importerTitle: 'Importa',
- exporterAllAsCsv: 'Esporta tutti i dati in CSV',
- exporterVisibleAsCsv: 'Esporta i dati visibili in CSV',
- exporterSelectedAsCsv: 'Esporta i dati selezionati in CSV',
- exporterAllAsPdf: 'Esporta tutti i dati in PDF',
- exporterVisibleAsPdf: 'Esporta i dati visibili in PDF',
- exporterSelectedAsPdf: 'Esporta i dati selezionati in PDF',
- clearAllFilters: 'Pulire tutti i filtri'
- },
- importer: {
- noHeaders: 'Impossibile reperire i nomi delle colonne, sicuro che siano indicati all\'interno del file?',
- noObjects: 'Impossibile reperire gli oggetti, sicuro che siano indicati all\'interno del file?',
- invalidCsv: 'Impossibile elaborare il file, sicuro che sia un CSV?',
- invalidJson: 'Impossibile elaborare il file, sicuro che sia un JSON valido?',
- jsonNotArray: 'Errore! Il file JSON da importare deve contenere un array.'
- },
- grouping: {
- group: 'Raggruppa',
- ungroup: 'Separa',
- aggregate_count: 'Agg: N. Elem.',
- aggregate_sum: 'Agg: Somma',
- aggregate_max: 'Agg: Massimo',
- aggregate_min: 'Agg: Minimo',
- aggregate_avg: 'Agg: Media',
- aggregate_remove: 'Agg: Rimuovi'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function() {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ja', {
- aggregate: {
- label: 'é …ç›®'
- },
- groupPanel: {
- description: 'ã“ã“ã«åˆ—ヘッダをドラッグアンドドロップã—ã¦ã€ãã®åˆ—ã§ã‚°ãƒ«ãƒ¼ãƒ—化ã—ã¾ã™ã€‚'
- },
- search: {
- placeholder: '検索...',
- showingItems: '表示中ã®é …ç›®:',
- selectedItems: 'é¸æŠžã—ãŸé …ç›®:',
- totalItems: 'é …ç›®ã®ç·æ•°:',
- size: 'ページサイズ:',
- first: '最åˆã®ãƒšãƒ¼ã‚¸',
- next: '次ã®ãƒšãƒ¼ã‚¸',
- previous: 'å‰ã®ãƒšãƒ¼ã‚¸',
- last: 'å‰ã®ãƒšãƒ¼ã‚¸'
- },
- menu: {
- text: '列ã®é¸æŠž:'
- },
- sort: {
- ascending: '昇順ã«ä¸¦ã¹æ›¿ãˆ',
- descending: 'é™é †ã«ä¸¦ã¹æ›¿ãˆ',
- remove: '並ã¹æ›¿ãˆã®è§£é™¤'
- },
- column: {
- hide: '列ã®éžè¡¨ç¤º'
- },
- aggregation: {
- count: 'åˆè¨ˆè¡Œæ•°: ',
- sum: 'åˆè¨ˆ: ',
- avg: 'å¹³å‡: ',
- min: '最å°: ',
- max: '最大: '
- },
- pinning: {
- pinLeft: 'å·¦ã«å›ºå®š',
- pinRight: 'å³ã«å›ºå®š',
- unpin: '固定解除'
- },
- gridMenu: {
- columns: '列:',
- importerTitle: 'ファイルã®ã‚¤ãƒ³ãƒãƒ¼ãƒˆ',
- exporterAllAsCsv: 'ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterVisibleAsCsv: '表示中ã®ãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterSelectedAsCsv: 'é¸æŠžã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’CSVå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterAllAsPdf: 'ã™ã¹ã¦ã®ãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterVisibleAsPdf: '表示中ã®ãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- exporterSelectedAsPdf: 'é¸æŠžã—ãŸãƒ‡ãƒ¼ã‚¿ã‚’PDFå½¢å¼ã§ã‚¨ã‚¯ã‚¹ãƒãƒ¼ãƒˆ',
- clearAllFilters: 'ã™ã¹ã¦ã®ãƒ•ã‚£ãƒ«ã‚¿ã‚’清掃ã—ã¦ãã ã•ã„'
- },
- importer: {
- noHeaders: '列åã‚’å–å¾—ã§ãã¾ã›ã‚“。ファイルã«ãƒ˜ãƒƒãƒ€ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- noObjects: 'オブジェクトをå–å¾—ã§ãã¾ã›ã‚“。ファイルã«ãƒ˜ãƒƒãƒ€ä»¥å¤–ã®ãƒ‡ãƒ¼ã‚¿ãŒå«ã¾ã‚Œã¦ã„ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- invalidCsv: 'ファイルを処ç†ã§ãã¾ã›ã‚“。ファイルãŒæœ‰åŠ¹ãªCSVå½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- invalidJson: 'ファイルを処ç†ã§ãã¾ã›ã‚“。ファイルãŒæœ‰åŠ¹ãªJSONå½¢å¼ã§ã‚ã‚‹ã“ã¨ã‚’確èªã—ã¦ãã ã•ã„。',
- jsonNotArray: 'インãƒãƒ¼ãƒˆã—ãŸJSONファイルã«ã¯é…列ãŒå«ã¾ã‚Œã¦ã„ã‚‹å¿…è¦ãŒã‚ã‚Šã¾ã™ã€‚処ç†ã‚’中止ã—ã¾ã™ã€‚'
- },
- pagination: {
- sizes: '項目/ページ',
- totalItems: 'é …ç›®'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ko', {
- aggregate: {
- label: 'ì•„ì´í…œ'
- },
- groupPanel: {
- description: '컬럼으로 그룹핑하기 위해서는 컬럼 í—¤ë”를 ëŒì–´ 떨어뜨려 주세요.'
- },
- search: {
- placeholder: '검색...',
- showingItems: '항목 보여주기:',
- selectedItems: 'ì„ íƒ í•­ëª©:',
- totalItems: '전체 항목:',
- size: '페ì´ì§€ í¬ê¸°:',
- first: '첫번째 페ì´ì§€',
- next: 'ë‹¤ìŒ íŽ˜ì´ì§€',
- previous: 'ì´ì „ 페ì´ì§€',
- last: '마지막 페ì´ì§€'
- },
- menu: {
- text: 'ì»¬ëŸ¼ì„ ì„ íƒí•˜ì„¸ìš”:'
- },
- sort: {
- ascending: '오름차순 정렬',
- descending: '내림차순 정렬',
- remove: '소팅 제거'
- },
- column: {
- hide: '컬럼 제거'
- },
- aggregation: {
- count: '전체 갯수: ',
- sum: 'ì „ì²´: ',
- avg: 'í‰ê· : ',
- min: '최소: ',
- max: '최대: '
- },
- pinning: {
- pinLeft: '왼쪽 핀',
- pinRight: '오른쪽 핀',
- unpin: '핀 제거'
- },
- gridMenu: {
- columns: '컬럼:',
- importerTitle: 'íŒŒì¼ ê°€ì ¸ì˜¤ê¸°',
- exporterAllAsCsv: 'csvë¡œ 모든 ë°ì´í„° 내보내기',
- exporterVisibleAsCsv: 'csvë¡œ ë³´ì´ëŠ” ë°ì´í„° 내보내기',
- exporterSelectedAsCsv: 'csvë¡œ ì„ íƒëœ ë°ì´í„° 내보내기',
- exporterAllAsPdf: 'pdfë¡œ 모든 ë°ì´í„° 내보내기',
- exporterVisibleAsPdf: 'pdfë¡œ ë³´ì´ëŠ” ë°ì´í„° 내보내기',
- exporterSelectedAsPdf: 'pdfë¡œ ì„ íƒ ë°ì´í„° 내보내기',
- clearAllFilters: '모든 필터를 청소'
- },
- importer: {
- noHeaders: 'ì»¬ëŸ¼ëª…ì´ ì§€ì •ë˜ì–´ 있지 않습니다. 파ì¼ì— í—¤ë”ê°€ 명시ë˜ì–´ 있는지 확ì¸í•´ 주세요.',
- noObjects: 'ë°ì´í„°ê°€ 지정ë˜ì–´ 있지 않습니다. ë°ì´í„°ê°€ 파ì¼ì— 있는지 확ì¸í•´ 주세요.',
- invalidCsv: '파ì¼ì„ 처리할 수 없습니다. 올바른 csvì¸ì§€ 확ì¸í•´ 주세요.',
- invalidJson: '파ì¼ì„ 처리할 수 없습니다. 올바른 jsonì¸ì§€ 확ì¸í•´ 주세요.',
- jsonNotArray: 'json 파ì¼ì€ ë°°ì—´ì„ í¬í•¨í•´ì•¼ 합니다.'
- },
- pagination: {
- sizes: '페ì´ì§€ë‹¹ 항목',
- totalItems: '전체 항목'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('nl', {
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Sleep hier een kolomnaam heen om op te groeperen.'
- },
- search: {
- placeholder: 'Zoeken...',
- showingItems: 'Getoonde items:',
- selectedItems: 'Geselecteerde items:',
- totalItems: 'Totaal aantal items:',
- size: 'Items per pagina:',
- first: 'Eerste pagina',
- next: 'Volgende pagina',
- previous: 'Vorige pagina',
- last: 'Laatste pagina'
- },
- menu: {
- text: 'Kies kolommen:'
- },
- sort: {
- ascending: 'Sorteer oplopend',
- descending: 'Sorteer aflopend',
- remove: 'Verwijder sortering'
- },
- column: {
- hide: 'Verberg kolom'
- },
- aggregation: {
- count: 'Aantal rijen: ',
- sum: 'Som: ',
- avg: 'Gemiddelde: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Zet links vast',
- pinRight: 'Zet rechts vast',
- unpin: 'Maak los'
- },
- gridMenu: {
- columns: 'Kolommen:',
- importerTitle: 'Importeer bestand',
- exporterAllAsCsv: 'Exporteer alle data als csv',
- exporterVisibleAsCsv: 'Exporteer zichtbare data als csv',
- exporterSelectedAsCsv: 'Exporteer geselecteerde data als csv',
- exporterAllAsPdf: 'Exporteer alle data als pdf',
- exporterVisibleAsPdf: 'Exporteer zichtbare data als pdf',
- exporterSelectedAsPdf: 'Exporteer geselecteerde data als pdf',
- clearAllFilters: 'Reinig alle filters'
- },
- importer: {
- noHeaders: 'Kolomnamen kunnen niet worden afgeleid. Heeft het bestand een header?',
- noObjects: 'Objecten kunnen niet worden afgeleid. Bevat het bestand data naast de headers?',
- invalidCsv: 'Het bestand kan niet verwerkt worden. Is het een valide csv bestand?',
- invalidJson: 'Het bestand kan niet verwerkt worden. Is het valide json?',
- jsonNotArray: 'Het json bestand moet een array bevatten. De actie wordt geannuleerd.'
- },
- pagination: {
- sizes: 'items per pagina',
- totalItems: 'items',
- of: 'van de'
- },
- grouping: {
- group: 'Groepeer',
- ungroup: 'Groepering opheffen',
- aggregate_count: 'Agg: Aantal',
- aggregate_sum: 'Agg: Som',
- aggregate_max: 'Agg: Max',
- aggregate_min: 'Agg: Min',
- aggregate_avg: 'Agg: Gem',
- aggregate_remove: 'Agg: Verwijder'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('pt-br', {
- aggregate: {
- label: 'itens'
- },
- groupPanel: {
- description: 'Arraste e solte uma coluna aqui para agrupar por essa coluna'
- },
- search: {
- placeholder: 'Procurar...',
- showingItems: 'Mostrando os Itens:',
- selectedItems: 'Items Selecionados:',
- totalItems: 'Total de Itens:',
- size: 'Tamanho da Página:',
- first: 'Primeira Página',
- next: 'Próxima Página',
- previous: 'Página Anterior',
- last: 'Última Página'
- },
- menu: {
- text: 'Selecione as colunas:'
- },
- sort: {
- ascending: 'Ordenar Ascendente',
- descending: 'Ordenar Descendente',
- remove: 'Remover Ordenação'
- },
- column: {
- hide: 'Esconder coluna'
- },
- aggregation: {
- count: 'total de linhas: ',
- sum: 'total: ',
- avg: 'med: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Fixar Esquerda',
- pinRight: 'Fixar Direita',
- unpin: 'Desprender'
- },
- gridMenu: {
- columns: 'Colunas:',
- importerTitle: 'Importar arquivo',
- exporterAllAsCsv: 'Exportar todos os dados como csv',
- exporterVisibleAsCsv: 'Exportar dados visíveis como csv',
- exporterSelectedAsCsv: 'Exportar dados selecionados como csv',
- exporterAllAsPdf: 'Exportar todos os dados como pdf',
- exporterVisibleAsPdf: 'Exportar dados visíveis como pdf',
- exporterSelectedAsPdf: 'Exportar dados selecionados como pdf',
- clearAllFilters: 'Limpar todos os filtros'
- },
- importer: {
- noHeaders: 'Nomes de colunas não puderam ser derivados. O arquivo tem um cabeçalho?',
- noObjects: 'Objetos não puderam ser derivados. Havia dados no arquivo, além dos cabeçalhos?',
- invalidCsv: 'Arquivo não pode ser processado. É um CSV válido?',
- invalidJson: 'Arquivo não pode ser processado. É um Json válido?',
- jsonNotArray: 'Arquivo json importado tem que conter um array. Abortando.'
- },
- pagination: {
- sizes: 'itens por página',
- totalItems: 'itens'
- },
- grouping: {
- group: 'Agrupar',
- ungroup: 'Desagrupar',
- aggregate_count: 'Agr: Contar',
- aggregate_sum: 'Agr: Soma',
- aggregate_max: 'Agr: Max',
- aggregate_min: 'Agr: Min',
- aggregate_avg: 'Agr: Med',
- aggregate_remove: 'Agr: Remover'
- }
- });
- return $delegate;
- }]);
-}]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('pt', {
- aggregate: {
- label: 'itens'
- },
- groupPanel: {
- description: 'Arraste e solte uma coluna aqui para agrupar por essa coluna'
- },
- search: {
- placeholder: 'Procurar...',
- showingItems: 'Mostrando os Itens:',
- selectedItems: 'Itens Selecionados:',
- totalItems: 'Total de Itens:',
- size: 'Tamanho da Página:',
- first: 'Primeira Página',
- next: 'Próxima Página',
- previous: 'Página Anterior',
- last: 'Última Página'
- },
- menu: {
- text: 'Selecione as colunas:'
- },
- sort: {
- ascending: 'Ordenar Ascendente',
- descending: 'Ordenar Descendente',
- remove: 'Remover Ordenação'
- },
- column: {
- hide: 'Esconder coluna'
- },
- aggregation: {
- count: 'total de linhas: ',
- sum: 'total: ',
- avg: 'med: ',
- min: 'min: ',
- max: 'max: '
- },
- pinning: {
- pinLeft: 'Fixar Esquerda',
- pinRight: 'Fixar Direita',
- unpin: 'Desprender'
- },
- gridMenu: {
- columns: 'Colunas:',
- importerTitle: 'Importar ficheiro',
- exporterAllAsCsv: 'Exportar todos os dados como csv',
- exporterVisibleAsCsv: 'Exportar dados visíveis como csv',
- exporterSelectedAsCsv: 'Exportar dados selecionados como csv',
- exporterAllAsPdf: 'Exportar todos os dados como pdf',
- exporterVisibleAsPdf: 'Exportar dados visíveis como pdf',
- exporterSelectedAsPdf: 'Exportar dados selecionados como pdf',
- clearAllFilters: 'Limpar todos os filtros'
- },
- importer: {
- noHeaders: 'Nomes de colunas não puderam ser derivados. O ficheiro tem um cabeçalho?',
- noObjects: 'Objetos não puderam ser derivados. Havia dados no ficheiro, além dos cabeçalhos?',
- invalidCsv: 'Ficheiro não pode ser processado. É um CSV válido?',
- invalidJson: 'Ficheiro não pode ser processado. É um Json válido?',
- jsonNotArray: 'Ficheiro json importado tem que conter um array. Interrompendo.'
- },
- pagination: {
- sizes: 'itens por página',
- totalItems: 'itens',
- of: 'de'
- },
- grouping: {
- group: 'Agrupar',
- ungroup: 'Desagrupar',
- aggregate_count: 'Agr: Contar',
- aggregate_sum: 'Agr: Soma',
- aggregate_max: 'Agr: Max',
- aggregate_min: 'Agr: Min',
- aggregate_avg: 'Agr: Med',
- aggregate_remove: 'Agr: Remover'
- }
- });
- return $delegate;
- }]);
-}]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ru', {
- aggregate: {
- label: 'Ñлементы'
- },
- groupPanel: {
- description: 'Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð¸Ñ€Ð¾Ð²ÐºÐ¸ по Ñтолбцу перетащите Ñюда его название.'
- },
- search: {
- placeholder: 'ПоиÑк...',
- showingItems: 'Показать Ñлементы:',
- selectedItems: 'Выбранные Ñлементы:',
- totalItems: 'Ð’Ñего Ñлементов:',
- size: 'Размер Ñтраницы:',
- first: 'ÐŸÐµÑ€Ð²Ð°Ñ Ñтраница',
- next: 'Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница',
- previous: 'ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница',
- last: 'ПоÑледнÑÑ Ñтраница'
- },
- menu: {
- text: 'Выбрать Ñтолбцы:'
- },
- sort: {
- ascending: 'По возраÑтанию',
- descending: 'По убыванию',
- remove: 'Убрать Ñортировку'
- },
- column: {
- hide: 'СпрÑтать Ñтолбец'
- },
- aggregation: {
- count: 'вÑего Ñтрок: ',
- sum: 'итого: ',
- avg: 'Ñреднее: ',
- min: 'мин: ',
- max: 'макÑ: '
- },
- pinning: {
- pinLeft: 'Закрепить Ñлева',
- pinRight: 'Закрепить Ñправа',
- unpin: 'Открепить'
- },
- gridMenu: {
- columns: 'Столбцы:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'ЭкÑпортировать вÑÑ‘ в CSV',
- exporterVisibleAsCsv: 'ЭкÑпортировать видимые данные в CSV',
- exporterSelectedAsCsv: 'ЭкÑпортировать выбранные данные в CSV',
- exporterAllAsPdf: 'ЭкÑпортировать вÑÑ‘ в PDF',
- exporterVisibleAsPdf: 'ЭкÑпортировать видимые данные в PDF',
- exporterSelectedAsPdf: 'ЭкÑпортировать выбранные данные в PDF',
- clearAllFilters: 'ОчиÑтите вÑе фильтры'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('sk', {
- aggregate: {
- label: 'items'
- },
- groupPanel: {
- description: 'Pretiahni sem názov stĺpca pre zoskupenie podľa toho stĺpca.'
- },
- search: {
- placeholder: 'Hľadaj...',
- showingItems: 'Zobrazujem položky:',
- selectedItems: 'Vybraté položky:',
- totalItems: 'PoÄet položiek:',
- size: 'PoÄet:',
- first: 'Prvá strana',
- next: 'Ďalšia strana',
- previous: 'Predchádzajúca strana',
- last: 'Posledná strana'
- },
- menu: {
- text: 'Vyberte stĺpce:'
- },
- sort: {
- ascending: 'Zotriediť vzostupne',
- descending: 'Zotriediť zostupne',
- remove: 'Vymazať triedenie'
- },
- aggregation: {
- count: 'total rows: ',
- sum: 'total: ',
- avg: 'avg: ',
- min: 'min: ',
- max: 'max: '
- },
- gridMenu: {
- columns: 'Columns:',
- importerTitle: 'Import file',
- exporterAllAsCsv: 'Export all data as csv',
- exporterVisibleAsCsv: 'Export visible data as csv',
- exporterSelectedAsCsv: 'Export selected data as csv',
- exporterAllAsPdf: 'Export all data as pdf',
- exporterVisibleAsPdf: 'Export visible data as pdf',
- exporterSelectedAsPdf: 'Export selected data as pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'Column names were unable to be derived, does the file have a header?',
- noObjects: 'Objects were not able to be derived, was there data in the file other than headers?',
- invalidCsv: 'File was unable to be processed, is it valid CSV?',
- invalidJson: 'File was unable to be processed, is it valid Json?',
- jsonNotArray: 'Imported json file must contain an array, aborting.'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('sv', {
- aggregate: {
- label: 'Artiklar'
- },
- groupPanel: {
- description: 'Dra en kolumnrubrik hit och släpp den för att gruppera efter den kolumnen.'
- },
- search: {
- placeholder: 'Sök...',
- showingItems: 'Visar artiklar:',
- selectedItems: 'Valda artiklar:',
- totalItems: 'Antal artiklar:',
- size: 'Sidstorlek:',
- first: 'Första sidan',
- next: 'Nästa sida',
- previous: 'Föregående sida',
- last: 'Sista sidan'
- },
- menu: {
- text: 'Välj kolumner:'
- },
- sort: {
- ascending: 'Sortera stigande',
- descending: 'Sortera fallande',
- remove: 'Inaktivera sortering'
- },
- column: {
- hide: 'Göm kolumn'
- },
- aggregation: {
- count: 'Antal rader: ',
- sum: 'Summa: ',
- avg: 'Genomsnitt: ',
- min: 'Min: ',
- max: 'Max: '
- },
- pinning: {
- pinLeft: 'Fäst vänster',
- pinRight: 'Fäst höger',
- unpin: 'Lösgör'
- },
- gridMenu: {
- columns: 'Kolumner:',
- importerTitle: 'Importera fil',
- exporterAllAsCsv: 'Exportera all data som CSV',
- exporterVisibleAsCsv: 'Exportera synlig data som CSV',
- exporterSelectedAsCsv: 'Exportera markerad data som CSV',
- exporterAllAsPdf: 'Exportera all data som PDF',
- exporterVisibleAsPdf: 'Exportera synlig data som PDF',
- exporterSelectedAsPdf: 'Exportera markerad data som PDF',
- clearAllFilters: 'Rengör alla filter'
- },
- importer: {
- noHeaders: 'Kolumnnamn kunde inte härledas. Har filen ett sidhuvud?',
- noObjects: 'Objekt kunde inte härledas. Har filen data undantaget sidhuvud?',
- invalidCsv: 'Filen kunde inte behandlas, är den en giltig CSV?',
- invalidJson: 'Filen kunde inte behandlas, är den en giltig JSON?',
- jsonNotArray: 'Importerad JSON-fil måste innehålla ett fält. Import avbruten.'
- },
- pagination: {
- sizes: 'Artiklar per sida',
- totalItems: 'Artiklar'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function () {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('ta', {
- aggregate: {
- label: 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯'
- },
- groupPanel: {
- description: 'ஒர௠பதà¯à®¤à®¿à®¯à¯ˆ கà¯à®´à¯à®µà®¾à®• அமைகà¯à®• அபà¯à®ªà®¤à¯à®¤à®¿à®¯à®¿à®©à¯ தலைபà¯à®ªà¯ˆ இஙà¯à®•à¯‡ இழà¯à®¤à¯à®¤à¯ வரவà¯à®®à¯ '
- },
- search: {
- placeholder: 'தேடல௠...',
- showingItems: 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ˆ காணà¯à®ªà®¿à®¤à¯à®¤à®²à¯:',
- selectedItems: 'தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®•à¯à®•à®ªà¯à®ªà®Ÿà¯à®Ÿ உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯:',
- totalItems: 'மொதà¯à®¤ உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯:',
- size: 'பகà¯à®• அளவà¯: ',
- first: 'à®®à¯à®¤à®²à¯ பகà¯à®•à®®à¯',
- next: 'அடà¯à®¤à¯à®¤ பகà¯à®•à®®à¯',
- previous: 'à®®à¯à®¨à¯à®¤à¯ˆà®¯ பகà¯à®•à®®à¯ ',
- last: 'இறà¯à®¤à®¿ பகà¯à®•à®®à¯'
- },
- menu: {
- text: 'பதà¯à®¤à®¿à®•à®³à¯ˆ தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯:'
- },
- sort: {
- ascending: 'மேலிரà¯à®¨à¯à®¤à¯ கீழாக',
- descending: 'கீழிரà¯à®¨à¯à®¤à¯ மேலாக',
- remove: 'வரிசையை நீகà¯à®•à¯'
- },
- column: {
- hide: 'பதà¯à®¤à®¿à®¯à¯ˆ மறைதà¯à®¤à¯ வை '
- },
- aggregation: {
- count: 'மொதà¯à®¤ வரிகளà¯:',
- sum: 'மொதà¯à®¤à®®à¯: ',
- avg: 'சராசரி: ',
- min: 'கà¯à®±à¯ˆà®¨à¯à®¤à®ªà®Ÿà¯à®š: ',
- max: 'அதிகபடà¯à®š: '
- },
- pinning: {
- pinLeft: 'இடதà¯à®ªà¯à®±à®®à®¾à®• தைகà¯à®• ',
- pinRight: 'வலதà¯à®ªà¯à®±à®®à®¾à®• தைகà¯à®•',
- unpin: 'பிரி'
- },
- gridMenu: {
- columns: 'பதà¯à®¤à®¿à®•à®³à¯:',
- importerTitle: 'கோபà¯à®ªà¯ : படிதà¯à®¤à®²à¯',
- exporterAllAsCsv: 'எலà¯à®²à®¾ தரவà¯à®•à®³à¯ˆà®¯à¯à®®à¯ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv',
- exporterVisibleAsCsv: 'இரà¯à®•à¯à®•à¯à®®à¯ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv',
- exporterSelectedAsCsv: 'தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®¤à¯à®¤ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: csv',
- exporterAllAsPdf: 'எலà¯à®²à®¾ தரவà¯à®•à®³à¯ˆà®¯à¯à®®à¯ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf',
- exporterVisibleAsPdf: 'இரà¯à®•à¯à®•à¯à®®à¯ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf',
- exporterSelectedAsPdf: 'தேரà¯à®¨à¯à®¤à¯†à®Ÿà¯à®¤à¯à®¤ தரவà¯à®•à®³à¯ˆ கோபà¯à®ªà®¾à®•à¯à®•à¯: pdf',
- clearAllFilters: 'Clear all filters'
- },
- importer: {
- noHeaders: 'பதà¯à®¤à®¿à®¯à®¿à®©à¯ தலைபà¯à®ªà¯à®•à®³à¯ˆ பெற இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà®¿à®±à¯à®•à¯ தலைபà¯à®ªà¯ உளà¯à®³à®¤à®¾?',
- noObjects: 'இலகà¯à®•à¯à®•à®³à¯ˆ உரà¯à®µà®¾à®•à¯à®• à®®à¯à®Ÿà®¿à®¯à®µà®¿à®²à¯à®²à¯ˆ, கோபà¯à®ªà®¿à®²à¯ தலைபà¯à®ªà¯à®•à®³à¯ˆ தவிர தரவ௠à®à®¤à¯‡à®©à¯à®®à¯ உளà¯à®³à®¤à®¾? ',
- invalidCsv: 'சரிவர நடைமà¯à®±à¯ˆ படà¯à®¤à¯à®¤ இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà¯ சரிதானா? - csv',
- invalidJson: 'சரிவர நடைமà¯à®±à¯ˆ படà¯à®¤à¯à®¤ இயலவிலà¯à®²à¯ˆ, கோபà¯à®ªà¯ சரிதானா? - json',
- jsonNotArray: 'படிதà¯à®¤ கோபà¯à®ªà®¿à®²à¯ வரிசைகள௠உளà¯à®³à®¤à¯, நடைமà¯à®±à¯ˆ ரதà¯à®¤à¯ செய௠: json'
- },
- pagination: {
- sizes : 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ / பகà¯à®•à®®à¯',
- totalItems : 'உரà¯à®ªà¯à®ªà®Ÿà®¿à®•à®³à¯ '
- },
- grouping: {
- group : 'கà¯à®´à¯',
- ungroup : 'பிரி',
- aggregate_count : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : எணà¯à®£à¯',
- aggregate_sum : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : கூடà¯à®Ÿà®²à¯',
- aggregate_max : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : அதிகபடà¯à®šà®®à¯',
- aggregate_min : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : கà¯à®±à¯ˆà®¨à¯à®¤à®ªà®Ÿà¯à®šà®®à¯',
- aggregate_avg : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : சராசரி',
- aggregate_remove : 'மதிபà¯à®ªà¯€à®Ÿà¯à®Ÿà¯ : நீகà¯à®•à¯'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-/**
- * @ngdoc overview
- * @name ui.grid.i18n
- * @description
- *
- * # ui.grid.i18n
- * This module provides i18n functions to ui.grid and any application that wants to use it
-
- *
- * <div doc-module-components="ui.grid.i18n"></div>
- */
-
-(function () {
- var DIRECTIVE_ALIASES = ['uiT', 'uiTranslate'];
- var FILTER_ALIASES = ['t', 'uiTranslate'];
-
- var module = angular.module('ui.grid.i18n');
-
-
- /**
- * @ngdoc object
- * @name ui.grid.i18n.constant:i18nConstants
- *
- * @description constants available in i18n module
- */
- module.constant('i18nConstants', {
- MISSING: '[MISSING]',
- UPDATE_EVENT: '$uiI18n',
-
- LOCALE_DIRECTIVE_ALIAS: 'uiI18n',
- // default to english
- DEFAULT_LANG: 'en'
- });
-
-// module.config(['$provide', function($provide) {
-// $provide.decorator('i18nService', ['$delegate', function($delegate) {}])}]);
-
- /**
- * @ngdoc service
- * @name ui.grid.i18n.service:i18nService
- *
- * @description Services for i18n
- */
- module.service('i18nService', ['$log', 'i18nConstants', '$rootScope',
- function ($log, i18nConstants, $rootScope) {
-
- var langCache = {
- _langs: {},
- current: null,
- get: function (lang) {
- return this._langs[lang.toLowerCase()];
- },
- add: function (lang, strings) {
- var lower = lang.toLowerCase();
- if (!this._langs[lower]) {
- this._langs[lower] = {};
- }
- angular.extend(this._langs[lower], strings);
- },
- getAllLangs: function () {
- var langs = [];
- if (!this._langs) {
- return langs;
- }
-
- for (var key in this._langs) {
- langs.push(key);
- }
-
- return langs;
- },
- setCurrent: function (lang) {
- this.current = lang.toLowerCase();
- },
- getCurrentLang: function () {
- return this.current;
- }
- };
-
- var service = {
-
- /**
- * @ngdoc service
- * @name add
- * @methodOf ui.grid.i18n.service:i18nService
- * @description Adds the languages and strings to the cache. Decorate this service to
- * add more translation strings
- * @param {string} lang language to add
- * @param {object} stringMaps of strings to add grouped by property names
- * @example
- * <pre>
- * i18nService.add('en', {
- * aggregate: {
- * label1: 'items',
- * label2: 'some more items'
- * }
- * },
- * groupPanel: {
- * description: 'Drag a column header here and drop it to group by that column.'
- * }
- * }
- * </pre>
- */
- add: function (langs, stringMaps) {
- if (typeof(langs) === 'object') {
- angular.forEach(langs, function (lang) {
- if (lang) {
- langCache.add(lang, stringMaps);
- }
- });
- } else {
- langCache.add(langs, stringMaps);
- }
- },
-
- /**
- * @ngdoc service
- * @name getAllLangs
- * @methodOf ui.grid.i18n.service:i18nService
- * @description return all currently loaded languages
- * @returns {array} string
- */
- getAllLangs: function () {
- return langCache.getAllLangs();
- },
-
- /**
- * @ngdoc service
- * @name get
- * @methodOf ui.grid.i18n.service:i18nService
- * @description return all currently loaded languages
- * @param {string} lang to return. If not specified, returns current language
- * @returns {object} the translation string maps for the language
- */
- get: function (lang) {
- var language = lang ? lang : service.getCurrentLang();
- return langCache.get(language);
- },
-
- /**
- * @ngdoc service
- * @name getSafeText
- * @methodOf ui.grid.i18n.service:i18nService
- * @description returns the text specified in the path or a Missing text if text is not found
- * @param {string} path property path to use for retrieving text from string map
- * @param {string} lang to return. If not specified, returns current language
- * @returns {object} the translation for the path
- * @example
- * <pre>
- * i18nService.getSafeText('sort.ascending')
- * </pre>
- */
- getSafeText: function (path, lang) {
- var language = lang ? lang : service.getCurrentLang();
- var trans = langCache.get(language);
-
- if (!trans) {
- return i18nConstants.MISSING;
- }
-
- var paths = path.split('.');
- var current = trans;
-
- for (var i = 0; i < paths.length; ++i) {
- if (current[paths[i]] === undefined || current[paths[i]] === null) {
- return i18nConstants.MISSING;
- } else {
- current = current[paths[i]];
- }
- }
-
- return current;
-
- },
-
- /**
- * @ngdoc service
- * @name setCurrentLang
- * @methodOf ui.grid.i18n.service:i18nService
- * @description sets the current language to use in the application
- * $broadcasts the Update_Event on the $rootScope
- * @param {string} lang to set
- * @example
- * <pre>
- * i18nService.setCurrentLang('fr');
- * </pre>
- */
-
- setCurrentLang: function (lang) {
- if (lang) {
- langCache.setCurrent(lang);
- $rootScope.$broadcast(i18nConstants.UPDATE_EVENT);
- }
- },
-
- /**
- * @ngdoc service
- * @name getCurrentLang
- * @methodOf ui.grid.i18n.service:i18nService
- * @description returns the current language used in the application
- */
- getCurrentLang: function () {
- var lang = langCache.getCurrentLang();
- if (!lang) {
- lang = i18nConstants.DEFAULT_LANG;
- langCache.setCurrent(lang);
- }
- return lang;
- }
-
- };
-
- return service;
-
- }]);
-
- var localeDirective = function (i18nService, i18nConstants) {
- return {
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
- var alias = i18nConstants.LOCALE_DIRECTIVE_ALIAS;
- // check for watchable property
- var lang = $scope.$eval($attrs[alias]);
- if (lang) {
- $scope.$watch($attrs[alias], function () {
- i18nService.setCurrentLang(lang);
- });
- } else if ($attrs.$$observers) {
- $attrs.$observe(alias, function () {
- i18nService.setCurrentLang($attrs[alias] || i18nConstants.DEFAULT_LANG);
- });
- }
- }
- };
- }
- };
- };
-
- module.directive('uiI18n', ['i18nService', 'i18nConstants', localeDirective]);
-
- // directive syntax
- var uitDirective = function ($parse, i18nService, i18nConstants) {
- return {
- restrict: 'EA',
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
- var alias1 = DIRECTIVE_ALIASES[0],
- alias2 = DIRECTIVE_ALIASES[1];
- var token = $attrs[alias1] || $attrs[alias2] || $elm.html();
- var missing = i18nConstants.MISSING + token;
- var observer;
- if ($attrs.$$observers) {
- var prop = $attrs[alias1] ? alias1 : alias2;
- observer = $attrs.$observe(prop, function (result) {
- if (result) {
- $elm.html($parse(result)(i18nService.getCurrentLang()) || missing);
- }
- });
- }
- var getter = $parse(token);
- var listener = $scope.$on(i18nConstants.UPDATE_EVENT, function (evt) {
- if (observer) {
- observer($attrs[alias1] || $attrs[alias2]);
- } else {
- // set text based on i18n current language
- $elm.html(getter(i18nService.get()) || missing);
- }
- });
- $scope.$on('$destroy', listener);
-
- $elm.html(getter(i18nService.get()) || missing);
- }
- };
- }
- };
- };
-
- angular.forEach( DIRECTIVE_ALIASES, function ( alias ) {
- module.directive( alias, ['$parse', 'i18nService', 'i18nConstants', uitDirective] );
- } );
-
- // optional filter syntax
- var uitFilter = function ($parse, i18nService, i18nConstants) {
- return function (data) {
- var getter = $parse(data);
- // set text based on i18n current language
- return getter(i18nService.get()) || i18nConstants.MISSING + data;
- };
- };
-
- angular.forEach( FILTER_ALIASES, function ( alias ) {
- module.filter( alias, ['$parse', 'i18nService', 'i18nConstants', uitFilter] );
- } );
-
-
-})();
-(function() {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('zh-cn', {
- headerCell: {
- aria: {
- defaultFilterLabel: '列过滤器',
- removeFilter: '移除过滤器',
- columnMenuButtonLabel: '列èœå•'
- },
- priority: '优先级:',
- filterLabel: "列过滤器: "
- },
- aggregate: {
- label: '行'
- },
- groupPanel: {
- description: '拖曳表头到此处进行分组'
- },
- search: {
- placeholder: '查找',
- showingItems: '已显示行数:',
- selectedItems: '已选择行数:',
- totalItems: '总行数:',
- size: 'æ¯é¡µæ˜¾ç¤ºè¡Œæ•°ï¼š',
- first: '首页',
- next: '下一页',
- previous: '上一页',
- last: '末页'
- },
- menu: {
- text: '选择列:'
- },
- sort: {
- ascending: 'å‡åº',
- descending: 'é™åº',
- none: 'æ— åº',
- remove: 'å–消排åº'
- },
- column: {
- hide: 'éšè—列'
- },
- aggregation: {
- count: '计数:',
- sum: '求和:',
- avg: 'å‡å€¼ï¼š',
- min: '最å°å€¼ï¼š',
- max: '最大值:'
- },
- pinning: {
- pinLeft: '左侧固定',
- pinRight: 'å³ä¾§å›ºå®š',
- unpin: 'å–消固定'
- },
- columnMenu: {
- close: '关闭'
- },
- gridMenu: {
- aria: {
- buttonLabel: '表格èœå•'
- },
- columns: '列:',
- importerTitle: '导入文件',
- exporterAllAsCsv: '导出全部数æ®åˆ°CSV',
- exporterVisibleAsCsv: '导出å¯è§æ•°æ®åˆ°CSV',
- exporterSelectedAsCsv: '导出已选数æ®åˆ°CSV',
- exporterAllAsPdf: '导出全部数æ®åˆ°PDF',
- exporterVisibleAsPdf: '导出å¯è§æ•°æ®åˆ°PDF',
- exporterSelectedAsPdf: '导出已选数æ®åˆ°PDF',
- clearAllFilters: '清除所有过滤器'
- },
- importer: {
- noHeaders: '无法获å–列å,确定文件包å«è¡¨å¤´ï¼Ÿ',
- noObjects: '无法获å–æ•°æ®ï¼Œç¡®å®šæ–‡ä»¶åŒ…å«æ•°æ®ï¼Ÿ',
- invalidCsv: '无法处ç†æ–‡ä»¶ï¼Œç¡®å®šæ˜¯åˆæ³•çš„CSV文件?',
- invalidJson: '无法处ç†æ–‡ä»¶ï¼Œç¡®å®šæ˜¯åˆæ³•çš„JSON文件?',
- jsonNotArray: '导入的文件ä¸æ˜¯JSON数组ï¼'
- },
- pagination: {
- aria: {
- pageToFirst: '第一页',
- pageBack: '上一页',
- pageSelected: '当å‰é¡µ',
- pageForward: '下一页',
- pageToLast: '最åŽä¸€é¡µ'
- },
- sizes: 'è¡Œæ¯é¡µ',
- totalItems: '行',
- through: '至',
- of: 'å…±'
- },
- grouping: {
- group: '分组',
- ungroup: 'å–消分组',
- aggregate_count: 'åˆè®¡: 计数',
- aggregate_sum: 'åˆè®¡: 求和',
- aggregate_max: 'åˆè®¡: 最大',
- aggregate_min: 'åˆè®¡: 最å°',
- aggregate_avg: 'åˆè®¡: å¹³å‡',
- aggregate_remove: 'åˆè®¡: 移除'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function() {
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('i18nService', ['$delegate', function($delegate) {
- $delegate.add('zh-tw', {
- aggregate: {
- label: '行'
- },
- groupPanel: {
- description: '拖曳表頭到此處進行分組'
- },
- search: {
- placeholder: '查找',
- showingItems: '已顯示行數:',
- selectedItems: 'å·²é¸æ“‡è¡Œæ•¸ï¼š',
- totalItems: '總行數:',
- size: 'æ¯é é¡¯ç¤ºè¡Œæ•¸ï¼š',
- first: '首é ',
- next: '下壹é ',
- previous: '上壹é ',
- last: '末é '
- },
- menu: {
- text: 'é¸æ“‡åˆ—:'
- },
- sort: {
- ascending: 'å‡åº',
- descending: 'é™åº',
- remove: 'å–消排åº'
- },
- column: {
- hide: 'éš±è—列'
- },
- aggregation: {
- count: '計數:',
- sum: '求和:',
- avg: 'å‡å€¼ï¼š',
- min: '最å°å€¼ï¼š',
- max: '最大值:'
- },
- pinning: {
- pinLeft: 'å·¦å´å›ºå®š',
- pinRight: 'å³å´å›ºå®š',
- unpin: 'å–消固定'
- },
- gridMenu: {
- columns: '列:',
- importerTitle: '導入文件',
- exporterAllAsCsv: '導出全部數據到CSV',
- exporterVisibleAsCsv: '導出å¯è¦‹æ•¸æ“šåˆ°CSV',
- exporterSelectedAsCsv: '導出已é¸æ•¸æ“šåˆ°CSV',
- exporterAllAsPdf: '導出全部數據到PDF',
- exporterVisibleAsPdf: '導出å¯è¦‹æ•¸æ“šåˆ°PDF',
- exporterSelectedAsPdf: '導出已é¸æ•¸æ“šåˆ°PDF',
- clearAllFilters: '清除所有过滤器'
- },
- importer: {
- noHeaders: '無法ç²å–列å,確定文件包å«è¡¨é ­ï¼Ÿ',
- noObjects: '無法ç²å–數據,確定文件包å«æ•¸æ“šï¼Ÿ',
- invalidCsv: '無法處ç†æ–‡ä»¶ï¼Œç¢ºå®šæ˜¯åˆæ³•çš„CSV文件?',
- invalidJson: '無法處ç†æ–‡ä»¶ï¼Œç¢ºå®šæ˜¯åˆæ³•çš„JSON文件?',
- jsonNotArray: '導入的文件ä¸æ˜¯JSON數組ï¼'
- },
- pagination: {
- sizes: 'è¡Œæ¯é ',
- totalItems: '行'
- }
- });
- return $delegate;
- }]);
- }]);
-})();
-
-(function() {
- 'use strict';
- /**
- * @ngdoc overview
- * @name ui.grid.autoResize
- *
- * @description
- *
- * #ui.grid.autoResize
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides auto-resizing functionality to UI-Grid.
- */
- var module = angular.module('ui.grid.autoResize', ['ui.grid']);
-
-
- module.directive('uiGridAutoResize', ['$timeout', 'gridUtil', function ($timeout, gridUtil) {
- return {
- require: 'uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var prevGridWidth, prevGridHeight;
-
- function getDimensions() {
- prevGridHeight = gridUtil.elementHeight($elm);
- prevGridWidth = gridUtil.elementWidth($elm);
- }
-
- // Initialize the dimensions
- getDimensions();
-
- var resizeTimeoutId;
- function startTimeout() {
- clearTimeout(resizeTimeoutId);
-
- resizeTimeoutId = setTimeout(function () {
- var newGridHeight = gridUtil.elementHeight($elm);
- var newGridWidth = gridUtil.elementWidth($elm);
-
- if (newGridHeight !== prevGridHeight || newGridWidth !== prevGridWidth) {
- uiGridCtrl.grid.gridHeight = newGridHeight;
- uiGridCtrl.grid.gridWidth = newGridWidth;
-
- $scope.$apply(function () {
- uiGridCtrl.grid.refresh()
- .then(function () {
- getDimensions();
-
- startTimeout();
- });
- });
- }
- else {
- startTimeout();
- }
- }, 250);
- }
-
- startTimeout();
-
- $scope.$on('$destroy', function() {
- clearTimeout(resizeTimeoutId);
- });
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.cellNav
- *
- * @description
-
- #ui.grid.cellNav
-
- <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
-
- This module provides auto-resizing functionality to UI-Grid.
- */
- var module = angular.module('ui.grid.cellNav', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.constant:uiGridCellNavConstants
- *
- * @description constants available in cellNav
- */
- module.constant('uiGridCellNavConstants', {
- FEATURE_NAME: 'gridCellNav',
- CELL_NAV_EVENT: 'cellNav',
- direction: {LEFT: 0, RIGHT: 1, UP: 2, DOWN: 3, PG_UP: 4, PG_DOWN: 5},
- EVENT_TYPE: {
- KEYDOWN: 0,
- CLICK: 1,
- CLEAR: 2
- }
- });
-
-
- module.factory('uiGridCellNavFactory', ['gridUtil', 'uiGridConstants', 'uiGridCellNavConstants', 'GridRowColumn', '$q',
- function (gridUtil, uiGridConstants, uiGridCellNavConstants, GridRowColumn, $q) {
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.object:CellNav
- * @description returns a CellNav prototype function
- * @param {object} rowContainer container for rows
- * @param {object} colContainer parent column container
- * @param {object} leftColContainer column container to the left of parent
- * @param {object} rightColContainer column container to the right of parent
- */
- var UiGridCellNav = function UiGridCellNav(rowContainer, colContainer, leftColContainer, rightColContainer) {
- this.rows = rowContainer.visibleRowCache;
- this.columns = colContainer.visibleColumnCache;
- this.leftColumns = leftColContainer ? leftColContainer.visibleColumnCache : [];
- this.rightColumns = rightColContainer ? rightColContainer.visibleColumnCache : [];
- this.bodyContainer = rowContainer;
- };
-
- /** returns focusable columns of all containers */
- UiGridCellNav.prototype.getFocusableCols = function () {
- var allColumns = this.leftColumns.concat(this.columns, this.rightColumns);
-
- return allColumns.filter(function (col) {
- return col.colDef.allowCellFocus;
- });
- };
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:GridRow
- *
- * @description GridRow settings for cellNav feature, these are available to be
- * set only internally (for example, by other features)
- */
-
- /**
- * @ngdoc object
- * @name allowCellFocus
- * @propertyOf ui.grid.cellNav.api:GridRow
- * @description Enable focus on a cell within this row. If set to false then no cells
- * in this row can be focused - group header rows as an example would set this to false.
- * <br/>Defaults to true
- */
- /** returns focusable rows */
- UiGridCellNav.prototype.getFocusableRows = function () {
- return this.rows.filter(function(row) {
- return row.allowCellFocus !== false;
- });
- };
-
- UiGridCellNav.prototype.getNextRowCol = function (direction, curRow, curCol) {
- switch (direction) {
- case uiGridCellNavConstants.direction.LEFT:
- return this.getRowColLeft(curRow, curCol);
- case uiGridCellNavConstants.direction.RIGHT:
- return this.getRowColRight(curRow, curCol);
- case uiGridCellNavConstants.direction.UP:
- return this.getRowColUp(curRow, curCol);
- case uiGridCellNavConstants.direction.DOWN:
- return this.getRowColDown(curRow, curCol);
- case uiGridCellNavConstants.direction.PG_UP:
- return this.getRowColPageUp(curRow, curCol);
- case uiGridCellNavConstants.direction.PG_DOWN:
- return this.getRowColPageDown(curRow, curCol);
- }
-
- };
-
- UiGridCellNav.prototype.initializeSelection = function () {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- if (focusableCols.length === 0 || focusableRows.length === 0) {
- return null;
- }
-
- var curRowIndex = 0;
- var curColIndex = 0;
- return new GridRowColumn(focusableRows[0], focusableCols[0]); //return same row
- };
-
- UiGridCellNav.prototype.getRowColLeft = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 1
- if (curColIndex === -1) {
- curColIndex = 1;
- }
-
- var nextColIndex = curColIndex === 0 ? focusableCols.length - 1 : curColIndex - 1;
-
- //get column to left
- if (nextColIndex > curColIndex) {
- // On the first row
- // if (curRowIndex === 0 && curColIndex === 0) {
- // return null;
- // }
- if (curRowIndex === 0) {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]); //return same row
- }
- else {
- //up one row and far right column
- return new GridRowColumn(focusableRows[curRowIndex - 1], focusableCols[nextColIndex]);
- }
- }
- else {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]);
- }
- };
-
-
-
- UiGridCellNav.prototype.getRowColRight = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
- var nextColIndex = curColIndex === focusableCols.length - 1 ? 0 : curColIndex + 1;
-
- if (nextColIndex < curColIndex) {
- if (curRowIndex === focusableRows.length - 1) {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]); //return same row
- }
- else {
- //down one row and far left column
- return new GridRowColumn(focusableRows[curRowIndex + 1], focusableCols[nextColIndex]);
- }
- }
- else {
- return new GridRowColumn(curRow, focusableCols[nextColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColDown = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- if (curRowIndex === focusableRows.length - 1) {
- return new GridRowColumn(curRow, focusableCols[curColIndex]); //return same row
- }
- else {
- //down one row
- return new GridRowColumn(focusableRows[curRowIndex + 1], focusableCols[curColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColPageDown = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- var pageSize = this.bodyContainer.minRowsToRender();
- if (curRowIndex >= focusableRows.length - pageSize) {
- return new GridRowColumn(focusableRows[focusableRows.length - 1], focusableCols[curColIndex]); //return last row
- }
- else {
- //down one page
- return new GridRowColumn(focusableRows[curRowIndex + pageSize], focusableCols[curColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColUp = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- if (curRowIndex === 0) {
- return new GridRowColumn(curRow, focusableCols[curColIndex]); //return same row
- }
- else {
- //up one row
- return new GridRowColumn(focusableRows[curRowIndex - 1], focusableCols[curColIndex]);
- }
- };
-
- UiGridCellNav.prototype.getRowColPageUp = function (curRow, curCol) {
- var focusableCols = this.getFocusableCols();
- var focusableRows = this.getFocusableRows();
- var curColIndex = focusableCols.indexOf(curCol);
- var curRowIndex = focusableRows.indexOf(curRow);
-
- //could not find column in focusable Columns so set it to 0
- if (curColIndex === -1) {
- curColIndex = 0;
- }
-
- var pageSize = this.bodyContainer.minRowsToRender();
- if (curRowIndex - pageSize < 0) {
- return new GridRowColumn(focusableRows[0], focusableCols[curColIndex]); //return first row
- }
- else {
- //up one page
- return new GridRowColumn(focusableRows[curRowIndex - pageSize], focusableCols[curColIndex]);
- }
- };
- return UiGridCellNav;
- }]);
-
- /**
- * @ngdoc service
- * @name ui.grid.cellNav.service:uiGridCellNavService
- *
- * @description Services for cell navigation features. If you don't like the key maps we use,
- * or the direction cells navigation, override with a service decorator (see angular docs)
- */
- module.service('uiGridCellNavService', ['gridUtil', 'uiGridConstants', 'uiGridCellNavConstants', '$q', 'uiGridCellNavFactory', 'GridRowColumn', 'ScrollEvent',
- function (gridUtil, uiGridConstants, uiGridCellNavConstants, $q, UiGridCellNav, GridRowColumn, ScrollEvent) {
-
- var service = {
-
- initializeGrid: function (grid) {
- grid.registerColumnBuilder(service.cellNavColumnBuilder);
-
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav:Grid.cellNav
- * @description cellNav properties added to grid class
- */
- grid.cellNav = {};
- grid.cellNav.lastRowCol = null;
- grid.cellNav.focusedCells = [];
-
- service.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:PublicApi
- *
- * @description Public Api for cellNav feature
- */
- var publicApi = {
- events: {
- cellNav: {
- /**
- * @ngdoc event
- * @name navigate
- * @eventOf ui.grid.cellNav.api:PublicApi
- * @description raised when the active cell is changed
- * <pre>
- * gridApi.cellNav.on.navigate(scope,function(newRowcol, oldRowCol){})
- * </pre>
- * @param {object} newRowCol new position
- * @param {object} oldRowCol old position
- */
- navigate: function (newRowCol, oldRowCol) {},
- /**
- * @ngdoc event
- * @name viewPortKeyDown
- * @eventOf ui.grid.cellNav.api:PublicApi
- * @description is raised when the viewPort receives a keyDown event. Cells never get focus in uiGrid
- * due to the difficulties of setting focus on a cell that is not visible in the viewport. Use this
- * event whenever you need a keydown event on a cell
- * <br/>
- * @param {object} event keydown event
- * @param {object} rowCol current rowCol position
- */
- viewPortKeyDown: function (event, rowCol) {},
-
- /**
- * @ngdoc event
- * @name viewPortKeyPress
- * @eventOf ui.grid.cellNav.api:PublicApi
- * @description is raised when the viewPort receives a keyPress event. Cells never get focus in uiGrid
- * due to the difficulties of setting focus on a cell that is not visible in the viewport. Use this
- * event whenever you need a keypress event on a cell
- * <br/>
- * @param {object} event keypress event
- * @param {object} rowCol current rowCol position
- */
- viewPortKeyPress: function (event, rowCol) {}
- }
- },
- methods: {
- cellNav: {
- /**
- * @ngdoc function
- * @name scrollToFocus
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description brings the specified row and column into view, and sets focus
- * to that cell
- * @param {object} rowEntity gridOptions.data[] array instance to make visible and set focus
- * @param {object} colDef to make visible and set focus
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- scrollToFocus: function (rowEntity, colDef) {
- return service.scrollToFocus(grid, rowEntity, colDef);
- },
-
- /**
- * @ngdoc function
- * @name getFocusedCell
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description returns the current (or last if Grid does not have focus) focused row and column
- * <br> value is null if no selection has occurred
- */
- getFocusedCell: function () {
- return grid.cellNav.lastRowCol;
- },
-
- /**
- * @ngdoc function
- * @name getCurrentSelection
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description returns an array containing the current selection
- * <br> array is empty if no selection has occurred
- */
- getCurrentSelection: function () {
- return grid.cellNav.focusedCells;
- },
-
- /**
- * @ngdoc function
- * @name rowColSelectIndex
- * @methodOf ui.grid.cellNav.api:PublicApi
- * @description returns the index in the order in which the GridRowColumn was selected, returns -1 if the GridRowColumn
- * isn't selected
- * @param {object} rowCol the rowCol to evaluate
- */
- rowColSelectIndex: function (rowCol) {
- //return gridUtil.arrayContainsObjectWithProperty(grid.cellNav.focusedCells, 'col.uid', rowCol.col.uid) &&
- var index = -1;
- for (var i = 0; i < grid.cellNav.focusedCells.length; i++) {
- if (grid.cellNav.focusedCells[i].col.uid === rowCol.col.uid &&
- grid.cellNav.focusedCells[i].row.uid === rowCol.row.uid) {
- index = i;
- break;
- }
- }
- return index;
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:GridOptions
- *
- * @description GridOptions for cellNav feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name modifierKeysToMultiSelectCells
- * @propertyOf ui.grid.cellNav.api:GridOptions
- * @description Enable multiple cell selection only when using the ctrlKey or shiftKey.
- * <br/>Defaults to false
- */
- gridOptions.modifierKeysToMultiSelectCells = gridOptions.modifierKeysToMultiSelectCells === true;
-
- },
-
- /**
- * @ngdoc service
- * @name decorateRenderContainers
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @description decorates grid renderContainers with cellNav functions
- */
- decorateRenderContainers: function (grid) {
-
- var rightContainer = grid.hasRightContainer() ? grid.renderContainers.right : null;
- var leftContainer = grid.hasLeftContainer() ? grid.renderContainers.left : null;
-
- if (leftContainer !== null) {
- grid.renderContainers.left.cellNav = new UiGridCellNav(grid.renderContainers.body, leftContainer, rightContainer, grid.renderContainers.body);
- }
- if (rightContainer !== null) {
- grid.renderContainers.right.cellNav = new UiGridCellNav(grid.renderContainers.body, rightContainer, grid.renderContainers.body, leftContainer);
- }
-
- grid.renderContainers.body.cellNav = new UiGridCellNav(grid.renderContainers.body, grid.renderContainers.body, leftContainer, rightContainer);
- },
-
- /**
- * @ngdoc service
- * @name getDirection
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @description determines which direction to for a given keyDown event
- * @returns {uiGridCellNavConstants.direction} direction
- */
- getDirection: function (evt) {
- if (evt.keyCode === uiGridConstants.keymap.LEFT ||
- (evt.keyCode === uiGridConstants.keymap.TAB && evt.shiftKey)) {
- return uiGridCellNavConstants.direction.LEFT;
- }
- if (evt.keyCode === uiGridConstants.keymap.RIGHT ||
- evt.keyCode === uiGridConstants.keymap.TAB) {
- return uiGridCellNavConstants.direction.RIGHT;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.UP ||
- (evt.keyCode === uiGridConstants.keymap.ENTER && evt.shiftKey) ) {
- return uiGridCellNavConstants.direction.UP;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.PG_UP){
- return uiGridCellNavConstants.direction.PG_UP;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.DOWN ||
- evt.keyCode === uiGridConstants.keymap.ENTER && !(evt.ctrlKey || evt.altKey)) {
- return uiGridCellNavConstants.direction.DOWN;
- }
-
- if (evt.keyCode === uiGridConstants.keymap.PG_DOWN){
- return uiGridCellNavConstants.direction.PG_DOWN;
- }
-
- return null;
- },
-
- /**
- * @ngdoc service
- * @name cellNavColumnBuilder
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @description columnBuilder function that adds cell navigation properties to grid column
- * @returns {promise} promise that will load any needed templates when resolved
- */
- cellNavColumnBuilder: function (colDef, col, gridOptions) {
- var promises = [];
-
- /**
- * @ngdoc object
- * @name ui.grid.cellNav.api:ColumnDef
- *
- * @description Column Definitions for cellNav feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name allowCellFocus
- * @propertyOf ui.grid.cellNav.api:ColumnDef
- * @description Enable focus on a cell within this column.
- * <br/>Defaults to true
- */
- colDef.allowCellFocus = colDef.allowCellFocus === undefined ? true : colDef.allowCellFocus;
-
- return $q.all(promises);
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @name scrollToFocus
- * @description Scroll the grid such that the specified
- * row and column is in view, and set focus to the cell in that row and column
- * @param {Grid} grid the grid you'd like to act upon, usually available
- * from gridApi.grid
- * @param {object} rowEntity gridOptions.data[] array instance to make visible and set focus to
- * @param {object} colDef to make visible and set focus to
- * @returns {promise} a promise that is resolved after any scrolling is finished
- */
- scrollToFocus: function (grid, rowEntity, colDef) {
- var gridRow = null, gridCol = null;
-
- if (typeof(rowEntity) !== 'undefined' && rowEntity !== null) {
- gridRow = grid.getRow(rowEntity);
- }
-
- if (typeof(colDef) !== 'undefined' && colDef !== null) {
- gridCol = grid.getColumn(colDef.name ? colDef.name : colDef.field);
- }
- return grid.api.core.scrollToIfNecessary(gridRow, gridCol).then(function () {
- var rowCol = { row: gridRow, col: gridCol };
-
- // Broadcast the navigation
- if (gridRow !== null && gridCol !== null) {
- grid.cellNav.broadcastCellNav(rowCol);
- }
- });
-
-
-
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.cellNav.service:uiGridCellNavService
- * @name getLeftWidth
- * @description Get the current drawn width of the columns in the
- * grid up to the numbered column, and add an apportionment for the
- * column that we're on. So if we are on column 0, we want to scroll
- * 0% (i.e. exclude this column from calc). If we're on the last column
- * we want to scroll to 100% (i.e. include this column in the calc). So
- * we include (thisColIndex / totalNumberCols) % of this column width
- * @param {Grid} grid the grid you'd like to act upon, usually available
- * from gridApi.grid
- * @param {gridCol} upToCol the column to total up to and including
- */
- getLeftWidth: function (grid, upToCol) {
- var width = 0;
-
- if (!upToCol) {
- return width;
- }
-
- var lastIndex = grid.renderContainers.body.visibleColumnCache.indexOf( upToCol );
-
- // total column widths up-to but not including the passed in column
- grid.renderContainers.body.visibleColumnCache.forEach( function( col, index ) {
- if ( index < lastIndex ){
- width += col.drawnWidth;
- }
- });
-
- // pro-rata the final column based on % of total columns.
- var percentage = lastIndex === 0 ? 0 : (lastIndex + 1) / grid.renderContainers.body.visibleColumnCache.length;
- width += upToCol.drawnWidth * percentage;
-
- return width;
- }
- };
-
- return service;
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.cellNav.directive:uiCellNav
- * @element div
- * @restrict EA
- *
- * @description Adds cell navigation features to the grid columns
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.cellNav']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name'},
- {name: 'title'}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-cellnav></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridCellnav', ['gridUtil', 'uiGridCellNavService', 'uiGridCellNavConstants', 'uiGridConstants', 'GridRowColumn', '$timeout', '$compile',
- function (gridUtil, uiGridCellNavService, uiGridCellNavConstants, uiGridConstants, GridRowColumn, $timeout, $compile) {
- return {
- replace: true,
- priority: -150,
- require: '^uiGrid',
- scope: false,
- controller: function () {},
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- var _scope = $scope;
-
- var grid = uiGridCtrl.grid;
- uiGridCellNavService.initializeGrid(grid);
-
- uiGridCtrl.cellNav = {};
-
- //Ensure that the object has all of the methods we expect it to
- uiGridCtrl.cellNav.makeRowCol = function (obj) {
- if (!(obj instanceof GridRowColumn)) {
- obj = new GridRowColumn(obj.row, obj.col);
- }
- return obj;
- };
-
- uiGridCtrl.cellNav.getActiveCell = function () {
- var elms = $elm[0].getElementsByClassName('ui-grid-cell-focus');
- if (elms.length > 0){
- return elms[0];
- }
-
- return undefined;
- };
-
- uiGridCtrl.cellNav.broadcastCellNav = grid.cellNav.broadcastCellNav = function (newRowCol, modifierDown, originEvt) {
- modifierDown = !(modifierDown === undefined || !modifierDown);
-
- newRowCol = uiGridCtrl.cellNav.makeRowCol(newRowCol);
-
- uiGridCtrl.cellNav.broadcastFocus(newRowCol, modifierDown, originEvt);
- _scope.$broadcast(uiGridCellNavConstants.CELL_NAV_EVENT, newRowCol, modifierDown, originEvt);
- };
-
- uiGridCtrl.cellNav.clearFocus = grid.cellNav.clearFocus = function () {
- grid.cellNav.focusedCells = [];
- _scope.$broadcast(uiGridCellNavConstants.CELL_NAV_EVENT);
- };
-
- uiGridCtrl.cellNav.broadcastFocus = function (rowCol, modifierDown, originEvt) {
- modifierDown = !(modifierDown === undefined || !modifierDown);
-
- rowCol = uiGridCtrl.cellNav.makeRowCol(rowCol);
-
- var row = rowCol.row,
- col = rowCol.col;
-
- var rowColSelectIndex = uiGridCtrl.grid.api.cellNav.rowColSelectIndex(rowCol);
-
- if (grid.cellNav.lastRowCol === null || rowColSelectIndex === -1) {
- var newRowCol = new GridRowColumn(row, col);
-
- grid.api.cellNav.raise.navigate(newRowCol, grid.cellNav.lastRowCol);
- grid.cellNav.lastRowCol = newRowCol;
- if (uiGridCtrl.grid.options.modifierKeysToMultiSelectCells && modifierDown) {
- grid.cellNav.focusedCells.push(rowCol);
- } else {
- grid.cellNav.focusedCells = [rowCol];
- }
- } else if (grid.options.modifierKeysToMultiSelectCells && modifierDown &&
- rowColSelectIndex >= 0) {
-
- grid.cellNav.focusedCells.splice(rowColSelectIndex, 1);
- }
- };
-
- uiGridCtrl.cellNav.handleKeyDown = function (evt) {
- var direction = uiGridCellNavService.getDirection(evt);
- if (direction === null) {
- return null;
- }
-
- var containerId = 'body';
- if (evt.uiGridTargetRenderContainerId) {
- containerId = evt.uiGridTargetRenderContainerId;
- }
-
- // Get the last-focused row+col combo
- var lastRowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (lastRowCol) {
- // Figure out which new row+combo we're navigating to
- var rowCol = uiGridCtrl.grid.renderContainers[containerId].cellNav.getNextRowCol(direction, lastRowCol.row, lastRowCol.col);
- var focusableCols = uiGridCtrl.grid.renderContainers[containerId].cellNav.getFocusableCols();
- var rowColSelectIndex = uiGridCtrl.grid.api.cellNav.rowColSelectIndex(rowCol);
- // Shift+tab on top-left cell should exit cellnav on render container
- if (
- // Navigating left
- direction === uiGridCellNavConstants.direction.LEFT &&
- // New col is last col (i.e. wrap around)
- rowCol.col === focusableCols[focusableCols.length - 1] &&
- // Staying on same row, which means we're at first row
- rowCol.row === lastRowCol.row &&
- evt.keyCode === uiGridConstants.keymap.TAB &&
- evt.shiftKey
- ) {
- grid.cellNav.focusedCells.splice(rowColSelectIndex, 1);
- uiGridCtrl.cellNav.clearFocus();
- return true;
- }
- // Tab on bottom-right cell should exit cellnav on render container
- else if (
- direction === uiGridCellNavConstants.direction.RIGHT &&
- // New col is first col (i.e. wrap around)
- rowCol.col === focusableCols[0] &&
- // Staying on same row, which means we're at first row
- rowCol.row === lastRowCol.row &&
- evt.keyCode === uiGridConstants.keymap.TAB &&
- !evt.shiftKey
- ) {
- grid.cellNav.focusedCells.splice(rowColSelectIndex, 1);
- uiGridCtrl.cellNav.clearFocus();
- return true;
- }
-
- // Scroll to the new cell, if it's not completely visible within the render container's viewport
- grid.scrollToIfNecessary(rowCol.row, rowCol.col).then(function () {
- uiGridCtrl.cellNav.broadcastCellNav(rowCol);
- });
-
-
- evt.stopPropagation();
- evt.preventDefault();
-
- return false;
- }
- };
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- var _scope = $scope;
- var grid = uiGridCtrl.grid;
-
- function addAriaLiveRegion(){
- // Thanks to google docs for the inspiration behind how to do this
- // XXX: Why is this entire mess nessasary?
- // Because browsers take a lot of coercing to get them to read out live regions
- //http://www.paciellogroup.com/blog/2012/06/html5-accessibility-chops-aria-rolealert-browser-support/
- var ariaNotifierDomElt = '<div ' +
- 'id="' + grid.id +'-aria-speakable" ' +
- 'class="ui-grid-a11y-ariascreenreader-speakable ui-grid-offscreen" ' +
- 'aria-live="assertive" ' +
- 'role="region" ' +
- 'aria-atomic="true" ' +
- 'aria-hidden="false" ' +
- 'aria-relevant="additions" ' +
- '>' +
- '&nbsp;' +
- '</div>';
-
- var ariaNotifier = $compile(ariaNotifierDomElt)($scope);
- $elm.prepend(ariaNotifier);
- $scope.$on(uiGridCellNavConstants.CELL_NAV_EVENT, function (evt, rowCol, modifierDown, originEvt) {
- /*
- * If the cell nav event was because of a focus event then we don't want to
- * change the notifier text.
- * Reasoning: Voice Over fires a focus events when moving arround the grid.
- * If the screen reader is handing the grid nav properly then we don't need to
- * use the alert to notify the user of the movement.
- * In all other cases we do want a notification event.
- */
- if (originEvt && originEvt.type === 'focus'){return;}
-
- function setNotifyText(text){
- if (text === ariaNotifier.text()){return;}
- ariaNotifier[0].style.clip = 'rect(0px,0px,0px,0px)';
- /*
- * This is how google docs handles clearing the div. Seems to work better than setting the text of the div to ''
- */
- ariaNotifier[0].innerHTML = "";
- ariaNotifier[0].style.visibility = 'hidden';
- ariaNotifier[0].style.visibility = 'visible';
- if (text !== ''){
- ariaNotifier[0].style.clip = 'auto';
- /*
- * The space after the text is something that google docs does.
- */
- ariaNotifier[0].appendChild(document.createTextNode(text + " "));
- ariaNotifier[0].style.visibility = 'hidden';
- ariaNotifier[0].style.visibility = 'visible';
- }
- }
-
- var values = [];
- var currentSelection = grid.api.cellNav.getCurrentSelection();
- for (var i = 0; i < currentSelection.length; i++) {
- values.push(currentSelection[i].getIntersectionValueFiltered());
- }
- var cellText = values.toString();
- setNotifyText(cellText);
-
- });
- }
- addAriaLiveRegion();
- }
- };
- }
- };
- }]);
-
- module.directive('uiGridRenderContainer', ['$timeout', '$document', 'gridUtil', 'uiGridConstants', 'uiGridCellNavService', '$compile','uiGridCellNavConstants',
- function ($timeout, $document, gridUtil, uiGridConstants, uiGridCellNavService, $compile, uiGridCellNavConstants) {
- return {
- replace: true,
- priority: -99999, //this needs to run very last
- require: ['^uiGrid', 'uiGridRenderContainer', '?^uiGridCellnav'],
- scope: false,
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- renderContainerCtrl = controllers[1],
- uiGridCellnavCtrl = controllers[2];
-
- // Skip attaching cell-nav specific logic if the directive is not attached above us
- if (!uiGridCtrl.grid.api.cellNav) { return; }
-
- var containerId = renderContainerCtrl.containerId;
-
- var grid = uiGridCtrl.grid;
-
- //run each time a render container is created
- uiGridCellNavService.decorateRenderContainers(grid);
-
- // focusser only created for body
- if (containerId !== 'body') {
- return;
- }
-
-
-
- if (uiGridCtrl.grid.options.modifierKeysToMultiSelectCells){
- $elm.attr('aria-multiselectable', true);
- } else {
- $elm.attr('aria-multiselectable', false);
- }
-
- //add an element with no dimensions that can be used to set focus and capture keystrokes
- var focuser = $compile('<div class="ui-grid-focuser" role="region" aria-live="assertive" aria-atomic="false" tabindex="0" aria-controls="' + grid.id +'-aria-speakable '+ grid.id + '-grid-container' +'" aria-owns="' + grid.id + '-grid-container' + '"></div>')($scope);
- $elm.append(focuser);
-
- focuser.on('focus', function (evt) {
- evt.uiGridTargetRenderContainerId = containerId;
- var rowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (rowCol === null) {
- rowCol = uiGridCtrl.grid.renderContainers[containerId].cellNav.getNextRowCol(uiGridCellNavConstants.direction.DOWN, null, null);
- if (rowCol.row && rowCol.col) {
- uiGridCtrl.cellNav.broadcastCellNav(rowCol);
- }
- }
- });
-
- uiGridCellnavCtrl.setAriaActivedescendant = function(id){
- $elm.attr('aria-activedescendant', id);
- };
-
- uiGridCellnavCtrl.removeAriaActivedescendant = function(id){
- if ($elm.attr('aria-activedescendant') === id){
- $elm.attr('aria-activedescendant', '');
- }
- };
-
-
- uiGridCtrl.focus = function () {
- gridUtil.focus.byElement(focuser[0]);
- //allow for first time grid focus
- };
-
- var viewPortKeyDownWasRaisedForRowCol = null;
- // Bind to keydown events in the render container
- focuser.on('keydown', function (evt) {
- evt.uiGridTargetRenderContainerId = containerId;
- var rowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- var result = uiGridCtrl.cellNav.handleKeyDown(evt);
- if (result === null) {
- uiGridCtrl.grid.api.cellNav.raise.viewPortKeyDown(evt, rowCol);
- viewPortKeyDownWasRaisedForRowCol = rowCol;
- }
- });
- //Bind to keypress events in the render container
- //keypress events are needed by edit function so the key press
- //that initiated an edit is not lost
- //must fire the event in a timeout so the editor can
- //initialize and subscribe to the event on another event loop
- focuser.on('keypress', function (evt) {
- if (viewPortKeyDownWasRaisedForRowCol) {
- $timeout(function () {
- uiGridCtrl.grid.api.cellNav.raise.viewPortKeyPress(evt, viewPortKeyDownWasRaisedForRowCol);
- },4);
-
- viewPortKeyDownWasRaisedForRowCol = null;
- }
- });
-
- $scope.$on('$destroy', function(){
- //Remove all event handlers associated with this focuser.
- focuser.off();
- });
-
- }
- };
- }
- };
- }]);
-
- module.directive('uiGridViewport', ['$timeout', '$document', 'gridUtil', 'uiGridConstants', 'uiGridCellNavService', 'uiGridCellNavConstants','$log','$compile',
- function ($timeout, $document, gridUtil, uiGridConstants, uiGridCellNavService, uiGridCellNavConstants, $log, $compile) {
- return {
- replace: true,
- priority: -99999, //this needs to run very last
- require: ['^uiGrid', '^uiGridRenderContainer', '?^uiGridCellnav'],
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- renderContainerCtrl = controllers[1];
-
- // Skip attaching cell-nav specific logic if the directive is not attached above us
- if (!uiGridCtrl.grid.api.cellNav) { return; }
-
- var containerId = renderContainerCtrl.containerId;
- //no need to process for other containers
- if (containerId !== 'body') {
- return;
- }
-
- var grid = uiGridCtrl.grid;
-
- grid.api.core.on.scrollBegin($scope, function (args) {
-
- // Skip if there's no currently-focused cell
- var lastRowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (lastRowCol === null) {
- return;
- }
-
- //if not in my container, move on
- //todo: worry about horiz scroll
- if (!renderContainerCtrl.colContainer.containsColumn(lastRowCol.col)) {
- return;
- }
-
- uiGridCtrl.cellNav.clearFocus();
-
- });
-
- grid.api.core.on.scrollEnd($scope, function (args) {
- // Skip if there's no currently-focused cell
- var lastRowCol = uiGridCtrl.grid.api.cellNav.getFocusedCell();
- if (lastRowCol === null) {
- return;
- }
-
- //if not in my container, move on
- //todo: worry about horiz scroll
- if (!renderContainerCtrl.colContainer.containsColumn(lastRowCol.col)) {
- return;
- }
-
- uiGridCtrl.cellNav.broadcastCellNav(lastRowCol);
-
- });
-
- grid.api.cellNav.on.navigate($scope, function () {
- //focus again because it can be lost
- uiGridCtrl.focus();
- });
-
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.cellNav.directive:uiGridCell
- * @element div
- * @restrict A
- * @description Stacks on top of ui.grid.uiGridCell to provide cell navigation
- */
- module.directive('uiGridCell', ['$timeout', '$document', 'uiGridCellNavService', 'gridUtil', 'uiGridCellNavConstants', 'uiGridConstants', 'GridRowColumn',
- function ($timeout, $document, uiGridCellNavService, gridUtil, uiGridCellNavConstants, uiGridConstants, GridRowColumn) {
- return {
- priority: -150, // run after default uiGridCell directive and ui.grid.edit uiGridCell
- restrict: 'A',
- require: ['^uiGrid', '?^uiGridCellnav'],
- scope: false,
- link: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0],
- uiGridCellnavCtrl = controllers[1];
- // Skip attaching cell-nav specific logic if the directive is not attached above us
- if (!uiGridCtrl.grid.api.cellNav) { return; }
-
- if (!$scope.col.colDef.allowCellFocus) {
- return;
- }
-
- //Convinience local variables
- var grid = uiGridCtrl.grid;
- $scope.focused = false;
-
- // Make this cell focusable but only with javascript/a mouse click
- $elm.attr('tabindex', -1);
-
- // When a cell is clicked, broadcast a cellNav event saying that this row+col combo is now focused
- $elm.find('div').on('click', function (evt) {
- uiGridCtrl.cellNav.broadcastCellNav(new GridRowColumn($scope.row, $scope.col), evt.ctrlKey || evt.metaKey, evt);
-
- evt.stopPropagation();
- $scope.$apply();
- });
-
-
- /*
- * XXX Hack for screen readers.
- * This allows the grid to focus using only the screen reader cursor.
- * Since the focus event doesn't include key press information we can't use it
- * as our primary source of the event.
- */
- $elm.on('mousedown', preventMouseDown);
-
- //turn on and off for edit events
- if (uiGridCtrl.grid.api.edit) {
- uiGridCtrl.grid.api.edit.on.beginCellEdit($scope, function () {
- $elm.off('mousedown', preventMouseDown);
- });
-
- uiGridCtrl.grid.api.edit.on.afterCellEdit($scope, function () {
- $elm.on('mousedown', preventMouseDown);
- });
-
- uiGridCtrl.grid.api.edit.on.cancelCellEdit($scope, function () {
- $elm.on('mousedown', preventMouseDown);
- });
- }
-
- function preventMouseDown(evt) {
- //Prevents the foucus event from firing if the click event is already going to fire.
- //If both events fire it will cause bouncing behavior.
- evt.preventDefault();
- }
-
- //You can only focus on elements with a tabindex value
- $elm.on('focus', function (evt) {
- uiGridCtrl.cellNav.broadcastCellNav(new GridRowColumn($scope.row, $scope.col), false, evt);
- evt.stopPropagation();
- $scope.$apply();
- });
-
- // This event is fired for all cells. If the cell matches, then focus is set
- $scope.$on(uiGridCellNavConstants.CELL_NAV_EVENT, function (evt, rowCol, modifierDown) {
- var isFocused = grid.cellNav.focusedCells.some(function(focusedRowCol, index){
- return (focusedRowCol.row === $scope.row && focusedRowCol.col === $scope.col);
- });
- if (isFocused){
- setFocused();
- } else {
- clearFocus();
- }
- });
-
- function setFocused() {
- if (!$scope.focused){
- var div = $elm.find('div');
- div.addClass('ui-grid-cell-focus');
- $elm.attr('aria-selected', true);
- uiGridCellnavCtrl.setAriaActivedescendant($elm.attr('id'));
- $scope.focused = true;
- }
- }
-
- function clearFocus() {
- if ($scope.focused){
- var div = $elm.find('div');
- div.removeClass('ui-grid-cell-focus');
- $elm.attr('aria-selected', false);
- uiGridCellnavCtrl.removeAriaActivedescendant($elm.attr('id'));
- $scope.focused = false;
- }
- }
-
- $scope.$on('$destroy', function () {
- //.off withouth paramaters removes all handlers
- $elm.find('div').off();
- $elm.off();
- });
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.edit
- * @description
- *
- * # ui.grid.edit
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides cell editing capability to ui.grid. The goal was to emulate keying data in a spreadsheet via
- * a keyboard.
- * <br/>
- * <br/>
- * To really get the full spreadsheet-like data entry, the ui.grid.cellNav module should be used. This will allow the
- * user to key data and then tab, arrow, or enter to the cells beside or below.
- *
- * <div doc-module-components="ui.grid.edit"></div>
- */
-
- var module = angular.module('ui.grid.edit', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.constant:uiGridEditConstants
- *
- * @description constants available in edit module
- */
- module.constant('uiGridEditConstants', {
- EDITABLE_CELL_TEMPLATE: /EDITABLE_CELL_TEMPLATE/g,
- //must be lowercase because template bulder converts to lower
- EDITABLE_CELL_DIRECTIVE: /editable_cell_directive/g,
- events: {
- BEGIN_CELL_EDIT: 'uiGridEventBeginCellEdit',
- END_CELL_EDIT: 'uiGridEventEndCellEdit',
- CANCEL_CELL_EDIT: 'uiGridEventCancelCellEdit'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.edit.service:uiGridEditService
- *
- * @description Services for editing features
- */
- module.service('uiGridEditService', ['$q', 'uiGridConstants', 'gridUtil',
- function ($q, uiGridConstants, gridUtil) {
-
- var service = {
-
- initializeGrid: function (grid) {
-
- service.defaultGridOptions(grid.options);
-
- grid.registerColumnBuilder(service.editColumnBuilder);
- grid.edit = {};
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:PublicApi
- *
- * @description Public Api for edit feature
- */
- var publicApi = {
- events: {
- edit: {
- /**
- * @ngdoc event
- * @name afterCellEdit
- * @eventOf ui.grid.edit.api:PublicApi
- * @description raised when cell editing is complete
- * <pre>
- * gridApi.edit.on.afterCellEdit(scope,function(rowEntity, colDef){})
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @param {object} colDef the column that was edited
- * @param {object} newValue new value
- * @param {object} oldValue old value
- */
- afterCellEdit: function (rowEntity, colDef, newValue, oldValue) {
- },
- /**
- * @ngdoc event
- * @name beginCellEdit
- * @eventOf ui.grid.edit.api:PublicApi
- * @description raised when cell editing starts on a cell
- * <pre>
- * gridApi.edit.on.beginCellEdit(scope,function(rowEntity, colDef){})
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @param {object} colDef the column that was edited
- * @param {object} triggerEvent the event that triggered the edit. Useful to prevent losing keystrokes on some
- * complex editors
- */
- beginCellEdit: function (rowEntity, colDef, triggerEvent) {
- },
- /**
- * @ngdoc event
- * @name cancelCellEdit
- * @eventOf ui.grid.edit.api:PublicApi
- * @description raised when cell editing is cancelled on a cell
- * <pre>
- * gridApi.edit.on.cancelCellEdit(scope,function(rowEntity, colDef){})
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @param {object} colDef the column that was edited
- */
- cancelCellEdit: function (rowEntity, colDef) {
- }
- }
- },
- methods: {
- edit: { }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- //grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:GridOptions
- *
- * @description Options for configuring the edit feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableCellEdit
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If defined, sets the default value for the editable flag on each individual colDefs
- * if their individual enableCellEdit configuration is not defined. Defaults to undefined.
- */
-
- /**
- * @ngdoc object
- * @name cellEditableCondition
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If specified, either a value or function to be used by all columns before editing.
- * If falsy, then editing of cell is not allowed.
- * @example
- * <pre>
- * function($scope){
- * //use $scope.row.entity and $scope.col.colDef to determine if editing is allowed
- * return true;
- * }
- * </pre>
- */
- gridOptions.cellEditableCondition = gridOptions.cellEditableCondition === undefined ? true : gridOptions.cellEditableCondition;
-
- /**
- * @ngdoc object
- * @name editableCellTemplate
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If specified, cellTemplate to use as the editor for all columns.
- * <br/> defaults to 'ui-grid/cellTextEditor'
- */
-
- /**
- * @ngdoc object
- * @name enableCellEditOnFocus
- * @propertyOf ui.grid.edit.api:GridOptions
- * @description If true, then editor is invoked as soon as cell receives focus. Default false.
- * <br/>_requires cellNav feature and the edit feature to be enabled_
- */
- //enableCellEditOnFocus can only be used if cellnav module is used
- gridOptions.enableCellEditOnFocus = gridOptions.enableCellEditOnFocus === undefined ? false : gridOptions.enableCellEditOnFocus;
- },
-
- /**
- * @ngdoc service
- * @name editColumnBuilder
- * @methodOf ui.grid.edit.service:uiGridEditService
- * @description columnBuilder function that adds edit properties to grid column
- * @returns {promise} promise that will load any needed templates when resolved
- */
- editColumnBuilder: function (colDef, col, gridOptions) {
-
- var promises = [];
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:ColumnDef
- *
- * @description Column Definition for edit feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enableCellEdit
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description enable editing on column
- */
- colDef.enableCellEdit = colDef.enableCellEdit === undefined ? (gridOptions.enableCellEdit === undefined ?
- (colDef.type !== 'object') : gridOptions.enableCellEdit) : colDef.enableCellEdit;
-
- /**
- * @ngdoc object
- * @name cellEditableCondition
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description If specified, either a value or function evaluated before editing cell. If falsy, then editing of cell is not allowed.
- * @example
- * <pre>
- * function($scope){
- * //use $scope.row.entity and $scope.col.colDef to determine if editing is allowed
- * return true;
- * }
- * </pre>
- */
- colDef.cellEditableCondition = colDef.cellEditableCondition === undefined ? gridOptions.cellEditableCondition : colDef.cellEditableCondition;
-
- /**
- * @ngdoc object
- * @name editableCellTemplate
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description cell template to be used when editing this column. Can be Url or text template
- * <br/>Defaults to gridOptions.editableCellTemplate
- */
- if (colDef.enableCellEdit) {
- colDef.editableCellTemplate = colDef.editableCellTemplate || gridOptions.editableCellTemplate || 'ui-grid/cellEditor';
-
- promises.push(gridUtil.getTemplate(colDef.editableCellTemplate)
- .then(
- function (template) {
- col.editableCellTemplate = template;
- },
- function (res) {
- // Todo handle response error here?
- throw new Error("Couldn't fetch/use colDef.editableCellTemplate '" + colDef.editableCellTemplate + "'");
- }));
- }
-
- /**
- * @ngdoc object
- * @name enableCellEditOnFocus
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @requires ui.grid.cellNav
- * @description If true, then editor is invoked as soon as cell receives focus. Default false.
- * <br>_requires both the cellNav feature and the edit feature to be enabled_
- */
- //enableCellEditOnFocus can only be used if cellnav module is used
- colDef.enableCellEditOnFocus = colDef.enableCellEditOnFocus === undefined ? gridOptions.enableCellEditOnFocus : colDef.enableCellEditOnFocus;
-
-
- /**
- * @ngdoc string
- * @name editModelField
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description a bindable string value that is used when binding to edit controls instead of colDef.field
- * <br/> example: You have a complex property on and object like state:{abbrev:'MS',name:'Mississippi'}. The
- * grid should display state.name in the cell and sort/filter based on the state.name property but the editor
- * requires the full state object.
- * <br/>colDef.field = 'state.name'
- * <br/>colDef.editModelField = 'state'
- */
- //colDef.editModelField
-
- return $q.all(promises);
- },
-
- /**
- * @ngdoc service
- * @name isStartEditKey
- * @methodOf ui.grid.edit.service:uiGridEditService
- * @description Determines if a keypress should start editing. Decorate this service to override with your
- * own key events. See service decorator in angular docs.
- * @param {Event} evt keydown event
- * @returns {boolean} true if an edit should start
- */
- isStartEditKey: function (evt) {
- if (evt.metaKey ||
- evt.keyCode === uiGridConstants.keymap.ESC ||
- evt.keyCode === uiGridConstants.keymap.SHIFT ||
- evt.keyCode === uiGridConstants.keymap.CTRL ||
- evt.keyCode === uiGridConstants.keymap.ALT ||
- evt.keyCode === uiGridConstants.keymap.WIN ||
- evt.keyCode === uiGridConstants.keymap.CAPSLOCK ||
-
- evt.keyCode === uiGridConstants.keymap.LEFT ||
- (evt.keyCode === uiGridConstants.keymap.TAB && evt.shiftKey) ||
-
- evt.keyCode === uiGridConstants.keymap.RIGHT ||
- evt.keyCode === uiGridConstants.keymap.TAB ||
-
- evt.keyCode === uiGridConstants.keymap.UP ||
- (evt.keyCode === uiGridConstants.keymap.ENTER && evt.shiftKey) ||
-
- evt.keyCode === uiGridConstants.keymap.DOWN ||
- evt.keyCode === uiGridConstants.keymap.ENTER) {
- return false;
-
- }
- return true;
- }
-
-
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEdit
- * @element div
- * @restrict A
- *
- * @description Adds editing features to the ui-grid directive.
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.edit']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-edit></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridEdit', ['gridUtil', 'uiGridEditService', function (gridUtil, uiGridEditService) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridEditService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridRenderContainer
- * @element div
- * @restrict A
- *
- * @description Adds keydown listeners to renderContainer element so we can capture when to begin edits
- *
- */
- module.directive('uiGridViewport', [ 'uiGridEditConstants',
- function ( uiGridEditConstants) {
- return {
- replace: true,
- priority: -99998, //run before cellNav
- require: ['^uiGrid', '^uiGridRenderContainer'],
- scope: false,
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
-
- // Skip attaching if edit and cellNav is not enabled
- if (!uiGridCtrl.grid.api.edit || !uiGridCtrl.grid.api.cellNav) { return; }
-
- var containerId = controllers[1].containerId;
- //no need to process for other containers
- if (containerId !== 'body') {
- return;
- }
-
- //refocus on the grid
- $scope.$on(uiGridEditConstants.events.CANCEL_CELL_EDIT, function () {
- uiGridCtrl.focus();
- });
- $scope.$on(uiGridEditConstants.events.END_CELL_EDIT, function () {
- uiGridCtrl.focus();
- });
-
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridCell
- * @element div
- * @restrict A
- *
- * @description Stacks on top of ui.grid.uiGridCell to provide in-line editing capabilities to the cell
- * Editing Actions.
- *
- * Binds edit start events to the uiGridCell element. When the events fire, the gridCell element is appended
- * with the columnDef.editableCellTemplate element ('cellEditor.html' by default).
- *
- * The editableCellTemplate should respond to uiGridEditConstants.events.BEGIN\_CELL\_EDIT angular event
- * and do the initial steps needed to edit the cell (setfocus on input element, etc).
- *
- * When the editableCellTemplate recognizes that the editing is ended (blur event, Enter key, etc.)
- * it should emit the uiGridEditConstants.events.END\_CELL\_EDIT event.
- *
- * If editableCellTemplate recognizes that the editing has been cancelled (esc key)
- * it should emit the uiGridEditConstants.events.CANCEL\_CELL\_EDIT event. The original value
- * will be set back on the model by the uiGridCell directive.
- *
- * Events that invoke editing:
- * - dblclick
- * - F2 keydown (when using cell selection)
- *
- * Events that end editing:
- * - Dependent on the specific editableCellTemplate
- * - Standards should be blur and enter keydown
- *
- * Events that cancel editing:
- * - Dependent on the specific editableCellTemplate
- * - Standards should be Esc keydown
- *
- * Grid Events that end editing:
- * - uiGridConstants.events.GRID_SCROLL
- *
- */
-
- /**
- * @ngdoc object
- * @name ui.grid.edit.api:GridRow
- *
- * @description GridRow options for edit feature, these are available to be
- * set internally only, by other features
- */
-
- /**
- * @ngdoc object
- * @name enableCellEdit
- * @propertyOf ui.grid.edit.api:GridRow
- * @description enable editing on row, grouping for example might disable editing on group header rows
- */
-
- module.directive('uiGridCell',
- ['$compile', '$injector', '$timeout', 'uiGridConstants', 'uiGridEditConstants', 'gridUtil', '$parse', 'uiGridEditService', '$rootScope',
- function ($compile, $injector, $timeout, uiGridConstants, uiGridEditConstants, gridUtil, $parse, uiGridEditService, $rootScope) {
- var touchstartTimeout = 500;
- if ($injector.has('uiGridCellNavService')) {
- var uiGridCellNavService = $injector.get('uiGridCellNavService');
- }
-
- return {
- priority: -100, // run after default uiGridCell directive
- restrict: 'A',
- scope: false,
- require: '?^uiGrid',
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var html;
- var origCellValue;
- var inEdit = false;
- var cellModel;
- var cancelTouchstartTimeout;
-
- var editCellScope;
-
- if (!$scope.col.colDef.enableCellEdit) {
- return;
- }
-
- var cellNavNavigateDereg = function() {};
- var viewPortKeyDownDereg = function() {};
-
-
- var setEditable = function() {
- if ($scope.col.colDef.enableCellEdit && $scope.row.enableCellEdit !== false) {
- if (!$scope.beginEditEventsWired) { //prevent multiple attachments
- registerBeginEditEvents();
- }
- } else {
- if ($scope.beginEditEventsWired) {
- cancelBeginEditEvents();
- }
- }
- };
-
- setEditable();
-
- var rowWatchDereg = $scope.$watch('row', function (n, o) {
- if (n !== o) {
- setEditable();
- }
- });
-
-
- $scope.$on( '$destroy', rowWatchDereg );
-
- function registerBeginEditEvents() {
- $elm.on('dblclick', beginEdit);
-
- // Add touchstart handling. If the users starts a touch and it doesn't end after X milliseconds, then start the edit
- $elm.on('touchstart', touchStart);
-
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
-
- viewPortKeyDownDereg = uiGridCtrl.grid.api.cellNav.on.viewPortKeyDown($scope, function (evt, rowCol) {
- if (rowCol === null) {
- return;
- }
-
- if (rowCol.row === $scope.row && rowCol.col === $scope.col && !$scope.col.colDef.enableCellEditOnFocus) {
- //important to do this before scrollToIfNecessary
- beginEditKeyDown(evt);
- }
- });
-
- cellNavNavigateDereg = uiGridCtrl.grid.api.cellNav.on.navigate($scope, function (newRowCol, oldRowCol) {
- if ($scope.col.colDef.enableCellEditOnFocus) {
- // Don't begin edit if the cell hasn't changed
- if ((!oldRowCol || newRowCol.row !== oldRowCol.row || newRowCol.col !== oldRowCol.col) &&
- newRowCol.row === $scope.row && newRowCol.col === $scope.col) {
- $timeout(function () {
- beginEdit();
- });
- }
- }
- });
- }
-
- $scope.beginEditEventsWired = true;
-
- }
-
- function touchStart(event) {
- // jQuery masks events
- if (typeof(event.originalEvent) !== 'undefined' && event.originalEvent !== undefined) {
- event = event.originalEvent;
- }
-
- // Bind touchend handler
- $elm.on('touchend', touchEnd);
-
- // Start a timeout
- cancelTouchstartTimeout = $timeout(function() { }, touchstartTimeout);
-
- // Timeout's done! Start the edit
- cancelTouchstartTimeout.then(function () {
- // Use setTimeout to start the edit because beginEdit expects to be outside of $digest
- setTimeout(beginEdit, 0);
-
- // Undbind the touchend handler, we don't need it anymore
- $elm.off('touchend', touchEnd);
- });
- }
-
- // Cancel any touchstart timeout
- function touchEnd(event) {
- $timeout.cancel(cancelTouchstartTimeout);
- $elm.off('touchend', touchEnd);
- }
-
- function cancelBeginEditEvents() {
- $elm.off('dblclick', beginEdit);
- $elm.off('keydown', beginEditKeyDown);
- $elm.off('touchstart', touchStart);
- cellNavNavigateDereg();
- viewPortKeyDownDereg();
- $scope.beginEditEventsWired = false;
- }
-
- function beginEditKeyDown(evt) {
- if (uiGridEditService.isStartEditKey(evt)) {
- beginEdit(evt);
- }
- }
-
- function shouldEdit(col, row) {
- return !row.isSaving &&
- ( angular.isFunction(col.colDef.cellEditableCondition) ?
- col.colDef.cellEditableCondition($scope) :
- col.colDef.cellEditableCondition );
- }
-
-
- function beginEdit(triggerEvent) {
- //we need to scroll the cell into focus before invoking the editor
- $scope.grid.api.core.scrollToIfNecessary($scope.row, $scope.col)
- .then(function () {
- beginEditAfterScroll(triggerEvent);
- });
- }
-
- /**
- * @ngdoc property
- * @name editDropdownOptionsArray
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description an array of values in the format
- * [ {id: xxx, value: xxx} ], which is populated
- * into the edit dropdown
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownIdLabel
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description the label for the "id" field
- * in the editDropdownOptionsArray. Defaults
- * to 'id'
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsArray: [{code: 1, status: 'active'}, {code: 2, status: 'inactive'}],
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownRowEntityOptionsArrayPath
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description a path to a property on row.entity containing an
- * array of values in the format
- * [ {id: xxx, value: xxx} ], which will be used to populate
- * the edit dropdown. This can be used when the dropdown values are dependent on
- * the backing row entity.
- * If this property is set then editDropdownOptionsArray will be ignored.
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownRowEntityOptionsArrayPath: 'foo.bars[0].baz',
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownValueLabel
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description the label for the "value" field
- * in the editDropdownOptionsArray. Defaults
- * to 'value'
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsArray: [{code: 1, status: 'active'}, {code: 2, status: 'inactive'}],
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status' }
- * ],
- * </pre>
- *
- */
- /**
- * @ngdoc property
- * @name editDropdownFilter
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description A filter that you would like to apply to the values in the options list
- * of the dropdown. For example if you were using angular-translate you might set this
- * to `'translate'`
- * @example
- * <pre>
- * $scope.gridOptions = {
- * columnDefs: [
- * {name: 'status', editableCellTemplate: 'ui-grid/dropdownEditor',
- * editDropdownOptionsArray: [{code: 1, status: 'active'}, {code: 2, status: 'inactive'}],
- * editDropdownIdLabel: 'code', editDropdownValueLabel: 'status', editDropdownFilter: 'translate' }
- * ],
- * </pre>
- *
- */
- function beginEditAfterScroll(triggerEvent) {
- // If we are already editing, then just skip this so we don't try editing twice...
- if (inEdit) {
- return;
- }
-
- if (!shouldEdit($scope.col, $scope.row)) {
- return;
- }
-
-
- cellModel = $parse($scope.row.getQualifiedColField($scope.col));
- //get original value from the cell
- origCellValue = cellModel($scope);
-
- html = $scope.col.editableCellTemplate;
-
- if ($scope.col.colDef.editModelField) {
- html = html.replace(uiGridConstants.MODEL_COL_FIELD, gridUtil.preEval('row.entity.' + $scope.col.colDef.editModelField));
- }
- else {
- html = html.replace(uiGridConstants.MODEL_COL_FIELD, $scope.row.getQualifiedColField($scope.col));
- }
-
- html = html.replace(uiGridConstants.COL_FIELD, 'grid.getCellValue(row, col)');
-
- var optionFilter = $scope.col.colDef.editDropdownFilter ? '|' + $scope.col.colDef.editDropdownFilter : '';
- html = html.replace(uiGridConstants.CUSTOM_FILTERS, optionFilter);
-
- var inputType = 'text';
- switch ($scope.col.colDef.type){
- case 'boolean':
- inputType = 'checkbox';
- break;
- case 'number':
- inputType = 'number';
- break;
- case 'date':
- inputType = 'date';
- break;
- }
- html = html.replace('INPUT_TYPE', inputType);
-
- var editDropdownRowEntityOptionsArrayPath = $scope.col.colDef.editDropdownRowEntityOptionsArrayPath;
- if (editDropdownRowEntityOptionsArrayPath) {
- $scope.editDropdownOptionsArray = resolveObjectFromPath($scope.row.entity, editDropdownRowEntityOptionsArrayPath);
- }
- else {
- $scope.editDropdownOptionsArray = $scope.col.colDef.editDropdownOptionsArray;
- }
- $scope.editDropdownIdLabel = $scope.col.colDef.editDropdownIdLabel ? $scope.col.colDef.editDropdownIdLabel : 'id';
- $scope.editDropdownValueLabel = $scope.col.colDef.editDropdownValueLabel ? $scope.col.colDef.editDropdownValueLabel : 'value';
-
- var cellElement;
- var createEditor = function(){
- inEdit = true;
- cancelBeginEditEvents();
- var cellElement = angular.element(html);
- $elm.append(cellElement);
- editCellScope = $scope.$new();
- $compile(cellElement)(editCellScope);
- var gridCellContentsEl = angular.element($elm.children()[0]);
- gridCellContentsEl.addClass('ui-grid-cell-contents-hidden');
- };
- if (!$rootScope.$$phase) {
- $scope.$apply(createEditor);
- } else {
- createEditor();
- }
-
- //stop editing when grid is scrolled
- var deregOnGridScroll = $scope.col.grid.api.core.on.scrollBegin($scope, function () {
- if ($scope.grid.disableScrolling) {
- return;
- }
- endEdit();
- $scope.grid.api.edit.raise.afterCellEdit($scope.row.entity, $scope.col.colDef, cellModel($scope), origCellValue);
- deregOnGridScroll();
- deregOnEndCellEdit();
- deregOnCancelCellEdit();
- });
-
- //end editing
- var deregOnEndCellEdit = $scope.$on(uiGridEditConstants.events.END_CELL_EDIT, function () {
- endEdit();
- $scope.grid.api.edit.raise.afterCellEdit($scope.row.entity, $scope.col.colDef, cellModel($scope), origCellValue);
- deregOnEndCellEdit();
- deregOnGridScroll();
- deregOnCancelCellEdit();
- });
-
- //cancel editing
- var deregOnCancelCellEdit = $scope.$on(uiGridEditConstants.events.CANCEL_CELL_EDIT, function () {
- cancelEdit();
- deregOnCancelCellEdit();
- deregOnGridScroll();
- deregOnEndCellEdit();
- });
-
- $scope.$broadcast(uiGridEditConstants.events.BEGIN_CELL_EDIT, triggerEvent);
- $timeout(function () {
- //execute in a timeout to give any complex editor templates a cycle to completely render
- $scope.grid.api.edit.raise.beginCellEdit($scope.row.entity, $scope.col.colDef, triggerEvent);
- });
- }
-
- function endEdit() {
- $scope.grid.disableScrolling = false;
- if (!inEdit) {
- return;
- }
-
- //sometimes the events can't keep up with the keyboard and grid focus is lost, so always focus
- //back to grid here. The focus call needs to be before the $destroy and removal of the control,
- //otherwise ng-model-options of UpdateOn: 'blur' will not work.
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- uiGridCtrl.focus();
- }
-
- var gridCellContentsEl = angular.element($elm.children()[0]);
- //remove edit element
- editCellScope.$destroy();
- angular.element($elm.children()[1]).remove();
- gridCellContentsEl.removeClass('ui-grid-cell-contents-hidden');
- inEdit = false;
- registerBeginEditEvents();
- $scope.grid.api.core.notifyDataChange( uiGridConstants.dataChange.EDIT );
- }
-
- function cancelEdit() {
- $scope.grid.disableScrolling = false;
- if (!inEdit) {
- return;
- }
- cellModel.assign($scope, origCellValue);
- $scope.$apply();
-
- $scope.grid.api.edit.raise.cancelCellEdit($scope.row.entity, $scope.col.colDef);
- endEdit();
- }
-
- // resolves a string path against the given object
- // shamelessly borrowed from
- // http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key
- function resolveObjectFromPath(object, path) {
- path = path.replace(/\[(\w+)\]/g, '.$1'); // convert indexes to properties
- path = path.replace(/^\./, ''); // strip a leading dot
- var a = path.split('.');
- while (a.length) {
- var n = a.shift();
- if (n in object) {
- object = object[n];
- } else {
- return;
- }
- }
- return object;
- }
-
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEditor
- * @element div
- * @restrict A
- *
- * @description input editor directive for editable fields.
- * Provides EndEdit and CancelEdit events
- *
- * Events that end editing:
- * blur and enter keydown
- *
- * Events that cancel editing:
- * - Esc keydown
- *
- */
- module.directive('uiGridEditor',
- ['gridUtil', 'uiGridConstants', 'uiGridEditConstants','$timeout', 'uiGridEditService',
- function (gridUtil, uiGridConstants, uiGridEditConstants, $timeout, uiGridEditService) {
- return {
- scope: true,
- require: ['?^uiGrid', '?^uiGridRenderContainer', 'ngModel'],
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl, renderContainerCtrl, ngModel;
- if (controllers[0]) { uiGridCtrl = controllers[0]; }
- if (controllers[1]) { renderContainerCtrl = controllers[1]; }
- if (controllers[2]) { ngModel = controllers[2]; }
-
- //set focus at start of edit
- $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function (evt,triggerEvent) {
- $timeout(function () {
- $elm[0].focus();
- //only select text if it is not being replaced below in the cellNav viewPortKeyPress
- if ($scope.col.colDef.enableCellEditOnFocus || !(uiGridCtrl && uiGridCtrl.grid.api.cellNav)) {
- $elm[0].select();
- }
- else {
- //some browsers (Chrome) stupidly, imo, support the w3 standard that number, email, ...
- //fields should not allow setSelectionRange. We ignore the error for those browsers
- //https://www.w3.org/Bugs/Public/show_bug.cgi?id=24796
- try {
- $elm[0].setSelectionRange($elm[0].value.length, $elm[0].value.length);
- }
- catch (ex) {
- //ignore
- }
- }
- });
-
- //set the keystroke that started the edit event
- //we must do this because the BeginEdit is done in a different event loop than the intitial
- //keydown event
- //fire this event for the keypress that is received
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- var viewPortKeyDownUnregister = uiGridCtrl.grid.api.cellNav.on.viewPortKeyPress($scope, function (evt, rowCol) {
- if (uiGridEditService.isStartEditKey(evt)) {
- ngModel.$setViewValue(String.fromCharCode(evt.keyCode), evt);
- ngModel.$render();
- }
- viewPortKeyDownUnregister();
- });
- }
-
- $elm.on('blur', function (evt) {
- $scope.stopEdit(evt);
- });
- });
-
-
- $scope.deepEdit = false;
-
- $scope.stopEdit = function (evt) {
- if ($scope.inputForm && !$scope.inputForm.$valid) {
- evt.stopPropagation();
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- }
- else {
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- }
- $scope.deepEdit = false;
- };
-
-
- $elm.on('click', function (evt) {
- if ($elm[0].type !== 'checkbox') {
- $scope.deepEdit = true;
- $timeout(function () {
- $scope.grid.disableScrolling = true;
- });
- }
- });
-
- $elm.on('keydown', function (evt) {
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ESC:
- evt.stopPropagation();
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- break;
- }
-
- if ($scope.deepEdit &&
- (evt.keyCode === uiGridConstants.keymap.LEFT ||
- evt.keyCode === uiGridConstants.keymap.RIGHT ||
- evt.keyCode === uiGridConstants.keymap.UP ||
- evt.keyCode === uiGridConstants.keymap.DOWN)) {
- evt.stopPropagation();
- }
- // Pass the keydown event off to the cellNav service, if it exists
- else if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- evt.uiGridTargetRenderContainerId = renderContainerCtrl.containerId;
- if (uiGridCtrl.cellNav.handleKeyDown(evt) !== null) {
- $scope.stopEdit(evt);
- }
- }
- else {
- //handle enter and tab for editing not using cellNav
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ENTER: // Enter (Leave Field)
- case uiGridConstants.keymap.TAB:
- evt.stopPropagation();
- evt.preventDefault();
- $scope.stopEdit(evt);
- break;
- }
- }
-
- return true;
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:input
- * @element input
- * @restrict E
- *
- * @description directive to provide binding between input[date] value and ng-model for angular 1.2
- * It is similar to input[date] directive of angular 1.3
- *
- * Supported date format for input is 'yyyy-MM-dd'
- * The directive will set the $valid property of input element and the enclosing form to false if
- * model is invalid date or value of input is entered wrong.
- *
- */
- module.directive('uiGridEditor', ['$filter', function ($filter) {
- function parseDateString(dateString) {
- if (typeof(dateString) === 'undefined' || dateString === '') {
- return null;
- }
- var parts = dateString.split('-');
- if (parts.length !== 3) {
- return null;
- }
- var year = parseInt(parts[0], 10);
- var month = parseInt(parts[1], 10);
- var day = parseInt(parts[2], 10);
-
- if (month < 1 || year < 1 || day < 1) {
- return null;
- }
- return new Date(year, (month - 1), day);
- }
- return {
- priority: -100, // run after default uiGridEditor directive
- require: '?ngModel',
- link: function (scope, element, attrs, ngModel) {
-
- if (angular.version.minor === 2 && attrs.type && attrs.type === 'date' && ngModel) {
-
- ngModel.$formatters.push(function (modelValue) {
- ngModel.$setValidity(null,(!modelValue || !isNaN(modelValue.getTime())));
- return $filter('date')(modelValue, 'yyyy-MM-dd');
- });
-
- ngModel.$parsers.push(function (viewValue) {
- if (viewValue && viewValue.length > 0) {
- var dateValue = parseDateString(viewValue);
- ngModel.$setValidity(null, (dateValue && !isNaN(dateValue.getTime())));
- return dateValue;
- }
- else {
- ngModel.$setValidity(null, true);
- return null;
- }
- });
- }
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEditDropdown
- * @element div
- * @restrict A
- *
- * @description dropdown editor for editable fields.
- * Provides EndEdit and CancelEdit events
- *
- * Events that end editing:
- * blur and enter keydown, and any left/right nav
- *
- * Events that cancel editing:
- * - Esc keydown
- *
- */
- module.directive('uiGridEditDropdown',
- ['uiGridConstants', 'uiGridEditConstants',
- function (uiGridConstants, uiGridEditConstants) {
- return {
- require: ['?^uiGrid', '?^uiGridRenderContainer'],
- scope: true,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl = controllers[0];
- var renderContainerCtrl = controllers[1];
-
- //set focus at start of edit
- $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function () {
- $elm[0].focus();
- $elm[0].style.width = ($elm[0].parentElement.offsetWidth - 1) + 'px';
- $elm.on('blur', function (evt) {
- $scope.stopEdit(evt);
- });
- });
-
-
- $scope.stopEdit = function (evt) {
- // no need to validate a dropdown - invalid values shouldn't be
- // available in the list
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- };
-
- $elm.on('keydown', function (evt) {
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ESC:
- evt.stopPropagation();
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- break;
- }
- if (uiGridCtrl && uiGridCtrl.grid.api.cellNav) {
- evt.uiGridTargetRenderContainerId = renderContainerCtrl.containerId;
- if (uiGridCtrl.cellNav.handleKeyDown(evt) !== null) {
- $scope.stopEdit(evt);
- }
- }
- else {
- //handle enter and tab for editing not using cellNav
- switch (evt.keyCode) {
- case uiGridConstants.keymap.ENTER: // Enter (Leave Field)
- case uiGridConstants.keymap.TAB:
- evt.stopPropagation();
- evt.preventDefault();
- $scope.stopEdit(evt);
- break;
- }
- }
- return true;
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.edit.directive:uiGridEditFileChooser
- * @element div
- * @restrict A
- *
- * @description input editor directive for editable fields.
- * Provides EndEdit and CancelEdit events
- *
- * Events that end editing:
- * blur and enter keydown
- *
- * Events that cancel editing:
- * - Esc keydown
- *
- */
- module.directive('uiGridEditFileChooser',
- ['gridUtil', 'uiGridConstants', 'uiGridEditConstants','$timeout',
- function (gridUtil, uiGridConstants, uiGridEditConstants, $timeout) {
- return {
- scope: true,
- require: ['?^uiGrid', '?^uiGridRenderContainer'],
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- var uiGridCtrl, renderContainerCtrl;
- if (controllers[0]) { uiGridCtrl = controllers[0]; }
- if (controllers[1]) { renderContainerCtrl = controllers[1]; }
- var grid = uiGridCtrl.grid;
-
- var handleFileSelect = function( event ){
- var target = event.srcElement || event.target;
-
- if (target && target.files && target.files.length > 0) {
- /**
- * @ngdoc property
- * @name editFileChooserCallback
- * @propertyOf ui.grid.edit.api:ColumnDef
- * @description A function that should be called when any files have been chosen
- * by the user. You should use this to process the files appropriately for your
- * application.
- *
- * It passes the gridCol, the gridRow (from which you can get gridRow.entity),
- * and the files. The files are in the format as returned from the file chooser,
- * an array of files, with each having useful information such as:
- * - `files[0].lastModifiedDate`
- * - `files[0].name`
- * - `files[0].size` (appears to be in bytes)
- * - `files[0].type` (MIME type by the looks)
- *
- * Typically you would do something with these files - most commonly you would
- * use the filename or read the file itself in. The example function does both.
- *
- * @example
- * <pre>
- * editFileChooserCallBack: function(gridRow, gridCol, files ){
- * // ignore all but the first file, it can only choose one anyway
- * // set the filename into this column
- * gridRow.entity.filename = file[0].name;
- *
- * // read the file and set it into a hidden column, which we may do stuff with later
- * var setFile = function(fileContent){
- * gridRow.entity.file = fileContent.currentTarget.result;
- * };
- * var reader = new FileReader();
- * reader.onload = setFile;
- * reader.readAsText( files[0] );
- * }
- * </pre>
- */
- if ( typeof($scope.col.colDef.editFileChooserCallback) === 'function' ) {
- $scope.col.colDef.editFileChooserCallback($scope.row, $scope.col, target.files);
- } else {
- gridUtil.logError('You need to set colDef.editFileChooserCallback to use the file chooser');
- }
-
- target.form.reset();
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- } else {
- $scope.$emit(uiGridEditConstants.events.CANCEL_CELL_EDIT);
- }
- };
-
- $elm[0].addEventListener('change', handleFileSelect, false); // TODO: why the false on the end? Google
-
- $scope.$on(uiGridEditConstants.events.BEGIN_CELL_EDIT, function () {
- $elm[0].focus();
- $elm[0].select();
-
- $elm.on('blur', function (evt) {
- $scope.$emit(uiGridEditConstants.events.END_CELL_EDIT);
- });
- });
- }
- };
- }
- };
- }]);
-
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.expandable
- * @description
- *
- * # ui.grid.expandable
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides the ability to create subgrids with the ability to expand a row
- * to show the subgrid.
- *
- * <div doc-module-components="ui.grid.expandable"></div>
- */
- var module = angular.module('ui.grid.expandable', ['ui.grid']);
-
- /**
- * @ngdoc service
- * @name ui.grid.expandable.service:uiGridExpandableService
- *
- * @description Services for the expandable grid
- */
- module.service('uiGridExpandableService', ['gridUtil', '$compile', function (gridUtil, $compile) {
- var service = {
- initializeGrid: function (grid) {
-
- grid.expandable = {};
- grid.expandable.expandedAll = false;
-
- /**
- * @ngdoc object
- * @name enableExpandable
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Whether or not to use expandable feature, allows you to turn off expandable on specific grids
- * within your application, or in specific modes on _this_ grid. Defaults to true.
- * @example
- * <pre>
- * $scope.gridOptions = {
- * enableExpandable: false
- * }
- * </pre>
- */
- grid.options.enableExpandable = grid.options.enableExpandable !== false;
-
- /**
- * @ngdoc object
- * @name expandableRowHeight
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Height in pixels of the expanded subgrid. Defaults to
- * 150
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowHeight: 150
- * }
- * </pre>
- */
- grid.options.expandableRowHeight = grid.options.expandableRowHeight || 150;
-
- /**
- * @ngdoc object
- * @name
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Width in pixels of the expandable column. Defaults to 40
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowHeaderWidth: 40
- * }
- * </pre>
- */
- grid.options.expandableRowHeaderWidth = grid.options.expandableRowHeaderWidth || 40;
-
- /**
- * @ngdoc object
- * @name expandableRowTemplate
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Mandatory. The template for your expanded row
- * @example
- * <pre>
- * $scope.gridOptions = {
- * expandableRowTemplate: 'expandableRowTemplate.html'
- * }
- * </pre>
- */
- if ( grid.options.enableExpandable && !grid.options.expandableRowTemplate ){
- gridUtil.logError( 'You have not set the expandableRowTemplate, disabling expandable module' );
- grid.options.enableExpandable = false;
- }
-
- /**
- * @ngdoc object
- * @name ui.grid.expandable.api:PublicApi
- *
- * @description Public Api for expandable feature
- */
- /**
- * @ngdoc object
- * @name ui.grid.expandable.api:GridOptions
- *
- * @description Options for configuring the expandable feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- var publicApi = {
- events: {
- expandable: {
- /**
- * @ngdoc event
- * @name rowExpandedStateChanged
- * @eventOf ui.grid.expandable.api:PublicApi
- * @description raised when cell editing is complete
- * <pre>
- * gridApi.expandable.on.rowExpandedStateChanged(scope,function(row){})
- * </pre>
- * @param {GridRow} row the row that was expanded
- */
- rowExpandedBeforeStateChanged: function(scope,row){
- },
- rowExpandedStateChanged: function (scope, row) {
- }
- }
- },
-
- methods: {
- expandable: {
- /**
- * @ngdoc method
- * @name toggleRowExpansion
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Toggle a specific row
- * <pre>
- * gridApi.expandable.toggleRowExpansion(rowEntity);
- * </pre>
- * @param {object} rowEntity the data entity for the row you want to expand
- */
- toggleRowExpansion: function (rowEntity) {
- var row = grid.getRow(rowEntity);
- if (row !== null) {
- service.toggleRowExpansion(grid, row);
- }
- },
-
- /**
- * @ngdoc method
- * @name expandAllRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Expand all subgrids.
- * <pre>
- * gridApi.expandable.expandAllRows();
- * </pre>
- */
- expandAllRows: function() {
- service.expandAllRows(grid);
- },
-
- /**
- * @ngdoc method
- * @name collapseAllRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Collapse all subgrids.
- * <pre>
- * gridApi.expandable.collapseAllRows();
- * </pre>
- */
- collapseAllRows: function() {
- service.collapseAllRows(grid);
- },
-
- /**
- * @ngdoc method
- * @name toggleAllRows
- * @methodOf ui.grid.expandable.api:PublicApi
- * @description Toggle all subgrids.
- * <pre>
- * gridApi.expandable.toggleAllRows();
- * </pre>
- */
- toggleAllRows: function() {
- service.toggleAllRows(grid);
- }
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
- toggleRowExpansion: function (grid, row) {
- // trigger the "before change" event. Can change row height dynamically this way.
- grid.api.expandable.raise.rowExpandedBeforeStateChanged(row);
- row.isExpanded = !row.isExpanded;
- if (angular.isUndefined(row.expandedRowHeight)){
- row.expandedRowHeight = grid.options.expandableRowHeight;
- }
-
- if (row.isExpanded) {
- row.height = row.grid.options.rowHeight + row.expandedRowHeight;
- }
- else {
- row.height = row.grid.options.rowHeight;
- grid.expandable.expandedAll = false;
- }
- grid.api.expandable.raise.rowExpandedStateChanged(row);
- },
-
- expandAllRows: function(grid, $scope) {
- grid.renderContainers.body.visibleRowCache.forEach( function(row) {
- if (!row.isExpanded) {
- service.toggleRowExpansion(grid, row);
- }
- });
- grid.expandable.expandedAll = true;
- grid.queueGridRefresh();
- },
-
- collapseAllRows: function(grid) {
- grid.renderContainers.body.visibleRowCache.forEach( function(row) {
- if (row.isExpanded) {
- service.toggleRowExpansion(grid, row);
- }
- });
- grid.expandable.expandedAll = false;
- grid.queueGridRefresh();
- },
-
- toggleAllRows: function(grid) {
- if (grid.expandable.expandedAll) {
- service.collapseAllRows(grid);
- }
- else {
- service.expandAllRows(grid);
- }
- }
- };
- return service;
- }]);
-
- /**
- * @ngdoc object
- * @name enableExpandableRowHeader
- * @propertyOf ui.grid.expandable.api:GridOptions
- * @description Show a rowHeader to provide the expandable buttons. If set to false then implies
- * you're going to use a custom method for expanding and collapsing the subgrids. Defaults to true.
- * @example
- * <pre>
- * $scope.gridOptions = {
- * enableExpandableRowHeader: false
- * }
- * </pre>
- */
- module.directive('uiGridExpandable', ['uiGridExpandableService', '$templateCache',
- function (uiGridExpandableService, $templateCache) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- if ( uiGridCtrl.grid.options.enableExpandableRowHeader !== false ) {
- var expandableRowHeaderColDef = {
- name: 'expandableButtons',
- displayName: '',
- exporterSuppressExport: true,
- enableColumnResizing: false,
- enableColumnMenu: false,
- width: uiGridCtrl.grid.options.expandableRowHeaderWidth || 40
- };
- expandableRowHeaderColDef.cellTemplate = $templateCache.get('ui-grid/expandableRowHeader');
- expandableRowHeaderColDef.headerCellTemplate = $templateCache.get('ui-grid/expandableTopRowHeader');
- uiGridCtrl.grid.addRowHeaderColumn(expandableRowHeaderColDef);
- }
- uiGridExpandableService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGrid
- * @description stacks on the uiGrid directive to register child grid with parent row when child is created
- */
- module.directive('uiGrid', ['uiGridExpandableService', '$templateCache',
- function (uiGridExpandableService, $templateCache) {
- return {
- replace: true,
- priority: 599,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- uiGridCtrl.grid.api.core.on.renderingComplete($scope, function() {
- //if a parent grid row is on the scope, then add the parentRow property to this childGrid
- if ($scope.row && $scope.row.grid && $scope.row.grid.options && $scope.row.grid.options.enableExpandable) {
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.class:Grid
- * @description Additional Grid properties added by expandable module
- */
-
- /**
- * @ngdoc object
- * @name parentRow
- * @propertyOf ui.grid.expandable.class:Grid
- * @description reference to the expanded parent row that owns this grid
- */
- uiGridCtrl.grid.parentRow = $scope.row;
-
- //todo: adjust height on parent row when child grid height changes. we need some sort of gridHeightChanged event
- // uiGridCtrl.grid.core.on.canvasHeightChanged($scope, function(oldHeight, newHeight) {
- // uiGridCtrl.grid.parentRow = newHeight;
- // });
- }
-
- });
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGridExpandableRow
- * @description directive to render the expandable row template
- */
- module.directive('uiGridExpandableRow',
- ['uiGridExpandableService', '$timeout', '$compile', 'uiGridConstants','gridUtil','$interval', '$log',
- function (uiGridExpandableService, $timeout, $compile, uiGridConstants, gridUtil, $interval, $log) {
-
- return {
- replace: false,
- priority: 0,
- scope: false,
-
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- gridUtil.getTemplate($scope.grid.options.expandableRowTemplate).then(
- function (template) {
- if ($scope.grid.options.expandableRowScope) {
- var expandableRowScope = $scope.grid.options.expandableRowScope;
- for (var property in expandableRowScope) {
- if (expandableRowScope.hasOwnProperty(property)) {
- $scope[property] = expandableRowScope[property];
- }
- }
- }
- var expandedRowElement = $compile(template)($scope);
- $elm.append(expandedRowElement);
- $scope.row.expandedRendered = true;
- });
- },
-
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- $scope.$on('$destroy', function() {
- $scope.row.expandedRendered = false;
- });
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGridRow
- * @description stacks on the uiGridRow directive to add support for expandable rows
- */
- module.directive('uiGridRow',
- ['$compile', 'gridUtil', '$templateCache',
- function ($compile, gridUtil, $templateCache) {
- return {
- priority: -200,
- scope: false,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- $scope.expandableRow = {};
-
- $scope.expandableRow.shouldRenderExpand = function () {
- var ret = $scope.colContainer.name === 'body' && $scope.grid.options.enableExpandable !== false && $scope.row.isExpanded && (!$scope.grid.isScrollingVertically || $scope.row.expandedRendered);
- return ret;
- };
-
- $scope.expandableRow.shouldRenderFiller = function () {
- var ret = $scope.row.isExpanded && ( $scope.colContainer.name !== 'body' || ($scope.grid.isScrollingVertically && !$scope.row.expandedRendered));
- return ret;
- };
-
- /*
- * Commented out @PaulL1. This has no purpose that I can see, and causes #2964. If this code needs to be reinstated for some
- * reason it needs to use drawnWidth, not width, and needs to check column visibility. It should really use render container
- * visible column cache also instead of checking column.renderContainer.
- function updateRowContainerWidth() {
- var grid = $scope.grid;
- var colWidth = 0;
- grid.columns.forEach( function (column) {
- if (column.renderContainer === 'left') {
- colWidth += column.width;
- }
- });
- colWidth = Math.floor(colWidth);
- return '.grid' + grid.id + ' .ui-grid-pinned-container-' + $scope.colContainer.name + ', .grid' + grid.id +
- ' .ui-grid-pinned-container-' + $scope.colContainer.name + ' .ui-grid-render-container-' + $scope.colContainer.name +
- ' .ui-grid-viewport .ui-grid-canvas .ui-grid-row { width: ' + colWidth + 'px; }';
- }
-
- if ($scope.colContainer.name === 'left') {
- $scope.grid.registerStyleComputation({
- priority: 15,
- func: updateRowContainerWidth
- });
- }*/
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.expandable.directive:uiGridViewport
- * @description stacks on the uiGridViewport directive to append the expandable row html elements to the
- * default gridRow template
- */
- module.directive('uiGridViewport',
- ['$compile', 'gridUtil', '$templateCache',
- function ($compile, gridUtil, $templateCache) {
- return {
- priority: -200,
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
- var expandedRowFillerElement = $templateCache.get('ui-grid/expandableScrollFiller');
- var expandedRowElement = $templateCache.get('ui-grid/expandableRow');
- rowRepeatDiv.append(expandedRowElement);
- rowRepeatDiv.append(expandedRowFillerElement);
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
-})();
-
-/* global console */
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.exporter
- * @description
- *
- * # ui.grid.exporter
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides the ability to exporter data from the grid.
- *
- * Data can be exported in a range of formats, and all data, visible
- * data, or selected rows can be exported, with all columns or visible
- * columns.
- *
- * No UI is provided, the caller should provide their own UI/buttons
- * as appropriate, or enable the gridMenu
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.exporter"></div>
- */
-
- var module = angular.module('ui.grid.exporter', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.exporter.constant:uiGridExporterConstants
- *
- * @description constants available in exporter module
- */
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.constant:uiGridExporterConstants
- * @name ALL
- * @description export all data, including data not visible. Can
- * be set for either rowTypes or colTypes
- */
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.constant:uiGridExporterConstants
- * @name VISIBLE
- * @description export only visible data, including data not visible. Can
- * be set for either rowTypes or colTypes
- */
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.constant:uiGridExporterConstants
- * @name SELECTED
- * @description export all data, including data not visible. Can
- * be set only for rowTypes, selection of only some columns is
- * not supported
- */
- module.constant('uiGridExporterConstants', {
- featureName: 'exporter',
- ALL: 'all',
- VISIBLE: 'visible',
- SELECTED: 'selected',
- CSV_CONTENT: 'CSV_CONTENT',
- BUTTON_LABEL: 'BUTTON_LABEL',
- FILE_NAME: 'FILE_NAME'
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.exporter.service:uiGridExporterService
- *
- * @description Services for exporter feature
- */
- module.service('uiGridExporterService', ['$q', 'uiGridExporterConstants', 'gridUtil', '$compile', '$interval', 'i18nService',
- function ($q, uiGridExporterConstants, gridUtil, $compile, $interval, i18nService) {
-
- var service = {
-
- delay: 100,
-
- initializeGrid: function (grid) {
-
- //add feature namespace and any properties to grid for needed state
- grid.exporter = {};
- this.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:PublicApi
- *
- * @description Public Api for exporter feature
- */
- var publicApi = {
- events: {
- exporter: {
- }
- },
- methods: {
- exporter: {
- /**
- * @ngdoc function
- * @name csvExport
- * @methodOf ui.grid.exporter.api:PublicApi
- * @description Exports rows from the grid in csv format,
- * the data exported is selected based on the provided options
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE
- */
- csvExport: function (rowTypes, colTypes) {
- service.csvExport(grid, rowTypes, colTypes);
- },
- /**
- * @ngdoc function
- * @name pdfExport
- * @methodOf ui.grid.exporter.api:PublicApi
- * @description Exports rows from the grid in pdf format,
- * the data exported is selected based on the provided options
- * Note that this function has a dependency on pdfMake, all
- * going well this has been installed for you.
- * The resulting pdf opens in a new browser window.
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE
- */
- pdfExport: function (rowTypes, colTypes) {
- service.pdfExport(grid, rowTypes, colTypes);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- if (grid.api.core.addToGridMenu){
- service.addToMenu( grid );
- } else {
- // order of registration is not guaranteed, register in a little while
- $interval( function() {
- if (grid.api.core.addToGridMenu){
- service.addToMenu( grid );
- }
- }, this.delay, 1);
- }
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:GridOptions
- *
- * @description GridOptions for exporter feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:ColumnDef
- * @description ColumnDef settings for exporter
- */
- /**
- * @ngdoc object
- * @name exporterSuppressMenu
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Don't show the export menu button, implying the user
- * will roll their own UI for calling the exporter
- * <br/>Defaults to false
- */
- gridOptions.exporterSuppressMenu = gridOptions.exporterSuppressMenu === true;
- /**
- * @ngdoc object
- * @name exporterMenuLabel
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The text to show on the exporter menu button
- * link
- * <br/>Defaults to 'Export'
- */
- gridOptions.exporterMenuLabel = gridOptions.exporterMenuLabel ? gridOptions.exporterMenuLabel : 'Export';
- /**
- * @ngdoc object
- * @name exporterSuppressColumns
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Columns that should not be exported. The selectionRowHeader is already automatically
- * suppressed, but if you had a button column or some other "system" column that shouldn't be shown in the
- * output then add it in this list. You should provide an array of column names.
- * <br/>Defaults to: []
- * <pre>
- * gridOptions.exporterSuppressColumns = [ 'buttons' ];
- * </pre>
- */
- gridOptions.exporterSuppressColumns = gridOptions.exporterSuppressColumns ? gridOptions.exporterSuppressColumns : [];
- /**
- * @ngdoc object
- * @name exporterCsvColumnSeparator
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The character to use as column separator
- * link
- * <br/>Defaults to ','
- */
- gridOptions.exporterCsvColumnSeparator = gridOptions.exporterCsvColumnSeparator ? gridOptions.exporterCsvColumnSeparator : ',';
- /**
- * @ngdoc object
- * @name exporterCsvFilename
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The default filename to use when saving the downloaded csv.
- * This will only work in some browsers.
- * <br/>Defaults to 'download.csv'
- */
- gridOptions.exporterCsvFilename = gridOptions.exporterCsvFilename ? gridOptions.exporterCsvFilename : 'download.csv';
- /**
- * @ngdoc object
- * @name exporterPdfFilename
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The default filename to use when saving the downloaded pdf, only used in IE (other browsers open pdfs in a new window)
- * <br/>Defaults to 'download.pdf'
- */
- gridOptions.exporterPdfFilename = gridOptions.exporterPdfFilename ? gridOptions.exporterPdfFilename : 'download.pdf';
- /**
- * @ngdoc object
- * @name exporterOlderExcelCompatibility
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Some versions of excel don't like the utf-16 BOM on the front, and it comes
- * through as  in the first column header. Setting this option to false will suppress this, at the
- * expense of proper utf-16 handling in applications that do recognise the BOM
- * <br/>Defaults to false
- */
- gridOptions.exporterOlderExcelCompatibility = gridOptions.exporterOlderExcelCompatibility === true;
- /**
- * @ngdoc object
- * @name exporterPdfDefaultStyle
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The default style in pdfMake format
- * <br/>Defaults to:
- * <pre>
- * {
- * fontSize: 11
- * }
- * </pre>
- */
- gridOptions.exporterPdfDefaultStyle = gridOptions.exporterPdfDefaultStyle ? gridOptions.exporterPdfDefaultStyle : { fontSize: 11 };
- /**
- * @ngdoc object
- * @name exporterPdfTableStyle
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The table style in pdfMake format
- * <br/>Defaults to:
- * <pre>
- * {
- * margin: [0, 5, 0, 15]
- * }
- * </pre>
- */
- gridOptions.exporterPdfTableStyle = gridOptions.exporterPdfTableStyle ? gridOptions.exporterPdfTableStyle : { margin: [0, 5, 0, 15] };
- /**
- * @ngdoc object
- * @name exporterPdfTableHeaderStyle
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The tableHeader style in pdfMake format
- * <br/>Defaults to:
- * <pre>
- * {
- * bold: true,
- * fontSize: 12,
- * color: 'black'
- * }
- * </pre>
- */
- gridOptions.exporterPdfTableHeaderStyle = gridOptions.exporterPdfTableHeaderStyle ? gridOptions.exporterPdfTableHeaderStyle : { bold: true, fontSize: 12, color: 'black' };
- /**
- * @ngdoc object
- * @name exporterPdfHeader
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The header section for pdf exports. Can be
- * simple text:
- * <pre>
- * gridOptions.exporterPdfHeader = 'My Header';
- * </pre>
- * Can be a more complex object in pdfMake format:
- * <pre>
- * gridOptions.exporterPdfHeader = {
- * columns: [
- * 'Left part',
- * { text: 'Right part', alignment: 'right' }
- * ]
- * };
- * </pre>
- * Or can be a function, allowing page numbers and the like
- * <pre>
- * gridOptions.exporterPdfHeader: function(currentPage, pageCount) { return currentPage.toString() + ' of ' + pageCount; };
- * </pre>
- */
- gridOptions.exporterPdfHeader = gridOptions.exporterPdfHeader ? gridOptions.exporterPdfHeader : null;
- /**
- * @ngdoc object
- * @name exporterPdfFooter
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The header section for pdf exports. Can be
- * simple text:
- * <pre>
- * gridOptions.exporterPdfFooter = 'My Footer';
- * </pre>
- * Can be a more complex object in pdfMake format:
- * <pre>
- * gridOptions.exporterPdfFooter = {
- * columns: [
- * 'Left part',
- * { text: 'Right part', alignment: 'right' }
- * ]
- * };
- * </pre>
- * Or can be a function, allowing page numbers and the like
- * <pre>
- * gridOptions.exporterPdfFooter: function(currentPage, pageCount) { return currentPage.toString() + ' of ' + pageCount; };
- * </pre>
- */
- gridOptions.exporterPdfFooter = gridOptions.exporterPdfFooter ? gridOptions.exporterPdfFooter : null;
- /**
- * @ngdoc object
- * @name exporterPdfOrientation
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The orientation, should be a valid pdfMake value,
- * 'landscape' or 'portrait'
- * <br/>Defaults to landscape
- */
- gridOptions.exporterPdfOrientation = gridOptions.exporterPdfOrientation ? gridOptions.exporterPdfOrientation : 'landscape';
- /**
- * @ngdoc object
- * @name exporterPdfPageSize
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The orientation, should be a valid pdfMake
- * paper size, usually 'A4' or 'LETTER'
- * {@link https://github.com/bpampuch/pdfmake/blob/master/src/standardPageSizes.js pdfMake page sizes}
- * <br/>Defaults to A4
- */
- gridOptions.exporterPdfPageSize = gridOptions.exporterPdfPageSize ? gridOptions.exporterPdfPageSize : 'A4';
- /**
- * @ngdoc object
- * @name exporterPdfMaxGridWidth
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description The maxium grid width - the current grid width
- * will be scaled to match this, with any fixed width columns
- * being adjusted accordingly.
- * <br/>Defaults to 720 (for A4 landscape), use 670 for LETTER
- */
- gridOptions.exporterPdfMaxGridWidth = gridOptions.exporterPdfMaxGridWidth ? gridOptions.exporterPdfMaxGridWidth : 720;
- /**
- * @ngdoc object
- * @name exporterPdfTableLayout
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A tableLayout in pdfMake format,
- * controls gridlines and the like. We use the default
- * layout usually.
- * <br/>Defaults to null, which means no layout
- */
-
- /**
- * @ngdoc object
- * @name exporterMenuAllData
- * @porpertyOf ui.grid.exporter.api:GridOptions
- * @description Add export all data as cvs/pdf menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuAllData = gridOptions.exporterMenuAllData !== undefined ? gridOptions.exporterMenuAllData : true;
-
- /**
- * @ngdoc object
- * @name exporterMenuCsv
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Add csv export menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuCsv = gridOptions.exporterMenuCsv !== undefined ? gridOptions.exporterMenuCsv : true;
-
- /**
- * @ngdoc object
- * @name exporterMenuPdf
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Add pdf export menu items to the ui-grid grid menu, if it's present. Defaults to true.
- */
- gridOptions.exporterMenuPdf = gridOptions.exporterMenuPdf !== undefined ? gridOptions.exporterMenuPdf : true;
-
- /**
- * @ngdoc object
- * @name exporterPdfCustomFormatter
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A custom callback routine that changes the pdf document, adding any
- * custom styling or content that is supported by pdfMake. Takes in the complete docDefinition, and
- * must return an updated docDefinition ready for pdfMake.
- * @example
- * In this example we add a style to the style array, so that we can use it in our
- * footer definition.
- * <pre>
- * gridOptions.exporterPdfCustomFormatter = function ( docDefinition ) {
- * docDefinition.styles.footerStyle = { bold: true, fontSize: 10 };
- * return docDefinition;
- * }
- *
- * gridOptions.exporterPdfFooter = { text: 'My footer', style: 'footerStyle' }
- * </pre>
- */
- gridOptions.exporterPdfCustomFormatter = ( gridOptions.exporterPdfCustomFormatter && typeof( gridOptions.exporterPdfCustomFormatter ) === 'function' ) ? gridOptions.exporterPdfCustomFormatter : function ( docDef ) { return docDef; };
-
- /**
- * @ngdoc object
- * @name exporterHeaderFilterUseName
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description Defaults to false, which leads to `displayName` being passed into the headerFilter.
- * If set to true, then will pass `name` instead.
- *
- *
- * @example
- * <pre>
- * gridOptions.exporterHeaderFilterUseName = true;
- * </pre>
- */
- gridOptions.exporterHeaderFilterUseName = gridOptions.exporterHeaderFilterUseName === true;
-
- /**
- * @ngdoc object
- * @name exporterHeaderFilter
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A function to apply to the header displayNames before exporting. Useful for internationalisation,
- * for example if you were using angular-translate you'd set this to `$translate.instant`. Note that this
- * call must be synchronous, it cannot be a call that returns a promise.
- *
- * Behaviour can be changed to pass in `name` instead of `displayName` through use of `exporterHeaderFilterUseName: true`.
- *
- * @example
- * <pre>
- * gridOptions.exporterHeaderFilter = function( displayName ){ return 'col: ' + name; };
- * </pre>
- * OR
- * <pre>
- * gridOptions.exporterHeaderFilter = $translate.instant;
- * </pre>
- */
-
- /**
- * @ngdoc function
- * @name exporterFieldCallback
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description A function to call for each field before exporting it. Allows
- * massaging of raw data into a display format, for example if you have applied
- * filters to convert codes into decodes, or you require
- * a specific date format in the exported content.
- *
- * The method is called once for each field exported, and provides the grid, the
- * gridCol and the GridRow for you to use as context in massaging the data.
- *
- * @param {Grid} grid provides the grid in case you have need of it
- * @param {GridRow} row the row from which the data comes
- * @param {GridCol} col the column from which the data comes
- * @param {object} value the value for your massaging
- * @returns {object} you must return the massaged value ready for exporting
- *
- * @example
- * <pre>
- * gridOptions.exporterFieldCallback = function ( grid, row, col, value ){
- * if ( col.name === 'status' ){
- * value = decodeStatus( value );
- * }
- * return value;
- * }
- * </pre>
- */
- gridOptions.exporterFieldCallback = gridOptions.exporterFieldCallback ? gridOptions.exporterFieldCallback : function( grid, row, col, value ) { return value; };
-
- /**
- * @ngdoc function
- * @name exporterAllDataFn
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description This promise is needed when exporting all rows,
- * and the data need to be provided by server side. Default is null.
- * @returns {Promise} a promise to load all data from server
- *
- * @example
- * <pre>
- * gridOptions.exporterAllDataFn = function () {
- * return $http.get('/data/100.json')
- * }
- * </pre>
- */
- gridOptions.exporterAllDataFn = gridOptions.exporterAllDataFn ? gridOptions.exporterAllDataFn : null;
-
- /**
- * @ngdoc function
- * @name exporterAllDataPromise
- * @propertyOf ui.grid.exporter.api:GridOptions
- * @description DEPRECATED - exporterAllDataFn used to be
- * called this, but it wasn't a promise, it was a function that returned
- * a promise. Deprecated, but supported for backward compatibility, use
- * exporterAllDataFn instead.
- * @returns {Promise} a promise to load all data from server
- *
- * @example
- * <pre>
- * gridOptions.exporterAllDataFn = function () {
- * return $http.get('/data/100.json')
- * }
- * </pre>
- */
- if ( gridOptions.exporterAllDataFn == null && gridOptions.exporterAllDataPromise ) {
- gridOptions.exporterAllDataFn = gridOptions.exporterAllDataPromise;
- }
- },
-
-
- /**
- * @ngdoc function
- * @name addToMenu
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Adds export items to the grid menu,
- * allowing the user to select export options
- * @param {Grid} grid the grid from which data should be exported
- */
- addToMenu: function ( grid ) {
- grid.api.core.addToGridMenu( grid, [
- {
- title: i18nService.getSafeText('gridMenu.exporterAllAsCsv'),
- action: function ($event) {
- this.grid.api.exporter.csvExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
- },
- shown: function() {
- return this.grid.options.exporterMenuCsv && this.grid.options.exporterMenuAllData;
- },
- order: 200
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterVisibleAsCsv'),
- action: function ($event) {
- this.grid.api.exporter.csvExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuCsv;
- },
- order: 201
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterSelectedAsCsv'),
- action: function ($event) {
- this.grid.api.exporter.csvExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuCsv &&
- ( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
- },
- order: 202
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterAllAsPdf'),
- action: function ($event) {
- this.grid.api.exporter.pdfExport( uiGridExporterConstants.ALL, uiGridExporterConstants.ALL );
- },
- shown: function() {
- return this.grid.options.exporterMenuPdf && this.grid.options.exporterMenuAllData;
- },
- order: 203
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterVisibleAsPdf'),
- action: function ($event) {
- this.grid.api.exporter.pdfExport( uiGridExporterConstants.VISIBLE, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuPdf;
- },
- order: 204
- },
- {
- title: i18nService.getSafeText('gridMenu.exporterSelectedAsPdf'),
- action: function ($event) {
- this.grid.api.exporter.pdfExport( uiGridExporterConstants.SELECTED, uiGridExporterConstants.VISIBLE );
- },
- shown: function() {
- return this.grid.options.exporterMenuPdf &&
- ( this.grid.api.selection && this.grid.api.selection.getSelectedRows().length > 0 );
- },
- order: 205
- }
- ]);
- },
-
-
- /**
- * @ngdoc function
- * @name csvExport
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Exports rows from the grid in csv format,
- * the data exported is selected based on the provided options
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- csvExport: function (grid, rowTypes, colTypes) {
- var self = this;
- this.loadAllDataIfNeeded(grid, rowTypes, colTypes).then(function() {
- var exportColumnHeaders = grid.options.showHeader ? self.getColumnHeaders(grid, colTypes) : [];
- var exportData = self.getData(grid, rowTypes, colTypes);
- var csvContent = self.formatAsCsv(exportColumnHeaders, exportData, grid.options.exporterCsvColumnSeparator);
-
- self.downloadFile (grid.options.exporterCsvFilename, csvContent, grid.options.exporterOlderExcelCompatibility);
- });
- },
-
- /**
- * @ngdoc function
- * @name loadAllDataIfNeeded
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description When using server side pagination, use exporterAllDataFn to
- * load all data before continuing processing.
- * When using client side pagination, return a resolved promise so processing
- * continues immediately
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- loadAllDataIfNeeded: function (grid, rowTypes, colTypes) {
- if ( rowTypes === uiGridExporterConstants.ALL && grid.rows.length !== grid.options.totalItems && grid.options.exporterAllDataFn) {
- return grid.options.exporterAllDataFn()
- .then(function() {
- grid.modifyRows(grid.options.data);
- });
- } else {
- var deferred = $q.defer();
- deferred.resolve();
- return deferred.promise;
- }
- },
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.api:ColumnDef
- * @name exporterSuppressExport
- * @description Suppresses export for this column. Used by selection and expandable.
- */
-
- /**
- * @ngdoc function
- * @name getColumnHeaders
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Gets the column headers from the grid to use
- * as a title row for the exported file, all headers have
- * headerCellFilters applied as appropriate.
- *
- * Column headers are an array of objects, each object has
- * name, displayName, width and align attributes. Only name is
- * used for csv, all attributes are used for pdf.
- *
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- getColumnHeaders: function (grid, colTypes) {
- var headers = [];
- var columns;
-
- if ( colTypes === uiGridExporterConstants.ALL ){
- columns = grid.columns;
- } else {
- var leftColumns = grid.renderContainers.left ? grid.renderContainers.left.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var bodyColumns = grid.renderContainers.body ? grid.renderContainers.body.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var rightColumns = grid.renderContainers.right ? grid.renderContainers.right.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
-
- columns = leftColumns.concat(bodyColumns,rightColumns);
- }
-
- columns.forEach( function( gridCol, index ) {
- if ( gridCol.colDef.exporterSuppressExport !== true &&
- grid.options.exporterSuppressColumns.indexOf( gridCol.name ) === -1 ){
- headers.push({
- name: gridCol.field,
- displayName: grid.options.exporterHeaderFilter ? ( grid.options.exporterHeaderFilterUseName ? grid.options.exporterHeaderFilter(gridCol.name) : grid.options.exporterHeaderFilter(gridCol.displayName) ) : gridCol.displayName,
- width: gridCol.drawnWidth ? gridCol.drawnWidth : gridCol.width,
- align: gridCol.colDef.type === 'number' ? 'right' : 'left'
- });
- }
- });
-
- return headers;
- },
-
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.exporter.api:ColumnDef
- * @name exporterPdfAlign
- * @description the alignment you'd like for this specific column when
- * exported into a pdf. Can be 'left', 'right', 'center' or any other
- * valid pdfMake alignment option.
- */
-
-
- /**
- * @ngdoc object
- * @name ui.grid.exporter.api:GridRow
- * @description GridRow settings for exporter
- */
- /**
- * @ngdoc object
- * @name exporterEnableExporting
- * @propertyOf ui.grid.exporter.api:GridRow
- * @description If set to false, then don't export this row, notwithstanding visible or
- * other settings
- * <br/>Defaults to true
- */
-
- /**
- * @ngdoc function
- * @name getData
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Gets data from the grid based on the provided options,
- * all cells have cellFilters applied as appropriate. Any rows marked
- * `exporterEnableExporting: false` will not be exported
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- getData: function (grid, rowTypes, colTypes) {
- var data = [];
- var rows;
- var columns;
-
- switch ( rowTypes ) {
- case uiGridExporterConstants.ALL:
- rows = grid.rows;
- break;
- case uiGridExporterConstants.VISIBLE:
- rows = grid.getVisibleRows();
- break;
- case uiGridExporterConstants.SELECTED:
- if ( grid.api.selection ){
- rows = grid.api.selection.getSelectedGridRows();
- } else {
- gridUtil.logError('selection feature must be enabled to allow selected rows to be exported');
- }
- break;
- }
-
- if ( colTypes === uiGridExporterConstants.ALL ){
- columns = grid.columns;
- } else {
- var leftColumns = grid.renderContainers.left ? grid.renderContainers.left.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var bodyColumns = grid.renderContainers.body ? grid.renderContainers.body.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
- var rightColumns = grid.renderContainers.right ? grid.renderContainers.right.visibleColumnCache.filter( function( column ){ return column.visible; } ) : [];
-
- columns = leftColumns.concat(bodyColumns,rightColumns);
- }
-
- rows.forEach( function( row, index ) {
-
- if (row.exporterEnableExporting !== false) {
- var extractedRow = [];
-
-
- columns.forEach( function( gridCol, index ) {
- if ( (gridCol.visible || colTypes === uiGridExporterConstants.ALL ) &&
- gridCol.colDef.exporterSuppressExport !== true &&
- grid.options.exporterSuppressColumns.indexOf( gridCol.name ) === -1 ){
- var extractedField = { value: grid.options.exporterFieldCallback( grid, row, gridCol, grid.getCellValue( row, gridCol ) ) };
- if ( gridCol.colDef.exporterPdfAlign ) {
- extractedField.alignment = gridCol.colDef.exporterPdfAlign;
- }
- extractedRow.push(extractedField);
- }
- });
-
- data.push(extractedRow);
- }
- });
-
- return data;
- },
-
-
- /**
- * @ngdoc function
- * @name formatAsCSV
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Formats the column headers and data as a CSV,
- * and sends that data to the user
- * @param {array} exportColumnHeaders an array of column headers,
- * where each header is an object with name, width and maybe alignment
- * @param {array} exportData an array of rows, where each row is
- * an array of column data
- * @returns {string} csv the formatted csv as a string
- */
- formatAsCsv: function (exportColumnHeaders, exportData, separator) {
- var self = this;
-
- var bareHeaders = exportColumnHeaders.map(function(header){return { value: header.displayName };});
-
- var csv = bareHeaders.length > 0 ? (self.formatRowAsCsv(this, separator)(bareHeaders) + '\n') : '';
-
- csv += exportData.map(this.formatRowAsCsv(this, separator)).join('\n');
-
- return csv;
- },
-
- /**
- * @ngdoc function
- * @name formatRowAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a single field as a csv field, including
- * quotes around the value
- * @param {exporterService} exporter pass in exporter
- * @param {array} row the row to be turned into a csv string
- * @returns {string} a csv-ified version of the row
- */
- formatRowAsCsv: function (exporter, separator) {
- return function (row) {
- return row.map(exporter.formatFieldAsCsv).join(separator);
- };
- },
-
- /**
- * @ngdoc function
- * @name formatFieldAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a single field as a csv field, including
- * quotes around the value
- * @param {field} field the field to be turned into a csv string,
- * may be of any type
- * @returns {string} a csv-ified version of the field
- */
- formatFieldAsCsv: function (field) {
- if (field.value == null) { // we want to catch anything null-ish, hence just == not ===
- return '';
- }
- if (typeof(field.value) === 'number') {
- return field.value;
- }
- if (typeof(field.value) === 'boolean') {
- return (field.value ? 'TRUE' : 'FALSE') ;
- }
- if (typeof(field.value) === 'string') {
- return '"' + field.value.replace(/"/g,'""') + '"';
- }
-
- return JSON.stringify(field.value);
- },
-
-
- /**
- * @ngdoc function
- * @name isIE
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Checks whether current browser is IE and returns it's version if it is
- */
- isIE: function () {
- var match = navigator.userAgent.match(/(?:MSIE |Trident\/.*; rv:)(\d+)/);
- return match ? parseInt(match[1]) : false;
- },
-
-
- /**
- * @ngdoc function
- * @name downloadFile
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Triggers download of a csv file. Logic provided
- * by @cssensei (from his colleagues at https://github.com/ifeelgoods) in issue #2391
- * @param {string} fileName the filename we'd like our file to be
- * given
- * @param {string} csvContent the csv content that we'd like to
- * download as a file
- * @param {boolean} exporterOlderExcelCompatibility whether or not we put a utf-16 BOM on the from (\uFEFF)
- */
- downloadFile: function (fileName, csvContent, exporterOlderExcelCompatibility) {
- var D = document;
- var a = D.createElement('a');
- var strMimeType = 'application/octet-stream;charset=utf-8';
- var rawFile;
- var ieVersion;
-
- ieVersion = this.isIE();
- if (ieVersion && ieVersion < 10) {
- var frame = D.createElement('iframe');
- document.body.appendChild(frame);
-
- frame.contentWindow.document.open("text/html", "replace");
- frame.contentWindow.document.write('sep=,\r\n' + csvContent);
- frame.contentWindow.document.close();
- frame.contentWindow.focus();
- frame.contentWindow.document.execCommand('SaveAs', true, fileName);
-
- document.body.removeChild(frame);
- return true;
- }
-
- // IE10+
- if (navigator.msSaveBlob) {
- return navigator.msSaveOrOpenBlob(
- new Blob(
- [exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent],
- { type: strMimeType } ),
- fileName
- );
- }
-
- //html5 A[download]
- if ('download' in a) {
- var blob = new Blob(
- [exporterOlderExcelCompatibility ? "\uFEFF" : '', csvContent],
- { type: strMimeType }
- );
- rawFile = URL.createObjectURL(blob);
- a.setAttribute('download', fileName);
- } else {
- rawFile = 'data:' + strMimeType + ',' + encodeURIComponent(csvContent);
- a.setAttribute('target', '_blank');
- }
-
- a.href = rawFile;
- a.setAttribute('style', 'display:none;');
- D.body.appendChild(a);
- setTimeout(function() {
- if (a.click) {
- a.click();
- // Workaround for Safari 5
- } else if (document.createEvent) {
- var eventObj = document.createEvent('MouseEvents');
- eventObj.initEvent('click', true, true);
- a.dispatchEvent(eventObj);
- }
- D.body.removeChild(a);
-
- }, this.delay);
- },
-
- /**
- * @ngdoc function
- * @name pdfExport
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Exports rows from the grid in pdf format,
- * the data exported is selected based on the provided options.
- * Note that this function has a dependency on pdfMake, which must
- * be installed. The resulting pdf opens in a new
- * browser window.
- * @param {Grid} grid the grid from which data should be exported
- * @param {string} rowTypes which rows to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- * @param {string} colTypes which columns to export, valid values are
- * uiGridExporterConstants.ALL, uiGridExporterConstants.VISIBLE,
- * uiGridExporterConstants.SELECTED
- */
- pdfExport: function (grid, rowTypes, colTypes) {
- var self = this;
- this.loadAllDataIfNeeded(grid, rowTypes, colTypes).then(function () {
- var exportColumnHeaders = self.getColumnHeaders(grid, colTypes);
- var exportData = self.getData(grid, rowTypes, colTypes);
- var docDefinition = self.prepareAsPdf(grid, exportColumnHeaders, exportData);
-
- if (self.isIE()) {
- self.downloadPDF(grid.options.exporterPdfFilename, docDefinition);
- } else {
- pdfMake.createPdf(docDefinition).open();
- }
- });
- },
-
-
- /**
- * @ngdoc function
- * @name downloadPdf
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Generates and retrieves the pdf as a blob, then downloads
- * it as a file. Only used in IE, in all other browsers we use the native
- * pdfMake.open function to just open the PDF
- * @param {string} fileName the filename to give to the pdf, can be set
- * through exporterPdfFilename
- * @param {object} docDefinition a pdf docDefinition that we can generate
- * and get a blob from
- */
- downloadPDF: function (fileName, docDefinition) {
- var D = document;
- var a = D.createElement('a');
- var strMimeType = 'application/octet-stream;charset=utf-8';
- var rawFile;
- var ieVersion;
-
- ieVersion = this.isIE();
- var doc = pdfMake.createPdf(docDefinition);
- var blob;
-
- doc.getBuffer( function (buffer) {
- blob = new Blob([buffer]);
-
- if (ieVersion && ieVersion < 10) {
- var frame = D.createElement('iframe');
- document.body.appendChild(frame);
-
- frame.contentWindow.document.open("text/html", "replace");
- frame.contentWindow.document.write(blob);
- frame.contentWindow.document.close();
- frame.contentWindow.focus();
- frame.contentWindow.document.execCommand('SaveAs', true, fileName);
-
- document.body.removeChild(frame);
- return true;
- }
-
- // IE10+
- if (navigator.msSaveBlob) {
- return navigator.msSaveBlob(
- blob, fileName
- );
- }
- });
- },
-
-
- /**
- * @ngdoc function
- * @name renderAsPdf
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders the data into a pdf, and opens that pdf.
- *
- * @param {Grid} grid the grid from which data should be exported
- * @param {array} exportColumnHeaders an array of column headers,
- * where each header is an object with name, width and maybe alignment
- * @param {array} exportData an array of rows, where each row is
- * an array of column data
- * @returns {object} a pdfMake format document definition, ready
- * for generation
- */
- prepareAsPdf: function(grid, exportColumnHeaders, exportData) {
- var headerWidths = this.calculatePdfHeaderWidths( grid, exportColumnHeaders );
-
- var headerColumns = exportColumnHeaders.map( function( header ) {
- return { text: header.displayName, style: 'tableHeader' };
- });
-
- var stringData = exportData.map(this.formatRowAsPdf(this));
-
- var allData = [headerColumns].concat(stringData);
-
- var docDefinition = {
- pageOrientation: grid.options.exporterPdfOrientation,
- pageSize: grid.options.exporterPdfPageSize,
- content: [{
- style: 'tableStyle',
- table: {
- headerRows: 1,
- widths: headerWidths,
- body: allData
- }
- }],
- styles: {
- tableStyle: grid.options.exporterPdfTableStyle,
- tableHeader: grid.options.exporterPdfTableHeaderStyle
- },
- defaultStyle: grid.options.exporterPdfDefaultStyle
- };
-
- if ( grid.options.exporterPdfLayout ){
- docDefinition.layout = grid.options.exporterPdfLayout;
- }
-
- if ( grid.options.exporterPdfHeader ){
- docDefinition.header = grid.options.exporterPdfHeader;
- }
-
- if ( grid.options.exporterPdfFooter ){
- docDefinition.footer = grid.options.exporterPdfFooter;
- }
-
- if ( grid.options.exporterPdfCustomFormatter ){
- docDefinition = grid.options.exporterPdfCustomFormatter( docDefinition );
- }
- return docDefinition;
-
- },
-
-
- /**
- * @ngdoc function
- * @name calculatePdfHeaderWidths
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Determines the column widths base on the
- * widths we got from the grid. If the column is drawn
- * then we have a drawnWidth. If the column is not visible
- * then we have '*', 'x%' or a width. When columns are
- * not visible they don't contribute to the overall gridWidth,
- * so we need to adjust to allow for extra columns
- *
- * Our basic heuristic is to take the current gridWidth, plus
- * numeric columns and call this the base gridwidth.
- *
- * To that we add 100 for any '*' column, and x% of the base gridWidth
- * for any column that is a %
- *
- * @param {Grid} grid the grid from which data should be exported
- * @param {array} exportHeaders array of header information
- * @returns {object} an array of header widths
- */
- calculatePdfHeaderWidths: function ( grid, exportHeaders ) {
- var baseGridWidth = 0;
- exportHeaders.forEach( function(value){
- if (typeof(value.width) === 'number'){
- baseGridWidth += value.width;
- }
- });
-
- var extraColumns = 0;
- exportHeaders.forEach( function(value){
- if (value.width === '*'){
- extraColumns += 100;
- }
- if (typeof(value.width) === 'string' && value.width.match(/(\d)*%/)) {
- var percent = parseInt(value.width.match(/(\d)*%/)[0]);
-
- value.width = baseGridWidth * percent / 100;
- extraColumns += value.width;
- }
- });
-
- var gridWidth = baseGridWidth + extraColumns;
-
- return exportHeaders.map(function( header ) {
- return header.width === '*' ? header.width : header.width * grid.options.exporterPdfMaxGridWidth / gridWidth;
- });
-
- },
-
- /**
- * @ngdoc function
- * @name formatRowAsPdf
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a row in a format consumable by PDF,
- * mainly meaning casting everything to a string
- * @param {exporterService} exporter pass in exporter
- * @param {array} row the row to be turned into a csv string
- * @returns {string} a csv-ified version of the row
- */
- formatRowAsPdf: function ( exporter ) {
- return function( row ) {
- return row.map(exporter.formatFieldAsPdfString);
- };
- },
-
-
- /**
- * @ngdoc function
- * @name formatFieldAsCsv
- * @methodOf ui.grid.exporter.service:uiGridExporterService
- * @description Renders a single field as a pdf-able field, which
- * is different from a csv field only in that strings don't have quotes
- * around them
- * @param {field} field the field to be turned into a pdf string,
- * may be of any type
- * @returns {string} a string-ified version of the field
- */
- formatFieldAsPdfString: function (field) {
- var returnVal;
- if (field.value == null) { // we want to catch anything null-ish, hence just == not ===
- returnVal = '';
- } else if (typeof(field.value) === 'number') {
- returnVal = field.value.toString();
- } else if (typeof(field.value) === 'boolean') {
- returnVal = (field.value ? 'TRUE' : 'FALSE') ;
- } else if (typeof(field.value) === 'string') {
- returnVal = field.value.replace(/"/g,'""');
- } else {
- returnVal = JSON.stringify(field.value).replace(/^"/,'').replace(/"$/,'');
- }
-
- if (field.alignment && typeof(field.alignment) === 'string' ){
- returnVal = { text: returnVal, alignment: field.alignment };
- }
-
- return returnVal;
- }
- };
-
- return service;
-
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.exporter.directive:uiGridExporter
- * @element div
- * @restrict A
- *
- * @description Adds exporter features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.exporter']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.gridOptions = {
- enableGridMenu: true,
- exporterMenuCsv: false,
- columnDefs: [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ],
- data: $scope.data
- };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-exporter></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridExporter', ['uiGridExporterConstants', 'uiGridExporterService', 'gridUtil', '$compile',
- function (uiGridExporterConstants, uiGridExporterService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridExporterService.initializeGrid(uiGridCtrl.grid);
- uiGridCtrl.grid.exporter.$scope = $scope;
- }
- };
- }
- ]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.grouping
- * @description
- *
- * # ui.grid.grouping
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides grouping of rows based on the data in them, similar
- * in concept to excel grouping. You can group multiple columns, resulting in
- * nested grouping.
- *
- * In concept this feature is similar to sorting + grid footer/aggregation, it
- * sorts the data based on the grouped columns, then creates group rows that
- * reflect a break in the data. Each of those group rows can have aggregations for
- * the data within that group.
- *
- * This feature leverages treeBase to provide the tree functionality itself,
- * the key thing this feature does therefore is to set treeLevels on the rows
- * and insert the group headers.
- *
- * Design information:
- * -------------------
- *
- * Each column will get new menu items - group by, and aggregate by. Group by
- * will cause this column to be sorted (if not already), and will move this column
- * to the front of the sorted columns (i.e. grouped columns take precedence over
- * sorted columns). It will respect the sort order already set if there is one,
- * and it will allow the sorting logic to change that sort order, it just forces
- * the column to the front of the sorting. You can group by multiple columns, the
- * logic will add this column to the sorting after any already grouped columns.
- *
- * Once a grouping is defined, grouping logic is added to the rowsProcessors. This
- * will process the rows, identifying a break in the data value, and inserting a grouping row.
- * Grouping rows have specific attributes on them:
- *
- * - internalRow = true: tells us that this isn't a real row, so we can ignore it
- * from any processing that it looking at core data rows. This is used by the core
- * logic (or will be one day), as it's not grouping specific
- * - groupHeader = true: tells us this is a groupHeader. This is used by the grouping logic
- * to know if this is a groupHeader row or not
- *
- * Since the logic is baked into the rowsProcessors, it should get triggered whenever
- * row order or filtering or anything like that is changed. In order to avoid the row instantiation
- * time, and to preserve state across invocations, we hold a cache of the rows that we created
- * last time, and we use them again this time if we can.
- *
- * By default rows are collapsed, which means all data rows have their visible property
- * set to false, and only level 0 group rows are set to visible.
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.grouping"></div>
- */
-
- var module = angular.module('ui.grid.grouping', ['ui.grid', 'ui.grid.treeBase']);
-
- /**
- * @ngdoc object
- * @name ui.grid.grouping.constant:uiGridGroupingConstants
- *
- * @description constants available in grouping module, this includes
- * all the constants declared in the treeBase module (these are manually copied
- * as there isn't an easy way to include constants in another constants file, and
- * we don't want to make users include treeBase)
- *
- */
- module.constant('uiGridGroupingConstants', {
- featureName: "grouping",
- rowHeaderColName: 'treeBaseRowHeaderCol',
- EXPANDED: 'expanded',
- COLLAPSED: 'collapsed',
- aggregation: {
- COUNT: 'count',
- SUM: 'sum',
- MAX: 'max',
- MIN: 'min',
- AVG: 'avg'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.grouping.service:uiGridGroupingService
- *
- * @description Services for grouping features
- */
- module.service('uiGridGroupingService', ['$q', 'uiGridGroupingConstants', 'gridUtil', 'rowSorter', 'GridRow', 'gridClassFactory', 'i18nService', 'uiGridConstants', 'uiGridTreeBaseService',
- function ($q, uiGridGroupingConstants, gridUtil, rowSorter, GridRow, gridClassFactory, i18nService, uiGridConstants, uiGridTreeBaseService) {
-
- var service = {
-
- initializeGrid: function (grid, $scope) {
- uiGridTreeBaseService.initializeGrid( grid, $scope );
-
- //add feature namespace and any properties to grid for needed
- /**
- * @ngdoc object
- * @name ui.grid.grouping.grid:grouping
- *
- * @description Grid properties and functions added for grouping
- */
- grid.grouping = {};
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.grouping.grid:grouping
- * @name groupHeaderCache
- *
- * @description Cache that holds the group header rows we created last time, we'll
- * reuse these next time, not least because they hold our expanded states.
- *
- * We need to take care with these that they don't become a memory leak, we
- * create a new cache each time using the values from the old cache. This works
- * so long as we're creating group rows for invisible rows as well.
- *
- * The cache is a nested hash, indexed on the value we grouped by. So if we
- * grouped by gender then age, we'd maybe have something like:
- * ```
- * {
- * male: {
- * row: <pointer to the old row>,
- * children: {
- * 22: { row: <pointer to the old row> },
- * 31: { row: <pointer to the old row> }
- * },
- * female: {
- * row: <pointer to the old row>,
- * children: {
- * 28: { row: <pointer to the old row> },
- * 55: { row: <pointer to the old row> }
- * }
- * }
- * ```
- *
- * We create new rows for any missing rows, this means that they come in as collapsed.
- *
- */
- grid.grouping.groupHeaderCache = {};
-
- service.defaultGridOptions(grid.options);
-
- grid.registerRowsProcessor(service.groupRows, 400);
-
- grid.registerColumnBuilder( service.groupingColumnBuilder);
-
- grid.registerColumnsProcessor(service.groupingColumnProcessor, 400);
-
- /**
- * @ngdoc object
- * @name ui.grid.grouping.api:PublicApi
- *
- * @description Public Api for grouping feature
- */
- var publicApi = {
- events: {
- grouping: {
- /**
- * @ngdoc event
- * @eventOf ui.grid.grouping.api:PublicApi
- * @name aggregationChanged
- * @description raised whenever aggregation is changed, added or removed from a column
- *
- * <pre>
- * gridApi.grouping.on.aggregationChanged(scope,function(col){})
- * </pre>
- * @param {gridCol} col the column which on which aggregation changed. The aggregation
- * type is available as `col.treeAggregation.type`
- */
- aggregationChanged: {},
- /**
- * @ngdoc event
- * @eventOf ui.grid.grouping.api:PublicApi
- * @name groupingChanged
- * @description raised whenever the grouped columns changes
- *
- * <pre>
- * gridApi.grouping.on.groupingChanged(scope,function(col){})
- * </pre>
- * @param {gridCol} col the column which on which grouping changed. The new grouping is
- * available as `col.grouping`
- */
- groupingChanged: {}
- }
- },
- methods: {
- grouping: {
- /**
- * @ngdoc function
- * @name getGrouping
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Get the grouping configuration for this grid,
- * used by the saveState feature. Adds expandedState to the information
- * provided by the internal getGrouping, and removes any aggregations that have a source
- * of grouping (i.e. will be automatically reapplied when we regroup the column)
- * Returned grouping is an object
- * `{ grouping: groupArray, treeAggregations: aggregateArray, expandedState: hash }`
- * where grouping contains an array of objects:
- * `{ field: column.field, colName: column.name, groupPriority: column.grouping.groupPriority }`
- * and aggregations contains an array of objects:
- * `{ field: column.field, colName: column.name, aggregation: column.grouping.aggregation }`
- * and expandedState is a hash of the currently expanded nodes
- *
- * The groupArray will be sorted by groupPriority.
- *
- * @param {boolean} getExpanded whether or not to return the expanded state
- * @returns {object} grouping configuration
- */
- getGrouping: function ( getExpanded ) {
- var grouping = service.getGrouping(grid);
-
- grouping.grouping.forEach( function( group ) {
- group.colName = group.col.name;
- delete group.col;
- });
-
- grouping.aggregations.forEach( function( aggregation ) {
- aggregation.colName = aggregation.col.name;
- delete aggregation.col;
- });
-
- grouping.aggregations = grouping.aggregations.filter( function( aggregation ){
- return !aggregation.aggregation.source || aggregation.aggregation.source !== 'grouping';
- });
-
- if ( getExpanded ){
- grouping.rowExpandedStates = service.getRowExpandedStates( grid.grouping.groupingHeaderCache );
- }
-
- return grouping;
- },
-
- /**
- * @ngdoc function
- * @name setGrouping
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Set the grouping configuration for this grid,
- * used by the saveState feature, but can also be used by any
- * user to specify a combined grouping and aggregation configuration
- * @param {object} config the config you want to apply, in the format
- * provided out by getGrouping
- */
- setGrouping: function ( config ) {
- service.setGrouping(grid, config);
- },
-
- /**
- * @ngdoc function
- * @name groupColumn
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Adds this column to the existing grouping, at the end of the priority order.
- * If the column doesn't have a sort, adds one, by default ASC
- *
- * This column will move to the left of any non-group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {string} columnName the name of the column we want to group
- */
- groupColumn: function( columnName ) {
- var column = grid.getColumn(columnName);
- service.groupColumn(grid, column);
- },
-
- /**
- * @ngdoc function
- * @name ungroupColumn
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Removes the groupPriority from this column. If the
- * column was previously aggregated the aggregation will come back.
- * The sort will remain.
- *
- * This column will move to the right of any other group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {string} columnName the name of the column we want to ungroup
- */
- ungroupColumn: function( columnName ) {
- var column = grid.getColumn(columnName);
- service.ungroupColumn(grid, column);
- },
-
- /**
- * @ngdoc function
- * @name clearGrouping
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Clear any grouped columns and any aggregations. Doesn't remove sorting,
- * as we don't know whether that sorting was added by grouping or was there beforehand
- *
- */
- clearGrouping: function() {
- service.clearGrouping(grid);
- },
-
- /**
- * @ngdoc function
- * @name aggregateColumn
- * @methodOf ui.grid.grouping.api:PublicApi
- * @description Sets the aggregation type on a column, if the
- * column is currently grouped then it removes the grouping first.
- * If the aggregationDef is null then will result in the aggregation
- * being removed
- *
- * @param {string} columnName the column we want to aggregate
- * @param {string} or {function} aggregationDef one of the recognised types
- * from uiGridGroupingConstants or a custom aggregation function.
- * @param {string} aggregationLabel (optional) The label to use for this aggregation.
- */
- aggregateColumn: function( columnName, aggregationDef, aggregationLabel){
- var column = grid.getColumn(columnName);
- service.aggregateColumn( grid, column, aggregationDef, aggregationLabel);
- }
-
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- grid.api.core.on.sortChanged( $scope, service.tidyPriorities);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.grouping.api:GridOptions
- *
- * @description GridOptions for grouping feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableGrouping
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description Enable row grouping for entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enableGrouping = gridOptions.enableGrouping !== false;
-
- /**
- * @ngdoc object
- * @name groupingShowCounts
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description shows counts on the groupHeader rows. Not that if you are using a cellFilter or a
- * sortingAlgorithm which relies on a specific format or data type, showing counts may cause that
- * to break, since the group header rows will always be a string with groupingShowCounts enabled.
- * <br/>Defaults to true except on columns of type 'date'
- */
- gridOptions.groupingShowCounts = gridOptions.groupingShowCounts !== false;
-
- /**
- * @ngdoc object
- * @name groupingNullLabel
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description The string to use for the grouping header row label on rows which contain a null or undefined value in the grouped column.
- * <br/>Defaults to "Null"
- */
- gridOptions.groupingNullLabel = typeof(gridOptions.groupingNullLabel) === 'undefined' ? 'Null' : gridOptions.groupingNullLabel;
-
- /**
- * @ngdoc object
- * @name enableGroupHeaderSelection
- * @propertyOf ui.grid.grouping.api:GridOptions
- * @description Allows group header rows to be selected.
- * <br/>Defaults to false
- */
- gridOptions.enableGroupHeaderSelection = gridOptions.enableGroupHeaderSelection === true;
- },
-
-
- /**
- * @ngdoc function
- * @name groupingColumnBuilder
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Sets the grouping defaults based on the columnDefs
- *
- * @param {object} colDef columnDef we're basing on
- * @param {GridCol} col the column we're to update
- * @param {object} gridOptions the options we should use
- * @returns {promise} promise for the builder - actually we do it all inline so it's immediately resolved
- */
- groupingColumnBuilder: function (colDef, col, gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.grouping.api:ColumnDef
- *
- * @description ColumnDef for grouping feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enableGrouping
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Enable grouping on this column
- * <br/>Defaults to true.
- */
- if (colDef.enableGrouping === false){
- return;
- }
-
- /**
- * @ngdoc object
- * @name grouping
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Set the grouping for a column. Format is:
- * ```
- * {
- * groupPriority: <number, starts at 0, if less than 0 or undefined then we're aggregating in this column>
- * }
- * ```
- *
- * **Note that aggregation used to be included in grouping, but is now separately set on the column via treeAggregation
- * setting in treeBase**
- *
- * We group in the priority order given, this will also put these columns to the high order of the sort irrespective
- * of the sort priority given them. If there is no sort defined then we sort ascending, if there is a sort defined then
- * we use that sort.
- *
- * If the groupPriority is undefined or less than 0, then we expect to be aggregating, and we look at the
- * aggregation types to determine what sort of aggregation we can do. Values are in the constants file, but
- * include SUM, COUNT, MAX, MIN
- *
- * groupPriorities should generally be sequential, if they're not then the next time getGrouping is called
- * we'll renumber them to be sequential.
- * <br/>Defaults to undefined.
- */
-
- if ( typeof(col.grouping) === 'undefined' && typeof(colDef.grouping) !== 'undefined') {
- col.grouping = angular.copy(colDef.grouping);
- if ( typeof(col.grouping.groupPriority) !== 'undefined' && col.grouping.groupPriority > -1 ){
- col.treeAggregationFn = uiGridTreeBaseService.nativeAggregations()[uiGridGroupingConstants.aggregation.COUNT].aggregationFn;
- col.treeAggregationFinalizerFn = service.groupedFinalizerFn;
- }
- } else if (typeof(col.grouping) === 'undefined'){
- col.grouping = {};
- }
-
- if (typeof(col.grouping) !== 'undefined' && typeof(col.grouping.groupPriority) !== 'undefined' && col.grouping.groupPriority >= 0){
- col.suppressRemoveSort = true;
- }
-
- var groupColumn = {
- name: 'ui.grid.grouping.group',
- title: i18nService.get().grouping.group,
- icon: 'ui-grid-icon-indent-right',
- shown: function () {
- return typeof(this.context.col.grouping) === 'undefined' ||
- typeof(this.context.col.grouping.groupPriority) === 'undefined' ||
- this.context.col.grouping.groupPriority < 0;
- },
- action: function () {
- service.groupColumn( this.context.col.grid, this.context.col );
- }
- };
-
- var ungroupColumn = {
- name: 'ui.grid.grouping.ungroup',
- title: i18nService.get().grouping.ungroup,
- icon: 'ui-grid-icon-indent-left',
- shown: function () {
- return typeof(this.context.col.grouping) !== 'undefined' &&
- typeof(this.context.col.grouping.groupPriority) !== 'undefined' &&
- this.context.col.grouping.groupPriority >= 0;
- },
- action: function () {
- service.ungroupColumn( this.context.col.grid, this.context.col );
- }
- };
-
- var aggregateRemove = {
- name: 'ui.grid.grouping.aggregateRemove',
- title: i18nService.get().grouping.aggregate_remove,
- shown: function () {
- return typeof(this.context.col.treeAggregationFn) !== 'undefined';
- },
- action: function () {
- service.aggregateColumn( this.context.col.grid, this.context.col, null);
- }
- };
-
- // generic adder for the aggregation menus, which follow a pattern
- var addAggregationMenu = function(type, title){
- title = title || i18nService.get().grouping['aggregate_' + type] || type;
- var menuItem = {
- name: 'ui.grid.grouping.aggregate' + type,
- title: title,
- shown: function () {
- return typeof(this.context.col.treeAggregation) === 'undefined' ||
- typeof(this.context.col.treeAggregation.type) === 'undefined' ||
- this.context.col.treeAggregation.type !== type;
- },
- action: function () {
- service.aggregateColumn( this.context.col.grid, this.context.col, type);
- }
- };
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.aggregate' + type)) {
- col.menuItems.push(menuItem);
- }
- };
-
- /**
- * @ngdoc object
- * @name groupingShowGroupingMenu
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Show the grouping (group and ungroup items) menu on this column
- * <br/>Defaults to true.
- */
- if ( col.colDef.groupingShowGroupingMenu !== false ){
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.group')) {
- col.menuItems.push(groupColumn);
- }
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.ungroup')) {
- col.menuItems.push(ungroupColumn);
- }
- }
-
-
- /**
- * @ngdoc object
- * @name groupingShowAggregationMenu
- * @propertyOf ui.grid.grouping.api:ColumnDef
- * @description Show the aggregation menu on this column
- * <br/>Defaults to true.
- */
- if ( col.colDef.groupingShowAggregationMenu !== false ){
- angular.forEach(uiGridTreeBaseService.nativeAggregations(), function(aggregationDef, name){
- addAggregationMenu(name);
- });
- angular.forEach(gridOptions.treeCustomAggregations, function(aggregationDef, name){
- addAggregationMenu(name, aggregationDef.menuTitle);
- });
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.grouping.aggregateRemove')) {
- col.menuItems.push(aggregateRemove);
- }
- }
- },
-
-
-
-
- /**
- * @ngdoc function
- * @name groupingColumnProcessor
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Moves the columns around based on which are grouped
- *
- * @param {array} columns the columns to consider rendering
- * @param {array} rows the grid rows, which we don't use but are passed to us
- * @returns {array} updated columns array
- */
- groupingColumnProcessor: function( columns, rows ) {
- var grid = this;
-
- columns = service.moveGroupColumns(this, columns, rows);
- return columns;
- },
-
- /**
- * @ngdoc function
- * @name groupedFinalizerFn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Used on group columns to display the rendered value and optionally
- * display the count of rows.
- *
- * @param {aggregation} the aggregation entity for a grouped column
- */
- groupedFinalizerFn: function( aggregation ){
- var col = this;
-
- if ( typeof(aggregation.groupVal) !== 'undefined') {
- aggregation.rendered = aggregation.groupVal;
- if ( col.grid.options.groupingShowCounts && col.colDef.type !== 'date' ){
- aggregation.rendered += (' (' + aggregation.value + ')');
- }
- } else {
- aggregation.rendered = null;
- }
- },
-
- /**
- * @ngdoc function
- * @name moveGroupColumns
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Moves the column order so that the grouped columns are lined up
- * to the left (well, unless you're RTL, then it's the right). By doing this in
- * the columnsProcessor, we make it transient - when the column is ungrouped it'll
- * go back to where it was.
- *
- * Does nothing if the option `moveGroupColumns` is set to false.
- *
- * @param {Grid} grid grid object
- * @param {array} columns the columns that we should process/move
- * @param {array} rows the grid rows
- * @returns {array} updated columns
- */
- moveGroupColumns: function( grid, columns, rows ){
- if ( grid.options.moveGroupColumns === false){
- return columns;
- }
-
- columns.forEach( function(column, index){
- // position used to make stable sort in moveGroupColumns
- column.groupingPosition = index;
- });
-
- columns.sort(function(a, b){
- var a_group, b_group;
- if (a.isRowHeader){
- a_group = -1000;
- }
- else if ( typeof(a.grouping) === 'undefined' || typeof(a.grouping.groupPriority) === 'undefined' || a.grouping.groupPriority < 0){
- a_group = null;
- } else {
- a_group = a.grouping.groupPriority;
- }
-
- if (b.isRowHeader){
- b_group = -1000;
- }
- else if ( typeof(b.grouping) === 'undefined' || typeof(b.grouping.groupPriority) === 'undefined' || b.grouping.groupPriority < 0){
- b_group = null;
- } else {
- b_group = b.grouping.groupPriority;
- }
-
- // groups get sorted to the top
- if ( a_group !== null && b_group === null) { return -1; }
- if ( b_group !== null && a_group === null) { return 1; }
- if ( a_group !== null && b_group !== null) {return a_group - b_group; }
-
- return a.groupingPosition - b.groupingPosition;
- });
-
- columns.forEach( function(column, index) {
- delete column.groupingPosition;
- });
-
- return columns;
- },
-
-
- /**
- * @ngdoc function
- * @name groupColumn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Adds this column to the existing grouping, at the end of the priority order.
- * If the column doesn't have a sort, adds one, by default ASC
- *
- * This column will move to the left of any non-group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {Grid} grid grid object
- * @param {GridCol} column the column we want to group
- */
- groupColumn: function( grid, column){
- if ( typeof(column.grouping) === 'undefined' ){
- column.grouping = {};
- }
-
- // set the group priority to the next number in the hierarchy
- var existingGrouping = service.getGrouping( grid );
- column.grouping.groupPriority = existingGrouping.grouping.length;
-
- // add sort if not present
- if ( !column.sort ){
- column.sort = { direction: uiGridConstants.ASC };
- } else if ( typeof(column.sort.direction) === 'undefined' || column.sort.direction === null ){
- column.sort.direction = uiGridConstants.ASC;
- }
-
- column.treeAggregation = { type: uiGridGroupingConstants.aggregation.COUNT, source: 'grouping' };
- column.treeAggregationFn = uiGridTreeBaseService.nativeAggregations()[uiGridGroupingConstants.aggregation.COUNT].aggregationFn;
- column.treeAggregationFinalizerFn = service.groupedFinalizerFn;
-
- grid.api.grouping.raise.groupingChanged(column);
- // This indirectly calls service.tidyPriorities( grid );
- grid.api.core.raise.sortChanged(grid, grid.getColumnSorting());
-
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name ungroupColumn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Removes the groupPriority from this column. If the
- * column was previously aggregated the aggregation will come back.
- * The sort will remain.
- *
- * This column will move to the right of any other group columns, the
- * move is handled in a columnProcessor, so gets called as part of refresh
- *
- * @param {Grid} grid grid object
- * @param {GridCol} column the column we want to ungroup
- */
- ungroupColumn: function( grid, column){
- if ( typeof(column.grouping) === 'undefined' ){
- return;
- }
-
- delete column.grouping.groupPriority;
- delete column.treeAggregation;
- delete column.customTreeAggregationFinalizer;
-
- service.tidyPriorities( grid );
-
- grid.api.grouping.raise.groupingChanged(column);
-
- grid.queueGridRefresh();
- },
-
- /**
- * @ngdoc function
- * @name aggregateColumn
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Sets the aggregation type on a column, if the
- * column is currently grouped then it removes the grouping first.
- *
- * @param {Grid} grid grid object
- * @param {GridCol} column the column we want to aggregate
- * @param {string} one of the recognised types from uiGridGroupingConstants or one of the custom aggregations from gridOptions
- */
- aggregateColumn: function( grid, column, aggregationType){
-
- if (typeof(column.grouping) !== 'undefined' && typeof(column.grouping.groupPriority) !== 'undefined' && column.grouping.groupPriority >= 0){
- service.ungroupColumn( grid, column );
- }
-
- var aggregationDef = {};
- if ( typeof(grid.options.treeCustomAggregations[aggregationType]) !== 'undefined' ){
- aggregationDef = grid.options.treeCustomAggregations[aggregationType];
- } else if ( typeof(uiGridTreeBaseService.nativeAggregations()[aggregationType]) !== 'undefined' ){
- aggregationDef = uiGridTreeBaseService.nativeAggregations()[aggregationType];
- }
-
- column.treeAggregation = { type: aggregationType, label: i18nService.get().aggregation[aggregationDef.label] || aggregationDef.label };
- column.treeAggregationFn = aggregationDef.aggregationFn;
- column.treeAggregationFinalizerFn = aggregationDef.finalizerFn;
-
- grid.api.grouping.raise.aggregationChanged(column);
-
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name setGrouping
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Set the grouping based on a config object, used by the save state feature
- * (more specifically, by the restore function in that feature )
- *
- * @param {Grid} grid grid object
- * @param {object} config the config we want to set, same format as that returned by getGrouping
- */
- setGrouping: function ( grid, config ){
- if ( typeof(config) === 'undefined' ){
- return;
- }
-
- // first remove any existing grouping
- service.clearGrouping(grid);
-
- if ( config.grouping && config.grouping.length && config.grouping.length > 0 ){
- config.grouping.forEach( function( group ) {
- var col = grid.getColumn(group.colName);
-
- if ( col ) {
- service.groupColumn( grid, col );
- }
- });
- }
-
- if ( config.aggregations && config.aggregations.length ){
- config.aggregations.forEach( function( aggregation ) {
- var col = grid.getColumn(aggregation.colName);
-
- if ( col ) {
- service.aggregateColumn( grid, col, aggregation.aggregation.type );
- }
- });
- }
-
- if ( config.rowExpandedStates ){
- service.applyRowExpandedStates( grid.grouping.groupingHeaderCache, config.rowExpandedStates );
- }
- },
-
-
- /**
- * @ngdoc function
- * @name clearGrouping
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Clear any grouped columns and any aggregations. Doesn't remove sorting,
- * as we don't know whether that sorting was added by grouping or was there beforehand
- *
- * @param {Grid} grid grid object
- */
- clearGrouping: function( grid ) {
- var currentGrouping = service.getGrouping(grid);
-
- if ( currentGrouping.grouping.length > 0 ){
- currentGrouping.grouping.forEach( function( group ) {
- if (!group.col){
- // should have a group.colName if there's no col
- group.col = grid.getColumn(group.colName);
- }
- service.ungroupColumn(grid, group.col);
- });
- }
-
- if ( currentGrouping.aggregations.length > 0 ){
- currentGrouping.aggregations.forEach( function( aggregation ){
- if (!aggregation.col){
- // should have a group.colName if there's no col
- aggregation.col = grid.getColumn(aggregation.colName);
- }
- service.aggregateColumn(grid, aggregation.col, null);
- });
- }
- },
-
-
- /**
- * @ngdoc function
- * @name tidyPriorities
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Renumbers groupPriority and sortPriority such that
- * groupPriority is contiguous, and sortPriority either matches
- * groupPriority (for group columns), and otherwise is contiguous and
- * higher than groupPriority.
- *
- * @param {Grid} grid grid object
- */
- tidyPriorities: function( grid ){
- // if we're called from sortChanged, grid is in this, not passed as param, the param can be a column or undefined
- if ( ( typeof(grid) === 'undefined' || typeof(grid.grid) !== 'undefined' ) && typeof(this.grid) !== 'undefined' ) {
- grid = this.grid;
- }
-
- var groupArray = [];
- var sortArray = [];
-
- grid.columns.forEach( function(column, index){
- if ( typeof(column.grouping) !== 'undefined' && typeof(column.grouping.groupPriority) !== 'undefined' && column.grouping.groupPriority >= 0){
- groupArray.push(column);
- } else if ( typeof(column.sort) !== 'undefined' && typeof(column.sort.priority) !== 'undefined' && column.sort.priority >= 0){
- sortArray.push(column);
- }
- });
-
- groupArray.sort(function(a, b){ return a.grouping.groupPriority - b.grouping.groupPriority; });
- groupArray.forEach( function(column, index){
- column.grouping.groupPriority = index;
- column.suppressRemoveSort = true;
- if ( typeof(column.sort) === 'undefined'){
- column.sort = {};
- }
- column.sort.priority = index;
- });
-
- var i = groupArray.length;
- sortArray.sort(function(a, b){ return a.sort.priority - b.sort.priority; });
- sortArray.forEach( function(column, index){
- column.sort.priority = i;
- column.suppressRemoveSort = column.colDef.suppressRemoveSort;
- i++;
- });
- },
-
-
- /**
- * @ngdoc function
- * @name groupRows
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description The rowProcessor that creates the groupHeaders (i.e. does
- * the actual grouping).
- *
- * Assumes it is always called after the sorting processor, guaranteed by the priority setting
- *
- * Processes all the rows in order, inserting a groupHeader row whenever there is a change
- * in value of a grouped row, based on the sortAlgorithm used for the column. The group header row
- * is looked up in the groupHeaderCache, and used from there if there is one. The entity is reset
- * to {} if one is found.
- *
- * As it processes it maintains a `processingState` array. This records, for each level of grouping we're
- * working with, the following information:
- * ```
- * {
- * fieldName: name,
- * col: col,
- * initialised: boolean,
- * currentValue: value,
- * currentRow: gridRow,
- * }
- * ```
- * We look for changes in the currentValue at any of the levels. Where we find a change we:
- *
- * - create a new groupHeader row in the array
- *
- * @param {array} renderableRows the rows we want to process, usually the output from the previous rowProcessor
- * @returns {array} the updated rows, including our new group rows
- */
- groupRows: function( renderableRows ) {
- if (renderableRows.length === 0){
- return renderableRows;
- }
-
- var grid = this;
- grid.grouping.oldGroupingHeaderCache = grid.grouping.groupingHeaderCache || {};
- grid.grouping.groupingHeaderCache = {};
-
- var processingState = service.initialiseProcessingState( grid );
-
- // processes each of the fields we are grouping by, checks if the value has changed and inserts a groupHeader
- // Broken out as shouldn't create functions in a loop.
- var updateProcessingState = function( groupFieldState, stateIndex ) {
- var fieldValue = grid.getCellValue(row, groupFieldState.col);
-
- // look for change of value - and insert a header
- if ( !groupFieldState.initialised || rowSorter.getSortFn(grid, groupFieldState.col, renderableRows)(fieldValue, groupFieldState.currentValue) !== 0 ){
- service.insertGroupHeader( grid, renderableRows, i, processingState, stateIndex );
- i++;
- }
- };
-
- // use a for loop because it's tolerant of the array length changing whilst we go - we can
- // manipulate the iterator when we insert groupHeader rows
- for (var i = 0; i < renderableRows.length; i++ ){
- var row = renderableRows[i];
-
- if ( row.visible ){
- processingState.forEach( updateProcessingState );
- }
- }
-
- delete grid.grouping.oldGroupingHeaderCache;
- return renderableRows;
- },
-
-
- /**
- * @ngdoc function
- * @name initialiseProcessingState
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Creates the processing state array that is used
- * for groupRows.
- *
- * @param {Grid} grid grid object
- * @returns {array} an array in the format described in the groupRows method,
- * initialised with blank values
- */
- initialiseProcessingState: function( grid ){
- var processingState = [];
- var columnSettings = service.getGrouping( grid );
-
- columnSettings.grouping.forEach( function( groupItem, index){
- processingState.push({
- fieldName: groupItem.field,
- col: groupItem.col,
- initialised: false,
- currentValue: null,
- currentRow: null
- });
- });
-
- return processingState;
- },
-
-
- /**
- * @ngdoc function
- * @name getGrouping
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Get the grouping settings from the columns. As a side effect
- * this always renumbers the grouping starting at 0
- * @param {Grid} grid grid object
- * @returns {array} an array of the group fields, in order of priority
- */
- getGrouping: function( grid ){
- var groupArray = [];
- var aggregateArray = [];
-
- // get all the grouping
- grid.columns.forEach( function(column, columnIndex){
- if ( column.grouping ){
- if ( typeof(column.grouping.groupPriority) !== 'undefined' && column.grouping.groupPriority >= 0){
- groupArray.push({ field: column.field, col: column, groupPriority: column.grouping.groupPriority, grouping: column.grouping });
- }
- }
- if ( column.treeAggregation && column.treeAggregation.type ){
- aggregateArray.push({ field: column.field, col: column, aggregation: column.treeAggregation });
- }
- });
-
- // sort grouping into priority order
- groupArray.sort( function(a, b){
- return a.groupPriority - b.groupPriority;
- });
-
- // renumber the priority in case it was somewhat messed up, then remove the grouping reference
- groupArray.forEach( function( group, index) {
- group.grouping.groupPriority = index;
- group.groupPriority = index;
- delete group.grouping;
- });
-
- return { grouping: groupArray, aggregations: aggregateArray };
- },
-
-
- /**
- * @ngdoc function
- * @name insertGroupHeader
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Create a group header row, and link it to the various configuration
- * items that we use.
- *
- * Look for the row in the oldGroupingHeaderCache, write the row into the new groupingHeaderCache.
- *
- * @param {Grid} grid grid object
- * @param {array} renderableRows the rows that we are processing
- * @param {number} rowIndex the row we were up to processing
- * @param {array} processingState the current processing state
- * @param {number} stateIndex the processing state item that we were on when we triggered a new group header -
- * i.e. the column that we want to create a header for
- */
- insertGroupHeader: function( grid, renderableRows, rowIndex, processingState, stateIndex ) {
- // set the value that caused the end of a group into the header row and the processing state
- var fieldName = processingState[stateIndex].fieldName;
- var col = processingState[stateIndex].col;
-
- var newValue = grid.getCellValue(renderableRows[rowIndex], col);
- var newDisplayValue = newValue;
- if ( typeof(newValue) === 'undefined' || newValue === null ) {
- newDisplayValue = grid.options.groupingNullLabel;
- }
-
- var cacheItem = grid.grouping.oldGroupingHeaderCache;
- for ( var i = 0; i < stateIndex; i++ ){
- if ( cacheItem && cacheItem[processingState[i].currentValue] ){
- cacheItem = cacheItem[processingState[i].currentValue].children;
- }
- }
-
- var headerRow;
- if ( cacheItem && cacheItem[newValue]){
- headerRow = cacheItem[newValue].row;
- headerRow.entity = {};
- } else {
- headerRow = new GridRow( {}, null, grid );
- gridClassFactory.rowTemplateAssigner.call(grid, headerRow);
- }
-
- headerRow.entity['$$' + processingState[stateIndex].col.uid] = { groupVal: newDisplayValue };
- headerRow.treeLevel = stateIndex;
- headerRow.groupHeader = true;
- headerRow.internalRow = true;
- headerRow.enableCellEdit = false;
- headerRow.enableSelection = grid.options.enableGroupHeaderSelection;
- processingState[stateIndex].initialised = true;
- processingState[stateIndex].currentValue = newValue;
- processingState[stateIndex].currentRow = headerRow;
-
- // set all processing states below this one to not be initialised - change of this state
- // means all those need to start again
- service.finaliseProcessingState( processingState, stateIndex + 1);
-
- // insert our new header row
- renderableRows.splice(rowIndex, 0, headerRow);
-
- // add our new header row to the cache
- cacheItem = grid.grouping.groupingHeaderCache;
- for ( i = 0; i < stateIndex; i++ ){
- cacheItem = cacheItem[processingState[i].currentValue].children;
- }
- cacheItem[newValue] = { row: headerRow, children: {} };
- },
-
-
- /**
- * @ngdoc function
- * @name finaliseProcessingState
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Set all processing states lower than the one that had a break in value to
- * no longer be initialised. Render the counts into the entity ready for display.
- *
- * @param {Grid} grid grid object
- * @param {array} processingState the current processing state
- * @param {number} stateIndex the processing state item that we were on when we triggered a new group header, all
- * processing states after this need to be finalised
- */
- finaliseProcessingState: function( processingState, stateIndex ){
- for ( var i = stateIndex; i < processingState.length; i++){
- processingState[i].initialised = false;
- processingState[i].currentRow = null;
- processingState[i].currentValue = null;
- }
- },
-
-
- /**
- * @ngdoc function
- * @name getRowExpandedStates
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Extract the groupHeaderCache hash, pulling out only the states.
- *
- * The example below shows a grid that is grouped by gender then age
- *
- * <pre>
- * {
- * male: {
- * state: 'expanded',
- * children: {
- * 22: { state: 'expanded' },
- * 30: { state: 'collapsed' }
- * }
- * },
- * female: {
- * state: 'expanded',
- * children: {
- * 28: { state: 'expanded' },
- * 55: { state: 'collapsed' }
- * }
- * }
- * }
- * </pre>
- *
- * @param {Grid} grid grid object
- * @returns {hash} the expanded states as a hash
- */
- getRowExpandedStates: function(treeChildren){
- if ( typeof(treeChildren) === 'undefined' ){
- return {};
- }
-
- var newChildren = {};
-
- angular.forEach( treeChildren, function( value, key ){
- newChildren[key] = { state: value.row.treeNode.state };
- if ( value.children ){
- newChildren[key].children = service.getRowExpandedStates( value.children );
- } else {
- newChildren[key].children = {};
- }
- });
-
- return newChildren;
- },
-
-
- /**
- * @ngdoc function
- * @name applyRowExpandedStates
- * @methodOf ui.grid.grouping.service:uiGridGroupingService
- * @description Take a hash in the format as created by getRowExpandedStates,
- * and apply it to the grid.grouping.groupHeaderCache.
- *
- * Takes a treeSubset, and applies to a treeSubset - so can be called
- * recursively.
- *
- * @param {object} currentNode can be grid.grouping.groupHeaderCache, or any of
- * the children of that hash
- * @returns {hash} expandedStates can be the full expanded states, or children
- * of that expanded states (which hopefully matches the subset of the groupHeaderCache)
- */
- applyRowExpandedStates: function( currentNode, expandedStates ){
- if ( typeof(expandedStates) === 'undefined' ){
- return;
- }
-
- angular.forEach(expandedStates, function( value, key ) {
- if ( currentNode[key] ){
- currentNode[key].row.treeNode.state = value.state;
-
- if (value.children && currentNode[key].children){
- service.applyRowExpandedStates( currentNode[key].children, value.children );
- }
- }
- });
- }
-
-
- };
-
- return service;
-
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.grouping.directive:uiGridGrouping
- * @element div
- * @restrict A
- *
- * @description Adds grouping features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.grouping']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
-
- $scope.gridOptions = { columnDefs: $scope.columnDefs, data: $scope.data };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-grouping></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridGrouping', ['uiGridGroupingConstants', 'uiGridGroupingService', '$templateCache',
- function (uiGridGroupingConstants, uiGridGroupingService, $templateCache) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- if (uiGridCtrl.grid.options.enableGrouping !== false){
- uiGridGroupingService.initializeGrid(uiGridCtrl.grid, $scope);
- }
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.importer
- * @description
- *
- * # ui.grid.importer
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides the ability to import data into the grid. It
- * uses the column defs to work out which data belongs in which column,
- * and creates entities from a configured class (typically a $resource).
- *
- * If the rowEdit feature is enabled, it also calls save on those newly
- * created objects, and then displays any errors in the imported data.
- *
- * Currently the importer imports only CSV and json files, although provision has been
- * made to process other file formats, and these can be added over time.
- *
- * For json files, the properties within each object in the json must match the column names
- * (to put it another way, the importer doesn't process the json, it just copies the objects
- * within the json into a new instance of the specified object type)
- *
- * For CSV import, the default column identification relies on each column in the
- * header row matching a column.name or column.displayName. Optionally, a column identification
- * callback can be used. This allows matching using other attributes, which is particularly
- * useful if your application has internationalised column headings (i.e. the headings that
- * the user sees don't match the column names).
- *
- * The importer makes use of the grid menu as the UI for requesting an
- * import.
- *
- * <div ui-grid-importer></div>
- */
-
- var module = angular.module('ui.grid.importer', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.importer.constant:uiGridImporterConstants
- *
- * @description constants available in importer module
- */
-
- module.constant('uiGridImporterConstants', {
- featureName: 'importer'
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.importer.service:uiGridImporterService
- *
- * @description Services for importer feature
- */
- module.service('uiGridImporterService', ['$q', 'uiGridConstants', 'uiGridImporterConstants', 'gridUtil', '$compile', '$interval', 'i18nService', '$window',
- function ($q, uiGridConstants, uiGridImporterConstants, gridUtil, $compile, $interval, i18nService, $window) {
-
- var service = {
-
- initializeGrid: function ($scope, grid) {
-
- //add feature namespace and any properties to grid for needed state
- grid.importer = {
- $scope: $scope
- };
-
- this.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.importer.api:PublicApi
- *
- * @description Public Api for importer feature
- */
- var publicApi = {
- events: {
- importer: {
- }
- },
- methods: {
- importer: {
- /**
- * @ngdoc function
- * @name importFile
- * @methodOf ui.grid.importer.api:PublicApi
- * @description Imports a file into the grid using the file object
- * provided. Bypasses the grid menu
- * @param {File} fileObject the file we want to import, as a javascript
- * File object
- */
- importFile: function ( fileObject ) {
- service.importThisFile( grid, fileObject );
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- if ( grid.options.enableImporter && grid.options.importerShowMenu ){
- if ( grid.api.core.addToGridMenu ){
- service.addToMenu( grid );
- } else {
- // order of registration is not guaranteed, register in a little while
- $interval( function() {
- if (grid.api.core.addToGridMenu){
- service.addToMenu( grid );
- }
- }, 100, 1);
- }
- }
- },
-
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.importer.api:GridOptions
- *
- * @description GridOptions for importer feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.importer.api:GridOptions
- * @name enableImporter
- * @description Whether or not importer is enabled. Automatically set
- * to false if the user's browser does not support the required fileApi.
- * Otherwise defaults to true.
- *
- */
- if (gridOptions.enableImporter || gridOptions.enableImporter === undefined) {
- if ( !($window.hasOwnProperty('File') && $window.hasOwnProperty('FileReader') && $window.hasOwnProperty('FileList') && $window.hasOwnProperty('Blob')) ) {
- gridUtil.logError('The File APIs are not fully supported in this browser, grid importer cannot be used.');
- gridOptions.enableImporter = false;
- } else {
- gridOptions.enableImporter = true;
- }
- } else {
- gridOptions.enableImporter = false;
- }
-
- /**
- * @ngdoc method
- * @name importerProcessHeaders
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A callback function that will process headers using custom
- * logic. Set this callback function if the headers that your user will provide in their
- * import file don't necessarily match the grid header or field names. This might commonly
- * occur where your application is internationalised, and therefore the field names
- * that the user recognises are in a different language than the field names that
- * ui-grid knows about.
- *
- * Defaults to the internal `processHeaders` method, which seeks to match using both
- * displayName and column.name. Any non-matching columns are discarded.
- *
- * Your callback routine should respond by processing the header array, and returning an array
- * of matching column names. A null value in any given position means "don't import this column"
- *
- * <pre>
- * gridOptions.importerProcessHeaders: function( headerArray ) {
- * var myHeaderColumns = [];
- * var thisCol;
- * headerArray.forEach( function( value, index ) {
- * thisCol = mySpecialLookupFunction( value );
- * myHeaderColumns.push( thisCol.name );
- * });
- *
- * return myHeaderCols;
- * })
- * </pre>
- * @param {Grid} grid the grid we're importing into
- * @param {array} headerArray an array of the text from the first row of the csv file,
- * which you need to match to column.names
- * @returns {array} array of matching column names, in the same order as the headerArray
- *
- */
- gridOptions.importerProcessHeaders = gridOptions.importerProcessHeaders || service.processHeaders;
-
- /**
- * @ngdoc method
- * @name importerHeaderFilter
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A callback function that will filter (usually translate) a single
- * header. Used when you want to match the passed in column names to the column
- * displayName after the header filter.
- *
- * Your callback routine needs to return the filtered header value.
- * <pre>
- * gridOptions.importerHeaderFilter: function( displayName ) {
- * return $translate.instant( displayName );
- * })
- * </pre>
- *
- * or:
- * <pre>
- * gridOptions.importerHeaderFilter: $translate.instant
- * </pre>
- * @param {string} displayName the displayName that we'd like to translate
- * @returns {string} the translated name
- *
- */
- gridOptions.importerHeaderFilter = gridOptions.importerHeaderFilter || function( displayName ) { return displayName; };
-
- /**
- * @ngdoc method
- * @name importerErrorCallback
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A callback function that provides custom error handling, rather
- * than the standard grid behaviour of an alert box and a console message. You
- * might use this to internationalise the console log messages, or to write to a
- * custom logging routine that returned errors to the server.
- *
- * <pre>
- * gridOptions.importerErrorCallback: function( grid, errorKey, consoleMessage, context ) {
- * myUserDisplayRoutine( errorKey );
- * myLoggingRoutine( consoleMessage, context );
- * })
- * </pre>
- * @param {Grid} grid the grid we're importing into, may be useful if you're positioning messages
- * in some way
- * @param {string} errorKey one of the i18n keys the importer can return - importer.noHeaders,
- * importer.noObjects, importer.invalidCsv, importer.invalidJson, importer.jsonNotArray
- * @param {string} consoleMessage the English console message that importer would have written
- * @param {object} context the context data that importer would have appended to that console message,
- * often the file content itself or the element that is in error
- *
- */
- if ( !gridOptions.importerErrorCallback || typeof(gridOptions.importerErrorCallback) !== 'function' ){
- delete gridOptions.importerErrorCallback;
- }
-
- /**
- * @ngdoc method
- * @name importerDataAddCallback
- * @methodOf ui.grid.importer.api:GridOptions
- * @description A mandatory callback function that adds data to the source data array. The grid
- * generally doesn't add rows to the source data array, it is tidier to handle this through a user
- * callback.
- *
- * <pre>
- * gridOptions.importerDataAddCallback: function( grid, newObjects ) {
- * $scope.myData = $scope.myData.concat( newObjects );
- * })
- * </pre>
- * @param {Grid} grid the grid we're importing into, may be useful in some way
- * @param {array} newObjects an array of new objects that you should add to your data
- *
- */
- if ( gridOptions.enableImporter === true && !gridOptions.importerDataAddCallback ) {
- gridUtil.logError("You have not set an importerDataAddCallback, importer is disabled");
- gridOptions.enableImporter = false;
- }
-
- /**
- * @ngdoc object
- * @name importerNewObject
- * @propertyOf ui.grid.importer.api:GridOptions
- * @description An object on which we call `new` to create each new row before inserting it into
- * the data array. Typically this would be a $resource entity, which means that if you're using
- * the rowEdit feature, you can directly call save on this entity when the save event is triggered.
- *
- * Defaults to a vanilla javascript object
- *
- * @example
- * <pre>
- * gridOptions.importerNewObject = MyRes;
- * </pre>
- *
- */
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.importer.api:GridOptions
- * @name importerShowMenu
- * @description Whether or not to show an item in the grid menu. Defaults to true.
- *
- */
- gridOptions.importerShowMenu = gridOptions.importerShowMenu !== false;
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.importer.api:GridOptions
- * @name importerObjectCallback
- * @description A callback that massages the data for each object. For example,
- * you might have data stored as a code value, but display the decode. This callback
- * can be used to change the decoded value back into a code. Defaults to doing nothing.
- * @param {Grid} grid in case you need it
- * @param {object} newObject the new object as importer has created it, modify it
- * then return the modified version
- * @returns {object} the modified object
- * @example
- * <pre>
- * gridOptions.importerObjectCallback = function ( grid, newObject ) {
- * switch newObject.status {
- * case 'Active':
- * newObject.status = 1;
- * break;
- * case 'Inactive':
- * newObject.status = 2;
- * break;
- * }
- * return newObject;
- * };
- * </pre>
- */
- gridOptions.importerObjectCallback = gridOptions.importerObjectCallback || function( grid, newObject ) { return newObject; };
- },
-
-
- /**
- * @ngdoc function
- * @name addToMenu
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Adds import menu item to the grid menu,
- * allowing the user to request import of a file
- * @param {Grid} grid the grid into which data should be imported
- */
- addToMenu: function ( grid ) {
- grid.api.core.addToGridMenu( grid, [
- {
- title: i18nService.getSafeText('gridMenu.importerTitle'),
- order: 150
- },
- {
- templateUrl: 'ui-grid/importerMenuItemContainer',
- action: function ($event) {
- this.grid.api.importer.importAFile( grid );
- },
- order: 151
- }
- ]);
- },
-
-
- /**
- * @ngdoc function
- * @name importThisFile
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Imports the provided file into the grid using the file object
- * provided. Bypasses the grid menu
- * @param {Grid} grid the grid we're importing into
- * @param {File} fileObject the file we want to import, as returned from the File
- * javascript object
- */
- importThisFile: function ( grid, fileObject ) {
- if (!fileObject){
- gridUtil.logError( 'No file object provided to importThisFile, should be impossible, aborting');
- return;
- }
-
- var reader = new FileReader();
-
- switch ( fileObject.type ){
- case 'application/json':
- reader.onload = service.importJsonClosure( grid );
- break;
- default:
- reader.onload = service.importCsvClosure( grid );
- break;
- }
-
- reader.readAsText( fileObject );
- },
-
-
- /**
- * @ngdoc function
- * @name importJson
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Creates a function that imports a json file into the grid.
- * The json data is imported into new objects of type `gridOptions.importerNewObject`,
- * and if the rowEdit feature is enabled the rows are marked as dirty
- * @param {Grid} grid the grid we want to import into
- * @param {FileObject} importFile the file that we want to import, as
- * a FileObject
- */
- importJsonClosure: function( grid ) {
- return function( importFile ){
- var newObjects = [];
- var newObject;
-
- var importArray = service.parseJson( grid, importFile );
- if (importArray === null){
- return;
- }
- importArray.forEach( function( value, index ) {
- newObject = service.newObject( grid );
- angular.extend( newObject, value );
- newObject = grid.options.importerObjectCallback( grid, newObject );
- newObjects.push( newObject );
- });
-
- service.addObjects( grid, newObjects );
-
- };
- },
-
-
- /**
- * @ngdoc function
- * @name parseJson
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Parses a json file, returns the parsed data.
- * Displays an error if file doesn't parse
- * @param {Grid} grid the grid that we want to import into
- * @param {FileObject} importFile the file that we want to import, as
- * a FileObject
- * @returns {array} array of objects from the imported json
- */
- parseJson: function( grid, importFile ){
- var loadedObjects;
- try {
- loadedObjects = JSON.parse( importFile.target.result );
- } catch (e) {
- service.alertError( grid, 'importer.invalidJson', 'File could not be processed, is it valid json? Content was: ', importFile.target.result );
- return;
- }
-
- if ( !Array.isArray( loadedObjects ) ){
- service.alertError( grid, 'importer.jsonNotarray', 'Import failed, file is not an array, file was: ', importFile.target.result );
- return [];
- } else {
- return loadedObjects;
- }
- },
-
-
-
- /**
- * @ngdoc function
- * @name importCsvClosure
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Creates a function that imports a csv file into the grid
- * (allowing it to be used in the reader.onload event)
- * @param {Grid} grid the grid that we want to import into
- * @param {FileObject} importFile the file that we want to import, as
- * a file object
- */
- importCsvClosure: function( grid ) {
- return function( importFile ){
- var importArray = service.parseCsv( importFile );
- if ( !importArray || importArray.length < 1 ){
- service.alertError( grid, 'importer.invalidCsv', 'File could not be processed, is it valid csv? Content was: ', importFile.target.result );
- return;
- }
-
- var newObjects = service.createCsvObjects( grid, importArray );
- if ( !newObjects || newObjects.length === 0 ){
- service.alertError( grid, 'importer.noObjects', 'Objects were not able to be derived, content was: ', importFile.target.result );
- return;
- }
-
- service.addObjects( grid, newObjects );
- };
- },
-
-
- /**
- * @ngdoc function
- * @name parseCsv
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Parses a csv file into an array of arrays, with the first
- * array being the headers, and the remaining arrays being the data.
- * The logic for this comes from https://github.com/thetalecrafter/excel.js/blob/master/src/csv.js,
- * which is noted as being under the MIT license. The code is modified to pass the jscs yoda condition
- * checker
- * @param {FileObject} importFile the file that we want to import, as a
- * file object
- */
- parseCsv: function( importFile ) {
- var csv = importFile.target.result;
-
- // use the CSV-JS library to parse
- return CSV.parse(csv);
- },
-
-
- /**
- * @ngdoc function
- * @name createCsvObjects
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Converts an array of arrays (representing the csv file)
- * into a set of objects. Uses the provided `gridOptions.importerNewObject`
- * to create the objects, and maps the header row into the individual columns
- * using either `gridOptions.importerProcessHeaders`, or by using a native method
- * of matching to either the displayName, column name or column field of
- * the columns in the column defs. The resulting objects will have attributes
- * that are named based on the column.field or column.name, in that order.
- * @param {Grid} grid the grid that we want to import into
- * @param {Array} importArray the data that we want to import, as an array
- */
- createCsvObjects: function( grid, importArray ){
- // pull off header row and turn into headers
- var headerMapping = grid.options.importerProcessHeaders( grid, importArray.shift() );
- if ( !headerMapping || headerMapping.length === 0 ){
- service.alertError( grid, 'importer.noHeaders', 'Column names could not be derived, content was: ', importArray );
- return [];
- }
-
- var newObjects = [];
- var newObject;
- importArray.forEach( function( row, index ) {
- newObject = service.newObject( grid );
- if ( row !== null ){
- row.forEach( function( field, index ){
- if ( headerMapping[index] !== null ){
- newObject[ headerMapping[index] ] = field;
- }
- });
- }
- newObject = grid.options.importerObjectCallback( grid, newObject );
- newObjects.push( newObject );
- });
-
- return newObjects;
- },
-
-
- /**
- * @ngdoc function
- * @name processHeaders
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Determines the columns that the header row from
- * a csv (or other) file represents.
- * @param {Grid} grid the grid we're importing into
- * @param {array} headerRow the header row that we wish to match against
- * the column definitions
- * @returns {array} an array of the attribute names that should be used
- * for that column, based on matching the headers or creating the headers
- *
- */
- processHeaders: function( grid, headerRow ) {
- var headers = [];
- if ( !grid.options.columnDefs || grid.options.columnDefs.length === 0 ){
- // we are going to create new columnDefs for all these columns, so just remove
- // spaces from the names to create fields
- headerRow.forEach( function( value, index ) {
- headers.push( value.replace( /[^0-9a-zA-Z\-_]/g, '_' ) );
- });
- return headers;
- } else {
- var lookupHash = service.flattenColumnDefs( grid, grid.options.columnDefs );
- headerRow.forEach( function( value, index ) {
- if ( lookupHash[value] ) {
- headers.push( lookupHash[value] );
- } else if ( lookupHash[ value.toLowerCase() ] ) {
- headers.push( lookupHash[ value.toLowerCase() ] );
- } else {
- headers.push( null );
- }
- });
- return headers;
- }
- },
-
-
- /**
- * @name flattenColumnDefs
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Runs through the column defs and creates a hash of
- * the displayName, name and field, and of each of those values forced to lower case,
- * with each pointing to the field or name
- * (whichever is present). Used to lookup column headers and decide what
- * attribute name to give to the resulting field.
- * @param {Grid} grid the grid we're importing into
- * @param {array} columnDefs the columnDefs that we should flatten
- * @returns {hash} the flattened version of the column def information, allowing
- * us to look up a value by `flattenedHash[ headerValue ]`
- */
- flattenColumnDefs: function( grid, columnDefs ){
- var flattenedHash = {};
- columnDefs.forEach( function( columnDef, index) {
- if ( columnDef.name ){
- flattenedHash[ columnDef.name ] = columnDef.field || columnDef.name;
- flattenedHash[ columnDef.name.toLowerCase() ] = columnDef.field || columnDef.name;
- }
-
- if ( columnDef.field ){
- flattenedHash[ columnDef.field ] = columnDef.field || columnDef.name;
- flattenedHash[ columnDef.field.toLowerCase() ] = columnDef.field || columnDef.name;
- }
-
- if ( columnDef.displayName ){
- flattenedHash[ columnDef.displayName ] = columnDef.field || columnDef.name;
- flattenedHash[ columnDef.displayName.toLowerCase() ] = columnDef.field || columnDef.name;
- }
-
- if ( columnDef.displayName && grid.options.importerHeaderFilter ){
- flattenedHash[ grid.options.importerHeaderFilter(columnDef.displayName) ] = columnDef.field || columnDef.name;
- flattenedHash[ grid.options.importerHeaderFilter(columnDef.displayName).toLowerCase() ] = columnDef.field || columnDef.name;
- }
- });
-
- return flattenedHash;
- },
-
-
- /**
- * @ngdoc function
- * @name addObjects
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Inserts our new objects into the grid data, and
- * sets the rows to dirty if the rowEdit feature is being used
- *
- * Does this by registering a watch on dataChanges, which essentially
- * is waiting on the result of the grid data watch, and downstream processing.
- *
- * When the callback is called, it deregisters itself - we don't want to run
- * again next time data is added.
- *
- * If we never get called, we deregister on destroy.
- *
- * @param {Grid} grid the grid we're importing into
- * @param {array} newObjects the objects we want to insert into the grid data
- * @returns {object} the new object
- */
- addObjects: function( grid, newObjects, $scope ){
- if ( grid.api.rowEdit ){
- var dataChangeDereg = grid.registerDataChangeCallback( function() {
- grid.api.rowEdit.setRowsDirty( newObjects );
- dataChangeDereg();
- }, [uiGridConstants.dataChange.ROW] );
-
- grid.importer.$scope.$on( '$destroy', dataChangeDereg );
- }
-
- grid.importer.$scope.$apply( grid.options.importerDataAddCallback( grid, newObjects ) );
-
- },
-
-
- /**
- * @ngdoc function
- * @name newObject
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Makes a new object based on `gridOptions.importerNewObject`,
- * or based on an empty object if not present
- * @param {Grid} grid the grid we're importing into
- * @returns {object} the new object
- */
- newObject: function( grid ){
- if ( typeof(grid.options) !== "undefined" && typeof(grid.options.importerNewObject) !== "undefined" ){
- return new grid.options.importerNewObject();
- } else {
- return {};
- }
- },
-
-
- /**
- * @ngdoc function
- * @name alertError
- * @methodOf ui.grid.importer.service:uiGridImporterService
- * @description Provides an internationalised user alert for the failure,
- * and logs a console message including diagnostic content.
- * Optionally, if the the `gridOptions.importerErrorCallback` routine
- * is defined, then calls that instead, allowing user specified error routines
- * @param {Grid} grid the grid we're importing into
- * @param {array} headerRow the header row that we wish to match against
- * the column definitions
- */
- alertError: function( grid, alertI18nToken, consoleMessage, context ){
- if ( grid.options.importerErrorCallback ){
- grid.options.importerErrorCallback( grid, alertI18nToken, consoleMessage, context );
- } else {
- $window.alert(i18nService.getSafeText( alertI18nToken ));
- gridUtil.logError(consoleMessage + context );
- }
- }
- };
-
- return service;
-
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.importer.directive:uiGridImporter
- * @element div
- * @restrict A
- *
- * @description Adds importer features to grid
- *
- */
- module.directive('uiGridImporter', ['uiGridImporterConstants', 'uiGridImporterService', 'gridUtil', '$compile',
- function (uiGridImporterConstants, uiGridImporterService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridImporterService.initializeGrid($scope, uiGridCtrl.grid);
- }
- };
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.importer.directive:uiGridImporterMenuItem
- * @element div
- * @restrict A
- *
- * @description Handles the processing from the importer menu item - once a file is
- * selected
- *
- */
- module.directive('uiGridImporterMenuItem', ['uiGridImporterConstants', 'uiGridImporterService', 'gridUtil', '$compile',
- function (uiGridImporterConstants, uiGridImporterService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- templateUrl: 'ui-grid/importerMenuItem',
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var handleFileSelect = function( event ){
- var target = event.srcElement || event.target;
-
- if (target && target.files && target.files.length === 1) {
- var fileObject = target.files[0];
- uiGridImporterService.importThisFile( grid, fileObject );
- target.form.reset();
- }
- };
-
- var fileChooser = $elm[0].querySelectorAll('.ui-grid-importer-file-chooser');
- var grid = uiGridCtrl.grid;
-
- if ( fileChooser.length !== 1 ){
- gridUtil.logError('Found > 1 or < 1 file choosers within the menu item, error, cannot continue');
- } else {
- fileChooser[0].addEventListener('change', handleFileSelect, false); // TODO: why the false on the end? Google
- }
- }
- };
- }
- ]);
-})();
-
-(function() {
- 'use strict';
- /**
- * @ngdoc overview
- * @name ui.grid.infiniteScroll
- *
- * @description
- *
- * #ui.grid.infiniteScroll
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides infinite scroll functionality to ui-grid
- *
- */
- var module = angular.module('ui.grid.infiniteScroll', ['ui.grid']);
- /**
- * @ngdoc service
- * @name ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- *
- * @description Service for infinite scroll features
- */
- module.service('uiGridInfiniteScrollService', ['gridUtil', '$compile', '$timeout', 'uiGridConstants', 'ScrollEvent', '$q', function (gridUtil, $compile, $timeout, uiGridConstants, ScrollEvent, $q) {
-
- var service = {
-
- /**
- * @ngdoc function
- * @name initializeGrid
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description This method register events and methods into grid public API
- */
-
- initializeGrid: function(grid, $scope) {
- service.defaultGridOptions(grid.options);
-
- if (!grid.options.enableInfiniteScroll){
- return;
- }
-
- grid.infiniteScroll = { dataLoading: false };
- service.setScrollDirections( grid, grid.options.infiniteScrollUp, grid.options.infiniteScrollDown );
- grid.api.core.on.scrollEnd($scope, service.handleScroll);
-
- /**
- * @ngdoc object
- * @name ui.grid.infiniteScroll.api:PublicAPI
- *
- * @description Public API for infinite scroll feature
- */
- var publicApi = {
- events: {
- infiniteScroll: {
-
- /**
- * @ngdoc event
- * @name needLoadMoreData
- * @eventOf ui.grid.infiniteScroll.api:PublicAPI
- * @description This event fires when scroll reaches bottom percentage of grid
- * and needs to load data
- */
-
- needLoadMoreData: function ($scope, fn) {
- },
-
- /**
- * @ngdoc event
- * @name needLoadMoreDataTop
- * @eventOf ui.grid.infiniteScroll.api:PublicAPI
- * @description This event fires when scroll reaches top percentage of grid
- * and needs to load data
- */
-
- needLoadMoreDataTop: function ($scope, fn) {
- }
- }
- },
- methods: {
- infiniteScroll: {
-
- /**
- * @ngdoc function
- * @name dataLoaded
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Call this function when you have loaded the additional data
- * requested. You should set scrollUp and scrollDown to indicate
- * whether there are still more pages in each direction.
- *
- * If you call dataLoaded without first calling `saveScrollPercentage` then we will
- * scroll the user to the start of the newly loaded data, which usually gives a smooth scroll
- * experience, but can give a jumpy experience with large `infiniteScrollRowsFromEnd` values, and
- * on variable speed internet connections. Using `saveScrollPercentage` as demonstrated in the tutorial
- * should give a smoother scrolling experience for users.
- *
- * See infinite_scroll tutorial for example of usage
- * @param {boolean} scrollUp if set to false flags that there are no more pages upwards, so don't fire
- * any more infinite scroll events upward
- * @param {boolean} scrollDown if set to false flags that there are no more pages downwards, so don't
- * fire any more infinite scroll events downward
- * @returns {promise} a promise that is resolved when the grid scrolling is fully adjusted. If you're
- * planning to remove pages, you should wait on this promise first, or you'll break the scroll positioning
- */
- dataLoaded: function( scrollUp, scrollDown ) {
- service.setScrollDirections(grid, scrollUp, scrollDown);
-
- var promise = service.adjustScroll(grid).then(function() {
- grid.infiniteScroll.dataLoading = false;
- });
-
- return promise;
- },
-
- /**
- * @ngdoc function
- * @name resetScroll
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Call this function when you have taken some action that makes the current
- * scroll position invalid. For example, if you're using external sorting and you've resorted
- * then you might reset the scroll, or if you've otherwise substantially changed the data, perhaps
- * you've reused an existing grid for a new data set
- *
- * You must tell us whether there is data upwards or downwards after the reset
- *
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- * @returns {promise} promise that is resolved when the scroll reset is complete
- */
- resetScroll: function( scrollUp, scrollDown ) {
- service.setScrollDirections( grid, scrollUp, scrollDown);
-
- return service.adjustInfiniteScrollPosition(grid, 0);
- },
-
-
- /**
- * @ngdoc function
- * @name saveScrollPercentage
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Saves the scroll percentage and number of visible rows before you adjust the data,
- * used if you're subsequently going to call `dataRemovedTop` or `dataRemovedBottom`
- */
- saveScrollPercentage: function() {
- grid.infiniteScroll.prevScrollTop = grid.renderContainers.body.prevScrollTop;
- grid.infiniteScroll.previousVisibleRows = grid.getVisibleRowCount();
- },
-
-
- /**
- * @ngdoc function
- * @name dataRemovedTop
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the top
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedTop: function( scrollUp, scrollDown ) {
- service.dataRemovedTop( grid, scrollUp, scrollDown );
- },
-
- /**
- * @ngdoc function
- * @name dataRemovedBottom
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the bottom
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedBottom: function( scrollUp, scrollDown ) {
- service.dataRemovedBottom( grid, scrollUp, scrollDown );
- },
-
- /**
- * @ngdoc function
- * @name setScrollDirections
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Sets the scrollUp and scrollDown flags, handling nulls and undefined,
- * and also sets the grid.suppressParentScroll
- * @param {boolean} scrollUp whether there are pages available up - defaults to false
- * @param {boolean} scrollDown whether there are pages available down - defaults to true
- */
- setScrollDirections: function ( scrollUp, scrollDown ) {
- service.setScrollDirections( grid, scrollUp, scrollDown );
- }
-
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.infiniteScroll.api:GridOptions
- *
- * @description GridOptions for infinite scroll feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableInfiniteScroll
- * @propertyOf ui.grid.infiniteScroll.api:GridOptions
- * @description Enable infinite scrolling for this grid
- * <br/>Defaults to true
- */
- gridOptions.enableInfiniteScroll = gridOptions.enableInfiniteScroll !== false;
-
- /**
- * @ngdoc property
- * @name infiniteScrollRowsFromEnd
- * @propertyOf ui.grid.class:GridOptions
- * @description This setting controls how close to the end of the dataset a user gets before
- * more data is requested by the infinite scroll, whether scrolling up or down. This allows you to
- * 'prefetch' rows before the user actually runs out of scrolling.
- *
- * Note that if you set this value too high it may give jumpy scrolling behaviour, if you're getting
- * this behaviour you could use the `saveScrollPercentageMethod` right before loading your data, and we'll
- * preserve that scroll position
- *
- * <br> Defaults to 20
- */
- gridOptions.infiniteScrollRowsFromEnd = gridOptions.infiniteScrollRowsFromEnd || 20;
-
- /**
- * @ngdoc property
- * @name infiniteScrollUp
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether you allow infinite scroll up, implying that the first page of data
- * you have displayed is in the middle of your data set. If set to true then we trigger the
- * needMoreDataTop event when the user hits the top of the scrollbar.
- * <br> Defaults to false
- */
- gridOptions.infiniteScrollUp = gridOptions.infiniteScrollUp === true;
-
- /**
- * @ngdoc property
- * @name infiniteScrollDown
- * @propertyOf ui.grid.class:GridOptions
- * @description Whether you allow infinite scroll down, implying that the first page of data
- * you have displayed is in the middle of your data set. If set to true then we trigger the
- * needMoreData event when the user hits the bottom of the scrollbar.
- * <br> Defaults to true
- */
- gridOptions.infiniteScrollDown = gridOptions.infiniteScrollDown !== false;
- },
-
-
- /**
- * @ngdoc function
- * @name setScrollDirections
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Sets the scrollUp and scrollDown flags, handling nulls and undefined,
- * and also sets the grid.suppressParentScroll
- * @param {grid} grid the grid we're operating on
- * @param {boolean} scrollUp whether there are pages available up - defaults to false
- * @param {boolean} scrollDown whether there are pages available down - defaults to true
- */
- setScrollDirections: function ( grid, scrollUp, scrollDown ) {
- grid.infiniteScroll.scrollUp = ( scrollUp === true );
- grid.suppressParentScrollUp = ( scrollUp === true );
-
- grid.infiniteScroll.scrollDown = ( scrollDown !== false);
- grid.suppressParentScrollDown = ( scrollDown !== false);
- },
-
-
- /**
- * @ngdoc function
- * @name handleScroll
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Called whenever the grid scrolls, determines whether the scroll should
- * trigger an infinite scroll request for more data
- * @param {object} args the args from the event
- */
- handleScroll: function (args) {
- // don't request data if already waiting for data, or if source is coming from ui.grid.adjustInfiniteScrollPosition() function
- if ( args.grid.infiniteScroll && args.grid.infiniteScroll.dataLoading || args.source === 'ui.grid.adjustInfiniteScrollPosition' ){
- return;
- }
-
- if (args.y) {
- var percentage;
- var targetPercentage = args.grid.options.infiniteScrollRowsFromEnd / args.grid.renderContainers.body.visibleRowCache.length;
- if (args.grid.scrollDirection === uiGridConstants.scrollDirection.UP ) {
- percentage = args.y.percentage;
- if (percentage <= targetPercentage){
- service.loadData(args.grid);
- }
- } else if (args.grid.scrollDirection === uiGridConstants.scrollDirection.DOWN) {
- percentage = 1 - args.y.percentage;
- if (percentage <= targetPercentage){
- service.loadData(args.grid);
- }
- }
- }
- },
-
-
- /**
- * @ngdoc function
- * @name loadData
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description This function fires 'needLoadMoreData' or 'needLoadMoreDataTop' event based on scrollDirection
- * and whether there are more pages upwards or downwards. It also stores the number of rows that we had previously,
- * and clears out any saved scroll position so that we know whether or not the user calls `saveScrollPercentage`
- * @param {Grid} grid the grid we're working on
- */
- loadData: function (grid) {
- // save number of currently visible rows to calculate new scroll position later - we know that we want
- // to be at approximately the row we're currently at
- grid.infiniteScroll.previousVisibleRows = grid.renderContainers.body.visibleRowCache.length;
- grid.infiniteScroll.direction = grid.scrollDirection;
- delete grid.infiniteScroll.prevScrollTop;
-
- if (grid.scrollDirection === uiGridConstants.scrollDirection.UP && grid.infiniteScroll.scrollUp ) {
- grid.infiniteScroll.dataLoading = true;
- grid.api.infiniteScroll.raise.needLoadMoreDataTop();
- } else if (grid.scrollDirection === uiGridConstants.scrollDirection.DOWN && grid.infiniteScroll.scrollDown ) {
- grid.infiniteScroll.dataLoading = true;
- grid.api.infiniteScroll.raise.needLoadMoreData();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name adjustScroll
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description Once we are informed that data has been loaded, adjust the scroll position to account for that
- * addition and to make things look clean.
- *
- * If we're scrolling up we scroll to the first row of the old data set -
- * so we're assuming that you would have gotten to the top of the grid (from the 20% need more data trigger) by
- * the time the data comes back. If we're scrolling down we scoll to the last row of the old data set - so we're
- * assuming that you would have gotten to the bottom of the grid (from the 80% need more data trigger) by the time
- * the data comes back.
- *
- * Neither of these are good assumptions, but making this a smoother experience really requires
- * that trigger to not be a percentage, and to be much closer to the end of the data (say, 5 rows off the end). Even then
- * it'd be better still to actually run into the end. But if the data takes a while to come back, they may have scrolled
- * somewhere else in the mean-time, in which case they'll get a jump back to the new data. Anyway, this will do for
- * now, until someone wants to do better.
- * @param {Grid} grid the grid we're working on
- * @returns {promise} a promise that is resolved when scrolling has finished
- */
- adjustScroll: function(grid){
- var promise = $q.defer();
- $timeout(function () {
- var newPercentage, viewportHeight, rowHeight, newVisibleRows, oldTop, newTop;
-
- viewportHeight = grid.getViewportHeight() + grid.headerHeight - grid.renderContainers.body.headerHeight - grid.scrollbarHeight;
- rowHeight = grid.options.rowHeight;
-
- if ( grid.infiniteScroll.direction === undefined ){
- // called from initialize, tweak our scroll up a little
- service.adjustInfiniteScrollPosition(grid, 0);
- }
-
- newVisibleRows = grid.getVisibleRowCount();
-
- // in case not enough data is loaded to enable scroller - load more data
- var canvasHeight = rowHeight * newVisibleRows;
- if (grid.infiniteScroll.scrollDown && (viewportHeight > canvasHeight)) {
- grid.api.infiniteScroll.raise.needLoadMoreData();
- }
-
- if ( grid.infiniteScroll.direction === uiGridConstants.scrollDirection.UP ){
- oldTop = grid.infiniteScroll.prevScrollTop || 0;
- newTop = oldTop + (newVisibleRows - grid.infiniteScroll.previousVisibleRows)*rowHeight;
- service.adjustInfiniteScrollPosition(grid, newTop);
- $timeout( function() {
- promise.resolve();
- });
- }
-
- if ( grid.infiniteScroll.direction === uiGridConstants.scrollDirection.DOWN ){
- newTop = grid.infiniteScroll.prevScrollTop || (grid.infiniteScroll.previousVisibleRows*rowHeight - viewportHeight);
- service.adjustInfiniteScrollPosition(grid, newTop);
- $timeout( function() {
- promise.resolve();
- });
- }
- }, 0);
-
- return promise.promise;
- },
-
-
- /**
- * @ngdoc function
- * @name adjustInfiniteScrollPosition
- * @methodOf ui.grid.infiniteScroll.service:uiGridInfiniteScrollService
- * @description This function fires 'needLoadMoreData' or 'needLoadMoreDataTop' event based on scrollDirection
- * @param {Grid} grid the grid we're working on
- * @param {number} scrollTop the position through the grid that we want to scroll to
- * @returns {promise} a promise that is resolved when the scrolling finishes
- */
- adjustInfiniteScrollPosition: function (grid, scrollTop) {
- var scrollEvent = new ScrollEvent(grid, null, null, 'ui.grid.adjustInfiniteScrollPosition'),
- visibleRows = grid.getVisibleRowCount(),
- viewportHeight = grid.getViewportHeight() + grid.headerHeight - grid.renderContainers.body.headerHeight - grid.scrollbarHeight,
- rowHeight = grid.options.rowHeight,
- scrollHeight = visibleRows*rowHeight-viewportHeight;
-
- //for infinite scroll, if there are pages upwards then never allow it to be at the zero position so the up button can be active
- if (scrollTop === 0 && grid.infiniteScroll.scrollUp) {
- // using pixels results in a relative scroll, hence we have to use percentage
- scrollEvent.y = {percentage: 1/scrollHeight};
- }
- else {
- scrollEvent.y = {percentage: scrollTop/scrollHeight};
- }
- grid.scrollContainers('', scrollEvent);
- },
-
-
- /**
- * @ngdoc function
- * @name dataRemovedTop
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the top. You should
- * have called `saveScrollPercentage` before you remove the data, and if you're doing this in
- * response to a `needMoreData` you should wait until the promise from `loadData` has resolved
- * before you start removing data
- * @param {Grid} grid the grid we're working on
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- * @returns {promise} a promise that is resolved when the scrolling finishes
- */
- dataRemovedTop: function( grid, scrollUp, scrollDown ) {
- var newVisibleRows, oldTop, newTop, rowHeight;
- service.setScrollDirections( grid, scrollUp, scrollDown );
-
- newVisibleRows = grid.renderContainers.body.visibleRowCache.length;
- oldTop = grid.infiniteScroll.prevScrollTop;
- rowHeight = grid.options.rowHeight;
-
- // since we removed from the top, our new scroll row will be the old scroll row less the number
- // of rows removed
- newTop = oldTop - ( grid.infiniteScroll.previousVisibleRows - newVisibleRows )*rowHeight;
-
- return service.adjustInfiniteScrollPosition( grid, newTop );
- },
-
- /**
- * @ngdoc function
- * @name dataRemovedBottom
- * @methodOf ui.grid.infiniteScroll.api:PublicAPI
- * @description Adjusts the scroll position after you've removed data at the bottom. You should
- * have called `saveScrollPercentage` before you remove the data, and if you're doing this in
- * response to a `needMoreData` you should wait until the promise from `loadData` has resolved
- * before you start removing data
- * @param {Grid} grid the grid we're working on
- * @param {boolean} scrollUp flag that there are pages upwards, fire
- * infinite scroll events upward
- * @param {boolean} scrollDown flag that there are pages downwards, so
- * fire infinite scroll events downward
- */
- dataRemovedBottom: function( grid, scrollUp, scrollDown ) {
- var newTop;
- service.setScrollDirections( grid, scrollUp, scrollDown );
-
- newTop = grid.infiniteScroll.prevScrollTop;
-
- return service.adjustInfiniteScrollPosition( grid, newTop );
- }
- };
- return service;
- }]);
- /**
- * @ngdoc directive
- * @name ui.grid.infiniteScroll.directive:uiGridInfiniteScroll
- * @element div
- * @restrict A
- *
- * @description Adds infinite scroll features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.infiniteScroll']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Alex', car: 'Toyota' },
- { name: 'Sam', car: 'Lexus' }
- ];
-
- $scope.columnDefs = [
- {name: 'name'},
- {name: 'car'}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-infinite-scroll="20"></div>
- </div>
- </file>
- </example>
- */
-
- module.directive('uiGridInfiniteScroll', ['uiGridInfiniteScrollService',
- function (uiGridInfiniteScrollService) {
- return {
- priority: -200,
- scope: false,
- require: '^uiGrid',
- compile: function($scope, $elm, $attr){
- return {
- pre: function($scope, $elm, $attr, uiGridCtrl) {
- uiGridInfiniteScrollService.initializeGrid(uiGridCtrl.grid, $scope);
- },
- post: function($scope, $elm, $attr) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.moveColumns
- * @description
- *
- * # ui.grid.moveColumns
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides column moving capability to ui.grid. It enables to change the position of columns.
- * <div doc-module-components="ui.grid.moveColumns"></div>
- */
- var module = angular.module('ui.grid.moveColumns', ['ui.grid']);
-
- /**
- * @ngdoc service
- * @name ui.grid.moveColumns.service:uiGridMoveColumnService
- * @description Service for column moving feature.
- */
- module.service('uiGridMoveColumnService', ['$q', '$timeout', '$log', 'ScrollEvent', 'uiGridConstants', 'gridUtil', function ($q, $timeout, $log, ScrollEvent, uiGridConstants, gridUtil) {
-
- var service = {
- initializeGrid: function (grid) {
- var self = this;
- this.registerPublicApi(grid);
- this.defaultGridOptions(grid.options);
- grid.moveColumns = {orderCache: []}; // Used to cache the order before columns are rebuilt
- grid.registerColumnBuilder(self.movableColumnBuilder);
- grid.registerDataChangeCallback(self.verifyColumnOrder, [uiGridConstants.dataChange.COLUMN]);
- },
- registerPublicApi: function (grid) {
- var self = this;
- /**
- * @ngdoc object
- * @name ui.grid.moveColumns.api:PublicApi
- * @description Public Api for column moving feature.
- */
- var publicApi = {
- events: {
- /**
- * @ngdoc event
- * @name columnPositionChanged
- * @eventOf ui.grid.moveColumns.api:PublicApi
- * @description raised when column is moved
- * <pre>
- * gridApi.colMovable.on.columnPositionChanged(scope,function(colDef, originalPosition, newPosition){})
- * </pre>
- * @param {object} colDef the column that was moved
- * @param {integer} originalPosition of the column
- * @param {integer} finalPosition of the column
- */
- colMovable: {
- columnPositionChanged: function (colDef, originalPosition, newPosition) {
- }
- }
- },
- methods: {
- /**
- * @ngdoc method
- * @name moveColumn
- * @methodOf ui.grid.moveColumns.api:PublicApi
- * @description Method can be used to change column position.
- * <pre>
- * gridApi.colMovable.moveColumn(oldPosition, newPosition)
- * </pre>
- * @param {integer} originalPosition of the column
- * @param {integer} finalPosition of the column
- */
- colMovable: {
- moveColumn: function (originalPosition, finalPosition) {
- var columns = grid.columns;
- if (!angular.isNumber(originalPosition) || !angular.isNumber(finalPosition)) {
- gridUtil.logError('MoveColumn: Please provide valid values for originalPosition and finalPosition');
- return;
- }
- var nonMovableColumns = 0;
- for (var i = 0; i < columns.length; i++) {
- if ((angular.isDefined(columns[i].colDef.visible) && columns[i].colDef.visible === false) || columns[i].isRowHeader === true) {
- nonMovableColumns++;
- }
- }
- if (originalPosition >= (columns.length - nonMovableColumns) || finalPosition >= (columns.length - nonMovableColumns)) {
- gridUtil.logError('MoveColumn: Invalid values for originalPosition, finalPosition');
- return;
- }
- var findPositionForRenderIndex = function (index) {
- var position = index;
- for (var i = 0; i <= position; i++) {
- if (angular.isDefined(columns[i]) && ((angular.isDefined(columns[i].colDef.visible) && columns[i].colDef.visible === false) || columns[i].isRowHeader === true)) {
- position++;
- }
- }
- return position;
- };
- self.redrawColumnAtPosition(grid, findPositionForRenderIndex(originalPosition), findPositionForRenderIndex(finalPosition));
- }
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
- defaultGridOptions: function (gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.moveColumns.api:GridOptions
- *
- * @description Options for configuring the move column feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- /**
- * @ngdoc object
- * @name enableColumnMoving
- * @propertyOf ui.grid.moveColumns.api:GridOptions
- * @description If defined, sets the default value for the colMovable flag on each individual colDefs
- * if their individual enableColumnMoving configuration is not defined. Defaults to true.
- */
- gridOptions.enableColumnMoving = gridOptions.enableColumnMoving !== false;
- },
- movableColumnBuilder: function (colDef, col, gridOptions) {
- var promises = [];
- /**
- * @ngdoc object
- * @name ui.grid.moveColumns.api:ColumnDef
- *
- * @description Column Definition for move column feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
- /**
- * @ngdoc object
- * @name enableColumnMoving
- * @propertyOf ui.grid.moveColumns.api:ColumnDef
- * @description Enable column moving for the column.
- */
- colDef.enableColumnMoving = colDef.enableColumnMoving === undefined ? gridOptions.enableColumnMoving
- : colDef.enableColumnMoving;
- return $q.all(promises);
- },
- /**
- * @ngdoc method
- * @name updateColumnCache
- * @methodOf ui.grid.moveColumns
- * @description Cache the current order of columns, so we can restore them after new columnDefs are defined
- */
- updateColumnCache: function(grid){
- grid.moveColumns.orderCache = grid.getOnlyDataColumns();
- },
- /**
- * @ngdoc method
- * @name verifyColumnOrder
- * @methodOf ui.grid.moveColumns
- * @description dataChangeCallback which uses the cached column order to restore the column order
- * when it is reset by altering the columnDefs array.
- */
- verifyColumnOrder: function(grid){
- var headerRowOffset = grid.rowHeaderColumns.length;
- var newIndex;
-
- angular.forEach(grid.moveColumns.orderCache, function(cacheCol, cacheIndex){
- newIndex = grid.columns.indexOf(cacheCol);
- if ( newIndex !== -1 && newIndex - headerRowOffset !== cacheIndex ){
- var column = grid.columns.splice(newIndex, 1)[0];
- grid.columns.splice(cacheIndex + headerRowOffset, 0, column);
- }
- });
- },
- redrawColumnAtPosition: function (grid, originalPosition, newPosition) {
-
- var columns = grid.columns;
-
- var originalColumn = columns[originalPosition];
- if (originalColumn.colDef.enableColumnMoving) {
- if (originalPosition > newPosition) {
- for (var i1 = originalPosition; i1 > newPosition; i1--) {
- columns[i1] = columns[i1 - 1];
- }
- }
- else if (newPosition > originalPosition) {
- for (var i2 = originalPosition; i2 < newPosition; i2++) {
- columns[i2] = columns[i2 + 1];
- }
- }
- columns[newPosition] = originalColumn;
- service.updateColumnCache(grid);
- grid.queueGridRefresh();
- $timeout(function () {
- grid.api.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
- grid.api.colMovable.raise.columnPositionChanged(originalColumn.colDef, originalPosition, newPosition);
- });
- }
- }
- };
- return service;
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.moveColumns.directive:uiGridMoveColumns
- * @element div
- * @restrict A
- * @description Adds column moving features to the ui-grid directive.
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.moveColumns']);
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO', age: 45 },
- { name: 'Frank', title: 'Lowly Developer', age: 25 },
- { name: 'Jenny', title: 'Highly Developer', age: 35 }
- ];
- $scope.columnDefs = [
- {name: 'name'},
- {name: 'title'},
- {name: 'age'}
- ];
- }]);
- </file>
- <file name="main.css">
- .grid {
- width: 100%;
- height: 150px;
- }
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div class="grid" ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-move-columns></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridMoveColumns', ['uiGridMoveColumnService', function (uiGridMoveColumnService) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridMoveColumnService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.moveColumns.directive:uiGridHeaderCell
- * @element div
- * @restrict A
- *
- * @description Stacks on top of ui.grid.uiGridHeaderCell to provide capability to be able to move it to reposition column.
- *
- * On receiving mouseDown event headerCell is cloned, now as the mouse moves the cloned header cell also moved in the grid.
- * In case the moving cloned header cell reaches the left or right extreme of grid, grid scrolling is triggered (if horizontal scroll exists).
- * On mouseUp event column is repositioned at position where mouse is released and cloned header cell is removed.
- *
- * Events that invoke cloning of header cell:
- * - mousedown
- *
- * Events that invoke movement of cloned header cell:
- * - mousemove
- *
- * Events that invoke repositioning of column:
- * - mouseup
- */
- module.directive('uiGridHeaderCell', ['$q', 'gridUtil', 'uiGridMoveColumnService', '$document', '$log', 'uiGridConstants', 'ScrollEvent',
- function ($q, gridUtil, uiGridMoveColumnService, $document, $log, uiGridConstants, ScrollEvent) {
- return {
- priority: -10,
- require: '^uiGrid',
- compile: function () {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- if ($scope.col.colDef.enableColumnMoving) {
-
- /*
- * Our general approach to column move is that we listen to a touchstart or mousedown
- * event over the column header. When we hear one, then we wait for a move of the same type
- * - if we are a touchstart then we listen for a touchmove, if we are a mousedown we listen for
- * a mousemove (i.e. a drag) before we decide that there's a move underway. If there's never a move,
- * and we instead get a mouseup or a touchend, then we just drop out again and do nothing.
- *
- */
- var $contentsElm = angular.element( $elm[0].querySelectorAll('.ui-grid-cell-contents') );
-
- var gridLeft;
- var previousMouseX;
- var totalMouseMovement;
- var rightMoveLimit;
- var elmCloned = false;
- var movingElm;
- var reducedWidth;
- var moveOccurred = false;
-
- var downFn = function( event ){
- //Setting some variables required for calculations.
- gridLeft = $scope.grid.element[0].getBoundingClientRect().left;
- if ( $scope.grid.hasLeftContainer() ){
- gridLeft += $scope.grid.renderContainers.left.header[0].getBoundingClientRect().width;
- }
-
- previousMouseX = event.pageX;
- totalMouseMovement = 0;
- rightMoveLimit = gridLeft + $scope.grid.getViewportWidth();
-
- if ( event.type === 'mousedown' ){
- $document.on('mousemove', moveFn);
- $document.on('mouseup', upFn);
- } else if ( event.type === 'touchstart' ){
- $document.on('touchmove', moveFn);
- $document.on('touchend', upFn);
- }
- };
-
- var moveFn = function( event ) {
- var changeValue = event.pageX - previousMouseX;
- if ( changeValue === 0 ){ return; }
- //Disable text selection in Chrome during column move
- document.onselectstart = function() { return false; };
-
- moveOccurred = true;
-
- if (!elmCloned) {
- cloneElement();
- }
- else if (elmCloned) {
- moveElement(changeValue);
- previousMouseX = event.pageX;
- }
- };
-
- var upFn = function( event ){
- //Re-enable text selection after column move
- document.onselectstart = null;
-
- //Remove the cloned element on mouse up.
- if (movingElm) {
- movingElm.remove();
- elmCloned = false;
- }
-
- offAllEvents();
- onDownEvents();
-
- if (!moveOccurred){
- return;
- }
-
- var columns = $scope.grid.columns;
- var columnIndex = 0;
- for (var i = 0; i < columns.length; i++) {
- if (columns[i].colDef.name !== $scope.col.colDef.name) {
- columnIndex++;
- }
- else {
- break;
- }
- }
-
- //Case where column should be moved to a position on its left
- if (totalMouseMovement < 0) {
- var totalColumnsLeftWidth = 0;
- for (var il = columnIndex - 1; il >= 0; il--) {
- if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) {
- totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width;
- if (totalColumnsLeftWidth > Math.abs(totalMouseMovement)) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, il + 1);
- break;
- }
- }
- }
- //Case where column should be moved to beginning of the grid.
- if (totalColumnsLeftWidth < Math.abs(totalMouseMovement)) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, 0);
- }
- }
-
- //Case where column should be moved to a position on its right
- else if (totalMouseMovement > 0) {
- var totalColumnsRightWidth = 0;
- for (var ir = columnIndex + 1; ir < columns.length; ir++) {
- if (angular.isUndefined(columns[ir].colDef.visible) || columns[ir].colDef.visible === true) {
- totalColumnsRightWidth += columns[ir].drawnWidth || columns[ir].width || columns[ir].colDef.width;
- if (totalColumnsRightWidth > totalMouseMovement) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, ir - 1);
- break;
- }
- }
- }
- //Case where column should be moved to end of the grid.
- if (totalColumnsRightWidth < totalMouseMovement) {
- uiGridMoveColumnService.redrawColumnAtPosition
- ($scope.grid, columnIndex, columns.length - 1);
- }
- }
- };
-
- var onDownEvents = function(){
- $contentsElm.on('touchstart', downFn);
- $contentsElm.on('mousedown', downFn);
- };
-
- var offAllEvents = function() {
- $contentsElm.off('touchstart', downFn);
- $contentsElm.off('mousedown', downFn);
-
- $document.off('mousemove', moveFn);
- $document.off('touchmove', moveFn);
-
- $document.off('mouseup', upFn);
- $document.off('touchend', upFn);
- };
-
- onDownEvents();
-
-
- var cloneElement = function () {
- elmCloned = true;
-
- //Cloning header cell and appending to current header cell.
- movingElm = $elm.clone();
- $elm.parent().append(movingElm);
-
- //Left of cloned element should be aligned to original header cell.
- movingElm.addClass('movingColumn');
- var movingElementStyles = {};
- var elmLeft;
- if (gridUtil.detectBrowser() === 'safari') {
- //Correction for Safari getBoundingClientRect,
- //which does not correctly compute when there is an horizontal scroll
- elmLeft = $elm[0].offsetLeft + $elm[0].offsetWidth - $elm[0].getBoundingClientRect().width;
- }
- else {
- elmLeft = $elm[0].getBoundingClientRect().left;
- }
- movingElementStyles.left = (elmLeft - gridLeft) + 'px';
- var gridRight = $scope.grid.element[0].getBoundingClientRect().right;
- var elmRight = $elm[0].getBoundingClientRect().right;
- if (elmRight > gridRight) {
- reducedWidth = $scope.col.drawnWidth + (gridRight - elmRight);
- movingElementStyles.width = reducedWidth + 'px';
- }
- movingElm.css(movingElementStyles);
- };
-
- var moveElement = function (changeValue) {
- //Calculate total column width
- var columns = $scope.grid.columns;
- var totalColumnWidth = 0;
- for (var i = 0; i < columns.length; i++) {
- if (angular.isUndefined(columns[i].colDef.visible) || columns[i].colDef.visible === true) {
- totalColumnWidth += columns[i].drawnWidth || columns[i].width || columns[i].colDef.width;
- }
- }
-
- //Calculate new position of left of column
- var currentElmLeft = movingElm[0].getBoundingClientRect().left - 1;
- var currentElmRight = movingElm[0].getBoundingClientRect().right;
- var newElementLeft;
-
- newElementLeft = currentElmLeft - gridLeft + changeValue;
- newElementLeft = newElementLeft < rightMoveLimit ? newElementLeft : rightMoveLimit;
-
- //Update css of moving column to adjust to new left value or fire scroll in case column has reached edge of grid
- if ((currentElmLeft >= gridLeft || changeValue > 0) && (currentElmRight <= rightMoveLimit || changeValue < 0)) {
- movingElm.css({visibility: 'visible', 'left': newElementLeft + 'px'});
- }
- else if (totalColumnWidth > Math.ceil(uiGridCtrl.grid.gridWidth)) {
- changeValue *= 8;
- var scrollEvent = new ScrollEvent($scope.col.grid, null, null, 'uiGridHeaderCell.moveElement');
- scrollEvent.x = {pixels: changeValue};
- scrollEvent.grid.scrollContainers('',scrollEvent);
- }
-
- //Calculate total width of columns on the left of the moving column and the mouse movement
- var totalColumnsLeftWidth = 0;
- for (var il = 0; il < columns.length; il++) {
- if (angular.isUndefined(columns[il].colDef.visible) || columns[il].colDef.visible === true) {
- if (columns[il].colDef.name !== $scope.col.colDef.name) {
- totalColumnsLeftWidth += columns[il].drawnWidth || columns[il].width || columns[il].colDef.width;
- }
- else {
- break;
- }
- }
- }
- if ($scope.newScrollLeft === undefined) {
- totalMouseMovement += changeValue;
- }
- else {
- totalMouseMovement = $scope.newScrollLeft + newElementLeft - totalColumnsLeftWidth;
- }
-
- //Increase width of moving column, in case the rightmost column was moved and its width was
- //decreased because of overflow
- if (reducedWidth < $scope.col.drawnWidth) {
- reducedWidth += Math.abs(changeValue);
- movingElm.css({'width': reducedWidth + 'px'});
- }
- };
- }
- }
- };
- }
- };
- }]);
-})();
-
-(function() {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.pagination
- *
- * @description
- *
- * # ui.grid.pagination
- *
- * <div class="alert alert-warning" role="alert"><strong>Alpha</strong> This feature is in development. There will almost certainly be breaking api changes, or there are major outstanding bugs.</div>
- *
- * This module provides pagination support to ui-grid
- */
- var module = angular.module('ui.grid.pagination', ['ng', 'ui.grid']);
-
- /**
- * @ngdoc service
- * @name ui.grid.pagination.service:uiGridPaginationService
- *
- * @description Service for the pagination feature
- */
- module.service('uiGridPaginationService', ['gridUtil',
- function (gridUtil) {
- var service = {
- /**
- * @ngdoc method
- * @name initializeGrid
- * @methodOf ui.grid.pagination.service:uiGridPaginationService
- * @description Attaches the service to a certain grid
- * @param {Grid} grid The grid we want to work with
- */
- initializeGrid: function (grid) {
- service.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.pagination.api:PublicAPI
- *
- * @description Public API for the pagination feature
- */
- var publicApi = {
- events: {
- pagination: {
- /**
- * @ngdoc event
- * @name paginationChanged
- * @eventOf ui.grid.pagination.api:PublicAPI
- * @description This event fires when the pageSize or currentPage changes
- * @param {int} currentPage requested page number
- * @param {int} pageSize requested page size
- */
- paginationChanged: function (currentPage, pageSize) { }
- }
- },
- methods: {
- pagination: {
- /**
- * @ngdoc method
- * @name getPage
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Returns the number of the current page
- */
- getPage: function () {
- return grid.options.enablePagination ? grid.options.paginationCurrentPage : null;
- },
- /**
- * @ngdoc method
- * @name getTotalPages
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Returns the total number of pages
- */
- getTotalPages: function () {
- if (!grid.options.enablePagination) {
- return null;
- }
-
- return (grid.options.totalItems === 0) ? 1 : Math.ceil(grid.options.totalItems / grid.options.paginationPageSize);
- },
- /**
- * @ngdoc method
- * @name nextPage
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Moves to the next page, if possible
- */
- nextPage: function () {
- if (!grid.options.enablePagination) {
- return;
- }
-
- if (grid.options.totalItems > 0) {
- grid.options.paginationCurrentPage = Math.min(
- grid.options.paginationCurrentPage + 1,
- publicApi.methods.pagination.getTotalPages()
- );
- } else {
- grid.options.paginationCurrentPage++;
- }
- },
- /**
- * @ngdoc method
- * @name previousPage
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Moves to the previous page, if we're not on the first page
- */
- previousPage: function () {
- if (!grid.options.enablePagination) {
- return;
- }
-
- grid.options.paginationCurrentPage = Math.max(grid.options.paginationCurrentPage - 1, 1);
- },
- /**
- * @ngdoc method
- * @name seek
- * @methodOf ui.grid.pagination.api:PublicAPI
- * @description Moves to the requested page
- * @param {int} page The number of the page that should be displayed
- */
- seek: function (page) {
- if (!grid.options.enablePagination) {
- return;
- }
- if (!angular.isNumber(page) || page < 1) {
- throw 'Invalid page number: ' + page;
- }
-
- grid.options.paginationCurrentPage = Math.min(page, publicApi.methods.pagination.getTotalPages());
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- var processPagination = function( renderableRows ){
- if (grid.options.useExternalPagination || !grid.options.enablePagination) {
- return renderableRows;
- }
- //client side pagination
- var pageSize = parseInt(grid.options.paginationPageSize, 10);
- var currentPage = parseInt(grid.options.paginationCurrentPage, 10);
-
- var visibleRows = renderableRows.filter(function (row) { return row.visible; });
- grid.options.totalItems = visibleRows.length;
-
- var firstRow = (currentPage - 1) * pageSize;
- if (firstRow > visibleRows.length) {
- currentPage = grid.options.paginationCurrentPage = 1;
- firstRow = (currentPage - 1) * pageSize;
- }
- return visibleRows.slice(firstRow, firstRow + pageSize);
- };
-
- grid.registerRowsProcessor(processPagination, 900 );
-
- },
- defaultGridOptions: function (gridOptions) {
- /**
- * @ngdoc object
- * @name ui.grid.pagination.api:GridOptions
- *
- * @description GridOptions for the pagination feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc property
- * @name enablePagination
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Enables pagination, defaults to true
- */
- gridOptions.enablePagination = gridOptions.enablePagination !== false;
- /**
- * @ngdoc property
- * @name enablePaginationControls
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Enables the paginator at the bottom of the grid. Turn this off, if you want to implement your
- * own controls outside the grid.
- */
- gridOptions.enablePaginationControls = gridOptions.enablePaginationControls !== false;
- /**
- * @ngdoc property
- * @name useExternalPagination
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Disables client side pagination. When true, handle the paginationChanged event and set data
- * and totalItems, defaults to `false`
- */
- gridOptions.useExternalPagination = gridOptions.useExternalPagination === true;
- /**
- * @ngdoc property
- * @name totalItems
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Total number of items, set automatically when client side pagination, needs set by user
- * for server side pagination
- */
- if (gridUtil.isNullOrUndefined(gridOptions.totalItems)) {
- gridOptions.totalItems = 0;
- }
- /**
- * @ngdoc property
- * @name paginationPageSizes
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Array of page sizes, defaults to `[250, 500, 1000]`
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationPageSizes)) {
- gridOptions.paginationPageSizes = [250, 500, 1000];
- }
- /**
- * @ngdoc property
- * @name paginationPageSize
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Page size, defaults to the first item in paginationPageSizes, or 0 if paginationPageSizes is empty
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationPageSize)) {
- if (gridOptions.paginationPageSizes.length > 0) {
- gridOptions.paginationPageSize = gridOptions.paginationPageSizes[0];
- } else {
- gridOptions.paginationPageSize = 0;
- }
- }
- /**
- * @ngdoc property
- * @name paginationCurrentPage
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description Current page number, defaults to 1
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationCurrentPage)) {
- gridOptions.paginationCurrentPage = 1;
- }
-
- /**
- * @ngdoc property
- * @name paginationTemplate
- * @propertyOf ui.grid.pagination.api:GridOptions
- * @description A custom template for the pager, defaults to `ui-grid/pagination`
- */
- if (gridUtil.isNullOrUndefined(gridOptions.paginationTemplate)) {
- gridOptions.paginationTemplate = 'ui-grid/pagination';
- }
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.pagination.service:uiGridPaginationService
- * @name uiGridPaginationService
- * @description Raises paginationChanged and calls refresh for client side pagination
- * @param {Grid} grid the grid for which the pagination changed
- * @param {int} currentPage requested page number
- * @param {int} pageSize requested page size
- */
- onPaginationChanged: function (grid, currentPage, pageSize) {
- grid.api.pagination.raise.paginationChanged(currentPage, pageSize);
- if (!grid.options.useExternalPagination) {
- grid.queueGridRefresh(); //client side pagination
- }
- }
- };
-
- return service;
- }
- ]);
- /**
- * @ngdoc directive
- * @name ui.grid.pagination.directive:uiGridPagination
- * @element div
- * @restrict A
- *
- * @description Adds pagination features to grid
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.pagination']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Alex', car: 'Toyota' },
- { name: 'Sam', car: 'Lexus' },
- { name: 'Joe', car: 'Dodge' },
- { name: 'Bob', car: 'Buick' },
- { name: 'Cindy', car: 'Ford' },
- { name: 'Brian', car: 'Audi' },
- { name: 'Malcom', car: 'Mercedes Benz' },
- { name: 'Dave', car: 'Ford' },
- { name: 'Stacey', car: 'Audi' },
- { name: 'Amy', car: 'Acura' },
- { name: 'Scott', car: 'Toyota' },
- { name: 'Ryan', car: 'BMW' },
- ];
-
- $scope.gridOptions = {
- data: 'data',
- paginationPageSizes: [5, 10, 25],
- paginationPageSize: 5,
- columnDefs: [
- {name: 'name'},
- {name: 'car'}
- ]
- }
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-pagination></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridPagination', ['gridUtil', 'uiGridPaginationService',
- function (gridUtil, uiGridPaginationService) {
- return {
- priority: -200,
- scope: false,
- require: 'uiGrid',
- link: {
- pre: function ($scope, $elm, $attr, uiGridCtrl) {
- uiGridPaginationService.initializeGrid(uiGridCtrl.grid);
-
- gridUtil.getTemplate(uiGridCtrl.grid.options.paginationTemplate)
- .then(function (contents) {
- var template = angular.element(contents);
- $elm.append(template);
- uiGridCtrl.innerCompile(template);
- });
- }
- }
- };
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.pagination.directive:uiGridPager
- * @element div
- *
- * @description Panel for handling pagination
- */
- module.directive('uiGridPager', ['uiGridPaginationService', 'uiGridConstants', 'gridUtil', 'i18nService',
- function (uiGridPaginationService, uiGridConstants, gridUtil, i18nService) {
- return {
- priority: -200,
- scope: true,
- require: '^uiGrid',
- link: function ($scope, $elm, $attr, uiGridCtrl) {
- var defaultFocusElementSelector = '.ui-grid-pager-control-input';
- $scope.aria = i18nService.getSafeText('pagination.aria'); //Returns an object with all of the aria labels
-
- $scope.paginationApi = uiGridCtrl.grid.api.pagination;
- $scope.sizesLabel = i18nService.getSafeText('pagination.sizes');
- $scope.totalItemsLabel = i18nService.getSafeText('pagination.totalItems');
- $scope.paginationOf = i18nService.getSafeText('pagination.of');
- $scope.paginationThrough = i18nService.getSafeText('pagination.through');
-
- var options = uiGridCtrl.grid.options;
-
- uiGridCtrl.grid.renderContainers.body.registerViewportAdjuster(function (adjustment) {
- adjustment.height = adjustment.height - gridUtil.elementHeight($elm);
- return adjustment;
- });
-
- var dataChangeDereg = uiGridCtrl.grid.registerDataChangeCallback(function (grid) {
- if (!grid.options.useExternalPagination) {
- grid.options.totalItems = grid.rows.length;
- }
- }, [uiGridConstants.dataChange.ROW]);
-
- $scope.$on('$destroy', dataChangeDereg);
-
- var setShowing = function () {
- $scope.showingLow = ((options.paginationCurrentPage - 1) * options.paginationPageSize) + 1;
- $scope.showingHigh = Math.min(options.paginationCurrentPage * options.paginationPageSize, options.totalItems);
- };
-
- var deregT = $scope.$watch('grid.options.totalItems + grid.options.paginationPageSize', setShowing);
-
- var deregP = $scope.$watch('grid.options.paginationCurrentPage + grid.options.paginationPageSize', function (newValues, oldValues) {
- if (newValues === oldValues || oldValues === undefined) {
- return;
- }
-
- if (!angular.isNumber(options.paginationCurrentPage) || options.paginationCurrentPage < 1) {
- options.paginationCurrentPage = 1;
- return;
- }
-
- if (options.totalItems > 0 && options.paginationCurrentPage > $scope.paginationApi.getTotalPages()) {
- options.paginationCurrentPage = $scope.paginationApi.getTotalPages();
- return;
- }
-
- setShowing();
- uiGridPaginationService.onPaginationChanged($scope.grid, options.paginationCurrentPage, options.paginationPageSize);
- }
- );
-
- $scope.$on('$destroy', function() {
- deregT();
- deregP();
- });
-
- $scope.cantPageForward = function () {
- if (options.totalItems > 0) {
- return options.paginationCurrentPage >= $scope.paginationApi.getTotalPages();
- } else {
- return options.data.length < 1;
- }
- };
-
- $scope.cantPageToLast = function () {
- if (options.totalItems > 0) {
- return $scope.cantPageForward();
- } else {
- return true;
- }
- };
-
- $scope.cantPageBackward = function () {
- return options.paginationCurrentPage <= 1;
- };
-
- var focusToInputIf = function(condition){
- if (condition){
- gridUtil.focus.bySelector($elm, defaultFocusElementSelector);
- }
- };
-
- //Takes care of setting focus to the middle element when focus is lost
- $scope.pageFirstPageClick = function () {
- $scope.paginationApi.seek(1);
- focusToInputIf($scope.cantPageBackward());
- };
-
- $scope.pagePreviousPageClick = function () {
- $scope.paginationApi.previousPage();
- focusToInputIf($scope.cantPageBackward());
- };
-
- $scope.pageNextPageClick = function () {
- $scope.paginationApi.nextPage();
- focusToInputIf($scope.cantPageForward());
- };
-
- $scope.pageLastPageClick = function () {
- $scope.paginationApi.seek($scope.paginationApi.getTotalPages());
- focusToInputIf($scope.cantPageToLast());
- };
-
- }
- };
- }
- ]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.pinning
- * @description
- *
- * # ui.grid.pinning
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides column pinning to the end user via menu options in the column header
- *
- * <div doc-module-components="ui.grid.pinning"></div>
- */
-
- var module = angular.module('ui.grid.pinning', ['ui.grid']);
-
- module.constant('uiGridPinningConstants', {
- container: {
- LEFT: 'left',
- RIGHT: 'right',
- NONE: ''
- }
- });
-
- module.service('uiGridPinningService', ['gridUtil', 'GridRenderContainer', 'i18nService', 'uiGridPinningConstants', function (gridUtil, GridRenderContainer, i18nService, uiGridPinningConstants) {
- var service = {
-
- initializeGrid: function (grid) {
- service.defaultGridOptions(grid.options);
-
- // Register a column builder to add new menu items for pinning left and right
- grid.registerColumnBuilder(service.pinningColumnBuilder);
-
- /**
- * @ngdoc object
- * @name ui.grid.pinning.api:PublicApi
- *
- * @description Public Api for pinning feature
- */
- var publicApi = {
- events: {
- pinning: {
- /**
- * @ngdoc event
- * @name columnPin
- * @eventOf ui.grid.pinning.api:PublicApi
- * @description raised when column pin state has changed
- * <pre>
- * gridApi.pinning.on.columnPinned(scope, function(colDef){})
- * </pre>
- * @param {object} colDef the column that was changed
- * @param {string} container the render container the column is in ('left', 'right', '')
- */
- columnPinned: function(colDef, container) {
- }
- }
- },
- methods: {
- pinning: {
- /**
- * @ngdoc function
- * @name pinColumn
- * @methodOf ui.grid.pinning.api:PublicApi
- * @description pin column left, right, or none
- * <pre>
- * gridApi.pinning.pinColumn(col, uiGridPinningConstants.container.LEFT)
- * </pre>
- * @param {gridColumn} col the column being pinned
- * @param {string} container one of the recognised types
- * from uiGridPinningConstants
- */
- pinColumn: function(col, container) {
- service.pinColumn(grid, col, container);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.pinning.api:GridOptions
- *
- * @description GridOptions for pinning feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enablePinning
- * @propertyOf ui.grid.pinning.api:GridOptions
- * @description Enable pinning for the entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enablePinning = gridOptions.enablePinning !== false;
-
- },
-
- pinningColumnBuilder: function (colDef, col, gridOptions) {
- //default to true unless gridOptions or colDef is explicitly false
-
- /**
- * @ngdoc object
- * @name ui.grid.pinning.api:ColumnDef
- *
- * @description ColumnDef for pinning feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enablePinning
- * @propertyOf ui.grid.pinning.api:ColumnDef
- * @description Enable pinning for the individual column.
- * <br/>Defaults to true
- */
- colDef.enablePinning = colDef.enablePinning === undefined ? gridOptions.enablePinning : colDef.enablePinning;
-
-
- /**
- * @ngdoc object
- * @name pinnedLeft
- * @propertyOf ui.grid.pinning.api:ColumnDef
- * @description Column is pinned left when grid is rendered
- * <br/>Defaults to false
- */
-
- /**
- * @ngdoc object
- * @name pinnedRight
- * @propertyOf ui.grid.pinning.api:ColumnDef
- * @description Column is pinned right when grid is rendered
- * <br/>Defaults to false
- */
- if (colDef.pinnedLeft) {
- col.renderContainer = 'left';
- col.grid.createLeftContainer();
- }
- else if (colDef.pinnedRight) {
- col.renderContainer = 'right';
- col.grid.createRightContainer();
- }
-
- if (!colDef.enablePinning) {
- return;
- }
-
- var pinColumnLeftAction = {
- name: 'ui.grid.pinning.pinLeft',
- title: i18nService.get().pinning.pinLeft,
- icon: 'ui-grid-icon-left-open',
- shown: function () {
- return typeof(this.context.col.renderContainer) === 'undefined' || !this.context.col.renderContainer || this.context.col.renderContainer !== 'left';
- },
- action: function () {
- service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.LEFT);
- }
- };
-
- var pinColumnRightAction = {
- name: 'ui.grid.pinning.pinRight',
- title: i18nService.get().pinning.pinRight,
- icon: 'ui-grid-icon-right-open',
- shown: function () {
- return typeof(this.context.col.renderContainer) === 'undefined' || !this.context.col.renderContainer || this.context.col.renderContainer !== 'right';
- },
- action: function () {
- service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.RIGHT);
- }
- };
-
- var removePinAction = {
- name: 'ui.grid.pinning.unpin',
- title: i18nService.get().pinning.unpin,
- icon: 'ui-grid-icon-cancel',
- shown: function () {
- return typeof(this.context.col.renderContainer) !== 'undefined' && this.context.col.renderContainer !== null && this.context.col.renderContainer !== 'body';
- },
- action: function () {
- service.pinColumn(this.context.col.grid, this.context.col, uiGridPinningConstants.container.UNPIN);
- }
- };
-
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.pinning.pinLeft')) {
- col.menuItems.push(pinColumnLeftAction);
- }
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.pinning.pinRight')) {
- col.menuItems.push(pinColumnRightAction);
- }
- if (!gridUtil.arrayContainsObjectWithProperty(col.menuItems, 'name', 'ui.grid.pinning.unpin')) {
- col.menuItems.push(removePinAction);
- }
- },
-
- pinColumn: function(grid, col, container) {
- if (container === uiGridPinningConstants.container.NONE) {
- col.renderContainer = null;
- }
- else {
- col.renderContainer = container;
- if (container === uiGridPinningConstants.container.LEFT) {
- grid.createLeftContainer();
- }
- else if (container === uiGridPinningConstants.container.RIGHT) {
- grid.createRightContainer();
- }
- }
-
- grid.refresh()
- .then(function() {
- grid.api.pinning.raise.columnPinned( col.colDef, container );
- });
- }
- };
-
- return service;
- }]);
-
- module.directive('uiGridPinning', ['gridUtil', 'uiGridPinningService',
- function (gridUtil, uiGridPinningService) {
- return {
- require: 'uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridPinningService.initializeGrid(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
-
-})();
-
-(function(){
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.resizeColumns
- * @description
- *
- * # ui.grid.resizeColumns
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module allows columns to be resized.
- */
- var module = angular.module('ui.grid.resizeColumns', ['ui.grid']);
-
- module.service('uiGridResizeColumnsService', ['gridUtil', '$q', '$timeout',
- function (gridUtil, $q, $timeout) {
-
- var service = {
- defaultGridOptions: function(gridOptions){
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.resizeColumns.api:GridOptions
- *
- * @description GridOptions for resizeColumns feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableColumnResizing
- * @propertyOf ui.grid.resizeColumns.api:GridOptions
- * @description Enable column resizing on the entire grid
- * <br/>Defaults to true
- */
- gridOptions.enableColumnResizing = gridOptions.enableColumnResizing !== false;
-
- //legacy support
- //use old name if it is explicitly false
- if (gridOptions.enableColumnResize === false){
- gridOptions.enableColumnResizing = false;
- }
- },
-
- colResizerColumnBuilder: function (colDef, col, gridOptions) {
-
- var promises = [];
- /**
- * @ngdoc object
- * @name ui.grid.resizeColumns.api:ColumnDef
- *
- * @description ColumnDef for resizeColumns feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- /**
- * @ngdoc object
- * @name enableColumnResizing
- * @propertyOf ui.grid.resizeColumns.api:ColumnDef
- * @description Enable column resizing on an individual column
- * <br/>Defaults to GridOptions.enableColumnResizing
- */
- //default to true unless gridOptions or colDef is explicitly false
- colDef.enableColumnResizing = colDef.enableColumnResizing === undefined ? gridOptions.enableColumnResizing : colDef.enableColumnResizing;
-
-
- //legacy support of old option name
- if (colDef.enableColumnResize === false){
- colDef.enableColumnResizing = false;
- }
-
- return $q.all(promises);
- },
-
- registerPublicApi: function (grid) {
- /**
- * @ngdoc object
- * @name ui.grid.resizeColumns.api:PublicApi
- * @description Public Api for column resize feature.
- */
- var publicApi = {
- events: {
- /**
- * @ngdoc event
- * @name columnSizeChanged
- * @eventOf ui.grid.resizeColumns.api:PublicApi
- * @description raised when column is resized
- * <pre>
- * gridApi.colResizable.on.columnSizeChanged(scope,function(colDef, deltaChange){})
- * </pre>
- * @param {object} colDef the column that was resized
- * @param {integer} delta of the column size change
- */
- colResizable: {
- columnSizeChanged: function (colDef, deltaChange) {
- }
- }
- }
- };
- grid.api.registerEventsFromObject(publicApi.events);
- },
-
- fireColumnSizeChanged: function (grid, colDef, deltaChange) {
- $timeout(function () {
- if ( grid.api.colResizable ){
- grid.api.colResizable.raise.columnSizeChanged(colDef, deltaChange);
- } else {
- gridUtil.logError("The resizeable api is not registered, this may indicate that you've included the module but not added the 'ui-grid-resize-columns' directive to your grid definition. Cannot raise any events.");
- }
- });
- },
-
- // get either this column, or the column next to this column, to resize,
- // returns the column we're going to resize
- findTargetCol: function(col, position, rtlMultiplier){
- var renderContainer = col.getRenderContainer();
-
- if (position === 'left') {
- // Get the column to the left of this one
- var colIndex = renderContainer.visibleColumnCache.indexOf(col);
- return renderContainer.visibleColumnCache[colIndex - 1 * rtlMultiplier];
- } else {
- return col;
- }
- }
-
- };
-
- return service;
-
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.resizeColumns.directive:uiGridResizeColumns
- * @element div
- * @restrict A
- * @description
- * Enables resizing for all columns on the grid. If, for some reason, you want to use the ui-grid-resize-columns directive, but not allow column resizing, you can explicitly set the
- * option to false. This prevents resizing for the entire grid, regardless of individual columnDef options.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid', 'ui.grid.resizeColumns']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.gridOpts = {
- data: [
- { "name": "Ethel Price", "gender": "female", "company": "Enersol" },
- { "name": "Claudine Neal", "gender": "female", "company": "Sealoud" },
- { "name": "Beryl Rice", "gender": "female", "company": "Velity" },
- { "name": "Wilder Gonzales", "gender": "male", "company": "Geekko" }
- ]
- };
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <div class="testGrid" ui-grid="gridOpts" ui-grid-resize-columns ></div>
- </div>
- </doc:source>
- <doc:scenario>
-
- </doc:scenario>
- </doc:example>
- */
- module.directive('uiGridResizeColumns', ['gridUtil', 'uiGridResizeColumnsService', function (gridUtil, uiGridResizeColumnsService) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridResizeColumnsService.defaultGridOptions(uiGridCtrl.grid.options);
- uiGridCtrl.grid.registerColumnBuilder( uiGridResizeColumnsService.colResizerColumnBuilder);
- uiGridResizeColumnsService.registerPublicApi(uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
- // Extend the uiGridHeaderCell directive
- module.directive('uiGridHeaderCell', ['gridUtil', '$templateCache', '$compile', '$q', 'uiGridResizeColumnsService', 'uiGridConstants', '$timeout', function (gridUtil, $templateCache, $compile, $q, uiGridResizeColumnsService, uiGridConstants, $timeout) {
- return {
- // Run after the original uiGridHeaderCell
- priority: -10,
- require: '^uiGrid',
- // scope: false,
- compile: function() {
- return {
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- var grid = uiGridCtrl.grid;
-
- if (grid.options.enableColumnResizing) {
- var columnResizerElm = $templateCache.get('ui-grid/columnResizer');
-
- var rtlMultiplier = 1;
- //when in RTL mode reverse the direction using the rtlMultiplier and change the position to left
- if (grid.isRTL()) {
- $scope.position = 'left';
- rtlMultiplier = -1;
- }
-
- var displayResizers = function(){
-
- // remove any existing resizers.
- var resizers = $elm[0].getElementsByClassName('ui-grid-column-resizer');
- for ( var i = 0; i < resizers.length; i++ ){
- angular.element(resizers[i]).remove();
- }
-
- // get the target column for the left resizer
- var otherCol = uiGridResizeColumnsService.findTargetCol($scope.col, 'left', rtlMultiplier);
- var renderContainer = $scope.col.getRenderContainer();
-
- // Don't append the left resizer if this is the first column or the column to the left of this one has resizing disabled
- if (otherCol && renderContainer.visibleColumnCache.indexOf($scope.col) !== 0 && otherCol.colDef.enableColumnResizing !== false) {
- var resizerLeft = angular.element(columnResizerElm).clone();
- resizerLeft.attr('position', 'left');
-
- $elm.prepend(resizerLeft);
- $compile(resizerLeft)($scope);
- }
-
- // Don't append the right resizer if this column has resizing disabled
- if ($scope.col.colDef.enableColumnResizing !== false) {
- var resizerRight = angular.element(columnResizerElm).clone();
- resizerRight.attr('position', 'right');
-
- $elm.append(resizerRight);
- $compile(resizerRight)($scope);
- }
- };
-
- displayResizers();
-
- var waitDisplay = function(){
- $timeout(displayResizers);
- };
-
- var dataChangeDereg = grid.registerDataChangeCallback( waitDisplay, [uiGridConstants.dataChange.COLUMN] );
-
- $scope.$on( '$destroy', dataChangeDereg );
- }
- }
- };
- }
- };
- }]);
-
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.resizeColumns.directive:uiGridColumnResizer
- * @element div
- * @restrict A
- *
- * @description
- * Draggable handle that controls column resizing.
- *
- * @example
- <doc:example module="app">
- <doc:source>
- <script>
- var app = angular.module('app', ['ui.grid', 'ui.grid.resizeColumns']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.gridOpts = {
- enableColumnResizing: true,
- data: [
- { "name": "Ethel Price", "gender": "female", "company": "Enersol" },
- { "name": "Claudine Neal", "gender": "female", "company": "Sealoud" },
- { "name": "Beryl Rice", "gender": "female", "company": "Velity" },
- { "name": "Wilder Gonzales", "gender": "male", "company": "Geekko" }
- ]
- };
- }]);
- </script>
-
- <div ng-controller="MainCtrl">
- <div class="testGrid" ui-grid="gridOpts"></div>
- </div>
- </doc:source>
- <doc:scenario>
- // TODO: e2e specs?
-
- // TODO: post-resize a horizontal scroll event should be fired
- </doc:scenario>
- </doc:example>
- */
- module.directive('uiGridColumnResizer', ['$document', 'gridUtil', 'uiGridConstants', 'uiGridResizeColumnsService', function ($document, gridUtil, uiGridConstants, uiGridResizeColumnsService) {
- var resizeOverlay = angular.element('<div class="ui-grid-resize-overlay"></div>');
-
- var resizer = {
- priority: 0,
- scope: {
- col: '=',
- position: '@',
- renderIndex: '='
- },
- require: '?^uiGrid',
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- var startX = 0,
- x = 0,
- gridLeft = 0,
- rtlMultiplier = 1;
-
- //when in RTL mode reverse the direction using the rtlMultiplier and change the position to left
- if (uiGridCtrl.grid.isRTL()) {
- $scope.position = 'left';
- rtlMultiplier = -1;
- }
-
- if ($scope.position === 'left') {
- $elm.addClass('left');
- }
- else if ($scope.position === 'right') {
- $elm.addClass('right');
- }
-
- // Refresh the grid canvas
- // takes an argument representing the diff along the X-axis that the resize had
- function refreshCanvas(xDiff) {
- // Then refresh the grid canvas, rebuilding the styles so that the scrollbar updates its size
- uiGridCtrl.grid.refreshCanvas(true).then( function() {
- uiGridCtrl.grid.queueGridRefresh();
- });
- }
-
- // Check that the requested width isn't wider than the maxWidth, or narrower than the minWidth
- // Returns the new recommended with, after constraints applied
- function constrainWidth(col, width){
- var newWidth = width;
-
- // If the new width would be less than the column's allowably minimum width, don't allow it
- if (col.minWidth && newWidth < col.minWidth) {
- newWidth = col.minWidth;
- }
- else if (col.maxWidth && newWidth > col.maxWidth) {
- newWidth = col.maxWidth;
- }
-
- return newWidth;
- }
-
-
- /*
- * Our approach to event handling aims to deal with both touch devices and mouse devices
- * We register down handlers on both touch and mouse. When a touchstart or mousedown event
- * occurs, we register the corresponding touchmove/touchend, or mousemove/mouseend events.
- *
- * This way we can listen for both without worrying about the fact many touch devices also emulate
- * mouse events - basically whichever one we hear first is what we'll go with.
- */
- function moveFunction(event, args) {
- if (event.originalEvent) { event = event.originalEvent; }
- event.preventDefault();
-
- x = (event.targetTouches ? event.targetTouches[0] : event).clientX - gridLeft;
-
- if (x < 0) { x = 0; }
- else if (x > uiGridCtrl.grid.gridWidth) { x = uiGridCtrl.grid.gridWidth; }
-
- var col = uiGridResizeColumnsService.findTargetCol($scope.col, $scope.position, rtlMultiplier);
-
- // Don't resize if it's disabled on this column
- if (col.colDef.enableColumnResizing === false) {
- return;
- }
-
- if (!uiGridCtrl.grid.element.hasClass('column-resizing')) {
- uiGridCtrl.grid.element.addClass('column-resizing');
- }
-
- // Get the diff along the X axis
- var xDiff = x - startX;
-
- // Get the width that this mouse would give the column
- var newWidth = parseInt(col.drawnWidth + xDiff * rtlMultiplier, 10);
-
- // check we're not outside the allowable bounds for this column
- x = x + ( constrainWidth(col, newWidth) - newWidth ) * rtlMultiplier;
-
- resizeOverlay.css({ left: x + 'px' });
-
- uiGridCtrl.fireEvent(uiGridConstants.events.ITEM_DRAGGING);
- }
-
-
- function upFunction(event, args) {
- if (event.originalEvent) { event = event.originalEvent; }
- event.preventDefault();
-
- uiGridCtrl.grid.element.removeClass('column-resizing');
-
- resizeOverlay.remove();
-
- // Resize the column
- x = (event.changedTouches ? event.changedTouches[0] : event).clientX - gridLeft;
- var xDiff = x - startX;
-
- if (xDiff === 0) {
- // no movement, so just reset event handlers, including turning back on both
- // down events - we turned one off when this event started
- offAllEvents();
- onDownEvents();
- return;
- }
-
- var col = uiGridResizeColumnsService.findTargetCol($scope.col, $scope.position, rtlMultiplier);
-
- // Don't resize if it's disabled on this column
- if (col.colDef.enableColumnResizing === false) {
- return;
- }
-
- // Get the new width
- var newWidth = parseInt(col.drawnWidth + xDiff * rtlMultiplier, 10);
-
- // check we're not outside the allowable bounds for this column
- col.width = constrainWidth(col, newWidth);
- col.hasCustomWidth = true;
-
- refreshCanvas(xDiff);
-
- uiGridResizeColumnsService.fireColumnSizeChanged(uiGridCtrl.grid, col.colDef, xDiff);
-
- // stop listening of up and move events - wait for next down
- // reset the down events - we will have turned one off when this event started
- offAllEvents();
- onDownEvents();
- }
-
-
- var downFunction = function(event, args) {
- if (event.originalEvent) { event = event.originalEvent; }
- event.stopPropagation();
-
- // Get the left offset of the grid
- // gridLeft = uiGridCtrl.grid.element[0].offsetLeft;
- gridLeft = uiGridCtrl.grid.element[0].getBoundingClientRect().left;
-
- // Get the starting X position, which is the X coordinate of the click minus the grid's offset
- startX = (event.targetTouches ? event.targetTouches[0] : event).clientX - gridLeft;
-
- // Append the resizer overlay
- uiGridCtrl.grid.element.append(resizeOverlay);
-
- // Place the resizer overlay at the start position
- resizeOverlay.css({ left: startX });
-
- // Add handlers for move and up events - if we were mousedown then we listen for mousemove and mouseup, if
- // we were touchdown then we listen for touchmove and touchup. Also remove the handler for the equivalent
- // down event - so if we're touchdown, then remove the mousedown handler until this event is over, if we're
- // mousedown then remove the touchdown handler until this event is over, this avoids processing duplicate events
- if ( event.type === 'touchstart' ){
- $document.on('touchend', upFunction);
- $document.on('touchmove', moveFunction);
- $elm.off('mousedown', downFunction);
- } else {
- $document.on('mouseup', upFunction);
- $document.on('mousemove', moveFunction);
- $elm.off('touchstart', downFunction);
- }
- };
-
- var onDownEvents = function() {
- $elm.on('mousedown', downFunction);
- $elm.on('touchstart', downFunction);
- };
-
- var offAllEvents = function() {
- $document.off('mouseup', upFunction);
- $document.off('touchend', upFunction);
- $document.off('mousemove', moveFunction);
- $document.off('touchmove', moveFunction);
- $elm.off('mousedown', downFunction);
- $elm.off('touchstart', downFunction);
- };
-
- onDownEvents();
-
-
- // On doubleclick, resize to fit all rendered cells
- var dblClickFn = function(event, args){
- event.stopPropagation();
-
- var col = uiGridResizeColumnsService.findTargetCol($scope.col, $scope.position, rtlMultiplier);
-
- // Don't resize if it's disabled on this column
- if (col.colDef.enableColumnResizing === false) {
- return;
- }
-
- // Go through the rendered rows and find out the max size for the data in this column
- var maxWidth = 0;
- var xDiff = 0;
-
- // Get the parent render container element
- var renderContainerElm = gridUtil.closestElm($elm, '.ui-grid-render-container');
-
- // Get the cell contents so we measure correctly. For the header cell we have to account for the sort icon and the menu buttons, if present
- var cells = renderContainerElm.querySelectorAll('.' + uiGridConstants.COL_CLASS_PREFIX + col.uid + ' .ui-grid-cell-contents');
- Array.prototype.forEach.call(cells, function (cell) {
- // Get the cell width
- // gridUtil.logDebug('width', gridUtil.elementWidth(cell));
-
- // Account for the menu button if it exists
- var menuButton;
- if (angular.element(cell).parent().hasClass('ui-grid-header-cell')) {
- menuButton = angular.element(cell).parent()[0].querySelectorAll('.ui-grid-column-menu-button');
- }
-
- gridUtil.fakeElement(cell, {}, function(newElm) {
- // Make the element float since it's a div and can expand to fill its container
- var e = angular.element(newElm);
- e.attr('style', 'float: left');
-
- var width = gridUtil.elementWidth(e);
-
- if (menuButton) {
- var menuButtonWidth = gridUtil.elementWidth(menuButton);
- width = width + menuButtonWidth;
- }
-
- if (width > maxWidth) {
- maxWidth = width;
- xDiff = maxWidth - width;
- }
- });
- });
-
- // check we're not outside the allowable bounds for this column
- col.width = constrainWidth(col, maxWidth);
- col.hasCustomWidth = true;
-
- refreshCanvas(xDiff);
-
- uiGridResizeColumnsService.fireColumnSizeChanged(uiGridCtrl.grid, col.colDef, xDiff); };
- $elm.on('dblclick', dblClickFn);
-
- $elm.on('$destroy', function() {
- $elm.off('dblclick', dblClickFn);
- offAllEvents();
- });
- }
- };
-
- return resizer;
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.rowEdit
- * @description
- *
- * # ui.grid.rowEdit
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module extends the edit feature to provide tracking and saving of rows
- * of data. The tutorial provides more information on how this feature is best
- * used {@link tutorial/205_row_editable here}.
- * <br/>
- * This feature depends on usage of the ui-grid-edit feature, and also benefits
- * from use of ui-grid-cellNav to provide the full spreadsheet-like editing
- * experience
- *
- */
-
- var module = angular.module('ui.grid.rowEdit', ['ui.grid', 'ui.grid.edit', 'ui.grid.cellNav']);
-
- /**
- * @ngdoc object
- * @name ui.grid.rowEdit.constant:uiGridRowEditConstants
- *
- * @description constants available in row edit module
- */
- module.constant('uiGridRowEditConstants', {
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.rowEdit.service:uiGridRowEditService
- *
- * @description Services for row editing features
- */
- module.service('uiGridRowEditService', ['$interval', '$q', 'uiGridConstants', 'uiGridRowEditConstants', 'gridUtil',
- function ($interval, $q, uiGridConstants, uiGridRowEditConstants, gridUtil) {
-
- var service = {
-
- initializeGrid: function (scope, grid) {
- /**
- * @ngdoc object
- * @name ui.grid.rowEdit.api:PublicApi
- *
- * @description Public Api for rowEdit feature
- */
-
- grid.rowEdit = {};
-
- var publicApi = {
- events: {
- rowEdit: {
- /**
- * @ngdoc event
- * @eventOf ui.grid.rowEdit.api:PublicApi
- * @name saveRow
- * @description raised when a row is ready for saving. Once your
- * row has saved you may need to use angular.extend to update the
- * data entity with any changed data from your save (for example,
- * lock version information if you're using optimistic locking,
- * or last update time/user information).
- *
- * Your method should call setSavePromise somewhere in the body before
- * returning control. The feature will then wait, with the gridRow greyed out
- * whilst this promise is being resolved.
- *
- * <pre>
- * gridApi.rowEdit.on.saveRow(scope,function(rowEntity){})
- * </pre>
- * and somewhere within the event handler:
- * <pre>
- * gridApi.rowEdit.setSavePromise( rowEntity, savePromise)
- * </pre>
- * @param {object} rowEntity the options.data element that was edited
- * @returns {promise} Your saveRow method should return a promise, the
- * promise should either be resolved (implying successful save), or
- * rejected (implying an error).
- */
- saveRow: function (rowEntity) {
- }
- }
- },
- methods: {
- rowEdit: {
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name setSavePromise
- * @description Sets the promise associated with the row save, mandatory that
- * the saveRow event handler calls this method somewhere before returning.
- * <pre>
- * gridApi.rowEdit.setSavePromise(rowEntity, savePromise)
- * </pre>
- * @param {object} rowEntity a data row from the grid for which a save has
- * been initiated
- * @param {promise} savePromise the promise that will be resolved when the
- * save is successful, or rejected if the save fails
- *
- */
- setSavePromise: function ( rowEntity, savePromise) {
- service.setSavePromise(grid, rowEntity, savePromise);
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name getDirtyRows
- * @description Returns all currently dirty rows
- * <pre>
- * gridApi.rowEdit.getDirtyRows(grid)
- * </pre>
- * @returns {array} An array of gridRows that are currently dirty
- *
- */
- getDirtyRows: function () {
- return grid.rowEdit.dirtyRows ? grid.rowEdit.dirtyRows : [];
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name getErrorRows
- * @description Returns all currently errored rows
- * <pre>
- * gridApi.rowEdit.getErrorRows(grid)
- * </pre>
- * @returns {array} An array of gridRows that are currently in error
- *
- */
- getErrorRows: function () {
- return grid.rowEdit.errorRows ? grid.rowEdit.errorRows : [];
- },
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name flushDirtyRows
- * @description Triggers a save event for all currently dirty rows, could
- * be used where user presses a save button or navigates away from the page
- * <pre>
- * gridApi.rowEdit.flushDirtyRows(grid)
- * </pre>
- * @returns {promise} a promise that represents the aggregate of all
- * of the individual save promises - i.e. it will be resolved when all
- * the individual save promises have been resolved.
- *
- */
- flushDirtyRows: function () {
- return service.flushDirtyRows(grid);
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name setRowsDirty
- * @description Sets each of the rows passed in dataRows
- * to be dirty. note that if you have only just inserted the
- * rows into your data you will need to wait for a $digest cycle
- * before the gridRows are present - so often you would wrap this
- * call in a $interval or $timeout
- * <pre>
- * $interval( function() {
- * gridApi.rowEdit.setRowsDirty(myDataRows);
- * }, 0, 1);
- * </pre>
- * @param {array} dataRows the data entities for which the gridRows
- * should be set dirty.
- *
- */
- setRowsDirty: function ( dataRows) {
- service.setRowsDirty(grid, dataRows);
- },
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.api:PublicApi
- * @name setRowsClean
- * @description Sets each of the rows passed in dataRows
- * to be clean, removing them from the dirty cache and the error cache,
- * and clearing the error flag and the dirty flag
- * <pre>
- * var gridRows = $scope.gridApi.rowEdit.getDirtyRows();
- * var dataRows = gridRows.map( function( gridRow ) { return gridRow.entity; });
- * $scope.gridApi.rowEdit.setRowsClean( dataRows );
- * </pre>
- * @param {array} dataRows the data entities for which the gridRows
- * should be set clean.
- *
- */
- setRowsClean: function ( dataRows) {
- service.setRowsClean(grid, dataRows);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- grid.api.core.on.renderingComplete( scope, function ( gridApi ) {
- grid.api.edit.on.afterCellEdit( scope, service.endEditCell );
- grid.api.edit.on.beginCellEdit( scope, service.beginEditCell );
- grid.api.edit.on.cancelCellEdit( scope, service.cancelEditCell );
-
- if ( grid.api.cellNav ) {
- grid.api.cellNav.on.navigate( scope, service.navigate );
- }
- });
-
- },
-
- defaultGridOptions: function (gridOptions) {
-
- /**
- * @ngdoc object
- * @name ui.grid.rowEdit.api:GridOptions
- *
- * @description Options for configuring the rowEdit feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name saveRow
- * @description Returns a function that saves the specified row from the grid,
- * and returns a promise
- * @param {object} grid the grid for which dirty rows should be flushed
- * @param {GridRow} gridRow the row that should be saved
- * @returns {function} the saveRow function returns a function. That function
- * in turn, when called, returns a promise relating to the save callback
- */
- saveRow: function ( grid, gridRow ) {
- var self = this;
-
- return function() {
- gridRow.isSaving = true;
-
- if ( gridRow.rowEditSavePromise ){
- // don't save the row again if it's already saving - that causes stale object exceptions
- return gridRow.rowEditSavePromise;
- }
-
- var promise = grid.api.rowEdit.raise.saveRow( gridRow.entity );
-
- if ( gridRow.rowEditSavePromise ){
- gridRow.rowEditSavePromise.then( self.processSuccessPromise( grid, gridRow ), self.processErrorPromise( grid, gridRow ));
- } else {
- gridUtil.logError( 'A promise was not returned when saveRow event was raised, either nobody is listening to event, or event handler did not return a promise' );
- }
- return promise;
- };
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name setSavePromise
- * @description Sets the promise associated with the row save, mandatory that
- * the saveRow event handler calls this method somewhere before returning.
- * <pre>
- * gridApi.rowEdit.setSavePromise(grid, rowEntity)
- * </pre>
- * @param {object} grid the grid for which dirty rows should be returned
- * @param {object} rowEntity a data row from the grid for which a save has
- * been initiated
- * @param {promise} savePromise the promise that will be resolved when the
- * save is successful, or rejected if the save fails
- *
- */
- setSavePromise: function (grid, rowEntity, savePromise) {
- var gridRow = grid.getRow( rowEntity );
- gridRow.rowEditSavePromise = savePromise;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name processSuccessPromise
- * @description Returns a function that processes the successful
- * resolution of a save promise
- * @param {object} grid the grid for which the promise should be processed
- * @param {GridRow} gridRow the row that has been saved
- * @returns {function} the success handling function
- */
- processSuccessPromise: function ( grid, gridRow ) {
- var self = this;
-
- return function() {
- delete gridRow.isSaving;
- delete gridRow.isDirty;
- delete gridRow.isError;
- delete gridRow.rowEditSaveTimer;
- delete gridRow.rowEditSavePromise;
- self.removeRow( grid.rowEdit.errorRows, gridRow );
- self.removeRow( grid.rowEdit.dirtyRows, gridRow );
- };
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name processErrorPromise
- * @description Returns a function that processes the failed
- * resolution of a save promise
- * @param {object} grid the grid for which the promise should be processed
- * @param {GridRow} gridRow the row that is now in error
- * @returns {function} the error handling function
- */
- processErrorPromise: function ( grid, gridRow ) {
- return function() {
- delete gridRow.isSaving;
- delete gridRow.rowEditSaveTimer;
- delete gridRow.rowEditSavePromise;
-
- gridRow.isError = true;
-
- if (!grid.rowEdit.errorRows){
- grid.rowEdit.errorRows = [];
- }
- if (!service.isRowPresent( grid.rowEdit.errorRows, gridRow ) ){
- grid.rowEdit.errorRows.push( gridRow );
- }
- };
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name removeRow
- * @description Removes a row from a cache of rows - either
- * grid.rowEdit.errorRows or grid.rowEdit.dirtyRows. If the row
- * is not present silently does nothing.
- * @param {array} rowArray the array from which to remove the row
- * @param {GridRow} gridRow the row that should be removed
- */
- removeRow: function( rowArray, removeGridRow ){
- if (typeof(rowArray) === 'undefined' || rowArray === null){
- return;
- }
-
- rowArray.forEach( function( gridRow, index ){
- if ( gridRow.uid === removeGridRow.uid ){
- rowArray.splice( index, 1);
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name isRowPresent
- * @description Checks whether a row is already present
- * in the given array
- * @param {array} rowArray the array in which to look for the row
- * @param {GridRow} gridRow the row that should be looked for
- */
- isRowPresent: function( rowArray, removeGridRow ){
- var present = false;
- rowArray.forEach( function( gridRow, index ){
- if ( gridRow.uid === removeGridRow.uid ){
- present = true;
- }
- });
- return present;
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name flushDirtyRows
- * @description Triggers a save event for all currently dirty rows, could
- * be used where user presses a save button or navigates away from the page
- * <pre>
- * gridApi.rowEdit.flushDirtyRows(grid)
- * </pre>
- * @param {object} grid the grid for which dirty rows should be flushed
- * @returns {promise} a promise that represents the aggregate of all
- * of the individual save promises - i.e. it will be resolved when all
- * the individual save promises have been resolved.
- *
- */
- flushDirtyRows: function(grid){
- var promises = [];
- grid.api.rowEdit.getDirtyRows().forEach( function( gridRow ){
- service.saveRow( grid, gridRow )();
- promises.push( gridRow.rowEditSavePromise );
- });
-
- return $q.all( promises );
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name endEditCell
- * @description Receives an afterCellEdit event from the edit function,
- * and sets flags as appropriate. Only the rowEntity parameter
- * is processed, although other params are available. Grid
- * is automatically provided by the gridApi.
- * @param {object} rowEntity the data entity for which the cell
- * was edited
- */
- endEditCell: function( rowEntity, colDef, newValue, previousValue ){
- var grid = this.grid;
- var gridRow = grid.getRow( rowEntity );
- if ( !gridRow ){ gridUtil.logError( 'Unable to find rowEntity in grid data, dirty flag cannot be set' ); return; }
-
- if ( newValue !== previousValue || gridRow.isDirty ){
- if ( !grid.rowEdit.dirtyRows ){
- grid.rowEdit.dirtyRows = [];
- }
-
- if ( !gridRow.isDirty ){
- gridRow.isDirty = true;
- grid.rowEdit.dirtyRows.push( gridRow );
- }
-
- delete gridRow.isError;
-
- service.considerSetTimer( grid, gridRow );
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name beginEditCell
- * @description Receives a beginCellEdit event from the edit function,
- * and cancels any rowEditSaveTimers if present, as the user is still editing
- * this row. Only the rowEntity parameter
- * is processed, although other params are available. Grid
- * is automatically provided by the gridApi.
- * @param {object} rowEntity the data entity for which the cell
- * editing has commenced
- */
- beginEditCell: function( rowEntity, colDef ){
- var grid = this.grid;
- var gridRow = grid.getRow( rowEntity );
- if ( !gridRow ){ gridUtil.logError( 'Unable to find rowEntity in grid data, timer cannot be cancelled' ); return; }
-
- service.cancelTimer( grid, gridRow );
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name cancelEditCell
- * @description Receives a cancelCellEdit event from the edit function,
- * and if the row was already dirty, restarts the save timer. If the row
- * was not already dirty, then it's not dirty now either and does nothing.
- *
- * Only the rowEntity parameter
- * is processed, although other params are available. Grid
- * is automatically provided by the gridApi.
- *
- * @param {object} rowEntity the data entity for which the cell
- * editing was cancelled
- */
- cancelEditCell: function( rowEntity, colDef ){
- var grid = this.grid;
- var gridRow = grid.getRow( rowEntity );
- if ( !gridRow ){ gridUtil.logError( 'Unable to find rowEntity in grid data, timer cannot be set' ); return; }
-
- service.considerSetTimer( grid, gridRow );
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name navigate
- * @description cellNav tells us that the selected cell has changed. If
- * the new row had a timer running, then stop it similar to in a beginCellEdit
- * call. If the old row is dirty and not the same as the new row, then
- * start a timer on it.
- * @param {object} newRowCol the row and column that were selected
- * @param {object} oldRowCol the row and column that was left
- *
- */
- navigate: function( newRowCol, oldRowCol ){
- var grid = this.grid;
- if ( newRowCol.row.rowEditSaveTimer ){
- service.cancelTimer( grid, newRowCol.row );
- }
-
- if ( oldRowCol && oldRowCol.row && oldRowCol.row !== newRowCol.row ){
- service.considerSetTimer( grid, oldRowCol.row );
- }
- },
-
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.rowEdit.api:GridOptions
- * @name rowEditWaitInterval
- * @description How long the grid should wait for another change on this row
- * before triggering a save (in milliseconds). If set to -1, then saves are
- * never triggered by timer (implying that the user will call flushDirtyRows()
- * manually)
- *
- * @example
- * Setting the wait interval to 4 seconds
- * <pre>
- * $scope.gridOptions = { rowEditWaitInterval: 4000 }
- * </pre>
- *
- */
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name considerSetTimer
- * @description Consider setting a timer on this row (if it is dirty). if there is a timer running
- * on the row and the row isn't currently saving, cancel it, using cancelTimer, then if the row is
- * dirty and not currently saving then set a new timer
- * @param {object} grid the grid for which we are processing
- * @param {GridRow} gridRow the row for which the timer should be adjusted
- *
- */
- considerSetTimer: function( grid, gridRow ){
- service.cancelTimer( grid, gridRow );
-
- if ( gridRow.isDirty && !gridRow.isSaving ){
- if ( grid.options.rowEditWaitInterval !== -1 ){
- var waitTime = grid.options.rowEditWaitInterval ? grid.options.rowEditWaitInterval : 2000;
- gridRow.rowEditSaveTimer = $interval( service.saveRow( grid, gridRow ), waitTime, 1);
- }
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name cancelTimer
- * @description cancel the $interval for any timer running on this row
- * then delete the timer itself
- * @param {object} grid the grid for which we are processing
- * @param {GridRow} gridRow the row for which the timer should be adjusted
- *
- */
- cancelTimer: function( grid, gridRow ){
- if ( gridRow.rowEditSaveTimer && !gridRow.isSaving ){
- $interval.cancel(gridRow.rowEditSaveTimer);
- delete gridRow.rowEditSaveTimer;
- }
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name setRowsDirty
- * @description Sets each of the rows passed in dataRows
- * to be dirty. note that if you have only just inserted the
- * rows into your data you will need to wait for a $digest cycle
- * before the gridRows are present - so often you would wrap this
- * call in a $interval or $timeout
- * <pre>
- * $interval( function() {
- * gridApi.rowEdit.setRowsDirty( myDataRows);
- * }, 0, 1);
- * </pre>
- * @param {object} grid the grid for which rows should be set dirty
- * @param {array} dataRows the data entities for which the gridRows
- * should be set dirty.
- *
- */
- setRowsDirty: function( grid, myDataRows ) {
- var gridRow;
- myDataRows.forEach( function( value, index ){
- gridRow = grid.getRow( value );
- if ( gridRow ){
- if ( !grid.rowEdit.dirtyRows ){
- grid.rowEdit.dirtyRows = [];
- }
-
- if ( !gridRow.isDirty ){
- gridRow.isDirty = true;
- grid.rowEdit.dirtyRows.push( gridRow );
- }
-
- delete gridRow.isError;
-
- service.considerSetTimer( grid, gridRow );
- } else {
- gridUtil.logError( "requested row not found in rowEdit.setRowsDirty, row was: " + value );
- }
- });
- },
-
-
- /**
- * @ngdoc method
- * @methodOf ui.grid.rowEdit.service:uiGridRowEditService
- * @name setRowsClean
- * @description Sets each of the rows passed in dataRows
- * to be clean, clearing the dirty flag and the error flag, and removing
- * the rows from the dirty and error caches.
- * @param {object} grid the grid for which rows should be set clean
- * @param {array} dataRows the data entities for which the gridRows
- * should be set clean.
- *
- */
- setRowsClean: function( grid, myDataRows ) {
- var gridRow;
-
- myDataRows.forEach( function( value, index ){
- gridRow = grid.getRow( value );
- if ( gridRow ){
- delete gridRow.isDirty;
- service.removeRow( grid.rowEdit.dirtyRows, gridRow );
- service.cancelTimer( grid, gridRow );
-
- delete gridRow.isError;
- service.removeRow( grid.rowEdit.errorRows, gridRow );
- } else {
- gridUtil.logError( "requested row not found in rowEdit.setRowsClean, row was: " + value );
- }
- });
- }
-
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.rowEdit.directive:uiGridEdit
- * @element div
- * @restrict A
- *
- * @description Adds row editing features to the ui-grid-edit directive.
- *
- */
- module.directive('uiGridRowEdit', ['gridUtil', 'uiGridRowEditService', 'uiGridEditConstants',
- function (gridUtil, uiGridRowEditService, uiGridEditConstants) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridRowEditService.initializeGrid($scope, uiGridCtrl.grid);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
- }
- };
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.rowEdit.directive:uiGridViewport
- * @element div
- *
- * @description Stacks on top of ui.grid.uiGridViewport to alter the attributes used
- * for the grid row to allow coloring of saving and error rows
- */
- module.directive('uiGridViewport',
- ['$compile', 'uiGridConstants', 'gridUtil', '$parse',
- function ($compile, uiGridConstants, gridUtil, $parse) {
- return {
- priority: -200, // run after default directive
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
-
- var existingNgClass = rowRepeatDiv.attr("ng-class");
- var newNgClass = '';
- if ( existingNgClass ) {
- newNgClass = existingNgClass.slice(0, -1) + ", 'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}";
- } else {
- newNgClass = "{'ui-grid-row-dirty': row.isDirty, 'ui-grid-row-saving': row.isSaving, 'ui-grid-row-error': row.isError}";
- }
- rowRepeatDiv.attr("ng-class", newNgClass);
-
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.saveState
- * @description
- *
- * # ui.grid.saveState
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * This module provides the ability to save the grid state, and restore
- * it when the user returns to the page.
- *
- * No UI is provided, the caller should provide their own UI/buttons
- * as appropriate. Usually the navigate events would be used to save
- * the grid state and restore it.
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.save-state"></div>
- */
-
- var module = angular.module('ui.grid.saveState', ['ui.grid', 'ui.grid.selection', 'ui.grid.cellNav', 'ui.grid.grouping', 'ui.grid.pinning', 'ui.grid.treeView']);
-
- /**
- * @ngdoc object
- * @name ui.grid.saveState.constant:uiGridSaveStateConstants
- *
- * @description constants available in save state module
- */
-
- module.constant('uiGridSaveStateConstants', {
- featureName: 'saveState'
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.saveState.service:uiGridSaveStateService
- *
- * @description Services for saveState feature
- */
- module.service('uiGridSaveStateService', ['$q', 'uiGridSaveStateConstants', 'gridUtil', '$compile', '$interval', 'uiGridConstants',
- function ($q, uiGridSaveStateConstants, gridUtil, $compile, $interval, uiGridConstants ) {
-
- var service = {
-
- initializeGrid: function (grid) {
-
- //add feature namespace and any properties to grid for needed state
- grid.saveState = {};
- this.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.saveState.api:PublicApi
- *
- * @description Public Api for saveState feature
- */
- var publicApi = {
- events: {
- saveState: {
- }
- },
- methods: {
- saveState: {
- /**
- * @ngdoc function
- * @name save
- * @methodOf ui.grid.saveState.api:PublicApi
- * @description Packages the current state of the grid into
- * an object, and provides it to the user for saving
- * @returns {object} the state as a javascript object that can be saved
- */
- save: function () {
- return service.save(grid);
- },
- /**
- * @ngdoc function
- * @name restore
- * @methodOf ui.grid.saveState.api:PublicApi
- * @description Restores the provided state into the grid
- * @param {scope} $scope a scope that we can broadcast on
- * @param {object} state the state that should be restored into the grid
- */
- restore: function ( $scope, state) {
- service.restore(grid, $scope, state);
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.saveState.api:GridOptions
- *
- * @description GridOptions for saveState feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
- /**
- * @ngdoc object
- * @name saveWidths
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current column widths. Note that unless
- * you've provided the user with some way to resize their columns (say
- * the resize columns feature), then this makes little sense.
- * <br/>Defaults to true
- */
- gridOptions.saveWidths = gridOptions.saveWidths !== false;
- /**
- * @ngdoc object
- * @name saveOrder
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Restore the current column order. Note that unless
- * you've provided the user with some way to reorder their columns (for
- * example the move columns feature), this makes little sense.
- * <br/>Defaults to true
- */
- gridOptions.saveOrder = gridOptions.saveOrder !== false;
- /**
- * @ngdoc object
- * @name saveScroll
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current scroll position. Note that this
- * is saved as the percentage of the grid scrolled - so if your
- * user returns to a grid with a significantly different number of
- * rows (perhaps some data has been deleted) then the scroll won't
- * actually show the same rows as before. If you want to scroll to
- * a specific row then you should instead use the saveFocus option, which
- * is the default.
- *
- * Note that this element will only be saved if the cellNav feature is
- * enabled
- * <br/>Defaults to false
- */
- gridOptions.saveScroll = gridOptions.saveScroll === true;
- /**
- * @ngdoc object
- * @name saveFocus
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current focused cell. On returning
- * to this focused cell we'll also scroll. This option is
- * preferred to the saveScroll option, so is set to true by
- * default. If saveScroll is set to true then this option will
- * be disabled.
- *
- * By default this option saves the current row number and column
- * number, and returns to that row and column. However, if you define
- * a saveRowIdentity function, then it will return you to the currently
- * selected column within that row (in a business sense - so if some
- * rows have been deleted, it will still find the same data, presuming it
- * still exists in the list. If it isn't in the list then it will instead
- * return to the same row number - i.e. scroll percentage)
- *
- * Note that this option will do nothing if the cellNav
- * feature is not enabled.
- *
- * <br/>Defaults to true (unless saveScroll is true)
- */
- gridOptions.saveFocus = gridOptions.saveScroll !== true && gridOptions.saveFocus !== false;
- /**
- * @ngdoc object
- * @name saveRowIdentity
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description A function that can be called, passing in a rowEntity,
- * and that will return a unique id for that row. This might simply
- * return the `id` field from that row (if you have one), or it might
- * concatenate some fields within the row to make a unique value.
- *
- * This value will be used to find the same row again and set the focus
- * to it, if it exists when we return.
- *
- * <br/>Defaults to undefined
- */
- /**
- * @ngdoc object
- * @name saveVisible
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save whether or not columns are visible.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveVisible = gridOptions.saveVisible !== false;
- /**
- * @ngdoc object
- * @name saveSort
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current sort state for each column
- *
- * <br/>Defaults to true
- */
- gridOptions.saveSort = gridOptions.saveSort !== false;
- /**
- * @ngdoc object
- * @name saveFilter
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the current filter state for each column
- *
- * <br/>Defaults to true
- */
- gridOptions.saveFilter = gridOptions.saveFilter !== false;
- /**
- * @ngdoc object
- * @name saveSelection
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the currently selected rows. If the `saveRowIdentity` callback
- * is defined, then it will save the id of the row and select that. If not, then
- * it will attempt to select the rows by row number, which will give the wrong results
- * if the data set has changed in the mean-time.
- *
- * Note that this option only does anything
- * if the selection feature is enabled.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveSelection = gridOptions.saveSelection !== false;
- /**
- * @ngdoc object
- * @name saveGrouping
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the grouping configuration. If set to true and the
- * grouping feature is not enabled then does nothing.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveGrouping = gridOptions.saveGrouping !== false;
- /**
- * @ngdoc object
- * @name saveGroupingExpandedStates
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the grouping row expanded states. If set to true and the
- * grouping feature is not enabled then does nothing.
- *
- * This can be quite a bit of data, in many cases you wouldn't want to save this
- * information.
- *
- * <br/>Defaults to false
- */
- gridOptions.saveGroupingExpandedStates = gridOptions.saveGroupingExpandedStates === true;
- /**
- * @ngdoc object
- * @name savePinning
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save pinning state for columns.
- *
- * <br/>Defaults to true
- */
- gridOptions.savePinning = gridOptions.savePinning !== false;
- /**
- * @ngdoc object
- * @name saveTreeView
- * @propertyOf ui.grid.saveState.api:GridOptions
- * @description Save the treeView configuration. If set to true and the
- * treeView feature is not enabled then does nothing.
- *
- * <br/>Defaults to true
- */
- gridOptions.saveTreeView = gridOptions.saveTreeView !== false;
- },
-
-
-
- /**
- * @ngdoc function
- * @name save
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the current grid state into an object, and
- * passes that object back to the caller
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the state ready to be saved
- */
- save: function (grid) {
- var savedState = {};
-
- savedState.columns = service.saveColumns( grid );
- savedState.scrollFocus = service.saveScrollFocus( grid );
- savedState.selection = service.saveSelection( grid );
- savedState.grouping = service.saveGrouping( grid );
- savedState.treeView = service.saveTreeView( grid );
-
- return savedState;
- },
-
-
- /**
- * @ngdoc function
- * @name restore
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Applies the provided state to the grid
- *
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {scope} $scope a scope that we can broadcast on
- * @param {object} state the state we'd like to restore
- */
- restore: function( grid, $scope, state ){
- if ( state.columns ) {
- service.restoreColumns( grid, state.columns );
- }
-
- if ( state.scrollFocus ){
- service.restoreScrollFocus( grid, $scope, state.scrollFocus );
- }
-
- if ( state.selection ){
- service.restoreSelection( grid, state.selection );
- }
-
- if ( state.grouping ){
- service.restoreGrouping( grid, state.grouping );
- }
-
- if ( state.treeView ){
- service.restoreTreeView( grid, state.treeView );
- }
-
- grid.refresh();
- },
-
-
- /**
- * @ngdoc function
- * @name saveColumns
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the column setup, including sort, filters, ordering,
- * pinning and column widths.
- *
- * Works through the current columns, storing them in order. Stores the
- * column name, then the visible flag, width, sort and filters for each column.
- *
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {array} the columns state ready to be saved
- */
- saveColumns: function( grid ) {
- var columns = [];
- grid.getOnlyDataColumns().forEach( function( column ) {
- var savedColumn = {};
- savedColumn.name = column.name;
-
- if ( grid.options.saveVisible ){
- savedColumn.visible = column.visible;
- }
-
- if ( grid.options.saveWidths ){
- savedColumn.width = column.width;
- }
-
- // these two must be copied, not just pointed too - otherwise our saved state is pointing to the same object as current state
- if ( grid.options.saveSort ){
- savedColumn.sort = angular.copy( column.sort );
- }
-
- if ( grid.options.saveFilter ){
- savedColumn.filters = [];
- column.filters.forEach( function( filter ){
- var copiedFilter = {};
- angular.forEach( filter, function( value, key) {
- if ( key !== 'condition' && key !== '$$hashKey' && key !== 'placeholder'){
- copiedFilter[key] = value;
- }
- });
- savedColumn.filters.push(copiedFilter);
- });
- }
-
- if ( !!grid.api.pinning && grid.options.savePinning ){
- savedColumn.pinned = column.renderContainer ? column.renderContainer : '';
- }
-
- columns.push( savedColumn );
- });
-
- return columns;
- },
-
-
- /**
- * @ngdoc function
- * @name saveScrollFocus
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the currently scroll or focus.
- *
- * If cellNav isn't present then does nothing - we can't return
- * to the scroll position without cellNav anyway.
- *
- * If the cellNav module is present, and saveFocus is true, then
- * it saves the currently focused cell. If rowIdentity is present
- * then saves using rowIdentity, otherwise saves visibleRowNum.
- *
- * If the cellNav module is not present, and saveScroll is true, then
- * it approximates the current scroll row and column, and saves that.
- *
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the selection state ready to be saved
- */
- saveScrollFocus: function( grid ){
- if ( !grid.api.cellNav ){
- return {};
- }
-
- var scrollFocus = {};
- if ( grid.options.saveFocus ){
- scrollFocus.focus = true;
- var rowCol = grid.api.cellNav.getFocusedCell();
- if ( rowCol !== null ) {
- if ( rowCol.col !== null ){
- scrollFocus.colName = rowCol.col.colDef.name;
- }
- if ( rowCol.row !== null ){
- scrollFocus.rowVal = service.getRowVal( grid, rowCol.row );
- }
- }
- }
-
- if ( grid.options.saveScroll || grid.options.saveFocus && !scrollFocus.colName && !scrollFocus.rowVal ) {
- scrollFocus.focus = false;
- if ( grid.renderContainers.body.prevRowScrollIndex ){
- scrollFocus.rowVal = service.getRowVal( grid, grid.renderContainers.body.visibleRowCache[ grid.renderContainers.body.prevRowScrollIndex ]);
- }
-
- if ( grid.renderContainers.body.prevColScrollIndex ){
- scrollFocus.colName = grid.renderContainers.body.visibleColumnCache[ grid.renderContainers.body.prevColScrollIndex ].name;
- }
- }
-
- return scrollFocus;
- },
-
-
- /**
- * @ngdoc function
- * @name saveSelection
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the currently selected rows, if the selection feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {array} the selection state ready to be saved
- */
- saveSelection: function( grid ){
- if ( !grid.api.selection || !grid.options.saveSelection ){
- return [];
- }
-
- var selection = grid.api.selection.getSelectedGridRows().map( function( gridRow ) {
- return service.getRowVal( grid, gridRow );
- });
-
- return selection;
- },
-
-
- /**
- * @ngdoc function
- * @name saveGrouping
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the grouping state, if the grouping feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the grouping state ready to be saved
- */
- saveGrouping: function( grid ){
- if ( !grid.api.grouping || !grid.options.saveGrouping ){
- return {};
- }
-
- return grid.api.grouping.getGrouping( grid.options.saveGroupingExpandedStates );
- },
-
-
- /**
- * @ngdoc function
- * @name saveTreeView
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Saves the tree view state, if the tree feature is enabled
- * @param {Grid} grid the grid whose state we'd like to save
- * @returns {object} the tree view state ready to be saved
- */
- saveTreeView: function( grid ){
- if ( !grid.api.treeView || !grid.options.saveTreeView ){
- return {};
- }
-
- return grid.api.treeView.getTreeView();
- },
-
-
- /**
- * @ngdoc function
- * @name getRowVal
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Helper function that gets either the rowNum or
- * the saveRowIdentity, given a gridRow
- * @param {Grid} grid the grid the row is in
- * @param {GridRow} gridRow the row we want the rowNum for
- * @returns {object} an object containing { identity: true/false, row: rowNumber/rowIdentity }
- *
- */
- getRowVal: function( grid, gridRow ){
- if ( !gridRow ) {
- return null;
- }
-
- var rowVal = {};
- if ( grid.options.saveRowIdentity ){
- rowVal.identity = true;
- rowVal.row = grid.options.saveRowIdentity( gridRow.entity );
- } else {
- rowVal.identity = false;
- rowVal.row = grid.renderContainers.body.visibleRowCache.indexOf( gridRow );
- }
- return rowVal;
- },
-
-
- /**
- * @ngdoc function
- * @name restoreColumns
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the columns, including order, visible, width,
- * pinning, sort and filters.
- *
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} columnsState the list of columns we had before, with their state
- */
- restoreColumns: function( grid, columnsState ){
- var isSortChanged = false;
-
- columnsState.forEach( function( columnState, index ) {
- var currentCol = grid.getColumn( columnState.name );
-
- if ( currentCol && !grid.isRowHeaderColumn(currentCol) ){
- if ( grid.options.saveVisible &&
- ( currentCol.visible !== columnState.visible ||
- currentCol.colDef.visible !== columnState.visible ) ){
- currentCol.visible = columnState.visible;
- currentCol.colDef.visible = columnState.visible;
- grid.api.core.raise.columnVisibilityChanged(currentCol);
- }
-
- if ( grid.options.saveWidths ){
- currentCol.width = columnState.width;
- }
-
- if ( grid.options.saveSort &&
- !angular.equals(currentCol.sort, columnState.sort) &&
- !( currentCol.sort === undefined && angular.isEmpty(columnState.sort) ) ){
- currentCol.sort = angular.copy( columnState.sort );
- isSortChanged = true;
- }
-
- if ( grid.options.saveFilter &&
- !angular.equals(currentCol.filters, columnState.filters ) ){
- columnState.filters.forEach( function( filter, index ){
- angular.extend( currentCol.filters[index], filter );
- if ( typeof(filter.term) === 'undefined' || filter.term === null ){
- delete currentCol.filters[index].term;
- }
- });
- grid.api.core.raise.filterChanged();
- }
-
- if ( !!grid.api.pinning && grid.options.savePinning && currentCol.renderContainer !== columnState.pinned ){
- grid.api.pinning.pinColumn(currentCol, columnState.pinned);
- }
-
- var currentIndex = grid.getOnlyDataColumns().indexOf( currentCol );
- if (currentIndex !== -1) {
- if (grid.options.saveOrder && currentIndex !== index) {
- var column = grid.columns.splice(currentIndex + grid.rowHeaderColumns.length, 1)[0];
- grid.columns.splice(index + grid.rowHeaderColumns.length, 0, column);
- }
- }
- }
- });
-
- if ( isSortChanged ) {
- grid.api.core.raise.sortChanged( grid, grid.getColumnSorting() );
- }
- },
-
-
- /**
- * @ngdoc function
- * @name restoreScrollFocus
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Scrolls to the position that was saved. If focus is true, then
- * sets focus to the specified row/col. If focus is false, then scrolls to the
- * specified row/col.
- *
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {scope} $scope a scope that we can broadcast on
- * @param {object} scrollFocusState the scroll/focus state ready to be restored
- */
- restoreScrollFocus: function( grid, $scope, scrollFocusState ){
- if ( !grid.api.cellNav ){
- return;
- }
-
- var colDef, row;
- if ( scrollFocusState.colName ){
- var colDefs = grid.options.columnDefs.filter( function( colDef ) { return colDef.name === scrollFocusState.colName; });
- if ( colDefs.length > 0 ){
- colDef = colDefs[0];
- }
- }
-
- if ( scrollFocusState.rowVal && scrollFocusState.rowVal.row ){
- if ( scrollFocusState.rowVal.identity ){
- row = service.findRowByIdentity( grid, scrollFocusState.rowVal );
- } else {
- row = grid.renderContainers.body.visibleRowCache[ scrollFocusState.rowVal.row ];
- }
- }
-
- var entity = row && row.entity ? row.entity : null ;
-
- if ( colDef || entity ) {
- if (scrollFocusState.focus ){
- grid.api.cellNav.scrollToFocus( entity, colDef );
- } else {
- grid.scrollTo( entity, colDef );
- }
- }
- },
-
-
- /**
- * @ngdoc function
- * @name restoreSelection
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Selects the rows that are provided in the selection
- * state. If you are using `saveRowIdentity` and more than one row matches the identity
- * function then only the first is selected.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} selectionState the selection state ready to be restored
- */
- restoreSelection: function( grid, selectionState ){
- if ( !grid.api.selection ){
- return;
- }
-
- grid.api.selection.clearSelectedRows();
-
- selectionState.forEach( function( rowVal ) {
- if ( rowVal.identity ){
- var foundRow = service.findRowByIdentity( grid, rowVal );
-
- if ( foundRow ){
- grid.api.selection.selectRow( foundRow.entity );
- }
-
- } else {
- grid.api.selection.selectRowByVisibleIndex( rowVal.row );
- }
- });
- },
-
-
- /**
- * @ngdoc function
- * @name restoreGrouping
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the grouping configuration, if the grouping feature
- * is enabled.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} groupingState the grouping state ready to be restored
- */
- restoreGrouping: function( grid, groupingState ){
- if ( !grid.api.grouping || typeof(groupingState) === 'undefined' || groupingState === null || angular.equals(groupingState, {}) ){
- return;
- }
-
- grid.api.grouping.setGrouping( groupingState );
- },
-
- /**
- * @ngdoc function
- * @name restoreTreeView
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Restores the tree view configuration, if the tree view feature
- * is enabled.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} treeViewState the tree view state ready to be restored
- */
- restoreTreeView: function( grid, treeViewState ){
- if ( !grid.api.treeView || typeof(treeViewState) === 'undefined' || treeViewState === null || angular.equals(treeViewState, {}) ){
- return;
- }
-
- grid.api.treeView.setTreeView( treeViewState );
- },
-
- /**
- * @ngdoc function
- * @name findRowByIdentity
- * @methodOf ui.grid.saveState.service:uiGridSaveStateService
- * @description Finds a row given it's identity value, returns the first found row
- * if any are found, otherwise returns null if no rows are found.
- * @param {Grid} grid the grid whose state we'd like to restore
- * @param {object} rowVal the row we'd like to find
- * @returns {gridRow} the found row, or null if none found
- */
- findRowByIdentity: function( grid, rowVal ){
- if ( !grid.options.saveRowIdentity ){
- return null;
- }
-
- var filteredRows = grid.rows.filter( function( gridRow ) {
- if ( grid.options.saveRowIdentity( gridRow.entity ) === rowVal.row ){
- return true;
- } else {
- return false;
- }
- });
-
- if ( filteredRows.length > 0 ){
- return filteredRows[0];
- } else {
- return null;
- }
- }
- };
-
- return service;
-
- }
- ]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.saveState.directive:uiGridSaveState
- * @element div
- * @restrict A
- *
- * @description Adds saveState features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.saveState']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.gridOptions = {
- columnDefs: [
- {name: 'name'},
- {name: 'title', enableCellEdit: true}
- ],
- data: $scope.data
- };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-save-state></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridSaveState', ['uiGridSaveStateConstants', 'uiGridSaveStateService', 'gridUtil', '$compile',
- function (uiGridSaveStateConstants, uiGridSaveStateService, gridUtil, $compile) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridSaveStateService.initializeGrid(uiGridCtrl.grid);
- }
- };
- }
- ]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.selection
- * @description
- *
- * # ui.grid.selection
- * This module provides row selection
- *
- * <div class="alert alert-success" role="alert"><strong>Stable</strong> This feature is stable. There should no longer be breaking api changes without a deprecation warning.</div>
- *
- * <div doc-module-components="ui.grid.selection"></div>
- */
-
- var module = angular.module('ui.grid.selection', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.selection.constant:uiGridSelectionConstants
- *
- * @description constants available in selection module
- */
- module.constant('uiGridSelectionConstants', {
- featureName: "selection",
- selectionRowHeaderColName: 'selectionRowHeaderCol'
- });
-
- //add methods to GridRow
- angular.module('ui.grid').config(['$provide', function($provide) {
- $provide.decorator('GridRow', ['$delegate', function($delegate) {
-
- /**
- * @ngdoc object
- * @name ui.grid.selection.api:GridRow
- *
- * @description GridRow prototype functions added for selection
- */
-
- /**
- * @ngdoc object
- * @name enableSelection
- * @propertyOf ui.grid.selection.api:GridRow
- * @description Enable row selection for this row, only settable by internal code.
- *
- * The grouping feature, for example, might set group header rows to not be selectable.
- * <br/>Defaults to true
- */
-
- /**
- * @ngdoc object
- * @name isSelected
- * @propertyOf ui.grid.selection.api:GridRow
- * @description Selected state of row. Should be readonly. Make any changes to selected state using setSelected().
- * <br/>Defaults to false
- */
-
-
- /**
- * @ngdoc function
- * @name setSelected
- * @methodOf ui.grid.selection.api:GridRow
- * @description Sets the isSelected property and updates the selectedCount
- * Changes to isSelected state should only be made via this function
- * @param {bool} selected value to set
- */
- $delegate.prototype.setSelected = function(selected) {
- this.isSelected = selected;
- if (selected) {
- this.grid.selection.selectedCount++;
- }
- else {
- this.grid.selection.selectedCount--;
- }
- };
-
- return $delegate;
- }]);
- }]);
-
- /**
- * @ngdoc service
- * @name ui.grid.selection.service:uiGridSelectionService
- *
- * @description Services for selection features
- */
- module.service('uiGridSelectionService', ['$q', '$templateCache', 'uiGridSelectionConstants', 'gridUtil',
- function ($q, $templateCache, uiGridSelectionConstants, gridUtil) {
-
- var service = {
-
- initializeGrid: function (grid) {
-
- //add feature namespace and any properties to grid for needed
- /**
- * @ngdoc object
- * @name ui.grid.selection.grid:selection
- *
- * @description Grid properties and functions added for selection
- */
- grid.selection = {};
- grid.selection.lastSelectedRow = null;
- grid.selection.selectAll = false;
-
-
- /**
- * @ngdoc object
- * @name selectedCount
- * @propertyOf ui.grid.selection.grid:selection
- * @description Current count of selected rows
- * @example
- * var count = grid.selection.selectedCount
- */
- grid.selection.selectedCount = 0;
-
- service.defaultGridOptions(grid.options);
-
- /**
- * @ngdoc object
- * @name ui.grid.selection.api:PublicApi
- *
- * @description Public Api for selection feature
- */
- var publicApi = {
- events: {
- selection: {
- /**
- * @ngdoc event
- * @name rowSelectionChanged
- * @eventOf ui.grid.selection.api:PublicApi
- * @description is raised after the row.isSelected state is changed
- * @param {GridRow} row the row that was selected/deselected
- * @param {Event} event object if raised from an event
- */
- rowSelectionChanged: function (scope, row, evt) {
- },
- /**
- * @ngdoc event
- * @name rowSelectionChangedBatch
- * @eventOf ui.grid.selection.api:PublicApi
- * @description is raised after the row.isSelected state is changed
- * in bulk, if the `enableSelectionBatchEvent` option is set to true
- * (which it is by default). This allows more efficient processing
- * of bulk events.
- * @param {array} rows the rows that were selected/deselected
- * @param {Event} event object if raised from an event
- */
- rowSelectionChangedBatch: function (scope, rows, evt) {
- }
- }
- },
- methods: {
- selection: {
- /**
- * @ngdoc function
- * @name toggleRowSelection
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Toggles data row as selected or unselected
- * @param {object} rowEntity gridOptions.data[] array instance
- * @param {Event} event object if raised from an event
- */
- toggleRowSelection: function (rowEntity, evt) {
- var row = grid.getRow(rowEntity);
- if (row !== null) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name selectRow
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Select the data row
- * @param {object} rowEntity gridOptions.data[] array instance
- * @param {Event} event object if raised from an event
- */
- selectRow: function (rowEntity, evt) {
- var row = grid.getRow(rowEntity);
- if (row !== null && !row.isSelected) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name selectRowByVisibleIndex
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Select the specified row by visible index (i.e. if you
- * specify row 0 you'll get the first visible row selected). In this context
- * visible means of those rows that are theoretically visible (i.e. not filtered),
- * rather than rows currently rendered on the screen.
- * @param {number} index index within the rowsVisible array
- * @param {Event} event object if raised from an event
- */
- selectRowByVisibleIndex: function ( rowNum, evt ) {
- var row = grid.renderContainers.body.visibleRowCache[rowNum];
- if (row !== null && typeof(row) !== 'undefined' && !row.isSelected) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name unSelectRow
- * @methodOf ui.grid.selection.api:PublicApi
- * @description UnSelect the data row
- * @param {object} rowEntity gridOptions.data[] array instance
- * @param {Event} event object if raised from an event
- */
- unSelectRow: function (rowEntity, evt) {
- var row = grid.getRow(rowEntity);
- if (row !== null && row.isSelected) {
- service.toggleRowSelection(grid, row, evt, grid.options.multiSelect, grid.options.noUnselect);
- }
- },
- /**
- * @ngdoc function
- * @name selectAllRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Selects all rows. Does nothing if multiSelect = false
- * @param {Event} event object if raised from an event
- */
- selectAllRows: function (evt) {
- if (grid.options.multiSelect === false) {
- return;
- }
-
- var changedRows = [];
- grid.rows.forEach(function (row) {
- if ( !row.isSelected && row.enableSelection !== false ){
- row.setSelected(true);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- });
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- grid.selection.selectAll = true;
- },
- /**
- * @ngdoc function
- * @name selectAllVisibleRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Selects all visible rows. Does nothing if multiSelect = false
- * @param {Event} event object if raised from an event
- */
- selectAllVisibleRows: function (evt) {
- if (grid.options.multiSelect === false) {
- return;
- }
-
- var changedRows = [];
- grid.rows.forEach(function (row) {
- if (row.visible) {
- if (!row.isSelected && row.enableSelection !== false){
- row.setSelected(true);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- } else {
- if (row.isSelected){
- row.setSelected(false);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- }
- });
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- grid.selection.selectAll = true;
- },
- /**
- * @ngdoc function
- * @name clearSelectedRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Unselects all rows
- * @param {Event} event object if raised from an event
- */
- clearSelectedRows: function (evt) {
- service.clearSelectedRows(grid, evt);
- },
- /**
- * @ngdoc function
- * @name getSelectedRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description returns all selectedRow's entity references
- */
- getSelectedRows: function () {
- return service.getSelectedRows(grid).map(function (gridRow) {
- return gridRow.entity;
- });
- },
- /**
- * @ngdoc function
- * @name getSelectedGridRows
- * @methodOf ui.grid.selection.api:PublicApi
- * @description returns all selectedRow's as gridRows
- */
- getSelectedGridRows: function () {
- return service.getSelectedRows(grid);
- },
- /**
- * @ngdoc function
- * @name setMultiSelect
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Sets the current gridOption.multiSelect to true or false
- * @param {bool} multiSelect true to allow multiple rows
- */
- setMultiSelect: function (multiSelect) {
- grid.options.multiSelect = multiSelect;
- },
- /**
- * @ngdoc function
- * @name setModifierKeysToMultiSelect
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Sets the current gridOption.modifierKeysToMultiSelect to true or false
- * @param {bool} modifierKeysToMultiSelect true to only allow multiple rows when using ctrlKey or shiftKey is used
- */
- setModifierKeysToMultiSelect: function (modifierKeysToMultiSelect) {
- grid.options.modifierKeysToMultiSelect = modifierKeysToMultiSelect;
- },
- /**
- * @ngdoc function
- * @name getSelectAllState
- * @methodOf ui.grid.selection.api:PublicApi
- * @description Returns whether or not the selectAll checkbox is currently ticked. The
- * grid doesn't automatically select rows when you add extra data - so when you add data
- * you need to explicitly check whether the selectAll is set, and then call setVisible rows
- * if it is
- */
- getSelectAllState: function () {
- return grid.selection.selectAll;
- }
-
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.selection.api:GridOptions
- *
- * @description GridOptions for selection feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name enableRowSelection
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable row selection for entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enableRowSelection = gridOptions.enableRowSelection !== false;
- /**
- * @ngdoc object
- * @name multiSelect
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable multiple row selection for entire grid
- * <br/>Defaults to true
- */
- gridOptions.multiSelect = gridOptions.multiSelect !== false;
- /**
- * @ngdoc object
- * @name noUnselect
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Prevent a row from being unselected. Works in conjunction
- * with `multiselect = false` and `gridApi.selection.selectRow()` to allow
- * you to create a single selection only grid - a row is always selected, you
- * can only select different rows, you can't unselect the row.
- * <br/>Defaults to false
- */
- gridOptions.noUnselect = gridOptions.noUnselect === true;
- /**
- * @ngdoc object
- * @name modifierKeysToMultiSelect
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable multiple row selection only when using the ctrlKey or shiftKey. Requires multiSelect to be true.
- * <br/>Defaults to false
- */
- gridOptions.modifierKeysToMultiSelect = gridOptions.modifierKeysToMultiSelect === true;
- /**
- * @ngdoc object
- * @name enableRowHeaderSelection
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable a row header to be used for selection
- * <br/>Defaults to true
- */
- gridOptions.enableRowHeaderSelection = gridOptions.enableRowHeaderSelection !== false;
- /**
- * @ngdoc object
- * @name enableFullRowSelection
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable selection by clicking anywhere on the row. Defaults to
- * false if `enableRowHeaderSelection` is true, otherwise defaults to false.
- */
- if ( typeof(gridOptions.enableFullRowSelection) === 'undefined' ){
- gridOptions.enableFullRowSelection = !gridOptions.enableRowHeaderSelection;
- }
- /**
- * @ngdoc object
- * @name enableSelectAll
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Enable the select all checkbox at the top of the selectionRowHeader
- * <br/>Defaults to true
- */
- gridOptions.enableSelectAll = gridOptions.enableSelectAll !== false;
- /**
- * @ngdoc object
- * @name enableSelectionBatchEvent
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description If selected rows are changed in bulk, either via the API or
- * via the selectAll checkbox, then a separate event is fired. Setting this
- * option to false will cause the rowSelectionChanged event to be called multiple times
- * instead
- * <br/>Defaults to true
- */
- gridOptions.enableSelectionBatchEvent = gridOptions.enableSelectionBatchEvent !== false;
- /**
- * @ngdoc object
- * @name selectionRowHeaderWidth
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description can be used to set a custom width for the row header selection column
- * <br/>Defaults to 30px
- */
- gridOptions.selectionRowHeaderWidth = angular.isDefined(gridOptions.selectionRowHeaderWidth) ? gridOptions.selectionRowHeaderWidth : 30;
-
- /**
- * @ngdoc object
- * @name enableFooterTotalSelected
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Shows the total number of selected items in footer if true.
- * <br/>Defaults to true.
- * <br/>GridOptions.showGridFooter must also be set to true.
- */
- gridOptions.enableFooterTotalSelected = gridOptions.enableFooterTotalSelected !== false;
-
- /**
- * @ngdoc object
- * @name isRowSelectable
- * @propertyOf ui.grid.selection.api:GridOptions
- * @description Makes it possible to specify a method that evaluates for each row and sets its "enableSelection" property.
- */
-
- gridOptions.isRowSelectable = angular.isDefined(gridOptions.isRowSelectable) ? gridOptions.isRowSelectable : angular.noop;
- },
-
- /**
- * @ngdoc function
- * @name toggleRowSelection
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Toggles row as selected or unselected
- * @param {Grid} grid grid object
- * @param {GridRow} row row to select or deselect
- * @param {Event} event object if resulting from event
- * @param {bool} multiSelect if false, only one row at time can be selected
- * @param {bool} noUnselect if true then rows cannot be unselected
- */
- toggleRowSelection: function (grid, row, evt, multiSelect, noUnselect) {
- var selected = row.isSelected;
-
- if ( row.enableSelection === false && !selected ){
- return;
- }
-
- var selectedRows;
- if (!multiSelect && !selected) {
- service.clearSelectedRows(grid, evt);
- } else if (!multiSelect && selected) {
- selectedRows = service.getSelectedRows(grid);
- if (selectedRows.length > 1) {
- selected = false; // Enable reselect of the row
- service.clearSelectedRows(grid, evt);
- }
- }
-
- if (selected && noUnselect){
- // don't deselect the row
- } else {
- row.setSelected(!selected);
- if (row.isSelected === true) {
- grid.selection.lastSelectedRow = row;
- }
-
- selectedRows = service.getSelectedRows(grid);
- grid.selection.selectAll = grid.rows.length === selectedRows.length;
-
- grid.api.selection.raise.rowSelectionChanged(row, evt);
- }
- },
- /**
- * @ngdoc function
- * @name shiftSelect
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description selects a group of rows from the last selected row using the shift key
- * @param {Grid} grid grid object
- * @param {GridRow} clicked row
- * @param {Event} event object if raised from an event
- * @param {bool} multiSelect if false, does nothing this is for multiSelect only
- */
- shiftSelect: function (grid, row, evt, multiSelect) {
- if (!multiSelect) {
- return;
- }
- var selectedRows = service.getSelectedRows(grid);
- var fromRow = selectedRows.length > 0 ? grid.renderContainers.body.visibleRowCache.indexOf(grid.selection.lastSelectedRow) : 0;
- var toRow = grid.renderContainers.body.visibleRowCache.indexOf(row);
- //reverse select direction
- if (fromRow > toRow) {
- var tmp = fromRow;
- fromRow = toRow;
- toRow = tmp;
- }
-
- var changedRows = [];
- for (var i = fromRow; i <= toRow; i++) {
- var rowToSelect = grid.renderContainers.body.visibleRowCache[i];
- if (rowToSelect) {
- if ( !rowToSelect.isSelected && rowToSelect.enableSelection !== false ){
- rowToSelect.setSelected(true);
- grid.selection.lastSelectedRow = rowToSelect;
- service.decideRaiseSelectionEvent( grid, rowToSelect, changedRows, evt );
- }
- }
- }
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- },
- /**
- * @ngdoc function
- * @name getSelectedRows
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Returns all the selected rows
- * @param {Grid} grid grid object
- */
- getSelectedRows: function (grid) {
- return grid.rows.filter(function (row) {
- return row.isSelected;
- });
- },
-
- /**
- * @ngdoc function
- * @name clearSelectedRows
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Clears all selected rows
- * @param {Grid} grid grid object
- * @param {Event} event object if raised from an event
- */
- clearSelectedRows: function (grid, evt) {
- var changedRows = [];
- service.getSelectedRows(grid).forEach(function (row) {
- if ( row.isSelected ){
- row.setSelected(false);
- service.decideRaiseSelectionEvent( grid, row, changedRows, evt );
- }
- });
- service.decideRaiseSelectionBatchEvent( grid, changedRows, evt );
- grid.selection.selectAll = false;
- grid.selection.selectedCount = 0;
- },
-
- /**
- * @ngdoc function
- * @name decideRaiseSelectionEvent
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Decides whether to raise a single event or a batch event
- * @param {Grid} grid grid object
- * @param {GridRow} row row that has changed
- * @param {array} changedRows an array to which we can append the changed
- * @param {Event} event object if raised from an event
- * row if we're doing batch events
- */
- decideRaiseSelectionEvent: function( grid, row, changedRows, evt ){
- if ( !grid.options.enableSelectionBatchEvent ){
- grid.api.selection.raise.rowSelectionChanged(row, evt);
- } else {
- changedRows.push(row);
- }
- },
-
- /**
- * @ngdoc function
- * @name raiseSelectionEvent
- * @methodOf ui.grid.selection.service:uiGridSelectionService
- * @description Decides whether we need to raise a batch event, and
- * raises it if we do.
- * @param {Grid} grid grid object
- * @param {array} changedRows an array of changed rows, only populated
- * @param {Event} event object if raised from an event
- * if we're doing batch events
- */
- decideRaiseSelectionBatchEvent: function( grid, changedRows, evt ){
- if ( changedRows.length > 0 ){
- grid.api.selection.raise.rowSelectionChangedBatch(changedRows, evt);
- }
- }
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.selection.directive:uiGridSelection
- * @element div
- * @restrict A
- *
- * @description Adds selection features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.selection']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="{ data: data, columnDefs: columnDefs }" ui-grid-selection></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridSelection', ['uiGridSelectionConstants', 'uiGridSelectionService', '$templateCache', 'uiGridConstants',
- function (uiGridSelectionConstants, uiGridSelectionService, $templateCache, uiGridConstants) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- uiGridSelectionService.initializeGrid(uiGridCtrl.grid);
- if (uiGridCtrl.grid.options.enableRowHeaderSelection) {
- var selectionRowHeaderDef = {
- name: uiGridSelectionConstants.selectionRowHeaderColName,
- displayName: '',
- width: uiGridCtrl.grid.options.selectionRowHeaderWidth,
- minWidth: 10,
- cellTemplate: 'ui-grid/selectionRowHeader',
- headerCellTemplate: 'ui-grid/selectionHeaderCell',
- enableColumnResizing: false,
- enableColumnMenu: false,
- exporterSuppressExport: true,
- allowCellFocus: true
- };
-
- uiGridCtrl.grid.addRowHeaderColumn(selectionRowHeaderDef);
- }
-
- var processorSet = false;
-
- var processSelectableRows = function( rows ){
- rows.forEach(function(row){
- row.enableSelection = uiGridCtrl.grid.options.isRowSelectable(row);
- });
- return rows;
- };
-
- var updateOptions = function(){
- if (uiGridCtrl.grid.options.isRowSelectable !== angular.noop && processorSet !== true) {
- uiGridCtrl.grid.registerRowsProcessor(processSelectableRows, 500);
- processorSet = true;
- }
- };
-
- updateOptions();
-
- var dataChangeDereg = uiGridCtrl.grid.registerDataChangeCallback( updateOptions, [uiGridConstants.dataChange.OPTIONS] );
-
- $scope.$on( '$destroy', dataChangeDereg);
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- }
- };
- }
- };
- }]);
-
- module.directive('uiGridSelectionRowHeaderButtons', ['$templateCache', 'uiGridSelectionService', 'gridUtil',
- function ($templateCache, uiGridSelectionService, gridUtil) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/selectionRowHeaderButtons'),
- scope: true,
- require: '^uiGrid',
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = uiGridCtrl.grid;
- $scope.selectButtonClick = selectButtonClick;
-
- // On IE, prevent mousedowns on the select button from starting a selection.
- // If this is not done and you shift+click on another row, the browser will select a big chunk of text
- if (gridUtil.detectBrowser() === 'ie') {
- $elm.on('mousedown', selectButtonMouseDown);
- }
-
-
- function selectButtonClick(row, evt) {
- evt.stopPropagation();
-
- if (evt.shiftKey) {
- uiGridSelectionService.shiftSelect(self, row, evt, self.options.multiSelect);
- }
- else if (evt.ctrlKey || evt.metaKey) {
- uiGridSelectionService.toggleRowSelection(self, row, evt, self.options.multiSelect, self.options.noUnselect);
- }
- else {
- uiGridSelectionService.toggleRowSelection(self, row, evt, (self.options.multiSelect && !self.options.modifierKeysToMultiSelect), self.options.noUnselect);
- }
- }
-
- function selectButtonMouseDown(evt) {
- if (evt.ctrlKey || evt.shiftKey) {
- evt.target.onselectstart = function () { return false; };
- window.setTimeout(function () { evt.target.onselectstart = null; }, 0);
- }
- }
- }
- };
- }]);
-
- module.directive('uiGridSelectionSelectAllButtons', ['$templateCache', 'uiGridSelectionService',
- function ($templateCache, uiGridSelectionService) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/selectionSelectAllButtons'),
- scope: false,
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = $scope.col.grid;
-
- $scope.headerButtonClick = function(row, evt) {
- if ( self.selection.selectAll ){
- uiGridSelectionService.clearSelectedRows(self, evt);
- if ( self.options.noUnselect ){
- self.api.selection.selectRowByVisibleIndex(0, evt);
- }
- self.selection.selectAll = false;
- } else {
- if ( self.options.multiSelect ){
- self.api.selection.selectAllVisibleRows(evt);
- self.selection.selectAll = true;
- }
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.selection.directive:uiGridViewport
- * @element div
- *
- * @description Stacks on top of ui.grid.uiGridViewport to alter the attributes used
- * for the grid row
- */
- module.directive('uiGridViewport',
- ['$compile', 'uiGridConstants', 'uiGridSelectionConstants', 'gridUtil', '$parse', 'uiGridSelectionService',
- function ($compile, uiGridConstants, uiGridSelectionConstants, gridUtil, $parse, uiGridSelectionService) {
- return {
- priority: -200, // run after default directive
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
-
- var existingNgClass = rowRepeatDiv.attr("ng-class");
- var newNgClass = '';
- if ( existingNgClass ) {
- newNgClass = existingNgClass.slice(0, -1) + ",'ui-grid-row-selected': row.isSelected}";
- } else {
- newNgClass = "{'ui-grid-row-selected': row.isSelected}";
- }
- rowRepeatDiv.attr("ng-class", newNgClass);
-
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.selection.directive:uiGridCell
- * @element div
- * @restrict A
- *
- * @description Stacks on top of ui.grid.uiGridCell to provide selection feature
- */
- module.directive('uiGridCell',
- ['$compile', 'uiGridConstants', 'uiGridSelectionConstants', 'gridUtil', '$parse', 'uiGridSelectionService', '$timeout',
- function ($compile, uiGridConstants, uiGridSelectionConstants, gridUtil, $parse, uiGridSelectionService, $timeout) {
- return {
- priority: -200, // run after default uiGridCell directive
- restrict: 'A',
- require: '?^uiGrid',
- scope: false,
- link: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- var touchStartTime = 0;
- var touchTimeout = 300;
-
- // Bind to keydown events in the render container
- if (uiGridCtrl.grid.api.cellNav) {
-
- uiGridCtrl.grid.api.cellNav.on.viewPortKeyDown($scope, function (evt, rowCol) {
- if (rowCol === null ||
- rowCol.row !== $scope.row ||
- rowCol.col !== $scope.col) {
- return;
- }
-
- if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
- uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
- $scope.$apply();
- }
-
- // uiGridCellNavService.scrollToIfNecessary(uiGridCtrl.grid, rowCol.row, rowCol.col);
- });
- }
-
- //$elm.bind('keydown', function (evt) {
- // if (evt.keyCode === 32 && $scope.col.colDef.name === "selectionRowHeaderCol") {
- // uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
- // $scope.$apply();
- // }
- //});
-
- var selectCells = function(evt){
- // if we get a click, then stop listening for touchend
- $elm.off('touchend', touchEnd);
-
- if (evt.shiftKey) {
- uiGridSelectionService.shiftSelect($scope.grid, $scope.row, evt, $scope.grid.options.multiSelect);
- }
- else if (evt.ctrlKey || evt.metaKey) {
- uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, $scope.grid.options.multiSelect, $scope.grid.options.noUnselect);
- }
- else {
- uiGridSelectionService.toggleRowSelection($scope.grid, $scope.row, evt, ($scope.grid.options.multiSelect && !$scope.grid.options.modifierKeysToMultiSelect), $scope.grid.options.noUnselect);
- }
- $scope.$apply();
-
- // don't re-enable the touchend handler for a little while - some devices generate both, and it will
- // take a little while to move your hand from the mouse to the screen if you have both modes of input
- $timeout(function() {
- $elm.on('touchend', touchEnd);
- }, touchTimeout);
- };
-
- var touchStart = function(evt){
- touchStartTime = (new Date()).getTime();
-
- // if we get a touch event, then stop listening for click
- $elm.off('click', selectCells);
- };
-
- var touchEnd = function(evt) {
- var touchEndTime = (new Date()).getTime();
- var touchTime = touchEndTime - touchStartTime;
-
- if (touchTime < touchTimeout ) {
- // short touch
- selectCells(evt);
- }
-
- // don't re-enable the click handler for a little while - some devices generate both, and it will
- // take a little while to move your hand from the screen to the mouse if you have both modes of input
- $timeout(function() {
- $elm.on('click', selectCells);
- }, touchTimeout);
- };
-
- function registerRowSelectionEvents() {
- if ($scope.grid.options.enableRowSelection && $scope.grid.options.enableFullRowSelection) {
- $elm.addClass('ui-grid-disable-selection');
- $elm.on('touchstart', touchStart);
- $elm.on('touchend', touchEnd);
- $elm.on('click', selectCells);
-
- $scope.registered = true;
- }
- }
-
- function deregisterRowSelectionEvents() {
- if ($scope.registered){
- $elm.removeClass('ui-grid-disable-selection');
-
- $elm.off('touchstart', touchStart);
- $elm.off('touchend', touchEnd);
- $elm.off('click', selectCells);
-
- $scope.registered = false;
- }
- }
-
- registerRowSelectionEvents();
- // register a dataChange callback so that we can change the selection configuration dynamically
- // if the user changes the options
- var dataChangeDereg = $scope.grid.registerDataChangeCallback( function() {
- if ( $scope.grid.options.enableRowSelection && $scope.grid.options.enableFullRowSelection &&
- !$scope.registered ){
- registerRowSelectionEvents();
- } else if ( ( !$scope.grid.options.enableRowSelection || !$scope.grid.options.enableFullRowSelection ) &&
- $scope.registered ){
- deregisterRowSelectionEvents();
- }
- }, [uiGridConstants.dataChange.OPTIONS] );
-
- $elm.on( '$destroy', dataChangeDereg);
- }
- };
- }]);
-
- module.directive('uiGridGridFooter', ['$compile', 'uiGridConstants', 'gridUtil', function ($compile, uiGridConstants, gridUtil) {
- return {
- restrict: 'EA',
- replace: true,
- priority: -1000,
- require: '^uiGrid',
- scope: true,
- compile: function ($elm, $attrs) {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- if (!uiGridCtrl.grid.options.showGridFooter) {
- return;
- }
-
-
- gridUtil.getTemplate('ui-grid/gridFooterSelectedItems')
- .then(function (contents) {
- var template = angular.element(contents);
-
- var newElm = $compile(template)($scope);
-
- angular.element($elm[0].getElementsByClassName('ui-grid-grid-footer')[0]).append(newElm);
- });
- },
-
- post: function ($scope, $elm, $attrs, controllers) {
-
- }
- };
- }
- };
- }]);
-
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.treeBase
- * @description
- *
- * # ui.grid.treeBase
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides base tree handling functions that are shared by other features, notably grouping
- * and treeView. It provides a tree view of the data, with nodes in that
- * tree and leaves.
- *
- * Design information:
- * -------------------
- *
- * The raw data that is provided must come with a $$treeLevel on any non-leaf node. Grouping will create
- * these on all the group header rows, treeView will expect these to be set in the raw data by the user.
- * TreeBase will run a rowsProcessor that:
- * - builds `treeBase.tree` out of the provided rows
- * - permits a recursive sort of the tree
- * - maintains the expand/collapse state of each node
- * - provides the expand/collapse all button and the expand/collapse buttons
- * - maintains the count of children for each node
- *
- * Each row is updated with a link to the tree node that represents it. Refer {@link ui.grid.treeBase.grid:treeBase.tree tree documentation}
- * for information.
- *
- * TreeBase adds information to the rows
- * - treeLevel: if present and > -1 tells us the level (level 0 is the top level)
- * - treeNode: pointer to the node in the grid.treeBase.tree that refers
- * to this row, allowing us to manipulate the state
- *
- * Since the logic is baked into the rowsProcessors, it should get triggered whenever
- * row order or filtering or anything like that is changed. We recall the expanded state
- * across invocations of the rowsProcessors by the reference to the treeNode on the individual
- * rows. We rebuild the tree itself quite frequently, when we do this we use the saved treeNodes to
- * get the state, but we overwrite the other data in that treeNode.
- *
- * By default rows are collapsed, which means all data rows have their visible property
- * set to false, and only level 0 group rows are set to visible.
- *
- * We rely on the rowsProcessors to do the actual expanding and collapsing, so we set the flags we want into
- * grid.treeBase.tree, then call refresh. This is because we can't easily change the visible
- * row cache without calling the processors, and once we've built the logic into the rowProcessors we may as
- * well use it all the time.
- *
- * Tree base provides sorting (on non-grouped columns).
- *
- * Sorting works in two passes. The standard sorting is performed for any columns that are important to building
- * the tree (for example, any grouped columns). Then after the tree is built, a recursive tree sort is performed
- * for the remaining sort columns (including the original sort) - these columns are sorted within each tree level
- * (so all the level 1 nodes are sorted, then all the level 2 nodes within each level 1 node etc).
- *
- * To achieve this we make use of the `ignoreSort` property on the sort configuration. The parent feature (treeView or grouping)
- * must provide a rowsProcessor that runs with very low priority (typically in the 60-65 range), and that sets
- * the `ignoreSort`on any sort that it wants to run on the tree. TreeBase will clear the ignoreSort on all sorts - so it
- * will turn on any sorts that haven't run. It will then call a recursive sort on the tree.
- *
- * Tree base provides treeAggregation. It checks the treeAggregation configuration on each column, and aggregates based on
- * the logic provided as it builds the tree. Footer aggregation from the uiGrid core should not be used with treeBase aggregation,
- * since it operates on all visible rows, as opposed to to leaf nodes only. Setting `showColumnFooter: true` will show the
- * treeAggregations in the column footer. Aggregation information will be collected in the format:
- *
- * ```
- * {
- * type: 'count',
- * value: 4,
- * label: 'count: ',
- * rendered: 'count: 4'
- * }
- * ```
- *
- * A callback is provided to format the value once it is finalised (aka a valueFilter).
- *
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.treeBase"></div>
- */
-
- var module = angular.module('ui.grid.treeBase', ['ui.grid']);
-
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.constant:uiGridTreeBaseConstants
- *
- * @description constants available in treeBase module.
- *
- * These constants are manually copied into grouping and treeView,
- * as I haven't found a way to simply include them, and it's not worth
- * investing time in for something that changes very infrequently.
- *
- */
- module.constant('uiGridTreeBaseConstants', {
- featureName: "treeBase",
- rowHeaderColName: 'treeBaseRowHeaderCol',
- EXPANDED: 'expanded',
- COLLAPSED: 'collapsed',
- aggregation: {
- COUNT: 'count',
- SUM: 'sum',
- MAX: 'max',
- MIN: 'min',
- AVG: 'avg'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.treeBase.service:uiGridTreeBaseService
- *
- * @description Services for treeBase feature
- */
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.api:ColumnDef
- *
- * @description ColumnDef for tree feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions.columnDef gridOptions.columnDefs}
- */
-
- module.service('uiGridTreeBaseService', ['$q', 'uiGridTreeBaseConstants', 'gridUtil', 'GridRow', 'gridClassFactory', 'i18nService', 'uiGridConstants', 'rowSorter',
- function ($q, uiGridTreeBaseConstants, gridUtil, GridRow, gridClassFactory, i18nService, uiGridConstants, rowSorter) {
-
- var service = {
-
- initializeGrid: function (grid, $scope) {
-
- //add feature namespace and any properties to grid for needed
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.grid:treeBase
- *
- * @description Grid properties and functions added for treeBase
- */
- grid.treeBase = {};
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.treeBase.grid:treeBase
- * @name numberLevels
- *
- * @description Total number of tree levels currently used, calculated by the rowsProcessor by
- * retaining the highest tree level it sees
- */
- grid.treeBase.numberLevels = 0;
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.treeBase.grid:treeBase
- * @name expandAll
- *
- * @description Whether or not the expandAll box is selected
- */
- grid.treeBase.expandAll = false;
-
- /**
- * @ngdoc property
- * @propertyOf ui.grid.treeBase.grid:treeBase
- * @name tree
- *
- * @description Tree represented as a nested array that holds the state of each node, along with a
- * pointer to the row. The array order is material - we will display the children in the order
- * they are stored in the array
- *
- * Each node stores:
- *
- * - the state of this node
- * - an array of children of this node
- * - a pointer to the parent of this node (reverse pointer, allowing us to walk up the tree)
- * - the number of children of this node
- * - aggregation information calculated from the nodes
- *
- * ```
- * [{
- * state: 'expanded',
- * row: <reference to row>,
- * parentRow: null,
- * aggregations: [{
- * type: 'count',
- * col: <gridCol>,
- * value: 2,
- * label: 'count: ',
- * rendered: 'count: 2'
- * }],
- * children: [
- * {
- * state: 'expanded',
- * row: <reference to row>,
- * parentRow: <reference to row>,
- * aggregations: [{
- * type: 'count',
- * col: '<gridCol>,
- * value: 4,
- * label: 'count: ',
- * rendered: 'count: 4'
- * }],
- * children: [
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'collapsed', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'collapsed', row: <reference to row>, parentRow: <reference to row> }
- * ]
- * },
- * {
- * state: 'collapsed',
- * row: <reference to row>,
- * parentRow: <reference to row>,
- * aggregations: [{
- * type: 'count',
- * col: <gridCol>,
- * value: 3,
- * label: 'count: ',
- * rendered: 'count: 3'
- * }],
- * children: [
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'collapsed', row: <reference to row>, parentRow: <reference to row> },
- * { state: 'expanded', row: <reference to row>, parentRow: <reference to row> }
- * ]
- * }
- * ]
- * }, {<another level 0 node maybe>} ]
- * ```
- * Missing state values are false - meaning they aren't expanded.
- *
- * This is used because the rowProcessors run every time the grid is refreshed, so
- * we'd lose the expanded state every time the grid was refreshed. This instead gives
- * us a reliable lookup that persists across rowProcessors.
- *
- * This tree is rebuilt every time we run the rowsProcessors. Since each row holds a pointer
- * to it's tree node we can persist expand/collapse state across calls to rowsProcessor, we discard
- * all transient information on the tree (children, childCount) and recalculate it
- *
- */
- grid.treeBase.tree = {};
-
- service.defaultGridOptions(grid.options);
-
- grid.registerRowsProcessor(service.treeRows, 410);
-
- grid.registerColumnBuilder( service.treeBaseColumnBuilder );
-
- service.createRowHeader( grid );
-
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.api:PublicApi
- *
- * @description Public Api for treeBase feature
- */
- var publicApi = {
- events: {
- treeBase: {
- /**
- * @ngdoc event
- * @eventOf ui.grid.treeBase.api:PublicApi
- * @name rowExpanded
- * @description raised whenever a row is expanded. If you are dynamically
- * rendering your tree you can listen to this event, and then retrieve
- * the children of this row and load them into the grid data.
- *
- * When the data is loaded the grid will automatically refresh to show these new rows
- *
- * <pre>
- * gridApi.treeBase.on.rowExpanded(scope,function(row){})
- * </pre>
- * @param {gridRow} row the row that was expanded. You can also
- * retrieve the grid from this row with row.grid
- */
- rowExpanded: {},
-
- /**
- * @ngdoc event
- * @eventOf ui.grid.treeBase.api:PublicApi
- * @name rowCollapsed
- * @description raised whenever a row is collapsed. Doesn't really have
- * a purpose at the moment, included for symmetry
- *
- * <pre>
- * gridApi.treeBase.on.rowCollapsed(scope,function(row){})
- * </pre>
- * @param {gridRow} row the row that was collapsed. You can also
- * retrieve the grid from this row with row.grid
- */
- rowCollapsed: {}
- }
- },
-
- methods: {
- treeBase: {
- /**
- * @ngdoc function
- * @name expandAllRows
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Expands all tree rows
- */
- expandAllRows: function () {
- service.expandAllRows(grid);
- },
-
- /**
- * @ngdoc function
- * @name collapseAllRows
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description collapse all tree rows
- */
- collapseAllRows: function () {
- service.collapseAllRows(grid);
- },
-
- /**
- * @ngdoc function
- * @name toggleRowTreeState
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description call expand if the row is collapsed, collapse if it is expanded
- * @param {gridRow} row the row you wish to toggle
- */
- toggleRowTreeState: function (row) {
- service.toggleRowTreeState(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name expandRow
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description expand the immediate children of the specified row
- * @param {gridRow} row the row you wish to expand
- */
- expandRow: function (row) {
- service.expandRow(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name expandRowChildren
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description expand all children of the specified row
- * @param {gridRow} row the row you wish to expand
- */
- expandRowChildren: function (row) {
- service.expandRowChildren(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name collapseRow
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description collapse the specified row. When
- * you expand the row again, all grandchildren will retain their state
- * @param {gridRow} row the row you wish to collapse
- */
- collapseRow: function ( row ) {
- service.collapseRow(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name collapseRowChildren
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description collapse all children of the specified row. When
- * you expand the row again, all grandchildren will be collapsed
- * @param {gridRow} row the row you wish to collapse children for
- */
- collapseRowChildren: function ( row ) {
- service.collapseRowChildren(grid, row);
- },
-
- /**
- * @ngdoc function
- * @name getTreeState
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Get the tree state for this grid,
- * used by the saveState feature
- * Returned treeState as an object
- * `{ expandedState: { uid: 'expanded', uid: 'collapsed' } }`
- * where expandedState is a hash of row uid and the current expanded state
- *
- * @returns {object} tree state
- *
- * TODO - this needs work - we need an identifier that persists across instantiations,
- * not uid. This really means we need a row identity defined, but that won't work for
- * grouping. Perhaps this needs to be moved up to treeView and grouping, rather than
- * being in base.
- */
- getTreeExpandedState: function () {
- return { expandedState: service.getTreeState(grid) };
- },
-
- /**
- * @ngdoc function
- * @name setTreeState
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Set the expanded states of the tree
- * @param {object} config the config you want to apply, in the format
- * provided by getTreeState
- */
- setTreeState: function ( config ) {
- service.setTreeState( grid, config );
- },
-
- /**
- * @ngdoc function
- * @name getRowChildren
- * @methodOf ui.grid.treeBase.api:PublicApi
- * @description Get the children of the specified row
- * @param {GridRow} row the row you want the children of
- * @returns {Array} array of children of this row, the children
- * are all gridRows
- */
- getRowChildren: function ( row ){
- return row.treeNode.children.map( function( childNode ){
- return childNode.row;
- });
- }
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
- },
-
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.treeBase.api:GridOptions
- *
- * @description GridOptions for treeBase feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- */
-
- /**
- * @ngdoc object
- * @name treeRowHeaderBaseWidth
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Base width of the tree header, provides for a single level of tree. This
- * is incremented by `treeIndent` for each extra level
- * <br/>Defaults to 30
- */
- gridOptions.treeRowHeaderBaseWidth = gridOptions.treeRowHeaderBaseWidth || 30;
-
- /**
- * @ngdoc object
- * @name treeIndent
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Number of pixels of indent for the icon at each tree level, wider indents are visually more pleasing,
- * but will make the tree row header wider
- * <br/>Defaults to 10
- */
- gridOptions.treeIndent = gridOptions.treeIndent || 10;
-
- /**
- * @ngdoc object
- * @name showTreeRowHeader
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description If set to false, don't create the row header. Youll need to programatically control the expand
- * states
- * <br/>Defaults to true
- */
- gridOptions.showTreeRowHeader = gridOptions.showTreeRowHeader !== false;
-
- /**
- * @ngdoc object
- * @name showTreeExpandNoChildren
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description If set to true, show the expand/collapse button even if there are no
- * children of a node. You'd use this if you're planning to dynamically load the children
- *
- * <br/>Defaults to true, grouping overrides to false
- */
- gridOptions.showTreeExpandNoChildren = gridOptions.showTreeExpandNoChildren !== false;
-
- /**
- * @ngdoc object
- * @name treeRowHeaderAlwaysVisible
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description If set to true, row header even if there are no tree nodes
- *
- * <br/>Defaults to true
- */
- gridOptions.treeRowHeaderAlwaysVisible = gridOptions.treeRowHeaderAlwaysVisible !== false;
-
- /**
- * @ngdoc object
- * @name treeCustomAggregations
- * @propertyOf ui.grid.treeBase.api:GridOptions
- * @description Define custom aggregation functions. The properties of this object will be
- * aggregation types available for use on columnDef with {@link ui.grid.treeBase.api:ColumnDef treeAggregationType} or through the column menu.
- * If a function defined here uses the same name as one of the native aggregations, this one will take precedence.
- * The object format is:
- *
- * <pre>
- * {
- * aggregationName: {
- * label: (optional) string,
- * aggregationFn: function( aggregation, fieldValue, numValue, row ){...},
- * finalizerFn: (optional) function( aggregation ){...}
- * },
- * mean: {
- * label: 'mean',
- * aggregationFn: function( aggregation, fieldValue, numValue ){
- * aggregation.count = (aggregation.count || 1) + 1;
- * aggregation.sum = (aggregation.sum || 0) + numValue;
- * },
- * finalizerFn: function( aggregation ){
- * aggregation.value = aggregation.sum / aggregation.count
- * }
- * }
- * }
- * </pre>
- *
- * <br/>The `finalizerFn` may be used to manipulate the value before rendering, or to
- * apply a custom rendered value. If `aggregation.rendered` is left undefined, the value will be
- * rendered. Note that the native aggregation functions use an `finalizerFn` to concatenate
- * the label and the value.
- *
- * <br/>Defaults to {}
- */
- gridOptions.treeCustomAggregations = gridOptions.treeCustomAggregations || {};
- },
-
-
- /**
- * @ngdoc function
- * @name treeBaseColumnBuilder
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Sets the tree defaults based on the columnDefs
- *
- * @param {object} colDef columnDef we're basing on
- * @param {GridCol} col the column we're to update
- * @param {object} gridOptions the options we should use
- * @returns {promise} promise for the builder - actually we do it all inline so it's immediately resolved
- */
- treeBaseColumnBuilder: function (colDef, col, gridOptions) {
-
-
- /**
- * @ngdoc object
- * @name customTreeAggregationFn
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description A custom function that aggregates rows into some form of
- * total. Aggregations run row-by-row, the function needs to be capable of
- * creating a running total.
- *
- * The function will be provided the aggregation item (in which you can store running
- * totals), the row value that is to be aggregated, and that same row value converted to
- * a number (most aggregations work on numbers)
- * @example
- * <pre>
- * customTreeAggregationFn = function ( aggregation, fieldValue, numValue, row ){
- * // calculates the average of the squares of the values
- * if ( typeof(aggregation.count) === 'undefined' ){
- * aggregation.count = 0;
- * }
- * aggregation.count++;
- *
- * if ( !isNaN(numValue) ){
- * if ( typeof(aggregation.total) === 'undefined' ){
- * aggregation.total = 0;
- * }
- * aggregation.total = aggregation.total + numValue * numValue;
- * }
- *
- * aggregation.value = aggregation.total / aggregation.count;
- * }
- * </pre>
- * <br/>Defaults to undefined. May be overwritten by treeAggregationType, the two options should not be used together.
- */
- if ( typeof(colDef.customTreeAggregationFn) !== 'undefined' ){
- col.treeAggregationFn = colDef.customTreeAggregationFn;
- }
-
- /**
- * @ngdoc object
- * @name treeAggregationType
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description Use one of the native or grid-level aggregation methods for calculating aggregations on this column.
- * Native method are in the constants file and include: SUM, COUNT, MIN, MAX, AVG. This may also be the property the
- * name of an aggregation function defined with {@link ui.grid.treeBase.api:GridOptions treeCustomAggregations}.
- *
- * <pre>
- * treeAggregationType = uiGridTreeBaseConstants.aggregation.SUM,
- * }
- * </pre>
- *
- * If you are using aggregations you should either:
- *
- * - also use grouping, in which case the aggregations are displayed in the group header, OR
- * - use treeView, in which case you can set `treeAggregationUpdateEntity: true` in the colDef, and
- * treeBase will store the aggregation information in the entity, or you can set `treeAggregationUpdateEntity: false`
- * in the colDef, and you need to manual retrieve the calculated aggregations from the row.treeNode.aggregations
- *
- * <br/>Takes precendence over a treeAggregationFn, the two options should not be used together.
- * <br/>Defaults to undefined.
- */
- if ( typeof(colDef.treeAggregationType) !== 'undefined' ){
- col.treeAggregation = { type: colDef.treeAggregationType };
- if ( typeof(gridOptions.treeCustomAggregations[colDef.treeAggregationType]) !== 'undefined' ){
- col.treeAggregationFn = gridOptions.treeCustomAggregations[colDef.treeAggregationType].aggregationFn;
- col.treeAggregationFinalizerFn = gridOptions.treeCustomAggregations[colDef.treeAggregationType].finalizerFn;
- col.treeAggregation.label = gridOptions.treeCustomAggregations[colDef.treeAggregationType].label;
- } else if ( typeof(service.nativeAggregations()[colDef.treeAggregationType]) !== 'undefined' ){
- col.treeAggregationFn = service.nativeAggregations()[colDef.treeAggregationType].aggregationFn;
- col.treeAggregation.label = service.nativeAggregations()[colDef.treeAggregationType].label;
- }
- }
-
- /**
- * @ngdoc object
- * @name treeAggregationLabel
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description A custom label to use for this aggregation. If provided we don't use native i18n.
- */
- if ( typeof(colDef.treeAggregationLabel) !== 'undefined' ){
- if (typeof(col.treeAggregation) === 'undefined' ){
- col.treeAggregation = {};
- }
- col.treeAggregation.label = colDef.treeAggregationLabel;
- }
-
- /**
- * @ngdoc object
- * @name treeAggregationUpdateEntity
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description Store calculated aggregations into the entity, allowing them
- * to be displayed in the grid using a standard cellTemplate. This defaults to true,
- * if you are using grouping then you shouldn't set it to false, as then the aggregations won't
- * display.
- *
- * If you are using treeView in most cases you'll want to set this to true. This will result in
- * getCellValue returning the aggregation rather than whatever was stored in the cell attribute on
- * the entity. If you want to render the underlying entity value (and do something else with the aggregation)
- * then you could use a custom cellTemplate to display `row.entity.myAttribute`, rather than using getCellValue.
- *
- * <br/>Defaults to true
- *
- * @example
- * <pre>
- * gridOptions.columns = [{
- * name: 'myCol',
- * treeAggregation: { type: uiGridTreeBaseConstants.aggregation.SUM },
- * treeAggregationUpdateEntity: true
- * cellTemplate: '<div>{{row.entity.myCol + " " + row.treeNode.aggregations[0].rendered}}</div>'
- * }];
- * </pre>
- */
- col.treeAggregationUpdateEntity = colDef.treeAggregationUpdateEntity !== false;
-
- /**
- * @ngdoc object
- * @name customTreeAggregationFinalizerFn
- * @propertyOf ui.grid.treeBase.api:ColumnDef
- * @description A custom function that populates aggregation.rendered, this is called when
- * a particular aggregation has been fully calculated, and we want to render the value.
- *
- * With the native aggregation options we just concatenate `aggregation.label` and
- * `aggregation.value`, but if you wanted to apply a filter or otherwise manipulate the label
- * or the value, you can do so with this function. This function will be called after the
- * the default `finalizerFn`.
- *
- * @example
- * <pre>
- * customTreeAggregationFinalizerFn = function ( aggregation ){
- * aggregation.rendered = aggregation.label + aggregation.value / 100 + '%';
- * }
- * </pre>
- * <br/>Defaults to undefined.
- */
- if ( typeof(col.customTreeAggregationFinalizerFn) === 'undefined' ){
- col.customTreeAggregationFinalizerFn = colDef.customTreeAggregationFinalizerFn;
- }
-
- },
-
-
- /**
- * @ngdoc function
- * @name createRowHeader
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Create the rowHeader. If treeRowHeaderAlwaysVisible then
- * set it to visible, otherwise set it to invisible
- *
- * @param {Grid} grid grid object
- */
- createRowHeader: function( grid ){
- var rowHeaderColumnDef = {
- name: uiGridTreeBaseConstants.rowHeaderColName,
- displayName: '',
- width: grid.options.treeRowHeaderBaseWidth,
- minWidth: 10,
- cellTemplate: 'ui-grid/treeBaseRowHeader',
- headerCellTemplate: 'ui-grid/treeBaseHeaderCell',
- enableColumnResizing: false,
- enableColumnMenu: false,
- exporterSuppressExport: true,
- allowCellFocus: true
- };
-
- rowHeaderColumnDef.visible = grid.options.treeRowHeaderAlwaysVisible;
- grid.addRowHeaderColumn( rowHeaderColumnDef );
- },
-
-
- /**
- * @ngdoc function
- * @name expandAllRows
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Expands all nodes in the tree
- *
- * @param {Grid} grid grid object
- */
- expandAllRows: function (grid) {
- grid.treeBase.tree.forEach( function( node ) {
- service.setAllNodes( grid, node, uiGridTreeBaseConstants.EXPANDED);
- });
- grid.treeBase.expandAll = true;
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name collapseAllRows
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Collapses all nodes in the tree
- *
- * @param {Grid} grid grid object
- */
- collapseAllRows: function (grid) {
- grid.treeBase.tree.forEach( function( node ) {
- service.setAllNodes( grid, node, uiGridTreeBaseConstants.COLLAPSED);
- });
- grid.treeBase.expandAll = false;
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name setAllNodes
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Works through a subset of grid.treeBase.rowExpandedStates, setting
- * all child nodes (and their descendents) of the provided node to the given state.
- *
- * Calls itself recursively on all nodes so as to achieve this.
- *
- * @param {Grid} grid the grid we're operating on (so we can raise events)
- * @param {object} treeNode a node in the tree that we want to update
- * @param {string} targetState the state we want to set it to
- */
- setAllNodes: function (grid, treeNode, targetState) {
- if ( typeof(treeNode.state) !== 'undefined' && treeNode.state !== targetState ){
- treeNode.state = targetState;
-
- if ( targetState === uiGridTreeBaseConstants.EXPANDED ){
- grid.api.treeBase.raise.rowExpanded(treeNode.row);
- } else {
- grid.api.treeBase.raise.rowCollapsed(treeNode.row);
- }
- }
-
- // set all child nodes
- if ( treeNode.children ){
- treeNode.children.forEach(function( childNode ){
- service.setAllNodes(grid, childNode, targetState);
- });
- }
- },
-
-
- /**
- * @ngdoc function
- * @name toggleRowTreeState
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Toggles the expand or collapse state of this grouped row, if
- * it's a parent row
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to toggle
- */
- toggleRowTreeState: function ( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- if (row.treeNode.state === uiGridTreeBaseConstants.EXPANDED){
- service.collapseRow(grid, row);
- } else {
- service.expandRow(grid, row);
- }
-
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name expandRow
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Expands this specific row, showing only immediate children.
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to expand
- */
- expandRow: function ( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- if ( row.treeNode.state !== uiGridTreeBaseConstants.EXPANDED ){
- row.treeNode.state = uiGridTreeBaseConstants.EXPANDED;
- grid.api.treeBase.raise.rowExpanded(row);
- grid.treeBase.expandAll = service.allExpanded(grid.treeBase.tree);
- grid.queueGridRefresh();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name expandRowChildren
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Expands this specific row, showing all children.
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to expand
- */
- expandRowChildren: function ( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- service.setAllNodes(grid, row.treeNode, uiGridTreeBaseConstants.EXPANDED);
- grid.treeBase.expandAll = service.allExpanded(grid.treeBase.tree);
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name collapseRow
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Collapses this specific row
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to collapse
- */
- collapseRow: function( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- if ( row.treeNode.state !== uiGridTreeBaseConstants.COLLAPSED ){
- row.treeNode.state = uiGridTreeBaseConstants.COLLAPSED;
- grid.treeBase.expandAll = false;
- grid.api.treeBase.raise.rowCollapsed(row);
- grid.queueGridRefresh();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name collapseRowChildren
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Collapses this specific row and all children
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to collapse
- */
- collapseRowChildren: function( grid, row ){
- if ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ){
- return;
- }
-
- service.setAllNodes(grid, row.treeNode, uiGridTreeBaseConstants.COLLAPSED);
- grid.treeBase.expandAll = false;
- grid.queueGridRefresh();
- },
-
-
- /**
- * @ngdoc function
- * @name allExpanded
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Returns true if all rows are expanded, false
- * if they're not. Walks the tree to determine this. Used
- * to set the expandAll state.
- *
- * If the node has no children, then return true (it's immaterial
- * whether it is expanded). If the node has children, then return
- * false if this node is collapsed, or if any child node is not all expanded
- *
- * @param {object} tree the grid to check
- * @returns {boolean} whether or not the tree is all expanded
- */
- allExpanded: function( tree ){
- var allExpanded = true;
- tree.forEach( function( node ){
- if ( !service.allExpandedInternal( node ) ){
- allExpanded = false;
- }
- });
- return allExpanded;
- },
-
- allExpandedInternal: function( treeNode ){
- if ( treeNode.children && treeNode.children.length > 0 ){
- if ( treeNode.state === uiGridTreeBaseConstants.COLLAPSED ){
- return false;
- }
- var allExpanded = true;
- treeNode.children.forEach( function( node ){
- if ( !service.allExpandedInternal( node ) ){
- allExpanded = false;
- }
- });
- return allExpanded;
- } else {
- return true;
- }
- },
-
-
- /**
- * @ngdoc function
- * @name treeRows
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description The rowProcessor that adds the nodes to the tree, and sets the visible
- * state of each row based on it's parent state
- *
- * Assumes it is always called after the sorting processor, and the grouping processor if there is one.
- * Performs any tree sorts itself after having built the tree
- *
- * Processes all the rows in order, setting the group level based on the $$treeLevel in the associated
- * entity, and setting the visible state based on the parent's state.
- *
- * Calculates the deepest level of tree whilst it goes, and updates that so that the header column can be correctly
- * sized.
- *
- * Aggregates if necessary along the way.
- *
- * @param {array} renderableRows the rows we want to process, usually the output from the previous rowProcessor
- * @returns {array} the updated rows
- */
- treeRows: function( renderableRows ) {
- if (renderableRows.length === 0){
- return renderableRows;
- }
-
- var grid = this;
- var currentLevel = 0;
- var currentState = uiGridTreeBaseConstants.EXPANDED;
- var parents = [];
-
- grid.treeBase.tree = service.createTree( grid, renderableRows );
- service.updateRowHeaderWidth( grid );
-
- service.sortTree( grid );
- service.fixFilter( grid );
-
- return service.renderTree( grid.treeBase.tree );
- },
-
-
- /**
- * @ngdoc function
- * @name createOrUpdateRowHeaderWidth
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Calculates the rowHeader width.
- *
- * If rowHeader is always present, updates the width.
- *
- * If rowHeader is only sometimes present (`treeRowHeaderAlwaysVisible: false`), determines whether there
- * should be one, then creates or removes it as appropriate, with the created rowHeader having the
- * right width.
- *
- * If there's never a rowHeader then never creates one: `showTreeRowHeader: false`
- *
- * @param {Grid} grid the grid we want to set the row header on
- */
- updateRowHeaderWidth: function( grid ){
- var rowHeader = grid.getColumn(uiGridTreeBaseConstants.rowHeaderColName);
-
- var newWidth = grid.options.treeRowHeaderBaseWidth + grid.options.treeIndent * Math.max(grid.treeBase.numberLevels - 1, 0);
- if ( rowHeader && newWidth !== rowHeader.width ){
- rowHeader.width = newWidth;
- grid.queueRefresh();
- }
-
- var newVisibility = true;
- if ( grid.options.showTreeRowHeader === false ){
- newVisibility = false;
- }
- if ( grid.options.treeRowHeaderAlwaysVisible === false && grid.treeBase.numberLevels <= 0 ){
- newVisibility = false;
- }
- if ( rowHeader.visible !== newVisibility ) {
- rowHeader.visible = newVisibility;
- rowHeader.colDef.visible = newVisibility;
- grid.queueGridRefresh();
- }
- },
-
-
- /**
- * @ngdoc function
- * @name renderTree
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Creates an array of rows based on the tree, exporting only
- * the visible nodes and leaves
- *
- * @param {array} nodeList the list of nodes - can be grid.treeBase.tree, or can be node.children when
- * we're calling recursively
- * @returns {array} renderable rows
- */
- renderTree: function( nodeList ){
- var renderableRows = [];
-
- nodeList.forEach( function ( node ){
- if ( node.row.visible ){
- renderableRows.push( node.row );
- }
- if ( node.state === uiGridTreeBaseConstants.EXPANDED && node.children && node.children.length > 0 ){
- renderableRows = renderableRows.concat( service.renderTree( node.children ) );
- }
- });
- return renderableRows;
- },
-
-
- /**
- * @ngdoc function
- * @name createTree
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Creates a tree from the renderableRows
- *
- * @param {Grid} grid the grid
- * @param {array} renderableRows the rows we want to create a tree from
- * @returns {object} the tree we've build
- */
- createTree: function( grid, renderableRows ) {
- var currentLevel = -1;
- var parents = [];
- var currentState;
- grid.treeBase.tree = [];
- grid.treeBase.numberLevels = 0;
- var aggregations = service.getAggregations( grid );
-
- var createNode = function( row ){
- if ( typeof(row.entity.$$treeLevel) !== 'undefined' && row.treeLevel !== row.entity.$$treeLevel ){
- row.treeLevel = row.entity.$$treeLevel;
- }
-
- if ( row.treeLevel <= currentLevel ){
- // pop any levels that aren't parents of this level, formatting the aggregation at the same time
- while ( row.treeLevel <= currentLevel ){
- var lastParent = parents.pop();
- service.finaliseAggregations( lastParent );
- currentLevel--;
- }
-
- // reset our current state based on the new parent, set to expanded if this is a level 0 node
- if ( parents.length > 0 ){
- currentState = service.setCurrentState(parents);
- } else {
- currentState = uiGridTreeBaseConstants.EXPANDED;
- }
- }
-
- // aggregate if this is a leaf node
- if ( ( typeof(row.treeLevel) === 'undefined' || row.treeLevel === null || row.treeLevel < 0 ) && row.visible ){
- service.aggregate( grid, row, parents );
- }
-
- // add this node to the tree
- service.addOrUseNode(grid, row, parents, aggregations);
-
- if ( typeof(row.treeLevel) !== 'undefined' && row.treeLevel !== null && row.treeLevel >= 0 ){
- parents.push(row);
- currentLevel++;
- currentState = service.setCurrentState(parents);
- }
-
- // update the tree number of levels, so we can set header width if we need to
- if ( grid.treeBase.numberLevels < row.treeLevel + 1){
- grid.treeBase.numberLevels = row.treeLevel + 1;
- }
- };
-
- renderableRows.forEach( createNode );
-
- // finalise remaining aggregations
- while ( parents.length > 0 ){
- var lastParent = parents.pop();
- service.finaliseAggregations( lastParent );
- }
-
- return grid.treeBase.tree;
- },
-
-
- /**
- * @ngdoc function
- * @name addOrUseNode
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Creates a tree node for this row. If this row already has a treeNode
- * recorded against it, preserves the state, but otherwise overwrites the data.
- *
- * @param {grid} grid the grid we're operating on
- * @param {gridRow} row the row we want to set
- * @param {array} parents an array of the parents this row should have
- * @param {array} aggregationBase empty aggregation information
- * @returns {undefined} updates the parents array, updates the row to have a treeNode, and updates the
- * grid.treeBase.tree
- */
- addOrUseNode: function( grid, row, parents, aggregationBase ){
- var newAggregations = [];
- aggregationBase.forEach( function(aggregation){
- newAggregations.push(service.buildAggregationObject(aggregation.col));
- });
-
- var newNode = { state: uiGridTreeBaseConstants.COLLAPSED, row: row, parentRow: null, aggregations: newAggregations, children: [] };
- if ( row.treeNode ){
- newNode.state = row.treeNode.state;
- }
- if ( parents.length > 0 ){
- newNode.parentRow = parents[parents.length - 1];
- }
- row.treeNode = newNode;
-
- if ( parents.length === 0 ){
- grid.treeBase.tree.push( newNode );
- } else {
- parents[parents.length - 1].treeNode.children.push( newNode );
- }
- },
-
-
- /**
- * @ngdoc function
- * @name setCurrentState
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Looks at the parents array to determine our current state.
- * If any node in the hierarchy is collapsed, then return collapsed, otherwise return
- * expanded.
- *
- * @param {array} parents an array of the parents this row should have
- * @returns {string} the state we should be setting to any nodes we see
- */
- setCurrentState: function( parents ){
- var currentState = uiGridTreeBaseConstants.EXPANDED;
- parents.forEach( function(parent){
- if ( parent.treeNode.state === uiGridTreeBaseConstants.COLLAPSED ){
- currentState = uiGridTreeBaseConstants.COLLAPSED;
- }
- });
- return currentState;
- },
-
-
- /**
- * @ngdoc function
- * @name sortTree
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Performs a recursive sort on the tree nodes, sorting the
- * children of each node and putting them back into the children array.
- *
- * Before doing this it turns back on all the sortIgnore - things that were previously
- * ignored we process now. Since we're sorting within the nodes, presumably anything
- * that was already sorted is how we derived the nodes, we can keep those sorts too.
- *
- * We only sort tree nodes that are expanded - no point in wasting effort sorting collapsed
- * nodes
- *
- * @param {Grid} grid the grid to get the aggregation information from
- * @returns {array} the aggregation information
- */
- sortTree: function( grid ){
- grid.columns.forEach( function( column ) {
- if ( column.sort && column.sort.ignoreSort ){
- delete column.sort.ignoreSort;
- }
- });
-
- grid.treeBase.tree = service.sortInternal( grid, grid.treeBase.tree );
- },
-
- sortInternal: function( grid, treeList ){
- var rows = treeList.map( function( node ){
- return node.row;
- });
-
- rows = rowSorter.sort( grid, rows, grid.columns );
-
- var treeNodes = rows.map( function( row ){
- return row.treeNode;
- });
-
- treeNodes.forEach( function( node ){
- if ( node.state === uiGridTreeBaseConstants.EXPANDED && node.children && node.children.length > 0 ){
- node.children = service.sortInternal( grid, node.children );
- }
- });
-
- return treeNodes;
- },
-
- /**
- * @ngdoc function
- * @name fixFilter
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description After filtering has run, we need to go back through the tree
- * and make sure the parent rows are always visible if any of the child rows
- * are visible (filtering may make a child visible, but the parent may not
- * match the filter criteria)
- *
- * This has a risk of being computationally expensive, we do it by walking
- * the tree and remembering whether there are any invisible nodes on the
- * way down.
- *
- * @param {Grid} grid the grid to fix filters on
- */
- fixFilter: function( grid ){
- var parentsVisible;
-
- grid.treeBase.tree.forEach( function( node ){
- if ( node.children && node.children.length > 0 ){
- parentsVisible = node.row.visible;
- service.fixFilterInternal( node.children, parentsVisible );
- }
- });
- },
-
- fixFilterInternal: function( nodes, parentsVisible) {
- nodes.forEach( function( node ){
- if ( node.row.visible && !parentsVisible ){
- service.setParentsVisible( node );
- parentsVisible = true;
- }
-
- if ( node.children && node.children.length > 0 ){
- if ( service.fixFilterInternal( node.children, ( parentsVisible && node.row.visible ) ) ) {
- parentsVisible = true;
- }
- }
- });
-
- return parentsVisible;
- },
-
- setParentsVisible: function( node ){
- while ( node.parentRow ){
- node.parentRow.visible = true;
- node = node.parentRow.treeNode;
- }
- },
-
- /**
- * @ngdoc function
- * @name buildAggregationObject
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Build the object which is stored on the column for holding meta-data about the aggregation.
- * This method should only be called with columns which have an aggregation.
- *
- * @param {Column} the column which this object relates to
- * @returns {object} {col: Column object, label: string, type: string (optional)}
- */
- buildAggregationObject: function( column ){
- var newAggregation = { col: column };
-
- if ( column.treeAggregation && column.treeAggregation.type ){
- newAggregation.type = column.treeAggregation.type;
- }
-
- if ( column.treeAggregation && column.treeAggregation.label ){
- newAggregation.label = column.treeAggregation.label;
- }
-
- return newAggregation;
- },
-
- /**
- * @ngdoc function
- * @name getAggregations
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Looks through the grid columns to find those with aggregations,
- * and collates the aggregation information into an array, returns that array
- *
- * @param {Grid} grid the grid to get the aggregation information from
- * @returns {array} the aggregation information
- */
- getAggregations: function( grid ){
- var aggregateArray = [];
-
- grid.columns.forEach( function(column){
- if ( typeof(column.treeAggregationFn) !== 'undefined' ){
- aggregateArray.push( service.buildAggregationObject(column) );
-
- if ( grid.options.showColumnFooter && typeof(column.colDef.aggregationType) === 'undefined' && column.treeAggregation ){
- // Add aggregation object for footer
- column.treeFooterAggregation = service.buildAggregationObject(column);
- column.aggregationType = service.treeFooterAggregationType;
- }
- }
- });
- return aggregateArray;
- },
-
-
- /**
- * @ngdoc function
- * @name aggregate
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Accumulate the data from this row onto the aggregations for each parent
- *
- * Iterate over the parents, then iterate over the aggregations for each of those parents,
- * and perform the aggregation for each individual aggregation
- *
- * @param {Grid} grid grid object
- * @param {GridRow} row the row we want to set grouping visibility on
- * @param {array} parents the parents that we would want to aggregate onto
- */
- aggregate: function( grid, row, parents ){
- if ( parents.length === 0 && row.treeNode && row.treeNode.aggregations ){
- row.treeNode.aggregations.forEach(function(aggregation){
- // Calculate aggregations for footer even if there are no grouped rows
- if ( typeof(aggregation.col.treeFooterAggregation) !== 'undefined' ) {
- var fieldValue = grid.getCellValue(row, aggregation.col);
- var numValue = Number(fieldValue);
- aggregation.col.treeAggregationFn(aggregation.col.treeFooterAggregation, fieldValue, numValue, row);
- }
- });
- }
-
- parents.forEach( function( parent, index ){
- if ( parent.treeNode.aggregations ){
- parent.treeNode.aggregations.forEach( function( aggregation ){
- var fieldValue = grid.getCellValue(row, aggregation.col);
- var numValue = Number(fieldValue);
- aggregation.col.treeAggregationFn(aggregation, fieldValue, numValue, row);
-
- if ( index === 0 && typeof(aggregation.col.treeFooterAggregation) !== 'undefined' ){
- aggregation.col.treeAggregationFn(aggregation.col.treeFooterAggregation, fieldValue, numValue, row);
- }
- });
- }
- });
- },
-
-
- // Aggregation routines - no doco needed as self evident
- nativeAggregations: function() {
- var nativeAggregations = {
- count: {
- label: i18nService.get().aggregation.count,
- menuTitle: i18nService.get().grouping.aggregate_count,
- aggregationFn: function (aggregation, fieldValue, numValue) {
- if (typeof(aggregation.value) === 'undefined') {
- aggregation.value = 1;
- } else {
- aggregation.value++;
- }
- }
- },
-
- sum: {
- label: i18nService.get().aggregation.sum,
- menuTitle: i18nService.get().grouping.aggregate_sum,
- aggregationFn: function( aggregation, fieldValue, numValue ) {
- if (!isNaN(numValue)) {
- if (typeof(aggregation.value) === 'undefined') {
- aggregation.value = numValue;
- } else {
- aggregation.value += numValue;
- }
- }
- }
- },
-
- min: {
- label: i18nService.get().aggregation.min,
- menuTitle: i18nService.get().grouping.aggregate_min,
- aggregationFn: function( aggregation, fieldValue, numValue ) {
- if (typeof(aggregation.value) === 'undefined') {
- aggregation.value = fieldValue;
- } else {
- if (typeof(fieldValue) !== 'undefined' && fieldValue !== null && (fieldValue < aggregation.value || aggregation.value === null)) {
- aggregation.value = fieldValue;
- }
- }
- }
- },
-
- max: {
- label: i18nService.get().aggregation.max,
- menuTitle: i18nService.get().grouping.aggregate_max,
- aggregationFn: function( aggregation, fieldValue, numValue ){
- if ( typeof(aggregation.value) === 'undefined' ){
- aggregation.value = fieldValue;
- } else {
- if ( typeof(fieldValue) !== 'undefined' && fieldValue !== null && (fieldValue > aggregation.value || aggregation.value === null)){
- aggregation.value = fieldValue;
- }
- }
- }
- },
-
- avg: {
- label: i18nService.get().aggregation.avg,
- menuTitle: i18nService.get().grouping.aggregate_avg,
- aggregationFn: function( aggregation, fieldValue, numValue ){
- if ( typeof(aggregation.count) === 'undefined' ){
- aggregation.count = 1;
- } else {
- aggregation.count++;
- }
-
- if ( isNaN(numValue) ){
- return;
- }
-
- if ( typeof(aggregation.value) === 'undefined' || typeof(aggregation.sum) === 'undefined' ){
- aggregation.value = numValue;
- aggregation.sum = numValue;
- } else {
- aggregation.sum += numValue;
- aggregation.value = aggregation.sum / aggregation.count;
- }
- }
- }
- };
- return nativeAggregations;
- },
-
- /**
- * @ngdoc function
- * @name finaliseAggregation
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Helper function used to finalize aggregation nodes and footer cells
- *
- * @param {gridRow} row the parent we're finalising
- * @param {aggregation} the aggregation object manipulated by the aggregationFn
- */
- finaliseAggregation: function(row, aggregation){
- if ( aggregation.col.treeAggregationUpdateEntity && typeof(row) !== 'undefined' && typeof(row.entity[ '$$' + aggregation.col.uid ]) !== 'undefined' ){
- angular.extend( aggregation, row.entity[ '$$' + aggregation.col.uid ]);
- }
-
- if ( typeof(aggregation.col.treeAggregationFinalizerFn) === 'function' ){
- aggregation.col.treeAggregationFinalizerFn( aggregation );
- }
- if ( typeof(aggregation.col.customTreeAggregationFinalizerFn) === 'function' ){
- aggregation.col.customTreeAggregationFinalizerFn( aggregation );
- }
- if ( typeof(aggregation.rendered) === 'undefined' ){
- aggregation.rendered = aggregation.label ? aggregation.label + aggregation.value : aggregation.value;
- }
- },
-
- /**
- * @ngdoc function
- * @name finaliseAggregations
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Format the data from the aggregation into the rendered text
- * e.g. if we had label: 'sum: ' and value: 25, we'd create 'sum: 25'.
- *
- * As part of this we call any formatting callback routines we've been provided.
- *
- * We write our aggregation out to the row.entity if treeAggregationUpdateEntity is
- * set on the column - we don't overwrite any information that's already there, we append
- * to it so that grouping can have set the groupVal beforehand without us overwriting it.
- *
- * We need to copy the data from the row.entity first before we finalise the aggregation,
- * we need that information for the finaliserFn
- *
- * @param {gridRow} row the parent we're finalising
- */
- finaliseAggregations: function( row ){
- if ( typeof(row.treeNode.aggregations) === 'undefined' ){
- return;
- }
-
- row.treeNode.aggregations.forEach( function( aggregation ) {
- service.finaliseAggregation(row, aggregation);
-
- if ( aggregation.col.treeAggregationUpdateEntity ){
- var aggregationCopy = {};
- angular.forEach( aggregation, function( value, key ){
- if ( aggregation.hasOwnProperty(key) && key !== 'col' ){
- aggregationCopy[key] = value;
- }
- });
-
- row.entity[ '$$' + aggregation.col.uid ] = aggregationCopy;
- }
- });
- },
-
- /**
- * @ngdoc function
- * @name treeFooterAggregationType
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Uses the tree aggregation functions and finalizers to set the
- * column footer aggregations.
- *
- * @param {rows} visible rows. not used, but accepted to match signature of GridColumn.aggregationType
- * @param {gridColumn} the column we are finalizing
- */
- treeFooterAggregationType: function( rows, column ) {
- service.finaliseAggregation(undefined, column.treeFooterAggregation);
- if ( typeof(column.treeFooterAggregation.value) === 'undefined' || column.treeFooterAggregation.rendered === null ){
- // The was apparently no aggregation performed (perhaps this is a grouped column
- return '';
- }
- return column.treeFooterAggregation.rendered;
- }
- };
-
- return service;
-
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeBase.directive:uiGridTreeRowHeaderButtons
- * @element div
- *
- * @description Provides the expand/collapse button on rows
- */
- module.directive('uiGridTreeBaseRowHeaderButtons', ['$templateCache', 'uiGridTreeBaseService',
- function ($templateCache, uiGridTreeBaseService) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/treeBaseRowHeaderButtons'),
- scope: true,
- require: '^uiGrid',
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = uiGridCtrl.grid;
- $scope.treeButtonClick = function(row, evt) {
- uiGridTreeBaseService.toggleRowTreeState(self, row, evt);
- };
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeBase.directive:uiGridTreeBaseExpandAllButtons
- * @element div
- *
- * @description Provides the expand/collapse all button
- */
- module.directive('uiGridTreeBaseExpandAllButtons', ['$templateCache', 'uiGridTreeBaseService',
- function ($templateCache, uiGridTreeBaseService) {
- return {
- replace: true,
- restrict: 'E',
- template: $templateCache.get('ui-grid/treeBaseExpandAllButtons'),
- scope: false,
- link: function($scope, $elm, $attrs, uiGridCtrl) {
- var self = $scope.col.grid;
-
- $scope.headerButtonClick = function(row, evt) {
- if ( self.treeBase.expandAll ){
- uiGridTreeBaseService.collapseAllRows(self, evt);
- } else {
- uiGridTreeBaseService.expandAllRows(self, evt);
- }
- };
- }
- };
- }]);
-
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeBase.directive:uiGridViewport
- * @element div
- *
- * @description Stacks on top of ui.grid.uiGridViewport to set formatting on a tree header row
- */
- module.directive('uiGridViewport',
- ['$compile', 'uiGridConstants', 'gridUtil', '$parse',
- function ($compile, uiGridConstants, gridUtil, $parse) {
- return {
- priority: -200, // run after default directive
- scope: false,
- compile: function ($elm, $attrs) {
- var rowRepeatDiv = angular.element($elm.children().children()[0]);
-
- var existingNgClass = rowRepeatDiv.attr("ng-class");
- var newNgClass = '';
- if ( existingNgClass ) {
- newNgClass = existingNgClass.slice(0, -1) + ",'ui-grid-tree-header-row': row.treeLevel > -1}";
- } else {
- newNgClass = "{'ui-grid-tree-header-row': row.treeLevel > -1}";
- }
- rowRepeatDiv.attr("ng-class", newNgClass);
-
- return {
- pre: function ($scope, $elm, $attrs, controllers) {
-
- },
- post: function ($scope, $elm, $attrs, controllers) {
- }
- };
- }
- };
- }]);
-})();
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc overview
- * @name ui.grid.treeView
- * @description
- *
- * # ui.grid.treeView
- *
- * <div class="alert alert-warning" role="alert"><strong>Beta</strong> This feature is ready for testing, but it either hasn't seen a lot of use or has some known bugs.</div>
- *
- * This module provides a tree view of the data that it is provided, with nodes in that
- * tree and leaves. Unlike grouping, the tree is an inherent property of the data and must
- * be provided with your data array.
- *
- * Design information:
- * -------------------
- *
- * TreeView uses treeBase for the underlying functionality, and is a very thin wrapper around
- * that logic. Most of the design information has now moved to treebase.
- * <br/>
- * <br/>
- *
- * <div doc-module-components="ui.grid.treeView"></div>
- */
-
- var module = angular.module('ui.grid.treeView', ['ui.grid', 'ui.grid.treeBase']);
-
- /**
- * @ngdoc object
- * @name ui.grid.treeView.constant:uiGridTreeViewConstants
- *
- * @description constants available in treeView module, this includes
- * all the constants declared in the treeBase module (these are manually copied
- * as there isn't an easy way to include constants in another constants file, and
- * we don't want to make users include treeBase)
- *
- */
- module.constant('uiGridTreeViewConstants', {
- featureName: "treeView",
- rowHeaderColName: 'treeBaseRowHeaderCol',
- EXPANDED: 'expanded',
- COLLAPSED: 'collapsed',
- aggregation: {
- COUNT: 'count',
- SUM: 'sum',
- MAX: 'max',
- MIN: 'min',
- AVG: 'avg'
- }
- });
-
- /**
- * @ngdoc service
- * @name ui.grid.treeView.service:uiGridTreeViewService
- *
- * @description Services for treeView features
- */
- module.service('uiGridTreeViewService', ['$q', 'uiGridTreeViewConstants', 'uiGridTreeBaseConstants', 'uiGridTreeBaseService', 'gridUtil', 'GridRow', 'gridClassFactory', 'i18nService', 'uiGridConstants',
- function ($q, uiGridTreeViewConstants, uiGridTreeBaseConstants, uiGridTreeBaseService, gridUtil, GridRow, gridClassFactory, i18nService, uiGridConstants) {
-
- var service = {
-
- initializeGrid: function (grid, $scope) {
- uiGridTreeBaseService.initializeGrid( grid, $scope );
-
- /**
- * @ngdoc object
- * @name ui.grid.treeView.grid:treeView
- *
- * @description Grid properties and functions added for treeView
- */
- grid.treeView = {};
-
- grid.registerRowsProcessor(service.adjustSorting, 60);
-
- /**
- * @ngdoc object
- * @name ui.grid.treeView.api:PublicApi
- *
- * @description Public Api for treeView feature
- */
- var publicApi = {
- events: {
- treeView: {
- }
- },
- methods: {
- treeView: {
- }
- }
- };
-
- grid.api.registerEventsFromObject(publicApi.events);
-
- grid.api.registerMethodsFromObject(publicApi.methods);
-
- },
-
- defaultGridOptions: function (gridOptions) {
- //default option to true unless it was explicitly set to false
- /**
- * @ngdoc object
- * @name ui.grid.treeView.api:GridOptions
- *
- * @description GridOptions for treeView feature, these are available to be
- * set using the ui-grid {@link ui.grid.class:GridOptions gridOptions}
- *
- * Many tree options are set on treeBase, make sure to look at that feature in
- * conjunction with these options.
- */
-
- /**
- * @ngdoc object
- * @name enableTreeView
- * @propertyOf ui.grid.treeView.api:GridOptions
- * @description Enable row tree view for entire grid.
- * <br/>Defaults to true
- */
- gridOptions.enableTreeView = gridOptions.enableTreeView !== false;
-
- },
-
-
- /**
- * @ngdoc function
- * @name adjustSorting
- * @methodOf ui.grid.treeBase.service:uiGridTreeBaseService
- * @description Trees cannot be sorted the same as flat lists of rows -
- * trees are sorted recursively within each level - so the children of each
- * node are sorted, but not the full set of rows.
- *
- * To achieve this, we suppress the normal sorting by setting ignoreSort on
- * each of the sort columns. When the treeBase rowsProcessor runs it will then
- * unignore these, and will perform a recursive sort against the tree that it builds.
- *
- * @param {array} renderableRows the rows that we need to pass on through
- * @returns {array} renderableRows that we passed on through
- */
- adjustSorting: function( renderableRows ) {
- var grid = this;
-
- grid.columns.forEach( function( column ){
- if ( column.sort ){
- column.sort.ignoreSort = true;
- }
- });
-
- return renderableRows;
- }
-
- };
-
- return service;
-
- }]);
-
- /**
- * @ngdoc directive
- * @name ui.grid.treeView.directive:uiGridTreeView
- * @element div
- * @restrict A
- *
- * @description Adds treeView features to grid
- *
- * @example
- <example module="app">
- <file name="app.js">
- var app = angular.module('app', ['ui.grid', 'ui.grid.treeView']);
-
- app.controller('MainCtrl', ['$scope', function ($scope) {
- $scope.data = [
- { name: 'Bob', title: 'CEO' },
- { name: 'Frank', title: 'Lowly Developer' }
- ];
-
- $scope.columnDefs = [
- {name: 'name', enableCellEdit: true},
- {name: 'title', enableCellEdit: true}
- ];
-
- $scope.gridOptions = { columnDefs: $scope.columnDefs, data: $scope.data };
- }]);
- </file>
- <file name="index.html">
- <div ng-controller="MainCtrl">
- <div ui-grid="gridOptions" ui-grid-tree-view></div>
- </div>
- </file>
- </example>
- */
- module.directive('uiGridTreeView', ['uiGridTreeViewConstants', 'uiGridTreeViewService', '$templateCache',
- function (uiGridTreeViewConstants, uiGridTreeViewService, $templateCache) {
- return {
- replace: true,
- priority: 0,
- require: '^uiGrid',
- scope: false,
- compile: function () {
- return {
- pre: function ($scope, $elm, $attrs, uiGridCtrl) {
- if (uiGridCtrl.grid.options.enableTreeView !== false){
- uiGridTreeViewService.initializeGrid(uiGridCtrl.grid, $scope);
- }
- },
- post: function ($scope, $elm, $attrs, uiGridCtrl) {
-
- }
- };
- }
- };
- }]);
-})();
-
-angular.module('ui.grid').run(['$templateCache', function($templateCache) {
- 'use strict';
-
- $templateCache.put('ui-grid/ui-grid-filter',
- "<div class=\"ui-grid-filter-container\" ng-repeat=\"colFilter in col.filters\" ng-class=\"{'ui-grid-filter-cancel-button-hidden' : colFilter.disableCancelFilterButton === true }\"><div ng-if=\"colFilter.type !== 'select'\"><input type=\"text\" class=\"ui-grid-filter-input ui-grid-filter-input-{{$index}}\" ng-model=\"colFilter.term\" ng-attr-placeholder=\"{{colFilter.placeholder || ''}}\" aria-label=\"{{colFilter.ariaLabel || aria.defaultFilterLabel}}\"><div role=\"button\" class=\"ui-grid-filter-button\" ng-click=\"removeFilter(colFilter, $index)\" ng-if=\"!colFilter.disableCancelFilterButton\" ng-disabled=\"colFilter.term === undefined || colFilter.term === null || colFilter.term === ''\" ng-show=\"colFilter.term !== undefined && colFilter.term !== null && colFilter.term !== ''\"><i class=\"ui-grid-icon-cancel\" ui-grid-one-bind-aria-label=\"aria.removeFilter\">&nbsp;</i></div></div><div ng-if=\"colFilter.type === 'select'\"><select class=\"ui-grid-filter-select ui-grid-filter-input-{{$index}}\" ng-model=\"colFilter.term\" ng-attr-placeholder=\"{{colFilter.placeholder || aria.defaultFilterLabel}}\" aria-label=\"{{colFilter.ariaLabel || ''}}\" ng-options=\"option.value as option.label for option in colFilter.selectOptions\"><option value=\"\"></option></select><div role=\"button\" class=\"ui-grid-filter-button-select\" ng-click=\"removeFilter(colFilter, $index)\" ng-if=\"!colFilter.disableCancelFilterButton\" ng-disabled=\"colFilter.term === undefined || colFilter.term === null || colFilter.term === ''\" ng-show=\"colFilter.term !== undefined && colFilter.term != null\"><i class=\"ui-grid-icon-cancel\" ui-grid-one-bind-aria-label=\"aria.removeFilter\">&nbsp;</i></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-footer',
- "<div class=\"ui-grid-footer-panel ui-grid-footer-aggregates-row\"><!-- tfooter --><div class=\"ui-grid-footer ui-grid-footer-viewport\"><div class=\"ui-grid-footer-canvas\"><div class=\"ui-grid-footer-cell-wrapper\" ng-style=\"colContainer.headerCellWrapperStyle()\"><div role=\"row\" class=\"ui-grid-footer-cell-row\"><div ui-grid-footer-cell role=\"gridcell\" ng-repeat=\"col in colContainer.renderedColumns track by col.uid\" col=\"col\" render-index=\"$index\" class=\"ui-grid-footer-cell ui-grid-clearfix\"></div></div></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-grid-footer',
- "<div class=\"ui-grid-footer-info ui-grid-grid-footer\"><span>{{'search.totalItems' | t}} {{grid.rows.length}}</span> <span ng-if=\"grid.renderContainers.body.visibleRowCache.length !== grid.rows.length\" class=\"ngLabel\">({{\"search.showingItems\" | t}} {{grid.renderContainers.body.visibleRowCache.length}})</span></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-group-panel',
- "<div class=\"ui-grid-group-panel\"><div ui-t=\"groupPanel.description\" class=\"description\" ng-show=\"groupings.length == 0\"></div><ul ng-show=\"groupings.length > 0\" class=\"ngGroupList\"><li class=\"ngGroupItem\" ng-repeat=\"group in configGroups\"><span class=\"ngGroupElement\"><span class=\"ngGroupName\">{{group.displayName}} <span ng-click=\"removeGroup($index)\" class=\"ngRemoveGroup\">x</span></span> <span ng-hide=\"$last\" class=\"ngGroupArrow\"></span></span></li></ul></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-header',
- "<div role=\"rowgroup\" class=\"ui-grid-header\"><!-- theader --><div class=\"ui-grid-top-panel\"><div class=\"ui-grid-header-viewport\"><div class=\"ui-grid-header-canvas\"><div class=\"ui-grid-header-cell-wrapper\" ng-style=\"colContainer.headerCellWrapperStyle()\"><div role=\"row\" class=\"ui-grid-header-cell-row\"><div class=\"ui-grid-header-cell ui-grid-clearfix\" ng-repeat=\"col in colContainer.renderedColumns track by col.uid\" ui-grid-header-cell col=\"col\" render-index=\"$index\"></div></div></div></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-menu-button',
- "<div class=\"ui-grid-menu-button\"><div role=\"button\" ui-grid-one-bind-id-grid=\"'grid-menu'\" class=\"ui-grid-icon-container\" ng-click=\"toggleMenu()\" aria-haspopup=\"true\"><i class=\"ui-grid-icon-menu\" ui-grid-one-bind-aria-label=\"i18n.aria.buttonLabel\">&nbsp;</i></div><div ui-grid-menu menu-items=\"menuItems\"></div></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-no-header',
- "<div class=\"ui-grid-top-panel\"></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid-row',
- "<div ng-repeat=\"(colRenderIndex, col) in colContainer.renderedColumns track by col.uid\" ui-grid-one-bind-id-grid=\"rowRenderIndex + '-' + col.uid + '-cell'\" class=\"ui-grid-cell\" ng-class=\"{ 'ui-grid-row-header-cell': col.isRowHeader }\" role=\"{{col.isRowHeader ? 'rowheader' : 'gridcell'}}\" ui-grid-cell></div>"
- );
-
-
- $templateCache.put('ui-grid/ui-grid',
- "<div ui-i18n=\"en\" class=\"ui-grid\"><!-- TODO (c0bra): add \"scoped\" attr here, eventually? --><style ui-grid-style>.grid{{ grid.id }} {\n" +
- " /* Styles for the grid */\n" +
- " }\n" +
- "\n" +
- " .grid{{ grid.id }} .ui-grid-row, .grid{{ grid.id }} .ui-grid-cell, .grid{{ grid.id }} .ui-grid-cell .ui-grid-vertical-bar {\n" +
- " height: {{ grid.options.rowHeight }}px;\n" +
- " }\n" +
- "\n" +
- " .grid{{ grid.id }} .ui-grid-row:last-child .ui-grid-cell {\n" +
- " border-bottom-width: {{ ((grid.getTotalRowHeight() < grid.getViewportHeight()) && '1') || '0' }}px;\n" +
- " }\n" +
- "\n" +
- " {{ grid.verticalScrollbarStyles }}\n" +
- " {{ grid.horizontalScrollbarStyles }}\n" +
- "\n" +
- " /*\n" +
- " .ui-grid[dir=rtl] .ui-grid-viewport {\n" +
- " padding-left: {{ grid.verticalScrollbarWidth }}px;\n" +
- " }\n" +
- " */\n" +
- "\n" +
- " {{ grid.customStyles }}</style><div class=\"ui-grid-contents-wrapper\"><div ui-grid-menu-button ng-if=\"grid.options.enableGridMenu\"></div><div ng-if=\"grid.hasLeftContainer()\" style=\"width: 0\" ui-grid-pinned-container=\"'left'\"></div><div ui-grid-render-container container-id=\"'body'\" col-container-name=\"'body'\" row-container-name=\"'body'\" bind-scroll-horizontal=\"true\" bind-scroll-vertical=\"true\" enable-horizontal-scrollbar=\"grid.options.enableHorizontalScrollbar\" enable-vertical-scrollbar=\"grid.options.enableVerticalScrollbar\"></div><div ng-if=\"grid.hasRightContainer()\" style=\"width: 0\" ui-grid-pinned-container=\"'right'\"></div><div ui-grid-grid-footer ng-if=\"grid.options.showGridFooter\"></div><div ui-grid-column-menu ng-if=\"grid.options.enableColumnMenus\"></div><div ng-transclude></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridCell',
- "<div class=\"ui-grid-cell-contents\" title=\"TOOLTIP\">{{COL_FIELD CUSTOM_FILTERS}}</div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridColumnMenu',
- "<div class=\"ui-grid-column-menu\"><div ui-grid-menu menu-items=\"menuItems\"><!-- <div class=\"ui-grid-column-menu\">\n" +
- " <div class=\"inner\" ng-show=\"menuShown\">\n" +
- " <ul>\n" +
- " <div ng-show=\"grid.options.enableSorting\">\n" +
- " <li ng-click=\"sortColumn($event, asc)\" ng-class=\"{ 'selected' : col.sort.direction == asc }\"><i class=\"ui-grid-icon-sort-alt-up\"></i> Sort Ascending</li>\n" +
- " <li ng-click=\"sortColumn($event, desc)\" ng-class=\"{ 'selected' : col.sort.direction == desc }\"><i class=\"ui-grid-icon-sort-alt-down\"></i> Sort Descending</li>\n" +
- " <li ng-show=\"col.sort.direction\" ng-click=\"unsortColumn()\"><i class=\"ui-grid-icon-cancel\"></i> Remove Sort</li>\n" +
- " </div>\n" +
- " </ul>\n" +
- " </div>\n" +
- " </div> --></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridFooterCell',
- "<div class=\"ui-grid-cell-contents\" col-index=\"renderIndex\"><div>{{ col.getAggregationText() + ( col.getAggregationValue() CUSTOM_FILTERS ) }}</div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridHeaderCell',
- "<div role=\"columnheader\" ng-class=\"{ 'sortable': sortable }\" ui-grid-one-bind-aria-labelledby-grid=\"col.uid + '-header-text ' + col.uid + '-sortdir-text'\" aria-sort=\"{{col.sort.direction == asc ? 'ascending' : ( col.sort.direction == desc ? 'descending' : (!col.sort.direction ? 'none' : 'other'))}}\"><div role=\"button\" tabindex=\"0\" class=\"ui-grid-cell-contents ui-grid-header-cell-primary-focus\" col-index=\"renderIndex\" title=\"TOOLTIP\"><span class=\"ui-grid-header-cell-label\" ui-grid-one-bind-id-grid=\"col.uid + '-header-text'\">{{ col.displayName CUSTOM_FILTERS }}</span> <span ui-grid-one-bind-id-grid=\"col.uid + '-sortdir-text'\" ui-grid-visible=\"col.sort.direction\" aria-label=\"{{getSortDirectionAriaLabel()}}\"><i ng-class=\"{ 'ui-grid-icon-up-dir': col.sort.direction == asc, 'ui-grid-icon-down-dir': col.sort.direction == desc, 'ui-grid-icon-blank': !col.sort.direction }\" title=\"{{col.sort.priority ? i18n.headerCell.priority + ' ' + col.sort.priority : null}}\" aria-hidden=\"true\"></i> <sub class=\"ui-grid-sort-priority-number\">{{col.sort.priority}}</sub></span></div><div role=\"button\" tabindex=\"0\" ui-grid-one-bind-id-grid=\"col.uid + '-menu-button'\" class=\"ui-grid-column-menu-button\" ng-if=\"grid.options.enableColumnMenus && !col.isRowHeader && col.colDef.enableColumnMenu !== false\" ng-click=\"toggleMenu($event)\" ng-class=\"{'ui-grid-column-menu-button-last-col': isLastCol}\" ui-grid-one-bind-aria-label=\"i18n.headerCell.aria.columnMenuButtonLabel\" aria-haspopup=\"true\"><i class=\"ui-grid-icon-angle-down\" aria-hidden=\"true\">&nbsp;</i></div><div ui-grid-filter></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridMenu',
- "<div class=\"ui-grid-menu\" ng-if=\"shown\"><div class=\"ui-grid-menu-mid\" ng-show=\"shownMid\"><div class=\"ui-grid-menu-inner\"><button type=\"button\" ng-focus=\"focus=true\" ng-blur=\"focus=false\" class=\"ui-grid-menu-close-button\" ng-class=\"{'ui-grid-sr-only': (!focus)}\"><i class=\"ui-grid-icon-cancel\" ui-grid-one-bind-aria-label=\"i18n.close\"></i></button><ul role=\"menu\" class=\"ui-grid-menu-items\"><li ng-repeat=\"item in menuItems\" role=\"menuitem\" ui-grid-menu-item ui-grid-one-bind-id=\"'menuitem-'+$index\" action=\"item.action\" name=\"item.title\" active=\"item.active\" icon=\"item.icon\" shown=\"item.shown\" context=\"item.context\" template-url=\"item.templateUrl\" leave-open=\"item.leaveOpen\" screen-reader-only=\"item.screenReaderOnly\"></li></ul></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridMenuItem',
- "<button type=\"button\" class=\"ui-grid-menu-item\" ng-click=\"itemAction($event, title)\" ng-show=\"itemShown()\" ng-class=\"{ 'ui-grid-menu-item-active': active(), 'ui-grid-sr-only': (!focus && screenReaderOnly) }\" aria-pressed=\"{{active()}}\" tabindex=\"0\" ng-focus=\"focus=true\" ng-blur=\"focus=false\"><i ng-class=\"icon\" aria-hidden=\"true\">&nbsp;</i> {{ name }}</button>"
- );
-
-
- $templateCache.put('ui-grid/uiGridRenderContainer',
- "<div role=\"grid\" ui-grid-one-bind-id-grid=\"'grid-container'\" class=\"ui-grid-render-container\" ng-style=\"{ 'margin-left': colContainer.getMargin('left') + 'px', 'margin-right': colContainer.getMargin('right') + 'px' }\"><!-- All of these dom elements are replaced in place --><div ui-grid-header></div><div ui-grid-viewport></div><div ng-if=\"colContainer.needsHScrollbarPlaceholder()\" class=\"ui-grid-scrollbar-placeholder\" ng-style=\"{height:colContainer.grid.scrollbarHeight + 'px'}\"></div><ui-grid-footer ng-if=\"grid.options.showColumnFooter\"></ui-grid-footer></div>"
- );
-
-
- $templateCache.put('ui-grid/uiGridViewport',
- "<div role=\"rowgroup\" class=\"ui-grid-viewport\" ng-style=\"colContainer.getViewportStyle()\"><!-- tbody --><div class=\"ui-grid-canvas\"><div ng-repeat=\"(rowRenderIndex, row) in rowContainer.renderedRows track by $index\" class=\"ui-grid-row\" ng-style=\"Viewport.rowStyle(rowRenderIndex)\"><div role=\"row\" ui-grid-row=\"row\" row-render-index=\"rowRenderIndex\"></div></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/cellEditor',
- "<div><form name=\"inputForm\"><input type=\"INPUT_TYPE\" ng-class=\"'colt' + col.uid\" ui-grid-editor ng-model=\"MODEL_COL_FIELD\"></form></div>"
- );
-
-
- $templateCache.put('ui-grid/dropdownEditor',
- "<div><form name=\"inputForm\"><select ng-class=\"'colt' + col.uid\" ui-grid-edit-dropdown ng-model=\"MODEL_COL_FIELD\" ng-options=\"field[editDropdownIdLabel] as field[editDropdownValueLabel] CUSTOM_FILTERS for field in editDropdownOptionsArray\"></select></form></div>"
- );
-
-
- $templateCache.put('ui-grid/fileChooserEditor',
- "<div><form name=\"inputForm\"><input ng-class=\"'colt' + col.uid\" ui-grid-edit-file-chooser type=\"file\" id=\"files\" name=\"files[]\" ng-model=\"MODEL_COL_FIELD\"></form></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableRow',
- "<div ui-grid-expandable-row ng-if=\"expandableRow.shouldRenderExpand()\" class=\"expandableRow\" style=\"float:left; margin-top: 1px; margin-bottom: 1px\" ng-style=\"{width: (grid.renderContainers.body.getCanvasWidth()) + 'px', height: row.expandedRowHeight + 'px'}\"></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableRowHeader',
- "<div class=\"ui-grid-row-header-cell ui-grid-expandable-buttons-cell\"><div class=\"ui-grid-cell-contents\"><i ng-class=\"{ 'ui-grid-icon-plus-squared' : !row.isExpanded, 'ui-grid-icon-minus-squared' : row.isExpanded }\" ng-click=\"grid.api.expandable.toggleRowExpansion(row.entity)\"></i></div></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableScrollFiller',
- "<div ng-if=\"expandableRow.shouldRenderFiller()\" ng-class=\"{scrollFiller:true, scrollFillerClass:(colContainer.name === 'body')}\" ng-style=\"{ width: (grid.getViewportWidth()) + 'px', height: row.expandedRowHeight + 2 + 'px', 'margin-left': grid.options.rowHeader.rowHeaderWidth + 'px' }\"><i class=\"ui-grid-icon-spin5 ui-grid-animate-spin\" ng-style=\"{'margin-top': ( row.expandedRowHeight/2 - 5) + 'px', 'margin-left' : ((grid.getViewportWidth() - grid.options.rowHeader.rowHeaderWidth)/2 - 5) + 'px'}\"></i></div>"
- );
-
-
- $templateCache.put('ui-grid/expandableTopRowHeader',
- "<div class=\"ui-grid-row-header-cell ui-grid-expandable-buttons-cell\"><div class=\"ui-grid-cell-contents\"><i ng-class=\"{ 'ui-grid-icon-plus-squared' : !grid.expandable.expandedAll, 'ui-grid-icon-minus-squared' : grid.expandable.expandedAll }\" ng-click=\"grid.api.expandable.toggleAllRows()\"></i></div></div>"
- );
-
-
- $templateCache.put('ui-grid/csvLink',
- "<span class=\"ui-grid-exporter-csv-link-span\"><a href=\"data:text/csv;charset=UTF-8,CSV_CONTENT\" download=\"FILE_NAME\">LINK_LABEL</a></span>"
- );
-
-
- $templateCache.put('ui-grid/importerMenuItem',
- "<li class=\"ui-grid-menu-item\"><form><input class=\"ui-grid-importer-file-chooser\" type=\"file\" id=\"files\" name=\"files[]\"></form></li>"
- );
-
-
- $templateCache.put('ui-grid/importerMenuItemContainer',
- "<div ui-grid-importer-menu-item></div>"
- );
-
-
- $templateCache.put('ui-grid/pagination',
- "<div role=\"contentinfo\" class=\"ui-grid-pager-panel\" ui-grid-pager ng-show=\"grid.options.enablePaginationControls\"><div role=\"navigation\" class=\"ui-grid-pager-container\"><div role=\"menubar\" class=\"ui-grid-pager-control\"><button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-first\" ui-grid-one-bind-title=\"aria.pageToFirst\" ui-grid-one-bind-aria-label=\"aria.pageToFirst\" ng-click=\"pageFirstPageClick()\" ng-disabled=\"cantPageBackward()\"><div class=\"first-triangle\"><div class=\"first-bar\"></div></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-previous\" ui-grid-one-bind-title=\"aria.pageBack\" ui-grid-one-bind-aria-label=\"aria.pageBack\" ng-click=\"pagePreviousPageClick()\" ng-disabled=\"cantPageBackward()\"><div class=\"first-triangle prev-triangle\"></div></button> <input type=\"number\" ui-grid-one-bind-title=\"aria.pageSelected\" ui-grid-one-bind-aria-label=\"aria.pageSelected\" class=\"ui-grid-pager-control-input\" ng-model=\"grid.options.paginationCurrentPage\" min=\"1\" max=\"{{ paginationApi.getTotalPages() }}\" required> <span class=\"ui-grid-pager-max-pages-number\" ng-show=\"paginationApi.getTotalPages() > 0\"><abbr ui-grid-one-bind-title=\"paginationOf\">/</abbr> {{ paginationApi.getTotalPages() }}</span> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-next\" ui-grid-one-bind-title=\"aria.pageForward\" ui-grid-one-bind-aria-label=\"aria.pageForward\" ng-click=\"pageNextPageClick()\" ng-disabled=\"cantPageForward()\"><div class=\"last-triangle next-triangle\"></div></button> <button type=\"button\" role=\"menuitem\" class=\"ui-grid-pager-last\" ui-grid-one-bind-title=\"aria.pageToLast\" ui-grid-one-bind-aria-label=\"aria.pageToLast\" ng-click=\"pageLastPageClick()\" ng-disabled=\"cantPageToLast()\"><div class=\"last-triangle\"><div class=\"last-bar\"></div></div></button></div><div class=\"ui-grid-pager-row-count-picker\" ng-if=\"grid.options.paginationPageSizes.length > 1\"><select ui-grid-one-bind-aria-labelledby-grid=\"'items-per-page-label'\" ng-model=\"grid.options.paginationPageSize\" ng-options=\"o as o for o in grid.options.paginationPageSizes\"></select><span ui-grid-one-bind-id-grid=\"'items-per-page-label'\" class=\"ui-grid-pager-row-count-label\">&nbsp;{{sizesLabel}}</span></div><span ng-if=\"grid.options.paginationPageSizes.length <= 1\" class=\"ui-grid-pager-row-count-label\">{{grid.options.paginationPageSize}}&nbsp;{{sizesLabel}}</span></div><div class=\"ui-grid-pager-count-container\"><div class=\"ui-grid-pager-count\"><span ng-show=\"grid.options.totalItems > 0\">{{showingLow}} <abbr ui-grid-one-bind-title=\"paginationThrough\">-</abbr> {{showingHigh}} {{paginationOf}} {{grid.options.totalItems}} {{totalItemsLabel}}</span></div></div></div>"
- );
-
-
- $templateCache.put('ui-grid/columnResizer',
- "<div ui-grid-column-resizer ng-if=\"grid.options.enableColumnResizing\" class=\"ui-grid-column-resizer\" col=\"col\" position=\"right\" render-index=\"renderIndex\" unselectable=\"on\"></div>"
- );
-
-
- $templateCache.put('ui-grid/gridFooterSelectedItems',
- "<span ng-if=\"grid.selection.selectedCount !== 0 && grid.options.enableFooterTotalSelected\">({{\"search.selectedItems\" | t}} {{grid.selection.selectedCount}})</span>"
- );
-
-
- $templateCache.put('ui-grid/selectionHeaderCell',
- "<div><!-- <div class=\"ui-grid-vertical-bar\">&nbsp;</div> --><div class=\"ui-grid-cell-contents\" col-index=\"renderIndex\"><ui-grid-selection-select-all-buttons ng-if=\"grid.options.enableSelectAll\"></ui-grid-selection-select-all-buttons></div></div>"
- );
-
-
- $templateCache.put('ui-grid/selectionRowHeader',
- "<div class=\"ui-grid-disable-selection\"><div class=\"ui-grid-cell-contents\"><ui-grid-selection-row-header-buttons></ui-grid-selection-row-header-buttons></div></div>"
- );
-
-
- $templateCache.put('ui-grid/selectionRowHeaderButtons',
- "<div class=\"ui-grid-selection-row-header-buttons ui-grid-icon-ok\" ng-class=\"{'ui-grid-row-selected': row.isSelected}\" ng-click=\"selectButtonClick(row, $event)\">&nbsp;</div>"
- );
-
-
- $templateCache.put('ui-grid/selectionSelectAllButtons',
- "<div class=\"ui-grid-selection-row-header-buttons ui-grid-icon-ok\" ng-class=\"{'ui-grid-all-selected': grid.selection.selectAll}\" ng-click=\"headerButtonClick($event)\"></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseExpandAllButtons',
- "<div class=\"ui-grid-tree-base-row-header-buttons\" ng-class=\"{'ui-grid-icon-minus-squared': grid.treeBase.numberLevels > 0 && grid.treeBase.expandAll, 'ui-grid-icon-plus-squared': grid.treeBase.numberLevels > 0 && !grid.treeBase.expandAll}\" ng-click=\"headerButtonClick($event)\"></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseHeaderCell',
- "<div><div class=\"ui-grid-cell-contents\" col-index=\"renderIndex\"><ui-grid-tree-base-expand-all-buttons></ui-grid-tree-base-expand-all-buttons></div></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseRowHeader',
- "<div class=\"ui-grid-cell-contents\"><ui-grid-tree-base-row-header-buttons></ui-grid-tree-base-row-header-buttons></div>"
- );
-
-
- $templateCache.put('ui-grid/treeBaseRowHeaderButtons',
- "<div class=\"ui-grid-tree-base-row-header-buttons\" ng-class=\"{'ui-grid-tree-base-header': row.treeLevel > -1 }\" ng-click=\"treeButtonClick(row, $event)\"><i ng-class=\"{'ui-grid-icon-minus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'expanded', 'ui-grid-icon-plus-squared': ( ( grid.options.showTreeExpandNoChildren && row.treeLevel > -1 ) || ( row.treeNode.children && row.treeNode.children.length > 0 ) ) && row.treeNode.state === 'collapsed'}\" ng-style=\"{'padding-left': grid.options.treeIndent * row.treeLevel + 'px'}\"></i> &nbsp;</div>"
- );
-
-}]);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.svg b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.svg
deleted file mode 100644
index 3d675f63..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.svg
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata>Copyright (C) 2015 by original authors @ fontello.com</metadata>
-<defs>
-<font id="ui-grid" horiz-adv-x="1000" >
-<font-face font-family="ui-grid" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
-<missing-glyph horiz-adv-x="1000" />
-<glyph glyph-name="plus-squared" unicode="&#xc350;" d="m714 314v72q0 14-10 25t-25 10h-179v179q0 15-11 25t-25 11h-71q-15 0-25-11t-11-25v-179h-178q-15 0-26-10t-10-25v-72q0-14 10-25t26-10h178v-179q0-14 11-25t25-11h71q15 0 25 11t11 25v179h179q14 0 25 10t10 25z m143 304v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
-<glyph glyph-name="minus-squared" unicode="&#xc351;" d="m714 314v72q0 14-10 25t-25 10h-500q-15 0-26-10t-10-25v-72q0-14 10-25t26-10h500q14 0 25 10t10 25z m143 304v-536q0-66-47-113t-114-48h-535q-67 0-114 48t-47 113v536q0 66 47 113t114 48h535q67 0 114-48t47-113z" horiz-adv-x="857.1" />
-<glyph glyph-name="search" unicode="&#xc352;" d="m643 386q0 103-74 176t-176 74-177-74-73-176 73-177 177-73 176 73 74 177z m286-465q0-29-22-50t-50-21q-30 0-50 21l-191 191q-100-69-223-69-80 0-153 31t-125 84-84 125-31 153 31 152 84 126 125 84 153 31 152-31 126-84 84-126 31-152q0-123-69-223l191-191q21-21 21-51z" horiz-adv-x="928.6" />
-<glyph glyph-name="cancel" unicode="&#xc353;" d="m724 112q0-22-15-38l-76-76q-16-15-38-15t-38 15l-164 165-164-165q-16-15-38-15t-38 15l-76 76q-16 16-16 38t16 38l164 164-164 164q-16 16-16 38t16 38l76 76q16 16 38 16t38-16l164-164 164 164q16 16 38 16t38-16l76-76q15-15 15-38t-15-38l-164-164 164-164q15-15 15-38z" horiz-adv-x="785.7" />
-<glyph glyph-name="info-circled" unicode="&#xc354;" d="m571 82v89q0 8-5 13t-12 5h-54v286q0 8-5 13t-13 5h-178q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h53v-179h-53q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h250q7 0 12 5t5 13z m-71 500v89q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-89q0-8 5-13t13-5h107q8 0 13 5t5 13z m357-232q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z" horiz-adv-x="857.1" />
-<glyph glyph-name="lock" unicode="&#xc355;" d="m179 421h285v108q0 59-42 101t-101 41-101-41-41-101v-108z m464-53v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h17v108q0 102 74 176t176 74 177-74 73-176v-108h18q23 0 38-15t16-38z" horiz-adv-x="642.9" />
-<glyph glyph-name="lock-open" unicode="&#xc356;" d="m929 529v-143q0-15-11-25t-25-11h-36q-14 0-25 11t-11 25v143q0 59-41 101t-101 41-101-41-42-101v-108h53q23 0 38-15t16-38v-322q0-22-16-37t-38-16h-535q-23 0-38 16t-16 37v322q0 22 16 38t38 15h375v108q0 103 73 176t177 74 176-74 74-176z" horiz-adv-x="928.6" />
-<glyph glyph-name="pencil" unicode="&#xc357;" d="m203-7l50 51-131 131-51-51v-60h72v-71h60z m291 518q0 12-12 12-5 0-9-4l-303-302q-4-4-4-10 0-12 13-12 5 0 9 4l303 302q3 4 3 10z m-30 107l232-232-464-465h-232v233z m381-54q0-29-20-50l-93-93-232 233 93 92q20 21 50 21 29 0 51-21l131-131q20-22 20-51z" horiz-adv-x="857.1" />
-<glyph glyph-name="down-dir" unicode="&#xc358;" d="m571 457q0-14-10-25l-250-250q-11-11-25-11t-25 11l-250 250q-11 11-11 25t11 25 25 11h500q14 0 25-11t10-25z" horiz-adv-x="571.4" />
-<glyph glyph-name="up-dir" unicode="&#xc359;" d="m571 171q0-14-10-25t-25-10h-500q-15 0-25 10t-11 25 11 26l250 250q10 10 25 10t25-10l250-250q10-11 10-26z" horiz-adv-x="571.4" />
-<glyph glyph-name="left-dir" unicode="&#xc35a;" d="m357 600v-500q0-14-10-25t-26-11-25 11l-250 250q-10 11-10 25t10 25l250 250q11 11 25 11t26-11 10-25z" horiz-adv-x="357.1" />
-<glyph glyph-name="right-dir" unicode="&#xc35b;" d="m321 350q0-14-10-25l-250-250q-11-11-25-11t-25 11-11 25v500q0 15 11 25t25 11 25-11l250-250q10-10 10-25z" horiz-adv-x="357.1" />
-<glyph glyph-name="left-open" unicode="&#xc35c;" d="m653 682l-296-296 296-297q11-10 11-25t-11-25l-92-93q-11-10-25-10t-25 10l-414 415q-11 10-11 25t11 25l414 414q10 10 25 10t25-10l92-93q11-10 11-25t-11-25z" horiz-adv-x="714.3" />
-<glyph glyph-name="right-open" unicode="&#xc35d;" d="m618 361l-414-415q-11-10-25-10t-26 10l-92 93q-11 11-11 25t11 25l296 297-296 296q-11 11-11 25t11 25l92 93q11 10 26 10t25-10l414-414q10-11 10-25t-10-25z" horiz-adv-x="714.3" />
-<glyph glyph-name="angle-down" unicode="&#xc35e;" d="m600 439q0-7-6-13l-260-260q-5-5-13-5t-12 5l-260 260q-6 6-6 13t6 13l27 28q6 6 13 6t13-6l219-219 220 219q5 6 13 6t12-6l28-28q6-5 6-13z" horiz-adv-x="642.9" />
-<glyph glyph-name="filter" unicode="&#xc35f;" d="m783 685q9-23-8-39l-275-275v-414q0-23-22-33-7-3-14-3-15 0-25 11l-143 143q-10 10-10 25v271l-275 275q-18 16-8 39 9 22 33 22h714q23 0 33-22z" horiz-adv-x="785.7" />
-<glyph glyph-name="sort-alt-up" unicode="&#xc360;" d="m411 46q0-6-6-13l-178-178q-5-5-13-5-6 0-13 5l-178 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m589-71v-107q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v107q0 8 5 13t13 5h464q8 0 13-5t5-13z m-107 286v-107q0-8-5-13t-13-5h-357q-8 0-13 5t-5 13v107q0 8 5 13t13 5h357q8 0 13-5t5-13z m-107 285v-107q0-8-5-13t-13-5h-250q-8 0-13 5t-5 13v107q0 8 5 13t13 5h250q8 0 13-5t5-13z m-107 286v-107q0-8-5-13t-13-5h-143q-8 0-13 5t-5 13v107q0 8 5 13t13 5h143q8 0 13-5t5-13z" horiz-adv-x="1000" />
-<glyph glyph-name="sort-alt-down" unicode="&#xc361;" d="m679-25v-107q0-8-5-13t-13-5h-143q-8 0-13 5t-5 13v107q0 8 5 13t13 5h143q8 0 13-5t5-13z m-268 71q0-6-6-13l-178-178q-5-5-13-5-6 0-13 5l-178 179q-8 9-4 19 4 11 17 11h107v768q0 8 5 13t13 5h107q8 0 13-5t5-13v-768h107q8 0 13-5t5-13z m375 215v-107q0-8-5-13t-13-5h-250q-8 0-13 5t-5 13v107q0 8 5 13t13 5h250q8 0 13-5t5-13z m107 285v-107q0-8-5-13t-13-5h-357q-8 0-13 5t-5 13v107q0 8 5 13t13 5h357q8 0 13-5t5-13z m107 286v-107q0-8-5-13t-13-5h-464q-8 0-13 5t-5 13v107q0 8 5 13t13 5h464q8 0 13-5t5-13z" horiz-adv-x="1000" />
-<glyph glyph-name="ok" unicode="&#xc362;" d="m932 534q0-22-15-38l-404-404-76-76q-16-15-38-15t-38 15l-76 76-202 202q-15 16-15 38t15 38l76 76q16 16 38 16t38-16l164-165 366 367q16 16 38 16t38-16l76-76q15-16 15-38z" horiz-adv-x="1000" />
-<glyph glyph-name="menu" unicode="&#xc363;" d="m857 100v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 25t25 11h785q15 0 26-11t10-25z m0 286v-72q0-14-10-25t-26-10h-785q-15 0-25 10t-11 25v72q0 14 11 25t25 10h785q15 0 26-10t10-25z m0 285v-71q0-15-10-25t-26-11h-785q-15 0-25 11t-11 25v71q0 15 11 26t25 10h785q15 0 26-10t10-26z" horiz-adv-x="857.1" />
-<glyph glyph-name="indent-left" unicode="&#xe800;" d="m214 546v-321q0-7-5-13t-13-5q-7 0-12 5l-161 161q-5 5-5 13t5 13l161 160q5 5 12 5 8 0 13-5t5-13z m786-428v-107q0-7-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-607q-7 0-13 5t-5 13v107q0 7 5 13t13 5h607q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-607q-7 0-13 6t-5 12v107q0 8 5 13t13 5h607q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z" horiz-adv-x="1000" />
-<glyph glyph-name="indent-right" unicode="&#xe801;" d="m196 386q0-8-5-13l-160-161q-5-5-13-5-7 0-13 5t-5 13v321q0 8 5 13t13 5q8 0 13-5l160-160q5-5 5-13z m804-268v-107q0-7-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z m0 214v-107q0-7-5-13t-13-5h-607q-7 0-13 5t-5 13v107q0 7 5 13t13 5h607q7 0 13-5t5-13z m0 214v-107q0-7-5-12t-13-6h-607q-7 0-13 6t-5 12v107q0 8 5 13t13 5h607q7 0 13-5t5-13z m0 215v-107q0-8-5-13t-13-5h-964q-7 0-13 5t-5 13v107q0 7 5 12t13 6h964q7 0 13-6t5-12z" horiz-adv-x="1000" />
-<glyph glyph-name="spin5" unicode="&#xea61;" d="m462 850c-6 0-11-5-11-11l0-183 0 0c0-6 5-11 11-11l69 0c1 0 1 0 1 0 7 0 12 5 12 11l0 183 0 0c0 6-5 11-12 11l-69 0c0 0 0 0-1 0z m250-47c-4 1-8-2-10-5l-91-158 0 0c-4-6-2-13 4-16l60-35c0 0 0 0 0 0 6-3 13-1 16 4l91 158c3 6 2 13-4 16l-61 35c-1 1-3 1-5 1z m-428-2c-2 0-4-1-6-2l-61-35c-5-3-7-10-4-16l91-157c0 0 0 0 0 0 3-6 10-8 16-5l61 35c5 4 7 11 4 16l-91 157c0 1 0 1 0 1-2 4-6 6-10 6z m620-163c-2 0-4 0-6-1l-157-91c0 0 0 0 0 0-6-3-8-10-5-16l35-61c4-5 11-7 16-4l157 91c1 0 1 0 1 0 6 3 7 10 4 16l-35 61c-2 3-6 5-10 5z m-810-4c-5 0-9-2-11-6l-35-61c-3-5-1-12 4-15l158-92 0 0c6-3 13-1 16 5l35 60c0 0 0 0 0 0 3 6 1 13-4 16l-158 91c-2 1-4 2-5 2z m712-235l0 0c-6 0-11-5-11-11l0-69c0-1 0-1 0-1 0-7 5-12 11-12l183 0 0 0c6 0 11 5 11 12l0 69c0 0 0 0 0 1 0 6-5 11-11 11l-183 0z m-794-5l0 0c-7 0-12-5-12-12l0-69c0 0 0 0 0-1 0-6 5-11 12-11l182 0 0 0c6 0 11 5 11 11l0 69c0 1 0 1 0 1 0 7-5 12-11 12l-182 0z m772-153c-4 0-8-2-10-6l-34-60c-1 0-1 0-1 0-3-6-1-13 4-16l158-91c6-3 13-2 16 4l35 61c3 5 1 12-4 15l-158 91 0 0c-2 1-4 2-6 2z m-566-5c-1 0-3 0-5-1l-157-91c0 0-1 0-1 0-5-3-7-11-4-16l35-61c3-5 10-7 16-4l157 91c0 0 0 0 0 0 6 3 8 10 5 16l-35 61c-3 3-7 5-11 5z m468-121c-2 0-4 0-6-1l-61-35c-5-4-7-11-4-16l91-157c0-1 0-1 0-1 3-6 11-7 16-4l61 35c5 3 7 10 4 16l-91 157c0 0 0 0 0 0-2 4-6 6-10 6z m-367-3c-4 1-8-2-10-5l-91-158c-3-6-1-13 4-16l61-35c5-3 12-1 15 4l92 158 0 0c3 6 1 13-5 16l-60 34c0 1 0 1 0 1-2 1-4 1-6 1z m149-57c-7 0-12-5-12-11l0-183 0 0c0-6 5-11 12-11l69 0c0 0 0 0 1 0 6 0 11 5 11 11l0 183 0 0c0 6-5 11-11 11l-69 0c-1 0-1 0-1 0z" horiz-adv-x="1000" />
-</font>
-</defs>
-</svg> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.ttf b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.ttf
deleted file mode 100644
index dbf56e98..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.ttf
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.woff b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.woff
deleted file mode 100644
index fb19c43c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/ui-grid.woff
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/vfs_fonts.js b/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/vfs_fonts.js
deleted file mode 100644
index f5fd30a8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/raptor/uigrid/vfs_fonts.js
+++ /dev/null
@@ -1 +0,0 @@
-window.pdfMake = window.pdfMake || {}; window.pdfMake.vfs = {"LICENSE.txt":"DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBcGFjaGUgTGljZW5zZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgVmVyc2lvbiAyLjAsIEphbnVhcnkgMjAwNA0KICAgICAgICAgICAgICAgICAgICAgICAgaHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzLw0KDQogICBURVJNUyBBTkQgQ09ORElUSU9OUyBGT1IgVVNFLCBSRVBST0RVQ1RJT04sIEFORCBESVNUUklCVVRJT04NCg0KICAgMS4gRGVmaW5pdGlvbnMuDQoNCiAgICAgICJMaWNlbnNlIiBzaGFsbCBtZWFuIHRoZSB0ZXJtcyBhbmQgY29uZGl0aW9ucyBmb3IgdXNlLCByZXByb2R1Y3Rpb24sDQogICAgICBhbmQgZGlzdHJpYnV0aW9uIGFzIGRlZmluZWQgYnkgU2VjdGlvbnMgMSB0aHJvdWdoIDkgb2YgdGhpcyBkb2N1bWVudC4NCg0KICAgICAgIkxpY2Vuc29yIiBzaGFsbCBtZWFuIHRoZSBjb3B5cmlnaHQgb3duZXIgb3IgZW50aXR5IGF1dGhvcml6ZWQgYnkNCiAgICAgIHRoZSBjb3B5cmlnaHQgb3duZXIgdGhhdCBpcyBncmFudGluZyB0aGUgTGljZW5zZS4NCg0KICAgICAgIkxlZ2FsIEVudGl0eSIgc2hhbGwgbWVhbiB0aGUgdW5pb24gb2YgdGhlIGFjdGluZyBlbnRpdHkgYW5kIGFsbA0KICAgICAgb3RoZXIgZW50aXRpZXMgdGhhdCBjb250cm9sLCBhcmUgY29udHJvbGxlZCBieSwgb3IgYXJlIHVuZGVyIGNvbW1vbg0KICAgICAgY29udHJvbCB3aXRoIHRoYXQgZW50aXR5LiBGb3IgdGhlIHB1cnBvc2VzIG9mIHRoaXMgZGVmaW5pdGlvbiwNCiAgICAgICJjb250cm9sIiBtZWFucyAoaSkgdGhlIHBvd2VyLCBkaXJlY3Qgb3IgaW5kaXJlY3QsIHRvIGNhdXNlIHRoZQ0KICAgICAgZGlyZWN0aW9uIG9yIG1hbmFnZW1lbnQgb2Ygc3VjaCBlbnRpdHksIHdoZXRoZXIgYnkgY29udHJhY3Qgb3INCiAgICAgIG90aGVyd2lzZSwgb3IgKGlpKSBvd25lcnNoaXAgb2YgZmlmdHkgcGVyY2VudCAoNTAlKSBvciBtb3JlIG9mIHRoZQ0KICAgICAgb3V0c3RhbmRpbmcgc2hhcmVzLCBvciAoaWlpKSBiZW5lZmljaWFsIG93bmVyc2hpcCBvZiBzdWNoIGVudGl0eS4NCg0KICAgICAgIllvdSIgKG9yICJZb3VyIikgc2hhbGwgbWVhbiBhbiBpbmRpdmlkdWFsIG9yIExlZ2FsIEVudGl0eQ0KICAgICAgZXhlcmNpc2luZyBwZXJtaXNzaW9ucyBncmFudGVkIGJ5IHRoaXMgTGljZW5zZS4NCg0KICAgICAgIlNvdXJjZSIgZm9ybSBzaGFsbCBtZWFuIHRoZSBwcmVmZXJyZWQgZm9ybSBmb3IgbWFraW5nIG1vZGlmaWNhdGlvbnMsDQogICAgICBpbmNsdWRpbmcgYnV0IG5vdCBsaW1pdGVkIHRvIHNvZnR3YXJlIHNvdXJjZSBjb2RlLCBkb2N1bWVudGF0aW9uDQogICAgICBzb3VyY2UsIGFuZCBjb25maWd1cmF0aW9uIGZpbGVzLg0KDQogICAgICAiT2JqZWN0IiBmb3JtIHNoYWxsIG1lYW4gYW55IGZvcm0gcmVzdWx0aW5nIGZyb20gbWVjaGFuaWNhbA0KICAgICAgdHJhbnNmb3JtYXRpb24gb3IgdHJhbnNsYXRpb24gb2YgYSBTb3VyY2UgZm9ybSwgaW5jbHVkaW5nIGJ1dA0KICAgICAgbm90IGxpbWl0ZWQgdG8gY29tcGlsZWQgb2JqZWN0IGNvZGUsIGdlbmVyYXRlZCBkb2N1bWVudGF0aW9uLA0KICAgICAgYW5kIGNvbnZlcnNpb25zIHRvIG90aGVyIG1lZGlhIHR5cGVzLg0KDQogICAgICAiV29yayIgc2hhbGwgbWVhbiB0aGUgd29yayBvZiBhdXRob3JzaGlwLCB3aGV0aGVyIGluIFNvdXJjZSBvcg0KICAgICAgT2JqZWN0IGZvcm0sIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSBMaWNlbnNlLCBhcyBpbmRpY2F0ZWQgYnkgYQ0KICAgICAgY29weXJpZ2h0IG5vdGljZSB0aGF0IGlzIGluY2x1ZGVkIGluIG9yIGF0dGFjaGVkIHRvIHRoZSB3b3JrDQogICAgICAoYW4gZXhhbXBsZSBpcyBwcm92aWRlZCBpbiB0aGUgQXBwZW5kaXggYmVsb3cpLg0KDQogICAgICAiRGVyaXZhdGl2ZSBXb3JrcyIgc2hhbGwgbWVhbiBhbnkgd29yaywgd2hldGhlciBpbiBTb3VyY2Ugb3IgT2JqZWN0DQogICAgICBmb3JtLCB0aGF0IGlzIGJhc2VkIG9uIChvciBkZXJpdmVkIGZyb20pIHRoZSBXb3JrIGFuZCBmb3Igd2hpY2ggdGhlDQogICAgICBlZGl0b3JpYWwgcmV2aXNpb25zLCBhbm5vdGF0aW9ucywgZWxhYm9yYXRpb25zLCBvciBvdGhlciBtb2RpZmljYXRpb25zDQogICAgICByZXByZXNlbnQsIGFzIGEgd2hvbGUsIGFuIG9yaWdpbmFsIHdvcmsgb2YgYXV0aG9yc2hpcC4gRm9yIHRoZSBwdXJwb3Nlcw0KICAgICAgb2YgdGhpcyBMaWNlbnNlLCBEZXJpdmF0aXZlIFdvcmtzIHNoYWxsIG5vdCBpbmNsdWRlIHdvcmtzIHRoYXQgcmVtYWluDQogICAgICBzZXBhcmFibGUgZnJvbSwgb3IgbWVyZWx5IGxpbmsgKG9yIGJpbmQgYnkgbmFtZSkgdG8gdGhlIGludGVyZmFjZXMgb2YsDQogICAgICB0aGUgV29yayBhbmQgRGVyaXZhdGl2ZSBXb3JrcyB0aGVyZW9mLg0KDQogICAgICAiQ29udHJpYnV0aW9uIiBzaGFsbCBtZWFuIGFueSB3b3JrIG9mIGF1dGhvcnNoaXAsIGluY2x1ZGluZw0KICAgICAgdGhlIG9yaWdpbmFsIHZlcnNpb24gb2YgdGhlIFdvcmsgYW5kIGFueSBtb2RpZmljYXRpb25zIG9yIGFkZGl0aW9ucw0KICAgICAgdG8gdGhhdCBXb3JrIG9yIERlcml2YXRpdmUgV29ya3MgdGhlcmVvZiwgdGhhdCBpcyBpbnRlbnRpb25hbGx5DQogICAgICBzdWJtaXR0ZWQgdG8gTGljZW5zb3IgZm9yIGluY2x1c2lvbiBpbiB0aGUgV29yayBieSB0aGUgY29weXJpZ2h0IG93bmVyDQogICAgICBvciBieSBhbiBpbmRpdmlkdWFsIG9yIExlZ2FsIEVudGl0eSBhdXRob3JpemVkIHRvIHN1Ym1pdCBvbiBiZWhhbGYgb2YNCiAgICAgIHRoZSBjb3B5cmlnaHQgb3duZXIuIEZvciB0aGUgcHVycG9zZXMgb2YgdGhpcyBkZWZpbml0aW9uLCAic3VibWl0dGVkIg0KICAgICAgbWVhbnMgYW55IGZvcm0gb2YgZWxlY3Ryb25pYywgdmVyYmFsLCBvciB3cml0dGVuIGNvbW11bmljYXRpb24gc2VudA0KICAgICAgdG8gdGhlIExpY2Vuc29yIG9yIGl0cyByZXByZXNlbnRhdGl2ZXMsIGluY2x1ZGluZyBidXQgbm90IGxpbWl0ZWQgdG8NCiAgICAgIGNvbW11bmljYXRpb24gb24gZWxlY3Ryb25pYyBtYWlsaW5nIGxpc3RzLCBzb3VyY2UgY29kZSBjb250cm9sIHN5c3RlbXMsDQogICAgICBhbmQgaXNzdWUgdHJhY2tpbmcgc3lzdGVtcyB0aGF0IGFyZSBtYW5hZ2VkIGJ5LCBvciBvbiBiZWhhbGYgb2YsIHRoZQ0KICAgICAgTGljZW5zb3IgZm9yIHRoZSBwdXJwb3NlIG9mIGRpc2N1c3NpbmcgYW5kIGltcHJvdmluZyB0aGUgV29yaywgYnV0DQogICAgICBleGNsdWRpbmcgY29tbXVuaWNhdGlvbiB0aGF0IGlzIGNvbnNwaWN1b3VzbHkgbWFya2VkIG9yIG90aGVyd2lzZQ0KICAgICAgZGVzaWduYXRlZCBpbiB3cml0aW5nIGJ5IHRoZSBjb3B5cmlnaHQgb3duZXIgYXMgIk5vdCBhIENvbnRyaWJ1dGlvbi4iDQoNCiAgICAgICJDb250cmlidXRvciIgc2hhbGwgbWVhbiBMaWNlbnNvciBhbmQgYW55IGluZGl2aWR1YWwgb3IgTGVnYWwgRW50aXR5DQogICAgICBvbiBiZWhhbGYgb2Ygd2hvbSBhIENvbnRyaWJ1dGlvbiBoYXMgYmVlbiByZWNlaXZlZCBieSBMaWNlbnNvciBhbmQNCiAgICAgIHN1YnNlcXVlbnRseSBpbmNvcnBvcmF0ZWQgd2l0aGluIHRoZSBXb3JrLg0KDQogICAyLiBHcmFudCBvZiBDb3B5cmlnaHQgTGljZW5zZS4gU3ViamVjdCB0byB0aGUgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YNCiAgICAgIHRoaXMgTGljZW5zZSwgZWFjaCBDb250cmlidXRvciBoZXJlYnkgZ3JhbnRzIHRvIFlvdSBhIHBlcnBldHVhbCwNCiAgICAgIHdvcmxkd2lkZSwgbm9uLWV4Y2x1c2l2ZSwgbm8tY2hhcmdlLCByb3lhbHR5LWZyZWUsIGlycmV2b2NhYmxlDQogICAgICBjb3B5cmlnaHQgbGljZW5zZSB0byByZXByb2R1Y2UsIHByZXBhcmUgRGVyaXZhdGl2ZSBXb3JrcyBvZiwNCiAgICAgIHB1YmxpY2x5IGRpc3BsYXksIHB1YmxpY2x5IHBlcmZvcm0sIHN1YmxpY2Vuc2UsIGFuZCBkaXN0cmlidXRlIHRoZQ0KICAgICAgV29yayBhbmQgc3VjaCBEZXJpdmF0aXZlIFdvcmtzIGluIFNvdXJjZSBvciBPYmplY3QgZm9ybS4NCg0KICAgMy4gR3JhbnQgb2YgUGF0ZW50IExpY2Vuc2UuIFN1YmplY3QgdG8gdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mDQogICAgICB0aGlzIExpY2Vuc2UsIGVhY2ggQ29udHJpYnV0b3IgaGVyZWJ5IGdyYW50cyB0byBZb3UgYSBwZXJwZXR1YWwsDQogICAgICB3b3JsZHdpZGUsIG5vbi1leGNsdXNpdmUsIG5vLWNoYXJnZSwgcm95YWx0eS1mcmVlLCBpcnJldm9jYWJsZQ0KICAgICAgKGV4Y2VwdCBhcyBzdGF0ZWQgaW4gdGhpcyBzZWN0aW9uKSBwYXRlbnQgbGljZW5zZSB0byBtYWtlLCBoYXZlIG1hZGUsDQogICAgICB1c2UsIG9mZmVyIHRvIHNlbGwsIHNlbGwsIGltcG9ydCwgYW5kIG90aGVyd2lzZSB0cmFuc2ZlciB0aGUgV29yaywNCiAgICAgIHdoZXJlIHN1Y2ggbGljZW5zZSBhcHBsaWVzIG9ubHkgdG8gdGhvc2UgcGF0ZW50IGNsYWltcyBsaWNlbnNhYmxlDQogICAgICBieSBzdWNoIENvbnRyaWJ1dG9yIHRoYXQgYXJlIG5lY2Vzc2FyaWx5IGluZnJpbmdlZCBieSB0aGVpcg0KICAgICAgQ29udHJpYnV0aW9uKHMpIGFsb25lIG9yIGJ5IGNvbWJpbmF0aW9uIG9mIHRoZWlyIENvbnRyaWJ1dGlvbihzKQ0KICAgICAgd2l0aCB0aGUgV29yayB0byB3aGljaCBzdWNoIENvbnRyaWJ1dGlvbihzKSB3YXMgc3VibWl0dGVkLiBJZiBZb3UNCiAgICAgIGluc3RpdHV0ZSBwYXRlbnQgbGl0aWdhdGlvbiBhZ2FpbnN0IGFueSBlbnRpdHkgKGluY2x1ZGluZyBhDQogICAgICBjcm9zcy1jbGFpbSBvciBjb3VudGVyY2xhaW0gaW4gYSBsYXdzdWl0KSBhbGxlZ2luZyB0aGF0IHRoZSBXb3JrDQogICAgICBvciBhIENvbnRyaWJ1dGlvbiBpbmNvcnBvcmF0ZWQgd2l0aGluIHRoZSBXb3JrIGNvbnN0aXR1dGVzIGRpcmVjdA0KICAgICAgb3IgY29udHJpYnV0b3J5IHBhdGVudCBpbmZyaW5nZW1lbnQsIHRoZW4gYW55IHBhdGVudCBsaWNlbnNlcw0KICAgICAgZ3JhbnRlZCB0byBZb3UgdW5kZXIgdGhpcyBMaWNlbnNlIGZvciB0aGF0IFdvcmsgc2hhbGwgdGVybWluYXRlDQogICAgICBhcyBvZiB0aGUgZGF0ZSBzdWNoIGxpdGlnYXRpb24gaXMgZmlsZWQuDQoNCiAgIDQuIFJlZGlzdHJpYnV0aW9uLiBZb3UgbWF5IHJlcHJvZHVjZSBhbmQgZGlzdHJpYnV0ZSBjb3BpZXMgb2YgdGhlDQogICAgICBXb3JrIG9yIERlcml2YXRpdmUgV29ya3MgdGhlcmVvZiBpbiBhbnkgbWVkaXVtLCB3aXRoIG9yIHdpdGhvdXQNCiAgICAgIG1vZGlmaWNhdGlvbnMsIGFuZCBpbiBTb3VyY2Ugb3IgT2JqZWN0IGZvcm0sIHByb3ZpZGVkIHRoYXQgWW91DQogICAgICBtZWV0IHRoZSBmb2xsb3dpbmcgY29uZGl0aW9uczoNCg0KICAgICAgKGEpIFlvdSBtdXN0IGdpdmUgYW55IG90aGVyIHJlY2lwaWVudHMgb2YgdGhlIFdvcmsgb3INCiAgICAgICAgICBEZXJpdmF0aXZlIFdvcmtzIGEgY29weSBvZiB0aGlzIExpY2Vuc2U7IGFuZA0KDQogICAgICAoYikgWW91IG11c3QgY2F1c2UgYW55IG1vZGlmaWVkIGZpbGVzIHRvIGNhcnJ5IHByb21pbmVudCBub3RpY2VzDQogICAgICAgICAgc3RhdGluZyB0aGF0IFlvdSBjaGFuZ2VkIHRoZSBmaWxlczsgYW5kDQoNCiAgICAgIChjKSBZb3UgbXVzdCByZXRhaW4sIGluIHRoZSBTb3VyY2UgZm9ybSBvZiBhbnkgRGVyaXZhdGl2ZSBXb3Jrcw0KICAgICAgICAgIHRoYXQgWW91IGRpc3RyaWJ1dGUsIGFsbCBjb3B5cmlnaHQsIHBhdGVudCwgdHJhZGVtYXJrLCBhbmQNCiAgICAgICAgICBhdHRyaWJ1dGlvbiBub3RpY2VzIGZyb20gdGhlIFNvdXJjZSBmb3JtIG9mIHRoZSBXb3JrLA0KICAgICAgICAgIGV4Y2x1ZGluZyB0aG9zZSBub3RpY2VzIHRoYXQgZG8gbm90IHBlcnRhaW4gdG8gYW55IHBhcnQgb2YNCiAgICAgICAgICB0aGUgRGVyaXZhdGl2ZSBXb3JrczsgYW5kDQoNCiAgICAgIChkKSBJZiB0aGUgV29yayBpbmNsdWRlcyBhICJOT1RJQ0UiIHRleHQgZmlsZSBhcyBwYXJ0IG9mIGl0cw0KICAgICAgICAgIGRpc3RyaWJ1dGlvbiwgdGhlbiBhbnkgRGVyaXZhdGl2ZSBXb3JrcyB0aGF0IFlvdSBkaXN0cmlidXRlIG11c3QNCiAgICAgICAgICBpbmNsdWRlIGEgcmVhZGFibGUgY29weSBvZiB0aGUgYXR0cmlidXRpb24gbm90aWNlcyBjb250YWluZWQNCiAgICAgICAgICB3aXRoaW4gc3VjaCBOT1RJQ0UgZmlsZSwgZXhjbHVkaW5nIHRob3NlIG5vdGljZXMgdGhhdCBkbyBub3QNCiAgICAgICAgICBwZXJ0YWluIHRvIGFueSBwYXJ0IG9mIHRoZSBEZXJpdmF0aXZlIFdvcmtzLCBpbiBhdCBsZWFzdCBvbmUNCiAgICAgICAgICBvZiB0aGUgZm9sbG93aW5nIHBsYWNlczogd2l0aGluIGEgTk9USUNFIHRleHQgZmlsZSBkaXN0cmlidXRlZA0KICAgICAgICAgIGFzIHBhcnQgb2YgdGhlIERlcml2YXRpdmUgV29ya3M7IHdpdGhpbiB0aGUgU291cmNlIGZvcm0gb3INCiAgICAgICAgICBkb2N1bWVudGF0aW9uLCBpZiBwcm92aWRlZCBhbG9uZyB3aXRoIHRoZSBEZXJpdmF0aXZlIFdvcmtzOyBvciwNCiAgICAgICAgICB3aXRoaW4gYSBkaXNwbGF5IGdlbmVyYXRlZCBieSB0aGUgRGVyaXZhdGl2ZSBXb3JrcywgaWYgYW5kDQogICAgICAgICAgd2hlcmV2ZXIgc3VjaCB0aGlyZC1wYXJ0eSBub3RpY2VzIG5vcm1hbGx5IGFwcGVhci4gVGhlIGNvbnRlbnRzDQogICAgICAgICAgb2YgdGhlIE5PVElDRSBmaWxlIGFyZSBmb3IgaW5mb3JtYXRpb25hbCBwdXJwb3NlcyBvbmx5IGFuZA0KICAgICAgICAgIGRvIG5vdCBtb2RpZnkgdGhlIExpY2Vuc2UuIFlvdSBtYXkgYWRkIFlvdXIgb3duIGF0dHJpYnV0aW9uDQogICAgICAgICAgbm90aWNlcyB3aXRoaW4gRGVyaXZhdGl2ZSBXb3JrcyB0aGF0IFlvdSBkaXN0cmlidXRlLCBhbG9uZ3NpZGUNCiAgICAgICAgICBvciBhcyBhbiBhZGRlbmR1bSB0byB0aGUgTk9USUNFIHRleHQgZnJvbSB0aGUgV29yaywgcHJvdmlkZWQNCiAgICAgICAgICB0aGF0IHN1Y2ggYWRkaXRpb25hbCBhdHRyaWJ1dGlvbiBub3RpY2VzIGNhbm5vdCBiZSBjb25zdHJ1ZWQNCiAgICAgICAgICBhcyBtb2RpZnlpbmcgdGhlIExpY2Vuc2UuDQoNCiAgICAgIFlvdSBtYXkgYWRkIFlvdXIgb3duIGNvcHlyaWdodCBzdGF0ZW1lbnQgdG8gWW91ciBtb2RpZmljYXRpb25zIGFuZA0KICAgICAgbWF5IHByb3ZpZGUgYWRkaXRpb25hbCBvciBkaWZmZXJlbnQgbGljZW5zZSB0ZXJtcyBhbmQgY29uZGl0aW9ucw0KICAgICAgZm9yIHVzZSwgcmVwcm9kdWN0aW9uLCBvciBkaXN0cmlidXRpb24gb2YgWW91ciBtb2RpZmljYXRpb25zLCBvcg0KICAgICAgZm9yIGFueSBzdWNoIERlcml2YXRpdmUgV29ya3MgYXMgYSB3aG9sZSwgcHJvdmlkZWQgWW91ciB1c2UsDQogICAgICByZXByb2R1Y3Rpb24sIGFuZCBkaXN0cmlidXRpb24gb2YgdGhlIFdvcmsgb3RoZXJ3aXNlIGNvbXBsaWVzIHdpdGgNCiAgICAgIHRoZSBjb25kaXRpb25zIHN0YXRlZCBpbiB0aGlzIExpY2Vuc2UuDQoNCiAgIDUuIFN1Ym1pc3Npb24gb2YgQ29udHJpYnV0aW9ucy4gVW5sZXNzIFlvdSBleHBsaWNpdGx5IHN0YXRlIG90aGVyd2lzZSwNCiAgICAgIGFueSBDb250cmlidXRpb24gaW50ZW50aW9uYWxseSBzdWJtaXR0ZWQgZm9yIGluY2x1c2lvbiBpbiB0aGUgV29yaw0KICAgICAgYnkgWW91IHRvIHRoZSBMaWNlbnNvciBzaGFsbCBiZSB1bmRlciB0aGUgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YNCiAgICAgIHRoaXMgTGljZW5zZSwgd2l0aG91dCBhbnkgYWRkaXRpb25hbCB0ZXJtcyBvciBjb25kaXRpb25zLg0KICAgICAgTm90d2l0aHN0YW5kaW5nIHRoZSBhYm92ZSwgbm90aGluZyBoZXJlaW4gc2hhbGwgc3VwZXJzZWRlIG9yIG1vZGlmeQ0KICAgICAgdGhlIHRlcm1zIG9mIGFueSBzZXBhcmF0ZSBsaWNlbnNlIGFncmVlbWVudCB5b3UgbWF5IGhhdmUgZXhlY3V0ZWQNCiAgICAgIHdpdGggTGljZW5zb3IgcmVnYXJkaW5nIHN1Y2ggQ29udHJpYnV0aW9ucy4NCg0KICAgNi4gVHJhZGVtYXJrcy4gVGhpcyBMaWNlbnNlIGRvZXMgbm90IGdyYW50IHBlcm1pc3Npb24gdG8gdXNlIHRoZSB0cmFkZQ0KICAgICAgbmFtZXMsIHRyYWRlbWFya3MsIHNlcnZpY2UgbWFya3MsIG9yIHByb2R1Y3QgbmFtZXMgb2YgdGhlIExpY2Vuc29yLA0KICAgICAgZXhjZXB0IGFzIHJlcXVpcmVkIGZvciByZWFzb25hYmxlIGFuZCBjdXN0b21hcnkgdXNlIGluIGRlc2NyaWJpbmcgdGhlDQogICAgICBvcmlnaW4gb2YgdGhlIFdvcmsgYW5kIHJlcHJvZHVjaW5nIHRoZSBjb250ZW50IG9mIHRoZSBOT1RJQ0UgZmlsZS4NCg0KICAgNy4gRGlzY2xhaW1lciBvZiBXYXJyYW50eS4gVW5sZXNzIHJlcXVpcmVkIGJ5IGFwcGxpY2FibGUgbGF3IG9yDQogICAgICBhZ3JlZWQgdG8gaW4gd3JpdGluZywgTGljZW5zb3IgcHJvdmlkZXMgdGhlIFdvcmsgKGFuZCBlYWNoDQogICAgICBDb250cmlidXRvciBwcm92aWRlcyBpdHMgQ29udHJpYnV0aW9ucykgb24gYW4gIkFTIElTIiBCQVNJUywNCiAgICAgIFdJVEhPVVQgV0FSUkFOVElFUyBPUiBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvcg0KICAgICAgaW1wbGllZCwgaW5jbHVkaW5nLCB3aXRob3V0IGxpbWl0YXRpb24sIGFueSB3YXJyYW50aWVzIG9yIGNvbmRpdGlvbnMNCiAgICAgIG9mIFRJVExFLCBOT04tSU5GUklOR0VNRU5ULCBNRVJDSEFOVEFCSUxJVFksIG9yIEZJVE5FU1MgRk9SIEENCiAgICAgIFBBUlRJQ1VMQVIgUFVSUE9TRS4gWW91IGFyZSBzb2xlbHkgcmVzcG9uc2libGUgZm9yIGRldGVybWluaW5nIHRoZQ0KICAgICAgYXBwcm9wcmlhdGVuZXNzIG9mIHVzaW5nIG9yIHJlZGlzdHJpYnV0aW5nIHRoZSBXb3JrIGFuZCBhc3N1bWUgYW55DQogICAgICByaXNrcyBhc3NvY2lhdGVkIHdpdGggWW91ciBleGVyY2lzZSBvZiBwZXJtaXNzaW9ucyB1bmRlciB0aGlzIExpY2Vuc2UuDQoNCiAgIDguIExpbWl0YXRpb24gb2YgTGlhYmlsaXR5LiBJbiBubyBldmVudCBhbmQgdW5kZXIgbm8gbGVnYWwgdGhlb3J5LA0KICAgICAgd2hldGhlciBpbiB0b3J0IChpbmNsdWRpbmcgbmVnbGlnZW5jZSksIGNvbnRyYWN0LCBvciBvdGhlcndpc2UsDQogICAgICB1bmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgKHN1Y2ggYXMgZGVsaWJlcmF0ZSBhbmQgZ3Jvc3NseQ0KICAgICAgbmVnbGlnZW50IGFjdHMpIG9yIGFncmVlZCB0byBpbiB3cml0aW5nLCBzaGFsbCBhbnkgQ29udHJpYnV0b3IgYmUNCiAgICAgIGxpYWJsZSB0byBZb3UgZm9yIGRhbWFnZXMsIGluY2x1ZGluZyBhbnkgZGlyZWN0LCBpbmRpcmVjdCwgc3BlY2lhbCwNCiAgICAgIGluY2lkZW50YWwsIG9yIGNvbnNlcXVlbnRpYWwgZGFtYWdlcyBvZiBhbnkgY2hhcmFjdGVyIGFyaXNpbmcgYXMgYQ0KICAgICAgcmVzdWx0IG9mIHRoaXMgTGljZW5zZSBvciBvdXQgb2YgdGhlIHVzZSBvciBpbmFiaWxpdHkgdG8gdXNlIHRoZQ0KICAgICAgV29yayAoaW5jbHVkaW5nIGJ1dCBub3QgbGltaXRlZCB0byBkYW1hZ2VzIGZvciBsb3NzIG9mIGdvb2R3aWxsLA0KICAgICAgd29yayBzdG9wcGFnZSwgY29tcHV0ZXIgZmFpbHVyZSBvciBtYWxmdW5jdGlvbiwgb3IgYW55IGFuZCBhbGwNCiAgICAgIG90aGVyIGNvbW1lcmNpYWwgZGFtYWdlcyBvciBsb3NzZXMpLCBldmVuIGlmIHN1Y2ggQ29udHJpYnV0b3INCiAgICAgIGhhcyBiZWVuIGFkdmlzZWQgb2YgdGhlIHBvc3NpYmlsaXR5IG9mIHN1Y2ggZGFtYWdlcy4NCg0KICAgOS4gQWNjZXB0aW5nIFdhcnJhbnR5IG9yIEFkZGl0aW9uYWwgTGlhYmlsaXR5LiBXaGlsZSByZWRpc3RyaWJ1dGluZw0KICAgICAgdGhlIFdvcmsgb3IgRGVyaXZhdGl2ZSBXb3JrcyB0aGVyZW9mLCBZb3UgbWF5IGNob29zZSB0byBvZmZlciwNCiAgICAgIGFuZCBjaGFyZ2UgYSBmZWUgZm9yLCBhY2NlcHRhbmNlIG9mIHN1cHBvcnQsIHdhcnJhbnR5LCBpbmRlbW5pdHksDQogICAgICBvciBvdGhlciBsaWFiaWxpdHkgb2JsaWdhdGlvbnMgYW5kL29yIHJpZ2h0cyBjb25zaXN0ZW50IHdpdGggdGhpcw0KICAgICAgTGljZW5zZS4gSG93ZXZlciwgaW4gYWNjZXB0aW5nIHN1Y2ggb2JsaWdhdGlvbnMsIFlvdSBtYXkgYWN0IG9ubHkNCiAgICAgIG9uIFlvdXIgb3duIGJlaGFsZiBhbmQgb24gWW91ciBzb2xlIHJlc3BvbnNpYmlsaXR5LCBub3Qgb24gYmVoYWxmDQogICAgICBvZiBhbnkgb3RoZXIgQ29udHJpYnV0b3IsIGFuZCBvbmx5IGlmIFlvdSBhZ3JlZSB0byBpbmRlbW5pZnksDQogICAgICBkZWZlbmQsIGFuZCBob2xkIGVhY2ggQ29udHJpYnV0b3IgaGFybWxlc3MgZm9yIGFueSBsaWFiaWxpdHkNCiAgICAgIGluY3VycmVkIGJ5LCBvciBjbGFpbXMgYXNzZXJ0ZWQgYWdhaW5zdCwgc3VjaCBDb250cmlidXRvciBieSByZWFzb24NCiAgICAgIG9mIHlvdXIgYWNjZXB0aW5nIGFueSBzdWNoIHdhcnJhbnR5IG9yIGFkZGl0aW9uYWwgbGlhYmlsaXR5Lg0KDQogICBFTkQgT0YgVEVSTVMgQU5EIENPTkRJVElPTlMNCg0KICAgQVBQRU5ESVg6IEhvdyB0byBhcHBseSB0aGUgQXBhY2hlIExpY2Vuc2UgdG8geW91ciB3b3JrLg0KDQogICAgICBUbyBhcHBseSB0aGUgQXBhY2hlIExpY2Vuc2UgdG8geW91ciB3b3JrLCBhdHRhY2ggdGhlIGZvbGxvd2luZw0KICAgICAgYm9pbGVycGxhdGUgbm90aWNlLCB3aXRoIHRoZSBmaWVsZHMgZW5jbG9zZWQgYnkgYnJhY2tldHMgIltdIg0KICAgICAgcmVwbGFjZWQgd2l0aCB5b3VyIG93biBpZGVudGlmeWluZyBpbmZvcm1hdGlvbi4gKERvbid0IGluY2x1ZGUNCiAgICAgIHRoZSBicmFja2V0cyEpICBUaGUgdGV4dCBzaG91bGQgYmUgZW5jbG9zZWQgaW4gdGhlIGFwcHJvcHJpYXRlDQogICAgICBjb21tZW50IHN5bnRheCBmb3IgdGhlIGZpbGUgZm9ybWF0LiBXZSBhbHNvIHJlY29tbWVuZCB0aGF0IGENCiAgICAgIGZpbGUgb3IgY2xhc3MgbmFtZSBhbmQgZGVzY3JpcHRpb24gb2YgcHVycG9zZSBiZSBpbmNsdWRlZCBvbiB0aGUNCiAgICAgIHNhbWUgInByaW50ZWQgcGFnZSIgYXMgdGhlIGNvcHlyaWdodCBub3RpY2UgZm9yIGVhc2llcg0KICAgICAgaWRlbnRpZmljYXRpb24gd2l0aGluIHRoaXJkLXBhcnR5IGFyY2hpdmVzLg0KDQogICBDb3B5cmlnaHQgW3l5eXldIFtuYW1lIG9mIGNvcHlyaWdodCBvd25lcl0NCg0KICAgTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMaWNlbnNlIik7DQogICB5b3UgbWF5IG5vdCB1c2UgdGhpcyBmaWxlIGV4Y2VwdCBpbiBjb21wbGlhbmNlIHdpdGggdGhlIExpY2Vuc2UuDQogICBZb3UgbWF5IG9idGFpbiBhIGNvcHkgb2YgdGhlIExpY2Vuc2UgYXQNCg0KICAgICAgIGh0dHA6Ly93d3cuYXBhY2hlLm9yZy9saWNlbnNlcy9MSUNFTlNFLTIuMA0KDQogICBVbmxlc3MgcmVxdWlyZWQgYnkgYXBwbGljYWJsZSBsYXcgb3IgYWdyZWVkIHRvIGluIHdyaXRpbmcsIHNvZnR3YXJlDQogICBkaXN0cmlidXRlZCB1bmRlciB0aGUgTGljZW5zZSBpcyBkaXN0cmlidXRlZCBvbiBhbiAiQVMgSVMiIEJBU0lTLA0KICAgV0lUSE9VVCBXQVJSQU5USUVTIE9SIENPTkRJVElPTlMgT0YgQU5ZIEtJTkQsIGVpdGhlciBleHByZXNzIG9yIGltcGxpZWQuDQogICBTZWUgdGhlIExpY2Vuc2UgZm9yIHRoZSBzcGVjaWZpYyBsYW5ndWFnZSBnb3Zlcm5pbmcgcGVybWlzc2lvbnMgYW5kDQogICBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4NCg==","Roboto-Italic.ttf":"AAEAAAAOAIAAAwBgR0RFRgsuCy8AATmYAAAASEdQT1OC3T4oAAE54AAAkPhHU1VCeolvLwABytgAAANsT1MvMrivKS4AAAFoAAAAYFZETVhu6nZPAAASPAAABeBjbWFwg/CFnwAAGBwAAA7yZ2x5ZqugYnAAACcQAADhjGhlYWQVl+THAAAA7AAAADZoaGVhK3TmIgAAASQAAAAkaG10eH7tDo8AAAHIAAAQdGxvY2H/CzayAAEInAAACDxtYXhwBDwA9gAAAUgAAAAgbmFtZW3ArcAAARDYAAAEb3Bvc3QJy9dbAAEVSAAAJE0AAQAAAAEAAERFNtJfDzz1AAkIAAAAAADE8BEuAAAAAM2Cslz6t9PdKU8IYgACAAkAAgAAAAAAAAABAAAHbP4MAAAJA/q32vUpTwABAAAAAAAAAAAAAAAAAAAEHQABAAAEHQCWABYAXgAFAAEAAAAAAAAAAAAAAAAAAwABAAMEQQGQAAUAAAWaBTMAAAEfBZoFMwAAA9EAZgIAAAAAAAAAAAAAAAAA4AAC/1AAIFsAAAAgAAAAAHB5cnMAAQAA//0GAP4AAGYHmgIAIAABn08BAAAEOgWwAAAAIAACAeMAAAAAAAAB4wAAAeMAAAJ1AMUErABDBDoARwV7ANMErAAbAVcAxgKBAFcCiP+MA0AAoQRCAHIBgf+YAhUAPgIGAEYDH/+mBDoAUAQ6AXAEOgAtBDoANQQ6ACcEOgBoBDoAZwQ6ANgEOgA1BDoAfwHpAEYB8f/GA9EAZQQ6AI4D7gBWA5IAwga0ABME/v/VBMsAWATBAGIE8ABYBGIAWARfAFgFJgBoBVgAWAIkAGIEJQAPBH4APgQgAFgGkgBYBVkAWAUcAF4EzQBYBTsAXgT4AFcEjQBDBHoA7AUSAGcE3QDNBpUA7AS9//wEpgDuBDIAIAIKABIDHAD3Agr/lwMnAHwDa/+WAl0A8wQgADoERAA1A/wARwREAEQD+QBHApsAigRDADcERAA1AegARAH2/x0D2QA2AegARAaLADUERAA1BEQARgRE/+IERABEAqQANQPuADsCaQBvBEQAWgPIAJcFrACyA8j/6QPI/7wDyAAIApEAUQHhADYCkf+pBRgAggHh/+sEHQBXBGAALQVVACYEjgBxAdkAAQSc/8gDvwEnBd4AUgNeAMIDjABwBCsApgXfAFIDewEDAtABBQQGAE4DMQCnAzgAqgJoAPsERP/rA7EAhwH/AMMB4//OAg8BBANtAM8DiwA1BdUBDgY7ARsGgQC6A7f/8wcF/54EBABIBR0AJgRvAEgEeQAwBlIABARnACYESgBqBEUATARY/+sFRABVAegAPgQxAD4D8wBJAhEARwUwAEYERAA1BygATwbHAEQB6ABEApb/ZgUjAFkETgBGBToAZwSuAFoB7/8bA/kAPAOWAUgDYgFeAzgBCwINAUECkQEiAhP/twOXAQgCzwEHAnoAHQAK/fIACv5BAAr9WAAK/kYACv1LAAr83AHzAWQD1AFBAgAAwwQuAFcFS//MBR0ATwTs/94ETQAiBVoAWARN//EFXwBXBS8AigUAAB0EPwBABHL/9QPIALMERABBBAsAKQPsAIsERAA1BEYAVgJ5AH4EKv/RA7AAOgR6AHAERP/iBAsASQREAEMD7gC3BBwAWgVNAD8FRABDBisAXQSiAFoD/wCzBeEAZAWfANsFEgBmCAj/3ggTAFcGGgDyBVoAVwS7AEgFqv+WBtP/ygR0ACAFWQBYBU//3gS3AKMF0QBbBX8AVwUnANEHDgBXB0cAVwWrAMkGggBXBLkASAURAIcGrABiBM4ADAQnAEQETgBAAygAPgSQ/5oFvP/DA9IAHgRaAEAEFQBABFv/1QWSAEAEWQBABFoAQAOfAJAFbwBABHkAQAQYAH8GEgBABjoANQSlAIYF2ABABBYAQAQLADMGHgBABCH/1QRFADUEDABRBlj/1QZzAEAERQA1BFoAQAaRAGgFtwBFBBQAPga2AGMFmQA8BIb/2AQF/7wGmAB0BaoAXQZrADoFigA6CHsAYgddAD4D5f/HA5//xgUdAF0ERQBGBL4A6APIALMFHQBPBEUARgaLAGwFtwBIBpIAaAW4AEUE5ABkBAgASgSyAFUACv09AAr9ZAAK/m8ACv6QAAr6twAK+tYEFAA+BMsAVwRD/+IEHwBIA1wANQSXAFcDyQA1BL0ASAQ+AD4GJADzBTQApQdEAFcFVQA1B6kAVwaGADUFjQBlBIkATga/AOgFCwCIBR0A0QQmAJcFHQDQBc8ArgR0ACUEvQBIBBsAPgVYAFcERAA1BSsARgRgADYEYP/tBHIACgMY//sEtQA2BjQANgZzAEAF7wDoBNkAiAQIAM8DywC8B0H/8QYM/+wHfQBOBjUANQSoAGAD3gBGBVIA1wTPAKwFEQBqA9UAAAehAAAD1QAAB6EAAAKSAAAB7wAAAU4AAAQ4AAACEwAAAY8AAADMAAAACgAABS8A6QYSAQADb/9oAY0A1gGNALEBjP+kAY7/YQK7ANYCwgC9Aqn/pAQkAJUESQAQApAArwOPAEcFDABHByYArgJGAIACRgAhA24ACQN0AIsDLgCjBGAALQYmAEkD/gBgBYkA4wOXAGcIOABOBLQBIwTGAHwGUAD+BtwArAcIAKoGbQEeBFkAJgU/ADkEZ/+7BEoAzwSIAGgHqABJAfL/OwQ7AFAD7wCOA/YASAP9AEcDyQBnAjYAjwJ1AJQB7f/mBC0AaAAKAAAHq/+1B6wAhwPfAB8DXAAnBDoAUQLg/+AB6P8dAhH/egF+/8IDbQE3A2wBNwNsATcDyAEPA9ABCwPIAF8DxwEXA20BDQHrAS8Eb//UBDIAPgRJAE0EYAA+BAQAPgPfAD4EhgBKBKsAPgHoAD4DzwALBBwAPgOEAD4FlwA+BMoAPgR/AE0ElQBNBGMAPgQrACMD7gC9BLMAWARwAL4FoQDUBEH/4wQcALUD/v/5BDMASgJNAKwDqQAPA9YAIAQjACUEJQAeA+8ATgOEAL0D7gAjA+cAbQIPAH8DKAAiAzgAJQLTAO0DRwArA0gAQALjAI8DTwAuAzgAZANtAD4DZwC5ApEBKwMbAPUEOgAuBDoAJwQ6AGEESwBkA/n/kQQBAOsEMP/OBDoANQR7AEAERABBBPAAWAQgADcE3gBXBNMAWAPZADYE7ABYA9gANgQ6AH0EMgA+AzgBCwHjAAACFQA+BTMAXgUzAF4EYgBTBHoA7AJpAAcE/v/VBP7/1QT+/9UE/v/VBP7/1QT+/9UE/v/VBMsAYgRiAFgEYgBYBGIAWARiAFgCJABiAiQAYgIkAGICJABiBVkAWAU7AF4FOwBeBTsAXgU7AF4FOwBeBRIAZwUSAGcFEgBnBRIAZwSmAO4EIAA6BCAAOgQgADoEIAA6BCAAOgQgADoEIAA6A/wARwP5AEcD+QBHA/kARwP5AEcB6AA+AegAPgHoAD4B6AA+BEQANQREAEYERABGBEQARgREAEYERABGBEQAWgREAFoERABaBEQAWgPI/7wDyP+8BP7/1QQgADoE/v/VBCAAOgT+/9UEIAA6BMsAYgP8AEcEywBiA/wARwTLAGID/ABHBMsAYgP8AEcFFQBYBNoARARiAFgD+QBHBGIAWAP5AEcEYgBYA/kARwRiAFgD+QBHBGIAWAP5AEcFJgBoBEMANwUmAGgEQwA3BSYAaARDADcFJgBoBEMANwVYAFgERAA1AiQAYgHoAD4CJABiAegAPgIkAGIB6AA+AiT/mgHo/3sCJABiBkkAYgPeAEQEJQAPAe//GwTTAD4D2QA2BCAAWAHoAEQEIABYAej/qAQgAFgCfgBEBCAAWALEAEQFWQBYBEQANQVZAFgERAA1BVkAWAREADUERAA1BTsAXgREAEYFOwBeBEQARgU7AF4ERABGBPgAVwKkADUE+ABXAqT/pgT4AFcCpAA1BJgAQwPuADsEmABDA+4AOwSYAEMD7gA7BJgAQwPuADsEmABDA+4AOwR6AOwCaQBFBHoA7AJpAG8EegDsApEAbwUSAGcERABaBRIAZwREAFoFEgBnBEQAWgUSAGcERABaBRIAZwREAFoFEgBnBEQAWgaVAOwFrACyBKYA7gPI/7wEpgDuBH0AIAPIAAgEfQAgA8gACAR9ACADyAAIBwX/ngZSAAQFHQAmBEUATARgAAsEYAALA+4AvQRv/9QEb//UBG//1ARv/9QEb//UBG//1ARv/9QESQBNBAQAPgQEAD4EBAA+BAQAPgHoAD4B6AA+AegAPgHoAD4EygA+BH8ATQR/AE0EfwBNBH8ATQR/AE0EswBYBLMAWASzAFgEswBYBBwAtQRv/9QEb//UBG//1ARJAE0ESQBNBEkATQRJAE0EYAA+BAQAPgQEAD4EBAA+BAQAPgQEAD4EhgBKBIYASgSGAEoEhgBKBKsAPgHoAD4B6AA+AegAPgHo/3MB6AA+A88ACwQcAD4DhAA+A4QAPgOEAD4DhAA+BMoAPgTKAD4EygA+BH8ATQR/AE0EfwBNBGMAPgRjAD4EYwA+BCsAIwQrACMEKwAjBCsAIwPuAJcD7gC9BLMAWASzAFgEswBYBLMAWASzAFgEswBYBaEA1AQcALUEHAC1A/7/+QP+//kD/v/5CFYAIwT+/9UExgCbBbwAvAKIAMYFTwByBQoASQUUADECeQBsBP7/1QTLAFgEYgBYBH0AIAVYAFgCJABiBNMAPgaSAFgFWQBYBTsAXgTNAFgEegDsBKYA7gS9//wCJABiBKYA7gQ/AEAECwApBEQANQJ5AH4EHABaBDEAPgREAEYERP/rA8gAlwPI/+kCeQB+BBwAWgREAEYEHABaBisAXQRiAFgELgBXBJgAQwIkAGICJABiBCUADwTTAD4E0wA+BLcAowT+/9UEywBYBC4AVwRiAFgFWQBYBpIAWAVYAFgFOwBeBVoAWATNAFgEywBiBHoA7AS9//wEIAA6A/kARwRaAEAERABGBET/4gP8AEcDyP+8A8j/6QP5AEcDKAA+A+4AOwHoAEQB6AA+Afb/HQQVAEADyP+8BpUA7AWsALIGlQDsBawAsgaVAOwFrACyBKYA7gPI/7wBVwDGAnUAxQP6AE8EgwCKAe//GwGNALEGkgBYBosANQT+/9UEIAA6BTsAAQbIAIoHHgCKBGIAWAVZAFgD+QBHBFoAQAUvAIoFRABDBL4A6APIALMIDABGCQMAXgR0ACAD0gAeBMsAYgP8AEcEpgDuA8gAswIkAGIG0//KBbz/wwIkAGIE/v/VBCAAOgT+/9UEIAA6BwX/ngZSAAQEYgBYA/kARwUrAEYD+QA8A/kAPAbT/8oFvP/DBHQAIAPSAB4FWQBYBFoAQAVZAFgEWgBABTsAXgREAEYFHQBdBEUARgUdAF0ERQBGBREAhwQLADMEtwCjA8j/vAS3AKMDyP+8BLcAowPI/7wFJwDRBBgAfwaCAFcF2ABABL3//API/+kERABEBU//3gRb/9UE/v/VBCAAOgT+/9UEIAA6BP7/1QQgADoE/v/VBCAAOgT+/9UEIAA6BP7/1QQgADoE/v/VBCAAOgT+/9UEIAA6BP7/1QQgADoE/v/VBCAAOgT+/9UEIAA6BP7/1QQgADoEYgBYA/kARwRiAFgD+QBHBGIAWAP5AEcEYgBYA/kARwRiAFgD+QBHBGIAWAP5AEcEYgBYA/kARwRiAFgD+QBHAiQAYgHoAD4CJAAXAej/+gU7AF4ERABGBTsAXgREAEYFOwBeBEQARgU7AF4ERABGBTsAXgREAEYFOwBeBEQARgU7AF4ERABGBSMAWQROAEYFIwBZBE4ARgUjAFkETgBGBSMAWQROAEYFIwBZBE4ARgUSAGcERABaBRIAZwREAFoFOgBnBK4AWgU6AGcErgBaBToAZwSuAFoFOgBnBK4AWgU6AGcErgBaBKYA7gPI/7wEpgDuA8j/vASmAO4DyP+8BGIARARiABME0wA+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////1QAABH8HiAImACMAAAAHAJ4BkgGo////1QAABMYHnwImACMAAAAHAdQBiQEs//8AYv5EBPgFxQAmACUAAAAHAHcBt//3//8AWAAABPIHIgImACcAAAAHAEIBNwFd//8AWAAABPIHHwImACcAAAAHAHMB4wFZ//8AWAAABPIHRgImACcAAAAHAJoA0gFd//8AWAAABPIHDAImACcAAAAHAGgA0wFc//8AYgAAAkQHIgImACsAAAAHAEL//AFd//8AYgAAA1MHHwImACsAAAAHAHMApwFZ//8AYgAAAx4HRgImACsAAAAHAJr/lwFd//8AYgAAA10HDAImACsAAAAHAGj/mAFc//8AWAAABXoHUQImADAAAAAHAKABTgFg//8AXv/rBTYHNwAmADEAAAAHAEIBjAFy//8AXv/rBTYHNAAmADEAAAAHAHMCOAFu//8AXv/rBTYHWwAmADEAAAAHAJoBJwFy//8AXv/rBTYHZgAmADEAAAAHAKABRgF1//8AXv/rBTYHIQAmADEAAAAHAGgBKAFx//8AZ//rBVcHIgImADcAAAAHAEIBdwFd//8AZ//rBVcHHwImADcAAAAHAHMCIwFZ//8AZ//rBVcHRgImADcAAAAHAJoBEgFd//8AZ//rBVcHDAImADcAAAAHAGgBEwFc//8A7gAABVMHHQImADsAAAAHAHMB6QFX//8AOv/sA/cF4AImAEMAAAAHAEIAswAb//8AOv/sBAsF3QImAEMAAAAHAHMBXwAX//8AOv/sA/cGBAImAEMAAAAGAJpOGwAA//8AOv/sBBwGDwImAEMAAAAGAKBtHgAA//8AOv/sBBQFygImAEMAAAAGAGhPGgAA//8AOv/sA/cGRgImAEMAAAAHAJ4A2gBm//8AOv/sBA4GXgImAEMAAAAHAdQA0f/r//8AR/5EA/sETgImAEUAAAAHAHcBOf/3//8AR//sA+sF4QImAEcAAAAHAEIAkQAc//8AR//sA+sF3gImAEcAAAAHAHMBPQAY//8AR//sA+sGBQImAEcAAAAGAJosHAAA//8AR//sA/IFywImAEcAAAAGAGgtGwAA//8APgAAAd0FywImAIoAAAAGAEKVBgAA//8APgAAAuwFyAImAIoAAAAGAHNAAgAA//8APgAAArcF7wImAIoAAAAHAJr/MAAG//8APgAAAvYFtQImAIoAAAAHAGj/MQAF//8ANQAABDIGDwImAFAAAAAHAKAAgwAe//8ARv/sBBwF4AImAFEAAAAHAEIApwAb//8ARv/sBBwF3QImAFEAAAAHAHMBUwAX//8ARv/sBBwGBAImAFEAAAAGAJpCGwAA//8ARv/sBBwGDwImAFEAAAAGAKBhHgAA//8ARv/sBBwFygImAFEAAAAGAGhDGgAA//8AWv/sBDsFywImAFcAAAAHAEIAxgAG//8AWv/sBDsFyAImAFcAAAAHAHMBcgAC//8AWv/sBDsF7wImAFcAAAAGAJphBgAA//8AWv/sBDsFtQImAFcAAAAGAGhiBQAA////vP5LBCoFyAImAFsAAAAHAHMBNQAC////vP5LBCoFtQImAFsAAAAGAGglBQAA////1QAABN4G+gImACMAAAAHAG4BJgFK//8AOv/sBCYFuAImAEMAAAAGAG5uCAAA////1QAABLAHTAImACMAAAAHAJwBYQGc//8AOv/sA/gGCgImAEMAAAAHAJwAqQBaAAL/1f5QBH8FsAAaAB4AAAEzEyMOAQcGFjMyNjcHDgEjIiY3PgE3AyEDIwEhAycDBJvgJVdiCQYbKBkwFwcgTDJPWA8LY180/c7SuAHbAc1cAwWw+lA+ZDwlJRELeBMZY1pJfTYBe/58AhkCoAEAAAACADr+UAP3BE4ANAA/AAAhNDY3Jw4BIyImNzYkOwE3NiYjIgYHIzYkMzIWBwMOARcjDgEHBhYzMjY3Bw4BIyImNz4BNyUyNj8BIyIGBwYWAqAEBQNCrl2WiR4iAQHQvhYVV2dYjg61GwEAtqS1ImgNCQQTV2IJBhsoGTAXByBMMk9YDwtbWP7wV60vKMNrpBARQTM+HwFIXayWqKJuaWlkRoW7u6/99j1mNz5kPCUlEQt4ExljWkZ5NItgRMl7U1BPAAD//wBi/+sE+Ac0ACYAJQAAAAcAcwIhAW7//wBH/+wD+wXdAiYARQAAAAcAcwEqABf//wBi/+sE+AdbACYAJQAAAAcAmgEQAXL//wBH/+wD+wYEAiYARQAAAAYAmhkbAAD//wBi/+sE+AciACYAJQAAAAcAnQHRAXL//wBH/+wD+wXLAiYARQAAAAcAnQDaABv//wBi/+sE+AdcACYAJQAAAAcAmwEmAXP//wBH/+wD+wYFAiYARQAAAAYAmy8cAAD//wBYAAAFHQdHACYAJgAAAAcAmwDgAV7//wBE/+sFwwYYACYARgAAAAcBkQSgBSz//wBYAAAE8gb6AiYAJwAAAAcAbgDyAUr//wBH/+wEBAW5AiYARwAAAAYAbkwJAAD//wBYAAAE8gdMAiYAJwAAAAcAnAEtAZz//wBH/+wD6wYLAiYARwAAAAcAnACHAFv//wBYAAAE8gcNAiYAJwAAAAcAnQGTAV3//wBH/+wD6wXMAiYARwAAAAcAnQDtABwAAQBY/lAE8gWwACAAAAEhAyEHIw4BBwYWMzI2NwcOASMiJjc+ATcnIQEhByEDIQQC/ZJpAsweNFdiCQYbKBkwFwcgTDJPWA8LWlQB/V0BIwN3Hv0+YAJuAqb975U+ZDwlJRELeBMZY1pGeDIDBbCW/iIAAAACAEf+ZAPrBE4AKQAxAAAlDgEHDgEHBhYzMjY3Bw4BIyImNz4BNycmAj8BNgAzMhIPASEGFjMyNjcDIgYHITc2JgNbIVM0U14IBhsoGTAXByBMMk9YDwg/OQHIyicHJwEptMerIxP9bBhrh1qXPMdaoCkB2gQTWXEeMxI7YjslJRELeBMZY1o5YywDAwEp7y31ASX++915rcU5MgLMqoYafZkA//8AWAAABPIHRwImACcAAAAHAJsA6AFe//8AR//sA+sGBgImAEcAAAAGAJtCHQAA//8AaP/rBQ8HWwImACkAAAAHAJoBBgFy//8AN/5LBD0GBAImAEkAAAAGAJpWGwAA//8AaP/rBQ8HYQImACkAAAAHAJwBYQGx//8AN/5LBD0GCgImAEkAAAAHAJwAsQBa//8AaP/rBQ8HIgImACkAAAAHAJ0BxwFy//8AN/5LBD0FywImAEkAAAAHAJ0BFwAb//8AaP3lBQ8FxQImACkAAAAHAZEBRv62//8AN/5LBD0GbQImAEkAAAAHAaUBKABW//8AWAAABXkHRgImACoAAAAHAJoBKQFd//8ANQAABBkHRQImAEoAAAAHAJoAYwFc//8AYgAAA2UHUQImACsAAAAHAKD/tgFg//8APgAAAv4F+gImAIoAAAAHAKD/TwAJ//8AYgAAA28G+gImACsAAAAHAG7/twFK//8APgAAAwgFpAImAIoAAAAHAG7/UP/0//8AYgAAA0EHTAImACsAAAAHAJz/8gGc//8APgAAAtoF9QImAIoAAAAGAJyLRQAA////mv5YAjoFsAImACsAAAAGAJ/jCAAA////e/5QAjEGGAImAEsAAAAGAJ/EAAAA//8AYgAAAogHDQImACsAAAAHAJ0AVwFd//8AYv/rBnYFsAAmACsAAAAHACwCJAAA//8ARP5LBCEGGAAmAEsAAAAHAEwB6AAA//8AD//rBSwHOQImACwAAAAHAJoBpQFQ////G/5LAsQF3AImAJgAAAAHAJr/Pf/z//8APv31BTUFsAAmAC0AAAAHAZEBIP7G//8ANv33BCgGGAImAE0AAAAHAZEAxP7I//8AWAAAA60G4AImAC4AAAAHAHMAjwEa//8ARAAAA0MHXAImAE4AAAAHAHMAlwGW//8AWP33A60FsAImAC4AAAAHAZEBGv7I////qP33AjEGGAImAE4AAAAHAZH/wv7I//8AWAAAA9UFsQImAC4AAAAHAZECsgTF//8ARAAAA3IGGAAmAE4AAAAHAZECTwUs//8AWAAAA60FsAImAC4AAAAHAJ0BNP3F//8ARAAAAukGGAAmAE4AAAAHAJ0AuP23//8AWAAABXoHHwImADAAAAAHAHMCQAFZ//8ANQAABCEF3QImAFAAAAAHAHMBdQAX//8AWP33BXoFsAImADAAAAAHAZEBd/7I//8ANf33BBgETgImAFAAAAAHAZEA7P7I//8AWAAABXoHRwImADAAAAAHAJsBRQFe//8ANQAABCMGBQImAFAAAAAGAJt6HAAA//8ANQAABBgGGAImAFAAAAAHAZEAiwUs//8AXv/rBTYHDwAmADEAAAAHAG4BRwFf//8ARv/sBBwFuAImAFEAAAAGAG5iCAAA//8AXv/rBTYHYQAmADEAAAAHAJwBggGx//8ARv/sBBwGCgImAFEAAAAHAJwAnQBa//8AXv/rBZkHYAAmADEAAAAHAKEBqgFy//8ARv/sBLQGCQImAFEAAAAHAKEAxQAb//8AVwAABQIHHwImADQAAAAHAHMB3AFZ//8ANQAAA4cF3QImAFQAAAAHAHMA2wAX//8AV/33BQIFrwImADQAAAAHAZEBE/7I////pv33Aw0ETgImAFQAAAAHAZH/wP7I//8AVwAABQIHRwImADQAAAAHAJsA4QFe//8ANQAAA4oGBQImAFQAAAAGAJvhHAAA//8AQ//rBMAHNAAmADUAAAAHAHMB1gFu//8AO//sA9MF3QImAFUAAAAHAHMBJwAX//8AQ//rBMAHWwAmADUAAAAHAJoAxQFy//8AO//sA8kGBAImAFUAAAAGAJoWGwAA//8AQ/5EBMAFxQAmADUAAAAHAHcBbP/3//8AO/5FA8kETgImAFUAAAAHAHcBN//4//8AQ/3jBMAFxQAmADUAAAAHAZEBBP60//8AO/3kA8kETgImAFUAAAAHAZEAz/61//8AQ//rBMAHXAAmADUAAAAHAJsA2wFz//8AO//sA9UGBQImAFUAAAAGAJssHAAA//8A7P31BQsFsAImADYAAAAHAZEBDP7G//8ARf3tAqQFQQImAFYAAAAHAZEAX/6+//8A7P5VBQsFsAImADYAAAAHAHcBdAAI//8Ab/5NAqQFQQImAFYAAAAHAHcAxwAA//8A7AAABQsHRgImADYAAAAHAJsA2gFd//8Ab//sA7QGMQAmAFYAAAAHAZECkQVF//8AZ//rBVcHUQImADcAAAAHAKABMQFg//8AWv/sBDsF+gImAFcAAAAHAKAAgAAJ//8AZ//rBVcG+gImADcAAAAHAG4BMgFK//8AWv/sBDsFpAImAFcAAAAHAG4Agf/0//8AZ//rBVcHTAImADcAAAAHAJwBbQGc//8AWv/sBDsF9QImAFcAAAAHAJwAvABF//8AZ//rBVcHiAImADcAAAAHAJ4BngGo//8AWv/sBDsGMQImAFcAAAAHAJ4A7QBR//8AZ//rBYQHSwImADcAAAAHAKEBlQFd//8AWv/sBNMF9AImAFcAAAAHAKEA5AAGAAEAZ/5uBVcFsAAoAAABAw4BBw4BBwYWMzI2NwcOASMiJjc+ATcnIgYjIiY3EzMDBhYzMjY3EwVXxSW4jE5cCQYbKBkwFwcgTDJPWA8IOTQBBBYG1u0wxbbFJYqWkeIixQWw/CW22jI3YzklJRELeBMZY1o2XioDAfzuA9v8JbafragD2wAAAAABAFr+UAQ7BDoAJwAAIQ4BBwYWMzI2NwcOASMiJjc+AT8BJw4BIyImNxMzAwYWMzI2NxMzAwNiV2IJBhsoGTAXByBMMk9YDwpeWRIDP6JlnZMwf7Z/JkNpX5Mzm7XYPmQ8JSURC3gTGWNaRno1jwFSVOHwAn39gb53W1MDBvvG//8A7AAABuwHRgImADkAAAAHAJoBnAFd//8AsgAABfoF7wImAFkAAAAHAJoBFQAG//8A7gAABVMHRAImADsAAAAHAJoA2AFb////vP5LBCoF7wImAFsAAAAGAJokBgAA//8A7gAABVMHCgImADsAAAAHAGgA2QFa//8AIAAABH0HHwAmADwAAAAHAHMB0QFZ//8ACAAAA+oFyAImAFwAAAAHAHMBPgAC//8AIAAABFsHDQAmADwAAAAHAJ0BgQFd//8ACAAAA98FtgImAFwAAAAHAJ0A7gAG//8AIAAABH8HRwAmADwAAAAHAJsA1gFe//8ACAAAA+wF8AImAFwAAAAGAJtDBwAA////ngAAB3UHHwImAH8AAAAHAHMDAQFZ//8ABP/rBmAF3gImAIQAAAAHAHMCegAY//8AJv+jBWsHXQImAIEAAAAHAHMCMQGX//8ATP95BDgF3AImAIcAAAAHAHMBUAAW//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8ACwAABEkEjQImAakAAAAHAdP/Uv97//8AvQAABCUEjQImAbgAAAAGAdMo9wAA////1AAAA+gF3wImAaYAAAAHAEIA2QAa////1AAABDEF3AImAaYAAAAHAHMBhQAW////1AAAA/sGAwImAaYAAAAGAJp0GgAA////1AAABEIGDgImAaYAAAAHAKAAkwAd////1AAABDoFyQImAaYAAAAGAGh1GQAA////1AAAA+gGRQImAaYAAAAHAJ4BAABl////1AAABDQGXQImAaYAAAAHAdQA9//q//8ATf5HBEIEnQImAagAAAAHAHcBU//6//8APgAABB0F3wImAaoAAAAHAEIAqgAa//8APgAABB0F3AImAaoAAAAHAHMBVgAW//8APgAABB0GAwImAaoAAAAGAJpFGgAA//8APgAABB0FyQImAaoAAAAGAGhGGQAA//8APgAAAd8F3wImAa4AAAAGAEKXGgAA//8APgAAAu4F3AImAa4AAAAGAHNCFgAA//8APgAAArkGAwImAa4AAAAHAJr/MgAa//8APgAAAvgFyQImAa4AAAAHAGj/MwAZ//8APgAABL4GDgImAbMAAAAHAKAAsQAd//8ATf/vBG8F7wImAbQAAAAHAEIA3QAq//8ATf/vBG8F7AImAbQAAAAHAHMBiQAm//8ATf/vBG8GEwImAbQAAAAGAJp4KgAA//8ATf/vBG8GHgImAbQAAAAHAKAAlwAt//8ATf/vBG8F2QIm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u9uwJyX+9czZ/uMwtSO4mmqrAUx3hEJIy8axsuzWi6F0V393R0/Hw7ir1uurgXIA//8AYgAAAjoFsAIGACsAAP//AGIAAANdBwwCJgArAAAABwBo/5gBXP//AA//6wRSBbACBgAsAAD//wA+AAAFNQWwAAYALQAA//8APgAABTUGxwAmAC0AAAAHAHMBxQEB//8Ao//rBUUHTAImANkAAAAHAJwBPgGc////1QAABH8FsAIGACMAAP//AFgAAATQBbACBgAkAAD//wBXAAAEuQWwAgYArAAA//8AWAAABPIFsAIGACcAAP//AFgAAAV6B0wCJgDXAAAABwCcAY4BnP//AFgAAAazBbACBgAvAAD//wBYAAAFeQWwAgYAKgAA//8AXv/rBTYFxQAGADEAAP//AFgAAAV7BbACBgCxAAD//wBYAAAFGAWwAgYAMgAA//8AYv/rBPgFxQAGACUAAP//AOwAAAULBbACBgA2AAD////8AAAFHQWwAgYAOgAA//8AOv/sA/cETgIGAEMAAP//AEf/7APrBE4CBgBHAAD//wBAAAAERwX1AiYA6wAAAAcAnADIAEX//wBG/+wEHAROAgYAUQAA////4v5gBCYETgIGAFIAAAABAEf/7AP7BE4AGwAAJTI2NzMGBCMiAj8BNgAzMhYHIzYmIyIGDwEGFgHxWqAPrBn+8qbXuyUHJwER4a7BGqwQameNpBoHHFWBeFyazwEy6ir1ASfeqmyG4qQqsdYAAP///7z+SwQqBDoCBgBbAAD////pAAAD8QQ6AgYAWgAA//8AR//sA/IFywImAEcAAAAGAGgtGwAA//8APgAAA5UFyAImAOcAAAAHAHMA5wAC//8AO//sA8kETgIGAFUAAP//AEQAAAIxBhgCBgBLAAD//wA+AAAC9gW1AiYAigAAAAcAaP8xAAX///8d/ksCOQYYAgYATAAA//8AQAAABGEFxwImAOwAAAAHAHMBTQAB////vP5LBCoF9QImAFsAAAAGAJx/RQAA//8A7AAABuwHIgImADkAAAAHAEICAQFd//8AsgAABfoFywImAFkAAAAHAEIBegAG//8A7AAABuwHHwImADkAAAAHAHMCrQFZ//8AsgAABfoFyAImAFkAAAAHAHMCJgAC//8A7AAABuwHDAImADkAAAAHAGgBnQFc//8AsgAABfoFtQIm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AEMAAAAHAKgEBQAA////1QAABH8HxgImACMAAAAHAKYE5QFT//8AOv/sA/cGhAImAEMAAAAHAKYELQAR////1QAABg4HqAImACMAAAAHAaMA8AEW//8AOv/sBVYGZwImAEMAAAAGAaM41QAA////1QAABLcHpQImACMAAAAHAaIA+gEl//8AOv/sA/8GZAImAEMAAAAGAaJC5AAA////1QAABZ4H2wImACMAAAAHAaEA9QEN//8AOv/sBOYGmgImAEMAAAAGAaE9zAAA////1QAABLYH5QImACMAAAAHAaAA9gET//8AOv/sA/4GpAImAEMAAAAGAaA+0gAA////1f6xBI0HRgImACMAAAAnAJoBBgFdAAcAqASsAAD//wA6/rED9wYEAiYAQwAAACYAmk4bAAcAqAQFAAAAAP///9UAAASqB90CJgAjAAAABwGfASkBVP//ADr/7AP3BpsCJgBDAAAABgGfcRIAAP///9UAAATOB+ACJgAjAAAABwGkAS8BZ///ADr/7AQWBp4CJgBDAAAABgGkdyUAAP///9UAAASVCEsCJgAjAAAABwGeASkBSf//ADr/7AP3BwkCJgBDAAAABgGecQcAAP///9UAAATMCB8CJgAjAAAABwGdASsBUf//ADr/7AQUBt0CJgBDAAAABgGdcw8AAP///9X+sQSwB0wCJgAjAAAAJwCcAWEBnAAHAKgErAAA//8AOv6xA/gGCgImAEMAAAAnAJwAqQBaAAcAqAQFAAD//wBY/rsE8gWwAiYAJwAAAAcAqAR3AAr//wBH/rED6wROAiYARwAAAAcAqARRAAD//wBYAAAE8gfGAiYAJwAAAAcApgSxAVP//wBH/+wD6waFAiYARwAAAAcApgQLABL//wBYAAAE8gdRAiYAJwAAAAcAoADxAWD//wBH/+wD+gYQAiYARwAAAAYAoEsfAAD//wBYAAAF2geoAiYAJwAAAAcBowC8ARb//wBH/+wFNAZoAiYARwAAAAYBoxbWAAD//wBYAAAE8gelAiYAJwAAAAcBogDGASX//wBH/+wD6wZlAiYARwAAAAYBoiDlAAD//wBYAAAFagfbAiYAJwAAAAcBoQDBAQ3//wBH/+wExAabAiYARwAAAAYBoRvNAAD//wBYAAAE8gflAiYAJwAAAAcBoADCARP//wBH/+wD6walAiYARwAAAAYBoBzTAAD//wBY/rsE8gdGAiYAJwAAACcAmgDSAV0ABwCoBHcACv//AEf+sQPrBgUCJgBHAAAAJgCaLBwABwCoBFEAAAAA//8AYgAAAwoHxgImACsAAAAHAKYDdQFT//8APgAAAqMGcAImAIoAAAAHAKYDDv/9//8AF/65AjoFsAImACsAAAAHAKgDOwAI////+v67AjEGGAImAEsAAAAHAKgDHgAK//8AXv6pBTYFxQAmADEAAAAHAKgEw//4//8ARv6oBBwETgImAFEAAAAHAKgEV//3//8AXv/rBTYH2wAmADEAAAAHAKYFBgFo//8ARv/sBBwGhAImAFEAAAAHAKYEIQAR//8AXv/rBi8HvQAmADEAAAAHAaMBEQEr//8ARv/sBUoGZwImAFEAAAAGAaMs1QAA//8AXv/rBTYHugAmADEAAAAHAaIBGwE6//8ARv/sBBwGZAImAFEAAAAGAaI25AAA//8AXv/rBb8H8AAmADEAAAAHAaEBFgEi//8ARv/sBNoGmgImAFEAAAAGAaExzAAA//8AXv/rBTYH+gAmADEAAAAHAaABFwEo//8ARv/sBBwGpAImAFEAAAAGAaAy0gAA//8AXv6pBTYHWwAmADEAAAAnAJoBJwFyAAcAqATD//j//wBG/qgEHAYEAiYAUQAAACYAmkIbAAcAqARX//cAAP//AFn/6wYlBw8CJgCUAAAABwBzAiQBSf//AEb/7AUJBd0CJgCVAAAABwBzAXgAF///AFn/6wYlBxICJgCUAAAABwBCAXgBTf//AEb/7AUJBeACJgCVAAAABwBCAMwAG///AFn/6wYlB7YCJgCUAAAABwCmBPIBQ///AEb/7AUJBoQCJgCVAAAABwCmBEYAEf//AFn/6wYlB0ECJgCUAAAABwCgATIBUP//AEb/7AUJBg8CJgCVAAAABwCgAIYAHv//AFn+sQYlBjYCJgCUAAAABwCoBLEAAP//AEb+qAUJBLACJgCVAAAABwCoBEj/9///AGf+qgVXBbACJgA3AAAABwCoBLL/+f//AFr+sQQ7BDoCJgBXAAAABwCoBAsAAP//AGf/6wVXB8YCJgA3AAAABwCmBPEBU///AFr/7AQ7BnACJgBXAAAABwCmBED//f//AGf/6walBx8CJgCWAAAABwBzAiIBWf//AFr/7AVXBcgCJgCXAAAABwBzAXIAAv//AGf/6walByICJgCWAAAABwBCAXYBXf//AFr/7AVXBcsCJgCXAAAABwBCAMYABv//AGf/6walB8YCJgCWAAAABwCmBPABU///AFr/7AVXBnACJgCXAAAABwCmBED//f//AGf/6walB1ECJgCWAAAABwCgATABYP//AFr/7AVXBfoCJgCXAAAABwCgAIAACf//AGf+qQalBg0CJgCWAAAABwCoBLH/+P//AFr+sQVXBJECJgCXAAAABwCoBAsAAP//AO7+uwVTBbACJgA7AAAABwCoBH0ACv///7z+FAQqBDoCJgBbAAAABwCoBKj/Y///AO4AAAVTB8QCJgA7AAAABwCmBLcBUf///7z+SwQqBnACJgBbAAAABwCmBAP//f//AO4AAAVTB08CJgA7AAAABwCgAPcBXv///7z+SwQqBfoCJgBbAAAABgCgQwkAAAACAET/6wUmBhgAGgAoAAABIwMjNycOASMiAj8BGgEzMhYXEyM3MzczBzMBBhYzMjY3Ey4BIyIGBwUItPedCQM8kFiwri8EOO7BWIcrN+oe6SS1JLX8AyRhiUx1M2Uba1R8nyYE0vsuaAI/QAE06hUBHAEUSEUBEZWxsfyis9FTTwH6RE/ZvQD//wAT/u4FJgYYACYARgAAACcB0wH8AkYABgBBfYMAAP//AD7+mQU1BbAAJgAtAAAABwGcA/QAAP//AED+mQRhBDoCJgDsAAAABwGcAxMAAP//AFj+mQV5BbACJgAqAAAABwGcBBwAAP//AED+mQRGBDoCJgDvAAAABwGcAzQAAP//AOz+mQULBbACJgA2AAAABwGcAggAAP//AJD+mQP3BDoCJgDxAAAABwGcAZgAAP////z+mQUdBbACJgA6AAAABwGcA5YAAP///+n+mQPxBDoCJgBaAAAABwGcAq4AAP//ANH+mQVIBbACJgDcAAAABwGcA+sAAP//AH/+mQQGBDsCJgD0AAAABwGcAvMAAP//ANH+mQVIBbACJgDcAAAABwGcAt8AAP//AH/+mQQGBDsCJgD0AAAABwGcAeYAAP//AFf+mQS5BbACJgCsAAAABwGcANMAAP//AD7+mQOVBDoCJgDnAAAABwGcAJsAAP///8r+mQddBbACJgDVAAAABwGcBeEAAP///8P+mQYBBDoCJgDpAAAABwGcBKoAAP//AK7+VAXu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ACoAKwAsAC0ALgAvADAAMQAyADMANAA1ADYANwA4ADkAOgA7ADwAPQA+AD8AQABBAEIAQwBEAEUARgBHAEgASQBKAEsATABNAE4ATwBQAFEAUgBTAFQAVQBWAFcAWABZAFoAWwBcAF0AXgBfAGAAYQCjAIQAhQC9AJYA6ACGAI4AiwCdAKkApACKAQMAgwCTAPIA8wCNAJcAiAEEAN4A8QCeAKoA9QD0APYAogCQAPAAkQDtAIkAoADqALgAoQDuAQUA1wEGAOIA4wEHAQgAsACxAQkApgEKAQsBDAENAQ4BDwDYAOEA2wDcAN0A4ADZAN8BEAERARIBEwEUARUBFgEXARgBGQEaARsBHAEdAR4BHwEgASEBIgCfASMBJAElASYBJwEoASkBKgErASwBLQCbAS4BLwEwATEBMgEzATQBNQE2ATcBOAE5AToBOwE8AT0BPgE/AUABQQFCAUMBRAFFAUYBRwFIAUkBSgFLAUwBTQFOAU8BUAFRAVIBUwFUAVUBVgFXAVgBWQFaAVsBXAFdAV4BXwFgAWEBYgFjAWQBZQFmAWcBaAFpAWoBawFsAW0BbgFvAXABcQFyAXMBdAF1AXYBdwF4AXkBegF7AXwBfQF+AX8BgAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0AsgCzAc4AtgC3AMQBzwC0ALUAxQCCAMIAhwHQAKsAxgC+AL8AvAHRAdIB0wHUAdUB1gHXAdgAjAHZAdoB2wHcAd0AmACaAJkA7wClAJIAnACnAI8AlACVALkB3gHfAeAAwAHhAeIB4wHkAeUB5gHnAegB6QHqAesB7AHtAe4B7wHwAfEB8gHzAfQB9QH2AfcB+AH5AfoB+wH8Af0B/gH/AgACAQICAgMCBAIFAgYCBwIIAgkCCgILAgwCDQIOAg8CEAIRAhICEwIUAhUCFgIXAhgCGQIaAhsCHAIdAh4CHwIgAiECIgIjAiQCJQImAicCKAIpAioCKwIsAi0CLgIvAjACMQIyAjMCNAI1AjYCNwCsAjgCOQDpAjoCOwI8AK0AyQDHAK4AYgBjAj0AZADLAGUAyADKAM8AzADNAM4AZgDTANAA0QCvAGcA1gDUANUAaADrAGoAaQBrAG0AbABuAj4AbwBxAHAAcgBzAHUAdAB2AHcAeAB6AHkAewB9AHwAfwB+AIAAgQDsALoCPwJAAkECQgJDAkQA/QD+AkUCRgJHAkgA/wEAAkkCSgJLAkwCTQJOAk8CUAJRAlICUwJUAlUCVgD4APkCVwJYAlkCWgJbAlwCXQJeAl8CYAJhAmICYwJkAmUCZgJnAmgCaQJqAmsCbAJtAm4CbwJwAnECcgJzAnQCdQJ2AncCeAJ5AnoCewJ8An0CfgJ/AoACgQKCAoMChAKFAoYChwKIAokCigD7APwCiwKMAOQA5QKNAo4CjwKQApECkgKTApQClQKWApcCmAKZApoCmwKcAp0CngKfAqACoQKiALsCowKkAqUCpgDmAOcCpwKoAqkCqgKrAqwCrQKuAq8CsAKxArICswK0ArUCtgK3ArgCuQK6ArsCvAK9Ar4CvwLAAsECwgLDAsQCxQLGAscCyALJAsoCywLMAs0CzgLPAtAC0QLSAtMC1ALVAtYC1wLYAtkC2gLbAtwC3QLeAt8C4ALhAuIC4wLkAuUC5gLnAugC6QLqAusC7ALtAu4C7wLwAvEC8gLzAvQC9QL2AvcC+AL5AvoC+wL8Av0C/gL/AwADAQMCAwMDBAMFAwYDBwMIAwkDCgMLAwwDDQMOAw8DEAMRAxIDEwMUAxUDFgMXAxgDGQMaAxsDHAMdAx4DHwMgAyEDIgMjAyQDJQMmAycDKAMpAyoDKwMsAy0DLgMvAzADMQMyAzMDNAM1AzYDNwM4AzkDOgM7AzwDPQM+Az8DQANBA0IDQwNEA0UDRgNHA0gDSQNKA0sDTANNA04DTwNQA1EDUgNTA1QDVQNWA1cDWANZA1oDWwNcA10DXgNfA2ADYQNiA2MDZANlA2YDZwNoA2kDagNrA2wDbQNuA28DcANxA3IDcwN0A3UDdgN3A3gDeQN6A3sDfAN9A34DfwOAA4EDggODA4QDhQOGA4cDiAOJA4oDiwOMA40DjgOPA5ADkQOSA5MDlAOVA5YDlwOYA5kDmgObA5wDnQOeA58DoAOhA6IDowOkA6UDpgOnA6gDqQOqA6sDrAOtA64DrwOwA7EDsgOzA7QDtQO2A7cDuAO5A7oDuwO8A70DvgO/A8ADwQPCA8MDxAPFA8YDxwPIA8kDygPLA8wDzQPOA88D0APRA9ID0wPUA9UD1gPXA9gD2QPaA9sD3APdA94D3wPgA+ED4gPjA+QD5QPmA+cD6APpA+oD6wPsA+0D7gPvA/AD8QPyA/MD9AP1A/YD9wP4A/kD+gP7A/wD/QP+A/8EAAQBBAIEAwQEBAUEBgQHBAgECQQKBAsEDAQNBA4EDwQQBBEEEgQTBBQEFQQWBBcEGAQZBBoEGwQcBB0EHgQfBCAEIQD3BCIEIwQkAAQETlVMTAZtYWNyb24OcGVyaW9kY2VudGVyZWQESGJhcgxrZ3JlZW5sYW5kaWMDRW5nA2VuZwVsb25ncwVPaG9ybgVvaG9ybgVVaG9ybgV1aG9ybgd1bmkwMjM3BXNjaHdhB3VuaTAyRjMJZ3JhdmVjb21iCWFjdXRlY29tYgl0aWxkZWNvbWIEaG9vawd1bmkwMzBGCGRvdGJlbG93BXRvbm9zDWRpZXJlc2lzdG9ub3MJYW5vdGVsZWlhBUdhbW1hBURlbHRhBVRoZXRhBkxhbWJkYQJYaQJQaQVTaWdtYQNQaGkDUHNpBWFscGhhBGJldGEFZ2FtbWEFZGVsdGEHZXBzaWxvbgR6ZXRhA2V0YQV0aGV0YQRpb3RhBmxhbWJkYQJ4aQNyaG8Gc2lnbWExBXNpZ21hA3RhdQd1cHNpbG9uA3BoaQNwc2kFb21lZ2EHdW5pMDNEMQd1bmkwM0QyB3VuaTAzRDYHdW5pMDQwMgd1bmkwNDA0B3VuaTA0MDkHdW5pMDQwQQd1bmkwNDBCB3VuaTA0MEYHdW5pMDQxMQd1bmkwNDE0B3VuaTA0MTYHdW5pMDQxNwd1bmkwNDE4B3VuaTA0MUIHdW5pMDQyMwd1bmkwNDI0B3VuaTA0MjYHdW5pMDQyNwd1bmkwNDI4B3VuaTA0MjkHdW5pMDQyQQd1bmkwNDJCB3VuaTA0MkMHdW5pMDQyRAd1bmkwNDJFB3VuaTA0MkYHdW5pMDQzMQd1bmkwNDMyB3VuaTA0MzMHdW5pMDQzNAd1bmkwNDM2B3VuaTA0MzcHdW5pMDQzOAd1bmkwNDNBB3VuaTA0M0IHdW5pMDQzQwd1bmkwNDNEB3VuaTA0M0YHdW5pMDQ0Mgd1bmkwNDQ0B3VuaTA0NDYHdW5pMDQ0Nwd1bmkwNDQ4B3VuaTA0NDkHdW5pMDQ0QQd1bmkwNDRCB3VuaTA0NEMHdW5pMDQ0RAd1bmkwNDRFB3VuaTA0NEYHdW5pMDQ1Mgd1bmkwNDU0B3VuaTA0NTkHdW5pMDQ1QQd1bmkwNDVCB3VuaTA0NUYHdW5pMDQ2MAd1bmkwNDYxB3VuaTA0NjMHdW5pMDQ2NAd1bmkwNDY1B3VuaTA0NjYHdW5pMDQ2Nwd1bmkwNDY4B3VuaTA0NjkHdW5pMDQ2QQd1bmkwNDZCB3VuaTA0NkMHdW5pMDQ2RAd1bmkwNDZFB3VuaTA0NkYHdW5pMDQ3Mgd1bmkwNDczB3VuaTA0NzQHdW5pMDQ3NQd1bmkwNDdBB3VuaTA0N0IHdW5pMDQ3Qwd1bmkwNDdEB3VuaTA0N0UHdW5pMDQ3Rgd1bmkwNDgwB3VuaTA0ODEHdW5pMDQ4Mgd1bmkwNDgzB3VuaTA0ODQHdW5pMDQ4NQd1bmkwNDg2B3VuaTA0ODgHdW5pMDQ4OQd1bmkwNDhEB3VuaTA0OEUHdW5pMDQ4Rgd1bmkwNDkwB3VuaTA0OTEHdW5pMDQ5NAd1bmkwNDk1B3VuaTA0OUMHdW5pMDQ5RAd1bmkwNEEwB3VuaTA0QTEHdW5pMDRBNAd1bmkwNEE1B3VuaTA0QTYHdW5pMDRBNwd1bmkwNEE4B3VuaTA0QTkHdW5pMDRCNAd1bmkwNEI1B3VuaTA0QjgHdW5pMDRCOQd1bmkwNEJBB3VuaTA0QkMHdW5pMDRCRAd1bmkwNEMzB3VuaTA0QzQHdW5pMDRDNwd1bmkwNEM4B3VuaTA0RDgHdW5pMDRFMAd1bmkwNEUxB3VuaTA0RkEHdW5pMDRGQgd1bmkwNTAwB3VuaTA1MDIHdW5pMDUwMwd1bmkwNTA0B3VuaTA1MDUHdW5pMDUwNgd1bmkwNTA3B3VuaTA1MDgHdW5pMDUwOQd1bmkwNTBBB3VuaTA1MEIHdW5pMDUwQwd1bmkwNTBEB3VuaTA1MEUHdW5pMDUwRgd1bmkwNTEwB3VuaTIwMDAHdW5pMjAwMQd1bmkyMDAyB3VuaTIwMDMHdW5pMjAwNAd1bmkyMDA1B3VuaTIwMDYHdW5pMjAwNwd1bmkyMDA4B3VuaTIwMDkHdW5pMjAwQQd1bmkyMDBCDXVuZGVyc2NvcmVkYmwNcXVvdGVyZXZlcnNlZAd1bmkyMDI1B3VuaTIwNzQJbnN1cGVyaW9yBGxpcmEGcGVzZXRhBEV1cm8HdW5pMjEwNQd1bmkyMTEzB3VuaTIxMTYJZXN0aW1hdGVkCW9uZWVpZ2h0aAx0aHJlZWVpZ2h0aHMLZml2ZWVpZ2h0aHMMc2V2ZW5laWdodGhzCmNvbG9uLmxudW0JcXVvdGVkYmx4C2NvbW1hYWNjZW50B3VuaUZFRkYHdW5pRkZGQwd1bmlGRkZECWZpdmUuc21jcAhmb3VyLnN1cAl6ZXJvLmxudW0ObGFyZ2VyaWdodGhvb2sMY3lyaWxsaWNob29rEGN5cmlsbGljaG9va2xlZnQLY3lyaWxsaWN0aWMOYnJldmV0aWxkZWNvbWINYnJldmVob29rY29tYg5icmV2ZWFjdXRlY29tYhNjaXJjdW1mbGV4dGlsZGVjb21iEmNpcmN1bWZsZXhob29rY29tYhNjaXJjdW1mbGV4Z3JhdmVjb21iE2NpcmN1bWZsZXhhY3V0ZWNvbWIOYnJldmVncmF2ZWNvbWIRY29tbWFhY2NlbnRyb3RhdGUGQS5zbWNwBkIuc21jcAZDLnNtY3AGRC5zbWNwBkUuc21jcAZGLnNtY3AGRy5zbWNwBkguc21jcAZJLnNtY3AGSi5zbWNwBksuc21jcAZMLnNtY3AGTS5zbWNwBk4uc21jcAZPLnNtY3AGUS5zbWNwBlIuc21jcAZTLnNtY3AGVC5zbWNwBlUuc21jcAZWLnNtY3AGVy5zbWNwBlguc21jcAZZLnNtY3AGWi5zbWNwCXplcm8uc21jcAhvbmUuc21jcAh0d28uc21jcAp0aHJlZS5zbWNwCWZvdXIuc21jcAh0d28ubG51bQhzaXguc21jcApzZXZlbi5zbWNwCmVpZ2h0LnNtY3AJbmluZS5zbWNwB29uZS5zdXAHdHdvLnN1cAl0aHJlZS5zdXAIb25lLmxudW0IZml2ZS5zdXAHc2l4LnN1cAlzZXZlbi5zdXAJZWlnaHQuc3VwCG5pbmUuc3VwCHplcm8uc3VwCGNyb3NzYmFyCXJpbmdhY3V0ZQlkYXNpYW94aWEKdGhyZWUubG51bQlmb3VyLmxudW0JZml2ZS5sbnVtCHNpeC5sbnVtBWcuYWx0CnNldmVuLmxudW0HY2hpLmFsdAplaWdodC5sbnVtCWFscGhhLmFsdAlkZWx0YS5hbHQERC5jbgRhLmNuBVIuYWx0BUsuYWx0BWsuYWx0BksuYWx0MgZrLmFsdDIJbmluZS5sbnVtBlAuc21jcA1jeXJpbGxpY2JyZXZlB3VuaTAwQUQGRGNyb2F0BGhiYXIEVGJhcgR0YmFyCkFyaW5nYWN1dGUKYXJpbmdhY3V0ZQdBbWFjcm9uB2FtYWNyb24GQWJyZXZlBmFicmV2ZQdBb2dvbmVrB2FvZ29uZWsLQ2NpcmN1bWZsZXgLY2NpcmN1bWZsZXgHdW5pMDEwQQd1bmkwMTBCBkRjYXJvbgZkY2Fyb24HRW1hY3JvbgdlbWFjcm9uBkVicmV2ZQZlYnJldmUKRWRvdGFjY2VudAplZG90YWNjZW50B0VvZ29uZWsHZW9nb25lawZFY2Fyb24GZWNhcm9uC0djaXJjdW1mbGV4C2djaXJjdW1mbGV4B3VuaTAxMjAHdW5pMDEyMQxHY29tbWFhY2NlbnQMZ2NvbW1hYWNjZW50C0hjaXJjdW1mbGV4C2hjaXJjdW1mbGV4Bkl0aWxkZQZpdGlsZGUHSW1hY3JvbgdpbWFjcm9uBklicmV2ZQZpYnJldmUHSW9nb25lawdpb2dvbmVrCklkb3RhY2NlbnQCSUoCaWoLSmNpcmN1bWZsZXgLamNpcmN1bWZsZXgMS2NvbW1hYWNjZW50DGtjb21tYWFjY2VudAZMYWN1dGUGbGFjdXRlDExjb21tYWFjY2VudAxsY29tbWFhY2NlbnQGTGNhcm9uBmxjYXJvbgRMZG90BGxkb3QGTmFjdXRlBm5hY3V0ZQxOY29tbWFhY2NlbnQMbmNvbW1hYWNjZW50Bk5jYXJvbgZuY2Fyb24LbmFwb3N0cm9waGUHT21hY3JvbgdvbWFjcm9uBk9icmV2ZQZvYnJldmUNT2h1bmdhcnVtbGF1dA1vaHVuZ2FydW1sYXV0BlJhY3V0ZQZyYWN1dGUMUmNvbW1hYWNjZW50DHJjb21tYWFjY2VudAZSY2Fyb24GcmNhcm9uBlNhY3V0ZQZzYWN1dGULU2NpcmN1bWZsZXgLc2NpcmN1bWZsZXgHdW5pMDIxOAd1bmkwMjE5B3VuaTAyMUEHdW5pMDIxQgd1bmkwMTYyB3VuaTAxNjMGVGNhcm9uBnRjYXJvbgZVdGlsZGUGdXRpbGRlB1VtYWNyb24HdW1hY3JvbgZVYnJldmUGdWJyZXZlBVVyaW5nBXVyaW5nDVVodW5nYXJ1bWxhdXQNdWh1bmdhcnVtbGF1dAdVb2dvbmVrB3VvZ29uZWsLV2NpcmN1bWZsZXgLd2NpcmN1bWZsZXgLWWNpcmN1bWZsZXgLeWNpcmN1bWZsZXgGWmFjdXRlBnphY3V0ZQpaZG90YWNjZW50Cnpkb3RhY2NlbnQHQUVhY3V0ZQdhZWFjdXRlC09zbGFzaGFjdXRlC29zbGFzaGFjdXRlC0Rjcm9hdC5zbWNwCEV0aC5zbWNwCVRiYXIuc21jcAtBZ3JhdmUuc21jcAtBYWN1dGUuc21jcBBBY2lyY3VtZmxleC5zbWNwC0F0aWxkZS5zbWNwDkFkaWVyZXNpcy5zbWNwCkFyaW5nLnNtY3APQXJpbmdhY3V0ZS5zbWNwDUNjZWRpbGxhLnNtY3ALRWdyYXZlLnNtY3ALRWFjdXRlLnNtY3AQRWNpcmN1bWZsZXguc21jcA5FZGllcmVzaXMuc21jcAtJZ3JhdmUuc21jcAtJYWN1dGUuc21jcBBJY2lyY3VtZmxleC5zbWNwDklkaWVyZXNpcy5zbWNwC050aWxkZS5zbWNwC09ncmF2ZS5zbWNwC09hY3V0ZS5zbWNwEE9jaXJjdW1mbGV4LnNtY3ALT3RpbGRlLnNtY3AOT2RpZXJlc2lzLnNtY3ALVWdyYXZlLnNtY3ALVWFjdXRlLnNtY3AQVWNpcmN1bWZsZXguc21jcA5VZGllcmVzaXMuc21jcAtZYWN1dGUuc21jcAxBbWFjcm9uLnNtY3ALQWJyZXZlLnNtY3AMQW9nb25lay5zbWNwC0NhY3V0ZS5zbWNwEENjaXJjdW1mbGV4LnNtY3AMdW5pMDEwQS5zbWNwC0NjYXJvbi5zbWNwC0RjYXJvbi5zbWNwDEVtYWNyb24uc21jcAtFYnJldmUuc21jcA9FZG90YWNjZW50LnNtY3AMRW9nb25lay5zbWNwC0VjYXJvbi5zbWNwEEdjaXJjdW1mbGV4LnNtY3ALR2JyZXZlLnNtY3AMdW5pMDEyMC5zbWNwEUdjb21tYWFjY2VudC5zbWNwEEhjaXJjdW1mbGV4LnNtY3ALSXRpbGRlLnNtY3AMSW1hY3Jvbi5zbWNwC0licmV2ZS5zbWNwDElvZ29uZWsuc21jcA9JZG90YWNjZW50LnNtY3AQSmNpcmN1bWZsZXguc21jcBFLY29tbWFhY2NlbnQuc21jcAtMYWN1dGUuc21jcBFMY29tbWFhY2NlbnQuc21jcAtMY2Fyb24uc21jcAlMZG90LnNtY3ALTmFjdXRlLnNtY3ARTmNvbW1hYWNjZW50LnNtY3ALTmNhcm9uLnNtY3AMT21hY3Jvbi5zbWNwC09icmV2ZS5zbWNwEk9odW5nYXJ1bWxhdXQuc21jcAtSYWN1dGUuc21jcBFSY29tbWFhY2NlbnQuc21jcAtSY2Fyb24uc21jcAtTYWN1dGUuc21jcBBTY2lyY3VtZmxleC5zbWNwDVNjZWRpbGxhLnNtY3ALU2Nhcm9uLnNtY3ARVGNvbW1hYWNjZW50LnNtY3ALVGNhcm9uLnNtY3ALVXRpbGRlLnNtY3AMVW1hY3Jvbi5zbWNwC1VicmV2ZS5zbWNwClVyaW5nLnNtY3ASVWh1bmdhcnVtbGF1dC5zbWNwDFVvZ29uZWsuc21jcBBXY2lyY3VtZmxleC5zbWNwEFljaXJjdW1mbGV4LnNtY3AOWWRpZXJlc2lzLnNtY3ALWmFjdXRlLnNtY3APWmRvdGFjY2VudC5zbWNwC1pjYXJvbi5zbWNwD2dlcm1hbmRibHMuc21jcApBbHBoYXRvbm9zDEVwc2lsb250b25vcwhFdGF0b25vcwlJb3RhdG9ub3MMT21pY3JvbnRvbm9zDFVwc2lsb250b25vcwpPbWVnYXRvbm9zEWlvdGFkaWVyZXNpc3Rvbm9zBUFscGhhBEJldGEHRXBzaWxvbgRaZXRhA0V0YQRJb3RhBUthcHBhAk11Ak51B09taWNyb24DUmhvA1RhdQdVcHNpbG9uA0NoaQxJb3RhZGllcmVzaXMPVXBzaWxvbmRpZXJlc2lzCmFscGhhdG9ub3MMZXBzaWxvbnRvbm9zCGV0YXRvbm9zCWlvdGF0b25vcxR1cHNpbG9uZGllcmVzaXN0b25vcwVrYXBwYQdvbWljcm9uB3VuaTAzQkMCbnUDY2hpDGlvdGFkaWVyZXNpcw91cHNpbG9uZGllcmVzaXMMb21pY3JvbnRvbm9zDHVwc2lsb250b25vcwpvbWVnYXRvbm9zB3VuaTA0MDEHdW5pMDQwMwd1bmkwNDA1B3VuaTA0MDYHdW5pMDQwNwd1bmkwNDA4B3VuaTA0MUEHdW5pMDQwQwd1bmkwNDBFB3VuaTA0MTAHdW5pMDQxMgd1bmkwNDEzB3VuaTA0MTUHdW5pMDQxOQd1bmkwNDFDB3VuaTA0MUQHdW5pMDQxRQd1bmkwNDFGB3VuaTA0MjAHdW5pMDQyMQd1bmkwNDIyB3VuaTA0MjUHdW5pMDQzMAd1bmkwNDM1B3VuaTA0MzkHdW5pMDQzRQd1bmkwNDQwB3VuaTA0NDEHdW5pMDQ0Mwd1bmkwNDQ1B3VuaTA0NTEHdW5pMDQ1Mwd1bmkwNDU1B3VuaTA0NTYHdW5pMDQ1Nwd1bmkwNDU4B3VuaTA0NUMHdW5pMDQ1RQZXZ3JhdmUGd2dyYXZlBldhY3V0ZQZ3YWN1dGUJV2RpZXJlc2lzCXdkaWVyZXNpcwZZZ3JhdmUGeWdyYXZlBm1pbnV0ZQZzZWNvbmQJZXhjbGFtZGJsB3VuaUZCMDIHdW5pMDFGMAd1bmkwMkJDB3VuaTFFM0UHdW5pMUUzRgd1bmkxRTAwB3VuaTFFMDEHdW5pMUY0RAd1bmlGQjAzB3VuaUZCMDQHdW5pMDQwMAd1bmkwNDBEB3VuaTA0NTAHdW5pMDQ1RAd1bmkwNDcwB3VuaTA0NzEHdW5pMDQ3Ngd1bmkwNDc3B3VuaTA0NzkHdW5pMDQ3OAd1bmkwNDk4B3VuaTA0OTkHdW5pMDRBQQd1bmkwNEFCB3VuaTA0QUUHdW5pMDRBRgd1bmkwNEMwB3VuaTA0QzEHdW5pMDRDMgd1bmkwNENGB3VuaTA0RDAHdW5pMDREMQd1bmkwNEQyB3VuaTA0RDMHdW5pMDRENAd1bmkwNEQ1B3VuaTA0RDYHdW5pMDRENwd1bmkwNERBB3VuaTA0RDkHdW5pMDREQgd1bmkwNERDB3VuaTA0REQHdW5pMDRERQd1bmkwNERGB3VuaTA0RTIHdW5pMDRFMwd1bmkwNEU0B3VuaTA0RTUHdW5pMDRFNgd1bmkwNEU3B3VuaTA0RTgHdW5pMDRFOQd1bmkwNEVBB3VuaTA0RUIHdW5pMDRFQwd1bmkwNEVEB3VuaTA0RUUHdW5pMDRFRgd1bmkwNEYwB3VuaTA0RjEHdW5pMDRGMgd1bmkwNEYzB3VuaTA0RjQHdW5pMDRGNQd1bmkwNEY4B3VuaTA0RjkHdW5pMDRGQwd1bmkwNEZEB3VuaTA1MDEHdW5pMDUxMgd1bmkwNTEzB3VuaTFFQTAHdW5pMUVBMQd1bmkxRUEyB3VuaTFFQTMHdW5pMUVBNAd1bmkxRUE1B3VuaTFFQTYHdW5pMUVBNwd1bmkxRUE4B3VuaTFFQTkHdW5pMUVBQQd1bmkxRUFCB3VuaTFFQUMHdW5pMUVBRAd1bmkxRUFFB3VuaTFFQUYHdW5pMUVCMAd1bmkxRUIxB3VuaTFFQjIHdW5pMUVCMwd1bmkxRUI0B3VuaTFFQjUHdW5pMUVCNgd1bmkxRUI3B3VuaTFFQjgHdW5pMUVCOQd1bmkxRUJBB3VuaTFFQkIHdW5pMUVCQwd1bmkxRUJEB3VuaTFFQkUHdW5pMUVCRgd1bmkxRUMwB3VuaTFFQzEHdW5pMUVDMgd1bmkxRUMzB3VuaTFFQzQHdW5pMUVDNQd1bmkxRUM2B3VuaTFFQzcHdW5pMUVDOAd1bmkxRUM5B3VuaTFFQ0EHdW5pMUVDQgd1bmkxRUNDB3VuaTFFQ0QHdW5pMUVDRQd1bmkxRUNGB3VuaTFFRDAHdW5pMUVEMQd1bmkxRUQyB3VuaTFFRDMHdW5pMUVENAd1bmkxRUQ1B3VuaTFFRDYHdW5pMUVENwd1bmkxRUQ4B3VuaTFFRDkHdW5pMUVEQQd1bmkxRURCB3VuaTFFREMHdW5pMUVERAd1bmkxRURFB3VuaTFFREYHdW5pMUVFMAd1bmkxRUUxB3VuaTFFRTIHdW5pMUVFMwd1bmkxRUU0B3VuaTFFRTUHdW5pMUVFNgd1bmkxRUU3B3VuaTFFRTgHdW5pMUVFOQd1bmkxRUVBB3VuaTFFRUIHdW5pMUVFQwd1bmkxRUVEB3VuaTFFRUUHdW5pMUVFRgd1bmkxRUYwB3VuaTFFRjEHdW5pMUVGNAd1bmkxRUY1B3VuaTFFRjYHdW5pMUVGNwd1bmkxRUY4B3VuaTFFRjkGZGNyb2F0B3VuaTIwQUIHdW5pMDQ5QQd1bmkwNDlCB3VuaTA0QTIHdW5pMDRBMwd1bmkwNEFDB3VuaTA0QUQHdW5pMDRCMgd1bmkwNEIzB3VuaTA0QjYHdW5pMDRCNwd1bmkwNENCB3VuaTA0Q0MHdW5pMDRGNgd1bmkwNEY3B3VuaTA0OTYHdW5pMDQ5Nwd1bmkwNEJFB3VuaTA0QkYHdW5pMDRC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/+AA6AATATj/4QE5/+ABPP/hAUH/6QFJ/98BS//eAVP/3wFV//IAGACz/9QAvf/tAL8AEQDF/+AAx//nAMj/5QDJ/+4A1AASAOX/6QDx/9cBL//XATn/0wE7/9YBPP/FAUH/5wFJAA0BSwAMAVT/1gFV//IBqf/pAa3/5wG1/+cBtv/pAd//8AAFABn/8gDh//EBSf/yAUv/8gFT//IACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AASANT/rgDhABIA5v/gAOj/rQDq/9YA+P/fAPz/0gEC/+ABF//OASf/3QEp/+IBLf/gATP/4AE5/+kBPP/aAUb/vQFQ/98BUwARAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QADADUABMA4f/mAOL/9ADoABIA8f/nAS//5wE4/+UBOf/oAUn/5gFL/+YBU//mAVT/5wAJAOH/wwDx/88BL//OATj/5wE7/98BSf/RAUv/7AFT/6ABVP/RAAkA4f/DAPH/zwEv/84BOP/nATv/3wFJ/9EBS//sAVP/oAFU/9EAAgDU/+IBU//kAAIA1P/hAOj/5AAGAOj/7gDx/+4BBP/0ARv/8QEv/+8BVP/vAAQA8f/0AQT/9QEv//UBVP/1AAIA6P/JARf/7gAGAOgAFADx/+0A9//iAS//7QE5/+0BVP/tAAEBF//xAAUBF//rAan/6wGt/+kBtf/rAbb/6wATAEgADQDC/6sAw//AAMf/1QDo/6oBF//iARsADAFKAAsBTAALAaf/vwGp/+4Brf/sAbX/7QG2/+wBuP/1AbkADgG7AA0BvgANAd//sAAGAMX/6gDo/+4A8f+wAS//7AFU/+wB3P/oAAYA6AAUAPH/8AD8AAwBL//wATn/5gFU//AABQDoADoA8f/jAS//4gE5/+MBVP/jAAgA8f+6AQT/zwEb/9sBL/9QATn/nQFK//ABTP/yAVT/TAAIAPH/ugEE/88BG//bAS//UAE5/50BSv/wAUz/8gFU/0wABgDF/+oA6P/uAPH/sAEv/+wBVP/sAdz/6AABAOj/7wAIAPH/ugEE/88BG//bAS//UAE5/50BSv/w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/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAQAC//mAD//9ABf/+8BPP/tAAUASP/uAFn/6gG7//ABvP/tAb7/8AAFAEj/7gBZ/+oBu//wAbz/7QG+//AABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAUASP/uAFn/6gG7//ABvP/tAb7/8AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QABAaf/6wABAaf/6wABAaf/6wABAaf/6wAkAAj/4gALABQADP/PAD8AEgBI/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBp/+rAan/zQGt/8sBtf/LAbb/ywG5//MBvP/zAb3/7wHc/+gB3//uAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAEA8f/1AAEA8f/1AAEA8f/1AAEA8f/1AAEA8f/AAAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAcACH/wwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oBL/+fATj/UQE5/3sBO//KATz/3QFB//IBSf91AUv/ygFT/08BVP+MAa3/9QG1//UBuf/HAbr/8QG7/80BvP/dAb7/xAAHAPH/8AEE//EBG//zAS//8QFK//MBTP/pAVT/0wAcACH/wwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oBL/+fATj/UQE5/3sBO//KATz/3QFB//IBSf91AUv/ygFT/08BVP+MAa3/9QG1//UBuf/HAbr/8QG7/80BvP/dAb7/xAAHAPH/8AEE//EBG//zAS//8QFK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AUH/5wFJAA0BSwAMAVT/1gFV//IBqf/pAa3/5wG1/+cBtv/pAd//8AAHAPH/8AEE//EBG//zAS//8QFK//MBTP/pAVT/0wABAPH/9QAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAYAxf/qAOj/7gDx/7ABL//sAVT/7AHc/+gABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAAQEX//EAAQDx//UAAgDo/8kBF//uAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1AAkACwAPAD8ADABU/+sAXwAOAaf/ywGp/+kBrf/nAbX/5wG2/+cACQALAA8APwAMAFT/6wBfAA4Bp//LAan/6QGt/+cBtf/nAbb/5wAJAAsADwA/AAwAVP/rAF8ADgGn/8sBqf/pAa3/5wG1/+cBtv/nACQACP/iAAsAFAAM/88APwASAEj/6gBU/9gAVv/qAF8AEwBr/64Aev/NAH//oACE/8EAh//AALP/0AC3/+oAuv/GALsADQC9/+kAvv/WAMH/6ADC/7oAxf/pAMf/ywDI/9oAyf/HAW7/0wGn/6sBqf/NAa3/ywG1/8sBtv/LAbn/8wG8//MBvf/vAdz/6AHf/+4ABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAAQBZAAsAAQBZAAsAAQBZAAsACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAEA8f/AABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAkACwAUAD8AEQBU/+IAXwATAaf/tAGp/9kBrf/ZAbX/2QG2/9kABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UABAAL/+YAP//0AF//7wE8/+0AJAAI/+IACwAUAAz/zwA/ABIASP/qAFT/2ABW/+oAXwATAGv/rgB6/80Af/+gAIT/wQCH/8AAs//QALf/6gC6/8YAuwANAL3/6QC+/9YAwf/oAML/ugDF/+kAx//LAMj/2gDJ/8cBbv/TAaf/qwGp/80Brf/LAbX/ywG2/8sBuf/zAbz/8wG9/+8B3P/oAd//7gAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAGACz/9QAvf/tAL8AEQDF/+AAx//nAMj/5QDJ/+4A1AASAOX/6QDx/9cBL//XATn/0wE7/9YBPP/FAUH/5wFJAA0BSwAMAVT/1gFV//IBqf/pAa3/5wG1/+cBtv/pAd//8AABARf/8QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAEA8f/1AAEA8f/1ABgAs//UAL3/7QC/ABEAxf/gAMf/5wDI/+UAyf/uANQAEgDl/+kA8f/XAS//1wE5/9MBO//WATz/xQFB/+cBSQANAUsADAFU/9YBVf/yAan/6QGt/+cBtf/nAbb/6QHf//AAAQEX//EACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oABgDF/+oA6P/uAPH/sAEv/+wBVP/sAdz/6AASANT/rgDhABIA5v/gAOj/rQDq/9YA+P/fAPz/0gEC/+ABF//OASf/3QEp/+IBLf/gATP/4AE5/+kBPP/aAUb/vQFQ/98BUwARAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1ABIA1P+uAOEAEgDm/+AA6P+tAOr/1gD4/98A/P/SAQL/4AEX/84BJ//dASn/4gEt/+ABM//gATn/6QE8/9oBRv+9AVD/3wFTABEABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAEgDU/64A4QASAOb/4ADo/60A6v/WAPj/3wD8/9IBAv/gARf/zgEn/90BKf/iAS3/4AEz/+ABOf/pATz/2gFG/70BUP/fAVMAEQAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAYALP/1AC9/+0AvwARAMX/4ADH/+cAyP/lAMn/7gDUABIA5f/pAPH/1wEv/9cBOf/TATv/1gE8/8UBQf/nAUkADQFLAAwBVP/WAVX/8gGp/+kBrf/nAbX/5wG2/+kB3//wAAEBF//xABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gABAaf/6wABAaf/6wAkAAj/4gALABQADP/PAD8AEgBI/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBp/+rAan/zQGt/8sBtf/LAbb/ywG5//MBvP/zAb3/7wHc/+gB3//uAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1ACQACP/iAAsAFAAM/88APwASAEj/6gBU/9gAVv/qAF8AEwBr/64Aev/NAH//oACE/8EAh//AALP/0AC3/+oAuv/GALsADQC9/+kAvv/WAMH/6ADC/7oAxf/pAMf/ywDI/9oAyf/HAW7/0wGn/6sBqf/NAa3/ywG1/8sBtv/LAbn/8wG8//MBvf/vAdz/6AHf/+4ABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAJAAI/+IACwAUAAz/zwA/ABIASP/qAFT/2ABW/+oAXwATAGv/rgB6/80Af/+gAIT/wQCH/8AAs//QALf/6gC6/8YAuwANAL3/6QC+/9YAwf/oAML/ugDF/+kAx//LAMj/2gDJ/8cBbv/TAaf/qwGp/80Brf/LAbX/ywG2/8sBuf/zAbz/8wG9/+8B3P/oAd//7gAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QATAFn/wQCz/8UAxf+0AOX/1wDx/7kBBP+yARf/0gEb/8gBL/+gATn/xQFB/+QBSv/MAUz/zAFU/8sBVf/vAan/6AGt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/+oDJP74Ayj/VgMzABQDNf/eAzb/6wM4/+sDOv/rAzv/6AM9/+sDRP/oA0z/6ANV/1YDVv/eA1z/6wNh/+gDYv/rA2f/6wNp/+gDbv9WA2//3gNw/1YDcf/eA3X/6wN3/+sDeP/rA4L/6wOE/+sDhv/rA4r/6AOM/+gDjv/oA5X/6wOY/1YDmf/eA5r/VgOb/94DnP9WA53/3gOe/1YDn//eA6D/VgOh/94Dov9WA6P/3gOk/1YDpf/eA6b/VgOn/94DqP9WA6n/3gOq/1YDq//eA6z/VgOt/94Drv9WA6//3gOx/+sDs//rA7X/6wO3/+sDuf/rA7v/6wO9/+sDv//rA8X/6wPH/+sDyf/rA8v/6wPN/+sDz//rA9H/6wPT/+sD1f/rA9f/6wPZ/+sD2//rA93/6gPf/+oD4f/qA+P/6gPl/+oD5//qA+n/6gPr/+gD7f/oA+//6AP2ABQAHwA2/9UAOP/kADn/7AA7/90Azf/VANH/1QEU/+QBLv/VATb/1QIL/90CgP/VAoL/1QKE/9UCkv/sApT/3QKW/90C/f/dAwz/3QMP/90DM//VA0X/7ANH/+wDSf/sA0v/3QNg/+QDaP/dA+r/3QPs/90D7v/dA/b/1QQT/90AGgA2/7AAOP/tADv/0ADN/7AA0f+wART/7QEu/7ABNv+wAgv/0AKA/7ACgv+wAoT/sAKU/9AClv/QAv3/0AMM/9ADD//QAzP/sANL/9ADYP/tA2j/0APq/9AD7P/QA+7/0AP2/7AEE//QABAALP/uADf/7gIH/+4CCP/uAgn/7gIK/+4CV//uAob/7gKI/+4Civ/uAoz/7gKO/+4CkP/uAyT/7gPc/+4D3v/uAEcABAAQAAkAEABF/+gARv/oAEf/6ABJ/+gAU//oAJH/6ACV/+gAtv/oAMP/6ADE/+gA8v/oAP7/6AEZ/+gBHf/oATX/6AFH/+gBSP/oAVL/6AFlABABZgAQAWgAEAFpABABagAQAhP/6AIU/+gCFf/oAhb/6AIX/+gCL//oAjH/6AIz/+gCNf/oAjf/6AI5/+gCO//oAj3/6AI//+gCQf/oAkP/6AJF/+gCR//oAkn/6AMQ/+gDNv/oAzr/6AM9/+gDTQAQA04AEANSABADXP/oA2L/6ANn/+gDdf/oA3f/6AN4/+gDhP/oA5X/6AOx/+gDs//oA7X/6AO3/+gDuf/oA7v/6AO9/+gDv//oA9P/6APV/+gD1//oA9v/6AA9AEX/7ABG/+wAR//sAEn/7ABT/+wAkf/sAJX/7AC2/+wAw//sAMT/7ADy/+wA/v/sARn/7AEd/+wBNf/sAUf/7AFI/+wBUv/sAhP/7AIU/+wCFf/sAhb/7AIX/+wCL//sAjH/7AIz/+wCNf/sAjf/7AI5/+wCO//sAj3/7AI//+wCQf/sAkP/7AJF/+wCR//sAkn/7AMQ/+wDNv/sAzr/7AM9/+wDXP/sA2L/7ANn/+wDdf/sA3f/7AN4/+wDhP/sA5X/7AOx/+wDs//sA7X/7AO3/+wDuf/sA7v/7AO9/+wDv//sA9P/7APV/+wD1//sA9v/7AAXAFH/7AET/+wCHf/sAh7/7AIf/+wCIP/sAiH/7AJr/+wCbf/sAm//7AMW/+wDHP/sAzj/7AOC/+wDhv/sA8X/7APH/+wDyf/sA8v/7APN/+wDz//sA9H/7APZ/+wABgAO/4QAEP+EAWf/hAFr/4QBb/+EAXD/hAAQACz/7AA3/+wCB//sAgj/7AIJ/+wCCv/sAlf/7AKG/+wCiP/sAor/7AKM/+wCjv/sApD/7AMk/+wD3P/sA97/7AABKSwABAAAACIATgDEAaoCkANqBAQGnghkCTYKLAvyDCQMVgzUDroPMBACEhQSyhQwFOoVcBXOFpAXBhcYF0IYlBrSGvQcChyIHLIc3AAdAAT/8gAJ//IAWP/zAFv/8wC4//MBFf/zAWX/8gFm//IBaP/yAWn/8gFq//ICJv/zAif/8wKV//MDGP/zAzv/8wNE//MDTP/zA03/8gNO//IDUv/yA2H/8wNp//MDiv/zA4z/8wOO//MD6//zA+3/8wPv//MAOQAl//MAKf/zADH/8wAz//MAgf/zAJD/8wCU//MArv/zAM7/8wED//MBEv/zARb/8wEY//MBGv/zARz/8wE0//MBUf/zAfj/8wIC//MCA//zAgT/8wIF//MCBv/zAi7/8wIw//MCMv/zAjT/8wJC//MCRP/zAkb/8wJI//MCav/zAmz/8wJu//MCn//zAvz/8wMJ//MDL//zAzL/8wNX//MDY//zA2b/8wOB//MDg//zA4X/8wPE//MDxv/zA8j/8wPK//MDzP/zA87/8wPQ//MD0v/zA9T/8wPW//MD2P/zA9r/8wA5ACX/5gAp/+YAMf/mADP/5gCB/+YAkP/mAJT/5gCu/+YAzv/mAQP/5gES/+YBFv/mARj/5gEa/+YBHP/mATT/5gFR/+YB+P/mAgL/5gID/+YCBP/mAgX/5gIG/+YCLv/mAjD/5gIy/+YCNP/mAkL/5gJE/+YCRv/mAkj/5gJq/+YCbP/mAm7/5gKf/+YC/P/mAwn/5gMv/+YDMv/mA1f/5gNj/+YDZv/mA4H/5gOD/+YDhf/mA8T/5gPG/+YDyP/mA8r/5gPM/+YDzv/mA9D/5gPS/+YD1P/mA9b/5gPY/+YD2v/mADYAI//kADr/0gA7/9MArf/kAK//5ADV/9IBCP/kAfH/5AHy/+QB8//kAfT/5AH1/+QB9v/kAff/5AIL/9MCKP/kAir/5AIs/+QClP/TApb/0wL4/+QC/f/TAwD/5AMM/9MDDf/SAw//0wMo/+QDNP/SA0v/0wNV/+QDaP/TA2v/0gNu/+QDcP/kA3n/0gOT/9IDmP/kA5r/5AOc/+QDnv/kA6D/5AOi/+QDpP/kA6b/5AOo/+QDqv/kA6z/5AOu/+QD6v/TA+z/0wPu/9MD+P/SBAD/0gQT/9MAJgAO/x4AEP8eACP/zQCt/80Ar//NAQj/zQFn/x4Ba/8eAW//HgFw/x4B8f/NAfL/zQHz/80B9P/NAfX/zQH2/80B9//NAij/zQIq/80CLP/NAvj/zQMA/80DKP/NA1X/zQNu/80DcP/NA5j/zQOa/80DnP/NA57/zQOg/80Dov/NA6T/zQOm/80DqP/NA6r/zQOs/80Drv/NAKYARf/cAEb/3ABH/9wASf/cAE//8wBQ//MAUf/WAFL/8wBT/9wAV//dAFj/4QBb/+EAkf/cAJX/3ACX/90Atv/cALj/4QC8//MAw//cAMT/3ADG/90A5//zAOv/8wDs//MA7v/zAO//8wDw//MA8v/cAPP/8wD1//MA9v/zAPn/8wD7//MA/v/cAQD/8wET/9YBFf/hARn/3AEd/9wBMf/zATX/3AFA//MBRf/zAUf/3AFI/9wBUv/cAhP/3AIU/9wCFf/cAhb/3AIX/9wCHP/zAh3/1gIe/9YCH//WAiD/1gIh/9YCIv/dAiP/3QIk/90CJf/dAib/4QIn/+ECL//cAjH/3AIz/9wCNf/cAjf/3AI5/9wCO//cAj3/3AI//9wCQf/cAkP/3AJF/9wCR//cAkn/3AJk//MCZv/zAmj/8wJp//MCa//WAm3/1gJv/9YCh//dAon/3QKL/90Cjf/dAo//3QKR/90Clf/hAxD/3AMS//MDFP/dAxb/1gMY/+EDG//dAxz/1gMd/90DNv/cAzf/8wM4/9YDOf/zAzr/3AM7/+EDPf/cAz7/8wND//MDRP/hA0z/4QNU//MDXP/cA13/8wNh/+EDYv/cA2f/3ANp/+EDdf/cA3f/3AN4/9wDfv/zA4D/8wOC/9YDhP/cA4b/1gOK/+EDjP/hA47/4QOS//MDlf/cA7H/3AOz/9wDtf/cA7f/3AO5/9wDu//cA73/3AO//9wDxf/WA8f/1gPJ/9YDy//WA83/1gPP/9YD0f/WA9P/3APV/9wD1//cA9n/1gPb/9wD3f/dA9//3QPh/90D4//dA+X/3QPn/90D6f/dA+v/4QPt/+ED7//hA/P/8wP1//MD///zBAz/8wQO//MEEP/zAHEABP/aAAn/2gBF//AARv/wAEf/8ABJ//AAU//wAFf/7wBY/9wAW//cAJH/8ACV//AAl//vALb/8AC4/9wAw//wAMT/8ADG/+8A8v/wAP7/8AEV/9wBGf/wAR3/8AE1//ABR//wAUj/8AFS//ABZf/aAWb/2gFo/9oBaf/aAWr/2gIT//ACFP/wAhX/8AIW//ACF//wAiL/7wIj/+8CJP/vAiX/7wIm/9wCJ//cAi//8AIx//ACM//wAjX/8AI3//ACOf/wAjv/8AI9//ACP//wAkH/8AJD//ACRf/wAkf/8AJJ//ACh//vAon/7wKL/+8Cjf/vAo//7wKR/+8Clf/cAxD/8AMU/+8DGP/cAxv/7wMd/+8DNv/wAzr/8AM7/9wDPf/wA0T/3ANM/9wDTf/aA07/2gNS/9oDXP/wA2H/3ANi//ADZ//wA2n/3AN1//ADd//wA3j/8AOE//ADiv/cA4z/3AOO/9wDlf/wA7H/8AOz//ADtf/wA7f/8AO5//ADu//wA73/8AO///AD0//wA9X/8APX//AD2//wA93/7wPf/+8D4f/vA+P/7wPl/+8D5//vA+n/7wPr/9wD7f/cA+//3AA0AAT/oAAJ/6AAV//xAFj/xQBb/8UAl//xALj/xQDG//EBFf/FAWX/oAFm/6ABaP+gAWn/oAFq/6ACIv/xAiP/8QIk//ECJf/xAib/xQIn/8UCh//xAon/8QKL//ECjf/xAo//8QKR//EClf/FAxT/8QMY/8UDG//xAx3/8QM7/8UDRP/FA0z/xQNN/6ADTv+gA1L/oANh/8UDaf/FA4r/xQOM/8UDjv/FA93/8QPf//ED4f/xA+P/8QPl//ED5//xA+n/8QPr/8UD7f/FA+//xQA9AEX/5wBG/+cAR//nAEn/5wBT/+cAkf/nAJX/5wC2/+cAw//nAMT/5wDy/+cA/v/nARn/5wEd/+cBNf/nAUf/5wFI/+cBUv/nAhP/5wIU/+cCFf/nAhb/5wIX/+cCL//nAjH/5wIz/+cCNf/nAjf/5wI5/+cCO//nAj3/5wI//+cCQf/nAkP/5wJF/+cCR//nAkn/5wMQ/+cDNv/nAzr/5wM9/+cDXP/nA2L/5wNn/+cDdf/nA3f/5wN4/+cDhP/nA5X/5wOx/+cDs//nA7X/5wO3/+cDuf/nA7v/5wO9/+cDv//nA9P/5wPV/+cD1//nA9v/5wBxAAQADAAJAAwARf/oAEb/6ABH/+gASf/oAFH/6gBT/+gAWAALAFsACwCR/+gAlf/oALb/6AC4AAsAw//oAMT/6ADy/+gA/v/oARP/6gEVAAsBGf/oAR3/6AE1/+gBR//oAUj/6AFS/+gBZQAMAWYADAFoAAwBaQAMAWoADAIT/+gCFP/oAhX/6AIW/+gCF//oAh3/6gIe/+oCH//qAiD/6gIh/+oCJgALAicACwIv/+gCMf/oAjP/6AI1/+gCN//oAjn/6AI7/+gCPf/oAj//6AJB/+gCQ//oAkX/6AJH/+gCSf/oAmv/6gJt/+oCb//qApUACwMQ/+gDFv/qAxgACwMc/+oDNv/oAzj/6gM6/+gDOwALAz3/6ANEAAsDTAALA00ADANOAAwDUgAMA1z/6ANhAAsDYv/oA2f/6ANpAAsDdf/oA3f/6AN4/+gDgv/qA4T/6AOG/+oDigALA4wACwOOAAsDlf/oA7H/6AOz/+gDtf/oA7f/6AO5/+gDu//oA73/6AO//+gDxf/qA8f/6gPJ/+oDy//qA83/6gPP/+oD0f/qA9P/6APV/+gD1//oA9n/6gPb/+gD6wALA+0ACwPvAAsADABa/+0AXP/tAOn/7QKY/+0Cmv/tApz/7QM8/+0DbP/tA3r/7QOU/+0D+f/tBAH/7QAMAFr/8gBc//IA6f/yApj/8gKa//ICnP/yAzz/8gNs//IDev/yA5T/8gP5//IEAf/yAB8AWP/0AFr/8gBb//QAXP/zALj/9ADp//IBFf/0Aib/9AIn//QClf/0Apj/8wKa//MCnP/zAxj/9AM7//QDPP/yA0T/9ANM//QDYf/0A2n/9ANs//IDev/yA4r/9AOM//QDjv/0A5T/8gPr//QD7f/0A+//9AP5//IEAf/yAHkABP/KAAn/ygA2/9IAOP/UADr/9AA7/9MAT//RAFD/0QBS/9EAWP/mAFr/7wBb/+YAuP/mALz/0QDN/9IA0f/SANX/9ADZ/+0A3P/hAOf/0QDp/+8A6//RAOz/0QDu/9EA7//RAPD/0QDz/9EA9f/RAPb/0QD5/9EA+//RAQD/0QEU/9QBFf/mAS7/0gEx/9EBNv/SAUD/0QFF/9EBZf/KAWb/ygFo/8oBaf/KAWr/ygIL/9MCHP/RAib/5gIn/+YCZP/RAmb/0QJo/9ECaf/RAoD/0gKC/9IChP/SApT/0wKV/+YClv/TAv3/0wMM/9MDDf/0Aw//0wMS/9EDGP/mAyf/7QMz/9IDNP/0Azf/0QM5/9EDO//mAzz/7wM+/9EDQ//RA0T/5gNL/9MDTP/mA03/ygNO/8oDUv/KA1T/0QNd/9EDYP/UA2H/5gNo/9MDaf/mA2v/9ANs/+8Def/0A3r/7wN+/9EDgP/RA4n/7QOK/+YDi//tA4z/5gON/+0Djv/mA4//4QOS/9EDk//0A5T/7wPq/9MD6//mA+z/0wPt/+YD7v/TA+//5gPz/9ED9f/RA/b/0gP4//QD+f/vA/r/4QP8/+ED///RBAD/9AQB/+8EDP/RBA7/0QQQ/9EEE//TAB0ANv++AFj/7wBb/+8AuP/vAM3/vgDR/74BFf/vAS7/vgE2/74CJv/vAif/7wKA/74Cgv++AoT/vgKV/+8DGP/vAzP/vgM7/+8DRP/vA0z/7wNh/+8Daf/vA4r/7wOM/+8Djv/vA+v/7wPt/+8D7//vA/b/vgA0ADb/5gA4/+cAOv/yADv/5wBa//EAzf/mANH/5gDV//IA2f/uANz/6ADp//EBFP/nAS7/5gE2/+YCC//nAoD/5gKC/+YChP/mApT/5wKW/+cC/f/nAwz/5wMN//IDD//nAyf/7gMz/+YDNP/yAzz/8QNL/+cDYP/nA2j/5wNr//IDbP/xA3n/8gN6//EDif/uA4v/7gON/+4Dj//oA5P/8gOU//ED6v/nA+z/5wPu/+cD9v/mA/j/8gP5//ED+v/oA/z/6AQA//IEAf/xBBP/5wCEACMAEAAl/+gAKf/oADH/6AAz/+gANv/gADj/4AA7/98Agf/oAJD/6ACU/+gArQAQAK7/6ACvABAAzf/gAM7/6ADPABAA0f/gANgAEADc/+EA7QAQAPT/4AD/ABABA//oAQgAEAES/+gBFP/gARb/6AEY/+gBGv/oARz/6AEu/+ABNP/oATb/4AFNABABUf/oAfEAEAHyABAB8wAQAfQAEAH1ABAB9gAQAfcAEAH4/+gCAv/oAgP/6AIE/+gCBf/oAgb/6AIL/98CKAAQAioAEAIsABACLv/oAjD/6AIy/+gCNP/oAkL/6AJE/+gCRv/oAkj/6AJq/+gCbP/oAm7/6AKA/+ACgv/gAoT/4AKU/98Clv/fAp//6AL4ABAC/P/oAv3/3wMAABADCf/oAwz/3wMP/98DKAAQAy//6AMy/+gDM//gA0v/3wNVABADV//oA2D/4ANj/+gDZv/oA2j/3wNuABADcAAQA4H/6AOD/+gDhf/oA4//4QOQ/+ADlgAQA5cAEAOYABADmgAQA5wAEAOeABADoAAQA6IAEAOkABADpgAQA6gAEAOqABADrAAQA64AEAPE/+gDxv/oA8j/6APK/+gDzP/oA87/6APQ/+gD0v/oA9T/6APW/+gD2P/oA9r/6APq/98D7P/fA+7/3wP2/+AD+v/hA/v/4AP8/+ED/f/gBBEAEAQSABAEE//fAC0ANv/xADj/9AA6//QAO//wAM3/8QDP//UA0f/xANX/9ADY//UA2f/zART/9AEu//EBNv/xAU3/9QIL//ACgP/xAoL/8QKE//EClP/wApb/8AL9//ADDP/wAw3/9AMP//ADJ//zAzP/8QM0//QDS//wA2D/9ANo//ADa//0A3n/9AOJ//MDi//zA43/8wOT//QDlv/1A+r/8APs//AD7v/wA/b/8QP4//QEAP/0BBH/9QQT//AAWQAjAA8ANv/mADj/5gA6AA4AO//mAK0ADwCvAA8Azf/mAM8ADgDR/+YA1QAOANgADgDZAAsA3P/lAO0ADwD0/+gA/wAPAQgADwEU/+YBLv/mATb/5gFNAA4B8QAPAfIADwHzAA8B9AAPAfUADwH2AA8B9wAPAgv/5gIoAA8CKgAPAiwADwKA/+YCgv/mAoT/5gKU/+YClv/mAvgADwL9/+YDAAAPAwz/5gMNAA4DD//mAycACwMoAA8DM//mAzQADgNL/+YDVQAPA2D/5gNo/+YDawAOA24ADwNwAA8DeQAOA4kACwOLAAsDjQALA4//5QOQ/+gDkwAOA5YADgOXAA8DmAAPA5oADwOcAA8DngAPA6AADwOiAA8DpAAPA6YADwOoAA8DqgAPA6wADwOuAA8D6v/mA+z/5gPu/+YD9v/mA/gADgP6/+UD+//oA/z/5QP9/+gEAAAOBBEADgQSAA8EE//mAC4ANv/jADr/5QA7/+QAzf/jAM//5QDR/+MA1f/lANj/5QDZ/+kA7f/qAP//6gEu/+MBNv/jAU3/5QIL/+QCgP/jAoL/4wKE/+MClP/kApb/5AL9/+QDDP/kAw3/5QMP/+QDJ//pAzP/4wM0/+UDS//kA2j/5ANr/+UDef/lA4n/6QOL/+kDjf/pA5P/5QOW/+UDl//qA+r/5APs/+QD7v/kA/b/4wP4/+UEAP/lBBH/5QQS/+oEE//kACEANv/iADr/5ADN/+IAz//kANH/4gDV/+QA2P/kANn/6QDt/+sA///rAS7/4gE2/+IBTf/kAoD/4gKC/+IChP/iAw3/5AMn/+kDM//iAzT/5ANr/+QDef/kA4n/6QOL/+kDjf/pA5P/5AOW/+QDl//rA/b/4gP4/+QEAP/kBBH/5AQS/+sAFwA2/+sAO//zAM3/6wDR/+sBLv/rATb/6wIL//MCgP/rAoL/6wKE/+sClP/zApb/8wL9//MDDP/zAw//8wMz/+sDS//zA2j/8wPq//MD7P/zA+7/8wP2/+sEE//zADAAT//vAFD/7wBS/+8AWv/wALz/7wDn/+8A6f/wAOv/7wDs/+8A7v/vAO//7wDw/+8A8//vAPX/7wD2/+8A+f/vAPv/7wEA/+8BMf/vAUD/7wFF/+8CHP/vAmT/7wJm/+8CaP/vAmn/7wMS/+8DN//vAzn/7wM8//ADPv/vA0P/7wNU/+8DXf/vA2z/8AN6//ADfv/vA4D/7wOS/+8DlP/wA/P/7wP1/+8D+f/wA///7wQB//AEDP/vBA7/7wQQ/+8AHQAE//IACf/yAFj/9QBb//UAuP/1ARX/9QFl//IBZv/yAWj/8gFp//IBav/yAib/9QIn//UClf/1Axj/9QM7//UDRP/1A0z/9QNN//IDTv/yA1L/8gNh//UDaf/1A4r/9QOM//UDjv/1A+v/9QPt//UD7//1AAQA9P/tA5D/7QP7/+0D/f/tAAoABP/1AAn/9QFl//UBZv/1AWj/9QFp//UBav/1A03/9QNO//UDUv/1AFQARf/wAEb/8ABH//AASf/wAFH/6wBT//AAkf/wAJX/8AC2//AAw//wAMT/8ADy//AA/v/wARP/6wEZ//ABHf/wATX/8AFH//ABSP/wAVL/8AIT//ACFP/wAhX/8AIW//ACF//wAh3/6wIe/+sCH//rAiD/6wIh/+sCL//wAjH/8AIz//ACNf/wAjf/8AI5//ACO//wAj3/8AI///ACQf/wAkP/8AJF//ACR//wAkn/8AJr/+sCbf/rAm//6wMQ//ADFv/rAxz/6wM2//ADOP/rAzr/8AM9//ADXP/wA2L/8ANn//ADdf/wA3f/8AN4//ADgv/rA4T/8AOG/+sDlf/wA7H/8AOz//ADtf/wA7f/8AO5//ADu//wA73/8AO///ADxf/rA8f/6wPJ/+sDy//rA83/6wPP/+sD0f/rA9P/8APV//AD1//wA9n/6wPb//AAjwAEAA0ACQANAEP/8ABF/7AARv+wAEf/sABJ/7AAUf/WAFP/sABYAAsAWwALAJH/sACV/7AAtv+wALgACwDE/7AA7f+vAPL/sAD+/7AA//+vARP/1gEVAAsBGf+wAR3/sAE1/7ABR/+wAUj/sAFS/7ABZQANAWYADQFoAA0BaQANAWoADQIM//ACDf/wAg7/8AIP//ACEP/wAhH/8AIS//ACE/+wAhT/sAIV/7ACFv+wAhf/sAId/9YCHv/WAh//1gIg/9YCIf/WAiYACwInAAsCKf/wAiv/8AIt//ACL/+wAjH/sAIz/7ACNf+wAjf/sAI5/7ACO/+wAj3/sAI//7ACQf+wAkP/sAJF/7ACR/+wAkn/sAJr/9YCbf/WAm//1gKVAAsDEP+wAxb/1gMYAAsDHP/WAzX/8AM2/7ADOP/WAzr/sAM7AAsDPf+wA0QACwNMAAsDTQANA04ADQNSAA0DVv/wA1z/sANhAAsDYv+wA2f/sANpAAsDb//wA3H/8AN1/7ADd/+wA3j/sAOC/9YDhP+wA4b/1gOKAAsDjAALA44ACwOV/7ADl/+vA5n/8AOb//ADnf/wA5//8AOh//ADo//wA6X/8AOn//ADqf/wA6v/8AOt//ADr//wA7H/sAOz/7ADtf+wA7f/sAO5/7ADu/+wA73/sAO//7ADxf/WA8f/1gPJ/9YDy//WA83/1gPP/9YD0f/WA9P/sAPV/7AD1/+wA9n/1gPb/7AD6wALA+0ACwPvAAsEEv+vAAgA7QAQAPT/8AD/ABADkP/wA5cAEAP7//AD/f/wBBIAEABFAEUADABGAAwARwAMAEkADABTAAwAkQAMAJUADAC2AAwAwwAMAMQADADtABgA8gAMAPT/9wD+AAwA/wAYARkADAEdAAwBNQAMAUcADAFIAAwBUgAMAhMADAIUAAwCFQAMAhYADAIXAAwCLwAMAjEADAIzAAwCNQAMAjcADAI5AAwCOwAMAj0ADAI/AAwCQQAMAkMADAJFAAwCRwAMAkkADAMQAAwDNgAMAzoADAM9AAwDXAAMA2IADANnAAwDdQAMA3cADAN4AAwDhAAMA5D/9wOVAAwDlwAYA7EADAOzAAwDtQAMA7cADAO5AAwDuwAMA70ADAO/AAwD0wAMA9UADAPXAAwD2wAMA/v/9wP9//cEEgAYAB8AWP/0AFr/8ABb//QAuP/0AOn/8ADt//MA///zARX/9AIm//QCJ//0ApX/9AMY//QDO//0Azz/8ANE//QDTP/0A2H/9ANp//QDbP/wA3r/8AOK//QDjP/0A47/9AOU//ADl//zA+v/9APt//QD7//0A/n/8AQB//AEEv/zAAoABP/WAAn/1gFl/9YBZv/WAWj/1gFp/9YBav/WA03/1gNO/9YDUv/WAAoABP/1AAn/9QFl//UBZv/1AWj/9QFp//UBav/1A03/9QNO//UDUv/1AF4ABAALAAkACwBF/+sARv/rAEf/6wBJ/+sAUf/pAFP/6wCR/+sAlf/rALb/6wDD/+sAxP/rAPL/6wD+/+sBE//pARn/6wEd/+sBNf/rAUf/6wFI/+sBUv/rAWUACwFmAAsBaAALAWkACwFqAAsCE//rAhT/6wIV/+sCFv/rAhf/6wId/+kCHv/pAh//6QIg/+kCIf/pAi//6wIx/+sCM//rAjX/6wI3/+sCOf/rAjv/6wI9/+sCP//rAkH/6wJD/+sCRf/rAkf/6wJJ/+sCa//pAm3/6QJv/+kDEP/rAxb/6QMc/+kDNv/rAzj/6QM6/+sDPf/r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ATEDUgNXATUDWgNaATsDXANcATwDYANhAT0DZgNmAT8DaANxAUADdAN1AUoDdwN6AUwDgQOCAVADhgOGAVIDiAOOAVMDkwOUAVoDmAPAAVwDwgPCAYUDxAPRAYYD2QPZAZQD3APcAZUD3gPeAZYD6gPvAZcD8gPyAZ0D9AP0AZ4D9gP2AZ8D+AP5AaAD/gQBAaIEBAQEAaYEBgQHAacECQQJAakEDQQNAaoEDwQPAasEEwQTAawAAQAKAAoAKAAzADQAPQBIAE0AVgBZAF0AAQAiAJkAsACyALMAtAC7AL4AvwDAAMUAxwDIAMkAzQDRANMA1ADWAN4A4gDjAOQA5QDmAOgA6gDsAPEA8wD2APsA/gEdAdwAAgB2AAQABAAAAAkACQABAA4ADgACABAAEAADACMAJwAEACoAMgAJADYAPAASAEMARQAZAEcARwAcAEoASgAdAE8AUgAeAFQAVAAiAFgAWAAjAFoAXAAkAIgAiAAnAKwArwAoALgAuAAsALwAvAAtAMIAwgAuAM8A0AAvANIA0gAxANUA1QAyANcA2QAzANsA2wA2AN0A3QA3AN8A3wA4AOEA4QA5AOcA5wA6AOkA6QA7APIA8gA8APcA9wA9APkA+gA+AP8BAABAAQUBBQBCAQgBCABDARMBFQBEAScBKQBHASwBLABKAS4BLgBLAUUBRQBMAWUBawBNAW8BcABUAewB7QBWAe8B7wBYAfECFwBZAhwCIQCAAiYCNgCGAjgCQQCXAkoCTAChAk4CTgCkAlACUAClAlICUgCmAlQCVACnAlcCVwCoAlkCWQCpAlsCWwCqAl0CXQCrAl8CXwCsAmECYQCtAmMCbwCuAnECcQC7AnMCcwC8AnUCdQC9AoACgAC+AoICggC/AoQChADAAoYChgDBAogCiADCAooCigDDAowCjADEAo4CjgDFApACkADGApICkgDHApQCnADIAvgC/QDRAwADDwDXAxIDEgDnAxYDFgDoAxgDGADpAxwDHADqAx8DIADrAyIDKwDtAy0DLwD3AzEDNgD6AzgDPgEAA0QDRQEHA0cDRwEJA0kDSQEKA0sDTgELA1IDVwEPA1oDWgEVA1wDXAEWA2ADYQEXA2YDcQEZA3QDdQElA3cDegEnA4EDggErA4YDhgEtA4gDjgEuA5MDlAE1A5gDwAE3A8IDwgFgA8QD0QFh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ABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABcAAAAAAAAAAAAAABEAEQARABEAEQARABEABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABgAGAAYABgAOABoAGgAaABoAGgAaABoAFQAVABUAFQAVAAAAAAAAAAAAGAAIAAgACAAIAAgACwALAAsACwACAAIAEQAaABEAGgARABoABQAVAAUAFQAFABUABQAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAUAFQAFABUABQAVAAUAFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGAAAABgAAAAYABgABQAIAAUACAAFAAgAAAAAAAAAAAAAAAAAGQAbABkAGwAZABsAGQAbABkAGwAKAAAACgAAAAoAAAAGAAsABgALAAYACwAGAAsABgALAAYACwAJAAAADgACAA4AFAAMABQADAAUAAwAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAUADgAAAAAAEQAAAAAAFAAAAAAAAAAAAAAABQAAAAAADgASAAAADgAVAAAAGAAAAAsAAAAIAAAAAgAAAAAACwAIAAsAAAAAAAAAAAAAAAAAHAAAAAAAEAARAAAAAAAAAAAAAAAAAAUAAAAAAAUACgASABoAFQAYAAgAGAAVAAIAFgAVABgAGwAAAAAAAAAYAAIACQAAAAkAAAAJAAAADgACAAcABwAAAAAAAAAHAAAAGAARABoABQAAAAAAAAAAABUAGAAAAAAADQACABUABQAAAAAABQAVAA4AAgAAABIAFgAAABEAGgARABoAAAAAAAAAFQAAABUAFQASABYAAAAAAAAAGAAAABgABQAIAAUAFQAFAAgAAAAAABAAAgAQAAIAEAACAA8AAwAAABgAEgAWABUAAQAEABEAGgARABoAEQAaABEAGgARABoAEQAaABEAGgARABoAEQAaABEAGgARABoAEQAaAAAAFQAAABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUAAAAAAAAAAAAFAAgABQAIAAUACAAFAAgABQAIAAUACAAFAAgABQAVAAUAFQAFABUABQAIAAUAFQAGAAsABgALAAAACwAAAAsAAAALAAAACwAAAAsADgACAA4AAgAOAAIAAAAAAAAAGAAAABgACgAAABIAFgAPAAMADwADAAAAGAASABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAGAAAABgAAQAEAA4AAAAAAAAAAAAAABcAAQAAAAoALACOAAFERkxUAAgABAAAAAD//wAIAAAAAQACAAMABAAFAAYABwAIbGlnYQAybG51bQA4c21jcAA+c3MwMQBEc3MwMgBKc3MwMwBQc3MwNABWc3MwNQBcAAAAAQABAAAAAQACAAAAAQAAAAAAAQADAAAAAQAEAAAAAQAFAAAAAQAGAAAAAQAHAAgAEgAaACIAKgAyADoAQgBKAAEAAAABAEAABAAAAAEB9gABAAAAAQIAAAEAAAABAhIAAQAAAAECEAABAAAAAQIOAAEAAAABAgwAAQAAAAECDgACAhAA3AGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAHoAbUBtgG3AbgBuQG6AbsBvAG9Ab4BpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQB6AG1AbYBtwG4AbkBugG7AbwBvQG+AvcCogKhAqICowKjAqQCpQKmAqcCqAKpAqoCqwKsAq0CrgKvArACsQKyArMCtAK1ArYCtwK4ArkCugK7ArwCvQK+AqQCpQKmAqcCqAKpAqoCqwKsAq0CrgKvArACsQKyArMCtAK1ArYCtwK4ArkCugK7ArwCvQK+AvMCvwK/AsACwALBAsECwgLCAsMCwwLFAsUCxgLGAscCxwLIAsgCyQLJAsoCygLLAssCzALMAs0CzQLPAs8C0ALQAtEC0QLSAtIC0wLTAtQC1ALVAtYC1gLXAtcC2ALYAtkC2QLaAtoC2wLbAtwC3ALdAt0C3gLeAt8C3wLgAuAC4QLhAuIC4gLjAuMC5ALkAuUC5QLmAuYC5wLnAugC6P////8C6gLqAusC6wLsAuwC7QLtAu4C7gLvAu8C8ALwAvEC8QLyAvIC8wL0AvQC9QL1AvYC9gKhAAEApAABAAgAAQAEAZIAAgBLAAIAmAAKAZgBzAHEAdYB1wHYAdkB2wHdAecAAQCIAZEAAQCIASgAAQCIAa4AAgCIAAIB4wHkAAIAfgACAeUB5gACAA0AIwA8AAAAQwBcABoAgwCDADQAhQCFADUB7AHtADYB7wIxADgCNAJFAHsCSAJUAI0CVwJoAJoCagJ7AKwCfgJ/AL4CggKcAMAD8APwANsAAQABAEgAAgABABIAGwAAAAEAAQBJAAEAAQC2AAEAAQA0AAEAAgAtAE0=","Roboto-Medium.ttf":"AAEAAAAOAIAAAwBgR0RFRgsuCy8AASxgAAAASEdQT1OQeyOPAAEsqAAAl/pHU1VCeolvLwABxKQAAANsT1MvMrkTKcoAAAFoAAAAYFZETVhu6nZPAAASOAAABeBjbWFwf76BZgAAGBgAAA7iZ2x5Zm8zqQ4AACb8AADUQGhlYWT1Pw7VAAAA7AAAADZoaGVhCx4JIwAAASQAAAAkaG10eLpNNCcAAAHIAAAQcGxvY2EEms7QAAD7PAAACDptYXhwBDsA9gAAAUgAAAAgbmFtZb10XwMAAQN4AAAEn3Bvc3Tfb5xiAAEIGAAAJEYAAQAAAAEAAF5SMstfDzz1AAkIAAAAAADE8BEuAAAAAM2CsnL6JP3VCYsIYgAAAAkAAgAAAAAAAAABAAAHbP4MAAAJnfok/V0JiwABAAAAAAAAAAAAAAAAAAAEHAABAAAEHACXABYAXQAFAAEAAAAAAAAAAAAAAAAAAwABAAME3gH0AAUAAAWaBTMAAAEfBZoFMwAAA9EAZgIAAAAAAAAAAAAAAAAA4AAC/1AAIFsAAAAgAAAAAHB5cnMAAAAA//0GAP4AAGYHmgIAIAABn08BAAAEOgWwAAAAIAACAf4AAAAAAAAB/gAAAf4AAAKYAFIE4gA8BIwAZAXgAGQFHQA+AVoAUgK3AIACvAARA38AGwR1AEQBwgAnAqAARwI8AJkDKgACBIwAaASMAMoEjABRBIwATwSMADgEjACBBIwAdASMAEUEjABhBIwAUgIlAJkCIABRBBEAPwSOAJEEKgCAA+QAKQchAEoFQgAaBSAAnwUgAHQFYgCfBKMAnwShAJ8FbQB0BbAAnwJNAK0EfAA6BSgAnwRkAJ8HAgCfBbAAnwWPAHQFKwCfBZAAdAVFAJ8E8wBTBOoANQV0AIYFKwAaBwIARAUUAC8FAwATBMAAWAIxAIQDVwAVAjEADANrADUDnAADApQASgRaAF4EiACABDMAUQSIAFMEPABZAs8AMQSIAFQEiAB9AhMAkAIZ/7AEMACBAhMAkAb1AIAEiAB+BIgAUwSIAIAEiABTAtoAgAQpAFECnQAZBIgAewQOACAF+gAlBA4AIQQOABAEDgBVAq8AOAICAK4CrwAbBVEAdQIeAI8EfQBoBLUAUQWdAF0E4AAaAfwAiAT4AFoEHgCkBkQAVwORAHQD4gBUBG0AfwZEAFcD2wCHAwoAfwRLAF8DYQBtA2MAYQKxAHgEuwCSBBAAPgJCAKACEABtAjUAZAOnAHcD4gBcBgwAmwZmAJMG0wBmBAEAYAeF//YERABNBXoAaQTKAJQE5wCIBsEANAS6ADwEkQBDBIkAUwSXAIcFogAYAhoAjwSYAI4EJAAbAj8AGwWSAJMEiAB+B7QAZQc6AFsCDACLAtD/3QWJAGYEnwBSBaUAhgTyAHsCJv+1BDwAWQPmAJsDsAB5A3wAdQJPAJoCsgCCAk0AKQPYAIADLwB6ApwAqwAA/NsAAP02AAD8eQAA/T4AAPwMAAD9IgJdANcEPACdAkIAoAR1AJ8FvQAaBXsAZgU5ACMEkQBwBbEAnwSRAEcF6wBLBacASAVbAGwEhABWBMYAlgQOACAEiABUBGAAYAQaAGEEiAB+BKIAcwKmAKkEagAWBBMAZAT3AE8EiACABDcAUgSQAFIELgBABGAAgAXQAEQFyQBPBpQAZgUuAHUEdf/uBnEAMwX/ACQFPgByCIoALgiRAJ8GXwA1BasAmQUIAJQGBwAmB5oAGATTAEoFqgCaBakALgUKAD8GYABPBfYAmQWIAI8HmgCeB/oAngYaABgG+QCfBQcAlAU8AIgHVACqBPsALQR9AFsEjwCPA1oAhQT2ACcGdgAXBBYATQSYAIYEbgCPBJoAHwYDAI8ElwCGBJgAhgP1ACMF0wBUBNMAhgRmAF8GjgCGBuwAfgUYAB8GbwCPBGgAjwQ8AFEGhACQBHAAJwSJ/+EEPQBYBtEAHwbkAIYEif/1BJgAhgdDAI0GTwBwBGf/4AcpAKIGAQCGBQcAIARgAAoHQgC2BjYAnQbtAIQF5gCCCTIArQf5AI8EIQApA/AAMwV7AGoEiQBSBRkAEQQOACAFewBqBIkAUwc+AI0GRAB0B0MAjQZQAHAFHQBqBEoAXAT/AG0AAPxmAAD8cwAA/XsAAP2lAAD6JP7p+k0EZ//gBRQAnwSHAIAEagCUA6IAfgS3AJ8EIAB+BSoAlASrAI4GlgA0BaQAPgfRAJ8FqwB+CEcAnwb1AH4GJQBpBP8AYQcyAC4FcQAmBXUAggRzAHQFhwCKBiYAIATE/84FHwCUBHgAjgWwAJ8EiAB+BYgAUwSmAF0EpgBdBMcAOwNTADQFBwBUBusAZgbdAF4GUwA7BSgALwR7AEkEPwB1B74AQwadAD8H/gCYBp4AdwUDAGIELABVBaoAIgUdAEQFVwCHBBQAAAgpAAAEFAAACCkAAAK5AAACCgAAAVwAAAR/AAACMAAAAaIAAADRAAAAAAAABYcArQaBALIDnQAEAcAAYAG8ADMBzgAyAagARwMUAGIDGwBAAwgAMgRdAEAEmQBcAssAiAP6AJwFpgCcB6gASwJyAGwCaQBUA5wALQOpAD8DXABpBLUATwa4AJkETQBLBeUAcQPiAEUIyACYBQkAZAUUAJYGyQBpB2EAageRAGoG7wBqBLsAQwWWAKYE2QBABIMAngSyADsIRQBkAiH/sgSOAGUETACYBEYAqgRLAKAEGgAkAlsAswKYAGMB8QBFBKgAGAAAAAAIMABZCDUAXAQyAE0DiwBNBJMAbAMn/58CEP+wAk0AGAGzAFwDoQB1A6EAdQOhAHUECwB5BAsAdQQL/0wECwB6A6EAWwIFAJAEyAAcBIwAjgSUAGgErwCOBEcAjgQqAI4E2wBoBRIAjgIVAI4EFwAuBHcAjgO9AI4GBgCOBSEAjgTKAGYE3QBoBKgAjgRwAE8EMgA8BQAAfgSxABwGDgA0BIwALARVABMETQBKBIYAbQKFAD4D/wBSBCIATQRlADkEfABRBD0AbQOvADwEQwBSBCoAPwIzAFcDVQBrA2YAYAL9ADgDdgBoA3YAcAMAAFIDgwBoA2YAYAOfAHADuQCXArIAlgNCAGwEjABPBIwAOASMAIEEmAB0BDsACgQ0ADIEYgA+BIwAYQS7AFYEiABTBUkAnwRaAGAFMgCfBSgAnwQwAIEFOgCfBC0AgQSNAFIEjACOA3wAdQH+AAACoABHBYAAJAWAACQEpv/9BOoANQKd/+cFQgAaBUIAGgVCABoFQgAaBUIAGgVCABoFQgAaBSAAdASjAJ8EowCfBKMAnwSjAJ8CTf/MAk0ArQJN/9gCTf+9BbAAnwWPAHQFjwB0BY8AdAWPAHQFjwB0BXQAhgV0AIYFdACGBXQAhgUDABMEWgBeBFoAXgRaAF4EWgBeBFoAXgRaAF4EWgBeBDMAUQQ8AFkEPABZBDwAWQQ8AFkCGv+vAhoAjwIa/7sCGv+gBIgAfgSIAFMEiABTBIgAUwSIAFMEiABTBIgAewSIAHsEiAB7BIgAewQOABAEDgAQBUIAGgRaAF4FQgAaBFoAXgVCABoEWgBeBSAAdAQzAFEFIAB0BDMAUQUgAHQEMwBRBSAAdAQzAFEFYgCfBR4AUwSjAJ8EPABZBKMAnwQ8AFkEowCfBDwAWQSjAJ8EPABZBKMAnwQ8AFkFbQB0BIgAVAVtAHQEiABUBW0AdASIAFQFbQB0BIgAVAWwAJ8EiAB9Ak3/vwIa/6ICTf+/Ahr/ogJN/+UCGv/IAk0AHAIT//4CTQCjBskArQQsAJAEfAA6Aib/tQUoAJ8EMACBBGQAnwITAJAEZACfAhMAWARkAJ8CqQCQBGQAnwLvAJAFsACfBIgAfgWwAJ8EiAB+BbAAnwSIAH4EiP/VBY8AdASIAFMFjwB0BIgAUwWPAHQEiABTBUUAnwLaAIAFRQCfAtoAVgVFAJ8C2gBDBPMAUwQpAFEE8wBTBCkAUQTzAFMEKQBRBPMAUwQpAFEE8wBTBCkAUQTqADUCnQAZBOoANQKdABkE6gA1AsUAGQV0AIYEiAB7BXQAhgSIAHsFdACGBIgAewV0AIYEiAB7BXQAhgSIAHsFdACGBIgAewcCAEQF+gAlBQMAEwQOABAFAwATBMAAWAQOAFUEwABYBA4AVQTAAFgEDgBVB4X/9gbBADQFegBpBIkAUwSv/+oEr//qBDIAPATIABwEyAAcBMgAHATIABwEyAAcBMgAHATIABwElABoBEcAjgRHAI4ERwCOBEcAjgIV/6wCFQCOAhX/uAIV/50FIQCOBMoAZgTKAGYEygBmBMoAZgTKAGYFAAB+BQAAfgUAAH4FAAB+BFUAEwTIABwEyAAcBMgAHASUAGgElABoBJQAaASUAGgErwCOBEcAjgRHAI4ERwCOBEcAjgRHAI4E2wBoBNsAaATbAGgE2wBoBRIAjgIV/58CFf+fAhX/xQIV//kCFQCEBBcALgR3AI4DvQCOA70AjgO9AI4DvQCOBSEAjgUhAI4FIQCOBMoAZgTKAGYEygBmBKgAjgSoAI4EqACOBHAATwRwAE8EcABPBHAATwQyADwEMgA8BQAAfgUAAH4FAAB+BQAAfgUAAH4FAAB+Bg4ANARVABMEVQATBE0ASgRNAEoETQBKCOAATwVCABoFB/+vBhT/3AKx/+MFowAqBWf/ZwVvABMCpv+wBUIAGgUgAJ8EowCfBMAAWAWwAJ8CTQCtBSgAnwcCAJ8FsACfBY8AdAUrAJ8E6gA1BQMAEwUUAC8CTf+9BQMAEwSEAFYEYABgBIgAfgKmAKkEYACABJgAjgSIAFMEuwCSBA4AIAQOACECpv/EBGAAgASIAFMEYACABpQAZgSjAJ8EdQCfBPMAUwJNAK0CTf+9BHwAOgUoAJ8FKACfBQoAPwVCABoFIACfBHUAnwSjAJ8FqgCaBwIAnwWwAJ8FjwB0BbEAnwUrAJ8FIAB0BOoANQUUAC8EWgBeBDwAWQSYAIYEiABTBIgAgAQzAFEEDgAQBA4AIQQ8AFkDWgCFBCkAUQITAJACGv+gAhn/sARuAI8EDgAQBwIARAX6ACUHAgBEBfoAJQcCAEQF+gAlBQMAEwQOABABWgBSApgAUgRKAJoE4gAxAib/tQG8ADMHAgCfBvUAgAVCABoEWgBeBY//PQd3ADEHsQAxBKMAnwWqAJoEPABZBJgAhgWnAEgFyQBPBRkAEQQO/+MIlgBTCZ0AdATTAEoEFgBNBSAAdAQzAFEFAwATBA4AIAJNAK0HmgAYBnYAFwJNAK0FQgAaBFoAXgVCABoEWgBeB4X/9gbBADQEowCfBDwAWQWIAFMEPABZBDwAWQeaABgGdgAXBNMASgQWAE0FqgCaBJgAhgWqAJoEmACGBY8AdASIAFMFewBqBIkAUgV7AGoEiQBSBTwAiAQ8AFEFCgA/BA4AEAUKAD8EDgAQBQoAPwQOABAFiACPBGYAXwb5AJ8GbwCPBRQALwQOACEEiABTBakALgSaAB8FQgAaBFoAXgVCABoEWgBeBUIAGgRaAF4FQgAEBFr/iQVCABoEWgBeBUIAGgRaAF4FQgAaBFoAXgVCABoEWgBeBUIAGgRaAF4FQgAaBFoAXgVCABoEWgBeBUIAGgRaAF4EowCfBDwAWQSjAJ8EPABZBKMAnwQ8AFkEowCfBDwAWQSj/8wEPP+LBKMAnwQ8AFkEowCfBDwAWQSjAJ8EPABZAk0ArQIaAI8CTQCfAhMAggWPAHQEiABTBY8AdASIAFMFjwB0BIgAUwWPACsEiP+mBY8AdASIAFMFjwB0BIgAUwWPAHQEiABTBYkAZgSfAFIFiQBmBJ8AUgWJAGYEnwBSBYkAZgSfAFIFiQBmBJ8AUgV0AIYEiAB7BXQAhgSIAHsFpQCGBPIAewWlAIYE8gB7BaUAhgTyAHsFpQCGBPIAewWlAIYE8gB7BQMAEwQOABAFAwATBA4AEAUDABMEDgAQBKYAUwSmAFMFKACf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w83m/k4AAAAAAf/9AAAEKgYYABwAAAEjERc+ATMyFhURIxE0JiMiBgcRIxEjNTM1MxUzAoz+AzWXYLC982RoSW4m856e8/4Ex/7sAUtR1Of9bQKVgnA6NfzoBMeqp6cAAAEANQAABLUFsAAPAAABIxEjESM1MxEhNSEVIREzA73P883N/joEgP45zwMS/O4DEqoBMcPD/s8AAf/n/+wCdgVBAB8AAAERMxUjFTMVIxEUFjMyNjcXDgEjIiY1ESM1MzUjNTMRAaHDw9XVMSsZLBQaIV4xg4/Hx5WVBUH++bSlqv75RTYHBrIQFJmrAQeqpbQBB///ABoAAAUoByICJgAjAAAABwBCAPwBXP//ABoAAAUoByECJgAjAAAABwBzAbMBW///ABoAAAUoB0cCJgAjAAAABwCaALcBWf//ABoAAAUoB2MCJgAjAAAABwCgALkBbP//ABoAAAUoBw0CJgAjAAAABwBoAJMBXf//ABoAAAUoB48CJgAjAAAABwCeAUwBs///ABoAAAUoB70CJgAjAAAABwHUAVIBKP//AHT+PATYBcUCJgAlAAAABwB3Acb/+///AJ8AAAR1ByICJgAnAAAABwBCAMQBXP//AJ8AAAR1ByECJgAnAAAABwBzAXsBW///AJ8AAAR1B0cCJgAnAAAABwCaAH8BWf//AJ8AAAR1Bw0CJgAnAAAABwBoAFsBXf///8wAAAGgByICJgArAAAABwBC/4IBXP//AK0AAAKEByECJgArAAAABwBzADgBW////9gAAAJ5B0cCJgArAAAABwCa/z0BWf///70AAAKSBw0CJgArAAAABwBo/xkBXf//AJ8AAAUQB2MCJgAwAAAABwCgAO4BbP//AHT/6wUbBzcCJgAxAAAABwBCASMBcf//AHT/6wUbBzYCJgAxAAAABwBzAdoBcP//AHT/6wUbB1wCJgAxAAAABwCaAN4Bbv//AHT/6wUbB3gCJgAxAAAABwCgAOABgf//AHT/6wUbByICJgAxAAAABwBoALoBcv//AIb/6wTxByICJgA3AAAABwBCARcBXP//AIb/6wTxByECJgA3AAAABwBzAc4BW///AIb/6wTxB0cCJgA3AAAABwCaANIBWf//AIb/6wTxBw0CJgA3AAAABwBoAK4BXf//ABMAAATvByECJgA7AAAABwBzAZYBW///AF7/7AQB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AAcAnADtAcH//wBU/kwECAYaAiYASQAAAAYAnHlqAAD//wB0/+sE4gc2AiYAKQAAAAcAnQGHAYD//wBU/kwECAXfAiYASQAAAAcAnQETACn//wB0/eIE4gXFAiYAKQAAAAcBkQG2/qv//wBU/kwECAaKAiYASQAAAAcBpQEtAH7//wCfAAAFEAdHAiYAKgAAAAcAmgDoAVn//wB9AAAEDAdiAiYASgAAAAcAmgAbAXT///+/AAACkAdjAiYAKwAAAAcAoP8/AWz///+iAAACcwYMAiYAigAAAAcAoP8iABX///+/AAAClgb2AiYAKwAAAAcAbv84AUb///+iAAACeQWgAiYAigAAAAcAbv8b//D////lAAACawdcAiYAKwAAAAcAnP9wAaz////IAAACTgYFAiYAigAAAAcAnP9TAFX//wAc/lwBoAWwAiYAKwAAAAYAn/MKAAD////+/lIBgwYYAiYASwAAAAYAn9UAAAD//wCjAAABpgchAiYAKwAAAAcAnQAJAWv//wCt/+sGMwWwACYAKwAAAAcALAJNAAD//wCQ/ksDoQYYACYASwAAAAcATAITAAD//wA6/+sEsgc/AiYALAAAAAcAmgF2AVH///+1/ksCZAXjAiYAmAAAAAcAmv8o//X//wCf/fAFLwWwAiYALQAAAAcBkQGK/rn//wCB/fIENQYYAiYATQAAAAcBkQEv/rv//wCfAAAELwb4AiYALgAAAAcAcwAqATL//wCQAAACZwdfAiYATgAAAAcAcwAbAZn//wCf/fIELwWwAiYALgAAAAcBkQF1/rv//wBY/fIBgwYYAiYATgAAAAcBkQAT/rv//wCfAAAELwWyAiYALgAAAAcBkQIEBKz//wCQAAAC6AYYACYATgAAAAcBkQGOBRL//wCfAAAELwWwAiYALgAAAAcAnQG7/dT//wCQAAAC9wYYACYATgAAAAcAnQFa/a///wCfAAAFEAchAiYAMAAAAAcAcwHoAVv//wB+AAAECwXfAiYAUAAAAAcAcwFTABn//wCf/fIFEAWwAiYAMAAAAAcBkQHg/rv//wB+/fIECwROAiYAUAAAAAcBkQFL/rv//wCfAAAFEAdOAiYAMAAAAAcAmwEDAV3//wB+AAAECwYMAiYAUAAAAAYAm24bAAD////VAAAECwYYAiYAUAAAAAcBkf+QBRL//wB0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aAB0AHQAcAA6AC8ALwB3AHcAdwAuAGEAcABhAGMAaABlAC4AbwByAGcALwBsAGkAYwBlAG4AcwBlAHMALwBMAEkAQwBFAE4AUwBFAC0AMgAuADAAUgBvAGIAbwB0AG8ATQBlAGQAaQB1AG0AAAIAAAAAAAD/agBkAAAAAAAAAAAAAAAAAAAAAAAAAAAEHAAAAQIAAgADAAUABgAHAAgACQAKAAsADAANAA4ADwAQABEAEgATABQAFQAWABcAGAAZABoAGwAcAB0AHgAfACAAIQAiACMAJAAlACYAJwAoACkAKgArACwALQAuAC8AMAAxADIAMwA0ADUANgA3ADgAOQA6ADsAPAA9AD4APwBAAEEAQgBDAEQARQBGAEcASABJAEoASwBMAE0ATgBPAFAAUQBSAFMAVABVAFYAVwBYAFkAWgBbAFwAXQBeAF8AYABhAKMAhACFAL0AlgDoAIYAjgCLAJ0AqQCkAIoBAwCDAJMA8gDzAI0AlwCIAQQA3gDxAJ4AqgD1APQA9gCiAJAA8ACRAO0AiQCgAOoAuAChAO4BBQDXAQYA4gDjAQcBCACwALEBCQCmAQoBCwEMAQ0BDgEPANgA4QDbANwA3QDgANkA3wEQAREBEgETARQBFQEWARcBGAEZARoBGwEcAR0BHgEfASABIQEiAJ8BIwEkASUBJgEnASgBKQEqASsBLAEtAJsBLgEvATABMQEyATMBNAE1ATYBNwE4ATkBOgE7ATwBPQE+AT8BQAFBAUIBQwFEAUUBRgFHAUgBSQFKAUsBTAFNAU4BTwFQAVEBUgFTAVQBVQFWAVcBWAFZAVoBWwFcAV0BXgFfAWABYQFiAWMBZAFlAWYBZwFoAWkBagFrAWwBbQFuAW8BcAFxAXIBcwF0AXUBdgF3AXgBeQF6AXsBfAF9AX4BfwGAAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQCyALMBzgC2ALcAxAHPALQAtQDFAIIAwgCHAdAAqwDGAL4AvwC8AdEB0gHTAdQB1QHWAdcB2ACMAdkB2gHbAdwB3QCYAJoAmQDvAKUAkgCcAKcAjwCUAJUAuQHeAd8B4ADAAeEB4gHjAeQB5QHmAecB6AHpAeoB6wHsAe0B7gHvAfAB8QHyAfMB9AH1AfYB9wH4AfkB+gH7AfwB/QH+Af8CAAIBAgICAwIEAgUCBgIHAggCCQIKAgsCDAINAg4CDwIQAhECEgITAhQCFQIWAhcCGAIZAhoCGwIcAh0CHgIfAiACIQIiAiMCJAIlAiYCJwIoAikCKgIrAiwCLQIuAi8CMAIxAjICMwI0AjUCNgI3AKwCOAI5AOkCOgI7AjwArQDJAMcArgBiAGMCPQBkAMsAZQDIAMoAzwDMAM0AzgBmANMA0ADRAK8AZwDWANQA1QBoAOsAagBpAGsAbQBsAG4CPgBvAHEAcAByAHMAdQB0AHYAdwB4AHoAeQB7AH0AfAB/AH4AgACBAOwAugI/AkACQQJCAkMCRAD9AP4CRQJGAkcCSAD/AQACSQJKAksCTAJNAk4CTwJQAlECUgJTAlQCVQJWAPgA+QJXAlgCWQJaAlsCXAJdAl4CXwJgAmECYgJjAmQCZQJmAmcCaAJpAmoCawJsAm0CbgJvAnACcQJyAnMCdAJ1AnYCdwJ4AnkCegJ7AnwCfQJ+An8CgAKBAoICgwKEAoUChgKHAogCiQKKAPsA/AKLAowA5ADlAo0CjgKPApACkQKSApMClAKVApYClwKYApkCmgKbApwCnQKeAp8CoAKhAqIAuwKjAqQCpQKmAOYA5wKnAqgCqQKqAqsCrAKtAq4CrwKwArECsgKzArQCtQK2ArcCuAK5AroCuwK8Ar0CvgK/AsACwQLCAsMCxALFAsYCxwLIAskCygLLAswCzQLOAs8C0ALRAtIC0wLUAtUC1gLXAtgC2QLaAtsC3ALdAt4C3wLgAuEC4gLjAuQC5QLmAucC6ALpAuoC6wLsAu0C7gLvAvAC8QLyAvMC9AL1AvYC9wL4AvkC+gL7AvwC/QL+Av8DAAMBAwIDAwMEAwUDBgMHAwgDCQMKAwsDDAMNAw4DDwMQAxEDEgMTAxQDFQMWAxcDGAMZAxoDGwMcAx0DHgMfAyADIQMiAyMDJAMlAyYDJwMoAykDKgMrAywDLQMuAy8DMAMxAzIDMwM0AzUDNgM3AzgDOQM6AzsDPAM9Az4DPwNAA0EDQgNDA0QDRQNGA0cDSANJA0oDSwNMA00DTgNPA1ADUQNSA1MDVANVA1YDVwNYA1kDWgNbA1wDXQNeA18DYANhA2IDYwNkA2UDZgNnA2gDaQNqA2sDbANtA24DbwNwA3EDcgNzA3QDdQN2A3cDeAN5A3oDewN8A30DfgN/A4ADgQOCA4MDhAOFA4YDhwOIA4kDigOLA4wDjQOOA48DkAORA5IDkwOUA5UDlgOXA5gDmQOaA5sDnAOdA54DnwOgA6EDogOjA6QDpQOmA6cDqAOpA6oDqwOsA60DrgOvA7ADsQOyA7MDtAO1A7YDtwO4A7kDugO7A7wDvQO+A78DwAPBA8IDwwPEA8UDxgPHA8gDyQPKA8sDzAPNA84DzwPQA9ED0gPTA9QD1QPWA9cD2APZA9oD2wPcA90D3gPfA+AD4QPiA+MD5APlA+YD5wPoA+kD6gPrA+wD7QPuA+8D8APxA/ID8wP0A/UD9gP3A/gD+QP6A/sD/AP9A/4D/wQABAEEAgQDBAQEBQQGBAcECAQJBAoECwQMBA0EDgQPBBAEEQQSBBMEFAQVBBYEFwQYBBkEGgQbBBwEHQQeBB8EIAQhAPcEIgQjAAQHdW5pMDAwOQZtYWNyb24OcGVyaW9kY2VudGVyZWQESGJhcgxrZ3JlZW5sYW5kaWMDRW5nA2VuZwVsb25ncwVPaG9ybgVvaG9ybgVVaG9ybgV1aG9ybgd1bmkwMjM3BXNjaHdhB3VuaTAyRjMJZ3JhdmVjb21iCWFjdXRlY29tYgl0aWxkZWNvbWIEaG9vawd1bmkwMzBGCGRvdGJlbG93BXRvbm9zDWRpZXJlc2lzdG9ub3MJYW5vdGVsZWlhBUdhbW1hBURlbHRhBVRoZXRhBkxhbWJkYQJYaQJQaQVTaWdtYQNQaGkDUHNpBWFscGhhBGJldGEFZ2FtbWEFZGVsdGEHZXBzaWxvbgR6ZXRhA2V0YQV0aGV0YQRpb3RhBmxhbWJkYQJ4aQNyaG8Gc2lnbWExBXNpZ21hA3RhdQd1cHNpbG9uA3BoaQNwc2kFb21lZ2EHdW5pMDNEMQd1bmkwM0QyB3VuaTAzRDYHdW5pMDQwMgd1bmkwNDA0B3VuaTA0MDkHdW5pMDQwQQd1bmkwNDBCB3VuaTA0MEYHdW5pMDQxMQd1bmkwNDE0B3VuaTA0MTYHdW5pMDQxNwd1bmkwNDE4B3VuaTA0MUIHdW5pMDQyMwd1bmkwNDI0B3VuaTA0MjYHdW5pMDQyNwd1bmkwNDI4B3VuaTA0MjkHdW5pMDQyQQd1bmkwNDJCB3VuaTA0MkMHdW5pMDQyRAd1bmkwNDJFB3VuaTA0MkYHdW5pMDQzMQd1bmkwNDMyB3VuaTA0MzMHdW5pMDQzNAd1bmkwNDM2B3VuaTA0MzcHdW5pMDQzOAd1bmkwNDNBB3VuaTA0M0IHdW5pMDQzQwd1bmkwNDNEB3VuaTA0M0YHdW5pMDQ0Mgd1bmkwNDQ0B3VuaTA0NDYHdW5pMDQ0Nwd1bmkwNDQ4B3VuaTA0NDkHdW5pMDQ0QQd1bmkwNDRCB3VuaTA0NEMHdW5pMDQ0RAd1bmkwNDRFB3VuaTA0NEYHdW5pMDQ1Mgd1bmkwNDU0B3VuaTA0NTkHdW5pMDQ1QQd1bmkwNDVCB3VuaTA0NUYHdW5pMDQ2MAd1bmkwNDYxB3VuaTA0NjMHdW5pMDQ2NAd1bmkwNDY1B3VuaTA0NjYHdW5pMDQ2Nwd1bmkwNDY4B3VuaTA0NjkHdW5pMDQ2QQd1bmkwNDZCB3VuaTA0NkMHdW5pMDQ2RAd1bmkwNDZFB3VuaTA0NkYHdW5pMDQ3Mgd1bmkwNDczB3VuaTA0NzQHdW5pMDQ3NQd1bmkwNDdBB3VuaTA0N0IHdW5pMDQ3Qwd1bmkwNDdEB3VuaTA0N0UHdW5pMDQ3Rgd1bmkwNDgwB3VuaTA0ODEHdW5pMDQ4Mgd1bmkwNDgzB3VuaTA0ODQHdW5pMDQ4NQd1bmkwNDg2B3VuaTA0ODgHdW5pMDQ4OQd1bmkwNDhEB3VuaTA0OEUHdW5pMDQ4Rgd1bmkwNDkwB3VuaTA0OTEHdW5pMDQ5NAd1bmkwNDk1B3VuaTA0OUMHdW5pMDQ5RAd1bmkwNEEwB3VuaTA0QTEHdW5pMDRBNAd1bmkwNEE1B3VuaTA0QTYHdW5pMDRBNwd1bmkwNEE4B3VuaTA0QTkHdW5pMDRCNAd1bmkwNEI1B3VuaTA0QjgHdW5pMDRCOQd1bmkwNEJBB3VuaTA0QkMHdW5pMDRCRAd1bmkwNEMzB3VuaTA0QzQHdW5pMDRDNwd1bmkwNEM4B3VuaTA0RDgHdW5pMDRFMAd1bmkwNEUxB3VuaTA0RkEHdW5pMDRGQgd1bmkwNTAwB3VuaTA1MDIHdW5pMDUwMwd1bmkwNTA0B3VuaTA1MDUHdW5pMDUwNgd1bmkwNTA3B3VuaTA1MDgHdW5pMDUwOQd1bmkwNTBBB3VuaTA1MEIHdW5pMDUwQwd1bmkwNTBEB3VuaTA1MEUHdW5pMDUwRgd1bmkwNTEwB3VuaTIwMDAHdW5pMjAwMQd1bmkyMDAyB3VuaTIwMDMHdW5pMjAwNAd1bmkyMDA1B3VuaTIwMDYHdW5pMjAwNwd1bmkyMDA4B3VuaTIwMDkHdW5pMjAwQQd1bmkyMDBCDXVuZGVyc2NvcmVkYmwNcXVvdGVyZXZlcnNlZAd1bmkyMDI1B3VuaTIwNzQJbnN1cGVyaW9yBGxpcmEGcGVzZXRhBEV1cm8HdW5pMjEwNQd1bmkyMTEzB3VuaTIxMTYJZXN0aW1hdGVkCW9uZWVpZ2h0aAx0aHJlZWVpZ2h0aHMLZml2ZWVpZ2h0aHMMc2V2ZW5laWdodGhzCmNvbG9uLmxudW0JcXVvdGVkYmx4C2NvbW1hYWNjZW50B3VuaUZFRkYHdW5pRkZGQwd1bmlGRkZECWZpdmUuc21jcAhmb3VyLnN1cAl6ZXJvLmxudW0ObGFyZ2VyaWdodGhvb2sMY3lyaWxsaWNob29rEGN5cmlsbGljaG9va2xlZnQLY3lyaWxsaWN0aWMOYnJldmV0aWxkZWNvbWINYnJldmVob29rY29tYg5icmV2ZWFjdXRlY29tYhNjaXJjdW1mbGV4dGlsZGVjb21iEmNpcmN1bWZsZXhob29rY29tYhNjaXJjdW1mbGV4Z3JhdmVjb21iE2NpcmN1bWZsZXhhY3V0ZWNvbWIOYnJldmVncmF2ZWNvbWIRY29tbWFhY2NlbnRyb3RhdGUGQS5zbWNwBkIuc21jcAZDLnNtY3AGRC5zbWNwBkUuc21jcAZGLnNtY3AGRy5zbWNwBkguc21jcAZJLnNtY3AGSi5zbWNwBksuc21jcAZMLnNtY3AGTS5zbWNwBk4uc21jcAZPLnNtY3AGUS5zbWNwBlIuc21jcAZTLnNtY3AGVC5zbWNwBlUuc21jcAZWLnNtY3AGVy5zbWNwBlguc21jcAZZLnNtY3AGWi5zbWNwCXplcm8uc21jcAhvbmUuc21jcAh0d28uc21jcAp0aHJlZS5zbWNwCWZvdXIuc21jcAh0d28ubG51bQhzaXguc21jcApzZXZlbi5zbWNwCmVpZ2h0LnNtY3AJbmluZS5zbWNwB29uZS5zdXAHdHdvLnN1cAl0aHJlZS5zdXAIb25lLmxudW0IZml2ZS5zdXAHc2l4LnN1cAlzZXZlbi5zdXAJZWlnaHQuc3VwCG5pbmUuc3VwCHplcm8uc3VwCGNyb3NzYmFyCXJpbmdhY3V0ZQlkYXNpYW94aWEKdGhyZWUubG51bQlmb3VyLmxudW0JZml2ZS5sbnVtCHNpeC5sbnVtBWcuYWx0CnNldmVuLmxudW0HY2hpLmFsdAplaWdodC5sbnVtCWFscGhhLmFsdAlkZWx0YS5hbHQERC5jbgRhLmNuBVIuYWx0BUsuYWx0BWsuYWx0BksuYWx0MgZrLmFsdDIJbmluZS5sbnVtBlAuc21jcA1jeXJpbGxpY2JyZXZlB3VuaTAwQUQGRGNyb2F0BGhiYXIEVGJhcgR0YmFyCkFyaW5nYWN1dGUKYXJpbmdhY3V0ZQdBbWFjcm9uB2FtYWNyb24GQWJyZXZlBmFicmV2ZQdBb2dvbmVrB2FvZ29uZWsLQ2NpcmN1bWZsZXgLY2NpcmN1bWZsZXgHdW5pMDEwQQd1bmkwMTBCBkRjYXJvbgZkY2Fyb24HRW1hY3JvbgdlbWFjcm9uBkVicmV2ZQZlYnJldmUKRWRvdGFjY2VudAplZG90YWNjZW50B0VvZ29uZWsHZW9nb25lawZFY2Fyb24GZWNhcm9uC0djaXJjdW1mbGV4C2djaXJjdW1mbGV4B3VuaTAxMjAHdW5pMDEyMQxHY29tbWFhY2NlbnQMZ2NvbW1hYWNjZW50C0hjaXJjdW1mbGV4C2hjaXJjdW1mbGV4Bkl0aWxkZQZpdGlsZGUHSW1hY3JvbgdpbWFjcm9uBklicmV2ZQZpYnJldmUHSW9nb25lawdpb2dvbmVrCklkb3RhY2NlbnQCSUoCaWoLSmNpcmN1bWZsZXgLamNpcmN1bWZsZXgMS2NvbW1hYWNjZW50DGtjb21tYWFjY2VudAZMYWN1dGUGbGFjdXRlDExjb21tYWFjY2VudAxsY29tbWFhY2NlbnQGTGNhcm9uBmxjYXJvbgRMZG90BGxkb3QGTmFjdXRlBm5hY3V0ZQxOY29tbWFhY2NlbnQMbmNvbW1hYWNjZW50Bk5jYXJvbgZuY2Fyb24LbmFwb3N0cm9waGUHT21hY3JvbgdvbWFjcm9uBk9icmV2ZQZvYnJldmUNT2h1bmdhcnVtbGF1dA1vaHVuZ2FydW1sYXV0BlJhY3V0ZQZyYWN1dGUMUmNvbW1hYWNjZW50DHJjb21tYWFjY2VudAZSY2Fyb24GcmNhcm9uBlNhY3V0ZQZzYWN1dGULU2NpcmN1bWZsZXgLc2NpcmN1bWZsZXgHdW5pMDIxOAd1bmkwMjE5B3VuaTAyMUEHdW5pMDIxQgd1bmkwMTYyB3VuaTAxNjMGVGNhcm9uBnRjYXJvbgZVdGlsZGUGdXRpbGRlB1VtYWNyb24HdW1hY3JvbgZVYnJldmUGdWJyZXZlBVVyaW5nBXVyaW5nDVVodW5nYXJ1bWxhdXQNdWh1bmdhcnVtbGF1dAdVb2dvbmVrB3VvZ29uZWsLV2NpcmN1bWZsZXgLd2NpcmN1bWZsZXgLWWNpcmN1bWZsZXgLeWNpcmN1bWZsZXgGWmFjdXRlBnphY3V0ZQpaZG90YWNjZW50Cnpkb3RhY2NlbnQHQUVhY3V0ZQdhZWFjdXRlC09zbGFzaGFjdXRlC29zbGFzaGFjdXRlC0Rjcm9hdC5zbWNwCEV0aC5zbWNwCVRiYXIuc21jcAtBZ3JhdmUuc21jcAtBYWN1dGUuc21jcBBBY2lyY3VtZmxleC5zbWNwC0F0aWxkZS5zbWNwDkFkaWVyZXNpcy5zbWNwCkFyaW5nLnNtY3APQXJpbmdhY3V0ZS5zbWNwDUNjZWRpbGxhLnNtY3ALRWdyYXZlLnNtY3ALRWFjdXRlLnNtY3AQRWNpcmN1bWZsZXguc21jcA5FZGllcmVzaXMuc21jcAtJZ3JhdmUuc21jcAtJYWN1dGUuc21jcBBJY2lyY3VtZmxleC5zbWNwDklkaWVyZXNpcy5zbWNwC050aWxkZS5zbWNwC09ncmF2ZS5zbWNwC09hY3V0ZS5zbWNwEE9jaXJjdW1mbGV4LnNtY3ALT3RpbGRlLnNtY3AOT2RpZXJlc2lzLnNtY3ALVWdyYXZlLnNtY3ALVWFjdXRlLnNtY3AQVWNpcmN1bWZsZXguc21jcA5VZGllcmVzaXMuc21jcAtZYWN1dGUuc21jcAxBbWFjcm9uLnNtY3ALQWJyZXZlLnNtY3AMQW9nb25lay5zbWNwC0NhY3V0ZS5zbWNwEENjaXJjdW1mbGV4LnNtY3AMdW5pMDEwQS5zbWNwC0NjYXJvbi5zbWNwC0RjYXJvbi5zbWNwDEVtYWNyb24uc21jcAtFYnJldmUuc21jcA9FZG90YWNjZW50LnNtY3AMRW9nb25lay5zbWNwC0VjYXJvbi5zbWNwEEdjaXJjdW1mbGV4LnNtY3ALR2JyZXZlLnNtY3AMdW5pMDEyMC5zbWNwEUdjb21tYWFjY2VudC5zbWNwEEhjaXJjdW1mbGV4LnNtY3ALSXRpbGRlLnNtY3AMSW1hY3Jvbi5zbWNwC0licmV2ZS5zbWNwDElvZ29uZWsuc21jcA9JZG90YWNjZW50LnNtY3AQSmNpcmN1bWZsZXguc21jcBFLY29tbWFhY2NlbnQuc21jcAtMYWN1dGUuc21jcBFMY29tbWFhY2NlbnQuc21jcAtMY2Fyb24uc21jcAlMZG90LnNtY3ALTmFjdXRlLnNtY3ARTmNvbW1hYWNjZW50LnNtY3ALTmNhcm9uLnNtY3AMT21hY3Jvbi5zbWNwC09icmV2ZS5zbWNwEk9odW5nYXJ1bWxhdXQuc21jcAtSYWN1dGUuc21jcBFSY29tbWFhY2NlbnQuc21jcAtSY2Fyb24uc21jcAtTYWN1dGUuc21jcBBTY2lyY3VtZmxleC5zbWNwDVNjZWRpbGxhLnNtY3ALU2Nhcm9uLnNtY3ARVGNvbW1hYWNjZW50LnNtY3ALVGNhcm9uLnNtY3ALVXRpbGRlLnNtY3AMVW1hY3Jvbi5zbWNwC1VicmV2ZS5zbWNwClVyaW5nLnNtY3ASVWh1bmdhcnVtbGF1dC5zbWNwDFVvZ29uZWsuc21jcBBXY2lyY3VtZmxleC5zbWNwEFljaXJjdW1mbGV4LnNtY3AOWWRpZXJlc2lzLnNtY3ALWmFjdXRlLnNtY3APWmRvdGFjY2VudC5zbWNwC1pjYXJvbi5zbWNwD2dlcm1hbmRibHMuc21jcApBbHBoYXRvbm9zDEVwc2lsb250b25vcwhFdGF0b25vcwlJb3RhdG9ub3MMT21pY3JvbnRvbm9zDFVwc2lsb250b25vcwpPbWVnYXRvbm9zEWlvdGFkaWVyZXNpc3Rvbm9zBUFscGhhBEJldGEHRXBzaWxvbgRaZXRhA0V0YQRJb3RhBUthcHBhAk11Ak51B09taWNyb24DUmhvA1RhdQdVcHNpbG9uA0NoaQxJb3RhZGllcmVzaXMPVXBzaWxvbmRpZXJlc2lzCmFscGhhdG9ub3MMZXBzaWxvbnRvbm9zCGV0YXRvbm9zCWlvdGF0b25vcxR1cHNpbG9uZGllcmVzaXN0b25vcwVrYXBwYQdvbWljcm9uB3VuaTAzQkMCbnUDY2hpDGlvdGFkaWVyZXNpcw91cHNpbG9uZGllcmVzaXMMb21pY3JvbnRvbm9zDHVwc2lsb250b25vcwpvbWVnYXRvbm9zB3VuaTA0MDEHdW5pMDQwMwd1bmkwNDA1B3VuaTA0MDYHdW5pMDQwNwd1bmkwNDA4B3VuaTA0MUEHdW5pMDQwQwd1bmkwNDBFB3VuaTA0MTAHdW5pMDQxMgd1bmkwNDEzB3VuaTA0MTUHdW5pMDQxOQd1bmkwNDFDB3VuaTA0MUQHdW5pMDQxRQd1bmkwNDFGB3VuaTA0MjAHdW5pMDQyMQd1bmkwNDIyB3VuaTA0MjUHdW5pMDQzMAd1bmkwNDM1B3VuaTA0MzkHdW5pMDQzRQd1bmkwNDQwB3VuaTA0NDEHdW5pMDQ0Mwd1bmkwNDQ1B3VuaTA0NTEHdW5pMDQ1Mwd1bmkwNDU1B3VuaTA0NTYHdW5pMDQ1Nwd1bmkwNDU4B3VuaTA0NUMHdW5pMDQ1RQZXZ3JhdmUGd2dyYXZlBldhY3V0ZQZ3YWN1dGUJV2RpZXJlc2lzCXdkaWVyZXNpcwZZZ3JhdmUGeWdyYXZlBm1pbnV0ZQZzZWNvbmQJZXhjbGFtZGJsB3VuaUZCMDIHdW5pMDFGMAd1bmkwMkJDB3VuaTFFM0UHdW5pMUUzRgd1bmkxRTAwB3VuaTFFMDEHdW5pMUY0RAd1bmlGQjAzB3VuaUZCMDQHdW5pMDQwMAd1bmkwNDBEB3VuaTA0NTAHdW5pMDQ1RAd1bmkwNDcwB3VuaTA0NzEHdW5pMDQ3Ngd1bmkwNDc3B3VuaTA0NzkHdW5pMDQ3OAd1bmkwNDk4B3VuaTA0OTkHdW5pMDRBQQd1bmkwNEFCB3VuaTA0QUUHdW5pMDRBRgd1bmkwNEMwB3VuaTA0QzEHdW5pMDRDMgd1bmkwNENGB3VuaTA0RDAHdW5pMDREMQd1bmkwNEQyB3VuaTA0RDMHdW5pMDRENAd1bmkwNEQ1B3VuaTA0RDYHdW5pMDRENwd1bmkwNERBB3VuaTA0RDkHdW5pMDREQgd1bmkwNERDB3VuaTA0REQHdW5pMDRERQd1bmkwNERGB3VuaTA0RTIHdW5pMDRFMwd1bmkwNEU0B3VuaTA0RTUHdW5pMDRFNgd1bmkwNEU3B3VuaTA0RTgHdW5pMDRFOQd1bmkwNEVBB3VuaTA0RUIHdW5pMDRFQwd1bmkwNEVEB3VuaTA0RUUHdW5pMDRFRgd1bmkwNEYwB3VuaTA0RjEHdW5pMDRGMgd1bmkwNEYzB3VuaTA0RjQHdW5pMDRGNQd1bmkwNEY4B3VuaTA0RjkHdW5pMDRGQwd1bmkwNEZEB3VuaTA1MDEHdW5pMDUxMgd1bmkwNTEzB3VuaTFFQTAHdW5pMUVBMQd1bmkxRUEyB3VuaTFFQTMHdW5pMUVBNAd1bmkxRUE1B3VuaTFFQTYHdW5pMUVBNwd1bmkxRUE4B3VuaTFFQTkHdW5pMUVBQQd1bmkxRUFCB3VuaTFFQUMHdW5pMUVBRAd1bmkxRUFFB3VuaTFFQUYHdW5pMUVCMAd1bmkxRUIxB3VuaTFFQjIHdW5pMUVCMwd1bmkxRUI0B3VuaTFFQjUHdW5pMUVCNgd1bmkxRUI3B3VuaTFFQjgHdW5pMUVCOQd1bmkxRUJBB3VuaTFFQkIHdW5pMUVCQwd1bmkxRUJEB3VuaTFFQkUHdW5pMUVCRgd1bmkxRUMwB3VuaTFFQzEHdW5pMUVDMgd1bmkxRUMzB3VuaTFFQzQHdW5pMUVDNQd1bmkxRUM2B3VuaTFFQzcHdW5pMUVDOAd1bmkxRUM5B3VuaTFFQ0EHdW5pMUVDQgd1bmkxRUNDB3VuaTFFQ0QHdW5pMUVDRQd1bmkxRUNGB3VuaTFFRDAHdW5pMUVEMQd1bmkxRUQyB3VuaTFFRDMHdW5pMUVENAd1bmkxRUQ1B3VuaTFFRDYHdW5pMUVENwd1bmkxRUQ4B3VuaTFFRDkHdW5pMUVEQQd1bmkxRURCB3VuaTFFREMHdW5pMUVERAd1bmkxRURFB3VuaTFFREYHdW5pMUVFMAd1bmkxRUUxB3VuaTFFRTIHdW5pMUVFMwd1bmkxRUU0B3VuaTFFRTUHdW5pMUVFNgd1bmkxRUU3B3VuaTFFRTgHdW5pMUVFOQd1bmkxRUVBB3VuaTFFRUIHdW5pMUVFQwd1bmkxRUVEB3VuaTFFRUUHdW5pMUVFRgd1bmkx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AAwA4f/UAPH/yQD5/9EBBP/lARv/4wEv/8QBOP/hAUn/1AFK//UBS//nAVP/ZAFU/8kACgDh/8EA8f/NAPn/0gEv/8wBOP/lATv/3wFJ/84BS//qAVP/ngFU/84ACgDh/8IA8f/GAPn/zwEv/8ABOP/hATv/3wFJ/80BS//oAVP/nwFU/8YACQDh/8kA8f/fAPn/4QEE/+0BG//rAS//3wE7/+kBSv/1AVT/4AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACQDh/+YA8f/QAPn/1gEv/84BOP/oAUn/5wFL/+0BU//mAVT/0AALANQAFADh/+AA6AATATj/4QE5/+ABPP/hAUH/6QFJ/98BS//eAVP/3wFV//IAGACz/9QAvf/tAL8AEQDF/+AAx//nAMj/5QDJ/+4A1AASAOX/6QDx/9cBL//XATn/0wE7/9YBPP/FAUH/5wFJAA0BSwAMAVT/1gFV//IBqP/pAaz/5wG0/+cBtf/pAd//8AAFABn/8gDh//EBSf/yAUv/8gFT//IACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AASANT/rgDhABIA5v/gAOj/rQDq/9YA+P/fAPz/0gEC/+ABF//OASf/3QEp/+IBLf/gATP/4AE5/+kBPP/aAUb/vQFQ/98BUwARAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QADQDUABMA4f/mAOL/9ADoABIA8f/nAPn/5wEv/+cBOP/lATn/6AFJ/+YBS//mAVP/5gFU/+cACgDh/8QA8f/NAPn/1QEv/8wBOP/mATv/3wFJ/9EBS//sAVP/oQFU/88ACgDh/8MA8f/PAPn/1AEv/84BOP/nATv/3wFJ/9EBS//sAVP/oAFU/9EAAgDU/+IBU//kAAIA1P/hAOj/5AAHAOj/7gDx/+4A+f/vAQT/9AEb//EBL//vAVT/7wAFAPH/9AD5//QBBP/1AS//9QFU//UAAgDo/2gBF//uAAcA6AAUAPH/7QD3/9AA+f/uAS//7QE5/+0BVP/tAAEBF//xAAUBF//rAaj/6wGs/+kBtP/rAbX/6wATAEgADQDC/9YAw//AAMf/1QDo/8gBF//sARsADAFKAAsBTAALAab/vwGo/+4BrP/sAbT/7QG1/+wBt//1AbgADgG6AA0BvQANAd//xAAHAMX/6gDo/+4A8f/WAPn/7QEv/+wBVP/sAdz/6AAHAOgAFADx//AA+f/wAPwAFgEv/+YBOf/cAVT/8AAHAOgAEgDx/+MA9/+4APn/4wEv/7oBOf/ZAVT/4wAJAPH/gAD5//ABBP/bARv/3AEv/0cBOf/uAUoABwFM//QBVP9/AAkA8f9qAPn/xgEE/9kBG//bAS//HgE5/+0BSv/wAUz/8gFU/1YABwDF/+oA6P/uAPH/1gD5/+0BL//sAVT/7AHc/+gAAgDo/+8A+f/uAAkA8f92APn/0wEE/9kBG//bAS//HgE5/+0BSv/wAUz/8gFU/1YACQDx/2QA+f/ZAQT/2QEb/9sBL/8eATn/7QFK//ABTP/yAVT/VgAJAPH/agD5/8YBBP/ZARv/2wEv/x4BOf/tAUr/8AFM//IBVP9WAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkACwAUAD8AEQBU/+IAXwATAab/tAGo/9kBrP/ZAbT/2QG1/9kABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UABwDF/+oA6P/uAPH/1gD5/+0BL//sAVT/7AHc/+gAMgBU/34AWf+dAGv+8QB6/vQAf/6rAIT/XgCH/0sAs/9yALr/DwC+/woAwf9BAML/BwDF/2gAx/8PAMj/DgDJ/wwA1P9jAOEABQDl/70A5v9JAOj+/gDq/xMA8f9oAPj/DgD5/2gA+v8TAPz/BwD9ADABAv8OAQT/EQEX/ucBG/+sASf/FQEp/zwBLf8OAS//agEz/0kBOf8MATv/PwE8/vEBQf/AAUb+7wFK/zEBTP9fAVD/CgFTAAUBVP8wAVX/1QHc/2oB3//TAAIA6P9oARf/7gAUAFn/wQCz/8UAxf+0AOX/1wDx/7kA+f/pAQT/sgEX/9IBG//IAS//oAE5/8UBQf/kAUr/zAFM/8wBVP/LAVX/7wGo/+gBrP/mAbT/5wG1/+cAFABZ/8EAs//FAMX/tADl/9cA8f+5APn/6QEE/7IBF//SARv/yAEv/6ABOf/FAUH/5AFK/8wBTP/MAVT/ywFV/+8BqP/oAaz/5gG0/+cBtf/nAAIA6P9oARf/7gABAFkACwABAFkACwABAFkACwABAFkACwABAFkACwAJAaj/8gGs//IBtP/yAbX/8gG4/8ABuf/sAbr/xwG7/9gBvf+/AAIBuv/uAbv/9QABAab/0gAEAaj/6wGs/+kBtP/rAbX/6wAKAaYAEQGo//ABrP/uAbT/7wG1//ABuP+7Abn/7AG6/7cBu//VAb3/tAAFAab/8wG4/+4Buv/xAbz/7AG9/+oABAG4/+kBuv/rAbv/8QG9/+UABAG4//IBuv/xAbv/9QG9/+4ACQGm/78BqP/uAaz/7AG0/+0Btf/sAbf/9QG4AA4BugANAb0ADQABAab/7wAFAab/xwGo//IBrP/wAbT/8AG1//AAAgGm/9wBuAAOAAQBqP/tAaz/6wG0/+sBtf/rAAkBpv/AAaj/7QGs/+sBtP/rAbX/6wG4AA8BugAQAbsADQG9ABAABQGmAAwBqP/wAaz/8AG0//ABtf/wAAEB1//VAAEBxP/VAAEB1/9AAAYASAALALr/8gDH//EAyf/vAdwADwHf/+4AAwDF/+0A8f/VAdz/7AABAab/1QAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1AAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UAOwBU/78AWf/RAGv/bAB6/24Af/9DAIT/rACH/6EAs/+4ALr/fgC+/3sAwf+bAML/eQDF/7IAx/9+AMj/fQDJ/3wA1P+vAOEADwDl/+QA5v+gAOj/dADq/4AA8f+yAPj/fQD5/7IA+v+AAPz/eQD9ACgBAv99AQT/fwEX/2YBG//aASf/gQEp/5gBLf99AS//swEz/6ABOf98ATv/mgE8/2wBQf/mAUb/awFK/5IBTP+tAVD/ewFTAA8BVP+RAVX/8gGm/68BqP+5Aaz/uQG0/7kBtf+5Abf/vAG4//EBu//xAbz/7QHc/7MB3//xAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAEAAv/5gA///QAX//vATz/7QAFAEj/7gBZ/+oBuv/wAbv/7QG9//AABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAUASP/uAFn/6gG6//ABu//tAb3/8AAFAEj/7gBZ/+oBuv/wAbv/7QG9//AACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1AAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABpv/tAbz/9QAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1AAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UAAQGm/+sAAQGm/+sAAQGm/+sAAQGm/+sAJAAI/+IACwAUAAz/zwA/ABIASP/qAFT/2ABW/+oAXwATAGv/rgB6/80Af/+gAIT/wQCH/8AAs//QALf/6gC6/8YAuwANAL3/6QC+/9YAwf/oAML/ugDF/+kAx//LAMj/2gDJ/8cBbv/TAab/qwGo/80BrP/LAbT/ywG1/8sBuP/zAbv/8wG8/+8B3P/AAd//7gAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EAAQDx//UAAQDx//UAAQDx//UAAQDx//UAAQDx/9YACQDF/+oA6P+4APH/4gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAxf/qAOj/uADx/+IBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQDF/+oA6P+4APH/4gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1AAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1AB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAAQAC//mAD//9ABf/+8BPP/tAAQAC//mAD//9ABf/+8BPP/tAAQAC//mAD//9ABf/+8BPP/tAAQAC//mAD//9ABf/+8BPP/tAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAEA8f/1AAUASP/uAFn/6gG6//ABu//tAb3/8AABAPH/9QAFAEj/7gBZ/+oBuv/wAbv/7QG9//AAAQDx//UABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAEA8f/1AAUASP/uAFn/6gG6//ABu//tAb3/8AABAPH/9QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAAQDx/9YACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AABAab/6wAUAFn/wQCz/8UAxf+0AOX/1wDx/7kA+f/pAQT/sgEX/9IBG//IAS//oAE5/8UBQf/kAUr/zAFM/8wBVP/LAVX/7wGo/+gBrP/mAbT/5wG1/+cACwBZ/8wBpgATAaj/8wGs//EBtP/yAbX/8gG4/70Buf/uAbr/uAG7/9cBvf+3AAsAWf/MAaYAEwGo//MBrP/xAbT/8gG1//IBuP+9Abn/7gG6/7gBu//XAb3/twALAFn/zAGmABMBqP/zAaz/8QG0//IBtf/yAbj/vQG5/+4Buv+4Abv/1wG9/7cACwBZ/8wBpgATAaj/8wGs//EBtP/yAbX/8gG4/70Buf/uAbr/uAG7/9cBvf+3AAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AABAPH/1gAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAAQDx/9YACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAEA8f/WAAEA8f/WAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UACQDF/+oA6P+4APH/4gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1AAkAxf/qAOj/uADx/+IBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABpv/tAbz/9QAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAMASAAUAFYAGABZABEAAwBIABQAVgAYAFkAEQADAEgAFABWABgAWQARADsAVP+/AFn/0QBr/2wAev9uAH//QwCE/6wAh/+hALP/uAC6/34Avv97AMH/mwDC/3kAxf+yAMf/fgDI/30Ayf98ANT/rwDhAA8A5f/kAOb/oADo/3QA6v+AAPH/sgD4/30A+f+yAPr/gAD8/3kA/QAoAQL/fQEE/38BF/9mARv/2gEn/4EBKf+YAS3/fQEv/7MBM/+gATn/fAE7/5oBPP9sAUH/5gFG/2sBSv+SAUz/rQFQ/3sBUwAPAVT/kQFV//IBpv+vAaj/uQGs/7kBtP+5AbX/uQG3/7wBuP/xAbv/8QG8/+0B3P+zAd//8QA7AFT/vwBZ/9EAa/9sAHr/bgB//0MAhP+sAIf/oQCz/7gAuv9+AL7/ewDB/5sAwv95AMX/sgDH/34AyP99AMn/fADU/68A4QAPAOX/5ADm/6AA6P90AOr/gADx/7IA+P99APn/sgD6/4AA/P95AP0AKAEC/30BBP9/ARf/ZgEb/9oBJ/+BASn/mAEt/30BL/+zATP/oAE5/3wBO/+aATz/bAFB/+YBRv9rAUr/kgFM/60BUP97AVMADwFU/5EBVf/yAab/rwGo/7kBrP+5AbT/uQG1/7kBt/+8Abj/8QG7//EBvP/tAdz/swHf//EAOwBU/78AWf/RAGv/bAB6/24Af/9DAIT/rACH/6EAs/+4ALr/fgC+/3sAwf+bAML/eQDF/7IAx/9+AMj/fQDJ/3wA1P+vAOEADwDl/+QA5v+gAOj/dADq/4AA8f+yAPj/fQD5/7IA+v+AAPz/eQD9ACgBAv99AQT/fwEX/2YBG//aASf/gQEp/5gBLf99AS//swEz/6ABOf98ATv/mgE8/2wBQf/mAUb/awFK/5IBTP+tAVD/ewFTAA8BVP+RAVX/8gGm/68BqP+5Aaz/uQG0/7kBtf+5Abf/vAG4//EBu//xAbz/7QHc/7MB3//xAAEBpv/rAAEBpv/rAAEBpv/rAAEBpv/rAAEBpv/rAAEBpv/rAAkACwAPAD8ADABU/+sAXwAOAab/ywGo/+kBrP/nAbT/5wG1/+cAJAAI/+IACwAUAAz/zwA/ABIASP/qAFT/2ABW/+oAXwATAGv/rgB6/80Af/+gAIT/wQCH/8AAs//QALf/6gC6/8YAuwANAL3/6QC+/9YAwf/oAML/ugDF/+kAx//LAMj/2gDJ/8cBbv/TAab/qwGo/80BrP/LAbT/ywG1/8sBuP/zAbv/8wG8/+8B3P/AAd//7gAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAkAAj/4gALABQADP/PAD8AEgBI/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBpv+rAaj/zQGs/8sBtP/LAbX/ywG4//MBu//zAbz/7wHc/8AB3//uAAgAWf/lALP/ywDI/+QBpgANAaj/7QGs/+sBtP/sAbX/7AAIAFn/5QCz/8sAyP/kAaYADQGo/+0BrP/rAbT/7AG1/+wACABZ/+UAs//LAMj/5AGmAA0BqP/tAaz/6wG0/+wBtf/sAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAFAEj/7gBZ/+oBuv/wAbv/7QG9//AACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1ACQACP/iAAsAFAAM/88APwASAEj/6gBU/9gAVv/qAF8AEwBr/64Aev/NAH//oACE/8EAh//AALP/0AC3/+oAuv/GALsADQC9/+kAvv/WAMH/6ADC/7oAxf/pAMf/ywDI/9oAyf/HAW7/0wGm/6sBqP/NAaz/ywG0/8sBtf/LAbj/8wG7//MBvP/vAdz/wAHf/+4AHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAIBDAALAVP/5gAFAEj/7gBZ/+oBuv/wAbv/7QG9//AACABZ/+UAs//LAMj/5AGmAA0BqP/tAaz/6wG0/+wBtf/sAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAFABZ/8EAs//FAMX/tADl/9cA8f+5APn/6QEE/7IBF//SARv/yAEv/6ABOf/FAUH/5AFK/8wBTP/MAVT/ywFV/+8BqP/oAaz/5gG0/+cBtf/nAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABpv/tAbz/9QAJAFYADgB//tcAv/+YAML/xwDU/xIA6P9SAUb/zwGm/4AB3//XADsAVP+/AFn/0QBr/2wAev9uAH//QwCE/6wAh/+hALP/uAC6/34Avv97AMH/mwDC/3kAxf+yAMf/fgDI/30Ayf98ANT/rwDhAA8A5f/kAOb/oADo/3QA6v+AAPH/sgD4/30A+f+yAPr/gAD8/3kA/QAoAQL/fQEE/38BF/9mARv/2gEn/4EBKf+YAS3/fQEv/7MBM/+gATn/fAE7/5oBPP9sAUH/5gFG/2sBSv+SAUz/rQFQ/3sBUwAPAVT/kQFV//IBpv+vAaj/uQGs/7kBtP+5AbX/uQG3/7wBuP/xAbv/8QG8/+0B3P+zAd//8QAkAAj/4gALABQADP/PAD8AEgBI/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBpv+rAaj/zQGs/8sBtP/LAbX/ywG4//MBu//zAbz/7wHc/8AB3//uABgAs//UAL3/7QC/ABEAxf/gAMf/5wDI/+UAyf/uANQAEgDl/+kA8f/XAS//1wE5/9MBO//WATz/xQFB/+cBSQANAUsADAFU/9YBVf/yAaj/6QGs/+cBtP/nAbX/6QHf//AACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kACQACP/iAAsAFAAM/88APwASAEj/6gBU/9gAVv/qAF8AEwBr/64Aev/NAH//oACE/8EAh//AALP/0AC3/+oAuv/GALsADQC9/+kAvv/WAMH/6ADC/7oAxf/pAMf/ywDI/9oAyf/HAW7/0wGm/6sBqP/NAaz/ywG0/8sBtf/LAbj/8wG7//MBvP/vAdz/wAHf/+4AAQDx/9YACQDF/+oA6P+4APH/4gEE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/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBpv+rAaj/zQGs/8sBtP/LAbX/ywG4//MBu//zAbz/7wHc/8AB3//uAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1AAEAWQALAAEAWQALAAEAWQALAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AABAPH/1gAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAEA8f/1AAkACwAUAD8AEQBU/+IAXwATAab/tAGo/9kBrP/ZAbT/2QG1/9kABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UABAAL/+YAP//0AF//7wE8/+0AJAAI/+IACwAUAAz/zwA/ABIASP/qAFT/2ABW/+oAXwATAGv/rgB6/80Af/+gAIT/wQCH/8AAs//QALf/6gC6/8YAuwANAL3/6QC+/9YAwf/oAML/ugDF/+kAx//LAMj/2gDJ/8cBbv/TAab/qwGo/80BrP/LAbT/ywG1/8sBuP/zAbv/8wG8/+8B3P/AAd//7gAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAGACz/9QAvf/tAL8AEQDF/+AAx//nAMj/5QDJ/+4A1AASAOX/6QDx/9cBL//XATn/0wE7/9YBPP/FAUH/5wFJAA0BSwAMAVT/1gFV//IBqP/pAaz/5wG0/+cBtf/pAd//8AABARf/8QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAAUASP/uAFn/6gG6//ABu//tAb3/8AABAPH/9QABAPH/9QABAPH/9QAYALP/1AC9/+0AvwARAMX/4ADH/+cAyP/lAMn/7gDUABIA5f/pAPH/1wEv/9cBOf/TATv/1gE8/8UBQf/nAUkADQFLAAwBVP/WAVX/8gGo/+kBrP/nAbT/5wG1/+kB3//wAAEBF//xAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UACQDF/+oA6P+4APH/4gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAcAxf/qAOj/7gDx/9YA+f/tAS//7AFU/+wB3P/oABIA1P+uAOEAEgDm/+AA6P+tAOr/1gD4/98A/P/SAQL/4AEX/84BJ//dASn/4gEt/+ABM//gATn/6QE8/9oBRv+9AVD/3wFTABEABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAEgDU/64A4QASAOb/4ADo/60A6v/WAPj/3wD8/9IBAv/gARf/zgEn/90BKf/iAS3/4AEz/+ABOf/pATz/2gFG/70BUP/fAVMAEQAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QASANT/rgDhABIA5v/gAOj/rQDq/9YA+P/fAPz/0gEC/+ABF//OASf/3QEp/+IBLf/gATP/4AE5/+kBPP/aAUb/vQFQ/98BUwARAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1ABgAs//UAL3/7QC/ABEAxf/gAMf/5wDI/+UAyf/uANQAEgDl/+kA8f/XAS//1wE5/9MBO//WATz/xQFB/+cBSQANAUsADAFU/9YBVf/yAaj/6QGs/+cBtP/nAbX/6QHf//AAAQEX//EAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EAHQAh/68AVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAPn/0AEv/4EBOP9lATn/hQE7/2YBPP/dAUH/8gFJ/7EBS//KAVP/qQFU/8gBrP/1AbT/9QG4/8cBuf/xAbr/zQG7/90Bvf/EAAgA8f/wAPn/8AEE//EBG//zAS//8QFK//MBTP/zAVT/8QAdACH/rwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oA+f/QAS//gQE4/2UBOf+FATv/ZgE8/90BQf/yAUn/sQFL/8oBU/+pAVT/yAGs//UBtP/1Abj/xwG5//EBuv/NAbv/3QG9/8QACADx//AA+f/wAQT/8QEb//MBL//xAUr/8wFM//MBVP/xAB0AIf+vAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygD5/9ABL/+BATj/ZQE5/4UBO/9mATz/3QFB//IBSf+xAUv/ygFT/6kBVP/IAaz/9QG0//UBuP/HAbn/8QG6/80Bu//dAb3/xAAIAPH/8AD5//ABBP/xARv/8wEv//EBSv/zAUz/8wFU//EABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAEA8f/1AAUASP/uAFn/6gG6//ABu//tAb3/8AABAPH/9QAFAEj/7gBZ/+oBuv/wAbv/7QG9//AAAQDx//UABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAEA8f/1AAUASP/uAFn/6gG6//ABu//tAb3/8AABAPH/9QAFAEj/7gBZ/+oBuv/wAbv/7QG9//AAAQDx//UABQBI/+4AWf/qAbr/8AG7/+0Bvf/wAAEA8f/1AAUASP/uAFn/6gG6//ABu//tAb3/8AABAPH/9QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UACQDF/+oA6P+4APH/4gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1AAkAxf/qAOj/uADx/+IBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABpv/tAbz/9QAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UACQDF/+oA6P+4APH/4gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGm/+0BvP/1AAkAxf/qAOj/uADx/+IBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABpv/tAbz/9QAJAMX/6gDo/7gA8f/iAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAab/7QG8//UACQDF/+oA6P+4APH/4gEE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AFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBpv+rAaj/zQGs/8sBtP/LAbX/ywG4//MBu//zAbz/7wHc/8AB3//uAAE1wAAEAAAABgAWAGwDngQcBIYEyAAVADgAFAA5ACYAOwAWARQAFAILABYCkgAmApQAFgKWABYC/QAWAwwAFgMPABYDRQAmA0cAJgNJACYDSwAWA2AAFANoABYD6gAWA+wAFgPuABYEEwAWAMwADv7uABD+7gAj/0AALP8wADYAFABD/94ARf/rAEb/6wBH/+sASf/rAFH/6wBT/+sAV//qAFj/6ABb/+gAkf/rAJX/6wCX/+oArf9AAK//QAC2/+sAuP/oAMP/6wDE/+sAxv/qAM0AFADRABQA8v/rAP7/6wEI/0ABE//rARX/6AEZ/+sBHf/rAS4AFAE1/+sBNgAUAUf/6wFI/+sBUv/rAWf+7gFr/u4Bb/7uAXD+7gHx/0AB8v9AAfP/QAH0/0AB9f9AAfb/QAH3/0ACDP/eAg3/3gIO/94CD//eAhD/3gIR/94CEv/eAhP/6wIU/+sCFf/rAhb/6wIX/+sCHf/rAh7/6wIf/+sCIP/rAiH/6wIi/+oCI//qAiT/6gIl/+oCJv/oAif/6AIo/0ACKf/eAir/QAIr/94CLP9AAi3/3gIv/+sCMf/rAjP/6wI1/+sCN//rAjn/6wI7/+sCPf/rAj//6wJB/+sCQ//rAkX/6wJH/+sCSf/rAlf/MAJr/+sCbf/rAm//6wKAABQCggAUAoQAFAKH/+oCif/qAov/6gKN/+oCj//qApH/6gKV/+gC+P9AAwD/QAMQ/+sDFP/qAxb/6wMY/+gDG//qAxz/6wMd/+oDJP8wAyj/QAMzABQDNf/eAzb/6wM4/+sDOv/rAzv/6AM9/+sDRP/oA0z/6ANV/0ADVv/eA1z/6wNh/+gDYv/rA2f/6wNp/+gDbv9AA2//3gNw/0ADcf/eA3X/6wN3/+sDeP/rA4L/6wOE/+sDhv/rA4r/6AOM/+gDjv/oA5X/6wOY/0ADmf/eA5r/QAOb/94DnP9AA53/3gOe/0ADn//eA6D/QAOh/94Dov9AA6P/3gOk/0ADpf/eA6b/QAOn/94DqP9AA6n/3gOq/0ADq//eA6z/QAOt/94Drv9AA6//3gOx/+sDs//rA7X/6wO3/+sDuf/rA7v/6wO9/+sDv//rA8X/6wPH/+sDyf/rA8v/6wPN/+sDz//rA9H/6wPT/+sD1f/rA9f/6wPZ/+sD2//rA93/6gPf/+oD4f/qA+P/6gPl/+oD5//qA+n/6gPr/+gD7f/oA+//6AP2ABQAHwA2/98AOP/kADn/7AA7/90Azf/fANH/3wEU/+QBLv/fATb/3wIL/90CgP/fAoL/3wKE/98Ckv/sApT/3QKW/90C/f/dAwz/3QMP/90DM//fA0X/7ANH/+wDSf/sA0v/3QNg/+QDaP/dA+r/3QPs/90D7v/dA/b/3wQT/90AGgA2/84AOP/tADv/0ADN/84A0f/OART/7QEu/84BNv/OAgv/0AKA/84Cgv/OAoT/zgKU/9AClv/QAv3/0AMM/9ADD//QAzP/zgNL/9ADYP/tA2j/0APq/9AD7P/QA+7/0AP2/84EE//QABAALP/uADf/7gIH/+4CCP/uAgn/7gIK/+4CV//uAob/7gKI/+4Civ/uAoz/7gKO/+4CkP/uAyT/7gPc/+4D3v/uAD0ARf/oAEb/6ABH/+gASf/oAFP/6ACR/+gAlf/oALb/6ADD/+gAxP/oAPL/6AD+/+gBGf/oAR3/6AE1/+gBR//oAUj/6AFS/+gCE//oAhT/6AIV/+gCFv/oAhf/6AIv/+gCMf/oAjP/6AI1/+gCN//oAjn/6AI7/+gCPf/oAj//6AJB/+gCQ//oAkX/6AJH/+gCSf/oAxD/6AM2/+gDOv/oAz3/6ANc/+gDYv/oA2f/6AN1/+gDd//oA3j/6AOE/+gDlf/oA7H/6AOz/+gDtf/oA7f/6AO5/+gDu//oA73/6AO//+gD0//oA9X/6APX/+gD2//oAAEwEgAEAAAALABiAIwBggHgAfoCPAKyA5gEfgVYBfIIjApSC2ANJg1YDYoOCA9OENgSbhOAFO4XABe2GRwZ0hqMGxIbcBwuHKQdUh18Hs4hDCEuIkQioiMgI0ojfCOOI7gACgAEABAACQAQAWUAEAFmABABaAAQAWkAEAFqABADTQAQA04AEANSABAAPQBF/+wARv/sAEf/7ABJ/+wAU//sAJH/7ACV/+wAtv/sAMP/7ADE/+wA8v/sAP7/7AEZ/+wBHf/sATX/7AFH/+wBSP/sAVL/7AIT/+wCFP/sAhX/7AIW/+wCF//sAi//7AIx/+wCM//sAjX/7AI3/+wCOf/sAjv/7AI9/+wCP//sAkH/7AJD/+wCRf/sAkf/7AJJ/+wDEP/sAzb/7AM6/+wDPf/sA1z/7ANi/+wDZ//sA3X/7AN3/+wDeP/sA4T/7AOV/+wDsf/sA7P/7AO1/+wDt//sA7n/7AO7/+wDvf/sA7//7APT/+wD1f/sA9f/7APb/+wAFwBR/+IBE//iAh3/4gIe/+ICH//iAiD/4gIh/+ICa//iAm3/4gJv/+IDFv/iAxz/4gM4/+IDgv/iA4b/4gPF/+IDx//iA8n/4gPL/+IDzf/iA8//4gPR/+ID2f/iAAYADv+EABD/hAFn/4QBa/+EAW//hAFw/4QAEAAs/+wAN//sAgf/7AII/+wCCf/sAgr/7AJX/+wChv/sAoj/7AKK/+wCjP/sAo7/7AKQ/+wDJP/sA9z/7APe/+wAHQAE//IACf/yAFj/8wBb//MAuP/zARX/8wFl//IBZv/yAWj/8gFp//IBav/yAib/8wIn//MClf/zAxj/8wM7//MDRP/zA0z/8wNN//IDTv/yA1L/8gNh//MDaf/zA4r/8wOM//MDjv/zA+v/8wPt//MD7//zADkAJf/zACn/8wAx//MAM//zAIH/8wCQ//MAlP/zAK7/8wDO//MBA//zARL/8wEW//MBGP/zARr/8wEc//MBNP/zAVH/8wH4//MCAv/zAgP/8wIE//MCBf/zAgb/8wIu//MCMP/zAjL/8wI0//MCQv/zAkT/8wJG//MCSP/zAmr/8wJs//MCbv/zAp//8wL8//MDCf/zAy//8wMy//MDV//zA2P/8wNm//MDgf/zA4P/8wOF//MDxP/zA8b/8wPI//MDyv/zA8z/8wPO//MD0P/zA9L/8wPU//MD1v/zA9j/8wPa//MAOQAl/+YAKf/mADH/5gAz/+YAgf/mAJD/5gCU/+YArv/mAM7/5gED/+YBEv/mARb/5gEY/+YBGv/mARz/5gE0/+YBUf/mAfj/5gIC/+YCA//mAgT/5gIF/+YCBv/mAi7/5gIw/+YCMv/mAjT/5gJC/+YCRP/mAkb/5gJI/+YCav/mAmz/5gJu/+YCn//mAvz/5gMJ/+YDL//mAzL/5gNX/+YDY//mA2b/5gOB/+YDg//mA4X/5gPE/+YDxv/mA8j/5gPK/+YDzP/mA87/5gPQ/+YD0v/mA9T/5gPW/+YD2P/mA9r/5gA2ACP/5AA6/9IAO//TAK3/5ACv/+QA1f/SAQj/5AHx/+QB8v/kAfP/5AH0/+QB9f/kAfb/5AH3/+QCC//TAij/5AIq/+QCLP/kApT/0wKW/9MC+P/kAv3/0wMA/+QDDP/TAw3/0gMP/9MDKP/kAzT/0gNL/9MDVf/kA2j/0wNr/9IDbv/kA3D/5AN5/9IDk//SA5j/5AOa/+QDnP/kA57/5AOg/+QDov/kA6T/5AOm/+QDqP/kA6r/5AOs/+QDrv/kA+r/0wPs/9MD7v/TA/j/0gQA/9IEE//TACYADv9GABD/RgAj/80Arf/NAK//zQEI/80BZ/9GAWv/RgFv/0YBcP9GAfH/zQHy/80B8//NAfT/zQH1/80B9v/NAff/zQIo/80CKv/NAiz/zQL4/80DAP/NAyj/zQNV/80Dbv/NA3D/zQOY/80Dmv/NA5z/zQOe/80DoP/NA6L/zQOk/80Dpv/NA6j/zQOq/80DrP/NA67/zQCmAEX/3ABG/9wAR//cAEn/3ABP/8EAUP/BAFH/1gBS/8EAU//cAFf/3QBY/+EAW//hAJH/3ACV/9wAl//dALb/3AC4/+EAvP/BAMP/3ADE/9wAxv/dAOf/wQDr/8EA7P/BAO7/wQDv/8EA8P/BAPL/3ADz/8EA9f/BAPb/wQD5/8EA+//BAP7/3AEA/8EBE//WARX/4QEZ/9wBHf/cATH/wQE1/9wBQP/BAUX/wQFH/9wBSP/cAVL/3AIT/9wCFP/cAhX/3AIW/9wCF//cAhz/wQId/9YCHv/WAh//1gIg/9YCIf/WAiL/3QIj/90CJP/dAiX/3QIm/+ECJ//hAi//3AIx/9wCM//cAjX/3AI3/9wCOf/cAjv/3AI9/9wCP//cAkH/3AJD/9wCRf/cAkf/3AJJ/9wCZP/BAmb/wQJo/8ECaf/BAmv/1gJt/9YCb//WAof/3QKJ/90Ci//dAo3/3QKP/90Ckf/dApX/4QMQ/9wDEv/BAxT/3QMW/9YDGP/hAxv/3QMc/9YDHf/dAzb/3AM3/8EDOP/WAzn/wQM6/9wDO//hAz3/3AM+/8EDQ//BA0T/4QNM/+EDVP/BA1z/3ANd/8EDYf/hA2L/3ANn/9wDaf/hA3X/3AN3/9wDeP/cA37/wQOA/8EDgv/WA4T/3AOG/9YDiv/hA4z/4QOO/+EDkv/BA5X/3AOx/9wDs//cA7X/3AO3/9wDuf/cA7v/3AO9/9wDv//cA8X/1gPH/9YDyf/WA8v/1gPN/9YDz//WA9H/1gPT/9wD1f/cA9f/3APZ/9YD2//cA93/3QPf/90D4f/dA+P/3QPl/90D5//dA+n/3QPr/+ED7f/hA+//4QPz/8ED9f/BA///wQQM/8EEDv/BBBD/wQBxAAT/2gAJ/9oARf/wAEb/8ABH//AASf/wAFP/8ABX/+8AWP/cAFv/3ACR//AAlf/wAJf/7wC2//AAuP/cAMP/8ADE//AAxv/vAPL/8AD+//ABFf/cARn/8AEd//ABNf/wAUf/8AFI//ABUv/wAWX/2gFm/9oBaP/aAWn/2gFq/9oCE//wAhT/8AIV//ACFv/wAhf/8AIi/+8CI//vAiT/7wIl/+8CJv/cAif/3AIv//ACMf/wAjP/8AI1//ACN//wAjn/8AI7//ACPf/wAj//8AJB//ACQ//wAkX/8AJH//ACSf/wAof/7wKJ/+8Ci//vAo3/7wKP/+8Ckf/vApX/3AMQ//ADFP/vAxj/3AMb/+8DHf/vAzb/8AM6//ADO//cAz3/8ANE/9wDTP/cA03/2gNO/9oDUv/aA1z/8ANh/9wDYv/wA2f/8ANp/9wDdf/wA3f/8AN4//ADhP/wA4r/3AOM/9wDjv/cA5X/8AOx//ADs//wA7X/8AO3//ADuf/wA7v/8AO9//ADv//wA9P/8APV//AD1//wA9v/8APd/+8D3//vA+H/7wPj/+8D5f/vA+f/7wPp/+8D6//cA+3/3APv/9wAQwAOAAwAEAAMAEX/5wBG/+cAR//nAEn/5wBT/+cAkf/nAJX/5wC2/+cAw//nAMT/5wDy/+cA/v/nARn/5wEd/+cBNf/nAUf/5wFI/+cBUv/nAWcADAFrAAwBbwAMAXAADAIT/+cCFP/nAhX/5wIW/+cCF//nAi//5wIx/+cCM//nAjX/5wI3/+cCOf/nAjv/5wI9/+cCP//nAkH/5wJD/+cCRf/nAkf/5wJJ/+cDEP/nAzb/5wM6/+cDPf/nA1z/5wNi/+cDZ//nA3X/5wN3/+cDeP/nA4T/5wOV/+cDsf/nA7P/5wO1/+cDt//nA7n/5wO7/+cDvf/nA7//5wPT/+cD1f/nA9f/5wPb/+cAcQAEAAwACQAMAEX/6ABG/+gAR//oAEn/6ABR/+oAU//oAFgACwBbAAsAkf/oAJX/6AC2/+gAuAALAMP/6ADE/+gA8v/oAP7/6AET/+oBFQALARn/6AEd/+gBNf/oAUf/6AFI/+gBUv/oAWUADAFmAAwBaAAMAWkADAFqAAwCE//oAhT/6AIV/+gCFv/oAhf/6AId/+oCHv/qAh//6gIg/+oCIf/qAiYACwInAAsCL//oAjH/6AIz/+gCNf/oAjf/6AI5/+gCO//oAj3/6AI//+gCQf/oAkP/6AJF/+gCR//oAkn/6AJr/+oCbf/qAm//6gKVAAsDEP/oAxb/6gMYAAsDHP/qAzb/6AM4/+oDOv/oAzsACwM9/+gDRAALA0wACwNNAAwDTgAMA1IADANc/+gDYQALA2L/6ANn/+gDaQALA3X/6AN3/+gDeP/oA4L/6gOE/+gDhv/qA4oACwOMAAsDjgALA5X/6AOx/+gDs//oA7X/6AO3/+gDuf/oA7v/6AO9/+gDv//oA8X/6gPH/+oDyf/qA8v/6gPN/+oDz//qA9H/6gPT/+gD1f/oA9f/6APZ/+oD2//oA+sACwPtAAsD7wALAAwAWv/tAFz/7QDp/+0CmP/tApr/7QKc/+0DPP/tA2z/7QN6/+0DlP/tA/n/7QQB/+0ADABa//IAXP/yAOn/8gKY//ICmv/yApz/8gM8//IDbP/yA3r/8gOU//ID+f/yBAH/8gAfAFj/9ABa//IAW//0AFz/8wC4//QA6f/yARX/9AIm//QCJ//0ApX/9AKY//MCmv/zApz/8wMY//QDO//0Azz/8gNE//QDTP/0A2H/9ANp//QDbP/yA3r/8gOK//QDjP/0A47/9AOU//ID6//0A+3/9APv//QD+f/yBAH/8gBRAAT/ygAJ/8oANv/SADj/1AA6//QAO//TAFj/5gBa/+8AW//mALj/5gDN/9IA0f/SANX/9ADZ/+0A3P/hAOn/7wEU/9QBFf/mAS7/0gE2/9IBZf/KAWb/ygFo/8oBaf/KAWr/ygIL/9MCJv/mAif/5gKA/9ICgv/SAoT/0gKU/9MClf/mApb/0wL9/9MDDP/TAw3/9AMP/9MDGP/mAyf/7QMz/9IDNP/0Azv/5gM8/+8DRP/mA0v/0wNM/+YDTf/KA07/ygNS/8oDYP/UA2H/5gNo/9MDaf/mA2v/9ANs/+8Def/0A3r/7wOJ/+0Div/mA4v/7QOM/+YDjf/tA47/5gOP/+EDk//0A5T/7wPq/9MD6//mA+z/0wPt/+YD7v/TA+//5gP2/9ID+P/0A/n/7wP6/+ED/P/hBAD/9AQB/+8EE//TAGIABP/AAAn/wAA2/50AOP/HADr/8AA7/6sAT//SAFD/0gBS/9IAvP/SAM3/nQDP//UA0f+dANX/8ADY//UA2f/qANz/5QDn/9IA6//SAOz/0gDu/9IA7//SAPD/0gDz/9IA9f/SAPb/0gD7/9IBAP/SART/xwEu/50BMf/SATb/nQFA/9IBRf/SAU3/9QFl/8ABZv/AAWj/wAFp/8ABav/AAgv/qwIc/9ICZP/SAmb/0gJo/9ICaf/SAoD/nQKC/50ChP+dApT/qwKW/6sC/f+rAwz/qwMN//ADD/+rAxL/0gMn/+oDM/+dAzT/8AM3/9IDOf/SAz7/0gND/9IDS/+rA03/wANO/8ADUv/AA1T/0gNd/9IDYP/HA2j/qwNr//ADef/wA37/0gOA/9IDif/qA4v/6gON/+oDj//lA5L/0gOT//ADlv/1A+r/qwPs/6sD7v+rA/P/0gP1/9ID9v+dA/j/8AP6/+UD/P/lA///0gQA//AEDP/SBA7/0gQQ/9IEEf/1BBP/qwBlAAT/sQAJ/7EANv+eADj/xQA6//IAO/+oAE//zwBQ/88AUv/PAFr/7wC8/88Azf+eANH/ngDV//IA2f/sANz/4QDn/88A6f/vAOv/zwDs/88A7v/PAO//zwDw/88A8//PAPX/zwD2/88A+//PAQD/zwEU/8UBLv+eATH/zwE2/54BQP/PAUX/zwFl/7EBZv+xAWj/sQFp/7EBav+xAgv/qAIc/88CZP/PAmb/zwJo/88Caf/PAoD/ngKC/54ChP+eApT/qAKW/6gC/f+oAwz/qAMN//IDD/+oAxL/zwMn/+wDM/+eAzT/8gM3/88DOf/PAzz/7wM+/88DQ//PA0v/qANN/7EDTv+xA1L/sQNU/88DXf/PA2D/xQNo/6gDa//yA2z/7wN5//IDev/vA37/zwOA/88Dif/sA4v/7AON/+wDj//hA5L/zwOT//IDlP/vA+r/qAPs/6gD7v+oA/P/zwP1/88D9v+eA/j/8gP5/+8D+v/hA/z/4QP//88EAP/yBAH/7wQM/88EDv/PBBD/zwQT/6gARAA2/74AT//hAFD/4QBS/+EAWP/vAFv/7wC4/+8AvP/hAM3/vgDR/74A5//hAOv/4QDs/+EA7v/hAO//4QDw/+EA8//hAPX/4QD2/+EA+//hAQD/4QEV/+8BLv++ATH/4QE2/74BQP/hAUX/4QIc/+ECJv/vAif/7wJk/+ECZv/hAmj/4QJp/+ECgP++AoL/vgKE/74Clf/vAxL/4QMY/+8DM/++Azf/4QM5/+EDO//vAz7/4QND/+EDRP/vA0z/7wNU/+EDXf/hA2H/7wNp/+8Dfv/hA4D/4QOK/+8DjP/vA47/7wOS/+ED6//vA+3/7wPv/+8D8//hA/X/4QP2/74D///hBAz/4QQO/+EEEP/hAFsANv/mADj/5wA6//IAO//nAE//1gBQ/9YAUv/WAFr/8QC8/9YAzf/mANH/5gDV//IA2f/uANz/6ADn/9YA6f/xAOv/1gDs/9YA7v/WAO//1gDw/9YA8//WAPX/1gD2/9YA+//WAQD/1gEU/+cBLv/mATH/1gE2/+YBQP/WAUX/1gIL/+cCHP/WAmT/1gJm/9YCaP/WAmn/1gKA/+YCgv/mAoT/5gKU/+cClv/nAv3/5wMM/+cDDf/yAw//5wMS/9YDJ//uAzP/5gM0//IDN//WAzn/1gM8//EDPv/WA0P/1gNL/+cDVP/WA13/1gNg/+cDaP/nA2v/8gNs//EDef/yA3r/8QN+/9YDgP/WA4n/7gOL/+4Djf/uA4//6AOS/9YDk//yA5T/8QPq/+cD7P/nA+7/5wPz/9YD9f/WA/b/5gP4//ID+f/xA/r/6AP8/+gD///WBAD/8gQB//EEDP/WBA7/1gQQ/9YEE//nAIQAIwAQACX/6AAp/+gAMf/oADP/6AA2/+AAOP/gADv/3wCB/+gAkP/oAJT/6ACtABAArv/oAK8AEADN/+AAzv/oAM8AEADR/+AA2AAQANz/4QDtABAA9P/gAP8AEAED/+gBCAAQARL/6AEU/+ABFv/oARj/6AEa/+gBHP/oAS7/4AE0/+gBNv/gAU0AEAFR/+gB8QAQAfIAEAHzABAB9AAQAfUAEAH2ABAB9wAQAfj/6AIC/+gCA//oAgT/6AIF/+gCBv/oAgv/3wIoABACKgAQAiwAEAIu/+gCMP/oAjL/6AI0/+gCQv/oAkT/6AJG/+gCSP/oAmr/6AJs/+gCbv/oAoD/4AKC/+AChP/gApT/3wKW/98Cn//oAvgAEAL8/+gC/f/fAwAAEAMJ/+gDDP/fAw//3wMoABADL//oAzL/6AMz/+ADS//fA1UAEANX/+gDYP/gA2P/6ANm/+gDaP/fA24AEANwABADgf/oA4P/6AOF/+gDj//hA5D/4AOWABADlwAQA5gAEAOaABADnAAQA54AEAOgABADogAQA6QAEAOmABADqAAQA6oAEAOsABADrgAQA8T/6APG/+gDyP/oA8r/6APM/+gDzv/oA9D/6APS/+gD1P/oA9b/6APY/+gD2v/oA+r/3wPs/98D7v/fA/b/4AP6/+ED+//gA/z/4QP9/+AEEQAQBBIAEAQT/98ALQA2//EAOP/0ADr/9AA7//AAzf/xAM//9QDR//EA1f/0ANj/9QDZ//MBFP/0AS7/8QE2//EBTf/1Agv/8AKA//ECgv/xAoT/8QKU//AClv/wAv3/8AMM//ADDf/0Aw//8AMn//MDM//xAzT/9ANL//ADYP/0A2j/8ANr//QDef/0A4n/8wOL//MDjf/zA5P/9AOW//UD6v/wA+z/8APu//AD9v/xA/j/9AQA//QEEf/1BBP/8ABZACMADwA2/+YAOP/mADoADgA7/+YArQAPAK8ADwDN/+YAzwAOANH/5gDVAA4A2AAOANkACwDc/+UA7QAPAPT/6AD/AA8BCAAPART/5gEu/+YBNv/mAU0ADgHxAA8B8gAPAfMADwH0AA8B9QAPAfYADwH3AA8CC//mAigADwIqAA8CLAAPAoD/5gKC/+YChP/mApT/5gKW/+YC+AAPAv3/5gMAAA8DDP/mAw0ADgMP/+YDJwALAygADwMz/+YDNAAOA0v/5gNVAA8DYP/mA2j/5gNrAA4DbgAPA3AADwN5AA4DiQALA4sACwONAAsDj//lA5D/6AOTAA4DlgAOA5cADwOYAA8DmgAPA5wADwOeAA8DoAAPA6IADwOkAA8DpgAPA6gADwOqAA8DrAAPA64ADwPq/+YD7P/mA+7/5gP2/+YD+AAOA/r/5QP7/+gD/P/lA/3/6AQAAA4EEQAOBBIADwQT/+YALQAE/78ACf+/ADb/nwA4/8kAO/+tAM3/nwDR/58A2f/sANz/5gEU/8kBLv+fATb/nwFl/78BZv+/AWj/vwFp/78Bav+/Agv/rQKA/58Cgv+fAoT/nwKU/60Clv+tAv3/rQMM/60DD/+tAyf/7AMz/58DS/+tA03/vwNO/78DUv+/A2D/yQNo/60Dif/sA4v/7AON/+wDj//mA+r/rQPs/60D7v+tA/b/nwP6/+YD/P/mBBP/rQAuADb/4wA6/+UAO//kAM3/4wDP/+UA0f/jANX/5QDY/+UA2f/pAO3/6gD//+oBLv/jATb/4wFN/+UCC//kAoD/4wKC/+MChP/jApT/5AKW/+QC/f/kAwz/5AMN/+UDD//kAyf/6QMz/+MDNP/lA0v/5ANo/+QDa//lA3n/5QOJ/+kDi//pA43/6QOT/+UDlv/lA5f/6gPq/+QD7P/kA+7/5AP2/+MD+P/lBAD/5QQR/+UEEv/qBBP/5AAhADb/4gA6/+QAzf/iAM//5ADR/+IA1f/kANj/5ADZ/+kA7f/rAP//6wEu/+IBNv/iAU3/5AKA/+ICgv/iAoT/4gMN/+QDJ//pAzP/4gM0/+QDa//kA3n/5AOJ/+kDi//pA43/6QOT/+QDlv/kA5f/6wP2/+ID+P/kBAD/5AQR/+QEEv/rABcANv/rADv/8wDN/+sA0f/rAS7/6wE2/+sCC//zAoD/6wKC/+sChP/rApT/8wKW//MC/f/zAwz/8wMP//MDM//rA0v/8wNo//MD6v/zA+z/8wPu//MD9v/rBBP/8wAvAE//7wBQ/+8AUv/vAFr/8AC8/+8A5//vAOn/8ADr/+8A7P/vAO7/7wDv/+8A8P/vAPP/7wD1/+8A9v/vAPv/7wEA/+8BMf/vAUD/7wFF/+8CHP/vAmT/7wJm/+8CaP/vAmn/7wMS/+8DN//vAzn/7wM8//ADPv/vA0P/7wNU/+8DXf/vA2z/8AN6//ADfv/vA4D/7wOS/+8DlP/wA/P/7wP1/+8D+f/wA///7wQB//AEDP/vBA7/7wQQ/+8AHQAE//IACf/yAFj/9QBb//UAuP/1ARX/9QFl//IBZv/yAWj/8gFp//IBav/yAib/9QIn//UClf/1Axj/9QM7//UDRP/1A0z/9QNN//IDTv/yA1L/8gNh//UDaf/1A4r/9QOM//UDjv/1A+v/9QPt//UD7//1ACsAT//uAFD/7gBS/+4AvP/uAOf/7gDr/+4A7P/uAO7/7gDv/+4A8P/uAPP/7gD0/+0A9f/uAPb/7gD7/+4BAP/uATH/7gFA/+4BRf/uAhz/7gJk/+4CZv/uAmj/7gJp/+4DEv/uAzf/7gM5/+4DPv/uA0P/7gNU/+4DXf/uA37/7gOA/+4DkP/tA5L/7gPz/+4D9f/uA/v/7QP9/+0D///uBAz/7gQO/+4EEP/uAAoABP/1AAn/9QFl//UBZv/1AWj/9QFp//UBav/1A03/9QNO//UDUv/1AFQARf/wAEb/8ABH//AASf/wAFH/xwBT//AAkf/wAJX/8AC2//AAw//wAMT/8ADy//AA/v/wARP/xwEZ//ABHf/wATX/8AFH//ABSP/wAVL/8AIT//ACFP/wAhX/8AIW//ACF//wAh3/xwIe/8cCH//HAiD/xwIh/8cCL//wAjH/8AIz//ACNf/wAjf/8AI5//ACO//wAj3/8AI///ACQf/wAkP/8AJF//ACR//wAkn/8AJr/8cCbf/HAm//xwMQ//ADFv/HAxz/xwM2//ADOP/HAzr/8AM9//ADXP/wA2L/8ANn//ADdf/wA3f/8AN4//ADgv/HA4T/8AOG/8cDlf/wA7H/8AOz//ADtf/wA7f/8AO5//ADu//wA73/8AO///ADxf/HA8f/xwPJ/8cDy//HA83/xwPP/8cD0f/HA9P/8APV//AD1//wA9n/xwPb//AAjwAEAA0ACQANAEP/8ABF/8AARv/AAEf/wABJ/8AAUf/iAFP/wABYAAsAWwALAJH/wACV/8AAtv/AALgACwDE/8AA7f/XAPL/wAD+/8AA///XARP/4gEVAAsBGf/AAR3/wAE1/8ABR//AAUj/wAFS/8ABZQANAWYADQFoAA0BaQANAWoADQIM//ACDf/wAg7/8AIP//ACEP/wAhH/8AIS//ACE//AAhT/wAIV/8ACFv/AAhf/wAId/+ICHv/iAh//4gIg/+ICIf/iAiYACwInAAsCKf/wAiv/8AIt//ACL//AAjH/wAIz/8ACNf/AAjf/wAI5/8ACO//AAj3/wAI//8ACQf/AAkP/wAJF/8ACR//AAkn/wAJr/+ICbf/iAm//4gKVAAsDEP/AAxb/4gMYAAsDHP/iAzX/8AM2/8ADOP/iAzr/wAM7AAsDPf/AA0QACwNMAAsDTQANA04ADQNSAA0DVv/wA1z/wANhAAsDYv/AA2f/wANpAAsDb//wA3H/8AN1/8ADd//AA3j/wAOC/+IDhP/AA4b/4gOKAAsDjAALA44ACwOV/8ADl//XA5n/8AOb//ADnf/wA5//8AOh//ADo//wA6X/8AOn//ADqf/wA6v/8AOt//ADr//wA7H/wAOz/8ADtf/AA7f/wAO5/8ADu//AA73/wAO//8ADxf/iA8f/4gPJ/+IDy//iA83/4gPP/+ID0f/iA9P/wAPV/8AD1//AA9n/4gPb/8AD6wALA+0ACwPvAAsEEv/XAAgA7QAQAPT/8AD/ABADkP/wA5cAEAP7//AD/f/wBBIAEABFAEX/7gBG/+4AR//uAEn/7gBT/+4Akf/uAJX/7gC2/+4Aw//uAMT/7gDtAA4A8v/uAPT/4wD+/+4A/wAOARn/7gEd/+4BNf/uAUf/7gFI/+4BUv/uAhP/7gIU/+4CFf/uAhb/7gIX/+4CL//uAjH/7gIz/+4CNf/uAjf/7gI5/+4CO//uAj3/7gI//+4CQf/uAkP/7gJF/+4CR//uAkn/7gMQ/+4DNv/uAzr/7gM9/+4DXP/uA2L/7gNn/+4Ddf/uA3f/7gN4/+4DhP/uA5D/4wOV/+4DlwAOA7H/7gOz/+4Dtf/uA7f/7gO5/+4Du//uA73/7gO//+4D0//uA9X/7gPX/+4D2//uA/v/4wP9/+MEEgAOABcAWP/AAFv/wAC4/8AA9P/uARX/wAIm/8ACJ//AApX/wAMY/8ADO//AA0T/wANM/8ADYf/AA2n/wAOK/8ADjP/AA47/wAOQ/+4D6//AA+3/wAPv/8AD+//uA/3/7gAfAFj/9ABa//AAW//0ALj/9ADp//AA7f/zAP//8wEV//QCJv/0Aif/9AKV//QDGP/0Azv/9AM8//ADRP/0A0z/9ANh//QDaf/0A2z/8AN6//ADiv/0A4z/9AOO//QDlP/wA5f/8wPr//QD7f/0A+//9AP5//AEAf/wBBL/8wAKAAT/1gAJ/9YBZf/WAWb/1gFo/9YBaf/WAWr/1gNN/9YDTv/WA1L/1gAMAFr/4ADp/+AA9P/CAzz/4ANs/+ADev/gA5D/wgOU/+AD+f/gA/v/wgP9/8IEAf/gAAQA9P/SA5D/0gP7/9ID/f/SAAoABP/XAAn/1wFl/9cBZv/XAWj/1wFp/9cBav/XA03/1wNO/9cDUv/XAF4ABAALAAkACwBF/+sARv/rAEf/6wBJ/+sAUf/pAFP/6wCR/+sAlf/rALb/6wDD/+sAxP/rAPL/6wD+/+sBE//p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ANcCYwJvANgCcQJxAOUCcwJzAOYCdQJ1AOcCgAKAAOgCggKCAOkChAKEAOoChgKGAOsCiAKIAOwCigKKAO0CjAKMAO4CjgKOAO8CkAKQAPACkgKSAPEClAKXAPICmQKZAPYCmwKbAPcC+AL9APgDAAMPAP4DEgMSAQ4DFgMWAQ8DGAMYARADHAMcAREDHwMgARIDIgMrARQDLQMvAR4DMQM2ASEDOAM5AScDOwM+ASkDRANFAS0DRwNHAS8DSQNJATADSwNOATEDUgNXATUDWgNaATsDXANcATwDYANhAT0DZgNmAT8DaANxAUADdAN1AUoDdwN6AUwDgQOCAVADhgOGAVIDiAOOAVMDkwOUAVoDmAPAAVwDwgPCAYUDxAPRAYYD2QPZAZQD3APcAZUD3gPeAZYD6gPvAZcD8gPyAZ0D9AP0AZ4D9gP2AZ8D+AP5AaAD/gQBAaIEBAQEAaYEBgQHAacECQQJAakEDQQNAaoEDwQPAasEEwQTAawAAQAGAAoAKAAzADQAPQBIAAEALABIAE0AVgBZAF0AmQCwALIAswC0ALsAvgDAAMUAxwDIAMkAzQDPANAA0QDTANQA1gDeAN8A4gDjAOQA5QDmAOgA6gDsAPEA8wD2APcA+wD+AP8BAAEdAdwAAgB2AAQABAAAAAkACQABAA4ADgACABAAEAADACMAJwAEACoAMgAJADYAPAASAEMARQAZAEcARwAcAEoASgAdAE8AUgAeAFQAVAAiAFgAWAAjAFoAXAAkAIgAiAAnAKwArwAoALgAuAAsALwAvAAtAMIAwgAuAM8A0AAvANIA0gAxANUA1QAyANcA2QAzANsA2wA2AN0A3QA3AN8A3wA4AOEA4QA5AOcA5wA6AOkA6QA7APIA8gA8APcA9wA9APkA+gA+AP8BAABAAQUBBQBCAQgBCABDARMBFQBEAScBKQBHASwBLABKAS4BLgBLAUUBRQBMAWUBawBNAW8BcABUAewB7QBWAe8B7wBYAfECFwBZAhwCIQCAAiYCNgCGAjgCQQCXAkoCTAChAk4CTgCkAlACUAClAlICUgCmAlQCVACnAlcCVwCoAlkCWQCpAlsCWwCqAl0CXQCrAl8CXwCsAmECYQCtAmMCbwCuAnECcQC7AnMCcwC8AnUCdQC9AoACgAC+AoICggC/AoQChADAAoYChgDBAogCiADCAooCigDDAowCjADEAo4CjgDFApACkADGApICkgDHApQCnADIAvgC/QDRAwADDwDXAxIDEgDnAxYDFgDoAxgDGADpAxwDHADqAx8DIADrAyIDKwDtAy0DLwD3AzEDNgD6AzgDPgEAA0QDRQEHA0cDRwEJA0kDSQEKA0sDTgELA1IDVwEPA1oDWgEVA1wDXAEWA2ADYQEXA2YDcQEZA3QDdQElA3cDegEnA4EDggErA4YDhgEtA4gDjgEuA5MDlAE1A5gDwAE3A8IDwgFgA8QD0QFhA9kD2QFvA9wD3AFwA94D3gFxA+oD7wFyA/ID8gF4A/QD9AF5A/YD9gF6A/gD+QF7A/4EAQF9BAQEBAGBBAYEBwGCBAkECQGEBA0EDQGFBA8EDwGGBBMEEwGHAAIBOAAEAAQAHQAJAAkAHQAOAA4AHgAQABAAHgAkACQAAQAlACUABAAmACYAAwAnACcABQAqACsAAgAsACwADAAtAC0ACQAuAC4ACgAvADAAAgAxADEAAwAyADIACwA2ADYABgA3ADcADAA4ADgADQA5ADkAEAA6ADoADgA7ADsADwA8ADwAEQBDAEMAEwBEAEQAFQBFAEUAFABHAEcAFgBKAEoAFwBPAFAAFwBRAFEAGABSAFIAFQBUAFQAGgBYAFgAGQBaAFoAGwBbAFsAGQBcAFwAHACIAIgAFQCsAKwABwCuAK4AAwC4ALgAGQC8ALwAFwDCAMIAFQDPANAAHwDSANIAAgDVANUADgDXANgAAgDZANkAEgDbANsAAgDdAN0AAgDfAN8AHwDhAOEAHwDnAOcACADpAOkAGwDyAPIAFQD3APcAIAD5APkAIAD6APoAFQD/AQAAIAEFAQUAIAETARMAGAEUARQADQEVARUAGQEnAScAFQEoASgABwEpASkACAEsASwACQEuAS4ACQFFAUUACAFlAWYAHQFnAWcAHgFoAWoAHQFrAWsAHgFvAXAAHgHsAe0AAwHvAe8ABgH4AfgABAH5AfwABQH9AgEAAgICAgYAAwIHAgoADAILAgsADwIMAhIAEwITAhMAFAIUAhcAFgIcAhwAFwIdAiEAGAImAicAGQIpAikAEwIrAisAEwItAi0AEwIuAi4ABAIvAi8AFAIwAjAABAIxAjEAFAIyAjIABAIzAjMAFAI0AjQABAI1AjUAFAI2AjYAAwI4AjgABQI5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AAAAEgAAAAAAAAAAAAAAAAAAAAAAAAAGAAQABwAFAAYAAAAGABYABgAAAAYAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAkAAAAAAAYAFgAMAAAAAAAAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAJAAAAFgAWAAAAAAAAAAAAAgAAAAAAAAAGABYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGQAZAAAACwALABUACwALAAsAFQAAAAAAAAAVABUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkAAAAAAAAAAAAAABIAEgASABIAEgASABIABgAAAAAAAAAAAAAAAAAAAAAAAAAGAAYABgAGAAYACAAIAAgACAAKABsAGwAbABsAGwAbABsAFgAWABYAFgAWAAAAAAAAAAAACQAEAAQABAAEAAQADQANAA0ADQAFAAUAEgAbABIAGwASABsABgAWAAYAFgAGABYABgAWAAAAFgAAABYAAAAWAAAAFgAAABYAAAAWAAYAFgAGABYABgAWAAYAFgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAkAAAAJAAkABgAEAAYABAAGAAQAAAAAAAAAAAAAAAAAGgAYABoAGAAaABgAGgAYABoAGAAMAAAADAAAAAwAAAAIAA0ACAANAAgADQAIAA0ACAANAAgADQAPAAAACgAFAAoAFAABABQAAQAUAAEAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAYACgAAAAAAEgAAAAAAFAAAAAAAAAAAAAAABgAAAAAACgATAAAACgAWAAAACQAAAA0AAAAEAAAABQAAAAAADQAEAA0AAAAAAAAAAAAAAAAAHAAAAAAAEQASAAAAAAAAAAAAAAAAAAYAAAAAAAYADAATABsAFgAJAAQACQAWAAUAFwAWAAkAGAAAAAAAAAAJAAUADwAAAA8AAAAPAAAACgAFAAsACwAAAAAAAAALAAAACQASABsABgAAAAAAAAAAABYACQAAAAAABwAFABYABgAAAAAABgAWAAoABQAAABMAFwAAABIAGwASABsAAAAAAAAAFgAAABYAFgATABcAAAAAAAAACQAAAAkABgAEAAYAFgAGAAQAAAAAABEABQARAAUAEQAFAA4AAwAAAAkAEwAXABYAAgAQABIAGwASABsAEgAbABIAGwASABsAEgAbABIAGwASABsAEgAbABIAGwASABsAEgAbAAAAFgAAABYAAAAWAAAAFgAAABYAAAAWAAAAFgAAABYAAAAAAAAAAAAGAAQABgAEAAYABAAGAAQABgAEAAYABAAGAAQABgAWAAYAFgAGABYABgAEAAYAFgAIAA0ACAANAAAADQAAAA0AAAANAAAADQAAAA0ACgAFAAoABQAKAAUAAAAAAAAACQAAAAkADAAAABMAFwAOAAMADgADAAAACQATABcAAAAAAAAAAAAAAAAAAAAAAAAAAAAJAAAACQAAAAkAAgAQAAoAAAAAAAAAAAAAABkAAAABAAAACgAsAI4AAURGTFQACAAEAAAAAP//AAgAAAABAAIAAwAEAAUABgAHAAhsaWdhADJsbnVtADhzbWNwAD5zczAxAERzczAyAEpzczAzAFBzczA0AFZzczA1AFwAAAABAAEAAAABAAIAAAABAAAAAAABAAMAAAABAAQAAAABAAUAAAABAAYAAAABAAcACAASABoAIgAqADIAOgBCAEoAAQAAAAEAQAAEAAAAAQH2AAEAAAABAgAAAQAAAAECEgABAAAAAQIQAAEAAAABAg4AAQAAAAECDAABAAAAAQIOAAICEADcAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AegBtQG2AbcBuAG5AboBuwG8Ab0BvgGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAHoAbUBtgG3AbgBuQG6AbsBvAG9Ab4C9wKiAqECogKjAqMCpAKlAqYCpwKoAqkCqgKrAqwCrQKuAq8CsAKxArICswK0ArUCtgK3ArgCuQK6ArsCvAK9Ar4CpAKlAqYCpwKoAqkCqgKrAqwCrQKuAq8CsAKxArICswK0ArUCtgK3ArgCuQK6ArsCvAK9Ar4C8wK/Ar8CwALAAsECwQLCAsICwwLDAsUCxQLGAsYCxwLHAsgCyALJAskCygLKAssCywLMAswCzQLNAs8CzwLQAtAC0QLRAtIC0gLTAtMC1ALUAtUC1gLWAtcC1wLYAtgC2QLZAtoC2gLbAtsC3ALcAt0C3QLeAt4C3wLfAuAC4ALhAuEC4gLiAuMC4wLkAuQC5QLlAuYC5gLnAucC6ALo/////wLqAuoC6wLrAuwC7ALtAu0C7gLuAu8C7wLwAvAC8QLxAvIC8gLzAvQC9AL1AvUC9gL2AqEAAQCkAAEACAABAAQBkgACAEsAAgCYAAoBmAHMAcQB1gHXAdgB2QHbAd0B5wABAIgBkQABAIgBKAABAIgBrgACAIgAAgHjAeQAAgB+AAIB5QHmAAIADQAjADwAAABDAFwAGgCDAIMANACFAIUANQHsAe0ANgHvAjEAOAI0AkUAewJIAlQAjQJXAmgAmgJqAnsArAJ+An8AvgKCApwAwAPwA/AA2wABAAEASAACAAEAEgAbAAAAAQABAEkAAQABALYAAQABADQAAQACAC0ATQ==","Roboto-Regular.ttf":"AAEAAAAOAIAAAwBgR0RFRgsuCy8AASx0AAAASEdQT1OC3T4oAAEsvAAAkPhHU1VCeolvLwABvbQAAANsT1MvMrivKcMAAAFoAAAAYFZETVhu6nZPAAASOAAABeBjbWFwf76BZgAAGBgAAA7iZ2x5ZusE9WMAACb8AADUeGhlYWT1kQ7EAAAA7AAAADZoaGVhC3AJkwAAASQAAAAkaG10eJaDaacAAAHIAAAQcGxvY2EvrvnGAAD7dAAACDptYXhwBDsA9gAAAUgAAAAgbmFtZbs83bQAAQOwAAAEeXBvc3Tfb5xiAAEILAAAJEYAAQAAAAEAAHdFsyVfDzz1AAkIAAAAAADE8BEuAAAAAM2CsmH6jf3VCXQIYgAAAAkAAgAAAAAAAAABAAAHbP4MAAAJkvqN/dgJdAABAAAAAAAAAAAAAAAAAAAEHAABAAAEHACXABYAXQAFAAEAAAAAAAAAAAAAAAAAAwABAAMElwGQAAUAAAWaBTMAAAEfBZoFMwAAA9EAZgIAAAAAAAAAAAAAAAAA4AAC/1AAIFsAAAAgAAAAAHB5cnMAQAAA//0GAP4AAGYHmgIAIAABn08BAAAEOgWwAAAAIAACAfsAAAAAAAAB+wAAAfsAAAKPAGkE+wBGBH4AbgXcAGkE+QBEAWUAZwKhAIUCqgAIA3IAHASJAE4BkgAdAjUAJQIbAKIDTAASBH4AcgR+ANcEfgBdBH4AXgR+ADkEfgCaBH4AhwR+AE0EfgBmBH4AVAH4AKACAABKBBEASASAAJgELgCGA8cAOgcvAGEFSgAnBRcAtgUeAIMFaQC2BKoAtgSnALYFfgCFBbMAtgI/AMMEagA/BSQAtgRgALYHAwC2BbQAtgWQAIIFGQC2BZAAggVMALUE4wBaBMYAOwVoAJYFKQAnBw0ASAUJAEEE8gAeBMkAYQIfAJIDSAAoAh8ACQNYAEADnAAEAnkATwRiAHIEiACRBDsAYQSIAGQENwBiAr4AQgSIAGYEiACRAfwAoQIL/7YEEwCSAfwAoQcCAJAEiACRBIgAYASIAJEEiABkAsoAkQQrAGYCjAAdBIgAjQQCAC4GDgAwBAIALgQCABsEAgBeArUAQAHzAK8CtQATBXEAggHzAJAEYQBuBKYARgW0AGkE2AAgAesAkwToAFoD9ACpBkkAWwOTAHoDwQBmBG4AfwZKAFoDqgB4Av0AggRHAGEDXwBxA2gAaQKCAIEEiACaA+kAQgIWAKIB+wB0AiYAXgOjAHoDwABvBjYAtAaWALQG6wB7A+0AcQd6//IERABZBXIAcwS6AKYEwgCLBsEAPQSwAEwEkQBHBIkAYAScAJoFmwAeAfoAmwRzAJoEMwAmAioAIwWLAKQEiACRB6EAaQdEAGEB/ACgArn/5AV/AHEEkwBgBZAAlgTzAI0CA/+0BDcAYgPEAKkDjQCMA2oAgQIhAKACtQCLAioAMgPGAIIC/ABoAp0AtgAA/NoAAP13AAD8kwAA/V4AAPwnAAD9QwINAMMECwChAhcAogRzALUFpAAgBXIAcwU+ADQEkQB6BbUAtgSRAEUFuwBOBYkAXQVSAHIEhQBkBL0AoAQCAC4EiABgBFAAYwQlAG0EiACRBI8AegKXAMMEbgAlA+wAZQTFAE8EiACRBE0AZQSIAGAELABRBF0AjwWjAFcFmgBfBpcAegTwAHQEQv/nBkgASgX/ACsFZQCHCJkAMgikALUGggBABbQAtQULAKYGBAA0B0MAGwS/AFEFtAC2BakAMAUHAFEGLQBTBdkAtAV6AJcHhwC0B8AAtAYSABEG6wC1BQUApgVkALEHJwDDBRgAYwRsAGEEkgCdA1sAmgTUAC4GIAAVBBAAWASeAJwEUgCcBKAAKAXvAJ0EnQCcBJ4AnAPYACgFzQBkBL0AnARZAGcGeACcBp8AkQT3AB4GNgCdBFgAnQRNAGQGiACdBGQALwSJ/+cETgBsBskAJwbkAJwEif/9BJ4AnAcIAJ8GKwCBBFb/3AcsAMQF+QCZBNIAKgRGAA8HDADWBgwAvAbRAJYF4QCWCQUAwwfRAJsEJABQA9sATAVyAHMEjABgBQoAFwQDAC4FcgBzBIkAYAcBAJ8GJAB+BwkAnwYsAIEFMgB4BEcAZAT9AHQAAPxnAAD8cQAA/WYAAP2kAAD6jQAA+qQEVv/cBRsAtQSKAJEEZACmA5AAkQTbALUEBgCRBQkApgR+AJoGjABFBYQAPgfPALUFtACRCDEAtAb0AJEF7gBzBNMAbQctADQFXAAfBXAAlwRrAIMFcACOBi8ARwS+/+MFCQCmBFoAmgWyALUEiACRBYcAXwSoAGkEqABpBLcAOgNJADsE9gBZBpQAWQbkAGQGVgA2BSsAMQRKAFMECAB5B8EARQZ1AD8H+wCtBqEAkAT2AHkEHQBlBa0AJAUgAEYFZACbBBQAAAgpAAAEFAAACCkAAAK5AAACCgAAAVwAAAR/AAACMAAAAaIAAADRAAAAAAAABYgAswZ9ALsDpgANAZkAYAGZADABlwAkAZoAUALUAGAC2wA8AsEAJARpAEYEjwBXArIAigPEAKYFWgCmB6oARAJmAGwCZgBZA6MAOwOrAEgDYAB6BKYARgaRAKcEPgBPBegAewPOAGgIywCrBQEAZgUXAJgGuwBvB1AAawd/AGwG2wBrBKIATAWOAKkErwBFBJIAqATFAD8IOgBrAgz/tASCAGUELQCYBDYAngQ8AJkECAArAkwAxwKPAG4CAwBcBG4AHwAAAAAIMwBbCDUAXAQcAFwDjQBXBIAAcwML/6IB/P+2AiUAGwGRAGcDpACDA54AgQOfAIED9ABtBA4AaQPz/14D7wBuA6QAWwH9AJ8EtQApBHUAmwSPAHIEpgCbBEMAmwQdAJsEzwByBPYAmwH6AJsECwBBBF0AmwO5AJsF9ACbBRkAmwTLAHIE4QByBKkAmwRvAF0ELABHBQIAjAS4ACoGBQBBBIQAOAReACAEPgBOBHcAewJpAEID4QBaBBIAWQRkAEcEaQBdBC0AegO5AEcELQBcBCcASwInAF4DVQBxA2gAaQL8AEoDeQByA3oAewMMAF4DggByA2sAaQOkAHwDlgCPArUAngNHAG8EfgBeBH4AOQR+AJoEjwCHBDoAHgRCADsEbwBaBH4AZgTDAGQEiABgBUQAtgRiAHIFLwC1BSQAtgQTAJIFPQC2BA8AkgR+AFQEdQCbA2oAgQH7AAACNQAlBYcALgWHAC4EpgAGBMYAOwKM/+MFSgAnBUoAJwVKACcFSgAnBUoAJwVKACcFSgAnBR4AgwSqALYEqgC2BKoAtgSqALYCP//cAj8AwwI///ICP//MBbQAtgWQAIIFkACCBZAAggWQAIIFkACCBWgAlgVoAJYFaACWBWgAlgTyAB4EYgByBGIAcgRiAHIEYgByBGIAcgRiAHIEYgByBDsAYQQ3AGIENwBiBDcAYgQ3AGIB+v+1AfoAmwH6/8sB+v+lBIgAkQSIAGAEiABgBIgAYASIAGAEiABgBIgAjQSIAI0EiACNBIgAjQQCABsEAgAbBUoAJwRiAHIFSgAnBGIAcgVKACcEYgByBR4AgwQ7AGEFHgCDBDsAYQUeAIMEOwBhBR4AgwQ7AGEFaQC2BR4AZASqALYENwBiBKoAtgQ3AGIEqgC2BDcAYgSqALYENwBiBKoAtgQ3AGIFfgCFBIgAZgV+AIUEiABmBX4AhQSIAGYFfgCFBIgAZgWzALYEiACRAj//xQH6/54CP/+/Afr/mAI///UB+v/OAj8AIQH8AAACPwC3BqkAwwQHAKEEagA/AgP/tAUkALYEEwCSBGAAtgH8AKEEYAC2AfwAWwRgALYCkgChBGAAtgLYAKEFtAC2BIgAkQW0ALYEiACRBbQAtgSIAJEEiP/SBZAAggSIAGAFkACCBIgAYAWQAIIEiABgBUwAtQLKAJEFTAC1AsoAWAVMALUCygBpBOMAWgQrAGYE4wBaBCsAZgTjAFoEKwBmBOMAWgQrAGYE4wBaBCsAZgTGADsCjAAdBMYAOwKMAB0ExgA7ArQAHQVoAJYEiACNBWgAlgSIAI0FaACWBIgAjQVoAJYEiACNBWgAlgSIAI0FaACWBIgAjQcNAEgGDgAwBPIAHgQCABsE8gAeBMkAYQQCAF4EyQBhBAIAXgTJAGEEAgBeB3r/8gbBAD0FcgBzBIkAYASm//MEpv/zBCwARwS1ACkEtQApBLUAKQS1ACkEtQApBLUAKQS1ACkEjwByBEMAmwRDAJsEQwCbBEMAmwH6/7MB+gCbAfr/yQH6/6MFGQCbBMsAcgTLAHIEywByBMsAcgTLAHIFAgCMBQIAjAUCAIwFAgCMBF4AIAS1ACkEtQApBLUAKQSPAHIEjwByBI8AcgSPAHIEpgCbBEMAmwRDAJsEQwCbBEMAmwRDAJsEzwByBM8AcgTPAHIEzwByBPYAmwH6/5wB+v+WAfr/zAH6//cB+gCPBAsAQQRdAJsDuQCbA7kAmwO5AJsDuQCbBRkAmwUZAJsFGQCbBMsAcgTLAHIEywByBKkAmwSpAJsEqQCbBG8AXQRvAF0EbwBdBG8AXQQsAEcELABHBQIAjAUCAIwFAgCMBQIAjAUCAIwFAgCMBgUAQQReACAEXgAgBD4ATgQ+AE4EPgBOCN4AXQVKACcFDv/mBhcAEwKjABkFpABSBVb/jQVmAD8Cl//IBUoAJwUXALYEqgC2BMkAYQWzALYCPwDDBSQAtgcDALYFtAC2BZAAggUZALYExgA7BPIAHgUJAEECP//MBPIAHgSFAGQEUABjBIgAkQKXAMMEXQCPBHMAmgSIAGAEiACaBAIALgQCAC4Cl//TBF0AjwSIAGAEXQCPBpcAegSqALYEcwC1BOMAWgI/AMMCP//MBGoAPwUkALYFJAC2BQcAUQVKACcFFwC2BHMAtQSqALYFtAC2BwMAtgWzALYFkACCBbUAtgUZALYFHgCDBMYAOwUJAEEEYgByBDcAYgSeAJwEiABgBIgAkQQ7AGEEAgAbBAIALgQ3AGIDWwCaBCsAZgH8AKEB+v+lAgv/tgRSAJwEAgAbBw0ASAYOADAHDQBIBg4AMAcNAEgGDgAwBPIAHgQCABsBZQBnAo8AaQQeAKkEugBCAgP/tAGZADAHAwC2BwIAkAVKACcEYgByBZD/PgcsAEIHeABCBKoAtgW0ALYENwBiBJ4AnAWJAF0FmgBfBQoAFwQD//kIigBgCZIAggS/AFEEEABYBR4AgwQ7AGEE8gAeBAIALgI/AMMHQwAbBiAAFQI/AMMFSgAnBGIAcgVKACcEYgByB3r/8gbBAD0EqgC2BDcAYgWHAF8ENwBiBDcAYgdDABsGIAAVBL8AUQQQAFgFtAC2BJ4AnAW0ALYEngCcBZAAggSIAGAFcgBzBIwAYAVyAHMEjABgBWQAsQRNAGQFBwBRBAIAGwUHAFEEAgAbBQcAUQQCABsFegCXBFkAZwbrALUGNgCdBQkAQQQCAC4EiABkBakAMASgACgFSgAnBGIAcgVKACcEYgByBUoAJwRiAHIFSgAnBGL/rgVKACcEYgByBUoAJwRiAHIFSgAnBGIAcgVKACcEYgByBUoAJwRiAHIFSgAnBGIAcgVKACcEYgByBUoAJwRiAHIEqgC2BDcAYgSqALYENwBiBKoAtgQ3AGIEqgC2BDcAYgSq//gEN/+zBKoAtgQ3AGIEqgC2BDcAYgSqALYENwBiAj8AwwH6AJsCPwC3AfwAlgWQAIIEiABgBZAAggSIAGAFkACCBIgAYAWQAEwEiP/LBZAAggSIAGAFkACCBIgAYAWQAIIEiABgBX8AcQSTAGAFfwBxBJMAYAV/AHEEkwBgBX8AcQSTAGAFfwBxBJMAYAVoAJYEiACNBWgAlgSIAI0FkACWBPMAjQWQAJYE8wCNBZAAlgTzAI0FkACWBPMAjQWQAJYE8wCNBPIAHgQCABsE8gAeBAIAGwTyAB4EAgAbBKYAZASmAGQFJAC2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ABEQACEzNTMDIgYVFBY7AREzETMyNjU0JiMDeBsBAgFO/rL+/hu5Hf79/rQBTAEDHbnWxtHRxh25HcTS0sQFHv69/vv++f67xsYBQwEHAQUBRc7+nenMzucDavyW6c7L6AAAAAABALT+oQWSBbAACwAAEzMRIREzETMDIxEhtLkC17mVEqX72QWw+uUFG/rp/ggBXwABAJcAAATEBbAAEwAAAREjEQ4BIyImNREzERQWMzI2NxEExLlhsHv187qMomm8ZwWw+lACYR0azvIBxv46q38cHAK4AAEAtAAABtIFsAALAAABESERMxEhETMRIREBbgH6uQH4ufniBbD65QUb+uUFG/pQBbAAAAABALT+oQdrBbAADwAAAREhETMRIREzETMDIxEhEQFuAfq5Afi5mRKm+gEFsPrlBRv65QUb+uX+DAFfBbAAAAAAAgARAAAFuAWwAAwAFQAAEyERITIWFRQGIyERIQERITI2NTQmIxECVQFo7vz97f3f/mQCVQFonJSUnAWw/ajhx8joBRv9qP3Sn355mAAAAAADALUAAAY1BbAACgATABcAAAEhMhYVFAYjIREzGQEhMjY1NCYjASMRMwFuAWju/P3t/d+5AWiclJScA1+5uQNY4cfI6AWw/RP90p9+eZj9PQWwAAACAKYAAASxBbAACgATAAABITIWFRQGIyERMxkBITI2NTQmIwFfAWju/P3t/d+5AWiclJScA1jhx8joBbD9E/3Sn355mAAAAAABALH/7AT2BcYAHwAAEzQAMzIAGQEQACMiADUzFBYzMhI9ASE1ITU0AiMiBhWxAST2+wEw/tD7+/7hubWsq8f9uwJFx6ustQPf1QES/qb+7f7//uz+qAEB46CvAQjNOJU2zgEJsKEAAAIAw//rBt4FxQAVACMAAAEQACEgABE1IxEjETMRMzUQACEgABEnNAIjIgIVERQSMzISNQbe/rv+9v7+/sbXubnXAToBAgEKAUW52ry0z8+0vdkCV/70/qABYAEMKP2BBbD9ZEQBCwFi/p7+9QLJAQb++sn+/cv++gEFzAACAGMAAARnBbAADQAWAAAhIwEuATU0JDMhESMRIQEhIgYVFBYzIQEoxQFVkJABC/UBz7r+qwFV/uujpKSdARsCbzbDktTi+lACPALeloiHowAAAAACAGH/6wQoBhEAGwApAAABMhId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ACkAAAAHAJoA0QFy//8AZv5MA/cGBAImAEkAAAAGAJpdGwAA//8Ahf/rBNsHYQImACkAAAAHAJwA/AGx//8AZv5MA/cGCgImAEkAAAAHAJwAiABa//8Ahf/rBNsHIgImACkAAAAHAJ0BoAFy//8AZv5MA/cFywImAEkAAAAHAJ0BLAAb//8Ahf3lBNsFxQImACkAAAAHAZEBq/62//8AZv5MA/cGbQImAEkAAAAHAaUBMwBW//8AtgAABP0HRgImACoAAAAHAJoA+gFd//8AkQAAA/oHRQImAEoAAAAHAJoAIwFc////xQAAAncHUQImACsAAAAHAKD/QwFg////ngAAAlAF+gImAIoAAAAHAKD/HAAJ////vwAAAokG+gImACsAAAAHAG7/RwFK////mAAAAmIFpAImAIoAAAAHAG7/IP/0////9QAAAkwHTAImACsAAAAHAJz/dAGc////zgAAAiUF9QImAIoAAAAHAJz/TQBF//8AIf5YAYEFsAImACsAAAAGAJ/vCAAA//8AAP5QAWAGGAImAEsAAAAGAJ/OAAAA//8AtwAAAYYHDQImACsAAAAHAJ0AFwFd//8Aw//rBf8FsAAmACsAAAAHACwCPwAA//8Aof5LA2MGGAAmAEsAAAAHAEwB/AAA//8AP//rBIsHOQImACwAAAAHAJoBhQFQ////tP5LAjkF3AImAJgAAAAHAJr/M//z//8Atv31BRwFsAImAC0AAAAHAZEBev7G//8Akv33BBQGGAImAE0AAAAHAZEBGP7I//8AtgAABCUG4AImAC4AAAAHAHMANwEa//8AoQAAAkMHXAImAE4AAAAHAHMAJQGW//8Atv33BCUFsAImAC4AAAAHAZEBdP7I//8AW/33AVoGGAImAE4AAAAHAZH///7I//8AtgAABCUFsQImAC4AAAAHAZEB2QTF//8AoQAAAq0GGAAmAE4AAAAHAZEBVgUs//8AtgAABCUFsAImAC4AAAAHAJ0Bxf3F//8AoQAAAq0GGAAmAE4AAAAHAJ0BPv23//8AtgAABP4HHwImADAAAAAHAHMB/wFZ//8AkQAAA/gF3QImAFAAAAAHAHMBaQAX//8Atv33BP4FsAImADAAAAAHAZEB2P7I//8Akf33A/gETgImAFAAAAAHAZEBQv7I//8AtgAABP4HRwImADAAAAAHAJsBFwFe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//8AWP5SA6wETAImAOoAAAAHAZwBQ/+5//8Ag/5RBMkFxQImACUAAAAHAZwB7v+4//8AYf5RA/IETgImAEUAAAAHAZwBWP+4//8AHgAABNMFsAIGADsAAP//AC7+YAPfBDoCBgC4AAD//wDDAAABfAWwAgYAKwAA//8AGwAABygHTAImANUAAAAHAJwB+AGc//8AFQAABgQF9QImAOkAAAAHAJwBjQBF//8AwwAAAXwFsAIGACsAAP//ACcAAAUiB0wCJgAjAAAABwCcAPsBnP//AHL/7APsBgoCJgBDAAAABgCcfVoAAP//ACcAAAUiBwwCJgAjAAAABwBoAKoBXP//AHL/7APsBcoCJgBDAAAABgBoLBoAAP////IAAAdXBbACBgB/AAD//wA9/+sGfAROAgYAhAAA//8AtgAABHUHTAImACcAAAAHAJwAxwGc//8AYv/sA+kGCwImAEcAAAAHAJwAggBb//8AX//rBRAG3gImAUEAAAAHAGgAfQEu//8AYv/sA+kETwIGAJkAAP//AGL/7APpBcsCJgCZAAAABgBoMRsAAP//ABsAAAcoBwwCJgDVAAAABwBoAacBXP//ABUAAAYEBbUCJgDpAAAABwBoATwABf//AFH/6wRnByECJgDWAAAABwBoAGEBcf//AFj/7QOsBckCJgDqAAAABgBoCBkAAP//ALYAAAT+BvoCJgDXAAAABwBuAQQBSv//AJwAAAQBBaQCJgDrAAAABgBudfQAAP//ALYAAAT+BwwCJgDXAAAABwBoAOABXP//AJwAAAQBBbUCJgDrAAAABgBoUQUAAP//AIL/6wUNByECJgAxAAAABwBoAMoBcf//AGD/7AQnBcoCJgBRAAAABgBoSRoAAP//AHP/6wT+BcUCBgESAAD//wBg/+wEJwROAgYBEwAA//8Ac//rBP4HBwImARIAAAAHAGgA0gFX//8AYP/sBCcF5gImARMAAAAGAGgyNgAA//8Asf/sBPYHIgImAOIAAAAHAGgAtwFy//8AZP/rA+AFygImAPoAAAAGAGgmGgAA//8AUf/rBMgG+gImANkAAAAHAG4ArQFK//8AG/5LA+QFpAImAFsAAAAGAG4p9AAA//8AUf/rBMgHDAImANkAAAAHAGgAiQFc//8AG/5LA+QFtQImAFsAAAAGAGgFBQAA//8AUf/rBMgHSwImANkAAAAHAKEBNgFd//8AG/5LA/oF9AImAFsAAAAHAKEAsgAG//8AlwAABMQHDAImANwAAAAHAGgAswFc//8AZwAAA70FtQImAPQAAAAGAGgOBQAA//8AtQAABjUHDAAmAOEPAAAnACsEuQAAAAcAaAF9AVz//wCdAAAFfwW1ACYA+QAAACcAigQqAAAABwBoARcABf//AEH+SwUXBbACJgA6AAAABwGaA7AAAP//AC7+SwQfBDoCJgBaAAAABwGaArgAAP//AGT/7APwBhgCBgBGAAD//wAw/ksFrAWwAiYA2AAAAAcBmgRFAAD//wAo/ksEuwQ6AiYA7QAAAAcBmgNUAAD//wAn/rEFIgWwAiYAIwAAAAcAqAUBAAD//wBy/rED7AROAiYAQwAAAAcAqARQAAD//wAnAAAFIgfGAiYAIwAAAAcApgT1AVP//wBy/+wD7AaEAiYAQwAAAAcApgR3ABH//wAnAAAFIgeoAiYAIwAAAAcBowDKARb//wBy/+wEpAZnAiYAQwAAAAYBo0zVAAD//wAnAAAFIgelAiYAIwAAAAcBogDOASX///+u/+wD7AZkAiYAQwAAAAYBolDkAAD//wAnAAAFIgfbAiYAIwAAAAcBoQDPAQ3//wBy/+wEPQaaAiYAQwAAAAYBoVHMAAD//wAnAAAFIgflAiYAIwAAAAcBoADOARP//wBy/+wD7AakAiYAQwAAAAYBoFDSAAD//wAn/rEFIgdGAiYAIwAAACcAmgDQAV0ABwCoBQEAAP//AHL+sQPsBgQCJgBDAAAAJgCaUhsABwCoBFAAAAAA//8AJwAABSIH3QImACMAAAAHAZ8A8QFU//8Acv/sA+wGmwImAEMAAAAGAZ9zEgAA//8AJwAABSIH4AImACMAAAAHAaQA9QFn//8Acv/sA+wGngImAEMAAAAGAaR3JQAA//8AJwAABSIISwImACMAAAAHAZ4A9QFJ//8Acv/sA+wHCQImAEMAAAAGAZ53BwAA//8AJwAABSIIHwImACMAAAAHAZ0A9QFR//8Acv/sA+wG3QImAEMAAAAGAZ13DwAA//8AJ/6xBSIHTAImACMAAAAnAJwA+wGcAAcAqAUBAAD//wBy/rED7AYKAiYAQwAAACYAnH1aAAcAqARQAAAAAP//ALb+uwR1BbACJgAnAAAABwCoBMgACv//AGL+sQPpBE4CJgBHAAAABwCoBJIAAP//ALYAAAR1B8YCJgAnAAAABwCmBMEBU///AGL/7APpBoUCJgBHAAAABwCmBHwAEv//ALYAAAR1B1ECJgAnAAAABwCgAJYBYP//AGL/7APpBhACJgBHAAAABgCgUR8AAP//ALYAAATuB6gCJgAnAAAABwGjAJYBFv//AGL/7ASpBmgCJgBHAAAABgGjUdYAAP////gAAAR1B6UCJgAnAAAABwGiAJoBJf///7P/7APpBmUCJgBHAAAABgGiVeUAAP//ALYAAASHB9sCJgAnAAAABwGhAJsBDf//AGL/7ARCBpsCJgBHAAAABgGhVs0AAP//ALYAAAR1B+UCJgAnAAAABwGgAJoBE///AGL/7APpBqUCJgBHAAAABgGgVdMAAP//ALb+uwR1B0YCJgAnAAAAJwCaAJwBXQAHAKgEyAAK//8AYv6xA+kGBQImAEcAAAAmAJpXHAAHAKgEkgAAAAD//wDDAAACAQfGAiYAKwAAAAcApgNtAVP//wCbAAAB2gZwAiYAigAAAAcApgNG//3//wC3/rkBhgWwAiYAKwAAAAcAqAN0AAj//wCW/rsBZQYYAiYASwAAAAcAqANTAAr//wCC/qkFDQXFAiYAMQAAAAcAqAUd//j//wBg/qgEJwROAiYAUQAAAAcAqASb//f//wCC/+sFDQfbAiYAMQAAAAcApgUVAWj//wBg/+wEJwaEAiYAUQAAAAcApgSUABH//wCC/+sFQge9AiYAMQAAAAcBowDqASv//wBg/+wEwQZnAiYAUQAAAAYBo2nVAAD//wBM/+sFDQe6AiYAMQAAAAcBogDuATr////L/+wEJwZkAiYAUQAAAAYBom3kAAD//wCC/+sFDQfwAiYAMQAAAAcBoQDvASL//wBg/+wEWgaaAiYAUQAAAAYBoW7MAAD//wCC/+sFDQf6AiYAMQAAAAcBoADuASj//wBg/+wEJwakAiYAUQAAAAYBoG3SAAD//wCC/qkFDQdbAiYAMQAAACcAmgDwAXIABwCoBR3/+P//AGD+qAQnBgQCJgBRAAAAJgCabxsABwCoBJv/9wAA//8Acf/rBZ0HDwImAJQAAAAHAHMB5gFJ//8AYP/sBLoF3QImAJUAAAAHAHMBbQAX//8Acf/rBZ0HEgImAJQAAAAHAEIBLAFN//8AYP/sBLoF4AImAJUAAAAHAEIAswAb//8Acf/rBZ0HtgImAJQAAAAHAKYFDQFD//8AYP/sBLoGhAImAJUAAAAHAKYElAAR//8Acf/rBZ0HQQImAJQAAAAHAKAA4gFQ//8AYP/sBLoGDwImAJUAAAAGAKBpHgAA//8Acf6xBZ0GNgImAJQAAAAHAKgFCQAA//8AYP6oBLoEsAImAJUAAAAHAKgEm//3//8Alv6qBNcFsAImADcAAAAHAKgFDP/5//8Ajf6xA/YEOgImAFcAAAAHAKgEVwAA//8Alv/rBNcHxgImADcAAAAHAKYFBwFT//8Ajf/sA/YGcAImAFcAAAAHAKYEkv/9//8Alv/rBiYHHwImAJYAAAAHAHMB3QFZ//8Ajf/sBRAFyAImAJcAAAAHAHMBawAC//8Alv/rBiYHIgImAJYAAAAHAEIBIwFd//8Ajf/sBRAFywImAJcAAAAHAEIAsQAG//8Alv/rBiYHxgImAJYAAAAHAKYFBAFT//8Ajf/sBRAGcAImAJcAAAAHAKYEkv/9//8Alv/rBiYHUQImAJYAAAAHAKAA2QFg//8Ajf/sBRAF+gImAJcAAAAGAKBnCQAA//8Alv6pBiYGDQImAJYAAAAHAKgFCf/4//8Ajf6xBRAEkQImAJcAAAAHAKgEVwAA//8AHv67BNMFsAImADsAAAAHAKgEzgAK//8AG/4UA+QEOgImAFsAAAAHAKgFIv9j//8AHgAABNMHxAImADsAAAAHAKYExwFR//8AG/5LA+QGcAImAFsAAAAHAKYEUP/9//8AHgAABNMHTwImADsAAAAHAKAAnAFe//8AG/5LA+QF+gImAFsAAAAGAKAlCQAAAAIAZP/sBLEGGAAaACgAAAEjESMnDgEjIgI9ARASMzIWFzcRITUhNTMVMwEUFjMyNjcRLgEjIgYVBLHBoRA2mGnJ29rMZJI0A/7+AQK5wfxsh5JeeikofFuTiATS+y6HTk0BGu8VAQoBOkhGAQERlbGx/I6qxVJMAfZIUurAAAD//wBk/u4EsQYYACYARgAAACcB0wGmAkYABwBBAKP/g///ALb+mQVbBbACJgAtAAAABwGcBDoAAP//AJz+mQRpBDoCJgDsAAAABwGcA0gAAP//ALb+mQWHBbACJgAqAAAABwGcBGYAAP//AJz+mQSKBDoCJgDvAAAABwGcA2kAAP//ADv+mQSKBbACJgA2AAAABwGcAigAAP//ACj+mQOwBDoCJgDxAAAABwGcAa4AAP//AEH+mQTpBbACJgA6AAAABwGcA8gAAP//AC7+mQPxBDoCJgBaAAAABwGcAtAAAP//AJf+mQVOBbACJgDcAAAABwGcBC0AAP//AGf+mQRGBDsCJgD0AAAABwGcAyUAAP//AJf+mQTEBbACJgDcAAAABwGcAxkAAP//AGf+mQO9BDsCJgD0AAAABwGcAhAAAP//ALX+mQQwBbACJgCsAAAABwGcANcAAP//AJr+mQNHBDoCJgDnAAAABwGcAJ4AAP//ABv+mQdqBbACJgDVAAAABwGcBkkAAP//ABX+mQYlBDoCJgDpAAAABwGcBQQAAP//AEf+VAXABcMCJgE7AAAABwGcAwb/u////+P+WARZBE4CJgE8AAAABwGcAgH/v///AJEAAAP6BhgCBgBKAAAAAv/UAAAEsQWwABIAGwAAASMVITIWFRQGIyERIzUzNTMVMwMRITI2NTQmIwJQ8QFo7vz97f3f0tK58fEBaJyUlJwEUPjhx8joBFCVy8v93v3Sn355mAAAAAL/1AAABLEFsAASABsAAAEjFSEyFhUUBiMhESM1MzUzFTMDESEyNjU0JiMCUPEBaO78/e3939LSufHxAWiclJScBFD44cfI6ARQlcvL/d790p9+eZgAAAABAAMAAAQwBbAADQAAASERIxEjNTMRIRUhESECf/7vubKyA3v9PgERAqz9VAKslQJvlv4nAAAAAAH//AAAA0cEOgANAAABIREjESM1MxEhFSERIQJ4/ty6np4Crf4NASQB3/4hAd+VAcaX/tEAAAAAAf/1AAAFMAWwABQAAAEjESMRIzUzNTMVMxUjETMBMwkBIwIzsLnV1bnu7p8CEdT9wwJm4wKU/WwEhZWWlpX+pAKH/T79EgAAAf/YAAAEKAYYABQAAAEjESMRIzUzNTMVMxUjETMBMwkBIwHhgbrOzrr09H4BO9v+hgGu2wH2/goEwZXCwpX9zAGt/hP9swD//wC2/ooFtwdMAiYA1wAAACcAnAExAZwABwAOBIP/vv//AJz+igS6BfUCJgDrAAAAJwCcAKIARQAHAA4Dhv++//8Atv6KBbYFsAImACoAAAAHAA4Egv++//8AnP6KBLkEOgImAO8AAAAHAA4Dhf++//8Atv6KBwYFsAImAC8AAAAHAA4F0v++//8Anf6KBgsEOgImAO4AAAAHAA4E1/++//8AMP6KBa0FsAImANgAAAAHAA4Eef++//8AKP6KBLwEOgImAO0AAAAHAA4DiP++AAEAHgAABNMFsAAQAAAJATMBMxUjBxEjEScjNTMBMwJ4AYfU/ld+zwi4Aeya/ljUAr4C8vz2lQ/9/gIPApUDCgABAC7+YAPfBDoAEQAABSMRIxEjNTMBMwEXMzcBMwEzA0rmutzB/p+9AQcWAxcBAL3+oskM/mwBlJUDsf0AXl4DAPxPAAEAQQAABNAFsAARAAABIwEjCQEjASM1MwEzCQEzATMDzbABs9z+lv6X4AGyopX+Zt4BXAFg3/5lowKe/WICSP24Ap6VAn39wwI9/YMAAAAAAQAuAAADzwQ6ABEAAAEjASMLASMBIzUzATMbATMBMwM+rwFA1fr62AFBraL+1dbt8Nj+1qQB4f4fAZ7+YgHhlQHE/m0Bk/48AAAA//8AY//tA+wETAIGALoAAP//ABsAAARzBbACJgAoAAAABwHT/4z+fv//ALsCjAXzAyEARgGGrwBmZkAAAAIAqQAAAWYFsAADAAcAAAEjETMTIzUzAWS5uQK9vQHeA9L6UMgAAAAAAAAAAAAAAAAAGgBSAJIA6AFAAVABcgGWAboB0gHoAfYCAgIQAkACUAJ6ArQC1AMGA0YDZAOuA/AD/AQIBCAENARMBHwE8AUMBUIFdAWaBbQFygYABhgGJAZABlwGbAaQBqgG3gcCB0AHeAeyB8YH5gf+CCoISghiCHgIjAiaCKwIxAjSCOAJHglUCYAJtAnmCgoKTgpyCoQKqArECtALCgsuC1wLkgvGC+YMHgxEDGgMgAyqDMgM8g0IDTgNRg10DZ4Nsg3mDhoOZg6QDqQPCA8cD3IPsg++D84QMhBAEGYQhhCwEOoQ+BEgETYRRBFgEXIRnBGoEboRzBHeEg4SOBJaEqwS0hMME2gTthPQFBwUUhR8FIgUpBTAFNgVAhU2FXQVyBXkFhoWXBaWFsAW7hcMF0AXVBdoF4IXkBe2F9gX+BgOGDQYQhhQGFoYeBiOGJwYqhjEGMwY3hj0GTAZRhliGXQZkhnQGfoaNBp4Grga1BscG1YbjhuyG+ocCBw+HIgcsBzkHRgdTh1yHZgd1h4IHkgehB7AHwYfNB9qH6If0h/6IBIgOiBmIJIgziDmIQYhLiFwIYghqiHEIeQiDCI2IloijiLMIvYjOCNuI4AjqiPWJBAkKCREJGYkhCScJK4kwiUcJTQlViVwJZAluCXkJggmNiZuJpgm1icGJzwnbCeaJ7Qn5igYKEYohCi8KN4pBCkyKWIpoCnUKhwqXCqsKvorNitqK44rtiv4LDQslCz0LTItcC2cLcQt8C4ELiIuMi5CLtwvNC9iL44vzC/iL/gwIDBIMG4wlDC0MNQw8DEMMTYxYDG2MggyJjJEMm4yljK4MvozNjNgM4gzsDPYNBA0PDRoNHg0iDSsNOI1NjV6NcA2ADZCNnw2tDbqNxw3WDeON7437DgqOCo4KjgqOCo4KjgqOCo4KjgqOCo4KjgqODQ4PjhKOGA4djiMOJg4pDiwONQ47jkSOSo5NjlGOcI51jnsOfo6Gjo8Ong6ujr4O047iDvMO/Y8LDw+PFA8Yjx0PK48wjzgPO49CD1aPYg94D4GPhY+Jj5MPlo+bj6EPq4+rj+IP85AAEAgQFBAbkCKQKxAukDsQRxBPEFqQZJBrEHGQeZB9kISQkhCdkKaQrRCykL8QxRDIEM8Q1hDaEOIQ6JD0EQGRD5EdkSKRKpEwkTqRQpFIkU4RWRFdEWeRdhF+EYiRl5GekbCRv5HDkc2R3BHgEewR+xIBkhOSIpItEjCSPBJEElKSWpJnEncSkpKaEqmSvBLKEtuS5RL0kv+TBxMOkxWTHJMtEzYTOBM6EzwTSBNUE1+TZpNyE3UTeBN7E34TgROEE4cTihONE5ATkxOWE5kTnBOfE6ITpROoE6sTrhOxE7QTtxO6E70TwBPDE8YTyRPME88T0hPVE9gT2xPeE+ET5BPnE+oT7RPwE/MT9hP5E/wT/xQCFAUUCBQLFA4UERQUFBcUGhQdFCAUIxQwFEYUSRRMFE8UUhRVFFgUWxReFGEUZBRnFGoUbRRwFHMUdhSDFJYUmRScFJ8UohSlFKgUqxSuFLEUtBS3FLoUvRTAFMMUxhTJFMwUzxTSFNUU2BTbFN4U4RTkFOcU6hTtFPAU8xT2FPkU/BT/FQIVBRUIFQsVDhURFRQVFxUaFR0VIBUjFSYVKRUsFS8VMhU1FTgVOxU+FUEVRBVHFUoVTRVQFVMVVhVZFVwVXxViFWUVaBVrFW4VcRV0FXcVehV9FYAVgxWGFZUVpBWnFaoVrRWwFbMVthW5FbwVvxXCFcUVyBXLFc4V0RXUFdcV2hXdFeAV4xXmFekV7BXvFfIV9RX4FfsV/hYBFgQWBxYKFg0WEBYTFhYWGRYcFh8WIhYlFigWKxYuFjEWPhZBFkQWRxZKFk0WUBZTFlYWYxZmFmkWbBZvFnIWdRZ4FnsWfhaBFoQWhxaKFo0WkBaTFpYWmRacFp8WohalFqgWqxauFrEWtBa3FroWvRbAFsMWxhbJFswWzxbSFuEW5BbnFuoW7RbwFvMW9hb5FvwW/xcCFwUXCBcLFw4XEBcSFxQXFhcYFxoXHBceFyAXIhckFyYXKBcqFy0XMBczFzYXORc8Fz8XQRdDF0UXRxdJF0wXTxdSF1UXWBdbF14XbJdul3GXc5d1l3iXe5d9l3+XgZeDl4aXiJeKl4yXjpeQl5KXlJeWl5iXmpedl5+XoZesl66XsJezl7aXuJe6l72Xv5fCl8WXyJfLl86X0ZfUl9eX2pfdl9+X4Zfkl+eX6pfsl++X8pf1l/iX+5f+mAKYBZgImAuYDpgQmBKYFZgYmBuYHpghmCSYJ5gqmCyYLpgwmDOYNpg4mDuYPphBmESYRphImEuYTphRmFOYVphZmFyYX5himGWYaJhrmG6YcZh0mHaYeJh7mH6YgZiEmIeYipiNmJCYk5iWmJmYnJigmKSYp5iqmKyYr5iymLWYuJi7mL6YwZjEmMeYypjNmNCY05jWmNqY3pjhmOSY55jqmO2Y8JjzmPaY+pj+mQGZBJkHmQqZDZkQmROZFpkZmRyZH5kimSWZKJksmTCZM5k2mTmZPJk/mUKZRZlImUuZTplRmVSZV5lamV2ZYJlkmWiZa5lumXGZdJl3mXqZfZmAmYOZhpmJmYyZj5mSmZWZmJmbmZ6ZoZmkmaeZqpmtmbCZs5m2mbmZvJm/mcKZ0pnWmdmZ3JnfmeKZ5ZnomeuZ7pnxmfSZ95n6mf2aAJoDmgaaCZoMmg6aGZokmiuaMpo7mkSaSJpMmk+aUppVmliaW5pemmaabxp5GoKahJqHmooaihqPAAAAAAAGwFKAAEAAAAAAAAAHwAAAAEAAAAAAAEABgAfAAEAAAAAAAIABwAlAAEAAAAAAAMAEgAsAAEAAAAAAAQADgA+AAEAAAAAAAUAFgBMAAEAAAAAAAYADgBiAAEAAAAAAAcAIABwAAEAAAAAAAkABgCQAAEAAAAAAAsACgCWAAEAAAAAAAwAEwCgAAEAAAAAAA0ALgCzAAEAAAAAAA4AKgDhAAEAAAAAABIADgELAAMAAQQJAAAAPgEZAAMAAQQJAAEADAFXAAMAAQQJAAIADgFjAAMAAQQJAAMAJAFxAAMAAQQJAAQAHAGVAAMAAQQJAAUALAGxAAMAAQQJAAYAHAHdAAMAAQQJAAcAQAH5AAMAAQQJAAkADAI5AAMAAQQJAAsAFAJFAAMAAQQJAAwAJgJZAAMAAQQJAA0AXAJ/AAMAAQQJAA4AVALbRm9udCBkYXRhIGNvcHlyaWdodCBHb29nbGUgMjAxM1JvYm90b1JlZ3VsYXJHb29nbGU6Um9ib3RvOjIwMTNSb2JvdG8gUmVndWxhclZlcnNpb24gMS4yMDAzMTA7IDIwMTNSb2JvdG8tUmVndWxhclJvYm90byBpcyBhIHRyYWRlbWFyayBvZiBHb29nbGUuR29vZ2xlR29vZ2xlLmNvbUNocmlzdGlhbiBSb2JlcnRzb25MaWNlbnNlZCB1bmRlciB0aGUgQXBhY2hlIExpY2Vuc2UsIFZlcnNpb24gMi4waHR0cDovL3d3dy5hcGFjaGUub3JnL2xpY2Vuc2VzL0xJQ0VOU0UtMi4wUm9ib3RvIFJlZ3VsYXIARgBvAG4AdAAgAGQAYQB0AGEAIABjAG8AcAB5AHIAaQBnAGgAdAAgAEcAbwBvAGcAbABlACAAMgAwADEAMwBSAG8AYgBvAHQAbwBSAGUAZwB1AGwAYQByAEcAbwBvAGcAbABlADoAUgBvAGIAbwB0AG8AOgAyADAAMQAzAFIAbwBiAG8AdABvACAAUgBlAGcAdQBsAGEAcgBWAGUAcgBzAGkAbwBuACAAMQAuADIAMAAwADMAMQAwADsAIAAyADAAMQAzAFIAbwBiAG8AdABvAC0AUgBlAGcAdQBsAGEAcgBSAG8AYgBvAHQAbwAgAGkAcwAgAGEAIAB0AHIAYQBkAGUAbQBhAHIAawAgAG8AZgAgAEcAbwBvAGcAbABlAC4ARwBvAG8AZwBsAGUARwBvAG8AZwBsAGUALgBjAG8AbQBDAGgAcgBpAHMAdABpAGEAbgAgAFIAbwBiAGUAcgB0AHMAbwBuAEwAaQBjAGUAbgBzAGUAZAAgAHUAbgBkAGUAcgAgAHQAaABlACAAQQBwAGEAYwBoAGUAIABMAGkAYwBlAG4AcwBlACwAIABWAGUAcgBzAGkAbwBuACAAMgAuADAAaAB0AHQAcAA6AC8ALwB3AHcAdwAuAGEAcABhAGMAaABlAC4AbwByAGcALwBsAGkAYwBlAG4AcwBlAHMALwBMAEkAQwBFAE4AUwBFAC0AMgAuADAAAAAAAgAAAAAAAP9qAGQAAAAAAAAAAAAAAAAAAAAAAAAAAAQcAAABAgACAAMABQAGAAcACAAJAAoACwAMAA0ADgAPABAAEQASABMAFAAVABYAFwAYABkAGgAbABwAHQAeAB8AIAAhACIAIwAkACUAJgAnACgAKQAqACsALAAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5ADoAOwA8AD0APgA/AEAAQQBCAEMARABFAEYARwBIAEkASgBLAEwATQBOAE8AUABRAFIAUwBUAFUAVgBXAFgAWQBaAFsAXABdAF4AXwBgAGEAowCEAIUAvQCWAOgAhgCOAIsAnQCpAKQAigEDAIMAkwDyAPMAjQCXAIgBBADeAPEAngCqAPUA9AD2AKIAkADwAJEA7QCJAKAA6gC4AKEA7gEFANcBBgDiAOMBBwEIALAAsQEJAKYBCgELAQwBDQEOAQ8A2ADhANsA3ADdAOAA2QDfARABEQESARMBFAEVARYBFwEYARkBGgEbARwBHQEeAR8BIAEhASIAnwEjASQBJQEmAScBKAEpASoBKwEsAS0AmwEuAS8BMAExATIBMwE0ATUBNgE3ATgBOQE6ATsBPAE9AT4BPwFAAUEBQgFDAUQBRQFGAUcBSAFJAUoBSwFMAU0BTgFPAVABUQFSAVMBVAFVAVYBVwFYAVkBWgFbAVwBXQFeAV8BYAFhAWIBYwFkAWUBZgFnAWgBaQFqAWsBbAFtAW4BbwFwAXEBcgFzAXQBdQF2AXcBeAF5AXoBewF8AX0BfgF/AYABgQGCAYMBhAGFAYYBhwGIAYkBigGLAYwBjQGOAY8BkAGRAZIBkwGUAZUBlgGXAZgBmQGaAZsBnAGdAZ4BnwGgAaEBogGjAaQBpQGmAacBqAGpAaoBqwGsAa0BrgGvAbABsQGyAbMBtAG1AbYBtwG4AbkBugG7AbwBvQG+Ab8BwAHBAcIBwwHEAcUBxgHHAcgByQHKAcsBzAHNALIAswHOALYAtwDEAc8AtAC1AMUAggDCAIcB0ACrAMYAvgC/ALwB0QHSAdMB1AHVAdYB1wHYAIwB2QHaAdsB3AHdAJgAmgCZAO8ApQCSAJwApwCPAJQAlQC5Ad4B3wHgAMAB4QHiAeMB5AHlAeYB5wHoAekB6gHrAewB7QHuAe8B8AHxAfIB8wH0AfUB9gH3AfgB+QH6AfsB/AH9Af4B/wIAAgECAgIDAgQCBQIGAgcCCAIJAgoCCwIMAg0CDgIPAhACEQISAhMCFAIVAhYCFwIYAhkCGgIbAhwCHQIeAh8CIAIhAiICIwIkAiUCJgInAigCKQIqAisCLAItAi4CLwIwAjECMgIzAjQCNQI2AjcArAI4AjkA6QI6AjsCPACtAMkAxwCuAGIAYwI9AGQAywBlAMgAygDPAMwAzQDOAGYA0wDQANEArwBnANYA1ADVAGgA6wBqAGkAawBtAGwAbgI+AG8AcQBwAHIAcwB1AHQAdgB3AHgAegB5AHsAfQB8AH8AfgCAAIEA7AC6Aj8CQAJBAkICQwJEAP0A/gJFAkYCRwJIAP8BAAJJAkoCSwJMAk0CTgJPAlACUQJSAlMCVAJVAlYA+AD5AlcCWAJZAloCWwJcAl0CXgJfAmACYQJiAmMCZAJlAmYCZwJoAmkCagJrAmwCbQJuAm8CcAJxAnICcwJ0AnUCdgJ3AngCeQJ6AnsCfAJ9An4CfwKAAoECggKDAoQChQKGAocCiAKJAooA+wD8AosCjADkAOUCjQKOAo8CkAKRApICkwKUApUClgKXApgCmQKaApsCnAKdAp4CnwKgAqECogC7AqMCpAKlAqYA5gDnAqcCqAKpAqoCqwKsAq0CrgKvArACsQKyArMCtAK1ArYCtwK4ArkCugK7ArwCvQK+Ar8CwALBAsICwwLEAsUCxgLHAsgCyQLKAssCzALNAs4CzwLQAtEC0gLTAtQC1QLWAtcC2ALZAtoC2wLcAt0C3gLfAuAC4QLiAuMC5ALlAuYC5wLoAukC6gLrAuwC7QLuAu8C8ALxAvIC8wL0AvUC9gL3AvgC+QL6AvsC/AL9Av4C/wMAAwEDAgMDAwQDBQMGAwcDCAMJAwoDCwMMAw0DDgMPAxADEQMSAxMDFAMVAxYDFwMYAxkDGgMbAxwDHQMeAx8DIAMhAyIDIwMkAyUDJgMnAygDKQMqAysDLAMtAy4DLwMwAzEDMgMzAzQDNQM2AzcDOAM5AzoDOwM8Az0DPgM/A0ADQQNCA0MDRANFA0YDRwNIA0kDSgNLA0wDTQNOA08DUANRA1IDUwNUA1UDVgNXA1gDWQNaA1sDXANdA14DXwNgA2EDYgNjA2QDZQNmA2cDaANpA2oDawNsA20DbgNvA3ADcQNyA3MDdAN1A3YDdwN4A3kDegN7A3wDfQN+A38DgAOBA4IDgwOEA4UDhgOHA4gDiQOKA4sDjAONA44DjwOQA5EDkgOTA5QDlQOWA5cDmAOZA5oDmwOcA50DngOfA6ADoQOiA6MDpAOlA6YDpwOoA6kDqgOrA6wDrQOuA68DsAOxA7IDswO0A7UDtgO3A7gDuQO6A7sDvAO9A74DvwPAA8EDwgPDA8QDxQPGA8cDyAPJA8oDywPMA80DzgPPA9AD0QPSA9MD1APVA9YD1wPYA9kD2gPbA9wD3QPeA98D4APhA+ID4wPkA+UD5gPnA+gD6QPqA+sD7APtA+4D7wPwA/ED8gPzA/QD9QP2A/cD+AP5A/oD+wP8A/0D/gP/BAAEAQQCBAMEBAQFBAYEBwQIBAkECgQLBAwEDQQOBA8EEAQRBBIEEwQUBBUEFgQXBBgEGQQaBBsEHAQdBB4EHwQgBCEA9wQiBCMABAd1bmkwMDA5Bm1hY3Jvbg5wZXJpb2RjZW50ZXJlZARIYmFyDGtncmVlbmxhbmRpYwNFbmcDZW5nBWxvbmdzBU9ob3JuBW9ob3JuBVVob3JuBXVob3JuB3VuaTAyMzcFc2Nod2EHdW5pMDJGMwlncmF2ZWNvbWIJYWN1dGVjb21iCXRpbGRlY29tYgRob29rB3VuaTAzMEYIZG90YmVsb3cFdG9ub3MNZGllcmVzaXN0b25vcwlhbm90ZWxlaWEFR2FtbWEFRGVsdGEFVGhldGEGTGFtYmRhAlhpAlBpBVNpZ21hA1BoaQNQc2kFYWxwaGEEYmV0YQVnYW1tYQVkZWx0YQdlcHNpbG9uBHpldGEDZXRhBXRoZXRhBGlvdGEGbGFtYmRhAnhpA3JobwZzaWdtYTEFc2lnbWEDdGF1B3Vwc2lsb24DcGhpA3BzaQVvbWVnYQd1bmkwM0QxB3VuaTAzRDIHdW5pMDNENgd1bmkwNDAyB3VuaTA0MDQHdW5pMDQwOQd1bmkwNDBBB3VuaTA0MEIHdW5pMDQwRgd1bmkwNDExB3VuaTA0MTQHdW5pMDQxNgd1bmkwNDE3B3VuaTA0MTgHdW5pMDQxQgd1bmkwNDIzB3VuaTA0MjQHdW5pMDQyNgd1bmkwNDI3B3VuaTA0MjgHdW5pMDQyOQd1bmkwNDJBB3VuaTA0MkIHdW5pMDQyQwd1bmkwNDJEB3VuaTA0MkUHdW5pMDQyRgd1bmkwNDMxB3VuaTA0MzIHdW5pMDQzMwd1bmkwNDM0B3VuaTA0MzYHdW5pMDQzNwd1bmkwNDM4B3VuaTA0M0EHdW5pMDQzQgd1bmkwNDNDB3VuaTA0M0QHdW5pMDQzRgd1bmkwNDQyB3VuaTA0NDQHdW5pMDQ0Ngd1bmkwNDQ3B3VuaTA0NDgHdW5pMDQ0OQd1bmkwNDRBB3VuaTA0NEIHdW5pMDQ0Qwd1bmkwNDREB3VuaTA0NEUHdW5pMDQ0Rgd1bmkwNDUyB3VuaTA0NTQHdW5pMDQ1OQd1bmkwNDVBB3VuaTA0NUIHdW5pMDQ1Rgd1bmkwNDYwB3VuaTA0NjEHdW5pMDQ2Mwd1bmkwNDY0B3VuaTA0NjUHdW5pMDQ2Ngd1bmkwNDY3B3VuaTA0NjgHdW5pMDQ2OQd1bmkwNDZBB3VuaTA0NkIHdW5pMDQ2Qwd1bmkwNDZEB3VuaTA0NkUHdW5pMDQ2Rgd1bmkwNDcyB3VuaTA0NzMHdW5pMDQ3NAd1bmkwNDc1B3VuaTA0N0EHdW5pMDQ3Qgd1bmkwNDdDB3VuaTA0N0QHdW5pMDQ3RQd1bmkwNDdGB3VuaTA0ODAHdW5pMDQ4MQd1bmkwNDgyB3VuaTA0ODMHdW5pMDQ4NAd1bmkwNDg1B3VuaTA0ODYHdW5pMDQ4OAd1bmkwNDg5B3VuaTA0OEQHdW5pMDQ4RQd1bmkwNDhGB3VuaTA0OTAHdW5pMDQ5MQd1bmkwNDk0B3VuaTA0OTUHdW5pMDQ5Qwd1bmkwNDlEB3VuaTA0QTAHdW5pMDRBMQd1bmkwNEE0B3VuaTA0QTUHdW5pMDRBNgd1bmkwNEE3B3VuaTA0QTgHdW5pMDRBOQd1bmkwNEI0B3VuaTA0QjUHdW5pMDRCOAd1bmkwNEI5B3VuaTA0QkEHdW5pMDRCQwd1bmkwNEJEB3VuaTA0QzMHdW5pMDRDNAd1bmkwNEM3B3VuaTA0QzgHdW5pMDREOAd1bmkwNEUwB3VuaTA0RTEHdW5pMDRGQQd1bmkwNEZCB3VuaTA1MDAHdW5pMDUwMgd1bmkwNTAzB3VuaTA1MDQHdW5pMDUwNQd1bmkwNTA2B3VuaTA1MDcHdW5pMDUwOAd1bmkwNTA5B3VuaTA1MEEHdW5pMDUwQgd1bmkwNTBDB3VuaTA1MEQHdW5pMDUwRQd1bmkwNTBGB3VuaTA1MTAHdW5pMjAwMAd1bmkyMDAxB3VuaTIwMDIHdW5pMjAwMwd1bmkyMDA0B3VuaTIwMDUHdW5pMjAwNgd1bmkyMDA3B3VuaTIwMDgHdW5pMjAwOQd1bmkyMDBBB3VuaTIwMEINdW5kZXJzY29yZWRibA1xdW90ZXJldmVyc2VkB3VuaTIwMjUHdW5pMjA3NAluc3VwZXJpb3IEbGlyYQZwZXNldGEERXVybwd1bmkyMTA1B3VuaTIxMTMHdW5pMjExNgllc3RpbWF0ZWQJb25lZWlnaHRoDHRocmVlZWlnaHRocwtmaXZlZWlnaHRocwxzZXZlbmVpZ2h0aHMKY29sb24ubG51bQlxdW90ZWRibHgLY29tbWFhY2NlbnQHdW5pRkVGRgd1bmlGRkZDB3VuaUZGRkQJZml2ZS5zbWNwCGZvdXIuc3VwCXplcm8ubG51bQ5sYXJnZXJpZ2h0aG9vawxjeXJpbGxpY2hvb2sQY3lyaWxsaWNob29rbGVmdAtjeXJpbGxpY3RpYw5icmV2ZXRpbGRlY29tYg1icmV2ZWhvb2tjb21iDmJyZXZlYWN1dGVjb21iE2NpcmN1bWZsZXh0aWxkZWNvbWISY2lyY3VtZmxleGhvb2tjb21iE2NpcmN1bWZsZXhncmF2ZWNvbWITY2lyY3VtZmxleGFjdXRlY29tYg5icmV2ZWdyYXZlY29tYhFjb21tYWFjY2VudHJvdGF0ZQZBLnNtY3AGQi5zbWNwBkMuc21jcAZELnNtY3AGRS5zbWNwBkYuc21jcAZHLnNtY3AGSC5zbWNwBkkuc21jcAZKLnNtY3AGSy5zbWNwBkwuc21jcAZNLnNtY3AGTi5zbWNwBk8uc21jcAZRLnNtY3AGUi5zbWNwBlMuc21jcAZULnNtY3AGVS5zbWNwBlYuc21jcAZXLnNtY3AGWC5zbWNwBlkuc21jcAZaLnNtY3AJemVyby5zbWNwCG9uZS5zbWNwCHR3by5zbWNwCnRocmVlLnNtY3AJZm91ci5zbWNwCHR3by5sbnVtCHNpeC5zbWNwCnNldmVuLnNtY3AKZWlnaHQuc21jcAluaW5lLnNtY3AHb25lLnN1cAd0d28uc3VwCXRocmVlLnN1cAhvbmUubG51bQhmaXZlLnN1cAdzaXguc3VwCXNldmVuLnN1cAllaWdodC5zdXAIbmluZS5zdXAIemVyby5zdXAIY3Jvc3NiYXIJcmluZ2FjdXRlCWRhc2lhb3hpYQp0aHJlZS5sbnVtCWZvdXIubG51bQlmaXZlLmxudW0Ic2l4LmxudW0FZy5hbHQKc2V2ZW4ubG51bQdjaGkuYWx0CmVpZ2h0LmxudW0JYWxwaGEuYWx0CWRlbHRhLmFsdARELmNuBGEuY24FUi5hbHQFSy5hbHQFay5hbHQGSy5hbHQyBmsuYWx0MgluaW5lLmxudW0GUC5zbWNwDWN5cmlsbGljYnJldmUHdW5pMDBBRAZEY3JvYXQEaGJhcgRUYmFyBHRiYXIKQXJpbmdhY3V0ZQphcmluZ2FjdXRlB0FtYWNyb24HYW1hY3JvbgZBYnJldmUGYWJyZXZlB0FvZ29uZWsHYW9nb25lawtDY2lyY3VtZmxleAtjY2lyY3VtZmxleAd1bmkwMTBBB3VuaTAxMEIGRGNhcm9uBmRjYXJvbgdFbWFjcm9uB2VtYWNyb24GRWJyZXZlBmVicmV2ZQpFZG90YWNjZW50CmVkb3RhY2NlbnQHRW9nb25lawdlb2dvbmVrBkVjYXJvbgZlY2Fyb24LR2NpcmN1bWZsZXgLZ2NpcmN1bWZsZXgHdW5pMDEyMAd1bmkwMTIxDEdjb21tYWFjY2VudAxnY29tbWFhY2NlbnQLSGNpcmN1bWZsZXgLaGNpcmN1bWZsZXgGSXRpbGRlBml0aWxkZQdJbWFjcm9uB2ltYWNyb24GSWJyZXZlBmlicmV2ZQdJb2dvbmVrB2lvZ29uZWsKSWRvdGFjY2VudAJJSgJpagtKY2lyY3VtZmxleAtqY2lyY3VtZmxleAxLY29tbWFhY2NlbnQMa2NvbW1hYWNjZW50BkxhY3V0ZQZsYWN1dGUMTGNvbW1hYWNjZW50DGxjb21tYWFjY2VudAZMY2Fyb24GbGNhcm9uBExkb3QEbGRvdAZOYWN1dGUGbmFjdXRlDE5jb21tYWFjY2VudAxuY29tbWFhY2NlbnQGTmNhcm9uBm5jYXJvbgtuYXBvc3Ryb3BoZQdPbWFjcm9uB29tYWNyb24GT2JyZXZlBm9icmV2ZQ1PaHVuZ2FydW1sYXV0DW9odW5nYXJ1bWxhdXQGUmFjdXRlBnJhY3V0ZQxSY29tbWFhY2NlbnQMcmNvbW1hYWNjZW50BlJjYXJvbgZyY2Fyb24GU2FjdXRlBnNhY3V0ZQtTY2lyY3VtZmxleAtzY2lyY3VtZmxleAd1bmkwMjE4B3VuaTAyMTkHdW5pMDIxQQd1bmkwMjFCB3VuaTAxNjIHdW5pMDE2MwZUY2Fyb24GdGNhcm9uBlV0aWxkZQZ1dGlsZGUHVW1hY3Jvbgd1bWFjcm9uBlVicmV2ZQZ1YnJldmUFVXJpbmcFdXJpbmcNVWh1bmdhcnVtbGF1dA11aHVuZ2FydW1sYXV0B1VvZ29uZWsHdW9nb25lawtXY2lyY3VtZmxleAt3Y2lyY3VtZmxleAtZY2lyY3VtZmxleAt5Y2lyY3VtZmxleAZaYWN1dGUGemFjdXRlClpkb3RhY2NlbnQKemRvdGFjY2VudAdBRWFjdXRlB2FlYWN1dGULT3NsYXNoYWN1dGULb3NsYXNoYWN1dGULRGNyb2F0LnNtY3AIRXRoLnNtY3AJVGJhci5zbWNwC0FncmF2ZS5zbWNwC0FhY3V0ZS5zbWNwEEFjaXJjdW1mbGV4LnNtY3ALQXRpbGRlLnNtY3AOQWRpZXJlc2lzLnNtY3AKQXJpbmcuc21jcA9BcmluZ2FjdXRlLnNtY3ANQ2NlZGlsbGEuc21jcAtFZ3JhdmUuc21jcAtFYWN1dGUuc21jcBBFY2lyY3VtZmxleC5zbWNwDkVkaWVyZXNpcy5zbWNwC0lncmF2ZS5zbWNwC0lhY3V0ZS5zbWNwEEljaXJjdW1mbGV4LnNtY3AOSWRpZXJlc2lzLnNtY3ALTnRpbGRlLnNtY3ALT2dyYXZlLnNtY3ALT2FjdXRlLnNtY3AQT2NpcmN1bWZsZXguc21jcAtPdGlsZGUuc21jcA5PZGllcmVzaXMuc21jcAtVZ3JhdmUuc21jcAtVYWN1dGUuc21jcBBVY2lyY3VtZmxleC5zbWNwDlVkaWVyZXNpcy5zbWNwC1lhY3V0ZS5zbWNwDEFtYWNyb24uc21jcAtBYnJldmUuc21jcAxBb2dvbmVrLnNtY3ALQ2FjdXRlLnNtY3AQQ2NpcmN1bWZsZXguc21jcAx1bmkwMTBBLnNtY3ALQ2Nhcm9uLnNtY3ALRGNhcm9uLnNtY3AMRW1hY3Jvbi5zbWNwC0VicmV2ZS5zbWNwD0Vkb3RhY2NlbnQuc21jcAxFb2dvbmVrLnNtY3ALRWNhcm9uLnNtY3AQR2NpcmN1bWZsZXguc21jcAtHYnJldmUuc21jcAx1bmkwMTIwLnNtY3ARR2NvbW1hYWNjZW50LnNtY3AQSGNpcmN1bWZsZXguc21jcAtJdGlsZGUuc21jcAxJbWFjcm9uLnNtY3ALSWJyZXZlLnNtY3AMSW9nb25lay5zbWNwD0lkb3RhY2NlbnQuc21jcBBKY2lyY3VtZmxleC5zbWNwEUtjb21tYWFjY2VudC5zbWNwC0xhY3V0ZS5zbWNwEUxjb21tYWFjY2VudC5zbWNwC0xjYXJvbi5zbWNwCUxkb3Quc21jcAtOYWN1dGUuc21jcBFOY29tbWFhY2NlbnQuc21jcAtOY2Fyb24uc21jcAxPbWFjcm9uLnNtY3ALT2JyZXZlLnNtY3AST2h1bmdhcnVtbGF1dC5zbWNwC1JhY3V0ZS5zbWNwEVJjb21tYWFjY2VudC5zbWNwC1JjYXJvbi5zbWNwC1NhY3V0ZS5zbWNwEFNjaXJjdW1mbGV4LnNtY3ANU2NlZGlsbGEuc21jcAtTY2Fyb24uc21jcBFUY29tbWFhY2NlbnQuc21jcAtUY2Fyb24uc21jcAtVdGlsZGUuc21jcAxVbWFjcm9uLnNtY3ALVWJyZXZlLnNtY3AKVXJpbmcuc21jcBJVaHVuZ2FydW1sYXV0LnNtY3AMVW9nb25lay5zbWNwEFdjaXJjdW1mbGV4LnNtY3AQWWNpcmN1bWZsZXguc21jcA5ZZGllcmVzaXMuc21jcAtaYWN1dGUuc21jcA9aZG90YWNjZW50LnNtY3ALWmNhcm9uLnNtY3APZ2VybWFuZGJscy5zbWNwCkFscGhhdG9ub3MMRXBzaWxvbnRvbm9zCEV0YXRvbm9zCUlvdGF0b25vcwxPbWljcm9udG9ub3MMVXBzaWxvbnRvbm9zCk9tZWdhdG9ub3MRaW90YWRpZXJlc2lzdG9ub3MFQWxwaGEEQmV0YQdFcHNpbG9uBFpldGEDRXRhBElvdGEFS2FwcGECTXUCTnUHT21pY3JvbgNSaG8DVGF1B1Vwc2lsb24DQ2hpDElvdGFkaWVyZXNpcw9VcHNpbG9uZGllcmVzaXMKYWxwaGF0b25vcwxlcHNpbG9udG9ub3MIZXRhdG9ub3MJaW90YXRvbm9zFHVwc2lsb25kaWVyZXNpc3Rvbm9zBWthcHBhB29taWNyb24HdW5pMDNCQwJudQNjaGkMaW90YWRpZXJlc2lzD3Vwc2lsb25kaWVyZXNpcwxvbWljcm9udG9ub3MMdXBzaWxvbnRvbm9zCm9tZWdhdG9ub3MHdW5pMDQwMQd1bmkwNDAzB3VuaTA0MDUHdW5pMDQwNgd1bmkwNDA3B3VuaTA0MDgHdW5pMDQxQQd1bmkwNDBDB3VuaTA0MEUHdW5pMDQxMAd1bmkwNDEyB3VuaTA0MTMHdW5pMDQxNQd1bmkwNDE5B3VuaTA0MUMHdW5pMDQxRAd1bmkwNDFFB3VuaTA0MUYHdW5pMDQyMAd1bmkwNDIxB3VuaTA0MjIHdW5pMDQyNQd1bmkwNDMwB3VuaTA0MzUHdW5pMDQzOQd1bmkwNDNFB3VuaTA0NDAHdW5pMDQ0MQd1bmkwNDQzB3VuaTA0NDUHdW5pMDQ1MQd1bmkwNDUzB3VuaTA0NTUHdW5pMDQ1Ngd1bmkwNDU3B3VuaTA0NTgHdW5pMDQ1Qwd1bmkwNDVFBldncmF2ZQZ3Z3JhdmUGV2FjdXRlBndhY3V0ZQlXZGllcmVzaXMJd2RpZXJlc2lzBllncmF2ZQZ5Z3JhdmUGbWludXRlBnNlY29uZAlleGNsYW1kYmwHdW5pRkIwMgd1bmkwMUYwB3VuaTAyQkMHdW5pMUUzRQd1bmkxRTNGB3VuaTFFMDAHdW5pMUUwMQd1bmkxRjREB3VuaUZCMDMHdW5pRkIwNAd1bmkwNDAwB3VuaTA0MEQHdW5pMDQ1MAd1bmkwNDVEB3VuaTA0NzAHdW5pMDQ3MQd1bmkwNDc2B3VuaTA0NzcHdW5pMDQ3OQd1bmkwNDc4B3VuaTA0OTgHdW5pMDQ5OQd1bmkwNEFBB3VuaTA0QUIHdW5pMDRBRQd1bmkwNEFGB3VuaTA0QzAHdW5pMDRDMQd1bmkwNEMyB3VuaTA0Q0YHdW5pMDREMAd1bmkwNEQxB3VuaTA0RDIHdW5pMDREMwd1bmkwNEQ0B3VuaTA0RDUHdW5pMDRENgd1bmkwNEQ3B3VuaTA0REEHdW5pMDREOQd1bmkwNERCB3VuaTA0REMHdW5pMDRERAd1bmkwNERFB3VuaTA0REYHdW5pMDRFMgd1bmkwNEUzB3VuaTA0RTQHdW5pMDRFNQd1bmkwNEU2B3VuaTA0RTcHdW5pMDRFOAd1bmkwNEU5B3VuaTA0RUEHdW5pMDRFQgd1bmkwNEVDB3VuaTA0RUQHdW5pMDRFRQd1bmkwNEVGB3VuaTA0RjAHdW5pMDRGMQd1bmkwNEYyB3VuaTA0RjMHdW5pMDRGNAd1bmkwNEY1B3VuaTA0RjgHdW5pMDRGOQd1bmkwNEZDB3VuaTA0RkQHdW5pMDUwMQd1bmkwNTEyB3VuaTA1MTMHdW5pMUVBMAd1bmkxRUExB3VuaTFFQTIHdW5pMUVBMwd1bmkxRUE0B3VuaTFFQTUHdW5pMUVBNgd1bmkxRUE3B3VuaTFFQTgHdW5pMUVBOQd1bmkxRUFBB3VuaTFFQUIHdW5pMUVBQwd1bmkxRUFEB3VuaTFFQUUHdW5pMUVBRgd1bmkxRUIwB3VuaTFFQjEHdW5pMUVCMgd1bmkxRUIzB3VuaTFFQjQHdW5pMUVCNQd1bmkxRUI2B3VuaTFFQjcHdW5pMUVCOAd1bmkxRUI5B3VuaTFFQkEHdW5pMUVCQgd1bmkxRUJDB3VuaTFFQkQHdW5pMUVCRQd1bmkxRUJGB3VuaTFFQzAHdW5pMUVDMQd1bmkxRUMyB3VuaTFFQzMHdW5pMUVDNAd1bmkxRUM1B3VuaTFFQzYHdW5pMUVDNwd1bmkxRUM4B3VuaTFFQzkHdW5pMUVDQQd1bmkxRUNCB3VuaTFFQ0MHdW5pMUVDRAd1bmkxRUNFB3VuaTFFQ0YHdW5pMUVEMAd1bmkxRUQxB3VuaTFFRDIHdW5pMUVEMwd1bmkxRUQ0B3VuaTFFRDUHdW5pMUVENgd1bmkxRUQ3B3VuaTFFRDgHdW5pMUVEOQd1bmkxRURBB3VuaTFFREIHdW5pMUVEQwd1bmkxRUREB3VuaTFFREUHdW5pMUVERgd1bmkxRUUwB3VuaTFFRTEHdW5pMUVFMgd1bmkxRUUzB3VuaTFFRTQHdW5pMUVFNQd1bmkxRUU2B3VuaTFFRTcHdW5pMUVFOAd1bmkxRUU5B3VuaTFFRUEHdW5pMUVFQgd1bmkxRUVDB3VuaTFFRUQH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Adz/4QALAOH/1ADx/8kBBP/lARv/4wEv/8QBOP/hAUn/1AFK//UBS//nAVP/0gFU/8kACQDh/8MA8f/PAS//zgE4/+cBO//fAUn/0QFL/+wBU/+gAVT/0QAJAOH/wwDx/88BL//OATj/5wE7/98BSf/RAUv/7AFT/6ABVP/RAAgA4f/JAPH/3wEE/+0BG//rAS//3wE7/+kBSv/1AVT/4AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADh/+YA8f/QAS//zgE4/+gBSf/nAUv/7QFT/+YBVP/QAAsA1AAUAOH/4ADoABMBOP/hATn/4AE8/+EBQf/pAUn/3wFL/94BU//fAVX/8gAYALP/1AC9/+0AvwARAMX/4ADH/+cAyP/lAMn/7gDUABIA5f/pAPH/1wEv/9cBOf/TATv/1gE8/8UBQf/nAUkADQFLAAwBVP/WAVX/8gGp/+kBrf/nAbX/5wG2/+kB3//wAAUAGf/yAOH/8QFJ//IBS//yAVP/8gAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kABIA1P+uAOEAEgDm/+AA6P+tAOr/1gD4/98A/P/SAQL/4AEX/84BJ//dASn/4gEt/+ABM//gATn/6QE8/9oBRv+9AVD/3wFTABEACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAMANQAEwDh/+YA4v/0AOgAEgDx/+cBL//nATj/5QE5/+gBSf/mAUv/5gFT/+YBVP/nAAkA4f/DAPH/zwEv/84BOP/nATv/3wFJ/9EBS//sAVP/oAFU/9EACQDh/8MA8f/PAS//zgE4/+cBO//fAUn/0QFL/+wBU/+gAVT/0QACANT/4gFT/+QAAgDU/+EA6P/kAAYA6P/uAPH/7gEE//QBG//xAS//7wFU/+8ABADx//QBBP/1AS//9QFU//UAAgDo/8kBF//uAAYA6AAUAPH/7QD3/+IBL//tATn/7QFU/+0AAQEX//EABQEX/+sBqf/rAa3/6QG1/+sBtv/rABMASAANAML/qwDD/8AAx//VAOj/qgEX/+IBGwAMAUoACwFMAAsBp/+/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/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABAAL/+YAP//0AF//7wE8/+0ABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAUASP/uAFn/6gG7//ABvP/tAb7/8AAFAEj/7gBZ/+oBu//wAbz/7QG+//AABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAEBp//rAAEBp//rAAEBp//rAAEBp//rACQACP/iAAsAFAAM/88APwASAEj/6gBU/9gAVv/qAF8AEwBr/64Aev/NAH//oACE/8EAh//AALP/0AC3/+oAuv/GALsADQC9/+kAvv/WAMH/6ADC/7oAxf/pAMf/ywDI/9oAyf/HAW7/0wGn/6sBqf/NAa3/ywG1/8sBtv/LAbn/8wG8//MBvf/vAdz/6AHf/+4ABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAAQDx//UAAQDx//UAAQDx//UAAQDx//UAAQDx/8AACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1AAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1ABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAcA8f/wAQT/8QEb//MBL//xAUr/8wFM/+kBVP/TAAQAC//mAD//9ABf/+8BPP/tAAQAC//mAD//9ABf/+8BPP/tAAQAC//mAD//9ABf/+8BPP/tAAQAC//mAD//9ABf/+8BPP/tAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAAQDx/8AACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AABAaf/6wATAFn/wQCz/8UAxf+0AOX/1wDx/7kBBP+yARf/0gEb/8gBL/+gATn/xQFB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/+wAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAkAAj/4gALABQADP/PAD8AEgBI/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBp/+rAan/zQGt/8sBtf/LAbb/ywG5//MBvP/zAb3/7wHc/+gB3//uABwAIf/DAFb/7wBZ/98Alv/uALP/5QC0/9EAvwARAMX/yADUABMA4f/FAPH/ygEv/58BOP9RATn/ewE7/8oBPP/dAUH/8gFJ/3UBS//KAVP/TwFU/4wBrf/1AbX/9QG5/8cBuv/xAbv/zQG8/90Bvv/EAAIBDAALAVP/5gAFAEj/7gBZ/+oBu//wAbz/7QG+//AACABZ/+UAs//LAMj/5AGnAA0Bqf/tAa3/6wG1/+wBtv/sAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QAEwBZ/8EAs//FAMX/tADl/9cA8f+5AQT/sgEX/9IBG//IAS//oAE5/8UBQf/kAUr/zAFM/8wBVP/LAVX/7wGp/+gBrf/mAbX/5wG2/+cACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAVgAOAH//nwC//94Awv/lANT/qADo/8oBRv/jAaf/xgHf//UAOQBU/7UAWf/HAGv+uAB6/ygAf/9NAIT/jgCH/6EAs/+uALr/fgC+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Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UACQALABQAPwARAFT/4gBfABMBp/+0Aan/2QGt/9kBtf/ZAbb/2QAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAEAAv/5gA///QAX//vATz/7QAkAAj/4gALABQADP/PAD8AEgBI/+oAVP/YAFb/6gBfABMAa/+uAHr/zQB//6AAhP/BAIf/wACz/9AAt//qALr/xgC7AA0Avf/pAL7/1gDB/+gAwv+6AMX/6QDH/8sAyP/aAMn/xwFu/9MBp/+rAan/zQGt/8sBtf/LAbb/ywG5//MBvP/zAb3/7wHc/+gB3//uAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1AAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAYALP/1AC9/+0AvwARAMX/4ADH/+cAyP/lAMn/7gDUABIA5f/pAPH/1wEv/9cBOf/TATv/1gE8/8UBQf/nAUkADQFLAAwBVP/WAVX/8gGp/+kBrf/nAbX/5wG2/+kB3//wAAEBF//xAAgA1AAVAOgAFQE4/+QBOf/lATv/5AFJ/+MBS//iAVP/5AAcACH/wwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oBL/+fATj/UQE5/3sBO//KATz/3QFB//IBSf91AUv/ygFT/08BVP+MAa3/9QG1//UBuf/HAbr/8QG7/80BvP/dAb7/xAAHAPH/8AEE//EBG//zAS//8QFK//MBTP/pAVT/0wAcACH/wwBW/+8AWf/fAJb/7gCz/+UAtP/RAL8AEQDF/8gA1AATAOH/xQDx/8oBL/+fATj/UQE5/3sBO//KATz/3QFB//IBSf91AUv/ygFT/08BVP+MAa3/9QG1//UBuf/HAbr/8QG7/80BvP/dAb7/xAAHAPH/8AEE//EBG//zAS//8QFK//MBTP/pAVT/0wAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UAAQDx//UAAQDx//UAGACz/9QAvf/tAL8AEQDF/+AAx//nAMj/5QDJ/+4A1AASAOX/6QDx/9cBL//XATn/0wE7/9YBPP/FAUH/5wFJAA0BSwAMAVT/1gFV//IBqf/pAa3/5wG1/+cBtv/pAd//8AABARf/8QAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAGAMX/6gDo/+4A8f+wAS//7AFU/+wB3P/oABIA1P+uAOEAEgDm/+AA6P+tAOr/1gD4/98A/P/SAQL/4AEX/84BJ//dASn/4gEt/+ABM//gATn/6QE8/9oBRv+9AVD/3wFTABEABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAEgDU/64A4QASAOb/4ADo/60A6v/WAPj/3wD8/9IBAv/gARf/zgEn/90BKf/iAS3/4AEz/+ABOf/pATz/2gFG/70BUP/fAVMAEQAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QASANT/rgDhABIA5v/gAOj/rQDq/9YA+P/fAPz/0gEC/+ABF//OASf/3QEp/+IBLf/gATP/4AE5/+kBPP/aAUb/vQFQ/98BUwARAAcASAANAMEACwDC/+oAxQAMAOj/yAEX//EB3//1ABgAs//UAL3/7QC/ABEAxf/gAMf/5wDI/+UAyf/uANQAEgDl/+kA8f/XAS//1wE5/9MBO//WATz/xQFB/+cBSQANAUsADAFU/9YBVf/yAan/6QGt/+cBtf/nAbb/6QHf//AAAQEX//EAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MAHAAh/8MAVv/vAFn/3wCW/+4As//lALT/0QC/ABEAxf/IANQAEwDh/8UA8f/KAS//nwE4/1EBOf97ATv/ygE8/90BQf/yAUn/dQFL/8oBU/9PAVT/jAGt//UBtf/1Abn/xwG6//EBu//NAbz/3QG+/8QABwDx//ABBP/xARv/8wEv//EBSv/zAUz/6QFU/9MABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAFAEj/7gBZ/+oBu//wAbz/7QG+//AAAQDx//UABQBI/+4AWf/qAbv/8AG8/+0Bvv/wAAEA8f/1AAUASP/uAFn/6gG7//ABvP/tAb7/8AABAPH/9QAIANQAFQDoABUBOP/kATn/5QE7/+QBSf/jAUv/4gFT/+QACADUABUA6AAVATj/5AE5/+UBO//kAUn/4wFL/+IBU//kAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAH//3wCw//MAsv/wAL//6gDU/98A4f/gAVP/4AGn/+0Bvf/1AAkAxf/qAOj/uADx/+oBBP/wARv/8QEv/+sBSv/1AVT/7AHc/+oACQB//98AsP/zALL/8AC//+oA1P/fAOH/4AFT/+ABp//tAb3/9QAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAkAf//fALD/8wCy//AAv//qANT/3wDh/+ABU//gAaf/7QG9//UACQDF/+oA6P+4APH/6gEE//ABG//xAS//6wFK//UBVP/sAdz/6gAJAMX/6gDo/7gA8f/qAQT/8AEb//EBL//rAUr/9QFU/+wB3P/qAAEBp//rAAEBp//rACQACP/iAAsAFAAM/88APwASAEj/6gBU/9gAVv/qAF8AEwBr/64Aev/NAH//oACE/8EAh//AALP/0AC3/+oAuv/GALsADQC9/+kAvv/WAMH/6ADC/7oAxf/pAMf/ywDI/9oAyf/HAW7/0wGn/6sBqf/NAa3/ywG1/8sBtv/LAbn/8wG8//MBvf/vAdz/6AHf/+4ABwBIAA0AwQALAML/6gDFAAwA6P/IARf/8QHf//UAJAAI/+IACwAUAAz/zwA/ABIASP/qAFT/2ABW/+oAXwATAGv/rgB6/80Af/+gAIT/wQCH/8AAs//QALf/6gC6/8YAuwANAL3/6QC+/9YAwf/oAML/ugDF/+kAx//LAMj/2gDJ/8cBbv/TAaf/qwGp/80Brf/LAbX/ywG2/8sBuf/zAbz/8wG9/+8B3P/oAd//7gAHAEgADQDBAAsAwv/qAMUADADo/8gBF//xAd//9QAkAAj/4gAL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/94CE//rAhT/6wIV/+sCFv/rAhf/6wId/+sCHv/rAh//6wIg/+sCIf/rAiL/6gIj/+oCJP/qAiX/6gIm/+gCJ//oAij/VgIp/94CKv9WAiv/3gIs/1YCLf/eAi//6wIx/+sCM//rAjX/6wI3/+sCOf/rAjv/6wI9/+sCP//rAkH/6wJD/+sCRf/rAkf/6wJJ/+sCV/74Amv/6wJt/+sCb//rAoAAFAKCABQChAAUAof/6gKJ/+oCi//qAo3/6gKP/+oCkf/qApX/6AL4/1YDAP9WAxD/6wMU/+oDFv/rAxj/6AMb/+oDHP/rAx3/6gMk/vgDKP9WAzMAFAM1/94DNv/rAzj/6wM6/+sDO//oAz3/6wNE/+gDTP/oA1X/VgNW/94DXP/rA2H/6ANi/+sDZ//rA2n/6ANu/1YDb//eA3D/VgNx/94Ddf/rA3f/6wN4/+sDgv/rA4T/6wOG/+sDiv/oA4z/6AOO/+gDlf/rA5j/VgOZ/94Dmv9WA5v/3gOc/1YDnf/eA57/VgOf/94DoP9WA6H/3gOi/1YDo//eA6T/VgOl/94Dpv9WA6f/3gOo/1YDqf/eA6r/VgOr/94DrP9WA63/3gOu/1YDr//eA7H/6wOz/+sDtf/rA7f/6wO5/+sDu//rA73/6wO//+sDxf/rA8f/6wPJ/+sDy//rA83/6wPP/+sD0f/rA9P/6wPV/+sD1//rA9n/6wPb/+sD3f/qA9//6gPh/+oD4//qA+X/6gPn/+oD6f/qA+v/6APt/+gD7//oA/YAFAAfADb/1QA4/+QAOf/sADv/3QDN/9UA0f/VART/5AEu/9UBNv/VAgv/3QKA/9UCgv/VAoT/1QKS/+wClP/dApb/3QL9/90DDP/dAw//3QMz/9UDRf/sA0f/7ANJ/+wDS//dA2D/5ANo/90D6v/dA+z/3QPu/90D9v/VBBP/3QAaADb/sAA4/+0AO//QAM3/sADR/7ABFP/tAS7/sAE2/7ACC//QAoD/sAKC/7AChP+wApT/0AKW/9AC/f/QAwz/0AMP/9ADM/+wA0v/0ANg/+0DaP/QA+r/0APs/9AD7v/QA/b/sAQT/9AAEAAs/+4AN//uAgf/7gII/+4CCf/uAgr/7gJX/+4Chv/uAoj/7gKK/+4CjP/uAo7/7gKQ/+4DJP/uA9z/7gPe/+4ARwAEABAACQAQAEX/6ABG/+gAR//oAEn/6ABT/+gAkf/oAJX/6AC2/+gAw//oAMT/6ADy/+gA/v/oARn/6AEd/+gBNf/oAUf/6AFI/+gBUv/oAWUAEAFmABABaAAQAWkAEAFqABACE//oAhT/6AIV/+gCFv/oAhf/6AIv/+gCMf/oAjP/6AI1/+gCN//oAjn/6AI7/+gCPf/oAj//6AJB/+gCQ//oAkX/6AJH/+gCSf/oAxD/6AM2/+gDOv/oAz3/6ANNABADTgAQA1IAEANc/+gDYv/oA2f/6AN1/+gDd//oA3j/6AOE/+gDlf/oA7H/6AOz/+gDtf/oA7f/6AO5/+gDu//oA73/6AO//+gD0//oA9X/6APX/+gD2//oAD0ARf/sAEb/7ABH/+wASf/sAFP/7ACR/+wAlf/sALb/7ADD/+wAxP/sAPL/7AD+/+wBGf/sAR3/7AE1/+wBR//sAUj/7AFS/+wCE//sAhT/7AIV/+wCFv/sAhf/7AIv/+wCMf/sAjP/7AI1/+wCN//sAjn/7AI7/+wCPf/sAj//7AJB/+wCQ//sAkX/7AJH/+wCSf/sAxD/7AM2/+wDOv/sAz3/7ANc/+wDYv/sA2f/7AN1/+wDd//sA3j/7AOE/+wDlf/sA7H/7AOz/+wDtf/sA7f/7AO5/+wDu//sA73/7AO//+wD0//sA9X/7APX/+wD2//sABcAUf/sARP/7AId/+wCHv/sAh//7AIg/+wCIf/sAmv/7AJt/+wCb//sAxb/7AMc/+wDOP/sA4L/7AOG/+wDxf/sA8f/7APJ/+wDy//sA83/7APP/+wD0f/sA9n/7AAGAA7/hAAQ/4QBZ/+EAWv/hAFv/4QBcP+EABAALP/sADf/7AIH/+wCCP/sAgn/7AIK/+wCV//sAob/7AKI/+wCiv/sAoz/7AKO/+wCkP/sAyT/7APc/+wD3v/sAAEpLAAEAAAAIgBOAMQBqgKQA2oEBAaeCGQJNgosC/IMJAxWDNQOug8wEAISFBLKFDAU6hVwFc4WkBcGFxgXQhiUGtIa9BwKHIgcshzcAB0ABP/yAAn/8gBY//MAW//zALj/8wEV//MBZf/yAWb/8gFo//IBaf/yAWr/8gIm//MCJ//zApX/8wMY//MDO//zA0T/8wNM//MDTf/yA07/8gNS//IDYf/zA2n/8wOK//MDjP/zA47/8wPr//MD7f/zA+//8wA5ACX/8wAp//MAMf/zADP/8wCB//MAkP/zAJT/8wCu//MAzv/zAQP/8wES//MBFv/zARj/8wEa//MBHP/zATT/8wFR//MB+P/zAgL/8wID//MCBP/zAgX/8wIG//MCLv/zAjD/8wIy//MCNP/zAkL/8wJE//MCRv/zAkj/8wJq//MCbP/zAm7/8wKf//MC/P/zAwn/8wMv//MDMv/zA1f/8wNj//MDZv/zA4H/8wOD//MDhf/zA8T/8wPG//MDyP/zA8r/8wPM//MDzv/zA9D/8wPS//MD1P/zA9b/8wPY//MD2v/zADkAJf/mACn/5gAx/+YAM//mAIH/5gCQ/+YAlP/mAK7/5gDO/+YBA//mARL/5gEW/+YBGP/mARr/5gEc/+YBNP/mAVH/5gH4/+YCAv/mAgP/5gIE/+YCBf/mAgb/5gIu/+YCMP/mAjL/5gI0/+YCQv/mAkT/5gJG/+YCSP/mAmr/5gJs/+YCbv/mAp//5gL8/+YDCf/mAy//5gMy/+YDV//mA2P/5gNm/+YDgf/mA4P/5gOF/+YDxP/mA8b/5gPI/+YDyv/mA8z/5gPO/+YD0P/mA9L/5gPU/+YD1v/mA9j/5gPa/+YANgAj/+QAOv/SADv/0wCt/+QAr//kANX/0gEI/+QB8f/kAfL/5AHz/+QB9P/kAfX/5AH2/+QB9//kAgv/0wIo/+QCKv/kAiz/5AKU/9MClv/TAvj/5AL9/9MDAP/kAwz/0wMN/9IDD//TAyj/5AM0/9IDS//TA1X/5ANo/9MDa//SA27/5ANw/+QDef/SA5P/0gOY/+QDmv/kA5z/5AOe/+QDoP/kA6L/5AOk/+QDpv/kA6j/5AOq/+QDrP/kA67/5APq/9MD7P/TA+7/0wP4/9IEAP/SBBP/0wAmAA7/HgAQ/x4AI//NAK3/zQCv/80BCP/NAWf/HgFr/x4Bb/8eAXD/HgHx/80B8v/NAfP/zQH0/80B9f/NAfb/zQH3/80CKP/NAir/zQIs/80C+P/NAwD/zQMo/80DVf/NA27/zQNw/80DmP/NA5r/zQOc/80Dnv/NA6D/zQOi/80DpP/NA6b/zQOo/80Dqv/NA6z/zQOu/80ApgBF/9wARv/cAEf/3ABJ/9wAT//zAFD/8wBR/9YAUv/zAFP/3ABX/90AWP/hAFv/4QCR/9wAlf/cAJf/3QC2/9wAuP/hALz/8wDD/9wAxP/cAMb/3QDn//MA6//zAOz/8wDu//MA7//zAPD/8wDy/9wA8//zAPX/8wD2//MA+f/zAPv/8wD+/9wBAP/zARP/1gEV/+EBGf/cAR3/3AEx//MBNf/cAUD/8wFF//MBR//cAUj/3AFS/9wCE//cAhT/3AIV/9wCFv/cAhf/3AIc//MCHf/WAh7/1gIf/9YCIP/WAiH/1gIi/90CI//dAiT/3QIl/90CJv/hAif/4QIv/9wCMf/cAjP/3AI1/9wCN//cAjn/3AI7/9wCPf/cAj//3AJB/9wCQ//cAkX/3AJH/9wCSf/cAmT/8wJm//MCaP/zAmn/8wJr/9YCbf/WAm//1gKH/90Cif/dAov/3QKN/90Cj//dApH/3QKV/+EDEP/cAxL/8wMU/90DFv/WAxj/4QMb/90DHP/WAx3/3QM2/9wDN//zAzj/1gM5//MDOv/cAzv/4QM9/9wDPv/zA0P/8wNE/+EDTP/hA1T/8wNc/9wDXf/zA2H/4QNi/9wDZ//cA2n/4QN1/9wDd//cA3j/3AN+//MDgP/zA4L/1gOE/9wDhv/WA4r/4QOM/+EDjv/hA5L/8wOV/9wDsf/cA7P/3AO1/9wDt//cA7n/3AO7/9wDvf/cA7//3APF/9YDx//WA8n/1gPL/9YDzf/WA8//1gPR/9YD0//cA9X/3APX/9wD2f/WA9v/3APd/90D3//dA+H/3QPj/90D5f/dA+f/3QPp/90D6//hA+3/4QPv/+ED8//zA/X/8wP///MEDP/zBA7/8wQQ//MAcQAE/9oACf/aAEX/8ABG//AAR//wAEn/8ABT//AAV//vAFj/3ABb/9wAkf/wAJX/8ACX/+8Atv/wALj/3ADD//AAxP/wAMb/7wDy//AA/v/wARX/3AEZ//ABHf/wATX/8AFH//ABSP/wAVL/8AFl/9oBZv/aAWj/2gFp/9oBav/aAhP/8AIU//ACFf/wAhb/8AIX//ACIv/vAiP/7wIk/+8CJf/vAib/3AIn/9wCL//wAjH/8AIz//ACNf/wAjf/8AI5//ACO//wAj3/8AI///ACQf/wAkP/8AJF//ACR//wAkn/8AKH/+8Cif/vAov/7wKN/+8Cj//vApH/7wKV/9wDEP/wAxT/7wMY/9wDG//vAx3/7wM2//ADOv/wAzv/3AM9//ADRP/cA0z/3ANN/9oDTv/aA1L/2gNc//ADYf/cA2L/8ANn//ADaf/cA3X/8AN3//ADeP/wA4T/8AOK/9wDjP/cA47/3AOV//ADsf/wA7P/8AO1//ADt//wA7n/8AO7//ADvf/wA7//8APT//AD1f/wA9f/8APb//AD3f/vA9//7wPh/+8D4//vA+X/7wPn/+8D6f/vA+v/3APt/9wD7//cADQABP+gAAn/oABX//EAWP/FAFv/xQCX//EAuP/FAMb/8QEV/8UBZf+gAWb/oAFo/6ABaf+gAWr/oAIi//ECI//xAiT/8QIl//ECJv/FAif/xQKH//ECif/xAov/8QKN//ECj//xApH/8QKV/8UDFP/xAxj/xQMb//EDHf/xAzv/xQNE/8UDTP/FA03/oANO/6ADUv+gA2H/xQNp/8UDiv/FA4z/xQOO/8UD3f/xA9//8QPh//ED4//xA+X/8QPn//ED6f/xA+v/xQPt/8UD7//FAD0ARf/nAEb/5wBH/+cASf/nAFP/5wCR/+cAlf/nALb/5wDD/+cAxP/nAPL/5wD+/+cBGf/nAR3/5wE1/+cBR//nAUj/5wFS/+cCE//nAhT/5wIV/+cCFv/nAhf/5wIv/+cCMf/nAjP/5wI1/+cCN//nAjn/5wI7/+cCPf/nAj//5wJB/+cCQ//nAkX/5wJH/+cCSf/nAxD/5wM2/+cDOv/nAz3/5wNc/+cDYv/nA2f/5wN1/+cDd//nA3j/5wOE/+cDlf/nA7H/5wOz/+cDtf/nA7f/5wO5/+cDu//nA73/5wO//+cD0//nA9X/5wPX/+cD2//nAHEABAAMAAkADABF/+gARv/oAEf/6ABJ/+gAUf/qAFP/6ABYAAsAWwALAJH/6ACV/+gAtv/oALgACwDD/+gAxP/oAPL/6AD+/+gBE//qARUACwEZ/+gBHf/oATX/6AFH/+gBSP/oAVL/6AFlAAwBZgAMAWgADAFpAAwBagAMAhP/6AIU/+gCFf/oAhb/6AIX/+gCHf/qAh7/6gIf/+oCIP/qAiH/6gImAAsCJwALAi//6AIx/+gCM//oAjX/6AI3/+gCOf/oAjv/6AI9/+gCP//oAkH/6AJD/+gCRf/oAkf/6AJJ/+gCa//qAm3/6gJv/+oClQALAxD/6AMW/+oDGAALAxz/6gM2/+gDOP/qAzr/6AM7AAsDPf/oA0QACwNMAAsDTQAMA04ADANSAAwDXP/oA2EACwNi/+gDZ//oA2kACwN1/+gDd//oA3j/6AOC/+oDhP/oA4b/6gOKAAsDjAALA44ACwOV/+gDsf/oA7P/6AO1/+gDt//oA7n/6AO7/+gDvf/oA7//6APF/+oDx//qA8n/6gPL/+oDzf/qA8//6gPR/+oD0//oA9X/6APX/+gD2f/qA9v/6APrAAsD7QALA+8ACwAMAFr/7QBc/+0A6f/tApj/7QKa/+0CnP/tAzz/7QNs/+0Dev/tA5T/7QP5/+0EAf/tAAwAWv/yAFz/8gDp//ICmP/yApr/8gKc//IDPP/yA2z/8gN6//IDlP/yA/n/8gQB//IAHwBY//QAWv/yAFv/9ABc//MAuP/0AOn/8gEV//QCJv/0Aif/9AKV//QCmP/zApr/8wKc//MDGP/0Azv/9AM8//IDRP/0A0z/9ANh//QDaf/0A2z/8gN6//IDiv/0A4z/9AOO//QDlP/yA+v/9APt//QD7//0A/n/8gQB//IAeQAE/8oACf/KADb/0gA4/9QAOv/0ADv/0wBP/9EAUP/RAFL/0QBY/+YAWv/vAFv/5gC4/+YAvP/RAM3/0gDR/9IA1f/0ANn/7QDc/+EA5//RAOn/7wDr/9EA7P/RAO7/0QDv/9EA8P/RAPP/0QD1/9EA9v/RAPn/0QD7/9EBAP/RART/1AEV/+YBLv/SATH/0QE2/9IBQP/RAUX/0QFl/8oBZv/KAWj/ygFp/8oBav/KAgv/0wIc/9ECJv/mAif/5gJk/9ECZv/RAmj/0QJp/9ECgP/SAoL/0gKE/9IClP/TApX/5gKW/9MC/f/TAwz/0wMN//QDD//TAxL/0QMY/+YDJ//tAzP/0gM0//QDN//RAzn/0QM7/+YDPP/vAz7/0QND/9EDRP/mA0v/0wNM/+YDTf/KA07/ygNS/8oDVP/RA13/0QNg/9QDYf/mA2j/0wNp/+YDa//0A2z/7wN5//QDev/vA37/0QOA/9EDif/tA4r/5gOL/+0DjP/mA43/7QOO/+YDj//hA5L/0QOT//QDlP/vA+r/0wPr/+YD7P/TA+3/5gPu/9MD7//mA/P/0QP1/9ED9v/SA/j/9AP5/+8D+v/hA/z/4QP//9EEAP/0BAH/7wQM/9EEDv/RBBD/0QQT/9MAHQA2/74AWP/vAFv/7wC4/+8Azf++ANH/vgEV/+8BLv++ATb/vgIm/+8CJ//vAoD/vgKC/74ChP++ApX/7wMY/+8DM/++Azv/7wNE/+8DTP/vA2H/7wNp/+8Div/vA4z/7wOO/+8D6//vA+3/7wPv/+8D9v++ADQANv/mADj/5wA6//IAO//nAFr/8QDN/+YA0f/mANX/8gDZ/+4A3P/oAOn/8QEU/+cBLv/mATb/5gIL/+cCgP/mAoL/5gKE/+YClP/nApb/5wL9/+cDDP/nAw3/8gMP/+cDJ//uAzP/5gM0//IDPP/xA0v/5wNg/+cDaP/nA2v/8gNs//EDef/yA3r/8QOJ/+4Di//uA43/7gOP/+gDk//yA5T/8QPq/+cD7P/nA+7/5wP2/+YD+P/yA/n/8QP6/+gD/P/oBAD/8gQB//EEE//nAIQAIwAQACX/6AAp/+gAMf/oADP/6AA2/+AAOP/gADv/3wCB/+gAkP/oAJT/6ACtABAArv/oAK8AEADN/+AAzv/oAM8AEADR/+AA2AAQANz/4QDtABAA9P/gAP8AEAED/+gBCAAQARL/6AEU/+ABFv/oARj/6AEa/+gBHP/oAS7/4AE0/+gBNv/gAU0AEAFR/+gB8QAQAfIAEAHzABAB9AAQAfUAEAH2ABAB9wAQAfj/6AIC/+gCA//oAgT/6AIF/+gCBv/oAgv/3wIoABACKgAQAiwAEAIu/+gCMP/oAjL/6AI0/+gCQv/oAkT/6AJG/+gCSP/oAmr/6AJs/+gCbv/oAoD/4AKC/+AChP/gApT/3wKW/98Cn//oAvgAEAL8/+gC/f/fAwAAEAMJ/+gDDP/fAw//3wMoABADL//oAzL/6AMz/+ADS//fA1UAEANX/+gDYP/gA2P/6ANm/+gDaP/fA24AEANwABADgf/oA4P/6AOF/+gDj//hA5D/4AOWABADlwAQA5gAEAOaABADnAAQA54AEAOgABADogAQA6QAEAOmABADqAAQA6oAEAOsABADrgAQA8T/6APG/+gDyP/oA8r/6APM/+gDzv/oA9D/6APS/+gD1P/oA9b/6APY/+gD2v/oA+r/3wPs/98D7v/fA/b/4AP6/+ED+//gA/z/4QP9/+AEEQAQBBIAEAQT/98ALQA2//EAOP/0ADr/9AA7//AAzf/xAM//9QDR//EA1f/0ANj/9QDZ//MBFP/0AS7/8QE2//EBTf/1Agv/8AKA//ECgv/xAoT/8QKU//AClv/wAv3/8AMM//ADDf/0Aw//8AMn//MDM//xAzT/9ANL//ADYP/0A2j/8ANr//QDef/0A4n/8wOL//MDjf/zA5P/9AOW//UD6v/wA+z/8APu//AD9v/xA/j/9AQA//QEEf/1BBP/8ABZACMADwA2/+YAOP/mADoADgA7/+YArQAPAK8ADwDN/+YAzwAOANH/5gDVAA4A2AAOANkACwDc/+UA7QAPAPT/6AD/AA8BCAAPART/5gEu/+YBNv/mAU0ADgHxAA8B8gAPAfMADwH0AA8B9QAPAfYADwH3AA8CC//mAigADwIqAA8CLAAPAoD/5gKC/+YChP/mApT/5gKW/+YC+AAPAv3/5gMAAA8DDP/mAw0ADgMP/+YDJwALAygADwMz/+YDNAAOA0v/5gNVAA8DYP/mA2j/5gNrAA4DbgAPA3AADwN5AA4DiQALA4sACwONAAsDj//lA5D/6AOTAA4DlgAOA5cADwOYAA8DmgAPA5wADwOeAA8DoAAPA6IADwOkAA8DpgAPA6gADwOqAA8DrAAPA64ADwPq/+YD7P/mA+7/5gP2/+YD+AAOA/r/5QP7/+gD/P/lA/3/6AQAAA4EEQAOBBIADwQT/+YALgA2/+MAOv/lADv/5ADN/+MAz//lANH/4wDV/+UA2P/lANn/6QDt/+oA///qAS7/4wE2/+MBTf/lAgv/5AKA/+MCgv/jAoT/4wKU/+QClv/kAv3/5AMM/+QDDf/lAw//5AMn/+kDM//jAzT/5QNL/+QDaP/kA2v/5QN5/+UDif/pA4v/6QON/+kDk//lA5b/5QOX/+oD6v/kA+z/5APu/+QD9v/jA/j/5QQA/+UEEf/lBBL/6gQT/+QAIQA2/+IAOv/kAM3/4gDP/+QA0f/iANX/5ADY/+QA2f/pAO3/6wD//+sBLv/iATb/4gFN/+QCgP/iAoL/4gKE/+IDDf/kAyf/6QMz/+IDNP/kA2v/5AN5/+QDif/pA4v/6QON/+kDk//kA5b/5AOX/+sD9v/iA/j/5AQA/+QEEf/kBBL/6wAXADb/6wA7//MAzf/rANH/6wEu/+sBNv/rAgv/8wKA/+sCgv/rAoT/6wKU//MClv/zAv3/8wMM//MDD//zAzP/6wNL//MDaP/zA+r/8wPs//MD7v/zA/b/6wQT//MAMABP/+8AUP/vAFL/7wBa//AAvP/vAOf/7wDp//AA6//vAOz/7wDu/+8A7//vAPD/7wDz/+8A9f/vAPb/7wD5/+8A+//vAQD/7wEx/+8BQP/vAUX/7wIc/+8CZP/vAmb/7wJo/+8Caf/vAxL/7wM3/+8DOf/vAzz/8AM+/+8DQ//vA1T/7wNd/+8DbP/wA3r/8AN+/+8DgP/vA5L/7wOU//AD8//vA/X/7wP5//AD///vBAH/8AQM/+8EDv/vBBD/7wAdAAT/8gAJ//IAWP/1AFv/9QC4//UBFf/1AWX/8gFm//IBaP/yAWn/8gFq//ICJv/1Aif/9QKV//UDGP/1Azv/9QNE//UDTP/1A03/8gNO//IDUv/yA2H/9QNp//UDiv/1A4z/9QOO//UD6//1A+3/9QPv//UABAD0/+0DkP/tA/v/7QP9/+0ACgAE//UACf/1AWX/9QFm//UBaP/1AWn/9QFq//UDTf/1A07/9QNS//UAVABF//AARv/wAEf/8ABJ//AAUf/rAFP/8ACR//AAlf/wALb/8ADD//AAxP/wAPL/8AD+//ABE//rARn/8AEd//ABNf/wAUf/8AFI//ABUv/wAhP/8AIU//ACFf/wAhb/8AIX//ACHf/rAh7/6wIf/+sCIP/rAiH/6wIv//ACMf/wAjP/8AI1//ACN//wAjn/8AI7//ACPf/wAj//8AJB//ACQ//wAkX/8AJH//ACSf/wAmv/6wJt/+sCb//rAxD/8AMW/+sDHP/rAzb/8AM4/+sDOv/wAz3/8ANc//ADYv/wA2f/8AN1//ADd//wA3j/8AOC/+sDhP/wA4b/6wOV//ADsf/wA7P/8AO1//ADt//wA7n/8AO7//ADvf/wA7//8APF/+sDx//rA8n/6wPL/+sDzf/rA8//6wPR/+sD0//wA9X/8APX//AD2f/rA9v/8ACPAAQADQAJAA0AQ//wAEX/sABG/7AAR/+wAEn/sABR/9YAU/+wAFgACwBbAAsAkf+wAJX/sAC2/7AAuAALAMT/sADt/68A8v+wAP7/sAD//68BE//WARUACwEZ/7ABHf+wATX/sAFH/7ABSP+wAVL/sAFlAA0BZgANAWgADQFpAA0BagANAgz/8AIN//ACDv/wAg//8AIQ//ACEf/wAhL/8AIT/7ACFP+wAhX/sAIW/7ACF/+wAh3/1gIe/9YCH//WAiD/1gIh/9YCJgAL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AlQA0QJXAlcA0gJZAlkA0wJbAlsA1AJdAl0A1QJfAl8A1gJhAmEA1wJjAm8A2AJxAnEA5QJzAnMA5gJ1AnUA5wKAAoAA6AKCAoIA6QKEAoQA6gKGAoYA6wKIAogA7AKKAooA7QKMAowA7gKOAo4A7wKQApAA8AKSApIA8QKUApcA8gKZApkA9gKbApsA9wL4Av0A+AMAAw8A/gMSAxIBDgMWAxYBDwMYAxgBEAMcAxwBEQMfAyABEgMiAysBFAMtAy8BHgMxAzYBIQM4AzkBJwM7Az4BKQNEA0UBLQNHA0cBLwNJA0kBMANLA04BMQNSA1cBNQNaA1oBOwNcA1wBPANgA2EBPQNmA2YBPwNoA3EBQAN0A3UBSgN3A3oBTAOBA4IBUAOGA4YBUgOIA44BUwOTA5QBWgOYA8ABXAPCA8IBhQPEA9EBhgPZA9kBlAPcA9wBlQPeA94BlgPqA+8BlwPyA/IBnQP0A/QBngP2A/YBnwP4A/kBoAP+BAEBogQEBAQBpgQGBAcBpwQJBAkBqQQNBA0BqgQPBA8BqwQTBBMBrAABAAoACgAoADMANAA9AEgATQBWAFkAXQABACIAmQCwALIAswC0ALsAvgC/AMAAxQDHAMgAyQDNANEA0wDUANYA3gDiAOMA5ADlAOYA6ADqAOwA8QDzAPYA+wD+AR0B3AACAHYABAAEAAAACQAJAAEADgAOAAIAEAAQAAMAIwAnAAQAKgAyAAkANgA8ABIAQwBFABkARwBHABwASgBKAB0ATwBSAB4AVABUACIAWABYACMAWgBcACQAiACIACcArACvACgAuAC4ACwAvAC8AC0AwgDCAC4AzwDQAC8A0gDSADEA1QDVADIA1wDZADMA2wDbADYA3QDdADcA3wDfADgA4QDhADkA5wDnADoA6QDpADsA8gDyADwA9wD3AD0A+QD6AD4A/wEAAEABBQEFAEIBCAEIAEMBEwEVAEQBJwEpAEcBLAEsAEoBLgEuAEsBRQFFAEwBZQFrAE0BbwFwAFQB7AHtAFYB7wHvAFgB8QIXAFkCHAIhAIACJgI2AIYCOAJBAJcCSgJMAKECTgJOAKQCUAJQAKUCUgJSAKYCVAJUAKcCVwJXAKgCWQJZAKkCWwJbAKoCXQJdAKsCXwJfAKwCYQJhAK0CYwJvAK4CcQJxALsCcwJzALwCdQJ1AL0CgAKAAL4CggKCAL8ChAKEAMAChgKGAMECiAKIAMICigKKAMMCjAKMAMQCjgKOAMUCkAKQAMYCkgKSAMcClAKcAMgC+AL9ANEDAAMPANcDEgMSAOcDFgMWAOgDGAMYAOkDHAMcAOoDHwMgAOsDIgMrAO0DLQMvAPcDMQM2APoDOAM+AQADRANFAQcDRwNHAQkDSQNJAQoDSwNOAQsDUgNXAQ8DWgNaARUDXANcARYDYANhARcDZgNxARkDdAN1ASUDdwN6AScDgQOCASsDhgOGAS0DiAOOAS4DkwOUATUDmAPAATcDwgPCAWADxAPRAWED2QPZAW8D3APcAXAD3gPeAXED6gPvAXID8gPyAXgD9AP0AXkD9gP2AXoD+AP5AXsD/gQBAX0EBAQEAYEEBgQHAYIECQQJAYQEDQQNAYUEDwQPAYYEEwQTAYcAAgE4AAQABAAdAAkACQAdAA4ADgAeABAAEAAeACQAJAABACUAJQAEACYAJgADACcAJwAFACoAKwACACwALAAMAC0ALQAJAC4ALgAKAC8AMAACADEAMQADADIAMgALADYANgAGADcANwAMADgAOAANADkAOQAQADoAOgAOADsAOwAPADwAPAARAEMAQwATAEQARAAVAEUARQAUAEcARwAWAEoASgAXAE8AUAAXAFEAUQAYAFIAUgAVAFQAVAAaAFgAWAAZAFoAWgAbAFsAWwAZAFwAXAAcAIgAiAAVAKwArAAHAK4ArgADALgAuAAZALwAvAAXAMIAwgAVAM8A0AAfANIA0gACANUA1QAOANcA2AACANkA2QASANsA2wACAN0A3QACAN8A3wAfAOEA4QAfAOcA5wAIAOkA6QAbAPIA8gAVAPcA9wAgAPkA+QAgAPoA+gAVAP8BAAAgAQUBBQAgARMBEwAYARQBFAANARUBFQAZAScBJwAVASgBKAAHASkBKQAIASwBLAAJAS4BLgAJAUUBRQAIAWUBZgAdAWcBZwAeAWgBagAdAWsBawAeAW8BcAAeAewB7QADAe8B7wAGAfgB+AAEAfkB/AAFAf0CAQACAgICBgADAgcCCgAMAgsCCwAPAgwCEgATAhMCEwAUAhQCFwAWAhwCHAAXAh0CIQAYAiYCJwAZAikCKQATAisCKwATAi0CLQATAi4CLgAEAi8CLwAUAjACMAAEAjECMQAUAjICMgAEAjMCMwAUAjQCNAAEAjUCNQAUAjYCNgADAjgCOAAFAjkCOQAWAjoCOgAFAjsCOwAWAjwCPAAFAj0CPQAWAj4CPgAFAj8CPwAWAkACQAAFAkECQQAWAkoCSgACAksCSwAXAkwCTAACAk4CTgACAlACUAACAlICUgACAlQCVAACAlcCVwAMAlkCWQAJAlsCWwAKAl0CXQAKAl8CXwAKAmECYQAKAmMCYwACAmQCZAAXAmUCZQACAmYCZgAXAmcCZwACAmgCaQAXAmoCagADAmsCawAYAmwCbAADAm0CbQAYAm4CbgADAm8CbwAYAnECcQAaAnMCcwAaAnUCdQAaAoACgAAGAoICggAGAoQChAAGAoYChgAMAogCiAAMAooCigAMAowCjAAMAo4CjgAMApACkAAMApICkgAQApQClAAPApUClQAZApYClgAPApcClwARApgCmAAcApkCmQARApoCmgAcApsCmwARApwCnAAcAvkC+QAFAvoC+wACAvwC/AADAv0C/QAPAwEDAQABAwIDAgAFAwMDAwARAwQDBQACAwYDBgAJAwcDCAACAwkDCQADAwoDCgALAwsDCwAGAwwDDAAPAw0DDQAOAw4DDgACAw8DDwAPAxIDEgAXAxYDFgAYAxgDGAAZAxwDHAAYAx8DHwAFAyADIAAHAyIDIwACAyQDJAAMAyUDJgAJAycDJwASAykDKQABAyoDKgAHAysDKwAFAy0DLgACAy8DLwADAzEDMQALAzIDMgAEAzMDMwAGAzQDNAAOAzUDNQATAzYDNgAWAzgDOAAYAzkDOQAVAzoDOgAUAzsDOwAZAzwDPAAbAz0DPQAWAz4DPgAIA0QDRAAZA0UDRQAQA0cDRwAQA0kDSQAQA0sDSwAPA0wDTAAZA00DTgAdA1IDUgAdA1MDUwACA1QDVAAXA1YDVgATA1cDVwADA1oDWgAFA1wDXAAWA2ADYAANA2EDYQAZA2YDZgAEA2cDZwAUA2gDaAAPA2kDaQAZA2oDagACA2sDawAOA2wDbAAbA20DbQACA28DbwATA3EDcQATA3QDdAAFA3UDdQAWA3cDeAAWA3kDeQAOA3oDegAbA4EDgQADA4IDggAYA4YDhgAYA4gDiAAVA4kDiQASA4oDigAZA4sDiwASA4wDjAAZA40DjQASA44DjgAZA5MDkwAOA5QDlAAbA5kDmQATA5sDmwATA50DnQATA58DnwATA6EDoQATA6MDowATA6UDpQATA6cDpwATA6kDqQATA6sDqwATA60DrQATA68DrwATA7ADsAAFA7EDsQAWA7IDsgAFA7MDswAWA7QDtAAFA7UDtQAWA7YDtgAFA7cDtwAWA7gDuAAFA7kDuQAWA7oDugAFA7sDuwAWA7wDvAAFA70DvQAWA74DvgAFA78DvwAWA8ADwAACA8IDwgACA8QDxAADA8UDxQAYA8YDxgADA8cDxwAYA8gDyAADA8kDyQAYA8oDygADA8sDywAYA8wDzAADA80DzQAYA84DzgADA88DzwAYA9AD0AADA9ED0QAYA9kD2QAYA9wD3AAMA94D3gAMA+oD6gAPA+sD6wAZA+wD7AAPA+0D7QAZA+4D7gAPA+8D7wAZA/ID8gAJA/QD9AACA/YD9gAGA/gD+AAOA/kD+QAbA/4D/gAHA/8D/wAIBAAEAAAOBAEEAQAbBAQEBAAXBAYEBgAfBAcEBwAHBAkECQAJBA0EDQACBA8EDwACBBMEEwAPAAEABAQWAAcAAAAAAAAAAAAHAAAAAAAAAAAAEwAXABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAAAAUAAAAAAAAABQAAAAAAHAAAAAAAAAAAAAUAAAAFAAAAGQAKAAYADQAJABIADgAUAAAAAAAAAAAAAAAAABoAAAAVABUAFQAAABUAAAAAAAAAAAAAABgAGAAIABgAFQAAABsAAAALAAIAAAAWAAIADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFABUAAAAAAAUAFQAAAAsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEQAFABEAAAAAAAAAAAAAAAAAFQAAAAIAAAAAAAAAGAAAAAAAAAAAAAAAAAAVABUAAAALAAAAAAAAAAAAAAAAAAoABQABAAAACgAAAAAAAAASAAAAAAABABAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAFgAAABgAGAAEABgAGAAYAAAAFQAYAAMAGAAYAAAAAAAYAAAAGAAAAAAAFQAEABgAAAAAAAUAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAUACAANAAIABQAAAAUAFQAFAAAABQAVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACgAAAAAAGAAAAAAABQAVAAoAAAAAAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAABgAAAAVABUAAAAAAAAAAAABAAAAAAAAAAUAFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXABcAAAAHAAcAEwAHAAcABwATAAAAAAAAABMAEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFwAAAAAAAAAAAAAAEQARABEAEQARABEAEQAFAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAGAAYABgAGAA4AGgAaABoAGgAaABoAGgAVABUAFQAVABUAAAAAAAAAAAAYAAgACAAIAAgACAALAAsACwALAAIAAgARABoAEQAaABEAGgAFABUABQAVAAUAFQAFABUAAAAVAAAAFQAAABUAAAAVAAAAFQAAABUABQAVAAUAFQAFABUABQAVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAGAAAABgAGAAFAAgABQAIAAUACAAAAAAAAAAAAAAAAAAZABsAGQAbABkAGwAZABsAGQAbAAoAAAAKAAAACgAAAAYACwAGAAsABgALAAYACwAGAAsABgALAAkAAAAOAAIADgAUAAwAFAAMABQADAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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","sampleImage.jpg":"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AAGyAAAAEAAAAAEAAAAAABJwcmludE91dHB1dE9wdGlvbnMAAAASAAAAAENwdG5ib29sAAAAAABDbGJyYm9vbAAAAAAAUmdzTWJvb2wAAAAAAENybkNib29sAAAAAABDbnRDYm9vbAAAAAAATGJsc2Jvb2wAAAAAAE5ndHZib29sAAAAAABFbWxEYm9vbAAAAAAASW50cmJvb2wAAAAAAEJja2dPYmpjAAAAAQAAAAAAAFJHQkMAAAADAAAAAFJkICBkb3ViQG/gAAAAAAAAAAAAR3JuIGRvdWJAb+AAAAAAAAAAAABCbCAgZG91YkBv4AAAAAAAAAAAAEJyZFRVbnRGI1JsdAAAAAAAAAAAAAAAAEJsZCBVbnRGI1JsdAAAAAAAAAAAAAAAAFJzbHRVbnRGI1B4bEBSAAAAAAAAAAAACnZlY3RvckRhdGFib29sAQAAAABQZ1BzZW51bQAAAABQZ1BzAAAAAFBnUEMAAAAATGVmdFVudEYjUmx0AAAAAAAAAAAAAAAAVG9wIFVudEYjUmx0AAAAAAAAAAAAAAAAU2NsIFVudEYjUHJjQFkAAAAAAAA4QklNA+0AAAAAABAASAAAAAEAAgBIAAAAAQACOEJJTQQmAAAAAAAOAAAAAAAAAAAAAD+AAAA4QklNBA0AAAAAAAQAAAB4OEJJTQQZAAAAAAAEAAAAHjhCSU0D8wAAAAAACQAAAAAAAAAAAQA4QklNJxAAAAAAAAoAAQAAAAAAAAACOEJJTQP1AAAAAABIAC9mZgABAGxmZgAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAAABAC0AAAAGAAAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A+gAAAAA/////////////////////////////wPoAAAAAP////////////////////////////8D6AAAAAD/////////////////////////////A+gAADhCSU0EAAAAAAAAAgABOEJJTQQCAAAAAAAEAAAAADhCSU0EMAAAAAAAAgEBOEJJTQQtAAAAAAAGAAEAAAACOEJJTQQIAAAAAAAQAAAAAQAAAkAAAAJAAAAAADhCSU0EHgAAAAAABAAAAAA4QklNBBoAAAAAA0sAAAAGAAAA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aHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIiB4bXA6Q3JlYXRlRGF0ZT0iMjAxNC0wMy0xOVQwMzowMjoyNiswMTowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxNC0wMy0xOVQwMzowMjoyNiswMTowMCIgeG1wOk1vZGlmeURhdGU9IjIwMTQtMDMtMTlUMDM6MDI6MjYrMDE6MDAiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MDI4MDExNzQwNzIwNjgxMTg3MUY4MTMxRkI2RTY4OTgiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MDE4MDExNzQwNzIwNjgxMTg3MUY4MTMxRkI2RTY4OTgiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDowMTgwMTE3NDA3MjA2ODExODcxRjgxMzFGQjZFNjg5OCIgZGM6Zm9ybWF0PSJpbWFnZS9qcGVnIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjAxODAxMTc0MDcyMDY4MTE4NzFGODEzMUZCNkU2ODk4IiBzdEV2dDp3aGVuPSIyMDE0LTAzLTE5VDAzOjAyOjI2KzAxOjAwIiBzdEV2dDpzb2Z0d2FyZUFnZW50PSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowMjgwMTE3NDA3MjA2ODExODcxRjgxMzFGQjZFNjg5OCIgc3RFdnQ6d2hlbj0iMjAxNC0wMy0xOVQwMzowMjoyNiswMTowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPD94cGFja2V0IGVuZD0idyI/Pv/iDFhJQ0NfUFJPRklMRQABAQAADEhMaW5vAhAAAG1udHJSR0IgWFlaIAfOAAIACQAGADEAAGFjc3BNU0ZUAAAAAElFQyBzUkdCAAAAAAAAAAAAAAABAAD21gABAAAAANMtSFAgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEWNwcnQAAAFQAAAAM2Rlc2MAAAGEAAAAbHd0cHQAAAHwAAAAFGJrcHQAAAIEAAAAFHJYWVoAAAIYAAAAFGdYWVoAAAIsAAAAFGJYWVoAAAJAAAAAFGRtbmQAAAJUAAAAcGRtZGQAAALEAAAAiHZ1ZWQAAANMAAAAhnZpZXcAAAPUAAAAJGx1bWkAAAP4AAAAFG1lYXMAAAQMAAAAJHRlY2gAAAQwAAAADHJUUkMAAAQ8AAAIDGdUUkMAAAQ8AAAIDGJUUkMAAAQ8AAAIDHRleHQAAAAAQ29weXJpZ2h0IChjKSAxOTk4IEhld2xldHQtUGFja2FyZCBDb21wYW55AABkZXNjAAAAAAAAABJzUkdCIElFQzYxOTY2LTIuMQAAAAAAAAAA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"}; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/css/images/blank.gif b/usecaseui-common/src/main/webapp/static/fusion/sample/css/images/blank.gif
deleted file mode 100644
index 75b945d2..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/css/images/blank.gif
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/css/scribble.css b/usecaseui-common/src/main/webapp/static/fusion/sample/css/scribble.css
deleted file mode 100644
index 9986f2ac..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/css/scribble.css
+++ /dev/null
@@ -1,40 +0,0 @@
-#scribble-pad {
-/* margin-left:auto;
- margin-right:auto;
- height: 475px;
- width: 475px;*/
- background:url(https://www.ibm.com/developerworks/mydeveloperworks/blogs/bobleah/resource/stickynote.jpg) no-repeat center center;
- background-size: 110% 110%;
-}
-
-
-
-#scribble {
- white-space: pre-wrap; /* css-3 */
- white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
- white-space: -pre-wrap; /* Opera 4-6 */
- white-space: -o-pre-wrap; /* Opera 7 */
- word-wrap: break-word; /* Internet Explorer 5.5+ */
- max-width: 300px;
- padding: 120px 100px 100px 75px;
- color: #486891;
- border-color: #ff0000 #0000ff;
- border-color: transparent;
- background-color:rgba(0, 0, 0, 0);
- font-family: Arial,sans-serif;
- font-size: 120%;
- font-style: italic;
- font-weight:bold;
- line-height: 1.5em;
-}
-
-#scribble:focus {
-outline-width: 0;
-}
-.c-link {
- color: #486891;
- font-family: Arial,sans-serif;
- font-size: 95%;
- font-weight:bold;
- text-decoration: none;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/css/slider.css b/usecaseui-common/src/main/webapp/static/fusion/sample/css/slider.css
deleted file mode 100644
index f609403c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/css/slider.css
+++ /dev/null
@@ -1,142 +0,0 @@
-div,span,p { margin:0; padding:0; border:0; outline:0; font-weight:inherit; font-style:inherit; font-size:100%; font-family:inherit; vertical-align:baseline; }
-
-
-#container {
- width:580px;
- padding:10px;
- margin:0 auto;
- position:relative;
- z-index:0;
-}
-
-#example {
- width:600px;
- height:350px;
- position:relative;
-}
-
-#ribbon {
- position:absolute;
- top:-3px;
- left:-15px;
- z-index:500;
-}
-
-#frame {
- position:absolute;
- z-index:0;
- width:739px;
- height:341px;
- top:-3px;
- left:-80px;
-}
-
-/*
- Slideshow
-*/
-
-#slides {
- position:absolute;
- top:15px;
- left:4px;
- z-index:100;
-}
-
-/*
- Slides container
- Important:
- Set the width of your slides container
- Set to display none, prevents content flash
-*/
-
-.slides_container {
- width:570px;
- overflow:hidden;
- position:relative;
- display:none;
-}
-
-/*
- Each slide
- Important:
- Set the width of your slides
- If height not specified height will be set by the slide content
- Set to display block
-*/
-
-.slides_container div.slide {
- width:570px;
- height:270px;
- display:block;
-}
-
-
-/*
- Next/prev buttons
-*/
-
-#slides .next,#slides .prev {
- position:absolute;
- top:107px;
- left:-39px;
- width:24px;
- height:43px;
- display:block;
- z-index:101;
-}
-
-#slides .next {
- left:585px;
-}
-
-/*
- Pagination
-*/
-
-.pagination {
- margin:26px auto 0;
- width:100px;
-}
-
-.pagination li {
- float:left;
- margin:0 1px;
- list-style:none;
-}
-
-.pagination li a {
- display:block;
- width:12px;
- height:0;
- padding-top:12px;
- background-image:url(../images/pagination.png);
- background-position:0 0;
- float:left;
- overflow:hidden;
-}
-
-.pagination li.current a {
- background-position:0 -12px;
-}
-
-/*
- Caption
-*/
-
-.caption {
- z-index:500;
- position:absolute;
- bottom:-35px;
- left:0;
- height:30px;
- padding:5px 20px 0 20px;
- background:#000;
- background:rgba(0,0,0,.5);
- width:540px;
- font-size:1.3em;
- line-height:1.33;
- color:#fff;
- border-top:1px solid #000;
- text-shadow:none;
-}
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/css/spacegallery.css b/usecaseui-common/src/main/webapp/static/fusion/sample/css/spacegallery.css
deleted file mode 100644
index ce4fd57c..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/css/spacegallery.css
+++ /dev/null
@@ -1,18 +0,0 @@
-.spacegallery {
- position: relative;
- overflow: hidden;
-}
-.spacegallery img {
- position: absolute;
- left: 50%;
-}
-.spacegallery a {
- position: absolute;
- z-index: 1000;
- display: block;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: url(images/blank.gif);
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/css/welcome.css b/usecaseui-common/src/main/webapp/static/fusion/sample/css/welcome.css
deleted file mode 100644
index 4e52d662..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/css/welcome.css
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Area Chart */
-
-#areaChart {
- overflow: hidden;}
-
-#lineChart {
- overflow: hidden;
-}
-
-#areaChart svg {
- height: 200px;
- width: 380px;
- min-width: 100px;
- min-height: 100px;
-}
-
-#lineChart svg {
- height: 200px;
- width: 380px;
- min-width: 100px;
- min-height: 100px;
-}
-
-#areaChart tr.z-row-over>td.z-row-inner, tr.z-row-over>.z-cell {
- background-color: rgb(255, 255, 255);
-}
-
-#lineChart tr.z-row-over>td.z-row-inner, tr.z-row-over>.z-cell {
- background-color: rgb(255, 255, 255);
-}
-
-#areaChart .nodatadiv {
- display: table-cell;
- width: 700px;
- height: 370px;
- text-align: center;
- vertical-align: middle;
-}
-
-#lineChart .nodatadiv {
- display: table-cell;
- width: 700px;
- height: 370px;
- text-align: center;
- vertical-align: middle;
-}
-
-#areaChart .nodatainner {
- padding: 10px;
-}
-
-#lineChart .nodatainner {
- padding: 10px;
-}
-
-/* Area Chart END */
-
-.button--small, [class*=bg-] .button--small {
- font-size: 14px;
- };
-
-/* Gridster (EBIZ) */
-
-.gridster-item-container .gridster-item-body{
-bottom:0px;
-}
-.gridster-item-container{
-min-height:50px;
-}
-.att-accordion {
- border-width: 0px;
-}
-
-/* End Gridster */
-
-#myGallery {
- width: 100%;
- height: 400px;
-}
-
-#myGallery img {
- border: 2px solid #52697E;
-}
-
-a.loading {
- background: #fff url(../images/ajax_small.gif) no-repeat center;
-}
-
-.center {
- margin-left: auto;
- margin-right: auto;
-}
-
-
-#selectedTrafficDay ul {
- list-style: none;
- padding: 0;
- margin: 0;
-}
-
-#selectedTrafficDay li {
- float: left;
- border: 1px solid #000;
- border-bottom-width: 0;
- margin: 3px 3px 3px 3px;
- padding: 5px 5px 5px 5px;
- background-color: #F2F2F2;
- color: #696969;
-}
-
-#SelectedTrafficeDayView {
- padding: 0 1em;
-}
-
-#selectedTrafficDay .active1 {
- background-color: #FFF;
- color: #000;
-}
-
-#BusyHourTraffic ul {
- list-style: none;
- padding: 0;
- margin: 0;
-}
-
-#BusyHourTraffic li {
- float: left;
- border: 1px solid #000;
- border-bottom-width: 0;
- margin: 3px 3px 3px 3px;
- padding: 5px 5px 5px 5px;
- background-color: #F2F2F2;
- color: #696969;
-}
-
-#BusyHourTrafficView {
- padding: 0 1em;
-}
-
-#BusyHourTraffic .active2 {
- background-color: #FFF;
- color: #000;
-}
-
-#slider {
- width: 600px;
- margin: 0 auto;
- clear: left;
-}
-
-@media only screen and (device-width: 768px) {
- #slider {
- width: 400px;
- }
-}
-
-#container {
-
-}
-
-#title {
- float:left;
- width:100%;
- height:30px;
- margin:;
- color:#222222;
- text-shadow: 1px 1px 2px #A0A0A0;
-}
-.content{
- margin-right:-230px;
- top:50px;
-
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/area_chart.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/area_chart.html
deleted file mode 100644
index 30ef2011..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/area_chart.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 175px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script>
-historicalBarChart = [
- { "type":"line", "key": "AP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.13}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.36}, { "x":1388552400000 , "y":10.0}, { "x":1391230800000 , "y":3.15}, { "x":1391230800000 , "y":2.88}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":4.0}, { "x":1393650000000 , "y":8.0}, { "x":1393650000000 , "y":3.93}, { "x":1393650000000 , "y":4.27}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.25}, { "x":1396324800000 , "y":5.35}, { "x":1396324800000 , "y":5.92}, { "x":1396324800000 , "y":12.0}, { "x":1398916800000 , "y":5.55}, { "x":1398916800000 , "y":4.89}, { "x":1398916800000 , "y":5.01}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.27}, { "x":1401595200000 , "y":9.17}, { "x":1401595200000 , "y":9.31}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.37}, { "x":1404187200000 , "y":8.11}, { "x":1404187200000 , "y":8.84}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.79}, { "x":1406865600000 , "y":12.22}, { "x":1406865600000 , "y":12.6}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":15.27}, { "x":1409544000000 , "y":19.09}, { "x":1409544000000 , "y":16.09}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":18.4}, { "x":1412136000000 , "y":22.05}, { "x":1412136000000 , "y":21.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":19.13}, { "x":1414814400000 , "y":19.61}, { "x":1414814400000 , "y":17.61}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":19.0}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.67}, { "x":1420088400000 , "y":15.19}, { "x":1420088400000 , "y":15.02}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":16.95}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":12.9}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"line", "key": "ROUTER_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":3.0}, { "x":1388552400000 , "y":4.0}, { "x":1388552400000 , "y":4.89}, { "x":1388552400000 , "y":7.0}, { "x":1391230800000 , "y":4.57}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":7.0}, { "x":1393650000000 , "y":7.0}, { "x":1393650000000 , "y":4.18}, { "x":1393650000000 , "y":5.0}, { "x":1393650000000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.06}, { "x":1396324800000 , "y":6.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.09}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.0}, { "x":1404187200000 , "y":6.36}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1406865600000 , "y":7.0}, { "x":1406865600000 , "y":7.02}, { "x":1406865600000 , "y":7.24}, { "x":1406865600000 , "y":7.0}, { "x":1409544000000 , "y":8.23}, { "x":1409544000000 , "y":8.11}, { "x":1409544000000 , "y":8.12}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9.0}, { "x":1412136000000 , "y":8.93}, { "x":1412136000000 , "y":8.57}, { "x":1412136000000 , "y":9.0}, { "x":1414814400000 , "y":5.97}, { "x":1414814400000 , "y":6.0}, { "x":1414814400000 , "y":9.0}, { "x":1414814400000 , "y":9.0}, { "x":1417410000000 , "y":9.0}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":2.01}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2.67}, { "x":1422766800000 , "y":2.0}, { "x":1425186000000 , "y":2.8}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"line", "key": "SCTP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":7.0}, { "x":1388552400000 , "y":10.0}, { "x":1388552400000 , "y":8.27}, { "x":1388552400000 , "y":8.0}, { "x":1391230800000 , "y":10.02}, { "x":1391230800000 , "y":8.04}, { "x":1391230800000 , "y":9.0}, { "x":1391230800000 , "y":10.0}, { "x":1393650000000 , "y":12.0}, { "x":1393650000000 , "y":10.04}, { "x":1393650000000 , "y":11.16}, { "x":1393650000000 , "y":10.0}, { "x":1396324800000 , "y":10.7}, { "x":1396324800000 , "y":13.31}, { "x":1396324800000 , "y":12.73}, { "x":1396324800000 , "y":9.0}, { "x":1398916800000 , "y":12.41}, { "x":1398916800000 , "y":11.95}, { "x":1398916800000 , "y":12.82}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.28}, { "x":1401595200000 , "y":14.01}, { "x":1401595200000 , "y":14.63}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.06}, { "x":1404187200000 , "y":13.96}, { "x":1404187200000 , "y":14.66}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":16.6}, { "x":1406865600000 , "y":16.95}, { "x":1406865600000 , "y":17.11}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":19.86}, { "x":1409544000000 , "y":22.97}, { "x":1409544000000 , "y":21.56}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":22.66}, { "x":1412136000000 , "y":26.79}, { "x":1412136000000 , "y":26.54}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":21.0}, { "x":1414814400000 , "y":20.35}, { "x":1414814400000 , "y":21.93}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":24.0}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.63}, { "x":1420088400000 , "y":25.14}, { "x":1420088400000 , "y":21.85}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":26.3}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":23.3833333333333}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"line", "key": "DP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.0}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.17}, { "x":1388552400000 , "y":2.0}, { "x":1391230800000 , "y":3.01}, { "x":1391230800000 , "y":2.56}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":9.0}, { "x":1393650000000 , "y":10.0}, { "x":1393650000000 , "y":3.64}, { "x":1393650000000 , "y":4.06}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.04}, { "x":1396324800000 , "y":5.11}, { "x":1396324800000 , "y":5.9}, { "x":1396324800000 , "y":8.0}, { "x":1398916800000 , "y":5.08}, { "x":1398916800000 , "y":4.65}, { "x":1398916800000 , "y":4.74}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":6.13}, { "x":1401595200000 , "y":8.98}, { "x":1401595200000 , "y":9.22}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.12}, { "x":1404187200000 , "y":7.89}, { "x":1404187200000 , "y":8.41}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":11.06}, { "x":1406865600000 , "y":11.84}, { "x":1406865600000 , "y":11.92}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":14.58}, { "x":1409544000000 , "y":18.39}, { "x":1409544000000 , "y":15.5}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.01}, { "x":1412136000000 , "y":21.3}, { "x":1412136000000 , "y":21.11}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":18.59}, { "x":1414814400000 , "y":18.81}, { "x":1414814400000 , "y":17.13}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":18.0}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.16}, { "x":1420088400000 , "y":12.13}, { "x":1420088400000 , "y":11.76}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.47}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.2333333333333}, { "x":1425186000000 , "y":12.4} ] }
-];
-
-</script>
-<script src="js/area_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/bar_chart.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/bar_chart.html
deleted file mode 100644
index 0be16ec1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/bar_chart.html
+++ /dev/null
@@ -1,95 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 420px;
- width: 700px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/tooltip.js"></script>
-<script src="../../d3/js/utils.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script src="../../d3/js/models/multiChart.js"></script>
-<script>
-historicalBarChart = [
- { "type":"bar", "key": "AP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":10}, { "x":1391230800000 , "y":4}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":12}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"bar", "key": "ROUTER_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":7}, { "x":1391230800000 , "y":7}, { "x":1393650000000 , "y":5}, { "x":1396324800000 , "y":6}, { "x":1398916800000 , "y":5}, { "x":1401595200000 , "y":6}, { "x":1404187200000 , "y":7}, { "x":1406865600000 , "y":7}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9}, { "x":1414814400000 , "y":9}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"bar", "key": "SCTP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":8}, { "x":1391230800000 , "y":10}, { "x":1393650000000 , "y":10}, { "x":1396324800000 , "y":9}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"bar", "key": "DP_CPU", "yAxis": "1", "values": [{ "x":1388552400000 , "y":2}, { "x":1391230800000 , "y":9}, { "x":1393650000000 , "y":4}, { "x":1396324800000 , "y":8}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.4} ] }
-];
-var chart;
-nv.addGraph(function() {
- chart = nv.models.multiBarChart()
- .margin({top: 30, right: 60, bottom: 50, left: 100})
- .showLegend(true)
- .reduceXTicks(false)
- .forceY([0, 34.0])
- .showControls(true)
- .stacked(false)
- .logScale(false)
- .legendPos('top')
- .color(d3.scale.category10().range());
- chart.xAxis
- .tickValues([1388552400000,1391230800000,1393650000000,1396324800000,1398916800000,1401595200000,1404187200000,1406865600000,1409544000000,1412136000000,1414814400000,1417410000000,1420088400000,1422766800000])
- .staggerLabels(false)
- .showMaxMin(false)
- .rotateLabels(90)
- .axisLabel('Timestamp')
- .tickFormat(function(d) {
- return d3.time.format('%b %y')(new Date(d)) });
- chart.yAxis
- .logScale(false)
- .axisLabel('')
- .tickFormat(d3.format(',.1f'));
- d3.select('#chart461 svg')
- .datum(historicalBarChart)
- .transition().duration(1000)
- .call(chart);
-nv.utils.windowResize(chart.update);
-return chart;
-});
-function redraw() {
- d3.select('#chart461 svg')
- .datum(historicalBarChart)
- .transition().duration(500)
- .call(chart);
-}
-
- setInterval(function () {
- redraw();
- }, 1500)
-if(historicalBarChart.length <= 0 ) {
- document.getElementById("chart461").innerHTML = "<div id='noData'><b>No Data Available</b></div>";
- document.getElementById("chart461").className="nodatadiv";
- document.getElementById("nodata").className="nodatainner";
-}
-</script> </body></html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/d3_gauges_demo.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/d3_gauges_demo.html
deleted file mode 100644
index 94596e73..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/d3_gauges_demo.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
- <head>
- <meta http-equiv="content-type" content="text/html;charset=utf-8">
- <title>d3.js gauges</title>
-
- <style>
-
- body
- {
- font: 10px arial;
- }
-
- </style>
-
- <script src="../../d3/js/d3.v3.min.js" charset="utf-8"></script>
-
-
- <script>
-
- var dataURL = "data/speedometer2.csv";
- var gauges = [];
- var recordLength = 0;
- var dataset ;
-
- </script>
- <script type="text/javascript" src="js/gauges.min.js"></script>
-
- </head>
-
- <body onload="initialize()">
- <span id="Bedminster"></span>
- <span id="Piscataway"></span>
- <br/>
- <span id="Middletown"></span>
- <span id="Paramus"></span>
- </body>
-
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer2.csv b/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer2.csv
deleted file mode 100644
index 406143ea..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer2.csv
+++ /dev/null
@@ -1,16 +0,0 @@
-"YEARMONTH","Bedminster","Piscataway","Middletown","Paramus"
-"201401",8.27,4.89,2.36,2.17
-"201402",10.02,4.57,3.15,3.01
-"201403",11.16,5.00,4.27,4.06
-"201404",13.31,5.00,5.35,5.11
-"201405",12.82,5.00,5.01,4.74
-"201406",14.01,6.09,9.17,8.98
-"201407",14.66,7.00,8.84,8.41
-"201408",16.95,7.02,12.22,11.84
-"201409",21.56,8.12,16.09,15.50
-"201410",25.35,9.00,19.04,18.37
-"201411",21.93,9.00,17.61,17.13
-"201412",24.00,9.00,19.00,18.00
-"201501",25.14,2.01,15.19,12.13
-"201502",26.30,2.67,16.95,13.47
-"201503",26.5833333333333,45.63333333333333,16.1166666666667,12.40
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer3.csv b/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer3.csv
deleted file mode 100644
index 046383e4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/speedometer3.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"YEARMONTH","Bedminster","Piscataway","Middletown","Paramus"
-"201401",8.27,4.89,2.36,2.17 \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/worddata.csv b/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/worddata.csv
deleted file mode 100644
index 762cb423..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/data/worddata.csv
+++ /dev/null
@@ -1 +0,0 @@
-text,frequency service,98 portal,70 management,70 virtual,56 design,56 VNF,56 studio,42 operations,42 inventory,42 POLO,42 D2.0,42 ASDC,42 router,28 restart,28 process,28 platform,28 manage,28 loop,28 licensing,28 license,28 integrated,28 flow-through,28 enable,28 data,28 controller,28 control,28 configure,28 component,28 common,28 asset,28 application,28 ECOMP,28 workflow,14 waterfall,14 visual,14 view,14 vCTS,14 utilization,14 user,14 usage,14 troubleshoot,14 transformation,14 track,14 topolgies,14 topics,14 time,14 tickets,14 thresholds,14 templates,14 structures,14 standards-based,14 software,14 reuse,14 repository,14 reports,14 release,14 recipes,14 real-time,14 provisioning,14 properties,14 project-based,14 processes,14 physical,14 oversight,14 openl-loop,14 network,14 monitor,14 modeling,14 model-driven,14 model,14 message,14 maximize,14 manually,14 machine,14 layer,14 interact,14 instances,14 initiate,14 increase,14 imported,14 impacts,14 host,14 function,14 feeds,14 features,14 faults,14 extended,14 engines,14 engine,14 dynamic,14 document-driven,14 determine,14 dashboard,14 current,14 creation,14 created,14 create,14 configuration,14 composer,14 components,14 collective,14 certification,14 bus,14 basis,14 available,14 automation,14 automated,14 associated,14 assignment,14 appropriate,14 against,14 aervice,14 adminstrators,14 activation,14 action,14 VMs,14 VM,14 VLAN,14 SDN,14 SDK,14 SBG,14 SAM,14 RUBY,14 Policy,14 PODS,14 Ops,14 GFP,14 F5FW,14 DMaaP,14 DCAE,14 DBC,14 CPADS,14 AT&T,14 APP-C,14 AOTS-TM,14 ALTS,14 A&AI,14
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/donut_d3.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/donut_d3.html
deleted file mode 100644
index afcac359..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/donut_d3.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<style>
-
-body {
- font: 10px sans-serif;
-}
-
-svg {
- padding: 10px 0 0 10px;
-}
-
-.arc {
- stroke: #fff;
-}
-
- .slice text {
- font-size: 16pt;
- font-family: Arial;
- }
-</style>
-<body>
-<script src="../../d3/js/d3.js"></script>
-
-<script>
-
-var radius = 74,
- padding = 10;
-
-var width = 200,
- height = 200;
-
-var outerRadius = height / 2 - 20,
- innerRadius = outerRadius / 3,
- cornerRadius = 10;
-//var color = d3.scale.ordinal()
- // .range(["#98abc5", "#8a89a6", "#7b6888", "#6b486b", "#a05d56", "#d0743c", "#ff8c00"]);
- var color = d3.scale.category10();
- var dataURL = "data/speedometer3.csv";
-
-
-</script>
-<script src="js/donut.min.js"></script> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/area_chart.min.js b/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/area_chart.min.js
deleted file mode 100644
index 9b3decb9..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/area_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redrawAreaChart(){d3.select("#areaChart svg").datum(historicalBarChart).call(area_chart)}var area_chart;nv.addGraph(function(){return area_chart=nv.models.stackedAreaChart().showControls(!1).margin({top:30,right:60,bottom:50,left:100}).showLegend(!1).yAxisTooltipFormat(d3.format(",.1f")).x(function(a){return a.x}).y(function(a){return a.y}).color(d3.scale.category10().range()),area_chart.xAxis.axisLabel("").staggerLabels(!1).showMaxMin(!1).rotateLabels(90).tickFormat(function(a){return d3.time.format("%b %y")(new Date(a))}),area_chart.yAxis.axisLabel("").tickFormat(d3.format(",.1f")),d3.select("#areaChart svg").datum(historicalBarChart).call(area_chart),nv.utils.windowResize(area_chart.update),area_chart}),redrawAreaChart(),historicalBarChart.length<=0&&(document.getElementById("areaChart").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("areaChart").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/donut.min.js b/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/donut.min.js
deleted file mode 100644
index 60c4fd4b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/donut.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function angle(t){var e=90*(t.startAngle+t.endAngle)/Math.PI-90;return e>90?e-180:e}function arcTween(t,e){return function(){d3.select(this).transition().delay(e).attrTween("d",function(e){var r=d3.interpolate(e.outerRadius,t);return function(t){return e.outerRadius=r(t),arc(e)}})}}var arc=d3.svg.arc().padRadius(outerRadius).innerRadius(innerRadius),pie=d3.layout.pie().sort(null).padAngle(.02).value(function(t){return t.performance});d3.csv(dataURL,function(t,e){color.domain(d3.keys(e[0]).filter(function(t){return"YEARMONTH"!==t})),e.forEach(function(t){t.performance=color.domain().map(function(e){return{name:e,performance:+t[e]}})});var r=d3.select("body").append("svg").attr("class","legend").attr("width",radius).attr("height",2*radius).selectAll("g").data(color.domain().slice().reverse()).enter().append("g").attr("transform",function(t,e){return"translate(0,"+20*e+")"});r.append("rect").attr("width",18).attr("height",18).style("fill",color),r.append("text").attr("x",24).attr("y",9).attr("dy",".35em").text(function(t){return t});var a=d3.select("body").append("svg").attr("width",width).attr("height",height).data(e).append("g").attr("transform","translate("+radius+","+height/2+")"),n=a.selectAll("g.slice").data(function(t){return pie(t.performance)}).enter().append("g").attr("class","slice");n.append("path").each(function(t){t.outerRadius=outerRadius-10}).attr("class","arc").attr("d",arc).style("fill",function(t){return color(t.data.name)}).on("mouseover",arcTween(outerRadius,0)).on("mouseout",arcTween(outerRadius-10,150)),n.append("text").attr("dy",".35em").attr("transform",function(t){return t.outerRadius=outerRadius,t.innerRadius=outerRadius/2,"translate("+arc.centroid(t)+")rotate("+angle(t)+")"}).attr("text-anchor","middle").style("fill","white").style("font","bold 12px Arial").text(function(t){return t.value}),a.append("text").attr("dy",".35em").style("text-anchor","middle").text(function(t){return t.YEARMONTH})}); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/gauges.min.js b/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/gauges.min.js
deleted file mode 100644
index c0fd7484..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/gauges.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function Gauge(t,i){this.placeholderName=t;var n=this;this.configure=function(t){this.config=t,this.config.size=.9*this.config.size,this.config.raduis=.97*this.config.size/2,this.config.cx=this.config.size/2,this.config.cy=this.config.size/2,this.config.min=void 0!=t.min?t.min:0,this.config.max=void 0!=t.max?t.max:100,this.config.range=this.config.max-this.config.min,this.config.majorTicks=t.majorTicks||5,this.config.minorTicks=t.minorTicks||2,this.config.greenColor=t.greenColor||"#109618",this.config.yellowColor=t.yellowColor||"#FF9900",this.config.redColor=t.redColor||"#DC3912",this.config.transitionDuration=t.transitionDuration||500},this.render=function(){this.body=d3.select("#"+this.placeholderName).append("svg:svg").attr("class","gauge").attr("width",this.config.size).attr("height",this.config.size),this.body.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",this.config.raduis).style("fill","#ccc").style("stroke","#000").style("stroke-width","0.5px"),this.body.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",.9*this.config.raduis).style("fill","#fff").style("stroke","#e0e0e0").style("stroke-width","2px");for(var t in this.config.greenZones)this.drawBand(this.config.greenZones[t].from,this.config.greenZones[t].to,n.config.greenColor);for(var t in this.config.yellowZones)this.drawBand(this.config.yellowZones[t].from,this.config.yellowZones[t].to,n.config.yellowColor);for(var t in this.config.redZones)this.drawBand(this.config.redZones[t].from,this.config.redZones[t].to,n.config.redColor);if(void 0!=this.config.label){var i=Math.round(this.config.size/12);this.body.append("svg:text").attr("x",this.config.cx).attr("y",this.config.cy/2+i/2).attr("dy",i/2).attr("text-anchor","middle").text(this.config.label).style("font-size",i+"px").style("fill","#333").style("stroke-width","0px")}for(var i=Math.round(this.config.size/16),e=this.config.range/(this.config.majorTicks-1),o=this.config.min;o<=this.config.max;o+=e){for(var a=e/this.config.minorTicks,r=o+a;r<Math.min(o+e,this.config.max);r+=a){var s=this.valueToPoint(r,.75),c=this.valueToPoint(r,.85);this.body.append("svg:line").attr("x1",s.x).attr("y1",s.y).attr("x2",c.x).attr("y2",c.y).style("stroke","#666").style("stroke-width","1px")}var s=this.valueToPoint(o,.7),c=this.valueToPoint(o,.85);if(this.body.append("svg:line").attr("x1",s.x).attr("y1",s.y).attr("x2",c.x).attr("y2",c.y).style("stroke","#333").style("stroke-width","2px"),o==this.config.min||o==this.config.max){var g=this.valueToPoint(o,.63);this.body.append("svg:text").attr("x",g.x).attr("y",g.y).attr("dy",i/3).attr("text-anchor",o==this.config.min?"start":"end").text(o).style("font-size",i+"px").style("fill","#333").style("stroke-width","0px")}}var f=this.body.append("svg:g").attr("class","pointerContainer"),h=(this.config.min+this.config.max)/2,l=this.buildPointerPath(h),d=d3.svg.line().x(function(t){return t.x}).y(function(t){return t.y}).interpolate("basis");f.selectAll("path").data([l]).enter().append("svg:path").attr("d",d).style("fill","#dc3912").style("stroke","#c63310").style("fill-opacity",.7),f.append("svg:circle").attr("cx",this.config.cx).attr("cy",this.config.cy).attr("r",.12*this.config.raduis).style("fill","#4684EE").style("stroke","#666").style("opacity",1);var i=Math.round(this.config.size/10);f.selectAll("text").data([h]).enter().append("svg:text").attr("x",this.config.cx).attr("y",this.config.size-this.config.cy/4-i).attr("dy",i/2).attr("text-anchor","middle").style("font-size",i+"px").style("fill","#000").style("stroke-width","0px"),this.redraw(this.config.min,0)},this.buildPointerPath=function(t){function i(t,i){var e=n.valueToPoint(t,i);return e.x-=n.config.cx,e.y-=n.config.cy,e}var e=this.config.range/13,o=i(t,.85),a=i(t-e,.12),r=i(t+e,.12),s=t-this.config.range*(1/.75)/2,c=i(s,.28),g=i(s-e,.12),f=i(s+e,.12);return[o,a,f,c,g,r,o]},this.drawBand=function(t,i,e){0>=i-t||this.body.append("svg:path").style("fill",e).attr("d",d3.svg.arc().startAngle(this.valueToRadians(t)).endAngle(this.valueToRadians(i)).innerRadius(.65*this.config.raduis).outerRadius(.85*this.config.raduis)).attr("transform",function(){return"translate("+n.config.cx+", "+n.config.cy+") rotate(270)"})},this.redraw=function(t,i,e){var o=this.body.select(".pointerContainer"),a=o.selectAll("text");y=a.attr("y"),dy=parseFloat(a.attr("dy")),a.selectAll("tspan").remove(),a.append("tspan").attr("x",45).attr("dy",0).text(Math.round(t)),a.append("tspan").attr("x",45).attr("dy",10).text(i),o.selectAll("text").style("fill",function(){var i=n.config.max-n.config.min;return Math.round(t)>.9*i?"#DC3912":Math.round(t)>.5*i&&Math.round(t)<.9*i?"#FF9900":"#000000"});var r=o.selectAll("path");r.transition().duration(void 0!=e?e:this.config.transitionDuration).attrTween("transform",function(){var i=t;t>n.config.max?i=n.config.max+.02*n.config.range:t<n.config.min&&(i=n.config.min-.02*n.config.range);var e=n.valueToDegrees(i)-90,o=n._currentRotation||e;return n._currentRotation=e,function(t){var i=o+(e-o)*t;return"translate("+n.config.cx+", "+n.config.cy+") rotate("+i+")"}})},this.valueToDegrees=function(t){return t/this.config.range*270-(this.config.min/this.config.range*270+45)},this.valueToRadians=function(t){return this.valueToDegrees(t)*Math.PI/180},this.valueToPoint=function(t,i){return{x:this.config.cx-this.config.raduis*i*Math.cos(this.valueToRadians(t)),y:this.config.cy-this.config.raduis*i*Math.sin(this.valueToRadians(t))}},this.configure(i)}function createGauge(t,i,n,e){var o={size:100,label:i,min:void 0!=n?n:0,max:void 0!=e?e:100,minorTicks:5},a=o.max-o.min;o.yellowZones=[{from:o.min+.5*a,to:o.min+.9*a}],o.redZones=[{from:o.min+.9*a,to:o.max}],gauges[t]=new Gauge(t,o),gauges[t].render()}function createGauges(){createGauge("Bedminster","Bedminster",0,50),createGauge("Piscataway","Piscataway",0,50),createGauge("Middletown","Middletown",0,50),createGauge("Paramus","Paramus",0,50)}function updateGauges(t){for(var i in gauges){var n=getValue(i,t),e=getDate1(i,t);n&&gauges[i].redraw(n,e,100)}}function getValue(gauge_id,index){var d=dataset[index];return eval("d."+gauge_id)}function getDate1(t,i){var n=dataset[i];return n.YEARMONTH}function getROUTER_CPU_Value(t){d3.csv(dataURL,function(i){i.forEach(function(i,n){return n==t?i.ROUTER_CPU:void 0})})}function getAP_CPU_Value(t){d3.csv(dataURL,function(i){i.forEach(function(i,n){return n==t?i.AP_CPU:void 0})})}function updateData(){for(var t=0;t<recordLength;t++);}function initialize(){createGauges(),d3.csv(dataURL,function(t){dataset=t,recordLength=t.length,dataset.some(function(t,i){return 1==i?(updateGauges(i),1==i):void 0});var i=1e3,n=2,e=function(){return function(){return updateGauges(n++),n<recordLength?(d3.timer(e(),i),!0):(n=0,d3.timer(e(),i),!0)}};d3.timer(e(),i)})} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/line_chart.min.js b/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/line_chart.min.js
deleted file mode 100644
index e501260b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/line_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redrawLineChart(){d3.select("#lineChart svg").datum(historicalBarChart).call(line_chart)}var line_chart;nv.addGraph(function(){return line_chart=nv.models.multiChart().dualaxis(!1).legendPos("top").margin({top:30,right:60,bottom:50,left:100}).showLegend(!1).color(d3.scale.category10().range()),line_chart.lines1.forceY([0,34]),line_chart.lines2.forceY([0,1]),line_chart.xAxis.axisLabel("").staggerLabels(!1).showMaxMin(!1).rotateLabels(90).tickFormat(function(a){return d3.time.format("%b %y")(new Date(a))}),line_chart.yAxis1.axisLabel("").tickFormat(d3.format(",.1f")),d3.select("#lineChart svg").datum(historicalBarChart).call(line_chart),nv.utils.windowResize(line_chart.update),line_chart}),redrawLineChart(),historicalBarChart.length<=0&&(document.getElementById("lineChart").innerHTML="<div id='noData2'><b>No Data Available</b></div>",document.getElementById("lineChart").className="nodatadiv",document.getElementById("nodata2").className="nodatainner"); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/pie_chart.min.js b/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/pie_chart.min.js
deleted file mode 100644
index f78eec70..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/pie_chart.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function redraw(){d3.select("#chart423 svg").datum(historicalBarChart).transition().duration(500).call(chart)}var chart;nv.addGraph(function(){return chart=nv.models.pieChart().margin({top:30,right:60,bottom:50,left:100}).x(function(t){return t.key}).y(function(t){return t.y}),chart.showLegend(!1),d3.select("#chart423 svg").datum(historicalBarChart).transition().duration(1200).call(chart),nv.utils.windowResize(chart.update),chart}),setInterval(function(){redraw()},1500),historicalBarChart.length<=0&&(document.getElementById("chart423").innerHTML="<div id='noData'><b>No Data Available</b></div>",document.getElementById("chart423").className="nodatadiv",document.getElementById("nodata").className="nodatainner"); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/worddata.min.js b/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/worddata.min.js
deleted file mode 100644
index 6b827460..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/js/worddata.min.js
+++ /dev/null
@@ -1 +0,0 @@
-function dataViz(t){function e(t){var e=d3.select("svg").append("g").attr("id","wordCloudG").attr("transform","translate(210,175)");e.selectAll("text").data(t).enter().append("text").style("font-size",function(t){return 1*t.size+"px"}).style("fill",function(t){return keywords.indexOf(t.text)>-1?"red":"black"}).style("opacity",.75).attr("text-anchor","middle").attr("transform",function(t){return"translate("+[t.x,t.y]+")rotate("+t.rotate+")"}).text(function(t){return t.text})}d3.layout.cloud().size([420,350]).words(t).rotate(function(t){return t.text.length>5?0:90}).fontSize(function(t){return wordScale(t.frequency)}).on("end",e).start()}d3.csv(dataURL,function(t){dataViz(t)}),wordScale=d3.scale.linear().domain([0,100]).range([0,70]).clamp(!0); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/line_chart.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/line_chart.html
deleted file mode 100644
index d4ba57a4..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/line_chart.html
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- svg {
- display: block;
- }
- #chart461 svg {
- height: 175px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); }
-.nodatadiv {
- display: table-cell;
- width: 700px;
- height:370px;
- text-align:center;
- vertical-align: middle;
-}
-.nodatainner {
- padding: 10px;
-}
- </style>
-<body>
-<div align="center"><H3></H3></div><div id="chart461"> <svg></svg> </div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/axis.min.js"></script>
-<script>
-historicalBarChart = [
- { "type":"line", "key": "AP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.13}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.36}, { "x":1388552400000 , "y":10.0}, { "x":1391230800000 , "y":3.15}, { "x":1391230800000 , "y":2.88}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":4.0}, { "x":1393650000000 , "y":8.0}, { "x":1393650000000 , "y":3.93}, { "x":1393650000000 , "y":4.27}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.25}, { "x":1396324800000 , "y":5.35}, { "x":1396324800000 , "y":5.92}, { "x":1396324800000 , "y":12.0}, { "x":1398916800000 , "y":5.55}, { "x":1398916800000 , "y":4.89}, { "x":1398916800000 , "y":5.01}, { "x":1398916800000 , "y":3.27}, { "x":1401595200000 , "y":6.27}, { "x":1401595200000 , "y":9.17}, { "x":1401595200000 , "y":9.31}, { "x":1401595200000 , "y":6.07}, { "x":1404187200000 , "y":8.37}, { "x":1404187200000 , "y":8.11}, { "x":1404187200000 , "y":8.84}, { "x":1404187200000 , "y":8.93}, { "x":1406865600000 , "y":11.79}, { "x":1406865600000 , "y":12.22}, { "x":1406865600000 , "y":12.6}, { "x":1406865600000 , "y":11.61}, { "x":1409544000000 , "y":15.27}, { "x":1409544000000 , "y":19.09}, { "x":1409544000000 , "y":16.09}, { "x":1409544000000 , "y":18.66}, { "x":1412136000000 , "y":18.4}, { "x":1412136000000 , "y":22.05}, { "x":1412136000000 , "y":21.66}, { "x":1412136000000 , "y":19.04}, { "x":1414814400000 , "y":19.13}, { "x":1414814400000 , "y":19.61}, { "x":1414814400000 , "y":17.61}, { "x":1414814400000 , "y":17.5}, { "x":1417410000000 , "y":19.0}, { "x":1417410000000 , "y":15.73}, { "x":1420088400000 , "y":9.67}, { "x":1420088400000 , "y":15.19}, { "x":1420088400000 , "y":15.02}, { "x":1420088400000 , "y":9.62333333333333}, { "x":1422766800000 , "y":16.95}, { "x":1422766800000 , "y":14.29}, { "x":1425186000000 , "y":12.9}, { "x":1425186000000 , "y":16.1166666666667} ] } ,
- { "type":"line", "key": "ROUTER_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":3.0}, { "x":1388552400000 , "y":4.0}, { "x":1388552400000 , "y":4.89}, { "x":1388552400000 , "y":7.0}, { "x":1391230800000 , "y":4.57}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":4.0}, { "x":1391230800000 , "y":7.0}, { "x":1393650000000 , "y":7.0}, { "x":1393650000000 , "y":4.18}, { "x":1393650000000 , "y":5.0}, { "x":1393650000000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.0}, { "x":1396324800000 , "y":5.06}, { "x":1396324800000 , "y":6.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1398916800000 , "y":5.0}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.09}, { "x":1401595200000 , "y":6.0}, { "x":1401595200000 , "y":6.0}, { "x":1404187200000 , "y":6.36}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1404187200000 , "y":7.0}, { "x":1406865600000 , "y":7.0}, { "x":1406865600000 , "y":7.02}, { "x":1406865600000 , "y":7.24}, { "x":1406865600000 , "y":7.0}, { "x":1409544000000 , "y":8.23}, { "x":1409544000000 , "y":8.11}, { "x":1409544000000 , "y":8.12}, { "x":1409544000000 , "y":8.03}, { "x":1412136000000 , "y":9.0}, { "x":1412136000000 , "y":8.93}, { "x":1412136000000 , "y":8.57}, { "x":1412136000000 , "y":9.0}, { "x":1414814400000 , "y":5.97}, { "x":1414814400000 , "y":6.0}, { "x":1414814400000 , "y":9.0}, { "x":1414814400000 , "y":9.0}, { "x":1417410000000 , "y":9.0}, { "x":1417410000000 , "y":8.78}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":2.01}, { "x":1420088400000 , "y":3.0}, { "x":1420088400000 , "y":3.01}, { "x":1422766800000 , "y":2.67}, { "x":1422766800000 , "y":2.0}, { "x":1425186000000 , "y":2.8}, { "x":1425186000000 , "y":3.63333333333333} ] } ,
- { "type":"line", "key": "SCTP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":7.0}, { "x":1388552400000 , "y":10.0}, { "x":1388552400000 , "y":8.27}, { "x":1388552400000 , "y":8.0}, { "x":1391230800000 , "y":10.02}, { "x":1391230800000 , "y":8.04}, { "x":1391230800000 , "y":9.0}, { "x":1391230800000 , "y":10.0}, { "x":1393650000000 , "y":12.0}, { "x":1393650000000 , "y":10.04}, { "x":1393650000000 , "y":11.16}, { "x":1393650000000 , "y":10.0}, { "x":1396324800000 , "y":10.7}, { "x":1396324800000 , "y":13.31}, { "x":1396324800000 , "y":12.73}, { "x":1396324800000 , "y":9.0}, { "x":1398916800000 , "y":12.41}, { "x":1398916800000 , "y":11.95}, { "x":1398916800000 , "y":12.82}, { "x":1398916800000 , "y":9.58}, { "x":1401595200000 , "y":11.28}, { "x":1401595200000 , "y":14.01}, { "x":1401595200000 , "y":14.63}, { "x":1401595200000 , "y":11.83}, { "x":1404187200000 , "y":14.06}, { "x":1404187200000 , "y":13.96}, { "x":1404187200000 , "y":14.66}, { "x":1404187200000 , "y":14.36}, { "x":1406865600000 , "y":16.6}, { "x":1406865600000 , "y":16.95}, { "x":1406865600000 , "y":17.11}, { "x":1406865600000 , "y":15.94}, { "x":1409544000000 , "y":19.86}, { "x":1409544000000 , "y":22.97}, { "x":1409544000000 , "y":21.56}, { "x":1409544000000 , "y":24.55}, { "x":1412136000000 , "y":22.66}, { "x":1412136000000 , "y":26.79}, { "x":1412136000000 , "y":26.54}, { "x":1412136000000 , "y":25.35}, { "x":1414814400000 , "y":21.0}, { "x":1414814400000 , "y":20.35}, { "x":1414814400000 , "y":21.93}, { "x":1414814400000 , "y":23.63}, { "x":1417410000000 , "y":24.0}, { "x":1417410000000 , "y":21.43}, { "x":1420088400000 , "y":12.63}, { "x":1420088400000 , "y":25.14}, { "x":1420088400000 , "y":21.85}, { "x":1420088400000 , "y":12.5766666666667}, { "x":1422766800000 , "y":26.3}, { "x":1422766800000 , "y":24.4}, { "x":1425186000000 , "y":23.3833333333333}, { "x":1425186000000 , "y":24.5833333333333} ] } ,
- { "type":"line", "key": "DP_CPU", "yAxis": "1","values": [{ "x":1388552400000 , "y":2.0}, { "x":1388552400000 , "y":5.0}, { "x":1388552400000 , "y":2.17}, { "x":1388552400000 , "y":2.0}, { "x":1391230800000 , "y":3.01}, { "x":1391230800000 , "y":2.56}, { "x":1391230800000 , "y":3.0}, { "x":1391230800000 , "y":9.0}, { "x":1393650000000 , "y":10.0}, { "x":1393650000000 , "y":3.64}, { "x":1393650000000 , "y":4.06}, { "x":1393650000000 , "y":4.0}, { "x":1396324800000 , "y":4.04}, { "x":1396324800000 , "y":5.11}, { "x":1396324800000 , "y":5.9}, { "x":1396324800000 , "y":8.0}, { "x":1398916800000 , "y":5.08}, { "x":1398916800000 , "y":4.65}, { "x":1398916800000 , "y":4.74}, { "x":1398916800000 , "y":2.98}, { "x":1401595200000 , "y":6.13}, { "x":1401595200000 , "y":8.98}, { "x":1401595200000 , "y":9.22}, { "x":1401595200000 , "y":5.84}, { "x":1404187200000 , "y":8.12}, { "x":1404187200000 , "y":7.89}, { "x":1404187200000 , "y":8.41}, { "x":1404187200000 , "y":8.47}, { "x":1406865600000 , "y":11.06}, { "x":1406865600000 , "y":11.84}, { "x":1406865600000 , "y":11.92}, { "x":1406865600000 , "y":10.8}, { "x":1409544000000 , "y":14.58}, { "x":1409544000000 , "y":18.39}, { "x":1409544000000 , "y":15.5}, { "x":1409544000000 , "y":18.33}, { "x":1412136000000 , "y":18.01}, { "x":1412136000000 , "y":21.3}, { "x":1412136000000 , "y":21.11}, { "x":1412136000000 , "y":18.37}, { "x":1414814400000 , "y":18.59}, { "x":1414814400000 , "y":18.81}, { "x":1414814400000 , "y":17.13}, { "x":1414814400000 , "y":16.92}, { "x":1417410000000 , "y":18.0}, { "x":1417410000000 , "y":15.18}, { "x":1420088400000 , "y":9.16}, { "x":1420088400000 , "y":12.13}, { "x":1420088400000 , "y":11.76}, { "x":1420088400000 , "y":9.31}, { "x":1422766800000 , "y":13.47}, { "x":1422766800000 , "y":13.41}, { "x":1425186000000 , "y":12.2333333333333}, { "x":1425186000000 , "y":12.4} ] }
-];
-
-</script>
-<script src="js/line_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/pie_chart.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/pie_chart.html
deleted file mode 100644
index ebbdd9c0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/pie_chart.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE html>
-<html>
-<meta http-equiv="content-type" content="text/html; charset=UTF8">
-<meta http-equiv="X-UA-Compatible" content="IE=edge" />
-<link href="../../d3/css/nv.d3.css" rel="stylesheet" type="text/css">
-<style>
- body {
- overflow-y:scroll;
- }
- text {
- font: 12px sans-serif;
- }
- tr.z-row-over > td.z-row-inner, tr.z-row-over > .z-cell { background-color: rgb(255, 255, 255); } svg { display: block; } #chart423 svg {
- height: 275px;
- width: 300px;
- min-width: 100px;
- min-height: 100px;
- }
- </style>
-<body>
-<div id="chart423"><svg></svg></div>
-<script src="../../d3/js/d3.v3.min.js"></script>
-<script src="../../d3/js/nv.d3.min.js"></script>
-<script src="../../d3/js/models/legend.js"></script>
-<script src="../../d3/js/models/pie.js"></script>
-<script src="../../d3/js/models/pieChart.js"></script>
-<script src="../../d3/js/utils.js"></script>
-<script>
-historicalBarChart = [
-{ "key":"Bedminster", "y":8.27},
-{ "key":"Middletown", "y":2.36},
-{ "key":"Paramus", "y":2.17},
-{ "key":"Piscataway", "y":4.89}
-];
-
-</script>
-<script src="js/pie_chart.min.js"></script>
-</body> </html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/html/wordcloud.html b/usecaseui-common/src/main/webapp/static/fusion/sample/html/wordcloud.html
deleted file mode 100644
index 6cf00079..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/html/wordcloud.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<html>
-<head>
- <title>Word Cloud Example</title>
- <meta charset="utf-8" />
-<script src="../../d3/js/d3.v3.min.js" type="text/JavaScript"></script>
-<script src="../../d3/js/colorbrewer.js" type="text/JavaScript"></script>
-<script src="../../d3/js/d3.layout.cloud.js" type="text/JavaScript"></script>
-
-</head>
-<style>
- svg {
- height: 350px;
- width: 420px;
- border: 1px solid gray;
- }
-
-</style>
-<body>
-
-<div id="viz">
- <svg>
- </svg>
-</div>
-<div id="controls" />
-</body>
- <footer>
-
-<script>
-var cloudSize = 200;
-var dataURL = "data/worddata.csv";
-var keywords = ["VNF", "portal", "D2.0", "service", "management", "ECOMP"];
-</script>
-<script src="js/worddata.min.js" type="text/JavaScript"></script>
- </footer>
-
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_drive_test_map.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_drive_test_map.png
deleted file mode 100644
index 78a8873b..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_drive_test_map.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_county.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_county.png
deleted file mode 100644
index df471d7d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_county.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_regression.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_regression.png
deleted file mode 100644
index e59fc189..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_eppt_regression.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_ios_throughput.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_ios_throughput.png
deleted file mode 100644
index 76a2d2b7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_ios_throughput.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map.png
deleted file mode 100644
index 174ef9b8..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map_legend.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map_legend.png
deleted file mode 100644
index f7f2719a..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_lata_map_legend.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png
deleted file mode 100644
index ee0ddef9..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/1_mon.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/1_mon.png
deleted file mode 100644
index d46eee50..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/1_mon.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/2_tue.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/2_tue.png
deleted file mode 100644
index ed82aad3..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/2_tue.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/3_wed.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/3_wed.png
deleted file mode 100644
index 8f8c0328..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/3_wed.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/4_thu.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/4_thu.png
deleted file mode 100644
index 750dca5d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/4_thu.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/5_fri.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/5_fri.png
deleted file mode 100644
index 599e51f1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/5_fri.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/6_sat.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/6_sat.png
deleted file mode 100644
index 70323ea0..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/6_sat.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/7_sun.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/7_sun.png
deleted file mode 100644
index 9d579d68..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/7_sun.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_IN.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_IN.png
deleted file mode 100644
index af1ac0a7..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_IN.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png
deleted file mode 100644
index 935b5386..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat.png
deleted file mode 100644
index 916a655f..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Def.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Def.png
deleted file mode 100644
index a8b516d9..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Def.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Priority.png b/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Priority.png
deleted file mode 100644
index 2cf81411..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/images/tunnels/BH_Nat_Priority.png
+++ /dev/null
Binary files differ
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/js/FusionCharts.js b/usecaseui-common/src/main/webapp/static/fusion/sample/js/FusionCharts.js
deleted file mode 100644
index 4c174dfa..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/js/FusionCharts.js
+++ /dev/null
@@ -1,361 +0,0 @@
-/**
- * FusionCharts: Flash Player detection and Chart embedding.
- * Version 1.2.3F ( 22 November 2008) - Specialized for FusionChartsFREE
- * Checking Flash Version >=6 and added updateChartXML() for FREE Charts.
- * Version: 1.2.3 (1st September, 2008) - Added Fix for % and & characters, scaled dimensions, fixes in to properly handling of double quotes and single quotes in setDataXML() function.
- * Version: 1.2.2 (10th July, 2008) - Added Fix for % scaled dimensions, fixes in setDataXML() and setDataURL() functions
- * Version: 1.2.1 (21st December, 2007) - Added setting up Transparent/opaque mode: setTransparent() function
- * Version: 1.2 (1st November, 2007) - Added FORM fixes for IE
- * Version: 1.1 (29th June, 2007) - Added Player detection, New conditional fixes for IE
- *
- * Morphed from SWFObject (http://blog.deconcept.com/swfobject/) under MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- *
- */
-if(typeof infosoftglobal == "undefined") var infosoftglobal = new Object();
-if(typeof infosoftglobal.FusionChartsUtil == "undefined") infosoftglobal.FusionChartsUtil = new Object();
-infosoftglobal.FusionCharts = function(swf, id, w, h, debugMode, registerWithJS, c, scaleMode, lang, detectFlashVersion, autoInstallRedirect){
- if (!document.getElementById) { return; }
-
- //Flag to see whether data has been set initially
- this.initialDataSet = false;
-
- //Create container objects
- this.params = new Object();
- this.variables = new Object();
- this.attributes = new Array();
-
- //Set attributes for the SWF
- if(swf) { this.setAttribute('swf', swf); }
- if(id) { this.setAttribute('id', id); }
-
- w=w.toString().replace(/\%$/,"%25");
- if(w) { this.setAttribute('width', w); }
- h=h.toString().replace(/\%$/,"%25");
- if(h) { this.setAttribute('height', h); }
-
-
- //Set background color
- if(c) { this.addParam('bgcolor', c); }
-
- //Set Quality
- this.addParam('quality', 'high');
-
- //Add scripting access parameter
- this.addParam('allowScriptAccess', 'always');
-
- //Pass width and height to be appended as chartWidth and chartHeight
- this.addVariable('chartWidth', w);
- this.addVariable('chartHeight', h);
-
- //Whether in debug mode
- debugMode = debugMode ? debugMode : 0;
- this.addVariable('debugMode', debugMode);
- //Pass DOM ID to Chart
- this.addVariable('DOMId', id);
- //Whether to registed with JavaScript
- registerWithJS = registerWithJS ? registerWithJS : 0;
- this.addVariable('registerWithJS', registerWithJS);
-
- //Scale Mode of chart
- scaleMode = scaleMode ? scaleMode : 'noScale';
- this.addVariable('scaleMode', scaleMode);
-
- //Application Message Language
- lang = lang ? lang : 'EN';
- this.addVariable('lang', lang);
-
- //Whether to auto detect and re-direct to Flash Player installation
- this.detectFlashVersion = detectFlashVersion?detectFlashVersion:1;
- this.autoInstallRedirect = autoInstallRedirect?autoInstallRedirect:1;
-
- //Ger Flash Player version
- this.installedVer = infosoftglobal.FusionChartsUtil.getPlayerVersion();
-
- if (!window.opera && document.all && this.installedVer.major > 7) {
- // Only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
- infosoftglobal.FusionCharts.doPrepUnload = true;
- }
-}
-
-infosoftglobal.FusionCharts.prototype = {
- setAttribute: function(name, value){
- this.attributes[name] = value;
- },
- getAttribute: function(name){
- return this.attributes[name];
- },
- addParam: function(name, value){
- this.params[name] = value;
- },
- getParams: function(){
- return this.params;
- },
- addVariable: function(name, value){
- this.variables[name] = value;
- },
- getVariable: function(name){
- return this.variables[name];
- },
- getVariables: function(){
- return this.variables;
- },
- getVariablePairs: function(){
- var variablePairs = new Array();
- var key;
- var variables = this.getVariables();
- for(key in variables){
- variablePairs.push(key +"="+ variables[key]);
- }
- return variablePairs;
- },
- getSWFHTML: function() {
- var swfNode = "";
- if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) {
- // netscape plugin architecture
- swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" ';
- swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
- var params = this.getParams();
- for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
- var pairs = this.getVariablePairs().join("&");
- if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
- swfNode += '/>';
- } else { // PC IE
- swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
- swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
- var params = this.getParams();
- for(var key in params) {
- swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
- }
- var pairs = this.getVariablePairs().join("&");
- if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
- swfNode += "</object>";
- }
- return swfNode;
- },
- setDataURL: function(strDataURL){
- //This method sets the data URL for the chart.
- //If being set initially
- if (this.initialDataSet==false){
- this.addVariable('dataURL',strDataURL);
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interface
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id'));
-
- if (!chartObj.setDataURL)
- {
- __flash__addCallback(chartObj, "setDataURL");
- }
-
- chartObj.setDataURL(strDataURL);
- }
- },
- //This function :
- //fixes the double quoted attributes to single quotes
- //Encodes all quotes inside attribute values
- //Encodes % to %25 and & to %26;
- encodeDataXML: function(strDataXML){
-
- var regExpReservedCharacters=["\\$","\\+"];
- var arrDQAtt=strDataXML.match(/=\s*\".*?\"/g);
- if (arrDQAtt){
- for(var i=0;i<arrDQAtt.length;i++){
- var repStr=arrDQAtt[i].replace(/^=\s*\"|\"$/g,"");
- repStr=repStr.replace(/\'/g,"%26apos;");
- var strTo=strDataXML.indexOf(arrDQAtt[i]);
- var repStrr="='"+repStr+"'";
- var strStart=strDataXML.substring(0,strTo);
- var strEnd=strDataXML.substring(strTo+arrDQAtt[i].length);
- var strDataXML=strStart+repStrr+strEnd;
- }
- }
-
- strDataXML=strDataXML.replace(/\"/g,"%26quot;");
- strDataXML=strDataXML.replace(/%(?![\da-f]{2}|[\da-f]{4})/ig,"%25");
- strDataXML=strDataXML.replace(/\&/g,"%26");
-
- return strDataXML;
-
- },
- setDataXML: function(strDataXML){
- //If being set initially
- if (this.initialDataSet==false){
- //This method sets the data XML for the chart INITIALLY.
- this.addVariable('dataXML',this.encodeDataXML(strDataXML));
- //Update flag
- this.initialDataSet = true;
- }else{
- //Else, we update the chart data using External Interface
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(this.getAttribute('id'));
- chartObj.setDataXML(strDataXML);
- }
- },
- setTransparent: function(isTransparent){
- //Sets chart to transparent mode when isTransparent is true (default)
- //When no parameter is passed, we assume transparent to be true.
- if(typeof isTransparent=="undefined") {
- isTransparent=true;
- }
- //Set the property
- if(isTransparent)
- this.addParam('WMode', 'transparent');
- else
- this.addParam('WMode', 'Opaque');
- },
-
- render: function(elementId){
- //First check for installed version of Flash Player - we need a minimum of 6
- if((this.detectFlashVersion==1) && (this.installedVer.major < 6)){
- if (this.autoInstallRedirect==1){
- //If we can auto redirect to install the player?
- var installationConfirm = window.confirm("You need Adobe Flash Player 6 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. Please click on Ok to install the same.");
- if (installationConfirm){
- window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
- }else{
- return false;
- }
- }else{
- //Else, do not take an action. It means the developer has specified a message in the DIV (and probably a link).
- //So, expect the developers to provide a course of way to their end users.
- //window.alert("You need Adobe Flash Player 8 (or above) to view the charts. It is a free and lightweight installation from Adobe.com. ");
- return false;
- }
- }else{
- //Render the chart
- var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
- n.innerHTML = this.getSWFHTML();
-
- //Added <FORM> compatibility
- //Check if it's added in Mozilla embed array or if already exits
- if(!document.embeds[this.getAttribute('id')] && !window[this.getAttribute('id')])
- window[this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));
- //or else document.forms[formName/formIndex][chartId]
- return true;
- }
- }
-}
-
-/* ---- detection functions ---- */
-infosoftglobal.FusionChartsUtil.getPlayerVersion = function(){
- var PlayerVersion = new infosoftglobal.PlayerVersion([0,0,0]);
- if(navigator.plugins && navigator.mimeTypes.length){
- var x = navigator.plugins["Shockwave Flash"];
- if(x && x.description) {
- PlayerVersion = new infosoftglobal.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
- }
- }else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){
- //If Windows CE
- var axo = 1;
- var counter = 3;
- while(axo) {
- try {
- counter++;
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
- PlayerVersion = new infosoftglobal.PlayerVersion([counter,0,0]);
- } catch (e) {
- axo = null;
- }
- }
- } else {
- // Win IE (non mobile)
- // Do minor version lookup in IE, but avoid Flash Player 6 crashing issues
- try{
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
- }catch(e){
- try {
- var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
- PlayerVersion = new infosoftglobal.PlayerVersion([6,0,21]);
- axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
- } catch(e) {
- if (PlayerVersion.major == 6) {
- return PlayerVersion;
- }
- }
- try {
- axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
- } catch(e) {}
- }
- if (axo != null) {
- PlayerVersion = new infosoftglobal.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
- }
- }
- return PlayerVersion;
-}
-infosoftglobal.PlayerVersion = function(arrVersion){
- this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
- this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
- this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
-}
-// ------------ Fix for Out of Memory Bug in IE in FP9 ---------------//
-/* Fix for video streaming bug */
-infosoftglobal.FusionChartsUtil.cleanupSWFs = function() {
- var objects = document.getElementsByTagName("OBJECT");
- for (var i = objects.length - 1; i >= 0; i--) {
- objects[i].style.display = 'none';
- for (var x in objects[i]) {
- if (typeof objects[i][x] == 'function') {
- objects[i][x] = function(){};
- }
- }
- }
-}
-// Fixes bug in fp9
-if (infosoftglobal.FusionCharts.doPrepUnload) {
- if (!infosoftglobal.unloadSet) {
- infosoftglobal.FusionChartsUtil.prepUnload = function() {
- __flash_unloadHandler = function(){};
- __flash_savedUnloadHandler = function(){};
- window.attachEvent("onunload", infosoftglobal.FusionChartsUtil.cleanupSWFs);
- }
- window.attachEvent("onbeforeunload", infosoftglobal.FusionChartsUtil.prepUnload);
- infosoftglobal.unloadSet = true;
- }
-}
-/* Add document.getElementById if needed (mobile IE < 5) */
-if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}
-/* Add Array.push if needed (ie5) */
-if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
-
-/* Function to return Flash Object from ID */
-infosoftglobal.FusionChartsUtil.getChartObject = function(id)
-{
- var chartRef=null;
- if (navigator.appName.indexOf("Microsoft Internet")==-1) {
- if (document.embeds && document.embeds[id])
- chartRef = document.embeds[id];
- else
- chartRef = window.document[id];
- }
- else {
- chartRef = window[id];
- }
- if (!chartRef)
- chartRef = document.getElementById(id);
-
- return chartRef;
-}
-/*
- Function to update chart's data at client side (FOR FusionCharts vFREE and 2.x
-*/
-infosoftglobal.FusionChartsUtil.updateChartXML = function(chartId, strXML){
- //Get reference to chart object
- var chartObj = infosoftglobal.FusionChartsUtil.getChartObject(chartId);
- //Set dataURL to null
- chartObj.SetVariable("_root.dataURL","");
- //Set the flag
- chartObj.SetVariable("_root.isNewData","1");
- //Set the actual data
- chartObj.SetVariable("_root.newData",strXML);
- //Go to the required frame
- chartObj.TGotoLabel("/", "JavaScriptHandler");
-}
-
-
-/* Aliases for easy usage */
-var getChartFromId = infosoftglobal.FusionChartsUtil.getChartObject;
-var updateChartXML = infosoftglobal.FusionChartsUtil.updateChartXML;
-var FusionCharts = infosoftglobal.FusionCharts; \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/js/charts.js b/usecaseui-common/src/main/webapp/static/fusion/sample/js/charts.js
deleted file mode 100644
index 4bebbd36..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/js/charts.js
+++ /dev/null
@@ -1,132 +0,0 @@
-
-function drawSingleSeriesChart(tabId, chartId, chartWidth, chartHeight, chartType, chartData,mme,yyyyMo) {
- // define, set the data for each chart, and render them (if indicated)
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/" + chartType, "myChartId" + chartId, chartWidth, chartHeight);
-
- var mmeLabel = "";//mme + "";
-
- var chartCaptionId = tabId + "-chartdiv" + chartId + "-label";
-
- document.getElementById(chartCaptionId).innerHTML = "Hosted Voice Usage in "+ yyyyMo;
-
- myChart.setDataXML("<graph caption='"+mmeLabel + "' xAxisName='' yAxisName='# of Inbound/Outbound calls' showNames='1' decimalPrecision='0' formatNumberScale='0'>" + chartData + "</graph>");
- myChart.setTransparent(true);
- myChart.render(tabId + "-"+ "chartdiv" + chartId);
-
-
- }
-
-
- // gauge charts
- function drawGaugeChart(chartId, gaugeIndex, value) {
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/AngularGauge.swf", "myChartId" + chartId, "300", "300", "0", "0");
- //CPU for NYCMNYBWLT1 on 201301 : 12.63//
- var chartData =
- "<Chart showBorder='0' editMode='1' bgColor='FFFFFF' upperLimit='100' lowerLimit='0' label='CPU' baseFontColor='FFFFFF' majorTMNumber='11' majorTMColor='FFFFFF' majorTMHeight='8' minorTMNumber='5' minorTMColor='FFFFFF' minorTMHeight='3' toolTipBorderColor='FFFFFF' toolTipBgColor='333333' gaugeOuterRadius='100' gaugeOriginX='150' gaugeOriginY='150' gaugeScaleAngle='270' placeValuesInside='1' gaugeInnerRadius='80%25' annRenderDelay='0' gaugeFillMix='' pivotRadius='10' showPivotBorder='0' pivotFillMix='{CCCCCC},{333333}' pivotFillRatio='50,50' showShadow='0' >" +
- "<colorRange>" +
- "<color minValue='0' maxValue='50' code='C1E1C1' alpha='60'/>" +
- "<color minValue='50' maxValue='85' code='F6F164' alpha='60'/>" +
- "<color minValue='85' maxValue='120' code='F70118' alpha='60'/>" +
- "</colorRange>" +
- "<dials>" +
- "<dial value='" + value + "' borderColor='FFFFFF' bgColor='000000,CCCCCC,000000' borderAlpha='0' baseWidth='10'/>" +
- "</dials>" +
- "<annotations>" +
- "<annotationGroup xPos='150' yPos='150' showBelow='1'>" +
- "<annotation type='circle' xPos='0' yPos='0' radius='120' startAngle='0' endAngle='360' fillColor='CCCCCC,111111' fillPattern='linear' fillAlpha='100,100' fillRatio='50,50' fillAngle='-45'/>" +
- "<annotation type='circle' xPos='0' yPos='0' radius='110' startAngle='0' endAngle='360' fillColor='111111,cccccc' fillPattern='linear' fillAlpha='100,100' fillRatio='50,50' fillAngle='-45'/>" +
- "<annotation type='text' label='CPU'/>" +
- "</annotationGroup>" +
- "</annotations>" +
- "</Chart>";
-
- myChart.setDataXML(chartData);
- myChart.render("chartdiv" + chartId);
- }
-
-
- function updateGaugeChart(chartId, gaugeIndex, refreshCount) {
- var myChart = getChartFromId("myChartId" + chartId);
- var val = 0;
- if (gaugeIndex == "10") val = 12;
- else if (gaugeIndex == "20") val = 15;
- else if (gaugeIndex == "30") val = 52;
- else if (gaugeIndex == "40") val = 42;
- myChart.setData(1, val);
- myChart.setData(2, val+20);
- }
-
- function updateGaugeChartWithMMEData(chartId, value) {
- var myChart = getChartFromId("myChartId" + chartId);
- myChart.setData(1, value);
- }
-
-
- function updateGaugeChartWithMMEData(chartId, value, yyyyMo, mme) {
- var myChart = getChartFromId("myChartId" + chartId);
- myChart.setData(1, value);
- document.getElementById("cpuYyyyMm").innerHTML = "Hosted Voice Utilization in "+ yyyyMo;
-
- }
-
- function drawMultiSeriesChart(tabId,chartId, chartWidth, chartHeight, chartType) {
- var myChart = new FusionCharts("static/fusion/inc/fusionchart/" + chartType, "myChartId" + chartId, chartWidth, chartHeight, "0", "0");
-
- myChart.setTransparent(true);
-
- var chartData =
- "<graph caption='Hosted Voice v Audited Communication' xAxisName='Month' yAxisName='Bandwidth Usage'" +
- " showValues='0' decimalPrecision='0' bgcolor='ffffff' bgAlpha='70'" +
- " showColumnShadow='1' divlinecolor='c5c5c5' divLineAlpha='60' showAlternateHGridColor='1'" +
- " alternateHGridColor='f8f8f8' alternateHGridAlpha='60' >" +
- "<categories>" +
- "<category name='Jan' />" +
- "<category name='Feb' />" +
- "<category name='Mar' />" +
- "<category name='Apr' />" +
- "<category name='May' />" +
- "<category name='Jun' />" +
- "<category name='Jul' />" +
- "<category name='Aug' />" +
- "<category name='Sep' />" +
- "<category name='Oct' />" +
- "<category name='Nov' />" +
- "<category name='Dec' />" +
- "</categories>" +
- "<dataset seriesName='Hosted Voice' color='c4e3f7' >" +
- "<set value='7' />" +
- "<set value='8.04' />" +
- "<set value='10.04' />" +
- "<set value='12.73' />" +
- "<set value='12.41' />" +
- "<set value='11.83' />" +
- "<set value='14.06' />" +
- "<set value='15.94' />" +
- "<set value='22.97' />" +
- "<set value='26.79' />" +
- "<set value='20.35' />" +
- "<set value='12.63' />" +
- "</dataset>" +
- "<dataset seriesName='Audited Communication' color='Fad35e' >" +
- "<set value='5.49'/>" +
- "<set value='8.05'/>" +
- "<set value='15.36'/>" +
- "<set value='21.23'/>" +
- "<set value='23.48' />" +
- "<set value='15.49' />" +
- "<set value='26.8' />" +
- "<set value='30.54' />" +
- "<set value='64' />" +
- "<set value='75' />" +
- "<set value='63' />" +
- "<set value='34' />" +
- "</dataset>" +
- "<trendlines>" +
- "<line startValue='26000' color='91C728' displayValue='Target' showOnTop='1'/>" +
- "</trendlines>" +
- "</graph>";
-
- myChart.setDataXML(chartData);
- myChart.render(tabId + "-" + "chartdiv" + chartId);
- }
-
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/js/scribble.js b/usecaseui-common/src/main/webapp/static/fusion/sample/js/scribble.js
deleted file mode 100644
index 5384b304..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/js/scribble.js
+++ /dev/null
@@ -1,19 +0,0 @@
- function storeUserScribble(id) {
- var scribble = document.getElementById('scribble').innerHTML;
- localStorage.setItem('userScribble',scribble);
- }
-
- function getUserScribble() {
- if ( localStorage.getItem('userScribble')) {
- var scribble = localStorage.getItem('userScribble');
- }
- else {
- var scribble = 'You can scribble directly on this sticky... and I will also remember your message the next time you visit my blog!';
- }
- document.getElementById('scribble').innerHTML = scribble;
- }
-
- function clearLocal() {
- clear: localStorage.clear();
- return false;
- }
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/bootstrap.min.css b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/bootstrap.min.css
deleted file mode 100644
index 3424a5f1..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/bootstrap.min.css
+++ /dev/null
@@ -1,351 +0,0 @@
-html,body{margin:0;padding:0;}
-h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;}
-ol,ul{list-style:none;}
-q:before,q:after,blockquote:before,blockquote:after{content:"";}
-html{overflow-y:scroll;font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
-a:focus{outline:thin dotted;}
-a:hover,a:active{outline:0;}
-article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
-audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
-audio:not([controls]){display:none;}
-sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}
-sup{top:-0.5em;}
-sub{bottom:-0.25em;}
-img{border:0;-ms-interpolation-mode:bicubic;}
-button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}
-button,input{line-height:normal;*overflow:visible;}
-button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
-button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button;}
-input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;}
-input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}
-textarea{overflow:auto;vertical-align:top;}
-body{background-color:#ffffff;margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#404040;}
-.container{width:940px;margin-left:auto;margin-right:auto;zoom:1;}.container:before,.container:after{display:table;content:"";zoom:1;}
-.container:after{clear:both;}
-.container-fluid{position:relative;min-width:940px;padding-left:20px;padding-right:20px;zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";zoom:1;}
-.container-fluid:after{clear:both;}
-.container-fluid>.sidebar{position:absolute;top:0;left:20px;width:220px;}
-.container-fluid>.content{margin-left:240px;}
-a{color:#0069d6;text-decoration:none;line-height:inherit;font-weight:inherit;}a:hover{color:#00438a;text-decoration:underline;}
-.pull-right{float:right;}
-.pull-left{float:left;}
-.hide{display:none;}
-.show{display:block;}
-.row{zoom:1;margin-left:-20px;}.row:before,.row:after{display:table;content:"";zoom:1;}
-.row:after{clear:both;}
-.row>[class*="span"]{display:inline;float:left;margin-left:20px;}
-.span1{width:40px;}
-.span2{width:100px;}
-.span3{width:160px;}
-.span4{width:220px;}
-.span5{width:280px;}
-.span6{width:340px;}
-.span7{width:400px;}
-.span8{width:460px;}
-.span9{width:520px;}
-.span10{width:580px;}
-.span11{width:640px;}
-.span12{width:700px;}
-.span13{width:760px;}
-.span14{width:820px;}
-.span15{width:880px;}
-.span16{width:940px;}
-.span17{width:1000px;}
-.span18{width:1060px;}
-.span19{width:1120px;}
-.span20{width:1180px;}
-.span21{width:1240px;}
-.span22{width:1300px;}
-.span23{width:1360px;}
-.span24{width:1420px;}
-.row>.offset1{margin-left:80px;}
-.row>.offset2{margin-left:140px;}
-.row>.offset3{margin-left:200px;}
-.row>.offset4{margin-left:260px;}
-.row>.offset5{margin-left:320px;}
-.row>.offset6{margin-left:380px;}
-.row>.offset7{margin-left:440px;}
-.row>.offset8{margin-left:500px;}
-.row>.offset9{margin-left:560px;}
-.row>.offset10{margin-left:620px;}
-.row>.offset11{margin-left:680px;}
-.row>.offset12{margin-left:740px;}
-.span-one-third{width:300px;}
-.span-two-thirds{width:620px;}
-.offset-one-third{margin-left:340px;}
-.offset-two-thirds{margin-left:660px;}
-p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:9px;}p small{font-size:11px;color:#bfbfbf;}
-h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;}
-h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;}
-h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;}
-h3,h4,h5,h6{line-height:36px;}
-h3{font-size:18px;}h3 small{font-size:14px;}
-h4{font-size:16px;}h4 small{font-size:12px;}
-h5{font-size:14px;}
-h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;}
-ul,ol{margin:0 0 18px 25px;}
-ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
-ul{list-style:disc;}
-ol{list-style:decimal;}
-li{line-height:18px;color:#808080;}
-ul.unstyled{list-style:none;margin-left:0;}
-dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;}
-dl dt{font-weight:bold;}
-dl dd{margin-left:9px;}
-hr{margin:20px 0 19px;border:0;border-bottom:1px solid #eee;}
-strong{font-style:inherit;font-weight:bold;}
-em{font-style:italic;font-weight:inherit;line-height:inherit;}
-.muted{color:#bfbfbf;}
-blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;}
-blockquote small{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before{content:'\2014 \00A0';}
-address{display:block;line-height:18px;margin-bottom:18px;}
-code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;}
-pre{background-color:#f5f5f5;display:block;padding:8.5px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre;white-space:pre-wrap;word-wrap:break-word;}
-form{margin-bottom:18px;}
-fieldset{margin-bottom:18px;padding-top:18px;}fieldset legend{display:block;padding-left:150px;font-size:19.5px;line-height:1;color:#404040;*padding:0 0 5px 145px;*line-height:1.5;}
-form .clearfix{margin-bottom:18px;zoom:1;}form .clearfix:before,form .clearfix:after{display:table;content:"";zoom:1;}
-form .clearfix:after{clear:both;}
-label,input,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;}
-label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;}
-form .input{margin-left:150px;}
-input[type=checkbox],input[type=radio]{cursor:pointer;}
-input,textarea,select,.uneditable-input{display:inline-block;width:210px;height:18px;padding:4px;font-size:13px;line-height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
-select{padding:initial;}
-input[type=checkbox],input[type=radio]{width:auto;height:auto;padding:0;margin:3px 0;*margin-top:0;line-height:normal;border:none;}
-input[type=file]{background-color:#ffffff;padding:initial;border:initial;line-height:initial;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-input[type=button],input[type=reset],input[type=submit]{width:auto;height:auto;}
-select,input[type=file]{height:27px;*height:auto;line-height:27px;*margin-top:4px;}
-select[multiple]{height:inherit;background-color:#ffffff;}
-textarea{height:auto;}
-.uneditable-input{background-color:#ffffff;display:block;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
-:-moz-placeholder{color:#bfbfbf;}
-::-webkit-input-placeholder{color:#bfbfbf;}
-input,textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;-ms-transition:border linear 0.2s,box-shadow linear 0.2s;-o-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);}
-input:focus,textarea:focus{outline:0;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);}
-input[type=file]:focus,input[type=checkbox]:focus,select:focus{-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;outline:1px dotted #666;}
-form .clearfix.error>label,form .clearfix.error .help-block,form .clearfix.error .help-inline{color:#b94a48;}
-form .clearfix.error input,form .clearfix.error textarea{color:#b94a48;border-color:#ee5f5b;}form .clearfix.error input:focus,form .clearfix.error textarea:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
-form .clearfix.error .input-prepend .add-on,form .clearfix.error .input-append .add-on{color:#b94a48;background-color:#fce6e6;border-color:#b94a48;}
-form .clearfix.warning>label,form .clearfix.warning .help-block,form .clearfix.warning .help-inline{color:#c09853;}
-form .clearfix.warning input,form .clearfix.warning textarea{color:#c09853;border-color:#ccae64;}form .clearfix.warning input:focus,form .clearfix.warning textarea:focus{border-color:#be9a3f;-webkit-box-shadow:0 0 6px #e5d6b1;-moz-box-shadow:0 0 6px #e5d6b1;box-shadow:0 0 6px #e5d6b1;}
-form .clearfix.warning .input-prepend .add-on,form .clearfix.warning .input-append .add-on{color:#c09853;background-color:#d2b877;border-color:#c09853;}
-form .clearfix.success>label,form .clearfix.success .help-block,form .clearfix.success .help-inline{color:#468847;}
-form .clearfix.success input,form .clearfix.success textarea{color:#468847;border-color:#57a957;}form .clearfix.success input:focus,form .clearfix.success textarea:focus{border-color:#458845;-webkit-box-shadow:0 0 6px #9acc9a;-moz-box-shadow:0 0 6px #9acc9a;box-shadow:0 0 6px #9acc9a;}
-form .clearfix.success .input-prepend .add-on,form .clearfix.success .input-append .add-on{color:#468847;background-color:#bcddbc;border-color:#468847;}
-.input-mini,input.mini,textarea.mini,select.mini{width:60px;}
-.input-small,input.small,textarea.small,select.small{width:90px;}
-.input-medium,input.medium,textarea.medium,select.medium{width:150px;}
-.input-large,input.large,textarea.large,select.large{width:210px;}
-.input-xlarge,input.xlarge,textarea.xlarge,select.xlarge{width:270px;}
-.input-xxlarge,input.xxlarge,textarea.xxlarge,select.xxlarge{width:530px;}
-textarea.xxlarge{overflow-y:auto;}
-input.span1,textarea.span1{display:inline-block;float:none;width:30px;margin-left:0;}
-input.span2,textarea.span2{display:inline-block;float:none;width:90px;margin-left:0;}
-input.span3,textarea.span3{display:inline-block;float:none;width:150px;margin-left:0;}
-input.span4,textarea.span4{display:inline-block;float:none;width:210px;margin-left:0;}
-input.span5,textarea.span5{display:inline-block;float:none;width:270px;margin-left:0;}
-input.span6,textarea.span6{display:inline-block;float:none;width:330px;margin-left:0;}
-input.span7,textarea.span7{display:inline-block;float:none;width:390px;margin-left:0;}
-input.span8,textarea.span8{display:inline-block;float:none;width:450px;margin-left:0;}
-input.span9,textarea.span9{display:inline-block;float:none;width:510px;margin-left:0;}
-input.span10,textarea.span10{display:inline-block;float:none;width:570px;margin-left:0;}
-input.span11,textarea.span11{display:inline-block;float:none;width:630px;margin-left:0;}
-input.span12,textarea.span12{display:inline-block;float:none;width:690px;margin-left:0;}
-input.span13,textarea.span13{display:inline-block;float:none;width:750px;margin-left:0;}
-input.span14,textarea.span14{display:inline-block;float:none;width:810px;margin-left:0;}
-input.span15,textarea.span15{display:inline-block;float:none;width:870px;margin-left:0;}
-input.span16,textarea.span16{display:inline-block;float:none;width:930px;margin-left:0;}
-input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{background-color:#f5f5f5;border-color:#ddd;cursor:not-allowed;}
-.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}.actions .secondary-action{float:right;}.actions .secondary-action a{line-height:30px;}.actions .secondary-action a:hover{text-decoration:underline;}
-.help-inline,.help-block{font-size:13px;line-height:18px;color:#bfbfbf;}
-.help-inline{padding-left:5px;*position:relative;*top:-5px;}
-.help-block{display:block;max-width:600px;}
-.inline-inputs{color:#808080;}.inline-inputs span{padding:0 2px 0 1px;}
-.input-prepend input,.input-append input{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;}
-.input-prepend .add-on,.input-append .add-on{position:relative;background:#f5f5f5;border:1px solid #ccc;z-index:2;float:left;display:block;width:auto;min-width:16px;height:18px;padding:4px 4px 4px 5px;margin-right:-1px;font-weight:normal;line-height:18px;color:#bfbfbf;text-align:center;text-shadow:0 1px 0 #ffffff;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-prepend .active,.input-append .active{background:#a9dba9;border-color:#46a546;}
-.input-prepend .add-on{*margin-top:1px;}
-.input-append input{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;}
-.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;margin-right:0;margin-left:-1px;}
-.inputs-list{margin:0 0 5px;width:100%;}.inputs-list li{display:block;padding:0;width:100%;}
-.inputs-list label{display:block;float:none;width:auto;padding:0;margin-left:20px;line-height:18px;text-align:left;white-space:normal;}.inputs-list label strong{color:#808080;}
-.inputs-list label small{font-size:11px;font-weight:normal;}
-.inputs-list .inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;}
-.inputs-list:first-child{padding-top:6px;}
-.inputs-list li+li{padding-top:2px;}
-.inputs-list input[type=radio],.inputs-list input[type=checkbox]{margin-bottom:0;margin-left:-20px;float:left;}
-.form-stacked{padding-left:20px;}.form-stacked fieldset{padding-top:9px;}
-.form-stacked legend{padding-left:0;}
-.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;}
-.form-stacked .clearfix{margin-bottom:9px;}.form-stacked .clearfix div.input{margin-left:0;}
-.form-stacked .inputs-list{margin-bottom:0;}.form-stacked .inputs-list li{padding-top:0;}.form-stacked .inputs-list li label{font-weight:normal;padding-top:0;}
-.form-stacked div.clearfix.error{padding-top:10px;padding-bottom:10px;padding-left:10px;margin-top:0;margin-left:-10px;}
-.form-stacked .actions{margin-left:-20px;padding-left:20px;}
-.condensed-table th,.condensed-table td{padding:5px 5px 4px;}
-.bordered-table{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.bordered-table th+th,.bordered-table td+td,.bordered-table th+td{border-left:1px solid #ddd;}
-.bordered-table thead tr:first-child th:first-child,.bordered-table tbody tr:first-child td:first-child{-webkit-border-radius:4px 0 0 0;-moz-border-radius:4px 0 0 0;border-radius:4px 0 0 0;}
-.bordered-table thead tr:first-child th:last-child,.bordered-table tbody tr:first-child td:last-child{-webkit-border-radius:0 4px 0 0;-moz-border-radius:0 4px 0 0;border-radius:0 4px 0 0;}
-.bordered-table tbody tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;}
-.bordered-table tbody tr:last-child td:last-child{-webkit-border-radius:0 0 4px 0;-moz-border-radius:0 0 4px 0;border-radius:0 0 4px 0;}
-table .span1{width:20px;}
-table .span2{width:60px;}
-table .span3{width:100px;}
-table .span4{width:140px;}
-table .span5{width:180px;}
-table .span6{width:220px;}
-table .span7{width:260px;}
-table .span8{width:300px;}
-table .span9{width:340px;}
-table .span10{width:380px;}
-table .span11{width:420px;}
-table .span12{width:460px;}
-table .span13{width:500px;}
-table .span14{width:540px;}
-table .span15{width:580px;}
-table .span16{width:620px;}
-.zebra-striped tbody tr:nth-child(odd) td,.zebra-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9;}
-.zebra-striped tbody tr:hover td,.zebra-striped tbody tr:hover th{background-color:#f5f5f5;}
-table .header{cursor:pointer;}table .header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;}
-table .headerSortUp,table .headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);}
-table .header:hover:after{visibility:visible;}
-table .headerSortDown:after,table .headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
-table .headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;}
-table .blue{color:#049cdb;border-bottom-color:#049cdb;}
-table .headerSortUp.blue,table .headerSortDown.blue{background-color:#ade6fe;}
-table .green{color:#46a546;border-bottom-color:#46a546;}
-table .headerSortUp.green,table .headerSortDown.green{background-color:#cdeacd;}
-table .red{color:#9d261d;border-bottom-color:#9d261d;}
-table .headerSortUp.red,table .headerSortDown.red{background-color:#f4c8c5;}
-table .yellow{color:#ffc40d;border-bottom-color:#ffc40d;}
-table .headerSortUp.yellow,table .headerSortDown.yellow{background-color:#fff6d9;}
-table .orange{color:#f89406;border-bottom-color:#f89406;}
-table .headerSortUp.orange,table .headerSortDown.orange{background-color:#fee9cc;}
-table .purple{color:#7a43b6;border-bottom-color:#7a43b6;}
-table .headerSortUp.purple,table .headerSortDown.purple{background-color:#e2d5f0;}
-.topbar{height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;}.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}
-.topbar h3 a:hover,.topbar .brand:hover,.topbar ul .active>a{background-color:#333;background-color:rgba(255, 255, 255, 0.05);color:#ffffff;text-decoration:none;}
-.topbar h3{position:relative;}
-.topbar h3 a,.topbar .brand{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}
-.topbar p{margin:0;line-height:40px;}.topbar p a:hover{background-color:transparent;color:#ffffff;}
-.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}
-.topbar form.pull-right{float:right;}
-.topbar input{background-color:#444;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;padding:4px 9px;color:#ffffff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none;}.topbar input:-moz-placeholder{color:#e6e6e6;}
-.topbar input::-webkit-input-placeholder{color:#e6e6e6;}
-.topbar input:hover{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.5);color:#ffffff;}
-.topbar input:focus,.topbar input.focused{outline:0;background-color:#ffffff;color:#404040;text-shadow:0 1px 0 #ffffff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);}
-.topbar-inner,.topbar .fill{background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}
-.topbar div>ul,.nav{display:block;float:left;margin:0 10px 0 0;position:relative;left:0;}.topbar div>ul>li,.nav>li{display:block;float:left;}
-.topbar div>ul a,.nav a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}.topbar div>ul a:hover,.nav a:hover{color:#ffffff;text-decoration:none;}
-.topbar div>ul .active>a,.nav .active>a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);}
-.topbar div>ul.secondary-nav,.nav.secondary-nav{float:right;margin-left:10px;margin-right:0;}.topbar div>ul.secondary-nav .menu-dropdown,.nav.secondary-nav .menu-dropdown,.topbar div>ul.secondary-nav .dropdown-menu,.nav.secondary-nav .dropdown-menu{right:0;border:0;}
-.topbar div>ul a.menu:hover,.nav a.menu:hover,.topbar div>ul li.open .menu,.nav li.open .menu,.topbar div>ul .dropdown-toggle:hover,.nav .dropdown-toggle:hover,.topbar div>ul .dropdown.open .dropdown-toggle,.nav .dropdown.open .dropdown-toggle{background:#444;background:rgba(255, 255, 255, 0.05);}
-.topbar div>ul .menu-dropdown,.nav .menu-dropdown,.topbar div>ul .dropdown-menu,.nav .dropdown-menu{background-color:#333;}.topbar div>ul .menu-dropdown a.menu,.nav .menu-dropdown a.menu,.topbar div>ul .dropdown-menu a.menu,.nav .dropdown-menu a.menu,.topbar div>ul .menu-dropdown .dropdown-toggle,.nav .menu-dropdown .dropdown-toggle,.topbar div>ul .dropdown-menu .dropdown-toggle,.nav .dropdown-menu .dropdown-toggle{color:#ffffff;}.topbar div>ul .menu-dropdown a.menu.open,.nav .menu-dropdown a.menu.open,.topbar div>ul .dropdown-menu a.menu.open,.nav .dropdown-menu a.menu.open,.topbar div>ul .menu-dropdown .dropdown-toggle.open,.nav .menu-dropdown .dropdown-toggle.open,.topbar div>ul .dropdown-menu .dropdown-toggle.open,.nav .dropdown-menu .dropdown-toggle.open{background:#444;background:rgba(255, 255, 255, 0.05);}
-.topbar div>ul .menu-dropdown li a,.nav .menu-dropdown li a,.topbar div>ul .dropdown-menu li a,.nav .dropdown-menu li a{color:#999;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);}.topbar div>ul .menu-dropdown li a:hover,.nav .menu-dropdown li a:hover,.topbar div>ul .dropdown-menu li a:hover,.nav .dropdown-menu li a:hover{background-color:#191919;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));background-image:-moz-linear-gradient(top, #292929, #191919);background-image:-ms-linear-gradient(top, #292929, #191919);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));background-image:-webkit-linear-gradient(top, #292929, #191919);background-image:-o-linear-gradient(top, #292929, #191919);background-image:linear-gradient(top, #292929, #191919);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);color:#ffffff;}
-.topbar div>ul .menu-dropdown .active a,.nav .menu-dropdown .active a,.topbar div>ul .dropdown-menu .active a,.nav .dropdown-menu .active a{color:#ffffff;}
-.topbar div>ul .menu-dropdown .divider,.nav .menu-dropdown .divider,.topbar div>ul .dropdown-menu .divider,.nav .dropdown-menu .divider{background-color:#222;border-color:#444;}
-.topbar ul .menu-dropdown li a,.topbar ul .dropdown-menu li a{padding:4px 15px;}
-li.menu,.dropdown{position:relative;}
-a.menu:after,.dropdown-toggle:after{width:0;height:0;display:inline-block;content:"&darr;";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #ffffff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;}
-.menu-dropdown,.dropdown-menu{background-color:#ffffff;float:left;display:none;position:absolute;top:40px;z-index:900;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:6px 0;zoom:1;border-color:#999;border-color:rgba(0, 0, 0, 0.2);border-style:solid;border-width:0 1px 1px;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);box-shadow:0 2px 4px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.menu-dropdown li,.dropdown-menu li{float:none;display:block;background-color:none;}
-.menu-dropdown .divider,.dropdown-menu .divider{height:1px;margin:5px 0;overflow:hidden;background-color:#eee;border-bottom:1px solid #ffffff;}
-.topbar .dropdown-menu a,.dropdown-menu a{display:block;padding:4px 15px;clear:both;font-weight:normal;line-height:18px;color:#808080;text-shadow:0 1px 0 #ffffff;}.topbar .dropdown-menu a:hover,.dropdown-menu a:hover,.topbar .dropdown-menu a.hover,.dropdown-menu a.hover{background-color:#dddddd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));background-image:-moz-linear-gradient(top, #eeeeee, #dddddd);background-image:-ms-linear-gradient(top, #eeeeee, #dddddd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));background-image:-webkit-linear-gradient(top, #eeeeee, #dddddd);background-image:-o-linear-gradient(top, #eeeeee, #dddddd);background-image:linear-gradient(top, #eeeeee, #dddddd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);color:#404040;text-decoration:none;-webkit-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 0 rgba(0, 0, 0, 0.025),inset 0 -1px rgba(0, 0, 0, 0.025);}
-.open .menu,.dropdown.open .menu,.open .dropdown-toggle,.dropdown.open .dropdown-toggle{color:#ffffff;background:#ccc;background:rgba(0, 0, 0, 0.3);}
-.open .menu-dropdown,.dropdown.open .menu-dropdown,.open .dropdown-menu,.dropdown.open .dropdown-menu{display:block;}
-.tabs,.pills{margin:0 0 18px;padding:0;list-style:none;zoom:1;}.tabs:before,.pills:before,.tabs:after,.pills:after{display:table;content:"";zoom:1;}
-.tabs:after,.pills:after{clear:both;}
-.tabs>li,.pills>li{float:left;}.tabs>li>a,.pills>li>a{display:block;}
-.tabs{border-color:#ddd;border-style:solid;border-width:0 0 1px;}.tabs>li{position:relative;margin-bottom:-1px;}.tabs>li>a{padding:0 15px;margin-right:2px;line-height:34px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.tabs>li>a:hover{text-decoration:none;background-color:#eee;border-color:#eee #eee #ddd;}
-.tabs .active>a,.tabs .active>a:hover{color:#808080;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
-.tabs .menu-dropdown,.tabs .dropdown-menu{top:35px;border-width:1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
-.tabs a.menu:after,.tabs .dropdown-toggle:after{border-top-color:#999;margin-top:15px;margin-left:5px;}
-.tabs li.open.menu .menu,.tabs .open.dropdown .dropdown-toggle{border-color:#999;}
-.tabs li.open a.menu:after,.tabs .dropdown.open .dropdown-toggle:after{border-top-color:#555;}
-.pills a{margin:5px 3px 5px 0;padding:0 15px;line-height:30px;text-shadow:0 1px 1px #ffffff;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}.pills a:hover{color:#ffffff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#00438a;}
-.pills .active a{color:#ffffff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);background-color:#0069d6;}
-.pills-vertical>li{float:none;}
-.tab-content>.tab-pane,.pill-content>.pill-pane,.tab-content>div,.pill-content>div{display:none;}
-.tab-content>.active,.pill-content>.active{display:block;}
-.breadcrumb{padding:7px 14px;margin:0 0 18px;background-color:#f5f5f5;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));background-image:-moz-linear-gradient(top, #ffffff, #f5f5f5);background-image:-ms-linear-gradient(top, #ffffff, #f5f5f5);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));background-image:-webkit-linear-gradient(top, #ffffff, #f5f5f5);background-image:-o-linear-gradient(top, #ffffff, #f5f5f5);background-image:linear-gradient(top, #ffffff, #f5f5f5);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;}.breadcrumb li{display:inline;text-shadow:0 1px 0 #ffffff;}
-.breadcrumb .divider{padding:0 5px;color:#bfbfbf;}
-.breadcrumb .active a{color:#404040;}
-.hero-unit{background-color:#f5f5f5;margin-bottom:30px;padding:60px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;}
-.hero-unit p{font-size:18px;font-weight:200;line-height:27px;}
-footer{margin-top:17px;padding-top:17px;border-top:1px solid #eee;}
-.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}.page-header h1{margin-bottom:8px;}
-.btn.danger,.alert-message.danger,.btn.danger:hover,.alert-message.danger:hover,.btn.error,.alert-message.error,.btn.error:hover,.alert-message.error:hover,.btn.success,.alert-message.success,.btn.success:hover,.alert-message.success:hover,.btn.info,.alert-message.info,.btn.info:hover,.alert-message.info:hover{color:#ffffff;}
-.btn .close,.alert-message .close{font-family:Arial,sans-serif;line-height:18px;}
-.btn.danger,.alert-message.danger,.btn.error,.alert-message.error{background-color:#c43c35;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-ms-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(top, #ee5f5b, #c43c35);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#c43c35 #c43c35 #882a25;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.success,.alert-message.success{background-color:#57a957;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-ms-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(top, #62c462, #57a957);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#57a957 #57a957 #3d773d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.info,.alert-message.info{background-color:#339bb9;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-ms-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(top, #5bc0de, #339bb9);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#339bb9 #339bb9 #22697d;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn{cursor:pointer;display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);background-image:-ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:-o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);background-image:linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);padding:5px 14px 6px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333;font-size:13px;line-height:normal;border:1px solid #ccc;border-bottom-color:#bbb;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;-ms-transition:0.1s linear all;-o-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333;text-decoration:none;}
-.btn:focus{outline:1px dotted #666;}
-.btn.primary{color:#ffffff;background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(top, #049cdb, #0064cd);background-image:-ms-linear-gradient(top, #049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(top, #049cdb, #0064cd);background-image:-o-linear-gradient(top, #049cdb, #0064cd);background-image:linear-gradient(top, #049cdb, #0064cd);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#0064cd #0064cd #003f81;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);}
-.btn.active,.btn :active{-webkit-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.25),0 1px 2px rgba(0, 0, 0, 0.05);}
-.btn.disabled{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn[disabled]{cursor:default;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
-.btn.large{font-size:15px;line-height:normal;padding:9px 14px 9px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
-.btn.small{padding:7px 9px 7px;font-size:11px;}
-:root .alert-message,:root .btn{border-radius:0 \0;}
-button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;}
-.close{float:right;color:#000000;font-size:20px;font-weight:bold;line-height:13.5px;text-shadow:0 1px 0 #ffffff;filter:alpha(opacity=25);-khtml-opacity:0.25;-moz-opacity:0.25;opacity:0.25;}.close:hover{color:#000000;text-decoration:none;filter:alpha(opacity=40);-khtml-opacity:0.4;-moz-opacity:0.4;opacity:0.4;}
-.alert-message{position:relative;padding:7px 15px;margin-bottom:18px;color:#404040;background-color:#eedc94;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#fceec1), to(#eedc94));background-image:-moz-linear-gradient(top, #fceec1, #eedc94);background-image:-ms-linear-gradient(top, #fceec1, #eedc94);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #fceec1), color-stop(100%, #eedc94));background-image:-webkit-linear-gradient(top, #fceec1, #eedc94);background-image:-o-linear-gradient(top, #fceec1, #eedc94);background-image:linear-gradient(top, #fceec1, #eedc94);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fceec1', endColorstr='#eedc94', GradientType=0);text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#eedc94 #eedc94 #e4c652;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);border-width:1px;border-style:solid;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.25);}.alert-message .close{margin-top:1px;*margin-top:0;}
-.alert-message a{font-weight:bold;color:#404040;}
-.alert-message.danger p a,.alert-message.error p a,.alert-message.success p a,.alert-message.info p a{color:#ffffff;}
-.alert-message h5{line-height:18px;}
-.alert-message p{margin-bottom:0;}
-.alert-message div{margin-top:5px;margin-bottom:2px;line-height:28px;}
-.alert-message .btn{-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);box-shadow:0 1px 0 rgba(255, 255, 255, 0.25);}
-.alert-message.block-message{background-image:none;background-color:#fdf5d9;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);padding:14px;border-color:#fceec1;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}.alert-message.block-message ul,.alert-message.block-message p{margin-right:30px;}
-.alert-message.block-message ul{margin-bottom:0;}
-.alert-message.block-message li{color:#404040;}
-.alert-message.block-message .alert-actions{margin-top:5px;}
-.alert-message.block-message.error,.alert-message.block-message.success,.alert-message.block-message.info{color:#404040;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
-.alert-message.block-message.error{background-color:#fddfde;border-color:#fbc7c6;}
-.alert-message.block-message.success{background-color:#d1eed1;border-color:#bfe7bf;}
-.alert-message.block-message.info{background-color:#ddf4fb;border-color:#c6edf9;}
-.alert-message.block-message.danger p a,.alert-message.block-message.error p a,.alert-message.block-message.success p a,.alert-message.block-message.info p a{color:#404040;}
-.pagination{height:36px;margin:18px 0;}.pagination ul{float:left;margin:0;border:1px solid #ddd;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
-.pagination li{display:inline;}
-.pagination a{float:left;padding:0 14px;line-height:34px;border-right:1px solid;border-right-color:#ddd;border-right-color:rgba(0, 0, 0, 0.15);*border-right-color:#ddd;text-decoration:none;}
-.pagination a:hover,.pagination .active a{background-color:#c7eefe;}
-.pagination .disabled a,.pagination .disabled a:hover{background-color:transparent;color:#bfbfbf;}
-.pagination .next a{border:0;}
-.well{background-color:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #eee;border:1px solid rgba(0, 0, 0, 0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
-.modal-backdrop{background-color:#000000;position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;}.modal-backdrop.fade{opacity:0;}
-.modal-backdrop,.modal-backdrop.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
-.modal{position:fixed;top:50%;left:50%;z-index:11000;width:560px;margin:-250px 0 0 -280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.modal .close{margin-top:7px;}
-.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-ms-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
-.modal.fade.in{top:50%;}
-.modal-header{border-bottom:1px solid #eee;padding:5px 15px;}
-.modal-body{padding:15px;}
-.modal-body form{margin-bottom:0;}
-.modal-footer{background-color:#f5f5f5;padding:14px 15px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;margin-bottom:0;}.modal-footer:before,.modal-footer:after{display:table;content:"";zoom:1;}
-.modal-footer:after{clear:both;}
-.modal-footer .btn{float:right;margin-left:5px;}
-.modal .popover,.modal .twipsy{z-index:12000;}
-.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}.twipsy.fade.in{filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}
-.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.twipsy-inner{padding:3px 8px;background-color:#000000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
-.twipsy-arrow{position:absolute;width:0;height:0;}
-.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;}
-.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;}
-.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;}
-.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;}
-.popover .arrow{position:absolute;width:0;height:0;}
-.popover .inner{background:#000000;background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);}
-.popover .title{background-color:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;}
-.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;}
-.fade{-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-ms-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;opacity:0;}.fade.in{opacity:1;}
-.label{padding:1px 3px 2px;font-size:9.75px;font-weight:bold;color:#ffffff;text-transform:uppercase;white-space:nowrap;background-color:#bfbfbf;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}.label.important{background-color:#c43c35;}
-.label.warning{background-color:#f89406;}
-.label.success{background-color:#46a546;}
-.label.notice{background-color:#62cffc;}
-.media-grid{margin-left:-20px;margin-bottom:0;zoom:1;}.media-grid:before,.media-grid:after{display:table;content:"";zoom:1;}
-.media-grid:after{clear:both;}
-.media-grid li{display:inline;}
-.media-grid a{float:left;padding:4px;margin:0 0 18px 20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:0 1px 1px rgba(0, 0, 0, 0.075);}.media-grid a img{display:block;}
-.media-grid a:hover{border-color:#0069d6;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/custom.css b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/custom.css
deleted file mode 100644
index b7df8c25..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/custom.css
+++ /dev/null
@@ -1,97 +0,0 @@
-body, html, div, p, span, a, h1, h2, h3, h4, h5{
- margin : 0;
- padding : 0;
-}
-
-body, html{
- width : 100%;
-}
-
-body{
- color : white;
- font-family : tahoma;
- font-weight : lighter;
- padding-top : 40px;
-}
-
- body p{
- font-size : 14px;
- }
-
- body p a{
- font-size : 16px;
- }
-
-h1 {
- color : #E05E00;
- font-style : italic;
-}
-
-a{
- color : #E05E00;
- text-decoration : none;
-}
-
-a:hover{
- text-decoration : underline;
-}
-
-/* general */
-.clear {
- clear: both;
-}
-
-/* Header */
-.brand{
- color : #E05E00 !important;
- font-family : georgia;
- font-style : italic;
-}
-
-/* list stuff */
-#org{
- background-color : white;
- margin : 10px;
- padding : 10px;
-}
-
-#show-list{
- cursor : pointer;
-}
-
-/* bootstrap overrides */
-.alert-message{
- margin: 2px 0;
-}
-
-.topbar{
- position : absolute;
-}
-
-/* Custom chart styling */
-.jOrgChart {
- margin : 10px;
- padding : 20px;
-}
-
-/* Custom node styling */
-.jOrgChart .node {
- font-weight : bold;
- font-size : 14px;
- background-color : #D5D6DB;
- border-radius : 8px;
- border : 5px solid gray;
- color : #793a06;
- -moz-border-radius : 8px;
-}
- .node p{
- font-family : tahoma;
- font-size : 10px;
- line-height : 11px;
- padding : 2px;
- }
-
-table {
- margin-left: auto;
- margin-right: auto;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css
deleted file mode 100644
index ffabe274..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/jquery.jOrgChart.css
+++ /dev/null
@@ -1,51 +0,0 @@
-/* Basic styling */
-/* Draw the lines */
-.jOrgChart .line {
- height : 20px;
- width : 4px;
-}
-
-.jOrgChart .down {
- background-color : black;
- margin : 0px auto;
-}
-
-.jOrgChart .top {
- border-top : 3px solid black;
-}
-
-.jOrgChart .left {
- border-right : 2px solid black;
-}
-
-.jOrgChart .right {
- border-left : 2px solid black;
-}
-
-/* node cell */
-.jOrgChart td {
- text-align : center;
- vertical-align : top;
- padding : 0;
-}
-
-/* The node */
-.jOrgChart .node {
- background-color : #35363B;
- display : inline-block;
- width : 120px;
- height : 60px;
- z-index : 10;
- margin : 0 2px;
-}
-
-/* jQuery drag 'n drop */
-
-.drag-active {
- border-style : dashed !important;
-}
-
-.drop-hover {
- border-style : solid !important;
- border-color : #E05E00 !important;
-}
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/prettify.css b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/prettify.css
deleted file mode 100644
index d44b3a22..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/css/prettify.css
+++ /dev/null
@@ -1 +0,0 @@
-.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example.html b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example.html
deleted file mode 100644
index 543b0f92..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example.html
+++ /dev/null
@@ -1,85 +0,0 @@
-<!DOCTYPE html>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>jOrgChart - A jQuery OrgChart Plugin</title>
- <link rel="stylesheet" href="css/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/jquery.jOrgChart.css"/>
- <link rel="stylesheet" href="css/custom.css"/>
- <link href="css/prettify.css" type="text/css" rel="stylesheet" />
-
- <script type="text/javascript" src="prettify.js"></script>
-
- <!-- jQuery includes -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-
- <script src="jquery.jOrgChart.js"></script>
-
- <script>
- jQuery(document).ready(function() {
- $("#org").jOrgChart({
- chartElement : '#chart',
- dragAndDrop : true
- });
- });
- </script>
- </head>
-
- <body onload="prettyPrint();">
- <ul id="org" style="display:none">
- <li>Product 1<br/>
- <ul>
- <li>Service 1<br/>
- <ul>
- <li>Resource 1<br/></li>
- <li>Resource 2<br/></li>
- <li>Resource 3<br/></li>
- <li>Resource 4<br/></li>
- <li>Resource 5<br/></li>
- </ul>
- </li>
- <li>Service 6<br/></li>
- <li>Service 7<br/>
- <ul>
- <li>Resource 8<br/></li>
- <li>Resource 9<br/></li>
- <li>Resource 10<br/></li>
- <li>Resource 11<br/></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <div id="chart" class="orgChart"></div>
-
- <script>
- jQuery(document).ready(function() {
-
- /* Custom jQuery for the example */
- $("#show-list").click(function(e){
- e.preventDefault();
-
- $('#list-html').toggle('fast', function(){
- if($(this).is(':visible')){
- $('#show-list').text('Hide underlying list.');
- $(".topbar").fadeTo('fast',0.9);
- }else{
- $('#show-list').text('Show underlying list.');
- $(".topbar").fadeTo('fast',1);
- }
- });
- });
-
- $('#list-html').text($('#org').html());
-
- $("#org").bind("DOMSubtreeModified", function() {
- $('#list-html').text('');
-
- $('#list-html').text($('#org').html());
-
- prettyPrint();
- });
- });
- </script>
-</body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html
deleted file mode 100644
index a2e3703d..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/example_vsp.html
+++ /dev/null
@@ -1,88 +0,0 @@
-<!DOCTYPE html>
-<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>jOrgChart - A jQuery OrgChart Plugin</title>
- <link rel="stylesheet" href="css/bootstrap.min.css"/>
- <link rel="stylesheet" href="css/jquery.jOrgChart.css"/>
- <link rel="stylesheet" href="css/custom.css"/>
- <link href="css/prettify.css" type="text/css" rel="stylesheet" />
-
- <script type="text/javascript" src="prettify.js"></script>
-
- <!-- jQuery includes -->
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
-
- <script src="jquery.jOrgChart.js"></script>
-
- <script>
- jQuery(document).ready(function() {
- $("#org").jOrgChart({
- chartElement : '#chart',
- dragAndDrop : true
- });
- });
- </script>
- </head>
-
- <body onload="prettyPrint();">
- <ul id="org" style="display:none">
- <li>Trinity<br/>
- <ul>
- <li>Call Forwarding<br/>
- <ul>
- <li>Call Forwarding Busy<br/></li>
- <li>Call Forwarding Always<br/></li>
- <li>Call Forwarding Not Reachable<br/></li>
- </ul>
- </li>
- <li>Dial Restrictions<br/>
- <ul>
- <li>Outgoing Calls<br/></li>
- <li>Redirecting Calls<br/></li>
- <li>Incoming Calls<br/></li>
- </ul>
- </li>
- <li>Messaging<br/>
- <ul>
- <li>Voice Management<br/></li>
- <li>Greetings<br/></li>
- <li>Fax Messaging<br/></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
-
- <div id="chart" class="orgChart"></div>
-
- <script>
- jQuery(document).ready(function() {
-
- /* Custom jQuery for the example */
- $("#show-list").click(function(e){
- e.preventDefault();
-
- $('#list-html').toggle('fast', function(){
- if($(this).is(':visible')){
- $('#show-list').text('Hide underlying list.');
- $(".topbar").fadeTo('fast',0.9);
- }else{
- $('#show-list').text('Show underlying list.');
- $(".topbar").fadeTo('fast',1);
- }
- });
- });
-
- $('#list-html').text($('#org').html());
-
- $("#org").bind("DOMSubtreeModified", function() {
- $('#list-html').text('');
-
- $('#list-html').text($('#org').html());
-
- prettyPrint();
- });
- });
- </script>
- </body>
-</html> \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js
deleted file mode 100644
index 89411b29..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/jquery.jOrgChart.js
+++ /dev/null
@@ -1,267 +0,0 @@
-/**
- * jQuery org-chart/tree plugin.
- *
- * Author: Wes Nolte
- * http://twitter.com/wesnolte
- *
- * Based on the work of Mark Lee
- * http://www.capricasoftware.co.uk
- *
- * Copyright (c) 2011 Wesley Nolte
- * Dual licensed under the MIT and GPL licenses.
- *
- */
-(function($) {
-
- $.fn.jOrgChart = function(options) {
- var opts = $.extend({}, $.fn.jOrgChart.defaults, options);
- var $appendTo = $(opts.chartElement);
-
- // build the tree
- $this = $(this);
- var $container = $("<div class='" + opts.chartClass + "'/>");
- if($this.is("ul")) {
- buildNode($this.find("li:first"), $container, 0, opts);
- }
- else if($this.is("li")) {
- buildNode($this, $container, 0, opts);
- }
- $appendTo.append($container);
-
- // add drag and drop if enabled
- if(opts.dragAndDrop){
- $('div.node').draggable({
- cursor : 'move',
- distance : 40,
- helper : 'clone',
- opacity : 0.8,
- revert : true,
- revertDuration : 100,
- snap : 'div.node.expanded',
- snapMode : 'inner',
- stack : 'div.node'
- });
-
- $('div.node').droppable({
- accept : '.node',
- activeClass : 'drag-active',
- hoverClass : 'drop-hover'
- });
-
- // Drag start event handler for nodes
- $('div.node').bind("dragstart", function handleDragStart( event, ui ){
-
- var sourceNode = $(this);
- sourceNode.parentsUntil('.node-container')
- .find('*')
- .filter('.node')
- .droppable('disable');
- });
-
- // Drag stop event handler for nodes
- $('div.node').bind("dragstop", function handleDragStop( event, ui ){
-
- /* reload the plugin */
- $(opts.chartElement).children().remove();
- $this.jOrgChart(opts);
- });
-
- // Drop event handler for nodes
- $('div.node').bind("drop", function handleDropEvent( event, ui ) {
- var sourceNode = ui.draggable;
- var targetNode = $(this);
-
- // finding nodes based on plaintext and html
- // content is hard!
- var targetLi = $('li').filter(function(){
-
- li = $(this).clone()
- .children("ul,li")
- .remove()
- .end();
- var attr = li.attr('id');
- if (typeof attr !== 'undefined' && attr !== false) {
- return li.attr("id") == targetNode.attr("id");
- }
- else {
- return li.html() == targetNode.html();
- }
-
- });
-
- var sourceLi = $('li').filter(function(){
-
- li = $(this).clone()
- .children("ul,li")
- .remove()
- .end();
- var attr = li.attr('id');
- if (typeof attr !== 'undefined' && attr !== false) {
- return li.attr("id") == sourceNode.attr("id");
- }
- else {
- return li.html() == sourceNode.html();
- }
-
- });
-
- var sourceliClone = sourceLi.clone();
- var sourceUl = sourceLi.parent('ul');
-
- if(sourceUl.children('li').size() > 1){
- sourceLi.remove();
- }else{
- sourceUl.remove();
- }
-
- var id = sourceLi.attr("id");
-
- if(targetLi.children('ul').size() >0){
- if (typeof id !== 'undefined' && id !== false) {
- targetLi.children('ul').append('<li id="'+id+'">'+sourceliClone.html()+'</li>');
- }else{
- targetLi.children('ul').append('<li>'+sourceliClone.html()+'</li>');
- }
- }else{
- if (typeof id !== 'undefined' && id !== false) {
- targetLi.append('<ul><li id="'+id+'">'+sourceliClone.html()+'</li></ul>');
- }else{
- targetLi.append('<ul><li>'+sourceliClone.html()+'</li></ul>');
- }
- }
-
- }); // handleDropEvent
-
- } // Drag and drop
- };
-
- // Option defaults
- $.fn.jOrgChart.defaults = {
- chartElement : 'body',
- depth : -1,
- chartClass : "jOrgChart",
- dragAndDrop: false
- };
-
- // Method that recursively builds the tree
- function buildNode($node, $appendTo, level, opts) {
- var $table = $("<table cellpadding='0' cellspacing='0' border='0'/>");
- var $tbody = $("<tbody/>");
-
- // Construct the node container(s)
- var $nodeRow = $("<tr/>").addClass("node-cells");
- var $nodeCell = $("<td/>").addClass("node-cell").attr("colspan", 2);
- var $childNodes = $node.children("ul:first").children("li");
- var $nodeDiv;
-
- if($childNodes.length > 1) {
- $nodeCell.attr("colspan", $childNodes.length * 2);
- }
- // Draw the node
- // Get the contents - any markup except li and ul allowed
- var $nodeContent = $node.clone()
- .children("ul,li")
- .remove()
- .end()
- .html();
-
- var new_node_id = $node.attr("id");
- if (typeof new_node_id !== 'undefined' && new_node_id !== false) {
- $nodeDiv = $("<div>").addClass("node").attr("id", $node.attr("id")).append($nodeContent);
- }else{
- $nodeDiv = $("<div>").addClass("node").append($nodeContent);
- }
-
- // Expand and contract nodes
- if ($childNodes.length > 0) {
- $nodeDiv.click(function() {
- var $this = $(this);
- var $tr = $this.closest("tr");
-
- if($tr.hasClass('contracted')){
- $this.css('cursor','n-resize');
- $tr.removeClass('contracted').addClass('expanded');
- $tr.nextAll("tr").css('visibility', '');
- }else{
- $this.css('cursor','s-resize');
- $tr.removeClass('expanded').addClass('contracted');
- $tr.nextAll("tr").css('visibility', 'hidden');
- }
- });
- }
-
- $nodeCell.append($nodeDiv);
- $nodeRow.append($nodeCell);
- $tbody.append($nodeRow);
-
- if($childNodes.length > 0) {
- // if it can be expanded then change the cursor
- $nodeDiv.css('cursor','n-resize').addClass('expanded');
-
- // recurse until leaves found (-1) or to the level specified
- if(opts.depth == -1 || (level+1 < opts.depth)) {
- var $downLineRow = $("<tr/>");
- var $downLineCell = $("<td/>").attr("colspan", $childNodes.length*2);
- $downLineRow.append($downLineCell);
-
- // draw the connecting line from the parent node to the horizontal line
- $downLine = $("<div></div>").addClass("line down");
- $downLineCell.append($downLine);
- $tbody.append($downLineRow);
-
- // Draw the horizontal lines
- var $linesRow = $("<tr/>");
- $childNodes.each(function() {
- var $left = $("<td>&nbsp;</td>").addClass("line left top");
- var $right = $("<td>&nbsp;</td>").addClass("line right top");
- $linesRow.append($left).append($right);
- });
-
- // horizontal line shouldn't extend beyond the first and last child branches
- $linesRow.find("td:first")
- .removeClass("top")
- .end()
- .find("td:last")
- .removeClass("top");
-
- $tbody.append($linesRow);
- var $childNodesRow = $("<tr/>");
- $childNodes.each(function() {
- var $td = $("<td class='node-container'/>");
- $td.attr("colspan", 2);
- // recurse through children lists and items
- buildNode($(this), $td, level+1, opts);
- $childNodesRow.append($td);
- });
-
- }
- $tbody.append($childNodesRow);
- }
-
- // any classes on the LI element get copied to the relevant node in the tree
- // apart from the special 'collapsed' class, which collapses the sub-tree at this point
- if ($node.attr('class') != undefined) {
- var classList = $node.attr('class').split(/\s+/);
- $.each(classList, function(index,item) {
- if (item == 'collapsed') {
- $nodeRow.nextAll('tr').css('display', 'none');
- $nodeRow.removeClass('expanded');
- $nodeRow.addClass('contracted');
- $nodeDiv.css('cursor','s-resize');
- } else {
- $nodeDiv.addClass(item);
- }
- });
- }
-
- $table.append($tbody);
- $appendTo.append($table);
-
- /* Prevent trees collapsing if a link inside a node is clicked */
- $nodeDiv.children('a').click(function(e){
- console.log(e);
- e.stopPropagation();
- });
- };
-
-})(jQuery);
diff --git a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/prettify.js b/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/prettify.js
deleted file mode 100644
index eef5ad7e..00000000
--- a/usecaseui-common/src/main/webapp/static/fusion/sample/org_chart/prettify.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
-(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
-[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
-f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
-(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
-{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
-t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
-"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
-l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
-q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
-q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
-"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
-a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
-for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
-m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
-a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
-j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
-"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
-H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
-J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
-I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
-["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
-/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
-["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
-hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
-!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
-250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
-PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/usecaseui-common/src/main/webapp/static/js/jquery-1.10.2.js b/usecaseui-common/src/main/webapp/static/js/jquery-1.10.2.js
deleted file mode 100644
index c5c64825..00000000
--- a/usecaseui-common/src/main/webapp/static/js/jquery-1.10.2.js
+++ /dev/null
@@ -1,9789 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.10.2
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03T13:48Z
- */
-(function( window, undefined ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//"use strict";
-var
- // The deferred used on DOM ready
- readyList,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // Support: IE<10
- // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
- core_strundefined = typeof undefined,
-
- // Use the correct document accordingly with window argument (sandbox)
- location = window.location,
- document = window.document,
- docElem = document.documentElement,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.10.2",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler
- completed = function( event ) {
-
- // readyState === "complete" is good enough for us to call the dom ready in oldIE
- if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
- detach();
- jQuery.ready();
- }
- },
- // Clean-up method for dom ready events
- detach = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
-
- } else {
- document.detachEvent( "onreadystatechange", completed );
- window.detachEvent( "onload", completed );
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var src, copyIsArray, copy, name, options, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- /* jshint eqeqeq: false */
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Support: IE<9
- // Handle iteration over inherited properties before own properties.
- if ( jQuery.support.ownLast ) {
- for ( key in obj ) {
- return core_hasOwn.call( obj, key );
- }
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var args, proxy, tmp;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- },
-
- // A method for quickly swapping in/out CSS properties to get correct calculations.
- // Note: this method belongs to the css module but it's needed here for the support module.
- // If support gets modularized, this method should be moved back to the css module.
- swap: function( elem, options, callback, args ) {
- var ret, name,
- old = {};
-
- // Remember the old values, and insert the new ones
- for ( name in options ) {
- old[ name ] = elem.style[ name ];
- elem.style[ name ] = options[ name ];
- }
-
- ret = callback.apply( elem, args || [] );
-
- // Revert the old values
- for ( name in options ) {
- elem.style[ name ] = old[ name ];
- }
-
- return ret;
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", completed );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", completed );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // detach all dom ready events
- detach();
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-/*!
- * Sizzle CSS Selector Engine v1.10.2
- * http://sizzlejs.com/
- *
- * Copyright 2013 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-07-03
- */
-(function( window, undefined ) {
-
-var i,
- support,
- cachedruns,
- Expr,
- getText,
- isXML,
- compile,
- outermostContext,
- sortInput,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + -(new Date()),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- hasDuplicate = false,
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
- return 0;
- },
-
- // General-purpose constants
- strundefined = typeof undefined,
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf if we can't use a native one
- indexOf = arr.indexOf || function( elem ) {
- var i = 0,
- len = this.length;
- for ( ; i < len; i++ ) {
- if ( this[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
- // http://www.w3.org/TR/css3-syntax/#characters
- characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Loosely modeled on CSS identifier characters
- // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
- // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = characterEncoding.replace( "w", "w#" ),
-
- // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
- "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
-
- // Prefer arguments quoted,
- // then not containing pseudos/brackets,
- // then attribute selectors/non-parenthetical expressions,
- // then anything else
- // These preferences are here to reduce the number of selectors
- // needing tokenize in the PSEUDO preFilter
- pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rsibling = new RegExp( whitespace + "*[+~]" ),
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + characterEncoding + ")" ),
- "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
- "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- // BMP codepoint
- high < 0 ?
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var match, elem, m, nodeType,
- // QSA vars
- i, groups, old, nid, newContext, newSelector;
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
-
- context = context || document;
- results = results || [];
-
- if ( !selector || typeof selector !== "string" ) {
- return results;
- }
-
- if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
- return [];
- }
-
- if ( documentIsHTML && !seed ) {
-
- // Shortcuts
- if ( (match = rquickExpr.exec( selector )) ) {
- // Speed-up: Sizzle("#ID")
- if ( (m = match[1]) ) {
- if ( nodeType === 9 ) {
- elem = context.getElementById( m );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE, Opera, and Webkit return items
- // by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
- } else {
- // Context is not a document
- if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
- contains( context, elem ) && elem.id === m ) {
- results.push( elem );
- return results;
- }
- }
-
- // Speed-up: Sizzle("TAG")
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Speed-up: Sizzle(".CLASS")
- } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // QSA path
- if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
- nid = old = expando;
- newContext = context;
- newSelector = nodeType === 9 && selector;
-
- // qSA works strangely on Element-rooted queries
- // We can work around this by specifying an extra ID on the root
- // and working up from there (Thanks to Andrew Dupont for the technique)
- // IE 8 doesn't work on object elements
- if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
- groups = tokenize( selector );
-
- if ( (old = context.getAttribute("id")) ) {
- nid = old.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", nid );
- }
- nid = "[id='" + nid + "'] ";
-
- i = groups.length;
- while ( i-- ) {
- groups[i] = nid + toSelector( groups[i] );
- }
- newContext = rsibling.test( selector ) && context.parentNode || context;
- newSelector = groups.join(",");
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch(qsaError) {
- } finally {
- if ( !old ) {
- context.removeAttribute("id");
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key += " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = attrs.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Detect xml
- * @param {Element|Object} elem An element or a document
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var doc = node ? node.ownerDocument || node : preferredDoc,
- parent = doc.defaultView;
-
- // If no document and documentElement is available, return
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Set our document
- document = doc;
- docElem = doc.documentElement;
-
- // Support tests
- documentIsHTML = !isXML( doc );
-
- // Support: IE>8
- // If iframe document is assigned to "document" variable and if iframe has been reloaded,
- // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
- // IE6-8 do not support the defaultView property so parent will be undefined
- if ( parent && parent.attachEvent && parent !== parent.top ) {
- parent.attachEvent( "onbeforeunload", function() {
- setDocument();
- });
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( doc.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Check if getElementsByClassName can be trusted
- support.getElementsByClassName = assert(function( div ) {
- div.innerHTML = "<div class='a'></div><div class='a i'></div>";
-
- // Support: Safari<4
- // Catch class over-caching
- div.firstChild.className = "i";
- // Support: Opera<10
- // Catch gEBCN failure to find non-leading classes
- return div.getElementsByClassName("i").length === 2;
- });
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
- var m = context.getElementById( id );
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- return m && m.parentNode ? [m] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== strundefined ) {
- return context.getElementsByTagName( tag );
- }
- } :
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- div.innerHTML = "<select><option selected=''></option></select>";
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
- });
-
- assert(function( div ) {
-
- // Support: Opera 10-12/IE8
- // ^= $= *= and empty values
- // Should not select anything
- // Support: Windows 8 Native Apps
- // The type attribute is restricted during .innerHTML assignment
- var input = doc.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "t", "" );
-
- if ( div.querySelectorAll("[t^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
-
- // Element contains another
- // Purposefully does not implement inclusive descendent
- // As in, an element does not contain itself
- contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = docElem.compareDocumentPosition ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
-
- if ( compare ) {
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === doc || contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === doc || contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- }
-
- // Not directly comparable, sort on existence of method
- return a.compareDocumentPosition ? -1 : 1;
- } :
- function( a, b ) {
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
-
- // Parentless nodes are either documents or disconnected
- } else if ( !aup || !bup ) {
- return a === doc ? -1 :
- b === doc ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return doc;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch(e) {}
- }
-
- return Sizzle( expr, document, null, [elem] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val === undefined ?
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null :
- val;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- for ( ; (node = elem[i]); i++ ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (see #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[5] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] && match[4] !== undefined ) {
- match[2] = match[4];
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, outerCache, node, diff, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
- // Seek `elem` from a previously-cached index
- outerCache = parent[ expando ] || (parent[ expando ] = {});
- cache = outerCache[ type ] || [];
- nodeIndex = cache[0] === dirruns && cache[1];
- diff = cache[0] === dirruns && cache[2];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- outerCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- // Use previously-cached element index if available
- } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
- diff = cache[1];
-
- // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
- } else {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
- // Cache the index of each encountered element
- if ( useCache ) {
- (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf.call( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
- // not comment, processing instructions, or others
- // Thanks to Diego Perini for the nodeName shortcut
- // Greater than "@" means alpha characters (specifically not starting with "#" or "?")
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
- // use getAttribute instead to test this case
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-function tokenize( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( tokens = [] );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-}
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var data, cache, outerCache,
- dirkey = dirruns + " " + doneName;
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
- if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
- if ( (data = cache[1]) === true || data === cachedruns ) {
- return data === true;
- }
- } else {
- cache = outerCache[ dir ] = [ dirkey ];
- cache[1] = matcher( elem, context, xml ) || cachedruns;
- if ( cache[1] === true ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf.call( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- // A counter to specify which element is currently being matched
- var matcherCachedRuns = 0,
- bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, expandContext ) {
- var elem, j, matcher,
- setMatched = [],
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- outermost = expandContext != null,
- contextBackup = outermostContext,
- // We must always have either seed elements or context
- elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
-
- if ( outermost ) {
- outermostContext = context !== document && context;
- cachedruns = matcherCachedRuns;
- }
-
- // Add elements passing elementMatchers directly to results
- // Keep `i` a string if there are no elements so `matchedCount` will be "00" below
- for ( ; (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context, xml ) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- cachedruns = ++matcherCachedRuns;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // Apply set filters to unmatched elements
- matchedCount += i;
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !group ) {
- group = tokenize( selector );
- }
- i = group.length;
- while ( i-- ) {
- cached = matcherFromTokens( group[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
- }
- return cached;
-};
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function select( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- match = tokenize( selector );
-
- if ( !seed ) {
- // Try to minimize operations if there is only one group
- if ( match.length === 1 ) {
-
- // Take a shortcut and set the context if the root selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
- }
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && context.parentNode || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
- }
-
- // Compile and execute a filtering function
- // Provide `match` to avoid retokenization if we modified the selector above
- compile( selector, match )(
- seed,
- context,
- !documentIsHTML,
- results,
- rsibling.test( selector )
- );
- return results;
-}
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome<14
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "<a href='#'></a>";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "<input/>";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- elem[ name ] === true ? name.toLowerCase() : null;
- }
- });
-}
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[":"] = jQuery.expr.pseudos;
-jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-})( window );
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- firingLength = 0;
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( list && ( !fired || stack ) ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function( support ) {
-
- var all, a, input, select, fragment, opt, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
-
- // Finish early in limited (non-browser) environments
- all = div.getElementsByTagName("*") || [];
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !a || !a.style || !all.length ) {
- return support;
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
-
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- support.getSetAttribute = div.className !== "t";
-
- // IE strips leading whitespace when .innerHTML is used
- support.leadingWhitespace = div.firstChild.nodeType === 3;
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- support.tbody = !div.getElementsByTagName("tbody").length;
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- support.htmlSerialize = !!div.getElementsByTagName("link").length;
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- support.style = /top/.test( a.getAttribute("style") );
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- support.hrefNormalized = a.getAttribute("href") === "/a";
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- support.opacity = /^0.5/.test( a.style.opacity );
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- support.cssFloat = !!a.style.cssFloat;
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- support.checkOn = !!input.value;
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- support.optSelected = opt.selected;
-
- // Tests for enctype support on a form (#6743)
- support.enctype = !!document.createElement("form").enctype;
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
-
- // Will be defined later
- support.inlineBlockNeedsLayout = false;
- support.shrinkWrapBlocks = false;
- support.pixelPosition = false;
- support.deleteExpando = true;
- support.noCloneEvent = true;
- support.reliableMarginRight = true;
- support.boxSizingReliable = true;
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Support: IE<9
- // Iteration over object's inherited properties before its own.
- for ( i in jQuery( support ) ) {
- break;
- }
- support.ownLast = i !== "0";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior.
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
-
- // Workaround failing boxSizing test due to offsetWidth returning wrong value
- // with some non-1 values of body zoom, ticket #13543
- jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
- support.boxSizing = div.offsetWidth === 4;
- });
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== core_strundefined ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "<div></div>";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- if ( support.inlineBlockNeedsLayout ) {
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- // Support: IE<8
- body.style.zoom = 1;
- }
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})({});
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var ret, thisCache,
- internalKey = jQuery.expando,
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- // Avoid exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( typeof name === "string" ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, i,
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- i = name.length;
- while ( i-- ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- /* jshint eqeqeq: false */
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- /* jshint eqeqeq: true */
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "applet": true,
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- // Do not set data on non-element because it will not be cleared (#8335).
- if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
- return false;
- }
-
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- data = null,
- i = 0,
- elem = this[0];
-
- // Special expections of .data basically thwart jQuery.access,
- // so implement the relevant behavior ourselves
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( name.indexOf("data-") === 0 ) {
- name = jQuery.camelCase( name.slice(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return arguments.length > 1 ?
-
- // Sets one value
- this.each(function() {
- jQuery.data( this, key, value );
- }) :
-
- // Gets one value
- // Try to fetch any internally stored data first
- elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n\f]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value;
-
- if ( typeof stateVal === "boolean" && type === "string" ) {
- return stateVal ? this.addClass( value ) : this.removeClass( value );
- }
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- if ( self.hasClass( className ) ) {
- self.removeClass( className );
- } else {
- self.addClass( className );
- }
- }
-
- // Toggle whole class name
- } else if ( type === core_strundefined || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var ret, hooks, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val;
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, jQuery( this ).val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // Use proper attribute retrieval(#6932, #12072)
- var val = jQuery.find.attr( elem, "value" );
- return val != null ?
- val :
- elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var optionSet, option,
- options = elem.options,
- values = jQuery.makeArray( value ),
- i = options.length;
-
- while ( i-- ) {
- option = options[ i ];
- if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
- optionSet = true;
- }
- }
-
- // force browsers to behave consistently when non-matching value is set
- if ( !optionSet ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var hooks, ret,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === core_strundefined ) {
- return jQuery.prop( elem, name, value );
- }
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] ||
- ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- ret = jQuery.find.attr( elem, name );
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
- // Set corresponding property to false
- if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- elem[ propName ] = false;
- // Support: IE<9
- // Also clear defaultChecked/defaultSelected (if appropriate)
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- "for": "htmlFor",
- "class": "className"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
- ret :
- ( elem[ name ] = value );
-
- } else {
- return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
- ret :
- elem[ name ];
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- // Use proper attribute retrieval(#12072)
- var tabindex = jQuery.find.attr( elem, "tabindex" );
-
- return tabindex ?
- parseInt( tabindex, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- -1;
- }
- }
- }
-});
-
-// Hooks for boolean attributes
-boolHook = {
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
- var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
-
- jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
- function( elem, name, isXML ) {
- var fn = jQuery.expr.attrHandle[ name ],
- ret = isXML ?
- undefined :
- /* jshint eqeqeq: false */
- (jQuery.expr.attrHandle[ name ] = undefined) !=
- getter( elem, name, isXML ) ?
-
- name.toLowerCase() :
- null;
- jQuery.expr.attrHandle[ name ] = fn;
- return ret;
- } :
- function( elem, name, isXML ) {
- return isXML ?
- undefined :
- elem[ jQuery.camelCase( "default-" + name ) ] ?
- name.toLowerCase() :
- null;
- };
-});
-
-// fix oldIE attroperties
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = {
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
- jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
- // Some attributes are constructed with empty-string values when not defined
- function( elem, name, isXML ) {
- var ret;
- return isXML ?
- undefined :
- (ret = elem.getAttributeNode( name )) && ret.value !== "" ?
- ret.value :
- null;
- };
- jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ret.specified ?
- ret.value :
- undefined;
- },
- set: nodeHook.set
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- };
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- };
-}
-
-jQuery.each([
- "tabIndex",
- "readOnly",
- "maxLength",
- "cellSpacing",
- "cellPadding",
- "rowSpan",
- "colSpan",
- "useMap",
- "frameBorder",
- "contentEditable"
-], function() {
- jQuery.propFix[ this.toLowerCase() ] = this;
-});
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- };
- if ( !jQuery.support.checkOn ) {
- jQuery.valHooks[ this ].get = function( elem ) {
- // Support: Webkit
- // "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- };
- }
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
- var tmp, events, t, handleObjIn,
- special, eventHandle, handleObj,
- handlers, type, namespaces, origType,
- elemData = jQuery._data( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
- var j, handleObj, tmp,
- origCount, t, events,
- special, handlers, type,
- namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- var handle, ontype, cur,
- bubbleType, special, tmp, i,
- eventPath = [ elem || document ],
- type = core_hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
- event.isTrigger = onlyHandlers ? 2 : 3;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
- jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, ret, handleObj, matched, j,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var sel, handleObj, matches, i,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG <use> instance trees (#13180)
- // Avoid non-left-click bubbling in Firefox (#3861)
- if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
-
- /* jshint eqeqeq: false */
- for ( ; cur != this; cur = cur.parentNode || this ) {
- /* jshint eqeqeq: true */
-
- // Don't check non-elements (#13208)
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) >= 0 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push({ elem: cur, handlers: matches });
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
- }
-
- return handlerQueue;
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: IE<9
- // Fix target property (#1925)
- if ( !event.target ) {
- event.target = originalEvent.srcElement || document;
- }
-
- // Support: Chrome 23+, Safari?
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- // Support: IE<9
- // For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
- event.metaKey = !!event.metaKey;
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split(" "),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
- filter: function( event, original ) {
- var body, eventDoc, doc,
- button = original.button,
- fromElement = original.fromElement;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add relatedTarget, if necessary
- if ( !event.relatedTarget && fromElement ) {
- event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- special: {
- load: {
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- try {
- this.focus();
- return false;
- } catch ( e ) {
- // Support: IE<9
- // If we error on focus to hidden element (#1486, #12518),
- // let .trigger() run the handlers
- }
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Even when returnValue equals to undefined Firefox will still show alert
- if ( event.result !== undefined ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- },
-
- simulate: function( type, elem, event, bubble ) {
- // Piggyback on a donor event to simulate a different one.
- // Fake originalEvent to avoid donor's stopPropagation, but if the
- // simulated event prevents default then we do the same on the donor.
- var e = jQuery.extend(
- new jQuery.Event(),
- event,
- {
- type: type,
- isSimulated: true,
- originalEvent: {}
- }
- );
- if ( bubble ) {
- jQuery.event.trigger( e, null, elem );
- } else {
- jQuery.event.dispatch.call( elem, e );
- }
- if ( e.isDefaultPrevented() ) {
- event.preventDefault();
- }
- }
-};
-
-jQuery.removeEvent = document.removeEventListener ?
- function( elem, type, handle ) {
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle, false );
- }
- } :
- function( elem, type, handle ) {
- var name = "on" + type;
-
- if ( elem.detachEvent ) {
-
- // #8545, #7054, preventing memory leaks for custom events in IE6-8
- // detachEvent needed property on element, by name of that event, to properly expose it to GC
- if ( typeof elem[ name ] === core_strundefined ) {
- elem[ name ] = null;
- }
-
- elem.detachEvent( name, handle );
- }
- };
-
-jQuery.Event = function( src, props ) {
- // Allow instantiation without the 'new' keyword
- if ( !(this instanceof jQuery.Event) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
- src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
- if ( !e ) {
- return;
- }
-
- // If preventDefault exists, run it on the original event
- if ( e.preventDefault ) {
- e.preventDefault();
-
- // Support: IE
- // Otherwise set the returnValue property of the original event to false
- } else {
- e.returnValue = false;
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
- if ( !e ) {
- return;
- }
- // If stopPropagation exists, run it on the original event
- if ( e.stopPropagation ) {
- e.stopPropagation();
- }
-
- // Support: IE
- // Set the cancelBubble property of the original event to true
- e.cancelBubble = true;
- },
- stopImmediatePropagation: function() {
- this.isImmediatePropagationStopped = returnTrue;
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-jQuery.each({
- mouseenter: "mouseover",
- mouseleave: "mouseout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mousenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-});
-
-// IE submit delegation
-if ( !jQuery.support.submitBubbles ) {
-
- jQuery.event.special.submit = {
- setup: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Lazy-add a submit handler when a descendant form may potentially be submitted
- jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
- // Node name check avoids a VML-related crash in IE (#9807)
- var elem = e.target,
- form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
- if ( form && !jQuery._data( form, "submitBubbles" ) ) {
- jQuery.event.add( form, "submit._submit", function( event ) {
- event._submit_bubble = true;
- });
- jQuery._data( form, "submitBubbles", true );
- }
- });
- // return undefined since we don't need an event listener
- },
-
- postDispatch: function( event ) {
- // If form was submitted by the user, bubble the event up the tree
- if ( event._submit_bubble ) {
- delete event._submit_bubble;
- if ( this.parentNode && !event.isTrigger ) {
- jQuery.event.simulate( "submit", this.parentNode, event, true );
- }
- }
- },
-
- teardown: function() {
- // Only need this for delegated form submit events
- if ( jQuery.nodeName( this, "form" ) ) {
- return false;
- }
-
- // Remove delegated handlers; cleanData eventually reaps submit handlers attached above
- jQuery.event.remove( this, "._submit" );
- }
- };
-}
-
-// IE change delegation and checkbox/radio fix
-if ( !jQuery.support.changeBubbles ) {
-
- jQuery.event.special.change = {
-
- setup: function() {
-
- if ( rformElems.test( this.nodeName ) ) {
- // IE doesn't fire change on a check/radio until blur; trigger it on click
- // after a propertychange. Eat the blur-change in special.change.handle.
- // This still fires onchange a second time for check/radio after blur.
- if ( this.type === "checkbox" || this.type === "radio" ) {
- jQuery.event.add( this, "propertychange._change", function( event ) {
- if ( event.originalEvent.propertyName === "checked" ) {
- this._just_changed = true;
- }
- });
- jQuery.event.add( this, "click._change", function( event ) {
- if ( this._just_changed && !event.isTrigger ) {
- this._just_changed = false;
- }
- // Allow triggered, simulated change events (#11500)
- jQuery.event.simulate( "change", this, event, true );
- });
- }
- return false;
- }
- // Delegated event; lazy-add a change handler on descendant inputs
- jQuery.event.add( this, "beforeactivate._change", function( e ) {
- var elem = e.target;
-
- if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
- jQuery.event.add( elem, "change._change", function( event ) {
- if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
- jQuery.event.simulate( "change", this.parentNode, event, true );
- }
- });
- jQuery._data( elem, "changeBubbles", true );
- }
- });
- },
-
- handle: function( event ) {
- var elem = event.target;
-
- // Swallow native change events from checkbox/radio, we already triggered them above
- if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
- return event.handleObj.handler.apply( this, arguments );
- }
- },
-
- teardown: function() {
- jQuery.event.remove( this, "._change" );
-
- return !rformElems.test( this.nodeName );
- }
- };
-}
-
-// Create "bubbling" focus and blur events
-if ( !jQuery.support.focusinBubbles ) {
- jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
- // Attach a single capturing handler while someone wants focusin/focusout
- var attaches = 0,
- handler = function( event ) {
- jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
- };
-
- jQuery.event.special[ fix ] = {
- setup: function() {
- if ( attaches++ === 0 ) {
- document.addEventListener( orig, handler, true );
- }
- },
- teardown: function() {
- if ( --attaches === 0 ) {
- document.removeEventListener( orig, handler, true );
- }
- }
- };
- });
-}
-
-jQuery.fn.extend({
-
- on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
- var type, origFn;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- this.on( type, selector, data, types[ type ], one );
- }
- return this;
- }
-
- if ( data == null && fn == null ) {
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return this.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- });
- },
- one: function( types, selector, data, fn ) {
- return this.on( types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each(function() {
- jQuery.event.remove( this, types, fn, selector );
- });
- },
-
- trigger: function( type, data ) {
- return this.each(function() {
- jQuery.event.trigger( type, data, this );
- });
- },
- triggerHandler: function( type, data ) {
- var elem = this[0];
- if ( elem ) {
- return jQuery.event.trigger( type, data, elem, true );
- }
- }
-});
-var isSimple = /^.[^:#\[\.,]*$/,
- rparentsprev = /^(?:parents|prev(?:Until|All))/,
- rneedsContext = jQuery.expr.match.needsContext,
- // methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend({
- find: function( selector ) {
- var i,
- ret = [],
- self = this,
- len = self.length;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- }) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
-
- has: function( target ) {
- var i,
- targets = jQuery( target, this ),
- len = targets.length;
-
- return this.filter(function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( this, targets[i] ) ) {
- return true;
- }
- }
- });
- },
-
- not: function( selector ) {
- return this.pushStack( winnow(this, selector || [], true) );
- },
-
- filter: function( selector ) {
- return this.pushStack( winnow(this, selector || [], false) );
- },
-
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- ret = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
- // Always skip document fragments
- if ( cur.nodeType < 11 && (pos ?
- pos.index(cur) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector(cur, selectors)) ) {
-
- cur = ret.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
- },
-
- // Determine the position of an element within
- // the matched set of elements
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // index in selector
- if ( typeof elem === "string" ) {
- return jQuery.inArray( this[0], jQuery( elem ) );
- }
-
- // Locate the position of the desired element
- return jQuery.inArray(
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[0] : elem, this );
- },
-
- add: function( selector, context ) {
- var set = typeof selector === "string" ?
- jQuery( selector, context ) :
- jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
- all = jQuery.merge( this.get(), set );
-
- return this.pushStack( jQuery.unique(all) );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter(selector)
- );
- }
-});
-
-function sibling( cur, dir ) {
- do {
- cur = cur[ dir ];
- } while ( cur && cur.nodeType !== 1 );
-
- return cur;
-}
-
-jQuery.each({
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return jQuery.dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return jQuery.dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return jQuery.dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return jQuery.dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return jQuery.sibling( elem.firstChild );
- },
- contents: function( elem ) {
- return jQuery.nodeName( elem, "iframe" ) ?
- elem.contentDocument || elem.contentWindow.document :
- jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var ret = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- ret = jQuery.filter( selector, ret );
- }
-
- if ( this.length > 1 ) {
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- ret = jQuery.unique( ret );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- ret = ret.reverse();
- }
- }
-
- return this.pushStack( ret );
- };
-});
-
-jQuery.extend({
- filter: function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- }));
- },
-
- dir: function( elem, dir, until ) {
- var matched = [],
- cur = elem[ dir ];
-
- while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
- if ( cur.nodeType === 1 ) {
- matched.push( cur );
- }
- cur = cur[dir];
- }
- return matched;
- },
-
- sibling: function( n, elem ) {
- var r = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- r.push( n );
- }
- }
-
- return r;
- }
-});
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- });
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- });
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( isSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
- });
-}
-function createSafeFragment( document ) {
- var list = nodeNames.split( "|" ),
- safeFrag = document.createDocumentFragment();
-
- if ( safeFrag.createElement ) {
- while ( list.length ) {
- safeFrag.createElement(
- list.pop()
- );
- }
- }
- return safeFrag;
-}
-
-var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
- "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
- rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
- rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
- rleadingWhitespace = /^\s+/,
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
- rtagName = /<([\w:]+)/,
- rtbody = /<tbody/i,
- rhtml = /<|&#?\w+;/,
- rnoInnerhtml = /<(?:script|style|link)/i,
- manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
- // checked="checked" or checked
- rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
- rscriptType = /^$|\/(?:java|ecma)script/i,
- rscriptTypeMasked = /^true\/(.*)/,
- rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
-
- // We have to close these tags to support XHTML (#13200)
- wrapMap = {
- option: [ 1, "<select multiple='multiple'>", "</select>" ],
- legend: [ 1, "<fieldset>", "</fieldset>" ],
- area: [ 1, "<map>", "</map>" ],
- param: [ 1, "<object>", "</object>" ],
- thead: [ 1, "<table>", "</table>" ],
- tr: [ 2, "<table><tbody>", "</tbody></table>" ],
- col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
- td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
-
- // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
- // unless wrapped in a div with non-breaking characters in front of it.
- _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ]
- },
- safeFragment = createSafeFragment( document ),
- fragmentDiv = safeFragment.appendChild( document.createElement("div") );
-
-wrapMap.optgroup = wrapMap.option;
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-jQuery.fn.extend({
- text: function( value ) {
- return jQuery.access( this, function( value ) {
- return value === undefined ?
- jQuery.text( this ) :
- this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
- }, null, value, arguments.length );
- },
-
- append: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.appendChild( elem );
- }
- });
- },
-
- prepend: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
- var target = manipulationTarget( this, elem );
- target.insertBefore( elem, target.firstChild );
- }
- });
- },
-
- before: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this );
- }
- });
- },
-
- after: function() {
- return this.domManip( arguments, function( elem ) {
- if ( this.parentNode ) {
- this.parentNode.insertBefore( elem, this.nextSibling );
- }
- });
- },
-
- // keepData is for internal use only--do not document
- remove: function( selector, keepData ) {
- var elem,
- elems = selector ? jQuery.filter( selector, this ) : this,
- i = 0;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( !keepData && elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem ) );
- }
-
- if ( elem.parentNode ) {
- if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
- setGlobalEval( getAll( elem, "script" ) );
- }
- elem.parentNode.removeChild( elem );
- }
- }
-
- return this;
- },
-
- empty: function() {
- var elem,
- i = 0;
-
- for ( ; (elem = this[i]) != null; i++ ) {
- // Remove element nodes and prevent memory leaks
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- }
-
- // Remove any remaining nodes
- while ( elem.firstChild ) {
- elem.removeChild( elem.firstChild );
- }
-
- // If this is a select, ensure that it displays empty (#12336)
- // Support: IE<9
- if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
- elem.options.length = 0;
- }
- }
-
- return this;
- },
-
- clone: function( dataAndEvents, deepDataAndEvents ) {
- dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
- deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
-
- return this.map( function () {
- return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
- });
- },
-
- html: function( value ) {
- return jQuery.access( this, function( value ) {
- var elem = this[0] || {},
- i = 0,
- l = this.length;
-
- if ( value === undefined ) {
- return elem.nodeType === 1 ?
- elem.innerHTML.replace( rinlinejQuery, "" ) :
- undefined;
- }
-
- // See if we can take a shortcut and just use innerHTML
- if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
- ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) &&
- ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
- !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
-
- value = value.replace( rxhtmlTag, "<$1></$2>" );
-
- try {
- for (; i < l; i++ ) {
- // Remove element nodes and prevent memory leaks
- elem = this[i] || {};
- if ( elem.nodeType === 1 ) {
- jQuery.cleanData( getAll( elem, false ) );
- elem.innerHTML = value;
- }
- }
-
- elem = 0;
-
- // If using innerHTML throws an exception, use the fallback method
- } catch(e) {}
- }
-
- if ( elem ) {
- this.empty().append( value );
- }
- }, null, value, arguments.length );
- },
-
- replaceWith: function() {
- var
- // Snapshot the DOM in case .domManip sweeps something relevant into its fragment
- args = jQuery.map( this, function( elem ) {
- return [ elem.nextSibling, elem.parentNode ];
- }),
- i = 0;
-
- // Make the changes, replacing each context element with the new content
- this.domManip( arguments, function( elem ) {
- var next = args[ i++ ],
- parent = args[ i++ ];
-
- if ( parent ) {
- // Don't use the snapshot next if it has moved (#13810)
- if ( next && next.parentNode !== parent ) {
- next = this.nextSibling;
- }
- jQuery( this ).remove();
- parent.insertBefore( elem, next );
- }
- // Allow new content to include elements from the context set
- }, true );
-
- // Force removal if there was no new content (e.g., from empty arguments)
- return i ? this : this.remove();
- },
-
- detach: function( selector ) {
- return this.remove( selector, true );
- },
-
- domManip: function( args, callback, allowIntersection ) {
-
- // Flatten any nested arrays
- args = core_concat.apply( [], args );
-
- var first, node, hasScripts,
- scripts, doc, fragment,
- i = 0,
- l = this.length,
- set = this,
- iNoClone = l - 1,
- value = args[0],
- isFunction = jQuery.isFunction( value );
-
- // We can't cloneNode fragments that contain checked, in WebKit
- if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
- return this.each(function( index ) {
- var self = set.eq( index );
- if ( isFunction ) {
- args[0] = value.call( this, index, self.html() );
- }
- self.domManip( args, callback, allowIntersection );
- });
- }
-
- if ( l ) {
- fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
- first = fragment.firstChild;
-
- if ( fragment.childNodes.length === 1 ) {
- fragment = first;
- }
-
- if ( first ) {
- scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
- hasScripts = scripts.length;
-
- // Use the original fragment for the last item instead of the first because it can end up
- // being emptied incorrectly in certain situations (#8070).
- for ( ; i < l; i++ ) {
- node = fragment;
-
- if ( i !== iNoClone ) {
- node = jQuery.clone( node, true, true );
-
- // Keep references to cloned scripts for later restoration
- if ( hasScripts ) {
- jQuery.merge( scripts, getAll( node, "script" ) );
- }
- }
-
- callback.call( this[i], node, i );
- }
-
- if ( hasScripts ) {
- doc = scripts[ scripts.length - 1 ].ownerDocument;
-
- // Reenable scripts
- jQuery.map( scripts, restoreScript );
-
- // Evaluate executable scripts on first document insertion
- for ( i = 0; i < hasScripts; i++ ) {
- node = scripts[ i ];
- if ( rscriptType.test( node.type || "" ) &&
- !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
-
- if ( node.src ) {
- // Hope ajax is available...
- jQuery._evalUrl( node.src );
- } else {
- jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
- }
- }
- }
- }
-
- // Fix #11809: Avoid leaking memory
- fragment = first = null;
- }
- }
-
- return this;
- }
-});
-
-// Support: IE<8
-// Manipulating tables requires a tbody
-function manipulationTarget( elem, content ) {
- return jQuery.nodeName( elem, "table" ) &&
- jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
-
- elem.getElementsByTagName("tbody")[0] ||
- elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
- elem;
-}
-
-// Replace/restore the type attribute of script elements for safe DOM manipulation
-function disableScript( elem ) {
- elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
- return elem;
-}
-function restoreScript( elem ) {
- var match = rscriptTypeMasked.exec( elem.type );
- if ( match ) {
- elem.type = match[1];
- } else {
- elem.removeAttribute("type");
- }
- return elem;
-}
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var elem,
- i = 0;
- for ( ; (elem = elems[i]) != null; i++ ) {
- jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
- }
-}
-
-function cloneCopyEvent( src, dest ) {
-
- if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
- return;
- }
-
- var type, i, l,
- oldData = jQuery._data( src ),
- curData = jQuery._data( dest, oldData ),
- events = oldData.events;
-
- if ( events ) {
- delete curData.handle;
- curData.events = {};
-
- for ( type in events ) {
- for ( i = 0, l = events[ type ].length; i < l; i++ ) {
- jQuery.event.add( dest, type, events[ type ][ i ] );
- }
- }
- }
-
- // make the cloned public data object a copy from the original
- if ( curData.data ) {
- curData.data = jQuery.extend( {}, curData.data );
- }
-}
-
-function fixCloneNodeIssues( src, dest ) {
- var nodeName, e, data;
-
- // We do not need to do anything for non-Elements
- if ( dest.nodeType !== 1 ) {
- return;
- }
-
- nodeName = dest.nodeName.toLowerCase();
-
- // IE6-8 copies events bound via attachEvent when using cloneNode.
- if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
- data = jQuery._data( dest );
-
- for ( e in data.events ) {
- jQuery.removeEvent( dest, e, data.handle );
- }
-
- // Event data gets referenced instead of copied if the expando gets copied too
- dest.removeAttribute( jQuery.expando );
- }
-
- // IE blanks contents when cloning scripts, and tries to evaluate newly-set text
- if ( nodeName === "script" && dest.text !== src.text ) {
- disableScript( dest ).text = src.text;
- restoreScript( dest );
-
- // IE6-10 improperly clones children of object elements using classid.
- // IE10 throws NoModificationAllowedError if parent is null, #12132.
- } else if ( nodeName === "object" ) {
- if ( dest.parentNode ) {
- dest.outerHTML = src.outerHTML;
- }
-
- // This path appears unavoidable for IE9. When cloning an object
- // element in IE9, the outerHTML strategy above is not sufficient.
- // If the src has innerHTML and the destination does not,
- // copy the src.innerHTML into the dest.innerHTML. #10324
- if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
- dest.innerHTML = src.innerHTML;
- }
-
- } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
- // IE6-8 fails to persist the checked state of a cloned checkbox
- // or radio button. Worse, IE6-7 fail to give the cloned element
- // a checked appearance if the defaultChecked value isn't also set
-
- dest.defaultChecked = dest.checked = src.checked;
-
- // IE6-7 get confused and end up setting the value of a cloned
- // checkbox/radio button to an empty string instead of "on"
- if ( dest.value !== src.value ) {
- dest.value = src.value;
- }
-
- // IE6-8 fails to return the selected option to the default selected
- // state when cloning options
- } else if ( nodeName === "option" ) {
- dest.defaultSelected = dest.selected = src.defaultSelected;
-
- // IE6-8 fails to set the defaultValue to the correct value when
- // cloning other types of input fields
- } else if ( nodeName === "input" || nodeName === "textarea" ) {
- dest.defaultValue = src.defaultValue;
- }
-}
-
-jQuery.each({
- appendTo: "append",
- prependTo: "prepend",
- insertBefore: "before",
- insertAfter: "after",
- replaceAll: "replaceWith"
-}, function( name, original ) {
- jQuery.fn[ name ] = function( selector ) {
- var elems,
- i = 0,
- ret = [],
- insert = jQuery( selector ),
- last = insert.length - 1;
-
- for ( ; i <= last; i++ ) {
- elems = i === last ? this : this.clone(true);
- jQuery( insert[i] )[ original ]( elems );
-
- // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
- core_push.apply( ret, elems.get() );
- }
-
- return this.pushStack( ret );
- };
-});
-
-function getAll( context, tag ) {
- var elems, elem,
- i = 0,
- found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
- undefined;
-
- if ( !found ) {
- for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
- if ( !tag || jQuery.nodeName( elem, tag ) ) {
- found.push( elem );
- } else {
- jQuery.merge( found, getAll( elem, tag ) );
- }
- }
- }
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], found ) :
- found;
-}
-
-// Used in buildFragment, fixes the defaultChecked property
-function fixDefaultChecked( elem ) {
- if ( manipulation_rcheckableType.test( elem.type ) ) {
- elem.defaultChecked = elem.checked;
- }
-}
-
-jQuery.extend({
- clone: function( elem, dataAndEvents, deepDataAndEvents ) {
- var destElements, node, clone, i, srcElements,
- inPage = jQuery.contains( elem.ownerDocument, elem );
-
- if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
- clone = elem.cloneNode( true );
-
- // IE<=8 does not properly clone detached, unknown element nodes
- } else {
- fragmentDiv.innerHTML = elem.outerHTML;
- fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
- }
-
- if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
- (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
-
- // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
- destElements = getAll( clone );
- srcElements = getAll( elem );
-
- // Fix all IE cloning issues
- for ( i = 0; (node = srcElements[i]) != null; ++i ) {
- // Ensure that the destination node is not null; Fixes #9587
- if ( destElements[i] ) {
- fixCloneNodeIssues( node, destElements[i] );
- }
- }
- }
-
- // Copy the events from the original to the clone
- if ( dataAndEvents ) {
- if ( deepDataAndEvents ) {
- srcElements = srcElements || getAll( elem );
- destElements = destElements || getAll( clone );
-
- for ( i = 0; (node = srcElements[i]) != null; i++ ) {
- cloneCopyEvent( node, destElements[i] );
- }
- } else {
- cloneCopyEvent( elem, clone );
- }
- }
-
- // Preserve script evaluation history
- destElements = getAll( clone, "script" );
- if ( destElements.length > 0 ) {
- setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
- }
-
- destElements = srcElements = node = null;
-
- // Return the cloned set
- return clone;
- },
-
- buildFragment: function( elems, context, scripts, selection ) {
- var j, elem, contains,
- tmp, tag, tbody, wrap,
- l = elems.length,
-
- // Ensure a safe fragment
- safe = createSafeFragment( context ),
-
- nodes = [],
- i = 0;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || safe.appendChild( context.createElement("div") );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
-
- tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
-
- // Descend through wrappers to the right content
- j = wrap[0];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Manually add leading whitespace removed by IE
- if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
- nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
- }
-
- // Remove IE's autoinserted <tbody> from table fragments
- if ( !jQuery.support.tbody ) {
-
- // String was a <table>, *may* have spurious <tbody>
- elem = tag === "table" && !rtbody.test( elem ) ?
- tmp.firstChild :
-
- // String was a bare <thead> or <tfoot>
- wrap[1] === "<table>" && !rtbody.test( elem ) ?
- tmp :
- 0;
-
- j = elem && elem.childNodes.length;
- while ( j-- ) {
- if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
- elem.removeChild( tbody );
- }
- }
- }
-
- jQuery.merge( nodes, tmp.childNodes );
-
- // Fix #12392 for WebKit and IE > 9
- tmp.textContent = "";
-
- // Fix #12392 for oldIE
- while ( tmp.firstChild ) {
- tmp.removeChild( tmp.firstChild );
- }
-
- // Remember the top-level container for proper cleanup
- tmp = safe.lastChild;
- }
- }
- }
-
- // Fix #11356: Clear elements from fragment
- if ( tmp ) {
- safe.removeChild( tmp );
- }
-
- // Reset defaultChecked for any radios and checkboxes
- // about to be appended to the DOM in IE 6/7 (#8060)
- if ( !jQuery.support.appendChecked ) {
- jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
- }
-
- i = 0;
- while ( (elem = nodes[ i++ ]) ) {
-
- // #4087 - If origin and destination elements are the same, and this is
- // that element, do not do anything
- if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( safe.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( (elem = tmp[ j++ ]) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- tmp = null;
-
- return safe;
- },
-
- cleanData: function( elems, /* internal */ acceptData ) {
- var elem, type, id, data,
- i = 0,
- internalKey = jQuery.expando,
- cache = jQuery.cache,
- deleteExpando = jQuery.support.deleteExpando,
- special = jQuery.event.special;
-
- for ( ; (elem = elems[i]) != null; i++ ) {
-
- if ( acceptData || jQuery.acceptData( elem ) ) {
-
- id = elem[ internalKey ];
- data = id && cache[ id ];
-
- if ( data ) {
- if ( data.events ) {
- for ( type in data.events ) {
- if ( special[ type ] ) {
- jQuery.event.remove( elem, type );
-
- // This is a shortcut to avoid jQuery.event.remove's overhead
- } else {
- jQuery.removeEvent( elem, type, data.handle );
- }
- }
- }
-
- // Remove cache only if it was not already removed by jQuery.event.remove
- if ( cache[ id ] ) {
-
- delete cache[ id ];
-
- // IE does not allow us to delete expando properties from nodes,
- // nor does it have a removeAttribute function on Document nodes;
- // we must handle all of these cases
- if ( deleteExpando ) {
- delete elem[ internalKey ];
-
- } else if ( typeof elem.removeAttribute !== core_strundefined ) {
- elem.removeAttribute( internalKey );
-
- } else {
- elem[ internalKey ] = null;
- }
-
- core_deletedIds.push( id );
- }
- }
- }
- }
- },
-
- _evalUrl: function( url ) {
- return jQuery.ajax({
- url: url,
- type: "GET",
- dataType: "script",
- async: false,
- global: false,
- "throws": true
- });
- }
-});
-jQuery.fn.extend({
- wrapAll: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapAll( html.call(this, i) );
- });
- }
-
- if ( this[0] ) {
- // The elements to wrap the target around
- var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
-
- if ( this[0].parentNode ) {
- wrap.insertBefore( this[0] );
- }
-
- wrap.map(function() {
- var elem = this;
-
- while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
- elem = elem.firstChild;
- }
-
- return elem;
- }).append( this );
- }
-
- return this;
- },
-
- wrapInner: function( html ) {
- if ( jQuery.isFunction( html ) ) {
- return this.each(function(i) {
- jQuery(this).wrapInner( html.call(this, i) );
- });
- }
-
- return this.each(function() {
- var self = jQuery( this ),
- contents = self.contents();
-
- if ( contents.length ) {
- contents.wrapAll( html );
-
- } else {
- self.append( html );
- }
- });
- },
-
- wrap: function( html ) {
- var isFunction = jQuery.isFunction( html );
-
- return this.each(function(i) {
- jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
- });
- },
-
- unwrap: function() {
- return this.parent().each(function() {
- if ( !jQuery.nodeName( this, "body" ) ) {
- jQuery( this ).replaceWith( this.childNodes );
- }
- }).end();
- }
-});
-var iframe, getStyles, curCSS,
- ralpha = /alpha\([^)]*\)/i,
- ropacity = /opacity\s*=\s*([^)]*)/,
- rposition = /^(top|right|bottom|left)$/,
- // swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
- // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
- rdisplayswap = /^(none|table(?!-c[ea]).+)/,
- rmargin = /^margin/,
- rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
- rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
- rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
- elemdisplay = { BODY: "block" },
-
- cssShow = { position: "absolute", visibility: "hidden", display: "block" },
- cssNormalTransform = {
- letterSpacing: 0,
- fontWeight: 400
- },
-
- cssExpand = [ "Top", "Right", "Bottom", "Left" ],
- cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
-
-// return a css property mapped to a potentially vendor prefixed property
-function vendorPropName( style, name ) {
-
- // shortcut for names that are not vendor prefixed
- if ( name in style ) {
- return name;
- }
-
- // check for vendor prefixed names
- var capName = name.charAt(0).toUpperCase() + name.slice(1),
- origName = name,
- i = cssPrefixes.length;
-
- while ( i-- ) {
- name = cssPrefixes[ i ] + capName;
- if ( name in style ) {
- return name;
- }
- }
-
- return origName;
-}
-
-function isHidden( elem, el ) {
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
-}
-
-function showHide( elements, show ) {
- var display, elem, hidden,
- values = [],
- index = 0,
- length = elements.length;
-
- for ( ; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
-
- values[ index ] = jQuery._data( elem, "olddisplay" );
- display = elem.style.display;
- if ( show ) {
- // Reset the inline display of this element to learn if it is
- // being hidden by cascaded rules or not
- if ( !values[ index ] && display === "none" ) {
- elem.style.display = "";
- }
-
- // Set elements which have been overridden with display: none
- // in a stylesheet to whatever the default browser style is
- // for such an element
- if ( elem.style.display === "" && isHidden( elem ) ) {
- values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
- }
- } else {
-
- if ( !values[ index ] ) {
- hidden = isHidden( elem );
-
- if ( display && display !== "none" || !hidden ) {
- jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
- }
- }
- }
- }
-
- // Set the display of most of the elements in a second loop
- // to avoid the constant reflow
- for ( index = 0; index < length; index++ ) {
- elem = elements[ index ];
- if ( !elem.style ) {
- continue;
- }
- if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
- elem.style.display = show ? values[ index ] || "" : "none";
- }
- }
-
- return elements;
-}
-
-jQuery.fn.extend({
- css: function( name, value ) {
- return jQuery.access( this, function( elem, name, value ) {
- var len, styles,
- map = {},
- i = 0;
-
- if ( jQuery.isArray( name ) ) {
- styles = getStyles( elem );
- len = name.length;
-
- for ( ; i < len; i++ ) {
- map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
- }
-
- return map;
- }
-
- return value !== undefined ?
- jQuery.style( elem, name, value ) :
- jQuery.css( elem, name );
- }, name, value, arguments.length > 1 );
- },
- show: function() {
- return showHide( this, true );
- },
- hide: function() {
- return showHide( this );
- },
- toggle: function( state ) {
- if ( typeof state === "boolean" ) {
- return state ? this.show() : this.hide();
- }
-
- return this.each(function() {
- if ( isHidden( this ) ) {
- jQuery( this ).show();
- } else {
- jQuery( this ).hide();
- }
- });
- }
-});
-
-jQuery.extend({
- // Add in style property hooks for overriding the default
- // behavior of getting and setting a style property
- cssHooks: {
- opacity: {
- get: function( elem, computed ) {
- if ( computed ) {
- // We should always get a number back from opacity
- var ret = curCSS( elem, "opacity" );
- return ret === "" ? "1" : ret;
- }
- }
- }
- },
-
- // Don't automatically add "px" to these possibly-unitless properties
- cssNumber: {
- "columnCount": true,
- "fillOpacity": true,
- "fontWeight": true,
- "lineHeight": true,
- "opacity": true,
- "order": true,
- "orphans": true,
- "widows": true,
- "zIndex": true,
- "zoom": true
- },
-
- // Add in properties whose names you wish to fix before
- // setting or getting the value
- cssProps: {
- // normalize float css property
- "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
- },
-
- // Get and set the style property on a DOM Node
- style: function( elem, name, value, extra ) {
- // Don't set styles on text and comment nodes
- if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
- return;
- }
-
- // Make sure that we're working with the right name
- var ret, type, hooks,
- origName = jQuery.camelCase( name ),
- style = elem.style;
-
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // Check if we're setting a value
- if ( value !== undefined ) {
- type = typeof value;
-
- // convert relative number strings (+= or -=) to relative numbers. #7345
- if ( type === "string" && (ret = rrelNum.exec( value )) ) {
- value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
- // Fixes bug #9237
- type = "number";
- }
-
- // Make sure that NaN and null values aren't set. See: #7116
- if ( value == null || type === "number" && isNaN( value ) ) {
- return;
- }
-
- // If a number was passed in, add 'px' to the (except for certain CSS properties)
- if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
- value += "px";
- }
-
- // Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
- // but it would mean to define eight (for every problematic property) identical functions
- if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
- style[ name ] = "inherit";
- }
-
- // If a hook was provided, use that value, otherwise just set the specified value
- if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
-
- // Wrapped to prevent IE from throwing errors when 'invalid' values are provided
- // Fixes bug #5509
- try {
- style[ name ] = value;
- } catch(e) {}
- }
-
- } else {
- // If a hook was provided get the non-computed value from there
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
- return ret;
- }
-
- // Otherwise just get the value from the style object
- return style[ name ];
- }
- },
-
- css: function( elem, name, extra, styles ) {
- var num, val, hooks,
- origName = jQuery.camelCase( name );
-
- // Make sure that we're working with the right name
- name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
-
- // gets hook for the prefixed version
- // followed by the unprefixed version
- hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
-
- // If a hook was provided get the computed value from there
- if ( hooks && "get" in hooks ) {
- val = hooks.get( elem, true, extra );
- }
-
- // Otherwise, if a way to get the computed value exists, use that
- if ( val === undefined ) {
- val = curCSS( elem, name, styles );
- }
-
- //convert "normal" to computed value
- if ( val === "normal" && name in cssNormalTransform ) {
- val = cssNormalTransform[ name ];
- }
-
- // Return, converting to number if forced or a qualifier was provided and val looks numeric
- if ( extra === "" || extra ) {
- num = parseFloat( val );
- return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
- }
- return val;
- }
-});
-
-// NOTE: we've included the "window" in window.getComputedStyle
-// because jsdom on node.js will break without it.
-if ( window.getComputedStyle ) {
- getStyles = function( elem ) {
- return window.getComputedStyle( elem, null );
- };
-
- curCSS = function( elem, name, _computed ) {
- var width, minWidth, maxWidth,
- computed = _computed || getStyles( elem ),
-
- // getPropertyValue is only needed for .css('filter') in IE9, see #12537
- ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
- style = elem.style;
-
- if ( computed ) {
-
- if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
- ret = jQuery.style( elem, name );
- }
-
- // A tribute to the "awesome hack by Dean Edwards"
- // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
- // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
- // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
- if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
-
- // Remember the original values
- width = style.width;
- minWidth = style.minWidth;
- maxWidth = style.maxWidth;
-
- // Put in the new values to get a computed value out
- style.minWidth = style.maxWidth = style.width = ret;
- ret = computed.width;
-
- // Revert the changed values
- style.width = width;
- style.minWidth = minWidth;
- style.maxWidth = maxWidth;
- }
- }
-
- return ret;
- };
-} else if ( document.documentElement.currentStyle ) {
- getStyles = function( elem ) {
- return elem.currentStyle;
- };
-
- curCSS = function( elem, name, _computed ) {
- var left, rs, rsLeft,
- computed = _computed || getStyles( elem ),
- ret = computed ? computed[ name ] : undefined,
- style = elem.style;
-
- // Avoid setting ret to empty string here
- // so we don't default to auto
- if ( ret == null && style && style[ name ] ) {
- ret = style[ name ];
- }
-
- // From the awesome hack by Dean Edwards
- // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
-
- // If we're not dealing with a regular pixel number
- // but a number that has a weird ending, we need to convert it to pixels
- // but not position css attributes, as those are proportional to the parent element instead
- // and we can't measure the parent instead because it might trigger a "stacking dolls" problem
- if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
-
- // Remember the original values
- left = style.left;
- rs = elem.runtimeStyle;
- rsLeft = rs && rs.left;
-
- // Put in the new values to get a computed value out
- if ( rsLeft ) {
- rs.left = elem.currentStyle.left;
- }
- style.left = name === "fontSize" ? "1em" : ret;
- ret = style.pixelLeft + "px";
-
- // Revert the changed values
- style.left = left;
- if ( rsLeft ) {
- rs.left = rsLeft;
- }
- }
-
- return ret === "" ? "auto" : ret;
- };
-}
-
-function setPositiveNumber( elem, value, subtract ) {
- var matches = rnumsplit.exec( value );
- return matches ?
- // Guard against undefined "subtract", e.g., when used as in cssHooks
- Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
- value;
-}
-
-function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
- var i = extra === ( isBorderBox ? "border" : "content" ) ?
- // If we already have the right measurement, avoid augmentation
- 4 :
- // Otherwise initialize for horizontal or vertical properties
- name === "width" ? 1 : 0,
-
- val = 0;
-
- for ( ; i < 4; i += 2 ) {
- // both box models exclude margin, so add it if we want it
- if ( extra === "margin" ) {
- val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
- }
-
- if ( isBorderBox ) {
- // border-box includes padding, so remove it if we want content
- if ( extra === "content" ) {
- val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
- }
-
- // at this point, extra isn't border nor margin, so remove border
- if ( extra !== "margin" ) {
- val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- } else {
- // at this point, extra isn't content, so add padding
- val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
-
- // at this point, extra isn't content nor padding, so add border
- if ( extra !== "padding" ) {
- val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
- }
- }
- }
-
- return val;
-}
-
-function getWidthOrHeight( elem, name, extra ) {
-
- // Start with offset property, which is equivalent to the border-box value
- var valueIsBorderBox = true,
- val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
- styles = getStyles( elem ),
- isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
-
- // some non-html elements return undefined for offsetWidth, so check for null/undefined
- // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
- // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
- if ( val <= 0 || val == null ) {
- // Fall back to computed then uncomputed css if necessary
- val = curCSS( elem, name, styles );
- if ( val < 0 || val == null ) {
- val = elem.style[ name ];
- }
-
- // Computed unit is not pixels. Stop here and return.
- if ( rnumnonpx.test(val) ) {
- return val;
- }
-
- // we need the check for style in case a browser which returns unreliable values
- // for getComputedStyle silently falls back to the reliable elem.style
- valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
-
- // Normalize "", auto, and prepare for extra
- val = parseFloat( val ) || 0;
- }
-
- // use the active box-sizing model to add/subtract irrelevant styles
- return ( val +
- augmentWidthOrHeight(
- elem,
- name,
- extra || ( isBorderBox ? "border" : "content" ),
- valueIsBorderBox,
- styles
- )
- ) + "px";
-}
-
-// Try to determine the default display value of an element
-function css_defaultDisplay( nodeName ) {
- var doc = document,
- display = elemdisplay[ nodeName ];
-
- if ( !display ) {
- display = actualDisplay( nodeName, doc );
-
- // If the simple way fails, read from inside an iframe
- if ( display === "none" || !display ) {
- // Use the already-created iframe if possible
- iframe = ( iframe ||
- jQuery("<iframe frameborder='0' width='0' height='0'/>")
- .css( "cssText", "display:block !important" )
- ).appendTo( doc.documentElement );
-
- // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
- doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
- doc.write("<!doctype html><html><body>");
- doc.close();
-
- display = actualDisplay( nodeName, doc );
- iframe.detach();
- }
-
- // Store the correct default display
- elemdisplay[ nodeName ] = display;
- }
-
- return display;
-}
-
-// Called ONLY from within css_defaultDisplay
-function actualDisplay( name, doc ) {
- var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
- display = jQuery.css( elem[0], "display" );
- elem.remove();
- return display;
-}
-
-jQuery.each([ "height", "width" ], function( i, name ) {
- jQuery.cssHooks[ name ] = {
- get: function( elem, computed, extra ) {
- if ( computed ) {
- // certain elements can have dimension info if we invisibly show them
- // however, it must have a current display style that would benefit from this
- return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
- jQuery.swap( elem, cssShow, function() {
- return getWidthOrHeight( elem, name, extra );
- }) :
- getWidthOrHeight( elem, name, extra );
- }
- },
-
- set: function( elem, value, extra ) {
- var styles = extra && getStyles( elem );
- return setPositiveNumber( elem, value, extra ?
- augmentWidthOrHeight(
- elem,
- name,
- extra,
- jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
- styles
- ) : 0
- );
- }
- };
-});
-
-if ( !jQuery.support.opacity ) {
- jQuery.cssHooks.opacity = {
- get: function( elem, computed ) {
- // IE uses filters for opacity
- return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
- ( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
- computed ? "1" : "";
- },
-
- set: function( elem, value ) {
- var style = elem.style,
- currentStyle = elem.currentStyle,
- opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
- filter = currentStyle && currentStyle.filter || style.filter || "";
-
- // IE has trouble with opacity if it does not have layout
- // Force it by setting the zoom level
- style.zoom = 1;
-
- // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
- // if value === "", then remove inline opacity #12685
- if ( ( value >= 1 || value === "" ) &&
- jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
- style.removeAttribute ) {
-
- // Setting style.filter to null, "" & " " still leave "filter:" in the cssText
- // if "filter:" is present at all, clearType is disabled, we want to avoid this
- // style.removeAttribute is IE Only, but so apparently is this code path...
- style.removeAttribute( "filter" );
-
- // if there is no filter style applied in a css rule or unset inline opacity, we are done
- if ( value === "" || currentStyle && !currentStyle.filter ) {
- return;
- }
- }
-
- // otherwise, set new filter values
- style.filter = ralpha.test( filter ) ?
- filter.replace( ralpha, opacity ) :
- filter + " " + opacity;
- }
- };
-}
-
-// These hooks cannot be added until DOM ready because the support test
-// for it is not run until after DOM ready
-jQuery(function() {
- if ( !jQuery.support.reliableMarginRight ) {
- jQuery.cssHooks.marginRight = {
- get: function( elem, computed ) {
- if ( computed ) {
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- // Work around by temporarily setting element display to inline-block
- return jQuery.swap( elem, { "display": "inline-block" },
- curCSS, [ elem, "marginRight" ] );
- }
- }
- };
- }
-
- // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
- // getComputedStyle returns percent when specified for top/left/bottom/right
- // rather than make the css module depend on the offset module, we just check for it here
- if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
- jQuery.each( [ "top", "left" ], function( i, prop ) {
- jQuery.cssHooks[ prop ] = {
- get: function( elem, computed ) {
- if ( computed ) {
- computed = curCSS( elem, prop );
- // if curCSS returns percentage, fallback to offset
- return rnumnonpx.test( computed ) ?
- jQuery( elem ).position()[ prop ] + "px" :
- computed;
- }
- }
- };
- });
- }
-
-});
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.hidden = function( elem ) {
- // Support: Opera <= 12.12
- // Opera reports offsetWidths and offsetHeights less than zero on some elements
- return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
- (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
- };
-
- jQuery.expr.filters.visible = function( elem ) {
- return !jQuery.expr.filters.hidden( elem );
- };
-}
-
-// These hooks are used by animate to expand properties
-jQuery.each({
- margin: "",
- padding: "",
- border: "Width"
-}, function( prefix, suffix ) {
- jQuery.cssHooks[ prefix + suffix ] = {
- expand: function( value ) {
- var i = 0,
- expanded = {},
-
- // assumes a single number if not a string
- parts = typeof value === "string" ? value.split(" ") : [ value ];
-
- for ( ; i < 4; i++ ) {
- expanded[ prefix + cssExpand[ i ] + suffix ] =
- parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
- }
-
- return expanded;
- }
- };
-
- if ( !rmargin.test( prefix ) ) {
- jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
- }
-});
-var r20 = /%20/g,
- rbracket = /\[\]$/,
- rCRLF = /\r?\n/g,
- rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
- rsubmittable = /^(?:input|select|textarea|keygen)/i;
-
-jQuery.fn.extend({
- serialize: function() {
- return jQuery.param( this.serializeArray() );
- },
- serializeArray: function() {
- return this.map(function(){
- // Can add propHook for "elements" to filter or add form elements
- var elements = jQuery.prop( this, "elements" );
- return elements ? jQuery.makeArray( elements ) : this;
- })
- .filter(function(){
- var type = this.type;
- // Use .is(":disabled") so that fieldset[disabled] works
- return this.name && !jQuery( this ).is( ":disabled" ) &&
- rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
- ( this.checked || !manipulation_rcheckableType.test( type ) );
- })
- .map(function( i, elem ){
- var val = jQuery( this ).val();
-
- return val == null ?
- null :
- jQuery.isArray( val ) ?
- jQuery.map( val, function( val ){
- return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }) :
- { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
- }).get();
- }
-});
-
-//Serialize an array of form elements or a set of
-//key/values into a query string
-jQuery.param = function( a, traditional ) {
- var prefix,
- s = [],
- add = function( key, value ) {
- // If value is a function, invoke it and return its value
- value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
- s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
- };
-
- // Set traditional to true for jQuery <= 1.3.2 behavior.
- if ( traditional === undefined ) {
- traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
- }
-
- // If an array was passed in, assume that it is an array of form elements.
- if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
- // Serialize the form elements
- jQuery.each( a, function() {
- add( this.name, this.value );
- });
-
- } else {
- // If traditional, encode the "old" way (the way 1.3.2 or older
- // did it), otherwise encode params recursively.
- for ( prefix in a ) {
- buildParams( prefix, a[ prefix ], traditional, add );
- }
- }
-
- // Return the resulting serialization
- return s.join( "&" ).replace( r20, "+" );
-};
-
-function buildParams( prefix, obj, traditional, add ) {
- var name;
-
- if ( jQuery.isArray( obj ) ) {
- // Serialize array item.
- jQuery.each( obj, function( i, v ) {
- if ( traditional || rbracket.test( prefix ) ) {
- // Treat each array item as a scalar.
- add( prefix, v );
-
- } else {
- // Item is non-scalar (array or object), encode its numeric index.
- buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
- }
- });
-
- } else if ( !traditional && jQuery.type( obj ) === "object" ) {
- // Serialize object item.
- for ( name in obj ) {
- buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
- }
-
- } else {
- // Serialize scalar item.
- add( prefix, obj );
- }
-}
-jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
- "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
- "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
-
- // Handle event binding
- jQuery.fn[ name ] = function( data, fn ) {
- return arguments.length > 0 ?
- this.on( name, null, data, fn ) :
- this.trigger( name );
- };
-});
-
-jQuery.fn.extend({
- hover: function( fnOver, fnOut ) {
- return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
- },
-
- bind: function( types, data, fn ) {
- return this.on( types, null, data, fn );
- },
- unbind: function( types, fn ) {
- return this.off( types, null, fn );
- },
-
- delegate: function( selector, types, data, fn ) {
- return this.on( types, selector, data, fn );
- },
- undelegate: function( selector, types, fn ) {
- // ( namespace ) or ( selector, types [, fn] )
- return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
- }
-});
-var
- // Document location
- ajaxLocParts,
- ajaxLocation,
- ajax_nonce = jQuery.now(),
-
- ajax_rquery = /\?/,
- rhash = /#.*$/,
- rts = /([?&])_=[^&]*/,
- rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
- // #7653, #8125, #8152: local protocol detection
- rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
- rnoContent = /^(?:GET|HEAD)$/,
- rprotocol = /^\/\//,
- rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
-
- // Keep a copy of the old load method
- _load = jQuery.fn.load,
-
- /* Prefilters
- * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
- * 2) These are called:
- * - BEFORE asking for a transport
- * - AFTER param serialization (s.data is a string if s.processData is true)
- * 3) key is the dataType
- * 4) the catchall symbol "*" can be used
- * 5) execution will start with transport dataType and THEN continue down to "*" if needed
- */
- prefilters = {},
-
- /* Transports bindings
- * 1) key is the dataType
- * 2) the catchall symbol "*" can be used
- * 3) selection will start with transport dataType and THEN go to "*" if needed
- */
- transports = {},
-
- // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
- allTypes = "*/".concat("*");
-
-// #8138, IE may throw an exception when accessing
-// a field from window.location if document.domain has been set
-try {
- ajaxLocation = location.href;
-} catch( e ) {
- // Use the href attribute of an A element
- // since IE will modify it given document.location
- ajaxLocation = document.createElement( "a" );
- ajaxLocation.href = "";
- ajaxLocation = ajaxLocation.href;
-}
-
-// Segment location into parts
-ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
-
-// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
-function addToPrefiltersOrTransports( structure ) {
-
- // dataTypeExpression is optional and defaults to "*"
- return function( dataTypeExpression, func ) {
-
- if ( typeof dataTypeExpression !== "string" ) {
- func = dataTypeExpression;
- dataTypeExpression = "*";
- }
-
- var dataType,
- i = 0,
- dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
-
- if ( jQuery.isFunction( func ) ) {
- // For each dataType in the dataTypeExpression
- while ( (dataType = dataTypes[i++]) ) {
- // Prepend if requested
- if ( dataType[0] === "+" ) {
- dataType = dataType.slice( 1 ) || "*";
- (structure[ dataType ] = structure[ dataType ] || []).unshift( func );
-
- // Otherwise append
- } else {
- (structure[ dataType ] = structure[ dataType ] || []).push( func );
- }
- }
- }
- };
-}
-
-// Base inspection function for prefilters and transports
-function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
-
- var inspected = {},
- seekingTransport = ( structure === transports );
-
- function inspect( dataType ) {
- var selected;
- inspected[ dataType ] = true;
- jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
- var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
- if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
- options.dataTypes.unshift( dataTypeOrTransport );
- inspect( dataTypeOrTransport );
- return false;
- } else if ( seekingTransport ) {
- return !( selected = dataTypeOrTransport );
- }
- });
- return selected;
- }
-
- return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
-}
-
-// A special extend for ajax options
-// that takes "flat" options (not to be deep extended)
-// Fixes #9887
-function ajaxExtend( target, src ) {
- var deep, key,
- flatOptions = jQuery.ajaxSettings.flatOptions || {};
-
- for ( key in src ) {
- if ( src[ key ] !== undefined ) {
- ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
- }
- }
- if ( deep ) {
- jQuery.extend( true, target, deep );
- }
-
- return target;
-}
-
-jQuery.fn.load = function( url, params, callback ) {
- if ( typeof url !== "string" && _load ) {
- return _load.apply( this, arguments );
- }
-
- var selector, response, type,
- self = this,
- off = url.indexOf(" ");
-
- if ( off >= 0 ) {
- selector = url.slice( off, url.length );
- url = url.slice( 0, off );
- }
-
- // If it's a function
- if ( jQuery.isFunction( params ) ) {
-
- // We assume that it's the callback
- callback = params;
- params = undefined;
-
- // Otherwise, build a param string
- } else if ( params && typeof params === "object" ) {
- type = "POST";
- }
-
- // If we have elements to modify, make the request
- if ( self.length > 0 ) {
- jQuery.ajax({
- url: url,
-
- // if "type" variable is undefined, then "GET" method will be used
- type: type,
- dataType: "html",
- data: params
- }).done(function( responseText ) {
-
- // Save response for use in complete callback
- response = arguments;
-
- self.html( selector ?
-
- // If a selector was specified, locate the right elements in a dummy div
- // Exclude scripts to avoid IE 'Permission Denied' errors
- jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
-
- // Otherwise use the full result
- responseText );
-
- }).complete( callback && function( jqXHR, status ) {
- self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
- });
- }
-
- return this;
-};
-
-// Attach a bunch of functions for handling common AJAX events
-jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
- jQuery.fn[ type ] = function( fn ){
- return this.on( type, fn );
- };
-});
-
-jQuery.extend({
-
- // Counter for holding the number of active queries
- active: 0,
-
- // Last-Modified header cache for next request
- lastModified: {},
- etag: {},
-
- ajaxSettings: {
- url: ajaxLocation,
- type: "GET",
- isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
- global: true,
- processData: true,
- async: true,
- contentType: "application/x-www-form-urlencoded; charset=UTF-8",
- /*
- timeout: 0,
- data: null,
- dataType: null,
- username: null,
- password: null,
- cache: null,
- throws: false,
- traditional: false,
- headers: {},
- */
-
- accepts: {
- "*": allTypes,
- text: "text/plain",
- html: "text/html",
- xml: "application/xml, text/xml",
- json: "application/json, text/javascript"
- },
-
- contents: {
- xml: /xml/,
- html: /html/,
- json: /json/
- },
-
- responseFields: {
- xml: "responseXML",
- text: "responseText",
- json: "responseJSON"
- },
-
- // Data converters
- // Keys separate source (or catchall "*") and destination types with a single space
- converters: {
-
- // Convert anything to text
- "* text": String,
-
- // Text to html (true = no transformation)
- "text html": true,
-
- // Evaluate text as a json expression
- "text json": jQuery.parseJSON,
-
- // Parse text as xml
- "text xml": jQuery.parseXML
- },
-
- // For options that shouldn't be deep extended:
- // you can add your own custom options here if
- // and when you create one that shouldn't be
- // deep extended (see ajaxExtend)
- flatOptions: {
- url: true,
- context: true
- }
- },
-
- // Creates a full fledged settings object into target
- // with both ajaxSettings and settings fields.
- // If target is omitted, writes into ajaxSettings.
- ajaxSetup: function( target, settings ) {
- return settings ?
-
- // Building a settings object
- ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
-
- // Extending ajaxSettings
- ajaxExtend( jQuery.ajaxSettings, target );
- },
-
- ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
- ajaxTransport: addToPrefiltersOrTransports( transports ),
-
- // Main method
- ajax: function( url, options ) {
-
- // If url is an object, simulate pre-1.5 signature
- if ( typeof url === "object" ) {
- options = url;
- url = undefined;
- }
-
- // Force options to be an object
- options = options || {};
-
- var // Cross-domain detection vars
- parts,
- // Loop variable
- i,
- // URL without anti-cache param
- cacheURL,
- // Response headers as string
- responseHeadersString,
- // timeout handle
- timeoutTimer,
-
- // To know if global events are to be dispatched
- fireGlobals,
-
- transport,
- // Response headers
- responseHeaders,
- // Create the final options object
- s = jQuery.ajaxSetup( {}, options ),
- // Callbacks context
- callbackContext = s.context || s,
- // Context for global events is callbackContext if it is a DOM node or jQuery collection
- globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
- jQuery( callbackContext ) :
- jQuery.event,
- // Deferreds
- deferred = jQuery.Deferred(),
- completeDeferred = jQuery.Callbacks("once memory"),
- // Status-dependent callbacks
- statusCode = s.statusCode || {},
- // Headers (they are sent all at once)
- requestHeaders = {},
- requestHeadersNames = {},
- // The jqXHR state
- state = 0,
- // Default abort message
- strAbort = "canceled",
- // Fake xhr
- jqXHR = {
- readyState: 0,
-
- // Builds headers hashtable if needed
- getResponseHeader: function( key ) {
- var match;
- if ( state === 2 ) {
- if ( !responseHeaders ) {
- responseHeaders = {};
- while ( (match = rheaders.exec( responseHeadersString )) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
- }
- match = responseHeaders[ key.toLowerCase() ];
- }
- return match == null ? null : match;
- },
-
- // Raw string
- getAllResponseHeaders: function() {
- return state === 2 ? responseHeadersString : null;
- },
-
- // Caches the header
- setRequestHeader: function( name, value ) {
- var lname = name.toLowerCase();
- if ( !state ) {
- name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
- requestHeaders[ name ] = value;
- }
- return this;
- },
-
- // Overrides response content-type header
- overrideMimeType: function( type ) {
- if ( !state ) {
- s.mimeType = type;
- }
- return this;
- },
-
- // Status-dependent callbacks
- statusCode: function( map ) {
- var code;
- if ( map ) {
- if ( state < 2 ) {
- for ( code in map ) {
- // Lazy-add the new callback in a way that preserves old ones
- statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
- }
- } else {
- // Execute the appropriate callbacks
- jqXHR.always( map[ jqXHR.status ] );
- }
- }
- return this;
- },
-
- // Cancel the request
- abort: function( statusText ) {
- var finalText = statusText || strAbort;
- if ( transport ) {
- transport.abort( finalText );
- }
- done( 0, finalText );
- return this;
- }
- };
-
- // Attach deferreds
- deferred.promise( jqXHR ).complete = completeDeferred.add;
- jqXHR.success = jqXHR.done;
- jqXHR.error = jqXHR.fail;
-
- // Remove hash character (#7531: and string promotion)
- // Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
- // Handle falsy url in the settings object (#10093: consistency with old signature)
- // We also use the url parameter if available
- s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
-
- // Alias method option to type as per ticket #12004
- s.type = options.method || options.type || s.method || s.type;
-
- // Extract dataTypes list
- s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
-
- // A cross-domain request is in order when we have a protocol:host:port mismatch
- if ( s.crossDomain == null ) {
- parts = rurl.exec( s.url.toLowerCase() );
- s.crossDomain = !!( parts &&
- ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
- ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
- ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
- );
- }
-
- // Convert data if not already a string
- if ( s.data && s.processData && typeof s.data !== "string" ) {
- s.data = jQuery.param( s.data, s.traditional );
- }
-
- // Apply prefilters
- inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
-
- // If request was aborted inside a prefilter, stop there
- if ( state === 2 ) {
- return jqXHR;
- }
-
- // We can fire global events as of now if asked to
- fireGlobals = s.global;
-
- // Watch for a new set of requests
- if ( fireGlobals && jQuery.active++ === 0 ) {
- jQuery.event.trigger("ajaxStart");
- }
-
- // Uppercase the type
- s.type = s.type.toUpperCase();
-
- // Determine if request has content
- s.hasContent = !rnoContent.test( s.type );
-
- // Save the URL in case we're toying with the If-Modified-Since
- // and/or If-None-Match header later on
- cacheURL = s.url;
-
- // More options handling for requests with no content
- if ( !s.hasContent ) {
-
- // If data is available, append data to url
- if ( s.data ) {
- cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
- // #9682: remove data so that it's not used in an eventual retry
- delete s.data;
- }
-
- // Add anti-cache in url if needed
- if ( s.cache === false ) {
- s.url = rts.test( cacheURL ) ?
-
- // If there is already a '_' parameter, set its value
- cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
-
- // Otherwise add one to the end
- cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
- }
- }
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- if ( jQuery.lastModified[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
- }
- if ( jQuery.etag[ cacheURL ] ) {
- jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
- }
- }
-
- // Set the correct header, if data is being sent
- if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
- jqXHR.setRequestHeader( "Content-Type", s.contentType );
- }
-
- // Set the Accepts header for the server, depending on the dataType
- jqXHR.setRequestHeader(
- "Accept",
- s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
- s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
- s.accepts[ "*" ]
- );
-
- // Check for headers option
- for ( i in s.headers ) {
- jqXHR.setRequestHeader( i, s.headers[ i ] );
- }
-
- // Allow custom headers/mimetypes and early abort
- if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
- // Abort if not done already and return
- return jqXHR.abort();
- }
-
- // aborting is no longer a cancellation
- strAbort = "abort";
-
- // Install callbacks on deferreds
- for ( i in { success: 1, error: 1, complete: 1 } ) {
- jqXHR[ i ]( s[ i ] );
- }
-
- // Get transport
- transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
-
- // If no transport, we auto-abort
- if ( !transport ) {
- done( -1, "No Transport" );
- } else {
- jqXHR.readyState = 1;
-
- // Send global event
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
- }
- // Timeout
- if ( s.async && s.timeout > 0 ) {
- timeoutTimer = setTimeout(function() {
- jqXHR.abort("timeout");
- }, s.timeout );
- }
-
- try {
- state = 1;
- transport.send( requestHeaders, done );
- } catch ( e ) {
- // Propagate exception as error if not done
- if ( state < 2 ) {
- done( -1, e );
- // Simply rethrow otherwise
- } else {
- throw e;
- }
- }
- }
-
- // Callback for when everything is done
- function done( status, nativeStatusText, responses, headers ) {
- var isSuccess, success, error, response, modified,
- statusText = nativeStatusText;
-
- // Called once
- if ( state === 2 ) {
- return;
- }
-
- // State is "done" now
- state = 2;
-
- // Clear timeout if it exists
- if ( timeoutTimer ) {
- clearTimeout( timeoutTimer );
- }
-
- // Dereference transport for early garbage collection
- // (no matter how long the jqXHR object will be used)
- transport = undefined;
-
- // Cache response headers
- responseHeadersString = headers || "";
-
- // Set readyState
- jqXHR.readyState = status > 0 ? 4 : 0;
-
- // Determine if successful
- isSuccess = status >= 200 && status < 300 || status === 304;
-
- // Get response data
- if ( responses ) {
- response = ajaxHandleResponses( s, jqXHR, responses );
- }
-
- // Convert no matter what (that way responseXXX fields are always set)
- response = ajaxConvert( s, response, jqXHR, isSuccess );
-
- // If successful, handle type chaining
- if ( isSuccess ) {
-
- // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
- if ( s.ifModified ) {
- modified = jqXHR.getResponseHeader("Last-Modified");
- if ( modified ) {
- jQuery.lastModified[ cacheURL ] = modified;
- }
- modified = jqXHR.getResponseHeader("etag");
- if ( modified ) {
- jQuery.etag[ cacheURL ] = modified;
- }
- }
-
- // if no content
- if ( status === 204 || s.type === "HEAD" ) {
- statusText = "nocontent";
-
- // if not modified
- } else if ( status === 304 ) {
- statusText = "notmodified";
-
- // If we have data, let's convert it
- } else {
- statusText = response.state;
- success = response.data;
- error = response.error;
- isSuccess = !error;
- }
- } else {
- // We extract error from statusText
- // then normalize statusText and status for non-aborts
- error = statusText;
- if ( status || !statusText ) {
- statusText = "error";
- if ( status < 0 ) {
- status = 0;
- }
- }
- }
-
- // Set data for the fake xhr object
- jqXHR.status = status;
- jqXHR.statusText = ( nativeStatusText || statusText ) + "";
-
- // Success/Error
- if ( isSuccess ) {
- deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
- } else {
- deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
- }
-
- // Status-dependent callbacks
- jqXHR.statusCode( statusCode );
- statusCode = undefined;
-
- if ( fireGlobals ) {
- globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
- [ jqXHR, s, isSuccess ? success : error ] );
- }
-
- // Complete
- completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
-
- if ( fireGlobals ) {
- globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
- // Handle the global AJAX counter
- if ( !( --jQuery.active ) ) {
- jQuery.event.trigger("ajaxStop");
- }
- }
- }
-
- return jqXHR;
- },
-
- getJSON: function( url, data, callback ) {
- return jQuery.get( url, data, callback, "json" );
- },
-
- getScript: function( url, callback ) {
- return jQuery.get( url, undefined, callback, "script" );
- }
-});
-
-jQuery.each( [ "get", "post" ], function( i, method ) {
- jQuery[ method ] = function( url, data, callback, type ) {
- // shift arguments if data argument was omitted
- if ( jQuery.isFunction( data ) ) {
- type = type || callback;
- callback = data;
- data = undefined;
- }
-
- return jQuery.ajax({
- url: url,
- type: method,
- dataType: type,
- data: data,
- success: callback
- });
- };
-});
-
-/* Handles responses to an ajax request:
- * - finds the right dataType (mediates between content-type and expected dataType)
- * - returns the corresponding response
- */
-function ajaxHandleResponses( s, jqXHR, responses ) {
- var firstDataType, ct, finalDataType, type,
- contents = s.contents,
- dataTypes = s.dataTypes;
-
- // Remove auto dataType and get content-type in the process
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
- }
- }
-
- // Check if we're dealing with a known content-type
- if ( ct ) {
- for ( type in contents ) {
- if ( contents[ type ] && contents[ type ].test( ct ) ) {
- dataTypes.unshift( type );
- break;
- }
- }
- }
-
- // Check to see if we have a response for the expected dataType
- if ( dataTypes[ 0 ] in responses ) {
- finalDataType = dataTypes[ 0 ];
- } else {
- // Try convertible dataTypes
- for ( type in responses ) {
- if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
- finalDataType = type;
- break;
- }
- if ( !firstDataType ) {
- firstDataType = type;
- }
- }
- // Or just use first one
- finalDataType = finalDataType || firstDataType;
- }
-
- // If we found a dataType
- // We add the dataType to the list if needed
- // and return the corresponding response
- if ( finalDataType ) {
- if ( finalDataType !== dataTypes[ 0 ] ) {
- dataTypes.unshift( finalDataType );
- }
- return responses[ finalDataType ];
- }
-}
-
-/* Chain conversions given the request and the original response
- * Also sets the responseXXX fields on the jqXHR instance
- */
-function ajaxConvert( s, response, jqXHR, isSuccess ) {
- var conv2, current, conv, tmp, prev,
- converters = {},
- // Work with a copy of dataTypes in case we need to modify it for conversion
- dataTypes = s.dataTypes.slice();
-
- // Create converters map with lowercased keys
- if ( dataTypes[ 1 ] ) {
- for ( conv in s.converters ) {
- converters[ conv.toLowerCase() ] = s.converters[ conv ];
- }
- }
-
- current = dataTypes.shift();
-
- // Convert to each sequential dataType
- while ( current ) {
-
- if ( s.responseFields[ current ] ) {
- jqXHR[ s.responseFields[ current ] ] = response;
- }
-
- // Apply the dataFilter if provided
- if ( !prev && isSuccess && s.dataFilter ) {
- response = s.dataFilter( response, s.dataType );
- }
-
- prev = current;
- current = dataTypes.shift();
-
- if ( current ) {
-
- // There's only work to do if current dataType is non-auto
- if ( current === "*" ) {
-
- current = prev;
-
- // Convert response if prev dataType is non-auto and differs from current
- } else if ( prev !== "*" && prev !== current ) {
-
- // Seek a direct converter
- conv = converters[ prev + " " + current ] || converters[ "* " + current ];
-
- // If none found, seek a pair
- if ( !conv ) {
- for ( conv2 in converters ) {
-
- // If conv2 outputs current
- tmp = conv2.split( " " );
- if ( tmp[ 1 ] === current ) {
-
- // If prev can be converted to accepted input
- conv = converters[ prev + " " + tmp[ 0 ] ] ||
- converters[ "* " + tmp[ 0 ] ];
- if ( conv ) {
- // Condense equivalence converters
- if ( conv === true ) {
- conv = converters[ conv2 ];
-
- // Otherwise, insert the intermediate dataType
- } else if ( converters[ conv2 ] !== true ) {
- current = tmp[ 0 ];
- dataTypes.unshift( tmp[ 1 ] );
- }
- break;
- }
- }
- }
- }
-
- // Apply converter (if not an equivalence)
- if ( conv !== true ) {
-
- // Unless errors are allowed to bubble, catch and return them
- if ( conv && s[ "throws" ] ) {
- response = conv( response );
- } else {
- try {
- response = conv( response );
- } catch ( e ) {
- return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
- }
- }
- }
- }
- }
- }
-
- return { state: "success", data: response };
-}
-// Install script dataType
-jQuery.ajaxSetup({
- accepts: {
- script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
- },
- contents: {
- script: /(?:java|ecma)script/
- },
- converters: {
- "text script": function( text ) {
- jQuery.globalEval( text );
- return text;
- }
- }
-});
-
-// Handle cache's special case and global
-jQuery.ajaxPrefilter( "script", function( s ) {
- if ( s.cache === undefined ) {
- s.cache = false;
- }
- if ( s.crossDomain ) {
- s.type = "GET";
- s.global = false;
- }
-});
-
-// Bind script tag hack transport
-jQuery.ajaxTransport( "script", function(s) {
-
- // This transport only deals with cross domain requests
- if ( s.crossDomain ) {
-
- var script,
- head = document.head || jQuery("head")[0] || document.documentElement;
-
- return {
-
- send: function( _, callback ) {
-
- script = document.createElement("script");
-
- script.async = true;
-
- if ( s.scriptCharset ) {
- script.charset = s.scriptCharset;
- }
-
- script.src = s.url;
-
- // Attach handlers for all browsers
- script.onload = script.onreadystatechange = function( _, isAbort ) {
-
- if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
-
- // Handle memory leak in IE
- script.onload = script.onreadystatechange = null;
-
- // Remove the script
- if ( script.parentNode ) {
- script.parentNode.removeChild( script );
- }
-
- // Dereference the script
- script = null;
-
- // Callback if not abort
- if ( !isAbort ) {
- callback( 200, "success" );
- }
- }
- };
-
- // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
- // Use native DOM manipulation to avoid our domManip AJAX trickery
- head.insertBefore( script, head.firstChild );
- },
-
- abort: function() {
- if ( script ) {
- script.onload( undefined, true );
- }
- }
- };
- }
-});
-var oldCallbacks = [],
- rjsonp = /(=)\?(?=&|$)|\?\?/;
-
-// Default jsonp settings
-jQuery.ajaxSetup({
- jsonp: "callback",
- jsonpCallback: function() {
- var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
- this[ callback ] = true;
- return callback;
- }
-});
-
-// Detect, normalize options and install callbacks for jsonp requests
-jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
-
- var callbackName, overwritten, responseContainer,
- jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
- "url" :
- typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
- );
-
- // Handle iff the expected data type is "jsonp" or we have a parameter to set
- if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
-
- // Get callback name, remembering preexisting value associated with it
- callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
- s.jsonpCallback() :
- s.jsonpCallback;
-
- // Insert callback into url or form data
- if ( jsonProp ) {
- s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
- } else if ( s.jsonp !== false ) {
- s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
- }
-
- // Use data converter to retrieve json after script execution
- s.converters["script json"] = function() {
- if ( !responseContainer ) {
- jQuery.error( callbackName + " was not called" );
- }
- return responseContainer[ 0 ];
- };
-
- // force json dataType
- s.dataTypes[ 0 ] = "json";
-
- // Install callback
- overwritten = window[ callbackName ];
- window[ callbackName ] = function() {
- responseContainer = arguments;
- };
-
- // Clean-up function (fires after converters)
- jqXHR.always(function() {
- // Restore preexisting value
- window[ callbackName ] = overwritten;
-
- // Save back as free
- if ( s[ callbackName ] ) {
- // make sure that re-using the options doesn't screw things around
- s.jsonpCallback = originalSettings.jsonpCallback;
-
- // save the callback name for future use
- oldCallbacks.push( callbackName );
- }
-
- // Call if it was a function and we have a response
- if ( responseContainer && jQuery.isFunction( overwritten ) ) {
- overwritten( responseContainer[ 0 ] );
- }
-
- responseContainer = overwritten = undefined;
- });
-
- // Delegate to script
- return "script";
- }
-});
-var xhrCallbacks, xhrSupported,
- xhrId = 0,
- // #5280: Internet Explorer will keep connections alive if we don't abort on unload
- xhrOnUnloadAbort = window.ActiveXObject && function() {
- // Abort all pending requests
- var key;
- for ( key in xhrCallbacks ) {
- xhrCallbacks[ key ]( undefined, true );
- }
- };
-
-// Functions to create xhrs
-function createStandardXHR() {
- try {
- return new window.XMLHttpRequest();
- } catch( e ) {}
-}
-
-function createActiveXHR() {
- try {
- return new window.ActiveXObject("Microsoft.XMLHTTP");
- } catch( e ) {}
-}
-
-// Create the request object
-// (This is still attached to ajaxSettings for backward compatibility)
-jQuery.ajaxSettings.xhr = window.ActiveXObject ?
- /* Microsoft failed to properly
- * implement the XMLHttpRequest in IE7 (can't request local files),
- * so we use the ActiveXObject when it is available
- * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
- * we need a fallback.
- */
- function() {
- return !this.isLocal && createStandardXHR() || createActiveXHR();
- } :
- // For all other browsers, use the standard XMLHttpRequest object
- createStandardXHR;
-
-// Determine support properties
-xhrSupported = jQuery.ajaxSettings.xhr();
-jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
-xhrSupported = jQuery.support.ajax = !!xhrSupported;
-
-// Create transport if the browser can provide an xhr
-if ( xhrSupported ) {
-
- jQuery.ajaxTransport(function( s ) {
- // Cross domain only allowed if supported through XMLHttpRequest
- if ( !s.crossDomain || jQuery.support.cors ) {
-
- var callback;
-
- return {
- send: function( headers, complete ) {
-
- // Get a new xhr
- var handle, i,
- xhr = s.xhr();
-
- // Open the socket
- // Passing null username, generates a login popup on Opera (#2865)
- if ( s.username ) {
- xhr.open( s.type, s.url, s.async, s.username, s.password );
- } else {
- xhr.open( s.type, s.url, s.async );
- }
-
- // Apply custom fields if provided
- if ( s.xhrFields ) {
- for ( i in s.xhrFields ) {
- xhr[ i ] = s.xhrFields[ i ];
- }
- }
-
- // Override mime type if needed
- if ( s.mimeType && xhr.overrideMimeType ) {
- xhr.overrideMimeType( s.mimeType );
- }
-
- // X-Requested-With header
- // For cross-domain requests, seeing as conditions for a preflight are
- // akin to a jigsaw puzzle, we simply never set it to be sure.
- // (it can always be set on a per-request basis or even using ajaxSetup)
- // For same-domain requests, won't change header if already provided.
- if ( !s.crossDomain && !headers["X-Requested-With"] ) {
- headers["X-Requested-With"] = "XMLHttpRequest";
- }
-
- // Need an extra try/catch for cross domain requests in Firefox 3
- try {
- for ( i in headers ) {
- xhr.setRequestHeader( i, headers[ i ] );
- }
- } catch( err ) {}
-
- // Do send the request
- // This may raise an exception which is actually
- // handled in jQuery.ajax (so no try/catch here)
- xhr.send( ( s.hasContent && s.data ) || null );
-
- // Listener
- callback = function( _, isAbort ) {
- var status, responseHeaders, statusText, responses;
-
- // Firefox throws exceptions when accessing properties
- // of an xhr when a network error occurred
- // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
- try {
-
- // Was never called and is aborted or complete
- if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
-
- // Only called once
- callback = undefined;
-
- // Do not keep as active anymore
- if ( handle ) {
- xhr.onreadystatechange = jQuery.noop;
- if ( xhrOnUnloadAbort ) {
- delete xhrCallbacks[ handle ];
- }
- }
-
- // If it's an abort
- if ( isAbort ) {
- // Abort it manually if needed
- if ( xhr.readyState !== 4 ) {
- xhr.abort();
- }
- } else {
- responses = {};
- status = xhr.status;
- responseHeaders = xhr.getAllResponseHeaders();
-
- // When requesting binary data, IE6-9 will throw an exception
- // on any attempt to access responseText (#11426)
- if ( typeof xhr.responseText === "string" ) {
- responses.text = xhr.responseText;
- }
-
- // Firefox throws an exception when accessing
- // statusText for faulty cross-domain requests
- try {
- statusText = xhr.statusText;
- } catch( e ) {
- // We normalize with Webkit giving an empty statusText
- statusText = "";
- }
-
- // Filter status for non standard behaviors
-
- // If the request is local and we have data: assume a success
- // (success with no data won't get notified, that's the best we
- // can do given current implementations)
- if ( !status && s.isLocal && !s.crossDomain ) {
- status = responses.text ? 200 : 404;
- // IE - #1450: sometimes returns 1223 when it should be 204
- } else if ( status === 1223 ) {
- status = 204;
- }
- }
- }
- } catch( firefoxAccessException ) {
- if ( !isAbort ) {
- complete( -1, firefoxAccessException );
- }
- }
-
- // Call complete if needed
- if ( responses ) {
- complete( status, statusText, responses, responseHeaders );
- }
- };
-
- if ( !s.async ) {
- // if we're in sync mode we fire the callback
- callback();
- } else if ( xhr.readyState === 4 ) {
- // (IE6 & IE7) if it's in cache and has been
- // retrieved directly we need to fire the callback
- setTimeout( callback );
- } else {
- handle = ++xhrId;
- if ( xhrOnUnloadAbort ) {
- // Create the active xhrs callbacks list if needed
- // and attach the unload handler
- if ( !xhrCallbacks ) {
- xhrCallbacks = {};
- jQuery( window ).unload( xhrOnUnloadAbort );
- }
- // Add to list of active xhrs callbacks
- xhrCallbacks[ handle ] = callback;
- }
- xhr.onreadystatechange = callback;
- }
- },
-
- abort: function() {
- if ( callback ) {
- callback( undefined, true );
- }
- }
- };
- }
- });
-}
-var fxNow, timerId,
- rfxtypes = /^(?:toggle|show|hide)$/,
- rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
- rrun = /queueHooks$/,
- animationPrefilters = [ defaultPrefilter ],
- tweeners = {
- "*": [function( prop, value ) {
- var tween = this.createTween( prop, value ),
- target = tween.cur(),
- parts = rfxnum.exec( value ),
- unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
- rfxnum.exec( jQuery.css( tween.elem, prop ) ),
- scale = 1,
- maxIterations = 20;
-
- if ( start && start[ 3 ] !== unit ) {
- // Trust units reported by jQuery.css
- unit = unit || start[ 3 ];
-
- // Make sure we update the tween properties later on
- parts = parts || [];
-
- // Iteratively approximate from a nonzero starting point
- start = +target || 1;
-
- do {
- // If previous iteration zeroed out, double until we get *something*
- // Use a string for doubling factor so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- start = start / scale;
- jQuery.style( tween.elem, prop, start + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // And breaking the loop if scale is unchanged or perfect, or if we've just had enough
- } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
- }
-
- // Update tween properties
- if ( parts ) {
- start = tween.start = +start || +target || 0;
- tween.unit = unit;
- // If a +=/-= token was provided, we're doing a relative animation
- tween.end = parts[ 1 ] ?
- start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
- +parts[ 2 ];
- }
-
- return tween;
- }]
- };
-
-// Animations created synchronously will run synchronously
-function createFxNow() {
- setTimeout(function() {
- fxNow = undefined;
- });
- return ( fxNow = jQuery.now() );
-}
-
-function createTween( value, prop, animation ) {
- var tween,
- collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
- index = 0,
- length = collection.length;
- for ( ; index < length; index++ ) {
- if ( (tween = collection[ index ].call( animation, prop, value )) ) {
-
- // we're done with this property
- return tween;
- }
- }
-}
-
-function Animation( elem, properties, options ) {
- var result,
- stopped,
- index = 0,
- length = animationPrefilters.length,
- deferred = jQuery.Deferred().always( function() {
- // don't match elem in the :animated selector
- delete tick.elem;
- }),
- tick = function() {
- if ( stopped ) {
- return false;
- }
- var currentTime = fxNow || createFxNow(),
- remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
- // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
- temp = remaining / animation.duration || 0,
- percent = 1 - temp,
- index = 0,
- length = animation.tweens.length;
-
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( percent );
- }
-
- deferred.notifyWith( elem, [ animation, percent, remaining ]);
-
- if ( percent < 1 && length ) {
- return remaining;
- } else {
- deferred.resolveWith( elem, [ animation ] );
- return false;
- }
- },
- animation = deferred.promise({
- elem: elem,
- props: jQuery.extend( {}, properties ),
- opts: jQuery.extend( true, { specialEasing: {} }, options ),
- originalProperties: properties,
- originalOptions: options,
- startTime: fxNow || createFxNow(),
- duration: options.duration,
- tweens: [],
- createTween: function( prop, end ) {
- var tween = jQuery.Tween( elem, animation.opts, prop, end,
- animation.opts.specialEasing[ prop ] || animation.opts.easing );
- animation.tweens.push( tween );
- return tween;
- },
- stop: function( gotoEnd ) {
- var index = 0,
- // if we are going to the end, we want to run all the tweens
- // otherwise we skip this part
- length = gotoEnd ? animation.tweens.length : 0;
- if ( stopped ) {
- return this;
- }
- stopped = true;
- for ( ; index < length ; index++ ) {
- animation.tweens[ index ].run( 1 );
- }
-
- // resolve when we played the last frame
- // otherwise, reject
- if ( gotoEnd ) {
- deferred.resolveWith( elem, [ animation, gotoEnd ] );
- } else {
- deferred.rejectWith( elem, [ animation, gotoEnd ] );
- }
- return this;
- }
- }),
- props = animation.props;
-
- propFilter( props, animation.opts.specialEasing );
-
- for ( ; index < length ; index++ ) {
- result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
- if ( result ) {
- return result;
- }
- }
-
- jQuery.map( props, createTween, animation );
-
- if ( jQuery.isFunction( animation.opts.start ) ) {
- animation.opts.start.call( elem, animation );
- }
-
- jQuery.fx.timer(
- jQuery.extend( tick, {
- elem: elem,
- anim: animation,
- queue: animation.opts.queue
- })
- );
-
- // attach callbacks from options
- return animation.progress( animation.opts.progress )
- .done( animation.opts.done, animation.opts.complete )
- .fail( animation.opts.fail )
- .always( animation.opts.always );
-}
-
-function propFilter( props, specialEasing ) {
- var index, name, easing, value, hooks;
-
- // camelCase, specialEasing and expand cssHook pass
- for ( index in props ) {
- name = jQuery.camelCase( index );
- easing = specialEasing[ name ];
- value = props[ index ];
- if ( jQuery.isArray( value ) ) {
- easing = value[ 1 ];
- value = props[ index ] = value[ 0 ];
- }
-
- if ( index !== name ) {
- props[ name ] = value;
- delete props[ index ];
- }
-
- hooks = jQuery.cssHooks[ name ];
- if ( hooks && "expand" in hooks ) {
- value = hooks.expand( value );
- delete props[ name ];
-
- // not quite $.extend, this wont overwrite keys already present.
- // also - reusing 'index' from above because we have the correct "name"
- for ( index in value ) {
- if ( !( index in props ) ) {
- props[ index ] = value[ index ];
- specialEasing[ index ] = easing;
- }
- }
- } else {
- specialEasing[ name ] = easing;
- }
- }
-}
-
-jQuery.Animation = jQuery.extend( Animation, {
-
- tweener: function( props, callback ) {
- if ( jQuery.isFunction( props ) ) {
- callback = props;
- props = [ "*" ];
- } else {
- props = props.split(" ");
- }
-
- var prop,
- index = 0,
- length = props.length;
-
- for ( ; index < length ; index++ ) {
- prop = props[ index ];
- tweeners[ prop ] = tweeners[ prop ] || [];
- tweeners[ prop ].unshift( callback );
- }
- },
-
- prefilter: function( callback, prepend ) {
- if ( prepend ) {
- animationPrefilters.unshift( callback );
- } else {
- animationPrefilters.push( callback );
- }
- }
-});
-
-function defaultPrefilter( elem, props, opts ) {
- /* jshint validthis: true */
- var prop, value, toggle, tween, hooks, oldfire,
- anim = this,
- orig = {},
- style = elem.style,
- hidden = elem.nodeType && isHidden( elem ),
- dataShow = jQuery._data( elem, "fxshow" );
-
- // handle queue: false promises
- if ( !opts.queue ) {
- hooks = jQuery._queueHooks( elem, "fx" );
- if ( hooks.unqueued == null ) {
- hooks.unqueued = 0;
- oldfire = hooks.empty.fire;
- hooks.empty.fire = function() {
- if ( !hooks.unqueued ) {
- oldfire();
- }
- };
- }
- hooks.unqueued++;
-
- anim.always(function() {
- // doing this makes sure that the complete handler will be called
- // before this completes
- anim.always(function() {
- hooks.unqueued--;
- if ( !jQuery.queue( elem, "fx" ).length ) {
- hooks.empty.fire();
- }
- });
- });
- }
-
- // height/width overflow pass
- if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
- // Make sure that nothing sneaks out
- // Record all 3 overflow attributes because IE does not
- // change the overflow attribute when overflowX and
- // overflowY are set to the same value
- opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
-
- // Set display property to inline-block for height/width
- // animations on inline elements that are having width/height animated
- if ( jQuery.css( elem, "display" ) === "inline" &&
- jQuery.css( elem, "float" ) === "none" ) {
-
- // inline-level elements accept inline-block;
- // block-level elements need to be inline with layout
- if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
- style.display = "inline-block";
-
- } else {
- style.zoom = 1;
- }
- }
- }
-
- if ( opts.overflow ) {
- style.overflow = "hidden";
- if ( !jQuery.support.shrinkWrapBlocks ) {
- anim.always(function() {
- style.overflow = opts.overflow[ 0 ];
- style.overflowX = opts.overflow[ 1 ];
- style.overflowY = opts.overflow[ 2 ];
- });
- }
- }
-
-
- // show/hide pass
- for ( prop in props ) {
- value = props[ prop ];
- if ( rfxtypes.exec( value ) ) {
- delete props[ prop ];
- toggle = toggle || value === "toggle";
- if ( value === ( hidden ? "hide" : "show" ) ) {
- continue;
- }
- orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
- }
- }
-
- if ( !jQuery.isEmptyObject( orig ) ) {
- if ( dataShow ) {
- if ( "hidden" in dataShow ) {
- hidden = dataShow.hidden;
- }
- } else {
- dataShow = jQuery._data( elem, "fxshow", {} );
- }
-
- // store state if its toggle - enables .stop().toggle() to "reverse"
- if ( toggle ) {
- dataShow.hidden = !hidden;
- }
- if ( hidden ) {
- jQuery( elem ).show();
- } else {
- anim.done(function() {
- jQuery( elem ).hide();
- });
- }
- anim.done(function() {
- var prop;
- jQuery._removeData( elem, "fxshow" );
- for ( prop in orig ) {
- jQuery.style( elem, prop, orig[ prop ] );
- }
- });
- for ( prop in orig ) {
- tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
-
- if ( !( prop in dataShow ) ) {
- dataShow[ prop ] = tween.start;
- if ( hidden ) {
- tween.end = tween.start;
- tween.start = prop === "width" || prop === "height" ? 1 : 0;
- }
- }
- }
- }
-}
-
-function Tween( elem, options, prop, end, easing ) {
- return new Tween.prototype.init( elem, options, prop, end, easing );
-}
-jQuery.Tween = Tween;
-
-Tween.prototype = {
- constructor: Tween,
- init: function( elem, options, prop, end, easing, unit ) {
- this.elem = elem;
- this.prop = prop;
- this.easing = easing || "swing";
- this.options = options;
- this.start = this.now = this.cur();
- this.end = end;
- this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
- },
- cur: function() {
- var hooks = Tween.propHooks[ this.prop ];
-
- return hooks && hooks.get ?
- hooks.get( this ) :
- Tween.propHooks._default.get( this );
- },
- run: function( percent ) {
- var eased,
- hooks = Tween.propHooks[ this.prop ];
-
- if ( this.options.duration ) {
- this.pos = eased = jQuery.easing[ this.easing ](
- percent, this.options.duration * percent, 0, 1, this.options.duration
- );
- } else {
- this.pos = eased = percent;
- }
- this.now = ( this.end - this.start ) * eased + this.start;
-
- if ( this.options.step ) {
- this.options.step.call( this.elem, this.now, this );
- }
-
- if ( hooks && hooks.set ) {
- hooks.set( this );
- } else {
- Tween.propHooks._default.set( this );
- }
- return this;
- }
-};
-
-Tween.prototype.init.prototype = Tween.prototype;
-
-Tween.propHooks = {
- _default: {
- get: function( tween ) {
- var result;
-
- if ( tween.elem[ tween.prop ] != null &&
- (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
- return tween.elem[ tween.prop ];
- }
-
- // passing an empty string as a 3rd parameter to .css will automatically
- // attempt a parseFloat and fallback to a string if the parse fails
- // so, simple values such as "10px" are parsed to Float.
- // complex values such as "rotate(1rad)" are returned as is.
- result = jQuery.css( tween.elem, tween.prop, "" );
- // Empty strings, null, undefined and "auto" are converted to 0.
- return !result || result === "auto" ? 0 : result;
- },
- set: function( tween ) {
- // use step hook for back compat - use cssHook if its there - use .style if its
- // available and use plain properties where available
- if ( jQuery.fx.step[ tween.prop ] ) {
- jQuery.fx.step[ tween.prop ]( tween );
- } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
- jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
- } else {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
- }
-};
-
-// Support: IE <=9
-// Panic based approach to setting things on disconnected nodes
-
-Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
- set: function( tween ) {
- if ( tween.elem.nodeType && tween.elem.parentNode ) {
- tween.elem[ tween.prop ] = tween.now;
- }
- }
-};
-
-jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
- var cssFn = jQuery.fn[ name ];
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return speed == null || typeof speed === "boolean" ?
- cssFn.apply( this, arguments ) :
- this.animate( genFx( name, true ), speed, easing, callback );
- };
-});
-
-jQuery.fn.extend({
- fadeTo: function( speed, to, easing, callback ) {
-
- // show any hidden elements after setting opacity to 0
- return this.filter( isHidden ).css( "opacity", 0 ).show()
-
- // animate to the value specified
- .end().animate({ opacity: to }, speed, easing, callback );
- },
- animate: function( prop, speed, easing, callback ) {
- var empty = jQuery.isEmptyObject( prop ),
- optall = jQuery.speed( speed, easing, callback ),
- doAnimation = function() {
- // Operate on a copy of prop so per-property easing won't be lost
- var anim = Animation( this, jQuery.extend( {}, prop ), optall );
-
- // Empty animations, or finishing resolves immediately
- if ( empty || jQuery._data( this, "finish" ) ) {
- anim.stop( true );
- }
- };
- doAnimation.finish = doAnimation;
-
- return empty || optall.queue === false ?
- this.each( doAnimation ) :
- this.queue( optall.queue, doAnimation );
- },
- stop: function( type, clearQueue, gotoEnd ) {
- var stopQueue = function( hooks ) {
- var stop = hooks.stop;
- delete hooks.stop;
- stop( gotoEnd );
- };
-
- if ( typeof type !== "string" ) {
- gotoEnd = clearQueue;
- clearQueue = type;
- type = undefined;
- }
- if ( clearQueue && type !== false ) {
- this.queue( type || "fx", [] );
- }
-
- return this.each(function() {
- var dequeue = true,
- index = type != null && type + "queueHooks",
- timers = jQuery.timers,
- data = jQuery._data( this );
-
- if ( index ) {
- if ( data[ index ] && data[ index ].stop ) {
- stopQueue( data[ index ] );
- }
- } else {
- for ( index in data ) {
- if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
- stopQueue( data[ index ] );
- }
- }
- }
-
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
- timers[ index ].anim.stop( gotoEnd );
- dequeue = false;
- timers.splice( index, 1 );
- }
- }
-
- // start the next in the queue if the last step wasn't forced
- // timers currently will call their complete callbacks, which will dequeue
- // but only if they were gotoEnd
- if ( dequeue || !gotoEnd ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- finish: function( type ) {
- if ( type !== false ) {
- type = type || "fx";
- }
- return this.each(function() {
- var index,
- data = jQuery._data( this ),
- queue = data[ type + "queue" ],
- hooks = data[ type + "queueHooks" ],
- timers = jQuery.timers,
- length = queue ? queue.length : 0;
-
- // enable finishing flag on private data
- data.finish = true;
-
- // empty the queue first
- jQuery.queue( this, type, [] );
-
- if ( hooks && hooks.stop ) {
- hooks.stop.call( this, true );
- }
-
- // look for any active animations, and finish them
- for ( index = timers.length; index--; ) {
- if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
- timers[ index ].anim.stop( true );
- timers.splice( index, 1 );
- }
- }
-
- // look for any animations in the old queue and finish them
- for ( index = 0; index < length; index++ ) {
- if ( queue[ index ] && queue[ index ].finish ) {
- queue[ index ].finish.call( this );
- }
- }
-
- // turn off finishing flag
- delete data.finish;
- });
- }
-});
-
-// Generate parameters to create a standard animation
-function genFx( type, includeWidth ) {
- var which,
- attrs = { height: type },
- i = 0;
-
- // if we include width, step value is 1 to do all cssExpand values,
- // if we don't include width, step value is 2 to skip over Left and Right
- includeWidth = includeWidth? 1 : 0;
- for( ; i < 4 ; i += 2 - includeWidth ) {
- which = cssExpand[ i ];
- attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
- }
-
- if ( includeWidth ) {
- attrs.opacity = attrs.width = type;
- }
-
- return attrs;
-}
-
-// Generate shortcuts for custom animations
-jQuery.each({
- slideDown: genFx("show"),
- slideUp: genFx("hide"),
- slideToggle: genFx("toggle"),
- fadeIn: { opacity: "show" },
- fadeOut: { opacity: "hide" },
- fadeToggle: { opacity: "toggle" }
-}, function( name, props ) {
- jQuery.fn[ name ] = function( speed, easing, callback ) {
- return this.animate( props, speed, easing, callback );
- };
-});
-
-jQuery.speed = function( speed, easing, fn ) {
- var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
- complete: fn || !fn && easing ||
- jQuery.isFunction( speed ) && speed,
- duration: speed,
- easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
- };
-
- opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
- opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
-
- // normalize opt.queue - true/undefined/null -> "fx"
- if ( opt.queue == null || opt.queue === true ) {
- opt.queue = "fx";
- }
-
- // Queueing
- opt.old = opt.complete;
-
- opt.complete = function() {
- if ( jQuery.isFunction( opt.old ) ) {
- opt.old.call( this );
- }
-
- if ( opt.queue ) {
- jQuery.dequeue( this, opt.queue );
- }
- };
-
- return opt;
-};
-
-jQuery.easing = {
- linear: function( p ) {
- return p;
- },
- swing: function( p ) {
- return 0.5 - Math.cos( p*Math.PI ) / 2;
- }
-};
-
-jQuery.timers = [];
-jQuery.fx = Tween.prototype.init;
-jQuery.fx.tick = function() {
- var timer,
- timers = jQuery.timers,
- i = 0;
-
- fxNow = jQuery.now();
-
- for ( ; i < timers.length; i++ ) {
- timer = timers[ i ];
- // Checks the timer has not already been removed
- if ( !timer() && timers[ i ] === timer ) {
- timers.splice( i--, 1 );
- }
- }
-
- if ( !timers.length ) {
- jQuery.fx.stop();
- }
- fxNow = undefined;
-};
-
-jQuery.fx.timer = function( timer ) {
- if ( timer() && jQuery.timers.push( timer ) ) {
- jQuery.fx.start();
- }
-};
-
-jQuery.fx.interval = 13;
-
-jQuery.fx.start = function() {
- if ( !timerId ) {
- timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
- }
-};
-
-jQuery.fx.stop = function() {
- clearInterval( timerId );
- timerId = null;
-};
-
-jQuery.fx.speeds = {
- slow: 600,
- fast: 200,
- // Default speed
- _default: 400
-};
-
-// Back Compat <1.8 extension point
-jQuery.fx.step = {};
-
-if ( jQuery.expr && jQuery.expr.filters ) {
- jQuery.expr.filters.animated = function( elem ) {
- return jQuery.grep(jQuery.timers, function( fn ) {
- return elem === fn.elem;
- }).length;
- };
-}
-jQuery.fn.offset = function( options ) {
- if ( arguments.length ) {
- return options === undefined ?
- this :
- this.each(function( i ) {
- jQuery.offset.setOffset( this, options, i );
- });
- }
-
- var docElem, win,
- box = { top: 0, left: 0 },
- elem = this[ 0 ],
- doc = elem && elem.ownerDocument;
-
- if ( !doc ) {
- return;
- }
-
- docElem = doc.documentElement;
-
- // Make sure it's not a disconnected DOM node
- if ( !jQuery.contains( docElem, elem ) ) {
- return box;
- }
-
- // If we don't have gBCR, just use 0,0 rather than error
- // BlackBerry 5, iOS 3 (original iPhone)
- if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
- box = elem.getBoundingClientRect();
- }
- win = getWindow( doc );
- return {
- top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ),
- left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
- };
-};
-
-jQuery.offset = {
-
- setOffset: function( elem, options, i ) {
- var position = jQuery.css( elem, "position" );
-
- // set position first, in-case top/left are set even on static elem
- if ( position === "static" ) {
- elem.style.position = "relative";
- }
-
- var curElem = jQuery( elem ),
- curOffset = curElem.offset(),
- curCSSTop = jQuery.css( elem, "top" ),
- curCSSLeft = jQuery.css( elem, "left" ),
- calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
- props = {}, curPosition = {}, curTop, curLeft;
-
- // need to be able to calculate position if either top or left is auto and position is either absolute or fixed
- if ( calculatePosition ) {
- curPosition = curElem.position();
- curTop = curPosition.top;
- curLeft = curPosition.left;
- } else {
- curTop = parseFloat( curCSSTop ) || 0;
- curLeft = parseFloat( curCSSLeft ) || 0;
- }
-
- if ( jQuery.isFunction( options ) ) {
- options = options.call( elem, i, curOffset );
- }
-
- if ( options.top != null ) {
- props.top = ( options.top - curOffset.top ) + curTop;
- }
- if ( options.left != null ) {
- props.left = ( options.left - curOffset.left ) + curLeft;
- }
-
- if ( "using" in options ) {
- options.using.call( elem, props );
- } else {
- curElem.css( props );
- }
- }
-};
-
-
-jQuery.fn.extend({
-
- position: function() {
- if ( !this[ 0 ] ) {
- return;
- }
-
- var offsetParent, offset,
- parentOffset = { top: 0, left: 0 },
- elem = this[ 0 ];
-
- // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
- if ( jQuery.css( elem, "position" ) === "fixed" ) {
- // we assume that getBoundingClientRect is available when computed position is fixed
- offset = elem.getBoundingClientRect();
- } else {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
- parentOffset = offsetParent.offset();
- }
-
- // Add offsetParent borders
- parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
- parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
- }
-
- // Subtract parent offsets and element margins
- // note: when an element has margin: auto the offsetLeft and marginLeft
- // are the same in Safari causing offset.left to incorrectly be 0
- return {
- top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ),
- left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
- };
- },
-
- offsetParent: function() {
- return this.map(function() {
- var offsetParent = this.offsetParent || docElem;
- while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
- offsetParent = offsetParent.offsetParent;
- }
- return offsetParent || docElem;
- });
- }
-});
-
-
-// Create scrollLeft and scrollTop methods
-jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
- var top = /Y/.test( prop );
-
- jQuery.fn[ method ] = function( val ) {
- return jQuery.access( this, function( elem, method, val ) {
- var win = getWindow( elem );
-
- if ( val === undefined ) {
- return win ? (prop in win) ? win[ prop ] :
- win.document.documentElement[ method ] :
- elem[ method ];
- }
-
- if ( win ) {
- win.scrollTo(
- !top ? val : jQuery( win ).scrollLeft(),
- top ? val : jQuery( win ).scrollTop()
- );
-
- } else {
- elem[ method ] = val;
- }
- }, method, val, arguments.length, null );
- };
-});
-
-function getWindow( elem ) {
- return jQuery.isWindow( elem ) ?
- elem :
- elem.nodeType === 9 ?
- elem.defaultView || elem.parentWindow :
- false;
-}
-// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
-jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
- jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
- // margin is only for outerHeight, outerWidth
- jQuery.fn[ funcName ] = function( margin, value ) {
- var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
- extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
-
- return jQuery.access( this, function( elem, type, value ) {
- var doc;
-
- if ( jQuery.isWindow( elem ) ) {
- // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
- // isn't a whole lot we can do. See pull request at this URL for discussion:
- // https://github.com/jquery/jquery/pull/764
- return elem.document.documentElement[ "client" + name ];
- }
-
- // Get document width or height
- if ( elem.nodeType === 9 ) {
- doc = elem.documentElement;
-
- // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
- // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
- return Math.max(
- elem.body[ "scroll" + name ], doc[ "scroll" + name ],
- elem.body[ "offset" + name ], doc[ "offset" + name ],
- doc[ "client" + name ]
- );
- }
-
- return value === undefined ?
- // Get width or height on the element, requesting but not forcing parseFloat
- jQuery.css( elem, type, extra ) :
-
- // Set width or height on the element
- jQuery.style( elem, type, value, extra );
- }, type, chainable ? margin : undefined, chainable, null );
- };
- });
-});
-// Limit scope pollution from any deprecated API
-// (function() {
-
-// The number of elements contained in the matched element set
-jQuery.fn.size = function() {
- return this.length;
-};
-
-jQuery.fn.andSelf = jQuery.fn.addBack;
-
-// })();
-if ( typeof module === "object" && module && typeof module.exports === "object" ) {
- // Expose jQuery as module.exports in loaders that implement the Node
- // module pattern (including browserify). Do not create the global, since
- // the user will be storing it themselves locally, and globals are frowned
- // upon in the Node module world.
- module.exports = jQuery;
-} else {
- // Otherwise expose jQuery to the global object as usual
- window.jQuery = window.$ = jQuery;
-
- // Register as a named AMD module, since jQuery can be concatenated with other
- // files that may use define, but not via a proper concatenation script that
- // understands anonymous AMD modules. A named AMD is safest and most robust
- // way to register. Lowercase jquery is used because AMD module names are
- // derived from file names, and jQuery is normally delivered in a lowercase
- // file name. Do this after creating the global so that if an AMD module wants
- // to call noConflict to hide this version of jQuery, it will work.
- if ( typeof define === "function" && define.amd ) {
- define( "jquery", [], function () { return jQuery; } );
- }
-}
-
-})( window );
diff --git a/usecaseui-common/src/main/webapp/static/js/jquery-ui.js b/usecaseui-common/src/main/webapp/static/js/jquery-ui.js
deleted file mode 100644
index 31ee9cd8..00000000
--- a/usecaseui-common/src/main/webapp/static/js/jquery-ui.js
+++ /dev/null
@@ -1,16617 +0,0 @@
-/*! jQuery UI - v1.11.4 - 2015-03-11
-* http://jqueryui.com
-* Includes: core.js, widget.js, mouse.js, position.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, draggable.js, droppable.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js, menu.js, progressbar.js, resizable.js, selectable.js, selectmenu.js, slider.js, sortable.js, spinner.js, tabs.js, tooltip.js
-* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
-
-(function( factory ) {
- if ( typeof define === "function" && define.amd ) {
-
- // AMD. Register as an anonymous module.
- define([ "jquery" ], factory );
- } else {
-
- // Browser globals
- factory( jQuery );
- }
-}(function( $ ) {
-/*!
- * jQuery UI Core 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/category/ui-core/
- */
-
-
-// $.ui might exist from components with no dependencies, e.g., $.ui.position
-$.ui = $.ui || {};
-
-$.extend( $.ui, {
- version: "1.11.4",
-
- keyCode: {
- BACKSPACE: 8,
- COMMA: 188,
- DELETE: 46,
- DOWN: 40,
- END: 35,
- ENTER: 13,
- ESCAPE: 27,
- HOME: 36,
- LEFT: 37,
- PAGE_DOWN: 34,
- PAGE_UP: 33,
- PERIOD: 190,
- RIGHT: 39,
- SPACE: 32,
- TAB: 9,
- UP: 38
- }
-});
-
-// plugins
-$.fn.extend({
- scrollParent: function( includeHidden ) {
- var position = this.css( "position" ),
- excludeStaticParent = position === "absolute",
- overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
- scrollParent = this.parents().filter( function() {
- var parent = $( this );
- if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
- return false;
- }
- return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
- }).eq( 0 );
-
- return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
- },
-
- uniqueId: (function() {
- var uuid = 0;
-
- return function() {
- return this.each(function() {
- if ( !this.id ) {
- this.id = "ui-id-" + ( ++uuid );
- }
- });
- };
- })(),
-
- removeUniqueId: function() {
- return this.each(function() {
- if ( /^ui-id-\d+$/.test( this.id ) ) {
- $( this ).removeAttr( "id" );
- }
- });
- }
-});
-
-// selectors
-function focusable( element, isTabIndexNotNaN ) {
- var map, mapName, img,
- nodeName = element.nodeName.toLowerCase();
- if ( "area" === nodeName ) {
- map = element.parentNode;
- mapName = map.name;
- if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
- return false;
- }
- img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
- return !!img && visible( img );
- }
- return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
- !element.disabled :
- "a" === nodeName ?
- element.href || isTabIndexNotNaN :
- isTabIndexNotNaN) &&
- // the element and all of its ancestors must be visible
- visible( element );
-}
-
-function visible( element ) {
- return $.expr.filters.visible( element ) &&
- !$( element ).parents().addBack().filter(function() {
- return $.css( this, "visibility" ) === "hidden";
- }).length;
-}
-
-$.extend( $.expr[ ":" ], {
- data: $.expr.createPseudo ?
- $.expr.createPseudo(function( dataName ) {
- return function( elem ) {
- return !!$.data( elem, dataName );
- };
- }) :
- // support: jQuery <1.8
- function( elem, i, match ) {
- return !!$.data( elem, match[ 3 ] );
- },
-
- focusable: function( element ) {
- return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
- },
-
- tabbable: function( element ) {
- var tabIndex = $.attr( element, "tabindex" ),
- isTabIndexNaN = isNaN( tabIndex );
- return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
- }
-});
-
-// support: jQuery <1.8
-if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
- $.each( [ "Width", "Height" ], function( i, name ) {
- var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
- type = name.toLowerCase(),
- orig = {
- innerWidth: $.fn.innerWidth,
- innerHeight: $.fn.innerHeight,
- outerWidth: $.fn.outerWidth,
- outerHeight: $.fn.outerHeight
- };
-
- function reduce( elem, size, border, margin ) {
- $.each( side, function() {
- size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
- if ( border ) {
- size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
- }
- if ( margin ) {
- size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
- }
- });
- return size;
- }
-
- $.fn[ "inner" + name ] = function( size ) {
- if ( size === undefined ) {
- return orig[ "inner" + name ].call( this );
- }
-
- return this.each(function() {
- $( this ).css( type, reduce( this, size ) + "px" );
- });
- };
-
- $.fn[ "outer" + name] = function( size, margin ) {
- if ( typeof size !== "number" ) {
- return orig[ "outer" + name ].call( this, size );
- }
-
- return this.each(function() {
- $( this).css( type, reduce( this, size, true, margin ) + "px" );
- });
- };
- });
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
-if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
- $.fn.removeData = (function( removeData ) {
- return function( key ) {
- if ( arguments.length ) {
- return removeData.call( this, $.camelCase( key ) );
- } else {
- return removeData.call( this );
- }
- };
- })( $.fn.removeData );
-}
-
-// deprecated
-$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
-
-$.fn.extend({
- focus: (function( orig ) {
- return function( delay, fn ) {
- return typeof delay === "number" ?
- this.each(function() {
- var elem = this;
- setTimeout(function() {
- $( elem ).focus();
- if ( fn ) {
- fn.call( elem );
- }
- }, delay );
- }) :
- orig.apply( this, arguments );
- };
- })( $.fn.focus ),
-
- disableSelection: (function() {
- var eventType = "onselectstart" in document.createElement( "div" ) ?
- "selectstart" :
- "mousedown";
-
- return function() {
- return this.bind( eventType + ".ui-disableSelection", function( event ) {
- event.preventDefault();
- });
- };
- })(),
-
- enableSelection: function() {
- return this.unbind( ".ui-disableSelection" );
- },
-
- zIndex: function( zIndex ) {
- if ( zIndex !== undefined ) {
- return this.css( "zIndex", zIndex );
- }
-
- if ( this.length ) {
- var elem = $( this[ 0 ] ), position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
- }
-
- return 0;
- }
-});
-
-// $.ui.plugin is deprecated. Use $.widget() extensions instead.
-$.ui.plugin = {
- add: function( module, option, set ) {
- var i,
- proto = $.ui[ module ].prototype;
- for ( i in set ) {
- proto.plugins[ i ] = proto.plugins[ i ] || [];
- proto.plugins[ i ].push( [ option, set[ i ] ] );
- }
- },
- call: function( instance, name, args, allowDisconnected ) {
- var i,
- set = instance.plugins[ name ];
-
- if ( !set ) {
- return;
- }
-
- if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
- return;
- }
-
- for ( i = 0; i < set.length; i++ ) {
- if ( instance.options[ set[ i ][ 0 ] ] ) {
- set[ i ][ 1 ].apply( instance.element, args );
- }
- }
- }
-};
-
-
-/*!
- * jQuery UI Widget 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/jQuery.widget/
- */
-
-
-var widget_uuid = 0,
- widget_slice = Array.prototype.slice;
-
-$.cleanData = (function( orig ) {
- return function( elems ) {
- var events, elem, i;
- for ( i = 0; (elem = elems[i]) != null; i++ ) {
- try {
-
- // Only trigger remove when necessary to save time
- events = $._data( elem, "events" );
- if ( events && events.remove ) {
- $( elem ).triggerHandler( "remove" );
- }
-
- // http://bugs.jquery.com/ticket/8235
- } catch ( e ) {}
- }
- orig( elems );
- };
-})( $.cleanData );
-
-$.widget = function( name, base, prototype ) {
- var fullName, existingConstructor, constructor, basePrototype,
- // proxiedPrototype allows the provided prototype to remain unmodified
- // so that it can be used as a mixin for multiple widgets (#8876)
- proxiedPrototype = {},
- namespace = name.split( "." )[ 0 ];
-
- name = name.split( "." )[ 1 ];
- fullName = namespace + "-" + name;
-
- if ( !prototype ) {
- prototype = base;
- base = $.Widget;
- }
-
- // create selector for plugin
- $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
- return !!$.data( elem, fullName );
- };
-
- $[ namespace ] = $[ namespace ] || {};
- existingConstructor = $[ namespace ][ name ];
- constructor = $[ namespace ][ name ] = function( options, element ) {
- // allow instantiation without "new" keyword
- if ( !this._createWidget ) {
- return new constructor( options, element );
- }
-
- // allow instantiation without initializing for simple inheritance
- // must use "new" keyword (the code above always passes args)
- if ( arguments.length ) {
- this._createWidget( options, element );
- }
- };
- // extend with the existing constructor to carry over any static properties
- $.extend( constructor, existingConstructor, {
- version: prototype.version,
- // copy the object used to create the prototype in case we need to
- // redefine the widget later
- _proto: $.extend( {}, prototype ),
- // track widgets that inherit from this widget in case this widget is
- // redefined after a widget inherits from it
- _childConstructors: []
- });
-
- basePrototype = new base();
- // we need to make the options hash a property directly on the new instance
- // otherwise we'll modify the options hash on the prototype that we're
- // inheriting from
- basePrototype.options = $.widget.extend( {}, basePrototype.options );
- $.each( prototype, function( prop, value ) {
- if ( !$.isFunction( value ) ) {
- proxiedPrototype[ prop ] = value;
- return;
- }
- proxiedPrototype[ prop ] = (function() {
- var _super = function() {
- return base.prototype[ prop ].apply( this, arguments );
- },
- _superApply = function( args ) {
- return base.prototype[ prop ].apply( this, args );
- };
- return function() {
- var __super = this._super,
- __superApply = this._superApply,
- returnValue;
-
- this._super = _super;
- this._superApply = _superApply;
-
- returnValue = value.apply( this, arguments );
-
- this._super = __super;
- this._superApply = __superApply;
-
- return returnValue;
- };
- })();
- });
- constructor.prototype = $.widget.extend( basePrototype, {
- // TODO: remove support for widgetEventPrefix
- // always use the name + a colon as the prefix, e.g., draggable:start
- // don't prefix for widgets that aren't DOM-based
- widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
- }, proxiedPrototype, {
- constructor: constructor,
- namespace: namespace,
- widgetName: name,
- widgetFullName: fullName
- });
-
- // If this widget is being redefined then we need to find all widgets that
- // are inheriting from it and redefine all of them so that they inherit from
- // the new version of this widget. We're essentially trying to replace one
- // level in the prototype chain.
- if ( existingConstructor ) {
- $.each( existingConstructor._childConstructors, function( i, child ) {
- var childPrototype = child.prototype;
-
- // redefine the child widget using the same prototype that was
- // originally used, but inherit from the new version of the base
- $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
- });
- // remove the list of existing child constructors from the old constructor
- // so the old child constructors can be garbage collected
- delete existingConstructor._childConstructors;
- } else {
- base._childConstructors.push( constructor );
- }
-
- $.widget.bridge( name, constructor );
-
- return constructor;
-};
-
-$.widget.extend = function( target ) {
- var input = widget_slice.call( arguments, 1 ),
- inputIndex = 0,
- inputLength = input.length,
- key,
- value;
- for ( ; inputIndex < inputLength; inputIndex++ ) {
- for ( key in input[ inputIndex ] ) {
- value = input[ inputIndex ][ key ];
- if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
- // Clone objects
- if ( $.isPlainObject( value ) ) {
- target[ key ] = $.isPlainObject( target[ key ] ) ?
- $.widget.extend( {}, target[ key ], value ) :
- // Don't extend strings, arrays, etc. with objects
- $.widget.extend( {}, value );
- // Copy everything else by reference
- } else {
- target[ key ] = value;
- }
- }
- }
- }
- return target;
-};
-
-$.widget.bridge = function( name, object ) {
- var fullName = object.prototype.widgetFullName || name;
- $.fn[ name ] = function( options ) {
- var isMethodCall = typeof options === "string",
- args = widget_slice.call( arguments, 1 ),
- returnValue = this;
-
- if ( isMethodCall ) {
- this.each(function() {
- var methodValue,
- instance = $.data( this, fullName );
- if ( options === "instance" ) {
- returnValue = instance;
- return false;
- }
- if ( !instance ) {
- return $.error( "cannot call methods on " + name + " prior to initialization; " +
- "attempted to call method '" + options + "'" );
- }
- if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
- return $.error( "no such method '" + options + "' for " + name + " widget instance" );
- }
- methodValue = instance[ options ].apply( instance, args );
- if ( methodValue !== instance && methodValue !== undefined ) {
- returnValue = methodValue && methodValue.jquery ?
- returnValue.pushStack( methodValue.get() ) :
- methodValue;
- return false;
- }
- });
- } else {
-
- // Allow multiple hashes to be passed on init
- if ( args.length ) {
- options = $.widget.extend.apply( null, [ options ].concat(args) );
- }
-
- this.each(function() {
- var instance = $.data( this, fullName );
- if ( instance ) {
- instance.option( options || {} );
- if ( instance._init ) {
- instance._init();
- }
- } else {
- $.data( this, fullName, new object( options, this ) );
- }
- });
- }
-
- return returnValue;
- };
-};
-
-$.Widget = function( /* options, element */ ) {};
-$.Widget._childConstructors = [];
-
-$.Widget.prototype = {
- widgetName: "widget",
- widgetEventPrefix: "",
- defaultElement: "<div>",
- options: {
- disabled: false,
-
- // callbacks
- create: null
- },
- _createWidget: function( options, element ) {
- element = $( element || this.defaultElement || this )[ 0 ];
- this.element = $( element );
- this.uuid = widget_uuid++;
- this.eventNamespace = "." + this.widgetName + this.uuid;
-
- this.bindings = $();
- this.hoverable = $();
- this.focusable = $();
-
- if ( element !== this ) {
- $.data( element, this.widgetFullName, this );
- this._on( true, this.element, {
- remove: function( event ) {
- if ( event.target === element ) {
- this.destroy();
- }
- }
- });
- this.document = $( element.style ?
- // element within the document
- element.ownerDocument :
- // element is window or document
- element.document || element );
- this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
- }
-
- this.options = $.widget.extend( {},
- this.options,
- this._getCreateOptions(),
- options );
-
- this._create();
- this._trigger( "create", null, this._getCreateEventData() );
- this._init();
- },
- _getCreateOptions: $.noop,
- _getCreateEventData: $.noop,
- _create: $.noop,
- _init: $.noop,
-
- destroy: function() {
- this._destroy();
- // we can probably remove the unbind calls in 2.0
- // all event bindings should go through this._on()
- this.element
- .unbind( this.eventNamespace )
- .removeData( this.widgetFullName )
- // support: jquery <1.6.3
- // http://bugs.jquery.com/ticket/9413
- .removeData( $.camelCase( this.widgetFullName ) );
- this.widget()
- .unbind( this.eventNamespace )
- .removeAttr( "aria-disabled" )
- .removeClass(
- this.widgetFullName + "-disabled " +
- "ui-state-disabled" );
-
- // clean up events and states
- this.bindings.unbind( this.eventNamespace );
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- },
- _destroy: $.noop,
-
- widget: function() {
- return this.element;
- },
-
- option: function( key, value ) {
- var options = key,
- parts,
- curOption,
- i;
-
- if ( arguments.length === 0 ) {
- // don't return a reference to the internal hash
- return $.widget.extend( {}, this.options );
- }
-
- if ( typeof key === "string" ) {
- // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
- options = {};
- parts = key.split( "." );
- key = parts.shift();
- if ( parts.length ) {
- curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
- for ( i = 0; i < parts.length - 1; i++ ) {
- curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
- curOption = curOption[ parts[ i ] ];
- }
- key = parts.pop();
- if ( arguments.length === 1 ) {
- return curOption[ key ] === undefined ? null : curOption[ key ];
- }
- curOption[ key ] = value;
- } else {
- if ( arguments.length === 1 ) {
- return this.options[ key ] === undefined ? null : this.options[ key ];
- }
- options[ key ] = value;
- }
- }
-
- this._setOptions( options );
-
- return this;
- },
- _setOptions: function( options ) {
- var key;
-
- for ( key in options ) {
- this._setOption( key, options[ key ] );
- }
-
- return this;
- },
- _setOption: function( key, value ) {
- this.options[ key ] = value;
-
- if ( key === "disabled" ) {
- this.widget()
- .toggleClass( this.widgetFullName + "-disabled", !!value );
-
- // If the widget is becoming disabled, then nothing is interactive
- if ( value ) {
- this.hoverable.removeClass( "ui-state-hover" );
- this.focusable.removeClass( "ui-state-focus" );
- }
- }
-
- return this;
- },
-
- enable: function() {
- return this._setOptions({ disabled: false });
- },
- disable: function() {
- return this._setOptions({ disabled: true });
- },
-
- _on: function( suppressDisabledCheck, element, handlers ) {
- var delegateElement,
- instance = this;
-
- // no suppressDisabledCheck flag, shuffle arguments
- if ( typeof suppressDisabledCheck !== "boolean" ) {
- handlers = element;
- element = suppressDisabledCheck;
- suppressDisabledCheck = false;
- }
-
- // no element argument, shuffle and use this.element
- if ( !handlers ) {
- handlers = element;
- element = this.element;
- delegateElement = this.widget();
- } else {
- element = delegateElement = $( element );
- this.bindings = this.bindings.add( element );
- }
-
- $.each( handlers, function( event, handler ) {
- function handlerProxy() {
- // allow widgets to customize the disabled handling
- // - disabled as an array instead of boolean
- // - disabled class as method for disabling individual parts
- if ( !suppressDisabledCheck &&
- ( instance.options.disabled === true ||
- $( this ).hasClass( "ui-state-disabled" ) ) ) {
- return;
- }
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
-
- // copy the guid so direct unbinding works
- if ( typeof handler !== "string" ) {
- handlerProxy.guid = handler.guid =
- handler.guid || handlerProxy.guid || $.guid++;
- }
-
- var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
- eventName = match[1] + instance.eventNamespace,
- selector = match[2];
- if ( selector ) {
- delegateElement.delegate( selector, eventName, handlerProxy );
- } else {
- element.bind( eventName, handlerProxy );
- }
- });
- },
-
- _off: function( element, eventName ) {
- eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
- this.eventNamespace;
- element.unbind( eventName ).undelegate( eventName );
-
- // Clear the stack to avoid memory leaks (#10056)
- this.bindings = $( this.bindings.not( element ).get() );
- this.focusable = $( this.focusable.not( element ).get() );
- this.hoverable = $( this.hoverable.not( element ).get() );
- },
-
- _delay: function( handler, delay ) {
- function handlerProxy() {
- return ( typeof handler === "string" ? instance[ handler ] : handler )
- .apply( instance, arguments );
- }
- var instance = this;
- return setTimeout( handlerProxy, delay || 0 );
- },
-
- _hoverable: function( element ) {
- this.hoverable = this.hoverable.add( element );
- this._on( element, {
- mouseenter: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-hover" );
- },
- mouseleave: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-hover" );
- }
- });
- },
-
- _focusable: function( element ) {
- this.focusable = this.focusable.add( element );
- this._on( element, {
- focusin: function( event ) {
- $( event.currentTarget ).addClass( "ui-state-focus" );
- },
- focusout: function( event ) {
- $( event.currentTarget ).removeClass( "ui-state-focus" );
- }
- });
- },
-
- _trigger: function( type, event, data ) {
- var prop, orig,
- callback = this.options[ type ];
-
- data = data || {};
- event = $.Event( event );
- event.type = ( type === this.widgetEventPrefix ?
- type :
- this.widgetEventPrefix + type ).toLowerCase();
- // the original event may come from any element
- // so we need to reset the target on the new event
- event.target = this.element[ 0 ];
-
- // copy original event properties over to the new event
- orig = event.originalEvent;
- if ( orig ) {
- for ( prop in orig ) {
- if ( !( prop in event ) ) {
- event[ prop ] = orig[ prop ];
- }
- }
- }
-
- this.element.trigger( event, data );
- return !( $.isFunction( callback ) &&
- callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
- event.isDefaultPrevented() );
- }
-};
-
-$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
- $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
- if ( typeof options === "string" ) {
- options = { effect: options };
- }
- var hasOptions,
- effectName = !options ?
- method :
- options === true || typeof options === "number" ?
- defaultEffect :
- options.effect || defaultEffect;
- options = options || {};
- if ( typeof options === "number" ) {
- options = { duration: options };
- }
- hasOptions = !$.isEmptyObject( options );
- options.complete = callback;
- if ( options.delay ) {
- element.delay( options.delay );
- }
- if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
- element[ method ]( options );
- } else if ( effectName !== method && element[ effectName ] ) {
- element[ effectName ]( options.duration, options.easing, callback );
- } else {
- element.queue(function( next ) {
- $( this )[ method ]();
- if ( callback ) {
- callback.call( element[ 0 ] );
- }
- next();
- });
- }
- };
-});
-
-var widget = $.widget;
-
-
-/*!
- * jQuery UI Mouse 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/mouse/
- */
-
-
-var mouseHandled = false;
-$( document ).mouseup( function() {
- mouseHandled = false;
-});
-
-var mouse = $.widget("ui.mouse", {
- version: "1.11.4",
- options: {
- cancel: "input,textarea,button,select,option",
- distance: 1,
- delay: 0
- },
- _mouseInit: function() {
- var that = this;
-
- this.element
- .bind("mousedown." + this.widgetName, function(event) {
- return that._mouseDown(event);
- })
- .bind("click." + this.widgetName, function(event) {
- if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, that.widgetName + ".preventClickEvent");
- event.stopImmediatePropagation();
- return false;
- }
- });
-
- this.started = false;
- },
-
- // TODO: make sure destroying one instance of mouse doesn't mess with
- // other instances of mouse
- _mouseDestroy: function() {
- this.element.unbind("." + this.widgetName);
- if ( this._mouseMoveDelegate ) {
- this.document
- .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
- .unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
- }
- },
-
- _mouseDown: function(event) {
- // don't let more than one widget handle mouseStart
- if ( mouseHandled ) {
- return;
- }
-
- this._mouseMoved = false;
-
- // we may have missed mouseup (out of window)
- (this._mouseStarted && this._mouseUp(event));
-
- this._mouseDownEvent = event;
-
- var that = this,
- btnIsLeft = (event.which === 1),
- // event.target.nodeName works around a bug in IE 8 with
- // disabled inputs (#7620)
- elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
- if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
- return true;
- }
-
- this.mouseDelayMet = !this.options.delay;
- if (!this.mouseDelayMet) {
- this._mouseDelayTimer = setTimeout(function() {
- that.mouseDelayMet = true;
- }, this.options.delay);
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted = (this._mouseStart(event) !== false);
- if (!this._mouseStarted) {
- event.preventDefault();
- return true;
- }
- }
-
- // Click event may never have fired (Gecko & Opera)
- if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
- $.removeData(event.target, this.widgetName + ".preventClickEvent");
- }
-
- // these delegates are required to keep context
- this._mouseMoveDelegate = function(event) {
- return that._mouseMove(event);
- };
- this._mouseUpDelegate = function(event) {
- return that._mouseUp(event);
- };
-
- this.document
- .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
- .bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
-
- event.preventDefault();
-
- mouseHandled = true;
- return true;
- },
-
- _mouseMove: function(event) {
- // Only check for mouseups outside the document if you've moved inside the document
- // at least once. This prevents the firing of mouseup in the case of IE<9, which will
- // fire a mousemove event if content is placed under the cursor. See #7778
- // Support: IE <9
- if ( this._mouseMoved ) {
- // IE mouseup check - mouseup happened when mouse was out of window
- if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
- return this._mouseUp(event);
-
- // Iframe mouseup check - mouseup occurred in another document
- } else if ( !event.which ) {
- return this._mouseUp( event );
- }
- }
-
- if ( event.which || event.button ) {
- this._mouseMoved = true;
- }
-
- if (this._mouseStarted) {
- this._mouseDrag(event);
- return event.preventDefault();
- }
-
- if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
- this._mouseStarted =
- (this._mouseStart(this._mouseDownEvent, event) !== false);
- (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
- }
-
- return !this._mouseStarted;
- },
-
- _mouseUp: function(event) {
- this.document
- .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
- .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
-
- if (this._mouseStarted) {
- this._mouseStarted = false;
-
- if (event.target === this._mouseDownEvent.target) {
- $.data(event.target, this.widgetName + ".preventClickEvent", true);
- }
-
- this._mouseStop(event);
- }
-
- mouseHandled = false;
- return false;
- },
-
- _mouseDistanceMet: function(event) {
- return (Math.max(
- Math.abs(this._mouseDownEvent.pageX - event.pageX),
- Math.abs(this._mouseDownEvent.pageY - event.pageY)
- ) >= this.options.distance
- );
- },
-
- _mouseDelayMet: function(/* event */) {
- return this.mouseDelayMet;
- },
-
- // These are placeholder methods, to be overriden by extending plugin
- _mouseStart: function(/* event */) {},
- _mouseDrag: function(/* event */) {},
- _mouseStop: function(/* event */) {},
- _mouseCapture: function(/* event */) { return true; }
-});
-
-
-/*!
- * jQuery UI Position 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/position/
- */
-
-(function() {
-
-$.ui = $.ui || {};
-
-var cachedScrollbarWidth, supportsOffsetFractions,
- max = Math.max,
- abs = Math.abs,
- round = Math.round,
- rhorizontal = /left|center|right/,
- rvertical = /top|center|bottom/,
- roffset = /[\+\-]\d+(\.[\d]+)?%?/,
- rposition = /^\w+/,
- rpercent = /%$/,
- _position = $.fn.position;
-
-function getOffsets( offsets, width, height ) {
- return [
- parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
- parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
- ];
-}
-
-function parseCss( element, property ) {
- return parseInt( $.css( element, property ), 10 ) || 0;
-}
-
-function getDimensions( elem ) {
- var raw = elem[0];
- if ( raw.nodeType === 9 ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: 0, left: 0 }
- };
- }
- if ( $.isWindow( raw ) ) {
- return {
- width: elem.width(),
- height: elem.height(),
- offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
- };
- }
- if ( raw.preventDefault ) {
- return {
- width: 0,
- height: 0,
- offset: { top: raw.pageY, left: raw.pageX }
- };
- }
- return {
- width: elem.outerWidth(),
- height: elem.outerHeight(),
- offset: elem.offset()
- };
-}
-
-$.position = {
- scrollbarWidth: function() {
- if ( cachedScrollbarWidth !== undefined ) {
- return cachedScrollbarWidth;
- }
- var w1, w2,
- div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
- innerDiv = div.children()[0];
-
- $( "body" ).append( div );
- w1 = innerDiv.offsetWidth;
- div.css( "overflow", "scroll" );
-
- w2 = innerDiv.offsetWidth;
-
- if ( w1 === w2 ) {
- w2 = div[0].clientWidth;
- }
-
- div.remove();
-
- return (cachedScrollbarWidth = w1 - w2);
- },
- getScrollInfo: function( within ) {
- var overflowX = within.isWindow || within.isDocument ? "" :
- within.element.css( "overflow-x" ),
- overflowY = within.isWindow || within.isDocument ? "" :
- within.element.css( "overflow-y" ),
- hasOverflowX = overflowX === "scroll" ||
- ( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
- hasOverflowY = overflowY === "scroll" ||
- ( overflowY === "auto" && within.height < within.element[0].scrollHeight );
- return {
- width: hasOverflowY ? $.position.scrollbarWidth() : 0,
- height: hasOverflowX ? $.position.scrollbarWidth() : 0
- };
- },
- getWithinInfo: function( element ) {
- var withinElement = $( element || window ),
- isWindow = $.isWindow( withinElement[0] ),
- isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
- return {
- element: withinElement,
- isWindow: isWindow,
- isDocument: isDocument,
- offset: withinElement.offset() || { left: 0, top: 0 },
- scrollLeft: withinElement.scrollLeft(),
- scrollTop: withinElement.scrollTop(),
-
- // support: jQuery 1.6.x
- // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
- width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
- height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
- };
- }
-};
-
-$.fn.position = function( options ) {
- if ( !options || !options.of ) {
- return _position.apply( this, arguments );
- }
-
- // make a copy, we don't want to modify arguments
- options = $.extend( {}, options );
-
- var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
- target = $( options.of ),
- within = $.position.getWithinInfo( options.within ),
- scrollInfo = $.position.getScrollInfo( within ),
- collision = ( options.collision || "flip" ).split( " " ),
- offsets = {};
-
- dimensions = getDimensions( target );
- if ( target[0].preventDefault ) {
- // force left top to allow flipping
- options.at = "left top";
- }
- targetWidth = dimensions.width;
- targetHeight = dimensions.height;
- targetOffset = dimensions.offset;
- // clone to reuse original targetOffset later
- basePosition = $.extend( {}, targetOffset );
-
- // force my and at to have valid horizontal and vertical positions
- // if a value is missing or invalid, it will be converted to center
- $.each( [ "my", "at" ], function() {
- var pos = ( options[ this ] || "" ).split( " " ),
- horizontalOffset,
- verticalOffset;
-
- if ( pos.length === 1) {
- pos = rhorizontal.test( pos[ 0 ] ) ?
- pos.concat( [ "center" ] ) :
- rvertical.test( pos[ 0 ] ) ?
- [ "center" ].concat( pos ) :
- [ "center", "center" ];
- }
- pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
- pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
-
- // calculate offsets
- horizontalOffset = roffset.exec( pos[ 0 ] );
- verticalOffset = roffset.exec( pos[ 1 ] );
- offsets[ this ] = [
- horizontalOffset ? horizontalOffset[ 0 ] : 0,
- verticalOffset ? verticalOffset[ 0 ] : 0
- ];
-
- // reduce to just the positions without the offsets
- options[ this ] = [
- rposition.exec( pos[ 0 ] )[ 0 ],
- rposition.exec( pos[ 1 ] )[ 0 ]
- ];
- });
-
- // normalize collision option
- if ( collision.length === 1 ) {
- collision[ 1 ] = collision[ 0 ];
- }
-
- if ( options.at[ 0 ] === "right" ) {
- basePosition.left += targetWidth;
- } else if ( options.at[ 0 ] === "center" ) {
- basePosition.left += targetWidth / 2;
- }
-
- if ( options.at[ 1 ] === "bottom" ) {
- basePosition.top += targetHeight;
- } else if ( options.at[ 1 ] === "center" ) {
- basePosition.top += targetHeight / 2;
- }
-
- atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
- basePosition.left += atOffset[ 0 ];
- basePosition.top += atOffset[ 1 ];
-
- return this.each(function() {
- var collisionPosition, using,
- elem = $( this ),
- elemWidth = elem.outerWidth(),
- elemHeight = elem.outerHeight(),
- marginLeft = parseCss( this, "marginLeft" ),
- marginTop = parseCss( this, "marginTop" ),
- collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
- collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
- position = $.extend( {}, basePosition ),
- myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
-
- if ( options.my[ 0 ] === "right" ) {
- position.left -= elemWidth;
- } else if ( options.my[ 0 ] === "center" ) {
- position.left -= elemWidth / 2;
- }
-
- if ( options.my[ 1 ] === "bottom" ) {
- position.top -= elemHeight;
- } else if ( options.my[ 1 ] === "center" ) {
- position.top -= elemHeight / 2;
- }
-
- position.left += myOffset[ 0 ];
- position.top += myOffset[ 1 ];
-
- // if the browser doesn't support fractions, then round for consistent results
- if ( !supportsOffsetFractions ) {
- position.left = round( position.left );
- position.top = round( position.top );
- }
-
- collisionPosition = {
- marginLeft: marginLeft,
- marginTop: marginTop
- };
-
- $.each( [ "left", "top" ], function( i, dir ) {
- if ( $.ui.position[ collision[ i ] ] ) {
- $.ui.position[ collision[ i ] ][ dir ]( position, {
- targetWidth: targetWidth,
- targetHeight: targetHeight,
- elemWidth: elemWidth,
- elemHeight: elemHeight,
- collisionPosition: collisionPosition,
- collisionWidth: collisionWidth,
- collisionHeight: collisionHeight,
- offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
- my: options.my,
- at: options.at,
- within: within,
- elem: elem
- });
- }
- });
-
- if ( options.using ) {
- // adds feedback as second argument to using callback, if present
- using = function( props ) {
- var left = targetOffset.left - position.left,
- right = left + targetWidth - elemWidth,
- top = targetOffset.top - position.top,
- bottom = top + targetHeight - elemHeight,
- feedback = {
- target: {
- element: target,
- left: targetOffset.left,
- top: targetOffset.top,
- width: targetWidth,
- height: targetHeight
- },
- element: {
- element: elem,
- left: position.left,
- top: position.top,
- width: elemWidth,
- height: elemHeight
- },
- horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
- vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
- };
- if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
- feedback.horizontal = "center";
- }
- if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
- feedback.vertical = "middle";
- }
- if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
- feedback.important = "horizontal";
- } else {
- feedback.important = "vertical";
- }
- options.using.call( this, props, feedback );
- };
- }
-
- elem.offset( $.extend( position, { using: using } ) );
- });
-};
-
-$.ui.position = {
- fit: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
- outerWidth = within.width,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = withinOffset - collisionPosLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
- newOverRight;
-
- // element is wider than within
- if ( data.collisionWidth > outerWidth ) {
- // element is initially over the left side of within
- if ( overLeft > 0 && overRight <= 0 ) {
- newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
- position.left += overLeft - newOverRight;
- // element is initially over right side of within
- } else if ( overRight > 0 && overLeft <= 0 ) {
- position.left = withinOffset;
- // element is initially over both left and right sides of within
- } else {
- if ( overLeft > overRight ) {
- position.left = withinOffset + outerWidth - data.collisionWidth;
- } else {
- position.left = withinOffset;
- }
- }
- // too far left -> align with left edge
- } else if ( overLeft > 0 ) {
- position.left += overLeft;
- // too far right -> align with right edge
- } else if ( overRight > 0 ) {
- position.left -= overRight;
- // adjust based on position and margin
- } else {
- position.left = max( position.left - collisionPosLeft, position.left );
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
- outerHeight = data.within.height,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = withinOffset - collisionPosTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
- newOverBottom;
-
- // element is taller than within
- if ( data.collisionHeight > outerHeight ) {
- // element is initially over the top of within
- if ( overTop > 0 && overBottom <= 0 ) {
- newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
- position.top += overTop - newOverBottom;
- // element is initially over bottom of within
- } else if ( overBottom > 0 && overTop <= 0 ) {
- position.top = withinOffset;
- // element is initially over both top and bottom of within
- } else {
- if ( overTop > overBottom ) {
- position.top = withinOffset + outerHeight - data.collisionHeight;
- } else {
- position.top = withinOffset;
- }
- }
- // too far up -> align with top
- } else if ( overTop > 0 ) {
- position.top += overTop;
- // too far down -> align with bottom edge
- } else if ( overBottom > 0 ) {
- position.top -= overBottom;
- // adjust based on position and margin
- } else {
- position.top = max( position.top - collisionPosTop, position.top );
- }
- }
- },
- flip: {
- left: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.left + within.scrollLeft,
- outerWidth = within.width,
- offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
- collisionPosLeft = position.left - data.collisionPosition.marginLeft,
- overLeft = collisionPosLeft - offsetLeft,
- overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
- myOffset = data.my[ 0 ] === "left" ?
- -data.elemWidth :
- data.my[ 0 ] === "right" ?
- data.elemWidth :
- 0,
- atOffset = data.at[ 0 ] === "left" ?
- data.targetWidth :
- data.at[ 0 ] === "right" ?
- -data.targetWidth :
- 0,
- offset = -2 * data.offset[ 0 ],
- newOverRight,
- newOverLeft;
-
- if ( overLeft < 0 ) {
- newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
- if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
- position.left += myOffset + atOffset + offset;
- }
- } else if ( overRight > 0 ) {
- newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
- if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
- position.left += myOffset + atOffset + offset;
- }
- }
- },
- top: function( position, data ) {
- var within = data.within,
- withinOffset = within.offset.top + within.scrollTop,
- outerHeight = within.height,
- offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
- collisionPosTop = position.top - data.collisionPosition.marginTop,
- overTop = collisionPosTop - offsetTop,
- overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
- top = data.my[ 1 ] === "top",
- myOffset = top ?
- -data.elemHeight :
- data.my[ 1 ] === "bottom" ?
- data.elemHeight :
- 0,
- atOffset = data.at[ 1 ] === "top" ?
- data.targetHeight :
- data.at[ 1 ] === "bottom" ?
- -data.targetHeight :
- 0,
- offset = -2 * data.offset[ 1 ],
- newOverTop,
- newOverBottom;
- if ( overTop < 0 ) {
- newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
- if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
- position.top += myOffset + atOffset + offset;
- }
- } else if ( overBottom > 0 ) {
- newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
- if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
- position.top += myOffset + atOffset + offset;
- }
- }
- }
- },
- flipfit: {
- left: function() {
- $.ui.position.flip.left.apply( this, arguments );
- $.ui.position.fit.left.apply( this, arguments );
- },
- top: function() {
- $.ui.position.flip.top.apply( this, arguments );
- $.ui.position.fit.top.apply( this, arguments );
- }
- }
-};
-
-// fraction support test
-(function() {
- var testElement, testElementParent, testElementStyle, offsetLeft, i,
- body = document.getElementsByTagName( "body" )[ 0 ],
- div = document.createElement( "div" );
-
- //Create a "fake body" for testing based on method used in jQuery.support
- testElement = document.createElement( body ? "div" : "body" );
- testElementStyle = {
- visibility: "hidden",
- width: 0,
- height: 0,
- border: 0,
- margin: 0,
- background: "none"
- };
- if ( body ) {
- $.extend( testElementStyle, {
- position: "absolute",
- left: "-1000px",
- top: "-1000px"
- });
- }
- for ( i in testElementStyle ) {
- testElement.style[ i ] = testElementStyle[ i ];
- }
- testElement.appendChild( div );
- testElementParent = body || document.documentElement;
- testElementParent.insertBefore( testElement, testElementParent.firstChild );
-
- div.style.cssText = "position: absolute; left: 10.7432222px;";
-
- offsetLeft = $( div ).offset().left;
- supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
-
- testElement.innerHTML = "";
- testElementParent.removeChild( testElement );
-})();
-
-})();
-
-var position = $.ui.position;
-
-
-/*!
- * jQuery UI Accordion 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/accordion/
- */
-
-
-var accordion = $.widget( "ui.accordion", {
- version: "1.11.4",
- options: {
- active: 0,
- animate: {},
- collapsible: false,
- event: "click",
- header: "> li > :first-child,> :not(li):even",
- heightStyle: "auto",
- icons: {
- activeHeader: "ui-icon-triangle-1-s",
- header: "ui-icon-triangle-1-e"
- },
-
- // callbacks
- activate: null,
- beforeActivate: null
- },
-
- hideProps: {
- borderTopWidth: "hide",
- borderBottomWidth: "hide",
- paddingTop: "hide",
- paddingBottom: "hide",
- height: "hide"
- },
-
- showProps: {
- borderTopWidth: "show",
- borderBottomWidth: "show",
- paddingTop: "show",
- paddingBottom: "show",
- height: "show"
- },
-
- _create: function() {
- var options = this.options;
- this.prevShow = this.prevHide = $();
- this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
- // ARIA
- .attr( "role", "tablist" );
-
- // don't allow collapsible: false and active: false / null
- if ( !options.collapsible && (options.active === false || options.active == null) ) {
- options.active = 0;
- }
-
- this._processPanels();
- // handle negative values
- if ( options.active < 0 ) {
- options.active += this.headers.length;
- }
- this._refresh();
- },
-
- _getCreateEventData: function() {
- return {
- header: this.active,
- panel: !this.active.length ? $() : this.active.next()
- };
- },
-
- _createIcons: function() {
- var icons = this.options.icons;
- if ( icons ) {
- $( "<span>" )
- .addClass( "ui-accordion-header-icon ui-icon " + icons.header )
- .prependTo( this.headers );
- this.active.children( ".ui-accordion-header-icon" )
- .removeClass( icons.header )
- .addClass( icons.activeHeader );
- this.headers.addClass( "ui-accordion-icons" );
- }
- },
-
- _destroyIcons: function() {
- this.headers
- .removeClass( "ui-accordion-icons" )
- .children( ".ui-accordion-header-icon" )
- .remove();
- },
-
- _destroy: function() {
- var contents;
-
- // clean up main element
- this.element
- .removeClass( "ui-accordion ui-widget ui-helper-reset" )
- .removeAttr( "role" );
-
- // clean up headers
- this.headers
- .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " +
- "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
- .removeAttr( "role" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-controls" )
- .removeAttr( "tabIndex" )
- .removeUniqueId();
-
- this._destroyIcons();
-
- // clean up content panels
- contents = this.headers.next()
- .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " +
- "ui-accordion-content ui-accordion-content-active ui-state-disabled" )
- .css( "display", "" )
- .removeAttr( "role" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-labelledby" )
- .removeUniqueId();
-
- if ( this.options.heightStyle !== "content" ) {
- contents.css( "height", "" );
- }
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "event" ) {
- if ( this.options.event ) {
- this._off( this.headers, this.options.event );
- }
- this._setupEvents( value );
- }
-
- this._super( key, value );
-
- // setting collapsible: false while collapsed; open first panel
- if ( key === "collapsible" && !value && this.options.active === false ) {
- this._activate( 0 );
- }
-
- if ( key === "icons" ) {
- this._destroyIcons();
- if ( value ) {
- this._createIcons();
- }
- }
-
- // #5332 - opacity doesn't cascade to positioned elements in IE
- // so we need to add the disabled class to the headers and panels
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- this.headers.add( this.headers.next() )
- .toggleClass( "ui-state-disabled", !!value );
- }
- },
-
- _keydown: function( event ) {
- if ( event.altKey || event.ctrlKey ) {
- return;
- }
-
- var keyCode = $.ui.keyCode,
- length = this.headers.length,
- currentIndex = this.headers.index( event.target ),
- toFocus = false;
-
- switch ( event.keyCode ) {
- case keyCode.RIGHT:
- case keyCode.DOWN:
- toFocus = this.headers[ ( currentIndex + 1 ) % length ];
- break;
- case keyCode.LEFT:
- case keyCode.UP:
- toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
- break;
- case keyCode.SPACE:
- case keyCode.ENTER:
- this._eventHandler( event );
- break;
- case keyCode.HOME:
- toFocus = this.headers[ 0 ];
- break;
- case keyCode.END:
- toFocus = this.headers[ length - 1 ];
- break;
- }
-
- if ( toFocus ) {
- $( event.target ).attr( "tabIndex", -1 );
- $( toFocus ).attr( "tabIndex", 0 );
- toFocus.focus();
- event.preventDefault();
- }
- },
-
- _panelKeyDown: function( event ) {
- if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
- $( event.currentTarget ).prev().focus();
- }
- },
-
- refresh: function() {
- var options = this.options;
- this._processPanels();
-
- // was collapsed or no panel
- if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
- options.active = false;
- this.active = $();
- // active false only when collapsible is true
- } else if ( options.active === false ) {
- this._activate( 0 );
- // was active, but active panel is gone
- } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- // all remaining panel are disabled
- if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
- options.active = false;
- this.active = $();
- // activate previous panel
- } else {
- this._activate( Math.max( 0, options.active - 1 ) );
- }
- // was active, active panel still exists
- } else {
- // make sure active index is correct
- options.active = this.headers.index( this.active );
- }
-
- this._destroyIcons();
-
- this._refresh();
- },
-
- _processPanels: function() {
- var prevHeaders = this.headers,
- prevPanels = this.panels;
-
- this.headers = this.element.find( this.options.header )
- .addClass( "ui-accordion-header ui-state-default ui-corner-all" );
-
- this.panels = this.headers.next()
- .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
- .filter( ":not(.ui-accordion-content-active)" )
- .hide();
-
- // Avoid memory leaks (#10056)
- if ( prevPanels ) {
- this._off( prevHeaders.not( this.headers ) );
- this._off( prevPanels.not( this.panels ) );
- }
- },
-
- _refresh: function() {
- var maxHeight,
- options = this.options,
- heightStyle = options.heightStyle,
- parent = this.element.parent();
-
- this.active = this._findActive( options.active )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
- .removeClass( "ui-corner-all" );
- this.active.next()
- .addClass( "ui-accordion-content-active" )
- .show();
-
- this.headers
- .attr( "role", "tab" )
- .each(function() {
- var header = $( this ),
- headerId = header.uniqueId().attr( "id" ),
- panel = header.next(),
- panelId = panel.uniqueId().attr( "id" );
- header.attr( "aria-controls", panelId );
- panel.attr( "aria-labelledby", headerId );
- })
- .next()
- .attr( "role", "tabpanel" );
-
- this.headers
- .not( this.active )
- .attr({
- "aria-selected": "false",
- "aria-expanded": "false",
- tabIndex: -1
- })
- .next()
- .attr({
- "aria-hidden": "true"
- })
- .hide();
-
- // make sure at least one header is in the tab order
- if ( !this.active.length ) {
- this.headers.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active.attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- })
- .next()
- .attr({
- "aria-hidden": "false"
- });
- }
-
- this._createIcons();
-
- this._setupEvents( options.event );
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.headers.each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.headers.next()
- .each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.headers.next()
- .each(function() {
- maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
- })
- .height( maxHeight );
- }
- },
-
- _activate: function( index ) {
- var active = this._findActive( index )[ 0 ];
-
- // trying to activate the already active panel
- if ( active === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the currently active header
- active = active || this.active[ 0 ];
-
- this._eventHandler({
- target: active,
- currentTarget: active,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( selector ) {
- return typeof selector === "number" ? this.headers.eq( selector ) : $();
- },
-
- _setupEvents: function( event ) {
- var events = {
- keydown: "_keydown"
- };
- if ( event ) {
- $.each( event.split( " " ), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.headers.add( this.headers.next() ) );
- this._on( this.headers, events );
- this._on( this.headers.next(), { keydown: "_panelKeyDown" });
- this._hoverable( this.headers );
- this._focusable( this.headers );
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- clicked = $( event.currentTarget ),
- clickedIsActive = clicked[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : clicked.next(),
- toHide = active.next(),
- eventData = {
- oldHeader: active,
- oldPanel: toHide,
- newHeader: collapsing ? $() : clicked,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if (
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.headers.index( clicked );
-
- // when the call to ._toggle() comes after the class changes
- // it causes a very odd bug in IE 8 (see #6720)
- this.active = clickedIsActive ? $() : clicked;
- this._toggle( eventData );
-
- // switch classes
- // corner classes on the previously active header stay after the animation
- active.removeClass( "ui-accordion-header-active ui-state-active" );
- if ( options.icons ) {
- active.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.activeHeader )
- .addClass( options.icons.header );
- }
-
- if ( !clickedIsActive ) {
- clicked
- .removeClass( "ui-corner-all" )
- .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
- if ( options.icons ) {
- clicked.children( ".ui-accordion-header-icon" )
- .removeClass( options.icons.header )
- .addClass( options.icons.activeHeader );
- }
-
- clicked
- .next()
- .addClass( "ui-accordion-content-active" );
- }
- },
-
- _toggle: function( data ) {
- var toShow = data.newPanel,
- toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
-
- // handle activating a panel during the animation for another activation
- this.prevShow.add( this.prevHide ).stop( true, true );
- this.prevShow = toShow;
- this.prevHide = toHide;
-
- if ( this.options.animate ) {
- this._animate( toShow, toHide, data );
- } else {
- toHide.hide();
- toShow.show();
- this._toggleComplete( data );
- }
-
- toHide.attr({
- "aria-hidden": "true"
- });
- toHide.prev().attr({
- "aria-selected": "false",
- "aria-expanded": "false"
- });
- // if we're switching panels, remove the old header from the tab order
- // if we're opening from collapsed state, remove the previous header from the tab order
- // if we're collapsing, then keep the collapsing header in the tab order
- if ( toShow.length && toHide.length ) {
- toHide.prev().attr({
- "tabIndex": -1,
- "aria-expanded": "false"
- });
- } else if ( toShow.length ) {
- this.headers.filter(function() {
- return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow
- .attr( "aria-hidden", "false" )
- .prev()
- .attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- },
-
- _animate: function( toShow, toHide, data ) {
- var total, easing, duration,
- that = this,
- adjust = 0,
- boxSizing = toShow.css( "box-sizing" ),
- down = toShow.length &&
- ( !toHide.length || ( toShow.index() < toHide.index() ) ),
- animate = this.options.animate || {},
- options = down && animate.down || animate,
- complete = function() {
- that._toggleComplete( data );
- };
-
- if ( typeof options === "number" ) {
- duration = options;
- }
- if ( typeof options === "string" ) {
- easing = options;
- }
- // fall back from options to animation in case of partial down settings
- easing = easing || options.easing || animate.easing;
- duration = duration || options.duration || animate.duration;
-
- if ( !toHide.length ) {
- return toShow.animate( this.showProps, duration, easing, complete );
- }
- if ( !toShow.length ) {
- return toHide.animate( this.hideProps, duration, easing, complete );
- }
-
- total = toShow.show().outerHeight();
- toHide.animate( this.hideProps, {
- duration: duration,
- easing: easing,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- }
- });
- toShow
- .hide()
- .animate( this.showProps, {
- duration: duration,
- easing: easing,
- complete: complete,
- step: function( now, fx ) {
- fx.now = Math.round( now );
- if ( fx.prop !== "height" ) {
- if ( boxSizing === "content-box" ) {
- adjust += fx.now;
- }
- } else if ( that.options.heightStyle !== "content" ) {
- fx.now = Math.round( total - toHide.outerHeight() - adjust );
- adjust = 0;
- }
- }
- });
- },
-
- _toggleComplete: function( data ) {
- var toHide = data.oldPanel;
-
- toHide
- .removeClass( "ui-accordion-content-active" )
- .prev()
- .removeClass( "ui-corner-top" )
- .addClass( "ui-corner-all" );
-
- // Work around for rendering bug in IE (#5421)
- if ( toHide.length ) {
- toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
- }
- this._trigger( "activate", null, data );
- }
-});
-
-
-/*!
- * jQuery UI Menu 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/menu/
- */
-
-
-var menu = $.widget( "ui.menu", {
- version: "1.11.4",
- defaultElement: "<ul>",
- delay: 300,
- options: {
- icons: {
- submenu: "ui-icon-carat-1-e"
- },
- items: "> *",
- menus: "ul",
- position: {
- my: "left-1 top",
- at: "right top"
- },
- role: "menu",
-
- // callbacks
- blur: null,
- focus: null,
- select: null
- },
-
- _create: function() {
- this.activeMenu = this.element;
-
- // Flag used to prevent firing of the click handler
- // as the event bubbles up through nested menus
- this.mouseHandled = false;
- this.element
- .uniqueId()
- .addClass( "ui-menu ui-widget ui-widget-content" )
- .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
- .attr({
- role: this.options.role,
- tabIndex: 0
- });
-
- if ( this.options.disabled ) {
- this.element
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- }
-
- this._on({
- // Prevent focus from sticking to links inside menu after clicking
- // them (focus should always stay on UL during navigation).
- "mousedown .ui-menu-item": function( event ) {
- event.preventDefault();
- },
- "click .ui-menu-item": function( event ) {
- var target = $( event.target );
- if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
- this.select( event );
-
- // Only set the mouseHandled flag if the event will bubble, see #9469.
- if ( !event.isPropagationStopped() ) {
- this.mouseHandled = true;
- }
-
- // Open submenu on click
- if ( target.has( ".ui-menu" ).length ) {
- this.expand( event );
- } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
-
- // Redirect focus to the menu
- this.element.trigger( "focus", [ true ] );
-
- // If the active item is on the top level, let it stay active.
- // Otherwise, blur the active item since it is no longer visible.
- if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
- clearTimeout( this.timer );
- }
- }
- }
- },
- "mouseenter .ui-menu-item": function( event ) {
- // Ignore mouse events while typeahead is active, see #10458.
- // Prevents focusing the wrong item when typeahead causes a scroll while the mouse
- // is over an item in the menu
- if ( this.previousFilter ) {
- return;
- }
- var target = $( event.currentTarget );
- // Remove ui-state-active class from siblings of the newly focused menu item
- // to avoid a jump caused by adjacent elements both having a class with a border
- target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
- this.focus( event, target );
- },
- mouseleave: "collapseAll",
- "mouseleave .ui-menu": "collapseAll",
- focus: function( event, keepActiveItem ) {
- // If there's already an active item, keep it active
- // If not, activate the first item
- var item = this.active || this.element.find( this.options.items ).eq( 0 );
-
- if ( !keepActiveItem ) {
- this.focus( event, item );
- }
- },
- blur: function( event ) {
- this._delay(function() {
- if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
- this.collapseAll( event );
- }
- });
- },
- keydown: "_keydown"
- });
-
- this.refresh();
-
- // Clicks outside of a menu collapse any open menus
- this._on( this.document, {
- click: function( event ) {
- if ( this._closeOnDocumentClick( event ) ) {
- this.collapseAll( event );
- }
-
- // Reset the mouseHandled flag
- this.mouseHandled = false;
- }
- });
- },
-
- _destroy: function() {
- // Destroy (sub)menus
- this.element
- .removeAttr( "aria-activedescendant" )
- .find( ".ui-menu" ).addBack()
- .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .show();
-
- // Destroy menu items
- this.element.find( ".ui-menu-item" )
- .removeClass( "ui-menu-item" )
- .removeAttr( "role" )
- .removeAttr( "aria-disabled" )
- .removeUniqueId()
- .removeClass( "ui-state-hover" )
- .removeAttr( "tabIndex" )
- .removeAttr( "role" )
- .removeAttr( "aria-haspopup" )
- .children().each( function() {
- var elem = $( this );
- if ( elem.data( "ui-menu-submenu-carat" ) ) {
- elem.remove();
- }
- });
-
- // Destroy menu dividers
- this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
- },
-
- _keydown: function( event ) {
- var match, prev, character, skip,
- preventDefault = true;
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.PAGE_UP:
- this.previousPage( event );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- this.nextPage( event );
- break;
- case $.ui.keyCode.HOME:
- this._move( "first", "first", event );
- break;
- case $.ui.keyCode.END:
- this._move( "last", "last", event );
- break;
- case $.ui.keyCode.UP:
- this.previous( event );
- break;
- case $.ui.keyCode.DOWN:
- this.next( event );
- break;
- case $.ui.keyCode.LEFT:
- this.collapse( event );
- break;
- case $.ui.keyCode.RIGHT:
- if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
- this.expand( event );
- }
- break;
- case $.ui.keyCode.ENTER:
- case $.ui.keyCode.SPACE:
- this._activate( event );
- break;
- case $.ui.keyCode.ESCAPE:
- this.collapse( event );
- break;
- default:
- preventDefault = false;
- prev = this.previousFilter || "";
- character = String.fromCharCode( event.keyCode );
- skip = false;
-
- clearTimeout( this.filterTimer );
-
- if ( character === prev ) {
- skip = true;
- } else {
- character = prev + character;
- }
-
- match = this._filterMenuItems( character );
- match = skip && match.index( this.active.next() ) !== -1 ?
- this.active.nextAll( ".ui-menu-item" ) :
- match;
-
- // If no matches on the current filter, reset to the last character pressed
- // to move down the menu to the first item that starts with that character
- if ( !match.length ) {
- character = String.fromCharCode( event.keyCode );
- match = this._filterMenuItems( character );
- }
-
- if ( match.length ) {
- this.focus( event, match );
- this.previousFilter = character;
- this.filterTimer = this._delay(function() {
- delete this.previousFilter;
- }, 1000 );
- } else {
- delete this.previousFilter;
- }
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- },
-
- _activate: function( event ) {
- if ( !this.active.is( ".ui-state-disabled" ) ) {
- if ( this.active.is( "[aria-haspopup='true']" ) ) {
- this.expand( event );
- } else {
- this.select( event );
- }
- }
- },
-
- refresh: function() {
- var menus, items,
- that = this,
- icon = this.options.icons.submenu,
- submenus = this.element.find( this.options.menus );
-
- this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
-
- // Initialize nested menus
- submenus.filter( ":not(.ui-menu)" )
- .addClass( "ui-menu ui-widget ui-widget-content ui-front" )
- .hide()
- .attr({
- role: this.options.role,
- "aria-hidden": "true",
- "aria-expanded": "false"
- })
- .each(function() {
- var menu = $( this ),
- item = menu.parent(),
- submenuCarat = $( "<span>" )
- .addClass( "ui-menu-icon ui-icon " + icon )
- .data( "ui-menu-submenu-carat", true );
-
- item
- .attr( "aria-haspopup", "true" )
- .prepend( submenuCarat );
- menu.attr( "aria-labelledby", item.attr( "id" ) );
- });
-
- menus = submenus.add( this.element );
- items = menus.find( this.options.items );
-
- // Initialize menu-items containing spaces and/or dashes only as dividers
- items.not( ".ui-menu-item" ).each(function() {
- var item = $( this );
- if ( that._isDivider( item ) ) {
- item.addClass( "ui-widget-content ui-menu-divider" );
- }
- });
-
- // Don't refresh list items that are already adapted
- items.not( ".ui-menu-item, .ui-menu-divider" )
- .addClass( "ui-menu-item" )
- .uniqueId()
- .attr({
- tabIndex: -1,
- role: this._itemRole()
- });
-
- // Add aria-disabled attribute to any disabled menu item
- items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
-
- // If the active item has been removed, blur the menu
- if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
- this.blur();
- }
- },
-
- _itemRole: function() {
- return {
- menu: "menuitem",
- listbox: "option"
- }[ this.options.role ];
- },
-
- _setOption: function( key, value ) {
- if ( key === "icons" ) {
- this.element.find( ".ui-menu-icon" )
- .removeClass( this.options.icons.submenu )
- .addClass( value.submenu );
- }
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- }
- this._super( key, value );
- },
-
- focus: function( event, item ) {
- var nested, focused;
- this.blur( event, event && event.type === "focus" );
-
- this._scrollIntoView( item );
-
- this.active = item.first();
- focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
- // Only update aria-activedescendant if there's a role
- // otherwise we assume focus is managed elsewhere
- if ( this.options.role ) {
- this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
- }
-
- // Highlight active parent menu item, if any
- this.active
- .parent()
- .closest( ".ui-menu-item" )
- .addClass( "ui-state-active" );
-
- if ( event && event.type === "keydown" ) {
- this._close();
- } else {
- this.timer = this._delay(function() {
- this._close();
- }, this.delay );
- }
-
- nested = item.children( ".ui-menu" );
- if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
- this._startOpening(nested);
- }
- this.activeMenu = item.parent();
-
- this._trigger( "focus", event, { item: item } );
- },
-
- _scrollIntoView: function( item ) {
- var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
- if ( this._hasScroll() ) {
- borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
- paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
- offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
- scroll = this.activeMenu.scrollTop();
- elementHeight = this.activeMenu.height();
- itemHeight = item.outerHeight();
-
- if ( offset < 0 ) {
- this.activeMenu.scrollTop( scroll + offset );
- } else if ( offset + itemHeight > elementHeight ) {
- this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
- }
- }
- },
-
- blur: function( event, fromFocus ) {
- if ( !fromFocus ) {
- clearTimeout( this.timer );
- }
-
- if ( !this.active ) {
- return;
- }
-
- this.active.removeClass( "ui-state-focus" );
- this.active = null;
-
- this._trigger( "blur", event, { item: this.active } );
- },
-
- _startOpening: function( submenu ) {
- clearTimeout( this.timer );
-
- // Don't open if already open fixes a Firefox bug that caused a .5 pixel
- // shift in the submenu position when mousing over the carat icon
- if ( submenu.attr( "aria-hidden" ) !== "true" ) {
- return;
- }
-
- this.timer = this._delay(function() {
- this._close();
- this._open( submenu );
- }, this.delay );
- },
-
- _open: function( submenu ) {
- var position = $.extend({
- of: this.active
- }, this.options.position );
-
- clearTimeout( this.timer );
- this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
- .hide()
- .attr( "aria-hidden", "true" );
-
- submenu
- .show()
- .removeAttr( "aria-hidden" )
- .attr( "aria-expanded", "true" )
- .position( position );
- },
-
- collapseAll: function( event, all ) {
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- // If we were passed an event, look for the submenu that contains the event
- var currentMenu = all ? this.element :
- $( event && event.target ).closest( this.element.find( ".ui-menu" ) );
-
- // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
- if ( !currentMenu.length ) {
- currentMenu = this.element;
- }
-
- this._close( currentMenu );
-
- this.blur( event );
- this.activeMenu = currentMenu;
- }, this.delay );
- },
-
- // With no arguments, closes the currently active menu - if nothing is active
- // it closes all menus. If passed an argument, it will search for menus BELOW
- _close: function( startMenu ) {
- if ( !startMenu ) {
- startMenu = this.active ? this.active.parent() : this.element;
- }
-
- startMenu
- .find( ".ui-menu" )
- .hide()
- .attr( "aria-hidden", "true" )
- .attr( "aria-expanded", "false" )
- .end()
- .find( ".ui-state-active" ).not( ".ui-state-focus" )
- .removeClass( "ui-state-active" );
- },
-
- _closeOnDocumentClick: function( event ) {
- return !$( event.target ).closest( ".ui-menu" ).length;
- },
-
- _isDivider: function( item ) {
-
- // Match hyphen, em dash, en dash
- return !/[^\-\u2014\u2013\s]/.test( item.text() );
- },
-
- collapse: function( event ) {
- var newItem = this.active &&
- this.active.parent().closest( ".ui-menu-item", this.element );
- if ( newItem && newItem.length ) {
- this._close();
- this.focus( event, newItem );
- }
- },
-
- expand: function( event ) {
- var newItem = this.active &&
- this.active
- .children( ".ui-menu " )
- .find( this.options.items )
- .first();
-
- if ( newItem && newItem.length ) {
- this._open( newItem.parent() );
-
- // Delay so Firefox will not hide activedescendant change in expanding submenu from AT
- this._delay(function() {
- this.focus( event, newItem );
- });
- }
- },
-
- next: function( event ) {
- this._move( "next", "first", event );
- },
-
- previous: function( event ) {
- this._move( "prev", "last", event );
- },
-
- isFirstItem: function() {
- return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
- },
-
- isLastItem: function() {
- return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
- },
-
- _move: function( direction, filter, event ) {
- var next;
- if ( this.active ) {
- if ( direction === "first" || direction === "last" ) {
- next = this.active
- [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
- .eq( -1 );
- } else {
- next = this.active
- [ direction + "All" ]( ".ui-menu-item" )
- .eq( 0 );
- }
- }
- if ( !next || !next.length || !this.active ) {
- next = this.activeMenu.find( this.options.items )[ filter ]();
- }
-
- this.focus( event, next );
- },
-
- nextPage: function( event ) {
- var item, base, height;
-
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isLastItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.nextAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base - height < 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.find( this.options.items )
- [ !this.active ? "first" : "last" ]() );
- }
- },
-
- previousPage: function( event ) {
- var item, base, height;
- if ( !this.active ) {
- this.next( event );
- return;
- }
- if ( this.isFirstItem() ) {
- return;
- }
- if ( this._hasScroll() ) {
- base = this.active.offset().top;
- height = this.element.height();
- this.active.prevAll( ".ui-menu-item" ).each(function() {
- item = $( this );
- return item.offset().top - base + height > 0;
- });
-
- this.focus( event, item );
- } else {
- this.focus( event, this.activeMenu.find( this.options.items ).first() );
- }
- },
-
- _hasScroll: function() {
- return this.element.outerHeight() < this.element.prop( "scrollHeight" );
- },
-
- select: function( event ) {
- // TODO: It should never be possible to not have an active item at this
- // point, but the tests don't trigger mouseenter before click.
- this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
- var ui = { item: this.active };
- if ( !this.active.has( ".ui-menu" ).length ) {
- this.collapseAll( event, true );
- }
- this._trigger( "select", event, ui );
- },
-
- _filterMenuItems: function(character) {
- var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
- regex = new RegExp( "^" + escapedCharacter, "i" );
-
- return this.activeMenu
- .find( this.options.items )
-
- // Only match on items, not dividers or other content (#10571)
- .filter( ".ui-menu-item" )
- .filter(function() {
- return regex.test( $.trim( $( this ).text() ) );
- });
- }
-});
-
-
-/*!
- * jQuery UI Autocomplete 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/autocomplete/
- */
-
-
-$.widget( "ui.autocomplete", {
- version: "1.11.4",
- defaultElement: "<input>",
- options: {
- appendTo: null,
- autoFocus: false,
- delay: 300,
- minLength: 1,
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- source: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- response: null,
- search: null,
- select: null
- },
-
- requestIndex: 0,
- pending: 0,
-
- _create: function() {
- // Some browsers only repeat keydown events, not keypress events,
- // so we use the suppressKeyPress flag to determine if we've already
- // handled the keydown event. #7269
- // Unfortunately the code for & in keypress is the same as the up arrow,
- // so we use the suppressKeyPressRepeat flag to avoid handling keypress
- // events when we know the keydown event was used to modify the
- // search term. #7799
- var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
- nodeName = this.element[ 0 ].nodeName.toLowerCase(),
- isTextarea = nodeName === "textarea",
- isInput = nodeName === "input";
-
- this.isMultiLine =
- // Textareas are always multi-line
- isTextarea ? true :
- // Inputs are always single-line, even if inside a contentEditable element
- // IE also treats inputs as contentEditable
- isInput ? false :
- // All other element types are determined by whether or not they're contentEditable
- this.element.prop( "isContentEditable" );
-
- this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
- this.isNewMenu = true;
-
- this.element
- .addClass( "ui-autocomplete-input" )
- .attr( "autocomplete", "off" );
-
- this._on( this.element, {
- keydown: function( event ) {
- if ( this.element.prop( "readOnly" ) ) {
- suppressKeyPress = true;
- suppressInput = true;
- suppressKeyPressRepeat = true;
- return;
- }
-
- suppressKeyPress = false;
- suppressInput = false;
- suppressKeyPressRepeat = false;
- var keyCode = $.ui.keyCode;
- switch ( event.keyCode ) {
- case keyCode.PAGE_UP:
- suppressKeyPress = true;
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- suppressKeyPress = true;
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- suppressKeyPress = true;
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- suppressKeyPress = true;
- this._keyEvent( "next", event );
- break;
- case keyCode.ENTER:
- // when menu is open and has focus
- if ( this.menu.active ) {
- // #6055 - Opera still allows the keypress to occur
- // which causes forms to submit
- suppressKeyPress = true;
- event.preventDefault();
- this.menu.select( event );
- }
- break;
- case keyCode.TAB:
- if ( this.menu.active ) {
- this.menu.select( event );
- }
- break;
- case keyCode.ESCAPE:
- if ( this.menu.element.is( ":visible" ) ) {
- if ( !this.isMultiLine ) {
- this._value( this.term );
- }
- this.close( event );
- // Different browsers have different default behavior for escape
- // Single press can mean undo or clear
- // Double press in IE means clear the whole form
- event.preventDefault();
- }
- break;
- default:
- suppressKeyPressRepeat = true;
- // search timeout should be triggered before the input value is changed
- this._searchTimeout( event );
- break;
- }
- },
- keypress: function( event ) {
- if ( suppressKeyPress ) {
- suppressKeyPress = false;
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- event.preventDefault();
- }
- return;
- }
- if ( suppressKeyPressRepeat ) {
- return;
- }
-
- // replicate some key handlers to allow them to repeat in Firefox and Opera
- var keyCode = $.ui.keyCode;
- switch ( event.keyCode ) {
- case keyCode.PAGE_UP:
- this._move( "previousPage", event );
- break;
- case keyCode.PAGE_DOWN:
- this._move( "nextPage", event );
- break;
- case keyCode.UP:
- this._keyEvent( "previous", event );
- break;
- case keyCode.DOWN:
- this._keyEvent( "next", event );
- break;
- }
- },
- input: function( event ) {
- if ( suppressInput ) {
- suppressInput = false;
- event.preventDefault();
- return;
- }
- this._searchTimeout( event );
- },
- focus: function() {
- this.selectedItem = null;
- this.previous = this._value();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- clearTimeout( this.searching );
- this.close( event );
- this._change( event );
- }
- });
-
- this._initSource();
- this.menu = $( "<ul>" )
- .addClass( "ui-autocomplete ui-front" )
- .appendTo( this._appendTo() )
- .menu({
- // disable ARIA support, the live region takes care of that
- role: null
- })
- .hide()
- .menu( "instance" );
-
- this._on( this.menu.element, {
- mousedown: function( event ) {
- // prevent moving focus out of the text field
- event.preventDefault();
-
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- });
-
- // clicking on the scrollbar causes focus to shift to the body
- // but we can't detect a mouseup or a click immediately afterward
- // so we have to track the next mousedown and close the menu if
- // the user clicks somewhere outside of the autocomplete
- var menuElement = this.menu.element[ 0 ];
- if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
- this._delay(function() {
- var that = this;
- this.document.one( "mousedown", function( event ) {
- if ( event.target !== that.element[ 0 ] &&
- event.target !== menuElement &&
- !$.contains( menuElement, event.target ) ) {
- that.close();
- }
- });
- });
- }
- },
- menufocus: function( event, ui ) {
- var label, item;
- // support: Firefox
- // Prevent accidental activation of menu items in Firefox (#7024 #9118)
- if ( this.isNewMenu ) {
- this.isNewMenu = false;
- if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
- this.menu.blur();
-
- this.document.one( "mousemove", function() {
- $( event.target ).trigger( event.originalEvent );
- });
-
- return;
- }
- }
-
- item = ui.item.data( "ui-autocomplete-item" );
- if ( false !== this._trigger( "focus", event, { item: item } ) ) {
- // use value to match what will end up in the input, if it was a key event
- if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
- this._value( item.value );
- }
- }
-
- // Announce the value in the liveRegion
- label = ui.item.attr( "aria-label" ) || item.value;
- if ( label && $.trim( label ).length ) {
- this.liveRegion.children().hide();
- $( "<div>" ).text( label ).appendTo( this.liveRegion );
- }
- },
- menuselect: function( event, ui ) {
- var item = ui.item.data( "ui-autocomplete-item" ),
- previous = this.previous;
-
- // only trigger when focus was lost (click on menu)
- if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
- this.element.focus();
- this.previous = previous;
- // #6109 - IE triggers two focus events and the second
- // is asynchronous, so we need to reset the previous
- // term synchronously and asynchronously :-(
- this._delay(function() {
- this.previous = previous;
- this.selectedItem = item;
- });
- }
-
- if ( false !== this._trigger( "select", event, { item: item } ) ) {
- this._value( item.value );
- }
- // reset the term after the select event
- // this allows custom select handling to work properly
- this.term = this._value();
-
- this.close( event );
- this.selectedItem = item;
- }
- });
-
- this.liveRegion = $( "<span>", {
- role: "status",
- "aria-live": "assertive",
- "aria-relevant": "additions"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .appendTo( this.document[ 0 ].body );
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _destroy: function() {
- clearTimeout( this.searching );
- this.element
- .removeClass( "ui-autocomplete-input" )
- .removeAttr( "autocomplete" );
- this.menu.element.remove();
- this.liveRegion.remove();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "source" ) {
- this._initSource();
- }
- if ( key === "appendTo" ) {
- this.menu.element.appendTo( this._appendTo() );
- }
- if ( key === "disabled" && value && this.xhr ) {
- this.xhr.abort();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
-
- if ( element ) {
- element = element.jquery || element.nodeType ?
- $( element ) :
- this.document.find( element ).eq( 0 );
- }
-
- if ( !element || !element[ 0 ] ) {
- element = this.element.closest( ".ui-front" );
- }
-
- if ( !element.length ) {
- element = this.document[ 0 ].body;
- }
-
- return element;
- },
-
- _initSource: function() {
- var array, url,
- that = this;
- if ( $.isArray( this.options.source ) ) {
- array = this.options.source;
- this.source = function( request, response ) {
- response( $.ui.autocomplete.filter( array, request.term ) );
- };
- } else if ( typeof this.options.source === "string" ) {
- url = this.options.source;
- this.source = function( request, response ) {
- if ( that.xhr ) {
- that.xhr.abort();
- }
- that.xhr = $.ajax({
- url: url,
- data: request,
- dataType: "json",
- success: function( data ) {
- response( data );
- },
- error: function() {
- response([]);
- }
- });
- };
- } else {
- this.source = this.options.source;
- }
- },
-
- _searchTimeout: function( event ) {
- clearTimeout( this.searching );
- this.searching = this._delay(function() {
-
- // Search if the value has changed, or if the user retypes the same value (see #7434)
- var equalValues = this.term === this._value(),
- menuVisible = this.menu.element.is( ":visible" ),
- modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
-
- if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
- this.selectedItem = null;
- this.search( null, event );
- }
- }, this.options.delay );
- },
-
- search: function( value, event ) {
- value = value != null ? value : this._value();
-
- // always save the actual value, not the one passed as an argument
- this.term = this._value();
-
- if ( value.length < this.options.minLength ) {
- return this.close( event );
- }
-
- if ( this._trigger( "search", event ) === false ) {
- return;
- }
-
- return this._search( value );
- },
-
- _search: function( value ) {
- this.pending++;
- this.element.addClass( "ui-autocomplete-loading" );
- this.cancelSearch = false;
-
- this.source( { term: value }, this._response() );
- },
-
- _response: function() {
- var index = ++this.requestIndex;
-
- return $.proxy(function( content ) {
- if ( index === this.requestIndex ) {
- this.__response( content );
- }
-
- this.pending--;
- if ( !this.pending ) {
- this.element.removeClass( "ui-autocomplete-loading" );
- }
- }, this );
- },
-
- __response: function( content ) {
- if ( content ) {
- content = this._normalize( content );
- }
- this._trigger( "response", null, { content: content } );
- if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
- this._suggest( content );
- this._trigger( "open" );
- } else {
- // use ._close() instead of .close() so we don't cancel future searches
- this._close();
- }
- },
-
- close: function( event ) {
- this.cancelSearch = true;
- this._close( event );
- },
-
- _close: function( event ) {
- if ( this.menu.element.is( ":visible" ) ) {
- this.menu.element.hide();
- this.menu.blur();
- this.isNewMenu = true;
- this._trigger( "close", event );
- }
- },
-
- _change: function( event ) {
- if ( this.previous !== this._value() ) {
- this._trigger( "change", event, { item: this.selectedItem } );
- }
- },
-
- _normalize: function( items ) {
- // assume all items have the right format when the first item is complete
- if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
- return items;
- }
- return $.map( items, function( item ) {
- if ( typeof item === "string" ) {
- return {
- label: item,
- value: item
- };
- }
- return $.extend( {}, item, {
- label: item.label || item.value,
- value: item.value || item.label
- });
- });
- },
-
- _suggest: function( items ) {
- var ul = this.menu.element.empty();
- this._renderMenu( ul, items );
- this.isNewMenu = true;
- this.menu.refresh();
-
- // size and position menu
- ul.show();
- this._resizeMenu();
- ul.position( $.extend({
- of: this.element
- }, this.options.position ) );
-
- if ( this.options.autoFocus ) {
- this.menu.next();
- }
- },
-
- _resizeMenu: function() {
- var ul = this.menu.element;
- ul.outerWidth( Math.max(
- // Firefox wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping (#7513)
- ul.width( "" ).outerWidth() + 1,
- this.element.outerWidth()
- ) );
- },
-
- _renderMenu: function( ul, items ) {
- var that = this;
- $.each( items, function( index, item ) {
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
- },
-
- _renderItem: function( ul, item ) {
- return $( "<li>" ).text( item.label ).appendTo( ul );
- },
-
- _move: function( direction, event ) {
- if ( !this.menu.element.is( ":visible" ) ) {
- this.search( null, event );
- return;
- }
- if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
- this.menu.isLastItem() && /^next/.test( direction ) ) {
-
- if ( !this.isMultiLine ) {
- this._value( this.term );
- }
-
- this.menu.blur();
- return;
- }
- this.menu[ direction ]( event );
- },
-
- widget: function() {
- return this.menu.element;
- },
-
- _value: function() {
- return this.valueMethod.apply( this.element, arguments );
- },
-
- _keyEvent: function( keyEvent, event ) {
- if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
- this._move( keyEvent, event );
-
- // prevents moving cursor to beginning/end of the text field in some browsers
- event.preventDefault();
- }
- }
-});
-
-$.extend( $.ui.autocomplete, {
- escapeRegex: function( value ) {
- return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
- },
- filter: function( array, term ) {
- var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
- return $.grep( array, function( value ) {
- return matcher.test( value.label || value.value || value );
- });
- }
-});
-
-// live region extension, adding a `messages` option
-// NOTE: This is an experimental API. We are still investigating
-// a full solution for string manipulation and internationalization.
-$.widget( "ui.autocomplete", $.ui.autocomplete, {
- options: {
- messages: {
- noResults: "No search results.",
- results: function( amount ) {
- return amount + ( amount > 1 ? " results are" : " result is" ) +
- " available, use up and down arrow keys to navigate.";
- }
- }
- },
-
- __response: function( content ) {
- var message;
- this._superApply( arguments );
- if ( this.options.disabled || this.cancelSearch ) {
- return;
- }
- if ( content && content.length ) {
- message = this.options.messages.results( content.length );
- } else {
- message = this.options.messages.noResults;
- }
- this.liveRegion.children().hide();
- $( "<div>" ).text( message ).appendTo( this.liveRegion );
- }
-});
-
-var autocomplete = $.ui.autocomplete;
-
-
-/*!
- * jQuery UI Button 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/button/
- */
-
-
-var lastActive,
- baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
- typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
- formResetHandler = function() {
- var form = $( this );
- setTimeout(function() {
- form.find( ":ui-button" ).button( "refresh" );
- }, 1 );
- },
- radioGroup = function( radio ) {
- var name = radio.name,
- form = radio.form,
- radios = $( [] );
- if ( name ) {
- name = name.replace( /'/g, "\\'" );
- if ( form ) {
- radios = $( form ).find( "[name='" + name + "'][type=radio]" );
- } else {
- radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument )
- .filter(function() {
- return !this.form;
- });
- }
- }
- return radios;
- };
-
-$.widget( "ui.button", {
- version: "1.11.4",
- defaultElement: "<button>",
- options: {
- disabled: null,
- text: true,
- label: null,
- icons: {
- primary: null,
- secondary: null
- }
- },
- _create: function() {
- this.element.closest( "form" )
- .unbind( "reset" + this.eventNamespace )
- .bind( "reset" + this.eventNamespace, formResetHandler );
-
- if ( typeof this.options.disabled !== "boolean" ) {
- this.options.disabled = !!this.element.prop( "disabled" );
- } else {
- this.element.prop( "disabled", this.options.disabled );
- }
-
- this._determineButtonType();
- this.hasTitle = !!this.buttonElement.attr( "title" );
-
- var that = this,
- options = this.options,
- toggleButton = this.type === "checkbox" || this.type === "radio",
- activeClass = !toggleButton ? "ui-state-active" : "";
-
- if ( options.label === null ) {
- options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
- }
-
- this._hoverable( this.buttonElement );
-
- this.buttonElement
- .addClass( baseClasses )
- .attr( "role", "button" )
- .bind( "mouseenter" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- if ( this === lastActive ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- .bind( "mouseleave" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return;
- }
- $( this ).removeClass( activeClass );
- })
- .bind( "click" + this.eventNamespace, function( event ) {
- if ( options.disabled ) {
- event.preventDefault();
- event.stopImmediatePropagation();
- }
- });
-
- // Can't use _focusable() because the element that receives focus
- // and the element that gets the ui-state-focus class are different
- this._on({
- focus: function() {
- this.buttonElement.addClass( "ui-state-focus" );
- },
- blur: function() {
- this.buttonElement.removeClass( "ui-state-focus" );
- }
- });
-
- if ( toggleButton ) {
- this.element.bind( "change" + this.eventNamespace, function() {
- that.refresh();
- });
- }
-
- if ( this.type === "checkbox" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- });
- } else if ( this.type === "radio" ) {
- this.buttonElement.bind( "click" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- that.buttonElement.attr( "aria-pressed", "true" );
-
- var radio = that.element[ 0 ];
- radioGroup( radio )
- .not( radio )
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- });
- } else {
- this.buttonElement
- .bind( "mousedown" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).addClass( "ui-state-active" );
- lastActive = this;
- that.document.one( "mouseup", function() {
- lastActive = null;
- });
- })
- .bind( "mouseup" + this.eventNamespace, function() {
- if ( options.disabled ) {
- return false;
- }
- $( this ).removeClass( "ui-state-active" );
- })
- .bind( "keydown" + this.eventNamespace, function(event) {
- if ( options.disabled ) {
- return false;
- }
- if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
- $( this ).addClass( "ui-state-active" );
- }
- })
- // see #8559, we bind to blur here in case the button element loses
- // focus between keydown and keyup, it would be left in an "active" state
- .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
- $( this ).removeClass( "ui-state-active" );
- });
-
- if ( this.buttonElement.is("a") ) {
- this.buttonElement.keyup(function(event) {
- if ( event.keyCode === $.ui.keyCode.SPACE ) {
- // TODO pass through original event correctly (just as 2nd argument doesn't work)
- $( this ).click();
- }
- });
- }
- }
-
- this._setOption( "disabled", options.disabled );
- this._resetButton();
- },
-
- _determineButtonType: function() {
- var ancestor, labelSelector, checked;
-
- if ( this.element.is("[type=checkbox]") ) {
- this.type = "checkbox";
- } else if ( this.element.is("[type=radio]") ) {
- this.type = "radio";
- } else if ( this.element.is("input") ) {
- this.type = "input";
- } else {
- this.type = "button";
- }
-
- if ( this.type === "checkbox" || this.type === "radio" ) {
- // we don't search against the document in case the element
- // is disconnected from the DOM
- ancestor = this.element.parents().last();
- labelSelector = "label[for='" + this.element.attr("id") + "']";
- this.buttonElement = ancestor.find( labelSelector );
- if ( !this.buttonElement.length ) {
- ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
- this.buttonElement = ancestor.filter( labelSelector );
- if ( !this.buttonElement.length ) {
- this.buttonElement = ancestor.find( labelSelector );
- }
- }
- this.element.addClass( "ui-helper-hidden-accessible" );
-
- checked = this.element.is( ":checked" );
- if ( checked ) {
- this.buttonElement.addClass( "ui-state-active" );
- }
- this.buttonElement.prop( "aria-pressed", checked );
- } else {
- this.buttonElement = this.element;
- }
- },
-
- widget: function() {
- return this.buttonElement;
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-helper-hidden-accessible" );
- this.buttonElement
- .removeClass( baseClasses + " ui-state-active " + typeClasses )
- .removeAttr( "role" )
- .removeAttr( "aria-pressed" )
- .html( this.buttonElement.find(".ui-button-text").html() );
-
- if ( !this.hasTitle ) {
- this.buttonElement.removeAttr( "title" );
- }
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "disabled" ) {
- this.widget().toggleClass( "ui-state-disabled", !!value );
- this.element.prop( "disabled", !!value );
- if ( value ) {
- if ( this.type === "checkbox" || this.type === "radio" ) {
- this.buttonElement.removeClass( "ui-state-focus" );
- } else {
- this.buttonElement.removeClass( "ui-state-focus ui-state-active" );
- }
- }
- return;
- }
- this._resetButton();
- },
-
- refresh: function() {
- //See #8237 & #8828
- var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
-
- if ( isDisabled !== this.options.disabled ) {
- this._setOption( "disabled", isDisabled );
- }
- if ( this.type === "radio" ) {
- radioGroup( this.element[0] ).each(function() {
- if ( $( this ).is( ":checked" ) ) {
- $( this ).button( "widget" )
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- $( this ).button( "widget" )
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- });
- } else if ( this.type === "checkbox" ) {
- if ( this.element.is( ":checked" ) ) {
- this.buttonElement
- .addClass( "ui-state-active" )
- .attr( "aria-pressed", "true" );
- } else {
- this.buttonElement
- .removeClass( "ui-state-active" )
- .attr( "aria-pressed", "false" );
- }
- }
- },
-
- _resetButton: function() {
- if ( this.type === "input" ) {
- if ( this.options.label ) {
- this.element.val( this.options.label );
- }
- return;
- }
- var buttonElement = this.buttonElement.removeClass( typeClasses ),
- buttonText = $( "<span></span>", this.document[0] )
- .addClass( "ui-button-text" )
- .html( this.options.label )
- .appendTo( buttonElement.empty() )
- .text(),
- icons = this.options.icons,
- multipleIcons = icons.primary && icons.secondary,
- buttonClasses = [];
-
- if ( icons.primary || icons.secondary ) {
- if ( this.options.text ) {
- buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
- }
-
- if ( icons.primary ) {
- buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
- }
-
- if ( icons.secondary ) {
- buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
- }
-
- if ( !this.options.text ) {
- buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
-
- if ( !this.hasTitle ) {
- buttonElement.attr( "title", $.trim( buttonText ) );
- }
- }
- } else {
- buttonClasses.push( "ui-button-text-only" );
- }
- buttonElement.addClass( buttonClasses.join( " " ) );
- }
-});
-
-$.widget( "ui.buttonset", {
- version: "1.11.4",
- options: {
- items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
- },
-
- _create: function() {
- this.element.addClass( "ui-buttonset" );
- },
-
- _init: function() {
- this.refresh();
- },
-
- _setOption: function( key, value ) {
- if ( key === "disabled" ) {
- this.buttons.button( "option", key, value );
- }
-
- this._super( key, value );
- },
-
- refresh: function() {
- var rtl = this.element.css( "direction" ) === "rtl",
- allButtons = this.element.find( this.options.items ),
- existingButtons = allButtons.filter( ":ui-button" );
-
- // Initialize new buttons
- allButtons.not( ":ui-button" ).button();
-
- // Refresh existing buttons
- existingButtons.button( "refresh" );
-
- this.buttons = allButtons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
- .filter( ":first" )
- .addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
- .end()
- .filter( ":last" )
- .addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
- .end()
- .end();
- },
-
- _destroy: function() {
- this.element.removeClass( "ui-buttonset" );
- this.buttons
- .map(function() {
- return $( this ).button( "widget" )[ 0 ];
- })
- .removeClass( "ui-corner-left ui-corner-right" )
- .end()
- .button( "destroy" );
- }
-});
-
-var button = $.ui.button;
-
-
-/*!
- * jQuery UI Datepicker 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/datepicker/
- */
-
-
-$.extend($.ui, { datepicker: { version: "1.11.4" } });
-
-var datepicker_instActive;
-
-function datepicker_getZindex( elem ) {
- var position, value;
- while ( elem.length && elem[ 0 ] !== document ) {
- // Ignore z-index if position is set to a value where z-index is ignored by the browser
- // This makes behavior of this function consistent across browsers
- // WebKit always returns auto if the element is positioned
- position = elem.css( "position" );
- if ( position === "absolute" || position === "relative" || position === "fixed" ) {
- // IE returns 0 when zIndex is not specified
- // other browsers return a string
- // we ignore the case of nested elements with an explicit value of 0
- // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
- value = parseInt( elem.css( "zIndex" ), 10 );
- if ( !isNaN( value ) && value !== 0 ) {
- return value;
- }
- }
- elem = elem.parent();
- }
-
- return 0;
-}
-/* Date picker manager.
- Use the singleton instance of this class, $.datepicker, to interact with the date picker.
- Settings for (groups of) date pickers are maintained in an instance object,
- allowing multiple different settings on the same page. */
-
-function Datepicker() {
- this._curInst = null; // The current instance in use
- this._keyEvent = false; // If the last event was a key event
- this._disabledInputs = []; // List of date picker inputs that have been disabled
- this._datepickerShowing = false; // True if the popup picker is showing , false if not
- this._inDialog = false; // True if showing within a "dialog", false if not
- this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
- this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
- this._appendClass = "ui-datepicker-append"; // The name of the append marker class
- this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
- this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
- this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
- this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
- this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
- this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
- this.regional = []; // Available regional settings, indexed by language code
- this.regional[""] = { // Default regional settings
- closeText: "Done", // Display text for close link
- prevText: "Prev", // Display text for previous month link
- nextText: "Next", // Display text for next month link
- currentText: "Today", // Display text for current month link
- monthNames: ["January","February","March","April","May","June",
- "July","August","September","October","November","December"], // Names of months for drop-down and formatting
- monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
- dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
- dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
- dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
- weekHeader: "Wk", // Column header for week of the year
- dateFormat: "mm/dd/yy", // See format options on parseDate
- firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
- isRTL: false, // True if right-to-left language, false if left-to-right
- showMonthAfterYear: false, // True if the year select precedes month, false for month then year
- yearSuffix: "" // Additional text to append to the year in the month headers
- };
- this._defaults = { // Global defaults for all the date picker instances
- showOn: "focus", // "focus" for popup on focus,
- // "button" for trigger button, or "both" for either
- showAnim: "fadeIn", // Name of jQuery animation for popup
- showOptions: {}, // Options for enhanced animations
- defaultDate: null, // Used when field is blank: actual date,
- // +/-number for offset from today, null for today
- appendText: "", // Display text following the input box, e.g. showing the format
- buttonText: "...", // Text for trigger button
- buttonImage: "", // URL for trigger button image
- buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
- hideIfNoPrevNext: false, // True to hide next/previous month links
- // if not applicable, false to just disable them
- navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
- gotoCurrent: false, // True if today link goes back to current selection instead
- changeMonth: false, // True if month can be selected directly, false if only prev/next
- changeYear: false, // True if year can be selected directly, false if only prev/next
- yearRange: "c-10:c+10", // Range of years to display in drop-down,
- // either relative to today's year (-nn:+nn), relative to currently displayed year
- // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
- showOtherMonths: false, // True to show dates in other months, false to leave blank
- selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
- showWeek: false, // True to show week of the year, false to not show it
- calculateWeek: this.iso8601Week, // How to calculate the week of the year,
- // takes a Date and returns the number of the week for it
- shortYearCutoff: "+10", // Short year values < this are in the current century,
- // > this are in the previous century,
- // string value starting with "+" for current year + value
- minDate: null, // The earliest selectable date, or null for no limit
- maxDate: null, // The latest selectable date, or null for no limit
- duration: "fast", // Duration of display/closure
- beforeShowDay: null, // Function that takes a date and returns an array with
- // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
- // [2] = cell title (optional), e.g. $.datepicker.noWeekends
- beforeShow: null, // Function that takes an input field and
- // returns a set of custom settings for the date picker
- onSelect: null, // Define a callback function when a date is selected
- onChangeMonthYear: null, // Define a callback function when the month or year is changed
- onClose: null, // Define a callback function when the datepicker is closed
- numberOfMonths: 1, // Number of months to show at a time
- showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
- stepMonths: 1, // Number of months to step back/forward
- stepBigMonths: 12, // Number of months to step back/forward for the big links
- altField: "", // Selector for an alternate field to store selected dates into
- altFormat: "", // The date format to use for the alternate field
- constrainInput: true, // The input is constrained by the current date format
- showButtonPanel: false, // True to show button panel, false to not show it
- autoSize: false, // True to size the input for the date format, false to leave as is
- disabled: false // The initial disabled state
- };
- $.extend(this._defaults, this.regional[""]);
- this.regional.en = $.extend( true, {}, this.regional[ "" ]);
- this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
- this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
-}
-
-$.extend(Datepicker.prototype, {
- /* Class name added to elements to indicate already configured with a date picker. */
- markerClassName: "hasDatepicker",
-
- //Keep track of the maximum number of rows displayed (see #7043)
- maxRows: 4,
-
- // TODO rename to "widget" when switching to widget factory
- _widgetDatepicker: function() {
- return this.dpDiv;
- },
-
- /* Override the default settings for all instances of the date picker.
- * @param settings object - the new settings to use as defaults (anonymous object)
- * @return the manager object
- */
- setDefaults: function(settings) {
- datepicker_extendRemove(this._defaults, settings || {});
- return this;
- },
-
- /* Attach the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- * @param settings object - the new settings to use for this date picker instance (anonymous)
- */
- _attachDatepicker: function(target, settings) {
- var nodeName, inline, inst;
- nodeName = target.nodeName.toLowerCase();
- inline = (nodeName === "div" || nodeName === "span");
- if (!target.id) {
- this.uuid += 1;
- target.id = "dp" + this.uuid;
- }
- inst = this._newInst($(target), inline);
- inst.settings = $.extend({}, settings || {});
- if (nodeName === "input") {
- this._connectDatepicker(target, inst);
- } else if (inline) {
- this._inlineDatepicker(target, inst);
- }
- },
-
- /* Create a new instance object. */
- _newInst: function(target, inline) {
- var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
- return {id: id, input: target, // associated target
- selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
- drawMonth: 0, drawYear: 0, // month being drawn
- inline: inline, // is datepicker inline or not
- dpDiv: (!inline ? this.dpDiv : // presentation div
- datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
- },
-
- /* Attach the date picker to an input field. */
- _connectDatepicker: function(target, inst) {
- var input = $(target);
- inst.append = $([]);
- inst.trigger = $([]);
- if (input.hasClass(this.markerClassName)) {
- return;
- }
- this._attachments(input, inst);
- input.addClass(this.markerClassName).keydown(this._doKeyDown).
- keypress(this._doKeyPress).keyup(this._doKeyUp);
- this._autoSize(inst);
- $.data(target, "datepicker", inst);
- //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- },
-
- /* Make attachments based on settings. */
- _attachments: function(input, inst) {
- var showOn, buttonText, buttonImage,
- appendText = this._get(inst, "appendText"),
- isRTL = this._get(inst, "isRTL");
-
- if (inst.append) {
- inst.append.remove();
- }
- if (appendText) {
- inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
- input[isRTL ? "before" : "after"](inst.append);
- }
-
- input.unbind("focus", this._showDatepicker);
-
- if (inst.trigger) {
- inst.trigger.remove();
- }
-
- showOn = this._get(inst, "showOn");
- if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
- input.focus(this._showDatepicker);
- }
- if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
- buttonText = this._get(inst, "buttonText");
- buttonImage = this._get(inst, "buttonImage");
- inst.trigger = $(this._get(inst, "buttonImageOnly") ?
- $("<img/>").addClass(this._triggerClass).
- attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
- $("<button type='button'></button>").addClass(this._triggerClass).
- html(!buttonImage ? buttonText : $("<img/>").attr(
- { src:buttonImage, alt:buttonText, title:buttonText })));
- input[isRTL ? "before" : "after"](inst.trigger);
- inst.trigger.click(function() {
- if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
- $.datepicker._hideDatepicker();
- } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
- $.datepicker._hideDatepicker();
- $.datepicker._showDatepicker(input[0]);
- } else {
- $.datepicker._showDatepicker(input[0]);
- }
- return false;
- });
- }
- },
-
- /* Apply the maximum length for the date format. */
- _autoSize: function(inst) {
- if (this._get(inst, "autoSize") && !inst.inline) {
- var findMax, max, maxI, i,
- date = new Date(2009, 12 - 1, 20), // Ensure double digits
- dateFormat = this._get(inst, "dateFormat");
-
- if (dateFormat.match(/[DM]/)) {
- findMax = function(names) {
- max = 0;
- maxI = 0;
- for (i = 0; i < names.length; i++) {
- if (names[i].length > max) {
- max = names[i].length;
- maxI = i;
- }
- }
- return maxI;
- };
- date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
- "monthNames" : "monthNamesShort"))));
- date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
- "dayNames" : "dayNamesShort"))) + 20 - date.getDay());
- }
- inst.input.attr("size", this._formatDate(inst, date).length);
- }
- },
-
- /* Attach an inline date picker to a div. */
- _inlineDatepicker: function(target, inst) {
- var divSpan = $(target);
- if (divSpan.hasClass(this.markerClassName)) {
- return;
- }
- divSpan.addClass(this.markerClassName).append(inst.dpDiv);
- $.data(target, "datepicker", inst);
- this._setDate(inst, this._getDefaultDate(inst), true);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- //If disabled option is true, disable the datepicker before showing it (see ticket #5665)
- if( inst.settings.disabled ) {
- this._disableDatepicker( target );
- }
- // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
- // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
- inst.dpDiv.css( "display", "block" );
- },
-
- /* Pop-up the date picker in a "dialog" box.
- * @param input element - ignored
- * @param date string or Date - the initial date to display
- * @param onSelect function - the function to call when a date is selected
- * @param settings object - update the dialog date picker instance's settings (anonymous object)
- * @param pos int[2] - coordinates for the dialog's position within the screen or
- * event - with x/y coordinates or
- * leave empty for default (screen centre)
- * @return the manager object
- */
- _dialogDatepicker: function(input, date, onSelect, settings, pos) {
- var id, browserWidth, browserHeight, scrollX, scrollY,
- inst = this._dialogInst; // internal instance
-
- if (!inst) {
- this.uuid += 1;
- id = "dp" + this.uuid;
- this._dialogInput = $("<input type='text' id='" + id +
- "' style='position: absolute; top: -100px; width: 0px;'/>");
- this._dialogInput.keydown(this._doKeyDown);
- $("body").append(this._dialogInput);
- inst = this._dialogInst = this._newInst(this._dialogInput, false);
- inst.settings = {};
- $.data(this._dialogInput[0], "datepicker", inst);
- }
- datepicker_extendRemove(inst.settings, settings || {});
- date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
- this._dialogInput.val(date);
-
- this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
- if (!this._pos) {
- browserWidth = document.documentElement.clientWidth;
- browserHeight = document.documentElement.clientHeight;
- scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
- scrollY = document.documentElement.scrollTop || document.body.scrollTop;
- this._pos = // should use actual width/height below
- [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
- }
-
- // move input on screen for focus, but hidden behind dialog
- this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
- inst.settings.onSelect = onSelect;
- this._inDialog = true;
- this.dpDiv.addClass(this._dialogClass);
- this._showDatepicker(this._dialogInput[0]);
- if ($.blockUI) {
- $.blockUI(this.dpDiv);
- }
- $.data(this._dialogInput[0], "datepicker", inst);
- return this;
- },
-
- /* Detach a datepicker from its control.
- * @param target element - the target input field or division or span
- */
- _destroyDatepicker: function(target) {
- var nodeName,
- $target = $(target),
- inst = $.data(target, "datepicker");
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- $.removeData(target, "datepicker");
- if (nodeName === "input") {
- inst.append.remove();
- inst.trigger.remove();
- $target.removeClass(this.markerClassName).
- unbind("focus", this._showDatepicker).
- unbind("keydown", this._doKeyDown).
- unbind("keypress", this._doKeyPress).
- unbind("keyup", this._doKeyUp);
- } else if (nodeName === "div" || nodeName === "span") {
- $target.removeClass(this.markerClassName).empty();
- }
-
- if ( datepicker_instActive === inst ) {
- datepicker_instActive = null;
- }
- },
-
- /* Enable the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- */
- _enableDatepicker: function(target) {
- var nodeName, inline,
- $target = $(target),
- inst = $.data(target, "datepicker");
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- if (nodeName === "input") {
- target.disabled = false;
- inst.trigger.filter("button").
- each(function() { this.disabled = false; }).end().
- filter("img").css({opacity: "1.0", cursor: ""});
- } else if (nodeName === "div" || nodeName === "span") {
- inline = $target.children("." + this._inlineClass);
- inline.children().removeClass("ui-state-disabled");
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", false);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value === target ? null : value); }); // delete entry
- },
-
- /* Disable the date picker to a jQuery selection.
- * @param target element - the target input field or division or span
- */
- _disableDatepicker: function(target) {
- var nodeName, inline,
- $target = $(target),
- inst = $.data(target, "datepicker");
-
- if (!$target.hasClass(this.markerClassName)) {
- return;
- }
-
- nodeName = target.nodeName.toLowerCase();
- if (nodeName === "input") {
- target.disabled = true;
- inst.trigger.filter("button").
- each(function() { this.disabled = true; }).end().
- filter("img").css({opacity: "0.5", cursor: "default"});
- } else if (nodeName === "div" || nodeName === "span") {
- inline = $target.children("." + this._inlineClass);
- inline.children().addClass("ui-state-disabled");
- inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
- prop("disabled", true);
- }
- this._disabledInputs = $.map(this._disabledInputs,
- function(value) { return (value === target ? null : value); }); // delete entry
- this._disabledInputs[this._disabledInputs.length] = target;
- },
-
- /* Is the first field in a jQuery collection disabled as a datepicker?
- * @param target element - the target input field or division or span
- * @return boolean - true if disabled, false if enabled
- */
- _isDisabledDatepicker: function(target) {
- if (!target) {
- return false;
- }
- for (var i = 0; i < this._disabledInputs.length; i++) {
- if (this._disabledInputs[i] === target) {
- return true;
- }
- }
- return false;
- },
-
- /* Retrieve the instance data for the target control.
- * @param target element - the target input field or division or span
- * @return object - the associated instance data
- * @throws error if a jQuery problem getting data
- */
- _getInst: function(target) {
- try {
- return $.data(target, "datepicker");
- }
- catch (err) {
- throw "Missing instance data for this datepicker";
- }
- },
-
- /* Update or retrieve the settings for a date picker attached to an input field or division.
- * @param target element - the target input field or division or span
- * @param name object - the new settings to update or
- * string - the name of the setting to change or retrieve,
- * when retrieving also "all" for all instance settings or
- * "defaults" for all global defaults
- * @param value any - the new value for the setting
- * (omit if above is an object or to retrieve a value)
- */
- _optionDatepicker: function(target, name, value) {
- var settings, date, minDate, maxDate,
- inst = this._getInst(target);
-
- if (arguments.length === 2 && typeof name === "string") {
- return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
- (inst ? (name === "all" ? $.extend({}, inst.settings) :
- this._get(inst, name)) : null));
- }
-
- settings = name || {};
- if (typeof name === "string") {
- settings = {};
- settings[name] = value;
- }
-
- if (inst) {
- if (this._curInst === inst) {
- this._hideDatepicker();
- }
-
- date = this._getDateDatepicker(target, true);
- minDate = this._getMinMaxDate(inst, "min");
- maxDate = this._getMinMaxDate(inst, "max");
- datepicker_extendRemove(inst.settings, settings);
- // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
- if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
- inst.settings.minDate = this._formatDate(inst, minDate);
- }
- if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
- inst.settings.maxDate = this._formatDate(inst, maxDate);
- }
- if ( "disabled" in settings ) {
- if ( settings.disabled ) {
- this._disableDatepicker(target);
- } else {
- this._enableDatepicker(target);
- }
- }
- this._attachments($(target), inst);
- this._autoSize(inst);
- this._setDate(inst, date);
- this._updateAlternate(inst);
- this._updateDatepicker(inst);
- }
- },
-
- // change method deprecated
- _changeDatepicker: function(target, name, value) {
- this._optionDatepicker(target, name, value);
- },
-
- /* Redraw the date picker attached to an input field or division.
- * @param target element - the target input field or division or span
- */
- _refreshDatepicker: function(target) {
- var inst = this._getInst(target);
- if (inst) {
- this._updateDatepicker(inst);
- }
- },
-
- /* Set the dates for a jQuery selection.
- * @param target element - the target input field or division or span
- * @param date Date - the new date
- */
- _setDateDatepicker: function(target, date) {
- var inst = this._getInst(target);
- if (inst) {
- this._setDate(inst, date);
- this._updateDatepicker(inst);
- this._updateAlternate(inst);
- }
- },
-
- /* Get the date(s) for the first entry in a jQuery selection.
- * @param target element - the target input field or division or span
- * @param noDefault boolean - true if no default date is to be used
- * @return Date - the current date
- */
- _getDateDatepicker: function(target, noDefault) {
- var inst = this._getInst(target);
- if (inst && !inst.inline) {
- this._setDateFromField(inst, noDefault);
- }
- return (inst ? this._getDate(inst) : null);
- },
-
- /* Handle keystrokes. */
- _doKeyDown: function(event) {
- var onSelect, dateStr, sel,
- inst = $.datepicker._getInst(event.target),
- handled = true,
- isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
-
- inst._keyEvent = true;
- if ($.datepicker._datepickerShowing) {
- switch (event.keyCode) {
- case 9: $.datepicker._hideDatepicker();
- handled = false;
- break; // hide on tab out
- case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
- $.datepicker._currentClass + ")", inst.dpDiv);
- if (sel[0]) {
- $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
- }
-
- onSelect = $.datepicker._get(inst, "onSelect");
- if (onSelect) {
- dateStr = $.datepicker._formatDate(inst);
-
- // trigger custom callback
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
- } else {
- $.datepicker._hideDatepicker();
- }
-
- return false; // don't submit the form
- case 27: $.datepicker._hideDatepicker();
- break; // hide on escape
- case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, "stepBigMonths") :
- -$.datepicker._get(inst, "stepMonths")), "M");
- break; // previous month/year on page up/+ ctrl
- case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, "stepBigMonths") :
- +$.datepicker._get(inst, "stepMonths")), "M");
- break; // next month/year on page down/+ ctrl
- case 35: if (event.ctrlKey || event.metaKey) {
- $.datepicker._clearDate(event.target);
- }
- handled = event.ctrlKey || event.metaKey;
- break; // clear on ctrl or command +end
- case 36: if (event.ctrlKey || event.metaKey) {
- $.datepicker._gotoToday(event.target);
- }
- handled = event.ctrlKey || event.metaKey;
- break; // current on ctrl or command +home
- case 37: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
- }
- handled = event.ctrlKey || event.metaKey;
- // -1 day on ctrl or command +left
- if (event.originalEvent.altKey) {
- $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- -$.datepicker._get(inst, "stepBigMonths") :
- -$.datepicker._get(inst, "stepMonths")), "M");
- }
- // next month/year on alt +left on Mac
- break;
- case 38: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, -7, "D");
- }
- handled = event.ctrlKey || event.metaKey;
- break; // -1 week on ctrl or command +up
- case 39: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
- }
- handled = event.ctrlKey || event.metaKey;
- // +1 day on ctrl or command +right
- if (event.originalEvent.altKey) {
- $.datepicker._adjustDate(event.target, (event.ctrlKey ?
- +$.datepicker._get(inst, "stepBigMonths") :
- +$.datepicker._get(inst, "stepMonths")), "M");
- }
- // next month/year on alt +right
- break;
- case 40: if (event.ctrlKey || event.metaKey) {
- $.datepicker._adjustDate(event.target, +7, "D");
- }
- handled = event.ctrlKey || event.metaKey;
- break; // +1 week on ctrl or command +down
- default: handled = false;
- }
- } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
- $.datepicker._showDatepicker(this);
- } else {
- handled = false;
- }
-
- if (handled) {
- event.preventDefault();
- event.stopPropagation();
- }
- },
-
- /* Filter entered characters - based on date format. */
- _doKeyPress: function(event) {
- var chars, chr,
- inst = $.datepicker._getInst(event.target);
-
- if ($.datepicker._get(inst, "constrainInput")) {
- chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
- chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
- return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
- }
- },
-
- /* Synchronise manual entry and field/alternate field. */
- _doKeyUp: function(event) {
- var date,
- inst = $.datepicker._getInst(event.target);
-
- if (inst.input.val() !== inst.lastVal) {
- try {
- date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
- (inst.input ? inst.input.val() : null),
- $.datepicker._getFormatConfig(inst));
-
- if (date) { // only if valid
- $.datepicker._setDateFromField(inst);
- $.datepicker._updateAlternate(inst);
- $.datepicker._updateDatepicker(inst);
- }
- }
- catch (err) {
- }
- }
- return true;
- },
-
- /* Pop-up the date picker for a given input field.
- * If false returned from beforeShow event handler do not show.
- * @param input element - the input field attached to the date picker or
- * event - if triggered by focus
- */
- _showDatepicker: function(input) {
- input = input.target || input;
- if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
- input = $("input", input.parentNode)[0];
- }
-
- if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
- return;
- }
-
- var inst, beforeShow, beforeShowSettings, isFixed,
- offset, showAnim, duration;
-
- inst = $.datepicker._getInst(input);
- if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
- $.datepicker._curInst.dpDiv.stop(true, true);
- if ( inst && $.datepicker._datepickerShowing ) {
- $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
- }
- }
-
- beforeShow = $.datepicker._get(inst, "beforeShow");
- beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
- if(beforeShowSettings === false){
- return;
- }
- datepicker_extendRemove(inst.settings, beforeShowSettings);
-
- inst.lastVal = null;
- $.datepicker._lastInput = input;
- $.datepicker._setDateFromField(inst);
-
- if ($.datepicker._inDialog) { // hide cursor
- input.value = "";
- }
- if (!$.datepicker._pos) { // position below input
- $.datepicker._pos = $.datepicker._findPos(input);
- $.datepicker._pos[1] += input.offsetHeight; // add the height
- }
-
- isFixed = false;
- $(input).parents().each(function() {
- isFixed |= $(this).css("position") === "fixed";
- return !isFixed;
- });
-
- offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
- $.datepicker._pos = null;
- //to avoid flashes on Firefox
- inst.dpDiv.empty();
- // determine sizing offscreen
- inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
- $.datepicker._updateDatepicker(inst);
- // fix width for dynamic number of date pickers
- // and adjust position before showing
- offset = $.datepicker._checkOffset(inst, offset, isFixed);
- inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
- "static" : (isFixed ? "fixed" : "absolute")), display: "none",
- left: offset.left + "px", top: offset.top + "px"});
-
- if (!inst.inline) {
- showAnim = $.datepicker._get(inst, "showAnim");
- duration = $.datepicker._get(inst, "duration");
- inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
- $.datepicker._datepickerShowing = true;
-
- if ( $.effects && $.effects.effect[ showAnim ] ) {
- inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
- } else {
- inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
- }
-
- if ( $.datepicker._shouldFocusInput( inst ) ) {
- inst.input.focus();
- }
-
- $.datepicker._curInst = inst;
- }
- },
-
- /* Generate the date picker content. */
- _updateDatepicker: function(inst) {
- this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
- datepicker_instActive = inst; // for delegate hover events
- inst.dpDiv.empty().append(this._generateHTML(inst));
- this._attachHandlers(inst);
-
- var origyearshtml,
- numMonths = this._getNumberOfMonths(inst),
- cols = numMonths[1],
- width = 17,
- activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
-
- if ( activeCell.length > 0 ) {
- datepicker_handleMouseover.apply( activeCell.get( 0 ) );
- }
-
- inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
- if (cols > 1) {
- inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
- }
- inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
- "Class"]("ui-datepicker-multi");
- inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
- "Class"]("ui-datepicker-rtl");
-
- if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
- inst.input.focus();
- }
-
- // deffered render of the years select (to avoid flashes on Firefox)
- if( inst.yearshtml ){
- origyearshtml = inst.yearshtml;
- setTimeout(function(){
- //assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml && inst.yearshtml ){
- inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
- }
- origyearshtml = inst.yearshtml = null;
- }, 0);
- }
- },
-
- // #6694 - don't focus the input if it's already focused
- // this breaks the change event in IE
- // Support: IE and jQuery <1.9
- _shouldFocusInput: function( inst ) {
- return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
- },
-
- /* Check positioning to remain on screen. */
- _checkOffset: function(inst, offset, isFixed) {
- var dpWidth = inst.dpDiv.outerWidth(),
- dpHeight = inst.dpDiv.outerHeight(),
- inputWidth = inst.input ? inst.input.outerWidth() : 0,
- inputHeight = inst.input ? inst.input.outerHeight() : 0,
- viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
- viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
-
- offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
- offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
- offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
-
- // now check if datepicker is showing outside window viewport - move to a better place if so.
- offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
- Math.abs(offset.left + dpWidth - viewWidth) : 0);
- offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
- Math.abs(dpHeight + inputHeight) : 0);
-
- return offset;
- },
-
- /* Find an object's position on the screen. */
- _findPos: function(obj) {
- var position,
- inst = this._getInst(obj),
- isRTL = this._get(inst, "isRTL");
-
- while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
- obj = obj[isRTL ? "previousSibling" : "nextSibling"];
- }
-
- position = $(obj).offset();
- return [position.left, position.top];
- },
-
- /* Hide the date picker from view.
- * @param input element - the input field attached to the date picker
- */
- _hideDatepicker: function(input) {
- var showAnim, duration, postProcess, onClose,
- inst = this._curInst;
-
- if (!inst || (input && inst !== $.data(input, "datepicker"))) {
- return;
- }
-
- if (this._datepickerShowing) {
- showAnim = this._get(inst, "showAnim");
- duration = this._get(inst, "duration");
- postProcess = function() {
- $.datepicker._tidyDialog(inst);
- };
-
- // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
- if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
- inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
- } else {
- inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
- (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
- }
-
- if (!showAnim) {
- postProcess();
- }
- this._datepickerShowing = false;
-
- onClose = this._get(inst, "onClose");
- if (onClose) {
- onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
- }
-
- this._lastInput = null;
- if (this._inDialog) {
- this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
- if ($.blockUI) {
- $.unblockUI();
- $("body").append(this.dpDiv);
- }
- }
- this._inDialog = false;
- }
- },
-
- /* Tidy up after a dialog display. */
- _tidyDialog: function(inst) {
- inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
- },
-
- /* Close date picker if clicked elsewhere. */
- _checkExternalClick: function(event) {
- if (!$.datepicker._curInst) {
- return;
- }
-
- var $target = $(event.target),
- inst = $.datepicker._getInst($target[0]);
-
- if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
- $target.parents("#" + $.datepicker._mainDivId).length === 0 &&
- !$target.hasClass($.datepicker.markerClassName) &&
- !$target.closest("." + $.datepicker._triggerClass).length &&
- $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
- ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
- $.datepicker._hideDatepicker();
- }
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustDate: function(id, offset, period) {
- var target = $(id),
- inst = this._getInst(target[0]);
-
- if (this._isDisabledDatepicker(target[0])) {
- return;
- }
- this._adjustInstDate(inst, offset +
- (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
- period);
- this._updateDatepicker(inst);
- },
-
- /* Action for current link. */
- _gotoToday: function(id) {
- var date,
- target = $(id),
- inst = this._getInst(target[0]);
-
- if (this._get(inst, "gotoCurrent") && inst.currentDay) {
- inst.selectedDay = inst.currentDay;
- inst.drawMonth = inst.selectedMonth = inst.currentMonth;
- inst.drawYear = inst.selectedYear = inst.currentYear;
- } else {
- date = new Date();
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- }
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a new month/year. */
- _selectMonthYear: function(id, select, period) {
- var target = $(id),
- inst = this._getInst(target[0]);
-
- inst["selected" + (period === "M" ? "Month" : "Year")] =
- inst["draw" + (period === "M" ? "Month" : "Year")] =
- parseInt(select.options[select.selectedIndex].value,10);
-
- this._notifyChange(inst);
- this._adjustDate(target);
- },
-
- /* Action for selecting a day. */
- _selectDay: function(id, month, year, td) {
- var inst,
- target = $(id);
-
- if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
- return;
- }
-
- inst = this._getInst(target[0]);
- inst.selectedDay = inst.currentDay = $("a", td).html();
- inst.selectedMonth = inst.currentMonth = month;
- inst.selectedYear = inst.currentYear = year;
- this._selectDate(id, this._formatDate(inst,
- inst.currentDay, inst.currentMonth, inst.currentYear));
- },
-
- /* Erase the input field and hide the date picker. */
- _clearDate: function(id) {
- var target = $(id);
- this._selectDate(target, "");
- },
-
- /* Update the input field with the selected date. */
- _selectDate: function(id, dateStr) {
- var onSelect,
- target = $(id),
- inst = this._getInst(target[0]);
-
- dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
- if (inst.input) {
- inst.input.val(dateStr);
- }
- this._updateAlternate(inst);
-
- onSelect = this._get(inst, "onSelect");
- if (onSelect) {
- onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback
- } else if (inst.input) {
- inst.input.trigger("change"); // fire the change event
- }
-
- if (inst.inline){
- this._updateDatepicker(inst);
- } else {
- this._hideDatepicker();
- this._lastInput = inst.input[0];
- if (typeof(inst.input[0]) !== "object") {
- inst.input.focus(); // restore focus
- }
- this._lastInput = null;
- }
- },
-
- /* Update any alternate field to synchronise with the main field. */
- _updateAlternate: function(inst) {
- var altFormat, date, dateStr,
- altField = this._get(inst, "altField");
-
- if (altField) { // update alternate field too
- altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
- date = this._getDate(inst);
- dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
- $(altField).each(function() { $(this).val(dateStr); });
- }
- },
-
- /* Set as beforeShowDay function to prevent selection of weekends.
- * @param date Date - the date to customise
- * @return [boolean, string] - is this date selectable?, what is its CSS class?
- */
- noWeekends: function(date) {
- var day = date.getDay();
- return [(day > 0 && day < 6), ""];
- },
-
- /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
- * @param date Date - the date to get the week for
- * @return number - the number of the week within the year that contains this date
- */
- iso8601Week: function(date) {
- var time,
- checkDate = new Date(date.getTime());
-
- // Find Thursday of this week starting on Monday
- checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
-
- time = checkDate.getTime();
- checkDate.setMonth(0); // Compare with Jan 1
- checkDate.setDate(1);
- return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
- },
-
- /* Parse a string value into a date object.
- * See formatDate below for the possible formats.
- *
- * @param format string - the expected format of the date
- * @param value string - the date in the above format
- * @param settings Object - attributes include:
- * shortYearCutoff number - the cutoff year for determining the century (optional)
- * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- * dayNames string[7] - names of the days from Sunday (optional)
- * monthNamesShort string[12] - abbreviated names of the months (optional)
- * monthNames string[12] - names of the months (optional)
- * @return Date - the extracted date value or null if value is blank
- */
- parseDate: function (format, value, settings) {
- if (format == null || value == null) {
- throw "Invalid arguments";
- }
-
- value = (typeof value === "object" ? value.toString() : value + "");
- if (value === "") {
- return null;
- }
-
- var iFormat, dim, extra,
- iValue = 0,
- shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
- shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
- dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
- dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
- monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
- monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
- year = -1,
- month = -1,
- day = -1,
- doy = -1,
- literal = false,
- date,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- },
- // Extract a number from the string value
- getNumber = function(match) {
- var isDoubled = lookAhead(match),
- size = (match === "@" ? 14 : (match === "!" ? 20 :
- (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
- minSize = (match === "y" ? size : 1),
- digits = new RegExp("^\\d{" + minSize + "," + size + "}"),
- num = value.substring(iValue).match(digits);
- if (!num) {
- throw "Missing number at position " + iValue;
- }
- iValue += num[0].length;
- return parseInt(num[0], 10);
- },
- // Extract a name from the string value and convert to an index
- getName = function(match, shortNames, longNames) {
- var index = -1,
- names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
- return [ [k, v] ];
- }).sort(function (a, b) {
- return -(a[1].length - b[1].length);
- });
-
- $.each(names, function (i, pair) {
- var name = pair[1];
- if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
- index = pair[0];
- iValue += name.length;
- return false;
- }
- });
- if (index !== -1) {
- return index + 1;
- } else {
- throw "Unknown name at position " + iValue;
- }
- },
- // Confirm that a literal character matches the string value
- checkLiteral = function() {
- if (value.charAt(iValue) !== format.charAt(iFormat)) {
- throw "Unexpected literal at position " + iValue;
- }
- iValue++;
- };
-
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- checkLiteral();
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d":
- day = getNumber("d");
- break;
- case "D":
- getName("D", dayNamesShort, dayNames);
- break;
- case "o":
- doy = getNumber("o");
- break;
- case "m":
- month = getNumber("m");
- break;
- case "M":
- month = getName("M", monthNamesShort, monthNames);
- break;
- case "y":
- year = getNumber("y");
- break;
- case "@":
- date = new Date(getNumber("@"));
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "!":
- date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
- year = date.getFullYear();
- month = date.getMonth() + 1;
- day = date.getDate();
- break;
- case "'":
- if (lookAhead("'")){
- checkLiteral();
- } else {
- literal = true;
- }
- break;
- default:
- checkLiteral();
- }
- }
- }
-
- if (iValue < value.length){
- extra = value.substr(iValue);
- if (!/^\s+/.test(extra)) {
- throw "Extra/unparsed characters found in date: " + extra;
- }
- }
-
- if (year === -1) {
- year = new Date().getFullYear();
- } else if (year < 100) {
- year += new Date().getFullYear() - new Date().getFullYear() % 100 +
- (year <= shortYearCutoff ? 0 : -100);
- }
-
- if (doy > -1) {
- month = 1;
- day = doy;
- do {
- dim = this._getDaysInMonth(year, month - 1);
- if (day <= dim) {
- break;
- }
- month++;
- day -= dim;
- } while (true);
- }
-
- date = this._daylightSavingAdjust(new Date(year, month - 1, day));
- if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
- throw "Invalid date"; // E.g. 31/02/00
- }
- return date;
- },
-
- /* Standard date formats. */
- ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
- COOKIE: "D, dd M yy",
- ISO_8601: "yy-mm-dd",
- RFC_822: "D, d M y",
- RFC_850: "DD, dd-M-y",
- RFC_1036: "D, d M y",
- RFC_1123: "D, d M yy",
- RFC_2822: "D, d M yy",
- RSS: "D, d M y", // RFC 822
- TICKS: "!",
- TIMESTAMP: "@",
- W3C: "yy-mm-dd", // ISO 8601
-
- _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
- Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
-
- /* Format a date object into a string value.
- * The format can be combinations of the following:
- * d - day of month (no leading zero)
- * dd - day of month (two digit)
- * o - day of year (no leading zeros)
- * oo - day of year (three digit)
- * D - day name short
- * DD - day name long
- * m - month of year (no leading zero)
- * mm - month of year (two digit)
- * M - month name short
- * MM - month name long
- * y - year (two digit)
- * yy - year (four digit)
- * @ - Unix timestamp (ms since 01/01/1970)
- * ! - Windows ticks (100ns since 01/01/0001)
- * "..." - literal text
- * '' - single quote
- *
- * @param format string - the desired format of the date
- * @param date Date - the date value to format
- * @param settings Object - attributes include:
- * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional)
- * dayNames string[7] - names of the days from Sunday (optional)
- * monthNamesShort string[12] - abbreviated names of the months (optional)
- * monthNames string[12] - names of the months (optional)
- * @return string - the date in the above format
- */
- formatDate: function (format, date, settings) {
- if (!date) {
- return "";
- }
-
- var iFormat,
- dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
- dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
- monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
- monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- },
- // Format a number, with leading zero if necessary
- formatNumber = function(match, value, len) {
- var num = "" + value;
- if (lookAhead(match)) {
- while (num.length < len) {
- num = "0" + num;
- }
- }
- return num;
- },
- // Format a name, short or long as requested
- formatName = function(match, value, shortNames, longNames) {
- return (lookAhead(match) ? longNames[value] : shortNames[value]);
- },
- output = "",
- literal = false;
-
- if (date) {
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- output += format.charAt(iFormat);
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d":
- output += formatNumber("d", date.getDate(), 2);
- break;
- case "D":
- output += formatName("D", date.getDay(), dayNamesShort, dayNames);
- break;
- case "o":
- output += formatNumber("o",
- Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
- break;
- case "m":
- output += formatNumber("m", date.getMonth() + 1, 2);
- break;
- case "M":
- output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
- break;
- case "y":
- output += (lookAhead("y") ? date.getFullYear() :
- (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
- break;
- case "@":
- output += date.getTime();
- break;
- case "!":
- output += date.getTime() * 10000 + this._ticksTo1970;
- break;
- case "'":
- if (lookAhead("'")) {
- output += "'";
- } else {
- literal = true;
- }
- break;
- default:
- output += format.charAt(iFormat);
- }
- }
- }
- }
- return output;
- },
-
- /* Extract all possible characters from the date format. */
- _possibleChars: function (format) {
- var iFormat,
- chars = "",
- literal = false,
- // Check whether a format character is doubled
- lookAhead = function(match) {
- var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
- if (matches) {
- iFormat++;
- }
- return matches;
- };
-
- for (iFormat = 0; iFormat < format.length; iFormat++) {
- if (literal) {
- if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
- literal = false;
- } else {
- chars += format.charAt(iFormat);
- }
- } else {
- switch (format.charAt(iFormat)) {
- case "d": case "m": case "y": case "@":
- chars += "0123456789";
- break;
- case "D": case "M":
- return null; // Accept anything
- case "'":
- if (lookAhead("'")) {
- chars += "'";
- } else {
- literal = true;
- }
- break;
- default:
- chars += format.charAt(iFormat);
- }
- }
- }
- return chars;
- },
-
- /* Get a setting value, defaulting if necessary. */
- _get: function(inst, name) {
- return inst.settings[name] !== undefined ?
- inst.settings[name] : this._defaults[name];
- },
-
- /* Parse existing date and initialise date picker. */
- _setDateFromField: function(inst, noDefault) {
- if (inst.input.val() === inst.lastVal) {
- return;
- }
-
- var dateFormat = this._get(inst, "dateFormat"),
- dates = inst.lastVal = inst.input ? inst.input.val() : null,
- defaultDate = this._getDefaultDate(inst),
- date = defaultDate,
- settings = this._getFormatConfig(inst);
-
- try {
- date = this.parseDate(dateFormat, dates, settings) || defaultDate;
- } catch (event) {
- dates = (noDefault ? "" : dates);
- }
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- inst.currentDay = (dates ? date.getDate() : 0);
- inst.currentMonth = (dates ? date.getMonth() : 0);
- inst.currentYear = (dates ? date.getFullYear() : 0);
- this._adjustInstDate(inst);
- },
-
- /* Retrieve the default date shown on opening. */
- _getDefaultDate: function(inst) {
- return this._restrictMinMax(inst,
- this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
- },
-
- /* A date may be specified as an exact value or a relative one. */
- _determineDate: function(inst, date, defaultDate) {
- var offsetNumeric = function(offset) {
- var date = new Date();
- date.setDate(date.getDate() + offset);
- return date;
- },
- offsetString = function(offset) {
- try {
- return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
- offset, $.datepicker._getFormatConfig(inst));
- }
- catch (e) {
- // Ignore
- }
-
- var date = (offset.toLowerCase().match(/^c/) ?
- $.datepicker._getDate(inst) : null) || new Date(),
- year = date.getFullYear(),
- month = date.getMonth(),
- day = date.getDate(),
- pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
- matches = pattern.exec(offset);
-
- while (matches) {
- switch (matches[2] || "d") {
- case "d" : case "D" :
- day += parseInt(matches[1],10); break;
- case "w" : case "W" :
- day += parseInt(matches[1],10) * 7; break;
- case "m" : case "M" :
- month += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- case "y": case "Y" :
- year += parseInt(matches[1],10);
- day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
- break;
- }
- matches = pattern.exec(offset);
- }
- return new Date(year, month, day);
- },
- newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
- (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
-
- newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
- if (newDate) {
- newDate.setHours(0);
- newDate.setMinutes(0);
- newDate.setSeconds(0);
- newDate.setMilliseconds(0);
- }
- return this._daylightSavingAdjust(newDate);
- },
-
- /* Handle switch to/from daylight saving.
- * Hours may be non-zero on daylight saving cut-over:
- * > 12 when midnight changeover, but then cannot generate
- * midnight datetime, so jump to 1AM, otherwise reset.
- * @param date (Date) the date to check
- * @return (Date) the corrected date
- */
- _daylightSavingAdjust: function(date) {
- if (!date) {
- return null;
- }
- date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
- return date;
- },
-
- /* Set the date(s) directly. */
- _setDate: function(inst, date, noChange) {
- var clear = !date,
- origMonth = inst.selectedMonth,
- origYear = inst.selectedYear,
- newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
-
- inst.selectedDay = inst.currentDay = newDate.getDate();
- inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
- inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
- if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
- this._notifyChange(inst);
- }
- this._adjustInstDate(inst);
- if (inst.input) {
- inst.input.val(clear ? "" : this._formatDate(inst));
- }
- },
-
- /* Retrieve the date(s) directly. */
- _getDate: function(inst) {
- var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
- this._daylightSavingAdjust(new Date(
- inst.currentYear, inst.currentMonth, inst.currentDay)));
- return startDate;
- },
-
- /* Attach the onxxx handlers. These are declared statically so
- * they work with static code transformers like Caja.
- */
- _attachHandlers: function(inst) {
- var stepMonths = this._get(inst, "stepMonths"),
- id = "#" + inst.id.replace( /\\\\/g, "\\" );
- inst.dpDiv.find("[data-handler]").map(function () {
- var handler = {
- prev: function () {
- $.datepicker._adjustDate(id, -stepMonths, "M");
- },
- next: function () {
- $.datepicker._adjustDate(id, +stepMonths, "M");
- },
- hide: function () {
- $.datepicker._hideDatepicker();
- },
- today: function () {
- $.datepicker._gotoToday(id);
- },
- selectDay: function () {
- $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
- return false;
- },
- selectMonth: function () {
- $.datepicker._selectMonthYear(id, this, "M");
- return false;
- },
- selectYear: function () {
- $.datepicker._selectMonthYear(id, this, "Y");
- return false;
- }
- };
- $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
- });
- },
-
- /* Generate the HTML for the current state of the date picker. */
- _generateHTML: function(inst) {
- var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
- controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
- monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
- selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
- cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
- printDate, dRow, tbody, daySettings, otherMonth, unselectable,
- tempDate = new Date(),
- today = this._daylightSavingAdjust(
- new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
- isRTL = this._get(inst, "isRTL"),
- showButtonPanel = this._get(inst, "showButtonPanel"),
- hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
- navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
- numMonths = this._getNumberOfMonths(inst),
- showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
- stepMonths = this._get(inst, "stepMonths"),
- isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
- currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
- new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
- minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- drawMonth = inst.drawMonth - showCurrentAtPos,
- drawYear = inst.drawYear;
-
- if (drawMonth < 0) {
- drawMonth += 12;
- drawYear--;
- }
- if (maxDate) {
- maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
- maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
- maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
- while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
- drawMonth--;
- if (drawMonth < 0) {
- drawMonth = 11;
- drawYear--;
- }
- }
- }
- inst.drawMonth = drawMonth;
- inst.drawYear = drawYear;
-
- prevText = this._get(inst, "prevText");
- prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
- this._getFormatConfig(inst)));
-
- prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
- "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
- " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
- (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
-
- nextText = this._get(inst, "nextText");
- nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
- this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
- this._getFormatConfig(inst)));
-
- next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
- "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
- " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
- (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
-
- currentText = this._get(inst, "currentText");
- gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
- currentText = (!navigationAsDateFormat ? currentText :
- this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
-
- controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
- this._get(inst, "closeText") + "</button>" : "");
-
- buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
- (this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
- ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
-
- firstDay = parseInt(this._get(inst, "firstDay"),10);
- firstDay = (isNaN(firstDay) ? 0 : firstDay);
-
- showWeek = this._get(inst, "showWeek");
- dayNames = this._get(inst, "dayNames");
- dayNamesMin = this._get(inst, "dayNamesMin");
- monthNames = this._get(inst, "monthNames");
- monthNamesShort = this._get(inst, "monthNamesShort");
- beforeShowDay = this._get(inst, "beforeShowDay");
- showOtherMonths = this._get(inst, "showOtherMonths");
- selectOtherMonths = this._get(inst, "selectOtherMonths");
- defaultDate = this._getDefaultDate(inst);
- html = "";
- dow;
- for (row = 0; row < numMonths[0]; row++) {
- group = "";
- this.maxRows = 4;
- for (col = 0; col < numMonths[1]; col++) {
- selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
- cornerClass = " ui-corner-all";
- calender = "";
- if (isMultiMonth) {
- calender += "<div class='ui-datepicker-group";
- if (numMonths[1] > 1) {
- switch (col) {
- case 0: calender += " ui-datepicker-group-first";
- cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
- case numMonths[1]-1: calender += " ui-datepicker-group-last";
- cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
- default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
- }
- }
- calender += "'>";
- }
- calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
- (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
- (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
- this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
- row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
- "</div><table class='ui-datepicker-calendar'><thead>" +
- "<tr>";
- thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
- for (dow = 0; dow < 7; dow++) { // days of the week
- day = (dow + firstDay) % 7;
- thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
- "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
- }
- calender += thead + "</tr></thead><tbody>";
- daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
- if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
- inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
- }
- leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
- curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
- numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
- this.maxRows = numRows;
- printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
- for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
- calender += "<tr>";
- tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
- this._get(inst, "calculateWeek")(printDate) + "</td>");
- for (dow = 0; dow < 7; dow++) { // create date picker days
- daySettings = (beforeShowDay ?
- beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
- otherMonth = (printDate.getMonth() !== drawMonth);
- unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
- (minDate && printDate < minDate) || (maxDate && printDate > maxDate);
- tbody += "<td class='" +
- ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
- (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
- ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
- (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
- // or defaultDate is current printedDate and defaultDate is selectedDate
- " " + this._dayOverClass : "") + // highlight selected day
- (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days
- (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
- (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
- (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
- ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
- (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
- (otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
- (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
- (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
- (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
- (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
- "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
- printDate.setDate(printDate.getDate() + 1);
- printDate = this._daylightSavingAdjust(printDate);
- }
- calender += tbody + "</tr>";
- }
- drawMonth++;
- if (drawMonth > 11) {
- drawMonth = 0;
- drawYear++;
- }
- calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
- ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
- group += calender;
- }
- html += group;
- }
- html += buttonPanel;
- inst._keyEvent = false;
- return html;
- },
-
- /* Generate the month and year header. */
- _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
- secondary, monthNames, monthNamesShort) {
-
- var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
- changeMonth = this._get(inst, "changeMonth"),
- changeYear = this._get(inst, "changeYear"),
- showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
- html = "<div class='ui-datepicker-title'>",
- monthHtml = "";
-
- // month selection
- if (secondary || !changeMonth) {
- monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
- } else {
- inMinYear = (minDate && minDate.getFullYear() === drawYear);
- inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
- monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
- for ( month = 0; month < 12; month++) {
- if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
- monthHtml += "<option value='" + month + "'" +
- (month === drawMonth ? " selected='selected'" : "") +
- ">" + monthNamesShort[month] + "</option>";
- }
- }
- monthHtml += "</select>";
- }
-
- if (!showMonthAfterYear) {
- html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
- }
-
- // year selection
- if ( !inst.yearshtml ) {
- inst.yearshtml = "";
- if (secondary || !changeYear) {
- html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
- } else {
- // determine range of years to display
- years = this._get(inst, "yearRange").split(":");
- thisYear = new Date().getFullYear();
- determineYear = function(value) {
- var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
- (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
- parseInt(value, 10)));
- return (isNaN(year) ? thisYear : year);
- };
- year = determineYear(years[0]);
- endYear = Math.max(year, determineYear(years[1] || ""));
- year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
- endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
- inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
- for (; year <= endYear; year++) {
- inst.yearshtml += "<option value='" + year + "'" +
- (year === drawYear ? " selected='selected'" : "") +
- ">" + year + "</option>";
- }
- inst.yearshtml += "</select>";
-
- html += inst.yearshtml;
- inst.yearshtml = null;
- }
- }
-
- html += this._get(inst, "yearSuffix");
- if (showMonthAfterYear) {
- html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
- }
- html += "</div>"; // Close datepicker_header
- return html;
- },
-
- /* Adjust one of the date sub-fields. */
- _adjustInstDate: function(inst, offset, period) {
- var year = inst.drawYear + (period === "Y" ? offset : 0),
- month = inst.drawMonth + (period === "M" ? offset : 0),
- day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
- date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
-
- inst.selectedDay = date.getDate();
- inst.drawMonth = inst.selectedMonth = date.getMonth();
- inst.drawYear = inst.selectedYear = date.getFullYear();
- if (period === "M" || period === "Y") {
- this._notifyChange(inst);
- }
- },
-
- /* Ensure a date is within any min/max bounds. */
- _restrictMinMax: function(inst, date) {
- var minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- newDate = (minDate && date < minDate ? minDate : date);
- return (maxDate && newDate > maxDate ? maxDate : newDate);
- },
-
- /* Notify change of month/year. */
- _notifyChange: function(inst) {
- var onChange = this._get(inst, "onChangeMonthYear");
- if (onChange) {
- onChange.apply((inst.input ? inst.input[0] : null),
- [inst.selectedYear, inst.selectedMonth + 1, inst]);
- }
- },
-
- /* Determine the number of months to show. */
- _getNumberOfMonths: function(inst) {
- var numMonths = this._get(inst, "numberOfMonths");
- return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
- },
-
- /* Determine the current maximum date - ensure no time components are set. */
- _getMinMaxDate: function(inst, minMax) {
- return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
- },
-
- /* Find the number of days in a given month. */
- _getDaysInMonth: function(year, month) {
- return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
- },
-
- /* Find the day of the week of the first of a month. */
- _getFirstDayOfMonth: function(year, month) {
- return new Date(year, month, 1).getDay();
- },
-
- /* Determines if we should allow a "next/prev" month display change. */
- _canAdjustMonth: function(inst, offset, curYear, curMonth) {
- var numMonths = this._getNumberOfMonths(inst),
- date = this._daylightSavingAdjust(new Date(curYear,
- curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
-
- if (offset < 0) {
- date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
- }
- return this._isInRange(inst, date);
- },
-
- /* Is the given date in the accepted range? */
- _isInRange: function(inst, date) {
- var yearSplit, currentYear,
- minDate = this._getMinMaxDate(inst, "min"),
- maxDate = this._getMinMaxDate(inst, "max"),
- minYear = null,
- maxYear = null,
- years = this._get(inst, "yearRange");
- if (years){
- yearSplit = years.split(":");
- currentYear = new Date().getFullYear();
- minYear = parseInt(yearSplit[0], 10);
- maxYear = parseInt(yearSplit[1], 10);
- if ( yearSplit[0].match(/[+\-].*/) ) {
- minYear += currentYear;
- }
- if ( yearSplit[1].match(/[+\-].*/) ) {
- maxYear += currentYear;
- }
- }
-
- return ((!minDate || date.getTime() >= minDate.getTime()) &&
- (!maxDate || date.getTime() <= maxDate.getTime()) &&
- (!minYear || date.getFullYear() >= minYear) &&
- (!maxYear || date.getFullYear() <= maxYear));
- },
-
- /* Provide the configuration settings for formatting/parsing. */
- _getFormatConfig: function(inst) {
- var shortYearCutoff = this._get(inst, "shortYearCutoff");
- shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
- new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
- return {shortYearCutoff: shortYearCutoff,
- dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
- monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
- },
-
- /* Format the given date for display. */
- _formatDate: function(inst, day, month, year) {
- if (!day) {
- inst.currentDay = inst.selectedDay;
- inst.currentMonth = inst.selectedMonth;
- inst.currentYear = inst.selectedYear;
- }
- var date = (day ? (typeof day === "object" ? day :
- this._daylightSavingAdjust(new Date(year, month, day))) :
- this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
- return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
- }
-});
-
-/*
- * Bind hover events for datepicker elements.
- * Done via delegate so the binding only occurs once in the lifetime of the parent div.
- * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
- */
-function datepicker_bindHover(dpDiv) {
- var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
- return dpDiv.delegate(selector, "mouseout", function() {
- $(this).removeClass("ui-state-hover");
- if (this.className.indexOf("ui-datepicker-prev") !== -1) {
- $(this).removeClass("ui-datepicker-prev-hover");
- }
- if (this.className.indexOf("ui-datepicker-next") !== -1) {
- $(this).removeClass("ui-datepicker-next-hover");
- }
- })
- .delegate( selector, "mouseover", datepicker_handleMouseover );
-}
-
-function datepicker_handleMouseover() {
- if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) {
- $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
- $(this).addClass("ui-state-hover");
- if (this.className.indexOf("ui-datepicker-prev") !== -1) {
- $(this).addClass("ui-datepicker-prev-hover");
- }
- if (this.className.indexOf("ui-datepicker-next") !== -1) {
- $(this).addClass("ui-datepicker-next-hover");
- }
- }
-}
-
-/* jQuery extend now ignores nulls! */
-function datepicker_extendRemove(target, props) {
- $.extend(target, props);
- for (var name in props) {
- if (props[name] == null) {
- target[name] = props[name];
- }
- }
- return target;
-}
-
-/* Invoke the datepicker functionality.
- @param options string - a command, optionally followed by additional parameters or
- Object - settings for attaching new datepicker functionality
- @return jQuery object */
-$.fn.datepicker = function(options){
-
- /* Verify an empty collection wasn't passed - Fixes #6976 */
- if ( !this.length ) {
- return this;
- }
-
- /* Initialise the date picker. */
- if (!$.datepicker.initialized) {
- $(document).mousedown($.datepicker._checkExternalClick);
- $.datepicker.initialized = true;
- }
-
- /* Append datepicker main container to body if not exist. */
- if ($("#"+$.datepicker._mainDivId).length === 0) {
- $("body").append($.datepicker.dpDiv);
- }
-
- var otherArgs = Array.prototype.slice.call(arguments, 1);
- if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
- return $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this[0]].concat(otherArgs));
- }
- if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
- return $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this[0]].concat(otherArgs));
- }
- return this.each(function() {
- typeof options === "string" ?
- $.datepicker["_" + options + "Datepicker"].
- apply($.datepicker, [this].concat(otherArgs)) :
- $.datepicker._attachDatepicker(this, options);
- });
-};
-
-$.datepicker = new Datepicker(); // singleton instance
-$.datepicker.initialized = false;
-$.datepicker.uuid = new Date().getTime();
-$.datepicker.version = "1.11.4";
-
-var datepicker = $.datepicker;
-
-
-/*!
- * jQuery UI Draggable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/draggable/
- */
-
-
-$.widget("ui.draggable", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "drag",
- options: {
- addClasses: true,
- appendTo: "parent",
- axis: false,
- connectToSortable: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- grid: false,
- handle: false,
- helper: "original",
- iframeFix: false,
- opacity: false,
- refreshPositions: false,
- revert: false,
- revertDuration: 500,
- scope: "default",
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- snap: false,
- snapMode: "both",
- snapTolerance: 20,
- stack: false,
- zIndex: false,
-
- // callbacks
- drag: null,
- start: null,
- stop: null
- },
- _create: function() {
-
- if ( this.options.helper === "original" ) {
- this._setPositionRelative();
- }
- if (this.options.addClasses){
- this.element.addClass("ui-draggable");
- }
- if (this.options.disabled){
- this.element.addClass("ui-draggable-disabled");
- }
- this._setHandleClassName();
-
- this._mouseInit();
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
- if ( key === "handle" ) {
- this._removeHandleClassName();
- this._setHandleClassName();
- }
- },
-
- _destroy: function() {
- if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
- this.destroyOnClear = true;
- return;
- }
- this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
- this._removeHandleClassName();
- this._mouseDestroy();
- },
-
- _mouseCapture: function(event) {
- var o = this.options;
-
- this._blurActiveElement( event );
-
- // among others, prevent a drag on a resizable-handle
- if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
- return false;
- }
-
- //Quit if we're not on a valid handle
- this.handle = this._getHandle(event);
- if (!this.handle) {
- return false;
- }
-
- this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
-
- return true;
-
- },
-
- _blockFrames: function( selector ) {
- this.iframeBlocks = this.document.find( selector ).map(function() {
- var iframe = $( this );
-
- return $( "<div>" )
- .css( "position", "absolute" )
- .appendTo( iframe.parent() )
- .outerWidth( iframe.outerWidth() )
- .outerHeight( iframe.outerHeight() )
- .offset( iframe.offset() )[ 0 ];
- });
- },
-
- _unblockFrames: function() {
- if ( this.iframeBlocks ) {
- this.iframeBlocks.remove();
- delete this.iframeBlocks;
- }
- },
-
- _blurActiveElement: function( event ) {
- var document = this.document[ 0 ];
-
- // Only need to blur if the event occurred on the draggable itself, see #10527
- if ( !this.handleElement.is( event.target ) ) {
- return;
- }
-
- // support: IE9
- // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
- try {
-
- // Support: IE9, IE10
- // If the <body> is blurred, IE will switch windows, see #9520
- if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) {
-
- // Blur any element that currently has focus, see #4261
- $( document.activeElement ).blur();
- }
- } catch ( error ) {}
- },
-
- _mouseStart: function(event) {
-
- var o = this.options;
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- this.helper.addClass("ui-draggable-dragging");
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- //If ddmanager is used for droppables, set the global draggable
- if ($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Store the helper's css position
- this.cssPosition = this.helper.css( "position" );
- this.scrollParent = this.helper.scrollParent( true );
- this.offsetParent = this.helper.offsetParent();
- this.hasFixedAncestor = this.helper.parents().filter(function() {
- return $( this ).css( "position" ) === "fixed";
- }).length > 0;
-
- //The element's absolute position on the page minus margins
- this.positionAbs = this.element.offset();
- this._refreshOffsets( event );
-
- //Generate the original position
- this.originalPosition = this.position = this._generatePosition( event, false );
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Set a containment if given in the options
- this._setContainment();
-
- //Trigger event + callbacks
- if (this._trigger("start", event) === false) {
- this._clear();
- return false;
- }
-
- //Recache the helper size
- this._cacheHelperProportions();
-
- //Prepare the droppable offsets
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- // Reset helper's right/bottom css if they're set and set explicit width/height instead
- // as this prevents resizing of elements with right/bottom set (see #7772)
- this._normalizeRightBottom();
-
- this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
-
- //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStart(this, event);
- }
-
- return true;
- },
-
- _refreshOffsets: function( event ) {
- this.offset = {
- top: this.positionAbs.top - this.margins.top,
- left: this.positionAbs.left - this.margins.left,
- scroll: false,
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset()
- };
-
- this.offset.click = {
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- };
- },
-
- _mouseDrag: function(event, noPropagation) {
- // reset any necessary cached properties (see #5009)
- if ( this.hasFixedAncestor ) {
- this.offset.parent = this._getParentOffset();
- }
-
- //Compute the helpers position
- this.position = this._generatePosition( event, true );
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Call plugins and callbacks and use the resulting position if something is returned
- if (!noPropagation) {
- var ui = this._uiHash();
- if (this._trigger("drag", event, ui) === false) {
- this._mouseUp({});
- return false;
- }
- this.position = ui.position;
- }
-
- this.helper[ 0 ].style.left = this.position.left + "px";
- this.helper[ 0 ].style.top = this.position.top + "px";
-
- if ($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- //If we are using droppables, inform the manager about the drop
- var that = this,
- dropped = false;
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- dropped = $.ui.ddmanager.drop(this, event);
- }
-
- //if a drop comes from outside (a sortable)
- if (this.dropped) {
- dropped = this.dropped;
- this.dropped = false;
- }
-
- if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
- $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
- if (that._trigger("stop", event) !== false) {
- that._clear();
- }
- });
- } else {
- if (this._trigger("stop", event) !== false) {
- this._clear();
- }
- }
-
- return false;
- },
-
- _mouseUp: function( event ) {
- this._unblockFrames();
-
- //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
- if ( $.ui.ddmanager ) {
- $.ui.ddmanager.dragStop(this, event);
- }
-
- // Only need to focus if the event occurred on the draggable itself, see #10527
- if ( this.handleElement.is( event.target ) ) {
- // The interaction is over; whether or not the click resulted in a drag, focus the element
- this.element.focus();
- }
-
- return $.ui.mouse.prototype._mouseUp.call(this, event);
- },
-
- cancel: function() {
-
- if (this.helper.is(".ui-draggable-dragging")) {
- this._mouseUp({});
- } else {
- this._clear();
- }
-
- return this;
-
- },
-
- _getHandle: function(event) {
- return this.options.handle ?
- !!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
- true;
- },
-
- _setHandleClassName: function() {
- this.handleElement = this.options.handle ?
- this.element.find( this.options.handle ) : this.element;
- this.handleElement.addClass( "ui-draggable-handle" );
- },
-
- _removeHandleClassName: function() {
- this.handleElement.removeClass( "ui-draggable-handle" );
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helperIsFunction = $.isFunction( o.helper ),
- helper = helperIsFunction ?
- $( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
- ( o.helper === "clone" ?
- this.element.clone().removeAttr( "id" ) :
- this.element );
-
- if (!helper.parents("body").length) {
- helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
- }
-
- // http://bugs.jqueryui.com/ticket/9446
- // a helper function can return the original element
- // which wouldn't have been set to relative in _create
- if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
- this._setPositionRelative();
- }
-
- if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
- helper.css("position", "absolute");
- }
-
- return helper;
-
- },
-
- _setPositionRelative: function() {
- if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
- this.element[ 0 ].style.position = "relative";
- }
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = { left: +obj[0], top: +obj[1] || 0 };
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _isRootNode: function( element ) {
- return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
- },
-
- _getParentOffset: function() {
-
- //Get the offsetParent and cache its position
- var po = this.offsetParent.offset(),
- document = this.document[ 0 ];
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
- if ( this.cssPosition !== "relative" ) {
- return { top: 0, left: 0 };
- }
-
- var p = this.element.position(),
- scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
-
- return {
- top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
- left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
- };
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.element.css("marginLeft"), 10) || 0),
- top: (parseInt(this.element.css("marginTop"), 10) || 0),
- right: (parseInt(this.element.css("marginRight"), 10) || 0),
- bottom: (parseInt(this.element.css("marginBottom"), 10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var isUserScrollable, c, ce,
- o = this.options,
- document = this.document[ 0 ];
-
- this.relativeContainer = null;
-
- if ( !o.containment ) {
- this.containment = null;
- return;
- }
-
- if ( o.containment === "window" ) {
- this.containment = [
- $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
- $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
- $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
- $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
- ];
- return;
- }
-
- if ( o.containment === "document") {
- this.containment = [
- 0,
- 0,
- $( document ).width() - this.helperProportions.width - this.margins.left,
- ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
- ];
- return;
- }
-
- if ( o.containment.constructor === Array ) {
- this.containment = o.containment;
- return;
- }
-
- if ( o.containment === "parent" ) {
- o.containment = this.helper[ 0 ].parentNode;
- }
-
- c = $( o.containment );
- ce = c[ 0 ];
-
- if ( !ce ) {
- return;
- }
-
- isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
-
- this.containment = [
- ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
- ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
- ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
- ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
- ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
- this.helperProportions.width -
- this.margins.left -
- this.margins.right,
- ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
- ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
- ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
- this.helperProportions.height -
- this.margins.top -
- this.margins.bottom
- ];
- this.relativeContainer = c;
- },
-
- _convertPositionTo: function(d, pos) {
-
- if (!pos) {
- pos = this.position;
- }
-
- var mod = d === "absolute" ? 1 : -1,
- scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod)
- )
- };
-
- },
-
- _generatePosition: function( event, constrainPosition ) {
-
- var containment, co, top, left,
- o = this.options,
- scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
- pageX = event.pageX,
- pageY = event.pageY;
-
- // Cache the scroll
- if ( !scrollIsRootNode || !this.offset.scroll ) {
- this.offset.scroll = {
- top: this.scrollParent.scrollTop(),
- left: this.scrollParent.scrollLeft()
- };
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- // If we are not dragging yet, we won't check for options
- if ( constrainPosition ) {
- if ( this.containment ) {
- if ( this.relativeContainer ){
- co = this.relativeContainer.offset();
- containment = [
- this.containment[ 0 ] + co.left,
- this.containment[ 1 ] + co.top,
- this.containment[ 2 ] + co.left,
- this.containment[ 3 ] + co.top
- ];
- } else {
- containment = this.containment;
- }
-
- if (event.pageX - this.offset.click.left < containment[0]) {
- pageX = containment[0] + this.offset.click.left;
- }
- if (event.pageY - this.offset.click.top < containment[1]) {
- pageY = containment[1] + this.offset.click.top;
- }
- if (event.pageX - this.offset.click.left > containment[2]) {
- pageX = containment[2] + this.offset.click.left;
- }
- if (event.pageY - this.offset.click.top > containment[3]) {
- pageY = containment[3] + this.offset.click.top;
- }
- }
-
- if (o.grid) {
- //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
- top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
- pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
- pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- if ( o.axis === "y" ) {
- pageX = this.originalPageX;
- }
-
- if ( o.axis === "x" ) {
- pageY = this.originalPageY;
- }
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
- )
- };
-
- },
-
- _clear: function() {
- this.helper.removeClass("ui-draggable-dragging");
- if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
- this.helper.remove();
- }
- this.helper = null;
- this.cancelHelperRemoval = false;
- if ( this.destroyOnClear ) {
- this.destroy();
- }
- },
-
- _normalizeRightBottom: function() {
- if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) {
- this.helper.width( this.helper.width() );
- this.helper.css( "right", "auto" );
- }
- if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) {
- this.helper.height( this.helper.height() );
- this.helper.css( "bottom", "auto" );
- }
- },
-
- // From now on bulk stuff - mainly helpers
-
- _trigger: function( type, event, ui ) {
- ui = ui || this._uiHash();
- $.ui.plugin.call( this, type, [ event, ui, this ], true );
-
- // Absolute position and offset (see #6884 ) have to be recalculated after plugins
- if ( /^(drag|start|stop)/.test( type ) ) {
- this.positionAbs = this._convertPositionTo( "absolute" );
- ui.offset = this.positionAbs;
- }
- return $.Widget.prototype._trigger.call( this, type, event, ui );
- },
-
- plugins: {},
-
- _uiHash: function() {
- return {
- helper: this.helper,
- position: this.position,
- originalPosition: this.originalPosition,
- offset: this.positionAbs
- };
- }
-
-});
-
-$.ui.plugin.add( "draggable", "connectToSortable", {
- start: function( event, ui, draggable ) {
- var uiSortable = $.extend( {}, ui, {
- item: draggable.element
- });
-
- draggable.sortables = [];
- $( draggable.options.connectToSortable ).each(function() {
- var sortable = $( this ).sortable( "instance" );
-
- if ( sortable && !sortable.options.disabled ) {
- draggable.sortables.push( sortable );
-
- // refreshPositions is called at drag start to refresh the containerCache
- // which is used in drag. This ensures it's initialized and synchronized
- // with any changes that might have happened on the page since initialization.
- sortable.refreshPositions();
- sortable._trigger("activate", event, uiSortable);
- }
- });
- },
- stop: function( event, ui, draggable ) {
- var uiSortable = $.extend( {}, ui, {
- item: draggable.element
- });
-
- draggable.cancelHelperRemoval = false;
-
- $.each( draggable.sortables, function() {
- var sortable = this;
-
- if ( sortable.isOver ) {
- sortable.isOver = 0;
-
- // Allow this sortable to handle removing the helper
- draggable.cancelHelperRemoval = true;
- sortable.cancelHelperRemoval = false;
-
- // Use _storedCSS To restore properties in the sortable,
- // as this also handles revert (#9675) since the draggable
- // may have modified them in unexpected ways (#8809)
- sortable._storedCSS = {
- position: sortable.placeholder.css( "position" ),
- top: sortable.placeholder.css( "top" ),
- left: sortable.placeholder.css( "left" )
- };
-
- sortable._mouseStop(event);
-
- // Once drag has ended, the sortable should return to using
- // its original helper, not the shared helper from draggable
- sortable.options.helper = sortable.options._helper;
- } else {
- // Prevent this Sortable from removing the helper.
- // However, don't set the draggable to remove the helper
- // either as another connected Sortable may yet handle the removal.
- sortable.cancelHelperRemoval = true;
-
- sortable._trigger( "deactivate", event, uiSortable );
- }
- });
- },
- drag: function( event, ui, draggable ) {
- $.each( draggable.sortables, function() {
- var innermostIntersecting = false,
- sortable = this;
-
- // Copy over variables that sortable's _intersectsWith uses
- sortable.positionAbs = draggable.positionAbs;
- sortable.helperProportions = draggable.helperProportions;
- sortable.offset.click = draggable.offset.click;
-
- if ( sortable._intersectsWith( sortable.containerCache ) ) {
- innermostIntersecting = true;
-
- $.each( draggable.sortables, function() {
- // Copy over variables that sortable's _intersectsWith uses
- this.positionAbs = draggable.positionAbs;
- this.helperProportions = draggable.helperProportions;
- this.offset.click = draggable.offset.click;
-
- if ( this !== sortable &&
- this._intersectsWith( this.containerCache ) &&
- $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
- innermostIntersecting = false;
- }
-
- return innermostIntersecting;
- });
- }
-
- if ( innermostIntersecting ) {
- // If it intersects, we use a little isOver variable and set it once,
- // so that the move-in stuff gets fired only once.
- if ( !sortable.isOver ) {
- sortable.isOver = 1;
-
- // Store draggable's parent in case we need to reappend to it later.
- draggable._parent = ui.helper.parent();
-
- sortable.currentItem = ui.helper
- .appendTo( sortable.element )
- .data( "ui-sortable-item", true );
-
- // Store helper option to later restore it
- sortable.options._helper = sortable.options.helper;
-
- sortable.options.helper = function() {
- return ui.helper[ 0 ];
- };
-
- // Fire the start events of the sortable with our passed browser event,
- // and our own helper (so it doesn't create a new one)
- event.target = sortable.currentItem[ 0 ];
- sortable._mouseCapture( event, true );
- sortable._mouseStart( event, true, true );
-
- // Because the browser event is way off the new appended portlet,
- // modify necessary variables to reflect the changes
- sortable.offset.click.top = draggable.offset.click.top;
- sortable.offset.click.left = draggable.offset.click.left;
- sortable.offset.parent.left -= draggable.offset.parent.left -
- sortable.offset.parent.left;
- sortable.offset.parent.top -= draggable.offset.parent.top -
- sortable.offset.parent.top;
-
- draggable._trigger( "toSortable", event );
-
- // Inform draggable that the helper is in a valid drop zone,
- // used solely in the revert option to handle "valid/invalid".
- draggable.dropped = sortable.element;
-
- // Need to refreshPositions of all sortables in the case that
- // adding to one sortable changes the location of the other sortables (#9675)
- $.each( draggable.sortables, function() {
- this.refreshPositions();
- });
-
- // hack so receive/update callbacks work (mostly)
- draggable.currentItem = draggable.element;
- sortable.fromOutside = draggable;
- }
-
- if ( sortable.currentItem ) {
- sortable._mouseDrag( event );
- // Copy the sortable's position because the draggable's can potentially reflect
- // a relative position, while sortable is always absolute, which the dragged
- // element has now become. (#8809)
- ui.position = sortable.position;
- }
- } else {
- // If it doesn't intersect with the sortable, and it intersected before,
- // we fake the drag stop of the sortable, but make sure it doesn't remove
- // the helper by using cancelHelperRemoval.
- if ( sortable.isOver ) {
-
- sortable.isOver = 0;
- sortable.cancelHelperRemoval = true;
-
- // Calling sortable's mouseStop would trigger a revert,
- // so revert must be temporarily false until after mouseStop is called.
- sortable.options._revert = sortable.options.revert;
- sortable.options.revert = false;
-
- sortable._trigger( "out", event, sortable._uiHash( sortable ) );
- sortable._mouseStop( event, true );
-
- // restore sortable behaviors that were modfied
- // when the draggable entered the sortable area (#9481)
- sortable.options.revert = sortable.options._revert;
- sortable.options.helper = sortable.options._helper;
-
- if ( sortable.placeholder ) {
- sortable.placeholder.remove();
- }
-
- // Restore and recalculate the draggable's offset considering the sortable
- // may have modified them in unexpected ways. (#8809, #10669)
- ui.helper.appendTo( draggable._parent );
- draggable._refreshOffsets( event );
- ui.position = draggable._generatePosition( event, true );
-
- draggable._trigger( "fromSortable", event );
-
- // Inform draggable that the helper is no longer in a valid drop zone
- draggable.dropped = false;
-
- // Need to refreshPositions of all sortables just in case removing
- // from one sortable changes the location of other sortables (#9675)
- $.each( draggable.sortables, function() {
- this.refreshPositions();
- });
- }
- }
- });
- }
-});
-
-$.ui.plugin.add("draggable", "cursor", {
- start: function( event, ui, instance ) {
- var t = $( "body" ),
- o = instance.options;
-
- if (t.css("cursor")) {
- o._cursor = t.css("cursor");
- }
- t.css("cursor", o.cursor);
- },
- stop: function( event, ui, instance ) {
- var o = instance.options;
- if (o._cursor) {
- $("body").css("cursor", o._cursor);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "opacity", {
- start: function( event, ui, instance ) {
- var t = $( ui.helper ),
- o = instance.options;
- if (t.css("opacity")) {
- o._opacity = t.css("opacity");
- }
- t.css("opacity", o.opacity);
- },
- stop: function( event, ui, instance ) {
- var o = instance.options;
- if (o._opacity) {
- $(ui.helper).css("opacity", o._opacity);
- }
- }
-});
-
-$.ui.plugin.add("draggable", "scroll", {
- start: function( event, ui, i ) {
- if ( !i.scrollParentNotHidden ) {
- i.scrollParentNotHidden = i.helper.scrollParent( false );
- }
-
- if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
- i.overflowOffset = i.scrollParentNotHidden.offset();
- }
- },
- drag: function( event, ui, i ) {
-
- var o = i.options,
- scrolled = false,
- scrollParent = i.scrollParentNotHidden[ 0 ],
- document = i.document[ 0 ];
-
- if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
- if ( !o.axis || o.axis !== "x" ) {
- if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) {
- scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
- } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
- scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
- }
- }
-
- if ( !o.axis || o.axis !== "y" ) {
- if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) {
- scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
- } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
- scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
- }
- }
-
- } else {
-
- if (!o.axis || o.axis !== "x") {
- if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
- } else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
- scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
- }
- }
-
- if (!o.axis || o.axis !== "y") {
- if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
- } else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
- scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
- }
- }
-
- }
-
- if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(i, event);
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "snap", {
- start: function( event, ui, i ) {
-
- var o = i.options;
-
- i.snapElements = [];
-
- $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
- var $t = $(this),
- $o = $t.offset();
- if (this !== i.element[0]) {
- i.snapElements.push({
- item: this,
- width: $t.outerWidth(), height: $t.outerHeight(),
- top: $o.top, left: $o.left
- });
- }
- });
-
- },
- drag: function( event, ui, inst ) {
-
- var ts, bs, ls, rs, l, r, t, b, i, first,
- o = inst.options,
- d = o.snapTolerance,
- x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
- y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
-
- for (i = inst.snapElements.length - 1; i >= 0; i--){
-
- l = inst.snapElements[i].left - inst.margins.left;
- r = l + inst.snapElements[i].width;
- t = inst.snapElements[i].top - inst.margins.top;
- b = t + inst.snapElements[i].height;
-
- if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
- if (inst.snapElements[i].snapping) {
- (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = false;
- continue;
- }
-
- if (o.snapMode !== "inner") {
- ts = Math.abs(t - y2) <= d;
- bs = Math.abs(b - y1) <= d;
- ls = Math.abs(l - x2) <= d;
- rs = Math.abs(r - x1) <= d;
- if (ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top;
- }
- if (bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top;
- }
- if (ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left;
- }
- if (rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left;
- }
- }
-
- first = (ts || bs || ls || rs);
-
- if (o.snapMode !== "outer") {
- ts = Math.abs(t - y1) <= d;
- bs = Math.abs(b - y2) <= d;
- ls = Math.abs(l - x1) <= d;
- rs = Math.abs(r - x2) <= d;
- if (ts) {
- ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top;
- }
- if (bs) {
- ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top;
- }
- if (ls) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left;
- }
- if (rs) {
- ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left;
- }
- }
-
- if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
- (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
- }
- inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
-
- }
-
- }
-});
-
-$.ui.plugin.add("draggable", "stack", {
- start: function( event, ui, instance ) {
- var min,
- o = instance.options,
- group = $.makeArray($(o.stack)).sort(function(a, b) {
- return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0);
- });
-
- if (!group.length) { return; }
-
- min = parseInt($(group[0]).css("zIndex"), 10) || 0;
- $(group).each(function(i) {
- $(this).css("zIndex", min + i);
- });
- this.css("zIndex", (min + group.length));
- }
-});
-
-$.ui.plugin.add("draggable", "zIndex", {
- start: function( event, ui, instance ) {
- var t = $( ui.helper ),
- o = instance.options;
-
- if (t.css("zIndex")) {
- o._zIndex = t.css("zIndex");
- }
- t.css("zIndex", o.zIndex);
- },
- stop: function( event, ui, instance ) {
- var o = instance.options;
-
- if (o._zIndex) {
- $(ui.helper).css("zIndex", o._zIndex);
- }
- }
-});
-
-var draggable = $.ui.draggable;
-
-
-/*!
- * jQuery UI Resizable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/resizable/
- */
-
-
-$.widget("ui.resizable", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "resize",
- options: {
- alsoResize: false,
- animate: false,
- animateDuration: "slow",
- animateEasing: "swing",
- aspectRatio: false,
- autoHide: false,
- containment: false,
- ghost: false,
- grid: false,
- handles: "e,s,se",
- helper: false,
- maxHeight: null,
- maxWidth: null,
- minHeight: 10,
- minWidth: 10,
- // See #7960
- zIndex: 90,
-
- // callbacks
- resize: null,
- start: null,
- stop: null
- },
-
- _num: function( value ) {
- return parseInt( value, 10 ) || 0;
- },
-
- _isNumber: function( value ) {
- return !isNaN( parseInt( value, 10 ) );
- },
-
- _hasScroll: function( el, a ) {
-
- if ( $( el ).css( "overflow" ) === "hidden") {
- return false;
- }
-
- var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
- has = false;
-
- if ( el[ scroll ] > 0 ) {
- return true;
- }
-
- // TODO: determine which cases actually cause this to happen
- // if the element doesn't have the scroll set, see if it's possible to
- // set the scroll
- el[ scroll ] = 1;
- has = ( el[ scroll ] > 0 );
- el[ scroll ] = 0;
- return has;
- },
-
- _create: function() {
-
- var n, i, handle, axis, hname,
- that = this,
- o = this.options;
- this.element.addClass("ui-resizable");
-
- $.extend(this, {
- _aspectRatio: !!(o.aspectRatio),
- aspectRatio: o.aspectRatio,
- originalElement: this.element,
- _proportionallyResizeElements: [],
- _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
- });
-
- // Wrap the element if it cannot hold child nodes
- if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) {
-
- this.element.wrap(
- $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
- position: this.element.css("position"),
- width: this.element.outerWidth(),
- height: this.element.outerHeight(),
- top: this.element.css("top"),
- left: this.element.css("left")
- })
- );
-
- this.element = this.element.parent().data(
- "ui-resizable", this.element.resizable( "instance" )
- );
-
- this.elementIsWrapper = true;
-
- this.element.css({
- marginLeft: this.originalElement.css("marginLeft"),
- marginTop: this.originalElement.css("marginTop"),
- marginRight: this.originalElement.css("marginRight"),
- marginBottom: this.originalElement.css("marginBottom")
- });
- this.originalElement.css({
- marginLeft: 0,
- marginTop: 0,
- marginRight: 0,
- marginBottom: 0
- });
- // support: Safari
- // Prevent Safari textarea resize
- this.originalResizeStyle = this.originalElement.css("resize");
- this.originalElement.css("resize", "none");
-
- this._proportionallyResizeElements.push( this.originalElement.css({
- position: "static",
- zoom: 1,
- display: "block"
- }) );
-
- // support: IE9
- // avoid IE jump (hard set the margin)
- this.originalElement.css({ margin: this.originalElement.css("margin") });
-
- this._proportionallyResize();
- }
-
- this.handles = o.handles ||
- ( !$(".ui-resizable-handle", this.element).length ?
- "e,s,se" : {
- n: ".ui-resizable-n",
- e: ".ui-resizable-e",
- s: ".ui-resizable-s",
- w: ".ui-resizable-w",
- se: ".ui-resizable-se",
- sw: ".ui-resizable-sw",
- ne: ".ui-resizable-ne",
- nw: ".ui-resizable-nw"
- } );
-
- this._handles = $();
- if ( this.handles.constructor === String ) {
-
- if ( this.handles === "all") {
- this.handles = "n,e,s,w,se,sw,ne,nw";
- }
-
- n = this.handles.split(",");
- this.handles = {};
-
- for (i = 0; i < n.length; i++) {
-
- handle = $.trim(n[i]);
- hname = "ui-resizable-" + handle;
- axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
-
- axis.css({ zIndex: o.zIndex });
-
- // TODO : What's going on here?
- if ("se" === handle) {
- axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
- }
-
- this.handles[handle] = ".ui-resizable-" + handle;
- this.element.append(axis);
- }
-
- }
-
- this._renderAxis = function(target) {
-
- var i, axis, padPos, padWrapper;
-
- target = target || this.element;
-
- for (i in this.handles) {
-
- if (this.handles[i].constructor === String) {
- this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
- } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
- this.handles[ i ] = $( this.handles[ i ] );
- this._on( this.handles[ i ], { "mousedown": that._mouseDown });
- }
-
- if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) {
-
- axis = $(this.handles[i], this.element);
-
- padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
-
- padPos = [ "padding",
- /ne|nw|n/.test(i) ? "Top" :
- /se|sw|s/.test(i) ? "Bottom" :
- /^e$/.test(i) ? "Right" : "Left" ].join("");
-
- target.css(padPos, padWrapper);
-
- this._proportionallyResize();
- }
-
- this._handles = this._handles.add( this.handles[ i ] );
- }
- };
-
- // TODO: make renderAxis a prototype function
- this._renderAxis(this.element);
-
- this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
- this._handles.disableSelection();
-
- this._handles.mouseover(function() {
- if (!that.resizing) {
- if (this.className) {
- axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
- }
- that.axis = axis && axis[1] ? axis[1] : "se";
- }
- });
-
- if (o.autoHide) {
- this._handles.hide();
- $(this.element)
- .addClass("ui-resizable-autohide")
- .mouseenter(function() {
- if (o.disabled) {
- return;
- }
- $(this).removeClass("ui-resizable-autohide");
- that._handles.show();
- })
- .mouseleave(function() {
- if (o.disabled) {
- return;
- }
- if (!that.resizing) {
- $(this).addClass("ui-resizable-autohide");
- that._handles.hide();
- }
- });
- }
-
- this._mouseInit();
- },
-
- _destroy: function() {
-
- this._mouseDestroy();
-
- var wrapper,
- _destroy = function(exp) {
- $(exp)
- .removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
- .removeData("resizable")
- .removeData("ui-resizable")
- .unbind(".resizable")
- .find(".ui-resizable-handle")
- .remove();
- };
-
- // TODO: Unwrap at same DOM position
- if (this.elementIsWrapper) {
- _destroy(this.element);
- wrapper = this.element;
- this.originalElement.css({
- position: wrapper.css("position"),
- width: wrapper.outerWidth(),
- height: wrapper.outerHeight(),
- top: wrapper.css("top"),
- left: wrapper.css("left")
- }).insertAfter( wrapper );
- wrapper.remove();
- }
-
- this.originalElement.css("resize", this.originalResizeStyle);
- _destroy(this.originalElement);
-
- return this;
- },
-
- _mouseCapture: function(event) {
- var i, handle,
- capture = false;
-
- for (i in this.handles) {
- handle = $(this.handles[i])[0];
- if (handle === event.target || $.contains(handle, event.target)) {
- capture = true;
- }
- }
-
- return !this.options.disabled && capture;
- },
-
- _mouseStart: function(event) {
-
- var curleft, curtop, cursor,
- o = this.options,
- el = this.element;
-
- this.resizing = true;
-
- this._renderProxy();
-
- curleft = this._num(this.helper.css("left"));
- curtop = this._num(this.helper.css("top"));
-
- if (o.containment) {
- curleft += $(o.containment).scrollLeft() || 0;
- curtop += $(o.containment).scrollTop() || 0;
- }
-
- this.offset = this.helper.offset();
- this.position = { left: curleft, top: curtop };
-
- this.size = this._helper ? {
- width: this.helper.width(),
- height: this.helper.height()
- } : {
- width: el.width(),
- height: el.height()
- };
-
- this.originalSize = this._helper ? {
- width: el.outerWidth(),
- height: el.outerHeight()
- } : {
- width: el.width(),
- height: el.height()
- };
-
- this.sizeDiff = {
- width: el.outerWidth() - el.width(),
- height: el.outerHeight() - el.height()
- };
-
- this.originalPosition = { left: curleft, top: curtop };
- this.originalMousePosition = { left: event.pageX, top: event.pageY };
-
- this.aspectRatio = (typeof o.aspectRatio === "number") ?
- o.aspectRatio :
- ((this.originalSize.width / this.originalSize.height) || 1);
-
- cursor = $(".ui-resizable-" + this.axis).css("cursor");
- $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
-
- el.addClass("ui-resizable-resizing");
- this._propagate("start", event);
- return true;
- },
-
- _mouseDrag: function(event) {
-
- var data, props,
- smp = this.originalMousePosition,
- a = this.axis,
- dx = (event.pageX - smp.left) || 0,
- dy = (event.pageY - smp.top) || 0,
- trigger = this._change[a];
-
- this._updatePrevProperties();
-
- if (!trigger) {
- return false;
- }
-
- data = trigger.apply(this, [ event, dx, dy ]);
-
- this._updateVirtualBoundaries(event.shiftKey);
- if (this._aspectRatio || event.shiftKey) {
- data = this._updateRatio(data, event);
- }
-
- data = this._respectSize(data, event);
-
- this._updateCache(data);
-
- this._propagate("resize", event);
-
- props = this._applyChanges();
-
- if ( !this._helper && this._proportionallyResizeElements.length ) {
- this._proportionallyResize();
- }
-
- if ( !$.isEmptyObject( props ) ) {
- this._updatePrevProperties();
- this._trigger( "resize", event, this.ui() );
- this._applyChanges();
- }
-
- return false;
- },
-
- _mouseStop: function(event) {
-
- this.resizing = false;
- var pr, ista, soffseth, soffsetw, s, left, top,
- o = this.options, that = this;
-
- if (this._helper) {
-
- pr = this._proportionallyResizeElements;
- ista = pr.length && (/textarea/i).test(pr[0].nodeName);
- soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height;
- soffsetw = ista ? 0 : that.sizeDiff.width;
-
- s = {
- width: (that.helper.width() - soffsetw),
- height: (that.helper.height() - soffseth)
- };
- left = (parseInt(that.element.css("left"), 10) +
- (that.position.left - that.originalPosition.left)) || null;
- top = (parseInt(that.element.css("top"), 10) +
- (that.position.top - that.originalPosition.top)) || null;
-
- if (!o.animate) {
- this.element.css($.extend(s, { top: top, left: left }));
- }
-
- that.helper.height(that.size.height);
- that.helper.width(that.size.width);
-
- if (this._helper && !o.animate) {
- this._proportionallyResize();
- }
- }
-
- $("body").css("cursor", "auto");
-
- this.element.removeClass("ui-resizable-resizing");
-
- this._propagate("stop", event);
-
- if (this._helper) {
- this.helper.remove();
- }
-
- return false;
-
- },
-
- _updatePrevProperties: function() {
- this.prevPosition = {
- top: this.position.top,
- left: this.position.left
- };
- this.prevSize = {
- width: this.size.width,
- height: this.size.height
- };
- },
-
- _applyChanges: function() {
- var props = {};
-
- if ( this.position.top !== this.prevPosition.top ) {
- props.top = this.position.top + "px";
- }
- if ( this.position.left !== this.prevPosition.left ) {
- props.left = this.position.left + "px";
- }
- if ( this.size.width !== this.prevSize.width ) {
- props.width = this.size.width + "px";
- }
- if ( this.size.height !== this.prevSize.height ) {
- props.height = this.size.height + "px";
- }
-
- this.helper.css( props );
-
- return props;
- },
-
- _updateVirtualBoundaries: function(forceAspectRatio) {
- var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
- o = this.options;
-
- b = {
- minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
- maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,
- minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
- maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity
- };
-
- if (this._aspectRatio || forceAspectRatio) {
- pMinWidth = b.minHeight * this.aspectRatio;
- pMinHeight = b.minWidth / this.aspectRatio;
- pMaxWidth = b.maxHeight * this.aspectRatio;
- pMaxHeight = b.maxWidth / this.aspectRatio;
-
- if (pMinWidth > b.minWidth) {
- b.minWidth = pMinWidth;
- }
- if (pMinHeight > b.minHeight) {
- b.minHeight = pMinHeight;
- }
- if (pMaxWidth < b.maxWidth) {
- b.maxWidth = pMaxWidth;
- }
- if (pMaxHeight < b.maxHeight) {
- b.maxHeight = pMaxHeight;
- }
- }
- this._vBoundaries = b;
- },
-
- _updateCache: function(data) {
- this.offset = this.helper.offset();
- if (this._isNumber(data.left)) {
- this.position.left = data.left;
- }
- if (this._isNumber(data.top)) {
- this.position.top = data.top;
- }
- if (this._isNumber(data.height)) {
- this.size.height = data.height;
- }
- if (this._isNumber(data.width)) {
- this.size.width = data.width;
- }
- },
-
- _updateRatio: function( data ) {
-
- var cpos = this.position,
- csize = this.size,
- a = this.axis;
-
- if (this._isNumber(data.height)) {
- data.width = (data.height * this.aspectRatio);
- } else if (this._isNumber(data.width)) {
- data.height = (data.width / this.aspectRatio);
- }
-
- if (a === "sw") {
- data.left = cpos.left + (csize.width - data.width);
- data.top = null;
- }
- if (a === "nw") {
- data.top = cpos.top + (csize.height - data.height);
- data.left = cpos.left + (csize.width - data.width);
- }
-
- return data;
- },
-
- _respectSize: function( data ) {
-
- var o = this._vBoundaries,
- a = this.axis,
- ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
- ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
- isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width),
- isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
- dw = this.originalPosition.left + this.originalSize.width,
- dh = this.position.top + this.size.height,
- cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
- if (isminw) {
- data.width = o.minWidth;
- }
- if (isminh) {
- data.height = o.minHeight;
- }
- if (ismaxw) {
- data.width = o.maxWidth;
- }
- if (ismaxh) {
- data.height = o.maxHeight;
- }
-
- if (isminw && cw) {
- data.left = dw - o.minWidth;
- }
- if (ismaxw && cw) {
- data.left = dw - o.maxWidth;
- }
- if (isminh && ch) {
- data.top = dh - o.minHeight;
- }
- if (ismaxh && ch) {
- data.top = dh - o.maxHeight;
- }
-
- // Fixing jump error on top/left - bug #2330
- if (!data.width && !data.height && !data.left && data.top) {
- data.top = null;
- } else if (!data.width && !data.height && !data.top && data.left) {
- data.left = null;
- }
-
- return data;
- },
-
- _getPaddingPlusBorderDimensions: function( element ) {
- var i = 0,
- widths = [],
- borders = [
- element.css( "borderTopWidth" ),
- element.css( "borderRightWidth" ),
- element.css( "borderBottomWidth" ),
- element.css( "borderLeftWidth" )
- ],
- paddings = [
- element.css( "paddingTop" ),
- element.css( "paddingRight" ),
- element.css( "paddingBottom" ),
- element.css( "paddingLeft" )
- ];
-
- for ( ; i < 4; i++ ) {
- widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 );
- widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 );
- }
-
- return {
- height: widths[ 0 ] + widths[ 2 ],
- width: widths[ 1 ] + widths[ 3 ]
- };
- },
-
- _proportionallyResize: function() {
-
- if (!this._proportionallyResizeElements.length) {
- return;
- }
-
- var prel,
- i = 0,
- element = this.helper || this.element;
-
- for ( ; i < this._proportionallyResizeElements.length; i++) {
-
- prel = this._proportionallyResizeElements[i];
-
- // TODO: Seems like a bug to cache this.outerDimensions
- // considering that we are in a loop.
- if (!this.outerDimensions) {
- this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
- }
-
- prel.css({
- height: (element.height() - this.outerDimensions.height) || 0,
- width: (element.width() - this.outerDimensions.width) || 0
- });
-
- }
-
- },
-
- _renderProxy: function() {
-
- var el = this.element, o = this.options;
- this.elementOffset = el.offset();
-
- if (this._helper) {
-
- this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
-
- this.helper.addClass(this._helper).css({
- width: this.element.outerWidth() - 1,
- height: this.element.outerHeight() - 1,
- position: "absolute",
- left: this.elementOffset.left + "px",
- top: this.elementOffset.top + "px",
- zIndex: ++o.zIndex //TODO: Don't modify option
- });
-
- this.helper
- .appendTo("body")
- .disableSelection();
-
- } else {
- this.helper = this.element;
- }
-
- },
-
- _change: {
- e: function(event, dx) {
- return { width: this.originalSize.width + dx };
- },
- w: function(event, dx) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { left: sp.left + dx, width: cs.width - dx };
- },
- n: function(event, dx, dy) {
- var cs = this.originalSize, sp = this.originalPosition;
- return { top: sp.top + dy, height: cs.height - dy };
- },
- s: function(event, dx, dy) {
- return { height: this.originalSize.height + dy };
- },
- se: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments),
- this._change.e.apply(this, [ event, dx, dy ]));
- },
- sw: function(event, dx, dy) {
- return $.extend(this._change.s.apply(this, arguments),
- this._change.w.apply(this, [ event, dx, dy ]));
- },
- ne: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments),
- this._change.e.apply(this, [ event, dx, dy ]));
- },
- nw: function(event, dx, dy) {
- return $.extend(this._change.n.apply(this, arguments),
- this._change.w.apply(this, [ event, dx, dy ]));
- }
- },
-
- _propagate: function(n, event) {
- $.ui.plugin.call(this, n, [ event, this.ui() ]);
- (n !== "resize" && this._trigger(n, event, this.ui()));
- },
-
- plugins: {},
-
- ui: function() {
- return {
- originalElement: this.originalElement,
- element: this.element,
- helper: this.helper,
- position: this.position,
- size: this.size,
- originalSize: this.originalSize,
- originalPosition: this.originalPosition
- };
- }
-
-});
-
-/*
- * Resizable Extensions
- */
-
-$.ui.plugin.add("resizable", "animate", {
-
- stop: function( event ) {
- var that = $(this).resizable( "instance" ),
- o = that.options,
- pr = that._proportionallyResizeElements,
- ista = pr.length && (/textarea/i).test(pr[0].nodeName),
- soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height,
- soffsetw = ista ? 0 : that.sizeDiff.width,
- style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
- left = (parseInt(that.element.css("left"), 10) +
- (that.position.left - that.originalPosition.left)) || null,
- top = (parseInt(that.element.css("top"), 10) +
- (that.position.top - that.originalPosition.top)) || null;
-
- that.element.animate(
- $.extend(style, top && left ? { top: top, left: left } : {}), {
- duration: o.animateDuration,
- easing: o.animateEasing,
- step: function() {
-
- var data = {
- width: parseInt(that.element.css("width"), 10),
- height: parseInt(that.element.css("height"), 10),
- top: parseInt(that.element.css("top"), 10),
- left: parseInt(that.element.css("left"), 10)
- };
-
- if (pr && pr.length) {
- $(pr[0]).css({ width: data.width, height: data.height });
- }
-
- // propagating resize, and updating values for each animation step
- that._updateCache(data);
- that._propagate("resize", event);
-
- }
- }
- );
- }
-
-});
-
-$.ui.plugin.add( "resizable", "containment", {
-
- start: function() {
- var element, p, co, ch, cw, width, height,
- that = $( this ).resizable( "instance" ),
- o = that.options,
- el = that.element,
- oc = o.containment,
- ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
-
- if ( !ce ) {
- return;
- }
-
- that.containerElement = $( ce );
-
- if ( /document/.test( oc ) || oc === document ) {
- that.containerOffset = {
- left: 0,
- top: 0
- };
- that.containerPosition = {
- left: 0,
- top: 0
- };
-
- that.parentData = {
- element: $( document ),
- left: 0,
- top: 0,
- width: $( document ).width(),
- height: $( document ).height() || document.body.parentNode.scrollHeight
- };
- } else {
- element = $( ce );
- p = [];
- $([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) {
- p[ i ] = that._num( element.css( "padding" + name ) );
- });
-
- that.containerOffset = element.offset();
- that.containerPosition = element.position();
- that.containerSize = {
- height: ( element.innerHeight() - p[ 3 ] ),
- width: ( element.innerWidth() - p[ 1 ] )
- };
-
- co = that.containerOffset;
- ch = that.containerSize.height;
- cw = that.containerSize.width;
- width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
- height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
-
- that.parentData = {
- element: ce,
- left: co.left,
- top: co.top,
- width: width,
- height: height
- };
- }
- },
-
- resize: function( event ) {
- var woset, hoset, isParent, isOffsetRelative,
- that = $( this ).resizable( "instance" ),
- o = that.options,
- co = that.containerOffset,
- cp = that.position,
- pRatio = that._aspectRatio || event.shiftKey,
- cop = {
- top: 0,
- left: 0
- },
- ce = that.containerElement,
- continueResize = true;
-
- if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
- cop = co;
- }
-
- if ( cp.left < ( that._helper ? co.left : 0 ) ) {
- that.size.width = that.size.width +
- ( that._helper ?
- ( that.position.left - co.left ) :
- ( that.position.left - cop.left ) );
-
- if ( pRatio ) {
- that.size.height = that.size.width / that.aspectRatio;
- continueResize = false;
- }
- that.position.left = o.helper ? co.left : 0;
- }
-
- if ( cp.top < ( that._helper ? co.top : 0 ) ) {
- that.size.height = that.size.height +
- ( that._helper ?
- ( that.position.top - co.top ) :
- that.position.top );
-
- if ( pRatio ) {
- that.size.width = that.size.height * that.aspectRatio;
- continueResize = false;
- }
- that.position.top = that._helper ? co.top : 0;
- }
-
- isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
- isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
-
- if ( isParent && isOffsetRelative ) {
- that.offset.left = that.parentData.left + that.position.left;
- that.offset.top = that.parentData.top + that.position.top;
- } else {
- that.offset.left = that.element.offset().left;
- that.offset.top = that.element.offset().top;
- }
-
- woset = Math.abs( that.sizeDiff.width +
- (that._helper ?
- that.offset.left - cop.left :
- (that.offset.left - co.left)) );
-
- hoset = Math.abs( that.sizeDiff.height +
- (that._helper ?
- that.offset.top - cop.top :
- (that.offset.top - co.top)) );
-
- if ( woset + that.size.width >= that.parentData.width ) {
- that.size.width = that.parentData.width - woset;
- if ( pRatio ) {
- that.size.height = that.size.width / that.aspectRatio;
- continueResize = false;
- }
- }
-
- if ( hoset + that.size.height >= that.parentData.height ) {
- that.size.height = that.parentData.height - hoset;
- if ( pRatio ) {
- that.size.width = that.size.height * that.aspectRatio;
- continueResize = false;
- }
- }
-
- if ( !continueResize ) {
- that.position.left = that.prevPosition.left;
- that.position.top = that.prevPosition.top;
- that.size.width = that.prevSize.width;
- that.size.height = that.prevSize.height;
- }
- },
-
- stop: function() {
- var that = $( this ).resizable( "instance" ),
- o = that.options,
- co = that.containerOffset,
- cop = that.containerPosition,
- ce = that.containerElement,
- helper = $( that.helper ),
- ho = helper.offset(),
- w = helper.outerWidth() - that.sizeDiff.width,
- h = helper.outerHeight() - that.sizeDiff.height;
-
- if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
- $( this ).css({
- left: ho.left - cop.left - co.left,
- width: w,
- height: h
- });
- }
-
- if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
- $( this ).css({
- left: ho.left - cop.left - co.left,
- width: w,
- height: h
- });
- }
- }
-});
-
-$.ui.plugin.add("resizable", "alsoResize", {
-
- start: function() {
- var that = $(this).resizable( "instance" ),
- o = that.options;
-
- $(o.alsoResize).each(function() {
- var el = $(this);
- el.data("ui-resizable-alsoresize", {
- width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
- left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
- });
- });
- },
-
- resize: function(event, ui) {
- var that = $(this).resizable( "instance" ),
- o = that.options,
- os = that.originalSize,
- op = that.originalPosition,
- delta = {
- height: (that.size.height - os.height) || 0,
- width: (that.size.width - os.width) || 0,
- top: (that.position.top - op.top) || 0,
- left: (that.position.left - op.left) || 0
- };
-
- $(o.alsoResize).each(function() {
- var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
- css = el.parents(ui.originalElement[0]).length ?
- [ "width", "height" ] :
- [ "width", "height", "top", "left" ];
-
- $.each(css, function(i, prop) {
- var sum = (start[prop] || 0) + (delta[prop] || 0);
- if (sum && sum >= 0) {
- style[prop] = sum || null;
- }
- });
-
- el.css(style);
- });
- },
-
- stop: function() {
- $(this).removeData("resizable-alsoresize");
- }
-});
-
-$.ui.plugin.add("resizable", "ghost", {
-
- start: function() {
-
- var that = $(this).resizable( "instance" ), o = that.options, cs = that.size;
-
- that.ghost = that.originalElement.clone();
- that.ghost
- .css({
- opacity: 0.25,
- display: "block",
- position: "relative",
- height: cs.height,
- width: cs.width,
- margin: 0,
- left: 0,
- top: 0
- })
- .addClass("ui-resizable-ghost")
- .addClass(typeof o.ghost === "string" ? o.ghost : "");
-
- that.ghost.appendTo(that.helper);
-
- },
-
- resize: function() {
- var that = $(this).resizable( "instance" );
- if (that.ghost) {
- that.ghost.css({
- position: "relative",
- height: that.size.height,
- width: that.size.width
- });
- }
- },
-
- stop: function() {
- var that = $(this).resizable( "instance" );
- if (that.ghost && that.helper) {
- that.helper.get(0).removeChild(that.ghost.get(0));
- }
- }
-
-});
-
-$.ui.plugin.add("resizable", "grid", {
-
- resize: function() {
- var outerDimensions,
- that = $(this).resizable( "instance" ),
- o = that.options,
- cs = that.size,
- os = that.originalSize,
- op = that.originalPosition,
- a = that.axis,
- grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
- gridX = (grid[0] || 1),
- gridY = (grid[1] || 1),
- ox = Math.round((cs.width - os.width) / gridX) * gridX,
- oy = Math.round((cs.height - os.height) / gridY) * gridY,
- newWidth = os.width + ox,
- newHeight = os.height + oy,
- isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
- isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
- isMinWidth = o.minWidth && (o.minWidth > newWidth),
- isMinHeight = o.minHeight && (o.minHeight > newHeight);
-
- o.grid = grid;
-
- if (isMinWidth) {
- newWidth += gridX;
- }
- if (isMinHeight) {
- newHeight += gridY;
- }
- if (isMaxWidth) {
- newWidth -= gridX;
- }
- if (isMaxHeight) {
- newHeight -= gridY;
- }
-
- if (/^(se|s|e)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- } else if (/^(ne)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- } else if (/^(sw)$/.test(a)) {
- that.size.width = newWidth;
- that.size.height = newHeight;
- that.position.left = op.left - ox;
- } else {
- if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) {
- outerDimensions = that._getPaddingPlusBorderDimensions( this );
- }
-
- if ( newHeight - gridY > 0 ) {
- that.size.height = newHeight;
- that.position.top = op.top - oy;
- } else {
- newHeight = gridY - outerDimensions.height;
- that.size.height = newHeight;
- that.position.top = op.top + os.height - newHeight;
- }
- if ( newWidth - gridX > 0 ) {
- that.size.width = newWidth;
- that.position.left = op.left - ox;
- } else {
- newWidth = gridX - outerDimensions.width;
- that.size.width = newWidth;
- that.position.left = op.left + os.width - newWidth;
- }
- }
- }
-
-});
-
-var resizable = $.ui.resizable;
-
-
-/*!
- * jQuery UI Dialog 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/dialog/
- */
-
-
-var dialog = $.widget( "ui.dialog", {
- version: "1.11.4",
- options: {
- appendTo: "body",
- autoOpen: true,
- buttons: [],
- closeOnEscape: true,
- closeText: "Close",
- dialogClass: "",
- draggable: true,
- hide: null,
- height: "auto",
- maxHeight: null,
- maxWidth: null,
- minHeight: 150,
- minWidth: 150,
- modal: false,
- position: {
- my: "center",
- at: "center",
- of: window,
- collision: "fit",
- // Ensure the titlebar is always visible
- using: function( pos ) {
- var topOffset = $( this ).css( pos ).offset().top;
- if ( topOffset < 0 ) {
- $( this ).css( "top", pos.top - topOffset );
- }
- }
- },
- resizable: true,
- show: null,
- title: null,
- width: 300,
-
- // callbacks
- beforeClose: null,
- close: null,
- drag: null,
- dragStart: null,
- dragStop: null,
- focus: null,
- open: null,
- resize: null,
- resizeStart: null,
- resizeStop: null
- },
-
- sizeRelatedOptions: {
- buttons: true,
- height: true,
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true,
- width: true
- },
-
- resizableRelatedOptions: {
- maxHeight: true,
- maxWidth: true,
- minHeight: true,
- minWidth: true
- },
-
- _create: function() {
- this.originalCss = {
- display: this.element[ 0 ].style.display,
- width: this.element[ 0 ].style.width,
- minHeight: this.element[ 0 ].style.minHeight,
- maxHeight: this.element[ 0 ].style.maxHeight,
- height: this.element[ 0 ].style.height
- };
- this.originalPosition = {
- parent: this.element.parent(),
- index: this.element.parent().children().index( this.element )
- };
- this.originalTitle = this.element.attr( "title" );
- this.options.title = this.options.title || this.originalTitle;
-
- this._createWrapper();
-
- this.element
- .show()
- .removeAttr( "title" )
- .addClass( "ui-dialog-content ui-widget-content" )
- .appendTo( this.uiDialog );
-
- this._createTitlebar();
- this._createButtonPane();
-
- if ( this.options.draggable && $.fn.draggable ) {
- this._makeDraggable();
- }
- if ( this.options.resizable && $.fn.resizable ) {
- this._makeResizable();
- }
-
- this._isOpen = false;
-
- this._trackFocus();
- },
-
- _init: function() {
- if ( this.options.autoOpen ) {
- this.open();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
- if ( element && (element.jquery || element.nodeType) ) {
- return $( element );
- }
- return this.document.find( element || "body" ).eq( 0 );
- },
-
- _destroy: function() {
- var next,
- originalPosition = this.originalPosition;
-
- this._untrackInstance();
- this._destroyOverlay();
-
- this.element
- .removeUniqueId()
- .removeClass( "ui-dialog-content ui-widget-content" )
- .css( this.originalCss )
- // Without detaching first, the following becomes really slow
- .detach();
-
- this.uiDialog.stop( true, true ).remove();
-
- if ( this.originalTitle ) {
- this.element.attr( "title", this.originalTitle );
- }
-
- next = originalPosition.parent.children().eq( originalPosition.index );
- // Don't try to place the dialog next to itself (#8613)
- if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
- next.before( this.element );
- } else {
- originalPosition.parent.append( this.element );
- }
- },
-
- widget: function() {
- return this.uiDialog;
- },
-
- disable: $.noop,
- enable: $.noop,
-
- close: function( event ) {
- var activeElement,
- that = this;
-
- if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
- return;
- }
-
- this._isOpen = false;
- this._focusedElement = null;
- this._destroyOverlay();
- this._untrackInstance();
-
- if ( !this.opener.filter( ":focusable" ).focus().length ) {
-
- // support: IE9
- // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
- try {
- activeElement = this.document[ 0 ].activeElement;
-
- // Support: IE9, IE10
- // If the <body> is blurred, IE will switch windows, see #4520
- if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) {
-
- // Hiding a focused element doesn't trigger blur in WebKit
- // so in case we have nothing to focus on, explicitly blur the active element
- // https://bugs.webkit.org/show_bug.cgi?id=47182
- $( activeElement ).blur();
- }
- } catch ( error ) {}
- }
-
- this._hide( this.uiDialog, this.options.hide, function() {
- that._trigger( "close", event );
- });
- },
-
- isOpen: function() {
- return this._isOpen;
- },
-
- moveToTop: function() {
- this._moveToTop();
- },
-
- _moveToTop: function( event, silent ) {
- var moved = false,
- zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() {
- return +$( this ).css( "z-index" );
- }).get(),
- zIndexMax = Math.max.apply( null, zIndices );
-
- if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
- this.uiDialog.css( "z-index", zIndexMax + 1 );
- moved = true;
- }
-
- if ( moved && !silent ) {
- this._trigger( "focus", event );
- }
- return moved;
- },
-
- open: function() {
- var that = this;
- if ( this._isOpen ) {
- if ( this._moveToTop() ) {
- this._focusTabbable();
- }
- return;
- }
-
- this._isOpen = true;
- this.opener = $( this.document[ 0 ].activeElement );
-
- this._size();
- this._position();
- this._createOverlay();
- this._moveToTop( null, true );
-
- // Ensure the overlay is moved to the top with the dialog, but only when
- // opening. The overlay shouldn't move after the dialog is open so that
- // modeless dialogs opened after the modal dialog stack properly.
- if ( this.overlay ) {
- this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
- }
-
- this._show( this.uiDialog, this.options.show, function() {
- that._focusTabbable();
- that._trigger( "focus" );
- });
-
- // Track the dialog immediately upon openening in case a focus event
- // somehow occurs outside of the dialog before an element inside the
- // dialog is focused (#10152)
- this._makeFocusTarget();
-
- this._trigger( "open" );
- },
-
- _focusTabbable: function() {
- // Set focus to the first match:
- // 1. An element that was focused previously
- // 2. First element inside the dialog matching [autofocus]
- // 3. Tabbable element inside the content element
- // 4. Tabbable element inside the buttonpane
- // 5. The close button
- // 6. The dialog itself
- var hasFocus = this._focusedElement;
- if ( !hasFocus ) {
- hasFocus = this.element.find( "[autofocus]" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.element.find( ":tabbable" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
- }
- if ( !hasFocus.length ) {
- hasFocus = this.uiDialog;
- }
- hasFocus.eq( 0 ).focus();
- },
-
- _keepFocus: function( event ) {
- function checkFocus() {
- var activeElement = this.document[0].activeElement,
- isActive = this.uiDialog[0] === activeElement ||
- $.contains( this.uiDialog[0], activeElement );
- if ( !isActive ) {
- this._focusTabbable();
- }
- }
- event.preventDefault();
- checkFocus.call( this );
- // support: IE
- // IE <= 8 doesn't prevent moving focus even with event.preventDefault()
- // so we check again later
- this._delay( checkFocus );
- },
-
- _createWrapper: function() {
- this.uiDialog = $("<div>")
- .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
- this.options.dialogClass )
- .hide()
- .attr({
- // Setting tabIndex makes the div focusable
- tabIndex: -1,
- role: "dialog"
- })
- .appendTo( this._appendTo() );
-
- this._on( this.uiDialog, {
- keydown: function( event ) {
- if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
- event.keyCode === $.ui.keyCode.ESCAPE ) {
- event.preventDefault();
- this.close( event );
- return;
- }
-
- // prevent tabbing out of dialogs
- if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
- return;
- }
- var tabbables = this.uiDialog.find( ":tabbable" ),
- first = tabbables.filter( ":first" ),
- last = tabbables.filter( ":last" );
-
- if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
- this._delay(function() {
- first.focus();
- });
- event.preventDefault();
- } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
- this._delay(function() {
- last.focus();
- });
- event.preventDefault();
- }
- },
- mousedown: function( event ) {
- if ( this._moveToTop( event ) ) {
- this._focusTabbable();
- }
- }
- });
-
- // We assume that any existing aria-describedby attribute means
- // that the dialog content is marked up properly
- // otherwise we brute force the content as the description
- if ( !this.element.find( "[aria-describedby]" ).length ) {
- this.uiDialog.attr({
- "aria-describedby": this.element.uniqueId().attr( "id" )
- });
- }
- },
-
- _createTitlebar: function() {
- var uiDialogTitle;
-
- this.uiDialogTitlebar = $( "<div>" )
- .addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" )
- .prependTo( this.uiDialog );
- this._on( this.uiDialogTitlebar, {
- mousedown: function( event ) {
- // Don't prevent click on close button (#8838)
- // Focusing a dialog that is partially scrolled out of view
- // causes the browser to scroll it into view, preventing the click event
- if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
- // Dialog isn't getting focus when dragging (#8063)
- this.uiDialog.focus();
- }
- }
- });
-
- // support: IE
- // Use type="button" to prevent enter keypresses in textboxes from closing the
- // dialog in IE (#9312)
- this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
- .button({
- label: this.options.closeText,
- icons: {
- primary: "ui-icon-closethick"
- },
- text: false
- })
- .addClass( "ui-dialog-titlebar-close" )
- .appendTo( this.uiDialogTitlebar );
- this._on( this.uiDialogTitlebarClose, {
- click: function( event ) {
- event.preventDefault();
- this.close( event );
- }
- });
-
- uiDialogTitle = $( "<span>" )
- .uniqueId()
- .addClass( "ui-dialog-title" )
- .prependTo( this.uiDialogTitlebar );
- this._title( uiDialogTitle );
-
- this.uiDialog.attr({
- "aria-labelledby": uiDialogTitle.attr( "id" )
- });
- },
-
- _title: function( title ) {
- if ( !this.options.title ) {
- title.html( "&#160;" );
- }
- title.text( this.options.title );
- },
-
- _createButtonPane: function() {
- this.uiDialogButtonPane = $( "<div>" )
- .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" );
-
- this.uiButtonSet = $( "<div>" )
- .addClass( "ui-dialog-buttonset" )
- .appendTo( this.uiDialogButtonPane );
-
- this._createButtons();
- },
-
- _createButtons: function() {
- var that = this,
- buttons = this.options.buttons;
-
- // if we already have a button pane, remove it
- this.uiDialogButtonPane.remove();
- this.uiButtonSet.empty();
-
- if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
- this.uiDialog.removeClass( "ui-dialog-buttons" );
- return;
- }
-
- $.each( buttons, function( name, props ) {
- var click, buttonOptions;
- props = $.isFunction( props ) ?
- { click: props, text: name } :
- props;
- // Default to a non-submitting button
- props = $.extend( { type: "button" }, props );
- // Change the context for the click callback to be the main element
- click = props.click;
- props.click = function() {
- click.apply( that.element[ 0 ], arguments );
- };
- buttonOptions = {
- icons: props.icons,
- text: props.showText
- };
- delete props.icons;
- delete props.showText;
- $( "<button></button>", props )
- .button( buttonOptions )
- .appendTo( that.uiButtonSet );
- });
- this.uiDialog.addClass( "ui-dialog-buttons" );
- this.uiDialogButtonPane.appendTo( this.uiDialog );
- },
-
- _makeDraggable: function() {
- var that = this,
- options = this.options;
-
- function filteredUi( ui ) {
- return {
- position: ui.position,
- offset: ui.offset
- };
- }
-
- this.uiDialog.draggable({
- cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
- handle: ".ui-dialog-titlebar",
- containment: "document",
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-dragging" );
- that._blockFrames();
- that._trigger( "dragStart", event, filteredUi( ui ) );
- },
- drag: function( event, ui ) {
- that._trigger( "drag", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- var left = ui.offset.left - that.document.scrollLeft(),
- top = ui.offset.top - that.document.scrollTop();
-
- options.position = {
- my: "left top",
- at: "left" + (left >= 0 ? "+" : "") + left + " " +
- "top" + (top >= 0 ? "+" : "") + top,
- of: that.window
- };
- $( this ).removeClass( "ui-dialog-dragging" );
- that._unblockFrames();
- that._trigger( "dragStop", event, filteredUi( ui ) );
- }
- });
- },
-
- _makeResizable: function() {
- var that = this,
- options = this.options,
- handles = options.resizable,
- // .ui-resizable has position: relative defined in the stylesheet
- // but dialogs have to use absolute or fixed positioning
- position = this.uiDialog.css("position"),
- resizeHandles = typeof handles === "string" ?
- handles :
- "n,e,s,w,se,sw,ne,nw";
-
- function filteredUi( ui ) {
- return {
- originalPosition: ui.originalPosition,
- originalSize: ui.originalSize,
- position: ui.position,
- size: ui.size
- };
- }
-
- this.uiDialog.resizable({
- cancel: ".ui-dialog-content",
- containment: "document",
- alsoResize: this.element,
- maxWidth: options.maxWidth,
- maxHeight: options.maxHeight,
- minWidth: options.minWidth,
- minHeight: this._minHeight(),
- handles: resizeHandles,
- start: function( event, ui ) {
- $( this ).addClass( "ui-dialog-resizing" );
- that._blockFrames();
- that._trigger( "resizeStart", event, filteredUi( ui ) );
- },
- resize: function( event, ui ) {
- that._trigger( "resize", event, filteredUi( ui ) );
- },
- stop: function( event, ui ) {
- var offset = that.uiDialog.offset(),
- left = offset.left - that.document.scrollLeft(),
- top = offset.top - that.document.scrollTop();
-
- options.height = that.uiDialog.height();
- options.width = that.uiDialog.width();
- options.position = {
- my: "left top",
- at: "left" + (left >= 0 ? "+" : "") + left + " " +
- "top" + (top >= 0 ? "+" : "") + top,
- of: that.window
- };
- $( this ).removeClass( "ui-dialog-resizing" );
- that._unblockFrames();
- that._trigger( "resizeStop", event, filteredUi( ui ) );
- }
- })
- .css( "position", position );
- },
-
- _trackFocus: function() {
- this._on( this.widget(), {
- focusin: function( event ) {
- this._makeFocusTarget();
- this._focusedElement = $( event.target );
- }
- });
- },
-
- _makeFocusTarget: function() {
- this._untrackInstance();
- this._trackingInstances().unshift( this );
- },
-
- _untrackInstance: function() {
- var instances = this._trackingInstances(),
- exists = $.inArray( this, instances );
- if ( exists !== -1 ) {
- instances.splice( exists, 1 );
- }
- },
-
- _trackingInstances: function() {
- var instances = this.document.data( "ui-dialog-instances" );
- if ( !instances ) {
- instances = [];
- this.document.data( "ui-dialog-instances", instances );
- }
- return instances;
- },
-
- _minHeight: function() {
- var options = this.options;
-
- return options.height === "auto" ?
- options.minHeight :
- Math.min( options.minHeight, options.height );
- },
-
- _position: function() {
- // Need to show the dialog to get the actual offset in the position plugin
- var isVisible = this.uiDialog.is( ":visible" );
- if ( !isVisible ) {
- this.uiDialog.show();
- }
- this.uiDialog.position( this.options.position );
- if ( !isVisible ) {
- this.uiDialog.hide();
- }
- },
-
- _setOptions: function( options ) {
- var that = this,
- resize = false,
- resizableOptions = {};
-
- $.each( options, function( key, value ) {
- that._setOption( key, value );
-
- if ( key in that.sizeRelatedOptions ) {
- resize = true;
- }
- if ( key in that.resizableRelatedOptions ) {
- resizableOptions[ key ] = value;
- }
- });
-
- if ( resize ) {
- this._size();
- this._position();
- }
- if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
- this.uiDialog.resizable( "option", resizableOptions );
- }
- },
-
- _setOption: function( key, value ) {
- var isDraggable, isResizable,
- uiDialog = this.uiDialog;
-
- if ( key === "dialogClass" ) {
- uiDialog
- .removeClass( this.options.dialogClass )
- .addClass( value );
- }
-
- if ( key === "disabled" ) {
- return;
- }
-
- this._super( key, value );
-
- if ( key === "appendTo" ) {
- this.uiDialog.appendTo( this._appendTo() );
- }
-
- if ( key === "buttons" ) {
- this._createButtons();
- }
-
- if ( key === "closeText" ) {
- this.uiDialogTitlebarClose.button({
- // Ensure that we always pass a string
- label: "" + value
- });
- }
-
- if ( key === "draggable" ) {
- isDraggable = uiDialog.is( ":data(ui-draggable)" );
- if ( isDraggable && !value ) {
- uiDialog.draggable( "destroy" );
- }
-
- if ( !isDraggable && value ) {
- this._makeDraggable();
- }
- }
-
- if ( key === "position" ) {
- this._position();
- }
-
- if ( key === "resizable" ) {
- // currently resizable, becoming non-resizable
- isResizable = uiDialog.is( ":data(ui-resizable)" );
- if ( isResizable && !value ) {
- uiDialog.resizable( "destroy" );
- }
-
- // currently resizable, changing handles
- if ( isResizable && typeof value === "string" ) {
- uiDialog.resizable( "option", "handles", value );
- }
-
- // currently non-resizable, becoming resizable
- if ( !isResizable && value !== false ) {
- this._makeResizable();
- }
- }
-
- if ( key === "title" ) {
- this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
- }
- },
-
- _size: function() {
- // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
- // divs will both have width and height set, so we need to reset them
- var nonContentHeight, minContentHeight, maxContentHeight,
- options = this.options;
-
- // Reset content sizing
- this.element.show().css({
- width: "auto",
- minHeight: 0,
- maxHeight: "none",
- height: 0
- });
-
- if ( options.minWidth > options.width ) {
- options.width = options.minWidth;
- }
-
- // reset wrapper sizing
- // determine the height of all the non-content elements
- nonContentHeight = this.uiDialog.css({
- height: "auto",
- width: options.width
- })
- .outerHeight();
- minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
- maxContentHeight = typeof options.maxHeight === "number" ?
- Math.max( 0, options.maxHeight - nonContentHeight ) :
- "none";
-
- if ( options.height === "auto" ) {
- this.element.css({
- minHeight: minContentHeight,
- maxHeight: maxContentHeight,
- height: "auto"
- });
- } else {
- this.element.height( Math.max( 0, options.height - nonContentHeight ) );
- }
-
- if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
- this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
- }
- },
-
- _blockFrames: function() {
- this.iframeBlocks = this.document.find( "iframe" ).map(function() {
- var iframe = $( this );
-
- return $( "<div>" )
- .css({
- position: "absolute",
- width: iframe.outerWidth(),
- height: iframe.outerHeight()
- })
- .appendTo( iframe.parent() )
- .offset( iframe.offset() )[0];
- });
- },
-
- _unblockFrames: function() {
- if ( this.iframeBlocks ) {
- this.iframeBlocks.remove();
- delete this.iframeBlocks;
- }
- },
-
- _allowInteraction: function( event ) {
- if ( $( event.target ).closest( ".ui-dialog" ).length ) {
- return true;
- }
-
- // TODO: Remove hack when datepicker implements
- // the .ui-front logic (#8989)
- return !!$( event.target ).closest( ".ui-datepicker" ).length;
- },
-
- _createOverlay: function() {
- if ( !this.options.modal ) {
- return;
- }
-
- // We use a delay in case the overlay is created from an
- // event that we're going to be cancelling (#2804)
- var isOpening = true;
- this._delay(function() {
- isOpening = false;
- });
-
- if ( !this.document.data( "ui-dialog-overlays" ) ) {
-
- // Prevent use of anchors and inputs
- // Using _on() for an event handler shared across many instances is
- // safe because the dialogs stack and must be closed in reverse order
- this._on( this.document, {
- focusin: function( event ) {
- if ( isOpening ) {
- return;
- }
-
- if ( !this._allowInteraction( event ) ) {
- event.preventDefault();
- this._trackingInstances()[ 0 ]._focusTabbable();
- }
- }
- });
- }
-
- this.overlay = $( "<div>" )
- .addClass( "ui-widget-overlay ui-front" )
- .appendTo( this._appendTo() );
- this._on( this.overlay, {
- mousedown: "_keepFocus"
- });
- this.document.data( "ui-dialog-overlays",
- (this.document.data( "ui-dialog-overlays" ) || 0) + 1 );
- },
-
- _destroyOverlay: function() {
- if ( !this.options.modal ) {
- return;
- }
-
- if ( this.overlay ) {
- var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
-
- if ( !overlays ) {
- this.document
- .unbind( "focusin" )
- .removeData( "ui-dialog-overlays" );
- } else {
- this.document.data( "ui-dialog-overlays", overlays );
- }
-
- this.overlay.remove();
- this.overlay = null;
- }
- }
-});
-
-
-/*!
- * jQuery UI Droppable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/droppable/
- */
-
-
-$.widget( "ui.droppable", {
- version: "1.11.4",
- widgetEventPrefix: "drop",
- options: {
- accept: "*",
- activeClass: false,
- addClasses: true,
- greedy: false,
- hoverClass: false,
- scope: "default",
- tolerance: "intersect",
-
- // callbacks
- activate: null,
- deactivate: null,
- drop: null,
- out: null,
- over: null
- },
- _create: function() {
-
- var proportions,
- o = this.options,
- accept = o.accept;
-
- this.isover = false;
- this.isout = true;
-
- this.accept = $.isFunction( accept ) ? accept : function( d ) {
- return d.is( accept );
- };
-
- this.proportions = function( /* valueToWrite */ ) {
- if ( arguments.length ) {
- // Store the droppable's proportions
- proportions = arguments[ 0 ];
- } else {
- // Retrieve or derive the droppable's proportions
- return proportions ?
- proportions :
- proportions = {
- width: this.element[ 0 ].offsetWidth,
- height: this.element[ 0 ].offsetHeight
- };
- }
- };
-
- this._addToManager( o.scope );
-
- o.addClasses && this.element.addClass( "ui-droppable" );
-
- },
-
- _addToManager: function( scope ) {
- // Add the reference and positions to the manager
- $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
- $.ui.ddmanager.droppables[ scope ].push( this );
- },
-
- _splice: function( drop ) {
- var i = 0;
- for ( ; i < drop.length; i++ ) {
- if ( drop[ i ] === this ) {
- drop.splice( i, 1 );
- }
- }
- },
-
- _destroy: function() {
- var drop = $.ui.ddmanager.droppables[ this.options.scope ];
-
- this._splice( drop );
-
- this.element.removeClass( "ui-droppable ui-droppable-disabled" );
- },
-
- _setOption: function( key, value ) {
-
- if ( key === "accept" ) {
- this.accept = $.isFunction( value ) ? value : function( d ) {
- return d.is( value );
- };
- } else if ( key === "scope" ) {
- var drop = $.ui.ddmanager.droppables[ this.options.scope ];
-
- this._splice( drop );
- this._addToManager( value );
- }
-
- this._super( key, value );
- },
-
- _activate: function( event ) {
- var draggable = $.ui.ddmanager.current;
- if ( this.options.activeClass ) {
- this.element.addClass( this.options.activeClass );
- }
- if ( draggable ){
- this._trigger( "activate", event, this.ui( draggable ) );
- }
- },
-
- _deactivate: function( event ) {
- var draggable = $.ui.ddmanager.current;
- if ( this.options.activeClass ) {
- this.element.removeClass( this.options.activeClass );
- }
- if ( draggable ){
- this._trigger( "deactivate", event, this.ui( draggable ) );
- }
- },
-
- _over: function( event ) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
- return;
- }
-
- if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- if ( this.options.hoverClass ) {
- this.element.addClass( this.options.hoverClass );
- }
- this._trigger( "over", event, this.ui( draggable ) );
- }
-
- },
-
- _out: function( event ) {
-
- var draggable = $.ui.ddmanager.current;
-
- // Bail if draggable and droppable are same element
- if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
- return;
- }
-
- if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- if ( this.options.hoverClass ) {
- this.element.removeClass( this.options.hoverClass );
- }
- this._trigger( "out", event, this.ui( draggable ) );
- }
-
- },
-
- _drop: function( event, custom ) {
-
- var draggable = custom || $.ui.ddmanager.current,
- childrenIntersection = false;
-
- // Bail if draggable and droppable are same element
- if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) {
- return false;
- }
-
- this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() {
- var inst = $( this ).droppable( "instance" );
- if (
- inst.options.greedy &&
- !inst.options.disabled &&
- inst.options.scope === draggable.options.scope &&
- inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) &&
- $.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event )
- ) { childrenIntersection = true; return false; }
- });
- if ( childrenIntersection ) {
- return false;
- }
-
- if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- if ( this.options.activeClass ) {
- this.element.removeClass( this.options.activeClass );
- }
- if ( this.options.hoverClass ) {
- this.element.removeClass( this.options.hoverClass );
- }
- this._trigger( "drop", event, this.ui( draggable ) );
- return this.element;
- }
-
- return false;
-
- },
-
- ui: function( c ) {
- return {
- draggable: ( c.currentItem || c.element ),
- helper: c.helper,
- position: c.position,
- offset: c.positionAbs
- };
- }
-
-});
-
-$.ui.intersect = (function() {
- function isOverAxis( x, reference, size ) {
- return ( x >= reference ) && ( x < ( reference + size ) );
- }
-
- return function( draggable, droppable, toleranceMode, event ) {
-
- if ( !droppable.offset ) {
- return false;
- }
-
- var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left,
- y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top,
- x2 = x1 + draggable.helperProportions.width,
- y2 = y1 + draggable.helperProportions.height,
- l = droppable.offset.left,
- t = droppable.offset.top,
- r = l + droppable.proportions().width,
- b = t + droppable.proportions().height;
-
- switch ( toleranceMode ) {
- case "fit":
- return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
- case "intersect":
- return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
- x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
- t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
- y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
- case "pointer":
- return isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width );
- case "touch":
- return (
- ( y1 >= t && y1 <= b ) || // Top edge touching
- ( y2 >= t && y2 <= b ) || // Bottom edge touching
- ( y1 < t && y2 > b ) // Surrounded vertically
- ) && (
- ( x1 >= l && x1 <= r ) || // Left edge touching
- ( x2 >= l && x2 <= r ) || // Right edge touching
- ( x1 < l && x2 > r ) // Surrounded horizontally
- );
- default:
- return false;
- }
- };
-})();
-
-/*
- This manager tracks offsets of draggables and droppables
-*/
-$.ui.ddmanager = {
- current: null,
- droppables: { "default": [] },
- prepareOffsets: function( t, event ) {
-
- var i, j,
- m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
- type = event ? event.type : null, // workaround for #2317
- list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
-
- droppablesLoop: for ( i = 0; i < m.length; i++ ) {
-
- // No disabled and non-accepted
- if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) {
- continue;
- }
-
- // Filter out elements in the current dragged item
- for ( j = 0; j < list.length; j++ ) {
- if ( list[ j ] === m[ i ].element[ 0 ] ) {
- m[ i ].proportions().height = 0;
- continue droppablesLoop;
- }
- }
-
- m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
- if ( !m[ i ].visible ) {
- continue;
- }
-
- // Activate the droppable if used directly from draggables
- if ( type === "mousedown" ) {
- m[ i ]._activate.call( m[ i ], event );
- }
-
- m[ i ].offset = m[ i ].element.offset();
- m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight });
-
- }
-
- },
- drop: function( draggable, event ) {
-
- var dropped = false;
- // Create a copy of the droppables in case the list changes during the drop (#9116)
- $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
-
- if ( !this.options ) {
- return;
- }
- if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) {
- dropped = this._drop.call( this, event ) || dropped;
- }
-
- if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) {
- this.isout = true;
- this.isover = false;
- this._deactivate.call( this, event );
- }
-
- });
- return dropped;
-
- },
- dragStart: function( draggable, event ) {
- // Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
- draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
- if ( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- });
- },
- drag: function( draggable, event ) {
-
- // If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
- if ( draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
-
- // Run through all droppables and check their positions based on specific tolerance options
- $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
-
- if ( this.options.disabled || this.greedyChild || !this.visible ) {
- return;
- }
-
- var parentInstance, scope, parent,
- intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ),
- c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null );
- if ( !c ) {
- return;
- }
-
- if ( this.options.greedy ) {
- // find droppable parents with same scope
- scope = this.options.scope;
- parent = this.element.parents( ":data(ui-droppable)" ).filter(function() {
- return $( this ).droppable( "instance" ).options.scope === scope;
- });
-
- if ( parent.length ) {
- parentInstance = $( parent[ 0 ] ).droppable( "instance" );
- parentInstance.greedyChild = ( c === "isover" );
- }
- }
-
- // we just moved into a greedy child
- if ( parentInstance && c === "isover" ) {
- parentInstance.isover = false;
- parentInstance.isout = true;
- parentInstance._out.call( parentInstance, event );
- }
-
- this[ c ] = true;
- this[c === "isout" ? "isover" : "isout"] = false;
- this[c === "isover" ? "_over" : "_out"].call( this, event );
-
- // we just moved out of a greedy child
- if ( parentInstance && c === "isout" ) {
- parentInstance.isout = false;
- parentInstance.isover = true;
- parentInstance._over.call( parentInstance, event );
- }
- });
-
- },
- dragStop: function( draggable, event ) {
- draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
- // Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
- if ( !draggable.options.refreshPositions ) {
- $.ui.ddmanager.prepareOffsets( draggable, event );
- }
- }
-};
-
-var droppable = $.ui.droppable;
-
-
-/*!
- * jQuery UI Effects 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/category/effects-core/
- */
-
-
-var dataSpace = "ui-effects-",
-
- // Create a local jQuery because jQuery Color relies on it and the
- // global may not exist with AMD and a custom build (#10199)
- jQuery = $;
-
-$.effects = {
- effect: {}
-};
-
-/*!
- * jQuery Color Animations v2.1.2
- * https://github.com/jquery/jquery-color
- *
- * Copyright 2014 jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * Date: Wed Jan 16 08:47:09 2013 -0600
- */
-(function( jQuery, undefined ) {
-
- var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
-
- // plusequals test for += 100 -= 100
- rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
- // a set of RE's that can match strings and generate color tuples.
- stringParsers = [ {
- re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ],
- execResult[ 3 ],
- execResult[ 4 ]
- ];
- }
- }, {
- re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- parse: function( execResult ) {
- return [
- execResult[ 1 ] * 2.55,
- execResult[ 2 ] * 2.55,
- execResult[ 3 ] * 2.55,
- execResult[ 4 ]
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ], 16 )
- ];
- }
- }, {
- // this regex ignores A-F because it's compared against an already lowercased string
- re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
- parse: function( execResult ) {
- return [
- parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
- parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
- parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
- ];
- }
- }, {
- re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
- space: "hsla",
- parse: function( execResult ) {
- return [
- execResult[ 1 ],
- execResult[ 2 ] / 100,
- execResult[ 3 ] / 100,
- execResult[ 4 ]
- ];
- }
- } ],
-
- // jQuery.Color( )
- color = jQuery.Color = function( color, green, blue, alpha ) {
- return new jQuery.Color.fn.parse( color, green, blue, alpha );
- },
- spaces = {
- rgba: {
- props: {
- red: {
- idx: 0,
- type: "byte"
- },
- green: {
- idx: 1,
- type: "byte"
- },
- blue: {
- idx: 2,
- type: "byte"
- }
- }
- },
-
- hsla: {
- props: {
- hue: {
- idx: 0,
- type: "degrees"
- },
- saturation: {
- idx: 1,
- type: "percent"
- },
- lightness: {
- idx: 2,
- type: "percent"
- }
- }
- }
- },
- propTypes = {
- "byte": {
- floor: true,
- max: 255
- },
- "percent": {
- max: 1
- },
- "degrees": {
- mod: 360,
- floor: true
- }
- },
- support = color.support = {},
-
- // element for support tests
- supportElem = jQuery( "<p>" )[ 0 ],
-
- // colors = jQuery.Color.names
- colors,
-
- // local aliases of functions called often
- each = jQuery.each;
-
-// determine rgba support immediately
-supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
-support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
-
-// define cache name and alpha properties
-// for rgba and hsla spaces
-each( spaces, function( spaceName, space ) {
- space.cache = "_" + spaceName;
- space.props.alpha = {
- idx: 3,
- type: "percent",
- def: 1
- };
-});
-
-function clamp( value, prop, allowEmpty ) {
- var type = propTypes[ prop.type ] || {};
-
- if ( value == null ) {
- return (allowEmpty || !prop.def) ? null : prop.def;
- }
-
- // ~~ is an short way of doing floor for positive numbers
- value = type.floor ? ~~value : parseFloat( value );
-
- // IE will pass in empty strings as value for alpha,
- // which will hit this case
- if ( isNaN( value ) ) {
- return prop.def;
- }
-
- if ( type.mod ) {
- // we add mod before modding to make sure that negatives values
- // get converted properly: -10 -> 350
- return (value + type.mod) % type.mod;
- }
-
- // for now all property types without mod have min and max
- return 0 > value ? 0 : type.max < value ? type.max : value;
-}
-
-function stringParse( string ) {
- var inst = color(),
- rgba = inst._rgba = [];
-
- string = string.toLowerCase();
-
- each( stringParsers, function( i, parser ) {
- var parsed,
- match = parser.re.exec( string ),
- values = match && parser.parse( match ),
- spaceName = parser.space || "rgba";
-
- if ( values ) {
- parsed = inst[ spaceName ]( values );
-
- // if this was an rgba parse the assignment might happen twice
- // oh well....
- inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
- rgba = inst._rgba = parsed._rgba;
-
- // exit each( stringParsers ) here because we matched
- return false;
- }
- });
-
- // Found a stringParser that handled it
- if ( rgba.length ) {
-
- // if this came from a parsed string, force "transparent" when alpha is 0
- // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
- if ( rgba.join() === "0,0,0,0" ) {
- jQuery.extend( rgba, colors.transparent );
- }
- return inst;
- }
-
- // named colors
- return colors[ string ];
-}
-
-color.fn = jQuery.extend( color.prototype, {
- parse: function( red, green, blue, alpha ) {
- if ( red === undefined ) {
- this._rgba = [ null, null, null, null ];
- return this;
- }
- if ( red.jquery || red.nodeType ) {
- red = jQuery( red ).css( green );
- green = undefined;
- }
-
- var inst = this,
- type = jQuery.type( red ),
- rgba = this._rgba = [];
-
- // more than 1 argument specified - assume ( red, green, blue, alpha )
- if ( green !== undefined ) {
- red = [ red, green, blue, alpha ];
- type = "array";
- }
-
- if ( type === "string" ) {
- return this.parse( stringParse( red ) || colors._default );
- }
-
- if ( type === "array" ) {
- each( spaces.rgba.props, function( key, prop ) {
- rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
- });
- return this;
- }
-
- if ( type === "object" ) {
- if ( red instanceof color ) {
- each( spaces, function( spaceName, space ) {
- if ( red[ space.cache ] ) {
- inst[ space.cache ] = red[ space.cache ].slice();
- }
- });
- } else {
- each( spaces, function( spaceName, space ) {
- var cache = space.cache;
- each( space.props, function( key, prop ) {
-
- // if the cache doesn't exist, and we know how to convert
- if ( !inst[ cache ] && space.to ) {
-
- // if the value was null, we don't need to copy it
- // if the key was alpha, we don't need to copy it either
- if ( key === "alpha" || red[ key ] == null ) {
- return;
- }
- inst[ cache ] = space.to( inst._rgba );
- }
-
- // this is the only case where we allow nulls for ALL properties.
- // call clamp with alwaysAllowEmpty
- inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
- });
-
- // everything defined but alpha?
- if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
- // use the default of 1
- inst[ cache ][ 3 ] = 1;
- if ( space.from ) {
- inst._rgba = space.from( inst[ cache ] );
- }
- }
- });
- }
- return this;
- }
- },
- is: function( compare ) {
- var is = color( compare ),
- same = true,
- inst = this;
-
- each( spaces, function( _, space ) {
- var localCache,
- isCache = is[ space.cache ];
- if (isCache) {
- localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
- each( space.props, function( _, prop ) {
- if ( isCache[ prop.idx ] != null ) {
- same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
- return same;
- }
- });
- }
- return same;
- });
- return same;
- },
- _space: function() {
- var used = [],
- inst = this;
- each( spaces, function( spaceName, space ) {
- if ( inst[ space.cache ] ) {
- used.push( spaceName );
- }
- });
- return used.pop();
- },
- transition: function( other, distance ) {
- var end = color( other ),
- spaceName = end._space(),
- space = spaces[ spaceName ],
- startColor = this.alpha() === 0 ? color( "transparent" ) : this,
- start = startColor[ space.cache ] || space.to( startColor._rgba ),
- result = start.slice();
-
- end = end[ space.cache ];
- each( space.props, function( key, prop ) {
- var index = prop.idx,
- startValue = start[ index ],
- endValue = end[ index ],
- type = propTypes[ prop.type ] || {};
-
- // if null, don't override start value
- if ( endValue === null ) {
- return;
- }
- // if null - use end
- if ( startValue === null ) {
- result[ index ] = endValue;
- } else {
- if ( type.mod ) {
- if ( endValue - startValue > type.mod / 2 ) {
- startValue += type.mod;
- } else if ( startValue - endValue > type.mod / 2 ) {
- startValue -= type.mod;
- }
- }
- result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
- }
- });
- return this[ spaceName ]( result );
- },
- blend: function( opaque ) {
- // if we are already opaque - return ourself
- if ( this._rgba[ 3 ] === 1 ) {
- return this;
- }
-
- var rgb = this._rgba.slice(),
- a = rgb.pop(),
- blend = color( opaque )._rgba;
-
- return color( jQuery.map( rgb, function( v, i ) {
- return ( 1 - a ) * blend[ i ] + a * v;
- }));
- },
- toRgbaString: function() {
- var prefix = "rgba(",
- rgba = jQuery.map( this._rgba, function( v, i ) {
- return v == null ? ( i > 2 ? 1 : 0 ) : v;
- });
-
- if ( rgba[ 3 ] === 1 ) {
- rgba.pop();
- prefix = "rgb(";
- }
-
- return prefix + rgba.join() + ")";
- },
- toHslaString: function() {
- var prefix = "hsla(",
- hsla = jQuery.map( this.hsla(), function( v, i ) {
- if ( v == null ) {
- v = i > 2 ? 1 : 0;
- }
-
- // catch 1 and 2
- if ( i && i < 3 ) {
- v = Math.round( v * 100 ) + "%";
- }
- return v;
- });
-
- if ( hsla[ 3 ] === 1 ) {
- hsla.pop();
- prefix = "hsl(";
- }
- return prefix + hsla.join() + ")";
- },
- toHexString: function( includeAlpha ) {
- var rgba = this._rgba.slice(),
- alpha = rgba.pop();
-
- if ( includeAlpha ) {
- rgba.push( ~~( alpha * 255 ) );
- }
-
- return "#" + jQuery.map( rgba, function( v ) {
-
- // default to 0 when nulls exist
- v = ( v || 0 ).toString( 16 );
- return v.length === 1 ? "0" + v : v;
- }).join("");
- },
- toString: function() {
- return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
- }
-});
-color.fn.parse.prototype = color.fn;
-
-// hsla conversions adapted from:
-// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
-
-function hue2rgb( p, q, h ) {
- h = ( h + 1 ) % 1;
- if ( h * 6 < 1 ) {
- return p + ( q - p ) * h * 6;
- }
- if ( h * 2 < 1) {
- return q;
- }
- if ( h * 3 < 2 ) {
- return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
- }
- return p;
-}
-
-spaces.hsla.to = function( rgba ) {
- if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
- return [ null, null, null, rgba[ 3 ] ];
- }
- var r = rgba[ 0 ] / 255,
- g = rgba[ 1 ] / 255,
- b = rgba[ 2 ] / 255,
- a = rgba[ 3 ],
- max = Math.max( r, g, b ),
- min = Math.min( r, g, b ),
- diff = max - min,
- add = max + min,
- l = add * 0.5,
- h, s;
-
- if ( min === max ) {
- h = 0;
- } else if ( r === max ) {
- h = ( 60 * ( g - b ) / diff ) + 360;
- } else if ( g === max ) {
- h = ( 60 * ( b - r ) / diff ) + 120;
- } else {
- h = ( 60 * ( r - g ) / diff ) + 240;
- }
-
- // chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
- // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
- if ( diff === 0 ) {
- s = 0;
- } else if ( l <= 0.5 ) {
- s = diff / add;
- } else {
- s = diff / ( 2 - add );
- }
- return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
-};
-
-spaces.hsla.from = function( hsla ) {
- if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
- return [ null, null, null, hsla[ 3 ] ];
- }
- var h = hsla[ 0 ] / 360,
- s = hsla[ 1 ],
- l = hsla[ 2 ],
- a = hsla[ 3 ],
- q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
- p = 2 * l - q;
-
- return [
- Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
- Math.round( hue2rgb( p, q, h ) * 255 ),
- Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
- a
- ];
-};
-
-each( spaces, function( spaceName, space ) {
- var props = space.props,
- cache = space.cache,
- to = space.to,
- from = space.from;
-
- // makes rgba() and hsla()
- color.fn[ spaceName ] = function( value ) {
-
- // generate a cache for this space if it doesn't exist
- if ( to && !this[ cache ] ) {
- this[ cache ] = to( this._rgba );
- }
- if ( value === undefined ) {
- return this[ cache ].slice();
- }
-
- var ret,
- type = jQuery.type( value ),
- arr = ( type === "array" || type === "object" ) ? value : arguments,
- local = this[ cache ].slice();
-
- each( props, function( key, prop ) {
- var val = arr[ type === "object" ? key : prop.idx ];
- if ( val == null ) {
- val = local[ prop.idx ];
- }
- local[ prop.idx ] = clamp( val, prop );
- });
-
- if ( from ) {
- ret = color( from( local ) );
- ret[ cache ] = local;
- return ret;
- } else {
- return color( local );
- }
- };
-
- // makes red() green() blue() alpha() hue() saturation() lightness()
- each( props, function( key, prop ) {
- // alpha is included in more than one space
- if ( color.fn[ key ] ) {
- return;
- }
- color.fn[ key ] = function( value ) {
- var vtype = jQuery.type( value ),
- fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
- local = this[ fn ](),
- cur = local[ prop.idx ],
- match;
-
- if ( vtype === "undefined" ) {
- return cur;
- }
-
- if ( vtype === "function" ) {
- value = value.call( this, cur );
- vtype = jQuery.type( value );
- }
- if ( value == null && prop.empty ) {
- return this;
- }
- if ( vtype === "string" ) {
- match = rplusequals.exec( value );
- if ( match ) {
- value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
- }
- }
- local[ prop.idx ] = value;
- return this[ fn ]( local );
- };
- });
-});
-
-// add cssHook and .fx.step function for each named hook.
-// accept a space separated string of properties
-color.hook = function( hook ) {
- var hooks = hook.split( " " );
- each( hooks, function( i, hook ) {
- jQuery.cssHooks[ hook ] = {
- set: function( elem, value ) {
- var parsed, curElem,
- backgroundColor = "";
-
- if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
- value = color( parsed || value );
- if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
- curElem = hook === "backgroundColor" ? elem.parentNode : elem;
- while (
- (backgroundColor === "" || backgroundColor === "transparent") &&
- curElem && curElem.style
- ) {
- try {
- backgroundColor = jQuery.css( curElem, "backgroundColor" );
- curElem = curElem.parentNode;
- } catch ( e ) {
- }
- }
-
- value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
- backgroundColor :
- "_default" );
- }
-
- value = value.toRgbaString();
- }
- try {
- elem.style[ hook ] = value;
- } catch ( e ) {
- // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
- }
- }
- };
- jQuery.fx.step[ hook ] = function( fx ) {
- if ( !fx.colorInit ) {
- fx.start = color( fx.elem, hook );
- fx.end = color( fx.end );
- fx.colorInit = true;
- }
- jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
- };
- });
-
-};
-
-color.hook( stepHooks );
-
-jQuery.cssHooks.borderColor = {
- expand: function( value ) {
- var expanded = {};
-
- each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
- expanded[ "border" + part + "Color" ] = value;
- });
- return expanded;
- }
-};
-
-// Basic color names only.
-// Usage of any of the other color names requires adding yourself or including
-// jquery.color.svg-names.js.
-colors = jQuery.Color.names = {
- // 4.1. Basic color keywords
- aqua: "#00ffff",
- black: "#000000",
- blue: "#0000ff",
- fuchsia: "#ff00ff",
- gray: "#808080",
- green: "#008000",
- lime: "#00ff00",
- maroon: "#800000",
- navy: "#000080",
- olive: "#808000",
- purple: "#800080",
- red: "#ff0000",
- silver: "#c0c0c0",
- teal: "#008080",
- white: "#ffffff",
- yellow: "#ffff00",
-
- // 4.2.3. "transparent" color keyword
- transparent: [ null, null, null, 0 ],
-
- _default: "#ffffff"
-};
-
-})( jQuery );
-
-/******************************************************************************/
-/****************************** CLASS ANIMATIONS ******************************/
-/******************************************************************************/
-(function() {
-
-var classAnimationActions = [ "add", "remove", "toggle" ],
- shorthandStyles = {
- border: 1,
- borderBottom: 1,
- borderColor: 1,
- borderLeft: 1,
- borderRight: 1,
- borderTop: 1,
- borderWidth: 1,
- margin: 1,
- padding: 1
- };
-
-$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
- $.fx.step[ prop ] = function( fx ) {
- if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
- jQuery.style( fx.elem, prop, fx.end );
- fx.setAttr = true;
- }
- };
-});
-
-function getElementStyles( elem ) {
- var key, len,
- style = elem.ownerDocument.defaultView ?
- elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
- elem.currentStyle,
- styles = {};
-
- if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
- len = style.length;
- while ( len-- ) {
- key = style[ len ];
- if ( typeof style[ key ] === "string" ) {
- styles[ $.camelCase( key ) ] = style[ key ];
- }
- }
- // support: Opera, IE <9
- } else {
- for ( key in style ) {
- if ( typeof style[ key ] === "string" ) {
- styles[ key ] = style[ key ];
- }
- }
- }
-
- return styles;
-}
-
-function styleDifference( oldStyle, newStyle ) {
- var diff = {},
- name, value;
-
- for ( name in newStyle ) {
- value = newStyle[ name ];
- if ( oldStyle[ name ] !== value ) {
- if ( !shorthandStyles[ name ] ) {
- if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
- diff[ name ] = value;
- }
- }
- }
- }
-
- return diff;
-}
-
-// support: jQuery <1.8
-if ( !$.fn.addBack ) {
- $.fn.addBack = function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- };
-}
-
-$.effects.animateClass = function( value, duration, easing, callback ) {
- var o = $.speed( duration, easing, callback );
-
- return this.queue( function() {
- var animated = $( this ),
- baseClass = animated.attr( "class" ) || "",
- applyClassChange,
- allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
-
- // map the animated objects to store the original styles.
- allAnimations = allAnimations.map(function() {
- var el = $( this );
- return {
- el: el,
- start: getElementStyles( this )
- };
- });
-
- // apply class change
- applyClassChange = function() {
- $.each( classAnimationActions, function(i, action) {
- if ( value[ action ] ) {
- animated[ action + "Class" ]( value[ action ] );
- }
- });
- };
- applyClassChange();
-
- // map all animated objects again - calculate new styles and diff
- allAnimations = allAnimations.map(function() {
- this.end = getElementStyles( this.el[ 0 ] );
- this.diff = styleDifference( this.start, this.end );
- return this;
- });
-
- // apply original class
- animated.attr( "class", baseClass );
-
- // map all animated objects again - this time collecting a promise
- allAnimations = allAnimations.map(function() {
- var styleInfo = this,
- dfd = $.Deferred(),
- opts = $.extend({}, o, {
- queue: false,
- complete: function() {
- dfd.resolve( styleInfo );
- }
- });
-
- this.el.animate( this.diff, opts );
- return dfd.promise();
- });
-
- // once all animations have completed:
- $.when.apply( $, allAnimations.get() ).done(function() {
-
- // set the final class
- applyClassChange();
-
- // for each animated element,
- // clear all css properties that were animated
- $.each( arguments, function() {
- var el = this.el;
- $.each( this.diff, function(key) {
- el.css( key, "" );
- });
- });
-
- // this is guarnteed to be there if you use jQuery.speed()
- // it also handles dequeuing the next anim...
- o.complete.call( animated[ 0 ] );
- });
- });
-};
-
-$.fn.extend({
- addClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return speed ?
- $.effects.animateClass.call( this,
- { add: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.addClass ),
-
- removeClass: (function( orig ) {
- return function( classNames, speed, easing, callback ) {
- return arguments.length > 1 ?
- $.effects.animateClass.call( this,
- { remove: classNames }, speed, easing, callback ) :
- orig.apply( this, arguments );
- };
- })( $.fn.removeClass ),
-
- toggleClass: (function( orig ) {
- return function( classNames, force, speed, easing, callback ) {
- if ( typeof force === "boolean" || force === undefined ) {
- if ( !speed ) {
- // without speed parameter
- return orig.apply( this, arguments );
- } else {
- return $.effects.animateClass.call( this,
- (force ? { add: classNames } : { remove: classNames }),
- speed, easing, callback );
- }
- } else {
- // without force parameter
- return $.effects.animateClass.call( this,
- { toggle: classNames }, force, speed, easing );
- }
- };
- })( $.fn.toggleClass ),
-
- switchClass: function( remove, add, speed, easing, callback) {
- return $.effects.animateClass.call( this, {
- add: add,
- remove: remove
- }, speed, easing, callback );
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EFFECTS **********************************/
-/******************************************************************************/
-
-(function() {
-
-$.extend( $.effects, {
- version: "1.11.4",
-
- // Saves a set of properties in a data storage
- save: function( element, set ) {
- for ( var i = 0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
- }
- }
- },
-
- // Restores a set of previously saved properties from a data storage
- restore: function( element, set ) {
- var val, i;
- for ( i = 0; i < set.length; i++ ) {
- if ( set[ i ] !== null ) {
- val = element.data( dataSpace + set[ i ] );
- // support: jQuery 1.6.2
- // http://bugs.jquery.com/ticket/9917
- // jQuery 1.6.2 incorrectly returns undefined for any falsy value.
- // We can't differentiate between "" and 0 here, so we just assume
- // empty string since it's likely to be a more common value...
- if ( val === undefined ) {
- val = "";
- }
- element.css( set[ i ], val );
- }
- }
- },
-
- setMode: function( el, mode ) {
- if (mode === "toggle") {
- mode = el.is( ":hidden" ) ? "show" : "hide";
- }
- return mode;
- },
-
- // Translates a [top,left] array into a baseline value
- // this should be a little more flexible in the future to handle a string & hash
- getBaseline: function( origin, original ) {
- var y, x;
- switch ( origin[ 0 ] ) {
- case "top": y = 0; break;
- case "middle": y = 0.5; break;
- case "bottom": y = 1; break;
- default: y = origin[ 0 ] / original.height;
- }
- switch ( origin[ 1 ] ) {
- case "left": x = 0; break;
- case "center": x = 0.5; break;
- case "right": x = 1; break;
- default: x = origin[ 1 ] / original.width;
- }
- return {
- x: x,
- y: y
- };
- },
-
- // Wraps the element around a wrapper that copies position properties
- createWrapper: function( element ) {
-
- // if the element is already wrapped, return it
- if ( element.parent().is( ".ui-effects-wrapper" )) {
- return element.parent();
- }
-
- // wrap the element
- var props = {
- width: element.outerWidth(true),
- height: element.outerHeight(true),
- "float": element.css( "float" )
- },
- wrapper = $( "<div></div>" )
- .addClass( "ui-effects-wrapper" )
- .css({
- fontSize: "100%",
- background: "transparent",
- border: "none",
- margin: 0,
- padding: 0
- }),
- // Store the size in case width/height are defined in % - Fixes #5245
- size = {
- width: element.width(),
- height: element.height()
- },
- active = document.activeElement;
-
- // support: Firefox
- // Firefox incorrectly exposes anonymous content
- // https://bugzilla.mozilla.org/show_bug.cgi?id=561664
- try {
- active.id;
- } catch ( e ) {
- active = document.body;
- }
-
- element.wrap( wrapper );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
-
- wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
-
- // transfer positioning properties to the wrapper
- if ( element.css( "position" ) === "static" ) {
- wrapper.css({ position: "relative" });
- element.css({ position: "relative" });
- } else {
- $.extend( props, {
- position: element.css( "position" ),
- zIndex: element.css( "z-index" )
- });
- $.each([ "top", "left", "bottom", "right" ], function(i, pos) {
- props[ pos ] = element.css( pos );
- if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
- props[ pos ] = "auto";
- }
- });
- element.css({
- position: "relative",
- top: 0,
- left: 0,
- right: "auto",
- bottom: "auto"
- });
- }
- element.css(size);
-
- return wrapper.css( props ).show();
- },
-
- removeWrapper: function( element ) {
- var active = document.activeElement;
-
- if ( element.parent().is( ".ui-effects-wrapper" ) ) {
- element.parent().replaceWith( element );
-
- // Fixes #7595 - Elements lose focus when wrapped.
- if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
- $( active ).focus();
- }
- }
-
- return element;
- },
-
- setTransition: function( element, list, factor, value ) {
- value = value || {};
- $.each( list, function( i, x ) {
- var unit = element.cssUnit( x );
- if ( unit[ 0 ] > 0 ) {
- value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
- }
- });
- return value;
- }
-});
-
-// return an effect options object for the given parameters:
-function _normalizeArguments( effect, options, speed, callback ) {
-
- // allow passing all options as the first parameter
- if ( $.isPlainObject( effect ) ) {
- options = effect;
- effect = effect.effect;
- }
-
- // convert to an object
- effect = { effect: effect };
-
- // catch (effect, null, ...)
- if ( options == null ) {
- options = {};
- }
-
- // catch (effect, callback)
- if ( $.isFunction( options ) ) {
- callback = options;
- speed = null;
- options = {};
- }
-
- // catch (effect, speed, ?)
- if ( typeof options === "number" || $.fx.speeds[ options ] ) {
- callback = speed;
- speed = options;
- options = {};
- }
-
- // catch (effect, options, callback)
- if ( $.isFunction( speed ) ) {
- callback = speed;
- speed = null;
- }
-
- // add options to effect
- if ( options ) {
- $.extend( effect, options );
- }
-
- speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 :
- typeof speed === "number" ? speed :
- speed in $.fx.speeds ? $.fx.speeds[ speed ] :
- $.fx.speeds._default;
-
- effect.complete = callback || options.complete;
-
- return effect;
-}
-
-function standardAnimationOption( option ) {
- // Valid standard speeds (nothing, number, named speed)
- if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
- return true;
- }
-
- // Invalid strings - treat as "normal" speed
- if ( typeof option === "string" && !$.effects.effect[ option ] ) {
- return true;
- }
-
- // Complete callback
- if ( $.isFunction( option ) ) {
- return true;
- }
-
- // Options hash (but not naming an effect)
- if ( typeof option === "object" && !option.effect ) {
- return true;
- }
-
- // Didn't match any standard API
- return false;
-}
-
-$.fn.extend({
- effect: function( /* effect, options, speed, callback */ ) {
- var args = _normalizeArguments.apply( this, arguments ),
- mode = args.mode,
- queue = args.queue,
- effectMethod = $.effects.effect[ args.effect ];
-
- if ( $.fx.off || !effectMethod ) {
- // delegate to the original method (e.g., .show()) if possible
- if ( mode ) {
- return this[ mode ]( args.duration, args.complete );
- } else {
- return this.each( function() {
- if ( args.complete ) {
- args.complete.call( this );
- }
- });
- }
- }
-
- function run( next ) {
- var elem = $( this ),
- complete = args.complete,
- mode = args.mode;
-
- function done() {
- if ( $.isFunction( complete ) ) {
- complete.call( elem[0] );
- }
- if ( $.isFunction( next ) ) {
- next();
- }
- }
-
- // If the element already has the correct final state, delegate to
- // the core methods so the internal tracking of "olddisplay" works.
- if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
- elem[ mode ]();
- done();
- } else {
- effectMethod.call( elem[0], args, done );
- }
- }
-
- return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
- },
-
- show: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "show";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.show ),
-
- hide: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "hide";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.hide ),
-
- toggle: (function( orig ) {
- return function( option ) {
- if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
- return orig.apply( this, arguments );
- } else {
- var args = _normalizeArguments.apply( this, arguments );
- args.mode = "toggle";
- return this.effect.call( this, args );
- }
- };
- })( $.fn.toggle ),
-
- // helper functions
- cssUnit: function(key) {
- var style = this.css( key ),
- val = [];
-
- $.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
- if ( style.indexOf( unit ) > 0 ) {
- val = [ parseFloat( style ), unit ];
- }
- });
- return val;
- }
-});
-
-})();
-
-/******************************************************************************/
-/*********************************** EASING ***********************************/
-/******************************************************************************/
-
-(function() {
-
-// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
-
-var baseEasings = {};
-
-$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
- baseEasings[ name ] = function( p ) {
- return Math.pow( p, i + 2 );
- };
-});
-
-$.extend( baseEasings, {
- Sine: function( p ) {
- return 1 - Math.cos( p * Math.PI / 2 );
- },
- Circ: function( p ) {
- return 1 - Math.sqrt( 1 - p * p );
- },
- Elastic: function( p ) {
- return p === 0 || p === 1 ? p :
- -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
- },
- Back: function( p ) {
- return p * p * ( 3 * p - 2 );
- },
- Bounce: function( p ) {
- var pow2,
- bounce = 4;
-
- while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
- return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
- }
-});
-
-$.each( baseEasings, function( name, easeIn ) {
- $.easing[ "easeIn" + name ] = easeIn;
- $.easing[ "easeOut" + name ] = function( p ) {
- return 1 - easeIn( 1 - p );
- };
- $.easing[ "easeInOut" + name ] = function( p ) {
- return p < 0.5 ?
- easeIn( p * 2 ) / 2 :
- 1 - easeIn( p * -2 + 2 ) / 2;
- };
-});
-
-})();
-
-var effect = $.effects;
-
-
-/*!
- * jQuery UI Effects Blind 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/blind-effect/
- */
-
-
-var effectBlind = $.effects.effect.blind = function( o, done ) {
- // Create element
- var el = $( this ),
- rvertical = /up|down|vertical/,
- rpositivemotion = /up|left|vertical|horizontal/,
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- direction = o.direction || "up",
- vertical = rvertical.test( direction ),
- ref = vertical ? "height" : "width",
- ref2 = vertical ? "top" : "left",
- motion = rpositivemotion.test( direction ),
- animation = {},
- show = mode === "show",
- wrapper, distance, margin;
-
- // if already wrapped, the wrapper's properties are my property. #6245
- if ( el.parent().is( ".ui-effects-wrapper" ) ) {
- $.effects.save( el.parent(), props );
- } else {
- $.effects.save( el, props );
- }
- el.show();
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- distance = wrapper[ ref ]();
- margin = parseFloat( wrapper.css( ref2 ) ) || 0;
-
- animation[ ref ] = show ? distance : 0;
- if ( !motion ) {
- el
- .css( vertical ? "bottom" : "right", 0 )
- .css( vertical ? "top" : "left", "auto" )
- .css({ position: "absolute" });
-
- animation[ ref2 ] = show ? margin : distance + margin;
- }
-
- // start at 0 if we are showing
- if ( show ) {
- wrapper.css( ref, 0 );
- if ( !motion ) {
- wrapper.css( ref2, margin + distance );
- }
- }
-
- // Animate
- wrapper.animate( animation, {
- duration: o.duration,
- easing: o.easing,
- queue: false,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Bounce 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/bounce-effect/
- */
-
-
-var effectBounce = $.effects.effect.bounce = function( o, done ) {
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
-
- // defaults:
- mode = $.effects.setMode( el, o.mode || "effect" ),
- hide = mode === "hide",
- show = mode === "show",
- direction = o.direction || "up",
- distance = o.distance,
- times = o.times || 5,
-
- // number of internal animations
- anims = times * 2 + ( show || hide ? 1 : 0 ),
- speed = o.duration / anims,
- easing = o.easing,
-
- // utility:
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ),
- i,
- upAnim,
- downAnim,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- // Avoid touching opacity to prevent clearType and PNG issues in IE
- if ( show || hide ) {
- props.push( "opacity" );
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el ); // Create Wrapper
-
- // default distance for the BIGGEST bounce is the outer Distance / 3
- if ( !distance ) {
- distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
- }
-
- if ( show ) {
- downAnim = { opacity: 1 };
- downAnim[ ref ] = 0;
-
- // if we are showing, force opacity 0 and set the initial position
- // then do the "first" animation
- el.css( "opacity", 0 )
- .css( ref, motion ? -distance * 2 : distance * 2 )
- .animate( downAnim, speed, easing );
- }
-
- // start at the smallest distance if we are hiding
- if ( hide ) {
- distance = distance / Math.pow( 2, times - 1 );
- }
-
- downAnim = {};
- downAnim[ ref ] = 0;
- // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
- for ( i = 0; i < times; i++ ) {
- upAnim = {};
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing )
- .animate( downAnim, speed, easing );
-
- distance = hide ? distance * 2 : distance / 2;
- }
-
- // Last Bounce when Hiding
- if ( hide ) {
- upAnim = { opacity: 0 };
- upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
-
- el.animate( upAnim, speed, easing );
- }
-
- el.queue(function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-
-/*!
- * jQuery UI Effects Clip 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/clip-effect/
- */
-
-
-var effectClip = $.effects.effect.clip = function( o, done ) {
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "vertical",
- vert = direction === "vertical",
- size = vert ? "height" : "width",
- position = vert ? "top" : "left",
- animation = {},
- wrapper, animate, distance;
-
- // Save & Show
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
- distance = animate[ size ]();
-
- // Shift
- if ( show ) {
- animate.css( size, 0 );
- animate.css( position, distance / 2 );
- }
-
- // Create Animation Object:
- animation[ size ] = show ? distance : 0;
- animation[ position ] = show ? 0 : distance / 2;
-
- // Animate
- animate.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( !show ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-
-/*!
- * jQuery UI Effects Drop 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/drop-effect/
- */
-
-
-var effectDrop = $.effects.effect.drop = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
- motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
- animation = {
- opacity: show ? 1 : 0
- },
- distance;
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
-
- if ( show ) {
- el
- .css( "opacity", 0 )
- .css( ref, motion === "pos" ? -distance : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) ) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Explode 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/explode-effect/
- */
-
-
-var effectExplode = $.effects.effect.explode = function( o, done ) {
-
- var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
- cells = rows,
- el = $( this ),
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
-
- // show and then visibility:hidden the element before calculating offset
- offset = el.show().css( "visibility", "hidden" ).offset(),
-
- // width and height of a piece
- width = Math.ceil( el.outerWidth() / cells ),
- height = Math.ceil( el.outerHeight() / rows ),
- pieces = [],
-
- // loop
- i, j, left, top, mx, my;
-
- // children animate complete:
- function childComplete() {
- pieces.push( this );
- if ( pieces.length === rows * cells ) {
- animComplete();
- }
- }
-
- // clone the element for each row and cell.
- for ( i = 0; i < rows ; i++ ) { // ===>
- top = offset.top + i * height;
- my = i - ( rows - 1 ) / 2 ;
-
- for ( j = 0; j < cells ; j++ ) { // |||
- left = offset.left + j * width;
- mx = j - ( cells - 1 ) / 2 ;
-
- // Create a clone of the now hidden main element that will be absolute positioned
- // within a wrapper div off the -left and -top equal to size of our pieces
- el
- .clone()
- .appendTo( "body" )
- .wrap( "<div></div>" )
- .css({
- position: "absolute",
- visibility: "visible",
- left: -j * width,
- top: -i * height
- })
-
- // select the wrapper - make it overflow: hidden and absolute positioned based on
- // where the original was located +left and +top equal to the size of pieces
- .parent()
- .addClass( "ui-effects-explode" )
- .css({
- position: "absolute",
- overflow: "hidden",
- width: width,
- height: height,
- left: left + ( show ? mx * width : 0 ),
- top: top + ( show ? my * height : 0 ),
- opacity: show ? 0 : 1
- }).animate({
- left: left + ( show ? 0 : mx * width ),
- top: top + ( show ? 0 : my * height ),
- opacity: show ? 1 : 0
- }, o.duration || 500, o.easing, childComplete );
- }
- }
-
- function animComplete() {
- el.css({
- visibility: "visible"
- });
- $( pieces ).remove();
- if ( !show ) {
- el.hide();
- }
- done();
- }
-};
-
-
-/*!
- * jQuery UI Effects Fade 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/fade-effect/
- */
-
-
-var effectFade = $.effects.effect.fade = function( o, done ) {
- var el = $( this ),
- mode = $.effects.setMode( el, o.mode || "toggle" );
-
- el.animate({
- opacity: mode
- }, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: done
- });
-};
-
-
-/*!
- * jQuery UI Effects Fold 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/fold-effect/
- */
-
-
-var effectFold = $.effects.effect.fold = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "hide" ),
- show = mode === "show",
- hide = mode === "hide",
- size = o.size || 15,
- percent = /([0-9]+)%/.exec( size ),
- horizFirst = !!o.horizFirst,
- widthFirst = show !== horizFirst,
- ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
- duration = o.duration / 2,
- wrapper, distance,
- animation1 = {},
- animation2 = {};
-
- $.effects.save( el, props );
- el.show();
-
- // Create Wrapper
- wrapper = $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
- distance = widthFirst ?
- [ wrapper.width(), wrapper.height() ] :
- [ wrapper.height(), wrapper.width() ];
-
- if ( percent ) {
- size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
- }
- if ( show ) {
- wrapper.css( horizFirst ? {
- height: 0,
- width: size
- } : {
- height: size,
- width: 0
- });
- }
-
- // Animation
- animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
- animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
-
- // Animate
- wrapper
- .animate( animation1, duration, o.easing )
- .animate( animation2, duration, o.easing, function() {
- if ( hide ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
-};
-
-
-/*!
- * jQuery UI Effects Highlight 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/highlight-effect/
- */
-
-
-var effectHighlight = $.effects.effect.highlight = function( o, done ) {
- var elem = $( this ),
- props = [ "backgroundImage", "backgroundColor", "opacity" ],
- mode = $.effects.setMode( elem, o.mode || "show" ),
- animation = {
- backgroundColor: elem.css( "backgroundColor" )
- };
-
- if (mode === "hide") {
- animation.opacity = 0;
- }
-
- $.effects.save( elem, props );
-
- elem
- .show()
- .css({
- backgroundImage: "none",
- backgroundColor: o.color || "#ffff99"
- })
- .animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- elem.hide();
- }
- $.effects.restore( elem, props );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Size 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/size-effect/
- */
-
-
-var effectSize = $.effects.effect.size = function( o, done ) {
-
- // Create element
- var original, baseline, factor,
- el = $( this ),
- props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
-
- // Always restore
- props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
-
- // Copy for children
- props2 = [ "width", "height", "overflow" ],
- cProps = [ "fontSize" ],
- vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
- hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
-
- // Set options
- mode = $.effects.setMode( el, o.mode || "effect" ),
- restore = o.restore || mode !== "effect",
- scale = o.scale || "both",
- origin = o.origin || [ "middle", "center" ],
- position = el.css( "position" ),
- props = restore ? props0 : props1,
- zero = {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- };
-
- if ( mode === "show" ) {
- el.show();
- }
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- };
-
- if ( o.mode === "toggle" && mode === "show" ) {
- el.from = o.to || zero;
- el.to = o.from || original;
- } else {
- el.from = o.from || ( mode === "show" ? zero : original );
- el.to = o.to || ( mode === "hide" ? zero : original );
- }
-
- // Set scaling factor
- factor = {
- from: {
- y: el.from.height / original.height,
- x: el.from.width / original.width
- },
- to: {
- y: el.to.height / original.height,
- x: el.to.width / original.width
- }
- };
-
- // Scale the css box
- if ( scale === "box" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( vProps );
- el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- props = props.concat( hProps );
- el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
- el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- }
- }
-
- // Scale the content
- if ( scale === "content" || scale === "both" ) {
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- props = props.concat( cProps ).concat( props2 );
- el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
- el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- }
- }
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
- el.css( "overflow", "hidden" ).css( el.from );
-
- // Adjust
- if (origin) { // Calculate baseline shifts
- baseline = $.effects.getBaseline( origin, original );
- el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
- el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
- el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
- el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
- }
- el.css( el.from ); // set top & left
-
- // Animate
- if ( scale === "content" || scale === "both" ) { // Scale the children
-
- // Add margins/font-size
- vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
- hProps = hProps.concat([ "marginLeft", "marginRight" ]);
- props2 = props0.concat(vProps).concat(hProps);
-
- el.find( "*[width]" ).each( function() {
- var child = $( this ),
- c_original = {
- height: child.height(),
- width: child.width(),
- outerHeight: child.outerHeight(),
- outerWidth: child.outerWidth()
- };
- if (restore) {
- $.effects.save(child, props2);
- }
-
- child.from = {
- height: c_original.height * factor.from.y,
- width: c_original.width * factor.from.x,
- outerHeight: c_original.outerHeight * factor.from.y,
- outerWidth: c_original.outerWidth * factor.from.x
- };
- child.to = {
- height: c_original.height * factor.to.y,
- width: c_original.width * factor.to.x,
- outerHeight: c_original.height * factor.to.y,
- outerWidth: c_original.width * factor.to.x
- };
-
- // Vertical props scaling
- if ( factor.from.y !== factor.to.y ) {
- child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
- child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- }
-
- // Horizontal props scaling
- if ( factor.from.x !== factor.to.x ) {
- child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
- child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- }
-
- // Animate children
- child.css( child.from );
- child.animate( child.to, o.duration, o.easing, function() {
-
- // Restore children
- if ( restore ) {
- $.effects.restore( child, props2 );
- }
- });
- });
- }
-
- // Animate
- el.animate( el.to, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( el.to.opacity === 0 ) {
- el.css( "opacity", el.from.opacity );
- }
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- if ( !restore ) {
-
- // we need to calculate our new positioning based on the scaling
- if ( position === "static" ) {
- el.css({
- position: "relative",
- top: el.to.top,
- left: el.to.left
- });
- } else {
- $.each([ "top", "left" ], function( idx, pos ) {
- el.css( pos, function( _, str ) {
- var val = parseInt( str, 10 ),
- toRef = idx ? el.to.left : el.to.top;
-
- // if original was "auto", recalculate the new value from wrapper
- if ( str === "auto" ) {
- return toRef + "px";
- }
-
- return val + toRef + "px";
- });
- });
- }
- }
-
- $.effects.removeWrapper( el );
- done();
- }
- });
-
-};
-
-
-/*!
- * jQuery UI Effects Scale 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/scale-effect/
- */
-
-
-var effectScale = $.effects.effect.scale = function( o, done ) {
-
- // Create element
- var el = $( this ),
- options = $.extend( true, {}, o ),
- mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) ||
- ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
- direction = o.direction || "both",
- origin = o.origin,
- original = {
- height: el.height(),
- width: el.width(),
- outerHeight: el.outerHeight(),
- outerWidth: el.outerWidth()
- },
- factor = {
- y: direction !== "horizontal" ? (percent / 100) : 1,
- x: direction !== "vertical" ? (percent / 100) : 1
- };
-
- // We are going to pass this effect to the size effect:
- options.effect = "size";
- options.queue = false;
- options.complete = done;
-
- // Set default origin and restore for show/hide
- if ( mode !== "effect" ) {
- options.origin = origin || [ "middle", "center" ];
- options.restore = true;
- }
-
- options.from = o.from || ( mode === "show" ? {
- height: 0,
- width: 0,
- outerHeight: 0,
- outerWidth: 0
- } : original );
- options.to = {
- height: original.height * factor.y,
- width: original.width * factor.x,
- outerHeight: original.outerHeight * factor.y,
- outerWidth: original.outerWidth * factor.x
- };
-
- // Fade option to support puff
- if ( options.fade ) {
- if ( mode === "show" ) {
- options.from.opacity = 0;
- options.to.opacity = 1;
- }
- if ( mode === "hide" ) {
- options.from.opacity = 1;
- options.to.opacity = 0;
- }
- }
-
- // Animate
- el.effect( options );
-
-};
-
-
-/*!
- * jQuery UI Effects Puff 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/puff-effect/
- */
-
-
-var effectPuff = $.effects.effect.puff = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "hide" ),
- hide = mode === "hide",
- percent = parseInt( o.percent, 10 ) || 150,
- factor = percent / 100,
- original = {
- height: elem.height(),
- width: elem.width(),
- outerHeight: elem.outerHeight(),
- outerWidth: elem.outerWidth()
- };
-
- $.extend( o, {
- effect: "scale",
- queue: false,
- fade: true,
- mode: mode,
- complete: done,
- percent: hide ? percent : 100,
- from: hide ?
- original :
- {
- height: original.height * factor,
- width: original.width * factor,
- outerHeight: original.outerHeight * factor,
- outerWidth: original.outerWidth * factor
- }
- });
-
- elem.effect( o );
-};
-
-
-/*!
- * jQuery UI Effects Pulsate 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/pulsate-effect/
- */
-
-
-var effectPulsate = $.effects.effect.pulsate = function( o, done ) {
- var elem = $( this ),
- mode = $.effects.setMode( elem, o.mode || "show" ),
- show = mode === "show",
- hide = mode === "hide",
- showhide = ( show || mode === "hide" ),
-
- // showing or hiding leaves of the "last" animation
- anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
- duration = o.duration / anims,
- animateTo = 0,
- queue = elem.queue(),
- queuelen = queue.length,
- i;
-
- if ( show || !elem.is(":visible")) {
- elem.css( "opacity", 0 ).show();
- animateTo = 1;
- }
-
- // anims - 1 opacity "toggles"
- for ( i = 1; i < anims; i++ ) {
- elem.animate({
- opacity: animateTo
- }, duration, o.easing );
- animateTo = 1 - animateTo;
- }
-
- elem.animate({
- opacity: animateTo
- }, duration, o.easing);
-
- elem.queue(function() {
- if ( hide ) {
- elem.hide();
- }
- done();
- });
-
- // We just queued up "anims" animations, we need to put them next in the queue
- if ( queuelen > 1 ) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- elem.dequeue();
-};
-
-
-/*!
- * jQuery UI Effects Shake 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/shake-effect/
- */
-
-
-var effectShake = $.effects.effect.shake = function( o, done ) {
-
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
- mode = $.effects.setMode( el, o.mode || "effect" ),
- direction = o.direction || "left",
- distance = o.distance || 20,
- times = o.times || 3,
- anims = times * 2 + 1,
- speed = Math.round( o.duration / anims ),
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- animation = {},
- animation1 = {},
- animation2 = {},
- i,
-
- // we will need to re-assemble the queue to stack our animations in place
- queue = el.queue(),
- queuelen = queue.length;
-
- $.effects.save( el, props );
- el.show();
- $.effects.createWrapper( el );
-
- // Animation
- animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
- animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
- animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
-
- // Animate
- el.animate( animation, speed, o.easing );
-
- // Shakes
- for ( i = 1; i < times; i++ ) {
- el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- }
- el
- .animate( animation1, speed, o.easing )
- .animate( animation, speed / 2, o.easing )
- .queue(function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- });
-
- // inject all the animations we just queued to be first in line (after "inprogress")
- if ( queuelen > 1) {
- queue.splice.apply( queue,
- [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
- }
- el.dequeue();
-
-};
-
-
-/*!
- * jQuery UI Effects Slide 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/slide-effect/
- */
-
-
-var effectSlide = $.effects.effect.slide = function( o, done ) {
-
- // Create element
- var el = $( this ),
- props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
- mode = $.effects.setMode( el, o.mode || "show" ),
- show = mode === "show",
- direction = o.direction || "left",
- ref = (direction === "up" || direction === "down") ? "top" : "left",
- positiveMotion = (direction === "up" || direction === "left"),
- distance,
- animation = {};
-
- // Adjust
- $.effects.save( el, props );
- el.show();
- distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
-
- $.effects.createWrapper( el ).css({
- overflow: "hidden"
- });
-
- if ( show ) {
- el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
- }
-
- // Animation
- animation[ ref ] = ( show ?
- ( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+=")) +
- distance;
-
- // Animate
- el.animate( animation, {
- queue: false,
- duration: o.duration,
- easing: o.easing,
- complete: function() {
- if ( mode === "hide" ) {
- el.hide();
- }
- $.effects.restore( el, props );
- $.effects.removeWrapper( el );
- done();
- }
- });
-};
-
-
-/*!
- * jQuery UI Effects Transfer 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/transfer-effect/
- */
-
-
-var effectTransfer = $.effects.effect.transfer = function( o, done ) {
- var elem = $( this ),
- target = $( o.to ),
- targetFixed = target.css( "position" ) === "fixed",
- body = $("body"),
- fixTop = targetFixed ? body.scrollTop() : 0,
- fixLeft = targetFixed ? body.scrollLeft() : 0,
- endPosition = target.offset(),
- animation = {
- top: endPosition.top - fixTop,
- left: endPosition.left - fixLeft,
- height: target.innerHeight(),
- width: target.innerWidth()
- },
- startPosition = elem.offset(),
- transfer = $( "<div class='ui-effects-transfer'></div>" )
- .appendTo( document.body )
- .addClass( o.className )
- .css({
- top: startPosition.top - fixTop,
- left: startPosition.left - fixLeft,
- height: elem.innerHeight(),
- width: elem.innerWidth(),
- position: targetFixed ? "fixed" : "absolute"
- })
- .animate( animation, o.duration, o.easing, function() {
- transfer.remove();
- done();
- });
-};
-
-
-/*!
- * jQuery UI Progressbar 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/progressbar/
- */
-
-
-var progressbar = $.widget( "ui.progressbar", {
- version: "1.11.4",
- options: {
- max: 100,
- value: 0,
-
- change: null,
- complete: null
- },
-
- min: 0,
-
- _create: function() {
- // Constrain initial value
- this.oldValue = this.options.value = this._constrainedValue();
-
- this.element
- .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .attr({
- // Only set static values, aria-valuenow and aria-valuemax are
- // set inside _refreshValue()
- role: "progressbar",
- "aria-valuemin": this.min
- });
-
- this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
- .appendTo( this.element );
-
- this._refreshValue();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
-
- this.valueDiv.remove();
- },
-
- value: function( newValue ) {
- if ( newValue === undefined ) {
- return this.options.value;
- }
-
- this.options.value = this._constrainedValue( newValue );
- this._refreshValue();
- },
-
- _constrainedValue: function( newValue ) {
- if ( newValue === undefined ) {
- newValue = this.options.value;
- }
-
- this.indeterminate = newValue === false;
-
- // sanitize value
- if ( typeof newValue !== "number" ) {
- newValue = 0;
- }
-
- return this.indeterminate ? false :
- Math.min( this.options.max, Math.max( this.min, newValue ) );
- },
-
- _setOptions: function( options ) {
- // Ensure "value" option is set after other values (like max)
- var value = options.value;
- delete options.value;
-
- this._super( options );
-
- this.options.value = this._constrainedValue( value );
- this._refreshValue();
- },
-
- _setOption: function( key, value ) {
- if ( key === "max" ) {
- // Don't allow a max less than min
- value = Math.max( this.min, value );
- }
- if ( key === "disabled" ) {
- this.element
- .toggleClass( "ui-state-disabled", !!value )
- .attr( "aria-disabled", value );
- }
- this._super( key, value );
- },
-
- _percentage: function() {
- return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
- },
-
- _refreshValue: function() {
- var value = this.options.value,
- percentage = this._percentage();
-
- this.valueDiv
- .toggle( this.indeterminate || value > this.min )
- .toggleClass( "ui-corner-right", value === this.options.max )
- .width( percentage.toFixed(0) + "%" );
-
- this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
-
- if ( this.indeterminate ) {
- this.element.removeAttr( "aria-valuenow" );
- if ( !this.overlayDiv ) {
- this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
- }
- } else {
- this.element.attr({
- "aria-valuemax": this.options.max,
- "aria-valuenow": value
- });
- if ( this.overlayDiv ) {
- this.overlayDiv.remove();
- this.overlayDiv = null;
- }
- }
-
- if ( this.oldValue !== value ) {
- this.oldValue = value;
- this._trigger( "change" );
- }
- if ( value === this.options.max ) {
- this._trigger( "complete" );
- }
- }
-});
-
-
-/*!
- * jQuery UI Selectable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/selectable/
- */
-
-
-var selectable = $.widget("ui.selectable", $.ui.mouse, {
- version: "1.11.4",
- options: {
- appendTo: "body",
- autoRefresh: true,
- distance: 0,
- filter: "*",
- tolerance: "touch",
-
- // callbacks
- selected: null,
- selecting: null,
- start: null,
- stop: null,
- unselected: null,
- unselecting: null
- },
- _create: function() {
- var selectees,
- that = this;
-
- this.element.addClass("ui-selectable");
-
- this.dragged = false;
-
- // cache selectee children based on filter
- this.refresh = function() {
- selectees = $(that.options.filter, that.element[0]);
- selectees.addClass("ui-selectee");
- selectees.each(function() {
- var $this = $(this),
- pos = $this.offset();
- $.data(this, "selectable-item", {
- element: this,
- $element: $this,
- left: pos.left,
- top: pos.top,
- right: pos.left + $this.outerWidth(),
- bottom: pos.top + $this.outerHeight(),
- startselected: false,
- selected: $this.hasClass("ui-selected"),
- selecting: $this.hasClass("ui-selecting"),
- unselecting: $this.hasClass("ui-unselecting")
- });
- });
- };
- this.refresh();
-
- this.selectees = selectees.addClass("ui-selectee");
-
- this._mouseInit();
-
- this.helper = $("<div class='ui-selectable-helper'></div>");
- },
-
- _destroy: function() {
- this.selectees
- .removeClass("ui-selectee")
- .removeData("selectable-item");
- this.element
- .removeClass("ui-selectable ui-selectable-disabled");
- this._mouseDestroy();
- },
-
- _mouseStart: function(event) {
- var that = this,
- options = this.options;
-
- this.opos = [ event.pageX, event.pageY ];
-
- if (this.options.disabled) {
- return;
- }
-
- this.selectees = $(options.filter, this.element[0]);
-
- this._trigger("start", event);
-
- $(options.appendTo).append(this.helper);
- // position helper (lasso)
- this.helper.css({
- "left": event.pageX,
- "top": event.pageY,
- "width": 0,
- "height": 0
- });
-
- if (options.autoRefresh) {
- this.refresh();
- }
-
- this.selectees.filter(".ui-selected").each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.startselected = true;
- if (!event.metaKey && !event.ctrlKey) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- });
-
- $(event.target).parents().addBack().each(function() {
- var doSelect,
- selectee = $.data(this, "selectable-item");
- if (selectee) {
- doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
- selectee.$element
- .removeClass(doSelect ? "ui-unselecting" : "ui-selected")
- .addClass(doSelect ? "ui-selecting" : "ui-unselecting");
- selectee.unselecting = !doSelect;
- selectee.selecting = doSelect;
- selectee.selected = doSelect;
- // selectable (UN)SELECTING callback
- if (doSelect) {
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- } else {
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- return false;
- }
- });
-
- },
-
- _mouseDrag: function(event) {
-
- this.dragged = true;
-
- if (this.options.disabled) {
- return;
- }
-
- var tmp,
- that = this,
- options = this.options,
- x1 = this.opos[0],
- y1 = this.opos[1],
- x2 = event.pageX,
- y2 = event.pageY;
-
- if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
- if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
- this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 });
-
- this.selectees.each(function() {
- var selectee = $.data(this, "selectable-item"),
- hit = false;
-
- //prevent helper from being selected if appendTo: selectable
- if (!selectee || selectee.element === that.element[0]) {
- return;
- }
-
- if (options.tolerance === "touch") {
- hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
- } else if (options.tolerance === "fit") {
- hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
- }
-
- if (hit) {
- // SELECT
- if (selectee.selected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
- }
- if (selectee.unselecting) {
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- }
- if (!selectee.selecting) {
- selectee.$element.addClass("ui-selecting");
- selectee.selecting = true;
- // selectable SELECTING callback
- that._trigger("selecting", event, {
- selecting: selectee.element
- });
- }
- } else {
- // UNSELECT
- if (selectee.selecting) {
- if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- selectee.$element.addClass("ui-selected");
- selectee.selected = true;
- } else {
- selectee.$element.removeClass("ui-selecting");
- selectee.selecting = false;
- if (selectee.startselected) {
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- }
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- if (selectee.selected) {
- if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
- selectee.$element.removeClass("ui-selected");
- selectee.selected = false;
-
- selectee.$element.addClass("ui-unselecting");
- selectee.unselecting = true;
- // selectable UNSELECTING callback
- that._trigger("unselecting", event, {
- unselecting: selectee.element
- });
- }
- }
- }
- });
-
- return false;
- },
-
- _mouseStop: function(event) {
- var that = this;
-
- this.dragged = false;
-
- $(".ui-unselecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-unselecting");
- selectee.unselecting = false;
- selectee.startselected = false;
- that._trigger("unselected", event, {
- unselected: selectee.element
- });
- });
- $(".ui-selecting", this.element[0]).each(function() {
- var selectee = $.data(this, "selectable-item");
- selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
- selectee.selecting = false;
- selectee.selected = true;
- selectee.startselected = true;
- that._trigger("selected", event, {
- selected: selectee.element
- });
- });
- this._trigger("stop", event);
-
- this.helper.remove();
-
- return false;
- }
-
-});
-
-
-/*!
- * jQuery UI Selectmenu 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/selectmenu
- */
-
-
-var selectmenu = $.widget( "ui.selectmenu", {
- version: "1.11.4",
- defaultElement: "<select>",
- options: {
- appendTo: null,
- disabled: null,
- icons: {
- button: "ui-icon-triangle-1-s"
- },
- position: {
- my: "left top",
- at: "left bottom",
- collision: "none"
- },
- width: null,
-
- // callbacks
- change: null,
- close: null,
- focus: null,
- open: null,
- select: null
- },
-
- _create: function() {
- var selectmenuId = this.element.uniqueId().attr( "id" );
- this.ids = {
- element: selectmenuId,
- button: selectmenuId + "-button",
- menu: selectmenuId + "-menu"
- };
-
- this._drawButton();
- this._drawMenu();
-
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _drawButton: function() {
- var that = this;
-
- // Associate existing label with the new button
- this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button );
- this._on( this.label, {
- click: function( event ) {
- this.button.focus();
- event.preventDefault();
- }
- });
-
- // Hide original select element
- this.element.hide();
-
- // Create button
- this.button = $( "<span>", {
- "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all",
- tabindex: this.options.disabled ? -1 : 0,
- id: this.ids.button,
- role: "combobox",
- "aria-expanded": "false",
- "aria-autocomplete": "list",
- "aria-owns": this.ids.menu,
- "aria-haspopup": "true"
- })
- .insertAfter( this.element );
-
- $( "<span>", {
- "class": "ui-icon " + this.options.icons.button
- })
- .prependTo( this.button );
-
- this.buttonText = $( "<span>", {
- "class": "ui-selectmenu-text"
- })
- .appendTo( this.button );
-
- this._setText( this.buttonText, this.element.find( "option:selected" ).text() );
- this._resizeButton();
-
- this._on( this.button, this._buttonEvents );
- this.button.one( "focusin", function() {
-
- // Delay rendering the menu items until the button receives focus.
- // The menu may have already been rendered via a programmatic open.
- if ( !that.menuItems ) {
- that._refreshMenu();
- }
- });
- this._hoverable( this.button );
- this._focusable( this.button );
- },
-
- _drawMenu: function() {
- var that = this;
-
- // Create menu
- this.menu = $( "<ul>", {
- "aria-hidden": "true",
- "aria-labelledby": this.ids.button,
- id: this.ids.menu
- });
-
- // Wrap menu
- this.menuWrap = $( "<div>", {
- "class": "ui-selectmenu-menu ui-front"
- })
- .append( this.menu )
- .appendTo( this._appendTo() );
-
- // Initialize menu widget
- this.menuInstance = this.menu
- .menu({
- role: "listbox",
- select: function( event, ui ) {
- event.preventDefault();
-
- // support: IE8
- // If the item was selected via a click, the text selection
- // will be destroyed in IE
- that._setSelection();
-
- that._select( ui.item.data( "ui-selectmenu-item" ), event );
- },
- focus: function( event, ui ) {
- var item = ui.item.data( "ui-selectmenu-item" );
-
- // Prevent inital focus from firing and check if its a newly focused item
- if ( that.focusIndex != null && item.index !== that.focusIndex ) {
- that._trigger( "focus", event, { item: item } );
- if ( !that.isOpen ) {
- that._select( item, event );
- }
- }
- that.focusIndex = item.index;
-
- that.button.attr( "aria-activedescendant",
- that.menuItems.eq( item.index ).attr( "id" ) );
- }
- })
- .menu( "instance" );
-
- // Adjust menu styles to dropdown
- this.menu
- .addClass( "ui-corner-bottom" )
- .removeClass( "ui-corner-all" );
-
- // Don't close the menu on mouseleave
- this.menuInstance._off( this.menu, "mouseleave" );
-
- // Cancel the menu's collapseAll on document click
- this.menuInstance._closeOnDocumentClick = function() {
- return false;
- };
-
- // Selects often contain empty items, but never contain dividers
- this.menuInstance._isDivider = function() {
- return false;
- };
- },
-
- refresh: function() {
- this._refreshMenu();
- this._setText( this.buttonText, this._getSelectedItem().text() );
- if ( !this.options.width ) {
- this._resizeButton();
- }
- },
-
- _refreshMenu: function() {
- this.menu.empty();
-
- var item,
- options = this.element.find( "option" );
-
- if ( !options.length ) {
- return;
- }
-
- this._parseOptions( options );
- this._renderMenu( this.menu, this.items );
-
- this.menuInstance.refresh();
- this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" );
-
- item = this._getSelectedItem();
-
- // Update the menu to have the correct item focused
- this.menuInstance.focus( null, item );
- this._setAria( item.data( "ui-selectmenu-item" ) );
-
- // Set disabled state
- this._setOption( "disabled", this.element.prop( "disabled" ) );
- },
-
- open: function( event ) {
- if ( this.options.disabled ) {
- return;
- }
-
- // If this is the first time the menu is being opened, render the items
- if ( !this.menuItems ) {
- this._refreshMenu();
- } else {
-
- // Menu clears focus on close, reset focus to selected item
- this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" );
- this.menuInstance.focus( null, this._getSelectedItem() );
- }
-
- this.isOpen = true;
- this._toggleAttr();
- this._resizeMenu();
- this._position();
-
- this._on( this.document, this._documentClick );
-
- this._trigger( "open", event );
- },
-
- _position: function() {
- this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
- },
-
- close: function( event ) {
- if ( !this.isOpen ) {
- return;
- }
-
- this.isOpen = false;
- this._toggleAttr();
-
- this.range = null;
- this._off( this.document );
-
- this._trigger( "close", event );
- },
-
- widget: function() {
- return this.button;
- },
-
- menuWidget: function() {
- return this.menu;
- },
-
- _renderMenu: function( ul, items ) {
- var that = this,
- currentOptgroup = "";
-
- $.each( items, function( index, item ) {
- if ( item.optgroup !== currentOptgroup ) {
- $( "<li>", {
- "class": "ui-selectmenu-optgroup ui-menu-divider" +
- ( item.element.parent( "optgroup" ).prop( "disabled" ) ?
- " ui-state-disabled" :
- "" ),
- text: item.optgroup
- })
- .appendTo( ul );
-
- currentOptgroup = item.optgroup;
- }
-
- that._renderItemData( ul, item );
- });
- },
-
- _renderItemData: function( ul, item ) {
- return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
- },
-
- _renderItem: function( ul, item ) {
- var li = $( "<li>" );
-
- if ( item.disabled ) {
- li.addClass( "ui-state-disabled" );
- }
- this._setText( li, item.label );
-
- return li.appendTo( ul );
- },
-
- _setText: function( element, value ) {
- if ( value ) {
- element.text( value );
- } else {
- element.html( "&#160;" );
- }
- },
-
- _move: function( direction, event ) {
- var item, next,
- filter = ".ui-menu-item";
-
- if ( this.isOpen ) {
- item = this.menuItems.eq( this.focusIndex );
- } else {
- item = this.menuItems.eq( this.element[ 0 ].selectedIndex );
- filter += ":not(.ui-state-disabled)";
- }
-
- if ( direction === "first" || direction === "last" ) {
- next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
- } else {
- next = item[ direction + "All" ]( filter ).eq( 0 );
- }
-
- if ( next.length ) {
- this.menuInstance.focus( event, next );
- }
- },
-
- _getSelectedItem: function() {
- return this.menuItems.eq( this.element[ 0 ].selectedIndex );
- },
-
- _toggle: function( event ) {
- this[ this.isOpen ? "close" : "open" ]( event );
- },
-
- _setSelection: function() {
- var selection;
-
- if ( !this.range ) {
- return;
- }
-
- if ( window.getSelection ) {
- selection = window.getSelection();
- selection.removeAllRanges();
- selection.addRange( this.range );
-
- // support: IE8
- } else {
- this.range.select();
- }
-
- // support: IE
- // Setting the text selection kills the button focus in IE, but
- // restoring the focus doesn't kill the selection.
- this.button.focus();
- },
-
- _documentClick: {
- mousedown: function( event ) {
- if ( !this.isOpen ) {
- return;
- }
-
- if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) {
- this.close( event );
- }
- }
- },
-
- _buttonEvents: {
-
- // Prevent text selection from being reset when interacting with the selectmenu (#10144)
- mousedown: function() {
- var selection;
-
- if ( window.getSelection ) {
- selection = window.getSelection();
- if ( selection.rangeCount ) {
- this.range = selection.getRangeAt( 0 );
- }
-
- // support: IE8
- } else {
- this.range = document.selection.createRange();
- }
- },
-
- click: function( event ) {
- this._setSelection();
- this._toggle( event );
- },
-
- keydown: function( event ) {
- var preventDefault = true;
- switch ( event.keyCode ) {
- case $.ui.keyCode.TAB:
- case $.ui.keyCode.ESCAPE:
- this.close( event );
- preventDefault = false;
- break;
- case $.ui.keyCode.ENTER:
- if ( this.isOpen ) {
- this._selectFocusedItem( event );
- }
- break;
- case $.ui.keyCode.UP:
- if ( event.altKey ) {
- this._toggle( event );
- } else {
- this._move( "prev", event );
- }
- break;
- case $.ui.keyCode.DOWN:
- if ( event.altKey ) {
- this._toggle( event );
- } else {
- this._move( "next", event );
- }
- break;
- case $.ui.keyCode.SPACE:
- if ( this.isOpen ) {
- this._selectFocusedItem( event );
- } else {
- this._toggle( event );
- }
- break;
- case $.ui.keyCode.LEFT:
- this._move( "prev", event );
- break;
- case $.ui.keyCode.RIGHT:
- this._move( "next", event );
- break;
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.PAGE_UP:
- this._move( "first", event );
- break;
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_DOWN:
- this._move( "last", event );
- break;
- default:
- this.menu.trigger( event );
- preventDefault = false;
- }
-
- if ( preventDefault ) {
- event.preventDefault();
- }
- }
- },
-
- _selectFocusedItem: function( event ) {
- var item = this.menuItems.eq( this.focusIndex );
- if ( !item.hasClass( "ui-state-disabled" ) ) {
- this._select( item.data( "ui-selectmenu-item" ), event );
- }
- },
-
- _select: function( item, event ) {
- var oldIndex = this.element[ 0 ].selectedIndex;
-
- // Change native select element
- this.element[ 0 ].selectedIndex = item.index;
- this._setText( this.buttonText, item.label );
- this._setAria( item );
- this._trigger( "select", event, { item: item } );
-
- if ( item.index !== oldIndex ) {
- this._trigger( "change", event, { item: item } );
- }
-
- this.close( event );
- },
-
- _setAria: function( item ) {
- var id = this.menuItems.eq( item.index ).attr( "id" );
-
- this.button.attr({
- "aria-labelledby": id,
- "aria-activedescendant": id
- });
- this.menu.attr( "aria-activedescendant", id );
- },
-
- _setOption: function( key, value ) {
- if ( key === "icons" ) {
- this.button.find( "span.ui-icon" )
- .removeClass( this.options.icons.button )
- .addClass( value.button );
- }
-
- this._super( key, value );
-
- if ( key === "appendTo" ) {
- this.menuWrap.appendTo( this._appendTo() );
- }
-
- if ( key === "disabled" ) {
- this.menuInstance.option( "disabled", value );
- this.button
- .toggleClass( "ui-state-disabled", value )
- .attr( "aria-disabled", value );
-
- this.element.prop( "disabled", value );
- if ( value ) {
- this.button.attr( "tabindex", -1 );
- this.close();
- } else {
- this.button.attr( "tabindex", 0 );
- }
- }
-
- if ( key === "width" ) {
- this._resizeButton();
- }
- },
-
- _appendTo: function() {
- var element = this.options.appendTo;
-
- if ( element ) {
- element = element.jquery || element.nodeType ?
- $( element ) :
- this.document.find( element ).eq( 0 );
- }
-
- if ( !element || !element[ 0 ] ) {
- element = this.element.closest( ".ui-front" );
- }
-
- if ( !element.length ) {
- element = this.document[ 0 ].body;
- }
-
- return element;
- },
-
- _toggleAttr: function() {
- this.button
- .toggleClass( "ui-corner-top", this.isOpen )
- .toggleClass( "ui-corner-all", !this.isOpen )
- .attr( "aria-expanded", this.isOpen );
- this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen );
- this.menu.attr( "aria-hidden", !this.isOpen );
- },
-
- _resizeButton: function() {
- var width = this.options.width;
-
- if ( !width ) {
- width = this.element.show().outerWidth();
- this.element.hide();
- }
-
- this.button.outerWidth( width );
- },
-
- _resizeMenu: function() {
- this.menu.outerWidth( Math.max(
- this.button.outerWidth(),
-
- // support: IE10
- // IE10 wraps long text (possibly a rounding bug)
- // so we add 1px to avoid the wrapping
- this.menu.width( "" ).outerWidth() + 1
- ) );
- },
-
- _getCreateOptions: function() {
- return { disabled: this.element.prop( "disabled" ) };
- },
-
- _parseOptions: function( options ) {
- var data = [];
- options.each(function( index, item ) {
- var option = $( item ),
- optgroup = option.parent( "optgroup" );
- data.push({
- element: option,
- index: index,
- value: option.val(),
- label: option.text(),
- optgroup: optgroup.attr( "label" ) || "",
- disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
- });
- });
- this.items = data;
- },
-
- _destroy: function() {
- this.menuWrap.remove();
- this.button.remove();
- this.element.show();
- this.element.removeUniqueId();
- this.label.attr( "for", this.ids.element );
- }
-});
-
-
-/*!
- * jQuery UI Slider 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/slider/
- */
-
-
-var slider = $.widget( "ui.slider", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "slide",
-
- options: {
- animate: false,
- distance: 0,
- max: 100,
- min: 0,
- orientation: "horizontal",
- range: false,
- step: 1,
- value: 0,
- values: null,
-
- // callbacks
- change: null,
- slide: null,
- start: null,
- stop: null
- },
-
- // number of pages in a slider
- // (how many times can you page up/down to go through the whole range)
- numPages: 5,
-
- _create: function() {
- this._keySliding = false;
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- this._detectOrientation();
- this._mouseInit();
- this._calculateNewMax();
-
- this.element
- .addClass( "ui-slider" +
- " ui-slider-" + this.orientation +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all");
-
- this._refresh();
- this._setOption( "disabled", this.options.disabled );
-
- this._animateOff = false;
- },
-
- _refresh: function() {
- this._createRange();
- this._createHandles();
- this._setupEvents();
- this._refreshValue();
- },
-
- _createHandles: function() {
- var i, handleCount,
- options = this.options,
- existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
- handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",
- handles = [];
-
- handleCount = ( options.values && options.values.length ) || 1;
-
- if ( existingHandles.length > handleCount ) {
- existingHandles.slice( handleCount ).remove();
- existingHandles = existingHandles.slice( 0, handleCount );
- }
-
- for ( i = existingHandles.length; i < handleCount; i++ ) {
- handles.push( handle );
- }
-
- this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
-
- this.handle = this.handles.eq( 0 );
-
- this.handles.each(function( i ) {
- $( this ).data( "ui-slider-handle-index", i );
- });
- },
-
- _createRange: function() {
- var options = this.options,
- classes = "";
-
- if ( options.range ) {
- if ( options.range === true ) {
- if ( !options.values ) {
- options.values = [ this._valueMin(), this._valueMin() ];
- } else if ( options.values.length && options.values.length !== 2 ) {
- options.values = [ options.values[0], options.values[0] ];
- } else if ( $.isArray( options.values ) ) {
- options.values = options.values.slice(0);
- }
- }
-
- if ( !this.range || !this.range.length ) {
- this.range = $( "<div></div>" )
- .appendTo( this.element );
-
- classes = "ui-slider-range" +
- // note: this isn't the most fittingly semantic framework class for this element,
- // but worked best visually with a variety of themes
- " ui-widget-header ui-corner-all";
- } else {
- this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
- // Handle range switching from true to min/max
- .css({
- "left": "",
- "bottom": ""
- });
- }
-
- this.range.addClass( classes +
- ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
- } else {
- if ( this.range ) {
- this.range.remove();
- }
- this.range = null;
- }
- },
-
- _setupEvents: function() {
- this._off( this.handles );
- this._on( this.handles, this._handleEvents );
- this._hoverable( this.handles );
- this._focusable( this.handles );
- },
-
- _destroy: function() {
- this.handles.remove();
- if ( this.range ) {
- this.range.remove();
- }
-
- this.element
- .removeClass( "ui-slider" +
- " ui-slider-horizontal" +
- " ui-slider-vertical" +
- " ui-widget" +
- " ui-widget-content" +
- " ui-corner-all" );
-
- this._mouseDestroy();
- },
-
- _mouseCapture: function( event ) {
- var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
- that = this,
- o = this.options;
-
- if ( o.disabled ) {
- return false;
- }
-
- this.elementSize = {
- width: this.element.outerWidth(),
- height: this.element.outerHeight()
- };
- this.elementOffset = this.element.offset();
-
- position = { x: event.pageX, y: event.pageY };
- normValue = this._normValueFromMouse( position );
- distance = this._valueMax() - this._valueMin() + 1;
- this.handles.each(function( i ) {
- var thisDistance = Math.abs( normValue - that.values(i) );
- if (( distance > thisDistance ) ||
- ( distance === thisDistance &&
- (i === that._lastChangedValue || that.values(i) === o.min ))) {
- distance = thisDistance;
- closestHandle = $( this );
- index = i;
- }
- });
-
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return false;
- }
- this._mouseSliding = true;
-
- this._handleIndex = index;
-
- closestHandle
- .addClass( "ui-state-active" )
- .focus();
-
- offset = closestHandle.offset();
- mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
- this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
- left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
- top: event.pageY - offset.top -
- ( closestHandle.height() / 2 ) -
- ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
- ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
- ( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
- };
-
- if ( !this.handles.hasClass( "ui-state-hover" ) ) {
- this._slide( event, index, normValue );
- }
- this._animateOff = true;
- return true;
- },
-
- _mouseStart: function() {
- return true;
- },
-
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- normValue = this._normValueFromMouse( position );
-
- this._slide( event, this._handleIndex, normValue );
-
- return false;
- },
-
- _mouseStop: function( event ) {
- this.handles.removeClass( "ui-state-active" );
- this._mouseSliding = false;
-
- this._stop( event, this._handleIndex );
- this._change( event, this._handleIndex );
-
- this._handleIndex = null;
- this._clickOffset = null;
- this._animateOff = false;
-
- return false;
- },
-
- _detectOrientation: function() {
- this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
- },
-
- _normValueFromMouse: function( position ) {
- var pixelTotal,
- pixelMouse,
- percentMouse,
- valueTotal,
- valueMouse;
-
- if ( this.orientation === "horizontal" ) {
- pixelTotal = this.elementSize.width;
- pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
- } else {
- pixelTotal = this.elementSize.height;
- pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
- }
-
- percentMouse = ( pixelMouse / pixelTotal );
- if ( percentMouse > 1 ) {
- percentMouse = 1;
- }
- if ( percentMouse < 0 ) {
- percentMouse = 0;
- }
- if ( this.orientation === "vertical" ) {
- percentMouse = 1 - percentMouse;
- }
-
- valueTotal = this._valueMax() - this._valueMin();
- valueMouse = this._valueMin() + percentMouse * valueTotal;
-
- return this._trimAlignValue( valueMouse );
- },
-
- _start: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
- return this._trigger( "start", event, uiHash );
- },
-
- _slide: function( event, index, newVal ) {
- var otherVal,
- newValues,
- allowed;
-
- if ( this.options.values && this.options.values.length ) {
- otherVal = this.values( index ? 0 : 1 );
-
- if ( ( this.options.values.length === 2 && this.options.range === true ) &&
- ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
- ) {
- newVal = otherVal;
- }
-
- if ( newVal !== this.values( index ) ) {
- newValues = this.values();
- newValues[ index ] = newVal;
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal,
- values: newValues
- } );
- otherVal = this.values( index ? 0 : 1 );
- if ( allowed !== false ) {
- this.values( index, newVal );
- }
- }
- } else {
- if ( newVal !== this.value() ) {
- // A slide can be canceled by returning false from the slide callback
- allowed = this._trigger( "slide", event, {
- handle: this.handles[ index ],
- value: newVal
- } );
- if ( allowed !== false ) {
- this.value( newVal );
- }
- }
- }
- },
-
- _stop: function( event, index ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- this._trigger( "stop", event, uiHash );
- },
-
- _change: function( event, index ) {
- if ( !this._keySliding && !this._mouseSliding ) {
- var uiHash = {
- handle: this.handles[ index ],
- value: this.value()
- };
- if ( this.options.values && this.options.values.length ) {
- uiHash.value = this.values( index );
- uiHash.values = this.values();
- }
-
- //store the last changed value index for reference when handles overlap
- this._lastChangedValue = index;
-
- this._trigger( "change", event, uiHash );
- }
- },
-
- value: function( newValue ) {
- if ( arguments.length ) {
- this.options.value = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, 0 );
- return;
- }
-
- return this._value();
- },
-
- values: function( index, newValue ) {
- var vals,
- newValues,
- i;
-
- if ( arguments.length > 1 ) {
- this.options.values[ index ] = this._trimAlignValue( newValue );
- this._refreshValue();
- this._change( null, index );
- return;
- }
-
- if ( arguments.length ) {
- if ( $.isArray( arguments[ 0 ] ) ) {
- vals = this.options.values;
- newValues = arguments[ 0 ];
- for ( i = 0; i < vals.length; i += 1 ) {
- vals[ i ] = this._trimAlignValue( newValues[ i ] );
- this._change( null, i );
- }
- this._refreshValue();
- } else {
- if ( this.options.values && this.options.values.length ) {
- return this._values( index );
- } else {
- return this.value();
- }
- }
- } else {
- return this._values();
- }
- },
-
- _setOption: function( key, value ) {
- var i,
- valsLength = 0;
-
- if ( key === "range" && this.options.range === true ) {
- if ( value === "min" ) {
- this.options.value = this._values( 0 );
- this.options.values = null;
- } else if ( value === "max" ) {
- this.options.value = this._values( this.options.values.length - 1 );
- this.options.values = null;
- }
- }
-
- if ( $.isArray( this.options.values ) ) {
- valsLength = this.options.values.length;
- }
-
- if ( key === "disabled" ) {
- this.element.toggleClass( "ui-state-disabled", !!value );
- }
-
- this._super( key, value );
-
- switch ( key ) {
- case "orientation":
- this._detectOrientation();
- this.element
- .removeClass( "ui-slider-horizontal ui-slider-vertical" )
- .addClass( "ui-slider-" + this.orientation );
- this._refreshValue();
-
- // Reset positioning from previous orientation
- this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
- break;
- case "value":
- this._animateOff = true;
- this._refreshValue();
- this._change( null, 0 );
- this._animateOff = false;
- break;
- case "values":
- this._animateOff = true;
- this._refreshValue();
- for ( i = 0; i < valsLength; i += 1 ) {
- this._change( null, i );
- }
- this._animateOff = false;
- break;
- case "step":
- case "min":
- case "max":
- this._animateOff = true;
- this._calculateNewMax();
- this._refreshValue();
- this._animateOff = false;
- break;
- case "range":
- this._animateOff = true;
- this._refresh();
- this._animateOff = false;
- break;
- }
- },
-
- //internal value getter
- // _value() returns value trimmed by min and max, aligned by step
- _value: function() {
- var val = this.options.value;
- val = this._trimAlignValue( val );
-
- return val;
- },
-
- //internal values getter
- // _values() returns array of values trimmed by min and max, aligned by step
- // _values( index ) returns single value trimmed by min and max, aligned by step
- _values: function( index ) {
- var val,
- vals,
- i;
-
- if ( arguments.length ) {
- val = this.options.values[ index ];
- val = this._trimAlignValue( val );
-
- return val;
- } else if ( this.options.values && this.options.values.length ) {
- // .slice() creates a copy of the array
- // this copy gets trimmed by min and max and then returned
- vals = this.options.values.slice();
- for ( i = 0; i < vals.length; i += 1) {
- vals[ i ] = this._trimAlignValue( vals[ i ] );
- }
-
- return vals;
- } else {
- return [];
- }
- },
-
- // returns the step-aligned value that val is closest to, between (inclusive) min and max
- _trimAlignValue: function( val ) {
- if ( val <= this._valueMin() ) {
- return this._valueMin();
- }
- if ( val >= this._valueMax() ) {
- return this._valueMax();
- }
- var step = ( this.options.step > 0 ) ? this.options.step : 1,
- valModStep = (val - this._valueMin()) % step,
- alignValue = val - valModStep;
-
- if ( Math.abs(valModStep) * 2 >= step ) {
- alignValue += ( valModStep > 0 ) ? step : ( -step );
- }
-
- // Since JavaScript has problems with large floats, round
- // the final value to 5 digits after the decimal point (see #4124)
- return parseFloat( alignValue.toFixed(5) );
- },
-
- _calculateNewMax: function() {
- var max = this.options.max,
- min = this._valueMin(),
- step = this.options.step,
- aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step;
- max = aboveMin + min;
- this.max = parseFloat( max.toFixed( this._precision() ) );
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _valueMin: function() {
- return this.options.min;
- },
-
- _valueMax: function() {
- return this.max;
- },
-
- _refreshValue: function() {
- var lastValPercent, valPercent, value, valueMin, valueMax,
- oRange = this.options.range,
- o = this.options,
- that = this,
- animate = ( !this._animateOff ) ? o.animate : false,
- _set = {};
-
- if ( this.options.values && this.options.values.length ) {
- this.handles.each(function( i ) {
- valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
- _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
- if ( that.options.range === true ) {
- if ( that.orientation === "horizontal" ) {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- } else {
- if ( i === 0 ) {
- that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
- }
- if ( i === 1 ) {
- that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- }
- lastValPercent = valPercent;
- });
- } else {
- value = this.value();
- valueMin = this._valueMin();
- valueMax = this._valueMax();
- valPercent = ( valueMax !== valueMin ) ?
- ( value - valueMin ) / ( valueMax - valueMin ) * 100 :
- 0;
- _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
- this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
-
- if ( oRange === "min" && this.orientation === "horizontal" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "horizontal" ) {
- this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- if ( oRange === "min" && this.orientation === "vertical" ) {
- this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
- }
- if ( oRange === "max" && this.orientation === "vertical" ) {
- this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
- }
- }
- },
-
- _handleEvents: {
- keydown: function( event ) {
- var allowed, curVal, newVal, step,
- index = $( event.target ).data( "ui-slider-handle-index" );
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- case $.ui.keyCode.END:
- case $.ui.keyCode.PAGE_UP:
- case $.ui.keyCode.PAGE_DOWN:
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- event.preventDefault();
- if ( !this._keySliding ) {
- this._keySliding = true;
- $( event.target ).addClass( "ui-state-active" );
- allowed = this._start( event, index );
- if ( allowed === false ) {
- return;
- }
- }
- break;
- }
-
- step = this.options.step;
- if ( this.options.values && this.options.values.length ) {
- curVal = newVal = this.values( index );
- } else {
- curVal = newVal = this.value();
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.HOME:
- newVal = this._valueMin();
- break;
- case $.ui.keyCode.END:
- newVal = this._valueMax();
- break;
- case $.ui.keyCode.PAGE_UP:
- newVal = this._trimAlignValue(
- curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
- );
- break;
- case $.ui.keyCode.PAGE_DOWN:
- newVal = this._trimAlignValue(
- curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) );
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.RIGHT:
- if ( curVal === this._valueMax() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal + step );
- break;
- case $.ui.keyCode.DOWN:
- case $.ui.keyCode.LEFT:
- if ( curVal === this._valueMin() ) {
- return;
- }
- newVal = this._trimAlignValue( curVal - step );
- break;
- }
-
- this._slide( event, index, newVal );
- },
- keyup: function( event ) {
- var index = $( event.target ).data( "ui-slider-handle-index" );
-
- if ( this._keySliding ) {
- this._keySliding = false;
- this._stop( event, index );
- this._change( event, index );
- $( event.target ).removeClass( "ui-state-active" );
- }
- }
- }
-});
-
-
-/*!
- * jQuery UI Sortable 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/sortable/
- */
-
-
-var sortable = $.widget("ui.sortable", $.ui.mouse, {
- version: "1.11.4",
- widgetEventPrefix: "sort",
- ready: false,
- options: {
- appendTo: "parent",
- axis: false,
- connectWith: false,
- containment: false,
- cursor: "auto",
- cursorAt: false,
- dropOnEmpty: true,
- forcePlaceholderSize: false,
- forceHelperSize: false,
- grid: false,
- handle: false,
- helper: "original",
- items: "> *",
- opacity: false,
- placeholder: false,
- revert: false,
- scroll: true,
- scrollSensitivity: 20,
- scrollSpeed: 20,
- scope: "default",
- tolerance: "intersect",
- zIndex: 1000,
-
- // callbacks
- activate: null,
- beforeStop: null,
- change: null,
- deactivate: null,
- out: null,
- over: null,
- receive: null,
- remove: null,
- sort: null,
- start: null,
- stop: null,
- update: null
- },
-
- _isOverAxis: function( x, reference, size ) {
- return ( x >= reference ) && ( x < ( reference + size ) );
- },
-
- _isFloating: function( item ) {
- return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
- },
-
- _create: function() {
- this.containerCache = {};
- this.element.addClass("ui-sortable");
-
- //Get the items
- this.refresh();
-
- //Let's determine the parent's offset
- this.offset = this.element.offset();
-
- //Initialize mouse events for interaction
- this._mouseInit();
-
- this._setHandleClassName();
-
- //We're ready to go
- this.ready = true;
-
- },
-
- _setOption: function( key, value ) {
- this._super( key, value );
-
- if ( key === "handle" ) {
- this._setHandleClassName();
- }
- },
-
- _setHandleClassName: function() {
- this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" );
- $.each( this.items, function() {
- ( this.instance.options.handle ?
- this.item.find( this.instance.options.handle ) : this.item )
- .addClass( "ui-sortable-handle" );
- });
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-sortable ui-sortable-disabled" )
- .find( ".ui-sortable-handle" )
- .removeClass( "ui-sortable-handle" );
- this._mouseDestroy();
-
- for ( var i = this.items.length - 1; i >= 0; i-- ) {
- this.items[i].item.removeData(this.widgetName + "-item");
- }
-
- return this;
- },
-
- _mouseCapture: function(event, overrideHandle) {
- var currentItem = null,
- validHandle = false,
- that = this;
-
- if (this.reverting) {
- return false;
- }
-
- if(this.options.disabled || this.options.type === "static") {
- return false;
- }
-
- //We have to refresh the items data once first
- this._refreshItems(event);
-
- //Find out if the clicked node (or one of its parents) is a actual item in this.items
- $(event.target).parents().each(function() {
- if($.data(this, that.widgetName + "-item") === that) {
- currentItem = $(this);
- return false;
- }
- });
- if($.data(event.target, that.widgetName + "-item") === that) {
- currentItem = $(event.target);
- }
-
- if(!currentItem) {
- return false;
- }
- if(this.options.handle && !overrideHandle) {
- $(this.options.handle, currentItem).find("*").addBack().each(function() {
- if(this === event.target) {
- validHandle = true;
- }
- });
- if(!validHandle) {
- return false;
- }
- }
-
- this.currentItem = currentItem;
- this._removeCurrentsFromItems();
- return true;
-
- },
-
- _mouseStart: function(event, overrideHandle, noActivation) {
-
- var i, body,
- o = this.options;
-
- this.currentContainer = this;
-
- //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
- this.refreshPositions();
-
- //Create and append the visible helper
- this.helper = this._createHelper(event);
-
- //Cache the helper size
- this._cacheHelperProportions();
-
- /*
- * - Position generation -
- * This block generates everything position related - it's the core of draggables.
- */
-
- //Cache the margins of the original element
- this._cacheMargins();
-
- //Get the next scrolling parent
- this.scrollParent = this.helper.scrollParent();
-
- //The element's absolute position on the page minus margins
- this.offset = this.currentItem.offset();
- this.offset = {
- top: this.offset.top - this.margins.top,
- left: this.offset.left - this.margins.left
- };
-
- $.extend(this.offset, {
- click: { //Where the click happened, relative to the element
- left: event.pageX - this.offset.left,
- top: event.pageY - this.offset.top
- },
- parent: this._getParentOffset(),
- relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
- });
-
- // Only after we got the offset, we can change the helper's position to absolute
- // TODO: Still need to figure out a way to make relative sorting possible
- this.helper.css("position", "absolute");
- this.cssPosition = this.helper.css("position");
-
- //Generate the original position
- this.originalPosition = this._generatePosition(event);
- this.originalPageX = event.pageX;
- this.originalPageY = event.pageY;
-
- //Adjust the mouse offset relative to the helper if "cursorAt" is supplied
- (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
-
- //Cache the former DOM position
- this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
-
- //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
- if(this.helper[0] !== this.currentItem[0]) {
- this.currentItem.hide();
- }
-
- //Create the placeholder
- this._createPlaceholder();
-
- //Set a containment if given in the options
- if(o.containment) {
- this._setContainment();
- }
-
- if( o.cursor && o.cursor !== "auto" ) { // cursor option
- body = this.document.find( "body" );
-
- // support: IE
- this.storedCursor = body.css( "cursor" );
- body.css( "cursor", o.cursor );
-
- this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
- }
-
- if(o.opacity) { // opacity option
- if (this.helper.css("opacity")) {
- this._storedOpacity = this.helper.css("opacity");
- }
- this.helper.css("opacity", o.opacity);
- }
-
- if(o.zIndex) { // zIndex option
- if (this.helper.css("zIndex")) {
- this._storedZIndex = this.helper.css("zIndex");
- }
- this.helper.css("zIndex", o.zIndex);
- }
-
- //Prepare scrolling
- if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
- this.overflowOffset = this.scrollParent.offset();
- }
-
- //Call callbacks
- this._trigger("start", event, this._uiHash());
-
- //Recache the helper size
- if(!this._preserveHelperProportions) {
- this._cacheHelperProportions();
- }
-
-
- //Post "activate" events to possible containers
- if( !noActivation ) {
- for ( i = this.containers.length - 1; i >= 0; i-- ) {
- this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
- }
- }
-
- //Prepare possible droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.current = this;
- }
-
- if ($.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
-
- this.dragging = true;
-
- this.helper.addClass("ui-sortable-helper");
- this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
- return true;
-
- },
-
- _mouseDrag: function(event) {
- var i, item, itemElement, intersection,
- o = this.options,
- scrolled = false;
-
- //Compute the helpers position
- this.position = this._generatePosition(event);
- this.positionAbs = this._convertPositionTo("absolute");
-
- if (!this.lastPositionAbs) {
- this.lastPositionAbs = this.positionAbs;
- }
-
- //Do scrolling
- if(this.options.scroll) {
- if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") {
-
- if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
- this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
- }
-
- if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
- this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
- }
-
- } else {
-
- if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) {
- scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed);
- } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) {
- scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed);
- }
-
- if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) {
- scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed);
- } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) {
- scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed);
- }
-
- }
-
- if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
- $.ui.ddmanager.prepareOffsets(this, event);
- }
- }
-
- //Regenerate the absolute position used for position checks
- this.positionAbs = this._convertPositionTo("absolute");
-
- //Set the helper position
- if(!this.options.axis || this.options.axis !== "y") {
- this.helper[0].style.left = this.position.left+"px";
- }
- if(!this.options.axis || this.options.axis !== "x") {
- this.helper[0].style.top = this.position.top+"px";
- }
-
- //Rearrange
- for (i = this.items.length - 1; i >= 0; i--) {
-
- //Cache variables and intersection, continue if no intersection
- item = this.items[i];
- itemElement = item.item[0];
- intersection = this._intersectsWithPointer(item);
- if (!intersection) {
- continue;
- }
-
- // Only put the placeholder inside the current Container, skip all
- // items from other containers. This works because when moving
- // an item from one container to another the
- // currentContainer is switched before the placeholder is moved.
- //
- // Without this, moving items in "sub-sortables" can cause
- // the placeholder to jitter between the outer and inner container.
- if (item.instance !== this.currentContainer) {
- continue;
- }
-
- // cannot intersect with itself
- // no useless actions that have been done before
- // no action if the item moved is the parent of the item checked
- if (itemElement !== this.currentItem[0] &&
- this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
- !$.contains(this.placeholder[0], itemElement) &&
- (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
- ) {
-
- this.direction = intersection === 1 ? "down" : "up";
-
- if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
- this._rearrange(event, item);
- } else {
- break;
- }
-
- this._trigger("change", event, this._uiHash());
- break;
- }
- }
-
- //Post events to containers
- this._contactContainers(event);
-
- //Interconnect with droppables
- if($.ui.ddmanager) {
- $.ui.ddmanager.drag(this, event);
- }
-
- //Call callbacks
- this._trigger("sort", event, this._uiHash());
-
- this.lastPositionAbs = this.positionAbs;
- return false;
-
- },
-
- _mouseStop: function(event, noPropagation) {
-
- if(!event) {
- return;
- }
-
- //If we are using droppables, inform the manager about the drop
- if ($.ui.ddmanager && !this.options.dropBehaviour) {
- $.ui.ddmanager.drop(this, event);
- }
-
- if(this.options.revert) {
- var that = this,
- cur = this.placeholder.offset(),
- axis = this.options.axis,
- animation = {};
-
- if ( !axis || axis === "x" ) {
- animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft);
- }
- if ( !axis || axis === "y" ) {
- animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop);
- }
- this.reverting = true;
- $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
- that._clear(event);
- });
- } else {
- this._clear(event, noPropagation);
- }
-
- return false;
-
- },
-
- cancel: function() {
-
- if(this.dragging) {
-
- this._mouseUp({ target: null });
-
- if(this.options.helper === "original") {
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- //Post deactivating events to containers
- for (var i = this.containers.length - 1; i >= 0; i--){
- this.containers[i]._trigger("deactivate", null, this._uiHash(this));
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", null, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- if (this.placeholder) {
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- if(this.placeholder[0].parentNode) {
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
- }
- if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
- this.helper.remove();
- }
-
- $.extend(this, {
- helper: null,
- dragging: false,
- reverting: false,
- _noFinalSort: null
- });
-
- if(this.domPosition.prev) {
- $(this.domPosition.prev).after(this.currentItem);
- } else {
- $(this.domPosition.parent).prepend(this.currentItem);
- }
- }
-
- return this;
-
- },
-
- serialize: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- str = [];
- o = o || {};
-
- $(items).each(function() {
- var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
- if (res) {
- str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
- }
- });
-
- if(!str.length && o.key) {
- str.push(o.key + "=");
- }
-
- return str.join("&");
-
- },
-
- toArray: function(o) {
-
- var items = this._getItemsAsjQuery(o && o.connected),
- ret = [];
-
- o = o || {};
-
- items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
- return ret;
-
- },
-
- /* Be careful with the following core functions */
- _intersectsWith: function(item) {
-
- var x1 = this.positionAbs.left,
- x2 = x1 + this.helperProportions.width,
- y1 = this.positionAbs.top,
- y2 = y1 + this.helperProportions.height,
- l = item.left,
- r = l + item.width,
- t = item.top,
- b = t + item.height,
- dyClick = this.offset.click.top,
- dxClick = this.offset.click.left,
- isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
- isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
- isOverElement = isOverElementHeight && isOverElementWidth;
-
- if ( this.options.tolerance === "pointer" ||
- this.options.forcePointerForContainers ||
- (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
- ) {
- return isOverElement;
- } else {
-
- return (l < x1 + (this.helperProportions.width / 2) && // Right Half
- x2 - (this.helperProportions.width / 2) < r && // Left Half
- t < y1 + (this.helperProportions.height / 2) && // Bottom Half
- y2 - (this.helperProportions.height / 2) < b ); // Top Half
-
- }
- },
-
- _intersectsWithPointer: function(item) {
-
- var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
- isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
- isOverElement = isOverElementHeight && isOverElementWidth,
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (!isOverElement) {
- return false;
- }
-
- return this.floating ?
- ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
- : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
-
- },
-
- _intersectsWithSides: function(item) {
-
- var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
- isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
- verticalDirection = this._getDragVerticalDirection(),
- horizontalDirection = this._getDragHorizontalDirection();
-
- if (this.floating && horizontalDirection) {
- return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
- } else {
- return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
- }
-
- },
-
- _getDragVerticalDirection: function() {
- var delta = this.positionAbs.top - this.lastPositionAbs.top;
- return delta !== 0 && (delta > 0 ? "down" : "up");
- },
-
- _getDragHorizontalDirection: function() {
- var delta = this.positionAbs.left - this.lastPositionAbs.left;
- return delta !== 0 && (delta > 0 ? "right" : "left");
- },
-
- refresh: function(event) {
- this._refreshItems(event);
- this._setHandleClassName();
- this.refreshPositions();
- return this;
- },
-
- _connectWith: function() {
- var options = this.options;
- return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
- },
-
- _getItemsAsjQuery: function(connected) {
-
- var i, j, cur, inst,
- items = [],
- queries = [],
- connectWith = this._connectWith();
-
- if(connectWith && connected) {
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i], this.document[0]);
- for ( j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
- }
- }
- }
- }
-
- queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
-
- function addItems() {
- items.push( this );
- }
- for (i = queries.length - 1; i >= 0; i--){
- queries[i][0].each( addItems );
- }
-
- return $(items);
-
- },
-
- _removeCurrentsFromItems: function() {
-
- var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
-
- this.items = $.grep(this.items, function (item) {
- for (var j=0; j < list.length; j++) {
- if(list[j] === item.item[0]) {
- return false;
- }
- }
- return true;
- });
-
- },
-
- _refreshItems: function(event) {
-
- this.items = [];
- this.containers = [this];
-
- var i, j, cur, inst, targetData, _queries, item, queriesLength,
- items = this.items,
- queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
- connectWith = this._connectWith();
-
- if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
- for (i = connectWith.length - 1; i >= 0; i--){
- cur = $(connectWith[i], this.document[0]);
- for (j = cur.length - 1; j >= 0; j--){
- inst = $.data(cur[j], this.widgetFullName);
- if(inst && inst !== this && !inst.options.disabled) {
- queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
- this.containers.push(inst);
- }
- }
- }
- }
-
- for (i = queries.length - 1; i >= 0; i--) {
- targetData = queries[i][1];
- _queries = queries[i][0];
-
- for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
- item = $(_queries[j]);
-
- item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
-
- items.push({
- item: item,
- instance: targetData,
- width: 0, height: 0,
- left: 0, top: 0
- });
- }
- }
-
- },
-
- refreshPositions: function(fast) {
-
- // Determine whether items are being displayed horizontally
- this.floating = this.items.length ?
- this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
- false;
-
- //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
- if(this.offsetParent && this.helper) {
- this.offset.parent = this._getParentOffset();
- }
-
- var i, item, t, p;
-
- for (i = this.items.length - 1; i >= 0; i--){
- item = this.items[i];
-
- //We ignore calculating positions of all connected containers when we're not over them
- if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
- continue;
- }
-
- t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
-
- if (!fast) {
- item.width = t.outerWidth();
- item.height = t.outerHeight();
- }
-
- p = t.offset();
- item.left = p.left;
- item.top = p.top;
- }
-
- if(this.options.custom && this.options.custom.refreshContainers) {
- this.options.custom.refreshContainers.call(this);
- } else {
- for (i = this.containers.length - 1; i >= 0; i--){
- p = this.containers[i].element.offset();
- this.containers[i].containerCache.left = p.left;
- this.containers[i].containerCache.top = p.top;
- this.containers[i].containerCache.width = this.containers[i].element.outerWidth();
- this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
- }
- }
-
- return this;
- },
-
- _createPlaceholder: function(that) {
- that = that || this;
- var className,
- o = that.options;
-
- if(!o.placeholder || o.placeholder.constructor === String) {
- className = o.placeholder;
- o.placeholder = {
- element: function() {
-
- var nodeName = that.currentItem[0].nodeName.toLowerCase(),
- element = $( "<" + nodeName + ">", that.document[0] )
- .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
- .removeClass("ui-sortable-helper");
-
- if ( nodeName === "tbody" ) {
- that._createTrPlaceholder(
- that.currentItem.find( "tr" ).eq( 0 ),
- $( "<tr>", that.document[ 0 ] ).appendTo( element )
- );
- } else if ( nodeName === "tr" ) {
- that._createTrPlaceholder( that.currentItem, element );
- } else if ( nodeName === "img" ) {
- element.attr( "src", that.currentItem.attr( "src" ) );
- }
-
- if ( !className ) {
- element.css( "visibility", "hidden" );
- }
-
- return element;
- },
- update: function(container, p) {
-
- // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
- // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
- if(className && !o.forcePlaceholderSize) {
- return;
- }
-
- //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
- if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
- if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
- }
- };
- }
-
- //Create the placeholder
- that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
-
- //Append it after the actual current item
- that.currentItem.after(that.placeholder);
-
- //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
- o.placeholder.update(that, that.placeholder);
-
- },
-
- _createTrPlaceholder: function( sourceTr, targetTr ) {
- var that = this;
-
- sourceTr.children().each(function() {
- $( "<td>&#160;</td>", that.document[ 0 ] )
- .attr( "colspan", $( this ).attr( "colspan" ) || 1 )
- .appendTo( targetTr );
- });
- },
-
- _contactContainers: function(event) {
- var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis,
- innermostContainer = null,
- innermostIndex = null;
-
- // get innermost container that intersects with item
- for (i = this.containers.length - 1; i >= 0; i--) {
-
- // never consider a container that's located within the item itself
- if($.contains(this.currentItem[0], this.containers[i].element[0])) {
- continue;
- }
-
- if(this._intersectsWith(this.containers[i].containerCache)) {
-
- // if we've already found a container and it's more "inner" than this, then continue
- if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
- continue;
- }
-
- innermostContainer = this.containers[i];
- innermostIndex = i;
-
- } else {
- // container doesn't intersect. trigger "out" event if necessary
- if(this.containers[i].containerCache.over) {
- this.containers[i]._trigger("out", event, this._uiHash(this));
- this.containers[i].containerCache.over = 0;
- }
- }
-
- }
-
- // if no intersecting containers found, return
- if(!innermostContainer) {
- return;
- }
-
- // move the item into the container if it's not there already
- if(this.containers.length === 1) {
- if (!this.containers[innermostIndex].containerCache.over) {
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
- } else {
-
- //When entering a new container, we will find the item with the least distance and append our item near it
- dist = 10000;
- itemWithLeastDistance = null;
- floating = innermostContainer.floating || this._isFloating(this.currentItem);
- posProperty = floating ? "left" : "top";
- sizeProperty = floating ? "width" : "height";
- axis = floating ? "clientX" : "clientY";
-
- for (j = this.items.length - 1; j >= 0; j--) {
- if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
- continue;
- }
- if(this.items[j].item[0] === this.currentItem[0]) {
- continue;
- }
-
- cur = this.items[j].item.offset()[posProperty];
- nearBottom = false;
- if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
- nearBottom = true;
- }
-
- if ( Math.abs( event[ axis ] - cur ) < dist ) {
- dist = Math.abs( event[ axis ] - cur );
- itemWithLeastDistance = this.items[ j ];
- this.direction = nearBottom ? "up": "down";
- }
- }
-
- //Check if dropOnEmpty is enabled
- if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
- return;
- }
-
- if(this.currentContainer === this.containers[innermostIndex]) {
- if ( !this.currentContainer.containerCache.over ) {
- this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
- this.currentContainer.containerCache.over = 1;
- }
- return;
- }
-
- itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
- this._trigger("change", event, this._uiHash());
- this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
- this.currentContainer = this.containers[innermostIndex];
-
- //Update the placeholder
- this.options.placeholder.update(this.currentContainer, this.placeholder);
-
- this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
- this.containers[innermostIndex].containerCache.over = 1;
- }
-
-
- },
-
- _createHelper: function(event) {
-
- var o = this.options,
- helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
-
- //Add the helper to the DOM if that didn't happen already
- if(!helper.parents("body").length) {
- $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
- }
-
- if(helper[0] === this.currentItem[0]) {
- this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
- }
-
- if(!helper[0].style.width || o.forceHelperSize) {
- helper.width(this.currentItem.width());
- }
- if(!helper[0].style.height || o.forceHelperSize) {
- helper.height(this.currentItem.height());
- }
-
- return helper;
-
- },
-
- _adjustOffsetFromHelper: function(obj) {
- if (typeof obj === "string") {
- obj = obj.split(" ");
- }
- if ($.isArray(obj)) {
- obj = {left: +obj[0], top: +obj[1] || 0};
- }
- if ("left" in obj) {
- this.offset.click.left = obj.left + this.margins.left;
- }
- if ("right" in obj) {
- this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
- }
- if ("top" in obj) {
- this.offset.click.top = obj.top + this.margins.top;
- }
- if ("bottom" in obj) {
- this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
- }
- },
-
- _getParentOffset: function() {
-
-
- //Get the offsetParent and cache its position
- this.offsetParent = this.helper.offsetParent();
- var po = this.offsetParent.offset();
-
- // This is a special case where we need to modify a offset calculated on start, since the following happened:
- // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
- // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
- // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
- if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) {
- po.left += this.scrollParent.scrollLeft();
- po.top += this.scrollParent.scrollTop();
- }
-
- // This needs to be actually done for all browsers, since pageX/pageY includes this information
- // with an ugly IE fix
- if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
- po = { top: 0, left: 0 };
- }
-
- return {
- top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
- left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
- };
-
- },
-
- _getRelativeOffset: function() {
-
- if(this.cssPosition === "relative") {
- var p = this.currentItem.position();
- return {
- top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
- left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
- };
- } else {
- return { top: 0, left: 0 };
- }
-
- },
-
- _cacheMargins: function() {
- this.margins = {
- left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
- top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
- };
- },
-
- _cacheHelperProportions: function() {
- this.helperProportions = {
- width: this.helper.outerWidth(),
- height: this.helper.outerHeight()
- };
- },
-
- _setContainment: function() {
-
- var ce, co, over,
- o = this.options;
- if(o.containment === "parent") {
- o.containment = this.helper[0].parentNode;
- }
- if(o.containment === "document" || o.containment === "window") {
- this.containment = [
- 0 - this.offset.relative.left - this.offset.parent.left,
- 0 - this.offset.relative.top - this.offset.parent.top,
- o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left,
- (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
- ];
- }
-
- if(!(/^(document|window|parent)$/).test(o.containment)) {
- ce = $(o.containment)[0];
- co = $(o.containment).offset();
- over = ($(ce).css("overflow") !== "hidden");
-
- this.containment = [
- co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
- co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
- co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
- co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
- ];
- }
-
- },
-
- _convertPositionTo: function(d, pos) {
-
- if(!pos) {
- pos = this.position;
- }
- var mod = d === "absolute" ? 1 : -1,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
- scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- return {
- top: (
- pos.top + // The absolute mouse position
- this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
- ),
- left: (
- pos.left + // The absolute mouse position
- this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
- )
- };
-
- },
-
- _generatePosition: function(event) {
-
- var top, left,
- o = this.options,
- pageX = event.pageX,
- pageY = event.pageY,
- scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
-
- // This is another very weird special case that only happens for relative elements:
- // 1. If the css position is relative
- // 2. and the scroll parent is the document or similar to the offset parent
- // we have to refresh the relative offset during the scroll so there are no jumps
- if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) {
- this.offset.relative = this._getRelativeOffset();
- }
-
- /*
- * - Position constraining -
- * Constrain the position to a mix of grid, containment.
- */
-
- if(this.originalPosition) { //If we are not dragging yet, we won't check for options
-
- if(this.containment) {
- if(event.pageX - this.offset.click.left < this.containment[0]) {
- pageX = this.containment[0] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top < this.containment[1]) {
- pageY = this.containment[1] + this.offset.click.top;
- }
- if(event.pageX - this.offset.click.left > this.containment[2]) {
- pageX = this.containment[2] + this.offset.click.left;
- }
- if(event.pageY - this.offset.click.top > this.containment[3]) {
- pageY = this.containment[3] + this.offset.click.top;
- }
- }
-
- if(o.grid) {
- top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
- pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
-
- left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
- pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
- }
-
- }
-
- return {
- top: (
- pageY - // The absolute mouse position
- this.offset.click.top - // Click offset (relative to the element)
- this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.top + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
- ),
- left: (
- pageX - // The absolute mouse position
- this.offset.click.left - // Click offset (relative to the element)
- this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent
- this.offset.parent.left + // The offsetParent's offset without borders (offset + border)
- ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
- )
- };
-
- },
-
- _rearrange: function(event, i, a, hardRefresh) {
-
- a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
-
- //Various things done here to improve the performance:
- // 1. we create a setTimeout, that calls refreshPositions
- // 2. on the instance, we have a counter variable, that get's higher after every append
- // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
- // 4. this lets only the last addition to the timeout stack through
- this.counter = this.counter ? ++this.counter : 1;
- var counter = this.counter;
-
- this._delay(function() {
- if(counter === this.counter) {
- this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
- }
- });
-
- },
-
- _clear: function(event, noPropagation) {
-
- this.reverting = false;
- // We delay all events that have to be triggered to after the point where the placeholder has been removed and
- // everything else normalized again
- var i,
- delayedTriggers = [];
-
- // We first have to update the dom position of the actual currentItem
- // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
- if(!this._noFinalSort && this.currentItem.parent().length) {
- this.placeholder.before(this.currentItem);
- }
- this._noFinalSort = null;
-
- if(this.helper[0] === this.currentItem[0]) {
- for(i in this._storedCSS) {
- if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
- this._storedCSS[i] = "";
- }
- }
- this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
- } else {
- this.currentItem.show();
- }
-
- if(this.fromOutside && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
- }
- if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
- }
-
- // Check if the items Container has Changed and trigger appropriate
- // events.
- if (this !== this.currentContainer) {
- if(!noPropagation) {
- delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
- delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer));
- }
- }
-
-
- //Post events to containers
- function delayEvent( type, instance, container ) {
- return function( event ) {
- container._trigger( type, event, instance._uiHash( instance ) );
- };
- }
- for (i = this.containers.length - 1; i >= 0; i--){
- if (!noPropagation) {
- delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
- }
- if(this.containers[i].containerCache.over) {
- delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
- this.containers[i].containerCache.over = 0;
- }
- }
-
- //Do what was originally in plugins
- if ( this.storedCursor ) {
- this.document.find( "body" ).css( "cursor", this.storedCursor );
- this.storedStylesheet.remove();
- }
- if(this._storedOpacity) {
- this.helper.css("opacity", this._storedOpacity);
- }
- if(this._storedZIndex) {
- this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
- }
-
- this.dragging = false;
-
- if(!noPropagation) {
- this._trigger("beforeStop", event, this._uiHash());
- }
-
- //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
- this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
-
- if ( !this.cancelHelperRemoval ) {
- if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
- this.helper.remove();
- }
- this.helper = null;
- }
-
- if(!noPropagation) {
- for (i=0; i < delayedTriggers.length; i++) {
- delayedTriggers[i].call(this, event);
- } //Trigger all delayed events
- this._trigger("stop", event, this._uiHash());
- }
-
- this.fromOutside = false;
- return !this.cancelHelperRemoval;
-
- },
-
- _trigger: function() {
- if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
- this.cancel();
- }
- },
-
- _uiHash: function(_inst) {
- var inst = _inst || this;
- return {
- helper: inst.helper,
- placeholder: inst.placeholder || $([]),
- position: inst.position,
- originalPosition: inst.originalPosition,
- offset: inst.positionAbs,
- item: inst.currentItem,
- sender: _inst ? _inst.element : null
- };
- }
-
-});
-
-
-/*!
- * jQuery UI Spinner 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/spinner/
- */
-
-
-function spinner_modifier( fn ) {
- return function() {
- var previous = this.element.val();
- fn.apply( this, arguments );
- this._refresh();
- if ( previous !== this.element.val() ) {
- this._trigger( "change" );
- }
- };
-}
-
-var spinner = $.widget( "ui.spinner", {
- version: "1.11.4",
- defaultElement: "<input>",
- widgetEventPrefix: "spin",
- options: {
- culture: null,
- icons: {
- down: "ui-icon-triangle-1-s",
- up: "ui-icon-triangle-1-n"
- },
- incremental: true,
- max: null,
- min: null,
- numberFormat: null,
- page: 10,
- step: 1,
-
- change: null,
- spin: null,
- start: null,
- stop: null
- },
-
- _create: function() {
- // handle string values that need to be parsed
- this._setOption( "max", this.options.max );
- this._setOption( "min", this.options.min );
- this._setOption( "step", this.options.step );
-
- // Only format if there is a value, prevents the field from being marked
- // as invalid in Firefox, see #9573.
- if ( this.value() !== "" ) {
- // Format the value, but don't constrain.
- this._value( this.element.val(), true );
- }
-
- this._draw();
- this._on( this._events );
- this._refresh();
-
- // turning off autocomplete prevents the browser from remembering the
- // value when navigating through history, so we re-enable autocomplete
- // if the page is unloaded before the widget is destroyed. #7790
- this._on( this.window, {
- beforeunload: function() {
- this.element.removeAttr( "autocomplete" );
- }
- });
- },
-
- _getCreateOptions: function() {
- var options = {},
- element = this.element;
-
- $.each( [ "min", "max", "step" ], function( i, option ) {
- var value = element.attr( option );
- if ( value !== undefined && value.length ) {
- options[ option ] = value;
- }
- });
-
- return options;
- },
-
- _events: {
- keydown: function( event ) {
- if ( this._start( event ) && this._keydown( event ) ) {
- event.preventDefault();
- }
- },
- keyup: "_stop",
- focus: function() {
- this.previous = this.element.val();
- },
- blur: function( event ) {
- if ( this.cancelBlur ) {
- delete this.cancelBlur;
- return;
- }
-
- this._stop();
- this._refresh();
- if ( this.previous !== this.element.val() ) {
- this._trigger( "change", event );
- }
- },
- mousewheel: function( event, delta ) {
- if ( !delta ) {
- return;
- }
- if ( !this.spinning && !this._start( event ) ) {
- return false;
- }
-
- this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
- clearTimeout( this.mousewheelTimer );
- this.mousewheelTimer = this._delay(function() {
- if ( this.spinning ) {
- this._stop( event );
- }
- }, 100 );
- event.preventDefault();
- },
- "mousedown .ui-spinner-button": function( event ) {
- var previous;
-
- // We never want the buttons to have focus; whenever the user is
- // interacting with the spinner, the focus should be on the input.
- // If the input is focused then this.previous is properly set from
- // when the input first received focus. If the input is not focused
- // then we need to set this.previous based on the value before spinning.
- previous = this.element[0] === this.document[0].activeElement ?
- this.previous : this.element.val();
- function checkFocus() {
- var isActive = this.element[0] === this.document[0].activeElement;
- if ( !isActive ) {
- this.element.focus();
- this.previous = previous;
- // support: IE
- // IE sets focus asynchronously, so we need to check if focus
- // moved off of the input because the user clicked on the button.
- this._delay(function() {
- this.previous = previous;
- });
- }
- }
-
- // ensure focus is on (or stays on) the text field
- event.preventDefault();
- checkFocus.call( this );
-
- // support: IE
- // IE doesn't prevent moving focus even with event.preventDefault()
- // so we set a flag to know when we should ignore the blur event
- // and check (again) if focus moved off of the input.
- this.cancelBlur = true;
- this._delay(function() {
- delete this.cancelBlur;
- checkFocus.call( this );
- });
-
- if ( this._start( event ) === false ) {
- return;
- }
-
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- "mouseup .ui-spinner-button": "_stop",
- "mouseenter .ui-spinner-button": function( event ) {
- // button will add ui-state-active if mouse was down while mouseleave and kept down
- if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
- return;
- }
-
- if ( this._start( event ) === false ) {
- return false;
- }
- this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
- },
- // TODO: do we really want to consider this a stop?
- // shouldn't we just stop the repeater and wait until mouseup before
- // we trigger the stop event?
- "mouseleave .ui-spinner-button": "_stop"
- },
-
- _draw: function() {
- var uiSpinner = this.uiSpinner = this.element
- .addClass( "ui-spinner-input" )
- .attr( "autocomplete", "off" )
- .wrap( this._uiSpinnerHtml() )
- .parent()
- // add buttons
- .append( this._buttonHtml() );
-
- this.element.attr( "role", "spinbutton" );
-
- // button bindings
- this.buttons = uiSpinner.find( ".ui-spinner-button" )
- .attr( "tabIndex", -1 )
- .button()
- .removeClass( "ui-corner-all" );
-
- // IE 6 doesn't understand height: 50% for the buttons
- // unless the wrapper has an explicit height
- if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
- uiSpinner.height() > 0 ) {
- uiSpinner.height( uiSpinner.height() );
- }
-
- // disable spinner if element was already disabled
- if ( this.options.disabled ) {
- this.disable();
- }
- },
-
- _keydown: function( event ) {
- var options = this.options,
- keyCode = $.ui.keyCode;
-
- switch ( event.keyCode ) {
- case keyCode.UP:
- this._repeat( null, 1, event );
- return true;
- case keyCode.DOWN:
- this._repeat( null, -1, event );
- return true;
- case keyCode.PAGE_UP:
- this._repeat( null, options.page, event );
- return true;
- case keyCode.PAGE_DOWN:
- this._repeat( null, -options.page, event );
- return true;
- }
-
- return false;
- },
-
- _uiSpinnerHtml: function() {
- return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
- },
-
- _buttonHtml: function() {
- return "" +
- "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
- "<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
- "</a>" +
- "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
- "<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
- "</a>";
- },
-
- _start: function( event ) {
- if ( !this.spinning && this._trigger( "start", event ) === false ) {
- return false;
- }
-
- if ( !this.counter ) {
- this.counter = 1;
- }
- this.spinning = true;
- return true;
- },
-
- _repeat: function( i, steps, event ) {
- i = i || 500;
-
- clearTimeout( this.timer );
- this.timer = this._delay(function() {
- this._repeat( 40, steps, event );
- }, i );
-
- this._spin( steps * this.options.step, event );
- },
-
- _spin: function( step, event ) {
- var value = this.value() || 0;
-
- if ( !this.counter ) {
- this.counter = 1;
- }
-
- value = this._adjustValue( value + step * this._increment( this.counter ) );
-
- if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
- this._value( value );
- this.counter++;
- }
- },
-
- _increment: function( i ) {
- var incremental = this.options.incremental;
-
- if ( incremental ) {
- return $.isFunction( incremental ) ?
- incremental( i ) :
- Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
- }
-
- return 1;
- },
-
- _precision: function() {
- var precision = this._precisionOf( this.options.step );
- if ( this.options.min !== null ) {
- precision = Math.max( precision, this._precisionOf( this.options.min ) );
- }
- return precision;
- },
-
- _precisionOf: function( num ) {
- var str = num.toString(),
- decimal = str.indexOf( "." );
- return decimal === -1 ? 0 : str.length - decimal - 1;
- },
-
- _adjustValue: function( value ) {
- var base, aboveMin,
- options = this.options;
-
- // make sure we're at a valid step
- // - find out where we are relative to the base (min or 0)
- base = options.min !== null ? options.min : 0;
- aboveMin = value - base;
- // - round to the nearest step
- aboveMin = Math.round(aboveMin / options.step) * options.step;
- // - rounding is based on 0, so adjust back to our base
- value = base + aboveMin;
-
- // fix precision from bad JS floating point math
- value = parseFloat( value.toFixed( this._precision() ) );
-
- // clamp the value
- if ( options.max !== null && value > options.max) {
- return options.max;
- }
- if ( options.min !== null && value < options.min ) {
- return options.min;
- }
-
- return value;
- },
-
- _stop: function( event ) {
- if ( !this.spinning ) {
- return;
- }
-
- clearTimeout( this.timer );
- clearTimeout( this.mousewheelTimer );
- this.counter = 0;
- this.spinning = false;
- this._trigger( "stop", event );
- },
-
- _setOption: function( key, value ) {
- if ( key === "culture" || key === "numberFormat" ) {
- var prevValue = this._parse( this.element.val() );
- this.options[ key ] = value;
- this.element.val( this._format( prevValue ) );
- return;
- }
-
- if ( key === "max" || key === "min" || key === "step" ) {
- if ( typeof value === "string" ) {
- value = this._parse( value );
- }
- }
- if ( key === "icons" ) {
- this.buttons.first().find( ".ui-icon" )
- .removeClass( this.options.icons.up )
- .addClass( value.up );
- this.buttons.last().find( ".ui-icon" )
- .removeClass( this.options.icons.down )
- .addClass( value.down );
- }
-
- this._super( key, value );
-
- if ( key === "disabled" ) {
- this.widget().toggleClass( "ui-state-disabled", !!value );
- this.element.prop( "disabled", !!value );
- this.buttons.button( value ? "disable" : "enable" );
- }
- },
-
- _setOptions: spinner_modifier(function( options ) {
- this._super( options );
- }),
-
- _parse: function( val ) {
- if ( typeof val === "string" && val !== "" ) {
- val = window.Globalize && this.options.numberFormat ?
- Globalize.parseFloat( val, 10, this.options.culture ) : +val;
- }
- return val === "" || isNaN( val ) ? null : val;
- },
-
- _format: function( value ) {
- if ( value === "" ) {
- return "";
- }
- return window.Globalize && this.options.numberFormat ?
- Globalize.format( value, this.options.numberFormat, this.options.culture ) :
- value;
- },
-
- _refresh: function() {
- this.element.attr({
- "aria-valuemin": this.options.min,
- "aria-valuemax": this.options.max,
- // TODO: what should we do with values that can't be parsed?
- "aria-valuenow": this._parse( this.element.val() )
- });
- },
-
- isValid: function() {
- var value = this.value();
-
- // null is invalid
- if ( value === null ) {
- return false;
- }
-
- // if value gets adjusted, it's invalid
- return value === this._adjustValue( value );
- },
-
- // update the value without triggering change
- _value: function( value, allowAny ) {
- var parsed;
- if ( value !== "" ) {
- parsed = this._parse( value );
- if ( parsed !== null ) {
- if ( !allowAny ) {
- parsed = this._adjustValue( parsed );
- }
- value = this._format( parsed );
- }
- }
- this.element.val( value );
- this._refresh();
- },
-
- _destroy: function() {
- this.element
- .removeClass( "ui-spinner-input" )
- .prop( "disabled", false )
- .removeAttr( "autocomplete" )
- .removeAttr( "role" )
- .removeAttr( "aria-valuemin" )
- .removeAttr( "aria-valuemax" )
- .removeAttr( "aria-valuenow" );
- this.uiSpinner.replaceWith( this.element );
- },
-
- stepUp: spinner_modifier(function( steps ) {
- this._stepUp( steps );
- }),
- _stepUp: function( steps ) {
- if ( this._start() ) {
- this._spin( (steps || 1) * this.options.step );
- this._stop();
- }
- },
-
- stepDown: spinner_modifier(function( steps ) {
- this._stepDown( steps );
- }),
- _stepDown: function( steps ) {
- if ( this._start() ) {
- this._spin( (steps || 1) * -this.options.step );
- this._stop();
- }
- },
-
- pageUp: spinner_modifier(function( pages ) {
- this._stepUp( (pages || 1) * this.options.page );
- }),
-
- pageDown: spinner_modifier(function( pages ) {
- this._stepDown( (pages || 1) * this.options.page );
- }),
-
- value: function( newVal ) {
- if ( !arguments.length ) {
- return this._parse( this.element.val() );
- }
- spinner_modifier( this._value ).call( this, newVal );
- },
-
- widget: function() {
- return this.uiSpinner;
- }
-});
-
-
-/*!
- * jQuery UI Tabs 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/tabs/
- */
-
-
-var tabs = $.widget( "ui.tabs", {
- version: "1.11.4",
- delay: 300,
- options: {
- active: null,
- collapsible: false,
- event: "click",
- heightStyle: "content",
- hide: null,
- show: null,
-
- // callbacks
- activate: null,
- beforeActivate: null,
- beforeLoad: null,
- load: null
- },
-
- _isLocal: (function() {
- var rhash = /#.*$/;
-
- return function( anchor ) {
- var anchorUrl, locationUrl;
-
- // support: IE7
- // IE7 doesn't normalize the href property when set via script (#9317)
- anchor = anchor.cloneNode( false );
-
- anchorUrl = anchor.href.replace( rhash, "" );
- locationUrl = location.href.replace( rhash, "" );
-
- // decoding may throw an error if the URL isn't UTF-8 (#9518)
- try {
- anchorUrl = decodeURIComponent( anchorUrl );
- } catch ( error ) {}
- try {
- locationUrl = decodeURIComponent( locationUrl );
- } catch ( error ) {}
-
- return anchor.hash.length > 1 && anchorUrl === locationUrl;
- };
- })(),
-
- _create: function() {
- var that = this,
- options = this.options;
-
- this.running = false;
-
- this.element
- .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
- .toggleClass( "ui-tabs-collapsible", options.collapsible );
-
- this._processTabs();
- options.active = this._initialActive();
-
- // Take disabling tabs via class attribute from HTML
- // into account and update option properly.
- if ( $.isArray( options.disabled ) ) {
- options.disabled = $.unique( options.disabled.concat(
- $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
- return that.tabs.index( li );
- })
- ) ).sort();
- }
-
- // check for length avoids error when initializing empty list
- if ( this.options.active !== false && this.anchors.length ) {
- this.active = this._findActive( options.active );
- } else {
- this.active = $();
- }
-
- this._refresh();
-
- if ( this.active.length ) {
- this.load( options.active );
- }
- },
-
- _initialActive: function() {
- var active = this.options.active,
- collapsible = this.options.collapsible,
- locationHash = location.hash.substring( 1 );
-
- if ( active === null ) {
- // check the fragment identifier in the URL
- if ( locationHash ) {
- this.tabs.each(function( i, tab ) {
- if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
- active = i;
- return false;
- }
- });
- }
-
- // check for a tab marked active via a class
- if ( active === null ) {
- active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
- }
-
- // no active tab, set to false
- if ( active === null || active === -1 ) {
- active = this.tabs.length ? 0 : false;
- }
- }
-
- // handle numbers: negative, out of range
- if ( active !== false ) {
- active = this.tabs.index( this.tabs.eq( active ) );
- if ( active === -1 ) {
- active = collapsible ? false : 0;
- }
- }
-
- // don't allow collapsible: false and active: false
- if ( !collapsible && active === false && this.anchors.length ) {
- active = 0;
- }
-
- return active;
- },
-
- _getCreateEventData: function() {
- return {
- tab: this.active,
- panel: !this.active.length ? $() : this._getPanelForTab( this.active )
- };
- },
-
- _tabKeydown: function( event ) {
- var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
- selectedIndex = this.tabs.index( focusedTab ),
- goingForward = true;
-
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- switch ( event.keyCode ) {
- case $.ui.keyCode.RIGHT:
- case $.ui.keyCode.DOWN:
- selectedIndex++;
- break;
- case $.ui.keyCode.UP:
- case $.ui.keyCode.LEFT:
- goingForward = false;
- selectedIndex--;
- break;
- case $.ui.keyCode.END:
- selectedIndex = this.anchors.length - 1;
- break;
- case $.ui.keyCode.HOME:
- selectedIndex = 0;
- break;
- case $.ui.keyCode.SPACE:
- // Activate only, no collapsing
- event.preventDefault();
- clearTimeout( this.activating );
- this._activate( selectedIndex );
- return;
- case $.ui.keyCode.ENTER:
- // Toggle (cancel delayed activation, allow collapsing)
- event.preventDefault();
- clearTimeout( this.activating );
- // Determine if we should collapse or activate
- this._activate( selectedIndex === this.options.active ? false : selectedIndex );
- return;
- default:
- return;
- }
-
- // Focus the appropriate tab, based on which key was pressed
- event.preventDefault();
- clearTimeout( this.activating );
- selectedIndex = this._focusNextTab( selectedIndex, goingForward );
-
- // Navigating with control/command key will prevent automatic activation
- if ( !event.ctrlKey && !event.metaKey ) {
-
- // Update aria-selected immediately so that AT think the tab is already selected.
- // Otherwise AT may confuse the user by stating that they need to activate the tab,
- // but the tab will already be activated by the time the announcement finishes.
- focusedTab.attr( "aria-selected", "false" );
- this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
-
- this.activating = this._delay(function() {
- this.option( "active", selectedIndex );
- }, this.delay );
- }
- },
-
- _panelKeydown: function( event ) {
- if ( this._handlePageNav( event ) ) {
- return;
- }
-
- // Ctrl+up moves focus to the current tab
- if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
- event.preventDefault();
- this.active.focus();
- }
- },
-
- // Alt+page up/down moves focus to the previous/next tab (and activates)
- _handlePageNav: function( event ) {
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
- this._activate( this._focusNextTab( this.options.active - 1, false ) );
- return true;
- }
- if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
- this._activate( this._focusNextTab( this.options.active + 1, true ) );
- return true;
- }
- },
-
- _findNextTab: function( index, goingForward ) {
- var lastTabIndex = this.tabs.length - 1;
-
- function constrain() {
- if ( index > lastTabIndex ) {
- index = 0;
- }
- if ( index < 0 ) {
- index = lastTabIndex;
- }
- return index;
- }
-
- while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
- index = goingForward ? index + 1 : index - 1;
- }
-
- return index;
- },
-
- _focusNextTab: function( index, goingForward ) {
- index = this._findNextTab( index, goingForward );
- this.tabs.eq( index ).focus();
- return index;
- },
-
- _setOption: function( key, value ) {
- if ( key === "active" ) {
- // _activate() will handle invalid values and update this.options
- this._activate( value );
- return;
- }
-
- if ( key === "disabled" ) {
- // don't use the widget factory's disabled handling
- this._setupDisabled( value );
- return;
- }
-
- this._super( key, value);
-
- if ( key === "collapsible" ) {
- this.element.toggleClass( "ui-tabs-collapsible", value );
- // Setting collapsible: false while collapsed; open first panel
- if ( !value && this.options.active === false ) {
- this._activate( 0 );
- }
- }
-
- if ( key === "event" ) {
- this._setupEvents( value );
- }
-
- if ( key === "heightStyle" ) {
- this._setupHeightStyle( value );
- }
- },
-
- _sanitizeSelector: function( hash ) {
- return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
- },
-
- refresh: function() {
- var options = this.options,
- lis = this.tablist.children( ":has(a[href])" );
-
- // get disabled tabs from class attribute from HTML
- // this will get converted to a boolean if needed in _refresh()
- options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
- return lis.index( tab );
- });
-
- this._processTabs();
-
- // was collapsed or no tabs
- if ( options.active === false || !this.anchors.length ) {
- options.active = false;
- this.active = $();
- // was active, but active tab is gone
- } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
- // all remaining tabs are disabled
- if ( this.tabs.length === options.disabled.length ) {
- options.active = false;
- this.active = $();
- // activate previous tab
- } else {
- this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
- }
- // was active, active tab still exists
- } else {
- // make sure active index is correct
- options.active = this.tabs.index( this.active );
- }
-
- this._refresh();
- },
-
- _refresh: function() {
- this._setupDisabled( this.options.disabled );
- this._setupEvents( this.options.event );
- this._setupHeightStyle( this.options.heightStyle );
-
- this.tabs.not( this.active ).attr({
- "aria-selected": "false",
- "aria-expanded": "false",
- tabIndex: -1
- });
- this.panels.not( this._getPanelForTab( this.active ) )
- .hide()
- .attr({
- "aria-hidden": "true"
- });
-
- // Make sure one tab is in the tab order
- if ( !this.active.length ) {
- this.tabs.eq( 0 ).attr( "tabIndex", 0 );
- } else {
- this.active
- .addClass( "ui-tabs-active ui-state-active" )
- .attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- this._getPanelForTab( this.active )
- .show()
- .attr({
- "aria-hidden": "false"
- });
- }
- },
-
- _processTabs: function() {
- var that = this,
- prevTabs = this.tabs,
- prevAnchors = this.anchors,
- prevPanels = this.panels;
-
- this.tablist = this._getList()
- .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .attr( "role", "tablist" )
-
- // Prevent users from focusing disabled tabs via click
- .delegate( "> li", "mousedown" + this.eventNamespace, function( event ) {
- if ( $( this ).is( ".ui-state-disabled" ) ) {
- event.preventDefault();
- }
- })
-
- // support: IE <9
- // Preventing the default action in mousedown doesn't prevent IE
- // from focusing the element, so if the anchor gets focused, blur.
- // We don't have to worry about focusing the previously focused
- // element since clicking on a non-focusable element should focus
- // the body anyway.
- .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
- if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
- this.blur();
- }
- });
-
- this.tabs = this.tablist.find( "> li:has(a[href])" )
- .addClass( "ui-state-default ui-corner-top" )
- .attr({
- role: "tab",
- tabIndex: -1
- });
-
- this.anchors = this.tabs.map(function() {
- return $( "a", this )[ 0 ];
- })
- .addClass( "ui-tabs-anchor" )
- .attr({
- role: "presentation",
- tabIndex: -1
- });
-
- this.panels = $();
-
- this.anchors.each(function( i, anchor ) {
- var selector, panel, panelId,
- anchorId = $( anchor ).uniqueId().attr( "id" ),
- tab = $( anchor ).closest( "li" ),
- originalAriaControls = tab.attr( "aria-controls" );
-
- // inline tab
- if ( that._isLocal( anchor ) ) {
- selector = anchor.hash;
- panelId = selector.substring( 1 );
- panel = that.element.find( that._sanitizeSelector( selector ) );
- // remote tab
- } else {
- // If the tab doesn't already have aria-controls,
- // generate an id by using a throw-away element
- panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
- selector = "#" + panelId;
- panel = that.element.find( selector );
- if ( !panel.length ) {
- panel = that._createPanel( panelId );
- panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
- }
- panel.attr( "aria-live", "polite" );
- }
-
- if ( panel.length) {
- that.panels = that.panels.add( panel );
- }
- if ( originalAriaControls ) {
- tab.data( "ui-tabs-aria-controls", originalAriaControls );
- }
- tab.attr({
- "aria-controls": panelId,
- "aria-labelledby": anchorId
- });
- panel.attr( "aria-labelledby", anchorId );
- });
-
- this.panels
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .attr( "role", "tabpanel" );
-
- // Avoid memory leaks (#10056)
- if ( prevTabs ) {
- this._off( prevTabs.not( this.tabs ) );
- this._off( prevAnchors.not( this.anchors ) );
- this._off( prevPanels.not( this.panels ) );
- }
- },
-
- // allow overriding how to find the list for rare usage scenarios (#7715)
- _getList: function() {
- return this.tablist || this.element.find( "ol,ul" ).eq( 0 );
- },
-
- _createPanel: function( id ) {
- return $( "<div>" )
- .attr( "id", id )
- .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
- .data( "ui-tabs-destroy", true );
- },
-
- _setupDisabled: function( disabled ) {
- if ( $.isArray( disabled ) ) {
- if ( !disabled.length ) {
- disabled = false;
- } else if ( disabled.length === this.anchors.length ) {
- disabled = true;
- }
- }
-
- // disable tabs
- for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
- if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
- $( li )
- .addClass( "ui-state-disabled" )
- .attr( "aria-disabled", "true" );
- } else {
- $( li )
- .removeClass( "ui-state-disabled" )
- .removeAttr( "aria-disabled" );
- }
- }
-
- this.options.disabled = disabled;
- },
-
- _setupEvents: function( event ) {
- var events = {};
- if ( event ) {
- $.each( event.split(" "), function( index, eventName ) {
- events[ eventName ] = "_eventHandler";
- });
- }
-
- this._off( this.anchors.add( this.tabs ).add( this.panels ) );
- // Always prevent the default action, even when disabled
- this._on( true, this.anchors, {
- click: function( event ) {
- event.preventDefault();
- }
- });
- this._on( this.anchors, events );
- this._on( this.tabs, { keydown: "_tabKeydown" } );
- this._on( this.panels, { keydown: "_panelKeydown" } );
-
- this._focusable( this.tabs );
- this._hoverable( this.tabs );
- },
-
- _setupHeightStyle: function( heightStyle ) {
- var maxHeight,
- parent = this.element.parent();
-
- if ( heightStyle === "fill" ) {
- maxHeight = parent.height();
- maxHeight -= this.element.outerHeight() - this.element.height();
-
- this.element.siblings( ":visible" ).each(function() {
- var elem = $( this ),
- position = elem.css( "position" );
-
- if ( position === "absolute" || position === "fixed" ) {
- return;
- }
- maxHeight -= elem.outerHeight( true );
- });
-
- this.element.children().not( this.panels ).each(function() {
- maxHeight -= $( this ).outerHeight( true );
- });
-
- this.panels.each(function() {
- $( this ).height( Math.max( 0, maxHeight -
- $( this ).innerHeight() + $( this ).height() ) );
- })
- .css( "overflow", "auto" );
- } else if ( heightStyle === "auto" ) {
- maxHeight = 0;
- this.panels.each(function() {
- maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
- }).height( maxHeight );
- }
- },
-
- _eventHandler: function( event ) {
- var options = this.options,
- active = this.active,
- anchor = $( event.currentTarget ),
- tab = anchor.closest( "li" ),
- clickedIsActive = tab[ 0 ] === active[ 0 ],
- collapsing = clickedIsActive && options.collapsible,
- toShow = collapsing ? $() : this._getPanelForTab( tab ),
- toHide = !active.length ? $() : this._getPanelForTab( active ),
- eventData = {
- oldTab: active,
- oldPanel: toHide,
- newTab: collapsing ? $() : tab,
- newPanel: toShow
- };
-
- event.preventDefault();
-
- if ( tab.hasClass( "ui-state-disabled" ) ||
- // tab is already loading
- tab.hasClass( "ui-tabs-loading" ) ||
- // can't switch durning an animation
- this.running ||
- // click on active header, but not collapsible
- ( clickedIsActive && !options.collapsible ) ||
- // allow canceling activation
- ( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
- return;
- }
-
- options.active = collapsing ? false : this.tabs.index( tab );
-
- this.active = clickedIsActive ? $() : tab;
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- if ( !toHide.length && !toShow.length ) {
- $.error( "jQuery UI Tabs: Mismatching fragment identifier." );
- }
-
- if ( toShow.length ) {
- this.load( this.tabs.index( tab ), event );
- }
- this._toggle( event, eventData );
- },
-
- // handles show/hide for selecting tabs
- _toggle: function( event, eventData ) {
- var that = this,
- toShow = eventData.newPanel,
- toHide = eventData.oldPanel;
-
- this.running = true;
-
- function complete() {
- that.running = false;
- that._trigger( "activate", event, eventData );
- }
-
- function show() {
- eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
-
- if ( toShow.length && that.options.show ) {
- that._show( toShow, that.options.show, complete );
- } else {
- toShow.show();
- complete();
- }
- }
-
- // start out by hiding, then showing, then completing
- if ( toHide.length && this.options.hide ) {
- this._hide( toHide, this.options.hide, function() {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- show();
- });
- } else {
- eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
- toHide.hide();
- show();
- }
-
- toHide.attr( "aria-hidden", "true" );
- eventData.oldTab.attr({
- "aria-selected": "false",
- "aria-expanded": "false"
- });
- // If we're switching tabs, remove the old tab from the tab order.
- // If we're opening from collapsed state, remove the previous tab from the tab order.
- // If we're collapsing, then keep the collapsing tab in the tab order.
- if ( toShow.length && toHide.length ) {
- eventData.oldTab.attr( "tabIndex", -1 );
- } else if ( toShow.length ) {
- this.tabs.filter(function() {
- return $( this ).attr( "tabIndex" ) === 0;
- })
- .attr( "tabIndex", -1 );
- }
-
- toShow.attr( "aria-hidden", "false" );
- eventData.newTab.attr({
- "aria-selected": "true",
- "aria-expanded": "true",
- tabIndex: 0
- });
- },
-
- _activate: function( index ) {
- var anchor,
- active = this._findActive( index );
-
- // trying to activate the already active panel
- if ( active[ 0 ] === this.active[ 0 ] ) {
- return;
- }
-
- // trying to collapse, simulate a click on the current active header
- if ( !active.length ) {
- active = this.active;
- }
-
- anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
- this._eventHandler({
- target: anchor,
- currentTarget: anchor,
- preventDefault: $.noop
- });
- },
-
- _findActive: function( index ) {
- return index === false ? $() : this.tabs.eq( index );
- },
-
- _getIndex: function( index ) {
- // meta-function to give users option to provide a href string instead of a numerical index.
- if ( typeof index === "string" ) {
- index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
- }
-
- return index;
- },
-
- _destroy: function() {
- if ( this.xhr ) {
- this.xhr.abort();
- }
-
- this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
-
- this.tablist
- .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
- .removeAttr( "role" );
-
- this.anchors
- .removeClass( "ui-tabs-anchor" )
- .removeAttr( "role" )
- .removeAttr( "tabIndex" )
- .removeUniqueId();
-
- this.tablist.unbind( this.eventNamespace );
-
- this.tabs.add( this.panels ).each(function() {
- if ( $.data( this, "ui-tabs-destroy" ) ) {
- $( this ).remove();
- } else {
- $( this )
- .removeClass( "ui-state-default ui-state-active ui-state-disabled " +
- "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
- .removeAttr( "tabIndex" )
- .removeAttr( "aria-live" )
- .removeAttr( "aria-busy" )
- .removeAttr( "aria-selected" )
- .removeAttr( "aria-labelledby" )
- .removeAttr( "aria-hidden" )
- .removeAttr( "aria-expanded" )
- .removeAttr( "role" );
- }
- });
-
- this.tabs.each(function() {
- var li = $( this ),
- prev = li.data( "ui-tabs-aria-controls" );
- if ( prev ) {
- li
- .attr( "aria-controls", prev )
- .removeData( "ui-tabs-aria-controls" );
- } else {
- li.removeAttr( "aria-controls" );
- }
- });
-
- this.panels.show();
-
- if ( this.options.heightStyle !== "content" ) {
- this.panels.css( "height", "" );
- }
- },
-
- enable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === false ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = false;
- } else {
- index = this._getIndex( index );
- if ( $.isArray( disabled ) ) {
- disabled = $.map( disabled, function( num ) {
- return num !== index ? num : null;
- });
- } else {
- disabled = $.map( this.tabs, function( li, num ) {
- return num !== index ? num : null;
- });
- }
- }
- this._setupDisabled( disabled );
- },
-
- disable: function( index ) {
- var disabled = this.options.disabled;
- if ( disabled === true ) {
- return;
- }
-
- if ( index === undefined ) {
- disabled = true;
- } else {
- index = this._getIndex( index );
- if ( $.inArray( index, disabled ) !== -1 ) {
- return;
- }
- if ( $.isArray( disabled ) ) {
- disabled = $.merge( [ index ], disabled ).sort();
- } else {
- disabled = [ index ];
- }
- }
- this._setupDisabled( disabled );
- },
-
- load: function( index, event ) {
- index = this._getIndex( index );
- var that = this,
- tab = this.tabs.eq( index ),
- anchor = tab.find( ".ui-tabs-anchor" ),
- panel = this._getPanelForTab( tab ),
- eventData = {
- tab: tab,
- panel: panel
- },
- complete = function( jqXHR, status ) {
- if ( status === "abort" ) {
- that.panels.stop( false, true );
- }
-
- tab.removeClass( "ui-tabs-loading" );
- panel.removeAttr( "aria-busy" );
-
- if ( jqXHR === that.xhr ) {
- delete that.xhr;
- }
- };
-
- // not remote
- if ( this._isLocal( anchor[ 0 ] ) ) {
- return;
- }
-
- this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
-
- // support: jQuery <1.8
- // jQuery <1.8 returns false if the request is canceled in beforeSend,
- // but as of 1.8, $.ajax() always returns a jqXHR object.
- if ( this.xhr && this.xhr.statusText !== "canceled" ) {
- tab.addClass( "ui-tabs-loading" );
- panel.attr( "aria-busy", "true" );
-
- this.xhr
- .done(function( response, status, jqXHR ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- panel.html( response );
- that._trigger( "load", event, eventData );
-
- complete( jqXHR, status );
- }, 1 );
- })
- .fail(function( jqXHR, status ) {
- // support: jQuery <1.8
- // http://bugs.jquery.com/ticket/11778
- setTimeout(function() {
- complete( jqXHR, status );
- }, 1 );
- });
- }
- },
-
- _ajaxSettings: function( anchor, event, eventData ) {
- var that = this;
- return {
- url: anchor.attr( "href" ),
- beforeSend: function( jqXHR, settings ) {
- return that._trigger( "beforeLoad", event,
- $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
- }
- };
- },
-
- _getPanelForTab: function( tab ) {
- var id = $( tab ).attr( "aria-controls" );
- return this.element.find( this._sanitizeSelector( "#" + id ) );
- }
-});
-
-
-/*!
- * jQuery UI Tooltip 1.11.4
- * http://jqueryui.com
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license.
- * http://jquery.org/license
- *
- * http://api.jqueryui.com/tooltip/
- */
-
-
-var tooltip = $.widget( "ui.tooltip", {
- version: "1.11.4",
- options: {
- content: function() {
- // support: IE<9, Opera in jQuery <1.7
- // .text() can't accept undefined, so coerce to a string
- var title = $( this ).attr( "title" ) || "";
- // Escape title, since we're going from an attribute to raw HTML
- return $( "<a>" ).text( title ).html();
- },
- hide: true,
- // Disabled elements have inconsistent behavior across browsers (#8661)
- items: "[title]:not([disabled])",
- position: {
- my: "left top+15",
- at: "left bottom",
- collision: "flipfit flip"
- },
- show: true,
- tooltipClass: null,
- track: false,
-
- // callbacks
- close: null,
- open: null
- },
-
- _addDescribedBy: function( elem, id ) {
- var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
- describedby.push( id );
- elem
- .data( "ui-tooltip-id", id )
- .attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
- },
-
- _removeDescribedBy: function( elem ) {
- var id = elem.data( "ui-tooltip-id" ),
- describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
- index = $.inArray( id, describedby );
-
- if ( index !== -1 ) {
- describedby.splice( index, 1 );
- }
-
- elem.removeData( "ui-tooltip-id" );
- describedby = $.trim( describedby.join( " " ) );
- if ( describedby ) {
- elem.attr( "aria-describedby", describedby );
- } else {
- elem.removeAttr( "aria-describedby" );
- }
- },
-
- _create: function() {
- this._on({
- mouseover: "open",
- focusin: "open"
- });
-
- // IDs of generated tooltips, needed for destroy
- this.tooltips = {};
-
- // IDs of parent tooltips where we removed the title attribute
- this.parents = {};
-
- if ( this.options.disabled ) {
- this._disable();
- }
-
- // Append the aria-live region so tooltips announce correctly
- this.liveRegion = $( "<div>" )
- .attr({
- role: "log",
- "aria-live": "assertive",
- "aria-relevant": "additions"
- })
- .addClass( "ui-helper-hidden-accessible" )
- .appendTo( this.document[ 0 ].body );
- },
-
- _setOption: function( key, value ) {
- var that = this;
-
- if ( key === "disabled" ) {
- this[ value ? "_disable" : "_enable" ]();
- this.options[ key ] = value;
- // disable element style changes
- return;
- }
-
- this._super( key, value );
-
- if ( key === "content" ) {
- $.each( this.tooltips, function( id, tooltipData ) {
- that._updateContent( tooltipData.element );
- });
- }
- },
-
- _disable: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, tooltipData ) {
- var event = $.Event( "blur" );
- event.target = event.currentTarget = tooltipData.element[ 0 ];
- that.close( event, true );
- });
-
- // remove title attributes to prevent native tooltips
- this.element.find( this.options.items ).addBack().each(function() {
- var element = $( this );
- if ( element.is( "[title]" ) ) {
- element
- .data( "ui-tooltip-title", element.attr( "title" ) )
- .removeAttr( "title" );
- }
- });
- },
-
- _enable: function() {
- // restore title attributes
- this.element.find( this.options.items ).addBack().each(function() {
- var element = $( this );
- if ( element.data( "ui-tooltip-title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- });
- },
-
- open: function( event ) {
- var that = this,
- target = $( event ? event.target : this.element )
- // we need closest here due to mouseover bubbling,
- // but always pointing at the same event target
- .closest( this.options.items );
-
- // No element to show a tooltip for or the tooltip is already open
- if ( !target.length || target.data( "ui-tooltip-id" ) ) {
- return;
- }
-
- if ( target.attr( "title" ) ) {
- target.data( "ui-tooltip-title", target.attr( "title" ) );
- }
-
- target.data( "ui-tooltip-open", true );
-
- // kill parent tooltips, custom or native, for hover
- if ( event && event.type === "mouseover" ) {
- target.parents().each(function() {
- var parent = $( this ),
- blurEvent;
- if ( parent.data( "ui-tooltip-open" ) ) {
- blurEvent = $.Event( "blur" );
- blurEvent.target = blurEvent.currentTarget = this;
- that.close( blurEvent, true );
- }
- if ( parent.attr( "title" ) ) {
- parent.uniqueId();
- that.parents[ this.id ] = {
- element: this,
- title: parent.attr( "title" )
- };
- parent.attr( "title", "" );
- }
- });
- }
-
- this._registerCloseHandlers( event, target );
- this._updateContent( target, event );
- },
-
- _updateContent: function( target, event ) {
- var content,
- contentOption = this.options.content,
- that = this,
- eventType = event ? event.type : null;
-
- if ( typeof contentOption === "string" ) {
- return this._open( event, target, contentOption );
- }
-
- content = contentOption.call( target[0], function( response ) {
-
- // IE may instantly serve a cached response for ajax requests
- // delay this call to _open so the other call to _open runs first
- that._delay(function() {
-
- // Ignore async response if tooltip was closed already
- if ( !target.data( "ui-tooltip-open" ) ) {
- return;
- }
-
- // jQuery creates a special event for focusin when it doesn't
- // exist natively. To improve performance, the native event
- // object is reused and the type is changed. Therefore, we can't
- // rely on the type being correct after the event finished
- // bubbling, so we set it back to the previous value. (#8740)
- if ( event ) {
- event.type = eventType;
- }
- this._open( event, target, response );
- });
- });
- if ( content ) {
- this._open( event, target, content );
- }
- },
-
- _open: function( event, target, content ) {
- var tooltipData, tooltip, delayedShow, a11yContent,
- positionOption = $.extend( {}, this.options.position );
-
- if ( !content ) {
- return;
- }
-
- // Content can be updated multiple times. If the tooltip already
- // exists, then just update the content and bail.
- tooltipData = this._find( target );
- if ( tooltipData ) {
- tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
- return;
- }
-
- // if we have a title, clear it to prevent the native tooltip
- // we have to check first to avoid defining a title if none exists
- // (we don't want to cause an element to start matching [title])
- //
- // We use removeAttr only for key events, to allow IE to export the correct
- // accessible attributes. For mouse events, set to empty string to avoid
- // native tooltip showing up (happens only when removing inside mouseover).
- if ( target.is( "[title]" ) ) {
- if ( event && event.type === "mouseover" ) {
- target.attr( "title", "" );
- } else {
- target.removeAttr( "title" );
- }
- }
-
- tooltipData = this._tooltip( target );
- tooltip = tooltipData.tooltip;
- this._addDescribedBy( target, tooltip.attr( "id" ) );
- tooltip.find( ".ui-tooltip-content" ).html( content );
-
- // Support: Voiceover on OS X, JAWS on IE <= 9
- // JAWS announces deletions even when aria-relevant="additions"
- // Voiceover will sometimes re-read the entire log region's contents from the beginning
- this.liveRegion.children().hide();
- if ( content.clone ) {
- a11yContent = content.clone();
- a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
- } else {
- a11yContent = content;
- }
- $( "<div>" ).html( a11yContent ).appendTo( this.liveRegion );
-
- function position( event ) {
- positionOption.of = event;
- if ( tooltip.is( ":hidden" ) ) {
- return;
- }
- tooltip.position( positionOption );
- }
- if ( this.options.track && event && /^mouse/.test( event.type ) ) {
- this._on( this.document, {
- mousemove: position
- });
- // trigger once to override element-relative positioning
- position( event );
- } else {
- tooltip.position( $.extend({
- of: target
- }, this.options.position ) );
- }
-
- tooltip.hide();
-
- this._show( tooltip, this.options.show );
- // Handle tracking tooltips that are shown with a delay (#8644). As soon
- // as the tooltip is visible, position the tooltip using the most recent
- // event.
- if ( this.options.show && this.options.show.delay ) {
- delayedShow = this.delayedShow = setInterval(function() {
- if ( tooltip.is( ":visible" ) ) {
- position( positionOption.of );
- clearInterval( delayedShow );
- }
- }, $.fx.interval );
- }
-
- this._trigger( "open", event, { tooltip: tooltip } );
- },
-
- _registerCloseHandlers: function( event, target ) {
- var events = {
- keyup: function( event ) {
- if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
- var fakeEvent = $.Event(event);
- fakeEvent.currentTarget = target[0];
- this.close( fakeEvent, true );
- }
- }
- };
-
- // Only bind remove handler for delegated targets. Non-delegated
- // tooltips will handle this in destroy.
- if ( target[ 0 ] !== this.element[ 0 ] ) {
- events.remove = function() {
- this._removeTooltip( this._find( target ).tooltip );
- };
- }
-
- if ( !event || event.type === "mouseover" ) {
- events.mouseleave = "close";
- }
- if ( !event || event.type === "focusin" ) {
- events.focusout = "close";
- }
- this._on( true, target, events );
- },
-
- close: function( event ) {
- var tooltip,
- that = this,
- target = $( event ? event.currentTarget : this.element ),
- tooltipData = this._find( target );
-
- // The tooltip may already be closed
- if ( !tooltipData ) {
-
- // We set ui-tooltip-open immediately upon open (in open()), but only set the
- // additional data once there's actually content to show (in _open()). So even if the
- // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
- // the period between open() and _open().
- target.removeData( "ui-tooltip-open" );
- return;
- }
-
- tooltip = tooltipData.tooltip;
-
- // disabling closes the tooltip, so we need to track when we're closing
- // to avoid an infinite loop in case the tooltip becomes disabled on close
- if ( tooltipData.closing ) {
- return;
- }
-
- // Clear the interval for delayed tracking tooltips
- clearInterval( this.delayedShow );
-
- // only set title if we had one before (see comment in _open())
- // If the title attribute has changed since open(), don't restore
- if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
- target.attr( "title", target.data( "ui-tooltip-title" ) );
- }
-
- this._removeDescribedBy( target );
-
- tooltipData.hiding = true;
- tooltip.stop( true );
- this._hide( tooltip, this.options.hide, function() {
- that._removeTooltip( $( this ) );
- });
-
- target.removeData( "ui-tooltip-open" );
- this._off( target, "mouseleave focusout keyup" );
-
- // Remove 'remove' binding only on delegated targets
- if ( target[ 0 ] !== this.element[ 0 ] ) {
- this._off( target, "remove" );
- }
- this._off( this.document, "mousemove" );
-
- if ( event && event.type === "mouseleave" ) {
- $.each( this.parents, function( id, parent ) {
- $( parent.element ).attr( "title", parent.title );
- delete that.parents[ id ];
- });
- }
-
- tooltipData.closing = true;
- this._trigger( "close", event, { tooltip: tooltip } );
- if ( !tooltipData.hiding ) {
- tooltipData.closing = false;
- }
- },
-
- _tooltip: function( element ) {
- var tooltip = $( "<div>" )
- .attr( "role", "tooltip" )
- .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
- ( this.options.tooltipClass || "" ) ),
- id = tooltip.uniqueId().attr( "id" );
-
- $( "<div>" )
- .addClass( "ui-tooltip-content" )
- .appendTo( tooltip );
-
- tooltip.appendTo( this.document[0].body );
-
- return this.tooltips[ id ] = {
- element: element,
- tooltip: tooltip
- };
- },
-
- _find: function( target ) {
- var id = target.data( "ui-tooltip-id" );
- return id ? this.tooltips[ id ] : null;
- },
-
- _removeTooltip: function( tooltip ) {
- tooltip.remove();
- delete this.tooltips[ tooltip.attr( "id" ) ];
- },
-
- _destroy: function() {
- var that = this;
-
- // close open tooltips
- $.each( this.tooltips, function( id, tooltipData ) {
- // Delegate to close method to handle common cleanup
- var event = $.Event( "blur" ),
- element = tooltipData.element;
- event.target = event.currentTarget = element[ 0 ];
- that.close( event, true );
-
- // Remove immediately; destroying an open tooltip doesn't use the
- // hide animation
- $( "#" + id ).remove();
-
- // Restore the title
- if ( element.data( "ui-tooltip-title" ) ) {
- // If the title attribute has changed since open(), don't restore
- if ( !element.attr( "title" ) ) {
- element.attr( "title", element.data( "ui-tooltip-title" ) );
- }
- element.removeData( "ui-tooltip-title" );
- }
- });
- this.liveRegion.remove();
- }
-});
-
-
-
-})); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/js/jquery.mask.min.js b/usecaseui-common/src/main/webapp/static/js/jquery.mask.min.js
deleted file mode 100644
index 984b5b02..00000000
--- a/usecaseui-common/src/main/webapp/static/js/jquery.mask.min.js
+++ /dev/null
@@ -1,12 +0,0 @@
-// jQuery Mask Plugin v1.7.7
-// github.com/igorescobar/jQuery-Mask-Plugin
-(function(f){"function"===typeof define&&define.amd?define(["jquery"],f):f(window.jQuery||window.Zepto)})(function(f){var A=function(a,d,b){var h=this,m,p;a=f(a);d="function"===typeof d?d(a.val(),void 0,a,b):d;var c={getCaret:function(){try{var e,l=0,c=a.get(0),g=document.selection,d=c.selectionStart;if(g&&!~navigator.appVersion.indexOf("MSIE 10"))e=g.createRange(),e.moveStart("character",a.is("input")?-a.val().length:-a.text().length),l=e.text.length;else if(d||"0"===d)l=d;return l}catch(b){}},setCaret:function(e){try{if(a.is(":focus")){var l,
-c=a.get(0);c.setSelectionRange?c.setSelectionRange(e,e):c.createTextRange&&(l=c.createTextRange(),l.collapse(!0),l.moveEnd("character",e),l.moveStart("character",e),l.select())}}catch(g){}},events:function(){a.on("keydown.mask",function(){m=c.val()}).on("keyup.mask",c.behaviour).on("paste.mask drop.mask",function(){setTimeout(function(){a.keydown().keyup()},100)}).on("change.mask",function(){a.data("changed",!0)}).on("blur.mask",function(){m===a.val()||a.data("changed")||a.trigger("change");a.data("changed",
-!1)}).on("focusout.mask",function(){b.clearIfNotMatch&&!p.test(c.val())&&c.val("")})},getRegexMask:function(){for(var e=[],a,c,g,b,k=0;k<d.length;k++)(a=h.translation[d[k]])?(c=a.pattern.toString().replace(/.{1}$|^.{1}/g,""),g=a.optional,(a=a.recursive)?(e.push(d[k]),b={digit:d[k],pattern:c}):e.push(g||a?c+"?":c)):e.push(d[k].replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"));e=e.join("");b&&(e=e.replace(new RegExp("("+b.digit+"(.*"+b.digit+")?)"),"($1)?").replace(new RegExp(b.digit,"g"),b.pattern));return new RegExp(e)},
-destroyEvents:function(){a.off("keydown keyup paste drop change blur focusout DOMNodeInserted ".split(" ").join(".mask ")).removeData("changeCalled")},val:function(e){var c=a.is("input");return 0<arguments.length?c?a.val(e):a.text(e):c?a.val():a.text()},getMCharsBeforeCount:function(e,a){for(var c=0,b=0,f=d.length;b<f&&b<e;b++)h.translation[d.charAt(b)]||(e=a?e+1:e,c++);return c},caretPos:function(e,a,b,g){return h.translation[d.charAt(Math.min(e-1,d.length-1))]?Math.min(e+b-a-g,b):c.caretPos(e+1,
-a,b,g)},behaviour:function(a){a=a||window.event;var b=a.keyCode||a.which;if(-1===f.inArray(b,h.byPassKeys)){var d=c.getCaret(),g=c.val(),t=g.length,k=d<t,m=c.getMasked(),n=m.length,p=c.getMCharsBeforeCount(n-1)-c.getMCharsBeforeCount(t-1);m!==g&&c.val(m);!k||65===b&&a.ctrlKey||(8!==b&&46!==b&&(d=c.caretPos(d,t,n,p)),c.setCaret(d));return c.callbacks(a)}},getMasked:function(a){var l=[],f=c.val(),g=0,m=d.length,k=0,p=f.length,n=1,u="push",r=-1,q,v;b.reverse?(u="unshift",n=-1,q=0,g=m-1,k=p-1,v=function(){return-1<
-g&&-1<k}):(q=m-1,v=function(){return g<m&&k<p});for(;v();){var w=d.charAt(g),x=f.charAt(k),s=h.translation[w];if(s)x.match(s.pattern)?(l[u](x),s.recursive&&(-1===r?r=g:g===q&&(g=r-n),q===r&&(g-=n)),g+=n):s.optional&&(g+=n,k-=n),k+=n;else{if(!a)l[u](w);x===w&&(k+=n);g+=n}}a=d.charAt(q);m!==p+1||h.translation[a]||l.push(a);return l.join("")},callbacks:function(e){var f=c.val(),h=f!==m;if(!0===h&&"function"===typeof b.onChange)b.onChange(f,e,a,b);if(!0===h&&"function"===typeof b.onKeyPress)b.onKeyPress(f,
-e,a,b);if("function"===typeof b.onComplete&&f.length===d.length)b.onComplete(f,e,a,b)}};h.mask=d;h.options=b;h.remove=function(){var b;c.destroyEvents();c.val(h.getCleanVal()).removeAttr("maxlength");b=c.getCaret();c.setCaret(b-c.getMCharsBeforeCount(b));return a};h.getCleanVal=function(){return c.getMasked(!0)};h.init=function(){b=b||{};h.byPassKeys=[9,16,17,18,36,37,38,39,40,91];h.translation={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},
-S:{pattern:/[a-zA-Z]/}};h.translation=f.extend({},h.translation,b.translation);h=f.extend(!0,{},h,b);p=c.getRegexMask();!1!==b.maxlength&&a.attr("maxlength",d.length);b.placeholder&&a.attr("placeholder",b.placeholder);a.attr("autocomplete","off");c.destroyEvents();c.events();var e=c.getCaret();c.val(c.getMasked());c.setCaret(e+c.getMCharsBeforeCount(e,!0))}()},y={},z=function(){var a=f(this),d={};a.attr("data-mask-reverse")&&(d.reverse=!0);"false"===a.attr("data-mask-maxlength")&&(d.maxlength=!1);
-a.attr("data-mask-clearifnotmatch")&&(d.clearIfNotMatch=!0);a.mask(a.attr("data-mask"),d)};f.fn.mask=function(a,d){var b=this.selector,h=function(){var b=f(this).data("mask"),h=JSON.stringify;if("object"!==typeof b||h(b.options)!==h(d)||b.mask!==a)return f(this).data("mask",new A(this,a,d))};this.each(h);b&&!y[b]&&(y[b]=!0,setTimeout(function(){f(document).on("DOMNodeInserted.mask",b,h)},500))};f.fn.unmask=function(){try{return this.each(function(){f(this).data("mask").remove().removeData("mask")})}catch(a){}};
-f.fn.cleanVal=function(){return this.data("mask").getCleanVal()};f("*[data-mask]").each(z);f(document).on("DOMNodeInserted.mask","*[data-mask]",z)});
diff --git a/usecaseui-common/src/main/webapp/static/js/modalService.js b/usecaseui-common/src/main/webapp/static/js/modalService.js
deleted file mode 100644
index 69f01f42..00000000
--- a/usecaseui-common/src/main/webapp/static/js/modalService.js
+++ /dev/null
@@ -1,169 +0,0 @@
-angular.module("modalServices",[]).service('modalService', ['$modal', function ($modal) {
-
-
- this.showSuccess = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- $(".overlayed").css("display","none");
- $(".loadingId").css("display","none");
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
- this.showFailure = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.showWarning = function(heading, messageBody){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: heading,
- text: messageBody
- };
- return message;
- }
- }
- });
- };
-
- this.popupConfirmWin = function(title, msgBody, callback,dismissCallback){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- var args = Array.prototype.slice.call( arguments, 0 );
- args.splice( 0, 3);
- modalInstance.result.then(function(){
- callback.apply(null, args);
- }, function() {
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
- this.popupConfirmWinWithCancel = function(title, msgBody, callback,dismissCallback){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- var args = Array.prototype.slice.call( arguments, 0 );
- args.splice( 0, 3);
- modalInstance.result.then(function(){
- callback.apply(null, args);
- }, function() {
- dismissCallback();
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
- this.popupDeleteConfirmWin = function(title, msgBody, callback, argForCallBack){
- var modalInstance = $modal.open({
- templateUrl: 'confirmation_for_delete.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
-
- modalInstance.result.then(function(){
- callback(argForCallBack);
- }, function() {
- })['finally'](function(){
- modalInstance = undefined;
- });
-
- };
-
- this.popupSuccessRedirectWin = function(title, msgBody, redirectUrl){
- var modalInstance = $modal.open({
- templateUrl: 'modal_informative.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function() {
- }, function() {
- window.location.href=redirectUrl;
- })['finally'](function(){
- modalInstance = undefined;
- });
- };
-
- this.popupWarningRedirectWin = function(title, msgBody, redirectUrl){
- var modalInstance = $modal.open({
- templateUrl: 'modal_warning_message.html',
- controller: 'modalpopupController',
- resolve: {
- message: function () {
- var message = {
- title: title,
- text: msgBody
- };
- return message;
- }
- }
- });
- modalInstance.result.then(function() {
- }, function() {
- window.location.href=redirectUrl;
- })['finally'](function(){
- modalInstance = undefined;
- });
- };
- }]); \ No newline at end of file
diff --git a/usecaseui-common/src/main/webapp/static/js/search.js b/usecaseui-common/src/main/webapp/static/js/search.js
deleted file mode 100644
index c7b7ba65..00000000
--- a/usecaseui-common/src/main/webapp/static/js/search.js
+++ /dev/null
@@ -1,830 +0,0 @@
-
-// var app=angular.module("abs", ["att.abs"]);
-
-
- app.directive('afterRender', [ function() {
- var def = {
- restrict : 'A',
- terminal : true,
- transclude : false,
- link : function(scope, element, attrs) {
- if (attrs) { scope.$eval(attrs.afterRender) }
- scope.$emit('onAfterRender')
- }
- };
- return def;
- }]);
-
- app.directive("search", function() {
- return {
- // replace custom element with html5 markup
- template: '<div >'
- //+ '<c:set var="zeroidx" value="0" />'
- + '<div ng-repeat="a in optionsSizeArray track by $index"> '
- + '<div id="{{sId}}{{a}}" > '
- + ' <div class="form-field form-field__glued pull-left size-onefourth" style=" width:25%;" >'
- + ' <div att-search="options" ng-model="valueOptions[a]" placeholder="Select"></div> '
- + ' </div> '
- + ' <div class="form-field form-field__glued pull-left size-onefourth" style=" width:25%;"> '
- + ' <div att-search="operators" ng-model="compareOptions[a]" placeholder="Select"></div> '
- + ' </div> '
- + ' <div class="form-field form-field__glued pull-left size-onefourth" style=" width:25%;">'
- + ' <input ng-model="searchValue[a]" type="text" placeholder="What are you looking for?" style=" border-radius:0px 5px 5px 0px" > '
- + ' </div> '
- + ' <div class="form-field form-field__glued pull-left size-onefourth" style=" width:25%; padding-left:5px;"> '
- + ' <button ng-click="remove(sId,a)" class="myzkBtn" >-</button>'
- + ' <button ng-if="$index==0" ng-click="addSearch(sId,a,optionsSizeArray)" class="myzkBtn" >+</button> '
- + ' <button ng-if="$index==0" ng-click="updateparent({filter: { valueOptions: valueOptions, compareOptions: compareOptions, searchValue : searchValue } })" class="myzkBtn" style="background-image:url(static/ebz/images/searchIcon.png); background-repeat: no-repeat; background-position: center;">&nbsp;</button>'
- + ' </div>'
- + ' </div> '
- + '</div>'
- + '</div> ' ,
- replace: true,
- // restrict usage to element only since we use attributes for APIs
- restrict: 'EA',
- require: 'ngModel',
- // new isolate scope
- scope: {
- mSearch : '=ngModel'
- ,updateparent: '&'
- ,jsonForOption : '='
- ,jsonForOperator : '='
- ,searchId : '='
- },
- link: function(scope, iElement, iAttrs){
- scope.optionsSizeArray = [];
- scope.sId = '';
- //scope.options = JSON.parse(JSON.stringify(iAttrs.jsonForOption));
- //scope.operators = JSON.parse(iAttrs.operators);
-
- scope.$watch("jsonForOption", function(newval, oldval) {
- scope.options = JSON.parse(JSON.stringify(oldval));
- console.log('1');
- scope.evalRepeatIndex(scope.options.length);
- console.log('2');
-
- });
-
- scope.evalRepeatIndex = function(size){
- for(index = 0; index < size; index++) {
- scope.optionsSizeArray.push(index);
- }
- };
-
- scope.$watch("jsonForOperator", function(newval, oldval) {
- scope.operators = JSON.parse(JSON.stringify(oldval));
-
- });
-
- if(getParameterByName("search")!=null && getParameterByName("search")!=''){
- if((getParameterByName("location")!=null && getParameterByName("location")!='')){
- scope.searchValue[0]=JSON.parse(JSON.stringify(getParameterByName("location")));
- scope.valueOptions[0]={index:0,value:'Location Name',title:"Location Name",alias:'Location Name'};
- scope.compareOptions[0]={index:1,value:'Contains',title:"Contains",alias:'Contains'};
- }else if((getParameterByName("userLastName")!=null && getParameterByName("userLastName")!='')){
- scope.searchValue[0]=JSON.parse(JSON.stringify(getParameterByName("userLastName")));
- scope.valueOptions[0]= {index: 0, value: 'Last Name', title: 'Last Name', alias:'Last Name'};
- scope.compareOptions[0]={index:1,value:'Contains',title:"Contains",alias:'Contains'};
- }
- }
- scope.$watch("searchId", function(newval, oldval) {
- scope.sId = oldval;
- scope.hideDiv();
- });
-
- scope.showHide = function(div){
- if(div != 0){
- $("#s1").css('display', 'none');
- }
- return true;
- };
-
-
- scope.hideDiv = function(){
- console.log('3');
- console.log(scope.optionsSizeArray);
-
-
- for (i = 1; i < scope.optionsSizeArray.length; i++) {
- var element = "#"+scope.sId+i;
- $(element).css('display', 'none');
- }
-
- console.log('4');
-
- };
-
-
- $(function() {
- scope.hideDiv();
- });
-
- },
-
- controller: function ($scope) {
-
- $scope.addSearch = function(searchId, index, optionsLength){
- console.log('5');
-
- for(var i = 0; i<=optionsLength.length ;i++){
- var element = "#"+searchId+i;
- if($(element).css('display') == 'none'){
- $(element).css('display', 'inline');
- break;
- }
- };
- console.log('6');
-
- };
-
- $scope.remove = function(searchId, index){
- var remove = "#"+searchId+index;
- if(index!=0)
- $(remove).css("display", "none");
- var v ={
- index: 0,
- value: '',
- title: 'Select',
- alias:''
- };
- $scope.valueOptions[index]=v;
- $scope.compareOptions[index]=v;
- $scope.searchValue[index]="";
- };
-
- $scope.search = function() {
- var data = {
- valueOptions : $scope.valueOptions,
- compareOptions : $scope.compareOptions,
- searchValue : $scope.searchValue
- };
- };
-
- var data = {
- valueOptions : $scope.valueOptions,
- compareOptions : $scope.compareOptions,
- searchValue : $scope.searchValue
- };
-
- $scope.mSearch = data;
- $scope.valueOptions=[];
- $scope.compareOptions=[];
- $scope.searchValue=[];
- }
- }
-
- });
-
- app.directive('phoneNumberMask', [function(){
- return {
- restrict: 'A',
- require: '?ngModel',
- scope: {
- ngModel : '='
- },
- link: function(scope, el, attrs){
- scope.$watch(attrs.phoneNumberMask, function(newValue, oldValue) {
-
- if(scope.ngModel)
- scope.ngModel= scope.ngModel.replace(/(\+1)?(\d{3})(\d{3})(\d{4})/, '$2.$3.$4');
- $(el).mask("999.999.9999");
- });
- scope.$watch("ngModel", function() {
- var current = $(el).val();
- if(scope.ngModel && /^(\+1)?\d{3,}$/.test(scope.ngModel))
- scope.ngModel= scope.ngModel.replace(/(\+1)?(\d{3})(\d{3})(\d{4})/, '$2.$3.$4');
-
- });
- },
- };
- }]);
-
- app.directive('allowOnlyNumber', [function(){
- return {
- require: 'ngModel',
- link: function(scope, element, attrs, modelCtrl) {
- modelCtrl.$parsers.push(function (inputValue) {
- if (inputValue == undefined) return '';
- var transformedInput = inputValue.replace(/[^0-9]/g, '');
- if (transformedInput!=inputValue) {
- modelCtrl.$setViewValue(transformedInput);
- modelCtrl.$render();
- }
-
- return transformedInput;
- });
- }
- };
- }]);
-
- app.directive('showProcessing', function(){
- return {
- restrict: 'A',
- link: function(scope, elem, attrs) {
- elem.bind('click', function() {
- $(".overlayed").css("display","inline");
- $(".loadingId").css("display","inline");
- });
- }
- }
- });
-
-app.directive("searchCriteria", function() {
- return {
- // replace custom element with html5 markup
- template: '<div >'
- + '<div ng-repeat="a in searchCriterion track by $index" ng-show="isShown[$index]"> '
- + ' <div class="form-field form-field__glued form-field__square size-onefourth left_round_border">'
- + ' <div att-search="availableOptions[$index]" ng-model="valueOptions[$index]"></div> '
- + ' </div> '
- + ' <div class="form-field form-field__glued form-field__square size-onefourth"> '
- + ' <div att-search="availableOperators[$index]" ng-model="compareOptions[$index]" > </div> '
- + ' </div> '
- + ' <div class="form-field form-field__glued form-field__square size-onefourth right_round_border">'
- + ' <input ng-show="!availableValues[$index] || availableValues[$index].length===0" ng-model="searchValue[$index]" type="text" placeholder="What are you looking for?" class="fn-ebz-text" style="width:100%;" > '
- + ' <div ng-show="availableValues[$index] && availableValues[$index].length!==0" att-search="availableValues[$index]" ng-model="searchValue[$index]"></div> '
- + ' </div> '
- + ' <div class="form-field form-field__glued form-field__square size-onefourth" style=" padding-left:5px;" > '
- + ' <button ng-show="$index!=0" ng-click="removeSearchCriteria($index)" class="myzkBtn">-</button>'
- + ' <button ng-show="$index==0" ng-click="addSearchCriteria($index)" class="myzkBtn">+</button> '
- + ' <button ng-show="$index==0" ng-click="search()" class="myzkBtn" style="background-image:url(static/ebz/images/searchIcon.png); background-repeat: no-repeat; background-position: center;">&nbsp;</button>'
- + ' </div>'
- + ' </div> '
- + '</div> ' ,
- replace: true,
- // restrict usage to element only since we use attributes for APIs
- restrict: 'EA',
- require: 'ngModel',
- // new isolate scope
- scope: {
- mSearch : '=ngModel',
- updateparent: '&'
- ,options : '=jsonForOption'
- ,operators : '=jsonForOperator'
- },
-
- controller: function ($scope) {
- $scope.isShown = [true];
- $scope.searchCriterion = [];
- $scope.valueOptions=[];
- $scope.compareOptions=[];
- $scope.searchValue=[];
- $scope.availableOperators=[];
- $scope.availableValues=[];
- $scope.availableOptions = [];
- //init
- $scope.insertEmptyOption = function(arr){
- var hasEmpty = false;
- $.each(arr, function(i, a){
- if(a.value ===''){
- hasEmpty = true;
- }
- });
- if(!hasEmpty){
- $.each(arr, function(i, a){
- a.index +=1;
- });
- arr.unshift({index: 0, value: '', title: 'Select', alias:'Select'});
- }
- };
- $scope.findFirstOption = function(arr){
-
- };
- $scope.insertEmptyOption($scope.options);
- $scope.insertEmptyOption($scope.operators);
-
- for(var i = 0, l= $scope.options.length; i<l; i++) {
- var option= $scope.options[i];
- var n = option.maxOccurs;
- if(option.value!==''){
- if(n && Number(n)===n && n%1===0){ //maxOccurs is specified
- for(var j=0; j<n; j++){
- $scope.searchCriterion.push("");
- $scope.availableOperators.push($scope.operators);
- var valueArr = [];
- $scope.availableValues.push(valueArr);
- $scope.availableOptions.push($scope.options);
- $scope.isShown.push(false);
- }
- }else{
- $scope.searchCriterion.push("");
- $scope.availableOperators.push($scope.operators);
- var valueArr = [];
- $scope.availableValues.push(valueArr);
- $scope.availableOptions.push($scope.options);
- $scope.isShown.push(false);
- }
- }
- }
- $scope.isShown.pop();
-
- $scope.updateAvailableOptions = function(index, isFirst){
- var selectedOptions = [];//{value:'name', occurs: }
- if($scope.options && $scope.options.length > 0){
- $.each($scope.valueOptions, function(i, a){
- if(a){
- var v = a.value;
- if(v){
- var s= $.grep(selectedOptions, function(e){ return e.value === v });
-
- if(s.length ===1){
- s[0].occurs += 1;
- }else{
- selectedOptions.push({value: v, occurs:1});
- }
- }
- var o= $.grep($scope.options, function(e){ return e.value === v });
- if(o.length ===1){
- if("operators" in o[0]){
- $scope.availableOperators[i]=o[0].operators;
- $scope.insertEmptyOption($scope.availableOperators[i]);
- }else{
- $scope.availableOperators[i]=$scope.operators;
- }
- if("values" in o[0]){
- $scope.availableValues[i]=o[0].values;
- }else{
- $scope.availableValues[i]=[];
- }
- }
- }
- });
- for(var j = 0 , l = $scope.availableOptions.length; j<l ; j++){
- var newOptions = [];
- var aoi = 0;
- $.each($scope.options, function(i, a){
- var s= $.grep(selectedOptions, function(e){ return e.value === a.value });
- var maxOccurs = "maxOccurs" in a ? a.maxOccurs :1;
- if(s.length > 0 && s[0].occurs >= maxOccurs && ($scope.valueOptions[j] && $scope.valueOptions[j].value !== s[0].value)){// reach limit
- }else{
- newOptions.push({index: aoi, value: a.value, title: a.title, alias:a.alias});
- aoi += 1;
- }
- });
- $scope.availableOptions[j] = newOptions;
- if(isFirst){
- if($scope.availableValues[j].length>0)
- $scope.searchValue[j]= $scope.availableValues[j][0];
- else
- $scope.searchValue[j]="";
-
- $scope.compareOptions[j]= $scope.availableOperators[j][0];
- }
- };
-
- }
- if(typeof index !== 'undefined' && !isFirst){
- if($scope.availableValues[index].length>0)
- $scope.searchValue[index]= $scope.availableValues[index][0];
- else
- $scope.searchValue[index]="";
- }
- };
-
- $scope.updateAvailableOptions(undefined, true);
- $.each($scope.availableOptions, function(j, a){
- $scope.valueOptions[j]= a[0];
- });
- $scope.addSearchCriteria = function(index){
- for(var i = 0 , l =$scope.isShown.length; i<l; i++ ){
- if(!$scope.isShown[i]){
- $scope.isShown[i]= true;
- break;
- }
-
- }
- };
-
- $scope.removeSearchCriteria = function(index){
- $scope.isShown[index]= false;
-
-
- $scope.valueOptions[index]=$scope.availableOptions[index][0];
- $scope.compareOptions[index]=$scope.availableOperators[index][0];
- $scope.searchValue[index]="";
- };
- $scope.search = function() {
- //remove empty criteria
- var vo =[];
- var co =[];
- var sv =[];
- for(var i = 0 , l=$scope.valueOptions.length; i<l ; i++){
- if($scope.valueOptions[i].value==='' || $scope.compareOptions[i].value==='' ||(typeof $scope.searchValue[i] ==='string' && $scope.searchValue[i] ==='') || $scope.searchValue[i].value === ''){
- }else{
- vo.push($scope.valueOptions[i]);
- co.push($scope.compareOptions[i]);
- sv.push($scope.searchValue[i]);
- }
- }
- $scope.updateparent({filter: { valueOptions: vo, compareOptions: co, searchValue :sv } });
- };
-
- $scope.$watchCollection("valueOptions", function(collection, oldValue ){
- if(collection) {
- var index;
- for(var i = 0 , l =collection.length; i<l; i++ ){
- if(!oldValue[i] || oldValue[i].value!=collection[i].value){
- index = i;
- break;
- }
-
- }
- $scope.updateAvailableOptions(index);
- }
- }, true);
-
- }
- }
-
- });
-
- app.directive("selectUser", function() {
- return {
- // replace custom element with html5 markup
- template: '<div> '
- + '<table style="width:660px; margin-left:-12px;" >'
- + '<thead>'
- + ' <tr >'
- + ' <th style="width:325px;">{{availableTitle}}</th> '
- + ' <th style="width:10px;"></th> '
- + ' <th style="width:325px;">{{userTitle}}</th> '
- + '</tr>'
- + '</thead>'
- + '<tbody>'
- + '<tr>'
- + ' <td style="width:325px;">'
- + ' <div class="ebz-listbox">'
- + ' <label ng-repeat="canditateId in canditateIds track by canditateId.ociUserId" style="display:block;"> '
- + ' <input type="checkbox" style="margin-top: 10px;" ng-model="canditateId.available" att-checkbox ng-change="checkCanditate($index)"/> {{canditateId.firstName}} {{canditateId.lastName}}({{canditateId.phone}})<br/>'
- + ' </label>'
- + ' </div>'
- + '</td>'
- + '<td valign="middle" width="10px">'
- + ' <img src="static/images/rightarrow_g.png" id="removeBtn" ng-click="chooseSelected()" ng-hide="oneMax && chosenIds.length==1"/>'
- + ' <img src="static/images/leftarrow_g.png" id="chooseBtn" ng-click="removeSelected()" ng-show="oneMax && chosenIds.length==1"/>'
- + ' <br/><br/> '
- + ' <img src="static/images/leftarrow_g.png" id="chooseBtn" ng-click="removeSelected()" ng-hide="oneMax"/>'
- + ' <br/><br/>'
- + ' <img id="chooseAllBtn" src="static/images/rightrightarrow_g.png" ng-click="chooseAll()" ng-hide="oneMax"/>'
- + ' <br/><br/>'
- + ' <img style="cursor:pointer" id="removeAllBtn" src="static/images/leftleftarrow_g.png" ng-click="removeAll()" ng-hide="oneMax"/>'
- + '</td>'
- + '<td style="width:325px;">'
- + ' <div class="ebz-listbox" >'
- + ' <label ng-repeat="chosenId in chosenIds" style="display:block;">'
- + ' <input type="checkbox" style=" margin-top :10px;" att-checkbox ng-model="chosenId.available"/> {{chosenId.firstName}} {{chosenId.lastName}}({{chosenId.phone}})<br/>'
- + ' </label>'
- + ' </div>'
- + '</td> '
- + ' </tr>'
- + '</tbody>'
- + '</table>'
- + '</div>',
- replace: true,
- // restrict usage to element only since we use attributes for APIs
- restrict: 'EA',
- // new isolate scope
- scope: {
- chosenIds : '=assignedUsers'
- ,availableUsers : '='
- ,userTitle : '='
- ,availableTitle : '='
- ,oneMax : '=?'
- },
- link: function(scope, iElement, attrs){
-
- scope.$watch("userTitle", function(newval, oldval) {
- scope.userTitle = newval;
- });
- scope.$watch("availableTitle", function(newval, oldval) {
- scope.availableTitle = newval;
- });
-
- scope.$watch("availableUsers", function(newval, oldval) {
- scope.availableUsers = newval;
- scope.canditateIds= scope.getArrayRemoved(scope.availableUsers, scope.chosenIds);
- });
-
- },
-
- controller: function ($scope) {
- $scope.getArrayRemoved = function(from, removed){
- var retArray = (from)? from:[];
- if(retArray && retArray.length >0 && removed){
- for(var i = 0, l = removed.length; i<l; i++ ){
- retArray = $.grep(retArray, function(e){ return e.ociUserId !== removed[i].ociUserId; });
- };
- }
- return retArray;
- };
- $scope.canditateIds= $scope.getArrayRemoved($scope.availableUsers, $scope.chosenIds);
- $scope.chooseAll = function() {
-
- var dataFromTableData = $scope.canditateIds;
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
- if(!$scope.chosenIds)
- $scope.chosenIds=[];
- $scope.chosenIds.push(dataFromTableData[i]);
- $scope.canditateIds.splice(i,1);
-
- }
- var dataFromChoosonTable = $scope.chosenIds;
- for (var i = dataFromChoosonTable.length - 1; i >= 0; i--){
- if(dataFromChoosonTable[i].available){
- $scope.chosenIds[i].available=false;
- }
- }
- };
-
- $scope.removeAll = function() {
- var dataFromTableData = $scope.chosenIds;
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
- $scope.canditateIds.push(dataFromTableData[i]);
- $scope.chosenIds.splice(i,1);
-
- }
- var dataFromChoosonTable = $scope.canditateIds;
- for (var i = dataFromChoosonTable.length - 1; i >= 0; i--){
- if(dataFromChoosonTable[i].available){
- $scope.canditateIds[i].available=false;
- }
- }
- };
-
- $scope.chooseSelected = function() {
-
- var dataFromTableData = $scope.canditateIds;
-
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
-
- if(dataFromTableData[i].available){
- if(!$scope.chosenIds)
- $scope.chosenIds=[];
- $scope.chosenIds.push(dataFromTableData[i]);
- $scope.canditateIds.splice(i,1);
-
- }
- }
- var dataFromChoosonTable = $scope.chosenIds;
- for (var i = dataFromChoosonTable.length - 1; i >= 0; i--){
- if(dataFromChoosonTable[i].available){
- $scope.chosenIds[i].available=false;
- }
- }
- };
- $scope.removeSelected = function() {
-
- var dataFromTableData = $scope.chosenIds;
-
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
- if(dataFromTableData[i].available){
- $scope.canditateIds.push(dataFromTableData[i]);
- $scope.chosenIds.splice(i,1);
-
- }
- } ;
- var dataFromChoosonTable = $scope.canditateIds;
- for (var i = dataFromChoosonTable.length - 1; i >= 0; i--){
- if(dataFromChoosonTable[i].available){
- $scope.canditateIds[i].available=false;
- }
- }
- };
- $scope.checkCanditate = function(index) {
- if($scope.oneMax){
- for (var i = $scope.canditateIds.length - 1; i >= 0; i--){
- if(i != index)
- $scope.canditateIds[i].available=false;
- }
- }
- };
-
-
- }
- }
- });
- app.directive("selectString", function() {
- return {
- // replace custom element with html5 markup
- template: '<div> '
- + '<table style="width:660px;">'
- + '<thead>'
- + ' <tr >'
- + ' <th style="width:325px;">{{availableTitle}}</th> '
- + ' <th style="width:10px;"></th> '
- + ' <th style="width:325px;">{{assignedTitle}}</th> '
- + '</tr>'
- + '</thead>'
- + '<tbody>'
- + '<tr>'
- + ' <td style="width:325px;">'
- + ' <div class="ebz-listbox">'
- + ' <label ng-repeat="canditateId in canditateIds track by $index" style="display:block;"> '
- + ' <input type="checkbox" style="margin-top: 10px;" ng-model="canditateId.available" att-checkbox /> {{canditateId}}<br/>'
- + ' </label>'
- + ' </div>'
- + '</td>'
- + '<td valign="middle" width="10px">'
- + ' <img src="static/images/rightarrow_g.png" id="removeBtn" ng-click="chooseSelected()" />'
- + ' <br/><br/> '
- + ' <img src="static/images/leftarrow_g.png" id="chooseBtn" ng-click="removeSelected()" />'
- + ' <br/><br/>'
- + ' <img id="chooseAllBtn" src="static/images/rightrightarrow_g.png" ng-click="chooseAll()" />'
- + ' <br/><br/>'
- + ' <img style="cursor:pointer" id="removeAllBtn" src="static/images/leftleftarrow_g.png" ng-click="removeAll()" />'
- + '</td>'
- + '<td style="width:325px;">'
- + ' <div class="ebz-listbox" >'
- + ' <label ng-repeat="chosenId in chosenIds" style="display:block;">'
- + ' <input type="checkbox" style=" margin-top :10px;" att-checkbox ng-model="chosenId.available"/> {{chosenId}}<br/>'
- + ' </label>'
- + ' </div>'
- + '</td> '
- + ' </tr>'
- + '</tbody>'
- + '</table>'
- + '</div>',
- replace: true,
- // restrict usage to element only since we use attributes for APIs
- restrict: 'EA',
- // new isolate scope
- scope: {
- chosenIds : '=assignedOptions'
- ,availableOptions : '='
- ,availableTitle : '@'
- ,assignedTitle : '@'
- },
- link: function(scope, iElement, attrs){
- scope.$watch("availableOptions", function(newval, oldval) {
- scope.availableOptions = newval;
- scope.canditateIds= scope.getArrayRemoved(scope.availableOptions, scope.chosenIds);
- });
-
- },
-
- controller: function ($scope) {
- $scope.getArrayRemoved = function(from, removed){
- var retArray = (from)? from:[];
- if(retArray && retArray.length >0 && removed){
- for(var i = 0, l = removed.length; i<l; i++ ){
- retArray = $.grep(retArray, function(e){ return e !== removed[i]; });
- };
- }
- return retArray;
- };
-
- $scope.canditateIds= $scope.getArrayRemoved($scope.availableOptions, $scope.chosenIds);
- $scope.chooseAll = function() {
-
- var dataFromTableData = $scope.canditateIds;
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
- if(!$scope.chosenIds)
- $scope.chosenIds=[];
- $scope.chosenIds.push(dataFromTableData[i]);
- $scope.canditateIds.splice(i,1);
-
- }
- };
-
- $scope.removeAll = function() {
- var dataFromTableData = $scope.chosenIds;
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
- $scope.canditateIds.push(dataFromTableData[i]);
- $scope.chosenIds.splice(i,1);
-
- }
- };
-
- $scope.chooseSelected = function() {
-
- var dataFromTableData = $scope.canditateIds;
-
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
-
- if(dataFromTableData[i].available){
- if(!$scope.chosenIds)
- $scope.chosenIds=[];
- $scope.chosenIds.push(dataFromTableData[i]);
- $scope.canditateIds.splice(i,1);
-
- }
- }
- };
- $scope.removeSelected = function() {
-
- var dataFromTableData = $scope.chosenIds;
-
- for (var i = dataFromTableData.length - 1; i >= 0; i--){
- if(dataFromTableData[i].available){
- $scope.canditateIds.push(dataFromTableData[i]);
- $scope.chosenIds.splice(i,1);
-
- }
- } ;
- };
-
- }
- }
- });
- function getParameterByName(name) {
- name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
- var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
- results = regex.exec(location.search);
- return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
- };
-
- app.directive("time", function() {
- return {
- // replace custom element with html5 markup
- template: '<div style="height:80px; display:inline-block;"> '
- + ' <input type="text" class="fn-ebz-text" ng-model="timeStr" placeholder="HH:MM" style="width:70px" ng-change="parseValue()"/>'
- + ' <div class="form-field" att-select="ampmOptions" ng-model="ampm" style="width:70px" ng-change="parseValue()"></div>'
- + ' </div>',
- replace: true,
- // restrict usage to element only since we use attributes for APIs
- restrict: 'EA',
- // new isolate scope
- scope: {
- value : '='
- ,validTime : '=?'
- },
- link: function(scope, iElement, attrs){
- },
-
- controller: function ($scope) {
- $scope.timeStr='';
- $scope.ampm=null;
- var am ={index: 0, value: 'AM', title: 'AM', alias:'Name2'};
- var pm = {index: 1, value: 'PM', title: 'PM', alias:'Name'};
- $scope.ampmOptions=[
- am,
- pm,
- ]
- $scope.parseTimeStr= function(str){
- if(str){
- try{
- var date;
- if(/^(\d*):(\d*)$/.test(str)){
- var hh = Number(str.match(/^(\d+)/)[1]);
- var mm = Number(str.match(/:(\d+)/)[1]);
- date = new Date(1970, 0, 1, hh, mm, 0);
- }else{
- date = new Date(str);
- }
- var hours = date.getHours();
- var minutes = date.getMinutes();
- var ampm = hours >= 12 ?pm : am;
- hours = hours % 12;
- hours = hours ? hours : 12; // the hour '0' should be '12'
- minutes = minutes < 10 ? '0'+minutes : minutes;
- hours = hours < 10 ? '0'+hours : hours;
- var strTime = hours + ':' + minutes ;
-
-
- $scope.timeStr =strTime;
- $scope.ampm = ampm;
- if (typeof $scope.validTime != 'undefined'){
- $scope.validTime=true;
- }
- }catch(err){
- if (typeof $scope.validTime != 'undefined'){
- $scope.validTime=false;
- }
- }
- }else{
- $scope.timeStr = "12:00";
- $scope.ampm =am;
- }
- };
- $scope.parseTimeStr($scope.value);
- $scope.parseValue = function(){
- try{
- var date;
- var hh = Number($scope.timeStr.match(/^(\d+)/)[1]);
- var mm = Number($scope.timeStr.match(/:(\d+)/)[1]);
-
- if(hh<=12 && hh>0 && mm>=0 && mm<=59){
-
- if($scope.ampm.value=='PM'&& hh<12) hh = hh+12;
- if($scope.ampm.value=='AM'&& hh==12) hh = hh-12;
- mm = mm < 10 ? '0'+mm : mm;
- hh = hh < 10 ? '0'+hh : hh;
- $scope.value= hh+":"+mm;
- if (typeof $scope.validTime != 'undefined'){
- $scope.validTime=true;
- }
- }else{
- if (typeof $scope.validTime != 'undefined'){
- $scope.validTime=false;
- }
- }
-
- }catch(err){
- if (typeof $scope.validTime != 'undefined'){
- $scope.validTime=false;
- }
- }
- };
- }
- }
- }); \ No newline at end of file